/* RainLoop Webmail (c) RainLoop Team | Licensed under AGPL v3 */
/******/ (function(modules) { // webpackBootstrap
/******/ 	// The module cache
/******/ 	var installedModules = {};
/******/
/******/ 	// The require function
/******/ 	function __webpack_require__(moduleId) {
/******/
/******/ 		// Check if module is in cache
/******/ 		if(installedModules[moduleId]) {
/******/ 			return installedModules[moduleId].exports;
/******/ 		}
/******/ 		// Create a new module (and put it into the cache)
/******/ 		var module = installedModules[moduleId] = {
/******/ 			i: moduleId,
/******/ 			l: false,
/******/ 			exports: {}
/******/ 		};
/******/
/******/ 		// Execute the module function
/******/ 		modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ 		// Flag the module as loaded
/******/ 		module.l = true;
/******/
/******/ 		// Return the exports of the module
/******/ 		return module.exports;
/******/ 	}
/******/
/******/
/******/ 	// expose the modules object (__webpack_modules__)
/******/ 	__webpack_require__.m = modules;
/******/
/******/ 	// expose the module cache
/******/ 	__webpack_require__.c = installedModules;
/******/
/******/ 	// define getter function for harmony exports
/******/ 	__webpack_require__.d = function(exports, name, getter) {
/******/ 		if(!__webpack_require__.o(exports, name)) {
/******/ 			Object.defineProperty(exports, name, { enumerable: true, get: getter });
/******/ 		}
/******/ 	};
/******/
/******/ 	// define __esModule on exports
/******/ 	__webpack_require__.r = function(exports) {
/******/ 		if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ 			Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ 		}
/******/ 		Object.defineProperty(exports, '__esModule', { value: true });
/******/ 	};
/******/
/******/ 	// create a fake namespace object
/******/ 	// mode & 1: value is a module id, require it
/******/ 	// mode & 2: merge all properties of value into the ns
/******/ 	// mode & 4: return value when already ns object
/******/ 	// mode & 8|1: behave like require
/******/ 	__webpack_require__.t = function(value, mode) {
/******/ 		if(mode & 1) value = __webpack_require__(value);
/******/ 		if(mode & 8) return value;
/******/ 		if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
/******/ 		var ns = Object.create(null);
/******/ 		__webpack_require__.r(ns);
/******/ 		Object.defineProperty(ns, 'default', { enumerable: true, value: value });
/******/ 		if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
/******/ 		return ns;
/******/ 	};
/******/
/******/ 	// getDefaultExport function for compatibility with non-harmony modules
/******/ 	__webpack_require__.n = function(module) {
/******/ 		var getter = module && module.__esModule ?
/******/ 			function getDefault() { return module['default']; } :
/******/ 			function getModuleExports() { return module; };
/******/ 		__webpack_require__.d(getter, 'a', getter);
/******/ 		return getter;
/******/ 	};
/******/
/******/ 	// Object.prototype.hasOwnProperty.call
/******/ 	__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/
/******/ 	// __webpack_public_path__
/******/ 	__webpack_require__.p = "rainloop/v/0.0.0/static/js/";
/******/
/******/
/******/ 	// Load entry module and return exports
/******/ 	return __webpack_require__(__webpack_require__.s = 517);
/******/ })
/************************************************************************/
/******/ ([
/* 0 */
/*!*****************************!*\
  !*** ./dev/Common/Enums.js ***!
  \*****************************/
/*! exports provided: FileType, StorageResultType, Focused, State, StateType, Capa, KeyState, FolderType, ServerFolderType, LoginSignMeTypeAsString, LoginSignMeType, ComposeType, UploadErrorCode, SetSystemFoldersNotification, ClientSideKeyName, EventKeyCode, MessageSetAction, MessageSelectAction, DesktopNotification, MessagePriority, EditorDefaultType, ServerSecure, SearchDateType, SaveSettingsStep, Layout, FilterConditionField, FilterConditionType, FiltersAction, FilterRulesType, SignedVerifyStatus, ContactPropertyType, Magics, Ports, Notification */
/*! all exports used */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FileType", function() { return FileType; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StorageResultType", function() { return StorageResultType; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Focused", function() { return Focused; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "State", function() { return State; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StateType", function() { return StateType; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Capa", function() { return Capa; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "KeyState", function() { return KeyState; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FolderType", function() { return FolderType; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ServerFolderType", function() { return ServerFolderType; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LoginSignMeTypeAsString", function() { return LoginSignMeTypeAsString; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LoginSignMeType", function() { return LoginSignMeType; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ComposeType", function() { return ComposeType; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "UploadErrorCode", function() { return UploadErrorCode; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SetSystemFoldersNotification", function() { return SetSystemFoldersNotification; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ClientSideKeyName", function() { return ClientSideKeyName; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EventKeyCode", function() { return EventKeyCode; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MessageSetAction", function() { return MessageSetAction; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MessageSelectAction", function() { return MessageSelectAction; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DesktopNotification", function() { return DesktopNotification; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MessagePriority", function() { return MessagePriority; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EditorDefaultType", function() { return EditorDefaultType; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ServerSecure", function() { return ServerSecure; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SearchDateType", function() { return SearchDateType; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SaveSettingsStep", function() { return SaveSettingsStep; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Layout", function() { return Layout; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FilterConditionField", function() { return FilterConditionField; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FilterConditionType", function() { return FilterConditionType; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FiltersAction", function() { return FiltersAction; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FilterRulesType", function() { return FilterRulesType; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SignedVerifyStatus", function() { return SignedVerifyStatus; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ContactPropertyType", function() { return ContactPropertyType; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Magics", function() { return Magics; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Ports", function() { return Ports; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Notification", function() { return Notification; });
/* eslint quote-props: 0 */

/**
 * @enum {string}
 */
var FileType = {
  'Unknown': 'unknown',
  'Text': 'text',
  'Html': 'html',
  'Code': 'code',
  'Eml': 'eml',
  'WordText': 'word-text',
  'Pdf': 'pdf',
  'Image': 'image',
  'Audio': 'audio',
  'Video': 'video',
  'Sheet': 'sheet',
  'Presentation': 'presentation',
  'Certificate': 'certificate',
  'CertificateBin': 'certificate-bin',
  'Archive': 'archive'
};
/**
 * @enum {string}
 */

var StorageResultType = {
  'Success': 'success',
  'Abort': 'abort',
  'Error': 'error',
  'Unload': 'unload'
};
/**
 * @enum {string}
 */

var Focused = {
  'None': 'none',
  'MessageList': 'message-list',
  'MessageView': 'message-view',
  'FolderList': 'folder-list'
};
/**
 * @enum {number}
 */

var State = {
  'Empty': 10,
  'Login': 20,
  'Auth': 30
};
/**
 * @enum {number}
 */

var StateType = {
  'Webmail': 0,
  'Admin': 1
};
/**
 * @enum {string}
 */

var Capa = {
  'TwoFactor': 'TWO_FACTOR',
  'TwoFactorForce': 'TWO_FACTOR_FORCE',
  'OpenPGP': 'OPEN_PGP',
  'Prefetch': 'PREFETCH',
  'Gravatar': 'GRAVATAR',
  'Folders': 'FOLDERS',
  'Composer': 'COMPOSER',
  'Contacts': 'CONTACTS',
  'Reload': 'RELOAD',
  'Search': 'SEARCH',
  'SearchAdv': 'SEARCH_ADV',
  'MessageActions': 'MESSAGE_ACTIONS',
  'MessageListActions': 'MESSAGELIST_ACTIONS',
  'AttachmentsActions': 'ATTACHMENTS_ACTIONS',
  'DangerousActions': 'DANGEROUS_ACTIONS',
  'Settings': 'SETTINGS',
  'Help': 'HELP',
  'Themes': 'THEMES',
  'UserBackground': 'USER_BACKGROUND',
  'Sieve': 'SIEVE',
  'Filters': 'FILTERS',
  'AttachmentThumbnails': 'ATTACHMENT_THUMBNAILS',
  'Templates': 'TEMPLATES',
  'AutoLogout': 'AUTOLOGOUT',
  'AdditionalAccounts': 'ADDITIONAL_ACCOUNTS',
  'Identities': 'IDENTITIES'
};
/**
 * @enum {string}
 */

var KeyState = {
  'All': 'all',
  'None': 'none',
  'ContactList': 'contact-list',
  'MessageList': 'message-list',
  'FolderList': 'folder-list',
  'MessageView': 'message-view',
  'Compose': 'compose',
  'Settings': 'settings',
  'Menu': 'menu',
  'PopupComposeOpenPGP': 'compose-open-pgp',
  'PopupMessageOpenPGP': 'message-open-pgp',
  'PopupViewOpenPGP': 'view-open-pgp',
  'PopupKeyboardShortcutsHelp': 'popup-keyboard-shortcuts-help',
  'PopupAsk': 'popup-ask'
};
/**
 * @enum {number}
 */

var FolderType = {
  'Inbox': 10,
  'SentItems': 11,
  'Draft': 12,
  'Trash': 13,
  'Spam': 14,
  'Archive': 15,
  'NotSpam': 80,
  'User': 99
};
/**
 * @enum {number}
 */

var ServerFolderType = {
  'USER': 0,
  'INBOX': 1,
  'SENT': 2,
  'DRAFTS': 3,
  'JUNK': 4,
  'TRASH': 5,
  'IMPORTANT': 10,
  'FLAGGED': 11,
  'ALL': 12
};
/**
 * @enum {string}
 */

var LoginSignMeTypeAsString = {
  'DefaultOff': 'defaultoff',
  'DefaultOn': 'defaulton',
  'Unused': 'unused'
};
/**
 * @enum {number}
 */

var LoginSignMeType = {
  'DefaultOff': 0,
  'DefaultOn': 1,
  'Unused': 2
};
/**
 * @enum {string}
 */

var ComposeType = {
  'Empty': 'empty',
  'Reply': 'reply',
  'ReplyAll': 'replyall',
  'Forward': 'forward',
  'ForwardAsAttachment': 'forward-as-attachment',
  'Draft': 'draft',
  'EditAsNew': 'editasnew'
};
/**
 * @enum {number}
 */

var UploadErrorCode = {
  'Normal': 0,
  'FileIsTooBig': 1,
  'FilePartiallyUploaded': 2,
  'FileNoUploaded': 3,
  'MissingTempFolder': 4,
  'FileOnSaveingError': 5,
  'FileType': 98,
  'Unknown': 99
};
/**
 * @enum {number}
 */

var SetSystemFoldersNotification = {
  'None': 0,
  'Sent': 1,
  'Draft': 2,
  'Spam': 3,
  'Trash': 4,
  'Archive': 5
};
/**
 * @enum {number}
 */

var ClientSideKeyName = {
  'FoldersLashHash': 0,
  'MessagesInboxLastHash': 1,
  'MailBoxListSize': 2,
  'ExpandedFolders': 3,
  'FolderListSize': 4,
  'MessageListSize': 5,
  'LastReplyAction': 6,
  'LastSignMe': 7,
  'ComposeLastIdentityID': 8,
  'MessageHeaderFullInfo': 9,
  'MessageAttachmnetControls': 10
};
/**
 * @enum {number}
 */

var EventKeyCode = {
  'Backspace': 8,
  'Tab': 9,
  'Enter': 13,
  'Esc': 27,
  'PageUp': 33,
  'PageDown': 34,
  'Left': 37,
  'Right': 39,
  'Up': 38,
  'Down': 40,
  'End': 35,
  'Home': 36,
  'Space': 32,
  'Insert': 45,
  'Delete': 46,
  'A': 65,
  'S': 83
};
/**
 * @enum {number}
 */

var MessageSetAction = {
  'SetSeen': 0,
  'UnsetSeen': 1,
  'SetFlag': 2,
  'UnsetFlag': 3
};
/**
 * @enum {number}
 */

var MessageSelectAction = {
  'All': 0,
  'None': 1,
  'Invert': 2,
  'Unseen': 3,
  'Seen': 4,
  'Flagged': 5,
  'Unflagged': 6
};
/**
 * @enum {number}
 */

var DesktopNotification = {
  'Allowed': 0,
  'NotAllowed': 1,
  'Denied': 2,
  'NotSupported': 9
};
/**
 * @enum {number}
 */

var MessagePriority = {
  'Low': 5,
  'Normal': 3,
  'High': 1
};
/**
 * @enum {string}
 */

var EditorDefaultType = {
  'Html': 'Html',
  'Plain': 'Plain',
  'HtmlForced': 'HtmlForced',
  'PlainForced': 'PlainForced'
};
/**
 * @enum {number}
 */

var ServerSecure = {
  'None': 0,
  'SSL': 1,
  'TLS': 2
};
/**
 * @enum {number}
 */

var SearchDateType = {
  'All': -1,
  'Days3': 3,
  'Days7': 7,
  'Month': 30
};
/**
 * @enum {number}
 */

var SaveSettingsStep = {
  'Animate': -2,
  'Idle': -1,
  'TrueResult': 1,
  'FalseResult': 0
};
/**
 * @enum {number}
 */

var Layout = {
  'NoPreview': 0,
  'SidePreview': 1,
  'BottomPreview': 2
};
/**
 * @enum {string}
 */

var FilterConditionField = {
  'From': 'From',
  'Recipient': 'Recipient',
  'Subject': 'Subject',
  'Header': 'Header',
  'Size': 'Size'
};
/**
 * @enum {string}
 */

var FilterConditionType = {
  'Contains': 'Contains',
  'NotContains': 'NotContains',
  'EqualTo': 'EqualTo',
  'NotEqualTo': 'NotEqualTo',
  'Regex': 'Regex',
  'Over': 'Over',
  'Under': 'Under'
};
/**
 * @enum {string}
 */

var FiltersAction = {
  'None': 'None',
  'MoveTo': 'MoveTo',
  'Discard': 'Discard',
  'Vacation': 'Vacation',
  'Reject': 'Reject',
  'Forward': 'Forward'
};
/**
 * @enum {string}
 */

var FilterRulesType = {
  'All': 'All',
  'Any': 'Any'
};
/**
 * @enum {number}
 */

var SignedVerifyStatus = {
  'UnknownPublicKeys': -4,
  'UnknownPrivateKey': -3,
  'Unverified': -2,
  'Error': -1,
  'None': 0,
  'Success': 1
};
/**
 * @enum {number}
 */

var ContactPropertyType = {
  'Unknown': 0,
  'FullName': 10,
  'FirstName': 15,
  'LastName': 16,
  'MiddleName': 16,
  'Nick': 18,
  'NamePrefix': 20,
  'NameSuffix': 21,
  'Email': 30,
  'Phone': 31,
  'Web': 32,
  'Birthday': 40,
  'Facebook': 90,
  'Skype': 91,
  'GitHub': 92,
  'Note': 110,
  'Custom': 250
};
/**
 * @enum {number}
 */

var Magics = {
  'EventWhichMouseMiddle': 3,
  'ifvisibleIdle10s': 10,
  'BitLength2048': 2048,
  'BitLength1024': 1024,
  'Size350px': 350,
  'Size50px': 50,
  'Size20px': 20,
  'Size1px': 1,
  'Time30mInMin': 30,
  'Time60m': 60000 * 60,
  'Time30m': 60000 * 30,
  'Time20m': 60000 * 20,
  'Time15m': 60000 * 15,
  'Time10m': 60000 * 10,
  'Time5m': 60000 * 5,
  'Time3m': 60000 * 3,
  'Time2m': 60000 * 2,
  'Time1m': 60000,
  'Time30s': 30000,
  'Time10s': 10000,
  'Time7s': 7000,
  'Time5s': 5000,
  'Time3s': 3000,
  'Time1s': 1000,
  'Time500ms': 500,
  'Time350ms': 350,
  'Time250ms': 250,
  'Time200ms': 200,
  'Time100ms': 100,
  'Time50ms': 50,
  'Time20ms': 20,
  'Time10ms': 10,
  'Time1ms': 1
};
/**
 * @enum {number}
 */

var Ports = {
  'Imap': 143,
  'ImapSsl': 993,
  'Smtp': 25,
  'SmtpSsl': 465,
  'SmtpStartTls': 587
};
/**
 * @enum {number}
 */

var Notification = {
  'InvalidToken': 101,
  'AuthError': 102,
  'AccessError': 103,
  'ConnectionError': 104,
  'CaptchaError': 105,
  'SocialFacebookLoginAccessDisable': 106,
  'SocialTwitterLoginAccessDisable': 107,
  'SocialGoogleLoginAccessDisable': 108,
  'DomainNotAllowed': 109,
  'AccountNotAllowed': 110,
  'AccountTwoFactorAuthRequired': 120,
  'AccountTwoFactorAuthError': 121,
  'CouldNotSaveNewPassword': 130,
  'CurrentPasswordIncorrect': 131,
  'NewPasswordShort': 132,
  'NewPasswordWeak': 133,
  'NewPasswordForbidden': 134,
  'ContactsSyncError': 140,
  'CantGetMessageList': 201,
  'CantGetMessage': 202,
  'CantDeleteMessage': 203,
  'CantMoveMessage': 204,
  'CantCopyMessage': 205,
  'CantSaveMessage': 301,
  'CantSendMessage': 302,
  'InvalidRecipients': 303,
  'CantSaveFilters': 351,
  'CantGetFilters': 352,
  'FiltersAreNotCorrect': 355,
  'CantCreateFolder': 400,
  'CantRenameFolder': 401,
  'CantDeleteFolder': 402,
  'CantSubscribeFolder': 403,
  'CantUnsubscribeFolder': 404,
  'CantDeleteNonEmptyFolder': 405,
  'CantSaveSettings': 501,
  'CantSavePluginSettings': 502,
  'DomainAlreadyExists': 601,
  'CantInstallPackage': 701,
  'CantDeletePackage': 702,
  'InvalidPluginPackage': 703,
  'UnsupportedPluginPackage': 704,
  'LicensingServerIsUnavailable': 710,
  'LicensingExpired': 711,
  'LicensingBanned': 712,
  'DemoSendMessageError': 750,
  'DemoAccountError': 751,
  'AccountAlreadyExists': 801,
  'AccountDoesNotExist': 802,
  'MailServerError': 901,
  'ClientViewError': 902,
  'InvalidInputArgument': 903,
  'AjaxFalse': 950,
  'AjaxAbort': 951,
  'AjaxParse': 952,
  'AjaxTimeout': 953,
  'UnknownNotification': 999,
  'UnknownError': 999
};

/***/ }),
/* 1 */
/*!****************************!*\
  !*** ./dev/External/ko.js ***!
  \****************************/
/*! exports provided: default */
/*! exports used: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var core_js_modules_es_array_reverse__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.array.reverse */ 339);
/* harmony import */ var core_js_modules_es_array_reverse__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_reverse__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var core_js_modules_es_object_to_string__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es.object.to-string */ 63);
/* harmony import */ var core_js_modules_es_object_to_string__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_to_string__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var core_js_modules_es_regexp_to_string__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core-js/modules/es.regexp.to-string */ 111);
/* harmony import */ var core_js_modules_es_regexp_to_string__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_regexp_to_string__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var core_js_modules_es_string_link__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! core-js/modules/es.string.link */ 172);
/* harmony import */ var core_js_modules_es_string_link__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_link__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var core_js_modules_web_timers__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! core-js/modules/web.timers */ 67);
/* harmony import */ var core_js_modules_web_timers__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_timers__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/map */ 18);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_5__);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_index_of__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/index-of */ 30);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_index_of__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_index_of__WEBPACK_IMPORTED_MODULE_6__);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_trim__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/trim */ 138);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_trim__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_trim__WEBPACK_IMPORTED_MODULE_7__);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/find */ 12);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_8__);
/* harmony import */ var window__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! window */ 4);
/* harmony import */ var window__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(window__WEBPACK_IMPORTED_MODULE_9__);
/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! _ */ 3);
/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(___WEBPACK_IMPORTED_MODULE_10__);
/* harmony import */ var $__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! $ */ 8);
/* harmony import */ var $__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n($__WEBPACK_IMPORTED_MODULE_11__);
/* harmony import */ var Opentip__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! Opentip */ 210);
/* harmony import */ var pikaday__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! pikaday */ 211);
/* harmony import */ var pikaday__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(pikaday__WEBPACK_IMPORTED_MODULE_13__);
/* harmony import */ var Common_Enums__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! Common/Enums */ 0);
















var ko = window__WEBPACK_IMPORTED_MODULE_9___default.a.ko,
    $win = $__WEBPACK_IMPORTED_MODULE_11___default()(window__WEBPACK_IMPORTED_MODULE_9___default.a),
    fDisposalTooltipHelper = function fDisposalTooltipHelper(element) {
  ko.utils.domNodeDisposal.addDisposeCallback(element, function () {
    if (element && element.__opentip) {
      element.__opentip.deactivate();
    }
  });
};

ko.bindingHandlers.updateWidth = {
  init: function init(element, fValueAccessor) {
    var $el = $__WEBPACK_IMPORTED_MODULE_11___default()(element),
        fValue = fValueAccessor(),
        fInit = function fInit() {
      fValue($el.width());
      window__WEBPACK_IMPORTED_MODULE_9___default.a.setTimeout(function () {
        fValue($el.width());
      }, Common_Enums__WEBPACK_IMPORTED_MODULE_14__["Magics"].Time500ms);
    };

    $win.on('resize', fInit);
    fInit();
    ko.utils.domNodeDisposal.addDisposeCallback(element, function () {
      $win.off('resize', fInit);
    });
  }
};
ko.bindingHandlers.editor = {
  init: function init(element, fValueAccessor) {
    var editor = null;

    var fValue = fValueAccessor(),
        HtmlEditor = __webpack_require__(/*! Common/HtmlEditor */ 207).default,
        fUpdateEditorValue = function fUpdateEditorValue() {
      if (fValue && fValue.__editor) {
        fValue.__editor.setHtmlOrPlain(fValue());
      }
    },
        fUpdateKoValue = function fUpdateKoValue() {
      if (fValue && fValue.__editor) {
        fValue(fValue.__editor.getDataWithHtmlMark());
      }
    },
        fOnReady = function fOnReady() {
      fValue.__editor = editor;
      fUpdateEditorValue();
    };

    if (ko.isObservable(fValue) && HtmlEditor) {
      editor = new HtmlEditor(element, fUpdateKoValue, fOnReady, fUpdateKoValue);
      fValue.__fetchEditorValue = fUpdateKoValue;
      fValue.subscribe(fUpdateEditorValue); // ko.utils.domNodeDisposal.addDisposeCallback(element, () => {
      // });
    }
  }
};
ko.bindingHandlers.json = {
  init: function init(element, fValueAccessor) {
    $__WEBPACK_IMPORTED_MODULE_11___default()(element).text(window__WEBPACK_IMPORTED_MODULE_9___default.a.JSON.stringify(ko.unwrap(fValueAccessor())));
  },
  update: function update(element, fValueAccessor) {
    $__WEBPACK_IMPORTED_MODULE_11___default()(element).text(window__WEBPACK_IMPORTED_MODULE_9___default.a.JSON.stringify(ko.unwrap(fValueAccessor())));
  }
};
ko.bindingHandlers.scrollerShadows = {
  init: function init(element) {
    var limit = 8,
        $el = $__WEBPACK_IMPORTED_MODULE_11___default()(element),
        cont = _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_8___default()($el).call($el, '[data-scroller-shadows-content]')[0] || null,
        fFunc = ___WEBPACK_IMPORTED_MODULE_10___default.a.throttle(function () {
      $el.toggleClass('scroller-shadow-top', limit < cont.scrollTop).toggleClass('scroller-shadow-bottom', cont.scrollTop + limit < cont.scrollHeight - cont.clientHeight);
    }, 100);

    if (cont) {
      $__WEBPACK_IMPORTED_MODULE_11___default()(cont).on('scroll resize', fFunc);
      $win.on('resize', fFunc);
      ko.utils.domNodeDisposal.addDisposeCallback(cont, function () {
        $__WEBPACK_IMPORTED_MODULE_11___default()(cont).off();
        $win.off('resize', fFunc);
      });
    }
  }
};
ko.bindingHandlers.pikaday = {
  init: function init(element, fValueAccessor, fAllBindingsAccessor, viewModel, bindingContext) {
    ko.bindingHandlers.textInput.init(element, fValueAccessor, fAllBindingsAccessor, viewModel, bindingContext);

    if (pikaday__WEBPACK_IMPORTED_MODULE_13___default.a) {
      element.__pikaday = new pikaday__WEBPACK_IMPORTED_MODULE_13___default.a({
        field: element
      });
    }
  }
};
ko.bindingHandlers.visibleAnimated = {
  init: function init(element, fValueAccessor) {
    var $el = $__WEBPACK_IMPORTED_MODULE_11___default()(element);
    $el.addClass('rl-animated-inited');

    if (ko.unwrap(fValueAccessor())) {
      $el.show();
    } else {
      $el.hide();
    }
  },
  update: function update(element, fValueAccessor) {
    var $el = $__WEBPACK_IMPORTED_MODULE_11___default()(element);

    if (ko.unwrap(fValueAccessor())) {
      $el.addClass('rl-animated-hidden').show();

      ___WEBPACK_IMPORTED_MODULE_10___default.a.delay(function () {
        $el.removeClass('rl-animated-hidden');
      }, 10);
    } else {
      $el.hide().removeClass('rl-animated-hidden');
    }
  }
};
ko.bindingHandlers.tooltip = {
  init: function init(element, fValueAccessor) {
    var $el = $__WEBPACK_IMPORTED_MODULE_11___default()(element),
        fValue = fValueAccessor(),
        isMobile = 'on' === ($el.data('tooltip-mobile') || 'off'),
        isI18N = 'on' === ($el.data('tooltip-i18n') || 'on'),
        Globals = __webpack_require__(/*! Common/Globals */ 6);

    if (!Globals.bMobileDevice || isMobile) {
      var sValue = !ko.isObservable(fValue) && ___WEBPACK_IMPORTED_MODULE_10___default.a.isFunction(fValue) ? fValue() : ko.unwrap(fValue);
      element.__opentip = new Opentip__WEBPACK_IMPORTED_MODULE_12__[/* default */ "a"](element, {
        'style': 'rainloopTip',
        'element': element,
        'tipJoint': $el.data('tooltip-join') || 'bottom'
      });
      Globals.dropdownVisibility.subscribe(function (v) {
        if (v) {
          element.__opentip.hide();
        }
      });

      if ('' === sValue) {
        element.__opentip.hide();

        element.__opentip.deactivate();

        element.__opentip.setContent('');
      } else {
        element.__opentip.activate();
      }

      if (isI18N) {
        var Translator = __webpack_require__(/*! Common/Translator */ 9);

        element.__opentip.setContent(Translator.i18n(sValue));

        Translator.trigger.subscribe(function () {
          element.__opentip.setContent(Translator.i18n(sValue));
        });
        Globals.dropdownVisibility.subscribe(function () {
          if (element && element.__opentip) {
            element.__opentip.setContent(Translator.i18n(sValue));
          }
        });
      } else {
        element.__opentip.setContent(sValue);
      }

      $win.on('rl.tooltips.diactivate', function () {
        element.__opentip.hide();

        element.__opentip.deactivate();
      });
      $win.on('rl.tooltips.activate', function () {
        element.__opentip.activate();
      });
    }
  },
  update: function update(element, fValueAccessor) {
    var $el = $__WEBPACK_IMPORTED_MODULE_11___default()(element),
        fValue = fValueAccessor(),
        isMobile = 'on' === ($el.data('tooltip-mobile') || 'off'),
        isI18N = 'on' === ($el.data('tooltip-i18n') || 'on'),
        Globals = __webpack_require__(/*! Common/Globals */ 6);

    if ((!Globals.bMobileDevice || isMobile) && element.__opentip) {
      var sValue = !ko.isObservable(fValue) && ___WEBPACK_IMPORTED_MODULE_10___default.a.isFunction(fValue) ? fValue() : ko.unwrap(fValue);

      if (sValue) {
        element.__opentip.setContent(isI18N ? __webpack_require__(/*! Common/Translator */ 9).i18n(sValue) : sValue);

        element.__opentip.activate();
      } else {
        element.__opentip.hide();

        element.__opentip.deactivate();

        element.__opentip.setContent('');
      }
    }
  }
};
ko.bindingHandlers.tooltipErrorTip = {
  init: function init(element) {
    var $el = $__WEBPACK_IMPORTED_MODULE_11___default()(element);
    element.__opentip = new Opentip__WEBPACK_IMPORTED_MODULE_12__[/* default */ "a"](element, {
      style: 'rainloopErrorTip',
      hideOn: 'mouseout click',
      element: element,
      tipJoint: $el.data('tooltip-join') || 'top'
    });

    element.__opentip.deactivate();

    $__WEBPACK_IMPORTED_MODULE_11___default()(window__WEBPACK_IMPORTED_MODULE_9___default.a.document).on('click', function () {
      if (element && element.__opentip) {
        element.__opentip.hide();
      }
    });
    fDisposalTooltipHelper(element);
  },
  update: function update(element, fValueAccessor) {
    var $el = $__WEBPACK_IMPORTED_MODULE_11___default()(element),
        fValue = fValueAccessor(),
        value = !ko.isObservable(fValue) && ___WEBPACK_IMPORTED_MODULE_10___default.a.isFunction(fValue) ? fValue() : ko.unwrap(fValue),
        openTips = element.__opentip;

    if (openTips) {
      if ('' === value) {
        openTips.hide();
        openTips.deactivate();
        openTips.setContent('');
      } else {
        ___WEBPACK_IMPORTED_MODULE_10___default.a.delay(function () {
          if ($el.is(':visible')) {
            openTips.setContent(value);
            openTips.activate();
            openTips.show();
          } else {
            openTips.hide();
            openTips.deactivate();
            openTips.setContent('');
          }
        }, Common_Enums__WEBPACK_IMPORTED_MODULE_14__["Magics"].Time100ms);
      }
    }
  }
};
ko.bindingHandlers.registrateBootstrapDropdown = {
  init: function init(element) {
    var Globals = __webpack_require__(/*! Common/Globals */ 6);

    if (Globals && Globals.data.aBootstrapDropdowns) {
      Globals.data.aBootstrapDropdowns.push($__WEBPACK_IMPORTED_MODULE_11___default()(element));
      $__WEBPACK_IMPORTED_MODULE_11___default()(element).click(function () {
        __webpack_require__(/*! Common/Utils */ 2).detectDropdownVisibility();
      }); // ko.utils.domNodeDisposal.addDisposeCallback(element, () => {
      // });
    }
  }
};
ko.bindingHandlers.openDropdownTrigger = {
  update: function update(element, fValueAccessor) {
    if (ko.unwrap(fValueAccessor())) {
      var $el = $__WEBPACK_IMPORTED_MODULE_11___default()(element);

      if (!$el.hasClass('open')) {
        _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_8___default()($el).call($el, '.dropdown-toggle').dropdown('toggle');
      }

      _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_8___default()($el).call($el, '.dropdown-toggle').focus();

      __webpack_require__(/*! Common/Utils */ 2).detectDropdownVisibility();

      fValueAccessor()(false);
    }
  }
};
ko.bindingHandlers.dropdownCloser = {
  init: function init(element) {
    $__WEBPACK_IMPORTED_MODULE_11___default()(element).closest('.dropdown').on('click', '.e-item', function () {
      $__WEBPACK_IMPORTED_MODULE_11___default()(element).dropdown('toggle');
    });
  }
};
ko.bindingHandlers.popover = {
  init: function init(element, fValueAccessor) {
    $__WEBPACK_IMPORTED_MODULE_11___default()(element).popover(ko.unwrap(fValueAccessor()));
    ko.utils.domNodeDisposal.addDisposeCallback(element, function () {
      $__WEBPACK_IMPORTED_MODULE_11___default()(element).popover('destroy');
    });
  }
};
ko.bindingHandlers.csstext = {};

ko.bindingHandlers.csstext.init = ko.bindingHandlers.csstext.update = function (element, fValueAccessor) {
  if (element && element.styleSheet && 'undefined' !== typeof element.styleSheet.cssText) {
    element.styleSheet.cssText = ko.unwrap(fValueAccessor());
  } else {
    $__WEBPACK_IMPORTED_MODULE_11___default()(element).text(ko.unwrap(fValueAccessor()));
  }
};

ko.bindingHandlers.resizecrop = {
  init: function init(element) {
    $__WEBPACK_IMPORTED_MODULE_11___default()(element).addClass('resizecrop').resizecrop({
      'width': '100',
      'height': '100',
      'wrapperCSS': {
        'border-radius': '10px'
      }
    });
  },
  update: function update(element, fValueAccessor) {
    fValueAccessor()();
    $__WEBPACK_IMPORTED_MODULE_11___default()(element).resizecrop({
      'width': '100',
      'height': '100'
    });
  }
};
ko.bindingHandlers.onKeyDown = {
  init: function init(element, fValueAccessor, fAllBindingsAccessor, viewModel) {
    $__WEBPACK_IMPORTED_MODULE_11___default()(element).on('keydown.koOnKeyDown', function (event) {
      if (event) {
        return fValueAccessor().call(viewModel, event);
      }

      return true;
    });
    ko.utils.domNodeDisposal.addDisposeCallback(element, function () {
      $__WEBPACK_IMPORTED_MODULE_11___default()(element).off('keydown.koOnKeyDown');
    });
  }
};
ko.bindingHandlers.onEnter = {
  init: function init(element, fValueAccessor, fAllBindingsAccessor, viewModel) {
    $__WEBPACK_IMPORTED_MODULE_11___default()(element).on('keypress.koOnEnter', function (event) {
      if (event && 13 === window__WEBPACK_IMPORTED_MODULE_9___default.a.parseInt(event.keyCode, 10)) {
        $__WEBPACK_IMPORTED_MODULE_11___default()(element).trigger('change');
        fValueAccessor().call(viewModel);
      }
    });
    ko.utils.domNodeDisposal.addDisposeCallback(element, function () {
      $__WEBPACK_IMPORTED_MODULE_11___default()(element).off('keypress.koOnEnter');
    });
  }
};
ko.bindingHandlers.onSpace = {
  init: function init(element, fValueAccessor, fAllBindingsAccessor, viewModel) {
    $__WEBPACK_IMPORTED_MODULE_11___default()(element).on('keyup.koOnSpace', function (event) {
      if (event && 32 === window__WEBPACK_IMPORTED_MODULE_9___default.a.parseInt(event.keyCode, 10)) {
        fValueAccessor().call(viewModel, event);
      }
    });
    ko.utils.domNodeDisposal.addDisposeCallback(element, function () {
      $__WEBPACK_IMPORTED_MODULE_11___default()(element).off('keyup.koOnSpace');
    });
  }
};
ko.bindingHandlers.onTab = {
  init: function init(element, fValueAccessor, fAllBindingsAccessor, viewModel) {
    $__WEBPACK_IMPORTED_MODULE_11___default()(element).on('keydown.koOnTab', function (event) {
      if (event && 9 === window__WEBPACK_IMPORTED_MODULE_9___default.a.parseInt(event.keyCode, 10)) {
        return fValueAccessor().call(viewModel, !!event.shiftKey);
      }

      return true;
    });
    ko.utils.domNodeDisposal.addDisposeCallback(element, function () {
      $__WEBPACK_IMPORTED_MODULE_11___default()(element).off('keydown.koOnTab');
    });
  }
};
ko.bindingHandlers.onEsc = {
  init: function init(element, fValueAccessor, fAllBindingsAccessor, viewModel) {
    $__WEBPACK_IMPORTED_MODULE_11___default()(element).on('keyup.koOnEsc', function (event) {
      if (event && 27 === window__WEBPACK_IMPORTED_MODULE_9___default.a.parseInt(event.keyCode, 10)) {
        $__WEBPACK_IMPORTED_MODULE_11___default()(element).trigger('change');
        fValueAccessor().call(viewModel);
      }
    });
    ko.utils.domNodeDisposal.addDisposeCallback(element, function () {
      $__WEBPACK_IMPORTED_MODULE_11___default()(element).off('keyup.koOnEsc');
    });
  }
};
ko.bindingHandlers.clickOnTrue = {
  update: function update(element, fValueAccessor) {
    if (ko.unwrap(fValueAccessor())) {
      $__WEBPACK_IMPORTED_MODULE_11___default()(element).click();
    }
  }
};
ko.bindingHandlers.modal = {
  init: function init(element, fValueAccessor) {
    var _context;

    var Globals = __webpack_require__(/*! Common/Globals */ 6),
        Utils = __webpack_require__(/*! Common/Utils */ 2);

    _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_8___default()(_context = $__WEBPACK_IMPORTED_MODULE_11___default()(element).toggleClass('fade', !Globals.bMobileDevice).modal({
      'keyboard': false,
      'show': ko.unwrap(fValueAccessor())
    }).on('shown.koModal', Utils.windowResizeCallback)).call(_context, '.close').on('click.koModal', function () {
      fValueAccessor()(false);
    });

    ko.utils.domNodeDisposal.addDisposeCallback(element, function () {
      var _context2;

      _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_8___default()(_context2 = $__WEBPACK_IMPORTED_MODULE_11___default()(element).off('shown.koModal')).call(_context2, '.close').off('click.koModal');
    });
  },
  update: function update(element, fValueAccessor) {
    var Globals = __webpack_require__(/*! Common/Globals */ 6);

    $__WEBPACK_IMPORTED_MODULE_11___default()(element).modal(ko.unwrap(fValueAccessor()) ? 'show' : 'hide');

    if (Globals.$html.hasClass('rl-anim')) {
      Globals.$html.addClass('rl-modal-animation');

      ___WEBPACK_IMPORTED_MODULE_10___default.a.delay(function () {
        Globals.$html.removeClass('rl-modal-animation');
      }, Common_Enums__WEBPACK_IMPORTED_MODULE_14__["Magics"].Time500ms);
    }
  }
};
ko.bindingHandlers.moment = {
  init: function init(element, fValueAccessor) {
    __webpack_require__(/*! Common/Momentor */ 60).momentToNode($__WEBPACK_IMPORTED_MODULE_11___default()(element).addClass('moment').data('moment-time', ko.unwrap(fValueAccessor())));
  },
  update: function update(element, fValueAccessor) {
    __webpack_require__(/*! Common/Momentor */ 60).momentToNode($__WEBPACK_IMPORTED_MODULE_11___default()(element).data('moment-time', ko.unwrap(fValueAccessor())));
  }
};
ko.bindingHandlers.i18nInit = {
  init: function init(element) {
    __webpack_require__(/*! Common/Translator */ 9).i18nToNodes(element);
  }
};
ko.bindingHandlers.translatorInit = {
  init: function init(element) {
    __webpack_require__(/*! Common/Translator */ 9).i18nToNodes(element);
  }
};
ko.bindingHandlers.i18nUpdate = {
  update: function update(element, fValueAccessor) {
    ko.unwrap(fValueAccessor());

    __webpack_require__(/*! Common/Translator */ 9).i18nToNodes(element);
  }
};
ko.bindingHandlers.link = {
  update: function update(element, fValueAccessor) {
    $__WEBPACK_IMPORTED_MODULE_11___default()(element).attr('href', ko.unwrap(fValueAccessor()));
  }
};
ko.bindingHandlers.title = {
  update: function update(element, fValueAccessor) {
    $__WEBPACK_IMPORTED_MODULE_11___default()(element).attr('title', ko.unwrap(fValueAccessor()));
  }
};
ko.bindingHandlers.textF = {
  init: function init(element, fValueAccessor) {
    $__WEBPACK_IMPORTED_MODULE_11___default()(element).text(ko.unwrap(fValueAccessor()));
  }
};
ko.bindingHandlers.initDom = {
  init: function init(element, fValueAccessor) {
    fValueAccessor()(element);
  }
};
ko.bindingHandlers.initFixedTrigger = {
  init: function init(element, fValueAccessor) {
    var values = ko.unwrap(fValueAccessor()),
        $el = $__WEBPACK_IMPORTED_MODULE_11___default()(element),
        top = values[1] || 0;
    var $container = $__WEBPACK_IMPORTED_MODULE_11___default()(values[0] || null);
    $container = $container[0] ? $container : null;

    if ($container) {
      $win.resize(function () {
        var offset = $container ? $container.offset() : null;

        if (offset && offset.top) {
          $el.css('top', offset.top + top);
        }
      });
    }
  }
};
ko.bindingHandlers.initResizeTrigger = {
  init: function init(element, fValueAccessor) {
    var values = ko.unwrap(fValueAccessor());
    $__WEBPACK_IMPORTED_MODULE_11___default()(element).css({
      'height': values[1],
      'min-height': values[1]
    });
  },
  update: function update(oElement, fValueAccessor) {
    var Utils = __webpack_require__(/*! Common/Utils */ 2),
        Globals = __webpack_require__(/*! Common/Globals */ 6),
        values = ko.unwrap(fValueAccessor());

    var value = Utils.pInt(values[1]),
        size = 0,
        offset = $__WEBPACK_IMPORTED_MODULE_11___default()(oElement).offset().top;

    if (0 < offset) {
      offset += Utils.pInt(values[2]);
      size = Globals.$win.height() - offset;

      if (value < size) {
        value = size;
      }

      $__WEBPACK_IMPORTED_MODULE_11___default()(oElement).css({
        'height': value,
        'min-height': value
      });
    }
  }
};
ko.bindingHandlers.appendDom = {
  update: function update(element, fValueAccessor) {
    $__WEBPACK_IMPORTED_MODULE_11___default()(element).hide().empty().append(ko.unwrap(fValueAccessor())).show();
  }
};
ko.bindingHandlers.draggable = {
  init: function init(element, fValueAccessor, fAllBindingsAccessor) {
    var Globals = __webpack_require__(/*! Common/Globals */ 6),
        Utils = __webpack_require__(/*! Common/Utils */ 2);

    if (!Globals.bMobileDevice) {
      var triggerZone = 100,
          scrollSpeed = 3,
          fAllValueFunc = fAllBindingsAccessor(),
          droppableSelector = fAllValueFunc && fAllValueFunc.droppableSelector ? fAllValueFunc.droppableSelector : '',
          conf = {
        distance: 20,
        handle: '.dragHandle',
        cursorAt: {
          top: 22,
          left: 3
        },
        refreshPositions: true,
        scroll: true,
        drag: null,
        stop: null,
        helper: null
      };

      if (droppableSelector) {
        conf.drag = function (event) {
          $__WEBPACK_IMPORTED_MODULE_11___default()(droppableSelector).each(function () {
            var $this = $__WEBPACK_IMPORTED_MODULE_11___default()(this),
                // eslint-disable-line no-invalid-this
            offset = $this.offset(),
                bottomPos = offset.top + $this.height();
            window__WEBPACK_IMPORTED_MODULE_9___default.a.clearInterval($this.data('timerScroll'));
            $this.data('timerScroll', false);

            if (event.pageX >= offset.left && event.pageX <= offset.left + $this.width()) {
              if (event.pageY >= bottomPos - triggerZone && event.pageY <= bottomPos) {
                var moveUp = function moveUp() {
                  $this.scrollTop($this.scrollTop() + scrollSpeed);
                  Utils.windowResize();
                };

                $this.data('timerScroll', window__WEBPACK_IMPORTED_MODULE_9___default.a.setInterval(moveUp, 10));
                moveUp();
              }

              if (event.pageY >= offset.top && event.pageY <= offset.top + triggerZone) {
                var moveDown = function moveDown() {
                  $this.scrollTop($this.scrollTop() - scrollSpeed);
                  Utils.windowResize();
                };

                $this.data('timerScroll', window__WEBPACK_IMPORTED_MODULE_9___default.a.setInterval(moveDown, 10));
                moveDown();
              }
            }
          });
        };

        conf.stop = function () {
          $__WEBPACK_IMPORTED_MODULE_11___default()(droppableSelector).each(function () {
            var $this = $__WEBPACK_IMPORTED_MODULE_11___default()(this); // eslint-disable-line no-invalid-this

            window__WEBPACK_IMPORTED_MODULE_9___default.a.clearInterval($this.data('timerScroll'));
            $this.data('timerScroll', false);
          });
        };
      }

      conf.helper = function (event) {
        return fValueAccessor()(event && event.target ? ko.dataFor(event.target) : null);
      };

      $__WEBPACK_IMPORTED_MODULE_11___default()(element).draggable(conf).on('mousedown.koDraggable', function () {
        Utils.removeInFocus();
      });
      ko.utils.domNodeDisposal.addDisposeCallback(element, function () {
        $__WEBPACK_IMPORTED_MODULE_11___default()(element).off('mousedown.koDraggable').draggable('destroy');
      });
    }
  }
};
ko.bindingHandlers.droppable = {
  init: function init(element, fValueAccessor, fAllBindingsAccessor) {
    var Globals = __webpack_require__(/*! Common/Globals */ 6);

    if (!Globals.bMobileDevice) {
      var fValueFunc = fValueAccessor(),
          fAllValueFunc = fAllBindingsAccessor(),
          fOverCallback = fAllValueFunc && fAllValueFunc.droppableOver ? fAllValueFunc.droppableOver : null,
          fOutCallback = fAllValueFunc && fAllValueFunc.droppableOut ? fAllValueFunc.droppableOut : null,
          conf = {
        tolerance: 'pointer',
        hoverClass: 'droppableHover',
        drop: null,
        over: null,
        out: null
      };

      if (fValueFunc) {
        conf.drop = function (event, ui) {
          fValueFunc(event, ui);
        };

        if (fOverCallback) {
          conf.over = function (event, ui) {
            fOverCallback(event, ui);
          };
        }

        if (fOutCallback) {
          conf.out = function (event, ui) {
            fOutCallback(event, ui);
          };
        }

        $__WEBPACK_IMPORTED_MODULE_11___default()(element).droppable(conf);
        ko.utils.domNodeDisposal.addDisposeCallback(element, function () {
          $__WEBPACK_IMPORTED_MODULE_11___default()(element).droppable('destroy');
        });
      }
    }
  }
};
ko.bindingHandlers.nano = {
  init: function init(element) {
    var Globals = __webpack_require__(/*! Common/Globals */ 6),
        Settings = __webpack_require__(/*! Storage/Settings */ 5);

    if (!Globals.bDisableNanoScroll && !Settings.appSettingsGet('useNativeScrollbars')) {
      $__WEBPACK_IMPORTED_MODULE_11___default()(element).addClass('nano').nanoScroller({
        iOSNativeScrolling: false,
        preventPageScrolling: true
      });
    }
  }
};
ko.bindingHandlers.saveTrigger = {
  init: function init(element) {
    var $el = $__WEBPACK_IMPORTED_MODULE_11___default()(element);
    $el.data('save-trigger-type', $el.is('input[type=text],input[type=email],input[type=password],select,textarea') ? 'input' : 'custom');

    if ('custom' === $el.data('save-trigger-type')) {
      $el.append('&nbsp;&nbsp;' + '<i class="icon-spinner animated"></i>' + '<i class="icon-remove error"></i>' + '<i class="icon-ok success"></i>').addClass('settings-saved-trigger');
    } else {
      $el.addClass('settings-saved-trigger-input');
    }
  },
  update: function update(element, fValueAccessor) {
    var _context3, _context4, _context5, _context6;

    var value = ko.unwrap(fValueAccessor()),
        $el = $__WEBPACK_IMPORTED_MODULE_11___default()(element);

    if ('custom' === $el.data('save-trigger-type')) {
      switch (value.toString()) {
        case '1':
          _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_8___default()(_context3 = _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_8___default()($el).call($el, '.animated,.error').hide().removeClass('visible').end()).call(_context3, '.success').show().addClass('visible');

          break;

        case '0':
          _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_8___default()(_context4 = _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_8___default()($el).call($el, '.animated,.success').hide().removeClass('visible').end()).call(_context4, '.error').show().addClass('visible');

          break;

        case '-2':
          _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_8___default()(_context5 = _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_8___default()($el).call($el, '.error,.success').hide().removeClass('visible').end()).call(_context5, '.animated').show().addClass('visible');

          break;

        default:
          _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_8___default()(_context6 = _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_8___default()($el).call($el, '.animated').hide().end()).call(_context6, '.error,.success').removeClass('visible');

          break;
      }
    } else {
      switch (value.toString()) {
        case '1':
          $el.addClass('success').removeClass('error');
          break;

        case '0':
          $el.addClass('error').removeClass('success');
          break;

        case '-2':
          break;

        default:
          $el.removeClass('error success');
          break;
      }
    }
  }
};
ko.bindingHandlers.emailsTags = {
  init: function init(element, fValueAccessor, fAllBindingsAccessor) {
    var Utils = __webpack_require__(/*! Common/Utils */ 2),
        EmailModel = __webpack_require__(/*! Model/Email */ 80).default,
        $el = $__WEBPACK_IMPORTED_MODULE_11___default()(element),
        fValue = fValueAccessor(),
        fAllBindings = fAllBindingsAccessor(),
        fAutoCompleteSource = fAllBindings.autoCompleteSource || null,
        inputDelimiters = [',', ';', '\n'],
        fFocusCallback = function fFocusCallback(value) {
      if (fValue && fValue.focused) {
        fValue.focused(!!value);
      }
    };

    $el.inputosaurus({
      parseOnBlur: true,
      allowDragAndDrop: true,
      focusCallback: fFocusCallback,
      inputDelimiters: inputDelimiters,
      autoCompleteSource: fAutoCompleteSource,
      splitHook: function splitHook(value) {
        var v = _babel_runtime_corejs3_core_js_stable_instance_trim__WEBPACK_IMPORTED_MODULE_7___default()(Utils).call(Utils, value);

        if (v && -1 < _babel_runtime_corejs3_core_js_stable_instance_index_of__WEBPACK_IMPORTED_MODULE_6___default()(inputDelimiters).call(inputDelimiters, v.substr(-1))) {
          return EmailModel.splitEmailLine(value);
        }

        return null;
      },
      parseHook: function parseHook(input) {
        return _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_5___default()(___WEBPACK_IMPORTED_MODULE_10___default.a).call(___WEBPACK_IMPORTED_MODULE_10___default.a, ___WEBPACK_IMPORTED_MODULE_10___default.a.flatten(_babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_5___default()(___WEBPACK_IMPORTED_MODULE_10___default.a).call(___WEBPACK_IMPORTED_MODULE_10___default.a, input, function (inputValue) {
          var values = EmailModel.parseEmailLine(inputValue);
          return values.length ? values : inputValue;
        })), function (item) {
          return ___WEBPACK_IMPORTED_MODULE_10___default.a.isObject(item) ? [item.toLine(false), item] : [item, null];
        });
      },
      change: function change(event) {
        $el.data('EmailsTagsValue', event.target.value);
        fValue(event.target.value);
      }
    });

    if (fValue && fValue.focused && fValue.focused.subscribe) {
      fValue.focused.subscribe(function (value) {
        $el.inputosaurus(value ? 'focus' : 'blur');
      });
    }
  },
  update: function update(element, fValueAccessor) {
    var $oEl = $__WEBPACK_IMPORTED_MODULE_11___default()(element),
        fValue = fValueAccessor(),
        value = ko.unwrap(fValue);

    if ($oEl.data('EmailsTagsValue') !== value) {
      $oEl.val(value);
      $oEl.data('EmailsTagsValue', value);
      $oEl.inputosaurus('refresh');
    }
  }
};
ko.bindingHandlers.command = {
  init: function init(element, fValueAccessor, fAllBindingsAccessor, viewModel, bindingContext) {
    var jqElement = $__WEBPACK_IMPORTED_MODULE_11___default()(element),
        command = fValueAccessor();

    if (!command || !command.isCommand) {
      throw new Error('Value should be a command');
    }

    if (!command.enabled) {
      command.enabled = ko.observable(true);
    }

    if (!command.canExecute) {
      var __realCanExecute = command.__realCanExecute;

      if (___WEBPACK_IMPORTED_MODULE_10___default.a.isFunction(__realCanExecute)) {
        command.canExecute = ko.computed(function () {
          return command.enabled() && __realCanExecute.call(viewModel, viewModel);
        });
      } else {
        command.canExecute = ko.computed(function () {
          return command.enabled() && !!__realCanExecute;
        });
      }
    }

    jqElement.addClass('command');
    ko.bindingHandlers[jqElement.is('form') ? 'submit' : 'click'].init(element, fValueAccessor, fAllBindingsAccessor, viewModel, bindingContext);
  },
  update: function update(element, fValueAccessor) {
    var jqElement = $__WEBPACK_IMPORTED_MODULE_11___default()(element),
        command = fValueAccessor();
    var result = command.enabled();
    jqElement.toggleClass('command-not-enabled', !result);

    if (result) {
      result = command.canExecute();
      jqElement.toggleClass('command-can-not-be-execute', !result);
    }

    jqElement.toggleClass('command-disabled disable disabled', !result).toggleClass('no-disabled', !!result);

    if (jqElement.is('input') || jqElement.is('button')) {
      jqElement.prop('disabled', !result);
    }
  }
}; // extenders

ko.extenders.trimmer = function (target) {
  var Utils = __webpack_require__(/*! Common/Utils */ 2),
      result = ko.computed({
    read: target,
    write: function write(newValue) {
      target(_babel_runtime_corejs3_core_js_stable_instance_trim__WEBPACK_IMPORTED_MODULE_7___default()(Utils).call(Utils, newValue.toString()));
    }
  });

  result(target());
  return result;
};

ko.extenders.posInterer = function (target, defaultVal) {
  var Utils = __webpack_require__(/*! Common/Utils */ 2),
      result = ko.computed({
    read: target,
    write: function write(newValue) {
      var val = Utils.pInt(newValue.toString(), defaultVal);

      if (0 >= val) {
        val = defaultVal;
      }

      if (val === target() && '' + val !== '' + newValue) {
        target(val + 1);
      }

      target(val);
    }
  });

  result(target());
  return result;
};

ko.extenders.limitedList = function (target, limitedList) {
  var Utils = __webpack_require__(/*! Common/Utils */ 2),
      result = ko.computed({
    read: target,
    write: function write(newValue) {
      var currentValue = ko.unwrap(target),
          list = ko.unwrap(limitedList);

      if (Utils.isNonEmptyArray(list)) {
        if (-1 < Utils.inArray(newValue, list)) {
          target(newValue);
        } else if (-1 < Utils.inArray(currentValue, list)) {
          target(currentValue + ' ');
          target(currentValue);
        } else {
          target(list[0] + ' ');
          target(list[0]);
        }
      } else {
        target('');
      }
    }
  }).extend({
    notify: 'always'
  });

  result(target());

  if (!result.valueHasMutated) {
    result.valueHasMutated = function () {
      target.valueHasMutated();
    };
  }

  return result;
};

ko.extenders.reversible = function (target) {
  var value = target();

  target.commit = function () {
    value = target();
  };

  target.reverse = function () {
    target(value);
  };

  target.commitedValue = function () {
    return value;
  };

  return target;
};

ko.extenders.toggleSubscribe = function (target, options) {
  target.subscribe(options[1], options[0], 'beforeChange');
  target.subscribe(options[2], options[0]);
  return target;
};

ko.extenders.toggleSubscribeProperty = function (target, options) {
  var prop = options[1];

  if (prop) {
    target.subscribe(function (prev) {
      if (prev && prev[prop]) {
        prev[prop](false);
      }
    }, options[0], 'beforeChange');
    target.subscribe(function (next) {
      if (next && next[prop]) {
        next[prop](true);
      }
    }, options[0]);
  }

  return target;
};

ko.extenders.falseTimeout = function (target, option) {
  target.iFalseTimeoutTimeout = 0;
  target.subscribe(function (value) {
    if (value) {
      window__WEBPACK_IMPORTED_MODULE_9___default.a.clearTimeout(target.iFalseTimeoutTimeout);
      target.iFalseTimeoutTimeout = window__WEBPACK_IMPORTED_MODULE_9___default.a.setTimeout(function () {
        target(false);
        target.iFalseTimeoutTimeout = 0;
      }, __webpack_require__(/*! Common/Utils */ 2).pInt(option));
    }
  });
  return target;
};

ko.extenders.specialThrottle = function (target, option) {
  target.iSpecialThrottleTimeoutValue = __webpack_require__(/*! Common/Utils */ 2).pInt(option);

  if (0 < target.iSpecialThrottleTimeoutValue) {
    target.iSpecialThrottleTimeout = 0;
    target.valueForRead = ko.observable(!!target()).extend({
      throttle: 10
    });
    return ko.computed({
      read: target.valueForRead,
      write: function write(bValue) {
        if (bValue) {
          target.valueForRead(bValue);
        } else {
          if (target.valueForRead()) {
            window__WEBPACK_IMPORTED_MODULE_9___default.a.clearTimeout(target.iSpecialThrottleTimeout);
            target.iSpecialThrottleTimeout = window__WEBPACK_IMPORTED_MODULE_9___default.a.setTimeout(function () {
              target.valueForRead(false);
              target.iSpecialThrottleTimeout = 0;
            }, target.iSpecialThrottleTimeoutValue);
          } else {
            target.valueForRead(bValue);
          }
        }
      }
    });
  }

  return target;
};

ko.extenders.idleTrigger = function (target) {
  target.trigger = ko.observable(Common_Enums__WEBPACK_IMPORTED_MODULE_14__["SaveSettingsStep"].Idle);
  return target;
}; // functions


ko.observable.fn.idleTrigger = function () {
  return this.extend({
    'idleTrigger': true
  });
};

ko.observable.fn.validateNone = function () {
  this.hasError = ko.observable(false);
  return this;
};

ko.observable.fn.validateEmail = function () {
  var _this = this;

  this.hasError = ko.observable(false);
  this.subscribe(function (value) {
    _this.hasError('' !== value && !/^[^@\s]+@[^@\s]+$/.test(value));
  });
  this.valueHasMutated();
  return this;
};

ko.observable.fn.validateSimpleEmail = function () {
  var _this2 = this;

  this.hasError = ko.observable(false);
  this.subscribe(function (value) {
    _this2.hasError('' !== value && !/^.+@.+$/.test(value));
  });
  this.valueHasMutated();
  return this;
};

ko.observable.fn.deleteAccessHelper = function () {
  this.extend({
    falseTimeout: 3000
  }).extend({
    toggleSubscribeProperty: [this, 'deleteAccess']
  });
  return this;
};

ko.observable.fn.validateFunc = function (fFunc) {
  var _this3 = this;

  this.hasFuncError = ko.observable(false);

  if (___WEBPACK_IMPORTED_MODULE_10___default.a.isFunction(fFunc)) {
    this.subscribe(function (value) {
      _this3.hasFuncError(!fFunc(value));
    });
    this.valueHasMutated();
  }

  return this;
};

/* harmony default export */ __webpack_exports__["a"] = (ko);

/***/ }),
/* 2 */
/*!*****************************!*\
  !*** ./dev/Common/Utils.js ***!
  \*****************************/
/*! exports provided: trim, inArray, isArray, isObject, isFunc, isUnd, isNull, has, bind, noop, noopTrue, noopFalse, jassl, silentTryCatch, isNormal, isPosNumeric, pInt, pString, pBool, boolToAjax, isNonEmptyArray, encodeURIComponent, decodeURIComponent, decodeURI, encodeURI, simpleQueryParser, fakeMd5, encodeHtml, splitPlainText, timeOutAction, timeOutActionSecond, deModule, inFocus, removeInFocus, removeSelection, replySubjectAdd, roundNumber, friendlySize, log, delegateRun, killCtrlACtrlS, createCommandLegacy, convertThemeName, quoteName, microtime, timestamp, convertLangName, draggablePlace, defautOptionsAfterRender, clearBqSwitcher, previewMessage, settingsSaveHelperFunction, settingsSaveHelperSimpleFunction, settingsSaveHelperSubscribeFunction, findEmailAndLinks, htmlToPlain, plainToHtml, folderListOptionsBuilder, selectElement, detectDropdownVisibility, triggerAutocompleteInputChange, getConfigurationFromScriptTag, disposeOne, disposeObject, delegateRunOnDestroy, appendStyles, changeTheme, computedPagenatorHelper, getFileExtension, mimeContentType, isTransparent, getRealHeight, resizeAndCrop, mailToHelper, domReady, windowResize, windowResizeCallback */
/*! all exports used */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "trim", function() { return trim; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "inArray", function() { return inArray; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isArray", function() { return isArray; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isObject", function() { return isObject; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isFunc", function() { return isFunc; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isUnd", function() { return isUnd; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isNull", function() { return isNull; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "has", function() { return has; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bind", function() { return bind; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "noop", function() { return noop; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "noopTrue", function() { return noopTrue; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "noopFalse", function() { return noopFalse; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "silentTryCatch", function() { return silentTryCatch; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isNormal", function() { return isNormal; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isPosNumeric", function() { return isPosNumeric; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "pInt", function() { return pInt; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "pString", function() { return pString; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "pBool", function() { return pBool; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "boolToAjax", function() { return boolToAjax; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isNonEmptyArray", function() { return isNonEmptyArray; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "encodeURIComponent", function() { return encodeURIComponent; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "decodeURIComponent", function() { return decodeURIComponent; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "decodeURI", function() { return decodeURI; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "encodeURI", function() { return encodeURI; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "simpleQueryParser", function() { return simpleQueryParser; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fakeMd5", function() { return fakeMd5; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "encodeHtml", function() { return encodeHtml; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "splitPlainText", function() { return splitPlainText; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "timeOutAction", function() { return timeOutAction; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "timeOutActionSecond", function() { return timeOutActionSecond; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "deModule", function() { return deModule; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "inFocus", function() { return inFocus; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "removeInFocus", function() { return removeInFocus; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "removeSelection", function() { return removeSelection; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "replySubjectAdd", function() { return replySubjectAdd; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "roundNumber", function() { return roundNumber; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "friendlySize", function() { return friendlySize; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "log", function() { return log; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "delegateRun", function() { return delegateRun; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "killCtrlACtrlS", function() { return killCtrlACtrlS; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createCommandLegacy", function() { return createCommandLegacy; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "convertThemeName", function() { return convertThemeName; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "quoteName", function() { return quoteName; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "microtime", function() { return microtime; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "timestamp", function() { return timestamp; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "convertLangName", function() { return convertLangName; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "draggablePlace", function() { return draggablePlace; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "defautOptionsAfterRender", function() { return defautOptionsAfterRender; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "clearBqSwitcher", function() { return clearBqSwitcher; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "previewMessage", function() { return previewMessage; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "settingsSaveHelperFunction", function() { return settingsSaveHelperFunction; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "settingsSaveHelperSimpleFunction", function() { return settingsSaveHelperSimpleFunction; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "settingsSaveHelperSubscribeFunction", function() { return settingsSaveHelperSubscribeFunction; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "findEmailAndLinks", function() { return findEmailAndLinks; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "htmlToPlain", function() { return htmlToPlain; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "plainToHtml", function() { return plainToHtml; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "folderListOptionsBuilder", function() { return folderListOptionsBuilder; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "selectElement", function() { return selectElement; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "detectDropdownVisibility", function() { return detectDropdownVisibility; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "triggerAutocompleteInputChange", function() { return triggerAutocompleteInputChange; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getConfigurationFromScriptTag", function() { return getConfigurationFromScriptTag; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "disposeOne", function() { return disposeOne; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "disposeObject", function() { return disposeObject; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "delegateRunOnDestroy", function() { return delegateRunOnDestroy; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "appendStyles", function() { return appendStyles; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "changeTheme", function() { return changeTheme; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "computedPagenatorHelper", function() { return computedPagenatorHelper; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getFileExtension", function() { return getFileExtension; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mimeContentType", function() { return mimeContentType; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isTransparent", function() { return isTransparent; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getRealHeight", function() { return getRealHeight; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "resizeAndCrop", function() { return resizeAndCrop; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mailToHelper", function() { return mailToHelper; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "domReady", function() { return domReady; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "windowResize", function() { return windowResize; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "windowResizeCallback", function() { return windowResizeCallback; });
/* harmony import */ var core_js_modules_es_array_join__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.array.join */ 74);
/* harmony import */ var core_js_modules_es_array_join__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_join__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var core_js_modules_es_function_name__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es.function.name */ 51);
/* harmony import */ var core_js_modules_es_function_name__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_function_name__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var core_js_modules_es_object_to_string__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core-js/modules/es.object.to-string */ 63);
/* harmony import */ var core_js_modules_es_object_to_string__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_to_string__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var core_js_modules_es_regexp_exec__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! core-js/modules/es.regexp.exec */ 45);
/* harmony import */ var core_js_modules_es_regexp_exec__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_regexp_exec__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var core_js_modules_es_regexp_to_string__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! core-js/modules/es.regexp.to-string */ 111);
/* harmony import */ var core_js_modules_es_regexp_to_string__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_regexp_to_string__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var core_js_modules_es_string_match__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! core-js/modules/es.string.match */ 196);
/* harmony import */ var core_js_modules_es_string_match__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_match__WEBPACK_IMPORTED_MODULE_5__);
/* harmony import */ var core_js_modules_es_string_replace__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! core-js/modules/es.string.replace */ 56);
/* harmony import */ var core_js_modules_es_string_replace__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_replace__WEBPACK_IMPORTED_MODULE_6__);
/* harmony import */ var core_js_modules_es_string_split__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! core-js/modules/es.string.split */ 171);
/* harmony import */ var core_js_modules_es_string_split__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_split__WEBPACK_IMPORTED_MODULE_7__);
/* harmony import */ var core_js_modules_es_string_link__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! core-js/modules/es.string.link */ 172);
/* harmony import */ var core_js_modules_es_string_link__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_link__WEBPACK_IMPORTED_MODULE_8__);
/* harmony import */ var core_js_modules_web_timers__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! core-js/modules/web.timers */ 67);
/* harmony import */ var core_js_modules_web_timers__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_timers__WEBPACK_IMPORTED_MODULE_9__);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/reduce */ 208);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_10__);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_values__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/values */ 113);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_values__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_values__WEBPACK_IMPORTED_MODULE_11__);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/concat */ 159);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_12__);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_index_of__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/index-of */ 30);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_index_of__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_index_of__WEBPACK_IMPORTED_MODULE_13__);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/find */ 12);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_14__);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_last_index_of__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/last-index-of */ 209);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_last_index_of__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_last_index_of__WEBPACK_IMPORTED_MODULE_15__);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_bind__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/bind */ 26);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_bind__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_bind__WEBPACK_IMPORTED_MODULE_16__);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_trim__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/trim */ 138);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_trim__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_trim__WEBPACK_IMPORTED_MODULE_17__);
/* harmony import */ var window__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! window */ 4);
/* harmony import */ var window__WEBPACK_IMPORTED_MODULE_18___default = /*#__PURE__*/__webpack_require__.n(window__WEBPACK_IMPORTED_MODULE_18__);
/* harmony import */ var $__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! $ */ 8);
/* harmony import */ var $__WEBPACK_IMPORTED_MODULE_19___default = /*#__PURE__*/__webpack_require__.n($__WEBPACK_IMPORTED_MODULE_19__);
/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! _ */ 3);
/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_20___default = /*#__PURE__*/__webpack_require__.n(___WEBPACK_IMPORTED_MODULE_20__);
/* harmony import */ var ko__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ko */ 1);
/* harmony import */ var Autolinker__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! Autolinker */ 212);
/* harmony import */ var Autolinker__WEBPACK_IMPORTED_MODULE_22___default = /*#__PURE__*/__webpack_require__.n(Autolinker__WEBPACK_IMPORTED_MODULE_22__);
/* harmony import */ var Common_Globals__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! Common/Globals */ 6);
/* harmony import */ var Common_Enums__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! Common/Enums */ 0);
/* harmony import */ var Common_Mime__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! Common/Mime */ 213);
/* harmony import */ var Common_Jassl__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! Common/Jassl */ 106);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "jassl", function() { return Common_Jassl__WEBPACK_IMPORTED_MODULE_26__["a"]; });





























var trim = _babel_runtime_corejs3_core_js_stable_instance_trim__WEBPACK_IMPORTED_MODULE_17___default()($__WEBPACK_IMPORTED_MODULE_19___default.a);

var inArray = $__WEBPACK_IMPORTED_MODULE_19___default.a.inArray;
var isArray = ___WEBPACK_IMPORTED_MODULE_20___default.a.isArray;
var isObject = ___WEBPACK_IMPORTED_MODULE_20___default.a.isObject;
var isFunc = ___WEBPACK_IMPORTED_MODULE_20___default.a.isFunction;
var isUnd = ___WEBPACK_IMPORTED_MODULE_20___default.a.isUndefined;
var isNull = ___WEBPACK_IMPORTED_MODULE_20___default.a.isNull;
var has = ___WEBPACK_IMPORTED_MODULE_20___default.a.has;

var bind = _babel_runtime_corejs3_core_js_stable_instance_bind__WEBPACK_IMPORTED_MODULE_16___default()(___WEBPACK_IMPORTED_MODULE_20___default.a);

var noop = function noop() {}; // eslint-disable-line no-empty-function


var noopTrue = function noopTrue() {
  return true;
};

var noopFalse = function noopFalse() {
  return false;
};


/**
 * @param {Function} func
 */

function silentTryCatch(func) {
  try {
    func();
  } catch (e) {} // eslint-disable-line no-empty

}
/**
 * @param {*} value
 * @returns {boolean}
 */

function isNormal(value) {
  return !isUnd(value) && !isNull(value);
}
/**
 * @param {(string|number)} value
 * @param {boolean=} includeZero = true
 * @returns {boolean}
 */

function isPosNumeric(value, includeZero) {
  if (includeZero === void 0) {
    includeZero = true;
  }

  return !isNormal(value) ? false : includeZero ? /^[0-9]*$/.test(value.toString()) : /^[1-9]+[0-9]*$/.test(value.toString());
}
/**
 * @param {*} value
 * @param {number=} defaultValur = 0
 * @returns {number}
 */

function pInt(value, defaultValur) {
  if (defaultValur === void 0) {
    defaultValur = 0;
  }

  var result = isNormal(value) && '' !== value ? window__WEBPACK_IMPORTED_MODULE_18___default.a.parseInt(value, 10) : defaultValur;
  return window__WEBPACK_IMPORTED_MODULE_18___default.a.isNaN(result) ? defaultValur : result;
}
/**
 * @param {*} value
 * @returns {string}
 */

function pString(value) {
  return isNormal(value) ? '' + value : '';
}
/**
 * @param {*} value
 * @returns {boolean}
 */

function pBool(value) {
  return !!value;
}
/**
 * @param {*} value
 * @returns {string}
 */

function boolToAjax(value) {
  return value ? '1' : '0';
}
/**
 * @param {*} values
 * @returns {boolean}
 */

function isNonEmptyArray(values) {
  return isArray(values) && 0 < values.length;
}
/**
 * @param {string} component
 * @returns {string}
 */

function encodeURIComponent(component) {
  return window__WEBPACK_IMPORTED_MODULE_18___default.a.encodeURIComponent(component);
}
/**
 * @param {string} component
 * @returns {string}
 */

function decodeURIComponent(component) {
  return window__WEBPACK_IMPORTED_MODULE_18___default.a.decodeURIComponent(component);
}
/**
 * @param {string} url
 * @returns {string}
 */

function decodeURI(url) {
  return window__WEBPACK_IMPORTED_MODULE_18___default.a.decodeURI(url);
}
/**
 * @param {string} url
 * @returns {string}
 */

function encodeURI(url) {
  return window__WEBPACK_IMPORTED_MODULE_18___default.a.encodeURI(url);
}
/**
 * @param {string} queryString
 * @returns {Object}
 */

function simpleQueryParser(queryString) {
  var index = 0,
      len = 0,
      temp = null;
  var queries = queryString.split('&'),
      params = {};

  for (len = queries.length; index < len; index++) {
    temp = queries[index].split('=');
    params[decodeURIComponent(temp[0])] = decodeURIComponent(temp[1]);
  }

  return params;
}
/**
 * @param {number=} len = 32
 * @returns {string}
 */

function fakeMd5(len) {
  if (len === void 0) {
    len = 32;
  }

  var line = '0123456789abcdefghijklmnopqrstuvwxyz',
      lineLen = line.length;
  len = pInt(len);
  var result = '';

  while (result.length < len) {
    result += line.substr(window__WEBPACK_IMPORTED_MODULE_18___default.a.Math.round(window__WEBPACK_IMPORTED_MODULE_18___default.a.Math.random() * lineLen), 1);
  }

  return result;
}
/**
 * @param {string} text
 * @returns {string}
 */

function encodeHtml(text) {
  return isNormal(text) ? ___WEBPACK_IMPORTED_MODULE_20___default.a.escape(text.toString()) : '';
}
/**
 * @param {string} text
 * @param {number=} len = 100
 * @returns {string}
 */

function splitPlainText(text, len) {
  if (len === void 0) {
    len = 100;
  }

  var prefix = '',
      subText = '',
      result = text,
      spacePos = 0,
      newLinePos = 0;

  while (result.length > len) {
    subText = result.substring(0, len);
    spacePos = _babel_runtime_corejs3_core_js_stable_instance_last_index_of__WEBPACK_IMPORTED_MODULE_15___default()(subText).call(subText, ' ');
    newLinePos = _babel_runtime_corejs3_core_js_stable_instance_last_index_of__WEBPACK_IMPORTED_MODULE_15___default()(subText).call(subText, '\n');

    if (-1 !== newLinePos) {
      spacePos = newLinePos;
    }

    if (-1 === spacePos) {
      spacePos = len;
    }

    prefix += subText.substring(0, spacePos) + '\n';
    result = result.substring(spacePos + 1);
  }

  return prefix + result;
}

var timeOutAction = function () {
  var timeOuts = {};
  return function (action, fFunction, timeOut) {
    timeOuts[action] = isUnd(timeOuts[action]) ? 0 : timeOuts[action];
    window__WEBPACK_IMPORTED_MODULE_18___default.a.clearTimeout(timeOuts[action]);
    timeOuts[action] = window__WEBPACK_IMPORTED_MODULE_18___default.a.setTimeout(fFunction, timeOut);
  };
}();

var timeOutActionSecond = function () {
  var timeOuts = {};
  return function (action, fFunction, timeOut) {
    if (!timeOuts[action]) {
      timeOuts[action] = window__WEBPACK_IMPORTED_MODULE_18___default.a.setTimeout(function () {
        fFunction();
        timeOuts[action] = 0;
      }, timeOut);
    }
  };
}();


/**
 * @param {any} m
 * @returns {any}
 */

function deModule(m) {
  return (m && m.default ? m.default : m) || '';
}
/**
 * @returns {boolean}
 */

function inFocus() {
  try {
    if (window__WEBPACK_IMPORTED_MODULE_18___default.a.document.activeElement) {
      if (isUnd(window__WEBPACK_IMPORTED_MODULE_18___default.a.document.activeElement.__inFocusCache)) {
        window__WEBPACK_IMPORTED_MODULE_18___default.a.document.activeElement.__inFocusCache = $__WEBPACK_IMPORTED_MODULE_19___default()(window__WEBPACK_IMPORTED_MODULE_18___default.a.document.activeElement).is('input,textarea,iframe,.cke_editable');
      }

      return !!window__WEBPACK_IMPORTED_MODULE_18___default.a.document.activeElement.__inFocusCache;
    }
  } catch (e) {} // eslint-disable-line no-empty


  return false;
}
/**
 * @param {boolean} force
 * @returns {void}
 */

function removeInFocus(force) {
  if (window__WEBPACK_IMPORTED_MODULE_18___default.a.document && window__WEBPACK_IMPORTED_MODULE_18___default.a.document.activeElement && window__WEBPACK_IMPORTED_MODULE_18___default.a.document.activeElement.blur) {
    try {
      var activeEl = $__WEBPACK_IMPORTED_MODULE_19___default()(window__WEBPACK_IMPORTED_MODULE_18___default.a.document.activeElement);

      if (activeEl && activeEl.is('input,textarea')) {
        window__WEBPACK_IMPORTED_MODULE_18___default.a.document.activeElement.blur();
      } else if (force) {
        window__WEBPACK_IMPORTED_MODULE_18___default.a.document.activeElement.blur();
      }
    } catch (e) {} // eslint-disable-line no-empty

  }
}
/**
 * @returns {void}
 */

function removeSelection() {
  try {
    if (window__WEBPACK_IMPORTED_MODULE_18___default.a && window__WEBPACK_IMPORTED_MODULE_18___default.a.getSelection) {
      var sel = window__WEBPACK_IMPORTED_MODULE_18___default.a.getSelection();

      if (sel && sel.removeAllRanges) {
        sel.removeAllRanges();
      }
    } else if (window__WEBPACK_IMPORTED_MODULE_18___default.a.document && window__WEBPACK_IMPORTED_MODULE_18___default.a.document.selection && window__WEBPACK_IMPORTED_MODULE_18___default.a.document.selection.empty) {
      window__WEBPACK_IMPORTED_MODULE_18___default.a.document.selection.empty();
    }
  } catch (e) {} // eslint-disable-line no-empty

}
/**
 * @param {string} prefix
 * @param {string} subject
 * @returns {string}
 */

function replySubjectAdd(prefix, subject) {
  prefix = trim(prefix.toUpperCase());
  subject = trim(subject.replace(/[\s]+/g, ' '));
  var drop = false,
      re = 'RE' === prefix,
      fwd = 'FWD' === prefix;
  var parts = [],
      prefixIsRe = !fwd;

  if ('' !== subject) {
    ___WEBPACK_IMPORTED_MODULE_20___default.a.each(subject.split(':'), function (part) {
      var trimmedPart = trim(part);

      if (!drop && (/^(RE|FWD)$/i.test(trimmedPart) || /^(RE|FWD)[[(][\d]+[\])]$/i.test(trimmedPart))) {
        if (!re) {
          re = !!/^RE/i.test(trimmedPart);
        }

        if (!fwd) {
          fwd = !!/^FWD/i.test(trimmedPart);
        }
      } else {
        parts.push(part);
        drop = true;
      }
    });
  }

  if (prefixIsRe) {
    re = false;
  } else {
    fwd = false;
  }

  return trim((prefixIsRe ? 'Re: ' : 'Fwd: ') + (re ? 'Re: ' : '') + (fwd ? 'Fwd: ' : '') + trim(parts.join(':')));
}
/**
 * @param {number} num
 * @param {number} dec
 * @returns {number}
 */

function roundNumber(num, dec) {
  return window__WEBPACK_IMPORTED_MODULE_18___default.a.Math.round(num * window__WEBPACK_IMPORTED_MODULE_18___default.a.Math.pow(10, dec)) / window__WEBPACK_IMPORTED_MODULE_18___default.a.Math.pow(10, dec);
}
/**
 * @param {(number|string)} sizeInBytes
 * @returns {string}
 */

function friendlySize(sizeInBytes) {
  sizeInBytes = pInt(sizeInBytes);

  switch (true) {
    case 1073741824 <= sizeInBytes:
      return roundNumber(sizeInBytes / 1073741824, 1) + 'GB';

    case 1048576 <= sizeInBytes:
      return roundNumber(sizeInBytes / 1048576, 1) + 'MB';

    case 1024 <= sizeInBytes:
      return roundNumber(sizeInBytes / 1024, 0) + 'KB';
    // no default
  }

  return sizeInBytes + 'B';
}
/**
 * @param {string} desc
 */

function log(desc) {
  if (window__WEBPACK_IMPORTED_MODULE_18___default.a.console && window__WEBPACK_IMPORTED_MODULE_18___default.a.console.log) {
    window__WEBPACK_IMPORTED_MODULE_18___default.a.console.log(desc);
  }
}
/**
 * @param {?} object
 * @param {string} methodName
 * @param {Array=} params
 * @param {number=} delay = 0
 */

function delegateRun(object, methodName, params, delay) {
  if (delay === void 0) {
    delay = 0;
  }

  if (object && object[methodName]) {
    delay = pInt(delay);
    params = isArray(params) ? params : [];

    if (0 >= delay) {
      object[methodName].apply(object, params);
    } else {
      ___WEBPACK_IMPORTED_MODULE_20___default.a.delay(function () {
        object[methodName].apply(object, params);
      }, delay);
    }
  }
}
/**
 * @param {?} event
 */

function killCtrlACtrlS(event) {
  event = event || window__WEBPACK_IMPORTED_MODULE_18___default.a.event;

  if (event && event.ctrlKey && !event.shiftKey && !event.altKey) {
    var key = event.keyCode || event.which;

    if (key === Common_Enums__WEBPACK_IMPORTED_MODULE_24__["EventKeyCode"].S) {
      event.preventDefault();
      return;
    } else if (key === Common_Enums__WEBPACK_IMPORTED_MODULE_24__["EventKeyCode"].A) {
      var sender = event.target || event.srcElement;

      if (sender && ('true' === '' + sender.contentEditable || sender.tagName && sender.tagName.match(/INPUT|TEXTAREA/i))) {
        return;
      }

      if (window__WEBPACK_IMPORTED_MODULE_18___default.a.getSelection) {
        window__WEBPACK_IMPORTED_MODULE_18___default.a.getSelection().removeAllRanges();
      } else if (window__WEBPACK_IMPORTED_MODULE_18___default.a.document.selection && window__WEBPACK_IMPORTED_MODULE_18___default.a.document.selection.clear) {
        window__WEBPACK_IMPORTED_MODULE_18___default.a.document.selection.clear();
      }

      event.preventDefault();
    }
  }
}
/**
 * @param {(Object|null|undefined)} context
 * @param {Function} fExecute
 * @param {(Function|boolean|null)=} fCanExecute = true
 * @returns {Function}
 */

function createCommandLegacy(context, fExecute, fCanExecute) {
  if (fCanExecute === void 0) {
    fCanExecute = true;
  }

  var fResult = null;

  var fNonEmpty = function fNonEmpty() {
    if (fResult && fResult.canExecute && fResult.canExecute()) {
      for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
        args[_key] = arguments[_key];
      }

      fExecute.apply(context, args);
    }

    return false;
  };

  fResult = fExecute ? fNonEmpty : noop;
  fResult.enabled = ko__WEBPACK_IMPORTED_MODULE_21__[/* default */ "a"].observable(true);
  fResult.isCommand = true;

  if (isFunc(fCanExecute)) {
    fResult.canExecute = ko__WEBPACK_IMPORTED_MODULE_21__[/* default */ "a"].computed(function () {
      return fResult && fResult.enabled() && fCanExecute.call(context);
    });
  } else {
    fResult.canExecute = ko__WEBPACK_IMPORTED_MODULE_21__[/* default */ "a"].computed(function () {
      return fResult && fResult.enabled() && !!fCanExecute;
    });
  }

  return fResult;
}
/**
 * @param {string} theme
 * @returns {string}
 */

var convertThemeName = ___WEBPACK_IMPORTED_MODULE_20___default.a.memoize(function (theme) {
  if ('@custom' === theme.substr(-7)) {
    theme = trim(theme.substring(0, theme.length - 7));
  }

  return trim(theme.replace(/[^a-zA-Z0-9]+/g, ' ').replace(/([A-Z])/g, ' $1').replace(/[\s]+/g, ' '));
});
/**
 * @param {string} name
 * @returns {string}
 */

function quoteName(name) {
  return name.replace(/["]/g, '\\"');
}
/**
 * @returns {number}
 */

function microtime() {
  return new window__WEBPACK_IMPORTED_MODULE_18___default.a.Date().getTime();
}
/**
 * @returns {number}
 */

function timestamp() {
  return window__WEBPACK_IMPORTED_MODULE_18___default.a.Math.round(microtime() / 1000);
}
/**
 *
 * @param {string} language
 * @param {boolean=} isEng = false
 * @returns {string}
 */

function convertLangName(language, isEng) {
  if (isEng === void 0) {
    isEng = false;
  }

  return __webpack_require__(/*! Common/Translator */ 9).i18n('LANGS_NAMES' + (true === isEng ? '_EN' : '') + '/LANG_' + language.toUpperCase().replace(/[^a-zA-Z0-9]+/g, '_'), null, language);
}
/**
 * @returns {object}
 */

function draggablePlace() {
  return $__WEBPACK_IMPORTED_MODULE_19___default()('<div class="draggablePlace">' + '<span class="text"></span>&nbsp;' + '<i class="icon-copy icon-white visible-on-ctrl"></i>' + '<i class="icon-mail icon-white hidden-on-ctrl"></i>' + '</div>').appendTo('#rl-hidden');
}
/**
 * @param {object} domOption
 * @param {object} item
 * @returns {void}
 */

function defautOptionsAfterRender(domItem, item) {
  if (item && !isUnd(item.disabled) && domItem) {
    $__WEBPACK_IMPORTED_MODULE_19___default()(domItem).toggleClass('disabled', item.disabled).prop('disabled', item.disabled);
  }
}
/**
 * @param {string} title
 * @param {Object} body
 * @param {boolean} isHtml
 * @param {boolean} print
 */

function clearBqSwitcher(body) {
  _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_14___default()(body).call(body, 'blockquote.rl-bq-switcher').removeClass('rl-bq-switcher hidden-bq');

  _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_14___default()(body).call(body, '.rlBlockquoteSwitcher').off('.rlBlockquoteSwitcher').remove();

  _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_14___default()(body).call(body, '[data-html-editor-font-wrapper]').removeAttr('data-html-editor-font-wrapper');
}
/**
 * @param {object} messageData
 * @param {Object} body
 * @param {boolean} isHtml
 * @param {boolean} print
 * @returns {void}
 */

function previewMessage(_ref, body, isHtml, print) {
  var title = _ref.title,
      subject = _ref.subject,
      date = _ref.date,
      fromCreds = _ref.fromCreds,
      toCreds = _ref.toCreds,
      toLabel = _ref.toLabel,
      ccClass = _ref.ccClass,
      ccCreds = _ref.ccCreds,
      ccLabel = _ref.ccLabel;
  var win = window__WEBPACK_IMPORTED_MODULE_18___default.a.open(''),
      doc = win.document,
      bodyClone = body.clone(),
      bodyClass = isHtml ? 'html' : 'plain';
  clearBqSwitcher(bodyClone);
  var html = bodyClone ? bodyClone.html() : '';
  doc.write(deModule(__webpack_require__(/*! Html/PreviewMessage.html */ 355)).replace('{{title}}', encodeHtml(title)).replace('{{subject}}', encodeHtml(subject)).replace('{{date}}', encodeHtml(date)).replace('{{fromCreds}}', encodeHtml(fromCreds)).replace('{{toCreds}}', encodeHtml(toCreds)).replace('{{toLabel}}', encodeHtml(toLabel)).replace('{{ccClass}}', encodeHtml(ccClass)).replace('{{ccCreds}}', encodeHtml(ccCreds)).replace('{{ccLabel}}', encodeHtml(ccLabel)).replace('{{bodyClass}}', bodyClass).replace('{{html}}', html));
  doc.close();

  if (print) {
    window__WEBPACK_IMPORTED_MODULE_18___default.a.setTimeout(function () {
      return win.print();
    }, 100);
  }
}
/**
 * @param {Function} fCallback
 * @param {?} koTrigger
 * @param {?} context = null
 * @param {number=} timer = 1000
 * @returns {Function}
 */

function settingsSaveHelperFunction(fCallback, koTrigger, context, timer) {
  if (context === void 0) {
    context = null;
  }

  if (timer === void 0) {
    timer = 1000;
  }

  timer = pInt(timer);
  return function (type, data, cached, requestAction, requestParameters) {
    koTrigger.call(context, data && data.Result ? Common_Enums__WEBPACK_IMPORTED_MODULE_24__["SaveSettingsStep"].TrueResult : Common_Enums__WEBPACK_IMPORTED_MODULE_24__["SaveSettingsStep"].FalseResult);

    if (fCallback) {
      fCallback.call(context, type, data, cached, requestAction, requestParameters);
    }

    ___WEBPACK_IMPORTED_MODULE_20___default.a.delay(function () {
      koTrigger.call(context, Common_Enums__WEBPACK_IMPORTED_MODULE_24__["SaveSettingsStep"].Idle);
    }, timer);
  };
}
/**
 * @param {object} koTrigger
 * @param {mixed} context
 * @returns {mixed}
 */

function settingsSaveHelperSimpleFunction(koTrigger, context) {
  return settingsSaveHelperFunction(null, koTrigger, context, 1000);
}
/**
 * @param {object} remote
 * @param {string} settingName
 * @param {string} type
 * @param {function} fTriggerFunction
 * @returns {function}
 */

function settingsSaveHelperSubscribeFunction(remote, settingName, type, fTriggerFunction) {
  return function (value) {
    if (remote) {
      switch (type) {
        case 'bool':
        case 'boolean':
          value = value ? '1' : '0';
          break;

        case 'int':
        case 'integer':
        case 'number':
          value = pInt(value);
          break;

        case 'trim':
          value = trim(value);
          break;

        default:
          value = pString(value);
          break;
      }

      var data = {};
      data[settingName] = value;

      if (remote.saveAdminConfig) {
        remote.saveAdminConfig(fTriggerFunction || null, data);
      } else if (remote.saveSettings) {
        remote.saveSettings(fTriggerFunction || null, data);
      }
    }
  };
}
/**
 * @param {string} html
 * @returns {string}
 */

function findEmailAndLinks(html) {
  return Autolinker__WEBPACK_IMPORTED_MODULE_22___default.a ? Autolinker__WEBPACK_IMPORTED_MODULE_22___default.a.link(html, {
    newWindow: true,
    stripPrefix: false,
    urls: true,
    email: true,
    mention: false,
    phone: false,
    hashtag: false,
    replaceFn: function replaceFn(match) {
      var _context;

      return !(match && 'url' === match.getType() && match.matchedText && 0 !== _babel_runtime_corejs3_core_js_stable_instance_index_of__WEBPACK_IMPORTED_MODULE_13___default()(_context = match.matchedText).call(_context, 'http'));
    }
  }) : html;
}
/**
 * @param {string} html
 * @returns {string}
 */

function htmlToPlain(html) {
  var pos = 0,
      limit = 0,
      iP1 = 0,
      iP2 = 0,
      iP3 = 0,
      text = '';

  var convertBlockquote = function convertBlockquote(blockquoteText) {
    blockquoteText = '> ' + trim(blockquoteText).replace(/\n/gm, '\n> ');
    return blockquoteText.replace(/(^|\n)([> ]+)/gm, function () {
      for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
        args[_key2] = arguments[_key2];
      }

      return args && 2 < args.length ? args[1] + trim(args[2].replace(/[\s]/g, '')) + ' ' : '';
    });
  };

  var convertDivs = function convertDivs() {
    for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
      args[_key3] = arguments[_key3];
    }

    if (args && 1 < args.length) {
      var divText = trim(args[1]);

      if (0 < divText.length) {
        divText = divText.replace(/<div[^>]*>([\s\S\r\n]*)<\/div>/gim, convertDivs);
        divText = '\n' + trim(divText) + '\n';
      }

      return divText;
    }

    return '';
  };

  var convertPre = function convertPre() {
    for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
      args[_key4] = arguments[_key4];
    }

    return args && 1 < args.length ? args[1].toString().replace(/[\n]/gm, '<br />').replace(/[\r]/gm, '') : '';
  },
      fixAttibuteValue = function fixAttibuteValue() {
    for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {
      args[_key5] = arguments[_key5];
    }

    return args && 1 < args.length ? '' + args[1] + ___WEBPACK_IMPORTED_MODULE_20___default.a.escape(args[2]) : '';
  },
      convertLinks = function convertLinks() {
    for (var _len6 = arguments.length, args = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) {
      args[_key6] = arguments[_key6];
    }

    return args && 1 < args.length ? trim(args[1]) : '';
  };

  text = html.replace(/<p[^>]*><\/p>/gi, '').replace(/<pre[^>]*>([\s\S\r\n\t]*)<\/pre>/gim, convertPre).replace(/[\s]+/gm, ' ').replace(/((?:href|data)\s?=\s?)("[^"]+?"|'[^']+?')/gim, fixAttibuteValue).replace(/<br[^>]*>/gim, '\n').replace(/<\/h[\d]>/gi, '\n').replace(/<\/p>/gi, '\n\n').replace(/<ul[^>]*>/gim, '\n').replace(/<\/ul>/gi, '\n').replace(/<li[^>]*>/gim, ' * ').replace(/<\/li>/gi, '\n').replace(/<\/td>/gi, '\n').replace(/<\/tr>/gi, '\n').replace(/<hr[^>]*>/gim, '\n_______________________________\n\n').replace(/<div[^>]*>([\s\S\r\n]*)<\/div>/gim, convertDivs).replace(/<blockquote[^>]*>/gim, '\n__bq__start__\n').replace(/<\/blockquote>/gim, '\n__bq__end__\n').replace(/<a [^>]*>([\s\S\r\n]*?)<\/a>/gim, convertLinks).replace(/<\/div>/gi, '\n').replace(/&nbsp;/gi, ' ').replace(/&quot;/gi, '"').replace(/<[^>]*>/gm, '');
  text = Common_Globals__WEBPACK_IMPORTED_MODULE_23__["$div"].html(text).text();
  text = text.replace(/\n[ \t]+/gm, '\n').replace(/[\n]{3,}/gm, '\n\n').replace(/&gt;/gi, '>').replace(/&lt;/gi, '<').replace(/&amp;/gi, '&');
  text = splitPlainText(text);
  pos = 0;
  limit = 800;

  while (0 < limit) {
    limit -= 1;
    iP1 = _babel_runtime_corejs3_core_js_stable_instance_index_of__WEBPACK_IMPORTED_MODULE_13___default()(text).call(text, '__bq__start__', pos);

    if (-1 < iP1) {
      iP2 = _babel_runtime_corejs3_core_js_stable_instance_index_of__WEBPACK_IMPORTED_MODULE_13___default()(text).call(text, '__bq__start__', iP1 + 5);
      iP3 = _babel_runtime_corejs3_core_js_stable_instance_index_of__WEBPACK_IMPORTED_MODULE_13___default()(text).call(text, '__bq__end__', iP1 + 5);

      if ((-1 === iP2 || iP3 < iP2) && iP1 < iP3) {
        text = text.substring(0, iP1) + convertBlockquote(text.substring(iP1 + 13, iP3)) + text.substring(iP3 + 11);
        pos = 0;
      } else if (-1 < iP2 && iP2 < iP3) {
        pos = iP2 - 1;
      } else {
        pos = 0;
      }
    } else {
      break;
    }
  }

  text = text.replace(/__bq__start__/gm, '').replace(/__bq__end__/gm, '');
  return text;
}
/**
 * @param {string} plain
 * @param {boolean} findEmailAndLinksInText = false
 * @returns {string}
 */

function plainToHtml(plain, findEmailAndLinksInText) {
  if (findEmailAndLinksInText === void 0) {
    findEmailAndLinksInText = false;
  }

  plain = plain.toString().replace(/\r/g, '');
  plain = plain.replace(/^>[> ]>+/gm, function (_ref2) {
    var match = _ref2[0];
    return match ? match.replace(/[ ]+/g, '') : match;
  });
  var bIn = false,
      bDo = true,
      bStart = true,
      aNextText = [],
      sLine = '',
      iIndex = 0,
      aText = plain.split('\n');

  do {
    bDo = false;
    aNextText = [];

    for (iIndex = 0; iIndex < aText.length; iIndex++) {
      sLine = aText[iIndex];
      bStart = '>' === sLine.substr(0, 1);

      if (bStart && !bIn) {
        bDo = true;
        bIn = true;
        aNextText.push('~~~blockquote~~~');
        aNextText.push(sLine.substr(1));
      } else if (!bStart && bIn) {
        if ('' !== sLine) {
          bIn = false;
          aNextText.push('~~~/blockquote~~~');
          aNextText.push(sLine);
        } else {
          aNextText.push(sLine);
        }
      } else if (bStart && bIn) {
        aNextText.push(sLine.substr(1));
      } else {
        aNextText.push(sLine);
      }
    }

    if (bIn) {
      bIn = false;
      aNextText.push('~~~/blockquote~~~');
    }

    aText = aNextText;
  } while (bDo);

  plain = aText.join('\n');
  plain = plain // .replace(/~~~\/blockquote~~~\n~~~blockquote~~~/g, '\n')
  .replace(/&/g, '&amp;').replace(/>/g, '&gt;').replace(/</g, '&lt;').replace(/~~~blockquote~~~[\s]*/g, '<blockquote>').replace(/[\s]*~~~\/blockquote~~~/g, '</blockquote>').replace(/\n/g, '<br />');
  return findEmailAndLinksInText ? findEmailAndLinks(plain) : plain;
}
window__WEBPACK_IMPORTED_MODULE_18___default.a['rainloop_Utils_htmlToPlain'] = htmlToPlain; // eslint-disable-line dot-notation

window__WEBPACK_IMPORTED_MODULE_18___default.a['rainloop_Utils_plainToHtml'] = plainToHtml; // eslint-disable-line dot-notation

/**
 * @param {Array} aSystem
 * @param {Array} aList
 * @param {Array=} aDisabled
 * @param {Array=} aHeaderLines
 * @param {?number=} iUnDeep
 * @param {Function=} fDisableCallback
 * @param {Function=} fVisibleCallback
 * @param {Function=} fRenameCallback
 * @param {boolean=} bSystem
 * @param {boolean=} bBuildUnvisible
 * @returns {Array}
 */

function folderListOptionsBuilder(aSystem, aList, aDisabled, aHeaderLines, iUnDeep, fDisableCallback, fVisibleCallback, fRenameCallback, bSystem, bBuildUnvisible) {
  var
  /**
  * @type {?FolderModel}
  */
  oItem = null,
      bSep = false,
      iIndex = 0,
      iLen = 0,
      aResult = [];
  var sDeepPrefix = "\xA0\xA0\xA0";
  bBuildUnvisible = isUnd(bBuildUnvisible) ? false : !!bBuildUnvisible;
  bSystem = !isNormal(bSystem) ? 0 < aSystem.length : bSystem;
  iUnDeep = !isNormal(iUnDeep) ? 0 : iUnDeep;
  fDisableCallback = isNormal(fDisableCallback) ? fDisableCallback : null;
  fVisibleCallback = isNormal(fVisibleCallback) ? fVisibleCallback : null;
  fRenameCallback = isNormal(fRenameCallback) ? fRenameCallback : null;

  if (!isArray(aDisabled)) {
    aDisabled = [];
  }

  if (!isArray(aHeaderLines)) {
    aHeaderLines = [];
  }

  for (iIndex = 0, iLen = aHeaderLines.length; iIndex < iLen; iIndex++) {
    aResult.push({
      id: aHeaderLines[iIndex][0],
      name: aHeaderLines[iIndex][1],
      system: false,
      seporator: false,
      disabled: false
    });
  }

  bSep = true;

  for (iIndex = 0, iLen = aSystem.length; iIndex < iLen; iIndex++) {
    oItem = aSystem[iIndex];

    if (fVisibleCallback ? fVisibleCallback(oItem) : true) {
      if (bSep && 0 < aResult.length) {
        aResult.push({
          id: '---',
          name: '---',
          system: false,
          seporator: true,
          disabled: true
        });
      }

      bSep = false;
      aResult.push({
        id: oItem.fullNameRaw,
        name: fRenameCallback ? fRenameCallback(oItem) : oItem.name(),
        system: true,
        seporator: false,
        disabled: !oItem.selectable || -1 < inArray(oItem.fullNameRaw, aDisabled) || (fDisableCallback ? fDisableCallback(oItem) : false)
      });
    }
  }

  bSep = true;

  for (iIndex = 0, iLen = aList.length; iIndex < iLen; iIndex++) {
    oItem = aList[iIndex]; // if (oItem.subScribed() || !oItem.existen || bBuildUnvisible)

    if ((oItem.subScribed() || !oItem.existen || bBuildUnvisible) && (oItem.selectable || oItem.hasSubScribedSubfolders())) {
      if (fVisibleCallback ? fVisibleCallback(oItem) : true) {
        if (Common_Enums__WEBPACK_IMPORTED_MODULE_24__["FolderType"].User === oItem.type() || !bSystem || oItem.hasSubScribedSubfolders()) {
          if (bSep && 0 < aResult.length) {
            aResult.push({
              id: '---',
              name: '---',
              system: false,
              seporator: true,
              disabled: true
            });
          }

          bSep = false;
          aResult.push({
            id: oItem.fullNameRaw,
            name: new window__WEBPACK_IMPORTED_MODULE_18___default.a.Array(oItem.deep + 1 - iUnDeep).join(sDeepPrefix) + (fRenameCallback ? fRenameCallback(oItem) : oItem.name()),
            system: false,
            seporator: false,
            disabled: !oItem.selectable || -1 < inArray(oItem.fullNameRaw, aDisabled) || (fDisableCallback ? fDisableCallback(oItem) : false)
          });
        }
      }
    }

    if (oItem.subScribed() && 0 < oItem.subFolders().length) {
      aResult = _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_12___default()(aResult).call(aResult, folderListOptionsBuilder([], oItem.subFolders(), aDisabled, [], iUnDeep, fDisableCallback, fVisibleCallback, fRenameCallback, bSystem, bBuildUnvisible));
    }
  }

  return aResult;
}
/**
 * @param {object} element
 * @returns {void}
 */

function selectElement(element) {
  var sel = null,
      range = null;

  if (window__WEBPACK_IMPORTED_MODULE_18___default.a.getSelection) {
    sel = window__WEBPACK_IMPORTED_MODULE_18___default.a.getSelection();
    sel.removeAllRanges();
    range = window__WEBPACK_IMPORTED_MODULE_18___default.a.document.createRange();
    range.selectNodeContents(element);
    sel.addRange(range);
  } else if (window__WEBPACK_IMPORTED_MODULE_18___default.a.document.selection) {
    range = window__WEBPACK_IMPORTED_MODULE_18___default.a.document.body.createTextRange();
    range.moveToElementText(element);
    range.select();
  }
}
var detectDropdownVisibility = ___WEBPACK_IMPORTED_MODULE_20___default.a.debounce(function () {
  Object(Common_Globals__WEBPACK_IMPORTED_MODULE_23__["dropdownVisibility"])(!!_babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_14___default()(___WEBPACK_IMPORTED_MODULE_20___default.a).call(___WEBPACK_IMPORTED_MODULE_20___default.a, Common_Globals__WEBPACK_IMPORTED_MODULE_23__["data"].aBootstrapDropdowns, function (item) {
    return item.hasClass('open');
  }));
}, 50);
/**
 * @param {boolean=} delay = false
 */

function triggerAutocompleteInputChange(delay) {
  if (delay === void 0) {
    delay = false;
  }

  var fFunc = function fFunc() {
    $__WEBPACK_IMPORTED_MODULE_19___default()('.checkAutocomplete').trigger('change');
  };

  if (delay) {
    ___WEBPACK_IMPORTED_MODULE_20___default.a.delay(fFunc, 100);
  } else {
    fFunc();
  }
}
var configurationScriptTagCache = {};
/**
 * @param {string} configuration
 * @returns {object}
 */

function getConfigurationFromScriptTag(configuration) {
  if (!configurationScriptTagCache[configuration]) {
    configurationScriptTagCache[configuration] = $__WEBPACK_IMPORTED_MODULE_19___default()('script[type="application/json"][data-configuration="' + configuration + '"]');
  }

  try {
    return JSON.parse(configurationScriptTagCache[configuration].text());
  } catch (e) {} // eslint-disable-line no-empty


  return {};
}
/**
 * @param {mixed} mPropOrValue
 * @param {mixed} value
 */

function disposeOne(propOrValue, value) {
  var disposable = value || propOrValue;

  if (disposable && 'function' === typeof disposable.dispose) {
    disposable.dispose();
  }
}
/**
 * @param {Object} object
 */

function disposeObject(object) {
  if (object) {
    if (isArray(object.disposables)) {
      ___WEBPACK_IMPORTED_MODULE_20___default.a.each(object.disposables, disposeOne);
    }

    ko__WEBPACK_IMPORTED_MODULE_21__[/* default */ "a"].utils.objectForEach(object, disposeOne);
  }
}
/**
 * @param {Object|Array} objectOrObjects
 * @returns {void}
 */

function delegateRunOnDestroy(objectOrObjects) {
  if (objectOrObjects) {
    if (isArray(objectOrObjects)) {
      ___WEBPACK_IMPORTED_MODULE_20___default.a.each(objectOrObjects, function (item) {
        delegateRunOnDestroy(item);
      });
    } else if (objectOrObjects && objectOrObjects.onDestroy) {
      objectOrObjects.onDestroy();
    }
  }
}
/**
 * @param {object} $styleTag
 * @param {string} css
 * @returns {boolean}
 */

function appendStyles($styleTag, css) {
  if ($styleTag && $styleTag[0]) {
    if ($styleTag[0].styleSheet && !isUnd($styleTag[0].styleSheet.cssText)) {
      $styleTag[0].styleSheet.cssText = css;
    } else {
      $styleTag.text(css);
    }

    return true;
  }

  return false;
}
var __themeTimer = 0,
    __themeAjax = null;
/**
 * @param {string} value
 * @param {function=} themeTrigger = noop
 * @returns {void}
 */

function changeTheme(value, themeTrigger) {
  if (themeTrigger === void 0) {
    themeTrigger = noop;
  }

  var themeLink = $__WEBPACK_IMPORTED_MODULE_19___default()('#app-theme-link'),
      clearTimer = function clearTimer() {
    __themeTimer = window__WEBPACK_IMPORTED_MODULE_18___default.a.setTimeout(function () {
      return themeTrigger(Common_Enums__WEBPACK_IMPORTED_MODULE_24__["SaveSettingsStep"].Idle);
    }, 1000);
    __themeAjax = null;
  };

  var themeStyle = $__WEBPACK_IMPORTED_MODULE_19___default()('#app-theme-style'),
      url = themeLink.attr('href');

  if (!url) {
    url = themeStyle.attr('data-href');
  }

  if (url) {
    url = url.toString().replace(/\/-\/[^/]+\/-\//, '/-/' + value + '/-/');
    url = url.replace(/\/Css\/[^/]+\/User\//, '/Css/0/User/');
    url = url.replace(/\/Hash\/[^/]+\//, '/Hash/-/');

    if ('Json/' !== url.substring(url.length - 5, url.length)) {
      url += 'Json/';
    }

    window__WEBPACK_IMPORTED_MODULE_18___default.a.clearTimeout(__themeTimer);
    themeTrigger(Common_Enums__WEBPACK_IMPORTED_MODULE_24__["SaveSettingsStep"].Animate);

    if (__themeAjax && __themeAjax.abort) {
      __themeAjax.abort();
    }

    __themeAjax = $__WEBPACK_IMPORTED_MODULE_19___default.a.ajax({
      url: url,
      dataType: 'json'
    }).then(function (data) {
      if (data && isArray(data) && 2 === data.length) {
        if (themeLink && themeLink[0] && (!themeStyle || !themeStyle[0])) {
          themeStyle = $__WEBPACK_IMPORTED_MODULE_19___default()('<style id="app-theme-style"></style>');
          themeLink.after(themeStyle);
          themeLink.remove();
        }

        if (themeStyle && themeStyle[0]) {
          if (appendStyles(themeStyle, data[1])) {
            themeStyle.attr('data-href', url).attr('data-theme', data[0]);
          }
        }

        themeTrigger(Common_Enums__WEBPACK_IMPORTED_MODULE_24__["SaveSettingsStep"].TrueResult);
      }
    }).then(clearTimer, clearTimer);
  }
}
/**
 * @returns {function}
 */

function computedPagenatorHelper(koCurrentPage, koPageCount) {
  return function () {
    var currentPage = koCurrentPage(),
        pageCount = koPageCount(),
        result = [],
        fAdd = function fAdd(index, push, customName) {
      if (push === void 0) {
        push = true;
      }

      if (customName === void 0) {
        customName = '';
      }

      var data = {
        current: index === currentPage,
        name: '' === customName ? index.toString() : customName.toString(),
        custom: '' !== customName,
        title: '' === customName ? '' : index.toString(),
        value: index.toString()
      };

      if (push) {
        result.push(data);
      } else {
        result.unshift(data);
      }
    };

    var prev = 0,
        next = 0,
        limit = 2;

    if (1 < pageCount || 0 < pageCount && pageCount < currentPage) {
      if (pageCount < currentPage) {
        fAdd(pageCount);
        prev = pageCount;
        next = pageCount;
      } else {
        if (3 >= currentPage || pageCount - 2 <= currentPage) {
          limit += 2;
        }

        fAdd(currentPage);
        prev = currentPage;
        next = currentPage;
      }

      while (0 < limit) {
        prev -= 1;
        next += 1;

        if (0 < prev) {
          fAdd(prev, false);
          limit -= 1;
        }

        if (pageCount >= next) {
          fAdd(next, true);
          limit -= 1;
        } else if (0 >= prev) {
          break;
        }
      }

      if (3 === prev) {
        fAdd(2, false);
      } else if (3 < prev) {
        fAdd(Math.round((prev - 1) / 2), false, '...');
      }

      if (pageCount - 2 === next) {
        fAdd(pageCount - 1, true);
      } else if (pageCount - 2 > next) {
        fAdd(Math.round((pageCount + next) / 2), true, '...');
      } // first and last


      if (1 < prev) {
        fAdd(1, false);
      }

      if (pageCount > next) {
        fAdd(pageCount, true);
      }
    }

    return result;
  };
}
/**
 * @param {string} fileName
 * @returns {string}
 */

function getFileExtension(fileName) {
  fileName = trim(fileName).toLowerCase();
  var result = fileName.split('.').pop();
  return result === fileName ? '' : result;
}
/**
 * @param {string} fileName
 * @returns {string}
 */

function mimeContentType(fileName) {
  var ext = '',
      result = 'application/octet-stream';
  fileName = trim(fileName).toLowerCase();

  if ('winmail.dat' === fileName) {
    return 'application/ms-tnef';
  }

  ext = getFileExtension(fileName);

  if (ext && 0 < ext.length && !isUnd(Common_Mime__WEBPACK_IMPORTED_MODULE_25__[/* Mime */ "a"][ext])) {
    result = Common_Mime__WEBPACK_IMPORTED_MODULE_25__[/* Mime */ "a"][ext];
  }

  return result;
}
/**
 * @param {string} color
 * @returns {boolean}
 */

function isTransparent(color) {
  return 'rgba(0, 0, 0, 0)' === color || 'transparent' === color;
}
/**
 * @param {Object} $el
 * @returns {number}
 */

function getRealHeight($el) {
  $el.clone().show().appendTo(Common_Globals__WEBPACK_IMPORTED_MODULE_23__["$hcont"]);
  var result = Common_Globals__WEBPACK_IMPORTED_MODULE_23__["$hcont"].height();
  Common_Globals__WEBPACK_IMPORTED_MODULE_23__["$hcont"].empty();
  return result;
}
/**
 * @param {string} url
 * @param {number} value
 * @param {Function} fCallback
 */

function resizeAndCrop(url, value, fCallback) {
  var img = new window__WEBPACK_IMPORTED_MODULE_18___default.a.Image();

  img.onload = function () {
    var diff = [0, 0];
    var canvas = window__WEBPACK_IMPORTED_MODULE_18___default.a.document.createElement('canvas'),
        ctx = canvas.getContext('2d');
    canvas.width = value;
    canvas.height = value;

    if (this.width > this.height) {
      diff = [this.width - this.height, 0];
    } else {
      diff = [0, this.height - this.width];
    }

    ctx.fillStyle = '#fff';
    ctx.fillRect(0, 0, value, value);
    ctx.drawImage(this, diff[0] / 2, diff[1] / 2, this.width - diff[0], this.height - diff[1], 0, 0, value, value);
    fCallback(canvas.toDataURL('image/jpeg'));
  };

  img.src = url;
}
/**
 * @param {string} mailToUrl
 * @param {Function} PopupComposeViewModel
 * @returns {boolean}
 */

function mailToHelper(mailToUrl, PopupComposeViewModel) {
  if (mailToUrl && 'mailto:' === mailToUrl.toString().substr(0, 7).toLowerCase()) {
    if (!PopupComposeViewModel) {
      return true;
    }

    mailToUrl = mailToUrl.toString().substr(7);
    var to = [],
        cc = null,
        bcc = null,
        params = {};

    var email = mailToUrl.replace(/\?.+$/, ''),
        query = mailToUrl.replace(/^[^?]*\?/, ''),
        EmailModel = __webpack_require__(/*! Model/Email */ 80).default;

    params = simpleQueryParser(query);

    if (!isUnd(params.to)) {
      to = EmailModel.parseEmailLine(decodeURIComponent(email + ',' + params.to));
      to = _babel_runtime_corejs3_core_js_stable_instance_values__WEBPACK_IMPORTED_MODULE_11___default()(___WEBPACK_IMPORTED_MODULE_20___default.a).call(___WEBPACK_IMPORTED_MODULE_20___default.a, _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_10___default()(to).call(to, function (result, value) {
        if (value) {
          if (result[value.email]) {
            if (!result[value.email].name) {
              result[value.email] = value;
            }
          } else {
            result[value.email] = value;
          }
        }

        return result;
      }, {}));
    } else {
      to = EmailModel.parseEmailLine(email);
    }

    if (!isUnd(params.cc)) {
      cc = EmailModel.parseEmailLine(decodeURIComponent(params.cc));
    }

    if (!isUnd(params.bcc)) {
      bcc = EmailModel.parseEmailLine(decodeURIComponent(params.bcc));
    }

    __webpack_require__(/*! Knoin/Knoin */ 7).showScreenPopup(PopupComposeViewModel, [Common_Enums__WEBPACK_IMPORTED_MODULE_24__["ComposeType"].Empty, null, to, cc, bcc, isUnd(params.subject) ? null : pString(decodeURIComponent(params.subject)), isUnd(params.body) ? null : plainToHtml(pString(decodeURIComponent(params.body)))]);

    return true;
  }

  return false;
}
/**
 * @param {Function} fn
 * @returns {void}
 */

function domReady(fn) {
  $__WEBPACK_IMPORTED_MODULE_19___default()(function () {
    return fn();
  }); //
  //	if ('loading' !== window.document.readyState)
  //	{
  //		fn();
  //	}
  //	else
  //	{
  //		window.document.addEventListener('DOMContentLoaded', fn);
  //	}
}
var windowResize = ___WEBPACK_IMPORTED_MODULE_20___default.a.debounce(function (timeout) {
  if (isUnd(timeout) || isNull(timeout)) {
    Common_Globals__WEBPACK_IMPORTED_MODULE_23__["$win"].resize();
  } else {
    window__WEBPACK_IMPORTED_MODULE_18___default.a.setTimeout(function () {
      Common_Globals__WEBPACK_IMPORTED_MODULE_23__["$win"].resize();
    }, timeout);
  }
}, 50);
/**
 * @returns {void}
 */

function windowResizeCallback() {
  windowResize();
}
var substr = window__WEBPACK_IMPORTED_MODULE_18___default.a.String.substr;

if ('b' !== 'ab'.substr(-1)) {
  substr = function substr(str, start, length) {
    start = 0 > start ? str.length + start : start;
    return str.substr(start, length);
  };

  window__WEBPACK_IMPORTED_MODULE_18___default.a.String.substr = substr;
}

/***/ }),
/* 3 */
/*!***************************!*\
  !*** external "window._" ***!
  \***************************/
/*! no static exports found */
/*! exports used: default */
/***/ (function(module, exports) {

module.exports = window._;

/***/ }),
/* 4 */
/*!*************************!*\
  !*** external "window" ***!
  \*************************/
/*! no static exports found */
/*! exports used: default */
/***/ (function(module, exports) {

module.exports = window;

/***/ }),
/* 5 */
/*!*********************************!*\
  !*** ./dev/Storage/Settings.js ***!
  \*********************************/
/*! exports provided: settingsGet, settingsSet, appSettingsGet, capa */
/*! all exports used */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "settingsGet", function() { return settingsGet; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "settingsSet", function() { return settingsSet; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "appSettingsGet", function() { return appSettingsGet; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "capa", function() { return capa; });
/* harmony import */ var window__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! window */ 4);
/* harmony import */ var window__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(window__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var Common_Utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! Common/Utils */ 2);


var SETTINGS = window__WEBPACK_IMPORTED_MODULE_0___default.a.__rlah_data() || null;
SETTINGS = Object(Common_Utils__WEBPACK_IMPORTED_MODULE_1__["isNormal"])(SETTINGS) ? SETTINGS : {};
var APP_SETTINGS = SETTINGS.System || null;
APP_SETTINGS = Object(Common_Utils__WEBPACK_IMPORTED_MODULE_1__["isNormal"])(APP_SETTINGS) ? APP_SETTINGS : {};
/**
 * @param {string} name
 * @returns {*}
 */

function settingsGet(name) {
  return Object(Common_Utils__WEBPACK_IMPORTED_MODULE_1__["isUnd"])(SETTINGS[name]) ? null : SETTINGS[name];
}
/**
 * @param {string} name
 * @param {*} value
 */

function settingsSet(name, value) {
  SETTINGS[name] = value;
}
/**
 * @param {string} name
 * @returns {*}
 */

function appSettingsGet(name) {
  return Object(Common_Utils__WEBPACK_IMPORTED_MODULE_1__["isUnd"])(APP_SETTINGS[name]) ? null : APP_SETTINGS[name];
}
/**
 * @param {string} name
 * @returns {boolean}
 */

function capa(name) {
  var values = settingsGet('Capa');
  return Object(Common_Utils__WEBPACK_IMPORTED_MODULE_1__["isArray"])(values) && Object(Common_Utils__WEBPACK_IMPORTED_MODULE_1__["isNormal"])(name) && -1 < Object(Common_Utils__WEBPACK_IMPORTED_MODULE_1__["inArray"])(name, values);
}

/***/ }),
/* 6 */
/*!*******************************!*\
  !*** ./dev/Common/Globals.js ***!
  \*******************************/
/*! exports provided: $win, $doc, $html, $body, $div, $hcont, startMicrotime, community, dropdownVisibility, useKeyboardShortcuts, sUserAgent, bIE, bChrome, bSafari, bMobileDevice, bDisableNanoScroll, bAnimationSupported, bXMLHttpRequestSupported, bIsHttps, htmlEditorDefaultConfig, htmlEditorLangsMap, bAllowPdfPreview, VIEW_MODELS, moveAction, leftPanelDisabled, leftPanelType, leftPanelWidth, popupVisibilityNames, popupVisibility, keyScopeReal, keyScopeFake, keyScope, data */
/*! all exports used */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "$win", function() { return $win; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "$doc", function() { return $doc; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "$html", function() { return $html; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "$body", function() { return $body; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "$div", function() { return $div; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "$hcont", function() { return $hcont; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "startMicrotime", function() { return startMicrotime; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "community", function() { return community; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "dropdownVisibility", function() { return dropdownVisibility; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "useKeyboardShortcuts", function() { return useKeyboardShortcuts; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sUserAgent", function() { return sUserAgent; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bIE", function() { return bIE; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bChrome", function() { return bChrome; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bSafari", function() { return bSafari; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bMobileDevice", function() { return bMobileDevice; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bDisableNanoScroll", function() { return bDisableNanoScroll; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bAnimationSupported", function() { return bAnimationSupported; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bXMLHttpRequestSupported", function() { return bXMLHttpRequestSupported; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bIsHttps", function() { return bIsHttps; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "htmlEditorDefaultConfig", function() { return htmlEditorDefaultConfig; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "htmlEditorLangsMap", function() { return htmlEditorLangsMap; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bAllowPdfPreview", function() { return bAllowPdfPreview; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VIEW_MODELS", function() { return VIEW_MODELS; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "moveAction", function() { return moveAction; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "leftPanelDisabled", function() { return leftPanelDisabled; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "leftPanelType", function() { return leftPanelType; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "leftPanelWidth", function() { return leftPanelWidth; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "popupVisibilityNames", function() { return popupVisibilityNames; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "popupVisibility", function() { return popupVisibility; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "keyScopeReal", function() { return keyScopeReal; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "keyScopeFake", function() { return keyScopeFake; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "keyScope", function() { return keyScope; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "data", function() { return data; });
/* harmony import */ var core_js_modules_es_array_filter__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.array.filter */ 272);
/* harmony import */ var core_js_modules_es_array_filter__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_filter__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/find */ 12);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_index_of__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/index-of */ 30);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_index_of__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_index_of__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var window__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! window */ 4);
/* harmony import */ var window__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(window__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! _ */ 3);
/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(___WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var $__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! $ */ 8);
/* harmony import */ var $__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n($__WEBPACK_IMPORTED_MODULE_5__);
/* harmony import */ var key__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! key */ 21);
/* harmony import */ var key__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(key__WEBPACK_IMPORTED_MODULE_6__);
/* harmony import */ var ko__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ko */ 1);
/* harmony import */ var Common_Enums__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! Common/Enums */ 0);









var $win = $__WEBPACK_IMPORTED_MODULE_5___default()(window__WEBPACK_IMPORTED_MODULE_3___default.a);
$win.__sizes = [0, 0];

var $doc = $__WEBPACK_IMPORTED_MODULE_5___default()(window__WEBPACK_IMPORTED_MODULE_3___default.a.document);
var $html = $__WEBPACK_IMPORTED_MODULE_5___default()('html');
var $body = $__WEBPACK_IMPORTED_MODULE_5___default()('body');
var $div = $__WEBPACK_IMPORTED_MODULE_5___default()('<div></div>');
var $hcont = $__WEBPACK_IMPORTED_MODULE_5___default()('<div></div>');
$hcont.attr('area', 'hidden').css({
  position: 'absolute',
  left: -5000
}).appendTo($body);
var startMicrotime = new window__WEBPACK_IMPORTED_MODULE_3___default.a.Date().getTime();
/**
 * @type {boolean}
 */

var community = true;
/**
 * @type {?}
 */

var dropdownVisibility = ko__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"].observable(false).extend({
  rateLimit: 0
});
/**
 * @type {boolean}
 */

var useKeyboardShortcuts = ko__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"].observable(true);
/**
 * @type {string}
 */

var sUserAgent = 'navigator' in window__WEBPACK_IMPORTED_MODULE_3___default.a && 'userAgent' in window__WEBPACK_IMPORTED_MODULE_3___default.a.navigator && window__WEBPACK_IMPORTED_MODULE_3___default.a.navigator.userAgent.toLowerCase() || '';
/**
 * @type {boolean}
 */

var bIE = -1 < _babel_runtime_corejs3_core_js_stable_instance_index_of__WEBPACK_IMPORTED_MODULE_2___default()(sUserAgent).call(sUserAgent, 'msie');
/**
 * @type {boolean}
 */

var bChrome = -1 < _babel_runtime_corejs3_core_js_stable_instance_index_of__WEBPACK_IMPORTED_MODULE_2___default()(sUserAgent).call(sUserAgent, 'chrome');
/**
 * @type {boolean}
 */

var bSafari = !bChrome && -1 < _babel_runtime_corejs3_core_js_stable_instance_index_of__WEBPACK_IMPORTED_MODULE_2___default()(sUserAgent).call(sUserAgent, 'safari');
/**
 * @type {boolean}
 */

var bMobileDevice = /android/i.test(sUserAgent) || /iphone/i.test(sUserAgent) || /ipod/i.test(sUserAgent) || /ipad/i.test(sUserAgent) || /blackberry/i.test(sUserAgent);
/**
 * @type {boolean}
 */

var bDisableNanoScroll = bMobileDevice;
/**
 * @type {boolean}
 */

var bAnimationSupported = !bMobileDevice && $html.hasClass('csstransitions') && $html.hasClass('cssanimations');
/**
 * @type {boolean}
 */

var bXMLHttpRequestSupported = !!window__WEBPACK_IMPORTED_MODULE_3___default.a.XMLHttpRequest;
/**
 * @type {boolean}
 */

var bIsHttps = window__WEBPACK_IMPORTED_MODULE_3___default.a.document && window__WEBPACK_IMPORTED_MODULE_3___default.a.document.location ? 'https:' === window__WEBPACK_IMPORTED_MODULE_3___default.a.document.location.protocol : false;
/**
 * @type {Object}
 */

var htmlEditorDefaultConfig = {
  'title': false,
  'stylesSet': false,
  'customConfig': '',
  'contentsCss': '',
  'toolbarGroups': [{
    name: 'spec'
  }, {
    name: 'styles'
  }, {
    name: 'basicstyles',
    groups: ['basicstyles', 'cleanup', 'bidi']
  }, {
    name: 'colors'
  }, bMobileDevice ? {} : {
    name: 'paragraph',
    groups: ['list', 'indent', 'blocks', 'align']
  }, {
    name: 'links'
  }, {
    name: 'insert'
  }, {
    name: 'document',
    groups: ['mode', 'document', 'doctools']
  }, {
    name: 'others'
  }],
  'removePlugins': 'liststyle',
  'removeButtons': 'Format,Undo,Redo,Cut,Copy,Paste,Anchor,Strike,Subscript,Superscript,Image,SelectAll,Source',
  'removeDialogTabs': 'link:advanced;link:target;image:advanced;images:advanced',
  'extraPlugins': 'plain,signature',
  'allowedContent': true,
  'extraAllowedContent': true,
  'fillEmptyBlocks': false,
  'ignoreEmptyParagraph': true,
  'disableNativeSpellChecker': false,
  'colorButton_enableAutomatic': false,
  'colorButton_enableMore': true,
  'font_defaultLabel': 'Arial',
  'fontSize_defaultLabel': '13',
  'fontSize_sizes': '10/10px;12/12px;13/13px;14/14px;16/16px;18/18px;20/20px;24/24px;28/28px;36/36px;48/48px'
};
/**
 * @type {Object}
 */

var htmlEditorLangsMap = {
  'ar_sa': 'ar-sa',
  'bg_bg': 'bg',
  'cs_CZ': 'cs',
  'de_de': 'de',
  'el_gr': 'el',
  'es_es': 'es',
  'et_ee': 'et',
  'fr_fr': 'fr',
  'hu_hu': 'hu',
  'is_is': 'is',
  'it_it': 'it',
  'ja_jp': 'ja',
  'ko_kr': 'ko',
  'lt_lt': 'lt',
  'lv_lv': 'lv',
  'fa_ir': 'fa',
  'nb_no': 'nb',
  'nl_nl': 'nl',
  'pl_pl': 'pl',
  'pt_br': 'pt-br',
  'pt_pt': 'pt',
  'ro_ro': 'ro',
  'ru_ru': 'ru',
  'sk_sk': 'sk',
  'sl_si': 'sl',
  'sv_se': 'sv',
  'tr_tr': 'tr',
  'uk_ua': 'uk',
  'zh_cn': 'zh-cn',
  'zh_tw': 'zh'
};
/**
 * @type {boolean}
 */

var bAllowPdfPreview = !bMobileDevice;

if (bAllowPdfPreview && window__WEBPACK_IMPORTED_MODULE_3___default.a.navigator && window__WEBPACK_IMPORTED_MODULE_3___default.a.navigator.mimeTypes) {
  bAllowPdfPreview = !!_babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_1___default()(___WEBPACK_IMPORTED_MODULE_4___default.a).call(___WEBPACK_IMPORTED_MODULE_4___default.a, window__WEBPACK_IMPORTED_MODULE_3___default.a.navigator.mimeTypes, function (type) {
    return type && 'application/pdf' === type.type;
  });

  if (!bAllowPdfPreview) {
    bAllowPdfPreview = 'undefined' !== typeof window__WEBPACK_IMPORTED_MODULE_3___default.a.navigator.mimeTypes['application/pdf'];
  }
}


var VIEW_MODELS = {
  settings: [],
  'settings-removed': [],
  'settings-disabled': []
};
var moveAction = ko__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"].observable(false);
var leftPanelDisabled = ko__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"].observable(false);
var leftPanelType = ko__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"].observable('');
var leftPanelWidth = ko__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"].observable(0);
leftPanelDisabled.subscribe(function (value) {
  if (value && moveAction()) {
    moveAction(false);
  }
});
moveAction.subscribe(function (value) {
  if (value && leftPanelDisabled()) {
    leftPanelDisabled(false);
  }
}); // popups

var popupVisibilityNames = ko__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"].observableArray([]);
var popupVisibility = ko__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"].computed(function () {
  return 0 < popupVisibilityNames().length;
});
popupVisibility.subscribe(function (bValue) {
  $html.toggleClass('rl-modal', bValue);
}); // keys

var keyScopeReal = ko__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"].observable(Common_Enums__WEBPACK_IMPORTED_MODULE_8__["KeyState"].All);
var keyScopeFake = ko__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"].observable(Common_Enums__WEBPACK_IMPORTED_MODULE_8__["KeyState"].All);
var keyScope = ko__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"].computed({
  read: function read() {
    return keyScopeFake();
  },
  write: function write(value) {
    if (Common_Enums__WEBPACK_IMPORTED_MODULE_8__["KeyState"].Menu !== value) {
      if (Common_Enums__WEBPACK_IMPORTED_MODULE_8__["KeyState"].Compose === value) {
        // disableKeyFilter
        key__WEBPACK_IMPORTED_MODULE_6___default.a.filter = function () {
          return useKeyboardShortcuts();
        };
      } else {
        // restoreKeyFilter
        key__WEBPACK_IMPORTED_MODULE_6___default.a.filter = function (event) {
          if (useKeyboardShortcuts()) {
            var el = event.target || event.srcElement,
                tagName = el ? el.tagName.toUpperCase() : '';
            return !('INPUT' === tagName || 'SELECT' === tagName || 'TEXTAREA' === tagName || el && 'DIV' === tagName && ('editorHtmlArea' === el.className || 'true' === '' + el.contentEditable));
          }

          return false;
        };
      }

      keyScopeFake(value);

      if (dropdownVisibility()) {
        value = Common_Enums__WEBPACK_IMPORTED_MODULE_8__["KeyState"].Menu;
      }
    }

    keyScopeReal(value);
  }
});
keyScopeReal.subscribe(function (value) {
  //	window.console.log('keyScope=' + sValue); // DEBUG
  key__WEBPACK_IMPORTED_MODULE_6___default.a.setScope(value);
});
dropdownVisibility.subscribe(function (value) {
  if (value) {
    keyScope(Common_Enums__WEBPACK_IMPORTED_MODULE_8__["KeyState"].Menu);
  } else if (Common_Enums__WEBPACK_IMPORTED_MODULE_8__["KeyState"].Menu === key__WEBPACK_IMPORTED_MODULE_6___default.a.getScope()) {
    keyScope(keyScopeFake());
  }
});
/**
 * @type {*}
 */

var data = {
  __APP__: null,
  iAjaxErrorCount: 0,
  iTokenErrorCount: 0,
  aBootstrapDropdowns: [],
  iMessageBodyCacheCount: 0,
  bUnload: false
};

/***/ }),
/* 7 */
/*!****************************!*\
  !*** ./dev/Knoin/Knoin.js ***!
  \****************************/
/*! exports provided: ViewType, hideLoading, createCommand, addSettingsViewModel, removeSettingsViewModel, disableSettingsViewModel, routeOff, routeOn, screen, getScreenPopup, hideScreenPopup, vmRunHook, buildViewModel, showScreenPopup, warmUpScreenPopup, isPopupVisible, screenOnRoute, startScreens, setHash, commandDecorator, command, viewDecorator, view, viewModel, popupDecorator, popup, settingsMenuKeysHandler */
/*! all exports used */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ViewType", function() { return ViewType; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hideLoading", function() { return hideLoading; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createCommand", function() { return createCommand; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addSettingsViewModel", function() { return addSettingsViewModel; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "removeSettingsViewModel", function() { return removeSettingsViewModel; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "disableSettingsViewModel", function() { return disableSettingsViewModel; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "routeOff", function() { return routeOff; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "routeOn", function() { return routeOn; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "screen", function() { return screen; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getScreenPopup", function() { return getScreenPopup; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hideScreenPopup", function() { return hideScreenPopup; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "vmRunHook", function() { return vmRunHook; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "buildViewModel", function() { return buildViewModel; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "showScreenPopup", function() { return showScreenPopup; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "warmUpScreenPopup", function() { return warmUpScreenPopup; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isPopupVisible", function() { return isPopupVisible; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "screenOnRoute", function() { return screenOnRoute; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "startScreens", function() { return startScreens; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setHash", function() { return setHash; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "commandDecorator", function() { return commandDecorator; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "command", function() { return commandDecorator; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "viewDecorator", function() { return viewDecorator; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "view", function() { return viewDecorator; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "viewModel", function() { return viewDecorator; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "popupDecorator", function() { return popupDecorator; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "popup", function() { return popupDecorator; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "settingsMenuKeysHandler", function() { return settingsMenuKeysHandler; });
/* harmony import */ var core_js_modules_es_function_name__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.function.name */ 51);
/* harmony import */ var core_js_modules_es_function_name__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_function_name__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var core_js_modules_es_regexp_exec__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es.regexp.exec */ 45);
/* harmony import */ var core_js_modules_es_regexp_exec__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_regexp_exec__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var core_js_modules_es_string_match__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core-js/modules/es.string.match */ 196);
/* harmony import */ var core_js_modules_es_string_match__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_match__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/filter */ 34);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! _ */ 3);
/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(___WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var $__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! $ */ 8);
/* harmony import */ var $__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n($__WEBPACK_IMPORTED_MODULE_5__);
/* harmony import */ var ko__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ko */ 1);
/* harmony import */ var hasher__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! hasher */ 61);
/* harmony import */ var hasher__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(hasher__WEBPACK_IMPORTED_MODULE_7__);
/* harmony import */ var crossroads__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! crossroads */ 161);
/* harmony import */ var crossroads__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(crossroads__WEBPACK_IMPORTED_MODULE_8__);
/* harmony import */ var Common_Enums__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! Common/Enums */ 0);
/* harmony import */ var Common_Plugins__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! Common/Plugins */ 39);
/* harmony import */ var Common_Globals__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! Common/Globals */ 6);
/* harmony import */ var Common_Utils__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! Common/Utils */ 2);













var currentScreen = null,
    defaultScreenName = '';
var SCREENS = {};
var ViewType = {
  Popup: 'Popups',
  Left: 'Left',
  Right: 'Right',
  Center: 'Center'
};
/**
 * @returns {void}
 */

function hideLoading() {
  $__WEBPACK_IMPORTED_MODULE_5___default()('#rl-content').addClass('rl-content-show');
  $__WEBPACK_IMPORTED_MODULE_5___default()('#rl-loading').hide().remove();
}
/**
 * @param {Function} fExecute
 * @param {(Function|boolean|null)=} fCanExecute = true
 * @returns {Function}
 */

function createCommand(fExecute, fCanExecute) {
  if (fCanExecute === void 0) {
    fCanExecute = true;
  }

  return Object(Common_Utils__WEBPACK_IMPORTED_MODULE_12__["createCommandLegacy"])(null, fExecute, fCanExecute);
}
/**
 * @param {Function} SettingsViewModelClass
 * @param {string} template
 * @param {string} labelName
 * @param {string} route
 * @param {boolean=} isDefault = false
 * @returns {void}
 */

function addSettingsViewModel(SettingsViewModelClass, template, labelName, route, isDefault) {
  if (isDefault === void 0) {
    isDefault = false;
  }

  SettingsViewModelClass.__rlSettingsData = {
    Label: labelName,
    Template: template,
    Route: route,
    IsDefault: !!isDefault
  };
  Common_Globals__WEBPACK_IMPORTED_MODULE_11__["VIEW_MODELS"].settings.push(SettingsViewModelClass);
}
/**
 * @param {Function} SettingsViewModelClass
 * @returns {void}
 */

function removeSettingsViewModel(SettingsViewModelClass) {
  Common_Globals__WEBPACK_IMPORTED_MODULE_11__["VIEW_MODELS"]['settings-removed'].push(SettingsViewModelClass);
}
/**
 * @param {Function} SettingsViewModelClass
 * @returns {void}
 */

function disableSettingsViewModel(SettingsViewModelClass) {
  Common_Globals__WEBPACK_IMPORTED_MODULE_11__["VIEW_MODELS"]['settings-disabled'].push(SettingsViewModelClass);
}
/**
 * @returns {void}
 */

function routeOff() {
  hasher__WEBPACK_IMPORTED_MODULE_7___default.a.changed.active = false;
}
/**
 * @returns {void}
 */

function routeOn() {
  hasher__WEBPACK_IMPORTED_MODULE_7___default.a.changed.active = true;
}
/**
 * @param {string} screenName
 * @returns {?Object}
 */

function screen(screenName) {
  return '' !== screenName && !Object(Common_Utils__WEBPACK_IMPORTED_MODULE_12__["isUnd"])(SCREENS[screenName]) ? SCREENS[screenName] : null;
}
/**
 * @param {Function} ViewModelClassToShow
 * @returns {Function|null}
 */

function getScreenPopup(PopuViewModelClass) {
  var result = null;

  if (PopuViewModelClass) {
    result = PopuViewModelClass;

    if (PopuViewModelClass.default) {
      result = PopuViewModelClass.default;
    }
  }

  return result;
}
/**
 * @param {Function} ViewModelClassToHide
 * @returns {void}
 */

function hideScreenPopup(ViewModelClassToHide) {
  var ModalView = getScreenPopup(ViewModelClassToHide);

  if (ModalView && ModalView.__vm && ModalView.__dom) {
    ModalView.__vm.modalVisibility(false);
  }
}
/**
 * @param {string} hookName
 * @param {Function} ViewModelClass
 * @param {mixed=} params = null
 */

function vmRunHook(hookName, ViewModelClass, params) {
  if (params === void 0) {
    params = null;
  }

  ___WEBPACK_IMPORTED_MODULE_4___default.a.each(ViewModelClass.__names, function (name) {
    Object(Common_Plugins__WEBPACK_IMPORTED_MODULE_10__[/* runHook */ "f"])(hookName, [name, ViewModelClass.__vm, params]);
  });
}
/**
 * @param {Function} ViewModelClass
 * @param {Object=} vmScreen
 * @returns {*}
 */

function buildViewModel(ViewModelClass, vmScreen) {
  if (ViewModelClass && !ViewModelClass.__builded) {
    var vmDom = null;
    var vm = new ViewModelClass(vmScreen),
        position = ViewModelClass.__type || '',
        vmPlace = position ? $__WEBPACK_IMPORTED_MODULE_5___default()('#rl-content #rl-' + position.toLowerCase()) : null;
    ViewModelClass.__builded = true;
    ViewModelClass.__vm = vm;
    vm.onShowTrigger = ko__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"].observable(false);
    vm.onHideTrigger = ko__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"].observable(false);
    vm.viewModelName = ViewModelClass.__name;
    vm.viewModelNames = ViewModelClass.__names;
    vm.viewModelTemplateID = ViewModelClass.__templateID;
    vm.viewModelPosition = ViewModelClass.__type;

    if (vmPlace && 1 === vmPlace.length) {
      vmDom = $__WEBPACK_IMPORTED_MODULE_5___default()('<div></div>').addClass('rl-view-model').addClass('RL-' + vm.viewModelTemplateID).hide();
      vmDom.appendTo(vmPlace);
      vm.viewModelDom = vmDom;
      ViewModelClass.__dom = vmDom;

      if (ViewType.Popup === position) {
        vm.cancelCommand = vm.closeCommand = createCommand(function () {
          hideScreenPopup(ViewModelClass);
        });
        vm.modalVisibility.subscribe(function (value) {
          if (value) {
            vm.viewModelDom.show();
            vm.storeAndSetKeyScope();
            Common_Globals__WEBPACK_IMPORTED_MODULE_11__["popupVisibilityNames"].push(vm.viewModelName);
            vm.viewModelDom.css('z-index', 3000 + Object(Common_Globals__WEBPACK_IMPORTED_MODULE_11__["popupVisibilityNames"])().length + 10);

            if (vm.onShowTrigger) {
              vm.onShowTrigger(!vm.onShowTrigger());
            }

            Object(Common_Utils__WEBPACK_IMPORTED_MODULE_12__["delegateRun"])(vm, 'onShowWithDelay', [], 500);
          } else {
            Object(Common_Utils__WEBPACK_IMPORTED_MODULE_12__["delegateRun"])(vm, 'onHide');
            Object(Common_Utils__WEBPACK_IMPORTED_MODULE_12__["delegateRun"])(vm, 'onHideWithDelay', [], 500);

            if (vm.onHideTrigger) {
              vm.onHideTrigger(!vm.onHideTrigger());
            }

            vm.restoreKeyScope();
            vmRunHook('view-model-on-hide', ViewModelClass);
            Common_Globals__WEBPACK_IMPORTED_MODULE_11__["popupVisibilityNames"].remove(vm.viewModelName);
            vm.viewModelDom.css('z-index', 2000);

            ___WEBPACK_IMPORTED_MODULE_4___default.a.delay(function () {
              return vm.viewModelDom.hide();
            }, 300);
          }
        });
      }

      vmRunHook('view-model-pre-build', ViewModelClass, vmDom);
      ko__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"].applyBindingAccessorsToNode(vmDom[0], {
        translatorInit: true,
        template: function template() {
          return {
            name: vm.viewModelTemplateID
          };
        }
      }, vm);
      Object(Common_Utils__WEBPACK_IMPORTED_MODULE_12__["delegateRun"])(vm, 'onBuild', [vmDom]);

      if (vm && ViewType.Popup === position) {
        vm.registerPopupKeyDown();
      }

      vmRunHook('view-model-post-build', ViewModelClass, vmDom);
    } else {
      Object(Common_Utils__WEBPACK_IMPORTED_MODULE_12__["log"])('Cannot find view model position: ' + position);
    }
  }

  return ViewModelClass ? ViewModelClass.__vm : null;
}
/**
 * @param {Function} ViewModelClassToShow
 * @param {Array=} params
 * @returns {void}
 */

function showScreenPopup(ViewModelClassToShow, params) {
  if (params === void 0) {
    params = [];
  }

  var ModalView = getScreenPopup(ViewModelClassToShow);

  if (ModalView) {
    buildViewModel(ModalView);

    if (ModalView.__vm && ModalView.__dom) {
      Object(Common_Utils__WEBPACK_IMPORTED_MODULE_12__["delegateRun"])(ModalView.__vm, 'onBeforeShow', params || []);

      ModalView.__vm.modalVisibility(true);

      Object(Common_Utils__WEBPACK_IMPORTED_MODULE_12__["delegateRun"])(ModalView.__vm, 'onShow', params || []);
      vmRunHook('view-model-on-show', ModalView, params || []);
    }
  }
}
/**
 * @param {Function} ViewModelClassToShow
 * @returns {void}
 */

function warmUpScreenPopup(ViewModelClassToShow) {
  var ModalView = getScreenPopup(ViewModelClassToShow);

  if (ModalView) {
    buildViewModel(ModalView);

    if (ModalView.__vm && ModalView.__dom) {
      Object(Common_Utils__WEBPACK_IMPORTED_MODULE_12__["delegateRun"])(ModalView.__vm, 'onWarmUp');
    }
  }
}
/**
 * @param {Function} ViewModelClassToShow
 * @returns {boolean}
 */

function isPopupVisible(ViewModelClassToShow) {
  var ModalView = getScreenPopup(ViewModelClassToShow);
  return ModalView && ModalView.__vm ? ModalView.__vm.modalVisibility() : false;
}
/**
 * @param {string} screenName
 * @param {string} subPart
 * @returns {void}
 */

function screenOnRoute(screenName, subPart) {
  var vmScreen = null,
      isSameScreen = false,
      cross = null;

  if ('' === Object(Common_Utils__WEBPACK_IMPORTED_MODULE_12__["pString"])(screenName)) {
    screenName = defaultScreenName;
  }

  if ('' !== screenName) {
    vmScreen = screen(screenName);

    if (!vmScreen) {
      vmScreen = screen(defaultScreenName);

      if (vmScreen) {
        subPart = screenName + '/' + subPart;
        screenName = defaultScreenName;
      }
    }

    if (vmScreen && vmScreen.__started) {
      isSameScreen = currentScreen && vmScreen === currentScreen;

      if (!vmScreen.__builded) {
        vmScreen.__builded = true;

        if (Object(Common_Utils__WEBPACK_IMPORTED_MODULE_12__["isNonEmptyArray"])(vmScreen.viewModels())) {
          ___WEBPACK_IMPORTED_MODULE_4___default.a.each(vmScreen.viewModels(), function (ViewModelClass) {
            buildViewModel(ViewModelClass, vmScreen);
          });
        }

        Object(Common_Utils__WEBPACK_IMPORTED_MODULE_12__["delegateRun"])(vmScreen, 'onBuild');
      }

      ___WEBPACK_IMPORTED_MODULE_4___default.a.defer(function () {
        // hide screen
        if (currentScreen && !isSameScreen) {
          Object(Common_Utils__WEBPACK_IMPORTED_MODULE_12__["delegateRun"])(currentScreen, 'onHide');
          Object(Common_Utils__WEBPACK_IMPORTED_MODULE_12__["delegateRun"])(currentScreen, 'onHideWithDelay', [], 500);

          if (currentScreen.onHideTrigger) {
            currentScreen.onHideTrigger(!currentScreen.onHideTrigger());
          }

          if (Object(Common_Utils__WEBPACK_IMPORTED_MODULE_12__["isNonEmptyArray"])(currentScreen.viewModels())) {
            ___WEBPACK_IMPORTED_MODULE_4___default.a.each(currentScreen.viewModels(), function (ViewModelClass) {
              if (ViewModelClass.__vm && ViewModelClass.__dom && ViewType.Popup !== ViewModelClass.__vm.viewModelPosition) {
                ViewModelClass.__dom.hide();

                ViewModelClass.__vm.viewModelVisibility(false);

                Object(Common_Utils__WEBPACK_IMPORTED_MODULE_12__["delegateRun"])(ViewModelClass.__vm, 'onHide');
                Object(Common_Utils__WEBPACK_IMPORTED_MODULE_12__["delegateRun"])(ViewModelClass.__vm, 'onHideWithDelay', [], 500);

                if (ViewModelClass.__vm.onHideTrigger) {
                  ViewModelClass.__vm.onHideTrigger(!ViewModelClass.__vm.onHideTrigger());
                }
              }
            });
          }
        } // --


        currentScreen = vmScreen; // show screen

        if (currentScreen && !isSameScreen) {
          Object(Common_Utils__WEBPACK_IMPORTED_MODULE_12__["delegateRun"])(currentScreen, 'onShow');

          if (currentScreen.onShowTrigger) {
            currentScreen.onShowTrigger(!currentScreen.onShowTrigger());
          }

          Object(Common_Plugins__WEBPACK_IMPORTED_MODULE_10__[/* runHook */ "f"])('screen-on-show', [currentScreen.screenName(), currentScreen]);

          if (Object(Common_Utils__WEBPACK_IMPORTED_MODULE_12__["isNonEmptyArray"])(currentScreen.viewModels())) {
            ___WEBPACK_IMPORTED_MODULE_4___default.a.each(currentScreen.viewModels(), function (ViewModelClass) {
              if (ViewModelClass.__vm && ViewModelClass.__dom && ViewType.Popup !== ViewModelClass.__vm.viewModelPosition) {
                Object(Common_Utils__WEBPACK_IMPORTED_MODULE_12__["delegateRun"])(ViewModelClass.__vm, 'onBeforeShow');

                ViewModelClass.__dom.show();

                ViewModelClass.__vm.viewModelVisibility(true);

                Object(Common_Utils__WEBPACK_IMPORTED_MODULE_12__["delegateRun"])(ViewModelClass.__vm, 'onShow');

                if (ViewModelClass.__vm.onShowTrigger) {
                  ViewModelClass.__vm.onShowTrigger(!ViewModelClass.__vm.onShowTrigger());
                }

                Object(Common_Utils__WEBPACK_IMPORTED_MODULE_12__["delegateRun"])(ViewModelClass.__vm, 'onShowWithDelay', [], 200);
                vmRunHook('view-model-on-show', ViewModelClass);
              }
            });
          }
        } // --


        cross = vmScreen && vmScreen.__cross ? vmScreen.__cross() : null;

        if (cross) {
          cross.parse(subPart);
        }
      });
    }
  }
}
/**
 * @param {Array} screensClasses
 * @returns {void}
 */

function startScreens(screensClasses) {
  ___WEBPACK_IMPORTED_MODULE_4___default.a.each(screensClasses, function (CScreen) {
    if (CScreen) {
      var vmScreen = new CScreen(),
          screenName = vmScreen ? vmScreen.screenName() : '';

      if (vmScreen && '' !== screenName) {
        if ('' === defaultScreenName) {
          defaultScreenName = screenName;
        }

        SCREENS[screenName] = vmScreen;
      }
    }
  });

  ___WEBPACK_IMPORTED_MODULE_4___default.a.each(SCREENS, function (vmScreen) {
    if (vmScreen && !vmScreen.__started && vmScreen.__start) {
      vmScreen.__started = true;

      vmScreen.__start();

      Object(Common_Plugins__WEBPACK_IMPORTED_MODULE_10__[/* runHook */ "f"])('screen-pre-start', [vmScreen.screenName(), vmScreen]);
      Object(Common_Utils__WEBPACK_IMPORTED_MODULE_12__["delegateRun"])(vmScreen, 'onStart');
      Object(Common_Plugins__WEBPACK_IMPORTED_MODULE_10__[/* runHook */ "f"])('screen-post-start', [vmScreen.screenName(), vmScreen]);
    }
  });

  var cross = crossroads__WEBPACK_IMPORTED_MODULE_8___default.a.create();
  cross.addRoute(/^([a-zA-Z0-9-]*)\/?(.*)$/, screenOnRoute);
  hasher__WEBPACK_IMPORTED_MODULE_7___default.a.initialized.add(cross.parse, cross);
  hasher__WEBPACK_IMPORTED_MODULE_7___default.a.changed.add(cross.parse, cross);
  hasher__WEBPACK_IMPORTED_MODULE_7___default.a.init();

  ___WEBPACK_IMPORTED_MODULE_4___default.a.delay(function () {
    return Common_Globals__WEBPACK_IMPORTED_MODULE_11__["$html"].removeClass('rl-started-trigger').addClass('rl-started');
  }, 100);

  ___WEBPACK_IMPORTED_MODULE_4___default.a.delay(function () {
    return Common_Globals__WEBPACK_IMPORTED_MODULE_11__["$html"].addClass('rl-started-delay');
  }, 200);
}
/**
 * @param {string} sHash
 * @param {boolean=} silence = false
 * @param {boolean=} replace = false
 * @returns {void}
 */

function setHash(hash, silence, replace) {
  if (silence === void 0) {
    silence = false;
  }

  if (replace === void 0) {
    replace = false;
  }

  hash = '#' === hash.substr(0, 1) ? hash.substr(1) : hash;
  hash = '/' === hash.substr(0, 1) ? hash.substr(1) : hash;
  var cmd = replace ? 'replaceHash' : 'setHash';

  if (silence) {
    hasher__WEBPACK_IMPORTED_MODULE_7___default.a.changed.active = false;
    hasher__WEBPACK_IMPORTED_MODULE_7___default.a[cmd](hash);
    hasher__WEBPACK_IMPORTED_MODULE_7___default.a.changed.active = true;
  } else {
    hasher__WEBPACK_IMPORTED_MODULE_7___default.a.changed.active = true;
    hasher__WEBPACK_IMPORTED_MODULE_7___default.a[cmd](hash);
    hasher__WEBPACK_IMPORTED_MODULE_7___default.a.setHash(hash);
  }
}
/**
 * @param {Object} params
 * @returns {Function}
 */

function viewDecorator(_ref) {
  var name = _ref.name,
      type = _ref.type,
      templateID = _ref.templateID;
  return function (target) {
    if (target) {
      if (name) {
        if (Object(Common_Utils__WEBPACK_IMPORTED_MODULE_12__["isArray"])(name)) {
          target.__names = name;
        } else {
          target.__names = [name];
        }

        target.__name = target.__names[0];
      }

      if (type) {
        target.__type = type;
      }

      if (templateID) {
        target.__templateID = templateID;
      }
    }
  };
}
/**
 * @param {Object} params
 * @returns {Function}
 */


function popupDecorator(_ref2) {
  var name = _ref2.name,
      templateID = _ref2.templateID;
  return viewDecorator({
    name: name,
    type: ViewType.Popup,
    templateID: templateID
  });
}
/**
 * @param {Function} canExecute
 * @returns {Function}
 */


function commandDecorator(canExecute) {
  if (canExecute === void 0) {
    canExecute = true;
  }

  return function (target, key, descriptor) {
    if (!key || !key.match(/Command$/)) {
      throw new Error("name \"" + key + "\" should end with Command suffix");
    }

    var value = descriptor.value || descriptor.initializer(),
        normCanExecute = Object(Common_Utils__WEBPACK_IMPORTED_MODULE_12__["isFunc"])(canExecute) ? canExecute : function () {
      return !!canExecute;
    };

    descriptor.value = function () {
      if (normCanExecute.call(this, this)) {
        for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
          args[_key] = arguments[_key];
        }

        value.apply(this, args);
      }

      return false;
    };

    descriptor.value.__realCanExecute = normCanExecute;
    descriptor.value.isCommand = true;
    return descriptor;
  };
}
/**
 * @param {miced} $items
 * @returns {Function}
 */


function settingsMenuKeysHandler($items) {
  return ___WEBPACK_IMPORTED_MODULE_4___default.a.throttle(function (event, handler) {
    var up = handler && 'up' === handler.shortcut;

    if (event && $items.length) {
      var index = $items.index(_babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_3___default()($items).call($items, '.selected'));

      if (up && 0 < index) {
        index -= 1;
      } else if (!up && index < $items.length - 1) {
        index += 1;
      }

      var resultHash = $items.eq(index).attr('href');

      if (resultHash) {
        setHash(resultHash, false, true);
      }
    }
  }, Common_Enums__WEBPACK_IMPORTED_MODULE_9__["Magics"].Time200ms);
}



/***/ }),
/* 8 */
/*!********************************!*\
  !*** external "window.jQuery" ***!
  \********************************/
/*! no static exports found */
/*! exports used: default */
/***/ (function(module, exports) {

module.exports = window.jQuery;

/***/ }),
/* 9 */
/*!**********************************!*\
  !*** ./dev/Common/Translator.js ***!
  \**********************************/
/*! exports provided: trigger, i18n, i18nToNodes, initNotificationLanguage, initOnStartOrLangChange, getNotification, getNotificationFromResponse, getUploadErrorDescByCode, reload */
/*! all exports used */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "trigger", function() { return trigger; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i18n", function() { return i18n; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i18nToNodes", function() { return i18nToNodes; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "initNotificationLanguage", function() { return initNotificationLanguage; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "initOnStartOrLangChange", function() { return initOnStartOrLangChange; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getNotification", function() { return getNotification; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getNotificationFromResponse", function() { return getNotificationFromResponse; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getUploadErrorDescByCode", function() { return getUploadErrorDescByCode; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "reload", function() { return reload; });
/* harmony import */ var core_js_modules_es_object_to_string__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.object.to-string */ 63);
/* harmony import */ var core_js_modules_es_object_to_string__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_to_string__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var core_js_modules_es_promise__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es.promise */ 120);
/* harmony import */ var core_js_modules_es_promise__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_promise__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var core_js_modules_es_regexp_exec__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core-js/modules/es.regexp.exec */ 45);
/* harmony import */ var core_js_modules_es_regexp_exec__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_regexp_exec__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var core_js_modules_es_string_replace__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! core-js/modules/es.string.replace */ 56);
/* harmony import */ var core_js_modules_es_string_replace__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_replace__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/for-each */ 69);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var window__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! window */ 4);
/* harmony import */ var window__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(window__WEBPACK_IMPORTED_MODULE_5__);
/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! _ */ 3);
/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(___WEBPACK_IMPORTED_MODULE_6__);
/* harmony import */ var $__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! $ */ 8);
/* harmony import */ var $__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n($__WEBPACK_IMPORTED_MODULE_7__);
/* harmony import */ var ko__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ko */ 1);
/* harmony import */ var Common_Enums__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! Common/Enums */ 0);
/* harmony import */ var Common_Utils__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! Common/Utils */ 2);
/* harmony import */ var Common_Globals__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! Common/Globals */ 6);
/* harmony import */ var Common_Momentor__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! Common/Momentor */ 60);
/* harmony import */ var Common_Links__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! Common/Links */ 15);














var I18N_DATA = window__WEBPACK_IMPORTED_MODULE_5___default.a.rainloopI18N || {};
var I18N_NOTIFICATION_DATA = {};
var I18N_NOTIFICATION_MAP = [[Common_Enums__WEBPACK_IMPORTED_MODULE_9__["Notification"].InvalidToken, 'NOTIFICATIONS/INVALID_TOKEN'], [Common_Enums__WEBPACK_IMPORTED_MODULE_9__["Notification"].InvalidToken, 'NOTIFICATIONS/INVALID_TOKEN'], [Common_Enums__WEBPACK_IMPORTED_MODULE_9__["Notification"].AuthError, 'NOTIFICATIONS/AUTH_ERROR'], [Common_Enums__WEBPACK_IMPORTED_MODULE_9__["Notification"].AccessError, 'NOTIFICATIONS/ACCESS_ERROR'], [Common_Enums__WEBPACK_IMPORTED_MODULE_9__["Notification"].ConnectionError, 'NOTIFICATIONS/CONNECTION_ERROR'], [Common_Enums__WEBPACK_IMPORTED_MODULE_9__["Notification"].CaptchaError, 'NOTIFICATIONS/CAPTCHA_ERROR'], [Common_Enums__WEBPACK_IMPORTED_MODULE_9__["Notification"].SocialFacebookLoginAccessDisable, 'NOTIFICATIONS/SOCIAL_FACEBOOK_LOGIN_ACCESS_DISABLE'], [Common_Enums__WEBPACK_IMPORTED_MODULE_9__["Notification"].SocialTwitterLoginAccessDisable, 'NOTIFICATIONS/SOCIAL_TWITTER_LOGIN_ACCESS_DISABLE'], [Common_Enums__WEBPACK_IMPORTED_MODULE_9__["Notification"].SocialGoogleLoginAccessDisable, 'NOTIFICATIONS/SOCIAL_GOOGLE_LOGIN_ACCESS_DISABLE'], [Common_Enums__WEBPACK_IMPORTED_MODULE_9__["Notification"].DomainNotAllowed, 'NOTIFICATIONS/DOMAIN_NOT_ALLOWED'], [Common_Enums__WEBPACK_IMPORTED_MODULE_9__["Notification"].AccountNotAllowed, 'NOTIFICATIONS/ACCOUNT_NOT_ALLOWED'], [Common_Enums__WEBPACK_IMPORTED_MODULE_9__["Notification"].AccountTwoFactorAuthRequired, 'NOTIFICATIONS/ACCOUNT_TWO_FACTOR_AUTH_REQUIRED'], [Common_Enums__WEBPACK_IMPORTED_MODULE_9__["Notification"].AccountTwoFactorAuthError, 'NOTIFICATIONS/ACCOUNT_TWO_FACTOR_AUTH_ERROR'], [Common_Enums__WEBPACK_IMPORTED_MODULE_9__["Notification"].CouldNotSaveNewPassword, 'NOTIFICATIONS/COULD_NOT_SAVE_NEW_PASSWORD'], [Common_Enums__WEBPACK_IMPORTED_MODULE_9__["Notification"].CurrentPasswordIncorrect, 'NOTIFICATIONS/CURRENT_PASSWORD_INCORRECT'], [Common_Enums__WEBPACK_IMPORTED_MODULE_9__["Notification"].NewPasswordShort, 'NOTIFICATIONS/NEW_PASSWORD_SHORT'], [Common_Enums__WEBPACK_IMPORTED_MODULE_9__["Notification"].NewPasswordWeak, 'NOTIFICATIONS/NEW_PASSWORD_WEAK'], [Common_Enums__WEBPACK_IMPORTED_MODULE_9__["Notification"].NewPasswordForbidden, 'NOTIFICATIONS/NEW_PASSWORD_FORBIDDENT'], [Common_Enums__WEBPACK_IMPORTED_MODULE_9__["Notification"].ContactsSyncError, 'NOTIFICATIONS/CONTACTS_SYNC_ERROR'], [Common_Enums__WEBPACK_IMPORTED_MODULE_9__["Notification"].CantGetMessageList, 'NOTIFICATIONS/CANT_GET_MESSAGE_LIST'], [Common_Enums__WEBPACK_IMPORTED_MODULE_9__["Notification"].CantGetMessage, 'NOTIFICATIONS/CANT_GET_MESSAGE'], [Common_Enums__WEBPACK_IMPORTED_MODULE_9__["Notification"].CantDeleteMessage, 'NOTIFICATIONS/CANT_DELETE_MESSAGE'], [Common_Enums__WEBPACK_IMPORTED_MODULE_9__["Notification"].CantMoveMessage, 'NOTIFICATIONS/CANT_MOVE_MESSAGE'], [Common_Enums__WEBPACK_IMPORTED_MODULE_9__["Notification"].CantCopyMessage, 'NOTIFICATIONS/CANT_MOVE_MESSAGE'], [Common_Enums__WEBPACK_IMPORTED_MODULE_9__["Notification"].CantSaveMessage, 'NOTIFICATIONS/CANT_SAVE_MESSAGE'], [Common_Enums__WEBPACK_IMPORTED_MODULE_9__["Notification"].CantSendMessage, 'NOTIFICATIONS/CANT_SEND_MESSAGE'], [Common_Enums__WEBPACK_IMPORTED_MODULE_9__["Notification"].InvalidRecipients, 'NOTIFICATIONS/INVALID_RECIPIENTS'], [Common_Enums__WEBPACK_IMPORTED_MODULE_9__["Notification"].CantSaveFilters, 'NOTIFICATIONS/CANT_SAVE_FILTERS'], [Common_Enums__WEBPACK_IMPORTED_MODULE_9__["Notification"].CantGetFilters, 'NOTIFICATIONS/CANT_GET_FILTERS'], [Common_Enums__WEBPACK_IMPORTED_MODULE_9__["Notification"].FiltersAreNotCorrect, 'NOTIFICATIONS/FILTERS_ARE_NOT_CORRECT'], [Common_Enums__WEBPACK_IMPORTED_MODULE_9__["Notification"].CantCreateFolder, 'NOTIFICATIONS/CANT_CREATE_FOLDER'], [Common_Enums__WEBPACK_IMPORTED_MODULE_9__["Notification"].CantRenameFolder, 'NOTIFICATIONS/CANT_RENAME_FOLDER'], [Common_Enums__WEBPACK_IMPORTED_MODULE_9__["Notification"].CantDeleteFolder, 'NOTIFICATIONS/CANT_DELETE_FOLDER'], [Common_Enums__WEBPACK_IMPORTED_MODULE_9__["Notification"].CantDeleteNonEmptyFolder, 'NOTIFICATIONS/CANT_DELETE_NON_EMPTY_FOLDER'], [Common_Enums__WEBPACK_IMPORTED_MODULE_9__["Notification"].CantSubscribeFolder, 'NOTIFICATIONS/CANT_SUBSCRIBE_FOLDER'], [Common_Enums__WEBPACK_IMPORTED_MODULE_9__["Notification"].CantUnsubscribeFolder, 'NOTIFICATIONS/CANT_UNSUBSCRIBE_FOLDER'], [Common_Enums__WEBPACK_IMPORTED_MODULE_9__["Notification"].CantSaveSettings, 'NOTIFICATIONS/CANT_SAVE_SETTINGS'], [Common_Enums__WEBPACK_IMPORTED_MODULE_9__["Notification"].CantSavePluginSettings, 'NOTIFICATIONS/CANT_SAVE_PLUGIN_SETTINGS'], [Common_Enums__WEBPACK_IMPORTED_MODULE_9__["Notification"].DomainAlreadyExists, 'NOTIFICATIONS/DOMAIN_ALREADY_EXISTS'], [Common_Enums__WEBPACK_IMPORTED_MODULE_9__["Notification"].CantInstallPackage, 'NOTIFICATIONS/CANT_INSTALL_PACKAGE'], [Common_Enums__WEBPACK_IMPORTED_MODULE_9__["Notification"].CantDeletePackage, 'NOTIFICATIONS/CANT_DELETE_PACKAGE'], [Common_Enums__WEBPACK_IMPORTED_MODULE_9__["Notification"].InvalidPluginPackage, 'NOTIFICATIONS/INVALID_PLUGIN_PACKAGE'], [Common_Enums__WEBPACK_IMPORTED_MODULE_9__["Notification"].UnsupportedPluginPackage, 'NOTIFICATIONS/UNSUPPORTED_PLUGIN_PACKAGE'], [Common_Enums__WEBPACK_IMPORTED_MODULE_9__["Notification"].LicensingServerIsUnavailable, 'NOTIFICATIONS/LICENSING_SERVER_IS_UNAVAILABLE'], [Common_Enums__WEBPACK_IMPORTED_MODULE_9__["Notification"].LicensingExpired, 'NOTIFICATIONS/LICENSING_EXPIRED'], [Common_Enums__WEBPACK_IMPORTED_MODULE_9__["Notification"].LicensingBanned, 'NOTIFICATIONS/LICENSING_BANNED'], [Common_Enums__WEBPACK_IMPORTED_MODULE_9__["Notification"].DemoSendMessageError, 'NOTIFICATIONS/DEMO_SEND_MESSAGE_ERROR'], [Common_Enums__WEBPACK_IMPORTED_MODULE_9__["Notification"].DemoAccountError, 'NOTIFICATIONS/DEMO_ACCOUNT_ERROR'], [Common_Enums__WEBPACK_IMPORTED_MODULE_9__["Notification"].AccountAlreadyExists, 'NOTIFICATIONS/ACCOUNT_ALREADY_EXISTS'], [Common_Enums__WEBPACK_IMPORTED_MODULE_9__["Notification"].AccountDoesNotExist, 'NOTIFICATIONS/ACCOUNT_DOES_NOT_EXIST'], [Common_Enums__WEBPACK_IMPORTED_MODULE_9__["Notification"].MailServerError, 'NOTIFICATIONS/MAIL_SERVER_ERROR'], [Common_Enums__WEBPACK_IMPORTED_MODULE_9__["Notification"].InvalidInputArgument, 'NOTIFICATIONS/INVALID_INPUT_ARGUMENT'], [Common_Enums__WEBPACK_IMPORTED_MODULE_9__["Notification"].UnknownNotification, 'NOTIFICATIONS/UNKNOWN_ERROR'], [Common_Enums__WEBPACK_IMPORTED_MODULE_9__["Notification"].UnknownError, 'NOTIFICATIONS/UNKNOWN_ERROR']];
var trigger = ko__WEBPACK_IMPORTED_MODULE_8__[/* default */ "a"].observable(false);
/**
 * @param {string} key
 * @param {Object=} valueList
 * @param {string=} defaulValue
 * @returns {string}
 */

function i18n(key, valueList, defaulValue) {
  var valueName = '',
      result = I18N_DATA[key];

  if (Object(Common_Utils__WEBPACK_IMPORTED_MODULE_10__["isUnd"])(result)) {
    result = Object(Common_Utils__WEBPACK_IMPORTED_MODULE_10__["isUnd"])(defaulValue) ? key : defaulValue;
  }

  if (!Object(Common_Utils__WEBPACK_IMPORTED_MODULE_10__["isUnd"])(valueList) && !Object(Common_Utils__WEBPACK_IMPORTED_MODULE_10__["isNull"])(valueList)) {
    for (valueName in valueList) {
      if (Object(Common_Utils__WEBPACK_IMPORTED_MODULE_10__["has"])(valueList, valueName)) {
        result = result.replace('%' + valueName + '%', valueList[valueName]);
      }
    }
  }

  return result;
}

var i18nToNode = function i18nToNode(element) {
  var $el = $__WEBPACK_IMPORTED_MODULE_7___default()(element),
      key = $el.data('i18n');

  if (key) {
    if ('[' === key.substr(0, 1)) {
      switch (key.substr(0, 6)) {
        case '[html]':
          $el.html(i18n(key.substr(6)));
          break;

        case '[place':
          $el.attr('placeholder', i18n(key.substr(13)));
          break;

        case '[title':
          $el.attr('title', i18n(key.substr(7)));
          break;
        // no default
      }
    } else {
      $el.text(i18n(key));
    }
  }
};
/**
 * @param {Object} elements
 * @param {boolean=} animate = false
 */


function i18nToNodes(elements, animate) {
  if (animate === void 0) {
    animate = false;
  }

  ___WEBPACK_IMPORTED_MODULE_6___default.a.defer(function () {
    $__WEBPACK_IMPORTED_MODULE_7___default()('[data-i18n]', elements).each(function (index, item) {
      i18nToNode(item);
    });

    if (animate && Common_Globals__WEBPACK_IMPORTED_MODULE_11__["bAnimationSupported"]) {
      $__WEBPACK_IMPORTED_MODULE_7___default()('.i18n-animation[data-i18n]', elements).letterfx({
        'fx': 'fall fade',
        'backwards': false,
        'timing': 50,
        'fx_duration': '50ms',
        'letter_end': 'restore',
        'element_end': 'restore'
      });
    }
  });
}

var reloadData = function reloadData() {
  if (window__WEBPACK_IMPORTED_MODULE_5___default.a.rainloopI18N) {
    I18N_DATA = window__WEBPACK_IMPORTED_MODULE_5___default.a.rainloopI18N || {};
    i18nToNodes(window__WEBPACK_IMPORTED_MODULE_5___default.a.document, true);
    Object(Common_Momentor__WEBPACK_IMPORTED_MODULE_12__["reload"])();
    trigger(!trigger());
  }

  window__WEBPACK_IMPORTED_MODULE_5___default.a.rainloopI18N = null;
};
/**
 * @returns {void}
 */


function initNotificationLanguage() {
  _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_4___default()(I18N_NOTIFICATION_MAP).call(I18N_NOTIFICATION_MAP, function (item) {
    I18N_NOTIFICATION_DATA[item[0]] = i18n(item[1]);
  });
}
/**
 * @param {Function} startCallback
 * @param {Function=} langCallback = null
 */

function initOnStartOrLangChange(startCallback, langCallback) {
  if (langCallback === void 0) {
    langCallback = null;
  }

  if (startCallback) {
    startCallback();
  }

  if (langCallback) {
    trigger.subscribe(function () {
      if (startCallback) {
        startCallback();
      }

      if (langCallback) {
        langCallback();
      }
    });
  } else if (startCallback) {
    trigger.subscribe(startCallback);
  }
}
/**
 * @param {number} code
 * @param {*=} message = ''
 * @param {*=} defCode = null
 * @returns {string}
 */

function getNotification(code, message, defCode) {
  if (message === void 0) {
    message = '';
  }

  if (defCode === void 0) {
    defCode = null;
  }

  code = window__WEBPACK_IMPORTED_MODULE_5___default.a.parseInt(code, 10) || 0;

  if (Common_Enums__WEBPACK_IMPORTED_MODULE_9__["Notification"].ClientViewError === code && message) {
    return message;
  }

  defCode = defCode ? window__WEBPACK_IMPORTED_MODULE_5___default.a.parseInt(defCode, 10) || 0 : 0;
  return Object(Common_Utils__WEBPACK_IMPORTED_MODULE_10__["isUnd"])(I18N_NOTIFICATION_DATA[code]) ? defCode && Object(Common_Utils__WEBPACK_IMPORTED_MODULE_10__["isUnd"])(I18N_NOTIFICATION_DATA[defCode]) ? I18N_NOTIFICATION_DATA[defCode] : '' : I18N_NOTIFICATION_DATA[code];
}
/**
 * @param {object} response
 * @param {number} defCode = Notification.UnknownNotification
 * @returns {string}
 */

function getNotificationFromResponse(response, defCode) {
  if (defCode === void 0) {
    defCode = Common_Enums__WEBPACK_IMPORTED_MODULE_9__["Notification"].UnknownNotification;
  }

  return response && response.ErrorCode ? getNotification(Object(Common_Utils__WEBPACK_IMPORTED_MODULE_10__["pInt"])(response.ErrorCode), response.ErrorMessage || '') : getNotification(defCode);
}
/**
 * @param {*} code
 * @returns {string}
 */

function getUploadErrorDescByCode(code) {
  var result = '';

  switch (window__WEBPACK_IMPORTED_MODULE_5___default.a.parseInt(code, 10) || 0) {
    case Common_Enums__WEBPACK_IMPORTED_MODULE_9__["UploadErrorCode"].FileIsTooBig:
      result = i18n('UPLOAD/ERROR_FILE_IS_TOO_BIG');
      break;

    case Common_Enums__WEBPACK_IMPORTED_MODULE_9__["UploadErrorCode"].FilePartiallyUploaded:
      result = i18n('UPLOAD/ERROR_FILE_PARTIALLY_UPLOADED');
      break;

    case Common_Enums__WEBPACK_IMPORTED_MODULE_9__["UploadErrorCode"].FileNoUploaded:
      result = i18n('UPLOAD/ERROR_NO_FILE_UPLOADED');
      break;

    case Common_Enums__WEBPACK_IMPORTED_MODULE_9__["UploadErrorCode"].MissingTempFolder:
      result = i18n('UPLOAD/ERROR_MISSING_TEMP_FOLDER');
      break;

    case Common_Enums__WEBPACK_IMPORTED_MODULE_9__["UploadErrorCode"].FileOnSaveingError:
      result = i18n('UPLOAD/ERROR_ON_SAVING_FILE');
      break;

    case Common_Enums__WEBPACK_IMPORTED_MODULE_9__["UploadErrorCode"].FileType:
      result = i18n('UPLOAD/ERROR_FILE_TYPE');
      break;

    default:
      result = i18n('UPLOAD/ERROR_UNKNOWN');
      break;
  }

  return result;
}
/**
 * @param {boolean} admin
 * @param {string} language
 */

function reload(admin, language) {
  var start = Object(Common_Utils__WEBPACK_IMPORTED_MODULE_10__["microtime"])();
  Common_Globals__WEBPACK_IMPORTED_MODULE_11__["$html"].addClass('rl-changing-language');
  return new window__WEBPACK_IMPORTED_MODULE_5___default.a.Promise(function (resolve, reject) {
    $__WEBPACK_IMPORTED_MODULE_7___default.a.ajax({
      url: Object(Common_Links__WEBPACK_IMPORTED_MODULE_13__[/* langLink */ "n"])(language, admin),
      dataType: 'script',
      cache: true
    }).then(function () {
      ___WEBPACK_IMPORTED_MODULE_6___default.a.delay(function () {
        reloadData();
        var isRtl = -1 < Object(Common_Utils__WEBPACK_IMPORTED_MODULE_10__["inArray"])((language || '').toLowerCase(), ['ar', 'ar_sa', 'he', 'he_he', 'ur', 'ur_ir']);
        Common_Globals__WEBPACK_IMPORTED_MODULE_11__["$html"].removeClass('rl-changing-language').removeClass('rl-rtl rl-ltr') // .attr('dir', isRtl ? 'rtl' : 'ltr')
        .addClass(isRtl ? 'rl-rtl' : 'rl-ltr');
        resolve();
      }, 500 < Object(Common_Utils__WEBPACK_IMPORTED_MODULE_10__["microtime"])() - start ? 1 : 500);
    }, function () {
      Common_Globals__WEBPACK_IMPORTED_MODULE_11__["$html"].removeClass('rl-changing-language');
      window__WEBPACK_IMPORTED_MODULE_5___default.a.rainloopI18N = null;
      reject();
    });
  });
} // init section

Common_Globals__WEBPACK_IMPORTED_MODULE_11__["$html"].addClass('rl-' + (Common_Globals__WEBPACK_IMPORTED_MODULE_11__["$html"].attr('dir') || 'ltr'));

/***/ }),
/* 10 */
/*!**************************************************************************!*\
  !*** ./node_modules/@babel/runtime-corejs3/helpers/esm/inheritsLoose.js ***!
  \**************************************************************************/
/*! exports provided: default */
/*! exports used: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _inheritsLoose; });
/* harmony import */ var _core_js_object_create__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../core-js/object/create */ 256);
/* harmony import */ var _core_js_object_create__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_core_js_object_create__WEBPACK_IMPORTED_MODULE_0__);

function _inheritsLoose(subClass, superClass) {
  subClass.prototype = _core_js_object_create__WEBPACK_IMPORTED_MODULE_0___default()(superClass.prototype);
  subClass.prototype.constructor = subClass;
  subClass.__proto__ = superClass;
}

/***/ }),
/* 11 */
/*!***********************************!*\
  !*** ./dev/Stores/User/Folder.js ***!
  \***********************************/
/*! exports provided: default */
/*! exports used: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_sort__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/sort */ 417);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_sort__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_sort__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/map */ 18);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/find */ 12);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var ko__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ko */ 1);
/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! _ */ 3);
/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(___WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var Storage_Settings__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! Storage/Settings */ 5);
/* harmony import */ var Common_Enums__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! Common/Enums */ 0);
/* harmony import */ var Common_Consts__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! Common/Consts */ 25);
/* harmony import */ var Common_Utils__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! Common/Utils */ 2);
/* harmony import */ var Common_Cache__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! Common/Cache */ 14);
/* harmony import */ var Common_Momentor__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! Common/Momentor */ 60);












var FolderUserStore =
/*#__PURE__*/
function () {
  function FolderUserStore() {
    this.displaySpecSetting = ko__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"].observable(true);
    this.sentFolder = ko__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"].observable('');
    this.draftFolder = ko__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"].observable('');
    this.spamFolder = ko__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"].observable('');
    this.trashFolder = ko__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"].observable('');
    this.archiveFolder = ko__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"].observable('');
    this.namespace = '';
    this.folderList = ko__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"].observableArray([]);
    this.folderList.optimized = ko__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"].observable(false);
    this.folderList.error = ko__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"].observable('');
    this.foldersLoading = ko__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"].observable(false);
    this.foldersCreating = ko__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"].observable(false);
    this.foldersDeleting = ko__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"].observable(false);
    this.foldersRenaming = ko__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"].observable(false);
    this.foldersInboxUnreadCount = ko__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"].observable(0);
    this.currentFolder = ko__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"].observable(null).extend({
      toggleSubscribeProperty: [this, 'selected']
    });
    this.sieveAllowFileintoInbox = !!Object(Storage_Settings__WEBPACK_IMPORTED_MODULE_5__["settingsGet"])('SieveAllowFileintoInbox');
    this.computers();
    this.subscribers();
  }

  var _proto = FolderUserStore.prototype;

  _proto.computers = function computers() {
    var _this = this;

    this.draftFolderNotEnabled = ko__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"].computed(function () {
      return '' === _this.draftFolder() || Common_Consts__WEBPACK_IMPORTED_MODULE_7__[/* UNUSED_OPTION_VALUE */ "r"] === _this.draftFolder();
    });
    this.foldersListWithSingleInboxRootFolder = ko__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"].computed(function () {
      return !_babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_2___default()(___WEBPACK_IMPORTED_MODULE_4___default.a).call(___WEBPACK_IMPORTED_MODULE_4___default.a, _this.folderList(), function (folder) {
        return folder && !folder.isSystemFolder() && folder.visible();
      });
    });
    this.currentFolderFullNameRaw = ko__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"].computed(function () {
      return _this.currentFolder() ? _this.currentFolder().fullNameRaw : '';
    });
    this.currentFolderFullName = ko__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"].computed(function () {
      return _this.currentFolder() ? _this.currentFolder().fullName : '';
    });
    this.currentFolderFullNameHash = ko__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"].computed(function () {
      return _this.currentFolder() ? _this.currentFolder().fullNameHash : '';
    });
    this.foldersChanging = ko__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"].computed(function () {
      var loading = _this.foldersLoading(),
          creating = _this.foldersCreating(),
          deleting = _this.foldersDeleting(),
          renaming = _this.foldersRenaming();

      return loading || creating || deleting || renaming;
    });
    this.folderListSystemNames = ko__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"].computed(function () {
      var list = [Object(Common_Cache__WEBPACK_IMPORTED_MODULE_9__[/* getFolderInboxName */ "h"])()],
          folders = _this.folderList(),
          sentFolder = _this.sentFolder(),
          draftFolder = _this.draftFolder(),
          spamFolder = _this.spamFolder(),
          trashFolder = _this.trashFolder(),
          archiveFolder = _this.archiveFolder();

      if (Object(Common_Utils__WEBPACK_IMPORTED_MODULE_8__["isArray"])(folders) && 0 < folders.length) {
        if ('' !== sentFolder && Common_Consts__WEBPACK_IMPORTED_MODULE_7__[/* UNUSED_OPTION_VALUE */ "r"] !== sentFolder) {
          list.push(sentFolder);
        }

        if ('' !== draftFolder && Common_Consts__WEBPACK_IMPORTED_MODULE_7__[/* UNUSED_OPTION_VALUE */ "r"] !== draftFolder) {
          list.push(draftFolder);
        }

        if ('' !== spamFolder && Common_Consts__WEBPACK_IMPORTED_MODULE_7__[/* UNUSED_OPTION_VALUE */ "r"] !== spamFolder) {
          list.push(spamFolder);
        }

        if ('' !== trashFolder && Common_Consts__WEBPACK_IMPORTED_MODULE_7__[/* UNUSED_OPTION_VALUE */ "r"] !== trashFolder) {
          list.push(trashFolder);
        }

        if ('' !== archiveFolder && Common_Consts__WEBPACK_IMPORTED_MODULE_7__[/* UNUSED_OPTION_VALUE */ "r"] !== archiveFolder) {
          list.push(archiveFolder);
        }
      }

      return list;
    });
    this.folderListSystem = ko__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"].computed(function () {
      return ___WEBPACK_IMPORTED_MODULE_4___default.a.compact(_babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_1___default()(___WEBPACK_IMPORTED_MODULE_4___default.a).call(___WEBPACK_IMPORTED_MODULE_4___default.a, _this.folderListSystemNames(), function (name) {
        return Object(Common_Cache__WEBPACK_IMPORTED_MODULE_9__[/* getFolderFromCacheList */ "e"])(name);
      }));
    });
    this.folderMenuForMove = ko__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"].computed(function () {
      return Object(Common_Utils__WEBPACK_IMPORTED_MODULE_8__["folderListOptionsBuilder"])(_this.folderListSystem(), _this.folderList(), [_this.currentFolderFullNameRaw()], null, null, null, null, function (item) {
        return item ? item.localName() : '';
      });
    });
    this.folderMenuForFilters = ko__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"].computed(function () {
      return Object(Common_Utils__WEBPACK_IMPORTED_MODULE_8__["folderListOptionsBuilder"])(_this.folderListSystem(), _this.folderList(), [_this.sieveAllowFileintoInbox ? '' : 'INBOX'], [['', '']], null, null, null, function (item) {
        return item ? item.localName() : '';
      });
    });
  };

  _proto.subscribers = function subscribers() {
    var fRemoveSystemFolderType = function fRemoveSystemFolderType(observable) {
      return function () {
        var folder = Object(Common_Cache__WEBPACK_IMPORTED_MODULE_9__[/* getFolderFromCacheList */ "e"])(observable());

        if (folder) {
          folder.type(Common_Enums__WEBPACK_IMPORTED_MODULE_6__["FolderType"].User);
        }
      };
    };

    var fSetSystemFolderType = function fSetSystemFolderType(type) {
      return function (value) {
        var folder = Object(Common_Cache__WEBPACK_IMPORTED_MODULE_9__[/* getFolderFromCacheList */ "e"])(value);

        if (folder) {
          folder.type(type);
        }
      };
    };

    this.sentFolder.subscribe(fRemoveSystemFolderType(this.sentFolder), this, 'beforeChange');
    this.draftFolder.subscribe(fRemoveSystemFolderType(this.draftFolder), this, 'beforeChange');
    this.spamFolder.subscribe(fRemoveSystemFolderType(this.spamFolder), this, 'beforeChange');
    this.trashFolder.subscribe(fRemoveSystemFolderType(this.trashFolder), this, 'beforeChange');
    this.archiveFolder.subscribe(fRemoveSystemFolderType(this.archiveFolder), this, 'beforeChange');
    this.sentFolder.subscribe(fSetSystemFolderType(Common_Enums__WEBPACK_IMPORTED_MODULE_6__["FolderType"].SentItems), this);
    this.draftFolder.subscribe(fSetSystemFolderType(Common_Enums__WEBPACK_IMPORTED_MODULE_6__["FolderType"].Draft), this);
    this.spamFolder.subscribe(fSetSystemFolderType(Common_Enums__WEBPACK_IMPORTED_MODULE_6__["FolderType"].Spam), this);
    this.trashFolder.subscribe(fSetSystemFolderType(Common_Enums__WEBPACK_IMPORTED_MODULE_6__["FolderType"].Trash), this);
    this.archiveFolder.subscribe(fSetSystemFolderType(Common_Enums__WEBPACK_IMPORTED_MODULE_6__["FolderType"].Archive), this);
  }
  /**
   * @returns {Array}
   */
  ;

  _proto.getNextFolderNames = function getNextFolderNames() {
    var result = [],
        limit = 5,
        utc = Object(Common_Momentor__WEBPACK_IMPORTED_MODULE_10__["momentNowUnix"])(),
        timeout = utc - 60 * 5,
        timeouts = [],
        inboxFolderName = Object(Common_Cache__WEBPACK_IMPORTED_MODULE_9__[/* getFolderInboxName */ "h"])(),
        fSearchFunction = function fSearchFunction(list) {
      ___WEBPACK_IMPORTED_MODULE_4___default.a.each(list, function (folder) {
        if (folder && inboxFolderName !== folder.fullNameRaw && folder.selectable && folder.existen && timeout > folder.interval && (folder.isSystemFolder() || folder.subScribed() && folder.checkable())) {
          timeouts.push([folder.interval, folder.fullNameRaw]);
        }

        if (folder && 0 < folder.subFolders().length) {
          fSearchFunction(folder.subFolders());
        }
      });
    };

    fSearchFunction(this.folderList());

    _babel_runtime_corejs3_core_js_stable_instance_sort__WEBPACK_IMPORTED_MODULE_0___default()(timeouts).call(timeouts, function (a, b) {
      if (a[0] < b[0]) {
        return -1;
      } else if (a[0] > b[0]) {
        return 1;
      }

      return 0;
    });

    _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_2___default()(___WEBPACK_IMPORTED_MODULE_4___default.a).call(___WEBPACK_IMPORTED_MODULE_4___default.a, timeouts, function (aItem) {
      var folder = Object(Common_Cache__WEBPACK_IMPORTED_MODULE_9__[/* getFolderFromCacheList */ "e"])(aItem[1]);

      if (folder) {
        folder.interval = utc;
        result.push(aItem[1]);
      }

      return limit <= result.length;
    });

    return ___WEBPACK_IMPORTED_MODULE_4___default.a.uniq(result);
  };

  return FolderUserStore;
}();

/* harmony default export */ __webpack_exports__["a"] = (new FolderUserStore());

/***/ }),
/* 12 */
/*!*****************************************************************************!*\
  !*** ./node_modules/@babel/runtime-corejs3/core-js-stable/instance/find.js ***!
  \*****************************************************************************/
/*! no static exports found */
/*! exports used: default */
/***/ (function(module, exports, __webpack_require__) {

module.exports = __webpack_require__(/*! core-js-pure/stable/instance/find */ 319);

/***/ }),
/* 13 */
/*!************************************!*\
  !*** ./dev/Stores/User/Message.js ***!
  \************************************/
/*! exports provided: default */
/*! exports used: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var core_js_modules_es_array_join__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.array.join */ 74);
/* harmony import */ var core_js_modules_es_array_join__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_join__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var core_js_modules_es_object_to_string__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es.object.to-string */ 63);
/* harmony import */ var core_js_modules_es_object_to_string__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_to_string__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var core_js_modules_es_regexp_exec__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core-js/modules/es.regexp.exec */ 45);
/* harmony import */ var core_js_modules_es_regexp_exec__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_regexp_exec__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var core_js_modules_es_regexp_to_string__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! core-js/modules/es.regexp.to-string */ 111);
/* harmony import */ var core_js_modules_es_regexp_to_string__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_regexp_to_string__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var core_js_modules_es_string_replace__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! core-js/modules/es.string.replace */ 56);
/* harmony import */ var core_js_modules_es_string_replace__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_replace__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/map */ 18);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_5__);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/find */ 12);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_6__);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/filter */ 34);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_7__);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_bind__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/bind */ 26);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_bind__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_bind__WEBPACK_IMPORTED_MODULE_8__);
/* harmony import */ var window__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! window */ 4);
/* harmony import */ var window__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(window__WEBPACK_IMPORTED_MODULE_9__);
/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! _ */ 3);
/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(___WEBPACK_IMPORTED_MODULE_10__);
/* harmony import */ var ko__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ko */ 1);
/* harmony import */ var $__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! $ */ 8);
/* harmony import */ var $__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n($__WEBPACK_IMPORTED_MODULE_12__);
/* harmony import */ var Common_Enums__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! Common/Enums */ 0);
/* harmony import */ var Common_Utils__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! Common/Utils */ 2);
/* harmony import */ var Common_Cache__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! Common/Cache */ 14);
/* harmony import */ var Common_Consts__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! Common/Consts */ 25);
/* harmony import */ var Common_Globals__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! Common/Globals */ 6);
/* harmony import */ var Common_Links__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! Common/Links */ 15);
/* harmony import */ var Common_Translator__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! Common/Translator */ 9);
/* harmony import */ var Common_Momentor__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! Common/Momentor */ 60);
/* harmony import */ var Helper_Message__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! Helper/Message */ 62);
/* harmony import */ var Model_Message__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! Model/Message */ 278);
/* harmony import */ var Knoin_Knoin__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! Knoin/Knoin */ 7);
/* harmony import */ var Stores_User_App__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! Stores/User/App */ 31);
/* harmony import */ var Stores_User_Account__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! Stores/User/Account */ 46);
/* harmony import */ var Stores_User_Folder__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! Stores/User/Folder */ 11);
/* harmony import */ var Stores_User_Pgp__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! Stores/User/Pgp */ 41);
/* harmony import */ var Stores_User_Settings__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! Stores/User/Settings */ 38);
/* harmony import */ var Stores_User_Notification__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! Stores/User/Notification */ 115);
/* harmony import */ var Helper_Apps_User__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! Helper/Apps/User */ 22);
/* harmony import */ var Remote_User_Ajax__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! Remote/User/Ajax */ 16);

































var MessageUserStore =
/*#__PURE__*/
function () {
  function MessageUserStore() {
    this.staticMessage = new Model_Message__WEBPACK_IMPORTED_MODULE_22__[/* MessageModel */ "a"]();
    this.messageList = ko__WEBPACK_IMPORTED_MODULE_11__[/* default */ "a"].observableArray([]).extend({
      rateLimit: 0
    });
    this.messageListCount = ko__WEBPACK_IMPORTED_MODULE_11__[/* default */ "a"].observable(0);
    this.messageListSearch = ko__WEBPACK_IMPORTED_MODULE_11__[/* default */ "a"].observable('');
    this.messageListThreadUid = ko__WEBPACK_IMPORTED_MODULE_11__[/* default */ "a"].observable('');
    this.messageListPage = ko__WEBPACK_IMPORTED_MODULE_11__[/* default */ "a"].observable(1);
    this.messageListPageBeforeThread = ko__WEBPACK_IMPORTED_MODULE_11__[/* default */ "a"].observable(1);
    this.messageListError = ko__WEBPACK_IMPORTED_MODULE_11__[/* default */ "a"].observable('');
    this.messageListEndFolder = ko__WEBPACK_IMPORTED_MODULE_11__[/* default */ "a"].observable('');
    this.messageListEndSearch = ko__WEBPACK_IMPORTED_MODULE_11__[/* default */ "a"].observable('');
    this.messageListEndThreadUid = ko__WEBPACK_IMPORTED_MODULE_11__[/* default */ "a"].observable('');
    this.messageListEndPage = ko__WEBPACK_IMPORTED_MODULE_11__[/* default */ "a"].observable(1);
    this.messageListLoading = ko__WEBPACK_IMPORTED_MODULE_11__[/* default */ "a"].observable(false);
    this.messageListIsNotCompleted = ko__WEBPACK_IMPORTED_MODULE_11__[/* default */ "a"].observable(false);
    this.messageListCompleteLoadingThrottle = ko__WEBPACK_IMPORTED_MODULE_11__[/* default */ "a"].observable(false).extend({
      throttle: 200
    });
    this.messageListCompleteLoadingThrottleForAnimation = ko__WEBPACK_IMPORTED_MODULE_11__[/* default */ "a"].observable(false).extend({
      specialThrottle: 700
    });
    this.messageListDisableAutoSelect = ko__WEBPACK_IMPORTED_MODULE_11__[/* default */ "a"].observable(false).extend({
      falseTimeout: 500
    });
    this.selectorMessageSelected = ko__WEBPACK_IMPORTED_MODULE_11__[/* default */ "a"].observable(null);
    this.selectorMessageFocused = ko__WEBPACK_IMPORTED_MODULE_11__[/* default */ "a"].observable(null); // message viewer

    this.message = ko__WEBPACK_IMPORTED_MODULE_11__[/* default */ "a"].observable(null);
    this.message.viewTrigger = ko__WEBPACK_IMPORTED_MODULE_11__[/* default */ "a"].observable(false);
    this.messageError = ko__WEBPACK_IMPORTED_MODULE_11__[/* default */ "a"].observable('');
    this.messageCurrentLoading = ko__WEBPACK_IMPORTED_MODULE_11__[/* default */ "a"].observable(false);
    this.messageLoadingThrottle = ko__WEBPACK_IMPORTED_MODULE_11__[/* default */ "a"].observable(false).extend({
      throttle: Common_Enums__WEBPACK_IMPORTED_MODULE_13__["Magics"].Time50ms
    });
    this.messageFullScreenMode = ko__WEBPACK_IMPORTED_MODULE_11__[/* default */ "a"].observable(false);
    this.messagesBodiesDom = ko__WEBPACK_IMPORTED_MODULE_11__[/* default */ "a"].observable(null);
    this.messageActiveDom = ko__WEBPACK_IMPORTED_MODULE_11__[/* default */ "a"].observable(null);
    this.computers();
    this.subscribers();
    this.onMessageResponse = _babel_runtime_corejs3_core_js_stable_instance_bind__WEBPACK_IMPORTED_MODULE_8___default()(___WEBPACK_IMPORTED_MODULE_10___default.a).call(___WEBPACK_IMPORTED_MODULE_10___default.a, this.onMessageResponse, this);
    this.purgeMessageBodyCacheThrottle = ___WEBPACK_IMPORTED_MODULE_10___default.a.throttle(this.purgeMessageBodyCache, Common_Enums__WEBPACK_IMPORTED_MODULE_13__["Magics"].Time30s);
  }

  var _proto = MessageUserStore.prototype;

  _proto.computers = function computers() {
    var _this = this;

    this.messageLoading = ko__WEBPACK_IMPORTED_MODULE_11__[/* default */ "a"].computed(function () {
      return _this.messageCurrentLoading();
    });
    this.messageListEndHash = ko__WEBPACK_IMPORTED_MODULE_11__[/* default */ "a"].computed(function () {
      return _this.messageListEndFolder() + '|' + _this.messageListEndSearch() + '|' + _this.messageListEndThreadUid() + '|' + _this.messageListEndPage();
    });
    this.messageListPageCount = ko__WEBPACK_IMPORTED_MODULE_11__[/* default */ "a"].computed(function () {
      var page = window__WEBPACK_IMPORTED_MODULE_9___default.a.Math.ceil(_this.messageListCount() / Stores_User_Settings__WEBPACK_IMPORTED_MODULE_28__[/* default */ "a"].messagesPerPage());
      return 0 >= page ? 1 : page;
    });
    this.mainMessageListSearch = ko__WEBPACK_IMPORTED_MODULE_11__[/* default */ "a"].computed({
      read: this.messageListSearch,
      write: function write(value) {
        Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_23__["setHash"])(Object(Common_Links__WEBPACK_IMPORTED_MODULE_18__[/* mailBox */ "o"])(Stores_User_Folder__WEBPACK_IMPORTED_MODULE_26__[/* default */ "a"].currentFolderFullNameHash(), 1, Object(Common_Utils__WEBPACK_IMPORTED_MODULE_14__["trim"])(value.toString()), _this.messageListThreadUid()));
      }
    });
    this.messageListCompleteLoading = ko__WEBPACK_IMPORTED_MODULE_11__[/* default */ "a"].computed(function () {
      var one = _this.messageListLoading(),
          two = _this.messageListIsNotCompleted();

      return one || two;
    });
    this.isMessageSelected = ko__WEBPACK_IMPORTED_MODULE_11__[/* default */ "a"].computed(function () {
      return null !== _this.message();
    });
    this.messageListChecked = ko__WEBPACK_IMPORTED_MODULE_11__[/* default */ "a"].computed(function () {
      return _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_7___default()(___WEBPACK_IMPORTED_MODULE_10___default.a).call(___WEBPACK_IMPORTED_MODULE_10___default.a, _this.messageList(), function (item) {
        return item.checked();
      });
    }).extend({
      rateLimit: 0
    });
    this.hasCheckedMessages = ko__WEBPACK_IMPORTED_MODULE_11__[/* default */ "a"].computed(function () {
      return 0 < _this.messageListChecked().length;
    }).extend({
      rateLimit: 0
    });
    this.messageListCheckedOrSelected = ko__WEBPACK_IMPORTED_MODULE_11__[/* default */ "a"].computed(function () {
      var checked = _this.messageListChecked(),
          selectedMessage = _this.selectorMessageSelected(),
          focusedMessage = _this.selectorMessageFocused();

      if (checked.length) {
        return ___WEBPACK_IMPORTED_MODULE_10___default.a.union(checked, selectedMessage ? [selectedMessage] : []);
      } else if (selectedMessage) {
        return [selectedMessage];
      }

      return focusedMessage ? [focusedMessage] : [];
    });
    this.messageListCheckedOrSelectedUidsWithSubMails = ko__WEBPACK_IMPORTED_MODULE_11__[/* default */ "a"].computed(function () {
      var result = [];

      ___WEBPACK_IMPORTED_MODULE_10___default.a.each(_this.messageListCheckedOrSelected(), function (message) {
        if (message) {
          result.push(message.uid);

          if (1 < message.threadsLen()) {
            result = ___WEBPACK_IMPORTED_MODULE_10___default.a.union(result, message.threads());
          }
        }
      });

      return result;
    });
  };

  _proto.subscribers = function subscribers() {
    var _this2 = this;

    this.messageListCompleteLoading.subscribe(function (value) {
      value = !!value;

      _this2.messageListCompleteLoadingThrottle(value);

      _this2.messageListCompleteLoadingThrottleForAnimation(value);
    });
    this.messageList.subscribe(___WEBPACK_IMPORTED_MODULE_10___default.a.debounce(function (list) {
      ___WEBPACK_IMPORTED_MODULE_10___default.a.each(list, function (item) {
        if (item && item.newForAnimation()) {
          item.newForAnimation(false);
        }
      });
    }, Common_Enums__WEBPACK_IMPORTED_MODULE_13__["Magics"].Time500ms));
    this.message.subscribe(function (message) {
      if (message) {
        if (Common_Enums__WEBPACK_IMPORTED_MODULE_13__["Layout"].NoPreview === Stores_User_Settings__WEBPACK_IMPORTED_MODULE_28__[/* default */ "a"].layout()) {
          Stores_User_App__WEBPACK_IMPORTED_MODULE_24__[/* default */ "a"].focusedState(Common_Enums__WEBPACK_IMPORTED_MODULE_13__["Focused"].MessageView);
        }
      } else {
        Stores_User_App__WEBPACK_IMPORTED_MODULE_24__[/* default */ "a"].focusedState(Common_Enums__WEBPACK_IMPORTED_MODULE_13__["Focused"].MessageList);

        _this2.messageFullScreenMode(false);

        _this2.hideMessageBodies();
      }
    });
    this.messageLoading.subscribe(function (value) {
      _this2.messageLoadingThrottle(value);
    });
    this.messagesBodiesDom.subscribe(function (dom) {
      if (dom && !(dom instanceof $__WEBPACK_IMPORTED_MODULE_12___default.a)) {
        _this2.messagesBodiesDom($__WEBPACK_IMPORTED_MODULE_12___default()(dom));
      }
    });
    this.messageListEndFolder.subscribe(function (folder) {
      var message = _this2.message();

      if (message && folder && folder !== message.folderFullNameRaw) {
        _this2.message(null);
      }
    });
  };

  _proto.purgeMessageBodyCache = function purgeMessageBodyCache() {
    var count = 0;
    var end = Common_Globals__WEBPACK_IMPORTED_MODULE_17__["data"].iMessageBodyCacheCount - Common_Consts__WEBPACK_IMPORTED_MODULE_16__[/* MESSAGE_BODY_CACHE_LIMIT */ "k"];

    if (0 < end) {
      var messagesDom = this.messagesBodiesDom();

      if (messagesDom) {
        _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_6___default()(messagesDom).call(messagesDom, '.rl-cache-class').each(function () {
          var item = $__WEBPACK_IMPORTED_MODULE_12___default()(this); // eslint-disable-line no-invalid-this

          if (end > item.data('rl-cache-count')) {
            item.addClass('rl-cache-purge');
            count += 1;
          }
        });

        if (0 < count) {
          ___WEBPACK_IMPORTED_MODULE_10___default.a.delay(function () {
            return _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_6___default()(messagesDom).call(messagesDom, '.rl-cache-purge').remove();
          }, Common_Enums__WEBPACK_IMPORTED_MODULE_13__["Magics"].Time350ms);
        }
      }
    }
  };

  _proto.initUidNextAndNewMessages = function initUidNextAndNewMessages(folder, uidNext, newMessages) {
    if (Object(Common_Cache__WEBPACK_IMPORTED_MODULE_15__[/* getFolderInboxName */ "h"])() === folder && Object(Common_Utils__WEBPACK_IMPORTED_MODULE_14__["isNormal"])(uidNext) && '' !== uidNext) {
      if (Object(Common_Utils__WEBPACK_IMPORTED_MODULE_14__["isArray"])(newMessages) && 0 < newMessages.length) {
        ___WEBPACK_IMPORTED_MODULE_10___default.a.each(newMessages, function (item) {
          Object(Common_Cache__WEBPACK_IMPORTED_MODULE_15__[/* addNewMessageCache */ "a"])(folder, item.Uid);
        });

        Stores_User_Notification__WEBPACK_IMPORTED_MODULE_29__[/* default */ "a"].playSoundNotification();
        var len = newMessages.length;

        if (3 < len) {
          Stores_User_Notification__WEBPACK_IMPORTED_MODULE_29__[/* default */ "a"].displayDesktopNotification(Object(Common_Links__WEBPACK_IMPORTED_MODULE_18__[/* notificationMailIcon */ "r"])(), Stores_User_Account__WEBPACK_IMPORTED_MODULE_25__[/* default */ "a"].email(), Object(Common_Translator__WEBPACK_IMPORTED_MODULE_19__["i18n"])('MESSAGE_LIST/NEW_MESSAGE_NOTIFICATION', {
            'COUNT': len
          }), {
            'Folder': '',
            'Uid': ''
          });
        } else {
          ___WEBPACK_IMPORTED_MODULE_10___default.a.each(newMessages, function (item) {
            Stores_User_Notification__WEBPACK_IMPORTED_MODULE_29__[/* default */ "a"].displayDesktopNotification(Object(Common_Links__WEBPACK_IMPORTED_MODULE_18__[/* notificationMailIcon */ "r"])(), Helper_Message__WEBPACK_IMPORTED_MODULE_21__[/* emailArrayToString */ "b"](Helper_Message__WEBPACK_IMPORTED_MODULE_21__[/* emailArrayFromJson */ "a"](item.From), false), item.Subject, {
              'Folder': item.Folder,
              'Uid': item.Uid
            });
          });
        }
      }

      Object(Common_Cache__WEBPACK_IMPORTED_MODULE_15__[/* setFolderUidNext */ "s"])(folder, uidNext);
    }
  };

  _proto.hideMessageBodies = function hideMessageBodies() {
    var messagesDom = this.messagesBodiesDom();

    if (messagesDom) {
      _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_6___default()(messagesDom).call(messagesDom, '.b-text-part').hide();
    }
  }
  /**
   * @param {string} fromFolderFullNameRaw
   * @param {Array} uidForRemove
   * @param {string=} toFolderFullNameRaw = ''
   * @param {boolean=} copy = false
   */
  ;

  _proto.removeMessagesFromList = function removeMessagesFromList(fromFolderFullNameRaw, uidForRemove, toFolderFullNameRaw, copy) {
    var _this3 = this;

    if (toFolderFullNameRaw === void 0) {
      toFolderFullNameRaw = '';
    }

    if (copy === void 0) {
      copy = false;
    }

    uidForRemove = _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_5___default()(___WEBPACK_IMPORTED_MODULE_10___default.a).call(___WEBPACK_IMPORTED_MODULE_10___default.a, uidForRemove, function (mValue) {
      return Object(Common_Utils__WEBPACK_IMPORTED_MODULE_14__["pInt"])(mValue);
    });
    var unseenCount = 0,
        messageList = this.messageList(),
        currentMessage = this.message();
    var trashFolder = Stores_User_Folder__WEBPACK_IMPORTED_MODULE_26__[/* default */ "a"].trashFolder(),
        spamFolder = Stores_User_Folder__WEBPACK_IMPORTED_MODULE_26__[/* default */ "a"].spamFolder(),
        fromFolder = Object(Common_Cache__WEBPACK_IMPORTED_MODULE_15__[/* getFolderFromCacheList */ "e"])(fromFolderFullNameRaw),
        toFolder = '' === toFolderFullNameRaw ? null : Object(Common_Cache__WEBPACK_IMPORTED_MODULE_15__[/* getFolderFromCacheList */ "e"])(toFolderFullNameRaw || ''),
        currentFolderFullNameRaw = Stores_User_Folder__WEBPACK_IMPORTED_MODULE_26__[/* default */ "a"].currentFolderFullNameRaw(),
        messages = currentFolderFullNameRaw === fromFolderFullNameRaw ? _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_7___default()(___WEBPACK_IMPORTED_MODULE_10___default.a).call(___WEBPACK_IMPORTED_MODULE_10___default.a, messageList, function (item) {
      return item && -1 < Object(Common_Utils__WEBPACK_IMPORTED_MODULE_14__["inArray"])(Object(Common_Utils__WEBPACK_IMPORTED_MODULE_14__["pInt"])(item.uid), uidForRemove);
    }) : [];

    ___WEBPACK_IMPORTED_MODULE_10___default.a.each(messages, function (item) {
      if (item && item.unseen()) {
        unseenCount += 1;
      }
    });

    if (fromFolder && !copy) {
      fromFolder.messageCountAll(0 <= fromFolder.messageCountAll() - uidForRemove.length ? fromFolder.messageCountAll() - uidForRemove.length : 0);

      if (0 < unseenCount) {
        fromFolder.messageCountUnread(0 <= fromFolder.messageCountUnread() - unseenCount ? fromFolder.messageCountUnread() - unseenCount : 0);
      }
    }

    if (toFolder) {
      if (trashFolder === toFolder.fullNameRaw || spamFolder === toFolder.fullNameRaw) {
        unseenCount = 0;
      }

      toFolder.messageCountAll(toFolder.messageCountAll() + uidForRemove.length);

      if (0 < unseenCount) {
        toFolder.messageCountUnread(toFolder.messageCountUnread() + unseenCount);
      }

      toFolder.actionBlink(true);
    }

    if (0 < messages.length) {
      if (copy) {
        ___WEBPACK_IMPORTED_MODULE_10___default.a.each(messages, function (item) {
          item.checked(false);
        });
      } else {
        this.messageListIsNotCompleted(true);

        ___WEBPACK_IMPORTED_MODULE_10___default.a.each(messages, function (item) {
          if (currentMessage && currentMessage.hash === item.hash) {
            currentMessage = null;

            _this3.message(null);
          }

          item.deleted(true);
        });

        ___WEBPACK_IMPORTED_MODULE_10___default.a.delay(function () {
          ___WEBPACK_IMPORTED_MODULE_10___default.a.each(messages, function (item) {
            _this3.messageList.remove(item);
          });
        }, Common_Enums__WEBPACK_IMPORTED_MODULE_13__["Magics"].Time350ms);
      }
    }

    if ('' !== fromFolderFullNameRaw) {
      Object(Common_Cache__WEBPACK_IMPORTED_MODULE_15__[/* setFolderHash */ "q"])(fromFolderFullNameRaw, '');
    }

    if ('' !== toFolderFullNameRaw) {
      Object(Common_Cache__WEBPACK_IMPORTED_MODULE_15__[/* setFolderHash */ "q"])(toFolderFullNameRaw, '');
    }

    if ('' !== this.messageListThreadUid()) {
      messageList = this.messageList();

      if (messageList && 0 < messageList.length && !!_babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_6___default()(___WEBPACK_IMPORTED_MODULE_10___default.a).call(___WEBPACK_IMPORTED_MODULE_10___default.a, messageList, function (item) {
        return !!(item && item.deleted() && item.uid === _this3.messageListThreadUid());
      })) {
        var message = _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_6___default()(___WEBPACK_IMPORTED_MODULE_10___default.a).call(___WEBPACK_IMPORTED_MODULE_10___default.a, messageList, function (item) {
          return item && !item.deleted();
        });

        if (message && this.messageListThreadUid() !== Object(Common_Utils__WEBPACK_IMPORTED_MODULE_14__["pString"])(message.uid)) {
          this.messageListThreadUid(Object(Common_Utils__WEBPACK_IMPORTED_MODULE_14__["pString"])(message.uid));
          Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_23__["setHash"])(Object(Common_Links__WEBPACK_IMPORTED_MODULE_18__[/* mailBox */ "o"])(Stores_User_Folder__WEBPACK_IMPORTED_MODULE_26__[/* default */ "a"].currentFolderFullNameHash(), this.messageListPage(), this.messageListSearch(), this.messageListThreadUid()), true, true);
        } else if (!message) {
          if (1 < this.messageListPage()) {
            this.messageListPage(this.messageListPage() - 1);
            Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_23__["setHash"])(Object(Common_Links__WEBPACK_IMPORTED_MODULE_18__[/* mailBox */ "o"])(Stores_User_Folder__WEBPACK_IMPORTED_MODULE_26__[/* default */ "a"].currentFolderFullNameHash(), this.messageListPage(), this.messageListSearch(), this.messageListThreadUid()), true, true);
          } else {
            this.messageListThreadUid('');
            Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_23__["setHash"])(Object(Common_Links__WEBPACK_IMPORTED_MODULE_18__[/* mailBox */ "o"])(Stores_User_Folder__WEBPACK_IMPORTED_MODULE_26__[/* default */ "a"].currentFolderFullNameHash(), this.messageListPageBeforeThread(), this.messageListSearch()), true, true);
          }
        }
      }
    }
  }
  /**
   * @param {Object} messageTextBody
   */
  ;

  _proto.initBlockquoteSwitcher = function initBlockquoteSwitcher(messageTextBody) {
    if (messageTextBody) {
      var _context;

      var $oList = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_7___default()(_context = $__WEBPACK_IMPORTED_MODULE_12___default()('blockquote:not(.rl-bq-switcher)', messageTextBody)).call(_context, function () {
        return 0 === $__WEBPACK_IMPORTED_MODULE_12___default()(this).parent().closest('blockquote', messageTextBody).length; // eslint-disable-line no-invalid-this
      });

      if ($oList && 0 < $oList.length) {
        $oList.each(function () {
          var $this = $__WEBPACK_IMPORTED_MODULE_12___default()(this); // eslint-disable-line no-invalid-this

          var h = $this.height();

          if (0 === h) {
            h = Object(Common_Utils__WEBPACK_IMPORTED_MODULE_14__["getRealHeight"])($this);
          }

          if ('' !== Object(Common_Utils__WEBPACK_IMPORTED_MODULE_14__["trim"])($this.text()) && (0 === h || 100 < h)) {
            $this.addClass('rl-bq-switcher hidden-bq');
            $__WEBPACK_IMPORTED_MODULE_12___default()('<span class="rlBlockquoteSwitcher"><i class="icon-ellipsis" /></span>').insertBefore($this).on('click.rlBlockquoteSwitcher', function () {
              $this.toggleClass('hidden-bq');
              Object(Common_Utils__WEBPACK_IMPORTED_MODULE_14__["windowResize"])();
            }).after('<br />').before('<br />');
          }
        });
      }
    }
  }
  /**
   * @param {Object} messageTextBody
   * @param {Object} message
   */
  ;

  _proto.initOpenPgpControls = function initOpenPgpControls(messageTextBody, message) {
    if (messageTextBody && _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_6___default()(messageTextBody)) {
      _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_6___default()(messageTextBody).call(messageTextBody, '.b-plain-openpgp:not(.inited)').each(function () {
        Stores_User_Pgp__WEBPACK_IMPORTED_MODULE_27__[/* default */ "a"].initMessageBodyControls($__WEBPACK_IMPORTED_MODULE_12___default()(this), message); // eslint-disable-line no-invalid-this
      });
    }
  };

  _proto.setMessage = function setMessage(data, cached) {
    var isNew = false,
        body = null,
        id = '',
        plain = '',
        resultHtml = '',
        pgpSigned = false,
        messagesDom = this.messagesBodiesDom(),
        selectedMessage = this.selectorMessageSelected(),
        message = this.message();

    if (data && message && data.Result && 'Object/Message' === data.Result['@Object'] && message.folderFullNameRaw === data.Result.Folder) {
      var threads = message.threads();

      if (message.uid !== data.Result.Uid && 1 < threads.length && -1 < Object(Common_Utils__WEBPACK_IMPORTED_MODULE_14__["inArray"])(data.Result.Uid, threads)) {
        message = Model_Message__WEBPACK_IMPORTED_MODULE_22__[/* MessageModel */ "a"].newInstanceFromJson(data.Result);

        if (message) {
          message.threads(threads);
          Object(Common_Cache__WEBPACK_IMPORTED_MODULE_15__[/* initMessageFlagsFromCache */ "n"])(message);
          this.message(this.staticMessage.populateByMessageListItem(message));
          message = this.message();
          isNew = true;
        }
      }

      if (message && message.uid === data.Result.Uid) {
        this.messageError('');
        message.initUpdateByMessageJson(data.Result);
        Object(Common_Cache__WEBPACK_IMPORTED_MODULE_15__[/* addRequestedMessage */ "b"])(message.folderFullNameRaw, message.uid);

        if (!cached) {
          message.initFlagsByJson(data.Result);
        }

        messagesDom = messagesDom && messagesDom[0] ? messagesDom : null;

        if (messagesDom) {
          id = 'rl-mgs-' + message.hash.replace(/[^a-zA-Z0-9]/g, '');

          var textBody = _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_6___default()(messagesDom).call(messagesDom, '#' + id);

          if (!textBody || !textBody[0]) {
            var isHtml = false;

            if (Object(Common_Utils__WEBPACK_IMPORTED_MODULE_14__["isNormal"])(data.Result.Html) && '' !== data.Result.Html) {
              isHtml = true;
              resultHtml = data.Result.Html.toString();
            } else if (Object(Common_Utils__WEBPACK_IMPORTED_MODULE_14__["isNormal"])(data.Result.Plain) && '' !== data.Result.Plain) {
              isHtml = false;
              resultHtml = Object(Common_Utils__WEBPACK_IMPORTED_MODULE_14__["plainToHtml"])(data.Result.Plain.toString(), false);

              if ((message.isPgpSigned() || message.isPgpEncrypted()) && Stores_User_Pgp__WEBPACK_IMPORTED_MODULE_27__[/* default */ "a"].capaOpenPGP()) {
                plain = Object(Common_Utils__WEBPACK_IMPORTED_MODULE_14__["pString"])(data.Result.Plain);
                var isPgpEncrypted = /---BEGIN PGP MESSAGE---/.test(plain);

                if (!isPgpEncrypted) {
                  pgpSigned = /-----BEGIN PGP SIGNED MESSAGE-----/.test(plain) && /-----BEGIN PGP SIGNATURE-----/.test(plain);
                }

                Common_Globals__WEBPACK_IMPORTED_MODULE_17__["$div"].empty();

                if (pgpSigned && message.isPgpSigned()) {
                  resultHtml = Common_Globals__WEBPACK_IMPORTED_MODULE_17__["$div"].append($__WEBPACK_IMPORTED_MODULE_12___default()('<pre class="b-plain-openpgp signed"></pre>').text(plain)).html();
                } else if (isPgpEncrypted && message.isPgpEncrypted()) {
                  resultHtml = Common_Globals__WEBPACK_IMPORTED_MODULE_17__["$div"].append($__WEBPACK_IMPORTED_MODULE_12___default()('<pre class="b-plain-openpgp encrypted"></pre>').text(plain)).html();
                } else {
                  resultHtml = '<pre>' + resultHtml + '</pre>';
                }

                Common_Globals__WEBPACK_IMPORTED_MODULE_17__["$div"].empty();
                message.isPgpSigned(pgpSigned);
                message.isPgpEncrypted(isPgpEncrypted);
              } else {
                resultHtml = '<pre>' + resultHtml + '</pre>';
              }
            } else {
              isHtml = false;
              resultHtml = '<pre>' + resultHtml + '</pre>';
            }

            Common_Globals__WEBPACK_IMPORTED_MODULE_17__["data"].iMessageBodyCacheCount += 1;
            body = $__WEBPACK_IMPORTED_MODULE_12___default()('<div id="' + id + '" ></div>').hide().addClass('rl-cache-class');
            body.data('rl-cache-count', Common_Globals__WEBPACK_IMPORTED_MODULE_17__["data"].iMessageBodyCacheCount);
            body.html(Object(Common_Utils__WEBPACK_IMPORTED_MODULE_14__["findEmailAndLinks"])(resultHtml)).addClass('b-text-part ' + (isHtml ? 'html' : 'plain'));
            message.isHtml(!!isHtml);
            message.hasImages(!!data.Result.HasExternals);
            message.body = body;

            if (message.body) {
              messagesDom.append(message.body);
            }

            message.storeDataInDom();

            if (data.Result.HasInternals) {
              message.showInternalImages(true);
            }

            if (message.hasImages() && Stores_User_Settings__WEBPACK_IMPORTED_MODULE_28__[/* default */ "a"].showImages()) {
              message.showExternalImages(true);
            }

            this.purgeMessageBodyCacheThrottle();
          } else {
            message.body = textBody;

            if (message.body) {
              Common_Globals__WEBPACK_IMPORTED_MODULE_17__["data"].iMessageBodyCacheCount += 1;
              message.body.data('rl-cache-count', Common_Globals__WEBPACK_IMPORTED_MODULE_17__["data"].iMessageBodyCacheCount);
              message.fetchDataFromDom();
            }
          }

          this.messageActiveDom(message.body);
          this.hideMessageBodies();

          if (body) {
            this.initOpenPgpControls(body, message);
            this.initBlockquoteSwitcher(body);
          }

          message.body.show();
        }

        Object(Common_Cache__WEBPACK_IMPORTED_MODULE_15__[/* initMessageFlagsFromCache */ "n"])(message);

        if (message.unseen() || message.hasUnseenSubMessage()) {
          Object(Helper_Apps_User__WEBPACK_IMPORTED_MODULE_30__[/* getApp */ "a"])().messageListAction(message.folderFullNameRaw, Common_Enums__WEBPACK_IMPORTED_MODULE_13__["MessageSetAction"].SetSeen, [message]);
        }

        if (isNew) {
          message = this.message();

          if (selectedMessage && message && (message.folderFullNameRaw !== selectedMessage.folderFullNameRaw || message.uid !== selectedMessage.uid)) {
            this.selectorMessageSelected(null);

            if (1 === this.messageList().length) {
              this.selectorMessageFocused(null);
            }
          } else if (!selectedMessage && message) {
            selectedMessage = _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_6___default()(___WEBPACK_IMPORTED_MODULE_10___default.a).call(___WEBPACK_IMPORTED_MODULE_10___default.a, this.messageList(), function (subMessage) {
              return subMessage && subMessage.folderFullNameRaw === message.folderFullNameRaw && subMessage.uid === message.uid;
            });

            if (selectedMessage) {
              this.selectorMessageSelected(selectedMessage);
              this.selectorMessageFocused(selectedMessage);
            }
          }
        }

        Object(Common_Utils__WEBPACK_IMPORTED_MODULE_14__["windowResize"])();
      }
    }
  };

  _proto.selectMessage = function selectMessage(oMessage) {
    if (oMessage) {
      this.message(this.staticMessage.populateByMessageListItem(oMessage));
      this.populateMessageBody(this.message());
    } else {
      this.message(null);
    }
  };

  _proto.selectMessageByFolderAndUid = function selectMessageByFolderAndUid(sFolder, sUid) {
    if (sFolder && sUid) {
      this.message(this.staticMessage.populateByMessageListItem(null));
      this.message().folderFullNameRaw = sFolder;
      this.message().uid = sUid;
      this.populateMessageBody(this.message());
    } else {
      this.message(null);
    }
  };

  _proto.populateMessageBody = function populateMessageBody(oMessage) {
    if (oMessage) {
      if (Remote_User_Ajax__WEBPACK_IMPORTED_MODULE_31__[/* default */ "a"].message(this.onMessageResponse, oMessage.folderFullNameRaw, oMessage.uid)) {
        this.messageCurrentLoading(true);
      }
    }
  }
  /**
   * @param {string} sResult
   * @param {AjaxJsonDefaultResponse} oData
   * @param {boolean} bCached
   */
  ;

  _proto.onMessageResponse = function onMessageResponse(sResult, oData, bCached) {
    this.hideMessageBodies();
    this.messageCurrentLoading(false);

    if (Common_Enums__WEBPACK_IMPORTED_MODULE_13__["StorageResultType"].Success === sResult && oData && oData.Result) {
      this.setMessage(oData, bCached);
    } else if (Common_Enums__WEBPACK_IMPORTED_MODULE_13__["StorageResultType"].Unload === sResult) {
      this.message(null);
      this.messageError('');
    } else if (Common_Enums__WEBPACK_IMPORTED_MODULE_13__["StorageResultType"].Abort !== sResult) {
      this.message(null);
      this.messageError(oData && oData.ErrorCode ? Object(Common_Translator__WEBPACK_IMPORTED_MODULE_19__["getNotification"])(oData.ErrorCode) : Object(Common_Translator__WEBPACK_IMPORTED_MODULE_19__["getNotification"])(Common_Enums__WEBPACK_IMPORTED_MODULE_13__["Notification"].UnknownError));
    }
  }
  /**
   * @param {Array} list
   * @returns {string}
   */
  ;

  _proto.calculateMessageListHash = function calculateMessageListHash(list) {
    return _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_5___default()(___WEBPACK_IMPORTED_MODULE_10___default.a).call(___WEBPACK_IMPORTED_MODULE_10___default.a, list, function (message) {
      return '' + message.hash + '_' + message.threadsLen() + '_' + message.flagHash();
    }).join('|');
  };

  _proto.setMessageList = function setMessageList(data, cached) {
    if (data && data.Result && 'Collection/MessageCollection' === data.Result['@Object'] && data.Result['@Collection'] && Object(Common_Utils__WEBPACK_IMPORTED_MODULE_14__["isArray"])(data.Result['@Collection'])) {
      var newCount = 0,
          unreadCountChange = false;
      var list = [],
          utc = Object(Common_Momentor__WEBPACK_IMPORTED_MODULE_20__["momentNowUnix"])(),
          iCount = Object(Common_Utils__WEBPACK_IMPORTED_MODULE_14__["pInt"])(data.Result.MessageResultCount),
          iOffset = Object(Common_Utils__WEBPACK_IMPORTED_MODULE_14__["pInt"])(data.Result.Offset);
      var folder = Object(Common_Cache__WEBPACK_IMPORTED_MODULE_15__[/* getFolderFromCacheList */ "e"])(Object(Common_Utils__WEBPACK_IMPORTED_MODULE_14__["isNormal"])(data.Result.Folder) ? data.Result.Folder : '');

      if (folder && !cached) {
        folder.interval = utc;
        Object(Common_Cache__WEBPACK_IMPORTED_MODULE_15__[/* setFolderHash */ "q"])(data.Result.Folder, data.Result.FolderHash);

        if (Object(Common_Utils__WEBPACK_IMPORTED_MODULE_14__["isNormal"])(data.Result.MessageCount)) {
          folder.messageCountAll(data.Result.MessageCount);
        }

        if (Object(Common_Utils__WEBPACK_IMPORTED_MODULE_14__["isNormal"])(data.Result.MessageUnseenCount)) {
          if (Object(Common_Utils__WEBPACK_IMPORTED_MODULE_14__["pInt"])(folder.messageCountUnread()) !== Object(Common_Utils__WEBPACK_IMPORTED_MODULE_14__["pInt"])(data.Result.MessageUnseenCount)) {
            unreadCountChange = true;
          }

          folder.messageCountUnread(data.Result.MessageUnseenCount);
        }

        this.initUidNextAndNewMessages(folder.fullNameRaw, data.Result.UidNext, data.Result.NewMessages);
      }

      if (unreadCountChange && folder) {
        Object(Common_Cache__WEBPACK_IMPORTED_MODULE_15__[/* clearMessageFlagsFromCacheByFolder */ "c"])(folder.fullNameRaw);
      }

      ___WEBPACK_IMPORTED_MODULE_10___default.a.each(data.Result['@Collection'], function (jsonMessage) {
        if (jsonMessage && 'Object/Message' === jsonMessage['@Object']) {
          var message = Model_Message__WEBPACK_IMPORTED_MODULE_22__[/* MessageModel */ "a"].newInstanceFromJson(jsonMessage);

          if (message) {
            if (Object(Common_Cache__WEBPACK_IMPORTED_MODULE_15__[/* hasNewMessageAndRemoveFromCache */ "l"])(message.folderFullNameRaw, message.uid) && 5 >= newCount) {
              newCount += 1;
              message.newForAnimation(true);
            }

            message.deleted(false);

            if (cached) {
              Object(Common_Cache__WEBPACK_IMPORTED_MODULE_15__[/* initMessageFlagsFromCache */ "n"])(message);
            } else {
              Object(Common_Cache__WEBPACK_IMPORTED_MODULE_15__[/* storeMessageFlagsToCache */ "u"])(message);
            }

            list.push(message);
          }
        }
      });

      this.messageListCount(iCount);
      this.messageListSearch(Object(Common_Utils__WEBPACK_IMPORTED_MODULE_14__["isNormal"])(data.Result.Search) ? data.Result.Search : '');
      this.messageListPage(window__WEBPACK_IMPORTED_MODULE_9___default.a.Math.ceil(iOffset / Stores_User_Settings__WEBPACK_IMPORTED_MODULE_28__[/* default */ "a"].messagesPerPage() + 1));
      this.messageListThreadUid(Object(Common_Utils__WEBPACK_IMPORTED_MODULE_14__["isNormal"])(data.Result.ThreadUid) ? Object(Common_Utils__WEBPACK_IMPORTED_MODULE_14__["pString"])(data.Result.ThreadUid) : '');
      this.messageListEndFolder(Object(Common_Utils__WEBPACK_IMPORTED_MODULE_14__["isNormal"])(data.Result.Folder) ? data.Result.Folder : '');
      this.messageListEndSearch(this.messageListSearch());
      this.messageListEndThreadUid(this.messageListThreadUid());
      this.messageListEndPage(this.messageListPage());
      this.messageListDisableAutoSelect(true);
      this.messageList(list);
      this.messageListIsNotCompleted(false);
      Object(Common_Cache__WEBPACK_IMPORTED_MODULE_15__[/* clearNewMessageCache */ "d"])();

      if (folder && (cached || unreadCountChange || Stores_User_Settings__WEBPACK_IMPORTED_MODULE_28__[/* default */ "a"].useThreads())) {
        Object(Helper_Apps_User__WEBPACK_IMPORTED_MODULE_30__[/* getApp */ "a"])().folderInformation(folder.fullNameRaw, list);
      }
    } else {
      this.messageListCount(0);
      this.messageList([]);
      this.messageListError(Object(Common_Translator__WEBPACK_IMPORTED_MODULE_19__["getNotification"])(data && data.ErrorCode ? data.ErrorCode : Common_Enums__WEBPACK_IMPORTED_MODULE_13__["Notification"].CantGetMessageList));
    }
  };

  return MessageUserStore;
}();

/* harmony default export */ __webpack_exports__["a"] = (new MessageUserStore());

/***/ }),
/* 14 */
/*!*****************************!*\
  !*** ./dev/Common/Cache.js ***!
  \*****************************/
/*! exports provided: clear, getUserPic, getMessageKey, addRequestedMessage, hasRequestedMessage, addNewMessageCache, hasNewMessageAndRemoveFromCache, clearNewMessageCache, getFolderInboxName, getFolderFullNameRaw, setFolderFullNameRaw, getFolderHash, setFolderHash, getFolderUidNext, setFolderUidNext, getFolderFromCacheList, setFolderToCacheList, removeFolderFromCacheList, getMessageFlagsFromCache, setMessageFlagsToCache, clearMessageFlagsFromCacheByFolder, initMessageFlagsFromCache, storeMessageFlagsToCache, storeMessageFlagsToCacheByFolderAndUid, storeMessageFlagsToCacheBySetAction */
/*! exports used: addNewMessageCache, addRequestedMessage, clearMessageFlagsFromCacheByFolder, clearNewMessageCache, getFolderFromCacheList, getFolderFullNameRaw, getFolderHash, getFolderInboxName, getFolderUidNext, getMessageFlagsFromCache, getUserPic, hasNewMessageAndRemoveFromCache, hasRequestedMessage, initMessageFlagsFromCache, removeFolderFromCacheList, setFolderFullNameRaw, setFolderHash, setFolderToCacheList, setFolderUidNext, setMessageFlagsToCache, storeMessageFlagsToCache, storeMessageFlagsToCacheByFolderAndUid, storeMessageFlagsToCacheBySetAction */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* unused harmony export clear */
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "k", function() { return getUserPic; });
/* unused harmony export getMessageKey */
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return addRequestedMessage; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "m", function() { return hasRequestedMessage; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return addNewMessageCache; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "l", function() { return hasNewMessageAndRemoveFromCache; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return clearNewMessageCache; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return getFolderInboxName; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return getFolderFullNameRaw; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "p", function() { return setFolderFullNameRaw; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return getFolderHash; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "q", function() { return setFolderHash; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return getFolderUidNext; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "s", function() { return setFolderUidNext; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return getFolderFromCacheList; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "r", function() { return setFolderToCacheList; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "o", function() { return removeFolderFromCacheList; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "j", function() { return getMessageFlagsFromCache; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "t", function() { return setMessageFlagsToCache; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return clearMessageFlagsFromCacheByFolder; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "n", function() { return initMessageFlagsFromCache; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "u", function() { return storeMessageFlagsToCache; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "v", function() { return storeMessageFlagsToCacheByFolderAndUid; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "w", function() { return storeMessageFlagsToCacheBySetAction; });
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/find */ 12);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! _ */ 3);
/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(___WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var Common_Enums__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! Common/Enums */ 0);
/* harmony import */ var Common_Utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! Common/Utils */ 2);
/* harmony import */ var Common_Links__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! Common/Links */ 15);
/* harmony import */ var Storage_Settings__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! Storage/Settings */ 5);






var FOLDERS_CACHE = {},
    FOLDERS_NAME_CACHE = {},
    FOLDERS_HASH_CACHE = {},
    FOLDERS_UID_NEXT_CACHE = {},
    MESSAGE_FLAGS_CACHE = {},
    NEW_MESSAGE_CACHE = {},
    inboxFolderName = '';
var REQUESTED_MESSAGE_CACHE = {},
    capaGravatar = Storage_Settings__WEBPACK_IMPORTED_MODULE_5__["capa"](Common_Enums__WEBPACK_IMPORTED_MODULE_2__["Capa"].Gravatar);
/**
 * @returns {void}
 */

function clear() {
  FOLDERS_CACHE = {};
  FOLDERS_NAME_CACHE = {};
  FOLDERS_HASH_CACHE = {};
  FOLDERS_UID_NEXT_CACHE = {};
  MESSAGE_FLAGS_CACHE = {};
}
/**
 * @param {string} email
 * @param {Function} callback
 * @returns {string}
 */

function getUserPic(email, callback) {
  email = Object(Common_Utils__WEBPACK_IMPORTED_MODULE_3__["trim"])(email);
  callback(capaGravatar && '' !== email ? Common_Links__WEBPACK_IMPORTED_MODULE_4__[/* avatarLink */ "h"](email) : '', email);
}
/**
 * @param {string} folderFullNameRaw
 * @param {string} uid
 * @returns {string}
 */

function getMessageKey(folderFullNameRaw, uid) {
  return folderFullNameRaw + "#" + uid;
}
/**
 * @param {string} folder
 * @param {string} uid
 */

function addRequestedMessage(folder, uid) {
  REQUESTED_MESSAGE_CACHE[getMessageKey(folder, uid)] = true;
}
/**
 * @param {string} folder
 * @param {string} uid
 * @returns {boolean}
 */

function hasRequestedMessage(folder, uid) {
  return true === REQUESTED_MESSAGE_CACHE[getMessageKey(folder, uid)];
}
/**
 * @param {string} folderFullNameRaw
 * @param {string} uid
 */

function addNewMessageCache(folderFullNameRaw, uid) {
  NEW_MESSAGE_CACHE[getMessageKey(folderFullNameRaw, uid)] = true;
}
/**
 * @param {string} folderFullNameRaw
 * @param {string} uid
 */

function hasNewMessageAndRemoveFromCache(folderFullNameRaw, uid) {
  if (NEW_MESSAGE_CACHE[getMessageKey(folderFullNameRaw, uid)]) {
    NEW_MESSAGE_CACHE[getMessageKey(folderFullNameRaw, uid)] = null;
    return true;
  }

  return false;
}
/**
 * @returns {void}
 */

function clearNewMessageCache() {
  NEW_MESSAGE_CACHE = {};
}
/**
 * @returns {string}
 */

function getFolderInboxName() {
  return '' === inboxFolderName ? 'INBOX' : inboxFolderName;
}
/**
 * @param {string} folderHash
 * @returns {string}
 */

function getFolderFullNameRaw(folderHash) {
  return '' !== folderHash && FOLDERS_NAME_CACHE[folderHash] ? FOLDERS_NAME_CACHE[folderHash] : '';
}
/**
 * @param {string} folderHash
 * @param {string} folderFullNameRaw
 */

function setFolderFullNameRaw(folderHash, folderFullNameRaw) {
  FOLDERS_NAME_CACHE[folderHash] = folderFullNameRaw;

  if ('INBOX' === folderFullNameRaw || '' === inboxFolderName) {
    inboxFolderName = folderFullNameRaw;
  }
}
/**
 * @param {string} folderFullNameRaw
 * @returns {string}
 */

function getFolderHash(folderFullNameRaw) {
  return '' !== folderFullNameRaw && FOLDERS_HASH_CACHE[folderFullNameRaw] ? FOLDERS_HASH_CACHE[folderFullNameRaw] : '';
}
/**
 * @param {string} folderFullNameRaw
 * @param {string} folderHash
 */

function setFolderHash(folderFullNameRaw, folderHash) {
  if ('' !== folderFullNameRaw) {
    FOLDERS_HASH_CACHE[folderFullNameRaw] = folderHash;
  }
}
/**
 * @param {string} folderFullNameRaw
 * @returns {string}
 */

function getFolderUidNext(folderFullNameRaw) {
  return '' !== folderFullNameRaw && FOLDERS_UID_NEXT_CACHE[folderFullNameRaw] ? FOLDERS_UID_NEXT_CACHE[folderFullNameRaw] : '';
}
/**
 * @param {string} folderFullNameRaw
 * @param {string} uidNext
 */

function setFolderUidNext(folderFullNameRaw, uidNext) {
  FOLDERS_UID_NEXT_CACHE[folderFullNameRaw] = uidNext;
}
/**
 * @param {string} folderFullNameRaw
 * @returns {?FolderModel}
 */

function getFolderFromCacheList(folderFullNameRaw) {
  return '' !== folderFullNameRaw && FOLDERS_CACHE[folderFullNameRaw] ? FOLDERS_CACHE[folderFullNameRaw] : null;
}
/**
 * @param {string} folderFullNameRaw
 * @param {?FolderModel} folder
 */

function setFolderToCacheList(folderFullNameRaw, folder) {
  FOLDERS_CACHE[folderFullNameRaw] = folder;
}
/**
 * @param {string} folderFullNameRaw
 */

function removeFolderFromCacheList(folderFullNameRaw) {
  setFolderToCacheList(folderFullNameRaw, null);
}
/**
 * @param {string} folderFullName
 * @param {string} uid
 * @returns {?Array}
 */

function getMessageFlagsFromCache(folderFullName, uid) {
  return MESSAGE_FLAGS_CACHE[folderFullName] && MESSAGE_FLAGS_CACHE[folderFullName][uid] ? MESSAGE_FLAGS_CACHE[folderFullName][uid] : null;
}
/**
 * @param {string} folderFullName
 * @param {string} uid
 * @param {Array} flagsCache
 */

function setMessageFlagsToCache(folderFullName, uid, flagsCache) {
  if (!MESSAGE_FLAGS_CACHE[folderFullName]) {
    MESSAGE_FLAGS_CACHE[folderFullName] = {};
  }

  MESSAGE_FLAGS_CACHE[folderFullName][uid] = flagsCache;
}
/**
 * @param {string} folderFullName
 */

function clearMessageFlagsFromCacheByFolder(folderFullName) {
  MESSAGE_FLAGS_CACHE[folderFullName] = {};
}
/**
 * @param {(MessageModel|null)} message
 */

function initMessageFlagsFromCache(message) {
  if (message) {
    var uid = message.uid,
        flags = getMessageFlagsFromCache(message.folderFullNameRaw, uid);

    if (flags && 0 < flags.length) {
      message.flagged(!!flags[1]);

      if (!message.isSimpleMessage) {
        message.unseen(!!flags[0]);
        message.answered(!!flags[2]);
        message.forwarded(!!flags[3]);
        message.isReadReceipt(!!flags[4]);
        message.deletedMark(!!flags[5]);
      }
    }

    if (0 < message.threads().length) {
      var unseenSubUid = _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_0___default()(___WEBPACK_IMPORTED_MODULE_1___default.a).call(___WEBPACK_IMPORTED_MODULE_1___default.a, message.threads(), function (sSubUid) {
        if (uid !== sSubUid) {
          var subFlags = getMessageFlagsFromCache(message.folderFullNameRaw, sSubUid);
          return subFlags && 0 < subFlags.length && !!subFlags[0];
        }

        return false;
      });

      var flaggedSubUid = _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_0___default()(___WEBPACK_IMPORTED_MODULE_1___default.a).call(___WEBPACK_IMPORTED_MODULE_1___default.a, message.threads(), function (sSubUid) {
        if (uid !== sSubUid) {
          var subFlags = getMessageFlagsFromCache(message.folderFullNameRaw, sSubUid);
          return subFlags && 0 < subFlags.length && !!subFlags[1];
        }

        return false;
      });

      message.hasUnseenSubMessage(unseenSubUid && 0 < Object(Common_Utils__WEBPACK_IMPORTED_MODULE_3__["pInt"])(unseenSubUid));
      message.hasFlaggedSubMessage(flaggedSubUid && 0 < Object(Common_Utils__WEBPACK_IMPORTED_MODULE_3__["pInt"])(flaggedSubUid));
    }
  }
}
/**
 * @param {(MessageModel|null)} message
 */

function storeMessageFlagsToCache(message) {
  if (message) {
    setMessageFlagsToCache(message.folderFullNameRaw, message.uid, [message.unseen(), message.flagged(), message.answered(), message.forwarded(), message.isReadReceipt(), message.deletedMark()]);
  }
}
/**
 * @param {string} folder
 * @param {string} uid
 * @param {Array} flags
 */

function storeMessageFlagsToCacheByFolderAndUid(folder, uid, flags) {
  if (Object(Common_Utils__WEBPACK_IMPORTED_MODULE_3__["isArray"])(flags) && 0 < flags.length) {
    setMessageFlagsToCache(folder, uid, flags);
  }
}
/**
 * @param {string} folder
 * @param {string} uid
 * @param {number} setAction
 */

function storeMessageFlagsToCacheBySetAction(folder, uid, setAction) {
  var unread = 0;
  var flags = getMessageFlagsFromCache(folder, uid);

  if (Object(Common_Utils__WEBPACK_IMPORTED_MODULE_3__["isArray"])(flags) && 0 < flags.length) {
    if (flags[0]) {
      unread = 1;
    }

    switch (setAction) {
      case Common_Enums__WEBPACK_IMPORTED_MODULE_2__["MessageSetAction"].SetSeen:
        flags[0] = false;
        break;

      case Common_Enums__WEBPACK_IMPORTED_MODULE_2__["MessageSetAction"].UnsetSeen:
        flags[0] = true;
        break;

      case Common_Enums__WEBPACK_IMPORTED_MODULE_2__["MessageSetAction"].SetFlag:
        flags[1] = true;
        break;

      case Common_Enums__WEBPACK_IMPORTED_MODULE_2__["MessageSetAction"].UnsetFlag:
        flags[1] = false;
        break;
      // no default
    }

    setMessageFlagsToCache(folder, uid, flags);
  }

  return unread;
}

/***/ }),
/* 15 */
/*!*****************************!*\
  !*** ./dev/Common/Links.js ***!
  \*****************************/
/*! exports provided: populateAuthSuffix, subQueryPrefix, root, rootAdmin, rootUser, attachmentRaw, attachmentDownload, attachmentPreview, attachmentThumbnailPreview, attachmentPreviewAsPlain, attachmentFramed, serverRequest, upload, uploadContacts, uploadBackground, append, change, ajax, messageViewLink, messageDownloadLink, avatarLink, publicLink, userBackground, phpInfo, langLink, exportContactsVcf, exportContactsCsv, socialGoogle, socialTwitter, socialFacebook, staticPrefix, emptyContactPic, sound, notificationMailIcon, openPgpJs, openPgpWorkerJs, openPgpWorkerPath, themePreviewLink, inbox, settings, about, admin, mailBox */
/*! exports used: ajax, append, attachmentDownload, attachmentFramed, attachmentPreview, attachmentPreviewAsPlain, attachmentThumbnailPreview, avatarLink, change, emptyContactPic, exportContactsCsv, exportContactsVcf, inbox, langLink, mailBox, messageDownloadLink, messageViewLink, notificationMailIcon, openPgpJs, openPgpWorkerJs, phpInfo, populateAuthSuffix, root, rootAdmin, rootUser, settings, socialFacebook, socialGoogle, socialTwitter, sound, subQueryPrefix, themePreviewLink, upload, uploadBackground, uploadContacts, userBackground */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "v", function() { return populateAuthSuffix; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "E", function() { return subQueryPrefix; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "w", function() { return root; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "x", function() { return rootAdmin; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "y", function() { return rootUser; });
/* unused harmony export attachmentRaw */
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return attachmentDownload; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return attachmentPreview; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return attachmentThumbnailPreview; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return attachmentPreviewAsPlain; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return attachmentFramed; });
/* unused harmony export serverRequest */
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "G", function() { return upload; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "I", function() { return uploadContacts; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "H", function() { return uploadBackground; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return append; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return change; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ajax; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "q", function() { return messageViewLink; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "p", function() { return messageDownloadLink; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return avatarLink; });
/* unused harmony export publicLink */
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "J", function() { return userBackground; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "u", function() { return phpInfo; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "n", function() { return langLink; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "l", function() { return exportContactsVcf; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "k", function() { return exportContactsCsv; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "B", function() { return socialGoogle; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "C", function() { return socialTwitter; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "A", function() { return socialFacebook; });
/* unused harmony export staticPrefix */
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "j", function() { return emptyContactPic; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "D", function() { return sound; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "r", function() { return notificationMailIcon; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "s", function() { return openPgpJs; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "t", function() { return openPgpWorkerJs; });
/* unused harmony export openPgpWorkerPath */
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "F", function() { return themePreviewLink; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "m", function() { return inbox; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "z", function() { return settings; });
/* unused harmony export about */
/* unused harmony export admin */
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "o", function() { return mailBox; });
/* harmony import */ var core_js_modules_es_regexp_exec__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.regexp.exec */ 45);
/* harmony import */ var core_js_modules_es_regexp_exec__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_regexp_exec__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var core_js_modules_es_string_replace__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es.string.replace */ 56);
/* harmony import */ var core_js_modules_es_string_replace__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_replace__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var window__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! window */ 4);
/* harmony import */ var window__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(window__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var Common_Utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! Common/Utils */ 2);
/* harmony import */ var Storage_Settings__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! Storage/Settings */ 5);





var ROOT = './',
    HASH_PREFIX = '#/',
    SERVER_PREFIX = './?',
    SUB_QUERY_PREFIX = '&q[]=',
    VERSION = Storage_Settings__WEBPACK_IMPORTED_MODULE_4__["appSettingsGet"]('version'),
    WEB_PREFIX = Storage_Settings__WEBPACK_IMPORTED_MODULE_4__["appSettingsGet"]('webPath') || '',
    VERSION_PREFIX = Storage_Settings__WEBPACK_IMPORTED_MODULE_4__["appSettingsGet"]('webVersionPath') || 'rainloop/v/' + VERSION + '/',
    STATIC_PREFIX = VERSION_PREFIX + 'static/',
    ADMIN_HOST_USE = !!Storage_Settings__WEBPACK_IMPORTED_MODULE_4__["appSettingsGet"]('adminHostUse'),
    ADMIN_PATH = Storage_Settings__WEBPACK_IMPORTED_MODULE_4__["appSettingsGet"]('adminPath') || 'admin';
var AUTH_PREFIX = Storage_Settings__WEBPACK_IMPORTED_MODULE_4__["settingsGet"]('AuthAccountHash') || '0';
/**
 * @returns {void}
 */

function populateAuthSuffix() {
  AUTH_PREFIX = Storage_Settings__WEBPACK_IMPORTED_MODULE_4__["settingsGet"]('AuthAccountHash') || '0';
}
/**
 * @returns {string}
 */

function subQueryPrefix() {
  return SUB_QUERY_PREFIX;
}
/**
 * @param {string=} startupUrl
 * @returns {string}
 */

function root(startupUrl) {
  if (startupUrl === void 0) {
    startupUrl = '';
  }

  return HASH_PREFIX + Object(Common_Utils__WEBPACK_IMPORTED_MODULE_3__["pString"])(startupUrl);
}
/**
 * @returns {string}
 */

function rootAdmin() {
  return ADMIN_HOST_USE ? ROOT : SERVER_PREFIX + ADMIN_PATH;
}
/**
 * @returns {string}
 */

function rootUser() {
  return ROOT;
}
/**
 * @param {string} type
 * @param {string} download
 * @param {string=} customSpecSuffix
 * @returns {string}
 */

function attachmentRaw(type, download, customSpecSuffix) {
  customSpecSuffix = Object(Common_Utils__WEBPACK_IMPORTED_MODULE_3__["isUnd"])(customSpecSuffix) ? AUTH_PREFIX : customSpecSuffix;
  return SERVER_PREFIX + '/Raw/' + SUB_QUERY_PREFIX + '/' + customSpecSuffix + '/' + type + '/' + SUB_QUERY_PREFIX + '/' + download;
}
/**
 * @param {string} download
 * @param {string=} customSpecSuffix
 * @returns {string}
 */

function attachmentDownload(download, customSpecSuffix) {
  return attachmentRaw('Download', download, customSpecSuffix);
}
/**
 * @param {string} download
 * @param {string=} customSpecSuffix
 * @returns {string}
 */

function attachmentPreview(download, customSpecSuffix) {
  return attachmentRaw('View', download, customSpecSuffix);
}
/**
 * @param {string} download
 * @param {string=} customSpecSuffix
 * @returns {string}
 */

function attachmentThumbnailPreview(download, customSpecSuffix) {
  return attachmentRaw('ViewThumbnail', download, customSpecSuffix);
}
/**
 * @param {string} download
 * @param {string=} customSpecSuffix
 * @returns {string}
 */

function attachmentPreviewAsPlain(download, customSpecSuffix) {
  return attachmentRaw('ViewAsPlain', download, customSpecSuffix);
}
/**
 * @param {string} download
 * @param {string=} customSpecSuffix
 * @returns {string}
 */

function attachmentFramed(download, customSpecSuffix) {
  return attachmentRaw('FramedView', download, customSpecSuffix);
}
/**
 * @param {string} type
 * @returns {string}
 */

function serverRequest(type) {
  return SERVER_PREFIX + '/' + type + '/' + SUB_QUERY_PREFIX + '/' + AUTH_PREFIX + '/';
}
/**
 * @returns {string}
 */

function upload() {
  return serverRequest('Upload');
}
/**
 * @returns {string}
 */

function uploadContacts() {
  return serverRequest('UploadContacts');
}
/**
 * @returns {string}
 */

function uploadBackground() {
  return serverRequest('UploadBackground');
}
/**
 * @returns {string}
 */

function append() {
  return serverRequest('Append');
}
/**
 * @param {string} email
 * @returns {string}
 */

function change(email) {
  return serverRequest('Change') + Object(Common_Utils__WEBPACK_IMPORTED_MODULE_3__["encodeURIComponent"])(email) + '/';
}
/**
 * @param {string} add
 * @returns {string}
 */

function ajax(add) {
  return serverRequest('Ajax') + add;
}
/**
 * @param {string} requestHash
 * @returns {string}
 */

function messageViewLink(requestHash) {
  return SERVER_PREFIX + '/Raw/' + SUB_QUERY_PREFIX + '/' + AUTH_PREFIX + '/ViewAsPlain/' + SUB_QUERY_PREFIX + '/' + requestHash;
}
/**
 * @param {string} requestHash
 * @returns {string}
 */

function messageDownloadLink(requestHash) {
  return SERVER_PREFIX + '/Raw/' + SUB_QUERY_PREFIX + '/' + AUTH_PREFIX + '/Download/' + SUB_QUERY_PREFIX + '/' + requestHash;
}
/**
 * @param {string} email
 * @returns {string}
 */

function avatarLink(email) {
  return SERVER_PREFIX + '/Raw/0/Avatar/' + Object(Common_Utils__WEBPACK_IMPORTED_MODULE_3__["encodeURIComponent"])(email) + '/';
}
/**
 * @param {string} hash
 * @returns {string}
 */

function publicLink(hash) {
  return SERVER_PREFIX + '/Raw/0/Public/' + hash + '/';
}
/**
 * @param {string} hash
 * @returns {string}
 */

function userBackground(hash) {
  return SERVER_PREFIX + '/Raw/' + SUB_QUERY_PREFIX + '/' + AUTH_PREFIX + '/UserBackground/' + SUB_QUERY_PREFIX + '/' + hash;
}
/**
 * @returns {string}
 */

function phpInfo() {
  return SERVER_PREFIX + '/Info';
}
/**
 * @param {string} lang
 * @param {boolean} isAdmin
 * @returns {string}
 */

function langLink(lang, isAdmin) {
  return SERVER_PREFIX + '/Lang/0/' + (isAdmin ? 'Admin' : 'App') + '/' + window__WEBPACK_IMPORTED_MODULE_2___default.a.encodeURI(lang) + '/' + VERSION + '/';
}
/**
 * @returns {string}
 */

function exportContactsVcf() {
  return SERVER_PREFIX + '/Raw/' + SUB_QUERY_PREFIX + '/' + AUTH_PREFIX + '/ContactsVcf/';
}
/**
 * @returns {string}
 */

function exportContactsCsv() {
  return SERVER_PREFIX + '/Raw/' + SUB_QUERY_PREFIX + '/' + AUTH_PREFIX + '/ContactsCsv/';
}
/**
 * @param {boolean} xauth = false
 * @returns {string}
 */

function socialGoogle(xauth) {
  if (xauth === void 0) {
    xauth = false;
  }

  return SERVER_PREFIX + 'SocialGoogle' + ('' !== AUTH_PREFIX ? '/' + SUB_QUERY_PREFIX + '/' + AUTH_PREFIX + '/' : '') + (xauth ? '&xauth=1' : '');
}
/**
 * @returns {string}
 */

function socialTwitter() {
  return SERVER_PREFIX + 'SocialTwitter' + ('' !== AUTH_PREFIX ? '/' + SUB_QUERY_PREFIX + '/' + AUTH_PREFIX + '/' : '');
}
/**
 * @returns {string}
 */

function socialFacebook() {
  return SERVER_PREFIX + 'SocialFacebook' + ('' !== AUTH_PREFIX ? '/' + SUB_QUERY_PREFIX + '/' + AUTH_PREFIX + '/' : '');
}
/**
 * @param {string} path
 * @returns {string}
 */

function staticPrefix(path) {
  return STATIC_PREFIX + path;
}
/**
 * @returns {string}
 */

function emptyContactPic() {
  return staticPrefix('css/images/empty-contact.png');
}
/**
 * @param {string} fileName
 * @returns {string}
 */

function sound(fileName) {
  return staticPrefix('sounds/' + fileName);
}
/**
 * @returns {string}
 */

function notificationMailIcon() {
  return staticPrefix('css/images/icom-message-notification.png');
}
/**
 * @returns {string}
 */

function openPgpJs() {
  return staticPrefix('js/min/openpgp.min.js');
}
/**
 * @returns {string}
 */

function openPgpWorkerJs() {
  return staticPrefix('js/min/openpgp.worker.min.js');
}
/**
 * @returns {string}
 */

function openPgpWorkerPath() {
  return staticPrefix('js/min/');
}
/**
 * @param {string} theme
 * @returns {string}
 */

function themePreviewLink(theme) {
  var prefix = VERSION_PREFIX;

  if ('@custom' === theme.substr(-7)) {
    theme = Object(Common_Utils__WEBPACK_IMPORTED_MODULE_3__["trim"])(theme.substring(0, theme.length - 7));
    prefix = WEB_PREFIX;
  }

  return prefix + 'themes/' + window__WEBPACK_IMPORTED_MODULE_2___default.a.encodeURI(theme) + '/images/preview.png';
}
/**
 * @param {string} inboxFolderName = 'INBOX'
 * @returns {string}
 */

function inbox(inboxFolderName) {
  if (inboxFolderName === void 0) {
    inboxFolderName = 'INBOX';
  }

  return HASH_PREFIX + 'mailbox/' + inboxFolderName;
}
/**
 * @param {string=} screenName = ''
 * @returns {string}
 */

function settings(screenName) {
  if (screenName === void 0) {
    screenName = '';
  }

  return HASH_PREFIX + 'settings' + (screenName ? '/' + screenName : '');
}
/**
 * @returns {string}
 */

function about() {
  return HASH_PREFIX + 'about';
}
/**
 * @param {string} screenName
 * @returns {string}
 */

function admin(screenName) {
  var result = HASH_PREFIX;

  switch (screenName) {
    case 'AdminDomains':
      result += 'domains';
      break;

    case 'AdminSecurity':
      result += 'security';
      break;

    case 'AdminLicensing':
      result += 'licensing';
      break;
    // no default
  }

  return result;
}
/**
 * @param {string} folder
 * @param {number=} page = 1
 * @param {string=} search = ''
 * @param {string=} threadUid = ''
 * @returns {string}
 */

function mailBox(folder, page, search, threadUid) {
  if (page === void 0) {
    page = 1;
  }

  if (search === void 0) {
    search = '';
  }

  if (threadUid === void 0) {
    threadUid = '';
  }

  page = Object(Common_Utils__WEBPACK_IMPORTED_MODULE_3__["isNormal"])(page) ? Object(Common_Utils__WEBPACK_IMPORTED_MODULE_3__["pInt"])(page) : 1;
  search = Object(Common_Utils__WEBPACK_IMPORTED_MODULE_3__["pString"])(search);
  var result = HASH_PREFIX + 'mailbox/';

  if ('' !== folder) {
    var resultThreadUid = Object(Common_Utils__WEBPACK_IMPORTED_MODULE_3__["pInt"])(threadUid);
    result += window__WEBPACK_IMPORTED_MODULE_2___default.a.encodeURI(folder) + (0 < resultThreadUid ? '~' + resultThreadUid : '');
  }

  if (1 < page) {
    result = result.replace(/[/]+$/, '');
    result += '/p' + page;
  }

  if ('' !== search) {
    result = result.replace(/[/]+$/, '');
    result += '/' + window__WEBPACK_IMPORTED_MODULE_2___default.a.encodeURI(search);
  }

  return result;
}

/***/ }),
/* 16 */
/*!*********************************!*\
  !*** ./dev/Remote/User/Ajax.js ***!
  \*********************************/
/*! exports provided: default */
/*! exports used: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var core_js_modules_es_array_join__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.array.join */ 74);
/* harmony import */ var core_js_modules_es_array_join__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_join__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_index_of__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/index-of */ 30);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_index_of__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_index_of__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/map */ 18);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _babel_runtime_corejs3_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/esm/inheritsLoose */ 10);
/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! _ */ 3);
/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(___WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var Common_Utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! Common/Utils */ 2);
/* harmony import */ var Common_Consts__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! Common/Consts */ 25);
/* harmony import */ var Common_Cache__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! Common/Cache */ 14);
/* harmony import */ var Common_Links__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! Common/Links */ 15);
/* harmony import */ var Common_Base64__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! Common/Base64 */ 392);
/* harmony import */ var Storage_Settings__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! Storage/Settings */ 5);
/* harmony import */ var Stores_User_App__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! Stores/User/App */ 31);
/* harmony import */ var Stores_User_Settings__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! Stores/User/Settings */ 38);
/* harmony import */ var Helper_Apps_User__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! Helper/Apps/User */ 22);
/* harmony import */ var Remote_AbstractAjax__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! Remote/AbstractAjax */ 263);
















var RemoteUserAjax =
/*#__PURE__*/
function (_AbstractAjaxRemote) {
  Object(_babel_runtime_corejs3_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(RemoteUserAjax, _AbstractAjaxRemote);

  function RemoteUserAjax() {
    var _this;

    _this = _AbstractAjaxRemote.call(this) || this;
    _this.oRequests = {};
    return _this;
  }
  /**
   * @param {?Function} fCallback
   */


  var _proto = RemoteUserAjax.prototype;

  _proto.folders = function folders(fCallback) {
    this.defaultRequest(fCallback, 'Folders', {
      'SentFolder': Storage_Settings__WEBPACK_IMPORTED_MODULE_10__["settingsGet"]('SentFolder'),
      'DraftFolder': Storage_Settings__WEBPACK_IMPORTED_MODULE_10__["settingsGet"]('DraftFolder'),
      'SpamFolder': Storage_Settings__WEBPACK_IMPORTED_MODULE_10__["settingsGet"]('SpamFolder'),
      'TrashFolder': Storage_Settings__WEBPACK_IMPORTED_MODULE_10__["settingsGet"]('TrashFolder'),
      'ArchiveFolder': Storage_Settings__WEBPACK_IMPORTED_MODULE_10__["settingsGet"]('ArchiveFolder')
    }, null, '', ['Folders']);
  }
  /**
   * @param {?Function} fCallback
   * @param {string} sEmail
   * @param {string} sLogin
   * @param {string} sPassword
   * @param {boolean} bSignMe
   * @param {string=} sLanguage
   * @param {string=} sAdditionalCode
   * @param {boolean=} bAdditionalCodeSignMe
   */
  ;

  _proto.login = function login(fCallback, sEmail, sLogin, sPassword, bSignMe, sLanguage, sAdditionalCode, bAdditionalCodeSignMe) {
    this.defaultRequest(fCallback, 'Login', {
      'Email': sEmail,
      'Login': sLogin,
      'Password': sPassword,
      'Language': sLanguage || '',
      'AdditionalCode': sAdditionalCode || '',
      'AdditionalCodeSignMe': bAdditionalCodeSignMe ? '1' : '0',
      'SignMe': bSignMe ? '1' : '0'
    });
  }
  /**
   * @param {?Function} fCallback
   */
  ;

  _proto.getTwoFactor = function getTwoFactor(fCallback) {
    this.defaultRequest(fCallback, 'GetTwoFactorInfo');
  }
  /**
   * @param {?Function} fCallback
   */
  ;

  _proto.createTwoFactor = function createTwoFactor(fCallback) {
    this.defaultRequest(fCallback, 'CreateTwoFactorSecret');
  }
  /**
   * @param {?Function} fCallback
   */
  ;

  _proto.clearTwoFactor = function clearTwoFactor(fCallback) {
    this.defaultRequest(fCallback, 'ClearTwoFactorInfo');
  }
  /**
   * @param {?Function} fCallback
   */
  ;

  _proto.showTwoFactorSecret = function showTwoFactorSecret(fCallback) {
    this.defaultRequest(fCallback, 'ShowTwoFactorSecret');
  }
  /**
   * @param {?Function} fCallback
   * @param {string} sCode
   */
  ;

  _proto.testTwoFactor = function testTwoFactor(fCallback, sCode) {
    this.defaultRequest(fCallback, 'TestTwoFactorInfo', {
      'Code': sCode
    });
  }
  /**
   * @param {?Function} fCallback
   * @param {boolean} bEnable
   */
  ;

  _proto.enableTwoFactor = function enableTwoFactor(fCallback, bEnable) {
    this.defaultRequest(fCallback, 'EnableTwoFactor', {
      'Enable': bEnable ? '1' : '0'
    });
  }
  /**
   * @param {?Function} fCallback
   */
  ;

  _proto.clearTwoFactorInfo = function clearTwoFactorInfo(fCallback) {
    this.defaultRequest(fCallback, 'ClearTwoFactorInfo');
  }
  /**
   * @param {?Function} fCallback
   */
  ;

  _proto.contactsSync = function contactsSync(fCallback) {
    this.defaultRequest(fCallback, 'ContactsSync', null, Common_Consts__WEBPACK_IMPORTED_MODULE_6__[/* CONTACTS_SYNC_AJAX_TIMEOUT */ "d"]);
  }
  /**
   * @param {?Function} fCallback
   * @param {boolean} bEnable
   * @param {string} sUrl
   * @param {string} sUser
   * @param {string} sPassword
   */
  ;

  _proto.saveContactsSyncData = function saveContactsSyncData(fCallback, bEnable, sUrl, sUser, sPassword) {
    this.defaultRequest(fCallback, 'SaveContactsSyncData', {
      'Enable': bEnable ? '1' : '0',
      'Url': sUrl,
      'User': sUser,
      'Password': sPassword
    });
  }
  /**
   * @param {?Function} fCallback
   * @param {string} sEmail
   * @param {string} sPassword
   * @param {boolean=} bNew
   */
  ;

  _proto.accountSetup = function accountSetup(fCallback, sEmail, sPassword, bNew) {
    if (bNew === void 0) {
      bNew = true;
    }

    this.defaultRequest(fCallback, 'AccountSetup', {
      'Email': sEmail,
      'Password': sPassword,
      'New': bNew ? '1' : '0'
    });
  }
  /**
   * @param {?Function} fCallback
   * @param {string} sEmailToDelete
   */
  ;

  _proto.accountDelete = function accountDelete(fCallback, sEmailToDelete) {
    this.defaultRequest(fCallback, 'AccountDelete', {
      'EmailToDelete': sEmailToDelete
    });
  }
  /**
   * @param {?Function} fCallback
   * @param {Array} aAccounts
   * @param {Array} aIdentities
   */
  ;

  _proto.accountsAndIdentitiesSortOrder = function accountsAndIdentitiesSortOrder(fCallback, aAccounts, aIdentities) {
    this.defaultRequest(fCallback, 'AccountsAndIdentitiesSortOrder', {
      'Accounts': aAccounts,
      'Identities': aIdentities
    });
  }
  /**
   * @param {?Function} fCallback
   * @param {string} sId
   * @param {string} sEmail
   * @param {string} sName
   * @param {string} sReplyTo
   * @param {string} sBcc
   * @param {string} sSignature
   * @param {boolean} bSignatureInsertBefore
   */
  ;

  _proto.identityUpdate = function identityUpdate(fCallback, sId, sEmail, sName, sReplyTo, sBcc, sSignature, bSignatureInsertBefore) {
    this.defaultRequest(fCallback, 'IdentityUpdate', {
      'Id': sId,
      'Email': sEmail,
      'Name': sName,
      'ReplyTo': sReplyTo,
      'Bcc': sBcc,
      'Signature': sSignature,
      'SignatureInsertBefore': bSignatureInsertBefore ? '1' : '0'
    });
  }
  /**
   * @param {?Function} fCallback
   * @param {string} sIdToDelete
   */
  ;

  _proto.identityDelete = function identityDelete(fCallback, sIdToDelete) {
    this.defaultRequest(fCallback, 'IdentityDelete', {
      'IdToDelete': sIdToDelete
    });
  }
  /**
   * @param {?Function} fCallback
   */
  ;

  _proto.accountsAndIdentities = function accountsAndIdentities(fCallback) {
    this.defaultRequest(fCallback, 'AccountsAndIdentities');
  }
  /**
   * @param {?Function} fCallback
   */
  ;

  _proto.accountsCounts = function accountsCounts(fCallback) {
    this.defaultRequest(fCallback, 'AccountsCounts');
  }
  /**
   * @param {?Function} fCallback
   * @param {Array} filters
   * @param {string} raw
   * @param {boolean} isRawIsActive
   */
  ;

  _proto.filtersSave = function filtersSave(fCallback, filters, raw, isRawIsActive) {
    this.defaultRequest(fCallback, 'FiltersSave', {
      'Raw': raw,
      'RawIsActive': Object(Common_Utils__WEBPACK_IMPORTED_MODULE_5__["boolToAjax"])(isRawIsActive),
      'Filters': _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_2___default()(___WEBPACK_IMPORTED_MODULE_4___default.a).call(___WEBPACK_IMPORTED_MODULE_4___default.a, filters, function (item) {
        return item.toJson();
      })
    });
  }
  /**
   * @param {?Function} fCallback
   */
  ;

  _proto.filtersGet = function filtersGet(fCallback) {
    this.defaultRequest(fCallback, 'Filters', {});
  }
  /**
   * @param {?Function} fCallback
   */
  ;

  _proto.templates = function templates(fCallback) {
    this.defaultRequest(fCallback, 'Templates', {});
  }
  /**
   * @param {Function} fCallback
   * @param {string} sID
   */
  ;

  _proto.templateGetById = function templateGetById(fCallback, sID) {
    this.defaultRequest(fCallback, 'TemplateGetByID', {
      'ID': sID
    });
  }
  /**
   * @param {Function} fCallback
   * @param {string} sID
   */
  ;

  _proto.templateDelete = function templateDelete(fCallback, sID) {
    this.defaultRequest(fCallback, 'TemplateDelete', {
      'IdToDelete': sID
    });
  }
  /**
   * @param {Function} fCallback
   * @param {string} sID
   * @param {string} sName
   * @param {string} sBody
   */
  ;

  _proto.templateSetup = function templateSetup(fCallback, sID, sName, sBody) {
    this.defaultRequest(fCallback, 'TemplateSetup', {
      'ID': sID,
      'Name': sName,
      'Body': sBody
    });
  }
  /**
   * @param {Function} fCallback
   * @param {string} sFolderFullNameRaw
   * @param {number=} iOffset = 0
   * @param {number=} iLimit = 20
   * @param {string=} sSearch = ''
   * @param {string=} sThreadUid = ''
   * @param {boolean=} bSilent = false
   */
  ;

  _proto.messageList = function messageList(fCallback, sFolderFullNameRaw, iOffset, iLimit, sSearch, sThreadUid, bSilent) {
    if (iOffset === void 0) {
      iOffset = 0;
    }

    if (iLimit === void 0) {
      iLimit = 20;
    }

    if (sSearch === void 0) {
      sSearch = '';
    }

    if (sThreadUid === void 0) {
      sThreadUid = '';
    }

    if (bSilent === void 0) {
      bSilent = false;
    }

    sFolderFullNameRaw = Object(Common_Utils__WEBPACK_IMPORTED_MODULE_5__["pString"])(sFolderFullNameRaw);
    var folderHash = Object(Common_Cache__WEBPACK_IMPORTED_MODULE_7__[/* getFolderHash */ "g"])(sFolderFullNameRaw),
        useThreads = Stores_User_App__WEBPACK_IMPORTED_MODULE_11__[/* default */ "a"].threadsAllowed() && Stores_User_Settings__WEBPACK_IMPORTED_MODULE_12__[/* default */ "a"].useThreads(),
        inboxUidNext = Object(Common_Cache__WEBPACK_IMPORTED_MODULE_7__[/* getFolderInboxName */ "h"])() === sFolderFullNameRaw ? Object(Common_Cache__WEBPACK_IMPORTED_MODULE_7__[/* getFolderUidNext */ "i"])(sFolderFullNameRaw) : '';

    if ('' !== folderHash && ('' === sSearch || -1 === _babel_runtime_corejs3_core_js_stable_instance_index_of__WEBPACK_IMPORTED_MODULE_1___default()(sSearch).call(sSearch, 'is:'))) {
      return this.defaultRequest(fCallback, 'MessageList', {}, '' === sSearch ? Common_Consts__WEBPACK_IMPORTED_MODULE_6__[/* DEFAULT_AJAX_TIMEOUT */ "g"] : Common_Consts__WEBPACK_IMPORTED_MODULE_6__[/* SEARCH_AJAX_TIMEOUT */ "m"], 'MessageList/' + Object(Common_Links__WEBPACK_IMPORTED_MODULE_8__[/* subQueryPrefix */ "E"])() + '/' + Common_Base64__WEBPACK_IMPORTED_MODULE_9__[/* urlsafe_encode */ "a"]([sFolderFullNameRaw, iOffset, iLimit, sSearch, Stores_User_App__WEBPACK_IMPORTED_MODULE_11__[/* default */ "a"].projectHash(), folderHash, inboxUidNext, useThreads ? '1' : '0', useThreads ? sThreadUid : ''].join(String.fromCharCode(0))), bSilent ? [] : ['MessageList']);
    }

    return this.defaultRequest(fCallback, 'MessageList', {
      Folder: sFolderFullNameRaw,
      Offset: iOffset,
      Limit: iLimit,
      Search: sSearch,
      UidNext: inboxUidNext,
      UseThreads: useThreads ? '1' : '0',
      ThreadUid: useThreads ? sThreadUid : ''
    }, '' === sSearch ? Common_Consts__WEBPACK_IMPORTED_MODULE_6__[/* DEFAULT_AJAX_TIMEOUT */ "g"] : Common_Consts__WEBPACK_IMPORTED_MODULE_6__[/* SEARCH_AJAX_TIMEOUT */ "m"], '', bSilent ? [] : ['MessageList']);
  }
  /**
   * @param {?Function} fCallback
   * @param {Array} aDownloads
   */
  ;

  _proto.messageUploadAttachments = function messageUploadAttachments(fCallback, aDownloads) {
    this.defaultRequest(fCallback, 'MessageUploadAttachments', {
      'Attachments': aDownloads
    }, 999000);
  }
  /**
   * @param {?Function} fCallback
   * @param {string} sFolderFullNameRaw
   * @param {number} iUid
   * @returns {boolean}
   */
  ;

  _proto.message = function message(fCallback, sFolderFullNameRaw, iUid) {
    sFolderFullNameRaw = Object(Common_Utils__WEBPACK_IMPORTED_MODULE_5__["pString"])(sFolderFullNameRaw);
    iUid = Object(Common_Utils__WEBPACK_IMPORTED_MODULE_5__["pInt"])(iUid);

    if (Object(Common_Cache__WEBPACK_IMPORTED_MODULE_7__[/* getFolderFromCacheList */ "e"])(sFolderFullNameRaw) && 0 < iUid) {
      this.defaultRequest(fCallback, 'Message', {}, null, 'Message/' + Object(Common_Links__WEBPACK_IMPORTED_MODULE_8__[/* subQueryPrefix */ "E"])() + '/' + Common_Base64__WEBPACK_IMPORTED_MODULE_9__[/* urlsafe_encode */ "a"]([sFolderFullNameRaw, iUid, Stores_User_App__WEBPACK_IMPORTED_MODULE_11__[/* default */ "a"].projectHash(), Stores_User_App__WEBPACK_IMPORTED_MODULE_11__[/* default */ "a"].threadsAllowed() && Stores_User_Settings__WEBPACK_IMPORTED_MODULE_12__[/* default */ "a"].useThreads() ? '1' : '0'].join(String.fromCharCode(0))), ['Message']);
      return true;
    }

    return false;
  }
  /**
   * @param {?Function} fCallback
   * @param {Array} aExternals
   */
  ;

  _proto.composeUploadExternals = function composeUploadExternals(fCallback, aExternals) {
    this.defaultRequest(fCallback, 'ComposeUploadExternals', {
      'Externals': aExternals
    }, 999000);
  }
  /**
   * @param {?Function} fCallback
   * @param {string} sUrl
   * @param {string} sAccessToken
   */
  ;

  _proto.composeUploadDrive = function composeUploadDrive(fCallback, sUrl, sAccessToken) {
    this.defaultRequest(fCallback, 'ComposeUploadDrive', {
      'AccessToken': sAccessToken,
      'Url': sUrl
    }, 999000);
  }
  /**
   * @param {?Function} fCallback
   * @param {string} folder
   * @param {Array=} list = []
   */
  ;

  _proto.folderInformation = function folderInformation(fCallback, folder, list) {
    if (list === void 0) {
      list = [];
    }

    var request = true;
    var uids = [];

    if (Object(Common_Utils__WEBPACK_IMPORTED_MODULE_5__["isArray"])(list) && 0 < list.length) {
      request = false;

      ___WEBPACK_IMPORTED_MODULE_4___default.a.each(list, function (messageListItem) {
        if (!Object(Common_Cache__WEBPACK_IMPORTED_MODULE_7__[/* getMessageFlagsFromCache */ "j"])(messageListItem.folderFullNameRaw, messageListItem.uid)) {
          uids.push(messageListItem.uid);
        }

        if (0 < messageListItem.threads().length) {
          ___WEBPACK_IMPORTED_MODULE_4___default.a.each(messageListItem.threads(), function (uid) {
            if (!Object(Common_Cache__WEBPACK_IMPORTED_MODULE_7__[/* getMessageFlagsFromCache */ "j"])(messageListItem.folderFullNameRaw, uid)) {
              uids.push(uid);
            }
          });
        }
      });

      if (0 < uids.length) {
        request = true;
      }
    }

    if (request) {
      this.defaultRequest(fCallback, 'FolderInformation', {
        'Folder': folder,
        'FlagsUids': Object(Common_Utils__WEBPACK_IMPORTED_MODULE_5__["isArray"])(uids) ? uids.join(',') : '',
        'UidNext': Object(Common_Cache__WEBPACK_IMPORTED_MODULE_7__[/* getFolderInboxName */ "h"])() === folder ? Object(Common_Cache__WEBPACK_IMPORTED_MODULE_7__[/* getFolderUidNext */ "i"])(folder) : ''
      });
    } else if (Stores_User_Settings__WEBPACK_IMPORTED_MODULE_12__[/* default */ "a"].useThreads()) {
      Object(Helper_Apps_User__WEBPACK_IMPORTED_MODULE_13__[/* getApp */ "a"])().reloadFlagsCurrentMessageListAndMessageFromCache();
    }
  }
  /**
   * @param {?Function} fCallback
   * @param {Array} aFolders
   */
  ;

  _proto.folderInformationMultiply = function folderInformationMultiply(fCallback, aFolders) {
    this.defaultRequest(fCallback, 'FolderInformationMultiply', {
      'Folders': aFolders
    });
  }
  /**
   * @param {?Function} fCallback
   */
  ;

  _proto.logout = function logout(fCallback) {
    this.defaultRequest(fCallback, 'Logout');
  }
  /**
   * @param {?Function} fCallback
   * @param {string} sFolderFullNameRaw
   * @param {Array} aUids
   * @param {boolean} bSetFlagged
   */
  ;

  _proto.messageSetFlagged = function messageSetFlagged(fCallback, sFolderFullNameRaw, aUids, bSetFlagged) {
    this.defaultRequest(fCallback, 'MessageSetFlagged', {
      'Folder': sFolderFullNameRaw,
      'Uids': aUids.join(','),
      'SetAction': bSetFlagged ? '1' : '0'
    });
  }
  /**
   * @param {?Function} fCallback
   * @param {string} sFolderFullNameRaw
   * @param {Array} aUids
   * @param {boolean} bSetSeen
   */
  ;

  _proto.messageSetSeen = function messageSetSeen(fCallback, sFolderFullNameRaw, aUids, bSetSeen) {
    this.defaultRequest(fCallback, 'MessageSetSeen', {
      'Folder': sFolderFullNameRaw,
      'Uids': aUids.join(','),
      'SetAction': bSetSeen ? '1' : '0'
    });
  }
  /**
   * @param {?Function} fCallback
   * @param {string} sFolderFullNameRaw
   * @param {boolean} bSetSeen
   * @param {Array} aThreadUids = null
   */
  ;

  _proto.messageSetSeenToAll = function messageSetSeenToAll(fCallback, sFolderFullNameRaw, bSetSeen, aThreadUids) {
    if (aThreadUids === void 0) {
      aThreadUids = null;
    }

    this.defaultRequest(fCallback, 'MessageSetSeenToAll', {
      'Folder': sFolderFullNameRaw,
      'SetAction': bSetSeen ? '1' : '0',
      'ThreadUids': aThreadUids ? aThreadUids.join(',') : ''
    });
  }
  /**
   * @param {?Function} fCallback
   * @param {string} sIdentityID
   * @param {string} sMessageFolder
   * @param {string} sMessageUid
   * @param {string} sDraftFolder
   * @param {string} sTo
   * @param {string} sCc
   * @param {string} sBcc
   * @param {string} sReplyTo
   * @param {string} sSubject
   * @param {boolean} bTextIsHtml
   * @param {string} sText
   * @param {Array} aAttachments
   * @param {(Array|null)} aDraftInfo
   * @param {string} sInReplyTo
   * @param {string} sReferences
   * @param {boolean} bMarkAsImportant
   */
  ;

  _proto.saveMessage = function saveMessage(fCallback, sIdentityID, sMessageFolder, sMessageUid, sDraftFolder, sTo, sCc, sBcc, sReplyTo, sSubject, bTextIsHtml, sText, aAttachments, aDraftInfo, sInReplyTo, sReferences, bMarkAsImportant) {
    this.defaultRequest(fCallback, 'SaveMessage', {
      'IdentityID': sIdentityID,
      'MessageFolder': sMessageFolder,
      'MessageUid': sMessageUid,
      'DraftFolder': sDraftFolder,
      'To': sTo,
      'Cc': sCc,
      'Bcc': sBcc,
      'ReplyTo': sReplyTo,
      'Subject': sSubject,
      'TextIsHtml': bTextIsHtml ? '1' : '0',
      'Text': sText,
      'DraftInfo': aDraftInfo,
      'InReplyTo': sInReplyTo,
      'References': sReferences,
      'MarkAsImportant': bMarkAsImportant ? '1' : '0',
      'Attachments': aAttachments
    }, Common_Consts__WEBPACK_IMPORTED_MODULE_6__[/* SAVE_MESSAGE_AJAX_TIMEOUT */ "l"]);
  }
  /**
   * @param {?Function} fCallback
   * @param {string} sMessageFolder
   * @param {string} sMessageUid
   * @param {string} sReadReceipt
   * @param {string} sSubject
   * @param {string} sText
   */
  ;

  _proto.sendReadReceiptMessage = function sendReadReceiptMessage(fCallback, sMessageFolder, sMessageUid, sReadReceipt, sSubject, sText) {
    this.defaultRequest(fCallback, 'SendReadReceiptMessage', {
      'MessageFolder': sMessageFolder,
      'MessageUid': sMessageUid,
      'ReadReceipt': sReadReceipt,
      'Subject': sSubject,
      'Text': sText
    });
  }
  /**
   * @param {?Function} fCallback
   * @param {string} sIdentityID
   * @param {string} sMessageFolder
   * @param {string} sMessageUid
   * @param {string} sSentFolder
   * @param {string} sTo
   * @param {string} sCc
   * @param {string} sBcc
   * @param {string} sReplyTo
   * @param {string} sSubject
   * @param {boolean} bTextIsHtml
   * @param {string} sText
   * @param {Array} aAttachments
   * @param {(Array|null)} aDraftInfo
   * @param {string} sInReplyTo
   * @param {string} sReferences
   * @param {boolean} bRequestDsn
   * @param {boolean} bRequestReadReceipt
   * @param {boolean} bMarkAsImportant
   */
  ;

  _proto.sendMessage = function sendMessage(fCallback, sIdentityID, sMessageFolder, sMessageUid, sSentFolder, sTo, sCc, sBcc, sReplyTo, sSubject, bTextIsHtml, sText, aAttachments, aDraftInfo, sInReplyTo, sReferences, bRequestDsn, bRequestReadReceipt, bMarkAsImportant) {
    this.defaultRequest(fCallback, 'SendMessage', {
      'IdentityID': sIdentityID,
      'MessageFolder': sMessageFolder,
      'MessageUid': sMessageUid,
      'SentFolder': sSentFolder,
      'To': sTo,
      'Cc': sCc,
      'Bcc': sBcc,
      'ReplyTo': sReplyTo,
      'Subject': sSubject,
      'TextIsHtml': bTextIsHtml ? '1' : '0',
      'Text': sText,
      'DraftInfo': aDraftInfo,
      'InReplyTo': sInReplyTo,
      'References': sReferences,
      'Dsn': bRequestDsn ? '1' : '0',
      'ReadReceiptRequest': bRequestReadReceipt ? '1' : '0',
      'MarkAsImportant': bMarkAsImportant ? '1' : '0',
      'Attachments': aAttachments
    }, Common_Consts__WEBPACK_IMPORTED_MODULE_6__[/* SEND_MESSAGE_AJAX_TIMEOUT */ "n"]);
  }
  /**
   * @param {?Function} fCallback
   * @param {Object} oData
   */
  ;

  _proto.saveSystemFolders = function saveSystemFolders(fCallback, oData) {
    this.defaultRequest(fCallback, 'SystemFoldersUpdate', oData);
  }
  /**
   * @param {?Function} fCallback
   * @param {Object} oData
   */
  ;

  _proto.saveSettings = function saveSettings(fCallback, oData) {
    this.defaultRequest(fCallback, 'SettingsUpdate', oData);
  }
  /**
   * @param {string} key
   * @param {?Function} valueFn
   * @param {?Function} fn
   */
  ;

  _proto.saveSettingsHelper = function saveSettingsHelper(key, valueFn, fn) {
    var _this2 = this;

    return function (value) {
      var _this2$saveSettings;

      _this2.saveSettings(fn || null, (_this2$saveSettings = {}, _this2$saveSettings[key] = valueFn ? valueFn(value) : value, _this2$saveSettings));
    };
  }
  /**
   * @param {?Function} fCallback
   * @param {string} prevPassword
   * @param {string} newPassword
   */
  ;

  _proto.changePassword = function changePassword(fCallback, prevPassword, newPassword) {
    this.defaultRequest(fCallback, 'ChangePassword', {
      'PrevPassword': prevPassword,
      'NewPassword': newPassword
    });
  }
  /**
   * @param {?Function} fCallback
   * @param {string} sFolderFullNameRaw
   */
  ;

  _proto.folderClear = function folderClear(fCallback, sFolderFullNameRaw) {
    this.defaultRequest(fCallback, 'FolderClear', {
      'Folder': sFolderFullNameRaw
    });
  }
  /**
   * @param {?Function} fCallback
   * @param {string} sFolderFullNameRaw
   * @param {boolean} bSubscribe
   */
  ;

  _proto.folderSetSubscribe = function folderSetSubscribe(fCallback, sFolderFullNameRaw, bSubscribe) {
    this.defaultRequest(fCallback, 'FolderSubscribe', {
      'Folder': sFolderFullNameRaw,
      'Subscribe': bSubscribe ? '1' : '0'
    });
  }
  /**
   * @param {?Function} fCallback
   * @param {string} sFolderFullNameRaw
   * @param {boolean} bCheckable
   */
  ;

  _proto.folderSetCheckable = function folderSetCheckable(fCallback, sFolderFullNameRaw, bCheckable) {
    this.defaultRequest(fCallback, 'FolderCheckable', {
      'Folder': sFolderFullNameRaw,
      'Checkable': bCheckable ? '1' : '0'
    });
  }
  /**
   * @param {?Function} fCallback
   * @param {string} sFolder
   * @param {string} sToFolder
   * @param {Array} aUids
   * @param {string=} sLearning
   * @param {boolean=} bMarkAsRead
   */
  ;

  _proto.messagesMove = function messagesMove(fCallback, sFolder, sToFolder, aUids, sLearning, bMarkAsRead) {
    this.defaultRequest(fCallback, 'MessageMove', {
      'FromFolder': sFolder,
      'ToFolder': sToFolder,
      'Uids': aUids.join(','),
      'MarkAsRead': bMarkAsRead ? '1' : '0',
      'Learning': sLearning || ''
    }, null, '', ['MessageList']);
  }
  /**
   * @param {?Function} fCallback
   * @param {string} sFolder
   * @param {string} sToFolder
   * @param {Array} aUids
   */
  ;

  _proto.messagesCopy = function messagesCopy(fCallback, sFolder, sToFolder, aUids) {
    this.defaultRequest(fCallback, 'MessageCopy', {
      'FromFolder': sFolder,
      'ToFolder': sToFolder,
      'Uids': aUids.join(',')
    });
  }
  /**
   * @param {?Function} fCallback
   * @param {string} sFolder
   * @param {Array} aUids
   */
  ;

  _proto.messagesDelete = function messagesDelete(fCallback, sFolder, aUids) {
    this.defaultRequest(fCallback, 'MessageDelete', {
      'Folder': sFolder,
      'Uids': aUids.join(',')
    }, null, '', ['MessageList']);
  }
  /**
   * @param {?Function} fCallback
   */
  ;

  _proto.appDelayStart = function appDelayStart(fCallback) {
    this.defaultRequest(fCallback, 'AppDelayStart');
  }
  /**
   * @param {?Function} fCallback
   */
  ;

  _proto.quota = function quota(fCallback) {
    this.defaultRequest(fCallback, 'Quota');
  }
  /**
   * @param {?Function} fCallback
   * @param {number} iOffset
   * @param {number} iLimit
   * @param {string} sSearch
   */
  ;

  _proto.contacts = function contacts(fCallback, iOffset, iLimit, sSearch) {
    this.defaultRequest(fCallback, 'Contacts', {
      'Offset': iOffset,
      'Limit': iLimit,
      'Search': sSearch
    }, null, '', ['Contacts']);
  }
  /**
   * @param {?Function} fCallback
   * @param {string} sRequestUid
   * @param {string} sUid
   * @param {Array} aProperties
   */
  ;

  _proto.contactSave = function contactSave(fCallback, sRequestUid, sUid, aProperties) {
    this.defaultRequest(fCallback, 'ContactSave', {
      'RequestUid': sRequestUid,
      'Uid': Object(Common_Utils__WEBPACK_IMPORTED_MODULE_5__["trim"])(sUid),
      'Properties': aProperties
    });
  }
  /**
   * @param {?Function} fCallback
   * @param {Array} aUids
   */
  ;

  _proto.contactsDelete = function contactsDelete(fCallback, aUids) {
    this.defaultRequest(fCallback, 'ContactsDelete', {
      'Uids': aUids.join(',')
    });
  }
  /**
   * @param {?Function} fCallback
   * @param {string} sQuery
   * @param {number} iPage
   */
  ;

  _proto.suggestions = function suggestions(fCallback, sQuery, iPage) {
    this.defaultRequest(fCallback, 'Suggestions', {
      'Query': sQuery,
      'Page': iPage
    }, null, '', ['Suggestions']);
  }
  /**
   * @param {?Function} fCallback
   */
  ;

  _proto.clearUserBackground = function clearUserBackground(fCallback) {
    this.defaultRequest(fCallback, 'ClearUserBackground');
  }
  /**
   * @param {?Function} fCallback
   */
  ;

  _proto.facebookUser = function facebookUser(fCallback) {
    this.defaultRequest(fCallback, 'SocialFacebookUserInformation');
  }
  /**
   * @param {?Function} fCallback
   */
  ;

  _proto.facebookDisconnect = function facebookDisconnect(fCallback) {
    this.defaultRequest(fCallback, 'SocialFacebookDisconnect');
  }
  /**
   * @param {?Function} fCallback
   */
  ;

  _proto.twitterUser = function twitterUser(fCallback) {
    this.defaultRequest(fCallback, 'SocialTwitterUserInformation');
  }
  /**
   * @param {?Function} fCallback
   */
  ;

  _proto.twitterDisconnect = function twitterDisconnect(fCallback) {
    this.defaultRequest(fCallback, 'SocialTwitterDisconnect');
  }
  /**
   * @param {?Function} fCallback
   */
  ;

  _proto.googleUser = function googleUser(fCallback) {
    this.defaultRequest(fCallback, 'SocialGoogleUserInformation');
  }
  /**
   * @param {?Function} fCallback
   */
  ;

  _proto.googleDisconnect = function googleDisconnect(fCallback) {
    this.defaultRequest(fCallback, 'SocialGoogleDisconnect');
  }
  /**
   * @param {?Function} fCallback
   */
  ;

  _proto.socialUsers = function socialUsers(fCallback) {
    this.defaultRequest(fCallback, 'SocialUsers');
  };

  return RemoteUserAjax;
}(Remote_AbstractAjax__WEBPACK_IMPORTED_MODULE_14__[/* AbstractAjaxRemote */ "a"]);

/* harmony default export */ __webpack_exports__["a"] = (new RemoteUserAjax());

/***/ }),
/* 17 */
/*!***************************************************************************!*\
  !*** ./node_modules/@babel/runtime-corejs3/helpers/esm/defineProperty.js ***!
  \***************************************************************************/
/*! exports provided: default */
/*! exports used: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _defineProperty; });
/* harmony import */ var _core_js_object_define_property__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../core-js/object/define-property */ 160);
/* harmony import */ var _core_js_object_define_property__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_core_js_object_define_property__WEBPACK_IMPORTED_MODULE_0__);

function _defineProperty(obj, key, value) {
  if (key in obj) {
    _core_js_object_define_property__WEBPACK_IMPORTED_MODULE_0___default()(obj, key, {
      value: value,
      enumerable: true,
      configurable: true,
      writable: true
    });
  } else {
    obj[key] = value;
  }

  return obj;
}

/***/ }),
/* 18 */
/*!****************************************************************************!*\
  !*** ./node_modules/@babel/runtime-corejs3/core-js-stable/instance/map.js ***!
  \****************************************************************************/
/*! no static exports found */
/*! exports used: default */
/***/ (function(module, exports, __webpack_require__) {

module.exports = __webpack_require__(/*! core-js-pure/stable/instance/map */ 340);

/***/ }),
/* 19 */
/*!**************************************************************************************************!*\
  !*** ./node_modules/@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor.js ***!
  \**************************************************************************************************/
/*! no static exports found */
/*! exports used: default */
/***/ (function(module, exports, __webpack_require__) {

module.exports = __webpack_require__(/*! core-js-pure/stable/object/get-own-property-descriptor */ 363);

/***/ }),
/* 20 */
/*!*************************************************************************************!*\
  !*** ./node_modules/@babel/runtime-corejs3/helpers/esm/applyDecoratedDescriptor.js ***!
  \*************************************************************************************/
/*! exports provided: default */
/*! exports used: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _applyDecoratedDescriptor; });
/* harmony import */ var _core_js_object_define_property__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../core-js/object/define-property */ 160);
/* harmony import */ var _core_js_object_define_property__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_core_js_object_define_property__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _core_js_instance_slice__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../core-js/instance/slice */ 258);
/* harmony import */ var _core_js_instance_slice__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_core_js_instance_slice__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _core_js_instance_reverse__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../core-js/instance/reverse */ 259);
/* harmony import */ var _core_js_instance_reverse__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_core_js_instance_reverse__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _core_js_instance_reduce__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../core-js/instance/reduce */ 260);
/* harmony import */ var _core_js_instance_reduce__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_core_js_instance_reduce__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var _core_js_object_keys__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../core-js/object/keys */ 261);
/* harmony import */ var _core_js_object_keys__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_core_js_object_keys__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var _core_js_instance_for_each__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../core-js/instance/for-each */ 262);
/* harmony import */ var _core_js_instance_for_each__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_core_js_instance_for_each__WEBPACK_IMPORTED_MODULE_5__);






function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) {
  var _context, _context2, _context3;

  var desc = {};

  _core_js_instance_for_each__WEBPACK_IMPORTED_MODULE_5___default()(_context = _core_js_object_keys__WEBPACK_IMPORTED_MODULE_4___default()(descriptor)).call(_context, function (key) {
    desc[key] = descriptor[key];
  });

  desc.enumerable = !!desc.enumerable;
  desc.configurable = !!desc.configurable;

  if ('value' in desc || desc.initializer) {
    desc.writable = true;
  }

  desc = _core_js_instance_reduce__WEBPACK_IMPORTED_MODULE_3___default()(_context2 = _core_js_instance_reverse__WEBPACK_IMPORTED_MODULE_2___default()(_context3 = _core_js_instance_slice__WEBPACK_IMPORTED_MODULE_1___default()(decorators).call(decorators)).call(_context3)).call(_context2, function (desc, decorator) {
    return decorator(target, property, desc) || desc;
  }, desc);

  if (context && desc.initializer !== void 0) {
    desc.value = desc.initializer ? desc.initializer.call(context) : void 0;
    desc.initializer = undefined;
  }

  if (desc.initializer === void 0) {
    _core_js_object_define_property__WEBPACK_IMPORTED_MODULE_0___default()(target, property, desc);

    desc = null;
  }

  return desc;
}

/***/ }),
/* 21 */
/*!*****************************!*\
  !*** external "window.key" ***!
  \*****************************/
/*! no static exports found */
/*! exports used: default */
/***/ (function(module, exports) {

module.exports = window.key;

/***/ }),
/* 22 */
/*!*********************************!*\
  !*** ./dev/Helper/Apps/User.js ***!
  \*********************************/
/*! exports provided: getApp */
/*! exports used: getApp */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return getApp; });
/**
 * @returns {AppUser}
 */
function getApp() {
  return __webpack_require__(/*! App/User */ 389).default;
}

/***/ }),
/* 23 */,
/* 24 */
/*!******************************!*\
  !*** ./dev/Common/Events.js ***!
  \******************************/
/*! exports provided: sub, pub */
/*! exports used: pub, sub */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return sub; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return pub; });
/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! _ */ 3);
/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(___WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var Common_Utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! Common/Utils */ 2);
/* harmony import */ var Common_Plugins__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! Common/Plugins */ 39);



var SUBS = {};
/**
 * @param {string|Object} name
 * @param {Function} func
 * @param {Object=} context
 */

function sub(name, func, context) {
  if (Object(Common_Utils__WEBPACK_IMPORTED_MODULE_1__["isObject"])(name)) {
    context = func || null;
    func = null;

    ___WEBPACK_IMPORTED_MODULE_0___default.a.each(name, function (subFunc, subName) {
      sub(subName, subFunc, context);
    });
  } else {
    if (Object(Common_Utils__WEBPACK_IMPORTED_MODULE_1__["isUnd"])(SUBS[name])) {
      SUBS[name] = [];
    }

    SUBS[name].push([func, context]);
  }
}
/**
 * @param {string} name
 * @param {Array=} args
 */

function pub(name, args) {
  Common_Plugins__WEBPACK_IMPORTED_MODULE_2__[/* runHook */ "f"]('rl-pub', [name, args]);

  if (!Object(Common_Utils__WEBPACK_IMPORTED_MODULE_1__["isUnd"])(SUBS[name])) {
    ___WEBPACK_IMPORTED_MODULE_0___default.a.each(SUBS[name], function (items) {
      if (items[0]) {
        items[0].apply(items[1] || null, args || []);
      }
    });
  }
}

/***/ }),
/* 25 */
/*!******************************!*\
  !*** ./dev/Common/Consts.js ***!
  \******************************/
/*! exports provided: MESSAGES_PER_PAGE, MESSAGES_PER_PAGE_VALUES, CONTACTS_PER_PAGE, DEFAULT_AJAX_TIMEOUT, SEARCH_AJAX_TIMEOUT, SEND_MESSAGE_AJAX_TIMEOUT, SAVE_MESSAGE_AJAX_TIMEOUT, CONTACTS_SYNC_AJAX_TIMEOUT, UNUSED_OPTION_VALUE, CLIENT_SIDE_STORAGE_INDEX_NAME, IMAP_DEFAULT_PORT, IMAP_DEFAULT_SECURE_PORT, SMTP_DEFAULT_PORT, SMTP_DEFAULT_SECURE_PORT, SIEVE_DEFAULT_PORT, MESSAGE_BODY_CACHE_LIMIT, AJAX_ERROR_LIMIT, TOKEN_ERROR_LIMIT, RAINLOOP_TRIAL_KEY, DATA_IMAGE_USER_DOT_PIC, DATA_IMAGE_TRANSP_PIC, DATA_IMAGE_LAZY_PLACEHOLDER_PIC */
/*! exports used: AJAX_ERROR_LIMIT, CLIENT_SIDE_STORAGE_INDEX_NAME, CONTACTS_PER_PAGE, CONTACTS_SYNC_AJAX_TIMEOUT, DATA_IMAGE_LAZY_PLACEHOLDER_PIC, DATA_IMAGE_USER_DOT_PIC, DEFAULT_AJAX_TIMEOUT, IMAP_DEFAULT_PORT, MESSAGES_PER_PAGE, MESSAGES_PER_PAGE_VALUES, MESSAGE_BODY_CACHE_LIMIT, SAVE_MESSAGE_AJAX_TIMEOUT, SEARCH_AJAX_TIMEOUT, SEND_MESSAGE_AJAX_TIMEOUT, SIEVE_DEFAULT_PORT, SMTP_DEFAULT_PORT, TOKEN_ERROR_LIMIT, UNUSED_OPTION_VALUE */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return MESSAGES_PER_PAGE; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "j", function() { return MESSAGES_PER_PAGE_VALUES; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return CONTACTS_PER_PAGE; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return DEFAULT_AJAX_TIMEOUT; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "m", function() { return SEARCH_AJAX_TIMEOUT; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "n", function() { return SEND_MESSAGE_AJAX_TIMEOUT; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "l", function() { return SAVE_MESSAGE_AJAX_TIMEOUT; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return CONTACTS_SYNC_AJAX_TIMEOUT; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "r", function() { return UNUSED_OPTION_VALUE; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return CLIENT_SIDE_STORAGE_INDEX_NAME; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return IMAP_DEFAULT_PORT; });
/* unused harmony export IMAP_DEFAULT_SECURE_PORT */
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "p", function() { return SMTP_DEFAULT_PORT; });
/* unused harmony export SMTP_DEFAULT_SECURE_PORT */
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "o", function() { return SIEVE_DEFAULT_PORT; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "k", function() { return MESSAGE_BODY_CACHE_LIMIT; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return AJAX_ERROR_LIMIT; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "q", function() { return TOKEN_ERROR_LIMIT; });
/* unused harmony export RAINLOOP_TRIAL_KEY */
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return DATA_IMAGE_USER_DOT_PIC; });
/* unused harmony export DATA_IMAGE_TRANSP_PIC */
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return DATA_IMAGE_LAZY_PLACEHOLDER_PIC; });
var MESSAGES_PER_PAGE = 20;
var MESSAGES_PER_PAGE_VALUES = [10, 20, 30, 50, 100];
var CONTACTS_PER_PAGE = 50;
var DEFAULT_AJAX_TIMEOUT = 30000;
var SEARCH_AJAX_TIMEOUT = 300000;
var SEND_MESSAGE_AJAX_TIMEOUT = 300000;
var SAVE_MESSAGE_AJAX_TIMEOUT = 200000;
var CONTACTS_SYNC_AJAX_TIMEOUT = 200000;
var UNUSED_OPTION_VALUE = '__UNUSE__';
var CLIENT_SIDE_STORAGE_INDEX_NAME = 'rlcsc';
var IMAP_DEFAULT_PORT = 143;
var IMAP_DEFAULT_SECURE_PORT = 993;
var SMTP_DEFAULT_PORT = 25;
var SMTP_DEFAULT_SECURE_PORT = 465;
var SIEVE_DEFAULT_PORT = 4190;
var MESSAGE_BODY_CACHE_LIMIT = 15;
var AJAX_ERROR_LIMIT = 7;
var TOKEN_ERROR_LIMIT = 10;
var RAINLOOP_TRIAL_KEY = 'RAINLOOP-TRIAL-KEY';
/* eslint max-len: 0 */

var 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==';
var DATA_IMAGE_TRANSP_PIC = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQIW2NkAAIAAAoAAggA9GkAAAAASUVORK5CYII=';
var DATA_IMAGE_LAZY_PLACEHOLDER_PIC = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB/AAffA0nNPuCLAAAAAElFTkSuQmCC';

/***/ }),
/* 26 */
/*!*****************************************************************************!*\
  !*** ./node_modules/@babel/runtime-corejs3/core-js-stable/instance/bind.js ***!
  \*****************************************************************************/
/*! no static exports found */
/*! exports used: default */
/***/ (function(module, exports, __webpack_require__) {

module.exports = __webpack_require__(/*! core-js-pure/stable/instance/bind */ 328);

/***/ }),
/* 27 */
/*!**************************************************!*\
  !*** ./node_modules/core-js/internals/global.js ***!
  \**************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

/* WEBPACK VAR INJECTION */(function(global) {var check = function (it) {
  return it && it.Math == Math && it;
};

// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
module.exports =
  // eslint-disable-next-line no-undef
  check(typeof globalThis == 'object' && globalThis) ||
  check(typeof window == 'object' && window) ||
  check(typeof self == 'object' && self) ||
  check(typeof global == 'object' && global) ||
  // eslint-disable-next-line no-new-func
  Function('return this')();

/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../webpack/buildin/global.js */ 123)))

/***/ }),
/* 28 */
/*!***************************************!*\
  !*** ./dev/Knoin/AbstractViewNext.js ***!
  \***************************************/
/*! exports provided: AbstractViewNext */
/*! exports used: AbstractViewNext */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return AbstractViewNext; });
/* harmony import */ var _babel_runtime_corejs3_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/esm/defineProperty */ 17);
/* harmony import */ var ko__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ko */ 1);
/* harmony import */ var Common_Utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! Common/Utils */ 2);
/* harmony import */ var Common_Enums__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! Common/Enums */ 0);
/* harmony import */ var Common_Globals__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! Common/Globals */ 6);





var AbstractViewNext =
/*#__PURE__*/
function () {
  function AbstractViewNext() {
    Object(_babel_runtime_corejs3_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(this, "bDisabeCloseOnEsc", false);

    Object(_babel_runtime_corejs3_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(this, "sDefaultKeyScope", Common_Enums__WEBPACK_IMPORTED_MODULE_3__["KeyState"].None);

    Object(_babel_runtime_corejs3_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(this, "sCurrentKeyScope", Common_Enums__WEBPACK_IMPORTED_MODULE_3__["KeyState"].None);

    Object(_babel_runtime_corejs3_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(this, "viewModelVisibility", ko__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"].observable(false));

    Object(_babel_runtime_corejs3_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(this, "modalVisibility", ko__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"].observable(false).extend({
      rateLimit: 0
    }));

    Object(_babel_runtime_corejs3_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(this, "viewModelName", '');

    Object(_babel_runtime_corejs3_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(this, "viewModelNames", []);

    Object(_babel_runtime_corejs3_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(this, "viewModelDom", null);
  }

  var _proto = AbstractViewNext.prototype;

  /**
   * @returns {void}
   */
  _proto.storeAndSetKeyScope = function storeAndSetKeyScope() {
    this.sCurrentKeyScope = Object(Common_Globals__WEBPACK_IMPORTED_MODULE_4__["keyScope"])();
    Object(Common_Globals__WEBPACK_IMPORTED_MODULE_4__["keyScope"])(this.sDefaultKeyScope);
  }
  /**
   * @returns {void}
   */
  ;

  _proto.restoreKeyScope = function restoreKeyScope() {
    Object(Common_Globals__WEBPACK_IMPORTED_MODULE_4__["keyScope"])(this.sCurrentKeyScope);
  }
  /**
   * @returns {void}
   */
  ;

  _proto.registerPopupKeyDown = function registerPopupKeyDown() {
    var _this = this;

    Common_Globals__WEBPACK_IMPORTED_MODULE_4__["$win"].on('keydown', function (event) {
      if (event && _this.modalVisibility && _this.modalVisibility()) {
        if (!_this.bDisabeCloseOnEsc && Common_Enums__WEBPACK_IMPORTED_MODULE_3__["EventKeyCode"].Esc === event.keyCode) {
          Object(Common_Utils__WEBPACK_IMPORTED_MODULE_2__["delegateRun"])(_this, 'cancelCommand');
          return false;
        } else if (Common_Enums__WEBPACK_IMPORTED_MODULE_3__["EventKeyCode"].Backspace === event.keyCode && !Object(Common_Utils__WEBPACK_IMPORTED_MODULE_2__["inFocus"])()) {
          return false;
        }
      }

      return true;
    });
  };

  _proto.cancelCommand = function cancelCommand() {} // eslint-disable-line no-empty-function
  ;

  _proto.closeCommand = function closeCommand() {} // eslint-disable-line no-empty-function
  ;

  return AbstractViewNext;
}();

/***/ }),
/* 29 */
/*!******************************!*\
  !*** ./dev/Stores/Social.js ***!
  \******************************/
/*! exports provided: default */
/*! exports used: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var window__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! window */ 4);
/* harmony import */ var window__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(window__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var ko__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ko */ 1);
/* harmony import */ var $__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! $ */ 8);
/* harmony import */ var $__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n($__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var Storage_Settings__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! Storage/Settings */ 5);





var SocialStore =
/*#__PURE__*/
function () {
  function SocialStore() {
    var _this = this;

    this.google = {};
    this.twitter = {};
    this.facebook = {};
    this.dropbox = {}; // Google

    this.google.enabled = ko__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"].observable(false);
    this.google.clientID = ko__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"].observable('');
    this.google.clientSecret = ko__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"].observable('');
    this.google.apiKey = ko__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"].observable('');
    this.google.loading = ko__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"].observable(false);
    this.google.userName = ko__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"].observable('');
    this.google.loggined = ko__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"].computed(function () {
      return '' !== _this.google.userName();
    });
    this.google.capa = {};
    this.google.capa.auth = ko__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"].observable(false);
    this.google.capa.authGmail = ko__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"].observable(false);
    this.google.capa.drive = ko__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"].observable(false);
    this.google.capa.preview = ko__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"].observable(false);
    this.google.require = {};
    this.google.require.clientSettings = ko__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"].computed(function () {
      return _this.google.enabled() && (_this.google.capa.auth() || _this.google.capa.authGmail() || _this.google.capa.drive());
    });
    this.google.require.apiKeySettings = ko__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"].computed(function () {
      return _this.google.enabled() && _this.google.capa.drive();
    }); // Facebook

    this.facebook.enabled = ko__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"].observable(false);
    this.facebook.appID = ko__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"].observable('');
    this.facebook.appSecret = ko__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"].observable('');
    this.facebook.loading = ko__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"].observable(false);
    this.facebook.userName = ko__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"].observable('');
    this.facebook.supported = ko__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"].observable(false);
    this.facebook.loggined = ko__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"].computed(function () {
      return '' !== _this.facebook.userName();
    }); // Twitter

    this.twitter.enabled = ko__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"].observable(false);
    this.twitter.consumerKey = ko__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"].observable('');
    this.twitter.consumerSecret = ko__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"].observable('');
    this.twitter.loading = ko__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"].observable(false);
    this.twitter.userName = ko__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"].observable('');
    this.twitter.loggined = ko__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"].computed(function () {
      return '' !== _this.twitter.userName();
    }); // Dropbox

    this.dropbox.enabled = ko__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"].observable(false);
    this.dropbox.apiKey = ko__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"].observable('');
  }

  var _proto = SocialStore.prototype;

  _proto.populate = function populate() {
    this.google.enabled(!!Storage_Settings__WEBPACK_IMPORTED_MODULE_3__["settingsGet"]('AllowGoogleSocial'));
    this.google.clientID(Storage_Settings__WEBPACK_IMPORTED_MODULE_3__["settingsGet"]('GoogleClientID'));
    this.google.clientSecret(Storage_Settings__WEBPACK_IMPORTED_MODULE_3__["settingsGet"]('GoogleClientSecret'));
    this.google.apiKey(Storage_Settings__WEBPACK_IMPORTED_MODULE_3__["settingsGet"]('GoogleApiKey'));
    this.google.capa.auth(!!Storage_Settings__WEBPACK_IMPORTED_MODULE_3__["settingsGet"]('AllowGoogleSocialAuth'));
    this.google.capa.authGmail(!!Storage_Settings__WEBPACK_IMPORTED_MODULE_3__["settingsGet"]('AllowGoogleSocialAuthGmail'));
    this.google.capa.drive(!!Storage_Settings__WEBPACK_IMPORTED_MODULE_3__["settingsGet"]('AllowGoogleSocialDrive'));
    this.google.capa.preview(!!Storage_Settings__WEBPACK_IMPORTED_MODULE_3__["settingsGet"]('AllowGoogleSocialPreview'));
    this.facebook.enabled(!!Storage_Settings__WEBPACK_IMPORTED_MODULE_3__["settingsGet"]('AllowFacebookSocial'));
    this.facebook.appID(Storage_Settings__WEBPACK_IMPORTED_MODULE_3__["settingsGet"]('FacebookAppID'));
    this.facebook.appSecret(Storage_Settings__WEBPACK_IMPORTED_MODULE_3__["settingsGet"]('FacebookAppSecret'));
    this.facebook.supported(!!Storage_Settings__WEBPACK_IMPORTED_MODULE_3__["settingsGet"]('SupportedFacebookSocial'));
    this.twitter.enabled = ko__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"].observable(!!Storage_Settings__WEBPACK_IMPORTED_MODULE_3__["settingsGet"]('AllowTwitterSocial'));
    this.twitter.consumerKey = ko__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"].observable(Storage_Settings__WEBPACK_IMPORTED_MODULE_3__["settingsGet"]('TwitterConsumerKey'));
    this.twitter.consumerSecret = ko__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"].observable(Storage_Settings__WEBPACK_IMPORTED_MODULE_3__["settingsGet"]('TwitterConsumerSecret'));
    this.dropbox.enabled(!!Storage_Settings__WEBPACK_IMPORTED_MODULE_3__["settingsGet"]('AllowDropboxSocial'));
    this.dropbox.apiKey(Storage_Settings__WEBPACK_IMPORTED_MODULE_3__["settingsGet"]('DropboxApiKey'));
  };

  _proto.appendDropbox = function appendDropbox() {
    if (!window__WEBPACK_IMPORTED_MODULE_0___default.a.Dropbox && this.dropbox.enabled() && this.dropbox.apiKey()) {
      if (!window__WEBPACK_IMPORTED_MODULE_0___default.a.document.getElementById('dropboxjs')) {
        var script = window__WEBPACK_IMPORTED_MODULE_0___default.a.document.createElement('script');
        script.type = 'text/javascript';
        script.src = 'https://www.dropbox.com/static/api/2/dropins.js';
        $__WEBPACK_IMPORTED_MODULE_2___default()(script).attr('id', 'dropboxjs').attr('data-app-key', this.dropbox.apiKey());
        window__WEBPACK_IMPORTED_MODULE_0___default.a.document.body.appendChild(script);
      }
    }
  };

  return SocialStore;
}();

/* harmony default export */ __webpack_exports__["a"] = (new SocialStore());

/***/ }),
/* 30 */
/*!*********************************************************************************!*\
  !*** ./node_modules/@babel/runtime-corejs3/core-js-stable/instance/index-of.js ***!
  \*********************************************************************************/
/*! no static exports found */
/*! exports used: default */
/***/ (function(module, exports, __webpack_require__) {

module.exports = __webpack_require__(/*! core-js-pure/stable/instance/index-of */ 315);

/***/ }),
/* 31 */
/*!********************************!*\
  !*** ./dev/Stores/User/App.js ***!
  \********************************/
/*! exports provided: default */
/*! exports used: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var _babel_runtime_corejs3_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/esm/inheritsLoose */ 10);
/* harmony import */ var ko__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ko */ 1);
/* harmony import */ var Common_Enums__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! Common/Enums */ 0);
/* harmony import */ var Common_Globals__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! Common/Globals */ 6);
/* harmony import */ var Common_Utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! Common/Utils */ 2);
/* harmony import */ var Storage_Settings__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! Storage/Settings */ 5);
/* harmony import */ var Stores_AbstractApp__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! Stores/AbstractApp */ 257);








var AppUserStore =
/*#__PURE__*/
function (_AbstractAppStore) {
  Object(_babel_runtime_corejs3_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(AppUserStore, _AbstractAppStore);

  function AppUserStore() {
    var _this;

    _this = _AbstractAppStore.call(this) || this;
    _this.currentAudio = ko__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"].observable('');
    _this.focusedState = ko__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"].observable(Common_Enums__WEBPACK_IMPORTED_MODULE_2__["Focused"].None);
    var isMobile = Storage_Settings__WEBPACK_IMPORTED_MODULE_5__["appSettingsGet"]('mobile');

    _this.focusedState.subscribe(function (value) {
      switch (value) {
        case Common_Enums__WEBPACK_IMPORTED_MODULE_2__["Focused"].MessageList:
          Object(Common_Globals__WEBPACK_IMPORTED_MODULE_3__["keyScope"])(Common_Enums__WEBPACK_IMPORTED_MODULE_2__["KeyState"].MessageList);

          if (isMobile) {
            Object(Common_Globals__WEBPACK_IMPORTED_MODULE_3__["leftPanelDisabled"])(true);
          }

          break;

        case Common_Enums__WEBPACK_IMPORTED_MODULE_2__["Focused"].MessageView:
          Object(Common_Globals__WEBPACK_IMPORTED_MODULE_3__["keyScope"])(Common_Enums__WEBPACK_IMPORTED_MODULE_2__["KeyState"].MessageView);

          if (isMobile) {
            Object(Common_Globals__WEBPACK_IMPORTED_MODULE_3__["leftPanelDisabled"])(true);
          }

          break;

        case Common_Enums__WEBPACK_IMPORTED_MODULE_2__["Focused"].FolderList:
          Object(Common_Globals__WEBPACK_IMPORTED_MODULE_3__["keyScope"])(Common_Enums__WEBPACK_IMPORTED_MODULE_2__["KeyState"].FolderList);

          if (isMobile) {
            Object(Common_Globals__WEBPACK_IMPORTED_MODULE_3__["leftPanelDisabled"])(false);
          }

          break;

        default:
          break;
      }
    });

    _this.projectHash = ko__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"].observable('');
    _this.threadsAllowed = ko__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"].observable(false);
    _this.composeInEdit = ko__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"].observable(false);
    _this.contactsAutosave = ko__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"].observable(false);
    _this.useLocalProxyForExternalImages = ko__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"].observable(false);
    _this.contactsIsAllowed = ko__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"].observable(false);
    _this.attachmentsActions = ko__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"].observableArray([]);
    _this.devEmail = '';
    _this.devPassword = '';
    return _this;
  }

  var _proto = AppUserStore.prototype;

  _proto.populate = function populate() {
    _AbstractAppStore.prototype.populate.call(this);

    this.projectHash(Storage_Settings__WEBPACK_IMPORTED_MODULE_5__["settingsGet"]('ProjectHash'));
    this.contactsAutosave(!!Storage_Settings__WEBPACK_IMPORTED_MODULE_5__["settingsGet"]('ContactsAutosave'));
    this.useLocalProxyForExternalImages(!!Storage_Settings__WEBPACK_IMPORTED_MODULE_5__["settingsGet"]('UseLocalProxyForExternalImages'));
    this.contactsIsAllowed(!!Storage_Settings__WEBPACK_IMPORTED_MODULE_5__["settingsGet"]('ContactsIsAllowed'));
    var attachmentsActions = Storage_Settings__WEBPACK_IMPORTED_MODULE_5__["appSettingsGet"]('attachmentsActions');
    this.attachmentsActions(Object(Common_Utils__WEBPACK_IMPORTED_MODULE_4__["isNonEmptyArray"])(attachmentsActions) ? attachmentsActions : []);
    this.devEmail = Storage_Settings__WEBPACK_IMPORTED_MODULE_5__["settingsGet"]('DevEmail');
    this.devPassword = Storage_Settings__WEBPACK_IMPORTED_MODULE_5__["settingsGet"]('DevPassword');
  };

  return AppUserStore;
}(Stores_AbstractApp__WEBPACK_IMPORTED_MODULE_6__[/* AbstractAppStore */ "a"]);

/* harmony default export */ __webpack_exports__["a"] = (new AppUserStore());

/***/ }),
/* 32 */
/*!*************************************************************!*\
  !*** ./node_modules/core-js/internals/well-known-symbol.js ***!
  \*************************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

var global = __webpack_require__(/*! ../internals/global */ 27);
var shared = __webpack_require__(/*! ../internals/shared */ 127);
var has = __webpack_require__(/*! ../internals/has */ 42);
var uid = __webpack_require__(/*! ../internals/uid */ 128);
var NATIVE_SYMBOL = __webpack_require__(/*! ../internals/native-symbol */ 130);
var USE_SYMBOL_AS_UID = __webpack_require__(/*! ../internals/use-symbol-as-uid */ 183);

var WellKnownSymbolsStore = shared('wks');
var Symbol = global.Symbol;
var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol : Symbol && Symbol.withoutSetter || uid;

module.exports = function (name) {
  if (!has(WellKnownSymbolsStore, name)) {
    if (NATIVE_SYMBOL && has(Symbol, name)) WellKnownSymbolsStore[name] = Symbol[name];
    else WellKnownSymbolsStore[name] = createWellKnownSymbol('Symbol.' + name);
  } return WellKnownSymbolsStore[name];
};


/***/ }),
/* 33 */
/*!**********************************************************************************!*\
  !*** ./node_modules/@babel/runtime-corejs3/helpers/esm/assertThisInitialized.js ***!
  \**********************************************************************************/
/*! exports provided: default */
/*! exports used: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _assertThisInitialized; });
function _assertThisInitialized(self) {
  if (self === void 0) {
    throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
  }

  return self;
}

/***/ }),
/* 34 */
/*!*******************************************************************************!*\
  !*** ./node_modules/@babel/runtime-corejs3/core-js-stable/instance/filter.js ***!
  \*******************************************************************************/
/*! no static exports found */
/*! exports used: default */
/***/ (function(module, exports, __webpack_require__) {

module.exports = __webpack_require__(/*! core-js-pure/stable/instance/filter */ 356);

/***/ }),
/* 35 */
/*!***********************************!*\
  !*** ./dev/Component/Abstract.js ***!
  \***********************************/
/*! exports provided: AbstractComponent, componentExportHelper */
/*! exports used: AbstractComponent, componentExportHelper */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return AbstractComponent; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return componentExportHelper; });
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/for-each */ 69);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _babel_runtime_corejs3_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/esm/defineProperty */ 17);
/* harmony import */ var $__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! $ */ 8);
/* harmony import */ var $__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n($__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var ko__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ko */ 1);
/* harmony import */ var Common_Utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! Common/Utils */ 2);
/* harmony import */ var Common_Translator__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! Common/Translator */ 9);







var AbstractComponent =
/*#__PURE__*/
function () {
  function AbstractComponent() {
    Object(_babel_runtime_corejs3_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(this, "disposable", []);
  }

  var _proto = AbstractComponent.prototype;

  _proto.dispose = function dispose() {
    var _context;

    _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_0___default()(_context = this.disposable).call(_context, function (funcToDispose) {
      if (funcToDispose && funcToDispose.dispose) {
        funcToDispose.dispose();
      }
    });
  };

  return AbstractComponent;
}();
/**
 * @param {*} ClassObject
 * @param {string} templateID = ''
 * @returns {Object}
 */


var componentExportHelper = function componentExportHelper(ClassObject, templateID) {
  if (templateID === void 0) {
    templateID = '';
  }

  return {
    template: templateID ? {
      element: templateID
    } : '<b></b>',
    viewModel: {
      createViewModel: function createViewModel(params, componentInfo) {
        params = params || {};
        params.element = null;

        if (componentInfo && componentInfo.element) {
          params.component = componentInfo;
          params.element = $__WEBPACK_IMPORTED_MODULE_2___default()(componentInfo.element);
          Object(Common_Translator__WEBPACK_IMPORTED_MODULE_5__["i18nToNodes"])(params.element);

          if (!Object(Common_Utils__WEBPACK_IMPORTED_MODULE_4__["isUnd"])(params.inline) && ko__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"].unwrap(params.inline)) {
            params.element.css('display', 'inline-block');
          }
        }

        return new ClassObject(params);
      }
    }
  };
};



/***/ }),
/* 36 */
/*!*************************************************!*\
  !*** ./node_modules/core-js/internals/fails.js ***!
  \*************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports) {

module.exports = function (exec) {
  try {
    return !!exec();
  } catch (error) {
    return true;
  }
};


/***/ }),
/* 37 */
/*!*****************************************************!*\
  !*** ./node_modules/core-js/internals/an-object.js ***!
  \*****************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

var isObject = __webpack_require__(/*! ../internals/is-object */ 44);

module.exports = function (it) {
  if (!isObject(it)) {
    throw TypeError(String(it) + ' is not an object');
  } return it;
};


/***/ }),
/* 38 */
/*!*************************************!*\
  !*** ./dev/Stores/User/Settings.js ***!
  \*************************************/
/*! exports provided: default */
/*! exports used: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var core_js_modules_web_timers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/web.timers */ 67);
/* harmony import */ var core_js_modules_web_timers__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_timers__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var window__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! window */ 4);
/* harmony import */ var window__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(window__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var ko__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ko */ 1);
/* harmony import */ var Common_Consts__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! Common/Consts */ 25);
/* harmony import */ var Common_Enums__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! Common/Enums */ 0);
/* harmony import */ var Common_Globals__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! Common/Globals */ 6);
/* harmony import */ var Common_Utils__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! Common/Utils */ 2);
/* harmony import */ var Common_Events__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! Common/Events */ 24);
/* harmony import */ var Storage_Settings__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! Storage/Settings */ 5);










var SettingsUserStore =
/*#__PURE__*/
function () {
  function SettingsUserStore() {
    this.iAutoLogoutTimer = 0;
    this.layout = ko__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"].observable(Common_Enums__WEBPACK_IMPORTED_MODULE_4__["Layout"].SidePreview).extend({
      limitedList: [Common_Enums__WEBPACK_IMPORTED_MODULE_4__["Layout"].SidePreview, Common_Enums__WEBPACK_IMPORTED_MODULE_4__["Layout"].BottomPreview, Common_Enums__WEBPACK_IMPORTED_MODULE_4__["Layout"].NoPreview]
    });
    this.editorDefaultType = ko__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"].observable(Common_Enums__WEBPACK_IMPORTED_MODULE_4__["EditorDefaultType"].Html).extend({
      limitedList: [Common_Enums__WEBPACK_IMPORTED_MODULE_4__["EditorDefaultType"].Html, Common_Enums__WEBPACK_IMPORTED_MODULE_4__["EditorDefaultType"].Plain, Common_Enums__WEBPACK_IMPORTED_MODULE_4__["EditorDefaultType"].HtmlForced, Common_Enums__WEBPACK_IMPORTED_MODULE_4__["EditorDefaultType"].PlainForced]
    });
    this.messagesPerPage = ko__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"].observable(Common_Consts__WEBPACK_IMPORTED_MODULE_3__[/* MESSAGES_PER_PAGE */ "i"]).extend({
      limitedList: Common_Consts__WEBPACK_IMPORTED_MODULE_3__[/* MESSAGES_PER_PAGE_VALUES */ "j"]
    });
    this.showImages = ko__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"].observable(false);
    this.useCheckboxesInList = ko__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"].observable(true);
    this.allowDraftAutosave = ko__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"].observable(true);
    this.useThreads = ko__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"].observable(false);
    this.replySameFolder = ko__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"].observable(false);
    this.autoLogout = ko__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"].observable(Common_Enums__WEBPACK_IMPORTED_MODULE_4__["Magics"].Time30mInMin);
    this.computers();
    this.subscribers();
  }

  var _proto = SettingsUserStore.prototype;

  _proto.computers = function computers() {
    var _this = this;

    this.usePreviewPane = ko__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"].computed(function () {
      return Common_Enums__WEBPACK_IMPORTED_MODULE_4__["Layout"].NoPreview !== _this.layout();
    });
  };

  _proto.subscribers = function subscribers() {
    this.layout.subscribe(function (value) {
      Common_Globals__WEBPACK_IMPORTED_MODULE_5__["$html"].toggleClass('rl-no-preview-pane', Common_Enums__WEBPACK_IMPORTED_MODULE_4__["Layout"].NoPreview === value);
      Common_Globals__WEBPACK_IMPORTED_MODULE_5__["$html"].toggleClass('rl-side-preview-pane', Common_Enums__WEBPACK_IMPORTED_MODULE_4__["Layout"].SidePreview === value);
      Common_Globals__WEBPACK_IMPORTED_MODULE_5__["$html"].toggleClass('rl-bottom-preview-pane', Common_Enums__WEBPACK_IMPORTED_MODULE_4__["Layout"].BottomPreview === value);
      Common_Events__WEBPACK_IMPORTED_MODULE_7__[/* pub */ "a"]('layout', [value]);
    });
  };

  _proto.populate = function populate() {
    var _this2 = this;

    this.layout(Object(Common_Utils__WEBPACK_IMPORTED_MODULE_6__["pInt"])(Storage_Settings__WEBPACK_IMPORTED_MODULE_8__["settingsGet"]('Layout')));
    this.editorDefaultType(Storage_Settings__WEBPACK_IMPORTED_MODULE_8__["settingsGet"]('EditorDefaultType'));
    this.autoLogout(Object(Common_Utils__WEBPACK_IMPORTED_MODULE_6__["pInt"])(Storage_Settings__WEBPACK_IMPORTED_MODULE_8__["settingsGet"]('AutoLogout')));
    this.messagesPerPage(Storage_Settings__WEBPACK_IMPORTED_MODULE_8__["settingsGet"]('MPP'));
    this.showImages(!!Storage_Settings__WEBPACK_IMPORTED_MODULE_8__["settingsGet"]('ShowImages'));
    this.useCheckboxesInList(!!Storage_Settings__WEBPACK_IMPORTED_MODULE_8__["settingsGet"]('UseCheckboxesInList'));
    this.allowDraftAutosave(!!Storage_Settings__WEBPACK_IMPORTED_MODULE_8__["settingsGet"]('AllowDraftAutosave'));
    this.useThreads(!!Storage_Settings__WEBPACK_IMPORTED_MODULE_8__["settingsGet"]('UseThreads'));
    this.replySameFolder(!!Storage_Settings__WEBPACK_IMPORTED_MODULE_8__["settingsGet"]('ReplySameFolder'));
    Common_Events__WEBPACK_IMPORTED_MODULE_7__[/* sub */ "b"]('rl.auto-logout-refresh', function () {
      window__WEBPACK_IMPORTED_MODULE_1___default.a.clearTimeout(_this2.iAutoLogoutTimer);

      if (0 < _this2.autoLogout() && !Storage_Settings__WEBPACK_IMPORTED_MODULE_8__["settingsGet"]('AccountSignMe')) {
        _this2.iAutoLogoutTimer = window__WEBPACK_IMPORTED_MODULE_1___default.a.setTimeout(function () {
          Common_Events__WEBPACK_IMPORTED_MODULE_7__[/* pub */ "a"]('rl.auto-logout');
        }, _this2.autoLogout() * Common_Enums__WEBPACK_IMPORTED_MODULE_4__["Magics"].Time1m);
      }
    });
    Common_Events__WEBPACK_IMPORTED_MODULE_7__[/* pub */ "a"]('rl.auto-logout-refresh');
  };

  return SettingsUserStore;
}();

/* harmony default export */ __webpack_exports__["a"] = (new SettingsUserStore());

/***/ }),
/* 39 */
/*!*******************************!*\
  !*** ./dev/Common/Plugins.js ***!
  \*******************************/
/*! exports provided: addHook, runHook, mainSettingsGet, remoteRequest, addSettingsViewModel, addSettingsViewModelForAdmin, runSettingsViewModelHooks, settingsGet */
/*! exports used: addHook, addSettingsViewModel, addSettingsViewModelForAdmin, mainSettingsGet, remoteRequest, runHook, runSettingsViewModelHooks, settingsGet */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return addHook; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return runHook; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return mainSettingsGet; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return remoteRequest; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return addSettingsViewModel; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return addSettingsViewModelForAdmin; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return runSettingsViewModelHooks; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return settingsGet; });
/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! _ */ 3);
/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(___WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var Common_Utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! Common/Utils */ 2);
/* harmony import */ var Common_Globals__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! Common/Globals */ 6);
/* harmony import */ var Storage_Settings__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! Storage/Settings */ 5);




var SIMPLE_HOOKS = {},
    USER_VIEW_MODELS_HOOKS = [],
    ADMIN_VIEW_MODELS_HOOKS = [];
/**
 * @param {string} name
 * @param {Function} callback
 */

function addHook(name, callback) {
  if (Object(Common_Utils__WEBPACK_IMPORTED_MODULE_1__["isFunc"])(callback)) {
    if (!Object(Common_Utils__WEBPACK_IMPORTED_MODULE_1__["isArray"])(SIMPLE_HOOKS[name])) {
      SIMPLE_HOOKS[name] = [];
    }

    SIMPLE_HOOKS[name].push(callback);
  }
}
/**
 * @param {string} name
 * @param {Array=} args = []
 */

function runHook(name, args) {
  if (args === void 0) {
    args = [];
  }

  if (Object(Common_Utils__WEBPACK_IMPORTED_MODULE_1__["isArray"])(SIMPLE_HOOKS[name])) {
    ___WEBPACK_IMPORTED_MODULE_0___default.a.each(SIMPLE_HOOKS[name], function (callback) {
      callback.apply(void 0, args);
    });
  }
}
/**
 * @param {string} name
 * @returns {?}
 */

function mainSettingsGet(name) {
  return Storage_Settings__WEBPACK_IMPORTED_MODULE_3__["settingsGet"](name);
}
/**
 * @param {Function} callback
 * @param {string} action
 * @param {Object=} parameters
 * @param {?number=} timeout
 */

function remoteRequest(callback, action, parameters, timeout) {
  if (Common_Globals__WEBPACK_IMPORTED_MODULE_2__["data"].__APP__) {
    Common_Globals__WEBPACK_IMPORTED_MODULE_2__["data"].__APP__.remote().defaultRequest(callback, 'Plugin' + action, parameters, timeout);
  }
}
/**
 * @param {Function} SettingsViewModelClass
 * @param {string} labelName
 * @param {string} template
 * @param {string} route
 */

function addSettingsViewModel(SettingsViewModelClass, template, labelName, route) {
  USER_VIEW_MODELS_HOOKS.push([SettingsViewModelClass, template, labelName, route]);
}
/**
 * @param {Function} SettingsViewModelClass
 * @param {string} labelName
 * @param {string} template
 * @param {string} route
 */

function addSettingsViewModelForAdmin(SettingsViewModelClass, template, labelName, route) {
  ADMIN_VIEW_MODELS_HOOKS.push([SettingsViewModelClass, template, labelName, route]);
}
/**
 * @param {boolean} admin
 */

function runSettingsViewModelHooks(admin) {
  var Knoin = __webpack_require__(/*! Knoin/Knoin */ 7);

  ___WEBPACK_IMPORTED_MODULE_0___default.a.each(admin ? ADMIN_VIEW_MODELS_HOOKS : USER_VIEW_MODELS_HOOKS, function (view) {
    Knoin.addSettingsViewModel(view[0], view[1], view[2], view[3]);
  });
}
/**
 * @param {string} pluginSection
 * @param {string} name
 * @returns {?}
 */

function settingsGet(pluginSection, name) {
  var plugins = Storage_Settings__WEBPACK_IMPORTED_MODULE_3__["settingsGet"]('Plugins');
  plugins = plugins && !Object(Common_Utils__WEBPACK_IMPORTED_MODULE_1__["isUnd"])(plugins[pluginSection]) ? plugins[pluginSection] : null;
  return plugins ? Object(Common_Utils__WEBPACK_IMPORTED_MODULE_1__["isUnd"])(plugins[name]) ? null : plugins[name] : null;
}

/***/ }),
/* 40 */,
/* 41 */
/*!********************************!*\
  !*** ./dev/Stores/User/Pgp.js ***!
  \********************************/
/*! exports provided: default */
/*! exports used: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var core_js_modules_es_array_join__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.array.join */ 74);
/* harmony import */ var core_js_modules_es_array_join__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_join__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/map */ 18);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_index_of__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/index-of */ 30);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_index_of__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_index_of__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/find */ 12);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/filter */ 34);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var ko__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ko */ 1);
/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! _ */ 3);
/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(___WEBPACK_IMPORTED_MODULE_6__);
/* harmony import */ var $__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! $ */ 8);
/* harmony import */ var $__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n($__WEBPACK_IMPORTED_MODULE_7__);
/* harmony import */ var Common_Translator__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! Common/Translator */ 9);
/* harmony import */ var Common_Utils__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! Common/Utils */ 2);
/* harmony import */ var Stores_User_Account__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! Stores/User/Account */ 46);
/* harmony import */ var Knoin_Knoin__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! Knoin/Knoin */ 7);













var PgpUserStore =
/*#__PURE__*/
function () {
  function PgpUserStore() {
    var _this = this;

    this.capaOpenPGP = ko__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"].observable(false);
    this.openpgp = null;
    this.openpgpkeys = ko__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"].observableArray([]);
    this.openpgpKeyring = null;
    this.openpgpkeysPublic = ko__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"].computed(function () {
      return _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_4___default()(___WEBPACK_IMPORTED_MODULE_6___default.a).call(___WEBPACK_IMPORTED_MODULE_6___default.a, _this.openpgpkeys(), function (item) {
        return !!(item && !item.isPrivate);
      });
    });
    this.openpgpkeysPrivate = ko__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"].computed(function () {
      return _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_4___default()(___WEBPACK_IMPORTED_MODULE_6___default.a).call(___WEBPACK_IMPORTED_MODULE_6___default.a, _this.openpgpkeys(), function (item) {
        return !!(item && item.isPrivate);
      });
    });
  }
  /**
   * @returns {boolean}
   */


  var _proto = PgpUserStore.prototype;

  _proto.isSupported = function isSupported() {
    return !!this.openpgp;
  };

  _proto.findKeyByHex = function findKeyByHex(keys, hash) {
    return _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_3___default()(___WEBPACK_IMPORTED_MODULE_6___default.a).call(___WEBPACK_IMPORTED_MODULE_6___default.a, keys, function (item) {
      var _context;

      return hash && item && (hash === item.id || -1 < _babel_runtime_corejs3_core_js_stable_instance_index_of__WEBPACK_IMPORTED_MODULE_2___default()(_context = item.ids).call(_context, hash));
    });
  };

  _proto.findPublicKeyByHex = function findPublicKeyByHex(hash) {
    return this.findKeyByHex(this.openpgpkeysPublic(), hash);
  };

  _proto.findPrivateKeyByHex = function findPrivateKeyByHex(hash) {
    return this.findKeyByHex(this.openpgpkeysPrivate(), hash);
  };

  _proto.findPublicKeysByEmail = function findPublicKeysByEmail(email) {
    return ___WEBPACK_IMPORTED_MODULE_6___default.a.compact(___WEBPACK_IMPORTED_MODULE_6___default.a.flatten(_babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_1___default()(___WEBPACK_IMPORTED_MODULE_6___default.a).call(___WEBPACK_IMPORTED_MODULE_6___default.a, this.openpgpkeysPublic(), function (item) {
      var _context2;

      var key = item && -1 < _babel_runtime_corejs3_core_js_stable_instance_index_of__WEBPACK_IMPORTED_MODULE_2___default()(_context2 = item.emails).call(_context2, email) ? item : null;
      return key ? key.getNativeKeys() : [null];
    }), true));
  };

  _proto.findPublicKeysBySigningKeyIds = function findPublicKeysBySigningKeyIds(signingKeyIds) {
    var _this2 = this;

    return ___WEBPACK_IMPORTED_MODULE_6___default.a.compact(___WEBPACK_IMPORTED_MODULE_6___default.a.flatten(_babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_1___default()(___WEBPACK_IMPORTED_MODULE_6___default.a).call(___WEBPACK_IMPORTED_MODULE_6___default.a, signingKeyIds, function (id) {
      var key = id && id.toHex ? _this2.findPublicKeyByHex(id.toHex()) : null;
      return key ? key.getNativeKeys() : [null];
    }), true));
  };

  _proto.findPrivateKeysByEncryptionKeyIds = function findPrivateKeysByEncryptionKeyIds(encryptionKeyIds, recipients, returnWrapKeys) {
    var _this3 = this;

    var result = Object(Common_Utils__WEBPACK_IMPORTED_MODULE_9__["isArray"])(encryptionKeyIds) ? ___WEBPACK_IMPORTED_MODULE_6___default.a.compact(___WEBPACK_IMPORTED_MODULE_6___default.a.flatten(_babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_1___default()(___WEBPACK_IMPORTED_MODULE_6___default.a).call(___WEBPACK_IMPORTED_MODULE_6___default.a, encryptionKeyIds, function (id) {
      var key = id && id.toHex ? _this3.findPrivateKeyByHex(id.toHex()) : null;
      return key ? returnWrapKeys ? [key] : key.getNativeKeys() : [null];
    }), true)) : [];

    if (0 === result.length && Object(Common_Utils__WEBPACK_IMPORTED_MODULE_9__["isNonEmptyArray"])(recipients)) {
      result = ___WEBPACK_IMPORTED_MODULE_6___default.a.uniq(___WEBPACK_IMPORTED_MODULE_6___default.a.compact(___WEBPACK_IMPORTED_MODULE_6___default.a.flatten(_babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_1___default()(___WEBPACK_IMPORTED_MODULE_6___default.a).call(___WEBPACK_IMPORTED_MODULE_6___default.a, recipients, function (sEmail) {
        var keys = sEmail ? _this3.findAllPrivateKeysByEmailNotNative(sEmail) : null;
        return keys ? returnWrapKeys ? keys : ___WEBPACK_IMPORTED_MODULE_6___default.a.flatten(_babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_1___default()(___WEBPACK_IMPORTED_MODULE_6___default.a).call(___WEBPACK_IMPORTED_MODULE_6___default.a, keys, function (key) {
          return key.getNativeKeys();
        }), true) : [null];
      }), true)), function (key) {
        return key.id;
      });
    }

    return result;
  }
  /**
   * @param {string} email
   * @returns {?}
   */
  ;

  _proto.findPublicKeyByEmailNotNative = function findPublicKeyByEmailNotNative(email) {
    return _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_3___default()(___WEBPACK_IMPORTED_MODULE_6___default.a).call(___WEBPACK_IMPORTED_MODULE_6___default.a, this.openpgpkeysPublic(), function (item) {
      var _context3;

      return item && -1 < _babel_runtime_corejs3_core_js_stable_instance_index_of__WEBPACK_IMPORTED_MODULE_2___default()(_context3 = item.emails).call(_context3, email);
    }) || null;
  }
  /**
   * @param {string} email
   * @returns {?}
   */
  ;

  _proto.findPrivateKeyByEmailNotNative = function findPrivateKeyByEmailNotNative(email) {
    return _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_3___default()(___WEBPACK_IMPORTED_MODULE_6___default.a).call(___WEBPACK_IMPORTED_MODULE_6___default.a, this.openpgpkeysPrivate(), function (item) {
      var _context4;

      return item && -1 < _babel_runtime_corejs3_core_js_stable_instance_index_of__WEBPACK_IMPORTED_MODULE_2___default()(_context4 = item.emails).call(_context4, email);
    }) || null;
  }
  /**
   * @param {string} email
   * @returns {?}
   */
  ;

  _proto.findAllPublicKeysByEmailNotNative = function findAllPublicKeysByEmailNotNative(email) {
    return _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_4___default()(___WEBPACK_IMPORTED_MODULE_6___default.a).call(___WEBPACK_IMPORTED_MODULE_6___default.a, this.openpgpkeysPublic(), function (item) {
      var _context5;

      return item && -1 < _babel_runtime_corejs3_core_js_stable_instance_index_of__WEBPACK_IMPORTED_MODULE_2___default()(_context5 = item.emails).call(_context5, email);
    }) || null;
  }
  /**
   * @param {string} email
   * @returns {?}
   */
  ;

  _proto.findAllPrivateKeysByEmailNotNative = function findAllPrivateKeysByEmailNotNative(email) {
    return _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_4___default()(___WEBPACK_IMPORTED_MODULE_6___default.a).call(___WEBPACK_IMPORTED_MODULE_6___default.a, this.openpgpkeysPrivate(), function (item) {
      var _context6;

      return item && -1 < _babel_runtime_corejs3_core_js_stable_instance_index_of__WEBPACK_IMPORTED_MODULE_2___default()(_context6 = item.emails).call(_context6, email);
    }) || null;
  }
  /**
   * @param {string} email
   * @param {string=} password
   * @returns {?}
   */
  ;

  _proto.findPrivateKeyByEmail = function findPrivateKeyByEmail(email, password) {
    var privateKey = null;

    var key = _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_3___default()(___WEBPACK_IMPORTED_MODULE_6___default.a).call(___WEBPACK_IMPORTED_MODULE_6___default.a, this.openpgpkeysPrivate(), function (item) {
      var _context7;

      return item && -1 < _babel_runtime_corejs3_core_js_stable_instance_index_of__WEBPACK_IMPORTED_MODULE_2___default()(_context7 = item.emails).call(_context7, email);
    });

    if (key) {
      try {
        privateKey = key.getNativeKeys()[0] || null;

        if (privateKey) {
          privateKey.decrypt(Object(Common_Utils__WEBPACK_IMPORTED_MODULE_9__["pString"])(password));
        }
      } catch (e) {
        privateKey = null;
      }
    }

    return privateKey;
  }
  /**
   * @param {string=} password
   * @returns {?}
   */
  ;

  _proto.findSelfPrivateKey = function findSelfPrivateKey(password) {
    return this.findPrivateKeyByEmail(Stores_User_Account__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"].email(), password);
  };

  _proto.decryptMessage = function decryptMessage(message, recipients, fCallback) {
    var _this4 = this;

    if (message && message.getEncryptionKeyIds) {
      var privateKeys = this.findPrivateKeysByEncryptionKeyIds(message.getEncryptionKeyIds(), recipients, true);

      if (privateKeys && 0 < privateKeys.length) {
        Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_11__["showScreenPopup"])(__webpack_require__(/*! View/Popup/MessageOpenPgp */ 522), [function (decryptedKey) {
          if (decryptedKey) {
            message.decrypt(decryptedKey).then(function (decryptedMessage) {
              var privateKey = null;

              if (decryptedMessage) {
                privateKey = _this4.findPrivateKeyByHex(decryptedKey.primaryKey.keyid.toHex());

                if (privateKey) {
                  _this4.verifyMessage(decryptedMessage, function (oValidKey, aSigningKeyIds) {
                    fCallback(privateKey, decryptedMessage, oValidKey || null, aSigningKeyIds || null);
                  });
                } else {
                  fCallback(privateKey, decryptedMessage);
                }
              } else {
                fCallback(privateKey, decryptedMessage);
              }
            }, function () {
              fCallback(null, null);
            });
          } else {
            fCallback(null, null);
          }
        }, privateKeys]);
        return false;
      }
    }

    fCallback(null, null);
    return false;
  };

  _proto.verifyMessage = function verifyMessage(message, fCallback) {
    if (message && message.getSigningKeyIds) {
      var signingKeyIds = message.getSigningKeyIds();

      if (signingKeyIds && 0 < signingKeyIds.length) {
        var publicKeys = this.findPublicKeysBySigningKeyIds(signingKeyIds);

        if (publicKeys && 0 < publicKeys.length) {
          try {
            var result = message.verify(publicKeys),
                valid = _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_3___default()(___WEBPACK_IMPORTED_MODULE_6___default.a).call(___WEBPACK_IMPORTED_MODULE_6___default.a, ___WEBPACK_IMPORTED_MODULE_6___default.a.isArray(result) ? result : [], function (item) {
              return item && item.valid && item.keyid;
            });

            if (valid && valid.keyid && valid.keyid && valid.keyid.toHex) {
              fCallback(this.findPublicKeyByHex(valid.keyid.toHex()));
              return true;
            }
          } catch (e) {
            Object(Common_Utils__WEBPACK_IMPORTED_MODULE_9__["log"])(e);
          }
        }

        fCallback(null, signingKeyIds);
        return false;
      }
    }

    fCallback(null);
    return false;
  };

  _proto.controlsHelper = function controlsHelper(dom, verControl, success, title, text) {
    if (success) {
      dom.removeClass('error').addClass('success').attr('title', title);
      verControl.removeClass('error').addClass('success').attr('title', title);
    } else {
      dom.removeClass('success').addClass('error').attr('title', title);
      verControl.removeClass('success').addClass('error').attr('title', title);
    }

    if (!Object(Common_Utils__WEBPACK_IMPORTED_MODULE_9__["isUnd"])(text)) {
      dom.text(Object(Common_Utils__WEBPACK_IMPORTED_MODULE_9__["trim"])(text));
    }
  };

  PgpUserStore.domControlEncryptedClickHelper = function domControlEncryptedClickHelper(store, dom, armoredMessage, recipients) {
    return function () {
      var message = null;
      var $this = $__WEBPACK_IMPORTED_MODULE_7___default()(this); // eslint-disable-line no-invalid-this

      if ($this.hasClass('success')) {
        return false;
      }

      try {
        message = store.openpgp.message.readArmored(armoredMessage);
      } catch (e) {
        Object(Common_Utils__WEBPACK_IMPORTED_MODULE_9__["log"])(e);
      }

      if (message && message.getText && message.verify && message.decrypt) {
        store.decryptMessage(message, recipients, function (validPrivateKey, decryptedMessage, validPublicKey, signingKeyIds) {
          if (decryptedMessage) {
            if (validPublicKey) {
              store.controlsHelper(dom, $this, true, Object(Common_Translator__WEBPACK_IMPORTED_MODULE_8__["i18n"])('PGP_NOTIFICATIONS/GOOD_SIGNATURE', {
                'USER': validPublicKey.user + ' (' + validPublicKey.id + ')'
              }), decryptedMessage.getText());
            } else if (validPrivateKey) {
              var keyIds = Object(Common_Utils__WEBPACK_IMPORTED_MODULE_9__["isNonEmptyArray"])(signingKeyIds) ? signingKeyIds : null,
                  additional = keyIds ? ___WEBPACK_IMPORTED_MODULE_6___default.a.compact(_babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_1___default()(___WEBPACK_IMPORTED_MODULE_6___default.a).call(___WEBPACK_IMPORTED_MODULE_6___default.a, keyIds, function (item) {
                return item && item.toHex ? item.toHex() : null;
              })).join(', ') : '';
              store.controlsHelper(dom, $this, false, Object(Common_Translator__WEBPACK_IMPORTED_MODULE_8__["i18n"])('PGP_NOTIFICATIONS/UNVERIFIRED_SIGNATURE') + (additional ? ' (' + additional + ')' : ''), decryptedMessage.getText());
            } else {
              store.controlsHelper(dom, $this, false, Object(Common_Translator__WEBPACK_IMPORTED_MODULE_8__["i18n"])('PGP_NOTIFICATIONS/DECRYPTION_ERROR'));
            }
          } else {
            store.controlsHelper(dom, $this, false, Object(Common_Translator__WEBPACK_IMPORTED_MODULE_8__["i18n"])('PGP_NOTIFICATIONS/DECRYPTION_ERROR'));
          }
        });
        return false;
      }

      store.controlsHelper(dom, $this, false, Object(Common_Translator__WEBPACK_IMPORTED_MODULE_8__["i18n"])('PGP_NOTIFICATIONS/DECRYPTION_ERROR'));
      return false;
    };
  };

  PgpUserStore.domControlSignedClickHelper = function domControlSignedClickHelper(store, dom, armoredMessage) {
    return function () {
      var message = null;
      var $this = $__WEBPACK_IMPORTED_MODULE_7___default()(this); // eslint-disable-line no-invalid-this

      if ($this.hasClass('success') || $this.hasClass('error')) {
        return false;
      }

      try {
        message = store.openpgp.cleartext.readArmored(armoredMessage);
      } catch (e) {
        Object(Common_Utils__WEBPACK_IMPORTED_MODULE_9__["log"])(e);
      }

      if (message && message.getText && message.verify) {
        store.verifyMessage(message, function (validKey, signingKeyIds) {
          if (validKey) {
            store.controlsHelper(dom, $this, true, Object(Common_Translator__WEBPACK_IMPORTED_MODULE_8__["i18n"])('PGP_NOTIFICATIONS/GOOD_SIGNATURE', {
              'USER': validKey.user + ' (' + validKey.id + ')'
            }), message.getText());
          } else {
            var keyIds = Object(Common_Utils__WEBPACK_IMPORTED_MODULE_9__["isNonEmptyArray"])(signingKeyIds) ? signingKeyIds : null,
                additional = keyIds ? ___WEBPACK_IMPORTED_MODULE_6___default.a.compact(_babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_1___default()(___WEBPACK_IMPORTED_MODULE_6___default.a).call(___WEBPACK_IMPORTED_MODULE_6___default.a, keyIds, function (item) {
              return item && item.toHex ? item.toHex() : null;
            })).join(', ') : '';
            store.controlsHelper(dom, $this, false, Object(Common_Translator__WEBPACK_IMPORTED_MODULE_8__["i18n"])('PGP_NOTIFICATIONS/UNVERIFIRED_SIGNATURE') + (additional ? ' (' + additional + ')' : ''));
          }
        });
        return false;
      }

      store.controlsHelper(dom, $this, false, Object(Common_Translator__WEBPACK_IMPORTED_MODULE_8__["i18n"])('PGP_NOTIFICATIONS/DECRYPTION_ERROR'));
      return false;
    };
  }
  /**
   * @param {*} dom
   * @param {MessageModel} rainLoopMessage
   */
  ;

  _proto.initMessageBodyControls = function initMessageBodyControls(dom, rainLoopMessage) {
    if (dom && !dom.hasClass('inited')) {
      dom.addClass('inited');
      var encrypted = dom.hasClass('encrypted'),
          signed = dom.hasClass('signed'),
          recipients = rainLoopMessage ? rainLoopMessage.getEmails(['from', 'to', 'cc']) : [];
      var verControl = null;

      if (encrypted || signed) {
        var domText = dom.text();
        dom.data('openpgp-original', domText);

        if (encrypted) {
          verControl = $__WEBPACK_IMPORTED_MODULE_7___default()('<div class="b-openpgp-control"><i class="icon-lock"></i></div>').attr('title', Object(Common_Translator__WEBPACK_IMPORTED_MODULE_8__["i18n"])('MESSAGE/PGP_ENCRYPTED_MESSAGE_DESC')).on('click', PgpUserStore.domControlEncryptedClickHelper(this, dom, domText, recipients));
        } else if (signed) {
          verControl = $__WEBPACK_IMPORTED_MODULE_7___default()('<div class="b-openpgp-control"><i class="icon-lock"></i></div>').attr('title', Object(Common_Translator__WEBPACK_IMPORTED_MODULE_8__["i18n"])('MESSAGE/PGP_SIGNED_MESSAGE_DESC')).on('click', PgpUserStore.domControlSignedClickHelper(this, dom, domText));
        }

        if (verControl) {
          dom.before(verControl).before('<div></div>');
        }
      }
    }
  };

  return PgpUserStore;
}();

/* harmony default export */ __webpack_exports__["a"] = (new PgpUserStore());

/***/ }),
/* 42 */
/*!***********************************************!*\
  !*** ./node_modules/core-js/internals/has.js ***!
  \***********************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports) {

var hasOwnProperty = {}.hasOwnProperty;

module.exports = function (it, key) {
  return hasOwnProperty.call(it, key);
};


/***/ }),
/* 43 */
/*!*******************************************************!*\
  !*** ./node_modules/core-js-pure/internals/export.js ***!
  \*******************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var global = __webpack_require__(/*! ../internals/global */ 75);
var getOwnPropertyDescriptor = __webpack_require__(/*! ../internals/object-get-own-property-descriptor */ 235).f;
var isForced = __webpack_require__(/*! ../internals/is-forced */ 289);
var path = __webpack_require__(/*! ../internals/path */ 96);
var bind = __webpack_require__(/*! ../internals/bind-context */ 238);
var hide = __webpack_require__(/*! ../internals/hide */ 83);
var has = __webpack_require__(/*! ../internals/has */ 95);

var wrapConstructor = function (NativeConstructor) {
  var Wrapper = function (a, b, c) {
    if (this instanceof NativeConstructor) {
      switch (arguments.length) {
        case 0: return new NativeConstructor();
        case 1: return new NativeConstructor(a);
        case 2: return new NativeConstructor(a, b);
      } return new NativeConstructor(a, b, c);
    } return NativeConstructor.apply(this, arguments);
  };
  Wrapper.prototype = NativeConstructor.prototype;
  return Wrapper;
};

/*
  options.target      - name of the target object
  options.global      - target is the global object
  options.stat        - export as static methods of target
  options.proto       - export as prototype methods of target
  options.real        - real prototype method for the `pure` version
  options.forced      - export even if the native feature is available
  options.bind        - bind methods to the target, required for the `pure` version
  options.wrap        - wrap constructors to preventing global pollution, required for the `pure` version
  options.unsafe      - use the simple assignment of property instead of delete + defineProperty
  options.sham        - add a flag to not completely full polyfills
  options.enumerable  - export as enumerable property
  options.noTargetGet - prevent calling a getter on target
*/
module.exports = function (options, source) {
  var TARGET = options.target;
  var GLOBAL = options.global;
  var STATIC = options.stat;
  var PROTO = options.proto;

  var nativeSource = GLOBAL ? global : STATIC ? global[TARGET] : (global[TARGET] || {}).prototype;

  var target = GLOBAL ? path : path[TARGET] || (path[TARGET] = {});
  var targetPrototype = target.prototype;

  var FORCED, USE_NATIVE, VIRTUAL_PROTOTYPE;
  var key, sourceProperty, targetProperty, nativeProperty, resultProperty, descriptor;

  for (key in source) {
    FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
    // contains in native
    USE_NATIVE = !FORCED && nativeSource && has(nativeSource, key);

    targetProperty = target[key];

    if (USE_NATIVE) if (options.noTargetGet) {
      descriptor = getOwnPropertyDescriptor(nativeSource, key);
      nativeProperty = descriptor && descriptor.value;
    } else nativeProperty = nativeSource[key];

    // export native or implementation
    sourceProperty = (USE_NATIVE && nativeProperty) ? nativeProperty : source[key];

    if (USE_NATIVE && typeof targetProperty === typeof sourceProperty) continue;

    // bind timers to global for call from export context
    if (options.bind && USE_NATIVE) resultProperty = bind(sourceProperty, global);
    // wrap global constructors for prevent changs in this version
    else if (options.wrap && USE_NATIVE) resultProperty = wrapConstructor(sourceProperty);
    // make static versions for prototype methods
    else if (PROTO && typeof sourceProperty == 'function') resultProperty = bind(Function.call, sourceProperty);
    // default case
    else resultProperty = sourceProperty;

    // add a flag to not completely full polyfills
    if (options.sham || (sourceProperty && sourceProperty.sham) || (targetProperty && targetProperty.sham)) {
      hide(resultProperty, 'sham', true);
    }

    target[key] = resultProperty;

    if (PROTO) {
      VIRTUAL_PROTOTYPE = TARGET + 'Prototype';
      if (!has(path, VIRTUAL_PROTOTYPE)) hide(path, VIRTUAL_PROTOTYPE, {});
      // export virtual prototype methods
      path[VIRTUAL_PROTOTYPE][key] = sourceProperty;
      // export real prototype methods
      if (options.real && targetPrototype && !targetPrototype[key]) hide(targetPrototype, key, sourceProperty);
    }
  }
};


/***/ }),
/* 44 */
/*!*****************************************************!*\
  !*** ./node_modules/core-js/internals/is-object.js ***!
  \*****************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports) {

module.exports = function (it) {
  return typeof it === 'object' ? it !== null : typeof it === 'function';
};


/***/ }),
/* 45 */
/*!********************************************************!*\
  !*** ./node_modules/core-js/modules/es.regexp.exec.js ***!
  \********************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var $ = __webpack_require__(/*! ../internals/export */ 48);
var exec = __webpack_require__(/*! ../internals/regexp-exec */ 110);

$({ target: 'RegExp', proto: true, forced: /./.exec !== exec }, {
  exec: exec
});


/***/ }),
/* 46 */
/*!************************************!*\
  !*** ./dev/Stores/User/Account.js ***!
  \************************************/
/*! exports provided: default */
/*! exports used: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/map */ 18);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var ko__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ko */ 1);
/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! _ */ 3);
/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(___WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var Common_Enums__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! Common/Enums */ 0);
/* harmony import */ var Storage_Settings__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! Storage/Settings */ 5);






var AccountUserStore =
/*#__PURE__*/
function () {
  function AccountUserStore() {
    this.email = ko__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"].observable('');
    this.parentEmail = ko__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"].observable('');
    this.signature = ko__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"].observable('');
    this.accounts = ko__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"].observableArray([]);
    this.accounts.loading = ko__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"].observable(false).extend({
      throttle: Common_Enums__WEBPACK_IMPORTED_MODULE_3__["Magics"].Time100ms
    });
    this.computers();
  }

  var _proto = AccountUserStore.prototype;

  _proto.computers = function computers() {
    var _this = this;

    this.accountsEmails = ko__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"].computed(function () {
      return ___WEBPACK_IMPORTED_MODULE_2___default.a.compact(_babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_0___default()(___WEBPACK_IMPORTED_MODULE_2___default.a).call(___WEBPACK_IMPORTED_MODULE_2___default.a, _this.accounts(), function (item) {
        return item ? item.email : null;
      }));
    });
    this.accountsUnreadCount = ko__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"].computed(function () {
      return 0;
    }); // this.accountsUnreadCount = ko.computed(() => {
    // 	let result = 0;
    // 	_.each(this.accounts(), (item) => {
    // 		if (item)
    // 		{
    // 			result += item.count();
    // 		}
    // 	});
    // 	return result;
    // });
  };

  _proto.populate = function populate() {
    this.email(Storage_Settings__WEBPACK_IMPORTED_MODULE_4__["settingsGet"]('Email'));
    this.parentEmail(Storage_Settings__WEBPACK_IMPORTED_MODULE_4__["settingsGet"]('ParentEmail'));
  }
  /**
   * @returns {boolean}
   */
  ;

  _proto.isRootAccount = function isRootAccount() {
    return '' === this.parentEmail();
  };

  return AccountUserStore;
}();

/* harmony default export */ __webpack_exports__["a"] = (new AccountUserStore());

/***/ }),
/* 47 */
/*!*******************************************************!*\
  !*** ./node_modules/core-js/internals/descriptors.js ***!
  \*******************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

var fails = __webpack_require__(/*! ../internals/fails */ 36);

// Thank's IE8 for his funny defineProperty
module.exports = !fails(function () {
  return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;
});


/***/ }),
/* 48 */
/*!**************************************************!*\
  !*** ./node_modules/core-js/internals/export.js ***!
  \**************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

var global = __webpack_require__(/*! ../internals/global */ 27);
var getOwnPropertyDescriptor = __webpack_require__(/*! ../internals/object-get-own-property-descriptor */ 89).f;
var createNonEnumerableProperty = __webpack_require__(/*! ../internals/create-non-enumerable-property */ 49);
var redefine = __webpack_require__(/*! ../internals/redefine */ 53);
var setGlobal = __webpack_require__(/*! ../internals/set-global */ 91);
var copyConstructorProperties = __webpack_require__(/*! ../internals/copy-constructor-properties */ 179);
var isForced = __webpack_require__(/*! ../internals/is-forced */ 129);

/*
  options.target      - name of the target object
  options.global      - target is the global object
  options.stat        - export as static methods of target
  options.proto       - export as prototype methods of target
  options.real        - real prototype method for the `pure` version
  options.forced      - export even if the native feature is available
  options.bind        - bind methods to the target, required for the `pure` version
  options.wrap        - wrap constructors to preventing global pollution, required for the `pure` version
  options.unsafe      - use the simple assignment of property instead of delete + defineProperty
  options.sham        - add a flag to not completely full polyfills
  options.enumerable  - export as enumerable property
  options.noTargetGet - prevent calling a getter on target
*/
module.exports = function (options, source) {
  var TARGET = options.target;
  var GLOBAL = options.global;
  var STATIC = options.stat;
  var FORCED, target, key, targetProperty, sourceProperty, descriptor;
  if (GLOBAL) {
    target = global;
  } else if (STATIC) {
    target = global[TARGET] || setGlobal(TARGET, {});
  } else {
    target = (global[TARGET] || {}).prototype;
  }
  if (target) for (key in source) {
    sourceProperty = source[key];
    if (options.noTargetGet) {
      descriptor = getOwnPropertyDescriptor(target, key);
      targetProperty = descriptor && descriptor.value;
    } else targetProperty = target[key];
    FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
    // contained in target
    if (!FORCED && targetProperty !== undefined) {
      if (typeof sourceProperty === typeof targetProperty) continue;
      copyConstructorProperties(sourceProperty, targetProperty);
    }
    // add a flag to not completely full polyfills
    if (options.sham || (targetProperty && targetProperty.sham)) {
      createNonEnumerableProperty(sourceProperty, 'sham', true);
    }
    // extend global
    redefine(target, key, sourceProperty, options);
  }
};


/***/ }),
/* 49 */
/*!**************************************************************************!*\
  !*** ./node_modules/core-js/internals/create-non-enumerable-property.js ***!
  \**************************************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ 47);
var definePropertyModule = __webpack_require__(/*! ../internals/object-define-property */ 52);
var createPropertyDescriptor = __webpack_require__(/*! ../internals/create-property-descriptor */ 90);

module.exports = DESCRIPTORS ? function (object, key, value) {
  return definePropertyModule.f(object, key, createPropertyDescriptor(1, value));
} : function (object, key, value) {
  object[key] = value;
  return object;
};


/***/ }),
/* 50 */
/*!*******************************************************!*\
  !*** ./node_modules/core-js/internals/classof-raw.js ***!
  \*******************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports) {

var toString = {}.toString;

module.exports = function (it) {
  return toString.call(it).slice(8, -1);
};


/***/ }),
/* 51 */
/*!**********************************************************!*\
  !*** ./node_modules/core-js/modules/es.function.name.js ***!
  \**********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ 47);
var defineProperty = __webpack_require__(/*! ../internals/object-define-property */ 52).f;

var FunctionPrototype = Function.prototype;
var FunctionPrototypeToString = FunctionPrototype.toString;
var nameRE = /^\s*function ([^ (]*)/;
var NAME = 'name';

// Function instances `.name` property
// https://tc39.github.io/ecma262/#sec-function-instances-name
if (DESCRIPTORS && !(NAME in FunctionPrototype)) {
  defineProperty(FunctionPrototype, NAME, {
    configurable: true,
    get: function () {
      try {
        return FunctionPrototypeToString.call(this).match(nameRE)[1];
      } catch (error) {
        return '';
      }
    }
  });
}


/***/ }),
/* 52 */
/*!******************************************************************!*\
  !*** ./node_modules/core-js/internals/object-define-property.js ***!
  \******************************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ 47);
var IE8_DOM_DEFINE = __webpack_require__(/*! ../internals/ie8-dom-define */ 125);
var anObject = __webpack_require__(/*! ../internals/an-object */ 37);
var toPrimitive = __webpack_require__(/*! ../internals/to-primitive */ 124);

var nativeDefineProperty = Object.defineProperty;

// `Object.defineProperty` method
// https://tc39.github.io/ecma262/#sec-object.defineproperty
exports.f = DESCRIPTORS ? nativeDefineProperty : function defineProperty(O, P, Attributes) {
  anObject(O);
  P = toPrimitive(P, true);
  anObject(Attributes);
  if (IE8_DOM_DEFINE) try {
    return nativeDefineProperty(O, P, Attributes);
  } catch (error) { /* empty */ }
  if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported');
  if ('value' in Attributes) O[P] = Attributes.value;
  return O;
};


/***/ }),
/* 53 */
/*!****************************************************!*\
  !*** ./node_modules/core-js/internals/redefine.js ***!
  \****************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

var global = __webpack_require__(/*! ../internals/global */ 27);
var createNonEnumerableProperty = __webpack_require__(/*! ../internals/create-non-enumerable-property */ 49);
var has = __webpack_require__(/*! ../internals/has */ 42);
var setGlobal = __webpack_require__(/*! ../internals/set-global */ 91);
var inspectSource = __webpack_require__(/*! ../internals/inspect-source */ 92);
var InternalStateModule = __webpack_require__(/*! ../internals/internal-state */ 86);

var getInternalState = InternalStateModule.get;
var enforceInternalState = InternalStateModule.enforce;
var TEMPLATE = String(String).split('String');

(module.exports = function (O, key, value, options) {
  var unsafe = options ? !!options.unsafe : false;
  var simple = options ? !!options.enumerable : false;
  var noTargetGet = options ? !!options.noTargetGet : false;
  if (typeof value == 'function') {
    if (typeof key == 'string' && !has(value, 'name')) createNonEnumerableProperty(value, 'name', key);
    enforceInternalState(value).source = TEMPLATE.join(typeof key == 'string' ? key : '');
  }
  if (O === global) {
    if (simple) O[key] = value;
    else setGlobal(key, value);
    return;
  } else if (!unsafe) {
    delete O[key];
  } else if (!noTargetGet && O[key]) {
    simple = true;
  }
  if (simple) O[key] = value;
  else createNonEnumerableProperty(O, key, value);
// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
})(Function.prototype, 'toString', function toString() {
  return typeof this == 'function' && getInternalState(this).source || inspectSource(this);
});


/***/ }),
/* 54 */
/*!**************************************************************!*\
  !*** ./node_modules/core-js-pure/internals/entry-virtual.js ***!
  \**************************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

var path = __webpack_require__(/*! ../internals/path */ 96);

module.exports = function (CONSTRUCTOR) {
  return path[CONSTRUCTOR + 'Prototype'];
};


/***/ }),
/* 55 */
/*!********************************************************************!*\
  !*** ./node_modules/core-js/internals/require-object-coercible.js ***!
  \********************************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports) {

// `RequireObjectCoercible` abstract operation
// https://tc39.github.io/ecma262/#sec-requireobjectcoercible
module.exports = function (it) {
  if (it == undefined) throw TypeError("Can't call method on " + it);
  return it;
};


/***/ }),
/* 56 */
/*!***********************************************************!*\
  !*** ./node_modules/core-js/modules/es.string.replace.js ***!
  \***********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var fixRegExpWellKnownSymbolLogic = __webpack_require__(/*! ../internals/fix-regexp-well-known-symbol-logic */ 134);
var anObject = __webpack_require__(/*! ../internals/an-object */ 37);
var toObject = __webpack_require__(/*! ../internals/to-object */ 119);
var toLength = __webpack_require__(/*! ../internals/to-length */ 72);
var toInteger = __webpack_require__(/*! ../internals/to-integer */ 79);
var requireObjectCoercible = __webpack_require__(/*! ../internals/require-object-coercible */ 55);
var advanceStringIndex = __webpack_require__(/*! ../internals/advance-string-index */ 152);
var regExpExec = __webpack_require__(/*! ../internals/regexp-exec-abstract */ 135);

var max = Math.max;
var min = Math.min;
var floor = Math.floor;
var SUBSTITUTION_SYMBOLS = /\$([$&'`]|\d\d?|<[^>]*>)/g;
var SUBSTITUTION_SYMBOLS_NO_NAMED = /\$([$&'`]|\d\d?)/g;

var maybeToString = function (it) {
  return it === undefined ? it : String(it);
};

// @@replace logic
fixRegExpWellKnownSymbolLogic('replace', 2, function (REPLACE, nativeReplace, maybeCallNative, reason) {
  var REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE = reason.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE;
  var REPLACE_KEEPS_$0 = reason.REPLACE_KEEPS_$0;
  var UNSAFE_SUBSTITUTE = REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE ? '$' : '$0';

  return [
    // `String.prototype.replace` method
    // https://tc39.github.io/ecma262/#sec-string.prototype.replace
    function replace(searchValue, replaceValue) {
      var O = requireObjectCoercible(this);
      var replacer = searchValue == undefined ? undefined : searchValue[REPLACE];
      return replacer !== undefined
        ? replacer.call(searchValue, O, replaceValue)
        : nativeReplace.call(String(O), searchValue, replaceValue);
    },
    // `RegExp.prototype[@@replace]` method
    // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@replace
    function (regexp, replaceValue) {
      if (
        (!REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE && REPLACE_KEEPS_$0) ||
        (typeof replaceValue === 'string' && replaceValue.indexOf(UNSAFE_SUBSTITUTE) === -1)
      ) {
        var res = maybeCallNative(nativeReplace, regexp, this, replaceValue);
        if (res.done) return res.value;
      }

      var rx = anObject(regexp);
      var S = String(this);

      var functionalReplace = typeof replaceValue === 'function';
      if (!functionalReplace) replaceValue = String(replaceValue);

      var global = rx.global;
      if (global) {
        var fullUnicode = rx.unicode;
        rx.lastIndex = 0;
      }
      var results = [];
      while (true) {
        var result = regExpExec(rx, S);
        if (result === null) break;

        results.push(result);
        if (!global) break;

        var matchStr = String(result[0]);
        if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);
      }

      var accumulatedResult = '';
      var nextSourcePosition = 0;
      for (var i = 0; i < results.length; i++) {
        result = results[i];

        var matched = String(result[0]);
        var position = max(min(toInteger(result.index), S.length), 0);
        var captures = [];
        // NOTE: This is equivalent to
        //   captures = result.slice(1).map(maybeToString)
        // but for some reason `nativeSlice.call(result, 1, result.length)` (called in
        // the slice polyfill when slicing native arrays) "doesn't work" in safari 9 and
        // causes a crash (https://pastebin.com/N21QzeQA) when trying to debug it.
        for (var j = 1; j < result.length; j++) captures.push(maybeToString(result[j]));
        var namedCaptures = result.groups;
        if (functionalReplace) {
          var replacerArgs = [matched].concat(captures, position, S);
          if (namedCaptures !== undefined) replacerArgs.push(namedCaptures);
          var replacement = String(replaceValue.apply(undefined, replacerArgs));
        } else {
          replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue);
        }
        if (position >= nextSourcePosition) {
          accumulatedResult += S.slice(nextSourcePosition, position) + replacement;
          nextSourcePosition = position + matched.length;
        }
      }
      return accumulatedResult + S.slice(nextSourcePosition);
    }
  ];

  // https://tc39.github.io/ecma262/#sec-getsubstitution
  function getSubstitution(matched, str, position, captures, namedCaptures, replacement) {
    var tailPos = position + matched.length;
    var m = captures.length;
    var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED;
    if (namedCaptures !== undefined) {
      namedCaptures = toObject(namedCaptures);
      symbols = SUBSTITUTION_SYMBOLS;
    }
    return nativeReplace.call(replacement, symbols, function (match, ch) {
      var capture;
      switch (ch.charAt(0)) {
        case '$': return '$';
        case '&': return matched;
        case '`': return str.slice(0, position);
        case "'": return str.slice(tailPos);
        case '<':
          capture = namedCaptures[ch.slice(1, -1)];
          break;
        default: // \d\d?
          var n = +ch;
          if (n === 0) return match;
          if (n > m) {
            var f = floor(n / 10);
            if (f === 0) return match;
            if (f <= m) return captures[f - 1] === undefined ? ch.charAt(1) : captures[f - 1] + ch.charAt(1);
            return match;
          }
          capture = captures[n - 1];
      }
      return capture === undefined ? '' : capture;
    });
  }
});


/***/ }),
/* 57 */
/*!******************************************************!*\
  !*** ./node_modules/core-js-pure/internals/fails.js ***!
  \******************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports) {

module.exports = function (exec) {
  try {
    return !!exec();
  } catch (error) {
    return true;
  }
};


/***/ }),
/* 58 */
/*!*******************************!*\
  !*** ./dev/Storage/Client.js ***!
  \*******************************/
/*! exports provided: set, get */
/*! exports used: get, set */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return set; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return get; });
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/find */ 12);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! _ */ 3);
/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(___WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var Common_ClientStorageDriver_Cookie__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! Common/ClientStorageDriver/Cookie */ 420);
/* harmony import */ var Common_ClientStorageDriver_LocalStorage__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! Common/ClientStorageDriver/LocalStorage */ 421);





var SupportedStorageDriver = _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_0___default()(___WEBPACK_IMPORTED_MODULE_1___default.a).call(___WEBPACK_IMPORTED_MODULE_1___default.a, [Common_ClientStorageDriver_LocalStorage__WEBPACK_IMPORTED_MODULE_3__[/* LocalStorageDriver */ "a"], Common_ClientStorageDriver_Cookie__WEBPACK_IMPORTED_MODULE_2__[/* CookieDriver */ "a"]], function (StorageDriver) {
  return StorageDriver && StorageDriver.supported();
});

var driver = SupportedStorageDriver ? new SupportedStorageDriver() : null;
/**
 * @param {number} key
 * @param {*} data
 * @returns {boolean}
 */

function set(key, data) {
  return driver ? driver.set('p' + key, data) : false;
}
/**
 * @param {number} key
 * @returns {*}
 */

function get(key) {
  return driver ? driver.get('p' + key) : null;
}

/***/ }),
/* 59 */
/*!********************************************************!*\
  !*** ./node_modules/core-js/internals/get-built-in.js ***!
  \********************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

var path = __webpack_require__(/*! ../internals/path */ 148);
var global = __webpack_require__(/*! ../internals/global */ 27);

var aFunction = function (variable) {
  return typeof variable == 'function' ? variable : undefined;
};

module.exports = function (namespace, method) {
  return arguments.length < 2 ? aFunction(path[namespace]) || aFunction(global[namespace])
    : path[namespace] && path[namespace][method] || global[namespace] && global[namespace][method];
};


/***/ }),
/* 60 */
/*!********************************!*\
  !*** ./dev/Common/Momentor.js ***!
  \********************************/
/*! exports provided: momentNow, momentNowUnix, searchSubtractFormatDateHelper, format, momentToNode, reload */
/*! all exports used */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "momentNow", function() { return momentNow; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "momentNowUnix", function() { return momentNowUnix; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "searchSubtractFormatDateHelper", function() { return searchSubtractFormatDateHelper; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "format", function() { return format; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "momentToNode", function() { return momentToNode; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "reload", function() { return reload; });
/* harmony import */ var window__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! window */ 4);
/* harmony import */ var window__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(window__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! _ */ 3);
/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(___WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var $__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! $ */ 8);
/* harmony import */ var $__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n($__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! moment */ 97);
/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(moment__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var Common_Translator__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! Common/Translator */ 9);





var _moment = null;
var _momentNow = 0;

var updateMomentNow = ___WEBPACK_IMPORTED_MODULE_1___default.a.debounce(function () {
  _moment = moment__WEBPACK_IMPORTED_MODULE_3___default()();
}, 500, true);

var updateMomentNowUnix = ___WEBPACK_IMPORTED_MODULE_1___default.a.debounce(function () {
  _momentNow = moment__WEBPACK_IMPORTED_MODULE_3___default()().unix();
}, 500, true);
/**
 * @returns {moment}
 */


function momentNow() {
  updateMomentNow();
  return _moment || moment__WEBPACK_IMPORTED_MODULE_3___default()();
}
/**
 * @returns {number}
 */

function momentNowUnix() {
  updateMomentNowUnix();
  return _momentNow || 0;
}
/**
 * @param {number} date
 * @returns {string}
 */

function searchSubtractFormatDateHelper(date) {
  return momentNow().clone().subtract(date, 'days').format('YYYY.MM.DD');
}
/**
 * @param {Object} m
 * @returns {string}
 */

function formatCustomShortDate(m) {
  var now = momentNow();

  if (m && now) {
    switch (true) {
      case 4 >= now.diff(m, 'hours'):
        return m.fromNow();

      case now.format('L') === m.format('L'):
        return Object(Common_Translator__WEBPACK_IMPORTED_MODULE_4__["i18n"])('MESSAGE_LIST/TODAY_AT', {
          TIME: m.format('LT')
        });

      case now.clone().subtract(1, 'days').format('L') === m.format('L'):
        return Object(Common_Translator__WEBPACK_IMPORTED_MODULE_4__["i18n"])('MESSAGE_LIST/YESTERDAY_AT', {
          TIME: m.format('LT')
        });

      case now.year() === m.year():
        return m.format('D MMM.');
      // no default
    }
  }

  return m ? m.format('LL') : '';
}
/**
 * @param {number} timeStampInUTC
 * @param {string} formatStr
 * @returns {string}
 */


function format(timeStampInUTC, formatStr) {
  var m = null,
      result = '';
  var now = momentNowUnix();
  timeStampInUTC = 0 < timeStampInUTC ? timeStampInUTC : 0 === timeStampInUTC ? now : 0;
  timeStampInUTC = now < timeStampInUTC ? now : timeStampInUTC;
  m = 0 < timeStampInUTC ? moment__WEBPACK_IMPORTED_MODULE_3___default.a.unix(timeStampInUTC) : null;

  if (m && 1970 === m.year()) {
    m = null;
  }

  if (m) {
    switch (formatStr) {
      case 'FROMNOW':
        result = m.fromNow();
        break;

      case 'SHORT':
        result = formatCustomShortDate(m);
        break;

      case 'FULL':
        result = m.format('LLL');
        break;

      default:
        result = m.format(formatStr);
        break;
    }
  }

  return result;
}
/**
 * @param {Object} element
 * @returns {void}
 */

function momentToNode(element) {
  var key = '',
      time = 0;
  var $el = $__WEBPACK_IMPORTED_MODULE_2___default()(element);
  time = $el.data('moment-time');

  if (time) {
    key = $el.data('moment-format');

    if (key) {
      $el.text(format(time, key));
    }

    key = $el.data('moment-format-title');

    if (key) {
      $el.attr('title', format(time, key));
    }
  }
}
/**
 * @returns {void}
 */

function reload() {
  ___WEBPACK_IMPORTED_MODULE_1___default.a.defer(function () {
    $__WEBPACK_IMPORTED_MODULE_2___default()('.moment', window__WEBPACK_IMPORTED_MODULE_0___default.a.document).each(function (index, item) {
      momentToNode(item);
    });
  });
}

/***/ }),
/* 61 */
/*!********************************!*\
  !*** external "window.hasher" ***!
  \********************************/
/*! no static exports found */
/*! exports used: default */
/***/ (function(module, exports) {

module.exports = window.hasher;

/***/ }),
/* 62 */
/*!*******************************!*\
  !*** ./dev/Helper/Message.js ***!
  \*******************************/
/*! exports provided: emailArrayToString, emailArrayToStringClear, emailArrayFromJson, replyHelper */
/*! exports used: emailArrayFromJson, emailArrayToString, emailArrayToStringClear, replyHelper */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return emailArrayToString; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return emailArrayToStringClear; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return emailArrayFromJson; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return replyHelper; });
/* harmony import */ var core_js_modules_es_array_join__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.array.join */ 74);
/* harmony import */ var core_js_modules_es_array_join__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_join__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var core_js_modules_es_function_name__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es.function.name */ 51);
/* harmony import */ var core_js_modules_es_function_name__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_function_name__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var Common_Utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! Common/Utils */ 2);
/* harmony import */ var Model_Email__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! Model/Email */ 80);




/**
 * @param {Array.<EmailModel>} emails
 * @param {boolean=} friendlyView = false
 * @param {boolean=} wrapWithLink = false
 * @returns {string}
 */

function emailArrayToString(emails, friendlyView, wrapWithLink) {
  if (friendlyView === void 0) {
    friendlyView = false;
  }

  if (wrapWithLink === void 0) {
    wrapWithLink = false;
  }

  var index = 0,
      len = 0;
  var result = [];

  if (Object(Common_Utils__WEBPACK_IMPORTED_MODULE_2__["isNonEmptyArray"])(emails)) {
    for (len = emails.length; index < len; index++) {
      result.push(emails[index].toLine(friendlyView, wrapWithLink));
    }
  }

  return result.join(', ');
}
/**
 * @param {Array.<EmailModel>} emails
 * @returns {string}
 */

function emailArrayToStringClear(emails) {
  var index = 0,
      len = 0;
  var result = [];

  if (Object(Common_Utils__WEBPACK_IMPORTED_MODULE_2__["isNonEmptyArray"])(emails)) {
    for (len = emails.length; index < len; index++) {
      if (emails[index] && emails[index].email && '' !== emails[index].name) {
        result.push(emails[index].email);
      }
    }
  }

  return result.join(', ');
}
/**
 * @param {?Array} json
 * @returns {Array.<EmailModel>}
 */

function emailArrayFromJson(json) {
  var index = 0,
      len = 0,
      email = null;
  var result = [];

  if (Object(Common_Utils__WEBPACK_IMPORTED_MODULE_2__["isNonEmptyArray"])(json)) {
    for (index = 0, len = json.length; index < len; index++) {
      email = Model_Email__WEBPACK_IMPORTED_MODULE_3__["EmailModel"].newInstanceFromJson(json[index]);

      if (email) {
        result.push(email);
      }
    }
  }

  return result;
}
/**
 * @param {Array.<EmailModel>} inputEmails
 * @param {Object} unic
 * @param {Array} localEmails
 */

function replyHelper(inputEmails, unic, localEmails) {
  if (inputEmails && 0 < inputEmails.length) {
    var index = 0;
    var len = inputEmails.length;

    for (; index < len; index++) {
      if (Object(Common_Utils__WEBPACK_IMPORTED_MODULE_2__["isUnd"])(unic[inputEmails[index].email])) {
        unic[inputEmails[index].email] = true;
        localEmails.push(inputEmails[index]);
      }
    }
  }
}

/***/ }),
/* 63 */
/*!*************************************************************!*\
  !*** ./node_modules/core-js/modules/es.object.to-string.js ***!
  \*************************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

var TO_STRING_TAG_SUPPORT = __webpack_require__(/*! ../internals/to-string-tag-support */ 93);
var redefine = __webpack_require__(/*! ../internals/redefine */ 53);
var toString = __webpack_require__(/*! ../internals/object-to-string */ 184);

// `Object.prototype.toString` method
// https://tc39.github.io/ecma262/#sec-object.prototype.tostring
if (!TO_STRING_TAG_SUPPORT) {
  redefine(Object.prototype, 'toString', toString, { unsafe: true });
}


/***/ }),
/* 64 */
/*!************************************!*\
  !*** ./dev/Knoin/AbstractModel.js ***!
  \************************************/
/*! exports provided: AbstractModel */
/*! exports used: AbstractModel */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return AbstractModel; });
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/for-each */ 69);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _babel_runtime_corejs3_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/esm/defineProperty */ 17);
/* harmony import */ var Common_Utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! Common/Utils */ 2);



var AbstractModel =
/*#__PURE__*/
function () {
  /**
   * @param {string} modelName = ''
   */
  function AbstractModel(modelName) {
    if (modelName === void 0) {
      modelName = '';
    }

    Object(_babel_runtime_corejs3_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(this, "sModelName", '');

    Object(_babel_runtime_corejs3_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(this, "disposables", []);

    this.sModelName = modelName || '';
  }

  var _proto = AbstractModel.prototype;

  _proto.regDisposables = function regDisposables(value) {
    var _this = this;

    if (Object(Common_Utils__WEBPACK_IMPORTED_MODULE_2__["isArray"])(value)) {
      _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_0___default()(value).call(value, function (item) {
        _this.disposables.push(item);
      });
    } else if (value) {
      this.disposables.push(value);
    }
  };

  _proto.onDestroy = function onDestroy() {
    Object(Common_Utils__WEBPACK_IMPORTED_MODULE_2__["disposeObject"])(this);
  };

  return AbstractModel;
}();

/***/ }),
/* 65 */,
/* 66 */
/*!******************************************************!*\
  !*** ./node_modules/core-js/internals/a-function.js ***!
  \******************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports) {

module.exports = function (it) {
  if (typeof it != 'function') {
    throw TypeError(String(it) + ' is not a function');
  } return it;
};


/***/ }),
/* 67 */
/*!****************************************************!*\
  !*** ./node_modules/core-js/modules/web.timers.js ***!
  \****************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var $ = __webpack_require__(/*! ../internals/export */ 48);
var global = __webpack_require__(/*! ../internals/global */ 27);
var userAgent = __webpack_require__(/*! ../internals/engine-user-agent */ 104);

var slice = [].slice;
var MSIE = /MSIE .\./.test(userAgent); // <- dirty ie9- check

var wrap = function (scheduler) {
  return function (handler, timeout /* , ...arguments */) {
    var boundArgs = arguments.length > 2;
    var args = boundArgs ? slice.call(arguments, 2) : undefined;
    return scheduler(boundArgs ? function () {
      // eslint-disable-next-line no-new-func
      (typeof handler == 'function' ? handler : Function(handler)).apply(this, args);
    } : handler, timeout);
  };
};

// ie9- setTimeout & setInterval additional parameters fix
// https://html.spec.whatwg.org/multipage/timers-and-user-prompts.html#timers
$({ global: true, bind: true, forced: MSIE }, {
  // `setTimeout` method
  // https://html.spec.whatwg.org/multipage/timers-and-user-prompts.html#dom-settimeout
  setTimeout: wrap(global.setTimeout),
  // `setInterval` method
  // https://html.spec.whatwg.org/multipage/timers-and-user-prompts.html#dom-setinterval
  setInterval: wrap(global.setInterval)
});


/***/ }),
/* 68 */
/*!******************************************************************!*\
  !*** ./node_modules/core-js-pure/internals/well-known-symbol.js ***!
  \******************************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

var global = __webpack_require__(/*! ../internals/global */ 75);
var shared = __webpack_require__(/*! ../internals/shared */ 202);
var uid = __webpack_require__(/*! ../internals/uid */ 240);
var NATIVE_SYMBOL = __webpack_require__(/*! ../internals/native-symbol */ 299);

var Symbol = global.Symbol;
var store = shared('wks');

module.exports = function (name) {
  return store[name] || (store[name] = NATIVE_SYMBOL && Symbol[name]
    || (NATIVE_SYMBOL ? Symbol : uid)('Symbol.' + name));
};


/***/ }),
/* 69 */
/*!*********************************************************************************!*\
  !*** ./node_modules/@babel/runtime-corejs3/core-js-stable/instance/for-each.js ***!
  \*********************************************************************************/
/*! no static exports found */
/*! exports used: default */
/***/ (function(module, exports, __webpack_require__) {

module.exports = __webpack_require__(/*! core-js-pure/stable/instance/for-each */ 253);

/***/ }),
/* 70 */
/*!********************************!*\
  !*** ./dev/Stores/Language.js ***!
  \********************************/
/*! exports provided: default */
/*! exports used: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var ko__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ko */ 1);
/* harmony import */ var Common_Utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! Common/Utils */ 2);
/* harmony import */ var Storage_Settings__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! Storage/Settings */ 5);




var LanguageStore =
/*#__PURE__*/
function () {
  function LanguageStore() {
    this.languages = ko__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].observableArray([]);
    this.languagesAdmin = ko__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].observableArray([]);
    this.language = ko__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].observable('').extend({
      limitedList: this.languages
    }).extend({
      reversible: true
    });
    this.languageAdmin = ko__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].observable('').extend({
      limitedList: this.languagesAdmin
    }).extend({
      reversible: true
    });
    this.userLanguage = ko__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].observable('');
    this.userLanguageAdmin = ko__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].observable('');
  }

  var _proto = LanguageStore.prototype;

  _proto.populate = function populate() {
    var aLanguages = Storage_Settings__WEBPACK_IMPORTED_MODULE_2__["appSettingsGet"]('languages'),
        aLanguagesAdmin = Storage_Settings__WEBPACK_IMPORTED_MODULE_2__["appSettingsGet"]('languagesAdmin');
    this.languages(Object(Common_Utils__WEBPACK_IMPORTED_MODULE_1__["isArray"])(aLanguages) ? aLanguages : []);
    this.languagesAdmin(Object(Common_Utils__WEBPACK_IMPORTED_MODULE_1__["isArray"])(aLanguagesAdmin) ? aLanguagesAdmin : []);
    this.language(Storage_Settings__WEBPACK_IMPORTED_MODULE_2__["settingsGet"]('Language'));
    this.languageAdmin(Storage_Settings__WEBPACK_IMPORTED_MODULE_2__["settingsGet"]('LanguageAdmin'));
    this.userLanguage(Storage_Settings__WEBPACK_IMPORTED_MODULE_2__["settingsGet"]('UserLanguage'));
    this.userLanguageAdmin(Storage_Settings__WEBPACK_IMPORTED_MODULE_2__["settingsGet"]('UserLanguageAdmin'));
  };

  return LanguageStore;
}();

/* harmony default export */ __webpack_exports__["a"] = (new LanguageStore());

/***/ }),
/* 71 */
/*!*************************************************************!*\
  !*** ./node_modules/core-js/internals/to-indexed-object.js ***!
  \*************************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

// toObject with fallback for non-array-like ES3 strings
var IndexedObject = __webpack_require__(/*! ../internals/indexed-object */ 118);
var requireObjectCoercible = __webpack_require__(/*! ../internals/require-object-coercible */ 55);

module.exports = function (it) {
  return IndexedObject(requireObjectCoercible(it));
};


/***/ }),
/* 72 */
/*!*****************************************************!*\
  !*** ./node_modules/core-js/internals/to-length.js ***!
  \*****************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

var toInteger = __webpack_require__(/*! ../internals/to-integer */ 79);

var min = Math.min;

// `ToLength` abstract operation
// https://tc39.github.io/ecma262/#sec-tolength
module.exports = function (argument) {
  return argument > 0 ? min(toInteger(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
};


/***/ }),
/* 73 */
/*!*****************************************************!*\
  !*** ./node_modules/core-js/internals/iterators.js ***!
  \*****************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports) {

module.exports = {};


/***/ }),
/* 74 */
/*!*******************************************************!*\
  !*** ./node_modules/core-js/modules/es.array.join.js ***!
  \*******************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var $ = __webpack_require__(/*! ../internals/export */ 48);
var IndexedObject = __webpack_require__(/*! ../internals/indexed-object */ 118);
var toIndexedObject = __webpack_require__(/*! ../internals/to-indexed-object */ 71);
var arrayMethodIsStrict = __webpack_require__(/*! ../internals/array-method-is-strict */ 282);

var nativeJoin = [].join;

var ES3_STRINGS = IndexedObject != Object;
var STRICT_METHOD = arrayMethodIsStrict('join', ',');

// `Array.prototype.join` method
// https://tc39.github.io/ecma262/#sec-array.prototype.join
$({ target: 'Array', proto: true, forced: ES3_STRINGS || !STRICT_METHOD }, {
  join: function join(separator) {
    return nativeJoin.call(toIndexedObject(this), separator === undefined ? ',' : separator);
  }
});


/***/ }),
/* 75 */
/*!*******************************************************!*\
  !*** ./node_modules/core-js-pure/internals/global.js ***!
  \*******************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

/* WEBPACK VAR INJECTION */(function(global) {var O = 'object';
var check = function (it) {
  return it && it.Math == Math && it;
};

// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
module.exports =
  // eslint-disable-next-line no-undef
  check(typeof globalThis == O && globalThis) ||
  check(typeof window == O && window) ||
  check(typeof self == O && self) ||
  check(typeof global == O && global) ||
  // eslint-disable-next-line no-new-func
  Function('return this')();

/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../webpack/buildin/global.js */ 123)))

/***/ }),
/* 76 */
/*!**********************************************************!*\
  !*** ./node_modules/core-js-pure/internals/is-object.js ***!
  \**********************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports) {

module.exports = function (it) {
  return typeof it === 'object' ? it !== null : typeof it === 'function';
};


/***/ }),
/* 77 */,
/* 78 */
/*!***************************************************!*\
  !*** ./node_modules/core-js/internals/is-pure.js ***!
  \***************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports) {

module.exports = false;


/***/ }),
/* 79 */
/*!******************************************************!*\
  !*** ./node_modules/core-js/internals/to-integer.js ***!
  \******************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports) {

var ceil = Math.ceil;
var floor = Math.floor;

// `ToInteger` abstract operation
// https://tc39.github.io/ecma262/#sec-tointeger
module.exports = function (argument) {
  return isNaN(argument = +argument) ? 0 : (argument > 0 ? floor : ceil)(argument);
};


/***/ }),
/* 80 */
/*!****************************!*\
  !*** ./dev/Model/Email.js ***!
  \****************************/
/*! exports provided: EmailModel, default */
/*! all exports used */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EmailModel", function() { return EmailModel; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return EmailModel; });
/* harmony import */ var core_js_modules_es_function_name__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.function.name */ 51);
/* harmony import */ var core_js_modules_es_function_name__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_function_name__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var core_js_modules_es_regexp_exec__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es.regexp.exec */ 45);
/* harmony import */ var core_js_modules_es_regexp_exec__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_regexp_exec__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var core_js_modules_es_string_replace__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core-js/modules/es.string.replace */ 56);
/* harmony import */ var core_js_modules_es_string_replace__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_replace__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var core_js_modules_es_string_search__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! core-js/modules/es.string.search */ 273);
/* harmony import */ var core_js_modules_es_string_search__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_search__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/map */ 18);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/for-each */ 69);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_5__);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_index_of__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/index-of */ 30);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_index_of__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_index_of__WEBPACK_IMPORTED_MODULE_6__);
/* harmony import */ var _babel_runtime_corejs3_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/esm/defineProperty */ 17);
/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! _ */ 3);
/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(___WEBPACK_IMPORTED_MODULE_8__);
/* harmony import */ var emailjs_addressparser__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! emailjs-addressparser */ 163);
/* harmony import */ var emailjs_addressparser__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(emailjs_addressparser__WEBPACK_IMPORTED_MODULE_9__);
/* harmony import */ var Common_Utils__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! Common/Utils */ 2);












var EmailModel =
/*#__PURE__*/
function () {
  /**
   * @param {string=} email = ''
   * @param {string=} name = ''
   * @param {string=} dkimStatus = 'none'
   * @param {string=} dkimValue = ''
   */
  function EmailModel(email, name, dkimStatus, dkimValue) {
    if (email === void 0) {
      email = '';
    }

    if (name === void 0) {
      name = '';
    }

    if (dkimStatus === void 0) {
      dkimStatus = 'none';
    }

    if (dkimValue === void 0) {
      dkimValue = '';
    }

    Object(_babel_runtime_corejs3_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"])(this, "email", '');

    Object(_babel_runtime_corejs3_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"])(this, "name", '');

    Object(_babel_runtime_corejs3_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"])(this, "dkimStatus", '');

    Object(_babel_runtime_corejs3_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"])(this, "dkimValue", '');

    this.email = email;
    this.name = name;
    this.dkimStatus = dkimStatus;
    this.dkimValue = dkimValue;
    this.clearDuplicateName();
  }
  /**
   * @static
   * @param {AjaxJsonEmail} json
   * @returns {?EmailModel}
   */


  EmailModel.newInstanceFromJson = function newInstanceFromJson(json) {
    var email = new EmailModel();
    return email.initByJson(json) ? email : null;
  }
  /**
   * @returns {void}
   */
  ;

  var _proto = EmailModel.prototype;

  _proto.clear = function clear() {
    this.email = '';
    this.name = '';
    this.dkimStatus = 'none';
    this.dkimValue = '';
  }
  /**
   * @returns {boolean}
   */
  ;

  _proto.validate = function validate() {
    return '' !== this.name || '' !== this.email;
  }
  /**
   * @param {boolean} withoutName = false
   * @returns {string}
   */
  ;

  _proto.hash = function hash(withoutName) {
    if (withoutName === void 0) {
      withoutName = false;
    }

    return '#' + (withoutName ? '' : this.name) + '#' + this.email + '#';
  }
  /**
   * @returns {void}
   */
  ;

  _proto.clearDuplicateName = function clearDuplicateName() {
    if (this.name === this.email) {
      this.name = '';
    }
  }
  /**
   * @param {string} query
   * @returns {boolean}
   */
  ;

  _proto.search = function search(query) {
    var _context;

    return -1 < _babel_runtime_corejs3_core_js_stable_instance_index_of__WEBPACK_IMPORTED_MODULE_6___default()(_context = (this.name + ' ' + this.email).toLowerCase()).call(_context, query.toLowerCase());
  }
  /**
   * @param {AjaxJsonEmail} oJsonEmail
   * @returns {boolean}
   */
  ;

  _proto.initByJson = function initByJson(json) {
    var result = false;

    if (json && 'Object/Email' === json['@Object']) {
      this.name = Object(Common_Utils__WEBPACK_IMPORTED_MODULE_10__["trim"])(json.Name);
      this.email = Object(Common_Utils__WEBPACK_IMPORTED_MODULE_10__["trim"])(json.Email);
      this.dkimStatus = Object(Common_Utils__WEBPACK_IMPORTED_MODULE_10__["trim"])(json.DkimStatus || '');
      this.dkimValue = Object(Common_Utils__WEBPACK_IMPORTED_MODULE_10__["trim"])(json.DkimValue || '');
      result = '' !== this.email;
      this.clearDuplicateName();
    }

    return result;
  }
  /**
   * @param {boolean} friendlyView
   * @param {boolean=} wrapWithLink = false
   * @param {boolean=} useEncodeHtml = false
   * @returns {string}
   */
  ;

  _proto.toLine = function toLine(friendlyView, wrapWithLink, useEncodeHtml) {
    if (wrapWithLink === void 0) {
      wrapWithLink = false;
    }

    if (useEncodeHtml === void 0) {
      useEncodeHtml = false;
    }

    var result = '';

    if ('' !== this.email) {
      if (friendlyView && '' !== this.name) {
        result = wrapWithLink ? '<a href="mailto:' + Object(Common_Utils__WEBPACK_IMPORTED_MODULE_10__["encodeHtml"])(this.email) + '?to=' + Object(Common_Utils__WEBPACK_IMPORTED_MODULE_10__["encodeHtml"])('"' + this.name + '" <' + this.email + '>') + '" target="_blank" tabindex="-1">' + Object(Common_Utils__WEBPACK_IMPORTED_MODULE_10__["encodeHtml"])(this.name) + '</a>' : useEncodeHtml ? Object(Common_Utils__WEBPACK_IMPORTED_MODULE_10__["encodeHtml"])(this.name) : this.name; // result = wrapWithLink ? '<a href="mailto:' + encodeHtml('"' + this.name + '" <' + this.email + '>') +
        // 	'" target="_blank" tabindex="-1">' + encodeHtml(this.name) + '</a>' : (useEncodeHtml ? encodeHtml(this.name) : this.name);
      } else {
        result = this.email;

        if ('' !== this.name) {
          if (wrapWithLink) {
            result = Object(Common_Utils__WEBPACK_IMPORTED_MODULE_10__["encodeHtml"])('"' + this.name + '" <') + '<a href="mailto:' + Object(Common_Utils__WEBPACK_IMPORTED_MODULE_10__["encodeHtml"])(this.email) + '?to=' + Object(Common_Utils__WEBPACK_IMPORTED_MODULE_10__["encodeHtml"])('"' + this.name + '" <' + this.email + '>') + '" target="_blank" tabindex="-1">' + Object(Common_Utils__WEBPACK_IMPORTED_MODULE_10__["encodeHtml"])(result) + '</a>' + Object(Common_Utils__WEBPACK_IMPORTED_MODULE_10__["encodeHtml"])('>'); // result = encodeHtml('"' + this.name + '" <') + '<a href="mailto:' +
            // 	encodeHtml('"' + this.name + '" <' + this.email + '>') +
            // 	'" target="_blank" tabindex="-1">' +
            // 	encodeHtml(result) +
            // 	'</a>' +
            // 	encodeHtml('>');
          } else {
            result = '"' + this.name + '" <' + result + '>';

            if (useEncodeHtml) {
              result = Object(Common_Utils__WEBPACK_IMPORTED_MODULE_10__["encodeHtml"])(result);
            }
          }
        } else if (wrapWithLink) {
          result = '<a href="mailto:' + Object(Common_Utils__WEBPACK_IMPORTED_MODULE_10__["encodeHtml"])(this.email) + '" target="_blank" tabindex="-1">' + Object(Common_Utils__WEBPACK_IMPORTED_MODULE_10__["encodeHtml"])(this.email) + '</a>';
        }
      }
    }

    return result;
  };

  EmailModel.splitEmailLine = function splitEmailLine(line) {
    var parsedResult = emailjs_addressparser__WEBPACK_IMPORTED_MODULE_9___default()(line);

    if (Object(Common_Utils__WEBPACK_IMPORTED_MODULE_10__["isNonEmptyArray"])(parsedResult)) {
      var result = [];
      var exists = false;

      _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_5___default()(parsedResult).call(parsedResult, function (item) {
        var address = item.address ? new EmailModel(item.address.replace(/^[<]+(.*)[>]+$/g, '$1'), item.name || '') : null;

        if (address && address.email) {
          exists = true;
        }

        result.push(address ? address.toLine(false) : item.name);
      });

      return exists ? result : null;
    }

    return null;
  };

  EmailModel.parseEmailLine = function parseEmailLine(line) {
    var parsedResult = emailjs_addressparser__WEBPACK_IMPORTED_MODULE_9___default()(line);

    if (Object(Common_Utils__WEBPACK_IMPORTED_MODULE_10__["isNonEmptyArray"])(parsedResult)) {
      return ___WEBPACK_IMPORTED_MODULE_8___default.a.compact(_babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_4___default()(___WEBPACK_IMPORTED_MODULE_8___default.a).call(___WEBPACK_IMPORTED_MODULE_8___default.a, parsedResult, function (item) {
        return item.address ? new EmailModel(item.address.replace(/^[<]+(.*)[>]+$/g, '$1'), item.name || '') : null;
      }));
    }

    return [];
  }
  /**
   * @param {string} emailAddress
   * @returns {boolean}
   */
  ;

  _proto.parse = function parse(emailAddress) {
    emailAddress = Object(Common_Utils__WEBPACK_IMPORTED_MODULE_10__["trim"])(emailAddress);

    if ('' === emailAddress) {
      return false;
    }

    var result = emailjs_addressparser__WEBPACK_IMPORTED_MODULE_9___default()(emailAddress);

    if (Object(Common_Utils__WEBPACK_IMPORTED_MODULE_10__["isNonEmptyArray"])(result) && result[0]) {
      this.name = result[0].name || '';
      this.email = result[0].address || '';
      this.clearDuplicateName();
      return true;
    }

    return false;
  };

  return EmailModel;
}();



/***/ }),
/* 81 */
/*!*****************************!*\
  !*** ./dev/Common/Audio.js ***!
  \*****************************/
/*! exports provided: default */
/*! exports used: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var core_js_modules_es_regexp_exec__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.regexp.exec */ 45);
/* harmony import */ var core_js_modules_es_regexp_exec__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_regexp_exec__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var core_js_modules_es_string_replace__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es.string.replace */ 56);
/* harmony import */ var core_js_modules_es_string_replace__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_replace__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _babel_runtime_corejs3_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/esm/defineProperty */ 17);
/* harmony import */ var window__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! window */ 4);
/* harmony import */ var window__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(window__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var Common_Globals__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! Common/Globals */ 6);
/* harmony import */ var Common_Links__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! Common/Links */ 15);
/* harmony import */ var Common_Events__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! Common/Events */ 24);
/* harmony import */ var Common_Utils__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! Common/Utils */ 2);









var Audio =
/*#__PURE__*/
function () {
  function Audio() {
    var _this = this;

    Object(_babel_runtime_corejs3_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(this, "notificator", null);

    Object(_babel_runtime_corejs3_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(this, "player", null);

    Object(_babel_runtime_corejs3_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(this, "supported", false);

    Object(_babel_runtime_corejs3_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(this, "supportedMp3", false);

    Object(_babel_runtime_corejs3_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(this, "supportedOgg", false);

    Object(_babel_runtime_corejs3_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(this, "supportedWav", false);

    Object(_babel_runtime_corejs3_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(this, "supportedNotification", false);

    this.player = this.createNewObject();
    this.supported = !Common_Globals__WEBPACK_IMPORTED_MODULE_4__["bMobileDevice"] && !Common_Globals__WEBPACK_IMPORTED_MODULE_4__["bSafari"] && !!this.player && !!this.player.play;

    if (this.supported && this.player && this.player.canPlayType) {
      this.supportedMp3 = '' !== this.player.canPlayType('audio/mpeg;').replace(/no/, '');
      this.supportedWav = '' !== this.player.canPlayType('audio/wav; codecs="1"').replace(/no/, '');
      this.supportedOgg = '' !== this.player.canPlayType('audio/ogg; codecs="vorbis"').replace(/no/, '');
      this.supportedNotification = this.supported && this.supportedMp3;
    }

    if (!this.player || !this.supportedMp3 && !this.supportedOgg && !this.supportedWav) {
      this.supported = false;
      this.supportedMp3 = false;
      this.supportedOgg = false;
      this.supportedWav = false;
      this.supportedNotification = false;
    }

    if (this.supported && this.player) {
      var stopFn = function stopFn() {
        return _this.stop();
      };

      this.player.addEventListener('ended', stopFn);
      this.player.addEventListener('error', stopFn);
      Common_Events__WEBPACK_IMPORTED_MODULE_6__[/* sub */ "b"]('audio.api.stop', stopFn);
    }
  }

  var _proto = Audio.prototype;

  _proto.createNewObject = function createNewObject() {
    try {
      var player = window__WEBPACK_IMPORTED_MODULE_3___default.a.Audio ? new window__WEBPACK_IMPORTED_MODULE_3___default.a.Audio() : null;

      if (player && player.canPlayType && player.pause && player.play) {
        player.preload = 'none';
        player.loop = false;
        player.autoplay = false;
        player.muted = false;
      }

      return player;
    } catch (e) {} // eslint-disable-line no-empty


    return null;
  };

  _proto.paused = function paused() {
    return this.supported ? !!this.player.paused : true;
  };

  _proto.stop = function stop() {
    if (this.supported && this.player.pause) {
      this.player.pause();
    }

    Common_Events__WEBPACK_IMPORTED_MODULE_6__[/* pub */ "a"]('audio.stop');
  };

  _proto.pause = function pause() {
    this.stop();
  };

  _proto.clearName = function clearName(name, ext) {
    if (name === void 0) {
      name = '';
    }

    if (ext === void 0) {
      ext = '';
    }

    name = Object(Common_Utils__WEBPACK_IMPORTED_MODULE_7__["trim"])(name);

    if (ext && '.' + ext === name.toLowerCase().substr((ext.length + 1) * -1)) {
      name = Object(Common_Utils__WEBPACK_IMPORTED_MODULE_7__["trim"])(name.substr(0, name.length - 4));
    }

    return '' === name ? 'audio' : name;
  };

  _proto.playMp3 = function playMp3(url, name) {
    if (this.supported && this.supportedMp3) {
      this.player.src = url;
      this.player.play();
      Common_Events__WEBPACK_IMPORTED_MODULE_6__[/* pub */ "a"]('audio.start', [this.clearName(name, 'mp3'), 'mp3']);
    }
  };

  _proto.playOgg = function playOgg(url, name) {
    if (this.supported && this.supportedOgg) {
      this.player.src = url;
      this.player.play();
      name = this.clearName(name, 'oga');
      name = this.clearName(name, 'ogg');
      Common_Events__WEBPACK_IMPORTED_MODULE_6__[/* pub */ "a"]('audio.start', [name, 'ogg']);
    }
  };

  _proto.playWav = function playWav(url, name) {
    if (this.supported && this.supportedWav) {
      this.player.src = url;
      this.player.play();
      Common_Events__WEBPACK_IMPORTED_MODULE_6__[/* pub */ "a"]('audio.start', [this.clearName(name, 'wav'), 'wav']);
    }
  };

  _proto.playNotification = function playNotification() {
    if (this.supported && this.supportedMp3) {
      if (!this.notificator) {
        this.notificator = this.createNewObject();
        this.notificator.src = Common_Links__WEBPACK_IMPORTED_MODULE_5__[/* sound */ "D"]('new-mail.mp3');
      }

      if (this.notificator && this.notificator.play) {
        this.notificator.play();
      }
    }
  };

  return Audio;
}();

/* harmony default export */ __webpack_exports__["a"] = (new Audio());

/***/ }),
/* 82 */
/*!************************************************************!*\
  !*** ./node_modules/core-js-pure/internals/descriptors.js ***!
  \************************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

var fails = __webpack_require__(/*! ../internals/fails */ 57);

// Thank's IE8 for his funny defineProperty
module.exports = !fails(function () {
  return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7;
});


/***/ }),
/* 83 */
/*!*****************************************************!*\
  !*** ./node_modules/core-js-pure/internals/hide.js ***!
  \*****************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ 82);
var definePropertyModule = __webpack_require__(/*! ../internals/object-define-property */ 136);
var createPropertyDescriptor = __webpack_require__(/*! ../internals/create-property-descriptor */ 153);

module.exports = DESCRIPTORS ? function (object, key, value) {
  return definePropertyModule.f(object, key, createPropertyDescriptor(1, value));
} : function (object, key, value) {
  object[key] = value;
  return object;
};


/***/ }),
/* 84 */
/*!****************************************!*\
  !*** ./dev/Component/AbstractInput.js ***!
  \****************************************/
/*! exports provided: AbstractInput, default */
/*! exports used: AbstractInput */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return AbstractInput; });
/* unused harmony export default */
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/find */ 12);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _babel_runtime_corejs3_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/esm/assertThisInitialized */ 33);
/* harmony import */ var _babel_runtime_corejs3_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/esm/inheritsLoose */ 10);
/* harmony import */ var ko__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ko */ 1);
/* harmony import */ var Common_Utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! Common/Utils */ 2);
/* harmony import */ var Common_Enums__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! Common/Enums */ 0);
/* harmony import */ var Component_Abstract__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! Component/Abstract */ 35);








var AbstractInput =
/*#__PURE__*/
function (_AbstractComponent) {
  Object(_babel_runtime_corejs3_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(AbstractInput, _AbstractComponent);

  /**
   * @param {Object} params
   */
  function AbstractInput(params) {
    var _this;

    _this = _AbstractComponent.call(this) || this;
    _this.value = params.value || '';
    _this.size = params.size || 0;
    _this.label = params.label || '';
    _this.preLabel = params.preLabel || '';
    _this.enable = Object(Common_Utils__WEBPACK_IMPORTED_MODULE_4__["isUnd"])(params.enable) ? true : params.enable;
    _this.trigger = params.trigger && params.trigger.subscribe ? params.trigger : null;
    _this.placeholder = params.placeholder || '';
    _this.labeled = !Object(Common_Utils__WEBPACK_IMPORTED_MODULE_4__["isUnd"])(params.label);
    _this.preLabeled = !Object(Common_Utils__WEBPACK_IMPORTED_MODULE_4__["isUnd"])(params.preLabel);
    _this.triggered = !Object(Common_Utils__WEBPACK_IMPORTED_MODULE_4__["isUnd"])(params.trigger) && !!_this.trigger;
    _this.classForTrigger = ko__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"].observable('');
    _this.className = ko__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"].computed(function () {
      var size = ko__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"].unwrap(_this.size),
          suffixValue = _this.trigger ? ' ' + Object(Common_Utils__WEBPACK_IMPORTED_MODULE_4__["trim"])('settings-saved-trigger-input ' + _this.classForTrigger()) : '';
      return (0 < size ? 'span' + size : '') + suffixValue;
    });

    if (!Object(Common_Utils__WEBPACK_IMPORTED_MODULE_4__["isUnd"])(params.width) && params.element) {
      var _context;

      _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_0___default()(_context = params.element).call(_context, 'input,select,textarea').css('width', params.width);
    }

    _this.disposable.push(_this.className);

    if (_this.trigger) {
      _this.setTriggerState(_this.trigger());

      _this.disposable.push(_this.trigger.subscribe(_this.setTriggerState, Object(_babel_runtime_corejs3_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_this)));
    }

    return _this;
  }

  var _proto = AbstractInput.prototype;

  _proto.setTriggerState = function setTriggerState(value) {
    switch (Object(Common_Utils__WEBPACK_IMPORTED_MODULE_4__["pInt"])(value)) {
      case Common_Enums__WEBPACK_IMPORTED_MODULE_5__["SaveSettingsStep"].TrueResult:
        this.classForTrigger('success');
        break;

      case Common_Enums__WEBPACK_IMPORTED_MODULE_5__["SaveSettingsStep"].FalseResult:
        this.classForTrigger('error');
        break;

      default:
        this.classForTrigger('');
        break;
    }
  };

  return AbstractInput;
}(Component_Abstract__WEBPACK_IMPORTED_MODULE_6__[/* AbstractComponent */ "a"]);



/***/ }),
/* 85 */,
/* 86 */
/*!**********************************************************!*\
  !*** ./node_modules/core-js/internals/internal-state.js ***!
  \**********************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

var NATIVE_WEAK_MAP = __webpack_require__(/*! ../internals/native-weak-map */ 178);
var global = __webpack_require__(/*! ../internals/global */ 27);
var isObject = __webpack_require__(/*! ../internals/is-object */ 44);
var createNonEnumerableProperty = __webpack_require__(/*! ../internals/create-non-enumerable-property */ 49);
var objectHas = __webpack_require__(/*! ../internals/has */ 42);
var sharedKey = __webpack_require__(/*! ../internals/shared-key */ 107);
var hiddenKeys = __webpack_require__(/*! ../internals/hidden-keys */ 102);

var WeakMap = global.WeakMap;
var set, get, has;

var enforce = function (it) {
  return has(it) ? get(it) : set(it, {});
};

var getterFor = function (TYPE) {
  return function (it) {
    var state;
    if (!isObject(it) || (state = get(it)).type !== TYPE) {
      throw TypeError('Incompatible receiver, ' + TYPE + ' required');
    } return state;
  };
};

if (NATIVE_WEAK_MAP) {
  var store = new WeakMap();
  var wmget = store.get;
  var wmhas = store.has;
  var wmset = store.set;
  set = function (it, metadata) {
    wmset.call(store, it, metadata);
    return metadata;
  };
  get = function (it) {
    return wmget.call(store, it) || {};
  };
  has = function (it) {
    return wmhas.call(store, it);
  };
} else {
  var STATE = sharedKey('state');
  hiddenKeys[STATE] = true;
  set = function (it, metadata) {
    createNonEnumerableProperty(it, STATE, metadata);
    return metadata;
  };
  get = function (it) {
    return objectHas(it, STATE) ? it[STATE] : {};
  };
  has = function (it) {
    return objectHas(it, STATE);
  };
}

module.exports = {
  set: set,
  get: get,
  has: has,
  enforce: enforce,
  getterFor: getterFor
};


/***/ }),
/* 87 */
/*!***********************************!*\
  !*** ./dev/Promises/User/Ajax.js ***!
  \***********************************/
/*! exports provided: default */
/*! exports used: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var core_js_modules_web_timers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/web.timers */ 67);
/* harmony import */ var core_js_modules_web_timers__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_timers__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _babel_runtime_corejs3_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/esm/inheritsLoose */ 10);
/* harmony import */ var window__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! window */ 4);
/* harmony import */ var window__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(window__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var Promises_User_Populator__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! Promises/User/Populator */ 393);
/* harmony import */ var Promises_AbstractAjax__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! Promises/AbstractAjax */ 423);






var UserAjaxUserPromises =
/*#__PURE__*/
function (_AbstractAjaxPromises) {
  Object(_babel_runtime_corejs3_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(UserAjaxUserPromises, _AbstractAjaxPromises);

  function UserAjaxUserPromises() {
    var _this;

    _this = _AbstractAjaxPromises.call(this) || this;
    _this.foldersTimeout = 0;
    return _this;
  }

  var _proto = UserAjaxUserPromises.prototype;

  _proto.foldersReload = function foldersReload(fTrigger) {
    return this.abort('Folders').postRequest('Folders', fTrigger).then(function (data) {
      Promises_User_Populator__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"].foldersList(data.Result);
      Promises_User_Populator__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"].foldersAdditionalParameters(data.Result);
      return true;
    });
  };

  _proto.foldersReloadWithTimeout = function foldersReloadWithTimeout(fTrigger) {
    var _this2 = this;

    this.setTrigger(fTrigger, true);
    window__WEBPACK_IMPORTED_MODULE_2___default.a.clearTimeout(this.foldersTimeout);
    this.foldersTimeout = window__WEBPACK_IMPORTED_MODULE_2___default.a.setTimeout(function () {
      _this2.foldersReload(fTrigger);
    }, 500);
  };

  _proto.folderDelete = function folderDelete(sFolderFullNameRaw, fTrigger) {
    return this.postRequest('FolderDelete', fTrigger, {
      'Folder': sFolderFullNameRaw
    });
  };

  _proto.folderCreate = function folderCreate(sNewFolderName, sParentName, fTrigger) {
    return this.postRequest('FolderCreate', fTrigger, {
      'Folder': sNewFolderName,
      'Parent': sParentName
    });
  };

  _proto.folderRename = function folderRename(sPrevFolderFullNameRaw, sNewFolderName, fTrigger) {
    return this.postRequest('FolderRename', fTrigger, {
      'Folder': sPrevFolderFullNameRaw,
      'NewFolderName': sNewFolderName
    });
  };

  _proto.attachmentsActions = function attachmentsActions(sAction, aHashes, fTrigger) {
    return this.postRequest('AttachmentsActions', fTrigger, {
      'Do': sAction,
      'Hashes': aHashes
    });
  };

  _proto.welcomeClose = function welcomeClose() {
    return this.postRequest('WelcomeClose');
  };

  return UserAjaxUserPromises;
}(Promises_AbstractAjax__WEBPACK_IMPORTED_MODULE_4__[/* AbstractAjaxPromises */ "a"]);

/* harmony default export */ __webpack_exports__["a"] = (new UserAjaxUserPromises());

/***/ }),
/* 88 */,
/* 89 */
/*!******************************************************************************!*\
  !*** ./node_modules/core-js/internals/object-get-own-property-descriptor.js ***!
  \******************************************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ 47);
var propertyIsEnumerableModule = __webpack_require__(/*! ../internals/object-property-is-enumerable */ 164);
var createPropertyDescriptor = __webpack_require__(/*! ../internals/create-property-descriptor */ 90);
var toIndexedObject = __webpack_require__(/*! ../internals/to-indexed-object */ 71);
var toPrimitive = __webpack_require__(/*! ../internals/to-primitive */ 124);
var has = __webpack_require__(/*! ../internals/has */ 42);
var IE8_DOM_DEFINE = __webpack_require__(/*! ../internals/ie8-dom-define */ 125);

var nativeGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;

// `Object.getOwnPropertyDescriptor` method
// https://tc39.github.io/ecma262/#sec-object.getownpropertydescriptor
exports.f = DESCRIPTORS ? nativeGetOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {
  O = toIndexedObject(O);
  P = toPrimitive(P, true);
  if (IE8_DOM_DEFINE) try {
    return nativeGetOwnPropertyDescriptor(O, P);
  } catch (error) { /* empty */ }
  if (has(O, P)) return createPropertyDescriptor(!propertyIsEnumerableModule.f.call(O, P), O[P]);
};


/***/ }),
/* 90 */
/*!**********************************************************************!*\
  !*** ./node_modules/core-js/internals/create-property-descriptor.js ***!
  \**********************************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports) {

module.exports = function (bitmap, value) {
  return {
    enumerable: !(bitmap & 1),
    configurable: !(bitmap & 2),
    writable: !(bitmap & 4),
    value: value
  };
};


/***/ }),
/* 91 */
/*!******************************************************!*\
  !*** ./node_modules/core-js/internals/set-global.js ***!
  \******************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

var global = __webpack_require__(/*! ../internals/global */ 27);
var createNonEnumerableProperty = __webpack_require__(/*! ../internals/create-non-enumerable-property */ 49);

module.exports = function (key, value) {
  try {
    createNonEnumerableProperty(global, key, value);
  } catch (error) {
    global[key] = value;
  } return value;
};


/***/ }),
/* 92 */
/*!**********************************************************!*\
  !*** ./node_modules/core-js/internals/inspect-source.js ***!
  \**********************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

var store = __webpack_require__(/*! ../internals/shared-store */ 126);

var functionToString = Function.toString;

// this helper broken in `3.4.1-3.4.4`, so we can't use `shared` helper
if (typeof store.inspectSource != 'function') {
  store.inspectSource = function (it) {
    return functionToString.call(it);
  };
}

module.exports = store.inspectSource;


/***/ }),
/* 93 */
/*!*****************************************************************!*\
  !*** ./node_modules/core-js/internals/to-string-tag-support.js ***!
  \*****************************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ 32);

var TO_STRING_TAG = wellKnownSymbol('toStringTag');
var test = {};

test[TO_STRING_TAG] = 'z';

module.exports = String(test) === '[object z]';


/***/ }),
/* 94 */
/*!******************************************************************!*\
  !*** ./node_modules/core-js-pure/internals/to-indexed-object.js ***!
  \******************************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

// toObject with fallback for non-array-like ES3 strings
var IndexedObject = __webpack_require__(/*! ../internals/indexed-object */ 197);
var requireObjectCoercible = __webpack_require__(/*! ../internals/require-object-coercible */ 199);

module.exports = function (it) {
  return IndexedObject(requireObjectCoercible(it));
};


/***/ }),
/* 95 */
/*!****************************************************!*\
  !*** ./node_modules/core-js-pure/internals/has.js ***!
  \****************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports) {

var hasOwnProperty = {}.hasOwnProperty;

module.exports = function (it, key) {
  return hasOwnProperty.call(it, key);
};


/***/ }),
/* 96 */
/*!*****************************************************!*\
  !*** ./node_modules/core-js-pure/internals/path.js ***!
  \*****************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports) {

module.exports = {};


/***/ }),
/* 97 */
/*!********************************!*\
  !*** external "window.moment" ***!
  \********************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports) {

module.exports = window.moment;

/***/ }),
/* 98 */
/*!************************************!*\
  !*** external "window.progressJs" ***!
  \************************************/
/*! no static exports found */
/*! exports used: default */
/***/ (function(module, exports) {

module.exports = window.progressJs;

/***/ }),
/* 99 */
/*!*************************************!*\
  !*** ./dev/Stores/User/Identity.js ***!
  \*************************************/
/*! exports provided: default */
/*! exports used: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/map */ 18);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! _ */ 3);
/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(___WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var ko__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ko */ 1);




var IdentityUserStore = function IdentityUserStore() {
  var _this = this;

  this.identities = ko__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"].observableArray([]);
  this.identities.loading = ko__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"].observable(false).extend({
    throttle: 100
  });
  this.identitiesIDS = ko__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"].computed(function () {
    return ___WEBPACK_IMPORTED_MODULE_1___default.a.compact(_babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_0___default()(___WEBPACK_IMPORTED_MODULE_1___default.a).call(___WEBPACK_IMPORTED_MODULE_1___default.a, _this.identities(), function (item) {
      return item ? item.id : null;
    }));
  });
};

/* harmony default export */ __webpack_exports__["a"] = (new IdentityUserStore());

/***/ }),
/* 100 */
/*!************************************!*\
  !*** ./dev/Stores/User/Contact.js ***!
  \************************************/
/*! exports provided: default */
/*! exports used: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var ko__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ko */ 1);
/* harmony import */ var Common_Enums__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! Common/Enums */ 0);
/* harmony import */ var Storage_Settings__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! Storage/Settings */ 5);




var ContactUserStore =
/*#__PURE__*/
function () {
  function ContactUserStore() {
    this.contacts = ko__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].observableArray([]);
    this.contacts.loading = ko__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].observable(false).extend({
      throttle: Common_Enums__WEBPACK_IMPORTED_MODULE_1__["Magics"].Time200ms
    });
    this.contacts.importing = ko__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].observable(false).extend({
      throttle: Common_Enums__WEBPACK_IMPORTED_MODULE_1__["Magics"].Time200ms
    });
    this.contacts.syncing = ko__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].observable(false).extend({
      throttle: Common_Enums__WEBPACK_IMPORTED_MODULE_1__["Magics"].Time200ms
    });
    this.contacts.exportingVcf = ko__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].observable(false).extend({
      throttle: Common_Enums__WEBPACK_IMPORTED_MODULE_1__["Magics"].Time200ms
    });
    this.contacts.exportingCsv = ko__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].observable(false).extend({
      throttle: Common_Enums__WEBPACK_IMPORTED_MODULE_1__["Magics"].Time200ms
    });
    this.allowContactsSync = ko__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].observable(false);
    this.enableContactsSync = ko__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].observable(false);
    this.contactsSyncUrl = ko__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].observable('');
    this.contactsSyncUser = ko__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].observable('');
    this.contactsSyncPass = ko__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].observable('');
  }

  var _proto = ContactUserStore.prototype;

  _proto.populate = function populate() {
    this.allowContactsSync(!!Storage_Settings__WEBPACK_IMPORTED_MODULE_2__["settingsGet"]('ContactsSyncIsAllowed'));
    this.enableContactsSync(!!Storage_Settings__WEBPACK_IMPORTED_MODULE_2__["settingsGet"]('EnableContactsSync'));
    this.contactsSyncUrl(Storage_Settings__WEBPACK_IMPORTED_MODULE_2__["settingsGet"]('ContactsSyncUrl'));
    this.contactsSyncUser(Storage_Settings__WEBPACK_IMPORTED_MODULE_2__["settingsGet"]('ContactsSyncUser'));
    this.contactsSyncPass(Storage_Settings__WEBPACK_IMPORTED_MODULE_2__["settingsGet"]('ContactsSyncPassword'));
  };

  return ContactUserStore;
}();

/* harmony default export */ __webpack_exports__["a"] = (new ContactUserStore());

/***/ }),
/* 101 */
/*!*******************************************************************!*\
  !*** ./node_modules/core-js/internals/document-create-element.js ***!
  \*******************************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

var global = __webpack_require__(/*! ../internals/global */ 27);
var isObject = __webpack_require__(/*! ../internals/is-object */ 44);

var document = global.document;
// typeof document.createElement is 'object' in old IE
var EXISTS = isObject(document) && isObject(document.createElement);

module.exports = function (it) {
  return EXISTS ? document.createElement(it) : {};
};


/***/ }),
/* 102 */
/*!*******************************************************!*\
  !*** ./node_modules/core-js/internals/hidden-keys.js ***!
  \*******************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports) {

module.exports = {};


/***/ }),
/* 103 */
/*!*****************************************************************!*\
  !*** ./node_modules/core-js/internals/function-bind-context.js ***!
  \*****************************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

var aFunction = __webpack_require__(/*! ../internals/a-function */ 66);

// optional / simple context binding
module.exports = function (fn, that, length) {
  aFunction(fn);
  if (that === undefined) return fn;
  switch (length) {
    case 0: return function () {
      return fn.call(that);
    };
    case 1: return function (a) {
      return fn.call(that, a);
    };
    case 2: return function (a, b) {
      return fn.call(that, a, b);
    };
    case 3: return function (a, b, c) {
      return fn.call(that, a, b, c);
    };
  }
  return function (/* ...args */) {
    return fn.apply(that, arguments);
  };
};


/***/ }),
/* 104 */
/*!*************************************************************!*\
  !*** ./node_modules/core-js/internals/engine-user-agent.js ***!
  \*************************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

var getBuiltIn = __webpack_require__(/*! ../internals/get-built-in */ 59);

module.exports = getBuiltIn('navigator', 'userAgent') || '';


/***/ }),
/* 105 */
/*!******************************************************************!*\
  !*** ./node_modules/core-js/internals/new-promise-capability.js ***!
  \******************************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var aFunction = __webpack_require__(/*! ../internals/a-function */ 66);

var PromiseCapability = function (C) {
  var resolve, reject;
  this.promise = new C(function ($$resolve, $$reject) {
    if (resolve !== undefined || reject !== undefined) throw TypeError('Bad Promise constructor');
    resolve = $$resolve;
    reject = $$reject;
  });
  this.resolve = aFunction(resolve);
  this.reject = aFunction(reject);
};

// 25.4.1.5 NewPromiseCapability(C)
module.exports.f = function (C) {
  return new PromiseCapability(C);
};


/***/ }),
/* 106 */
/*!*****************************!*\
  !*** ./dev/Common/Jassl.js ***!
  \*****************************/
/*! exports provided: jassl */
/*! exports used: jassl */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return jassl; });
/* harmony import */ var core_js_modules_es_object_to_string__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.object.to-string */ 63);
/* harmony import */ var core_js_modules_es_object_to_string__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_to_string__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var core_js_modules_es_promise__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es.promise */ 120);
/* harmony import */ var core_js_modules_es_promise__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_promise__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var window__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! window */ 4);
/* harmony import */ var window__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(window__WEBPACK_IMPORTED_MODULE_2__);


 // let rainloopCaches = window.caches && window.caches.open ? window.caches : null;

/**
 * @param {src} src
 * @param {boolean} async = false
 * @returns {Promise}
 */

function jassl(src, async) {
  if (async === void 0) {
    async = false;
  }

  if (!window__WEBPACK_IMPORTED_MODULE_2___default.a.Promise || !window__WEBPACK_IMPORTED_MODULE_2___default.a.Promise.all) {
    throw new Error('Promises are not available your environment.');
  }

  if (!src) {
    throw new Error('src should not be empty.');
  }

  return new window__WEBPACK_IMPORTED_MODULE_2___default.a.Promise(function (resolve, reject) {
    var element = window__WEBPACK_IMPORTED_MODULE_2___default.a.document.createElement('script');

    element.onload = function () {
      resolve(src);
    };

    element.onerror = function () {
      reject(new Error(src));
    };

    element.async = true === async;
    element.src = src;
    window__WEBPACK_IMPORTED_MODULE_2___default.a.document.body.appendChild(element);
  })
  /* .then((s) => {
  const found = s && rainloopCaches ? s.match(/rainloop\/v\/([^\/]+)\/static\//) : null;
  if (found && found[1])
  {
  rainloopCaches.open('rainloop-offline-' + found[1]).then(
  (cache) => cache.add(s)
  ).catch(() => {
  rainloopCaches = null;
  });
  }
  return s;
  })*/
  ;
}

/***/ }),
/* 107 */
/*!******************************************************!*\
  !*** ./node_modules/core-js/internals/shared-key.js ***!
  \******************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

var shared = __webpack_require__(/*! ../internals/shared */ 127);
var uid = __webpack_require__(/*! ../internals/uid */ 128);

var keys = shared('keys');

module.exports = function (key) {
  return keys[key] || (keys[key] = uid(key));
};


/***/ }),
/* 108 */
/*!*********************************************************!*\
  !*** ./node_modules/core-js/internals/enum-bug-keys.js ***!
  \*********************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports) {

// IE8- don't enum bug keys
module.exports = [
  'constructor',
  'hasOwnProperty',
  'isPrototypeOf',
  'propertyIsEnumerable',
  'toLocaleString',
  'toString',
  'valueOf'
];


/***/ }),
/* 109 */
/*!*************************************************************!*\
  !*** ./node_modules/core-js/internals/set-to-string-tag.js ***!
  \*************************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

var defineProperty = __webpack_require__(/*! ../internals/object-define-property */ 52).f;
var has = __webpack_require__(/*! ../internals/has */ 42);
var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ 32);

var TO_STRING_TAG = wellKnownSymbol('toStringTag');

module.exports = function (it, TAG, STATIC) {
  if (it && !has(it = STATIC ? it : it.prototype, TO_STRING_TAG)) {
    defineProperty(it, TO_STRING_TAG, { configurable: true, value: TAG });
  }
};


/***/ }),
/* 110 */
/*!*******************************************************!*\
  !*** ./node_modules/core-js/internals/regexp-exec.js ***!
  \*******************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var regexpFlags = __webpack_require__(/*! ./regexp-flags */ 170);
var stickyHelpers = __webpack_require__(/*! ./regexp-sticky-helpers */ 233);

var nativeExec = RegExp.prototype.exec;
// This always refers to the native implementation, because the
// String#replace polyfill uses ./fix-regexp-well-known-symbol-logic.js,
// which loads this file before patching the method.
var nativeReplace = String.prototype.replace;

var patchedExec = nativeExec;

var UPDATES_LAST_INDEX_WRONG = (function () {
  var re1 = /a/;
  var re2 = /b*/g;
  nativeExec.call(re1, 'a');
  nativeExec.call(re2, 'a');
  return re1.lastIndex !== 0 || re2.lastIndex !== 0;
})();

var UNSUPPORTED_Y = stickyHelpers.UNSUPPORTED_Y || stickyHelpers.BROKEN_CARET;

// nonparticipating capturing group, copied from es5-shim's String#split patch.
var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined;

var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED || UNSUPPORTED_Y;

if (PATCH) {
  patchedExec = function exec(str) {
    var re = this;
    var lastIndex, reCopy, match, i;
    var sticky = UNSUPPORTED_Y && re.sticky;
    var flags = regexpFlags.call(re);
    var source = re.source;
    var charsAdded = 0;
    var strCopy = str;

    if (sticky) {
      flags = flags.replace('y', '');
      if (flags.indexOf('g') === -1) {
        flags += 'g';
      }

      strCopy = String(str).slice(re.lastIndex);
      // Support anchored sticky behavior.
      if (re.lastIndex > 0 && (!re.multiline || re.multiline && str[re.lastIndex - 1] !== '\n')) {
        source = '(?: ' + source + ')';
        strCopy = ' ' + strCopy;
        charsAdded++;
      }
      // ^(? + rx + ) is needed, in combination with some str slicing, to
      // simulate the 'y' flag.
      reCopy = new RegExp('^(?:' + source + ')', flags);
    }

    if (NPCG_INCLUDED) {
      reCopy = new RegExp('^' + source + '$(?!\\s)', flags);
    }
    if (UPDATES_LAST_INDEX_WRONG) lastIndex = re.lastIndex;

    match = nativeExec.call(sticky ? reCopy : re, strCopy);

    if (sticky) {
      if (match) {
        match.input = match.input.slice(charsAdded);
        match[0] = match[0].slice(charsAdded);
        match.index = re.lastIndex;
        re.lastIndex += match[0].length;
      } else re.lastIndex = 0;
    } else if (UPDATES_LAST_INDEX_WRONG && match) {
      re.lastIndex = re.global ? match.index + match[0].length : lastIndex;
    }
    if (NPCG_INCLUDED && match && match.length > 1) {
      // Fix browsers whose `exec` methods don't consistently return `undefined`
      // for NPCG, like IE8. NOTE: This doesn' work for /(.?)?/
      nativeReplace.call(match[0], reCopy, function () {
        for (i = 1; i < arguments.length - 2; i++) {
          if (arguments[i] === undefined) match[i] = undefined;
        }
      });
    }

    return match;
  };
}

module.exports = patchedExec;


/***/ }),
/* 111 */
/*!*************************************************************!*\
  !*** ./node_modules/core-js/modules/es.regexp.to-string.js ***!
  \*************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var redefine = __webpack_require__(/*! ../internals/redefine */ 53);
var anObject = __webpack_require__(/*! ../internals/an-object */ 37);
var fails = __webpack_require__(/*! ../internals/fails */ 36);
var flags = __webpack_require__(/*! ../internals/regexp-flags */ 170);

var TO_STRING = 'toString';
var RegExpPrototype = RegExp.prototype;
var nativeToString = RegExpPrototype[TO_STRING];

var NOT_GENERIC = fails(function () { return nativeToString.call({ source: 'a', flags: 'b' }) != '/a/b'; });
// FF44- RegExp#toString has a wrong name
var INCORRECT_NAME = nativeToString.name != TO_STRING;

// `RegExp.prototype.toString` method
// https://tc39.github.io/ecma262/#sec-regexp.prototype.tostring
if (NOT_GENERIC || INCORRECT_NAME) {
  redefine(RegExp.prototype, TO_STRING, function toString() {
    var R = anObject(this);
    var p = String(R.source);
    var rf = R.flags;
    var f = String(rf === undefined && R instanceof RegExp && !('flags' in RegExpPrototype) ? flags.call(R) : rf);
    return '/' + p + '/' + f;
  }, { unsafe: true });
}


/***/ }),
/* 112 */
/*!**********************************************************!*\
  !*** ./node_modules/core-js-pure/internals/to-length.js ***!
  \**********************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

var toInteger = __webpack_require__(/*! ../internals/to-integer */ 201);

var min = Math.min;

// `ToLength` abstract operation
// https://tc39.github.io/ecma262/#sec-tolength
module.exports = function (argument) {
  return argument > 0 ? min(toInteger(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
};


/***/ }),
/* 113 */
/*!*******************************************************************************!*\
  !*** ./node_modules/@babel/runtime-corejs3/core-js-stable/instance/values.js ***!
  \*******************************************************************************/
/*! no static exports found */
/*! exports used: default */
/***/ (function(module, exports, __webpack_require__) {

module.exports = __webpack_require__(/*! core-js-pure/stable/instance/values */ 291);

/***/ }),
/* 114 */
/*!*****************************!*\
  !*** ./dev/Stores/Theme.js ***!
  \*****************************/
/*! exports provided: default */
/*! exports used: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var ko__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ko */ 1);
/* harmony import */ var Common_Utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! Common/Utils */ 2);
/* harmony import */ var Storage_Settings__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! Storage/Settings */ 5);




var ThemeStore =
/*#__PURE__*/
function () {
  function ThemeStore() {
    this.themes = ko__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].observableArray([]);
    this.themeBackgroundName = ko__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].observable('');
    this.themeBackgroundHash = ko__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].observable('');
    this.theme = ko__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].observable('').extend({
      limitedList: this.themes
    });
  }

  var _proto = ThemeStore.prototype;

  _proto.populate = function populate() {
    var themes = Storage_Settings__WEBPACK_IMPORTED_MODULE_2__["appSettingsGet"]('themes');
    this.themes(Object(Common_Utils__WEBPACK_IMPORTED_MODULE_1__["isArray"])(themes) ? themes : []);
    this.theme(Storage_Settings__WEBPACK_IMPORTED_MODULE_2__["settingsGet"]('Theme'));
    this.themeBackgroundName(Storage_Settings__WEBPACK_IMPORTED_MODULE_2__["settingsGet"]('UserBackgroundName'));
    this.themeBackgroundHash(Storage_Settings__WEBPACK_IMPORTED_MODULE_2__["settingsGet"]('UserBackgroundHash'));
  };

  return ThemeStore;
}();

/* harmony default export */ __webpack_exports__["a"] = (new ThemeStore());

/***/ }),
/* 115 */
/*!*****************************************!*\
  !*** ./dev/Stores/User/Notification.js ***!
  \*****************************************/
/*! exports provided: default */
/*! exports used: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var core_js_modules_web_timers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/web.timers */ 67);
/* harmony import */ var core_js_modules_web_timers__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_timers__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var window__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! window */ 4);
/* harmony import */ var window__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(window__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var ko__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ko */ 1);
/* harmony import */ var Common_Enums__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! Common/Enums */ 0);
/* harmony import */ var Common_Events__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! Common/Events */ 24);
/* harmony import */ var Common_Audio__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! Common/Audio */ 81);
/* harmony import */ var Storage_Settings__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! Storage/Settings */ 5);








var NotificationUserStore =
/*#__PURE__*/
function () {
  function NotificationUserStore() {
    var _this = this;

    this.enableSoundNotification = ko__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"].observable(false);
    this.soundNotificationIsSupported = ko__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"].observable(false);
    this.allowDesktopNotification = ko__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"].observable(false);
    this.desktopNotificationPermissions = ko__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"].computed(function () {
      _this.allowDesktopNotification();

      var result = Common_Enums__WEBPACK_IMPORTED_MODULE_3__["DesktopNotification"].NotSupported;

      var NotificationClass = _this.notificationClass();

      if (NotificationClass && NotificationClass.permission) {
        switch (NotificationClass.permission.toLowerCase()) {
          case 'granted':
            result = Common_Enums__WEBPACK_IMPORTED_MODULE_3__["DesktopNotification"].Allowed;
            break;

          case 'denied':
            result = Common_Enums__WEBPACK_IMPORTED_MODULE_3__["DesktopNotification"].Denied;
            break;

          case 'default':
            result = Common_Enums__WEBPACK_IMPORTED_MODULE_3__["DesktopNotification"].NotAllowed;
            break;
          // no default
        }
      } else if (window__WEBPACK_IMPORTED_MODULE_1___default.a.webkitNotifications && window__WEBPACK_IMPORTED_MODULE_1___default.a.webkitNotifications.checkPermission) {
        result = window__WEBPACK_IMPORTED_MODULE_1___default.a.webkitNotifications.checkPermission();
      }

      return result;
    }).extend({
      notify: 'always'
    });
    this.enableDesktopNotification = ko__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"].computed({
      read: function read() {
        return _this.allowDesktopNotification() && Common_Enums__WEBPACK_IMPORTED_MODULE_3__["DesktopNotification"].Allowed === _this.desktopNotificationPermissions();
      },
      write: function write(value) {
        if (value) {
          var NotificationClass = _this.notificationClass(),
              permission = _this.desktopNotificationPermissions();

          if (NotificationClass && Common_Enums__WEBPACK_IMPORTED_MODULE_3__["DesktopNotification"].Allowed === permission) {
            _this.allowDesktopNotification(true);
          } else if (NotificationClass && Common_Enums__WEBPACK_IMPORTED_MODULE_3__["DesktopNotification"].NotAllowed === permission) {
            NotificationClass.requestPermission(function () {
              _this.allowDesktopNotification.valueHasMutated();

              if (Common_Enums__WEBPACK_IMPORTED_MODULE_3__["DesktopNotification"].Allowed === _this.desktopNotificationPermissions()) {
                if (_this.allowDesktopNotification()) {
                  _this.allowDesktopNotification.valueHasMutated();
                } else {
                  _this.allowDesktopNotification(true);
                }
              } else {
                if (_this.allowDesktopNotification()) {
                  _this.allowDesktopNotification(false);
                } else {
                  _this.allowDesktopNotification.valueHasMutated();
                }
              }
            });
          } else {
            _this.allowDesktopNotification(false);
          }
        } else {
          _this.allowDesktopNotification(false);
        }
      }
    }).extend({
      notify: 'always'
    });

    if (!this.enableDesktopNotification.valueHasMutated) {
      this.enableDesktopNotification.valueHasMutated = function () {
        _this.allowDesktopNotification.valueHasMutated();
      };
    }

    this.computers();
    this.initNotificationPlayer();
  }

  var _proto = NotificationUserStore.prototype;

  _proto.computers = function computers() {
    var _this2 = this;

    this.isDesktopNotificationSupported = ko__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"].computed(function () {
      return Common_Enums__WEBPACK_IMPORTED_MODULE_3__["DesktopNotification"].NotSupported !== _this2.desktopNotificationPermissions();
    });
    this.isDesktopNotificationDenied = ko__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"].computed(function () {
      return Common_Enums__WEBPACK_IMPORTED_MODULE_3__["DesktopNotification"].NotSupported === _this2.desktopNotificationPermissions() || Common_Enums__WEBPACK_IMPORTED_MODULE_3__["DesktopNotification"].Denied === _this2.desktopNotificationPermissions();
    });
  };

  _proto.initNotificationPlayer = function initNotificationPlayer() {
    if (Common_Audio__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"] && Common_Audio__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"].supportedNotification) {
      this.soundNotificationIsSupported(true);
    } else {
      this.enableSoundNotification(false);
      this.soundNotificationIsSupported(false);
    }
  };

  _proto.playSoundNotification = function playSoundNotification(skipSetting) {
    if (Common_Audio__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"] && Common_Audio__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"].supportedNotification && (skipSetting ? true : this.enableSoundNotification())) {
      Common_Audio__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"].playNotification();
    }
  };

  _proto.displayDesktopNotification = function displayDesktopNotification(imageSrc, title, text, nessageData) {
    if (this.enableDesktopNotification()) {
      var NotificationClass = this.notificationClass(),
          notification = NotificationClass ? new NotificationClass(title, {
        body: text,
        icon: imageSrc
      }) : null;

      if (notification) {
        if (notification.show) {
          notification.show();
        }

        if (nessageData) {
          notification.onclick = function () {
            window__WEBPACK_IMPORTED_MODULE_1___default.a.focus();

            if (nessageData.Folder && nessageData.Uid) {
              Common_Events__WEBPACK_IMPORTED_MODULE_4__[/* pub */ "a"]('mailbox.message.show', [nessageData.Folder, nessageData.Uid]);
            }
          };
        }

        window__WEBPACK_IMPORTED_MODULE_1___default.a.setTimeout(function (localNotifications) {
          return function () {
            if (localNotifications.cancel) {
              localNotifications.cancel();
            } else if (localNotifications.close) {
              localNotifications.close();
            }
          };
        }(notification), Common_Enums__WEBPACK_IMPORTED_MODULE_3__["Magics"].Time7s);
      }
    }
  };

  _proto.populate = function populate() {
    this.enableSoundNotification(!!Storage_Settings__WEBPACK_IMPORTED_MODULE_6__["settingsGet"]('SoundNotification'));
    this.enableDesktopNotification(!!Storage_Settings__WEBPACK_IMPORTED_MODULE_6__["settingsGet"]('DesktopNotifications'));
  }
  /**
   * @returns {*|null}
   */
  ;

  _proto.notificationClass = function notificationClass() {
    return window__WEBPACK_IMPORTED_MODULE_1___default.a.Notification && window__WEBPACK_IMPORTED_MODULE_1___default.a.Notification.requestPermission ? window__WEBPACK_IMPORTED_MODULE_1___default.a.Notification : null;
  };

  return NotificationUserStore;
}();

/* harmony default export */ __webpack_exports__["a"] = (new NotificationUserStore());

/***/ }),
/* 116 */,
/* 117 */,
/* 118 */
/*!**********************************************************!*\
  !*** ./node_modules/core-js/internals/indexed-object.js ***!
  \**********************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

var fails = __webpack_require__(/*! ../internals/fails */ 36);
var classof = __webpack_require__(/*! ../internals/classof-raw */ 50);

var split = ''.split;

// fallback for non-array-like ES3 and non-enumerable old V8 strings
module.exports = fails(function () {
  // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
  // eslint-disable-next-line no-prototype-builtins
  return !Object('z').propertyIsEnumerable(0);
}) ? function (it) {
  return classof(it) == 'String' ? split.call(it, '') : Object(it);
} : Object;


/***/ }),
/* 119 */
/*!*****************************************************!*\
  !*** ./node_modules/core-js/internals/to-object.js ***!
  \*****************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

var requireObjectCoercible = __webpack_require__(/*! ../internals/require-object-coercible */ 55);

// `ToObject` abstract operation
// https://tc39.github.io/ecma262/#sec-toobject
module.exports = function (argument) {
  return Object(requireObjectCoercible(argument));
};


/***/ }),
/* 120 */
/*!****************************************************!*\
  !*** ./node_modules/core-js/modules/es.promise.js ***!
  \****************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var $ = __webpack_require__(/*! ../internals/export */ 48);
var IS_PURE = __webpack_require__(/*! ../internals/is-pure */ 78);
var global = __webpack_require__(/*! ../internals/global */ 27);
var getBuiltIn = __webpack_require__(/*! ../internals/get-built-in */ 59);
var NativePromise = __webpack_require__(/*! ../internals/native-promise-constructor */ 168);
var redefine = __webpack_require__(/*! ../internals/redefine */ 53);
var redefineAll = __webpack_require__(/*! ../internals/redefine-all */ 187);
var setToStringTag = __webpack_require__(/*! ../internals/set-to-string-tag */ 109);
var setSpecies = __webpack_require__(/*! ../internals/set-species */ 188);
var isObject = __webpack_require__(/*! ../internals/is-object */ 44);
var aFunction = __webpack_require__(/*! ../internals/a-function */ 66);
var anInstance = __webpack_require__(/*! ../internals/an-instance */ 189);
var classof = __webpack_require__(/*! ../internals/classof-raw */ 50);
var inspectSource = __webpack_require__(/*! ../internals/inspect-source */ 92);
var iterate = __webpack_require__(/*! ../internals/iterate */ 142);
var checkCorrectnessOfIteration = __webpack_require__(/*! ../internals/check-correctness-of-iteration */ 193);
var speciesConstructor = __webpack_require__(/*! ../internals/species-constructor */ 143);
var task = __webpack_require__(/*! ../internals/task */ 132).set;
var microtask = __webpack_require__(/*! ../internals/microtask */ 194);
var promiseResolve = __webpack_require__(/*! ../internals/promise-resolve */ 169);
var hostReportErrors = __webpack_require__(/*! ../internals/host-report-errors */ 195);
var newPromiseCapabilityModule = __webpack_require__(/*! ../internals/new-promise-capability */ 105);
var perform = __webpack_require__(/*! ../internals/perform */ 144);
var InternalStateModule = __webpack_require__(/*! ../internals/internal-state */ 86);
var isForced = __webpack_require__(/*! ../internals/is-forced */ 129);
var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ 32);
var V8_VERSION = __webpack_require__(/*! ../internals/engine-v8-version */ 151);

var SPECIES = wellKnownSymbol('species');
var PROMISE = 'Promise';
var getInternalState = InternalStateModule.get;
var setInternalState = InternalStateModule.set;
var getInternalPromiseState = InternalStateModule.getterFor(PROMISE);
var PromiseConstructor = NativePromise;
var TypeError = global.TypeError;
var document = global.document;
var process = global.process;
var $fetch = getBuiltIn('fetch');
var newPromiseCapability = newPromiseCapabilityModule.f;
var newGenericPromiseCapability = newPromiseCapability;
var IS_NODE = classof(process) == 'process';
var DISPATCH_EVENT = !!(document && document.createEvent && global.dispatchEvent);
var UNHANDLED_REJECTION = 'unhandledrejection';
var REJECTION_HANDLED = 'rejectionhandled';
var PENDING = 0;
var FULFILLED = 1;
var REJECTED = 2;
var HANDLED = 1;
var UNHANDLED = 2;
var Internal, OwnPromiseCapability, PromiseWrapper, nativeThen;

var FORCED = isForced(PROMISE, function () {
  var GLOBAL_CORE_JS_PROMISE = inspectSource(PromiseConstructor) !== String(PromiseConstructor);
  if (!GLOBAL_CORE_JS_PROMISE) {
    // V8 6.6 (Node 10 and Chrome 66) have a bug with resolving custom thenables
    // https://bugs.chromium.org/p/chromium/issues/detail?id=830565
    // We can't detect it synchronously, so just check versions
    if (V8_VERSION === 66) return true;
    // Unhandled rejections tracking support, NodeJS Promise without it fails @@species test
    if (!IS_NODE && typeof PromiseRejectionEvent != 'function') return true;
  }
  // We need Promise#finally in the pure version for preventing prototype pollution
  if (IS_PURE && !PromiseConstructor.prototype['finally']) return true;
  // We can't use @@species feature detection in V8 since it causes
  // deoptimization and performance degradation
  // https://github.com/zloirock/core-js/issues/679
  if (V8_VERSION >= 51 && /native code/.test(PromiseConstructor)) return false;
  // Detect correctness of subclassing with @@species support
  var promise = PromiseConstructor.resolve(1);
  var FakePromise = function (exec) {
    exec(function () { /* empty */ }, function () { /* empty */ });
  };
  var constructor = promise.constructor = {};
  constructor[SPECIES] = FakePromise;
  return !(promise.then(function () { /* empty */ }) instanceof FakePromise);
});

var INCORRECT_ITERATION = FORCED || !checkCorrectnessOfIteration(function (iterable) {
  PromiseConstructor.all(iterable)['catch'](function () { /* empty */ });
});

// helpers
var isThenable = function (it) {
  var then;
  return isObject(it) && typeof (then = it.then) == 'function' ? then : false;
};

var notify = function (promise, state, isReject) {
  if (state.notified) return;
  state.notified = true;
  var chain = state.reactions;
  microtask(function () {
    var value = state.value;
    var ok = state.state == FULFILLED;
    var index = 0;
    // variable length - can't use forEach
    while (chain.length > index) {
      var reaction = chain[index++];
      var handler = ok ? reaction.ok : reaction.fail;
      var resolve = reaction.resolve;
      var reject = reaction.reject;
      var domain = reaction.domain;
      var result, then, exited;
      try {
        if (handler) {
          if (!ok) {
            if (state.rejection === UNHANDLED) onHandleUnhandled(promise, state);
            state.rejection = HANDLED;
          }
          if (handler === true) result = value;
          else {
            if (domain) domain.enter();
            result = handler(value); // can throw
            if (domain) {
              domain.exit();
              exited = true;
            }
          }
          if (result === reaction.promise) {
            reject(TypeError('Promise-chain cycle'));
          } else if (then = isThenable(result)) {
            then.call(result, resolve, reject);
          } else resolve(result);
        } else reject(value);
      } catch (error) {
        if (domain && !exited) domain.exit();
        reject(error);
      }
    }
    state.reactions = [];
    state.notified = false;
    if (isReject && !state.rejection) onUnhandled(promise, state);
  });
};

var dispatchEvent = function (name, promise, reason) {
  var event, handler;
  if (DISPATCH_EVENT) {
    event = document.createEvent('Event');
    event.promise = promise;
    event.reason = reason;
    event.initEvent(name, false, true);
    global.dispatchEvent(event);
  } else event = { promise: promise, reason: reason };
  if (handler = global['on' + name]) handler(event);
  else if (name === UNHANDLED_REJECTION) hostReportErrors('Unhandled promise rejection', reason);
};

var onUnhandled = function (promise, state) {
  task.call(global, function () {
    var value = state.value;
    var IS_UNHANDLED = isUnhandled(state);
    var result;
    if (IS_UNHANDLED) {
      result = perform(function () {
        if (IS_NODE) {
          process.emit('unhandledRejection', value, promise);
        } else dispatchEvent(UNHANDLED_REJECTION, promise, value);
      });
      // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should
      state.rejection = IS_NODE || isUnhandled(state) ? UNHANDLED : HANDLED;
      if (result.error) throw result.value;
    }
  });
};

var isUnhandled = function (state) {
  return state.rejection !== HANDLED && !state.parent;
};

var onHandleUnhandled = function (promise, state) {
  task.call(global, function () {
    if (IS_NODE) {
      process.emit('rejectionHandled', promise);
    } else dispatchEvent(REJECTION_HANDLED, promise, state.value);
  });
};

var bind = function (fn, promise, state, unwrap) {
  return function (value) {
    fn(promise, state, value, unwrap);
  };
};

var internalReject = function (promise, state, value, unwrap) {
  if (state.done) return;
  state.done = true;
  if (unwrap) state = unwrap;
  state.value = value;
  state.state = REJECTED;
  notify(promise, state, true);
};

var internalResolve = function (promise, state, value, unwrap) {
  if (state.done) return;
  state.done = true;
  if (unwrap) state = unwrap;
  try {
    if (promise === value) throw TypeError("Promise can't be resolved itself");
    var then = isThenable(value);
    if (then) {
      microtask(function () {
        var wrapper = { done: false };
        try {
          then.call(value,
            bind(internalResolve, promise, wrapper, state),
            bind(internalReject, promise, wrapper, state)
          );
        } catch (error) {
          internalReject(promise, wrapper, error, state);
        }
      });
    } else {
      state.value = value;
      state.state = FULFILLED;
      notify(promise, state, false);
    }
  } catch (error) {
    internalReject(promise, { done: false }, error, state);
  }
};

// constructor polyfill
if (FORCED) {
  // 25.4.3.1 Promise(executor)
  PromiseConstructor = function Promise(executor) {
    anInstance(this, PromiseConstructor, PROMISE);
    aFunction(executor);
    Internal.call(this);
    var state = getInternalState(this);
    try {
      executor(bind(internalResolve, this, state), bind(internalReject, this, state));
    } catch (error) {
      internalReject(this, state, error);
    }
  };
  // eslint-disable-next-line no-unused-vars
  Internal = function Promise(executor) {
    setInternalState(this, {
      type: PROMISE,
      done: false,
      notified: false,
      parent: false,
      reactions: [],
      rejection: false,
      state: PENDING,
      value: undefined
    });
  };
  Internal.prototype = redefineAll(PromiseConstructor.prototype, {
    // `Promise.prototype.then` method
    // https://tc39.github.io/ecma262/#sec-promise.prototype.then
    then: function then(onFulfilled, onRejected) {
      var state = getInternalPromiseState(this);
      var reaction = newPromiseCapability(speciesConstructor(this, PromiseConstructor));
      reaction.ok = typeof onFulfilled == 'function' ? onFulfilled : true;
      reaction.fail = typeof onRejected == 'function' && onRejected;
      reaction.domain = IS_NODE ? process.domain : undefined;
      state.parent = true;
      state.reactions.push(reaction);
      if (state.state != PENDING) notify(this, state, false);
      return reaction.promise;
    },
    // `Promise.prototype.catch` method
    // https://tc39.github.io/ecma262/#sec-promise.prototype.catch
    'catch': function (onRejected) {
      return this.then(undefined, onRejected);
    }
  });
  OwnPromiseCapability = function () {
    var promise = new Internal();
    var state = getInternalState(promise);
    this.promise = promise;
    this.resolve = bind(internalResolve, promise, state);
    this.reject = bind(internalReject, promise, state);
  };
  newPromiseCapabilityModule.f = newPromiseCapability = function (C) {
    return C === PromiseConstructor || C === PromiseWrapper
      ? new OwnPromiseCapability(C)
      : newGenericPromiseCapability(C);
  };

  if (!IS_PURE && typeof NativePromise == 'function') {
    nativeThen = NativePromise.prototype.then;

    // wrap native Promise#then for native async functions
    redefine(NativePromise.prototype, 'then', function then(onFulfilled, onRejected) {
      var that = this;
      return new PromiseConstructor(function (resolve, reject) {
        nativeThen.call(that, resolve, reject);
      }).then(onFulfilled, onRejected);
    // https://github.com/zloirock/core-js/issues/640
    }, { unsafe: true });

    // wrap fetch result
    if (typeof $fetch == 'function') $({ global: true, enumerable: true, forced: true }, {
      // eslint-disable-next-line no-unused-vars
      fetch: function fetch(input /* , init */) {
        return promiseResolve(PromiseConstructor, $fetch.apply(global, arguments));
      }
    });
  }
}

$({ global: true, wrap: true, forced: FORCED }, {
  Promise: PromiseConstructor
});

setToStringTag(PromiseConstructor, PROMISE, false, true);
setSpecies(PROMISE);

PromiseWrapper = getBuiltIn(PROMISE);

// statics
$({ target: PROMISE, stat: true, forced: FORCED }, {
  // `Promise.reject` method
  // https://tc39.github.io/ecma262/#sec-promise.reject
  reject: function reject(r) {
    var capability = newPromiseCapability(this);
    capability.reject.call(undefined, r);
    return capability.promise;
  }
});

$({ target: PROMISE, stat: true, forced: IS_PURE || FORCED }, {
  // `Promise.resolve` method
  // https://tc39.github.io/ecma262/#sec-promise.resolve
  resolve: function resolve(x) {
    return promiseResolve(IS_PURE && this === PromiseWrapper ? PromiseConstructor : this, x);
  }
});

$({ target: PROMISE, stat: true, forced: INCORRECT_ITERATION }, {
  // `Promise.all` method
  // https://tc39.github.io/ecma262/#sec-promise.all
  all: function all(iterable) {
    var C = this;
    var capability = newPromiseCapability(C);
    var resolve = capability.resolve;
    var reject = capability.reject;
    var result = perform(function () {
      var $promiseResolve = aFunction(C.resolve);
      var values = [];
      var counter = 0;
      var remaining = 1;
      iterate(iterable, function (promise) {
        var index = counter++;
        var alreadyCalled = false;
        values.push(undefined);
        remaining++;
        $promiseResolve.call(C, promise).then(function (value) {
          if (alreadyCalled) return;
          alreadyCalled = true;
          values[index] = value;
          --remaining || resolve(values);
        }, reject);
      });
      --remaining || resolve(values);
    });
    if (result.error) reject(result.value);
    return capability.promise;
  },
  // `Promise.race` method
  // https://tc39.github.io/ecma262/#sec-promise.race
  race: function race(iterable) {
    var C = this;
    var capability = newPromiseCapability(C);
    var reject = capability.reject;
    var result = perform(function () {
      var $promiseResolve = aFunction(C.resolve);
      iterate(iterable, function (promise) {
        $promiseResolve.call(C, promise).then(capability.resolve, reject);
      });
    });
    if (result.error) reject(result.value);
    return capability.promise;
  }
});


/***/ }),
/* 121 */
/*!**********************************************************!*\
  !*** ./node_modules/core-js-pure/internals/to-object.js ***!
  \**********************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

var requireObjectCoercible = __webpack_require__(/*! ../internals/require-object-coercible */ 199);

// `ToObject` abstract operation
// https://tc39.github.io/ecma262/#sec-toobject
module.exports = function (argument) {
  return Object(requireObjectCoercible(argument));
};


/***/ }),
/* 122 */
/*!***********************************!*\
  !*** ./dev/View/Popup/Compose.js ***!
  \***********************************/
/*! exports provided: ComposePopupView, default */
/*! all exports used */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ComposePopupView", function() { return ComposePopupView; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return ComposePopupView; });
/* harmony import */ var core_js_modules_es_array_join__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.array.join */ 74);
/* harmony import */ var core_js_modules_es_array_join__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_join__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var core_js_modules_es_function_name__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es.function.name */ 51);
/* harmony import */ var core_js_modules_es_function_name__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_function_name__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var core_js_modules_es_object_to_string__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core-js/modules/es.object.to-string */ 63);
/* harmony import */ var core_js_modules_es_object_to_string__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_to_string__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var core_js_modules_es_regexp_exec__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! core-js/modules/es.regexp.exec */ 45);
/* harmony import */ var core_js_modules_es_regexp_exec__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_regexp_exec__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var core_js_modules_es_regexp_to_string__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! core-js/modules/es.regexp.to-string */ 111);
/* harmony import */ var core_js_modules_es_regexp_to_string__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_regexp_to_string__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var core_js_modules_es_string_replace__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! core-js/modules/es.string.replace */ 56);
/* harmony import */ var core_js_modules_es_string_replace__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_replace__WEBPACK_IMPORTED_MODULE_5__);
/* harmony import */ var core_js_modules_es_string_split__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! core-js/modules/es.string.split */ 171);
/* harmony import */ var core_js_modules_es_string_split__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_split__WEBPACK_IMPORTED_MODULE_6__);
/* harmony import */ var core_js_modules_es_string_link__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! core-js/modules/es.string.link */ 172);
/* harmony import */ var core_js_modules_es_string_link__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_link__WEBPACK_IMPORTED_MODULE_7__);
/* harmony import */ var core_js_modules_web_timers__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! core-js/modules/web.timers */ 67);
/* harmony import */ var core_js_modules_web_timers__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_timers__WEBPACK_IMPORTED_MODULE_8__);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor */ 19);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_9__);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/find */ 12);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_10__);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_index_of__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/index-of */ 30);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_index_of__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_index_of__WEBPACK_IMPORTED_MODULE_11__);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/map */ 18);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_12__);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_bind__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/bind */ 26);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_bind__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_bind__WEBPACK_IMPORTED_MODULE_13__);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/filter */ 34);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_14__);
/* harmony import */ var _babel_runtime_corejs3_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/esm/assertThisInitialized */ 33);
/* harmony import */ var _babel_runtime_corejs3_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/esm/inheritsLoose */ 10);
/* harmony import */ var _babel_runtime_corejs3_helpers_esm_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/esm/applyDecoratedDescriptor */ 20);
/* harmony import */ var window__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! window */ 4);
/* harmony import */ var window__WEBPACK_IMPORTED_MODULE_18___default = /*#__PURE__*/__webpack_require__.n(window__WEBPACK_IMPORTED_MODULE_18__);
/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! _ */ 3);
/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_19___default = /*#__PURE__*/__webpack_require__.n(___WEBPACK_IMPORTED_MODULE_19__);
/* harmony import */ var $__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! $ */ 8);
/* harmony import */ var $__WEBPACK_IMPORTED_MODULE_20___default = /*#__PURE__*/__webpack_require__.n($__WEBPACK_IMPORTED_MODULE_20__);
/* harmony import */ var ko__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ko */ 1);
/* harmony import */ var key__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! key */ 21);
/* harmony import */ var key__WEBPACK_IMPORTED_MODULE_22___default = /*#__PURE__*/__webpack_require__.n(key__WEBPACK_IMPORTED_MODULE_22__);
/* harmony import */ var Jua__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! Jua */ 175);
/* harmony import */ var Jua__WEBPACK_IMPORTED_MODULE_23___default = /*#__PURE__*/__webpack_require__.n(Jua__WEBPACK_IMPORTED_MODULE_23__);
/* harmony import */ var Common_Enums__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! Common/Enums */ 0);
/* harmony import */ var Common_Utils__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! Common/Utils */ 2);
/* harmony import */ var Common_Consts__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! Common/Consts */ 25);
/* harmony import */ var Common_Globals__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! Common/Globals */ 6);
/* harmony import */ var Common_Links__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! Common/Links */ 15);
/* harmony import */ var Common_Translator__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! Common/Translator */ 9);
/* harmony import */ var Common_Momentor__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! Common/Momentor */ 60);
/* harmony import */ var Common_Cache__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! Common/Cache */ 14);
/* harmony import */ var Common_HtmlEditor__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! Common/HtmlEditor */ 207);
/* harmony import */ var Stores_User_App__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! Stores/User/App */ 31);
/* harmony import */ var Stores_User_Settings__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! Stores/User/Settings */ 38);
/* harmony import */ var Stores_User_Identity__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! Stores/User/Identity */ 99);
/* harmony import */ var Stores_User_Account__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! Stores/User/Account */ 46);
/* harmony import */ var Stores_User_Folder__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! Stores/User/Folder */ 11);
/* harmony import */ var Stores_User_Pgp__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(/*! Stores/User/Pgp */ 41);
/* harmony import */ var Stores_User_Message__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(/*! Stores/User/Message */ 13);
/* harmony import */ var Stores_Social__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(/*! Stores/Social */ 29);
/* harmony import */ var Remote_User_Ajax__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(/*! Remote/User/Ajax */ 16);
/* harmony import */ var Storage_Settings__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(/*! Storage/Settings */ 5);
/* harmony import */ var Common_Events__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(/*! Common/Events */ 24);
/* harmony import */ var Model_ComposeAttachment__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(/*! Model/ComposeAttachment */ 269);
/* harmony import */ var Helper_Apps_User__WEBPACK_IMPORTED_MODULE_45__ = __webpack_require__(/*! Helper/Apps/User */ 22);
/* harmony import */ var Knoin_Knoin__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__(/*! Knoin/Knoin */ 7);
/* harmony import */ var Knoin_AbstractViewNext__WEBPACK_IMPORTED_MODULE_47__ = __webpack_require__(/*! Knoin/AbstractViewNext */ 28);



















var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _class, _class2;































var ComposePopupView = (_dec = Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_46__["popup"])({
  name: 'View/Popup/Compose',
  templateID: 'PopupsCompose'
}), _dec2 = Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_46__["command"])(function (self) {
  return self.canBeSentOrSaved();
}), _dec3 = Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_46__["command"])(function (self) {
  return self.canBeSentOrSaved();
}), _dec4 = Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_46__["command"])(function (self) {
  return self.isDraftFolderMessage();
}), _dec5 = Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_46__["command"])(function (self) {
  return self.canBeSentOrSaved();
}), _dec6 = Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_46__["command"])(function (self) {
  return self.allowContacts;
}), _dec7 = Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_46__["command"])(function (self) {
  return self.dropboxEnabled();
}), _dec8 = Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_46__["command"])(function (self) {
  return self.driveEnabled();
}), _dec(_class = (_class2 =
/*#__PURE__*/
function (_AbstractViewNext) {
  Object(_babel_runtime_corejs3_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_16__[/* default */ "a"])(ComposePopupView, _AbstractViewNext);

  function ComposePopupView() {
    var _this;

    _this = _AbstractViewNext.call(this) || this;

    var fEmailOutInHelper = function fEmailOutInHelper(context, identity, name, isIn) {
      if (identity && context && identity[name]() && (isIn ? true : context[name]())) {
        var identityEmail = identity[name]();
        var list = Object(Common_Utils__WEBPACK_IMPORTED_MODULE_25__["trim"])(context[name]()).split(/[,]/);
        list = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_14___default()(___WEBPACK_IMPORTED_MODULE_19___default.a).call(___WEBPACK_IMPORTED_MODULE_19___default.a, list, function (email) {
          email = Object(Common_Utils__WEBPACK_IMPORTED_MODULE_25__["trim"])(email);
          return email && Object(Common_Utils__WEBPACK_IMPORTED_MODULE_25__["trim"])(identityEmail) !== email;
        });

        if (isIn) {
          list.push(identityEmail);
        }

        context[name](list.join(','));
      }
    };

    _this.oLastMessage = null;
    _this.oEditor = null;
    _this.aDraftInfo = null;
    _this.sInReplyTo = '';
    _this.bFromDraft = false;
    _this.sReferences = '';
    _this.sLastFocusedField = 'to';
    _this.resizerTrigger = _babel_runtime_corejs3_core_js_stable_instance_bind__WEBPACK_IMPORTED_MODULE_13___default()(___WEBPACK_IMPORTED_MODULE_19___default.a).call(___WEBPACK_IMPORTED_MODULE_19___default.a, _this.resizerTrigger, Object(_babel_runtime_corejs3_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_15__[/* default */ "a"])(_this));
    _this.allowContacts = !!Stores_User_App__WEBPACK_IMPORTED_MODULE_33__[/* default */ "a"].contactsIsAllowed();
    _this.allowFolders = !!Storage_Settings__WEBPACK_IMPORTED_MODULE_42__["capa"](Common_Enums__WEBPACK_IMPORTED_MODULE_24__["Capa"].Folders);
    _this.bSkipNextHide = false;
    _this.composeInEdit = Stores_User_App__WEBPACK_IMPORTED_MODULE_33__[/* default */ "a"].composeInEdit;
    _this.editorDefaultType = Stores_User_Settings__WEBPACK_IMPORTED_MODULE_34__[/* default */ "a"].editorDefaultType;
    _this.capaOpenPGP = Stores_User_Pgp__WEBPACK_IMPORTED_MODULE_38__[/* default */ "a"].capaOpenPGP;
    _this.identitiesDropdownTrigger = ko__WEBPACK_IMPORTED_MODULE_21__[/* default */ "a"].observable(false);
    _this.to = ko__WEBPACK_IMPORTED_MODULE_21__[/* default */ "a"].observable('');
    _this.to.focused = ko__WEBPACK_IMPORTED_MODULE_21__[/* default */ "a"].observable(false);
    _this.cc = ko__WEBPACK_IMPORTED_MODULE_21__[/* default */ "a"].observable('');
    _this.cc.focused = ko__WEBPACK_IMPORTED_MODULE_21__[/* default */ "a"].observable(false);
    _this.bcc = ko__WEBPACK_IMPORTED_MODULE_21__[/* default */ "a"].observable('');
    _this.bcc.focused = ko__WEBPACK_IMPORTED_MODULE_21__[/* default */ "a"].observable(false);
    _this.replyTo = ko__WEBPACK_IMPORTED_MODULE_21__[/* default */ "a"].observable('');
    _this.replyTo.focused = ko__WEBPACK_IMPORTED_MODULE_21__[/* default */ "a"].observable(false); // this.to.subscribe((v) => console.log(v));

    ko__WEBPACK_IMPORTED_MODULE_21__[/* default */ "a"].computed(function () {
      switch (true) {
        case _this.to.focused():
          _this.sLastFocusedField = 'to';
          break;

        case _this.cc.focused():
          _this.sLastFocusedField = 'cc';
          break;

        case _this.bcc.focused():
          _this.sLastFocusedField = 'bcc';
          break;
        // no default
      }
    }).extend({
      notify: 'always'
    });
    _this.subject = ko__WEBPACK_IMPORTED_MODULE_21__[/* default */ "a"].observable('');
    _this.subject.focused = ko__WEBPACK_IMPORTED_MODULE_21__[/* default */ "a"].observable(false);
    _this.isHtml = ko__WEBPACK_IMPORTED_MODULE_21__[/* default */ "a"].observable(false);
    _this.requestDsn = ko__WEBPACK_IMPORTED_MODULE_21__[/* default */ "a"].observable(false);
    _this.requestReadReceipt = ko__WEBPACK_IMPORTED_MODULE_21__[/* default */ "a"].observable(false);
    _this.markAsImportant = ko__WEBPACK_IMPORTED_MODULE_21__[/* default */ "a"].observable(false);
    _this.sendError = ko__WEBPACK_IMPORTED_MODULE_21__[/* default */ "a"].observable(false);
    _this.sendSuccessButSaveError = ko__WEBPACK_IMPORTED_MODULE_21__[/* default */ "a"].observable(false);
    _this.savedError = ko__WEBPACK_IMPORTED_MODULE_21__[/* default */ "a"].observable(false);
    _this.sendButtonSuccess = ko__WEBPACK_IMPORTED_MODULE_21__[/* default */ "a"].computed(function () {
      return !_this.sendError() && !_this.sendSuccessButSaveError();
    });
    _this.sendErrorDesc = ko__WEBPACK_IMPORTED_MODULE_21__[/* default */ "a"].observable('');
    _this.savedErrorDesc = ko__WEBPACK_IMPORTED_MODULE_21__[/* default */ "a"].observable('');

    _this.sendError.subscribe(function (value) {
      if (!value) {
        _this.sendErrorDesc('');
      }
    });

    _this.savedError.subscribe(function (value) {
      if (!value) {
        _this.savedErrorDesc('');
      }
    });

    _this.sendSuccessButSaveError.subscribe(function (value) {
      if (!value) {
        _this.savedErrorDesc('');
      }
    });

    _this.savedTime = ko__WEBPACK_IMPORTED_MODULE_21__[/* default */ "a"].observable(0);
    _this.savedTimeText = ko__WEBPACK_IMPORTED_MODULE_21__[/* default */ "a"].computed(function () {
      return 0 < _this.savedTime() ? Object(Common_Translator__WEBPACK_IMPORTED_MODULE_29__["i18n"])('COMPOSE/SAVED_TIME', {
        'TIME': Object(Common_Momentor__WEBPACK_IMPORTED_MODULE_30__["format"])(_this.savedTime() - 1, 'LT')
      }) : '';
    });
    _this.emptyToError = ko__WEBPACK_IMPORTED_MODULE_21__[/* default */ "a"].observable(false);
    _this.emptyToErrorTooltip = ko__WEBPACK_IMPORTED_MODULE_21__[/* default */ "a"].computed(function () {
      return _this.emptyToError() ? Object(Common_Translator__WEBPACK_IMPORTED_MODULE_29__["i18n"])('COMPOSE/EMPTY_TO_ERROR_DESC') : '';
    });
    _this.attachmentsInProcessError = ko__WEBPACK_IMPORTED_MODULE_21__[/* default */ "a"].observable(false);
    _this.attachmentsInErrorError = ko__WEBPACK_IMPORTED_MODULE_21__[/* default */ "a"].observable(false);
    _this.attachmentsErrorTooltip = ko__WEBPACK_IMPORTED_MODULE_21__[/* default */ "a"].computed(function () {
      var result = '';

      switch (true) {
        case _this.attachmentsInProcessError():
          result = Object(Common_Translator__WEBPACK_IMPORTED_MODULE_29__["i18n"])('COMPOSE/ATTACHMENTS_UPLOAD_ERROR_DESC');
          break;

        case _this.attachmentsInErrorError():
          result = Object(Common_Translator__WEBPACK_IMPORTED_MODULE_29__["i18n"])('COMPOSE/ATTACHMENTS_ERROR_DESC');
          break;
        // no default
      }

      return result;
    });
    _this.showCc = ko__WEBPACK_IMPORTED_MODULE_21__[/* default */ "a"].observable(false);
    _this.showBcc = ko__WEBPACK_IMPORTED_MODULE_21__[/* default */ "a"].observable(false);
    _this.showReplyTo = ko__WEBPACK_IMPORTED_MODULE_21__[/* default */ "a"].observable(false);

    _this.cc.subscribe(function (value) {
      if (false === _this.showCc() && 0 < value.length) {
        _this.showCc(true);
      }
    });

    _this.bcc.subscribe(function (value) {
      if (false === _this.showBcc() && 0 < value.length) {
        _this.showBcc(true);
      }
    });

    _this.replyTo.subscribe(function (value) {
      if (false === _this.showReplyTo() && 0 < value.length) {
        _this.showReplyTo(true);
      }
    });

    _this.draftFolder = ko__WEBPACK_IMPORTED_MODULE_21__[/* default */ "a"].observable('');
    _this.draftUid = ko__WEBPACK_IMPORTED_MODULE_21__[/* default */ "a"].observable('');
    _this.sending = ko__WEBPACK_IMPORTED_MODULE_21__[/* default */ "a"].observable(false);
    _this.saving = ko__WEBPACK_IMPORTED_MODULE_21__[/* default */ "a"].observable(false);
    _this.attachments = ko__WEBPACK_IMPORTED_MODULE_21__[/* default */ "a"].observableArray([]);
    _this.attachmentsInProcess = ko__WEBPACK_IMPORTED_MODULE_21__[/* default */ "a"].computed(function () {
      return _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_14___default()(___WEBPACK_IMPORTED_MODULE_19___default.a).call(___WEBPACK_IMPORTED_MODULE_19___default.a, _this.attachments(), function (item) {
        return item && !item.complete();
      });
    });
    _this.attachmentsInReady = ko__WEBPACK_IMPORTED_MODULE_21__[/* default */ "a"].computed(function () {
      return _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_14___default()(___WEBPACK_IMPORTED_MODULE_19___default.a).call(___WEBPACK_IMPORTED_MODULE_19___default.a, _this.attachments(), function (item) {
        return item && item.complete();
      });
    });
    _this.attachmentsInError = ko__WEBPACK_IMPORTED_MODULE_21__[/* default */ "a"].computed(function () {
      return _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_14___default()(___WEBPACK_IMPORTED_MODULE_19___default.a).call(___WEBPACK_IMPORTED_MODULE_19___default.a, _this.attachments(), function (item) {
        return item && '' !== item.error();
      });
    });
    _this.attachmentsCount = ko__WEBPACK_IMPORTED_MODULE_21__[/* default */ "a"].computed(function () {
      return _this.attachments().length;
    });
    _this.attachmentsInErrorCount = ko__WEBPACK_IMPORTED_MODULE_21__[/* default */ "a"].computed(function () {
      return _this.attachmentsInError().length;
    });
    _this.attachmentsInProcessCount = ko__WEBPACK_IMPORTED_MODULE_21__[/* default */ "a"].computed(function () {
      return _this.attachmentsInProcess().length;
    });
    _this.isDraftFolderMessage = ko__WEBPACK_IMPORTED_MODULE_21__[/* default */ "a"].computed(function () {
      return '' !== _this.draftFolder() && '' !== _this.draftUid();
    });
    _this.attachmentsPlace = ko__WEBPACK_IMPORTED_MODULE_21__[/* default */ "a"].observable(false);

    _this.attachments.subscribe(_this.resizerTrigger);

    _this.attachmentsPlace.subscribe(_this.resizerTrigger);

    _this.attachmentsInErrorCount.subscribe(function (value) {
      if (0 === value) {
        _this.attachmentsInErrorError(false);
      }
    });

    _this.composeUploaderButton = ko__WEBPACK_IMPORTED_MODULE_21__[/* default */ "a"].observable(null);
    _this.composeUploaderDropPlace = ko__WEBPACK_IMPORTED_MODULE_21__[/* default */ "a"].observable(null);
    _this.dragAndDropEnabled = ko__WEBPACK_IMPORTED_MODULE_21__[/* default */ "a"].observable(false);
    _this.dragAndDropOver = ko__WEBPACK_IMPORTED_MODULE_21__[/* default */ "a"].observable(false).extend({
      throttle: 1
    });
    _this.dragAndDropVisible = ko__WEBPACK_IMPORTED_MODULE_21__[/* default */ "a"].observable(false).extend({
      throttle: 1
    });
    _this.attacheMultipleAllowed = ko__WEBPACK_IMPORTED_MODULE_21__[/* default */ "a"].observable(false);
    _this.addAttachmentEnabled = ko__WEBPACK_IMPORTED_MODULE_21__[/* default */ "a"].observable(false);
    _this.composeEditorArea = ko__WEBPACK_IMPORTED_MODULE_21__[/* default */ "a"].observable(null);
    _this.identities = Stores_User_Identity__WEBPACK_IMPORTED_MODULE_35__[/* default */ "a"].identities;
    _this.identitiesOptions = ko__WEBPACK_IMPORTED_MODULE_21__[/* default */ "a"].computed(function () {
      return _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_12___default()(___WEBPACK_IMPORTED_MODULE_19___default.a).call(___WEBPACK_IMPORTED_MODULE_19___default.a, Stores_User_Identity__WEBPACK_IMPORTED_MODULE_35__[/* default */ "a"].identities(), function (item) {
        return {
          'item': item,
          'optValue': item.id(),
          'optText': item.formattedName()
        };
      });
    });
    _this.currentIdentity = ko__WEBPACK_IMPORTED_MODULE_21__[/* default */ "a"].observable(_this.identities()[0] ? _this.identities()[0] : null);

    _this.currentIdentity.extend({
      toggleSubscribe: [Object(_babel_runtime_corejs3_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_15__[/* default */ "a"])(_this), function (identity) {
        fEmailOutInHelper(Object(_babel_runtime_corejs3_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_15__[/* default */ "a"])(_this), identity, 'bcc');
        fEmailOutInHelper(Object(_babel_runtime_corejs3_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_15__[/* default */ "a"])(_this), identity, 'replyTo');
      }, function (identity) {
        fEmailOutInHelper(Object(_babel_runtime_corejs3_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_15__[/* default */ "a"])(_this), identity, 'bcc', true);
        fEmailOutInHelper(Object(_babel_runtime_corejs3_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_15__[/* default */ "a"])(_this), identity, 'replyTo', true);
      }]
    });

    _this.currentIdentityView = ko__WEBPACK_IMPORTED_MODULE_21__[/* default */ "a"].computed(function () {
      var item = _this.currentIdentity();

      return item ? item.formattedName() : 'unknown';
    });

    _this.to.subscribe(function (value) {
      if (_this.emptyToError() && 0 < value.length) {
        _this.emptyToError(false);
      }
    });

    _this.attachmentsInProcess.subscribe(function (value) {
      if (_this.attachmentsInProcessError() && Object(Common_Utils__WEBPACK_IMPORTED_MODULE_25__["isArray"])(value) && 0 === value.length) {
        _this.attachmentsInProcessError(false);
      }
    });

    _this.resizer = ko__WEBPACK_IMPORTED_MODULE_21__[/* default */ "a"].observable(false).extend({
      throttle: 50
    });

    _this.resizer.subscribe(function () {
      if (_this.oEditor) {
        _this.oEditor.resize();
      }
    });

    _this.canBeSentOrSaved = ko__WEBPACK_IMPORTED_MODULE_21__[/* default */ "a"].computed(function () {
      return !_this.sending() && !_this.saving();
    });
    _this.sendMessageResponse = _babel_runtime_corejs3_core_js_stable_instance_bind__WEBPACK_IMPORTED_MODULE_13___default()(___WEBPACK_IMPORTED_MODULE_19___default.a).call(___WEBPACK_IMPORTED_MODULE_19___default.a, _this.sendMessageResponse, Object(_babel_runtime_corejs3_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_15__[/* default */ "a"])(_this));
    _this.saveMessageResponse = _babel_runtime_corejs3_core_js_stable_instance_bind__WEBPACK_IMPORTED_MODULE_13___default()(___WEBPACK_IMPORTED_MODULE_19___default.a).call(___WEBPACK_IMPORTED_MODULE_19___default.a, _this.saveMessageResponse, Object(_babel_runtime_corejs3_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_15__[/* default */ "a"])(_this));
    Common_Events__WEBPACK_IMPORTED_MODULE_43__[/* sub */ "b"]('interval.2m', function () {
      if (_this.modalVisibility() && !Stores_User_Folder__WEBPACK_IMPORTED_MODULE_37__[/* default */ "a"].draftFolderNotEnabled() && Stores_User_Settings__WEBPACK_IMPORTED_MODULE_34__[/* default */ "a"].allowDraftAutosave() && !_this.isEmptyForm(false) && !_this.saving() && !_this.sending() && !_this.savedError()) {
        _this.saveCommand();
      }
    });

    _this.showCc.subscribe(_this.resizerTrigger);

    _this.showBcc.subscribe(_this.resizerTrigger);

    _this.showReplyTo.subscribe(_this.resizerTrigger);

    _this.dropboxEnabled = Stores_Social__WEBPACK_IMPORTED_MODULE_40__[/* default */ "a"].dropbox.enabled;
    _this.dropboxApiKey = Stores_Social__WEBPACK_IMPORTED_MODULE_40__[/* default */ "a"].dropbox.apiKey;
    _this.driveEnabled = ko__WEBPACK_IMPORTED_MODULE_21__[/* default */ "a"].observable(Common_Globals__WEBPACK_IMPORTED_MODULE_27__["bXMLHttpRequestSupported"] && !!Storage_Settings__WEBPACK_IMPORTED_MODULE_42__["settingsGet"]('AllowGoogleSocial') && !!Storage_Settings__WEBPACK_IMPORTED_MODULE_42__["settingsGet"]('AllowGoogleSocialDrive') && !!Storage_Settings__WEBPACK_IMPORTED_MODULE_42__["settingsGet"]('GoogleClientID') && !!Storage_Settings__WEBPACK_IMPORTED_MODULE_42__["settingsGet"]('GoogleApiKey'));
    _this.driveVisible = ko__WEBPACK_IMPORTED_MODULE_21__[/* default */ "a"].observable(false);
    _this.driveCallback = _babel_runtime_corejs3_core_js_stable_instance_bind__WEBPACK_IMPORTED_MODULE_13___default()(___WEBPACK_IMPORTED_MODULE_19___default.a).call(___WEBPACK_IMPORTED_MODULE_19___default.a, _this.driveCallback, Object(_babel_runtime_corejs3_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_15__[/* default */ "a"])(_this));
    _this.onMessageUploadAttachments = _babel_runtime_corejs3_core_js_stable_instance_bind__WEBPACK_IMPORTED_MODULE_13___default()(___WEBPACK_IMPORTED_MODULE_19___default.a).call(___WEBPACK_IMPORTED_MODULE_19___default.a, _this.onMessageUploadAttachments, Object(_babel_runtime_corejs3_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_15__[/* default */ "a"])(_this));
    _this.bDisabeCloseOnEsc = true;
    _this.sDefaultKeyScope = Common_Enums__WEBPACK_IMPORTED_MODULE_24__["KeyState"].Compose;
    _this.tryToClosePopup = ___WEBPACK_IMPORTED_MODULE_19___default.a.debounce(_babel_runtime_corejs3_core_js_stable_instance_bind__WEBPACK_IMPORTED_MODULE_13___default()(___WEBPACK_IMPORTED_MODULE_19___default.a).call(___WEBPACK_IMPORTED_MODULE_19___default.a, _this.tryToClosePopup, Object(_babel_runtime_corejs3_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_15__[/* default */ "a"])(_this)), Common_Enums__WEBPACK_IMPORTED_MODULE_24__["Magics"].Time200ms);
    _this.emailsSource = _babel_runtime_corejs3_core_js_stable_instance_bind__WEBPACK_IMPORTED_MODULE_13___default()(___WEBPACK_IMPORTED_MODULE_19___default.a).call(___WEBPACK_IMPORTED_MODULE_19___default.a, _this.emailsSource, Object(_babel_runtime_corejs3_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_15__[/* default */ "a"])(_this));
    _this.autosaveFunction = _babel_runtime_corejs3_core_js_stable_instance_bind__WEBPACK_IMPORTED_MODULE_13___default()(___WEBPACK_IMPORTED_MODULE_19___default.a).call(___WEBPACK_IMPORTED_MODULE_19___default.a, _this.autosaveFunction, Object(_babel_runtime_corejs3_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_15__[/* default */ "a"])(_this));
    _this.iTimer = 0;
    return _this;
  }

  var _proto = ComposePopupView.prototype;

  _proto.sendCommand = function sendCommand() {
    var sTo = Object(Common_Utils__WEBPACK_IMPORTED_MODULE_25__["trim"])(this.to()),
        sCc = Object(Common_Utils__WEBPACK_IMPORTED_MODULE_25__["trim"])(this.cc()),
        sBcc = Object(Common_Utils__WEBPACK_IMPORTED_MODULE_25__["trim"])(this.bcc());
    var sSentFolder = Stores_User_Folder__WEBPACK_IMPORTED_MODULE_37__[/* default */ "a"].sentFolder();
    this.attachmentsInProcessError(false);
    this.attachmentsInErrorError(false);
    this.emptyToError(false);

    if (0 < this.attachmentsInProcess().length) {
      this.attachmentsInProcessError(true);
      this.attachmentsPlace(true);
    } else if (0 < this.attachmentsInError().length) {
      this.attachmentsInErrorError(true);
      this.attachmentsPlace(true);
    }

    if ('' === sTo && '' === sCc && '' === sBcc) {
      this.emptyToError(true);
    }

    if (!this.emptyToError() && !this.attachmentsInErrorError() && !this.attachmentsInProcessError()) {
      if (Stores_User_Settings__WEBPACK_IMPORTED_MODULE_34__[/* default */ "a"].replySameFolder()) {
        if (Object(Common_Utils__WEBPACK_IMPORTED_MODULE_25__["isArray"])(this.aDraftInfo) && 3 === this.aDraftInfo.length && Object(Common_Utils__WEBPACK_IMPORTED_MODULE_25__["isNormal"])(this.aDraftInfo[2]) && 0 < this.aDraftInfo[2].length) {
          sSentFolder = this.aDraftInfo[2];
        }
      }

      if (!this.allowFolders) {
        sSentFolder = Common_Consts__WEBPACK_IMPORTED_MODULE_26__[/* UNUSED_OPTION_VALUE */ "r"];
      }

      if ('' === sSentFolder) {
        Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_46__["showScreenPopup"])(__webpack_require__(/*! View/Popup/FolderSystem */ 274), [Common_Enums__WEBPACK_IMPORTED_MODULE_24__["SetSystemFoldersNotification"].Sent]);
      } else {
        this.sendError(false);
        this.sending(true);

        if (Object(Common_Utils__WEBPACK_IMPORTED_MODULE_25__["isArray"])(this.aDraftInfo) && 3 === this.aDraftInfo.length) {
          var flagsCache = Object(Common_Cache__WEBPACK_IMPORTED_MODULE_31__[/* getMessageFlagsFromCache */ "j"])(this.aDraftInfo[2], this.aDraftInfo[1]);

          if (flagsCache) {
            if ('forward' === this.aDraftInfo[0]) {
              flagsCache[3] = true;
            } else {
              flagsCache[2] = true;
            }

            Object(Common_Cache__WEBPACK_IMPORTED_MODULE_31__[/* setMessageFlagsToCache */ "t"])(this.aDraftInfo[2], this.aDraftInfo[1], flagsCache);
            Object(Helper_Apps_User__WEBPACK_IMPORTED_MODULE_45__[/* getApp */ "a"])().reloadFlagsCurrentMessageListAndMessageFromCache();
            Object(Common_Cache__WEBPACK_IMPORTED_MODULE_31__[/* setFolderHash */ "q"])(this.aDraftInfo[2], '');
          }
        }

        sSentFolder = Common_Consts__WEBPACK_IMPORTED_MODULE_26__[/* UNUSED_OPTION_VALUE */ "r"] === sSentFolder ? '' : sSentFolder;
        Object(Common_Cache__WEBPACK_IMPORTED_MODULE_31__[/* setFolderHash */ "q"])(this.draftFolder(), '');
        Object(Common_Cache__WEBPACK_IMPORTED_MODULE_31__[/* setFolderHash */ "q"])(sSentFolder, '');
        Remote_User_Ajax__WEBPACK_IMPORTED_MODULE_41__[/* default */ "a"].sendMessage(this.sendMessageResponse, this.currentIdentity() ? this.currentIdentity().id() : '', this.draftFolder(), this.draftUid(), sSentFolder, sTo, this.cc(), this.bcc(), this.replyTo(), this.subject(), this.oEditor ? this.oEditor.isHtml() : false, this.oEditor ? this.oEditor.getData(true) : '', this.prepearAttachmentsForSendOrSave(), this.aDraftInfo, this.sInReplyTo, this.sReferences, this.requestDsn(), this.requestReadReceipt(), this.markAsImportant());
      }
    }
  };

  _proto.saveCommand = function saveCommand() {
    if (!this.allowFolders) {
      return false;
    }

    if (Stores_User_Folder__WEBPACK_IMPORTED_MODULE_37__[/* default */ "a"].draftFolderNotEnabled()) {
      Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_46__["showScreenPopup"])(__webpack_require__(/*! View/Popup/FolderSystem */ 274), [Common_Enums__WEBPACK_IMPORTED_MODULE_24__["SetSystemFoldersNotification"].Draft]);
    } else {
      this.savedError(false);
      this.saving(true);
      this.autosaveStart();
      Object(Common_Cache__WEBPACK_IMPORTED_MODULE_31__[/* setFolderHash */ "q"])(Stores_User_Folder__WEBPACK_IMPORTED_MODULE_37__[/* default */ "a"].draftFolder(), '');
      Remote_User_Ajax__WEBPACK_IMPORTED_MODULE_41__[/* default */ "a"].saveMessage(this.saveMessageResponse, this.currentIdentity() ? this.currentIdentity().id() : '', this.draftFolder(), this.draftUid(), Stores_User_Folder__WEBPACK_IMPORTED_MODULE_37__[/* default */ "a"].draftFolder(), this.to(), this.cc(), this.bcc(), this.replyTo(), this.subject(), this.oEditor ? this.oEditor.isHtml() : false, this.oEditor ? this.oEditor.getData(true) : '', this.prepearAttachmentsForSendOrSave(), this.aDraftInfo, this.sInReplyTo, this.sReferences, this.markAsImportant());
    }

    return true;
  };

  _proto.deleteCommand = function deleteCommand() {
    var _this2 = this;

    var PopupsAskViewModel = __webpack_require__(/*! View/Popup/Ask */ 221);

    if (!Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_46__["isPopupVisible"])(PopupsAskViewModel) && this.modalVisibility()) {
      Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_46__["showScreenPopup"])(PopupsAskViewModel, [Object(Common_Translator__WEBPACK_IMPORTED_MODULE_29__["i18n"])('POPUPS_ASK/DESC_WANT_DELETE_MESSAGES'), function () {
        if (_this2.modalVisibility()) {
          Object(Helper_Apps_User__WEBPACK_IMPORTED_MODULE_45__[/* getApp */ "a"])().deleteMessagesFromFolderWithoutCheck(_this2.draftFolder(), [_this2.draftUid()]);
          Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_46__["hideScreenPopup"])(ComposePopupView);
        }
      }]);
    }
  };

  _proto.skipCommand = function skipCommand() {
    this.bSkipNextHide = true;

    if (this.modalVisibility() && !this.saving() && !this.sending() && !Stores_User_Folder__WEBPACK_IMPORTED_MODULE_37__[/* default */ "a"].draftFolderNotEnabled() && Stores_User_Settings__WEBPACK_IMPORTED_MODULE_34__[/* default */ "a"].allowDraftAutosave()) {
      this.saveCommand();
    }

    this.tryToClosePopup();
  };

  _proto.contactsCommand = function contactsCommand() {
    var _this3 = this;

    if (this.allowContacts) {
      this.skipCommand();

      ___WEBPACK_IMPORTED_MODULE_19___default.a.delay(function () {
        Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_46__["showScreenPopup"])(__webpack_require__(/*! View/Popup/Contacts */ 408), [true, _this3.sLastFocusedField]);
      }, Common_Enums__WEBPACK_IMPORTED_MODULE_24__["Magics"].Time200ms);
    }
  };

  _proto.dropboxCommand = function dropboxCommand() {
    var _this4 = this;

    if (window__WEBPACK_IMPORTED_MODULE_18___default.a.Dropbox) {
      window__WEBPACK_IMPORTED_MODULE_18___default.a.Dropbox.choose({
        success: function success(files) {
          if (files && files[0] && files[0].link) {
            _this4.addDropboxAttachment(files[0]);
          }
        },
        linkType: 'direct',
        multiselect: false
      });
    }

    return true;
  };

  _proto.driveCommand = function driveCommand() {
    this.driveOpenPopup();
    return true;
  };

  _proto.autosaveFunction = function autosaveFunction() {
    if (this.modalVisibility() && !Stores_User_Folder__WEBPACK_IMPORTED_MODULE_37__[/* default */ "a"].draftFolderNotEnabled() && Stores_User_Settings__WEBPACK_IMPORTED_MODULE_34__[/* default */ "a"].allowDraftAutosave() && !this.isEmptyForm(false) && !this.saving() && !this.sending() && !this.savedError()) {
      this.saveCommand();
    }

    this.autosaveStart();
  };

  _proto.autosaveStart = function autosaveStart() {
    window__WEBPACK_IMPORTED_MODULE_18___default.a.clearTimeout(this.iTimer);
    this.iTimer = window__WEBPACK_IMPORTED_MODULE_18___default.a.setTimeout(this.autosaveFunction, Common_Enums__WEBPACK_IMPORTED_MODULE_24__["Magics"].Time1m);
  };

  _proto.autosaveStop = function autosaveStop() {
    window__WEBPACK_IMPORTED_MODULE_18___default.a.clearTimeout(this.iTimer);
  };

  _proto.emailsSource = function emailsSource(oData, fResponse) {
    Object(Helper_Apps_User__WEBPACK_IMPORTED_MODULE_45__[/* getApp */ "a"])().getAutocomplete(oData.term, function (aData) {
      fResponse(_babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_12___default()(___WEBPACK_IMPORTED_MODULE_19___default.a).call(___WEBPACK_IMPORTED_MODULE_19___default.a, aData, function (oEmailItem) {
        return oEmailItem.toLine(false);
      }));
    });
  };

  _proto.openOpenPgpPopup = function openOpenPgpPopup() {
    var _this5 = this;

    if (Stores_User_Pgp__WEBPACK_IMPORTED_MODULE_38__[/* default */ "a"].capaOpenPGP() && this.oEditor && !this.oEditor.isHtml()) {
      Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_46__["showScreenPopup"])(__webpack_require__(/*! View/Popup/ComposeOpenPgp */ 526), [function (result) {
        _this5.editor(function (editor) {
          editor.setPlain(result);
        });
      }, this.oEditor.getData(false), this.currentIdentity(), this.to(), this.cc(), this.bcc()]);
    }
  };

  _proto.reloadDraftFolder = function reloadDraftFolder() {
    var draftFolder = Stores_User_Folder__WEBPACK_IMPORTED_MODULE_37__[/* default */ "a"].draftFolder();

    if ('' !== draftFolder && Common_Consts__WEBPACK_IMPORTED_MODULE_26__[/* UNUSED_OPTION_VALUE */ "r"] !== draftFolder) {
      Object(Common_Cache__WEBPACK_IMPORTED_MODULE_31__[/* setFolderHash */ "q"])(draftFolder, '');

      if (Stores_User_Folder__WEBPACK_IMPORTED_MODULE_37__[/* default */ "a"].currentFolderFullNameRaw() === draftFolder) {
        Object(Helper_Apps_User__WEBPACK_IMPORTED_MODULE_45__[/* getApp */ "a"])().reloadMessageList(true);
      } else {
        Object(Helper_Apps_User__WEBPACK_IMPORTED_MODULE_45__[/* getApp */ "a"])().folderInformation(draftFolder);
      }
    }
  };

  _proto.findIdentityByMessage = function findIdentityByMessage(composeType, message) {
    var resultIndex = 1000,
        resultIdentity = null;

    var identities = Stores_User_Identity__WEBPACK_IMPORTED_MODULE_35__[/* default */ "a"].identities(),
        identitiesCache = {},
        fEachHelper = function fEachHelper(item) {
      if (item && item.email && identitiesCache[item.email]) {
        if (!resultIdentity || resultIndex > identitiesCache[item.email][1]) {
          resultIdentity = identitiesCache[item.email][0];
          resultIndex = identitiesCache[item.email][1];
        }
      }
    };

    ___WEBPACK_IMPORTED_MODULE_19___default.a.each(identities, function (item, index) {
      identitiesCache[item.email()] = [item, index];
    });

    if (message) {
      switch (composeType) {
        case Common_Enums__WEBPACK_IMPORTED_MODULE_24__["ComposeType"].Empty:
          break;

        case Common_Enums__WEBPACK_IMPORTED_MODULE_24__["ComposeType"].Reply:
        case Common_Enums__WEBPACK_IMPORTED_MODULE_24__["ComposeType"].ReplyAll:
        case Common_Enums__WEBPACK_IMPORTED_MODULE_24__["ComposeType"].Forward:
        case Common_Enums__WEBPACK_IMPORTED_MODULE_24__["ComposeType"].ForwardAsAttachment:
          ___WEBPACK_IMPORTED_MODULE_19___default.a.each(___WEBPACK_IMPORTED_MODULE_19___default.a.union(message.to, message.cc, message.bcc), fEachHelper);

          if (!resultIdentity) {
            ___WEBPACK_IMPORTED_MODULE_19___default.a.each(message.deliveredTo, fEachHelper);
          }

          break;

        case Common_Enums__WEBPACK_IMPORTED_MODULE_24__["ComposeType"].Draft:
          ___WEBPACK_IMPORTED_MODULE_19___default.a.each(___WEBPACK_IMPORTED_MODULE_19___default.a.union(message.from, message.replyTo), fEachHelper);

          break;
        // no default
      }
    }

    return resultIdentity || identities[0] || null;
  };

  _proto.selectIdentity = function selectIdentity(identity) {
    if (identity && identity.item) {
      this.currentIdentity(identity.item);
      this.setSignatureFromIdentity(identity.item);
    }
  };

  _proto.sendMessageResponse = function sendMessageResponse(statusResult, data) {
    var result = false,
        message = '';
    this.sending(false);

    if (Common_Enums__WEBPACK_IMPORTED_MODULE_24__["StorageResultType"].Success === statusResult && data && data.Result) {
      result = true;

      if (this.modalVisibility()) {
        Object(Common_Utils__WEBPACK_IMPORTED_MODULE_25__["delegateRun"])(this, 'closeCommand');
      }
    }

    if (this.modalVisibility() && !result) {
      if (data && Common_Enums__WEBPACK_IMPORTED_MODULE_24__["Notification"].CantSaveMessage === data.ErrorCode) {
        this.sendSuccessButSaveError(true);
        this.savedErrorDesc(Object(Common_Utils__WEBPACK_IMPORTED_MODULE_25__["trim"])(Object(Common_Translator__WEBPACK_IMPORTED_MODULE_29__["i18n"])('COMPOSE/SAVED_ERROR_ON_SEND')));
      } else {
        message = Object(Common_Translator__WEBPACK_IMPORTED_MODULE_29__["getNotification"])(data && data.ErrorCode ? data.ErrorCode : Common_Enums__WEBPACK_IMPORTED_MODULE_24__["Notification"].CantSendMessage, data && data.ErrorMessage ? data.ErrorMessage : '');
        this.sendError(true);
        this.sendErrorDesc(message || Object(Common_Translator__WEBPACK_IMPORTED_MODULE_29__["getNotification"])(Common_Enums__WEBPACK_IMPORTED_MODULE_24__["Notification"].CantSendMessage));
      }
    }

    this.reloadDraftFolder();
  };

  _proto.saveMessageResponse = function saveMessageResponse(statusResult, oData) {
    var result = false;
    this.saving(false);

    if (Common_Enums__WEBPACK_IMPORTED_MODULE_24__["StorageResultType"].Success === statusResult && oData && oData.Result) {
      if (oData.Result.NewFolder && oData.Result.NewUid) {
        result = true;

        if (this.bFromDraft) {
          var message = Stores_User_Message__WEBPACK_IMPORTED_MODULE_39__[/* default */ "a"].message();

          if (message && this.draftFolder() === message.folderFullNameRaw && this.draftUid() === message.uid) {
            Stores_User_Message__WEBPACK_IMPORTED_MODULE_39__[/* default */ "a"].message(null);
          }
        }

        this.draftFolder(oData.Result.NewFolder);
        this.draftUid(oData.Result.NewUid);
        this.savedTime(window__WEBPACK_IMPORTED_MODULE_18___default.a.Math.round(new window__WEBPACK_IMPORTED_MODULE_18___default.a.Date().getTime() / 1000));

        if (this.bFromDraft) {
          Object(Common_Cache__WEBPACK_IMPORTED_MODULE_31__[/* setFolderHash */ "q"])(this.draftFolder(), '');
        }
      }
    }

    if (!result) {
      this.savedError(true);
      this.savedErrorDesc(Object(Common_Translator__WEBPACK_IMPORTED_MODULE_29__["getNotification"])(Common_Enums__WEBPACK_IMPORTED_MODULE_24__["Notification"].CantSaveMessage));
    }

    this.reloadDraftFolder();
  };

  _proto.onHide = function onHide() {
    this.autosaveStop();

    if (!this.bSkipNextHide) {
      Stores_User_App__WEBPACK_IMPORTED_MODULE_33__[/* default */ "a"].composeInEdit(false);
      this.reset();
    }

    this.bSkipNextHide = false;
    this.to.focused(false);
    Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_46__["routeOn"])();
  };

  _proto.editor = function editor(fOnInit) {
    var _this6 = this;

    if (fOnInit) {
      if (!this.oEditor && this.composeEditorArea()) {
        // _.delay(() => {
        this.oEditor = new Common_HtmlEditor__WEBPACK_IMPORTED_MODULE_32__["HtmlEditor"](this.composeEditorArea(), null, function () {
          fOnInit(_this6.oEditor);

          _this6.resizerTrigger();
        }, function (bHtml) {
          _this6.isHtml(!!bHtml);
        }); // }, 1000);
      } else if (this.oEditor) {
        fOnInit(this.oEditor);
        this.resizerTrigger();
      }
    }
  };

  _proto.converSignature = function converSignature(signature) {
    var limit = 10,
        fromLine = '';
    var moments = [],
        momentRegx = /{{MOMENT:([^}]+)}}/g;
    signature = signature.replace(/[\r]/g, '');
    fromLine = this.oLastMessage ? this.emailArrayToStringLineHelper(this.oLastMessage.from, true) : '';

    if ('' !== fromLine) {
      signature = signature.replace(/{{FROM-FULL}}/g, fromLine);

      if (-1 === _babel_runtime_corejs3_core_js_stable_instance_index_of__WEBPACK_IMPORTED_MODULE_11___default()(fromLine).call(fromLine, ' ') && 0 < _babel_runtime_corejs3_core_js_stable_instance_index_of__WEBPACK_IMPORTED_MODULE_11___default()(fromLine).call(fromLine, '@')) {
        fromLine = fromLine.replace(/@[\S]+/, '');
      }

      signature = signature.replace(/{{FROM}}/g, fromLine);
    }

    signature = signature.replace(/[\s]{1,2}{{FROM}}/g, '{{FROM}}');
    signature = signature.replace(/[\s]{1,2}{{FROM-FULL}}/g, '{{FROM-FULL}}');
    signature = signature.replace(/{{FROM}}/g, '');
    signature = signature.replace(/{{FROM-FULL}}/g, '');

    if (-1 < _babel_runtime_corejs3_core_js_stable_instance_index_of__WEBPACK_IMPORTED_MODULE_11___default()(signature).call(signature, '{{DATE}}')) {
      signature = signature.replace(/{{DATE}}/g, Object(Common_Momentor__WEBPACK_IMPORTED_MODULE_30__["format"])(0, 'llll'));
    }

    if (-1 < _babel_runtime_corejs3_core_js_stable_instance_index_of__WEBPACK_IMPORTED_MODULE_11___default()(signature).call(signature, '{{TIME}}')) {
      signature = signature.replace(/{{TIME}}/g, Object(Common_Momentor__WEBPACK_IMPORTED_MODULE_30__["format"])(0, 'LT'));
    }

    if (-1 < _babel_runtime_corejs3_core_js_stable_instance_index_of__WEBPACK_IMPORTED_MODULE_11___default()(signature).call(signature, '{{MOMENT:')) {
      try {
        var match = null;

        while (null !== (match = momentRegx.exec(signature))) {
          // eslint-disable-line no-cond-assign
          if (match && match[0] && match[1]) {
            moments.push([match[0], match[1]]);
          }

          limit -= 1;

          if (0 === limit) {
            break;
          }
        }

        if (moments && 0 < moments.length) {
          ___WEBPACK_IMPORTED_MODULE_19___default.a.each(moments, function (data) {
            signature = signature.replace(data[0], Object(Common_Momentor__WEBPACK_IMPORTED_MODULE_30__["format"])(0, data[1]));
          });
        }

        signature = signature.replace(/{{MOMENT:[^}]+}}/g, '');
      } catch (e) {} // eslint-disable-line no-empty

    }

    return signature;
  };

  _proto.setSignatureFromIdentity = function setSignatureFromIdentity(identity) {
    var _this7 = this;

    if (identity) {
      this.editor(function (editor) {
        var isHtml = false,
            signature = identity.signature();

        if ('' !== signature) {
          if (':HTML:' === signature.substr(0, 6)) {
            isHtml = true;
            signature = signature.substr(6);
          }
        }

        editor.setSignature(_this7.converSignature(signature), isHtml, !!identity.signatureInsertBefore());
      });
    }
  }
  /**
   * @param {string=} type = ComposeType.Empty
   * @param {?MessageModel|Array=} oMessageOrArray = null
   * @param {Array=} aToEmails = null
   * @param {Array=} aCcEmails = null
   * @param {Array=} aBccEmails = null
   * @param {string=} sCustomSubject = null
   * @param {string=} sCustomPlainText = null
   */
  ;

  _proto.onShow = function onShow(type, oMessageOrArray, aToEmails, aCcEmails, aBccEmails, sCustomSubject, sCustomPlainText) {
    var _this8 = this;

    Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_46__["routeOff"])();
    this.autosaveStart();

    if (Stores_User_App__WEBPACK_IMPORTED_MODULE_33__[/* default */ "a"].composeInEdit()) {
      type = type || Common_Enums__WEBPACK_IMPORTED_MODULE_24__["ComposeType"].Empty;

      if (Common_Enums__WEBPACK_IMPORTED_MODULE_24__["ComposeType"].Empty !== type) {
        Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_46__["showScreenPopup"])(__webpack_require__(/*! View/Popup/Ask */ 221), [Object(Common_Translator__WEBPACK_IMPORTED_MODULE_29__["i18n"])('COMPOSE/DISCARD_UNSAVED_DATA'), function () {
          _this8.initOnShow(type, oMessageOrArray, aToEmails, aCcEmails, aBccEmails, sCustomSubject, sCustomPlainText);
        }, null, null, null, false]);
      } else {
        this.addEmailsTo(this.to, aToEmails);
        this.addEmailsTo(this.cc, aCcEmails);
        this.addEmailsTo(this.bcc, aBccEmails);

        if (Object(Common_Utils__WEBPACK_IMPORTED_MODULE_25__["isNormal"])(sCustomSubject) && '' !== sCustomSubject && '' === this.subject()) {
          this.subject(sCustomSubject);
        }
      }
    } else {
      this.initOnShow(type, oMessageOrArray, aToEmails, aCcEmails, aBccEmails, sCustomSubject, sCustomPlainText);
    }
  };

  _proto.onWarmUp = function onWarmUp() {
    if (this.modalVisibility && !this.modalVisibility()) {
      this.editor(function (editor) {
        return editor.modeToggle(false);
      });
    }
  }
  /**
   * @param {Function} fKoValue
   * @param {Array} emails
   */
  ;

  _proto.addEmailsTo = function addEmailsTo(fKoValue, emails) {
    if (Object(Common_Utils__WEBPACK_IMPORTED_MODULE_25__["isNonEmptyArray"])(emails)) {
      var value = Object(Common_Utils__WEBPACK_IMPORTED_MODULE_25__["trim"])(fKoValue()),
          values = ___WEBPACK_IMPORTED_MODULE_19___default.a.uniq(___WEBPACK_IMPORTED_MODULE_19___default.a.compact(_babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_12___default()(___WEBPACK_IMPORTED_MODULE_19___default.a).call(___WEBPACK_IMPORTED_MODULE_19___default.a, emails, function (item) {
        return item ? item.toLine(false) : null;
      })));

      fKoValue(value + ('' === value ? '' : ', ') + Object(Common_Utils__WEBPACK_IMPORTED_MODULE_25__["trim"])(values.join(', ')));
    }
  }
  /**
   *
   * @param {Array} aList
   * @param {boolean} bFriendly
   * @returns {string}
   */
  ;

  _proto.emailArrayToStringLineHelper = function emailArrayToStringLineHelper(aList, bFriendly) {
    bFriendly = !!bFriendly;
    return _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_12___default()(___WEBPACK_IMPORTED_MODULE_19___default.a).call(___WEBPACK_IMPORTED_MODULE_19___default.a, aList, function (item) {
      return item.toLine(bFriendly);
    }).join(', ');
  }
  /**
   * @param {string=} sType = ComposeType.Empty
   * @param {?MessageModel|Array=} oMessageOrArray = null
   * @param {Array=} aToEmails = null
   * @param {Array=} aCcEmails = null
   * @param {Array=} aBccEmails = null
   * @param {string=} sCustomSubject = null
   * @param {string=} sCustomPlainText = null
   */
  ;

  _proto.initOnShow = function initOnShow(sType, oMessageOrArray, aToEmails, aCcEmails, aBccEmails, sCustomSubject, sCustomPlainText) {
    var _this9 = this;

    Stores_User_App__WEBPACK_IMPORTED_MODULE_33__[/* default */ "a"].composeInEdit(true);
    var sFrom = '',
        sTo = '',
        sCc = '',
        sDate = '',
        sSubject = '',
        sText = '',
        sReplyTitle = '',
        identity = null,
        aDraftInfo = null,
        message = null;
    var excludeEmail = {},
        mEmail = Stores_User_Account__WEBPACK_IMPORTED_MODULE_36__[/* default */ "a"].email(),
        lineComposeType = sType || Common_Enums__WEBPACK_IMPORTED_MODULE_24__["ComposeType"].Empty;
    oMessageOrArray = oMessageOrArray || null;

    if (oMessageOrArray && Object(Common_Utils__WEBPACK_IMPORTED_MODULE_25__["isNormal"])(oMessageOrArray)) {
      message = Object(Common_Utils__WEBPACK_IMPORTED_MODULE_25__["isArray"])(oMessageOrArray) && 1 === oMessageOrArray.length ? oMessageOrArray[0] : !Object(Common_Utils__WEBPACK_IMPORTED_MODULE_25__["isArray"])(oMessageOrArray) ? oMessageOrArray : null;
    }

    this.oLastMessage = message;

    if (null !== mEmail) {
      excludeEmail[mEmail] = true;
    }

    this.reset();
    identity = this.findIdentityByMessage(lineComposeType, message);

    if (identity) {
      excludeEmail[identity.email()] = true;
    }

    if (Object(Common_Utils__WEBPACK_IMPORTED_MODULE_25__["isNonEmptyArray"])(aToEmails)) {
      this.to(this.emailArrayToStringLineHelper(aToEmails));
    }

    if (Object(Common_Utils__WEBPACK_IMPORTED_MODULE_25__["isNonEmptyArray"])(aCcEmails)) {
      this.cc(this.emailArrayToStringLineHelper(aCcEmails));
    }

    if (Object(Common_Utils__WEBPACK_IMPORTED_MODULE_25__["isNonEmptyArray"])(aBccEmails)) {
      this.bcc(this.emailArrayToStringLineHelper(aBccEmails));
    }

    if ('' !== lineComposeType && message) {
      sDate = Object(Common_Momentor__WEBPACK_IMPORTED_MODULE_30__["format"])(message.dateTimeStampInUTC(), 'FULL');
      sSubject = message.subject();
      aDraftInfo = message.aDraftInfo;
      var clonedText = $__WEBPACK_IMPORTED_MODULE_20___default()(message.body).clone();

      if (clonedText) {
        Object(Common_Utils__WEBPACK_IMPORTED_MODULE_25__["clearBqSwitcher"])(clonedText);
        sText = clonedText.html();
      }

      var resplyAllParts = null;

      switch (lineComposeType) {
        case Common_Enums__WEBPACK_IMPORTED_MODULE_24__["ComposeType"].Empty:
          break;

        case Common_Enums__WEBPACK_IMPORTED_MODULE_24__["ComposeType"].Reply:
          this.to(this.emailArrayToStringLineHelper(message.replyEmails(excludeEmail)));
          this.subject(Object(Common_Utils__WEBPACK_IMPORTED_MODULE_25__["replySubjectAdd"])('Re', sSubject));
          this.prepearMessageAttachments(message, lineComposeType);
          this.aDraftInfo = ['reply', message.uid, message.folderFullNameRaw];
          this.sInReplyTo = message.sMessageId;
          this.sReferences = Object(Common_Utils__WEBPACK_IMPORTED_MODULE_25__["trim"])(this.sInReplyTo + ' ' + message.sReferences);
          break;

        case Common_Enums__WEBPACK_IMPORTED_MODULE_24__["ComposeType"].ReplyAll:
          resplyAllParts = message.replyAllEmails(excludeEmail);
          this.to(this.emailArrayToStringLineHelper(resplyAllParts[0]));
          this.cc(this.emailArrayToStringLineHelper(resplyAllParts[1]));
          this.subject(Object(Common_Utils__WEBPACK_IMPORTED_MODULE_25__["replySubjectAdd"])('Re', sSubject));
          this.prepearMessageAttachments(message, lineComposeType);
          this.aDraftInfo = ['reply', message.uid, message.folderFullNameRaw];
          this.sInReplyTo = message.sMessageId;
          this.sReferences = Object(Common_Utils__WEBPACK_IMPORTED_MODULE_25__["trim"])(this.sInReplyTo + ' ' + message.references());
          break;

        case Common_Enums__WEBPACK_IMPORTED_MODULE_24__["ComposeType"].Forward:
          this.subject(Object(Common_Utils__WEBPACK_IMPORTED_MODULE_25__["replySubjectAdd"])('Fwd', sSubject));
          this.prepearMessageAttachments(message, lineComposeType);
          this.aDraftInfo = ['forward', message.uid, message.folderFullNameRaw];
          this.sInReplyTo = message.sMessageId;
          this.sReferences = Object(Common_Utils__WEBPACK_IMPORTED_MODULE_25__["trim"])(this.sInReplyTo + ' ' + message.sReferences);
          break;

        case Common_Enums__WEBPACK_IMPORTED_MODULE_24__["ComposeType"].ForwardAsAttachment:
          this.subject(Object(Common_Utils__WEBPACK_IMPORTED_MODULE_25__["replySubjectAdd"])('Fwd', sSubject));
          this.prepearMessageAttachments(message, lineComposeType);
          this.aDraftInfo = ['forward', message.uid, message.folderFullNameRaw];
          this.sInReplyTo = message.sMessageId;
          this.sReferences = Object(Common_Utils__WEBPACK_IMPORTED_MODULE_25__["trim"])(this.sInReplyTo + ' ' + message.sReferences);
          break;

        case Common_Enums__WEBPACK_IMPORTED_MODULE_24__["ComposeType"].Draft:
          this.to(this.emailArrayToStringLineHelper(message.to));
          this.cc(this.emailArrayToStringLineHelper(message.cc));
          this.bcc(this.emailArrayToStringLineHelper(message.bcc));
          this.replyTo(this.emailArrayToStringLineHelper(message.replyTo));
          this.bFromDraft = true;
          this.draftFolder(message.folderFullNameRaw);
          this.draftUid(message.uid);
          this.subject(sSubject);
          this.prepearMessageAttachments(message, lineComposeType);
          this.aDraftInfo = Object(Common_Utils__WEBPACK_IMPORTED_MODULE_25__["isNonEmptyArray"])(aDraftInfo) && 3 === aDraftInfo.length ? aDraftInfo : null;
          this.sInReplyTo = message.sInReplyTo;
          this.sReferences = message.sReferences;
          break;

        case Common_Enums__WEBPACK_IMPORTED_MODULE_24__["ComposeType"].EditAsNew:
          this.to(this.emailArrayToStringLineHelper(message.to));
          this.cc(this.emailArrayToStringLineHelper(message.cc));
          this.bcc(this.emailArrayToStringLineHelper(message.bcc));
          this.replyTo(this.emailArrayToStringLineHelper(message.replyTo));
          this.subject(sSubject);
          this.prepearMessageAttachments(message, lineComposeType);
          this.aDraftInfo = Object(Common_Utils__WEBPACK_IMPORTED_MODULE_25__["isNonEmptyArray"])(aDraftInfo) && 3 === aDraftInfo.length ? aDraftInfo : null;
          this.sInReplyTo = message.sInReplyTo;
          this.sReferences = message.sReferences;
          break;
        // no default
      }

      switch (lineComposeType) {
        case Common_Enums__WEBPACK_IMPORTED_MODULE_24__["ComposeType"].Reply:
        case Common_Enums__WEBPACK_IMPORTED_MODULE_24__["ComposeType"].ReplyAll:
          sFrom = message.fromToLine(false, true);
          sReplyTitle = Object(Common_Translator__WEBPACK_IMPORTED_MODULE_29__["i18n"])('COMPOSE/REPLY_MESSAGE_TITLE', {
            'DATETIME': sDate,
            'EMAIL': sFrom
          });
          sText = '<br /><br />' + sReplyTitle + ':' + '<br /><br />' + '<blockquote>' + Object(Common_Utils__WEBPACK_IMPORTED_MODULE_25__["trim"])(sText) + '</blockquote>';
          break;

        case Common_Enums__WEBPACK_IMPORTED_MODULE_24__["ComposeType"].Forward:
          sFrom = message.fromToLine(false, true);
          sTo = message.toToLine(false, true);
          sCc = message.ccToLine(false, true);
          sText = '<br /><br />' + Object(Common_Translator__WEBPACK_IMPORTED_MODULE_29__["i18n"])('COMPOSE/FORWARD_MESSAGE_TOP_TITLE') + '<br />' + Object(Common_Translator__WEBPACK_IMPORTED_MODULE_29__["i18n"])('COMPOSE/FORWARD_MESSAGE_TOP_FROM') + ': ' + sFrom + '<br />' + Object(Common_Translator__WEBPACK_IMPORTED_MODULE_29__["i18n"])('COMPOSE/FORWARD_MESSAGE_TOP_TO') + ': ' + sTo + (0 < sCc.length ? '<br />' + Object(Common_Translator__WEBPACK_IMPORTED_MODULE_29__["i18n"])('COMPOSE/FORWARD_MESSAGE_TOP_CC') + ': ' + sCc : '') + '<br />' + Object(Common_Translator__WEBPACK_IMPORTED_MODULE_29__["i18n"])('COMPOSE/FORWARD_MESSAGE_TOP_SENT') + ': ' + Object(Common_Utils__WEBPACK_IMPORTED_MODULE_25__["encodeHtml"])(sDate) + '<br />' + Object(Common_Translator__WEBPACK_IMPORTED_MODULE_29__["i18n"])('COMPOSE/FORWARD_MESSAGE_TOP_SUBJECT') + ': ' + Object(Common_Utils__WEBPACK_IMPORTED_MODULE_25__["encodeHtml"])(sSubject) + '<br /><br />' + Object(Common_Utils__WEBPACK_IMPORTED_MODULE_25__["trim"])(sText) + '<br /><br />';
          break;

        case Common_Enums__WEBPACK_IMPORTED_MODULE_24__["ComposeType"].ForwardAsAttachment:
          sText = '';
          break;
        // no default
      }

      this.editor(function (editor) {
        editor.setHtml(sText, false);

        if (Common_Enums__WEBPACK_IMPORTED_MODULE_24__["EditorDefaultType"].PlainForced === _this9.editorDefaultType() || !message.isHtml() && Common_Enums__WEBPACK_IMPORTED_MODULE_24__["EditorDefaultType"].HtmlForced !== _this9.editorDefaultType()) {
          editor.modeToggle(false);
        }

        if (identity && Common_Enums__WEBPACK_IMPORTED_MODULE_24__["ComposeType"].Draft !== lineComposeType && Common_Enums__WEBPACK_IMPORTED_MODULE_24__["ComposeType"].EditAsNew !== lineComposeType) {
          _this9.setSignatureFromIdentity(identity);
        }

        _this9.setFocusInPopup();
      });
    } else if (Common_Enums__WEBPACK_IMPORTED_MODULE_24__["ComposeType"].Empty === lineComposeType) {
      this.subject(Object(Common_Utils__WEBPACK_IMPORTED_MODULE_25__["isNormal"])(sCustomSubject) ? '' + sCustomSubject : '');
      sText = Object(Common_Utils__WEBPACK_IMPORTED_MODULE_25__["isNormal"])(sCustomPlainText) ? '' + sCustomPlainText : '';
      this.editor(function (editor) {
        editor.setHtml(sText, false);

        if (Common_Enums__WEBPACK_IMPORTED_MODULE_24__["EditorDefaultType"].Html !== _this9.editorDefaultType() && Common_Enums__WEBPACK_IMPORTED_MODULE_24__["EditorDefaultType"].HtmlForced !== _this9.editorDefaultType()) {
          editor.modeToggle(false);
        }

        if (identity) {
          _this9.setSignatureFromIdentity(identity);
        }

        _this9.setFocusInPopup();
      });
    } else if (Object(Common_Utils__WEBPACK_IMPORTED_MODULE_25__["isNonEmptyArray"])(oMessageOrArray)) {
      ___WEBPACK_IMPORTED_MODULE_19___default.a.each(oMessageOrArray, function (item) {
        _this9.addMessageAsAttachment(item);
      });

      this.editor(function (editor) {
        editor.setHtml('', false);

        if (Common_Enums__WEBPACK_IMPORTED_MODULE_24__["EditorDefaultType"].Html !== _this9.editorDefaultType() && Common_Enums__WEBPACK_IMPORTED_MODULE_24__["EditorDefaultType"].HtmlForced !== _this9.editorDefaultType()) {
          editor.modeToggle(false);
        }

        if (identity && Common_Enums__WEBPACK_IMPORTED_MODULE_24__["ComposeType"].Draft !== lineComposeType && Common_Enums__WEBPACK_IMPORTED_MODULE_24__["ComposeType"].EditAsNew !== lineComposeType) {
          _this9.setSignatureFromIdentity(identity);
        }

        _this9.setFocusInPopup();
      });
    } else {
      this.setFocusInPopup();
    }

    var downloads = this.getAttachmentsDownloadsForUpload();

    if (Object(Common_Utils__WEBPACK_IMPORTED_MODULE_25__["isNonEmptyArray"])(downloads)) {
      Remote_User_Ajax__WEBPACK_IMPORTED_MODULE_41__[/* default */ "a"].messageUploadAttachments(this.onMessageUploadAttachments, downloads);
    }

    if (identity) {
      this.currentIdentity(identity);
    }

    this.resizerTrigger();
  };

  _proto.onMessageUploadAttachments = function onMessageUploadAttachments(sResult, oData) {
    var _this10 = this;

    if (Common_Enums__WEBPACK_IMPORTED_MODULE_24__["StorageResultType"].Success === sResult && oData && oData.Result) {
      if (!this.viewModelVisibility()) {
        ___WEBPACK_IMPORTED_MODULE_19___default.a.each(oData.Result, function (id, tempName) {
          var attachment = _this10.getAttachmentById(id);

          if (attachment) {
            attachment.tempName(tempName);
            attachment.waiting(false).uploading(false).complete(true);
          }
        });
      }
    } else {
      this.setMessageAttachmentFailedDownloadText();
    }
  };

  _proto.setFocusInPopup = function setFocusInPopup() {
    var _this11 = this;

    if (!Common_Globals__WEBPACK_IMPORTED_MODULE_27__["bMobileDevice"]) {
      ___WEBPACK_IMPORTED_MODULE_19___default.a.delay(function () {
        if ('' === _this11.to()) {
          _this11.to.focused(true);
        } else if (_this11.oEditor) {
          if (!_this11.to.focused()) {
            _this11.oEditor.focus();
          }
        }
      }, Common_Enums__WEBPACK_IMPORTED_MODULE_24__["Magics"].Time100ms);
    }
  };

  _proto.onShowWithDelay = function onShowWithDelay() {
    this.resizerTrigger();
  };

  _proto.tryToClosePopup = function tryToClosePopup() {
    var _this12 = this;

    var PopupsAskViewModel = __webpack_require__(/*! View/Popup/Ask */ 221);

    if (!Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_46__["isPopupVisible"])(PopupsAskViewModel) && this.modalVisibility()) {
      if (this.bSkipNextHide || this.isEmptyForm() && !this.draftUid()) {
        Object(Common_Utils__WEBPACK_IMPORTED_MODULE_25__["delegateRun"])(this, 'closeCommand');
      } else {
        Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_46__["showScreenPopup"])(PopupsAskViewModel, [Object(Common_Translator__WEBPACK_IMPORTED_MODULE_29__["i18n"])('POPUPS_ASK/DESC_WANT_CLOSE_THIS_WINDOW'), function () {
          if (_this12.modalVisibility()) {
            Object(Common_Utils__WEBPACK_IMPORTED_MODULE_25__["delegateRun"])(_this12, 'closeCommand');
          }
        }]);
      }
    }
  };

  _proto.onBuild = function onBuild() {
    var _this13 = this;

    this.initUploader();
    key__WEBPACK_IMPORTED_MODULE_22___default()('ctrl+q, command+q, ctrl+w, command+w', Common_Enums__WEBPACK_IMPORTED_MODULE_24__["KeyState"].Compose, Common_Utils__WEBPACK_IMPORTED_MODULE_25__["noopFalse"]);
    key__WEBPACK_IMPORTED_MODULE_22___default()('`', Common_Enums__WEBPACK_IMPORTED_MODULE_24__["KeyState"].Compose, function () {
      if (_this13.oEditor && !_this13.oEditor.hasFocus() && !Object(Common_Utils__WEBPACK_IMPORTED_MODULE_25__["inFocus"])()) {
        _this13.identitiesDropdownTrigger(true);

        return false;
      }

      return true;
    });
    key__WEBPACK_IMPORTED_MODULE_22___default()('ctrl+`', Common_Enums__WEBPACK_IMPORTED_MODULE_24__["KeyState"].Compose, function () {
      _this13.identitiesDropdownTrigger(true);

      return false;
    });
    key__WEBPACK_IMPORTED_MODULE_22___default()('esc, ctrl+down, command+down', Common_Enums__WEBPACK_IMPORTED_MODULE_24__["KeyState"].Compose, function () {
      _this13.skipCommand();

      return false;
    });

    if (this.allowFolders) {
      key__WEBPACK_IMPORTED_MODULE_22___default()('ctrl+s, command+s', Common_Enums__WEBPACK_IMPORTED_MODULE_24__["KeyState"].Compose, function () {
        _this13.saveCommand();

        return false;
      });
    }

    if (Storage_Settings__WEBPACK_IMPORTED_MODULE_42__["appSettingsGet"]('allowCtrlEnterOnCompose')) {
      key__WEBPACK_IMPORTED_MODULE_22___default()('ctrl+enter, command+enter', Common_Enums__WEBPACK_IMPORTED_MODULE_24__["KeyState"].Compose, function () {
        _this13.sendCommand();

        return false;
      });
    }

    key__WEBPACK_IMPORTED_MODULE_22___default()('shift+esc', Common_Enums__WEBPACK_IMPORTED_MODULE_24__["KeyState"].Compose, function () {
      if (_this13.modalVisibility()) {
        _this13.tryToClosePopup();
      }

      return false;
    });
    Common_Events__WEBPACK_IMPORTED_MODULE_43__[/* sub */ "b"]('window.resize.real', this.resizerTrigger);
    Common_Events__WEBPACK_IMPORTED_MODULE_43__[/* sub */ "b"]('window.resize.real', ___WEBPACK_IMPORTED_MODULE_19___default.a.debounce(this.resizerTrigger, Common_Enums__WEBPACK_IMPORTED_MODULE_24__["Magics"].Time50ms));
    Stores_Social__WEBPACK_IMPORTED_MODULE_40__[/* default */ "a"].appendDropbox();

    if (this.driveEnabled()) {
      $__WEBPACK_IMPORTED_MODULE_20___default.a.getScript('https://apis.google.com/js/api.js', function () {
        if (window__WEBPACK_IMPORTED_MODULE_18___default.a.gapi) {
          _this13.driveVisible(true);
        }
      });
    }

    window__WEBPACK_IMPORTED_MODULE_18___default.a.setInterval(function () {
      if (_this13.modalVisibility() && _this13.oEditor) {
        _this13.oEditor.resize();
      }
    }, Common_Enums__WEBPACK_IMPORTED_MODULE_24__["Magics"].Time5s);
  };

  _proto.driveCallback = function driveCallback(accessToken, data) {
    var _this14 = this;

    if (data && window__WEBPACK_IMPORTED_MODULE_18___default.a.XMLHttpRequest && window__WEBPACK_IMPORTED_MODULE_18___default.a.google && data[window__WEBPACK_IMPORTED_MODULE_18___default.a.google.picker.Response.ACTION] === window__WEBPACK_IMPORTED_MODULE_18___default.a.google.picker.Action.PICKED && data[window__WEBPACK_IMPORTED_MODULE_18___default.a.google.picker.Response.DOCUMENTS] && data[window__WEBPACK_IMPORTED_MODULE_18___default.a.google.picker.Response.DOCUMENTS][0] && data[window__WEBPACK_IMPORTED_MODULE_18___default.a.google.picker.Response.DOCUMENTS][0].id) {
      var request = new window__WEBPACK_IMPORTED_MODULE_18___default.a.XMLHttpRequest();
      request.open('GET', 'https://www.googleapis.com/drive/v2/files/' + data[window__WEBPACK_IMPORTED_MODULE_18___default.a.google.picker.Response.DOCUMENTS][0].id);
      request.setRequestHeader('Authorization', 'Bearer ' + accessToken);
      request.addEventListener('load', function () {
        if (request && request.responseText) {
          var response = window__WEBPACK_IMPORTED_MODULE_18___default.a.JSON.parse(request.responseText),
              fExport = function fExport(item, mimeType, ext) {
            if (item && item.exportLinks) {
              if (item.exportLinks[mimeType]) {
                response.downloadUrl = item.exportLinks[mimeType];
                response.title = item.title + '.' + ext;
                response.mimeType = mimeType;
              } else if (item.exportLinks['application/pdf']) {
                response.downloadUrl = item.exportLinks['application/pdf'];
                response.title = item.title + '.pdf';
                response.mimeType = 'application/pdf';
              }
            }
          };

          if (response && !response.downloadUrl && response.mimeType && response.exportLinks) {
            switch (response.mimeType.toString().toLowerCase()) {
              case 'application/vnd.google-apps.document':
                fExport(response, 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'docx');
                break;

              case 'application/vnd.google-apps.spreadsheet':
                fExport(response, 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 'xlsx');
                break;

              case 'application/vnd.google-apps.drawing':
                fExport(response, 'image/png', 'png');
                break;

              case 'application/vnd.google-apps.presentation':
                fExport(response, 'application/vnd.openxmlformats-officedocument.presentationml.presentation', 'pptx');
                break;

              default:
                fExport(response, 'application/pdf', 'pdf');
                break;
            }
          }

          if (response && response.downloadUrl) {
            _this14.addDriveAttachment(response, accessToken);
          }
        }
      });
      request.send();
    }
  };

  _proto.driveCreatePiker = function driveCreatePiker(authToken) {
    var _this15 = this;

    if (window__WEBPACK_IMPORTED_MODULE_18___default.a.gapi && authToken && authToken.access_token) {
      window__WEBPACK_IMPORTED_MODULE_18___default.a.gapi.load('picker', {
        callback: function callback() {
          if (window__WEBPACK_IMPORTED_MODULE_18___default.a.google && window__WEBPACK_IMPORTED_MODULE_18___default.a.google.picker) {
            var drivePicker = new window__WEBPACK_IMPORTED_MODULE_18___default.a.google.picker.PickerBuilder() // .addView(window.google.picker.ViewId.FOLDERS)
            .addView(window__WEBPACK_IMPORTED_MODULE_18___default.a.google.picker.ViewId.DOCS).setAppId(Storage_Settings__WEBPACK_IMPORTED_MODULE_42__["settingsGet"]('GoogleClientID')).setOAuthToken(authToken.access_token).setCallback(_babel_runtime_corejs3_core_js_stable_instance_bind__WEBPACK_IMPORTED_MODULE_13___default()(___WEBPACK_IMPORTED_MODULE_19___default.a).call(___WEBPACK_IMPORTED_MODULE_19___default.a, _this15.driveCallback, _this15, authToken.access_token)).enableFeature(window__WEBPACK_IMPORTED_MODULE_18___default.a.google.picker.Feature.NAV_HIDDEN) // .setOrigin(window.location.protocol + '//' + window.location.host)
            .build();
            drivePicker.setVisible(true);
          }
        }
      });
    }
  };

  _proto.driveOpenPopup = function driveOpenPopup() {
    var _this16 = this;

    if (window__WEBPACK_IMPORTED_MODULE_18___default.a.gapi) {
      window__WEBPACK_IMPORTED_MODULE_18___default.a.gapi.load('auth', {
        callback: function callback() {
          var authToken = window__WEBPACK_IMPORTED_MODULE_18___default.a.gapi.auth.getToken(),
              fResult = function fResult(authResult) {
            if (authResult && !authResult.error) {
              var token = window__WEBPACK_IMPORTED_MODULE_18___default.a.gapi.auth.getToken();

              if (token) {
                _this16.driveCreatePiker(token);
              }

              return true;
            }

            return false;
          };

          if (!authToken) {
            window__WEBPACK_IMPORTED_MODULE_18___default.a.gapi.auth.authorize({
              'client_id': Storage_Settings__WEBPACK_IMPORTED_MODULE_42__["settingsGet"]('GoogleClientID'),
              'scope': 'https://www.googleapis.com/auth/drive.readonly',
              'immediate': true
            }, function (authResult) {
              if (!fResult(authResult)) {
                window__WEBPACK_IMPORTED_MODULE_18___default.a.gapi.auth.authorize({
                  'client_id': Storage_Settings__WEBPACK_IMPORTED_MODULE_42__["settingsGet"]('GoogleClientID'),
                  'scope': 'https://www.googleapis.com/auth/drive.readonly',
                  'immediate': false
                }, fResult);
              }
            });
          } else {
            _this16.driveCreatePiker(authToken);
          }
        }
      });
    }
  }
  /**
   * @param {string} id
   * @returns {?Object}
   */
  ;

  _proto.getAttachmentById = function getAttachmentById(id) {
    return _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_10___default()(___WEBPACK_IMPORTED_MODULE_19___default.a).call(___WEBPACK_IMPORTED_MODULE_19___default.a, this.attachments(), function (item) {
      return item && id === item.id;
    });
  };

  _proto.cancelAttachmentHelper = function cancelAttachmentHelper(id, oJua) {
    var _this17 = this;

    return function () {
      var attachment = _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_10___default()(___WEBPACK_IMPORTED_MODULE_19___default.a).call(___WEBPACK_IMPORTED_MODULE_19___default.a, _this17.attachments(), function (item) {
        return item && item.id === id;
      });

      if (attachment) {
        _this17.attachments.remove(attachment);

        Object(Common_Utils__WEBPACK_IMPORTED_MODULE_25__["delegateRunOnDestroy"])(attachment);

        if (oJua) {
          oJua.cancel(id);
        }
      }
    };
  };

  _proto.initUploader = function initUploader() {
    var _this18 = this;

    if (this.composeUploaderButton()) {
      var uploadCache = {},
          attachmentSizeLimit = Object(Common_Utils__WEBPACK_IMPORTED_MODULE_25__["pInt"])(Storage_Settings__WEBPACK_IMPORTED_MODULE_42__["settingsGet"]('AttachmentLimit')),
          oJua = new Jua__WEBPACK_IMPORTED_MODULE_23___default.a({
        'action': Object(Common_Links__WEBPACK_IMPORTED_MODULE_28__[/* upload */ "G"])(),
        'name': 'uploader',
        'queueSize': 2,
        'multipleSizeLimit': 50,
        'clickElement': this.composeUploaderButton(),
        'dragAndDropElement': this.composeUploaderDropPlace()
      });

      if (oJua) {
        oJua // .on('onLimitReached', (limit) => {
        // 	alert(limit);
        // })
        .on('onDragEnter', function () {
          _this18.dragAndDropOver(true);
        }).on('onDragLeave', function () {
          _this18.dragAndDropOver(false);
        }).on('onBodyDragEnter', function () {
          _this18.attachmentsPlace(true);

          _this18.dragAndDropVisible(true);
        }).on('onBodyDragLeave', function () {
          _this18.dragAndDropVisible(false);
        }).on('onProgress', function (id, loaded, total) {
          var item = uploadCache[id];

          if (!item) {
            item = _this18.getAttachmentById(id);

            if (item) {
              uploadCache[id] = item;
            }
          }

          if (item) {
            item.progress(window__WEBPACK_IMPORTED_MODULE_18___default.a.Math.floor(loaded / total * 100));
          }
        }).on('onSelect', function (sId, oData) {
          _this18.dragAndDropOver(false);

          var fileName = Object(Common_Utils__WEBPACK_IMPORTED_MODULE_25__["isUnd"])(oData.FileName) ? '' : oData.FileName.toString(),
              size = Object(Common_Utils__WEBPACK_IMPORTED_MODULE_25__["isNormal"])(oData.Size) ? Object(Common_Utils__WEBPACK_IMPORTED_MODULE_25__["pInt"])(oData.Size) : null,
              attachment = new Model_ComposeAttachment__WEBPACK_IMPORTED_MODULE_44__[/* ComposeAttachmentModel */ "a"](sId, fileName, size);
          attachment.cancel = _this18.cancelAttachmentHelper(sId, oJua);

          _this18.attachments.push(attachment);

          _this18.attachmentsPlace(true);

          if (0 < size && 0 < attachmentSizeLimit && attachmentSizeLimit < size) {
            attachment.waiting(false).uploading(true).complete(true).error(Object(Common_Translator__WEBPACK_IMPORTED_MODULE_29__["i18n"])('UPLOAD/ERROR_FILE_IS_TOO_BIG'));
            return false;
          }

          return true;
        }).on('onStart', function (id) {
          var item = uploadCache[id];

          if (!item) {
            item = _this18.getAttachmentById(id);

            if (item) {
              uploadCache[id] = item;
            }
          }

          if (item) {
            item.waiting(false).uploading(true).complete(false);
          }
        }).on('onComplete', function (id, result, data) {
          var attachment = _this18.getAttachmentById(id),
              errorCode = data && data.Result && data.Result.ErrorCode ? data.Result.ErrorCode : null,
              attachmentJson = result && data && data.Result && data.Result.Attachment ? data.Result.Attachment : null;

          var error = '';

          if (null !== errorCode) {
            error = Object(Common_Translator__WEBPACK_IMPORTED_MODULE_29__["getUploadErrorDescByCode"])(errorCode);
          } else if (!attachmentJson) {
            error = Object(Common_Translator__WEBPACK_IMPORTED_MODULE_29__["i18n"])('UPLOAD/ERROR_UNKNOWN');
          }

          if (attachment) {
            if ('' !== error && 0 < error.length) {
              attachment.waiting(false).uploading(false).complete(true).error(error);
            } else if (attachmentJson) {
              attachment.waiting(false).uploading(false).complete(true);
              attachment.initByUploadJson(attachmentJson);
            }

            if (Object(Common_Utils__WEBPACK_IMPORTED_MODULE_25__["isUnd"])(uploadCache[id])) {
              delete uploadCache[id];
            }
          }
        });
        this.addAttachmentEnabled(true).dragAndDropEnabled(oJua.isDragAndDropSupported());
      } else {
        this.addAttachmentEnabled(false).dragAndDropEnabled(false);
      }
    }
  }
  /**
   * @returns {Object}
   */
  ;

  _proto.prepearAttachmentsForSendOrSave = function prepearAttachmentsForSendOrSave() {
    var result = {};

    ___WEBPACK_IMPORTED_MODULE_19___default.a.each(this.attachmentsInReady(), function (item) {
      if (item && '' !== item.tempName() && item.enabled()) {
        result[item.tempName()] = [item.fileName(), item.isInline ? '1' : '0', item.CID, item.contentLocation];
      }
    });

    return result;
  }
  /**
   * @param {MessageModel} message
   */
  ;

  _proto.addMessageAsAttachment = function addMessageAsAttachment(message) {
    if (message) {
      var temp = message.subject();
      temp = '.eml' === temp.substr(-4).toLowerCase() ? temp : temp + '.eml';
      var attachment = new Model_ComposeAttachment__WEBPACK_IMPORTED_MODULE_44__[/* ComposeAttachmentModel */ "a"](message.requestHash, temp, message.size());
      attachment.fromMessage = true;
      attachment.cancel = this.cancelAttachmentHelper(message.requestHash);
      attachment.waiting(false).uploading(true).complete(true);
      this.attachments.push(attachment);
    }
  }
  /**
   * @param {string} url
   * @param {string} name
   * @param {number} size
   * @returns {ComposeAttachmentModel}
   */
  ;

  _proto.addAttachmentHelper = function addAttachmentHelper(url, name, size) {
    var attachment = new Model_ComposeAttachment__WEBPACK_IMPORTED_MODULE_44__[/* ComposeAttachmentModel */ "a"](url, name, size);
    attachment.fromMessage = false;
    attachment.cancel = this.cancelAttachmentHelper(url);
    attachment.waiting(false).uploading(true).complete(false);
    this.attachments.push(attachment);
    this.attachmentsPlace(true);
    return attachment;
  }
  /**
   * @param {Object} dropboxFile
   * @returns {boolean}
   */
  ;

  _proto.addDropboxAttachment = function addDropboxAttachment(dropboxFile) {
    var attachmentSizeLimit = Object(Common_Utils__WEBPACK_IMPORTED_MODULE_25__["pInt"])(Storage_Settings__WEBPACK_IMPORTED_MODULE_42__["settingsGet"]('AttachmentLimit')),
        mSize = dropboxFile.bytes,
        attachment = this.addAttachmentHelper(dropboxFile.link, dropboxFile.name, mSize);

    if (0 < mSize && 0 < attachmentSizeLimit && attachmentSizeLimit < mSize) {
      attachment.uploading(false).complete(true);
      attachment.error(Object(Common_Translator__WEBPACK_IMPORTED_MODULE_29__["i18n"])('UPLOAD/ERROR_FILE_IS_TOO_BIG'));
      return false;
    }

    Remote_User_Ajax__WEBPACK_IMPORTED_MODULE_41__[/* default */ "a"].composeUploadExternals(function (statusResult, data) {
      var result = false;
      attachment.uploading(false).complete(true);

      if (Common_Enums__WEBPACK_IMPORTED_MODULE_24__["StorageResultType"].Success === statusResult && data && data.Result) {
        if (data.Result[attachment.id]) {
          result = true;
          attachment.tempName(data.Result[attachment.id]);
        }
      }

      if (!result) {
        attachment.error(Object(Common_Translator__WEBPACK_IMPORTED_MODULE_29__["getUploadErrorDescByCode"])(Common_Enums__WEBPACK_IMPORTED_MODULE_24__["UploadErrorCode"].FileNoUploaded));
      }
    }, [dropboxFile.link]);
    return true;
  }
  /**
   * @param {Object} driveFile
   * @param {string} accessToken
   * @returns {boolean}
   */
  ;

  _proto.addDriveAttachment = function addDriveAttachment(driveFile, accessToken) {
    var attachmentSizeLimit = Object(Common_Utils__WEBPACK_IMPORTED_MODULE_25__["pInt"])(Storage_Settings__WEBPACK_IMPORTED_MODULE_42__["settingsGet"]('AttachmentLimit')),
        size = driveFile.fileSize ? Object(Common_Utils__WEBPACK_IMPORTED_MODULE_25__["pInt"])(driveFile.fileSize) : 0,
        attachment = this.addAttachmentHelper(driveFile.downloadUrl, driveFile.title, size);

    if (0 < size && 0 < attachmentSizeLimit && attachmentSizeLimit < size) {
      attachment.uploading(false).complete(true);
      attachment.error(Object(Common_Translator__WEBPACK_IMPORTED_MODULE_29__["i18n"])('UPLOAD/ERROR_FILE_IS_TOO_BIG'));
      return false;
    }

    Remote_User_Ajax__WEBPACK_IMPORTED_MODULE_41__[/* default */ "a"].composeUploadDrive(function (statusResult, data) {
      var result = false;
      attachment.uploading(false).complete(true);

      if (Common_Enums__WEBPACK_IMPORTED_MODULE_24__["StorageResultType"].Success === statusResult && data && data.Result) {
        if (data.Result[attachment.id]) {
          result = true;
          attachment.tempName(data.Result[attachment.id][0]);
          attachment.size(Object(Common_Utils__WEBPACK_IMPORTED_MODULE_25__["pInt"])(data.Result[attachment.id][1]));
        }
      }

      if (!result) {
        attachment.error(Object(Common_Translator__WEBPACK_IMPORTED_MODULE_29__["getUploadErrorDescByCode"])(Common_Enums__WEBPACK_IMPORTED_MODULE_24__["UploadErrorCode"].FileNoUploaded));
      }
    }, driveFile.downloadUrl, accessToken);
    return true;
  }
  /**
   * @param {MessageModel} message
   * @param {string} type
   */
  ;

  _proto.prepearMessageAttachments = function prepearMessageAttachments(message, type) {
    var _this19 = this;

    if (message) {
      if (Common_Enums__WEBPACK_IMPORTED_MODULE_24__["ComposeType"].ForwardAsAttachment === type) {
        this.addMessageAsAttachment(message);
      } else {
        var attachments = message.attachments();

        ___WEBPACK_IMPORTED_MODULE_19___default.a.each(Object(Common_Utils__WEBPACK_IMPORTED_MODULE_25__["isNonEmptyArray"])(attachments) ? attachments : [], function (item) {
          var add = false;

          switch (type) {
            case Common_Enums__WEBPACK_IMPORTED_MODULE_24__["ComposeType"].Reply:
            case Common_Enums__WEBPACK_IMPORTED_MODULE_24__["ComposeType"].ReplyAll:
              add = item.isLinked;
              break;

            case Common_Enums__WEBPACK_IMPORTED_MODULE_24__["ComposeType"].Forward:
            case Common_Enums__WEBPACK_IMPORTED_MODULE_24__["ComposeType"].Draft:
            case Common_Enums__WEBPACK_IMPORTED_MODULE_24__["ComposeType"].EditAsNew:
              add = true;
              break;
            // no default
          }

          if (add) {
            var attachment = new Model_ComposeAttachment__WEBPACK_IMPORTED_MODULE_44__[/* ComposeAttachmentModel */ "a"](item.download, item.fileName, item.estimatedSize, item.isInline, item.isLinked, item.cid, item.contentLocation);
            attachment.fromMessage = true;
            attachment.cancel = _this19.cancelAttachmentHelper(item.download);
            attachment.waiting(false).uploading(true).complete(false);

            _this19.attachments.push(attachment);
          }
        });
      }
    }
  };

  _proto.removeLinkedAttachments = function removeLinkedAttachments() {
    var arrachment = _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_10___default()(___WEBPACK_IMPORTED_MODULE_19___default.a).call(___WEBPACK_IMPORTED_MODULE_19___default.a, this.attachments(), function (item) {
      return item && item.isLinked;
    });

    if (arrachment) {
      this.attachments.remove(arrachment);
      Object(Common_Utils__WEBPACK_IMPORTED_MODULE_25__["delegateRunOnDestroy"])(arrachment);
    }
  };

  _proto.setMessageAttachmentFailedDownloadText = function setMessageAttachmentFailedDownloadText() {
    ___WEBPACK_IMPORTED_MODULE_19___default.a.each(this.attachments(), function (attachment) {
      if (attachment && attachment.fromMessage) {
        attachment.waiting(false).uploading(false).complete(true).error(Object(Common_Translator__WEBPACK_IMPORTED_MODULE_29__["getUploadErrorDescByCode"])(Common_Enums__WEBPACK_IMPORTED_MODULE_24__["UploadErrorCode"].FileNoUploaded));
      }
    });
  }
  /**
   * @param {boolean=} includeAttachmentInProgress = true
   * @returns {boolean}
   */
  ;

  _proto.isEmptyForm = function isEmptyForm(includeAttachmentInProgress) {
    if (includeAttachmentInProgress === void 0) {
      includeAttachmentInProgress = true;
    }

    var withoutAttachment = includeAttachmentInProgress ? 0 === this.attachments().length : 0 === this.attachmentsInReady().length;
    return 0 === this.to().length && 0 === this.cc().length && 0 === this.bcc().length && 0 === this.replyTo().length && 0 === this.subject().length && withoutAttachment && (!this.oEditor || '' === this.oEditor.getData());
  };

  _proto.reset = function reset() {
    this.to('');
    this.cc('');
    this.bcc('');
    this.replyTo('');
    this.subject('');
    this.requestDsn(false);
    this.requestReadReceipt(false);
    this.markAsImportant(false);
    this.attachmentsPlace(false);
    this.aDraftInfo = null;
    this.sInReplyTo = '';
    this.bFromDraft = false;
    this.sReferences = '';
    this.sendError(false);
    this.sendSuccessButSaveError(false);
    this.savedError(false);
    this.savedTime(0);
    this.emptyToError(false);
    this.attachmentsInProcessError(false);
    this.showCc(false);
    this.showBcc(false);
    this.showReplyTo(false);
    Object(Common_Utils__WEBPACK_IMPORTED_MODULE_25__["delegateRunOnDestroy"])(this.attachments());
    this.attachments([]);
    this.dragAndDropOver(false);
    this.dragAndDropVisible(false);
    this.draftFolder('');
    this.draftUid('');
    this.sending(false);
    this.saving(false);

    if (this.oEditor) {
      this.oEditor.clear(false);
    }
  }
  /**
   * @returns {Array}
   */
  ;

  _proto.getAttachmentsDownloadsForUpload = function getAttachmentsDownloadsForUpload() {
    return _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_12___default()(___WEBPACK_IMPORTED_MODULE_19___default.a).call(___WEBPACK_IMPORTED_MODULE_19___default.a, _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_14___default()(___WEBPACK_IMPORTED_MODULE_19___default.a).call(___WEBPACK_IMPORTED_MODULE_19___default.a, this.attachments(), function (item) {
      return item && '' === item.tempName();
    }), function (item) {
      return item.id;
    });
  };

  _proto.resizerTrigger = function resizerTrigger() {
    this.resizer(!this.resizer());
  };

  return ComposePopupView;
}(Knoin_AbstractViewNext__WEBPACK_IMPORTED_MODULE_47__[/* AbstractViewNext */ "a"]), (Object(_babel_runtime_corejs3_helpers_esm_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_17__[/* default */ "a"])(_class2.prototype, "sendCommand", [_dec2], _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_9___default()(_class2.prototype, "sendCommand"), _class2.prototype), Object(_babel_runtime_corejs3_helpers_esm_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_17__[/* default */ "a"])(_class2.prototype, "saveCommand", [_dec3], _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_9___default()(_class2.prototype, "saveCommand"), _class2.prototype), Object(_babel_runtime_corejs3_helpers_esm_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_17__[/* default */ "a"])(_class2.prototype, "deleteCommand", [_dec4], _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_9___default()(_class2.prototype, "deleteCommand"), _class2.prototype), Object(_babel_runtime_corejs3_helpers_esm_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_17__[/* default */ "a"])(_class2.prototype, "skipCommand", [_dec5], _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_9___default()(_class2.prototype, "skipCommand"), _class2.prototype), Object(_babel_runtime_corejs3_helpers_esm_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_17__[/* default */ "a"])(_class2.prototype, "contactsCommand", [_dec6], _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_9___default()(_class2.prototype, "contactsCommand"), _class2.prototype), Object(_babel_runtime_corejs3_helpers_esm_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_17__[/* default */ "a"])(_class2.prototype, "dropboxCommand", [_dec7], _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_9___default()(_class2.prototype, "dropboxCommand"), _class2.prototype), Object(_babel_runtime_corejs3_helpers_esm_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_17__[/* default */ "a"])(_class2.prototype, "driveCommand", [_dec8], _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_9___default()(_class2.prototype, "driveCommand"), _class2.prototype)), _class2)) || _class);


/***/ }),
/* 123 */
/*!***********************************!*\
  !*** (webpack)/buildin/global.js ***!
  \***********************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports) {

var g;

// This works in non-strict mode
g = (function() {
	return this;
})();

try {
	// This works if eval is allowed (see CSP)
	g = g || new Function("return this")();
} catch (e) {
	// This works if the window reference is available
	if (typeof window === "object") g = window;
}

// g can still be undefined, but nothing to do about it...
// We return undefined, instead of nothing here, so it's
// easier to handle this case. if(!global) { ...}

module.exports = g;


/***/ }),
/* 124 */
/*!********************************************************!*\
  !*** ./node_modules/core-js/internals/to-primitive.js ***!
  \********************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

var isObject = __webpack_require__(/*! ../internals/is-object */ 44);

// `ToPrimitive` abstract operation
// https://tc39.github.io/ecma262/#sec-toprimitive
// instead of the ES6 spec version, we didn't implement @@toPrimitive case
// and the second argument - flag - preferred type is a string
module.exports = function (input, PREFERRED_STRING) {
  if (!isObject(input)) return input;
  var fn, val;
  if (PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val;
  if (typeof (fn = input.valueOf) == 'function' && !isObject(val = fn.call(input))) return val;
  if (!PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val;
  throw TypeError("Can't convert object to primitive value");
};


/***/ }),
/* 125 */
/*!**********************************************************!*\
  !*** ./node_modules/core-js/internals/ie8-dom-define.js ***!
  \**********************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ 47);
var fails = __webpack_require__(/*! ../internals/fails */ 36);
var createElement = __webpack_require__(/*! ../internals/document-create-element */ 101);

// Thank's IE8 for his funny defineProperty
module.exports = !DESCRIPTORS && !fails(function () {
  return Object.defineProperty(createElement('div'), 'a', {
    get: function () { return 7; }
  }).a != 7;
});


/***/ }),
/* 126 */
/*!********************************************************!*\
  !*** ./node_modules/core-js/internals/shared-store.js ***!
  \********************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

var global = __webpack_require__(/*! ../internals/global */ 27);
var setGlobal = __webpack_require__(/*! ../internals/set-global */ 91);

var SHARED = '__core-js_shared__';
var store = global[SHARED] || setGlobal(SHARED, {});

module.exports = store;


/***/ }),
/* 127 */
/*!**************************************************!*\
  !*** ./node_modules/core-js/internals/shared.js ***!
  \**************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

var IS_PURE = __webpack_require__(/*! ../internals/is-pure */ 78);
var store = __webpack_require__(/*! ../internals/shared-store */ 126);

(module.exports = function (key, value) {
  return store[key] || (store[key] = value !== undefined ? value : {});
})('versions', []).push({
  version: '3.6.4',
  mode: IS_PURE ? 'pure' : 'global',
  copyright: '© 2020 Denis Pushkarev (zloirock.ru)'
});


/***/ }),
/* 128 */
/*!***********************************************!*\
  !*** ./node_modules/core-js/internals/uid.js ***!
  \***********************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports) {

var id = 0;
var postfix = Math.random();

module.exports = function (key) {
  return 'Symbol(' + String(key === undefined ? '' : key) + ')_' + (++id + postfix).toString(36);
};


/***/ }),
/* 129 */
/*!*****************************************************!*\
  !*** ./node_modules/core-js/internals/is-forced.js ***!
  \*****************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

var fails = __webpack_require__(/*! ../internals/fails */ 36);

var replacement = /#|\.prototype\./;

var isForced = function (feature, detection) {
  var value = data[normalize(feature)];
  return value == POLYFILL ? true
    : value == NATIVE ? false
    : typeof detection == 'function' ? fails(detection)
    : !!detection;
};

var normalize = isForced.normalize = function (string) {
  return String(string).replace(replacement, '.').toLowerCase();
};

var data = isForced.data = {};
var NATIVE = isForced.NATIVE = 'N';
var POLYFILL = isForced.POLYFILL = 'P';

module.exports = isForced;


/***/ }),
/* 130 */
/*!*********************************************************!*\
  !*** ./node_modules/core-js/internals/native-symbol.js ***!
  \*********************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

var fails = __webpack_require__(/*! ../internals/fails */ 36);

module.exports = !!Object.getOwnPropertySymbols && !fails(function () {
  // Chrome 38 Symbol has incorrect toString conversion
  // eslint-disable-next-line no-undef
  return !String(Symbol());
});


/***/ }),
/* 131 */
/*!***************************************************!*\
  !*** ./node_modules/core-js/internals/classof.js ***!
  \***************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

var TO_STRING_TAG_SUPPORT = __webpack_require__(/*! ../internals/to-string-tag-support */ 93);
var classofRaw = __webpack_require__(/*! ../internals/classof-raw */ 50);
var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ 32);

var TO_STRING_TAG = wellKnownSymbol('toStringTag');
// ES3 wrong here
var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';

// fallback for IE11 Script Access Denied error
var tryGet = function (it, key) {
  try {
    return it[key];
  } catch (error) { /* empty */ }
};

// getting tag from ES6+ `Object.prototype.toString`
module.exports = TO_STRING_TAG_SUPPORT ? classofRaw : function (it) {
  var O, tag, result;
  return it === undefined ? 'Undefined' : it === null ? 'Null'
    // @@toStringTag case
    : typeof (tag = tryGet(O = Object(it), TO_STRING_TAG)) == 'string' ? tag
    // builtinTag case
    : CORRECT_ARGUMENTS ? classofRaw(O)
    // ES3 arguments fallback
    : (result = classofRaw(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : result;
};


/***/ }),
/* 132 */
/*!************************************************!*\
  !*** ./node_modules/core-js/internals/task.js ***!
  \************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

var global = __webpack_require__(/*! ../internals/global */ 27);
var fails = __webpack_require__(/*! ../internals/fails */ 36);
var classof = __webpack_require__(/*! ../internals/classof-raw */ 50);
var bind = __webpack_require__(/*! ../internals/function-bind-context */ 103);
var html = __webpack_require__(/*! ../internals/html */ 141);
var createElement = __webpack_require__(/*! ../internals/document-create-element */ 101);
var IS_IOS = __webpack_require__(/*! ../internals/engine-is-ios */ 133);

var location = global.location;
var set = global.setImmediate;
var clear = global.clearImmediate;
var process = global.process;
var MessageChannel = global.MessageChannel;
var Dispatch = global.Dispatch;
var counter = 0;
var queue = {};
var ONREADYSTATECHANGE = 'onreadystatechange';
var defer, channel, port;

var run = function (id) {
  // eslint-disable-next-line no-prototype-builtins
  if (queue.hasOwnProperty(id)) {
    var fn = queue[id];
    delete queue[id];
    fn();
  }
};

var runner = function (id) {
  return function () {
    run(id);
  };
};

var listener = function (event) {
  run(event.data);
};

var post = function (id) {
  // old engines have not location.origin
  global.postMessage(id + '', location.protocol + '//' + location.host);
};

// Node.js 0.9+ & IE10+ has setImmediate, otherwise:
if (!set || !clear) {
  set = function setImmediate(fn) {
    var args = [];
    var i = 1;
    while (arguments.length > i) args.push(arguments[i++]);
    queue[++counter] = function () {
      // eslint-disable-next-line no-new-func
      (typeof fn == 'function' ? fn : Function(fn)).apply(undefined, args);
    };
    defer(counter);
    return counter;
  };
  clear = function clearImmediate(id) {
    delete queue[id];
  };
  // Node.js 0.8-
  if (classof(process) == 'process') {
    defer = function (id) {
      process.nextTick(runner(id));
    };
  // Sphere (JS game engine) Dispatch API
  } else if (Dispatch && Dispatch.now) {
    defer = function (id) {
      Dispatch.now(runner(id));
    };
  // Browsers with MessageChannel, includes WebWorkers
  // except iOS - https://github.com/zloirock/core-js/issues/624
  } else if (MessageChannel && !IS_IOS) {
    channel = new MessageChannel();
    port = channel.port2;
    channel.port1.onmessage = listener;
    defer = bind(port.postMessage, port, 1);
  // Browsers with postMessage, skip WebWorkers
  // IE8 has postMessage, but it's sync & typeof its postMessage is 'object'
  } else if (global.addEventListener && typeof postMessage == 'function' && !global.importScripts && !fails(post)) {
    defer = post;
    global.addEventListener('message', listener, false);
  // IE8-
  } else if (ONREADYSTATECHANGE in createElement('script')) {
    defer = function (id) {
      html.appendChild(createElement('script'))[ONREADYSTATECHANGE] = function () {
        html.removeChild(this);
        run(id);
      };
    };
  // Rest old browsers
  } else {
    defer = function (id) {
      setTimeout(runner(id), 0);
    };
  }
}

module.exports = {
  set: set,
  clear: clear
};


/***/ }),
/* 133 */
/*!*********************************************************!*\
  !*** ./node_modules/core-js/internals/engine-is-ios.js ***!
  \*********************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

var userAgent = __webpack_require__(/*! ../internals/engine-user-agent */ 104);

module.exports = /(iphone|ipod|ipad).*applewebkit/i.test(userAgent);


/***/ }),
/* 134 */
/*!******************************************************************************!*\
  !*** ./node_modules/core-js/internals/fix-regexp-well-known-symbol-logic.js ***!
  \******************************************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

// TODO: Remove from `core-js@4` since it's moved to entry points
__webpack_require__(/*! ../modules/es.regexp.exec */ 45);
var redefine = __webpack_require__(/*! ../internals/redefine */ 53);
var fails = __webpack_require__(/*! ../internals/fails */ 36);
var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ 32);
var regexpExec = __webpack_require__(/*! ../internals/regexp-exec */ 110);
var createNonEnumerableProperty = __webpack_require__(/*! ../internals/create-non-enumerable-property */ 49);

var SPECIES = wellKnownSymbol('species');

var REPLACE_SUPPORTS_NAMED_GROUPS = !fails(function () {
  // #replace needs built-in support for named groups.
  // #match works fine because it just return the exec results, even if it has
  // a "grops" property.
  var re = /./;
  re.exec = function () {
    var result = [];
    result.groups = { a: '7' };
    return result;
  };
  return ''.replace(re, '$<a>') !== '7';
});

// IE <= 11 replaces $0 with the whole match, as if it was $&
// https://stackoverflow.com/questions/6024666/getting-ie-to-replace-a-regex-with-the-literal-string-0
var REPLACE_KEEPS_$0 = (function () {
  return 'a'.replace(/./, '$0') === '$0';
})();

var REPLACE = wellKnownSymbol('replace');
// Safari <= 13.0.3(?) substitutes nth capture where n>m with an empty string
var REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE = (function () {
  if (/./[REPLACE]) {
    return /./[REPLACE]('a', '$0') === '';
  }
  return false;
})();

// Chrome 51 has a buggy "split" implementation when RegExp#exec !== nativeExec
// Weex JS has frozen built-in prototypes, so use try / catch wrapper
var SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = !fails(function () {
  var re = /(?:)/;
  var originalExec = re.exec;
  re.exec = function () { return originalExec.apply(this, arguments); };
  var result = 'ab'.split(re);
  return result.length !== 2 || result[0] !== 'a' || result[1] !== 'b';
});

module.exports = function (KEY, length, exec, sham) {
  var SYMBOL = wellKnownSymbol(KEY);

  var DELEGATES_TO_SYMBOL = !fails(function () {
    // String methods call symbol-named RegEp methods
    var O = {};
    O[SYMBOL] = function () { return 7; };
    return ''[KEY](O) != 7;
  });

  var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL && !fails(function () {
    // Symbol-named RegExp methods call .exec
    var execCalled = false;
    var re = /a/;

    if (KEY === 'split') {
      // We can't use real regex here since it causes deoptimization
      // and serious performance degradation in V8
      // https://github.com/zloirock/core-js/issues/306
      re = {};
      // RegExp[@@split] doesn't call the regex's exec method, but first creates
      // a new one. We need to return the patched regex when creating the new one.
      re.constructor = {};
      re.constructor[SPECIES] = function () { return re; };
      re.flags = '';
      re[SYMBOL] = /./[SYMBOL];
    }

    re.exec = function () { execCalled = true; return null; };

    re[SYMBOL]('');
    return !execCalled;
  });

  if (
    !DELEGATES_TO_SYMBOL ||
    !DELEGATES_TO_EXEC ||
    (KEY === 'replace' && !(
      REPLACE_SUPPORTS_NAMED_GROUPS &&
      REPLACE_KEEPS_$0 &&
      !REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE
    )) ||
    (KEY === 'split' && !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC)
  ) {
    var nativeRegExpMethod = /./[SYMBOL];
    var methods = exec(SYMBOL, ''[KEY], function (nativeMethod, regexp, str, arg2, forceStringMethod) {
      if (regexp.exec === regexpExec) {
        if (DELEGATES_TO_SYMBOL && !forceStringMethod) {
          // The native String method already delegates to @@method (this
          // polyfilled function), leasing to infinite recursion.
          // We avoid it by directly calling the native @@method method.
          return { done: true, value: nativeRegExpMethod.call(regexp, str, arg2) };
        }
        return { done: true, value: nativeMethod.call(str, regexp, arg2) };
      }
      return { done: false };
    }, {
      REPLACE_KEEPS_$0: REPLACE_KEEPS_$0,
      REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE: REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE
    });
    var stringMethod = methods[0];
    var regexMethod = methods[1];

    redefine(String.prototype, KEY, stringMethod);
    redefine(RegExp.prototype, SYMBOL, length == 2
      // 21.2.5.8 RegExp.prototype[@@replace](string, replaceValue)
      // 21.2.5.11 RegExp.prototype[@@split](string, limit)
      ? function (string, arg) { return regexMethod.call(string, this, arg); }
      // 21.2.5.6 RegExp.prototype[@@match](string)
      // 21.2.5.9 RegExp.prototype[@@search](string)
      : function (string) { return regexMethod.call(string, this); }
    );
  }

  if (sham) createNonEnumerableProperty(RegExp.prototype[SYMBOL], 'sham', true);
};


/***/ }),
/* 135 */
/*!****************************************************************!*\
  !*** ./node_modules/core-js/internals/regexp-exec-abstract.js ***!
  \****************************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

var classof = __webpack_require__(/*! ./classof-raw */ 50);
var regexpExec = __webpack_require__(/*! ./regexp-exec */ 110);

// `RegExpExec` abstract operation
// https://tc39.github.io/ecma262/#sec-regexpexec
module.exports = function (R, S) {
  var exec = R.exec;
  if (typeof exec === 'function') {
    var result = exec.call(R, S);
    if (typeof result !== 'object') {
      throw TypeError('RegExp exec method returned something other than an Object or null');
    }
    return result;
  }

  if (classof(R) !== 'RegExp') {
    throw TypeError('RegExp#exec called on incompatible receiver');
  }

  return regexpExec.call(R, S);
};



/***/ }),
/* 136 */
/*!***********************************************************************!*\
  !*** ./node_modules/core-js-pure/internals/object-define-property.js ***!
  \***********************************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ 82);
var IE8_DOM_DEFINE = __webpack_require__(/*! ../internals/ie8-dom-define */ 236);
var anObject = __webpack_require__(/*! ../internals/an-object */ 154);
var toPrimitive = __webpack_require__(/*! ../internals/to-primitive */ 200);

var nativeDefineProperty = Object.defineProperty;

// `Object.defineProperty` method
// https://tc39.github.io/ecma262/#sec-object.defineproperty
exports.f = DESCRIPTORS ? nativeDefineProperty : function defineProperty(O, P, Attributes) {
  anObject(O);
  P = toPrimitive(P, true);
  anObject(Attributes);
  if (IE8_DOM_DEFINE) try {
    return nativeDefineProperty(O, P, Attributes);
  } catch (error) { /* empty */ }
  if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported');
  if ('value' in Attributes) O[P] = Attributes.value;
  return O;
};


/***/ }),
/* 137 */
/*!*************************************!*\
  !*** ./dev/Knoin/AbstractScreen.js ***!
  \*************************************/
/*! exports provided: AbstractScreen */
/*! exports used: AbstractScreen */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return AbstractScreen; });
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/for-each */ 69);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_bind__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/bind */ 26);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_bind__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_bind__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _babel_runtime_corejs3_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/esm/defineProperty */ 17);
/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! _ */ 3);
/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(___WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var crossroads__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! crossroads */ 161);
/* harmony import */ var crossroads__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(crossroads__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var Common_Utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! Common/Utils */ 2);






var AbstractScreen =
/*#__PURE__*/
function () {
  function AbstractScreen(screenName, viewModels) {
    if (viewModels === void 0) {
      viewModels = [];
    }

    Object(_babel_runtime_corejs3_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(this, "oCross", null);

    Object(_babel_runtime_corejs3_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(this, "sScreenName", void 0);

    Object(_babel_runtime_corejs3_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(this, "aViewModels", void 0);

    this.sScreenName = screenName;
    this.aViewModels = Object(Common_Utils__WEBPACK_IMPORTED_MODULE_5__["isArray"])(viewModels) ? viewModels : [];
  }
  /**
   * @returns {Array}
   */


  var _proto = AbstractScreen.prototype;

  _proto.viewModels = function viewModels() {
    return this.aViewModels;
  }
  /**
   * @returns {string}
   */
  ;

  _proto.screenName = function screenName() {
    return this.sScreenName;
  }
  /**
   * @returns {?Array)}
   */
  ;

  _proto.routes = function routes() {
    return null;
  }
  /**
   * @returns {?Object}
   */
  ;

  _proto.__cross = function __cross() {
    return this.oCross;
  }
  /**
   * @returns {void}
   */
  ;

  _proto.__start = function __start() {
    var route = null,
        fMatcher = null;
    var routes = this.routes();

    if (Object(Common_Utils__WEBPACK_IMPORTED_MODULE_5__["isNonEmptyArray"])(routes)) {
      fMatcher = _babel_runtime_corejs3_core_js_stable_instance_bind__WEBPACK_IMPORTED_MODULE_1___default()(___WEBPACK_IMPORTED_MODULE_3___default.a).call(___WEBPACK_IMPORTED_MODULE_3___default.a, this.onRoute || Common_Utils__WEBPACK_IMPORTED_MODULE_5__["noop"], this);
      route = crossroads__WEBPACK_IMPORTED_MODULE_4___default.a.create();

      _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_0___default()(routes).call(routes, function (item) {
        if (item && route) {
          route.addRoute(item[0], fMatcher).rules = item[1];
        }
      });

      this.oCross = route;
    }
  };

  return AbstractScreen;
}();

/***/ }),
/* 138 */
/*!*****************************************************************************!*\
  !*** ./node_modules/@babel/runtime-corejs3/core-js-stable/instance/trim.js ***!
  \*****************************************************************************/
/*! no static exports found */
/*! exports used: default */
/***/ (function(module, exports, __webpack_require__) {

module.exports = __webpack_require__(/*! core-js-pure/stable/instance/trim */ 333);

/***/ }),
/* 139 */
/*!*****************************!*\
  !*** external "window.ssm" ***!
  \*****************************/
/*! no static exports found */
/*! exports used: default */
/***/ (function(module, exports) {

module.exports = window.ssm;

/***/ }),
/* 140 */
/*!****************************************************************!*\
  !*** ./node_modules/core-js/internals/object-keys-internal.js ***!
  \****************************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

var has = __webpack_require__(/*! ../internals/has */ 42);
var toIndexedObject = __webpack_require__(/*! ../internals/to-indexed-object */ 71);
var indexOf = __webpack_require__(/*! ../internals/array-includes */ 165).indexOf;
var hiddenKeys = __webpack_require__(/*! ../internals/hidden-keys */ 102);

module.exports = function (object, names) {
  var O = toIndexedObject(object);
  var i = 0;
  var result = [];
  var key;
  for (key in O) !has(hiddenKeys, key) && has(O, key) && result.push(key);
  // Don't enum bug & hidden keys
  while (names.length > i) if (has(O, key = names[i++])) {
    ~indexOf(result, key) || result.push(key);
  }
  return result;
};


/***/ }),
/* 141 */
/*!************************************************!*\
  !*** ./node_modules/core-js/internals/html.js ***!
  \************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

var getBuiltIn = __webpack_require__(/*! ../internals/get-built-in */ 59);

module.exports = getBuiltIn('document', 'documentElement');


/***/ }),
/* 142 */
/*!***************************************************!*\
  !*** ./node_modules/core-js/internals/iterate.js ***!
  \***************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

var anObject = __webpack_require__(/*! ../internals/an-object */ 37);
var isArrayIteratorMethod = __webpack_require__(/*! ../internals/is-array-iterator-method */ 190);
var toLength = __webpack_require__(/*! ../internals/to-length */ 72);
var bind = __webpack_require__(/*! ../internals/function-bind-context */ 103);
var getIteratorMethod = __webpack_require__(/*! ../internals/get-iterator-method */ 191);
var callWithSafeIterationClosing = __webpack_require__(/*! ../internals/call-with-safe-iteration-closing */ 192);

var Result = function (stopped, result) {
  this.stopped = stopped;
  this.result = result;
};

var iterate = module.exports = function (iterable, fn, that, AS_ENTRIES, IS_ITERATOR) {
  var boundFunction = bind(fn, that, AS_ENTRIES ? 2 : 1);
  var iterator, iterFn, index, length, result, next, step;

  if (IS_ITERATOR) {
    iterator = iterable;
  } else {
    iterFn = getIteratorMethod(iterable);
    if (typeof iterFn != 'function') throw TypeError('Target is not iterable');
    // optimisation for array iterators
    if (isArrayIteratorMethod(iterFn)) {
      for (index = 0, length = toLength(iterable.length); length > index; index++) {
        result = AS_ENTRIES
          ? boundFunction(anObject(step = iterable[index])[0], step[1])
          : boundFunction(iterable[index]);
        if (result && result instanceof Result) return result;
      } return new Result(false);
    }
    iterator = iterFn.call(iterable);
  }

  next = iterator.next;
  while (!(step = next.call(iterator)).done) {
    result = callWithSafeIterationClosing(iterator, boundFunction, step.value, AS_ENTRIES);
    if (typeof result == 'object' && result && result instanceof Result) return result;
  } return new Result(false);
};

iterate.stop = function (result) {
  return new Result(true, result);
};


/***/ }),
/* 143 */
/*!***************************************************************!*\
  !*** ./node_modules/core-js/internals/species-constructor.js ***!
  \***************************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

var anObject = __webpack_require__(/*! ../internals/an-object */ 37);
var aFunction = __webpack_require__(/*! ../internals/a-function */ 66);
var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ 32);

var SPECIES = wellKnownSymbol('species');

// `SpeciesConstructor` abstract operation
// https://tc39.github.io/ecma262/#sec-speciesconstructor
module.exports = function (O, defaultConstructor) {
  var C = anObject(O).constructor;
  var S;
  return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? defaultConstructor : aFunction(S);
};


/***/ }),
/* 144 */
/*!***************************************************!*\
  !*** ./node_modules/core-js/internals/perform.js ***!
  \***************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports) {

module.exports = function (exec) {
  try {
    return { error: false, value: exec() };
  } catch (error) {
    return { error: true, value: error };
  }
};


/***/ }),
/* 145 */
/*!********************************************************************!*\
  !*** ./node_modules/core-js-pure/internals/sloppy-array-method.js ***!
  \********************************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var fails = __webpack_require__(/*! ../internals/fails */ 57);

module.exports = function (METHOD_NAME, argument) {
  var method = [][METHOD_NAME];
  return !method || !fails(function () {
    // eslint-disable-next-line no-useless-call,no-throw-literal
    method.call(null, argument || function () { throw 1; }, 1);
  });
};


/***/ }),
/* 146 */
/*!*********************************!*\
  !*** ./dev/Storage/RainLoop.js ***!
  \*********************************/
/*! exports provided: isStorageSupported, getHash, setHash, clearHash, checkTimestamp */
/*! exports used: checkTimestamp, clearHash, getHash, isStorageSupported, setHash */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return isStorageSupported; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return getHash; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return setHash; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return clearHash; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return checkTimestamp; });
/* harmony import */ var core_js_modules_es_function_name__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.function.name */ 51);
/* harmony import */ var core_js_modules_es_function_name__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_function_name__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var core_js_modules_es_object_to_string__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es.object.to-string */ 63);
/* harmony import */ var core_js_modules_es_object_to_string__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_to_string__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var core_js_modules_es_regexp_to_string__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core-js/modules/es.regexp.to-string */ 111);
/* harmony import */ var core_js_modules_es_regexp_to_string__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_regexp_to_string__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var core_js_modules_web_timers__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! core-js/modules/web.timers */ 67);
/* harmony import */ var core_js_modules_web_timers__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_timers__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var window__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! window */ 4);
/* harmony import */ var window__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(window__WEBPACK_IMPORTED_MODULE_4__);





var STORAGE_KEY = '__rlA';
var TIME_KEY = '__rlT';
/**
 * @param {string} storageName
 * @returns {boolean}
 */

function isStorageSupported(storageName) {
  var storageIsAvailable = false;

  try {
    // at: window[storageName] firefox throws SecurityError: The operation is insecure. when in iframe
    storageIsAvailable = storageName in window__WEBPACK_IMPORTED_MODULE_4___default.a && window__WEBPACK_IMPORTED_MODULE_4___default.a[storageName] && window__WEBPACK_IMPORTED_MODULE_4___default.a[storageName].setItem;
  } catch (e) {} // eslint-disable-line no-empty


  if (storageIsAvailable) {
    var s = window__WEBPACK_IMPORTED_MODULE_4___default.a[storageName],
        key = 'testLocalStorage_' + window__WEBPACK_IMPORTED_MODULE_4___default.a.Math.random();

    try {
      s.setItem(key, key);

      if (key === s.getItem(key)) {
        s.removeItem(key);
        return true;
      }
    } catch (e) {} // eslint-disable-line no-empty

  }

  return false;
}
var SESS_STORAGE = isStorageSupported('sessionStorage') ? window__WEBPACK_IMPORTED_MODULE_4___default.a.sessionStorage || null : null;
var WIN_STORAGE = window__WEBPACK_IMPORTED_MODULE_4___default.a.top || window__WEBPACK_IMPORTED_MODULE_4___default.a || null;

var __get = function __get(key) {
  var result = null;

  if (SESS_STORAGE) {
    result = SESS_STORAGE.getItem(key) || null;
  } else if (WIN_STORAGE && window__WEBPACK_IMPORTED_MODULE_4___default.a.JSON) {
    var data = WIN_STORAGE.name && '{' === WIN_STORAGE.name.toString().substr(0, 1) ? window__WEBPACK_IMPORTED_MODULE_4___default.a.JSON.parse(WIN_STORAGE.name.toString()) : null;
    result = data ? data[key] || null : null;
  }

  return result;
};

var __set = function __set(key, value) {
  if (SESS_STORAGE) {
    SESS_STORAGE.setItem(key, value);
  } else if (WIN_STORAGE && window__WEBPACK_IMPORTED_MODULE_4___default.a.JSON) {
    var data = WIN_STORAGE.name && '{' === WIN_STORAGE.name.toString().substr(0, 1) ? window__WEBPACK_IMPORTED_MODULE_4___default.a.JSON.parse(WIN_STORAGE.name.toString()) : null;
    data = data || {};
    data[key] = value;
    WIN_STORAGE.name = window__WEBPACK_IMPORTED_MODULE_4___default.a.JSON.stringify(data);
  }
};

var timestamp = function timestamp() {
  return window__WEBPACK_IMPORTED_MODULE_4___default.a.Math.round(new window__WEBPACK_IMPORTED_MODULE_4___default.a.Date().getTime() / 1000);
};

var setTimestamp = function setTimestamp() {
  return __set(TIME_KEY, timestamp());
};

var getTimestamp = function getTimestamp() {
  var time = __get(TIME_KEY, 0);

  return time ? window__WEBPACK_IMPORTED_MODULE_4___default.a.parseInt(time, 10) || 0 : 0;
};
/**
 * @returns {string}
 */


function getHash() {
  return __get(STORAGE_KEY);
}
/**
 * @returns {void}
 */

function setHash() {
  var key = 'AuthAccountHash',
      appData = window__WEBPACK_IMPORTED_MODULE_4___default.a.__rlah_data();

  __set(STORAGE_KEY, appData && appData[key] ? appData[key] : '');

  setTimestamp();
}
/**
 * @returns {void}
 */

function clearHash() {
  __set(STORAGE_KEY, '');

  setTimestamp();
}
/**
 * @returns {boolean}
 */

function checkTimestamp() {
  if (timestamp() > getTimestamp() + 1000 * 60 * 60) {
    // 60m
    clearHash();
    return true;
  }

  return false;
} // init section

window__WEBPACK_IMPORTED_MODULE_4___default.a.setInterval(setTimestamp, 1000 * 60); // 1m

/***/ }),
/* 147 */,
/* 148 */
/*!************************************************!*\
  !*** ./node_modules/core-js/internals/path.js ***!
  \************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

var global = __webpack_require__(/*! ../internals/global */ 27);

module.exports = global;


/***/ }),
/* 149 */
/*!*********************************************************!*\
  !*** ./node_modules/core-js/internals/object-create.js ***!
  \*********************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

var anObject = __webpack_require__(/*! ../internals/an-object */ 37);
var defineProperties = __webpack_require__(/*! ../internals/object-define-properties */ 224);
var enumBugKeys = __webpack_require__(/*! ../internals/enum-bug-keys */ 108);
var hiddenKeys = __webpack_require__(/*! ../internals/hidden-keys */ 102);
var html = __webpack_require__(/*! ../internals/html */ 141);
var documentCreateElement = __webpack_require__(/*! ../internals/document-create-element */ 101);
var sharedKey = __webpack_require__(/*! ../internals/shared-key */ 107);

var GT = '>';
var LT = '<';
var PROTOTYPE = 'prototype';
var SCRIPT = 'script';
var IE_PROTO = sharedKey('IE_PROTO');

var EmptyConstructor = function () { /* empty */ };

var scriptTag = function (content) {
  return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;
};

// Create object with fake `null` prototype: use ActiveX Object with cleared prototype
var NullProtoObjectViaActiveX = function (activeXDocument) {
  activeXDocument.write(scriptTag(''));
  activeXDocument.close();
  var temp = activeXDocument.parentWindow.Object;
  activeXDocument = null; // avoid memory leak
  return temp;
};

// Create object with fake `null` prototype: use iframe Object with cleared prototype
var NullProtoObjectViaIFrame = function () {
  // Thrash, waste and sodomy: IE GC bug
  var iframe = documentCreateElement('iframe');
  var JS = 'java' + SCRIPT + ':';
  var iframeDocument;
  iframe.style.display = 'none';
  html.appendChild(iframe);
  // https://github.com/zloirock/core-js/issues/475
  iframe.src = String(JS);
  iframeDocument = iframe.contentWindow.document;
  iframeDocument.open();
  iframeDocument.write(scriptTag('document.F=Object'));
  iframeDocument.close();
  return iframeDocument.F;
};

// Check for document.domain and active x support
// No need to use active x approach when document.domain is not set
// see https://github.com/es-shims/es5-shim/issues/150
// variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346
// avoid IE GC bug
var activeXDocument;
var NullProtoObject = function () {
  try {
    /* global ActiveXObject */
    activeXDocument = document.domain && new ActiveXObject('htmlfile');
  } catch (error) { /* ignore */ }
  NullProtoObject = activeXDocument ? NullProtoObjectViaActiveX(activeXDocument) : NullProtoObjectViaIFrame();
  var length = enumBugKeys.length;
  while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];
  return NullProtoObject();
};

hiddenKeys[IE_PROTO] = true;

// `Object.create` method
// https://tc39.github.io/ecma262/#sec-object.create
module.exports = Object.create || function create(O, Properties) {
  var result;
  if (O !== null) {
    EmptyConstructor[PROTOTYPE] = anObject(O);
    result = new EmptyConstructor();
    EmptyConstructor[PROTOTYPE] = null;
    // add "__proto__" for Object.getPrototypeOf polyfill
    result[IE_PROTO] = O;
  } else result = NullProtoObject();
  return Properties === undefined ? result : defineProperties(result, Properties);
};


/***/ }),
/* 150 */
/*!*******************************************************************!*\
  !*** ./node_modules/core-js/internals/object-get-prototype-of.js ***!
  \*******************************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

var has = __webpack_require__(/*! ../internals/has */ 42);
var toObject = __webpack_require__(/*! ../internals/to-object */ 119);
var sharedKey = __webpack_require__(/*! ../internals/shared-key */ 107);
var CORRECT_PROTOTYPE_GETTER = __webpack_require__(/*! ../internals/correct-prototype-getter */ 228);

var IE_PROTO = sharedKey('IE_PROTO');
var ObjectPrototype = Object.prototype;

// `Object.getPrototypeOf` method
// https://tc39.github.io/ecma262/#sec-object.getprototypeof
module.exports = CORRECT_PROTOTYPE_GETTER ? Object.getPrototypeOf : function (O) {
  O = toObject(O);
  if (has(O, IE_PROTO)) return O[IE_PROTO];
  if (typeof O.constructor == 'function' && O instanceof O.constructor) {
    return O.constructor.prototype;
  } return O instanceof Object ? ObjectPrototype : null;
};


/***/ }),
/* 151 */
/*!*************************************************************!*\
  !*** ./node_modules/core-js/internals/engine-v8-version.js ***!
  \*************************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

var global = __webpack_require__(/*! ../internals/global */ 27);
var userAgent = __webpack_require__(/*! ../internals/engine-user-agent */ 104);

var process = global.process;
var versions = process && process.versions;
var v8 = versions && versions.v8;
var match, version;

if (v8) {
  match = v8.split('.');
  version = match[0] + match[1];
} else if (userAgent) {
  match = userAgent.match(/Edge\/(\d+)/);
  if (!match || match[1] >= 74) {
    match = userAgent.match(/Chrome\/(\d+)/);
    if (match) version = match[1];
  }
}

module.exports = version && +version;


/***/ }),
/* 152 */
/*!****************************************************************!*\
  !*** ./node_modules/core-js/internals/advance-string-index.js ***!
  \****************************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var charAt = __webpack_require__(/*! ../internals/string-multibyte */ 185).charAt;

// `AdvanceStringIndex` abstract operation
// https://tc39.github.io/ecma262/#sec-advancestringindex
module.exports = function (S, index, unicode) {
  return index + (unicode ? charAt(S, index).length : 1);
};


/***/ }),
/* 153 */
/*!***************************************************************************!*\
  !*** ./node_modules/core-js-pure/internals/create-property-descriptor.js ***!
  \***************************************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports) {

module.exports = function (bitmap, value) {
  return {
    enumerable: !(bitmap & 1),
    configurable: !(bitmap & 2),
    writable: !(bitmap & 4),
    value: value
  };
};


/***/ }),
/* 154 */
/*!**********************************************************!*\
  !*** ./node_modules/core-js-pure/internals/an-object.js ***!
  \**********************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

var isObject = __webpack_require__(/*! ../internals/is-object */ 76);

module.exports = function (it) {
  if (!isObject(it)) {
    throw TypeError(String(it) + ' is not an object');
  } return it;
};


/***/ }),
/* 155 */
/*!**********************************************************!*\
  !*** ./node_modules/core-js-pure/internals/iterators.js ***!
  \**********************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports) {

module.exports = {};


/***/ }),
/* 156 */
/*!*********************************************************!*\
  !*** ./node_modules/core-js-pure/internals/is-array.js ***!
  \*********************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

var classof = __webpack_require__(/*! ../internals/classof-raw */ 198);

// `IsArray` abstract operation
// https://tc39.github.io/ecma262/#sec-isarray
module.exports = Array.isArray || function isArray(arg) {
  return classof(arg) == 'Array';
};


/***/ }),
/* 157 */
/*!*********************************************************************************!*\
  !*** ./node_modules/core-js-pure/internals/array-method-has-species-support.js ***!
  \*********************************************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

var fails = __webpack_require__(/*! ../internals/fails */ 57);
var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ 68);

var SPECIES = wellKnownSymbol('species');

module.exports = function (METHOD_NAME) {
  return !fails(function () {
    var array = [];
    var constructor = array.constructor = {};
    constructor[SPECIES] = function () {
      return { foo: 1 };
    };
    return array[METHOD_NAME](Boolean).foo !== 1;
  });
};


/***/ }),
/* 158 */
/*!****************************************************************!*\
  !*** ./node_modules/core-js-pure/internals/array-iteration.js ***!
  \****************************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

var bind = __webpack_require__(/*! ../internals/bind-context */ 238);
var IndexedObject = __webpack_require__(/*! ../internals/indexed-object */ 197);
var toObject = __webpack_require__(/*! ../internals/to-object */ 121);
var toLength = __webpack_require__(/*! ../internals/to-length */ 112);
var arraySpeciesCreate = __webpack_require__(/*! ../internals/array-species-create */ 250);

var push = [].push;

// `Array.prototype.{ forEach, map, filter, some, every, find, findIndex }` methods implementation
var createMethod = function (TYPE) {
  var IS_MAP = TYPE == 1;
  var IS_FILTER = TYPE == 2;
  var IS_SOME = TYPE == 3;
  var IS_EVERY = TYPE == 4;
  var IS_FIND_INDEX = TYPE == 6;
  var NO_HOLES = TYPE == 5 || IS_FIND_INDEX;
  return function ($this, callbackfn, that, specificCreate) {
    var O = toObject($this);
    var self = IndexedObject(O);
    var boundFunction = bind(callbackfn, that, 3);
    var length = toLength(self.length);
    var index = 0;
    var create = specificCreate || arraySpeciesCreate;
    var target = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined;
    var value, result;
    for (;length > index; index++) if (NO_HOLES || index in self) {
      value = self[index];
      result = boundFunction(value, index, O);
      if (TYPE) {
        if (IS_MAP) target[index] = result; // map
        else if (result) switch (TYPE) {
          case 3: return true;              // some
          case 5: return value;             // find
          case 6: return index;             // findIndex
          case 2: push.call(target, value); // filter
        } else if (IS_EVERY) return false;  // every
      }
    }
    return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target;
  };
};

module.exports = {
  // `Array.prototype.forEach` method
  // https://tc39.github.io/ecma262/#sec-array.prototype.foreach
  forEach: createMethod(0),
  // `Array.prototype.map` method
  // https://tc39.github.io/ecma262/#sec-array.prototype.map
  map: createMethod(1),
  // `Array.prototype.filter` method
  // https://tc39.github.io/ecma262/#sec-array.prototype.filter
  filter: createMethod(2),
  // `Array.prototype.some` method
  // https://tc39.github.io/ecma262/#sec-array.prototype.some
  some: createMethod(3),
  // `Array.prototype.every` method
  // https://tc39.github.io/ecma262/#sec-array.prototype.every
  every: createMethod(4),
  // `Array.prototype.find` method
  // https://tc39.github.io/ecma262/#sec-array.prototype.find
  find: createMethod(5),
  // `Array.prototype.findIndex` method
  // https://tc39.github.io/ecma262/#sec-array.prototype.findIndex
  findIndex: createMethod(6)
};


/***/ }),
/* 159 */
/*!*******************************************************************************!*\
  !*** ./node_modules/@babel/runtime-corejs3/core-js-stable/instance/concat.js ***!
  \*******************************************************************************/
/*! no static exports found */
/*! exports used: default */
/***/ (function(module, exports, __webpack_require__) {

module.exports = __webpack_require__(/*! core-js-pure/stable/instance/concat */ 311);

/***/ }),
/* 160 */
/*!*******************************************************************************!*\
  !*** ./node_modules/@babel/runtime-corejs3/core-js/object/define-property.js ***!
  \*******************************************************************************/
/*! no static exports found */
/*! exports used: default */
/***/ (function(module, exports, __webpack_require__) {

module.exports = __webpack_require__(/*! core-js-pure/features/object/define-property */ 344);

/***/ }),
/* 161 */
/*!************************************!*\
  !*** external "window.crossroads" ***!
  \************************************/
/*! no static exports found */
/*! exports used: default */
/***/ (function(module, exports) {

module.exports = window.crossroads;

/***/ }),
/* 162 */
/*!*******************************************!*\
  !*** ./dev/Component/AbstractCheckbox.js ***!
  \*******************************************/
/*! exports provided: AbstractCheckbox, default */
/*! exports used: AbstractCheckbox */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return AbstractCheckbox; });
/* unused harmony export default */
/* harmony import */ var _babel_runtime_corejs3_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/esm/inheritsLoose */ 10);
/* harmony import */ var ko__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ko */ 1);
/* harmony import */ var Common_Utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! Common/Utils */ 2);
/* harmony import */ var Component_Abstract__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! Component/Abstract */ 35);





var AbstractCheckbox =
/*#__PURE__*/
function (_AbstractComponent) {
  Object(_babel_runtime_corejs3_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(AbstractCheckbox, _AbstractComponent);

  /**
   * @param {Object} params = {}
   */
  function AbstractCheckbox(params) {
    var _this;

    if (params === void 0) {
      params = {};
    }

    _this = _AbstractComponent.call(this) || this;
    _this.value = params.value;

    if (Object(Common_Utils__WEBPACK_IMPORTED_MODULE_2__["isUnd"])(_this.value) || !_this.value.subscribe) {
      _this.value = ko__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"].observable(Object(Common_Utils__WEBPACK_IMPORTED_MODULE_2__["isUnd"])(_this.value) ? false : !!_this.value);
    }

    _this.enable = params.enable;

    if (Object(Common_Utils__WEBPACK_IMPORTED_MODULE_2__["isUnd"])(_this.enable) || !_this.enable.subscribe) {
      _this.enable = ko__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"].observable(Object(Common_Utils__WEBPACK_IMPORTED_MODULE_2__["isUnd"])(_this.enable) ? true : !!_this.enable);
    }

    _this.disable = params.disable;

    if (Object(Common_Utils__WEBPACK_IMPORTED_MODULE_2__["isUnd"])(_this.disable) || !_this.disable.subscribe) {
      _this.disable = ko__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"].observable(Object(Common_Utils__WEBPACK_IMPORTED_MODULE_2__["isUnd"])(_this.disable) ? false : !!_this.disable);
    }

    _this.label = params.label || '';
    _this.inline = Object(Common_Utils__WEBPACK_IMPORTED_MODULE_2__["isUnd"])(params.inline) ? false : params.inline;
    _this.readOnly = Object(Common_Utils__WEBPACK_IMPORTED_MODULE_2__["isUnd"])(params.readOnly) ? false : !!params.readOnly;
    _this.inverted = Object(Common_Utils__WEBPACK_IMPORTED_MODULE_2__["isUnd"])(params.inverted) ? false : !!params.inverted;
    _this.labeled = !Object(Common_Utils__WEBPACK_IMPORTED_MODULE_2__["isUnd"])(params.label);
    _this.labelAnimated = !!params.labelAnimated;
    return _this;
  }

  var _proto = AbstractCheckbox.prototype;

  _proto.click = function click() {
    if (!this.readOnly && this.enable() && !this.disable()) {
      this.value(!this.value());
    }
  };

  return AbstractCheckbox;
}(Component_Abstract__WEBPACK_IMPORTED_MODULE_3__[/* AbstractComponent */ "a"]);



/***/ }),
/* 163 */
/*!******************************************************************!*\
  !*** ./node_modules/emailjs-addressparser/dist/addressparser.js ***!
  \******************************************************************/
/*! no static exports found */
/*! exports used: default */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
  value: true
});

var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

exports.default = parse;

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

/**
 * Parses structured e-mail addresses from an address field
 *
 * Example:
 *
 *    "Name <address@domain>"
 *
 * will be converted to
 *
 *     [{name: "Name", address: "address@domain"}]
 *
 * @param {String} str Address field
 * @return {Array} An array of address objects
 */
function parse(str) {
  var tokenizer = new Tokenizer(str);
  var tokens = tokenizer.tokenize();

  var addresses = [];
  var address = [];
  var parsedAddresses = [];

  tokens.forEach(function (token) {
    if (token.type === 'operator' && (token.value === ',' || token.value === ';')) {
      if (address.length) {
        addresses.push(address);
      }
      address = [];
    } else {
      address.push(token);
    }
  });

  if (address.length) {
    addresses.push(address);
  }

  addresses.forEach(function (address) {
    address = _handleAddress(address);
    if (address.length) {
      parsedAddresses = parsedAddresses.concat(address);
    }
  });

  return parsedAddresses;
};

/**
 * Converts tokens for a single address into an address object
 *
 * @param {Array} tokens Tokens object
 * @return {Object} Address object
 */
function _handleAddress(tokens) {
  var isGroup = false;
  var state = 'text';
  var address = void 0;
  var addresses = [];
  var data = {
    address: [],
    comment: [],
    group: [],
    text: []

    // Filter out <addresses>, (comments) and regular text
  };for (var i = 0, len = tokens.length; i < len; i++) {
    var token = tokens[i];

    if (token.type === 'operator') {
      switch (token.value) {
        case '<':
          state = 'address';
          break;
        case '(':
          state = 'comment';
          break;
        case ':':
          state = 'group';
          isGroup = true;
          break;
        default:
          state = 'text';
      }
    } else {
      if (token.value) {
        data[state].push(token.value);
      }
    }
  }

  // If there is no text but a comment, replace the two
  if (!data.text.length && data.comment.length) {
    data.text = data.comment;
    data.comment = [];
  }

  if (isGroup) {
    // http://tools.ietf.org/html/rfc2822#appendix-A.1.3
    data.text = data.text.join(' ');
    addresses.push({
      name: data.text || address && address.name,
      group: data.group.length ? parse(data.group.join(',')) : []
    });
  } else {
    // If no address was found, try to detect one from regular text
    if (!data.address.length && data.text.length) {
      for (var _i = data.text.length - 1; _i >= 0; _i--) {
        if (data.text[_i].match(/^[^@\s]+@[^@\s]+$/)) {
          data.address = data.text.splice(_i, 1);
          break;
        }
      }

      var _regexHandler = function _regexHandler(address) {
        if (!data.address.length) {
          data.address = [address.trim()];
          return ' ';
        } else {
          return address;
        }
      };

      // still no address
      if (!data.address.length) {
        for (var _i2 = data.text.length - 1; _i2 >= 0; _i2--) {
          data.text[_i2] = data.text[_i2].replace(/\s*\b[^@\s]+@[^@\s]+\b\s*/, _regexHandler).trim();
          if (data.address.length) {
            break;
          }
        }
      }
    }

    // If there's still is no text but a comment exixts, replace the two
    if (!data.text.length && data.comment.length) {
      data.text = data.comment;
      data.comment = [];
    }

    // Keep only the first address occurence, push others to regular text
    if (data.address.length > 1) {
      data.text = data.text.concat(data.address.splice(1));
    }

    // Join values with spaces
    data.text = data.text.join(' ');
    data.address = data.address.join(' ');

    if (!data.address && isGroup) {
      return [];
    } else {
      address = {
        address: data.address || data.text || '',
        name: data.text || data.address || ''
      };

      if (address.address === address.name) {
        if ((address.address || '').match(/@/)) {
          address.name = '';
        } else {
          address.address = '';
        }
      }

      addresses.push(address);
    }
  }

  return addresses;
};

/*
 * Operator tokens and which tokens are expected to end the sequence
 */
var OPERATORS = {
  '"': '"',
  '(': ')',
  '<': '>',
  ',': '',
  // Groups are ended by semicolons
  ':': ';',
  // Semicolons are not a legal delimiter per the RFC2822 grammar other
  // than for terminating a group, but they are also not valid for any
  // other use in this context.  Given that some mail clients have
  // historically allowed the semicolon as a delimiter equivalent to the
  // comma in their UI, it makes sense to treat them the same as a comma
  // when used outside of a group.
  ';': ''

  /**
   * Creates a Tokenizer object for tokenizing address field strings
   *
   * @constructor
   * @param {String} str Address field string
   */
};
var Tokenizer = function () {
  function Tokenizer(str) {
    _classCallCheck(this, Tokenizer);

    this.str = (str || '').toString();
    this.operatorCurrent = '';
    this.operatorExpecting = '';
    this.node = null;
    this.escaped = false;
    this.list = [];
  }

  /**
   * Tokenizes the original input string
   *
   * @return {Array} An array of operator|text tokens
   */


  _createClass(Tokenizer, [{
    key: 'tokenize',
    value: function tokenize() {
      var chr = void 0;
      var list = [];
      for (var i = 0, len = this.str.length; i < len; i++) {
        chr = this.str.charAt(i);
        this.checkChar(chr);
      }

      this.list.forEach(function (node) {
        node.value = (node.value || '').toString().trim();
        if (node.value) {
          list.push(node);
        }
      });

      return list;
    }

    /**
     * Checks if a character is an operator or text and acts accordingly
     *
     * @param {String} chr Character from the address field
     */

  }, {
    key: 'checkChar',
    value: function checkChar(chr) {
      if ((chr in OPERATORS || chr === '\\') && this.escaped) {
        this.escaped = false;
      } else if (this.operatorExpecting && chr === this.operatorExpecting) {
        this.node = {
          type: 'operator',
          value: chr
        };
        this.list.push(this.node);
        this.node = null;
        this.operatorExpecting = '';
        this.escaped = false;
        return;
      } else if (!this.operatorExpecting && chr in OPERATORS) {
        this.node = {
          type: 'operator',
          value: chr
        };
        this.list.push(this.node);
        this.node = null;
        this.operatorExpecting = OPERATORS[chr];
        this.escaped = false;
        return;
      }

      if (!this.escaped && chr === '\\') {
        this.escaped = true;
        return;
      }

      if (!this.node) {
        this.node = {
          type: 'text',
          value: ''
        };
        this.list.push(this.node);
      }

      if (this.escaped && chr !== '\\') {
        this.node.value += '\\';
      }

      this.node.value += chr;
      this.escaped = false;
    }
  }]);

  return Tokenizer;
}();
//# sourceMappingURL=data:application/json;charset=utf-8;base64,[encoded data, 17404 characters]

/***/ }),
/* 164 */
/*!*************************************************************************!*\
  !*** ./node_modules/core-js/internals/object-property-is-enumerable.js ***!
  \*************************************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var nativePropertyIsEnumerable = {}.propertyIsEnumerable;
var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;

// Nashorn ~ JDK8 bug
var NASHORN_BUG = getOwnPropertyDescriptor && !nativePropertyIsEnumerable.call({ 1: 2 }, 1);

// `Object.prototype.propertyIsEnumerable` method implementation
// https://tc39.github.io/ecma262/#sec-object.prototype.propertyisenumerable
exports.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
  var descriptor = getOwnPropertyDescriptor(this, V);
  return !!descriptor && descriptor.enumerable;
} : nativePropertyIsEnumerable;


/***/ }),
/* 165 */
/*!**********************************************************!*\
  !*** ./node_modules/core-js/internals/array-includes.js ***!
  \**********************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

var toIndexedObject = __webpack_require__(/*! ../internals/to-indexed-object */ 71);
var toLength = __webpack_require__(/*! ../internals/to-length */ 72);
var toAbsoluteIndex = __webpack_require__(/*! ../internals/to-absolute-index */ 182);

// `Array.prototype.{ indexOf, includes }` methods implementation
var createMethod = function (IS_INCLUDES) {
  return function ($this, el, fromIndex) {
    var O = toIndexedObject($this);
    var length = toLength(O.length);
    var index = toAbsoluteIndex(fromIndex, length);
    var value;
    // Array#includes uses SameValueZero equality algorithm
    // eslint-disable-next-line no-self-compare
    if (IS_INCLUDES && el != el) while (length > index) {
      value = O[index++];
      // eslint-disable-next-line no-self-compare
      if (value != value) return true;
    // Array#indexOf ignores holes, Array#includes - not
    } else for (;length > index; index++) {
      if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
    } return !IS_INCLUDES && -1;
  };
};

module.exports = {
  // `Array.prototype.includes` method
  // https://tc39.github.io/ecma262/#sec-array.prototype.includes
  includes: createMethod(true),
  // `Array.prototype.indexOf` method
  // https://tc39.github.io/ecma262/#sec-array.prototype.indexof
  indexOf: createMethod(false)
};


/***/ }),
/* 166 */
/*!***************************************************************************!*\
  !*** ./node_modules/core-js/internals/object-get-own-property-symbols.js ***!
  \***************************************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports) {

exports.f = Object.getOwnPropertySymbols;


/***/ }),
/* 167 */
/*!**********************************************************!*\
  !*** ./node_modules/core-js/internals/iterators-core.js ***!
  \**********************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var getPrototypeOf = __webpack_require__(/*! ../internals/object-get-prototype-of */ 150);
var createNonEnumerableProperty = __webpack_require__(/*! ../internals/create-non-enumerable-property */ 49);
var has = __webpack_require__(/*! ../internals/has */ 42);
var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ 32);
var IS_PURE = __webpack_require__(/*! ../internals/is-pure */ 78);

var ITERATOR = wellKnownSymbol('iterator');
var BUGGY_SAFARI_ITERATORS = false;

var returnThis = function () { return this; };

// `%IteratorPrototype%` object
// https://tc39.github.io/ecma262/#sec-%iteratorprototype%-object
var IteratorPrototype, PrototypeOfArrayIteratorPrototype, arrayIterator;

if ([].keys) {
  arrayIterator = [].keys();
  // Safari 8 has buggy iterators w/o `next`
  if (!('next' in arrayIterator)) BUGGY_SAFARI_ITERATORS = true;
  else {
    PrototypeOfArrayIteratorPrototype = getPrototypeOf(getPrototypeOf(arrayIterator));
    if (PrototypeOfArrayIteratorPrototype !== Object.prototype) IteratorPrototype = PrototypeOfArrayIteratorPrototype;
  }
}

if (IteratorPrototype == undefined) IteratorPrototype = {};

// 25.1.2.1.1 %IteratorPrototype%[@@iterator]()
if (!IS_PURE && !has(IteratorPrototype, ITERATOR)) {
  createNonEnumerableProperty(IteratorPrototype, ITERATOR, returnThis);
}

module.exports = {
  IteratorPrototype: IteratorPrototype,
  BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS
};


/***/ }),
/* 168 */
/*!**********************************************************************!*\
  !*** ./node_modules/core-js/internals/native-promise-constructor.js ***!
  \**********************************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

var global = __webpack_require__(/*! ../internals/global */ 27);

module.exports = global.Promise;


/***/ }),
/* 169 */
/*!***********************************************************!*\
  !*** ./node_modules/core-js/internals/promise-resolve.js ***!
  \***********************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

var anObject = __webpack_require__(/*! ../internals/an-object */ 37);
var isObject = __webpack_require__(/*! ../internals/is-object */ 44);
var newPromiseCapability = __webpack_require__(/*! ../internals/new-promise-capability */ 105);

module.exports = function (C, x) {
  anObject(C);
  if (isObject(x) && x.constructor === C) return x;
  var promiseCapability = newPromiseCapability.f(C);
  var resolve = promiseCapability.resolve;
  resolve(x);
  return promiseCapability.promise;
};


/***/ }),
/* 170 */
/*!********************************************************!*\
  !*** ./node_modules/core-js/internals/regexp-flags.js ***!
  \********************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var anObject = __webpack_require__(/*! ../internals/an-object */ 37);

// `RegExp.prototype.flags` getter implementation
// https://tc39.github.io/ecma262/#sec-get-regexp.prototype.flags
module.exports = function () {
  var that = anObject(this);
  var result = '';
  if (that.global) result += 'g';
  if (that.ignoreCase) result += 'i';
  if (that.multiline) result += 'm';
  if (that.dotAll) result += 's';
  if (that.unicode) result += 'u';
  if (that.sticky) result += 'y';
  return result;
};


/***/ }),
/* 171 */
/*!*********************************************************!*\
  !*** ./node_modules/core-js/modules/es.string.split.js ***!
  \*********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var fixRegExpWellKnownSymbolLogic = __webpack_require__(/*! ../internals/fix-regexp-well-known-symbol-logic */ 134);
var isRegExp = __webpack_require__(/*! ../internals/is-regexp */ 226);
var anObject = __webpack_require__(/*! ../internals/an-object */ 37);
var requireObjectCoercible = __webpack_require__(/*! ../internals/require-object-coercible */ 55);
var speciesConstructor = __webpack_require__(/*! ../internals/species-constructor */ 143);
var advanceStringIndex = __webpack_require__(/*! ../internals/advance-string-index */ 152);
var toLength = __webpack_require__(/*! ../internals/to-length */ 72);
var callRegExpExec = __webpack_require__(/*! ../internals/regexp-exec-abstract */ 135);
var regexpExec = __webpack_require__(/*! ../internals/regexp-exec */ 110);
var fails = __webpack_require__(/*! ../internals/fails */ 36);

var arrayPush = [].push;
var min = Math.min;
var MAX_UINT32 = 0xFFFFFFFF;

// babel-minify transpiles RegExp('x', 'y') -> /x/y and it causes SyntaxError
var SUPPORTS_Y = !fails(function () { return !RegExp(MAX_UINT32, 'y'); });

// @@split logic
fixRegExpWellKnownSymbolLogic('split', 2, function (SPLIT, nativeSplit, maybeCallNative) {
  var internalSplit;
  if (
    'abbc'.split(/(b)*/)[1] == 'c' ||
    'test'.split(/(?:)/, -1).length != 4 ||
    'ab'.split(/(?:ab)*/).length != 2 ||
    '.'.split(/(.?)(.?)/).length != 4 ||
    '.'.split(/()()/).length > 1 ||
    ''.split(/.?/).length
  ) {
    // based on es5-shim implementation, need to rework it
    internalSplit = function (separator, limit) {
      var string = String(requireObjectCoercible(this));
      var lim = limit === undefined ? MAX_UINT32 : limit >>> 0;
      if (lim === 0) return [];
      if (separator === undefined) return [string];
      // If `separator` is not a regex, use native split
      if (!isRegExp(separator)) {
        return nativeSplit.call(string, separator, lim);
      }
      var output = [];
      var flags = (separator.ignoreCase ? 'i' : '') +
                  (separator.multiline ? 'm' : '') +
                  (separator.unicode ? 'u' : '') +
                  (separator.sticky ? 'y' : '');
      var lastLastIndex = 0;
      // Make `global` and avoid `lastIndex` issues by working with a copy
      var separatorCopy = new RegExp(separator.source, flags + 'g');
      var match, lastIndex, lastLength;
      while (match = regexpExec.call(separatorCopy, string)) {
        lastIndex = separatorCopy.lastIndex;
        if (lastIndex > lastLastIndex) {
          output.push(string.slice(lastLastIndex, match.index));
          if (match.length > 1 && match.index < string.length) arrayPush.apply(output, match.slice(1));
          lastLength = match[0].length;
          lastLastIndex = lastIndex;
          if (output.length >= lim) break;
        }
        if (separatorCopy.lastIndex === match.index) separatorCopy.lastIndex++; // Avoid an infinite loop
      }
      if (lastLastIndex === string.length) {
        if (lastLength || !separatorCopy.test('')) output.push('');
      } else output.push(string.slice(lastLastIndex));
      return output.length > lim ? output.slice(0, lim) : output;
    };
  // Chakra, V8
  } else if ('0'.split(undefined, 0).length) {
    internalSplit = function (separator, limit) {
      return separator === undefined && limit === 0 ? [] : nativeSplit.call(this, separator, limit);
    };
  } else internalSplit = nativeSplit;

  return [
    // `String.prototype.split` method
    // https://tc39.github.io/ecma262/#sec-string.prototype.split
    function split(separator, limit) {
      var O = requireObjectCoercible(this);
      var splitter = separator == undefined ? undefined : separator[SPLIT];
      return splitter !== undefined
        ? splitter.call(separator, O, limit)
        : internalSplit.call(String(O), separator, limit);
    },
    // `RegExp.prototype[@@split]` method
    // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@split
    //
    // NOTE: This cannot be properly polyfilled in engines that don't support
    // the 'y' flag.
    function (regexp, limit) {
      var res = maybeCallNative(internalSplit, regexp, this, limit, internalSplit !== nativeSplit);
      if (res.done) return res.value;

      var rx = anObject(regexp);
      var S = String(this);
      var C = speciesConstructor(rx, RegExp);

      var unicodeMatching = rx.unicode;
      var flags = (rx.ignoreCase ? 'i' : '') +
                  (rx.multiline ? 'm' : '') +
                  (rx.unicode ? 'u' : '') +
                  (SUPPORTS_Y ? 'y' : 'g');

      // ^(? + rx + ) is needed, in combination with some S slicing, to
      // simulate the 'y' flag.
      var splitter = new C(SUPPORTS_Y ? rx : '^(?:' + rx.source + ')', flags);
      var lim = limit === undefined ? MAX_UINT32 : limit >>> 0;
      if (lim === 0) return [];
      if (S.length === 0) return callRegExpExec(splitter, S) === null ? [S] : [];
      var p = 0;
      var q = 0;
      var A = [];
      while (q < S.length) {
        splitter.lastIndex = SUPPORTS_Y ? q : 0;
        var z = callRegExpExec(splitter, SUPPORTS_Y ? S : S.slice(q));
        var e;
        if (
          z === null ||
          (e = min(toLength(splitter.lastIndex + (SUPPORTS_Y ? 0 : q)), S.length)) === p
        ) {
          q = advanceStringIndex(S, q, unicodeMatching);
        } else {
          A.push(S.slice(p, q));
          if (A.length === lim) return A;
          for (var i = 1; i <= z.length - 1; i++) {
            A.push(z[i]);
            if (A.length === lim) return A;
          }
          q = p = e;
        }
      }
      A.push(S.slice(p));
      return A;
    }
  ];
}, !SUPPORTS_Y);


/***/ }),
/* 172 */
/*!********************************************************!*\
  !*** ./node_modules/core-js/modules/es.string.link.js ***!
  \********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var $ = __webpack_require__(/*! ../internals/export */ 48);
var createHTML = __webpack_require__(/*! ../internals/create-html */ 283);
var forcedStringHTMLMethod = __webpack_require__(/*! ../internals/string-html-forced */ 284);

// `String.prototype.link` method
// https://tc39.github.io/ecma262/#sec-string.prototype.link
$({ target: 'String', proto: true, forced: forcedStringHTMLMethod('link') }, {
  link: function link(url) {
    return createHTML(this, 'a', 'href', url);
  }
});


/***/ }),
/* 173 */
/*!***********************************************************!*\
  !*** ./node_modules/core-js-pure/internals/a-function.js ***!
  \***********************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports) {

module.exports = function (it) {
  if (typeof it != 'function') {
    throw TypeError(String(it) + ' is not a function');
  } return it;
};


/***/ }),
/* 174 */
/*!********************************************************!*\
  !*** ./node_modules/core-js-pure/internals/classof.js ***!
  \********************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

var classofRaw = __webpack_require__(/*! ../internals/classof-raw */ 198);
var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ 68);

var TO_STRING_TAG = wellKnownSymbol('toStringTag');
// ES3 wrong here
var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';

// fallback for IE11 Script Access Denied error
var tryGet = function (it, key) {
  try {
    return it[key];
  } catch (error) { /* empty */ }
};

// getting tag from ES6+ `Object.prototype.toString`
module.exports = function (it) {
  var O, tag, result;
  return it === undefined ? 'Undefined' : it === null ? 'Null'
    // @@toStringTag case
    : typeof (tag = tryGet(O = Object(it), TO_STRING_TAG)) == 'string' ? tag
    // builtinTag case
    : CORRECT_ARGUMENTS ? classofRaw(O)
    // ES3 arguments fallback
    : (result = classofRaw(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : result;
};


/***/ }),
/* 175 */
/*!*****************************!*\
  !*** external "window.Jua" ***!
  \*****************************/
/*! no static exports found */
/*! exports used: default */
/***/ (function(module, exports) {

module.exports = window.Jua;

/***/ }),
/* 176 */
/*!*************************************!*\
  !*** ./dev/Stores/User/Template.js ***!
  \*************************************/
/*! exports provided: default */
/*! exports used: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var core_js_modules_es_function_name__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.function.name */ 51);
/* harmony import */ var core_js_modules_es_function_name__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_function_name__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/map */ 18);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var ko__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ko */ 1);
/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! _ */ 3);
/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(___WEBPACK_IMPORTED_MODULE_3__);



 // import Remote from 'Remote/User/Ajax';

var TemplateUserStore =
/*#__PURE__*/
function () {
  function TemplateUserStore() {
    this.templates = ko__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"].observableArray([]);
    this.templates.loading = ko__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"].observable(false).extend({
      throttle: 100
    });
    this.templatesNames = ko__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"].observableArray([]).extend({
      throttle: 1000
    });
    this.templatesNames.skipFirst = true;
    this.subscribers();
  }

  var _proto = TemplateUserStore.prototype;

  _proto.subscribers = function subscribers() {
    var _this = this;

    this.templates.subscribe(function (list) {
      _this.templatesNames(___WEBPACK_IMPORTED_MODULE_3___default.a.compact(_babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_1___default()(___WEBPACK_IMPORTED_MODULE_3___default.a).call(___WEBPACK_IMPORTED_MODULE_3___default.a, list, function (item) {
        return item ? item.name : null;
      })));
    }); // this.templatesNames.subscribe((aList) => {
    // 	if (this.templatesNames.skipFirst)
    // 	{
    // 		this.templatesNames.skipFirst = false;
    // 	}
    // 	else if (aList && 1 < aList.length)
    // 	{
    // 		Remote.templatesSortOrder(null, aList);
    // 	}
    // });
  };

  return TemplateUserStore;
}();

/* harmony default export */ __webpack_exports__["a"] = (new TemplateUserStore());

/***/ }),
/* 177 */
/*!*********************************!*\
  !*** ./dev/Model/Attachment.js ***!
  \*********************************/
/*! exports provided: staticFileType, staticIconClass, staticCombinedIconClass, AttachmentModel, default */
/*! exports used: AttachmentModel, staticCombinedIconClass, staticFileType, staticIconClass */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return staticFileType; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return staticIconClass; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return staticCombinedIconClass; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return AttachmentModel; });
/* unused harmony export default */
/* harmony import */ var core_js_modules_es_regexp_exec__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.regexp.exec */ 45);
/* harmony import */ var core_js_modules_es_regexp_exec__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_regexp_exec__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var core_js_modules_es_string_replace__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es.string.replace */ 56);
/* harmony import */ var core_js_modules_es_string_replace__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_replace__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var core_js_modules_es_string_split__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core-js/modules/es.string.split */ 171);
/* harmony import */ var core_js_modules_es_string_split__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_split__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _babel_runtime_corejs3_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/esm/inheritsLoose */ 10);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/map */ 18);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var window__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! window */ 4);
/* harmony import */ var window__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(window__WEBPACK_IMPORTED_MODULE_5__);
/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! _ */ 3);
/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(___WEBPACK_IMPORTED_MODULE_6__);
/* harmony import */ var ko__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ko */ 1);
/* harmony import */ var Common_Enums__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! Common/Enums */ 0);
/* harmony import */ var Common_Globals__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! Common/Globals */ 6);
/* harmony import */ var Common_Utils__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! Common/Utils */ 2);
/* harmony import */ var Common_Links__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! Common/Links */ 15);
/* harmony import */ var Knoin_AbstractModel__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! Knoin/AbstractModel */ 64);
/* harmony import */ var Common_Audio__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! Common/Audio */ 81);














/**
 * @param {string} sExt
 * @param {string} sMimeType
 * @returns {string}
 */

var staticFileType = ___WEBPACK_IMPORTED_MODULE_6___default.a.memoize(function (ext, mimeType) {
  ext = Object(Common_Utils__WEBPACK_IMPORTED_MODULE_10__["trim"])(ext).toLowerCase();
  mimeType = Object(Common_Utils__WEBPACK_IMPORTED_MODULE_10__["trim"])(mimeType).toLowerCase();
  var result = Common_Enums__WEBPACK_IMPORTED_MODULE_8__["FileType"].Unknown;
  var mimeTypeParts = mimeType.split('/');

  switch (true) {
    case 'image' === mimeTypeParts[0] || -1 < Object(Common_Utils__WEBPACK_IMPORTED_MODULE_10__["inArray"])(ext, ['png', 'jpg', 'jpeg', 'gif', 'bmp']):
      result = Common_Enums__WEBPACK_IMPORTED_MODULE_8__["FileType"].Image;
      break;

    case 'audio' === mimeTypeParts[0] || -1 < Object(Common_Utils__WEBPACK_IMPORTED_MODULE_10__["inArray"])(ext, ['mp3', 'ogg', 'oga', 'wav']):
      result = Common_Enums__WEBPACK_IMPORTED_MODULE_8__["FileType"].Audio;
      break;

    case 'video' === mimeTypeParts[0] || -1 < Object(Common_Utils__WEBPACK_IMPORTED_MODULE_10__["inArray"])(ext, ['mkv', 'avi']):
      result = Common_Enums__WEBPACK_IMPORTED_MODULE_8__["FileType"].Video;
      break;

    case -1 < Object(Common_Utils__WEBPACK_IMPORTED_MODULE_10__["inArray"])(ext, ['php', 'js', 'css']):
      result = Common_Enums__WEBPACK_IMPORTED_MODULE_8__["FileType"].Code;
      break;

    case 'eml' === ext || -1 < Object(Common_Utils__WEBPACK_IMPORTED_MODULE_10__["inArray"])(mimeType, ['message/delivery-status', 'message/rfc822']):
      result = Common_Enums__WEBPACK_IMPORTED_MODULE_8__["FileType"].Eml;
      break;

    case 'text' === mimeTypeParts[0] && 'html' !== mimeTypeParts[1] || -1 < Object(Common_Utils__WEBPACK_IMPORTED_MODULE_10__["inArray"])(ext, ['txt', 'log']):
      result = Common_Enums__WEBPACK_IMPORTED_MODULE_8__["FileType"].Text;
      break;

    case 'text/html' === mimeType || -1 < Object(Common_Utils__WEBPACK_IMPORTED_MODULE_10__["inArray"])(ext, ['html']):
      result = Common_Enums__WEBPACK_IMPORTED_MODULE_8__["FileType"].Html;
      break;

    case -1 < Object(Common_Utils__WEBPACK_IMPORTED_MODULE_10__["inArray"])(mimeTypeParts[1], ['zip', '7z', 'tar', 'rar', 'gzip', 'bzip', 'bzip2', 'x-zip', 'x-7z', 'x-rar', 'x-tar', 'x-gzip', 'x-bzip', 'x-bzip2', 'x-zip-compressed', 'x-7z-compressed', 'x-rar-compressed']) || -1 < Object(Common_Utils__WEBPACK_IMPORTED_MODULE_10__["inArray"])(ext, ['zip', '7z', 'tar', 'rar', 'gzip', 'bzip', 'bzip2']):
      result = Common_Enums__WEBPACK_IMPORTED_MODULE_8__["FileType"].Archive;
      break;

    case -1 < Object(Common_Utils__WEBPACK_IMPORTED_MODULE_10__["inArray"])(mimeTypeParts[1], ['pdf', 'x-pdf']) || -1 < Object(Common_Utils__WEBPACK_IMPORTED_MODULE_10__["inArray"])(ext, ['pdf']):
      result = Common_Enums__WEBPACK_IMPORTED_MODULE_8__["FileType"].Pdf;
      break;

    case -1 < Object(Common_Utils__WEBPACK_IMPORTED_MODULE_10__["inArray"])(mimeType, ['application/pgp-signature', 'application/pgp-keys']) || -1 < Object(Common_Utils__WEBPACK_IMPORTED_MODULE_10__["inArray"])(ext, ['asc', 'pem', 'ppk']):
      result = Common_Enums__WEBPACK_IMPORTED_MODULE_8__["FileType"].Certificate;
      break;

    case -1 < Object(Common_Utils__WEBPACK_IMPORTED_MODULE_10__["inArray"])(mimeType, ['application/pkcs7-signature']) || -1 < Object(Common_Utils__WEBPACK_IMPORTED_MODULE_10__["inArray"])(ext, ['p7s']):
      result = Common_Enums__WEBPACK_IMPORTED_MODULE_8__["FileType"].CertificateBin;
      break;

    case -1 < Object(Common_Utils__WEBPACK_IMPORTED_MODULE_10__["inArray"])(mimeTypeParts[1], ['rtf', 'msword', 'vnd.msword', 'vnd.openxmlformats-officedocument.wordprocessingml.document', 'vnd.openxmlformats-officedocument.wordprocessingml.template', 'vnd.ms-word.document.macroEnabled.12', 'vnd.ms-word.template.macroEnabled.12']):
      result = Common_Enums__WEBPACK_IMPORTED_MODULE_8__["FileType"].WordText;
      break;

    case -1 < Object(Common_Utils__WEBPACK_IMPORTED_MODULE_10__["inArray"])(mimeTypeParts[1], ['excel', 'ms-excel', 'vnd.ms-excel', 'vnd.openxmlformats-officedocument.spreadsheetml.sheet', 'vnd.openxmlformats-officedocument.spreadsheetml.template', 'vnd.ms-excel.sheet.macroEnabled.12', 'vnd.ms-excel.template.macroEnabled.12', 'vnd.ms-excel.addin.macroEnabled.12', 'vnd.ms-excel.sheet.binary.macroEnabled.12']):
      result = Common_Enums__WEBPACK_IMPORTED_MODULE_8__["FileType"].Sheet;
      break;

    case -1 < Object(Common_Utils__WEBPACK_IMPORTED_MODULE_10__["inArray"])(mimeTypeParts[1], ['powerpoint', 'ms-powerpoint', 'vnd.ms-powerpoint', 'vnd.openxmlformats-officedocument.presentationml.presentation', 'vnd.openxmlformats-officedocument.presentationml.template', 'vnd.openxmlformats-officedocument.presentationml.slideshow', 'vnd.ms-powerpoint.addin.macroEnabled.12', 'vnd.ms-powerpoint.presentation.macroEnabled.12', 'vnd.ms-powerpoint.template.macroEnabled.12', 'vnd.ms-powerpoint.slideshow.macroEnabled.12']):
      result = Common_Enums__WEBPACK_IMPORTED_MODULE_8__["FileType"].Presentation;
      break;
    // no default
  }

  return result;
});
/**
 * @param {string} sFileType
 * @returns {string}
 */

var staticIconClass = ___WEBPACK_IMPORTED_MODULE_6___default.a.memoize(function (fileType) {
  var resultText = '',
      resultClass = 'icon-file';

  switch (fileType) {
    case Common_Enums__WEBPACK_IMPORTED_MODULE_8__["FileType"].Text:
    case Common_Enums__WEBPACK_IMPORTED_MODULE_8__["FileType"].Eml:
    case Common_Enums__WEBPACK_IMPORTED_MODULE_8__["FileType"].WordText:
      resultClass = 'icon-file-text';
      break;

    case Common_Enums__WEBPACK_IMPORTED_MODULE_8__["FileType"].Html:
    case Common_Enums__WEBPACK_IMPORTED_MODULE_8__["FileType"].Code:
      resultClass = 'icon-file-code';
      break;

    case Common_Enums__WEBPACK_IMPORTED_MODULE_8__["FileType"].Image:
      resultClass = 'icon-file-image';
      break;

    case Common_Enums__WEBPACK_IMPORTED_MODULE_8__["FileType"].Audio:
      resultClass = 'icon-file-music';
      break;

    case Common_Enums__WEBPACK_IMPORTED_MODULE_8__["FileType"].Video:
      resultClass = 'icon-file-movie';
      break;

    case Common_Enums__WEBPACK_IMPORTED_MODULE_8__["FileType"].Archive:
      resultClass = 'icon-file-zip';
      break;

    case Common_Enums__WEBPACK_IMPORTED_MODULE_8__["FileType"].Certificate:
    case Common_Enums__WEBPACK_IMPORTED_MODULE_8__["FileType"].CertificateBin:
      resultClass = 'icon-file-certificate';
      break;

    case Common_Enums__WEBPACK_IMPORTED_MODULE_8__["FileType"].Sheet:
      resultClass = 'icon-file-excel';
      break;

    case Common_Enums__WEBPACK_IMPORTED_MODULE_8__["FileType"].Presentation:
      resultClass = 'icon-file-chart-graph';
      break;

    case Common_Enums__WEBPACK_IMPORTED_MODULE_8__["FileType"].Pdf:
      resultText = 'pdf';
      resultClass = 'icon-none';
      break;
    // no default
  }

  return [resultClass, resultText];
});
/**
 * @static
 * @param {string} sFileType
 * @returns {string}
 */

var staticCombinedIconClass = function staticCombinedIconClass(data) {
  var result = '',
      types = [];

  if (Object(Common_Utils__WEBPACK_IMPORTED_MODULE_10__["isNonEmptyArray"])(data)) {
    result = 'icon-attachment';
    types = ___WEBPACK_IMPORTED_MODULE_6___default.a.uniq(___WEBPACK_IMPORTED_MODULE_6___default.a.compact(_babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_4___default()(___WEBPACK_IMPORTED_MODULE_6___default.a).call(___WEBPACK_IMPORTED_MODULE_6___default.a, data, function (item) {
      return item ? staticFileType(Object(Common_Utils__WEBPACK_IMPORTED_MODULE_10__["getFileExtension"])(item[0]), item[1]) : '';
    })));

    if (types && 1 === types.length && types[0]) {
      switch (types[0]) {
        case Common_Enums__WEBPACK_IMPORTED_MODULE_8__["FileType"].Text:
        case Common_Enums__WEBPACK_IMPORTED_MODULE_8__["FileType"].WordText:
          result = 'icon-file-text';
          break;

        case Common_Enums__WEBPACK_IMPORTED_MODULE_8__["FileType"].Html:
        case Common_Enums__WEBPACK_IMPORTED_MODULE_8__["FileType"].Code:
          result = 'icon-file-code';
          break;

        case Common_Enums__WEBPACK_IMPORTED_MODULE_8__["FileType"].Image:
          result = 'icon-file-image';
          break;

        case Common_Enums__WEBPACK_IMPORTED_MODULE_8__["FileType"].Audio:
          result = 'icon-file-music';
          break;

        case Common_Enums__WEBPACK_IMPORTED_MODULE_8__["FileType"].Video:
          result = 'icon-file-movie';
          break;

        case Common_Enums__WEBPACK_IMPORTED_MODULE_8__["FileType"].Archive:
          result = 'icon-file-zip';
          break;

        case Common_Enums__WEBPACK_IMPORTED_MODULE_8__["FileType"].Certificate:
        case Common_Enums__WEBPACK_IMPORTED_MODULE_8__["FileType"].CertificateBin:
          result = 'icon-file-certificate';
          break;

        case Common_Enums__WEBPACK_IMPORTED_MODULE_8__["FileType"].Sheet:
          result = 'icon-file-excel';
          break;

        case Common_Enums__WEBPACK_IMPORTED_MODULE_8__["FileType"].Presentation:
          result = 'icon-file-chart-graph';
          break;
        // no default
      }
    }
  }

  return result;
};

var AttachmentModel =
/*#__PURE__*/
function (_AbstractModel) {
  Object(_babel_runtime_corejs3_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(AttachmentModel, _AbstractModel);

  function AttachmentModel() {
    var _this;

    _this = _AbstractModel.call(this, 'AttachmentModel') || this;
    _this.checked = ko__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"].observable(false);
    _this.mimeType = '';
    _this.fileName = '';
    _this.fileNameExt = '';
    _this.fileType = Common_Enums__WEBPACK_IMPORTED_MODULE_8__["FileType"].Unknown;
    _this.estimatedSize = 0;
    _this.friendlySize = '';
    _this.isInline = false;
    _this.isLinked = false;
    _this.isThumbnail = false;
    _this.cid = '';
    _this.cidWithOutTags = '';
    _this.contentLocation = '';
    _this.download = '';
    _this.folder = '';
    _this.uid = '';
    _this.mimeIndex = '';
    _this.framed = false;
    return _this;
  }
  /**
   * @static
   * @param {AjaxJsonAttachment} json
   * @returns {?AttachmentModel}
   */


  AttachmentModel.newInstanceFromJson = function newInstanceFromJson(json) {
    var attachment = new AttachmentModel();
    return attachment.initByJson(json) ? attachment : null;
  }
  /**
   * @param {AjaxJsonAttachment} json
   * @returns {boolean}
   */
  ;

  var _proto = AttachmentModel.prototype;

  _proto.initByJson = function initByJson(json) {
    var bResult = false;

    if (json && 'Object/Attachment' === json['@Object']) {
      this.mimeType = Object(Common_Utils__WEBPACK_IMPORTED_MODULE_10__["trim"])((json.MimeType || '').toLowerCase());
      this.fileName = Object(Common_Utils__WEBPACK_IMPORTED_MODULE_10__["trim"])(json.FileName);
      this.estimatedSize = Object(Common_Utils__WEBPACK_IMPORTED_MODULE_10__["pInt"])(json.EstimatedSize);
      this.isInline = !!json.IsInline;
      this.isLinked = !!json.IsLinked;
      this.isThumbnail = !!json.IsThumbnail;
      this.cid = json.CID;
      this.contentLocation = json.ContentLocation;
      this.download = json.Download;
      this.folder = json.Folder;
      this.uid = json.Uid;
      this.mimeIndex = json.MimeIndex;
      this.framed = !!json.Framed;
      this.friendlySize = Object(Common_Utils__WEBPACK_IMPORTED_MODULE_10__["friendlySize"])(this.estimatedSize);
      this.cidWithOutTags = this.cid.replace(/^<+/, '').replace(/>+$/, '');
      this.fileNameExt = Object(Common_Utils__WEBPACK_IMPORTED_MODULE_10__["getFileExtension"])(this.fileName);
      this.fileType = staticFileType(this.fileNameExt, this.mimeType);
      bResult = true;
    }

    return bResult;
  }
  /**
   * @returns {boolean}
   */
  ;

  _proto.isImage = function isImage() {
    return Common_Enums__WEBPACK_IMPORTED_MODULE_8__["FileType"].Image === this.fileType;
  }
  /**
   * @returns {boolean}
   */
  ;

  _proto.isMp3 = function isMp3() {
    return Common_Enums__WEBPACK_IMPORTED_MODULE_8__["FileType"].Audio === this.fileType && 'mp3' === this.fileNameExt;
  }
  /**
   * @returns {boolean}
   */
  ;

  _proto.isOgg = function isOgg() {
    return Common_Enums__WEBPACK_IMPORTED_MODULE_8__["FileType"].Audio === this.fileType && ('oga' === this.fileNameExt || 'ogg' === this.fileNameExt);
  }
  /**
   * @returns {boolean}
   */
  ;

  _proto.isWav = function isWav() {
    return Common_Enums__WEBPACK_IMPORTED_MODULE_8__["FileType"].Audio === this.fileType && 'wav' === this.fileNameExt;
  }
  /**
   * @returns {boolean}
   */
  ;

  _proto.hasThumbnail = function hasThumbnail() {
    return this.isThumbnail;
  }
  /**
   * @returns {boolean}
   */
  ;

  _proto.isText = function isText() {
    return Common_Enums__WEBPACK_IMPORTED_MODULE_8__["FileType"].Text === this.fileType || Common_Enums__WEBPACK_IMPORTED_MODULE_8__["FileType"].Eml === this.fileType || Common_Enums__WEBPACK_IMPORTED_MODULE_8__["FileType"].Certificate === this.fileType || Common_Enums__WEBPACK_IMPORTED_MODULE_8__["FileType"].Html === this.fileType || Common_Enums__WEBPACK_IMPORTED_MODULE_8__["FileType"].Code === this.fileType;
  }
  /**
   * @returns {boolean}
   */
  ;

  _proto.isPdf = function isPdf() {
    return Common_Enums__WEBPACK_IMPORTED_MODULE_8__["FileType"].Pdf === this.fileType;
  }
  /**
   * @returns {boolean}
   */
  ;

  _proto.isFramed = function isFramed() {
    return this.framed && Common_Globals__WEBPACK_IMPORTED_MODULE_9__["data"].__APP__ && Common_Globals__WEBPACK_IMPORTED_MODULE_9__["data"].__APP__.googlePreviewSupported() && !(this.isPdf() && Common_Globals__WEBPACK_IMPORTED_MODULE_9__["bAllowPdfPreview"]) && !this.isText() && !this.isImage();
  }
  /**
   * @returns {boolean}
   */
  ;

  _proto.hasPreview = function hasPreview() {
    return this.isImage() || this.isPdf() && Common_Globals__WEBPACK_IMPORTED_MODULE_9__["bAllowPdfPreview"] || this.isText() || this.isFramed();
  }
  /**
   * @returns {boolean}
   */
  ;

  _proto.hasPreplay = function hasPreplay() {
    return Common_Audio__WEBPACK_IMPORTED_MODULE_13__[/* default */ "a"].supportedMp3 && this.isMp3() || Common_Audio__WEBPACK_IMPORTED_MODULE_13__[/* default */ "a"].supportedOgg && this.isOgg() || Common_Audio__WEBPACK_IMPORTED_MODULE_13__[/* default */ "a"].supportedWav && this.isWav();
  }
  /**
   * @returns {string}
   */
  ;

  _proto.linkDownload = function linkDownload() {
    return Object(Common_Links__WEBPACK_IMPORTED_MODULE_11__[/* attachmentDownload */ "c"])(this.download);
  }
  /**
   * @returns {string}
   */
  ;

  _proto.linkPreview = function linkPreview() {
    return Object(Common_Links__WEBPACK_IMPORTED_MODULE_11__[/* attachmentPreview */ "e"])(this.download);
  }
  /**
   * @returns {string}
   */
  ;

  _proto.linkThumbnail = function linkThumbnail() {
    return this.hasThumbnail() ? Object(Common_Links__WEBPACK_IMPORTED_MODULE_11__[/* attachmentThumbnailPreview */ "g"])(this.download) : '';
  }
  /**
   * @returns {string}
   */
  ;

  _proto.linkThumbnailPreviewStyle = function linkThumbnailPreviewStyle() {
    var link = this.linkThumbnail();
    return '' === link ? '' : 'background:url(' + link + ')';
  }
  /**
   * @returns {string}
   */
  ;

  _proto.linkFramed = function linkFramed() {
    return Object(Common_Links__WEBPACK_IMPORTED_MODULE_11__[/* attachmentFramed */ "d"])(this.download);
  }
  /**
   * @returns {string}
   */
  ;

  _proto.linkPreviewAsPlain = function linkPreviewAsPlain() {
    return Object(Common_Links__WEBPACK_IMPORTED_MODULE_11__[/* attachmentPreviewAsPlain */ "f"])(this.download);
  }
  /**
   * @returns {string}
   */
  ;

  _proto.linkPreviewMain = function linkPreviewMain() {
    var result = '';

    switch (true) {
      case this.isImage():
      case this.isPdf() && Common_Globals__WEBPACK_IMPORTED_MODULE_9__["bAllowPdfPreview"]:
        result = this.linkPreview();
        break;

      case this.isText():
        result = this.linkPreviewAsPlain();
        break;

      case this.isFramed():
        result = this.linkFramed();
        break;
      // no default
    }

    return result;
  }
  /**
   * @returns {string}
   */
  ;

  _proto.generateTransferDownloadUrl = function generateTransferDownloadUrl() {
    var link = this.linkDownload();

    if ('http' !== link.substr(0, 4)) {
      link = window__WEBPACK_IMPORTED_MODULE_5___default.a.location.protocol + '//' + window__WEBPACK_IMPORTED_MODULE_5___default.a.location.host + window__WEBPACK_IMPORTED_MODULE_5___default.a.location.pathname + link;
    }

    return this.mimeType + ':' + this.fileName + ':' + link;
  }
  /**
   * @param {AttachmentModel} attachment
   * @param {*} event
   * @returns {boolean}
   */
  ;

  _proto.eventDragStart = function eventDragStart(attachment, event) {
    var localEvent = event.originalEvent || event;

    if (attachment && localEvent && localEvent.dataTransfer && localEvent.dataTransfer.setData) {
      localEvent.dataTransfer.setData('DownloadURL', this.generateTransferDownloadUrl());
    }

    return true;
  }
  /**
   * @returns {string}
   */
  ;

  _proto.iconClass = function iconClass() {
    return staticIconClass(this.fileType)[0];
  }
  /**
   * @returns {string}
   */
  ;

  _proto.iconText = function iconText() {
    return staticIconClass(this.fileType)[1];
  };

  return AttachmentModel;
}(Knoin_AbstractModel__WEBPACK_IMPORTED_MODULE_12__[/* AbstractModel */ "a"]);



/***/ }),
/* 178 */
/*!***********************************************************!*\
  !*** ./node_modules/core-js/internals/native-weak-map.js ***!
  \***********************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

var global = __webpack_require__(/*! ../internals/global */ 27);
var inspectSource = __webpack_require__(/*! ../internals/inspect-source */ 92);

var WeakMap = global.WeakMap;

module.exports = typeof WeakMap === 'function' && /native code/.test(inspectSource(WeakMap));


/***/ }),
/* 179 */
/*!***********************************************************************!*\
  !*** ./node_modules/core-js/internals/copy-constructor-properties.js ***!
  \***********************************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

var has = __webpack_require__(/*! ../internals/has */ 42);
var ownKeys = __webpack_require__(/*! ../internals/own-keys */ 180);
var getOwnPropertyDescriptorModule = __webpack_require__(/*! ../internals/object-get-own-property-descriptor */ 89);
var definePropertyModule = __webpack_require__(/*! ../internals/object-define-property */ 52);

module.exports = function (target, source) {
  var keys = ownKeys(source);
  var defineProperty = definePropertyModule.f;
  var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
  for (var i = 0; i < keys.length; i++) {
    var key = keys[i];
    if (!has(target, key)) defineProperty(target, key, getOwnPropertyDescriptor(source, key));
  }
};


/***/ }),
/* 180 */
/*!****************************************************!*\
  !*** ./node_modules/core-js/internals/own-keys.js ***!
  \****************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

var getBuiltIn = __webpack_require__(/*! ../internals/get-built-in */ 59);
var getOwnPropertyNamesModule = __webpack_require__(/*! ../internals/object-get-own-property-names */ 181);
var getOwnPropertySymbolsModule = __webpack_require__(/*! ../internals/object-get-own-property-symbols */ 166);
var anObject = __webpack_require__(/*! ../internals/an-object */ 37);

// all object keys, includes non-enumerable and symbols
module.exports = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {
  var keys = getOwnPropertyNamesModule.f(anObject(it));
  var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
  return getOwnPropertySymbols ? keys.concat(getOwnPropertySymbols(it)) : keys;
};


/***/ }),
/* 181 */
/*!*************************************************************************!*\
  !*** ./node_modules/core-js/internals/object-get-own-property-names.js ***!
  \*************************************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

var internalObjectKeys = __webpack_require__(/*! ../internals/object-keys-internal */ 140);
var enumBugKeys = __webpack_require__(/*! ../internals/enum-bug-keys */ 108);

var hiddenKeys = enumBugKeys.concat('length', 'prototype');

// `Object.getOwnPropertyNames` method
// https://tc39.github.io/ecma262/#sec-object.getownpropertynames
exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
  return internalObjectKeys(O, hiddenKeys);
};


/***/ }),
/* 182 */
/*!*************************************************************!*\
  !*** ./node_modules/core-js/internals/to-absolute-index.js ***!
  \*************************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

var toInteger = __webpack_require__(/*! ../internals/to-integer */ 79);

var max = Math.max;
var min = Math.min;

// Helper for a popular repeating case of the spec:
// Let integer be ? ToInteger(index).
// If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
module.exports = function (index, length) {
  var integer = toInteger(index);
  return integer < 0 ? max(integer + length, 0) : min(integer, length);
};


/***/ }),
/* 183 */
/*!*************************************************************!*\
  !*** ./node_modules/core-js/internals/use-symbol-as-uid.js ***!
  \*************************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

var NATIVE_SYMBOL = __webpack_require__(/*! ../internals/native-symbol */ 130);

module.exports = NATIVE_SYMBOL
  // eslint-disable-next-line no-undef
  && !Symbol.sham
  // eslint-disable-next-line no-undef
  && typeof Symbol.iterator == 'symbol';


/***/ }),
/* 184 */
/*!************************************************************!*\
  !*** ./node_modules/core-js/internals/object-to-string.js ***!
  \************************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var TO_STRING_TAG_SUPPORT = __webpack_require__(/*! ../internals/to-string-tag-support */ 93);
var classof = __webpack_require__(/*! ../internals/classof */ 131);

// `Object.prototype.toString` method implementation
// https://tc39.github.io/ecma262/#sec-object.prototype.tostring
module.exports = TO_STRING_TAG_SUPPORT ? {}.toString : function toString() {
  return '[object ' + classof(this) + ']';
};


/***/ }),
/* 185 */
/*!************************************************************!*\
  !*** ./node_modules/core-js/internals/string-multibyte.js ***!
  \************************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

var toInteger = __webpack_require__(/*! ../internals/to-integer */ 79);
var requireObjectCoercible = __webpack_require__(/*! ../internals/require-object-coercible */ 55);

// `String.prototype.{ codePointAt, at }` methods implementation
var createMethod = function (CONVERT_TO_STRING) {
  return function ($this, pos) {
    var S = String(requireObjectCoercible($this));
    var position = toInteger(pos);
    var size = S.length;
    var first, second;
    if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined;
    first = S.charCodeAt(position);
    return first < 0xD800 || first > 0xDBFF || position + 1 === size
      || (second = S.charCodeAt(position + 1)) < 0xDC00 || second > 0xDFFF
        ? CONVERT_TO_STRING ? S.charAt(position) : first
        : CONVERT_TO_STRING ? S.slice(position, position + 2) : (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000;
  };
};

module.exports = {
  // `String.prototype.codePointAt` method
  // https://tc39.github.io/ecma262/#sec-string.prototype.codepointat
  codeAt: createMethod(false),
  // `String.prototype.at` method
  // https://github.com/mathiasbynens/String.prototype.at
  charAt: createMethod(true)
};


/***/ }),
/* 186 */
/*!***********************************************************!*\
  !*** ./node_modules/core-js/modules/es.array.iterator.js ***!
  \***********************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var toIndexedObject = __webpack_require__(/*! ../internals/to-indexed-object */ 71);
var addToUnscopables = __webpack_require__(/*! ../internals/add-to-unscopables */ 216);
var Iterators = __webpack_require__(/*! ../internals/iterators */ 73);
var InternalStateModule = __webpack_require__(/*! ../internals/internal-state */ 86);
var defineIterator = __webpack_require__(/*! ../internals/define-iterator */ 217);

var ARRAY_ITERATOR = 'Array Iterator';
var setInternalState = InternalStateModule.set;
var getInternalState = InternalStateModule.getterFor(ARRAY_ITERATOR);

// `Array.prototype.entries` method
// https://tc39.github.io/ecma262/#sec-array.prototype.entries
// `Array.prototype.keys` method
// https://tc39.github.io/ecma262/#sec-array.prototype.keys
// `Array.prototype.values` method
// https://tc39.github.io/ecma262/#sec-array.prototype.values
// `Array.prototype[@@iterator]` method
// https://tc39.github.io/ecma262/#sec-array.prototype-@@iterator
// `CreateArrayIterator` internal method
// https://tc39.github.io/ecma262/#sec-createarrayiterator
module.exports = defineIterator(Array, 'Array', function (iterated, kind) {
  setInternalState(this, {
    type: ARRAY_ITERATOR,
    target: toIndexedObject(iterated), // target
    index: 0,                          // next index
    kind: kind                         // kind
  });
// `%ArrayIteratorPrototype%.next` method
// https://tc39.github.io/ecma262/#sec-%arrayiteratorprototype%.next
}, function () {
  var state = getInternalState(this);
  var target = state.target;
  var kind = state.kind;
  var index = state.index++;
  if (!target || index >= target.length) {
    state.target = undefined;
    return { value: undefined, done: true };
  }
  if (kind == 'keys') return { value: index, done: false };
  if (kind == 'values') return { value: target[index], done: false };
  return { value: [index, target[index]], done: false };
}, 'values');

// argumentsList[@@iterator] is %ArrayProto_values%
// https://tc39.github.io/ecma262/#sec-createunmappedargumentsobject
// https://tc39.github.io/ecma262/#sec-createmappedargumentsobject
Iterators.Arguments = Iterators.Array;

// https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables
addToUnscopables('keys');
addToUnscopables('values');
addToUnscopables('entries');


/***/ }),
/* 187 */
/*!********************************************************!*\
  !*** ./node_modules/core-js/internals/redefine-all.js ***!
  \********************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

var redefine = __webpack_require__(/*! ../internals/redefine */ 53);

module.exports = function (target, src, options) {
  for (var key in src) redefine(target, key, src[key], options);
  return target;
};


/***/ }),
/* 188 */
/*!*******************************************************!*\
  !*** ./node_modules/core-js/internals/set-species.js ***!
  \*******************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var getBuiltIn = __webpack_require__(/*! ../internals/get-built-in */ 59);
var definePropertyModule = __webpack_require__(/*! ../internals/object-define-property */ 52);
var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ 32);
var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ 47);

var SPECIES = wellKnownSymbol('species');

module.exports = function (CONSTRUCTOR_NAME) {
  var Constructor = getBuiltIn(CONSTRUCTOR_NAME);
  var defineProperty = definePropertyModule.f;

  if (DESCRIPTORS && Constructor && !Constructor[SPECIES]) {
    defineProperty(Constructor, SPECIES, {
      configurable: true,
      get: function () { return this; }
    });
  }
};


/***/ }),
/* 189 */
/*!*******************************************************!*\
  !*** ./node_modules/core-js/internals/an-instance.js ***!
  \*******************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports) {

module.exports = function (it, Constructor, name) {
  if (!(it instanceof Constructor)) {
    throw TypeError('Incorrect ' + (name ? name + ' ' : '') + 'invocation');
  } return it;
};


/***/ }),
/* 190 */
/*!********************************************************************!*\
  !*** ./node_modules/core-js/internals/is-array-iterator-method.js ***!
  \********************************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ 32);
var Iterators = __webpack_require__(/*! ../internals/iterators */ 73);

var ITERATOR = wellKnownSymbol('iterator');
var ArrayPrototype = Array.prototype;

// check on default Array iterator
module.exports = function (it) {
  return it !== undefined && (Iterators.Array === it || ArrayPrototype[ITERATOR] === it);
};


/***/ }),
/* 191 */
/*!***************************************************************!*\
  !*** ./node_modules/core-js/internals/get-iterator-method.js ***!
  \***************************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

var classof = __webpack_require__(/*! ../internals/classof */ 131);
var Iterators = __webpack_require__(/*! ../internals/iterators */ 73);
var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ 32);

var ITERATOR = wellKnownSymbol('iterator');

module.exports = function (it) {
  if (it != undefined) return it[ITERATOR]
    || it['@@iterator']
    || Iterators[classof(it)];
};


/***/ }),
/* 192 */
/*!****************************************************************************!*\
  !*** ./node_modules/core-js/internals/call-with-safe-iteration-closing.js ***!
  \****************************************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

var anObject = __webpack_require__(/*! ../internals/an-object */ 37);

// call something on iterator step with safe closing on error
module.exports = function (iterator, fn, value, ENTRIES) {
  try {
    return ENTRIES ? fn(anObject(value)[0], value[1]) : fn(value);
  // 7.4.6 IteratorClose(iterator, completion)
  } catch (error) {
    var returnMethod = iterator['return'];
    if (returnMethod !== undefined) anObject(returnMethod.call(iterator));
    throw error;
  }
};


/***/ }),
/* 193 */
/*!**************************************************************************!*\
  !*** ./node_modules/core-js/internals/check-correctness-of-iteration.js ***!
  \**************************************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ 32);

var ITERATOR = wellKnownSymbol('iterator');
var SAFE_CLOSING = false;

try {
  var called = 0;
  var iteratorWithReturn = {
    next: function () {
      return { done: !!called++ };
    },
    'return': function () {
      SAFE_CLOSING = true;
    }
  };
  iteratorWithReturn[ITERATOR] = function () {
    return this;
  };
  // eslint-disable-next-line no-throw-literal
  Array.from(iteratorWithReturn, function () { throw 2; });
} catch (error) { /* empty */ }

module.exports = function (exec, SKIP_CLOSING) {
  if (!SKIP_CLOSING && !SAFE_CLOSING) return false;
  var ITERATION_SUPPORT = false;
  try {
    var object = {};
    object[ITERATOR] = function () {
      return {
        next: function () {
          return { done: ITERATION_SUPPORT = true };
        }
      };
    };
    exec(object);
  } catch (error) { /* empty */ }
  return ITERATION_SUPPORT;
};


/***/ }),
/* 194 */
/*!*****************************************************!*\
  !*** ./node_modules/core-js/internals/microtask.js ***!
  \*****************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

var global = __webpack_require__(/*! ../internals/global */ 27);
var getOwnPropertyDescriptor = __webpack_require__(/*! ../internals/object-get-own-property-descriptor */ 89).f;
var classof = __webpack_require__(/*! ../internals/classof-raw */ 50);
var macrotask = __webpack_require__(/*! ../internals/task */ 132).set;
var IS_IOS = __webpack_require__(/*! ../internals/engine-is-ios */ 133);

var MutationObserver = global.MutationObserver || global.WebKitMutationObserver;
var process = global.process;
var Promise = global.Promise;
var IS_NODE = classof(process) == 'process';
// Node.js 11 shows ExperimentalWarning on getting `queueMicrotask`
var queueMicrotaskDescriptor = getOwnPropertyDescriptor(global, 'queueMicrotask');
var queueMicrotask = queueMicrotaskDescriptor && queueMicrotaskDescriptor.value;

var flush, head, last, notify, toggle, node, promise, then;

// modern engines have queueMicrotask method
if (!queueMicrotask) {
  flush = function () {
    var parent, fn;
    if (IS_NODE && (parent = process.domain)) parent.exit();
    while (head) {
      fn = head.fn;
      head = head.next;
      try {
        fn();
      } catch (error) {
        if (head) notify();
        else last = undefined;
        throw error;
      }
    } last = undefined;
    if (parent) parent.enter();
  };

  // Node.js
  if (IS_NODE) {
    notify = function () {
      process.nextTick(flush);
    };
  // browsers with MutationObserver, except iOS - https://github.com/zloirock/core-js/issues/339
  } else if (MutationObserver && !IS_IOS) {
    toggle = true;
    node = document.createTextNode('');
    new MutationObserver(flush).observe(node, { characterData: true });
    notify = function () {
      node.data = toggle = !toggle;
    };
  // environments with maybe non-completely correct, but existent Promise
  } else if (Promise && Promise.resolve) {
    // Promise.resolve without an argument throws an error in LG WebOS 2
    promise = Promise.resolve(undefined);
    then = promise.then;
    notify = function () {
      then.call(promise, flush);
    };
  // for other environments - macrotask based on:
  // - setImmediate
  // - MessageChannel
  // - window.postMessag
  // - onreadystatechange
  // - setTimeout
  } else {
    notify = function () {
      // strange IE + webpack dev server bug - use .call(global)
      macrotask.call(global, flush);
    };
  }
}

module.exports = queueMicrotask || function (fn) {
  var task = { fn: fn, next: undefined };
  if (last) last.next = task;
  if (!head) {
    head = task;
    notify();
  } last = task;
};


/***/ }),
/* 195 */
/*!**************************************************************!*\
  !*** ./node_modules/core-js/internals/host-report-errors.js ***!
  \**************************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

var global = __webpack_require__(/*! ../internals/global */ 27);

module.exports = function (a, b) {
  var console = global.console;
  if (console && console.error) {
    arguments.length === 1 ? console.error(a) : console.error(a, b);
  }
};


/***/ }),
/* 196 */
/*!*********************************************************!*\
  !*** ./node_modules/core-js/modules/es.string.match.js ***!
  \*********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var fixRegExpWellKnownSymbolLogic = __webpack_require__(/*! ../internals/fix-regexp-well-known-symbol-logic */ 134);
var anObject = __webpack_require__(/*! ../internals/an-object */ 37);
var toLength = __webpack_require__(/*! ../internals/to-length */ 72);
var requireObjectCoercible = __webpack_require__(/*! ../internals/require-object-coercible */ 55);
var advanceStringIndex = __webpack_require__(/*! ../internals/advance-string-index */ 152);
var regExpExec = __webpack_require__(/*! ../internals/regexp-exec-abstract */ 135);

// @@match logic
fixRegExpWellKnownSymbolLogic('match', 1, function (MATCH, nativeMatch, maybeCallNative) {
  return [
    // `String.prototype.match` method
    // https://tc39.github.io/ecma262/#sec-string.prototype.match
    function match(regexp) {
      var O = requireObjectCoercible(this);
      var matcher = regexp == undefined ? undefined : regexp[MATCH];
      return matcher !== undefined ? matcher.call(regexp, O) : new RegExp(regexp)[MATCH](String(O));
    },
    // `RegExp.prototype[@@match]` method
    // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@match
    function (regexp) {
      var res = maybeCallNative(nativeMatch, regexp, this);
      if (res.done) return res.value;

      var rx = anObject(regexp);
      var S = String(this);

      if (!rx.global) return regExpExec(rx, S);

      var fullUnicode = rx.unicode;
      rx.lastIndex = 0;
      var A = [];
      var n = 0;
      var result;
      while ((result = regExpExec(rx, S)) !== null) {
        var matchStr = String(result[0]);
        A[n] = matchStr;
        if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);
        n++;
      }
      return n === 0 ? null : A;
    }
  ];
});


/***/ }),
/* 197 */
/*!***************************************************************!*\
  !*** ./node_modules/core-js-pure/internals/indexed-object.js ***!
  \***************************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

var fails = __webpack_require__(/*! ../internals/fails */ 57);
var classof = __webpack_require__(/*! ../internals/classof-raw */ 198);

var split = ''.split;

// fallback for non-array-like ES3 and non-enumerable old V8 strings
module.exports = fails(function () {
  // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
  // eslint-disable-next-line no-prototype-builtins
  return !Object('z').propertyIsEnumerable(0);
}) ? function (it) {
  return classof(it) == 'String' ? split.call(it, '') : Object(it);
} : Object;


/***/ }),
/* 198 */
/*!************************************************************!*\
  !*** ./node_modules/core-js-pure/internals/classof-raw.js ***!
  \************************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports) {

var toString = {}.toString;

module.exports = function (it) {
  return toString.call(it).slice(8, -1);
};


/***/ }),
/* 199 */
/*!*************************************************************************!*\
  !*** ./node_modules/core-js-pure/internals/require-object-coercible.js ***!
  \*************************************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports) {

// `RequireObjectCoercible` abstract operation
// https://tc39.github.io/ecma262/#sec-requireobjectcoercible
module.exports = function (it) {
  if (it == undefined) throw TypeError("Can't call method on " + it);
  return it;
};


/***/ }),
/* 200 */
/*!*************************************************************!*\
  !*** ./node_modules/core-js-pure/internals/to-primitive.js ***!
  \*************************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

var isObject = __webpack_require__(/*! ../internals/is-object */ 76);

// `ToPrimitive` abstract operation
// https://tc39.github.io/ecma262/#sec-toprimitive
// instead of the ES6 spec version, we didn't implement @@toPrimitive case
// and the second argument - flag - preferred type is a string
module.exports = function (input, PREFERRED_STRING) {
  if (!isObject(input)) return input;
  var fn, val;
  if (PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val;
  if (typeof (fn = input.valueOf) == 'function' && !isObject(val = fn.call(input))) return val;
  if (!PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val;
  throw TypeError("Can't convert object to primitive value");
};


/***/ }),
/* 201 */
/*!***********************************************************!*\
  !*** ./node_modules/core-js-pure/internals/to-integer.js ***!
  \***********************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports) {

var ceil = Math.ceil;
var floor = Math.floor;

// `ToInteger` abstract operation
// https://tc39.github.io/ecma262/#sec-tointeger
module.exports = function (argument) {
  return isNaN(argument = +argument) ? 0 : (argument > 0 ? floor : ceil)(argument);
};


/***/ }),
/* 202 */
/*!*******************************************************!*\
  !*** ./node_modules/core-js-pure/internals/shared.js ***!
  \*******************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

var global = __webpack_require__(/*! ../internals/global */ 75);
var setGlobal = __webpack_require__(/*! ../internals/set-global */ 295);
var IS_PURE = __webpack_require__(/*! ../internals/is-pure */ 203);

var SHARED = '__core-js_shared__';
var store = global[SHARED] || setGlobal(SHARED, {});

(module.exports = function (key, value) {
  return store[key] || (store[key] = value !== undefined ? value : {});
})('versions', []).push({
  version: '3.1.3',
  mode: IS_PURE ? 'pure' : 'global',
  copyright: '© 2019 Denis Pushkarev (zloirock.ru)'
});


/***/ }),
/* 203 */
/*!********************************************************!*\
  !*** ./node_modules/core-js-pure/internals/is-pure.js ***!
  \********************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports) {

module.exports = true;


/***/ }),
/* 204 */
/*!***********************************************************!*\
  !*** ./node_modules/core-js-pure/internals/shared-key.js ***!
  \***********************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

var shared = __webpack_require__(/*! ../internals/shared */ 202);
var uid = __webpack_require__(/*! ../internals/uid */ 240);

var keys = shared('keys');

module.exports = function (key) {
  return keys[key] || (keys[key] = uid(key));
};


/***/ }),
/* 205 */
/*!************************************************************!*\
  !*** ./node_modules/core-js-pure/internals/hidden-keys.js ***!
  \************************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports) {

module.exports = {};


/***/ }),
/* 206 */
/*!***********************************!*\
  !*** ./dev/Component/Checkbox.js ***!
  \***********************************/
/*! exports provided: default */
/*! all exports used */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _babel_runtime_corejs3_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/esm/inheritsLoose */ 10);
/* harmony import */ var Component_Abstract__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! Component/Abstract */ 35);
/* harmony import */ var Component_AbstractCheckbox__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! Component/AbstractCheckbox */ 162);




var CheckboxComponent =
/*#__PURE__*/
function (_AbstractCheckbox) {
  Object(_babel_runtime_corejs3_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(CheckboxComponent, _AbstractCheckbox);

  function CheckboxComponent() {
    return _AbstractCheckbox.apply(this, arguments) || this;
  }

  return CheckboxComponent;
}(Component_AbstractCheckbox__WEBPACK_IMPORTED_MODULE_2__[/* AbstractCheckbox */ "a"]);

/* harmony default export */ __webpack_exports__["default"] = (Object(Component_Abstract__WEBPACK_IMPORTED_MODULE_1__[/* componentExportHelper */ "b"])(CheckboxComponent, 'CheckboxComponent'));

/***/ }),
/* 207 */
/*!**********************************!*\
  !*** ./dev/Common/HtmlEditor.js ***!
  \**********************************/
/*! exports provided: HtmlEditor, default */
/*! all exports used */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HtmlEditor", function() { return HtmlEditor; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return HtmlEditor; });
/* harmony import */ var core_js_modules_es_regexp_exec__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.regexp.exec */ 45);
/* harmony import */ var core_js_modules_es_regexp_exec__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_regexp_exec__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var core_js_modules_es_string_match__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es.string.match */ 196);
/* harmony import */ var core_js_modules_es_string_match__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_match__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var core_js_modules_es_string_replace__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core-js/modules/es.string.replace */ 56);
/* harmony import */ var core_js_modules_es_string_replace__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_replace__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var core_js_modules_web_timers__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! core-js/modules/web.timers */ 67);
/* harmony import */ var core_js_modules_web_timers__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_timers__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_bind__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/bind */ 26);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_bind__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_bind__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var _babel_runtime_corejs3_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/esm/defineProperty */ 17);
/* harmony import */ var window__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! window */ 4);
/* harmony import */ var window__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(window__WEBPACK_IMPORTED_MODULE_6__);
/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! _ */ 3);
/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(___WEBPACK_IMPORTED_MODULE_7__);
/* harmony import */ var $__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! $ */ 8);
/* harmony import */ var $__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n($__WEBPACK_IMPORTED_MODULE_8__);
/* harmony import */ var Common_Globals__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! Common/Globals */ 6);
/* harmony import */ var Common_Enums__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! Common/Enums */ 0);
/* harmony import */ var Storage_Settings__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! Storage/Settings */ 5);













var HtmlEditor =
/*#__PURE__*/
function () {
  /**
   * @param {Object} element
   * @param {Function=} onBlur
   * @param {Function=} onReady
   * @param {Function=} onModeChange
   */
  function HtmlEditor(element, onBlur, onReady, onModeChange) {
    if (onBlur === void 0) {
      onBlur = null;
    }

    if (onReady === void 0) {
      onReady = null;
    }

    if (onModeChange === void 0) {
      onModeChange = null;
    }

    Object(_babel_runtime_corejs3_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"])(this, "editor", void 0);

    Object(_babel_runtime_corejs3_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"])(this, "blurTimer", 0);

    Object(_babel_runtime_corejs3_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"])(this, "__resizable", false);

    Object(_babel_runtime_corejs3_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"])(this, "__inited", false);

    Object(_babel_runtime_corejs3_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"])(this, "onBlur", null);

    Object(_babel_runtime_corejs3_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"])(this, "onReady", null);

    Object(_babel_runtime_corejs3_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"])(this, "onModeChange", null);

    Object(_babel_runtime_corejs3_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"])(this, "element", void 0);

    Object(_babel_runtime_corejs3_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"])(this, "$element", void 0);

    Object(_babel_runtime_corejs3_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"])(this, "resize", void 0);

    this.onBlur = onBlur;
    this.onReady = onReady;
    this.onModeChange = onModeChange;
    this.element = element;
    this.$element = $__WEBPACK_IMPORTED_MODULE_8___default()(element);
    this.resize = ___WEBPACK_IMPORTED_MODULE_7___default.a.throttle(_babel_runtime_corejs3_core_js_stable_instance_bind__WEBPACK_IMPORTED_MODULE_4___default()(___WEBPACK_IMPORTED_MODULE_7___default.a).call(___WEBPACK_IMPORTED_MODULE_7___default.a, this.resizeEditor, this), 100);
    this.init();
  }

  var _proto = HtmlEditor.prototype;

  _proto.runOnBlur = function runOnBlur() {
    if (this.onBlur) {
      this.onBlur();
    }
  };

  _proto.blurTrigger = function blurTrigger() {
    var _this = this;

    if (this.onBlur) {
      window__WEBPACK_IMPORTED_MODULE_6___default.a.clearTimeout(this.blurTimer);
      this.blurTimer = window__WEBPACK_IMPORTED_MODULE_6___default.a.setTimeout(function () {
        _this.runOnBlur();
      }, Common_Enums__WEBPACK_IMPORTED_MODULE_10__["Magics"].Time200ms);
    }
  };

  _proto.focusTrigger = function focusTrigger() {
    if (this.onBlur) {
      window__WEBPACK_IMPORTED_MODULE_6___default.a.clearTimeout(this.blurTimer);
    }
  }
  /**
   * @returns {boolean}
   */
  ;

  _proto.isHtml = function isHtml() {
    return this.editor ? 'wysiwyg' === this.editor.mode : false;
  }
  /**
   * @returns {void}
   */
  ;

  _proto.clearCachedSignature = function clearCachedSignature() {
    if (this.editor) {
      this.editor.execCommand('insertSignature', {
        clearCache: true
      });
    }
  }
  /**
   * @param {string} signature
   * @param {bool} html
   * @param {bool} insertBefore
   * @returns {void}
   */
  ;

  _proto.setSignature = function setSignature(signature, html, insertBefore) {
    if (insertBefore === void 0) {
      insertBefore = false;
    }

    if (this.editor) {
      this.editor.execCommand('insertSignature', {
        isHtml: html,
        insertBefore: insertBefore,
        signature: signature
      });
    }
  }
  /**
   * @returns {boolean}
   */
  ;

  _proto.checkDirty = function checkDirty() {
    return this.editor ? this.editor.checkDirty() : false;
  };

  _proto.resetDirty = function resetDirty() {
    if (this.editor) {
      this.editor.resetDirty();
    }
  }
  /**
   * @param {boolean=} wrapIsHtml = false
   * @returns {string}
   */
  ;

  _proto.getData = function getData(wrapIsHtml) {
    if (wrapIsHtml === void 0) {
      wrapIsHtml = false;
    }

    var result = '';

    if (this.editor) {
      try {
        if ('plain' === this.editor.mode && this.editor.plugins.plain && this.editor.__plain) {
          result = this.editor.__plain.getRawData();
        } else {
          result = wrapIsHtml ? '<div data-html-editor-font-wrapper="true" style="font-family: arial, sans-serif; font-size: 13px;">' + this.editor.getData() + '</div>' : this.editor.getData();
        }
      } catch (e) {} // eslint-disable-line no-empty

    }

    return result;
  }
  /**
   * @param {boolean=} wrapIsHtml = false
   * @returns {string}
   */
  ;

  _proto.getDataWithHtmlMark = function getDataWithHtmlMark(wrapIsHtml) {
    if (wrapIsHtml === void 0) {
      wrapIsHtml = false;
    }

    return (this.isHtml() ? ':HTML:' : '') + this.getData(wrapIsHtml);
  };

  _proto.modeToggle = function modeToggle(plain, resize) {
    if (this.editor) {
      try {
        if (plain) {
          if ('plain' === this.editor.mode) {
            this.editor.setMode('wysiwyg');
          }
        } else if ('wysiwyg' === this.editor.mode) {
          this.editor.setMode('plain');
        }
      } catch (e) {} // eslint-disable-line no-empty


      if (resize) {
        this.resize();
      }
    }
  };

  _proto.setHtmlOrPlain = function setHtmlOrPlain(text, focus) {
    if (':HTML:' === text.substr(0, 6)) {
      this.setHtml(text.substr(6), focus);
    } else {
      this.setPlain(text, focus);
    }
  };

  _proto.setHtml = function setHtml(html, focus) {
    if (this.editor && this.__inited) {
      this.clearCachedSignature();
      this.modeToggle(true);
      html = html.replace(/<p[^>]*><\/p>/gi, '');

      try {
        this.editor.setData(html);
      } catch (e) {} // eslint-disable-line no-empty


      if (focus) {
        this.focus();
      }
    }
  };

  _proto.replaceHtml = function replaceHtml(find, _replaceHtml) {
    if (this.editor && this.__inited && 'wysiwyg' === this.editor.mode) {
      try {
        this.editor.setData(this.editor.getData().replace(find, _replaceHtml));
      } catch (e) {} // eslint-disable-line no-empty

    }
  };

  _proto.setPlain = function setPlain(plain, focus) {
    if (this.editor && this.__inited) {
      this.clearCachedSignature();
      this.modeToggle(false);

      if ('plain' === this.editor.mode && this.editor.plugins.plain && this.editor.__plain) {
        this.editor.__plain.setRawData(plain);
      } else {
        try {
          this.editor.setData(plain);
        } catch (e) {} // eslint-disable-line no-empty

      }

      if (focus) {
        this.focus();
      }
    }
  };

  _proto.init = function init() {
    var _this2 = this;

    if (this.element && !this.editor) {
      var initFunc = function initFunc() {
        var config = Common_Globals__WEBPACK_IMPORTED_MODULE_9__["htmlEditorDefaultConfig"],
            language = Storage_Settings__WEBPACK_IMPORTED_MODULE_11__["settingsGet"]('Language'),
            allowSource = !!Storage_Settings__WEBPACK_IMPORTED_MODULE_11__["appSettingsGet"]('allowHtmlEditorSourceButton'),
            biti = !!Storage_Settings__WEBPACK_IMPORTED_MODULE_11__["appSettingsGet"]('allowHtmlEditorBitiButtons');

        if ((allowSource || !biti) && !config.toolbarGroups.__cfgInited) {
          config.toolbarGroups.__cfgInited = true;

          if (allowSource) {
            config.removeButtons = config.removeButtons.replace(',Source', '');
          }

          if (!biti) {
            config.removePlugins += (config.removePlugins ? ',' : '') + 'bidi';
          }
        }

        config.enterMode = window__WEBPACK_IMPORTED_MODULE_6___default.a.CKEDITOR.ENTER_BR;
        config.shiftEnterMode = window__WEBPACK_IMPORTED_MODULE_6___default.a.CKEDITOR.ENTER_P;
        config.language = Common_Globals__WEBPACK_IMPORTED_MODULE_9__["htmlEditorLangsMap"][(language || 'en').toLowerCase()] || 'en';

        if (window__WEBPACK_IMPORTED_MODULE_6___default.a.CKEDITOR.env) {
          window__WEBPACK_IMPORTED_MODULE_6___default.a.CKEDITOR.env.isCompatible = true;
        }

        _this2.editor = window__WEBPACK_IMPORTED_MODULE_6___default.a.CKEDITOR.appendTo(_this2.element, config);

        _this2.editor.on('key', function (event) {
          if (event && event.data && Common_Enums__WEBPACK_IMPORTED_MODULE_10__["EventKeyCode"].Tab === event.data.keyCode) {
            return false;
          }

          return true;
        });

        _this2.editor.on('blur', function () {
          _this2.blurTrigger();
        });

        _this2.editor.on('mode', function () {
          _this2.blurTrigger();

          if (_this2.onModeChange) {
            _this2.onModeChange('plain' !== _this2.editor.mode);
          }
        });

        _this2.editor.on('focus', function () {
          _this2.focusTrigger();
        });

        if (window__WEBPACK_IMPORTED_MODULE_6___default.a.FileReader) {
          _this2.editor.on('drop', function (event) {
            if (0 < event.data.dataTransfer.getFilesCount()) {
              var file = event.data.dataTransfer.getFile(0);

              if (file && window__WEBPACK_IMPORTED_MODULE_6___default.a.FileReader && event.data.dataTransfer.id && file.type && file.type.match(/^image/i)) {
                var id = event.data.dataTransfer.id,
                    imageId = "[img=" + id + "]",
                    reader = new window__WEBPACK_IMPORTED_MODULE_6___default.a.FileReader();

                reader.onloadend = function () {
                  if (reader.result) {
                    _this2.replaceHtml(imageId, "<img src=\"" + reader.result + "\" />");
                  }
                };

                reader.readAsDataURL(file);
                event.data.dataTransfer.setData('text/html', imageId);
              }
            }
          });
        }

        _this2.editor.on('instanceReady', function () {
          if (_this2.editor.removeMenuItem) {
            _this2.editor.removeMenuItem('cut');

            _this2.editor.removeMenuItem('copy');

            _this2.editor.removeMenuItem('paste');
          }

          _this2.__resizable = true;
          _this2.__inited = true;

          _this2.resize();

          if (_this2.onReady) {
            _this2.onReady();
          }
        });
      };

      if (window__WEBPACK_IMPORTED_MODULE_6___default.a.CKEDITOR) {
        initFunc();
      } else {
        window__WEBPACK_IMPORTED_MODULE_6___default.a.__initEditor = initFunc;
      }
    }
  };

  _proto.focus = function focus() {
    if (this.editor) {
      try {
        this.editor.focus();
      } catch (e) {} // eslint-disable-line no-empty

    }
  };

  _proto.hasFocus = function hasFocus() {
    if (this.editor) {
      try {
        return !!this.editor.focusManager.hasFocus;
      } catch (e) {} // eslint-disable-line no-empty

    }

    return false;
  };

  _proto.blur = function blur() {
    if (this.editor) {
      try {
        this.editor.focusManager.blur(true);
      } catch (e) {} // eslint-disable-line no-empty

    }
  };

  _proto.resizeEditor = function resizeEditor() {
    if (this.editor && this.__resizable) {
      try {
        this.editor.resize(this.$element.width(), this.$element.innerHeight());
      } catch (e) {} // eslint-disable-line no-empty

    }
  };

  _proto.setReadOnly = function setReadOnly(value) {
    if (this.editor) {
      try {
        this.editor.setReadOnly(!!value);
      } catch (e) {} // eslint-disable-line no-empty

    }
  };

  _proto.clear = function clear(focus) {
    this.setHtml('', focus);
  };

  return HtmlEditor;
}();



/***/ }),
/* 208 */
/*!*******************************************************************************!*\
  !*** ./node_modules/@babel/runtime-corejs3/core-js-stable/instance/reduce.js ***!
  \*******************************************************************************/
/*! no static exports found */
/*! exports used: default */
/***/ (function(module, exports, __webpack_require__) {

module.exports = __webpack_require__(/*! core-js-pure/stable/instance/reduce */ 285);

/***/ }),
/* 209 */
/*!**************************************************************************************!*\
  !*** ./node_modules/@babel/runtime-corejs3/core-js-stable/instance/last-index-of.js ***!
  \**************************************************************************************/
/*! no static exports found */
/*! exports used: default */
/***/ (function(module, exports, __webpack_require__) {

module.exports = __webpack_require__(/*! core-js-pure/stable/instance/last-index-of */ 323);

/***/ }),
/* 210 */
/*!*********************************!*\
  !*** ./dev/External/Opentip.js ***!
  \*********************************/
/*! exports provided: Opentip, default */
/*! exports used: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* unused harmony export Opentip */
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Opentip; });
/* harmony import */ var window__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! window */ 4);
/* harmony import */ var window__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(window__WEBPACK_IMPORTED_MODULE_0__);

var Opentip = window__WEBPACK_IMPORTED_MODULE_0___default.a.Opentip || {};
Opentip.styles = Opentip.styles || {};
Opentip.styles.rainloop = {
  'extends': 'standard',
  'fixed': true,
  'target': true,
  'delay': 0.2,
  'hideDelay': 0,
  'hideEffect': 'fade',
  'hideEffectDuration': 0.2,
  'showEffect': 'fade',
  'showEffectDuration': 0.2,
  'showOn': 'mouseover click',
  'removeElementsOnHide': true,
  'background': '#fff',
  'shadow': false,
  'borderColor': '#999',
  'borderRadius': 2,
  'borderWidth': 1
};
Opentip.styles.rainloopTip = {
  'extends': 'rainloop',
  'delay': 0.4,
  'group': 'rainloopTips'
};
Opentip.styles.rainloopErrorTip = {
  'extends': 'rainloop',
  'className': 'rainloopErrorTip'
};


/***/ }),
/* 211 */
/*!*****************************************!*\
  !*** ./node_modules/pikaday/pikaday.js ***!
  \*****************************************/
/*! no static exports found */
/*! exports used: default */
/***/ (function(module, exports, __webpack_require__) {

/*!
 * Pikaday
 *
 * Copyright © 2014 David Bushell | BSD & MIT license | https://github.com/Pikaday/Pikaday
 */

(function (root, factory)
{
    'use strict';

    var moment;
    if (true) {
        // CommonJS module
        // Load moment.js as an optional dependency
        try { moment = __webpack_require__(/*! moment */ 97); } catch (e) {}
        module.exports = factory(moment);
    } else {}
}(this, function (moment)
{
    'use strict';

    /**
     * feature detection and helper functions
     */
    var hasMoment = typeof moment === 'function',

    hasEventListeners = !!window.addEventListener,

    document = window.document,

    sto = window.setTimeout,

    addEvent = function(el, e, callback, capture)
    {
        if (hasEventListeners) {
            el.addEventListener(e, callback, !!capture);
        } else {
            el.attachEvent('on' + e, callback);
        }
    },

    removeEvent = function(el, e, callback, capture)
    {
        if (hasEventListeners) {
            el.removeEventListener(e, callback, !!capture);
        } else {
            el.detachEvent('on' + e, callback);
        }
    },

    trim = function(str)
    {
        return str.trim ? str.trim() : str.replace(/^\s+|\s+$/g,'');
    },

    hasClass = function(el, cn)
    {
        return (' ' + el.className + ' ').indexOf(' ' + cn + ' ') !== -1;
    },

    addClass = function(el, cn)
    {
        if (!hasClass(el, cn)) {
            el.className = (el.className === '') ? cn : el.className + ' ' + cn;
        }
    },

    removeClass = function(el, cn)
    {
        el.className = trim((' ' + el.className + ' ').replace(' ' + cn + ' ', ' '));
    },

    isArray = function(obj)
    {
        return (/Array/).test(Object.prototype.toString.call(obj));
    },

    isDate = function(obj)
    {
        return (/Date/).test(Object.prototype.toString.call(obj)) && !isNaN(obj.getTime());
    },

    isWeekend = function(date)
    {
        var day = date.getDay();
        return day === 0 || day === 6;
    },

    isLeapYear = function(year)
    {
        // solution by Matti Virkkunen: http://stackoverflow.com/a/4881951
        return year % 4 === 0 && year % 100 !== 0 || year % 400 === 0;
    },

    getDaysInMonth = function(year, month)
    {
        return [31, isLeapYear(year) ? 29 : 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][month];
    },

    setToStartOfDay = function(date)
    {
        if (isDate(date)) date.setHours(0,0,0,0);
    },

    compareDates = function(a,b)
    {
        // weak date comparison (use setToStartOfDay(date) to ensure correct result)
        return a.getTime() === b.getTime();
    },

    extend = function(to, from, overwrite)
    {
        var prop, hasProp;
        for (prop in from) {
            hasProp = to[prop] !== undefined;
            if (hasProp && typeof from[prop] === 'object' && from[prop] !== null && from[prop].nodeName === undefined) {
                if (isDate(from[prop])) {
                    if (overwrite) {
                        to[prop] = new Date(from[prop].getTime());
                    }
                }
                else if (isArray(from[prop])) {
                    if (overwrite) {
                        to[prop] = from[prop].slice(0);
                    }
                } else {
                    to[prop] = extend({}, from[prop], overwrite);
                }
            } else if (overwrite || !hasProp) {
                to[prop] = from[prop];
            }
        }
        return to;
    },

    fireEvent = function(el, eventName, data)
    {
        var ev;

        if (document.createEvent) {
            ev = document.createEvent('HTMLEvents');
            ev.initEvent(eventName, true, false);
            ev = extend(ev, data);
            el.dispatchEvent(ev);
        } else if (document.createEventObject) {
            ev = document.createEventObject();
            ev = extend(ev, data);
            el.fireEvent('on' + eventName, ev);
        }
    },

    adjustCalendar = function(calendar) {
        if (calendar.month < 0) {
            calendar.year -= Math.ceil(Math.abs(calendar.month)/12);
            calendar.month += 12;
        }
        if (calendar.month > 11) {
            calendar.year += Math.floor(Math.abs(calendar.month)/12);
            calendar.month -= 12;
        }
        return calendar;
    },

    /**
     * defaults and localisation
     */
    defaults = {

        // bind the picker to a form field
        field: null,

        // automatically show/hide the picker on `field` focus (default `true` if `field` is set)
        bound: undefined,

        // data-attribute on the input field with an aria assistance tekst (only applied when `bound` is set)
        ariaLabel: 'Use the arrow keys to pick a date',

        // position of the datepicker, relative to the field (default to bottom & left)
        // ('bottom' & 'left' keywords are not used, 'top' & 'right' are modifier on the bottom/left position)
        position: 'bottom left',

        // automatically fit in the viewport even if it means repositioning from the position option
        reposition: true,

        // the default output format for `.toString()` and `field` value
        format: 'YYYY-MM-DD',

        // the toString function which gets passed a current date object and format
        // and returns a string
        toString: null,

        // used to create date object from current input string
        parse: null,

        // the initial date to view when first opened
        defaultDate: null,

        // make the `defaultDate` the initial selected value
        setDefaultDate: false,

        // first day of week (0: Sunday, 1: Monday etc)
        firstDay: 0,

        // the default flag for moment's strict date parsing
        formatStrict: false,

        // the minimum/earliest date that can be selected
        minDate: null,
        // the maximum/latest date that can be selected
        maxDate: null,

        // number of years either side, or array of upper/lower range
        yearRange: 10,

        // show week numbers at head of row
        showWeekNumber: false,

        // Week picker mode
        pickWholeWeek: false,

        // used internally (don't config outside)
        minYear: 0,
        maxYear: 9999,
        minMonth: undefined,
        maxMonth: undefined,

        startRange: null,
        endRange: null,

        isRTL: false,

        // Additional text to append to the year in the calendar title
        yearSuffix: '',

        // Render the month after year in the calendar title
        showMonthAfterYear: false,

        // Render days of the calendar grid that fall in the next or previous month
        showDaysInNextAndPreviousMonths: false,

        // Allows user to select days that fall in the next or previous month
        enableSelectionDaysInNextAndPreviousMonths: false,

        // how many months are visible
        numberOfMonths: 1,

        // when numberOfMonths is used, this will help you to choose where the main calendar will be (default `left`, can be set to `right`)
        // only used for the first display or when a selected date is not visible
        mainCalendar: 'left',

        // Specify a DOM element to render the calendar in
        container: undefined,

        // Blur field when date is selected
        blurFieldOnSelect : true,

        // internationalization
        i18n: {
            previousMonth : 'Previous Month',
            nextMonth     : 'Next Month',
            months        : ['January','February','March','April','May','June','July','August','September','October','November','December'],
            weekdays      : ['Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday'],
            weekdaysShort : ['Sun','Mon','Tue','Wed','Thu','Fri','Sat']
        },

        // Theme Classname
        theme: null,

        // events array
        events: [],

        // callback function
        onSelect: null,
        onOpen: null,
        onClose: null,
        onDraw: null,

        // Enable keyboard input
        keyboardInput: true
    },


    /**
     * templating functions to abstract HTML rendering
     */
    renderDayName = function(opts, day, abbr)
    {
        day += opts.firstDay;
        while (day >= 7) {
            day -= 7;
        }
        return abbr ? opts.i18n.weekdaysShort[day] : opts.i18n.weekdays[day];
    },

    renderDay = function(opts)
    {
        var arr = [];
        var ariaSelected = 'false';
        if (opts.isEmpty) {
            if (opts.showDaysInNextAndPreviousMonths) {
                arr.push('is-outside-current-month');

                if(!opts.enableSelectionDaysInNextAndPreviousMonths) {
                    arr.push('is-selection-disabled');
                }

            } else {
                return '<td class="is-empty"></td>';
            }
        }
        if (opts.isDisabled) {
            arr.push('is-disabled');
        }
        if (opts.isToday) {
            arr.push('is-today');
        }
        if (opts.isSelected) {
            arr.push('is-selected');
            ariaSelected = 'true';
        }
        if (opts.hasEvent) {
            arr.push('has-event');
        }
        if (opts.isInRange) {
            arr.push('is-inrange');
        }
        if (opts.isStartRange) {
            arr.push('is-startrange');
        }
        if (opts.isEndRange) {
            arr.push('is-endrange');
        }
        return '<td data-day="' + opts.day + '" class="' + arr.join(' ') + '" aria-selected="' + ariaSelected + '">' +
                 '<button class="pika-button pika-day" type="button" ' +
                    'data-pika-year="' + opts.year + '" data-pika-month="' + opts.month + '" data-pika-day="' + opts.day + '">' +
                        opts.day +
                 '</button>' +
               '</td>';
    },

    renderWeek = function (d, m, y) {
        // Lifted from http://javascript.about.com/library/blweekyear.htm, lightly modified.
        var onejan = new Date(y, 0, 1),
            weekNum = Math.ceil((((new Date(y, m, d) - onejan) / 86400000) + onejan.getDay()+1)/7);
        return '<td class="pika-week">' + weekNum + '</td>';
    },

    renderRow = function(days, isRTL, pickWholeWeek, isRowSelected)
    {
        return '<tr class="pika-row' + (pickWholeWeek ? ' pick-whole-week' : '') + (isRowSelected ? ' is-selected' : '') + '">' + (isRTL ? days.reverse() : days).join('') + '</tr>';
    },

    renderBody = function(rows)
    {
        return '<tbody>' + rows.join('') + '</tbody>';
    },

    renderHead = function(opts)
    {
        var i, arr = [];
        if (opts.showWeekNumber) {
            arr.push('<th></th>');
        }
        for (i = 0; i < 7; i++) {
            arr.push('<th scope="col"><abbr title="' + renderDayName(opts, i) + '">' + renderDayName(opts, i, true) + '</abbr></th>');
        }
        return '<thead><tr>' + (opts.isRTL ? arr.reverse() : arr).join('') + '</tr></thead>';
    },

    renderTitle = function(instance, c, year, month, refYear, randId)
    {
        var i, j, arr,
            opts = instance._o,
            isMinYear = year === opts.minYear,
            isMaxYear = year === opts.maxYear,
            html = '<div id="' + randId + '" class="pika-title" role="heading" aria-live="assertive">',
            monthHtml,
            yearHtml,
            prev = true,
            next = true;

        for (arr = [], i = 0; i < 12; i++) {
            arr.push('<option value="' + (year === refYear ? i - c : 12 + i - c) + '"' +
                (i === month ? ' selected="selected"': '') +
                ((isMinYear && i < opts.minMonth) || (isMaxYear && i > opts.maxMonth) ? 'disabled="disabled"' : '') + '>' +
                opts.i18n.months[i] + '</option>');
        }

        monthHtml = '<div class="pika-label">' + opts.i18n.months[month] + '<select class="pika-select pika-select-month" tabindex="-1">' + arr.join('') + '</select></div>';

        if (isArray(opts.yearRange)) {
            i = opts.yearRange[0];
            j = opts.yearRange[1] + 1;
        } else {
            i = year - opts.yearRange;
            j = 1 + year + opts.yearRange;
        }

        for (arr = []; i < j && i <= opts.maxYear; i++) {
            if (i >= opts.minYear) {
                arr.push('<option value="' + i + '"' + (i === year ? ' selected="selected"': '') + '>' + (i) + '</option>');
            }
        }
        yearHtml = '<div class="pika-label">' + year + opts.yearSuffix + '<select class="pika-select pika-select-year" tabindex="-1">' + arr.join('') + '</select></div>';

        if (opts.showMonthAfterYear) {
            html += yearHtml + monthHtml;
        } else {
            html += monthHtml + yearHtml;
        }

        if (isMinYear && (month === 0 || opts.minMonth >= month)) {
            prev = false;
        }

        if (isMaxYear && (month === 11 || opts.maxMonth <= month)) {
            next = false;
        }

        if (c === 0) {
            html += '<button class="pika-prev' + (prev ? '' : ' is-disabled') + '" type="button">' + opts.i18n.previousMonth + '</button>';
        }
        if (c === (instance._o.numberOfMonths - 1) ) {
            html += '<button class="pika-next' + (next ? '' : ' is-disabled') + '" type="button">' + opts.i18n.nextMonth + '</button>';
        }

        return html += '</div>';
    },

    renderTable = function(opts, data, randId)
    {
        return '<table cellpadding="0" cellspacing="0" class="pika-table" role="grid" aria-labelledby="' + randId + '">' + renderHead(opts) + renderBody(data) + '</table>';
    },


    /**
     * Pikaday constructor
     */
    Pikaday = function(options)
    {
        var self = this,
            opts = self.config(options);

        self._onMouseDown = function(e)
        {
            if (!self._v) {
                return;
            }
            e = e || window.event;
            var target = e.target || e.srcElement;
            if (!target) {
                return;
            }

            if (!hasClass(target, 'is-disabled')) {
                if (hasClass(target, 'pika-button') && !hasClass(target, 'is-empty') && !hasClass(target.parentNode, 'is-disabled')) {
                    self.setDate(new Date(target.getAttribute('data-pika-year'), target.getAttribute('data-pika-month'), target.getAttribute('data-pika-day')));
                    if (opts.bound) {
                        sto(function() {
                            self.hide();
                            if (opts.blurFieldOnSelect && opts.field) {
                                opts.field.blur();
                            }
                        }, 100);
                    }
                }
                else if (hasClass(target, 'pika-prev')) {
                    self.prevMonth();
                }
                else if (hasClass(target, 'pika-next')) {
                    self.nextMonth();
                }
            }
            if (!hasClass(target, 'pika-select')) {
                // if this is touch event prevent mouse events emulation
                if (e.preventDefault) {
                    e.preventDefault();
                } else {
                    e.returnValue = false;
                    return false;
                }
            } else {
                self._c = true;
            }
        };

        self._onChange = function(e)
        {
            e = e || window.event;
            var target = e.target || e.srcElement;
            if (!target) {
                return;
            }
            if (hasClass(target, 'pika-select-month')) {
                self.gotoMonth(target.value);
            }
            else if (hasClass(target, 'pika-select-year')) {
                self.gotoYear(target.value);
            }
        };

        self._onKeyChange = function(e)
        {
            e = e || window.event;

            if (self.isVisible()) {

                switch(e.keyCode){
                    case 13:
                    case 27:
                        if (opts.field) {
                            opts.field.blur();
                        }
                        break;
                    case 37:
                        e.preventDefault();
                        self.adjustDate('subtract', 1);
                        break;
                    case 38:
                        self.adjustDate('subtract', 7);
                        break;
                    case 39:
                        self.adjustDate('add', 1);
                        break;
                    case 40:
                        self.adjustDate('add', 7);
                        break;
                }
            }
        };

        self._onInputChange = function(e)
        {
            var date;

            if (e.firedBy === self) {
                return;
            }
            if (opts.parse) {
                date = opts.parse(opts.field.value, opts.format);
            } else if (hasMoment) {
                date = moment(opts.field.value, opts.format, opts.formatStrict);
                date = (date && date.isValid()) ? date.toDate() : null;
            }
            else {
                date = new Date(Date.parse(opts.field.value));
            }
            if (isDate(date)) {
              self.setDate(date);
            }
            if (!self._v) {
                self.show();
            }
        };

        self._onInputFocus = function()
        {
            self.show();
        };

        self._onInputClick = function()
        {
            self.show();
        };

        self._onInputBlur = function()
        {
            // IE allows pika div to gain focus; catch blur the input field
            var pEl = document.activeElement;
            do {
                if (hasClass(pEl, 'pika-single')) {
                    return;
                }
            }
            while ((pEl = pEl.parentNode));

            if (!self._c) {
                self._b = sto(function() {
                    self.hide();
                }, 50);
            }
            self._c = false;
        };

        self._onClick = function(e)
        {
            e = e || window.event;
            var target = e.target || e.srcElement,
                pEl = target;
            if (!target) {
                return;
            }
            if (!hasEventListeners && hasClass(target, 'pika-select')) {
                if (!target.onchange) {
                    target.setAttribute('onchange', 'return;');
                    addEvent(target, 'change', self._onChange);
                }
            }
            do {
                if (hasClass(pEl, 'pika-single') || pEl === opts.trigger) {
                    return;
                }
            }
            while ((pEl = pEl.parentNode));
            if (self._v && target !== opts.trigger && pEl !== opts.trigger) {
                self.hide();
            }
        };

        self.el = document.createElement('div');
        self.el.className = 'pika-single' + (opts.isRTL ? ' is-rtl' : '') + (opts.theme ? ' ' + opts.theme : '');

        addEvent(self.el, 'mousedown', self._onMouseDown, true);
        addEvent(self.el, 'touchend', self._onMouseDown, true);
        addEvent(self.el, 'change', self._onChange);

        if (opts.keyboardInput) {
            addEvent(document, 'keydown', self._onKeyChange);
        }

        if (opts.field) {
            if (opts.container) {
                opts.container.appendChild(self.el);
            } else if (opts.bound) {
                document.body.appendChild(self.el);
            } else {
                opts.field.parentNode.insertBefore(self.el, opts.field.nextSibling);
            }
            addEvent(opts.field, 'change', self._onInputChange);

            if (!opts.defaultDate) {
                if (hasMoment && opts.field.value) {
                    opts.defaultDate = moment(opts.field.value, opts.format).toDate();
                } else {
                    opts.defaultDate = new Date(Date.parse(opts.field.value));
                }
                opts.setDefaultDate = true;
            }
        }

        var defDate = opts.defaultDate;

        if (isDate(defDate)) {
            if (opts.setDefaultDate) {
                self.setDate(defDate, true);
            } else {
                self.gotoDate(defDate);
            }
        } else {
            self.gotoDate(new Date());
        }

        if (opts.bound) {
            this.hide();
            self.el.className += ' is-bound';
            addEvent(opts.trigger, 'click', self._onInputClick);
            addEvent(opts.trigger, 'focus', self._onInputFocus);
            addEvent(opts.trigger, 'blur', self._onInputBlur);
        } else {
            this.show();
        }
    };


    /**
     * public Pikaday API
     */
    Pikaday.prototype = {


        /**
         * configure functionality
         */
        config: function(options)
        {
            if (!this._o) {
                this._o = extend({}, defaults, true);
            }

            var opts = extend(this._o, options, true);

            opts.isRTL = !!opts.isRTL;

            opts.field = (opts.field && opts.field.nodeName) ? opts.field : null;

            opts.theme = (typeof opts.theme) === 'string' && opts.theme ? opts.theme : null;

            opts.bound = !!(opts.bound !== undefined ? opts.field && opts.bound : opts.field);

            opts.trigger = (opts.trigger && opts.trigger.nodeName) ? opts.trigger : opts.field;

            opts.disableWeekends = !!opts.disableWeekends;

            opts.disableDayFn = (typeof opts.disableDayFn) === 'function' ? opts.disableDayFn : null;

            var nom = parseInt(opts.numberOfMonths, 10) || 1;
            opts.numberOfMonths = nom > 4 ? 4 : nom;

            if (!isDate(opts.minDate)) {
                opts.minDate = false;
            }
            if (!isDate(opts.maxDate)) {
                opts.maxDate = false;
            }
            if ((opts.minDate && opts.maxDate) && opts.maxDate < opts.minDate) {
                opts.maxDate = opts.minDate = false;
            }
            if (opts.minDate) {
                this.setMinDate(opts.minDate);
            }
            if (opts.maxDate) {
                this.setMaxDate(opts.maxDate);
            }

            if (isArray(opts.yearRange)) {
                var fallback = new Date().getFullYear() - 10;
                opts.yearRange[0] = parseInt(opts.yearRange[0], 10) || fallback;
                opts.yearRange[1] = parseInt(opts.yearRange[1], 10) || fallback;
            } else {
                opts.yearRange = Math.abs(parseInt(opts.yearRange, 10)) || defaults.yearRange;
                if (opts.yearRange > 100) {
                    opts.yearRange = 100;
                }
            }

            return opts;
        },

        /**
         * return a formatted string of the current selection (using Moment.js if available)
         */
        toString: function(format)
        {
            format = format || this._o.format;
            if (!isDate(this._d)) {
                return '';
            }
            if (this._o.toString) {
              return this._o.toString(this._d, format);
            }
            if (hasMoment) {
              return moment(this._d).format(format);
            }
            return this._d.toDateString();
        },

        /**
         * return a Moment.js object of the current selection (if available)
         */
        getMoment: function()
        {
            return hasMoment ? moment(this._d) : null;
        },

        /**
         * set the current selection from a Moment.js object (if available)
         */
        setMoment: function(date, preventOnSelect)
        {
            if (hasMoment && moment.isMoment(date)) {
                this.setDate(date.toDate(), preventOnSelect);
            }
        },

        /**
         * return a Date object of the current selection
         */
        getDate: function()
        {
            return isDate(this._d) ? new Date(this._d.getTime()) : null;
        },

        /**
         * set the current selection
         */
        setDate: function(date, preventOnSelect)
        {
            if (!date) {
                this._d = null;

                if (this._o.field) {
                    this._o.field.value = '';
                    fireEvent(this._o.field, 'change', { firedBy: this });
                }

                return this.draw();
            }
            if (typeof date === 'string') {
                date = new Date(Date.parse(date));
            }
            if (!isDate(date)) {
                return;
            }

            var min = this._o.minDate,
                max = this._o.maxDate;

            if (isDate(min) && date < min) {
                date = min;
            } else if (isDate(max) && date > max) {
                date = max;
            }

            this._d = new Date(date.getTime());
            setToStartOfDay(this._d);
            this.gotoDate(this._d);

            if (this._o.field) {
                this._o.field.value = this.toString();
                fireEvent(this._o.field, 'change', { firedBy: this });
            }
            if (!preventOnSelect && typeof this._o.onSelect === 'function') {
                this._o.onSelect.call(this, this.getDate());
            }
        },

        /**
         * change view to a specific date
         */
        gotoDate: function(date)
        {
            var newCalendar = true;

            if (!isDate(date)) {
                return;
            }

            if (this.calendars) {
                var firstVisibleDate = new Date(this.calendars[0].year, this.calendars[0].month, 1),
                    lastVisibleDate = new Date(this.calendars[this.calendars.length-1].year, this.calendars[this.calendars.length-1].month, 1),
                    visibleDate = date.getTime();
                // get the end of the month
                lastVisibleDate.setMonth(lastVisibleDate.getMonth()+1);
                lastVisibleDate.setDate(lastVisibleDate.getDate()-1);
                newCalendar = (visibleDate < firstVisibleDate.getTime() || lastVisibleDate.getTime() < visibleDate);
            }

            if (newCalendar) {
                this.calendars = [{
                    month: date.getMonth(),
                    year: date.getFullYear()
                }];
                if (this._o.mainCalendar === 'right') {
                    this.calendars[0].month += 1 - this._o.numberOfMonths;
                }
            }

            this.adjustCalendars();
        },

        adjustDate: function(sign, days) {

            var day = this.getDate() || new Date();
            var difference = parseInt(days)*24*60*60*1000;

            var newDay;

            if (sign === 'add') {
                newDay = new Date(day.valueOf() + difference);
            } else if (sign === 'subtract') {
                newDay = new Date(day.valueOf() - difference);
            }

            this.setDate(newDay);
        },

        adjustCalendars: function() {
            this.calendars[0] = adjustCalendar(this.calendars[0]);
            for (var c = 1; c < this._o.numberOfMonths; c++) {
                this.calendars[c] = adjustCalendar({
                    month: this.calendars[0].month + c,
                    year: this.calendars[0].year
                });
            }
            this.draw();
        },

        gotoToday: function()
        {
            this.gotoDate(new Date());
        },

        /**
         * change view to a specific month (zero-index, e.g. 0: January)
         */
        gotoMonth: function(month)
        {
            if (!isNaN(month)) {
                this.calendars[0].month = parseInt(month, 10);
                this.adjustCalendars();
            }
        },

        nextMonth: function()
        {
            this.calendars[0].month++;
            this.adjustCalendars();
        },

        prevMonth: function()
        {
            this.calendars[0].month--;
            this.adjustCalendars();
        },

        /**
         * change view to a specific full year (e.g. "2012")
         */
        gotoYear: function(year)
        {
            if (!isNaN(year)) {
                this.calendars[0].year = parseInt(year, 10);
                this.adjustCalendars();
            }
        },

        /**
         * change the minDate
         */
        setMinDate: function(value)
        {
            if(value instanceof Date) {
                setToStartOfDay(value);
                this._o.minDate = value;
                this._o.minYear  = value.getFullYear();
                this._o.minMonth = value.getMonth();
            } else {
                this._o.minDate = defaults.minDate;
                this._o.minYear  = defaults.minYear;
                this._o.minMonth = defaults.minMonth;
                this._o.startRange = defaults.startRange;
            }

            this.draw();
        },

        /**
         * change the maxDate
         */
        setMaxDate: function(value)
        {
            if(value instanceof Date) {
                setToStartOfDay(value);
                this._o.maxDate = value;
                this._o.maxYear = value.getFullYear();
                this._o.maxMonth = value.getMonth();
            } else {
                this._o.maxDate = defaults.maxDate;
                this._o.maxYear = defaults.maxYear;
                this._o.maxMonth = defaults.maxMonth;
                this._o.endRange = defaults.endRange;
            }

            this.draw();
        },

        setStartRange: function(value)
        {
            this._o.startRange = value;
        },

        setEndRange: function(value)
        {
            this._o.endRange = value;
        },

        /**
         * refresh the HTML
         */
        draw: function(force)
        {
            if (!this._v && !force) {
                return;
            }
            var opts = this._o,
                minYear = opts.minYear,
                maxYear = opts.maxYear,
                minMonth = opts.minMonth,
                maxMonth = opts.maxMonth,
                html = '',
                randId;

            if (this._y <= minYear) {
                this._y = minYear;
                if (!isNaN(minMonth) && this._m < minMonth) {
                    this._m = minMonth;
                }
            }
            if (this._y >= maxYear) {
                this._y = maxYear;
                if (!isNaN(maxMonth) && this._m > maxMonth) {
                    this._m = maxMonth;
                }
            }

            randId = 'pika-title-' + Math.random().toString(36).replace(/[^a-z]+/g, '').substr(0, 2);

            for (var c = 0; c < opts.numberOfMonths; c++) {
                html += '<div class="pika-lendar">' + renderTitle(this, c, this.calendars[c].year, this.calendars[c].month, this.calendars[0].year, randId) + this.render(this.calendars[c].year, this.calendars[c].month, randId) + '</div>';
            }

            this.el.innerHTML = html;

            if (opts.bound) {
                if(opts.field.type !== 'hidden') {
                    sto(function() {
                        opts.trigger.focus();
                    }, 1);
                }
            }

            if (typeof this._o.onDraw === 'function') {
                this._o.onDraw(this);
            }

            if (opts.bound) {
                // let the screen reader user know to use arrow keys
                opts.field.setAttribute('aria-label', opts.ariaLabel);
            }
        },

        adjustPosition: function()
        {
            var field, pEl, width, height, viewportWidth, viewportHeight, scrollTop, left, top, clientRect, leftAligned, bottomAligned;

            if (this._o.container) return;

            this.el.style.position = 'absolute';

            field = this._o.trigger;
            pEl = field;
            width = this.el.offsetWidth;
            height = this.el.offsetHeight;
            viewportWidth = window.innerWidth || document.documentElement.clientWidth;
            viewportHeight = window.innerHeight || document.documentElement.clientHeight;
            scrollTop = window.pageYOffset || document.body.scrollTop || document.documentElement.scrollTop;
            leftAligned = true;
            bottomAligned = true;

            if (typeof field.getBoundingClientRect === 'function') {
                clientRect = field.getBoundingClientRect();
                left = clientRect.left + window.pageXOffset;
                top = clientRect.bottom + window.pageYOffset;
            } else {
                left = pEl.offsetLeft;
                top  = pEl.offsetTop + pEl.offsetHeight;
                while((pEl = pEl.offsetParent)) {
                    left += pEl.offsetLeft;
                    top  += pEl.offsetTop;
                }
            }

            // default position is bottom & left
            if ((this._o.reposition && left + width > viewportWidth) ||
                (
                    this._o.position.indexOf('right') > -1 &&
                    left - width + field.offsetWidth > 0
                )
            ) {
                left = left - width + field.offsetWidth;
                leftAligned = false;
            }
            if ((this._o.reposition && top + height > viewportHeight + scrollTop) ||
                (
                    this._o.position.indexOf('top') > -1 &&
                    top - height - field.offsetHeight > 0
                )
            ) {
                top = top - height - field.offsetHeight;
                bottomAligned = false;
            }

            this.el.style.left = left + 'px';
            this.el.style.top = top + 'px';

            addClass(this.el, leftAligned ? 'left-aligned' : 'right-aligned');
            addClass(this.el, bottomAligned ? 'bottom-aligned' : 'top-aligned');
            removeClass(this.el, !leftAligned ? 'left-aligned' : 'right-aligned');
            removeClass(this.el, !bottomAligned ? 'bottom-aligned' : 'top-aligned');
        },

        /**
         * render HTML for a particular month
         */
        render: function(year, month, randId)
        {
            var opts   = this._o,
                now    = new Date(),
                days   = getDaysInMonth(year, month),
                before = new Date(year, month, 1).getDay(),
                data   = [],
                row    = [];
            setToStartOfDay(now);
            if (opts.firstDay > 0) {
                before -= opts.firstDay;
                if (before < 0) {
                    before += 7;
                }
            }
            var previousMonth = month === 0 ? 11 : month - 1,
                nextMonth = month === 11 ? 0 : month + 1,
                yearOfPreviousMonth = month === 0 ? year - 1 : year,
                yearOfNextMonth = month === 11 ? year + 1 : year,
                daysInPreviousMonth = getDaysInMonth(yearOfPreviousMonth, previousMonth);
            var cells = days + before,
                after = cells;
            while(after > 7) {
                after -= 7;
            }
            cells += 7 - after;
            var isWeekSelected = false;
            for (var i = 0, r = 0; i < cells; i++)
            {
                var day = new Date(year, month, 1 + (i - before)),
                    isSelected = isDate(this._d) ? compareDates(day, this._d) : false,
                    isToday = compareDates(day, now),
                    hasEvent = opts.events.indexOf(day.toDateString()) !== -1 ? true : false,
                    isEmpty = i < before || i >= (days + before),
                    dayNumber = 1 + (i - before),
                    monthNumber = month,
                    yearNumber = year,
                    isStartRange = opts.startRange && compareDates(opts.startRange, day),
                    isEndRange = opts.endRange && compareDates(opts.endRange, day),
                    isInRange = opts.startRange && opts.endRange && opts.startRange < day && day < opts.endRange,
                    isDisabled = (opts.minDate && day < opts.minDate) ||
                                 (opts.maxDate && day > opts.maxDate) ||
                                 (opts.disableWeekends && isWeekend(day)) ||
                                 (opts.disableDayFn && opts.disableDayFn(day));

                if (isEmpty) {
                    if (i < before) {
                        dayNumber = daysInPreviousMonth + dayNumber;
                        monthNumber = previousMonth;
                        yearNumber = yearOfPreviousMonth;
                    } else {
                        dayNumber = dayNumber - days;
                        monthNumber = nextMonth;
                        yearNumber = yearOfNextMonth;
                    }
                }

                var dayConfig = {
                        day: dayNumber,
                        month: monthNumber,
                        year: yearNumber,
                        hasEvent: hasEvent,
                        isSelected: isSelected,
                        isToday: isToday,
                        isDisabled: isDisabled,
                        isEmpty: isEmpty,
                        isStartRange: isStartRange,
                        isEndRange: isEndRange,
                        isInRange: isInRange,
                        showDaysInNextAndPreviousMonths: opts.showDaysInNextAndPreviousMonths,
                        enableSelectionDaysInNextAndPreviousMonths: opts.enableSelectionDaysInNextAndPreviousMonths
                    };

                if (opts.pickWholeWeek && isSelected) {
                    isWeekSelected = true;
                }

                row.push(renderDay(dayConfig));

                if (++r === 7) {
                    if (opts.showWeekNumber) {
                        row.unshift(renderWeek(i - before, month, year));
                    }
                    data.push(renderRow(row, opts.isRTL, opts.pickWholeWeek, isWeekSelected));
                    row = [];
                    r = 0;
                    isWeekSelected = false;
                }
            }
            return renderTable(opts, data, randId);
        },

        isVisible: function()
        {
            return this._v;
        },

        show: function()
        {
            if (!this.isVisible()) {
                this._v = true;
                this.draw();
                removeClass(this.el, 'is-hidden');
                if (this._o.bound) {
                    addEvent(document, 'click', this._onClick);
                    this.adjustPosition();
                }
                if (typeof this._o.onOpen === 'function') {
                    this._o.onOpen.call(this);
                }
            }
        },

        hide: function()
        {
            var v = this._v;
            if (v !== false) {
                if (this._o.bound) {
                    removeEvent(document, 'click', this._onClick);
                }
                this.el.style.position = 'static'; // reset
                this.el.style.left = 'auto';
                this.el.style.top = 'auto';
                addClass(this.el, 'is-hidden');
                this._v = false;
                if (v !== undefined && typeof this._o.onClose === 'function') {
                    this._o.onClose.call(this);
                }
            }
        },

        /**
         * GAME OVER
         */
        destroy: function()
        {
            var opts = this._o;

            this.hide();
            removeEvent(this.el, 'mousedown', this._onMouseDown, true);
            removeEvent(this.el, 'touchend', this._onMouseDown, true);
            removeEvent(this.el, 'change', this._onChange);
            if (opts.keyboardInput) {
                removeEvent(document, 'keydown', this._onKeyChange);
            }
            if (opts.field) {
                removeEvent(opts.field, 'change', this._onInputChange);
                if (opts.bound) {
                    removeEvent(opts.trigger, 'click', this._onInputClick);
                    removeEvent(opts.trigger, 'focus', this._onInputFocus);
                    removeEvent(opts.trigger, 'blur', this._onInputBlur);
                }
            }
            if (this.el.parentNode) {
                this.el.parentNode.removeChild(this.el);
            }
        }

    };

    return Pikaday;
}));


/***/ }),
/* 212 */
/*!************************************!*\
  !*** external "window.Autolinker" ***!
  \************************************/
/*! no static exports found */
/*! exports used: default */
/***/ (function(module, exports) {

module.exports = window.Autolinker;

/***/ }),
/* 213 */
/*!****************************!*\
  !*** ./dev/Common/Mime.js ***!
  \****************************/
/*! exports provided: Mime, default */
/*! exports used: Mime */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Mime; });
/* unused harmony export default */
/* eslint key-spacing: 0 */

/* eslint quote-props: 0 */
var Mime = {
  'eml': 'message/rfc822',
  'mime': 'message/rfc822',
  'txt': 'text/plain',
  'text': 'text/plain',
  'def': 'text/plain',
  'list': 'text/plain',
  'in': 'text/plain',
  'ini': 'text/plain',
  'log': 'text/plain',
  'sql': 'text/plain',
  'cfg': 'text/plain',
  'conf': 'text/plain',
  'asc': 'text/plain',
  'rtx': 'text/richtext',
  'vcard': 'text/vcard',
  'vcf': 'text/vcard',
  'htm': 'text/html',
  'html': 'text/html',
  'csv': 'text/csv',
  'ics': 'text/calendar',
  'ifb': 'text/calendar',
  'xml': 'text/xml',
  'json': 'application/json',
  'swf': 'application/x-shockwave-flash',
  'hlp': 'application/winhlp',
  'wgt': 'application/widget',
  'chm': 'application/vnd.ms-htmlhelp',
  'p10': 'application/pkcs10',
  'p7c': 'application/pkcs7-mime',
  'p7m': 'application/pkcs7-mime',
  'p7s': 'application/pkcs7-signature',
  'torrent': 'application/x-bittorrent',
  // scripts
  'js': 'application/javascript',
  'pl': 'text/perl',
  'css': 'text/css',
  'asp': 'text/asp',
  'php': 'application/x-httpd-php',
  'php3': 'application/x-httpd-php',
  'php4': 'application/x-httpd-php',
  'php5': 'application/x-httpd-php',
  'phtml': 'application/x-httpd-php',
  // images
  'png': 'image/png',
  'jpg': 'image/jpeg',
  'jpeg': 'image/jpeg',
  'jpe': 'image/jpeg',
  'jfif': 'image/jpeg',
  'gif': 'image/gif',
  'bmp': 'image/bmp',
  'cgm': 'image/cgm',
  'ief': 'image/ief',
  'ico': 'image/x-icon',
  'tif': 'image/tiff',
  'tiff': 'image/tiff',
  'svg': 'image/svg+xml',
  'svgz': 'image/svg+xml',
  'djv': 'image/vnd.djvu',
  'djvu': 'image/vnd.djvu',
  'webp': 'image/webp',
  // archives
  'zip': 'application/zip',
  '7z': 'application/x-7z-compressed',
  'rar': 'application/x-rar-compressed',
  'exe': 'application/x-msdownload',
  'dll': 'application/x-msdownload',
  'scr': 'application/x-msdownload',
  'com': 'application/x-msdownload',
  'bat': 'application/x-msdownload',
  'msi': 'application/x-msdownload',
  'cab': 'application/vnd.ms-cab-compressed',
  'gz': 'application/x-gzip',
  'tgz': 'application/x-gzip',
  'bz': 'application/x-bzip',
  'bz2': 'application/x-bzip2',
  'deb': 'application/x-debian-package',
  // fonts
  'psf': 'application/x-font-linux-psf',
  'otf': 'application/x-font-otf',
  'pcf': 'application/x-font-pcf',
  'snf': 'application/x-font-snf',
  'ttf': 'application/x-font-ttf',
  'ttc': 'application/x-font-ttf',
  // audio
  'mp3': 'audio/mpeg',
  'amr': 'audio/amr',
  'aac': 'audio/x-aac',
  'aif': 'audio/x-aiff',
  'aifc': 'audio/x-aiff',
  'aiff': 'audio/x-aiff',
  'wav': 'audio/x-wav',
  'wma': 'audio/x-ms-wma',
  'wax': 'audio/x-ms-wax',
  'midi': 'audio/midi',
  'mp4a': 'audio/mp4',
  'ogg': 'audio/ogg',
  'weba': 'audio/webm',
  'ra': 'audio/x-pn-realaudio',
  'ram': 'audio/x-pn-realaudio',
  'rmp': 'audio/x-pn-realaudio-plugin',
  'm3u': 'audio/x-mpegurl',
  // video
  'flv': 'video/x-flv',
  'qt': 'video/quicktime',
  'mov': 'video/quicktime',
  'wmv': 'video/windows-media',
  'avi': 'video/x-msvideo',
  'mpg': 'video/mpeg',
  'mpeg': 'video/mpeg',
  'mpe': 'video/mpeg',
  'm1v': 'video/mpeg',
  'm2v': 'video/mpeg',
  '3gp': 'video/3gpp',
  '3g2': 'video/3gpp2',
  'h261': 'video/h261',
  'h263': 'video/h263',
  'h264': 'video/h264',
  'jpgv': 'video/jpgv',
  'mp4': 'video/mp4',
  'mp4v': 'video/mp4',
  'mpg4': 'video/mp4',
  'ogv': 'video/ogg',
  'webm': 'video/webm',
  'm4v': 'video/x-m4v',
  'asf': 'video/x-ms-asf',
  'asx': 'video/x-ms-asf',
  'wm': 'video/x-ms-wm',
  'wmx': 'video/x-ms-wmx',
  'wvx': 'video/x-ms-wvx',
  'movie': 'video/x-sgi-movie',
  // adobe
  'pdf': 'application/pdf',
  'psd': 'image/vnd.adobe.photoshop',
  'ai': 'application/postscript',
  'eps': 'application/postscript',
  'ps': 'application/postscript',
  // ms office
  'doc': 'application/msword',
  'dot': 'application/msword',
  'rtf': 'application/rtf',
  'xls': 'application/vnd.ms-excel',
  'ppt': 'application/vnd.ms-powerpoint',
  'docx': 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
  'xlsx': 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
  'dotx': 'application/vnd.openxmlformats-officedocument.wordprocessingml.template',
  'pptx': 'application/vnd.openxmlformats-officedocument.presentationml.presentation',
  // open office
  'odt': 'application/vnd.oasis.opendocument.text',
  'ods': 'application/vnd.oasis.opendocument.spreadsheet'
};


/***/ }),
/* 214 */
/*!***********************************!*\
  !*** ./dev/Stores/User/Filter.js ***!
  \***********************************/
/*! exports provided: default */
/*! exports used: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var ko__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ko */ 1);
/* harmony import */ var Common_Enums__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! Common/Enums */ 0);



var FilterUserStore = function FilterUserStore() {
  this.capa = ko__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].observable('');
  this.modules = ko__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].observable({});
  this.filters = ko__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].observableArray([]);
  this.filters.loading = ko__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].observable(false).extend({
    throttle: Common_Enums__WEBPACK_IMPORTED_MODULE_1__["Magics"].Time200ms
  });
  this.filters.saving = ko__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].observable(false).extend({
    throttle: Common_Enums__WEBPACK_IMPORTED_MODULE_1__["Magics"].Time200ms
  });
  this.raw = ko__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].observable('');
};

/* harmony default export */ __webpack_exports__["a"] = (new FilterUserStore());

/***/ }),
/* 215 */
/*!*******************************************************!*\
  !*** ./node_modules/core-js/internals/object-keys.js ***!
  \*******************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

var internalObjectKeys = __webpack_require__(/*! ../internals/object-keys-internal */ 140);
var enumBugKeys = __webpack_require__(/*! ../internals/enum-bug-keys */ 108);

// `Object.keys` method
// https://tc39.github.io/ecma262/#sec-object.keys
module.exports = Object.keys || function keys(O) {
  return internalObjectKeys(O, enumBugKeys);
};


/***/ }),
/* 216 */
/*!**************************************************************!*\
  !*** ./node_modules/core-js/internals/add-to-unscopables.js ***!
  \**************************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ 32);
var create = __webpack_require__(/*! ../internals/object-create */ 149);
var definePropertyModule = __webpack_require__(/*! ../internals/object-define-property */ 52);

var UNSCOPABLES = wellKnownSymbol('unscopables');
var ArrayPrototype = Array.prototype;

// Array.prototype[@@unscopables]
// https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables
if (ArrayPrototype[UNSCOPABLES] == undefined) {
  definePropertyModule.f(ArrayPrototype, UNSCOPABLES, {
    configurable: true,
    value: create(null)
  });
}

// add a key to Array.prototype[@@unscopables]
module.exports = function (key) {
  ArrayPrototype[UNSCOPABLES][key] = true;
};


/***/ }),
/* 217 */
/*!***********************************************************!*\
  !*** ./node_modules/core-js/internals/define-iterator.js ***!
  \***********************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var $ = __webpack_require__(/*! ../internals/export */ 48);
var createIteratorConstructor = __webpack_require__(/*! ../internals/create-iterator-constructor */ 227);
var getPrototypeOf = __webpack_require__(/*! ../internals/object-get-prototype-of */ 150);
var setPrototypeOf = __webpack_require__(/*! ../internals/object-set-prototype-of */ 218);
var setToStringTag = __webpack_require__(/*! ../internals/set-to-string-tag */ 109);
var createNonEnumerableProperty = __webpack_require__(/*! ../internals/create-non-enumerable-property */ 49);
var redefine = __webpack_require__(/*! ../internals/redefine */ 53);
var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ 32);
var IS_PURE = __webpack_require__(/*! ../internals/is-pure */ 78);
var Iterators = __webpack_require__(/*! ../internals/iterators */ 73);
var IteratorsCore = __webpack_require__(/*! ../internals/iterators-core */ 167);

var IteratorPrototype = IteratorsCore.IteratorPrototype;
var BUGGY_SAFARI_ITERATORS = IteratorsCore.BUGGY_SAFARI_ITERATORS;
var ITERATOR = wellKnownSymbol('iterator');
var KEYS = 'keys';
var VALUES = 'values';
var ENTRIES = 'entries';

var returnThis = function () { return this; };

module.exports = function (Iterable, NAME, IteratorConstructor, next, DEFAULT, IS_SET, FORCED) {
  createIteratorConstructor(IteratorConstructor, NAME, next);

  var getIterationMethod = function (KIND) {
    if (KIND === DEFAULT && defaultIterator) return defaultIterator;
    if (!BUGGY_SAFARI_ITERATORS && KIND in IterablePrototype) return IterablePrototype[KIND];
    switch (KIND) {
      case KEYS: return function keys() { return new IteratorConstructor(this, KIND); };
      case VALUES: return function values() { return new IteratorConstructor(this, KIND); };
      case ENTRIES: return function entries() { return new IteratorConstructor(this, KIND); };
    } return function () { return new IteratorConstructor(this); };
  };

  var TO_STRING_TAG = NAME + ' Iterator';
  var INCORRECT_VALUES_NAME = false;
  var IterablePrototype = Iterable.prototype;
  var nativeIterator = IterablePrototype[ITERATOR]
    || IterablePrototype['@@iterator']
    || DEFAULT && IterablePrototype[DEFAULT];
  var defaultIterator = !BUGGY_SAFARI_ITERATORS && nativeIterator || getIterationMethod(DEFAULT);
  var anyNativeIterator = NAME == 'Array' ? IterablePrototype.entries || nativeIterator : nativeIterator;
  var CurrentIteratorPrototype, methods, KEY;

  // fix native
  if (anyNativeIterator) {
    CurrentIteratorPrototype = getPrototypeOf(anyNativeIterator.call(new Iterable()));
    if (IteratorPrototype !== Object.prototype && CurrentIteratorPrototype.next) {
      if (!IS_PURE && getPrototypeOf(CurrentIteratorPrototype) !== IteratorPrototype) {
        if (setPrototypeOf) {
          setPrototypeOf(CurrentIteratorPrototype, IteratorPrototype);
        } else if (typeof CurrentIteratorPrototype[ITERATOR] != 'function') {
          createNonEnumerableProperty(CurrentIteratorPrototype, ITERATOR, returnThis);
        }
      }
      // Set @@toStringTag to native iterators
      setToStringTag(CurrentIteratorPrototype, TO_STRING_TAG, true, true);
      if (IS_PURE) Iterators[TO_STRING_TAG] = returnThis;
    }
  }

  // fix Array#{values, @@iterator}.name in V8 / FF
  if (DEFAULT == VALUES && nativeIterator && nativeIterator.name !== VALUES) {
    INCORRECT_VALUES_NAME = true;
    defaultIterator = function values() { return nativeIterator.call(this); };
  }

  // define iterator
  if ((!IS_PURE || FORCED) && IterablePrototype[ITERATOR] !== defaultIterator) {
    createNonEnumerableProperty(IterablePrototype, ITERATOR, defaultIterator);
  }
  Iterators[NAME] = defaultIterator;

  // export additional methods
  if (DEFAULT) {
    methods = {
      values: getIterationMethod(VALUES),
      keys: IS_SET ? defaultIterator : getIterationMethod(KEYS),
      entries: getIterationMethod(ENTRIES)
    };
    if (FORCED) for (KEY in methods) {
      if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {
        redefine(IterablePrototype, KEY, methods[KEY]);
      }
    } else $({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);
  }

  return methods;
};


/***/ }),
/* 218 */
/*!*******************************************************************!*\
  !*** ./node_modules/core-js/internals/object-set-prototype-of.js ***!
  \*******************************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

var anObject = __webpack_require__(/*! ../internals/an-object */ 37);
var aPossiblePrototype = __webpack_require__(/*! ../internals/a-possible-prototype */ 229);

// `Object.setPrototypeOf` method
// https://tc39.github.io/ecma262/#sec-object.setprototypeof
// Works with __proto__ only. Old v8 can't work with null proto objects.
/* eslint-disable no-proto */
module.exports = Object.setPrototypeOf || ('__proto__' in {} ? function () {
  var CORRECT_SETTER = false;
  var test = {};
  var setter;
  try {
    setter = Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set;
    setter.call(test, []);
    CORRECT_SETTER = test instanceof Array;
  } catch (error) { /* empty */ }
  return function setPrototypeOf(O, proto) {
    anObject(O);
    aPossiblePrototype(proto);
    if (CORRECT_SETTER) setter.call(O, proto);
    else O.__proto__ = proto;
    return O;
  };
}() : undefined);


/***/ }),
/* 219 */
/*!***************************************************************************!*\
  !*** ./node_modules/core-js-pure/modules/web.dom-collections.iterator.js ***!
  \***************************************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

__webpack_require__(/*! ./es.array.iterator */ 220);
var DOMIterables = __webpack_require__(/*! ../internals/dom-iterables */ 308);
var global = __webpack_require__(/*! ../internals/global */ 75);
var hide = __webpack_require__(/*! ../internals/hide */ 83);
var Iterators = __webpack_require__(/*! ../internals/iterators */ 155);
var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ 68);

var TO_STRING_TAG = wellKnownSymbol('toStringTag');

for (var COLLECTION_NAME in DOMIterables) {
  var Collection = global[COLLECTION_NAME];
  var CollectionPrototype = Collection && Collection.prototype;
  if (CollectionPrototype && !CollectionPrototype[TO_STRING_TAG]) {
    hide(CollectionPrototype, TO_STRING_TAG, COLLECTION_NAME);
  }
  Iterators[COLLECTION_NAME] = Iterators.Array;
}


/***/ }),
/* 220 */
/*!****************************************************************!*\
  !*** ./node_modules/core-js-pure/modules/es.array.iterator.js ***!
  \****************************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var toIndexedObject = __webpack_require__(/*! ../internals/to-indexed-object */ 94);
var addToUnscopables = __webpack_require__(/*! ../internals/add-to-unscopables */ 239);
var Iterators = __webpack_require__(/*! ../internals/iterators */ 155);
var InternalStateModule = __webpack_require__(/*! ../internals/internal-state */ 292);
var defineIterator = __webpack_require__(/*! ../internals/define-iterator */ 296);

var ARRAY_ITERATOR = 'Array Iterator';
var setInternalState = InternalStateModule.set;
var getInternalState = InternalStateModule.getterFor(ARRAY_ITERATOR);

// `Array.prototype.entries` method
// https://tc39.github.io/ecma262/#sec-array.prototype.entries
// `Array.prototype.keys` method
// https://tc39.github.io/ecma262/#sec-array.prototype.keys
// `Array.prototype.values` method
// https://tc39.github.io/ecma262/#sec-array.prototype.values
// `Array.prototype[@@iterator]` method
// https://tc39.github.io/ecma262/#sec-array.prototype-@@iterator
// `CreateArrayIterator` internal method
// https://tc39.github.io/ecma262/#sec-createarrayiterator
module.exports = defineIterator(Array, 'Array', function (iterated, kind) {
  setInternalState(this, {
    type: ARRAY_ITERATOR,
    target: toIndexedObject(iterated), // target
    index: 0,                          // next index
    kind: kind                         // kind
  });
// `%ArrayIteratorPrototype%.next` method
// https://tc39.github.io/ecma262/#sec-%arrayiteratorprototype%.next
}, function () {
  var state = getInternalState(this);
  var target = state.target;
  var kind = state.kind;
  var index = state.index++;
  if (!target || index >= target.length) {
    state.target = undefined;
    return { value: undefined, done: true };
  }
  if (kind == 'keys') return { value: index, done: false };
  if (kind == 'values') return { value: target[index], done: false };
  return { value: [index, target[index]], done: false };
}, 'values');

// argumentsList[@@iterator] is %ArrayProto_values%
// https://tc39.github.io/ecma262/#sec-createunmappedargumentsobject
// https://tc39.github.io/ecma262/#sec-createmappedargumentsobject
Iterators.Arguments = Iterators.Array;

// https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables
addToUnscopables('keys');
addToUnscopables('values');
addToUnscopables('entries');


/***/ }),
/* 221 */
/*!*******************************!*\
  !*** ./dev/View/Popup/Ask.js ***!
  \*******************************/
/*! exports provided: AskPopupView, default */
/*! all exports used */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AskPopupView", function() { return AskPopupView; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return AskPopupView; });
/* harmony import */ var _babel_runtime_corejs3_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/esm/inheritsLoose */ 10);
/* harmony import */ var ko__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ko */ 1);
/* harmony import */ var key__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! key */ 21);
/* harmony import */ var key__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(key__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var Common_Enums__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! Common/Enums */ 0);
/* harmony import */ var Common_Utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! Common/Utils */ 2);
/* harmony import */ var Common_Translator__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! Common/Translator */ 9);
/* harmony import */ var Knoin_Knoin__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! Knoin/Knoin */ 7);
/* harmony import */ var Knoin_AbstractViewNext__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! Knoin/AbstractViewNext */ 28);


var _dec, _class;








var AskPopupView = (_dec = Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_6__["popup"])({
  name: 'View/Popup/Ask',
  templateID: 'PopupsAsk'
}), _dec(_class =
/*#__PURE__*/
function (_AbstractViewNext) {
  Object(_babel_runtime_corejs3_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(AskPopupView, _AbstractViewNext);

  function AskPopupView() {
    var _this;

    _this = _AbstractViewNext.call(this) || this;
    _this.askDesc = ko__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"].observable('');
    _this.yesButton = ko__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"].observable('');
    _this.noButton = ko__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"].observable('');
    _this.yesFocus = ko__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"].observable(false);
    _this.noFocus = ko__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"].observable(false);
    _this.fYesAction = null;
    _this.fNoAction = null;
    _this.bFocusYesOnShow = true;
    _this.bDisabeCloseOnEsc = true;
    _this.sDefaultKeyScope = Common_Enums__WEBPACK_IMPORTED_MODULE_3__["KeyState"].PopupAsk;
    return _this;
  }

  var _proto = AskPopupView.prototype;

  _proto.clearPopup = function clearPopup() {
    this.askDesc('');
    this.yesButton(Object(Common_Translator__WEBPACK_IMPORTED_MODULE_5__["i18n"])('POPUPS_ASK/BUTTON_YES'));
    this.noButton(Object(Common_Translator__WEBPACK_IMPORTED_MODULE_5__["i18n"])('POPUPS_ASK/BUTTON_NO'));
    this.yesFocus(false);
    this.noFocus(false);
    this.fYesAction = null;
    this.fNoAction = null;
  };

  _proto.yesClick = function yesClick() {
    this.cancelCommand();

    if (Object(Common_Utils__WEBPACK_IMPORTED_MODULE_4__["isFunc"])(this.fYesAction)) {
      this.fYesAction.call(null);
    }
  };

  _proto.noClick = function noClick() {
    this.cancelCommand();

    if (Object(Common_Utils__WEBPACK_IMPORTED_MODULE_4__["isFunc"])(this.fNoAction)) {
      this.fNoAction.call(null);
    }
  }
  /**
   * @param {string} sAskDesc
   * @param {Function=} fYesFunc
   * @param {Function=} fNoFunc
   * @param {string=} sYesButton
   * @param {string=} sNoButton
   * @param {boolean=} bFocusYesOnShow = true
   * @returns {void}
   */
  ;

  _proto.onShow = function onShow(askDesc, fYesFunc, fNoFunc, yesButton, noButton, isFocusYesOnShow) {
    if (fYesFunc === void 0) {
      fYesFunc = null;
    }

    if (fNoFunc === void 0) {
      fNoFunc = null;
    }

    if (yesButton === void 0) {
      yesButton = '';
    }

    if (noButton === void 0) {
      noButton = '';
    }

    if (isFocusYesOnShow === void 0) {
      isFocusYesOnShow = true;
    }

    this.clearPopup();
    this.fYesAction = fYesFunc || null;
    this.fNoAction = fNoFunc || null;
    this.askDesc(askDesc || '');

    if (yesButton) {
      this.yesButton(yesButton);
    }

    if (noButton) {
      this.noButton(noButton);
    }

    this.bFocusYesOnShow = !!isFocusYesOnShow;
  };

  _proto.onShowWithDelay = function onShowWithDelay() {
    if (this.bFocusYesOnShow) {
      this.yesFocus(true);
    }
  };

  _proto.onBuild = function onBuild() {
    var _this2 = this;

    key__WEBPACK_IMPORTED_MODULE_2___default()('tab, shift+tab, right, left', Common_Enums__WEBPACK_IMPORTED_MODULE_3__["KeyState"].PopupAsk, function () {
      if (_this2.yesFocus()) {
        _this2.noFocus(true);
      } else {
        _this2.yesFocus(true);
      }

      return false;
    });
    key__WEBPACK_IMPORTED_MODULE_2___default()('esc', Common_Enums__WEBPACK_IMPORTED_MODULE_3__["KeyState"].PopupAsk, function () {
      _this2.noClick();

      return false;
    });
  };

  return AskPopupView;
}(Knoin_AbstractViewNext__WEBPACK_IMPORTED_MODULE_7__[/* AbstractViewNext */ "a"])) || _class);


/***/ }),
/* 222 */
/*!**********************************!*\
  !*** ./dev/Stores/User/Quota.js ***!
  \**********************************/
/*! exports provided: default */
/*! exports used: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var window__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! window */ 4);
/* harmony import */ var window__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(window__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var ko__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ko */ 1);
/* harmony import */ var Common_Enums__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! Common/Enums */ 0);




var QuotaUserStore =
/*#__PURE__*/
function () {
  function QuotaUserStore() {
    var _this = this;

    this.quota = ko__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"].observable(0);
    this.usage = ko__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"].observable(0);
    this.percentage = ko__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"].computed(function () {
      var quota = _this.quota(),
          usage = _this.usage();

      return 0 < quota ? window__WEBPACK_IMPORTED_MODULE_0___default.a.Math.ceil(usage / quota * 100) : 0;
    });
  }
  /**
   * @param {number} quota
   * @param {number} usage
   */


  var _proto = QuotaUserStore.prototype;

  _proto.populateData = function populateData(quota, usage) {
    this.quota(quota * Common_Enums__WEBPACK_IMPORTED_MODULE_2__["Magics"].BitLength1024);
    this.usage(usage * Common_Enums__WEBPACK_IMPORTED_MODULE_2__["Magics"].BitLength1024);
  };

  return QuotaUserStore;
}();

/* harmony default export */ __webpack_exports__["a"] = (new QuotaUserStore());

/***/ }),
/* 223 */
/*!***********************************!*\
  !*** external "window.ifvisible" ***!
  \***********************************/
/*! no static exports found */
/*! exports used: default */
/***/ (function(module, exports) {

module.exports = window.ifvisible;

/***/ }),
/* 224 */
/*!********************************************************************!*\
  !*** ./node_modules/core-js/internals/object-define-properties.js ***!
  \********************************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ 47);
var definePropertyModule = __webpack_require__(/*! ../internals/object-define-property */ 52);
var anObject = __webpack_require__(/*! ../internals/an-object */ 37);
var objectKeys = __webpack_require__(/*! ../internals/object-keys */ 215);

// `Object.defineProperties` method
// https://tc39.github.io/ecma262/#sec-object.defineproperties
module.exports = DESCRIPTORS ? Object.defineProperties : function defineProperties(O, Properties) {
  anObject(O);
  var keys = objectKeys(Properties);
  var length = keys.length;
  var index = 0;
  var key;
  while (length > index) definePropertyModule.f(O, key = keys[index++], Properties[key]);
  return O;
};


/***/ }),
/* 225 */
/*!***********************************************************************!*\
  !*** ./node_modules/core-js/internals/array-method-uses-to-length.js ***!
  \***********************************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ 47);
var fails = __webpack_require__(/*! ../internals/fails */ 36);
var has = __webpack_require__(/*! ../internals/has */ 42);

var defineProperty = Object.defineProperty;
var cache = {};

var thrower = function (it) { throw it; };

module.exports = function (METHOD_NAME, options) {
  if (has(cache, METHOD_NAME)) return cache[METHOD_NAME];
  if (!options) options = {};
  var method = [][METHOD_NAME];
  var ACCESSORS = has(options, 'ACCESSORS') ? options.ACCESSORS : false;
  var argument0 = has(options, 0) ? options[0] : thrower;
  var argument1 = has(options, 1) ? options[1] : undefined;

  return cache[METHOD_NAME] = !!method && !fails(function () {
    if (ACCESSORS && !DESCRIPTORS) return true;
    var O = { length: -1 };

    if (ACCESSORS) defineProperty(O, 1, { enumerable: true, get: thrower });
    else O[1] = 1;

    method.call(O, argument0, argument1);
  });
};


/***/ }),
/* 226 */
/*!*****************************************************!*\
  !*** ./node_modules/core-js/internals/is-regexp.js ***!
  \*****************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

var isObject = __webpack_require__(/*! ../internals/is-object */ 44);
var classof = __webpack_require__(/*! ../internals/classof-raw */ 50);
var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ 32);

var MATCH = wellKnownSymbol('match');

// `IsRegExp` abstract operation
// https://tc39.github.io/ecma262/#sec-isregexp
module.exports = function (it) {
  var isRegExp;
  return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : classof(it) == 'RegExp');
};


/***/ }),
/* 227 */
/*!***********************************************************************!*\
  !*** ./node_modules/core-js/internals/create-iterator-constructor.js ***!
  \***********************************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var IteratorPrototype = __webpack_require__(/*! ../internals/iterators-core */ 167).IteratorPrototype;
var create = __webpack_require__(/*! ../internals/object-create */ 149);
var createPropertyDescriptor = __webpack_require__(/*! ../internals/create-property-descriptor */ 90);
var setToStringTag = __webpack_require__(/*! ../internals/set-to-string-tag */ 109);
var Iterators = __webpack_require__(/*! ../internals/iterators */ 73);

var returnThis = function () { return this; };

module.exports = function (IteratorConstructor, NAME, next) {
  var TO_STRING_TAG = NAME + ' Iterator';
  IteratorConstructor.prototype = create(IteratorPrototype, { next: createPropertyDescriptor(1, next) });
  setToStringTag(IteratorConstructor, TO_STRING_TAG, false, true);
  Iterators[TO_STRING_TAG] = returnThis;
  return IteratorConstructor;
};


/***/ }),
/* 228 */
/*!********************************************************************!*\
  !*** ./node_modules/core-js/internals/correct-prototype-getter.js ***!
  \********************************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

var fails = __webpack_require__(/*! ../internals/fails */ 36);

module.exports = !fails(function () {
  function F() { /* empty */ }
  F.prototype.constructor = null;
  return Object.getPrototypeOf(new F()) !== F.prototype;
});


/***/ }),
/* 229 */
/*!****************************************************************!*\
  !*** ./node_modules/core-js/internals/a-possible-prototype.js ***!
  \****************************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

var isObject = __webpack_require__(/*! ../internals/is-object */ 44);

module.exports = function (it) {
  if (!isObject(it) && it !== null) {
    throw TypeError("Can't set " + String(it) + ' as a prototype');
  } return it;
};


/***/ }),
/* 230 */
/*!**********************************************************************!*\
  !*** ./node_modules/core-js/modules/web.dom-collections.iterator.js ***!
  \**********************************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

var global = __webpack_require__(/*! ../internals/global */ 27);
var DOMIterables = __webpack_require__(/*! ../internals/dom-iterables */ 231);
var ArrayIteratorMethods = __webpack_require__(/*! ../modules/es.array.iterator */ 186);
var createNonEnumerableProperty = __webpack_require__(/*! ../internals/create-non-enumerable-property */ 49);
var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ 32);

var ITERATOR = wellKnownSymbol('iterator');
var TO_STRING_TAG = wellKnownSymbol('toStringTag');
var ArrayValues = ArrayIteratorMethods.values;

for (var COLLECTION_NAME in DOMIterables) {
  var Collection = global[COLLECTION_NAME];
  var CollectionPrototype = Collection && Collection.prototype;
  if (CollectionPrototype) {
    // some Chrome versions have non-configurable methods on DOMTokenList
    if (CollectionPrototype[ITERATOR] !== ArrayValues) try {
      createNonEnumerableProperty(CollectionPrototype, ITERATOR, ArrayValues);
    } catch (error) {
      CollectionPrototype[ITERATOR] = ArrayValues;
    }
    if (!CollectionPrototype[TO_STRING_TAG]) {
      createNonEnumerableProperty(CollectionPrototype, TO_STRING_TAG, COLLECTION_NAME);
    }
    if (DOMIterables[COLLECTION_NAME]) for (var METHOD_NAME in ArrayIteratorMethods) {
      // some Chrome versions have non-configurable methods on DOMTokenList
      if (CollectionPrototype[METHOD_NAME] !== ArrayIteratorMethods[METHOD_NAME]) try {
        createNonEnumerableProperty(CollectionPrototype, METHOD_NAME, ArrayIteratorMethods[METHOD_NAME]);
      } catch (error) {
        CollectionPrototype[METHOD_NAME] = ArrayIteratorMethods[METHOD_NAME];
      }
    }
  }
}


/***/ }),
/* 231 */
/*!*********************************************************!*\
  !*** ./node_modules/core-js/internals/dom-iterables.js ***!
  \*********************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports) {

// iterable DOM collections
// flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods
module.exports = {
  CSSRuleList: 0,
  CSSStyleDeclaration: 0,
  CSSValueList: 0,
  ClientRectList: 0,
  DOMRectList: 0,
  DOMStringList: 0,
  DOMTokenList: 1,
  DataTransferItemList: 0,
  FileList: 0,
  HTMLAllCollection: 0,
  HTMLCollection: 0,
  HTMLFormElement: 0,
  HTMLSelectElement: 0,
  MediaList: 0,
  MimeTypeArray: 0,
  NamedNodeMap: 0,
  NodeList: 1,
  PaintRequestList: 0,
  Plugin: 0,
  PluginArray: 0,
  SVGLengthList: 0,
  SVGNumberList: 0,
  SVGPathSegList: 0,
  SVGPointList: 0,
  SVGStringList: 0,
  SVGTransformList: 0,
  SourceBufferList: 0,
  StyleSheetList: 0,
  TextTrackCueList: 0,
  TextTrackList: 0,
  TouchList: 0
};


/***/ }),
/* 232 */,
/* 233 */
/*!*****************************************************************!*\
  !*** ./node_modules/core-js/internals/regexp-sticky-helpers.js ***!
  \*****************************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


var fails = __webpack_require__(/*! ./fails */ 36);

// babel-minify transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError,
// so we use an intermediate function.
function RE(s, f) {
  return RegExp(s, f);
}

exports.UNSUPPORTED_Y = fails(function () {
  // babel-minify transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError
  var re = RE('a', 'y');
  re.lastIndex = 2;
  return re.exec('abcd') != null;
});

exports.BROKEN_CARET = fails(function () {
  // https://bugzilla.mozilla.org/show_bug.cgi?id=773687
  var re = RE('^r', 'gy');
  re.lastIndex = 2;
  return re.exec('str') != null;
});


/***/ }),
/* 234 */
/*!*********************************************************!*\
  !*** ./node_modules/core-js-pure/es/instance/reduce.js ***!
  \*********************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

var reduce = __webpack_require__(/*! ../array/virtual/reduce */ 286);

var ArrayPrototype = Array.prototype;

module.exports = function (it) {
  var own = it.reduce;
  return it === ArrayPrototype || (it instanceof Array && own === ArrayPrototype.reduce) ? reduce : own;
};


/***/ }),
/* 235 */
/*!***********************************************************************************!*\
  !*** ./node_modules/core-js-pure/internals/object-get-own-property-descriptor.js ***!
  \***********************************************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ 82);
var propertyIsEnumerableModule = __webpack_require__(/*! ../internals/object-property-is-enumerable */ 288);
var createPropertyDescriptor = __webpack_require__(/*! ../internals/create-property-descriptor */ 153);
var toIndexedObject = __webpack_require__(/*! ../internals/to-indexed-object */ 94);
var toPrimitive = __webpack_require__(/*! ../internals/to-primitive */ 200);
var has = __webpack_require__(/*! ../internals/has */ 95);
var IE8_DOM_DEFINE = __webpack_require__(/*! ../internals/ie8-dom-define */ 236);

var nativeGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;

// `Object.getOwnPropertyDescriptor` method
// https://tc39.github.io/ecma262/#sec-object.getownpropertydescriptor
exports.f = DESCRIPTORS ? nativeGetOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {
  O = toIndexedObject(O);
  P = toPrimitive(P, true);
  if (IE8_DOM_DEFINE) try {
    return nativeGetOwnPropertyDescriptor(O, P);
  } catch (error) { /* empty */ }
  if (has(O, P)) return createPropertyDescriptor(!propertyIsEnumerableModule.f.call(O, P), O[P]);
};


/***/ }),
/* 236 */
/*!***************************************************************!*\
  !*** ./node_modules/core-js-pure/internals/ie8-dom-define.js ***!
  \***************************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ 82);
var fails = __webpack_require__(/*! ../internals/fails */ 57);
var createElement = __webpack_require__(/*! ../internals/document-create-element */ 237);

// Thank's IE8 for his funny defineProperty
module.exports = !DESCRIPTORS && !fails(function () {
  return Object.defineProperty(createElement('div'), 'a', {
    get: function () { return 7; }
  }).a != 7;
});


/***/ }),
/* 237 */
/*!************************************************************************!*\
  !*** ./node_modules/core-js-pure/internals/document-create-element.js ***!
  \************************************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

var global = __webpack_require__(/*! ../internals/global */ 75);
var isObject = __webpack_require__(/*! ../internals/is-object */ 76);

var document = global.document;
// typeof document.createElement is 'object' in old IE
var EXISTS = isObject(document) && isObject(document.createElement);

module.exports = function (it) {
  return EXISTS ? document.createElement(it) : {};
};


/***/ }),
/* 238 */
/*!*************************************************************!*\
  !*** ./node_modules/core-js-pure/internals/bind-context.js ***!
  \*************************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

var aFunction = __webpack_require__(/*! ../internals/a-function */ 173);

// optional / simple context binding
module.exports = function (fn, that, length) {
  aFunction(fn);
  if (that === undefined) return fn;
  switch (length) {
    case 0: return function () {
      return fn.call(that);
    };
    case 1: return function (a) {
      return fn.call(that, a);
    };
    case 2: return function (a, b) {
      return fn.call(that, a, b);
    };
    case 3: return function (a, b, c) {
      return fn.call(that, a, b, c);
    };
  }
  return function (/* ...args */) {
    return fn.apply(that, arguments);
  };
};


/***/ }),
/* 239 */
/*!*******************************************************************!*\
  !*** ./node_modules/core-js-pure/internals/add-to-unscopables.js ***!
  \*******************************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports) {

module.exports = function () { /* empty */ };


/***/ }),
/* 240 */
/*!****************************************************!*\
  !*** ./node_modules/core-js-pure/internals/uid.js ***!
  \****************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports) {

var id = 0;
var postfix = Math.random();

module.exports = function (key) {
  return 'Symbol(' + String(key === undefined ? '' : key) + ')_' + (++id + postfix).toString(36);
};


/***/ }),
/* 241 */
/*!***************************************************************!*\
  !*** ./node_modules/core-js-pure/internals/iterators-core.js ***!
  \***************************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var getPrototypeOf = __webpack_require__(/*! ../internals/object-get-prototype-of */ 242);
var hide = __webpack_require__(/*! ../internals/hide */ 83);
var has = __webpack_require__(/*! ../internals/has */ 95);
var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ 68);
var IS_PURE = __webpack_require__(/*! ../internals/is-pure */ 203);

var ITERATOR = wellKnownSymbol('iterator');
var BUGGY_SAFARI_ITERATORS = false;

var returnThis = function () { return this; };

// `%IteratorPrototype%` object
// https://tc39.github.io/ecma262/#sec-%iteratorprototype%-object
var IteratorPrototype, PrototypeOfArrayIteratorPrototype, arrayIterator;

if ([].keys) {
  arrayIterator = [].keys();
  // Safari 8 has buggy iterators w/o `next`
  if (!('next' in arrayIterator)) BUGGY_SAFARI_ITERATORS = true;
  else {
    PrototypeOfArrayIteratorPrototype = getPrototypeOf(getPrototypeOf(arrayIterator));
    if (PrototypeOfArrayIteratorPrototype !== Object.prototype) IteratorPrototype = PrototypeOfArrayIteratorPrototype;
  }
}

if (IteratorPrototype == undefined) IteratorPrototype = {};

// 25.1.2.1.1 %IteratorPrototype%[@@iterator]()
if (!IS_PURE && !has(IteratorPrototype, ITERATOR)) hide(IteratorPrototype, ITERATOR, returnThis);

module.exports = {
  IteratorPrototype: IteratorPrototype,
  BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS
};


/***/ }),
/* 242 */
/*!************************************************************************!*\
  !*** ./node_modules/core-js-pure/internals/object-get-prototype-of.js ***!
  \************************************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

var has = __webpack_require__(/*! ../internals/has */ 95);
var toObject = __webpack_require__(/*! ../internals/to-object */ 121);
var sharedKey = __webpack_require__(/*! ../internals/shared-key */ 204);
var CORRECT_PROTOTYPE_GETTER = __webpack_require__(/*! ../internals/correct-prototype-getter */ 298);

var IE_PROTO = sharedKey('IE_PROTO');
var ObjectPrototype = Object.prototype;

// `Object.getPrototypeOf` method
// https://tc39.github.io/ecma262/#sec-object.getprototypeof
module.exports = CORRECT_PROTOTYPE_GETTER ? Object.getPrototypeOf : function (O) {
  O = toObject(O);
  if (has(O, IE_PROTO)) return O[IE_PROTO];
  if (typeof O.constructor == 'function' && O instanceof O.constructor) {
    return O.constructor.prototype;
  } return O instanceof Object ? ObjectPrototype : null;
};


/***/ }),
/* 243 */
/*!**************************************************************!*\
  !*** ./node_modules/core-js-pure/internals/object-create.js ***!
  \**************************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

var anObject = __webpack_require__(/*! ../internals/an-object */ 154);
var defineProperties = __webpack_require__(/*! ../internals/object-define-properties */ 300);
var enumBugKeys = __webpack_require__(/*! ../internals/enum-bug-keys */ 247);
var hiddenKeys = __webpack_require__(/*! ../internals/hidden-keys */ 205);
var html = __webpack_require__(/*! ../internals/html */ 302);
var documentCreateElement = __webpack_require__(/*! ../internals/document-create-element */ 237);
var sharedKey = __webpack_require__(/*! ../internals/shared-key */ 204);
var IE_PROTO = sharedKey('IE_PROTO');

var PROTOTYPE = 'prototype';
var Empty = function () { /* empty */ };

// Create object with fake `null` prototype: use iframe Object with cleared prototype
var createDict = function () {
  // Thrash, waste and sodomy: IE GC bug
  var iframe = documentCreateElement('iframe');
  var length = enumBugKeys.length;
  var lt = '<';
  var script = 'script';
  var gt = '>';
  var js = 'java' + script + ':';
  var iframeDocument;
  iframe.style.display = 'none';
  html.appendChild(iframe);
  iframe.src = String(js);
  iframeDocument = iframe.contentWindow.document;
  iframeDocument.open();
  iframeDocument.write(lt + script + gt + 'document.F=Object' + lt + '/' + script + gt);
  iframeDocument.close();
  createDict = iframeDocument.F;
  while (length--) delete createDict[PROTOTYPE][enumBugKeys[length]];
  return createDict();
};

// `Object.create` method
// https://tc39.github.io/ecma262/#sec-object.create
module.exports = Object.create || function create(O, Properties) {
  var result;
  if (O !== null) {
    Empty[PROTOTYPE] = anObject(O);
    result = new Empty();
    Empty[PROTOTYPE] = null;
    // add "__proto__" for Object.getPrototypeOf polyfill
    result[IE_PROTO] = O;
  } else result = createDict();
  return Properties === undefined ? result : defineProperties(result, Properties);
};

hiddenKeys[IE_PROTO] = true;


/***/ }),
/* 244 */
/*!************************************************************!*\
  !*** ./node_modules/core-js-pure/internals/object-keys.js ***!
  \************************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

var internalObjectKeys = __webpack_require__(/*! ../internals/object-keys-internal */ 301);
var enumBugKeys = __webpack_require__(/*! ../internals/enum-bug-keys */ 247);

// `Object.keys` method
// https://tc39.github.io/ecma262/#sec-object.keys
module.exports = Object.keys || function keys(O) {
  return internalObjectKeys(O, enumBugKeys);
};


/***/ }),
/* 245 */
/*!***************************************************************!*\
  !*** ./node_modules/core-js-pure/internals/array-includes.js ***!
  \***************************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

var toIndexedObject = __webpack_require__(/*! ../internals/to-indexed-object */ 94);
var toLength = __webpack_require__(/*! ../internals/to-length */ 112);
var toAbsoluteIndex = __webpack_require__(/*! ../internals/to-absolute-index */ 246);

// `Array.prototype.{ indexOf, includes }` methods implementation
var createMethod = function (IS_INCLUDES) {
  return function ($this, el, fromIndex) {
    var O = toIndexedObject($this);
    var length = toLength(O.length);
    var index = toAbsoluteIndex(fromIndex, length);
    var value;
    // Array#includes uses SameValueZero equality algorithm
    // eslint-disable-next-line no-self-compare
    if (IS_INCLUDES && el != el) while (length > index) {
      value = O[index++];
      // eslint-disable-next-line no-self-compare
      if (value != value) return true;
    // Array#indexOf ignores holes, Array#includes - not
    } else for (;length > index; index++) {
      if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
    } return !IS_INCLUDES && -1;
  };
};

module.exports = {
  // `Array.prototype.includes` method
  // https://tc39.github.io/ecma262/#sec-array.prototype.includes
  includes: createMethod(true),
  // `Array.prototype.indexOf` method
  // https://tc39.github.io/ecma262/#sec-array.prototype.indexof
  indexOf: createMethod(false)
};


/***/ }),
/* 246 */
/*!******************************************************************!*\
  !*** ./node_modules/core-js-pure/internals/to-absolute-index.js ***!
  \******************************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

var toInteger = __webpack_require__(/*! ../internals/to-integer */ 201);

var max = Math.max;
var min = Math.min;

// Helper for a popular repeating case of the spec:
// Let integer be ? ToInteger(index).
// If integer < 0, let result be max((length + integer), 0); else let result be min(length, length).
module.exports = function (index, length) {
  var integer = toInteger(index);
  return integer < 0 ? max(integer + length, 0) : min(integer, length);
};


/***/ }),
/* 247 */
/*!**************************************************************!*\
  !*** ./node_modules/core-js-pure/internals/enum-bug-keys.js ***!
  \**************************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports) {

// IE8- don't enum bug keys
module.exports = [
  'constructor',
  'hasOwnProperty',
  'isPrototypeOf',
  'propertyIsEnumerable',
  'toLocaleString',
  'toString',
  'valueOf'
];


/***/ }),
/* 248 */
/*!******************************************************************!*\
  !*** ./node_modules/core-js-pure/internals/set-to-string-tag.js ***!
  \******************************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

var defineProperty = __webpack_require__(/*! ../internals/object-define-property */ 136).f;
var hide = __webpack_require__(/*! ../internals/hide */ 83);
var has = __webpack_require__(/*! ../internals/has */ 95);
var toString = __webpack_require__(/*! ../internals/object-to-string */ 304);
var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ 68);

var TO_STRING_TAG = wellKnownSymbol('toStringTag');
var METHOD_REQUIRED = toString !== ({}).toString;

module.exports = function (it, TAG, STATIC, SET_METHOD) {
  if (it) {
    var target = STATIC ? it : it.prototype;
    if (!has(target, TO_STRING_TAG)) {
      defineProperty(target, TO_STRING_TAG, { configurable: true, value: TAG });
    }
    if (SET_METHOD && METHOD_REQUIRED) hide(target, 'toString', toString);
  }
};


/***/ }),
/* 249 */
/*!****************************************************************!*\
  !*** ./node_modules/core-js-pure/internals/create-property.js ***!
  \****************************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var toPrimitive = __webpack_require__(/*! ../internals/to-primitive */ 200);
var definePropertyModule = __webpack_require__(/*! ../internals/object-define-property */ 136);
var createPropertyDescriptor = __webpack_require__(/*! ../internals/create-property-descriptor */ 153);

module.exports = function (object, key, value) {
  var propertyKey = toPrimitive(key);
  if (propertyKey in object) definePropertyModule.f(object, propertyKey, createPropertyDescriptor(0, value));
  else object[propertyKey] = value;
};


/***/ }),
/* 250 */
/*!*********************************************************************!*\
  !*** ./node_modules/core-js-pure/internals/array-species-create.js ***!
  \*********************************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

var isObject = __webpack_require__(/*! ../internals/is-object */ 76);
var isArray = __webpack_require__(/*! ../internals/is-array */ 156);
var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ 68);

var SPECIES = wellKnownSymbol('species');

// `ArraySpeciesCreate` abstract operation
// https://tc39.github.io/ecma262/#sec-arrayspeciescreate
module.exports = function (originalArray, length) {
  var C;
  if (isArray(originalArray)) {
    C = originalArray.constructor;
    // cross-realm fallback
    if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined;
    else if (isObject(C)) {
      C = C[SPECIES];
      if (C === null) C = undefined;
    }
  } return new (C === undefined ? Array : C)(length === 0 ? 0 : length);
};


/***/ }),
/* 251 */
/*!************************************************************!*\
  !*** ./node_modules/core-js-pure/internals/whitespaces.js ***!
  \************************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports) {

// a string of all valid unicode whitespaces
// eslint-disable-next-line max-len
module.exports = '\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF';


/***/ }),
/* 252 */
/*!****************************************************!*\
  !*** ./node_modules/core-js/internals/is-array.js ***!
  \****************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

var classof = __webpack_require__(/*! ../internals/classof-raw */ 50);

// `IsArray` abstract operation
// https://tc39.github.io/ecma262/#sec-isarray
module.exports = Array.isArray || function isArray(arg) {
  return classof(arg) == 'Array';
};


/***/ }),
/* 253 */
/*!***************************************************************!*\
  !*** ./node_modules/core-js-pure/stable/instance/for-each.js ***!
  \***************************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

__webpack_require__(/*! ../../modules/web.dom-collections.iterator */ 219);
var forEach = __webpack_require__(/*! ../array/virtual/for-each */ 350);
var classof = __webpack_require__(/*! ../../internals/classof */ 174);
var ArrayPrototype = Array.prototype;

var DOMIterables = {
  DOMTokenList: true,
  NodeList: true
};

module.exports = function (it) {
  var own = it.forEach;
  return it === ArrayPrototype || (it instanceof Array && own === ArrayPrototype.forEach)
    // eslint-disable-next-line no-prototype-builtins
    || DOMIterables.hasOwnProperty(classof(it)) ? forEach : own;
};


/***/ }),
/* 254 */
/*!*************************************!*\
  !*** ./dev/View/Popup/Languages.js ***!
  \*************************************/
/*! exports provided: LanguagesPopupView, default */
/*! all exports used */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LanguagesPopupView", function() { return LanguagesPopupView; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return LanguagesPopupView; });
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/map */ 18);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _babel_runtime_corejs3_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/esm/inheritsLoose */ 10);
/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! _ */ 3);
/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(___WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var ko__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ko */ 1);
/* harmony import */ var Common_Utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! Common/Utils */ 2);
/* harmony import */ var Knoin_Knoin__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! Knoin/Knoin */ 7);
/* harmony import */ var Knoin_AbstractViewNext__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! Knoin/AbstractViewNext */ 28);



var _dec, _class;



 // import {view, ViewType} from 'Knoin/Knoin';



var LanguagesPopupView = (_dec = Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_5__["popup"])({
  name: 'View/Popup/Languages',
  templateID: 'PopupsLanguages'
}), _dec(_class =
/*#__PURE__*/
function (_AbstractViewNext) {
  Object(_babel_runtime_corejs3_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(LanguagesPopupView, _AbstractViewNext);

  function LanguagesPopupView() {
    var _this;

    _this = _AbstractViewNext.call(this) || this;
    _this.fLang = null;
    _this.userLanguage = ko__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"].observable('');
    _this.langs = ko__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"].observableArray([]);
    _this.languages = ko__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"].computed(function () {
      var userLanguage = _this.userLanguage();

      return _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_0___default()(___WEBPACK_IMPORTED_MODULE_2___default.a).call(___WEBPACK_IMPORTED_MODULE_2___default.a, _this.langs(), function (language) {
        return {
          key: language,
          user: language === userLanguage,
          selected: ko__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"].observable(false),
          fullName: Object(Common_Utils__WEBPACK_IMPORTED_MODULE_4__["convertLangName"])(language)
        };
      });
    });

    _this.langs.subscribe(function () {
      _this.setLanguageSelection();
    });

    return _this;
  }

  var _proto = LanguagesPopupView.prototype;

  _proto.languageTooltipName = function languageTooltipName(language) {
    var result = Object(Common_Utils__WEBPACK_IMPORTED_MODULE_4__["convertLangName"])(language, true);
    return Object(Common_Utils__WEBPACK_IMPORTED_MODULE_4__["convertLangName"])(language, false) === result ? '' : result;
  };

  _proto.setLanguageSelection = function setLanguageSelection() {
    var currentLang = this.fLang ? ko__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"].unwrap(this.fLang) : '';

    ___WEBPACK_IMPORTED_MODULE_2___default.a.each(this.languages(), function (item) {
      item.selected(item.key === currentLang);
    });
  };

  _proto.onBeforeShow = function onBeforeShow() {
    this.fLang = null;
    this.userLanguage('');
    this.langs([]);
  };

  _proto.onShow = function onShow(fLanguage, langs, userLanguage) {
    this.fLang = fLanguage;
    this.userLanguage(userLanguage || '');
    this.langs(langs);
  };

  _proto.changeLanguage = function changeLanguage(lang) {
    if (this.fLang) {
      this.fLang(lang);
    }

    this.cancelCommand();
  };

  return LanguagesPopupView;
}(Knoin_AbstractViewNext__WEBPACK_IMPORTED_MODULE_6__[/* AbstractViewNext */ "a"])) || _class);


/***/ }),
/* 255 */
/*!**************************!*\
  !*** ./dev/bootstrap.js ***!
  \**************************/
/*! exports provided: default */
/*! exports used: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var core_js_modules_web_timers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/web.timers */ 67);
/* harmony import */ var core_js_modules_web_timers__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_timers__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var window__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! window */ 4);
/* harmony import */ var window__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(window__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var Common_Utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! Common/Utils */ 2);
/* harmony import */ var Common_Globals__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! Common/Globals */ 6);
/* harmony import */ var Common_Enums__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! Common/Enums */ 0);
/* harmony import */ var Common_Plugins__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! Common/Plugins */ 39);
/* harmony import */ var Common_Translator__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! Common/Translator */ 9);
/* harmony import */ var Model_Email__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! Model/Email */ 80);








/* harmony default export */ __webpack_exports__["a"] = (function (App) {
  Common_Globals__WEBPACK_IMPORTED_MODULE_3__["data"].__APP__ = App;
  Common_Globals__WEBPACK_IMPORTED_MODULE_3__["$win"].on('keydown', Common_Utils__WEBPACK_IMPORTED_MODULE_2__["killCtrlACtrlS"]).on('unload', function () {
    Common_Globals__WEBPACK_IMPORTED_MODULE_3__["data"].bUnload = true;
  });
  Common_Globals__WEBPACK_IMPORTED_MODULE_3__["$html"].addClass(Common_Globals__WEBPACK_IMPORTED_MODULE_3__["bMobileDevice"] ? 'mobile' : 'no-mobile').on('click.dropdown.data-api', Common_Utils__WEBPACK_IMPORTED_MODULE_2__["detectDropdownVisibility"]);
  var rl = window__WEBPACK_IMPORTED_MODULE_1___default.a.rl || {};
  rl.i18n = Common_Translator__WEBPACK_IMPORTED_MODULE_6__["i18n"];
  rl.createCommand = Common_Utils__WEBPACK_IMPORTED_MODULE_2__["createCommandLegacy"];
  rl.addSettingsViewModel = Common_Plugins__WEBPACK_IMPORTED_MODULE_5__[/* addSettingsViewModel */ "b"];
  rl.addSettingsViewModelForAdmin = Common_Plugins__WEBPACK_IMPORTED_MODULE_5__[/* addSettingsViewModelForAdmin */ "c"];
  rl.addHook = Common_Plugins__WEBPACK_IMPORTED_MODULE_5__[/* addHook */ "a"];
  rl.settingsGet = Common_Plugins__WEBPACK_IMPORTED_MODULE_5__[/* mainSettingsGet */ "d"];
  rl.pluginSettingsGet = Common_Plugins__WEBPACK_IMPORTED_MODULE_5__[/* settingsGet */ "h"];
  rl.pluginRemoteRequest = Common_Plugins__WEBPACK_IMPORTED_MODULE_5__[/* remoteRequest */ "e"];
  rl.EmailModel = Model_Email__WEBPACK_IMPORTED_MODULE_7__["EmailModel"];
  rl.Enums = Common_Enums__WEBPACK_IMPORTED_MODULE_4__;
  window__WEBPACK_IMPORTED_MODULE_1___default.a.rl = rl;

  window__WEBPACK_IMPORTED_MODULE_1___default.a.__APP_BOOT = function (fErrorCallback) {
    Object(Common_Utils__WEBPACK_IMPORTED_MODULE_2__["domReady"])(function () {
      window__WEBPACK_IMPORTED_MODULE_1___default.a.setTimeout(function () {
        if (window__WEBPACK_IMPORTED_MODULE_1___default.a.rainloopTEMPLATES && window__WEBPACK_IMPORTED_MODULE_1___default.a.rainloopTEMPLATES[0]) {
          window__WEBPACK_IMPORTED_MODULE_1___default.a.document.getElementById('rl-templates').innerHTML = window__WEBPACK_IMPORTED_MODULE_1___default.a.rainloopTEMPLATES[0];
          window__WEBPACK_IMPORTED_MODULE_1___default.a.setTimeout(function () {
            Common_Globals__WEBPACK_IMPORTED_MODULE_3__["$html"].removeClass('no-js rl-booted-trigger').addClass('rl-booted');
            App.bootstart();
          }, Common_Enums__WEBPACK_IMPORTED_MODULE_4__["Magics"].Time10ms);
        } else {
          fErrorCallback();
        }

        window__WEBPACK_IMPORTED_MODULE_1___default.a.__APP_BOOT = null;
      }, Common_Enums__WEBPACK_IMPORTED_MODULE_4__["Magics"].Time10ms);
    });
  };
});

/***/ }),
/* 256 */
/*!**********************************************************************!*\
  !*** ./node_modules/@babel/runtime-corejs3/core-js/object/create.js ***!
  \**********************************************************************/
/*! no static exports found */
/*! exports used: default */
/***/ (function(module, exports, __webpack_require__) {

module.exports = __webpack_require__(/*! core-js-pure/features/object/create */ 360);

/***/ }),
/* 257 */
/*!***********************************!*\
  !*** ./dev/Stores/AbstractApp.js ***!
  \***********************************/
/*! exports provided: AbstractAppStore, default */
/*! exports used: AbstractAppStore */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return AbstractAppStore; });
/* unused harmony export default */
/* harmony import */ var ko__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ko */ 1);
/* harmony import */ var Common_Globals__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! Common/Globals */ 6);
/* harmony import */ var Storage_Settings__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! Storage/Settings */ 5);




var AbstractAppStore =
/*#__PURE__*/
function () {
  function AbstractAppStore() {
    this.allowLanguagesOnSettings = ko__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].observable(true);
    this.allowLanguagesOnLogin = ko__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].observable(true);
    this.newMoveToFolder = ko__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].observable(true);
    this.interfaceAnimation = ko__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].observable(true);
    this.interfaceAnimation.subscribe(function (value) {
      var anim = Common_Globals__WEBPACK_IMPORTED_MODULE_1__["bMobileDevice"] || !value;
      Common_Globals__WEBPACK_IMPORTED_MODULE_1__["$html"].toggleClass('rl-anim', !anim).toggleClass('no-rl-anim', anim);
    });
    this.interfaceAnimation.valueHasMutated();
    this.prem = ko__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].observable(false);
    this.community = ko__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].observable(true);
  }

  var _proto = AbstractAppStore.prototype;

  _proto.populate = function populate() {
    this.allowLanguagesOnLogin(!!Storage_Settings__WEBPACK_IMPORTED_MODULE_2__["settingsGet"]('AllowLanguagesOnLogin'));
    this.allowLanguagesOnSettings(!!Storage_Settings__WEBPACK_IMPORTED_MODULE_2__["settingsGet"]('AllowLanguagesOnSettings'));
    this.newMoveToFolder(!!Storage_Settings__WEBPACK_IMPORTED_MODULE_2__["settingsGet"]('NewMoveToFolder'));
    this.interfaceAnimation(!!Storage_Settings__WEBPACK_IMPORTED_MODULE_2__["settingsGet"]('InterfaceAnimation'));
    this.prem(!!Storage_Settings__WEBPACK_IMPORTED_MODULE_2__["settingsGet"]('PremType'));
    this.community(!!Storage_Settings__WEBPACK_IMPORTED_MODULE_2__["settingsGet"]('Community'));
  };

  return AbstractAppStore;
}();



/***/ }),
/* 258 */
/*!***********************************************************************!*\
  !*** ./node_modules/@babel/runtime-corejs3/core-js/instance/slice.js ***!
  \***********************************************************************/
/*! no static exports found */
/*! exports used: default */
/***/ (function(module, exports, __webpack_require__) {

module.exports = __webpack_require__(/*! core-js-pure/features/instance/slice */ 366);

/***/ }),
/* 259 */
/*!*************************************************************************!*\
  !*** ./node_modules/@babel/runtime-corejs3/core-js/instance/reverse.js ***!
  \*************************************************************************/
/*! no static exports found */
/*! exports used: default */
/***/ (function(module, exports, __webpack_require__) {

module.exports = __webpack_require__(/*! core-js-pure/features/instance/reverse */ 370);

/***/ }),
/* 260 */
/*!************************************************************************!*\
  !*** ./node_modules/@babel/runtime-corejs3/core-js/instance/reduce.js ***!
  \************************************************************************/
/*! no static exports found */
/*! exports used: default */
/***/ (function(module, exports, __webpack_require__) {

module.exports = __webpack_require__(/*! core-js-pure/features/instance/reduce */ 374);

/***/ }),
/* 261 */
/*!********************************************************************!*\
  !*** ./node_modules/@babel/runtime-corejs3/core-js/object/keys.js ***!
  \********************************************************************/
/*! no static exports found */
/*! exports used: default */
/***/ (function(module, exports, __webpack_require__) {

module.exports = __webpack_require__(/*! core-js-pure/features/object/keys */ 375);

/***/ }),
/* 262 */
/*!**************************************************************************!*\
  !*** ./node_modules/@babel/runtime-corejs3/core-js/instance/for-each.js ***!
  \**************************************************************************/
/*! no static exports found */
/*! exports used: default */
/***/ (function(module, exports, __webpack_require__) {

module.exports = __webpack_require__(/*! core-js-pure/features/instance/for-each */ 378);

/***/ }),
/* 263 */
/*!************************************!*\
  !*** ./dev/Remote/AbstractAjax.js ***!
  \************************************/
/*! exports provided: AbstractAjaxRemote, default */
/*! exports used: AbstractAjaxRemote */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return AbstractAjaxRemote; });
/* unused harmony export default */
/* harmony import */ var window__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! window */ 4);
/* harmony import */ var window__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(window__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! _ */ 3);
/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(___WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var $__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! $ */ 8);
/* harmony import */ var $__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n($__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var Common_Consts__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! Common/Consts */ 25);
/* harmony import */ var Common_Enums__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! Common/Enums */ 0);
/* harmony import */ var Common_Utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! Common/Utils */ 2);
/* harmony import */ var Common_Globals__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! Common/Globals */ 6);
/* harmony import */ var Common_Links__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! Common/Links */ 15);
/* harmony import */ var Common_Plugins__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! Common/Plugins */ 39);
/* harmony import */ var Storage_Settings__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! Storage/Settings */ 5);











var AbstractAjaxRemote =
/*#__PURE__*/
function () {
  function AbstractAjaxRemote() {
    this.oRequests = {};
  }
  /**
   * @param {?Function} fCallback
   * @param {string} sRequestAction
   * @param {string} sType
   * @param {?AjaxJsonDefaultResponse} oData
   * @param {boolean} bCached
   * @param {*=} oRequestParameters
   */


  var _proto = AbstractAjaxRemote.prototype;

  _proto.defaultResponse = function defaultResponse(fCallback, sRequestAction, sType, oData, bCached, oRequestParameters) {
    var fCall = function fCall() {
      if (Common_Enums__WEBPACK_IMPORTED_MODULE_4__["StorageResultType"].Success !== sType && Common_Globals__WEBPACK_IMPORTED_MODULE_6__["data"].bUnload) {
        sType = Common_Enums__WEBPACK_IMPORTED_MODULE_4__["StorageResultType"].Unload;
      }

      if (Common_Enums__WEBPACK_IMPORTED_MODULE_4__["StorageResultType"].Success === sType && oData && !oData.Result) {
        if (oData && -1 < Object(Common_Utils__WEBPACK_IMPORTED_MODULE_5__["inArray"])(oData.ErrorCode, [Common_Enums__WEBPACK_IMPORTED_MODULE_4__["Notification"].AuthError, Common_Enums__WEBPACK_IMPORTED_MODULE_4__["Notification"].AccessError, Common_Enums__WEBPACK_IMPORTED_MODULE_4__["Notification"].ConnectionError, Common_Enums__WEBPACK_IMPORTED_MODULE_4__["Notification"].DomainNotAllowed, Common_Enums__WEBPACK_IMPORTED_MODULE_4__["Notification"].AccountNotAllowed, Common_Enums__WEBPACK_IMPORTED_MODULE_4__["Notification"].MailServerError, Common_Enums__WEBPACK_IMPORTED_MODULE_4__["Notification"].UnknownNotification, Common_Enums__WEBPACK_IMPORTED_MODULE_4__["Notification"].UnknownError])) {
          Common_Globals__WEBPACK_IMPORTED_MODULE_6__["data"].iAjaxErrorCount += 1;
        }

        if (oData && Common_Enums__WEBPACK_IMPORTED_MODULE_4__["Notification"].InvalidToken === oData.ErrorCode) {
          Common_Globals__WEBPACK_IMPORTED_MODULE_6__["data"].iTokenErrorCount += 1;
        }

        if (Common_Consts__WEBPACK_IMPORTED_MODULE_3__[/* TOKEN_ERROR_LIMIT */ "q"] < Common_Globals__WEBPACK_IMPORTED_MODULE_6__["data"].iTokenErrorCount) {
          if (Common_Globals__WEBPACK_IMPORTED_MODULE_6__["data"].__APP__ && Common_Globals__WEBPACK_IMPORTED_MODULE_6__["data"].__APP__.loginAndLogoutReload) {
            Common_Globals__WEBPACK_IMPORTED_MODULE_6__["data"].__APP__.loginAndLogoutReload(false, true);
          }
        }

        if (oData.ClearAuth || oData.Logout || Common_Consts__WEBPACK_IMPORTED_MODULE_3__[/* AJAX_ERROR_LIMIT */ "a"] < Common_Globals__WEBPACK_IMPORTED_MODULE_6__["data"].iAjaxErrorCount) {
          if (Common_Globals__WEBPACK_IMPORTED_MODULE_6__["data"].__APP__ && Common_Globals__WEBPACK_IMPORTED_MODULE_6__["data"].__APP__.clearClientSideToken) {
            Common_Globals__WEBPACK_IMPORTED_MODULE_6__["data"].__APP__.clearClientSideToken();

            if (!oData.ClearAuth && Common_Globals__WEBPACK_IMPORTED_MODULE_6__["data"].__APP__.loginAndLogoutReload) {
              Common_Globals__WEBPACK_IMPORTED_MODULE_6__["data"].__APP__.loginAndLogoutReload(false, true);
            }
          }
        }
      } else if (Common_Enums__WEBPACK_IMPORTED_MODULE_4__["StorageResultType"].Success === sType && oData && oData.Result) {
        Common_Globals__WEBPACK_IMPORTED_MODULE_6__["data"].iAjaxErrorCount = 0;
        Common_Globals__WEBPACK_IMPORTED_MODULE_6__["data"].iTokenErrorCount = 0;
      }

      Object(Common_Plugins__WEBPACK_IMPORTED_MODULE_8__[/* runHook */ "f"])('ajax-default-response', [sRequestAction, Common_Enums__WEBPACK_IMPORTED_MODULE_4__["StorageResultType"].Success === sType ? oData : null, sType, bCached, oRequestParameters]);

      if (fCallback) {
        fCallback(sType, Common_Enums__WEBPACK_IMPORTED_MODULE_4__["StorageResultType"].Success === sType ? oData : null, bCached, sRequestAction, oRequestParameters);
      }
    };

    switch (sType) {
      case 'success':
        sType = Common_Enums__WEBPACK_IMPORTED_MODULE_4__["StorageResultType"].Success;
        break;

      case 'abort':
        sType = Common_Enums__WEBPACK_IMPORTED_MODULE_4__["StorageResultType"].Abort;
        break;

      default:
        sType = Common_Enums__WEBPACK_IMPORTED_MODULE_4__["StorageResultType"].Error;
        break;
    }

    if (Common_Enums__WEBPACK_IMPORTED_MODULE_4__["StorageResultType"].Error === sType) {
      ___WEBPACK_IMPORTED_MODULE_1___default.a.delay(fCall, 300);
    } else {
      fCall();
    }
  }
  /**
   * @param {?Function} fResultCallback
   * @param {Object} oParameters
   * @param {?number=} iTimeOut = 20000
   * @param {string=} sGetAdd = ''
   * @param {Array=} aAbortActions = []
   * @returns {jQuery.jqXHR}
   */
  ;

  _proto.ajaxRequest = function ajaxRequest(fResultCallback, params, iTimeOut, sGetAdd, abortActions) {
    var _this = this;

    if (iTimeOut === void 0) {
      iTimeOut = 20000;
    }

    if (sGetAdd === void 0) {
      sGetAdd = '';
    }

    if (abortActions === void 0) {
      abortActions = [];
    }

    var isPost = '' === sGetAdd,
        headers = {},
        start = new window__WEBPACK_IMPORTED_MODULE_0___default.a.Date().getTime();
    var action = '';
    params = params || {};
    action = params.Action || '';

    if (action && 0 < abortActions.length) {
      ___WEBPACK_IMPORTED_MODULE_1___default.a.each(abortActions, function (actionToAbort) {
        if (_this.oRequests[actionToAbort]) {
          _this.oRequests[actionToAbort].__aborted = true;

          if (_this.oRequests[actionToAbort].abort) {
            _this.oRequests[actionToAbort].abort();
          }

          _this.oRequests[actionToAbort] = null;
        }
      });
    }

    if (isPost) {
      params.XToken = Storage_Settings__WEBPACK_IMPORTED_MODULE_9__["appSettingsGet"]('token');
    }

    var oDefAjax = $__WEBPACK_IMPORTED_MODULE_2___default.a.ajax({
      type: isPost ? 'POST' : 'GET',
      url: Object(Common_Links__WEBPACK_IMPORTED_MODULE_7__[/* ajax */ "a"])(sGetAdd),
      async: true,
      dataType: 'json',
      data: isPost ? params : {},
      headers: headers,
      timeout: iTimeOut,
      global: true
    });
    oDefAjax.always(function (oData, sType) {
      var cached = false;

      if (oData && oData.Time) {
        cached = Object(Common_Utils__WEBPACK_IMPORTED_MODULE_5__["pInt"])(oData.Time) > new window__WEBPACK_IMPORTED_MODULE_0___default.a.Date().getTime() - start;
      }

      if (oData && oData.UpdateToken) {
        if (Common_Globals__WEBPACK_IMPORTED_MODULE_6__["data"].__APP__ && Common_Globals__WEBPACK_IMPORTED_MODULE_6__["data"].__APP__.setClientSideToken) {
          Common_Globals__WEBPACK_IMPORTED_MODULE_6__["data"].__APP__.setClientSideToken(oData.UpdateToken);
        }
      }

      if (action && _this.oRequests[action]) {
        if (_this.oRequests[action].__aborted) {
          sType = 'abort';
        }

        _this.oRequests[action] = null;
      }

      _this.defaultResponse(fResultCallback, action, sType, oData, cached, params);
    });

    if (action && 0 < abortActions.length && -1 < Object(Common_Utils__WEBPACK_IMPORTED_MODULE_5__["inArray"])(action, abortActions)) {
      if (this.oRequests[action]) {
        this.oRequests[action].__aborted = true;

        if (this.oRequests[action].abort) {
          this.oRequests[action].abort();
        }

        this.oRequests[action] = null;
      }

      this.oRequests[action] = oDefAjax;
    } // eslint-disable-next-line no-console


    oDefAjax.catch(console.log);
    return oDefAjax;
  }
  /**
   * @param {?Function} fCallback
   * @param {string} sAction
   * @param {Object=} oParameters
   * @param {?number=} iTimeout
   * @param {string=} sGetAdd = ''
   * @param {Array=} aAbortActions = []
   */
  ;

  _proto.defaultRequest = function defaultRequest(fCallback, sAction, oParameters, iTimeout, sGetAdd, aAbortActions) {
    oParameters = oParameters || {};
    oParameters.Action = sAction;
    sGetAdd = Object(Common_Utils__WEBPACK_IMPORTED_MODULE_5__["pString"])(sGetAdd);
    Object(Common_Plugins__WEBPACK_IMPORTED_MODULE_8__[/* runHook */ "f"])('ajax-default-request', [sAction, oParameters, sGetAdd]);
    return this.ajaxRequest(fCallback, oParameters, Object(Common_Utils__WEBPACK_IMPORTED_MODULE_5__["isUnd"])(iTimeout) ? Common_Consts__WEBPACK_IMPORTED_MODULE_3__[/* DEFAULT_AJAX_TIMEOUT */ "g"] : Object(Common_Utils__WEBPACK_IMPORTED_MODULE_5__["pInt"])(iTimeout), sGetAdd, aAbortActions);
  }
  /**
   * @param {?Function} fCallback
   */
  ;

  _proto.noop = function noop(fCallback) {
    this.defaultRequest(fCallback, 'Noop');
  }
  /**
   * @param {?Function} fCallback
   */
  ;

  _proto.getPublicKey = function getPublicKey(fCallback) {
    this.defaultRequest(fCallback, 'GetPublicKey');
  }
  /**
   * @param {?Function} fCallback
   * @param {string} sVersion
   */
  ;

  _proto.jsVersion = function jsVersion(fCallback, sVersion) {
    this.defaultRequest(fCallback, 'Version', {
      'Version': sVersion
    });
  };

  return AbstractAjaxRemote;
}();



/***/ }),
/* 264 */
/*!****************************************!*\
  !*** ./dev/Screen/AbstractSettings.js ***!
  \****************************************/
/*! exports provided: AbstractSettingsScreen, default */
/*! exports used: AbstractSettingsScreen */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return AbstractSettingsScreen; });
/* unused harmony export default */
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/find */ 12);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _babel_runtime_corejs3_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/esm/inheritsLoose */ 10);
/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! _ */ 3);
/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(___WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var $__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! $ */ 8);
/* harmony import */ var $__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n($__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var ko__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ko */ 1);
/* harmony import */ var Common_Globals__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! Common/Globals */ 6);
/* harmony import */ var Common_Utils__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! Common/Utils */ 2);
/* harmony import */ var Common_Links__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! Common/Links */ 15);
/* harmony import */ var Knoin_Knoin__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! Knoin/Knoin */ 7);
/* harmony import */ var Knoin_AbstractScreen__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! Knoin/AbstractScreen */ 137);











var AbstractSettingsScreen =
/*#__PURE__*/
function (_AbstractScreen) {
  Object(_babel_runtime_corejs3_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(AbstractSettingsScreen, _AbstractScreen);

  /**
   * @param {Array} viewModels
   */
  function AbstractSettingsScreen(viewModels) {
    var _this;

    _this = _AbstractScreen.call(this, 'settings', viewModels) || this;
    _this.menu = ko__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"].observableArray([]);
    _this.oCurrentSubScreen = null;
    _this.oViewModelPlace = null;

    _this.setupSettings();

    return _this;
  }
  /**
   * @param {Function=} fCallback
   */


  var _proto = AbstractSettingsScreen.prototype;

  _proto.setupSettings = function setupSettings(fCallback) {
    if (fCallback === void 0) {
      fCallback = null;
    }

    if (fCallback) {
      fCallback();
    }
  };

  _proto.onRoute = function onRoute(subName) {
    var _this2 = this;

    var settingsScreen = null,
        RoutedSettingsViewModel = null,
        viewModelPlace = null,
        viewModelDom = null;
    RoutedSettingsViewModel = _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_0___default()(___WEBPACK_IMPORTED_MODULE_2___default.a).call(___WEBPACK_IMPORTED_MODULE_2___default.a, Common_Globals__WEBPACK_IMPORTED_MODULE_5__["VIEW_MODELS"].settings, function (SettingsViewModel) {
      return SettingsViewModel && SettingsViewModel.__rlSettingsData && subName === SettingsViewModel.__rlSettingsData.Route;
    });

    if (RoutedSettingsViewModel) {
      if (_babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_0___default()(___WEBPACK_IMPORTED_MODULE_2___default.a).call(___WEBPACK_IMPORTED_MODULE_2___default.a, Common_Globals__WEBPACK_IMPORTED_MODULE_5__["VIEW_MODELS"]['settings-removed'], function (DisabledSettingsViewModel) {
        return DisabledSettingsViewModel && DisabledSettingsViewModel === RoutedSettingsViewModel;
      })) {
        RoutedSettingsViewModel = null;
      }

      if (RoutedSettingsViewModel && _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_0___default()(___WEBPACK_IMPORTED_MODULE_2___default.a).call(___WEBPACK_IMPORTED_MODULE_2___default.a, Common_Globals__WEBPACK_IMPORTED_MODULE_5__["VIEW_MODELS"]['settings-disabled'], function (DisabledSettingsViewModel) {
        return DisabledSettingsViewModel && DisabledSettingsViewModel === RoutedSettingsViewModel;
      })) {
        RoutedSettingsViewModel = null;
      }
    }

    if (RoutedSettingsViewModel) {
      if (RoutedSettingsViewModel.__builded && RoutedSettingsViewModel.__vm) {
        settingsScreen = RoutedSettingsViewModel.__vm;
      } else {
        viewModelPlace = this.oViewModelPlace;

        if (viewModelPlace && 1 === viewModelPlace.length) {
          settingsScreen = new RoutedSettingsViewModel();
          viewModelDom = $__WEBPACK_IMPORTED_MODULE_3___default()('<div></div>').addClass('rl-settings-view-model').hide();
          viewModelDom.appendTo(viewModelPlace);
          settingsScreen.viewModelDom = viewModelDom;
          settingsScreen.__rlSettingsData = RoutedSettingsViewModel.__rlSettingsData;
          RoutedSettingsViewModel.__dom = viewModelDom;
          RoutedSettingsViewModel.__builded = true;
          RoutedSettingsViewModel.__vm = settingsScreen;
          var tmpl = {
            name: RoutedSettingsViewModel.__rlSettingsData.Template
          };
          ko__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"].applyBindingAccessorsToNode(viewModelDom[0], {
            translatorInit: true,
            template: function template() {
              return tmpl;
            }
          }, settingsScreen);
          Object(Common_Utils__WEBPACK_IMPORTED_MODULE_6__["delegateRun"])(settingsScreen, 'onBuild', [viewModelDom]);
        } else {
          Object(Common_Utils__WEBPACK_IMPORTED_MODULE_6__["log"])('Cannot find sub settings view model position: SettingsSubScreen');
        }
      }

      if (settingsScreen) {
        ___WEBPACK_IMPORTED_MODULE_2___default.a.defer(function () {
          // hide
          if (_this2.oCurrentSubScreen) {
            Object(Common_Utils__WEBPACK_IMPORTED_MODULE_6__["delegateRun"])(_this2.oCurrentSubScreen, 'onHide');

            _this2.oCurrentSubScreen.viewModelDom.hide();
          } // --


          _this2.oCurrentSubScreen = settingsScreen; // show

          if (_this2.oCurrentSubScreen) {
            Object(Common_Utils__WEBPACK_IMPORTED_MODULE_6__["delegateRun"])(_this2.oCurrentSubScreen, 'onBeforeShow');

            _this2.oCurrentSubScreen.viewModelDom.show();

            Object(Common_Utils__WEBPACK_IMPORTED_MODULE_6__["delegateRun"])(_this2.oCurrentSubScreen, 'onShow');
            Object(Common_Utils__WEBPACK_IMPORTED_MODULE_6__["delegateRun"])(_this2.oCurrentSubScreen, 'onShowWithDelay', [], 200);

            ___WEBPACK_IMPORTED_MODULE_2___default.a.each(_this2.menu(), function (item) {
              item.selected(settingsScreen && settingsScreen.__rlSettingsData && item.route === settingsScreen.__rlSettingsData.Route);
            });

            $__WEBPACK_IMPORTED_MODULE_3___default()('#rl-content .b-settings .b-content .content').scrollTop(0);
          } // --


          Object(Common_Utils__WEBPACK_IMPORTED_MODULE_6__["windowResize"])();
        });
      }
    } else {
      Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_8__["setHash"])(Object(Common_Links__WEBPACK_IMPORTED_MODULE_7__[/* settings */ "z"])(), false, true);
    }
  };

  _proto.onHide = function onHide() {
    if (this.oCurrentSubScreen && this.oCurrentSubScreen.viewModelDom) {
      Object(Common_Utils__WEBPACK_IMPORTED_MODULE_6__["delegateRun"])(this.oCurrentSubScreen, 'onHide');
      this.oCurrentSubScreen.viewModelDom.hide();
    }
  };

  _proto.onBuild = function onBuild() {
    var _this3 = this;

    ___WEBPACK_IMPORTED_MODULE_2___default.a.each(Common_Globals__WEBPACK_IMPORTED_MODULE_5__["VIEW_MODELS"].settings, function (SettingsViewModel) {
      if (SettingsViewModel && SettingsViewModel.__rlSettingsData && !_babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_0___default()(___WEBPACK_IMPORTED_MODULE_2___default.a).call(___WEBPACK_IMPORTED_MODULE_2___default.a, Common_Globals__WEBPACK_IMPORTED_MODULE_5__["VIEW_MODELS"]['settings-removed'], function (RemoveSettingsViewModel) {
        return RemoveSettingsViewModel && RemoveSettingsViewModel === SettingsViewModel;
      })) {
        _this3.menu.push({
          route: SettingsViewModel.__rlSettingsData.Route,
          label: SettingsViewModel.__rlSettingsData.Label,
          selected: ko__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"].observable(false),
          disabled: !!_babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_0___default()(___WEBPACK_IMPORTED_MODULE_2___default.a).call(___WEBPACK_IMPORTED_MODULE_2___default.a, Common_Globals__WEBPACK_IMPORTED_MODULE_5__["VIEW_MODELS"]['settings-disabled'], function (DisabledSettingsViewModel) {
            return DisabledSettingsViewModel && DisabledSettingsViewModel === SettingsViewModel;
          })
        });
      }
    });

    this.oViewModelPlace = $__WEBPACK_IMPORTED_MODULE_3___default()('#rl-content #rl-settings-subscreen');
  };

  _proto.routes = function routes() {
    var DefaultViewModel = _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_0___default()(___WEBPACK_IMPORTED_MODULE_2___default.a).call(___WEBPACK_IMPORTED_MODULE_2___default.a, Common_Globals__WEBPACK_IMPORTED_MODULE_5__["VIEW_MODELS"].settings, function (SettingsViewModel) {
      return SettingsViewModel && SettingsViewModel.__rlSettingsData && SettingsViewModel.__rlSettingsData.IsDefault;
    }),
        defaultRoute = DefaultViewModel && DefaultViewModel.__rlSettingsData ? DefaultViewModel.__rlSettingsData.Route : 'general',
        rules = {
      subname: /^(.*)$/,
      normalize_: function normalize_(rquest, vals) {
        vals.subname = Object(Common_Utils__WEBPACK_IMPORTED_MODULE_6__["isUnd"])(vals.subname) ? defaultRoute : Object(Common_Utils__WEBPACK_IMPORTED_MODULE_6__["pString"])(vals.subname);
        return [vals.subname];
      }
    };

    return [['{subname}/', rules], ['{subname}', rules], ['', rules]];
  };

  return AbstractSettingsScreen;
}(Knoin_AbstractScreen__WEBPACK_IMPORTED_MODULE_9__[/* AbstractScreen */ "a"]);



/***/ }),
/* 265 */
/*!*****************************!*\
  !*** ./dev/App/Abstract.js ***!
  \*****************************/
/*! exports provided: AbstractApp, default */
/*! exports used: AbstractApp */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return AbstractApp; });
/* unused harmony export default */
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_index_of__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/index-of */ 30);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_index_of__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_index_of__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _babel_runtime_corejs3_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/esm/inheritsLoose */ 10);
/* harmony import */ var window__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! window */ 4);
/* harmony import */ var window__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(window__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var $__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! $ */ 8);
/* harmony import */ var $__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n($__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! _ */ 3);
/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(___WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var ko__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ko */ 1);
/* harmony import */ var key__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! key */ 21);
/* harmony import */ var key__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(key__WEBPACK_IMPORTED_MODULE_6__);
/* harmony import */ var ssm__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ssm */ 139);
/* harmony import */ var ssm__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(ssm__WEBPACK_IMPORTED_MODULE_7__);
/* harmony import */ var Common_Globals__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! Common/Globals */ 6);
/* harmony import */ var Common_Utils__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! Common/Utils */ 2);
/* harmony import */ var Common_Enums__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! Common/Enums */ 0);
/* harmony import */ var Common_Links__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! Common/Links */ 15);
/* harmony import */ var Common_Translator__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! Common/Translator */ 9);
/* harmony import */ var Common_Events__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! Common/Events */ 24);
/* harmony import */ var Storage_Settings__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! Storage/Settings */ 5);
/* harmony import */ var Stores_Language__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! Stores/Language */ 70);
/* harmony import */ var Stores_Theme__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! Stores/Theme */ 114);
/* harmony import */ var Stores_Social__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! Stores/Social */ 29);
/* harmony import */ var Knoin_Knoin__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! Knoin/Knoin */ 7);
/* harmony import */ var Knoin_AbstractBoot__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! Knoin/AbstractBoot */ 266);





















var AbstractApp =
/*#__PURE__*/
function (_AbstractBoot) {
  Object(_babel_runtime_corejs3_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(AbstractApp, _AbstractBoot);

  /**
   * @param {RemoteStorage|AdminRemoteStorage} Remote
   */
  function AbstractApp() {
    var _this;

    _this = _AbstractBoot.call(this) || this;
    _this.googlePreviewSupportedCache = null;
    _this.isLocalAutocomplete = true;
    _this.iframe = null;
    _this.lastErrorTime = 0;
    _this.iframe = $__WEBPACK_IMPORTED_MODULE_3___default()('<iframe class="internal-hiddden" />').appendTo('body');
    Common_Globals__WEBPACK_IMPORTED_MODULE_8__["$win"].on('resize', function () {
      Common_Events__WEBPACK_IMPORTED_MODULE_13__[/* pub */ "a"]('window.resize');
    });
    Common_Events__WEBPACK_IMPORTED_MODULE_13__[/* sub */ "b"]('window.resize', ___WEBPACK_IMPORTED_MODULE_4___default.a.throttle(function () {
      var iH = Common_Globals__WEBPACK_IMPORTED_MODULE_8__["$win"].height(),
          iW = Common_Globals__WEBPACK_IMPORTED_MODULE_8__["$win"].height();

      if (Common_Globals__WEBPACK_IMPORTED_MODULE_8__["$win"].__sizes[0] !== iH || Common_Globals__WEBPACK_IMPORTED_MODULE_8__["$win"].__sizes[1] !== iW) {
        Common_Globals__WEBPACK_IMPORTED_MODULE_8__["$win"].__sizes[0] = iH;
        Common_Globals__WEBPACK_IMPORTED_MODULE_8__["$win"].__sizes[1] = iW;
        Common_Events__WEBPACK_IMPORTED_MODULE_13__[/* pub */ "a"]('window.resize.real');
      }
    }, Common_Enums__WEBPACK_IMPORTED_MODULE_10__["Magics"].Time50ms)); // DEBUG
    //		Events.sub({
    //			'window.resize': function() {
    //				window.console.log('window.resize');
    //			},
    //			'window.resize.real': function() {
    //				window.console.log('window.resize.real');
    //			}
    //		});

    Common_Globals__WEBPACK_IMPORTED_MODULE_8__["$doc"].on('keydown', function (event) {
      if (event && event.ctrlKey) {
        Common_Globals__WEBPACK_IMPORTED_MODULE_8__["$html"].addClass('rl-ctrl-key-pressed');
      }
    }).on('keyup', function (event) {
      if (event && !event.ctrlKey) {
        Common_Globals__WEBPACK_IMPORTED_MODULE_8__["$html"].removeClass('rl-ctrl-key-pressed');
      }
    });
    Common_Globals__WEBPACK_IMPORTED_MODULE_8__["$doc"].on('mousemove keypress click', ___WEBPACK_IMPORTED_MODULE_4___default.a.debounce(function () {
      Common_Events__WEBPACK_IMPORTED_MODULE_13__[/* pub */ "a"]('rl.auto-logout-refresh');
    }, Common_Enums__WEBPACK_IMPORTED_MODULE_10__["Magics"].Time5s));
    key__WEBPACK_IMPORTED_MODULE_6___default()('esc, enter', Common_Enums__WEBPACK_IMPORTED_MODULE_10__["KeyState"].All, function () {
      Object(Common_Utils__WEBPACK_IMPORTED_MODULE_9__["detectDropdownVisibility"])();
    });
    return _this;
  }

  var _proto = AbstractApp.prototype;

  _proto.remote = function remote() {
    return null;
  };

  _proto.data = function data() {
    return null;
  };

  _proto.getApplicationConfiguration = function getApplicationConfiguration(name, default_) {
    return this.applicationConfiguration[name] || default_;
  }
  /**
   * @param {string} link
   * @returns {boolean}
   */
  ;

  _proto.download = function download(link) {
    if (Common_Globals__WEBPACK_IMPORTED_MODULE_8__["sUserAgent"] && (-1 < _babel_runtime_corejs3_core_js_stable_instance_index_of__WEBPACK_IMPORTED_MODULE_0___default()(Common_Globals__WEBPACK_IMPORTED_MODULE_8__["sUserAgent"]).call(Common_Globals__WEBPACK_IMPORTED_MODULE_8__["sUserAgent"], 'chrome') || -1 < _babel_runtime_corejs3_core_js_stable_instance_index_of__WEBPACK_IMPORTED_MODULE_0___default()(Common_Globals__WEBPACK_IMPORTED_MODULE_8__["sUserAgent"]).call(Common_Globals__WEBPACK_IMPORTED_MODULE_8__["sUserAgent"], 'chrome'))) {
      var oLink = window__WEBPACK_IMPORTED_MODULE_2___default.a.document.createElement('a');
      oLink.href = link;

      if (window__WEBPACK_IMPORTED_MODULE_2___default.a.document && window__WEBPACK_IMPORTED_MODULE_2___default.a.document.createEvent) {
        var oE = window__WEBPACK_IMPORTED_MODULE_2___default.a.document.createEvent.MouseEvents;

        if (oE && oE.initEvent && oLink.dispatchEvent) {
          oE.initEvent('click', true, true);
          oLink.dispatchEvent(oE);
          return true;
        }
      }
    }

    if (Common_Globals__WEBPACK_IMPORTED_MODULE_8__["bMobileDevice"]) {
      window__WEBPACK_IMPORTED_MODULE_2___default.a.open(link, '_self');
      window__WEBPACK_IMPORTED_MODULE_2___default.a.focus();
    } else {
      this.iframe.attr('src', link); // window.document.location.href = link;
    }

    return true;
  }
  /**
   * @returns {boolean}
   */
  ;

  _proto.googlePreviewSupported = function googlePreviewSupported() {
    if (null === this.googlePreviewSupportedCache) {
      this.googlePreviewSupportedCache = !!Storage_Settings__WEBPACK_IMPORTED_MODULE_14__["settingsGet"]('AllowGoogleSocial') && !!Storage_Settings__WEBPACK_IMPORTED_MODULE_14__["settingsGet"]('AllowGoogleSocialPreview');
    }

    return this.googlePreviewSupportedCache;
  }
  /**
   * @param {string} title
   */
  ;

  _proto.setWindowTitle = function setWindowTitle(title) {
    title = Object(Common_Utils__WEBPACK_IMPORTED_MODULE_9__["isNormal"])(title) && 0 < title.length ? '' + title : '';

    if (Storage_Settings__WEBPACK_IMPORTED_MODULE_14__["settingsGet"]('Title')) {
      title += (title ? ' - ' : '') + Storage_Settings__WEBPACK_IMPORTED_MODULE_14__["settingsGet"]('Title');
    }

    window__WEBPACK_IMPORTED_MODULE_2___default.a.document.title = title + ' ...';
    window__WEBPACK_IMPORTED_MODULE_2___default.a.document.title = title;
  };

  _proto.redirectToAdminPanel = function redirectToAdminPanel() {
    ___WEBPACK_IMPORTED_MODULE_4___default.a.delay(function () {
      window__WEBPACK_IMPORTED_MODULE_2___default.a.location.href = Object(Common_Links__WEBPACK_IMPORTED_MODULE_11__[/* rootAdmin */ "x"])();
    }, Common_Enums__WEBPACK_IMPORTED_MODULE_10__["Magics"].Time100ms);
  };

  _proto.clearClientSideToken = function clearClientSideToken() {
    if (window__WEBPACK_IMPORTED_MODULE_2___default.a.__rlah_clear) {
      window__WEBPACK_IMPORTED_MODULE_2___default.a.__rlah_clear();
    }
  }
  /**
   * @param {string} token
   */
  ;

  _proto.setClientSideToken = function setClientSideToken(token) {
    if (window__WEBPACK_IMPORTED_MODULE_2___default.a.__rlah_set) {
      window__WEBPACK_IMPORTED_MODULE_2___default.a.__rlah_set(token);

      Storage_Settings__WEBPACK_IMPORTED_MODULE_14__["settingsSet"]('AuthAccountHash', token);
      Object(Common_Links__WEBPACK_IMPORTED_MODULE_11__[/* populateAuthSuffix */ "v"])();
    }
  }
  /**
   * @param {boolean=} admin = false
   * @param {boolean=} logout = false
   * @param {boolean=} close = false
   */
  ;

  _proto.loginAndLogoutReload = function loginAndLogoutReload(admin, logout, close) {
    if (admin === void 0) {
      admin = false;
    }

    if (logout === void 0) {
      logout = false;
    }

    if (close === void 0) {
      close = false;
    }

    var inIframe = !!Storage_Settings__WEBPACK_IMPORTED_MODULE_14__["appSettingsGet"]('inIframe');
    var customLogoutLink = Object(Common_Utils__WEBPACK_IMPORTED_MODULE_9__["pString"])(Storage_Settings__WEBPACK_IMPORTED_MODULE_14__["appSettingsGet"]('customLogoutLink'));

    if (logout) {
      this.clearClientSideToken();
    }

    if (logout && close && window__WEBPACK_IMPORTED_MODULE_2___default.a.close) {
      window__WEBPACK_IMPORTED_MODULE_2___default.a.close();
    }

    customLogoutLink = customLogoutLink || (admin ? Object(Common_Links__WEBPACK_IMPORTED_MODULE_11__[/* rootAdmin */ "x"])() : Object(Common_Links__WEBPACK_IMPORTED_MODULE_11__[/* rootUser */ "y"])());

    if (logout && window__WEBPACK_IMPORTED_MODULE_2___default.a.location.href !== customLogoutLink) {
      ___WEBPACK_IMPORTED_MODULE_4___default.a.delay(function () {
        if (inIframe && window__WEBPACK_IMPORTED_MODULE_2___default.a.parent) {
          window__WEBPACK_IMPORTED_MODULE_2___default.a.parent.location.href = customLogoutLink;
        } else {
          window__WEBPACK_IMPORTED_MODULE_2___default.a.location.href = customLogoutLink;
        }

        Common_Globals__WEBPACK_IMPORTED_MODULE_8__["$win"].trigger('rl.tooltips.diactivate');
      }, Common_Enums__WEBPACK_IMPORTED_MODULE_10__["Magics"].Time100ms);
    } else {
      Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_18__["routeOff"])();
      Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_18__["setHash"])(Object(Common_Links__WEBPACK_IMPORTED_MODULE_11__[/* root */ "w"])(), true);
      Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_18__["routeOff"])();

      ___WEBPACK_IMPORTED_MODULE_4___default.a.delay(function () {
        if (inIframe && window__WEBPACK_IMPORTED_MODULE_2___default.a.parent) {
          window__WEBPACK_IMPORTED_MODULE_2___default.a.parent.location.reload();
        } else {
          window__WEBPACK_IMPORTED_MODULE_2___default.a.location.reload();
        }

        Common_Globals__WEBPACK_IMPORTED_MODULE_8__["$win"].trigger('rl.tooltips.diactivate');
      }, Common_Enums__WEBPACK_IMPORTED_MODULE_10__["Magics"].Time100ms);
    }
  };

  _proto.historyBack = function historyBack() {
    window__WEBPACK_IMPORTED_MODULE_2___default.a.history.back();
  };

  _proto.bootstart = function bootstart() {
    // log('Ps' + 'ss, hac' + 'kers! The' + 're\'s not' + 'hing inte' + 'resting :' + ')');
    Common_Events__WEBPACK_IMPORTED_MODULE_13__[/* pub */ "a"]('rl.bootstart');
    var mobile = Storage_Settings__WEBPACK_IMPORTED_MODULE_14__["appSettingsGet"]('mobile');
    ko__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"].components.register('SaveTrigger', __webpack_require__(/*! Component/SaveTrigger */ 381).default);
    ko__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"].components.register('Input', __webpack_require__(/*! Component/Input */ 382).default);
    ko__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"].components.register('Select', __webpack_require__(/*! Component/Select */ 383).default);
    ko__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"].components.register('Radio', __webpack_require__(/*! Component/Radio */ 384).default);
    ko__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"].components.register('TextArea', __webpack_require__(/*! Component/TextArea */ 385).default);
    ko__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"].components.register('Date', __webpack_require__(/*! Component/Date */ 386).default);
    ko__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"].components.register('x-script', __webpack_require__(/*! Component/Script */ 387).default); // ko.components.register('svg-icon', require('Component/SvgIcon').default);

    if (Storage_Settings__WEBPACK_IMPORTED_MODULE_14__["appSettingsGet"]('materialDesign') && Common_Globals__WEBPACK_IMPORTED_MODULE_8__["bAnimationSupported"]) {
      ko__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"].components.register('Checkbox', __webpack_require__(/*! Component/MaterialDesign/Checkbox */ 388).default);
      ko__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"].components.register('CheckboxSimple', __webpack_require__(/*! Component/Checkbox */ 206).default);
    } else {
      // ko.components.register('Checkbox', require('Component/Classic/Checkbox').default);
      // ko.components.register('CheckboxSimple', require('Component/Classic/Checkbox').default);
      ko__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"].components.register('Checkbox', __webpack_require__(/*! Component/Checkbox */ 206).default);
      ko__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"].components.register('CheckboxSimple', __webpack_require__(/*! Component/Checkbox */ 206).default);
    }

    Object(Common_Translator__WEBPACK_IMPORTED_MODULE_12__["initOnStartOrLangChange"])(Common_Translator__WEBPACK_IMPORTED_MODULE_12__["initNotificationLanguage"]);

    ___WEBPACK_IMPORTED_MODULE_4___default.a.delay(Common_Utils__WEBPACK_IMPORTED_MODULE_9__["windowResizeCallback"], Common_Enums__WEBPACK_IMPORTED_MODULE_10__["Magics"].Time1s);

    Common_Events__WEBPACK_IMPORTED_MODULE_13__[/* sub */ "b"]('ssm.mobile-enter', function () {
      Object(Common_Globals__WEBPACK_IMPORTED_MODULE_8__["leftPanelDisabled"])(true);
    });
    Common_Events__WEBPACK_IMPORTED_MODULE_13__[/* sub */ "b"]('ssm.mobile-leave', function () {
      Object(Common_Globals__WEBPACK_IMPORTED_MODULE_8__["leftPanelDisabled"])(false);
    });

    if (!mobile) {
      Common_Globals__WEBPACK_IMPORTED_MODULE_8__["$html"].addClass('rl-desktop');
      ssm__WEBPACK_IMPORTED_MODULE_7___default.a.addState({
        id: 'mobile',
        query: '(max-width: 767px)',
        onEnter: function onEnter() {
          Common_Globals__WEBPACK_IMPORTED_MODULE_8__["$html"].addClass('ssm-state-mobile');
          Common_Events__WEBPACK_IMPORTED_MODULE_13__[/* pub */ "a"]('ssm.mobile-enter');
        },
        onLeave: function onLeave() {
          Common_Globals__WEBPACK_IMPORTED_MODULE_8__["$html"].removeClass('ssm-state-mobile');
          Common_Events__WEBPACK_IMPORTED_MODULE_13__[/* pub */ "a"]('ssm.mobile-leave');
        }
      });
      ssm__WEBPACK_IMPORTED_MODULE_7___default.a.addState({
        id: 'tablet',
        query: '(min-width: 768px) and (max-width: 999px)',
        onEnter: function onEnter() {
          Common_Globals__WEBPACK_IMPORTED_MODULE_8__["$html"].addClass('ssm-state-tablet');
        },
        onLeave: function onLeave() {
          Common_Globals__WEBPACK_IMPORTED_MODULE_8__["$html"].removeClass('ssm-state-tablet');
        }
      });
      ssm__WEBPACK_IMPORTED_MODULE_7___default.a.addState({
        id: 'desktop',
        query: '(min-width: 1000px) and (max-width: 1400px)',
        onEnter: function onEnter() {
          Common_Globals__WEBPACK_IMPORTED_MODULE_8__["$html"].addClass('ssm-state-desktop');
        },
        onLeave: function onLeave() {
          Common_Globals__WEBPACK_IMPORTED_MODULE_8__["$html"].removeClass('ssm-state-desktop');
        }
      });
      ssm__WEBPACK_IMPORTED_MODULE_7___default.a.addState({
        id: 'desktop-large',
        query: '(min-width: 1401px)',
        onEnter: function onEnter() {
          Common_Globals__WEBPACK_IMPORTED_MODULE_8__["$html"].addClass('ssm-state-desktop-large');
        },
        onLeave: function onLeave() {
          Common_Globals__WEBPACK_IMPORTED_MODULE_8__["$html"].removeClass('ssm-state-desktop-large');
        }
      });
    } else {
      Common_Globals__WEBPACK_IMPORTED_MODULE_8__["$html"].addClass('ssm-state-mobile').addClass('rl-mobile');
      Common_Events__WEBPACK_IMPORTED_MODULE_13__[/* pub */ "a"]('ssm.mobile-enter');
    }

    Common_Globals__WEBPACK_IMPORTED_MODULE_8__["leftPanelDisabled"].subscribe(function (bValue) {
      Common_Globals__WEBPACK_IMPORTED_MODULE_8__["$html"].toggleClass('rl-left-panel-disabled', bValue);
      Common_Globals__WEBPACK_IMPORTED_MODULE_8__["$html"].toggleClass('rl-left-panel-enabled', !bValue);
    });
    Common_Globals__WEBPACK_IMPORTED_MODULE_8__["leftPanelType"].subscribe(function (sValue) {
      Common_Globals__WEBPACK_IMPORTED_MODULE_8__["$html"].toggleClass('rl-left-panel-none', 'none' === sValue);
      Common_Globals__WEBPACK_IMPORTED_MODULE_8__["$html"].toggleClass('rl-left-panel-short', 'short' === sValue);
    });
    Common_Globals__WEBPACK_IMPORTED_MODULE_8__["leftPanelDisabled"].valueHasMutated();
    Stores_Language__WEBPACK_IMPORTED_MODULE_15__[/* default */ "a"].populate();
    Stores_Theme__WEBPACK_IMPORTED_MODULE_16__[/* default */ "a"].populate();
    Stores_Social__WEBPACK_IMPORTED_MODULE_17__[/* default */ "a"].populate();
  };

  return AbstractApp;
}(Knoin_AbstractBoot__WEBPACK_IMPORTED_MODULE_19__[/* AbstractBoot */ "a"]);



/***/ }),
/* 266 */
/*!***********************************!*\
  !*** ./dev/Knoin/AbstractBoot.js ***!
  \***********************************/
/*! exports provided: AbstractBoot */
/*! exports used: AbstractBoot */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return AbstractBoot; });
var AbstractBoot =
/*#__PURE__*/
function () {
  function AbstractBoot() {}

  var _proto = AbstractBoot.prototype;

  _proto.bootstart = function bootstart() {
    /* no-empty */
  };

  return AbstractBoot;
}();

/***/ }),
/* 267 */
/*!****************************************!*\
  !*** ./dev/Component/AbstractRadio.js ***!
  \****************************************/
/*! exports provided: AbstractRadio, default */
/*! exports used: AbstractRadio */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return AbstractRadio; });
/* unused harmony export default */
/* harmony import */ var core_js_modules_es_array_iterator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.array.iterator */ 186);
/* harmony import */ var core_js_modules_es_array_iterator__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_iterator__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var core_js_modules_es_object_to_string__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es.object.to-string */ 63);
/* harmony import */ var core_js_modules_es_object_to_string__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_to_string__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var core_js_modules_web_dom_collections_iterator__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core-js/modules/web.dom-collections.iterator */ 230);
/* harmony import */ var core_js_modules_web_dom_collections_iterator__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_iterator__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_bind__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/bind */ 26);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_bind__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_bind__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/map */ 18);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_values__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/values */ 113);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_values__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_values__WEBPACK_IMPORTED_MODULE_5__);
/* harmony import */ var _babel_runtime_corejs3_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/esm/assertThisInitialized */ 33);
/* harmony import */ var _babel_runtime_corejs3_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/esm/inheritsLoose */ 10);
/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! _ */ 3);
/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(___WEBPACK_IMPORTED_MODULE_8__);
/* harmony import */ var ko__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ko */ 1);
/* harmony import */ var Common_Utils__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! Common/Utils */ 2);
/* harmony import */ var Component_Abstract__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! Component/Abstract */ 35);













var AbstractRadio =
/*#__PURE__*/
function (_AbstractComponent) {
  Object(_babel_runtime_corejs3_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"])(AbstractRadio, _AbstractComponent);

  /**
   * @param {Object} params
   */
  function AbstractRadio(params) {
    var _this;

    _this = _AbstractComponent.call(this) || this;
    _this.values = ko__WEBPACK_IMPORTED_MODULE_9__[/* default */ "a"].observableArray([]);
    _this.value = params.value;

    if (Object(Common_Utils__WEBPACK_IMPORTED_MODULE_10__["isUnd"])(_this.value) || !_this.value.subscribe) {
      _this.value = ko__WEBPACK_IMPORTED_MODULE_9__[/* default */ "a"].observable('');
    }

    _this.inline = Object(Common_Utils__WEBPACK_IMPORTED_MODULE_10__["isUnd"])(params.inline) ? false : params.inline;
    _this.readOnly = Object(Common_Utils__WEBPACK_IMPORTED_MODULE_10__["isUnd"])(params.readOnly) ? false : !!params.readOnly;

    if (_babel_runtime_corejs3_core_js_stable_instance_values__WEBPACK_IMPORTED_MODULE_5___default()(params)) {
      _babel_runtime_corejs3_core_js_stable_instance_values__WEBPACK_IMPORTED_MODULE_5___default()(_this).call(_this, _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_4___default()(___WEBPACK_IMPORTED_MODULE_8___default.a).call(___WEBPACK_IMPORTED_MODULE_8___default.a, _babel_runtime_corejs3_core_js_stable_instance_values__WEBPACK_IMPORTED_MODULE_5___default()(params), function (label, value) {
        return {
          label: label,
          value: value
        };
      }));
    }

    _this.click = _babel_runtime_corejs3_core_js_stable_instance_bind__WEBPACK_IMPORTED_MODULE_3___default()(___WEBPACK_IMPORTED_MODULE_8___default.a).call(___WEBPACK_IMPORTED_MODULE_8___default.a, _this.click, Object(_babel_runtime_corejs3_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"])(_this));
    return _this;
  }

  var _proto = AbstractRadio.prototype;

  _proto.click = function click(value) {
    if (!this.readOnly && value) {
      this.value(value.value);
    }
  };

  return AbstractRadio;
}(Component_Abstract__WEBPACK_IMPORTED_MODULE_11__[/* AbstractComponent */ "a"]);



/***/ }),
/* 268 */
/*!*****************************************************************************!*\
  !*** ./node_modules/@babel/runtime-corejs3/core-js-stable/instance/keys.js ***!
  \*****************************************************************************/
/*! no static exports found */
/*! exports used: default */
/***/ (function(module, exports, __webpack_require__) {

module.exports = __webpack_require__(/*! core-js-pure/stable/instance/keys */ 523);

/***/ }),
/* 269 */
/*!****************************************!*\
  !*** ./dev/Model/ComposeAttachment.js ***!
  \****************************************/
/*! exports provided: ComposeAttachmentModel, default */
/*! exports used: ComposeAttachmentModel */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ComposeAttachmentModel; });
/* unused harmony export default */
/* harmony import */ var _babel_runtime_corejs3_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/esm/inheritsLoose */ 10);
/* harmony import */ var ko__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ko */ 1);
/* harmony import */ var Common_Utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! Common/Utils */ 2);
/* harmony import */ var Model_Attachment__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! Model/Attachment */ 177);
/* harmony import */ var Knoin_AbstractModel__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! Knoin/AbstractModel */ 64);






var ComposeAttachmentModel =
/*#__PURE__*/
function (_AbstractModel) {
  Object(_babel_runtime_corejs3_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(ComposeAttachmentModel, _AbstractModel);

  /**
   * @param {string} id
   * @param {string} fileName
   * @param {?number=} size = null
   * @param {boolean=} isInline = false
   * @param {boolean=} isLinked = false
   * @param {string=} CID = ''
   * @param {string=} contentLocation = ''
   */
  function ComposeAttachmentModel(id, fileName, size, isInline, isLinked, CID, contentLocation) {
    var _this;

    if (size === void 0) {
      size = null;
    }

    if (isInline === void 0) {
      isInline = false;
    }

    if (isLinked === void 0) {
      isLinked = false;
    }

    if (CID === void 0) {
      CID = '';
    }

    if (contentLocation === void 0) {
      contentLocation = '';
    }

    _this = _AbstractModel.call(this, 'ComposeAttachmentModel') || this;
    _this.id = id;
    _this.isInline = !!isInline;
    _this.isLinked = !!isLinked;
    _this.CID = CID;
    _this.contentLocation = contentLocation;
    _this.fromMessage = false;
    _this.fileName = ko__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"].observable(fileName);
    _this.size = ko__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"].observable(size);
    _this.tempName = ko__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"].observable('');
    _this.progress = ko__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"].observable(0);
    _this.error = ko__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"].observable('');
    _this.waiting = ko__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"].observable(true);
    _this.uploading = ko__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"].observable(false);
    _this.enabled = ko__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"].observable(true);
    _this.complete = ko__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"].observable(false);
    _this.progressText = ko__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"].computed(function () {
      var p = _this.progress();

      return 0 === p ? '' : '' + (98 < p ? 100 : p) + '%';
    });
    _this.progressStyle = ko__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"].computed(function () {
      var p = _this.progress();

      return 0 === p ? '' : 'width:' + (98 < p ? 100 : p) + '%';
    });
    _this.title = ko__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"].computed(function () {
      var error = _this.error();

      return '' !== error ? error : _this.fileName();
    });
    _this.friendlySize = ko__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"].computed(function () {
      var localSize = _this.size();

      return null === localSize ? '' : Object(Common_Utils__WEBPACK_IMPORTED_MODULE_2__["friendlySize"])(localSize);
    });
    _this.mimeType = ko__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"].computed(function () {
      return Object(Common_Utils__WEBPACK_IMPORTED_MODULE_2__["mimeContentType"])(_this.fileName());
    });
    _this.fileExt = ko__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"].computed(function () {
      return Object(Common_Utils__WEBPACK_IMPORTED_MODULE_2__["getFileExtension"])(_this.fileName());
    });

    _this.regDisposables([_this.progressText, _this.progressStyle, _this.title, _this.friendlySize, _this.mimeType, _this.fileExt]);

    return _this;
  }
  /**
   * @param {AjaxJsonComposeAttachment} json
   * @returns {boolean}
   */


  var _proto = ComposeAttachmentModel.prototype;

  _proto.initByUploadJson = function initByUploadJson(json) {
    var bResult = false;

    if (json) {
      this.fileName(json.Name);
      this.size(Object(Common_Utils__WEBPACK_IMPORTED_MODULE_2__["isUnd"])(json.Size) ? 0 : Object(Common_Utils__WEBPACK_IMPORTED_MODULE_2__["pInt"])(json.Size));
      this.tempName(Object(Common_Utils__WEBPACK_IMPORTED_MODULE_2__["isUnd"])(json.TempName) ? '' : json.TempName);
      this.isInline = false;
      bResult = true;
    }

    return bResult;
  }
  /**
   * @returns {string}
   */
  ;

  _proto.iconClass = function iconClass() {
    return Object(Model_Attachment__WEBPACK_IMPORTED_MODULE_3__[/* staticIconClass */ "d"])(Object(Model_Attachment__WEBPACK_IMPORTED_MODULE_3__[/* staticFileType */ "c"])(this.fileExt(), this.mimeType()))[0];
  }
  /**
   * @returns {string}
   */
  ;

  _proto.iconText = function iconText() {
    return Object(Model_Attachment__WEBPACK_IMPORTED_MODULE_3__[/* staticIconClass */ "d"])(Object(Model_Attachment__WEBPACK_IMPORTED_MODULE_3__[/* staticFileType */ "c"])(this.fileExt(), this.mimeType()))[1];
  };

  return ComposeAttachmentModel;
}(Knoin_AbstractModel__WEBPACK_IMPORTED_MODULE_4__[/* AbstractModel */ "a"]);



/***/ }),
/* 270 */
/*!**************************************!*\
  !*** ./dev/Model/ContactProperty.js ***!
  \**************************************/
/*! exports provided: ContactPropertyModel, default */
/*! exports used: ContactPropertyModel */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ContactPropertyModel; });
/* unused harmony export default */
/* harmony import */ var _babel_runtime_corejs3_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/esm/inheritsLoose */ 10);
/* harmony import */ var ko__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ko */ 1);
/* harmony import */ var Common_Enums__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! Common/Enums */ 0);
/* harmony import */ var Common_Utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! Common/Utils */ 2);
/* harmony import */ var Common_Translator__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! Common/Translator */ 9);
/* harmony import */ var Knoin_AbstractModel__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! Knoin/AbstractModel */ 64);







var ContactPropertyModel =
/*#__PURE__*/
function (_AbstractModel) {
  Object(_babel_runtime_corejs3_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(ContactPropertyModel, _AbstractModel);

  /**
   * @param {number=} type = Enums.ContactPropertyType.Unknown
   * @param {string=} typeStr = ''
   * @param {string=} value = ''
   * @param {boolean=} focused = false
   * @param {string=} placeholder = ''
   */
  function ContactPropertyModel(type, typeStr, value, focused, placeholder) {
    var _this;

    if (type === void 0) {
      type = Common_Enums__WEBPACK_IMPORTED_MODULE_2__["ContactPropertyType"].Unknown;
    }

    if (typeStr === void 0) {
      typeStr = '';
    }

    if (value === void 0) {
      value = '';
    }

    if (focused === void 0) {
      focused = false;
    }

    if (placeholder === void 0) {
      placeholder = '';
    }

    _this = _AbstractModel.call(this, 'ContactPropertyModel') || this;
    _this.type = ko__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"].observable(Object(Common_Utils__WEBPACK_IMPORTED_MODULE_3__["pInt"])(type));
    _this.typeStr = ko__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"].observable(Object(Common_Utils__WEBPACK_IMPORTED_MODULE_3__["pString"])(typeStr));
    _this.focused = ko__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"].observable(!!focused);
    _this.value = ko__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"].observable(Object(Common_Utils__WEBPACK_IMPORTED_MODULE_3__["pString"])(value));
    _this.placeholder = ko__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"].observable(placeholder);
    _this.placeholderValue = ko__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"].computed(function () {
      var v = _this.placeholder();

      return v ? Object(Common_Translator__WEBPACK_IMPORTED_MODULE_4__["i18n"])(v) : '';
    });
    _this.largeValue = ko__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"].computed(function () {
      return Common_Enums__WEBPACK_IMPORTED_MODULE_2__["ContactPropertyType"].Note === _this.type();
    });

    _this.regDisposables([_this.placeholderValue, _this.largeValue]);

    return _this;
  }

  return ContactPropertyModel;
}(Knoin_AbstractModel__WEBPACK_IMPORTED_MODULE_5__[/* AbstractModel */ "a"]);



/***/ }),
/* 271 */,
/* 272 */
/*!*********************************************************!*\
  !*** ./node_modules/core-js/modules/es.array.filter.js ***!
  \*********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var $ = __webpack_require__(/*! ../internals/export */ 48);
var $filter = __webpack_require__(/*! ../internals/array-iteration */ 347).filter;
var arrayMethodHasSpeciesSupport = __webpack_require__(/*! ../internals/array-method-has-species-support */ 349);
var arrayMethodUsesToLength = __webpack_require__(/*! ../internals/array-method-uses-to-length */ 225);

var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('filter');
// Edge 14- issue
var USES_TO_LENGTH = arrayMethodUsesToLength('filter');

// `Array.prototype.filter` method
// https://tc39.github.io/ecma262/#sec-array.prototype.filter
// with adding support of @@species
$({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT || !USES_TO_LENGTH }, {
  filter: function filter(callbackfn /* , thisArg */) {
    return $filter(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  }
});


/***/ }),
/* 273 */
/*!**********************************************************!*\
  !*** ./node_modules/core-js/modules/es.string.search.js ***!
  \**********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var fixRegExpWellKnownSymbolLogic = __webpack_require__(/*! ../internals/fix-regexp-well-known-symbol-logic */ 134);
var anObject = __webpack_require__(/*! ../internals/an-object */ 37);
var requireObjectCoercible = __webpack_require__(/*! ../internals/require-object-coercible */ 55);
var sameValue = __webpack_require__(/*! ../internals/same-value */ 354);
var regExpExec = __webpack_require__(/*! ../internals/regexp-exec-abstract */ 135);

// @@search logic
fixRegExpWellKnownSymbolLogic('search', 1, function (SEARCH, nativeSearch, maybeCallNative) {
  return [
    // `String.prototype.search` method
    // https://tc39.github.io/ecma262/#sec-string.prototype.search
    function search(regexp) {
      var O = requireObjectCoercible(this);
      var searcher = regexp == undefined ? undefined : regexp[SEARCH];
      return searcher !== undefined ? searcher.call(regexp, O) : new RegExp(regexp)[SEARCH](String(O));
    },
    // `RegExp.prototype[@@search]` method
    // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@search
    function (regexp) {
      var res = maybeCallNative(nativeSearch, regexp, this);
      if (res.done) return res.value;

      var rx = anObject(regexp);
      var S = String(this);

      var previousLastIndex = rx.lastIndex;
      if (!sameValue(previousLastIndex, 0)) rx.lastIndex = 0;
      var result = regExpExec(rx, S);
      if (!sameValue(rx.lastIndex, previousLastIndex)) rx.lastIndex = previousLastIndex;
      return result === null ? -1 : result.index;
    }
  ];
});


/***/ }),
/* 274 */
/*!****************************************!*\
  !*** ./dev/View/Popup/FolderSystem.js ***!
  \****************************************/
/*! exports provided: FolderSystemPopupView, default */
/*! all exports used */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FolderSystemPopupView", function() { return FolderSystemPopupView; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return FolderSystemPopupView; });
/* harmony import */ var _babel_runtime_corejs3_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/esm/inheritsLoose */ 10);
/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! _ */ 3);
/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(___WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var ko__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ko */ 1);
/* harmony import */ var Common_Enums__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! Common/Enums */ 0);
/* harmony import */ var Common_Consts__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! Common/Consts */ 25);
/* harmony import */ var Common_Utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! Common/Utils */ 2);
/* harmony import */ var Common_Translator__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! Common/Translator */ 9);
/* harmony import */ var Stores_User_Folder__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! Stores/User/Folder */ 11);
/* harmony import */ var Storage_Settings__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! Storage/Settings */ 5);
/* harmony import */ var Remote_User_Ajax__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! Remote/User/Ajax */ 16);
/* harmony import */ var Knoin_Knoin__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! Knoin/Knoin */ 7);
/* harmony import */ var Knoin_AbstractViewNext__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! Knoin/AbstractViewNext */ 28);


var _dec, _class;












var FolderSystemPopupView = (_dec = Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_10__["popup"])({
  name: 'View/Popup/FolderSystem',
  templateID: 'PopupsFolderSystem'
}), _dec(_class =
/*#__PURE__*/
function (_AbstractViewNext) {
  Object(_babel_runtime_corejs3_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(FolderSystemPopupView, _AbstractViewNext);

  function FolderSystemPopupView() {
    var _this;

    _this = _AbstractViewNext.call(this) || this;
    _this.sChooseOnText = '';
    _this.sUnuseText = '';
    Object(Common_Translator__WEBPACK_IMPORTED_MODULE_6__["initOnStartOrLangChange"])(function () {
      _this.sChooseOnText = Object(Common_Translator__WEBPACK_IMPORTED_MODULE_6__["i18n"])('POPUPS_SYSTEM_FOLDERS/SELECT_CHOOSE_ONE');
      _this.sUnuseText = Object(Common_Translator__WEBPACK_IMPORTED_MODULE_6__["i18n"])('POPUPS_SYSTEM_FOLDERS/SELECT_UNUSE_NAME');
    });
    _this.notification = ko__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"].observable('');
    _this.folderSelectList = ko__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"].computed(function () {
      return Object(Common_Utils__WEBPACK_IMPORTED_MODULE_5__["folderListOptionsBuilder"])([], Stores_User_Folder__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"].folderList(), Stores_User_Folder__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"].folderListSystemNames(), [['', _this.sChooseOnText], [Common_Consts__WEBPACK_IMPORTED_MODULE_4__[/* UNUSED_OPTION_VALUE */ "r"], _this.sUnuseText]], null, null, null, null, null, true);
    });
    _this.sentFolder = Stores_User_Folder__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"].sentFolder;
    _this.draftFolder = Stores_User_Folder__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"].draftFolder;
    _this.spamFolder = Stores_User_Folder__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"].spamFolder;
    _this.trashFolder = Stores_User_Folder__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"].trashFolder;
    _this.archiveFolder = Stores_User_Folder__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"].archiveFolder;

    var fSetSystemFolders = function fSetSystemFolders() {
      Storage_Settings__WEBPACK_IMPORTED_MODULE_8__["settingsSet"]('SentFolder', Stores_User_Folder__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"].sentFolder());
      Storage_Settings__WEBPACK_IMPORTED_MODULE_8__["settingsSet"]('DraftFolder', Stores_User_Folder__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"].draftFolder());
      Storage_Settings__WEBPACK_IMPORTED_MODULE_8__["settingsSet"]('SpamFolder', Stores_User_Folder__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"].spamFolder());
      Storage_Settings__WEBPACK_IMPORTED_MODULE_8__["settingsSet"]('TrashFolder', Stores_User_Folder__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"].trashFolder());
      Storage_Settings__WEBPACK_IMPORTED_MODULE_8__["settingsSet"]('ArchiveFolder', Stores_User_Folder__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"].archiveFolder());
    },
        fSaveSystemFolders = ___WEBPACK_IMPORTED_MODULE_1___default.a.debounce(function () {
      fSetSystemFolders();
      Remote_User_Ajax__WEBPACK_IMPORTED_MODULE_9__[/* default */ "a"].saveSystemFolders(Common_Utils__WEBPACK_IMPORTED_MODULE_5__["noop"], {
        SentFolder: Stores_User_Folder__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"].sentFolder(),
        DraftFolder: Stores_User_Folder__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"].draftFolder(),
        SpamFolder: Stores_User_Folder__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"].spamFolder(),
        TrashFolder: Stores_User_Folder__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"].trashFolder(),
        ArchiveFolder: Stores_User_Folder__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"].archiveFolder(),
        NullFolder: 'NullFolder'
      });
    }, Common_Enums__WEBPACK_IMPORTED_MODULE_3__["Magics"].Time1s),
        fCallback = function fCallback() {
      fSetSystemFolders();
      fSaveSystemFolders();
    };

    Stores_User_Folder__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"].sentFolder.subscribe(fCallback);
    Stores_User_Folder__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"].draftFolder.subscribe(fCallback);
    Stores_User_Folder__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"].spamFolder.subscribe(fCallback);
    Stores_User_Folder__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"].trashFolder.subscribe(fCallback);
    Stores_User_Folder__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"].archiveFolder.subscribe(fCallback);
    _this.defautOptionsAfterRender = Common_Utils__WEBPACK_IMPORTED_MODULE_5__["defautOptionsAfterRender"];
    return _this;
  }
  /**
   * @param {number=} notificationType = SetSystemFoldersNotification.None
   */


  var _proto = FolderSystemPopupView.prototype;

  _proto.onShow = function onShow(notificationType) {
    if (notificationType === void 0) {
      notificationType = Common_Enums__WEBPACK_IMPORTED_MODULE_3__["SetSystemFoldersNotification"].None;
    }

    var notification = '';

    switch (notificationType) {
      case Common_Enums__WEBPACK_IMPORTED_MODULE_3__["SetSystemFoldersNotification"].Sent:
        notification = Object(Common_Translator__WEBPACK_IMPORTED_MODULE_6__["i18n"])('POPUPS_SYSTEM_FOLDERS/NOTIFICATION_SENT');
        break;

      case Common_Enums__WEBPACK_IMPORTED_MODULE_3__["SetSystemFoldersNotification"].Draft:
        notification = Object(Common_Translator__WEBPACK_IMPORTED_MODULE_6__["i18n"])('POPUPS_SYSTEM_FOLDERS/NOTIFICATION_DRAFTS');
        break;

      case Common_Enums__WEBPACK_IMPORTED_MODULE_3__["SetSystemFoldersNotification"].Spam:
        notification = Object(Common_Translator__WEBPACK_IMPORTED_MODULE_6__["i18n"])('POPUPS_SYSTEM_FOLDERS/NOTIFICATION_SPAM');
        break;

      case Common_Enums__WEBPACK_IMPORTED_MODULE_3__["SetSystemFoldersNotification"].Trash:
        notification = Object(Common_Translator__WEBPACK_IMPORTED_MODULE_6__["i18n"])('POPUPS_SYSTEM_FOLDERS/NOTIFICATION_TRASH');
        break;

      case Common_Enums__WEBPACK_IMPORTED_MODULE_3__["SetSystemFoldersNotification"].Archive:
        notification = Object(Common_Translator__WEBPACK_IMPORTED_MODULE_6__["i18n"])('POPUPS_SYSTEM_FOLDERS/NOTIFICATION_ARCHIVE');
        break;
      // no default
    }

    this.notification(notification);
  };

  return FolderSystemPopupView;
}(Knoin_AbstractViewNext__WEBPACK_IMPORTED_MODULE_11__[/* AbstractViewNext */ "a"])) || _class);


/***/ }),
/* 275 */
/*!***************************************!*\
  !*** ./dev/Promises/AbstractBasic.js ***!
  \***************************************/
/*! exports provided: AbstractBasicPromises */
/*! exports used: AbstractBasicPromises */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return AbstractBasicPromises; });
/* harmony import */ var core_js_modules_es_object_to_string__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.object.to-string */ 63);
/* harmony import */ var core_js_modules_es_object_to_string__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_to_string__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var core_js_modules_es_promise__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es.promise */ 120);
/* harmony import */ var core_js_modules_es_promise__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_promise__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/for-each */ 69);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _babel_runtime_corejs3_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/esm/defineProperty */ 17);
/* harmony import */ var window__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! window */ 4);
/* harmony import */ var window__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(window__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var Common_Utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! Common/Utils */ 2);






var AbstractBasicPromises =
/*#__PURE__*/
function () {
  function AbstractBasicPromises() {
    Object(_babel_runtime_corejs3_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(this, "oPromisesStack", {});
  }

  var _proto = AbstractBasicPromises.prototype;

  _proto.func = function func(fFunc) {
    fFunc();
    return this;
  };

  _proto.fastResolve = function fastResolve(mData) {
    return window__WEBPACK_IMPORTED_MODULE_4___default.a.Promise.resolve(mData);
  };

  _proto.fastReject = function fastReject(mData) {
    return window__WEBPACK_IMPORTED_MODULE_4___default.a.Promise.reject(mData);
  };

  _proto.setTrigger = function setTrigger(trigger, value) {
    if (trigger) {
      var _context;

      value = !!value;

      _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_2___default()(_context = Object(Common_Utils__WEBPACK_IMPORTED_MODULE_5__["isArray"])(trigger) ? trigger : [trigger]).call(_context, function (fTrigger) {
        if (fTrigger) {
          fTrigger(value);
        }
      });
    }
  };

  return AbstractBasicPromises;
}();

/***/ }),
/* 276 */
/*!*************************************************!*\
  !*** ./dev/View/User/AbstractSystemDropDown.js ***!
  \*************************************************/
/*! exports provided: AbstractSystemDropDownUserView, default */
/*! exports used: AbstractSystemDropDownUserView */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return AbstractSystemDropDownUserView; });
/* unused harmony export default */
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_bind__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/bind */ 26);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_bind__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_bind__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _babel_runtime_corejs3_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/esm/assertThisInitialized */ 33);
/* harmony import */ var _babel_runtime_corejs3_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/esm/inheritsLoose */ 10);
/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! _ */ 3);
/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(___WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var ko__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ko */ 1);
/* harmony import */ var key__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! key */ 21);
/* harmony import */ var key__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(key__WEBPACK_IMPORTED_MODULE_5__);
/* harmony import */ var Stores_User_App__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! Stores/User/App */ 31);
/* harmony import */ var Stores_User_Account__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! Stores/User/Account */ 46);
/* harmony import */ var Stores_User_Message__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! Stores/User/Message */ 13);
/* harmony import */ var Common_Enums__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! Common/Enums */ 0);
/* harmony import */ var Common_Utils__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! Common/Utils */ 2);
/* harmony import */ var Common_Links__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! Common/Links */ 15);
/* harmony import */ var Common_Events__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! Common/Events */ 24);
/* harmony import */ var Storage_Settings__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! Storage/Settings */ 5);
/* harmony import */ var Helper_Apps_User__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! Helper/Apps/User */ 22);
/* harmony import */ var Knoin_Knoin__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! Knoin/Knoin */ 7);
/* harmony import */ var Knoin_AbstractViewNext__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! Knoin/AbstractViewNext */ 28);


















var AbstractSystemDropDownUserView =
/*#__PURE__*/
function (_AbstractViewNext) {
  Object(_babel_runtime_corejs3_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(AbstractSystemDropDownUserView, _AbstractViewNext);

  function AbstractSystemDropDownUserView() {
    var _this;

    _this = _AbstractViewNext.call(this) || this;
    _this.logoImg = Object(Common_Utils__WEBPACK_IMPORTED_MODULE_10__["trim"])(Storage_Settings__WEBPACK_IMPORTED_MODULE_13__["settingsGet"]('UserLogo'));
    _this.logoTitle = Object(Common_Utils__WEBPACK_IMPORTED_MODULE_10__["trim"])(Storage_Settings__WEBPACK_IMPORTED_MODULE_13__["settingsGet"]('UserLogoTitle'));
    _this.mobile = !!Storage_Settings__WEBPACK_IMPORTED_MODULE_13__["appSettingsGet"]('mobile');
    _this.mobileDevice = !!Storage_Settings__WEBPACK_IMPORTED_MODULE_13__["appSettingsGet"]('mobileDevice');
    _this.allowSettings = !!Storage_Settings__WEBPACK_IMPORTED_MODULE_13__["capa"](Common_Enums__WEBPACK_IMPORTED_MODULE_9__["Capa"].Settings);
    _this.allowHelp = !!Storage_Settings__WEBPACK_IMPORTED_MODULE_13__["capa"](Common_Enums__WEBPACK_IMPORTED_MODULE_9__["Capa"].Help);
    _this.currentAudio = Stores_User_App__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"].currentAudio;
    _this.accountEmail = Stores_User_Account__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"].email;
    _this.accounts = Stores_User_Account__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"].accounts;
    _this.accountsUnreadCount = Stores_User_Account__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"].accountsUnreadCount;
    _this.accountMenuDropdownTrigger = ko__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"].observable(false);
    _this.capaAdditionalAccounts = ko__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"].observable(Storage_Settings__WEBPACK_IMPORTED_MODULE_13__["capa"](Common_Enums__WEBPACK_IMPORTED_MODULE_9__["Capa"].AdditionalAccounts));
    _this.addAccountClick = _babel_runtime_corejs3_core_js_stable_instance_bind__WEBPACK_IMPORTED_MODULE_0___default()(___WEBPACK_IMPORTED_MODULE_3___default.a).call(___WEBPACK_IMPORTED_MODULE_3___default.a, _this.addAccountClick, Object(_babel_runtime_corejs3_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_this));
    Common_Events__WEBPACK_IMPORTED_MODULE_12__[/* sub */ "b"]('audio.stop', function () {
      return Stores_User_App__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"].currentAudio('');
    });
    Common_Events__WEBPACK_IMPORTED_MODULE_12__[/* sub */ "b"]('audio.start', function (name) {
      return Stores_User_App__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"].currentAudio(name);
    });
    return _this;
  }

  var _proto = AbstractSystemDropDownUserView.prototype;

  _proto.stopPlay = function stopPlay() {
    Common_Events__WEBPACK_IMPORTED_MODULE_12__[/* pub */ "a"]('audio.api.stop');
  };

  _proto.accountClick = function accountClick(account, event) {
    if (account && event && !Object(Common_Utils__WEBPACK_IMPORTED_MODULE_10__["isUnd"])(event.which) && 1 === event.which) {
      Stores_User_Account__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"].accounts.loading(true);

      ___WEBPACK_IMPORTED_MODULE_3___default.a.delay(function () {
        return Stores_User_Account__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"].accounts.loading(false);
      }, Common_Enums__WEBPACK_IMPORTED_MODULE_9__["Magics"].Time1s);
    }

    return true;
  };

  _proto.emailTitle = function emailTitle() {
    return Stores_User_Account__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"].email();
  };

  _proto.settingsClick = function settingsClick() {
    if (Storage_Settings__WEBPACK_IMPORTED_MODULE_13__["capa"](Common_Enums__WEBPACK_IMPORTED_MODULE_9__["Capa"].Settings)) {
      Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_15__["setHash"])(Object(Common_Links__WEBPACK_IMPORTED_MODULE_11__[/* settings */ "z"])());
    }
  };

  _proto.settingsHelp = function settingsHelp() {
    if (Storage_Settings__WEBPACK_IMPORTED_MODULE_13__["capa"](Common_Enums__WEBPACK_IMPORTED_MODULE_9__["Capa"].Help)) {
      Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_15__["showScreenPopup"])(__webpack_require__(/*! View/Popup/KeyboardShortcutsHelp */ 407));
    }
  };

  _proto.addAccountClick = function addAccountClick() {
    if (this.capaAdditionalAccounts()) {
      Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_15__["showScreenPopup"])(__webpack_require__(/*! View/Popup/Account */ 379));
    }
  };

  _proto.logoutClick = function logoutClick() {
    Object(Helper_Apps_User__WEBPACK_IMPORTED_MODULE_14__[/* getApp */ "a"])().logout();
  };

  _proto.onBuild = function onBuild() {
    var _this2 = this;

    key__WEBPACK_IMPORTED_MODULE_5___default()('`', [Common_Enums__WEBPACK_IMPORTED_MODULE_9__["KeyState"].MessageList, Common_Enums__WEBPACK_IMPORTED_MODULE_9__["KeyState"].MessageView, Common_Enums__WEBPACK_IMPORTED_MODULE_9__["KeyState"].Settings], function () {
      if (_this2.viewModelVisibility()) {
        Stores_User_Message__WEBPACK_IMPORTED_MODULE_8__[/* default */ "a"].messageFullScreenMode(false);

        _this2.accountMenuDropdownTrigger(true);
      }
    }); // shortcuts help

    key__WEBPACK_IMPORTED_MODULE_5___default()('shift+/', [Common_Enums__WEBPACK_IMPORTED_MODULE_9__["KeyState"].MessageList, Common_Enums__WEBPACK_IMPORTED_MODULE_9__["KeyState"].MessageView, Common_Enums__WEBPACK_IMPORTED_MODULE_9__["KeyState"].Settings], function () {
      if (_this2.viewModelVisibility()) {
        Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_15__["showScreenPopup"])(__webpack_require__(/*! View/Popup/KeyboardShortcutsHelp */ 407));
        return false;
      }

      return true;
    });
  };

  return AbstractSystemDropDownUserView;
}(Knoin_AbstractViewNext__WEBPACK_IMPORTED_MODULE_16__[/* AbstractViewNext */ "a"]);



/***/ }),
/* 277 */
/*!********************************!*\
  !*** ./dev/Common/Selector.js ***!
  \********************************/
/*! exports provided: Selector, default */
/*! exports used: Selector */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Selector; });
/* unused harmony export default */
/* harmony import */ var core_js_modules_es_object_to_string__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.object.to-string */ 63);
/* harmony import */ var core_js_modules_es_object_to_string__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_to_string__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var core_js_modules_es_regexp_to_string__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es.regexp.to-string */ 111);
/* harmony import */ var core_js_modules_es_regexp_to_string__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_regexp_to_string__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/find */ 12);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_bind__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/bind */ 26);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_bind__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_bind__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/filter */ 34);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var _babel_runtime_corejs3_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/esm/defineProperty */ 17);
/* harmony import */ var $__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! $ */ 8);
/* harmony import */ var $__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n($__WEBPACK_IMPORTED_MODULE_6__);
/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! _ */ 3);
/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(___WEBPACK_IMPORTED_MODULE_7__);
/* harmony import */ var key__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! key */ 21);
/* harmony import */ var key__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(key__WEBPACK_IMPORTED_MODULE_8__);
/* harmony import */ var ko__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ko */ 1);
/* harmony import */ var Common_Enums__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! Common/Enums */ 0);
/* harmony import */ var Common_Utils__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! Common/Utils */ 2);













var Selector =
/*#__PURE__*/
function () {
  /**
   * @param {koProperty} koList
   * @param {koProperty} koSelectedItem
   * @param {koProperty} koFocusedItem
   * @param {string} sItemSelector
   * @param {string} sItemSelectedSelector
   * @param {string} sItemCheckedSelector
   * @param {string} sItemFocusedSelector
   */
  function Selector(koList, koSelectedItem, koFocusedItem, sItemSelector, sItemSelectedSelector, sItemCheckedSelector, sItemFocusedSelector) {
    var _this = this;

    Object(_babel_runtime_corejs3_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"])(this, "list", void 0);

    Object(_babel_runtime_corejs3_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"])(this, "listChecked", void 0);

    Object(_babel_runtime_corejs3_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"])(this, "isListChecked", void 0);

    Object(_babel_runtime_corejs3_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"])(this, "focusedItem", void 0);

    Object(_babel_runtime_corejs3_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"])(this, "selectedItem", void 0);

    Object(_babel_runtime_corejs3_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"])(this, "itemSelectedThrottle", void 0);

    Object(_babel_runtime_corejs3_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"])(this, "selectedItemUseCallback", true);

    Object(_babel_runtime_corejs3_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"])(this, "iSelectNextHelper", 0);

    Object(_babel_runtime_corejs3_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"])(this, "iFocusedNextHelper", 0);

    Object(_babel_runtime_corejs3_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"])(this, "oContentVisible", void 0);

    Object(_babel_runtime_corejs3_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"])(this, "oContentScrollable", void 0);

    Object(_babel_runtime_corejs3_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"])(this, "sItemSelector", void 0);

    Object(_babel_runtime_corejs3_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"])(this, "sItemSelectedSelector", void 0);

    Object(_babel_runtime_corejs3_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"])(this, "sItemCheckedSelector", void 0);

    Object(_babel_runtime_corejs3_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"])(this, "sItemFocusedSelector", void 0);

    Object(_babel_runtime_corejs3_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"])(this, "sLastUid", '');

    Object(_babel_runtime_corejs3_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"])(this, "oCallbacks", {});

    this.list = koList;
    this.listChecked = ko__WEBPACK_IMPORTED_MODULE_9__[/* default */ "a"].computed(function () {
      return _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_4___default()(___WEBPACK_IMPORTED_MODULE_7___default.a).call(___WEBPACK_IMPORTED_MODULE_7___default.a, _this.list(), function (item) {
        return item.checked();
      });
    }).extend({
      rateLimit: 0
    });
    this.isListChecked = ko__WEBPACK_IMPORTED_MODULE_9__[/* default */ "a"].computed(function () {
      return 0 < _this.listChecked().length;
    });
    this.focusedItem = koFocusedItem || ko__WEBPACK_IMPORTED_MODULE_9__[/* default */ "a"].observable(null);
    this.selectedItem = koSelectedItem || ko__WEBPACK_IMPORTED_MODULE_9__[/* default */ "a"].observable(null);
    this.itemSelectedThrottle = ___WEBPACK_IMPORTED_MODULE_7___default.a.debounce(_babel_runtime_corejs3_core_js_stable_instance_bind__WEBPACK_IMPORTED_MODULE_3___default()(___WEBPACK_IMPORTED_MODULE_7___default.a).call(___WEBPACK_IMPORTED_MODULE_7___default.a, this.itemSelected, this), 300);
    this.listChecked.subscribe(function (items) {
      if (0 < items.length) {
        if (null === _this.selectedItem()) {
          if (_this.selectedItem.valueHasMutated) {
            _this.selectedItem.valueHasMutated();
          }
        } else {
          _this.selectedItem(null);
        }
      } else if (_this.autoSelect() && _this.focusedItem()) {
        _this.selectedItem(_this.focusedItem());
      }
    }, this);
    this.selectedItem.subscribe(function (item) {
      if (item) {
        if (_this.isListChecked()) {
          ___WEBPACK_IMPORTED_MODULE_7___default.a.each(_this.listChecked(), function (subItem) {
            subItem.checked(false);
          });
        }

        if (_this.selectedItemUseCallback) {
          _this.itemSelectedThrottle(item);
        }
      } else if (_this.selectedItemUseCallback) {
        _this.itemSelected(null);
      }
    }, this);
    this.selectedItem = this.selectedItem.extend({
      toggleSubscribeProperty: [this, 'selected']
    });
    this.focusedItem = this.focusedItem.extend({
      toggleSubscribeProperty: [null, 'focused']
    });
    this.sItemSelector = sItemSelector;
    this.sItemSelectedSelector = sItemSelectedSelector;
    this.sItemCheckedSelector = sItemCheckedSelector;
    this.sItemFocusedSelector = sItemFocusedSelector;
    this.focusedItem.subscribe(function (item) {
      if (item) {
        _this.sLastUid = _this.getItemUid(item);
      }
    }, this);
    var aCache = [],
        aCheckedCache = [],
        mFocused = null,
        mSelected = null;
    this.list.subscribe(function (items) {
      if (Object(Common_Utils__WEBPACK_IMPORTED_MODULE_11__["isArray"])(items)) {
        ___WEBPACK_IMPORTED_MODULE_7___default.a.each(items, function (item) {
          if (item) {
            var uid = _this.getItemUid(item);

            aCache.push(uid);

            if (item.checked()) {
              aCheckedCache.push(uid);
            }

            if (null === mFocused && item.focused()) {
              mFocused = uid;
            }

            if (null === mSelected && item.selected()) {
              mSelected = uid;
            }
          }
        });
      }
    }, this, 'beforeChange');
    this.list.subscribe(function (aItems) {
      var temp = null,
          getNext = false,
          isNextFocused = mFocused,
          isChecked = false,
          isSelected = false,
          len = 0;
      var uids = [];
      _this.selectedItemUseCallback = false;

      _this.focusedItem(null);

      _this.selectedItem(null);

      if (Object(Common_Utils__WEBPACK_IMPORTED_MODULE_11__["isArray"])(aItems)) {
        len = aCheckedCache.length;

        ___WEBPACK_IMPORTED_MODULE_7___default.a.each(aItems, function (item) {
          var uid = _this.getItemUid(item);

          uids.push(uid);

          if (null !== mFocused && mFocused === uid) {
            _this.focusedItem(item);

            mFocused = null;
          }

          if (0 < len && -1 < Object(Common_Utils__WEBPACK_IMPORTED_MODULE_11__["inArray"])(uid, aCheckedCache)) {
            isChecked = true;
            item.checked(true);
            len -= 1;
          }

          if (!isChecked && null !== mSelected && mSelected === uid) {
            isSelected = true;

            _this.selectedItem(item);

            mSelected = null;
          }
        });

        _this.selectedItemUseCallback = true;

        if (!isChecked && !isSelected && _this.autoSelect()) {
          if (_this.focusedItem()) {
            _this.selectedItem(_this.focusedItem());
          } else if (0 < aItems.length) {
            if (null !== isNextFocused) {
              getNext = false;
              isNextFocused = _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_2___default()(___WEBPACK_IMPORTED_MODULE_7___default.a).call(___WEBPACK_IMPORTED_MODULE_7___default.a, aCache, function (sUid) {
                if (getNext && -1 < Object(Common_Utils__WEBPACK_IMPORTED_MODULE_11__["inArray"])(sUid, uids)) {
                  return sUid;
                } else if (isNextFocused === sUid) {
                  getNext = true;
                }

                return false;
              });

              if (isNextFocused) {
                temp = _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_2___default()(___WEBPACK_IMPORTED_MODULE_7___default.a).call(___WEBPACK_IMPORTED_MODULE_7___default.a, aItems, function (oItem) {
                  return isNextFocused === _this.getItemUid(oItem);
                });
              }
            }

            _this.selectedItem(temp || null);

            _this.focusedItem(_this.selectedItem());
          }
        }

        if ((0 !== _this.iSelectNextHelper || 0 !== _this.iFocusedNextHelper) && 0 < aItems.length && !_this.focusedItem()) {
          temp = null;

          if (0 !== _this.iFocusedNextHelper) {
            temp = aItems[-1 === _this.iFocusedNextHelper ? aItems.length - 1 : 0] || null;
          }

          if (!temp && 0 !== _this.iSelectNextHelper) {
            temp = aItems[-1 === _this.iSelectNextHelper ? aItems.length - 1 : 0] || null;
          }

          if (temp) {
            if (0 !== _this.iSelectNextHelper) {
              _this.selectedItem(temp || null);
            }

            _this.focusedItem(temp || null);

            _this.scrollToFocused();

            ___WEBPACK_IMPORTED_MODULE_7___default.a.delay(function () {
              return _this.scrollToFocused();
            }, 100);
          }

          _this.iSelectNextHelper = 0;
          _this.iFocusedNextHelper = 0;
        }
      }

      aCache = [];
      aCheckedCache = [];
      mFocused = null;
      mSelected = null;
    });
  }

  var _proto = Selector.prototype;

  _proto.itemSelected = function itemSelected(item) {
    if (this.isListChecked()) {
      if (!item) {
        (this.oCallbacks.onItemSelect || Common_Utils__WEBPACK_IMPORTED_MODULE_11__["noop"])(item || null);
      }
    } else if (item) {
      (this.oCallbacks.onItemSelect || Common_Utils__WEBPACK_IMPORTED_MODULE_11__["noop"])(item);
    }
  }
  /**
   * @param {boolean} forceSelect
   */
  ;

  _proto.goDown = function goDown(forceSelect) {
    this.newSelectPosition(Common_Enums__WEBPACK_IMPORTED_MODULE_10__["EventKeyCode"].Down, false, forceSelect);
  }
  /**
   * @param {boolean} forceSelect
   */
  ;

  _proto.goUp = function goUp(forceSelect) {
    this.newSelectPosition(Common_Enums__WEBPACK_IMPORTED_MODULE_10__["EventKeyCode"].Up, false, forceSelect);
  };

  _proto.unselect = function unselect() {
    this.selectedItem(null);
    this.focusedItem(null);
  };

  _proto.init = function init(contentVisible, contentScrollable, keyScope) {
    var _this2 = this;

    if (keyScope === void 0) {
      keyScope = 'all';
    }

    this.oContentVisible = contentVisible;
    this.oContentScrollable = contentScrollable;

    if (this.oContentVisible && this.oContentScrollable) {
      $__WEBPACK_IMPORTED_MODULE_6___default()(this.oContentVisible).on('selectstart', function (event) {
        if (event && event.preventDefault) {
          event.preventDefault();
        }
      }).on('click', this.sItemSelector, function (event) {
        _this2.actionClick(ko__WEBPACK_IMPORTED_MODULE_9__[/* default */ "a"].dataFor(event.currentTarget), event);
      }).on('click', this.sItemCheckedSelector, function (event) {
        var item = ko__WEBPACK_IMPORTED_MODULE_9__[/* default */ "a"].dataFor(event.currentTarget);

        if (item) {
          if (event && event.shiftKey) {
            _this2.actionClick(item, event);
          } else {
            _this2.focusedItem(item);

            item.checked(!item.checked());
          }
        }
      });
      key__WEBPACK_IMPORTED_MODULE_8___default()('enter', keyScope, function () {
        if (_this2.focusedItem() && !_this2.focusedItem().selected()) {
          _this2.actionClick(_this2.focusedItem());

          return false;
        }

        return true;
      });
      key__WEBPACK_IMPORTED_MODULE_8___default()('ctrl+up, command+up, ctrl+down, command+down', keyScope, function () {
        return false;
      });
      key__WEBPACK_IMPORTED_MODULE_8___default()('up, shift+up, down, shift+down, home, end, pageup, pagedown, insert, space', keyScope, function (event, handler) {
        if (event && handler && handler.shortcut) {
          var eventKey = 0;

          switch (handler.shortcut) {
            case 'up':
            case 'shift+up':
              eventKey = Common_Enums__WEBPACK_IMPORTED_MODULE_10__["EventKeyCode"].Up;
              break;

            case 'down':
            case 'shift+down':
              eventKey = Common_Enums__WEBPACK_IMPORTED_MODULE_10__["EventKeyCode"].Down;
              break;

            case 'insert':
              eventKey = Common_Enums__WEBPACK_IMPORTED_MODULE_10__["EventKeyCode"].Insert;
              break;

            case 'space':
              eventKey = Common_Enums__WEBPACK_IMPORTED_MODULE_10__["EventKeyCode"].Space;
              break;

            case 'home':
              eventKey = Common_Enums__WEBPACK_IMPORTED_MODULE_10__["EventKeyCode"].Home;
              break;

            case 'end':
              eventKey = Common_Enums__WEBPACK_IMPORTED_MODULE_10__["EventKeyCode"].End;
              break;

            case 'pageup':
              eventKey = Common_Enums__WEBPACK_IMPORTED_MODULE_10__["EventKeyCode"].PageUp;
              break;

            case 'pagedown':
              eventKey = Common_Enums__WEBPACK_IMPORTED_MODULE_10__["EventKeyCode"].PageDown;
              break;
            // no default
          }

          if (0 < eventKey) {
            _this2.newSelectPosition(eventKey, key__WEBPACK_IMPORTED_MODULE_8___default.a.shift);

            return false;
          }
        }

        return true;
      });
    }
  }
  /**
   * @returns {boolean}
   */
  ;

  _proto.autoSelect = function autoSelect() {
    return !!(this.oCallbacks.onAutoSelect || Common_Utils__WEBPACK_IMPORTED_MODULE_11__["noopTrue"])();
  }
  /**
   * @param {boolean} up
   */
  ;

  _proto.doUpUpOrDownDown = function doUpUpOrDownDown(up) {
    (this.oCallbacks.onUpUpOrDownDown || Common_Utils__WEBPACK_IMPORTED_MODULE_11__["noopTrue"])(!!up);
  }
  /**
   * @param {Object} oItem
   * @returns {string}
   */
  ;

  _proto.getItemUid = function getItemUid(item) {
    var uid = '';
    var getItemUidCallback = this.oCallbacks.onItemGetUid || null;

    if (getItemUidCallback && item) {
      uid = getItemUidCallback(item);
    }

    return uid.toString();
  }
  /**
   * @param {number} iEventKeyCode
   * @param {boolean} bShiftKey
   * @param {boolean=} bForceSelect = false
   */
  ;

  _proto.newSelectPosition = function newSelectPosition(iEventKeyCode, bShiftKey, bForceSelect) {
    var index = 0,
        isNext = false,
        isStop = false,
        result = null;
    var pageStep = 10,
        list = this.list(),
        listLen = list ? list.length : 0,
        focused = this.focusedItem();

    if (0 < listLen) {
      if (!focused) {
        if (Common_Enums__WEBPACK_IMPORTED_MODULE_10__["EventKeyCode"].Down === iEventKeyCode || Common_Enums__WEBPACK_IMPORTED_MODULE_10__["EventKeyCode"].Insert === iEventKeyCode || Common_Enums__WEBPACK_IMPORTED_MODULE_10__["EventKeyCode"].Space === iEventKeyCode || Common_Enums__WEBPACK_IMPORTED_MODULE_10__["EventKeyCode"].Home === iEventKeyCode || Common_Enums__WEBPACK_IMPORTED_MODULE_10__["EventKeyCode"].PageUp === iEventKeyCode) {
          result = list[0];
        } else if (Common_Enums__WEBPACK_IMPORTED_MODULE_10__["EventKeyCode"].Up === iEventKeyCode || Common_Enums__WEBPACK_IMPORTED_MODULE_10__["EventKeyCode"].End === iEventKeyCode || Common_Enums__WEBPACK_IMPORTED_MODULE_10__["EventKeyCode"].PageDown === iEventKeyCode) {
          result = list[list.length - 1];
        }
      } else if (focused) {
        if (Common_Enums__WEBPACK_IMPORTED_MODULE_10__["EventKeyCode"].Down === iEventKeyCode || Common_Enums__WEBPACK_IMPORTED_MODULE_10__["EventKeyCode"].Up === iEventKeyCode || Common_Enums__WEBPACK_IMPORTED_MODULE_10__["EventKeyCode"].Insert === iEventKeyCode || Common_Enums__WEBPACK_IMPORTED_MODULE_10__["EventKeyCode"].Space === iEventKeyCode) {
          ___WEBPACK_IMPORTED_MODULE_7___default.a.each(list, function (item) {
            if (!isStop) {
              switch (iEventKeyCode) {
                case Common_Enums__WEBPACK_IMPORTED_MODULE_10__["EventKeyCode"].Up:
                  if (focused === item) {
                    isStop = true;
                  } else {
                    result = item;
                  }

                  break;

                case Common_Enums__WEBPACK_IMPORTED_MODULE_10__["EventKeyCode"].Down:
                case Common_Enums__WEBPACK_IMPORTED_MODULE_10__["EventKeyCode"].Insert:
                  if (isNext) {
                    result = item;
                    isStop = true;
                  } else if (focused === item) {
                    isNext = true;
                  }

                  break;
                // no default
              }
            }
          });

          if (!result && (Common_Enums__WEBPACK_IMPORTED_MODULE_10__["EventKeyCode"].Down === iEventKeyCode || Common_Enums__WEBPACK_IMPORTED_MODULE_10__["EventKeyCode"].Up === iEventKeyCode)) {
            this.doUpUpOrDownDown(Common_Enums__WEBPACK_IMPORTED_MODULE_10__["EventKeyCode"].Up === iEventKeyCode);
          }
        } else if (Common_Enums__WEBPACK_IMPORTED_MODULE_10__["EventKeyCode"].Home === iEventKeyCode || Common_Enums__WEBPACK_IMPORTED_MODULE_10__["EventKeyCode"].End === iEventKeyCode) {
          if (Common_Enums__WEBPACK_IMPORTED_MODULE_10__["EventKeyCode"].Home === iEventKeyCode) {
            result = list[0];
          } else if (Common_Enums__WEBPACK_IMPORTED_MODULE_10__["EventKeyCode"].End === iEventKeyCode) {
            result = list[list.length - 1];
          }
        } else if (Common_Enums__WEBPACK_IMPORTED_MODULE_10__["EventKeyCode"].PageDown === iEventKeyCode) {
          for (; index < listLen; index++) {
            if (focused === list[index]) {
              index += pageStep;
              index = listLen - 1 < index ? listLen - 1 : index;
              result = list[index];
              break;
            }
          }
        } else if (Common_Enums__WEBPACK_IMPORTED_MODULE_10__["EventKeyCode"].PageUp === iEventKeyCode) {
          for (index = listLen; 0 <= index; index--) {
            if (focused === list[index]) {
              index -= pageStep;
              index = 0 > index ? 0 : index;
              result = list[index];
              break;
            }
          }
        }
      }
    }

    if (result) {
      this.focusedItem(result);

      if (focused) {
        if (bShiftKey) {
          if (Common_Enums__WEBPACK_IMPORTED_MODULE_10__["EventKeyCode"].Up === iEventKeyCode || Common_Enums__WEBPACK_IMPORTED_MODULE_10__["EventKeyCode"].Down === iEventKeyCode) {
            focused.checked(!focused.checked());
          }
        } else if (Common_Enums__WEBPACK_IMPORTED_MODULE_10__["EventKeyCode"].Insert === iEventKeyCode || Common_Enums__WEBPACK_IMPORTED_MODULE_10__["EventKeyCode"].Space === iEventKeyCode) {
          focused.checked(!focused.checked());
        }
      }

      if ((this.autoSelect() || !!bForceSelect) && !this.isListChecked() && Common_Enums__WEBPACK_IMPORTED_MODULE_10__["EventKeyCode"].Space !== iEventKeyCode) {
        this.selectedItem(result);
      }

      this.scrollToFocused();
    } else if (focused) {
      if (bShiftKey && (Common_Enums__WEBPACK_IMPORTED_MODULE_10__["EventKeyCode"].Up === iEventKeyCode || Common_Enums__WEBPACK_IMPORTED_MODULE_10__["EventKeyCode"].Down === iEventKeyCode)) {
        focused.checked(!focused.checked());
      } else if (Common_Enums__WEBPACK_IMPORTED_MODULE_10__["EventKeyCode"].Insert === iEventKeyCode || Common_Enums__WEBPACK_IMPORTED_MODULE_10__["EventKeyCode"].Space === iEventKeyCode) {
        focused.checked(!focused.checked());
      }

      this.focusedItem(focused);
    }
  }
  /**
   * @returns {boolean}
   */
  ;

  _proto.scrollToFocused = function scrollToFocused() {
    if (!this.oContentVisible || !this.oContentScrollable) {
      return false;
    }

    var offset = 20,
        list = this.list(),
        $focused = $__WEBPACK_IMPORTED_MODULE_6___default()(this.sItemFocusedSelector, this.oContentScrollable),
        pos = $focused.position(),
        visibleHeight = this.oContentVisible.height(),
        focusedHeight = $focused.outerHeight();

    if (list && list[0] && list[0].focused()) {
      this.oContentScrollable.scrollTop(0);
      return true;
    } else if (pos && (0 > pos.top || pos.top + focusedHeight > visibleHeight)) {
      this.oContentScrollable.scrollTop(0 > pos.top ? this.oContentScrollable.scrollTop() + pos.top - offset : this.oContentScrollable.scrollTop() + pos.top - visibleHeight + focusedHeight + offset);
      return true;
    }

    return false;
  }
  /**
   * @param {boolean=} fast = false
   * @returns {boolean}
   */
  ;

  _proto.scrollToTop = function scrollToTop(fast) {
    if (fast === void 0) {
      fast = false;
    }

    if (!this.oContentVisible || !this.oContentScrollable) {
      return false;
    }

    if (fast || 50 > this.oContentScrollable.scrollTop()) {
      this.oContentScrollable.scrollTop(0);
    } else {
      this.oContentScrollable.stop().animate({
        scrollTop: 0
      }, 200);
    }

    return true;
  };

  _proto.eventClickFunction = function eventClickFunction(item, event) {
    var index = 0,
        length = 0,
        changeRange = false,
        isInRange = false,
        list = [],
        checked = false,
        listItem = null,
        lineUid = '';
    var uid = this.getItemUid(item);

    if (event && event.shiftKey) {
      if ('' !== uid && '' !== this.sLastUid && uid !== this.sLastUid) {
        list = this.list();
        checked = item.checked();

        for (index = 0, length = list.length; index < length; index++) {
          listItem = list[index];
          lineUid = this.getItemUid(listItem);
          changeRange = false;

          if (lineUid === this.sLastUid || lineUid === uid) {
            changeRange = true;
          }

          if (changeRange) {
            isInRange = !isInRange;
          }

          if (isInRange || changeRange) {
            listItem.checked(checked);
          }
        }
      }
    }

    this.sLastUid = '' === uid ? '' : uid;
  }
  /**
   * @param {Object} item
   * @param {Object=} event
   */
  ;

  _proto.actionClick = function actionClick(item, event) {
    if (event === void 0) {
      event = null;
    }

    if (item) {
      var click = true;

      if (event) {
        if (event.shiftKey && !(event.ctrlKey || event.metaKey) && !event.altKey) {
          click = false;

          if ('' === this.sLastUid) {
            this.sLastUid = this.getItemUid(item);
          }

          item.checked(!item.checked());
          this.eventClickFunction(item, event);
          this.focusedItem(item);
        } else if ((event.ctrlKey || event.metaKey) && !event.shiftKey && !event.altKey) {
          click = false;
          this.focusedItem(item);

          if (this.selectedItem() && item !== this.selectedItem()) {
            this.selectedItem().checked(true);
          }

          item.checked(!item.checked());
        }
      }

      if (click) {
        this.selectMessageItem(item);
      }
    }
  };

  _proto.on = function on(eventName, callback) {
    this.oCallbacks[eventName] = callback;
  };

  _proto.selectMessageItem = function selectMessageItem(messageItem) {
    this.focusedItem(messageItem);
    this.selectedItem(messageItem);
    this.scrollToFocused();
  };

  return Selector;
}();



/***/ }),
/* 278 */
/*!******************************!*\
  !*** ./dev/Model/Message.js ***!
  \******************************/
/*! exports provided: MessageModel, default */
/*! exports used: MessageModel */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return MessageModel; });
/* unused harmony export default */
/* harmony import */ var core_js_modules_es_array_join__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.array.join */ 74);
/* harmony import */ var core_js_modules_es_array_join__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_join__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var core_js_modules_es_regexp_exec__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es.regexp.exec */ 45);
/* harmony import */ var core_js_modules_es_regexp_exec__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_regexp_exec__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var core_js_modules_es_string_replace__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core-js/modules/es.string.replace */ 56);
/* harmony import */ var core_js_modules_es_string_replace__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_replace__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/find */ 12);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/concat */ 159);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/reduce */ 208);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_5__);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/map */ 18);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_6__);
/* harmony import */ var _babel_runtime_corejs3_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/esm/inheritsLoose */ 10);
/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! _ */ 3);
/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(___WEBPACK_IMPORTED_MODULE_8__);
/* harmony import */ var $__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! $ */ 8);
/* harmony import */ var $__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n($__WEBPACK_IMPORTED_MODULE_9__);
/* harmony import */ var ko__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ko */ 1);
/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! moment */ 97);
/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(moment__WEBPACK_IMPORTED_MODULE_11__);
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! classnames */ 418);
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_12__);
/* harmony import */ var lozad__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! lozad */ 419);
/* harmony import */ var lozad__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(lozad__WEBPACK_IMPORTED_MODULE_13__);
/* harmony import */ var Common_Enums__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! Common/Enums */ 0);
/* harmony import */ var Common_Translator__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! Common/Translator */ 9);
/* harmony import */ var Common_Consts__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! Common/Consts */ 25);
/* harmony import */ var Common_Utils__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! Common/Utils */ 2);
/* harmony import */ var Common_Globals__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! Common/Globals */ 6);
/* harmony import */ var Common_Links__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! Common/Links */ 15);
/* harmony import */ var Stores_User_Folder__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! Stores/User/Folder */ 11);
/* harmony import */ var Stores_User_Pgp__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! Stores/User/Pgp */ 41);
/* harmony import */ var Helper_Message__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! Helper/Message */ 62);
/* harmony import */ var Model_Attachment__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! Model/Attachment */ 177);
/* harmony import */ var Knoin_AbstractModel__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! Knoin/AbstractModel */ 64);


























var MessageModel =
/*#__PURE__*/
function (_AbstractModel) {
  Object(_babel_runtime_corejs3_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"])(MessageModel, _AbstractModel);

  function MessageModel() {
    var _this;

    _this = _AbstractModel.call(this, 'MessageModel') || this;
    _this.folderFullNameRaw = '';
    _this.uid = '';
    _this.hash = '';
    _this.requestHash = '';
    _this.subject = ko__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"].observable('');
    _this.subjectPrefix = ko__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"].observable('');
    _this.subjectSuffix = ko__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"].observable('');
    _this.size = ko__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"].observable(0);
    _this.dateTimeStampInUTC = ko__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"].observable(0);
    _this.priority = ko__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"].observable(Common_Enums__WEBPACK_IMPORTED_MODULE_14__["MessagePriority"].Normal);
    _this.proxy = false;
    _this.fromEmailString = ko__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"].observable('');
    _this.fromClearEmailString = ko__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"].observable('');
    _this.toEmailsString = ko__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"].observable('');
    _this.toClearEmailsString = ko__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"].observable('');
    _this.senderEmailsString = ko__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"].observable('');
    _this.senderClearEmailsString = ko__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"].observable('');
    _this.emails = [];
    _this.from = [];
    _this.to = [];
    _this.cc = [];
    _this.bcc = [];
    _this.replyTo = [];
    _this.deliveredTo = [];
    _this.unsubsribeLinks = [];
    _this.newForAnimation = ko__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"].observable(false);
    _this.deleted = ko__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"].observable(false);
    _this.deletedMark = ko__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"].observable(false);
    _this.unseen = ko__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"].observable(false);
    _this.flagged = ko__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"].observable(false);
    _this.answered = ko__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"].observable(false);
    _this.forwarded = ko__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"].observable(false);
    _this.isReadReceipt = ko__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"].observable(false);
    _this.focused = ko__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"].observable(false);
    _this.selected = ko__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"].observable(false);
    _this.checked = ko__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"].observable(false);
    _this.hasAttachments = ko__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"].observable(false);
    _this.attachmentsSpecData = ko__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"].observableArray([]);
    _this.attachmentIconClass = ko__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"].computed(function () {
      return Object(Model_Attachment__WEBPACK_IMPORTED_MODULE_23__[/* staticCombinedIconClass */ "b"])(_this.hasAttachments() ? _this.attachmentsSpecData() : []);
    });
    _this.body = null;
    _this.isHtml = ko__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"].observable(false);
    _this.hasImages = ko__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"].observable(false);
    _this.attachments = ko__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"].observableArray([]);
    _this.isPgpSigned = ko__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"].observable(false);
    _this.isPgpEncrypted = ko__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"].observable(false);
    _this.pgpSignedVerifyStatus = ko__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"].observable(Common_Enums__WEBPACK_IMPORTED_MODULE_14__["SignedVerifyStatus"].None);
    _this.pgpSignedVerifyUser = ko__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"].observable('');
    _this.priority = ko__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"].observable(Common_Enums__WEBPACK_IMPORTED_MODULE_14__["MessagePriority"].Normal);
    _this.readReceipt = ko__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"].observable('');
    _this.aDraftInfo = [];
    _this.sMessageId = '';
    _this.sInReplyTo = '';
    _this.sReferences = '';
    _this.hasUnseenSubMessage = ko__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"].observable(false);
    _this.hasFlaggedSubMessage = ko__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"].observable(false);
    _this.threads = ko__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"].observableArray([]);
    _this.threadsLen = ko__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"].computed(function () {
      return _this.threads().length;
    });
    _this.isImportant = ko__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"].computed(function () {
      return Common_Enums__WEBPACK_IMPORTED_MODULE_14__["MessagePriority"].High === _this.priority();
    });

    _this.regDisposables([_this.attachmentIconClass, _this.threadsLen, _this.isImportant]);

    return _this;
  }
  /**
   * @static
   * @param {AjaxJsonMessage} oJsonMessage
   * @returns {?MessageModel}
   */


  MessageModel.newInstanceFromJson = function newInstanceFromJson(json) {
    var oMessageModel = new MessageModel();
    return oMessageModel.initByJson(json) ? oMessageModel : null;
  };

  var _proto = MessageModel.prototype;

  _proto.clear = function clear() {
    this.folderFullNameRaw = '';
    this.uid = '';
    this.hash = '';
    this.requestHash = '';
    this.subject('');
    this.subjectPrefix('');
    this.subjectSuffix('');
    this.size(0);
    this.dateTimeStampInUTC(0);
    this.priority(Common_Enums__WEBPACK_IMPORTED_MODULE_14__["MessagePriority"].Normal);
    this.proxy = false;
    this.fromEmailString('');
    this.fromClearEmailString('');
    this.toEmailsString('');
    this.toClearEmailsString('');
    this.senderEmailsString('');
    this.senderClearEmailsString('');
    this.emails = [];
    this.from = [];
    this.to = [];
    this.cc = [];
    this.bcc = [];
    this.replyTo = [];
    this.deliveredTo = [];
    this.unsubsribeLinks = [];
    this.newForAnimation(false);
    this.deleted(false);
    this.deletedMark(false);
    this.unseen(false);
    this.flagged(false);
    this.answered(false);
    this.forwarded(false);
    this.isReadReceipt(false);
    this.selected(false);
    this.checked(false);
    this.hasAttachments(false);
    this.attachmentsSpecData([]);
    this.body = null;
    this.isHtml(false);
    this.hasImages(false);
    this.attachments([]);
    this.isPgpSigned(false);
    this.isPgpEncrypted(false);
    this.pgpSignedVerifyStatus(Common_Enums__WEBPACK_IMPORTED_MODULE_14__["SignedVerifyStatus"].None);
    this.pgpSignedVerifyUser('');
    this.priority(Common_Enums__WEBPACK_IMPORTED_MODULE_14__["MessagePriority"].Normal);
    this.readReceipt('');
    this.aDraftInfo = [];
    this.sMessageId = '';
    this.sInReplyTo = '';
    this.sReferences = '';
    this.threads([]);
    this.hasUnseenSubMessage(false);
    this.hasFlaggedSubMessage(false);
  }
  /**
   * @param {Array} properties
   * @returns {Array}
   */
  ;

  _proto.getEmails = function getEmails(properties) {
    var _this2 = this;

    return ___WEBPACK_IMPORTED_MODULE_8___default.a.compact(___WEBPACK_IMPORTED_MODULE_8___default.a.uniq(_babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_6___default()(___WEBPACK_IMPORTED_MODULE_8___default.a).call(___WEBPACK_IMPORTED_MODULE_8___default.a, _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_5___default()(___WEBPACK_IMPORTED_MODULE_8___default.a).call(___WEBPACK_IMPORTED_MODULE_8___default.a, properties, function (carry, property) {
      return _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_4___default()(carry).call(carry, _this2[property]);
    }, []), function (oItem) {
      return oItem ? oItem.email : '';
    })));
  }
  /**
   * @returns {Array}
   */
  ;

  _proto.getRecipientsEmails = function getRecipientsEmails() {
    return this.getEmails(['to', 'cc']);
  }
  /**
   * @returns {string}
   */
  ;

  _proto.friendlySize = function friendlySize() {
    return Object(Common_Utils__WEBPACK_IMPORTED_MODULE_17__["friendlySize"])(this.size());
  };

  _proto.computeSenderEmail = function computeSenderEmail() {
    var sentFolder = Stores_User_Folder__WEBPACK_IMPORTED_MODULE_20__[/* default */ "a"].sentFolder(),
        draftFolder = Stores_User_Folder__WEBPACK_IMPORTED_MODULE_20__[/* default */ "a"].draftFolder();
    this.senderEmailsString(this.folderFullNameRaw === sentFolder || this.folderFullNameRaw === draftFolder ? this.toEmailsString() : this.fromEmailString());
    this.senderClearEmailsString(this.folderFullNameRaw === sentFolder || this.folderFullNameRaw === draftFolder ? this.toClearEmailsString() : this.fromClearEmailString());
  }
  /**
   * @param {AjaxJsonMessage} json
   * @returns {boolean}
   */
  ;

  _proto.initByJson = function initByJson(json) {
    var result = false,
        priority = Common_Enums__WEBPACK_IMPORTED_MODULE_14__["MessagePriority"].Normal;

    if (json && 'Object/Message' === json['@Object']) {
      priority = Object(Common_Utils__WEBPACK_IMPORTED_MODULE_17__["pInt"])(json.Priority);
      this.priority(-1 < Object(Common_Utils__WEBPACK_IMPORTED_MODULE_17__["inArray"])(priority, [Common_Enums__WEBPACK_IMPORTED_MODULE_14__["MessagePriority"].High, Common_Enums__WEBPACK_IMPORTED_MODULE_14__["MessagePriority"].Low]) ? priority : Common_Enums__WEBPACK_IMPORTED_MODULE_14__["MessagePriority"].Normal);
      this.folderFullNameRaw = json.Folder;
      this.uid = json.Uid;
      this.hash = json.Hash;
      this.requestHash = json.RequestHash;
      this.proxy = !!json.ExternalProxy;
      this.size(Object(Common_Utils__WEBPACK_IMPORTED_MODULE_17__["pInt"])(json.Size));
      this.from = Object(Helper_Message__WEBPACK_IMPORTED_MODULE_22__[/* emailArrayFromJson */ "a"])(json.From);
      this.to = Object(Helper_Message__WEBPACK_IMPORTED_MODULE_22__[/* emailArrayFromJson */ "a"])(json.To);
      this.cc = Object(Helper_Message__WEBPACK_IMPORTED_MODULE_22__[/* emailArrayFromJson */ "a"])(json.Cc);
      this.bcc = Object(Helper_Message__WEBPACK_IMPORTED_MODULE_22__[/* emailArrayFromJson */ "a"])(json.Bcc);
      this.replyTo = Object(Helper_Message__WEBPACK_IMPORTED_MODULE_22__[/* emailArrayFromJson */ "a"])(json.ReplyTo);
      this.deliveredTo = Object(Helper_Message__WEBPACK_IMPORTED_MODULE_22__[/* emailArrayFromJson */ "a"])(json.DeliveredTo);
      this.unsubsribeLinks = Object(Common_Utils__WEBPACK_IMPORTED_MODULE_17__["isNonEmptyArray"])(json.UnsubsribeLinks) ? json.UnsubsribeLinks : [];
      this.subject(json.Subject);

      if (Object(Common_Utils__WEBPACK_IMPORTED_MODULE_17__["isArray"])(json.SubjectParts)) {
        this.subjectPrefix(json.SubjectParts[0]);
        this.subjectSuffix(json.SubjectParts[1]);
      } else {
        this.subjectPrefix('');
        this.subjectSuffix(this.subject());
      }

      this.dateTimeStampInUTC(Object(Common_Utils__WEBPACK_IMPORTED_MODULE_17__["pInt"])(json.DateTimeStampInUTC));
      this.hasAttachments(!!json.HasAttachments);
      this.attachmentsSpecData(Object(Common_Utils__WEBPACK_IMPORTED_MODULE_17__["isArray"])(json.AttachmentsSpecData) ? json.AttachmentsSpecData : []);
      this.fromEmailString(Object(Helper_Message__WEBPACK_IMPORTED_MODULE_22__[/* emailArrayToString */ "b"])(this.from, true));
      this.fromClearEmailString(Object(Helper_Message__WEBPACK_IMPORTED_MODULE_22__[/* emailArrayToStringClear */ "c"])(this.from));
      this.toEmailsString(Object(Helper_Message__WEBPACK_IMPORTED_MODULE_22__[/* emailArrayToString */ "b"])(this.to, true));
      this.toClearEmailsString(Object(Helper_Message__WEBPACK_IMPORTED_MODULE_22__[/* emailArrayToStringClear */ "c"])(this.to));
      this.threads(Object(Common_Utils__WEBPACK_IMPORTED_MODULE_17__["isArray"])(json.Threads) ? json.Threads : []);
      this.initFlagsByJson(json);
      this.computeSenderEmail();
      result = true;
    }

    return result;
  }
  /**
   * @param {AjaxJsonMessage} json
   * @returns {boolean}
   */
  ;

  _proto.initUpdateByMessageJson = function initUpdateByMessageJson(json) {
    var result = false,
        priority = Common_Enums__WEBPACK_IMPORTED_MODULE_14__["MessagePriority"].Normal;

    if (json && 'Object/Message' === json['@Object']) {
      priority = Object(Common_Utils__WEBPACK_IMPORTED_MODULE_17__["pInt"])(json.Priority);
      this.priority(-1 < Object(Common_Utils__WEBPACK_IMPORTED_MODULE_17__["inArray"])(priority, [Common_Enums__WEBPACK_IMPORTED_MODULE_14__["MessagePriority"].High, Common_Enums__WEBPACK_IMPORTED_MODULE_14__["MessagePriority"].Low]) ? priority : Common_Enums__WEBPACK_IMPORTED_MODULE_14__["MessagePriority"].Normal);
      this.aDraftInfo = json.DraftInfo;
      this.sMessageId = json.MessageId;
      this.sInReplyTo = json.InReplyTo;
      this.sReferences = json.References;
      this.proxy = !!json.ExternalProxy;

      if (Stores_User_Pgp__WEBPACK_IMPORTED_MODULE_21__[/* default */ "a"].capaOpenPGP()) {
        this.isPgpSigned(!!json.PgpSigned);
        this.isPgpEncrypted(!!json.PgpEncrypted);
      }

      this.hasAttachments(!!json.HasAttachments);
      this.attachmentsSpecData(Object(Common_Utils__WEBPACK_IMPORTED_MODULE_17__["isArray"])(json.AttachmentsSpecData) ? json.AttachmentsSpecData : []);
      this.foundedCIDs = Object(Common_Utils__WEBPACK_IMPORTED_MODULE_17__["isArray"])(json.FoundedCIDs) ? json.FoundedCIDs : [];
      this.attachments(this.initAttachmentsFromJson(json.Attachments));
      this.readReceipt(json.ReadReceipt || '');
      this.computeSenderEmail();
      result = true;
    }

    return result;
  }
  /**
   * @param {(AjaxJsonAttachment|null)} oJsonAttachments
   * @returns {Array}
   */
  ;

  _proto.initAttachmentsFromJson = function initAttachmentsFromJson(json) {
    var index = 0,
        len = 0,
        attachment = null;
    var result = [];

    if (json && 'Collection/AttachmentCollection' === json['@Object'] && Object(Common_Utils__WEBPACK_IMPORTED_MODULE_17__["isNonEmptyArray"])(json['@Collection'])) {
      for (index = 0, len = json['@Collection'].length; index < len; index++) {
        attachment = Model_Attachment__WEBPACK_IMPORTED_MODULE_23__[/* AttachmentModel */ "a"].newInstanceFromJson(json['@Collection'][index]);

        if (attachment) {
          if ('' !== attachment.cidWithOutTags && 0 < this.foundedCIDs.length && 0 <= Object(Common_Utils__WEBPACK_IMPORTED_MODULE_17__["inArray"])(attachment.cidWithOutTags, this.foundedCIDs)) {
            attachment.isLinked = true;
          }

          result.push(attachment);
        }
      }
    }

    return result;
  }
  /**
   * @returns {boolean}
   */
  ;

  _proto.hasUnsubsribeLinks = function hasUnsubsribeLinks() {
    return this.unsubsribeLinks && 0 < this.unsubsribeLinks.length;
  }
  /**
   * @returns {string}
   */
  ;

  _proto.getFirstUnsubsribeLink = function getFirstUnsubsribeLink() {
    return this.unsubsribeLinks && 0 < this.unsubsribeLinks.length ? this.unsubsribeLinks[0] || '' : '';
  }
  /**
   * @param {AjaxJsonMessage} json
   * @returns {boolean}
   */
  ;

  _proto.initFlagsByJson = function initFlagsByJson(json) {
    var result = false;

    if (json && 'Object/Message' === json['@Object']) {
      this.unseen(!json.IsSeen);
      this.flagged(!!json.IsFlagged);
      this.answered(!!json.IsAnswered);
      this.forwarded(!!json.IsForwarded);
      this.isReadReceipt(!!json.IsReadReceipt);
      this.deletedMark(!!json.IsDeleted);
      result = true;
    }

    return result;
  }
  /**
   * @param {boolean} friendlyView
   * @param {boolean=} wrapWithLink = false
   * @returns {string}
   */
  ;

  _proto.fromToLine = function fromToLine(friendlyView, wrapWithLink) {
    if (wrapWithLink === void 0) {
      wrapWithLink = false;
    }

    return Object(Helper_Message__WEBPACK_IMPORTED_MODULE_22__[/* emailArrayToString */ "b"])(this.from, friendlyView, wrapWithLink);
  }
  /**
   * @returns {string}
   */
  ;

  _proto.fromDkimData = function fromDkimData() {
    var result = ['none', ''];

    if (Object(Common_Utils__WEBPACK_IMPORTED_MODULE_17__["isNonEmptyArray"])(this.from) && 1 === this.from.length && this.from[0] && this.from[0].dkimStatus) {
      result = [this.from[0].dkimStatus, this.from[0].dkimValue || ''];
    }

    return result;
  }
  /**
   * @param {boolean} friendlyView
   * @param {boolean=} wrapWithLink = false
   * @returns {string}
   */
  ;

  _proto.toToLine = function toToLine(friendlyView, wrapWithLink) {
    if (wrapWithLink === void 0) {
      wrapWithLink = false;
    }

    return Object(Helper_Message__WEBPACK_IMPORTED_MODULE_22__[/* emailArrayToString */ "b"])(this.to, friendlyView, wrapWithLink);
  }
  /**
   * @param {boolean} friendlyView
   * @param {boolean=} wrapWithLink = false
   * @returns {string}
   */
  ;

  _proto.ccToLine = function ccToLine(friendlyView, wrapWithLink) {
    if (wrapWithLink === void 0) {
      wrapWithLink = false;
    }

    return Object(Helper_Message__WEBPACK_IMPORTED_MODULE_22__[/* emailArrayToString */ "b"])(this.cc, friendlyView, wrapWithLink);
  }
  /**
   * @param {boolean} friendlyView
   * @param {boolean=} wrapWithLink = false
   * @returns {string}
   */
  ;

  _proto.bccToLine = function bccToLine(friendlyView, wrapWithLink) {
    if (wrapWithLink === void 0) {
      wrapWithLink = false;
    }

    return Object(Helper_Message__WEBPACK_IMPORTED_MODULE_22__[/* emailArrayToString */ "b"])(this.bcc, friendlyView, wrapWithLink);
  }
  /**
   * @param {boolean} friendlyView
   * @param {boolean=} wrapWithLink = false
   * @returns {string}
   */
  ;

  _proto.replyToToLine = function replyToToLine(friendlyView, wrapWithLink) {
    if (wrapWithLink === void 0) {
      wrapWithLink = false;
    }

    return Object(Helper_Message__WEBPACK_IMPORTED_MODULE_22__[/* emailArrayToString */ "b"])(this.replyTo, friendlyView, wrapWithLink);
  }
  /**
   * @return string
   */
  ;

  _proto.lineAsCss = function lineAsCss() {
    return classnames__WEBPACK_IMPORTED_MODULE_12___default()({
      'deleted': this.deleted(),
      'deleted-mark': this.deletedMark(),
      'selected': this.selected(),
      'checked': this.checked(),
      'flagged': this.flagged(),
      'unseen': this.unseen(),
      'answered': this.answered(),
      'forwarded': this.forwarded(),
      'focused': this.focused(),
      'important': this.isImportant(),
      'withAttachments': this.hasAttachments(),
      'new': this.newForAnimation(),
      'emptySubject': '' === this.subject(),
      // 'hasChildrenMessage': 1 < this.threadsLen(),
      'hasUnseenSubMessage': this.hasUnseenSubMessage(),
      'hasFlaggedSubMessage': this.hasFlaggedSubMessage()
    });
  }
  /**
   * @returns {boolean}
   */
  ;

  _proto.hasVisibleAttachments = function hasVisibleAttachments() {
    return !!_babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_3___default()(___WEBPACK_IMPORTED_MODULE_8___default.a).call(___WEBPACK_IMPORTED_MODULE_8___default.a, this.attachments(), function (item) {
      return !item.isLinked;
    });
  }
  /**
   * @param {string} cid
   * @returns {*}
   */
  ;

  _proto.findAttachmentByCid = function findAttachmentByCid(cid) {
    var result = null;
    var attachments = this.attachments();

    if (Object(Common_Utils__WEBPACK_IMPORTED_MODULE_17__["isNonEmptyArray"])(attachments)) {
      cid = cid.replace(/^<+/, '').replace(/>+$/, '');
      result = _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_3___default()(___WEBPACK_IMPORTED_MODULE_8___default.a).call(___WEBPACK_IMPORTED_MODULE_8___default.a, attachments, function (item) {
        return cid === item.cidWithOutTags;
      });
    }

    return result || null;
  }
  /**
   * @param {string} contentLocation
   * @returns {*}
   */
  ;

  _proto.findAttachmentByContentLocation = function findAttachmentByContentLocation(contentLocation) {
    var result = null;
    var attachments = this.attachments();

    if (Object(Common_Utils__WEBPACK_IMPORTED_MODULE_17__["isNonEmptyArray"])(attachments)) {
      result = _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_3___default()(___WEBPACK_IMPORTED_MODULE_8___default.a).call(___WEBPACK_IMPORTED_MODULE_8___default.a, attachments, function (item) {
        return contentLocation === item.contentLocation;
      });
    }

    return result || null;
  }
  /**
   * @returns {string}
   */
  ;

  _proto.messageId = function messageId() {
    return this.sMessageId;
  }
  /**
   * @returns {string}
   */
  ;

  _proto.inReplyTo = function inReplyTo() {
    return this.sInReplyTo;
  }
  /**
   * @returns {string}
   */
  ;

  _proto.references = function references() {
    return this.sReferences;
  }
  /**
   * @returns {string}
   */
  ;

  _proto.fromAsSingleEmail = function fromAsSingleEmail() {
    return Object(Common_Utils__WEBPACK_IMPORTED_MODULE_17__["isArray"])(this.from) && this.from[0] ? this.from[0].email : '';
  }
  /**
   * @returns {string}
   */
  ;

  _proto.viewLink = function viewLink() {
    return Object(Common_Links__WEBPACK_IMPORTED_MODULE_19__[/* messageViewLink */ "q"])(this.requestHash);
  }
  /**
   * @returns {string}
   */
  ;

  _proto.downloadLink = function downloadLink() {
    return Object(Common_Links__WEBPACK_IMPORTED_MODULE_19__[/* messageDownloadLink */ "p"])(this.requestHash);
  }
  /**
   * @param {Object} excludeEmails
   * @param {boolean=} last = false
   * @returns {Array}
   */
  ;

  _proto.replyEmails = function replyEmails(excludeEmails, last) {
    if (last === void 0) {
      last = false;
    }

    var result = [],
        unic = Object(Common_Utils__WEBPACK_IMPORTED_MODULE_17__["isUnd"])(excludeEmails) ? {} : excludeEmails;
    Object(Helper_Message__WEBPACK_IMPORTED_MODULE_22__[/* replyHelper */ "d"])(this.replyTo, unic, result);

    if (0 === result.length) {
      Object(Helper_Message__WEBPACK_IMPORTED_MODULE_22__[/* replyHelper */ "d"])(this.from, unic, result);
    }

    if (0 === result.length && !last) {
      return this.replyEmails({}, true);
    }

    return result;
  }
  /**
   * @param {Object} excludeEmails
   * @param {boolean=} last = false
   * @returns {Array.<Array>}
   */
  ;

  _proto.replyAllEmails = function replyAllEmails(excludeEmails, last) {
    if (last === void 0) {
      last = false;
    }

    var data = [];
    var toResult = [],
        ccResult = [],
        unic = Object(Common_Utils__WEBPACK_IMPORTED_MODULE_17__["isUnd"])(excludeEmails) ? {} : excludeEmails;
    Object(Helper_Message__WEBPACK_IMPORTED_MODULE_22__[/* replyHelper */ "d"])(this.replyTo, unic, toResult);

    if (0 === toResult.length) {
      Object(Helper_Message__WEBPACK_IMPORTED_MODULE_22__[/* replyHelper */ "d"])(this.from, unic, toResult);
    }

    Object(Helper_Message__WEBPACK_IMPORTED_MODULE_22__[/* replyHelper */ "d"])(this.to, unic, toResult);
    Object(Helper_Message__WEBPACK_IMPORTED_MODULE_22__[/* replyHelper */ "d"])(this.cc, unic, ccResult);

    if (0 === toResult.length && !last) {
      data = this.replyAllEmails({}, true);
      return [data[0], ccResult];
    }

    return [toResult, ccResult];
  }
  /**
   * @returns {string}
   */
  ;

  _proto.textBodyToString = function textBodyToString() {
    return this.body ? this.body.html() : '';
  }
  /**
   * @returns {string}
   */
  ;

  _proto.attachmentsToStringLine = function attachmentsToStringLine() {
    var attachLines = _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_6___default()(___WEBPACK_IMPORTED_MODULE_8___default.a).call(___WEBPACK_IMPORTED_MODULE_8___default.a, this.attachments(), function (item) {
      return item.fileName + ' (' + item.friendlySize + ')';
    });

    return attachLines && 0 < attachLines.length ? attachLines.join(', ') : '';
  }
  /**
   * @param {boolean=} print = false
   */
  ;

  _proto.viewPopupMessage = function viewPopupMessage(print) {
    if (print === void 0) {
      print = false;
    }

    this.showLazyExternalImagesInBody();
    var timeStampInUTC = this.dateTimeStampInUTC() || 0,
        ccLine = this.ccToLine(false),
        m = 0 < timeStampInUTC ? moment__WEBPACK_IMPORTED_MODULE_11___default.a.unix(timeStampInUTC) : null;
    Object(Common_Utils__WEBPACK_IMPORTED_MODULE_17__["previewMessage"])({
      title: this.subject(),
      subject: this.subject(),
      date: m ? m.format('LLL') : '',
      fromCreds: this.fromToLine(false),
      toLabel: Object(Common_Translator__WEBPACK_IMPORTED_MODULE_15__["i18n"])('MESSAGE/LABEL_TO'),
      toCreds: this.toToLine(false),
      ccClass: ccLine ? '' : 'rl-preview-hide',
      ccLabel: Object(Common_Translator__WEBPACK_IMPORTED_MODULE_15__["i18n"])('MESSAGE/LABEL_CC'),
      ccCreds: ccLine
    }, this.body, this.isHtml(), print);
  };

  _proto.printMessage = function printMessage() {
    this.viewPopupMessage(true);
  }
  /**
   * @returns {string}
   */
  ;

  _proto.generateUid = function generateUid() {
    return this.folderFullNameRaw + '/' + this.uid;
  }
  /**
   * @param {MessageModel} message
   * @returns {MessageModel}
   */
  ;

  _proto.populateByMessageListItem = function populateByMessageListItem(message) {
    if (message) {
      this.folderFullNameRaw = message.folderFullNameRaw;
      this.uid = message.uid;
      this.hash = message.hash;
      this.requestHash = message.requestHash;
      this.subject(message.subject());
    }

    this.subjectPrefix(this.subjectPrefix());
    this.subjectSuffix(this.subjectSuffix());

    if (message) {
      this.size(message.size());
      this.dateTimeStampInUTC(message.dateTimeStampInUTC());
      this.priority(message.priority());
      this.proxy = message.proxy;
      this.fromEmailString(message.fromEmailString());
      this.fromClearEmailString(message.fromClearEmailString());
      this.toEmailsString(message.toEmailsString());
      this.toClearEmailsString(message.toClearEmailsString());
      this.emails = message.emails;
      this.from = message.from;
      this.to = message.to;
      this.cc = message.cc;
      this.bcc = message.bcc;
      this.replyTo = message.replyTo;
      this.deliveredTo = message.deliveredTo;
      this.unsubsribeLinks = message.unsubsribeLinks;
      this.unseen(message.unseen());
      this.flagged(message.flagged());
      this.answered(message.answered());
      this.forwarded(message.forwarded());
      this.isReadReceipt(message.isReadReceipt());
      this.deletedMark(message.deletedMark());
      this.priority(message.priority());
      this.selected(message.selected());
      this.checked(message.checked());
      this.hasAttachments(message.hasAttachments());
      this.attachmentsSpecData(message.attachmentsSpecData());
    }

    this.body = null;
    this.aDraftInfo = [];
    this.sMessageId = '';
    this.sInReplyTo = '';
    this.sReferences = '';

    if (message) {
      this.threads(message.threads());
    }

    this.computeSenderEmail();
    return this;
  };

  _proto.showLazyExternalImagesInBody = function showLazyExternalImagesInBody() {
    if (this.body) {
      $__WEBPACK_IMPORTED_MODULE_9___default()('.lazy.lazy-inited[data-original]', this.body).each(function () {
        $__WEBPACK_IMPORTED_MODULE_9___default()(this).attr('src', $__WEBPACK_IMPORTED_MODULE_9___default()(this).attr('data-original')) // eslint-disable-line no-invalid-this
        .removeAttr('data-original').removeAttr('data-loaded');
      });
    }
  };

  _proto.lozad = function lozad() {
    lozad__WEBPACK_IMPORTED_MODULE_13___default()('img.lazy:not(.lazy-inited)', {
      threshold: 0.4,
      load: function load(element) {
        // console.log('lazy', element.dataset.original);
        element.src = Common_Consts__WEBPACK_IMPORTED_MODULE_16__[/* DATA_IMAGE_LAZY_PLACEHOLDER_PIC */ "e"];
        $__WEBPACK_IMPORTED_MODULE_9___default()(element).addClass('lazy-inited').attr('src', element.dataset.original).removeAttr('data-loaded').removeAttr('data-original').css({
          opacity: 0.3
        }).animate({
          opacity: 1
        }, 500);
      }
    }).observe();
  };

  _proto.showExternalImages = function showExternalImages(lazy) {
    if (lazy === void 0) {
      lazy = false;
    }

    if (this.body && this.body.data('rl-has-images')) {
      this.hasImages(false);
      this.body.data('rl-has-images', false);
      var attr = this.proxy ? 'data-x-additional-src' : 'data-x-src';
      $__WEBPACK_IMPORTED_MODULE_9___default()('[' + attr + ']', this.body).each(function () {
        var $this = $__WEBPACK_IMPORTED_MODULE_9___default()(this); // eslint-disable-line no-invalid-this

        if (lazy && $this.is('img')) {
          $this.addClass('lazy').attr('data-original', $this.attr(attr)).removeAttr('data-loaded');
        } else {
          $this.attr('src', $this.attr(attr)).removeAttr('data-loaded');
        }
      });
      attr = this.proxy ? 'data-x-additional-style-url' : 'data-x-style-url';
      $__WEBPACK_IMPORTED_MODULE_9___default()('[' + attr + ']', this.body).each(function () {
        var $this = $__WEBPACK_IMPORTED_MODULE_9___default()(this); // eslint-disable-line no-invalid-this

        var style = Object(Common_Utils__WEBPACK_IMPORTED_MODULE_17__["trim"])($this.attr('style'));
        style = '' === style ? '' : ';' === style.substr(-1) ? style + ' ' : style + '; ';
        $this.attr('style', style + $this.attr(attr));
      });

      if (lazy) {
        this.lozad();
        Common_Globals__WEBPACK_IMPORTED_MODULE_18__["$win"].resize();
      }

      Object(Common_Utils__WEBPACK_IMPORTED_MODULE_17__["windowResize"])(500);
    }
  };

  _proto.showInternalImages = function showInternalImages(lazy) {
    var _this3 = this;

    if (lazy === void 0) {
      lazy = false;
    }

    if (this.body && !this.body.data('rl-init-internal-images')) {
      this.body.data('rl-init-internal-images', true);
      var self = this;
      $__WEBPACK_IMPORTED_MODULE_9___default()('[data-x-src-cid]', this.body).each(function () {
        var $this = $__WEBPACK_IMPORTED_MODULE_9___default()(this),
            // eslint-disable-line no-invalid-this
        attachment = self.findAttachmentByCid($this.attr('data-x-src-cid'));

        if (attachment && attachment.download) {
          if (lazy && $this.is('img')) {
            $this.addClass('lazy').attr('data-original', attachment.linkPreview());
          } else {
            $this.attr('src', attachment.linkPreview());
          }
        }
      });
      $__WEBPACK_IMPORTED_MODULE_9___default()('[data-x-src-location]', this.body).each(function () {
        var $this = $__WEBPACK_IMPORTED_MODULE_9___default()(this); // eslint-disable-line no-invalid-this

        var attachment = self.findAttachmentByContentLocation($this.attr('data-x-src-location'));

        if (!attachment) {
          attachment = self.findAttachmentByCid($this.attr('data-x-src-location'));
        }

        if (attachment && attachment.download) {
          if (lazy && $this.is('img')) {
            $this.addClass('lazy').attr('data-original', attachment.linkPreview());
          } else {
            $this.attr('src', attachment.linkPreview());
          }
        }
      });
      $__WEBPACK_IMPORTED_MODULE_9___default()('[data-x-style-cid]', this.body).each(function () {
        var style = '',
            name = '';
        var $this = $__WEBPACK_IMPORTED_MODULE_9___default()(this),
            // eslint-disable-line no-invalid-this
        attachment = self.findAttachmentByCid($this.attr('data-x-style-cid'));

        if (attachment && attachment.linkPreview) {
          name = $this.attr('data-x-style-cid-name');

          if ('' !== name) {
            style = Object(Common_Utils__WEBPACK_IMPORTED_MODULE_17__["trim"])($this.attr('style'));
            style = '' === style ? '' : ';' === style.substr(-1) ? style + ' ' : style + '; ';
            $this.attr('style', style + name + ": url('" + attachment.linkPreview() + "')");
          }
        }
      });

      if (lazy) {
        // $('.RL-MailMessageView .messageView .messageItem .content')[0]
        ___WEBPACK_IMPORTED_MODULE_8___default.a.delay(function () {
          return _this3.lozad();
        }, 300);
      }

      Object(Common_Utils__WEBPACK_IMPORTED_MODULE_17__["windowResize"])(500);
    }
  };

  _proto.storeDataInDom = function storeDataInDom() {
    if (this.body) {
      this.body.data('rl-is-html', !!this.isHtml());
      this.body.data('rl-has-images', !!this.hasImages());
    }
  };

  _proto.fetchDataFromDom = function fetchDataFromDom() {
    if (this.body) {
      this.isHtml(!!this.body.data('rl-is-html'));
      this.hasImages(!!this.body.data('rl-has-images'));
    }
  };

  _proto.replacePlaneTextBody = function replacePlaneTextBody(plain) {
    if (this.body) {
      this.body.html(plain).addClass('b-text-part plain');
    }
  }
  /**
   * @returns {string}
   */
  ;

  _proto.flagHash = function flagHash() {
    return [this.deleted(), this.deletedMark(), this.unseen(), this.flagged(), this.answered(), this.forwarded(), this.isReadReceipt()].join(',');
  };

  return MessageModel;
}(Knoin_AbstractModel__WEBPACK_IMPORTED_MODULE_24__[/* AbstractModel */ "a"]);



/***/ }),
/* 279 */
/*!*************************************************!*\
  !*** ./node_modules/js-cookie/src/js.cookie.js ***!
  \*************************************************/
/*! no static exports found */
/*! exports used: default */
/***/ (function(module, exports, __webpack_require__) {

var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
 * JavaScript Cookie v2.2.1
 * https://github.com/js-cookie/js-cookie
 *
 * Copyright 2006, 2015 Klaus Hartl & Fagner Brack
 * Released under the MIT license
 */
;(function (factory) {
	var registeredInModuleLoader;
	if (true) {
		!(__WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
				__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
				(__WEBPACK_AMD_DEFINE_FACTORY__.call(exports, __webpack_require__, exports, module)) :
				__WEBPACK_AMD_DEFINE_FACTORY__),
				__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
		registeredInModuleLoader = true;
	}
	if (true) {
		module.exports = factory();
		registeredInModuleLoader = true;
	}
	if (!registeredInModuleLoader) {
		var OldCookies = window.Cookies;
		var api = window.Cookies = factory();
		api.noConflict = function () {
			window.Cookies = OldCookies;
			return api;
		};
	}
}(function () {
	function extend () {
		var i = 0;
		var result = {};
		for (; i < arguments.length; i++) {
			var attributes = arguments[ i ];
			for (var key in attributes) {
				result[key] = attributes[key];
			}
		}
		return result;
	}

	function decode (s) {
		return s.replace(/(%[0-9A-Z]{2})+/g, decodeURIComponent);
	}

	function init (converter) {
		function api() {}

		function set (key, value, attributes) {
			if (typeof document === 'undefined') {
				return;
			}

			attributes = extend({
				path: '/'
			}, api.defaults, attributes);

			if (typeof attributes.expires === 'number') {
				attributes.expires = new Date(new Date() * 1 + attributes.expires * 864e+5);
			}

			// We're using "expires" because "max-age" is not supported by IE
			attributes.expires = attributes.expires ? attributes.expires.toUTCString() : '';

			try {
				var result = JSON.stringify(value);
				if (/^[\{\[]/.test(result)) {
					value = result;
				}
			} catch (e) {}

			value = converter.write ?
				converter.write(value, key) :
				encodeURIComponent(String(value))
					.replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g, decodeURIComponent);

			key = encodeURIComponent(String(key))
				.replace(/%(23|24|26|2B|5E|60|7C)/g, decodeURIComponent)
				.replace(/[\(\)]/g, escape);

			var stringifiedAttributes = '';
			for (var attributeName in attributes) {
				if (!attributes[attributeName]) {
					continue;
				}
				stringifiedAttributes += '; ' + attributeName;
				if (attributes[attributeName] === true) {
					continue;
				}

				// Considers RFC 6265 section 5.2:
				// ...
				// 3.  If the remaining unparsed-attributes contains a %x3B (";")
				//     character:
				// Consume the characters of the unparsed-attributes up to,
				// not including, the first %x3B (";") character.
				// ...
				stringifiedAttributes += '=' + attributes[attributeName].split(';')[0];
			}

			return (document.cookie = key + '=' + value + stringifiedAttributes);
		}

		function get (key, json) {
			if (typeof document === 'undefined') {
				return;
			}

			var jar = {};
			// To prevent the for loop in the first place assign an empty array
			// in case there are no cookies at all.
			var cookies = document.cookie ? document.cookie.split('; ') : [];
			var i = 0;

			for (; i < cookies.length; i++) {
				var parts = cookies[i].split('=');
				var cookie = parts.slice(1).join('=');

				if (!json && cookie.charAt(0) === '"') {
					cookie = cookie.slice(1, -1);
				}

				try {
					var name = decode(parts[0]);
					cookie = (converter.read || converter)(cookie, name) ||
						decode(cookie);

					if (json) {
						try {
							cookie = JSON.parse(cookie);
						} catch (e) {}
					}

					jar[name] = cookie;

					if (key === name) {
						break;
					}
				} catch (e) {}
			}

			return key ? jar[key] : jar;
		}

		api.set = set;
		api.get = function (key) {
			return get(key, false /* read as raw */);
		};
		api.getJSON = function (key) {
			return get(key, true /* read as json */);
		};
		api.remove = function (key, attributes) {
			set(key, '', extend(attributes, {
				expires: -1
			}));
		};

		api.defaults = {};

		api.withConverter = init;

		return api;
	}

	return init(function () {});
}));


/***/ }),
/* 280 */,
/* 281 */,
/* 282 */
/*!******************************************************************!*\
  !*** ./node_modules/core-js/internals/array-method-is-strict.js ***!
  \******************************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var fails = __webpack_require__(/*! ../internals/fails */ 36);

module.exports = function (METHOD_NAME, argument) {
  var method = [][METHOD_NAME];
  return !!method && fails(function () {
    // eslint-disable-next-line no-useless-call,no-throw-literal
    method.call(null, argument || function () { throw 1; }, 1);
  });
};


/***/ }),
/* 283 */
/*!*******************************************************!*\
  !*** ./node_modules/core-js/internals/create-html.js ***!
  \*******************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

var requireObjectCoercible = __webpack_require__(/*! ../internals/require-object-coercible */ 55);

var quot = /"/g;

// B.2.3.2.1 CreateHTML(string, tag, attribute, value)
// https://tc39.github.io/ecma262/#sec-createhtml
module.exports = function (string, tag, attribute, value) {
  var S = String(requireObjectCoercible(string));
  var p1 = '<' + tag;
  if (attribute !== '') p1 += ' ' + attribute + '="' + String(value).replace(quot, '&quot;') + '"';
  return p1 + '>' + S + '</' + tag + '>';
};


/***/ }),
/* 284 */
/*!**************************************************************!*\
  !*** ./node_modules/core-js/internals/string-html-forced.js ***!
  \**************************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

var fails = __webpack_require__(/*! ../internals/fails */ 36);

// check the existence of a method, lowercase
// of a tag and escaping quotes in arguments
module.exports = function (METHOD_NAME) {
  return fails(function () {
    var test = ''[METHOD_NAME]('"');
    return test !== test.toLowerCase() || test.split('"').length > 3;
  });
};


/***/ }),
/* 285 */
/*!*************************************************************!*\
  !*** ./node_modules/core-js-pure/stable/instance/reduce.js ***!
  \*************************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

module.exports = __webpack_require__(/*! ../../es/instance/reduce */ 234);


/***/ }),
/* 286 */
/*!**************************************************************!*\
  !*** ./node_modules/core-js-pure/es/array/virtual/reduce.js ***!
  \**************************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

__webpack_require__(/*! ../../../modules/es.array.reduce */ 287);
var entryVirtual = __webpack_require__(/*! ../../../internals/entry-virtual */ 54);

module.exports = entryVirtual('Array').reduce;


/***/ }),
/* 287 */
/*!**************************************************************!*\
  !*** ./node_modules/core-js-pure/modules/es.array.reduce.js ***!
  \**************************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var $ = __webpack_require__(/*! ../internals/export */ 43);
var $reduce = __webpack_require__(/*! ../internals/array-reduce */ 290).left;
var sloppyArrayMethod = __webpack_require__(/*! ../internals/sloppy-array-method */ 145);

// `Array.prototype.reduce` method
// https://tc39.github.io/ecma262/#sec-array.prototype.reduce
$({ target: 'Array', proto: true, forced: sloppyArrayMethod('reduce') }, {
  reduce: function reduce(callbackfn /* , initialValue */) {
    return $reduce(this, callbackfn, arguments.length, arguments.length > 1 ? arguments[1] : undefined);
  }
});


/***/ }),
/* 288 */
/*!******************************************************************************!*\
  !*** ./node_modules/core-js-pure/internals/object-property-is-enumerable.js ***!
  \******************************************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var nativePropertyIsEnumerable = {}.propertyIsEnumerable;
var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;

// Nashorn ~ JDK8 bug
var NASHORN_BUG = getOwnPropertyDescriptor && !nativePropertyIsEnumerable.call({ 1: 2 }, 1);

// `Object.prototype.propertyIsEnumerable` method implementation
// https://tc39.github.io/ecma262/#sec-object.prototype.propertyisenumerable
exports.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
  var descriptor = getOwnPropertyDescriptor(this, V);
  return !!descriptor && descriptor.enumerable;
} : nativePropertyIsEnumerable;


/***/ }),
/* 289 */
/*!**********************************************************!*\
  !*** ./node_modules/core-js-pure/internals/is-forced.js ***!
  \**********************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

var fails = __webpack_require__(/*! ../internals/fails */ 57);

var replacement = /#|\.prototype\./;

var isForced = function (feature, detection) {
  var value = data[normalize(feature)];
  return value == POLYFILL ? true
    : value == NATIVE ? false
    : typeof detection == 'function' ? fails(detection)
    : !!detection;
};

var normalize = isForced.normalize = function (string) {
  return String(string).replace(replacement, '.').toLowerCase();
};

var data = isForced.data = {};
var NATIVE = isForced.NATIVE = 'N';
var POLYFILL = isForced.POLYFILL = 'P';

module.exports = isForced;


/***/ }),
/* 290 */
/*!*************************************************************!*\
  !*** ./node_modules/core-js-pure/internals/array-reduce.js ***!
  \*************************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

var aFunction = __webpack_require__(/*! ../internals/a-function */ 173);
var toObject = __webpack_require__(/*! ../internals/to-object */ 121);
var IndexedObject = __webpack_require__(/*! ../internals/indexed-object */ 197);
var toLength = __webpack_require__(/*! ../internals/to-length */ 112);

// `Array.prototype.{ reduce, reduceRight }` methods implementation
var createMethod = function (IS_RIGHT) {
  return function (that, callbackfn, argumentsLength, memo) {
    aFunction(callbackfn);
    var O = toObject(that);
    var self = IndexedObject(O);
    var length = toLength(O.length);
    var index = IS_RIGHT ? length - 1 : 0;
    var i = IS_RIGHT ? -1 : 1;
    if (argumentsLength < 2) while (true) {
      if (index in self) {
        memo = self[index];
        index += i;
        break;
      }
      index += i;
      if (IS_RIGHT ? index < 0 : length <= index) {
        throw TypeError('Reduce of empty array with no initial value');
      }
    }
    for (;IS_RIGHT ? index >= 0 : length > index; index += i) if (index in self) {
      memo = callbackfn(memo, self[index], index, O);
    }
    return memo;
  };
};

module.exports = {
  // `Array.prototype.reduce` method
  // https://tc39.github.io/ecma262/#sec-array.prototype.reduce
  left: createMethod(false),
  // `Array.prototype.reduceRight` method
  // https://tc39.github.io/ecma262/#sec-array.prototype.reduceright
  right: createMethod(true)
};


/***/ }),
/* 291 */
/*!*************************************************************!*\
  !*** ./node_modules/core-js-pure/stable/instance/values.js ***!
  \*************************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

__webpack_require__(/*! ../../modules/web.dom-collections.iterator */ 219);
var values = __webpack_require__(/*! ../array/virtual/values */ 309);
var classof = __webpack_require__(/*! ../../internals/classof */ 174);
var ArrayPrototype = Array.prototype;

var DOMIterables = {
  DOMTokenList: true,
  NodeList: true
};

module.exports = function (it) {
  var own = it.values;
  return it === ArrayPrototype || (it instanceof Array && own === ArrayPrototype.values)
    // eslint-disable-next-line no-prototype-builtins
    || DOMIterables.hasOwnProperty(classof(it)) ? values : own;
};


/***/ }),
/* 292 */
/*!***************************************************************!*\
  !*** ./node_modules/core-js-pure/internals/internal-state.js ***!
  \***************************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

var NATIVE_WEAK_MAP = __webpack_require__(/*! ../internals/native-weak-map */ 293);
var global = __webpack_require__(/*! ../internals/global */ 75);
var isObject = __webpack_require__(/*! ../internals/is-object */ 76);
var hide = __webpack_require__(/*! ../internals/hide */ 83);
var objectHas = __webpack_require__(/*! ../internals/has */ 95);
var sharedKey = __webpack_require__(/*! ../internals/shared-key */ 204);
var hiddenKeys = __webpack_require__(/*! ../internals/hidden-keys */ 205);

var WeakMap = global.WeakMap;
var set, get, has;

var enforce = function (it) {
  return has(it) ? get(it) : set(it, {});
};

var getterFor = function (TYPE) {
  return function (it) {
    var state;
    if (!isObject(it) || (state = get(it)).type !== TYPE) {
      throw TypeError('Incompatible receiver, ' + TYPE + ' required');
    } return state;
  };
};

if (NATIVE_WEAK_MAP) {
  var store = new WeakMap();
  var wmget = store.get;
  var wmhas = store.has;
  var wmset = store.set;
  set = function (it, metadata) {
    wmset.call(store, it, metadata);
    return metadata;
  };
  get = function (it) {
    return wmget.call(store, it) || {};
  };
  has = function (it) {
    return wmhas.call(store, it);
  };
} else {
  var STATE = sharedKey('state');
  hiddenKeys[STATE] = true;
  set = function (it, metadata) {
    hide(it, STATE, metadata);
    return metadata;
  };
  get = function (it) {
    return objectHas(it, STATE) ? it[STATE] : {};
  };
  has = function (it) {
    return objectHas(it, STATE);
  };
}

module.exports = {
  set: set,
  get: get,
  has: has,
  enforce: enforce,
  getterFor: getterFor
};


/***/ }),
/* 293 */
/*!****************************************************************!*\
  !*** ./node_modules/core-js-pure/internals/native-weak-map.js ***!
  \****************************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

var global = __webpack_require__(/*! ../internals/global */ 75);
var nativeFunctionToString = __webpack_require__(/*! ../internals/function-to-string */ 294);

var WeakMap = global.WeakMap;

module.exports = typeof WeakMap === 'function' && /native code/.test(nativeFunctionToString.call(WeakMap));


/***/ }),
/* 294 */
/*!*******************************************************************!*\
  !*** ./node_modules/core-js-pure/internals/function-to-string.js ***!
  \*******************************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

var shared = __webpack_require__(/*! ../internals/shared */ 202);

module.exports = shared('native-function-to-string', Function.toString);


/***/ }),
/* 295 */
/*!***********************************************************!*\
  !*** ./node_modules/core-js-pure/internals/set-global.js ***!
  \***********************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

var global = __webpack_require__(/*! ../internals/global */ 75);
var hide = __webpack_require__(/*! ../internals/hide */ 83);

module.exports = function (key, value) {
  try {
    hide(global, key, value);
  } catch (error) {
    global[key] = value;
  } return value;
};


/***/ }),
/* 296 */
/*!****************************************************************!*\
  !*** ./node_modules/core-js-pure/internals/define-iterator.js ***!
  \****************************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var $ = __webpack_require__(/*! ../internals/export */ 43);
var createIteratorConstructor = __webpack_require__(/*! ../internals/create-iterator-constructor */ 297);
var getPrototypeOf = __webpack_require__(/*! ../internals/object-get-prototype-of */ 242);
var setPrototypeOf = __webpack_require__(/*! ../internals/object-set-prototype-of */ 305);
var setToStringTag = __webpack_require__(/*! ../internals/set-to-string-tag */ 248);
var hide = __webpack_require__(/*! ../internals/hide */ 83);
var redefine = __webpack_require__(/*! ../internals/redefine */ 307);
var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ 68);
var IS_PURE = __webpack_require__(/*! ../internals/is-pure */ 203);
var Iterators = __webpack_require__(/*! ../internals/iterators */ 155);
var IteratorsCore = __webpack_require__(/*! ../internals/iterators-core */ 241);

var IteratorPrototype = IteratorsCore.IteratorPrototype;
var BUGGY_SAFARI_ITERATORS = IteratorsCore.BUGGY_SAFARI_ITERATORS;
var ITERATOR = wellKnownSymbol('iterator');
var KEYS = 'keys';
var VALUES = 'values';
var ENTRIES = 'entries';

var returnThis = function () { return this; };

module.exports = function (Iterable, NAME, IteratorConstructor, next, DEFAULT, IS_SET, FORCED) {
  createIteratorConstructor(IteratorConstructor, NAME, next);

  var getIterationMethod = function (KIND) {
    if (KIND === DEFAULT && defaultIterator) return defaultIterator;
    if (!BUGGY_SAFARI_ITERATORS && KIND in IterablePrototype) return IterablePrototype[KIND];
    switch (KIND) {
      case KEYS: return function keys() { return new IteratorConstructor(this, KIND); };
      case VALUES: return function values() { return new IteratorConstructor(this, KIND); };
      case ENTRIES: return function entries() { return new IteratorConstructor(this, KIND); };
    } return function () { return new IteratorConstructor(this); };
  };

  var TO_STRING_TAG = NAME + ' Iterator';
  var INCORRECT_VALUES_NAME = false;
  var IterablePrototype = Iterable.prototype;
  var nativeIterator = IterablePrototype[ITERATOR]
    || IterablePrototype['@@iterator']
    || DEFAULT && IterablePrototype[DEFAULT];
  var defaultIterator = !BUGGY_SAFARI_ITERATORS && nativeIterator || getIterationMethod(DEFAULT);
  var anyNativeIterator = NAME == 'Array' ? IterablePrototype.entries || nativeIterator : nativeIterator;
  var CurrentIteratorPrototype, methods, KEY;

  // fix native
  if (anyNativeIterator) {
    CurrentIteratorPrototype = getPrototypeOf(anyNativeIterator.call(new Iterable()));
    if (IteratorPrototype !== Object.prototype && CurrentIteratorPrototype.next) {
      if (!IS_PURE && getPrototypeOf(CurrentIteratorPrototype) !== IteratorPrototype) {
        if (setPrototypeOf) {
          setPrototypeOf(CurrentIteratorPrototype, IteratorPrototype);
        } else if (typeof CurrentIteratorPrototype[ITERATOR] != 'function') {
          hide(CurrentIteratorPrototype, ITERATOR, returnThis);
        }
      }
      // Set @@toStringTag to native iterators
      setToStringTag(CurrentIteratorPrototype, TO_STRING_TAG, true, true);
      if (IS_PURE) Iterators[TO_STRING_TAG] = returnThis;
    }
  }

  // fix Array#{values, @@iterator}.name in V8 / FF
  if (DEFAULT == VALUES && nativeIterator && nativeIterator.name !== VALUES) {
    INCORRECT_VALUES_NAME = true;
    defaultIterator = function values() { return nativeIterator.call(this); };
  }

  // define iterator
  if ((!IS_PURE || FORCED) && IterablePrototype[ITERATOR] !== defaultIterator) {
    hide(IterablePrototype, ITERATOR, defaultIterator);
  }
  Iterators[NAME] = defaultIterator;

  // export additional methods
  if (DEFAULT) {
    methods = {
      values: getIterationMethod(VALUES),
      keys: IS_SET ? defaultIterator : getIterationMethod(KEYS),
      entries: getIterationMethod(ENTRIES)
    };
    if (FORCED) for (KEY in methods) {
      if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {
        redefine(IterablePrototype, KEY, methods[KEY]);
      }
    } else $({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);
  }

  return methods;
};


/***/ }),
/* 297 */
/*!****************************************************************************!*\
  !*** ./node_modules/core-js-pure/internals/create-iterator-constructor.js ***!
  \****************************************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var IteratorPrototype = __webpack_require__(/*! ../internals/iterators-core */ 241).IteratorPrototype;
var create = __webpack_require__(/*! ../internals/object-create */ 243);
var createPropertyDescriptor = __webpack_require__(/*! ../internals/create-property-descriptor */ 153);
var setToStringTag = __webpack_require__(/*! ../internals/set-to-string-tag */ 248);
var Iterators = __webpack_require__(/*! ../internals/iterators */ 155);

var returnThis = function () { return this; };

module.exports = function (IteratorConstructor, NAME, next) {
  var TO_STRING_TAG = NAME + ' Iterator';
  IteratorConstructor.prototype = create(IteratorPrototype, { next: createPropertyDescriptor(1, next) });
  setToStringTag(IteratorConstructor, TO_STRING_TAG, false, true);
  Iterators[TO_STRING_TAG] = returnThis;
  return IteratorConstructor;
};


/***/ }),
/* 298 */
/*!*************************************************************************!*\
  !*** ./node_modules/core-js-pure/internals/correct-prototype-getter.js ***!
  \*************************************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

var fails = __webpack_require__(/*! ../internals/fails */ 57);

module.exports = !fails(function () {
  function F() { /* empty */ }
  F.prototype.constructor = null;
  return Object.getPrototypeOf(new F()) !== F.prototype;
});


/***/ }),
/* 299 */
/*!**************************************************************!*\
  !*** ./node_modules/core-js-pure/internals/native-symbol.js ***!
  \**************************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

var fails = __webpack_require__(/*! ../internals/fails */ 57);

module.exports = !!Object.getOwnPropertySymbols && !fails(function () {
  // Chrome 38 Symbol has incorrect toString conversion
  // eslint-disable-next-line no-undef
  return !String(Symbol());
});


/***/ }),
/* 300 */
/*!*************************************************************************!*\
  !*** ./node_modules/core-js-pure/internals/object-define-properties.js ***!
  \*************************************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ 82);
var definePropertyModule = __webpack_require__(/*! ../internals/object-define-property */ 136);
var anObject = __webpack_require__(/*! ../internals/an-object */ 154);
var objectKeys = __webpack_require__(/*! ../internals/object-keys */ 244);

// `Object.defineProperties` method
// https://tc39.github.io/ecma262/#sec-object.defineproperties
module.exports = DESCRIPTORS ? Object.defineProperties : function defineProperties(O, Properties) {
  anObject(O);
  var keys = objectKeys(Properties);
  var length = keys.length;
  var index = 0;
  var key;
  while (length > index) definePropertyModule.f(O, key = keys[index++], Properties[key]);
  return O;
};


/***/ }),
/* 301 */
/*!*********************************************************************!*\
  !*** ./node_modules/core-js-pure/internals/object-keys-internal.js ***!
  \*********************************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

var has = __webpack_require__(/*! ../internals/has */ 95);
var toIndexedObject = __webpack_require__(/*! ../internals/to-indexed-object */ 94);
var indexOf = __webpack_require__(/*! ../internals/array-includes */ 245).indexOf;
var hiddenKeys = __webpack_require__(/*! ../internals/hidden-keys */ 205);

module.exports = function (object, names) {
  var O = toIndexedObject(object);
  var i = 0;
  var result = [];
  var key;
  for (key in O) !has(hiddenKeys, key) && has(O, key) && result.push(key);
  // Don't enum bug & hidden keys
  while (names.length > i) if (has(O, key = names[i++])) {
    ~indexOf(result, key) || result.push(key);
  }
  return result;
};


/***/ }),
/* 302 */
/*!*****************************************************!*\
  !*** ./node_modules/core-js-pure/internals/html.js ***!
  \*****************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

var getBuiltIn = __webpack_require__(/*! ../internals/get-built-in */ 303);

module.exports = getBuiltIn('document', 'documentElement');


/***/ }),
/* 303 */
/*!*************************************************************!*\
  !*** ./node_modules/core-js-pure/internals/get-built-in.js ***!
  \*************************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

var path = __webpack_require__(/*! ../internals/path */ 96);
var global = __webpack_require__(/*! ../internals/global */ 75);

var aFunction = function (variable) {
  return typeof variable == 'function' ? variable : undefined;
};

module.exports = function (namespace, method) {
  return arguments.length < 2 ? aFunction(path[namespace]) || aFunction(global[namespace])
    : path[namespace] && path[namespace][method] || global[namespace] && global[namespace][method];
};


/***/ }),
/* 304 */
/*!*****************************************************************!*\
  !*** ./node_modules/core-js-pure/internals/object-to-string.js ***!
  \*****************************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var classof = __webpack_require__(/*! ../internals/classof */ 174);
var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ 68);

var TO_STRING_TAG = wellKnownSymbol('toStringTag');
var test = {};

test[TO_STRING_TAG] = 'z';

// `Object.prototype.toString` method implementation
// https://tc39.github.io/ecma262/#sec-object.prototype.tostring
module.exports = String(test) !== '[object z]' ? function toString() {
  return '[object ' + classof(this) + ']';
} : test.toString;


/***/ }),
/* 305 */
/*!************************************************************************!*\
  !*** ./node_modules/core-js-pure/internals/object-set-prototype-of.js ***!
  \************************************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

var anObject = __webpack_require__(/*! ../internals/an-object */ 154);
var aPossiblePrototype = __webpack_require__(/*! ../internals/a-possible-prototype */ 306);

// `Object.setPrototypeOf` method
// https://tc39.github.io/ecma262/#sec-object.setprototypeof
// Works with __proto__ only. Old v8 can't work with null proto objects.
/* eslint-disable no-proto */
module.exports = Object.setPrototypeOf || ('__proto__' in {} ? function () {
  var CORRECT_SETTER = false;
  var test = {};
  var setter;
  try {
    setter = Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set;
    setter.call(test, []);
    CORRECT_SETTER = test instanceof Array;
  } catch (error) { /* empty */ }
  return function setPrototypeOf(O, proto) {
    anObject(O);
    aPossiblePrototype(proto);
    if (CORRECT_SETTER) setter.call(O, proto);
    else O.__proto__ = proto;
    return O;
  };
}() : undefined);


/***/ }),
/* 306 */
/*!*********************************************************************!*\
  !*** ./node_modules/core-js-pure/internals/a-possible-prototype.js ***!
  \*********************************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

var isObject = __webpack_require__(/*! ../internals/is-object */ 76);

module.exports = function (it) {
  if (!isObject(it) && it !== null) {
    throw TypeError("Can't set " + String(it) + ' as a prototype');
  } return it;
};


/***/ }),
/* 307 */
/*!*********************************************************!*\
  !*** ./node_modules/core-js-pure/internals/redefine.js ***!
  \*********************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

var hide = __webpack_require__(/*! ../internals/hide */ 83);

module.exports = function (target, key, value, options) {
  if (options && options.enumerable) target[key] = value;
  else hide(target, key, value);
};


/***/ }),
/* 308 */
/*!**************************************************************!*\
  !*** ./node_modules/core-js-pure/internals/dom-iterables.js ***!
  \**************************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports) {

// iterable DOM collections
// flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods
module.exports = {
  CSSRuleList: 0,
  CSSStyleDeclaration: 0,
  CSSValueList: 0,
  ClientRectList: 0,
  DOMRectList: 0,
  DOMStringList: 0,
  DOMTokenList: 1,
  DataTransferItemList: 0,
  FileList: 0,
  HTMLAllCollection: 0,
  HTMLCollection: 0,
  HTMLFormElement: 0,
  HTMLSelectElement: 0,
  MediaList: 0,
  MimeTypeArray: 0,
  NamedNodeMap: 0,
  NodeList: 1,
  PaintRequestList: 0,
  Plugin: 0,
  PluginArray: 0,
  SVGLengthList: 0,
  SVGNumberList: 0,
  SVGPathSegList: 0,
  SVGPointList: 0,
  SVGStringList: 0,
  SVGTransformList: 0,
  SourceBufferList: 0,
  StyleSheetList: 0,
  TextTrackCueList: 0,
  TextTrackList: 0,
  TouchList: 0
};


/***/ }),
/* 309 */
/*!******************************************************************!*\
  !*** ./node_modules/core-js-pure/stable/array/virtual/values.js ***!
  \******************************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

module.exports = __webpack_require__(/*! ../../../es/array/virtual/values */ 310);


/***/ }),
/* 310 */
/*!**************************************************************!*\
  !*** ./node_modules/core-js-pure/es/array/virtual/values.js ***!
  \**************************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

__webpack_require__(/*! ../../../modules/es.array.iterator */ 220);
var entryVirtual = __webpack_require__(/*! ../../../internals/entry-virtual */ 54);

module.exports = entryVirtual('Array').values;


/***/ }),
/* 311 */
/*!*************************************************************!*\
  !*** ./node_modules/core-js-pure/stable/instance/concat.js ***!
  \*************************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

module.exports = __webpack_require__(/*! ../../es/instance/concat */ 312);


/***/ }),
/* 312 */
/*!*********************************************************!*\
  !*** ./node_modules/core-js-pure/es/instance/concat.js ***!
  \*********************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

var concat = __webpack_require__(/*! ../array/virtual/concat */ 313);

var ArrayPrototype = Array.prototype;

module.exports = function (it) {
  var own = it.concat;
  return it === ArrayPrototype || (it instanceof Array && own === ArrayPrototype.concat) ? concat : own;
};


/***/ }),
/* 313 */
/*!**************************************************************!*\
  !*** ./node_modules/core-js-pure/es/array/virtual/concat.js ***!
  \**************************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

__webpack_require__(/*! ../../../modules/es.array.concat */ 314);
var entryVirtual = __webpack_require__(/*! ../../../internals/entry-virtual */ 54);

module.exports = entryVirtual('Array').concat;


/***/ }),
/* 314 */
/*!**************************************************************!*\
  !*** ./node_modules/core-js-pure/modules/es.array.concat.js ***!
  \**************************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var $ = __webpack_require__(/*! ../internals/export */ 43);
var fails = __webpack_require__(/*! ../internals/fails */ 57);
var isArray = __webpack_require__(/*! ../internals/is-array */ 156);
var isObject = __webpack_require__(/*! ../internals/is-object */ 76);
var toObject = __webpack_require__(/*! ../internals/to-object */ 121);
var toLength = __webpack_require__(/*! ../internals/to-length */ 112);
var createProperty = __webpack_require__(/*! ../internals/create-property */ 249);
var arraySpeciesCreate = __webpack_require__(/*! ../internals/array-species-create */ 250);
var arrayMethodHasSpeciesSupport = __webpack_require__(/*! ../internals/array-method-has-species-support */ 157);
var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ 68);

var IS_CONCAT_SPREADABLE = wellKnownSymbol('isConcatSpreadable');
var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF;
var MAXIMUM_ALLOWED_INDEX_EXCEEDED = 'Maximum allowed index exceeded';

var IS_CONCAT_SPREADABLE_SUPPORT = !fails(function () {
  var array = [];
  array[IS_CONCAT_SPREADABLE] = false;
  return array.concat()[0] !== array;
});

var SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('concat');

var isConcatSpreadable = function (O) {
  if (!isObject(O)) return false;
  var spreadable = O[IS_CONCAT_SPREADABLE];
  return spreadable !== undefined ? !!spreadable : isArray(O);
};

var FORCED = !IS_CONCAT_SPREADABLE_SUPPORT || !SPECIES_SUPPORT;

// `Array.prototype.concat` method
// https://tc39.github.io/ecma262/#sec-array.prototype.concat
// with adding support of @@isConcatSpreadable and @@species
$({ target: 'Array', proto: true, forced: FORCED }, {
  concat: function concat(arg) { // eslint-disable-line no-unused-vars
    var O = toObject(this);
    var A = arraySpeciesCreate(O, 0);
    var n = 0;
    var i, k, length, len, E;
    for (i = -1, length = arguments.length; i < length; i++) {
      E = i === -1 ? O : arguments[i];
      if (isConcatSpreadable(E)) {
        len = toLength(E.length);
        if (n + len > MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
        for (k = 0; k < len; k++, n++) if (k in E) createProperty(A, n, E[k]);
      } else {
        if (n >= MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
        createProperty(A, n++, E);
      }
    }
    A.length = n;
    return A;
  }
});


/***/ }),
/* 315 */
/*!***************************************************************!*\
  !*** ./node_modules/core-js-pure/stable/instance/index-of.js ***!
  \***************************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

module.exports = __webpack_require__(/*! ../../es/instance/index-of */ 316);


/***/ }),
/* 316 */
/*!***********************************************************!*\
  !*** ./node_modules/core-js-pure/es/instance/index-of.js ***!
  \***********************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

var indexOf = __webpack_require__(/*! ../array/virtual/index-of */ 317);

var ArrayPrototype = Array.prototype;

module.exports = function (it) {
  var own = it.indexOf;
  return it === ArrayPrototype || (it instanceof Array && own === ArrayPrototype.indexOf) ? indexOf : own;
};


/***/ }),
/* 317 */
/*!****************************************************************!*\
  !*** ./node_modules/core-js-pure/es/array/virtual/index-of.js ***!
  \****************************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

__webpack_require__(/*! ../../../modules/es.array.index-of */ 318);
var entryVirtual = __webpack_require__(/*! ../../../internals/entry-virtual */ 54);

module.exports = entryVirtual('Array').indexOf;


/***/ }),
/* 318 */
/*!****************************************************************!*\
  !*** ./node_modules/core-js-pure/modules/es.array.index-of.js ***!
  \****************************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var $ = __webpack_require__(/*! ../internals/export */ 43);
var $indexOf = __webpack_require__(/*! ../internals/array-includes */ 245).indexOf;
var sloppyArrayMethod = __webpack_require__(/*! ../internals/sloppy-array-method */ 145);

var nativeIndexOf = [].indexOf;

var NEGATIVE_ZERO = !!nativeIndexOf && 1 / [1].indexOf(1, -0) < 0;
var SLOPPY_METHOD = sloppyArrayMethod('indexOf');

// `Array.prototype.indexOf` method
// https://tc39.github.io/ecma262/#sec-array.prototype.indexof
$({ target: 'Array', proto: true, forced: NEGATIVE_ZERO || SLOPPY_METHOD }, {
  indexOf: function indexOf(searchElement /* , fromIndex = 0 */) {
    return NEGATIVE_ZERO
      // convert -0 to +0
      ? nativeIndexOf.apply(this, arguments) || 0
      : $indexOf(this, searchElement, arguments.length > 1 ? arguments[1] : undefined);
  }
});


/***/ }),
/* 319 */
/*!***********************************************************!*\
  !*** ./node_modules/core-js-pure/stable/instance/find.js ***!
  \***********************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

module.exports = __webpack_require__(/*! ../../es/instance/find */ 320);


/***/ }),
/* 320 */
/*!*******************************************************!*\
  !*** ./node_modules/core-js-pure/es/instance/find.js ***!
  \*******************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

var find = __webpack_require__(/*! ../array/virtual/find */ 321);

var ArrayPrototype = Array.prototype;

module.exports = function (it) {
  var own = it.find;
  return it === ArrayPrototype || (it instanceof Array && own === ArrayPrototype.find) ? find : own;
};


/***/ }),
/* 321 */
/*!************************************************************!*\
  !*** ./node_modules/core-js-pure/es/array/virtual/find.js ***!
  \************************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

__webpack_require__(/*! ../../../modules/es.array.find */ 322);
var entryVirtual = __webpack_require__(/*! ../../../internals/entry-virtual */ 54);

module.exports = entryVirtual('Array').find;


/***/ }),
/* 322 */
/*!************************************************************!*\
  !*** ./node_modules/core-js-pure/modules/es.array.find.js ***!
  \************************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var $ = __webpack_require__(/*! ../internals/export */ 43);
var $find = __webpack_require__(/*! ../internals/array-iteration */ 158).find;
var addToUnscopables = __webpack_require__(/*! ../internals/add-to-unscopables */ 239);

var FIND = 'find';
var SKIPS_HOLES = true;

// Shouldn't skip holes
if (FIND in []) Array(1)[FIND](function () { SKIPS_HOLES = false; });

// `Array.prototype.find` method
// https://tc39.github.io/ecma262/#sec-array.prototype.find
$({ target: 'Array', proto: true, forced: SKIPS_HOLES }, {
  find: function find(callbackfn /* , that = undefined */) {
    return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  }
});

// https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables
addToUnscopables(FIND);


/***/ }),
/* 323 */
/*!********************************************************************!*\
  !*** ./node_modules/core-js-pure/stable/instance/last-index-of.js ***!
  \********************************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

module.exports = __webpack_require__(/*! ../../es/instance/last-index-of */ 324);


/***/ }),
/* 324 */
/*!****************************************************************!*\
  !*** ./node_modules/core-js-pure/es/instance/last-index-of.js ***!
  \****************************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

var lastIndexOf = __webpack_require__(/*! ../array/virtual/last-index-of */ 325);

var ArrayPrototype = Array.prototype;

module.exports = function (it) {
  var own = it.lastIndexOf;
  return it === ArrayPrototype || (it instanceof Array && own === ArrayPrototype.lastIndexOf) ? lastIndexOf : own;
};


/***/ }),
/* 325 */
/*!*********************************************************************!*\
  !*** ./node_modules/core-js-pure/es/array/virtual/last-index-of.js ***!
  \*********************************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

__webpack_require__(/*! ../../../modules/es.array.last-index-of */ 326);
var entryVirtual = __webpack_require__(/*! ../../../internals/entry-virtual */ 54);

module.exports = entryVirtual('Array').lastIndexOf;


/***/ }),
/* 326 */
/*!*********************************************************************!*\
  !*** ./node_modules/core-js-pure/modules/es.array.last-index-of.js ***!
  \*********************************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

var $ = __webpack_require__(/*! ../internals/export */ 43);
var lastIndexOf = __webpack_require__(/*! ../internals/array-last-index-of */ 327);

// `Array.prototype.lastIndexOf` method
// https://tc39.github.io/ecma262/#sec-array.prototype.lastindexof
$({ target: 'Array', proto: true, forced: lastIndexOf !== [].lastIndexOf }, {
  lastIndexOf: lastIndexOf
});


/***/ }),
/* 327 */
/*!********************************************************************!*\
  !*** ./node_modules/core-js-pure/internals/array-last-index-of.js ***!
  \********************************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var toIndexedObject = __webpack_require__(/*! ../internals/to-indexed-object */ 94);
var toInteger = __webpack_require__(/*! ../internals/to-integer */ 201);
var toLength = __webpack_require__(/*! ../internals/to-length */ 112);
var sloppyArrayMethod = __webpack_require__(/*! ../internals/sloppy-array-method */ 145);

var min = Math.min;
var nativeLastIndexOf = [].lastIndexOf;
var NEGATIVE_ZERO = !!nativeLastIndexOf && 1 / [1].lastIndexOf(1, -0) < 0;
var SLOPPY_METHOD = sloppyArrayMethod('lastIndexOf');

// `Array.prototype.lastIndexOf` method implementation
// https://tc39.github.io/ecma262/#sec-array.prototype.lastindexof
module.exports = (NEGATIVE_ZERO || SLOPPY_METHOD) ? function lastIndexOf(searchElement /* , fromIndex = @[*-1] */) {
  // convert -0 to +0
  if (NEGATIVE_ZERO) return nativeLastIndexOf.apply(this, arguments) || 0;
  var O = toIndexedObject(this);
  var length = toLength(O.length);
  var index = length - 1;
  if (arguments.length > 1) index = min(index, toInteger(arguments[1]));
  if (index < 0) index = length + index;
  for (;index >= 0; index--) if (index in O && O[index] === searchElement) return index || 0;
  return -1;
} : nativeLastIndexOf;


/***/ }),
/* 328 */
/*!***********************************************************!*\
  !*** ./node_modules/core-js-pure/stable/instance/bind.js ***!
  \***********************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

module.exports = __webpack_require__(/*! ../../es/instance/bind */ 329);


/***/ }),
/* 329 */
/*!*******************************************************!*\
  !*** ./node_modules/core-js-pure/es/instance/bind.js ***!
  \*******************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

var bind = __webpack_require__(/*! ../function/virtual/bind */ 330);

var FunctionPrototype = Function.prototype;

module.exports = function (it) {
  var own = it.bind;
  return it === FunctionPrototype || (it instanceof Function && own === FunctionPrototype.bind) ? bind : own;
};


/***/ }),
/* 330 */
/*!***************************************************************!*\
  !*** ./node_modules/core-js-pure/es/function/virtual/bind.js ***!
  \***************************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

__webpack_require__(/*! ../../../modules/es.function.bind */ 331);
var entryVirtual = __webpack_require__(/*! ../../../internals/entry-virtual */ 54);

module.exports = entryVirtual('Function').bind;


/***/ }),
/* 331 */
/*!***************************************************************!*\
  !*** ./node_modules/core-js-pure/modules/es.function.bind.js ***!
  \***************************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

var $ = __webpack_require__(/*! ../internals/export */ 43);
var bind = __webpack_require__(/*! ../internals/function-bind */ 332);

// `Function.prototype.bind` method
// https://tc39.github.io/ecma262/#sec-function.prototype.bind
$({ target: 'Function', proto: true }, {
  bind: bind
});


/***/ }),
/* 332 */
/*!**************************************************************!*\
  !*** ./node_modules/core-js-pure/internals/function-bind.js ***!
  \**************************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var aFunction = __webpack_require__(/*! ../internals/a-function */ 173);
var isObject = __webpack_require__(/*! ../internals/is-object */ 76);

var slice = [].slice;
var factories = {};

var construct = function (C, argsLength, args) {
  if (!(argsLength in factories)) {
    for (var list = [], i = 0; i < argsLength; i++) list[i] = 'a[' + i + ']';
    // eslint-disable-next-line no-new-func
    factories[argsLength] = Function('C,a', 'return new C(' + list.join(',') + ')');
  } return factories[argsLength](C, args);
};

// `Function.prototype.bind` method implementation
// https://tc39.github.io/ecma262/#sec-function.prototype.bind
module.exports = Function.bind || function bind(that /* , ...args */) {
  var fn = aFunction(this);
  var partArgs = slice.call(arguments, 1);
  var boundFunction = function bound(/* args... */) {
    var args = partArgs.concat(slice.call(arguments));
    return this instanceof boundFunction ? construct(fn, args.length, args) : fn.apply(that, args);
  };
  if (isObject(fn.prototype)) boundFunction.prototype = fn.prototype;
  return boundFunction;
};


/***/ }),
/* 333 */
/*!***********************************************************!*\
  !*** ./node_modules/core-js-pure/stable/instance/trim.js ***!
  \***********************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

module.exports = __webpack_require__(/*! ../../es/instance/trim */ 334);


/***/ }),
/* 334 */
/*!*******************************************************!*\
  !*** ./node_modules/core-js-pure/es/instance/trim.js ***!
  \*******************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

var trim = __webpack_require__(/*! ../string/virtual/trim */ 335);

var StringPrototype = String.prototype;

module.exports = function (it) {
  var own = it.trim;
  return typeof it === 'string' || it === StringPrototype
    || (it instanceof String && own === StringPrototype.trim) ? trim : own;
};


/***/ }),
/* 335 */
/*!*************************************************************!*\
  !*** ./node_modules/core-js-pure/es/string/virtual/trim.js ***!
  \*************************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

__webpack_require__(/*! ../../../modules/es.string.trim */ 336);
var entryVirtual = __webpack_require__(/*! ../../../internals/entry-virtual */ 54);

module.exports = entryVirtual('String').trim;


/***/ }),
/* 336 */
/*!*************************************************************!*\
  !*** ./node_modules/core-js-pure/modules/es.string.trim.js ***!
  \*************************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var $ = __webpack_require__(/*! ../internals/export */ 43);
var $trim = __webpack_require__(/*! ../internals/string-trim */ 337).trim;
var forcedStringTrimMethod = __webpack_require__(/*! ../internals/forced-string-trim-method */ 338);

// `String.prototype.trim` method
// https://tc39.github.io/ecma262/#sec-string.prototype.trim
$({ target: 'String', proto: true, forced: forcedStringTrimMethod('trim') }, {
  trim: function trim() {
    return $trim(this);
  }
});


/***/ }),
/* 337 */
/*!************************************************************!*\
  !*** ./node_modules/core-js-pure/internals/string-trim.js ***!
  \************************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

var requireObjectCoercible = __webpack_require__(/*! ../internals/require-object-coercible */ 199);
var whitespaces = __webpack_require__(/*! ../internals/whitespaces */ 251);

var whitespace = '[' + whitespaces + ']';
var ltrim = RegExp('^' + whitespace + whitespace + '*');
var rtrim = RegExp(whitespace + whitespace + '*$');

// `String.prototype.{ trim, trimStart, trimEnd, trimLeft, trimRight }` methods implementation
var createMethod = function (TYPE) {
  return function ($this) {
    var string = String(requireObjectCoercible($this));
    if (TYPE & 1) string = string.replace(ltrim, '');
    if (TYPE & 2) string = string.replace(rtrim, '');
    return string;
  };
};

module.exports = {
  // `String.prototype.{ trimLeft, trimStart }` methods
  // https://tc39.github.io/ecma262/#sec-string.prototype.trimstart
  start: createMethod(1),
  // `String.prototype.{ trimRight, trimEnd }` methods
  // https://tc39.github.io/ecma262/#sec-string.prototype.trimend
  end: createMethod(2),
  // `String.prototype.trim` method
  // https://tc39.github.io/ecma262/#sec-string.prototype.trim
  trim: createMethod(3)
};


/***/ }),
/* 338 */
/*!**************************************************************************!*\
  !*** ./node_modules/core-js-pure/internals/forced-string-trim-method.js ***!
  \**************************************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

var fails = __webpack_require__(/*! ../internals/fails */ 57);
var whitespaces = __webpack_require__(/*! ../internals/whitespaces */ 251);

var non = '\u200B\u0085\u180E';

// check that a method works with the correct list
// of whitespaces and has a correct name
module.exports = function (METHOD_NAME) {
  return fails(function () {
    return !!whitespaces[METHOD_NAME]() || non[METHOD_NAME]() != non || whitespaces[METHOD_NAME].name !== METHOD_NAME;
  });
};


/***/ }),
/* 339 */
/*!**********************************************************!*\
  !*** ./node_modules/core-js/modules/es.array.reverse.js ***!
  \**********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var $ = __webpack_require__(/*! ../internals/export */ 48);
var isArray = __webpack_require__(/*! ../internals/is-array */ 252);

var nativeReverse = [].reverse;
var test = [1, 2];

// `Array.prototype.reverse` method
// https://tc39.github.io/ecma262/#sec-array.prototype.reverse
// fix for Safari 12.0 bug
// https://bugs.webkit.org/show_bug.cgi?id=188794
$({ target: 'Array', proto: true, forced: String(test) === String(test.reverse()) }, {
  reverse: function reverse() {
    // eslint-disable-next-line no-self-assign
    if (isArray(this)) this.length = this.length;
    return nativeReverse.call(this);
  }
});


/***/ }),
/* 340 */
/*!**********************************************************!*\
  !*** ./node_modules/core-js-pure/stable/instance/map.js ***!
  \**********************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

module.exports = __webpack_require__(/*! ../../es/instance/map */ 341);


/***/ }),
/* 341 */
/*!******************************************************!*\
  !*** ./node_modules/core-js-pure/es/instance/map.js ***!
  \******************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

var map = __webpack_require__(/*! ../array/virtual/map */ 342);

var ArrayPrototype = Array.prototype;

module.exports = function (it) {
  var own = it.map;
  return it === ArrayPrototype || (it instanceof Array && own === ArrayPrototype.map) ? map : own;
};


/***/ }),
/* 342 */
/*!***********************************************************!*\
  !*** ./node_modules/core-js-pure/es/array/virtual/map.js ***!
  \***********************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

__webpack_require__(/*! ../../../modules/es.array.map */ 343);
var entryVirtual = __webpack_require__(/*! ../../../internals/entry-virtual */ 54);

module.exports = entryVirtual('Array').map;


/***/ }),
/* 343 */
/*!***********************************************************!*\
  !*** ./node_modules/core-js-pure/modules/es.array.map.js ***!
  \***********************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var $ = __webpack_require__(/*! ../internals/export */ 43);
var $map = __webpack_require__(/*! ../internals/array-iteration */ 158).map;
var arrayMethodHasSpeciesSupport = __webpack_require__(/*! ../internals/array-method-has-species-support */ 157);

// `Array.prototype.map` method
// https://tc39.github.io/ecma262/#sec-array.prototype.map
// with adding support of @@species
$({ target: 'Array', proto: true, forced: !arrayMethodHasSpeciesSupport('map') }, {
  map: function map(callbackfn /* , thisArg */) {
    return $map(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  }
});


/***/ }),
/* 344 */
/*!**********************************************************************!*\
  !*** ./node_modules/core-js-pure/features/object/define-property.js ***!
  \**********************************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

module.exports = __webpack_require__(/*! ../../es/object/define-property */ 345);


/***/ }),
/* 345 */
/*!****************************************************************!*\
  !*** ./node_modules/core-js-pure/es/object/define-property.js ***!
  \****************************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

__webpack_require__(/*! ../../modules/es.object.define-property */ 346);
var path = __webpack_require__(/*! ../../internals/path */ 96);

var Object = path.Object;

var defineProperty = module.exports = function defineProperty(it, key, desc) {
  return Object.defineProperty(it, key, desc);
};

if (Object.defineProperty.sham) defineProperty.sham = true;


/***/ }),
/* 346 */
/*!************************************************************************!*\
  !*** ./node_modules/core-js-pure/modules/es.object.define-property.js ***!
  \************************************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

var $ = __webpack_require__(/*! ../internals/export */ 43);
var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ 82);
var objectDefinePropertyModile = __webpack_require__(/*! ../internals/object-define-property */ 136);

// `Object.defineProperty` method
// https://tc39.github.io/ecma262/#sec-object.defineproperty
$({ target: 'Object', stat: true, forced: !DESCRIPTORS, sham: !DESCRIPTORS }, {
  defineProperty: objectDefinePropertyModile.f
});


/***/ }),
/* 347 */
/*!***********************************************************!*\
  !*** ./node_modules/core-js/internals/array-iteration.js ***!
  \***********************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

var bind = __webpack_require__(/*! ../internals/function-bind-context */ 103);
var IndexedObject = __webpack_require__(/*! ../internals/indexed-object */ 118);
var toObject = __webpack_require__(/*! ../internals/to-object */ 119);
var toLength = __webpack_require__(/*! ../internals/to-length */ 72);
var arraySpeciesCreate = __webpack_require__(/*! ../internals/array-species-create */ 348);

var push = [].push;

// `Array.prototype.{ forEach, map, filter, some, every, find, findIndex }` methods implementation
var createMethod = function (TYPE) {
  var IS_MAP = TYPE == 1;
  var IS_FILTER = TYPE == 2;
  var IS_SOME = TYPE == 3;
  var IS_EVERY = TYPE == 4;
  var IS_FIND_INDEX = TYPE == 6;
  var NO_HOLES = TYPE == 5 || IS_FIND_INDEX;
  return function ($this, callbackfn, that, specificCreate) {
    var O = toObject($this);
    var self = IndexedObject(O);
    var boundFunction = bind(callbackfn, that, 3);
    var length = toLength(self.length);
    var index = 0;
    var create = specificCreate || arraySpeciesCreate;
    var target = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined;
    var value, result;
    for (;length > index; index++) if (NO_HOLES || index in self) {
      value = self[index];
      result = boundFunction(value, index, O);
      if (TYPE) {
        if (IS_MAP) target[index] = result; // map
        else if (result) switch (TYPE) {
          case 3: return true;              // some
          case 5: return value;             // find
          case 6: return index;             // findIndex
          case 2: push.call(target, value); // filter
        } else if (IS_EVERY) return false;  // every
      }
    }
    return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target;
  };
};

module.exports = {
  // `Array.prototype.forEach` method
  // https://tc39.github.io/ecma262/#sec-array.prototype.foreach
  forEach: createMethod(0),
  // `Array.prototype.map` method
  // https://tc39.github.io/ecma262/#sec-array.prototype.map
  map: createMethod(1),
  // `Array.prototype.filter` method
  // https://tc39.github.io/ecma262/#sec-array.prototype.filter
  filter: createMethod(2),
  // `Array.prototype.some` method
  // https://tc39.github.io/ecma262/#sec-array.prototype.some
  some: createMethod(3),
  // `Array.prototype.every` method
  // https://tc39.github.io/ecma262/#sec-array.prototype.every
  every: createMethod(4),
  // `Array.prototype.find` method
  // https://tc39.github.io/ecma262/#sec-array.prototype.find
  find: createMethod(5),
  // `Array.prototype.findIndex` method
  // https://tc39.github.io/ecma262/#sec-array.prototype.findIndex
  findIndex: createMethod(6)
};


/***/ }),
/* 348 */
/*!****************************************************************!*\
  !*** ./node_modules/core-js/internals/array-species-create.js ***!
  \****************************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

var isObject = __webpack_require__(/*! ../internals/is-object */ 44);
var isArray = __webpack_require__(/*! ../internals/is-array */ 252);
var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ 32);

var SPECIES = wellKnownSymbol('species');

// `ArraySpeciesCreate` abstract operation
// https://tc39.github.io/ecma262/#sec-arrayspeciescreate
module.exports = function (originalArray, length) {
  var C;
  if (isArray(originalArray)) {
    C = originalArray.constructor;
    // cross-realm fallback
    if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined;
    else if (isObject(C)) {
      C = C[SPECIES];
      if (C === null) C = undefined;
    }
  } return new (C === undefined ? Array : C)(length === 0 ? 0 : length);
};


/***/ }),
/* 349 */
/*!****************************************************************************!*\
  !*** ./node_modules/core-js/internals/array-method-has-species-support.js ***!
  \****************************************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

var fails = __webpack_require__(/*! ../internals/fails */ 36);
var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ 32);
var V8_VERSION = __webpack_require__(/*! ../internals/engine-v8-version */ 151);

var SPECIES = wellKnownSymbol('species');

module.exports = function (METHOD_NAME) {
  // We can't use this feature detection in V8 since it causes
  // deoptimization and serious performance degradation
  // https://github.com/zloirock/core-js/issues/677
  return V8_VERSION >= 51 || !fails(function () {
    var array = [];
    var constructor = array.constructor = {};
    constructor[SPECIES] = function () {
      return { foo: 1 };
    };
    return array[METHOD_NAME](Boolean).foo !== 1;
  });
};


/***/ }),
/* 350 */
/*!********************************************************************!*\
  !*** ./node_modules/core-js-pure/stable/array/virtual/for-each.js ***!
  \********************************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

module.exports = __webpack_require__(/*! ../../../es/array/virtual/for-each */ 351);


/***/ }),
/* 351 */
/*!****************************************************************!*\
  !*** ./node_modules/core-js-pure/es/array/virtual/for-each.js ***!
  \****************************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

__webpack_require__(/*! ../../../modules/es.array.for-each */ 352);
var entryVirtual = __webpack_require__(/*! ../../../internals/entry-virtual */ 54);

module.exports = entryVirtual('Array').forEach;


/***/ }),
/* 352 */
/*!****************************************************************!*\
  !*** ./node_modules/core-js-pure/modules/es.array.for-each.js ***!
  \****************************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var $ = __webpack_require__(/*! ../internals/export */ 43);
var forEach = __webpack_require__(/*! ../internals/array-for-each */ 353);

// `Array.prototype.forEach` method
// https://tc39.github.io/ecma262/#sec-array.prototype.foreach
$({ target: 'Array', proto: true, forced: [].forEach != forEach }, {
  forEach: forEach
});


/***/ }),
/* 353 */
/*!***************************************************************!*\
  !*** ./node_modules/core-js-pure/internals/array-for-each.js ***!
  \***************************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var $forEach = __webpack_require__(/*! ../internals/array-iteration */ 158).forEach;
var sloppyArrayMethod = __webpack_require__(/*! ../internals/sloppy-array-method */ 145);

// `Array.prototype.forEach` method implementation
// https://tc39.github.io/ecma262/#sec-array.prototype.foreach
module.exports = sloppyArrayMethod('forEach') ? function forEach(callbackfn /* , thisArg */) {
  return $forEach(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
} : [].forEach;


/***/ }),
/* 354 */
/*!******************************************************!*\
  !*** ./node_modules/core-js/internals/same-value.js ***!
  \******************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports) {

// `SameValue` abstract operation
// https://tc39.github.io/ecma262/#sec-samevalue
module.exports = Object.is || function is(x, y) {
  // eslint-disable-next-line no-self-compare
  return x === y ? x !== 0 || 1 / x === 1 / y : x != x && y != y;
};


/***/ }),
/* 355 */
/*!**************************************!*\
  !*** ./dev/Html/PreviewMessage.html ***!
  \**************************************/
/*! exports provided: default */
/*! all exports used */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("<html>\n<head>\n\t<meta charset=\"utf-8\" />\n\t<meta name=\"viewport\" content=\"user-scalable=no\" />\n\t<meta name=\"apple-mobile-web-app-capable\" content=\"yes\" />\n\t<meta name=\"robots\" content=\"noindex, nofollow, noodp\" />\n\t<title>{{title}}</title>\n\t<style>\nhtml, body {\n\tbackground-color: #fff;\n\tfont-size: 13px;\n\tfont-family: arial, sans-serif;\n\tmargin: 0;\n\tpadding: 0;\n}\n\na {color: blue; text-decoration: underline}\na:visited {color: #609}\na:active {color: red}\nblockquote {border-left: 2px solid black; margin: 0; padding: 0px 10px}\n\npre {\n\tmargin: 0px;\n\tpadding: 0px;\n\tfont-family: Monaco, Menlo, Consolas, 'Courier New', monospace;\n\tbackground: #fff;\n\tborder: none;\n\twhite-space: pre-wrap;\n\tword-wrap: break-word;\n\tword-break: break-all;\n}\n\n.body-wrp {\n\tpadding: 10px;\n}\n\n.body-wrp.html pre {\n\tfont-family: Monaco, Menlo, Consolas, 'Courier New', monospace;\n\twhite-space: pre-wrap;\n\tword-wrap: break-word;\n\tword-break: normal;\n}\n\n.body-wrp.plain {\n\tpadding: 15px;\n\twhite-space: pre-wrap;\n\tfont-family: Monaco, Menlo, Consolas, 'Courier New', monospace;\n}\n\n.body-wrp.plain pre {\n\tmargin: 0px;\n\tpadding: 0px;\n\tbackground: #fff;\n\tborder: none;\n\tfont-family: Monaco, Menlo, Consolas, 'Courier New', monospace;\n\twhite-space: pre-wrap;\n\tword-wrap: break-word;\n\tword-break: normal;\n}\n\n.body-wrp.plain blockquote {\n\tborder-left: 2px solid blue;\n\tcolor: blue;\n}\n\n.body-wrp.plain blockquote blockquote {\n\tborder-left: 2px solid green;\n\tcolor: green;\n}\n\n.body-wrp.plain blockquote blockquote blockquote {\n\tborder-left: 2px solid red;\n\tcolor: red;\n}\n.rl-preview-subject {\n\tfont-size: 16px;\n\tfont-weight: bold;\n\tpadding: 15px;\n}\n.rl-preview-creds-from, .rl-preview-creds-to, .rl-preview-creds-cc {\n\tfont-size: 12px;\n\tpadding: 5px 15px;\n}\n.rl-preview-date {\n\tfloat: right;\n\tfont-size: 12px;\n\tpadding: 10px 15px;\n}\n.rl-preview-section {\n\tpadding: 0;\n\tmargin: 0;\n\tborder-bottom: 1px solid #ccc;\n}\n.rl-preview-hide {\n\tdisplay: none;\n}\n\t</style>\n</head>\n<body>\n\t<div class=\"rl-preview-section\">\n\t\t<div class=\"rl-preview-subject\">{{subject}}</div>\n\t</div>\n\t<div class=\"rl-preview-section\">\n\t\t<div class=\"rl-preview-date\">{{date}}</div>\n\t\t<div class=\"rl-preview-creds-from\">{{fromCreds}}</div>\n\t\t<div class=\"rl-preview-creds-to\">{{toLabel}}: {{toCreds}}</div>\n\t\t<div class=\"rl-preview-creds-cc {{ccClass}}\">{{ccLabel}}: {{ccCreds}}</div>\n\t</div>\n\t<div class=\"body-wrp {{bodyClass}}\">{{html}}</div>\n</body>\n</html>");

/***/ }),
/* 356 */
/*!*************************************************************!*\
  !*** ./node_modules/core-js-pure/stable/instance/filter.js ***!
  \*************************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

module.exports = __webpack_require__(/*! ../../es/instance/filter */ 357);


/***/ }),
/* 357 */
/*!*********************************************************!*\
  !*** ./node_modules/core-js-pure/es/instance/filter.js ***!
  \*********************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

var filter = __webpack_require__(/*! ../array/virtual/filter */ 358);

var ArrayPrototype = Array.prototype;

module.exports = function (it) {
  var own = it.filter;
  return it === ArrayPrototype || (it instanceof Array && own === ArrayPrototype.filter) ? filter : own;
};


/***/ }),
/* 358 */
/*!**************************************************************!*\
  !*** ./node_modules/core-js-pure/es/array/virtual/filter.js ***!
  \**************************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

__webpack_require__(/*! ../../../modules/es.array.filter */ 359);
var entryVirtual = __webpack_require__(/*! ../../../internals/entry-virtual */ 54);

module.exports = entryVirtual('Array').filter;


/***/ }),
/* 359 */
/*!**************************************************************!*\
  !*** ./node_modules/core-js-pure/modules/es.array.filter.js ***!
  \**************************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var $ = __webpack_require__(/*! ../internals/export */ 43);
var $filter = __webpack_require__(/*! ../internals/array-iteration */ 158).filter;
var arrayMethodHasSpeciesSupport = __webpack_require__(/*! ../internals/array-method-has-species-support */ 157);

// `Array.prototype.filter` method
// https://tc39.github.io/ecma262/#sec-array.prototype.filter
// with adding support of @@species
$({ target: 'Array', proto: true, forced: !arrayMethodHasSpeciesSupport('filter') }, {
  filter: function filter(callbackfn /* , thisArg */) {
    return $filter(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  }
});


/***/ }),
/* 360 */
/*!*************************************************************!*\
  !*** ./node_modules/core-js-pure/features/object/create.js ***!
  \*************************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

module.exports = __webpack_require__(/*! ../../es/object/create */ 361);


/***/ }),
/* 361 */
/*!*******************************************************!*\
  !*** ./node_modules/core-js-pure/es/object/create.js ***!
  \*******************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

__webpack_require__(/*! ../../modules/es.object.create */ 362);
var path = __webpack_require__(/*! ../../internals/path */ 96);

var Object = path.Object;

module.exports = function create(P, D) {
  return Object.create(P, D);
};


/***/ }),
/* 362 */
/*!***************************************************************!*\
  !*** ./node_modules/core-js-pure/modules/es.object.create.js ***!
  \***************************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

var $ = __webpack_require__(/*! ../internals/export */ 43);
var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ 82);
var create = __webpack_require__(/*! ../internals/object-create */ 243);

// `Object.create` method
// https://tc39.github.io/ecma262/#sec-object.create
$({ target: 'Object', stat: true, sham: !DESCRIPTORS }, {
  create: create
});


/***/ }),
/* 363 */
/*!********************************************************************************!*\
  !*** ./node_modules/core-js-pure/stable/object/get-own-property-descriptor.js ***!
  \********************************************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

module.exports = __webpack_require__(/*! ../../es/object/get-own-property-descriptor */ 364);


/***/ }),
/* 364 */
/*!****************************************************************************!*\
  !*** ./node_modules/core-js-pure/es/object/get-own-property-descriptor.js ***!
  \****************************************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

__webpack_require__(/*! ../../modules/es.object.get-own-property-descriptor */ 365);
var path = __webpack_require__(/*! ../../internals/path */ 96);

var Object = path.Object;

var getOwnPropertyDescriptor = module.exports = function getOwnPropertyDescriptor(it, key) {
  return Object.getOwnPropertyDescriptor(it, key);
};

if (Object.getOwnPropertyDescriptor.sham) getOwnPropertyDescriptor.sham = true;


/***/ }),
/* 365 */
/*!************************************************************************************!*\
  !*** ./node_modules/core-js-pure/modules/es.object.get-own-property-descriptor.js ***!
  \************************************************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

var $ = __webpack_require__(/*! ../internals/export */ 43);
var fails = __webpack_require__(/*! ../internals/fails */ 57);
var toIndexedObject = __webpack_require__(/*! ../internals/to-indexed-object */ 94);
var nativeGetOwnPropertyDescriptor = __webpack_require__(/*! ../internals/object-get-own-property-descriptor */ 235).f;
var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ 82);

var FAILS_ON_PRIMITIVES = fails(function () { nativeGetOwnPropertyDescriptor(1); });
var FORCED = !DESCRIPTORS || FAILS_ON_PRIMITIVES;

// `Object.getOwnPropertyDescriptor` method
// https://tc39.github.io/ecma262/#sec-object.getownpropertydescriptor
$({ target: 'Object', stat: true, forced: FORCED, sham: !DESCRIPTORS }, {
  getOwnPropertyDescriptor: function getOwnPropertyDescriptor(it, key) {
    return nativeGetOwnPropertyDescriptor(toIndexedObject(it), key);
  }
});


/***/ }),
/* 366 */
/*!**************************************************************!*\
  !*** ./node_modules/core-js-pure/features/instance/slice.js ***!
  \**************************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

module.exports = __webpack_require__(/*! ../../es/instance/slice */ 367);


/***/ }),
/* 367 */
/*!********************************************************!*\
  !*** ./node_modules/core-js-pure/es/instance/slice.js ***!
  \********************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

var slice = __webpack_require__(/*! ../array/virtual/slice */ 368);

var ArrayPrototype = Array.prototype;

module.exports = function (it) {
  var own = it.slice;
  return it === ArrayPrototype || (it instanceof Array && own === ArrayPrototype.slice) ? slice : own;
};


/***/ }),
/* 368 */
/*!*************************************************************!*\
  !*** ./node_modules/core-js-pure/es/array/virtual/slice.js ***!
  \*************************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

__webpack_require__(/*! ../../../modules/es.array.slice */ 369);
var entryVirtual = __webpack_require__(/*! ../../../internals/entry-virtual */ 54);

module.exports = entryVirtual('Array').slice;


/***/ }),
/* 369 */
/*!*************************************************************!*\
  !*** ./node_modules/core-js-pure/modules/es.array.slice.js ***!
  \*************************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var $ = __webpack_require__(/*! ../internals/export */ 43);
var isObject = __webpack_require__(/*! ../internals/is-object */ 76);
var isArray = __webpack_require__(/*! ../internals/is-array */ 156);
var toAbsoluteIndex = __webpack_require__(/*! ../internals/to-absolute-index */ 246);
var toLength = __webpack_require__(/*! ../internals/to-length */ 112);
var toIndexedObject = __webpack_require__(/*! ../internals/to-indexed-object */ 94);
var createProperty = __webpack_require__(/*! ../internals/create-property */ 249);
var arrayMethodHasSpeciesSupport = __webpack_require__(/*! ../internals/array-method-has-species-support */ 157);
var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ 68);

var SPECIES = wellKnownSymbol('species');
var nativeSlice = [].slice;
var max = Math.max;

// `Array.prototype.slice` method
// https://tc39.github.io/ecma262/#sec-array.prototype.slice
// fallback for not array-like ES3 strings and DOM objects
$({ target: 'Array', proto: true, forced: !arrayMethodHasSpeciesSupport('slice') }, {
  slice: function slice(start, end) {
    var O = toIndexedObject(this);
    var length = toLength(O.length);
    var k = toAbsoluteIndex(start, length);
    var fin = toAbsoluteIndex(end === undefined ? length : end, length);
    // inline `ArraySpeciesCreate` for usage native `Array#slice` where it's possible
    var Constructor, result, n;
    if (isArray(O)) {
      Constructor = O.constructor;
      // cross-realm fallback
      if (typeof Constructor == 'function' && (Constructor === Array || isArray(Constructor.prototype))) {
        Constructor = undefined;
      } else if (isObject(Constructor)) {
        Constructor = Constructor[SPECIES];
        if (Constructor === null) Constructor = undefined;
      }
      if (Constructor === Array || Constructor === undefined) {
        return nativeSlice.call(O, k, fin);
      }
    }
    result = new (Constructor === undefined ? Array : Constructor)(max(fin - k, 0));
    for (n = 0; k < fin; k++, n++) if (k in O) createProperty(result, n, O[k]);
    result.length = n;
    return result;
  }
});


/***/ }),
/* 370 */
/*!****************************************************************!*\
  !*** ./node_modules/core-js-pure/features/instance/reverse.js ***!
  \****************************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

module.exports = __webpack_require__(/*! ../../es/instance/reverse */ 371);


/***/ }),
/* 371 */
/*!**********************************************************!*\
  !*** ./node_modules/core-js-pure/es/instance/reverse.js ***!
  \**********************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

var reverse = __webpack_require__(/*! ../array/virtual/reverse */ 372);

var ArrayPrototype = Array.prototype;

module.exports = function (it) {
  var own = it.reverse;
  return it === ArrayPrototype || (it instanceof Array && own === ArrayPrototype.reverse) ? reverse : own;
};


/***/ }),
/* 372 */
/*!***************************************************************!*\
  !*** ./node_modules/core-js-pure/es/array/virtual/reverse.js ***!
  \***************************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

__webpack_require__(/*! ../../../modules/es.array.reverse */ 373);
var entryVirtual = __webpack_require__(/*! ../../../internals/entry-virtual */ 54);

module.exports = entryVirtual('Array').reverse;


/***/ }),
/* 373 */
/*!***************************************************************!*\
  !*** ./node_modules/core-js-pure/modules/es.array.reverse.js ***!
  \***************************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var $ = __webpack_require__(/*! ../internals/export */ 43);
var isArray = __webpack_require__(/*! ../internals/is-array */ 156);

var nativeReverse = [].reverse;
var test = [1, 2];

// `Array.prototype.reverse` method
// https://tc39.github.io/ecma262/#sec-array.prototype.reverse
// fix for Safari 12.0 bug
// https://bugs.webkit.org/show_bug.cgi?id=188794
$({ target: 'Array', proto: true, forced: String(test) === String(test.reverse()) }, {
  reverse: function reverse() {
    if (isArray(this)) this.length = this.length;
    return nativeReverse.call(this);
  }
});


/***/ }),
/* 374 */
/*!***************************************************************!*\
  !*** ./node_modules/core-js-pure/features/instance/reduce.js ***!
  \***************************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

module.exports = __webpack_require__(/*! ../../es/instance/reduce */ 234);


/***/ }),
/* 375 */
/*!***********************************************************!*\
  !*** ./node_modules/core-js-pure/features/object/keys.js ***!
  \***********************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

module.exports = __webpack_require__(/*! ../../es/object/keys */ 376);


/***/ }),
/* 376 */
/*!*****************************************************!*\
  !*** ./node_modules/core-js-pure/es/object/keys.js ***!
  \*****************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

__webpack_require__(/*! ../../modules/es.object.keys */ 377);
var path = __webpack_require__(/*! ../../internals/path */ 96);

module.exports = path.Object.keys;


/***/ }),
/* 377 */
/*!*************************************************************!*\
  !*** ./node_modules/core-js-pure/modules/es.object.keys.js ***!
  \*************************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

var $ = __webpack_require__(/*! ../internals/export */ 43);
var toObject = __webpack_require__(/*! ../internals/to-object */ 121);
var nativeKeys = __webpack_require__(/*! ../internals/object-keys */ 244);
var fails = __webpack_require__(/*! ../internals/fails */ 57);

var FAILS_ON_PRIMITIVES = fails(function () { nativeKeys(1); });

// `Object.keys` method
// https://tc39.github.io/ecma262/#sec-object.keys
$({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES }, {
  keys: function keys(it) {
    return nativeKeys(toObject(it));
  }
});


/***/ }),
/* 378 */
/*!*****************************************************************!*\
  !*** ./node_modules/core-js-pure/features/instance/for-each.js ***!
  \*****************************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

module.exports = __webpack_require__(/*! ../../stable/instance/for-each */ 253);


/***/ }),
/* 379 */
/*!***********************************!*\
  !*** ./dev/View/Popup/Account.js ***!
  \***********************************/
/*! exports provided: AccountPopupView, default */
/*! all exports used */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AccountPopupView", function() { return AccountPopupView; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return AccountPopupView; });
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor */ 19);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _babel_runtime_corejs3_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/esm/inheritsLoose */ 10);
/* harmony import */ var _babel_runtime_corejs3_helpers_esm_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/esm/applyDecoratedDescriptor */ 20);
/* harmony import */ var ko__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ko */ 1);
/* harmony import */ var Common_Enums__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! Common/Enums */ 0);
/* harmony import */ var Common_Utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! Common/Utils */ 2);
/* harmony import */ var Common_Translator__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! Common/Translator */ 9);
/* harmony import */ var Remote_User_Ajax__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! Remote/User/Ajax */ 16);
/* harmony import */ var Helper_Apps_User__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! Helper/Apps/User */ 22);
/* harmony import */ var Knoin_Knoin__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! Knoin/Knoin */ 7);
/* harmony import */ var Knoin_AbstractViewNext__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! Knoin/AbstractViewNext */ 28);




var _dec, _dec2, _class, _class2;









var AccountPopupView = (_dec = Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_9__["popup"])({
  name: 'View/Popup/Account',
  templateID: 'PopupsAccount'
}), _dec2 = Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_9__["command"])(function (self) {
  return !self.submitRequest();
}), _dec(_class = (_class2 =
/*#__PURE__*/
function (_AbstractViewNext) {
  Object(_babel_runtime_corejs3_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(AccountPopupView, _AbstractViewNext);

  function AccountPopupView() {
    var _this;

    _this = _AbstractViewNext.call(this) || this;
    _this.isNew = ko__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"].observable(true);
    _this.email = ko__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"].observable('');
    _this.password = ko__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"].observable('');
    _this.emailError = ko__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"].observable(false);
    _this.passwordError = ko__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"].observable(false);

    _this.email.subscribe(function () {
      _this.emailError(false);
    });

    _this.password.subscribe(function () {
      _this.passwordError(false);
    });

    _this.submitRequest = ko__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"].observable(false);
    _this.submitError = ko__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"].observable('');
    _this.submitErrorAdditional = ko__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"].observable('');
    _this.emailFocus = ko__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"].observable(false);
    return _this;
  }

  var _proto = AccountPopupView.prototype;

  _proto.addAccountCommand = function addAccountCommand() {
    var _this2 = this;

    this.emailError('' === Object(Common_Utils__WEBPACK_IMPORTED_MODULE_5__["trim"])(this.email()));
    this.passwordError('' === Object(Common_Utils__WEBPACK_IMPORTED_MODULE_5__["trim"])(this.password()));

    if (this.emailError() || this.passwordError()) {
      return false;
    }

    this.submitRequest(true);
    Remote_User_Ajax__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"].accountSetup(function (result, data) {
      _this2.submitRequest(false);

      if (Common_Enums__WEBPACK_IMPORTED_MODULE_4__["StorageResultType"].Success === result && data) {
        if (data.Result) {
          Object(Helper_Apps_User__WEBPACK_IMPORTED_MODULE_8__[/* getApp */ "a"])().accountsAndIdentities();

          _this2.cancelCommand();
        } else {
          _this2.submitError(data.ErrorCode ? Object(Common_Translator__WEBPACK_IMPORTED_MODULE_6__["getNotification"])(data.ErrorCode) : Object(Common_Translator__WEBPACK_IMPORTED_MODULE_6__["getNotification"])(Common_Enums__WEBPACK_IMPORTED_MODULE_4__["Notification"].UnknownError));

          if (data.ErrorMessageAdditional) {
            _this2.submitErrorAdditional(data.ErrorMessageAdditional);
          }
        }
      } else {
        _this2.submitError(Object(Common_Translator__WEBPACK_IMPORTED_MODULE_6__["getNotification"])(Common_Enums__WEBPACK_IMPORTED_MODULE_4__["Notification"].UnknownError));

        _this2.submitErrorAdditional('');
      }
    }, this.email(), this.password(), this.isNew());
    return true;
  };

  _proto.clearPopup = function clearPopup() {
    this.isNew(true);
    this.email('');
    this.password('');
    this.emailError(false);
    this.passwordError(false);
    this.submitRequest(false);
    this.submitError('');
    this.submitErrorAdditional('');
  };

  _proto.onShow = function onShow(account) {
    this.clearPopup();

    if (account && account.canBeEdit()) {
      this.isNew(false);
      this.email(account.email);
    }
  };

  _proto.onShowWithDelay = function onShowWithDelay() {
    this.emailFocus(true);
  };

  return AccountPopupView;
}(Knoin_AbstractViewNext__WEBPACK_IMPORTED_MODULE_10__[/* AbstractViewNext */ "a"]), (Object(_babel_runtime_corejs3_helpers_esm_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(_class2.prototype, "addAccountCommand", [_dec2], _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_0___default()(_class2.prototype, "addAccountCommand"), _class2.prototype)), _class2)) || _class);


/***/ }),
/* 380 */
/*!************************************!*\
  !*** ./dev/View/Popup/Identity.js ***!
  \************************************/
/*! exports provided: IdentityPopupView, default */
/*! all exports used */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "IdentityPopupView", function() { return IdentityPopupView; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return IdentityPopupView; });
/* harmony import */ var core_js_modules_es_function_name__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.function.name */ 51);
/* harmony import */ var core_js_modules_es_function_name__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_function_name__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor */ 19);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _babel_runtime_corejs3_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/esm/inheritsLoose */ 10);
/* harmony import */ var _babel_runtime_corejs3_helpers_esm_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/esm/applyDecoratedDescriptor */ 20);
/* harmony import */ var ko__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ko */ 1);
/* harmony import */ var Common_Enums__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! Common/Enums */ 0);
/* harmony import */ var Common_Globals__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! Common/Globals */ 6);
/* harmony import */ var Common_Utils__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! Common/Utils */ 2);
/* harmony import */ var Common_Translator__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! Common/Translator */ 9);
/* harmony import */ var Remote_User_Ajax__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! Remote/User/Ajax */ 16);
/* harmony import */ var Helper_Apps_User__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! Helper/Apps/User */ 22);
/* harmony import */ var Knoin_Knoin__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! Knoin/Knoin */ 7);
/* harmony import */ var Knoin_AbstractViewNext__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! Knoin/AbstractViewNext */ 28);





var _dec, _dec2, _class, _class2;










var IdentityPopupView = (_dec = Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_11__["popup"])({
  name: 'View/Popup/Identity',
  templateID: 'PopupsIdentity'
}), _dec2 = Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_11__["command"])(function (self) {
  return !self.submitRequest();
}), _dec(_class = (_class2 =
/*#__PURE__*/
function (_AbstractViewNext) {
  Object(_babel_runtime_corejs3_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(IdentityPopupView, _AbstractViewNext);

  function IdentityPopupView() {
    var _this;

    _this = _AbstractViewNext.call(this) || this;
    _this.id = '';
    _this.edit = ko__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"].observable(false);
    _this.owner = ko__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"].observable(false);
    _this.email = ko__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"].observable('').validateEmail();
    _this.email.focused = ko__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"].observable(false);
    _this.name = ko__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"].observable('');
    _this.name.focused = ko__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"].observable(false);
    _this.replyTo = ko__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"].observable('').validateSimpleEmail();
    _this.replyTo.focused = ko__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"].observable(false);
    _this.bcc = ko__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"].observable('').validateSimpleEmail();
    _this.bcc.focused = ko__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"].observable(false);
    _this.signature = ko__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"].observable('');
    _this.signatureInsertBefore = ko__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"].observable(false);
    _this.showBcc = ko__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"].observable(false);
    _this.showReplyTo = ko__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"].observable(false);
    _this.submitRequest = ko__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"].observable(false);
    _this.submitError = ko__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"].observable('');

    _this.bcc.subscribe(function (value) {
      if (false === _this.showBcc() && 0 < value.length) {
        _this.showBcc(true);
      }
    });

    _this.replyTo.subscribe(function (value) {
      if (false === _this.showReplyTo() && 0 < value.length) {
        _this.showReplyTo(true);
      }
    });

    return _this;
  }

  var _proto = IdentityPopupView.prototype;

  _proto.addOrEditIdentityCommand = function addOrEditIdentityCommand() {
    var _this2 = this;

    if (this.signature && this.signature.__fetchEditorValue) {
      this.signature.__fetchEditorValue();
    }

    if (!this.email.hasError()) {
      this.email.hasError('' === Object(Common_Utils__WEBPACK_IMPORTED_MODULE_7__["trim"])(this.email()));
    }

    if (this.email.hasError()) {
      if (!this.owner()) {
        this.email.focused(true);
      }

      return false;
    }

    if (this.replyTo.hasError()) {
      this.replyTo.focused(true);
      return false;
    }

    if (this.bcc.hasError()) {
      this.bcc.focused(true);
      return false;
    }

    this.submitRequest(true);
    Remote_User_Ajax__WEBPACK_IMPORTED_MODULE_9__[/* default */ "a"].identityUpdate(function (result, data) {
      _this2.submitRequest(false);

      if (Common_Enums__WEBPACK_IMPORTED_MODULE_5__["StorageResultType"].Success === result && data) {
        if (data.Result) {
          Object(Helper_Apps_User__WEBPACK_IMPORTED_MODULE_10__[/* getApp */ "a"])().accountsAndIdentities();

          _this2.cancelCommand();
        } else if (data.ErrorCode) {
          _this2.submitError(Object(Common_Translator__WEBPACK_IMPORTED_MODULE_8__["getNotification"])(data.ErrorCode));
        }
      } else {
        _this2.submitError(Object(Common_Translator__WEBPACK_IMPORTED_MODULE_8__["getNotification"])(Common_Enums__WEBPACK_IMPORTED_MODULE_5__["Notification"].UnknownError));
      }
    }, this.id, this.email(), this.name(), this.replyTo(), this.bcc(), this.signature(), this.signatureInsertBefore());
    return true;
  };

  _proto.clearPopup = function clearPopup() {
    this.id = '';
    this.edit(false);
    this.owner(false);
    this.name('');
    this.email('');
    this.replyTo('');
    this.bcc('');
    this.signature('');
    this.signatureInsertBefore(false);
    this.email.hasError(false);
    this.replyTo.hasError(false);
    this.bcc.hasError(false);
    this.showBcc(false);
    this.showReplyTo(false);
    this.submitRequest(false);
    this.submitError('');
  }
  /**
   * @param {?IdentityModel} oIdentity
   */
  ;

  _proto.onShow = function onShow(identity) {
    this.clearPopup();

    if (identity) {
      this.edit(true);
      this.id = identity.id() || '';
      this.name(identity.name());
      this.email(identity.email());
      this.replyTo(identity.replyTo());
      this.bcc(identity.bcc());
      this.signature(identity.signature());
      this.signatureInsertBefore(identity.signatureInsertBefore());
      this.owner('' === this.id);
    } else {
      this.id = Object(Common_Utils__WEBPACK_IMPORTED_MODULE_7__["fakeMd5"])();
    }
  };

  _proto.onShowWithDelay = function onShowWithDelay() {
    if (!this.owner() && !Common_Globals__WEBPACK_IMPORTED_MODULE_6__["bMobileDevice"]) {
      this.email.focused(true);
    }
  };

  _proto.onHideWithDelay = function onHideWithDelay() {
    this.clearPopup();
  };

  return IdentityPopupView;
}(Knoin_AbstractViewNext__WEBPACK_IMPORTED_MODULE_12__[/* AbstractViewNext */ "a"]), (Object(_babel_runtime_corejs3_helpers_esm_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(_class2.prototype, "addOrEditIdentityCommand", [_dec2], _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class2.prototype, "addOrEditIdentityCommand"), _class2.prototype)), _class2)) || _class);


/***/ }),
/* 381 */
/*!**************************************!*\
  !*** ./dev/Component/SaveTrigger.js ***!
  \**************************************/
/*! exports provided: default */
/*! all exports used */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/find */ 12);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _babel_runtime_corejs3_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/esm/assertThisInitialized */ 33);
/* harmony import */ var _babel_runtime_corejs3_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/esm/inheritsLoose */ 10);
/* harmony import */ var Common_Utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! Common/Utils */ 2);
/* harmony import */ var Common_Enums__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! Common/Enums */ 0);
/* harmony import */ var Component_Abstract__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! Component/Abstract */ 35);







var SaveTriggerComponent =
/*#__PURE__*/
function (_AbstractComponent) {
  Object(_babel_runtime_corejs3_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(SaveTriggerComponent, _AbstractComponent);

  /**
   * @param {Object} params
   */
  function SaveTriggerComponent(params) {
    var _this;

    _this = _AbstractComponent.call(this) || this;
    _this.element = params.element || null;
    _this.value = params.value && params.value.subscribe ? params.value : null;

    if (_this.element) {
      if (_this.value) {
        _this.element.css('display', 'inline-block');

        if (params.verticalAlign) {
          _this.element.css('vertical-align', params.verticalAlign);
        }

        _this.setState(_this.value());

        _this.disposable.push(_this.value.subscribe(_this.setState, Object(_babel_runtime_corejs3_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_this)));
      } else {
        _this.element.hide();
      }
    }

    return _this;
  }

  var _proto = SaveTriggerComponent.prototype;

  _proto.setState = function setState(value) {
    var _context, _context2, _context3, _context4, _context5, _context6, _context7, _context8;

    switch (Object(Common_Utils__WEBPACK_IMPORTED_MODULE_3__["pInt"])(value)) {
      case Common_Enums__WEBPACK_IMPORTED_MODULE_4__["SaveSettingsStep"].TrueResult:
        _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_0___default()(_context = _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_0___default()(_context2 = this.element).call(_context2, '.animated,.error').hide().removeClass('visible').end()).call(_context, '.success').show().addClass('visible');

        break;

      case Common_Enums__WEBPACK_IMPORTED_MODULE_4__["SaveSettingsStep"].FalseResult:
        _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_0___default()(_context3 = _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_0___default()(_context4 = this.element).call(_context4, '.animated,.success').hide().removeClass('visible').end()).call(_context3, '.error').show().addClass('visible');

        break;

      case Common_Enums__WEBPACK_IMPORTED_MODULE_4__["SaveSettingsStep"].Animate:
        _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_0___default()(_context5 = _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_0___default()(_context6 = this.element).call(_context6, '.error,.success').hide().removeClass('visible').end()).call(_context5, '.animated').show().addClass('visible');

        break;

      case Common_Enums__WEBPACK_IMPORTED_MODULE_4__["SaveSettingsStep"].Idle:
      default:
        _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_0___default()(_context7 = _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_0___default()(_context8 = this.element).call(_context8, '.animated').hide().end()).call(_context7, '.error,.success').removeClass('visible');

        break;
    }
  };

  return SaveTriggerComponent;
}(Component_Abstract__WEBPACK_IMPORTED_MODULE_5__[/* AbstractComponent */ "a"]);

/* harmony default export */ __webpack_exports__["default"] = (Object(Component_Abstract__WEBPACK_IMPORTED_MODULE_5__[/* componentExportHelper */ "b"])(SaveTriggerComponent, 'SaveTriggerComponent'));

/***/ }),
/* 382 */
/*!********************************!*\
  !*** ./dev/Component/Input.js ***!
  \********************************/
/*! exports provided: default */
/*! all exports used */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _babel_runtime_corejs3_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/esm/inheritsLoose */ 10);
/* harmony import */ var Component_Abstract__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! Component/Abstract */ 35);
/* harmony import */ var Component_AbstractInput__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! Component/AbstractInput */ 84);




var InputComponent =
/*#__PURE__*/
function (_AbstractInput) {
  Object(_babel_runtime_corejs3_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(InputComponent, _AbstractInput);

  function InputComponent() {
    return _AbstractInput.apply(this, arguments) || this;
  }

  return InputComponent;
}(Component_AbstractInput__WEBPACK_IMPORTED_MODULE_2__[/* AbstractInput */ "a"]);

/* harmony default export */ __webpack_exports__["default"] = (Object(Component_Abstract__WEBPACK_IMPORTED_MODULE_1__[/* componentExportHelper */ "b"])(InputComponent, 'InputComponent'));

/***/ }),
/* 383 */
/*!*********************************!*\
  !*** ./dev/Component/Select.js ***!
  \*********************************/
/*! exports provided: default */
/*! all exports used */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _babel_runtime_corejs3_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/esm/inheritsLoose */ 10);
/* harmony import */ var Common_Translator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! Common/Translator */ 9);
/* harmony import */ var Common_Utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! Common/Utils */ 2);
/* harmony import */ var Component_Abstract__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! Component/Abstract */ 35);
/* harmony import */ var Component_AbstractInput__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! Component/AbstractInput */ 84);






var SelectComponent =
/*#__PURE__*/
function (_AbstractInput) {
  Object(_babel_runtime_corejs3_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(SelectComponent, _AbstractInput);

  /**
   * @param {Object} params
   */
  function SelectComponent(params) {
    var _this;

    _this = _AbstractInput.call(this, params) || this;
    _this.options = params.options || '';
    _this.optionsText = params.optionsText || null;
    _this.optionsValue = params.optionsValue || null;
    _this.optionsCaption = params.optionsCaption || null;

    if (_this.optionsCaption) {
      _this.optionsCaption = Object(Common_Translator__WEBPACK_IMPORTED_MODULE_1__["i18n"])(_this.optionsCaption);
    }

    _this.defautOptionsAfterRender = Common_Utils__WEBPACK_IMPORTED_MODULE_2__["defautOptionsAfterRender"];
    return _this;
  }

  return SelectComponent;
}(Component_AbstractInput__WEBPACK_IMPORTED_MODULE_4__[/* AbstractInput */ "a"]);

/* harmony default export */ __webpack_exports__["default"] = (Object(Component_Abstract__WEBPACK_IMPORTED_MODULE_3__[/* componentExportHelper */ "b"])(SelectComponent, 'SelectComponent'));

/***/ }),
/* 384 */
/*!********************************!*\
  !*** ./dev/Component/Radio.js ***!
  \********************************/
/*! exports provided: default */
/*! all exports used */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _babel_runtime_corejs3_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/esm/inheritsLoose */ 10);
/* harmony import */ var Component_Abstract__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! Component/Abstract */ 35);
/* harmony import */ var Component_AbstractRadio__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! Component/AbstractRadio */ 267);




var RadioComponent =
/*#__PURE__*/
function (_AbstractRadio) {
  Object(_babel_runtime_corejs3_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(RadioComponent, _AbstractRadio);

  function RadioComponent() {
    return _AbstractRadio.apply(this, arguments) || this;
  }

  return RadioComponent;
}(Component_AbstractRadio__WEBPACK_IMPORTED_MODULE_2__[/* AbstractRadio */ "a"]);

/* harmony default export */ __webpack_exports__["default"] = (Object(Component_Abstract__WEBPACK_IMPORTED_MODULE_1__[/* componentExportHelper */ "b"])(RadioComponent, 'RadioComponent'));

/***/ }),
/* 385 */
/*!***********************************!*\
  !*** ./dev/Component/TextArea.js ***!
  \***********************************/
/*! exports provided: default */
/*! all exports used */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _babel_runtime_corejs3_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/esm/inheritsLoose */ 10);
/* harmony import */ var Common_Utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! Common/Utils */ 2);
/* harmony import */ var Component_Abstract__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! Component/Abstract */ 35);
/* harmony import */ var Component_AbstractInput__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! Component/AbstractInput */ 84);




var DEFAULT_ROWS = 5;

var TextAreaComponent =
/*#__PURE__*/
function (_AbstractInput) {
  Object(_babel_runtime_corejs3_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(TextAreaComponent, _AbstractInput);

  /**
   * @param {Object} params
   */
  function TextAreaComponent(params) {
    var _this;

    _this = _AbstractInput.call(this, params) || this;
    _this.rows = params.rows || DEFAULT_ROWS;
    _this.spellcheck = Object(Common_Utils__WEBPACK_IMPORTED_MODULE_1__["isUnd"])(params.spellcheck) ? false : !!params.spellcheck;
    return _this;
  }

  return TextAreaComponent;
}(Component_AbstractInput__WEBPACK_IMPORTED_MODULE_3__[/* AbstractInput */ "a"]);

/* harmony default export */ __webpack_exports__["default"] = (Object(Component_Abstract__WEBPACK_IMPORTED_MODULE_2__[/* componentExportHelper */ "b"])(TextAreaComponent, 'TextAreaComponent'));

/***/ }),
/* 386 */
/*!*******************************!*\
  !*** ./dev/Component/Date.js ***!
  \*******************************/
/*! exports provided: default */
/*! all exports used */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _babel_runtime_corejs3_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/esm/inheritsLoose */ 10);
/* harmony import */ var Component_Abstract__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! Component/Abstract */ 35);
/* harmony import */ var Component_AbstractInput__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! Component/AbstractInput */ 84);




var DateComponent =
/*#__PURE__*/
function (_AbstractInput) {
  Object(_babel_runtime_corejs3_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(DateComponent, _AbstractInput);

  function DateComponent() {
    return _AbstractInput.apply(this, arguments) || this;
  }

  return DateComponent;
}(Component_AbstractInput__WEBPACK_IMPORTED_MODULE_2__[/* AbstractInput */ "a"]);

/* harmony default export */ __webpack_exports__["default"] = (Object(Component_Abstract__WEBPACK_IMPORTED_MODULE_1__[/* componentExportHelper */ "b"])(DateComponent, 'DateComponent'));

/***/ }),
/* 387 */
/*!*********************************!*\
  !*** ./dev/Component/Script.js ***!
  \*********************************/
/*! exports provided: default */
/*! all exports used */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var core_js_modules_es_regexp_exec__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.regexp.exec */ 45);
/* harmony import */ var core_js_modules_es_regexp_exec__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_regexp_exec__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var core_js_modules_es_string_replace__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es.string.replace */ 56);
/* harmony import */ var core_js_modules_es_string_replace__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_replace__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _babel_runtime_corejs3_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/esm/inheritsLoose */ 10);
/* harmony import */ var $__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! $ */ 8);
/* harmony import */ var $__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n($__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var Component_Abstract__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! Component/Abstract */ 35);






var ScriptComponent =
/*#__PURE__*/
function (_AbstractComponent) {
  Object(_babel_runtime_corejs3_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(ScriptComponent, _AbstractComponent);

  /**
   * @param {Object} params
   */
  function ScriptComponent(params) {
    var _this;

    _this = _AbstractComponent.call(this) || this;

    if (params.component && params.component.templateNodes && params.element && params.element[0] && params.element[0].outerHTML) {
      var script = params.element[0].outerHTML;
      script = !script ? '' : script.replace(/<x-script/i, '<script').replace(/<b><\/b><\/x-script>/i, '</script>');

      if (script) {
        params.element.text('');
        params.element.replaceWith($__WEBPACK_IMPORTED_MODULE_3___default()(script).text(params.component.templateNodes[0] && params.component.templateNodes[0].nodeValue ? params.component.templateNodes[0].nodeValue : ''));
      } else {
        params.element.remove();
      }
    }

    return _this;
  }

  return ScriptComponent;
}(Component_Abstract__WEBPACK_IMPORTED_MODULE_4__[/* AbstractComponent */ "a"]);

/* harmony default export */ __webpack_exports__["default"] = (Object(Component_Abstract__WEBPACK_IMPORTED_MODULE_4__[/* componentExportHelper */ "b"])(ScriptComponent, 'ScriptComponent'));

/***/ }),
/* 388 */
/*!**************************************************!*\
  !*** ./dev/Component/MaterialDesign/Checkbox.js ***!
  \**************************************************/
/*! exports provided: default */
/*! all exports used */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_bind__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/bind */ 26);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_bind__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_bind__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _babel_runtime_corejs3_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/esm/assertThisInitialized */ 33);
/* harmony import */ var _babel_runtime_corejs3_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/esm/inheritsLoose */ 10);
/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! _ */ 3);
/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(___WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var ko__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ko */ 1);
/* harmony import */ var Component_Abstract__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! Component/Abstract */ 35);
/* harmony import */ var Component_AbstractCheckbox__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! Component/AbstractCheckbox */ 162);








var CheckboxMaterialDesignComponent =
/*#__PURE__*/
function (_AbstractCheckbox) {
  Object(_babel_runtime_corejs3_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(CheckboxMaterialDesignComponent, _AbstractCheckbox);

  /**
   * @param {Object} params
   */
  function CheckboxMaterialDesignComponent(params) {
    var _this;

    _this = _AbstractCheckbox.call(this, params) || this;
    _this.animationBox = ko__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"].observable(false).extend({
      falseTimeout: 200
    });
    _this.animationCheckmark = ko__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"].observable(false).extend({
      falseTimeout: 200
    });
    _this.animationBoxSetTrue = _babel_runtime_corejs3_core_js_stable_instance_bind__WEBPACK_IMPORTED_MODULE_0___default()(___WEBPACK_IMPORTED_MODULE_3___default.a).call(___WEBPACK_IMPORTED_MODULE_3___default.a, _this.animationBoxSetTrue, Object(_babel_runtime_corejs3_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_this));
    _this.animationCheckmarkSetTrue = _babel_runtime_corejs3_core_js_stable_instance_bind__WEBPACK_IMPORTED_MODULE_0___default()(___WEBPACK_IMPORTED_MODULE_3___default.a).call(___WEBPACK_IMPORTED_MODULE_3___default.a, _this.animationCheckmarkSetTrue, Object(_babel_runtime_corejs3_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_this));

    _this.disposable.push(_this.value.subscribe(function (value) {
      _this.triggerAnimation(value);
    }, Object(_babel_runtime_corejs3_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_this)));

    return _this;
  }

  var _proto = CheckboxMaterialDesignComponent.prototype;

  _proto.animationBoxSetTrue = function animationBoxSetTrue() {
    this.animationBox(true);
  };

  _proto.animationCheckmarkSetTrue = function animationCheckmarkSetTrue() {
    this.animationCheckmark(true);
  };

  _proto.triggerAnimation = function triggerAnimation(box) {
    if (box) {
      this.animationBoxSetTrue();

      ___WEBPACK_IMPORTED_MODULE_3___default.a.delay(this.animationCheckmarkSetTrue, 200);
    } else {
      this.animationCheckmarkSetTrue();

      ___WEBPACK_IMPORTED_MODULE_3___default.a.delay(this.animationBoxSetTrue, 200);
    }
  };

  return CheckboxMaterialDesignComponent;
}(Component_AbstractCheckbox__WEBPACK_IMPORTED_MODULE_6__[/* AbstractCheckbox */ "a"]);

/* harmony default export */ __webpack_exports__["default"] = (Object(Component_Abstract__WEBPACK_IMPORTED_MODULE_5__[/* componentExportHelper */ "b"])(CheckboxMaterialDesignComponent, 'CheckboxMaterialDesignComponent'));

/***/ }),
/* 389 */
/*!*************************!*\
  !*** ./dev/App/User.js ***!
  \*************************/
/*! exports provided: default */
/*! all exports used */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var core_js_modules_es_function_name__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.function.name */ 51);
/* harmony import */ var core_js_modules_es_function_name__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_function_name__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var core_js_modules_es_object_to_string__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es.object.to-string */ 63);
/* harmony import */ var core_js_modules_es_object_to_string__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_to_string__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var core_js_modules_es_regexp_to_string__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core-js/modules/es.regexp.to-string */ 111);
/* harmony import */ var core_js_modules_es_regexp_to_string__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_regexp_to_string__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var core_js_modules_web_timers__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! core-js/modules/web.timers */ 67);
/* harmony import */ var core_js_modules_web_timers__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_timers__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/find */ 12);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/map */ 18);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_5__);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_bind__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/bind */ 26);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_bind__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_bind__WEBPACK_IMPORTED_MODULE_6__);
/* harmony import */ var _babel_runtime_corejs3_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/esm/assertThisInitialized */ 33);
/* harmony import */ var _babel_runtime_corejs3_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/esm/inheritsLoose */ 10);
/* harmony import */ var window__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! window */ 4);
/* harmony import */ var window__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(window__WEBPACK_IMPORTED_MODULE_9__);
/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! _ */ 3);
/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(___WEBPACK_IMPORTED_MODULE_10__);
/* harmony import */ var $__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! $ */ 8);
/* harmony import */ var $__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n($__WEBPACK_IMPORTED_MODULE_11__);
/* harmony import */ var progressJs__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! progressJs */ 98);
/* harmony import */ var progressJs__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(progressJs__WEBPACK_IMPORTED_MODULE_12__);
/* harmony import */ var Common_Utils__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! Common/Utils */ 2);
/* harmony import */ var Common_Enums__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! Common/Enums */ 0);
/* harmony import */ var Common_Globals__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! Common/Globals */ 6);
/* harmony import */ var Common_Consts__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! Common/Consts */ 25);
/* harmony import */ var Common_Plugins__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! Common/Plugins */ 39);
/* harmony import */ var Common_Momentor__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! Common/Momentor */ 60);
/* harmony import */ var Common_Cache__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! Common/Cache */ 14);
/* harmony import */ var Common_Links__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! Common/Links */ 15);
/* harmony import */ var Common_Events__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! Common/Events */ 24);
/* harmony import */ var Common_Translator__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! Common/Translator */ 9);
/* harmony import */ var Stores_Social__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! Stores/Social */ 29);
/* harmony import */ var Stores_User_App__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! Stores/User/App */ 31);
/* harmony import */ var Stores_User_Settings__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! Stores/User/Settings */ 38);
/* harmony import */ var Stores_User_Notification__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! Stores/User/Notification */ 115);
/* harmony import */ var Stores_User_Account__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! Stores/User/Account */ 46);
/* harmony import */ var Stores_User_Contact__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! Stores/User/Contact */ 100);
/* harmony import */ var Stores_User_Identity__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! Stores/User/Identity */ 99);
/* harmony import */ var Stores_User_Template__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! Stores/User/Template */ 176);
/* harmony import */ var Stores_User_Folder__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! Stores/User/Folder */ 11);
/* harmony import */ var Stores_User_Pgp__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! Stores/User/Pgp */ 41);
/* harmony import */ var Stores_User_Message__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! Stores/User/Message */ 13);
/* harmony import */ var Stores_User_Quota__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! Stores/User/Quota */ 222);
/* harmony import */ var Storage_Client__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! Storage/Client */ 58);
/* harmony import */ var Storage_Settings__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! Storage/Settings */ 5);
/* harmony import */ var Storage_RainLoop__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! Storage/RainLoop */ 146);
/* harmony import */ var Remote_User_Ajax__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(/*! Remote/User/Ajax */ 16);
/* harmony import */ var Promises_User_Ajax__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(/*! Promises/User/Ajax */ 87);
/* harmony import */ var Model_Email__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(/*! Model/Email */ 80);
/* harmony import */ var Model_Account__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(/*! Model/Account */ 424);
/* harmony import */ var Model_Identity__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(/*! Model/Identity */ 425);
/* harmony import */ var Model_Template__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(/*! Model/Template */ 426);
/* harmony import */ var Model_OpenPgpKey__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(/*! Model/OpenPgpKey */ 427);
/* harmony import */ var Screen_User_Login__WEBPACK_IMPORTED_MODULE_45__ = __webpack_require__(/*! Screen/User/Login */ 428);
/* harmony import */ var Screen_User_MailBox__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__(/*! Screen/User/MailBox */ 430);
/* harmony import */ var Screen_User_Settings__WEBPACK_IMPORTED_MODULE_47__ = __webpack_require__(/*! Screen/User/Settings */ 436);
/* harmony import */ var Knoin_Knoin__WEBPACK_IMPORTED_MODULE_48__ = __webpack_require__(/*! Knoin/Knoin */ 7);
/* harmony import */ var App_Abstract__WEBPACK_IMPORTED_MODULE_49__ = __webpack_require__(/*! App/Abstract */ 265);












































 // import {AboutUserScreen} from 'Screen/User/About';







var AppUser =
/*#__PURE__*/
function (_AbstractApp) {
  Object(_babel_runtime_corejs3_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_8__[/* default */ "a"])(AppUser, _AbstractApp);

  function AppUser() {
    var _this;

    _this = _AbstractApp.call(this, Remote_User_Ajax__WEBPACK_IMPORTED_MODULE_38__[/* default */ "a"]) || this;
    _this.moveCache = {};
    _this.quotaDebounce = ___WEBPACK_IMPORTED_MODULE_10___default.a.debounce(_this.quota, Common_Enums__WEBPACK_IMPORTED_MODULE_14__["Magics"].Time30s);
    _this.moveOrDeleteResponseHelper = _babel_runtime_corejs3_core_js_stable_instance_bind__WEBPACK_IMPORTED_MODULE_6___default()(___WEBPACK_IMPORTED_MODULE_10___default.a).call(___WEBPACK_IMPORTED_MODULE_10___default.a, _this.moveOrDeleteResponseHelper, Object(_babel_runtime_corejs3_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"])(_this));
    _this.messagesMoveTrigger = ___WEBPACK_IMPORTED_MODULE_10___default.a.debounce(_this.messagesMoveTrigger, 500);
    window__WEBPACK_IMPORTED_MODULE_9___default.a.setInterval(function () {
      return Common_Events__WEBPACK_IMPORTED_MODULE_21__[/* pub */ "a"]('interval.30s');
    }, Common_Enums__WEBPACK_IMPORTED_MODULE_14__["Magics"].Time30s);
    window__WEBPACK_IMPORTED_MODULE_9___default.a.setInterval(function () {
      return Common_Events__WEBPACK_IMPORTED_MODULE_21__[/* pub */ "a"]('interval.1m');
    }, Common_Enums__WEBPACK_IMPORTED_MODULE_14__["Magics"].Time1m);
    window__WEBPACK_IMPORTED_MODULE_9___default.a.setInterval(function () {
      return Common_Events__WEBPACK_IMPORTED_MODULE_21__[/* pub */ "a"]('interval.2m');
    }, Common_Enums__WEBPACK_IMPORTED_MODULE_14__["Magics"].Time2m);
    window__WEBPACK_IMPORTED_MODULE_9___default.a.setInterval(function () {
      return Common_Events__WEBPACK_IMPORTED_MODULE_21__[/* pub */ "a"]('interval.3m');
    }, Common_Enums__WEBPACK_IMPORTED_MODULE_14__["Magics"].Time3m);
    window__WEBPACK_IMPORTED_MODULE_9___default.a.setInterval(function () {
      return Common_Events__WEBPACK_IMPORTED_MODULE_21__[/* pub */ "a"]('interval.5m');
    }, Common_Enums__WEBPACK_IMPORTED_MODULE_14__["Magics"].Time5m);
    window__WEBPACK_IMPORTED_MODULE_9___default.a.setInterval(function () {
      return Common_Events__WEBPACK_IMPORTED_MODULE_21__[/* pub */ "a"]('interval.10m');
    }, Common_Enums__WEBPACK_IMPORTED_MODULE_14__["Magics"].Time10m);
    window__WEBPACK_IMPORTED_MODULE_9___default.a.setInterval(function () {
      return Common_Events__WEBPACK_IMPORTED_MODULE_21__[/* pub */ "a"]('interval.15m');
    }, Common_Enums__WEBPACK_IMPORTED_MODULE_14__["Magics"].Time15m);
    window__WEBPACK_IMPORTED_MODULE_9___default.a.setInterval(function () {
      return Common_Events__WEBPACK_IMPORTED_MODULE_21__[/* pub */ "a"]('interval.20m');
    }, Common_Enums__WEBPACK_IMPORTED_MODULE_14__["Magics"].Time20m);
    window__WEBPACK_IMPORTED_MODULE_9___default.a.setTimeout(function () {
      return window__WEBPACK_IMPORTED_MODULE_9___default.a.setInterval(function () {
        return Common_Events__WEBPACK_IMPORTED_MODULE_21__[/* pub */ "a"]('interval.2m-after5m');
      }, Common_Enums__WEBPACK_IMPORTED_MODULE_14__["Magics"].Time2m);
    }, Common_Enums__WEBPACK_IMPORTED_MODULE_14__["Magics"].Time5m);
    window__WEBPACK_IMPORTED_MODULE_9___default.a.setTimeout(function () {
      return window__WEBPACK_IMPORTED_MODULE_9___default.a.setInterval(function () {
        return Common_Events__WEBPACK_IMPORTED_MODULE_21__[/* pub */ "a"]('interval.5m-after5m');
      }, Common_Enums__WEBPACK_IMPORTED_MODULE_14__["Magics"].Time5m);
    }, Common_Enums__WEBPACK_IMPORTED_MODULE_14__["Magics"].Time5m);
    window__WEBPACK_IMPORTED_MODULE_9___default.a.setTimeout(function () {
      return window__WEBPACK_IMPORTED_MODULE_9___default.a.setInterval(function () {
        return Common_Events__WEBPACK_IMPORTED_MODULE_21__[/* pub */ "a"]('interval.10m-after5m');
      }, Common_Enums__WEBPACK_IMPORTED_MODULE_14__["Magics"].Time10m);
    }, Common_Enums__WEBPACK_IMPORTED_MODULE_14__["Magics"].Time5m);
    $__WEBPACK_IMPORTED_MODULE_11___default.a.wakeUp(function () {
      if (Object(Storage_RainLoop__WEBPACK_IMPORTED_MODULE_37__[/* checkTimestamp */ "a"])()) {
        _this.reload();
      }

      Remote_User_Ajax__WEBPACK_IMPORTED_MODULE_38__[/* default */ "a"].jsVersion(function (sResult, oData) {
        if (Common_Enums__WEBPACK_IMPORTED_MODULE_14__["StorageResultType"].Success === sResult && oData && !oData.Result) {
          _this.reload();
        }
      }, Storage_Settings__WEBPACK_IMPORTED_MODULE_36__["appSettingsGet"]('version'));
    }, {}, Common_Enums__WEBPACK_IMPORTED_MODULE_14__["Magics"].Time60m);

    if (Object(Storage_RainLoop__WEBPACK_IMPORTED_MODULE_37__[/* checkTimestamp */ "a"])()) {
      _this.reload();
    }

    if (Storage_Settings__WEBPACK_IMPORTED_MODULE_36__["settingsGet"]('UserBackgroundHash')) {
      ___WEBPACK_IMPORTED_MODULE_10___default.a.delay(function () {
        $__WEBPACK_IMPORTED_MODULE_11___default()('#rl-bg').attr('style', 'background-image: none !important;').backstretch(Object(Common_Links__WEBPACK_IMPORTED_MODULE_20__[/* userBackground */ "J"])(Storage_Settings__WEBPACK_IMPORTED_MODULE_36__["settingsGet"]('UserBackgroundHash')), {
          fade: Common_Globals__WEBPACK_IMPORTED_MODULE_15__["bAnimationSupported"] ? Common_Enums__WEBPACK_IMPORTED_MODULE_14__["Magics"].Time1s : 0,
          centeredX: true,
          centeredY: true
        }).removeAttr('style');
      }, Common_Enums__WEBPACK_IMPORTED_MODULE_14__["Magics"].Time1s);
    }

    _this.socialUsers = _babel_runtime_corejs3_core_js_stable_instance_bind__WEBPACK_IMPORTED_MODULE_6___default()(___WEBPACK_IMPORTED_MODULE_10___default.a).call(___WEBPACK_IMPORTED_MODULE_10___default.a, _this.socialUsers, Object(_babel_runtime_corejs3_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"])(_this));
    return _this;
  }

  var _proto = AppUser.prototype;

  _proto.remote = function remote() {
    return Remote_User_Ajax__WEBPACK_IMPORTED_MODULE_38__[/* default */ "a"];
  };

  _proto.reload = function reload() {
    if (window__WEBPACK_IMPORTED_MODULE_9___default.a.parent && !!Storage_Settings__WEBPACK_IMPORTED_MODULE_36__["appSettingsGet"]('inIframe')) {
      window__WEBPACK_IMPORTED_MODULE_9___default.a.parent.location.reload();
    } else {
      window__WEBPACK_IMPORTED_MODULE_9___default.a.location.reload();
    }
  };

  _proto.reloadFlagsCurrentMessageListAndMessageFromCache = function reloadFlagsCurrentMessageListAndMessageFromCache() {
    ___WEBPACK_IMPORTED_MODULE_10___default.a.each(Stores_User_Message__WEBPACK_IMPORTED_MODULE_33__[/* default */ "a"].messageList(), function (message) {
      Object(Common_Cache__WEBPACK_IMPORTED_MODULE_19__[/* initMessageFlagsFromCache */ "n"])(message);
    });

    Object(Common_Cache__WEBPACK_IMPORTED_MODULE_19__[/* initMessageFlagsFromCache */ "n"])(Stores_User_Message__WEBPACK_IMPORTED_MODULE_33__[/* default */ "a"].message());
  }
  /**
   * @param {boolean=} bDropPagePosition = false
   * @param {boolean=} bDropCurrenFolderCache = false
   */
  ;

  _proto.reloadMessageList = function reloadMessageList(bDropPagePosition, bDropCurrenFolderCache) {
    if (bDropPagePosition === void 0) {
      bDropPagePosition = false;
    }

    if (bDropCurrenFolderCache === void 0) {
      bDropCurrenFolderCache = false;
    }

    var iOffset = (Stores_User_Message__WEBPACK_IMPORTED_MODULE_33__[/* default */ "a"].messageListPage() - 1) * Stores_User_Settings__WEBPACK_IMPORTED_MODULE_25__[/* default */ "a"].messagesPerPage();

    if (bDropCurrenFolderCache) {
      Object(Common_Cache__WEBPACK_IMPORTED_MODULE_19__[/* setFolderHash */ "q"])(Stores_User_Folder__WEBPACK_IMPORTED_MODULE_31__[/* default */ "a"].currentFolderFullNameRaw(), '');
    }

    if (bDropPagePosition) {
      Stores_User_Message__WEBPACK_IMPORTED_MODULE_33__[/* default */ "a"].messageListPage(1);
      Stores_User_Message__WEBPACK_IMPORTED_MODULE_33__[/* default */ "a"].messageListPageBeforeThread(1);
      iOffset = 0;
      Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_48__["setHash"])(Object(Common_Links__WEBPACK_IMPORTED_MODULE_20__[/* mailBox */ "o"])(Stores_User_Folder__WEBPACK_IMPORTED_MODULE_31__[/* default */ "a"].currentFolderFullNameHash(), Stores_User_Message__WEBPACK_IMPORTED_MODULE_33__[/* default */ "a"].messageListPage(), Stores_User_Message__WEBPACK_IMPORTED_MODULE_33__[/* default */ "a"].messageListSearch(), Stores_User_Message__WEBPACK_IMPORTED_MODULE_33__[/* default */ "a"].messageListThreadUid()), true, true);
    }

    Stores_User_Message__WEBPACK_IMPORTED_MODULE_33__[/* default */ "a"].messageListLoading(true);
    Remote_User_Ajax__WEBPACK_IMPORTED_MODULE_38__[/* default */ "a"].messageList(function (sResult, oData, bCached) {
      if (Common_Enums__WEBPACK_IMPORTED_MODULE_14__["StorageResultType"].Success === sResult && oData && oData.Result) {
        Stores_User_Message__WEBPACK_IMPORTED_MODULE_33__[/* default */ "a"].messageListError('');
        Stores_User_Message__WEBPACK_IMPORTED_MODULE_33__[/* default */ "a"].messageListLoading(false);
        Stores_User_Message__WEBPACK_IMPORTED_MODULE_33__[/* default */ "a"].setMessageList(oData, bCached);
      } else if (Common_Enums__WEBPACK_IMPORTED_MODULE_14__["StorageResultType"].Unload === sResult) {
        Stores_User_Message__WEBPACK_IMPORTED_MODULE_33__[/* default */ "a"].messageListError('');
        Stores_User_Message__WEBPACK_IMPORTED_MODULE_33__[/* default */ "a"].messageListLoading(false);
      } else if (Common_Enums__WEBPACK_IMPORTED_MODULE_14__["StorageResultType"].Abort !== sResult) {
        Stores_User_Message__WEBPACK_IMPORTED_MODULE_33__[/* default */ "a"].messageList([]);
        Stores_User_Message__WEBPACK_IMPORTED_MODULE_33__[/* default */ "a"].messageListLoading(false);
        Stores_User_Message__WEBPACK_IMPORTED_MODULE_33__[/* default */ "a"].messageListError(oData && oData.ErrorCode ? Object(Common_Translator__WEBPACK_IMPORTED_MODULE_22__["getNotification"])(oData.ErrorCode) : Object(Common_Translator__WEBPACK_IMPORTED_MODULE_22__["i18n"])('NOTIFICATIONS/CANT_GET_MESSAGE_LIST'));
      }
    }, Stores_User_Folder__WEBPACK_IMPORTED_MODULE_31__[/* default */ "a"].currentFolderFullNameRaw(), iOffset, Stores_User_Settings__WEBPACK_IMPORTED_MODULE_25__[/* default */ "a"].messagesPerPage(), Stores_User_Message__WEBPACK_IMPORTED_MODULE_33__[/* default */ "a"].messageListSearch(), Stores_User_Message__WEBPACK_IMPORTED_MODULE_33__[/* default */ "a"].messageListThreadUid());
  };

  _proto.recacheInboxMessageList = function recacheInboxMessageList() {
    Remote_User_Ajax__WEBPACK_IMPORTED_MODULE_38__[/* default */ "a"].messageList(Common_Utils__WEBPACK_IMPORTED_MODULE_13__["noop"], Object(Common_Cache__WEBPACK_IMPORTED_MODULE_19__[/* getFolderInboxName */ "h"])(), 0, Stores_User_Settings__WEBPACK_IMPORTED_MODULE_25__[/* default */ "a"].messagesPerPage(), '', '', true);
  }
  /**
   * @param {Function} fResultFunc
   * @returns {boolean}
   */
  ;

  _proto.contactsSync = function contactsSync(fResultFunc) {
    var oContacts = Stores_User_Contact__WEBPACK_IMPORTED_MODULE_28__[/* default */ "a"].contacts;

    if (oContacts.importing() || oContacts.syncing() || !Stores_User_Contact__WEBPACK_IMPORTED_MODULE_28__[/* default */ "a"].enableContactsSync() || !Stores_User_Contact__WEBPACK_IMPORTED_MODULE_28__[/* default */ "a"].allowContactsSync()) {
      return false;
    }

    oContacts.syncing(true);
    Remote_User_Ajax__WEBPACK_IMPORTED_MODULE_38__[/* default */ "a"].contactsSync(function (sResult, oData) {
      oContacts.syncing(false);

      if (fResultFunc) {
        fResultFunc(sResult, oData);
      }
    });
    return true;
  };

  _proto.messagesMoveTrigger = function messagesMoveTrigger() {
    var _this2 = this;

    var sTrashFolder = Stores_User_Folder__WEBPACK_IMPORTED_MODULE_31__[/* default */ "a"].trashFolder(),
        sSpamFolder = Stores_User_Folder__WEBPACK_IMPORTED_MODULE_31__[/* default */ "a"].spamFolder();

    ___WEBPACK_IMPORTED_MODULE_10___default.a.each(this.moveCache, function (item) {
      var isSpam = sSpamFolder === item.To,
          isTrash = sTrashFolder === item.To,
          isHam = !isSpam && sSpamFolder === item.From && Object(Common_Cache__WEBPACK_IMPORTED_MODULE_19__[/* getFolderInboxName */ "h"])() === item.To;
      Remote_User_Ajax__WEBPACK_IMPORTED_MODULE_38__[/* default */ "a"].messagesMove(_this2.moveOrDeleteResponseHelper, item.From, item.To, item.Uid, isSpam ? 'SPAM' : isHam ? 'HAM' : '', isSpam || isTrash);
    });

    this.moveCache = {};
  };

  _proto.messagesMoveHelper = function messagesMoveHelper(fromFolderFullNameRaw, toFolderFullNameRaw, uidsForMove) {
    var hash = '$$' + fromFolderFullNameRaw + '$$' + toFolderFullNameRaw + '$$';

    if (!this.moveCache[hash]) {
      this.moveCache[hash] = {
        From: fromFolderFullNameRaw,
        To: toFolderFullNameRaw,
        Uid: []
      };
    }

    this.moveCache[hash].Uid = ___WEBPACK_IMPORTED_MODULE_10___default.a.union(this.moveCache[hash].Uid, uidsForMove);
    this.messagesMoveTrigger();
  };

  _proto.messagesCopyHelper = function messagesCopyHelper(sFromFolderFullNameRaw, sToFolderFullNameRaw, aUidForCopy) {
    Remote_User_Ajax__WEBPACK_IMPORTED_MODULE_38__[/* default */ "a"].messagesCopy(this.moveOrDeleteResponseHelper, sFromFolderFullNameRaw, sToFolderFullNameRaw, aUidForCopy);
  };

  _proto.messagesDeleteHelper = function messagesDeleteHelper(sFromFolderFullNameRaw, aUidForRemove) {
    Remote_User_Ajax__WEBPACK_IMPORTED_MODULE_38__[/* default */ "a"].messagesDelete(this.moveOrDeleteResponseHelper, sFromFolderFullNameRaw, aUidForRemove);
  };

  _proto.moveOrDeleteResponseHelper = function moveOrDeleteResponseHelper(sResult, oData) {
    if (Common_Enums__WEBPACK_IMPORTED_MODULE_14__["StorageResultType"].Success === sResult && Stores_User_Folder__WEBPACK_IMPORTED_MODULE_31__[/* default */ "a"].currentFolder()) {
      if (oData && Object(Common_Utils__WEBPACK_IMPORTED_MODULE_13__["isArray"])(oData.Result) && 2 === oData.Result.length) {
        Object(Common_Cache__WEBPACK_IMPORTED_MODULE_19__[/* setFolderHash */ "q"])(oData.Result[0], oData.Result[1]);
      } else {
        Object(Common_Cache__WEBPACK_IMPORTED_MODULE_19__[/* setFolderHash */ "q"])(Stores_User_Folder__WEBPACK_IMPORTED_MODULE_31__[/* default */ "a"].currentFolderFullNameRaw(), '');

        if (oData && -1 < Object(Common_Utils__WEBPACK_IMPORTED_MODULE_13__["inArray"])(oData.ErrorCode, [Common_Enums__WEBPACK_IMPORTED_MODULE_14__["Notification"].CantMoveMessage, Common_Enums__WEBPACK_IMPORTED_MODULE_14__["Notification"].CantCopyMessage])) {
          window__WEBPACK_IMPORTED_MODULE_9___default.a.alert(Object(Common_Translator__WEBPACK_IMPORTED_MODULE_22__["getNotification"])(oData.ErrorCode));
        }
      }

      this.reloadMessageList(0 === Stores_User_Message__WEBPACK_IMPORTED_MODULE_33__[/* default */ "a"].messageList().length);
      this.quotaDebounce();
    }
  }
  /**
   * @param {string} sFromFolderFullNameRaw
   * @param {Array} aUidForRemove
   */
  ;

  _proto.deleteMessagesFromFolderWithoutCheck = function deleteMessagesFromFolderWithoutCheck(sFromFolderFullNameRaw, aUidForRemove) {
    this.messagesDeleteHelper(sFromFolderFullNameRaw, aUidForRemove);
    Stores_User_Message__WEBPACK_IMPORTED_MODULE_33__[/* default */ "a"].removeMessagesFromList(sFromFolderFullNameRaw, aUidForRemove);
  }
  /**
   * @param {number} iDeleteType
   * @param {string} sFromFolderFullNameRaw
   * @param {Array} aUidForRemove
   * @param {boolean=} bUseFolder = true
   */
  ;

  _proto.deleteMessagesFromFolder = function deleteMessagesFromFolder(iDeleteType, sFromFolderFullNameRaw, aUidForRemove, bUseFolder) {
    var _this3 = this;

    var oMoveFolder = null,
        nSetSystemFoldersNotification = null;

    switch (iDeleteType) {
      case Common_Enums__WEBPACK_IMPORTED_MODULE_14__["FolderType"].Spam:
        oMoveFolder = Object(Common_Cache__WEBPACK_IMPORTED_MODULE_19__[/* getFolderFromCacheList */ "e"])(Stores_User_Folder__WEBPACK_IMPORTED_MODULE_31__[/* default */ "a"].spamFolder());
        nSetSystemFoldersNotification = Common_Enums__WEBPACK_IMPORTED_MODULE_14__["SetSystemFoldersNotification"].Spam;
        break;

      case Common_Enums__WEBPACK_IMPORTED_MODULE_14__["FolderType"].NotSpam:
        oMoveFolder = Object(Common_Cache__WEBPACK_IMPORTED_MODULE_19__[/* getFolderFromCacheList */ "e"])(Object(Common_Cache__WEBPACK_IMPORTED_MODULE_19__[/* getFolderInboxName */ "h"])());
        break;

      case Common_Enums__WEBPACK_IMPORTED_MODULE_14__["FolderType"].Trash:
        oMoveFolder = Object(Common_Cache__WEBPACK_IMPORTED_MODULE_19__[/* getFolderFromCacheList */ "e"])(Stores_User_Folder__WEBPACK_IMPORTED_MODULE_31__[/* default */ "a"].trashFolder());
        nSetSystemFoldersNotification = Common_Enums__WEBPACK_IMPORTED_MODULE_14__["SetSystemFoldersNotification"].Trash;
        break;

      case Common_Enums__WEBPACK_IMPORTED_MODULE_14__["FolderType"].Archive:
        oMoveFolder = Object(Common_Cache__WEBPACK_IMPORTED_MODULE_19__[/* getFolderFromCacheList */ "e"])(Stores_User_Folder__WEBPACK_IMPORTED_MODULE_31__[/* default */ "a"].archiveFolder());
        nSetSystemFoldersNotification = Common_Enums__WEBPACK_IMPORTED_MODULE_14__["SetSystemFoldersNotification"].Archive;
        break;
      // no default
    }

    bUseFolder = Object(Common_Utils__WEBPACK_IMPORTED_MODULE_13__["isUnd"])(bUseFolder) ? true : !!bUseFolder;

    if (bUseFolder) {
      if (Common_Enums__WEBPACK_IMPORTED_MODULE_14__["FolderType"].Spam === iDeleteType && Common_Consts__WEBPACK_IMPORTED_MODULE_16__[/* UNUSED_OPTION_VALUE */ "r"] === Stores_User_Folder__WEBPACK_IMPORTED_MODULE_31__[/* default */ "a"].spamFolder() || Common_Enums__WEBPACK_IMPORTED_MODULE_14__["FolderType"].Trash === iDeleteType && Common_Consts__WEBPACK_IMPORTED_MODULE_16__[/* UNUSED_OPTION_VALUE */ "r"] === Stores_User_Folder__WEBPACK_IMPORTED_MODULE_31__[/* default */ "a"].trashFolder() || Common_Enums__WEBPACK_IMPORTED_MODULE_14__["FolderType"].Archive === iDeleteType && Common_Consts__WEBPACK_IMPORTED_MODULE_16__[/* UNUSED_OPTION_VALUE */ "r"] === Stores_User_Folder__WEBPACK_IMPORTED_MODULE_31__[/* default */ "a"].archiveFolder()) {
        bUseFolder = false;
      }
    }

    if (!oMoveFolder && bUseFolder) {
      Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_48__["showScreenPopup"])(__webpack_require__(/*! View/Popup/FolderSystem */ 274), [nSetSystemFoldersNotification]);
    } else if (!bUseFolder || Common_Enums__WEBPACK_IMPORTED_MODULE_14__["FolderType"].Trash === iDeleteType && (sFromFolderFullNameRaw === Stores_User_Folder__WEBPACK_IMPORTED_MODULE_31__[/* default */ "a"].spamFolder() || sFromFolderFullNameRaw === Stores_User_Folder__WEBPACK_IMPORTED_MODULE_31__[/* default */ "a"].trashFolder())) {
      Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_48__["showScreenPopup"])(__webpack_require__(/*! View/Popup/Ask */ 221), [Object(Common_Translator__WEBPACK_IMPORTED_MODULE_22__["i18n"])('POPUPS_ASK/DESC_WANT_DELETE_MESSAGES'), function () {
        _this3.messagesDeleteHelper(sFromFolderFullNameRaw, aUidForRemove);

        Stores_User_Message__WEBPACK_IMPORTED_MODULE_33__[/* default */ "a"].removeMessagesFromList(sFromFolderFullNameRaw, aUidForRemove);
      }]);
    } else if (oMoveFolder) {
      this.messagesMoveHelper(sFromFolderFullNameRaw, oMoveFolder.fullNameRaw, aUidForRemove);
      Stores_User_Message__WEBPACK_IMPORTED_MODULE_33__[/* default */ "a"].removeMessagesFromList(sFromFolderFullNameRaw, aUidForRemove, oMoveFolder.fullNameRaw);
    }
  }
  /**
   * @param {string} sFromFolderFullNameRaw
   * @param {Array} aUidForMove
   * @param {string} sToFolderFullNameRaw
   * @param {boolean=} bCopy = false
   */
  ;

  _proto.moveMessagesToFolder = function moveMessagesToFolder(sFromFolderFullNameRaw, aUidForMove, sToFolderFullNameRaw, bCopy) {
    if (sFromFolderFullNameRaw !== sToFolderFullNameRaw && Object(Common_Utils__WEBPACK_IMPORTED_MODULE_13__["isArray"])(aUidForMove) && 0 < aUidForMove.length) {
      var oFromFolder = Object(Common_Cache__WEBPACK_IMPORTED_MODULE_19__[/* getFolderFromCacheList */ "e"])(sFromFolderFullNameRaw),
          oToFolder = Object(Common_Cache__WEBPACK_IMPORTED_MODULE_19__[/* getFolderFromCacheList */ "e"])(sToFolderFullNameRaw);

      if (oFromFolder && oToFolder) {
        if (Object(Common_Utils__WEBPACK_IMPORTED_MODULE_13__["isUnd"])(bCopy) ? false : !!bCopy) {
          this.messagesCopyHelper(oFromFolder.fullNameRaw, oToFolder.fullNameRaw, aUidForMove);
        } else {
          this.messagesMoveHelper(oFromFolder.fullNameRaw, oToFolder.fullNameRaw, aUidForMove);
        }

        Stores_User_Message__WEBPACK_IMPORTED_MODULE_33__[/* default */ "a"].removeMessagesFromList(oFromFolder.fullNameRaw, aUidForMove, oToFolder.fullNameRaw, bCopy);
        return true;
      }
    }

    return false;
  }
  /**
   * @param {Function=} callback = null
   */
  ;

  _proto.foldersReload = function foldersReload(callback) {
    if (callback === void 0) {
      callback = null;
    }

    var prom = Promises_User_Ajax__WEBPACK_IMPORTED_MODULE_39__[/* default */ "a"].foldersReload(Stores_User_Folder__WEBPACK_IMPORTED_MODULE_31__[/* default */ "a"].foldersLoading);

    if (callback) {
      prom.then(function (value) {
        return !!value;
      }).then(callback).catch(function () {
        ___WEBPACK_IMPORTED_MODULE_10___default.a.delay(function () {
          if (callback) {
            callback(false); // eslint-disable-line callback-return
          }
        }, 1);
      });
    }
  };

  _proto.foldersPromisesActionHelper = function foldersPromisesActionHelper(promise, errorDefCode) {
    Promises_User_Ajax__WEBPACK_IMPORTED_MODULE_39__[/* default */ "a"].abort('Folders').fastResolve(true).then(function () {
      return promise;
    }).then(function () {
      Promises_User_Ajax__WEBPACK_IMPORTED_MODULE_39__[/* default */ "a"].foldersReloadWithTimeout(Stores_User_Folder__WEBPACK_IMPORTED_MODULE_31__[/* default */ "a"].foldersLoading);
    }, function (errorCode) {
      Stores_User_Folder__WEBPACK_IMPORTED_MODULE_31__[/* default */ "a"].folderList.error(Object(Common_Translator__WEBPACK_IMPORTED_MODULE_22__["getNotification"])(errorCode, '', errorDefCode));
      Promises_User_Ajax__WEBPACK_IMPORTED_MODULE_39__[/* default */ "a"].foldersReloadWithTimeout(Stores_User_Folder__WEBPACK_IMPORTED_MODULE_31__[/* default */ "a"].foldersLoading);
    });
  };

  _proto.reloadOpenPgpKeys = function reloadOpenPgpKeys() {
    if (Stores_User_Pgp__WEBPACK_IMPORTED_MODULE_32__[/* default */ "a"].capaOpenPGP()) {
      var keys = [],
          email = new Model_Email__WEBPACK_IMPORTED_MODULE_40__["EmailModel"](),
          openpgpKeyring = Stores_User_Pgp__WEBPACK_IMPORTED_MODULE_32__[/* default */ "a"].openpgpKeyring,
          openpgpKeys = openpgpKeyring ? openpgpKeyring.getAllKeys() : [];

      ___WEBPACK_IMPORTED_MODULE_10___default.a.each(openpgpKeys, function (oItem, iIndex) {
        if (oItem && oItem.primaryKey) {
          var aEmails = [],
              aUsers = [],
              primaryUser = oItem.getPrimaryUser(),
              user = primaryUser && primaryUser.user ? primaryUser.user.userId.userid : oItem.users && oItem.users[0] ? oItem.users[0].userId.userid : '';

          if (oItem.users) {
            ___WEBPACK_IMPORTED_MODULE_10___default.a.each(oItem.users, function (item) {
              if (item.userId) {
                email.clear();
                email.parse(item.userId.userid);

                if (email.validate()) {
                  aEmails.push(email.email);
                  aUsers.push(item.userId.userid);
                }
              }
            });
          }

          if (aEmails.length) {
            keys.push(new Model_OpenPgpKey__WEBPACK_IMPORTED_MODULE_44__[/* OpenPgpKeyModel */ "a"](iIndex, oItem.primaryKey.getFingerprint(), oItem.primaryKey.getKeyId().toHex().toLowerCase(), ___WEBPACK_IMPORTED_MODULE_10___default.a.uniq(___WEBPACK_IMPORTED_MODULE_10___default.a.compact(_babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_5___default()(___WEBPACK_IMPORTED_MODULE_10___default.a).call(___WEBPACK_IMPORTED_MODULE_10___default.a, oItem.getKeyIds(), function (item) {
              return item && item.toHex ? item.toHex() : null;
            }))), aUsers, aEmails, oItem.isPrivate(), oItem.armor(), user));
          }
        }
      });

      Object(Common_Utils__WEBPACK_IMPORTED_MODULE_13__["delegateRunOnDestroy"])(Stores_User_Pgp__WEBPACK_IMPORTED_MODULE_32__[/* default */ "a"].openpgpkeys());
      Stores_User_Pgp__WEBPACK_IMPORTED_MODULE_32__[/* default */ "a"].openpgpkeys(keys);
    }
  };

  _proto.accountsCounts = function accountsCounts() {
    return false; // AccountStore.accounts.loading(true);
    //
    // Remote.accountsCounts((sResult, oData) => {
    //
    // 	AccountStore.accounts.loading(false);
    //
    // 	if (StorageResultType.Success === sResult && oData.Result && oData.Result['Counts'])
    // 	{
    // 		var
    // 			sEmail = AccountStore.email(),
    // 			aAcounts = AccountStore.accounts()
    // 		;
    //
    // 		_.each(oData.Result['Counts'], (oItem) => {
    //
    // 			var oAccount = _.find(aAcounts, (oAccount) => {
    // 				return oAccount && oItem[0] === oAccount.email && sEmail !== oAccount.email;
    // 			});
    //
    // 			if (oAccount)
    // 			{
    // 				oAccount.count(pInt(oItem[1]));
    // 			}
    // 		});
    // 	}
    // });
  };

  _proto.accountsAndIdentities = function accountsAndIdentities(bBoot) {
    var _this4 = this;

    Stores_User_Account__WEBPACK_IMPORTED_MODULE_27__[/* default */ "a"].accounts.loading(true);
    Stores_User_Identity__WEBPACK_IMPORTED_MODULE_29__[/* default */ "a"].identities.loading(true);
    Remote_User_Ajax__WEBPACK_IMPORTED_MODULE_38__[/* default */ "a"].accountsAndIdentities(function (sResult, oData) {
      Stores_User_Account__WEBPACK_IMPORTED_MODULE_27__[/* default */ "a"].accounts.loading(false);
      Stores_User_Identity__WEBPACK_IMPORTED_MODULE_29__[/* default */ "a"].identities.loading(false);

      if (Common_Enums__WEBPACK_IMPORTED_MODULE_14__["StorageResultType"].Success === sResult && oData.Result) {
        var counts = {},
            sAccountEmail = Stores_User_Account__WEBPACK_IMPORTED_MODULE_27__[/* default */ "a"].email();
        var parentEmail = Storage_Settings__WEBPACK_IMPORTED_MODULE_36__["settingsGet"]('ParentEmail');
        parentEmail = '' === parentEmail ? sAccountEmail : parentEmail;

        if (Object(Common_Utils__WEBPACK_IMPORTED_MODULE_13__["isArray"])(oData.Result.Accounts)) {
          ___WEBPACK_IMPORTED_MODULE_10___default.a.each(Stores_User_Account__WEBPACK_IMPORTED_MODULE_27__[/* default */ "a"].accounts(), function (oAccount) {
            counts[oAccount.email] = oAccount.count();
          });

          Object(Common_Utils__WEBPACK_IMPORTED_MODULE_13__["delegateRunOnDestroy"])(Stores_User_Account__WEBPACK_IMPORTED_MODULE_27__[/* default */ "a"].accounts());
          Stores_User_Account__WEBPACK_IMPORTED_MODULE_27__[/* default */ "a"].accounts(_babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_5___default()(___WEBPACK_IMPORTED_MODULE_10___default.a).call(___WEBPACK_IMPORTED_MODULE_10___default.a, oData.Result.Accounts, function (sValue) {
            return new Model_Account__WEBPACK_IMPORTED_MODULE_41__[/* AccountModel */ "a"](sValue, sValue !== parentEmail, counts[sValue] || 0);
          }));
        }

        if (Object(Common_Utils__WEBPACK_IMPORTED_MODULE_13__["isUnd"])(bBoot) ? false : !!bBoot) {
          ___WEBPACK_IMPORTED_MODULE_10___default.a.delay(function () {
            return _this4.accountsCounts();
          }, 1000 * 5);

          Common_Events__WEBPACK_IMPORTED_MODULE_21__[/* sub */ "b"]('interval.10m-after5m', function () {
            return _this4.accountsCounts();
          });
        }

        if (Object(Common_Utils__WEBPACK_IMPORTED_MODULE_13__["isArray"])(oData.Result.Identities)) {
          Object(Common_Utils__WEBPACK_IMPORTED_MODULE_13__["delegateRunOnDestroy"])(Stores_User_Identity__WEBPACK_IMPORTED_MODULE_29__[/* default */ "a"].identities());
          Stores_User_Identity__WEBPACK_IMPORTED_MODULE_29__[/* default */ "a"].identities(_babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_5___default()(___WEBPACK_IMPORTED_MODULE_10___default.a).call(___WEBPACK_IMPORTED_MODULE_10___default.a, oData.Result.Identities, function (identityData) {
            var id = Object(Common_Utils__WEBPACK_IMPORTED_MODULE_13__["pString"])(identityData.Id),
                email = Object(Common_Utils__WEBPACK_IMPORTED_MODULE_13__["pString"])(identityData.Email),
                identity = new Model_Identity__WEBPACK_IMPORTED_MODULE_42__[/* IdentityModel */ "a"](id, email);
            identity.name(Object(Common_Utils__WEBPACK_IMPORTED_MODULE_13__["pString"])(identityData.Name));
            identity.replyTo(Object(Common_Utils__WEBPACK_IMPORTED_MODULE_13__["pString"])(identityData.ReplyTo));
            identity.bcc(Object(Common_Utils__WEBPACK_IMPORTED_MODULE_13__["pString"])(identityData.Bcc));
            identity.signature(Object(Common_Utils__WEBPACK_IMPORTED_MODULE_13__["pString"])(identityData.Signature));
            identity.signatureInsertBefore(!!identityData.SignatureInsertBefore);
            return identity;
          }));
        }
      }
    });
  };

  _proto.templates = function templates() {
    Stores_User_Template__WEBPACK_IMPORTED_MODULE_30__[/* default */ "a"].templates.loading(true);
    Remote_User_Ajax__WEBPACK_IMPORTED_MODULE_38__[/* default */ "a"].templates(function (result, data) {
      Stores_User_Template__WEBPACK_IMPORTED_MODULE_30__[/* default */ "a"].templates.loading(false);

      if (Common_Enums__WEBPACK_IMPORTED_MODULE_14__["StorageResultType"].Success === result && data.Result && Object(Common_Utils__WEBPACK_IMPORTED_MODULE_13__["isArray"])(data.Result.Templates)) {
        Object(Common_Utils__WEBPACK_IMPORTED_MODULE_13__["delegateRunOnDestroy"])(Stores_User_Template__WEBPACK_IMPORTED_MODULE_30__[/* default */ "a"].templates());
        Stores_User_Template__WEBPACK_IMPORTED_MODULE_30__[/* default */ "a"].templates(___WEBPACK_IMPORTED_MODULE_10___default.a.compact(_babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_5___default()(___WEBPACK_IMPORTED_MODULE_10___default.a).call(___WEBPACK_IMPORTED_MODULE_10___default.a, data.Result.Templates, function (templateData) {
          var template = new Model_Template__WEBPACK_IMPORTED_MODULE_43__[/* TemplateModel */ "a"]();
          return template.parse(templateData) ? template : null;
        })));
      }
    });
  };

  _proto.quota = function quota() {
    Remote_User_Ajax__WEBPACK_IMPORTED_MODULE_38__[/* default */ "a"].quota(function (result, data) {
      if (Common_Enums__WEBPACK_IMPORTED_MODULE_14__["StorageResultType"].Success === result && data && data.Result && Object(Common_Utils__WEBPACK_IMPORTED_MODULE_13__["isArray"])(data.Result) && 1 < data.Result.length && Object(Common_Utils__WEBPACK_IMPORTED_MODULE_13__["isPosNumeric"])(data.Result[0], true) && Object(Common_Utils__WEBPACK_IMPORTED_MODULE_13__["isPosNumeric"])(data.Result[1], true)) {
        Stores_User_Quota__WEBPACK_IMPORTED_MODULE_34__[/* default */ "a"].populateData(Object(Common_Utils__WEBPACK_IMPORTED_MODULE_13__["pInt"])(data.Result[1]), Object(Common_Utils__WEBPACK_IMPORTED_MODULE_13__["pInt"])(data.Result[0]));
      }
    });
  }
  /**
   * @param {string} folder
   * @param {Array=} list = []
   */
  ;

  _proto.folderInformation = function folderInformation(folder, list) {
    var _this5 = this;

    if ('' !== Object(Common_Utils__WEBPACK_IMPORTED_MODULE_13__["trim"])(folder)) {
      Remote_User_Ajax__WEBPACK_IMPORTED_MODULE_38__[/* default */ "a"].folderInformation(function (result, data) {
        if (Common_Enums__WEBPACK_IMPORTED_MODULE_14__["StorageResultType"].Success === result) {
          if (data && data.Result && data.Result.Hash && data.Result.Folder) {
            var uid = '',
                check = false,
                unreadCountChange = false;
            var folderFromCache = Object(Common_Cache__WEBPACK_IMPORTED_MODULE_19__[/* getFolderFromCacheList */ "e"])(data.Result.Folder);

            if (folderFromCache) {
              folderFromCache.interval = Object(Common_Momentor__WEBPACK_IMPORTED_MODULE_18__["momentNowUnix"])();

              if (data.Result.Hash) {
                Object(Common_Cache__WEBPACK_IMPORTED_MODULE_19__[/* setFolderHash */ "q"])(data.Result.Folder, data.Result.Hash);
              }

              if (Object(Common_Utils__WEBPACK_IMPORTED_MODULE_13__["isNormal"])(data.Result.MessageCount)) {
                folderFromCache.messageCountAll(data.Result.MessageCount);
              }

              if (Object(Common_Utils__WEBPACK_IMPORTED_MODULE_13__["isNormal"])(data.Result.MessageUnseenCount)) {
                if (Object(Common_Utils__WEBPACK_IMPORTED_MODULE_13__["pInt"])(folderFromCache.messageCountUnread()) !== Object(Common_Utils__WEBPACK_IMPORTED_MODULE_13__["pInt"])(data.Result.MessageUnseenCount)) {
                  unreadCountChange = true;
                }

                folderFromCache.messageCountUnread(data.Result.MessageUnseenCount);
              }

              if (unreadCountChange) {
                Object(Common_Cache__WEBPACK_IMPORTED_MODULE_19__[/* clearMessageFlagsFromCacheByFolder */ "c"])(folderFromCache.fullNameRaw);
              }

              if (data.Result.Flags) {
                for (uid in data.Result.Flags) {
                  if (Object(Common_Utils__WEBPACK_IMPORTED_MODULE_13__["has"])(data.Result.Flags, uid)) {
                    check = true;
                    var flags = data.Result.Flags[uid];
                    Object(Common_Cache__WEBPACK_IMPORTED_MODULE_19__[/* storeMessageFlagsToCacheByFolderAndUid */ "v"])(folderFromCache.fullNameRaw, uid.toString(), [!flags.IsSeen, !!flags.IsFlagged, !!flags.IsAnswered, !!flags.IsForwarded, !!flags.IsReadReceipt]);
                  }
                }

                if (check) {
                  _this5.reloadFlagsCurrentMessageListAndMessageFromCache();
                }
              }

              Stores_User_Message__WEBPACK_IMPORTED_MODULE_33__[/* default */ "a"].initUidNextAndNewMessages(folderFromCache.fullNameRaw, data.Result.UidNext, data.Result.NewMessages);
              var hash = Object(Common_Cache__WEBPACK_IMPORTED_MODULE_19__[/* getFolderHash */ "g"])(data.Result.Folder);

              if (data.Result.Hash !== hash || '' === hash || unreadCountChange) {
                if (folderFromCache.fullNameRaw === Stores_User_Folder__WEBPACK_IMPORTED_MODULE_31__[/* default */ "a"].currentFolderFullNameRaw()) {
                  _this5.reloadMessageList();
                } else if (Object(Common_Cache__WEBPACK_IMPORTED_MODULE_19__[/* getFolderInboxName */ "h"])() === folderFromCache.fullNameRaw) {
                  _this5.recacheInboxMessageList();
                }
              }
            }
          }
        }
      }, folder, list);
    }
  }
  /**
   * @param {boolean=} boot = false
   */
  ;

  _proto.folderInformationMultiply = function folderInformationMultiply(boot) {
    var _this6 = this;

    if (boot === void 0) {
      boot = false;
    }

    var folders = Stores_User_Folder__WEBPACK_IMPORTED_MODULE_31__[/* default */ "a"].getNextFolderNames();

    if (Object(Common_Utils__WEBPACK_IMPORTED_MODULE_13__["isNonEmptyArray"])(folders)) {
      Remote_User_Ajax__WEBPACK_IMPORTED_MODULE_38__[/* default */ "a"].folderInformationMultiply(function (sResult, oData) {
        if (Common_Enums__WEBPACK_IMPORTED_MODULE_14__["StorageResultType"].Success === sResult) {
          if (oData && oData.Result && oData.Result.List && Object(Common_Utils__WEBPACK_IMPORTED_MODULE_13__["isNonEmptyArray"])(oData.Result.List)) {
            var utc = Object(Common_Momentor__WEBPACK_IMPORTED_MODULE_18__["momentNowUnix"])();

            ___WEBPACK_IMPORTED_MODULE_10___default.a.each(oData.Result.List, function (item) {
              var hash = Object(Common_Cache__WEBPACK_IMPORTED_MODULE_19__[/* getFolderHash */ "g"])(item.Folder),
                  folder = Object(Common_Cache__WEBPACK_IMPORTED_MODULE_19__[/* getFolderFromCacheList */ "e"])(item.Folder);
              var unreadCountChange = false;

              if (folder) {
                folder.interval = utc;

                if (item.Hash) {
                  Object(Common_Cache__WEBPACK_IMPORTED_MODULE_19__[/* setFolderHash */ "q"])(item.Folder, item.Hash);
                }

                if (Object(Common_Utils__WEBPACK_IMPORTED_MODULE_13__["isNormal"])(item.MessageCount)) {
                  folder.messageCountAll(item.MessageCount);
                }

                if (Object(Common_Utils__WEBPACK_IMPORTED_MODULE_13__["isNormal"])(item.MessageUnseenCount)) {
                  if (Object(Common_Utils__WEBPACK_IMPORTED_MODULE_13__["pInt"])(folder.messageCountUnread()) !== Object(Common_Utils__WEBPACK_IMPORTED_MODULE_13__["pInt"])(item.MessageUnseenCount)) {
                    unreadCountChange = true;
                  }

                  folder.messageCountUnread(item.MessageUnseenCount);
                }

                if (unreadCountChange) {
                  Object(Common_Cache__WEBPACK_IMPORTED_MODULE_19__[/* clearMessageFlagsFromCacheByFolder */ "c"])(folder.fullNameRaw);
                }

                if (item.Hash !== hash || '' === hash) {
                  if (folder.fullNameRaw === Stores_User_Folder__WEBPACK_IMPORTED_MODULE_31__[/* default */ "a"].currentFolderFullNameRaw()) {
                    _this6.reloadMessageList();
                  }
                } else if (unreadCountChange) {
                  if (folder.fullNameRaw === Stores_User_Folder__WEBPACK_IMPORTED_MODULE_31__[/* default */ "a"].currentFolderFullNameRaw()) {
                    var list = Stores_User_Message__WEBPACK_IMPORTED_MODULE_33__[/* default */ "a"].messageList();

                    if (Object(Common_Utils__WEBPACK_IMPORTED_MODULE_13__["isNonEmptyArray"])(list)) {
                      _this6.folderInformation(folder.fullNameRaw, list);
                    }
                  }
                }
              }
            });

            if (boot) {
              ___WEBPACK_IMPORTED_MODULE_10___default.a.delay(function () {
                return _this6.folderInformationMultiply(true);
              }, 2000);
            }
          }
        }
      }, folders);
    }
  }
  /**
   * @param {string} sFolderFullNameRaw
   * @param {number} iSetAction
   * @param {Array=} messages = null
   */
  ;

  _proto.messageListAction = function messageListAction(sFolderFullNameRaw, iSetAction, messages) {
    var folder = null,
        alreadyUnread = 0,
        rootUids = [];

    if (Object(Common_Utils__WEBPACK_IMPORTED_MODULE_13__["isUnd"])(messages) || !messages) {
      messages = Stores_User_Message__WEBPACK_IMPORTED_MODULE_33__[/* default */ "a"].messageListChecked();
    }

    rootUids = ___WEBPACK_IMPORTED_MODULE_10___default.a.uniq(___WEBPACK_IMPORTED_MODULE_10___default.a.compact(_babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_5___default()(___WEBPACK_IMPORTED_MODULE_10___default.a).call(___WEBPACK_IMPORTED_MODULE_10___default.a, messages, function (oMessage) {
      return oMessage && oMessage.uid ? oMessage.uid : null;
    })));

    if ('' !== sFolderFullNameRaw && 0 < rootUids.length) {
      switch (iSetAction) {
        case Common_Enums__WEBPACK_IMPORTED_MODULE_14__["MessageSetAction"].SetSeen:
          ___WEBPACK_IMPORTED_MODULE_10___default.a.each(rootUids, function (sSubUid) {
            alreadyUnread += Object(Common_Cache__WEBPACK_IMPORTED_MODULE_19__[/* storeMessageFlagsToCacheBySetAction */ "w"])(sFolderFullNameRaw, sSubUid, iSetAction);
          });

          folder = Object(Common_Cache__WEBPACK_IMPORTED_MODULE_19__[/* getFolderFromCacheList */ "e"])(sFolderFullNameRaw);

          if (folder) {
            folder.messageCountUnread(folder.messageCountUnread() - alreadyUnread);
          }

          Remote_User_Ajax__WEBPACK_IMPORTED_MODULE_38__[/* default */ "a"].messageSetSeen(Common_Utils__WEBPACK_IMPORTED_MODULE_13__["noop"], sFolderFullNameRaw, rootUids, true);
          break;

        case Common_Enums__WEBPACK_IMPORTED_MODULE_14__["MessageSetAction"].UnsetSeen:
          ___WEBPACK_IMPORTED_MODULE_10___default.a.each(rootUids, function (sSubUid) {
            alreadyUnread += Object(Common_Cache__WEBPACK_IMPORTED_MODULE_19__[/* storeMessageFlagsToCacheBySetAction */ "w"])(sFolderFullNameRaw, sSubUid, iSetAction);
          });

          folder = Object(Common_Cache__WEBPACK_IMPORTED_MODULE_19__[/* getFolderFromCacheList */ "e"])(sFolderFullNameRaw);

          if (folder) {
            folder.messageCountUnread(folder.messageCountUnread() - alreadyUnread + rootUids.length);
          }

          Remote_User_Ajax__WEBPACK_IMPORTED_MODULE_38__[/* default */ "a"].messageSetSeen(Common_Utils__WEBPACK_IMPORTED_MODULE_13__["noop"], sFolderFullNameRaw, rootUids, false);
          break;

        case Common_Enums__WEBPACK_IMPORTED_MODULE_14__["MessageSetAction"].SetFlag:
          ___WEBPACK_IMPORTED_MODULE_10___default.a.each(rootUids, function (sSubUid) {
            Object(Common_Cache__WEBPACK_IMPORTED_MODULE_19__[/* storeMessageFlagsToCacheBySetAction */ "w"])(sFolderFullNameRaw, sSubUid, iSetAction);
          });

          Remote_User_Ajax__WEBPACK_IMPORTED_MODULE_38__[/* default */ "a"].messageSetFlagged(Common_Utils__WEBPACK_IMPORTED_MODULE_13__["noop"], sFolderFullNameRaw, rootUids, true);
          break;

        case Common_Enums__WEBPACK_IMPORTED_MODULE_14__["MessageSetAction"].UnsetFlag:
          ___WEBPACK_IMPORTED_MODULE_10___default.a.each(rootUids, function (sSubUid) {
            Object(Common_Cache__WEBPACK_IMPORTED_MODULE_19__[/* storeMessageFlagsToCacheBySetAction */ "w"])(sFolderFullNameRaw, sSubUid, iSetAction);
          });

          Remote_User_Ajax__WEBPACK_IMPORTED_MODULE_38__[/* default */ "a"].messageSetFlagged(Common_Utils__WEBPACK_IMPORTED_MODULE_13__["noop"], sFolderFullNameRaw, rootUids, false);
          break;
        // no default
      }

      this.reloadFlagsCurrentMessageListAndMessageFromCache();
      Stores_User_Message__WEBPACK_IMPORTED_MODULE_33__[/* default */ "a"].message.viewTrigger(!Stores_User_Message__WEBPACK_IMPORTED_MODULE_33__[/* default */ "a"].message.viewTrigger());
    }
  };

  _proto.googleConnect = function googleConnect() {
    window__WEBPACK_IMPORTED_MODULE_9___default.a.open(Object(Common_Links__WEBPACK_IMPORTED_MODULE_20__[/* socialGoogle */ "B"])(), 'Google', 'left=200,top=100,width=650,height=600,menubar=no,status=no,resizable=yes,scrollbars=yes');
  };

  _proto.twitterConnect = function twitterConnect() {
    window__WEBPACK_IMPORTED_MODULE_9___default.a.open(Object(Common_Links__WEBPACK_IMPORTED_MODULE_20__[/* socialTwitter */ "C"])(), 'Twitter', 'left=200,top=100,width=650,height=350,menubar=no,status=no,resizable=yes,scrollbars=yes');
  };

  _proto.facebookConnect = function facebookConnect() {
    window__WEBPACK_IMPORTED_MODULE_9___default.a.open(Object(Common_Links__WEBPACK_IMPORTED_MODULE_20__[/* socialFacebook */ "A"])(), 'Facebook', 'left=200,top=100,width=650,height=335,menubar=no,status=no,resizable=yes,scrollbars=yes');
  }
  /**
   * @param {boolean=} fireAllActions = false
   */
  ;

  _proto.socialUsers = function socialUsers(fireAllActions) {
    if (fireAllActions === void 0) {
      fireAllActions = false;
    }

    if (true === fireAllActions) {
      Stores_Social__WEBPACK_IMPORTED_MODULE_23__[/* default */ "a"].google.loading(true);
      Stores_Social__WEBPACK_IMPORTED_MODULE_23__[/* default */ "a"].facebook.loading(true);
      Stores_Social__WEBPACK_IMPORTED_MODULE_23__[/* default */ "a"].twitter.loading(true);
    }

    Remote_User_Ajax__WEBPACK_IMPORTED_MODULE_38__[/* default */ "a"].socialUsers(function (result, data) {
      if (Common_Enums__WEBPACK_IMPORTED_MODULE_14__["StorageResultType"].Success === result && data && data.Result) {
        Stores_Social__WEBPACK_IMPORTED_MODULE_23__[/* default */ "a"].google.userName(data.Result.Google || '');
        Stores_Social__WEBPACK_IMPORTED_MODULE_23__[/* default */ "a"].facebook.userName(data.Result.Facebook || '');
        Stores_Social__WEBPACK_IMPORTED_MODULE_23__[/* default */ "a"].twitter.userName(data.Result.Twitter || '');
      } else {
        Stores_Social__WEBPACK_IMPORTED_MODULE_23__[/* default */ "a"].google.userName('');
        Stores_Social__WEBPACK_IMPORTED_MODULE_23__[/* default */ "a"].facebook.userName('');
        Stores_Social__WEBPACK_IMPORTED_MODULE_23__[/* default */ "a"].twitter.userName('');
      }

      Stores_Social__WEBPACK_IMPORTED_MODULE_23__[/* default */ "a"].google.loading(false);
      Stores_Social__WEBPACK_IMPORTED_MODULE_23__[/* default */ "a"].facebook.loading(false);
      Stores_Social__WEBPACK_IMPORTED_MODULE_23__[/* default */ "a"].twitter.loading(false);
    });
  };

  _proto.googleDisconnect = function googleDisconnect() {
    Stores_Social__WEBPACK_IMPORTED_MODULE_23__[/* default */ "a"].google.loading(true);
    Remote_User_Ajax__WEBPACK_IMPORTED_MODULE_38__[/* default */ "a"].googleDisconnect(this.socialUsers);
  };

  _proto.facebookDisconnect = function facebookDisconnect() {
    Stores_Social__WEBPACK_IMPORTED_MODULE_23__[/* default */ "a"].facebook.loading(true);
    Remote_User_Ajax__WEBPACK_IMPORTED_MODULE_38__[/* default */ "a"].facebookDisconnect(this.socialUsers);
  };

  _proto.twitterDisconnect = function twitterDisconnect() {
    Stores_Social__WEBPACK_IMPORTED_MODULE_23__[/* default */ "a"].twitter.loading(true);
    Remote_User_Ajax__WEBPACK_IMPORTED_MODULE_38__[/* default */ "a"].twitterDisconnect(this.socialUsers);
  }
  /**
   * @param {string} query
   * @param {Function} autocompleteCallback
   */
  ;

  _proto.getAutocomplete = function getAutocomplete(query, autocompleteCallback) {
    Remote_User_Ajax__WEBPACK_IMPORTED_MODULE_38__[/* default */ "a"].suggestions(function (result, data) {
      if (Common_Enums__WEBPACK_IMPORTED_MODULE_14__["StorageResultType"].Success === result && data && Object(Common_Utils__WEBPACK_IMPORTED_MODULE_13__["isArray"])(data.Result)) {
        autocompleteCallback(___WEBPACK_IMPORTED_MODULE_10___default.a.compact(_babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_5___default()(___WEBPACK_IMPORTED_MODULE_10___default.a).call(___WEBPACK_IMPORTED_MODULE_10___default.a, data.Result, function (item) {
          return item && item[0] ? new Model_Email__WEBPACK_IMPORTED_MODULE_40__["EmailModel"](item[0], item[1]) : null;
        })));
      } else if (Common_Enums__WEBPACK_IMPORTED_MODULE_14__["StorageResultType"].Abort !== result) {
        autocompleteCallback([]);
      }
    }, query);
  }
  /**
   * @param {string} sFullNameHash
   * @param {boolean} bExpanded
   */
  ;

  _proto.setExpandedFolder = function setExpandedFolder(sFullNameHash, bExpanded) {
    var aExpandedList = Storage_Client__WEBPACK_IMPORTED_MODULE_35__[/* get */ "a"](Common_Enums__WEBPACK_IMPORTED_MODULE_14__["ClientSideKeyName"].ExpandedFolders);

    if (!Object(Common_Utils__WEBPACK_IMPORTED_MODULE_13__["isArray"])(aExpandedList)) {
      aExpandedList = [];
    }

    if (bExpanded) {
      aExpandedList.push(sFullNameHash);
      aExpandedList = ___WEBPACK_IMPORTED_MODULE_10___default.a.uniq(aExpandedList);
    } else {
      aExpandedList = ___WEBPACK_IMPORTED_MODULE_10___default.a.without(aExpandedList, sFullNameHash);
    }

    Storage_Client__WEBPACK_IMPORTED_MODULE_35__[/* set */ "b"](Common_Enums__WEBPACK_IMPORTED_MODULE_14__["ClientSideKeyName"].ExpandedFolders, aExpandedList);
  };

  _proto.initHorizontalLayoutResizer = function initHorizontalLayoutResizer(sClientSideKeyName) {
    var top = null,
        bottom = null;

    var minHeight = 200,
        maxHeight = 500,
        fSetHeight = function fSetHeight(height) {
      if (height) {
        if (top) {
          top.attr('style', 'height:' + height + 'px');
        }

        if (bottom) {
          bottom.attr('style', 'top:' + (55
          /* top toolbar */
          + height) + 'px');
        }
      }
    },
        fResizeCreateFunction = function fResizeCreateFunction(event) {
      if (event && event.target) {
        var _context;

        _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_4___default()(_context = $__WEBPACK_IMPORTED_MODULE_11___default()(event.target)).call(_context, '.ui-resizable-handle').on('mousedown', function () {
          Common_Globals__WEBPACK_IMPORTED_MODULE_15__["$html"].addClass('rl-resizer');
        }).on('mouseup', function () {
          Common_Globals__WEBPACK_IMPORTED_MODULE_15__["$html"].removeClass('rl-resizer');
        });
      }
    },
        fResizeStartFunction = function fResizeStartFunction() {
      Common_Globals__WEBPACK_IMPORTED_MODULE_15__["$html"].addClass('rl-resizer');
    },
        fResizeResizeFunction = ___WEBPACK_IMPORTED_MODULE_10___default.a.debounce(function () {
      Common_Globals__WEBPACK_IMPORTED_MODULE_15__["$html"].addClass('rl-resizer');
    }, 500, true),
        fResizeStopFunction = function fResizeStopFunction(oEvent, oObject) {
      Common_Globals__WEBPACK_IMPORTED_MODULE_15__["$html"].removeClass('rl-resizer');

      if (oObject && oObject.size && oObject.size.height) {
        Storage_Client__WEBPACK_IMPORTED_MODULE_35__[/* set */ "b"](sClientSideKeyName, oObject.size.height);
        fSetHeight(oObject.size.height);
        Object(Common_Utils__WEBPACK_IMPORTED_MODULE_13__["windowResize"])();
      }
    },
        oOptions = {
      helper: 'ui-resizable-helper-h',
      minHeight: minHeight,
      maxHeight: maxHeight,
      handles: 's',
      create: fResizeCreateFunction,
      resize: fResizeResizeFunction,
      start: fResizeStartFunction,
      stop: fResizeStopFunction
    },
        fDisable = function fDisable(bDisable) {
      if (bDisable) {
        if (top && top.hasClass('ui-resizable')) {
          top.resizable('destroy').removeAttr('style');
        }

        if (bottom) {
          bottom.removeAttr('style');
        }
      } else if (Common_Globals__WEBPACK_IMPORTED_MODULE_15__["$html"].hasClass('rl-bottom-preview-pane')) {
        top = $__WEBPACK_IMPORTED_MODULE_11___default()('.b-message-list-wrapper');
        bottom = $__WEBPACK_IMPORTED_MODULE_11___default()('.b-message-view-wrapper');

        if (!top.hasClass('ui-resizable')) {
          top.resizable(oOptions);
        }

        var iHeight = Object(Common_Utils__WEBPACK_IMPORTED_MODULE_13__["pInt"])(Storage_Client__WEBPACK_IMPORTED_MODULE_35__[/* get */ "a"](sClientSideKeyName)) || 300;
        fSetHeight(iHeight > minHeight ? iHeight : minHeight);
      }
    };

    fDisable(false);
    Common_Events__WEBPACK_IMPORTED_MODULE_21__[/* sub */ "b"]('layout', function (layout) {
      fDisable(Common_Enums__WEBPACK_IMPORTED_MODULE_14__["Layout"].BottomPreview !== layout);
    });
  };

  _proto.initVerticalLayoutResizer = function initVerticalLayoutResizer(sClientSideKeyName) {
    var disabledWidth = 60,
        minWidth = 155,
        lLeft = $__WEBPACK_IMPORTED_MODULE_11___default()('#rl-left'),
        right = $__WEBPACK_IMPORTED_MODULE_11___default()('#rl-right'),
        mLeftWidth = Storage_Client__WEBPACK_IMPORTED_MODULE_35__[/* get */ "a"](sClientSideKeyName) || null,
        fSetWidth = function fSetWidth(iWidth) {
      if (iWidth) {
        Object(Common_Globals__WEBPACK_IMPORTED_MODULE_15__["leftPanelWidth"])(iWidth);
        Common_Globals__WEBPACK_IMPORTED_MODULE_15__["$html"].removeClass('rl-resizer');
        lLeft.css({
          width: '' + iWidth + 'px'
        });
        right.css({
          left: '' + iWidth + 'px'
        });
      }
    },
        fDisable = function fDisable(bDisable) {
      if (bDisable) {
        lLeft.resizable('disable');
        fSetWidth(disabledWidth);
      } else {
        lLeft.resizable('enable');
        var width = Object(Common_Utils__WEBPACK_IMPORTED_MODULE_13__["pInt"])(Storage_Client__WEBPACK_IMPORTED_MODULE_35__[/* get */ "a"](sClientSideKeyName)) || minWidth;
        fSetWidth(width > minWidth ? width : minWidth);
      }
    },
        fResizeCreateFunction = function fResizeCreateFunction(event) {
      if (event && event.target) {
        var _context2;

        _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_4___default()(_context2 = $__WEBPACK_IMPORTED_MODULE_11___default()(event.target)).call(_context2, '.ui-resizable-handle').on('mousedown', function () {
          Common_Globals__WEBPACK_IMPORTED_MODULE_15__["$html"].addClass('rl-resizer');
        }).on('mouseup', function () {
          Common_Globals__WEBPACK_IMPORTED_MODULE_15__["$html"].removeClass('rl-resizer');
        });
      }
    },
        fResizeResizeFunction = ___WEBPACK_IMPORTED_MODULE_10___default.a.debounce(function () {
      Common_Globals__WEBPACK_IMPORTED_MODULE_15__["$html"].addClass('rl-resizer');
    }, 500, true),
        fResizeStartFunction = function fResizeStartFunction() {
      Common_Globals__WEBPACK_IMPORTED_MODULE_15__["$html"].addClass('rl-resizer');
    },
        fResizeStopFunction = function fResizeStopFunction(event, obj) {
      Common_Globals__WEBPACK_IMPORTED_MODULE_15__["$html"].removeClass('rl-resizer');

      if (obj && obj.size && obj.size.width) {
        Storage_Client__WEBPACK_IMPORTED_MODULE_35__[/* set */ "b"](sClientSideKeyName, obj.size.width);
        Object(Common_Globals__WEBPACK_IMPORTED_MODULE_15__["leftPanelWidth"])(obj.size.width);
        right.css({
          left: '' + obj.size.width + 'px'
        });
        lLeft.css({
          position: '',
          top: '',
          left: '',
          height: ''
        });
      }
    };

    if (null !== mLeftWidth) {
      fSetWidth(mLeftWidth > minWidth ? mLeftWidth : minWidth);
    }

    lLeft.resizable({
      helper: 'ui-resizable-helper-w',
      minWidth: minWidth,
      maxWidth: Common_Enums__WEBPACK_IMPORTED_MODULE_14__["Magics"].Size350px,
      handles: 'e',
      create: fResizeCreateFunction,
      resize: fResizeResizeFunction,
      start: fResizeStartFunction,
      stop: fResizeStopFunction
    });
    Common_Events__WEBPACK_IMPORTED_MODULE_21__[/* sub */ "b"]('left-panel.off', function () {
      fDisable(true);
    });
    Common_Events__WEBPACK_IMPORTED_MODULE_21__[/* sub */ "b"]('left-panel.on', function () {
      fDisable(false);
    });
  };

  _proto.logout = function logout() {
    var _this7 = this;

    Remote_User_Ajax__WEBPACK_IMPORTED_MODULE_38__[/* default */ "a"].logout(function () {
      _this7.loginAndLogoutReload(false, true, Storage_Settings__WEBPACK_IMPORTED_MODULE_36__["settingsGet"]('ParentEmail') && 0 < Storage_Settings__WEBPACK_IMPORTED_MODULE_36__["settingsGet"]('ParentEmail').length);
    });
  };

  _proto.bootstartTwoFactorScreen = function bootstartTwoFactorScreen() {
    Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_48__["showScreenPopup"])(__webpack_require__(/*! View/Popup/TwoFactorConfiguration */ 411), [true]);
  };

  _proto.bootstartWelcomePopup = function bootstartWelcomePopup(url) {
    Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_48__["showScreenPopup"])(__webpack_require__(/*! View/Popup/WelcomePage */ 533), [url]);
  };

  _proto.bootstartLoginScreen = function bootstartLoginScreen() {
    Common_Globals__WEBPACK_IMPORTED_MODULE_15__["$html"].removeClass('rl-user-auth').addClass('rl-user-no-auth');
    var customLoginLink = Object(Common_Utils__WEBPACK_IMPORTED_MODULE_13__["pString"])(Storage_Settings__WEBPACK_IMPORTED_MODULE_36__["appSettingsGet"]('customLoginLink'));

    if (!customLoginLink) {
      Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_48__["startScreens"])([Screen_User_Login__WEBPACK_IMPORTED_MODULE_45__[/* LoginUserScreen */ "a"]]);
      Object(Common_Plugins__WEBPACK_IMPORTED_MODULE_17__[/* runHook */ "f"])('rl-start-login-screens');
      Common_Events__WEBPACK_IMPORTED_MODULE_21__[/* pub */ "a"]('rl.bootstart-login-screens');
    } else {
      Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_48__["routeOff"])();
      Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_48__["setHash"])(Object(Common_Links__WEBPACK_IMPORTED_MODULE_20__[/* root */ "w"])(), true);
      Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_48__["routeOff"])();

      ___WEBPACK_IMPORTED_MODULE_10___default.a.defer(function () {
        window__WEBPACK_IMPORTED_MODULE_9___default.a.location.href = customLoginLink;
      });
    }
  };

  _proto.bootend = function bootend() {
    if (progressJs__WEBPACK_IMPORTED_MODULE_12___default.a) {
      progressJs__WEBPACK_IMPORTED_MODULE_12___default.a.set(100).end();
    }

    Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_48__["hideLoading"])();
  };

  _proto.bootstart = function bootstart() {
    var _this8 = this;

    _AbstractApp.prototype.bootstart.call(this);

    Stores_User_App__WEBPACK_IMPORTED_MODULE_24__[/* default */ "a"].populate();
    Stores_User_Settings__WEBPACK_IMPORTED_MODULE_25__[/* default */ "a"].populate();
    Stores_User_Notification__WEBPACK_IMPORTED_MODULE_26__[/* default */ "a"].populate();
    Stores_User_Account__WEBPACK_IMPORTED_MODULE_27__[/* default */ "a"].populate();
    Stores_User_Contact__WEBPACK_IMPORTED_MODULE_28__[/* default */ "a"].populate();
    var contactsSyncInterval = Object(Common_Utils__WEBPACK_IMPORTED_MODULE_13__["pInt"])(Storage_Settings__WEBPACK_IMPORTED_MODULE_36__["settingsGet"]('ContactsSyncInterval'));
    var jsHash = Storage_Settings__WEBPACK_IMPORTED_MODULE_36__["appSettingsGet"]('jsHash'),
        startupUrl = Object(Common_Utils__WEBPACK_IMPORTED_MODULE_13__["pString"])(Storage_Settings__WEBPACK_IMPORTED_MODULE_36__["settingsGet"]('StartupUrl')),
        allowGoogle = Storage_Settings__WEBPACK_IMPORTED_MODULE_36__["settingsGet"]('AllowGoogleSocial'),
        allowFacebook = Storage_Settings__WEBPACK_IMPORTED_MODULE_36__["settingsGet"]('AllowFacebookSocial'),
        allowTwitter = Storage_Settings__WEBPACK_IMPORTED_MODULE_36__["settingsGet"]('AllowTwitterSocial');

    if (progressJs__WEBPACK_IMPORTED_MODULE_12___default.a) {
      progressJs__WEBPACK_IMPORTED_MODULE_12___default.a.set(90);
    }

    Common_Globals__WEBPACK_IMPORTED_MODULE_15__["leftPanelDisabled"].subscribe(function (value) {
      Common_Events__WEBPACK_IMPORTED_MODULE_21__[/* pub */ "a"]('left-panel.' + (value ? 'off' : 'on'));
    });
    this.setWindowTitle('');

    if (Storage_Settings__WEBPACK_IMPORTED_MODULE_36__["settingsGet"]('Auth')) {
      Common_Globals__WEBPACK_IMPORTED_MODULE_15__["$html"].addClass('rl-user-auth');

      if (Storage_Settings__WEBPACK_IMPORTED_MODULE_36__["capa"](Common_Enums__WEBPACK_IMPORTED_MODULE_14__["Capa"].TwoFactor) && Storage_Settings__WEBPACK_IMPORTED_MODULE_36__["capa"](Common_Enums__WEBPACK_IMPORTED_MODULE_14__["Capa"].TwoFactorForce) && Storage_Settings__WEBPACK_IMPORTED_MODULE_36__["settingsGet"]('RequireTwoFactor')) {
        this.bootend();
        this.bootstartTwoFactorScreen();
      } else {
        this.setWindowTitle(Object(Common_Translator__WEBPACK_IMPORTED_MODULE_22__["i18n"])('TITLES/LOADING')); // require.ensure([], function() { // require code splitting

        this.foldersReload(function (value) {
          _this8.bootend();

          if (value) {
            if ('' !== startupUrl) {
              Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_48__["routeOff"])();
              Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_48__["setHash"])(Object(Common_Links__WEBPACK_IMPORTED_MODULE_20__[/* root */ "w"])(startupUrl), true);
              Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_48__["routeOn"])();
            }

            if (Common_Utils__WEBPACK_IMPORTED_MODULE_13__["jassl"] && window__WEBPACK_IMPORTED_MODULE_9___default.a.crypto && window__WEBPACK_IMPORTED_MODULE_9___default.a.crypto.getRandomValues && Storage_Settings__WEBPACK_IMPORTED_MODULE_36__["capa"](Common_Enums__WEBPACK_IMPORTED_MODULE_14__["Capa"].OpenPGP)) {
              var openpgpCallback = function openpgpCallback(openpgp) {
                Stores_User_Pgp__WEBPACK_IMPORTED_MODULE_32__[/* default */ "a"].openpgp = openpgp;

                if (window__WEBPACK_IMPORTED_MODULE_9___default.a.Worker) {
                  try {
                    Stores_User_Pgp__WEBPACK_IMPORTED_MODULE_32__[/* default */ "a"].openpgp.initWorker({
                      path: Object(Common_Links__WEBPACK_IMPORTED_MODULE_20__[/* openPgpWorkerJs */ "t"])()
                    });
                  } catch (e) {
                    Object(Common_Utils__WEBPACK_IMPORTED_MODULE_13__["log"])(e);
                  }
                }

                Stores_User_Pgp__WEBPACK_IMPORTED_MODULE_32__[/* default */ "a"].openpgpKeyring = new openpgp.Keyring();
                Stores_User_Pgp__WEBPACK_IMPORTED_MODULE_32__[/* default */ "a"].capaOpenPGP(true);
                Common_Events__WEBPACK_IMPORTED_MODULE_21__[/* pub */ "a"]('openpgp.init');

                _this8.reloadOpenPgpKeys();
              };

              if (window__WEBPACK_IMPORTED_MODULE_9___default.a.openpgp) {
                openpgpCallback(window__WEBPACK_IMPORTED_MODULE_9___default.a.openpgp);
              } else {
                Object(Common_Utils__WEBPACK_IMPORTED_MODULE_13__["jassl"])(Object(Common_Links__WEBPACK_IMPORTED_MODULE_20__[/* openPgpJs */ "s"])()).then(function () {
                  if (window__WEBPACK_IMPORTED_MODULE_9___default.a.openpgp) {
                    openpgpCallback(window__WEBPACK_IMPORTED_MODULE_9___default.a.openpgp);
                  }
                });
              }
            } else {
              Stores_User_Pgp__WEBPACK_IMPORTED_MODULE_32__[/* default */ "a"].capaOpenPGP(false);
            }

            Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_48__["startScreens"])([Screen_User_MailBox__WEBPACK_IMPORTED_MODULE_46__[/* MailBoxUserScreen */ "a"], Storage_Settings__WEBPACK_IMPORTED_MODULE_36__["capa"](Common_Enums__WEBPACK_IMPORTED_MODULE_14__["Capa"].Settings) ? Screen_User_Settings__WEBPACK_IMPORTED_MODULE_47__[/* SettingsUserScreen */ "a"] : null // false ? AboutUserScreen : null
            ]);

            if (allowGoogle || allowFacebook || allowTwitter) {
              _this8.socialUsers(true);
            }

            Common_Events__WEBPACK_IMPORTED_MODULE_21__[/* sub */ "b"]('interval.2m', function () {
              return _this8.folderInformation(Object(Common_Cache__WEBPACK_IMPORTED_MODULE_19__[/* getFolderInboxName */ "h"])());
            });
            Common_Events__WEBPACK_IMPORTED_MODULE_21__[/* sub */ "b"]('interval.3m', function () {
              var sF = Stores_User_Folder__WEBPACK_IMPORTED_MODULE_31__[/* default */ "a"].currentFolderFullNameRaw();

              if (Object(Common_Cache__WEBPACK_IMPORTED_MODULE_19__[/* getFolderInboxName */ "h"])() !== sF) {
                _this8.folderInformation(sF);
              }
            });
            Common_Events__WEBPACK_IMPORTED_MODULE_21__[/* sub */ "b"]('interval.2m-after5m', function () {
              return _this8.folderInformationMultiply();
            });
            Common_Events__WEBPACK_IMPORTED_MODULE_21__[/* sub */ "b"]('interval.15m', function () {
              return _this8.quota();
            });
            Common_Events__WEBPACK_IMPORTED_MODULE_21__[/* sub */ "b"]('interval.20m', function () {
              return _this8.foldersReload();
            });
            contactsSyncInterval = 5 <= contactsSyncInterval ? contactsSyncInterval : 20;
            contactsSyncInterval = 320 >= contactsSyncInterval ? contactsSyncInterval : 320;

            ___WEBPACK_IMPORTED_MODULE_10___default.a.delay(function () {
              return _this8.contactsSync();
            }, Common_Enums__WEBPACK_IMPORTED_MODULE_14__["Magics"].Time10s);

            ___WEBPACK_IMPORTED_MODULE_10___default.a.delay(function () {
              return _this8.folderInformationMultiply(true);
            }, Common_Enums__WEBPACK_IMPORTED_MODULE_14__["Magics"].Time2s);

            window__WEBPACK_IMPORTED_MODULE_9___default.a.setInterval(function () {
              return _this8.contactsSync();
            }, contactsSyncInterval * 60000 + 5000);

            _this8.accountsAndIdentities(true);

            ___WEBPACK_IMPORTED_MODULE_10___default.a.delay(function () {
              var sF = Stores_User_Folder__WEBPACK_IMPORTED_MODULE_31__[/* default */ "a"].currentFolderFullNameRaw();

              if (Object(Common_Cache__WEBPACK_IMPORTED_MODULE_19__[/* getFolderInboxName */ "h"])() !== sF) {
                _this8.folderInformation(sF);
              }
            }, 1000);

            ___WEBPACK_IMPORTED_MODULE_10___default.a.delay(function () {
              return _this8.quota();
            }, 5000);

            ___WEBPACK_IMPORTED_MODULE_10___default.a.delay(function () {
              return Remote_User_Ajax__WEBPACK_IMPORTED_MODULE_38__[/* default */ "a"].appDelayStart(Common_Utils__WEBPACK_IMPORTED_MODULE_13__["noop"]);
            }, 35000);

            Common_Events__WEBPACK_IMPORTED_MODULE_21__[/* sub */ "b"]('rl.auto-logout', function () {
              return _this8.logout();
            });
            Object(Common_Plugins__WEBPACK_IMPORTED_MODULE_17__[/* runHook */ "f"])('rl-start-user-screens');
            Common_Events__WEBPACK_IMPORTED_MODULE_21__[/* pub */ "a"]('rl.bootstart-user-screens');

            if (Storage_Settings__WEBPACK_IMPORTED_MODULE_36__["settingsGet"]('WelcomePageUrl')) {
              ___WEBPACK_IMPORTED_MODULE_10___default.a.delay(function () {
                return _this8.bootstartWelcomePopup(Storage_Settings__WEBPACK_IMPORTED_MODULE_36__["settingsGet"]('WelcomePageUrl'));
              }, 1000);
            }

            if (!!Storage_Settings__WEBPACK_IMPORTED_MODULE_36__["settingsGet"]('AccountSignMe') && window__WEBPACK_IMPORTED_MODULE_9___default.a.navigator.registerProtocolHandler && Storage_Settings__WEBPACK_IMPORTED_MODULE_36__["capa"](Common_Enums__WEBPACK_IMPORTED_MODULE_14__["Capa"].Composer)) {
              ___WEBPACK_IMPORTED_MODULE_10___default.a.delay(function () {
                try {
                  window__WEBPACK_IMPORTED_MODULE_9___default.a.navigator.registerProtocolHandler('mailto', window__WEBPACK_IMPORTED_MODULE_9___default.a.location.protocol + '//' + window__WEBPACK_IMPORTED_MODULE_9___default.a.location.host + window__WEBPACK_IMPORTED_MODULE_9___default.a.location.pathname + '?mailto&to=%s', '' + (Storage_Settings__WEBPACK_IMPORTED_MODULE_36__["settingsGet"]('Title') || 'RainLoop'));
                } catch (e) {} // eslint-disable-line no-empty


                if (Storage_Settings__WEBPACK_IMPORTED_MODULE_36__["settingsGet"]('MailToEmail')) {
                  Object(Common_Utils__WEBPACK_IMPORTED_MODULE_13__["mailToHelper"])(Storage_Settings__WEBPACK_IMPORTED_MODULE_36__["settingsGet"]('MailToEmail'), __webpack_require__(/*! View/Popup/Compose */ 122));
                }
              }, 500);
            }

            if (!Common_Globals__WEBPACK_IMPORTED_MODULE_15__["bMobileDevice"]) {
              ___WEBPACK_IMPORTED_MODULE_10___default.a.defer(function () {
                return _this8.initVerticalLayoutResizer(Common_Enums__WEBPACK_IMPORTED_MODULE_14__["ClientSideKeyName"].FolderListSize);
              });
            }
          } else {
            _this8.logout();
          }
        }); // }); // require code splitting
      }
    } else {
      this.bootend();
      this.bootstartLoginScreen();
    }

    if (allowGoogle) {
      window__WEBPACK_IMPORTED_MODULE_9___default.a['rl_' + jsHash + '_google_service'] = function () {
        Stores_Social__WEBPACK_IMPORTED_MODULE_23__[/* default */ "a"].google.loading(true);

        _this8.socialUsers();
      };
    }

    if (allowFacebook) {
      window__WEBPACK_IMPORTED_MODULE_9___default.a['rl_' + jsHash + '_facebook_service'] = function () {
        Stores_Social__WEBPACK_IMPORTED_MODULE_23__[/* default */ "a"].facebook.loading(true);

        _this8.socialUsers();
      };
    }

    if (allowTwitter) {
      window__WEBPACK_IMPORTED_MODULE_9___default.a['rl_' + jsHash + '_twitter_service'] = function () {
        Stores_Social__WEBPACK_IMPORTED_MODULE_23__[/* default */ "a"].twitter.loading(true);

        _this8.socialUsers();
      };
    }

    Common_Events__WEBPACK_IMPORTED_MODULE_21__[/* sub */ "b"]('interval.1m', function () {
      return Object(Common_Momentor__WEBPACK_IMPORTED_MODULE_18__["reload"])();
    });
    Object(Common_Plugins__WEBPACK_IMPORTED_MODULE_17__[/* runHook */ "f"])('rl-start-screens');
    Common_Events__WEBPACK_IMPORTED_MODULE_21__[/* pub */ "a"]('rl.bootstart-end');
  };

  return AppUser;
}(App_Abstract__WEBPACK_IMPORTED_MODULE_49__[/* AbstractApp */ "a"]);

/* harmony default export */ __webpack_exports__["default"] = (new AppUser());

/***/ }),
/* 390 */,
/* 391 */,
/* 392 */
/*!******************************!*\
  !*** ./dev/Common/Base64.js ***!
  \******************************/
/*! exports provided: decode, encode, urlsafe_encode */
/*! exports used: urlsafe_encode */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* unused harmony export decode */
/* unused harmony export encode */
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return urlsafe_encode; });
/* harmony import */ var core_js_modules_es_regexp_exec__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.regexp.exec */ 45);
/* harmony import */ var core_js_modules_es_regexp_exec__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_regexp_exec__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var core_js_modules_es_string_replace__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es.string.replace */ 56);
/* harmony import */ var core_js_modules_es_string_replace__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_replace__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_index_of__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/index-of */ 30);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_index_of__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_index_of__WEBPACK_IMPORTED_MODULE_2__);



// Base64 encode / decode
// http://www.webtoolkit.info/
var BASE_64_CHR = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
/* eslint-disable  */

var Base64 = {
  // public method for urlsafe encoding
  urlsafe_encode: function urlsafe_encode(input) {
    return Base64.encode(input).replace(/[+]/g, '-').replace(/[\/]/g, '_').replace(/[=]/g, '');
  },
  // public method for encoding
  encode: function encode(input) {
    var output = '',
        chr1,
        chr2,
        chr3,
        enc1,
        enc2,
        enc3,
        enc4,
        i = 0;
    input = Base64._utf8_encode(input);

    while (i < input.length) {
      chr1 = input.charCodeAt(i++);
      chr2 = input.charCodeAt(i++);
      chr3 = input.charCodeAt(i++);
      enc1 = chr1 >> 2;
      enc2 = (chr1 & 3) << 4 | chr2 >> 4;
      enc3 = (chr2 & 15) << 2 | chr3 >> 6;
      enc4 = chr3 & 63;

      if (isNaN(chr2)) {
        enc3 = enc4 = 64;
      } else if (isNaN(chr3)) {
        enc4 = 64;
      }

      output = output + BASE_64_CHR.charAt(enc1) + BASE_64_CHR.charAt(enc2) + BASE_64_CHR.charAt(enc3) + BASE_64_CHR.charAt(enc4);
    }

    return output;
  },
  // public method for decoding
  decode: function decode(input) {
    var output = '',
        chr1,
        chr2,
        chr3,
        enc1,
        enc2,
        enc3,
        enc4,
        i = 0;
    input = input.replace(/[^A-Za-z0-9\+\/\=]/g, '');

    while (i < input.length) {
      enc1 = _babel_runtime_corejs3_core_js_stable_instance_index_of__WEBPACK_IMPORTED_MODULE_2___default()(BASE_64_CHR).call(BASE_64_CHR, input.charAt(i++));
      enc2 = _babel_runtime_corejs3_core_js_stable_instance_index_of__WEBPACK_IMPORTED_MODULE_2___default()(BASE_64_CHR).call(BASE_64_CHR, input.charAt(i++));
      enc3 = _babel_runtime_corejs3_core_js_stable_instance_index_of__WEBPACK_IMPORTED_MODULE_2___default()(BASE_64_CHR).call(BASE_64_CHR, input.charAt(i++));
      enc4 = _babel_runtime_corejs3_core_js_stable_instance_index_of__WEBPACK_IMPORTED_MODULE_2___default()(BASE_64_CHR).call(BASE_64_CHR, input.charAt(i++));
      chr1 = enc1 << 2 | enc2 >> 4;
      chr2 = (enc2 & 15) << 4 | enc3 >> 2;
      chr3 = (enc3 & 3) << 6 | enc4;
      output = output + String.fromCharCode(chr1);

      if (enc3 !== 64) {
        output = output + String.fromCharCode(chr2);
      }

      if (enc4 !== 64) {
        output = output + String.fromCharCode(chr3);
      }
    }

    return Base64._utf8_decode(output);
  },
  // private method for UTF-8 encoding
  _utf8_encode: function _utf8_encode(string) {
    string = string.replace(/\r\n/g, '\n');
    var utftext = '',
        n = 0,
        l = string.length,
        c = 0;

    for (; n < l; n++) {
      c = string.charCodeAt(n);

      if (c < 128) {
        utftext += String.fromCharCode(c);
      } else if (c > 127 && c < 2048) {
        utftext += String.fromCharCode(c >> 6 | 192);
        utftext += String.fromCharCode(c & 63 | 128);
      } else {
        utftext += String.fromCharCode(c >> 12 | 224);
        utftext += String.fromCharCode(c >> 6 & 63 | 128);
        utftext += String.fromCharCode(c & 63 | 128);
      }
    }

    return utftext;
  },
  // private method for UTF-8 decoding
  _utf8_decode: function _utf8_decode(utftext) {
    var string = '',
        i = 0,
        c = 0,
        c2 = 0,
        c3 = 0;

    while (i < utftext.length) {
      c = utftext.charCodeAt(i);

      if (c < 128) {
        string += String.fromCharCode(c);
        i++;
      } else if (c > 191 && c < 224) {
        c2 = utftext.charCodeAt(i + 1);
        string += String.fromCharCode((c & 31) << 6 | c2 & 63);
        i += 2;
      } else {
        c2 = utftext.charCodeAt(i + 1);
        c3 = utftext.charCodeAt(i + 2);
        string += String.fromCharCode((c & 15) << 12 | (c2 & 63) << 6 | c3 & 63);
        i += 3;
      }
    }

    return string;
  }
};
var decode = Base64.decode;
var encode = Base64.encode;
var urlsafe_encode = Base64.urlsafe_encode;
/* eslint-enable */

/***/ }),
/* 393 */
/*!****************************************!*\
  !*** ./dev/Promises/User/Populator.js ***!
  \****************************************/
/*! exports provided: default */
/*! exports used: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_index_of__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/index-of */ 30);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_index_of__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_index_of__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _babel_runtime_corejs3_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/esm/inheritsLoose */ 10);
/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! _ */ 3);
/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(___WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var Common_Consts__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! Common/Consts */ 25);
/* harmony import */ var Common_Utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! Common/Utils */ 2);
/* harmony import */ var Common_Enums__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! Common/Enums */ 0);
/* harmony import */ var Common_Cache__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! Common/Cache */ 14);
/* harmony import */ var Storage_Settings__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! Storage/Settings */ 5);
/* harmony import */ var Storage_Client__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! Storage/Client */ 58);
/* harmony import */ var Stores_User_App__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! Stores/User/App */ 31);
/* harmony import */ var Stores_User_Folder__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! Stores/User/Folder */ 11);
/* harmony import */ var Remote_User_Ajax__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! Remote/User/Ajax */ 16);
/* harmony import */ var Model_Folder__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! Model/Folder */ 422);
/* harmony import */ var Promises_AbstractBasic__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! Promises/AbstractBasic */ 275);















var PromisesUserPopulator =
/*#__PURE__*/
function (_AbstractBasicPromise) {
  Object(_babel_runtime_corejs3_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(PromisesUserPopulator, _AbstractBasicPromise);

  function PromisesUserPopulator() {
    return _AbstractBasicPromise.apply(this, arguments) || this;
  }

  var _proto = PromisesUserPopulator.prototype;

  /**
   * @param {string} sFullNameHash
   * @param {Array?} expandedFolders
   * @returns {boolean}
   */
  _proto.isFolderExpanded = function isFolderExpanded(sFullNameHash, expandedFolders) {
    return expandedFolders && Object(Common_Utils__WEBPACK_IMPORTED_MODULE_4__["isArray"])(expandedFolders) && -1 !== _babel_runtime_corejs3_core_js_stable_instance_index_of__WEBPACK_IMPORTED_MODULE_0___default()(___WEBPACK_IMPORTED_MODULE_2___default.a).call(___WEBPACK_IMPORTED_MODULE_2___default.a, expandedFolders, sFullNameHash);
  }
  /**
   * @param {string} sFolderFullNameRaw
   * @returns {string}
   */
  ;

  _proto.normalizeFolder = function normalizeFolder(sFolderFullNameRaw) {
    return '' === sFolderFullNameRaw || Common_Consts__WEBPACK_IMPORTED_MODULE_3__[/* UNUSED_OPTION_VALUE */ "r"] === sFolderFullNameRaw || null !== Common_Cache__WEBPACK_IMPORTED_MODULE_6__[/* getFolderFromCacheList */ "e"](sFolderFullNameRaw) ? sFolderFullNameRaw : '';
  }
  /**
   * @param {string} sNamespace
   * @param {Array} aFolders
   * @param {Array?} expandedFolders
   * @returns {Array}
   */
  ;

  _proto.folderResponseParseRec = function folderResponseParseRec(sNamespace, aFolders, expandedFolders) {
    var _this = this;

    var bDisplaySpecSetting = Stores_User_Folder__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"].displaySpecSetting(),
        aList = [];

    ___WEBPACK_IMPORTED_MODULE_2___default.a.each(aFolders, function (oFolder) {
      if (oFolder) {
        var oCacheFolder = Common_Cache__WEBPACK_IMPORTED_MODULE_6__[/* getFolderFromCacheList */ "e"](oFolder.FullNameRaw);

        if (!oCacheFolder) {
          oCacheFolder = Model_Folder__WEBPACK_IMPORTED_MODULE_12__[/* FolderModel */ "a"].newInstanceFromJson(oFolder);

          if (oCacheFolder) {
            Common_Cache__WEBPACK_IMPORTED_MODULE_6__[/* setFolderToCacheList */ "r"](oFolder.FullNameRaw, oCacheFolder);
            Common_Cache__WEBPACK_IMPORTED_MODULE_6__[/* setFolderFullNameRaw */ "p"](oCacheFolder.fullNameHash, oFolder.FullNameRaw, oCacheFolder);
          }
        }

        if (oCacheFolder) {
          if (bDisplaySpecSetting) {
            oCacheFolder.checkable(!!oFolder.Checkable);
          } else {
            oCacheFolder.checkable(true);
          }

          oCacheFolder.collapsed(!_this.isFolderExpanded(oCacheFolder.fullNameHash, expandedFolders));

          if (oFolder.Extended) {
            if (oFolder.Extended.Hash) {
              Common_Cache__WEBPACK_IMPORTED_MODULE_6__[/* setFolderHash */ "q"](oCacheFolder.fullNameRaw, oFolder.Extended.Hash);
            }

            if (Object(Common_Utils__WEBPACK_IMPORTED_MODULE_4__["isNormal"])(oFolder.Extended.MessageCount)) {
              oCacheFolder.messageCountAll(oFolder.Extended.MessageCount);
            }

            if (Object(Common_Utils__WEBPACK_IMPORTED_MODULE_4__["isNormal"])(oFolder.Extended.MessageUnseenCount)) {
              oCacheFolder.messageCountUnread(oFolder.Extended.MessageUnseenCount);
            }
          }

          if (oFolder.SubFolders && 'Collection/FolderCollection' === oFolder.SubFolders['@Object'] && oFolder.SubFolders['@Collection'] && Object(Common_Utils__WEBPACK_IMPORTED_MODULE_4__["isArray"])(oFolder.SubFolders['@Collection'])) {
            oCacheFolder.subFolders(_this.folderResponseParseRec(sNamespace, oFolder.SubFolders['@Collection'], expandedFolders));
          }

          aList.push(oCacheFolder);
        }
      }
    });

    return aList;
  };

  _proto.foldersList = function foldersList(oData) {
    if (oData && 'Collection/FolderCollection' === oData['@Object'] && oData['@Collection'] && Object(Common_Utils__WEBPACK_IMPORTED_MODULE_4__["isArray"])(oData['@Collection'])) {
      var expandedFolders = Storage_Client__WEBPACK_IMPORTED_MODULE_8__[/* get */ "a"](Common_Enums__WEBPACK_IMPORTED_MODULE_5__["ClientSideKeyName"].ExpandedFolders),
          cnt = Object(Common_Utils__WEBPACK_IMPORTED_MODULE_4__["pInt"])(oData.CountRec);
      var limit = Object(Common_Utils__WEBPACK_IMPORTED_MODULE_4__["pInt"])(Storage_Settings__WEBPACK_IMPORTED_MODULE_7__["appSettingsGet"]('folderSpecLimit'));
      limit = 100 < limit ? 100 : 10 > limit ? 10 : limit;
      Stores_User_Folder__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"].displaySpecSetting(0 >= cnt || limit < cnt);
      Stores_User_Folder__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"].folderList(this.folderResponseParseRec(Object(Common_Utils__WEBPACK_IMPORTED_MODULE_4__["isUnd"])(oData.Namespace) ? '' : oData.Namespace, oData['@Collection'], expandedFolders)); // @todo optimization required
    }
  };

  _proto.foldersAdditionalParameters = function foldersAdditionalParameters(oData) {
    if (oData && oData && 'Collection/FolderCollection' === oData['@Object'] && oData['@Collection'] && Object(Common_Utils__WEBPACK_IMPORTED_MODULE_4__["isArray"])(oData['@Collection'])) {
      if (!Object(Common_Utils__WEBPACK_IMPORTED_MODULE_4__["isUnd"])(oData.Namespace)) {
        Stores_User_Folder__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"].namespace = oData.Namespace;
      }

      Stores_User_App__WEBPACK_IMPORTED_MODULE_9__[/* default */ "a"].threadsAllowed(!!Storage_Settings__WEBPACK_IMPORTED_MODULE_7__["appSettingsGet"]('useImapThread') && oData.IsThreadsSupported && true);
      Stores_User_Folder__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"].folderList.optimized(!!oData.Optimized);
      var update = false;

      if (oData.SystemFolders && '' === '' + Storage_Settings__WEBPACK_IMPORTED_MODULE_7__["settingsGet"]('SentFolder') + Storage_Settings__WEBPACK_IMPORTED_MODULE_7__["settingsGet"]('DraftFolder') + Storage_Settings__WEBPACK_IMPORTED_MODULE_7__["settingsGet"]('SpamFolder') + Storage_Settings__WEBPACK_IMPORTED_MODULE_7__["settingsGet"]('TrashFolder') + Storage_Settings__WEBPACK_IMPORTED_MODULE_7__["settingsGet"]('ArchiveFolder') + Storage_Settings__WEBPACK_IMPORTED_MODULE_7__["settingsGet"]('NullFolder')) {
        Storage_Settings__WEBPACK_IMPORTED_MODULE_7__["settingsSet"]('SentFolder', oData.SystemFolders[Common_Enums__WEBPACK_IMPORTED_MODULE_5__["ServerFolderType"].SENT] || null);
        Storage_Settings__WEBPACK_IMPORTED_MODULE_7__["settingsSet"]('DraftFolder', oData.SystemFolders[Common_Enums__WEBPACK_IMPORTED_MODULE_5__["ServerFolderType"].DRAFTS] || null);
        Storage_Settings__WEBPACK_IMPORTED_MODULE_7__["settingsSet"]('SpamFolder', oData.SystemFolders[Common_Enums__WEBPACK_IMPORTED_MODULE_5__["ServerFolderType"].JUNK] || null);
        Storage_Settings__WEBPACK_IMPORTED_MODULE_7__["settingsSet"]('TrashFolder', oData.SystemFolders[Common_Enums__WEBPACK_IMPORTED_MODULE_5__["ServerFolderType"].TRASH] || null);
        Storage_Settings__WEBPACK_IMPORTED_MODULE_7__["settingsSet"]('ArchiveFolder', oData.SystemFolders[Common_Enums__WEBPACK_IMPORTED_MODULE_5__["ServerFolderType"].ALL] || null);
        update = true;
      }

      Stores_User_Folder__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"].sentFolder(this.normalizeFolder(Storage_Settings__WEBPACK_IMPORTED_MODULE_7__["settingsGet"]('SentFolder')));
      Stores_User_Folder__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"].draftFolder(this.normalizeFolder(Storage_Settings__WEBPACK_IMPORTED_MODULE_7__["settingsGet"]('DraftFolder')));
      Stores_User_Folder__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"].spamFolder(this.normalizeFolder(Storage_Settings__WEBPACK_IMPORTED_MODULE_7__["settingsGet"]('SpamFolder')));
      Stores_User_Folder__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"].trashFolder(this.normalizeFolder(Storage_Settings__WEBPACK_IMPORTED_MODULE_7__["settingsGet"]('TrashFolder')));
      Stores_User_Folder__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"].archiveFolder(this.normalizeFolder(Storage_Settings__WEBPACK_IMPORTED_MODULE_7__["settingsGet"]('ArchiveFolder')));

      if (update) {
        Remote_User_Ajax__WEBPACK_IMPORTED_MODULE_11__[/* default */ "a"].saveSystemFolders(Common_Utils__WEBPACK_IMPORTED_MODULE_4__["noop"], {
          SentFolder: Stores_User_Folder__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"].sentFolder(),
          DraftFolder: Stores_User_Folder__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"].draftFolder(),
          SpamFolder: Stores_User_Folder__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"].spamFolder(),
          TrashFolder: Stores_User_Folder__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"].trashFolder(),
          ArchiveFolder: Stores_User_Folder__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"].archiveFolder(),
          NullFolder: 'NullFolder'
        });
      }

      Storage_Client__WEBPACK_IMPORTED_MODULE_8__[/* set */ "b"](Common_Enums__WEBPACK_IMPORTED_MODULE_5__["ClientSideKeyName"].FoldersLashHash, oData.FoldersHash);
    }
  };

  return PromisesUserPopulator;
}(Promises_AbstractBasic__WEBPACK_IMPORTED_MODULE_13__[/* AbstractBasicPromises */ "a"]);

/* harmony default export */ __webpack_exports__["a"] = (new PromisesUserPopulator());

/***/ }),
/* 394 */
/*!*****************************!*\
  !*** ./dev/Model/Filter.js ***!
  \*****************************/
/*! exports provided: FilterModel, default */
/*! exports used: FilterModel */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return FilterModel; });
/* unused harmony export default */
/* harmony import */ var core_js_modules_es_array_join__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.array.join */ 74);
/* harmony import */ var core_js_modules_es_array_join__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_join__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var core_js_modules_es_function_name__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es.function.name */ 51);
/* harmony import */ var core_js_modules_es_function_name__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_function_name__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var core_js_modules_es_regexp_exec__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core-js/modules/es.regexp.exec */ 45);
/* harmony import */ var core_js_modules_es_regexp_exec__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_regexp_exec__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var core_js_modules_es_string_replace__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! core-js/modules/es.string.replace */ 56);
/* harmony import */ var core_js_modules_es_string_replace__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_replace__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/map */ 18);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_index_of__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/index-of */ 30);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_index_of__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_index_of__WEBPACK_IMPORTED_MODULE_5__);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/find */ 12);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_6__);
/* harmony import */ var _babel_runtime_corejs3_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/esm/inheritsLoose */ 10);
/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! _ */ 3);
/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(___WEBPACK_IMPORTED_MODULE_8__);
/* harmony import */ var ko__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ko */ 1);
/* harmony import */ var Common_Enums__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! Common/Enums */ 0);
/* harmony import */ var Common_Utils__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! Common/Utils */ 2);
/* harmony import */ var Common_Translator__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! Common/Translator */ 9);
/* harmony import */ var Common_Cache__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! Common/Cache */ 14);
/* harmony import */ var Stores_User_Account__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! Stores/User/Account */ 46);
/* harmony import */ var Model_FilterCondition__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! Model/FilterCondition */ 395);
/* harmony import */ var Knoin_AbstractModel__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! Knoin/AbstractModel */ 64);


















var FilterModel =
/*#__PURE__*/
function (_AbstractModel) {
  Object(_babel_runtime_corejs3_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"])(FilterModel, _AbstractModel);

  function FilterModel() {
    var _this;

    _this = _AbstractModel.call(this, 'FilterModel') || this;
    _this.enabled = ko__WEBPACK_IMPORTED_MODULE_9__[/* default */ "a"].observable(true);
    _this.id = '';
    _this.name = ko__WEBPACK_IMPORTED_MODULE_9__[/* default */ "a"].observable('');
    _this.name.error = ko__WEBPACK_IMPORTED_MODULE_9__[/* default */ "a"].observable(false);
    _this.name.focused = ko__WEBPACK_IMPORTED_MODULE_9__[/* default */ "a"].observable(false);
    _this.conditions = ko__WEBPACK_IMPORTED_MODULE_9__[/* default */ "a"].observableArray([]);
    _this.conditionsType = ko__WEBPACK_IMPORTED_MODULE_9__[/* default */ "a"].observable(Common_Enums__WEBPACK_IMPORTED_MODULE_10__["FilterRulesType"].Any); // Actions

    _this.actionValue = ko__WEBPACK_IMPORTED_MODULE_9__[/* default */ "a"].observable('');
    _this.actionValue.error = ko__WEBPACK_IMPORTED_MODULE_9__[/* default */ "a"].observable(false);
    _this.actionValueSecond = ko__WEBPACK_IMPORTED_MODULE_9__[/* default */ "a"].observable('');
    _this.actionValueThird = ko__WEBPACK_IMPORTED_MODULE_9__[/* default */ "a"].observable('');
    _this.actionValueFourth = ko__WEBPACK_IMPORTED_MODULE_9__[/* default */ "a"].observable('');
    _this.actionValueFourth.error = ko__WEBPACK_IMPORTED_MODULE_9__[/* default */ "a"].observable(false);
    _this.actionMarkAsRead = ko__WEBPACK_IMPORTED_MODULE_9__[/* default */ "a"].observable(false);
    _this.actionKeep = ko__WEBPACK_IMPORTED_MODULE_9__[/* default */ "a"].observable(true);
    _this.actionNoStop = ko__WEBPACK_IMPORTED_MODULE_9__[/* default */ "a"].observable(false);
    _this.actionType = ko__WEBPACK_IMPORTED_MODULE_9__[/* default */ "a"].observable(Common_Enums__WEBPACK_IMPORTED_MODULE_10__["FiltersAction"].MoveTo);

    _this.actionType.subscribe(function () {
      _this.actionValue('');

      _this.actionValue.error(false);

      _this.actionValueSecond('');

      _this.actionValueThird('');

      _this.actionValueFourth('');

      _this.actionValueFourth.error(false);
    });

    var fGetRealFolderName = function fGetRealFolderName(folderFullNameRaw) {
      var folder = Object(Common_Cache__WEBPACK_IMPORTED_MODULE_13__[/* getFolderFromCacheList */ "e"])(folderFullNameRaw);
      return folder ? folder.fullName.replace('.' === folder.delimiter ? /\./ : /[\\/]+/, ' / ') : folderFullNameRaw;
    };

    _this.nameSub = ko__WEBPACK_IMPORTED_MODULE_9__[/* default */ "a"].computed(function () {
      var result = '';

      var actionValue = _this.actionValue();

      switch (_this.actionType()) {
        case Common_Enums__WEBPACK_IMPORTED_MODULE_10__["FiltersAction"].MoveTo:
          result = Object(Common_Translator__WEBPACK_IMPORTED_MODULE_12__["i18n"])('SETTINGS_FILTERS/SUBNAME_MOVE_TO', {
            FOLDER: fGetRealFolderName(actionValue)
          });
          break;

        case Common_Enums__WEBPACK_IMPORTED_MODULE_10__["FiltersAction"].Forward:
          result = Object(Common_Translator__WEBPACK_IMPORTED_MODULE_12__["i18n"])('SETTINGS_FILTERS/SUBNAME_FORWARD_TO', {
            EMAIL: actionValue
          });
          break;

        case Common_Enums__WEBPACK_IMPORTED_MODULE_10__["FiltersAction"].Vacation:
          result = Object(Common_Translator__WEBPACK_IMPORTED_MODULE_12__["i18n"])('SETTINGS_FILTERS/SUBNAME_VACATION_MESSAGE');
          break;

        case Common_Enums__WEBPACK_IMPORTED_MODULE_10__["FiltersAction"].Reject:
          result = Object(Common_Translator__WEBPACK_IMPORTED_MODULE_12__["i18n"])('SETTINGS_FILTERS/SUBNAME_REJECT');
          break;

        case Common_Enums__WEBPACK_IMPORTED_MODULE_10__["FiltersAction"].Discard:
          result = Object(Common_Translator__WEBPACK_IMPORTED_MODULE_12__["i18n"])('SETTINGS_FILTERS/SUBNAME_DISCARD');
          break;
        // no default
      }

      return result ? '(' + result + ')' : '';
    });
    _this.actionTemplate = ko__WEBPACK_IMPORTED_MODULE_9__[/* default */ "a"].computed(function () {
      var result = '';

      switch (_this.actionType()) {
        case Common_Enums__WEBPACK_IMPORTED_MODULE_10__["FiltersAction"].Forward:
          result = 'SettingsFiltersActionForward';
          break;

        case Common_Enums__WEBPACK_IMPORTED_MODULE_10__["FiltersAction"].Vacation:
          result = 'SettingsFiltersActionVacation';
          break;

        case Common_Enums__WEBPACK_IMPORTED_MODULE_10__["FiltersAction"].Reject:
          result = 'SettingsFiltersActionReject';
          break;

        case Common_Enums__WEBPACK_IMPORTED_MODULE_10__["FiltersAction"].None:
          result = 'SettingsFiltersActionNone';
          break;

        case Common_Enums__WEBPACK_IMPORTED_MODULE_10__["FiltersAction"].Discard:
          result = 'SettingsFiltersActionDiscard';
          break;

        case Common_Enums__WEBPACK_IMPORTED_MODULE_10__["FiltersAction"].MoveTo:
        default:
          result = 'SettingsFiltersActionMoveToFolder';
          break;
      }

      return result;
    });

    _this.regDisposables(_this.conditions.subscribe(Common_Utils__WEBPACK_IMPORTED_MODULE_11__["windowResizeCallback"]));

    _this.regDisposables(_this.name.subscribe(function (sValue) {
      _this.name.error('' === sValue);
    }));

    _this.regDisposables(_this.actionValue.subscribe(function (sValue) {
      _this.actionValue.error('' === sValue);
    }));

    _this.regDisposables([_this.actionNoStop, _this.actionTemplate]);

    _this.deleteAccess = ko__WEBPACK_IMPORTED_MODULE_9__[/* default */ "a"].observable(false);
    _this.canBeDeleted = ko__WEBPACK_IMPORTED_MODULE_9__[/* default */ "a"].observable(true);
    return _this;
  }

  var _proto = FilterModel.prototype;

  _proto.generateID = function generateID() {
    this.id = Object(Common_Utils__WEBPACK_IMPORTED_MODULE_11__["fakeMd5"])();
  };

  _proto.verify = function verify() {
    var _context, _context2;

    if ('' === this.name()) {
      this.name.error(true);
      return false;
    }

    if (0 < this.conditions().length) {
      if (_babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_6___default()(___WEBPACK_IMPORTED_MODULE_8___default.a).call(___WEBPACK_IMPORTED_MODULE_8___default.a, this.conditions(), function (cond) {
        return cond && !cond.verify();
      })) {
        return false;
      }
    }

    if ('' === this.actionValue()) {
      if (-1 < Object(Common_Utils__WEBPACK_IMPORTED_MODULE_11__["inArray"])(this.actionType(), [Common_Enums__WEBPACK_IMPORTED_MODULE_10__["FiltersAction"].MoveTo, Common_Enums__WEBPACK_IMPORTED_MODULE_10__["FiltersAction"].Forward, Common_Enums__WEBPACK_IMPORTED_MODULE_10__["FiltersAction"].Reject, Common_Enums__WEBPACK_IMPORTED_MODULE_10__["FiltersAction"].Vacation])) {
        this.actionValue.error(true);
        return false;
      }
    }

    if (Common_Enums__WEBPACK_IMPORTED_MODULE_10__["FiltersAction"].Forward === this.actionType() && -1 === _babel_runtime_corejs3_core_js_stable_instance_index_of__WEBPACK_IMPORTED_MODULE_5___default()(_context = this.actionValue()).call(_context, '@')) {
      this.actionValue.error(true);
      return false;
    }

    if (Common_Enums__WEBPACK_IMPORTED_MODULE_10__["FiltersAction"].Vacation === this.actionType() && '' !== this.actionValueFourth() && -1 === _babel_runtime_corejs3_core_js_stable_instance_index_of__WEBPACK_IMPORTED_MODULE_5___default()(_context2 = this.actionValueFourth()).call(_context2, '@')) {
      this.actionValueFourth.error(true);
      return false;
    }

    this.name.error(false);
    this.actionValue.error(false);
    return true;
  };

  _proto.toJson = function toJson() {
    return {
      ID: this.id,
      Enabled: this.enabled() ? '1' : '0',
      Name: this.name(),
      ConditionsType: this.conditionsType(),
      Conditions: _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_4___default()(___WEBPACK_IMPORTED_MODULE_8___default.a).call(___WEBPACK_IMPORTED_MODULE_8___default.a, this.conditions(), function (item) {
        return item.toJson();
      }),
      ActionValue: this.actionValue(),
      ActionValueSecond: this.actionValueSecond(),
      ActionValueThird: this.actionValueThird(),
      ActionValueFourth: this.actionValueFourth(),
      ActionType: this.actionType(),
      Stop: this.actionNoStop() ? '0' : '1',
      Keep: this.actionKeep() ? '1' : '0',
      MarkAsRead: this.actionMarkAsRead() ? '1' : '0'
    };
  };

  _proto.addCondition = function addCondition() {
    this.conditions.push(new Model_FilterCondition__WEBPACK_IMPORTED_MODULE_15__[/* FilterConditionModel */ "a"]());
  };

  _proto.removeCondition = function removeCondition(oConditionToDelete) {
    this.conditions.remove(oConditionToDelete);
    Object(Common_Utils__WEBPACK_IMPORTED_MODULE_11__["delegateRunOnDestroy"])(oConditionToDelete);
  };

  _proto.setRecipients = function setRecipients() {
    this.actionValueFourth(Stores_User_Account__WEBPACK_IMPORTED_MODULE_14__[/* default */ "a"].accountsEmails().join(', '));
  };

  _proto.parse = function parse(json) {
    var result = false;

    if (json && 'Object/Filter' === json['@Object']) {
      this.id = Object(Common_Utils__WEBPACK_IMPORTED_MODULE_11__["pString"])(json.ID);
      this.name(Object(Common_Utils__WEBPACK_IMPORTED_MODULE_11__["pString"])(json.Name));
      this.enabled(!!json.Enabled);
      this.conditionsType(Object(Common_Utils__WEBPACK_IMPORTED_MODULE_11__["pString"])(json.ConditionsType));
      this.conditions([]);

      if (Object(Common_Utils__WEBPACK_IMPORTED_MODULE_11__["isNonEmptyArray"])(json.Conditions)) {
        this.conditions(___WEBPACK_IMPORTED_MODULE_8___default.a.compact(_babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_4___default()(___WEBPACK_IMPORTED_MODULE_8___default.a).call(___WEBPACK_IMPORTED_MODULE_8___default.a, json.Conditions, function (aData) {
          var filterCondition = new Model_FilterCondition__WEBPACK_IMPORTED_MODULE_15__[/* FilterConditionModel */ "a"]();
          return filterCondition && filterCondition.parse(aData) ? filterCondition : null;
        })));
      }

      this.actionType(Object(Common_Utils__WEBPACK_IMPORTED_MODULE_11__["pString"])(json.ActionType));
      this.actionValue(Object(Common_Utils__WEBPACK_IMPORTED_MODULE_11__["pString"])(json.ActionValue));
      this.actionValueSecond(Object(Common_Utils__WEBPACK_IMPORTED_MODULE_11__["pString"])(json.ActionValueSecond));
      this.actionValueThird(Object(Common_Utils__WEBPACK_IMPORTED_MODULE_11__["pString"])(json.ActionValueThird));
      this.actionValueFourth(Object(Common_Utils__WEBPACK_IMPORTED_MODULE_11__["pString"])(json.ActionValueFourth));
      this.actionNoStop(!json.Stop);
      this.actionKeep(!!json.Keep);
      this.actionMarkAsRead(!!json.MarkAsRead);
      result = true;
    }

    return result;
  };

  _proto.cloneSelf = function cloneSelf() {
    var filter = new FilterModel();
    filter.id = this.id;
    filter.enabled(this.enabled());
    filter.name(this.name());
    filter.name.error(this.name.error());
    filter.conditionsType(this.conditionsType());
    filter.actionMarkAsRead(this.actionMarkAsRead());
    filter.actionType(this.actionType());
    filter.actionValue(this.actionValue());
    filter.actionValue.error(this.actionValue.error());
    filter.actionValueSecond(this.actionValueSecond());
    filter.actionValueThird(this.actionValueThird());
    filter.actionValueFourth(this.actionValueFourth());
    filter.actionKeep(this.actionKeep());
    filter.actionNoStop(this.actionNoStop());
    filter.conditions(_babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_4___default()(___WEBPACK_IMPORTED_MODULE_8___default.a).call(___WEBPACK_IMPORTED_MODULE_8___default.a, this.conditions(), function (item) {
      return item.cloneSelf();
    }));
    return filter;
  };

  return FilterModel;
}(Knoin_AbstractModel__WEBPACK_IMPORTED_MODULE_16__[/* AbstractModel */ "a"]);



/***/ }),
/* 395 */
/*!**************************************!*\
  !*** ./dev/Model/FilterCondition.js ***!
  \**************************************/
/*! exports provided: FilterConditionModel, default */
/*! exports used: FilterConditionModel */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return FilterConditionModel; });
/* unused harmony export default */
/* harmony import */ var _babel_runtime_corejs3_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/esm/assertThisInitialized */ 33);
/* harmony import */ var _babel_runtime_corejs3_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/esm/inheritsLoose */ 10);
/* harmony import */ var ko__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ko */ 1);
/* harmony import */ var Common_Enums__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! Common/Enums */ 0);
/* harmony import */ var Common_Utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! Common/Utils */ 2);
/* harmony import */ var Knoin_AbstractModel__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! Knoin/AbstractModel */ 64);







var FilterConditionModel =
/*#__PURE__*/
function (_AbstractModel) {
  Object(_babel_runtime_corejs3_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(FilterConditionModel, _AbstractModel);

  function FilterConditionModel() {
    var _this;

    _this = _AbstractModel.call(this, 'FilterConditionModel') || this;
    _this.field = ko__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"].observable(Common_Enums__WEBPACK_IMPORTED_MODULE_3__["FilterConditionField"].From);
    _this.type = ko__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"].observable(Common_Enums__WEBPACK_IMPORTED_MODULE_3__["FilterConditionType"].Contains);
    _this.value = ko__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"].observable('');
    _this.value.error = ko__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"].observable(false);
    _this.valueSecond = ko__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"].observable('');
    _this.valueSecond.error = ko__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"].observable(false);
    _this.template = ko__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"].computed(function () {
      var template = '';

      switch (_this.field()) {
        case Common_Enums__WEBPACK_IMPORTED_MODULE_3__["FilterConditionField"].Size:
          template = 'SettingsFiltersConditionSize';
          break;

        case Common_Enums__WEBPACK_IMPORTED_MODULE_3__["FilterConditionField"].Header:
          template = 'SettingsFiltersConditionMore';
          break;

        default:
          template = 'SettingsFiltersConditionDefault';
          break;
      }

      return template;
    }, Object(_babel_runtime_corejs3_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_this));

    _this.field.subscribe(function () {
      _this.value('');

      _this.valueSecond('');
    });

    _this.regDisposables([_this.template]);

    return _this;
  }

  var _proto = FilterConditionModel.prototype;

  _proto.verify = function verify() {
    if ('' === this.value()) {
      this.value.error(true);
      return false;
    }

    if (Common_Enums__WEBPACK_IMPORTED_MODULE_3__["FilterConditionField"].Header === this.field() && '' === this.valueSecond()) {
      this.valueSecond.error(true);
      return false;
    }

    return true;
  };

  _proto.parse = function parse(json) {
    if (json && json.Field && json.Type) {
      this.field(Object(Common_Utils__WEBPACK_IMPORTED_MODULE_4__["pString"])(json.Field));
      this.type(Object(Common_Utils__WEBPACK_IMPORTED_MODULE_4__["pString"])(json.Type));
      this.value(Object(Common_Utils__WEBPACK_IMPORTED_MODULE_4__["pString"])(json.Value));
      this.valueSecond(Object(Common_Utils__WEBPACK_IMPORTED_MODULE_4__["pString"])(json.ValueSecond));
      return true;
    }

    return false;
  };

  _proto.toJson = function toJson() {
    return {
      Field: this.field(),
      Type: this.type(),
      Value: this.value(),
      ValueSecond: this.valueSecond()
    };
  };

  _proto.cloneSelf = function cloneSelf() {
    var filterCond = new FilterConditionModel();
    filterCond.field(this.field());
    filterCond.type(this.type());
    filterCond.value(this.value());
    filterCond.valueSecond(this.valueSecond());
    return filterCond;
  };

  return FilterConditionModel;
}(Knoin_AbstractModel__WEBPACK_IMPORTED_MODULE_5__[/* AbstractModel */ "a"]);



/***/ }),
/* 396 */
/*!****************************!*\
  !*** external "window.qr" ***!
  \****************************/
/*! no static exports found */
/*! exports used: default */
/***/ (function(module, exports) {

module.exports = window.qr;

/***/ }),
/* 397 */,
/* 398 */,
/* 399 */,
/* 400 */,
/* 401 */,
/* 402 */,
/* 403 */,
/* 404 */,
/* 405 */,
/* 406 */,
/* 407 */
/*!*************************************************!*\
  !*** ./dev/View/Popup/KeyboardShortcutsHelp.js ***!
  \*************************************************/
/*! exports provided: KeyboardShortcutsHelpPopupView, default */
/*! all exports used */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "KeyboardShortcutsHelpPopupView", function() { return KeyboardShortcutsHelpPopupView; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return KeyboardShortcutsHelpPopupView; });
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/filter */ 34);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/find */ 12);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _babel_runtime_corejs3_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/esm/inheritsLoose */ 10);
/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! _ */ 3);
/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(___WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var key__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! key */ 21);
/* harmony import */ var key__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(key__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var Common_Enums__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! Common/Enums */ 0);
/* harmony import */ var Knoin_Knoin__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! Knoin/Knoin */ 7);
/* harmony import */ var Knoin_AbstractViewNext__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! Knoin/AbstractViewNext */ 28);




var _dec, _class;






var KeyboardShortcutsHelpPopupView = (_dec = Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_6__["popup"])({
  name: 'View/Popup/KeyboardShortcutsHelp',
  templateID: 'PopupsKeyboardShortcutsHelp'
}), _dec(_class =
/*#__PURE__*/
function (_AbstractViewNext) {
  Object(_babel_runtime_corejs3_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(KeyboardShortcutsHelpPopupView, _AbstractViewNext);

  function KeyboardShortcutsHelpPopupView() {
    var _this;

    _this = _AbstractViewNext.call(this) || this;
    _this.sDefaultKeyScope = Common_Enums__WEBPACK_IMPORTED_MODULE_5__["KeyState"].PopupKeyboardShortcutsHelp;
    return _this;
  }

  var _proto = KeyboardShortcutsHelpPopupView.prototype;

  _proto.onBuild = function onBuild(dom) {
    key__WEBPACK_IMPORTED_MODULE_4___default()('tab, shift+tab, left, right', Common_Enums__WEBPACK_IMPORTED_MODULE_5__["KeyState"].PopupKeyboardShortcutsHelp, ___WEBPACK_IMPORTED_MODULE_3___default.a.throttle(function (event, handler) {
      if (event && handler) {
        var _context;

        var $tabs = _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_1___default()(dom).call(dom, '.nav.nav-tabs > li'),
            isNext = handler && ('tab' === handler.shortcut || 'right' === handler.shortcut);

        var index = $tabs.index(_babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_0___default()($tabs).call($tabs, '.active'));

        if (!isNext && 0 < index) {
          index -= 1;
        } else if (isNext && index < $tabs.length - 1) {
          index += 1;
        } else {
          index = isNext ? 0 : $tabs.length - 1;
        }

        _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_1___default()(_context = $tabs.eq(index)).call(_context, 'a[data-toggle="tab"]').tab('show');

        return false;
      }

      return true;
    }, Common_Enums__WEBPACK_IMPORTED_MODULE_5__["Magics"].Time100ms));
  };

  return KeyboardShortcutsHelpPopupView;
}(Knoin_AbstractViewNext__WEBPACK_IMPORTED_MODULE_7__[/* AbstractViewNext */ "a"])) || _class);


/***/ }),
/* 408 */
/*!************************************!*\
  !*** ./dev/View/Popup/Contacts.js ***!
  \************************************/
/*! exports provided: ContactsPopupView, default */
/*! all exports used */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ContactsPopupView", function() { return ContactsPopupView; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return ContactsPopupView; });
/* harmony import */ var core_js_modules_es_array_join__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.array.join */ 74);
/* harmony import */ var core_js_modules_es_array_join__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_join__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var core_js_modules_es_regexp_exec__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es.regexp.exec */ 45);
/* harmony import */ var core_js_modules_es_regexp_exec__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_regexp_exec__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var core_js_modules_es_string_search__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core-js/modules/es.string.search */ 273);
/* harmony import */ var core_js_modules_es_string_search__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_search__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor */ 19);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_bind__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/bind */ 26);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_bind__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_bind__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/map */ 18);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_5__);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/find */ 12);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_6__);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/filter */ 34);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_7__);
/* harmony import */ var _babel_runtime_corejs3_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/esm/inheritsLoose */ 10);
/* harmony import */ var _babel_runtime_corejs3_helpers_esm_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/esm/applyDecoratedDescriptor */ 20);
/* harmony import */ var window__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! window */ 4);
/* harmony import */ var window__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(window__WEBPACK_IMPORTED_MODULE_10__);
/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! _ */ 3);
/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(___WEBPACK_IMPORTED_MODULE_11__);
/* harmony import */ var $__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! $ */ 8);
/* harmony import */ var $__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n($__WEBPACK_IMPORTED_MODULE_12__);
/* harmony import */ var ko__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ko */ 1);
/* harmony import */ var key__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! key */ 21);
/* harmony import */ var key__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(key__WEBPACK_IMPORTED_MODULE_14__);
/* harmony import */ var Jua__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! Jua */ 175);
/* harmony import */ var Jua__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(Jua__WEBPACK_IMPORTED_MODULE_15__);
/* harmony import */ var Common_Enums__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! Common/Enums */ 0);
/* harmony import */ var Common_Utils__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! Common/Utils */ 2);
/* harmony import */ var Common_Consts__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! Common/Consts */ 25);
/* harmony import */ var Common_Globals__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! Common/Globals */ 6);
/* harmony import */ var Common_Selector__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! Common/Selector */ 277);
/* harmony import */ var Common_Links__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! Common/Links */ 15);
/* harmony import */ var Common_Translator__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! Common/Translator */ 9);
/* harmony import */ var Stores_User_Settings__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! Stores/User/Settings */ 38);
/* harmony import */ var Stores_User_Contact__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! Stores/User/Contact */ 100);
/* harmony import */ var Remote_User_Ajax__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! Remote/User/Ajax */ 16);
/* harmony import */ var Storage_Settings__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! Storage/Settings */ 5);
/* harmony import */ var Model_Email__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! Model/Email */ 80);
/* harmony import */ var Model_Contact__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! Model/Contact */ 433);
/* harmony import */ var Model_ContactProperty__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! Model/ContactProperty */ 270);
/* harmony import */ var Helper_Apps_User__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! Helper/Apps/User */ 22);
/* harmony import */ var Knoin_Knoin__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! Knoin/Knoin */ 7);
/* harmony import */ var Knoin_AbstractViewNext__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! Knoin/AbstractViewNext */ 28);











var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _class, _class2;
























var ContactsPopupView = (_dec = Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_31__["popup"])({
  name: 'View/Popup/Contacts',
  templateID: 'PopupsContacts'
}), _dec2 = Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_31__["command"])(), _dec3 = Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_31__["command"])(function (self) {
  return 0 < self.contactsCheckedOrSelected().length;
}), _dec4 = Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_31__["command"])(function (self) {
  return 0 < self.contactsCheckedOrSelected().length;
}), _dec5 = Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_31__["command"])(), _dec6 = Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_31__["command"])(function (self) {
  var bV = self.viewHasNonEmptyRequiredProperties(),
      bReadOnly = self.viewReadOnly();
  return !self.viewSaving() && bV && !bReadOnly;
}), _dec7 = Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_31__["command"])(function (self) {
  return !self.contacts.syncing() && !self.contacts.importing();
}), _dec(_class = (_class2 =
/*#__PURE__*/
function (_AbstractViewNext) {
  Object(_babel_runtime_corejs3_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_8__[/* default */ "a"])(ContactsPopupView, _AbstractViewNext);

  function ContactsPopupView() {
    var _this;

    _this = _AbstractViewNext.call(this) || this;

    var fFastClearEmptyListHelper = function fFastClearEmptyListHelper(list) {
      if (list && 0 < list.length) {
        _this.viewProperties.removeAll(list);

        Object(Common_Utils__WEBPACK_IMPORTED_MODULE_17__["delegateRunOnDestroy"])(list);
      }
    };

    _this.bBackToCompose = false;
    _this.sLastComposeFocusedField = '';
    _this.allowContactsSync = Stores_User_Contact__WEBPACK_IMPORTED_MODULE_24__[/* default */ "a"].allowContactsSync;
    _this.enableContactsSync = Stores_User_Contact__WEBPACK_IMPORTED_MODULE_24__[/* default */ "a"].enableContactsSync;
    _this.allowExport = !Common_Globals__WEBPACK_IMPORTED_MODULE_19__["bMobileDevice"];
    _this.search = ko__WEBPACK_IMPORTED_MODULE_13__[/* default */ "a"].observable('');
    _this.contactsCount = ko__WEBPACK_IMPORTED_MODULE_13__[/* default */ "a"].observable(0);
    _this.contacts = Stores_User_Contact__WEBPACK_IMPORTED_MODULE_24__[/* default */ "a"].contacts;
    _this.currentContact = ko__WEBPACK_IMPORTED_MODULE_13__[/* default */ "a"].observable(null);
    _this.importUploaderButton = ko__WEBPACK_IMPORTED_MODULE_13__[/* default */ "a"].observable(null);
    _this.contactsPage = ko__WEBPACK_IMPORTED_MODULE_13__[/* default */ "a"].observable(1);
    _this.contactsPageCount = ko__WEBPACK_IMPORTED_MODULE_13__[/* default */ "a"].computed(function () {
      var iPage = window__WEBPACK_IMPORTED_MODULE_10___default.a.Math.ceil(_this.contactsCount() / Common_Consts__WEBPACK_IMPORTED_MODULE_18__[/* CONTACTS_PER_PAGE */ "c"]);
      return 0 >= iPage ? 1 : iPage;
    });
    _this.contactsPagenator = ko__WEBPACK_IMPORTED_MODULE_13__[/* default */ "a"].computed(Object(Common_Utils__WEBPACK_IMPORTED_MODULE_17__["computedPagenatorHelper"])(_this.contactsPage, _this.contactsPageCount));
    _this.emptySelection = ko__WEBPACK_IMPORTED_MODULE_13__[/* default */ "a"].observable(true);
    _this.viewClearSearch = ko__WEBPACK_IMPORTED_MODULE_13__[/* default */ "a"].observable(false);
    _this.viewID = ko__WEBPACK_IMPORTED_MODULE_13__[/* default */ "a"].observable('');
    _this.viewReadOnly = ko__WEBPACK_IMPORTED_MODULE_13__[/* default */ "a"].observable(false);
    _this.viewProperties = ko__WEBPACK_IMPORTED_MODULE_13__[/* default */ "a"].observableArray([]);
    _this.viewSaveTrigger = ko__WEBPACK_IMPORTED_MODULE_13__[/* default */ "a"].observable(Common_Enums__WEBPACK_IMPORTED_MODULE_16__["SaveSettingsStep"].Idle);
    _this.viewPropertiesNames = ko__WEBPACK_IMPORTED_MODULE_13__[/* default */ "a"].computed(function () {
      return _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_7___default()(___WEBPACK_IMPORTED_MODULE_11___default.a).call(___WEBPACK_IMPORTED_MODULE_11___default.a, _this.viewProperties(), function (property) {
        return -1 < Object(Common_Utils__WEBPACK_IMPORTED_MODULE_17__["inArray"])(property.type(), [Common_Enums__WEBPACK_IMPORTED_MODULE_16__["ContactPropertyType"].FirstName, Common_Enums__WEBPACK_IMPORTED_MODULE_16__["ContactPropertyType"].LastName]);
      });
    });
    _this.viewPropertiesOther = ko__WEBPACK_IMPORTED_MODULE_13__[/* default */ "a"].computed(function () {
      return _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_7___default()(___WEBPACK_IMPORTED_MODULE_11___default.a).call(___WEBPACK_IMPORTED_MODULE_11___default.a, _this.viewProperties(), function (property) {
        return -1 < Object(Common_Utils__WEBPACK_IMPORTED_MODULE_17__["inArray"])(property.type(), [Common_Enums__WEBPACK_IMPORTED_MODULE_16__["ContactPropertyType"].Nick]);
      });
    });
    _this.viewPropertiesEmails = ko__WEBPACK_IMPORTED_MODULE_13__[/* default */ "a"].computed(function () {
      return _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_7___default()(___WEBPACK_IMPORTED_MODULE_11___default.a).call(___WEBPACK_IMPORTED_MODULE_11___default.a, _this.viewProperties(), function (property) {
        return Common_Enums__WEBPACK_IMPORTED_MODULE_16__["ContactPropertyType"].Email === property.type();
      });
    });
    _this.viewPropertiesWeb = ko__WEBPACK_IMPORTED_MODULE_13__[/* default */ "a"].computed(function () {
      return _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_7___default()(___WEBPACK_IMPORTED_MODULE_11___default.a).call(___WEBPACK_IMPORTED_MODULE_11___default.a, _this.viewProperties(), function (property) {
        return Common_Enums__WEBPACK_IMPORTED_MODULE_16__["ContactPropertyType"].Web === property.type();
      });
    });
    _this.viewHasNonEmptyRequiredProperties = ko__WEBPACK_IMPORTED_MODULE_13__[/* default */ "a"].computed(function () {
      var names = _this.viewPropertiesNames(),
          emails = _this.viewPropertiesEmails(),
          fFilter = function fFilter(property) {
        return '' !== Object(Common_Utils__WEBPACK_IMPORTED_MODULE_17__["trim"])(property.value());
      };

      return !!(_babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_6___default()(___WEBPACK_IMPORTED_MODULE_11___default.a).call(___WEBPACK_IMPORTED_MODULE_11___default.a, names, fFilter) || _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_6___default()(___WEBPACK_IMPORTED_MODULE_11___default.a).call(___WEBPACK_IMPORTED_MODULE_11___default.a, emails, fFilter));
    });
    _this.viewPropertiesPhones = ko__WEBPACK_IMPORTED_MODULE_13__[/* default */ "a"].computed(function () {
      return _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_7___default()(___WEBPACK_IMPORTED_MODULE_11___default.a).call(___WEBPACK_IMPORTED_MODULE_11___default.a, _this.viewProperties(), function (property) {
        return Common_Enums__WEBPACK_IMPORTED_MODULE_16__["ContactPropertyType"].Phone === property.type();
      });
    });
    _this.viewPropertiesEmailsNonEmpty = ko__WEBPACK_IMPORTED_MODULE_13__[/* default */ "a"].computed(function () {
      return _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_7___default()(___WEBPACK_IMPORTED_MODULE_11___default.a).call(___WEBPACK_IMPORTED_MODULE_11___default.a, _this.viewPropertiesNames(), function (property) {
        return '' !== Object(Common_Utils__WEBPACK_IMPORTED_MODULE_17__["trim"])(property.value());
      });
    });

    var propertyFocused = function propertyFocused(property) {
      var focused = property.focused();
      return '' === Object(Common_Utils__WEBPACK_IMPORTED_MODULE_17__["trim"])(property.value()) && !focused;
    };

    _this.viewPropertiesEmailsEmptyAndOnFocused = ko__WEBPACK_IMPORTED_MODULE_13__[/* default */ "a"].computed(function () {
      return _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_7___default()(___WEBPACK_IMPORTED_MODULE_11___default.a).call(___WEBPACK_IMPORTED_MODULE_11___default.a, _this.viewPropertiesEmails(), propertyFocused);
    });
    _this.viewPropertiesPhonesEmptyAndOnFocused = ko__WEBPACK_IMPORTED_MODULE_13__[/* default */ "a"].computed(function () {
      return _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_7___default()(___WEBPACK_IMPORTED_MODULE_11___default.a).call(___WEBPACK_IMPORTED_MODULE_11___default.a, _this.viewPropertiesPhones(), propertyFocused);
    });
    _this.viewPropertiesWebEmptyAndOnFocused = ko__WEBPACK_IMPORTED_MODULE_13__[/* default */ "a"].computed(function () {
      return _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_7___default()(___WEBPACK_IMPORTED_MODULE_11___default.a).call(___WEBPACK_IMPORTED_MODULE_11___default.a, _this.viewPropertiesWeb(), propertyFocused);
    });
    _this.viewPropertiesOtherEmptyAndOnFocused = ko__WEBPACK_IMPORTED_MODULE_13__[/* default */ "a"].computed(function () {
      return _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_7___default()(___WEBPACK_IMPORTED_MODULE_11___default.a).call(___WEBPACK_IMPORTED_MODULE_11___default.a, _this.viewPropertiesOther(), propertyFocused);
    });

    _this.viewPropertiesEmailsEmptyAndOnFocused.subscribe(fFastClearEmptyListHelper);

    _this.viewPropertiesPhonesEmptyAndOnFocused.subscribe(fFastClearEmptyListHelper);

    _this.viewPropertiesWebEmptyAndOnFocused.subscribe(fFastClearEmptyListHelper);

    _this.viewPropertiesOtherEmptyAndOnFocused.subscribe(fFastClearEmptyListHelper);

    _this.viewSaving = ko__WEBPACK_IMPORTED_MODULE_13__[/* default */ "a"].observable(false);
    _this.useCheckboxesInList = Stores_User_Settings__WEBPACK_IMPORTED_MODULE_23__[/* default */ "a"].useCheckboxesInList;

    _this.search.subscribe(function () {
      _this.reloadContactList();
    });

    _this.contacts.subscribe(Common_Utils__WEBPACK_IMPORTED_MODULE_17__["windowResizeCallback"]);

    _this.viewProperties.subscribe(Common_Utils__WEBPACK_IMPORTED_MODULE_17__["windowResizeCallback"]);

    _this.contactsChecked = ko__WEBPACK_IMPORTED_MODULE_13__[/* default */ "a"].computed(function () {
      return _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_7___default()(___WEBPACK_IMPORTED_MODULE_11___default.a).call(___WEBPACK_IMPORTED_MODULE_11___default.a, _this.contacts(), function (item) {
        return item.checked();
      });
    });
    _this.contactsCheckedOrSelected = ko__WEBPACK_IMPORTED_MODULE_13__[/* default */ "a"].computed(function () {
      var checked = _this.contactsChecked(),
          selected = _this.currentContact();

      return ___WEBPACK_IMPORTED_MODULE_11___default.a.union(checked, selected ? [selected] : []);
    });
    _this.contactsCheckedOrSelectedUids = ko__WEBPACK_IMPORTED_MODULE_13__[/* default */ "a"].computed(function () {
      return _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_5___default()(___WEBPACK_IMPORTED_MODULE_11___default.a).call(___WEBPACK_IMPORTED_MODULE_11___default.a, _this.contactsCheckedOrSelected(), function (contact) {
        return contact.idContact;
      });
    });
    _this.selector = new Common_Selector__WEBPACK_IMPORTED_MODULE_20__[/* Selector */ "a"](_this.contacts, _this.currentContact, null, '.e-contact-item .actionHandle', '.e-contact-item.selected', '.e-contact-item .checkboxItem', '.e-contact-item.focused');

    _this.selector.on('onItemSelect', function (contact) {
      _this.populateViewContact(contact ? contact : null);

      if (!contact) {
        _this.emptySelection(true);
      }
    });

    _this.selector.on('onItemGetUid', function (contact) {
      return contact ? contact.generateUid() : '';
    });

    _this.bDropPageAfterDelete = false;
    _this.watchDirty = ko__WEBPACK_IMPORTED_MODULE_13__[/* default */ "a"].observable(false);
    _this.watchHash = ko__WEBPACK_IMPORTED_MODULE_13__[/* default */ "a"].observable(false);
    _this.viewHash = ko__WEBPACK_IMPORTED_MODULE_13__[/* default */ "a"].computed(function () {
      return '' + _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_5___default()(___WEBPACK_IMPORTED_MODULE_11___default.a).call(___WEBPACK_IMPORTED_MODULE_11___default.a, _this.viewProperties(), function (oItem) {
        return oItem.value();
      }).join('');
    }); // this.saveCommandDebounce = _.debounce(_.bind(this.saveCommand, this), 1000);

    _this.viewHash.subscribe(function () {
      if (_this.watchHash() && !_this.viewReadOnly() && !_this.watchDirty()) {
        _this.watchDirty(true);
      }
    });

    _this.sDefaultKeyScope = Common_Enums__WEBPACK_IMPORTED_MODULE_16__["KeyState"].ContactList;
    return _this;
  }

  var _proto = ContactsPopupView.prototype;

  _proto.newCommand = function newCommand() {
    this.populateViewContact(null);
    this.currentContact(null);
  };

  _proto.deleteCommand = function deleteCommand() {
    this.deleteSelectedContacts();
    this.emptySelection(true);
  };

  _proto.newMessageCommand = function newMessageCommand() {
    if (!Storage_Settings__WEBPACK_IMPORTED_MODULE_26__["capa"](Common_Enums__WEBPACK_IMPORTED_MODULE_16__["Capa"].Composer)) {
      return false;
    }

    var aE = [],
        toEmails = null,
        ccEmails = null,
        bccEmails = null;
    var aC = this.contactsCheckedOrSelected();

    if (Object(Common_Utils__WEBPACK_IMPORTED_MODULE_17__["isNonEmptyArray"])(aC)) {
      aE = _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_5___default()(___WEBPACK_IMPORTED_MODULE_11___default.a).call(___WEBPACK_IMPORTED_MODULE_11___default.a, aC, function (oItem) {
        if (oItem) {
          var data = oItem.getNameAndEmailHelper(),
              email = data ? new Model_Email__WEBPACK_IMPORTED_MODULE_27__["EmailModel"](data[0], data[1]) : null;

          if (email && email.validate()) {
            return email;
          }
        }

        return null;
      });
      aE = ___WEBPACK_IMPORTED_MODULE_11___default.a.compact(aE);
    }

    if (Object(Common_Utils__WEBPACK_IMPORTED_MODULE_17__["isNonEmptyArray"])(aE)) {
      this.bBackToCompose = false;
      Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_31__["hideScreenPopup"])(ContactsPopupView);

      switch (this.sLastComposeFocusedField) {
        case 'cc':
          ccEmails = aE;
          break;

        case 'bcc':
          bccEmails = aE;
          break;

        case 'to':
        default:
          toEmails = aE;
          break;
      }

      this.sLastComposeFocusedField = '';

      ___WEBPACK_IMPORTED_MODULE_11___default.a.delay(function () {
        Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_31__["showScreenPopup"])(__webpack_require__(/*! View/Popup/Compose */ 122), [Common_Enums__WEBPACK_IMPORTED_MODULE_16__["ComposeType"].Empty, null, toEmails, ccEmails, bccEmails]);
      }, Common_Enums__WEBPACK_IMPORTED_MODULE_16__["Magics"].Time200ms);
    }

    return true;
  };

  _proto.clearCommand = function clearCommand() {
    this.search('');
  };

  _proto.saveCommand = function saveCommand() {
    var _this2 = this;

    this.viewSaving(true);
    this.viewSaveTrigger(Common_Enums__WEBPACK_IMPORTED_MODULE_16__["SaveSettingsStep"].Animate);
    var requestUid = Object(Common_Utils__WEBPACK_IMPORTED_MODULE_17__["fakeMd5"])(),
        properties = [];

    ___WEBPACK_IMPORTED_MODULE_11___default.a.each(this.viewProperties(), function (oItem) {
      if (oItem.type() && oItem.type() !== Common_Enums__WEBPACK_IMPORTED_MODULE_16__["ContactPropertyType"].FullName && '' !== Object(Common_Utils__WEBPACK_IMPORTED_MODULE_17__["trim"])(oItem.value())) {
        properties.push([oItem.type(), oItem.value(), oItem.typeStr()]);
      }
    });

    Remote_User_Ajax__WEBPACK_IMPORTED_MODULE_25__[/* default */ "a"].contactSave(function (sResult, oData) {
      var res = false;

      _this2.viewSaving(false);

      if (Common_Enums__WEBPACK_IMPORTED_MODULE_16__["StorageResultType"].Success === sResult && oData && oData.Result && oData.Result.RequestUid === requestUid && 0 < Object(Common_Utils__WEBPACK_IMPORTED_MODULE_17__["pInt"])(oData.Result.ResultID)) {
        if ('' === _this2.viewID()) {
          _this2.viewID(Object(Common_Utils__WEBPACK_IMPORTED_MODULE_17__["pInt"])(oData.Result.ResultID));
        }

        _this2.reloadContactList();

        res = true;
      }

      ___WEBPACK_IMPORTED_MODULE_11___default.a.delay(function () {
        _this2.viewSaveTrigger(res ? Common_Enums__WEBPACK_IMPORTED_MODULE_16__["SaveSettingsStep"].TrueResult : Common_Enums__WEBPACK_IMPORTED_MODULE_16__["SaveSettingsStep"].FalseResult);
      }, Common_Enums__WEBPACK_IMPORTED_MODULE_16__["Magics"].Time350ms);

      if (res) {
        _this2.watchDirty(false);

        ___WEBPACK_IMPORTED_MODULE_11___default.a.delay(function () {
          _this2.viewSaveTrigger(Common_Enums__WEBPACK_IMPORTED_MODULE_16__["SaveSettingsStep"].Idle);
        }, Common_Enums__WEBPACK_IMPORTED_MODULE_16__["Magics"].Time1s);
      }
    }, requestUid, this.viewID(), properties);
  };

  _proto.syncCommand = function syncCommand() {
    var _this3 = this;

    Object(Helper_Apps_User__WEBPACK_IMPORTED_MODULE_30__[/* getApp */ "a"])().contactsSync(function (result, data) {
      if (Common_Enums__WEBPACK_IMPORTED_MODULE_16__["StorageResultType"].Success !== result || !data || !data.Result) {
        window__WEBPACK_IMPORTED_MODULE_10___default.a.alert(Object(Common_Translator__WEBPACK_IMPORTED_MODULE_22__["getNotification"])(data && data.ErrorCode ? data.ErrorCode : Common_Enums__WEBPACK_IMPORTED_MODULE_16__["Notification"].ContactsSyncError));
      }

      _this3.reloadContactList(true);
    });
  };

  _proto.getPropertyPlaceholder = function getPropertyPlaceholder(type) {
    var result = '';

    switch (type) {
      case Common_Enums__WEBPACK_IMPORTED_MODULE_16__["ContactPropertyType"].LastName:
        result = 'CONTACTS/PLACEHOLDER_ENTER_LAST_NAME';
        break;

      case Common_Enums__WEBPACK_IMPORTED_MODULE_16__["ContactPropertyType"].FirstName:
        result = 'CONTACTS/PLACEHOLDER_ENTER_FIRST_NAME';
        break;

      case Common_Enums__WEBPACK_IMPORTED_MODULE_16__["ContactPropertyType"].Nick:
        result = 'CONTACTS/PLACEHOLDER_ENTER_NICK_NAME';
        break;
      // no default
    }

    return result;
  };

  _proto.addNewProperty = function addNewProperty(type, typeStr) {
    this.viewProperties.push(new Model_ContactProperty__WEBPACK_IMPORTED_MODULE_29__[/* ContactPropertyModel */ "a"](type, typeStr || '', '', true, this.getPropertyPlaceholder(type)));
  };

  _proto.addNewOrFocusProperty = function addNewOrFocusProperty(type, typeStr) {
    var item = _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_6___default()(___WEBPACK_IMPORTED_MODULE_11___default.a).call(___WEBPACK_IMPORTED_MODULE_11___default.a, this.viewProperties(), function (prop) {
      return type === prop.type();
    });

    if (item) {
      item.focused(true);
    } else {
      this.addNewProperty(type, typeStr);
    }
  };

  _proto.addNewEmail = function addNewEmail() {
    this.addNewProperty(Common_Enums__WEBPACK_IMPORTED_MODULE_16__["ContactPropertyType"].Email, 'Home');
  };

  _proto.addNewPhone = function addNewPhone() {
    this.addNewProperty(Common_Enums__WEBPACK_IMPORTED_MODULE_16__["ContactPropertyType"].Phone, 'Mobile');
  };

  _proto.addNewWeb = function addNewWeb() {
    this.addNewProperty(Common_Enums__WEBPACK_IMPORTED_MODULE_16__["ContactPropertyType"].Web);
  };

  _proto.addNewNickname = function addNewNickname() {
    this.addNewOrFocusProperty(Common_Enums__WEBPACK_IMPORTED_MODULE_16__["ContactPropertyType"].Nick);
  };

  _proto.addNewNotes = function addNewNotes() {
    this.addNewOrFocusProperty(Common_Enums__WEBPACK_IMPORTED_MODULE_16__["ContactPropertyType"].Note);
  };

  _proto.addNewBirthday = function addNewBirthday() {
    this.addNewOrFocusProperty(Common_Enums__WEBPACK_IMPORTED_MODULE_16__["ContactPropertyType"].Birthday);
  };

  _proto.exportVcf = function exportVcf() {
    Object(Helper_Apps_User__WEBPACK_IMPORTED_MODULE_30__[/* getApp */ "a"])().download(Object(Common_Links__WEBPACK_IMPORTED_MODULE_21__[/* exportContactsVcf */ "l"])());
  };

  _proto.exportCsv = function exportCsv() {
    Object(Helper_Apps_User__WEBPACK_IMPORTED_MODULE_30__[/* getApp */ "a"])().download(Object(Common_Links__WEBPACK_IMPORTED_MODULE_21__[/* exportContactsCsv */ "k"])());
  };

  _proto.initUploader = function initUploader() {
    var _this4 = this;

    if (this.importUploaderButton()) {
      var j = new Jua__WEBPACK_IMPORTED_MODULE_15___default.a({
        'action': Object(Common_Links__WEBPACK_IMPORTED_MODULE_21__[/* uploadContacts */ "I"])(),
        'name': 'uploader',
        'queueSize': 1,
        'multipleSizeLimit': 1,
        'disableDragAndDrop': true,
        'disableMultiple': true,
        'disableDocumentDropPrevent': true,
        'clickElement': this.importUploaderButton()
      });

      if (j) {
        j.on('onStart', function () {
          _this4.contacts.importing(true);
        }).on('onComplete', function (id, result, data) {
          _this4.contacts.importing(false);

          _this4.reloadContactList();

          if (!id || !result || !data || !data.Result) {
            window__WEBPACK_IMPORTED_MODULE_10___default.a.alert(Object(Common_Translator__WEBPACK_IMPORTED_MODULE_22__["i18n"])('CONTACTS/ERROR_IMPORT_FILE'));
          }
        });
      }
    }
  };

  _proto.removeCheckedOrSelectedContactsFromList = function removeCheckedOrSelectedContactsFromList() {
    var _this5 = this;

    var koContacts = this.contacts,
        contacts = this.contactsCheckedOrSelected();
    var currentContact = this.currentContact(),
        count = this.contacts().length;

    if (0 < contacts.length) {
      ___WEBPACK_IMPORTED_MODULE_11___default.a.each(contacts, function (contact) {
        if (currentContact && currentContact.idContact === contact.idContact) {
          currentContact = null;

          _this5.currentContact(null);
        }

        contact.deleted(true);
        count -= 1;
      });

      if (0 >= count) {
        this.bDropPageAfterDelete = true;
      }

      ___WEBPACK_IMPORTED_MODULE_11___default.a.delay(function () {
        ___WEBPACK_IMPORTED_MODULE_11___default.a.each(contacts, function (contact) {
          koContacts.remove(contact);
          Object(Common_Utils__WEBPACK_IMPORTED_MODULE_17__["delegateRunOnDestroy"])(contact);
        });
      }, Common_Enums__WEBPACK_IMPORTED_MODULE_16__["Magics"].Time500ms);
    }
  };

  _proto.deleteSelectedContacts = function deleteSelectedContacts() {
    if (0 < this.contactsCheckedOrSelected().length) {
      Remote_User_Ajax__WEBPACK_IMPORTED_MODULE_25__[/* default */ "a"].contactsDelete(_babel_runtime_corejs3_core_js_stable_instance_bind__WEBPACK_IMPORTED_MODULE_4___default()(___WEBPACK_IMPORTED_MODULE_11___default.a).call(___WEBPACK_IMPORTED_MODULE_11___default.a, this.deleteResponse, this), this.contactsCheckedOrSelectedUids());
      this.removeCheckedOrSelectedContactsFromList();
    }
  }
  /**
   * @param {string} sResult
   * @param {AjaxJsonDefaultResponse} oData
   */
  ;

  _proto.deleteResponse = function deleteResponse(sResult, oData) {
    var _this6 = this;

    if (Common_Enums__WEBPACK_IMPORTED_MODULE_16__["Magics"].Time500ms < (Common_Enums__WEBPACK_IMPORTED_MODULE_16__["StorageResultType"].Success === sResult && oData && oData.Time ? Object(Common_Utils__WEBPACK_IMPORTED_MODULE_17__["pInt"])(oData.Time) : 0)) {
      this.reloadContactList(this.bDropPageAfterDelete);
    } else {
      ___WEBPACK_IMPORTED_MODULE_11___default.a.delay(function () {
        _this6.reloadContactList(_this6.bDropPageAfterDelete);
      }, Common_Enums__WEBPACK_IMPORTED_MODULE_16__["Magics"].Time500ms);
    }
  };

  _proto.removeProperty = function removeProperty(oProp) {
    this.viewProperties.remove(oProp);
    Object(Common_Utils__WEBPACK_IMPORTED_MODULE_17__["delegateRunOnDestroy"])(oProp);
  }
  /**
   * @param {?ContactModel} contact
   */
  ;

  _proto.populateViewContact = function populateViewContact(contact) {
    var id = '',
        lastName = '',
        firstName = '';
    var list = [];
    this.watchHash(false);
    this.emptySelection(false);
    this.viewReadOnly(false);

    if (contact) {
      id = contact.idContact;

      if (Object(Common_Utils__WEBPACK_IMPORTED_MODULE_17__["isNonEmptyArray"])(contact.properties)) {
        ___WEBPACK_IMPORTED_MODULE_11___default.a.each(contact.properties, function (property) {
          if (property && property[0]) {
            if (Common_Enums__WEBPACK_IMPORTED_MODULE_16__["ContactPropertyType"].LastName === property[0]) {
              lastName = property[1];
            } else if (Common_Enums__WEBPACK_IMPORTED_MODULE_16__["ContactPropertyType"].FirstName === property[0]) {
              firstName = property[1];
            } else {
              list.push(new Model_ContactProperty__WEBPACK_IMPORTED_MODULE_29__[/* ContactPropertyModel */ "a"](property[0], property[2] || '', property[1]));
            }
          }
        });
      }

      this.viewReadOnly(!!contact.readOnly);
    }

    list.unshift(new Model_ContactProperty__WEBPACK_IMPORTED_MODULE_29__[/* ContactPropertyModel */ "a"](Common_Enums__WEBPACK_IMPORTED_MODULE_16__["ContactPropertyType"].LastName, '', lastName, false, this.getPropertyPlaceholder(Common_Enums__WEBPACK_IMPORTED_MODULE_16__["ContactPropertyType"].LastName)));
    list.unshift(new Model_ContactProperty__WEBPACK_IMPORTED_MODULE_29__[/* ContactPropertyModel */ "a"](Common_Enums__WEBPACK_IMPORTED_MODULE_16__["ContactPropertyType"].FirstName, '', firstName, !contact, this.getPropertyPlaceholder(Common_Enums__WEBPACK_IMPORTED_MODULE_16__["ContactPropertyType"].FirstName)));
    this.viewID(id);
    Object(Common_Utils__WEBPACK_IMPORTED_MODULE_17__["delegateRunOnDestroy"])(this.viewProperties());
    this.viewProperties([]);
    this.viewProperties(list);
    this.watchDirty(false);
    this.watchHash(true);
  }
  /**
   * @param {boolean=} dropPagePosition = false
   */
  ;

  _proto.reloadContactList = function reloadContactList(dropPagePosition) {
    var _this7 = this;

    if (dropPagePosition === void 0) {
      dropPagePosition = false;
    }

    var offset = (this.contactsPage() - 1) * Common_Consts__WEBPACK_IMPORTED_MODULE_18__[/* CONTACTS_PER_PAGE */ "c"];
    this.bDropPageAfterDelete = false;

    if (dropPagePosition) {
      this.contactsPage(1);
      offset = 0;
    }

    this.contacts.loading(true);
    Remote_User_Ajax__WEBPACK_IMPORTED_MODULE_25__[/* default */ "a"].contacts(function (result, data) {
      var count = 0,
          list = [];

      if (Common_Enums__WEBPACK_IMPORTED_MODULE_16__["StorageResultType"].Success === result && data && data.Result && data.Result.List) {
        if (Object(Common_Utils__WEBPACK_IMPORTED_MODULE_17__["isNonEmptyArray"])(data.Result.List)) {
          list = _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_5___default()(___WEBPACK_IMPORTED_MODULE_11___default.a).call(___WEBPACK_IMPORTED_MODULE_11___default.a, data.Result.List, function (item) {
            var contact = new Model_Contact__WEBPACK_IMPORTED_MODULE_28__[/* ContactModel */ "a"]();
            return contact.parse(item) ? contact : null;
          });
          list = ___WEBPACK_IMPORTED_MODULE_11___default.a.compact(list);
          count = Object(Common_Utils__WEBPACK_IMPORTED_MODULE_17__["pInt"])(data.Result.Count);
          count = 0 < count ? count : 0;
        }
      }

      _this7.contactsCount(count);

      Object(Common_Utils__WEBPACK_IMPORTED_MODULE_17__["delegateRunOnDestroy"])(_this7.contacts());

      _this7.contacts(list);

      _this7.contacts.loading(false);

      _this7.viewClearSearch('' !== _this7.search());
    }, offset, Common_Consts__WEBPACK_IMPORTED_MODULE_18__[/* CONTACTS_PER_PAGE */ "c"], this.search());
  };

  _proto.onBuild = function onBuild(dom) {
    var _this8 = this;

    this.oContentVisible = $__WEBPACK_IMPORTED_MODULE_12___default()('.b-list-content', dom);
    this.oContentScrollable = $__WEBPACK_IMPORTED_MODULE_12___default()('.content', this.oContentVisible);
    this.selector.init(this.oContentVisible, this.oContentScrollable, Common_Enums__WEBPACK_IMPORTED_MODULE_16__["KeyState"].ContactList);
    key__WEBPACK_IMPORTED_MODULE_14___default()('delete', Common_Enums__WEBPACK_IMPORTED_MODULE_16__["KeyState"].ContactList, function () {
      _this8.deleteCommand();

      return false;
    });
    key__WEBPACK_IMPORTED_MODULE_14___default()('c, w', Common_Enums__WEBPACK_IMPORTED_MODULE_16__["KeyState"].ContactList, function () {
      _this8.newMessageCommand();

      return false;
    });
    var self = this;
    dom.on('click', '.e-pagenator .e-page', function () {
      // eslint-disable-line prefer-arrow-callback
      var page = ko__WEBPACK_IMPORTED_MODULE_13__[/* default */ "a"].dataFor(this); // eslint-disable-line no-invalid-this

      if (page) {
        self.contactsPage(Object(Common_Utils__WEBPACK_IMPORTED_MODULE_17__["pInt"])(page.value));
        self.reloadContactList();
      }
    });
    this.initUploader();
  };

  _proto.onShow = function onShow(bBackToCompose, sLastComposeFocusedField) {
    this.bBackToCompose = Object(Common_Utils__WEBPACK_IMPORTED_MODULE_17__["isUnd"])(bBackToCompose) ? false : !!bBackToCompose;
    this.sLastComposeFocusedField = Object(Common_Utils__WEBPACK_IMPORTED_MODULE_17__["isUnd"])(sLastComposeFocusedField) ? '' : sLastComposeFocusedField;
    Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_31__["routeOff"])();
    this.reloadContactList(true);
  };

  _proto.onHide = function onHide() {
    Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_31__["routeOn"])();
    this.currentContact(null);
    this.emptySelection(true);
    this.search('');
    this.contactsCount(0);
    Object(Common_Utils__WEBPACK_IMPORTED_MODULE_17__["delegateRunOnDestroy"])(this.contacts());
    this.contacts([]);
    this.sLastComposeFocusedField = '';

    if (this.bBackToCompose) {
      this.bBackToCompose = false;

      if (Storage_Settings__WEBPACK_IMPORTED_MODULE_26__["capa"](Common_Enums__WEBPACK_IMPORTED_MODULE_16__["Capa"].Composer)) {
        Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_31__["showScreenPopup"])(__webpack_require__(/*! View/Popup/Compose */ 122));
      }
    }
  };

  return ContactsPopupView;
}(Knoin_AbstractViewNext__WEBPACK_IMPORTED_MODULE_32__[/* AbstractViewNext */ "a"]), (Object(_babel_runtime_corejs3_helpers_esm_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_9__[/* default */ "a"])(_class2.prototype, "newCommand", [_dec2], _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_3___default()(_class2.prototype, "newCommand"), _class2.prototype), Object(_babel_runtime_corejs3_helpers_esm_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_9__[/* default */ "a"])(_class2.prototype, "deleteCommand", [_dec3], _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_3___default()(_class2.prototype, "deleteCommand"), _class2.prototype), Object(_babel_runtime_corejs3_helpers_esm_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_9__[/* default */ "a"])(_class2.prototype, "newMessageCommand", [_dec4], _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_3___default()(_class2.prototype, "newMessageCommand"), _class2.prototype), Object(_babel_runtime_corejs3_helpers_esm_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_9__[/* default */ "a"])(_class2.prototype, "clearCommand", [_dec5], _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_3___default()(_class2.prototype, "clearCommand"), _class2.prototype), Object(_babel_runtime_corejs3_helpers_esm_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_9__[/* default */ "a"])(_class2.prototype, "saveCommand", [_dec6], _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_3___default()(_class2.prototype, "saveCommand"), _class2.prototype), Object(_babel_runtime_corejs3_helpers_esm_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_9__[/* default */ "a"])(_class2.prototype, "syncCommand", [_dec7], _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_3___default()(_class2.prototype, "syncCommand"), _class2.prototype)), _class2)) || _class);


/***/ }),
/* 409 */
/*!****************************************!*\
  !*** ./dev/View/Popup/FolderCreate.js ***!
  \****************************************/
/*! exports provided: FolderCreateView, default */
/*! all exports used */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FolderCreateView", function() { return FolderCreateView; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return FolderCreateView; });
/* harmony import */ var core_js_modules_es_function_name__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.function.name */ 51);
/* harmony import */ var core_js_modules_es_function_name__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_function_name__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor */ 19);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _babel_runtime_corejs3_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/esm/inheritsLoose */ 10);
/* harmony import */ var _babel_runtime_corejs3_helpers_esm_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/esm/applyDecoratedDescriptor */ 20);
/* harmony import */ var ko__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ko */ 1);
/* harmony import */ var Common_Enums__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! Common/Enums */ 0);
/* harmony import */ var Common_Consts__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! Common/Consts */ 25);
/* harmony import */ var Common_Globals__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! Common/Globals */ 6);
/* harmony import */ var Common_Utils__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! Common/Utils */ 2);
/* harmony import */ var Stores_User_Folder__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! Stores/User/Folder */ 11);
/* harmony import */ var Promises_User_Ajax__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! Promises/User/Ajax */ 87);
/* harmony import */ var Helper_Apps_User__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! Helper/Apps/User */ 22);
/* harmony import */ var Knoin_Knoin__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! Knoin/Knoin */ 7);
/* harmony import */ var Knoin_AbstractViewNext__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! Knoin/AbstractViewNext */ 28);





var _dec, _dec2, _class, _class2;











var FolderCreateView = (_dec = Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_12__["popup"])({
  name: 'View/Popup/FolderCreate',
  templateID: 'PopupsFolderCreate'
}), _dec2 = Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_12__["command"])(function (self) {
  return self.simpleFolderNameValidation(self.folderName());
}), _dec(_class = (_class2 =
/*#__PURE__*/
function (_AbstractViewNext) {
  Object(_babel_runtime_corejs3_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(FolderCreateView, _AbstractViewNext);

  function FolderCreateView() {
    var _this;

    _this = _AbstractViewNext.call(this) || this;
    _this.folderName = ko__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"].observable('');
    _this.folderName.focused = ko__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"].observable(false);
    _this.selectedParentValue = ko__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"].observable(Common_Consts__WEBPACK_IMPORTED_MODULE_6__[/* UNUSED_OPTION_VALUE */ "r"]);
    _this.parentFolderSelectList = ko__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"].computed(function () {
      var top = [],
          list = Stores_User_Folder__WEBPACK_IMPORTED_MODULE_9__[/* default */ "a"].folderList(),
          fRenameCallback = function fRenameCallback(oItem) {
        return oItem ? oItem.isSystemFolder() ? oItem.name() + ' ' + oItem.manageFolderSystemName() : oItem.name() : '';
      };

      top.push(['', '']);
      var fDisableCallback = null;

      if ('' !== Stores_User_Folder__WEBPACK_IMPORTED_MODULE_9__[/* default */ "a"].namespace) {
        fDisableCallback = function fDisableCallback(item) {
          return Stores_User_Folder__WEBPACK_IMPORTED_MODULE_9__[/* default */ "a"].namespace !== item.fullNameRaw.substr(0, Stores_User_Folder__WEBPACK_IMPORTED_MODULE_9__[/* default */ "a"].namespace.length);
        };
      }

      return Object(Common_Utils__WEBPACK_IMPORTED_MODULE_8__["folderListOptionsBuilder"])([], list, [], top, null, fDisableCallback, null, fRenameCallback);
    });
    _this.defautOptionsAfterRender = Common_Utils__WEBPACK_IMPORTED_MODULE_8__["defautOptionsAfterRender"];
    return _this;
  }

  var _proto = FolderCreateView.prototype;

  _proto.createFolderCommand = function createFolderCommand() {
    var parentFolderName = this.selectedParentValue();

    if ('' === parentFolderName && 1 < Stores_User_Folder__WEBPACK_IMPORTED_MODULE_9__[/* default */ "a"].namespace.length) {
      parentFolderName = Stores_User_Folder__WEBPACK_IMPORTED_MODULE_9__[/* default */ "a"].namespace.substr(0, Stores_User_Folder__WEBPACK_IMPORTED_MODULE_9__[/* default */ "a"].namespace.length - 1);
    }

    Object(Helper_Apps_User__WEBPACK_IMPORTED_MODULE_11__[/* getApp */ "a"])().foldersPromisesActionHelper(Promises_User_Ajax__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"].folderCreate(this.folderName(), parentFolderName, Stores_User_Folder__WEBPACK_IMPORTED_MODULE_9__[/* default */ "a"].foldersCreating), Common_Enums__WEBPACK_IMPORTED_MODULE_5__["Notification"].CantCreateFolder);
    this.cancelCommand();
  };

  _proto.simpleFolderNameValidation = function simpleFolderNameValidation(sName) {
    return /^[^\\/]+$/g.test(Object(Common_Utils__WEBPACK_IMPORTED_MODULE_8__["trim"])(sName));
  };

  _proto.clearPopup = function clearPopup() {
    this.folderName('');
    this.selectedParentValue('');
    this.folderName.focused(false);
  };

  _proto.onShow = function onShow() {
    this.clearPopup();
  };

  _proto.onShowWithDelay = function onShowWithDelay() {
    if (!Common_Globals__WEBPACK_IMPORTED_MODULE_7__["bMobileDevice"]) {
      this.folderName.focused(true);
    }
  };

  return FolderCreateView;
}(Knoin_AbstractViewNext__WEBPACK_IMPORTED_MODULE_13__[/* AbstractViewNext */ "a"]), (Object(_babel_runtime_corejs3_helpers_esm_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(_class2.prototype, "createFolderCommand", [_dec2], _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class2.prototype, "createFolderCommand"), _class2.prototype)), _class2)) || _class);


/***/ }),
/* 410 */
/*!**********************************!*\
  !*** ./dev/View/Popup/Filter.js ***!
  \**********************************/
/*! exports provided: FilterPopupView, default */
/*! all exports used */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FilterPopupView", function() { return FilterPopupView; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return FilterPopupView; });
/* harmony import */ var core_js_modules_es_array_filter__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.array.filter */ 272);
/* harmony import */ var core_js_modules_es_array_filter__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_filter__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var core_js_modules_es_function_name__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es.function.name */ 51);
/* harmony import */ var core_js_modules_es_function_name__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_function_name__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor */ 19);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_bind__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/bind */ 26);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_bind__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_bind__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/filter */ 34);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var _babel_runtime_corejs3_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/esm/assertThisInitialized */ 33);
/* harmony import */ var _babel_runtime_corejs3_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/esm/inheritsLoose */ 10);
/* harmony import */ var _babel_runtime_corejs3_helpers_esm_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/esm/applyDecoratedDescriptor */ 20);
/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! _ */ 3);
/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(___WEBPACK_IMPORTED_MODULE_8__);
/* harmony import */ var ko__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ko */ 1);
/* harmony import */ var Common_Enums__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! Common/Enums */ 0);
/* harmony import */ var Common_Globals__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! Common/Globals */ 6);
/* harmony import */ var Common_Utils__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! Common/Utils */ 2);
/* harmony import */ var Common_Translator__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! Common/Translator */ 9);
/* harmony import */ var Stores_User_Filter__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! Stores/User/Filter */ 214);
/* harmony import */ var Stores_User_Folder__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! Stores/User/Folder */ 11);
/* harmony import */ var Knoin_Knoin__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! Knoin/Knoin */ 7);
/* harmony import */ var Knoin_AbstractViewNext__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! Knoin/AbstractViewNext */ 28);









var _dec, _dec2, _class, _class2;











var FilterPopupView = (_dec = Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_16__["popup"])({
  name: 'View/Popup/Filter',
  templateID: 'PopupsFilter'
}), _dec2 = Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_16__["command"])(), _dec(_class = (_class2 =
/*#__PURE__*/
function (_AbstractViewNext) {
  Object(_babel_runtime_corejs3_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"])(FilterPopupView, _AbstractViewNext);

  function FilterPopupView() {
    var _this;

    _this = _AbstractViewNext.call(this) || this;
    _this.isNew = ko__WEBPACK_IMPORTED_MODULE_9__[/* default */ "a"].observable(true);
    _this.modules = Stores_User_Filter__WEBPACK_IMPORTED_MODULE_14__[/* default */ "a"].modules;
    _this.fTrueCallback = null;
    _this.filter = ko__WEBPACK_IMPORTED_MODULE_9__[/* default */ "a"].observable(null);
    _this.allowMarkAsRead = ko__WEBPACK_IMPORTED_MODULE_9__[/* default */ "a"].observable(false);
    _this.defautOptionsAfterRender = Common_Utils__WEBPACK_IMPORTED_MODULE_12__["defautOptionsAfterRender"];
    _this.folderSelectList = Stores_User_Folder__WEBPACK_IMPORTED_MODULE_15__[/* default */ "a"].folderMenuForFilters;
    _this.selectedFolderValue = ko__WEBPACK_IMPORTED_MODULE_9__[/* default */ "a"].observable('');

    _this.selectedFolderValue.subscribe(function () {
      if (_babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_4___default()(_this).call(_this)) {
        _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_4___default()(_this).call(_this).actionValue.error(false);
      }
    });

    _this.actionTypeOptions = ko__WEBPACK_IMPORTED_MODULE_9__[/* default */ "a"].observableArray([]);
    _this.fieldOptions = ko__WEBPACK_IMPORTED_MODULE_9__[/* default */ "a"].observableArray([]);
    _this.typeOptions = ko__WEBPACK_IMPORTED_MODULE_9__[/* default */ "a"].observableArray([]);
    _this.typeOptionsSize = ko__WEBPACK_IMPORTED_MODULE_9__[/* default */ "a"].observableArray([]);
    Object(Common_Translator__WEBPACK_IMPORTED_MODULE_13__["initOnStartOrLangChange"])(_babel_runtime_corejs3_core_js_stable_instance_bind__WEBPACK_IMPORTED_MODULE_3___default()(___WEBPACK_IMPORTED_MODULE_8___default.a).call(___WEBPACK_IMPORTED_MODULE_8___default.a, _this.populateOptions, Object(_babel_runtime_corejs3_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"])(_this)));

    _this.modules.subscribe(_this.populateOptions, Object(_babel_runtime_corejs3_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"])(_this));

    return _this;
  }

  var _proto = FilterPopupView.prototype;

  _proto.saveFilterCommand = function saveFilterCommand() {
    var _context;

    if (_babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_4___default()(_context = this).call(_context)) {
      var _context2, _context4;

      if (Common_Enums__WEBPACK_IMPORTED_MODULE_10__["FiltersAction"].MoveTo === _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_4___default()(_context2 = this).call(_context2).actionType()) {
        var _context3;

        _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_4___default()(_context3 = this).call(_context3).actionValue(this.selectedFolderValue());
      }

      if (!_babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_4___default()(_context4 = this).call(_context4).verify()) {
        return false;
      }

      if (this.fTrueCallback) {
        var _context5;

        this.fTrueCallback(_babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_4___default()(_context5 = this).call(_context5));
      }

      if (this.modalVisibility()) {
        Object(Common_Utils__WEBPACK_IMPORTED_MODULE_12__["delegateRun"])(this, 'closeCommand');
      }
    }

    return true;
  };

  _proto.populateOptions = function populateOptions() {
    this.actionTypeOptions([]); // this.actionTypeOptions.push({'id': FiltersAction.None,
    // 'name': i18n('POPUPS_FILTER/SELECT_ACTION_NONE')});

    var modules = this.modules();

    if (modules) {
      if (modules.markasread) {
        this.allowMarkAsRead(true);
      }

      if (modules.moveto) {
        this.actionTypeOptions.push({
          'id': Common_Enums__WEBPACK_IMPORTED_MODULE_10__["FiltersAction"].MoveTo,
          'name': Object(Common_Translator__WEBPACK_IMPORTED_MODULE_13__["i18n"])('POPUPS_FILTER/SELECT_ACTION_MOVE_TO')
        });
      }

      if (modules.redirect) {
        this.actionTypeOptions.push({
          'id': Common_Enums__WEBPACK_IMPORTED_MODULE_10__["FiltersAction"].Forward,
          'name': Object(Common_Translator__WEBPACK_IMPORTED_MODULE_13__["i18n"])('POPUPS_FILTER/SELECT_ACTION_FORWARD_TO')
        });
      }

      if (modules.reject) {
        this.actionTypeOptions.push({
          'id': Common_Enums__WEBPACK_IMPORTED_MODULE_10__["FiltersAction"].Reject,
          'name': Object(Common_Translator__WEBPACK_IMPORTED_MODULE_13__["i18n"])('POPUPS_FILTER/SELECT_ACTION_REJECT')
        });
      }

      if (modules.vacation) {
        this.actionTypeOptions.push({
          'id': Common_Enums__WEBPACK_IMPORTED_MODULE_10__["FiltersAction"].Vacation,
          'name': Object(Common_Translator__WEBPACK_IMPORTED_MODULE_13__["i18n"])('POPUPS_FILTER/SELECT_ACTION_VACATION_MESSAGE')
        });
      }
    }

    this.actionTypeOptions.push({
      'id': Common_Enums__WEBPACK_IMPORTED_MODULE_10__["FiltersAction"].Discard,
      'name': Object(Common_Translator__WEBPACK_IMPORTED_MODULE_13__["i18n"])('POPUPS_FILTER/SELECT_ACTION_DISCARD')
    });
    this.fieldOptions([{
      'id': Common_Enums__WEBPACK_IMPORTED_MODULE_10__["FilterConditionField"].From,
      'name': Object(Common_Translator__WEBPACK_IMPORTED_MODULE_13__["i18n"])('POPUPS_FILTER/SELECT_FIELD_FROM')
    }, {
      'id': Common_Enums__WEBPACK_IMPORTED_MODULE_10__["FilterConditionField"].Recipient,
      'name': Object(Common_Translator__WEBPACK_IMPORTED_MODULE_13__["i18n"])('POPUPS_FILTER/SELECT_FIELD_RECIPIENTS')
    }, {
      'id': Common_Enums__WEBPACK_IMPORTED_MODULE_10__["FilterConditionField"].Subject,
      'name': Object(Common_Translator__WEBPACK_IMPORTED_MODULE_13__["i18n"])('POPUPS_FILTER/SELECT_FIELD_SUBJECT')
    }, {
      'id': Common_Enums__WEBPACK_IMPORTED_MODULE_10__["FilterConditionField"].Size,
      'name': Object(Common_Translator__WEBPACK_IMPORTED_MODULE_13__["i18n"])('POPUPS_FILTER/SELECT_FIELD_SIZE')
    }, {
      'id': Common_Enums__WEBPACK_IMPORTED_MODULE_10__["FilterConditionField"].Header,
      'name': Object(Common_Translator__WEBPACK_IMPORTED_MODULE_13__["i18n"])('POPUPS_FILTER/SELECT_FIELD_HEADER')
    }]);
    this.typeOptions([{
      'id': Common_Enums__WEBPACK_IMPORTED_MODULE_10__["FilterConditionType"].Contains,
      'name': Object(Common_Translator__WEBPACK_IMPORTED_MODULE_13__["i18n"])('POPUPS_FILTER/SELECT_TYPE_CONTAINS')
    }, {
      'id': Common_Enums__WEBPACK_IMPORTED_MODULE_10__["FilterConditionType"].NotContains,
      'name': Object(Common_Translator__WEBPACK_IMPORTED_MODULE_13__["i18n"])('POPUPS_FILTER/SELECT_TYPE_NOT_CONTAINS')
    }, {
      'id': Common_Enums__WEBPACK_IMPORTED_MODULE_10__["FilterConditionType"].EqualTo,
      'name': Object(Common_Translator__WEBPACK_IMPORTED_MODULE_13__["i18n"])('POPUPS_FILTER/SELECT_TYPE_EQUAL_TO')
    }, {
      'id': Common_Enums__WEBPACK_IMPORTED_MODULE_10__["FilterConditionType"].NotEqualTo,
      'name': Object(Common_Translator__WEBPACK_IMPORTED_MODULE_13__["i18n"])('POPUPS_FILTER/SELECT_TYPE_NOT_EQUAL_TO')
    }]);

    if (modules && modules.regex) {
      this.typeOptions.push({
        'id': Common_Enums__WEBPACK_IMPORTED_MODULE_10__["FilterConditionType"].Regex,
        'name': 'Regex'
      });
    }

    this.typeOptionsSize([{
      'id': Common_Enums__WEBPACK_IMPORTED_MODULE_10__["FilterConditionType"].Over,
      'name': Object(Common_Translator__WEBPACK_IMPORTED_MODULE_13__["i18n"])('POPUPS_FILTER/SELECT_TYPE_OVER')
    }, {
      'id': Common_Enums__WEBPACK_IMPORTED_MODULE_10__["FilterConditionType"].Under,
      'name': Object(Common_Translator__WEBPACK_IMPORTED_MODULE_13__["i18n"])('POPUPS_FILTER/SELECT_TYPE_UNDER')
    }]);
  };

  _proto.removeCondition = function removeCondition(oConditionToDelete) {
    var _context6;

    if (_babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_4___default()(_context6 = this).call(_context6)) {
      var _context7;

      _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_4___default()(_context7 = this).call(_context7).removeCondition(oConditionToDelete);
    }
  };

  _proto.clearPopup = function clearPopup() {
    var _context8;

    this.isNew(true);
    this.fTrueCallback = null;

    _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_4___default()(_context8 = this).call(_context8, null);
  };

  _proto.onShow = function onShow(oFilter, fTrueCallback, bEdit) {
    var _context9;

    this.clearPopup();
    this.fTrueCallback = fTrueCallback;

    _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_4___default()(_context9 = this).call(_context9, oFilter);

    if (oFilter) {
      this.selectedFolderValue(oFilter.actionValue());
    }

    this.isNew(!bEdit);

    if (!bEdit && oFilter) {
      oFilter.name.focused(true);
    }
  };

  _proto.onShowWithDelay = function onShowWithDelay() {
    var _context10;

    if (this.isNew() && _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_4___default()(_context10 = this).call(_context10) && !Common_Globals__WEBPACK_IMPORTED_MODULE_11__["bMobileDevice"]) {
      var _context11;

      _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_4___default()(_context11 = this).call(_context11).name.focused(true);
    }
  };

  return FilterPopupView;
}(Knoin_AbstractViewNext__WEBPACK_IMPORTED_MODULE_17__[/* AbstractViewNext */ "a"]), (Object(_babel_runtime_corejs3_helpers_esm_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"])(_class2.prototype, "saveFilterCommand", [_dec2], _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_2___default()(_class2.prototype, "saveFilterCommand"), _class2.prototype)), _class2)) || _class);


/***/ }),
/* 411 */
/*!**************************************************!*\
  !*** ./dev/View/Popup/TwoFactorConfiguration.js ***!
  \**************************************************/
/*! exports provided: TwoFactorConfigurationPopupView, default */
/*! all exports used */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TwoFactorConfigurationPopupView", function() { return TwoFactorConfigurationPopupView; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return TwoFactorConfigurationPopupView; });
/* harmony import */ var core_js_modules_es_regexp_exec__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.regexp.exec */ 45);
/* harmony import */ var core_js_modules_es_regexp_exec__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_regexp_exec__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var core_js_modules_es_string_replace__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es.string.replace */ 56);
/* harmony import */ var core_js_modules_es_string_replace__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_replace__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_bind__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/bind */ 26);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_bind__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_bind__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _babel_runtime_corejs3_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/esm/assertThisInitialized */ 33);
/* harmony import */ var _babel_runtime_corejs3_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/esm/inheritsLoose */ 10);
/* harmony import */ var window__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! window */ 4);
/* harmony import */ var window__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(window__WEBPACK_IMPORTED_MODULE_5__);
/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! _ */ 3);
/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(___WEBPACK_IMPORTED_MODULE_6__);
/* harmony import */ var ko__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ko */ 1);
/* harmony import */ var qr__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! qr */ 396);
/* harmony import */ var qr__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(qr__WEBPACK_IMPORTED_MODULE_8__);
/* harmony import */ var Common_Enums__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! Common/Enums */ 0);
/* harmony import */ var Common_Utils__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! Common/Utils */ 2);
/* harmony import */ var Common_Translator__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! Common/Translator */ 9);
/* harmony import */ var Storage_Settings__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! Storage/Settings */ 5);
/* harmony import */ var Remote_User_Ajax__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! Remote/User/Ajax */ 16);
/* harmony import */ var Helper_Apps_User__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! Helper/Apps/User */ 22);
/* harmony import */ var Knoin_Knoin__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! Knoin/Knoin */ 7);
/* harmony import */ var Knoin_AbstractViewNext__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! Knoin/AbstractViewNext */ 28);






var _dec, _class;













var TwoFactorConfigurationPopupView = (_dec = Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_15__["popup"])({
  name: 'View/Popup/TwoFactorConfiguration',
  templateID: 'PopupsTwoFactorConfiguration'
}), _dec(_class =
/*#__PURE__*/
function (_AbstractViewNext) {
  Object(_babel_runtime_corejs3_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])(TwoFactorConfigurationPopupView, _AbstractViewNext);

  function TwoFactorConfigurationPopupView() {
    var _this;

    _this = _AbstractViewNext.call(this) || this;
    _this.lock = ko__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"].observable(false);
    _this.capaTwoFactor = Storage_Settings__WEBPACK_IMPORTED_MODULE_12__["capa"](Common_Enums__WEBPACK_IMPORTED_MODULE_9__["Capa"].TwoFactor);
    _this.processing = ko__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"].observable(false);
    _this.clearing = ko__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"].observable(false);
    _this.secreting = ko__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"].observable(false);
    _this.viewUser = ko__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"].observable('');
    _this.twoFactorStatus = ko__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"].observable(false);
    _this.twoFactorTested = ko__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"].observable(false);
    _this.viewSecret = ko__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"].observable('');
    _this.viewBackupCodes = ko__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"].observable('');
    _this.viewUrlTitle = ko__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"].observable('');
    _this.viewUrl = ko__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"].observable('');
    _this.viewEnable_ = ko__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"].observable(false);
    _this.viewEnable = ko__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"].computed({
      read: _this.viewEnable_,
      write: function write(value) {
        value = !!value;

        if (value && _this.twoFactorTested()) {
          _this.viewEnable_(value);

          Remote_User_Ajax__WEBPACK_IMPORTED_MODULE_13__[/* default */ "a"].enableTwoFactor(function (result, data) {
            if (Common_Enums__WEBPACK_IMPORTED_MODULE_9__["StorageResultType"].Success !== result || !data || !data.Result) {
              _this.viewEnable_(false);
            }
          }, true);
        } else {
          if (!value) {
            _this.viewEnable_(value);
          }

          Remote_User_Ajax__WEBPACK_IMPORTED_MODULE_13__[/* default */ "a"].enableTwoFactor(function (result, data) {
            if (Common_Enums__WEBPACK_IMPORTED_MODULE_9__["StorageResultType"].Success !== result || !data || !data.Result) {
              _this.viewEnable_(false);
            }
          }, false);
        }
      }
    });
    _this.viewTwoFactorEnableTooltip = ko__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"].computed(function () {
      Object(Common_Translator__WEBPACK_IMPORTED_MODULE_11__["trigger"])();
      return _this.twoFactorTested() || _this.viewEnable_() ? '' : Object(Common_Translator__WEBPACK_IMPORTED_MODULE_11__["i18n"])('POPUPS_TWO_FACTOR_CFG/TWO_FACTOR_SECRET_TEST_BEFORE_DESC');
    });
    _this.viewTwoFactorStatus = ko__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"].computed(function () {
      Object(Common_Translator__WEBPACK_IMPORTED_MODULE_11__["trigger"])();
      return Object(Common_Translator__WEBPACK_IMPORTED_MODULE_11__["i18n"])(_this.twoFactorStatus() ? 'POPUPS_TWO_FACTOR_CFG/TWO_FACTOR_SECRET_CONFIGURED_DESC' : 'POPUPS_TWO_FACTOR_CFG/TWO_FACTOR_SECRET_NOT_CONFIGURED_DESC');
    });
    _this.twoFactorAllowedEnable = ko__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"].computed(function () {
      return _this.viewEnable() || _this.twoFactorTested();
    });
    _this.onResult = _babel_runtime_corejs3_core_js_stable_instance_bind__WEBPACK_IMPORTED_MODULE_2___default()(___WEBPACK_IMPORTED_MODULE_6___default.a).call(___WEBPACK_IMPORTED_MODULE_6___default.a, _this.onResult, Object(_babel_runtime_corejs3_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(_this));
    _this.onShowSecretResult = _babel_runtime_corejs3_core_js_stable_instance_bind__WEBPACK_IMPORTED_MODULE_2___default()(___WEBPACK_IMPORTED_MODULE_6___default.a).call(___WEBPACK_IMPORTED_MODULE_6___default.a, _this.onShowSecretResult, Object(_babel_runtime_corejs3_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(_this));
    return _this;
  }

  var _proto = TwoFactorConfigurationPopupView.prototype;

  _proto.showSecret = function showSecret() {
    this.secreting(true);
    Remote_User_Ajax__WEBPACK_IMPORTED_MODULE_13__[/* default */ "a"].showTwoFactorSecret(this.onShowSecretResult);
  };

  _proto.hideSecret = function hideSecret() {
    this.viewSecret('');
    this.viewBackupCodes('');
    this.viewUrlTitle('');
    this.viewUrl('');
  };

  _proto.createTwoFactor = function createTwoFactor() {
    this.processing(true);
    Remote_User_Ajax__WEBPACK_IMPORTED_MODULE_13__[/* default */ "a"].createTwoFactor(this.onResult);
  };

  _proto.logout = function logout() {
    Object(Helper_Apps_User__WEBPACK_IMPORTED_MODULE_14__[/* getApp */ "a"])().logout();
  };

  _proto.testTwoFactor = function testTwoFactor() {
    Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_15__["showScreenPopup"])(__webpack_require__(/*! View/Popup/TwoFactorTest */ 529), [this.twoFactorTested]);
  };

  _proto.clearTwoFactor = function clearTwoFactor() {
    this.viewSecret('');
    this.viewBackupCodes('');
    this.viewUrlTitle('');
    this.viewUrl('');
    this.twoFactorTested(false);
    this.clearing(true);
    Remote_User_Ajax__WEBPACK_IMPORTED_MODULE_13__[/* default */ "a"].clearTwoFactor(this.onResult);
  };

  _proto.onShow = function onShow(bLock) {
    this.lock(!!bLock);
    this.viewSecret('');
    this.viewBackupCodes('');
    this.viewUrlTitle('');
    this.viewUrl('');
  };

  _proto.onHide = function onHide() {
    if (this.lock()) {
      window__WEBPACK_IMPORTED_MODULE_5___default.a.location.reload();
    }
  };

  _proto.getQr = function getQr() {
    return 'otpauth://totp/' + window__WEBPACK_IMPORTED_MODULE_5___default.a.encodeURIComponent(this.viewUser()) + '?secret=' + window__WEBPACK_IMPORTED_MODULE_5___default.a.encodeURIComponent(this.viewSecret()) + '&issuer=' + window__WEBPACK_IMPORTED_MODULE_5___default.a.encodeURIComponent('');
  };

  _proto.onResult = function onResult(sResult, oData) {
    this.processing(false);
    this.clearing(false);

    if (Common_Enums__WEBPACK_IMPORTED_MODULE_9__["StorageResultType"].Success === sResult && oData && oData.Result) {
      this.viewUser(Object(Common_Utils__WEBPACK_IMPORTED_MODULE_10__["pString"])(oData.Result.User));
      this.viewEnable_(!!oData.Result.Enable);
      this.twoFactorStatus(!!oData.Result.IsSet);
      this.twoFactorTested(!!oData.Result.Tested);
      this.viewSecret(Object(Common_Utils__WEBPACK_IMPORTED_MODULE_10__["pString"])(oData.Result.Secret));
      this.viewBackupCodes(Object(Common_Utils__WEBPACK_IMPORTED_MODULE_10__["pString"])(oData.Result.BackupCodes).replace(/[\s]+/g, '  '));
      this.viewUrlTitle(Object(Common_Utils__WEBPACK_IMPORTED_MODULE_10__["pString"])(oData.Result.UrlTitle));
      this.viewUrl(qr__WEBPACK_IMPORTED_MODULE_8___default.a.toDataURL({
        level: 'M',
        size: 8,
        value: this.getQr()
      }));
    } else {
      this.viewUser('');
      this.viewEnable_(false);
      this.twoFactorStatus(false);
      this.twoFactorTested(false);
      this.viewSecret('');
      this.viewBackupCodes('');
      this.viewUrlTitle('');
      this.viewUrl('');
    }
  };

  _proto.onShowSecretResult = function onShowSecretResult(result, data) {
    this.secreting(false);

    if (Common_Enums__WEBPACK_IMPORTED_MODULE_9__["StorageResultType"].Success === result && data && data.Result) {
      this.viewSecret(Object(Common_Utils__WEBPACK_IMPORTED_MODULE_10__["pString"])(data.Result.Secret));
      this.viewUrlTitle(Object(Common_Utils__WEBPACK_IMPORTED_MODULE_10__["pString"])(data.Result.UrlTitle));
      this.viewUrl(qr__WEBPACK_IMPORTED_MODULE_8___default.a.toDataURL({
        level: 'M',
        size: 6,
        value: this.getQr()
      }));
    } else {
      this.viewSecret('');
      this.viewUrlTitle('');
      this.viewUrl('');
    }
  };

  _proto.onBuild = function onBuild() {
    if (this.capaTwoFactor) {
      this.processing(true);
      Remote_User_Ajax__WEBPACK_IMPORTED_MODULE_13__[/* default */ "a"].getTwoFactor(this.onResult);
    }
  };

  return TwoFactorConfigurationPopupView;
}(Knoin_AbstractViewNext__WEBPACK_IMPORTED_MODULE_16__[/* AbstractViewNext */ "a"])) || _class);


/***/ }),
/* 412 */
/*!************************************!*\
  !*** ./dev/View/Popup/Template.js ***!
  \************************************/
/*! exports provided: TemplatePopupView, default */
/*! all exports used */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TemplatePopupView", function() { return TemplatePopupView; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return TemplatePopupView; });
/* harmony import */ var core_js_modules_es_function_name__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.function.name */ 51);
/* harmony import */ var core_js_modules_es_function_name__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_function_name__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor */ 19);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _babel_runtime_corejs3_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/esm/inheritsLoose */ 10);
/* harmony import */ var _babel_runtime_corejs3_helpers_esm_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/esm/applyDecoratedDescriptor */ 20);
/* harmony import */ var ko__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ko */ 1);
/* harmony import */ var Common_Enums__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! Common/Enums */ 0);
/* harmony import */ var Common_Utils__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! Common/Utils */ 2);
/* harmony import */ var Common_Translator__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! Common/Translator */ 9);
/* harmony import */ var Common_HtmlEditor__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! Common/HtmlEditor */ 207);
/* harmony import */ var Remote_User_Ajax__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! Remote/User/Ajax */ 16);
/* harmony import */ var Helper_Apps_User__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! Helper/Apps/User */ 22);
/* harmony import */ var Knoin_Knoin__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! Knoin/Knoin */ 7);
/* harmony import */ var Knoin_AbstractViewNext__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! Knoin/AbstractViewNext */ 28);





var _dec, _dec2, _class, _class2;










var TemplatePopupView = (_dec = Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_11__["popup"])({
  name: 'View/Popup/Template',
  templateID: 'PopupsTemplate'
}), _dec2 = Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_11__["command"])(function (self) {
  return !self.submitRequest();
}), _dec(_class = (_class2 =
/*#__PURE__*/
function (_AbstractViewNext) {
  Object(_babel_runtime_corejs3_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(TemplatePopupView, _AbstractViewNext);

  function TemplatePopupView() {
    var _this;

    _this = _AbstractViewNext.call(this) || this;
    _this.editor = null;
    _this.signatureDom = ko__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"].observable(null);
    _this.id = ko__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"].observable('');
    _this.name = ko__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"].observable('');
    _this.name.error = ko__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"].observable(false);
    _this.name.focus = ko__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"].observable(false);
    _this.body = ko__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"].observable('');
    _this.body.loading = ko__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"].observable(false);
    _this.body.error = ko__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"].observable(false);

    _this.name.subscribe(function () {
      _this.name.error(false);
    });

    _this.body.subscribe(function () {
      _this.body.error(false);
    });

    _this.submitRequest = ko__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"].observable(false);
    _this.submitError = ko__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"].observable('');
    return _this;
  }

  var _proto = TemplatePopupView.prototype;

  _proto.addTemplateCommand = function addTemplateCommand() {
    var _this2 = this;

    this.populateBodyFromEditor();
    this.name.error('' === Object(Common_Utils__WEBPACK_IMPORTED_MODULE_6__["trim"])(this.name()));
    this.body.error('' === Object(Common_Utils__WEBPACK_IMPORTED_MODULE_6__["trim"])(this.body()) || ':HTML:' === Object(Common_Utils__WEBPACK_IMPORTED_MODULE_6__["trim"])(this.body()));

    if (this.name.error() || this.body.error()) {
      return false;
    }

    this.submitRequest(true);
    Remote_User_Ajax__WEBPACK_IMPORTED_MODULE_9__[/* default */ "a"].templateSetup(function (result, data) {
      _this2.submitRequest(false);

      if (Common_Enums__WEBPACK_IMPORTED_MODULE_5__["StorageResultType"].Success === result && data) {
        if (data.Result) {
          Object(Helper_Apps_User__WEBPACK_IMPORTED_MODULE_10__[/* getApp */ "a"])().templates();

          _this2.cancelCommand();
        } else if (data.ErrorCode) {
          _this2.submitError(Object(Common_Translator__WEBPACK_IMPORTED_MODULE_7__["getNotification"])(data.ErrorCode));
        }
      } else {
        _this2.submitError(Object(Common_Translator__WEBPACK_IMPORTED_MODULE_7__["getNotification"])(Common_Enums__WEBPACK_IMPORTED_MODULE_5__["Notification"].UnknownError));
      }
    }, this.id(), this.name(), this.body());
    return true;
  };

  _proto.clearPopup = function clearPopup() {
    this.id('');
    this.name('');
    this.name.error(false);
    this.body('');
    this.body.loading(false);
    this.body.error(false);
    this.submitRequest(false);
    this.submitError('');

    if (this.editor) {
      this.editor.setPlain('', false);
    }
  };

  _proto.populateBodyFromEditor = function populateBodyFromEditor() {
    if (this.editor) {
      this.body(this.editor.getDataWithHtmlMark());
    }
  };

  _proto.editorSetBody = function editorSetBody(sBody) {
    var _this3 = this;

    if (!this.editor && this.signatureDom()) {
      this.editor = new Common_HtmlEditor__WEBPACK_IMPORTED_MODULE_8__["HtmlEditor"](this.signatureDom(), function () {
        _this3.populateBodyFromEditor();
      }, function () {
        _this3.editor.setHtmlOrPlain(sBody);
      });
    } else {
      this.editor.setHtmlOrPlain(sBody);
    }
  };

  _proto.onShow = function onShow(template) {
    var _this4 = this;

    this.clearPopup();

    if (template && template.id) {
      this.id(template.id);
      this.name(template.name);
      this.body(template.body);

      if (template.populated) {
        this.editorSetBody(this.body());
      } else {
        this.body.loading(true);
        this.body.error(false);
        Remote_User_Ajax__WEBPACK_IMPORTED_MODULE_9__[/* default */ "a"].templateGetById(function (result, data) {
          _this4.body.loading(false);

          if (Common_Enums__WEBPACK_IMPORTED_MODULE_5__["StorageResultType"].Success === result && data && data.Result && 'Object/Template' === data.Result['@Object'] && Object(Common_Utils__WEBPACK_IMPORTED_MODULE_6__["isNormal"])(data.Result.Body)) {
            template.body = data.Result.Body;
            template.populated = true;

            _this4.body(template.body);

            _this4.body.error(false);
          } else {
            _this4.body('');

            _this4.body.error(true);
          }

          _this4.editorSetBody(_this4.body());
        }, this.id());
      }
    } else {
      this.editorSetBody('');
    }
  };

  _proto.onShowWithDelay = function onShowWithDelay() {
    this.name.focus(true);
  };

  return TemplatePopupView;
}(Knoin_AbstractViewNext__WEBPACK_IMPORTED_MODULE_12__[/* AbstractViewNext */ "a"]), (Object(_babel_runtime_corejs3_helpers_esm_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(_class2.prototype, "addTemplateCommand", [_dec2], _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class2.prototype, "addTemplateCommand"), _class2.prototype)), _class2)) || _class);


/***/ }),
/* 413 */,
/* 414 */,
/* 415 */,
/* 416 */,
/* 417 */
/*!*****************************************************************************!*\
  !*** ./node_modules/@babel/runtime-corejs3/core-js-stable/instance/sort.js ***!
  \*****************************************************************************/
/*! no static exports found */
/*! exports used: default */
/***/ (function(module, exports, __webpack_require__) {

module.exports = __webpack_require__(/*! core-js-pure/stable/instance/sort */ 518);

/***/ }),
/* 418 */
/*!******************************************!*\
  !*** ./node_modules/classnames/index.js ***!
  \******************************************/
/*! no static exports found */
/*! exports used: default */
/***/ (function(module, exports, __webpack_require__) {

var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
  Copyright (c) 2017 Jed Watson.
  Licensed under the MIT License (MIT), see
  http://jedwatson.github.io/classnames
*/
/* global define */

(function () {
	'use strict';

	var hasOwn = {}.hasOwnProperty;

	function classNames () {
		var classes = [];

		for (var i = 0; i < arguments.length; i++) {
			var arg = arguments[i];
			if (!arg) continue;

			var argType = typeof arg;

			if (argType === 'string' || argType === 'number') {
				classes.push(arg);
			} else if (Array.isArray(arg) && arg.length) {
				var inner = classNames.apply(null, arg);
				if (inner) {
					classes.push(inner);
				}
			} else if (argType === 'object') {
				for (var key in arg) {
					if (hasOwn.call(arg, key) && arg[key]) {
						classes.push(key);
					}
				}
			}
		}

		return classes.join(' ');
	}

	if ( true && module.exports) {
		classNames.default = classNames;
		module.exports = classNames;
	} else if (true) {
		// register as 'classnames', consistent with npm package name
		!(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function () {
			return classNames;
		}).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),
				__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
	} else {}
}());


/***/ }),
/* 419 */
/*!**********************************************!*\
  !*** ./node_modules/lozad/dist/lozad.min.js ***!
  \**********************************************/
/*! no static exports found */
/*! exports used: default */
/***/ (function(module, exports, __webpack_require__) {

/*! lozad.js - v1.14.0 - 2019-10-19
* https://github.com/ApoorvSaxena/lozad.js
* Copyright (c) 2019 Apoorv Saxena; Licensed MIT */
!function(t,e){ true?module.exports=e():undefined}(this,function(){"use strict";
/**
   * Detect IE browser
   * @const {boolean}
   * @private
   */var d="undefined"!=typeof document&&document.documentMode,c={rootMargin:"0px",threshold:0,load:function(t){if("picture"===t.nodeName.toLowerCase()){var e=document.createElement("img");d&&t.getAttribute("data-iesrc")&&(e.src=t.getAttribute("data-iesrc")),t.getAttribute("data-alt")&&(e.alt=t.getAttribute("data-alt")),t.append(e)}if("video"===t.nodeName.toLowerCase()&&!t.getAttribute("data-src")&&t.children){for(var r=t.children,a=void 0,o=0;o<=r.length-1;o++)(a=r[o].getAttribute("data-src"))&&(r[o].src=a);t.load()}if(t.getAttribute("data-src")&&(t.src=t.getAttribute("data-src")),t.getAttribute("data-srcset")&&t.setAttribute("srcset",t.getAttribute("data-srcset")),t.getAttribute("data-background-image"))t.style.backgroundImage="url('"+t.getAttribute("data-background-image").split(",").join("'),url('")+"')";else if(t.getAttribute("data-background-image-set")){var i=t.getAttribute("data-background-image-set").split(","),n=i[0].substr(0,i[0].indexOf(" "))||i[0];// Substring before ... 1x
n=-1===n.indexOf("url(")?"url("+n+")":n,1===i.length?t.style.backgroundImage=n:t.setAttribute("style",(t.getAttribute("style")||"")+"background-image: "+n+"; background-image: -webkit-image-set("+i+"); background-image: image-set("+i+")")}t.getAttribute("data-toggle-class")&&t.classList.toggle(t.getAttribute("data-toggle-class"))},loaded:function(){}};function l(t){t.setAttribute("data-loaded",!0)}var b=function(t){return"true"===t.getAttribute("data-loaded")};return function(){var r,a,o=0<arguments.length&&void 0!==arguments[0]?arguments[0]:".lozad",t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},e=Object.assign({},c,t),i=e.root,n=e.rootMargin,d=e.threshold,u=e.load,s=e.loaded,g=void 0;return"undefined"!=typeof window&&window.IntersectionObserver&&(g=new IntersectionObserver((r=u,a=s,function(t,e){t.forEach(function(t){(0<t.intersectionRatio||t.isIntersecting)&&(e.unobserve(t.target),b(t.target)||(r(t.target),l(t.target),a(t.target)))})}),{root:i,rootMargin:n,threshold:d})),{observe:function(){for(var t=function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:document;return t instanceof Element?[t]:t instanceof NodeList?t:e.querySelectorAll(t)}(o,i),e=0;e<t.length;e++)b(t[e])||(g?g.observe(t[e]):(u(t[e]),l(t[e]),s(t[e])))},triggerLoad:function(t){b(t)||(u(t),l(t),s(t))},observer:g}}});


/***/ }),
/* 420 */
/*!**************************************************!*\
  !*** ./dev/Common/ClientStorageDriver/Cookie.js ***!
  \**************************************************/
/*! exports provided: CookieDriver, default */
/*! exports used: CookieDriver */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return CookieDriver; });
/* unused harmony export default */
/* harmony import */ var window__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! window */ 4);
/* harmony import */ var window__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(window__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var js_cookie__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! js-cookie */ 279);
/* harmony import */ var js_cookie__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(js_cookie__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var Common_Utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! Common/Utils */ 2);
/* harmony import */ var Common_Consts__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! Common/Consts */ 25);





var CookieDriver =
/*#__PURE__*/
function () {
  function CookieDriver() {}

  var _proto = CookieDriver.prototype;

  /**
   * @param {string} key
   * @param {*} data
   * @returns {boolean}
   */
  _proto.set = function set(key, data) {
    var result = false,
        storageResult = null;

    try {
      storageResult = js_cookie__WEBPACK_IMPORTED_MODULE_1___default.a.getJSON(Common_Consts__WEBPACK_IMPORTED_MODULE_3__[/* CLIENT_SIDE_STORAGE_INDEX_NAME */ "b"]);
    } catch (e) {} // eslint-disable-line no-empty


    (storageResult || (storageResult = {}))[key] = data;

    try {
      js_cookie__WEBPACK_IMPORTED_MODULE_1___default.a.set(Common_Consts__WEBPACK_IMPORTED_MODULE_3__[/* CLIENT_SIDE_STORAGE_INDEX_NAME */ "b"], storageResult, {
        expires: 30
      });
      result = true;
    } catch (e) {} // eslint-disable-line no-empty


    return result;
  }
  /**
   * @param {string} key
   * @returns {*}
   */
  ;

  _proto.get = function get(key) {
    var result = null;

    try {
      var storageResult = js_cookie__WEBPACK_IMPORTED_MODULE_1___default.a.getJSON(Common_Consts__WEBPACK_IMPORTED_MODULE_3__[/* CLIENT_SIDE_STORAGE_INDEX_NAME */ "b"]);
      result = storageResult && !Object(Common_Utils__WEBPACK_IMPORTED_MODULE_2__["isUnd"])(storageResult[key]) ? storageResult[key] : null;
    } catch (e) {} // eslint-disable-line no-empty


    return result;
  }
  /**
   * @returns {boolean}
   */
  ;

  CookieDriver.supported = function supported() {
    return !!(window__WEBPACK_IMPORTED_MODULE_0___default.a.navigator && window__WEBPACK_IMPORTED_MODULE_0___default.a.navigator.cookieEnabled);
  };

  return CookieDriver;
}();



/***/ }),
/* 421 */
/*!********************************************************!*\
  !*** ./dev/Common/ClientStorageDriver/LocalStorage.js ***!
  \********************************************************/
/*! exports provided: LocalStorageDriver, default */
/*! exports used: LocalStorageDriver */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return LocalStorageDriver; });
/* unused harmony export default */
/* harmony import */ var _babel_runtime_corejs3_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/esm/defineProperty */ 17);
/* harmony import */ var window__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! window */ 4);
/* harmony import */ var window__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(window__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var Common_Utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! Common/Utils */ 2);
/* harmony import */ var Storage_RainLoop__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! Storage/RainLoop */ 146);
/* harmony import */ var Common_Consts__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! Common/Consts */ 25);






var LocalStorageDriver =
/*#__PURE__*/
function () {
  function LocalStorageDriver() {
    Object(_babel_runtime_corejs3_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(this, "s", null);

    this.s = window__WEBPACK_IMPORTED_MODULE_1___default.a.localStorage || null;
  }
  /**
   * @param {string} key
   * @param {*} data
   * @returns {boolean}
   */


  var _proto = LocalStorageDriver.prototype;

  _proto.set = function set(key, data) {
    if (!this.s) {
      return false;
    }

    var storageResult = null;

    try {
      var storageValue = this.s.getItem(Common_Consts__WEBPACK_IMPORTED_MODULE_4__[/* CLIENT_SIDE_STORAGE_INDEX_NAME */ "b"]) || null;
      storageResult = null === storageValue ? null : window__WEBPACK_IMPORTED_MODULE_1___default.a.JSON.parse(storageValue);
    } catch (e) {} // eslint-disable-line no-empty


    (storageResult || (storageResult = {}))[key] = data;

    try {
      this.s.setItem(Common_Consts__WEBPACK_IMPORTED_MODULE_4__[/* CLIENT_SIDE_STORAGE_INDEX_NAME */ "b"], window__WEBPACK_IMPORTED_MODULE_1___default.a.JSON.stringify(storageResult));
      return true;
    } catch (e) {} // eslint-disable-line no-empty


    return false;
  }
  /**
   * @param {string} key
   * @returns {*}
   */
  ;

  _proto.get = function get(key) {
    if (!this.s) {
      return null;
    }

    try {
      var storageValue = this.s.getItem(Common_Consts__WEBPACK_IMPORTED_MODULE_4__[/* CLIENT_SIDE_STORAGE_INDEX_NAME */ "b"]) || null,
          storageResult = null === storageValue ? null : window__WEBPACK_IMPORTED_MODULE_1___default.a.JSON.parse(storageValue);
      return storageResult && !Object(Common_Utils__WEBPACK_IMPORTED_MODULE_2__["isUnd"])(storageResult[key]) ? storageResult[key] : null;
    } catch (e) {} // eslint-disable-line no-empty


    return null;
  }
  /**
   * @returns {boolean}
   */
  ;

  LocalStorageDriver.supported = function supported() {
    return Object(Storage_RainLoop__WEBPACK_IMPORTED_MODULE_3__[/* isStorageSupported */ "d"])('localStorage');
  };

  return LocalStorageDriver;
}();



/***/ }),
/* 422 */
/*!*****************************!*\
  !*** ./dev/Model/Folder.js ***!
  \*****************************/
/*! exports provided: FolderModel, default */
/*! exports used: FolderModel */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return FolderModel; });
/* unused harmony export default */
/* harmony import */ var core_js_modules_es_array_join__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.array.join */ 74);
/* harmony import */ var core_js_modules_es_array_join__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_join__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var core_js_modules_es_function_name__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es.function.name */ 51);
/* harmony import */ var core_js_modules_es_function_name__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_function_name__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var core_js_modules_es_regexp_exec__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core-js/modules/es.regexp.exec */ 45);
/* harmony import */ var core_js_modules_es_regexp_exec__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_regexp_exec__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var core_js_modules_es_string_split__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! core-js/modules/es.string.split */ 171);
/* harmony import */ var core_js_modules_es_string_split__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_split__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/find */ 12);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var _babel_runtime_corejs3_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/esm/inheritsLoose */ 10);
/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! _ */ 3);
/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(___WEBPACK_IMPORTED_MODULE_6__);
/* harmony import */ var ko__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ko */ 1);
/* harmony import */ var Common_Enums__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! Common/Enums */ 0);
/* harmony import */ var Common_Utils__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! Common/Utils */ 2);
/* harmony import */ var Common_Translator__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! Common/Translator */ 9);
/* harmony import */ var Common_Cache__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! Common/Cache */ 14);
/* harmony import */ var Common_Events__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! Common/Events */ 24);
/* harmony import */ var Knoin_AbstractModel__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! Knoin/AbstractModel */ 64);















var FolderModel =
/*#__PURE__*/
function (_AbstractModel) {
  Object(_babel_runtime_corejs3_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"])(FolderModel, _AbstractModel);

  function FolderModel() {
    var _this;

    _this = _AbstractModel.call(this, 'FolderModel') || this;
    _this.name = ko__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"].observable('');
    _this.fullName = '';
    _this.fullNameRaw = '';
    _this.fullNameHash = '';
    _this.delimiter = '';
    _this.namespace = '';
    _this.deep = 0;
    _this.interval = 0;
    _this.selectable = false;
    _this.existen = true;
    _this.type = ko__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"].observable(Common_Enums__WEBPACK_IMPORTED_MODULE_8__["FolderType"].User);
    _this.focused = ko__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"].observable(false);
    _this.selected = ko__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"].observable(false);
    _this.edited = ko__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"].observable(false);
    _this.subScribed = ko__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"].observable(true);
    _this.checkable = ko__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"].observable(false);
    _this.subFolders = ko__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"].observableArray([]);
    _this.deleteAccess = ko__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"].observable(false);
    _this.actionBlink = ko__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"].observable(false).extend({
      falseTimeout: 1000
    });
    _this.nameForEdit = ko__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"].observable('');
    _this.privateMessageCountAll = ko__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"].observable(0);
    _this.privateMessageCountUnread = ko__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"].observable(0);
    _this.collapsedPrivate = ko__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"].observable(true);
    return _this;
  }
  /**
   * @static
   * @param {AjaxJsonFolder} json
   * @returns {?FolderModel}
   */


  FolderModel.newInstanceFromJson = function newInstanceFromJson(json) {
    var folder = new FolderModel();
    return folder.initByJson(json) ? folder.initComputed() : null;
  }
  /**
   * @returns {FolderModel}
   */
  ;

  var _proto = FolderModel.prototype;

  _proto.initComputed = function initComputed() {
    var _this2 = this;

    var inboxFolderName = Object(Common_Cache__WEBPACK_IMPORTED_MODULE_11__[/* getFolderInboxName */ "h"])();
    this.isInbox = ko__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"].computed(function () {
      return Common_Enums__WEBPACK_IMPORTED_MODULE_8__["FolderType"].Inbox === _this2.type();
    });
    this.hasSubScribedSubfolders = ko__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"].computed(function () {
      return !!_babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_4___default()(___WEBPACK_IMPORTED_MODULE_6___default.a).call(___WEBPACK_IMPORTED_MODULE_6___default.a, _this2.subFolders(), function (oFolder) {
        return (oFolder.subScribed() || oFolder.hasSubScribedSubfolders()) && !oFolder.isSystemFolder();
      });
    });
    this.canBeEdited = ko__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"].computed(function () {
      return Common_Enums__WEBPACK_IMPORTED_MODULE_8__["FolderType"].User === _this2.type() && _this2.existen && _this2.selectable;
    });
    this.visible = ko__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"].computed(function () {
      var isSubScribed = _this2.subScribed(),
          isSubFolders = _this2.hasSubScribedSubfolders();

      return isSubScribed || isSubFolders && (!_this2.existen || !_this2.selectable);
    });
    this.isSystemFolder = ko__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"].computed(function () {
      return Common_Enums__WEBPACK_IMPORTED_MODULE_8__["FolderType"].User !== _this2.type();
    });
    this.hidden = ko__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"].computed(function () {
      var isSystem = _this2.isSystemFolder(),
          isSubFolders = _this2.hasSubScribedSubfolders();

      return isSystem && !isSubFolders || !_this2.selectable && !isSubFolders;
    });
    this.selectableForFolderList = ko__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"].computed(function () {
      return !_this2.isSystemFolder() && _this2.selectable;
    });
    this.messageCountAll = ko__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"].computed({
      read: this.privateMessageCountAll,
      write: function write(iValue) {
        if (Object(Common_Utils__WEBPACK_IMPORTED_MODULE_9__["isPosNumeric"])(iValue, true)) {
          _this2.privateMessageCountAll(iValue);
        } else {
          _this2.privateMessageCountAll.valueHasMutated();
        }
      }
    }).extend({
      notify: 'always'
    });
    this.messageCountUnread = ko__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"].computed({
      read: this.privateMessageCountUnread,
      write: function write(value) {
        if (Object(Common_Utils__WEBPACK_IMPORTED_MODULE_9__["isPosNumeric"])(value, true)) {
          _this2.privateMessageCountUnread(value);
        } else {
          _this2.privateMessageCountUnread.valueHasMutated();
        }
      }
    }).extend({
      notify: 'always'
    });
    this.printableUnreadCount = ko__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"].computed(function () {
      var count = _this2.messageCountAll(),
          unread = _this2.messageCountUnread(),
          type = _this2.type();

      if (0 < count) {
        if (Common_Enums__WEBPACK_IMPORTED_MODULE_8__["FolderType"].Draft === type) {
          return '' + count;
        } else if (0 < unread && Common_Enums__WEBPACK_IMPORTED_MODULE_8__["FolderType"].Trash !== type && Common_Enums__WEBPACK_IMPORTED_MODULE_8__["FolderType"].Archive !== type && Common_Enums__WEBPACK_IMPORTED_MODULE_8__["FolderType"].SentItems !== type) {
          return '' + unread;
        }
      }

      return '';
    });
    this.canBeDeleted = ko__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"].computed(function () {
      var bSystem = _this2.isSystemFolder();

      return !bSystem && 0 === _this2.subFolders().length && inboxFolderName !== _this2.fullNameRaw;
    });
    this.canBeSubScribed = ko__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"].computed(function () {
      return !_this2.isSystemFolder() && _this2.selectable && inboxFolderName !== _this2.fullNameRaw;
    });
    this.canBeChecked = this.canBeSubScribed;
    this.localName = ko__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"].computed(function () {
      Object(Common_Translator__WEBPACK_IMPORTED_MODULE_10__["trigger"])();

      var name = _this2.name();

      var type = _this2.type();

      if (_this2.isSystemFolder()) {
        switch (type) {
          case Common_Enums__WEBPACK_IMPORTED_MODULE_8__["FolderType"].Inbox:
            name = Object(Common_Translator__WEBPACK_IMPORTED_MODULE_10__["i18n"])('FOLDER_LIST/INBOX_NAME');
            break;

          case Common_Enums__WEBPACK_IMPORTED_MODULE_8__["FolderType"].SentItems:
            name = Object(Common_Translator__WEBPACK_IMPORTED_MODULE_10__["i18n"])('FOLDER_LIST/SENT_NAME');
            break;

          case Common_Enums__WEBPACK_IMPORTED_MODULE_8__["FolderType"].Draft:
            name = Object(Common_Translator__WEBPACK_IMPORTED_MODULE_10__["i18n"])('FOLDER_LIST/DRAFTS_NAME');
            break;

          case Common_Enums__WEBPACK_IMPORTED_MODULE_8__["FolderType"].Spam:
            name = Object(Common_Translator__WEBPACK_IMPORTED_MODULE_10__["i18n"])('FOLDER_LIST/SPAM_NAME');
            break;

          case Common_Enums__WEBPACK_IMPORTED_MODULE_8__["FolderType"].Trash:
            name = Object(Common_Translator__WEBPACK_IMPORTED_MODULE_10__["i18n"])('FOLDER_LIST/TRASH_NAME');
            break;

          case Common_Enums__WEBPACK_IMPORTED_MODULE_8__["FolderType"].Archive:
            name = Object(Common_Translator__WEBPACK_IMPORTED_MODULE_10__["i18n"])('FOLDER_LIST/ARCHIVE_NAME');
            break;
          // no default
        }
      }

      return name;
    });
    this.manageFolderSystemName = ko__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"].computed(function () {
      Object(Common_Translator__WEBPACK_IMPORTED_MODULE_10__["trigger"])();
      var suffix = '';

      var type = _this2.type(),
          name = _this2.name();

      if (_this2.isSystemFolder()) {
        switch (type) {
          case Common_Enums__WEBPACK_IMPORTED_MODULE_8__["FolderType"].Inbox:
            suffix = '(' + Object(Common_Translator__WEBPACK_IMPORTED_MODULE_10__["i18n"])('FOLDER_LIST/INBOX_NAME') + ')';
            break;

          case Common_Enums__WEBPACK_IMPORTED_MODULE_8__["FolderType"].SentItems:
            suffix = '(' + Object(Common_Translator__WEBPACK_IMPORTED_MODULE_10__["i18n"])('FOLDER_LIST/SENT_NAME') + ')';
            break;

          case Common_Enums__WEBPACK_IMPORTED_MODULE_8__["FolderType"].Draft:
            suffix = '(' + Object(Common_Translator__WEBPACK_IMPORTED_MODULE_10__["i18n"])('FOLDER_LIST/DRAFTS_NAME') + ')';
            break;

          case Common_Enums__WEBPACK_IMPORTED_MODULE_8__["FolderType"].Spam:
            suffix = '(' + Object(Common_Translator__WEBPACK_IMPORTED_MODULE_10__["i18n"])('FOLDER_LIST/SPAM_NAME') + ')';
            break;

          case Common_Enums__WEBPACK_IMPORTED_MODULE_8__["FolderType"].Trash:
            suffix = '(' + Object(Common_Translator__WEBPACK_IMPORTED_MODULE_10__["i18n"])('FOLDER_LIST/TRASH_NAME') + ')';
            break;

          case Common_Enums__WEBPACK_IMPORTED_MODULE_8__["FolderType"].Archive:
            suffix = '(' + Object(Common_Translator__WEBPACK_IMPORTED_MODULE_10__["i18n"])('FOLDER_LIST/ARCHIVE_NAME') + ')';
            break;
          // no default
        }
      }

      if ('' !== suffix && '(' + name + ')' === suffix || '(inbox)' === suffix.toLowerCase()) {
        suffix = '';
      }

      return suffix;
    });
    this.collapsed = ko__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"].computed({
      read: function read() {
        return !_this2.hidden() && _this2.collapsedPrivate();
      },
      write: function write(value) {
        _this2.collapsedPrivate(value);
      }
    });
    this.hasUnreadMessages = ko__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"].computed(function () {
      return 0 < _this2.messageCountUnread() && '' !== _this2.printableUnreadCount();
    });
    this.hasSubScribedUnreadMessagesSubfolders = ko__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"].computed(function () {
      return !!_babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_4___default()(___WEBPACK_IMPORTED_MODULE_6___default.a).call(___WEBPACK_IMPORTED_MODULE_6___default.a, _this2.subFolders(), function (folder) {
        return folder.hasUnreadMessages() || folder.hasSubScribedUnreadMessagesSubfolders();
      });
    }); // subscribe

    this.name.subscribe(function (value) {
      _this2.nameForEdit(value);
    });
    this.edited.subscribe(function (value) {
      if (value) {
        _this2.nameForEdit(_this2.name());
      }
    });
    this.messageCountUnread.subscribe(function (unread) {
      if (Common_Enums__WEBPACK_IMPORTED_MODULE_8__["FolderType"].Inbox === _this2.type()) {
        Common_Events__WEBPACK_IMPORTED_MODULE_12__[/* pub */ "a"]('mailbox.inbox-unread-count', [unread]);
      }
    });
    return this;
  }
  /**
   * @returns {string}
   */
  ;

  _proto.collapsedCss = function collapsedCss() {
    return this.hasSubScribedSubfolders() ? this.collapsed() ? 'icon-right-mini e-collapsed-sign' : 'icon-down-mini e-collapsed-sign' : 'icon-none e-collapsed-sign';
  }
  /**
   * @param {AjaxJsonFolder} json
   * @returns {boolean}
   */
  ;

  _proto.initByJson = function initByJson(json) {
    var bResult = false;
    var sInboxFolderName = Object(Common_Cache__WEBPACK_IMPORTED_MODULE_11__[/* getFolderInboxName */ "h"])();

    if (json && 'Object/Folder' === json['@Object']) {
      this.name(json.Name);
      this.delimiter = json.Delimiter;
      this.fullName = json.FullName;
      this.fullNameRaw = json.FullNameRaw;
      this.fullNameHash = json.FullNameHash;
      this.deep = json.FullNameRaw.split(this.delimiter).length - 1;
      this.selectable = !!json.IsSelectable;
      this.existen = !!json.IsExists;
      this.subScribed(!!json.IsSubscribed);
      this.checkable(!!json.Checkable);
      this.type(sInboxFolderName === this.fullNameRaw ? Common_Enums__WEBPACK_IMPORTED_MODULE_8__["FolderType"].Inbox : Common_Enums__WEBPACK_IMPORTED_MODULE_8__["FolderType"].User);
      bResult = true;
    }

    return bResult;
  }
  /**
   * @returns {string}
   */
  ;

  _proto.printableFullName = function printableFullName() {
    return this.fullName.split(this.delimiter).join(' / ');
  };

  return FolderModel;
}(Knoin_AbstractModel__WEBPACK_IMPORTED_MODULE_13__[/* AbstractModel */ "a"]);



/***/ }),
/* 423 */
/*!**************************************!*\
  !*** ./dev/Promises/AbstractAjax.js ***!
  \**************************************/
/*! exports provided: AbstractAjaxPromises, default */
/*! exports used: AbstractAjaxPromises */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return AbstractAjaxPromises; });
/* unused harmony export default */
/* harmony import */ var core_js_modules_es_object_to_string__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.object.to-string */ 63);
/* harmony import */ var core_js_modules_es_object_to_string__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_to_string__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var core_js_modules_es_promise__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es.promise */ 120);
/* harmony import */ var core_js_modules_es_promise__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_promise__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _babel_runtime_corejs3_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/esm/assertThisInitialized */ 33);
/* harmony import */ var _babel_runtime_corejs3_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/esm/inheritsLoose */ 10);
/* harmony import */ var _babel_runtime_corejs3_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/esm/defineProperty */ 17);
/* harmony import */ var window__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! window */ 4);
/* harmony import */ var window__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(window__WEBPACK_IMPORTED_MODULE_5__);
/* harmony import */ var $__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! $ */ 8);
/* harmony import */ var $__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n($__WEBPACK_IMPORTED_MODULE_6__);
/* harmony import */ var Common_Links__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! Common/Links */ 15);
/* harmony import */ var Common_Utils__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! Common/Utils */ 2);
/* harmony import */ var Common_Consts__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! Common/Consts */ 25);
/* harmony import */ var Common_Enums__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! Common/Enums */ 0);
/* harmony import */ var Common_Globals__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! Common/Globals */ 6);
/* harmony import */ var Common_Plugins__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! Common/Plugins */ 39);
/* harmony import */ var Storage_Settings__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! Storage/Settings */ 5);
/* harmony import */ var Promises_AbstractBasic__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! Promises/AbstractBasic */ 275);
















var AbstractAjaxPromises =
/*#__PURE__*/
function (_AbstractBasicPromise) {
  Object(_babel_runtime_corejs3_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(AbstractAjaxPromises, _AbstractBasicPromise);

  function AbstractAjaxPromises() {
    var _this;

    _this = _AbstractBasicPromise.call(this) || this;

    Object(_babel_runtime_corejs3_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])(Object(_babel_runtime_corejs3_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(_this), "oRequests", {});

    _this.clear();

    return _this;
  }

  var _proto = AbstractAjaxPromises.prototype;

  _proto.clear = function clear() {
    this.oRequests = {};
  };

  _proto.abort = function abort(sAction, bClearOnly) {
    if (this.oRequests[sAction]) {
      if (!bClearOnly && this.oRequests[sAction].abort) {
        this.oRequests[sAction].__aborted__ = true;
        this.oRequests[sAction].abort();
      }

      this.oRequests[sAction] = null;
      delete this.oRequests[sAction];
    }

    return this;
  };

  _proto.ajaxRequest = function ajaxRequest(action, isPost, timeOut, params, additionalGetString, fTrigger) {
    var _this2 = this;

    return new window__WEBPACK_IMPORTED_MODULE_5___default.a.Promise(function (resolve, reject) {
      var start = Object(Common_Utils__WEBPACK_IMPORTED_MODULE_8__["microtime"])();
      timeOut = Object(Common_Utils__WEBPACK_IMPORTED_MODULE_8__["isNormal"])(timeOut) ? timeOut : Common_Consts__WEBPACK_IMPORTED_MODULE_9__[/* DEFAULT_AJAX_TIMEOUT */ "g"];
      additionalGetString = Object(Common_Utils__WEBPACK_IMPORTED_MODULE_8__["isUnd"])(additionalGetString) ? '' : Object(Common_Utils__WEBPACK_IMPORTED_MODULE_8__["pString"])(additionalGetString);

      if (isPost) {
        params.XToken = Storage_Settings__WEBPACK_IMPORTED_MODULE_13__["appSettingsGet"]('token');
      }

      Common_Plugins__WEBPACK_IMPORTED_MODULE_12__[/* runHook */ "f"]('ajax-default-request', [action, params, additionalGetString]);

      _this2.setTrigger(fTrigger, true);

      var oH = $__WEBPACK_IMPORTED_MODULE_6___default.a.ajax({
        type: isPost ? 'POST' : 'GET',
        url: Object(Common_Links__WEBPACK_IMPORTED_MODULE_7__[/* ajax */ "a"])(additionalGetString),
        async: true,
        dataType: 'json',
        data: isPost ? params || {} : {},
        timeout: timeOut,
        global: true
      }).always(function (data, textStatus) {
        var isCached = false,
            errorData = null;

        if (data && data.Time) {
          isCached = Object(Common_Utils__WEBPACK_IMPORTED_MODULE_8__["pInt"])(data.Time) > Object(Common_Utils__WEBPACK_IMPORTED_MODULE_8__["microtime"])() - start;
        }

        if (data && data.UpdateToken) {
          if (Common_Globals__WEBPACK_IMPORTED_MODULE_11__["data"].__APP__ && Common_Globals__WEBPACK_IMPORTED_MODULE_11__["data"].__APP__.setClientSideToken) {
            Common_Globals__WEBPACK_IMPORTED_MODULE_11__["data"].__APP__.setClientSideToken(data.UpdateToken);
          }
        } // backward capability


        var type = '';

        switch (true) {
          case 'success' === textStatus && data && data.Result && action === data.Action:
            type = Common_Enums__WEBPACK_IMPORTED_MODULE_10__["StorageResultType"].Success;
            break;

          case 'abort' === textStatus && (!data || !data.__aborted__):
            type = Common_Enums__WEBPACK_IMPORTED_MODULE_10__["StorageResultType"].Abort;
            break;

          default:
            type = Common_Enums__WEBPACK_IMPORTED_MODULE_10__["StorageResultType"].Error;
            break;
        }

        Common_Plugins__WEBPACK_IMPORTED_MODULE_12__[/* runHook */ "f"]('ajax-default-response', [action, Common_Enums__WEBPACK_IMPORTED_MODULE_10__["StorageResultType"].Success === type ? data : null, type, isCached, params]);

        if ('success' === textStatus) {
          if (data && data.Result && action === data.Action) {
            data.__cached__ = isCached;
            resolve(data);
          } else if (data && data.Action) {
            errorData = data;
            reject(data.ErrorCode ? data.ErrorCode : Common_Enums__WEBPACK_IMPORTED_MODULE_10__["Notification"].AjaxFalse);
          } else {
            errorData = data;
            reject(Common_Enums__WEBPACK_IMPORTED_MODULE_10__["Notification"].AjaxParse);
          }
        } else if ('timeout' === textStatus) {
          errorData = data;
          reject(Common_Enums__WEBPACK_IMPORTED_MODULE_10__["Notification"].AjaxTimeout);
        } else if ('abort' === textStatus) {
          if (!data || !data.__aborted__) {
            reject(Common_Enums__WEBPACK_IMPORTED_MODULE_10__["Notification"].AjaxAbort);
          }
        } else {
          errorData = data;
          reject(Common_Enums__WEBPACK_IMPORTED_MODULE_10__["Notification"].AjaxParse);
        }

        if (_this2.oRequests[action]) {
          _this2.oRequests[action] = null;
          delete _this2.oRequests[action];
        }

        _this2.setTrigger(fTrigger, false);

        if (errorData) {
          if (-1 < Object(Common_Utils__WEBPACK_IMPORTED_MODULE_8__["inArray"])(errorData.ErrorCode, [Common_Enums__WEBPACK_IMPORTED_MODULE_10__["Notification"].AuthError, Common_Enums__WEBPACK_IMPORTED_MODULE_10__["Notification"].AccessError, Common_Enums__WEBPACK_IMPORTED_MODULE_10__["Notification"].ConnectionError, Common_Enums__WEBPACK_IMPORTED_MODULE_10__["Notification"].DomainNotAllowed, Common_Enums__WEBPACK_IMPORTED_MODULE_10__["Notification"].AccountNotAllowed, Common_Enums__WEBPACK_IMPORTED_MODULE_10__["Notification"].MailServerError, Common_Enums__WEBPACK_IMPORTED_MODULE_10__["Notification"].UnknownNotification, Common_Enums__WEBPACK_IMPORTED_MODULE_10__["Notification"].UnknownError])) {
            Common_Globals__WEBPACK_IMPORTED_MODULE_11__["data"].iAjaxErrorCount += 1;
          }

          if (Common_Enums__WEBPACK_IMPORTED_MODULE_10__["Notification"].InvalidToken === errorData.ErrorCode) {
            Common_Globals__WEBPACK_IMPORTED_MODULE_11__["data"].iTokenErrorCount += 1;
          }

          if (Common_Consts__WEBPACK_IMPORTED_MODULE_9__[/* TOKEN_ERROR_LIMIT */ "q"] < Common_Globals__WEBPACK_IMPORTED_MODULE_11__["data"].iTokenErrorCount) {
            if (Common_Globals__WEBPACK_IMPORTED_MODULE_11__["data"].__APP__ && Common_Globals__WEBPACK_IMPORTED_MODULE_11__["data"].__APP__.loginAndLogoutReload) {
              Common_Globals__WEBPACK_IMPORTED_MODULE_11__["data"].__APP__.loginAndLogoutReload(false, true);
            }
          }

          if (errorData.ClearAuth || errorData.Logout || Common_Consts__WEBPACK_IMPORTED_MODULE_9__[/* AJAX_ERROR_LIMIT */ "a"] < Common_Globals__WEBPACK_IMPORTED_MODULE_11__["data"].iAjaxErrorCount) {
            if (Common_Globals__WEBPACK_IMPORTED_MODULE_11__["data"].__APP__ && Common_Globals__WEBPACK_IMPORTED_MODULE_11__["data"].__APP__.clearClientSideToken) {
              Common_Globals__WEBPACK_IMPORTED_MODULE_11__["data"].__APP__.clearClientSideToken();
            }

            if (Common_Globals__WEBPACK_IMPORTED_MODULE_11__["data"].__APP__ && !errorData.ClearAuth && Common_Globals__WEBPACK_IMPORTED_MODULE_11__["data"].__APP__.loginAndLogoutReload) {
              Common_Globals__WEBPACK_IMPORTED_MODULE_11__["data"].__APP__.loginAndLogoutReload(false, true);
            }
          }
        }
      });

      if (oH) {
        if (_this2.oRequests[action]) {
          _this2.oRequests[action] = null;
          delete _this2.oRequests[action];
        }

        _this2.oRequests[action] = oH;
      }
    });
  };

  _proto.getRequest = function getRequest(sAction, fTrigger, sAdditionalGetString, iTimeOut) {
    sAdditionalGetString = Object(Common_Utils__WEBPACK_IMPORTED_MODULE_8__["isUnd"])(sAdditionalGetString) ? '' : Object(Common_Utils__WEBPACK_IMPORTED_MODULE_8__["pString"])(sAdditionalGetString);
    sAdditionalGetString = sAction + '/' + sAdditionalGetString;
    return this.ajaxRequest(sAction, false, iTimeOut, null, sAdditionalGetString, fTrigger);
  };

  _proto.postRequest = function postRequest(action, fTrigger, params, timeOut) {
    params = params || {};
    params.Action = action;
    return this.ajaxRequest(action, true, timeOut, params, '', fTrigger);
  };

  return AbstractAjaxPromises;
}(Promises_AbstractBasic__WEBPACK_IMPORTED_MODULE_14__[/* AbstractBasicPromises */ "a"]);



/***/ }),
/* 424 */
/*!******************************!*\
  !*** ./dev/Model/Account.js ***!
  \******************************/
/*! exports provided: AccountModel, default */
/*! exports used: AccountModel */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return AccountModel; });
/* unused harmony export default */
/* harmony import */ var _babel_runtime_corejs3_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/esm/inheritsLoose */ 10);
/* harmony import */ var ko__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ko */ 1);
/* harmony import */ var Common_Links__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! Common/Links */ 15);
/* harmony import */ var Knoin_AbstractModel__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! Knoin/AbstractModel */ 64);





var AccountModel =
/*#__PURE__*/
function (_AbstractModel) {
  Object(_babel_runtime_corejs3_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(AccountModel, _AbstractModel);

  /**
   * @param {string} email
   * @param {boolean=} canBeDelete = true
   * @param {number=} count = 0
   */
  function AccountModel(email, canBeDelete, count) {
    var _this;

    if (canBeDelete === void 0) {
      canBeDelete = true;
    }

    if (count === void 0) {
      count = 0;
    }

    _this = _AbstractModel.call(this, 'AccountModel') || this;
    _this.email = email;
    _this.count = ko__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"].observable(count);
    _this.deleteAccess = ko__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"].observable(false);
    _this.canBeDeleted = ko__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"].observable(!!canBeDelete);
    _this.canBeEdit = _this.canBeDeleted;
    return _this;
  }
  /**
   * @returns {string}
   */


  var _proto = AccountModel.prototype;

  _proto.changeAccountLink = function changeAccountLink() {
    return Object(Common_Links__WEBPACK_IMPORTED_MODULE_2__[/* change */ "i"])(this.email);
  };

  return AccountModel;
}(Knoin_AbstractModel__WEBPACK_IMPORTED_MODULE_3__[/* AbstractModel */ "a"]);



/***/ }),
/* 425 */
/*!*******************************!*\
  !*** ./dev/Model/Identity.js ***!
  \*******************************/
/*! exports provided: IdentityModel, default */
/*! exports used: IdentityModel */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return IdentityModel; });
/* unused harmony export default */
/* harmony import */ var core_js_modules_es_function_name__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.function.name */ 51);
/* harmony import */ var core_js_modules_es_function_name__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_function_name__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _babel_runtime_corejs3_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/esm/inheritsLoose */ 10);
/* harmony import */ var ko__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ko */ 1);
/* harmony import */ var Knoin_AbstractModel__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! Knoin/AbstractModel */ 64);





var IdentityModel =
/*#__PURE__*/
function (_AbstractModel) {
  Object(_babel_runtime_corejs3_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(IdentityModel, _AbstractModel);

  /**
   * @param {string} id
   * @param {string} email
   */
  function IdentityModel(id, email) {
    var _this;

    _this = _AbstractModel.call(this, 'IdentityModel') || this;
    _this.id = ko__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"].observable(id || '');
    _this.email = ko__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"].observable(email);
    _this.name = ko__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"].observable('');
    _this.replyTo = ko__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"].observable('');
    _this.bcc = ko__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"].observable('');
    _this.signature = ko__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"].observable('');
    _this.signatureInsertBefore = ko__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"].observable(false);
    _this.deleteAccess = ko__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"].observable(false);
    _this.canBeDeleted = ko__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"].computed(function () {
      return '' !== _this.id();
    });
    return _this;
  }
  /**
   * @returns {string}
   */


  var _proto = IdentityModel.prototype;

  _proto.formattedName = function formattedName() {
    var name = this.name(),
        email = this.email();
    return '' !== name ? name + ' (' + email + ')' : email;
  };

  return IdentityModel;
}(Knoin_AbstractModel__WEBPACK_IMPORTED_MODULE_3__[/* AbstractModel */ "a"]);



/***/ }),
/* 426 */
/*!*******************************!*\
  !*** ./dev/Model/Template.js ***!
  \*******************************/
/*! exports provided: TemplateModel, default */
/*! exports used: TemplateModel */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return TemplateModel; });
/* unused harmony export default */
/* harmony import */ var core_js_modules_es_function_name__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.function.name */ 51);
/* harmony import */ var core_js_modules_es_function_name__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_function_name__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _babel_runtime_corejs3_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/esm/inheritsLoose */ 10);
/* harmony import */ var ko__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ko */ 1);
/* harmony import */ var Common_Utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! Common/Utils */ 2);
/* harmony import */ var Knoin_AbstractModel__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! Knoin/AbstractModel */ 64);






var TemplateModel =
/*#__PURE__*/
function (_AbstractModel) {
  Object(_babel_runtime_corejs3_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(TemplateModel, _AbstractModel);

  /**
   * @param {string} id
   * @param {string} name
   * @param {string} body
   */
  function TemplateModel(id, name, body) {
    var _this;

    _this = _AbstractModel.call(this, 'TemplateModel') || this;
    _this.id = id;
    _this.name = name;
    _this.body = body;
    _this.populated = true;
    _this.deleteAccess = ko__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"].observable(false);
    return _this;
  }
  /**
   * @returns {boolean}
   */


  var _proto = TemplateModel.prototype;

  _proto.parse = function parse(json) {
    var result = false;

    if (json && 'Object/Template' === json['@Object']) {
      this.id = Object(Common_Utils__WEBPACK_IMPORTED_MODULE_3__["pString"])(json.ID);
      this.name = Object(Common_Utils__WEBPACK_IMPORTED_MODULE_3__["pString"])(json.Name);
      this.body = Object(Common_Utils__WEBPACK_IMPORTED_MODULE_3__["pString"])(json.Body);
      this.populated = !!json.Populated;
      result = true;
    }

    return result;
  };

  return TemplateModel;
}(Knoin_AbstractModel__WEBPACK_IMPORTED_MODULE_4__[/* AbstractModel */ "a"]);



/***/ }),
/* 427 */
/*!*********************************!*\
  !*** ./dev/Model/OpenPgpKey.js ***!
  \*********************************/
/*! exports provided: OpenPgpKeyModel, default */
/*! exports used: OpenPgpKeyModel */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return OpenPgpKeyModel; });
/* unused harmony export default */
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_index_of__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/index-of */ 30);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_index_of__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_index_of__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_keys__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/keys */ 268);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_keys__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_keys__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _babel_runtime_corejs3_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/esm/inheritsLoose */ 10);
/* harmony import */ var ko__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ko */ 1);
/* harmony import */ var Common_Utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! Common/Utils */ 2);
/* harmony import */ var Knoin_AbstractModel__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! Knoin/AbstractModel */ 64);
/* harmony import */ var Stores_User_Pgp__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! Stores/User/Pgp */ 41);








var OpenPgpKeyModel =
/*#__PURE__*/
function (_AbstractModel) {
  Object(_babel_runtime_corejs3_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(OpenPgpKeyModel, _AbstractModel);

  /**
   * @param {string} index
   * @param {string} guID
   * @param {string} ID
   * @param {array} IDs
   * @param {array} userIDs
   * @param {array} emails
   * @param {boolean} isPrivate
   * @param {string} armor
   * @param {string} userID
   */
  function OpenPgpKeyModel(index, guID, ID, IDs, userIDs, emails, isPrivate, armor, userID) {
    var _this;

    _this = _AbstractModel.call(this, 'OpenPgpKeyModel') || this;
    _this.index = index;
    _this.id = ID;
    _this.ids = Object(Common_Utils__WEBPACK_IMPORTED_MODULE_4__["isNonEmptyArray"])(IDs) ? IDs : [ID];
    _this.guid = guID;
    _this.user = '';
    _this.users = userIDs;
    _this.email = '';
    _this.emails = emails;
    _this.armor = armor;
    _this.isPrivate = !!isPrivate;

    _this.selectUser(userID);

    _this.deleteAccess = ko__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"].observable(false);
    return _this;
  }

  var _proto = OpenPgpKeyModel.prototype;

  _proto.getNativeKey = function getNativeKey() {
    var key = null;

    try {
      key = Stores_User_Pgp__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"].openpgp.key.readArmored(this.armor);

      if (key && !key.err && _babel_runtime_corejs3_core_js_stable_instance_keys__WEBPACK_IMPORTED_MODULE_1___default()(key) && _babel_runtime_corejs3_core_js_stable_instance_keys__WEBPACK_IMPORTED_MODULE_1___default()(key)[0]) {
        return key;
      }
    } catch (e) {
      Object(Common_Utils__WEBPACK_IMPORTED_MODULE_4__["log"])(e);
    }

    return null;
  };

  _proto.getNativeKeys = function getNativeKeys() {
    var key = this.getNativeKey();
    return key && _babel_runtime_corejs3_core_js_stable_instance_keys__WEBPACK_IMPORTED_MODULE_1___default()(key) ? _babel_runtime_corejs3_core_js_stable_instance_keys__WEBPACK_IMPORTED_MODULE_1___default()(key) : null;
  };

  _proto.select = function select(pattern, property) {
    if (this[property]) {
      var _context;

      var index = _babel_runtime_corejs3_core_js_stable_instance_index_of__WEBPACK_IMPORTED_MODULE_0___default()(_context = this[property]).call(_context, pattern);

      if (-1 !== index) {
        this.user = this.users[index];
        this.email = this.emails[index];
      }
    }
  };

  _proto.selectUser = function selectUser(user) {
    this.select(user, 'users');
  };

  _proto.selectEmail = function selectEmail(email) {
    this.select(email, 'emails');
  };

  return OpenPgpKeyModel;
}(Knoin_AbstractModel__WEBPACK_IMPORTED_MODULE_5__[/* AbstractModel */ "a"]);



/***/ }),
/* 428 */
/*!**********************************!*\
  !*** ./dev/Screen/User/Login.js ***!
  \**********************************/
/*! exports provided: LoginUserScreen, default */
/*! exports used: LoginUserScreen */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return LoginUserScreen; });
/* unused harmony export default */
/* harmony import */ var _babel_runtime_corejs3_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/esm/inheritsLoose */ 10);
/* harmony import */ var Knoin_AbstractScreen__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! Knoin/AbstractScreen */ 137);
/* harmony import */ var View_User_Login__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! View/User/Login */ 429);
/* harmony import */ var Helper_Apps_User__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! Helper/Apps/User */ 22);





var LoginUserScreen =
/*#__PURE__*/
function (_AbstractScreen) {
  Object(_babel_runtime_corejs3_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(LoginUserScreen, _AbstractScreen);

  function LoginUserScreen() {
    return _AbstractScreen.call(this, 'login', [View_User_Login__WEBPACK_IMPORTED_MODULE_2__[/* LoginUserView */ "a"]]) || this;
  }

  var _proto = LoginUserScreen.prototype;

  _proto.onShow = function onShow() {
    Object(Helper_Apps_User__WEBPACK_IMPORTED_MODULE_3__[/* getApp */ "a"])().setWindowTitle('');
  };

  return LoginUserScreen;
}(Knoin_AbstractScreen__WEBPACK_IMPORTED_MODULE_1__[/* AbstractScreen */ "a"]);



/***/ }),
/* 429 */
/*!********************************!*\
  !*** ./dev/View/User/Login.js ***!
  \********************************/
/*! exports provided: LoginUserView, default */
/*! exports used: LoginUserView */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return LoginUserView; });
/* unused harmony export default */
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor */ 19);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _babel_runtime_corejs3_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/esm/inheritsLoose */ 10);
/* harmony import */ var _babel_runtime_corejs3_helpers_esm_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/esm/applyDecoratedDescriptor */ 20);
/* harmony import */ var window__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! window */ 4);
/* harmony import */ var window__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(window__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! _ */ 3);
/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(___WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var ko__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ko */ 1);
/* harmony import */ var Common_Enums__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! Common/Enums */ 0);
/* harmony import */ var Common_Utils__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! Common/Utils */ 2);
/* harmony import */ var Common_Globals__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! Common/Globals */ 6);
/* harmony import */ var Common_Links__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! Common/Links */ 15);
/* harmony import */ var Common_Translator__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! Common/Translator */ 9);
/* harmony import */ var Common_Plugins__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! Common/Plugins */ 39);
/* harmony import */ var Stores_User_App__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! Stores/User/App */ 31);
/* harmony import */ var Stores_Language__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! Stores/Language */ 70);
/* harmony import */ var Storage_Settings__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! Storage/Settings */ 5);
/* harmony import */ var Storage_Client__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! Storage/Client */ 58);
/* harmony import */ var Remote_User_Ajax__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! Remote/User/Ajax */ 16);
/* harmony import */ var Helper_Apps_User__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! Helper/Apps/User */ 22);
/* harmony import */ var Knoin_Knoin__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! Knoin/Knoin */ 7);
/* harmony import */ var Knoin_AbstractViewNext__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! Knoin/AbstractViewNext */ 28);




var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _class, _class2;


















var LoginUserView = (_dec = Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_18__["view"])({
  name: ['View/App/Login', 'View/User/Login'],
  type: Knoin_Knoin__WEBPACK_IMPORTED_MODULE_18__["ViewType"].Center,
  templateID: 'Login'
}), _dec2 = Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_18__["command"])(function (self) {
  return !self.submitRequest() && self.facebookLoginEnabled();
}), _dec3 = Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_18__["command"])(function (self) {
  return !self.submitRequest() && self.googleLoginEnabled();
}), _dec4 = Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_18__["command"])(function (self) {
  return !self.submitRequest() && self.googleGmailLoginEnabled();
}), _dec5 = Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_18__["command"])(function (self) {
  return !self.submitRequest() && self.twitterLoginEnabled();
}), _dec6 = Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_18__["command"])(function (self) {
  return !self.submitRequest();
}), _dec(_class = (_class2 =
/*#__PURE__*/
function (_AbstractViewNext) {
  Object(_babel_runtime_corejs3_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(LoginUserView, _AbstractViewNext);

  function LoginUserView() {
    var _this;

    _this = _AbstractViewNext.call(this) || this;
    _this.hideSubmitButton = !!Storage_Settings__WEBPACK_IMPORTED_MODULE_14__["appSettingsGet"]('hideSubmitButton');
    _this.welcome = ko__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"].observable(!!Storage_Settings__WEBPACK_IMPORTED_MODULE_14__["settingsGet"]('UseLoginWelcomePage'));
    _this.email = ko__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"].observable('');
    _this.password = ko__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"].observable('');
    _this.signMe = ko__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"].observable(false);
    _this.additionalCode = ko__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"].observable('');
    _this.additionalCode.error = ko__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"].observable(false);
    _this.additionalCode.errorAnimation = ko__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"].observable(false).extend({
      falseTimeout: 500
    });
    _this.additionalCode.focused = ko__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"].observable(false);
    _this.additionalCode.visibility = ko__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"].observable(false);
    _this.additionalCodeSignMe = ko__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"].observable(false);
    _this.logoImg = Object(Common_Utils__WEBPACK_IMPORTED_MODULE_7__["trim"])(Storage_Settings__WEBPACK_IMPORTED_MODULE_14__["settingsGet"]('LoginLogo'));
    _this.loginDescription = Object(Common_Utils__WEBPACK_IMPORTED_MODULE_7__["trim"])(Storage_Settings__WEBPACK_IMPORTED_MODULE_14__["settingsGet"]('LoginDescription'));
    _this.mobile = !!Storage_Settings__WEBPACK_IMPORTED_MODULE_14__["appSettingsGet"]('mobile');
    _this.mobileDevice = !!Storage_Settings__WEBPACK_IMPORTED_MODULE_14__["appSettingsGet"]('mobileDevice');
    _this.forgotPasswordLinkUrl = Storage_Settings__WEBPACK_IMPORTED_MODULE_14__["appSettingsGet"]('forgotPasswordLinkUrl');
    _this.registrationLinkUrl = Storage_Settings__WEBPACK_IMPORTED_MODULE_14__["appSettingsGet"]('registrationLinkUrl');
    _this.emailError = ko__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"].observable(false);
    _this.passwordError = ko__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"].observable(false);
    _this.emailErrorAnimation = ko__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"].observable(false).extend({
      falseTimeout: 500
    });
    _this.passwordErrorAnimation = ko__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"].observable(false).extend({
      falseTimeout: 500
    });
    _this.formHidden = ko__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"].observable(false);
    _this.formError = ko__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"].computed(function () {
      return _this.emailErrorAnimation() || _this.passwordErrorAnimation() || _this.additionalCode.visibility() && _this.additionalCode.errorAnimation();
    });
    _this.emailFocus = ko__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"].observable(false);
    _this.passwordFocus = ko__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"].observable(false);

    _this.email.subscribe(function () {
      _this.emailError(false);

      _this.additionalCode('');

      _this.additionalCode.visibility(false);
    });

    _this.password.subscribe(function () {
      _this.passwordError(false);
    });

    _this.additionalCode.subscribe(function () {
      _this.additionalCode.error(false);
    });

    _this.additionalCode.visibility.subscribe(function () {
      _this.additionalCode.error(false);
    });

    _this.emailError.subscribe(function (bV) {
      _this.emailErrorAnimation(!!bV);
    });

    _this.passwordError.subscribe(function (bV) {
      _this.passwordErrorAnimation(!!bV);
    });

    _this.additionalCode.error.subscribe(function (bV) {
      _this.additionalCode.errorAnimation(!!bV);
    });

    _this.submitRequest = ko__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"].observable(false);
    _this.submitError = ko__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"].observable('');
    _this.submitErrorAddidional = ko__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"].observable('');

    _this.submitError.subscribe(function (value) {
      if ('' === value) {
        _this.submitErrorAddidional('');
      }
    });

    _this.allowLanguagesOnLogin = Stores_User_App__WEBPACK_IMPORTED_MODULE_12__[/* default */ "a"].allowLanguagesOnLogin;
    _this.langRequest = ko__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"].observable(false);
    _this.language = Stores_Language__WEBPACK_IMPORTED_MODULE_13__[/* default */ "a"].language;
    _this.languages = Stores_Language__WEBPACK_IMPORTED_MODULE_13__[/* default */ "a"].languages;
    _this.bSendLanguage = false;
    _this.languageFullName = ko__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"].computed(function () {
      return Object(Common_Utils__WEBPACK_IMPORTED_MODULE_7__["convertLangName"])(_this.language());
    });
    _this.signMeType = ko__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"].observable(Common_Enums__WEBPACK_IMPORTED_MODULE_6__["LoginSignMeType"].Unused);

    _this.signMeType.subscribe(function (iValue) {
      _this.signMe(Common_Enums__WEBPACK_IMPORTED_MODULE_6__["LoginSignMeType"].DefaultOn === iValue);
    });

    _this.signMeVisibility = ko__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"].computed(function () {
      return Common_Enums__WEBPACK_IMPORTED_MODULE_6__["LoginSignMeType"].Unused !== _this.signMeType();
    });
    _this.facebookLoginEnabled = ko__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"].observable(false);
    _this.googleLoginEnabled = ko__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"].observable(false);
    _this.googleGmailLoginEnabled = ko__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"].observable(false);
    _this.twitterLoginEnabled = ko__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"].observable(false);
    _this.socialLoginEnabled = ko__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"].computed(function () {
      var bF = _this.facebookLoginEnabled(),
          bG = _this.googleLoginEnabled(),
          bT = _this.twitterLoginEnabled();

      return bF || bG || bT;
    });

    if (Storage_Settings__WEBPACK_IMPORTED_MODULE_14__["settingsGet"]('AdditionalLoginError') && !_this.submitError()) {
      _this.submitError(Storage_Settings__WEBPACK_IMPORTED_MODULE_14__["settingsGet"]('AdditionalLoginError'));
    }

    return _this;
  }

  var _proto = LoginUserView.prototype;

  _proto.windowOpenFeatures = function windowOpenFeatures(wh) {
    return "left=200,top=100,width=" + wh + ",height=" + wh + ",menubar=no,status=no,resizable=yes,scrollbars=yes";
  };

  _proto.facebookCommand = function facebookCommand() {
    window__WEBPACK_IMPORTED_MODULE_3___default.a.open(Object(Common_Links__WEBPACK_IMPORTED_MODULE_9__[/* socialFacebook */ "A"])(), 'Facebook', this.windowOpenFeatures(500));
    return true;
  };

  _proto.googleCommand = function googleCommand() {
    window__WEBPACK_IMPORTED_MODULE_3___default.a.open(Object(Common_Links__WEBPACK_IMPORTED_MODULE_9__[/* socialGoogle */ "B"])(), 'Google', this.windowOpenFeatures(550));
    return true;
  };

  _proto.googleGmailCommand = function googleGmailCommand() {
    window__WEBPACK_IMPORTED_MODULE_3___default.a.open(Object(Common_Links__WEBPACK_IMPORTED_MODULE_9__[/* socialGoogle */ "B"])(true), 'Google', this.windowOpenFeatures(550));
    return true;
  };

  _proto.twitterCommand = function twitterCommand() {
    window__WEBPACK_IMPORTED_MODULE_3___default.a.open(Object(Common_Links__WEBPACK_IMPORTED_MODULE_9__[/* socialTwitter */ "C"])(), 'Twitter', this.windowOpenFeatures(500));
    return true;
  };

  _proto.submitCommand = function submitCommand() {
    var _this2 = this;

    Object(Common_Utils__WEBPACK_IMPORTED_MODULE_7__["triggerAutocompleteInputChange"])();
    this.emailError(false);
    this.passwordError(false);
    this.emailError('' === Object(Common_Utils__WEBPACK_IMPORTED_MODULE_7__["trim"])(this.email()));
    this.passwordError('' === Object(Common_Utils__WEBPACK_IMPORTED_MODULE_7__["trim"])(this.password()));

    if (this.additionalCode.visibility()) {
      this.additionalCode.error(false);
      this.additionalCode.error('' === Object(Common_Utils__WEBPACK_IMPORTED_MODULE_7__["trim"])(this.additionalCode()));
    }

    if (this.emailError() || this.passwordError() || this.additionalCode.visibility() && this.additionalCode.error()) {
      switch (true) {
        case this.emailError():
          this.emailFocus(true);
          break;

        case this.passwordError():
          this.passwordFocus(true);
          break;

        case this.additionalCode.visibility() && this.additionalCode.error():
          this.additionalCode.focused(true);
          break;
        // no default
      }

      return false;
    }

    var pluginResultCode = 0,
        pluginResultMessage = '';

    var fSubmitResult = function fSubmitResult(iResultCode, sResultMessage) {
      pluginResultCode = iResultCode || 0;
      pluginResultMessage = sResultMessage || '';
    };

    Common_Plugins__WEBPACK_IMPORTED_MODULE_11__[/* runHook */ "f"]('user-login-submit', [fSubmitResult]);

    if (0 < pluginResultCode) {
      this.submitError(Object(Common_Translator__WEBPACK_IMPORTED_MODULE_10__["getNotification"])(pluginResultCode));
      return false;
    } else if ('' !== pluginResultMessage) {
      this.submitError(pluginResultMessage);
      return false;
    }

    this.submitRequest(true);
    Common_Globals__WEBPACK_IMPORTED_MODULE_8__["$win"].trigger('rl.tooltips.diactivate');

    var fLoginRequest = function fLoginRequest(sLoginPassword) {
      Remote_User_Ajax__WEBPACK_IMPORTED_MODULE_16__[/* default */ "a"].login(function (sResult, oData) {
        Common_Globals__WEBPACK_IMPORTED_MODULE_8__["$win"].trigger('rl.tooltips.diactivate');
        Common_Globals__WEBPACK_IMPORTED_MODULE_8__["$win"].trigger('rl.tooltips.activate');

        if (Common_Enums__WEBPACK_IMPORTED_MODULE_6__["StorageResultType"].Success === sResult && oData && 'Login' === oData.Action) {
          if (oData.Result) {
            if (oData.TwoFactorAuth) {
              _this2.additionalCode('');

              _this2.additionalCode.visibility(true);

              _this2.submitRequest(false);

              ___WEBPACK_IMPORTED_MODULE_4___default.a.delay(function () {
                return _this2.additionalCode.focused(true);
              }, Common_Enums__WEBPACK_IMPORTED_MODULE_6__["Magics"].Time100ms);
            } else if (oData.Admin) {
              Object(Helper_Apps_User__WEBPACK_IMPORTED_MODULE_17__[/* getApp */ "a"])().redirectToAdminPanel();
            } else {
              Object(Helper_Apps_User__WEBPACK_IMPORTED_MODULE_17__[/* getApp */ "a"])().loginAndLogoutReload(false);
            }
          } else if (oData.ErrorCode) {
            _this2.submitRequest(false);

            if (-1 < Object(Common_Utils__WEBPACK_IMPORTED_MODULE_7__["inArray"])(oData.ErrorCode, [Common_Enums__WEBPACK_IMPORTED_MODULE_6__["Notification"].InvalidInputArgument])) {
              oData.ErrorCode = Common_Enums__WEBPACK_IMPORTED_MODULE_6__["Notification"].AuthError;
            }

            _this2.submitError(Object(Common_Translator__WEBPACK_IMPORTED_MODULE_10__["getNotificationFromResponse"])(oData));

            if ('' === _this2.submitError()) {
              _this2.submitError(Object(Common_Translator__WEBPACK_IMPORTED_MODULE_10__["getNotification"])(Common_Enums__WEBPACK_IMPORTED_MODULE_6__["Notification"].UnknownError));
            } else if (oData.ErrorMessageAdditional) {
              _this2.submitErrorAddidional(oData.ErrorMessageAdditional);
            }
          } else {
            _this2.submitRequest(false);
          }
        } else {
          _this2.submitRequest(false);

          _this2.submitError(Object(Common_Translator__WEBPACK_IMPORTED_MODULE_10__["getNotification"])(Common_Enums__WEBPACK_IMPORTED_MODULE_6__["Notification"].UnknownError));
        }
      }, _this2.email(), '', sLoginPassword, !!_this2.signMe(), _this2.bSendLanguage ? _this2.language() : '', _this2.additionalCode.visibility() ? _this2.additionalCode() : '', _this2.additionalCode.visibility() ? !!_this2.additionalCodeSignMe() : false);
      Storage_Client__WEBPACK_IMPORTED_MODULE_15__[/* set */ "b"](Common_Enums__WEBPACK_IMPORTED_MODULE_6__["ClientSideKeyName"].LastSignMe, _this2.signMe() ? '-1-' : '-0-');
    };

    fLoginRequest(this.password());
    return true;
  };

  _proto.displayMainForm = function displayMainForm() {
    this.welcome(false);
  };

  _proto.onShow = function onShow() {
    Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_18__["routeOff"])();
  };

  _proto.onShowWithDelay = function onShowWithDelay() {
    if ('' !== this.email() && '' !== this.password()) {
      this.passwordFocus(true);
    } else if ('' === this.email()) {
      this.emailFocus(true);
    } else if ('' === this.password()) {
      this.passwordFocus(true);
    } else {
      this.emailFocus(true);
    }
  };

  _proto.onHide = function onHide() {
    this.emailFocus(false);
    this.passwordFocus(false);
  };

  _proto.onBuild = function onBuild() {
    var _this3 = this;

    var signMeLocal = Storage_Client__WEBPACK_IMPORTED_MODULE_15__[/* get */ "a"](Common_Enums__WEBPACK_IMPORTED_MODULE_6__["ClientSideKeyName"].LastSignMe),
        signMe = (Storage_Settings__WEBPACK_IMPORTED_MODULE_14__["settingsGet"]('SignMe') || 'unused').toLowerCase(),
        jsHash = Storage_Settings__WEBPACK_IMPORTED_MODULE_14__["appSettingsGet"]('jsHash'),
        fSocial = function fSocial(iErrorCode) {
      iErrorCode = Object(Common_Utils__WEBPACK_IMPORTED_MODULE_7__["pInt"])(iErrorCode);

      if (0 === iErrorCode) {
        _this3.submitRequest(true);

        Object(Helper_Apps_User__WEBPACK_IMPORTED_MODULE_17__[/* getApp */ "a"])().loginAndLogoutReload(false);
      } else {
        _this3.submitError(Object(Common_Translator__WEBPACK_IMPORTED_MODULE_10__["getNotification"])(iErrorCode));
      }
    };

    this.facebookLoginEnabled(!!Storage_Settings__WEBPACK_IMPORTED_MODULE_14__["settingsGet"]('AllowFacebookSocial'));
    this.twitterLoginEnabled(!!Storage_Settings__WEBPACK_IMPORTED_MODULE_14__["settingsGet"]('AllowTwitterSocial'));
    this.googleLoginEnabled(!!Storage_Settings__WEBPACK_IMPORTED_MODULE_14__["settingsGet"]('AllowGoogleSocial') && !!Storage_Settings__WEBPACK_IMPORTED_MODULE_14__["settingsGet"]('AllowGoogleSocialAuth'));
    this.googleGmailLoginEnabled(!!Storage_Settings__WEBPACK_IMPORTED_MODULE_14__["settingsGet"]('AllowGoogleSocial') && !!Storage_Settings__WEBPACK_IMPORTED_MODULE_14__["settingsGet"]('AllowGoogleSocialAuthGmail'));

    switch (signMe) {
      case Common_Enums__WEBPACK_IMPORTED_MODULE_6__["LoginSignMeTypeAsString"].DefaultOff:
      case Common_Enums__WEBPACK_IMPORTED_MODULE_6__["LoginSignMeTypeAsString"].DefaultOn:
        this.signMeType(Common_Enums__WEBPACK_IMPORTED_MODULE_6__["LoginSignMeTypeAsString"].DefaultOn === signMe ? Common_Enums__WEBPACK_IMPORTED_MODULE_6__["LoginSignMeType"].DefaultOn : Common_Enums__WEBPACK_IMPORTED_MODULE_6__["LoginSignMeType"].DefaultOff);

        switch (signMeLocal) {
          case '-1-':
            this.signMeType(Common_Enums__WEBPACK_IMPORTED_MODULE_6__["LoginSignMeType"].DefaultOn);
            break;

          case '-0-':
            this.signMeType(Common_Enums__WEBPACK_IMPORTED_MODULE_6__["LoginSignMeType"].DefaultOff);
            break;
          // no default
        }

        break;

      case Common_Enums__WEBPACK_IMPORTED_MODULE_6__["LoginSignMeTypeAsString"].Unused:
      default:
        this.signMeType(Common_Enums__WEBPACK_IMPORTED_MODULE_6__["LoginSignMeType"].Unused);
        break;
    }

    this.email(Stores_User_App__WEBPACK_IMPORTED_MODULE_12__[/* default */ "a"].devEmail);
    this.password(Stores_User_App__WEBPACK_IMPORTED_MODULE_12__[/* default */ "a"].devPassword);

    if (this.googleLoginEnabled() || this.googleGmailLoginEnabled()) {
      window__WEBPACK_IMPORTED_MODULE_3___default.a['rl_' + jsHash + '_google_login_service'] = fSocial;
    }

    if (this.facebookLoginEnabled()) {
      window__WEBPACK_IMPORTED_MODULE_3___default.a['rl_' + jsHash + '_facebook_login_service'] = fSocial;
    }

    if (this.twitterLoginEnabled()) {
      window__WEBPACK_IMPORTED_MODULE_3___default.a['rl_' + jsHash + '_twitter_login_service'] = fSocial;
    }

    ___WEBPACK_IMPORTED_MODULE_4___default.a.delay(function () {
      Stores_Language__WEBPACK_IMPORTED_MODULE_13__[/* default */ "a"].language.subscribe(function (value) {
        _this3.langRequest(true);

        Object(Common_Translator__WEBPACK_IMPORTED_MODULE_10__["reload"])(false, value).then(function () {
          _this3.langRequest(false);

          _this3.bSendLanguage = true;
        }, function () {
          _this3.langRequest(false);
        });
      });
    }, Common_Enums__WEBPACK_IMPORTED_MODULE_6__["Magics"].Time50ms);

    Object(Common_Utils__WEBPACK_IMPORTED_MODULE_7__["triggerAutocompleteInputChange"])(true);
  };

  _proto.submitForm = function submitForm() {
    this.submitCommand();
  };

  _proto.selectLanguage = function selectLanguage() {
    Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_18__["showScreenPopup"])(__webpack_require__(/*! View/Popup/Languages */ 254), [this.language, this.languages(), Stores_Language__WEBPACK_IMPORTED_MODULE_13__[/* default */ "a"].userLanguage()]);
  };

  _proto.selectLanguageOnTab = function selectLanguageOnTab(bShift) {
    var _this4 = this;

    if (!bShift) {
      ___WEBPACK_IMPORTED_MODULE_4___default.a.delay(function () {
        _this4.emailFocus(true);
      }, Common_Enums__WEBPACK_IMPORTED_MODULE_6__["Magics"].Time50ms);

      return false;
    }

    return true;
  };

  return LoginUserView;
}(Knoin_AbstractViewNext__WEBPACK_IMPORTED_MODULE_19__[/* AbstractViewNext */ "a"]), (Object(_babel_runtime_corejs3_helpers_esm_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(_class2.prototype, "facebookCommand", [_dec2], _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_0___default()(_class2.prototype, "facebookCommand"), _class2.prototype), Object(_babel_runtime_corejs3_helpers_esm_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(_class2.prototype, "googleCommand", [_dec3], _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_0___default()(_class2.prototype, "googleCommand"), _class2.prototype), Object(_babel_runtime_corejs3_helpers_esm_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(_class2.prototype, "googleGmailCommand", [_dec4], _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_0___default()(_class2.prototype, "googleGmailCommand"), _class2.prototype), Object(_babel_runtime_corejs3_helpers_esm_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(_class2.prototype, "twitterCommand", [_dec5], _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_0___default()(_class2.prototype, "twitterCommand"), _class2.prototype), Object(_babel_runtime_corejs3_helpers_esm_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(_class2.prototype, "submitCommand", [_dec6], _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_0___default()(_class2.prototype, "submitCommand"), _class2.prototype)), _class2)) || _class);


/***/ }),
/* 430 */
/*!************************************!*\
  !*** ./dev/Screen/User/MailBox.js ***!
  \************************************/
/*! exports provided: MailBoxUserScreen, default */
/*! exports used: MailBoxUserScreen */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return MailBoxUserScreen; });
/* unused harmony export default */
/* harmony import */ var core_js_modules_es_regexp_exec__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.regexp.exec */ 45);
/* harmony import */ var core_js_modules_es_regexp_exec__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_regexp_exec__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var core_js_modules_es_string_replace__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es.string.replace */ 56);
/* harmony import */ var core_js_modules_es_string_replace__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_replace__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _babel_runtime_corejs3_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/esm/inheritsLoose */ 10);
/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! _ */ 3);
/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(___WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var Common_Enums__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! Common/Enums */ 0);
/* harmony import */ var Common_Globals__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! Common/Globals */ 6);
/* harmony import */ var Common_Utils__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! Common/Utils */ 2);
/* harmony import */ var Common_Cache__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! Common/Cache */ 14);
/* harmony import */ var Common_Translator__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! Common/Translator */ 9);
/* harmony import */ var Common_Events__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! Common/Events */ 24);
/* harmony import */ var Storage_Settings__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! Storage/Settings */ 5);
/* harmony import */ var Stores_User_App__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! Stores/User/App */ 31);
/* harmony import */ var Stores_User_Account__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! Stores/User/Account */ 46);
/* harmony import */ var Stores_User_Settings__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! Stores/User/Settings */ 38);
/* harmony import */ var Stores_User_Folder__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! Stores/User/Folder */ 11);
/* harmony import */ var Stores_User_Message__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! Stores/User/Message */ 13);
/* harmony import */ var View_User_MailBox_SystemDropDown__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! View/User/MailBox/SystemDropDown */ 431);
/* harmony import */ var View_User_MailBox_FolderList__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! View/User/MailBox/FolderList */ 432);
/* harmony import */ var View_User_MailBox_MessageList__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! View/User/MailBox/MessageList */ 434);
/* harmony import */ var View_User_MailBox_MessageView__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! View/User/MailBox/MessageView */ 435);
/* harmony import */ var Helper_Apps_User__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! Helper/Apps/User */ 22);
/* harmony import */ var Knoin_Knoin__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! Knoin/Knoin */ 7);
/* harmony import */ var Knoin_AbstractScreen__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! Knoin/AbstractScreen */ 137);
























var MailBoxUserScreen =
/*#__PURE__*/
function (_AbstractScreen) {
  Object(_babel_runtime_corejs3_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(MailBoxUserScreen, _AbstractScreen);

  function MailBoxUserScreen() {
    return _AbstractScreen.call(this, 'mailbox', [View_User_MailBox_SystemDropDown__WEBPACK_IMPORTED_MODULE_16__[/* SystemDropDownMailBoxUserView */ "a"], View_User_MailBox_FolderList__WEBPACK_IMPORTED_MODULE_17__[/* FolderListMailBoxUserView */ "a"], View_User_MailBox_MessageList__WEBPACK_IMPORTED_MODULE_18__[/* MessageListMailBoxUserView */ "a"], View_User_MailBox_MessageView__WEBPACK_IMPORTED_MODULE_19__[/* MessageViewMailBoxUserView */ "a"]]) || this;
  }
  /**
   * @returns {void}
   */


  var _proto = MailBoxUserScreen.prototype;

  _proto.updateWindowTitle = function updateWindowTitle() {
    var foldersInboxUnreadCount = Stores_User_Folder__WEBPACK_IMPORTED_MODULE_14__[/* default */ "a"].foldersInboxUnreadCount();
    var email = Stores_User_Account__WEBPACK_IMPORTED_MODULE_12__[/* default */ "a"].email();

    if (Storage_Settings__WEBPACK_IMPORTED_MODULE_10__["appSettingsGet"]('listPermanentFiltered')) {
      foldersInboxUnreadCount = 0;
    }

    Object(Helper_Apps_User__WEBPACK_IMPORTED_MODULE_20__[/* getApp */ "a"])().setWindowTitle(('' === email ? '' : '' + (0 < foldersInboxUnreadCount ? '(' + foldersInboxUnreadCount + ') ' : ' ') + email + ' - ') + Object(Common_Translator__WEBPACK_IMPORTED_MODULE_8__["i18n"])('TITLES/MAILBOX'));
  }
  /**
   * @returns {void}
   */
  ;

  _proto.onShow = function onShow() {
    this.updateWindowTitle();
    Stores_User_App__WEBPACK_IMPORTED_MODULE_11__[/* default */ "a"].focusedState(Common_Enums__WEBPACK_IMPORTED_MODULE_4__["Focused"].None);
    Stores_User_App__WEBPACK_IMPORTED_MODULE_11__[/* default */ "a"].focusedState(Common_Enums__WEBPACK_IMPORTED_MODULE_4__["Focused"].MessageList);

    if (Storage_Settings__WEBPACK_IMPORTED_MODULE_10__["appSettingsGet"]('mobile')) {
      Object(Common_Globals__WEBPACK_IMPORTED_MODULE_5__["leftPanelDisabled"])(true);
    }

    if (!Storage_Settings__WEBPACK_IMPORTED_MODULE_10__["capa"](Common_Enums__WEBPACK_IMPORTED_MODULE_4__["Capa"].Folders)) {
      Object(Common_Globals__WEBPACK_IMPORTED_MODULE_5__["leftPanelType"])(Storage_Settings__WEBPACK_IMPORTED_MODULE_10__["capa"](Common_Enums__WEBPACK_IMPORTED_MODULE_4__["Capa"].Composer) || Storage_Settings__WEBPACK_IMPORTED_MODULE_10__["capa"](Common_Enums__WEBPACK_IMPORTED_MODULE_4__["Capa"].Contacts) ? 'short' : 'none');
    } else {
      Object(Common_Globals__WEBPACK_IMPORTED_MODULE_5__["leftPanelType"])('');
    }
  }
  /**
   * @param {string} folderHash
   * @param {number} page
   * @param {string} search
   * @returns {void}
   */
  ;

  _proto.onRoute = function onRoute(folderHash, page, search) {
    var threadUid = folderHash.replace(/^(.+)~([\d]+)$/, '$2');
    var folder = Object(Common_Cache__WEBPACK_IMPORTED_MODULE_7__[/* getFolderFromCacheList */ "e"])(Object(Common_Cache__WEBPACK_IMPORTED_MODULE_7__[/* getFolderFullNameRaw */ "f"])(folderHash.replace(/~([\d]+)$/, '')));

    if (folder) {
      if (folderHash === threadUid) {
        threadUid = '';
      }

      Stores_User_Folder__WEBPACK_IMPORTED_MODULE_14__[/* default */ "a"].currentFolder(folder);
      Stores_User_Message__WEBPACK_IMPORTED_MODULE_15__[/* default */ "a"].messageListPage(page);
      Stores_User_Message__WEBPACK_IMPORTED_MODULE_15__[/* default */ "a"].messageListSearch(search);
      Stores_User_Message__WEBPACK_IMPORTED_MODULE_15__[/* default */ "a"].messageListThreadUid(threadUid);
      Object(Helper_Apps_User__WEBPACK_IMPORTED_MODULE_20__[/* getApp */ "a"])().reloadMessageList();
    }
  }
  /**
   * @returns {void}
   */
  ;

  _proto.onStart = function onStart() {
    var _this = this;

    Stores_User_Folder__WEBPACK_IMPORTED_MODULE_14__[/* default */ "a"].folderList.subscribe(Common_Utils__WEBPACK_IMPORTED_MODULE_6__["windowResizeCallback"]);
    Stores_User_Message__WEBPACK_IMPORTED_MODULE_15__[/* default */ "a"].messageList.subscribe(Common_Utils__WEBPACK_IMPORTED_MODULE_6__["windowResizeCallback"]);
    Stores_User_Message__WEBPACK_IMPORTED_MODULE_15__[/* default */ "a"].message.subscribe(Common_Utils__WEBPACK_IMPORTED_MODULE_6__["windowResizeCallback"]);

    ___WEBPACK_IMPORTED_MODULE_3___default.a.delay(function () {
      return Stores_User_Settings__WEBPACK_IMPORTED_MODULE_13__[/* default */ "a"].layout.valueHasMutated();
    }, Common_Enums__WEBPACK_IMPORTED_MODULE_4__["Magics"].Time50ms);

    ___WEBPACK_IMPORTED_MODULE_3___default.a.delay(function () {
      return Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_21__["warmUpScreenPopup"])(__webpack_require__(/*! View/Popup/Compose */ 122));
    }, Common_Enums__WEBPACK_IMPORTED_MODULE_4__["Magics"].Time500ms);

    Common_Events__WEBPACK_IMPORTED_MODULE_9__[/* sub */ "b"]('mailbox.inbox-unread-count', function (count) {
      Stores_User_Folder__WEBPACK_IMPORTED_MODULE_14__[/* default */ "a"].foldersInboxUnreadCount(count);
      var email = Stores_User_Account__WEBPACK_IMPORTED_MODULE_12__[/* default */ "a"].email();

      ___WEBPACK_IMPORTED_MODULE_3___default.a.each(Stores_User_Account__WEBPACK_IMPORTED_MODULE_12__[/* default */ "a"].accounts(), function (item) {
        if (item && email === item.email) {
          item.count(count);
        }
      });

      _this.updateWindowTitle();
    });
  }
  /**
   * @returns {void}
   */
  ;

  _proto.onBuild = function onBuild() {
    if (!Common_Globals__WEBPACK_IMPORTED_MODULE_5__["bMobileDevice"] && !Storage_Settings__WEBPACK_IMPORTED_MODULE_10__["appSettingsGet"]('mobile')) {
      ___WEBPACK_IMPORTED_MODULE_3___default.a.defer(function () {
        Object(Helper_Apps_User__WEBPACK_IMPORTED_MODULE_20__[/* getApp */ "a"])().initHorizontalLayoutResizer(Common_Enums__WEBPACK_IMPORTED_MODULE_4__["ClientSideKeyName"].MessageListSize);
      });
    }

    Common_Globals__WEBPACK_IMPORTED_MODULE_5__["$html"].on('click', '#rl-right', function () {
      Object(Common_Globals__WEBPACK_IMPORTED_MODULE_5__["moveAction"])(false);
    });
  }
  /**
   * @returns {Array}
   */
  ;

  _proto.routes = function routes() {
    var inboxFolderName = Object(Common_Cache__WEBPACK_IMPORTED_MODULE_7__[/* getFolderInboxName */ "h"])(),
        fNormS = function fNormS(request, vals) {
      vals[0] = Object(Common_Utils__WEBPACK_IMPORTED_MODULE_6__["pString"])(vals[0]);
      vals[1] = Object(Common_Utils__WEBPACK_IMPORTED_MODULE_6__["pInt"])(vals[1]);
      vals[1] = 0 >= vals[1] ? 1 : vals[1];
      vals[2] = Object(Common_Utils__WEBPACK_IMPORTED_MODULE_6__["pString"])(vals[2]);

      if ('' === request) {
        vals[0] = inboxFolderName;
        vals[1] = 1;
      }

      return [Object(Common_Utils__WEBPACK_IMPORTED_MODULE_6__["decodeURI"])(vals[0]), vals[1], Object(Common_Utils__WEBPACK_IMPORTED_MODULE_6__["decodeURI"])(vals[2])];
    },
        fNormD = function fNormD(request, vals) {
      vals[0] = Object(Common_Utils__WEBPACK_IMPORTED_MODULE_6__["pString"])(vals[0]);
      vals[1] = Object(Common_Utils__WEBPACK_IMPORTED_MODULE_6__["pString"])(vals[1]);

      if ('' === request) {
        vals[0] = inboxFolderName;
      }

      return [Object(Common_Utils__WEBPACK_IMPORTED_MODULE_6__["decodeURI"])(vals[0]), 1, Object(Common_Utils__WEBPACK_IMPORTED_MODULE_6__["decodeURI"])(vals[1])];
    };

    return [[/^([a-zA-Z0-9~]+)\/p([1-9][0-9]*)\/(.+)\/?$/, {
      'normalize_': fNormS
    }], [/^([a-zA-Z0-9~]+)\/p([1-9][0-9]*)$/, {
      'normalize_': fNormS
    }], [/^([a-zA-Z0-9~]+)\/(.+)\/?$/, {
      'normalize_': fNormD
    }], [/^([^/]*)$/, {
      'normalize_': fNormS
    }]];
  };

  return MailBoxUserScreen;
}(Knoin_AbstractScreen__WEBPACK_IMPORTED_MODULE_22__[/* AbstractScreen */ "a"]);



/***/ }),
/* 431 */
/*!*************************************************!*\
  !*** ./dev/View/User/MailBox/SystemDropDown.js ***!
  \*************************************************/
/*! exports provided: SystemDropDownMailBoxUserView, default */
/*! exports used: SystemDropDownMailBoxUserView */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return SystemDropDownMailBoxUserView; });
/* unused harmony export default */
/* harmony import */ var _babel_runtime_corejs3_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/esm/inheritsLoose */ 10);
/* harmony import */ var Knoin_Knoin__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! Knoin/Knoin */ 7);
/* harmony import */ var View_User_AbstractSystemDropDown__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! View/User/AbstractSystemDropDown */ 276);


var _dec, _class;



var SystemDropDownMailBoxUserView = (_dec = Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_1__["view"])({
  name: 'View/User/MailBox/SystemDropDown',
  type: Knoin_Knoin__WEBPACK_IMPORTED_MODULE_1__["ViewType"].Right,
  templateID: 'SystemDropDown'
}), _dec(_class =
/*#__PURE__*/
function (_AbstractSystemDropDo) {
  Object(_babel_runtime_corejs3_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(SystemDropDownMailBoxUserView, _AbstractSystemDropDo);

  function SystemDropDownMailBoxUserView() {
    return _AbstractSystemDropDo.apply(this, arguments) || this;
  }

  return SystemDropDownMailBoxUserView;
}(View_User_AbstractSystemDropDown__WEBPACK_IMPORTED_MODULE_2__[/* AbstractSystemDropDownUserView */ "a"])) || _class);


/***/ }),
/* 432 */
/*!*********************************************!*\
  !*** ./dev/View/User/MailBox/FolderList.js ***!
  \*********************************************/
/*! exports provided: FolderListMailBoxUserView, default */
/*! exports used: FolderListMailBoxUserView */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return FolderListMailBoxUserView; });
/* unused harmony export default */
/* harmony import */ var core_js_modules_web_timers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/web.timers */ 67);
/* harmony import */ var core_js_modules_web_timers__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_timers__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/filter */ 34);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_index_of__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/index-of */ 30);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_index_of__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_index_of__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _babel_runtime_corejs3_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/esm/inheritsLoose */ 10);
/* harmony import */ var window__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! window */ 4);
/* harmony import */ var window__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(window__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var $__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! $ */ 8);
/* harmony import */ var $__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n($__WEBPACK_IMPORTED_MODULE_5__);
/* harmony import */ var ko__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ko */ 1);
/* harmony import */ var key__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! key */ 21);
/* harmony import */ var key__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(key__WEBPACK_IMPORTED_MODULE_7__);
/* harmony import */ var Common_Utils__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! Common/Utils */ 2);
/* harmony import */ var Common_Enums__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! Common/Enums */ 0);
/* harmony import */ var Common_Globals__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! Common/Globals */ 6);
/* harmony import */ var Common_Links__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! Common/Links */ 15);
/* harmony import */ var Common_Cache__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! Common/Cache */ 14);
/* harmony import */ var Stores_User_App__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! Stores/User/App */ 31);
/* harmony import */ var Stores_User_Settings__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! Stores/User/Settings */ 38);
/* harmony import */ var Stores_User_Folder__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! Stores/User/Folder */ 11);
/* harmony import */ var Stores_User_Message__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! Stores/User/Message */ 13);
/* harmony import */ var Storage_Settings__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! Storage/Settings */ 5);
/* harmony import */ var Helper_Apps_User__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! Helper/Apps/User */ 22);
/* harmony import */ var Knoin_Knoin__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! Knoin/Knoin */ 7);
/* harmony import */ var Knoin_AbstractViewNext__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! Knoin/AbstractViewNext */ 28);





var _dec, _class;


















var FolderListMailBoxUserView = (_dec = Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_19__["view"])({
  name: 'View/User/MailBox/FolderList',
  type: Knoin_Knoin__WEBPACK_IMPORTED_MODULE_19__["ViewType"].Left,
  templateID: 'MailFolderList'
}), _dec(_class =
/*#__PURE__*/
function (_AbstractViewNext) {
  Object(_babel_runtime_corejs3_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(FolderListMailBoxUserView, _AbstractViewNext);

  function FolderListMailBoxUserView() {
    var _this;

    _this = _AbstractViewNext.call(this) || this;
    _this.oContentVisible = null;
    _this.oContentScrollable = null;
    _this.composeInEdit = Stores_User_App__WEBPACK_IMPORTED_MODULE_13__[/* default */ "a"].composeInEdit;
    _this.messageList = Stores_User_Message__WEBPACK_IMPORTED_MODULE_16__[/* default */ "a"].messageList;
    _this.folderList = Stores_User_Folder__WEBPACK_IMPORTED_MODULE_15__[/* default */ "a"].folderList;
    _this.folderListSystem = Stores_User_Folder__WEBPACK_IMPORTED_MODULE_15__[/* default */ "a"].folderListSystem;
    _this.foldersChanging = Stores_User_Folder__WEBPACK_IMPORTED_MODULE_15__[/* default */ "a"].foldersChanging;
    _this.moveAction = Common_Globals__WEBPACK_IMPORTED_MODULE_10__["moveAction"];
    _this.foldersListWithSingleInboxRootFolder = Stores_User_Folder__WEBPACK_IMPORTED_MODULE_15__[/* default */ "a"].foldersListWithSingleInboxRootFolder;
    _this.leftPanelDisabled = Common_Globals__WEBPACK_IMPORTED_MODULE_10__["leftPanelDisabled"];
    _this.iDropOverTimer = 0;
    _this.allowComposer = !!Storage_Settings__WEBPACK_IMPORTED_MODULE_17__["capa"](Common_Enums__WEBPACK_IMPORTED_MODULE_9__["Capa"].Composer);
    _this.allowContacts = !!Stores_User_App__WEBPACK_IMPORTED_MODULE_13__[/* default */ "a"].contactsIsAllowed();
    _this.allowFolders = !!Storage_Settings__WEBPACK_IMPORTED_MODULE_17__["capa"](Common_Enums__WEBPACK_IMPORTED_MODULE_9__["Capa"].Folders);
    _this.folderListFocused = ko__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"].computed(function () {
      return Common_Enums__WEBPACK_IMPORTED_MODULE_9__["Focused"].FolderList === Stores_User_App__WEBPACK_IMPORTED_MODULE_13__[/* default */ "a"].focusedState();
    });
    _this.isInboxStarred = ko__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"].computed(function () {
      var _context;

      return Stores_User_Folder__WEBPACK_IMPORTED_MODULE_15__[/* default */ "a"].currentFolder() && Stores_User_Folder__WEBPACK_IMPORTED_MODULE_15__[/* default */ "a"].currentFolder().isInbox() && -1 < _babel_runtime_corejs3_core_js_stable_instance_index_of__WEBPACK_IMPORTED_MODULE_2___default()(_context = Object(Common_Utils__WEBPACK_IMPORTED_MODULE_8__["trim"])(Stores_User_Message__WEBPACK_IMPORTED_MODULE_16__[/* default */ "a"].messageListSearch())).call(_context, 'is:flagged');
    });
    return _this;
  }

  var _proto = FolderListMailBoxUserView.prototype;

  _proto.onBuild = function onBuild(dom) {
    this.oContentVisible = $__WEBPACK_IMPORTED_MODULE_5___default()('.b-content', dom);
    this.oContentScrollable = $__WEBPACK_IMPORTED_MODULE_5___default()('.content', this.oContentVisible);

    var self = this,
        isMobile = Storage_Settings__WEBPACK_IMPORTED_MODULE_17__["appSettingsGet"]('mobile'),
        fSelectFolder = function fSelectFolder(el, event, starred) {
      var isMove = Object(Common_Globals__WEBPACK_IMPORTED_MODULE_10__["moveAction"])();

      if (isMobile) {
        Object(Common_Globals__WEBPACK_IMPORTED_MODULE_10__["leftPanelDisabled"])(true);
      }

      event.preventDefault();

      if (starred) {
        event.stopPropagation();
      }

      var folder = ko__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"].dataFor(el);

      if (folder) {
        if (isMove) {
          Object(Common_Globals__WEBPACK_IMPORTED_MODULE_10__["moveAction"])(false);
          Object(Helper_Apps_User__WEBPACK_IMPORTED_MODULE_18__[/* getApp */ "a"])().moveMessagesToFolder(Stores_User_Folder__WEBPACK_IMPORTED_MODULE_15__[/* default */ "a"].currentFolderFullNameRaw(), Stores_User_Message__WEBPACK_IMPORTED_MODULE_16__[/* default */ "a"].messageListCheckedOrSelectedUidsWithSubMails(), folder.fullNameRaw, false);
        } else {
          if (Common_Enums__WEBPACK_IMPORTED_MODULE_9__["Layout"].NoPreview === Stores_User_Settings__WEBPACK_IMPORTED_MODULE_14__[/* default */ "a"].layout()) {
            Stores_User_Message__WEBPACK_IMPORTED_MODULE_16__[/* default */ "a"].message(null);
          }

          if (folder.fullNameRaw === Stores_User_Folder__WEBPACK_IMPORTED_MODULE_15__[/* default */ "a"].currentFolderFullNameRaw()) {
            Object(Common_Cache__WEBPACK_IMPORTED_MODULE_12__[/* setFolderHash */ "q"])(folder.fullNameRaw, '');
          }

          if (starred) {
            Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_19__["setHash"])(Object(Common_Links__WEBPACK_IMPORTED_MODULE_11__[/* mailBox */ "o"])(folder.fullNameHash, 1, 'is:flagged'));
          } else {
            Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_19__["setHash"])(Object(Common_Links__WEBPACK_IMPORTED_MODULE_11__[/* mailBox */ "o"])(folder.fullNameHash));
          }
        }

        Stores_User_App__WEBPACK_IMPORTED_MODULE_13__[/* default */ "a"].focusedState(Common_Enums__WEBPACK_IMPORTED_MODULE_9__["Focused"].MessageList);
      }
    };

    dom.on('click', '.b-folders .e-item .e-link .e-collapsed-sign', function (event) {
      // eslint-disable-line prefer-arrow-callback
      var folder = ko__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"].dataFor(this); // eslint-disable-line no-invalid-this

      if (folder && event) {
        var collapsed = folder.collapsed();
        Object(Helper_Apps_User__WEBPACK_IMPORTED_MODULE_18__[/* getApp */ "a"])().setExpandedFolder(folder.fullNameHash, collapsed);
        folder.collapsed(!collapsed);
        event.preventDefault();
        event.stopPropagation();
      }
    }).on('click', '.b-folders .e-item .e-link.selectable .inbox-star-icon', function (event) {
      // eslint-disable-line prefer-arrow-callback
      fSelectFolder(this, event, !self.isInboxStarred()); // eslint-disable-line no-invalid-this
    }).on('click', '.b-folders .e-item .e-link.selectable', function (event) {
      // eslint-disable-line prefer-arrow-callback
      fSelectFolder(this, event, false); // eslint-disable-line no-invalid-this
    });
    key__WEBPACK_IMPORTED_MODULE_7___default()('up, down', Common_Enums__WEBPACK_IMPORTED_MODULE_9__["KeyState"].FolderList, function (event, handler) {
      var keyCode = handler && 'up' === handler.shortcut ? Common_Enums__WEBPACK_IMPORTED_MODULE_9__["EventKeyCode"].Up : Common_Enums__WEBPACK_IMPORTED_MODULE_9__["EventKeyCode"].Down,
          $items = $__WEBPACK_IMPORTED_MODULE_5___default()('.b-folders .e-item .e-link:not(.hidden):visible', dom);

      if (event && $items.length) {
        var index = $items.index(_babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_1___default()($items).call($items, '.focused'));

        if (-1 < index) {
          $items.eq(index).removeClass('focused');
        }

        if (Common_Enums__WEBPACK_IMPORTED_MODULE_9__["EventKeyCode"].Up === keyCode && 0 < index) {
          index -= 1;
        } else if (Common_Enums__WEBPACK_IMPORTED_MODULE_9__["EventKeyCode"].Down === keyCode && index < $items.length - 1) {
          index += 1;
        }

        $items.eq(index).addClass('focused');
        self.scrollToFocused();
      }

      return false;
    });
    key__WEBPACK_IMPORTED_MODULE_7___default()('enter', Common_Enums__WEBPACK_IMPORTED_MODULE_9__["KeyState"].FolderList, function () {
      var $items = $__WEBPACK_IMPORTED_MODULE_5___default()('.b-folders .e-item .e-link:not(.hidden).focused', dom);

      if ($items.length && $items[0]) {
        Stores_User_App__WEBPACK_IMPORTED_MODULE_13__[/* default */ "a"].focusedState(Common_Enums__WEBPACK_IMPORTED_MODULE_9__["Focused"].MessageList);
        $items.click();
      }

      return false;
    });
    key__WEBPACK_IMPORTED_MODULE_7___default()('space', Common_Enums__WEBPACK_IMPORTED_MODULE_9__["KeyState"].FolderList, function () {
      var $items = $__WEBPACK_IMPORTED_MODULE_5___default()('.b-folders .e-item .e-link:not(.hidden).focused', dom);

      if ($items.length && $items[0]) {
        var folder = ko__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"].dataFor($items[0]);

        if (folder) {
          var collapsed = folder.collapsed();
          Object(Helper_Apps_User__WEBPACK_IMPORTED_MODULE_18__[/* getApp */ "a"])().setExpandedFolder(folder.fullNameHash, collapsed);
          folder.collapsed(!collapsed);
        }
      }

      return false;
    });
    key__WEBPACK_IMPORTED_MODULE_7___default()('esc, tab, shift+tab, right', Common_Enums__WEBPACK_IMPORTED_MODULE_9__["KeyState"].FolderList, function () {
      Stores_User_App__WEBPACK_IMPORTED_MODULE_13__[/* default */ "a"].focusedState(Common_Enums__WEBPACK_IMPORTED_MODULE_9__["Focused"].MessageList);
      Object(Common_Globals__WEBPACK_IMPORTED_MODULE_10__["moveAction"])(false);
      return false;
    });
    Stores_User_App__WEBPACK_IMPORTED_MODULE_13__[/* default */ "a"].focusedState.subscribe(function (value) {
      $__WEBPACK_IMPORTED_MODULE_5___default()('.b-folders .e-item .e-link.focused', dom).removeClass('focused');

      if (Common_Enums__WEBPACK_IMPORTED_MODULE_9__["Focused"].FolderList === value) {
        $__WEBPACK_IMPORTED_MODULE_5___default()('.b-folders .e-item .e-link.selected', dom).addClass('focused');
      }
    });
  };

  _proto.messagesDropOver = function messagesDropOver(folder) {
    window__WEBPACK_IMPORTED_MODULE_4___default.a.clearTimeout(this.iDropOverTimer);

    if (folder && folder.collapsed()) {
      this.iDropOverTimer = window__WEBPACK_IMPORTED_MODULE_4___default.a.setTimeout(function () {
        folder.collapsed(false);
        Object(Helper_Apps_User__WEBPACK_IMPORTED_MODULE_18__[/* getApp */ "a"])().setExpandedFolder(folder.fullNameHash, true);
        Object(Common_Utils__WEBPACK_IMPORTED_MODULE_8__["windowResize"])();
      }, Common_Enums__WEBPACK_IMPORTED_MODULE_9__["Magics"].Time500ms);
    }
  };

  _proto.messagesDropOut = function messagesDropOut() {
    window__WEBPACK_IMPORTED_MODULE_4___default.a.clearTimeout(this.iDropOverTimer);
  };

  _proto.scrollToFocused = function scrollToFocused() {
    if (!this.oContentVisible || !this.oContentScrollable) {
      return false;
    }

    var offset = 20,
        focused = $__WEBPACK_IMPORTED_MODULE_5___default()('.e-item .e-link.focused', this.oContentScrollable),
        pos = focused.position(),
        visibleHeight = this.oContentVisible.height(),
        focusedHeight = focused.outerHeight();

    if (pos && (0 > pos.top || pos.top + focusedHeight > visibleHeight)) {
      if (0 > pos.top) {
        this.oContentScrollable.scrollTop(this.oContentScrollable.scrollTop() + pos.top - offset);
      } else {
        this.oContentScrollable.scrollTop(this.oContentScrollable.scrollTop() + pos.top - visibleHeight + focusedHeight + offset);
      }

      return true;
    }

    return false;
  }
  /**
   * @param {FolderModel} toFolder
   * @param {{helper:jQuery}} ui
   * @returns {void}
   */
  ;

  _proto.messagesDrop = function messagesDrop(toFolder, ui) {
    if (toFolder && ui && ui.helper) {
      var fromFolderFullNameRaw = ui.helper.data('rl-folder'),
          copy = Common_Globals__WEBPACK_IMPORTED_MODULE_10__["$html"].hasClass('rl-ctrl-key-pressed'),
          uids = ui.helper.data('rl-uids');

      if (Object(Common_Utils__WEBPACK_IMPORTED_MODULE_8__["isNormal"])(fromFolderFullNameRaw) && '' !== fromFolderFullNameRaw && Object(Common_Utils__WEBPACK_IMPORTED_MODULE_8__["isArray"])(uids)) {
        Object(Helper_Apps_User__WEBPACK_IMPORTED_MODULE_18__[/* getApp */ "a"])().moveMessagesToFolder(fromFolderFullNameRaw, uids, toFolder.fullNameRaw, copy);
      }
    }
  };

  _proto.composeClick = function composeClick() {
    if (Storage_Settings__WEBPACK_IMPORTED_MODULE_17__["capa"](Common_Enums__WEBPACK_IMPORTED_MODULE_9__["Capa"].Composer)) {
      Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_19__["showScreenPopup"])(__webpack_require__(/*! View/Popup/Compose */ 122));
    }
  };

  _proto.createFolder = function createFolder() {
    Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_19__["showScreenPopup"])(__webpack_require__(/*! View/Popup/FolderCreate */ 409));
  };

  _proto.configureFolders = function configureFolders() {
    Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_19__["setHash"])(Object(Common_Links__WEBPACK_IMPORTED_MODULE_11__[/* settings */ "z"])('folders'));
  };

  _proto.contactsClick = function contactsClick() {
    if (this.allowContacts) {
      Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_19__["showScreenPopup"])(__webpack_require__(/*! View/Popup/Contacts */ 408));
    }
  };

  return FolderListMailBoxUserView;
}(Knoin_AbstractViewNext__WEBPACK_IMPORTED_MODULE_20__[/* AbstractViewNext */ "a"])) || _class);


/***/ }),
/* 433 */
/*!******************************!*\
  !*** ./dev/Model/Contact.js ***!
  \******************************/
/*! exports provided: ContactModel, default */
/*! exports used: ContactModel */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ContactModel; });
/* unused harmony export default */
/* harmony import */ var core_js_modules_es_array_join__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.array.join */ 74);
/* harmony import */ var core_js_modules_es_array_join__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_join__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _babel_runtime_corejs3_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/esm/inheritsLoose */ 10);
/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! _ */ 3);
/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(___WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var ko__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ko */ 1);
/* harmony import */ var Common_Enums__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! Common/Enums */ 0);
/* harmony import */ var Common_Utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! Common/Utils */ 2);
/* harmony import */ var Common_Links__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! Common/Links */ 15);
/* harmony import */ var Knoin_AbstractModel__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! Knoin/AbstractModel */ 64);









var ContactModel =
/*#__PURE__*/
function (_AbstractModel) {
  Object(_babel_runtime_corejs3_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(ContactModel, _AbstractModel);

  function ContactModel() {
    var _this;

    _this = _AbstractModel.call(this, 'ContactModel') || this;
    _this.idContact = 0;
    _this.display = '';
    _this.properties = [];
    _this.readOnly = false;
    _this.focused = ko__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"].observable(false);
    _this.selected = ko__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"].observable(false);
    _this.checked = ko__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"].observable(false);
    _this.deleted = ko__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"].observable(false);
    return _this;
  }
  /**
   * @returns {Array|null}
   */


  var _proto = ContactModel.prototype;

  _proto.getNameAndEmailHelper = function getNameAndEmailHelper() {
    var name = '',
        email = '';

    if (Object(Common_Utils__WEBPACK_IMPORTED_MODULE_5__["isNonEmptyArray"])(this.properties)) {
      ___WEBPACK_IMPORTED_MODULE_2___default.a.each(this.properties, function (property) {
        if (property) {
          if (Common_Enums__WEBPACK_IMPORTED_MODULE_4__["ContactPropertyType"].FirstName === property[0]) {
            name = Object(Common_Utils__WEBPACK_IMPORTED_MODULE_5__["trim"])(property[1] + ' ' + name);
          } else if (Common_Enums__WEBPACK_IMPORTED_MODULE_4__["ContactPropertyType"].LastName === property[0]) {
            name = Object(Common_Utils__WEBPACK_IMPORTED_MODULE_5__["trim"])(name + ' ' + property[1]);
          } else if ('' === email && Common_Enums__WEBPACK_IMPORTED_MODULE_4__["ContactPropertyType"].Email === property[0]) {
            email = property[1];
          }
        }
      });
    }

    return '' === email ? null : [email, name];
  }
  /**
   * @param {Object} oItem
   * @returns {boolean}
   */
  ;

  _proto.parse = function parse(json) {
    var _this2 = this;

    var result = false;

    if (json && 'Object/Contact' === json['@Object']) {
      this.idContact = Object(Common_Utils__WEBPACK_IMPORTED_MODULE_5__["pInt"])(json.IdContact);
      this.display = Object(Common_Utils__WEBPACK_IMPORTED_MODULE_5__["pString"])(json.Display);
      this.readOnly = !!json.ReadOnly;

      if (Object(Common_Utils__WEBPACK_IMPORTED_MODULE_5__["isNonEmptyArray"])(json.Properties)) {
        ___WEBPACK_IMPORTED_MODULE_2___default.a.each(json.Properties, function (property) {
          if (property && property.Type && Object(Common_Utils__WEBPACK_IMPORTED_MODULE_5__["isNormal"])(property.Value) && Object(Common_Utils__WEBPACK_IMPORTED_MODULE_5__["isNormal"])(property.TypeStr)) {
            _this2.properties.push([Object(Common_Utils__WEBPACK_IMPORTED_MODULE_5__["pInt"])(property.Type), Object(Common_Utils__WEBPACK_IMPORTED_MODULE_5__["pString"])(property.Value), Object(Common_Utils__WEBPACK_IMPORTED_MODULE_5__["pString"])(property.TypeStr)]);
          }
        });
      }

      result = true;
    }

    return result;
  }
  /**
   * @returns {string}
   */
  ;

  _proto.srcAttr = function srcAttr() {
    return Object(Common_Links__WEBPACK_IMPORTED_MODULE_6__[/* emptyContactPic */ "j"])();
  }
  /**
   * @returns {string}
   */
  ;

  _proto.generateUid = function generateUid() {
    return Object(Common_Utils__WEBPACK_IMPORTED_MODULE_5__["pString"])(this.idContact);
  }
  /**
   * @return string
   */
  ;

  _proto.lineAsCss = function lineAsCss() {
    var result = [];

    if (this.deleted()) {
      result.push('deleted');
    }

    if (this.selected()) {
      result.push('selected');
    }

    if (this.checked()) {
      result.push('checked');
    }

    if (this.focused()) {
      result.push('focused');
    }

    return result.join(' ');
  };

  return ContactModel;
}(Knoin_AbstractModel__WEBPACK_IMPORTED_MODULE_7__[/* AbstractModel */ "a"]);



/***/ }),
/* 434 */
/*!**********************************************!*\
  !*** ./dev/View/User/MailBox/MessageList.js ***!
  \**********************************************/
/*! exports provided: MessageListMailBoxUserView, default */
/*! exports used: MessageListMailBoxUserView */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return MessageListMailBoxUserView; });
/* unused harmony export default */
/* harmony import */ var core_js_modules_web_timers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/web.timers */ 67);
/* harmony import */ var core_js_modules_web_timers__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_timers__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor */ 19);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/filter */ 34);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/map */ 18);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/find */ 12);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_bind__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/bind */ 26);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_bind__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_bind__WEBPACK_IMPORTED_MODULE_5__);
/* harmony import */ var _babel_runtime_corejs3_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/esm/assertThisInitialized */ 33);
/* harmony import */ var _babel_runtime_corejs3_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/esm/inheritsLoose */ 10);
/* harmony import */ var _babel_runtime_corejs3_helpers_esm_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/esm/applyDecoratedDescriptor */ 20);
/* harmony import */ var window__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! window */ 4);
/* harmony import */ var window__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(window__WEBPACK_IMPORTED_MODULE_9__);
/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! _ */ 3);
/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(___WEBPACK_IMPORTED_MODULE_10__);
/* harmony import */ var $__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! $ */ 8);
/* harmony import */ var $__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n($__WEBPACK_IMPORTED_MODULE_11__);
/* harmony import */ var ko__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ko */ 1);
/* harmony import */ var key__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! key */ 21);
/* harmony import */ var key__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(key__WEBPACK_IMPORTED_MODULE_13__);
/* harmony import */ var Jua__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! Jua */ 175);
/* harmony import */ var Jua__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(Jua__WEBPACK_IMPORTED_MODULE_14__);
/* harmony import */ var ifvisible__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ifvisible */ 223);
/* harmony import */ var ifvisible__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(ifvisible__WEBPACK_IMPORTED_MODULE_15__);
/* harmony import */ var Common_Enums__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! Common/Enums */ 0);
/* harmony import */ var Common_Consts__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! Common/Consts */ 25);
/* harmony import */ var Common_Globals__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! Common/Globals */ 6);
/* harmony import */ var Common_Utils__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! Common/Utils */ 2);
/* harmony import */ var Common_Links__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! Common/Links */ 15);
/* harmony import */ var Common_Selector__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! Common/Selector */ 277);
/* harmony import */ var Common_Events__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! Common/Events */ 24);
/* harmony import */ var Common_Translator__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! Common/Translator */ 9);
/* harmony import */ var Common_Cache__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! Common/Cache */ 14);
/* harmony import */ var Stores_User_App__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! Stores/User/App */ 31);
/* harmony import */ var Stores_User_Quota__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! Stores/User/Quota */ 222);
/* harmony import */ var Stores_User_Settings__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! Stores/User/Settings */ 38);
/* harmony import */ var Stores_User_Folder__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! Stores/User/Folder */ 11);
/* harmony import */ var Stores_User_Message__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! Stores/User/Message */ 13);
/* harmony import */ var Storage_Settings__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! Storage/Settings */ 5);
/* harmony import */ var Remote_User_Ajax__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! Remote/User/Ajax */ 16);
/* harmony import */ var Helper_Apps_User__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! Helper/Apps/User */ 22);
/* harmony import */ var Knoin_Knoin__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! Knoin/Knoin */ 7);
/* harmony import */ var Knoin_AbstractViewNext__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! Knoin/AbstractViewNext */ 28);










var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11, _class, _class2;




























var canBeMovedHelper = function canBeMovedHelper(self) {
  return self.canBeMoved();
};

var MessageListMailBoxUserView = (_dec = Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_33__["view"])({
  name: 'View/User/MailBox/MessageList',
  type: Knoin_Knoin__WEBPACK_IMPORTED_MODULE_33__["ViewType"].Right,
  templateID: 'MailMessageList'
}), _dec2 = Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_33__["command"])(), _dec3 = Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_33__["command"])(), _dec4 = Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_33__["command"])(canBeMovedHelper), _dec5 = Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_33__["command"])(canBeMovedHelper), _dec6 = Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_33__["command"])(canBeMovedHelper), _dec7 = Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_33__["command"])(canBeMovedHelper), _dec8 = Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_33__["command"])(canBeMovedHelper), _dec9 = Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_33__["command"])(canBeMovedHelper), _dec10 = Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_33__["command"])(canBeMovedHelper), _dec11 = Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_33__["command"])(canBeMovedHelper), _dec(_class = (_class2 =
/*#__PURE__*/
function (_AbstractViewNext) {
  Object(_babel_runtime_corejs3_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"])(MessageListMailBoxUserView, _AbstractViewNext);

  function MessageListMailBoxUserView() {
    var _this;

    _this = _AbstractViewNext.call(this) || this;
    _this.sLastUid = null;
    _this.bPrefetch = false;
    _this.emptySubjectValue = '';
    _this.iGoToUpUpOrDownDownTimeout = 0;
    _this.mobile = !!Storage_Settings__WEBPACK_IMPORTED_MODULE_30__["appSettingsGet"]('mobile');
    _this.newMoveToFolder = Stores_User_App__WEBPACK_IMPORTED_MODULE_25__[/* default */ "a"].newMoveToFolder;
    _this.allowReload = !!Storage_Settings__WEBPACK_IMPORTED_MODULE_30__["capa"](Common_Enums__WEBPACK_IMPORTED_MODULE_16__["Capa"].Reload);
    _this.allowSearch = !!Storage_Settings__WEBPACK_IMPORTED_MODULE_30__["capa"](Common_Enums__WEBPACK_IMPORTED_MODULE_16__["Capa"].Search);
    _this.allowSearchAdv = !!Storage_Settings__WEBPACK_IMPORTED_MODULE_30__["capa"](Common_Enums__WEBPACK_IMPORTED_MODULE_16__["Capa"].SearchAdv);
    _this.allowComposer = !!Storage_Settings__WEBPACK_IMPORTED_MODULE_30__["capa"](Common_Enums__WEBPACK_IMPORTED_MODULE_16__["Capa"].Composer);
    _this.allowMessageListActions = !!Storage_Settings__WEBPACK_IMPORTED_MODULE_30__["capa"](Common_Enums__WEBPACK_IMPORTED_MODULE_16__["Capa"].MessageListActions);
    _this.allowDangerousActions = !!Storage_Settings__WEBPACK_IMPORTED_MODULE_30__["capa"](Common_Enums__WEBPACK_IMPORTED_MODULE_16__["Capa"].DangerousActions);
    _this.allowFolders = !!Storage_Settings__WEBPACK_IMPORTED_MODULE_30__["capa"](Common_Enums__WEBPACK_IMPORTED_MODULE_16__["Capa"].Folders);
    _this.popupVisibility = Common_Globals__WEBPACK_IMPORTED_MODULE_18__["popupVisibility"];
    _this.message = Stores_User_Message__WEBPACK_IMPORTED_MODULE_29__[/* default */ "a"].message;
    _this.messageList = Stores_User_Message__WEBPACK_IMPORTED_MODULE_29__[/* default */ "a"].messageList;
    _this.messageListDisableAutoSelect = Stores_User_Message__WEBPACK_IMPORTED_MODULE_29__[/* default */ "a"].messageListDisableAutoSelect;
    _this.folderList = Stores_User_Folder__WEBPACK_IMPORTED_MODULE_28__[/* default */ "a"].folderList;
    _this.composeInEdit = Stores_User_App__WEBPACK_IMPORTED_MODULE_25__[/* default */ "a"].composeInEdit;
    _this.leftPanelDisabled = Common_Globals__WEBPACK_IMPORTED_MODULE_18__["leftPanelDisabled"];
    _this.selectorMessageSelected = Stores_User_Message__WEBPACK_IMPORTED_MODULE_29__[/* default */ "a"].selectorMessageSelected;
    _this.selectorMessageFocused = Stores_User_Message__WEBPACK_IMPORTED_MODULE_29__[/* default */ "a"].selectorMessageFocused;
    _this.isMessageSelected = Stores_User_Message__WEBPACK_IMPORTED_MODULE_29__[/* default */ "a"].isMessageSelected;
    _this.messageListSearch = Stores_User_Message__WEBPACK_IMPORTED_MODULE_29__[/* default */ "a"].messageListSearch;
    _this.messageListThreadUid = Stores_User_Message__WEBPACK_IMPORTED_MODULE_29__[/* default */ "a"].messageListThreadUid;
    _this.messageListError = Stores_User_Message__WEBPACK_IMPORTED_MODULE_29__[/* default */ "a"].messageListError;
    _this.folderMenuForMove = Stores_User_Folder__WEBPACK_IMPORTED_MODULE_28__[/* default */ "a"].folderMenuForMove;
    _this.useCheckboxesInList = Stores_User_Settings__WEBPACK_IMPORTED_MODULE_27__[/* default */ "a"].useCheckboxesInList;
    _this.mainMessageListSearch = Stores_User_Message__WEBPACK_IMPORTED_MODULE_29__[/* default */ "a"].mainMessageListSearch;
    _this.messageListEndFolder = Stores_User_Message__WEBPACK_IMPORTED_MODULE_29__[/* default */ "a"].messageListEndFolder;
    _this.messageListEndThreadUid = Stores_User_Message__WEBPACK_IMPORTED_MODULE_29__[/* default */ "a"].messageListEndThreadUid;
    _this.messageListChecked = Stores_User_Message__WEBPACK_IMPORTED_MODULE_29__[/* default */ "a"].messageListChecked;
    _this.messageListCheckedOrSelected = Stores_User_Message__WEBPACK_IMPORTED_MODULE_29__[/* default */ "a"].messageListCheckedOrSelected;
    _this.messageListCheckedOrSelectedUidsWithSubMails = Stores_User_Message__WEBPACK_IMPORTED_MODULE_29__[/* default */ "a"].messageListCheckedOrSelectedUidsWithSubMails;
    _this.messageListCompleteLoadingThrottle = Stores_User_Message__WEBPACK_IMPORTED_MODULE_29__[/* default */ "a"].messageListCompleteLoadingThrottle;
    _this.messageListCompleteLoadingThrottleForAnimation = Stores_User_Message__WEBPACK_IMPORTED_MODULE_29__[/* default */ "a"].messageListCompleteLoadingThrottleForAnimation;
    Object(Common_Translator__WEBPACK_IMPORTED_MODULE_23__["initOnStartOrLangChange"])(function () {
      _this.emptySubjectValue = Object(Common_Translator__WEBPACK_IMPORTED_MODULE_23__["i18n"])('MESSAGE_LIST/EMPTY_SUBJECT_TEXT');
    });
    _this.userQuota = Stores_User_Quota__WEBPACK_IMPORTED_MODULE_26__[/* default */ "a"].quota;
    _this.userUsageSize = Stores_User_Quota__WEBPACK_IMPORTED_MODULE_26__[/* default */ "a"].usage;
    _this.userUsageProc = Stores_User_Quota__WEBPACK_IMPORTED_MODULE_26__[/* default */ "a"].percentage;
    _this.moveDropdownTrigger = ko__WEBPACK_IMPORTED_MODULE_12__[/* default */ "a"].observable(false);
    _this.moreDropdownTrigger = ko__WEBPACK_IMPORTED_MODULE_12__[/* default */ "a"].observable(false); // append drag and drop

    _this.dragOver = ko__WEBPACK_IMPORTED_MODULE_12__[/* default */ "a"].observable(false).extend({
      'throttle': 1
    });
    _this.dragOverEnter = ko__WEBPACK_IMPORTED_MODULE_12__[/* default */ "a"].observable(false).extend({
      'throttle': 1
    });
    _this.dragOverArea = ko__WEBPACK_IMPORTED_MODULE_12__[/* default */ "a"].observable(null);
    _this.dragOverBodyArea = ko__WEBPACK_IMPORTED_MODULE_12__[/* default */ "a"].observable(null);
    _this.messageListItemTemplate = ko__WEBPACK_IMPORTED_MODULE_12__[/* default */ "a"].computed(function () {
      return _this.mobile || Common_Enums__WEBPACK_IMPORTED_MODULE_16__["Layout"].SidePreview === Stores_User_Settings__WEBPACK_IMPORTED_MODULE_27__[/* default */ "a"].layout() ? 'MailMessageListItem' : 'MailMessageListItemNoPreviewPane';
    });
    _this.messageListSearchDesc = ko__WEBPACK_IMPORTED_MODULE_12__[/* default */ "a"].computed(function () {
      var value = Stores_User_Message__WEBPACK_IMPORTED_MODULE_29__[/* default */ "a"].messageListEndSearch();
      return '' === value ? '' : Object(Common_Translator__WEBPACK_IMPORTED_MODULE_23__["i18n"])('MESSAGE_LIST/SEARCH_RESULT_FOR', {
        'SEARCH': value
      });
    });
    _this.messageListPagenator = ko__WEBPACK_IMPORTED_MODULE_12__[/* default */ "a"].computed(Object(Common_Utils__WEBPACK_IMPORTED_MODULE_19__["computedPagenatorHelper"])(Stores_User_Message__WEBPACK_IMPORTED_MODULE_29__[/* default */ "a"].messageListPage, Stores_User_Message__WEBPACK_IMPORTED_MODULE_29__[/* default */ "a"].messageListPageCount));
    _this.checkAll = ko__WEBPACK_IMPORTED_MODULE_12__[/* default */ "a"].computed({
      read: function read() {
        return 0 < Stores_User_Message__WEBPACK_IMPORTED_MODULE_29__[/* default */ "a"].messageListChecked().length;
      },
      write: function write(value) {
        value = !!value;

        ___WEBPACK_IMPORTED_MODULE_10___default.a.each(Stores_User_Message__WEBPACK_IMPORTED_MODULE_29__[/* default */ "a"].messageList(), function (message) {
          message.checked(value);
        });
      }
    });
    _this.inputMessageListSearchFocus = ko__WEBPACK_IMPORTED_MODULE_12__[/* default */ "a"].observable(false);
    _this.sLastSearchValue = '';
    _this.inputProxyMessageListSearch = ko__WEBPACK_IMPORTED_MODULE_12__[/* default */ "a"].computed({
      read: _this.mainMessageListSearch,
      write: function write(value) {
        _this.sLastSearchValue = value;
      }
    });
    _this.isIncompleteChecked = ko__WEBPACK_IMPORTED_MODULE_12__[/* default */ "a"].computed(function () {
      var m = Stores_User_Message__WEBPACK_IMPORTED_MODULE_29__[/* default */ "a"].messageList().length,
          c = Stores_User_Message__WEBPACK_IMPORTED_MODULE_29__[/* default */ "a"].messageListChecked().length;
      return 0 < m && 0 < c && m > c;
    });
    _this.hasMessages = ko__WEBPACK_IMPORTED_MODULE_12__[/* default */ "a"].computed(function () {
      return 0 < _this.messageList().length;
    });
    _this.hasCheckedOrSelectedLines = ko__WEBPACK_IMPORTED_MODULE_12__[/* default */ "a"].computed(function () {
      return 0 < _this.messageListCheckedOrSelected().length;
    });
    _this.isSpamFolder = ko__WEBPACK_IMPORTED_MODULE_12__[/* default */ "a"].computed(function () {
      return Stores_User_Folder__WEBPACK_IMPORTED_MODULE_28__[/* default */ "a"].spamFolder() === _this.messageListEndFolder() && '' !== Stores_User_Folder__WEBPACK_IMPORTED_MODULE_28__[/* default */ "a"].spamFolder();
    });
    _this.isSpamDisabled = ko__WEBPACK_IMPORTED_MODULE_12__[/* default */ "a"].computed(function () {
      return Common_Consts__WEBPACK_IMPORTED_MODULE_17__[/* UNUSED_OPTION_VALUE */ "r"] === Stores_User_Folder__WEBPACK_IMPORTED_MODULE_28__[/* default */ "a"].spamFolder();
    });
    _this.isTrashFolder = ko__WEBPACK_IMPORTED_MODULE_12__[/* default */ "a"].computed(function () {
      return Stores_User_Folder__WEBPACK_IMPORTED_MODULE_28__[/* default */ "a"].trashFolder() === _this.messageListEndFolder() && '' !== Stores_User_Folder__WEBPACK_IMPORTED_MODULE_28__[/* default */ "a"].trashFolder();
    });
    _this.isDraftFolder = ko__WEBPACK_IMPORTED_MODULE_12__[/* default */ "a"].computed(function () {
      return Stores_User_Folder__WEBPACK_IMPORTED_MODULE_28__[/* default */ "a"].draftFolder() === _this.messageListEndFolder() && '' !== Stores_User_Folder__WEBPACK_IMPORTED_MODULE_28__[/* default */ "a"].draftFolder();
    });
    _this.isSentFolder = ko__WEBPACK_IMPORTED_MODULE_12__[/* default */ "a"].computed(function () {
      return Stores_User_Folder__WEBPACK_IMPORTED_MODULE_28__[/* default */ "a"].sentFolder() === _this.messageListEndFolder() && '' !== Stores_User_Folder__WEBPACK_IMPORTED_MODULE_28__[/* default */ "a"].sentFolder();
    });
    _this.isArchiveFolder = ko__WEBPACK_IMPORTED_MODULE_12__[/* default */ "a"].computed(function () {
      return Stores_User_Folder__WEBPACK_IMPORTED_MODULE_28__[/* default */ "a"].archiveFolder() === _this.messageListEndFolder() && '' !== Stores_User_Folder__WEBPACK_IMPORTED_MODULE_28__[/* default */ "a"].archiveFolder();
    });
    _this.isArchiveDisabled = ko__WEBPACK_IMPORTED_MODULE_12__[/* default */ "a"].computed(function () {
      return Common_Consts__WEBPACK_IMPORTED_MODULE_17__[/* UNUSED_OPTION_VALUE */ "r"] === Stores_User_Folder__WEBPACK_IMPORTED_MODULE_28__[/* default */ "a"].archiveFolder();
    });
    _this.isArchiveVisible = ko__WEBPACK_IMPORTED_MODULE_12__[/* default */ "a"].computed(function () {
      return !_this.isArchiveFolder() && !_this.isArchiveDisabled() && !_this.isDraftFolder();
    });
    _this.isSpamVisible = ko__WEBPACK_IMPORTED_MODULE_12__[/* default */ "a"].computed(function () {
      return !_this.isSpamFolder() && !_this.isSpamDisabled() && !_this.isDraftFolder() && !_this.isSentFolder();
    });
    _this.isUnSpamVisible = ko__WEBPACK_IMPORTED_MODULE_12__[/* default */ "a"].computed(function () {
      return _this.isSpamFolder() && !_this.isSpamDisabled() && !_this.isDraftFolder() && !_this.isSentFolder();
    });
    _this.mobileCheckedStateShow = ko__WEBPACK_IMPORTED_MODULE_12__[/* default */ "a"].computed(function () {
      var checked = 0 < _this.messageListChecked().length;

      return _this.mobile ? checked : true;
    });
    _this.mobileCheckedStateHide = ko__WEBPACK_IMPORTED_MODULE_12__[/* default */ "a"].computed(function () {
      var checked = 0 < _this.messageListChecked().length;

      return _this.mobile ? !checked : true;
    });
    _this.messageListFocused = ko__WEBPACK_IMPORTED_MODULE_12__[/* default */ "a"].computed(function () {
      return Common_Enums__WEBPACK_IMPORTED_MODULE_16__["Focused"].MessageList === Stores_User_App__WEBPACK_IMPORTED_MODULE_25__[/* default */ "a"].focusedState();
    });
    _this.canBeMoved = _this.hasCheckedOrSelectedLines;
    _this.quotaTooltip = _babel_runtime_corejs3_core_js_stable_instance_bind__WEBPACK_IMPORTED_MODULE_5___default()(___WEBPACK_IMPORTED_MODULE_10___default.a).call(___WEBPACK_IMPORTED_MODULE_10___default.a, _this.quotaTooltip, Object(_babel_runtime_corejs3_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"])(_this));
    _this.selector = new Common_Selector__WEBPACK_IMPORTED_MODULE_21__[/* Selector */ "a"](_this.messageList, _this.selectorMessageSelected, _this.selectorMessageFocused, '.messageListItem .actionHandle', '.messageListItem.selected', '.messageListItem .checkboxMessage', '.messageListItem.focused');

    _this.selector.on('onItemSelect', function (message) {
      Stores_User_Message__WEBPACK_IMPORTED_MODULE_29__[/* default */ "a"].selectMessage(message);
    });

    _this.selector.on('onItemGetUid', function (message) {
      return message ? message.generateUid() : '';
    });

    _this.selector.on('onAutoSelect', function () {
      return _this.useAutoSelect();
    });

    _this.selector.on('onUpUpOrDownDown', function (v) {
      _this.goToUpUpOrDownDown(v);
    });

    Common_Events__WEBPACK_IMPORTED_MODULE_22__[/* sub */ "b"]('mailbox.message-list.selector.go-down', function (select) {
      _this.selector.goDown(select);
    });
    Common_Events__WEBPACK_IMPORTED_MODULE_22__[/* sub */ "b"]('mailbox.message-list.selector.go-up', function (select) {
      _this.selector.goUp(select);
    });
    Common_Events__WEBPACK_IMPORTED_MODULE_22__[/* sub */ "b"]('mailbox.message.show', function (sFolder, sUid) {
      var message = _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_4___default()(___WEBPACK_IMPORTED_MODULE_10___default.a).call(___WEBPACK_IMPORTED_MODULE_10___default.a, _this.messageList(), function (item) {
        return item && sFolder === item.folderFullNameRaw && sUid === item.uid;
      });

      if ('INBOX' === sFolder) {
        Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_33__["setHash"])(Object(Common_Links__WEBPACK_IMPORTED_MODULE_20__[/* mailBox */ "o"])(sFolder, 1));
      }

      if (message) {
        _this.selector.selectMessageItem(message);
      } else {
        if ('INBOX' !== sFolder) {
          Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_33__["setHash"])(Object(Common_Links__WEBPACK_IMPORTED_MODULE_20__[/* mailBox */ "o"])(sFolder, 1));
        }

        Stores_User_Message__WEBPACK_IMPORTED_MODULE_29__[/* default */ "a"].selectMessageByFolderAndUid(sFolder, sUid);
      }
    });
    Stores_User_Message__WEBPACK_IMPORTED_MODULE_29__[/* default */ "a"].messageListEndHash.subscribe(function () {
      _this.selector.scrollToTop();
    });
    return _this;
  }

  var _proto = MessageListMailBoxUserView.prototype;

  _proto.clearCommand = function clearCommand() {
    if (Storage_Settings__WEBPACK_IMPORTED_MODULE_30__["capa"](Common_Enums__WEBPACK_IMPORTED_MODULE_16__["Capa"].DangerousActions)) {
      Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_33__["showScreenPopup"])(__webpack_require__(/*! View/Popup/FolderClear */ 527), [Stores_User_Folder__WEBPACK_IMPORTED_MODULE_28__[/* default */ "a"].currentFolder()]);
    }
  };

  _proto.reloadCommand = function reloadCommand() {
    if (!Stores_User_Message__WEBPACK_IMPORTED_MODULE_29__[/* default */ "a"].messageListCompleteLoadingThrottleForAnimation() && this.allowReload) {
      Object(Helper_Apps_User__WEBPACK_IMPORTED_MODULE_32__[/* getApp */ "a"])().reloadMessageList(false, true);
    }
  };

  _proto.multyForwardCommand = function multyForwardCommand() {
    if (Storage_Settings__WEBPACK_IMPORTED_MODULE_30__["capa"](Common_Enums__WEBPACK_IMPORTED_MODULE_16__["Capa"].Composer)) {
      Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_33__["showScreenPopup"])(__webpack_require__(/*! View/Popup/Compose */ 122), [Common_Enums__WEBPACK_IMPORTED_MODULE_16__["ComposeType"].ForwardAsAttachment, Stores_User_Message__WEBPACK_IMPORTED_MODULE_29__[/* default */ "a"].messageListCheckedOrSelected()]);
    }
  };

  _proto.deleteWithoutMoveCommand = function deleteWithoutMoveCommand() {
    if (Storage_Settings__WEBPACK_IMPORTED_MODULE_30__["capa"](Common_Enums__WEBPACK_IMPORTED_MODULE_16__["Capa"].DangerousActions)) {
      Object(Helper_Apps_User__WEBPACK_IMPORTED_MODULE_32__[/* getApp */ "a"])().deleteMessagesFromFolder(Common_Enums__WEBPACK_IMPORTED_MODULE_16__["FolderType"].Trash, Stores_User_Folder__WEBPACK_IMPORTED_MODULE_28__[/* default */ "a"].currentFolderFullNameRaw(), Stores_User_Message__WEBPACK_IMPORTED_MODULE_29__[/* default */ "a"].messageListCheckedOrSelectedUidsWithSubMails(), false);
    }
  };

  _proto.deleteCommand = function deleteCommand() {
    Object(Helper_Apps_User__WEBPACK_IMPORTED_MODULE_32__[/* getApp */ "a"])().deleteMessagesFromFolder(Common_Enums__WEBPACK_IMPORTED_MODULE_16__["FolderType"].Trash, Stores_User_Folder__WEBPACK_IMPORTED_MODULE_28__[/* default */ "a"].currentFolderFullNameRaw(), Stores_User_Message__WEBPACK_IMPORTED_MODULE_29__[/* default */ "a"].messageListCheckedOrSelectedUidsWithSubMails(), true);
  };

  _proto.archiveCommand = function archiveCommand() {
    Object(Helper_Apps_User__WEBPACK_IMPORTED_MODULE_32__[/* getApp */ "a"])().deleteMessagesFromFolder(Common_Enums__WEBPACK_IMPORTED_MODULE_16__["FolderType"].Archive, Stores_User_Folder__WEBPACK_IMPORTED_MODULE_28__[/* default */ "a"].currentFolderFullNameRaw(), Stores_User_Message__WEBPACK_IMPORTED_MODULE_29__[/* default */ "a"].messageListCheckedOrSelectedUidsWithSubMails(), true);
  };

  _proto.spamCommand = function spamCommand() {
    Object(Helper_Apps_User__WEBPACK_IMPORTED_MODULE_32__[/* getApp */ "a"])().deleteMessagesFromFolder(Common_Enums__WEBPACK_IMPORTED_MODULE_16__["FolderType"].Spam, Stores_User_Folder__WEBPACK_IMPORTED_MODULE_28__[/* default */ "a"].currentFolderFullNameRaw(), Stores_User_Message__WEBPACK_IMPORTED_MODULE_29__[/* default */ "a"].messageListCheckedOrSelectedUidsWithSubMails(), true);
  };

  _proto.notSpamCommand = function notSpamCommand() {
    Object(Helper_Apps_User__WEBPACK_IMPORTED_MODULE_32__[/* getApp */ "a"])().deleteMessagesFromFolder(Common_Enums__WEBPACK_IMPORTED_MODULE_16__["FolderType"].NotSpam, Stores_User_Folder__WEBPACK_IMPORTED_MODULE_28__[/* default */ "a"].currentFolderFullNameRaw(), Stores_User_Message__WEBPACK_IMPORTED_MODULE_29__[/* default */ "a"].messageListCheckedOrSelectedUidsWithSubMails(), true);
  };

  _proto.moveCommand = function moveCommand() {} // eslint-disable-line no-empty-function
  ;

  _proto.moveNewCommand = function moveNewCommand(vm, event) {
    if (this.newMoveToFolder() && this.mobileCheckedStateShow()) {
      if (vm && event && event.preventDefault) {
        event.preventDefault();

        if (event.stopPropagation) {
          event.stopPropagation();
        }
      }

      if (Object(Common_Globals__WEBPACK_IMPORTED_MODULE_18__["moveAction"])()) {
        Stores_User_App__WEBPACK_IMPORTED_MODULE_25__[/* default */ "a"].focusedState(Common_Enums__WEBPACK_IMPORTED_MODULE_16__["Focused"].MessageList);
        Object(Common_Globals__WEBPACK_IMPORTED_MODULE_18__["moveAction"])(false);
      } else {
        Stores_User_App__WEBPACK_IMPORTED_MODULE_25__[/* default */ "a"].focusedState(Common_Enums__WEBPACK_IMPORTED_MODULE_16__["Focused"].FolderList);
        Object(Common_Globals__WEBPACK_IMPORTED_MODULE_18__["moveAction"])(true);
      }
    }
  };

  _proto.hideLeft = function hideLeft(item, event) {
    event.preventDefault();
    event.stopPropagation();
    Object(Common_Globals__WEBPACK_IMPORTED_MODULE_18__["leftPanelDisabled"])(true);
  };

  _proto.showLeft = function showLeft(item, event) {
    event.preventDefault();
    event.stopPropagation();
    Object(Common_Globals__WEBPACK_IMPORTED_MODULE_18__["leftPanelDisabled"])(false);
  };

  _proto.composeClick = function composeClick() {
    if (Storage_Settings__WEBPACK_IMPORTED_MODULE_30__["capa"](Common_Enums__WEBPACK_IMPORTED_MODULE_16__["Capa"].Composer)) {
      Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_33__["showScreenPopup"])(__webpack_require__(/*! View/Popup/Compose */ 122));
    }
  };

  _proto.goToUpUpOrDownDown = function goToUpUpOrDownDown(up) {
    var _this2 = this;

    if (0 < this.messageListChecked().length) {
      return false;
    }

    window__WEBPACK_IMPORTED_MODULE_9___default.a.clearTimeout(this.iGoToUpUpOrDownDownTimeout);
    this.iGoToUpUpOrDownDownTimeout = window__WEBPACK_IMPORTED_MODULE_9___default.a.setTimeout(function () {
      var prev = null,
          next = null,
          temp = null,
          current = null;

      _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_4___default()(___WEBPACK_IMPORTED_MODULE_10___default.a).call(___WEBPACK_IMPORTED_MODULE_10___default.a, _this2.messageListPagenator(), function (item) {
        if (item) {
          if (current) {
            next = item;
          }

          if (item.current) {
            current = item;
            prev = temp;
          }

          if (next) {
            return true;
          }

          temp = item;
        }

        return false;
      });

      if (Common_Enums__WEBPACK_IMPORTED_MODULE_16__["Layout"].NoPreview === Stores_User_Settings__WEBPACK_IMPORTED_MODULE_27__[/* default */ "a"].layout() && !_this2.message()) {
        _this2.selector.iFocusedNextHelper = up ? -1 : 1;
      } else {
        _this2.selector.iSelectNextHelper = up ? -1 : 1;
      }

      if (up ? prev : next) {
        _this2.selector.unselect();

        _this2.gotoPage(up ? prev : next);
      }
    }, Common_Enums__WEBPACK_IMPORTED_MODULE_16__["Magics"].Time350ms);
    return true;
  };

  _proto.useAutoSelect = function useAutoSelect() {
    if (this.messageListDisableAutoSelect()) {
      return false;
    }

    if (/is:unseen/.test(this.mainMessageListSearch())) {
      return false;
    }

    return Common_Enums__WEBPACK_IMPORTED_MODULE_16__["Layout"].NoPreview !== Stores_User_Settings__WEBPACK_IMPORTED_MODULE_27__[/* default */ "a"].layout();
  };

  _proto.searchEnterAction = function searchEnterAction() {
    this.mainMessageListSearch(this.sLastSearchValue);
    this.inputMessageListSearchFocus(false);
  }
  /**
   * @returns {string}
   */
  ;

  _proto.printableMessageCountForDeletion = function printableMessageCountForDeletion() {
    var cnt = this.messageListCheckedOrSelectedUidsWithSubMails().length;
    return 1 < cnt ? ' (' + (100 > cnt ? cnt : '99+') + ')' : ''; // eslint-disable-line no-magic-numbers
  };

  _proto.cancelSearch = function cancelSearch() {
    this.mainMessageListSearch('');
    this.inputMessageListSearchFocus(false);
  };

  _proto.cancelThreadUid = function cancelThreadUid() {
    Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_33__["setHash"])(Object(Common_Links__WEBPACK_IMPORTED_MODULE_20__[/* mailBox */ "o"])(Stores_User_Folder__WEBPACK_IMPORTED_MODULE_28__[/* default */ "a"].currentFolderFullNameHash(), Stores_User_Message__WEBPACK_IMPORTED_MODULE_29__[/* default */ "a"].messageListPageBeforeThread(), Stores_User_Message__WEBPACK_IMPORTED_MODULE_29__[/* default */ "a"].messageListSearch()));
  }
  /**
   * @param {string} sToFolderFullNameRaw
   * @param {boolean} bCopy
   * @returns {boolean}
   */
  ;

  _proto.moveSelectedMessagesToFolder = function moveSelectedMessagesToFolder(sToFolderFullNameRaw, bCopy) {
    if (this.canBeMoved()) {
      Object(Helper_Apps_User__WEBPACK_IMPORTED_MODULE_32__[/* getApp */ "a"])().moveMessagesToFolder(Stores_User_Folder__WEBPACK_IMPORTED_MODULE_28__[/* default */ "a"].currentFolderFullNameRaw(), Stores_User_Message__WEBPACK_IMPORTED_MODULE_29__[/* default */ "a"].messageListCheckedOrSelectedUidsWithSubMails(), sToFolderFullNameRaw, bCopy);
    }

    return false;
  };

  _proto.dragAndDronHelper = function dragAndDronHelper(oMessageListItem) {
    if (oMessageListItem) {
      oMessageListItem.checked(true);
    }

    var el = Object(Common_Utils__WEBPACK_IMPORTED_MODULE_19__["draggablePlace"])(),
        updateUidsInfo = function updateUidsInfo() {
      var uids = Stores_User_Message__WEBPACK_IMPORTED_MODULE_29__[/* default */ "a"].messageListCheckedOrSelectedUidsWithSubMails();
      el.data('rl-uids', uids);

      _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_4___default()(el).call(el, '.text').text('' + uids.length);
    };

    el.data('rl-folder', Stores_User_Folder__WEBPACK_IMPORTED_MODULE_28__[/* default */ "a"].currentFolderFullNameRaw());
    updateUidsInfo();

    ___WEBPACK_IMPORTED_MODULE_10___default.a.defer(updateUidsInfo);

    return el;
  }
  /**
   * @param {string} sFolderFullNameRaw
   * @param {number} iSetAction
   * @param {Array=} aMessages = null
   * @returns {void}
   */
  ;

  _proto.setAction = function setAction(sFolderFullNameRaw, iSetAction, aMessages) {
    Object(Helper_Apps_User__WEBPACK_IMPORTED_MODULE_32__[/* getApp */ "a"])().messageListAction(sFolderFullNameRaw, iSetAction, aMessages);
  }
  /**
   * @param {string} sFolderFullNameRaw
   * @param {number} iSetAction
   * @param {string} sThreadUid = ''
   * @returns {void}
   */
  ;

  _proto.setActionForAll = function setActionForAll(sFolderFullNameRaw, iSetAction, sThreadUid) {
    if (sThreadUid === void 0) {
      sThreadUid = '';
    }

    if ('' !== sFolderFullNameRaw) {
      var cnt = 0;
      var uids = [];
      var folder = Object(Common_Cache__WEBPACK_IMPORTED_MODULE_24__[/* getFolderFromCacheList */ "e"])(sFolderFullNameRaw);

      if (folder) {
        switch (iSetAction) {
          case Common_Enums__WEBPACK_IMPORTED_MODULE_16__["MessageSetAction"].SetSeen:
            folder = Object(Common_Cache__WEBPACK_IMPORTED_MODULE_24__[/* getFolderFromCacheList */ "e"])(sFolderFullNameRaw);

            if (folder) {
              ___WEBPACK_IMPORTED_MODULE_10___default.a.each(Stores_User_Message__WEBPACK_IMPORTED_MODULE_29__[/* default */ "a"].messageList(), function (message) {
                if (message.unseen()) {
                  cnt += 1;
                }

                message.unseen(false);
                uids.push(message.uid);
              });

              if (sThreadUid) {
                folder.messageCountUnread(folder.messageCountUnread() - cnt);

                if (0 > folder.messageCountUnread()) {
                  folder.messageCountUnread(0);
                }
              } else {
                folder.messageCountUnread(0);
              }

              Object(Common_Cache__WEBPACK_IMPORTED_MODULE_24__[/* clearMessageFlagsFromCacheByFolder */ "c"])(sFolderFullNameRaw);
            }

            Remote_User_Ajax__WEBPACK_IMPORTED_MODULE_31__[/* default */ "a"].messageSetSeenToAll(Common_Utils__WEBPACK_IMPORTED_MODULE_19__["noop"], sFolderFullNameRaw, true, sThreadUid ? uids : null);
            break;

          case Common_Enums__WEBPACK_IMPORTED_MODULE_16__["MessageSetAction"].UnsetSeen:
            folder = Object(Common_Cache__WEBPACK_IMPORTED_MODULE_24__[/* getFolderFromCacheList */ "e"])(sFolderFullNameRaw);

            if (folder) {
              ___WEBPACK_IMPORTED_MODULE_10___default.a.each(Stores_User_Message__WEBPACK_IMPORTED_MODULE_29__[/* default */ "a"].messageList(), function (message) {
                if (!message.unseen()) {
                  cnt += 1;
                }

                message.unseen(true);
                uids.push(message.uid);
              });

              if (sThreadUid) {
                folder.messageCountUnread(folder.messageCountUnread() + cnt);

                if (folder.messageCountAll() < folder.messageCountUnread()) {
                  folder.messageCountUnread(folder.messageCountAll());
                }
              } else {
                folder.messageCountUnread(folder.messageCountAll());
              }

              Object(Common_Cache__WEBPACK_IMPORTED_MODULE_24__[/* clearMessageFlagsFromCacheByFolder */ "c"])(sFolderFullNameRaw);
            }

            Remote_User_Ajax__WEBPACK_IMPORTED_MODULE_31__[/* default */ "a"].messageSetSeenToAll(Common_Utils__WEBPACK_IMPORTED_MODULE_19__["noop"], sFolderFullNameRaw, false, sThreadUid ? uids : null);
            break;
          // no default
        }

        Object(Helper_Apps_User__WEBPACK_IMPORTED_MODULE_32__[/* getApp */ "a"])().reloadFlagsCurrentMessageListAndMessageFromCache();
      }
    }
  };

  _proto.listSetSeen = function listSetSeen() {
    this.setAction(Stores_User_Folder__WEBPACK_IMPORTED_MODULE_28__[/* default */ "a"].currentFolderFullNameRaw(), Common_Enums__WEBPACK_IMPORTED_MODULE_16__["MessageSetAction"].SetSeen, Stores_User_Message__WEBPACK_IMPORTED_MODULE_29__[/* default */ "a"].messageListCheckedOrSelected());
  };

  _proto.listSetAllSeen = function listSetAllSeen() {
    this.setActionForAll(Stores_User_Folder__WEBPACK_IMPORTED_MODULE_28__[/* default */ "a"].currentFolderFullNameRaw(), Common_Enums__WEBPACK_IMPORTED_MODULE_16__["MessageSetAction"].SetSeen, this.messageListEndThreadUid());
  };

  _proto.listUnsetSeen = function listUnsetSeen() {
    this.setAction(Stores_User_Folder__WEBPACK_IMPORTED_MODULE_28__[/* default */ "a"].currentFolderFullNameRaw(), Common_Enums__WEBPACK_IMPORTED_MODULE_16__["MessageSetAction"].UnsetSeen, Stores_User_Message__WEBPACK_IMPORTED_MODULE_29__[/* default */ "a"].messageListCheckedOrSelected());
  };

  _proto.listSetFlags = function listSetFlags() {
    this.setAction(Stores_User_Folder__WEBPACK_IMPORTED_MODULE_28__[/* default */ "a"].currentFolderFullNameRaw(), Common_Enums__WEBPACK_IMPORTED_MODULE_16__["MessageSetAction"].SetFlag, Stores_User_Message__WEBPACK_IMPORTED_MODULE_29__[/* default */ "a"].messageListCheckedOrSelected());
  };

  _proto.listUnsetFlags = function listUnsetFlags() {
    this.setAction(Stores_User_Folder__WEBPACK_IMPORTED_MODULE_28__[/* default */ "a"].currentFolderFullNameRaw(), Common_Enums__WEBPACK_IMPORTED_MODULE_16__["MessageSetAction"].UnsetFlag, Stores_User_Message__WEBPACK_IMPORTED_MODULE_29__[/* default */ "a"].messageListCheckedOrSelected());
  };

  _proto.flagMessages = function flagMessages(currentMessage) {
    var checked = this.messageListCheckedOrSelected();

    if (currentMessage) {
      var checkedUids = _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_3___default()(___WEBPACK_IMPORTED_MODULE_10___default.a).call(___WEBPACK_IMPORTED_MODULE_10___default.a, checked, function (message) {
        return message.uid;
      });

      if (0 < checkedUids.length && -1 < Object(Common_Utils__WEBPACK_IMPORTED_MODULE_19__["inArray"])(currentMessage.uid, checkedUids)) {
        this.setAction(currentMessage.folderFullNameRaw, currentMessage.flagged() ? Common_Enums__WEBPACK_IMPORTED_MODULE_16__["MessageSetAction"].UnsetFlag : Common_Enums__WEBPACK_IMPORTED_MODULE_16__["MessageSetAction"].SetFlag, checked);
      } else {
        this.setAction(currentMessage.folderFullNameRaw, currentMessage.flagged() ? Common_Enums__WEBPACK_IMPORTED_MODULE_16__["MessageSetAction"].UnsetFlag : Common_Enums__WEBPACK_IMPORTED_MODULE_16__["MessageSetAction"].SetFlag, [currentMessage]);
      }
    }
  };

  _proto.flagMessagesFast = function flagMessagesFast(bFlag) {
    var checked = this.messageListCheckedOrSelected();

    if (0 < checked.length) {
      if (Object(Common_Utils__WEBPACK_IMPORTED_MODULE_19__["isUnd"])(bFlag)) {
        var flagged = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_2___default()(___WEBPACK_IMPORTED_MODULE_10___default.a).call(___WEBPACK_IMPORTED_MODULE_10___default.a, checked, function (message) {
          return message.flagged();
        });

        this.setAction(checked[0].folderFullNameRaw, checked.length === flagged.length ? Common_Enums__WEBPACK_IMPORTED_MODULE_16__["MessageSetAction"].UnsetFlag : Common_Enums__WEBPACK_IMPORTED_MODULE_16__["MessageSetAction"].SetFlag, checked);
      } else {
        this.setAction(checked[0].folderFullNameRaw, !bFlag ? Common_Enums__WEBPACK_IMPORTED_MODULE_16__["MessageSetAction"].UnsetFlag : Common_Enums__WEBPACK_IMPORTED_MODULE_16__["MessageSetAction"].SetFlag, checked);
      }
    }
  };

  _proto.seenMessagesFast = function seenMessagesFast(seen) {
    var checked = this.messageListCheckedOrSelected();

    if (0 < checked.length) {
      if (Object(Common_Utils__WEBPACK_IMPORTED_MODULE_19__["isUnd"])(seen)) {
        var unseen = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_2___default()(___WEBPACK_IMPORTED_MODULE_10___default.a).call(___WEBPACK_IMPORTED_MODULE_10___default.a, checked, function (message) {
          return message.unseen();
        });

        this.setAction(checked[0].folderFullNameRaw, 0 < unseen.length ? Common_Enums__WEBPACK_IMPORTED_MODULE_16__["MessageSetAction"].SetSeen : Common_Enums__WEBPACK_IMPORTED_MODULE_16__["MessageSetAction"].UnsetSeen, checked);
      } else {
        this.setAction(checked[0].folderFullNameRaw, seen ? Common_Enums__WEBPACK_IMPORTED_MODULE_16__["MessageSetAction"].SetSeen : Common_Enums__WEBPACK_IMPORTED_MODULE_16__["MessageSetAction"].UnsetSeen, checked);
      }
    }
  };

  _proto.gotoPage = function gotoPage(page) {
    if (page) {
      Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_33__["setHash"])(Object(Common_Links__WEBPACK_IMPORTED_MODULE_20__[/* mailBox */ "o"])(Stores_User_Folder__WEBPACK_IMPORTED_MODULE_28__[/* default */ "a"].currentFolderFullNameHash(), page.value, Stores_User_Message__WEBPACK_IMPORTED_MODULE_29__[/* default */ "a"].messageListSearch(), Stores_User_Message__WEBPACK_IMPORTED_MODULE_29__[/* default */ "a"].messageListThreadUid()));
    }
  };

  _proto.gotoThread = function gotoThread(message) {
    if (message && 0 < message.threadsLen()) {
      Stores_User_Message__WEBPACK_IMPORTED_MODULE_29__[/* default */ "a"].messageListPageBeforeThread(Stores_User_Message__WEBPACK_IMPORTED_MODULE_29__[/* default */ "a"].messageListPage());
      Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_33__["setHash"])(Object(Common_Links__WEBPACK_IMPORTED_MODULE_20__[/* mailBox */ "o"])(Stores_User_Folder__WEBPACK_IMPORTED_MODULE_28__[/* default */ "a"].currentFolderFullNameHash(), 1, Stores_User_Message__WEBPACK_IMPORTED_MODULE_29__[/* default */ "a"].messageListSearch(), message.uid));
    }
  };

  _proto.clearListIsVisible = function clearListIsVisible() {
    return '' === this.messageListSearchDesc() && '' === this.messageListError() && '' === this.messageListEndThreadUid() && 0 < this.messageList().length && (this.isSpamFolder() || this.isTrashFolder());
  };

  _proto.onBuild = function onBuild(dom) {
    var _this3 = this;

    var self = this;
    this.oContentVisible = $__WEBPACK_IMPORTED_MODULE_11___default()('.b-content', dom);
    this.oContentScrollable = $__WEBPACK_IMPORTED_MODULE_11___default()('.content', this.oContentVisible);
    this.selector.init(this.oContentVisible, this.oContentScrollable, Common_Enums__WEBPACK_IMPORTED_MODULE_16__["KeyState"].MessageList);

    if (this.mobile) {
      dom.on('click', function () {
        Object(Common_Globals__WEBPACK_IMPORTED_MODULE_18__["leftPanelDisabled"])(true);
      });
    }

    dom.on('click', '.messageList .b-message-list-wrapper', function () {
      if (Common_Enums__WEBPACK_IMPORTED_MODULE_16__["Focused"].MessageView === Stores_User_App__WEBPACK_IMPORTED_MODULE_25__[/* default */ "a"].focusedState()) {
        Stores_User_App__WEBPACK_IMPORTED_MODULE_25__[/* default */ "a"].focusedState(Common_Enums__WEBPACK_IMPORTED_MODULE_16__["Focused"].MessageList);
      }
    }).on('click', '.e-pagenator .e-page', function () {
      // eslint-disable-line prefer-arrow-callback
      self.gotoPage(ko__WEBPACK_IMPORTED_MODULE_12__[/* default */ "a"].dataFor(this)); // eslint-disable-line no-invalid-this
    }).on('click', '.messageList .checkboxCkeckAll', function () {
      _this3.checkAll(!_this3.checkAll());
    }).on('click', '.messageList .messageListItem .flagParent', function () {
      // eslint-disable-line prefer-arrow-callback
      self.flagMessages(ko__WEBPACK_IMPORTED_MODULE_12__[/* default */ "a"].dataFor(this)); // eslint-disable-line no-invalid-this
    }).on('click', '.messageList .messageListItem .threads-len', function () {
      // eslint-disable-line prefer-arrow-callback
      self.gotoThread(ko__WEBPACK_IMPORTED_MODULE_12__[/* default */ "a"].dataFor(this)); // eslint-disable-line no-invalid-this
    }).on('dblclick', '.messageList .messageListItem .actionHandle', function () {
      // eslint-disable-line prefer-arrow-callback
      self.gotoThread(ko__WEBPACK_IMPORTED_MODULE_12__[/* default */ "a"].dataFor(this)); // eslint-disable-line no-invalid-this
    });
    this.initUploaderForAppend();
    this.initShortcuts();

    if (!Common_Globals__WEBPACK_IMPORTED_MODULE_18__["bMobileDevice"] && ifvisible__WEBPACK_IMPORTED_MODULE_15___default.a && Storage_Settings__WEBPACK_IMPORTED_MODULE_30__["capa"](Common_Enums__WEBPACK_IMPORTED_MODULE_16__["Capa"].Prefetch)) {
      ifvisible__WEBPACK_IMPORTED_MODULE_15___default.a.setIdleDuration(Common_Enums__WEBPACK_IMPORTED_MODULE_16__["Magics"].ifvisibleIdle10s);
      ifvisible__WEBPACK_IMPORTED_MODULE_15___default.a.idle(function () {
        _this3.prefetchNextTick();
      });
    }
  };

  _proto.initShortcuts = function initShortcuts() {
    var _this4 = this;

    key__WEBPACK_IMPORTED_MODULE_13___default()('enter', Common_Enums__WEBPACK_IMPORTED_MODULE_16__["KeyState"].MessageList, function () {
      if (_this4.message() && _this4.useAutoSelect()) {
        Common_Events__WEBPACK_IMPORTED_MODULE_22__[/* pub */ "a"]('mailbox.message-view.toggle-full-screen');
        return false;
      }

      return true;
    });

    if (Storage_Settings__WEBPACK_IMPORTED_MODULE_30__["capa"](Common_Enums__WEBPACK_IMPORTED_MODULE_16__["Capa"].MessageListActions)) {
      // archive (zip)
      key__WEBPACK_IMPORTED_MODULE_13___default()('z', [Common_Enums__WEBPACK_IMPORTED_MODULE_16__["KeyState"].MessageList, Common_Enums__WEBPACK_IMPORTED_MODULE_16__["KeyState"].MessageView], function () {
        _this4.archiveCommand();

        return false;
      }); // delete

      key__WEBPACK_IMPORTED_MODULE_13___default()('delete, shift+delete, shift+3', Common_Enums__WEBPACK_IMPORTED_MODULE_16__["KeyState"].MessageList, function (event, handler) {
        if (event) {
          if (0 < Stores_User_Message__WEBPACK_IMPORTED_MODULE_29__[/* default */ "a"].messageListCheckedOrSelected().length) {
            if (handler && 'shift+delete' === handler.shortcut) {
              _this4.deleteWithoutMoveCommand();
            } else {
              _this4.deleteCommand();
            }
          }

          return false;
        }

        return true;
      });
    }

    if (Storage_Settings__WEBPACK_IMPORTED_MODULE_30__["capa"](Common_Enums__WEBPACK_IMPORTED_MODULE_16__["Capa"].Reload)) {
      // check mail
      key__WEBPACK_IMPORTED_MODULE_13___default()('ctrl+r, command+r', [Common_Enums__WEBPACK_IMPORTED_MODULE_16__["KeyState"].FolderList, Common_Enums__WEBPACK_IMPORTED_MODULE_16__["KeyState"].MessageList, Common_Enums__WEBPACK_IMPORTED_MODULE_16__["KeyState"].MessageView], function () {
        _this4.reloadCommand();

        return false;
      });
    } // check all


    key__WEBPACK_IMPORTED_MODULE_13___default()('ctrl+a, command+a', Common_Enums__WEBPACK_IMPORTED_MODULE_16__["KeyState"].MessageList, function () {
      _this4.checkAll(!(_this4.checkAll() && !_this4.isIncompleteChecked()));

      return false;
    });

    if (Storage_Settings__WEBPACK_IMPORTED_MODULE_30__["capa"](Common_Enums__WEBPACK_IMPORTED_MODULE_16__["Capa"].Composer)) {
      // write/compose (open compose popup)
      key__WEBPACK_IMPORTED_MODULE_13___default()('w,c', [Common_Enums__WEBPACK_IMPORTED_MODULE_16__["KeyState"].MessageList, Common_Enums__WEBPACK_IMPORTED_MODULE_16__["KeyState"].MessageView], function () {
        Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_33__["showScreenPopup"])(__webpack_require__(/*! View/Popup/Compose */ 122));
        return false;
      });
    }

    if (Storage_Settings__WEBPACK_IMPORTED_MODULE_30__["capa"](Common_Enums__WEBPACK_IMPORTED_MODULE_16__["Capa"].MessageListActions)) {
      // important - star/flag messages
      key__WEBPACK_IMPORTED_MODULE_13___default()('i', [Common_Enums__WEBPACK_IMPORTED_MODULE_16__["KeyState"].MessageList, Common_Enums__WEBPACK_IMPORTED_MODULE_16__["KeyState"].MessageView], function () {
        _this4.flagMessagesFast();

        return false;
      });
    }

    key__WEBPACK_IMPORTED_MODULE_13___default()('t', [Common_Enums__WEBPACK_IMPORTED_MODULE_16__["KeyState"].MessageList], function () {
      var message = _this4.selectorMessageSelected();

      if (!message) {
        message = _this4.selectorMessageFocused();
      }

      if (message && 0 < message.threadsLen()) {
        _this4.gotoThread(message);
      }

      return false;
    });

    if (Storage_Settings__WEBPACK_IMPORTED_MODULE_30__["capa"](Common_Enums__WEBPACK_IMPORTED_MODULE_16__["Capa"].MessageListActions)) {
      // move
      key__WEBPACK_IMPORTED_MODULE_13___default()('m', Common_Enums__WEBPACK_IMPORTED_MODULE_16__["KeyState"].MessageList, function () {
        if (_this4.newMoveToFolder()) {
          _this4.moveNewCommand();
        } else {
          _this4.moveDropdownTrigger(true);
        }

        return false;
      });
    }

    if (Storage_Settings__WEBPACK_IMPORTED_MODULE_30__["capa"](Common_Enums__WEBPACK_IMPORTED_MODULE_16__["Capa"].MessageListActions)) {
      // read
      key__WEBPACK_IMPORTED_MODULE_13___default()('q', [Common_Enums__WEBPACK_IMPORTED_MODULE_16__["KeyState"].MessageList, Common_Enums__WEBPACK_IMPORTED_MODULE_16__["KeyState"].MessageView], function () {
        _this4.seenMessagesFast(true);

        return false;
      }); // unread

      key__WEBPACK_IMPORTED_MODULE_13___default()('u', [Common_Enums__WEBPACK_IMPORTED_MODULE_16__["KeyState"].MessageList, Common_Enums__WEBPACK_IMPORTED_MODULE_16__["KeyState"].MessageView], function () {
        _this4.seenMessagesFast(false);

        return false;
      });
    }

    if (Storage_Settings__WEBPACK_IMPORTED_MODULE_30__["capa"](Common_Enums__WEBPACK_IMPORTED_MODULE_16__["Capa"].Composer)) {
      key__WEBPACK_IMPORTED_MODULE_13___default()('shift+f', [Common_Enums__WEBPACK_IMPORTED_MODULE_16__["KeyState"].MessageList, Common_Enums__WEBPACK_IMPORTED_MODULE_16__["KeyState"].MessageView], function () {
        _this4.multyForwardCommand();

        return false;
      });
    }

    if (Storage_Settings__WEBPACK_IMPORTED_MODULE_30__["capa"](Common_Enums__WEBPACK_IMPORTED_MODULE_16__["Capa"].Search)) {
      // search input focus
      key__WEBPACK_IMPORTED_MODULE_13___default()('/', [Common_Enums__WEBPACK_IMPORTED_MODULE_16__["KeyState"].MessageList, Common_Enums__WEBPACK_IMPORTED_MODULE_16__["KeyState"].MessageView], function () {
        _this4.inputMessageListSearchFocus(true);

        return false;
      });
    } // cancel search


    key__WEBPACK_IMPORTED_MODULE_13___default()('esc', Common_Enums__WEBPACK_IMPORTED_MODULE_16__["KeyState"].MessageList, function () {
      if ('' !== _this4.messageListSearchDesc()) {
        _this4.cancelSearch();

        return false;
      } else if ('' !== _this4.messageListEndThreadUid()) {
        _this4.cancelThreadUid();

        return false;
      }

      return true;
    }); // change focused state

    key__WEBPACK_IMPORTED_MODULE_13___default()('tab, shift+tab, left, right', Common_Enums__WEBPACK_IMPORTED_MODULE_16__["KeyState"].MessageList, function (event, handler) {
      if (event && handler && ('shift+tab' === handler.shortcut || 'left' === handler.shortcut)) {
        Stores_User_App__WEBPACK_IMPORTED_MODULE_25__[/* default */ "a"].focusedState(Common_Enums__WEBPACK_IMPORTED_MODULE_16__["Focused"].FolderList);
      } else if (_this4.message()) {
        Stores_User_App__WEBPACK_IMPORTED_MODULE_25__[/* default */ "a"].focusedState(Common_Enums__WEBPACK_IMPORTED_MODULE_16__["Focused"].MessageView);
      }

      return false;
    });
    key__WEBPACK_IMPORTED_MODULE_13___default()('ctrl+left, command+left', Common_Enums__WEBPACK_IMPORTED_MODULE_16__["KeyState"].MessageView, Common_Utils__WEBPACK_IMPORTED_MODULE_19__["noopFalse"]);
    key__WEBPACK_IMPORTED_MODULE_13___default()('ctrl+right, command+right', Common_Enums__WEBPACK_IMPORTED_MODULE_16__["KeyState"].MessageView, Common_Utils__WEBPACK_IMPORTED_MODULE_19__["noopFalse"]);
  };

  _proto.prefetchNextTick = function prefetchNextTick() {
    var _this5 = this;

    if (ifvisible__WEBPACK_IMPORTED_MODULE_15___default.a && !this.bPrefetch && !ifvisible__WEBPACK_IMPORTED_MODULE_15___default.a.now() && this.viewModelVisibility()) {
      var message = _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_4___default()(___WEBPACK_IMPORTED_MODULE_10___default.a).call(___WEBPACK_IMPORTED_MODULE_10___default.a, this.messageList(), function (item) {
        return item && !Object(Common_Cache__WEBPACK_IMPORTED_MODULE_24__[/* hasRequestedMessage */ "m"])(item.folderFullNameRaw, item.uid);
      });

      if (message) {
        this.bPrefetch = true;
        Object(Common_Cache__WEBPACK_IMPORTED_MODULE_24__[/* addRequestedMessage */ "b"])(message.folderFullNameRaw, message.uid);
        Remote_User_Ajax__WEBPACK_IMPORTED_MODULE_31__[/* default */ "a"].message(function (result, data) {
          var next = !!(Common_Enums__WEBPACK_IMPORTED_MODULE_16__["StorageResultType"].Success === result && data && data.Result);

          ___WEBPACK_IMPORTED_MODULE_10___default.a.delay(function () {
            _this5.bPrefetch = false;

            if (next) {
              _this5.prefetchNextTick();
            }
          }, Common_Enums__WEBPACK_IMPORTED_MODULE_16__["Magics"].Time1s);
        }, message.folderFullNameRaw, message.uid);
      }
    }
  };

  _proto.advancedSearchClick = function advancedSearchClick() {
    if (Storage_Settings__WEBPACK_IMPORTED_MODULE_30__["capa"](Common_Enums__WEBPACK_IMPORTED_MODULE_16__["Capa"].SearchAdv)) {
      Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_33__["showScreenPopup"])(__webpack_require__(/*! View/Popup/AdvancedSearch */ 528), [this.mainMessageListSearch()]);
    }
  };

  _proto.quotaTooltip = function quotaTooltip() {
    return Object(Common_Translator__WEBPACK_IMPORTED_MODULE_23__["i18n"])('MESSAGE_LIST/QUOTA_SIZE', {
      'SIZE': Object(Common_Utils__WEBPACK_IMPORTED_MODULE_19__["friendlySize"])(this.userUsageSize()),
      'PROC': this.userUsageProc(),
      'LIMIT': Object(Common_Utils__WEBPACK_IMPORTED_MODULE_19__["friendlySize"])(this.userQuota())
    });
  };

  _proto.initUploaderForAppend = function initUploaderForAppend() {
    var _this6 = this;

    if (!Storage_Settings__WEBPACK_IMPORTED_MODULE_30__["appSettingsGet"]('allowAppendMessage') || !this.dragOverArea()) {
      return false;
    }

    var oJua = new Jua__WEBPACK_IMPORTED_MODULE_14___default.a({
      action: Object(Common_Links__WEBPACK_IMPORTED_MODULE_20__[/* append */ "b"])(),
      name: 'AppendFile',
      queueSize: 1,
      multipleSizeLimit: 1,
      hidden: {
        Folder: function Folder() {
          return Stores_User_Folder__WEBPACK_IMPORTED_MODULE_28__[/* default */ "a"].currentFolderFullNameRaw();
        }
      },
      dragAndDropElement: this.dragOverArea(),
      dragAndDropBodyElement: this.dragOverBodyArea()
    });
    this.dragOver.subscribe(function (value) {
      if (value) {
        _this6.selector.scrollToTop();
      }
    });
    oJua.on('onDragEnter', function () {
      _this6.dragOverEnter(true);
    }).on('onDragLeave', function () {
      _this6.dragOverEnter(false);
    }).on('onBodyDragEnter', function () {
      _this6.dragOver(true);
    }).on('onBodyDragLeave', function () {
      _this6.dragOver(false);
    }).on('onSelect', function (sUid, oData) {
      if (sUid && oData && 'message/rfc822' === oData.Type) {
        Stores_User_Message__WEBPACK_IMPORTED_MODULE_29__[/* default */ "a"].messageListLoading(true);
        return true;
      }

      return false;
    }).on('onComplete', function () {
      Object(Helper_Apps_User__WEBPACK_IMPORTED_MODULE_32__[/* getApp */ "a"])().reloadMessageList(true, true);
    });
    return !!oJua;
  };

  return MessageListMailBoxUserView;
}(Knoin_AbstractViewNext__WEBPACK_IMPORTED_MODULE_34__[/* AbstractViewNext */ "a"]), (Object(_babel_runtime_corejs3_helpers_esm_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_8__[/* default */ "a"])(_class2.prototype, "clearCommand", [_dec2], _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class2.prototype, "clearCommand"), _class2.prototype), Object(_babel_runtime_corejs3_helpers_esm_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_8__[/* default */ "a"])(_class2.prototype, "reloadCommand", [_dec3], _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class2.prototype, "reloadCommand"), _class2.prototype), Object(_babel_runtime_corejs3_helpers_esm_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_8__[/* default */ "a"])(_class2.prototype, "multyForwardCommand", [_dec4], _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class2.prototype, "multyForwardCommand"), _class2.prototype), Object(_babel_runtime_corejs3_helpers_esm_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_8__[/* default */ "a"])(_class2.prototype, "deleteWithoutMoveCommand", [_dec5], _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class2.prototype, "deleteWithoutMoveCommand"), _class2.prototype), Object(_babel_runtime_corejs3_helpers_esm_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_8__[/* default */ "a"])(_class2.prototype, "deleteCommand", [_dec6], _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class2.prototype, "deleteCommand"), _class2.prototype), Object(_babel_runtime_corejs3_helpers_esm_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_8__[/* default */ "a"])(_class2.prototype, "archiveCommand", [_dec7], _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class2.prototype, "archiveCommand"), _class2.prototype), Object(_babel_runtime_corejs3_helpers_esm_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_8__[/* default */ "a"])(_class2.prototype, "spamCommand", [_dec8], _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class2.prototype, "spamCommand"), _class2.prototype), Object(_babel_runtime_corejs3_helpers_esm_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_8__[/* default */ "a"])(_class2.prototype, "notSpamCommand", [_dec9], _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class2.prototype, "notSpamCommand"), _class2.prototype), Object(_babel_runtime_corejs3_helpers_esm_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_8__[/* default */ "a"])(_class2.prototype, "moveCommand", [_dec10], _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class2.prototype, "moveCommand"), _class2.prototype), Object(_babel_runtime_corejs3_helpers_esm_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_8__[/* default */ "a"])(_class2.prototype, "moveNewCommand", [_dec11], _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class2.prototype, "moveNewCommand"), _class2.prototype)), _class2)) || _class);


/***/ }),
/* 435 */
/*!**********************************************!*\
  !*** ./dev/View/User/MailBox/MessageView.js ***!
  \**********************************************/
/*! exports provided: MessageViewMailBoxUserView, default */
/*! exports used: MessageViewMailBoxUserView */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return MessageViewMailBoxUserView; });
/* unused harmony export default */
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor */ 19);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/find */ 12);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/map */ 18);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_bind__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/bind */ 26);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_bind__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_bind__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var _babel_runtime_corejs3_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/esm/assertThisInitialized */ 33);
/* harmony import */ var _babel_runtime_corejs3_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/esm/inheritsLoose */ 10);
/* harmony import */ var _babel_runtime_corejs3_helpers_esm_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/esm/applyDecoratedDescriptor */ 20);
/* harmony import */ var window__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! window */ 4);
/* harmony import */ var window__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(window__WEBPACK_IMPORTED_MODULE_7__);
/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! _ */ 3);
/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(___WEBPACK_IMPORTED_MODULE_8__);
/* harmony import */ var $__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! $ */ 8);
/* harmony import */ var $__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n($__WEBPACK_IMPORTED_MODULE_9__);
/* harmony import */ var ko__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ko */ 1);
/* harmony import */ var key__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! key */ 21);
/* harmony import */ var key__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(key__WEBPACK_IMPORTED_MODULE_11__);
/* harmony import */ var Common_Consts__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! Common/Consts */ 25);
/* harmony import */ var Common_Enums__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! Common/Enums */ 0);
/* harmony import */ var Common_Globals__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! Common/Globals */ 6);
/* harmony import */ var Common_Utils__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! Common/Utils */ 2);
/* harmony import */ var Common_Audio__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! Common/Audio */ 81);
/* harmony import */ var Common_Events__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! Common/Events */ 24);
/* harmony import */ var Common_Translator__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! Common/Translator */ 9);
/* harmony import */ var Common_Links__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! Common/Links */ 15);
/* harmony import */ var Common_Cache__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! Common/Cache */ 14);
/* harmony import */ var Stores_Social__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! Stores/Social */ 29);
/* harmony import */ var Stores_User_App__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! Stores/User/App */ 31);
/* harmony import */ var Stores_User_Settings__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! Stores/User/Settings */ 38);
/* harmony import */ var Stores_User_Account__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! Stores/User/Account */ 46);
/* harmony import */ var Stores_User_Folder__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! Stores/User/Folder */ 11);
/* harmony import */ var Stores_User_Message__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! Stores/User/Message */ 13);
/* harmony import */ var Storage_Client__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! Storage/Client */ 58);
/* harmony import */ var Storage_Settings__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! Storage/Settings */ 5);
/* harmony import */ var Remote_User_Ajax__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! Remote/User/Ajax */ 16);
/* harmony import */ var Promises_User_Ajax__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! Promises/User/Ajax */ 87);
/* harmony import */ var Helper_Apps_User__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! Helper/Apps/User */ 22);
/* harmony import */ var Knoin_Knoin__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! Knoin/Knoin */ 7);
/* harmony import */ var Knoin_AbstractViewNext__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! Knoin/AbstractViewNext */ 28);








var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _class, _class2;




























var MessageViewMailBoxUserView = (_dec = Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_32__["view"])({
  name: 'View/User/MailBox/MessageView',
  type: Knoin_Knoin__WEBPACK_IMPORTED_MODULE_32__["ViewType"].Right,
  templateID: 'MailMessageView'
}), _dec2 = Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_32__["command"])(), _dec3 = Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_32__["command"])(function (self) {
  return self.messageVisibility();
}), _dec4 = Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_32__["command"])(function (self) {
  return self.messageVisibility();
}), _dec5 = Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_32__["command"])(function (self) {
  return !self.messageListAndMessageViewLoading();
}), _dec6 = Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_32__["command"])(function (self) {
  return !self.messageListAndMessageViewLoading();
}), _dec(_class = (_class2 =
/*#__PURE__*/
function (_AbstractViewNext) {
  Object(_babel_runtime_corejs3_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"])(MessageViewMailBoxUserView, _AbstractViewNext);

  function MessageViewMailBoxUserView() {
    var _this;

    _this = _AbstractViewNext.call(this) || this;
    var lastEmail = '';

    var createCommandReplyHelper = function createCommandReplyHelper(type) {
      return Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_32__["createCommand"])(function () {
        _this.lastReplyAction(type);

        _this.replyOrforward(type);
      }, _this.canBeRepliedOrForwarded);
    };

    var createCommandActionHelper = function createCommandActionHelper(folderType, useFolder) {
      return Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_32__["createCommand"])(function () {
        var message = _this.message();

        if (message && _this.allowMessageListActions) {
          _this.message(null);

          Object(Helper_Apps_User__WEBPACK_IMPORTED_MODULE_31__[/* getApp */ "a"])().deleteMessagesFromFolder(folderType, message.folderFullNameRaw, [message.uid], useFolder);
        }
      }, _this.messageVisibility);
    };

    _this.oDom = null;
    _this.oHeaderDom = null;
    _this.oMessageScrollerDom = null;
    _this.bodyBackgroundColor = ko__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"].observable('');
    _this.pswp = null;
    _this.moveAction = Common_Globals__WEBPACK_IMPORTED_MODULE_14__["moveAction"];
    _this.allowComposer = !!Storage_Settings__WEBPACK_IMPORTED_MODULE_28__["capa"](Common_Enums__WEBPACK_IMPORTED_MODULE_13__["Capa"].Composer);
    _this.allowMessageActions = !!Storage_Settings__WEBPACK_IMPORTED_MODULE_28__["capa"](Common_Enums__WEBPACK_IMPORTED_MODULE_13__["Capa"].MessageActions);
    _this.allowMessageListActions = !!Storage_Settings__WEBPACK_IMPORTED_MODULE_28__["capa"](Common_Enums__WEBPACK_IMPORTED_MODULE_13__["Capa"].MessageListActions);
    _this.logoImg = Object(Common_Utils__WEBPACK_IMPORTED_MODULE_15__["trim"])(Storage_Settings__WEBPACK_IMPORTED_MODULE_28__["settingsGet"]('UserLogoMessage'));
    _this.logoIframe = Object(Common_Utils__WEBPACK_IMPORTED_MODULE_15__["trim"])(Storage_Settings__WEBPACK_IMPORTED_MODULE_28__["settingsGet"]('UserIframeMessage'));
    _this.mobile = !!Storage_Settings__WEBPACK_IMPORTED_MODULE_28__["appSettingsGet"]('mobile');
    _this.attachmentsActions = Stores_User_App__WEBPACK_IMPORTED_MODULE_22__[/* default */ "a"].attachmentsActions;
    _this.message = Stores_User_Message__WEBPACK_IMPORTED_MODULE_26__[/* default */ "a"].message;
    _this.messageListChecked = Stores_User_Message__WEBPACK_IMPORTED_MODULE_26__[/* default */ "a"].messageListChecked;
    _this.hasCheckedMessages = Stores_User_Message__WEBPACK_IMPORTED_MODULE_26__[/* default */ "a"].hasCheckedMessages;
    _this.messageListCheckedOrSelectedUidsWithSubMails = Stores_User_Message__WEBPACK_IMPORTED_MODULE_26__[/* default */ "a"].messageListCheckedOrSelectedUidsWithSubMails;
    _this.messageLoadingThrottle = Stores_User_Message__WEBPACK_IMPORTED_MODULE_26__[/* default */ "a"].messageLoadingThrottle;
    _this.messagesBodiesDom = Stores_User_Message__WEBPACK_IMPORTED_MODULE_26__[/* default */ "a"].messagesBodiesDom;
    _this.useThreads = Stores_User_Settings__WEBPACK_IMPORTED_MODULE_23__[/* default */ "a"].useThreads;
    _this.replySameFolder = Stores_User_Settings__WEBPACK_IMPORTED_MODULE_23__[/* default */ "a"].replySameFolder;
    _this.layout = Stores_User_Settings__WEBPACK_IMPORTED_MODULE_23__[/* default */ "a"].layout;
    _this.usePreviewPane = Stores_User_Settings__WEBPACK_IMPORTED_MODULE_23__[/* default */ "a"].usePreviewPane;
    _this.isMessageSelected = Stores_User_Message__WEBPACK_IMPORTED_MODULE_26__[/* default */ "a"].isMessageSelected;
    _this.messageActiveDom = Stores_User_Message__WEBPACK_IMPORTED_MODULE_26__[/* default */ "a"].messageActiveDom;
    _this.messageError = Stores_User_Message__WEBPACK_IMPORTED_MODULE_26__[/* default */ "a"].messageError;
    _this.fullScreenMode = Stores_User_Message__WEBPACK_IMPORTED_MODULE_26__[/* default */ "a"].messageFullScreenMode;
    _this.messageListOfThreadsLoading = ko__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"].observable(false).extend({
      rateLimit: 1
    });
    _this.highlightUnselectedAttachments = ko__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"].observable(false).extend({
      falseTimeout: 2000
    });
    _this.showAttachmnetControls = ko__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"].observable(false);

    _this.showAttachmnetControlsState = function (v) {
      Storage_Client__WEBPACK_IMPORTED_MODULE_27__[/* set */ "b"](Common_Enums__WEBPACK_IMPORTED_MODULE_13__["ClientSideKeyName"].MessageAttachmnetControls, !!v);
    };

    _this.allowAttachmnetControls = ko__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"].computed(function () {
      return 0 < _this.attachmentsActions().length && Storage_Settings__WEBPACK_IMPORTED_MODULE_28__["capa"](Common_Enums__WEBPACK_IMPORTED_MODULE_13__["Capa"].AttachmentsActions);
    });
    _this.downloadAsZipAllowed = ko__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"].computed(function () {
      return -1 < Object(Common_Utils__WEBPACK_IMPORTED_MODULE_15__["inArray"])('zip', _this.attachmentsActions()) && _this.allowAttachmnetControls();
    });
    _this.downloadAsZipLoading = ko__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"].observable(false);
    _this.downloadAsZipError = ko__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"].observable(false).extend({
      falseTimeout: 7000
    });
    _this.saveToOwnCloudAllowed = ko__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"].computed(function () {
      return -1 < Object(Common_Utils__WEBPACK_IMPORTED_MODULE_15__["inArray"])('owncloud', _this.attachmentsActions()) && _this.allowAttachmnetControls();
    });
    _this.saveToOwnCloudLoading = ko__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"].observable(false);
    _this.saveToOwnCloudSuccess = ko__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"].observable(false).extend({
      falseTimeout: 2000
    });
    _this.saveToOwnCloudError = ko__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"].observable(false).extend({
      falseTimeout: 7000
    });

    _this.saveToOwnCloudSuccess.subscribe(function (v) {
      if (v) {
        _this.saveToOwnCloudError(false);
      }
    });

    _this.saveToOwnCloudError.subscribe(function (v) {
      if (v) {
        _this.saveToOwnCloudSuccess(false);
      }
    });

    _this.saveToDropboxAllowed = ko__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"].computed(function () {
      return -1 < Object(Common_Utils__WEBPACK_IMPORTED_MODULE_15__["inArray"])('dropbox', _this.attachmentsActions()) && _this.allowAttachmnetControls();
    });
    _this.saveToDropboxLoading = ko__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"].observable(false);
    _this.saveToDropboxSuccess = ko__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"].observable(false).extend({
      falseTimeout: 2000
    });
    _this.saveToDropboxError = ko__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"].observable(false).extend({
      falseTimeout: 7000
    });

    _this.saveToDropboxSuccess.subscribe(function (v) {
      if (v) {
        _this.saveToDropboxError(false);
      }
    });

    _this.saveToDropboxError.subscribe(function (v) {
      if (v) {
        _this.saveToDropboxSuccess(false);
      }
    });

    _this.showAttachmnetControls.subscribe(function (v) {
      if (_this.message()) {
        ___WEBPACK_IMPORTED_MODULE_8___default.a.each(_this.message().attachments(), function (item) {
          if (item) {
            item.checked(!!v);
          }
        });
      }
    });

    _this.lastReplyAction_ = ko__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"].observable('');
    _this.lastReplyAction = ko__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"].computed({
      read: _this.lastReplyAction_,
      write: function write(value) {
        _this.lastReplyAction_(-1 === Object(Common_Utils__WEBPACK_IMPORTED_MODULE_15__["inArray"])(value, [Common_Enums__WEBPACK_IMPORTED_MODULE_13__["ComposeType"].Reply, Common_Enums__WEBPACK_IMPORTED_MODULE_13__["ComposeType"].ReplyAll, Common_Enums__WEBPACK_IMPORTED_MODULE_13__["ComposeType"].Forward]) ? Common_Enums__WEBPACK_IMPORTED_MODULE_13__["ComposeType"].Reply : value);
      }
    });

    _this.lastReplyAction(Storage_Client__WEBPACK_IMPORTED_MODULE_27__[/* get */ "a"](Common_Enums__WEBPACK_IMPORTED_MODULE_13__["ClientSideKeyName"].LastReplyAction) || Common_Enums__WEBPACK_IMPORTED_MODULE_13__["ComposeType"].Reply);

    _this.lastReplyAction_.subscribe(function (value) {
      Storage_Client__WEBPACK_IMPORTED_MODULE_27__[/* set */ "b"](Common_Enums__WEBPACK_IMPORTED_MODULE_13__["ClientSideKeyName"].LastReplyAction, value);
    });

    _this.showFullInfo = ko__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"].observable('1' === Storage_Client__WEBPACK_IMPORTED_MODULE_27__[/* get */ "a"](Common_Enums__WEBPACK_IMPORTED_MODULE_13__["ClientSideKeyName"].MessageHeaderFullInfo));
    _this.moreDropdownTrigger = ko__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"].observable(false);
    _this.messageDomFocused = ko__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"].observable(false).extend({
      rateLimit: 0
    });
    _this.messageVisibility = ko__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"].computed(function () {
      return !_this.messageLoadingThrottle() && !!_this.message();
    });

    _this.message.subscribe(function (message) {
      if (!message) {
        Stores_User_Message__WEBPACK_IMPORTED_MODULE_26__[/* default */ "a"].selectorMessageSelected(null);
      }
    });

    _this.canBeRepliedOrForwarded = ko__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"].computed(function () {
      var v = _this.messageVisibility();

      return !_this.isDraftFolder() && v;
    }); // commands

    _this.replyCommand = createCommandReplyHelper(Common_Enums__WEBPACK_IMPORTED_MODULE_13__["ComposeType"].Reply);
    _this.replyAllCommand = createCommandReplyHelper(Common_Enums__WEBPACK_IMPORTED_MODULE_13__["ComposeType"].ReplyAll);
    _this.forwardCommand = createCommandReplyHelper(Common_Enums__WEBPACK_IMPORTED_MODULE_13__["ComposeType"].Forward);
    _this.forwardAsAttachmentCommand = createCommandReplyHelper(Common_Enums__WEBPACK_IMPORTED_MODULE_13__["ComposeType"].ForwardAsAttachment);
    _this.editAsNewCommand = createCommandReplyHelper(Common_Enums__WEBPACK_IMPORTED_MODULE_13__["ComposeType"].EditAsNew);
    _this.deleteCommand = createCommandActionHelper(Common_Enums__WEBPACK_IMPORTED_MODULE_13__["FolderType"].Trash, true);
    _this.deleteWithoutMoveCommand = createCommandActionHelper(Common_Enums__WEBPACK_IMPORTED_MODULE_13__["FolderType"].Trash, false);
    _this.archiveCommand = createCommandActionHelper(Common_Enums__WEBPACK_IMPORTED_MODULE_13__["FolderType"].Archive, true);
    _this.spamCommand = createCommandActionHelper(Common_Enums__WEBPACK_IMPORTED_MODULE_13__["FolderType"].Spam, true);
    _this.notSpamCommand = createCommandActionHelper(Common_Enums__WEBPACK_IMPORTED_MODULE_13__["FolderType"].NotSpam, true);
    _this.dropboxEnabled = Stores_Social__WEBPACK_IMPORTED_MODULE_21__[/* default */ "a"].dropbox.enabled;
    _this.dropboxApiKey = Stores_Social__WEBPACK_IMPORTED_MODULE_21__[/* default */ "a"].dropbox.apiKey; // viewer

    _this.viewBodyTopValue = ko__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"].observable(0);
    _this.viewFolder = '';
    _this.viewUid = '';
    _this.viewHash = '';
    _this.viewSubject = ko__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"].observable('');
    _this.viewFromShort = ko__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"].observable('');
    _this.viewFromDkimData = ko__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"].observable(['none', '']);
    _this.viewToShort = ko__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"].observable('');
    _this.viewFrom = ko__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"].observable('');
    _this.viewTo = ko__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"].observable('');
    _this.viewCc = ko__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"].observable('');
    _this.viewBcc = ko__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"].observable('');
    _this.viewReplyTo = ko__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"].observable('');
    _this.viewTimeStamp = ko__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"].observable(0);
    _this.viewSize = ko__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"].observable('');
    _this.viewLineAsCss = ko__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"].observable('');
    _this.viewViewLink = ko__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"].observable('');
    _this.viewUnsubscribeLink = ko__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"].observable('');
    _this.viewDownloadLink = ko__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"].observable('');
    _this.viewUserPic = ko__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"].observable(Common_Consts__WEBPACK_IMPORTED_MODULE_12__[/* DATA_IMAGE_USER_DOT_PIC */ "f"]);
    _this.viewUserPicVisible = ko__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"].observable(false);
    _this.viewIsImportant = ko__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"].observable(false);
    _this.viewIsFlagged = ko__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"].observable(false);
    _this.viewFromDkimVisibility = ko__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"].computed(function () {
      return 'none' !== _this.viewFromDkimData()[0];
    });
    _this.viewFromDkimStatusIconClass = ko__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"].computed(function () {
      switch (_this.viewFromDkimData()[0]) {
        case 'none':
          return 'icon-none iconcolor-display-none';

        case 'pass':
          return 'icon-ok iconcolor-green';

        default:
          return 'icon-warning-alt iconcolor-red';
      }
    });
    _this.viewFromDkimStatusTitle = ko__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"].computed(function () {
      var status = _this.viewFromDkimData();

      if (Object(Common_Utils__WEBPACK_IMPORTED_MODULE_15__["isNonEmptyArray"])(status)) {
        if (status[0] && status[1]) {
          return status[1];
        } else if (status[0]) {
          return 'DKIM: ' + status[0];
        }
      }

      return '';
    });

    _this.messageActiveDom.subscribe(function (dom) {
      _this.bodyBackgroundColor(dom ? _this.detectDomBackgroundColor(dom) : '');
    }, Object(_babel_runtime_corejs3_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])(_this));

    _this.message.subscribe(function (message) {
      _this.messageActiveDom(null);

      if (message) {
        _this.showAttachmnetControls(false);

        if (Storage_Client__WEBPACK_IMPORTED_MODULE_27__[/* get */ "a"](Common_Enums__WEBPACK_IMPORTED_MODULE_13__["ClientSideKeyName"].MessageAttachmnetControls)) {
          ___WEBPACK_IMPORTED_MODULE_8___default.a.delay(function () {
            _this.showAttachmnetControls(true);
          }, Common_Enums__WEBPACK_IMPORTED_MODULE_13__["Magics"].Time50ms);
        }

        if (_this.viewHash !== message.hash) {
          _this.scrollMessageToTop();
        }

        _this.viewFolder = message.folderFullNameRaw;
        _this.viewUid = message.uid;
        _this.viewHash = message.hash;

        _this.viewSubject(message.subject());

        _this.viewFromShort(message.fromToLine(true, true));

        _this.viewFromDkimData(message.fromDkimData());

        _this.viewToShort(message.toToLine(true, true));

        _this.viewFrom(message.fromToLine(false));

        _this.viewTo(message.toToLine(false));

        _this.viewCc(message.ccToLine(false));

        _this.viewBcc(message.bccToLine(false));

        _this.viewReplyTo(message.replyToToLine(false));

        _this.viewTimeStamp(message.dateTimeStampInUTC());

        _this.viewSize(message.friendlySize());

        _this.viewLineAsCss(message.lineAsCss());

        _this.viewViewLink(message.viewLink());

        _this.viewUnsubscribeLink(message.getFirstUnsubsribeLink());

        _this.viewDownloadLink(message.downloadLink());

        _this.viewIsImportant(message.isImportant());

        _this.viewIsFlagged(message.flagged());

        lastEmail = message.fromAsSingleEmail();
        Object(Common_Cache__WEBPACK_IMPORTED_MODULE_20__[/* getUserPic */ "k"])(lastEmail, function (pic, email) {
          if (pic !== _this.viewUserPic() && lastEmail === email) {
            _this.viewUserPicVisible(false);

            _this.viewUserPic(Common_Consts__WEBPACK_IMPORTED_MODULE_12__[/* DATA_IMAGE_USER_DOT_PIC */ "f"]);

            if ('' !== pic) {
              _this.viewUserPicVisible(true);

              _this.viewUserPic(pic);
            }
          }
        });
      } else {
        _this.viewFolder = '';
        _this.viewUid = '';
        _this.viewHash = '';

        _this.scrollMessageToTop();
      }
    });

    _this.message.viewTrigger.subscribe(function () {
      var message = _this.message();

      if (message) {
        _this.viewIsFlagged(message.flagged());
      } else {
        _this.viewIsFlagged(false);
      }
    });

    _this.fullScreenMode.subscribe(function (value) {
      Common_Globals__WEBPACK_IMPORTED_MODULE_14__["$html"].toggleClass('rl-message-fullscreen', value);
      Object(Common_Utils__WEBPACK_IMPORTED_MODULE_15__["windowResize"])();
    });

    _this.messageLoadingThrottle.subscribe(Common_Utils__WEBPACK_IMPORTED_MODULE_15__["windowResizeCallback"]);

    _this.messageFocused = ko__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"].computed(function () {
      return Common_Enums__WEBPACK_IMPORTED_MODULE_13__["Focused"].MessageView === Stores_User_App__WEBPACK_IMPORTED_MODULE_22__[/* default */ "a"].focusedState();
    });
    _this.messageListAndMessageViewLoading = ko__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"].computed(function () {
      return Stores_User_Message__WEBPACK_IMPORTED_MODULE_26__[/* default */ "a"].messageListCompleteLoadingThrottle() || Stores_User_Message__WEBPACK_IMPORTED_MODULE_26__[/* default */ "a"].messageLoadingThrottle();
    });
    Common_Events__WEBPACK_IMPORTED_MODULE_17__[/* sub */ "b"]('mailbox.message-view.toggle-full-screen', function () {
      _this.toggleFullScreen();
    });
    _this.attachmentPreview = _babel_runtime_corejs3_core_js_stable_instance_bind__WEBPACK_IMPORTED_MODULE_3___default()(___WEBPACK_IMPORTED_MODULE_8___default.a).call(___WEBPACK_IMPORTED_MODULE_8___default.a, _this.attachmentPreview, Object(_babel_runtime_corejs3_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])(_this));
    return _this;
  }

  var _proto = MessageViewMailBoxUserView.prototype;

  _proto.closeMessageCommand = function closeMessageCommand() {
    Stores_User_Message__WEBPACK_IMPORTED_MODULE_26__[/* default */ "a"].message(null);
  };

  _proto.messageVisibilityCommand = function messageVisibilityCommand() {} // eslint-disable-line no-empty-function
  ;

  _proto.messageEditCommand = function messageEditCommand() {
    this.editMessage();
  };

  _proto.goUpCommand = function goUpCommand() {
    Common_Events__WEBPACK_IMPORTED_MODULE_17__[/* pub */ "a"]('mailbox.message-list.selector.go-up', [Common_Enums__WEBPACK_IMPORTED_MODULE_13__["Layout"].NoPreview === this.layout() ? !!this.message() : true]);
  };

  _proto.goDownCommand = function goDownCommand() {
    Common_Events__WEBPACK_IMPORTED_MODULE_17__[/* pub */ "a"]('mailbox.message-list.selector.go-down', [Common_Enums__WEBPACK_IMPORTED_MODULE_13__["Layout"].NoPreview === this.layout() ? !!this.message() : true]);
  };

  _proto.detectDomBackgroundColor = function detectDomBackgroundColor(dom) {
    var limit = 5,
        result = '';

    var fFindDom = function fFindDom(inputDom) {
      var children = inputDom ? inputDom.children() : null;
      return children && 1 === children.length && children.is('table,div,center') ? children : null;
    },
        fFindColor = function fFindColor(inputDom) {
      var color = '';

      if (inputDom) {
        color = inputDom.css('background-color') || '';

        if (!inputDom.is('table')) {
          color = Object(Common_Utils__WEBPACK_IMPORTED_MODULE_15__["isTransparent"])(color) ? '' : color;
        }
      }

      return color;
    };

    if (dom && 1 === dom.length) {
      var aC = dom;

      while ('' === result) {
        limit -= 1;

        if (0 >= limit) {
          break;
        }

        aC = fFindDom(aC);

        if (aC) {
          result = fFindColor(aC);
        } else {
          break;
        }
      }

      result = Object(Common_Utils__WEBPACK_IMPORTED_MODULE_15__["isTransparent"])(result) ? '' : result;
    }

    return result;
  };

  _proto.fullScreen = function fullScreen() {
    this.fullScreenMode(true);
    Object(Common_Utils__WEBPACK_IMPORTED_MODULE_15__["windowResize"])();
  };

  _proto.unFullScreen = function unFullScreen() {
    this.fullScreenMode(false);
    Object(Common_Utils__WEBPACK_IMPORTED_MODULE_15__["windowResize"])();
  };

  _proto.toggleFullScreen = function toggleFullScreen() {
    Object(Common_Utils__WEBPACK_IMPORTED_MODULE_15__["removeSelection"])();
    this.fullScreenMode(!this.fullScreenMode());
    Object(Common_Utils__WEBPACK_IMPORTED_MODULE_15__["windowResize"])();
  }
  /**
   * @param {string} sType
   * @returns {void}
   */
  ;

  _proto.replyOrforward = function replyOrforward(sType) {
    if (Storage_Settings__WEBPACK_IMPORTED_MODULE_28__["capa"](Common_Enums__WEBPACK_IMPORTED_MODULE_13__["Capa"].Composer)) {
      Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_32__["showScreenPopup"])(__webpack_require__(/*! View/Popup/Compose */ 122), [sType, Stores_User_Message__WEBPACK_IMPORTED_MODULE_26__[/* default */ "a"].message()]);
    }
  };

  _proto.checkHeaderHeight = function checkHeaderHeight() {
    if (this.oHeaderDom) {
      this.viewBodyTopValue(this.message() ? this.oHeaderDom.height() + Common_Enums__WEBPACK_IMPORTED_MODULE_13__["Magics"].Size20px
      /* padding-(top/bottom): 20px */
      + Common_Enums__WEBPACK_IMPORTED_MODULE_13__["Magics"].Size1px
      /* borded-bottom: 1px */
      : 0);
    }
  } //  displayMailToPopup(sMailToUrl) {
  //		sMailToUrl = sMailToUrl.replace(/\?.+$/, '');
  //
  //		var
  //			sResult = '',
  //			aTo = [],
  //			EmailModel = require('Model/Email').default,
  //			fParseEmailLine = function(sLine) {
  //				return sLine ? _.compact(_.map([window.decodeURIComponent(sLine)], function(sItem) {
  //						var oEmailModel = new EmailModel();
  //						oEmailModel.parse(sItem);
  //						return '' !== oEmailModel.email ? oEmailModel : null;
  //					})) : null;
  //			}
  //		;
  //
  //		aTo = fParseEmailLine(sMailToUrl);
  //		sResult = aTo && aTo[0] ? aTo[0].email : '';
  //
  //		return sResult;
  //	}

  /**
   * @param {Object} oAttachment
   * @returns {boolean}
   */
  ;

  _proto.attachmentPreview = function attachmentPreview(attachment) {
    if (attachment && attachment.isImage() && !attachment.isLinked && this.message() && this.message().attachments()) {
      var index = 0,
          listIndex = 0;

      var div = $__WEBPACK_IMPORTED_MODULE_9___default()('<div>'),
          dynamicEls = ___WEBPACK_IMPORTED_MODULE_8___default.a.compact(_babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_2___default()(___WEBPACK_IMPORTED_MODULE_8___default.a).call(___WEBPACK_IMPORTED_MODULE_8___default.a, this.message().attachments(), function (item) {
        if (item && !item.isLinked && item.isImage()) {
          if (item === attachment) {
            index = listIndex;
          }

          listIndex += 1;
          return {
            src: item.linkPreview(),
            thumb: item.linkThumbnail(),
            subHtml: item.fileName,
            downloadUrl: item.linkPreview()
          };
        }

        return null;
      }));

      if (0 < dynamicEls.length) {
        div.on('onBeforeOpen.lg', function () {
          Object(Common_Globals__WEBPACK_IMPORTED_MODULE_14__["useKeyboardShortcuts"])(false);
          Object(Common_Utils__WEBPACK_IMPORTED_MODULE_15__["removeInFocus"])(true);
        });
        div.on('onCloseAfter.lg', function () {
          Object(Common_Globals__WEBPACK_IMPORTED_MODULE_14__["useKeyboardShortcuts"])(true);
        });
        div.lightGallery({
          dynamic: true,
          loadYoutubeThumbnail: false,
          loadVimeoThumbnail: false,
          thumbWidth: 80,
          thumbContHeight: 95,
          showThumbByDefault: false,
          mode: 'lg-lollipop',
          // 'lg-slide',
          index: index,
          dynamicEl: dynamicEls
        });
      }

      return false;
    }

    return true;
  };

  _proto.onBuild = function onBuild(dom) {
    var _this2 = this;

    var self = this,
        fCheckHeaderHeight = _babel_runtime_corejs3_core_js_stable_instance_bind__WEBPACK_IMPORTED_MODULE_3___default()(___WEBPACK_IMPORTED_MODULE_8___default.a).call(___WEBPACK_IMPORTED_MODULE_8___default.a, this.checkHeaderHeight, this);

    this.oDom = dom;
    this.fullScreenMode.subscribe(function (value) {
      if (value && _this2.message()) {
        Stores_User_App__WEBPACK_IMPORTED_MODULE_22__[/* default */ "a"].focusedState(Common_Enums__WEBPACK_IMPORTED_MODULE_13__["Focused"].MessageView);
      }
    });
    this.showAttachmnetControls.subscribe(fCheckHeaderHeight);
    this.fullScreenMode.subscribe(fCheckHeaderHeight);
    this.showFullInfo.subscribe(fCheckHeaderHeight);
    this.message.subscribe(fCheckHeaderHeight);
    Common_Events__WEBPACK_IMPORTED_MODULE_17__[/* sub */ "b"]('window.resize', ___WEBPACK_IMPORTED_MODULE_8___default.a.throttle(function () {
      ___WEBPACK_IMPORTED_MODULE_8___default.a.delay(fCheckHeaderHeight, 1);

      ___WEBPACK_IMPORTED_MODULE_8___default.a.delay(fCheckHeaderHeight, Common_Enums__WEBPACK_IMPORTED_MODULE_13__["Magics"].Time200ms);

      ___WEBPACK_IMPORTED_MODULE_8___default.a.delay(fCheckHeaderHeight, Common_Enums__WEBPACK_IMPORTED_MODULE_13__["Magics"].Time500ms);
    }, Common_Enums__WEBPACK_IMPORTED_MODULE_13__["Magics"].Time50ms));
    this.showFullInfo.subscribe(function (value) {
      Object(Common_Utils__WEBPACK_IMPORTED_MODULE_15__["windowResize"])();
      Object(Common_Utils__WEBPACK_IMPORTED_MODULE_15__["windowResize"])(Common_Enums__WEBPACK_IMPORTED_MODULE_13__["Magics"].Time200ms);
      Storage_Client__WEBPACK_IMPORTED_MODULE_27__[/* set */ "b"](Common_Enums__WEBPACK_IMPORTED_MODULE_13__["ClientSideKeyName"].MessageHeaderFullInfo, value ? '1' : '0');
    });
    Stores_Social__WEBPACK_IMPORTED_MODULE_21__[/* default */ "a"].appendDropbox();
    this.oHeaderDom = $__WEBPACK_IMPORTED_MODULE_9___default()('.messageItemHeader', dom);
    this.oHeaderDom = this.oHeaderDom[0] ? this.oHeaderDom : null;

    if (this.mobile) {
      dom.on('click', function () {
        Object(Common_Globals__WEBPACK_IMPORTED_MODULE_14__["leftPanelDisabled"])(true);
      });
    }

    dom.on('click', 'a', function (event) {
      // eslint-disable-line prefer-arrow-callback
      // setup maito protocol
      return !(!!event && Common_Enums__WEBPACK_IMPORTED_MODULE_13__["Magics"].EventWhichMouseMiddle !== event.which && Object(Common_Utils__WEBPACK_IMPORTED_MODULE_15__["mailToHelper"])($__WEBPACK_IMPORTED_MODULE_9___default()(this).attr('href'), Storage_Settings__WEBPACK_IMPORTED_MODULE_28__["capa"](Common_Enums__WEBPACK_IMPORTED_MODULE_13__["Capa"].Composer) ? __webpack_require__(/*! View/Popup/Compose */ 122) : null // eslint-disable-line no-invalid-this
      ));
    }).on('click', '.attachmentsPlace .attachmentIconParent', function (event) {
      if (event && event.stopPropagation) {
        event.stopPropagation();
      }
    }).on('click', '.attachmentsPlace .showPreplay', function (event) {
      // eslint-disable-line prefer-arrow-callback
      if (event && event.stopPropagation) {
        event.stopPropagation();
      }

      var attachment = ko__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"].dataFor(this); // eslint-disable-line no-invalid-this

      if (attachment && Common_Audio__WEBPACK_IMPORTED_MODULE_16__[/* default */ "a"].supported) {
        switch (true) {
          case Common_Audio__WEBPACK_IMPORTED_MODULE_16__[/* default */ "a"].supportedMp3 && attachment.isMp3():
            Common_Audio__WEBPACK_IMPORTED_MODULE_16__[/* default */ "a"].playMp3(attachment.linkDownload(), attachment.fileName);
            break;

          case Common_Audio__WEBPACK_IMPORTED_MODULE_16__[/* default */ "a"].supportedOgg && attachment.isOgg():
            Common_Audio__WEBPACK_IMPORTED_MODULE_16__[/* default */ "a"].playOgg(attachment.linkDownload(), attachment.fileName);
            break;

          case Common_Audio__WEBPACK_IMPORTED_MODULE_16__[/* default */ "a"].supportedWav && attachment.isWav():
            Common_Audio__WEBPACK_IMPORTED_MODULE_16__[/* default */ "a"].playWav(attachment.linkDownload(), attachment.fileName);
            break;
          // no default
        }
      }
    }).on('click', '.attachmentsPlace .attachmentItem .attachmentNameParent', function () {
      // eslint-disable-line prefer-arrow-callback
      var attachment = ko__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"].dataFor(this); // eslint-disable-line no-invalid-this

      if (attachment && attachment.download) {
        Object(Helper_Apps_User__WEBPACK_IMPORTED_MODULE_31__[/* getApp */ "a"])().download(attachment.linkDownload());
      }
    }).on('click', '.messageItemHeader .subjectParent .flagParent', function () {
      // eslint-disable-line prefer-arrow-callback
      var message = self.message();

      if (message) {
        Object(Helper_Apps_User__WEBPACK_IMPORTED_MODULE_31__[/* getApp */ "a"])().messageListAction(message.folderFullNameRaw, message.flagged() ? Common_Enums__WEBPACK_IMPORTED_MODULE_13__["MessageSetAction"].UnsetFlag : Common_Enums__WEBPACK_IMPORTED_MODULE_13__["MessageSetAction"].SetFlag, [message]);
      }
    }).on('click', '.thread-list .flagParent', function () {
      // eslint-disable-line prefer-arrow-callback
      var message = ko__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"].dataFor(this); // eslint-disable-line no-invalid-this

      if (message && message.folder && message.uid) {
        Object(Helper_Apps_User__WEBPACK_IMPORTED_MODULE_31__[/* getApp */ "a"])().messageListAction(message.folder, message.flagged() ? Common_Enums__WEBPACK_IMPORTED_MODULE_13__["MessageSetAction"].UnsetFlag : Common_Enums__WEBPACK_IMPORTED_MODULE_13__["MessageSetAction"].SetFlag, [message]);
      }

      self.threadsDropdownTrigger(true);
      return false;
    });
    Stores_User_App__WEBPACK_IMPORTED_MODULE_22__[/* default */ "a"].focusedState.subscribe(function (value) {
      if (Common_Enums__WEBPACK_IMPORTED_MODULE_13__["Focused"].MessageView !== value) {
        _this2.scrollMessageToTop();

        _this2.scrollMessageToLeft();
      }
    });
    Common_Globals__WEBPACK_IMPORTED_MODULE_14__["keyScopeReal"].subscribe(function (value) {
      _this2.messageDomFocused(Common_Enums__WEBPACK_IMPORTED_MODULE_13__["KeyState"].MessageView === value && !Object(Common_Utils__WEBPACK_IMPORTED_MODULE_15__["inFocus"])());
    });
    this.oMessageScrollerDom = _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_1___default()(dom).call(dom, '.messageItem .content');
    this.oMessageScrollerDom = this.oMessageScrollerDom && this.oMessageScrollerDom[0] ? this.oMessageScrollerDom : null;
    this.initShortcuts();
  }
  /**
   * @returns {boolean}
   */
  ;

  _proto.escShortcuts = function escShortcuts() {
    if (this.viewModelVisibility() && this.message()) {
      if (this.fullScreenMode()) {
        this.fullScreenMode(false);

        if (Common_Enums__WEBPACK_IMPORTED_MODULE_13__["Layout"].NoPreview !== this.layout()) {
          Stores_User_App__WEBPACK_IMPORTED_MODULE_22__[/* default */ "a"].focusedState(Common_Enums__WEBPACK_IMPORTED_MODULE_13__["Focused"].MessageList);
        }
      } else if (Common_Enums__WEBPACK_IMPORTED_MODULE_13__["Layout"].NoPreview === this.layout()) {
        this.message(null);
      } else {
        Stores_User_App__WEBPACK_IMPORTED_MODULE_22__[/* default */ "a"].focusedState(Common_Enums__WEBPACK_IMPORTED_MODULE_13__["Focused"].MessageList);
      }

      return false;
    }

    return true;
  };

  _proto.initShortcuts = function initShortcuts() {
    var _this3 = this;

    // exit fullscreen, back
    key__WEBPACK_IMPORTED_MODULE_11___default()('esc, backspace', Common_Enums__WEBPACK_IMPORTED_MODULE_13__["KeyState"].MessageView, _babel_runtime_corejs3_core_js_stable_instance_bind__WEBPACK_IMPORTED_MODULE_3___default()(___WEBPACK_IMPORTED_MODULE_8___default.a).call(___WEBPACK_IMPORTED_MODULE_8___default.a, this.escShortcuts, this)); // fullscreen

    key__WEBPACK_IMPORTED_MODULE_11___default()('enter', Common_Enums__WEBPACK_IMPORTED_MODULE_13__["KeyState"].MessageView, function () {
      _this3.toggleFullScreen();

      return false;
    }); // reply

    key__WEBPACK_IMPORTED_MODULE_11___default()('r', [Common_Enums__WEBPACK_IMPORTED_MODULE_13__["KeyState"].MessageList, Common_Enums__WEBPACK_IMPORTED_MODULE_13__["KeyState"].MessageView], function () {
      if (Stores_User_Message__WEBPACK_IMPORTED_MODULE_26__[/* default */ "a"].message()) {
        _this3.replyCommand();

        return false;
      }

      return true;
    }); // replaAll

    key__WEBPACK_IMPORTED_MODULE_11___default()('a', [Common_Enums__WEBPACK_IMPORTED_MODULE_13__["KeyState"].MessageList, Common_Enums__WEBPACK_IMPORTED_MODULE_13__["KeyState"].MessageView], function () {
      if (Stores_User_Message__WEBPACK_IMPORTED_MODULE_26__[/* default */ "a"].message()) {
        _this3.replyAllCommand();

        return false;
      }

      return true;
    }); // forward

    key__WEBPACK_IMPORTED_MODULE_11___default()('f', [Common_Enums__WEBPACK_IMPORTED_MODULE_13__["KeyState"].MessageList, Common_Enums__WEBPACK_IMPORTED_MODULE_13__["KeyState"].MessageView], function () {
      if (Stores_User_Message__WEBPACK_IMPORTED_MODULE_26__[/* default */ "a"].message()) {
        _this3.forwardCommand();

        return false;
      }

      return true;
    }); // message information

    key__WEBPACK_IMPORTED_MODULE_11___default()('ctrl+i, command+i', [Common_Enums__WEBPACK_IMPORTED_MODULE_13__["KeyState"].MessageList, Common_Enums__WEBPACK_IMPORTED_MODULE_13__["KeyState"].MessageView], function () {
      if (Stores_User_Message__WEBPACK_IMPORTED_MODULE_26__[/* default */ "a"].message()) {
        _this3.showFullInfo(!_this3.showFullInfo());
      }

      return false;
    }); // toggle message blockquotes

    key__WEBPACK_IMPORTED_MODULE_11___default()('b', [Common_Enums__WEBPACK_IMPORTED_MODULE_13__["KeyState"].MessageList, Common_Enums__WEBPACK_IMPORTED_MODULE_13__["KeyState"].MessageView], function () {
      if (Stores_User_Message__WEBPACK_IMPORTED_MODULE_26__[/* default */ "a"].message() && Stores_User_Message__WEBPACK_IMPORTED_MODULE_26__[/* default */ "a"].message().body) {
        var _context;

        _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_1___default()(_context = Stores_User_Message__WEBPACK_IMPORTED_MODULE_26__[/* default */ "a"].message().body).call(_context, '.rlBlockquoteSwitcher').click();

        return false;
      }

      return true;
    });
    key__WEBPACK_IMPORTED_MODULE_11___default()('ctrl+up, command+up, ctrl+left, command+left', [Common_Enums__WEBPACK_IMPORTED_MODULE_13__["KeyState"].MessageList, Common_Enums__WEBPACK_IMPORTED_MODULE_13__["KeyState"].MessageView], function () {
      _this3.goUpCommand();

      return false;
    });
    key__WEBPACK_IMPORTED_MODULE_11___default()('ctrl+down, command+down, ctrl+right, command+right', [Common_Enums__WEBPACK_IMPORTED_MODULE_13__["KeyState"].MessageList, Common_Enums__WEBPACK_IMPORTED_MODULE_13__["KeyState"].MessageView], function () {
      _this3.goDownCommand();

      return false;
    }); // print

    key__WEBPACK_IMPORTED_MODULE_11___default()('ctrl+p, command+p', [Common_Enums__WEBPACK_IMPORTED_MODULE_13__["KeyState"].MessageView, Common_Enums__WEBPACK_IMPORTED_MODULE_13__["KeyState"].MessageList], function () {
      if (_this3.message()) {
        _this3.message().printMessage();
      }

      return false;
    }); // delete

    key__WEBPACK_IMPORTED_MODULE_11___default()('delete, shift+delete', Common_Enums__WEBPACK_IMPORTED_MODULE_13__["KeyState"].MessageView, function (event, handler) {
      if (event) {
        if (handler && 'shift+delete' === handler.shortcut) {
          _this3.deleteWithoutMoveCommand();
        } else {
          _this3.deleteCommand();
        }

        return false;
      }

      return true;
    }); // change focused state

    key__WEBPACK_IMPORTED_MODULE_11___default()('tab, shift+tab, left', Common_Enums__WEBPACK_IMPORTED_MODULE_13__["KeyState"].MessageView, function (event, handler) {
      if (!_this3.fullScreenMode() && _this3.message() && Common_Enums__WEBPACK_IMPORTED_MODULE_13__["Layout"].NoPreview !== _this3.layout()) {
        if (event && handler && 'left' === handler.shortcut) {
          if (_this3.oMessageScrollerDom && 0 < _this3.oMessageScrollerDom.scrollLeft()) {
            return true;
          }

          Stores_User_App__WEBPACK_IMPORTED_MODULE_22__[/* default */ "a"].focusedState(Common_Enums__WEBPACK_IMPORTED_MODULE_13__["Focused"].MessageList);
        } else {
          Stores_User_App__WEBPACK_IMPORTED_MODULE_22__[/* default */ "a"].focusedState(Common_Enums__WEBPACK_IMPORTED_MODULE_13__["Focused"].MessageList);
        }
      } else if (_this3.message() && Common_Enums__WEBPACK_IMPORTED_MODULE_13__["Layout"].NoPreview === _this3.layout() && event && handler && 'left' === handler.shortcut) {
        return true;
      }

      return false;
    });
  }
  /**
   * @returns {boolean}
   */
  ;

  _proto.isDraftFolder = function isDraftFolder() {
    return Stores_User_Message__WEBPACK_IMPORTED_MODULE_26__[/* default */ "a"].message() && Stores_User_Folder__WEBPACK_IMPORTED_MODULE_25__[/* default */ "a"].draftFolder() === Stores_User_Message__WEBPACK_IMPORTED_MODULE_26__[/* default */ "a"].message().folderFullNameRaw;
  }
  /**
   * @returns {boolean}
   */
  ;

  _proto.isSentFolder = function isSentFolder() {
    return Stores_User_Message__WEBPACK_IMPORTED_MODULE_26__[/* default */ "a"].message() && Stores_User_Folder__WEBPACK_IMPORTED_MODULE_25__[/* default */ "a"].sentFolder() === Stores_User_Message__WEBPACK_IMPORTED_MODULE_26__[/* default */ "a"].message().folderFullNameRaw;
  }
  /**
   * @returns {boolean}
   */
  ;

  _proto.isSpamFolder = function isSpamFolder() {
    return Stores_User_Message__WEBPACK_IMPORTED_MODULE_26__[/* default */ "a"].message() && Stores_User_Folder__WEBPACK_IMPORTED_MODULE_25__[/* default */ "a"].spamFolder() === Stores_User_Message__WEBPACK_IMPORTED_MODULE_26__[/* default */ "a"].message().folderFullNameRaw;
  }
  /**
   * @returns {boolean}
   */
  ;

  _proto.isSpamDisabled = function isSpamDisabled() {
    return Stores_User_Message__WEBPACK_IMPORTED_MODULE_26__[/* default */ "a"].message() && Stores_User_Folder__WEBPACK_IMPORTED_MODULE_25__[/* default */ "a"].spamFolder() === Common_Consts__WEBPACK_IMPORTED_MODULE_12__[/* UNUSED_OPTION_VALUE */ "r"];
  }
  /**
   * @returns {boolean}
   */
  ;

  _proto.isArchiveFolder = function isArchiveFolder() {
    return Stores_User_Message__WEBPACK_IMPORTED_MODULE_26__[/* default */ "a"].message() && Stores_User_Folder__WEBPACK_IMPORTED_MODULE_25__[/* default */ "a"].archiveFolder() === Stores_User_Message__WEBPACK_IMPORTED_MODULE_26__[/* default */ "a"].message().folderFullNameRaw;
  }
  /**
   * @returns {boolean}
   */
  ;

  _proto.isArchiveDisabled = function isArchiveDisabled() {
    return Stores_User_Message__WEBPACK_IMPORTED_MODULE_26__[/* default */ "a"].message() && Stores_User_Folder__WEBPACK_IMPORTED_MODULE_25__[/* default */ "a"].archiveFolder() === Common_Consts__WEBPACK_IMPORTED_MODULE_12__[/* UNUSED_OPTION_VALUE */ "r"];
  }
  /**
   * @returns {boolean}
   */
  ;

  _proto.isDraftOrSentFolder = function isDraftOrSentFolder() {
    return this.isDraftFolder() || this.isSentFolder();
  };

  _proto.composeClick = function composeClick() {
    if (Storage_Settings__WEBPACK_IMPORTED_MODULE_28__["capa"](Common_Enums__WEBPACK_IMPORTED_MODULE_13__["Capa"].Composer)) {
      Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_32__["showScreenPopup"])(__webpack_require__(/*! View/Popup/Compose */ 122));
    }
  };

  _proto.editMessage = function editMessage() {
    if (Storage_Settings__WEBPACK_IMPORTED_MODULE_28__["capa"](Common_Enums__WEBPACK_IMPORTED_MODULE_13__["Capa"].Composer) && Stores_User_Message__WEBPACK_IMPORTED_MODULE_26__[/* default */ "a"].message()) {
      Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_32__["showScreenPopup"])(__webpack_require__(/*! View/Popup/Compose */ 122), [Common_Enums__WEBPACK_IMPORTED_MODULE_13__["ComposeType"].Draft, Stores_User_Message__WEBPACK_IMPORTED_MODULE_26__[/* default */ "a"].message()]);
    }
  };

  _proto.scrollMessageToTop = function scrollMessageToTop() {
    if (this.oMessageScrollerDom) {
      if (Common_Enums__WEBPACK_IMPORTED_MODULE_13__["Magics"].Size50px < this.oMessageScrollerDom.scrollTop()) {
        this.oMessageScrollerDom.scrollTop(Common_Enums__WEBPACK_IMPORTED_MODULE_13__["Magics"].Size50px).animate({
          'scrollTop': 0
        }, Common_Enums__WEBPACK_IMPORTED_MODULE_13__["Magics"].Time200ms);
      } else {
        this.oMessageScrollerDom.scrollTop(0);
      }

      Object(Common_Utils__WEBPACK_IMPORTED_MODULE_15__["windowResize"])();
    }
  };

  _proto.scrollMessageToLeft = function scrollMessageToLeft() {
    if (this.oMessageScrollerDom) {
      this.oMessageScrollerDom.scrollLeft(0);
      Object(Common_Utils__WEBPACK_IMPORTED_MODULE_15__["windowResize"])();
    }
  };

  _proto.getAttachmentsHashes = function getAttachmentsHashes() {
    var atts = this.message() ? this.message().attachments() : [];
    return ___WEBPACK_IMPORTED_MODULE_8___default.a.compact(_babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_2___default()(___WEBPACK_IMPORTED_MODULE_8___default.a).call(___WEBPACK_IMPORTED_MODULE_8___default.a, atts, function (item) {
      return item && !item.isLinked && item.checked() ? item.download : '';
    }));
  };

  _proto.downloadAsZip = function downloadAsZip() {
    var _this4 = this;

    var hashes = this.getAttachmentsHashes();

    if (0 < hashes.length) {
      Promises_User_Ajax__WEBPACK_IMPORTED_MODULE_30__[/* default */ "a"].attachmentsActions('Zip', hashes, this.downloadAsZipLoading).then(function (result) {
        if (result && result.Result && result.Result.Files && result.Result.Files[0] && result.Result.Files[0].Hash) {
          Object(Helper_Apps_User__WEBPACK_IMPORTED_MODULE_31__[/* getApp */ "a"])().download(Object(Common_Links__WEBPACK_IMPORTED_MODULE_19__[/* attachmentDownload */ "c"])(result.Result.Files[0].Hash));
        } else {
          _this4.downloadAsZipError(true);
        }
      }).catch(function () {
        _this4.downloadAsZipError(true);
      });
    } else {
      this.highlightUnselectedAttachments(true);
    }
  };

  _proto.saveToOwnCloud = function saveToOwnCloud() {
    var _this5 = this;

    var hashes = this.getAttachmentsHashes();

    if (0 < hashes.length) {
      Promises_User_Ajax__WEBPACK_IMPORTED_MODULE_30__[/* default */ "a"].attachmentsActions('OwnCloud', hashes, this.saveToOwnCloudLoading).then(function (result) {
        if (result && result.Result) {
          _this5.saveToOwnCloudSuccess(true);
        } else {
          _this5.saveToOwnCloudError(true);
        }
      }).catch(function () {
        _this5.saveToOwnCloudError(true);
      });
    } else {
      this.highlightUnselectedAttachments(true);
    }
  };

  _proto.saveToDropbox = function saveToDropbox() {
    var _this6 = this;

    var files = [],
        hashes = this.getAttachmentsHashes();

    if (0 < hashes.length) {
      if (window__WEBPACK_IMPORTED_MODULE_7___default.a.Dropbox) {
        Promises_User_Ajax__WEBPACK_IMPORTED_MODULE_30__[/* default */ "a"].attachmentsActions('Dropbox', hashes, this.saveToDropboxLoading).then(function (result) {
          if (result && result.Result && result.Result.Url && result.Result.ShortLife && result.Result.Files) {
            if (window__WEBPACK_IMPORTED_MODULE_7___default.a.Dropbox && Object(Common_Utils__WEBPACK_IMPORTED_MODULE_15__["isArray"])(result.Result.Files)) {
              ___WEBPACK_IMPORTED_MODULE_8___default.a.each(result.Result.Files, function (item) {
                files.push({
                  url: result.Result.Url + Object(Common_Links__WEBPACK_IMPORTED_MODULE_19__[/* attachmentDownload */ "c"])(item.Hash, result.Result.ShortLife),
                  filename: item.FileName
                });
              });

              window__WEBPACK_IMPORTED_MODULE_7___default.a.Dropbox.save({
                files: files,
                progress: function progress() {
                  _this6.saveToDropboxLoading(true);

                  _this6.saveToDropboxError(false);

                  _this6.saveToDropboxSuccess(false);
                },
                cancel: function cancel() {
                  _this6.saveToDropboxSuccess(false);

                  _this6.saveToDropboxError(false);

                  _this6.saveToDropboxLoading(false);
                },
                success: function success() {
                  _this6.saveToDropboxSuccess(true);

                  _this6.saveToDropboxLoading(false);
                },
                error: function error() {
                  _this6.saveToDropboxError(true);

                  _this6.saveToDropboxLoading(false);
                }
              });
            } else {
              _this6.saveToDropboxError(true);
            }
          }
        }).catch(function () {
          _this6.saveToDropboxError(true);
        });
      }
    } else {
      this.highlightUnselectedAttachments(true);
    }
  }
  /**
   * @param {MessageModel} oMessage
   * @returns {void}
   */
  ;

  _proto.showImages = function showImages(message) {
    if (message && message.showExternalImages) {
      message.showExternalImages(true);
    }

    this.checkHeaderHeight();
  }
  /**
   * @returns {string}
   */
  ;

  _proto.printableCheckedMessageCount = function printableCheckedMessageCount() {
    var cnt = this.messageListCheckedOrSelectedUidsWithSubMails().length;
    return 0 < cnt ? 100 > cnt ? cnt : '99+' : ''; // eslint-disable-line no-magic-numbers
  }
  /**
   * @param {MessageModel} oMessage
   * @returns {void}
   */
  ;

  _proto.readReceipt = function readReceipt(oMessage) {
    if (oMessage && '' !== oMessage.readReceipt()) {
      Remote_User_Ajax__WEBPACK_IMPORTED_MODULE_29__[/* default */ "a"].sendReadReceiptMessage(Common_Utils__WEBPACK_IMPORTED_MODULE_15__["noop"], oMessage.folderFullNameRaw, oMessage.uid, oMessage.readReceipt(), Object(Common_Translator__WEBPACK_IMPORTED_MODULE_18__["i18n"])('READ_RECEIPT/SUBJECT', {
        'SUBJECT': oMessage.subject()
      }), Object(Common_Translator__WEBPACK_IMPORTED_MODULE_18__["i18n"])('READ_RECEIPT/BODY', {
        'READ-RECEIPT': Stores_User_Account__WEBPACK_IMPORTED_MODULE_24__[/* default */ "a"].email()
      }));
      oMessage.isReadReceipt(true);
      Object(Common_Cache__WEBPACK_IMPORTED_MODULE_20__[/* storeMessageFlagsToCache */ "u"])(oMessage);
      Object(Helper_Apps_User__WEBPACK_IMPORTED_MODULE_31__[/* getApp */ "a"])().reloadFlagsCurrentMessageListAndMessageFromCache();
    }

    this.checkHeaderHeight();
  };

  return MessageViewMailBoxUserView;
}(Knoin_AbstractViewNext__WEBPACK_IMPORTED_MODULE_33__[/* AbstractViewNext */ "a"]), (Object(_babel_runtime_corejs3_helpers_esm_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"])(_class2.prototype, "closeMessageCommand", [_dec2], _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_0___default()(_class2.prototype, "closeMessageCommand"), _class2.prototype), Object(_babel_runtime_corejs3_helpers_esm_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"])(_class2.prototype, "messageVisibilityCommand", [_dec3], _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_0___default()(_class2.prototype, "messageVisibilityCommand"), _class2.prototype), Object(_babel_runtime_corejs3_helpers_esm_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"])(_class2.prototype, "messageEditCommand", [_dec4], _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_0___default()(_class2.prototype, "messageEditCommand"), _class2.prototype), Object(_babel_runtime_corejs3_helpers_esm_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"])(_class2.prototype, "goUpCommand", [_dec5], _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_0___default()(_class2.prototype, "goUpCommand"), _class2.prototype), Object(_babel_runtime_corejs3_helpers_esm_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"])(_class2.prototype, "goDownCommand", [_dec6], _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_0___default()(_class2.prototype, "goDownCommand"), _class2.prototype)), _class2)) || _class);


/***/ }),
/* 436 */
/*!*************************************!*\
  !*** ./dev/Screen/User/Settings.js ***!
  \*************************************/
/*! exports provided: SettingsUserScreen, default */
/*! exports used: SettingsUserScreen */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return SettingsUserScreen; });
/* unused harmony export default */
/* harmony import */ var _babel_runtime_corejs3_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/esm/inheritsLoose */ 10);
/* harmony import */ var Common_Enums__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! Common/Enums */ 0);
/* harmony import */ var Common_Globals__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! Common/Globals */ 6);
/* harmony import */ var Common_Plugins__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! Common/Plugins */ 39);
/* harmony import */ var Common_Translator__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! Common/Translator */ 9);
/* harmony import */ var Stores_User_App__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! Stores/User/App */ 31);
/* harmony import */ var Stores_User_Account__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! Stores/User/Account */ 46);
/* harmony import */ var Storage_Settings__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! Storage/Settings */ 5);
/* harmony import */ var Knoin_Knoin__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! Knoin/Knoin */ 7);
/* harmony import */ var Screen_AbstractSettings__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! Screen/AbstractSettings */ 264);
/* harmony import */ var Settings_User_General__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! Settings/User/General */ 437);
/* harmony import */ var Settings_User_Contacts__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! Settings/User/Contacts */ 438);
/* harmony import */ var Settings_User_Accounts__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! Settings/User/Accounts */ 439);
/* harmony import */ var Settings_User_Filters__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! Settings/User/Filters */ 440);
/* harmony import */ var Settings_User_Security__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! Settings/User/Security */ 441);
/* harmony import */ var Settings_User_Social__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! Settings/User/Social */ 442);
/* harmony import */ var Settings_User_ChangePassword__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! Settings/User/ChangePassword */ 443);
/* harmony import */ var Settings_User_Templates__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! Settings/User/Templates */ 444);
/* harmony import */ var Settings_User_Folders__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! Settings/User/Folders */ 445);
/* harmony import */ var Settings_User_Themes__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! Settings/User/Themes */ 446);
/* harmony import */ var Settings_User_OpenPgp__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! Settings/User/OpenPgp */ 447);
/* harmony import */ var View_User_Settings_SystemDropDown__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! View/User/Settings/SystemDropDown */ 448);
/* harmony import */ var View_User_Settings_Menu__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! View/User/Settings/Menu */ 449);
/* harmony import */ var View_User_Settings_Pane__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! View/User/Settings/Pane */ 450);
/* harmony import */ var Helper_Apps_User__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! Helper/Apps/User */ 22);


























var SettingsUserScreen =
/*#__PURE__*/
function (_AbstractSettingsScre) {
  Object(_babel_runtime_corejs3_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(SettingsUserScreen, _AbstractSettingsScre);

  function SettingsUserScreen() {
    var _this;

    _this = _AbstractSettingsScre.call(this, [View_User_Settings_SystemDropDown__WEBPACK_IMPORTED_MODULE_21__[/* SystemDropDownSettingsUserView */ "a"], View_User_Settings_Menu__WEBPACK_IMPORTED_MODULE_22__[/* MenuSettingsUserView */ "a"], View_User_Settings_Pane__WEBPACK_IMPORTED_MODULE_23__[/* PaneSettingsUserView */ "a"]]) || this;
    Object(Common_Translator__WEBPACK_IMPORTED_MODULE_4__["initOnStartOrLangChange"])(function () {
      _this.sSettingsTitle = Object(Common_Translator__WEBPACK_IMPORTED_MODULE_4__["i18n"])('TITLES/SETTINGS');
    }, function () {
      _this.setSettingsTitle();
    });
    return _this;
  }
  /**
   * @param {Function=} fCallback
   */


  var _proto = SettingsUserScreen.prototype;

  _proto.setupSettings = function setupSettings(fCallback) {
    if (fCallback === void 0) {
      fCallback = null;
    }

    if (!Storage_Settings__WEBPACK_IMPORTED_MODULE_7__["capa"](Common_Enums__WEBPACK_IMPORTED_MODULE_1__["Capa"].Settings)) {
      if (fCallback) {
        fCallback();
      }

      return false;
    }

    Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_8__["addSettingsViewModel"])(Settings_User_General__WEBPACK_IMPORTED_MODULE_10__[/* GeneralUserSettings */ "a"], 'SettingsGeneral', 'SETTINGS_LABELS/LABEL_GENERAL_NAME', 'general', true);

    if (Stores_User_App__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"].contactsIsAllowed()) {
      Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_8__["addSettingsViewModel"])(Settings_User_Contacts__WEBPACK_IMPORTED_MODULE_11__[/* ContactsUserSettings */ "a"], 'SettingsContacts', 'SETTINGS_LABELS/LABEL_CONTACTS_NAME', 'contacts');
    }

    if (Storage_Settings__WEBPACK_IMPORTED_MODULE_7__["capa"](Common_Enums__WEBPACK_IMPORTED_MODULE_1__["Capa"].AdditionalAccounts) || Storage_Settings__WEBPACK_IMPORTED_MODULE_7__["capa"](Common_Enums__WEBPACK_IMPORTED_MODULE_1__["Capa"].Identities)) {
      Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_8__["addSettingsViewModel"])(Settings_User_Accounts__WEBPACK_IMPORTED_MODULE_12__[/* AccountsUserSettings */ "a"], 'SettingsAccounts', Storage_Settings__WEBPACK_IMPORTED_MODULE_7__["capa"](Common_Enums__WEBPACK_IMPORTED_MODULE_1__["Capa"].AdditionalAccounts) ? 'SETTINGS_LABELS/LABEL_ACCOUNTS_NAME' : 'SETTINGS_LABELS/LABEL_IDENTITIES_NAME', 'accounts');
    }

    if (Storage_Settings__WEBPACK_IMPORTED_MODULE_7__["capa"](Common_Enums__WEBPACK_IMPORTED_MODULE_1__["Capa"].Sieve)) {
      Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_8__["addSettingsViewModel"])(Settings_User_Filters__WEBPACK_IMPORTED_MODULE_13__[/* FiltersUserSettings */ "a"], 'SettingsFilters', 'SETTINGS_LABELS/LABEL_FILTERS_NAME', 'filters');
    }

    if (Storage_Settings__WEBPACK_IMPORTED_MODULE_7__["capa"](Common_Enums__WEBPACK_IMPORTED_MODULE_1__["Capa"].AutoLogout) || Storage_Settings__WEBPACK_IMPORTED_MODULE_7__["capa"](Common_Enums__WEBPACK_IMPORTED_MODULE_1__["Capa"].TwoFactor)) {
      Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_8__["addSettingsViewModel"])(Settings_User_Security__WEBPACK_IMPORTED_MODULE_14__[/* SecurityUserSettings */ "a"], 'SettingsSecurity', 'SETTINGS_LABELS/LABEL_SECURITY_NAME', 'security');
    }

    if (Stores_User_Account__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"].isRootAccount() && (Storage_Settings__WEBPACK_IMPORTED_MODULE_7__["settingsGet"]('AllowGoogleSocial') && Storage_Settings__WEBPACK_IMPORTED_MODULE_7__["settingsGet"]('AllowGoogleSocialAuth') || Storage_Settings__WEBPACK_IMPORTED_MODULE_7__["settingsGet"]('AllowFacebookSocial') || Storage_Settings__WEBPACK_IMPORTED_MODULE_7__["settingsGet"]('AllowTwitterSocial'))) {
      Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_8__["addSettingsViewModel"])(Settings_User_Social__WEBPACK_IMPORTED_MODULE_15__[/* SocialUserSettings */ "a"], 'SettingsSocial', 'SETTINGS_LABELS/LABEL_SOCIAL_NAME', 'social');
    }

    if (Storage_Settings__WEBPACK_IMPORTED_MODULE_7__["settingsGet"]('ChangePasswordIsAllowed')) {
      Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_8__["addSettingsViewModel"])(Settings_User_ChangePassword__WEBPACK_IMPORTED_MODULE_16__[/* ChangePasswordUserSettings */ "a"], 'SettingsChangePassword', 'SETTINGS_LABELS/LABEL_CHANGE_PASSWORD_NAME', 'change-password');
    }

    if (Storage_Settings__WEBPACK_IMPORTED_MODULE_7__["capa"](Common_Enums__WEBPACK_IMPORTED_MODULE_1__["Capa"].Templates)) {
      Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_8__["addSettingsViewModel"])(Settings_User_Templates__WEBPACK_IMPORTED_MODULE_17__[/* TemplatesUserSettings */ "a"], 'SettingsTemplates', 'SETTINGS_LABELS/LABEL_TEMPLATES_NAME', 'templates');
    }

    if (Storage_Settings__WEBPACK_IMPORTED_MODULE_7__["capa"](Common_Enums__WEBPACK_IMPORTED_MODULE_1__["Capa"].Folders)) {
      Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_8__["addSettingsViewModel"])(Settings_User_Folders__WEBPACK_IMPORTED_MODULE_18__[/* FoldersUserSettings */ "a"], 'SettingsFolders', 'SETTINGS_LABELS/LABEL_FOLDERS_NAME', 'folders');
    }

    if (Storage_Settings__WEBPACK_IMPORTED_MODULE_7__["capa"](Common_Enums__WEBPACK_IMPORTED_MODULE_1__["Capa"].Themes)) {
      Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_8__["addSettingsViewModel"])(Settings_User_Themes__WEBPACK_IMPORTED_MODULE_19__[/* ThemesUserSettings */ "a"], 'SettingsThemes', 'SETTINGS_LABELS/LABEL_THEMES_NAME', 'themes');
    }

    if (Storage_Settings__WEBPACK_IMPORTED_MODULE_7__["capa"](Common_Enums__WEBPACK_IMPORTED_MODULE_1__["Capa"].OpenPGP)) {
      Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_8__["addSettingsViewModel"])(Settings_User_OpenPgp__WEBPACK_IMPORTED_MODULE_20__[/* OpenPgpUserSettings */ "a"], 'SettingsOpenPGP', 'SETTINGS_LABELS/LABEL_OPEN_PGP_NAME', 'openpgp');
    }

    Object(Common_Plugins__WEBPACK_IMPORTED_MODULE_3__[/* runSettingsViewModelHooks */ "g"])(false);

    if (fCallback) {
      fCallback();
    }

    return true;
  };

  _proto.onShow = function onShow() {
    this.setSettingsTitle();
    Object(Common_Globals__WEBPACK_IMPORTED_MODULE_2__["keyScope"])(Common_Enums__WEBPACK_IMPORTED_MODULE_1__["KeyState"].Settings);
    Object(Common_Globals__WEBPACK_IMPORTED_MODULE_2__["leftPanelType"])('');

    if (Storage_Settings__WEBPACK_IMPORTED_MODULE_7__["appSettingsGet"]('mobile')) {
      Object(Common_Globals__WEBPACK_IMPORTED_MODULE_2__["leftPanelDisabled"])(true);
    }
  };

  _proto.setSettingsTitle = function setSettingsTitle() {
    var sEmail = Stores_User_Account__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"].email();
    Object(Helper_Apps_User__WEBPACK_IMPORTED_MODULE_24__[/* getApp */ "a"])().setWindowTitle(('' === sEmail ? '' : sEmail + ' - ') + this.sSettingsTitle);
  };

  return SettingsUserScreen;
}(Screen_AbstractSettings__WEBPACK_IMPORTED_MODULE_9__[/* AbstractSettingsScreen */ "a"]);



/***/ }),
/* 437 */
/*!**************************************!*\
  !*** ./dev/Settings/User/General.js ***!
  \**************************************/
/*! exports provided: GeneralUserSettings, default */
/*! exports used: GeneralUserSettings */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return GeneralUserSettings; });
/* unused harmony export default */
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/find */ 12);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! _ */ 3);
/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(___WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var ko__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ko */ 1);
/* harmony import */ var Common_Consts__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! Common/Consts */ 25);
/* harmony import */ var Common_Globals__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! Common/Globals */ 6);
/* harmony import */ var Common_Enums__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! Common/Enums */ 0);
/* harmony import */ var Common_Utils__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! Common/Utils */ 2);
/* harmony import */ var Common_Translator__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! Common/Translator */ 9);
/* harmony import */ var Knoin_Knoin__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! Knoin/Knoin */ 7);
/* harmony import */ var Stores_User_App__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! Stores/User/App */ 31);
/* harmony import */ var Stores_Language__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! Stores/Language */ 70);
/* harmony import */ var Stores_User_Settings__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! Stores/User/Settings */ 38);
/* harmony import */ var Stores_User_Identity__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! Stores/User/Identity */ 99);
/* harmony import */ var Stores_User_Notification__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! Stores/User/Notification */ 115);
/* harmony import */ var Stores_User_Message__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! Stores/User/Message */ 13);
/* harmony import */ var Remote_User_Ajax__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! Remote/User/Ajax */ 16);

















var GeneralUserSettings =
/*#__PURE__*/
function () {
  function GeneralUserSettings() {
    var _this = this;

    this.language = Stores_Language__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"].language;
    this.languages = Stores_Language__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"].languages;
    this.messagesPerPage = Stores_User_Settings__WEBPACK_IMPORTED_MODULE_11__[/* default */ "a"].messagesPerPage;
    this.messagesPerPageArray = Common_Consts__WEBPACK_IMPORTED_MODULE_3__[/* MESSAGES_PER_PAGE_VALUES */ "j"];
    this.editorDefaultType = Stores_User_Settings__WEBPACK_IMPORTED_MODULE_11__[/* default */ "a"].editorDefaultType;
    this.layout = Stores_User_Settings__WEBPACK_IMPORTED_MODULE_11__[/* default */ "a"].layout;
    this.usePreviewPane = Stores_User_Settings__WEBPACK_IMPORTED_MODULE_11__[/* default */ "a"].usePreviewPane;
    this.soundNotificationIsSupported = Stores_User_Notification__WEBPACK_IMPORTED_MODULE_13__[/* default */ "a"].soundNotificationIsSupported;
    this.enableSoundNotification = Stores_User_Notification__WEBPACK_IMPORTED_MODULE_13__[/* default */ "a"].enableSoundNotification;
    this.enableDesktopNotification = Stores_User_Notification__WEBPACK_IMPORTED_MODULE_13__[/* default */ "a"].enableDesktopNotification;
    this.isDesktopNotificationSupported = Stores_User_Notification__WEBPACK_IMPORTED_MODULE_13__[/* default */ "a"].isDesktopNotificationSupported;
    this.isDesktopNotificationDenied = Stores_User_Notification__WEBPACK_IMPORTED_MODULE_13__[/* default */ "a"].isDesktopNotificationDenied;
    this.showImages = Stores_User_Settings__WEBPACK_IMPORTED_MODULE_11__[/* default */ "a"].showImages;
    this.useCheckboxesInList = Stores_User_Settings__WEBPACK_IMPORTED_MODULE_11__[/* default */ "a"].useCheckboxesInList;
    this.threadsAllowed = Stores_User_App__WEBPACK_IMPORTED_MODULE_9__[/* default */ "a"].threadsAllowed;
    this.useThreads = Stores_User_Settings__WEBPACK_IMPORTED_MODULE_11__[/* default */ "a"].useThreads;
    this.replySameFolder = Stores_User_Settings__WEBPACK_IMPORTED_MODULE_11__[/* default */ "a"].replySameFolder;
    this.allowLanguagesOnSettings = Stores_User_App__WEBPACK_IMPORTED_MODULE_9__[/* default */ "a"].allowLanguagesOnSettings;
    this.languageFullName = ko__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"].computed(function () {
      return Object(Common_Utils__WEBPACK_IMPORTED_MODULE_6__["convertLangName"])(_this.language());
    });
    this.languageTrigger = ko__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"].observable(Common_Enums__WEBPACK_IMPORTED_MODULE_5__["SaveSettingsStep"].Idle).extend({
      throttle: Common_Enums__WEBPACK_IMPORTED_MODULE_5__["Magics"].Time100ms
    });
    this.mppTrigger = ko__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"].observable(Common_Enums__WEBPACK_IMPORTED_MODULE_5__["SaveSettingsStep"].Idle);
    this.editorDefaultTypeTrigger = ko__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"].observable(Common_Enums__WEBPACK_IMPORTED_MODULE_5__["SaveSettingsStep"].Idle);
    this.layoutTrigger = ko__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"].observable(Common_Enums__WEBPACK_IMPORTED_MODULE_5__["SaveSettingsStep"].Idle);
    this.isAnimationSupported = Common_Globals__WEBPACK_IMPORTED_MODULE_4__["bAnimationSupported"];
    this.identities = Stores_User_Identity__WEBPACK_IMPORTED_MODULE_12__[/* default */ "a"].identities;
    this.identityMain = ko__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"].computed(function () {
      var list = _this.identities();

      return Object(Common_Utils__WEBPACK_IMPORTED_MODULE_6__["isArray"])(list) ? _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_0___default()(___WEBPACK_IMPORTED_MODULE_1___default.a).call(___WEBPACK_IMPORTED_MODULE_1___default.a, list, function (item) {
        return item && '' === item.id();
      }) : null;
    });
    this.identityMainDesc = ko__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"].computed(function () {
      var identity = _this.identityMain();

      return identity ? identity.formattedName() : '---';
    });
    this.editorDefaultTypes = ko__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"].computed(function () {
      Object(Common_Translator__WEBPACK_IMPORTED_MODULE_7__["trigger"])();
      return [{
        'id': Common_Enums__WEBPACK_IMPORTED_MODULE_5__["EditorDefaultType"].Html,
        'name': Object(Common_Translator__WEBPACK_IMPORTED_MODULE_7__["i18n"])('SETTINGS_GENERAL/LABEL_EDITOR_HTML')
      }, {
        'id': Common_Enums__WEBPACK_IMPORTED_MODULE_5__["EditorDefaultType"].Plain,
        'name': Object(Common_Translator__WEBPACK_IMPORTED_MODULE_7__["i18n"])('SETTINGS_GENERAL/LABEL_EDITOR_PLAIN')
      }, {
        'id': Common_Enums__WEBPACK_IMPORTED_MODULE_5__["EditorDefaultType"].HtmlForced,
        'name': Object(Common_Translator__WEBPACK_IMPORTED_MODULE_7__["i18n"])('SETTINGS_GENERAL/LABEL_EDITOR_HTML_FORCED')
      }, {
        'id': Common_Enums__WEBPACK_IMPORTED_MODULE_5__["EditorDefaultType"].PlainForced,
        'name': Object(Common_Translator__WEBPACK_IMPORTED_MODULE_7__["i18n"])('SETTINGS_GENERAL/LABEL_EDITOR_PLAIN_FORCED')
      }];
    });
    this.layoutTypes = ko__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"].computed(function () {
      Object(Common_Translator__WEBPACK_IMPORTED_MODULE_7__["trigger"])();
      return [{
        'id': Common_Enums__WEBPACK_IMPORTED_MODULE_5__["Layout"].NoPreview,
        'name': Object(Common_Translator__WEBPACK_IMPORTED_MODULE_7__["i18n"])('SETTINGS_GENERAL/LABEL_LAYOUT_NO_SPLIT')
      }, {
        'id': Common_Enums__WEBPACK_IMPORTED_MODULE_5__["Layout"].SidePreview,
        'name': Object(Common_Translator__WEBPACK_IMPORTED_MODULE_7__["i18n"])('SETTINGS_GENERAL/LABEL_LAYOUT_VERTICAL_SPLIT')
      }, {
        'id': Common_Enums__WEBPACK_IMPORTED_MODULE_5__["Layout"].BottomPreview,
        'name': Object(Common_Translator__WEBPACK_IMPORTED_MODULE_7__["i18n"])('SETTINGS_GENERAL/LABEL_LAYOUT_HORIZONTAL_SPLIT')
      }];
    });
  }

  var _proto = GeneralUserSettings.prototype;

  _proto.editMainIdentity = function editMainIdentity() {
    var identity = this.identityMain();

    if (identity) {
      Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_8__["showScreenPopup"])(__webpack_require__(/*! View/Popup/Identity */ 380), [identity]);
    }
  };

  _proto.testSoundNotification = function testSoundNotification() {
    Stores_User_Notification__WEBPACK_IMPORTED_MODULE_13__[/* default */ "a"].playSoundNotification(true);
  };

  _proto.onBuild = function onBuild() {
    var _this2 = this;

    ___WEBPACK_IMPORTED_MODULE_1___default.a.delay(function () {
      var f0 = Object(Common_Utils__WEBPACK_IMPORTED_MODULE_6__["settingsSaveHelperSimpleFunction"])(_this2.editorDefaultTypeTrigger, _this2),
          f1 = Object(Common_Utils__WEBPACK_IMPORTED_MODULE_6__["settingsSaveHelperSimpleFunction"])(_this2.mppTrigger, _this2),
          f2 = Object(Common_Utils__WEBPACK_IMPORTED_MODULE_6__["settingsSaveHelperSimpleFunction"])(_this2.layoutTrigger, _this2),
          fReloadLanguageHelper = function fReloadLanguageHelper(saveSettingsStep) {
        return function () {
          _this2.languageTrigger(saveSettingsStep);

          ___WEBPACK_IMPORTED_MODULE_1___default.a.delay(function () {
            return _this2.languageTrigger(Common_Enums__WEBPACK_IMPORTED_MODULE_5__["SaveSettingsStep"].Idle);
          }, Common_Enums__WEBPACK_IMPORTED_MODULE_5__["Magics"].Time1s);
        };
      };

      _this2.language.subscribe(function (value) {
        _this2.languageTrigger(Common_Enums__WEBPACK_IMPORTED_MODULE_5__["SaveSettingsStep"].Animate);

        Object(Common_Translator__WEBPACK_IMPORTED_MODULE_7__["reload"])(false, value).then(fReloadLanguageHelper(Common_Enums__WEBPACK_IMPORTED_MODULE_5__["SaveSettingsStep"].TrueResult), fReloadLanguageHelper(Common_Enums__WEBPACK_IMPORTED_MODULE_5__["SaveSettingsStep"].FalseResult)).then(function () {
          Remote_User_Ajax__WEBPACK_IMPORTED_MODULE_15__[/* default */ "a"].saveSettings(null, {
            'Language': value
          });
        });
      });

      _this2.editorDefaultType.subscribe(Remote_User_Ajax__WEBPACK_IMPORTED_MODULE_15__[/* default */ "a"].saveSettingsHelper('EditorDefaultType', null, f0));

      _this2.messagesPerPage.subscribe(Remote_User_Ajax__WEBPACK_IMPORTED_MODULE_15__[/* default */ "a"].saveSettingsHelper('MPP', null, f1));

      _this2.showImages.subscribe(Remote_User_Ajax__WEBPACK_IMPORTED_MODULE_15__[/* default */ "a"].saveSettingsHelper('ShowImages', Common_Utils__WEBPACK_IMPORTED_MODULE_6__["boolToAjax"]));

      _this2.useCheckboxesInList.subscribe(Remote_User_Ajax__WEBPACK_IMPORTED_MODULE_15__[/* default */ "a"].saveSettingsHelper('UseCheckboxesInList', Common_Utils__WEBPACK_IMPORTED_MODULE_6__["boolToAjax"]));

      _this2.enableDesktopNotification.subscribe(function (value) {
        Object(Common_Utils__WEBPACK_IMPORTED_MODULE_6__["timeOutAction"])('SaveDesktopNotifications', function () {
          Remote_User_Ajax__WEBPACK_IMPORTED_MODULE_15__[/* default */ "a"].saveSettings(null, {
            'DesktopNotifications': Object(Common_Utils__WEBPACK_IMPORTED_MODULE_6__["boolToAjax"])(value)
          });
        }, Common_Enums__WEBPACK_IMPORTED_MODULE_5__["Magics"].Time3s);
      });

      _this2.enableSoundNotification.subscribe(function (value) {
        Object(Common_Utils__WEBPACK_IMPORTED_MODULE_6__["timeOutAction"])('SaveSoundNotification', function () {
          Remote_User_Ajax__WEBPACK_IMPORTED_MODULE_15__[/* default */ "a"].saveSettings(null, {
            'SoundNotification': Object(Common_Utils__WEBPACK_IMPORTED_MODULE_6__["boolToAjax"])(value)
          });
        }, Common_Enums__WEBPACK_IMPORTED_MODULE_5__["Magics"].Time3s);
      });

      _this2.replySameFolder.subscribe(function (value) {
        Object(Common_Utils__WEBPACK_IMPORTED_MODULE_6__["timeOutAction"])('SaveReplySameFolder', function () {
          Remote_User_Ajax__WEBPACK_IMPORTED_MODULE_15__[/* default */ "a"].saveSettings(null, {
            'ReplySameFolder': Object(Common_Utils__WEBPACK_IMPORTED_MODULE_6__["boolToAjax"])(value)
          });
        }, Common_Enums__WEBPACK_IMPORTED_MODULE_5__["Magics"].Time3s);
      });

      _this2.useThreads.subscribe(function (value) {
        Stores_User_Message__WEBPACK_IMPORTED_MODULE_14__[/* default */ "a"].messageList([]);
        Remote_User_Ajax__WEBPACK_IMPORTED_MODULE_15__[/* default */ "a"].saveSettings(null, {
          'UseThreads': Object(Common_Utils__WEBPACK_IMPORTED_MODULE_6__["boolToAjax"])(value)
        });
      });

      _this2.layout.subscribe(function (value) {
        Stores_User_Message__WEBPACK_IMPORTED_MODULE_14__[/* default */ "a"].messageList([]);
        Remote_User_Ajax__WEBPACK_IMPORTED_MODULE_15__[/* default */ "a"].saveSettings(f2, {
          'Layout': value
        });
      });
    }, Common_Enums__WEBPACK_IMPORTED_MODULE_5__["Magics"].Time50ms);
  };

  _proto.onShow = function onShow() {
    this.enableDesktopNotification.valueHasMutated();
  };

  _proto.selectLanguage = function selectLanguage() {
    Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_8__["showScreenPopup"])(__webpack_require__(/*! View/Popup/Languages */ 254), [this.language, this.languages(), Stores_Language__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"].userLanguage()]);
  };

  return GeneralUserSettings;
}();



/***/ }),
/* 438 */
/*!***************************************!*\
  !*** ./dev/Settings/User/Contacts.js ***!
  \***************************************/
/*! exports provided: ContactsUserSettings, default */
/*! exports used: ContactsUserSettings */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ContactsUserSettings; });
/* unused harmony export default */
/* harmony import */ var core_js_modules_es_array_join__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.array.join */ 74);
/* harmony import */ var core_js_modules_es_array_join__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_join__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var ko__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ko */ 1);
/* harmony import */ var Common_Enums__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! Common/Enums */ 0);
/* harmony import */ var Common_Utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! Common/Utils */ 2);
/* harmony import */ var Stores_User_App__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! Stores/User/App */ 31);
/* harmony import */ var Stores_User_Contact__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! Stores/User/Contact */ 100);
/* harmony import */ var Remote_User_Ajax__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! Remote/User/Ajax */ 16);








var ContactsUserSettings =
/*#__PURE__*/
function () {
  function ContactsUserSettings() {
    var _this = this;

    this.contactsAutosave = Stores_User_App__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"].contactsAutosave;
    this.allowContactsSync = Stores_User_Contact__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"].allowContactsSync;
    this.enableContactsSync = Stores_User_Contact__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"].enableContactsSync;
    this.contactsSyncUrl = Stores_User_Contact__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"].contactsSyncUrl;
    this.contactsSyncUser = Stores_User_Contact__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"].contactsSyncUser;
    this.contactsSyncPass = Stores_User_Contact__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"].contactsSyncPass;
    this.saveTrigger = ko__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"].computed(function () {
      return [_this.enableContactsSync() ? '1' : '0', _this.contactsSyncUrl(), _this.contactsSyncUser(), _this.contactsSyncPass()].join('|');
    }).extend({
      throttle: Common_Enums__WEBPACK_IMPORTED_MODULE_2__["Magics"].Time500ms
    });
  }

  var _proto = ContactsUserSettings.prototype;

  _proto.onBuild = function onBuild() {
    var _this2 = this;

    this.contactsAutosave.subscribe(function (value) {
      Remote_User_Ajax__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"].saveSettings(null, {
        'ContactsAutosave': Object(Common_Utils__WEBPACK_IMPORTED_MODULE_3__["boolToAjax"])(value)
      });
    });
    this.saveTrigger.subscribe(function () {
      Remote_User_Ajax__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"].saveContactsSyncData(null, _this2.enableContactsSync(), _this2.contactsSyncUrl(), _this2.contactsSyncUser(), _this2.contactsSyncPass());
    });
  };

  return ContactsUserSettings;
}();



/***/ }),
/* 439 */
/*!***************************************!*\
  !*** ./dev/Settings/User/Accounts.js ***!
  \***************************************/
/*! exports provided: AccountsUserSettings, default */
/*! exports used: AccountsUserSettings */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return AccountsUserSettings; });
/* unused harmony export default */
/* harmony import */ var window__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! window */ 4);
/* harmony import */ var window__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(window__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! _ */ 3);
/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(___WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var ko__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ko */ 1);
/* harmony import */ var Common_Enums__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! Common/Enums */ 0);
/* harmony import */ var Common_Links__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! Common/Links */ 15);
/* harmony import */ var Storage_Settings__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! Storage/Settings */ 5);
/* harmony import */ var Stores_User_Account__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! Stores/User/Account */ 46);
/* harmony import */ var Stores_User_Identity__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! Stores/User/Identity */ 99);
/* harmony import */ var Remote_User_Ajax__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! Remote/User/Ajax */ 16);
/* harmony import */ var Helper_Apps_User__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! Helper/Apps/User */ 22);
/* harmony import */ var Knoin_Knoin__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! Knoin/Knoin */ 7);












var AccountsUserSettings =
/*#__PURE__*/
function () {
  function AccountsUserSettings() {
    this.allowAdditionalAccount = Object(Storage_Settings__WEBPACK_IMPORTED_MODULE_5__["capa"])(Common_Enums__WEBPACK_IMPORTED_MODULE_3__["Capa"].AdditionalAccounts);
    this.allowIdentities = Object(Storage_Settings__WEBPACK_IMPORTED_MODULE_5__["capa"])(Common_Enums__WEBPACK_IMPORTED_MODULE_3__["Capa"].Identities);
    this.accounts = Stores_User_Account__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"].accounts;
    this.identities = Stores_User_Identity__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"].identities;
    this.accountForDeletion = ko__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"].observable(null).deleteAccessHelper();
    this.identityForDeletion = ko__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"].observable(null).deleteAccessHelper();
  }

  var _proto = AccountsUserSettings.prototype;

  _proto.scrollableOptions = function scrollableOptions(wrapper) {
    return {
      handle: '.drag-handle',
      containment: wrapper || 'parent',
      axis: 'y'
    };
  };

  _proto.addNewAccount = function addNewAccount() {
    Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_10__["showScreenPopup"])(__webpack_require__(/*! View/Popup/Account */ 379));
  };

  _proto.editAccount = function editAccount(account) {
    if (account && account.canBeEdit()) {
      Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_10__["showScreenPopup"])(__webpack_require__(/*! View/Popup/Account */ 379), [account]);
    }
  };

  _proto.addNewIdentity = function addNewIdentity() {
    Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_10__["showScreenPopup"])(__webpack_require__(/*! View/Popup/Identity */ 380));
  };

  _proto.editIdentity = function editIdentity(identity) {
    Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_10__["showScreenPopup"])(__webpack_require__(/*! View/Popup/Identity */ 380), [identity]);
  }
  /**
   * @param {AccountModel} accountToRemove
   * @returns {void}
   */
  ;

  _proto.deleteAccount = function deleteAccount(accountToRemove) {
    if (accountToRemove && accountToRemove.deleteAccess()) {
      this.accountForDeletion(null);

      if (accountToRemove) {
        this.accounts.remove(function (account) {
          return accountToRemove === account;
        });
        Remote_User_Ajax__WEBPACK_IMPORTED_MODULE_8__[/* default */ "a"].accountDelete(function (result, data) {
          if (Common_Enums__WEBPACK_IMPORTED_MODULE_3__["StorageResultType"].Success === result && data && data.Result && data.Reload) {
            Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_10__["routeOff"])();
            Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_10__["setHash"])(Object(Common_Links__WEBPACK_IMPORTED_MODULE_4__[/* root */ "w"])(), true);
            Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_10__["routeOff"])();

            ___WEBPACK_IMPORTED_MODULE_1___default.a.defer(function () {
              return window__WEBPACK_IMPORTED_MODULE_0___default.a.location.reload();
            });
          } else {
            Object(Helper_Apps_User__WEBPACK_IMPORTED_MODULE_9__[/* getApp */ "a"])().accountsAndIdentities();
          }
        }, accountToRemove.email);
      }
    }
  }
  /**
   * @param {IdentityModel} identityToRemove
   * @returns {void}
   */
  ;

  _proto.deleteIdentity = function deleteIdentity(identityToRemove) {
    if (identityToRemove && identityToRemove.deleteAccess()) {
      this.identityForDeletion(null);

      if (identityToRemove) {
        Stores_User_Identity__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"].identities.remove(function (oIdentity) {
          return identityToRemove === oIdentity;
        });
        Remote_User_Ajax__WEBPACK_IMPORTED_MODULE_8__[/* default */ "a"].identityDelete(function () {
          Object(Helper_Apps_User__WEBPACK_IMPORTED_MODULE_9__[/* getApp */ "a"])().accountsAndIdentities();
        }, identityToRemove.id);
      }
    }
  };

  _proto.accountsAndIdentitiesAfterMove = function accountsAndIdentitiesAfterMove() {
    Remote_User_Ajax__WEBPACK_IMPORTED_MODULE_8__[/* default */ "a"].accountsAndIdentitiesSortOrder(null, Stores_User_Account__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"].accountsEmails.peek(), Stores_User_Identity__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"].identitiesIDS.peek());
  };

  _proto.onBuild = function onBuild(oDom) {
    var self = this;
    oDom.on('click', '.accounts-list .account-item .e-action', function () {
      // eslint-disable-line prefer-arrow-callback
      var account = ko__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"].dataFor(this); // eslint-disable-line no-invalid-this

      if (account) {
        self.editAccount(account);
      }
    }).on('click', '.identities-list .identity-item .e-action', function () {
      // eslint-disable-line prefer-arrow-callback
      var identity = ko__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"].dataFor(this); // eslint-disable-line no-invalid-this

      if (identity) {
        self.editIdentity(identity);
      }
    });
  };

  return AccountsUserSettings;
}();



/***/ }),
/* 440 */
/*!**************************************!*\
  !*** ./dev/Settings/User/Filters.js ***!
  \**************************************/
/*! exports provided: FiltersUserSettings, default */
/*! exports used: FiltersUserSettings */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return FiltersUserSettings; });
/* unused harmony export default */
/* harmony import */ var core_js_modules_es_array_join__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.array.join */ 74);
/* harmony import */ var core_js_modules_es_array_join__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_join__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor */ 19);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_index_of__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/index-of */ 30);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_index_of__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_index_of__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/map */ 18);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var _babel_runtime_corejs3_helpers_esm_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/esm/applyDecoratedDescriptor */ 20);
/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! _ */ 3);
/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(___WEBPACK_IMPORTED_MODULE_5__);
/* harmony import */ var ko__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ko */ 1);
/* harmony import */ var Common_Utils__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! Common/Utils */ 2);
/* harmony import */ var Common_Enums__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! Common/Enums */ 0);
/* harmony import */ var Common_Translator__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! Common/Translator */ 9);
/* harmony import */ var Stores_User_Filter__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! Stores/User/Filter */ 214);
/* harmony import */ var Remote_User_Ajax__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! Remote/User/Ajax */ 16);
/* harmony import */ var Model_Filter__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! Model/Filter */ 394);
/* harmony import */ var Knoin_Knoin__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! Knoin/Knoin */ 7);






var _dec, _class;










var FiltersUserSettings = (_dec = Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_13__["command"])(function (self) {
  return self.haveChanges();
}), (_class =
/*#__PURE__*/
function () {
  function FiltersUserSettings() {
    var _this = this;

    this.modules = Stores_User_Filter__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"].modules;
    this.filters = Stores_User_Filter__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"].filters;
    this.inited = ko__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"].observable(false);
    this.serverError = ko__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"].observable(false);
    this.serverErrorDesc = ko__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"].observable('');
    this.haveChanges = ko__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"].observable(false);
    this.saveErrorText = ko__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"].observable('');
    this.filters.subscribe(Common_Utils__WEBPACK_IMPORTED_MODULE_7__["windowResizeCallback"]);
    this.serverError.subscribe(function (value) {
      if (!value) {
        _this.serverErrorDesc('');
      }
    }, this);
    this.filterRaw = Stores_User_Filter__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"].raw;
    this.filterRaw.capa = Stores_User_Filter__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"].capa;
    this.filterRaw.active = ko__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"].observable(false);
    this.filterRaw.allow = ko__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"].observable(false);
    this.filterRaw.error = ko__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"].observable(false);
    this.filterForDeletion = ko__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"].observable(null).deleteAccessHelper();
    this.filters.subscribe(function () {
      _this.haveChanges(true);
    });
    this.filterRaw.subscribe(function () {
      _this.haveChanges(true);

      _this.filterRaw.error(false);
    });
    this.haveChanges.subscribe(function () {
      _this.saveErrorText('');
    });
    this.filterRaw.active.subscribe(function () {
      _this.haveChanges(true);

      _this.filterRaw.error(false);
    });
  }

  var _proto = FiltersUserSettings.prototype;

  _proto.saveChangesCommand = function saveChangesCommand() {
    var _this2 = this;

    if (!this.filters.saving()) {
      if (this.filterRaw.active() && '' === Object(Common_Utils__WEBPACK_IMPORTED_MODULE_7__["trim"])(this.filterRaw())) {
        this.filterRaw.error(true);
        return false;
      }

      this.filters.saving(true);
      this.saveErrorText('');
      Remote_User_Ajax__WEBPACK_IMPORTED_MODULE_11__[/* default */ "a"].filtersSave(function (result, data) {
        _this2.filters.saving(false);

        if (Common_Enums__WEBPACK_IMPORTED_MODULE_8__["StorageResultType"].Success === result && data && data.Result) {
          _this2.haveChanges(false);

          _this2.updateList();
        } else if (data && data.ErrorCode) {
          _this2.saveErrorText(data.ErrorMessageAdditional || Object(Common_Translator__WEBPACK_IMPORTED_MODULE_9__["getNotification"])(data.ErrorCode));
        } else {
          _this2.saveErrorText(Object(Common_Translator__WEBPACK_IMPORTED_MODULE_9__["getNotification"])(Common_Enums__WEBPACK_IMPORTED_MODULE_8__["Notification"].CantSaveFilters));
        }
      }, this.filters(), this.filterRaw(), this.filterRaw.active());
    }

    return true;
  };

  _proto.scrollableOptions = function scrollableOptions(wrapper) {
    return {
      handle: '.drag-handle',
      containment: wrapper || 'parent',
      axis: 'y'
    };
  };

  _proto.updateList = function updateList() {
    var _this3 = this;

    if (!this.filters.loading()) {
      this.filters.loading(true);
      Remote_User_Ajax__WEBPACK_IMPORTED_MODULE_11__[/* default */ "a"].filtersGet(function (result, data) {
        _this3.filters.loading(false);

        _this3.serverError(false);

        if (Common_Enums__WEBPACK_IMPORTED_MODULE_8__["StorageResultType"].Success === result && data && data.Result && Object(Common_Utils__WEBPACK_IMPORTED_MODULE_7__["isArray"])(data.Result.Filters)) {
          _this3.inited(true);

          _this3.serverError(false);

          _this3.filters(___WEBPACK_IMPORTED_MODULE_5___default.a.compact(_babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_3___default()(___WEBPACK_IMPORTED_MODULE_5___default.a).call(___WEBPACK_IMPORTED_MODULE_5___default.a, data.Result.Filters, function (aItem) {
            var filter = new Model_Filter__WEBPACK_IMPORTED_MODULE_12__[/* FilterModel */ "a"]();
            return filter && filter.parse(aItem) ? filter : null;
          })));

          _this3.modules(data.Result.Modules ? data.Result.Modules : {});

          _this3.filterRaw(data.Result.Raw || '');

          _this3.filterRaw.capa(Object(Common_Utils__WEBPACK_IMPORTED_MODULE_7__["isArray"])(data.Result.Capa) ? data.Result.Capa.join(' ') : '');

          _this3.filterRaw.active(!!data.Result.RawIsActive);

          _this3.filterRaw.allow(!!data.Result.RawIsAllow);
        } else {
          _this3.filters([]);

          _this3.modules({});

          _this3.filterRaw('');

          _this3.filterRaw.capa({});

          _this3.serverError(true);

          _this3.serverErrorDesc(data && data.ErrorCode ? Object(Common_Translator__WEBPACK_IMPORTED_MODULE_9__["getNotification"])(data.ErrorCode) : Object(Common_Translator__WEBPACK_IMPORTED_MODULE_9__["getNotification"])(Common_Enums__WEBPACK_IMPORTED_MODULE_8__["Notification"].CantGetFilters));
        }

        _this3.haveChanges(false);
      });
    }
  };

  _proto.deleteFilter = function deleteFilter(filter) {
    this.filters.remove(filter);
    Object(Common_Utils__WEBPACK_IMPORTED_MODULE_7__["delegateRunOnDestroy"])(filter);
  };

  _proto.addFilter = function addFilter() {
    var _this4 = this;

    var filter = new Model_Filter__WEBPACK_IMPORTED_MODULE_12__[/* FilterModel */ "a"]();
    filter.generateID();
    Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_13__["showScreenPopup"])(__webpack_require__(/*! View/Popup/Filter */ 410), [filter, function () {
      _this4.filters.push(filter);

      _this4.filterRaw.active(false);
    }, false]);
  };

  _proto.editFilter = function editFilter(filter) {
    var _this5 = this;

    var clonedFilter = filter.cloneSelf();
    Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_13__["showScreenPopup"])(__webpack_require__(/*! View/Popup/Filter */ 410), [clonedFilter, function () {
      var filters = _this5.filters(),
          index = _babel_runtime_corejs3_core_js_stable_instance_index_of__WEBPACK_IMPORTED_MODULE_2___default()(filters).call(filters, filter);

      if (-1 < index && filters[index]) {
        Object(Common_Utils__WEBPACK_IMPORTED_MODULE_7__["delegateRunOnDestroy"])(filters[index]);
        filters[index] = clonedFilter;

        _this5.filters(filters);

        _this5.haveChanges(true);
      }
    }, true]);
  };

  _proto.onBuild = function onBuild(oDom) {
    var self = this;
    oDom.on('click', '.filter-item .e-action', function () {
      // eslint-disable-line prefer-arrow-callback
      var filter = ko__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"].dataFor(this); // eslint-disable-line no-invalid-this

      if (filter) {
        self.editFilter(filter);
      }
    });
  };

  _proto.onShow = function onShow() {
    this.updateList();
  };

  return FiltersUserSettings;
}(), (Object(_babel_runtime_corejs3_helpers_esm_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])(_class.prototype, "saveChangesCommand", [_dec], _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class.prototype, "saveChangesCommand"), _class.prototype)), _class));


/***/ }),
/* 441 */
/*!***************************************!*\
  !*** ./dev/Settings/User/Security.js ***!
  \***************************************/
/*! exports provided: SecurityUserSettings, default */
/*! exports used: SecurityUserSettings */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return SecurityUserSettings; });
/* unused harmony export default */
/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! _ */ 3);
/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(___WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var ko__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ko */ 1);
/* harmony import */ var Common_Utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! Common/Utils */ 2);
/* harmony import */ var Common_Enums__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! Common/Enums */ 0);
/* harmony import */ var Common_Translator__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! Common/Translator */ 9);
/* harmony import */ var Storage_Settings__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! Storage/Settings */ 5);
/* harmony import */ var Knoin_Knoin__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! Knoin/Knoin */ 7);
/* harmony import */ var Stores_User_Settings__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! Stores/User/Settings */ 38);
/* harmony import */ var Remote_User_Ajax__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! Remote/User/Ajax */ 16);










var SecurityUserSettings =
/*#__PURE__*/
function () {
  function SecurityUserSettings() {
    this.capaAutoLogout = Object(Storage_Settings__WEBPACK_IMPORTED_MODULE_5__["capa"])(Common_Enums__WEBPACK_IMPORTED_MODULE_3__["Capa"].AutoLogout);
    this.capaTwoFactor = Object(Storage_Settings__WEBPACK_IMPORTED_MODULE_5__["capa"])(Common_Enums__WEBPACK_IMPORTED_MODULE_3__["Capa"].TwoFactor);
    this.autoLogout = Stores_User_Settings__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"].autoLogout;
    this.autoLogout.trigger = ko__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"].observable(Common_Enums__WEBPACK_IMPORTED_MODULE_3__["SaveSettingsStep"].Idle);
    this.autoLogoutOptions = ko__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"].computed(function () {
      Object(Common_Translator__WEBPACK_IMPORTED_MODULE_4__["trigger"])();
      return [{
        'id': 0,
        'name': Object(Common_Translator__WEBPACK_IMPORTED_MODULE_4__["i18n"])('SETTINGS_SECURITY/AUTOLOGIN_NEVER_OPTION_NAME')
      }, {
        'id': 5,
        'name': Object(Common_Translator__WEBPACK_IMPORTED_MODULE_4__["i18n"])('SETTINGS_SECURITY/AUTOLOGIN_MINUTES_OPTION_NAME', {
          'MINUTES': 5
        })
      }, {
        'id': 10,
        'name': Object(Common_Translator__WEBPACK_IMPORTED_MODULE_4__["i18n"])('SETTINGS_SECURITY/AUTOLOGIN_MINUTES_OPTION_NAME', {
          'MINUTES': 10
        })
      }, {
        'id': 30,
        'name': Object(Common_Translator__WEBPACK_IMPORTED_MODULE_4__["i18n"])('SETTINGS_SECURITY/AUTOLOGIN_MINUTES_OPTION_NAME', {
          'MINUTES': 30
        })
      }, {
        'id': 60,
        'name': Object(Common_Translator__WEBPACK_IMPORTED_MODULE_4__["i18n"])('SETTINGS_SECURITY/AUTOLOGIN_MINUTES_OPTION_NAME', {
          'MINUTES': 60
        })
      }, {
        'id': 60 * 2,
        'name': Object(Common_Translator__WEBPACK_IMPORTED_MODULE_4__["i18n"])('SETTINGS_SECURITY/AUTOLOGIN_HOURS_OPTION_NAME', {
          'HOURS': 2
        })
      }, {
        'id': 60 * 5,
        'name': Object(Common_Translator__WEBPACK_IMPORTED_MODULE_4__["i18n"])('SETTINGS_SECURITY/AUTOLOGIN_HOURS_OPTION_NAME', {
          'HOURS': 5
        })
      }, {
        'id': 60 * 10,
        'name': Object(Common_Translator__WEBPACK_IMPORTED_MODULE_4__["i18n"])('SETTINGS_SECURITY/AUTOLOGIN_HOURS_OPTION_NAME', {
          'HOURS': 10
        })
      }];
    });
  }

  var _proto = SecurityUserSettings.prototype;

  _proto.configureTwoFactor = function configureTwoFactor() {
    Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_6__["showScreenPopup"])(__webpack_require__(/*! View/Popup/TwoFactorConfiguration */ 411));
  };

  _proto.onBuild = function onBuild() {
    var _this = this;

    if (this.capaAutoLogout) {
      ___WEBPACK_IMPORTED_MODULE_0___default.a.delay(function () {
        var f0 = Object(Common_Utils__WEBPACK_IMPORTED_MODULE_2__["settingsSaveHelperSimpleFunction"])(_this.autoLogout.trigger, _this);

        _this.autoLogout.subscribe(Remote_User_Ajax__WEBPACK_IMPORTED_MODULE_8__[/* default */ "a"].saveSettingsHelper('AutoLogout', Common_Utils__WEBPACK_IMPORTED_MODULE_2__["pInt"], f0));
      });
    }
  };

  return SecurityUserSettings;
}();



/***/ }),
/* 442 */
/*!*************************************!*\
  !*** ./dev/Settings/User/Social.js ***!
  \*************************************/
/*! exports provided: SocialUserSettings, default */
/*! exports used: SocialUserSettings */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return SocialUserSettings; });
/* unused harmony export default */
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor */ 19);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _babel_runtime_corejs3_helpers_esm_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/esm/applyDecoratedDescriptor */ 20);
/* harmony import */ var Stores_Social__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! Stores/Social */ 29);
/* harmony import */ var Helper_Apps_User__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! Helper/Apps/User */ 22);
/* harmony import */ var Knoin_Knoin__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! Knoin/Knoin */ 7);



var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _class;




var SocialUserSettings = (_dec = Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_4__["command"])(function (self) {
  return !self.googleLoggined() && !self.googleActions();
}), _dec2 = Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_4__["command"])(), _dec3 = Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_4__["command"])(function (self) {
  return !self.facebookLoggined() && !self.facebookActions();
}), _dec4 = Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_4__["command"])(), _dec5 = Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_4__["command"])(function (self) {
  return !self.twitterLoggined() && !self.twitterActions();
}), _dec6 = Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_4__["command"])(), (_class =
/*#__PURE__*/
function () {
  function SocialUserSettings() {
    this.googleEnable = Stores_Social__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"].google.enabled;
    this.googleEnableAuth = Stores_Social__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"].google.capa.auth;
    this.googleEnableAuthGmail = Stores_Social__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"].google.capa.authGmail;
    this.googleEnableDrive = Stores_Social__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"].google.capa.drive;
    this.googleEnablePreview = Stores_Social__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"].google.capa.preview;
    this.googleActions = Stores_Social__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"].google.loading;
    this.googleLoggined = Stores_Social__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"].google.loggined;
    this.googleUserName = Stores_Social__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"].google.userName;
    this.facebookEnable = Stores_Social__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"].facebook.enabled;
    this.facebookActions = Stores_Social__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"].facebook.loading;
    this.facebookLoggined = Stores_Social__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"].facebook.loggined;
    this.facebookUserName = Stores_Social__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"].facebook.userName;
    this.twitterEnable = Stores_Social__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"].twitter.enabled;
    this.twitterActions = Stores_Social__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"].twitter.loading;
    this.twitterLoggined = Stores_Social__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"].twitter.loggined;
    this.twitterUserName = Stores_Social__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"].twitter.userName;
  }

  var _proto = SocialUserSettings.prototype;

  _proto.connectGoogleCommand = function connectGoogleCommand() {
    if (!this.googleLoggined()) {
      Object(Helper_Apps_User__WEBPACK_IMPORTED_MODULE_3__[/* getApp */ "a"])().googleConnect();
    }
  };

  _proto.disconnectGoogleCommand = function disconnectGoogleCommand() {
    Object(Helper_Apps_User__WEBPACK_IMPORTED_MODULE_3__[/* getApp */ "a"])().googleDisconnect();
  };

  _proto.connectFacebookCommand = function connectFacebookCommand() {
    if (!this.facebookLoggined()) {
      Object(Helper_Apps_User__WEBPACK_IMPORTED_MODULE_3__[/* getApp */ "a"])().facebookConnect();
    }
  };

  _proto.disconnectFacebookCommand = function disconnectFacebookCommand() {
    Object(Helper_Apps_User__WEBPACK_IMPORTED_MODULE_3__[/* getApp */ "a"])().facebookDisconnect();
  };

  _proto.connectTwitterCommand = function connectTwitterCommand() {
    if (!this.twitterLoggined()) {
      Object(Helper_Apps_User__WEBPACK_IMPORTED_MODULE_3__[/* getApp */ "a"])().twitterConnect();
    }
  };

  _proto.disconnectTwitterCommand = function disconnectTwitterCommand() {
    Object(Helper_Apps_User__WEBPACK_IMPORTED_MODULE_3__[/* getApp */ "a"])().twitterDisconnect();
  };

  return SocialUserSettings;
}(), (Object(_babel_runtime_corejs3_helpers_esm_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_class.prototype, "connectGoogleCommand", [_dec], _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_0___default()(_class.prototype, "connectGoogleCommand"), _class.prototype), Object(_babel_runtime_corejs3_helpers_esm_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_class.prototype, "disconnectGoogleCommand", [_dec2], _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_0___default()(_class.prototype, "disconnectGoogleCommand"), _class.prototype), Object(_babel_runtime_corejs3_helpers_esm_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_class.prototype, "connectFacebookCommand", [_dec3], _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_0___default()(_class.prototype, "connectFacebookCommand"), _class.prototype), Object(_babel_runtime_corejs3_helpers_esm_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_class.prototype, "disconnectFacebookCommand", [_dec4], _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_0___default()(_class.prototype, "disconnectFacebookCommand"), _class.prototype), Object(_babel_runtime_corejs3_helpers_esm_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_class.prototype, "connectTwitterCommand", [_dec5], _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_0___default()(_class.prototype, "connectTwitterCommand"), _class.prototype), Object(_babel_runtime_corejs3_helpers_esm_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_class.prototype, "disconnectTwitterCommand", [_dec6], _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_0___default()(_class.prototype, "disconnectTwitterCommand"), _class.prototype)), _class));


/***/ }),
/* 443 */
/*!*********************************************!*\
  !*** ./dev/Settings/User/ChangePassword.js ***!
  \*********************************************/
/*! exports provided: ChangePasswordUserSettings, default */
/*! exports used: ChangePasswordUserSettings */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ChangePasswordUserSettings; });
/* unused harmony export default */
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor */ 19);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_bind__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/bind */ 26);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_bind__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_bind__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _babel_runtime_corejs3_helpers_esm_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/esm/applyDecoratedDescriptor */ 20);
/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! _ */ 3);
/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(___WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var ko__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ko */ 1);
/* harmony import */ var Common_Enums__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! Common/Enums */ 0);
/* harmony import */ var Common_Translator__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! Common/Translator */ 9);
/* harmony import */ var Remote_User_Ajax__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! Remote/User/Ajax */ 16);
/* harmony import */ var Helper_Apps_User__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! Helper/Apps/User */ 22);
/* harmony import */ var Knoin_Knoin__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! Knoin/Knoin */ 7);




var _dec, _class;








var ChangePasswordUserSettings = (_dec = Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_9__["command"])(function (self) {
  return !self.changeProcess() && '' !== self.currentPassword() && '' !== self.newPassword() && '' !== self.newPassword2();
}), (_class =
/*#__PURE__*/
function () {
  function ChangePasswordUserSettings() {
    var _this = this;

    this.changeProcess = ko__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"].observable(false);
    this.errorDescription = ko__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"].observable('');
    this.passwordMismatch = ko__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"].observable(false);
    this.passwordUpdateError = ko__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"].observable(false);
    this.passwordUpdateSuccess = ko__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"].observable(false);
    this.currentPassword = ko__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"].observable('');
    this.currentPassword.error = ko__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"].observable(false);
    this.newPassword = ko__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"].observable('');
    this.newPassword2 = ko__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"].observable('');
    this.currentPassword.subscribe(function () {
      _this.passwordUpdateError(false);

      _this.passwordUpdateSuccess(false);

      _this.currentPassword.error(false);
    });
    this.newPassword.subscribe(function () {
      _this.passwordUpdateError(false);

      _this.passwordUpdateSuccess(false);

      _this.passwordMismatch(false);
    });
    this.newPassword2.subscribe(function () {
      _this.passwordUpdateError(false);

      _this.passwordUpdateSuccess(false);

      _this.passwordMismatch(false);
    });
    this.onChangePasswordResponse = _babel_runtime_corejs3_core_js_stable_instance_bind__WEBPACK_IMPORTED_MODULE_1___default()(___WEBPACK_IMPORTED_MODULE_3___default.a).call(___WEBPACK_IMPORTED_MODULE_3___default.a, this.onChangePasswordResponse, this);
  }

  var _proto = ChangePasswordUserSettings.prototype;

  _proto.saveNewPasswordCommand = function saveNewPasswordCommand() {
    if (this.newPassword() !== this.newPassword2()) {
      this.passwordMismatch(true);
      this.errorDescription(Object(Common_Translator__WEBPACK_IMPORTED_MODULE_6__["i18n"])('SETTINGS_CHANGE_PASSWORD/ERROR_PASSWORD_MISMATCH'));
    } else {
      this.changeProcess(true);
      this.passwordUpdateError(false);
      this.passwordUpdateSuccess(false);
      this.currentPassword.error(false);
      this.passwordMismatch(false);
      this.errorDescription('');
      Remote_User_Ajax__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"].changePassword(this.onChangePasswordResponse, this.currentPassword(), this.newPassword());
    }
  };

  _proto.onHide = function onHide() {
    this.changeProcess(false);
    this.currentPassword('');
    this.newPassword('');
    this.newPassword2('');
    this.errorDescription('');
    this.passwordMismatch(false);
    this.currentPassword.error(false);
  };

  _proto.onChangePasswordResponse = function onChangePasswordResponse(result, data) {
    this.changeProcess(false);
    this.passwordMismatch(false);
    this.errorDescription('');
    this.currentPassword.error(false);

    if (Common_Enums__WEBPACK_IMPORTED_MODULE_5__["StorageResultType"].Success === result && data && data.Result) {
      this.currentPassword('');
      this.newPassword('');
      this.newPassword2('');
      this.passwordUpdateSuccess(true);
      this.currentPassword.error(false);
      Object(Helper_Apps_User__WEBPACK_IMPORTED_MODULE_8__[/* getApp */ "a"])().setClientSideToken(data.Result);
    } else {
      if (data && Common_Enums__WEBPACK_IMPORTED_MODULE_5__["Notification"].CurrentPasswordIncorrect === data.ErrorCode) {
        this.currentPassword.error(true);
      }

      this.passwordUpdateError(true);
      this.errorDescription(Object(Common_Translator__WEBPACK_IMPORTED_MODULE_6__["getNotificationFromResponse"])(data, Common_Enums__WEBPACK_IMPORTED_MODULE_5__["Notification"].CouldNotSaveNewPassword));
    }
  };

  return ChangePasswordUserSettings;
}(), (Object(_babel_runtime_corejs3_helpers_esm_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(_class.prototype, "saveNewPasswordCommand", [_dec], _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_0___default()(_class.prototype, "saveNewPasswordCommand"), _class.prototype)), _class));


/***/ }),
/* 444 */
/*!****************************************!*\
  !*** ./dev/Settings/User/Templates.js ***!
  \****************************************/
/*! exports provided: TemplatesUserSettings, default */
/*! exports used: TemplatesUserSettings */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return TemplatesUserSettings; });
/* unused harmony export default */
/* harmony import */ var ko__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ko */ 1);
/* harmony import */ var Common_Translator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! Common/Translator */ 9);
/* harmony import */ var Stores_User_Template__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! Stores/User/Template */ 176);
/* harmony import */ var Remote_User_Ajax__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! Remote/User/Ajax */ 16);
/* harmony import */ var Helper_Apps_User__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! Helper/Apps/User */ 22);
/* harmony import */ var Knoin_Knoin__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! Knoin/Knoin */ 7);







var TemplatesUserSettings =
/*#__PURE__*/
function () {
  function TemplatesUserSettings() {
    var _this = this;

    this.templates = Stores_User_Template__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"].templates;
    this.processText = ko__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].computed(function () {
      return Stores_User_Template__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"].templates.loading() ? Object(Common_Translator__WEBPACK_IMPORTED_MODULE_1__["i18n"])('SETTINGS_TEMPLETS/LOADING_PROCESS') : '';
    });
    this.visibility = ko__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].computed(function () {
      return '' === _this.processText() ? 'hidden' : 'visible';
    });
    this.templateForDeletion = ko__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].observable(null).deleteAccessHelper();
  }

  var _proto = TemplatesUserSettings.prototype;

  _proto.scrollableOptions = function scrollableOptions(sWrapper) {
    return {
      handle: '.drag-handle',
      containment: sWrapper || 'parent',
      axis: 'y'
    };
  };

  _proto.addNewTemplate = function addNewTemplate() {
    Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_5__["showScreenPopup"])(__webpack_require__(/*! View/Popup/Template */ 412));
  };

  _proto.editTemplate = function editTemplate(oTemplateItem) {
    if (oTemplateItem) {
      Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_5__["showScreenPopup"])(__webpack_require__(/*! View/Popup/Template */ 412), [oTemplateItem]);
    }
  };

  _proto.deleteTemplate = function deleteTemplate(templateToRemove) {
    var _this2 = this;

    if (templateToRemove && templateToRemove.deleteAccess()) {
      this.templateForDeletion(null);

      if (templateToRemove) {
        this.templates.remove(function (template) {
          return templateToRemove === template;
        });
        Remote_User_Ajax__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"].templateDelete(function () {
          _this2.reloadTemplates();
        }, templateToRemove.id);
      }
    }
  };

  _proto.reloadTemplates = function reloadTemplates() {
    Object(Helper_Apps_User__WEBPACK_IMPORTED_MODULE_4__[/* getApp */ "a"])().templates();
  };

  _proto.onBuild = function onBuild(oDom) {
    var self = this;
    oDom.on('click', '.templates-list .template-item .e-action', function () {
      // eslint-disable-line prefer-arrow-callback
      var template = ko__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].dataFor(this); // eslint-disable-line no-invalid-this

      if (template) {
        self.editTemplate(template);
      }
    });
    this.reloadTemplates();
  };

  return TemplatesUserSettings;
}();



/***/ }),
/* 445 */
/*!**************************************!*\
  !*** ./dev/Settings/User/Folders.js ***!
  \**************************************/
/*! exports provided: FoldersUserSettings, default */
/*! exports used: FoldersUserSettings */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return FoldersUserSettings; });
/* unused harmony export default */
/* harmony import */ var core_js_modules_es_function_name__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.function.name */ 51);
/* harmony import */ var core_js_modules_es_function_name__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_function_name__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var ko__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ko */ 1);
/* harmony import */ var Common_Enums__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! Common/Enums */ 0);
/* harmony import */ var Common_Utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! Common/Utils */ 2);
/* harmony import */ var Common_Translator__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! Common/Translator */ 9);
/* harmony import */ var Common_Cache__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! Common/Cache */ 14);
/* harmony import */ var Storage_Settings__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! Storage/Settings */ 5);
/* harmony import */ var Storage_Client__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! Storage/Client */ 58);
/* harmony import */ var Stores_User_Folder__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! Stores/User/Folder */ 11);
/* harmony import */ var Promises_User_Ajax__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! Promises/User/Ajax */ 87);
/* harmony import */ var Remote_User_Ajax__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! Remote/User/Ajax */ 16);
/* harmony import */ var Helper_Apps_User__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! Helper/Apps/User */ 22);
/* harmony import */ var Knoin_Knoin__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! Knoin/Knoin */ 7);














var FoldersUserSettings =
/*#__PURE__*/
function () {
  function FoldersUserSettings() {
    this.displaySpecSetting = Stores_User_Folder__WEBPACK_IMPORTED_MODULE_8__[/* default */ "a"].displaySpecSetting;
    this.folderList = Stores_User_Folder__WEBPACK_IMPORTED_MODULE_8__[/* default */ "a"].folderList;
    this.folderListHelp = ko__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"].observable('').extend({
      throttle: Common_Enums__WEBPACK_IMPORTED_MODULE_2__["Magics"].Time100ms
    });
    this.loading = ko__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"].computed(function () {
      var loading = Stores_User_Folder__WEBPACK_IMPORTED_MODULE_8__[/* default */ "a"].foldersLoading(),
          creating = Stores_User_Folder__WEBPACK_IMPORTED_MODULE_8__[/* default */ "a"].foldersCreating(),
          deleting = Stores_User_Folder__WEBPACK_IMPORTED_MODULE_8__[/* default */ "a"].foldersDeleting(),
          renaming = Stores_User_Folder__WEBPACK_IMPORTED_MODULE_8__[/* default */ "a"].foldersRenaming();
      return loading || creating || deleting || renaming;
    });
    this.folderForDeletion = ko__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"].observable(null).deleteAccessHelper();
    this.folderForEdit = ko__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"].observable(null).extend({
      toggleSubscribeProperty: [this, 'edited']
    });
    this.useImapSubscribe = !!Object(Storage_Settings__WEBPACK_IMPORTED_MODULE_6__["appSettingsGet"])('useImapSubscribe');
  }

  var _proto = FoldersUserSettings.prototype;

  _proto.folderEditOnEnter = function folderEditOnEnter(folder) {
    var nameToEdit = folder ? Object(Common_Utils__WEBPACK_IMPORTED_MODULE_3__["trim"])(folder.nameForEdit()) : '';

    if ('' !== nameToEdit && folder.name() !== nameToEdit) {
      Storage_Client__WEBPACK_IMPORTED_MODULE_7__[/* set */ "b"](Common_Enums__WEBPACK_IMPORTED_MODULE_2__["ClientSideKeyName"].FoldersLashHash, '');
      Object(Helper_Apps_User__WEBPACK_IMPORTED_MODULE_11__[/* getApp */ "a"])().foldersPromisesActionHelper(Promises_User_Ajax__WEBPACK_IMPORTED_MODULE_9__[/* default */ "a"].folderRename(folder.fullNameRaw, nameToEdit, Stores_User_Folder__WEBPACK_IMPORTED_MODULE_8__[/* default */ "a"].foldersRenaming), Common_Enums__WEBPACK_IMPORTED_MODULE_2__["Notification"].CantRenameFolder);
      Object(Common_Cache__WEBPACK_IMPORTED_MODULE_5__[/* removeFolderFromCacheList */ "o"])(folder.fullNameRaw);
      folder.name(nameToEdit);
    }

    folder.edited(false);
  };

  _proto.folderEditOnEsc = function folderEditOnEsc(folder) {
    if (folder) {
      folder.edited(false);
    }
  };

  _proto.onShow = function onShow() {
    Stores_User_Folder__WEBPACK_IMPORTED_MODULE_8__[/* default */ "a"].folderList.error('');
  };

  _proto.onBuild = function onBuild(oDom) {
    var _this = this;

    oDom.on('mouseover', '.delete-folder-parent', function () {
      _this.folderListHelp(Object(Common_Translator__WEBPACK_IMPORTED_MODULE_4__["i18n"])('SETTINGS_FOLDERS/HELP_DELETE_FOLDER'));
    }).on('mouseover', '.subscribe-folder-parent', function () {
      _this.folderListHelp(Object(Common_Translator__WEBPACK_IMPORTED_MODULE_4__["i18n"])('SETTINGS_FOLDERS/HELP_SHOW_HIDE_FOLDER'));
    }).on('mouseover', '.check-folder-parent', function () {
      _this.folderListHelp(Object(Common_Translator__WEBPACK_IMPORTED_MODULE_4__["i18n"])('SETTINGS_FOLDERS/HELP_CHECK_FOR_NEW_MESSAGES'));
    }).on('mouseout', '.subscribe-folder-parent, .check-folder-parent, .delete-folder-parent', function () {
      _this.folderListHelp('');
    });
  };

  _proto.createFolder = function createFolder() {
    Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_12__["showScreenPopup"])(__webpack_require__(/*! View/Popup/FolderCreate */ 409));
  };

  _proto.systemFolder = function systemFolder() {
    Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_12__["showScreenPopup"])(__webpack_require__(/*! View/Popup/FolderSystem */ 274));
  };

  _proto.deleteFolder = function deleteFolder(folderToRemove) {
    if (folderToRemove && folderToRemove.canBeDeleted() && folderToRemove.deleteAccess() && 0 === folderToRemove.privateMessageCountAll()) {
      this.folderForDeletion(null);

      if (folderToRemove) {
        var fRemoveFolder = function fRemoveFolder(folder) {
          if (folderToRemove === folder) {
            return true;
          }

          folder.subFolders.remove(fRemoveFolder);
          return false;
        };

        Storage_Client__WEBPACK_IMPORTED_MODULE_7__[/* set */ "b"](Common_Enums__WEBPACK_IMPORTED_MODULE_2__["ClientSideKeyName"].FoldersLashHash, '');
        Stores_User_Folder__WEBPACK_IMPORTED_MODULE_8__[/* default */ "a"].folderList.remove(fRemoveFolder);
        Object(Helper_Apps_User__WEBPACK_IMPORTED_MODULE_11__[/* getApp */ "a"])().foldersPromisesActionHelper(Promises_User_Ajax__WEBPACK_IMPORTED_MODULE_9__[/* default */ "a"].folderDelete(folderToRemove.fullNameRaw, Stores_User_Folder__WEBPACK_IMPORTED_MODULE_8__[/* default */ "a"].foldersDeleting), Common_Enums__WEBPACK_IMPORTED_MODULE_2__["Notification"].CantDeleteFolder);
        Object(Common_Cache__WEBPACK_IMPORTED_MODULE_5__[/* removeFolderFromCacheList */ "o"])(folderToRemove.fullNameRaw);
      }
    } else if (0 < folderToRemove.privateMessageCountAll()) {
      Stores_User_Folder__WEBPACK_IMPORTED_MODULE_8__[/* default */ "a"].folderList.error(Object(Common_Translator__WEBPACK_IMPORTED_MODULE_4__["getNotification"])(Common_Enums__WEBPACK_IMPORTED_MODULE_2__["Notification"].CantDeleteNonEmptyFolder));
    }
  };

  _proto.subscribeFolder = function subscribeFolder(folder) {
    Storage_Client__WEBPACK_IMPORTED_MODULE_7__[/* set */ "b"](Common_Enums__WEBPACK_IMPORTED_MODULE_2__["ClientSideKeyName"].FoldersLashHash, '');
    Remote_User_Ajax__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"].folderSetSubscribe(Common_Utils__WEBPACK_IMPORTED_MODULE_3__["noop"], folder.fullNameRaw, true);
    folder.subScribed(true);
  };

  _proto.unSubscribeFolder = function unSubscribeFolder(folder) {
    Storage_Client__WEBPACK_IMPORTED_MODULE_7__[/* set */ "b"](Common_Enums__WEBPACK_IMPORTED_MODULE_2__["ClientSideKeyName"].FoldersLashHash, '');
    Remote_User_Ajax__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"].folderSetSubscribe(Common_Utils__WEBPACK_IMPORTED_MODULE_3__["noop"], folder.fullNameRaw, false);
    folder.subScribed(false);
  };

  _proto.checkableTrueFolder = function checkableTrueFolder(folder) {
    Remote_User_Ajax__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"].folderSetCheckable(Common_Utils__WEBPACK_IMPORTED_MODULE_3__["noop"], folder.fullNameRaw, true);
    folder.checkable(true);
  };

  _proto.checkableFalseFolder = function checkableFalseFolder(folder) {
    Remote_User_Ajax__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"].folderSetCheckable(Common_Utils__WEBPACK_IMPORTED_MODULE_3__["noop"], folder.fullNameRaw, false);
    folder.checkable(false);
  };

  return FoldersUserSettings;
}();



/***/ }),
/* 446 */
/*!*************************************!*\
  !*** ./dev/Settings/User/Themes.js ***!
  \*************************************/
/*! exports provided: ThemesUserSettings, default */
/*! exports used: ThemesUserSettings */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThemesUserSettings; });
/* unused harmony export default */
/* harmony import */ var core_js_modules_es_function_name__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.function.name */ 51);
/* harmony import */ var core_js_modules_es_function_name__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_function_name__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/map */ 18);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! _ */ 3);
/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(___WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var $__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! $ */ 8);
/* harmony import */ var $__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n($__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var ko__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ko */ 1);
/* harmony import */ var Jua__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! Jua */ 175);
/* harmony import */ var Jua__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(Jua__WEBPACK_IMPORTED_MODULE_5__);
/* harmony import */ var Common_Enums__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! Common/Enums */ 0);
/* harmony import */ var Common_Utils__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! Common/Utils */ 2);
/* harmony import */ var Common_Links__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! Common/Links */ 15);
/* harmony import */ var Common_Translator__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! Common/Translator */ 9);
/* harmony import */ var Storage_Settings__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! Storage/Settings */ 5);
/* harmony import */ var Stores_Theme__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! Stores/Theme */ 114);
/* harmony import */ var Remote_User_Ajax__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! Remote/User/Ajax */ 16);














var ThemesUserSettings =
/*#__PURE__*/
function () {
  function ThemesUserSettings() {
    var _this = this;

    this.theme = Stores_Theme__WEBPACK_IMPORTED_MODULE_11__[/* default */ "a"].theme;
    this.themes = Stores_Theme__WEBPACK_IMPORTED_MODULE_11__[/* default */ "a"].themes;
    this.themesObjects = ko__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"].observableArray([]);
    this.background = {};
    this.background.name = Stores_Theme__WEBPACK_IMPORTED_MODULE_11__[/* default */ "a"].themeBackgroundName;
    this.background.hash = Stores_Theme__WEBPACK_IMPORTED_MODULE_11__[/* default */ "a"].themeBackgroundHash;
    this.background.uploaderButton = ko__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"].observable(null);
    this.background.loading = ko__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"].observable(false);
    this.background.error = ko__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"].observable('');
    this.capaUserBackground = ko__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"].observable(Object(Storage_Settings__WEBPACK_IMPORTED_MODULE_10__["capa"])(Common_Enums__WEBPACK_IMPORTED_MODULE_6__["Capa"].UserBackground));
    this.themeTrigger = ko__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"].observable(Common_Enums__WEBPACK_IMPORTED_MODULE_6__["SaveSettingsStep"].Idle).extend({
      throttle: Common_Enums__WEBPACK_IMPORTED_MODULE_6__["Magics"].Time100ms
    });
    this.iTimer = 0;
    this.oThemeAjaxRequest = null;
    this.theme.subscribe(function (value) {
      ___WEBPACK_IMPORTED_MODULE_2___default.a.each(_this.themesObjects(), function (theme) {
        theme.selected(value === theme.name);
      });

      Object(Common_Utils__WEBPACK_IMPORTED_MODULE_7__["changeTheme"])(value, _this.themeTrigger);
      Remote_User_Ajax__WEBPACK_IMPORTED_MODULE_12__[/* default */ "a"].saveSettings(null, {
        'Theme': value
      });
    });
    this.background.hash.subscribe(function (value) {
      var $bg = $__WEBPACK_IMPORTED_MODULE_3___default()('#rl-bg');

      if (!value) {
        if ($bg.data('backstretch')) {
          $bg.backstretch('destroy').attr('style', '');
        }
      } else {
        $bg.attr('style', 'background-image: none !important;').backstretch(Object(Common_Links__WEBPACK_IMPORTED_MODULE_8__[/* userBackground */ "J"])(value), {
          fade: Common_Enums__WEBPACK_IMPORTED_MODULE_6__["Magics"].Time1s,
          centeredX: true,
          centeredY: true
        }).removeAttr('style');
      }
    });
  }

  var _proto = ThemesUserSettings.prototype;

  _proto.onBuild = function onBuild() {
    var currentTheme = this.theme();
    this.themesObjects(_babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_1___default()(___WEBPACK_IMPORTED_MODULE_2___default.a).call(___WEBPACK_IMPORTED_MODULE_2___default.a, this.themes(), function (theme) {
      return {
        name: theme,
        nameDisplay: Object(Common_Utils__WEBPACK_IMPORTED_MODULE_7__["convertThemeName"])(theme),
        selected: ko__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"].observable(theme === currentTheme),
        themePreviewSrc: Object(Common_Links__WEBPACK_IMPORTED_MODULE_8__[/* themePreviewLink */ "F"])(theme)
      };
    }));
    this.initUploader();
  };

  _proto.onShow = function onShow() {
    this.background.error('');
  };

  _proto.clearBackground = function clearBackground() {
    var _this2 = this;

    if (this.capaUserBackground()) {
      Remote_User_Ajax__WEBPACK_IMPORTED_MODULE_12__[/* default */ "a"].clearUserBackground(function () {
        _this2.background.name('');

        _this2.background.hash('');
      });
    }
  };

  _proto.initUploader = function initUploader() {
    var _this3 = this;

    if (this.background.uploaderButton() && this.capaUserBackground()) {
      var oJua = new Jua__WEBPACK_IMPORTED_MODULE_5___default.a({
        'action': Object(Common_Links__WEBPACK_IMPORTED_MODULE_8__[/* uploadBackground */ "H"])(),
        'name': 'uploader',
        'queueSize': 1,
        'multipleSizeLimit': 1,
        'disableDragAndDrop': true,
        'disableMultiple': true,
        'clickElement': this.background.uploaderButton()
      });
      oJua.on('onStart', function () {
        _this3.background.loading(true);

        _this3.background.error('');

        return true;
      }).on('onComplete', function (id, result, data) {
        _this3.background.loading(false);

        if (result && id && data && data.Result && data.Result.Name && data.Result.Hash) {
          _this3.background.name(data.Result.Name);

          _this3.background.hash(data.Result.Hash);
        } else {
          _this3.background.name('');

          _this3.background.hash('');

          var errorMsg = '';

          if (data.ErrorCode) {
            switch (data.ErrorCode) {
              case Common_Enums__WEBPACK_IMPORTED_MODULE_6__["UploadErrorCode"].FileIsTooBig:
                errorMsg = Object(Common_Translator__WEBPACK_IMPORTED_MODULE_9__["i18n"])('SETTINGS_THEMES/ERROR_FILE_IS_TOO_BIG');
                break;

              case Common_Enums__WEBPACK_IMPORTED_MODULE_6__["UploadErrorCode"].FileType:
                errorMsg = Object(Common_Translator__WEBPACK_IMPORTED_MODULE_9__["i18n"])('SETTINGS_THEMES/ERROR_FILE_TYPE_ERROR');
                break;
              // no default
            }
          }

          if (!errorMsg && data.ErrorMessage) {
            errorMsg = data.ErrorMessage;
          }

          _this3.background.error(errorMsg || Object(Common_Translator__WEBPACK_IMPORTED_MODULE_9__["i18n"])('SETTINGS_THEMES/ERROR_UNKNOWN'));
        }

        return true;
      });
    }
  };

  return ThemesUserSettings;
}();



/***/ }),
/* 447 */
/*!**************************************!*\
  !*** ./dev/Settings/User/OpenPgp.js ***!
  \**************************************/
/*! exports provided: OpenPgpUserSettings, default */
/*! exports used: OpenPgpUserSettings */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return OpenPgpUserSettings; });
/* unused harmony export default */
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/find */ 12);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! _ */ 3);
/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(___WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var ko__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ko */ 1);
/* harmony import */ var Common_Utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! Common/Utils */ 2);
/* harmony import */ var Common_Enums__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! Common/Enums */ 0);
/* harmony import */ var Common_Globals__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! Common/Globals */ 6);
/* harmony import */ var Stores_User_Pgp__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! Stores/User/Pgp */ 41);
/* harmony import */ var Stores_User_Settings__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! Stores/User/Settings */ 38);
/* harmony import */ var Remote_User_Ajax__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! Remote/User/Ajax */ 16);
/* harmony import */ var Helper_Apps_User__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! Helper/Apps/User */ 22);
/* harmony import */ var Knoin_Knoin__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! Knoin/Knoin */ 7);












var OpenPgpUserSettings =
/*#__PURE__*/
function () {
  function OpenPgpUserSettings() {
    this.openpgpkeys = Stores_User_Pgp__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"].openpgpkeys;
    this.openpgpkeysPublic = Stores_User_Pgp__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"].openpgpkeysPublic;
    this.openpgpkeysPrivate = Stores_User_Pgp__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"].openpgpkeysPrivate;
    this.openPgpKeyForDeletion = ko__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"].observable(null).deleteAccessHelper();
    this.allowDraftAutosave = Stores_User_Settings__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"].allowDraftAutosave;
    this.isHttps = Common_Globals__WEBPACK_IMPORTED_MODULE_5__["bIsHttps"];
  }

  var _proto = OpenPgpUserSettings.prototype;

  _proto.addOpenPgpKey = function addOpenPgpKey() {
    Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_10__["showScreenPopup"])(__webpack_require__(/*! View/Popup/AddOpenPgpKey */ 530));
  };

  _proto.generateOpenPgpKey = function generateOpenPgpKey() {
    Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_10__["showScreenPopup"])(__webpack_require__(/*! View/Popup/NewOpenPgpKey */ 531));
  };

  _proto.viewOpenPgpKey = function viewOpenPgpKey(openPgpKey) {
    if (openPgpKey) {
      Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_10__["showScreenPopup"])(__webpack_require__(/*! View/Popup/ViewOpenPgpKey */ 532), [openPgpKey]);
    }
  }
  /**
   * @param {OpenPgpKeyModel} openPgpKeyToRemove
   * @returns {void}
   */
  ;

  _proto.deleteOpenPgpKey = function deleteOpenPgpKey(openPgpKeyToRemove) {
    if (openPgpKeyToRemove && openPgpKeyToRemove.deleteAccess()) {
      this.openPgpKeyForDeletion(null);

      if (openPgpKeyToRemove && Stores_User_Pgp__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"].openpgpKeyring) {
        var findedItem = _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_0___default()(___WEBPACK_IMPORTED_MODULE_1___default.a).call(___WEBPACK_IMPORTED_MODULE_1___default.a, Stores_User_Pgp__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"].openpgpkeys(), function (key) {
          return openPgpKeyToRemove === key;
        });

        if (findedItem) {
          Stores_User_Pgp__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"].openpgpkeys.remove(findedItem);
          Object(Common_Utils__WEBPACK_IMPORTED_MODULE_3__["delegateRunOnDestroy"])(findedItem);
          Stores_User_Pgp__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"].openpgpKeyring[findedItem.isPrivate ? 'privateKeys' : 'publicKeys'].removeForId(findedItem.guid);
          Stores_User_Pgp__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"].openpgpKeyring.store();
        }

        Object(Helper_Apps_User__WEBPACK_IMPORTED_MODULE_9__[/* getApp */ "a"])().reloadOpenPgpKeys();
      }
    }
  };

  _proto.onBuild = function onBuild() {
    var _this = this;

    ___WEBPACK_IMPORTED_MODULE_1___default.a.delay(function () {
      _this.allowDraftAutosave.subscribe(Remote_User_Ajax__WEBPACK_IMPORTED_MODULE_8__[/* default */ "a"].saveSettingsHelper('AllowDraftAutosave', Common_Utils__WEBPACK_IMPORTED_MODULE_3__["boolToAjax"]));
    }, Common_Enums__WEBPACK_IMPORTED_MODULE_4__["Magics"].Time50ms);
  };

  return OpenPgpUserSettings;
}();



/***/ }),
/* 448 */
/*!**************************************************!*\
  !*** ./dev/View/User/Settings/SystemDropDown.js ***!
  \**************************************************/
/*! exports provided: SystemDropDownSettingsUserView, default */
/*! exports used: SystemDropDownSettingsUserView */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return SystemDropDownSettingsUserView; });
/* unused harmony export default */
/* harmony import */ var _babel_runtime_corejs3_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/esm/inheritsLoose */ 10);
/* harmony import */ var Knoin_Knoin__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! Knoin/Knoin */ 7);
/* harmony import */ var View_User_AbstractSystemDropDown__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! View/User/AbstractSystemDropDown */ 276);


var _dec, _class;



var SystemDropDownSettingsUserView = (_dec = Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_1__["view"])({
  name: 'View/User/Settings/SystemDropDown',
  type: Knoin_Knoin__WEBPACK_IMPORTED_MODULE_1__["ViewType"].Right,
  templateID: 'SystemDropDown'
}), _dec(_class =
/*#__PURE__*/
function (_AbstractSystemDropDo) {
  Object(_babel_runtime_corejs3_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(SystemDropDownSettingsUserView, _AbstractSystemDropDo);

  function SystemDropDownSettingsUserView() {
    return _AbstractSystemDropDo.apply(this, arguments) || this;
  }

  return SystemDropDownSettingsUserView;
}(View_User_AbstractSystemDropDown__WEBPACK_IMPORTED_MODULE_2__[/* AbstractSystemDropDownUserView */ "a"])) || _class);


/***/ }),
/* 449 */
/*!****************************************!*\
  !*** ./dev/View/User/Settings/Menu.js ***!
  \****************************************/
/*! exports provided: MenuSettingsUserView, default */
/*! exports used: MenuSettingsUserView */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return MenuSettingsUserView; });
/* unused harmony export default */
/* harmony import */ var core_js_modules_es_string_link__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.string.link */ 172);
/* harmony import */ var core_js_modules_es_string_link__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_link__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _babel_runtime_corejs3_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/esm/inheritsLoose */ 10);
/* harmony import */ var $__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! $ */ 8);
/* harmony import */ var $__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n($__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var key__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! key */ 21);
/* harmony import */ var key__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(key__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var Common_Enums__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! Common/Enums */ 0);
/* harmony import */ var Common_Globals__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! Common/Globals */ 6);
/* harmony import */ var Common_Links__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! Common/Links */ 15);
/* harmony import */ var Common_Cache__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! Common/Cache */ 14);
/* harmony import */ var Storage_Settings__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! Storage/Settings */ 5);
/* harmony import */ var Knoin_Knoin__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! Knoin/Knoin */ 7);
/* harmony import */ var Knoin_AbstractViewNext__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! Knoin/AbstractViewNext */ 28);



var _dec, _class;










var MenuSettingsUserView = (_dec = Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_9__["view"])({
  name: 'View/User/Settings/Menu',
  type: Knoin_Knoin__WEBPACK_IMPORTED_MODULE_9__["ViewType"].Left,
  templateID: 'SettingsMenu'
}), _dec(_class =
/*#__PURE__*/
function (_AbstractViewNext) {
  Object(_babel_runtime_corejs3_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(MenuSettingsUserView, _AbstractViewNext);

  /**
   * @param {Object} screen
   */
  function MenuSettingsUserView(screen) {
    var _this;

    _this = _AbstractViewNext.call(this) || this;
    _this.leftPanelDisabled = Common_Globals__WEBPACK_IMPORTED_MODULE_5__["leftPanelDisabled"];
    _this.mobile = Storage_Settings__WEBPACK_IMPORTED_MODULE_8__["appSettingsGet"]('mobile');
    _this.menu = screen.menu;
    return _this;
  }

  var _proto = MenuSettingsUserView.prototype;

  _proto.onBuild = function onBuild(dom) {
    if (this.mobile) {
      dom.on('click', '.b-settings-menu .e-item.selectable', function () {
        Object(Common_Globals__WEBPACK_IMPORTED_MODULE_5__["leftPanelDisabled"])(true);
      });
    }

    key__WEBPACK_IMPORTED_MODULE_3___default()('up, down', Common_Enums__WEBPACK_IMPORTED_MODULE_4__["KeyState"].Settings, Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_9__["settingsMenuKeysHandler"])($__WEBPACK_IMPORTED_MODULE_2___default()('.b-settings-menu .e-item', dom)));
  };

  _proto.link = function link(route) {
    return Object(Common_Links__WEBPACK_IMPORTED_MODULE_6__[/* settings */ "z"])(route);
  };

  _proto.backToMailBoxClick = function backToMailBoxClick() {
    Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_9__["setHash"])(Object(Common_Links__WEBPACK_IMPORTED_MODULE_6__[/* inbox */ "m"])(Object(Common_Cache__WEBPACK_IMPORTED_MODULE_7__[/* getFolderInboxName */ "h"])()));
  };

  return MenuSettingsUserView;
}(Knoin_AbstractViewNext__WEBPACK_IMPORTED_MODULE_10__[/* AbstractViewNext */ "a"])) || _class);


/***/ }),
/* 450 */
/*!****************************************!*\
  !*** ./dev/View/User/Settings/Pane.js ***!
  \****************************************/
/*! exports provided: PaneSettingsUserView, default */
/*! exports used: PaneSettingsUserView */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return PaneSettingsUserView; });
/* unused harmony export default */
/* harmony import */ var _babel_runtime_corejs3_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/esm/inheritsLoose */ 10);
/* harmony import */ var Common_Links__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! Common/Links */ 15);
/* harmony import */ var Common_Cache__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! Common/Cache */ 14);
/* harmony import */ var Common_Globals__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! Common/Globals */ 6);
/* harmony import */ var Storage_Settings__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! Storage/Settings */ 5);
/* harmony import */ var Stores_User_Message__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! Stores/User/Message */ 13);
/* harmony import */ var Knoin_Knoin__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! Knoin/Knoin */ 7);
/* harmony import */ var Knoin_AbstractViewNext__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! Knoin/AbstractViewNext */ 28);


var _dec, _class;








var PaneSettingsUserView = (_dec = Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_6__["view"])({
  name: 'View/User/Settings/Pane',
  type: Knoin_Knoin__WEBPACK_IMPORTED_MODULE_6__["ViewType"].Right,
  templateID: 'SettingsPane'
}), _dec(_class =
/*#__PURE__*/
function (_AbstractViewNext) {
  Object(_babel_runtime_corejs3_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(PaneSettingsUserView, _AbstractViewNext);

  function PaneSettingsUserView() {
    var _this;

    _this = _AbstractViewNext.call(this) || this;
    _this.mobile = Storage_Settings__WEBPACK_IMPORTED_MODULE_4__["appSettingsGet"]('mobile');
    _this.leftPanelDisabled = Common_Globals__WEBPACK_IMPORTED_MODULE_3__["leftPanelDisabled"];
    return _this;
  }

  var _proto = PaneSettingsUserView.prototype;

  _proto.onShow = function onShow() {
    Stores_User_Message__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"].message(null);
  };

  _proto.hideLeft = function hideLeft(item, event) {
    event.preventDefault();
    event.stopPropagation();
    Object(Common_Globals__WEBPACK_IMPORTED_MODULE_3__["leftPanelDisabled"])(true);
  };

  _proto.showLeft = function showLeft(item, event) {
    event.preventDefault();
    event.stopPropagation();
    Object(Common_Globals__WEBPACK_IMPORTED_MODULE_3__["leftPanelDisabled"])(false);
  };

  _proto.onBuild = function onBuild(dom) {
    if (this.mobile) {
      dom.on('click', function () {
        Object(Common_Globals__WEBPACK_IMPORTED_MODULE_3__["leftPanelDisabled"])(true);
      });
    }
  };

  _proto.backToMailBoxClick = function backToMailBoxClick() {
    Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_6__["setHash"])(Object(Common_Links__WEBPACK_IMPORTED_MODULE_1__[/* inbox */ "m"])(Object(Common_Cache__WEBPACK_IMPORTED_MODULE_2__[/* getFolderInboxName */ "h"])()));
  };

  return PaneSettingsUserView;
}(Knoin_AbstractViewNext__WEBPACK_IMPORTED_MODULE_7__[/* AbstractViewNext */ "a"])) || _class);


/***/ }),
/* 451 */,
/* 452 */,
/* 453 */,
/* 454 */,
/* 455 */,
/* 456 */,
/* 457 */,
/* 458 */,
/* 459 */,
/* 460 */,
/* 461 */,
/* 462 */,
/* 463 */,
/* 464 */,
/* 465 */,
/* 466 */,
/* 467 */,
/* 468 */,
/* 469 */,
/* 470 */,
/* 471 */,
/* 472 */,
/* 473 */,
/* 474 */,
/* 475 */,
/* 476 */,
/* 477 */,
/* 478 */,
/* 479 */,
/* 480 */,
/* 481 */,
/* 482 */,
/* 483 */,
/* 484 */,
/* 485 */,
/* 486 */,
/* 487 */,
/* 488 */,
/* 489 */,
/* 490 */,
/* 491 */,
/* 492 */,
/* 493 */,
/* 494 */,
/* 495 */,
/* 496 */,
/* 497 */,
/* 498 */,
/* 499 */,
/* 500 */,
/* 501 */,
/* 502 */,
/* 503 */,
/* 504 */,
/* 505 */,
/* 506 */,
/* 507 */,
/* 508 */,
/* 509 */,
/* 510 */,
/* 511 */,
/* 512 */,
/* 513 */,
/* 514 */,
/* 515 */,
/* 516 */,
/* 517 */
/*!********************!*\
  !*** ./dev/app.js ***!
  \********************/
/*! no exports provided */
/*! all exports used */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var bootstrap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! bootstrap */ 255);
/* harmony import */ var App_User__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! App/User */ 389);


Object(bootstrap__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(App_User__WEBPACK_IMPORTED_MODULE_1__["default"]);

/***/ }),
/* 518 */
/*!***********************************************************!*\
  !*** ./node_modules/core-js-pure/stable/instance/sort.js ***!
  \***********************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

module.exports = __webpack_require__(/*! ../../es/instance/sort */ 519);


/***/ }),
/* 519 */
/*!*******************************************************!*\
  !*** ./node_modules/core-js-pure/es/instance/sort.js ***!
  \*******************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

var sort = __webpack_require__(/*! ../array/virtual/sort */ 520);

var ArrayPrototype = Array.prototype;

module.exports = function (it) {
  var own = it.sort;
  return it === ArrayPrototype || (it instanceof Array && own === ArrayPrototype.sort) ? sort : own;
};


/***/ }),
/* 520 */
/*!************************************************************!*\
  !*** ./node_modules/core-js-pure/es/array/virtual/sort.js ***!
  \************************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

__webpack_require__(/*! ../../../modules/es.array.sort */ 521);
var entryVirtual = __webpack_require__(/*! ../../../internals/entry-virtual */ 54);

module.exports = entryVirtual('Array').sort;


/***/ }),
/* 521 */
/*!************************************************************!*\
  !*** ./node_modules/core-js-pure/modules/es.array.sort.js ***!
  \************************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var $ = __webpack_require__(/*! ../internals/export */ 43);
var aFunction = __webpack_require__(/*! ../internals/a-function */ 173);
var toObject = __webpack_require__(/*! ../internals/to-object */ 121);
var fails = __webpack_require__(/*! ../internals/fails */ 57);
var sloppyArrayMethod = __webpack_require__(/*! ../internals/sloppy-array-method */ 145);

var nativeSort = [].sort;
var test = [1, 2, 3];

// IE8-
var FAILS_ON_UNDEFINED = fails(function () {
  test.sort(undefined);
});
// V8 bug
var FAILS_ON_NULL = fails(function () {
  test.sort(null);
});
// Old WebKit
var SLOPPY_METHOD = sloppyArrayMethod('sort');

var FORCED = FAILS_ON_UNDEFINED || !FAILS_ON_NULL || SLOPPY_METHOD;

// `Array.prototype.sort` method
// https://tc39.github.io/ecma262/#sec-array.prototype.sort
$({ target: 'Array', proto: true, forced: FORCED }, {
  sort: function sort(comparefn) {
    return comparefn === undefined
      ? nativeSort.call(toObject(this))
      : nativeSort.call(toObject(this), aFunction(comparefn));
  }
});


/***/ }),
/* 522 */
/*!******************************************!*\
  !*** ./dev/View/Popup/MessageOpenPgp.js ***!
  \******************************************/
/*! exports provided: MessageOpenPgpPopupView, default */
/*! all exports used */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MessageOpenPgpPopupView", function() { return MessageOpenPgpPopupView; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return MessageOpenPgpPopupView; });
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor */ 19);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/find */ 12);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _babel_runtime_corejs3_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/esm/inheritsLoose */ 10);
/* harmony import */ var _babel_runtime_corejs3_helpers_esm_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/esm/applyDecoratedDescriptor */ 20);
/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! _ */ 3);
/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(___WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var ko__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ko */ 1);
/* harmony import */ var key__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! key */ 21);
/* harmony import */ var key__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(key__WEBPACK_IMPORTED_MODULE_6__);
/* harmony import */ var $__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! $ */ 8);
/* harmony import */ var $__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n($__WEBPACK_IMPORTED_MODULE_7__);
/* harmony import */ var Common_Utils__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! Common/Utils */ 2);
/* harmony import */ var Common_Enums__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! Common/Enums */ 0);
/* harmony import */ var Knoin_Knoin__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! Knoin/Knoin */ 7);
/* harmony import */ var Knoin_AbstractViewNext__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! Knoin/AbstractViewNext */ 28);





var _dec, _dec2, _class, _class2;









var MessageOpenPgpPopupView = (_dec = Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_10__["popup"])({
  name: 'View/Popup/MessageOpenPgp',
  templateID: 'PopupsMessageOpenPgp'
}), _dec2 = Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_10__["command"])(function (self) {
  return !self.submitRequest();
}), _dec(_class = (_class2 =
/*#__PURE__*/
function (_AbstractViewNext) {
  Object(_babel_runtime_corejs3_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(MessageOpenPgpPopupView, _AbstractViewNext);

  function MessageOpenPgpPopupView() {
    var _this;

    _this = _AbstractViewNext.call(this) || this;
    _this.notification = ko__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"].observable('');
    _this.selectedKey = ko__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"].observable(null);
    _this.privateKeys = ko__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"].observableArray([]);
    _this.password = ko__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"].observable('');
    _this.password.focus = ko__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"].observable(false);
    _this.buttonFocus = ko__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"].observable(false);
    _this.resultCallback = null;
    _this.submitRequest = ko__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"].observable(false);
    _this.sDefaultKeyScope = Common_Enums__WEBPACK_IMPORTED_MODULE_9__["KeyState"].PopupMessageOpenPGP;
    return _this;
  }

  var _proto = MessageOpenPgpPopupView.prototype;

  _proto.doCommand = function doCommand() {
    var _this2 = this;

    this.submitRequest(true);

    ___WEBPACK_IMPORTED_MODULE_4___default.a.delay(function () {
      var privateKey = null;

      try {
        if (_this2.resultCallback && _this2.selectedKey()) {
          var privateKeys = _this2.selectedKey().getNativeKeys();

          privateKey = privateKeys && privateKeys[0] ? privateKeys[0] : null;

          if (privateKey) {
            try {
              if (!privateKey.decrypt(Object(Common_Utils__WEBPACK_IMPORTED_MODULE_8__["pString"])(_this2.password()))) {
                Object(Common_Utils__WEBPACK_IMPORTED_MODULE_8__["log"])('Error: Private key cannot be decrypted');
                privateKey = null;
              }
            } catch (e) {
              Object(Common_Utils__WEBPACK_IMPORTED_MODULE_8__["log"])(e);
              privateKey = null;
            }
          } else {
            Object(Common_Utils__WEBPACK_IMPORTED_MODULE_8__["log"])('Error: Private key cannot be found');
          }
        }
      } catch (e) {
        Object(Common_Utils__WEBPACK_IMPORTED_MODULE_8__["log"])(e);
        privateKey = null;
      }

      _this2.submitRequest(false);

      _this2.cancelCommand();

      _this2.resultCallback(privateKey);
    }, Common_Enums__WEBPACK_IMPORTED_MODULE_9__["Magics"].Time100ms);
  };

  _proto.clearPopup = function clearPopup() {
    this.notification('');
    this.password('');
    this.password.focus(false);
    this.buttonFocus(false);
    this.selectedKey(false);
    this.submitRequest(false);
    this.resultCallback = null;
    this.privateKeys([]);
  };

  _proto.onBuild = function onBuild(oDom) {
    var _this3 = this;

    key__WEBPACK_IMPORTED_MODULE_6___default()('tab,shift+tab', Common_Enums__WEBPACK_IMPORTED_MODULE_9__["KeyState"].PopupMessageOpenPGP, function () {
      switch (true) {
        case _this3.password.focus():
          _this3.buttonFocus(true);

          break;

        case _this3.buttonFocus():
          _this3.password.focus(true);

          break;
        // no default
      }

      return false;
    });
    var self = this;
    oDom.on('click', '.key-list__item', function () {
      var _context;

      // eslint-disable-line prefer-arrow-callback
      _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_1___default()(oDom).call(oDom, '.key-list__item .key-list__item__radio').addClass('icon-radio-unchecked').removeClass('icon-radio-checked');

      _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_1___default()(_context = $__WEBPACK_IMPORTED_MODULE_7___default()(this)).call(_context, '.key-list__item__radio') // eslint-disable-line no-invalid-this
      .removeClass('icon-radio-unchecked').addClass('icon-radio-checked');

      self.selectedKey(ko__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"].dataFor(this)); // eslint-disable-line no-invalid-this

      self.password.focus(true);
    });
  };

  _proto.onHideWithDelay = function onHideWithDelay() {
    this.clearPopup();
  };

  _proto.onShowWithDelay = function onShowWithDelay() {
    this.password.focus(true); //		this.buttonFocus(true);
  };

  _proto.onShow = function onShow(fCallback, privateKeys) {
    this.clearPopup();
    this.resultCallback = fCallback;
    this.privateKeys(privateKeys);

    if (this.viewModelDom) {
      var _context2;

      _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_1___default()(_context2 = this.viewModelDom).call(_context2, '.key-list__item').first().click();
    }
  };

  return MessageOpenPgpPopupView;
}(Knoin_AbstractViewNext__WEBPACK_IMPORTED_MODULE_11__[/* AbstractViewNext */ "a"]), (Object(_babel_runtime_corejs3_helpers_esm_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(_class2.prototype, "doCommand", [_dec2], _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_0___default()(_class2.prototype, "doCommand"), _class2.prototype)), _class2)) || _class);


/***/ }),
/* 523 */
/*!***********************************************************!*\
  !*** ./node_modules/core-js-pure/stable/instance/keys.js ***!
  \***********************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

__webpack_require__(/*! ../../modules/web.dom-collections.iterator */ 219);
var keys = __webpack_require__(/*! ../array/virtual/keys */ 524);
var classof = __webpack_require__(/*! ../../internals/classof */ 174);
var ArrayPrototype = Array.prototype;

var DOMIterables = {
  DOMTokenList: true,
  NodeList: true
};

module.exports = function (it) {
  var own = it.keys;
  return it === ArrayPrototype || (it instanceof Array && own === ArrayPrototype.keys)
    // eslint-disable-next-line no-prototype-builtins
    || DOMIterables.hasOwnProperty(classof(it)) ? keys : own;
};


/***/ }),
/* 524 */
/*!****************************************************************!*\
  !*** ./node_modules/core-js-pure/stable/array/virtual/keys.js ***!
  \****************************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

module.exports = __webpack_require__(/*! ../../../es/array/virtual/keys */ 525);


/***/ }),
/* 525 */
/*!************************************************************!*\
  !*** ./node_modules/core-js-pure/es/array/virtual/keys.js ***!
  \************************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {

__webpack_require__(/*! ../../../modules/es.array.iterator */ 220);
var entryVirtual = __webpack_require__(/*! ../../../internals/entry-virtual */ 54);

module.exports = entryVirtual('Array').keys;


/***/ }),
/* 526 */
/*!******************************************!*\
  !*** ./dev/View/Popup/ComposeOpenPgp.js ***!
  \******************************************/
/*! exports provided: ComposeOpenPgpPopupView, default */
/*! all exports used */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ComposeOpenPgpPopupView", function() { return ComposeOpenPgpPopupView; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return ComposeOpenPgpPopupView; });
/* harmony import */ var core_js_modules_es_array_join__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.array.join */ 74);
/* harmony import */ var core_js_modules_es_array_join__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_join__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var core_js_modules_es_regexp_exec__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es.regexp.exec */ 45);
/* harmony import */ var core_js_modules_es_regexp_exec__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_regexp_exec__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var core_js_modules_es_string_split__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core-js/modules/es.string.split */ 171);
/* harmony import */ var core_js_modules_es_string_split__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_split__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor */ 19);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/find */ 12);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/concat */ 159);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_5__);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_bind__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/bind */ 26);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_bind__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_bind__WEBPACK_IMPORTED_MODULE_6__);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/map */ 18);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_7__);
/* harmony import */ var _babel_runtime_corejs3_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/esm/assertThisInitialized */ 33);
/* harmony import */ var _babel_runtime_corejs3_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/esm/inheritsLoose */ 10);
/* harmony import */ var _babel_runtime_corejs3_helpers_esm_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/esm/applyDecoratedDescriptor */ 20);
/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! _ */ 3);
/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(___WEBPACK_IMPORTED_MODULE_11__);
/* harmony import */ var $__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! $ */ 8);
/* harmony import */ var $__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n($__WEBPACK_IMPORTED_MODULE_12__);
/* harmony import */ var ko__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ko */ 1);
/* harmony import */ var key__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! key */ 21);
/* harmony import */ var key__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(key__WEBPACK_IMPORTED_MODULE_14__);
/* harmony import */ var Common_Utils__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! Common/Utils */ 2);
/* harmony import */ var Common_Enums__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! Common/Enums */ 0);
/* harmony import */ var Common_Translator__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! Common/Translator */ 9);
/* harmony import */ var Stores_User_Pgp__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! Stores/User/Pgp */ 41);
/* harmony import */ var Model_Email__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! Model/Email */ 80);
/* harmony import */ var Knoin_Knoin__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! Knoin/Knoin */ 7);
/* harmony import */ var Knoin_AbstractViewNext__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! Knoin/AbstractViewNext */ 28);












var _dec, _dec2, _dec3, _dec4, _dec5, _class, _class2;












var KEY_NAME_SUBSTR = -8;
var ComposeOpenPgpPopupView = (_dec = Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_20__["popup"])({
  name: 'View/Popup/ComposeOpenPgp',
  templateID: 'PopupsComposeOpenPgp'
}), _dec2 = Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_20__["command"])(function (self) {
  return !self.submitRequest() && (self.sign() || self.encrypt());
}), _dec3 = Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_20__["command"])(), _dec4 = Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_20__["command"])(), _dec5 = Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_20__["command"])(), _dec(_class = (_class2 =
/*#__PURE__*/
function (_AbstractViewNext) {
  Object(_babel_runtime_corejs3_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_9__[/* default */ "a"])(ComposeOpenPgpPopupView, _AbstractViewNext);

  function ComposeOpenPgpPopupView() {
    var _this;

    _this = _AbstractViewNext.call(this) || this;
    _this.publicKeysOptionsCaption = Object(Common_Translator__WEBPACK_IMPORTED_MODULE_17__["i18n"])('PGP_NOTIFICATIONS/ADD_A_PUBLICK_KEY');
    _this.privateKeysOptionsCaption = Object(Common_Translator__WEBPACK_IMPORTED_MODULE_17__["i18n"])('PGP_NOTIFICATIONS/SELECT_A_PRIVATE_KEY');
    _this.notification = ko__WEBPACK_IMPORTED_MODULE_13__[/* default */ "a"].observable('');
    _this.sign = ko__WEBPACK_IMPORTED_MODULE_13__[/* default */ "a"].observable(false);
    _this.encrypt = ko__WEBPACK_IMPORTED_MODULE_13__[/* default */ "a"].observable(false);
    _this.password = ko__WEBPACK_IMPORTED_MODULE_13__[/* default */ "a"].observable('');
    _this.password.focus = ko__WEBPACK_IMPORTED_MODULE_13__[/* default */ "a"].observable(false);
    _this.buttonFocus = ko__WEBPACK_IMPORTED_MODULE_13__[/* default */ "a"].observable(false);
    _this.text = ko__WEBPACK_IMPORTED_MODULE_13__[/* default */ "a"].observable('');
    _this.selectedPrivateKey = ko__WEBPACK_IMPORTED_MODULE_13__[/* default */ "a"].observable(null);
    _this.selectedPublicKey = ko__WEBPACK_IMPORTED_MODULE_13__[/* default */ "a"].observable(null);
    _this.signKey = ko__WEBPACK_IMPORTED_MODULE_13__[/* default */ "a"].observable(null);
    _this.encryptKeys = ko__WEBPACK_IMPORTED_MODULE_13__[/* default */ "a"].observableArray([]);
    _this.encryptKeysView = ko__WEBPACK_IMPORTED_MODULE_13__[/* default */ "a"].computed(function () {
      return ___WEBPACK_IMPORTED_MODULE_11___default.a.compact(_babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_7___default()(___WEBPACK_IMPORTED_MODULE_11___default.a).call(___WEBPACK_IMPORTED_MODULE_11___default.a, _this.encryptKeys(), function (oKey) {
        return oKey ? oKey.key : null;
      }));
    });
    _this.privateKeysOptions = ko__WEBPACK_IMPORTED_MODULE_13__[/* default */ "a"].computed(function () {
      var opts = _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_7___default()(___WEBPACK_IMPORTED_MODULE_11___default.a).call(___WEBPACK_IMPORTED_MODULE_11___default.a, Stores_User_Pgp__WEBPACK_IMPORTED_MODULE_18__[/* default */ "a"].openpgpkeysPrivate(), function (oKey, iIndex) {
        if (_this.signKey() && _this.signKey().key.id === oKey.id) {
          return null;
        }

        return _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_7___default()(___WEBPACK_IMPORTED_MODULE_11___default.a).call(___WEBPACK_IMPORTED_MODULE_11___default.a, oKey.users, function (user) {
          return {
            'id': oKey.guid,
            'name': '(' + oKey.id.substr(KEY_NAME_SUBSTR).toUpperCase() + ') ' + user,
            'key': oKey,
            'class': iIndex % 2 ? 'odd' : 'even'
          };
        });
      });

      return ___WEBPACK_IMPORTED_MODULE_11___default.a.compact(___WEBPACK_IMPORTED_MODULE_11___default.a.flatten(opts, true));
    });
    _this.publicKeysOptions = ko__WEBPACK_IMPORTED_MODULE_13__[/* default */ "a"].computed(function () {
      var opts = _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_7___default()(___WEBPACK_IMPORTED_MODULE_11___default.a).call(___WEBPACK_IMPORTED_MODULE_11___default.a, Stores_User_Pgp__WEBPACK_IMPORTED_MODULE_18__[/* default */ "a"].openpgpkeysPublic(), function (oKey, index) {
        if (-1 < Object(Common_Utils__WEBPACK_IMPORTED_MODULE_15__["inArray"])(oKey, _this.encryptKeysView())) {
          return null;
        }

        return _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_7___default()(___WEBPACK_IMPORTED_MODULE_11___default.a).call(___WEBPACK_IMPORTED_MODULE_11___default.a, oKey.users, function (user) {
          return {
            'id': oKey.guid,
            'name': '(' + oKey.id.substr(KEY_NAME_SUBSTR).toUpperCase() + ') ' + user,
            'key': oKey,
            'class': index % 2 ? 'odd' : 'even'
          };
        });
      });

      return ___WEBPACK_IMPORTED_MODULE_11___default.a.compact(___WEBPACK_IMPORTED_MODULE_11___default.a.flatten(opts, true));
    });
    _this.submitRequest = ko__WEBPACK_IMPORTED_MODULE_13__[/* default */ "a"].observable(false);
    _this.resultCallback = null;

    _this.selectedPrivateKey.subscribe(function (value) {
      if (value) {
        _this.selectCommand();

        _this.updateCommand();
      }
    });

    _this.selectedPublicKey.subscribe(function (value) {
      if (value) {
        _this.addCommand();
      }
    });

    _this.sDefaultKeyScope = Common_Enums__WEBPACK_IMPORTED_MODULE_16__["KeyState"].PopupComposeOpenPGP;
    _this.defautOptionsAfterRender = Common_Utils__WEBPACK_IMPORTED_MODULE_15__["defautOptionsAfterRender"];

    _this.addOptionClass = function (domOption, item) {
      _this.defautOptionsAfterRender(domOption, item);

      if (item && !Object(Common_Utils__WEBPACK_IMPORTED_MODULE_15__["isUnd"])(item.class) && domOption) {
        $__WEBPACK_IMPORTED_MODULE_12___default()(domOption).addClass(item.class);
      }
    };

    _this.deletePublickKey = _babel_runtime_corejs3_core_js_stable_instance_bind__WEBPACK_IMPORTED_MODULE_6___default()(___WEBPACK_IMPORTED_MODULE_11___default.a).call(___WEBPACK_IMPORTED_MODULE_11___default.a, _this.deletePublickKey, Object(_babel_runtime_corejs3_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8__[/* default */ "a"])(_this));
    return _this;
  }

  var _proto = ComposeOpenPgpPopupView.prototype;

  _proto.doCommand = function doCommand() {
    var _this2 = this;

    var result = true,
        privateKey = null,
        aPublicKeys = [];
    this.submitRequest(true);

    if (result && this.sign()) {
      if (!this.signKey()) {
        this.notification(Object(Common_Translator__WEBPACK_IMPORTED_MODULE_17__["i18n"])('PGP_NOTIFICATIONS/NO_PRIVATE_KEY_FOUND'));
        result = false;
      } else if (!this.signKey().key) {
        this.notification(Object(Common_Translator__WEBPACK_IMPORTED_MODULE_17__["i18n"])('PGP_NOTIFICATIONS/NO_PRIVATE_KEY_FOUND_FOR', {
          'EMAIL': this.signKey().email
        }));
        result = false;
      }

      if (result) {
        var privateKeys = this.signKey().key.getNativeKeys();
        privateKey = privateKeys[0] || null;

        try {
          if (privateKey) {
            privateKey.decrypt(Object(Common_Utils__WEBPACK_IMPORTED_MODULE_15__["pString"])(this.password()));
          }
        } catch (e) {
          privateKey = null;
        }

        if (!privateKey) {
          this.notification(Object(Common_Translator__WEBPACK_IMPORTED_MODULE_17__["i18n"])('PGP_NOTIFICATIONS/NO_PRIVATE_KEY_FOUND'));
          result = false;
        }
      }
    }

    if (result && this.encrypt()) {
      if (0 === this.encryptKeys().length) {
        this.notification(Object(Common_Translator__WEBPACK_IMPORTED_MODULE_17__["i18n"])('PGP_NOTIFICATIONS/NO_PUBLIC_KEYS_FOUND'));
        result = false;
      } else if (this.encryptKeys()) {
        aPublicKeys = [];

        ___WEBPACK_IMPORTED_MODULE_11___default.a.each(this.encryptKeys(), function (oKey) {
          if (oKey && oKey.key) {
            aPublicKeys = _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_5___default()(aPublicKeys).call(aPublicKeys, ___WEBPACK_IMPORTED_MODULE_11___default.a.compact(___WEBPACK_IMPORTED_MODULE_11___default.a.flatten(oKey.key.getNativeKeys())));
          } else if (oKey && oKey.email) {
            _this2.notification(Object(Common_Translator__WEBPACK_IMPORTED_MODULE_17__["i18n"])('PGP_NOTIFICATIONS/NO_PUBLIC_KEYS_FOUND_FOR', {
              'EMAIL': oKey.email
            }));

            result = false;
          }
        });

        if (result && (0 === aPublicKeys.length || this.encryptKeys().length !== aPublicKeys.length)) {
          result = false;
        }
      }
    }

    if (result && this.resultCallback) {
      ___WEBPACK_IMPORTED_MODULE_11___default.a.delay(function () {
        var pgpPromise = null;

        try {
          if (privateKey && 0 === aPublicKeys.length) {
            pgpPromise = Stores_User_Pgp__WEBPACK_IMPORTED_MODULE_18__[/* default */ "a"].openpgp.sign({
              data: _this2.text(),
              privateKeys: [privateKey]
            });
          } else if (privateKey && 0 < aPublicKeys.length) {
            pgpPromise = Stores_User_Pgp__WEBPACK_IMPORTED_MODULE_18__[/* default */ "a"].openpgp.encrypt({
              data: _this2.text(),
              publicKeys: aPublicKeys,
              privateKeys: [privateKey]
            });
          } else if (!privateKey && 0 < aPublicKeys.length) {
            pgpPromise = Stores_User_Pgp__WEBPACK_IMPORTED_MODULE_18__[/* default */ "a"].openpgp.encrypt({
              data: _this2.text(),
              publicKeys: aPublicKeys
            });
          }
        } catch (e) {
          Object(Common_Utils__WEBPACK_IMPORTED_MODULE_15__["log"])(e);

          _this2.notification(Object(Common_Translator__WEBPACK_IMPORTED_MODULE_17__["i18n"])('PGP_NOTIFICATIONS/PGP_ERROR', {
            'ERROR': '' + e
          }));
        }

        if (pgpPromise) {
          try {
            pgpPromise.then(function (mData) {
              _this2.resultCallback(mData.data);

              _this2.cancelCommand();
            }).catch(function (e) {
              _this2.notification(Object(Common_Translator__WEBPACK_IMPORTED_MODULE_17__["i18n"])('PGP_NOTIFICATIONS/PGP_ERROR', {
                'ERROR': '' + e
              }));
            });
          } catch (e) {
            _this2.notification(Object(Common_Translator__WEBPACK_IMPORTED_MODULE_17__["i18n"])('PGP_NOTIFICATIONS/PGP_ERROR', {
              'ERROR': '' + e
            }));
          }
        }

        _this2.submitRequest(false);
      }, Common_Enums__WEBPACK_IMPORTED_MODULE_16__["Magics"].Time20ms);
    } else {
      this.submitRequest(false);
    }

    return result;
  };

  _proto.selectCommand = function selectCommand() {
    var keyId = this.selectedPrivateKey(),
        option = keyId ? _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_4___default()(___WEBPACK_IMPORTED_MODULE_11___default.a).call(___WEBPACK_IMPORTED_MODULE_11___default.a, this.privateKeysOptions(), function (item) {
      return item && keyId === item.id;
    }) : null;

    if (option) {
      this.signKey({
        'empty': !option.key,
        'selected': ko__WEBPACK_IMPORTED_MODULE_13__[/* default */ "a"].observable(!!option.key),
        'users': option.key.users,
        'hash': option.key.id.substr(KEY_NAME_SUBSTR).toUpperCase(),
        'key': option.key
      });
    }
  };

  _proto.addCommand = function addCommand() {
    var keyId = this.selectedPublicKey(),
        keys = this.encryptKeys(),
        option = keyId ? _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_4___default()(___WEBPACK_IMPORTED_MODULE_11___default.a).call(___WEBPACK_IMPORTED_MODULE_11___default.a, this.publicKeysOptions(), function (item) {
      return item && keyId === item.id;
    }) : null;

    if (option) {
      keys.push({
        'empty': !option.key,
        'selected': ko__WEBPACK_IMPORTED_MODULE_13__[/* default */ "a"].observable(!!option.key),
        'removable': ko__WEBPACK_IMPORTED_MODULE_13__[/* default */ "a"].observable(!this.sign() || !this.signKey() || this.signKey().key.id !== option.key.id),
        'users': option.key.users,
        'hash': option.key.id.substr(KEY_NAME_SUBSTR).toUpperCase(),
        'key': option.key
      });
      this.encryptKeys(keys);
    }
  };

  _proto.updateCommand = function updateCommand() {
    var _this3 = this;

    ___WEBPACK_IMPORTED_MODULE_11___default.a.each(this.encryptKeys(), function (oKey) {
      oKey.removable(!_this3.sign() || !_this3.signKey() || _this3.signKey().key.id !== oKey.key.id);
    });
  };

  _proto.deletePublickKey = function deletePublickKey(publicKey) {
    this.encryptKeys.remove(publicKey);
  };

  _proto.clearPopup = function clearPopup() {
    this.notification('');
    this.sign(false);
    this.encrypt(false);
    this.password('');
    this.password.focus(false);
    this.buttonFocus(false);
    this.signKey(null);
    this.encryptKeys([]);
    this.text('');
    this.resultCallback = null;
  };

  _proto.onBuild = function onBuild() {
    var _this4 = this;

    key__WEBPACK_IMPORTED_MODULE_14___default()('tab,shift+tab', Common_Enums__WEBPACK_IMPORTED_MODULE_16__["KeyState"].PopupComposeOpenPGP, function () {
      switch (true) {
        case _this4.password.focus():
          _this4.buttonFocus(true);

          break;

        case _this4.buttonFocus():
          _this4.password.focus(true);

          break;
        // no default
      }

      return false;
    });
  };

  _proto.onHideWithDelay = function onHideWithDelay() {
    this.clearPopup();
  };

  _proto.onShowWithDelay = function onShowWithDelay() {
    if (this.sign()) {
      this.password.focus(true);
    } else {
      this.buttonFocus(true);
    }
  };

  _proto.onShow = function onShow(fCallback, sText, identity, sTo, sCc, sBcc) {
    var _this5 = this;

    this.clearPopup();
    var rec = [],
        emailLine = '';
    var email = new Model_Email__WEBPACK_IMPORTED_MODULE_19__["EmailModel"]();
    this.resultCallback = fCallback;

    if ('' !== sTo) {
      rec.push(sTo);
    }

    if ('' !== sCc) {
      rec.push(sCc);
    }

    if ('' !== sBcc) {
      rec.push(sBcc);
    }

    rec = rec.join(', ').split(',');
    rec = ___WEBPACK_IMPORTED_MODULE_11___default.a.compact(_babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_7___default()(___WEBPACK_IMPORTED_MODULE_11___default.a).call(___WEBPACK_IMPORTED_MODULE_11___default.a, rec, function (value) {
      email.clear();
      email.parse(Object(Common_Utils__WEBPACK_IMPORTED_MODULE_15__["trim"])(value));
      return '' === email.email ? false : email.email;
    }));

    if (identity && identity.email()) {
      emailLine = identity.email();
      rec.unshift(emailLine);
      var keys = Stores_User_Pgp__WEBPACK_IMPORTED_MODULE_18__[/* default */ "a"].findAllPrivateKeysByEmailNotNative(emailLine);

      if (keys && keys[0]) {
        this.signKey({
          'users': keys[0].users || [emailLine],
          'hash': keys[0].id.substr(KEY_NAME_SUBSTR).toUpperCase(),
          'key': keys[0]
        });
      }
    }

    if (this.signKey()) {
      this.sign(true);
    }

    if (rec && 0 < rec.length) {
      this.encryptKeys(___WEBPACK_IMPORTED_MODULE_11___default.a.uniq(___WEBPACK_IMPORTED_MODULE_11___default.a.compact(___WEBPACK_IMPORTED_MODULE_11___default.a.flatten(_babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_7___default()(___WEBPACK_IMPORTED_MODULE_11___default.a).call(___WEBPACK_IMPORTED_MODULE_11___default.a, rec, function (recEmail) {
        var keys = Stores_User_Pgp__WEBPACK_IMPORTED_MODULE_18__[/* default */ "a"].findAllPublicKeysByEmailNotNative(recEmail);
        return keys ? _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_7___default()(___WEBPACK_IMPORTED_MODULE_11___default.a).call(___WEBPACK_IMPORTED_MODULE_11___default.a, keys, function (publicKey) {
          return {
            'empty': !publicKey,
            'selected': ko__WEBPACK_IMPORTED_MODULE_13__[/* default */ "a"].observable(!!publicKey),
            'removable': ko__WEBPACK_IMPORTED_MODULE_13__[/* default */ "a"].observable(!_this5.sign() || !_this5.signKey() || _this5.signKey().key.id !== publicKey.id),
            'users': publicKey ? publicKey.users || [recEmail] : [recEmail],
            'hash': publicKey ? publicKey.id.substr(KEY_NAME_SUBSTR).toUpperCase() : '',
            'key': publicKey
          };
        }) : [];
      }), true)), function (encryptKey) {
        return encryptKey.hash;
      }));

      if (0 < this.encryptKeys().length) {
        this.encrypt(true);
      }
    }

    this.text(sText);
  };

  return ComposeOpenPgpPopupView;
}(Knoin_AbstractViewNext__WEBPACK_IMPORTED_MODULE_21__[/* AbstractViewNext */ "a"]), (Object(_babel_runtime_corejs3_helpers_esm_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"])(_class2.prototype, "doCommand", [_dec2], _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_3___default()(_class2.prototype, "doCommand"), _class2.prototype), Object(_babel_runtime_corejs3_helpers_esm_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"])(_class2.prototype, "selectCommand", [_dec3], _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_3___default()(_class2.prototype, "selectCommand"), _class2.prototype), Object(_babel_runtime_corejs3_helpers_esm_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"])(_class2.prototype, "addCommand", [_dec4], _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_3___default()(_class2.prototype, "addCommand"), _class2.prototype), Object(_babel_runtime_corejs3_helpers_esm_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"])(_class2.prototype, "updateCommand", [_dec5], _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_3___default()(_class2.prototype, "updateCommand"), _class2.prototype)), _class2)) || _class);


/***/ }),
/* 527 */
/*!***************************************!*\
  !*** ./dev/View/Popup/FolderClear.js ***!
  \***************************************/
/*! exports provided: FolderClearPopupView, default */
/*! all exports used */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FolderClearPopupView", function() { return FolderClearPopupView; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return FolderClearPopupView; });
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor */ 19);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _babel_runtime_corejs3_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/esm/inheritsLoose */ 10);
/* harmony import */ var _babel_runtime_corejs3_helpers_esm_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/esm/applyDecoratedDescriptor */ 20);
/* harmony import */ var ko__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ko */ 1);
/* harmony import */ var Common_Enums__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! Common/Enums */ 0);
/* harmony import */ var Common_Translator__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! Common/Translator */ 9);
/* harmony import */ var Common_Cache__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! Common/Cache */ 14);
/* harmony import */ var Stores_User_Message__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! Stores/User/Message */ 13);
/* harmony import */ var Remote_User_Ajax__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! Remote/User/Ajax */ 16);
/* harmony import */ var Helper_Apps_User__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! Helper/Apps/User */ 22);
/* harmony import */ var Knoin_Knoin__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! Knoin/Knoin */ 7);
/* harmony import */ var Knoin_AbstractViewNext__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! Knoin/AbstractViewNext */ 28);




var _dec, _dec2, _class, _class2;










var FolderClearPopupView = (_dec = Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_10__["popup"])({
  name: 'View/Popup/FolderClear',
  templateID: 'PopupsFolderClear'
}), _dec2 = Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_10__["command"])(function (self) {
  var folder = self.selectedFolder(),
      isClearing = self.clearingProcess();
  return !isClearing && null !== folder;
}), _dec(_class = (_class2 =
/*#__PURE__*/
function (_AbstractViewNext) {
  Object(_babel_runtime_corejs3_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(FolderClearPopupView, _AbstractViewNext);

  function FolderClearPopupView() {
    var _this;

    _this = _AbstractViewNext.call(this) || this;
    _this.selectedFolder = ko__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"].observable(null);
    _this.clearingProcess = ko__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"].observable(false);
    _this.clearingError = ko__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"].observable('');
    _this.folderFullNameForClear = ko__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"].computed(function () {
      var folder = _this.selectedFolder();

      return folder ? folder.printableFullName() : '';
    });
    _this.folderNameForClear = ko__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"].computed(function () {
      var folder = _this.selectedFolder();

      return folder ? folder.localName() : '';
    });
    _this.dangerDescHtml = ko__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"].computed(function () {
      return Object(Common_Translator__WEBPACK_IMPORTED_MODULE_5__["i18n"])('POPUPS_CLEAR_FOLDER/DANGER_DESC_HTML_1', {
        'FOLDER': _this.folderNameForClear()
      });
    });
    return _this;
  }

  var _proto = FolderClearPopupView.prototype;

  _proto.clearCommand = function clearCommand() {
    var _this2 = this;

    var folderToClear = this.selectedFolder();

    if (folderToClear) {
      Stores_User_Message__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"].message(null);
      Stores_User_Message__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"].messageList([]);
      this.clearingProcess(true);
      folderToClear.messageCountAll(0);
      folderToClear.messageCountUnread(0);
      Object(Common_Cache__WEBPACK_IMPORTED_MODULE_6__[/* setFolderHash */ "q"])(folderToClear.fullNameRaw, '');
      Remote_User_Ajax__WEBPACK_IMPORTED_MODULE_8__[/* default */ "a"].folderClear(function (result, data) {
        _this2.clearingProcess(false);

        if (Common_Enums__WEBPACK_IMPORTED_MODULE_4__["StorageResultType"].Success === result && data && data.Result) {
          Object(Helper_Apps_User__WEBPACK_IMPORTED_MODULE_9__[/* getApp */ "a"])().reloadMessageList(true);

          _this2.cancelCommand();
        } else {
          if (data && data.ErrorCode) {
            _this2.clearingError(Object(Common_Translator__WEBPACK_IMPORTED_MODULE_5__["getNotification"])(data.ErrorCode));
          } else {
            _this2.clearingError(Object(Common_Translator__WEBPACK_IMPORTED_MODULE_5__["getNotification"])(Common_Enums__WEBPACK_IMPORTED_MODULE_4__["Notification"].MailServerError));
          }
        }
      }, folderToClear.fullNameRaw);
    }
  };

  _proto.clearPopup = function clearPopup() {
    this.clearingProcess(false);
    this.selectedFolder(null);
  };

  _proto.onShow = function onShow(folder) {
    this.clearPopup();

    if (folder) {
      this.selectedFolder(folder);
    }
  };

  return FolderClearPopupView;
}(Knoin_AbstractViewNext__WEBPACK_IMPORTED_MODULE_11__[/* AbstractViewNext */ "a"]), (Object(_babel_runtime_corejs3_helpers_esm_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(_class2.prototype, "clearCommand", [_dec2], _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_0___default()(_class2.prototype, "clearCommand"), _class2.prototype)), _class2)) || _class);


/***/ }),
/* 528 */
/*!******************************************!*\
  !*** ./dev/View/Popup/AdvancedSearch.js ***!
  \******************************************/
/*! exports provided: AdvancedSearchPopupView, default */
/*! all exports used */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AdvancedSearchPopupView", function() { return AdvancedSearchPopupView; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return AdvancedSearchPopupView; });
/* harmony import */ var core_js_modules_es_array_join__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.array.join */ 74);
/* harmony import */ var core_js_modules_es_array_join__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_join__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var core_js_modules_es_regexp_exec__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es.regexp.exec */ 45);
/* harmony import */ var core_js_modules_es_regexp_exec__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_regexp_exec__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var core_js_modules_es_string_split__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core-js/modules/es.string.split */ 171);
/* harmony import */ var core_js_modules_es_string_split__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_split__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor */ 19);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_index_of__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/index-of */ 30);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_index_of__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_index_of__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var _babel_runtime_corejs3_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/esm/inheritsLoose */ 10);
/* harmony import */ var _babel_runtime_corejs3_helpers_esm_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/esm/applyDecoratedDescriptor */ 20);
/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! _ */ 3);
/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(___WEBPACK_IMPORTED_MODULE_7__);
/* harmony import */ var ko__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ko */ 1);
/* harmony import */ var Common_Utils__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! Common/Utils */ 2);
/* harmony import */ var Common_Translator__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! Common/Translator */ 9);
/* harmony import */ var Common_Momentor__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! Common/Momentor */ 60);
/* harmony import */ var Stores_User_Message__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! Stores/User/Message */ 13);
/* harmony import */ var Knoin_Knoin__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! Knoin/Knoin */ 7);
/* harmony import */ var Knoin_AbstractViewNext__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! Knoin/AbstractViewNext */ 28);








var _dec, _dec2, _class, _class2;









var AdvancedSearchPopupView = (_dec = Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_13__["popup"])({
  name: 'View/Popup/AdvancedSearch',
  templateID: 'PopupsAdvancedSearch'
}), _dec2 = Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_13__["command"])(), _dec(_class = (_class2 =
/*#__PURE__*/
function (_AbstractViewNext) {
  Object(_babel_runtime_corejs3_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"])(AdvancedSearchPopupView, _AbstractViewNext);

  function AdvancedSearchPopupView() {
    var _this;

    _this = _AbstractViewNext.call(this) || this;
    _this.fromFocus = ko__WEBPACK_IMPORTED_MODULE_8__[/* default */ "a"].observable(false);
    _this.from = ko__WEBPACK_IMPORTED_MODULE_8__[/* default */ "a"].observable('');
    _this.to = ko__WEBPACK_IMPORTED_MODULE_8__[/* default */ "a"].observable('');
    _this.subject = ko__WEBPACK_IMPORTED_MODULE_8__[/* default */ "a"].observable('');
    _this.text = ko__WEBPACK_IMPORTED_MODULE_8__[/* default */ "a"].observable('');
    _this.selectedDateValue = ko__WEBPACK_IMPORTED_MODULE_8__[/* default */ "a"].observable(-1);
    _this.hasAttachment = ko__WEBPACK_IMPORTED_MODULE_8__[/* default */ "a"].observable(false);
    _this.starred = ko__WEBPACK_IMPORTED_MODULE_8__[/* default */ "a"].observable(false);
    _this.unseen = ko__WEBPACK_IMPORTED_MODULE_8__[/* default */ "a"].observable(false);
    _this.selectedDates = ko__WEBPACK_IMPORTED_MODULE_8__[/* default */ "a"].computed(function () {
      Object(Common_Translator__WEBPACK_IMPORTED_MODULE_10__["trigger"])();
      return [{
        id: -1,
        name: Object(Common_Translator__WEBPACK_IMPORTED_MODULE_10__["i18n"])('SEARCH/LABEL_ADV_DATE_ALL')
      }, {
        id: 3,
        name: Object(Common_Translator__WEBPACK_IMPORTED_MODULE_10__["i18n"])('SEARCH/LABEL_ADV_DATE_3_DAYS')
      }, {
        id: 7,
        name: Object(Common_Translator__WEBPACK_IMPORTED_MODULE_10__["i18n"])('SEARCH/LABEL_ADV_DATE_7_DAYS')
      }, {
        id: 30,
        name: Object(Common_Translator__WEBPACK_IMPORTED_MODULE_10__["i18n"])('SEARCH/LABEL_ADV_DATE_MONTH')
      }, {
        id: 90,
        name: Object(Common_Translator__WEBPACK_IMPORTED_MODULE_10__["i18n"])('SEARCH/LABEL_ADV_DATE_3_MONTHS')
      }, {
        id: 180,
        name: Object(Common_Translator__WEBPACK_IMPORTED_MODULE_10__["i18n"])('SEARCH/LABEL_ADV_DATE_6_MONTHS')
      }, {
        id: 365,
        name: Object(Common_Translator__WEBPACK_IMPORTED_MODULE_10__["i18n"])('SEARCH/LABEL_ADV_DATE_YEAR')
      }];
    });
    return _this;
  }

  var _proto = AdvancedSearchPopupView.prototype;

  _proto.searchCommand = function searchCommand() {
    var search = this.buildSearchString();

    if ('' !== search) {
      Stores_User_Message__WEBPACK_IMPORTED_MODULE_12__[/* default */ "a"].mainMessageListSearch(search);
    }

    this.cancelCommand();
  };

  _proto.parseSearchStringValue = function parseSearchStringValue(search) {
    var _this2 = this;

    var parts = (search || '').split(/[\s]+/g);

    ___WEBPACK_IMPORTED_MODULE_7___default.a.each(parts, function (part) {
      switch (part) {
        case 'has:attachment':
          _this2.hasAttachment(true);

          break;

        case 'is:unseen,flagged':
          _this2.starred(true);

        /* falls through */

        case 'is:unseen':
          _this2.unseen(true);

          break;
        // no default
      }
    });
  };

  _proto.buildSearchStringValue = function buildSearchStringValue(value) {
    if (-1 < _babel_runtime_corejs3_core_js_stable_instance_index_of__WEBPACK_IMPORTED_MODULE_4___default()(value).call(value, ' ')) {
      value = '"' + value + '"';
    }

    return value;
  };

  _proto.buildSearchString = function buildSearchString() {
    var result = [],
        from_ = Object(Common_Utils__WEBPACK_IMPORTED_MODULE_9__["trim"])(this.from()),
        to = Object(Common_Utils__WEBPACK_IMPORTED_MODULE_9__["trim"])(this.to()),
        subject = Object(Common_Utils__WEBPACK_IMPORTED_MODULE_9__["trim"])(this.subject()),
        text = Object(Common_Utils__WEBPACK_IMPORTED_MODULE_9__["trim"])(this.text()),
        isPart = [],
        hasPart = [];

    if (from_ && '' !== from_) {
      result.push('from:' + this.buildSearchStringValue(from_));
    }

    if (to && '' !== to) {
      result.push('to:' + this.buildSearchStringValue(to));
    }

    if (subject && '' !== subject) {
      result.push('subject:' + this.buildSearchStringValue(subject));
    }

    if (this.hasAttachment()) {
      hasPart.push('attachment');
    }

    if (this.unseen()) {
      isPart.push('unseen');
    }

    if (this.starred()) {
      isPart.push('flagged');
    }

    if (0 < hasPart.length) {
      result.push('has:' + hasPart.join(','));
    }

    if (0 < isPart.length) {
      result.push('is:' + isPart.join(','));
    }

    if (-1 < this.selectedDateValue()) {
      result.push('date:' + Object(Common_Momentor__WEBPACK_IMPORTED_MODULE_11__["searchSubtractFormatDateHelper"])(this.selectedDateValue()) + '/');
    }

    if (text && '' !== text) {
      result.push('text:' + this.buildSearchStringValue(text));
    }

    return Object(Common_Utils__WEBPACK_IMPORTED_MODULE_9__["trim"])(result.join(' '));
  };

  _proto.clearPopup = function clearPopup() {
    this.from('');
    this.to('');
    this.subject('');
    this.text('');
    this.selectedDateValue(-1);
    this.hasAttachment(false);
    this.starred(false);
    this.unseen(false);
    this.fromFocus(true);
  };

  _proto.onShow = function onShow(search) {
    this.clearPopup();
    this.parseSearchStringValue(search);
  };

  _proto.onShowWithDelay = function onShowWithDelay() {
    this.fromFocus(true);
  };

  return AdvancedSearchPopupView;
}(Knoin_AbstractViewNext__WEBPACK_IMPORTED_MODULE_14__[/* AbstractViewNext */ "a"]), (Object(_babel_runtime_corejs3_helpers_esm_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"])(_class2.prototype, "searchCommand", [_dec2], _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_3___default()(_class2.prototype, "searchCommand"), _class2.prototype)), _class2)) || _class);


/***/ }),
/* 529 */
/*!*****************************************!*\
  !*** ./dev/View/Popup/TwoFactorTest.js ***!
  \*****************************************/
/*! exports provided: TwoFactorTestPopupView, default */
/*! all exports used */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TwoFactorTestPopupView", function() { return TwoFactorTestPopupView; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return TwoFactorTestPopupView; });
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor */ 19);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _babel_runtime_corejs3_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/esm/inheritsLoose */ 10);
/* harmony import */ var _babel_runtime_corejs3_helpers_esm_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/esm/applyDecoratedDescriptor */ 20);
/* harmony import */ var ko__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ko */ 1);
/* harmony import */ var Common_Enums__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! Common/Enums */ 0);
/* harmony import */ var Common_Globals__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! Common/Globals */ 6);
/* harmony import */ var Remote_User_Ajax__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! Remote/User/Ajax */ 16);
/* harmony import */ var Knoin_Knoin__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! Knoin/Knoin */ 7);
/* harmony import */ var Knoin_AbstractViewNext__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! Knoin/AbstractViewNext */ 28);




var _dec, _dec2, _class, _class2;







var TwoFactorTestPopupView = (_dec = Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_7__["popup"])({
  name: 'View/Popup/TwoFactorTest',
  templateID: 'PopupsTwoFactorTest'
}), _dec2 = Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_7__["command"])(function (self) {
  return '' !== self.code() && !self.testing();
}), _dec(_class = (_class2 =
/*#__PURE__*/
function (_AbstractViewNext) {
  Object(_babel_runtime_corejs3_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(TwoFactorTestPopupView, _AbstractViewNext);

  function TwoFactorTestPopupView() {
    var _this;

    _this = _AbstractViewNext.call(this) || this;
    _this.code = ko__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"].observable('');
    _this.code.focused = ko__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"].observable(false);
    _this.code.status = ko__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"].observable(null);
    _this.koTestedTrigger = null;
    _this.testing = ko__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"].observable(false);
    return _this;
  }

  var _proto = TwoFactorTestPopupView.prototype;

  _proto.testCodeCommand = function testCodeCommand() {
    var _this2 = this;

    this.testing(true);
    Remote_User_Ajax__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"].testTwoFactor(function (result, data) {
      _this2.testing(false);

      _this2.code.status(Common_Enums__WEBPACK_IMPORTED_MODULE_4__["StorageResultType"].Success === result && data && !!data.Result);

      if (_this2.koTestedTrigger && _this2.code.status()) {
        _this2.koTestedTrigger(true);
      }
    }, this.code());
  };

  _proto.clearPopup = function clearPopup() {
    this.code('');
    this.code.focused(false);
    this.code.status(null);
    this.testing(false);
    this.koTestedTrigger = null;
  };

  _proto.onShow = function onShow(koTestedTrigger) {
    this.clearPopup();
    this.koTestedTrigger = koTestedTrigger;
  };

  _proto.onShowWithDelay = function onShowWithDelay() {
    if (!Common_Globals__WEBPACK_IMPORTED_MODULE_5__["bMobileDevice"]) {
      this.code.focused(true);
    }
  };

  return TwoFactorTestPopupView;
}(Knoin_AbstractViewNext__WEBPACK_IMPORTED_MODULE_8__[/* AbstractViewNext */ "a"]), (Object(_babel_runtime_corejs3_helpers_esm_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(_class2.prototype, "testCodeCommand", [_dec2], _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_0___default()(_class2.prototype, "testCodeCommand"), _class2.prototype)), _class2)) || _class);


/***/ }),
/* 530 */
/*!*****************************************!*\
  !*** ./dev/View/Popup/AddOpenPgpKey.js ***!
  \*****************************************/
/*! exports provided: AddOpenPgpKeyPopupView, default */
/*! all exports used */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AddOpenPgpKeyPopupView", function() { return AddOpenPgpKeyPopupView; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return AddOpenPgpKeyPopupView; });
/* harmony import */ var core_js_modules_es_regexp_exec__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.regexp.exec */ 45);
/* harmony import */ var core_js_modules_es_regexp_exec__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_regexp_exec__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var core_js_modules_es_string_replace__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es.string.replace */ 56);
/* harmony import */ var core_js_modules_es_string_replace__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_replace__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor */ 19);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _babel_runtime_corejs3_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/esm/inheritsLoose */ 10);
/* harmony import */ var _babel_runtime_corejs3_helpers_esm_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/esm/applyDecoratedDescriptor */ 20);
/* harmony import */ var ko__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ko */ 1);
/* harmony import */ var Common_Utils__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! Common/Utils */ 2);
/* harmony import */ var Stores_User_Pgp__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! Stores/User/Pgp */ 41);
/* harmony import */ var Helper_Apps_User__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! Helper/Apps/User */ 22);
/* harmony import */ var Knoin_Knoin__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! Knoin/Knoin */ 7);
/* harmony import */ var Knoin_AbstractViewNext__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! Knoin/AbstractViewNext */ 28);






var _dec, _dec2, _class, _class2;







var AddOpenPgpKeyPopupView = (_dec = Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_9__["popup"])({
  name: 'View/Popup/AddOpenPgpKey',
  templateID: 'PopupsAddOpenPgpKey'
}), _dec2 = Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_9__["command"])(), _dec(_class = (_class2 =
/*#__PURE__*/
function (_AbstractViewNext) {
  Object(_babel_runtime_corejs3_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(AddOpenPgpKeyPopupView, _AbstractViewNext);

  function AddOpenPgpKeyPopupView() {
    var _this;

    _this = _AbstractViewNext.call(this) || this;
    _this.key = ko__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"].observable('');
    _this.key.focus = ko__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"].observable(false);
    _this.key.error = ko__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"].observable(false);
    _this.key.errorMessage = ko__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"].observable('');

    _this.key.subscribe(function () {
      _this.key.error(false);

      _this.key.errorMessage('');
    });

    return _this;
  }

  var _proto = AddOpenPgpKeyPopupView.prototype;

  _proto.addOpenPgpKeyCommand = function addOpenPgpKeyCommand() {
    // eslint-disable-next-line max-len
    var reg = /[-]{3,6}BEGIN[\s]PGP[\s](PRIVATE|PUBLIC)[\s]KEY[\s]BLOCK[-]{3,6}[\s\S]+?[-]{3,6}END[\s]PGP[\s](PRIVATE|PUBLIC)[\s]KEY[\s]BLOCK[-]{3,6}/gi,
        openpgpKeyring = Stores_User_Pgp__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"].openpgpKeyring;
    var keyTrimmed = Object(Common_Utils__WEBPACK_IMPORTED_MODULE_6__["trim"])(this.key());

    if (/[\n]/.test(keyTrimmed)) {
      keyTrimmed = keyTrimmed.replace(/[\r]+/g, '').replace(/[\n]{2,}/g, '\n\n');
    }

    this.key.error('' === keyTrimmed);
    this.key.errorMessage('');

    if (!openpgpKeyring || this.key.error()) {
      return false;
    }

    var match = null,
        count = 30,
        done = false;

    do {
      match = reg.exec(keyTrimmed);

      if (match && 0 < count) {
        if (match[0] && match[1] && match[2] && match[1] === match[2]) {
          var err = null;

          if ('PRIVATE' === match[1]) {
            err = openpgpKeyring.privateKeys.importKey(match[0]);
          } else if ('PUBLIC' === match[1]) {
            err = openpgpKeyring.publicKeys.importKey(match[0]);
          }

          if (err) {
            this.key.error(true);
            this.key.errorMessage(err && err[0] ? '' + err[0] : '');
            Object(Common_Utils__WEBPACK_IMPORTED_MODULE_6__["log"])(err);
          }
        }

        count -= 1;
        done = false;
      } else {
        done = true;
      }
    } while (!done);

    openpgpKeyring.store();
    Object(Helper_Apps_User__WEBPACK_IMPORTED_MODULE_8__[/* getApp */ "a"])().reloadOpenPgpKeys();

    if (this.key.error()) {
      return false;
    }

    Object(Common_Utils__WEBPACK_IMPORTED_MODULE_6__["delegateRun"])(this, 'cancelCommand');
    return true;
  };

  _proto.clearPopup = function clearPopup() {
    this.key('');
    this.key.error(false);
    this.key.errorMessage('');
  };

  _proto.onShow = function onShow() {
    this.clearPopup();
  };

  _proto.onShowWithDelay = function onShowWithDelay() {
    this.key.focus(true);
  };

  return AddOpenPgpKeyPopupView;
}(Knoin_AbstractViewNext__WEBPACK_IMPORTED_MODULE_10__[/* AbstractViewNext */ "a"]), (Object(_babel_runtime_corejs3_helpers_esm_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])(_class2.prototype, "addOpenPgpKeyCommand", [_dec2], _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_2___default()(_class2.prototype, "addOpenPgpKeyCommand"), _class2.prototype)), _class2)) || _class);


/***/ }),
/* 531 */
/*!*****************************************!*\
  !*** ./dev/View/Popup/NewOpenPgpKey.js ***!
  \*****************************************/
/*! exports provided: NewOpenPgpKeyPopupView, default */
/*! all exports used */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NewOpenPgpKeyPopupView", function() { return NewOpenPgpKeyPopupView; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return NewOpenPgpKeyPopupView; });
/* harmony import */ var core_js_modules_es_function_name__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.function.name */ 51);
/* harmony import */ var core_js_modules_es_function_name__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_function_name__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor */ 19);
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _babel_runtime_corejs3_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/esm/inheritsLoose */ 10);
/* harmony import */ var _babel_runtime_corejs3_helpers_esm_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/esm/applyDecoratedDescriptor */ 20);
/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! _ */ 3);
/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(___WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var ko__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ko */ 1);
/* harmony import */ var Common_Enums__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! Common/Enums */ 0);
/* harmony import */ var Common_Utils__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! Common/Utils */ 2);
/* harmony import */ var Stores_User_Pgp__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! Stores/User/Pgp */ 41);
/* harmony import */ var Helper_Apps_User__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! Helper/Apps/User */ 22);
/* harmony import */ var Knoin_Knoin__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! Knoin/Knoin */ 7);
/* harmony import */ var Knoin_AbstractViewNext__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! Knoin/AbstractViewNext */ 28);





var _dec, _dec2, _class, _class2;









var NewOpenPgpKeyPopupView = (_dec = Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_10__["popup"])({
  name: 'View/Popup/NewOpenPgpKey',
  templateID: 'PopupsNewOpenPgpKey'
}), _dec2 = Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_10__["command"])(), _dec(_class = (_class2 =
/*#__PURE__*/
function (_AbstractViewNext) {
  Object(_babel_runtime_corejs3_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(NewOpenPgpKeyPopupView, _AbstractViewNext);

  function NewOpenPgpKeyPopupView() {
    var _this;

    _this = _AbstractViewNext.call(this) || this;
    _this.email = ko__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"].observable('');
    _this.email.focus = ko__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"].observable('');
    _this.email.error = ko__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"].observable(false);
    _this.name = ko__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"].observable('');
    _this.password = ko__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"].observable('');
    _this.keyBitLength = ko__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"].observable(Common_Enums__WEBPACK_IMPORTED_MODULE_6__["Magics"].BitLength2048);
    _this.submitRequest = ko__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"].observable(false);
    _this.submitError = ko__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"].observable('');

    _this.email.subscribe(function () {
      _this.email.error(false);
    });

    return _this;
  }

  var _proto = NewOpenPgpKeyPopupView.prototype;

  _proto.generateOpenPgpKeyCommand = function generateOpenPgpKeyCommand() {
    var _this2 = this;

    var userId = {},
        openpgpKeyring = Stores_User_Pgp__WEBPACK_IMPORTED_MODULE_8__[/* default */ "a"].openpgpKeyring;
    this.email.error('' === Object(Common_Utils__WEBPACK_IMPORTED_MODULE_7__["trim"])(this.email()));

    if (!openpgpKeyring || this.email.error()) {
      return false;
    }

    userId.email = this.email();

    if ('' !== this.name()) {
      userId.name = this.name();
    }

    this.submitRequest(true);
    this.submitError('');

    ___WEBPACK_IMPORTED_MODULE_4___default.a.delay(function () {
      try {
        Stores_User_Pgp__WEBPACK_IMPORTED_MODULE_8__[/* default */ "a"].openpgp.generateKey({
          userIds: [userId],
          numBits: Object(Common_Utils__WEBPACK_IMPORTED_MODULE_7__["pInt"])(_this2.keyBitLength()),
          passphrase: Object(Common_Utils__WEBPACK_IMPORTED_MODULE_7__["trim"])(_this2.password())
        }).then(function (keyPair) {
          _this2.submitRequest(false);

          if (keyPair && keyPair.privateKeyArmored) {
            openpgpKeyring.privateKeys.importKey(keyPair.privateKeyArmored);
            openpgpKeyring.publicKeys.importKey(keyPair.publicKeyArmored);
            openpgpKeyring.store();
            Object(Helper_Apps_User__WEBPACK_IMPORTED_MODULE_9__[/* getApp */ "a"])().reloadOpenPgpKeys();
            Object(Common_Utils__WEBPACK_IMPORTED_MODULE_7__["delegateRun"])(_this2, 'cancelCommand');
          }
        }).catch(function (e) {
          _this2.submitRequest(false);

          _this2.showError(e);
        });
      } catch (e) {
        _this2.submitRequest(false);

        _this2.showError(e);
      }
    }, Common_Enums__WEBPACK_IMPORTED_MODULE_6__["Magics"].Time100ms);

    return true;
  };

  _proto.showError = function showError(e) {
    Object(Common_Utils__WEBPACK_IMPORTED_MODULE_7__["log"])(e);

    if (e && e.message) {
      this.submitError(e.message);
    }
  };

  _proto.clearPopup = function clearPopup() {
    this.name('');
    this.password('');
    this.email('');
    this.email.error(false);
    this.keyBitLength(Common_Enums__WEBPACK_IMPORTED_MODULE_6__["Magics"].BitLength2048);
    this.submitError('');
  };

  _proto.onShow = function onShow() {
    this.clearPopup();
  };

  _proto.onShowWithDelay = function onShowWithDelay() {
    this.email.focus(true);
  };

  return NewOpenPgpKeyPopupView;
}(Knoin_AbstractViewNext__WEBPACK_IMPORTED_MODULE_11__[/* AbstractViewNext */ "a"]), (Object(_babel_runtime_corejs3_helpers_esm_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(_class2.prototype, "generateOpenPgpKeyCommand", [_dec2], _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class2.prototype, "generateOpenPgpKeyCommand"), _class2.prototype)), _class2)) || _class);


/***/ }),
/* 532 */
/*!******************************************!*\
  !*** ./dev/View/Popup/ViewOpenPgpKey.js ***!
  \******************************************/
/*! exports provided: ViewOpenPgpKeyPopupView, default */
/*! all exports used */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ViewOpenPgpKeyPopupView", function() { return ViewOpenPgpKeyPopupView; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return ViewOpenPgpKeyPopupView; });
/* harmony import */ var _babel_runtime_corejs3_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/esm/inheritsLoose */ 10);
/* harmony import */ var ko__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ko */ 1);
/* harmony import */ var key__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! key */ 21);
/* harmony import */ var key__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(key__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var Common_Enums__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! Common/Enums */ 0);
/* harmony import */ var Common_Utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! Common/Utils */ 2);
/* harmony import */ var Knoin_Knoin__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! Knoin/Knoin */ 7);
/* harmony import */ var Knoin_AbstractViewNext__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! Knoin/AbstractViewNext */ 28);


var _dec, _class;







var ViewOpenPgpKeyPopupView = (_dec = Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_5__["popup"])({
  name: 'View/Popup/ViewOpenPgpKey',
  templateID: 'PopupsViewOpenPgpKey'
}), _dec(_class =
/*#__PURE__*/
function (_AbstractViewNext) {
  Object(_babel_runtime_corejs3_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(ViewOpenPgpKeyPopupView, _AbstractViewNext);

  function ViewOpenPgpKeyPopupView() {
    var _this;

    _this = _AbstractViewNext.call(this) || this;
    _this.key = ko__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"].observable('');
    _this.keyDom = ko__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"].observable(null);
    _this.sDefaultKeyScope = Common_Enums__WEBPACK_IMPORTED_MODULE_3__["KeyState"].PopupViewOpenPGP;
    return _this;
  }

  var _proto = ViewOpenPgpKeyPopupView.prototype;

  _proto.clearPopup = function clearPopup() {
    this.key('');
  };

  _proto.selectKey = function selectKey() {
    var el = this.keyDom();

    if (el) {
      Object(Common_Utils__WEBPACK_IMPORTED_MODULE_4__["selectElement"])(el);
    }
  };

  _proto.onShow = function onShow(openPgpKey) {
    this.clearPopup();

    if (openPgpKey) {
      this.key(openPgpKey.armor);
    }
  };

  _proto.onBuild = function onBuild() {
    var _this2 = this;

    key__WEBPACK_IMPORTED_MODULE_2___default()('ctrl+a, command+a', Common_Enums__WEBPACK_IMPORTED_MODULE_3__["KeyState"].PopupViewOpenPGP, function () {
      _this2.selectKey();

      return false;
    });
  };

  return ViewOpenPgpKeyPopupView;
}(Knoin_AbstractViewNext__WEBPACK_IMPORTED_MODULE_6__[/* AbstractViewNext */ "a"])) || _class);


/***/ }),
/* 533 */
/*!***************************************!*\
  !*** ./dev/View/Popup/WelcomePage.js ***!
  \***************************************/
/*! exports provided: WelcomePagePopupView, default */
/*! all exports used */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "WelcomePagePopupView", function() { return WelcomePagePopupView; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return WelcomePagePopupView; });
/* harmony import */ var _babel_runtime_corejs3_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/esm/inheritsLoose */ 10);
/* harmony import */ var ko__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ko */ 1);
/* harmony import */ var Promises_User_Ajax__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! Promises/User/Ajax */ 87);
/* harmony import */ var Knoin_Knoin__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! Knoin/Knoin */ 7);
/* harmony import */ var Knoin_AbstractViewNext__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! Knoin/AbstractViewNext */ 28);


var _dec, _class;





var WelcomePagePopupView = (_dec = Object(Knoin_Knoin__WEBPACK_IMPORTED_MODULE_3__["popup"])({
  name: 'View/Popup/WelcomePage',
  templateID: 'PopupsWelcomePage'
}), _dec(_class =
/*#__PURE__*/
function (_AbstractViewNext) {
  Object(_babel_runtime_corejs3_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(WelcomePagePopupView, _AbstractViewNext);

  function WelcomePagePopupView() {
    var _this;

    _this = _AbstractViewNext.call(this) || this;
    _this.welcomePageURL = ko__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"].observable('');
    _this.closeFocused = ko__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"].observable(false);
    return _this;
  }

  var _proto = WelcomePagePopupView.prototype;

  _proto.clearPopup = function clearPopup() {
    this.welcomePageURL('');
    this.closeFocused(false);
  }
  /**
   * @param {string} sUrl
   * @returns {void}
   */
  ;

  _proto.onShow = function onShow(sUrl) {
    this.clearPopup();
    this.welcomePageURL(sUrl);
  };

  _proto.onShowWithDelay = function onShowWithDelay() {
    this.closeFocused(true);
  };

  _proto.onHide = function onHide() {
    Promises_User_Ajax__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"].welcomeClose();
  };

  return WelcomePagePopupView;
}(Knoin_AbstractViewNext__WEBPACK_IMPORTED_MODULE_4__[/* AbstractViewNext */ "a"])) || _class);


/***/ })
/******/ ]);
//# sourceMappingURL=data:application/json;charset=utf-8;base64,[encoded data, 2411476 characters]
