v1.3.2.445

This commit is contained in:
RainLoop Team 2013-10-19 02:18:40 +04:00
parent fa5c133a68
commit 33c30ff962
463 changed files with 6025 additions and 862 deletions

View file

@ -1 +1 @@
1.3.1.444 1.3.2.445

View file

@ -1 +0,0 @@
8d7f95b7bdca4fb504bcaa2a53be809076105b5b

View file

@ -1 +0,0 @@
1.3.1.444

View file

@ -1,19 +0,0 @@
{
"name": "adoy/oauth2",
"description": "Light PHP wrapper for the OAuth 2.0 protocol (based on OAuth 2.0 Authorization Protocol draft-ietf-oauth-v2-15)",
"authors": [
{
"name": "Charron Pierrick",
"email": "pierrick@webstart.fr"
},
{
"name": "Berejeb Anis",
"email": "anis.berejeb@gmail.com"
}
],
"autoload": {
"classmap": [
"../"
]
}
}

View file

@ -1,143 +0,0 @@
(function(h,j,d,ma,y,i){function o(){this.sBase="#/";this.sCdnStaticDomain=e.settingsGet("CdnStaticDomain");this.sVersion=e.settingsGet("Version");this.sSpecSuffix=e.settingsGet("AuthAccountHash")||"0";this.sServer="./?";this.sCdnStaticDomain=""===this.sCdnStaticDomain?this.sCdnStaticDomain:"/"===this.sCdnStaticDomain.substr(-1)?this.sCdnStaticDomain:this.sCdnStaticDomain+"/"}function L(){}function M(){}function N(){var a=i.find([M,L],function(a){return a.supported()});a&&(this.oDriver=new a)}function na(){}
function t(a,b){this.sPosition=c.pString(a);this.sTemplate=c.pString(b);this.viewModelName="";this.viewModelVisibility=d.observable(!1);"Popups"===this.sPosition&&(this.modalVisibility=d.observable(!1));this.viewModelDom=null}function w(a,b){this.sScreenName=a;this.aViewModels=c.isArray(b)?b:[]}function m(){this.sDefaultScreenName="";this.oScreens={};this.oCurrentScreen=this.oBoot=null;this.popupVisibility=d.observable(!1);this.popupVisibility.subscribe(function(a){e&&e.popupVisibility(a)})}function r(a,
b){this.email=a||"";this.name=b||"";this.privateType=null;this.clearDuplicateName()}function B(){t.call(this,"Popups","PopupsDomain");this.edit=d.observable(!1);this.saving=d.observable(!1);this.savingError=d.observable("");this.testing=d.observable(!1);this.testingDone=d.observable(!1);this.testingImapError=d.observable(!1);this.testingSmtpError=d.observable(!1);this.imapServerFocus=d.observable(!1);this.smtpServerFocus=d.observable(!1);this.name=d.observable("");this.imapServer=d.observable("");
this.imapPort=d.observable(l.Values.ImapDefaulPort);this.imapSecure=d.observable(g.ServerSecure.None);this.smtpServer=d.observable("");this.smtpPort=d.observable(l.Values.SmtpDefaulPort);this.smtpSecure=d.observable(g.ServerSecure.None);this.smtpAuth=d.observable(!0);this.imapServerFocus.subscribe(function(a){a&&(""!==this.name()&&""===this.imapServer())&&this.imapServer(this.name())},this);this.smtpServerFocus.subscribe(function(a){a&&(""!==this.imapServer()&&""===this.smtpServer())&&this.smtpServer(this.imapServer())},
this);this.headerText=d.computed(function(){var a=this.name();return this.edit()?'Edit Domain "'+a+'"':"Add Domain"+(""===a?"":' "'+a+'"')},this);this.domainIsComputed=d.computed(function(){return""!==this.name()&&""!==this.imapServer()&&""!==this.imapPort()&&""!==this.smtpServer()&&""!==this.smtpPort()},this);this.canBeTested=d.computed(function(){return!this.testing()&&this.domainIsComputed()},this);this.canBeSaved=d.computed(function(){return!this.saving()&&this.domainIsComputed()},this);this.createOrAddCommand=
c.createCommand(this,function(){this.saving(!0);e.remote().createOrUpdateDomain(i.bind(this.onDomainCreateOrSaveResponse,this),!this.edit(),this.name(),this.imapServer(),this.imapPort(),this.imapSecure(),this.smtpServer(),this.smtpPort(),this.smtpSecure(),this.smtpAuth())},this.canBeSaved);this.testConnectionCommand=c.createCommand(this,function(){this.testingDone(!1);this.testingImapError(!1);this.testingSmtpError(!1);this.testing(!0);e.remote().testConnectionForDomain(i.bind(this.onTestConnectionResponse,
this),this.imapServer(),this.imapPort(),this.imapSecure(),this.smtpServer(),this.smtpPort(),this.smtpSecure(),this.smtpAuth())},this.canBeTested)}function O(){t.call(this,"Popups","PopupsPlugin");this.onPluginSettingsUpdateResponse=i.bind(this.onPluginSettingsUpdateResponse,this);this.saveError=d.observable("");this.name=d.observable("");this.readme=d.observable("");this.configures=d.observableArray([]);this.hasReadme=d.computed(function(){return""!==this.readme()},this);this.hasConfiguration=d.computed(function(){return 0<
this.configures().length},this);this.saveCommand=c.createCommand(this,function(){var a={};a.Name=this.name();i.each(this.configures(),function(b){var f=b.value();if(!1===f||!0===f)f=f?"1":"0";a["_"+b.Name]=f},this);this.saveError("");e.remote().pluginSettingsUpdate(this.onPluginSettingsUpdateResponse,a)},this.hasConfiguration)}function P(){t.call(this,"Popups","PopupsActivate");this.domain=d.observable("");this.key=d.observable("");this.key.focus=d.observable(!1);this.activationSuccessed=d.observable(!1);
this.licenseTrigger=e.data().licenseTrigger;this.activateProcess=d.observable(!1);this.activateText=d.observable("");this.activateText.isError=d.observable(!1);this.key.subscribe(function(){this.activateText("");this.activateText.isError(!1)},this);this.activationSuccessed.subscribe(function(a){a&&this.licenseTrigger(!this.licenseTrigger())},this)}function Q(){t.call(this,"Right","AdminLogin");this.login=d.observable("");this.password=d.observable("");this.loginError=d.observable(!1);this.passwordError=
d.observable(!1);this.loginFocus=d.observable(!1);this.login.subscribe(function(){this.loginError(!1)},this);this.password.subscribe(function(){this.passwordError(!1)},this);this.submitRequest=d.observable(!1);this.submitError=d.observable("");this.submitCommand=c.createCommand(this,function(){this.loginError(""===c.trim(this.login()));this.passwordError(""===c.trim(this.password()));if(this.loginError()||this.passwordError())return!1;this.submitRequest(!0);e.remote().adminLogin(i.bind(function(a,
b){g.StorageResultType.Success===a&&b&&"AdminLogin"===b.Action?b.Result?e.loginAndLogoutReload():b.ErrorCode&&(this.submitRequest(!1),this.submitError(c.getNotification(b.ErrorCode))):(this.submitRequest(!1),this.submitError(c.getNotification(g.Notification.UnknownError)))},this),this.login(),this.password());return!0},function(){return!this.submitRequest()})}function Y(a){t.call(this,"Left","AdminMenu");this.menu=a.menu}function Z(){t.call(this,"Right","AdminPane");this.adminDomain=d.observable(e.settingsGet("AdminDomain"))}
function oa(){var a=e.data();this.mainLanguage=a.mainLanguage;this.mainTheme=a.mainTheme;this.language=a.language;this.theme=a.theme;this.allowCustomTheme=a.allowCustomTheme;this.allowAdditionalAccounts=a.allowAdditionalAccounts;this.title=d.observable(e.settingsGet("Title"));this.version=e.settingsGet("Version");this.themesOptions=d.computed(function(){return i.map(a.themes(),function(a){return{optValue:a,optText:c.convertThemeName(a)}})});this.languagesOptions=d.computed(function(){return i.map(a.languages(),
function(a){return{optValue:a,optText:c.convertLangName(a)}})});this.contactsSupported=e.settingsGet("ContactsIsSupported");this.titleTrigger=d.observable(g.SaveSettingsStep.Idle);this.languageTrigger=d.observable(g.SaveSettingsStep.Idle);this.themeTrigger=d.observable(g.SaveSettingsStep.Idle)}function z(){var a=e.data();this.domains=a.domains;this.domainsLoading=a.domainsLoading;this.iDomainForDeletionTimeout=0;this.visibility=d.computed(function(){return a.domainsLoading()?"visible":"hidden"},this);
this.domainForDeletion=d.observable(null).extend({toggleSubscribe:[this,function(a){a&&a.deleteAccess(!1)},function(a){a&&(a.deleteAccess(!0),this.startDomainForDeletionTimeout())}]})}function J(){this.licensing=e.data().licensing;this.licensingProcess=e.data().licensingProcess;this.licenseValid=e.data().licenseValid;this.licenseExpired=e.data().licenseExpired;this.licenseError=e.data().licenseError;this.licenseTrigger=e.data().licenseTrigger;this.adminDomain=d.observable("");this.subscriptionEnabled=
d.observable(!!e.settingsGet("SubscriptionEnabled"));this.licenseTrigger.subscribe(function(){this.subscriptionEnabled()&&e.reloadLicensing(!0)},this)}function K(){this.csrfProtection=d.observable(!!e.settingsGet("UseTokenProtection"));this.usageStatistics=d.observable(!!e.settingsGet("UsageStatistics"));this.adminLogin=d.observable(e.settingsGet("AdminLogin"));this.adminPassword=d.observable("");this.adminPasswordNew=d.observable("");this.adminPasswordUpdateError=d.observable(!1);this.adminPasswordUpdateSuccess=
d.observable(!1);this.adminPassword.subscribe(function(){this.adminPasswordUpdateError(!1);this.adminPasswordUpdateSuccess(!1)},this);this.adminPasswordNew.subscribe(function(){this.adminPasswordUpdateError(!1);this.adminPasswordUpdateSuccess(!1)},this);this.onNewAdminPasswordResponse=i.bind(this.onNewAdminPasswordResponse,this);this.saveNewAdminPasswordCommand=c.createCommand(this,function(){this.adminPasswordUpdateError(!1);this.adminPasswordUpdateSuccess(!1);e.remote().saveNewAdminPassword(this.onNewAdminPasswordResponse,
{Password:this.adminPassword(),NewPassword:this.adminPasswordNew()})},function(){return""!==this.adminPassword()&&""!==this.adminPasswordNew()})}function pa(){var a=e.data();this.googleEnable=a.googleEnable;this.googleClientID=a.googleClientID;this.googleClientSecret=a.googleClientSecret;this.googleTrigger1=d.observable(g.SaveSettingsStep.Idle);this.googleTrigger2=d.observable(g.SaveSettingsStep.Idle);this.facebookEnable=a.facebookEnable;this.facebookAppID=a.facebookAppID;this.facebookAppSecret=a.facebookAppSecret;
this.facebookTrigger1=d.observable(g.SaveSettingsStep.Idle);this.facebookTrigger2=d.observable(g.SaveSettingsStep.Idle);this.twitterEnable=a.twitterEnable;this.twitterConsumerKey=a.twitterConsumerKey;this.twitterConsumerSecret=a.twitterConsumerSecret;this.twitterTrigger1=d.observable(g.SaveSettingsStep.Idle);this.twitterTrigger2=d.observable(g.SaveSettingsStep.Idle);this.dropboxEnable=a.dropboxEnable;this.dropboxApiKey=a.dropboxApiKey;this.dropboxTrigger1=d.observable(g.SaveSettingsStep.Idle)}function C(){var a=
e.data();this.enabledPlugins=d.observable(!!e.settingsGet("EnabledPlugins"));this.pluginsError=d.observable("");this.plugins=a.plugins;this.pluginsLoading=a.pluginsLoading;this.visibility=d.computed(function(){return a.pluginsLoading()?"visible":"hidden"},this);this.onPluginLoadRequest=i.bind(this.onPluginLoadRequest,this);this.onPluginDisableRequest=i.bind(this.onPluginDisableRequest,this)}function G(){var a=e.data();this.packagesError=d.observable("");this.packages=a.packages;this.packagesLoading=
a.packagesLoading;this.packagesReal=a.packagesReal;this.packagesMainUpdatable=a.packagesMainUpdatable;this.packagesCurrent=d.computed(function(){return i.filter(this.packages(),function(a){return a&&""!==a.installed&&!a.compare})},this);this.packagesAvailableForUpdate=d.computed(function(){return i.filter(this.packages(),function(a){return a&&""!==a.installed&&!!a.compare})},this);this.packagesAvailableForInstallation=d.computed(function(){return i.filter(this.packages(),function(a){return a&&""===
a.installed})},this);this.visibility=d.computed(function(){return a.packagesLoading()?"visible":"hidden"},this)}function aa(){c.initDataConstructorBySettings(this)}function ba(){c.initDataConstructorBySettings(this);this.domainsLoading=d.observable(!1).extend({throttle:100});this.domains=d.observableArray([]);this.pluginsLoading=d.observable(!1).extend({throttle:100});this.plugins=d.observableArray([]);this.packagesReal=d.observable(!0);this.packagesMainUpdatable=d.observable(!0);this.packagesLoading=
d.observable(!1).extend({throttle:100});this.packages=d.observableArray([]);this.licensing=d.observable(!1);this.licensingProcess=d.observable(!1);this.licenseValid=d.observable(!1);this.licenseExpired=d.observable(0);this.licenseError=d.observable("");this.licenseTrigger=d.observable(!1)}function D(){this.oRequests={}}function p(){this.oRequests={};this.oRequests={}}function A(){this.oEmailsPicsHashes={};this.oServices={}}function qa(){A.call(this)}function H(a){w.call(this,"settings",a);this.menu=
d.observableArray([]);this.oCurrentSubScreen=null}function ca(){w.call(this,"login",[Q])}function da(){H.call(this,[Y,Z])}function u(){this.oLocal=this.oLink=this.oPlugins=this.oSettings=null;this.isLocalAutocomplete=!0;this.popupVisibility=d.observable(!1);this.iframe=j('<iframe style="display:none" src="javascript:;" />').appendTo("body");E.on("error",function(a){e&&(a&&a.originalEvent&&a.originalEvent.message&&-1===c.inArray(a.originalEvent.message,["Uncaught Error: Error calling method on NPObject."]))&&
e.remote().jsError(c.emptyFunction,a.originalEvent.message,a.originalEvent.filename,a.originalEvent.lineno,h.__rl_script_count||0,location&&location.toString?location.toString():"",R.attr("class"))})}function v(){u.call(this);this.oCache=this.oRemote=this.oData=null}var l={},g={},k={},c={},n={},S,ea,F,fa,I,ga=d.observable(!0),T=d.observable(!0),s=null,U=h.rainloopAppData||{},ha=h.rainloopI18N||{},R=j("html"),E=j(h),ra=j(h.document),V=[],ia=[],ja=[],W=h.Notification&&h.Notification.requestPermission?
h.Notification:null,e=null;S=0;ea=!1;F=(navigator.userAgent||"").toLowerCase();fa=-1<F.indexOf("iphone")||-1<F.indexOf("ipod")||-1<F.indexOf("ipad");F=-1<F.indexOf("android");I=fa||F;l.Defaults={};l.Values={};l.DataImages={};l.Defaults.MessagesPerPage=25;l.Defaults.DefaultAjaxTimeout=2E4;l.Defaults.SearchAjaxTimeout=12E4;l.Defaults.SendMessageAjaxTimeout=2E5;l.Defaults.SaveMessageAjaxTimeout=2E5;l.Values.UnuseOptionValue="__UNUSE__";l.Values.GmailFolderName="[Gmail]";l.Values.ClientSideCookieIndexName=
"rlcsc";l.Values.ImapDefaulPort=143;l.Values.ImapDefaulSecurePort=993;l.Values.SmtpDefaulPort=25;l.Values.SmtpDefaulSecurePort=465;l.DataImages.UserDotPic="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQIW2P8DwQACgAD/il4QJ8AAAAASUVORK5CYII=";l.DataImages.TranspPic="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQIW2NkAAIAAAoAAggA9GkAAAAASUVORK5CYII=";g.StorageResultType={Success:"success",Abort:"abort",Error:"error",Unload:"unload"};g.State=
{Empty:10,Login:20,Auth:30};g.StateType={Webmail:0,Admin:1};g.FolderType={Inbox:10,SentItems:11,Draft:12,Trash:13,Spam:14,User:99};g.LoginSignMeTypeAsString={DefaultOff:"defaultoff",DefaultOn:"defaulton",Unused:"unused"};g.LoginSignMeType={DefaultOff:0,DefaultOn:1,Unused:2};g.ComposeType={Empty:"empty",Reply:"reply",ReplyAll:"replyall",Forward:"forward",ForwardAsAttachment:"forward-as-attachment",Draft:"draft"};g.UploadErrorCode={Normal:0,FileIsTooBig:1,FilePartiallyUploaded:2,FileNoUploaded:3,MissingTempFolder:4,
FileOnSaveingError:5,FileType:98,Unknown:99};g.SetSystemFoldersNotification={None:0,Sent:1,Draft:2,Spam:3,Trash:4};g.ClientSideKeyName={FoldersLashHash:0,MessagesInboxLastHash:1,MailBoxListSize:2,ExpandedFolders:3};g.EventKeyCode={Backspace:8,Enter:13,Esc:27,PageUp:33,PageDown:34,Left:37,Right:39,Up:38,Down:40,End:35,Home:36,Insert:45,Delete:46,A:65,S:83};g.MessageSetAction={SetSeen:0,UnsetSeen:1,SetFlag:2,UnsetFlag:3};g.MessageSelectAction={All:0,None:1,Invert:2,Unseen:3,Seen:4,Flagged:5,Unflagged:6};
g.DesctopNotifications={Allowed:0,NotAllowed:1,Denied:2,NotSupported:9};g.MessagePriority={Low:5,Normal:3,High:1};g.EditorDefaultType={Html:"Html",Plain:"Plain"};g.CustomThemeType={Light:"Light",Dark:"Dark"};g.ServerSecure={None:0,SSL:1,TLS:2};g.SearchDateType={All:-1,Days3:3,Days7:7,Month:30};g.EmailType={Defailt:0,Facebook:1,Google:2};g.SaveSettingsStep={Animate:-2,Idle:-1,TrueResult:1,FalseResult:0};g.Notification={InvalidToken:101,AuthError:102,AccessError:103,ConnectionError:104,CaptchaError:105,
SocialFacebookLoginAccessDisable:106,SocialTwitterLoginAccessDisable:107,SocialGoogleLoginAccessDisable:108,DomainNotAllowed:109,CantGetMessageList:201,CantGetMessage:202,CantDeleteMessage:203,CantMoveMessage:204,CantSaveMessage:301,CantSendMessage:302,InvalidRecipients:303,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,AccountAlreadyExists:801,MailServerError:901,UnknownError:999};c.trim=j.trim;c.inArray=j.inArray;c.isArray=i.isArray;c.isFunc=i.isFunction;c.isUnd=i.isUndefined;c.isNull=i.isNull;c.emptyFunction=function(){};c.isNormal=function(a){return!c.isUnd(a)&&!c.isNull(a)};c.windowResize=i.debounce(function(a){c.isUnd(a)?E.resize():h.setTimeout(function(){E.resize()},
a)},50);c.isPosNumeric=function(a,b){return c.isNormal(a)?c.isUnd(b)||b?/^[0-9]*$/.test(a.toString()):/^[1-9]+[0-9]*$/.test(a.toString()):!1};c.pInt=function(a){return c.isNormal(a)&&""!==a?h.parseInt(a,10):0};c.pString=function(a){return c.isNormal(a)?a+"":""};c.isNonEmptyArray=function(a){return c.isArray(a)&&0<a.length};c.exportPath=function(a,b,f){for(var q=null,a=a.split("."),f=f||h;a.length&&(q=a.shift());)!a.length&&!c.isUnd(b)?f[q]=b:f=f[q]?f[q]:f[q]={}};c.pImport=function(a,b,f){a[b]=f};
c.pExport=function(a,b,f){return c.isUnd(a[b])?f:a[b]};c.encodeHtml=function(a){return c.isNormal(a)?a.toString().replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;"):""};c.splitPlainText=function(a,b){for(var f="",q="",d=a,e=0,g=0,b=c.isUnd(b)?100:b;d.length>b;)q=d.substring(0,b),e=q.lastIndexOf(" "),g=q.lastIndexOf("\n"),-1!==g&&(e=g),-1===e&&(e=b),f+=q.substring(0,e)+"\n",d=d.substring(e+1);return f+d};var X={};c.timeOutAction=function(a,
b,f){c.isUnd(X[a])&&(X[a]=0);h.clearTimeout(X[a]);X[a]=h.setTimeout(b,f)};var la={};c.timeOutActionSecond=function(a,b,f){la[a]||(la[a]=h.setTimeout(function(){b();la[a]=0},f))};var x=!1;c.audio=function(a,b){if(!1===x)if(fa)x=null;else{var f=!1,c=!1,d=h.Audio?new h.Audio:null;d&&d.canPlayType&&d.play?((f=""!==d.canPlayType('audio/mpeg; codecs="mp3"'))||(c=""!==d.canPlayType('audio/ogg; codecs="vorbis"')),f||c?(x=d,x.preload="none",x.loop=!1,x.autoplay=!1,x.muted=!1,x.src=f?a:b):x=null):x=null}return x};
c.hos=function(a,b){return a&&Object.hasOwnProperty?Object.hasOwnProperty.call(a,b):!1};c.i18n=function(a,b,f){var d="",a=c.isUnd(ha[a])?c.isUnd(f)?a:f:ha[a];if(!c.isUnd(b)&&!c.isNull(b))for(d in b)c.hos(b,d)&&(a=a.replace("%"+d+"%",b[d]));return a};c.i18nToNode=function(a){i.defer(function(){j(".i18n",a).each(function(){var a=j(this),f="";(f=a.data("i18n-text"))?a.text(c.i18n(f)):((f=a.data("i18n-html"))&&a.html(c.i18n(f)),(f=a.data("i18n-placeholder"))&&a.attr("placeholder",c.i18n(f)))})})};c.i18nToDoc=
function(){h.rainloopI18N&&(ha=h.rainloopI18N||{},c.i18nToNode(ra),T(!T()));h.rainloopI18N={}};c.initOnStartOrLangChange=function(a,b,f){a&&a.call(b);f?T.subscribe(function(){a&&a.call(b);f.call(b)}):a&&T.subscribe(a,b)};c.inFocus=function(){var a=document.activeElement;return a&&("INPUT"===a.tagName||"TEXTAREA"===a.tagName||"IFRAME"===a.tagName||"DIV"===a.tagName&&"editorHtmlArea"===a.className&&a.contentEditable)};c.removeInFocus=function(){if(document&&document.activeElement&&document.activeElement.blur){var a=
j(document.activeElement);(a.is("input")||a.is("textarea"))&&document.activeElement.blur()}};c.removeSelection=function(){if(h&&h.getSelection){var a=h.getSelection();a&&a.removeAllRanges&&a.removeAllRanges()}else document&&(document.selection&&document.selection.empty)&&document.selection.empty()};c.replySubjectAdd=function(a,b){var f=null,d=c.trim(b);null!==(f=(new h.RegExp("^"+a+"[\\s]?\\:(.*)$","gi")).exec(b))&&!c.isUnd(f[1])?d=a+"[2]: "+f[1]:null!==(f=(new h.RegExp("^("+a+"[\\s]?[\\[\\(]?)([\\d]+)([\\]\\)]?[\\s]?\\:.*)$",
"gi")).exec(b))&&!c.isUnd(f[1])&&!c.isUnd(f[2])&&!c.isUnd(f[3])?(c.pInt(f[2]),d=f[1]+(c.pInt(f[2])+1)+f[3]):d=a+": "+b;return d};c.roundNumber=function(a,b){return Math.round(a*Math.pow(10,b))/Math.pow(10,b)};c.friendlySize=function(a){a=c.pInt(a);return 1073741824<=a?c.roundNumber(a/1073741824,1)+"GB":1048576<=a?c.roundNumber(a/1048576,1)+"MB":1024<=a?c.roundNumber(a/1024,0)+"KB":a+"B"};c.log=function(a){h.console&&h.console.log&&h.console.log(a)};c.getNotification=function(a){a=c.pInt(a);return c.isUnd(k[a])?
"":k[a]};c.initNotificationLanguage=function(){k[g.Notification.InvalidToken]=c.i18n("NOTIFICATIONS/INVALID_TOKEN");k[g.Notification.AuthError]=c.i18n("NOTIFICATIONS/AUTH_ERROR");k[g.Notification.AccessError]=c.i18n("NOTIFICATIONS/ACCESS_ERROR");k[g.Notification.ConnectionError]=c.i18n("NOTIFICATIONS/CONNECTION_ERROR");k[g.Notification.CaptchaError]=c.i18n("NOTIFICATIONS/CAPTCHA_ERROR");k[g.Notification.SocialFacebookLoginAccessDisable]=c.i18n("NOTIFICATIONS/SOCIAL_FACEBOOK_LOGIN_ACCESS_DISABLE");
k[g.Notification.SocialTwitterLoginAccessDisable]=c.i18n("NOTIFICATIONS/SOCIAL_TWITTER_LOGIN_ACCESS_DISABLE");k[g.Notification.SocialGoogleLoginAccessDisable]=c.i18n("NOTIFICATIONS/SOCIAL_GOOGLE_LOGIN_ACCESS_DISABLE");k[g.Notification.DomainNotAllowed]=c.i18n("NOTIFICATIONS/DOMAIN_NOT_ALLOWED");k[g.Notification.CantGetMessageList]=c.i18n("NOTIFICATIONS/CANT_GET_MESSAGE_LIST");k[g.Notification.CantGetMessage]=c.i18n("NOTIFICATIONS/CANT_GET_MESSAGE");k[g.Notification.CantDeleteMessage]=c.i18n("NOTIFICATIONS/CANT_DELETE_MESSAGE");
k[g.Notification.CantMoveMessage]=c.i18n("NOTIFICATIONS/CANT_MOVE_MESSAGE");k[g.Notification.CantSaveMessage]=c.i18n("NOTIFICATIONS/CANT_SAVE_MESSAGE");k[g.Notification.CantSendMessage]=c.i18n("NOTIFICATIONS/CANT_SEND_MESSAGE");k[g.Notification.InvalidRecipients]=c.i18n("NOTIFICATIONS/INVALID_RECIPIENTS");k[g.Notification.CantCreateFolder]=c.i18n("NOTIFICATIONS/CANT_CREATE_FOLDER");k[g.Notification.CantRenameFolder]=c.i18n("NOTIFICATIONS/CANT_RENAME_FOLDER");k[g.Notification.CantDeleteFolder]=c.i18n("NOTIFICATIONS/CANT_DELETE_FOLDER");
k[g.Notification.CantDeleteNonEmptyFolder]=c.i18n("NOTIFICATIONS/CANT_DELETE_NON_EMPTY_FOLDER");k[g.Notification.CantSubscribeFolder]=c.i18n("NOTIFICATIONS/CANT_SUBSCRIBE_FOLDER");k[g.Notification.CantUnsubscribeFolder]=c.i18n("NOTIFICATIONS/CANT_UNSUBSCRIBE_FOLDER");k[g.Notification.CantSaveSettings]=c.i18n("NOTIFICATIONS/CANT_SAVE_SETTINGS");k[g.Notification.CantSavePluginSettings]=c.i18n("NOTIFICATIONS/CANT_SAVE_PLUGIN_SETTINGS");k[g.Notification.DomainAlreadyExists]=c.i18n("NOTIFICATIONS/DOMAIN_ALREADY_EXISTS");
k[g.Notification.CantInstallPackage]=c.i18n("NOTIFICATIONS/CANT_INSTALL_PACKAGE");k[g.Notification.CantDeletePackage]=c.i18n("NOTIFICATIONS/CANT_DELETE_PACKAGE");k[g.Notification.InvalidPluginPackage]=c.i18n("NOTIFICATIONS/INVALID_PLUGIN_PACKAGE");k[g.Notification.UnsupportedPluginPackage]=c.i18n("NOTIFICATIONS/UNSUPPORTED_PLUGIN_PACKAGE");k[g.Notification.LicensingServerIsUnavailable]=c.i18n("NOTIFICATIONS/LICENSING_SERVER_IS_UNAVAILABLE");k[g.Notification.LicensingExpired]=c.i18n("NOTIFICATIONS/LICENSING_EXPIRED");
k[g.Notification.LicensingBanned]=c.i18n("NOTIFICATIONS/LICENSING_BANNED");k[g.Notification.DemoSendMessageError]=c.i18n("NOTIFICATIONS/DEMO_SEND_MESSAGE_ERROR");k[g.Notification.AccountAlreadyExists]=c.i18n("NOTIFICATIONS/ACCOUNT_ALREADY_EXISTS");k[g.Notification.MailServerError]=c.i18n("NOTIFICATIONS/MAIL_SERVER_ERROR");k[g.Notification.UnknownError]=c.i18n("NOTIFICATIONS/UNKNOWN_ERROR")};c.getUploadErrorDescByCode=function(a){var b="";switch(c.pInt(a)){case g.UploadErrorCode.FileIsTooBig:b=c.i18n("UPLOAD/ERROR_FILE_IS_TOO_BIG");
break;case g.UploadErrorCode.FilePartiallyUploaded:b=c.i18n("UPLOAD/ERROR_FILE_PARTIALLY_UPLOADED");break;case g.UploadErrorCode.FileNoUploaded:b=c.i18n("UPLOAD/ERROR_NO_FILE_UPLOADED");break;case g.UploadErrorCode.MissingTempFolder:b=c.i18n("UPLOAD/ERROR_MISSING_TEMP_FOLDER");break;case g.UploadErrorCode.FileOnSaveingError:b=c.i18n("UPLOAD/ERROR_ON_SAVING_FILE");break;case g.UploadErrorCode.FileType:b=c.i18n("UPLOAD/ERROR_FILE_TYPE");break;default:b=c.i18n("UPLOAD/ERROR_UNKNOWN")}return b};c.killCtrlAandS=
function(a){if(a=a||h.event){var b=a.target||a.srcElement,f=a.keyCode||a.which;if(a.ctrlKey&&f===g.EventKeyCode.S)a.preventDefault();else if((!b||!b.tagName||!b.tagName.match(/INPUT|TEXTAREA/i))&&a.ctrlKey&&f===g.EventKeyCode.A)h.getSelection?h.getSelection().removeAllRanges():h.document.selection&&h.document.selection.clear&&h.document.selection.clear(),a.preventDefault()}};c.createCommand=function(a,b,f){var q=b?function(){q.canExecute&&q.canExecute()&&b.apply(a,Array.prototype.slice.call(arguments));
return!1}:function(){};q.enabled=d.observable(!0);f=c.isUnd(f)?!0:f;q.canExecute=c.isFunc(f)?d.computed(function(){return q.enabled()&&f.call(a)}):d.computed(function(){return q.enabled()&&!!f});return q};c.initDataConstructorBySettings=function(a){a.ignoreFolderSubscribe=d.observable(!1);a.editorDefaultType=d.observable(g.EditorDefaultType.Html);a.showImages=d.observable(!1);a.showAnimation=d.observable(!1);a.desktopNotifications=d.observable(!1);a.useThreads=d.observable(!0);a.replySameFolder=d.observable(!0);
a.usePreviewPane=d.observable(!0);a.useCheckboxesInList=d.observable(!0);a.showAnimation.subscribe(function(a){I?R.removeClass("rl-anim").addClass("no-rl-anim"):R.toggleClass("rl-anim",a).toggleClass("no-rl-anim",!a)});a.showAnimation.valueHasMutated();a.desktopNotificationsPermisions=d.computed(function(){a.desktopNotifications();var b=g.DesctopNotifications.NotSupported;if(W&&W.permission)switch(W.permission.toLowerCase()){case "granted":b=g.DesctopNotifications.Allowed;break;case "denied":b=g.DesctopNotifications.Denied;
break;case "default":b=g.DesctopNotifications.NotAllowed}else h.webkitNotifications&&h.webkitNotifications.checkPermission&&(b=h.webkitNotifications.checkPermission());return b});a.useDesktopNotifications=d.computed({read:function(){return a.desktopNotifications()&&g.DesctopNotifications.Allowed===a.desktopNotificationsPermisions()},write:function(b){b?(b=a.desktopNotificationsPermisions(),g.DesctopNotifications.Allowed===b?a.desktopNotifications(!0):g.DesctopNotifications.NotAllowed===b?W.requestPermission(function(){a.desktopNotifications.valueHasMutated();
h.console.log(a.desktopNotificationsPermisions());g.DesctopNotifications.Allowed===a.desktopNotificationsPermisions()?a.desktopNotifications()?a.desktopNotifications.valueHasMutated():a.desktopNotifications(!0):a.desktopNotifications()?a.desktopNotifications(!1):a.desktopNotifications.valueHasMutated()}):a.desktopNotifications(!1)):a.desktopNotifications(!1)}});a.language=d.observable("");a.languages=d.observableArray([]);a.mainLanguage=d.computed({read:a.language,write:function(b){b!==a.language()?
-1<c.inArray(b,a.languages())?a.language(b):0<a.languages().length&&a.language(a.languages()[0]):a.language.valueHasMutated()}});a.theme=d.observable("");a.themes=d.observableArray([]);a.mainTheme=d.computed({read:a.theme,write:function(b){if(b!==a.theme()){var f=a.themes();-1<c.inArray(b,f)?a.theme(b):0<f.length&&a.theme(f[0])}else a.theme.valueHasMutated()}});a.allowCustomTheme=d.observable(!0);a.allowAdditionalAccounts=d.observable(!0);a.messagesPerPage=d.observable(l.Defaults.MessagesPerPage);
a.mainMessagesPerPage=a.messagesPerPage;a.mainMessagesPerPage=d.computed({read:a.messagesPerPage,write:function(b){-1<c.inArray(c.pInt(b),[10,20,30,50,100,150,200])?b!==a.messagesPerPage()&&a.messagesPerPage(b):a.messagesPerPage.valueHasMutated()}});a.facebookEnable=d.observable(!1);a.facebookAppID=d.observable("");a.facebookAppSecret=d.observable("");a.twitterEnable=d.observable(!1);a.twitterConsumerKey=d.observable("");a.twitterConsumerSecret=d.observable("");a.googleEnable=d.observable(!1);a.googleClientID=
d.observable("");a.googleClientSecret=d.observable("");a.dropboxEnable=d.observable(!1);a.dropboxApiKey=d.observable("");a.contactsIsSupported=d.observable(!1)};c.createMomentDate=function(a){return d.computed(function(){ga();return this.moment().fromNow()},a)};c.createMomentShortDate=function(a){return d.computed(function(){var a="",a=moment(),f=this.moment(),d=this.momentDate();return a=4>=a.diff(f,"hours")?d:a.format("L")===f.format("L")?c.i18n("MESSAGE_LIST/TODAY_AT",{TIME:f.format("LT")}):a.clone().subtract("days",
1).format("L")===f.format("L")?c.i18n("MESSAGE_LIST/YESTERDAY_IN",{TIME:f.format("LT")}):a.year()===f.year()?f.format("D MMM."):f.format("LL")},a)};c.isFolderExpanded=function(a){var b=e.local().get(g.ClientSideKeyName.ExpandedFolders);return i.isArray(b)&&-1!==i.indexOf(b,a)};c.setExpandedFolder=function(a,b){var f=e.local().get(g.ClientSideKeyName.ExpandedFolders);i.isArray(f)||(f=[]);b?(f.push(a),f=i.uniq(f)):f=i.without(f,a);e.local().set(g.ClientSideKeyName.ExpandedFolders,f)};c.initLayoutResizer=
function(a,b,f,c){var d=j(a),h=j(b),ka=j(f),a=e.local().get(g.ClientSideKeyName.MailBoxListSize),k=function(a,b,f){if(b||f)a=ka.width(),b=b?100*(b.size.width/a):null,null===b&&f&&(b=100*(d.width()/a)),null!==b&&(d.css({width:"",height:"",right:""+(100-b)+"%"}),h.css({width:"",height:"",left:""+b+"%"}))};a&&d.width(a);d.resizable({minWidth:350,maxWidth:ka.width()-250,handles:"e",resize:k,stop:k});k(null,null,!0);E.resize(i.throttle(function(a,b){if(c&&c()){var f=ka.width();d.resizable("option","maxWidth",
f-250);b&&(b.size&&b.size.width)&&e.local().set(g.ClientSideKeyName.MailBoxListSize,b.size.width);k(null,null,!0)}},400))};c.initBlockquoteSwitcher=function(a){if(a){var b=j("blockquote:not(.rl-bq-switcher)",a).filter(function(){return 0===j(this).parent().closest("blockquote",a).length});b&&0<b.length&&b.each(function(){var a=j(this),b=a.height();if(0===b||100<b)a.addClass("rl-bq-switcher hidden-bq"),j('<span class="rlBlockquoteSwitcher"><i class="icon-ellipsis" /></span>').insertBefore(a).click(function(){a.toggleClass("hidden-bq");
c.windowResize()}).after("<br />").before("<br />")})}};c.removeBlockquoteSwitcher=function(a){a&&(j(a).find("blockquote.rl-bq-switcher").each(function(){j(this).removeClass("rl-bq-switcher hidden-bq")}),j(a).find(".rlBlockquoteSwitcher").each(function(){j(this).remove()}))};c.extendAsViewModel=function(a,b){b&&(b.__name=a,n.regViewModelHook(a,b),i.extend(b.prototype,t.prototype))};c.addSettingsViewModel=function(a,b,f,c,d){a.__rlSettingsData={Label:f,Template:b,Route:c,IsDefault:!!d};V.push(a)};
c.removeSettingsViewModel=function(a){ia.push(a)};c.disableSettingsViewModel=function(a){ja.push(a)};c.convertThemeName=function(a){return c.trim(a.replace(/[^a-zA-Z]/g," ").replace(/([A-Z])/g," $1").replace(/[\s]+/g," "))};c.convertLangName=function(a){return c.i18n("LANGS_NAMES/LANG_"+a.toUpperCase().replace(/[^a-zA-Z0-9]+/,"_"),null,a)};c.fakeMd5=function(a){for(var b="",a=c.isUnd(a)?32:c.pInt(a);b.length<a;)b+="0123456789abcdefghijklmnopqrstuvwxyz".substr(h.Math.round(36*h.Math.random()),1);return b};
c.convertPlainTextToHtml=function(a){return a.toString().replace(/&/g,"&amp;").replace(/>/g,"&gt;").replace(/</g,"&lt;").replace(/\r/g,"").replace(/\n/g,"<br />")};c.draggeblePlace=function(){return j('<div class="draggablePlace"><span class="text"></span>&nbsp;<i class="icon-envelope icon-white"></i></div>').appendTo("#rl-hidden")};c.defautOptionsAfterRender=function(a,b){b&&!c.isUnd(b.disable)&&d.applyBindingsToNode(a,{disable:b.disable},b)};c.windowPopupKnockout=function(a,b,f,d){var e=null,g=
h.open(""),i="__OpenerApplyBindingsUid"+c.fakeMd5()+"__",k=j("#"+b);h[i]=function(){if(g&&g.document.body&&k&&k[0]){var b=j(g.document.body);j("#rl-content",b).html(k.html());j("html",g.document).addClass("external "+j("html").attr("class"));c.i18nToNode(b);m.prototype.applyExternal(a,j("#rl-content",b)[0]);h[i]=null;d(g)}};g.document.open();g.document.write('<html><head><meta charset="utf-8" /><meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /><meta name="viewport" content="user-scalable=no" /><meta name="apple-mobile-web-app-capable" content="yes" /><meta name="robots" content="noindex, nofollow, noodp" /><title>'+
c.encodeHtml(f)+'</title></head><body><div id="rl-content"></div></body></html>');g.document.close();e=g.document.createElement("script");e.type="text/javascript";e.innerHTML="if(window&&window.opener&&window.opener['"+i+"']){window.opener['"+i+"']();window.opener['"+i+"']=null}";g.document.getElementsByTagName("head")[0].appendChild(e)};c.settingsSaveHelperFunction=function(a,b,f,d){f=f||null;d=c.isUnd(d)?1E3:c.pInt(d);return function(c,e,h,j,ua){b.call(f,e&&e.Result?g.SaveSettingsStep.TrueResult:
g.SaveSettingsStep.FalseResult);a&&a.call(f,c,e,h,j,ua);i.delay(function(){b.call(f,g.SaveSettingsStep.Idle)},d)}};c.settingsSaveHelperSimpleFunction=function(a,b){return c.settingsSaveHelperFunction(null,a,b,1E3)};c.resizeAndCrop=function(a,b,f){var c=new Image;c.onload=function(){var a=[0,0],c=document.createElement("canvas"),d=c.getContext("2d");c.width=b;c.height=b;a=this.width>this.height?[this.width-this.height,0]:[0,this.height-this.width];d.fillStyle="#fff";d.fillRect(0,0,b,b);d.drawImage(this,
a[0]/2,a[1]/2,this.width-a[0],this.height-a[1],0,0,b,b);f(c.toDataURL("image/jpeg"))};c.src=a};d.bindingHandlers.tooltip={init:function(a,b){if(!I){var f=j(a).data("tooltip-class")||"";j(a).tooltip({delay:{show:500,hide:100},html:!0,trigger:"hover",title:function(){return'<span class="tooltip-class '+f+'">'+c.i18n(d.utils.unwrapObservable(b()))+"</span>"}})}}};d.bindingHandlers.tooltip2={init:function(a,b){var c=j(a).data("tooltip-class")||"";j(a).tooltip({delay:{show:500,hide:100},html:!0,title:function(){return'<span class="tooltip-class '+
c+'">'+b()()+"</span>"}})}};d.bindingHandlers.popover={init:function(a,b){var f=d.utils.unwrapObservable(b());j(a).popover({trigger:f[2]||"click",placement:f[3]||"right",title:function(){return c.i18n(f[0]||"")},content:function(){return c.i18n(f[1]||"")}})}};d.bindingHandlers.resizecrop={init:function(a){j(a).addClass("resizecrop").resizecrop({width:"100",height:"100",wrapperCSS:{"border-radius":"10px"}})},update:function(a,b){b()();j(a).resizecrop({width:"100",height:"100"})}};d.bindingHandlers.onEnter=
{init:function(a,b,c,d){j(a).on("keypress",function(c){c&&13===h.parseInt(c.keyCode,10)&&(j(a).trigger("change"),b().call(d))})}};d.bindingHandlers.onEsc={init:function(a,b,c,d){j(a).on("keypress",function(c){c&&27===h.parseInt(c.keyCode,10)&&(j(a).trigger("change"),b().call(d))})}};d.bindingHandlers.modal={init:function(a,b){j(a).modal({keyboard:!1,show:d.utils.unwrapObservable(b())}).on("hidden",function(){b()(!1)})},update:function(a,b){var c=d.utils.unwrapObservable(b());j(a).modal(c?"show":"hide");
i.delay(function(){j(a).toggleClass("popup-active",c)},1)}};d.bindingHandlers.i18nInit={init:function(a){c.i18nToNode(a)}};d.bindingHandlers.i18nUpdate={update:function(a,b){d.utils.unwrapObservable(b());c.i18nToNode(a)}};d.bindingHandlers.link={update:function(a,b){j(a).attr("href",d.utils.unwrapObservable(b()))}};d.bindingHandlers.title={update:function(a,b){j(a).attr("title",d.utils.unwrapObservable(b()))}};d.bindingHandlers.textF={init:function(a,b){j(a).text(d.utils.unwrapObservable(b()))}};
d.bindingHandlers.initDom={init:function(a,b){b()(a)}};d.bindingHandlers.initResizeTrigger={init:function(a,b){var c=d.utils.unwrapObservable(b());j(a).css({height:c[1],"min-height":c[1]})},update:function(a,b){var f=d.utils.unwrapObservable(b()),e=c.pInt(f[1]),g=0,g=j(a).offset().top;0<g&&(g+=c.pInt(f[2]),g=E.height()-g,e<g&&(e=g),j(a).css({height:e,"min-height":e}))}};d.bindingHandlers.appendDom={update:function(a,b){j(a).hide().empty().append(d.utils.unwrapObservable(b())).show()}};d.bindingHandlers.draggable=
{init:function(a,b){j(a).draggable({distance:20,handle:".dragHandle",cursorAt:{top:22,left:3},helper:function(a){return b()(a&&a.target?d.dataFor(a.target):null)}}).on("mousedown",function(){c.removeInFocus()})}};d.bindingHandlers.droppable={init:function(a,b){var c=b();!1!==c&&j(a).droppable({tolerance:"pointer",hoverClass:"droppableHover",drop:function(a,b){c(a,b)}})}};d.bindingHandlers.nano={init:function(a){I||j(a).addClass("nano").nanoScroller({iOSNativeScrolling:!1,preventPageScrolling:!0})}};
d.bindingHandlers.saveTrigger={init:function(a){j(a).append('&nbsp;&nbsp;<i class="icon-spinner-2 animated"></i><i class="icon-remove error"></i><i class="icon-ok success"></i>').addClass("settings-saved-trigger")},update:function(a,b){var c=d.utils.unwrapObservable(b()),e=j(a);switch(c.toString()){case "1":e.find(".animated,.error").hide().removeClass("visible").end().find(".success").show().addClass("visible");break;case "0":e.find(".animated,.success").hide().removeClass("visible").end().find(".error").show().addClass("visible");
break;case "-2":e.find(".error,.success").hide().removeClass("visible").end().find(".animated").show().addClass("visible");break;default:e.find(".animated").hide().end().find(".error,.success").removeClass("visible")}}};d.bindingHandlers.select2={init:function(a,b){var f=0,g=null,sa=new h.RegExp(/[a-zA-Z0-9\.\-_]+@[a-zA-Z0-9\.\-_]+/),ta=new h.RegExp(/(.+) [<]?([^\s<@]+@[a-zA-Z0-9\.\-_]+)[>]?/),k=function(){return""},l=function(a){e.getAutocomplete(a.term,a.page,function(b,c){a.callback({more:!!c,
results:i.map(b,function(a){var b=a.toLine(!1);return{id:b,text:b,c:a}})})})};j(a).addClass("ko-select2").select2({query:function(a){a&&(0===f?(l(a),f=h.setTimeout(c.emptyFunction,200)):(h.clearInterval(f),f=h.setTimeout(function(){l(a)},200)))},formatSelection:function(a,b){var c=a&&a.c?a.c.select2Selection(b):a.text;if(null!==c)return c},formatResult:function(a,b,c,f){b=a&&a.c?a.c.select2Result(b):"";return""===b?f(a.text):b},createSearchChoice:function(a,b){return 0===b.length&&sa.test(a)?{id:a,
text:a}:null},formatNoMatches:k,formatSearching:function(){return c.i18n("SUGGESTIONS/SEARCHING_DESC")},formatInputTooShort:k,formatSelectionTooBig:k,multiple:!0,tokenSeparators:[",",";"],minimumInputLength:2,selectOnBlur:!1,closeOnSelect:!0,openOnEnter:!1});d.utils.domNodeDisposal.addDisposeCallback(a,function(){j(a).select2("destroy")});j(a).on("change",function(){for(var a=j(this).select2("data"),f=0,d=a.length,e=null,h=[];f<d;f++)if((e=a[f])&&e.id)e.c||(e.c=new r,(g=ta.exec(c.trim(e.id)))&&!c.isUnd(g[2])?
(e.c.name=g[1],e.c.email=g[2]):e.c.email=e.id),h.push(e.c);b()(h)})},update:function(a,b){for(var c=d.utils.unwrapObservable(b()),e=0,g=c.length,h=null,i="",k=[];e<g;e++)h=c[e],i=h.toLine(!1),k.push({id:i,text:i,c:h});j(a).select2("data",k)}};d.bindingHandlers.command={init:function(a,b,c,e){var g=j(a),h=b();if(!h||!h.enabled||!h.canExecute)throw Error("You are not using command function");g.addClass("command");d.bindingHandlers[g.is("form")?"submit":"click"].init.apply(e,arguments)},update:function(a,
b){var c=!0,d=j(a),e=b(),c=e.enabled();d.toggleClass("command-not-enabled",!c);c&&(c=e.canExecute(),d.toggleClass("command-can-not-be-execute",!c));d.toggleClass("command-disabled disable disabled",!c);(d.is("input")||d.is("button"))&&d.prop("disabled",!c)}};d.extenders.trimmer=function(a){var b=d.computed({read:a,write:function(b){a(c.trim(b.toString()))},owner:this});b(a());return b};d.extenders.reversible=function(a){var b=a();a.commit=function(){b=a()};a.reverse=function(){a(b)};a.commitedValue=
function(){return b};return a};d.extenders.toggleSubscribe=function(a,b){a.subscribe(b[1],b[0],"beforeChange");a.subscribe(b[2],b[0]);return a};d.extenders.falseTimeout=function(a,b){a.iTimeout=0;a.subscribe(function(f){f&&(h.clearTimeout(a.iTimeout),a.iTimeout=h.setTimeout(function(){a(!1);a.iTimeout=0},c.pInt(b)))});return a};d.observable.fn.validateEmail=function(){this.hasError=d.observable(!1);this.subscribe(function(a){a=c.trim(a);this.hasError(""!==a&&!/^[^@\s]+@[^@\s]+$/.test(a))},this);this.valueHasMutated();
return this};d.observable.fn.validateFunc=function(a){this.hasFuncError=d.observable(!1);c.isFunc(a)&&(this.subscribe(function(b){this.hasFuncError(!a(b))},this),this.valueHasMutated());return this};o.prototype.root=function(){return this.sBase};o.prototype.attachmentDownload=function(a){return this.sServer+"/Raw/"+this.sSpecSuffix+"/Download/"+a};o.prototype.attachmentPreview=function(a){return this.sServer+"/Raw/"+this.sSpecSuffix+"/View/"+a};o.prototype.attachmentPreviewAsPlain=function(a){return this.sServer+
"/Raw/"+this.sSpecSuffix+"/ViewAsPlain/"+a};o.prototype.upload=function(){return this.sServer+"/Upload/"+this.sSpecSuffix+"/"};o.prototype.uploadBackground=function(){return this.sServer+"/UploadBackground/"+this.sSpecSuffix+"/"};o.prototype.append=function(){return this.sServer+"/Append/"+this.sSpecSuffix+"/"};o.prototype.change=function(a){return this.sServer+"/Change/"+this.sSpecSuffix+"/"+h.encodeURIComponent(a)+"/"};o.prototype.ajax=function(a){return this.sServer+"/Ajax/"+this.sSpecSuffix+"/"+
a};o.prototype.messageViewLink=function(a){return this.sServer+"/Raw/"+this.sSpecSuffix+"/ViewAsPlain/"+a};o.prototype.messageDownloadLink=function(a){return this.sServer+"/Raw/"+this.sSpecSuffix+"/Download/"+a};o.prototype.inbox=function(){return this.sBase+"mailbox/Inbox"};o.prototype.settings=function(a){var b=this.sBase+"settings";!c.isUnd(a)&&""!==a&&(b+="/"+a);return b};o.prototype.admin=function(a){var b=this.sBase;switch(a){case "AdminDomains":b+="domains";break;case "AdminSecurity":b+="security";
break;case "AdminLicensing":b+="licensing"}return b};o.prototype.mailBox=function(a,b,f){var b=c.isNormal(b)?c.pInt(b):1,f=c.pString(f),d=this.sBase+"mailbox/";""!==a&&(d+=encodeURI(a));1<b&&(d=d.replace(/[\/]+$/,""),d+="/p"+b);""!==f&&(d=d.replace(/[\/]+$/,""),d+="/"+encodeURI(f));return d};o.prototype.phpInfo=function(){return this.sServer+"Info"};o.prototype.langLink=function(a){return this.sServer+"/Lang/0/"+encodeURI(a)+"/"+this.sVersion+"/"};o.prototype.getUserPicUrlFromHash=function(a){return this.sServer+
"/Raw/"+this.sSpecSuffix+"/UserPic/"+a+"/"+this.sVersion+"/"};o.prototype.emptyContactPic=function(){return(""===this.sCdnStaticDomain?"rainloop/v/":this.sCdnStaticDomain)+this.sVersion+"/static/css/images/empty-contact.png"};o.prototype.sound=function(a){return(""===this.sCdnStaticDomain?"rainloop/v/":this.sCdnStaticDomain)+this.sVersion+"/static/sounds/"+a};o.prototype.themePreviewLink=function(a){return(""===this.sCdnStaticDomain?"rainloop/v/":this.sCdnStaticDomain)+this.sVersion+"/themes/"+encodeURI(a)+
"/images/preview.png"};o.prototype.notificationMailIcon=function(){return(""===this.sCdnStaticDomain?"rainloop/v/":this.sCdnStaticDomain)+this.sVersion+"/static/css/images/icom-message-notification.png"};o.prototype.socialGoogle=function(){return this.sServer+"SocialGoogle"+(""!==this.sSpecSuffix?"/"+this.sSpecSuffix+"/":"")};o.prototype.socialTwitter=function(){return this.sServer+"SocialTwitter"+(""!==this.sSpecSuffix?"/"+this.sSpecSuffix+"/":"")};o.prototype.socialFacebook=function(){return this.sServer+
"SocialFacebook"+(""!==this.sSpecSuffix?"/"+this.sSpecSuffix+"/":"")};n.oViewModelsHooks={};n.oSimpleHooks={};n.regViewModelHook=function(a,b){b&&(b.__hookName=a)};n.addHook=function(a,b){c.isFunc(b)&&(c.isArray(n.oSimpleHooks[a])||(n.oSimpleHooks[a]=[]),n.oSimpleHooks[a].push(b))};n.runHook=function(a,b){c.isArray(n.oSimpleHooks[a])&&(b=b||[],i.each(n.oSimpleHooks[a],function(a){a.apply(null,b)}))};n.mainSettingsGet=function(a){return e?e.settingsGet(a):null};n.remoteRequest=function(a,b,c,d,g,h){e&&
e.remote().defaultRequest(a,b,c,d,g,h)};n.settingsGet=function(a,b){var f=n.mainSettingsGet("Plugins");return(f=f&&c.isUnd(f[a])?null:f[a])?c.isUnd(f[b])?null:f[b]:null};L.supported=function(){return!0};L.prototype.set=function(a,b){var c=j.cookie(l.Values.ClientSideCookieIndexName),d=null;try{(d=null===c?null:JSON.parse(c))||(d={}),d[a]=b,j.cookie(l.Values.ClientSideCookieIndexName,JSON.stringify(d),{expires:30})}catch(e){}return d};L.prototype.get=function(a){var b=j.cookie(l.Values.ClientSideCookieIndexName),
f=null;try{f=(f=null===b?null:JSON.parse(b))&&!c.isUnd(f[a])?f[a]:null}catch(d){}return f};M.supported=function(){return!!h.localStorage};M.prototype.set=function(a,b){var c=h.localStorage[l.Values.ClientSideCookieIndexName]||null,d=null;try{(d=null===c?null:JSON.parse(c))||(d={}),d[a]=b,h.localStorage[l.Values.ClientSideCookieIndexName]=JSON.stringify(d)}catch(e){}return d};M.prototype.get=function(a){var b=h.localStorage[l.Values.ClientSideCookieIndexName]||null,f=null;try{f=(f=null===b?null:JSON.parse(b))&&
!c.isUnd(f[a])?f[a]:null}catch(d){}return f};N.prototype.oDriver=null;N.prototype.set=function(a,b){return this.oDriver?this.oDriver.set("p"+a,b):!1};N.prototype.get=function(a){return this.oDriver?this.oDriver.get("p"+a):null};na.prototype.bootstart=function(){};t.prototype.sPosition="";t.prototype.sTemplate="";t.prototype.viewModelName="";t.prototype.viewModelDom=null;t.prototype.viewModelTemplate=function(){return this.sTemplate};t.prototype.viewModelPosition=function(){return this.sPosition};
t.prototype.cancelCommand=t.prototype.closeCommand=function(){};w.prototype.oCross=null;w.prototype.sScreenName="";w.prototype.aViewModels=[];w.prototype.viewModels=function(){return this.aViewModels};w.prototype.screenName=function(){return this.sScreenName};w.prototype.routes=function(){return null};w.prototype.__cross=function(){return this.oCross};w.prototype.__start=function(){var a=this.routes(),b=null,f=null;c.isNonEmptyArray(a)&&(f=i.bind(this.onRoute||c.emptyFunction,this),b=ma.create(),
i.each(a,function(a){b.addRoute(a[0],f).rules=a[1]}),this.oCross=b)};m.prototype.sDefaultScreenName="";m.prototype.oScreens={};m.prototype.oBoot=null;m.prototype.oCurrentScreen=null;m.prototype.showLoading=function(){j("#rl-loading").show()};m.prototype.hideLoading=function(){j("#rl-loading").hide()};m.prototype.routeOff=function(){y.changed.active=!1};m.prototype.routeOn=function(){y.changed.active=!0};m.prototype.setBoot=function(a){c.isNormal(a)&&(this.oBoot=a);return this};m.prototype.screen=
function(a){return""!==a&&!c.isUnd(this.oScreens[a])?this.oScreens[a]:null};m.prototype.delegateRun=function(a,b,f){a&&a[b]&&a[b].apply(a,c.isArray(f)?f:[])};m.prototype.buildViewModel=function(a,b){if(a&&!a.__builded){var f=new a(b),g=f.viewModelPosition(),h=j("#rl-content #rl-"+g.toLowerCase()),i=null;a.__builded=!0;a.__vm=f;f.data=e.data();f.viewModelName=a.__name;h&&1===h.length?(i=j("<div>").addClass("rl-view-model").addClass("RL-"+f.viewModelTemplate()).hide().attr("data-bind",'template: {name: "'+
f.viewModelTemplate()+'"}, i18nInit: true'),i.appendTo(h),f.viewModelDom=i,a.__dom=i,"Popups"===g&&(f.cancelCommand=f.closeCommand=c.createCommand(f,function(){s.hideScreenPopup(a)})),n.runHook("view-model-pre-build",[a.__name,f,i]),d.applyBindings(f,i[0]),this.delegateRun(f,"onBuild",[i]),n.runHook("view-model-post-build",[a.__name,f,i])):c.log("Cannot find view model position: "+g)}return a?a.__vm:null};m.prototype.applyExternal=function(a,b){a&&b&&d.applyBindings(a,b)};m.prototype.hideScreenPopup=
function(a){a&&(a.__vm&&a.__dom)&&(a.__dom.hide(),a.__vm.modalVisibility(!1),this.delegateRun(a.__vm,"onHide"),this.popupVisibility(!1),i.defer(function(){a.__dom.find(".ko-select2").select2("close")}))};m.prototype.showScreenPopup=function(a,b){a&&(this.buildViewModel(a),a.__vm&&a.__dom&&(a.__dom.show(),a.__vm.modalVisibility(!0),this.delegateRun(a.__vm,"onShow",b||[]),this.popupVisibility(!0),n.runHook("view-model-on-show",[a.__name,a.__vm,b||[]])))};m.prototype.screenOnRoute=function(a,b){var f=
this,d=null,e=null;""===c.pString(a)&&(a=this.sDefaultScreenName);if(""!==a){d=this.screen(a);if(!d&&(d=this.screen(this.sDefaultScreenName)))b=a+"/"+b,a=this.sDefaultScreenName;d&&d.__started&&(d.__builded||(d.__builded=!0,c.isNonEmptyArray(d.viewModels())&&i.each(d.viewModels(),function(a){this.buildViewModel(a,d)},this),this.delegateRun(d,"onBuild")),i.defer(function(){if(f.oCurrentScreen){f.delegateRun(f.oCurrentScreen,"onHide");c.isNonEmptyArray(f.oCurrentScreen.viewModels())&&i.each(f.oCurrentScreen.viewModels(),
function(a){if(a.__vm&&a.__dom&&"Popups"!==a.__vm.viewModelPosition()){a.__dom.hide();a.__vm.viewModelVisibility(false);f.delegateRun(a.__vm,"onHide")}})}f.oCurrentScreen=d;if(f.oCurrentScreen){f.delegateRun(f.oCurrentScreen,"onShow");n.runHook("screen-on-show",[f.oCurrentScreen.screenName(),f.oCurrentScreen]);c.isNonEmptyArray(f.oCurrentScreen.viewModels())&&i.each(f.oCurrentScreen.viewModels(),function(a){if(a.__vm&&a.__dom&&"Popups"!==a.__vm.viewModelPosition()){a.__dom.show();a.__vm.viewModelVisibility(true);
f.delegateRun(a.__vm,"onShow");n.runHook("view-model-on-show",[a.__name,a.__vm])}},f)}(e=d.__cross())&&e.parse(b)}))}};m.prototype.startScreens=function(a){i.each(a,function(a){var c=(a=new a)?a.screenName():"";a&&""!==c&&(""===this.sDefaultScreenName&&(this.sDefaultScreenName=c),this.oScreens[c]=a)},this);i.each(this.oScreens,function(a){a&&(!a.__started&&a.__start)&&(a.__started=!0,a.__start(),n.runHook("screen-pre-start",[a.screenName(),a]),this.delegateRun(a,"onStart"),n.runHook("screen-post-start",
[a.screenName(),a]))},this);a=ma.create();a.addRoute(/^([a-zA-Z0-9\-]*)\/?(.*)$/,i.bind(this.screenOnRoute,this));y.initialized.add(a.parse,a);y.changed.add(a.parse,a);y.init()};m.prototype.setHash=function(a,b){a="#"===a.substr(0,1)?a.substr(1):a;a="/"===a.substr(0,1)?a.substr(1):a;(c.isUnd(b)?0:b)?(y.changed.active=!1,y.setHash(a),y.changed.active=!0):(y.changed.active=!0,y.setHash(a))};m.prototype.bootstart=function(){this.oBoot&&this.oBoot.bootstart&&this.oBoot.bootstart();return this};s=new m;
r.newInstanceFromJson=function(a){var b=new r;return b.initByJson(a)?b:null};r.prototype.name="";r.prototype.email="";r.prototype.privateType=null;r.prototype.validate=function(){return""!==this.name||""!==this.email};r.prototype.hash=function(a){return"#"+(a?"":this.name)+"#"+this.email+"#"};r.prototype.clearDuplicateName=function(){this.name===this.email&&(this.name="")};r.prototype.type=function(){if(null===this.privateType&&(this.email&&"@facebook.com"===this.email.substr(-13)&&(this.privateType=
g.EmailType.Facebook),null===this.privateType))this.privateType=g.EmailType.Default;return this.privateType};r.prototype.search=function(a){return-1<(this.name+" "+this.email).toLowerCase().indexOf(a.toLowerCase())};r.prototype.parse=function(a){var a=c.trim(a),b=/(?:"([^"]+)")? ?<?(.*?@[^>,]+)>?,? ?/g.exec(a);b?(this.name=b[1]||"",this.email=b[2]||"",this.clearDuplicateName()):/^[^@]+@[^@]+$/.test(a)&&(this.name="",this.email=a)};r.prototype.initByJson=function(a){var b=!1;a&&"Object/Email"===a["@Object"]&&
(this.name=c.trim(a.Name),this.email=c.trim(a.Email),b=""!==this.email,this.clearDuplicateName());return b};r.prototype.toLine=function(a,b){var f="";""!==this.email&&(b=c.isUnd(b)?!1:!!b,a&&""!==this.name?f=b?'<a href="mailto:'+c.encodeHtml('"'+this.name+'" <'+this.email+">")+'" target="_blank" tabindex="-1">'+c.encodeHtml(this.name)+"</a>":this.name:(f=this.email,""!==this.name?f=b?c.encodeHtml('"'+this.name+'" <')+'<a href="mailto:'+c.encodeHtml('"'+this.name+'" <'+this.email+">")+'" target="_blank" tabindex="-1">'+
c.encodeHtml(f)+"</a>"+c.encodeHtml(">"):'"'+this.name+'" <'+f+">":b&&(f='<a href="mailto:'+c.encodeHtml(this.email)+'" target="_blank" tabindex="-1">'+c.encodeHtml(this.email)+"</a>")));return f};r.prototype.select2Result=function(){var a="",b=e.cache().getUserPic(this.email),a=""!==b?a+('<img class="select2-user-pic pull-left" src="'+c.encodeHtml(b)+'" />'):a+('<img class="select2-user-pic pull-left" src="'+e.link().emptyContactPic()+'" />');g.EmailType.Facebook===this.type()?(a+=""+(0<this.name.length?
this.name:this.email),a+='<i class="icon-facebook pull-right select2-icon-result" />'):a+=""+(0<this.name.length?this.email+' <span class="select2-subname">('+this.name+")</span>":this.email);return a+""};r.prototype.select2Selection=function(a){var b="";if(g.EmailType.Facebook===this.type()){if(b=0<this.name.length?this.name:this.email,""!==b)return j("<pan>").text(b).appendTo(a),a.append('<i class="icon-facebook select2-icon"></i>'),null}else b=0<this.name.length?this.name+" ("+this.email+")":this.email;
return b};c.extendAsViewModel("PopupsDomainViewModel",B);B.prototype.onTestConnectionResponse=function(a,b){this.testing(!1);g.StorageResultType.Success===a&&b.Result?(this.testingDone(!0),this.testingImapError(!1===b.Result.Imap),this.testingSmtpError(!1===b.Result.Smtp)):(this.testingImapError(!0),this.testingSmtpError(!0))};B.prototype.onDomainCreateOrSaveResponse=function(a,b){this.saving(!1);g.StorageResultType.Success===a&&b?b.Result?(e.reloadDomainList(),this.closeCommand()):g.Notification.DomainAlreadyExists===
b.ErrorCode&&this.savingError("Domain already exists"):this.savingError("Unknown error")};B.prototype.onShow=function(a){this.saving(!1);this.testing(!1);this.testingDone(!1);this.testingImapError(!1);this.testingSmtpError(!1);this.clearForm();a&&(this.edit(!0),this.name(c.trim(a.Name)),this.imapServer(c.trim(a.IncHost)),this.imapPort(c.pInt(a.IncPort)),this.imapSecure(c.trim(a.IncSecure)),this.smtpServer(c.trim(a.OutHost)),this.smtpPort(c.pInt(a.OutPort)),this.smtpSecure(c.trim(a.OutSecure)),this.smtpAuth(!!a.OutAuth))};
B.prototype.clearForm=function(){this.edit(!1);this.savingError("");this.name("");this.imapServer("");this.imapPort(l.Values.ImapDefaulPort);this.imapSecure(g.ServerSecure.None);this.smtpServer("");this.smtpPort(l.Values.SmtpDefaulPort);this.smtpSecure(g.ServerSecure.None);this.smtpAuth(!0)};c.extendAsViewModel("PopupsPluginViewModel",O);O.prototype.onPluginSettingsUpdateResponse=function(a,b){g.StorageResultType.Success===a&&b&&b.Result?this.cancelCommand():(this.saveError(""),b&&b.ErrorCode?this.saveError(c.getNotification(b.ErrorCode)):
this.saveError(c.getNotification(g.Notification.CantSavePluginSettings)))};O.prototype.onShow=function(a){this.name();this.readme();this.configures([]);a&&(this.name(a.Name),this.readme(a.Readme),a=a.Config,c.isNonEmptyArray(a)&&this.configures(i.map(a,function(a){return{value:d.observable(a[0]),Name:a[1],Type:a[2],Label:a[3],Default:a[4],Desc:a[5]}})))};c.extendAsViewModel("PopupsActivateViewModel",P);P.prototype.onShow=function(){this.domain(e.settingsGet("AdminDomain"));this.activateProcess()||
(this.key(""),this.activateText(""),this.activateText.isError(!1),this.activationSuccessed(!1),this.key.focus(!0))};P.prototype.validateSubscriptionKey=function(){var a=this.key();return""===a||!!/^RL[\d]+-[A-Z0-9\-]+Z$/.test(c.trim(a))};c.extendAsViewModel("AdminLoginViewModel",Q);Q.prototype.onShow=function(){s.routeOff();i.delay(i.bind(function(){this.loginFocus(!0)},this),100)};Q.prototype.onHide=function(){this.loginFocus(!1)};c.extendAsViewModel("AdminMenuViewModel",Y);Y.prototype.link=function(a){return"#/"+
a};c.extendAsViewModel("AdminPaneViewModel",Z);Z.prototype.logoutClick=function(){e.remote().adminLogout(function(){e.loginAndLogoutReload()})};c.addSettingsViewModel(oa,"AdminGeneral","General","general",!0);oa.prototype.onBuild=function(){var a=this;i.delay(function(){var b=c.settingsSaveHelperSimpleFunction(a.titleTrigger,a),f=c.settingsSaveHelperSimpleFunction(a.languageTrigger,a),d=c.settingsSaveHelperSimpleFunction(a.themeTrigger,a);a.title.subscribe(function(a){e.remote().saveAdminConfig(b,
{Title:c.trim(a)})});a.language.subscribe(function(a){e.remote().saveAdminConfig(f,{Language:c.trim(a)})});a.theme.subscribe(function(a){e.remote().saveAdminConfig(d,{Theme:c.trim(a)})});a.allowCustomTheme.subscribe(function(a){e.remote().saveAdminConfig(null,{AllowCustomTheme:a?"1":"0"})});a.allowAdditionalAccounts.subscribe(function(a){e.remote().saveAdminConfig(null,{AllowAdditionalAccounts:a?"1":"0"})})},50)};c.addSettingsViewModel(z,"AdminDomains","Domains","domains");z.prototype.startDomainForDeletionTimeout=
function(){var a=this;h.clearInterval(this.iDomainForDeletionTimeout);this.iDomainForDeletionTimeout=h.setTimeout(function(){a.domainForDeletion(null)},3E3)};z.prototype.createDomain=function(){s.showScreenPopup(B)};z.prototype.deleteDomain=function(a){this.domains.remove(a);e.remote().domainDelete(i.bind(this.onDomainListChangeRequest,this),a.name)};z.prototype.disableDomain=function(a){a.disabled(!a.disabled());e.remote().domainDisable(i.bind(this.onDomainListChangeRequest,this),a.name,a.disabled())};
z.prototype.onBuild=function(a){var b=this;a.on("click",".b-admin-domains-list-table .e-item .e-action",function(){var a=d.dataFor(this);a&&e.remote().domain(i.bind(b.onDomainLoadRequest,b),a.name)});e.reloadDomainList()};z.prototype.onDomainLoadRequest=function(a,b){g.StorageResultType.Success===a&&(b&&b.Result)&&s.showScreenPopup(B,[b.Result])};z.prototype.onDomainListChangeRequest=function(){e.reloadDomainList()};c.addSettingsViewModel(J,"AdminLicensing","Licensing","licensing");J.prototype.onBuild=
function(){this.subscriptionEnabled()&&e.reloadLicensing(!1)};J.prototype.onShow=function(){this.adminDomain(e.settingsGet("AdminDomain"))};J.prototype.showActivationForm=function(){s.showScreenPopup(P)};J.prototype.licenseExpiredMomentValue=function(){var a=moment.unix(this.licenseExpired());return a.format("LL")+" ("+a.from(moment())+")"};c.addSettingsViewModel(K,"AdminSecurity","Security","security");K.prototype.onNewAdminPasswordResponse=function(a,b){g.StorageResultType.Success===a&&b&&b.Result?
(this.adminPassword(""),this.adminPasswordNew(""),this.adminPasswordUpdateSuccess(!0)):this.adminPasswordUpdateError(!0)};K.prototype.onBuild=function(){this.csrfProtection.subscribe(function(a){e.remote().saveAdminConfig(c.emptyFunction,{TokenProtection:a?"1":"0"})});this.usageStatistics.subscribe(function(a){e.remote().saveAdminConfig(c.emptyFunction,{UsageStatistics:a?"1":"0"})})};K.prototype.onHide=function(){this.adminPassword("");this.adminPasswordNew("")};K.prototype.phpInfoLink=function(){return e.link().phpInfo()};
c.addSettingsViewModel(pa,"AdminSocial","Social","social");pa.prototype.onBuild=function(){var a=this;i.delay(function(){var b=c.settingsSaveHelperSimpleFunction(a.facebookTrigger1,a),d=c.settingsSaveHelperSimpleFunction(a.facebookTrigger2,a),g=c.settingsSaveHelperSimpleFunction(a.twitterTrigger1,a),h=c.settingsSaveHelperSimpleFunction(a.twitterTrigger2,a),i=c.settingsSaveHelperSimpleFunction(a.googleTrigger1,a),j=c.settingsSaveHelperSimpleFunction(a.googleTrigger2,a),k=c.settingsSaveHelperSimpleFunction(a.dropboxTrigger1,
a);a.facebookEnable.subscribe(function(a){e.remote().saveAdminConfig(c.emptyFunction,{FacebookEnable:a?"1":"0"})});a.facebookAppID.subscribe(function(a){e.remote().saveAdminConfig(b,{FacebookAppID:c.trim(a)})});a.facebookAppSecret.subscribe(function(a){e.remote().saveAdminConfig(d,{FacebookAppSecret:c.trim(a)})});a.twitterEnable.subscribe(function(a){e.remote().saveAdminConfig(c.emptyFunction,{TwitterEnable:a?"1":"0"})});a.twitterConsumerKey.subscribe(function(a){e.remote().saveAdminConfig(g,{TwitterConsumerKey:c.trim(a)})});
a.twitterConsumerSecret.subscribe(function(a){e.remote().saveAdminConfig(h,{TwitterConsumerSecret:c.trim(a)})});a.googleEnable.subscribe(function(a){e.remote().saveAdminConfig(c.emptyFunction,{GoogleEnable:a?"1":"0"})});a.googleClientID.subscribe(function(a){e.remote().saveAdminConfig(i,{GoogleClientID:c.trim(a)})});a.googleClientSecret.subscribe(function(a){e.remote().saveAdminConfig(j,{GoogleClientSecret:c.trim(a)})});a.dropboxEnable.subscribe(function(a){e.remote().saveAdminConfig(c.emptyFunction,
{DropboxEnable:a?"1":"0"})});a.dropboxApiKey.subscribe(function(a){e.remote().saveAdminConfig(k,{DropboxApiKey:c.trim(a)})})},50)};c.addSettingsViewModel(C,"AdminPlugins","Plugins","plugins");C.prototype.disablePlugin=function(a){a.disabled(!a.disabled());e.remote().pluginDisable(this.onPluginDisableRequest,a.name,a.disabled())};C.prototype.configurePlugin=function(a){e.remote().plugin(this.onPluginLoadRequest,a.name)};C.prototype.onBuild=function(){this.enabledPlugins.subscribe(function(a){e.remote().saveAdminConfig(c.emptyFunction,
{EnabledPlugins:a?"1":"0"})})};C.prototype.onShow=function(){this.pluginsError("");e.reloadPluginList()};C.prototype.onPluginLoadRequest=function(a,b){g.StorageResultType.Success===a&&(b&&b.Result)&&s.showScreenPopup(O,[b.Result])};C.prototype.onPluginDisableRequest=function(a,b){g.StorageResultType.Success===a&&b&&!b.Result&&b.ErrorCode&&(g.Notification.UnsupportedPluginPackage===b.ErrorCode&&b.ErrorMessage&&""!==b.ErrorMessage?this.pluginsError(b.ErrorMessage):this.pluginsError(c.getNotification(b.ErrorCode)));
e.reloadPluginList()};c.addSettingsViewModel(G,"AdminPackages","Packages","packages");G.prototype.onShow=function(){this.packagesError("")};G.prototype.onBuild=function(){e.reloadPackagesList()};G.prototype.requestHelper=function(a,b){var d=this;return function(q,j){if(g.StorageResultType.Success!==q||!j||!j.Result)j&&j.ErrorCode?d.packagesError(c.getNotification(j.ErrorCode)):d.packagesError(c.getNotification(b?g.Notification.CantInstallPackage:g.Notification.CantDeletePackage));i.each(e.data().packages(),
function(b){b&&(a&&b.loading()&&a.file===b.file)&&(a.loading(!1),b.loading(!1))});g.StorageResultType.Success===q&&j&&j.Result&&j.Result.Reload?h.location.reload():e.reloadPackagesList()}};G.prototype.deletePackage=function(a){a&&(a.loading(!0),e.remote().packageDelete(this.requestHelper(a,!1),a))};G.prototype.installPackage=function(a){a&&(a.loading(!0),e.remote().packageInstall(this.requestHelper(a,!0),a))};aa.prototype.populateDataOnStart=function(){var a=e.settingsGet("Languages"),b=e.settingsGet("Themes");
c.isArray(a)&&this.languages(a);c.isArray(b)&&this.themes(b);this.mainLanguage(e.settingsGet("Language"));this.mainTheme(e.settingsGet("Theme"));this.allowCustomTheme(!!e.settingsGet("AllowCustomTheme"));this.allowAdditionalAccounts(!!e.settingsGet("AllowAdditionalAccounts"));this.ignoreFolderSubscribe(!!e.settingsGet("IgnoreFolderSubscribe"));this.editorDefaultType(e.settingsGet("EditorDefaultType"));this.showImages(!!e.settingsGet("ShowImages"));this.showAnimation(!!e.settingsGet("ShowAnimation"));
this.mainMessagesPerPage(e.settingsGet("MPP"));this.desktopNotifications(!!e.settingsGet("DesktopNotifications"));this.useThreads(!!e.settingsGet("UseThreads"));this.replySameFolder(!!e.settingsGet("ReplySameFolder"));this.usePreviewPane(!!e.settingsGet("UsePreviewPane"));this.useCheckboxesInList(!!e.settingsGet("UseCheckboxesInList"));this.facebookEnable(!!e.settingsGet("AllowFacebookSocial"));this.facebookAppID(e.settingsGet("FacebookAppID"));this.facebookAppSecret(e.settingsGet("FacebookAppSecret"));
this.twitterEnable(!!e.settingsGet("AllowTwitterSocial"));this.twitterConsumerKey(e.settingsGet("TwitterConsumerKey"));this.twitterConsumerSecret(e.settingsGet("TwitterConsumerSecret"));this.googleEnable(!!e.settingsGet("AllowGoogleSocial"));this.googleClientID(e.settingsGet("GoogleClientID"));this.googleClientSecret(e.settingsGet("GoogleClientSecret"));this.dropboxEnable(!!e.settingsGet("AllowDropboxSocial"));this.dropboxApiKey(e.settingsGet("DropboxApiKey"));this.contactsIsSupported(!!e.settingsGet("ContactsIsSupported"))};
i.extend(ba.prototype,aa.prototype);ba.prototype.populateDataOnStart=function(){aa.prototype.populateDataOnStart.call(this)};D.prototype.oRequests={};D.prototype.defaultResponse=function(a,b,c,d,j,k){var l=function(){g.StorageResultType.Success!==c&&ea&&(c=g.StorageResultType.Unload);if(g.StorageResultType.Success===c&&d&&!d.Result){if(d&&g.Notification.AuthError===d.ErrorCode&&S++,d.Logout||5<S)h.__rlah_clear&&h.__rlah_clear(),e.loginAndLogoutReload(!0)}else g.StorageResultType.Success===c&&(d&&
d.Result)&&(S=0);a&&(n.runHook("ajax-default-response",[b,g.StorageResultType.Success===c?d:null,c,j,k]),a(c,g.StorageResultType.Success===c?d:null,j,b,k))};switch(c){case "success":c=g.StorageResultType.Success;break;case "abort":c=g.StorageResultType.Abort;break;default:c=g.StorageResultType.Error}g.StorageResultType.Error===c?i.delay(l,300):l()};D.prototype.ajaxRequest=function(a,b,d,g,k){var l=this,n=""===g,o=(new h.Date).getTime(),p=null,m="",b=b||{},d=c.isNormal(d)?d:2E4,g=c.isUnd(g)?"":c.pString(g),
k=c.isArray(k)?k:[];(m=b.Action||"")&&0<k.length&&i.each(k,function(a){l.oRequests[a]&&(l.oRequests[a].__aborted=!0,l.oRequests[a].abort&&l.oRequests[a].abort(),l.oRequests[a]=null)});n&&(b.XToken=e.settingsGet("Token"));p=j.ajax({type:n?"POST":"GET",url:e.link().ajax(g),async:!0,dataType:"json",data:n?b:{},headers:{},timeout:d,global:!0});p.always(function(d,f){var e=!1;d&&d.Time&&(e=c.pInt(d.Time)>(new h.Date).getTime()-o);m&&l.oRequests[m]&&(l.oRequests[m].__aborted&&(f="abort"),l.oRequests[m]=
null);l.defaultResponse(a,m,f,d,e,b)});m&&(0<k.length&&-1<c.inArray(m,k))&&(this.oRequests[m]&&(this.oRequests[m].__aborted=!0,this.oRequests[m].abort&&this.oRequests[m].abort(),this.oRequests[m]=null),this.oRequests[m]=p);return p};D.prototype.defaultRequest=function(a,b,d,e,g,h){d=d||{};d.Action=b;g=c.pString(g);n.runHook("ajax-default-request",[b,d,g]);this.ajaxRequest(a,d,c.isUnd(e)?l.Defaults.DefaultAjaxTimeout:c.pInt(e),g,h)};D.prototype.noop=function(a){this.defaultRequest(a,"Noop")};D.prototype.jsError=
function(a,b,c,d,e,g,h){this.defaultRequest(a,"JsError",{Message:b,FileName:c,LineNo:d,ScriptCount:e,Location:g,HtmlCapa:h})};i.extend(p.prototype,D.prototype);p.prototype.adminLogin=function(a,b,c){this.defaultRequest(a,"AdminLogin",{Login:b,Password:c})};p.prototype.adminLogout=function(a){this.defaultRequest(a,"AdminLogout")};p.prototype.saveAdminConfig=function(a,b){this.defaultRequest(a,"AdminSettingsUpdate",b)};p.prototype.domainList=function(a){this.defaultRequest(a,"AdminDomainList")};p.prototype.pluginList=
function(a){this.defaultRequest(a,"AdminPluginList")};p.prototype.packagesList=function(a){this.defaultRequest(a,"AdminPackagesList")};p.prototype.packageInstall=function(a,b){this.defaultRequest(a,"AdminPackageInstall",{Id:b.id,Type:b.type,File:b.file})};p.prototype.packageDelete=function(a,b){this.defaultRequest(a,"AdminPackageDelete",{Id:b.id})};p.prototype.domain=function(a,b){this.defaultRequest(a,"AdminDomainLoad",{Name:b})};p.prototype.plugin=function(a,b){this.defaultRequest(a,"AdminPluginLoad",
{Name:b})};p.prototype.domainDelete=function(a,b){this.defaultRequest(a,"AdminDomainDelete",{Name:b})};p.prototype.domainDisable=function(a,b,c){return this.defaultRequest(a,"AdminDomainDisable",{Name:b,Disabled:c?"1":"0"})};p.prototype.pluginSettingsUpdate=function(a,b){return this.defaultRequest(a,"AdminPluginSettingsUpdate",b)};p.prototype.licensing=function(a,b){return this.defaultRequest(a,"AdminLicensing",{Force:b?"1":"0"})};p.prototype.licensingActivate=function(a,b,c){return this.defaultRequest(a,
"AdminLicensingActivate",{Domain:b,Key:c})};p.prototype.pluginDisable=function(a,b,c){return this.defaultRequest(a,"AdminPluginDisable",{Name:b,Disabled:c?"1":"0"})};p.prototype.createOrUpdateDomain=function(a,b,c,d,e,g,h,i,j,k){this.defaultRequest(a,"AdminDomainSave",{Create:b?"1":"0",Name:c,IncHost:d,IncPort:e,IncSecure:g,OutHost:h,OutPort:i,OutSecure:j,OutAuth:k?"1":"0"})};p.prototype.testConnectionForDomain=function(a,b,c,d,e,g,h,i){this.defaultRequest(a,"AdminDomainTest",{IncHost:b,IncPort:c,
IncSecure:d,OutHost:e,OutPort:g,OutSecure:h,OutAuth:i?"1":"0"})};p.prototype.saveNewAdminPassword=function(a,b){this.defaultRequest(a,"AdminPasswordUpdate",b)};p.prototype.adminPing=function(a){this.defaultRequest(a,"AdminPing")};A.prototype.oEmailsPicsHashes={};A.prototype.oServices={};A.prototype.clear=function(){this.oServices={};this.oEmailsPicsHashes={}};A.prototype.getUserPic=function(a){var b="",b="",b=a.toLowerCase(),d=c.isUnd(this.oEmailsPicsHashes[a])?"":this.oEmailsPicsHashes[a];""===d?
(b=b.substr(a.indexOf("@")+1),b=""!==b&&this.oServices[b]?this.oServices[b]:""):b=e.link().getUserPicUrlFromHash(d);return b};A.prototype.setServicesData=function(a){this.oServices=a};A.prototype.setEmailsPicsHashesData=function(a){this.oEmailsPicsHashes=a};i.extend(qa.prototype,A.prototype);i.extend(H.prototype,w.prototype);H.prototype.onRoute=function(a){var b=this,f=null,g=null,h=null,k=null;if(g=i.find(V,function(b){return b&&b.__rlSettingsData&&a===b.__rlSettingsData.Route}))i.find(ia,function(a){return a&&
a===g})&&(g=null),g&&i.find(ja,function(a){return a&&a===g})&&(g=null);g&&(g.__builded&&g.__vm?f=g.__vm:(h=j("#rl-content #rl-settings-subscreen"))&&1===h.length?(f=new g,k=j("<div></div>").addClass("rl-settings-view-model").hide().attr("data-bind",'template: {name: "'+g.__rlSettingsData.Template+'"}, i18nInit: true'),k.appendTo(h),f.data=e.data(),f.viewModelDom=k,f.__rlSettingsData=g.__rlSettingsData,g.__dom=k,g.__builded=!0,g.__vm=f,d.applyBindings(f,k[0]),s.delegateRun(f,"onBuild",[k])):c.log("Cannot find sub settings view model position: SettingsSubScreen"),
f&&i.defer(function(){if(b.oCurrentSubScreen){s.delegateRun(b.oCurrentSubScreen,"onHide");b.oCurrentSubScreen.viewModelDom.hide()}b.oCurrentSubScreen=f;if(b.oCurrentSubScreen){b.oCurrentSubScreen.viewModelDom.show();s.delegateRun(b.oCurrentSubScreen,"onShow");i.each(b.menu(),function(a){a.selected(f&&f.__rlSettingsData&&a.route===f.__rlSettingsData.Route)})}c.windowResize()}))};H.prototype.onBuild=function(){i.each(V,function(a){a&&(a.__rlSettingsData&&!i.find(ia,function(b){return b&&b===a}))&&this.menu.push({route:a.__rlSettingsData.Route,
label:a.__rlSettingsData.Label,selected:d.observable(!1),disabled:!!i.find(ja,function(b){return b&&b===a})})},this)};H.prototype.routes=function(){var a=i.find(V,function(a){return a&&a.__rlSettingsData&&a.__rlSettingsData.IsDefault}),b=a?a.__rlSettingsData.Route:"general",a={subname:/^(.*)$/,normalize_:function(a,d){d.subname=c.isUnd(d.subname)?b:c.pString(d.subname);return[d.subname]}};return[["{subname}/",a],["{subname}",a],["",a]]};i.extend(ca.prototype,w.prototype);ca.prototype.onShow=function(){e.setTitle("")};
i.extend(da.prototype,H.prototype);da.prototype.onShow=function(){e.setTitle("")};i.extend(u.prototype,na.prototype);u.prototype.oSettings=null;u.prototype.oLink=null;u.prototype.download=function(a){I?this.iframe.attr("src",a):h.open(a)};u.prototype.link=function(){null===this.oLink&&(this.oLink=new o);return this.oLink};u.prototype.local=function(){null===this.oLocal&&(this.oLocal=new N);return this.oLocal};u.prototype.settingsGet=function(a){null===this.oSettings&&(this.oSettings=c.isNormal(U)?
U:{});return c.isUnd(this.oSettings[a])?null:this.oSettings[a]};u.prototype.settingsSet=function(a,b){null===this.oSettings&&(this.oSettings=c.isNormal(U)?U:{});this.oSettings[a]=b};u.prototype.setTitle=function(a){a=(0<a.length?a+" - ":"")+this.settingsGet("Title")||"";a!==h.document.title&&(h.document.title=a)};u.prototype.loginAndLogoutReload=function(a,b){var d=c.pString(this.settingsGet("CustomLogoutLink")),g=!!this.settingsGet("InIframe"),a=c.isUnd(a)?!1:!!a,b=c.isUnd(b)?!1:!!b;a&&(b&&h.close)&&
h.close();a&&""!==d&&h.location.href!==d?i.defer(function(){g&&h.parent?h.parent.location.href=d:h.location.href=d}):(s.routeOff(),s.setHash(e.link().root(),!0),s.routeOff(),i.defer(function(){g&&h.parent?h.parent.location.reload():h.location.reload()}))};u.prototype.getAutocomplete=function(a,b,c){c([],a)};u.prototype.bootstart=function(){c.initOnStartOrLangChange(function(){c.initNotificationLanguage()},null);i.delay(function(){c.windowResize()},1E3)};i.extend(v.prototype,u.prototype);v.prototype.oData=
null;v.prototype.oRemote=null;v.prototype.oCache=null;v.prototype.data=function(){null===this.oData&&(this.oData=new ba);return this.oData};v.prototype.remote=function(){null===this.oRemote&&(this.oRemote=new p);return this.oRemote};v.prototype.cache=function(){null===this.oCache&&(this.oCache=new qa);return this.oCache};v.prototype.reloadDomainList=function(){e.data().domainsLoading(!0);e.remote().domainList(function(a,b){e.data().domainsLoading(!1);if(g.StorageResultType.Success===a&&b&&b.Result){var c=
i.map(b.Result,function(a,b){return{name:b,disabled:d.observable(!a),deleteAccess:d.observable(!1)}},this);e.data().domains(c)}})};v.prototype.reloadPluginList=function(){e.data().pluginsLoading(!0);e.remote().pluginList(function(a,b){e.data().pluginsLoading(!1);if(g.StorageResultType.Success===a&&b&&b.Result){var c=i.map(b.Result,function(a){return{name:a.Name,disabled:d.observable(!a.Enabled),configured:d.observable(!!a.Configured)}},this);e.data().plugins(c)}})};v.prototype.reloadPackagesList=
function(){e.data().packagesLoading(!0);e.data().packagesReal(!0);e.remote().packagesList(function(a,b){e.data().packagesLoading(!1);if(g.StorageResultType.Success===a&&b&&b.Result){e.data().packagesReal(!!b.Result.Real);e.data().packagesMainUpdatable(!!b.Result.MainUpdatable);var f=[],h={};i.each(e.data().packages(),function(a){a&&a.loading()&&(h[a.file]=a)});c.isArray(b.Result.List)&&(f=i.map(b.Result.List,function(a){a.loading=d.observable(!c.isUnd(h[a.file]));return a},this));e.data().packages(f)}else e.data().packagesReal(!1)})};
v.prototype.reloadLicensing=function(a){a=c.isUnd(a)?!1:!!a;e.data().licensingProcess(!0);e.data().licenseError("");e.remote().licensing(function(a,d){e.data().licensingProcess(!1);g.StorageResultType.Success===a&&d&&d.Result&&c.isNormal(d.Result.Expired)?(e.data().licenseValid(!0),e.data().licenseExpired(c.pInt(d.Result.Expired)),e.data().licenseError(""),e.data().licensing(!0)):d&&d.ErrorCode&&-1<c.inArray(c.pInt(d.ErrorCode),[g.Notification.LicensingServerIsUnavailable,g.Notification.LicensingExpired])?
(e.data().licenseError(c.getNotification(c.pInt(d.ErrorCode))),e.data().licensing(!0)):g.StorageResultType.Abort===a?(e.data().licenseError(c.getNotification(g.Notification.LicensingServerIsUnavailable)),e.data().licensing(!0)):e.data().licensing(!1)},a)};v.prototype.bootstart=function(){u.prototype.bootstart.call(this);e.data().populateDataOnStart();s.hideLoading();this.settingsGet("Auth")?s.startScreens([da]):s.startScreens([ca]);h.SimplePace&&h.SimplePace.set(100)};e=new v;j(function(){h.setTimeout(function(){s.setBoot(e).bootstart()},
10);h.setInterval(function(){ga(!ga())},6E4);i.delay(function(){h.rainloopAppData={};h.rainloopI18N={}},100)});R.addClass(I?"mobile":"no-mobile");E.keydown(c.killCtrlAandS).keyup(c.killCtrlAandS);E.unload(function(){ea=!0});h.rl=h.rl||{};h.rl.addHook=n.addHook;h.rl.settingsGet=n.mainSettingsGet;h.rl.remoteRequest=n.remoteRequest;h.rl.pluginSettingsGet=n.settingsGet;h.rl.addSettingsViewModel=c.addSettingsViewModel;h.rl.createCommand=c.createCommand;h.rl.EmailModel=r;h.rl.Enums=g;h.__rl_script_count=
1+(h.__rl_script_count||0);h.SimplePace&&h.SimplePace.add(10);h.__rl_script_count=1+(h.__rl_script_count||0)})(window,jQuery,ko,crossroads,hasher,_);

View file

@ -1,377 +0,0 @@
(function(h,j,f,Wa,P,Z,sa,i){function B(){this.sBase="#/";this.sCdnStaticDomain=e.settingsGet("CdnStaticDomain");this.sVersion=e.settingsGet("Version");this.sSpecSuffix=e.settingsGet("AuthAccountHash")||"0";this.sServer="./?";this.sCdnStaticDomain=""===this.sCdnStaticDomain?this.sCdnStaticDomain:"/"===this.sCdnStaticDomain.substr(-1)?this.sCdnStaticDomain:this.sCdnStaticDomain+"/"}function q(a,b,d,l){this.oOptions=l=j.extend({DisableHtml:!1,onSwitch:!1,LangSwitcherConferm:"EDITOR_TEXT_SWITCHER_CONFIRM",
LangSwitcherTextLabel:"EDITOR_SWITCHER_TEXT_LABEL",LangSwitcherHtmlLabel:"EDITOR_SWITCHER_HTML_LABEL"},c.isUnd(l)?{}:l);this.bOnlyPlain=!!this.oOptions.DisableHtml;this.fOnSwitch=this.oOptions.onSwitch;this.textarea=j(a).empty().addClass("editorTextArea");this.htmlarea=j(b).empty().addClass("editorHtmlArea").prop("contentEditable","true");this.toolbar=j(d).empty().addClass("editorToolbar");q.htmlInitEditor.apply(this);q.htmlInitToolbar.apply(this);q.htmlAttachEditorEvents.apply(this);this.bOnlyPlain&&
this.toolbar.hide()}function K(a,b,d,l,e){this.list=a;this.selectedItem=b;this.selectedItem.extend({toggleSubscribe:[null,function(a){a&&a.selected(!1)},function(a){a&&a.selected(!0)}]});this.oContentScrollable=this.oContentVisible=null;this.sItemSelector=d;this.sItemSelectedSelector=l;this.sItemCheckedSelector=e;this.sLastUid="";this.oCallbacks={};this.iSelectTimer=0;this.bUseKeyboard=!0;this.emptyFunction=function(){};this.useItemSelectCallback=!0;this.throttleSelection=!1;this.selectedItem.subscribe(function(a){this.useItemSelectCallback&&
(this.throttleSelection?(this.throttleSelection=!1,this.selectItemCallbacksThrottle(a)):this.selectItemCallbacks(a))},this);var f=this,g=[],k=null;this.list.subscribe(function(){var a=this,b=this.list();c.isArray(b)&&i.each(b,function(b){b.checked()&&g.push(a.getItemUid(b));null===k&&b.selected()&&(k=a.getItemUid(b))})},this,"beforeChange");this.list.subscribe(function(a){this.useItemSelectCallback=!1;this.selectedItem(null);if(c.isArray(a)){var b=this,d=g.length;i.each(a,function(a){0<d&&-1<c.inArray(b.getItemUid(a),
g)&&(a.checked(!0),d--);null!==k&&k===b.getItemUid(a)&&(a.selected(!0),k=null,b.selectedItem(a))})}this.useItemSelectCallback=!0;g=[];k=null},this);this.list.setSelectedByUid=function(a){f.selectByUid(a,!1)};this.selectItemCallbacksThrottle=i.debounce(this.selectItemCallbacks,300)}function ta(){}function ua(){}function va(){var a=i.find([ua,ta],function(a){return a.supported()});a&&(this.oDriver=new a)}function Xa(){}function C(a,b){this.sPosition=c.pString(a);this.sTemplate=c.pString(b);this.viewModelName=
"";this.viewModelVisibility=f.observable(!1);"Popups"===this.sPosition&&(this.modalVisibility=f.observable(!1));this.viewModelDom=null}function J(a,b){this.sScreenName=a;this.aViewModels=c.isArray(b)?b:[]}function E(){this.sDefaultScreenName="";this.oScreens={};this.oCurrentScreen=this.oBoot=null;this.popupVisibility=f.observable(!1);this.popupVisibility.subscribe(function(a){e&&e.popupVisibility(a)})}function F(a,b){this.email=a||"";this.name=b||"";this.privateType=null;this.clearDuplicateName()}
function ka(){this.idContact=0;this.name=this.listName=this.imageHash="";this.emails=[];this.checked=f.observable(!1);this.selected=f.observable(!1);this.deleted=f.observable(!1)}function D(){this.fileName=this.mimeType="";this.estimatedSize=0;this.friendlySize="";this.isLinked=this.isInline=!1;this.mimeIndex=this.uid=this.folder=this.download=this.cidWithOutTags=this.cid=""}function M(a,b,d,l,e,s){this.id=a;this.isInline=c.isUnd(l)?!1:!!l;this.isLinked=c.isUnd(e)?!1:!!e;this.CID=c.isUnd(s)?"":s;
this.fromMessage=!1;this.fileName=f.observable(b);this.size=f.observable(c.isUnd(d)?null:d);this.tempName=f.observable("");this.progress=f.observable("");this.error=f.observable("");this.waiting=f.observable(!0);this.uploading=f.observable(!1);this.enabled=f.observable(!0);this.friendlySize=f.computed(function(){return null===this.size()?"":c.friendlySize(this.size())},this)}function m(){this.requestHash=this.uid=this.folderFullNameRaw="";this.subject=f.observable("");this.size=f.observable(0);this.dateTimeStampInUTC=
f.observable(0);this.priority=f.observable(g.MessagePriority.Normal);this.fromEmailString=f.observable("");this.toEmailsString=f.observable("");this.senderEmailsString=f.observable("");this.prefetched=!1;this.emails=[];this.from=[];this.to=[];this.cc=[];this.bcc=[];this.replyTo=[];this.newForAnimation=f.observable(!1);this.deleted=f.observable(!1);this.unseen=f.observable(!1);this.flagged=f.observable(!1);this.answered=f.observable(!1);this.forwarded=f.observable(!1);this.selected=f.observable(!1);
this.checked=f.observable(!1);this.hasAttachments=f.observable(!1);this.moment=f.observable(Z());this.fullFormatDateValue=f.computed(function(){return m.calculateFullFromatDateValue(this.dateTimeStampInUTC())},this);this.fullFormatDateValue=f.computed(function(){return m.calculateFullFromatDateValue(this.dateTimeStampInUTC())},this);this.momentDate=c.createMomentDate(this);this.momentShortDate=c.createMomentShortDate(this);this.dateTimeStampInUTC.subscribe(function(a){var b=Z().unix();this.moment(Z.unix(b<
a?b:a))},this);this.body=null;this.isHtml=f.observable(!1);this.hasImages=f.observable(!1);this.attachments=f.observableArray([]);this.priority=f.observable(g.MessagePriority.Normal);this.aDraftInfo=[];this.sReferences=this.sInReplyTo=this.sMessageId="";this.parentUid=f.observable(0);this.threads=f.observableArray([]);this.threadsLen=f.observable(0);this.hasUnseenSubMessage=f.observable(!1);this.hasFlaggedSubMessage=f.observable(!1);this.lastInCollapsedThread=f.observable(!1);this.lastInCollapsedThreadLoading=
f.observable(!1);this.threadsLenResult=f.computed(function(){var a=this.threadsLen();return 0===this.parentUid()&&0<a?a+1:""},this)}function G(){this.name=f.observable("");this.namespace=this.delimiter=this.fullNameHash=this.fullNameRaw=this.fullName="";this.deep=0;this.selectable=!1;this.existen=!0;this.isUnpaddigFolder=this.isGmailFolder=this.isNamespaceFolder=!1;this.type=f.observable(g.FolderType.User);this.selected=f.observable(!1);this.edited=f.observable(!1);this.collapsed=f.observable(!0);
this.subScribed=f.observable(!0);this.subFolders=f.observableArray([]);this.deleteAccess=f.observable(!1);this.actionBlink=f.observable(!1).extend({falseTimeout:1E3});this.nameForEdit=f.observable("");this.name.subscribe(function(a){this.nameForEdit(a)},this);this.edited.subscribe(function(a){a&&this.nameForEdit(this.name())},this);this.canBeEdited=f.computed(function(){return g.FolderType.User===this.type()},this);this.privateMessageCountAll=f.observable(0);this.privateMessageCountUnread=f.observable(0);
this.collapsedPrivate=f.observable(!0)}function La(a,b){this.email=a;this.deleteAccess=f.observable(!1);this.canBeDalete=f.observable(b)}function wa(){C.call(this,"Popups","PopupsFolderClear");this.selectedFolder=f.observable(null);this.clearingProcess=f.observable(!1);this.clearingError=f.observable("");this.folderFullNameForClear=f.computed(function(){var a=this.selectedFolder();return a?a.printableFullName():""},this);this.folderNameForClear=f.computed(function(){var a=this.selectedFolder();return a?
a.localName():""},this);this.dangerDescHtml=f.computed(function(){return c.i18n("POPUPS_CLEAR_FOLDER/DANGER_DESC_HTML_1",{FOLDER:this.folderNameForClear()})},this);this.clearCommand=c.createCommand(this,function(){var a=this,b=this.selectedFolder();b&&(e.data().message(null),e.data().messageList([]),this.clearingProcess(!0),e.cache().setFolderHash(b.fullNameRaw,""),e.remote().folderClear(function(b,l){a.clearingProcess(!1);g.StorageResultType.Success===b&&l&&l.Result?(e.reloadMessageList(!0),a.cancelCommand()):
l&&l.ErrorCode?a.clearingError(c.getNotification(l.ErrorCode)):a.clearingError(c.getNotification(g.Notification.MailServerError))},b.fullNameRaw))},function(){var a=this.selectedFolder();return!this.clearingProcess()&&null!==a})}function ba(){C.call(this,"Popups","PopupsFolderCreate");c.initOnStartOrLangChange(function(){this.sNoParentText=c.i18n("POPUPS_CREATE_FOLDER/SELECT_NO_PARENT")},this);this.folderName=f.observable("");this.focusTrigger=f.observable(!1);this.selectedParentValue=f.observable(t.Values.UnuseOptionValue);
this.parentFolderSelectList=f.computed(function(){var a=e.data(),b=[],d=null,l=a.folderList();b.push(["",this.sNoParentText]);""!==a.namespace&&(d=function(b){return a.namespace!==b.fullNameRaw.substr(0,a.namespace.length)});return e.folderListOptionsBuilder([],l,[],b,null,d,null,function(a){return a?a.isSystemFolder()?a.name()+" "+a.manageFolderSystemName():a.name():""})},this);this.createFolder=c.createCommand(this,function(){var a=e.data(),b=this.selectedParentValue();""===b&&1<a.namespace.length&&
(b=a.namespace.substr(0,a.namespace.length-1));a.foldersCreating(!0);e.remote().folderCreate(function(a,b){e.data().foldersCreating(!1);g.StorageResultType.Success===a&&b&&b.Result?e.folders(!1):e.data().foldersListError(b&&b.ErrorCode?c.getNotification(b.ErrorCode):c.i18n("NOTIFICATIONS/CANT_CREATE_FOLDER"))},this.folderName(),b);this.cancelCommand()},function(){return this.simpleFolderNameValidation(this.folderName())});this.defautOptionsAfterRender=c.defautOptionsAfterRender}function X(){C.call(this,
"Popups","PopupsFolderSystem");c.initOnStartOrLangChange(function(){this.sChooseOnText=c.i18n("POPUPS_SYSTEM_FOLDERS/SELECT_CHOOSE_ONE");this.sUnuseText=c.i18n("POPUPS_SYSTEM_FOLDERS/SELECT_UNUSE_NAME")},this);this.notification=f.observable("");this.folderSelectList=f.computed(function(){return e.folderListOptionsBuilder([],e.data().folderList(),e.data().folderListSystemNames(),[["",this.sChooseOnText],[t.Values.UnuseOptionValue,this.sUnuseText]])},this);var a=e.data(),b=this,d=null,l=null;this.sentFolder=
a.sentFolder;this.draftFolder=a.draftFolder;this.spamFolder=a.spamFolder;this.trashFolder=a.trashFolder;d=i.debounce(function(){e.settingsSet("SentFolder",b.sentFolder());e.settingsSet("DraftFolder",b.draftFolder());e.settingsSet("SpamFolder",b.spamFolder());e.settingsSet("TrashFolder",b.trashFolder());e.remote().saveSystemFolders(c.emptyFunction,{SentFolder:b.sentFolder(),DraftFolder:b.draftFolder(),SpamFolder:b.spamFolder(),TrashFolder:b.trashFolder()})},1E3);l=function(){e.settingsSet("SentFolder",
b.sentFolder());e.settingsSet("DraftFolder",b.draftFolder());e.settingsSet("SpamFolder",b.spamFolder());e.settingsSet("TrashFolder",b.trashFolder());d()};this.sentFolder.subscribe(l);this.draftFolder.subscribe(l);this.spamFolder.subscribe(l);this.trashFolder.subscribe(l);this.defautOptionsAfterRender=c.defautOptionsAfterRender}function y(){C.call(this,"Popups","PopupsCompose");this.aDraftInfo=this.oEditor=null;this.sInReplyTo="";this.bFromDraft=!1;this.sReferences="";this.bReloadFolder=!1;var a=this,
b=function(a){for(var b=0,d=a.length,c=[];b<d;b++)c.push(a[b].toLine(!1));return c.join(", ")},d=function(a){!1===this.showCcAndBcc()&&0<a.length&&this.showCcAndBcc(!0)};this.resizer=f.observable(!1).extend({throttle:50});this.to=f.observableArray([]);this.cc=f.observableArray([]);this.bcc=f.observableArray([]);this.subject=f.observable("");this.sendError=f.observable(!1);this.sendSuccessButSaveError=f.observable(!1);this.savedError=f.observable(!1);this.savedTime=f.observable(0);this.savedOrSendingText=
f.observable("");this.emptyToError=f.observable(!1);this.showCcAndBcc=f.observable(!1);this.cc.subscribe(d,this);this.bcc.subscribe(d,this);this.draftFolder=f.observable("");this.draftUid=f.observable("");this.draftID=f.observable("");this.sending=f.observable(!1);this.saving=f.observable(!1);this.attachments=f.observableArray([]);this.attachmentsInProcess=f.computed(function(){return i.filter(this.attachments(),function(a){return a&&""===a.tempName()})},this);this.attachmentsInReady=f.computed(function(){return i.filter(this.attachments(),
function(a){return a&&""!==a.tempName()})},this);this.attachments.subscribe(function(){this.triggerForResize()},this);this.isDraftFolderMessage=f.computed(function(){return""!==this.draftFolder()&&""!==this.draftUid()&&""!==this.draftID()},this);this.composeUploaderButton=f.observable(null);this.composeUploaderDropPlace=f.observable(null);this.dragAndDropEnabled=f.observable(!1);this.dragAndDropOver=f.observable(!1).extend({throttle:1});this.dragAndDropVisible=f.observable(!1).extend({throttle:1});
this.attacheMultipleAllowed=f.observable(!1);this.addAttachmentEnabled=f.observable(!1);this.composeEditorTextArea=f.observable(null);this.composeEditorHtmlArea=f.observable(null);this.composeEditorToolbar=f.observable(null);this.to.subscribe(function(a){this.emptyToError()&&0<a.length&&this.emptyToError(!1)},this);this.canBeSended=f.computed(function(){return!this.sending()&&!this.saving()&&0===this.attachmentsInProcess().length&&0<this.to().length},this);this.canBeSendedOrSaved=f.computed(function(){return!this.sending()&&
!this.saving()},this);this.deleteCommand=c.createCommand(this,function(){var a=null,b=this.draftFolder(),d=this.draftUid();this.bFromDraft&&(a=e.data().message())&&(b===a.folderFullNameRaw&&d===a.uid)&&e.data().message(null);e.data().currentFolderFullNameRaw()===this.draftFolder()&&i.each(e.data().messageList(),function(a){a&&(b===a.folderFullNameRaw&&d===a.uid)&&a.deleted(true)});e.data().messageListIsNotCompleted(!0);e.remote().messagesDelete(function(){e.cache().setFolderHash(b,"");e.reloadMessageList()},
this.draftFolder(),[this.draftUid()]);this.bReloadFolder=!1;r.hideScreenPopup(y)},function(){return this.isDraftFolderMessage()});this.sendMessageResponse=i.bind(this.sendMessageResponse,this);this.saveMessageResponse=i.bind(this.saveMessageResponse,this);this.sendCommand=c.createCommand(this,function(){var a=this.to(),d=e.data().sentFolder(),f=[];if(0===a.length)this.emptyToError(!0);else if(e.data().replySameFolder()&&c.isArray(this.aDraftInfo)&&(3===this.aDraftInfo.length&&c.isNormal(this.aDraftInfo[2])&&
0<this.aDraftInfo[2].length)&&(d=this.aDraftInfo[2]),""===d)r.showScreenPopup(X,[g.SetSystemFoldersNotification.Sent]);else{this.sendError(!1);this.sending(!0);this.bReloadFolder=!0;if(c.isArray(this.aDraftInfo)&&3===this.aDraftInfo.length&&(f=e.cache().getMessageFlagsFromCache(this.aDraftInfo[2],this.aDraftInfo[1])))"forward"===this.aDraftInfo[0]?f[3]=!0:f[2]=!0,e.cache().setMessageFlagsToCache(this.aDraftInfo[2],this.aDraftInfo[1],f),e.reloadFlagsCurrentMessageListAndMessageFromCache();d=t.Values.UnuseOptionValue===
d?"":d;e.cache().setFolderHash(this.draftFolder(),"");e.cache().setFolderHash(d,"");e.remote().sendMessage(this.sendMessageResponse,this.draftFolder(),this.draftUid(),this.draftID(),d,b(a),b(this.cc()),b(this.bcc()),this.subject(),this.oEditor.isHtml(),this.oEditor.getTextForRequest(),this.prepearAttachmentsForSendOrSave(),this.aDraftInfo,this.sInReplyTo,this.sReferences)}},this.canBeSendedOrSaved);this.saveCommand=c.createCommand(this,function(){e.data().draftFolderNotEnabled()?r.showScreenPopup(X,
[g.SetSystemFoldersNotification.Draft]):(this.savedError(!1),this.saving(!0),this.bReloadFolder=!0,e.cache().setFolderHash(e.data().draftFolder(),""),e.remote().saveMessage(this.saveMessageResponse,this.draftFolder(),this.draftUid(),this.draftID(),e.data().draftFolder(),b(this.to()),b(this.cc()),b(this.bcc()),this.subject(),this.oEditor.isHtml(),this.oEditor.getTextForRequest(),this.prepearAttachmentsForSendOrSave(),this.aDraftInfo,this.sInReplyTo,this.sReferences))},this.canBeSendedOrSaved);xa.subscribe(function(){this.modalVisibility()&&
(!e.data().draftFolderNotEnabled()&&!this.isEmptyForm(!1)&&!this.saving()&&!this.sending()&&!this.savedError())&&this.saveCommand()},this);c.initOnStartOrLangChange(null,this,function(){this.oEditor&&this.oEditor.initLanguage(c.i18n("EDITOR/TEXT_SWITCHER_CONFIRM"),c.i18n("EDITOR/TEXT_SWITCHER_PLAINT_TEXT"),c.i18n("EDITOR/TEXT_SWITCHER_RICH_FORMATTING"))});this.showCcAndBcc.subscribe(function(){this.triggerForResize()},this);this.dropboxEnabled=f.observable(e.settingsGet("DropboxApiKey")?!0:!1);this.dropboxCommand=
c.createCommand(this,function(){Dropbox.choose({success:function(b){b&&(b[0]&&b[0].link)&&a.addDropboxAttachment(b[0])},linkType:"direct",multiselect:!1});return!0},function(){return this.dropboxEnabled()});this.modalVisibility.subscribe(function(a){!a&&this.bReloadFolder&&(this.bReloadFolder=!1,e.reloadMessageList())},this);this.driveEnabled=f.observable(!1);this.driveCommand=c.createCommand(this,function(){return!0},function(){return this.driveEnabled()})}function L(){C.call(this,"Popups","PopupsContacts");
var a=this;this.imageUploader=f.observable(null);this.imageDom=f.observable(null);this.imageTrigger=f.observable(!1);this.search=f.observable("");this.contacts=f.observableArray([]);this.contacts.loading=f.observable(!1).extend({throttle:200});this.currentContact=f.observable(null);this.emptySelection=f.observable(!0);this.viewClearSearch=f.observable(!1);this.viewID=f.observable("");this.viewName=f.observable("");this.viewName.focused=f.observable(!1);this.viewEmail=f.observable("").validateEmail();
this.viewEmail.focused=f.observable(!1);this.viewImageUrl=f.observable(e.link().emptyContactPic());this.viewSaving=f.observable(!1);this.useCheckboxesInList=e.data().useCheckboxesInList;this.search.subscribe(function(){this.reloadContactList()},this);this.contacts.subscribe(function(){c.windowResize()},this);this.viewImageUrl.subscribe(function(a){this.imageDom().src=a},this);this.contactsChecked=f.computed(function(){return i.filter(this.contacts(),function(a){return a.checked()})},this);this.contactsCheckedOrSelected=
f.computed(function(){var a=this.contactsChecked(),d=this.currentContact();return i.union(a,d?[d]:[])},this);this.contactsCheckedOrSelectedUids=f.computed(function(){return i.map(this.contactsCheckedOrSelected(),function(a){return a.idContact})},this);this.newCommand=c.createCommand(this,function(){this.populateViewContact(null)});this.selector=new K(this.contacts,this.currentContact,".e-contact-item .actionHandle",".e-contact-item.selected",".e-contact-item .checkboxItem");this.selector.on("onItemSelect",
i.bind(function(a){this.populateViewContact(a?a:null)},this));this.selector.on("onItemGetUid",function(a){return a?a.generateUid():""});this.selector.on("onDelete",i.bind(function(){this.deleteCommand()},this));this.newCommand=c.createCommand(this,function(){this.populateViewContact(null);this.currentContact(null)});this.deleteCommand=c.createCommand(this,function(){this.deleteSelectedContacts()},function(){return 0<this.contactsCheckedOrSelected().length});this.newMessageCommand=c.createCommand(this,
function(){var a=this.contactsCheckedOrSelected(),d=[];c.isNonEmptyArray(a)&&(d=i.map(a,function(a){return a&&a.emails&&(a=new F(a.emails[0]||"",a.name),a.validate())?a:null}),d=i.compact(d));c.isNonEmptyArray(a)&&(r.hideScreenPopup(L),r.showScreenPopup(y,[g.ComposeType.Empty,null,d]))},function(){return 0<this.contactsCheckedOrSelected().length});this.clearCommand=c.createCommand(this,function(){this.search("")});this.saveCommand=c.createCommand(this,function(){var b=c.fakeMd5(),d=this.imageTrigger();
this.viewSaving(!0);e.remote().contactSave(function(l,f){a.viewSaving(!1);g.StorageResultType.Success===l&&(f&&f.Result&&f.Result.RequestUid===b&&0<c.pInt(f.Result.ResultID))&&(""===a.viewID()&&a.viewID(c.pInt(f.Result.ResultID)),a.reloadContactList(),d&&e.emailsPicsHashes())},b,this.viewID(),this.viewName(),this.viewEmail(),d?this.imageDom().src:"")},function(){var a=this.viewName(),d=this.viewEmail();return!this.viewSaving()&&(""!==a||""!==d)})}function ca(){C.call(this,"Popups","PopupsAdvancedSearch");
this.fromFocus=f.observable(!1);this.from=f.observable("");this.to=f.observable("");this.subject=f.observable("");this.text=f.observable("");this.selectedDateValue=f.observable(-1);this.hasAttachments=f.observable(!1);this.searchCommand=c.createCommand(this,function(){var a=this.buildSearchString();""!==a&&e.data().mainMessageListSearch(a);this.cancelCommand()})}function da(){C.call(this,"Popups","PopupsAddAccount");this.email=f.observable("");this.login=f.observable("");this.password=f.observable("");
this.emailError=f.observable(!1);this.loginError=f.observable(!1);this.passwordError=f.observable(!1);this.email.subscribe(function(){this.emailError(!1)},this);this.login.subscribe(function(){this.loginError(!1)},this);this.password.subscribe(function(){this.passwordError(!1)},this);this.allowCustomLogin=f.observable(!1);this.submitRequest=f.observable(!1);this.submitError=f.observable("");this.emailFocus=f.observable(!1);this.loginFocus=f.observable(!1);this.addAccountCommand=c.createCommand(this,
function(){this.emailError(""===c.trim(this.email()));this.passwordError(""===c.trim(this.password()));if(this.emailError()||this.passwordError())return!1;this.submitRequest(!0);e.remote().accountAdd(i.bind(function(a,b){this.submitRequest(!1);g.StorageResultType.Success===a&&b&&"AccountAdd"===b.Action?b.Result?(e.accounts(),this.cancelCommand()):b.ErrorCode&&this.submitError(c.getNotification(b.ErrorCode)):this.submitError(c.getNotification(g.Notification.UnknownError))},this),this.email(),this.login(),
this.password());return!0},function(){return!this.submitRequest()});this.loginFocus.subscribe(function(a){a&&(""===this.login()&&""!==this.email())&&this.login(this.email())},this)}function la(){C.call(this,"Right","Login");this.email=f.observable("");this.login=f.observable("");this.password=f.observable("");this.signMe=f.observable(!1);this.logoMain=f.observable("RainLoop");this.emailError=f.observable(!1);this.loginError=f.observable(!1);this.passwordError=f.observable(!1);this.emailFocus=f.observable(!1);
this.loginFocus=f.observable(!1);this.submitFocus=f.observable(!1);this.email.subscribe(function(){this.emailError(!1)},this);this.login.subscribe(function(){this.loginError(!1)},this);this.password.subscribe(function(){this.passwordError(!1)},this);this.allowCustomLogin=f.observable(!1);this.submitRequest=f.observable(!1);this.submitError=f.observable("");this.signMeType=f.observable(g.LoginSignMeType.Unused);this.signMeType.subscribe(function(a){this.signMe(g.LoginSignMeType.DefaultOn===a)},this);
this.signMeVisibility=f.computed(function(){return g.LoginSignMeType.Unused!==this.signMeType()},this);this.submitCommand=c.createCommand(this,function(){this.emailError(""===c.trim(this.email()));this.passwordError(""===c.trim(this.password()));if(this.emailError()||this.passwordError())return!1;this.submitRequest(!0);e.remote().login(i.bind(function(a,b){g.StorageResultType.Success===a&&b&&"Login"===b.Action?b.Result?e.loginAndLogoutReload():b.ErrorCode?(this.submitRequest(!1),this.submitError(c.getNotification(b.ErrorCode))):
this.submitRequest(!1):(this.submitRequest(!1),this.submitError(c.getNotification(g.Notification.UnknownError)))},this),this.email(),this.login(),this.password(),!!this.signMe());return!0},function(){return!this.submitRequest()});this.facebookLoginEnabled=f.observable(!1);this.facebookCommand=c.createCommand(this,function(){h.open(e.link().socialFacebook(),"Facebook","left=200,top=100,width=650,height=335,menubar=no,status=no,resizable=yes,scrollbars=yes");return!0},function(){return!this.submitRequest()&&
this.facebookLoginEnabled()});this.googleLoginEnabled=f.observable(!1);this.googleCommand=c.createCommand(this,function(){h.open(e.link().socialGoogle(),"Google","left=200,top=100,width=650,height=335,menubar=no,status=no,resizable=yes,scrollbars=yes");return!0},function(){return!this.submitRequest()&&this.googleLoginEnabled()});this.twitterLoginEnabled=f.observable(!1);this.twitterCommand=c.createCommand(this,function(){h.open(e.link().socialTwitter(),"Twitter","left=200,top=100,width=650,height=335,menubar=no,status=no,resizable=yes,scrollbars=yes");
return!0},function(){return!this.submitRequest()&&this.twitterLoginEnabled()});this.loginFocus.subscribe(function(a){a&&(""===this.login()&&""!==this.email())&&this.login(this.email())},this)}function Q(){C.call(this,"Right","SystemDropDown");var a=e.data();this.accounts=a.accounts;this.accountEmail=a.accountEmail;this.accountsLoading=a.accountsLoading;this.allowAddAccount=e.settingsGet("AllowAdditionalAccounts");this.loading=f.computed(function(){return this.accountsLoading()},this);this.accountClick=
i.bind(this.accountClick,this)}function Ya(){Q.call(this)}function Za(){Q.call(this)}function ea(){C.call(this,"Left","MailFolderList");this.folderList=e.data().folderList;this.folderListSystem=e.data().folderListSystem;this.allowContacts=!!e.settingsGet("ContactsIsSupported")}function z(){C.call(this,"Right","MailMessageList");this.sLastUid=null;this.emptySubjectValue="";var a=e.data();this.popupVisibility=e.popupVisibility;this.messageList=a.messageList;this.currentMessage=a.currentMessage;this.isMessageSelected=
a.isMessageSelected;this.messageListSearch=a.messageListSearch;this.messageListError=a.messageListError;this.folderMenuForMove=a.folderMenuForMove;this.useCheckboxesInList=a.useCheckboxesInList;this.mainMessageListSearch=a.mainMessageListSearch;this.messageListEndFolder=a.messageListEndFolder;this.messageListChecked=a.messageListChecked;this.messageListCheckedOrSelected=a.messageListCheckedOrSelected;this.messageListCheckedOrSelectedUidsWithSubMails=a.messageListCheckedOrSelectedUidsWithSubMails;
this.messageListCompleteLoadingThrottle=a.messageListCompleteLoadingThrottle;c.initOnStartOrLangChange(function(){this.emptySubjectValue=c.i18n("MESSAGE_LIST/EMPTY_SUBJECT_TEXT")},this);this.userQuota=a.userQuota;this.userUsageSize=a.userUsageSize;this.userUsageProc=a.userUsageProc;this.dragOver=f.observable(!1).extend({throttle:1});this.dragOverEnter=f.observable(!1).extend({throttle:1});this.dragOverArea=f.observable(null);this.dragOverBodyArea=f.observable(null);this.messageListItemTemplate=f.computed(function(){return a.usePreviewPane()?
"MailMessageListItem":"MailMessageListItemNoPreviewPane"});this.messageListSearchDesc=f.computed(function(){var b=a.messageListEndSearch();return""===b?"":c.i18n("MESSAGE_LIST/SEARCH_RESULT_FOR",{SEARCH:b})});this.messageListPagenator=f.computed(function(){var b=0,d=0,l=2,e=[],f=a.messageListPage(),g=a.messageListPageCount(),k=function(a,b,d){a={current:a===f,name:c.isUnd(d)?a.toString():d.toString(),custom:c.isUnd(d)?!1:!0,title:c.isUnd(d)?"":a.toString(),value:a.toString()};c.isUnd(b)||b?e.push(a):
e.unshift(a)};if(1<g||0<g&&g<f){if(g<f)k(g),d=b=g;else{if(3>=f||g-2<=f)l+=2;k(f);d=b=f}for(;0<l;)if(b-=1,d+=1,0<b&&(k(b,!1),l--),g>=d)k(d,!0),l--;else if(0>=b)break;3===b?k(2,!1):3<b&&k(Math.round((b-1)/2),!1,"...");g-2===d?k(g-1,!0):g-2>d&&k(Math.round((g+d)/2),!0,"...");1<b&&k(1,!1);g>d&&k(g,!0)}return e},this);this.checkAll=f.computed({read:function(){return 0<e.data().messageListCheckedOrSelected().length},write:function(a){a=!!a;i.each(e.data().messageList(),function(d){d.checked(a)});a||e.data().message(null)}});
this.inputMessageListSearchFocus=f.observable(!1);this.sLastSearchValue="";this.inputProxyMessageListSearch=f.computed({read:this.mainMessageListSearch,write:function(a){this.sLastSearchValue=a},owner:this});this.isIncompleteChecked=f.computed(function(){var a=e.data().messageList().length,d=e.data().messageListCheckedOrSelected().length;return 0<a&&0<d&&a>d},this);this.hasMessages=f.computed(function(){return 0<this.messageList().length},this);this.hasCheckedLines=f.computed(function(){return 0<
this.messageListChecked().length},this);this.hasCheckedOrSelectedLines=f.computed(function(){return 0<this.messageListCheckedOrSelected().length},this);this.isSpamFolder=f.computed(function(){return e.data().spamFolder()===this.messageListEndFolder()},this);this.isTrashFolder=f.computed(function(){return e.data().trashFolder()===this.messageListEndFolder()},this);this.canBeMoved=this.hasCheckedOrSelectedLines;this.clearCommand=c.createCommand(this,function(){r.showScreenPopup(wa,[e.data().currentFolder()])});
this.multyForwardCommand=c.createCommand(this,function(){r.showScreenPopup(y,[g.ComposeType.ForwardAsAttachment,e.data().messageListCheckedOrSelected()])},this.canBeMoved);this.deleteWithoutMoveCommand=c.createCommand(this,function(){this.deleteSelectedMessageFromCurrentFolder(g.FolderType.Trash,!1)},this.canBeMoved);this.deleteCommand=c.createCommand(this,function(){this.deleteSelectedMessageFromCurrentFolder(g.FolderType.Trash,!0)},this.canBeMoved);this.spamCommand=c.createCommand(this,function(){this.deleteSelectedMessageFromCurrentFolder(g.FolderType.Spam,
!0)},this.canBeMoved);this.moveCommand=c.createCommand(this,c.emptyFunction,this.canBeMoved);this.setCommand=c.createCommand(this,c.emptyFunction,this.hasCheckedLines);this.checkCommand=c.createCommand(this,c.emptyFunction,this.hasCheckedLines);this.reloadCommand=c.createCommand(this,function(){e.data().messageListCompleteLoadingThrottle()||e.reloadMessageList(!1,!0)});this.quotaTooltip=i.bind(this.quotaTooltip,this);this.selector=new K(this.messageList,this.currentMessage,".messageListItem .actionHandle",
".messageListItem.selected",".messageListItem .checkboxMessage");this.selector.on("onItemSelect",i.bind(function(b){b?(a.message(a.staticMessageList.populateByMessageListItem(b)),this.populateMessageBody(a.message())):a.message(null)},this));this.selector.on("onItemGetUid",function(a){return a?a.generateUid():""});this.selector.on("onDelete",i.bind(function(){0<e.data().messageListCheckedOrSelected().length&&this.deleteCommand()},this))}function H(){C.call(this,"Right","MailMessageView");var a="",
b=e.data(),d=this,l=function(a){return c.createCommand(d,function(){this.replyOrforward(a)},d.canBeRepliedOrForwarded)};this.oMessageScrollerDom=null;this.message=b.message;this.messageLoading=b.messageLoading;this.messageLoadingThrottle=b.messageLoadingThrottle;this.messagesBodiesDom=b.messagesBodiesDom;this.useThreads=b.useThreads;this.replySameFolder=b.replySameFolder;this.usePreviewPane=b.usePreviewPane;this.isMessageSelected=b.isMessageSelected;this.messageActiveDom=b.messageActiveDom;this.messageError=
b.messageError;this.fullScreenMode=b.messageFullScreenMode;this.showFullInfo=f.observable(!1);this.canBeRepliedOrForwarded=this.messageVisibility=f.computed(function(){return!this.messageLoadingThrottle()&&!!this.message()},this);this.closeMessage=c.createCommand(this,function(){b.message(null)});this.replyCommand=l(g.ComposeType.Reply);this.replyAllCommand=l(g.ComposeType.ReplyAll);this.forwardCommand=l(g.ComposeType.Forward);this.forwardAsAttachmentCommand=l(g.ComposeType.ForwardAsAttachment);this.messageVisibilityCommand=
c.createCommand(this,c.emptyFunction,this.messageVisibility);this.viewSubject=f.observable("");this.viewFromShort=f.observable("");this.viewToShort=f.observable("");this.viewFrom=f.observable("");this.viewTo=f.observable("");this.viewCc=f.observable("");this.viewBcc=f.observable("");this.viewDate=f.observable("");this.viewMoment=f.observable("");this.viewLineAsCcc=f.observable("");this.viewHasImages=f.observable(!1);this.viewHasVisibleAttachments=f.observable(!1);this.viewAttachments=f.observableArray([]);
this.viewIsHtml=f.observable(!1);this.viewViewLink=f.observable("");this.viewDownloadLink=f.observable("");this.viewUserPic=f.observable(t.DataImages.UserDotPic);this.viewUserPicVisible=f.observable(!1);this.message.subscribe(function(b){this.messageActiveDom(null);b&&(this.viewSubject(b.subject()),this.viewFromShort(b.fromToLine(!0,!0)),this.viewToShort(b.toToLine(!0,!0)),this.viewFrom(b.fromToLine(!1)),this.viewTo(b.toToLine(!1)),this.viewCc(b.ccToLine(!1)),this.viewBcc(b.bccToLine(!1)),this.viewDate(b.fullFormatDateValue()),
this.viewMoment(b.momentDate()),this.viewLineAsCcc(b.lineAsCcc()),this.viewHasImages(b.hasImages()),this.viewHasVisibleAttachments(b.hasVisibleAttachments()),this.viewAttachments(b.attachments()),this.viewIsHtml(b.isHtml()),this.viewViewLink(b.viewLink()),this.viewDownloadLink(b.downloadLink()),a=e.cache().getUserPic(b.fromAsSingleEmail()),a!==this.viewUserPic()&&(this.viewUserPicVisible(!1),this.viewUserPic(t.DataImages.UserDotPic),""!==a&&(this.viewUserPicVisible(!0),this.viewUserPic(a))))},this);
this.fullScreenMode.subscribe(function(a){a?Y.addClass("rl-message-fullscreen"):Y.removeClass("rl-message-fullscreen")});this.messageActiveDom.subscribe(function(){this.scrollMessageToTop();c.windowResize()},this)}function ya(a){C.call(this,"Left","SettingsMenu");this.menu=a.menu}function za(){C.call(this,"Right","SettingsPane")}function Ma(){var a=e.data();this.mainLanguage=a.mainLanguage;this.mainMessagesPerPage=a.mainMessagesPerPage;this.editorDefaultType=a.editorDefaultType;this.showImages=a.showImages;
this.showAnimation=a.showAnimation;this.useDesktopNotifications=a.useDesktopNotifications;this.useThreads=a.useThreads;this.replySameFolder=a.replySameFolder;this.usePreviewPane=a.usePreviewPane;this.useCheckboxesInList=a.useCheckboxesInList;this.languagesOptions=f.computed(function(){return i.map(a.languages(),function(a){return{optValue:a,optText:c.convertLangName(a)}})});this.isDesctopNotificationsSupported=f.computed(function(){return g.DesctopNotifications.NotSupported!==a.desktopNotificationsPermisions()});
this.isDesctopNotificationsDenied=f.computed(function(){return g.DesctopNotifications.NotSupported===a.desktopNotificationsPermisions()||g.DesctopNotifications.Denied===a.desktopNotificationsPermisions()});this.languageTrigger=f.observable(g.SaveSettingsStep.Idle).extend({throttle:100});this.mppTrigger=f.observable(g.SaveSettingsStep.Idle)}function $a(){var a=e.data();this.displayName=a.displayName;this.replyTo=a.replyTo;this.signature=a.signature;this.nameTrigger=f.observable(g.SaveSettingsStep.Idle);
this.replyTrigger=f.observable(g.SaveSettingsStep.Idle);this.signatureTrigger=f.observable(g.SaveSettingsStep.Idle)}function ma(){this.accounts=e.data().accounts;this.processText=f.computed(function(){return e.data().accountsLoading()?c.i18n("SETTINGS_ACCOUNTS/LOADING_PROCESS"):""},this);this.visibility=f.computed(function(){return""===this.processText()?"hidden":"visible"},this);this.accountForDeletion=f.observable(null).extend({falseTimeout:3E3}).extend({toggleSubscribe:[this,function(a){a&&a.deleteAccess(!1)},
function(a){a&&a.deleteAccess(!0)}]})}function Na(){var a=e.data();this.googleEnable=a.googleEnable;this.googleActions=a.googleActions;this.googleLoggined=a.googleLoggined;this.googleUserName=a.googleUserName;this.facebookEnable=a.facebookEnable;this.facebookActions=a.facebookActions;this.facebookLoggined=a.facebookLoggined;this.facebookUserName=a.facebookUserName;this.twitterEnable=a.twitterEnable;this.twitterActions=a.twitterActions;this.twitterLoggined=a.twitterLoggined;this.twitterUserName=a.twitterUserName;
this.connectGoogle=c.createCommand(this,function(){this.googleLoggined()||e.googleConnect()},function(){return!this.googleLoggined()&&!this.googleActions()});this.disconnectGoogle=c.createCommand(this,function(){e.googleDisconnect()});this.connectFacebook=c.createCommand(this,function(){this.facebookLoggined()||e.facebookConnect()},function(){return!this.facebookLoggined()&&!this.facebookActions()});this.disconnectFacebook=c.createCommand(this,function(){e.facebookDisconnect()});this.connectTwitter=
c.createCommand(this,function(){this.twitterLoggined()||e.twitterConnect()},function(){return!this.twitterLoggined()&&!this.twitterActions()});this.disconnectTwitter=c.createCommand(this,function(){e.twitterDisconnect()})}function na(){this.changeProcess=f.observable(!1);this.passwordUpdateError=f.observable(!1);this.passwordUpdateSuccess=f.observable(!1);this.currentPassword=f.observable("");this.newPassword=f.observable("");this.currentPassword.subscribe(function(){this.passwordUpdateError(!1);
this.passwordUpdateSuccess(!1)},this);this.newPassword.subscribe(function(){this.passwordUpdateError(!1);this.passwordUpdateSuccess(!1)},this);this.saveNewPasswordCommand=c.createCommand(this,function(){this.changeProcess(!0);this.passwordUpdateError(!1);this.passwordUpdateSuccess(!1);e.remote().changePassword(this.onChangePasswordResponse,this.currentPassword(),this.newPassword())},function(){return!this.changeProcess()&&""!==this.currentPassword()&&""!==this.newPassword()});this.onChangePasswordResponse=
i.bind(this.onChangePasswordResponse,this)}function R(){var a=e.data();this.ignoreFolderSubscribe=a.ignoreFolderSubscribe;this.foldersListError=a.foldersListError;this.folderList=a.folderList;this.processText=f.computed(function(){var a=e.data(),d=a.foldersLoading(),l=a.foldersCreating(),f=a.foldersDeleting(),a=a.foldersRenaming();return l?c.i18n("SETTINGS_FOLDERS/CREATING_PROCESS"):f?c.i18n("SETTINGS_FOLDERS/DELETING_PROCESS"):a?c.i18n("SETTINGS_FOLDERS/RENAMING_PROCESS"):d?c.i18n("SETTINGS_FOLDERS/LOADING_PROCESS"):
""},this);this.visibility=f.computed(function(){return""===this.processText()?"hidden":"visible"},this);this.folderForDeletion=f.observable(null).extend({falseTimeout:3E3}).extend({toggleSubscribe:[this,function(a){a&&a.deleteAccess(!1)},function(a){a&&a.deleteAccess(!0)}]});this.folderForEdit=f.observable(null).extend({toggleSubscribe:[this,function(a){a&&a.edited(!1)},function(a){a&&a.canBeEdited()&&a.edited(!0)}]})}function Aa(){var a=this;this.mainTheme=e.data().mainTheme;this.customThemeType=
f.observable(e.settingsGet("CustomThemeType"));this.customThemeImg=f.observable(e.settingsGet("CustomThemeImg"));this.themesObjects=f.observableArray([]);this.customThemeUploaderProgress=f.observable(!1);this.customThemeUploaderButton=f.observable(null);this.showCustomThemeConfig=f.computed(function(){return"Custom"===this.mainTheme()},this);this.showCustomThemeConfig.subscribe(function(){c.windowResize()});this.themeTrigger=f.observable(g.SaveSettingsStep.Idle).extend({throttle:100});this.oLastAjax=
null;this.iTimer=0;e.data().theme.subscribe(function(b){i.each(this.themesObjects(),function(a){a.selected(b===a.name)});var d=j("#rlThemeLink"),l=j("#rlThemeStyle"),f=d.attr("href");f||(f=l.attr("data-href"));f&&(f=f.toString().replace(/\/-\/[^\/]+\/\-\//,"/-/"+b+"/-/"),f=f.toString().replace(/\/Css\/[^\/]+\/User\//,"/Css/"+("Custom"===b&&h.__rlah?h.__rlah()||"0":"0")+"/User/"),"Json/"!==f.substring(f.length-5,f.length)&&(f+="Json/"),h.clearTimeout(a.iTimer),a.themeTrigger(g.SaveSettingsStep.Animate),
this.oLastAjax&&this.oLastAjax.abort&&this.oLastAjax.abort(),this.oLastAjax=j.ajax({url:f,dataType:"json"}).done(function(b){if(b&&c.isArray(b)&&2===b.length){if(d&&d[0]&&(!l||!l[0]))l=j('<style id="rlThemeStyle"></style>'),d.after(l),d.remove();l&&l[0]&&l.attr("data-href",f).attr("data-theme",b[0]).text(b[1]);a.themeTrigger(g.SaveSettingsStep.TrueResult)}}).always(function(){a.iTimer=h.setTimeout(function(){a.themeTrigger(g.SaveSettingsStep.Idle)},1E3);a.oLastAjax=null}));e.remote().saveSettings(null,
{Theme:b})},this)}function Oa(){c.initDataConstructorBySettings(this)}function S(){c.initDataConstructorBySettings(this);var a=function(a){return function(){var b=e.cache().getFolderFromCacheList(a());b&&b.type(g.FolderType.User)}},b=function(a){return function(b){(b=e.cache().getFolderFromCacheList(b))&&b.type(a)}};this.devPassword=this.devLogin=this.devEmail="";this.accountEmail=f.observable("");this.accountLogin=f.observable("");this.projectHash=f.observable("");this.threading=!1;this.lastFoldersHash=
"";this.remoteChangePassword=this.remoteSuggestions=!1;this.sentFolder=f.observable("");this.draftFolder=f.observable("");this.spamFolder=f.observable("");this.trashFolder=f.observable("");this.sentFolder.subscribe(a(this.sentFolder),this,"beforeChange");this.draftFolder.subscribe(a(this.draftFolder),this,"beforeChange");this.spamFolder.subscribe(a(this.spamFolder),this,"beforeChange");this.trashFolder.subscribe(a(this.trashFolder),this,"beforeChange");this.sentFolder.subscribe(b(g.FolderType.SentItems),
this);this.draftFolder.subscribe(b(g.FolderType.Draft),this);this.spamFolder.subscribe(b(g.FolderType.Spam),this);this.trashFolder.subscribe(b(g.FolderType.Trash),this);this.draftFolderNotEnabled=f.computed(function(){return""===this.draftFolder()||t.Values.UnuseOptionValue===this.draftFolder()},this);this.displayName=f.observable("");this.signature=f.observable("");this.replyTo=f.observable("");this.accounts=f.observableArray([]);this.accountsLoading=f.observable(!1);this.namespace="";this.folderList=
f.observableArray([]);this.foldersListError=f.observable("");this.foldersLoading=f.observable(!1);this.foldersCreating=f.observable(!1);this.foldersDeleting=f.observable(!1);this.foldersRenaming=f.observable(!1);this.currentFolder=f.observable(null).extend({toggleSubscribe:[null,function(a){a&&a.selected(!1)},function(a){a&&a.selected(!0)}]});this.currentFolderFullNameRaw=f.computed(function(){return this.currentFolder()?this.currentFolder().fullNameRaw:""},this);this.currentFolderFullName=f.computed(function(){return this.currentFolder()?
this.currentFolder().fullName:""},this);this.currentFolderFullNameHash=f.computed(function(){return this.currentFolder()?this.currentFolder().fullNameHash:""},this);this.currentFolderName=f.computed(function(){return this.currentFolder()?this.currentFolder().name():""},this);this.folderListSystemNames=f.computed(function(){var a=["INBOX"],b=this.folderList(),e=this.sentFolder(),f=this.draftFolder(),g=this.spamFolder(),k=this.trashFolder();c.isArray(b)&&0<b.length&&(""!==e&&t.Values.UnuseOptionValue!==
e&&a.push(e),""!==f&&t.Values.UnuseOptionValue!==f&&a.push(f),""!==g&&t.Values.UnuseOptionValue!==g&&a.push(g),""!==k&&t.Values.UnuseOptionValue!==k&&a.push(k));return a},this);this.folderListSystem=f.computed(function(){return i.compact(i.map(this.folderListSystemNames(),function(a){return e.cache().getFolderFromCacheList(a)}))},this);this.folderMenuForMove=f.computed(function(){return e.folderListOptionsBuilder(this.folderListSystem(),this.folderList(),[this.currentFolderFullNameRaw()],null,null,
null,null,function(a){return a?a.localName():""})},this);this.staticMessageList=[];this.messageList=f.observableArray([]);this.messageListCount=f.observable(0);this.messageListSearch=f.observable("");this.messageListPage=f.observable(1);this.messageListThreadFolder=f.observable("");this.messageListThreadUids=f.observableArray([]);this.messageListThreadFolder.subscribe(function(){this.messageListThreadUids([])},this);this.messageListEndSearch=f.observable("");this.messageListEndFolder=f.observable("");
this.messageListPageCount=f.computed(function(){var a=Math.ceil(this.messageListCount()/this.messagesPerPage());return 0===a?1:a},this);this.mainMessageListSearch=f.computed({read:this.messageListSearch,write:function(a){r.setHash(e.link().mailBox(this.currentFolderFullNameHash(),1,c.trim(a.toString())))},owner:this});this.messageListError=f.observable("");this.messageListLoading=f.observable(!1);this.messageListIsNotCompleted=f.observable(!1);this.messageListCompleteLoadingThrottle=f.observable(!1).extend({throttle:200});
this.messageListCompleteLoading=f.computed(function(){var a=this.messageListLoading(),b=this.messageListIsNotCompleted();return a||b},this);this.messageListCompleteLoading.subscribe(function(a){this.messageListCompleteLoadingThrottle(a)},this);this.messageList.subscribe(i.debounce(function(a){i.each(a,function(a){a.newForAnimation()&&a.newForAnimation(!1)})},500));this.staticMessageList=new m;this.message=f.observable(null);this.messageLoading=f.observable(!1);this.messageLoadingThrottle=f.observable(!1).extend({throttle:50});
this.messageLoading.subscribe(function(a){this.messageLoadingThrottle(a)},this);this.messageFullScreenMode=f.observable(!1);this.messageError=f.observable("");this.messagesBodiesDom=f.observable(null);this.messagesBodiesDom.subscribe(function(a){a&&!(a instanceof jQuery)&&this.messagesBodiesDom(j(a))},this);this.messageActiveDom=f.observable(null);this.isMessageSelected=f.computed(function(){return null!==this.message()},this);this.currentMessage=f.observable(null);this.message.subscribe(function(a){null===
a&&this.currentMessage(null)},this);this.messageListChecked=f.computed(function(){return i.filter(this.messageList(),function(a){return a.checked()})},this);this.messageListCheckedOrSelected=f.computed(function(){var a=this.messageListChecked(),b=this.currentMessage();return i.union(a,b?[b]:[])},this);this.messageListCheckedUids=f.computed(function(){var a=[];i.each(this.messageListChecked(),function(b){b&&(a.push(b.uid),0<b.threadsLen()&&(0===b.parentUid()&&b.lastInCollapsedThread())&&(a=i.union(a,
b.threads())))});return a},this);this.messageListCheckedOrSelectedUidsWithSubMails=f.computed(function(){var a=[];i.each(this.messageListCheckedOrSelected(),function(b){b&&(a.push(b.uid),0<b.threadsLen()&&(0===b.parentUid()&&b.lastInCollapsedThread())&&(a=i.union(a,b.threads())))});return a},this);this.userQuota=f.observable(0);this.userUsageSize=f.observable(0);this.userUsageProc=f.computed(function(){var a=this.userQuota(),b=this.userUsageSize();return 0<a?Math.ceil(100*(b/a)):0},this);this.useKeyboardShortcuts=
f.observable(!0);this.googleActions=f.observable(!1);this.googleLoggined=f.observable(!1);this.googleUserName=f.observable("");this.facebookActions=f.observable(!1);this.facebookLoggined=f.observable(!1);this.facebookUserName=f.observable("");this.twitterActions=f.observable(!1);this.twitterLoggined=f.observable(!1);this.twitterUserName=f.observable("");this.customThemeType=f.observable(g.CustomThemeType.Light)}function aa(){this.oRequests={}}function p(){this.oRequests={};this.oRequests={}}function T(){this.oEmailsPicsHashes=
{};this.oServices={}}function v(){T.call(this);this.oFoldersCache={};this.oFoldersNamesCache={};this.oFolderHashCache={};this.oFolderUidNextCache={};this.oMessageListHashCache={};this.oMessageFlagsCache={};this.oNewMessage={};this.oRequestedMessage={}}function fa(a){J.call(this,"settings",a);this.menu=f.observableArray([]);this.oCurrentSubScreen=null}function Ba(){J.call(this,"login",[la])}function U(){J.call(this,"mailbox",[Ya,ea,z,H]);this.oLastRoute={};var a=e.data();this.mailBoxScreenVisibily=
f.observable(!1);this.resizeTrigger=f.computed(function(){var b=this.mailBoxScreenVisibily(),d=a.messageFullScreenMode();return a.usePreviewPane()&&!d&&b?!0:!1},this)}function Pa(){fa.call(this,[Za,ya,za]);c.initOnStartOrLangChange(function(){this.sSettingsTitle=c.i18n("TITLES/SETTINGS")},this,function(){e.setTitle(this.sSettingsTitle)})}function I(){this.oLocal=this.oLink=this.oPlugins=this.oSettings=null;this.isLocalAutocomplete=!0;this.popupVisibility=f.observable(!1);this.iframe=j('<iframe style="display:none" src="javascript:;" />').appendTo("body");
N.on("error",function(a){e&&(a&&a.originalEvent&&a.originalEvent.message&&-1===c.inArray(a.originalEvent.message,["Uncaught Error: Error calling method on NPObject."]))&&e.remote().jsError(c.emptyFunction,a.originalEvent.message,a.originalEvent.filename,a.originalEvent.lineno,h.__rl_script_count||0,location&&location.toString?location.toString():"",Y.attr("class"))})}function A(){I.call(this);this.oCache=this.oRemote=this.oData=null;this.iSuggestionsLimit=c.pInt(this.settingsGet("SuggestionsLimit"));
this.iSuggestionsLimit=0===this.iSuggestionsLimit?20:this.iSuggestionsLimit;this.quotaDebounce=i.debounce(this.quota,3E4)}var t={},g={},u={},c={},x={},ga={},Ca,Qa,oa,Ra,ab,ha,xa=f.observable(!0),ia=f.observable(!0),r=null,Da=h.rainloopAppData||{},Sa=h.rainloopI18N||{},Y=j("html"),N=j(h),Ea=j(h.document),Fa=[],Ta=[],Ua=[],ja=h.Notification&&h.Notification.requestPermission?h.Notification:null,e=null;Ca=0;Qa=!1;oa=(navigator.userAgent||"").toLowerCase();Ra=-1<oa.indexOf("iphone")||-1<oa.indexOf("ipod")||
-1<oa.indexOf("ipad");ab=-1<oa.indexOf("android");ha=Ra||ab;t.Defaults={};t.Values={};t.DataImages={};t.Defaults.MessagesPerPage=25;t.Defaults.DefaultAjaxTimeout=2E4;t.Defaults.SearchAjaxTimeout=12E4;t.Defaults.SendMessageAjaxTimeout=2E5;t.Defaults.SaveMessageAjaxTimeout=2E5;t.Values.UnuseOptionValue="__UNUSE__";t.Values.GmailFolderName="[Gmail]";t.Values.ClientSideCookieIndexName="rlcsc";t.Values.ImapDefaulPort=143;t.Values.ImapDefaulSecurePort=993;t.Values.SmtpDefaulPort=25;t.Values.SmtpDefaulSecurePort=
465;t.DataImages.UserDotPic="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQIW2P8DwQACgAD/il4QJ8AAAAASUVORK5CYII=";t.DataImages.TranspPic="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQIW2NkAAIAAAoAAggA9GkAAAAASUVORK5CYII=";g.StorageResultType={Success:"success",Abort:"abort",Error:"error",Unload:"unload"};g.State={Empty:10,Login:20,Auth:30};g.StateType={Webmail:0,Admin:1};g.FolderType={Inbox:10,SentItems:11,Draft:12,Trash:13,Spam:14,User:99};
g.LoginSignMeTypeAsString={DefaultOff:"defaultoff",DefaultOn:"defaulton",Unused:"unused"};g.LoginSignMeType={DefaultOff:0,DefaultOn:1,Unused:2};g.ComposeType={Empty:"empty",Reply:"reply",ReplyAll:"replyall",Forward:"forward",ForwardAsAttachment:"forward-as-attachment",Draft:"draft"};g.UploadErrorCode={Normal:0,FileIsTooBig:1,FilePartiallyUploaded:2,FileNoUploaded:3,MissingTempFolder:4,FileOnSaveingError:5,FileType:98,Unknown:99};g.SetSystemFoldersNotification={None:0,Sent:1,Draft:2,Spam:3,Trash:4};
g.ClientSideKeyName={FoldersLashHash:0,MessagesInboxLastHash:1,MailBoxListSize:2,ExpandedFolders:3};g.EventKeyCode={Backspace:8,Enter:13,Esc:27,PageUp:33,PageDown:34,Left:37,Right:39,Up:38,Down:40,End:35,Home:36,Insert:45,Delete:46,A:65,S:83};g.MessageSetAction={SetSeen:0,UnsetSeen:1,SetFlag:2,UnsetFlag:3};g.MessageSelectAction={All:0,None:1,Invert:2,Unseen:3,Seen:4,Flagged:5,Unflagged:6};g.DesctopNotifications={Allowed:0,NotAllowed:1,Denied:2,NotSupported:9};g.MessagePriority={Low:5,Normal:3,High:1};
g.EditorDefaultType={Html:"Html",Plain:"Plain"};g.CustomThemeType={Light:"Light",Dark:"Dark"};g.ServerSecure={None:0,SSL:1,TLS:2};g.SearchDateType={All:-1,Days3:3,Days7:7,Month:30};g.EmailType={Defailt:0,Facebook:1,Google:2};g.SaveSettingsStep={Animate:-2,Idle:-1,TrueResult:1,FalseResult:0};g.Notification={InvalidToken:101,AuthError:102,AccessError:103,ConnectionError:104,CaptchaError:105,SocialFacebookLoginAccessDisable:106,SocialTwitterLoginAccessDisable:107,SocialGoogleLoginAccessDisable:108,DomainNotAllowed:109,
CantGetMessageList:201,CantGetMessage:202,CantDeleteMessage:203,CantMoveMessage:204,CantSaveMessage:301,CantSendMessage:302,InvalidRecipients:303,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,AccountAlreadyExists:801,MailServerError:901,UnknownError:999};c.trim=j.trim;c.inArray=j.inArray;c.isArray=i.isArray;c.isFunc=i.isFunction;c.isUnd=i.isUndefined;c.isNull=i.isNull;c.emptyFunction=function(){};c.isNormal=function(a){return!c.isUnd(a)&&!c.isNull(a)};c.windowResize=i.debounce(function(a){c.isUnd(a)?N.resize():h.setTimeout(function(){N.resize()},a)},50);c.isPosNumeric=function(a,b){return c.isNormal(a)?c.isUnd(b)||b?/^[0-9]*$/.test(a.toString()):
/^[1-9]+[0-9]*$/.test(a.toString()):!1};c.pInt=function(a){return c.isNormal(a)&&""!==a?h.parseInt(a,10):0};c.pString=function(a){return c.isNormal(a)?a+"":""};c.isNonEmptyArray=function(a){return c.isArray(a)&&0<a.length};c.exportPath=function(a,b,d){for(var l=null,a=a.split("."),d=d||h;a.length&&(l=a.shift());)!a.length&&!c.isUnd(b)?d[l]=b:d=d[l]?d[l]:d[l]={}};c.pImport=function(a,b,d){a[b]=d};c.pExport=function(a,b,d){return c.isUnd(a[b])?d:a[b]};c.encodeHtml=function(a){return c.isNormal(a)?a.toString().replace(/&/g,
"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;"):""};c.splitPlainText=function(a,b){for(var d="",l="",e=a,f=0,g=0,b=c.isUnd(b)?100:b;e.length>b;)l=e.substring(0,b),f=l.lastIndexOf(" "),g=l.lastIndexOf("\n"),-1!==g&&(f=g),-1===f&&(f=b),d+=l.substring(0,f)+"\n",e=e.substring(f+1);return d+e};var Ga={};c.timeOutAction=function(a,b,d){c.isUnd(Ga[a])&&(Ga[a]=0);h.clearTimeout(Ga[a]);Ga[a]=h.setTimeout(b,d)};var Va={};c.timeOutActionSecond=function(a,b,d){Va[a]||
(Va[a]=h.setTimeout(function(){b();Va[a]=0},d))};var O=!1;c.audio=function(a,b){if(!1===O)if(Ra)O=null;else{var d=!1,c=!1,e=h.Audio?new h.Audio:null;e&&e.canPlayType&&e.play?((d=""!==e.canPlayType('audio/mpeg; codecs="mp3"'))||(c=""!==e.canPlayType('audio/ogg; codecs="vorbis"')),d||c?(O=e,O.preload="none",O.loop=!1,O.autoplay=!1,O.muted=!1,O.src=d?a:b):O=null):O=null}return O};c.hos=function(a,b){return a&&Object.hasOwnProperty?Object.hasOwnProperty.call(a,b):!1};c.i18n=function(a,b,d){var l="",a=
c.isUnd(Sa[a])?c.isUnd(d)?a:d:Sa[a];if(!c.isUnd(b)&&!c.isNull(b))for(l in b)c.hos(b,l)&&(a=a.replace("%"+l+"%",b[l]));return a};c.i18nToNode=function(a){i.defer(function(){j(".i18n",a).each(function(){var a=j(this),d="";(d=a.data("i18n-text"))?a.text(c.i18n(d)):((d=a.data("i18n-html"))&&a.html(c.i18n(d)),(d=a.data("i18n-placeholder"))&&a.attr("placeholder",c.i18n(d)))})})};c.i18nToDoc=function(){h.rainloopI18N&&(Sa=h.rainloopI18N||{},c.i18nToNode(Ea),ia(!ia()));h.rainloopI18N={}};c.initOnStartOrLangChange=
function(a,b,d){a&&a.call(b);d?ia.subscribe(function(){a&&a.call(b);d.call(b)}):a&&ia.subscribe(a,b)};c.inFocus=function(){var a=document.activeElement;return a&&("INPUT"===a.tagName||"TEXTAREA"===a.tagName||"IFRAME"===a.tagName||"DIV"===a.tagName&&"editorHtmlArea"===a.className&&a.contentEditable)};c.removeInFocus=function(){if(document&&document.activeElement&&document.activeElement.blur){var a=j(document.activeElement);(a.is("input")||a.is("textarea"))&&document.activeElement.blur()}};c.removeSelection=
function(){if(h&&h.getSelection){var a=h.getSelection();a&&a.removeAllRanges&&a.removeAllRanges()}else document&&(document.selection&&document.selection.empty)&&document.selection.empty()};c.replySubjectAdd=function(a,b){var d=null,l=c.trim(b);null!==(d=(new h.RegExp("^"+a+"[\\s]?\\:(.*)$","gi")).exec(b))&&!c.isUnd(d[1])?l=a+"[2]: "+d[1]:null!==(d=(new h.RegExp("^("+a+"[\\s]?[\\[\\(]?)([\\d]+)([\\]\\)]?[\\s]?\\:.*)$","gi")).exec(b))&&!c.isUnd(d[1])&&!c.isUnd(d[2])&&!c.isUnd(d[3])?(c.pInt(d[2]),l=
d[1]+(c.pInt(d[2])+1)+d[3]):l=a+": "+b;return l};c.roundNumber=function(a,b){return Math.round(a*Math.pow(10,b))/Math.pow(10,b)};c.friendlySize=function(a){a=c.pInt(a);return 1073741824<=a?c.roundNumber(a/1073741824,1)+"GB":1048576<=a?c.roundNumber(a/1048576,1)+"MB":1024<=a?c.roundNumber(a/1024,0)+"KB":a+"B"};c.log=function(a){h.console&&h.console.log&&h.console.log(a)};c.getNotification=function(a){a=c.pInt(a);return c.isUnd(u[a])?"":u[a]};c.initNotificationLanguage=function(){u[g.Notification.InvalidToken]=
c.i18n("NOTIFICATIONS/INVALID_TOKEN");u[g.Notification.AuthError]=c.i18n("NOTIFICATIONS/AUTH_ERROR");u[g.Notification.AccessError]=c.i18n("NOTIFICATIONS/ACCESS_ERROR");u[g.Notification.ConnectionError]=c.i18n("NOTIFICATIONS/CONNECTION_ERROR");u[g.Notification.CaptchaError]=c.i18n("NOTIFICATIONS/CAPTCHA_ERROR");u[g.Notification.SocialFacebookLoginAccessDisable]=c.i18n("NOTIFICATIONS/SOCIAL_FACEBOOK_LOGIN_ACCESS_DISABLE");u[g.Notification.SocialTwitterLoginAccessDisable]=c.i18n("NOTIFICATIONS/SOCIAL_TWITTER_LOGIN_ACCESS_DISABLE");
u[g.Notification.SocialGoogleLoginAccessDisable]=c.i18n("NOTIFICATIONS/SOCIAL_GOOGLE_LOGIN_ACCESS_DISABLE");u[g.Notification.DomainNotAllowed]=c.i18n("NOTIFICATIONS/DOMAIN_NOT_ALLOWED");u[g.Notification.CantGetMessageList]=c.i18n("NOTIFICATIONS/CANT_GET_MESSAGE_LIST");u[g.Notification.CantGetMessage]=c.i18n("NOTIFICATIONS/CANT_GET_MESSAGE");u[g.Notification.CantDeleteMessage]=c.i18n("NOTIFICATIONS/CANT_DELETE_MESSAGE");u[g.Notification.CantMoveMessage]=c.i18n("NOTIFICATIONS/CANT_MOVE_MESSAGE");u[g.Notification.CantSaveMessage]=
c.i18n("NOTIFICATIONS/CANT_SAVE_MESSAGE");u[g.Notification.CantSendMessage]=c.i18n("NOTIFICATIONS/CANT_SEND_MESSAGE");u[g.Notification.InvalidRecipients]=c.i18n("NOTIFICATIONS/INVALID_RECIPIENTS");u[g.Notification.CantCreateFolder]=c.i18n("NOTIFICATIONS/CANT_CREATE_FOLDER");u[g.Notification.CantRenameFolder]=c.i18n("NOTIFICATIONS/CANT_RENAME_FOLDER");u[g.Notification.CantDeleteFolder]=c.i18n("NOTIFICATIONS/CANT_DELETE_FOLDER");u[g.Notification.CantDeleteNonEmptyFolder]=c.i18n("NOTIFICATIONS/CANT_DELETE_NON_EMPTY_FOLDER");
u[g.Notification.CantSubscribeFolder]=c.i18n("NOTIFICATIONS/CANT_SUBSCRIBE_FOLDER");u[g.Notification.CantUnsubscribeFolder]=c.i18n("NOTIFICATIONS/CANT_UNSUBSCRIBE_FOLDER");u[g.Notification.CantSaveSettings]=c.i18n("NOTIFICATIONS/CANT_SAVE_SETTINGS");u[g.Notification.CantSavePluginSettings]=c.i18n("NOTIFICATIONS/CANT_SAVE_PLUGIN_SETTINGS");u[g.Notification.DomainAlreadyExists]=c.i18n("NOTIFICATIONS/DOMAIN_ALREADY_EXISTS");u[g.Notification.CantInstallPackage]=c.i18n("NOTIFICATIONS/CANT_INSTALL_PACKAGE");
u[g.Notification.CantDeletePackage]=c.i18n("NOTIFICATIONS/CANT_DELETE_PACKAGE");u[g.Notification.InvalidPluginPackage]=c.i18n("NOTIFICATIONS/INVALID_PLUGIN_PACKAGE");u[g.Notification.UnsupportedPluginPackage]=c.i18n("NOTIFICATIONS/UNSUPPORTED_PLUGIN_PACKAGE");u[g.Notification.LicensingServerIsUnavailable]=c.i18n("NOTIFICATIONS/LICENSING_SERVER_IS_UNAVAILABLE");u[g.Notification.LicensingExpired]=c.i18n("NOTIFICATIONS/LICENSING_EXPIRED");u[g.Notification.LicensingBanned]=c.i18n("NOTIFICATIONS/LICENSING_BANNED");
u[g.Notification.DemoSendMessageError]=c.i18n("NOTIFICATIONS/DEMO_SEND_MESSAGE_ERROR");u[g.Notification.AccountAlreadyExists]=c.i18n("NOTIFICATIONS/ACCOUNT_ALREADY_EXISTS");u[g.Notification.MailServerError]=c.i18n("NOTIFICATIONS/MAIL_SERVER_ERROR");u[g.Notification.UnknownError]=c.i18n("NOTIFICATIONS/UNKNOWN_ERROR")};c.getUploadErrorDescByCode=function(a){var b="";switch(c.pInt(a)){case g.UploadErrorCode.FileIsTooBig:b=c.i18n("UPLOAD/ERROR_FILE_IS_TOO_BIG");break;case g.UploadErrorCode.FilePartiallyUploaded:b=
c.i18n("UPLOAD/ERROR_FILE_PARTIALLY_UPLOADED");break;case g.UploadErrorCode.FileNoUploaded:b=c.i18n("UPLOAD/ERROR_NO_FILE_UPLOADED");break;case g.UploadErrorCode.MissingTempFolder:b=c.i18n("UPLOAD/ERROR_MISSING_TEMP_FOLDER");break;case g.UploadErrorCode.FileOnSaveingError:b=c.i18n("UPLOAD/ERROR_ON_SAVING_FILE");break;case g.UploadErrorCode.FileType:b=c.i18n("UPLOAD/ERROR_FILE_TYPE");break;default:b=c.i18n("UPLOAD/ERROR_UNKNOWN")}return b};c.killCtrlAandS=function(a){if(a=a||h.event){var b=a.target||
a.srcElement,d=a.keyCode||a.which;if(a.ctrlKey&&d===g.EventKeyCode.S)a.preventDefault();else if((!b||!b.tagName||!b.tagName.match(/INPUT|TEXTAREA/i))&&a.ctrlKey&&d===g.EventKeyCode.A)h.getSelection?h.getSelection().removeAllRanges():h.document.selection&&h.document.selection.clear&&h.document.selection.clear(),a.preventDefault()}};c.createCommand=function(a,b,d){var l=b?function(){l.canExecute&&l.canExecute()&&b.apply(a,Array.prototype.slice.call(arguments));return!1}:function(){};l.enabled=f.observable(!0);
d=c.isUnd(d)?!0:d;l.canExecute=c.isFunc(d)?f.computed(function(){return l.enabled()&&d.call(a)}):f.computed(function(){return l.enabled()&&!!d});return l};c.initDataConstructorBySettings=function(a){a.ignoreFolderSubscribe=f.observable(!1);a.editorDefaultType=f.observable(g.EditorDefaultType.Html);a.showImages=f.observable(!1);a.showAnimation=f.observable(!1);a.desktopNotifications=f.observable(!1);a.useThreads=f.observable(!0);a.replySameFolder=f.observable(!0);a.usePreviewPane=f.observable(!0);
a.useCheckboxesInList=f.observable(!0);a.showAnimation.subscribe(function(a){ha?Y.removeClass("rl-anim").addClass("no-rl-anim"):Y.toggleClass("rl-anim",a).toggleClass("no-rl-anim",!a)});a.showAnimation.valueHasMutated();a.desktopNotificationsPermisions=f.computed(function(){a.desktopNotifications();var b=g.DesctopNotifications.NotSupported;if(ja&&ja.permission)switch(ja.permission.toLowerCase()){case "granted":b=g.DesctopNotifications.Allowed;break;case "denied":b=g.DesctopNotifications.Denied;break;
case "default":b=g.DesctopNotifications.NotAllowed}else h.webkitNotifications&&h.webkitNotifications.checkPermission&&(b=h.webkitNotifications.checkPermission());return b});a.useDesktopNotifications=f.computed({read:function(){return a.desktopNotifications()&&g.DesctopNotifications.Allowed===a.desktopNotificationsPermisions()},write:function(b){b?(b=a.desktopNotificationsPermisions(),g.DesctopNotifications.Allowed===b?a.desktopNotifications(!0):g.DesctopNotifications.NotAllowed===b?ja.requestPermission(function(){a.desktopNotifications.valueHasMutated();
h.console.log(a.desktopNotificationsPermisions());g.DesctopNotifications.Allowed===a.desktopNotificationsPermisions()?a.desktopNotifications()?a.desktopNotifications.valueHasMutated():a.desktopNotifications(!0):a.desktopNotifications()?a.desktopNotifications(!1):a.desktopNotifications.valueHasMutated()}):a.desktopNotifications(!1)):a.desktopNotifications(!1)}});a.language=f.observable("");a.languages=f.observableArray([]);a.mainLanguage=f.computed({read:a.language,write:function(b){b!==a.language()?
-1<c.inArray(b,a.languages())?a.language(b):0<a.languages().length&&a.language(a.languages()[0]):a.language.valueHasMutated()}});a.theme=f.observable("");a.themes=f.observableArray([]);a.mainTheme=f.computed({read:a.theme,write:function(b){if(b!==a.theme()){var d=a.themes();-1<c.inArray(b,d)?a.theme(b):0<d.length&&a.theme(d[0])}else a.theme.valueHasMutated()}});a.allowCustomTheme=f.observable(!0);a.allowAdditionalAccounts=f.observable(!0);a.messagesPerPage=f.observable(t.Defaults.MessagesPerPage);
a.mainMessagesPerPage=a.messagesPerPage;a.mainMessagesPerPage=f.computed({read:a.messagesPerPage,write:function(b){-1<c.inArray(c.pInt(b),[10,20,30,50,100,150,200])?b!==a.messagesPerPage()&&a.messagesPerPage(b):a.messagesPerPage.valueHasMutated()}});a.facebookEnable=f.observable(!1);a.facebookAppID=f.observable("");a.facebookAppSecret=f.observable("");a.twitterEnable=f.observable(!1);a.twitterConsumerKey=f.observable("");a.twitterConsumerSecret=f.observable("");a.googleEnable=f.observable(!1);a.googleClientID=
f.observable("");a.googleClientSecret=f.observable("");a.dropboxEnable=f.observable(!1);a.dropboxApiKey=f.observable("");a.contactsIsSupported=f.observable(!1)};c.createMomentDate=function(a){return f.computed(function(){xa();return this.moment().fromNow()},a)};c.createMomentShortDate=function(a){return f.computed(function(){var a="",a=Z(),d=this.moment(),l=this.momentDate();return a=4>=a.diff(d,"hours")?l:a.format("L")===d.format("L")?c.i18n("MESSAGE_LIST/TODAY_AT",{TIME:d.format("LT")}):a.clone().subtract("days",
1).format("L")===d.format("L")?c.i18n("MESSAGE_LIST/YESTERDAY_IN",{TIME:d.format("LT")}):a.year()===d.year()?d.format("D MMM."):d.format("LL")},a)};c.isFolderExpanded=function(a){var b=e.local().get(g.ClientSideKeyName.ExpandedFolders);return i.isArray(b)&&-1!==i.indexOf(b,a)};c.setExpandedFolder=function(a,b){var d=e.local().get(g.ClientSideKeyName.ExpandedFolders);i.isArray(d)||(d=[]);b?(d.push(a),d=i.uniq(d)):d=i.without(d,a);e.local().set(g.ClientSideKeyName.ExpandedFolders,d)};c.initLayoutResizer=
function(a,b,d,c){var f=j(a),s=j(b),w=j(d),a=e.local().get(g.ClientSideKeyName.MailBoxListSize),k=function(a,b,d){if(b||d)a=w.width(),b=b?100*(b.size.width/a):null,null===b&&d&&(b=100*(f.width()/a)),null!==b&&(f.css({width:"",height:"",right:""+(100-b)+"%"}),s.css({width:"",height:"",left:""+b+"%"}))};a&&f.width(a);f.resizable({minWidth:350,maxWidth:w.width()-250,handles:"e",resize:k,stop:k});k(null,null,!0);N.resize(i.throttle(function(a,b){if(c&&c()){var d=w.width();f.resizable("option","maxWidth",
d-250);b&&(b.size&&b.size.width)&&e.local().set(g.ClientSideKeyName.MailBoxListSize,b.size.width);k(null,null,!0)}},400))};c.initBlockquoteSwitcher=function(a){if(a){var b=j("blockquote:not(.rl-bq-switcher)",a).filter(function(){return 0===j(this).parent().closest("blockquote",a).length});b&&0<b.length&&b.each(function(){var a=j(this),b=a.height();if(0===b||100<b)a.addClass("rl-bq-switcher hidden-bq"),j('<span class="rlBlockquoteSwitcher"><i class="icon-ellipsis" /></span>').insertBefore(a).click(function(){a.toggleClass("hidden-bq");
c.windowResize()}).after("<br />").before("<br />")})}};c.removeBlockquoteSwitcher=function(a){a&&(j(a).find("blockquote.rl-bq-switcher").each(function(){j(this).removeClass("rl-bq-switcher hidden-bq")}),j(a).find(".rlBlockquoteSwitcher").each(function(){j(this).remove()}))};c.extendAsViewModel=function(a,b){b&&(b.__name=a,x.regViewModelHook(a,b),i.extend(b.prototype,C.prototype))};c.addSettingsViewModel=function(a,b,d,c,e){a.__rlSettingsData={Label:d,Template:b,Route:c,IsDefault:!!e};Fa.push(a)};
c.removeSettingsViewModel=function(a){Ta.push(a)};c.disableSettingsViewModel=function(a){Ua.push(a)};c.convertThemeName=function(a){return c.trim(a.replace(/[^a-zA-Z]/g," ").replace(/([A-Z])/g," $1").replace(/[\s]+/g," "))};c.convertLangName=function(a){return c.i18n("LANGS_NAMES/LANG_"+a.toUpperCase().replace(/[^a-zA-Z0-9]+/,"_"),null,a)};c.fakeMd5=function(a){for(var b="",a=c.isUnd(a)?32:c.pInt(a);b.length<a;)b+="0123456789abcdefghijklmnopqrstuvwxyz".substr(h.Math.round(36*h.Math.random()),1);return b};
c.convertPlainTextToHtml=function(a){return a.toString().replace(/&/g,"&amp;").replace(/>/g,"&gt;").replace(/</g,"&lt;").replace(/\r/g,"").replace(/\n/g,"<br />")};c.draggeblePlace=function(){return j('<div class="draggablePlace"><span class="text"></span>&nbsp;<i class="icon-envelope icon-white"></i></div>').appendTo("#rl-hidden")};c.defautOptionsAfterRender=function(a,b){b&&!c.isUnd(b.disable)&&f.applyBindingsToNode(a,{disable:b.disable},b)};c.windowPopupKnockout=function(a,b,d,l){var e=null,f=
h.open(""),g="__OpenerApplyBindingsUid"+c.fakeMd5()+"__",k=j("#"+b);h[g]=function(){if(f&&f.document.body&&k&&k[0]){var b=j(f.document.body);j("#rl-content",b).html(k.html());j("html",f.document).addClass("external "+j("html").attr("class"));c.i18nToNode(b);E.prototype.applyExternal(a,j("#rl-content",b)[0]);h[g]=null;l(f)}};f.document.open();f.document.write('<html><head><meta charset="utf-8" /><meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /><meta name="viewport" content="user-scalable=no" /><meta name="apple-mobile-web-app-capable" content="yes" /><meta name="robots" content="noindex, nofollow, noodp" /><title>'+
c.encodeHtml(d)+'</title></head><body><div id="rl-content"></div></body></html>');f.document.close();e=f.document.createElement("script");e.type="text/javascript";e.innerHTML="if(window&&window.opener&&window.opener['"+g+"']){window.opener['"+g+"']();window.opener['"+g+"']=null}";f.document.getElementsByTagName("head")[0].appendChild(e)};c.settingsSaveHelperFunction=function(a,b,d,l){d=d||null;l=c.isUnd(l)?1E3:c.pInt(l);return function(c,e,f,k,h){b.call(d,e&&e.Result?g.SaveSettingsStep.TrueResult:
g.SaveSettingsStep.FalseResult);a&&a.call(d,c,e,f,k,h);i.delay(function(){b.call(d,g.SaveSettingsStep.Idle)},l)}};c.settingsSaveHelperSimpleFunction=function(a,b){return c.settingsSaveHelperFunction(null,a,b,1E3)};c.resizeAndCrop=function(a,b,d){var c=new Image;c.onload=function(){var a=[0,0],c=document.createElement("canvas"),l=c.getContext("2d");c.width=b;c.height=b;a=this.width>this.height?[this.width-this.height,0]:[0,this.height-this.width];l.fillStyle="#fff";l.fillRect(0,0,b,b);l.drawImage(this,
a[0]/2,a[1]/2,this.width-a[0],this.height-a[1],0,0,b,b);d(c.toDataURL("image/jpeg"))};c.src=a};ga={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",urlsafe_encode:function(a){return ga.encode(a).replace(/[+]/g,"-").replace(/[\/]/g,"_").replace(/[=]/g,".")},encode:function(a){for(var b="",d,c,e,f,g,k,i=0,a=ga._utf8_encode(a);i<a.length;)d=a.charCodeAt(i++),c=a.charCodeAt(i++),e=a.charCodeAt(i++),f=d>>2,d=(d&3)<<4|c>>4,g=(c&15)<<2|e>>6,k=e&63,isNaN(c)?g=k=64:isNaN(e)&&(k=
64),b=b+this._keyStr.charAt(f)+this._keyStr.charAt(d)+this._keyStr.charAt(g)+this._keyStr.charAt(k);return b},decode:function(a){for(var b="",d,c,e,f,g,k=0,a=a.replace(/[^A-Za-z0-9\+\/\=]/g,"");k<a.length;)d=this._keyStr.indexOf(a.charAt(k++)),c=this._keyStr.indexOf(a.charAt(k++)),f=this._keyStr.indexOf(a.charAt(k++)),g=this._keyStr.indexOf(a.charAt(k++)),d=d<<2|c>>4,c=(c&15)<<4|f>>2,e=(f&3)<<6|g,b+=String.fromCharCode(d),64!==f&&(b+=String.fromCharCode(c)),64!==g&&(b+=String.fromCharCode(e));return ga._utf8_decode(b)},
_utf8_encode:function(a){for(var a=a.replace(/\r\n/g,"\n"),b="",d=0,c=a.length,e=0;d<c;d++)e=a.charCodeAt(d),128>e?b+=String.fromCharCode(e):(127<e&&2048>e?b+=String.fromCharCode(e>>6|192):(b+=String.fromCharCode(e>>12|224),b+=String.fromCharCode(e>>6&63|128)),b+=String.fromCharCode(e&63|128));return b},_utf8_decode:function(a){for(var b="",d=0,c=0,e=0,f=0;d<a.length;)c=a.charCodeAt(d),128>c?(b+=String.fromCharCode(c),d++):191<c&&224>c?(e=a.charCodeAt(d+1),b+=String.fromCharCode((c&31)<<6|e&63),d+=
2):(e=a.charCodeAt(d+1),f=a.charCodeAt(d+2),b+=String.fromCharCode((c&15)<<12|(e&63)<<6|f&63),d+=3);return b}};f.bindingHandlers.tooltip={init:function(a,b){if(!ha){var d=j(a).data("tooltip-class")||"";j(a).tooltip({delay:{show:500,hide:100},html:!0,trigger:"hover",title:function(){return'<span class="tooltip-class '+d+'">'+c.i18n(f.utils.unwrapObservable(b()))+"</span>"}})}}};f.bindingHandlers.tooltip2={init:function(a,b){var d=j(a).data("tooltip-class")||"";j(a).tooltip({delay:{show:500,hide:100},
html:!0,title:function(){return'<span class="tooltip-class '+d+'">'+b()()+"</span>"}})}};f.bindingHandlers.popover={init:function(a,b){var d=f.utils.unwrapObservable(b());j(a).popover({trigger:d[2]||"click",placement:d[3]||"right",title:function(){return c.i18n(d[0]||"")},content:function(){return c.i18n(d[1]||"")}})}};f.bindingHandlers.resizecrop={init:function(a){j(a).addClass("resizecrop").resizecrop({width:"100",height:"100",wrapperCSS:{"border-radius":"10px"}})},update:function(a,b){b()();j(a).resizecrop({width:"100",
height:"100"})}};f.bindingHandlers.onEnter={init:function(a,b,d,c){j(a).on("keypress",function(d){d&&13===h.parseInt(d.keyCode,10)&&(j(a).trigger("change"),b().call(c))})}};f.bindingHandlers.onEsc={init:function(a,b,d,c){j(a).on("keypress",function(d){d&&27===h.parseInt(d.keyCode,10)&&(j(a).trigger("change"),b().call(c))})}};f.bindingHandlers.modal={init:function(a,b){j(a).modal({keyboard:!1,show:f.utils.unwrapObservable(b())}).on("hidden",function(){b()(!1)})},update:function(a,b){var d=f.utils.unwrapObservable(b());
j(a).modal(d?"show":"hide");i.delay(function(){j(a).toggleClass("popup-active",d)},1)}};f.bindingHandlers.i18nInit={init:function(a){c.i18nToNode(a)}};f.bindingHandlers.i18nUpdate={update:function(a,b){f.utils.unwrapObservable(b());c.i18nToNode(a)}};f.bindingHandlers.link={update:function(a,b){j(a).attr("href",f.utils.unwrapObservable(b()))}};f.bindingHandlers.title={update:function(a,b){j(a).attr("title",f.utils.unwrapObservable(b()))}};f.bindingHandlers.textF={init:function(a,b){j(a).text(f.utils.unwrapObservable(b()))}};
f.bindingHandlers.initDom={init:function(a,b){b()(a)}};f.bindingHandlers.initResizeTrigger={init:function(a,b){var d=f.utils.unwrapObservable(b());j(a).css({height:d[1],"min-height":d[1]})},update:function(a,b){var d=f.utils.unwrapObservable(b()),l=c.pInt(d[1]),e=0,e=j(a).offset().top;0<e&&(e+=c.pInt(d[2]),e=N.height()-e,l<e&&(l=e),j(a).css({height:l,"min-height":l}))}};f.bindingHandlers.appendDom={update:function(a,b){j(a).hide().empty().append(f.utils.unwrapObservable(b())).show()}};f.bindingHandlers.draggable=
{init:function(a,b){j(a).draggable({distance:20,handle:".dragHandle",cursorAt:{top:22,left:3},helper:function(a){return b()(a&&a.target?f.dataFor(a.target):null)}}).on("mousedown",function(){c.removeInFocus()})}};f.bindingHandlers.droppable={init:function(a,b){var d=b();!1!==d&&j(a).droppable({tolerance:"pointer",hoverClass:"droppableHover",drop:function(a,b){d(a,b)}})}};f.bindingHandlers.nano={init:function(a){ha||j(a).addClass("nano").nanoScroller({iOSNativeScrolling:!1,preventPageScrolling:!0})}};
f.bindingHandlers.saveTrigger={init:function(a){j(a).append('&nbsp;&nbsp;<i class="icon-spinner-2 animated"></i><i class="icon-remove error"></i><i class="icon-ok success"></i>').addClass("settings-saved-trigger")},update:function(a,b){var d=f.utils.unwrapObservable(b()),c=j(a);switch(d.toString()){case "1":c.find(".animated,.error").hide().removeClass("visible").end().find(".success").show().addClass("visible");break;case "0":c.find(".animated,.success").hide().removeClass("visible").end().find(".error").show().addClass("visible");
break;case "-2":c.find(".error,.success").hide().removeClass("visible").end().find(".animated").show().addClass("visible");break;default:c.find(".animated").hide().end().find(".error,.success").removeClass("visible")}}};f.bindingHandlers.select2={init:function(a,b){var d=0,l=null,g=new h.RegExp(/[a-zA-Z0-9\.\-_]+@[a-zA-Z0-9\.\-_]+/),s=new h.RegExp(/(.+) [<]?([^\s<@]+@[a-zA-Z0-9\.\-_]+)[>]?/),w=function(){return""},k=function(a){e.getAutocomplete(a.term,a.page,function(b,d){a.callback({more:!!d,results:i.map(b,
function(a){var b=a.toLine(!1);return{id:b,text:b,c:a}})})})};j(a).addClass("ko-select2").select2({query:function(a){a&&(0===d?(k(a),d=h.setTimeout(c.emptyFunction,200)):(h.clearInterval(d),d=h.setTimeout(function(){k(a)},200)))},formatSelection:function(a,b){var d=a&&a.c?a.c.select2Selection(b):a.text;if(null!==d)return d},formatResult:function(a,b,d,c){b=a&&a.c?a.c.select2Result(b):"";return""===b?c(a.text):b},createSearchChoice:function(a,b){return 0===b.length&&g.test(a)?{id:a,text:a}:null},formatNoMatches:w,
formatSearching:function(){return c.i18n("SUGGESTIONS/SEARCHING_DESC")},formatInputTooShort:w,formatSelectionTooBig:w,multiple:!0,tokenSeparators:[",",";"],minimumInputLength:2,selectOnBlur:!1,closeOnSelect:!0,openOnEnter:!1});f.utils.domNodeDisposal.addDisposeCallback(a,function(){j(a).select2("destroy")});j(a).on("change",function(){for(var a=j(this).select2("data"),d=0,e=a.length,f=null,g=[];d<e;d++)if((f=a[d])&&f.id)f.c||(f.c=new F,(l=s.exec(c.trim(f.id)))&&!c.isUnd(l[2])?(f.c.name=l[1],f.c.email=
l[2]):f.c.email=f.id),g.push(f.c);b()(g)})},update:function(a,b){for(var d=f.utils.unwrapObservable(b()),c=0,e=d.length,g=null,w="",k=[];c<e;c++)g=d[c],w=g.toLine(!1),k.push({id:w,text:w,c:g});j(a).select2("data",k)}};f.bindingHandlers.command={init:function(a,b,d,c){var e=j(a),g=b();if(!g||!g.enabled||!g.canExecute)throw Error("You are not using command function");e.addClass("command");f.bindingHandlers[e.is("form")?"submit":"click"].init.apply(c,arguments)},update:function(a,b){var d=!0,c=j(a),
e=b(),d=e.enabled();c.toggleClass("command-not-enabled",!d);d&&(d=e.canExecute(),c.toggleClass("command-can-not-be-execute",!d));c.toggleClass("command-disabled disable disabled",!d);(c.is("input")||c.is("button"))&&c.prop("disabled",!d)}};f.extenders.trimmer=function(a){var b=f.computed({read:a,write:function(b){a(c.trim(b.toString()))},owner:this});b(a());return b};f.extenders.reversible=function(a){var b=a();a.commit=function(){b=a()};a.reverse=function(){a(b)};a.commitedValue=function(){return b};
return a};f.extenders.toggleSubscribe=function(a,b){a.subscribe(b[1],b[0],"beforeChange");a.subscribe(b[2],b[0]);return a};f.extenders.falseTimeout=function(a,b){a.iTimeout=0;a.subscribe(function(d){d&&(h.clearTimeout(a.iTimeout),a.iTimeout=h.setTimeout(function(){a(!1);a.iTimeout=0},c.pInt(b)))});return a};f.observable.fn.validateEmail=function(){this.hasError=f.observable(!1);this.subscribe(function(a){a=c.trim(a);this.hasError(""!==a&&!/^[^@\s]+@[^@\s]+$/.test(a))},this);this.valueHasMutated();
return this};f.observable.fn.validateFunc=function(a){this.hasFuncError=f.observable(!1);c.isFunc(a)&&(this.subscribe(function(b){this.hasFuncError(!a(b))},this),this.valueHasMutated());return this};B.prototype.root=function(){return this.sBase};B.prototype.attachmentDownload=function(a){return this.sServer+"/Raw/"+this.sSpecSuffix+"/Download/"+a};B.prototype.attachmentPreview=function(a){return this.sServer+"/Raw/"+this.sSpecSuffix+"/View/"+a};B.prototype.attachmentPreviewAsPlain=function(a){return this.sServer+
"/Raw/"+this.sSpecSuffix+"/ViewAsPlain/"+a};B.prototype.upload=function(){return this.sServer+"/Upload/"+this.sSpecSuffix+"/"};B.prototype.uploadBackground=function(){return this.sServer+"/UploadBackground/"+this.sSpecSuffix+"/"};B.prototype.append=function(){return this.sServer+"/Append/"+this.sSpecSuffix+"/"};B.prototype.change=function(a){return this.sServer+"/Change/"+this.sSpecSuffix+"/"+h.encodeURIComponent(a)+"/"};B.prototype.ajax=function(a){return this.sServer+"/Ajax/"+this.sSpecSuffix+"/"+
a};B.prototype.messageViewLink=function(a){return this.sServer+"/Raw/"+this.sSpecSuffix+"/ViewAsPlain/"+a};B.prototype.messageDownloadLink=function(a){return this.sServer+"/Raw/"+this.sSpecSuffix+"/Download/"+a};B.prototype.inbox=function(){return this.sBase+"mailbox/Inbox"};B.prototype.settings=function(a){var b=this.sBase+"settings";!c.isUnd(a)&&""!==a&&(b+="/"+a);return b};B.prototype.admin=function(a){var b=this.sBase;switch(a){case "AdminDomains":b+="domains";break;case "AdminSecurity":b+="security";
break;case "AdminLicensing":b+="licensing"}return b};B.prototype.mailBox=function(a,b,d){var b=c.isNormal(b)?c.pInt(b):1,d=c.pString(d),e=this.sBase+"mailbox/";""!==a&&(e+=encodeURI(a));1<b&&(e=e.replace(/[\/]+$/,""),e+="/p"+b);""!==d&&(e=e.replace(/[\/]+$/,""),e+="/"+encodeURI(d));return e};B.prototype.phpInfo=function(){return this.sServer+"Info"};B.prototype.langLink=function(a){return this.sServer+"/Lang/0/"+encodeURI(a)+"/"+this.sVersion+"/"};B.prototype.getUserPicUrlFromHash=function(a){return this.sServer+
"/Raw/"+this.sSpecSuffix+"/UserPic/"+a+"/"+this.sVersion+"/"};B.prototype.emptyContactPic=function(){return(""===this.sCdnStaticDomain?"rainloop/v/":this.sCdnStaticDomain)+this.sVersion+"/static/css/images/empty-contact.png"};B.prototype.sound=function(a){return(""===this.sCdnStaticDomain?"rainloop/v/":this.sCdnStaticDomain)+this.sVersion+"/static/sounds/"+a};B.prototype.themePreviewLink=function(a){return(""===this.sCdnStaticDomain?"rainloop/v/":this.sCdnStaticDomain)+this.sVersion+"/themes/"+encodeURI(a)+
"/images/preview.png"};B.prototype.notificationMailIcon=function(){return(""===this.sCdnStaticDomain?"rainloop/v/":this.sCdnStaticDomain)+this.sVersion+"/static/css/images/icom-message-notification.png"};B.prototype.socialGoogle=function(){return this.sServer+"SocialGoogle"+(""!==this.sSpecSuffix?"/"+this.sSpecSuffix+"/":"")};B.prototype.socialTwitter=function(){return this.sServer+"SocialTwitter"+(""!==this.sSpecSuffix?"/"+this.sSpecSuffix+"/":"")};B.prototype.socialFacebook=function(){return this.sServer+
"SocialFacebook"+(""!==this.sSpecSuffix?"/"+this.sSpecSuffix+"/":"")};x.oViewModelsHooks={};x.oSimpleHooks={};x.regViewModelHook=function(a,b){b&&(b.__hookName=a)};x.addHook=function(a,b){c.isFunc(b)&&(c.isArray(x.oSimpleHooks[a])||(x.oSimpleHooks[a]=[]),x.oSimpleHooks[a].push(b))};x.runHook=function(a,b){c.isArray(x.oSimpleHooks[a])&&(b=b||[],i.each(x.oSimpleHooks[a],function(a){a.apply(null,b)}))};x.mainSettingsGet=function(a){return e?e.settingsGet(a):null};x.remoteRequest=function(a,b,d,c,f,g){e&&
e.remote().defaultRequest(a,b,d,c,f,g)};x.settingsGet=function(a,b){var d=x.mainSettingsGet("Plugins");return(d=d&&c.isUnd(d[a])?null:d[a])?c.isUnd(d[b])?null:d[b]:null};q.prototype.initLanguage=function(a,b,d){this.oOptions.LangSwitcherConferm=a;this.oOptions.LangSwitcherTextLabel=b;this.oOptions.LangSwitcherHtmlLabel=d};q.prototype.execCom=function(a,b,d){h.document&&(h.document.execCommand(a,b||!1,d||null),this.updateTextArea())};q.prototype.getEditorSelection=function(){var a=null;h.getSelection?
a=h.getSelection():h.document.getSelection?a=h.document.getSelection():h.document.selection&&(a=h.document.selection);return a};q.prototype.getEditorRange=function(){var a=this.getEditorSelection();return!a||0===a.rangeCount?null:a.getRangeAt?a.getRangeAt(0):a.createRange()};q.prototype.ec=function(a,b,d){this.execCom(a,b,d)};q.prototype.heading=function(a){this.ec("formatblock",!1,j.browser.msie?"Heading "+a:"h"+a)};q.prototype.insertImage=function(a){this.isHtml()&&!this.bOnlyPlain&&(this.htmlarea.focus(),
this.ec("insertImage",!1,a))};q.prototype.focus=function(){this.isHtml()&&!this.bOnlyPlain?this.htmlarea.focus():this.textarea.focus()};q.prototype.setcolor=function(a,b){var d=null,d="";j.browser.msie&&9>c.pInt(j.browser.version)?(d=this.getEditorRange())&&d.execCommand("forecolor"===a?"ForeColor":"BackColor",!1,b):(d=j.browser.msie?"forecolor"===a?"ForeColor":"BackColor":"forecolor"===a?"foreColor":"backColor",this.ec(d,!1,b))};q.prototype.isHtml=function(){return!0===this.bOnlyPlain?!1:this.textarea.is(":hidden")};
q.prototype.toHtmlString=function(){return this.editor.innerHTML};q.prototype.toString=function(){return this.editor.innerText};q.prototype.updateTextArea=function(){this.textarea.val(this.toHtmlString())};q.prototype.updateHtmlArea=function(){this.editor.innerHTML=this.textarea.val()};q.prototype.setRawText=function(a,b){b&&!this.bOnlyPlain?(this.isHtml()||(this.textarea.val(""),this.switchToHtml()),this.textarea.val(a.toString()),this.updateHtmlArea()):(this.textarea.val(a.toString()),this.updateHtmlArea(),
this.switchToPlain(!1))};q.prototype.clear=function(){this.textarea.val("");this.editor.innerHTML="";this.bOnlyPlain?(this.toolbar.hide(),this.switchToPlain(!1)):this.switchToHtml()};q.prototype.getTextForRequest=function(){this.isHtml()&&this.updateTextArea();return this.textarea.val()};q.prototype.getTextFromHtml=function(a){var b="",d=function(){if(arguments&&1<arguments.length){var a=c.trim(arguments[1]).replace(/__bq__start__([\s\S\n\r]*)__bq__end__/gm,d),a="\n> "+c.trim(a).replace(/\n/gm,"\n> ")+
"\n>\n";return a.replace(/\n([> ]+)/gm,function(){return arguments&&1<arguments.length?"\n"+c.trim(arguments[1].replace(/[\s]/,""))+" ":""})}return""},e=function(){if(arguments&&1<arguments.length){var a=c.trim(arguments[1]);0<a.length&&(a=a.replace(/<div[^>]*>([\s\S]*)<\/div>/gmi,e),a="\n"+c.trim(a)+"\n");return a}return""},a=c.isUnd(a)?!0:!!a,b=this.toHtmlString().replace(/[\s]+/gm," ").replace(/<br\s?\/?>/gmi,"\n").replace(/<\/h\d>/gi,"\n").replace(/<\/p>/gi,"\n\n").replace(/<\/li>/gi,"\n").replace(/<\/td>/gi,
"\n").replace(/<\/tr>/gi,"\n").replace(/<hr[^>]*>/gmi,"\n_______________________________\n\n").replace(/<img [^>]*>/gmi,"").replace(/<div[^>]*>([\s\S]*)<\/div>/gmi,e).replace(/<blockquote[^>]*>/gmi,"\n__bq__start__\n").replace(/<\/blockquote>/gmi,"\n__bq__end__\n").replace(/<a [^>]*>([\s\S]*?)<\/a>/gmi,function(){return arguments&&1<arguments.length?c.trim(arguments[1]):""}).replace(/&nbsp;/gi," ").replace(/<[^>]*>/gm,"").replace(/&gt;/gi,">").replace(/&lt;/gi,"<").replace(/&amp;/gi,"&").replace(/&\w{2,6};/gi,
"");return(a?c.splitPlainText(b):b).replace(/\n[ \t]+/gm,"\n").replace(/[\n]{3,}/gm,"\n\n").replace(/__bq__start__([\s\S]*)__bq__end__/gm,d).replace(/__bq__start__/gm,"").replace(/__bq__end__/gm,"")};q.prototype.getHtmlFromText=function(){return c.convertPlainTextToHtml(this.textarea.val())};q.prototype.switchToggle=function(){this.isHtml()?this.switchToPlain():this.switchToHtml()};q.prototype.switchToPlain=function(a){var a=c.isUnd(a)?!0:a,b=this.getTextFromHtml(),d=i.bind(function(a){a&&(this.toolbar.addClass("editorHideToolbar"),
j(".editorSwitcher",this.toolbar).text(this.switcherLinkText(!1)),this.textarea.val(b),this.textarea.show(),this.htmlarea.hide(),this.fOnSwitch&&this.fOnSwitch(!1))},this);!a||0===c.trim(b).length?d(!0):d(h.confirm(this.oOptions.LangSwitcherConferm))};q.prototype.switcherLinkText=function(a){return a?this.oOptions.LangSwitcherTextLabel:this.oOptions.LangSwitcherHtmlLabel};q.prototype.switchToHtml=function(){this.toolbar.removeClass("editorHideToolbar");j(".editorSwitcher",this.toolbar).text(this.switcherLinkText(!0));
this.textarea.val(this.getHtmlFromText());this.updateHtmlArea();this.textarea.hide();this.htmlarea.show();this.fOnSwitch&&this.fOnSwitch(!0)};q.prototype.addButton=function(a,b){var d=this;j("<div />").addClass("editorToolbarButtom").append(j('<a tabindex="-1" href="javascript:void(0);"></a>').addClass(a)).attr("title",b).click(function(b){c.isUnd(q.htmlFunctions[a])?h.alert(a):q.htmlFunctions[a].apply(d,[j(this),b])}).appendTo(this.toolbar)};q.htmlInitToolbar=function(){if(!this.bOnlyPlain){this.addButton("bold",
"Bold");this.addButton("italic","Italic");this.addButton("underline","Underline");this.addButton("strikethrough","Strikethrough");this.addButton("removeformat","removeformat");this.addButton("justifyleft","justifyleft");this.addButton("justifycenter","justifycenter");this.addButton("justifyright","justifyright");this.addButton("horizontalrule","horizontalrule");this.addButton("orderedlist","orderedlist");this.addButton("unorderedlist","unorderedlist");this.addButton("indent","indent");this.addButton("outdent",
"outdent");this.addButton("forecolor","forecolor");var a=this;j("<span />").addClass("editorSwitcher").text(a.switcherLinkText(!0)).click(function(){a.switchToggle()}).appendTo(a.toolbar)}};q.htmlInitEditor=function(){this.editor=this.htmlarea[0];this.editor.innerHTML=this.textarea.val()};q.htmlAttachEditorEvents=function(){var a=this,b=function(b){if(b=(b&&b.originalEvent?b.originalEvent:b)||h.event){b.stopPropagation();b.preventDefault();var d=null,c=null;if((b=b.files||(b.dataTransfer?b.dataTransfer.files:
null))&&1===b.length&&b[0]&&b[0].type&&0===b[0].type.indexOf("image/")){var c=b[0],d=new h.FileReader,e=c;d.onload=function(b){a.insertImage(b.target.result,e.name)};d.readAsDataURL(c)}}a.htmlarea.removeClass("editorDragOver")},d=function(){a.htmlarea.removeClass("editorDragOver")},c=function(b){b.stopPropagation();b.preventDefault();a.htmlarea.addClass("editorDragOver")},e=function(b){(b=b&&b.clipboardData?b.clipboardData:b&&b.originalEvent&&b.originalEvent.clipboardData?b.originalEvent.clipboardData:
null)&&b.items&&i.each(b.items,function(b){if(b&&(b.type&&0===b.type.indexOf("image/"))&&b.getAsFile){var d=null,c=b.getAsFile();c&&(d=new h.FileReader,d.onload=function(b){a.insertImage(b.target.result,c.name)},d.readAsDataURL(c))}})};!this.bOnlyPlain&&(h.File&&h.FileReader&&h.FileList)&&(this.htmlarea.bind("dragover",c),this.htmlarea.bind("dragleave",d),this.htmlarea.bind("drop",b),this.htmlarea.bind("paste",e))};for(var kb=q,pa=[],bb=[],V=0,Ha=0,Ia=0,Ja=0,Ka="",V=0;256>V;V+=85)Ka=V.toString(16),
pa.push(1===Ka.length?"0"+Ka:Ka);Ja=pa.length;for(V=0;V<Ja;V++)for(Ha=0;Ha<Ja;Ha++)for(Ia=0;Ia<Ja;Ia++)bb.push("#"+pa[V]+""+pa[Ha]+""+pa[Ia]);kb.htmlColorPickerColors=bb;var lb=q,cb=j(h.document),db=!1,qa=j('<div style="position: absolute;" class="editorFontStylePicker"><div class="editorFpFonts"></div></div>'),eb=qa.find(".editorFpFonts"),fb=function(){};j.each("Arial;Arial Black;Courier New;Tahoma;Times New Roman;Verdana".split(";"),function(a,b){eb.append(j('<a href="javascript:void(0);" tabindex="-1" class="editorFpFont" style="font-family: '+
b+';">'+b+"</a>").click(function(){fb(b)}));eb.append("<br />")});qa.hide();lb.htmlFontPicker=function(a,b,d){db||(qa.appendTo(d),db=!0);fb=b;cb.unbind("click.fpNamespace");h.setTimeout(function(){cb.one("click.fpNamespace",function(){qa.hide()})},500);b=j(a).position();qa.css("top",5+b.top+j(a).height()+"px").css("left",b.left+"px").show()};var mb=q,gb=j(h.document),hb=!1,ra=j('<div style="position: absolute;" class="editorColorPicker"><div class="editorCpColors"></div></div>'),ib=ra.find(".editorCpColors"),
jb=function(){};j.each(q.htmlColorPickerColors,function(a,b){ib.append('<a href="javascript:void(0);" tabindex="-1" class="editorCpColor" style="background-color: '+b+';"></a>')});ra.hide();j(".editorCpColor",ib).click(function(a){var b=1,d="#000000",a=j(a.target).css("background-color"),d=a.match(/^rgb\((\d+),\s*(\d+),\s*(\d+)\)$/);if(null!==d){for(delete d[0];3>=b;++b)d[b]=c.pInt(d[b]).toString(16),1===d[b].length&&(d[b]="0"+d[b]);d="#"+d.join("")}else d=a;jb(d)});mb.htmlColorPicker=function(a,
b,d){hb||(ra.appendTo(d),hb=!0);d=j(a).position();jb=b;gb.unbind("click.cpNamespace");h.setTimeout(function(){gb.one("click.cpNamespace",function(){ra.hide()})},100);ra.css("top",5+d.top+j(a).height()+"px").css("left",d.left+"px").show()};q.htmlFunctions={bold:function(){this.ec("bold")},italic:function(){this.ec("italic")},underline:function(){this.ec("underline")},strikethrough:function(){this.ec("strikethrough")},indent:function(){this.ec("indent")},outdent:function(){this.ec("outdent")},justifyleft:function(){this.ec("justifyLeft")},
justifycenter:function(){this.ec("justifyCenter")},justifyright:function(){this.ec("justifyRight")},horizontalrule:function(){this.ec("insertHorizontalRule",!1,"ht")},removeformat:function(){this.ec("removeFormat")},orderedlist:function(){this.ec("insertorderedlist")},unorderedlist:function(){this.ec("insertunorderedlist")},forecolor:function(a){q.htmlColorPicker(a,i.bind(function(a){this.setcolor("forecolor",a)},this),this.toolbar)},backcolor:function(a){q.htmlColorPicker(a,i.bind(function(a){this.setcolor("backcolor",
a)},this),this.toolbar)},fontname:function(a){q.htmlFontPicker(a,i.bind(function(a){this.ec("fontname",!1,a)},this),this.toolbar)}};K.prototype.selectItemCallbacks=function(a){(this.oCallbacks.onItemSelect||this.emptyFunction)(a)};K.prototype.init=function(a,b){this.oContentVisible=a;this.oContentScrollable=b;if(this.oContentVisible&&this.oContentScrollable){var d=this;j(this.oContentVisible).on("click",this.sItemSelector,function(a){d.actionClick(f.dataFor(this),a)}).on("click",this.sItemCheckedSelector,
function(a){var b=f.dataFor(this);b&&(a&&a.shiftKey?d.actionClick(b,a):(d.sLastUid=d.getItemUid(b),b.selected()?(b.checked(!1),d.selectedItem(null)):b.checked(!b.checked())))});j(h.document).on("keydown",function(a){var b=!0;if(a&&d.bUseKeyboard&&!c.inFocus())if(-1<c.inArray(a.keyCode,[g.EventKeyCode.Up,g.EventKeyCode.Down,g.EventKeyCode.Insert,g.EventKeyCode.Home,g.EventKeyCode.End,g.EventKeyCode.PageUp,g.EventKeyCode.PageDown]))d.newSelectPosition(a.keyCode,a.shiftKey),b=!1;else if(g.EventKeyCode.Delete===
a.keyCode&&!a.ctrlKey&&!a.shiftKey){if(d.oCallbacks.onDelete)d.oCallbacks.onDelete();b=!1}return b})}};K.prototype.selectByUid=function(a,b){this.useItemSelectCallback=b=c.isUnd(b)?!0:!!b;var d=i.find(this.list(),function(b){return a===this.getItemUid(b)},this);d&&this.selectedItem(d);this.useItemSelectCallback=!0};K.prototype.useKeyboard=function(a){this.bUseKeyboard=!!a};K.prototype.getItemUid=function(a){var b="",d=this.oCallbacks.onItemGetUid||null;d&&a&&(b=d(a));return b.toString()};K.prototype.newSelectPosition=
function(a,b){var d=this,c=0,e=!1,f=!1,w=null,k=this.list(),j=k?k.length:0,o=this.selectedItem();if(0<j)if(o){if(o)if(g.EventKeyCode.Down===a||g.EventKeyCode.Up===a||g.EventKeyCode.Insert===a)i.each(k,function(b){if(!f)switch(a){case g.EventKeyCode.Up:o===b?f=!0:w=b;break;case g.EventKeyCode.Down:case g.EventKeyCode.Insert:e?(w=b,f=!0):o===b&&(e=!0)}});else if(g.EventKeyCode.Home===a||g.EventKeyCode.End===a)g.EventKeyCode.Home===a?w=k[0]:g.EventKeyCode.End===a&&(w=k[k.length-1]);else if(g.EventKeyCode.PageDown===
a)for(;c<j;c++){if(o===k[c]){c+=10;c=j-1<c?j-1:c;w=k[c];break}}else if(g.EventKeyCode.PageUp===a)for(c=j;0<=c;c--)if(o===k[c]){c-=10;c=0>c?0:c;w=k[c];break}}else if(g.EventKeyCode.Down===a||g.EventKeyCode.Insert===a||g.EventKeyCode.Home===a||g.EventKeyCode.PageUp===a)w=k[0];else if(g.EventKeyCode.Up===a||g.EventKeyCode.End===a||g.EventKeyCode.PageDown===a)w=k[k.length-1];w?(o&&(b?(g.EventKeyCode.Up===a||g.EventKeyCode.Down===a)&&o.checked(!o.checked()):g.EventKeyCode.Insert===a&&o.checked(!o.checked())),
this.throttleSelection=!0,this.selectedItem(w),this.throttleSelection=!0,0!==this.iSelectTimer?(h.clearTimeout(this.iSelectTimer),this.iSelectTimer=h.setTimeout(function(){d.iSelectTimer=0;d.actionClick(w)},1E3)):(this.iSelectTimer=h.setTimeout(function(){d.iSelectTimer=0},200),this.actionClick(w)),this.scrollToSelected()):o&&(b&&(g.EventKeyCode.Up===a||g.EventKeyCode.Down===a)?o.checked(!o.checked()):g.EventKeyCode.Insert===a&&o.checked(!o.checked()))};K.prototype.scrollToSelected=function(){if(!this.oContentVisible||
!this.oContentScrollable)return!1;var a=j(this.sItemSelectedSelector,this.oContentScrollable),b=a.position(),d=this.oContentVisible.height(),a=a.outerHeight();return b&&(0>b.top||b.top+a>d)?(0>b.top?this.oContentScrollable.scrollTop(this.oContentScrollable.scrollTop()+b.top-20):this.oContentScrollable.scrollTop(this.oContentScrollable.scrollTop()+b.top-d+a+20),!0):!1};K.prototype.eventClickFunction=function(a,b){var d=this.getItemUid(a),c=0,e=0,f=null,g="",k=!1,i=!1,h=[],j=!1;if(b&&b.shiftKey&&""!==
d&&""!==this.sLastUid&&d!==this.sLastUid){h=this.list();j=a.checked();c=0;for(e=h.length;c<e;c++){f=h[c];g=this.getItemUid(f);k=!1;if(g===this.sLastUid||g===d)k=!0;k&&(i=!i);(i||k)&&f.checked(j)}}this.sLastUid=""===d?"":d};K.prototype.actionClick=function(a,b){if(a){var d=!0,c=this.getItemUid(a);b&&(b.shiftKey?(d=!1,""===this.sLastUid&&(this.sLastUid=c),a.checked(!a.checked()),this.eventClickFunction(a,b)):b.ctrlKey&&(d=!1,this.sLastUid=c,a.checked(!a.checked())));d&&(this.selectedItem(a),this.sLastUid=
c)}};K.prototype.on=function(a,b){this.oCallbacks[a]=b};ta.supported=function(){return!0};ta.prototype.set=function(a,b){var d=j.cookie(t.Values.ClientSideCookieIndexName),c=null;try{(c=null===d?null:JSON.parse(d))||(c={}),c[a]=b,j.cookie(t.Values.ClientSideCookieIndexName,JSON.stringify(c),{expires:30})}catch(e){}return c};ta.prototype.get=function(a){var b=j.cookie(t.Values.ClientSideCookieIndexName),d=null;try{d=(d=null===b?null:JSON.parse(b))&&!c.isUnd(d[a])?d[a]:null}catch(e){}return d};ua.supported=
function(){return!!h.localStorage};ua.prototype.set=function(a,b){var d=h.localStorage[t.Values.ClientSideCookieIndexName]||null,c=null;try{(c=null===d?null:JSON.parse(d))||(c={}),c[a]=b,h.localStorage[t.Values.ClientSideCookieIndexName]=JSON.stringify(c)}catch(e){}return c};ua.prototype.get=function(a){var b=h.localStorage[t.Values.ClientSideCookieIndexName]||null,d=null;try{d=(d=null===b?null:JSON.parse(b))&&!c.isUnd(d[a])?d[a]:null}catch(e){}return d};va.prototype.oDriver=null;va.prototype.set=
function(a,b){return this.oDriver?this.oDriver.set("p"+a,b):!1};va.prototype.get=function(a){return this.oDriver?this.oDriver.get("p"+a):null};Xa.prototype.bootstart=function(){};C.prototype.sPosition="";C.prototype.sTemplate="";C.prototype.viewModelName="";C.prototype.viewModelDom=null;C.prototype.viewModelTemplate=function(){return this.sTemplate};C.prototype.viewModelPosition=function(){return this.sPosition};C.prototype.cancelCommand=C.prototype.closeCommand=function(){};J.prototype.oCross=null;
J.prototype.sScreenName="";J.prototype.aViewModels=[];J.prototype.viewModels=function(){return this.aViewModels};J.prototype.screenName=function(){return this.sScreenName};J.prototype.routes=function(){return null};J.prototype.__cross=function(){return this.oCross};J.prototype.__start=function(){var a=this.routes(),b=null,d=null;c.isNonEmptyArray(a)&&(d=i.bind(this.onRoute||c.emptyFunction,this),b=Wa.create(),i.each(a,function(a){b.addRoute(a[0],d).rules=a[1]}),this.oCross=b)};E.prototype.sDefaultScreenName=
"";E.prototype.oScreens={};E.prototype.oBoot=null;E.prototype.oCurrentScreen=null;E.prototype.showLoading=function(){j("#rl-loading").show()};E.prototype.hideLoading=function(){j("#rl-loading").hide()};E.prototype.routeOff=function(){P.changed.active=!1};E.prototype.routeOn=function(){P.changed.active=!0};E.prototype.setBoot=function(a){c.isNormal(a)&&(this.oBoot=a);return this};E.prototype.screen=function(a){return""!==a&&!c.isUnd(this.oScreens[a])?this.oScreens[a]:null};E.prototype.delegateRun=
function(a,b,d){a&&a[b]&&a[b].apply(a,c.isArray(d)?d:[])};E.prototype.buildViewModel=function(a,b){if(a&&!a.__builded){var d=new a(b),l=d.viewModelPosition(),g=j("#rl-content #rl-"+l.toLowerCase()),s=null;a.__builded=!0;a.__vm=d;d.data=e.data();d.viewModelName=a.__name;g&&1===g.length?(s=j("<div>").addClass("rl-view-model").addClass("RL-"+d.viewModelTemplate()).hide().attr("data-bind",'template: {name: "'+d.viewModelTemplate()+'"}, i18nInit: true'),s.appendTo(g),d.viewModelDom=s,a.__dom=s,"Popups"===
l&&(d.cancelCommand=d.closeCommand=c.createCommand(d,function(){r.hideScreenPopup(a)})),x.runHook("view-model-pre-build",[a.__name,d,s]),f.applyBindings(d,s[0]),this.delegateRun(d,"onBuild",[s]),x.runHook("view-model-post-build",[a.__name,d,s])):c.log("Cannot find view model position: "+l)}return a?a.__vm:null};E.prototype.applyExternal=function(a,b){a&&b&&f.applyBindings(a,b)};E.prototype.hideScreenPopup=function(a){a&&(a.__vm&&a.__dom)&&(a.__dom.hide(),a.__vm.modalVisibility(!1),this.delegateRun(a.__vm,
"onHide"),this.popupVisibility(!1),i.defer(function(){a.__dom.find(".ko-select2").select2("close")}))};E.prototype.showScreenPopup=function(a,b){a&&(this.buildViewModel(a),a.__vm&&a.__dom&&(a.__dom.show(),a.__vm.modalVisibility(!0),this.delegateRun(a.__vm,"onShow",b||[]),this.popupVisibility(!0),x.runHook("view-model-on-show",[a.__name,a.__vm,b||[]])))};E.prototype.screenOnRoute=function(a,b){var d=this,e=null,f=null;""===c.pString(a)&&(a=this.sDefaultScreenName);if(""!==a){e=this.screen(a);if(!e&&
(e=this.screen(this.sDefaultScreenName)))b=a+"/"+b,a=this.sDefaultScreenName;e&&e.__started&&(e.__builded||(e.__builded=!0,c.isNonEmptyArray(e.viewModels())&&i.each(e.viewModels(),function(a){this.buildViewModel(a,e)},this),this.delegateRun(e,"onBuild")),i.defer(function(){if(d.oCurrentScreen){d.delegateRun(d.oCurrentScreen,"onHide");c.isNonEmptyArray(d.oCurrentScreen.viewModels())&&i.each(d.oCurrentScreen.viewModels(),function(a){if(a.__vm&&a.__dom&&"Popups"!==a.__vm.viewModelPosition()){a.__dom.hide();
a.__vm.viewModelVisibility(false);d.delegateRun(a.__vm,"onHide")}})}d.oCurrentScreen=e;if(d.oCurrentScreen){d.delegateRun(d.oCurrentScreen,"onShow");x.runHook("screen-on-show",[d.oCurrentScreen.screenName(),d.oCurrentScreen]);c.isNonEmptyArray(d.oCurrentScreen.viewModels())&&i.each(d.oCurrentScreen.viewModels(),function(a){if(a.__vm&&a.__dom&&"Popups"!==a.__vm.viewModelPosition()){a.__dom.show();a.__vm.viewModelVisibility(true);d.delegateRun(a.__vm,"onShow");x.runHook("view-model-on-show",[a.__name,
a.__vm])}},d)}(f=e.__cross())&&f.parse(b)}))}};E.prototype.startScreens=function(a){i.each(a,function(a){var d=(a=new a)?a.screenName():"";a&&""!==d&&(""===this.sDefaultScreenName&&(this.sDefaultScreenName=d),this.oScreens[d]=a)},this);i.each(this.oScreens,function(a){a&&(!a.__started&&a.__start)&&(a.__started=!0,a.__start(),x.runHook("screen-pre-start",[a.screenName(),a]),this.delegateRun(a,"onStart"),x.runHook("screen-post-start",[a.screenName(),a]))},this);a=Wa.create();a.addRoute(/^([a-zA-Z0-9\-]*)\/?(.*)$/,
i.bind(this.screenOnRoute,this));P.initialized.add(a.parse,a);P.changed.add(a.parse,a);P.init()};E.prototype.setHash=function(a,b){a="#"===a.substr(0,1)?a.substr(1):a;a="/"===a.substr(0,1)?a.substr(1):a;(c.isUnd(b)?0:b)?(P.changed.active=!1,P.setHash(a),P.changed.active=!0):(P.changed.active=!0,P.setHash(a))};E.prototype.bootstart=function(){this.oBoot&&this.oBoot.bootstart&&this.oBoot.bootstart();return this};r=new E;F.newInstanceFromJson=function(a){var b=new F;return b.initByJson(a)?b:null};F.prototype.name=
"";F.prototype.email="";F.prototype.privateType=null;F.prototype.validate=function(){return""!==this.name||""!==this.email};F.prototype.hash=function(a){return"#"+(a?"":this.name)+"#"+this.email+"#"};F.prototype.clearDuplicateName=function(){this.name===this.email&&(this.name="")};F.prototype.type=function(){if(null===this.privateType&&(this.email&&"@facebook.com"===this.email.substr(-13)&&(this.privateType=g.EmailType.Facebook),null===this.privateType))this.privateType=g.EmailType.Default;return this.privateType};
F.prototype.search=function(a){return-1<(this.name+" "+this.email).toLowerCase().indexOf(a.toLowerCase())};F.prototype.parse=function(a){var a=c.trim(a),b=/(?:"([^"]+)")? ?<?(.*?@[^>,]+)>?,? ?/g.exec(a);b?(this.name=b[1]||"",this.email=b[2]||"",this.clearDuplicateName()):/^[^@]+@[^@]+$/.test(a)&&(this.name="",this.email=a)};F.prototype.initByJson=function(a){var b=!1;a&&"Object/Email"===a["@Object"]&&(this.name=c.trim(a.Name),this.email=c.trim(a.Email),b=""!==this.email,this.clearDuplicateName());
return b};F.prototype.toLine=function(a,b){var d="";""!==this.email&&(b=c.isUnd(b)?!1:!!b,a&&""!==this.name?d=b?'<a href="mailto:'+c.encodeHtml('"'+this.name+'" <'+this.email+">")+'" target="_blank" tabindex="-1">'+c.encodeHtml(this.name)+"</a>":this.name:(d=this.email,""!==this.name?d=b?c.encodeHtml('"'+this.name+'" <')+'<a href="mailto:'+c.encodeHtml('"'+this.name+'" <'+this.email+">")+'" target="_blank" tabindex="-1">'+c.encodeHtml(d)+"</a>"+c.encodeHtml(">"):'"'+this.name+'" <'+d+">":b&&(d='<a href="mailto:'+
c.encodeHtml(this.email)+'" target="_blank" tabindex="-1">'+c.encodeHtml(this.email)+"</a>")));return d};F.prototype.select2Result=function(){var a="",b=e.cache().getUserPic(this.email),a=""!==b?a+('<img class="select2-user-pic pull-left" src="'+c.encodeHtml(b)+'" />'):a+('<img class="select2-user-pic pull-left" src="'+e.link().emptyContactPic()+'" />');g.EmailType.Facebook===this.type()?(a+=""+(0<this.name.length?this.name:this.email),a+='<i class="icon-facebook pull-right select2-icon-result" />'):
a+=""+(0<this.name.length?this.email+' <span class="select2-subname">('+this.name+")</span>":this.email);return a+""};F.prototype.select2Selection=function(a){var b="";if(g.EmailType.Facebook===this.type()){if(b=0<this.name.length?this.name:this.email,""!==b)return j("<pan>").text(b).appendTo(a),a.append('<i class="icon-facebook select2-icon"></i>'),null}else b=0<this.name.length?this.name+" ("+this.email+")":this.email;return b};ka.prototype.parse=function(a){var b=!1;a&&"Object/Contact"===a["@Object"]&&
(this.idContact=c.pInt(a.IdContact),this.listName=c.pString(a.ListName),this.name=c.pString(a.Name),this.emails=c.isNonEmptyArray(a.Emails)?a.Emails:[],this.imageHash=c.pString(a.ImageHash),b=!0);return b};ka.prototype.srcAttr=function(){return""===this.imageHash?e.link().emptyContactPic():e.link().getUserPicUrlFromHash(this.imageHash)};ka.prototype.generateUid=function(){return""+this.idContact};ka.prototype.lineAsCcc=function(){var a=[];this.deleted()&&a.push("deleted");this.selected()&&a.push("selected");
this.checked()&&a.push("checked");return a.join(" ")};D.newInstanceFromJson=function(a){var b=new D;return b.initByJson(a)?b:null};D.prototype.mimeType="";D.prototype.fileName="";D.prototype.estimatedSize=0;D.prototype.friendlySize="";D.prototype.isInline=!1;D.prototype.isLinked=!1;D.prototype.cid="";D.prototype.cidWithOutTags="";D.prototype.download="";D.prototype.folder="";D.prototype.uid="";D.prototype.mimeIndex="";D.prototype.initByJson=function(a){var b=!1;a&&"Object/Attachment"===a["@Object"]&&
(this.mimeType=a.MimeType,this.fileName=a.FileName,this.estimatedSize=c.pInt(a.EstimatedSize),this.isInline=!!a.IsInline,this.isLinked=!!a.IsLinked,this.cid=a.CID,this.download=a.Download,this.folder=a.Folder,this.uid=a.Uid,this.mimeIndex=a.MimeIndex,this.friendlySize=c.friendlySize(this.estimatedSize),this.cidWithOutTags=this.cid.replace(/^<+/,"").replace(/>+$/,""),b=!0);return b};D.prototype.isImage=function(){return"image/"===this.mimeType.substr(0,6)};D.prototype.isText=function(){return"text/"===
this.mimeType.substr(0,5)};D.prototype.linkDownload=function(){return e.link().attachmentDownload(this.download)};D.prototype.linkPreview=function(){return e.link().attachmentPreview(this.download)};D.prototype.linkPreviewAsPlain=function(){return e.link().attachmentPreviewAsPlain(this.download)};D.prototype.generateTransferDownloadUrl=function(){var a=this.linkDownload();"http"!==a.substr(0,4)&&(a=h.location.protocol+"//"+h.location.host+h.location.pathname+a);return this.mimeType+":"+this.fileName+
":"+a};D.prototype.eventDragStart=function(a,b){var d=b.originalEvent||b;a&&(d&&d.dataTransfer&&d.dataTransfer.setData)&&d.dataTransfer.setData("DownloadURL",this.generateTransferDownloadUrl());return!0};D.prototype.iconClass=function(){var a=this.mimeType.toLocaleString().split("/"),b="icon-file";a&&a[1]&&("image"===a[0]?b="icon-image":"text"===a[0]?b="icon-file-xml":"audio"===a[0]?b="icon-music":"video"===a[0]?b="icon-film":-1<c.inArray(a[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".split(" "))?
b="icon-file-zip":-1<c.inArray(a[1],["pdf","x-pdf"])?b="icon-file-pdf":-1<c.inArray(a[1],["exe","x-exe","x-winexe","bat"])?b="icon-console":-1<c.inArray(a[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".split(" "))?b="icon-file-word":-1<c.inArray(a[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".split(" "))?
b="icon-file-excel":-1<c.inArray(a[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".split(" "))&&(b="icon-file-powerpoint"));return b};M.prototype.id=
"";M.prototype.isInline=!1;M.prototype.isLinked=!1;M.prototype.CID="";M.prototype.fromMessage=!1;M.prototype.cancel=c.emptyFunction;M.prototype.initByUploadJson=function(a){var b=!1;a&&(this.fileName(a.Name),this.size(c.isUnd(a.Size)?0:c.pInt(a.Size)),this.tempName(c.isUnd(a.TempName)?"":a.TempName),this.isInline=!1,b=!0);return b};m.newInstanceFromJson=function(a){var b=new m;return b.initByJson(a)?b:null};m.calculateFullFromatDateValue=function(a){return Z.unix(a).format("LLL")};m.emailsToLine=
function(a,b,d){var e=[],f=0,g=0;if(c.isNonEmptyArray(a)){f=0;for(g=a.length;f<g;f++)e.push(a[f].toLine(b,d))}return e.join(", ")};m.initEmailsFromJson=function(a){var b=0,d=0,e=null,f=[];if(c.isNonEmptyArray(a)){b=0;for(d=a.length;b<d;b++)(e=F.newInstanceFromJson(a[b]))&&f.push(e)}return f};m.replyHelper=function(a,b,d){if(a&&0<a.length)for(var e=0,f=a.length;e<f;e++)c.isUnd(b[a[e].email])&&(b[a[e].email]=!0,d.push(a[e]))};m.prototype.initByJson=function(a){var b=!1;a&&"Object/Message"===a["@Object"]&&
(this.folderFullNameRaw=a.Folder,this.uid=a.Uid,this.requestHash=a.RequestHash,this.prefetched=!1,this.size(c.pInt(a.Size)),this.from=m.initEmailsFromJson(a.From),this.to=m.initEmailsFromJson(a.To),this.cc=m.initEmailsFromJson(a.Cc),this.bcc=m.initEmailsFromJson(a.Bcc),this.replyTo=m.initEmailsFromJson(a.ReplyTo),this.subject(a.Subject),this.dateTimeStampInUTC(c.pInt(a.DateTimeStampInUTC)),this.hasAttachments(!!a.HasAttachments),this.fromEmailString(m.emailsToLine(this.from,!0)),this.toEmailsString(m.emailsToLine(this.to,
!0)),this.parentUid(c.pInt(a.ParentThread)),this.threads(c.isArray(a.Threads)?a.Threads:[]),this.threadsLen(c.pInt(a.ThreadsLen)),this.initFlagsByJson(a),this.computeSenderEmail(),b=!0);return b};m.prototype.computeSenderEmail=function(){var a=e.data().sentFolder(),b=e.data().draftFolder();this.senderEmailsString(this.folderFullNameRaw===a||this.folderFullNameRaw===b?this.toEmailsString():this.fromEmailString())};m.prototype.initUpdateByMessageJson=function(a){var b=!1,d=g.MessagePriority.Normal;
a&&"Object/Message"===a["@Object"]&&(d=c.pInt(a.Priority),this.priority(-1<c.inArray(d,[g.MessagePriority.High,g.MessagePriority.Low])?d:g.MessagePriority.Normal),this.aDraftInfo=a.DraftInfo,this.sMessageId=a.MessageId,this.sInReplyTo=a.InReplyTo,this.sReferences=a.References,this.hasAttachments(!!a.HasAttachments),this.foundedCIDs=c.isArray(a.FoundedCIDs)?a.FoundedCIDs:[],this.attachments(this.initAttachmentsFromJson(a.Attachments)),this.computeSenderEmail(),b=!0);return b};m.prototype.initAttachmentsFromJson=
function(a){var b=0,d=0,e=null,f=[];if(a&&"Collection/AttachmentCollection"===a["@Object"]&&c.isNonEmptyArray(a["@Collection"])){b=0;for(d=a["@Collection"].length;b<d;b++)if(e=D.newInstanceFromJson(a["@Collection"][b]))""!==e.cidWithOutTags&&(0<this.foundedCIDs.length&&0<=c.inArray(e.cidWithOutTags,this.foundedCIDs))&&(e.isLinked=!0),f.push(e)}return f};m.prototype.initFlagsByJson=function(a){var b=!1;a&&"Object/Message"===a["@Object"]&&(this.unseen(!a.IsSeen),this.flagged(!!a.IsFlagged),this.answered(!!a.IsAnswered),
this.forwarded(!!a.IsForwarded),b=!0);return b};m.prototype.fromToLine=function(a,b){return m.emailsToLine(this.from,a,b)};m.prototype.toToLine=function(a,b){return m.emailsToLine(this.to,a,b)};m.prototype.ccToLine=function(a,b){return m.emailsToLine(this.cc,a,b)};m.prototype.bccToLine=function(a,b){return m.emailsToLine(this.bcc,a,b)};m.prototype.lineAsCcc=function(){var a=[];this.deleted()&&a.push("deleted");this.selected()&&a.push("selected");this.checked()&&a.push("checked");this.flagged()&&a.push("flagged");
this.unseen()&&a.push("unseen");this.answered()&&a.push("answered");this.forwarded()&&a.push("forwarded");this.hasAttachments()&&a.push("withAttachments");this.newForAnimation()&&a.push("new");""===this.subject()&&a.push("emptySubject");0<this.parentUid()&&a.push("hasParentMessage");0<this.threadsLen()&&a.push("hasChildrenMessage");this.hasUnseenSubMessage()&&a.push("hasUnseenSubMessage");this.hasFlaggedSubMessage()&&a.push("hasFlaggedSubMessage");return a.join(" ")};m.prototype.hasVisibleAttachments=
function(){return!!i.find(this.attachments(),function(a){return!a.isLinked})};m.prototype.findAttachmentByCid=function(a){var b=null,d=this.attachments();c.isNonEmptyArray(d)&&(a=a.replace(/^<+/,"").replace(/>+$/,""),b=i.find(d,function(b){return a===b.cidWithOutTags}));return b||null};m.prototype.messageId=function(){return this.sMessageId};m.prototype.inReplyTo=function(){return this.sInReplyTo};m.prototype.references=function(){return this.sReferences};m.prototype.fromAsSingleEmail=function(){return c.isArray(this.from)&&
this.from[0]?this.from[0].email:""};m.prototype.viewLink=function(){return e.link().messageViewLink(this.requestHash)};m.prototype.downloadLink=function(){return e.link().messageDownloadLink(this.requestHash)};m.prototype.replyEmails=function(a){var b=[],a=c.isUnd(a)?{}:a;m.replyHelper(this.replyTo,a,b);0===b.length&&m.replyHelper(this.from,a,b);return b};m.prototype.replyAllEmails=function(a){var b=[],d=[],a=c.isUnd(a)?{}:a;m.replyHelper(this.replyTo,a,b);0===b.length&&m.replyHelper(this.from,a,
b);m.replyHelper(this.to,a,b);m.replyHelper(this.cc,a,d);return[b,d]};m.prototype.textBodyToString=function(){return this.body?this.body.html():""};m.prototype.attachmentsToStringLine=function(){var a=i.map(this.attachments(),function(a){return a.fileName+" ("+a.friendlySize+")"});return a&&0<a.length?a.join(", "):""};m.prototype.getDataForWindowPopup=function(){return{popupFrom:this.fromToLine(!1),popupTo:this.toToLine(!1),popupCc:this.ccToLine(!1),popupBcc:this.bccToLine(!1),popupSubject:this.subject(),
popupDate:this.fullFormatDateValue(),popupAttachments:this.attachmentsToStringLine(),popupBody:this.textBodyToString()}};m.prototype.viewPopupMessage=function(a){c.windowPopupKnockout(this.getDataForWindowPopup(),"PopupsWindowSimpleMessage",this.subject(),function(b){b&&(b.document&&b.document.body)&&(j("img.lazy",b.document.body).each(function(a,b){var c=j(b),e=c.data("original"),f=c.attr("src");0<=a&&(e&&!f)&&c.attr("src",e)}),a&&h.setTimeout(function(){b.print()},100))})};m.prototype.printMessage=
function(){this.viewPopupMessage(!0)};m.prototype.generateUid=function(){return this.folderFullNameRaw+"/"+this.uid};m.prototype.populateByMessageListItem=function(a){this.folderFullNameRaw=a.folderFullNameRaw;this.uid=a.uid;this.requestHash=a.requestHash;this.subject(a.subject());this.size(a.size());this.dateTimeStampInUTC(a.dateTimeStampInUTC());this.priority(a.priority());this.fromEmailString(a.fromEmailString());this.toEmailsString(a.toEmailsString());this.emails=a.emails;this.from=a.from;this.to=
a.to;this.cc=a.cc;this.bcc=a.bcc;this.replyTo=a.replyTo;this.unseen(a.unseen());this.flagged(a.flagged());this.answered(a.answered());this.forwarded(a.forwarded());this.selected(a.selected());this.checked(a.checked());this.hasAttachments(a.hasAttachments());this.moment(a.moment());this.body=null;this.priority(g.MessagePriority.Normal);this.aDraftInfo=[];this.sReferences=this.sInReplyTo=this.sMessageId="";this.parentUid(a.parentUid());this.threads(a.threads());this.threadsLen(a.threadsLen());this.computeSenderEmail();
return this};m.prototype.showExternalImages=function(a){this.body&&this.body.data("rl-has-images")&&(a=c.isUnd(a)?!1:a,this.hasImages(!1),this.body.data("rl-has-images",!1),j("[data-x-src]",this.body).each(function(){a&&j(this).is("img")?j(this).addClass("lazy").attr("data-original",j(this).attr("data-x-src")).removeAttr("data-x-src"):j(this).attr("src",j(this).attr("data-x-src")).removeAttr("data-x-src")}),j("[data-x-style-url]",this.body).each(function(){var a=c.trim(j(this).attr("style")),a=""===
a?"":";"===a.substr(-1)?a+" ":a+"; ";j(this).attr("style",a+j(this).attr("data-x-style-url")).removeAttr("data-x-style-url")}),a&&(j("img.lazy",this.body).addClass("lazy-inited").lazyload({threshold:400,effect:"fadeIn",skip_invisible:!1,container:j(".RL-MailMessageView .messageView .messageItem .content")[0]}),N.resize()),c.windowResize(500))};m.prototype.showInternalImages=function(a){if(this.body&&!this.body.data("rl-init-internal-images")){var a=c.isUnd(a)?!1:a,b=this;this.body.data("rl-init-internal-images",
!0);j("[data-x-src-cid]",this.body).each(function(){var d=b.findAttachmentByCid(j(this).attr("data-x-src-cid"));d&&d.download&&(a&&j(this).is("img")?j(this).addClass("lazy").attr("data-original",d.linkPreview()):j(this).attr("src",d.linkPreview()))});j("[data-x-style-cid]",this.body).each(function(){var a="",d="",e=b.findAttachmentByCid(j(this).attr("data-x-style-cid"));e&&e.linkPreview&&(d=j(this).attr("data-x-style-cid-name"),""!==d&&(a=c.trim(j(this).attr("style")),a=""===a?"":";"===a.substr(-1)?
a+" ":a+"; ",j(this).attr("style",a+d+": url('"+e.linkPreview()+"')")))});if(a){var d=j("img.lazy",b.body),e=j(".RL-MailMessageView .messageView .messageItem .content")[0];i.delay(function(){d.addClass("lazy-inited").lazyload({threshold:400,effect:"fadeIn",skip_invisible:!1,container:e})},300)}c.windowResize(500)}};G.newInstanceFromJson=function(a){var b=new G;return b.initByJson(a)?b.initComputed():null};G.prototype.initComputed=function(){this.hasSubScribedSubfolders=f.computed(function(){return!!i.find(this.subFolders(),
function(a){return a.subScribed()})},this);this.visible=f.computed(function(){var a=this.subScribed(),b=this.hasSubScribedSubfolders();return a||b&&(!this.existen||!this.selectable)},this);this.isSystemFolder=f.computed(function(){return g.FolderType.User!==this.type()},this);this.hidden=f.computed(function(){var a=this.isSystemFolder(),b=this.hasSubScribedSubfolders();return this.isGmailFolder||a&&this.isNamespaceFolder||a&&!b},this);this.selectableForFolderList=f.computed(function(){return!this.isSystemFolder()&&
this.selectable},this);this.messageCountAll=f.computed({read:this.privateMessageCountAll,write:function(a){c.isPosNumeric(a,!0)?this.privateMessageCountAll(a):this.privateMessageCountAll.valueHasMutated()},owner:this});this.messageCountUnread=f.computed({read:this.privateMessageCountUnread,write:function(a){c.isPosNumeric(a,!0)?this.privateMessageCountUnread(a):this.privateMessageCountUnread.valueHasMutated()},owner:this});this.printableUnreadCount=f.computed(function(){var a=this.messageCountAll(),
b=this.messageCountUnread(),d=this.type();return 0<b&&(g.FolderType.Inbox===d||g.FolderType.Spam===d)?""+b:0<a&&g.FolderType.Draft===d?""+a:""},this);this.canBeDeleted=f.computed(function(){return!this.isSystemFolder()&&0===this.subFolders().length&&"INBOX"!==this.fullNameRaw},this);this.canBeSubScribed=f.computed(function(){return!this.isSystemFolder()&&this.selectable&&"INBOX"!==this.fullNameRaw},this);this.visible.subscribe(function(){c.timeOutAction("folder-list-folder-visibility-change",function(){N.trigger("folder-list-folder-visibility-change")},
100)});this.localName=f.computed(function(){ia();var a=this.type(),b=this.name();if(this.isSystemFolder())switch(a){case g.FolderType.Inbox:b=c.i18n("FOLDER_LIST/INBOX_NAME");break;case g.FolderType.SentItems:b=c.i18n("FOLDER_LIST/SENT_NAME");break;case g.FolderType.Draft:b=c.i18n("FOLDER_LIST/DRAFTS_NAME");break;case g.FolderType.Spam:b=c.i18n("FOLDER_LIST/SPAM_NAME");break;case g.FolderType.Trash:b=c.i18n("FOLDER_LIST/TRASH_NAME")}return b},this);this.manageFolderSystemName=f.computed(function(){ia();
var a="",b=this.type(),d=this.name();if(this.isSystemFolder())switch(b){case g.FolderType.Inbox:a="("+c.i18n("FOLDER_LIST/INBOX_NAME")+")";break;case g.FolderType.SentItems:a="("+c.i18n("FOLDER_LIST/SENT_NAME")+")";break;case g.FolderType.Draft:a="("+c.i18n("FOLDER_LIST/DRAFTS_NAME")+")";break;case g.FolderType.Spam:a="("+c.i18n("FOLDER_LIST/SPAM_NAME")+")";break;case g.FolderType.Trash:a="("+c.i18n("FOLDER_LIST/TRASH_NAME")+")"}if(""!==a&&"("+d+")"===a||"(inbox)"===a.toLowerCase())a="";return a},
this);this.collapsed=f.computed({read:function(){return!this.hidden()&&this.collapsedPrivate()},write:function(a){this.collapsedPrivate(a)},owner:this});return this};G.prototype.fullName="";G.prototype.fullNameRaw="";G.prototype.fullNameHash="";G.prototype.delimiter="";G.prototype.namespace="";G.prototype.deep=0;G.prototype.isNamespaceFolder=!1;G.prototype.isGmailFolder=!1;G.prototype.isUnpaddigFolder=!1;G.prototype.collapsedCss=function(){return this.hasSubScribedSubfolders()?this.collapsed()?"icon-arrow-right-3 e-collapsed-sign":
"icon-arrow-down-3 e-collapsed-sign":"icon-none e-collapsed-sign"};G.prototype.initByJson=function(a){var b=!1;a&&"Object/Folder"===a["@Object"]&&(this.name(a.Name),this.delimiter=a.Delimiter,this.fullName=a.FullName,this.fullNameRaw=a.FullNameRaw,this.fullNameHash=a.FullNameHash,this.deep=a.FullNameRaw.split(this.delimiter).length-1,this.selectable=!!a.IsSelectable,this.existen=!!a.IsExisten,this.subScribed(!!a.IsSubscribed),this.type("INBOX"===this.fullNameRaw?g.FolderType.Inbox:g.FolderType.User),
b=!0);return b};G.prototype.printableFullName=function(){return this.fullName.split(this.delimiter).join(" / ")};La.prototype.email="";La.prototype.changeAccountLink=function(){return e.link().change(this.email)};c.extendAsViewModel("PopupsFolderClearViewModel",wa);wa.prototype.clearPopup=function(){this.clearingProcess(!1);this.selectedFolder(null)};wa.prototype.onShow=function(a){this.clearPopup();a&&this.selectedFolder(a)};c.extendAsViewModel("PopupsFolderCreateViewModel",ba);ba.prototype.sNoParentText=
"";ba.prototype.simpleFolderNameValidation=function(a){return/^[^\\\/]+$/g.test(c.trim(a))};ba.prototype.clearPopup=function(){this.folderName("");this.selectedParentValue("");this.focusTrigger(!1)};ba.prototype.onShow=function(){this.clearPopup();this.focusTrigger(!0)};c.extendAsViewModel("PopupsFolderSystemViewModel",X);X.prototype.sChooseOnText="";X.prototype.sUnuseText="";X.prototype.onShow=function(a){var b="",a=c.isUnd(a)?g.SetSystemFoldersNotification.None:a;switch(a){case g.SetSystemFoldersNotification.Sent:b=
c.i18n("POPUPS_SYSTEM_FOLDERS/NOTIFICATION_SENT");break;case g.SetSystemFoldersNotification.Draft:b=c.i18n("POPUPS_SYSTEM_FOLDERS/NOTIFICATION_DRAFTS");break;case g.SetSystemFoldersNotification.Spam:b=c.i18n("POPUPS_SYSTEM_FOLDERS/NOTIFICATION_SPAM");break;case g.SetSystemFoldersNotification.Trash:b=c.i18n("POPUPS_SYSTEM_FOLDERS/NOTIFICATION_TRASH")}this.notification(b)};c.extendAsViewModel("PopupsComposeViewModel",y);y.prototype.formattedFrom=function(){var a=e.data().displayName(),b=e.data().accountEmail();
return""===a?b:a+" ("+b+")"};y.prototype.sendMessageResponse=function(a,b){var d=!1;this.sending(!1);g.StorageResultType.Success===a&&(b&&b.Result)&&(d=!0,this.modalVisibility()&&r.delegateRun(this,"closeCommand"));this.modalVisibility()&&!d&&(b&&g.Notification.CantSaveMessage===b.ErrorCode?(this.sendSuccessButSaveError(!0),h.alert(c.trim(c.i18n("COMPOSE/SAVED_ERROR_ON_SEND")))):(this.sendError(!0),h.alert(c.getNotification(b.ErrorCode?b.ErrorCode:g.Notification.CantSendMessage))))};y.prototype.saveMessageResponse=
function(a,b){var d=!1,f=null;this.saving(!1);if(g.StorageResultType.Success===a&&(b&&b.Result)&&(b.Result.NewFolder&&b.Result.NewUid)&&(this.bFromDraft&&(f=e.data().message())&&(this.draftFolder()===f.folderFullNameRaw&&this.draftUid()===f.uid)&&e.data().message(null),this.draftFolder(b.Result.NewFolder),this.draftUid(b.Result.NewUid),this.draftID(b.Result.NewID),this.modalVisibility()))this.savedTime(h.Math.round((new h.Date).getTime()/1E3)),this.savedOrSendingText(0<this.savedTime()?c.i18n("COMPOSE/SAVED_TIME",
{TIME:Z.unix(this.savedTime()-1).format("LT")}):""),d=!0,this.bFromDraft&&e.cache().setFolderHash(this.draftFolder(),"");!this.modalVisibility()&&!d&&(this.savedError(!0),this.savedOrSendingText(c.getNotification(g.Notification.CantSaveMessage)))};y.prototype.onHide=function(){r.routeOn()};y.prototype.onShow=function(a,b,d){r.routeOff();var f=this,W="",s="",w="",k="",h="",o=null,k=o="",m=[],W={},k=e.data().accountEmail(),n=[],n=s=null,m=!1,a=a||g.ComposeType.Empty;(b=b||null)&&c.isNormal(b)&&(n=c.isArray(b)&&
1===b.length?b[0]:!c.isArray(b)?b:null);null!==k&&(W[k]=!0);this.reset();c.isNonEmptyArray(d)&&this.to(d);if(""!==a&&n){k=n.fullFormatDateValue();h=n.subject();s=n.aDraftInfo;o=j(n.body).clone();c.removeBlockquoteSwitcher(o);o=o.html();switch(a){case g.ComposeType.Reply:this.to(n.replyEmails(W));this.subject(c.replySubjectAdd("Re",h));this.prepearMessageAttachments(n,a);this.aDraftInfo=["reply",n.uid,n.folderFullNameRaw];this.sInReplyTo=n.sMessageId;this.sReferences=c.trim(this.sInReplyTo+" "+n.sReferences);
m=!0;break;case g.ComposeType.ReplyAll:m=n.replyAllEmails(W);this.to(m[0]);this.cc(m[1]);this.subject(c.replySubjectAdd("Re",h));this.prepearMessageAttachments(n,a);this.aDraftInfo=["reply",n.uid,n.folderFullNameRaw];this.sInReplyTo=n.sMessageId;this.sReferences=c.trim(this.sInReplyTo+" "+n.references());m=!0;break;case g.ComposeType.Forward:this.subject(c.replySubjectAdd("Fwd",h));this.prepearMessageAttachments(n,a);this.aDraftInfo=["forward",n.uid,n.folderFullNameRaw];this.sInReplyTo=n.sMessageId;
this.sReferences=c.trim(this.sInReplyTo+" "+n.sReferences);break;case g.ComposeType.ForwardAsAttachment:this.subject(c.replySubjectAdd("Fwd",h));this.prepearMessageAttachments(n,a);this.aDraftInfo=["forward",n.uid,n.folderFullNameRaw];this.sInReplyTo=n.sMessageId;this.sReferences=c.trim(this.sInReplyTo+" "+n.sReferences);break;case g.ComposeType.Draft:this.to(n.to),this.cc(n.cc),this.bcc(n.bcc),this.bFromDraft=!0,this.draftFolder(n.folderFullNameRaw),this.draftUid(n.uid),this.draftID(n.messageId()),
this.subject(h),this.prepearMessageAttachments(n,a),this.aDraftInfo=c.isNonEmptyArray(s)&&3===s.length?s:null,this.sInReplyTo=n.sInReplyTo,this.sReferences=n.sReferences}if(this.oEditor){switch(a){case g.ComposeType.Reply:case g.ComposeType.ReplyAll:W=n.fromToLine(!1,!0);k=c.i18n("COMPOSE/REPLY_MESSAGE_TITLE",{DATETIME:k,EMAIL:W});o="<br /><br />"+k+":<blockquote><br />"+o+"</blockquote>";break;case g.ComposeType.Forward:W=n.fromToLine(!1,!0);s=n.toToLine(!1,!0);w=n.ccToLine(!1,!0);o="<br /><br /><br />"+
c.i18n("COMPOSE/FORWARD_MESSAGE_TOP_TITLE")+"<br />"+c.i18n("COMPOSE/FORWARD_MESSAGE_TOP_FROM")+": "+W+"<br />"+c.i18n("COMPOSE/FORWARD_MESSAGE_TOP_TO")+": "+s+(0<w.length?"<br />"+c.i18n("COMPOSE/FORWARD_MESSAGE_TOP_CC")+": "+w:"")+"<br />"+c.i18n("COMPOSE/FORWARD_MESSAGE_TOP_SENT")+": "+c.encodeHtml(k)+"<br />"+c.i18n("COMPOSE/FORWARD_MESSAGE_TOP_SUBJECT")+": "+c.encodeHtml(h)+"<br /><br />"+o;break;case g.ComposeType.ForwardAsAttachment:o=""}this.oEditor.setRawText(o,n.isHtml)}}else this.oEditor&&
g.ComposeType.Empty===a?this.oEditor.setRawText("<br />"+c.convertPlainTextToHtml(e.data().signature()),g.EditorDefaultType.Html===e.data().editorDefaultType()):c.isNonEmptyArray(b)&&i.each(b,function(a){f.addMessageAsAttachment(a)});n=this.getAttachmentsDownloadsForUpload();c.isNonEmptyArray(n)&&e.remote().messageUploadAttachments(function(a,b){if(g.StorageResultType.Success===a&&b&&b.Result){var d=null,c="";if(!f.viewModelVisibility())for(c in b.Result)b.Result.hasOwnProperty(c)&&(d=f.getAttachmentById(b.Result[c]))&&
d.tempName(c)}else f.setMessageAttachmentFailedDowbloadText()},n);m&&this.oEditor&&this.oEditor.focus();this.triggerForResize()};y.prototype.onBuild=function(){this.initEditor();this.initUploader();var a=this,b=null;N.on("keydown",function(b){var c=!0;b&&(a.modalVisibility()&&e.data().useKeyboardShortcuts())&&(b.ctrlKey&&g.EventKeyCode.S===b.keyCode)&&(a.saveCommand(),c=!1);return c});N.on("resize",function(){a.triggerForResize()});this.dropboxEnabled()&&(b=document.createElement("script"),b.type=
"text/javascript",b.src="https://www.dropbox.com/static/api/1/dropins.js",j(b).attr("id","dropboxjs").attr("data-app-key",e.settingsGet("DropboxApiKey")),document.body.appendChild(b))};y.prototype.getAttachmentById=function(a){for(var b=this.attachments(),d=0,c=b.length;d<c;d++)if(b[d]&&a===b[d].id)return b[d];return null};y.prototype.initEditor=function(){if(this.composeEditorTextArea()&&this.composeEditorHtmlArea()&&this.composeEditorToolbar()){var a=this;this.oEditor=new q(this.composeEditorTextArea(),
this.composeEditorHtmlArea(),this.composeEditorToolbar(),{onSwitch:function(b){b||a.removeLinkedAttachments()}});this.oEditor.initLanguage(c.i18n("EDITOR/TEXT_SWITCHER_CONFIRM"),c.i18n("EDITOR/TEXT_SWITCHER_PLAINT_TEXT"),c.i18n("EDITOR/TEXT_SWITCHER_RICH_FORMATTING"))}};y.prototype.initUploader=function(){if(this.composeUploaderButton()){var a={},b=c.pInt(e.settingsGet("AttachmentLimit")),d=new sa({action:e.link().upload(),name:"uploader",queueSize:2,multipleSizeLimit:50,disableFolderDragAndDrop:!1,
clickElement:this.composeUploaderButton(),dragAndDropElement:this.composeUploaderDropPlace(),onDragEnter:i.bind(function(){this.dragAndDropOver(!0)},this),onDragLeave:i.bind(function(){this.dragAndDropOver(!1)},this),onBodyDragEnter:i.bind(function(){this.dragAndDropVisible(!0)},this),onBodyDragLeave:i.bind(function(){this.dragAndDropVisible(!1)},this),onProgress:i.bind(function(b,d,e){var f=null;c.isUnd(a[b])?(f=this.getAttachmentById(b))&&(a[b]=f):f=a[b];f&&f.progress(" - "+Math.floor(100*(d/e))+
"%")},this),onSelect:i.bind(function(a,e){this.dragAndDropOver(!1);var f=this,g=c.isUnd(e.FileName)?"":e.FileName.toString(),i=c.isNormal(e.Size)?c.pInt(e.Size):null,g=new M(a,g,i);g.cancel=function(){f.attachments.remove(function(b){return b&&b.id===a});d&&d.cancel(a)};this.attachments.push(g);return 0<i&&0<b&&b<i?(g.error(c.i18n("UPLOAD/ERROR_FILE_IS_TOO_BIG")),!1):!0},this),onStart:i.bind(function(b){var d=null;c.isUnd(a[b])?(d=this.getAttachmentById(b))&&(a[b]=d):d=a[b];d&&(d.waiting(!1),d.uploading(!0))},
this),onComplete:i.bind(function(b,d,e){var f="",g=null,i=null,h=this.getAttachmentById(b),i=d&&e&&e.Result&&e.Result.Attachment?e.Result.Attachment:null,g=e&&e.Result&&e.Result.ErrorCode?e.Result.ErrorCode:null;null!==g?f=c.getUploadErrorDescByCode(g):i||(f=c.i18n("UPLOAD/ERROR_UNKNOWN"));h&&(""!==f&&0<f.length?h.waiting(!1).uploading(!1).error(f):i&&(h.waiting(!1).uploading(!1),h.initByUploadJson(i)),c.isUnd(a[b])&&delete a[b])},this)});d?this.addAttachmentEnabled(!0).dragAndDropEnabled(d.isDragAndDropSupported()):
this.addAttachmentEnabled(!1).dragAndDropEnabled(!1)}};y.prototype.prepearAttachmentsForSendOrSave=function(){var a={};i.each(this.attachmentsInReady(),function(b){b&&(""!==b.tempName()&&b.enabled())&&(a[b.tempName()]=[b.fileName(),b.isInline?"1":"0",b.CID])});return a};y.prototype.addMessageAsAttachment=function(a){if(a){var b=this,d=null,d=a.subject(),d=".eml"===d.substr(-4).toLowerCase()?d:d+".eml",d=new M(a.requestHash,d,a.size());d.fromMessage=!0;var c=a.requestHash;d.cancel=function(){b.attachments.remove(function(a){return a&&
a.id===c})};d.waiting(!1).uploading(!0);this.attachments.push(d)}};y.prototype.addDropboxAttachment=function(a){var b=this,d=c.pInt(e.settingsGet("AttachmentLimit")),f=null,i=a.bytes,f=new M(a.link,a.name,i);f.fromMessage=!1;var s=a.link;f.cancel=function(){b.attachments.remove(function(a){return a&&a.id===s})};f.waiting(!1).uploading(!0);this.attachments.push(f);if(0<i&&0<d&&d<i)return f.uploading(!1),f.error(c.i18n("UPLOAD/ERROR_FILE_IS_TOO_BIG")),!1;e.remote().composeUploadExternals(function(a,
b){var d=!1;f.uploading(!1);g.StorageResultType.Success===a&&(b&&b.Result)&&b.Result[f.id]&&(d=!0,f.tempName(b.Result[f.id]));d||f.error(c.getUploadErrorDescByCode(g.UploadErrorCode.FileNoUploaded))},[a.link]);return!0};y.prototype.prepearMessageAttachments=function(a,b){if(a){var d=this,e=c.isNonEmptyArray(a.attachments())?a.attachments():[],f=0,i=e.length,h=null,k=null,j=function(a){return function(){d.attachments.remove(function(b){return b&&b.id===a})}};if(g.ComposeType.ForwardAsAttachment===
b)this.addMessageAsAttachment(a);else for(;f<i;f++)k=e[f],h=new M(k.download,k.fileName,k.estimatedSize,k.isInline,k.isLinked,k.cid),h.fromMessage=!0,h.cancel=j(k.download),h.waiting(!1).uploading(!0),this.attachments.push(h)}};y.prototype.removeLinkedAttachments=function(){this.attachments.remove(function(a){return a&&a.isLinked})};y.prototype.setMessageAttachmentFailedDowbloadText=function(){i.each(this.attachments(),function(a){a&&a.fromMessage&&a.waiting(!1).uploading(!1).error(c.getUploadErrorDescByCode(g.UploadErrorCode.FileNoUploaded))},
this)};y.prototype.isEmptyForm=function(a){a=(a=c.isUnd(a)?!0:!!a)?0===this.attachments().length:0===this.attachmentsInReady().length;return 0===this.to().length&&0===this.cc().length&&0===this.bcc().length&&0===this.subject().length&&a&&""===this.oEditor.getTextForRequest()};y.prototype.reset=function(){this.to([]);this.cc([]);this.bcc([]);this.subject("");this.aDraftInfo=null;this.sInReplyTo="";this.bFromDraft=!1;this.sReferences="";this.bReloadFolder=!1;this.sendError(!1);this.sendSuccessButSaveError(!1);
this.savedError(!1);this.savedTime(0);this.savedOrSendingText("");this.emptyToError(!1);this.showCcAndBcc(!1);this.attachments([]);this.dragAndDropOver(!1);this.dragAndDropVisible(!1);this.draftFolder("");this.draftUid("");this.draftID("");this.sending(!1);this.saving(!1);this.oEditor&&this.oEditor.clear()};y.prototype.getAttachmentsDownloadsForUpload=function(){return i.map(i.filter(this.attachments(),function(a){return a&&""===a.tempName()}),function(a){return a.id})};y.prototype.triggerForResize=
function(){this.resizer(!this.resizer())};c.extendAsViewModel("PopupsContactsViewModel",L);L.prototype.removeCheckedOrSelectedContactsFromList=function(){var a=this,b=this.contacts,d=this.currentContact(),c=this.contactsCheckedOrSelected();0<c.length&&(i.each(c,function(b){d&&d.idContact===b.idContact&&(d=null,a.currentContact(null));b.deleted(!0)}),i.delay(function(){i.each(c,function(a){b.remove(a)})},500))};L.prototype.deleteSelectedContacts=function(){0<this.contactsCheckedOrSelected().length&&
(e.remote().contactsDelete(i.bind(this.deleteResponse,this),this.contactsCheckedOrSelectedUids()),this.removeCheckedOrSelectedContactsFromList())};L.prototype.deleteResponse=function(a,b){500<(g.StorageResultType.Success===a&&b&&b.Time?c.pInt(b.Time):0)?this.reloadContactList():i.delay(function(a){return function(){a.reloadContactList()}}(this),500)};L.prototype.populateViewContact=function(a){this.imageTrigger(!1);this.emptySelection(!1);a?(this.viewID(a.idContact),this.viewName(a.name),this.viewEmail(a.emails[0]||
""),this.viewImageUrl(a.srcAttr())):(this.viewID(""),this.viewName(""),this.viewEmail(""),this.viewImageUrl(e.link().emptyContactPic()))};L.prototype.reloadContactList=function(){var a=this;this.contacts.loading(!0);e.remote().contacts(function(b,d){var e=[];g.StorageResultType.Success===b&&(d&&d.Result&&d.Result.List)&&c.isNonEmptyArray(d.Result.List)&&(e=i.map(d.Result.List,function(a){var b=new ka;return b.parse(a)?b:null}),e=i.compact(e));a.contacts(e);a.viewClearSearch(""!==a.search());a.contacts.loading(!1);
""!==a.viewID()&&(!a.currentContact()&&a.contacts.setSelectedByUid)&&a.contacts.setSelectedByUid(""+a.viewID())},this.search())};L.prototype.onBuild=function(a){this.initUploader();this.oContentVisible=j(".b-list-content",a);this.oContentScrollable=j(".content",this.oContentVisible);this.selector.init(this.oContentVisible,this.oContentScrollable);this.viewImageUrl.valueHasMutated();f.computed(function(){var a=this.modalVisibility(),d=e.data().useKeyboardShortcuts();this.selector.useKeyboard(a&&d)},
this).extend({notify:"always"})};L.prototype.initUploader=function(){var a=this,b=null;h.File&&(h.FileReader&&this.imageUploader())&&(b=new sa({queueSize:1,multipleSizeLimit:1,clickElement:this.imageUploader(),disableDragAndDrop:!0,disableMultiple:!0,onSelect:function(b,e){if(e&&e.File&&e.File.type){var f=null,g=e.File;e.File.type.match(/image.*/)?(f=new h.FileReader,f.onload=function(b){b&&(b.target&&b.target.result)&&c.resizeAndCrop(b.target.result,150,function(b){a.viewImageUrl(b);a.imageTrigger(!0)})},
f.readAsDataURL(g)):h.alert("this file is not an image.")}return!1}}));return b};L.prototype.onShow=function(){r.routeOff();this.reloadContactList()};L.prototype.onHide=function(){r.routeOn();this.currentContact(null);this.emptySelection(!0);this.search("");i.each(this.contacts(),function(a){a.checked(!1)})};c.extendAsViewModel("PopupsAdvancedSearchViewModel",ca);ca.prototype.buildSearchStringValue=function(a){-1<a.indexOf(" ")&&(a='"'+a+'"');return a};ca.prototype.buildSearchString=function(){var a=
[],b=c.trim(this.from()),d=c.trim(this.to()),e=c.trim(this.subject()),f=c.trim(this.text());b&&""!==b&&a.push("from:"+this.buildSearchStringValue(b));d&&""!==d&&a.push("to:"+this.buildSearchStringValue(d));e&&""!==e&&a.push("subject:"+this.buildSearchStringValue(e));this.hasAttachments()&&a.push("has:attachments");-1<this.selectedDateValue()&&a.push("date:"+Z().subtract("days",this.selectedDateValue()).format("YYYY.MM.DD")+"/");f&&""!==f&&a.push("text:"+this.buildSearchStringValue(f));return c.trim(a.join(" "))};
ca.prototype.clearPopup=function(){this.from("");this.to("");this.subject("");this.text("");this.selectedDateValue(-1);this.hasAttachments(!1);this.fromFocus(!0)};ca.prototype.onShow=function(){this.clearPopup();this.fromFocus(!0)};c.extendAsViewModel("PopupsAddAccountViewModel",da);da.prototype.clearPopup=function(){this.email("");this.login("");this.password("");this.emailError(!1);this.loginError(!1);this.passwordError(!1);this.submitRequest(!1);this.submitError("")};da.prototype.onShow=function(){this.clearPopup();
this.emailFocus(!0)};da.prototype.onBuild=function(){this.allowCustomLogin(!!e.settingsGet("AllowCustomLogin"))};c.extendAsViewModel("LoginViewModel",la);la.prototype.onShow=function(){r.routeOff();i.delay(i.bind(function(){""!==this.email()&&""!==this.password()?this.submitFocus(!0):this.emailFocus(!0)},this),100)};la.prototype.onHide=function(){this.submitFocus(!1);this.emailFocus(!1)};la.prototype.onBuild=function(){var a=this,b=e.settingsGet("JsHash"),d=function(b){b=c.pInt(b);0===b?(a.submitRequest(!0),
e.loginAndLogoutReload()):a.submitError(c.getNotification(b))};this.allowCustomLogin(!!e.settingsGet("AllowCustomLogin"));this.facebookLoginEnabled(!!e.settingsGet("AllowFacebookSocial"));this.twitterLoginEnabled(!!e.settingsGet("AllowTwitterSocial"));this.googleLoginEnabled(!!e.settingsGet("AllowGoogleSocial"));switch((e.settingsGet("SignMe")||"unused").toLowerCase()){case g.LoginSignMeTypeAsString.DefaultOff:this.signMeType(g.LoginSignMeType.DefaultOff);break;case g.LoginSignMeTypeAsString.DefaultOn:this.signMeType(g.LoginSignMeType.DefaultOn);
break;default:case g.LoginSignMeTypeAsString.Unused:this.signMeType(g.LoginSignMeType.Unused)}this.email(e.data().devEmail);this.login(e.data().devLogin);this.password(e.data().devPassword);this.googleLoginEnabled()&&(h["rl_"+b+"_google_login_service"]=d);this.facebookLoginEnabled()&&(h["rl_"+b+"_facebook_login_service"]=d);this.twitterLoginEnabled()&&(h["rl_"+b+"_twitter_login_service"]=d)};i.extend(Q.prototype,C.prototype);Q.prototype.accountClick=function(a,b){if(a&&b&&!c.isUnd(b.which)&&1===b.which){var d=
this;this.accountsLoading(!0);i.delay(function(){d.accountsLoading(!1)},1E3)}return!0};Q.prototype.emailTitle=function(){return e.data().accountEmail()};Q.prototype.settingsClick=function(){r.setHash(e.link().settings())};Q.prototype.addAccountClick=function(){this.allowAddAccount&&r.showScreenPopup(da)};Q.prototype.logoutClick=function(){e.remote().logout(function(){h.__rlah_clear&&h.__rlah_clear();e.loginAndLogoutReload(!0,e.settingsGet("ParentEmail")&&0<e.settingsGet("ParentEmail").length)})};
i.extend(Ya.prototype,Q.prototype);i.extend(Za.prototype,Q.prototype);c.extendAsViewModel("MailBoxFolderListViewModel",ea);ea.prototype.onBuild=function(a){a.on("click",".b-folders .e-item .e-link .e-collapsed-sign",function(a){var d=f.dataFor(this),e=!1;d&&a&&(e=d.collapsed(),c.setExpandedFolder(d.fullNameHash,e),d.collapsed(!e),a.preventDefault(),a.stopPropagation())}).on("click",".b-folders .e-item .e-link.selectable",function(a){a.preventDefault();if(a=f.dataFor(this))e.data().usePreviewPane()||
e.data().message(null),a.fullNameRaw===e.data().currentFolderFullNameRaw()&&e.cache().setFolderHash(a.fullNameRaw,""),r.setHash(e.link().mailBox(a.fullNameHash))})};ea.prototype.messagesDrop=function(a,b){if(a&&b&&b.helper){var d=b.helper.data("rl-folder"),e=b.helper.data("rl-uids");z&&(z.__vm&&c.isNormal(d)&&c.isArray(e))&&z.__vm.moveMessagesToFolder(d,e,a.fullNameRaw)}};ea.prototype.composeClick=function(){r.showScreenPopup(y)};ea.prototype.contactsClick=function(){this.allowContacts&&r.showScreenPopup(L)};
c.extendAsViewModel("MailBoxMessageListViewModel",z);z.prototype.emptySubjectValue="";z.prototype.searchEnterAction=function(){this.mainMessageListSearch(this.sLastSearchValue);this.inputMessageListSearchFocus(!1)};z.prototype.cancelSearch=function(){this.mainMessageListSearch("");this.inputMessageListSearchFocus(!1)};z.prototype.removeMessagesFromList=function(a,b,d,f){var d=c.isNormal(d)?d:"",f=c.isUnd(f)?!1:!!f,g=0,s=e.data(),h=e.cache().getFolderFromCacheList(a),k=""===d?null:e.cache().getFolderFromCacheList(d||
""),j=s.currentFolderFullNameRaw(),o=s.message(),m=j===a?i.filter(s.messageList(),function(a){return a&&-1<c.inArray(a.uid,b)}):[];f||i.each(m,function(a){a&&a.unseen()&&g++});h&&!f&&(h.messageCountAll(0<=h.messageCountAll()-b.length?h.messageCountAll()-b.length:0),0<g&&h.messageCountUnread(0<=h.messageCountUnread()-g?h.messageCountUnread()-g:0));k&&!f&&(k.messageCountAll(k.messageCountAll()+b.length),0<g&&k.messageCountUnread(k.messageCountUnread()+g));0<m.length&&(i.each(m,function(a){if(o&&o.requestHash===
a.requestHash){o=null;s.message(null)}a.deleted(true)}),i.delay(function(){i.each(m,function(a){s.messageList.remove(a)})},400),f||(e.data().messageListIsNotCompleted(!0),e.cache().setFolderHash(a,""),c.isNormal(d)&&e.cache().setFolderHash(d||"","")))};z.prototype.removeCheckedOrSelectedMessagesFromList=function(a){this.removeMessagesFromList(e.data().currentFolderFullNameRaw(),i.map(e.data().messageListCheckedOrSelected(),function(a){return a.uid}),a)};z.prototype.moveOrDeleteResponse=function(a,
b){g.StorageResultType.Success===a&&e.data().currentFolder()&&(b&&c.isArray(b.Result)&&2===b.Result.length?e.cache().setFolderHash(b.Result[0],b.Result[1]):(b&&g.Notification.CantMoveMessage===b.ErrorCode&&h.alert(c.getNotification(g.Notification.CantMoveMessage)),e.cache().setFolderHash(e.data().currentFolderFullNameRaw(),"")),e.reloadMessageList(),e.quotaDebounce())};z.prototype.moveMessagesToFolder=function(a,b,d){if(a!==d&&c.isArray(b)&&0<b.length){var f=e.cache().getFolderFromCacheList(a),g=
e.cache().getFolderFromCacheList(d);if(f&&g)return e.remote().messagesMove(i.bind(this.moveOrDeleteResponse,this),f.fullNameRaw,g.fullNameRaw,b),g.actionBlink(!0),this.removeMessagesFromList(a,b,d),!0}return!1};z.prototype.moveSelectedMessagesToFolder=function(a){return this.canBeMoved()?this.moveMessagesToFolder(e.data().currentFolderFullNameRaw(),e.data().messageListCheckedOrSelectedUidsWithSubMails(),a):!1};z.prototype.deleteSelectedMessageFromCurrentFolder=function(a,b){if(this.canBeMoved()){var b=
c.isUnd(b)?!0:!!b,d=e.cache().getFolderFromCacheList(g.FolderType.Spam===a?e.data().spamFolder():e.data().trashFolder());!d&&b?r.showScreenPopup(X,[g.FolderType.Spam===a?g.SetSystemFoldersNotification.Spam:g.SetSystemFoldersNotification.Trash]):!b||d&&(t.Values.UnuseOptionValue===d.fullNameRaw||e.data().currentFolderFullNameRaw()===d.fullNameRaw)?(e.remote().messagesDelete(i.bind(this.moveOrDeleteResponse,this),e.data().currentFolderFullNameRaw(),e.data().messageListCheckedOrSelectedUidsWithSubMails()),
this.removeCheckedOrSelectedMessagesFromList()):d&&(e.remote().messagesMove(i.bind(this.moveOrDeleteResponse,this),e.data().currentFolderFullNameRaw(),d.fullNameRaw,e.data().messageListCheckedOrSelectedUidsWithSubMails()),d.actionBlink(!0),this.removeCheckedOrSelectedMessagesFromList(d.fullNameRaw))}};z.prototype.dragAndDronHelper=function(a){a&&a.checked(!0);a=c.draggeblePlace();a.data("rl-folder",e.data().currentFolderFullNameRaw());a.data("rl-uids",e.data().messageListCheckedOrSelectedUidsWithSubMails());
a.find(".text").text(e.data().messageListCheckedOrSelectedUidsWithSubMails().length);return a};z.prototype.onMessageResponse=function(a,b,d){var f=e.data();f.messageLoading(!1);g.StorageResultType.Success===a&&b&&b.Result?f.setMessage(b,d):g.StorageResultType.Unload===a?(f.message(null),f.messageError("")):g.StorageResultType.Abort!==a&&(f.message(null),f.messageError(b&&b.ErrorCode?c.getNotification(b.ErrorCode):c.getNotification(g.Notification.UnknownError)))};z.prototype.populateMessageBody=function(a){a&&
(e.remote().message(this.onMessageResponse,a.folderFullNameRaw,a.uid)?e.data().messageLoading(!0):c.log("Error: Unknown message request: "+a.folderFullNameRaw+" ~ "+a.uid+" [e-101]"))};z.prototype.setAction=function(a,b,d){var f=[],h=null,s=e.cache(),j=0;c.isUnd(d)&&(d=e.data().messageListChecked());f=i.map(d,function(a){return a.uid});if(""!==a&&0<f.length){switch(b){case g.MessageSetAction.SetSeen:i.each(d,function(a){a.unseen()&&j++;a.unseen(!1);s.storeMessageFlagsToCache(a)});(h=s.getFolderFromCacheList(a))&&
h.messageCountUnread(h.messageCountUnread()-j);e.remote().messageSetSeen(c.emptyFunction,a,f,!0);break;case g.MessageSetAction.UnsetSeen:i.each(d,function(a){a.unseen()&&j++;a.unseen(!0);s.storeMessageFlagsToCache(a)});(h=s.getFolderFromCacheList(a))&&h.messageCountUnread(h.messageCountUnread()-j+f.length);e.remote().messageSetSeen(c.emptyFunction,a,f,!1);break;case g.MessageSetAction.SetFlag:i.each(d,function(a){a.flagged(!0);s.storeMessageFlagsToCache(a)});e.remote().messageSetFlagged(c.emptyFunction,
a,f,!0);break;case g.MessageSetAction.UnsetFlag:i.each(d,function(a){a.flagged(!1);s.storeMessageFlagsToCache(a)}),e.remote().messageSetFlagged(c.emptyFunction,a,f,!1)}e.reloadFlagsCurrentMessageListAndMessageFromCache()}};z.prototype.setActionForAll=function(a,b){var d=null,f=e.data().messageList(),h=e.cache();if(""!==a&&(d=h.getFolderFromCacheList(a))){switch(b){case g.MessageSetAction.SetSeen:if(d=h.getFolderFromCacheList(a))i.each(f,function(a){a.unseen(!1)}),d.messageCountUnread(0),h.clearMessageFlagsFromCacheByFolder(a);
e.remote().messageSetSeenToAll(c.emptyFunction,a,!0);break;case g.MessageSetAction.UnsetSeen:if(d=h.getFolderFromCacheList(a))i.each(f,function(a){a.unseen(!0)}),d.messageCountUnread(d.messageCountAll()),h.clearMessageFlagsFromCacheByFolder(a);e.remote().messageSetSeenToAll(c.emptyFunction,a,!1)}e.reloadFlagsCurrentMessageListAndMessageFromCache()}};z.prototype.listSetSeen=function(){this.setAction(e.data().currentFolderFullNameRaw(),g.MessageSetAction.SetSeen,e.data().messageListCheckedOrSelected())};
z.prototype.listSetAllSeen=function(){this.setActionForAll(e.data().currentFolderFullNameRaw(),g.MessageSetAction.SetSeen)};z.prototype.listUnsetSeen=function(){this.setAction(e.data().currentFolderFullNameRaw(),g.MessageSetAction.UnsetSeen,e.data().messageListCheckedOrSelected())};z.prototype.listSetFlags=function(){this.setAction(e.data().currentFolderFullNameRaw(),g.MessageSetAction.SetFlag,e.data().messageListCheckedOrSelected())};z.prototype.listUnsetFlags=function(){this.setAction(e.data().currentFolderFullNameRaw(),
g.MessageSetAction.UnsetFlag,e.data().messageListCheckedOrSelected())};z.prototype.onBuild=function(a){var b=this,d=e.data();this.oContentVisible=j(".b-content",a);this.oContentScrollable=j(".content",this.oContentVisible);this.oContentVisible.on("click",".fullThreadHandle",function(){var a=[],b=f.dataFor(this);b&&!b.lastInCollapsedThreadLoading()&&(e.data().messageListThreadFolder(b.folderFullNameRaw),a=e.data().messageListThreadUids(),b.lastInCollapsedThread()?a.push(0<b.parentUid()?b.parentUid():
b.uid):a=i.without(a,0<b.parentUid()?b.parentUid():b.uid),e.data().messageListThreadUids(i.uniq(a)),b.lastInCollapsedThreadLoading(!0),b.lastInCollapsedThread(!b.lastInCollapsedThread()),e.reloadMessageList());return!1});this.selector.init(this.oContentVisible,this.oContentScrollable);Ea.on("keydown",function(a){var f=!0,h=a?a.keyCode:0;if(a&&b.viewModelVisibility()&&d.useKeyboardShortcuts()&&!e.popupVisibility()&&!d.messageFullScreenMode()&&!c.inFocus()&&(d.usePreviewPane()||!d.message()&&(g.EventKeyCode.Delete===
h||g.EventKeyCode.A===h))&&a.ctrlKey&&g.EventKeyCode.A===h)b.checkAll(!(b.checkAll()&&!b.isIncompleteChecked())),f=!1;return f});a.on("click",".pagenator .page",function(){var a=f.dataFor(this);a&&r.setHash(e.link().mailBox(d.currentFolderFullNameHash(),a.value,d.messageListSearch()))}).on("click",".messageList .checkboxCkeckAll",function(){b.checkAll(!b.checkAll())}).on("click",".messageList .messageListItem .flagParent",function(){var a=f.dataFor(this),e=d.messageListCheckedOrSelected(),h=[];a&&
(0<e.length&&(h=i.map(e,function(a){return a.uid})),0<h.length&&-1<c.inArray(a.uid,h)?b.setAction(a.folderFullNameRaw,a.flagged()?g.MessageSetAction.UnsetFlag:g.MessageSetAction.SetFlag,e):b.setAction(a.folderFullNameRaw,a.flagged()?g.MessageSetAction.UnsetFlag:g.MessageSetAction.SetFlag,[a]))});f.computed(function(){var a=e.data(),b=this.viewModelVisibility(),d=e.popupVisibility(),c=a.useKeyboardShortcuts(),a=a.messageFullScreenMode();this.selector.useKeyboard(b&&c&&!a&&!d)},this).extend({notify:"always"});
this.initUploaderForAppend()};z.prototype.composeClick=function(){r.showScreenPopup(y)};z.prototype.advancedSearchClick=function(){r.showScreenPopup(ca)};z.prototype.quotaTooltip=function(){return c.i18n("MESSAGE_LIST/QUOTA_SIZE",{SIZE:c.friendlySize(this.userUsageSize()),PROC:this.userUsageProc(),LIMIT:c.friendlySize(this.userQuota())})};z.prototype.initUploaderForAppend=function(){return!e.settingsGet("AllowAppendMessage")||!this.dragOverArea()?!1:!!new sa({action:e.link().append(),name:"AppendFile",
queueSize:1,multipleSizeLimit:1,disableFolderDragAndDrop:!0,hidden:{Folder:function(){return e.data().currentFolderFullNameRaw()}},dragAndDropElement:this.dragOverArea(),dragAndDropBodyElement:this.dragOverBodyArea(),onDragEnter:i.bind(function(){this.dragOverEnter(true)},this),onDragLeave:i.bind(function(){this.dragOverEnter(false)},this),onBodyDragEnter:i.bind(function(){this.dragOver(true)},this),onBodyDragLeave:i.bind(function(){this.dragOver(false)},this),onSelect:i.bind(function(a,b){if(a&&
b&&"message/rfc822"===b.Type){e.data().messageListLoading(true);return true}return false}),onComplete:i.bind(function(){e.reloadMessageList(true,true)},this)})};c.extendAsViewModel("MailBoxMessageViewViewModel",H);H.prototype.scrollToTop=function(){var a=j(".messageItem.nano .content",this.viewModelDom);a&&a[0]?a.scrollTop(0):j(".messageItem",this.viewModelDom).scrollTop(0);c.windowResize()};H.prototype.fullScreen=function(){this.fullScreenMode(!0);c.windowResize()};H.prototype.unFullScreen=function(){this.fullScreenMode(!1);
c.windowResize()};H.prototype.toggleFullScreen=function(){c.removeSelection();this.fullScreenMode(!this.fullScreenMode());c.windowResize()};H.prototype.replyOrforward=function(a){r.showScreenPopup(y,[a,e.data().message()])};H.prototype.onBuild=function(a){var b=this,d=e.data();Ea.on("keydown",function(a){var e=!0,a=a?a.keyCode:0;if(0<a&&(g.EventKeyCode.Backspace===a||g.EventKeyCode.Esc===a)&&b.viewModelVisibility()&&d.useKeyboardShortcuts()&&!c.inFocus()&&d.message())b.fullScreenMode(!1),d.usePreviewPane()||
d.message(null),e=!1;return e});j(".attachmentsPlace",a).magnificPopup({delegate:".magnificPopupImage:visible",type:"image",preload:[1,1],gallery:{enabled:!0},callbacks:{open:function(){d.useKeyboardShortcuts(!1)},close:function(){d.useKeyboardShortcuts(!0)}},mainClass:"mfp-fade",removalDelay:300});a.on("click",".attachmentsPlace .attachmentPreview",function(a){a&&a.stopPropagation&&a.stopPropagation()}).on("click",".attachmentsPlace .attachmentItem",function(){var a=f.dataFor(this);a&&a.download&&
e.download(a.linkDownload())});this.oMessageScrollerDom=(this.oMessageScrollerDom=a.find(".messageItem .content"))&&this.oMessageScrollerDom[0]?this.oMessageScrollerDom:null};H.prototype.isDraftFolder=function(){return e.data().message()&&e.data().draftFolder()===e.data().message().folderFullNameRaw};H.prototype.isSentFolder=function(){return e.data().message()&&e.data().sentFolder()===e.data().message().folderFullNameRaw};H.prototype.isDraftOrSentFolder=function(){return this.isDraftFolder()||this.isSentFolder()};
H.prototype.composeClick=function(){r.showScreenPopup(y)};H.prototype.editMessage=function(){e.data().message()&&r.showScreenPopup(y,[g.ComposeType.Draft,e.data().message()])};H.prototype.scrollMessageToTop=function(){this.oMessageScrollerDom&&this.oMessageScrollerDom.scrollTop(0)};H.prototype.showImages=function(a){a&&a.showExternalImages&&a.showExternalImages(!0)};c.extendAsViewModel("SettingsMenuViewModel",ya);ya.prototype.link=function(a){return e.link().settings(a)};ya.prototype.backToMailBoxClick=
function(){r.setHash(e.link().inbox())};c.extendAsViewModel("SettingsPaneViewModel",za);za.prototype.onShow=function(){e.data().message(null)};za.prototype.backToMailBoxClick=function(){r.setHash(e.link().inbox())};c.addSettingsViewModel(Ma,"SettingsGeneral","SETTINGS_LABELS/LABEL_GENERAL_NAME","general",!0);Ma.prototype.onBuild=function(){var a=this;i.delay(function(){var b=e.data(),d=c.settingsSaveHelperSimpleFunction(a.mppTrigger,a);b.language.subscribe(function(b){a.languageTrigger(g.SaveSettingsStep.Animate);
j.ajax({url:e.link().langLink(b),dataType:"script",cache:!0}).done(function(){c.i18nToDoc();a.languageTrigger(g.SaveSettingsStep.TrueResult)}).fail(function(){a.languageTrigger(g.SaveSettingsStep.FalseResult)}).always(function(){i.delay(function(){a.languageTrigger(g.SaveSettingsStep.Idle)},1E3)});e.remote().saveSettings(c.emptyFunction,{Language:b})});b.editorDefaultType.subscribe(function(a){e.remote().saveSettings(c.emptyFunction,{EditorDefaultType:a})});b.messagesPerPage.subscribe(function(a){e.remote().saveSettings(d,
{MPP:a})});b.showImages.subscribe(function(a){e.remote().saveSettings(c.emptyFunction,{ShowImages:a?"1":"0"})});b.showAnimation.subscribe(function(a){e.remote().saveSettings(c.emptyFunction,{ShowAnimation:a?"1":"0"})});b.useDesktopNotifications.subscribe(function(a){c.timeOutAction("SaveDesktopNotifications",function(){e.remote().saveSettings(c.emptyFunction,{DesktopNotifications:a?"1":"0"})},3E3)});b.replySameFolder.subscribe(function(a){c.timeOutAction("SaveReplySameFolder",function(){e.remote().saveSettings(c.emptyFunction,
{ReplySameFolder:a?"1":"0"})},3E3)});b.useThreads.subscribe(function(a){b.messageList([]);e.remote().saveSettings(c.emptyFunction,{UseThreads:a?"1":"0"})});b.usePreviewPane.subscribe(function(a){b.messageList.valueHasMutated();e.remote().saveSettings(c.emptyFunction,{UsePreviewPane:a?"1":"0"})});b.useCheckboxesInList.subscribe(function(a){e.remote().saveSettings(c.emptyFunction,{UseCheckboxesInList:a?"1":"0"})})},50)};Ma.prototype.onShow=function(){e.data().desktopNotifications.valueHasMutated()};
c.addSettingsViewModel($a,"SettingsPersonal","SETTINGS_LABELS/LABEL_PERSONAL_NAME","personal");$a.prototype.onBuild=function(){var a=this;i.delay(function(){var b=e.data(),d=c.settingsSaveHelperSimpleFunction(a.nameTrigger,a),f=c.settingsSaveHelperSimpleFunction(a.replyTrigger,a),g=c.settingsSaveHelperSimpleFunction(a.signatureTrigger,a);b.displayName.subscribe(function(a){e.remote().saveSettings(d,{DisplayName:a})});b.replyTo.subscribe(function(a){e.remote().saveSettings(f,{ReplyTo:a})});b.signature.subscribe(function(a){e.remote().saveSettings(g,
{Signature:a})})},50)};c.addSettingsViewModel(ma,"SettingsAccounts","SETTINGS_LABELS/LABEL_ACCOUNTS_NAME","accounts");ma.prototype.addNewAccount=function(){r.showScreenPopup(da)};ma.prototype.deleteAccount=function(a){if(a&&a.deleteAccess()){this.accountForDeletion(null);var b=function(b){return a===b};a&&(e.data().accounts.remove(b),e.remote().accountDelete(function(){e.accounts()},a.email))}};c.addSettingsViewModel(Na,"SettingsSocial","SETTINGS_LABELS/LABEL_SOCIAL_NAME","social");c.addSettingsViewModel(na,
"SettingsChangePassword","SETTINGS_LABELS/LABEL_CHANGE_PASSWORD_NAME","change-password");na.prototype.onHide=function(){this.changeProcess(!1);this.currentPassword("");this.newPassword("")};na.prototype.onChangePasswordResponse=function(a,b){this.changeProcess(!1);g.StorageResultType.Success===a&&b&&b.Result?(this.currentPassword(""),this.newPassword(""),this.passwordUpdateSuccess(!0)):this.passwordUpdateError(!0)};c.addSettingsViewModel(R,"SettingsFolders","SETTINGS_LABELS/LABEL_FOLDERS_NAME","folders");
R.prototype.folderEditOnEnter=function(a){var b=a?c.trim(a.nameForEdit()):"";""!==b&&a.name()!==b&&(e.local().set(g.ClientSideKeyName.FoldersLashHash,""),e.data().foldersRenaming(!0),e.remote().folderRename(function(a,b){e.data().foldersRenaming(!1);if(g.StorageResultType.Success!==a||!b||!b.Result)e.data().foldersListError(b&&b.ErrorCode?c.getNotification(b.ErrorCode):c.i18n("NOTIFICATIONS/CANT_RENAME_FOLDER"));e.folders(!1)},a.fullNameRaw,b),e.cache().removeFolderFromCacheList(a.fullNameRaw),a.name(b));
a.edited(!1)};R.prototype.folderEditOnEsc=function(a){a&&a.edited(!1)};R.prototype.onShow=function(){e.data().foldersListError("")};R.prototype.createFolder=function(){r.showScreenPopup(ba)};R.prototype.systemFolder=function(){r.showScreenPopup(X)};R.prototype.deleteFolder=function(a){if(a&&a.canBeDeleted()&&a.deleteAccess()&&0===a.privateMessageCountAll()){this.folderForDeletion(null);var b=function(d){if(a===d)return!0;d.subFolders.remove(b);return!1};a&&(e.local().set(g.ClientSideKeyName.FoldersLashHash,
""),e.data().folderList.remove(b),e.data().foldersDeleting(!0),e.remote().folderDelete(function(a,b){e.data().foldersDeleting(!1);if(g.StorageResultType.Success!==a||!b||!b.Result)e.data().foldersListError(b&&b.ErrorCode?c.getNotification(b.ErrorCode):c.i18n("NOTIFICATIONS/CANT_DELETE_FOLDER"));e.folders(!1)},a.fullNameRaw),e.cache().removeFolderFromCacheList(a.fullNameRaw))}else 0<a.privateMessageCountAll()&&e.data().foldersListError(c.getNotification(g.Notification.CantDeleteNonEmptyFolder))};R.prototype.subscribeFolder=
function(a){e.local().set(g.ClientSideKeyName.FoldersLashHash,"");e.remote().folderSetSubscribe(c.emptyFunction,a.fullNameRaw,!0);a.subScribed(!0)};R.prototype.unSubscribeFolder=function(a){e.local().set(g.ClientSideKeyName.FoldersLashHash,"");e.remote().folderSetSubscribe(c.emptyFunction,a.fullNameRaw,!1);a.subScribed(!1)};c.addSettingsViewModel(Aa,"SettingsThemes","SETTINGS_LABELS/LABEL_THEMES_NAME","themes");Aa.prototype.removeCustomThemeImg=function(){this.customThemeImg("")};Aa.prototype.onBuild=
function(){var a=this,b=e.data().theme();this.themesObjects(i.map(e.data().themes(),function(a){return{name:a,nameDisplay:c.convertThemeName(a),selected:f.observable(a===b),themePreviewSrc:e.link().themePreviewLink(a)}}));i.delay(function(){a.customThemeType.subscribe(function(a){e.remote().saveSettings(function(){e.data().theme.valueHasMutated()},{CustomThemeType:a})});a.customThemeImg.subscribe(function(a){e.remote().saveSettings(function(){e.data().theme.valueHasMutated()},{CustomThemeImg:a})})},
50);this.initCustomThemeUploader()};Aa.prototype.initCustomThemeUploader=function(){return this.customThemeUploaderButton()?!!new sa({action:e.link().uploadBackground(),name:"uploader",queueSize:1,multipleSizeLimit:1,disableFolderDragAndDrop:!0,clickElement:this.customThemeUploaderButton(),onSelect:i.bind(function(a,b){var d=c.isUnd(b.FileName)?"":b.FileName.toString(),d=d.substring(d.length-4,d.length),e=c.isNormal(b.Size)?c.pInt(b.Size):null;return-1===c.inArray(d,["jpeg",".jpg",".png"])?(h.alert(c.i18n("SETTINGS_THEMES/ERROR_FILE_TYPE_ERROR")),
!1):1048576<e?(h.alert(c.i18n("SETTINGS_THEMES/ERROR_FILE_IS_TOO_BIG")),!1):!0},this),onStart:i.bind(function(){this.customThemeUploaderProgress(!0)},this),onComplete:i.bind(function(a,b,d){!b||!d||!d.Result?h.alert(d&&d.ErrorCode?c.getUploadErrorDescByCode(d.ErrorCode):c.getUploadErrorDescByCode(g.UploadErrorCode.Unknown)):this.customThemeImg(d.Result);this.customThemeUploaderProgress(!1)},this)}):!1};Oa.prototype.populateDataOnStart=function(){var a=e.settingsGet("Languages"),b=e.settingsGet("Themes");
c.isArray(a)&&this.languages(a);c.isArray(b)&&this.themes(b);this.mainLanguage(e.settingsGet("Language"));this.mainTheme(e.settingsGet("Theme"));this.allowCustomTheme(!!e.settingsGet("AllowCustomTheme"));this.allowAdditionalAccounts(!!e.settingsGet("AllowAdditionalAccounts"));this.ignoreFolderSubscribe(!!e.settingsGet("IgnoreFolderSubscribe"));this.editorDefaultType(e.settingsGet("EditorDefaultType"));this.showImages(!!e.settingsGet("ShowImages"));this.showAnimation(!!e.settingsGet("ShowAnimation"));
this.mainMessagesPerPage(e.settingsGet("MPP"));this.desktopNotifications(!!e.settingsGet("DesktopNotifications"));this.useThreads(!!e.settingsGet("UseThreads"));this.replySameFolder(!!e.settingsGet("ReplySameFolder"));this.usePreviewPane(!!e.settingsGet("UsePreviewPane"));this.useCheckboxesInList(!!e.settingsGet("UseCheckboxesInList"));this.facebookEnable(!!e.settingsGet("AllowFacebookSocial"));this.facebookAppID(e.settingsGet("FacebookAppID"));this.facebookAppSecret(e.settingsGet("FacebookAppSecret"));
this.twitterEnable(!!e.settingsGet("AllowTwitterSocial"));this.twitterConsumerKey(e.settingsGet("TwitterConsumerKey"));this.twitterConsumerSecret(e.settingsGet("TwitterConsumerSecret"));this.googleEnable(!!e.settingsGet("AllowGoogleSocial"));this.googleClientID(e.settingsGet("GoogleClientID"));this.googleClientSecret(e.settingsGet("GoogleClientSecret"));this.dropboxEnable(!!e.settingsGet("AllowDropboxSocial"));this.dropboxApiKey(e.settingsGet("DropboxApiKey"));this.contactsIsSupported(!!e.settingsGet("ContactsIsSupported"))};
i.extend(S.prototype,Oa.prototype);S.prototype.populateDataOnStart=function(){Oa.prototype.populateDataOnStart.call(this);this.accountEmail(e.settingsGet("Email"));this.accountLogin(e.settingsGet("Login"));this.projectHash(e.settingsGet("ProjectHash"));this.displayName(e.settingsGet("DisplayName"));this.replyTo(e.settingsGet("ReplyTo"));this.signature(e.settingsGet("Signature"));this.lastFoldersHash=e.local().get(g.ClientSideKeyName.FoldersLashHash);this.remoteSuggestions=!!e.settingsGet("RemoteSuggestions");
this.remoteChangePassword=!!e.settingsGet("RemoteChangePassword");this.threading=!!e.settingsGet("UseImapThread");this.devEmail=e.settingsGet("DevEmail");this.devLogin=e.settingsGet("DevLogin");this.devPassword=e.settingsGet("DevPassword")};S.prototype.initUidNextAndNewMessages=function(a,b,d){if("INBOX"===a&&c.isNormal(b)&&""!==b){if(c.isArray(d)&&0<d.length){var f=e.cache(),g=0,s=d.length,j=function(a,b,d){var c=null;if(ja&&e.data().useDesktopNotifications()&&(c=new ja(b,{body:d,icon:a})))c.show&&
c.show(),h.setTimeout(function(a){return function(){a.cancel?a.cancel():a.close&&a.close()}}(c),7E3)};i.each(d,function(b){f.addNewMessageCache(a,b.Uid)});if(3<s)j(e.link().notificationMailIcon(),e.data().accountEmail(),c.i18n("MESSAGE_LIST/NEW_MESSAGE_NOTIFICATION",{COUNT:s}));else for(;g<s;g++)j(e.link().notificationMailIcon(),m.emailsToLine(m.initEmailsFromJson(d[g].From),!1),d[g].Subject)}e.cache().setFolderUidNext(a,b)}};S.prototype.folderResponseParseRec=function(a,b,d){for(var f=0,g=0,h=null,
i=null,j="",h=[],m=[],d=!!d,f=0,g=b.length;f<g;f++)if(h=b[f]){j=h.FullNameRaw;i=e.cache().getFolderFromCacheList(j);if(!i&&(i=G.newInstanceFromJson(h)))if(e.cache().setFolderToCacheList(j,i),e.cache().setFolderFullNameRaw(i.fullNameHash,j),i.isGmailFolder=t.Values.GmailFolderName.toLowerCase()===j.toLowerCase(),""!==a&&a===i.fullNameRaw+i.delimiter&&(i.isNamespaceFolder=!0),i.isNamespaceFolder||i.isGmailFolder)i.isUnpaddigFolder=!0;i&&(i.collapsed(!c.isFolderExpanded(i.fullNameHash)),!d&&h.Extended&&
(h.Extended.Hash&&e.cache().setFolderHash(i.fullNameRaw,h.Extended.Hash),c.isNormal(h.Extended.MessageCount)&&i.messageCountAll(h.Extended.MessageCount),c.isNormal(h.Extended.MessageUnseenCount)&&i.messageCountUnread(h.Extended.MessageUnseenCount)),(h=h.SubFolders)&&("Collection/FolderCollection"===h["@Object"]&&h["@Collection"]&&c.isArray(h["@Collection"]))&&i.subFolders(this.folderResponseParseRec(a,h["@Collection"],d)),m.push(i))}return m};S.prototype.setFolders=function(a,b){var d=[],f=!1,h=e.data(),
i=0===h.folderList().length,j=function(a){return""===a||t.Values.UnuseOptionValue===a||null!==e.cache().getFolderFromCacheList(a)?a:""};a&&(a.Result&&"Collection/FolderCollection"===a.Result["@Object"]&&a.Result["@Collection"]&&c.isArray(a.Result["@Collection"]))&&(c.isUnd(a.Result.Namespace)||(h.namespace=a.Result.Namespace),d=this.folderResponseParseRec(h.namespace,a.Result["@Collection"],!!b),h.folderList(d),a.Result.SystemFolders&&""===""+e.settingsGet("SentFolder")+e.settingsGet("DraftFolder")+
e.settingsGet("SpamFolder")+e.settingsGet("TrashFolder")&&(e.settingsSet("SentFolder",a.Result.SystemFolders[2]||null),e.settingsSet("DraftFolder",a.Result.SystemFolders[3]||null),e.settingsSet("SpamFolder",a.Result.SystemFolders[4]||null),e.settingsSet("TrashFolder",a.Result.SystemFolders[5]||null),f=!0),h.sentFolder(j(e.settingsGet("SentFolder"))),h.draftFolder(j(e.settingsGet("DraftFolder"))),h.spamFolder(j(e.settingsGet("SpamFolder"))),h.trashFolder(j(e.settingsGet("TrashFolder"))),f&&e.remote().saveSystemFolders(c.emptyFunction,
{SentFolder:h.sentFolder(),DraftFolder:h.draftFolder(),SpamFolder:h.spamFolder(),TrashFolder:h.trashFolder()}),b||e.local().set(g.ClientSideKeyName.FoldersLashHash,a.Result.FoldersHash),i&&b&&e.folders(!1))};S.prototype.hideMessageBodies=function(){var a=this.messagesBodiesDom();a&&a.find(".b-text-part").hide()};S.prototype.setMessage=function(a,b){var d=!1,f=!1,g=!1,h=null,f=null,d="",i=this.messagesBodiesDom(),k=this.message();if(a&&k&&a.Result&&"Object/Message"===a.Result["@Object"]&&k.folderFullNameRaw===
a.Result.Folder&&k.uid===a.Result.Uid){this.messageError("");k.initUpdateByMessageJson(a.Result);e.cache().addRequestedMessage(k.folderFullNameRaw,k.uid);b||k.initFlagsByJson(a.Result);if(i=i&&i[0]?i:null)d="rl-"+k.requestHash.replace(/[^a-zA-Z0-9]/g,""),f=i.find("#"+d),!f||!f[0]?(f=!!a.Result.HasExternals,g=!!a.Result.HasInternals,h=j('<div id="'+d+'" />').hide(),c.isNormal(a.Result.Html)&&""!==a.Result.Html?(d=!0,h.html(a.Result.Html.toString()).addClass("b-text-part html")):c.isNormal(a.Result.Plain)&&
""!==a.Result.Plain?(d=!1,h.html(a.Result.Plain.toString()).addClass("b-text-part plain")):d=!1,i.append(h),h.data("rl-is-html",d),h.data("rl-has-images",f),k.isHtml(h.data("rl-is-html")),k.hasImages(h.data("rl-has-images")),k.body=h,g&&k.showInternalImages(!0),k.hasImages()&&this.showImages()&&k.showExternalImages(!0)):(k.isHtml(f.data("rl-is-html")),k.hasImages(f.data("rl-has-images")),k.body=f),this.messageActiveDom(k.body),this.hideMessageBodies(),k.body.show(),h&&c.initBlockquoteSwitcher(h);
e.cache().initMessageFlagsFromCache(k);k.unseen()&&e.setMessageSeen(k);c.windowResize()}};S.prototype.setMessageList=function(a,b){if(a&&a.Result&&"Collection/MessageCollection"===a.Result["@Object"]&&a.Result["@Collection"]&&c.isArray(a.Result["@Collection"])){var d=e.data(),f=e.cache(),h=null,i=0,j=0,k=0,r=0,o=[],t=d.staticMessageList,n=null,p=null,q=null,u=0,v=!1,k=c.pInt(a.Result.MessageResultCount),r=c.pInt(a.Result.Offset);c.isNonEmptyArray(a.Result.LastCollapsedThreadUids)&&(h=a.Result.LastCollapsedThreadUids);
if((q=e.cache().getFolderFromCacheList(c.isNormal(a.Result.Folder)?a.Result.Folder:""))&&!b)e.cache().setFolderHash(a.Result.Folder,a.Result.FolderHash),c.isNormal(a.Result.MessageCount)&&q.messageCountAll(a.Result.MessageCount),c.isNormal(a.Result.MessageUnseenCount)&&(c.pInt(q.messageCountUnread())!==c.pInt(a.Result.MessageUnseenCount)&&(v=!0),q.messageCountUnread(a.Result.MessageUnseenCount)),this.initUidNextAndNewMessages(q.fullNameRaw,a.Result.UidNext,a.Result.NewMessages);v&&q&&e.cache().clearMessageFlagsFromCacheByFolder(q.fullNameRaw);
i=0;for(j=a.Result["@Collection"].length;i<j;i++)if((n=a.Result["@Collection"][i])&&"Object/Message"===n["@Object"]){p=t[i];if(!p||!p.initByJson(n))p=m.newInstanceFromJson(n);p&&(f.hasNewMessageAndRemoveFromCache(p.folderFullNameRaw,p.uid)&&5>=u&&(u++,p.newForAnimation(!0)),p.deleted(!1),b?e.cache().initMessageFlagsFromCache(p):e.cache().storeMessageFlagsToCache(p),p.lastInCollapsedThread(h&&-1<c.inArray(c.pInt(p.uid),h)?!0:!1),o.push(p))}d.messageListCount(k);d.messageListSearch(c.isNormal(a.Result.Search)?
a.Result.Search:"");d.messageListEndSearch(c.isNormal(a.Result.Search)?a.Result.Search:"");d.messageListEndFolder(c.isNormal(a.Result.Folder)?a.Result.Folder:"");d.messageListPage(Math.ceil(r/d.messagesPerPage()+1));d.messageList(o);d.messageListIsNotCompleted(!1);(p=d.message())&&d.messageList.setSelectedByUid&&d.messageList.setSelectedByUid(p.generateUid());t.length<o.length&&(d.staticMessageList=o);f.clearNewMessageCache();q&&(b||v||e.data().useThreads())&&e.folderInformation(q.fullNameRaw,o)}else e.data().messageListCount(0),
e.data().messageList([]),e.data().messageListError(c.getNotification(a&&a.ErrorCode?a.ErrorCode:g.Notification.CantGetMessageList))};aa.prototype.oRequests={};aa.prototype.defaultResponse=function(a,b,d,c,f,j){var w=function(){g.StorageResultType.Success!==d&&Qa&&(d=g.StorageResultType.Unload);if(g.StorageResultType.Success===d&&c&&!c.Result){if(c&&g.Notification.AuthError===c.ErrorCode&&Ca++,c.Logout||5<Ca)h.__rlah_clear&&h.__rlah_clear(),e.loginAndLogoutReload(!0)}else g.StorageResultType.Success===
d&&(c&&c.Result)&&(Ca=0);a&&(x.runHook("ajax-default-response",[b,g.StorageResultType.Success===d?c:null,d,f,j]),a(d,g.StorageResultType.Success===d?c:null,f,b,j))};switch(d){case "success":d=g.StorageResultType.Success;break;case "abort":d=g.StorageResultType.Abort;break;default:d=g.StorageResultType.Error}g.StorageResultType.Error===d?i.delay(w,300):w()};aa.prototype.ajaxRequest=function(a,b,d,f,g){var s=this,w=""===f,k=(new h.Date).getTime(),m=null,o="",b=b||{},d=c.isNormal(d)?d:2E4,f=c.isUnd(f)?
"":c.pString(f),g=c.isArray(g)?g:[];(o=b.Action||"")&&0<g.length&&i.each(g,function(a){s.oRequests[a]&&(s.oRequests[a].__aborted=!0,s.oRequests[a].abort&&s.oRequests[a].abort(),s.oRequests[a]=null)});w&&(b.XToken=e.settingsGet("Token"));m=j.ajax({type:w?"POST":"GET",url:e.link().ajax(f),async:!0,dataType:"json",data:w?b:{},headers:{},timeout:d,global:!0});m.always(function(d,e){var f=!1;d&&d.Time&&(f=c.pInt(d.Time)>(new h.Date).getTime()-k);o&&s.oRequests[o]&&(s.oRequests[o].__aborted&&(e="abort"),
s.oRequests[o]=null);s.defaultResponse(a,o,e,d,f,b)});o&&(0<g.length&&-1<c.inArray(o,g))&&(this.oRequests[o]&&(this.oRequests[o].__aborted=!0,this.oRequests[o].abort&&this.oRequests[o].abort(),this.oRequests[o]=null),this.oRequests[o]=m);return m};aa.prototype.defaultRequest=function(a,b,d,e,f,g){d=d||{};d.Action=b;f=c.pString(f);x.runHook("ajax-default-request",[b,d,f]);this.ajaxRequest(a,d,c.isUnd(e)?t.Defaults.DefaultAjaxTimeout:c.pInt(e),f,g)};aa.prototype.noop=function(a){this.defaultRequest(a,
"Noop")};aa.prototype.jsError=function(a,b,d,c,e,f,g){this.defaultRequest(a,"JsError",{Message:b,FileName:d,LineNo:c,ScriptCount:e,Location:f,HtmlCapa:g})};i.extend(p.prototype,aa.prototype);p.prototype.folders=function(a,b){var d=e.data().lastFoldersHash;(b=c.isUnd(b)?!1:!!b)&&""!==d?this.defaultRequest(a,"Folders",{},null,"Folders/"+e.data().projectHash()+"-"+d,["Folders"]):this.defaultRequest(a,"Folders",{},null,"",["Folders"])};p.prototype.login=function(a,b,d,c,e){this.defaultRequest(a,"Login",
{Email:b,Login:d,Password:c,SignMe:e?"1":"0"})};p.prototype.accountAdd=function(a,b,d,c){this.defaultRequest(a,"AccountAdd",{Email:b,Login:d,Password:c})};p.prototype.accountDelete=function(a,b){this.defaultRequest(a,"AccountDelete",{EmailToDelete:b})};p.prototype.accounts=function(a){this.defaultRequest(a,"Accounts")};p.prototype.messageList=function(a,b,d,f,g,h){var b=c.pString(b),i=e.data(),j=e.cache().getFolderHash(b),h=c.isUnd(h)?!1:!!h,d=c.isUnd(d)?0:c.pInt(d),f=c.isUnd(d)?20:c.pInt(f),g=c.pString(g);
""!==j?this.defaultRequest(a,"MessageList",{},""===g?t.Defaults.DefaultAjaxTimeout:t.Defaults.SearchAjaxTimeout,"MessageList/"+ga.urlsafe_encode([b,d,f,g,i.projectHash(),j,"INBOX"===b?e.cache().getFolderUidNext(b):"",i.threading&&i.useThreads()?"1":"0",i.threading&&b===i.messageListThreadFolder()?i.messageListThreadUids().join(","):""].join(String.fromCharCode(0))),h?[]:["MessageList"]):this.defaultRequest(a,"MessageList",{Folder:b,Offset:d,Limit:f,Search:g,UidNext:"INBOX"===b?e.cache().getFolderUidNext(b):
"",UseThreads:e.data().threading&&e.data().useThreads()?"1":"0",ExpandedThreadUid:i.threading&&b===i.messageListThreadFolder()?i.messageListThreadUids().join(","):""},""===g?t.Defaults.DefaultAjaxTimeout:t.Defaults.SearchAjaxTimeout,"",h?[]:["MessageList"])};p.prototype.messageUploadAttachments=function(a,b){this.defaultRequest(a,"MessageUploadAttachments",{Attachments:b},999E3)};p.prototype.message=function(a,b,d){b=c.pString(b);d=c.pInt(d);return e.cache().getFolderFromCacheList(b)&&0<d?(this.defaultRequest(a,
"Message",{},null,"Message/"+ga.urlsafe_encode([b,d,e.data().projectHash(),e.data().threading&&e.data().useThreads()?"1":"0"].join(String.fromCharCode(0))),["Message"]),!0):!1};p.prototype.composeUploadExternals=function(a,b){this.defaultRequest(a,"ComposeUploadExternals",{Externals:b},999E3)};p.prototype.folderInformation=function(a,b,d){var f=!0,g=e.cache(),h=[];c.isArray(d)&&0<d.length&&(f=!1,i.each(d,function(a){g.getMessageFlagsFromCache(a.folderFullNameRaw,a.uid)||h.push(a.uid);0<a.threads().length&&
i.each(a.threads(),function(b){g.getMessageFlagsFromCache(a.folderFullNameRaw,b)||h.push(b)})}),0<h.length&&(f=!0));f?this.defaultRequest(a,"FolderInformation",{Folder:b,FlagsUids:c.isArray(h)?h.join(","):"",UidNext:"INBOX"===b?e.cache().getFolderUidNext(b):""}):e.data().useThreads()&&e.reloadFlagsCurrentMessageListAndMessageFromCache()};p.prototype.logout=function(a){this.defaultRequest(a,"Logout")};p.prototype.messageSetFlagged=function(a,b,d,c){this.defaultRequest(a,"MessageSetFlagged",{Folder:b,
Uids:d.join(","),SetAction:c?"1":"0"})};p.prototype.messageSetSeen=function(a,b,d,c){this.defaultRequest(a,"MessageSetSeen",{Folder:b,Uids:d.join(","),SetAction:c?"1":"0"})};p.prototype.messageSetSeenToAll=function(a,b,d){this.defaultRequest(a,"MessageSetSeenToAll",{Folder:b,SetAction:d?"1":"0"})};p.prototype.saveMessage=function(a,b,d,c,e,f,g,h,i,j,m,n,p,q,r){this.defaultRequest(a,"SaveMessage",{MessageFolder:b,MessageUid:d,MessageID:c,DraftFolder:e,To:f,Cc:g,Bcc:h,Subject:i,TextIsHtml:j?"1":"0",
Text:m,DraftInfo:p,InReplyTo:q,References:r,Attachments:n},t.Defaults.SaveMessageAjaxTimeout)};p.prototype.sendMessage=function(a,b,d,c,e,f,g,h,i,j,m,n,p,q,r){this.defaultRequest(a,"SendMessage",{MessageFolder:b,MessageUid:d,MessageID:c,SentFolder:e,To:f,Cc:g,Bcc:h,Subject:i,TextIsHtml:j?"1":"0",Text:m,DraftInfo:p,InReplyTo:q,References:r,Attachments:n},t.Defaults.SendMessageAjaxTimeout)};p.prototype.saveSystemFolders=function(a,b){this.defaultRequest(a,"SystemFoldersUpdate",b)};p.prototype.saveSettings=
function(a,b){this.defaultRequest(a,"SettingsUpdate",b)};p.prototype.changePassword=function(a,b,d){this.defaultRequest(a,"ChangePassword",{PrevPassword:b,NewPassword:d})};p.prototype.folderCreate=function(a,b,d){this.defaultRequest(a,"FolderCreate",{Folder:b,Parent:d},null,"",["Folders"])};p.prototype.folderDelete=function(a,b){this.defaultRequest(a,"FolderDelete",{Folder:b},null,"",["Folders"])};p.prototype.folderRename=function(a,b,d){this.defaultRequest(a,"FolderRename",{Folder:b,NewFolderName:d},
null,"",["Folders"])};p.prototype.folderClear=function(a,b){this.defaultRequest(a,"FolderClear",{Folder:b})};p.prototype.folderSetSubscribe=function(a,b,d){this.defaultRequest(a,"FolderSubscribe",{Folder:b,Subscribe:d?"1":"0"})};p.prototype.messagesMove=function(a,b,d,c){this.defaultRequest(a,"MessageMove",{FromFolder:b,ToFolder:d,Uids:c.join(",")},null,"",["MessageList","Message"])};p.prototype.messagesDelete=function(a,b,d){this.defaultRequest(a,"MessageDelete",{Folder:b,Uids:d.join(",")},null,
"",["MessageList","Message"])};p.prototype.appDelayStart=function(a){this.defaultRequest(a,"AppDelayStart")};p.prototype.quota=function(a){this.defaultRequest(a,"Quota")};p.prototype.contacts=function(a,b){this.defaultRequest(a,"Contacts",{Search:b},null,"",["Contacts"])};p.prototype.contactSave=function(a,b,d,e,f,g){d=c.trim(d);this.defaultRequest(a,"ContactSave",{RequestUid:b,Uid:d,Name:e,Email:f,ImageData:g})};p.prototype.contactsDelete=function(a,b){this.defaultRequest(a,"ContactsDelete",{Uids:b.join(",")})};
p.prototype.suggestions=function(a,b,d){this.defaultRequest(a,"Suggestions",{Query:b,Page:d},null,"",["Suggestions"])};p.prototype.servicesPics=function(a){this.defaultRequest(a,"ServicesPics")};p.prototype.emailsPicsHashes=function(a){this.defaultRequest(a,"EmailsPicsHashes")};p.prototype.facebookUser=function(a){this.defaultRequest(a,"SocialFacebookUserInformation")};p.prototype.facebookDisconnect=function(a){this.defaultRequest(a,"SocialFacebookDisconnect")};p.prototype.twitterUser=function(a){this.defaultRequest(a,
"SocialTwitterUserInformation")};p.prototype.twitterDisconnect=function(a){this.defaultRequest(a,"SocialTwitterDisconnect")};p.prototype.googleUser=function(a){this.defaultRequest(a,"SocialGoogleUserInformation")};p.prototype.googleDisconnect=function(a){this.defaultRequest(a,"SocialGoogleDisconnect")};p.prototype.socialUsers=function(a){this.defaultRequest(a,"SocialUsers")};T.prototype.oEmailsPicsHashes={};T.prototype.oServices={};T.prototype.clear=function(){this.oServices={};this.oEmailsPicsHashes=
{}};T.prototype.getUserPic=function(a){var b="",b="",b=a.toLowerCase(),d=c.isUnd(this.oEmailsPicsHashes[a])?"":this.oEmailsPicsHashes[a];""===d?(b=b.substr(a.indexOf("@")+1),b=""!==b&&this.oServices[b]?this.oServices[b]:""):b=e.link().getUserPicUrlFromHash(d);return b};T.prototype.setServicesData=function(a){this.oServices=a};T.prototype.setEmailsPicsHashesData=function(a){this.oEmailsPicsHashes=a};i.extend(v.prototype,T.prototype);v.prototype.oFoldersCache={};v.prototype.oFoldersNamesCache={};v.prototype.oFolderHashCache=
{};v.prototype.oFolderUidNextCache={};v.prototype.oMessageListHashCache={};v.prototype.oMessageFlagsCache={};v.prototype.oBodies={};v.prototype.oNewMessage={};v.prototype.oRequestedMessage={};v.prototype.clear=function(){T.prototype.clear.call(this);this.oFoldersCache={};this.oFoldersNamesCache={};this.oFolderHashCache={};this.oFolderUidNextCache={};this.oMessageListHashCache={};this.oMessageFlagsCache={};this.oBodies={}};v.prototype.getMessageKey=function(a,b){return a+"#"+b};v.prototype.addRequestedMessage=
function(a,b){this.oRequestedMessage[this.getMessageKey(a,b)]=!0};v.prototype.hasRequestedMessage=function(a,b){return!0===this.oRequestedMessage[this.getMessageKey(a,b)]};v.prototype.addNewMessageCache=function(a,b){this.oNewMessage[this.getMessageKey(a,b)]=!0};v.prototype.hasNewMessageAndRemoveFromCache=function(a,b){return this.oNewMessage[this.getMessageKey(a,b)]?(this.oNewMessage[this.getMessageKey(a,b)]=null,!0):!1};v.prototype.clearNewMessageCache=function(){this.oNewMessage={}};v.prototype.getFolderFullNameRaw=
function(a){return""!==a&&this.oFoldersNamesCache[a]?this.oFoldersNamesCache[a]:""};v.prototype.setFolderFullNameRaw=function(a,b){this.oFoldersNamesCache[a]=b};v.prototype.getFolderHash=function(a){return""!==a&&this.oFolderHashCache[a]?this.oFolderHashCache[a]:""};v.prototype.setFolderHash=function(a,b){this.oFolderHashCache[a]=b};v.prototype.getFolderUidNext=function(a){return""!==a&&this.oFolderUidNextCache[a]?this.oFolderUidNextCache[a]:""};v.prototype.setFolderUidNext=function(a,b){this.oFolderUidNextCache[a]=
b};v.prototype.getFolderFromCacheList=function(a){return""!==a&&this.oFoldersCache[a]?this.oFoldersCache[a]:null};v.prototype.setFolderToCacheList=function(a,b){this.oFoldersCache[a]=b};v.prototype.removeFolderFromCacheList=function(a){this.setFolderToCacheList(a,null)};v.prototype.getMessageFlagsFromCache=function(a,b){return this.oMessageFlagsCache[a]&&this.oMessageFlagsCache[a][b]?this.oMessageFlagsCache[a][b]:null};v.prototype.setMessageFlagsToCache=function(a,b,d){this.oMessageFlagsCache[a]||
(this.oMessageFlagsCache[a]={});this.oMessageFlagsCache[a][b]=d};v.prototype.clearMessageFlagsFromCacheByFolder=function(a){this.oMessageFlagsCache[a]={}};v.prototype.initMessageFlagsFromCache=function(a){if(a){var b=this,d=this.getMessageFlagsFromCache(a.folderFullNameRaw,a.uid),e=null,f=null;d&&4===d.length&&(a.unseen(d[0]),a.flagged(d[1]),a.answered(d[2]),a.forwarded(d[3]));0<a.threads().length&&(e=i.find(a.threads(),function(d){return(d=b.getMessageFlagsFromCache(a.folderFullNameRaw,d))&&4===
d.length&&!!d[0]}),f=i.find(a.threads(),function(d){return(d=b.getMessageFlagsFromCache(a.folderFullNameRaw,d))&&4===d.length&&!!d[1]}),a.hasUnseenSubMessage(e&&0<c.pInt(e)),a.hasFlaggedSubMessage(f&&0<c.pInt(f)))}};v.prototype.storeMessageFlagsToCache=function(a){a&&this.setMessageFlagsToCache(a.folderFullNameRaw,a.uid,[a.unseen(),a.flagged(),a.answered(),a.forwarded()])};v.prototype.storeMessageFlagsToCacheByFolderAndUid=function(a,b,d){c.isArray(d)&&4===d.length&&this.setMessageFlagsToCache(a,
b,d)};i.extend(fa.prototype,J.prototype);fa.prototype.onRoute=function(a){var b=this,d=null,g=null,h=null,s=null;if(g=i.find(Fa,function(b){return b&&b.__rlSettingsData&&a===b.__rlSettingsData.Route}))i.find(Ta,function(a){return a&&a===g})&&(g=null),g&&i.find(Ua,function(a){return a&&a===g})&&(g=null);g&&(g.__builded&&g.__vm?d=g.__vm:(h=j("#rl-content #rl-settings-subscreen"))&&1===h.length?(d=new g,s=j("<div></div>").addClass("rl-settings-view-model").hide().attr("data-bind",'template: {name: "'+
g.__rlSettingsData.Template+'"}, i18nInit: true'),s.appendTo(h),d.data=e.data(),d.viewModelDom=s,d.__rlSettingsData=g.__rlSettingsData,g.__dom=s,g.__builded=!0,g.__vm=d,f.applyBindings(d,s[0]),r.delegateRun(d,"onBuild",[s])):c.log("Cannot find sub settings view model position: SettingsSubScreen"),d&&i.defer(function(){if(b.oCurrentSubScreen){r.delegateRun(b.oCurrentSubScreen,"onHide");b.oCurrentSubScreen.viewModelDom.hide()}b.oCurrentSubScreen=d;if(b.oCurrentSubScreen){b.oCurrentSubScreen.viewModelDom.show();
r.delegateRun(b.oCurrentSubScreen,"onShow");i.each(b.menu(),function(a){a.selected(d&&d.__rlSettingsData&&a.route===d.__rlSettingsData.Route)})}c.windowResize()}))};fa.prototype.onBuild=function(){i.each(Fa,function(a){a&&(a.__rlSettingsData&&!i.find(Ta,function(b){return b&&b===a}))&&this.menu.push({route:a.__rlSettingsData.Route,label:a.__rlSettingsData.Label,selected:f.observable(!1),disabled:!!i.find(Ua,function(b){return b&&b===a})})},this)};fa.prototype.routes=function(){var a=i.find(Fa,function(a){return a&&
a.__rlSettingsData&&a.__rlSettingsData.IsDefault}),b=a?a.__rlSettingsData.Route:"general",a={subname:/^(.*)$/,normalize_:function(a,e){e.subname=c.isUnd(e.subname)?b:c.pString(e.subname);return[e.subname]}};return[["{subname}/",a],["{subname}",a],["",a]]};i.extend(Ba.prototype,J.prototype);Ba.prototype.onShow=function(){e.setTitle(c.i18n("TITLES/LOGIN"))};i.extend(U.prototype,J.prototype);U.prototype.oLastRoute={};U.prototype.onShow=function(){var a=e.data().accountEmail();e.setTitle((""===a?"":a+
" - ")+c.i18n("TITLES/MAILBOX"));this.mailBoxScreenVisibily(!0)};U.prototype.onHide=function(){this.mailBoxScreenVisibily(!1)};U.prototype.onRoute=function(a,b,d){var c=e.data(),a=e.cache().getFolderFullNameRaw(a);if(a=e.cache().getFolderFromCacheList(a))c.currentFolder(a).messageListPage(b).messageListSearch(d),!c.usePreviewPane()&&c.message()&&c.message(null),e.reloadMessageList()};U.prototype.onStart=function(){var a=e.data(),b=function(){c.windowResize()};e.settingsGet("AllowAdditionalAccounts")&&
e.accounts();i.delay(function(){e.quota()},5E3);i.delay(function(){"INBOX"!==a.currentFolderFullNameRaw()&&e.folderInformation("INBOX")},1E3);i.delay(function(){var b=e.data().spamFolder();b!==a.currentFolderFullNameRaw()&&e.folderInformation(b)},1500);i.delay(function(){var b=e.data().draftFolder();b!==a.currentFolderFullNameRaw()&&e.folderInformation(b)},2E3);i.delay(function(){e.remote().appDelayStart(c.emptyFunction)},35E3);h.setInterval(function(){e.folderInformation("INBOX")},12E4);h.setInterval(function(){e.quota()},
3E5);Y.toggleClass("rl-no-preview-pane",!a.usePreviewPane());a.folderList.subscribe(b);a.messageList.subscribe(b);a.message.subscribe(b);a.usePreviewPane.subscribe(function(b){Y.toggleClass("rl-no-preview-pane",!b);a.messageList.valueHasMutated()})};U.prototype.onBuild=function(){i.defer(i.bind(function(){c.initLayoutResizer("#rl-resizer-left","#rl-resizer-right","#rl-right",this.resizeTrigger)},this))};U.prototype.routes=function(){var a=function(a,d){d[0]=c.pString(d[0]);d[1]=c.pInt(d[1]);d[1]=
0>=d[1]?1:d[1];d[2]=c.pString(d[2]);""===a&&(d[0]="Inbox",d[1]=1);return[decodeURI(d[0]),d[1],decodeURI(d[2])]};return[[/^([a-zA-Z0-9]+)\/p([1-9][0-9]*)\/(.+)\/?$/,{normalize_:a}],[/^([a-zA-Z0-9]+)\/p([1-9][0-9]*)\/?$/,{normalize_:a}],[/^([a-zA-Z0-9]+)\/(.+)\/?$/,{normalize_:function(a,d){d[0]=c.pString(d[0]);d[1]=c.pString(d[1]);""===a&&(d[0]="Inbox");return[decodeURI(d[0]),1,decodeURI(d[1])]}}],[/^([^\/]*)$/,{normalize_:a}]]};i.extend(Pa.prototype,fa.prototype);Pa.prototype.onShow=function(){e.setTitle(this.sSettingsTitle)};
i.extend(I.prototype,Xa.prototype);I.prototype.oSettings=null;I.prototype.oLink=null;I.prototype.download=function(a){ha?this.iframe.attr("src",a):h.open(a)};I.prototype.link=function(){null===this.oLink&&(this.oLink=new B);return this.oLink};I.prototype.local=function(){null===this.oLocal&&(this.oLocal=new va);return this.oLocal};I.prototype.settingsGet=function(a){null===this.oSettings&&(this.oSettings=c.isNormal(Da)?Da:{});return c.isUnd(this.oSettings[a])?null:this.oSettings[a]};I.prototype.settingsSet=
function(a,b){null===this.oSettings&&(this.oSettings=c.isNormal(Da)?Da:{});this.oSettings[a]=b};I.prototype.setTitle=function(a){a=(0<a.length?a+" - ":"")+this.settingsGet("Title")||"";a!==h.document.title&&(h.document.title=a)};I.prototype.loginAndLogoutReload=function(a,b){var d=c.pString(this.settingsGet("CustomLogoutLink")),f=!!this.settingsGet("InIframe"),a=c.isUnd(a)?!1:!!a,b=c.isUnd(b)?!1:!!b;a&&(b&&h.close)&&h.close();a&&""!==d&&h.location.href!==d?i.defer(function(){f&&h.parent?h.parent.location.href=
d:h.location.href=d}):(r.routeOff(),r.setHash(e.link().root(),!0),r.routeOff(),i.defer(function(){f&&h.parent?h.parent.location.reload():h.location.reload()}))};I.prototype.getAutocomplete=function(a,b,d){d([],a)};I.prototype.bootstart=function(){c.initOnStartOrLangChange(function(){c.initNotificationLanguage()},null);i.delay(function(){c.windowResize()},1E3)};i.extend(A.prototype,I.prototype);A.prototype.oData=null;A.prototype.oRemote=null;A.prototype.oCache=null;A.prototype.data=function(){null===
this.oData&&(this.oData=new S);return this.oData};A.prototype.remote=function(){null===this.oRemote&&(this.oRemote=new p);return this.oRemote};A.prototype.cache=function(){null===this.oCache&&(this.oCache=new v);return this.oCache};A.prototype.reloadFlagsCurrentMessageListAndMessageFromCache=function(){var a=e.cache();i.each(e.data().messageList(),function(b){a.initMessageFlagsFromCache(b)});a.initMessageFlagsFromCache(e.data().message())};A.prototype.reloadMessageList=function(a,b){var d=e.data(),
f=(d.messageListPage()-1)*d.messagesPerPage();(c.isUnd(b)?0:b)&&e.cache().setFolderHash(d.currentFolderFullNameRaw(),"");if(c.isUnd(a)?0:a)d.messageListPage(1),f=0;d.messageListLoading(!0);e.remote().messageList(function(a,b,e){g.StorageResultType.Success===a&&b&&b.Result?(d.messageListError(""),d.messageListLoading(!1),d.setMessageList(b,e)):g.StorageResultType.Unload===a?(d.messageListError(""),d.messageListLoading(!1)):g.StorageResultType.Abort!==a&&(d.messageList([]),d.messageListLoading(!1),
d.messageListError(b&&b.ErrorCode?c.getNotification(b.ErrorCode):c.i18n("NOTIFICATIONS/CANT_GET_MESSAGE_LIST")))},d.currentFolderFullNameRaw(),f,d.messagesPerPage(),d.messageListSearch())};A.prototype.recacheInboxMessageList=function(){e.remote().messageList(c.emptyFunction,"INBOX",0,e.data().messagesPerPage(),"",!0)};A.prototype.folders=function(a,b){this.data().foldersLoading(!0);this.remote().folders(i.bind(function(a,c,f){e.data().foldersLoading(!1);g.StorageResultType.Success===a?(this.data().setFolders(c,
f),b&&b(!0)):b&&b(!1)},this),a)};A.prototype.accounts=function(){e.data().accountsLoading(!0);e.remote().accounts(function(a,b){e.data().accountsLoading(!1);if(g.StorageResultType.Success===a&&c.isArray(b.Result)){var d=e.settingsGet("ParentEmail"),d=""===d?e.data().accountEmail():d;e.data().accounts(i.map(b.Result,function(a){return new La(a,a!==d)}))}})};A.prototype.quota=function(){this.remote().quota(function(a,b){g.StorageResultType.Success===a&&(b&&b.Result&&c.isArray(b.Result)&&2===b.Result.length&&
c.isPosNumeric(b.Result[0],!0)&&c.isPosNumeric(b.Result[1],!0))&&(e.data().userQuota(1024*c.pInt(b.Result[1])),e.data().userUsageSize(1024*c.pInt(b.Result[0])))})};A.prototype.folderInformation=function(a,b){this.remote().folderInformation(function(a,b){if(g.StorageResultType.Success===a&&b&&b.Result&&b.Result.Hash&&b.Result.Folder){var f=e.cache().getFolderHash(b.Result.Folder),h=e.cache().getFolderFromCacheList(b.Result.Folder),i=!1,j="",m=[],m=!1,o=null;if(h){b.Result.Hash&&e.cache().setFolderHash(b.Result.Folder,
b.Result.Hash);c.isNormal(b.Result.MessageCount)&&h.messageCountAll(b.Result.MessageCount);c.isNormal(b.Result.MessageUnseenCount)&&(c.pInt(h.messageCountUnread())!==c.pInt(b.Result.MessageUnseenCount)&&(m=!0),h.messageCountUnread(b.Result.MessageUnseenCount));m&&e.cache().clearMessageFlagsFromCacheByFolder(h.fullNameRaw);if(b.Result.Flags){for(j in b.Result.Flags)b.Result.Flags.hasOwnProperty(j)&&(i=!0,o=b.Result.Flags[j],e.cache().storeMessageFlagsToCacheByFolderAndUid(h.fullNameRaw,j.toString(),
[!o.IsSeen,!!o.IsFlagged,!!o.IsAnswered,!!o.IsForwarded]));i&&e.reloadFlagsCurrentMessageListAndMessageFromCache()}e.data().initUidNextAndNewMessages(h.fullNameRaw,b.Result.UidNext,b.Result.NewMessages);b.Result.Hash!==f||""===f?h.fullNameRaw===e.data().currentFolderFullNameRaw()?e.reloadMessageList():"INBOX"===h.fullNameRaw&&e.recacheInboxMessageList():m&&h.fullNameRaw===e.data().currentFolderFullNameRaw()&&(m=e.data().messageList(),c.isNonEmptyArray(m)&&e.folderInformation(h.fullNameRaw,m))}}},
a,b)};A.prototype.setMessageSeen=function(a){if(a.unseen()){a.unseen(!1);var b=e.cache().getFolderFromCacheList(a.folderFullNameRaw);b&&b.messageCountUnread(0<=b.messageCountUnread()-1?b.messageCountUnread()-1:0);e.cache().storeMessageFlagsToCache(a);e.reloadFlagsCurrentMessageListAndMessageFromCache()}e.remote().messageSetSeen(c.emptyFunction,a.folderFullNameRaw,[a.uid],!0)};A.prototype.googleConnect=function(){h.open(e.link().socialGoogle(),"Google","left=200,top=100,width=650,height=600,menubar=no,status=no,resizable=yes,scrollbars=yes")};
A.prototype.twitterConnect=function(){h.open(e.link().socialTwitter(),"Twitter","left=200,top=100,width=650,height=350,menubar=no,status=no,resizable=yes,scrollbars=yes")};A.prototype.facebookConnect=function(){h.open(e.link().socialFacebook(),"Facebook","left=200,top=100,width=650,height=335,menubar=no,status=no,resizable=yes,scrollbars=yes")};A.prototype.socialUsers=function(a){var b=e.data();a&&(b.googleActions(!0),b.facebookActions(!0),b.twitterActions(!0));e.remote().socialUsers(function(a,c){if(g.StorageResultType.Success===
a&&c&&c.Result){b.googleUserName(c.Result.Google||"");b.facebookUserName(c.Result.Facebook||"");b.twitterUserName(c.Result.Twitter||"")}else{b.googleUserName("");b.facebookUserName("");b.twitterUserName("")}b.googleLoggined(""!==b.googleUserName());b.facebookLoggined(""!==b.facebookUserName());b.twitterLoggined(""!==b.twitterUserName());b.googleActions(false);b.facebookActions(false);b.twitterActions(false)})};A.prototype.googleDisconnect=function(){e.data().googleActions(!0);e.remote().googleDisconnect(function(){e.socialUsers()})};
A.prototype.facebookDisconnect=function(){e.data().facebookActions(!0);e.remote().facebookDisconnect(function(){e.socialUsers()})};A.prototype.twitterDisconnect=function(){e.data().twitterActions(!0);e.remote().twitterDisconnect(function(){e.socialUsers()})};A.prototype.folderListOptionsBuilder=function(a,b,d,f,i,j,m,k,p){var o=0,q=0,n=null,r=[],p=!c.isNormal(p)?0<a.length:p,i=!c.isNormal(i)?0:i;c.isArray(d)||(d=[]);c.isArray(f)||(f=[]);o=0;for(q=f.length;o<q;o++)r.push({id:f[o][0],name:f[o][1],disable:!1});
o=0;for(q=a.length;o<q;o++)if(n=a[o],c.isNormal(m)?m.call(null,n):1)r.push({id:n.fullNameRaw,system:!0,name:c.isNormal(k)?k.call(null,n):n.name(),disable:!n.selectable||-1<c.inArray(n.fullNameRaw,d)||(c.isNormal(j)?j.call(null,n):!1)});o=0;for(q=b.length;o<q;o++){n=b[o];if(!n.isGmailFolder&&(n.subScribed()||!n.existen))if(c.isNormal(m)?m.call(null,n):1)if(g.FolderType.User===n.type()||!p||!n.isNamespaceFolder&&0<n.subFolders().length)r.push({id:n.fullNameRaw,system:!1,name:(new h.Array(n.deep+1-i)).join("\u00a0\u00a0\u00a0\u00a0")+
(c.isNormal(k)?k.call(null,n):n.name()),disable:!n.selectable||-1<c.inArray(n.fullNameRaw,d)||g.FolderType.User!==n.type()||(c.isNormal(j)?j.call(null,n):!1)});n.isUnpaddigFolder&&i++;r=r.concat(e.folderListOptionsBuilder([],n.subFolders(),d,[],i,j,m,k,p))}return r};A.prototype.getAutocomplete=function(a,b,d){var f=[];e.remote().suggestions(function(a,b){g.StorageResultType.Success===a&&b&&b.Result&&c.isArray(b.Result.List)?(f=i.map(b.Result.List,function(a){return a&&a[0]?new F(a[0],a[1]):null}),
d(i.compact(f),!!b.Result.More)):g.StorageResultType.Abort!==a&&d([],!1)},a,b)};A.prototype.emailsPicsHashes=function(){e.remote().emailsPicsHashes(function(a,b){g.StorageResultType.Success===a&&(b&&b.Result)&&e.cache().setEmailsPicsHashesData(b.Result)})};A.prototype.bootstart=function(){I.prototype.bootstart.call(this);e.data().populateDataOnStart();var a=this.settingsGet("JsHash"),b=this.settingsGet("AllowGoogleSocial"),d=this.settingsGet("AllowFacebookSocial"),f=this.settingsGet("AllowTwitterSocial");
!this.settingsGet("RemoteChangePassword")&&na&&c.removeSettingsViewModel(na);!this.settingsGet("AllowAdditionalAccounts")&&ma&&c.removeSettingsViewModel(ma);!b&&(!d&&!f&&Na)&&c.removeSettingsViewModel(Na);c.initOnStartOrLangChange(function(){j.extend(!0,j.magnificPopup.defaults,{tClose:c.i18n("MAGNIFIC_POPUP/CLOSE"),tLoading:c.i18n("MAGNIFIC_POPUP/LOADING"),gallery:{tPrev:c.i18n("MAGNIFIC_POPUP/GALLERY_PREV"),tNext:c.i18n("MAGNIFIC_POPUP/GALLERY_NEXT"),tCounter:c.i18n("MAGNIFIC_POPUP/GALLERY_COUNTER")},
image:{tError:c.i18n("MAGNIFIC_POPUP/IMAGE_ERROR")},ajax:{tError:c.i18n("MAGNIFIC_POPUP/AJAX_ERROR")}})},this);h.SimplePace&&h.SimplePace.set(70);this.settingsGet("Auth")?(this.setTitle(c.i18n("TITLES/LOADING")),this.folders(!0,i.bind(function(a){r.hideLoading();if(a){r.startScreens([U,Pa]);Ea.on("mousedown","#rl-center a",function(a){if(a&&3!==a.which){var a=null,b=j(this).attr("href");if(b&&"mailto:"===b.toString().toLowerCase().substr(0,7)){a=new F;a.parse(h.decodeURI(b.toString().substr(7)));
if(a&&a.email){r.showScreenPopup(y,[g.ComposeType.Empty,null,[a]]);return false}}}return true});(b||d||f)&&e.socialUsers(true);i.delay(function(){e.emailsPicsHashes();e.remote().servicesPics(function(a,b){g.StorageResultType.Success===a&&(b&&b.Result)&&e.cache().setServicesData(b.Result)})},1E3);x.runHook("rl-start-user-screens")}else{r.startScreens([Ba]);x.runHook("rl-start-login-screens")}h.SimplePace&&h.SimplePace.set(100)},this))):(r.hideLoading(),r.startScreens([Ba]),x.runHook("rl-start-login-screens"),
h.SimplePace&&h.SimplePace.set(100));b&&(h["rl_"+a+"_google_service"]=function(){e.data().googleActions(true);e.socialUsers()});d&&(h["rl_"+a+"_facebook_service"]=function(){e.data().facebookActions(true);e.socialUsers()});f&&(h["rl_"+a+"_twitter_service"]=function(){e.data().twitterActions(true);e.socialUsers()});x.runHook("rl-start-screens")};e=new A;j(function(){h.setTimeout(function(){r.setBoot(e).bootstart()},10);h.setInterval(function(){xa(!xa())},6E4);i.delay(function(){h.rainloopAppData={};
h.rainloopI18N={}},100)});Y.addClass(ha?"mobile":"no-mobile");N.keydown(c.killCtrlAandS).keyup(c.killCtrlAandS);N.unload(function(){Qa=!0});h.rl=h.rl||{};h.rl.addHook=x.addHook;h.rl.settingsGet=x.mainSettingsGet;h.rl.remoteRequest=x.remoteRequest;h.rl.pluginSettingsGet=x.settingsGet;h.rl.addSettingsViewModel=c.addSettingsViewModel;h.rl.createCommand=c.createCommand;h.rl.EmailModel=F;h.rl.Enums=g;h.__rl_script_count=1+(h.__rl_script_count||0);h.SimplePace&&h.SimplePace.add(10);h.__rl_script_count=
1+(h.__rl_script_count||0)})(window,jQuery,ko,crossroads,hasher,moment,Jua,_);

View file

@ -1,187 +0,0 @@
/*
* See http://www.JSON.org/js.html
*/
var JSON;JSON||(JSON={}),function(){function str(a,b){var c,d,e,f,g=gap,h,i=b[a];i&&typeof i=="object"&&typeof i.toJSON=="function"&&(i=i.toJSON(a)),typeof rep=="function"&&(i=rep.call(b,a,i));switch(typeof i){case"string":return quote(i);case"number":return isFinite(i)?String(i):"null";case"boolean":case"null":return String(i);case"object":if(!i)return"null";gap+=indent,h=[];if(Object.prototype.toString.apply(i)==="[object Array]"){f=i.length;for(c=0;c<f;c+=1)h[c]=str(c,i)||"null";e=h.length===0?"[]":gap?"[\n"+gap+h.join(",\n"+gap)+"\n"+g+"]":"["+h.join(",")+"]",gap=g;return e}if(rep&&typeof rep=="object"){f=rep.length;for(c=0;c<f;c+=1)d=rep[c],typeof d=="string"&&(e=str(d,i),e&&h.push(quote(d)+(gap?": ":":")+e))}else for(d in i)Object.hasOwnProperty.call(i,d)&&(e=str(d,i),e&&h.push(quote(d)+(gap?": ":":")+e));e=h.length===0?"{}":gap?"{\n"+gap+h.join(",\n"+gap)+"\n"+g+"}":"{"+h.join(",")+"}",gap=g;return e}}function quote(a){escapable.lastIndex=0;return escapable.test(a)?'"'+a.replace(escapable,function(a){var b=meta[a];return typeof b=="string"?b:"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+a+'"'}function f(a){return a<10?"0"+a:a}"use strict",typeof Date.prototype.toJSON!="function"&&(Date.prototype.toJSON=function(a){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z":null},String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(a){return this.valueOf()});var cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,escapable=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,meta={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},rep;typeof JSON.stringify!="function"&&(JSON.stringify=function(a,b,c){var d;gap="",indent="";if(typeof c=="number")for(d=0;d<c;d+=1)indent+=" ";else typeof c=="string"&&(indent=c);rep=b;if(b&&typeof b!="function"&&(typeof b!="object"||typeof b.length!="number"))throw new Error("JSON.stringify");return str("",{"":a})}),typeof JSON.parse!="function"&&(JSON.parse=function(text,reviver){function walk(a,b){var c,d,e=a[b];if(e&&typeof e=="object")for(c in e)Object.hasOwnProperty.call(e,c)&&(d=walk(e,c),d!==undefined?e[c]=d:delete e[c]);return reviver.call(a,b,e)}var j;text=String(text),cx.lastIndex=0,cx.test(text)&&(text=text.replace(cx,function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)}));if(/^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,""))){j=eval("("+text+")");return typeof reviver=="function"?walk({"":j},""):j}throw new SyntaxError("JSON.parse")})}();
(function(window) {
function Bar() {
var self = this;
self.el = null;
self.done = false;
self.progress = 0;
self.addInterval = 0;
self.interval = window.setInterval(function () {
var oEl = self.build();
if (oEl)
{
window.clearInterval(self.interval);
}
}, 100);
}
Bar.prototype.startAddInterval = function () {
var self = this;
self.stopAddInterval();
self.addInterval = window.setInterval(function () {
if (0 < self.progress && 100 > self.progress)
{
self.add(3);
}
}, 500);
};
Bar.prototype.stopAddInterval = function () {
window.clearInterval(this.addInterval);
this.addInterval = 0;
};
Bar.prototype.build = function () {
if (null === this.el)
{
var oTargetElement = document.querySelector('body');
if (oTargetElement)
{
this.el = document.createElement('div');
this.el.className = 'simple-pace simple-pace-active';
this.el.innerHTML = '<div class="simple-pace-progress"><div class="simple-pace-progress-inner"></div></div><div class="simple-pace-activity"></div>';
if (oTargetElement.firstChild)
{
oTargetElement.insertBefore(this.el, oTargetElement.firstChild);
}
else
{
oTargetElement.appendChild(this.el);
}
}
}
return this.el;
};
Bar.prototype.reset = function () {
this.progress = 0;
return this.render();
};
Bar.prototype.update = function (iProg) {
var iP = window.parseInt(iProg, 10);
if (iP > this.progress)
{
this.progress = iP;
this.progress = 100 < this.progress ? 100 : this.progress;
this.progress = 0 > this.progress ? 0 : this.progress;
}
return this.render();
};
Bar.prototype.add = function (iProg) {
this.progress += window.parseInt(iProg, 10);
this.progress = 100 < this.progress ? 100 : this.progress;
this.progress = 0 > this.progress ? 0 : this.progress;
return this.render();
};
Bar.prototype.render = function () {
var oEl = this.build();
if (oEl && oEl.children && oEl.children[0])
{
oEl.children[0].setAttribute('style', 'width:' + this.progress + '%');
}
if (100 === this.progress && !this.done)
{
this.done = true;
this.stopAddInterval();
oEl.className = oEl.className.replace('simple-pace-active', '');
oEl.className += ' simple-pace-inactive';
}
else if (100 > this.progress && this.done)
{
this.done = false;
this.startAddInterval();
oEl.className = oEl.className.replace('simple-pace-inactive', '');
oEl.className += ' simple-pace-inactive';
}
else if (100 > this.progress && !this.done && 0 === this.addInterval)
{
this.startAddInterval();
}
};
if (!window.SimplePace)
{
var oBar = new Bar();
window.SimplePace = {
'set': function (iValue) {
oBar.update(iValue);
},
'add': function (iValue) {
oBar.add(iValue);
}
};
}
}(window));
function CRLTopDriver() {}
CRLTopDriver.prototype.sess = window.sessionStorage;
CRLTopDriver.prototype.top = window.top || window;
CRLTopDriver.prototype.getHash = function() {
var mR = null;
if (this.sess) {
mR = this.sess.getItem('__rlA') || null;
} else if (this.top) {
var mData = this.top.name && JSON && '{' === this.top.name.toString().substr(0, 1) ? JSON.parse(this.top.name) : null;
mR = mData ? (mData['__rlA'] || null) : null;
}
return mR;
};
CRLTopDriver.prototype.setHash = function() {
if (this.sess) {
this.sess.setItem('__rlA',
window.rainloopAppData && window.rainloopAppData['AuthAccountHash'] ? window.rainloopAppData['AuthAccountHash'] : '');
} else if (this.top) {
this.top.name = JSON.stringify({
'__rlA': window.rainloopAppData && window.rainloopAppData['AuthAccountHash'] ? window.rainloopAppData['AuthAccountHash'] : ''
});
}
};
CRLTopDriver.prototype.clearHash = function() {
if (this.sess) {
this.sess.setItem('__rlA', '');
} else if (this.top) {
this.top.name = '';
}
};
window._topRLDriver = new CRLTopDriver();
function __rlah() {
return window._topRLDriver ? window._topRLDriver.getHash() : null;
}
function __rlah_set() {
if (window._topRLDriver) {
window._topRLDriver.setHash();
}
}
function __rlah_clear() {
if (window._topRLDriver) {
window._topRLDriver.clearHash();
}
}
if (window.SimplePace) {
window.SimplePace.add(10);
}
window.__rl_script_count = 1 + (window.__rl_script_count || 0);

View file

@ -0,0 +1 @@
b3b169c2ad1cf25e6ae9a321ad84d518daf314fc

View file

@ -0,0 +1 @@
1.3.2.445

View file

@ -27,5 +27,8 @@ LANG_ES_LA = "Español (Spanish)"
LANG_IT = "Italiano (Italian)" LANG_IT = "Italiano (Italian)"
LANG_IT_IT = "Italiano (Italian)" LANG_IT_IT = "Italiano (Italian)"
LANG_LV= "Latviešu (Latvian)" LANG_LV = "Latviešu (Latvian)"
LANG_LV_LV= "Latviešu (Latvian)" LANG_LV_LV = "Latviešu (Latvian)"
LANG_IS = "Íslenska (Icelandic)"
LANG_IS_IS = "Íslenska (Icelandic)"

View file

@ -0,0 +1,56 @@
// moment.js language configuration
// language : Moroccan Arabic (ar-ma)
// author : ElFadili Yassine : https://github.com/ElFadiliY
// author : Abdel Said : https://github.com/abdelsaid
(function (factory) {
if (typeof define === 'function' && define.amd) {
define(['moment'], factory); // AMD
} else if (typeof exports === 'object') {
module.exports = factory(require('../moment')); // Node
} else {
factory(window.moment); // Browser global
}
}(function (moment) {
return moment.lang('ar-ma', {
months : "يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر".split("_"),
monthsShort : "يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر".split("_"),
weekdays : "الأحد_الإتنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),
weekdaysShort : "احد_اتنين_ثلاثاء_اربعاء_خميس_جمعة_سبت".split("_"),
weekdaysMin : "ح_ن_ث_ر_خ_ج_س".split("_"),
longDateFormat : {
LT : "HH:mm",
L : "DD/MM/YYYY",
LL : "D MMMM YYYY",
LLL : "D MMMM YYYY LT",
LLLL : "dddd D MMMM YYYY LT"
},
calendar : {
sameDay: "[اليوم على الساعة] LT",
nextDay: '[غدا على الساعة] LT',
nextWeek: 'dddd [على الساعة] LT',
lastDay: '[أمس على الساعة] LT',
lastWeek: 'dddd [على الساعة] LT',
sameElse: 'L'
},
relativeTime : {
future : "في %s",
past : "منذ %s",
s : "ثوان",
m : "دقيقة",
mm : "%d دقائق",
h : "ساعة",
hh : "%d ساعات",
d : "يوم",
dd : "%d أيام",
M : "شهر",
MM : "%d أشهر",
y : "سنة",
yy : "%d سنوات"
},
week : {
dow : 6, // Saturday is the first day of the week.
doy : 12 // The week that contains Jan 1st is the first week of the year.
}
});
}));

View file

@ -0,0 +1,56 @@
// moment.js language configuration
// language : Arabic (ar)
// author : Abdel Said : https://github.com/abdelsaid
// changes in months, weekdays : Ahmed Elkhatib
(function (factory) {
if (typeof define === 'function' && define.amd) {
define(['moment'], factory); // AMD
} else if (typeof exports === 'object') {
module.exports = factory(require('../moment')); // Node
} else {
factory(window.moment); // Browser global
}
}(function (moment) {
return moment.lang('ar', {
months : "يناير/ كانون الثاني_فبراير/ شباط_مارس/ آذار_أبريل/ نيسان_مايو/ أيار_يونيو/ حزيران_يوليو/ تموز_أغسطس/ آب_سبتمبر/ أيلول_أكتوبر/ تشرين الأول_نوفمبر/ تشرين الثاني_ديسمبر/ كانون الأول".split("_"),
monthsShort : "يناير/ كانون الثاني_فبراير/ شباط_مارس/ آذار_أبريل/ نيسان_مايو/ أيار_يونيو/ حزيران_يوليو/ تموز_أغسطس/ آب_سبتمبر/ أيلول_أكتوبر/ تشرين الأول_نوفمبر/ تشرين الثاني_ديسمبر/ كانون الأول".split("_"),
weekdays : "الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),
weekdaysShort : "الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),
weekdaysMin : "ح_ن_ث_ر_خ_ج_س".split("_"),
longDateFormat : {
LT : "HH:mm",
L : "DD/MM/YYYY",
LL : "D MMMM YYYY",
LLL : "D MMMM YYYY LT",
LLLL : "dddd D MMMM YYYY LT"
},
calendar : {
sameDay: "[اليوم على الساعة] LT",
nextDay: '[غدا على الساعة] LT',
nextWeek: 'dddd [على الساعة] LT',
lastDay: '[أمس على الساعة] LT',
lastWeek: 'dddd [على الساعة] LT',
sameElse: 'L'
},
relativeTime : {
future : "في %s",
past : "منذ %s",
s : "ثوان",
m : "دقيقة",
mm : "%d دقائق",
h : "ساعة",
hh : "%d ساعات",
d : "يوم",
dd : "%d أيام",
M : "شهر",
MM : "%d أشهر",
y : "سنة",
yy : "%d سنوات"
},
week : {
dow : 6, // Saturday is the first day of the week.
doy : 12 // The week that contains Jan 1st is the first week of the year.
}
});
}));

View file

@ -0,0 +1,86 @@
// moment.js language configuration
// language : bulgarian (bg)
// author : Krasen Borisov : https://github.com/kraz
(function (factory) {
if (typeof define === 'function' && define.amd) {
define(['moment'], factory); // AMD
} else if (typeof exports === 'object') {
module.exports = factory(require('../moment')); // Node
} else {
factory(window.moment); // Browser global
}
}(function (moment) {
return moment.lang('bg', {
months : "януари_февруари_март_април_май_юни_юли_август_септември_октомври_ноември_декември".split("_"),
monthsShort : "янрев_мар_апрай_юни_юли_авг_сеп_окт_ноеек".split("_"),
weekdays : еделя_понеделник_вторник_срядаетвъртък_петък_събота".split("_"),
weekdaysShort : ед_пон_вто_сря_чет_пет_съб".split("_"),
weekdaysMin : "нд_пн_вт_ср_чт_пт_сб".split("_"),
longDateFormat : {
LT : "H:mm",
L : "D.MM.YYYY",
LL : "D MMMM YYYY",
LLL : "D MMMM YYYY LT",
LLLL : "dddd, D MMMM YYYY LT"
},
calendar : {
sameDay : '[Днес в] LT',
nextDay : '[Утре в] LT',
nextWeek : 'dddd [в] LT',
lastDay : '[Вчера в] LT',
lastWeek : function () {
switch (this.day()) {
case 0:
case 3:
case 6:
return '[В изминалата] dddd [в] LT';
case 1:
case 2:
case 4:
case 5:
return '[В изминалия] dddd [в] LT';
}
},
sameElse : 'L'
},
relativeTime : {
future : "след %s",
past : "преди %s",
s : "няколко секунди",
m : "минута",
mm : "%d минути",
h : "час",
hh : "%d часа",
d : "ден",
dd : "%d дни",
M : "месец",
MM : "%d месеца",
y : "година",
yy : "%d години"
},
ordinal : function (number) {
var lastDigit = number % 10,
last2Digits = number % 100;
if (number === 0) {
return number + '-ев';
} else if (last2Digits === 0) {
return number + '-ен';
} else if (last2Digits > 10 && last2Digits < 20) {
return number + '-ти';
} else if (lastDigit === 1) {
return number + '-ви';
} else if (lastDigit === 2) {
return number + '-ри';
} else if (lastDigit === 7 || lastDigit === 8) {
return number + '-ми';
} else {
return number + '-ти';
}
},
week : {
dow : 1, // Monday is the first day of the week.
doy : 7 // The week that contains Jan 1st is the first week of the year.
}
});
}));

View file

@ -0,0 +1,107 @@
// moment.js language configuration
// language : breton (br)
// author : Jean-Baptiste Le Duigou : https://github.com/jbleduigou
(function (factory) {
if (typeof define === 'function' && define.amd) {
define(['moment'], factory); // AMD
} else if (typeof exports === 'object') {
module.exports = factory(require('../moment')); // Node
} else {
factory(window.moment); // Browser global
}
}(function (moment) {
function relativeTimeWithMutation(number, withoutSuffix, key) {
var format = {
'mm': "munutenn",
'MM': "miz",
'dd': "devezh"
};
return number + ' ' + mutation(format[key], number);
}
function specialMutationForYears(number) {
switch (lastNumber(number)) {
case 1:
case 3:
case 4:
case 5:
case 9:
return number + ' bloaz';
default:
return number + ' vloaz';
}
}
function lastNumber(number) {
if (number > 9) {
return lastNumber(number % 10);
}
return number;
}
function mutation(text, number) {
if (number === 2) {
return softMutation(text);
}
return text;
}
function softMutation(text) {
var mutationTable = {
'm': 'v',
'b': 'v',
'd': 'z'
};
if (mutationTable[text.charAt(0)] === undefined) {
return text;
}
return mutationTable[text.charAt(0)] + text.substring(1);
}
return moment.lang('br', {
months : "Genver_C'hwevrer_Meurzh_Ebrel_Mae_Mezheven_Gouere_Eost_Gwengolo_Here_Du_Kerzu".split("_"),
monthsShort : "Gen_C'hwe_Meu_Ebr_Mae_Eve_Gou_Eos_Gwe_Her_Du_Ker".split("_"),
weekdays : "Sul_Lun_Meurzh_Merc'her_Yaou_Gwener_Sadorn".split("_"),
weekdaysShort : "Sul_Lun_Meu_Mer_Yao_Gwe_Sad".split("_"),
weekdaysMin : "Su_Lu_Me_Mer_Ya_Gw_Sa".split("_"),
longDateFormat : {
LT : "h[e]mm A",
L : "DD/MM/YYYY",
LL : "D [a viz] MMMM YYYY",
LLL : "D [a viz] MMMM YYYY LT",
LLLL : "dddd, D [a viz] MMMM YYYY LT"
},
calendar : {
sameDay : '[Hiziv da] LT',
nextDay : '[Warc\'hoazh da] LT',
nextWeek : 'dddd [da] LT',
lastDay : '[Dec\'h da] LT',
lastWeek : 'dddd [paset da] LT',
sameElse : 'L'
},
relativeTime : {
future : "a-benn %s",
past : "%s 'zo",
s : "un nebeud segondennoù",
m : "ur vunutenn",
mm : relativeTimeWithMutation,
h : "un eur",
hh : "%d eur",
d : "un devezh",
dd : relativeTimeWithMutation,
M : "ur miz",
MM : relativeTimeWithMutation,
y : "ur bloaz",
yy : specialMutationForYears
},
ordinal : function (number) {
var output = (number === 1) ? 'añ' : 'vet';
return number + output;
},
week : {
dow : 1, // Monday is the first day of the week.
doy : 4 // The week that contains Jan 4th is the first week of the year.
}
});
}));

View file

@ -0,0 +1,139 @@
// moment.js language configuration
// language : bosnian (bs)
// author : Nedim Cholich : https://github.com/frontyard
// based on (hr) translation by Bojan Marković
(function (factory) {
if (typeof define === 'function' && define.amd) {
define(['moment'], factory); // AMD
} else if (typeof exports === 'object') {
module.exports = factory(require('../moment')); // Node
} else {
factory(window.moment); // Browser global
}
}(function (moment) {
function translate(number, withoutSuffix, key) {
var result = number + " ";
switch (key) {
case 'm':
return withoutSuffix ? 'jedna minuta' : 'jedne minute';
case 'mm':
if (number === 1) {
result += 'minuta';
} else if (number === 2 || number === 3 || number === 4) {
result += 'minute';
} else {
result += 'minuta';
}
return result;
case 'h':
return withoutSuffix ? 'jedan sat' : 'jednog sata';
case 'hh':
if (number === 1) {
result += 'sat';
} else if (number === 2 || number === 3 || number === 4) {
result += 'sata';
} else {
result += 'sati';
}
return result;
case 'dd':
if (number === 1) {
result += 'dan';
} else {
result += 'dana';
}
return result;
case 'MM':
if (number === 1) {
result += 'mjesec';
} else if (number === 2 || number === 3 || number === 4) {
result += 'mjeseca';
} else {
result += 'mjeseci';
}
return result;
case 'yy':
if (number === 1) {
result += 'godina';
} else if (number === 2 || number === 3 || number === 4) {
result += 'godine';
} else {
result += 'godina';
}
return result;
}
}
return moment.lang('bs', {
months : "januar_februar_mart_april_maj_juni_juli_avgust_septembar_oktobar_novembar_decembar".split("_"),
monthsShort : "jan._feb._mar._apr._maj._jun._jul._avg._sep._okt._nov._dec.".split("_"),
weekdays : "nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota".split("_"),
weekdaysShort : "ned._pon._uto._sri._čet._pet._sub.".split("_"),
weekdaysMin : "ne_po_ut_sr_če_pe_su".split("_"),
longDateFormat : {
LT : "H:mm",
L : "DD. MM. YYYY",
LL : "D. MMMM YYYY",
LLL : "D. MMMM YYYY LT",
LLLL : "dddd, D. MMMM YYYY LT"
},
calendar : {
sameDay : '[danas u] LT',
nextDay : '[sutra u] LT',
nextWeek : function () {
switch (this.day()) {
case 0:
return '[u] [nedjelju] [u] LT';
case 3:
return '[u] [srijedu] [u] LT';
case 6:
return '[u] [subotu] [u] LT';
case 1:
case 2:
case 4:
case 5:
return '[u] dddd [u] LT';
}
},
lastDay : '[jučer u] LT',
lastWeek : function () {
switch (this.day()) {
case 0:
case 3:
return '[prošlu] dddd [u] LT';
case 6:
return '[prošle] [subote] [u] LT';
case 1:
case 2:
case 4:
case 5:
return '[prošli] dddd [u] LT';
}
},
sameElse : 'L'
},
relativeTime : {
future : "za %s",
past : "prije %s",
s : "par sekundi",
m : translate,
mm : translate,
h : translate,
hh : translate,
d : "dan",
dd : translate,
M : "mjesec",
MM : translate,
y : "godinu",
yy : translate
},
ordinal : '%d.',
week : {
dow : 1, // Monday is the first day of the week.
doy : 7 // The week that contains Jan 1st is the first week of the year.
}
});
}));

View file

@ -0,0 +1,66 @@
// moment.js language configuration
// language : catalan (ca)
// author : Juan G. Hurtado : https://github.com/juanghurtado
(function (factory) {
if (typeof define === 'function' && define.amd) {
define(['moment'], factory); // AMD
} else if (typeof exports === 'object') {
module.exports = factory(require('../moment')); // Node
} else {
factory(window.moment); // Browser global
}
}(function (moment) {
return moment.lang('ca', {
months : "Gener_Febrer_Març_Abril_Maig_Juny_Juliol_Agost_Setembre_Octubre_Novembre_Desembre".split("_"),
monthsShort : "Gen._Febr._Mar._Abr._Mai._Jun._Jul._Ag._Set._Oct._Nov._Des.".split("_"),
weekdays : "Diumenge_Dilluns_Dimarts_Dimecres_Dijous_Divendres_Dissabte".split("_"),
weekdaysShort : "Dg._Dl._Dt._Dc._Dj._Dv._Ds.".split("_"),
weekdaysMin : "Dg_Dl_Dt_Dc_Dj_Dv_Ds".split("_"),
longDateFormat : {
LT : "H:mm",
L : "DD/MM/YYYY",
LL : "D MMMM YYYY",
LLL : "D MMMM YYYY LT",
LLLL : "dddd D MMMM YYYY LT"
},
calendar : {
sameDay : function () {
return '[avui a ' + ((this.hours() !== 1) ? 'les' : 'la') + '] LT';
},
nextDay : function () {
return '[demà a ' + ((this.hours() !== 1) ? 'les' : 'la') + '] LT';
},
nextWeek : function () {
return 'dddd [a ' + ((this.hours() !== 1) ? 'les' : 'la') + '] LT';
},
lastDay : function () {
return '[ahir a ' + ((this.hours() !== 1) ? 'les' : 'la') + '] LT';
},
lastWeek : function () {
return '[el] dddd [passat a ' + ((this.hours() !== 1) ? 'les' : 'la') + '] LT';
},
sameElse : 'L'
},
relativeTime : {
future : "en %s",
past : "fa %s",
s : "uns segons",
m : "un minut",
mm : "%d minuts",
h : "una hora",
hh : "%d hores",
d : "un dia",
dd : "%d dies",
M : "un mes",
MM : "%d mesos",
y : "un any",
yy : "%d anys"
},
ordinal : '%dº',
week : {
dow : 1, // Monday is the first day of the week.
doy : 4 // The week that contains Jan 4th is the first week of the year.
}
});
}));

View file

@ -0,0 +1,155 @@
// moment.js language configuration
// language : czech (cs)
// author : petrbela : https://github.com/petrbela
(function (factory) {
if (typeof define === 'function' && define.amd) {
define(['moment'], factory); // AMD
} else if (typeof exports === 'object') {
module.exports = factory(require('../moment')); // Node
} else {
factory(window.moment); // Browser global
}
}(function (moment) {
var months = "leden_únor_březen_duben_květen_červen_červenec_srpen_září_říjen_listopad_prosinec".split("_"),
monthsShort = "led_úno_bře_dub_kvě_čvn_čvc_srp_zář_říj_lis_pro".split("_");
function plural(n) {
return (n > 1) && (n < 5) && (~~(n / 10) !== 1);
}
function translate(number, withoutSuffix, key, isFuture) {
var result = number + " ";
switch (key) {
case 's': // a few seconds / in a few seconds / a few seconds ago
return (withoutSuffix || isFuture) ? 'pár vteřin' : 'pár vteřinami';
case 'm': // a minute / in a minute / a minute ago
return withoutSuffix ? 'minuta' : (isFuture ? 'minutu' : 'minutou');
case 'mm': // 9 minutes / in 9 minutes / 9 minutes ago
if (withoutSuffix || isFuture) {
return result + (plural(number) ? 'minuty' : 'minut');
} else {
return result + 'minutami';
}
break;
case 'h': // an hour / in an hour / an hour ago
return withoutSuffix ? 'hodina' : (isFuture ? 'hodinu' : 'hodinou');
case 'hh': // 9 hours / in 9 hours / 9 hours ago
if (withoutSuffix || isFuture) {
return result + (plural(number) ? 'hodiny' : 'hodin');
} else {
return result + 'hodinami';
}
break;
case 'd': // a day / in a day / a day ago
return (withoutSuffix || isFuture) ? 'den' : 'dnem';
case 'dd': // 9 days / in 9 days / 9 days ago
if (withoutSuffix || isFuture) {
return result + (plural(number) ? 'dny' : 'dní');
} else {
return result + 'dny';
}
break;
case 'M': // a month / in a month / a month ago
return (withoutSuffix || isFuture) ? 'měsíc' : 'měsícem';
case 'MM': // 9 months / in 9 months / 9 months ago
if (withoutSuffix || isFuture) {
return result + (plural(number) ? 'měsíce' : 'měsíců');
} else {
return result + 'měsíci';
}
break;
case 'y': // a year / in a year / a year ago
return (withoutSuffix || isFuture) ? 'rok' : 'rokem';
case 'yy': // 9 years / in 9 years / 9 years ago
if (withoutSuffix || isFuture) {
return result + (plural(number) ? 'roky' : 'let');
} else {
return result + 'lety';
}
break;
}
}
return moment.lang('cs', {
months : months,
monthsShort : monthsShort,
monthsParse : (function (months, monthsShort) {
var i, _monthsParse = [];
for (i = 0; i < 12; i++) {
// use custom parser to solve problem with July (červenec)
_monthsParse[i] = new RegExp('^' + months[i] + '$|^' + monthsShort[i] + '$', 'i');
}
return _monthsParse;
}(months, monthsShort)),
weekdays : "neděle_pondělí_úterý_středa_čtvrtek_pátek_sobota".split("_"),
weekdaysShort : "ne_po_út_st_čt_pá_so".split("_"),
weekdaysMin : "ne_po_út_st_čt_pá_so".split("_"),
longDateFormat : {
LT: "H:mm",
L : "DD.MM.YYYY",
LL : "D. MMMM YYYY",
LLL : "D. MMMM YYYY LT",
LLLL : "dddd D. MMMM YYYY LT"
},
calendar : {
sameDay: "[dnes v] LT",
nextDay: '[zítra v] LT',
nextWeek: function () {
switch (this.day()) {
case 0:
return '[v neděli v] LT';
case 1:
case 2:
return '[v] dddd [v] LT';
case 3:
return '[ve středu v] LT';
case 4:
return '[ve čtvrtek v] LT';
case 5:
return '[v pátek v] LT';
case 6:
return '[v sobotu v] LT';
}
},
lastDay: '[včera v] LT',
lastWeek: function () {
switch (this.day()) {
case 0:
return '[minulou neděli v] LT';
case 1:
case 2:
return '[minulé] dddd [v] LT';
case 3:
return '[minulou středu v] LT';
case 4:
case 5:
return '[minulý] dddd [v] LT';
case 6:
return '[minulou sobotu v] LT';
}
},
sameElse: "L"
},
relativeTime : {
future : "za %s",
past : "před %s",
s : translate,
m : translate,
mm : translate,
h : translate,
hh : translate,
d : translate,
dd : translate,
M : translate,
MM : translate,
y : translate,
yy : translate
},
ordinal : '%d.',
week : {
dow : 1, // Monday is the first day of the week.
doy : 4 // The week that contains Jan 4th is the first week of the year.
}
});
}));

View file

@ -0,0 +1,59 @@
// moment.js language configuration
// language : chuvash (cv)
// author : Anatoly Mironov : https://github.com/mirontoli
(function (factory) {
if (typeof define === 'function' && define.amd) {
define(['moment'], factory); // AMD
} else if (typeof exports === 'object') {
module.exports = factory(require('../moment')); // Node
} else {
factory(window.moment); // Browser global
}
}(function (moment) {
return moment.lang('cv', {
months : "кăрлач_нарăс_пуш_акаай_çĕртме_утă_çурла_авăн_юпа_чӳк_раштав".split("_"),
monthsShort : "кăрар_пуш_акаай_çĕр_утă_çур_ав_юпа_чӳк_раш".split("_"),
weekdays : "вырсарникун_тунтикун_ытларикун_юнкун_кĕçнерникун_эрнекун_шăматкун".split("_"),
weekdaysShort : "вырун_ытл_юн_кĕç_эрн_шăм".split("_"),
weekdaysMin : р_тн_ыт_юн_кç_эр_шм".split("_"),
longDateFormat : {
LT : "HH:mm",
L : "DD-MM-YYYY",
LL : "YYYY [çулхи] MMMM [уйăхĕн] D[-мĕшĕ]",
LLL : "YYYY [çулхи] MMMM [уйăхĕн] D[-мĕшĕ], LT",
LLLL : "dddd, YYYY [çулхи] MMMM [уйăхĕн] D[-мĕшĕ], LT"
},
calendar : {
sameDay: '[Паян] LT [сехетре]',
nextDay: '[Ыран] LT [сехетре]',
lastDay: '[Ĕнер] LT [сехетре]',
nextWeek: '[Çитес] dddd LT [сехетре]',
lastWeek: '[Иртнĕ] dddd LT [сехетре]',
sameElse: 'L'
},
relativeTime : {
future : function (output) {
var affix = /сехет$/i.exec(output) ? "рен" : /çул$/i.exec(output) ? "тан" : "ран";
return output + affix;
},
past : "%s каялла",
s : "пĕр-ик çеккунт",
m : "пĕр минут",
mm : "%d минут",
h : "пĕр сехет",
hh : "%d сехет",
d : "пĕр кун",
dd : "%d кун",
M : "пĕр уйăх",
MM : "%d уйăх",
y : "пĕр çул",
yy : "%d çул"
},
ordinal : '%d-мĕш',
week : {
dow : 1, // Monday is the first day of the week.
doy : 7 // The week that contains Jan 1st is the first week of the year.
}
});
}));

View file

@ -0,0 +1,56 @@
// moment.js language configuration
// language : danish (da)
// author : Ulrik Nielsen : https://github.com/mrbase
(function (factory) {
if (typeof define === 'function' && define.amd) {
define(['moment'], factory); // AMD
} else if (typeof exports === 'object') {
module.exports = factory(require('../moment')); // Node
} else {
factory(window.moment); // Browser global
}
}(function (moment) {
return moment.lang('da', {
months : "januar_februar_marts_april_maj_juni_juli_august_september_oktober_november_december".split("_"),
monthsShort : "jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec".split("_"),
weekdays : "søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag".split("_"),
weekdaysShort : "søn_man_tir_ons_tor_fre_lør".split("_"),
weekdaysMin : "sø_ma_ti_on_to_fr_lø".split("_"),
longDateFormat : {
LT : "HH:mm",
L : "DD/MM/YYYY",
LL : "D MMMM YYYY",
LLL : "D MMMM YYYY LT",
LLLL : "dddd D. MMMM, YYYY LT"
},
calendar : {
sameDay : '[I dag kl.] LT',
nextDay : '[I morgen kl.] LT',
nextWeek : 'dddd [kl.] LT',
lastDay : '[I går kl.] LT',
lastWeek : '[sidste] dddd [kl] LT',
sameElse : 'L'
},
relativeTime : {
future : "om %s",
past : "%s siden",
s : "få sekunder",
m : "et minut",
mm : "%d minutter",
h : "en time",
hh : "%d timer",
d : "en dag",
dd : "%d dage",
M : "en måned",
MM : "%d måneder",
y : "et år",
yy : "%d år"
},
ordinal : '%d.',
week : {
dow : 1, // Monday is the first day of the week.
doy : 4 // The week that contains Jan 4th is the first week of the year.
}
});
}));

View file

@ -0,0 +1,71 @@
// moment.js language configuration
// language : german (de)
// author : lluchs : https://github.com/lluchs
// author: Menelion Elensúle: https://github.com/Oire
(function (factory) {
if (typeof define === 'function' && define.amd) {
define(['moment'], factory); // AMD
} else if (typeof exports === 'object') {
module.exports = factory(require('../moment')); // Node
} else {
factory(window.moment); // Browser global
}
}(function (moment) {
function processRelativeTime(number, withoutSuffix, key, isFuture) {
var format = {
'm': ['eine Minute', 'einer Minute'],
'h': ['eine Stunde', 'einer Stunde'],
'd': ['ein Tag', 'einem Tag'],
'dd': [number + ' Tage', number + ' Tagen'],
'M': ['ein Monat', 'einem Monat'],
'MM': [number + ' Monate', number + ' Monaten'],
'y': ['ein Jahr', 'einem Jahr'],
'yy': [number + ' Jahre', number + ' Jahren']
};
return withoutSuffix ? format[key][0] : format[key][1];
}
return moment.lang('de', {
months : "Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),
monthsShort : "Jan._Febr._Mrz._Apr._Mai_Jun._Jul._Aug._Sept._Okt._Nov._Dez.".split("_"),
weekdays : "Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),
weekdaysShort : "So._Mo._Di._Mi._Do._Fr._Sa.".split("_"),
weekdaysMin : "So_Mo_Di_Mi_Do_Fr_Sa".split("_"),
longDateFormat : {
LT: "H:mm [Uhr]",
L : "DD.MM.YYYY",
LL : "D. MMMM YYYY",
LLL : "D. MMMM YYYY LT",
LLLL : "dddd, D. MMMM YYYY LT"
},
calendar : {
sameDay: "[Heute um] LT",
sameElse: "L",
nextDay: '[Morgen um] LT',
nextWeek: 'dddd [um] LT',
lastDay: '[Gestern um] LT',
lastWeek: '[letzten] dddd [um] LT'
},
relativeTime : {
future : "in %s",
past : "vor %s",
s : "ein paar Sekunden",
m : processRelativeTime,
mm : "%d Minuten",
h : processRelativeTime,
hh : "%d Stunden",
d : processRelativeTime,
dd : processRelativeTime,
M : processRelativeTime,
MM : processRelativeTime,
y : processRelativeTime,
yy : processRelativeTime
},
ordinal : '%d.',
week : {
dow : 1, // Monday is the first day of the week.
doy : 4 // The week that contains Jan 4th is the first week of the year.
}
});
}));

View file

@ -0,0 +1,79 @@
// moment.js language configuration
// language : modern greek (el)
// author : Aggelos Karalias : https://github.com/mehiel
(function (factory) {
if (typeof define === 'function' && define.amd) {
define(['moment'], factory); // AMD
} else if (typeof exports === 'object') {
module.exports = factory(require('../moment')); // Node
} else {
factory(window.moment); // Browser global
}
}(function (moment) {
return moment.lang('el', {
monthsNominativeEl : "Ιανουάριος_Φεβρουάριος_Μάρτιος_Απρίλιος_Μάιος_Ιούνιος_Ιούλιος_Αύγουστος_Σεπτέμβριος_Οκτώβριος_Νοέμβριος_Δεκέμβριος".split("_"),
monthsGenitiveEl : "Ιανουαρίου_Φεβρουαρίου_Μαρτίου_Απριλίου_Μαΐου_Ιουνίου_Ιουλίου_Αυγούστου_Σεπτεμβρίου_Οκτωβρίου_Νοεμβρίου_Δεκεμβρίου".split("_"),
months : function (momentToFormat, format) {
if (/D/.test(format.substring(0, format.indexOf("MMMM")))) { // if there is a day number before 'MMMM'
return this._monthsGenitiveEl[momentToFormat.month()];
} else {
return this._monthsNominativeEl[momentToFormat.month()];
}
},
monthsShort : "Ιαν_Φεβ_Μαρ_Απρ_Μαϊ_Ιουν_Ιουλ_Αυγ_Σεπ_Οκτ_Νοε_Δεκ".split("_"),
weekdays : "Κυριακή_Δευτέρα_Τρίτη_Τετάρτη_Πέμπτη_Παρασκευή_Σάββατο".split("_"),
weekdaysShort : "Κυρ_Δευ_Τρι_Τετ_Πεμ_Παραβ".split("_"),
weekdaysMin : "Κυ_Δε_Τρ_Τε_Πε_Παα".split("_"),
meridiem : function (hours, minutes, isLower) {
if (hours > 11) {
return isLower ? 'μμ' : 'ΜΜ';
} else {
return isLower ? 'πμ' : 'ΠΜ';
}
},
longDateFormat : {
LT : "h:mm A",
L : "DD/MM/YYYY",
LL : "D MMMM YYYY",
LLL : "D MMMM YYYY LT",
LLLL : "dddd, D MMMM YYYY LT"
},
calendarEl : {
sameDay : '[Σήμερα {}] LT',
nextDay : '[Αύριο {}] LT',
nextWeek : 'dddd [{}] LT',
lastDay : '[Χθες {}] LT',
lastWeek : '[την προηγούμενη] dddd [{}] LT',
sameElse : 'L'
},
calendar : function (key, mom) {
var output = this._calendarEl[key],
hours = mom && mom.hours();
return output.replace("{}", (hours % 12 === 1 ? "στη" : "στις"));
},
relativeTime : {
future : "σε %s",
past : "%s πριν",
s : "δευτερόλεπτα",
m : "ένα λεπτό",
mm : "%d λεπτά",
h : "μία ώρα",
hh : "%d ώρες",
d : "μία μέρα",
dd : "%d μέρες",
M : "ένας μήνας",
MM : "%d μήνες",
y : "ένας χρόνος",
yy : "%d χρόνια"
},
ordinal : function (number) {
return number + 'η';
},
week : {
dow : 1, // Monday is the first day of the week.
doy : 4 // The week that contains Jan 4st is the first week of the year.
}
});
}));

View file

@ -0,0 +1,62 @@
// moment.js language configuration
// language : australian english (en-au)
(function (factory) {
if (typeof define === 'function' && define.amd) {
define(['moment'], factory); // AMD
} else if (typeof exports === 'object') {
module.exports = factory(require('../moment')); // Node
} else {
factory(window.moment); // Browser global
}
}(function (moment) {
return moment.lang('en-au', {
months : "January_February_March_April_May_June_July_August_September_October_November_December".split("_"),
monthsShort : "Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),
weekdays : "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),
weekdaysShort : "Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),
weekdaysMin : "Su_Mo_Tu_We_Th_Fr_Sa".split("_"),
longDateFormat : {
LT : "h:mm A",
L : "DD/MM/YYYY",
LL : "D MMMM YYYY",
LLL : "D MMMM YYYY LT",
LLLL : "dddd, D MMMM YYYY LT"
},
calendar : {
sameDay : '[Today at] LT',
nextDay : '[Tomorrow at] LT',
nextWeek : 'dddd [at] LT',
lastDay : '[Yesterday at] LT',
lastWeek : '[Last] dddd [at] LT',
sameElse : 'L'
},
relativeTime : {
future : "in %s",
past : "%s ago",
s : "a few seconds",
m : "a minute",
mm : "%d minutes",
h : "an hour",
hh : "%d hours",
d : "a day",
dd : "%d days",
M : "a month",
MM : "%d months",
y : "a year",
yy : "%d years"
},
ordinal : function (number) {
var b = number % 10,
output = (~~ (number % 100 / 10) === 1) ? 'th' :
(b === 1) ? 'st' :
(b === 2) ? 'nd' :
(b === 3) ? 'rd' : 'th';
return number + output;
},
week : {
dow : 1, // Monday is the first day of the week.
doy : 4 // The week that contains Jan 4th is the first week of the year.
}
});
}));

View file

@ -0,0 +1,59 @@
// moment.js language configuration
// language : canadian english (en-ca)
// author : Jonathan Abourbih : https://github.com/jonbca
(function (factory) {
if (typeof define === 'function' && define.amd) {
define(['moment'], factory); // AMD
} else if (typeof exports === 'object') {
module.exports = factory(require('../moment')); // Node
} else {
factory(window.moment); // Browser global
}
}(function (moment) {
return moment.lang('en-ca', {
months : "January_February_March_April_May_June_July_August_September_October_November_December".split("_"),
monthsShort : "Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),
weekdays : "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),
weekdaysShort : "Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),
weekdaysMin : "Su_Mo_Tu_We_Th_Fr_Sa".split("_"),
longDateFormat : {
LT : "h:mm A",
L : "YYYY-MM-DD",
LL : "D MMMM, YYYY",
LLL : "D MMMM, YYYY LT",
LLLL : "dddd, D MMMM, YYYY LT"
},
calendar : {
sameDay : '[Today at] LT',
nextDay : '[Tomorrow at] LT',
nextWeek : 'dddd [at] LT',
lastDay : '[Yesterday at] LT',
lastWeek : '[Last] dddd [at] LT',
sameElse : 'L'
},
relativeTime : {
future : "in %s",
past : "%s ago",
s : "a few seconds",
m : "a minute",
mm : "%d minutes",
h : "an hour",
hh : "%d hours",
d : "a day",
dd : "%d days",
M : "a month",
MM : "%d months",
y : "a year",
yy : "%d years"
},
ordinal : function (number) {
var b = number % 10,
output = (~~ (number % 100 / 10) === 1) ? 'th' :
(b === 1) ? 'st' :
(b === 2) ? 'nd' :
(b === 3) ? 'rd' : 'th';
return number + output;
}
});
}));

View file

@ -0,0 +1,63 @@
// moment.js language configuration
// language : great britain english (en-gb)
// author : Chris Gedrim : https://github.com/chrisgedrim
(function (factory) {
if (typeof define === 'function' && define.amd) {
define(['moment'], factory); // AMD
} else if (typeof exports === 'object') {
module.exports = factory(require('../moment')); // Node
} else {
factory(window.moment); // Browser global
}
}(function (moment) {
return moment.lang('en-gb', {
months : "January_February_March_April_May_June_July_August_September_October_November_December".split("_"),
monthsShort : "Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),
weekdays : "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),
weekdaysShort : "Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),
weekdaysMin : "Su_Mo_Tu_We_Th_Fr_Sa".split("_"),
longDateFormat : {
LT : "HH:mm",
L : "DD/MM/YYYY",
LL : "D MMMM YYYY",
LLL : "D MMMM YYYY LT",
LLLL : "dddd, D MMMM YYYY LT"
},
calendar : {
sameDay : '[Today at] LT',
nextDay : '[Tomorrow at] LT',
nextWeek : 'dddd [at] LT',
lastDay : '[Yesterday at] LT',
lastWeek : '[Last] dddd [at] LT',
sameElse : 'L'
},
relativeTime : {
future : "in %s",
past : "%s ago",
s : "a few seconds",
m : "a minute",
mm : "%d minutes",
h : "an hour",
hh : "%d hours",
d : "a day",
dd : "%d days",
M : "a month",
MM : "%d months",
y : "a year",
yy : "%d years"
},
ordinal : function (number) {
var b = number % 10,
output = (~~ (number % 100 / 10) === 1) ? 'th' :
(b === 1) ? 'st' :
(b === 2) ? 'nd' :
(b === 3) ? 'rd' : 'th';
return number + output;
},
week : {
dow : 1, // Monday is the first day of the week.
doy : 4 // The week that contains Jan 4th is the first week of the year.
}
});
}));

View file

@ -0,0 +1,65 @@
// moment.js language configuration
// language : esperanto (eo)
// author : Colin Dean : https://github.com/colindean
// komento: Mi estas malcerta se mi korekte traktis akuzativojn en tiu traduko.
// Se ne, bonvolu korekti kaj avizi min por ke mi povas lerni!
(function (factory) {
if (typeof define === 'function' && define.amd) {
define(['moment'], factory); // AMD
} else if (typeof exports === 'object') {
module.exports = factory(require('../moment')); // Node
} else {
factory(window.moment); // Browser global
}
}(function (moment) {
return moment.lang('eo', {
months : "januaro_februaro_marto_aprilo_majo_junio_julio_aŭgusto_septembro_oktobro_novembro_decembro".split("_"),
monthsShort : "jan_feb_mar_apr_maj_jun_jul_aŭg_sep_okt_nov_dec".split("_"),
weekdays : "Dimanĉo_Lundo_Mardo_Merkredo_Ĵaŭdo_Vendredo_Sabato".split("_"),
weekdaysShort : "Dim_Lun_Mard_Merk_Ĵaŭ_Ven_Sab".split("_"),
weekdaysMin : "Di_Lu_Ma_Me_Ĵa_Ve_Sa".split("_"),
longDateFormat : {
LT : "HH:mm",
L : "YYYY-MM-DD",
LL : "D[-an de] MMMM, YYYY",
LLL : "D[-an de] MMMM, YYYY LT",
LLLL : "dddd, [la] D[-an de] MMMM, YYYY LT"
},
meridiem : function (hours, minutes, isLower) {
if (hours > 11) {
return isLower ? 'p.t.m.' : 'P.T.M.';
} else {
return isLower ? 'a.t.m.' : 'A.T.M.';
}
},
calendar : {
sameDay : '[Hodiaŭ je] LT',
nextDay : '[Morgaŭ je] LT',
nextWeek : 'dddd [je] LT',
lastDay : '[Hieraŭ je] LT',
lastWeek : '[pasinta] dddd [je] LT',
sameElse : 'L'
},
relativeTime : {
future : "je %s",
past : "antaŭ %s",
s : "sekundoj",
m : "minuto",
mm : "%d minutoj",
h : "horo",
hh : "%d horoj",
d : "tago",//ne 'diurno', ĉar estas uzita por proksimumo
dd : "%d tagoj",
M : "monato",
MM : "%d monatoj",
y : "jaro",
yy : "%d jaroj"
},
ordinal : "%da",
week : {
dow : 1, // Monday is the first day of the week.
doy : 7 // The week that contains Jan 1st is the first week of the year.
}
});
}));

View file

@ -0,0 +1,66 @@
// moment.js language configuration
// language : spanish (es)
// author : Julio Napurí : https://github.com/julionc
(function (factory) {
if (typeof define === 'function' && define.amd) {
define(['moment'], factory); // AMD
} else if (typeof exports === 'object') {
module.exports = factory(require('../moment')); // Node
} else {
factory(window.moment); // Browser global
}
}(function (moment) {
return moment.lang('es', {
months : "enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),
monthsShort : "ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.".split("_"),
weekdays : "domingo_lunes_martes_miércoles_jueves_viernes_sábado".split("_"),
weekdaysShort : "dom._lun._mar._mié._jue._vie._sáb.".split("_"),
weekdaysMin : "Do_Lu_Ma_Mi_Ju_Vi_Sá".split("_"),
longDateFormat : {
LT : "H:mm",
L : "DD/MM/YYYY",
LL : "D [de] MMMM [de] YYYY",
LLL : "D [de] MMMM [de] YYYY LT",
LLLL : "dddd, D [de] MMMM [de] YYYY LT"
},
calendar : {
sameDay : function () {
return '[hoy a la' + ((this.hours() !== 1) ? 's' : '') + '] LT';
},
nextDay : function () {
return '[mañana a la' + ((this.hours() !== 1) ? 's' : '') + '] LT';
},
nextWeek : function () {
return 'dddd [a la' + ((this.hours() !== 1) ? 's' : '') + '] LT';
},
lastDay : function () {
return '[ayer a la' + ((this.hours() !== 1) ? 's' : '') + '] LT';
},
lastWeek : function () {
return '[el] dddd [pasado a la' + ((this.hours() !== 1) ? 's' : '') + '] LT';
},
sameElse : 'L'
},
relativeTime : {
future : "en %s",
past : "hace %s",
s : "unos segundos",
m : "un minuto",
mm : "%d minutos",
h : "una hora",
hh : "%d horas",
d : "un día",
dd : "%d días",
M : "un mes",
MM : "%d meses",
y : "un año",
yy : "%d años"
},
ordinal : '%dº',
week : {
dow : 1, // Monday is the first day of the week.
doy : 4 // The week that contains Jan 4th is the first week of the year.
}
});
}));

View file

@ -0,0 +1,60 @@
// moment.js language configuration
// language : estonian (et)
// author : Henry Kehlmann : https://github.com/madhenry
(function (factory) {
if (typeof define === 'function' && define.amd) {
define(['moment'], factory); // AMD
} else if (typeof exports === 'object') {
module.exports = factory(require('../moment')); // Node
} else {
factory(window.moment); // Browser global
}
}(function (moment) {
function translateSeconds(number, withoutSuffix, key, isFuture) {
return (isFuture || withoutSuffix) ? 'paari sekundi' : 'paar sekundit';
}
return moment.lang('et', {
months : "jaanuar_veebruar_märts_aprill_mai_juuni_juuli_august_september_oktoober_november_detsember".split("_"),
monthsShort : "jaan_veebr_märts_apr_mai_juuni_juuli_aug_sept_okt_nov_dets".split("_"),
weekdays : "pühapäev_esmaspäev_teisipäev_kolmapäev_neljapäev_reede_laupäev".split("_"),
weekdaysShort : "P_E_T_K_N_R_L".split("_"),
weekdaysMin : "P_E_T_K_N_R_L".split("_"),
longDateFormat : {
LT : "H:mm",
L : "DD.MM.YYYY",
LL : "D. MMMM YYYY",
LLL : "D. MMMM YYYY LT",
LLLL : "dddd, D. MMMM YYYY LT"
},
calendar : {
sameDay : '[Täna,] LT',
nextDay : '[Homme,] LT',
nextWeek : '[Järgmine] dddd LT',
lastDay : '[Eile,] LT',
lastWeek : '[Eelmine] dddd LT',
sameElse : 'L'
},
relativeTime : {
future : "%s pärast",
past : "%s tagasi",
s : translateSeconds,
m : "minut",
mm : "%d minutit",
h : "tund",
hh : "%d tundi",
d : "päev",
dd : "%d päeva",
M : "kuu",
MM : "%d kuud",
y : "aasta",
yy : "%d aastat"
},
ordinal : '%d.',
week : {
dow : 1, // Monday is the first day of the week.
doy : 4 // The week that contains Jan 4th is the first week of the year.
}
});
}));

View file

@ -0,0 +1,60 @@
// moment.js language configuration
// language : euskara (eu)
// author : Eneko Illarramendi : https://github.com/eillarra
(function (factory) {
if (typeof define === 'function' && define.amd) {
define(['moment'], factory); // AMD
} else if (typeof exports === 'object') {
module.exports = factory(require('../moment')); // Node
} else {
factory(window.moment); // Browser global
}
}(function (moment) {
return moment.lang('eu', {
months : "urtarrila_otsaila_martxoa_apirila_maiatza_ekaina_uztaila_abuztua_iraila_urria_azaroa_abendua".split("_"),
monthsShort : "urt._ots._mar._api._mai._eka._uzt._abu._ira._urr._aza._abe.".split("_"),
weekdays : "igandea_astelehena_asteartea_asteazkena_osteguna_ostirala_larunbata".split("_"),
weekdaysShort : "ig._al._ar._az._og._ol._lr.".split("_"),
weekdaysMin : "ig_al_ar_az_og_ol_lr".split("_"),
longDateFormat : {
LT : "HH:mm",
L : "YYYY-MM-DD",
LL : "YYYY[ko] MMMM[ren] D[a]",
LLL : "YYYY[ko] MMMM[ren] D[a] LT",
LLLL : "dddd, YYYY[ko] MMMM[ren] D[a] LT",
l : "YYYY-M-D",
ll : "YYYY[ko] MMM D[a]",
lll : "YYYY[ko] MMM D[a] LT",
llll : "ddd, YYYY[ko] MMM D[a] LT"
},
calendar : {
sameDay : '[gaur] LT[etan]',
nextDay : '[bihar] LT[etan]',
nextWeek : 'dddd LT[etan]',
lastDay : '[atzo] LT[etan]',
lastWeek : '[aurreko] dddd LT[etan]',
sameElse : 'L'
},
relativeTime : {
future : "%s barru",
past : "duela %s",
s : "segundo batzuk",
m : "minutu bat",
mm : "%d minutu",
h : "ordu bat",
hh : "%d ordu",
d : "egun bat",
dd : "%d egun",
M : "hilabete bat",
MM : "%d hilabete",
y : "urte bat",
yy : "%d urte"
},
ordinal : '%d.',
week : {
dow : 1, // Monday is the first day of the week.
doy : 7 // The week that contains Jan 1st is the first week of the year.
}
});
}));

View file

@ -0,0 +1,97 @@
// moment.js language configuration
// language : Persian Language
// author : Ebrahim Byagowi : https://github.com/ebraminio
(function (factory) {
if (typeof define === 'function' && define.amd) {
define(['moment'], factory); // AMD
} else if (typeof exports === 'object') {
module.exports = factory(require('../moment')); // Node
} else {
factory(window.moment); // Browser global
}
}(function (moment) {
var symbolMap = {
'1': '۱',
'2': '۲',
'3': '۳',
'4': '۴',
'5': '۵',
'6': '۶',
'7': '۷',
'8': '۸',
'9': '۹',
'0': '۰'
}, numberMap = {
'۱': '1',
'۲': '2',
'۳': '3',
'۴': '4',
'۵': '5',
'۶': '6',
'۷': '7',
'۸': '8',
'۹': '9',
'۰': '0'
};
return moment.lang('fa', {
months : انویه_فوریهارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر'.split('_'),
monthsShort : انویه_فوریهارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر'.split('_'),
weekdays : 'یک\u200cشنبه_دوشنبهه\u200cشنبههارشنبه_پنج\u200cشنبه_جمعه_شنبه'.split('_'),
weekdaysShort : 'یک\u200cشنبه_دوشنبهه\u200cشنبههارشنبه_پنج\u200cشنبه_جمعه_شنبه'.split('_'),
weekdaysMin : 'ی_د_س_چ_پ_ج_ش'.split('_'),
longDateFormat : {
LT : 'HH:mm',
L : 'DD/MM/YYYY',
LL : 'D MMMM YYYY',
LLL : 'D MMMM YYYY LT',
LLLL : 'dddd, D MMMM YYYY LT'
},
meridiem : function (hour, minute, isLower) {
if (hour < 12) {
return "قبل از ظهر";
} else {
return "بعد از ظهر";
}
},
calendar : {
sameDay : '[امروز ساعت] LT',
nextDay : '[فردا ساعت] LT',
nextWeek : 'dddd [ساعت] LT',
lastDay : '[دیروز ساعت] LT',
lastWeek : 'dddd [پیش] [ساعت] LT',
sameElse : 'L'
},
relativeTime : {
future : 'در %s',
past : '%s پیش',
s : 'چندین ثانیه',
m : 'یک دقیقه',
mm : '%d دقیقه',
h : 'یک ساعت',
hh : '%d ساعت',
d : 'یک روز',
dd : '%d روز',
M : 'یک ماه',
MM : '%d ماه',
y : 'یک سال',
yy : '%d سال'
},
preparse: function (string) {
return string.replace(/[۰-۹]/g, function (match) {
return numberMap[match];
}).replace(/،/g, ',');
},
postformat: function (string) {
return string.replace(/\d/g, function (match) {
return symbolMap[match];
}).replace(/,/g, '،');
},
ordinal : '%dم',
week : {
dow : 6, // Saturday is the first day of the week.
doy : 12 // The week that contains Jan 1st is the first week of the year.
}
});
}));

View file

@ -0,0 +1,103 @@
// moment.js language configuration
// language : finnish (fi)
// author : Tarmo Aidantausta : https://github.com/bleadof
(function (factory) {
if (typeof define === 'function' && define.amd) {
define(['moment'], factory); // AMD
} else if (typeof exports === 'object') {
module.exports = factory(require('../moment')); // Node
} else {
factory(window.moment); // Browser global
}
}(function (moment) {
var numbers_past = 'nolla yksi kaksi kolme neljä viisi kuusi seitsemän kahdeksan yhdeksän'.split(' '),
numbers_future = ['nolla', 'yhden', 'kahden', 'kolmen', 'neljän', 'viiden', 'kuuden',
numbers_past[7], numbers_past[8], numbers_past[9]];
function translate(number, withoutSuffix, key, isFuture) {
var result = "";
switch (key) {
case 's':
return isFuture ? 'muutaman sekunnin' : 'muutama sekunti';
case 'm':
return isFuture ? 'minuutin' : 'minuutti';
case 'mm':
result = isFuture ? 'minuutin' : 'minuuttia';
break;
case 'h':
return isFuture ? 'tunnin' : 'tunti';
case 'hh':
result = isFuture ? 'tunnin' : 'tuntia';
break;
case 'd':
return isFuture ? 'päivän' : 'päivä';
case 'dd':
result = isFuture ? 'päivän' : 'päivää';
break;
case 'M':
return isFuture ? 'kuukauden' : 'kuukausi';
case 'MM':
result = isFuture ? 'kuukauden' : 'kuukautta';
break;
case 'y':
return isFuture ? 'vuoden' : 'vuosi';
case 'yy':
result = isFuture ? 'vuoden' : 'vuotta';
break;
}
result = verbal_number(number, isFuture) + " " + result;
return result;
}
function verbal_number(number, isFuture) {
return number < 10 ? (isFuture ? numbers_future[number] : numbers_past[number]) : number;
}
return moment.lang('fi', {
months : "tammikuu_helmikuu_maaliskuu_huhtikuu_toukokuu_kesäkuu_heinäkuu_elokuu_syyskuu_lokakuu_marraskuu_joulukuu".split("_"),
monthsShort : "tammi_helmi_maalis_huhti_touko_kesä_heinä_elo_syys_loka_marras_joulu".split("_"),
weekdays : "sunnuntai_maanantai_tiistai_keskiviikko_torstai_perjantai_lauantai".split("_"),
weekdaysShort : "su_ma_ti_ke_to_pe_la".split("_"),
weekdaysMin : "su_ma_ti_ke_to_pe_la".split("_"),
longDateFormat : {
LT : "HH.mm",
L : "DD.MM.YYYY",
LL : "Do MMMM[ta] YYYY",
LLL : "Do MMMM[ta] YYYY, [klo] LT",
LLLL : "dddd, Do MMMM[ta] YYYY, [klo] LT",
l : "D.M.YYYY",
ll : "Do MMM YYYY",
lll : "Do MMM YYYY, [klo] LT",
llll : "ddd, Do MMM YYYY, [klo] LT"
},
calendar : {
sameDay : '[tänään] [klo] LT',
nextDay : '[huomenna] [klo] LT',
nextWeek : 'dddd [klo] LT',
lastDay : '[eilen] [klo] LT',
lastWeek : '[viime] dddd[na] [klo] LT',
sameElse : 'L'
},
relativeTime : {
future : "%s päästä",
past : "%s sitten",
s : translate,
m : translate,
mm : translate,
h : translate,
hh : translate,
d : translate,
dd : translate,
M : translate,
MM : translate,
y : translate,
yy : translate
},
ordinal : "%d.",
week : {
dow : 1, // Monday is the first day of the week.
doy : 4 // The week that contains Jan 4th is the first week of the year.
}
});
}));

View file

@ -0,0 +1,54 @@
// moment.js language configuration
// language : canadian french (fr-ca)
// author : Jonathan Abourbih : https://github.com/jonbca
(function (factory) {
if (typeof define === 'function' && define.amd) {
define(['moment'], factory); // AMD
} else if (typeof exports === 'object') {
module.exports = factory(require('../moment')); // Node
} else {
factory(window.moment); // Browser global
}
}(function (moment) {
return moment.lang('fr-ca', {
months : "janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),
monthsShort : "janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),
weekdays : "dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),
weekdaysShort : "dim._lun._mar._mer._jeu._ven._sam.".split("_"),
weekdaysMin : "Di_Lu_Ma_Me_Je_Ve_Sa".split("_"),
longDateFormat : {
LT : "HH:mm",
L : "YYYY-MM-DD",
LL : "D MMMM YYYY",
LLL : "D MMMM YYYY LT",
LLLL : "dddd D MMMM YYYY LT"
},
calendar : {
sameDay: "[Aujourd'hui à] LT",
nextDay: '[Demain à] LT',
nextWeek: 'dddd [à] LT',
lastDay: '[Hier à] LT',
lastWeek: 'dddd [dernier à] LT',
sameElse: 'L'
},
relativeTime : {
future : "dans %s",
past : "il y a %s",
s : "quelques secondes",
m : "une minute",
mm : "%d minutes",
h : "une heure",
hh : "%d heures",
d : "un jour",
dd : "%d jours",
M : "un mois",
MM : "%d mois",
y : "un an",
yy : "%d ans"
},
ordinal : function (number) {
return number + (number === 1 ? 'er' : '');
}
});
}));

View file

@ -0,0 +1,58 @@
// moment.js language configuration
// language : french (fr)
// author : John Fischer : https://github.com/jfroffice
(function (factory) {
if (typeof define === 'function' && define.amd) {
define(['moment'], factory); // AMD
} else if (typeof exports === 'object') {
module.exports = factory(require('../moment')); // Node
} else {
factory(window.moment); // Browser global
}
}(function (moment) {
return moment.lang('fr', {
months : "janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),
monthsShort : "janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),
weekdays : "dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),
weekdaysShort : "dim._lun._mar._mer._jeu._ven._sam.".split("_"),
weekdaysMin : "Di_Lu_Ma_Me_Je_Ve_Sa".split("_"),
longDateFormat : {
LT : "HH:mm",
L : "DD/MM/YYYY",
LL : "D MMMM YYYY",
LLL : "D MMMM YYYY LT",
LLLL : "dddd D MMMM YYYY LT"
},
calendar : {
sameDay: "[Aujourd'hui à] LT",
nextDay: '[Demain à] LT',
nextWeek: 'dddd [à] LT',
lastDay: '[Hier à] LT',
lastWeek: 'dddd [dernier à] LT',
sameElse: 'L'
},
relativeTime : {
future : "dans %s",
past : "il y a %s",
s : "quelques secondes",
m : "une minute",
mm : "%d minutes",
h : "une heure",
hh : "%d heures",
d : "un jour",
dd : "%d jours",
M : "un mois",
MM : "%d mois",
y : "un an",
yy : "%d ans"
},
ordinal : function (number) {
return number + (number === 1 ? 'er' : '');
},
week : {
dow : 1, // Monday is the first day of the week.
doy : 4 // The week that contains Jan 4th is the first week of the year.
}
});
}));

View file

@ -0,0 +1,71 @@
// moment.js language configuration
// language : galician (gl)
// author : Juan G. Hurtado : https://github.com/juanghurtado
(function (factory) {
if (typeof define === 'function' && define.amd) {
define(['moment'], factory); // AMD
} else if (typeof exports === 'object') {
module.exports = factory(require('../moment')); // Node
} else {
factory(window.moment); // Browser global
}
}(function (moment) {
return moment.lang('gl', {
months : "Xaneiro_Febreiro_Marzo_Abril_Maio_Xuño_Xullo_Agosto_Setembro_Outubro_Novembro_Decembro".split("_"),
monthsShort : "Xan._Feb._Mar._Abr._Mai._Xuñ._Xul._Ago._Set._Out._Nov._Dec.".split("_"),
weekdays : "Domingo_Luns_Martes_Mércores_Xoves_Venres_Sábado".split("_"),
weekdaysShort : "Dom._Lun._Mar._Mér._Xov._Ven._Sáb.".split("_"),
weekdaysMin : "Do_Lu_Ma_Mé_Xo_Ve_Sá".split("_"),
longDateFormat : {
LT : "H:mm",
L : "DD/MM/YYYY",
LL : "D MMMM YYYY",
LLL : "D MMMM YYYY LT",
LLLL : "dddd D MMMM YYYY LT"
},
calendar : {
sameDay : function () {
return '[hoxe ' + ((this.hours() !== 1) ? 'ás' : 'á') + '] LT';
},
nextDay : function () {
return '[mañá ' + ((this.hours() !== 1) ? 'ás' : 'á') + '] LT';
},
nextWeek : function () {
return 'dddd [' + ((this.hours() !== 1) ? 'ás' : 'a') + '] LT';
},
lastDay : function () {
return '[onte ' + ((this.hours() !== 1) ? 'á' : 'a') + '] LT';
},
lastWeek : function () {
return '[o] dddd [pasado ' + ((this.hours() !== 1) ? 'ás' : 'a') + '] LT';
},
sameElse : 'L'
},
relativeTime : {
future : function (str) {
if (str === "uns segundos") {
return "nuns segundos";
}
return "en " + str;
},
past : "hai %s",
s : "uns segundos",
m : "un minuto",
mm : "%d minutos",
h : "unha hora",
hh : "%d horas",
d : "un día",
dd : "%d días",
M : "un mes",
MM : "%d meses",
y : "un ano",
yy : "%d anos"
},
ordinal : '%dº',
week : {
dow : 1, // Monday is the first day of the week.
doy : 7 // The week that contains Jan 1st is the first week of the year.
}
});
}));

View file

@ -0,0 +1,77 @@
// moment.js language configuration
// language : Hebrew (he)
// author : Tomer Cohen : https://github.com/tomer
// author : Moshe Simantov : https://github.com/DevelopmentIL
// author : Tal Ater : https://github.com/TalAter
(function (factory) {
if (typeof define === 'function' && define.amd) {
define(['moment'], factory); // AMD
} else if (typeof exports === 'object') {
module.exports = factory(require('../moment')); // Node
} else {
factory(window.moment); // Browser global
}
}(function (moment) {
return moment.lang('he', {
months : "ינואר_פברואר_מרץ_אפריל_מאי_יוני_יוליוגוסט_ספטמבר_אוקטובר_נובמבר_דצמבר".split("_"),
monthsShort : "ינו׳_פבר׳_מרץ_אפר׳_מאי_יוני_יוליוג׳_ספט׳וק׳וב׳_דצמ׳".split("_"),
weekdays : "ראשון_שני_שלישי_רביעי_חמישיישי_שבת".split("_"),
weekdaysShort : ׳׳׳׳׳_ו׳׳".split("_"),
weekdaysMin : "א_ב_ג_ד_ה_ו_ש".split("_"),
longDateFormat : {
LT : "HH:mm",
L : "DD/MM/YYYY",
LL : "D [ב]MMMM YYYY",
LLL : "D [ב]MMMM YYYY LT",
LLLL : "dddd, D [ב]MMMM YYYY LT",
l : "D/M/YYYY",
ll : "D MMM YYYY",
lll : "D MMM YYYY LT",
llll : "ddd, D MMM YYYY LT"
},
calendar : {
sameDay : '[היום ב־]LT',
nextDay : '[מחר ב־]LT',
nextWeek : 'dddd [בשעה] LT',
lastDay : '[אתמול ב־]LT',
lastWeek : '[ביום] dddd [האחרון בשעה] LT',
sameElse : 'L'
},
relativeTime : {
future : "בעוד %s",
past : "לפני %s",
s : "מספר שניות",
m : "דקה",
mm : "%d דקות",
h : "שעה",
hh : function (number) {
if (number === 2) {
return "שעתיים";
}
return number + " שעות";
},
d : "יום",
dd : function (number) {
if (number === 2) {
return "יומיים";
}
return number + " ימים";
},
M : "חודש",
MM : function (number) {
if (number === 2) {
return "חודשיים";
}
return number + " חודשים";
},
y : "שנה",
yy : function (number) {
if (number === 2) {
return "שנתיים";
}
return number + " שנים";
}
}
});
}));

View file

@ -0,0 +1,105 @@
// moment.js language configuration
// language : hindi (hi)
// author : Mayank Singhal : https://github.com/mayanksinghal
(function (factory) {
if (typeof define === 'function' && define.amd) {
define(['moment'], factory); // AMD
} else if (typeof exports === 'object') {
module.exports = factory(require('../moment')); // Node
} else {
factory(window.moment); // Browser global
}
}(function (moment) {
var symbolMap = {
'1': '१',
'2': '२',
'3': '३',
'4': '४',
'5': '५',
'6': '६',
'7': '७',
'8': '८',
'9': '९',
'0': ''
},
numberMap = {
'१': '1',
'२': '2',
'३': '3',
'४': '4',
'५': '5',
'६': '6',
'७': '7',
'८': '8',
'९': '9',
'': '0'
};
return moment.lang('hi', {
months : 'जनवरी_फ़रवरी_मार्च_अप्रैल_मई_जून_जुलाई_अगस्त_सितम्बर_अक्टूबर_नवम्बर_दिसम्बर'.split("_"),
monthsShort : 'जन._फ़र._मार्च_अप्रै._मई_जून_जुल._अग._सित._अक्टू._नव._दिस.'.split("_"),
weekdays : 'रविवार_सोमवार_मंगलवार_बुधवार_गुरूवार_शुक्रवार_शनिवार'.split("_"),
weekdaysShort : 'रवि_सोम_मंगल_बुध_गुरू_शुक्र_शनि'.split("_"),
weekdaysMin : 'र_सो_मं_बु_गु_शु_श'.split("_"),
longDateFormat : {
LT : "A h:mm बजे",
L : "DD/MM/YYYY",
LL : "D MMMM YYYY",
LLL : "D MMMM YYYY, LT",
LLLL : "dddd, D MMMM YYYY, LT"
},
calendar : {
sameDay : '[आज] LT',
nextDay : '[कल] LT',
nextWeek : 'dddd, LT',
lastDay : '[कल] LT',
lastWeek : '[पिछले] dddd, LT',
sameElse : 'L'
},
relativeTime : {
future : "%s में",
past : "%s पहले",
s : "कुछ ही क्षण",
m : "एक मिनट",
mm : "%d मिनट",
h : "एक घंटा",
hh : "%d घंटे",
d : "एक दिन",
dd : "%d दिन",
M : "एक महीने",
MM : "%d महीने",
y : "एक वर्ष",
yy : "%d वर्ष"
},
preparse: function (string) {
return string.replace(/[१२३४५६७८९०]/g, function (match) {
return numberMap[match];
});
},
postformat: function (string) {
return string.replace(/\d/g, function (match) {
return symbolMap[match];
});
},
// Hindi notation for meridiems are quite fuzzy in practice. While there exists
// a rigid notion of a 'Pahar' it is not used as rigidly in modern Hindi.
meridiem : function (hour, minute, isLower) {
if (hour < 4) {
return "रात";
} else if (hour < 10) {
return "सुबह";
} else if (hour < 17) {
return "दोपहर";
} else if (hour < 20) {
return "शाम";
} else {
return "रात";
}
},
week : {
dow : 0, // Sunday is the first day of the week.
doy : 6 // The week that contains Jan 1st is the first week of the year.
}
});
}));

View file

@ -0,0 +1,140 @@
// moment.js language configuration
// language : hrvatski (hr)
// author : Bojan Marković : https://github.com/bmarkovic
// based on (sl) translation by Robert Sedovšek
(function (factory) {
if (typeof define === 'function' && define.amd) {
define(['moment'], factory); // AMD
} else if (typeof exports === 'object') {
module.exports = factory(require('../moment')); // Node
} else {
factory(window.moment); // Browser global
}
}(function (moment) {
function translate(number, withoutSuffix, key) {
var result = number + " ";
switch (key) {
case 'm':
return withoutSuffix ? 'jedna minuta' : 'jedne minute';
case 'mm':
if (number === 1) {
result += 'minuta';
} else if (number === 2 || number === 3 || number === 4) {
result += 'minute';
} else {
result += 'minuta';
}
return result;
case 'h':
return withoutSuffix ? 'jedan sat' : 'jednog sata';
case 'hh':
if (number === 1) {
result += 'sat';
} else if (number === 2 || number === 3 || number === 4) {
result += 'sata';
} else {
result += 'sati';
}
return result;
case 'dd':
if (number === 1) {
result += 'dan';
} else {
result += 'dana';
}
return result;
case 'MM':
if (number === 1) {
result += 'mjesec';
} else if (number === 2 || number === 3 || number === 4) {
result += 'mjeseca';
} else {
result += 'mjeseci';
}
return result;
case 'yy':
if (number === 1) {
result += 'godina';
} else if (number === 2 || number === 3 || number === 4) {
result += 'godine';
} else {
result += 'godina';
}
return result;
}
}
return moment.lang('hr', {
months : "sječanj_veljača_ožujak_travanj_svibanj_lipanj_srpanj_kolovoz_rujan_listopad_studeni_prosinac".split("_"),
monthsShort : "sje._vel._ožu._tra._svi._lip._srp._kol._ruj._lis._stu._pro.".split("_"),
weekdays : "nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota".split("_"),
weekdaysShort : "ned._pon._uto._sri._čet._pet._sub.".split("_"),
weekdaysMin : "ne_po_ut_sr_če_pe_su".split("_"),
longDateFormat : {
LT : "H:mm",
L : "DD. MM. YYYY",
LL : "D. MMMM YYYY",
LLL : "D. MMMM YYYY LT",
LLLL : "dddd, D. MMMM YYYY LT"
},
calendar : {
sameDay : '[danas u] LT',
nextDay : '[sutra u] LT',
nextWeek : function () {
switch (this.day()) {
case 0:
return '[u] [nedjelju] [u] LT';
case 3:
return '[u] [srijedu] [u] LT';
case 6:
return '[u] [subotu] [u] LT';
case 1:
case 2:
case 4:
case 5:
return '[u] dddd [u] LT';
}
},
lastDay : '[jučer u] LT',
lastWeek : function () {
switch (this.day()) {
case 0:
case 3:
return '[prošlu] dddd [u] LT';
case 6:
return '[prošle] [subote] [u] LT';
case 1:
case 2:
case 4:
case 5:
return '[prošli] dddd [u] LT';
}
},
sameElse : 'L'
},
relativeTime : {
future : "za %s",
past : "prije %s",
s : "par sekundi",
m : translate,
mm : translate,
h : translate,
hh : translate,
d : "dan",
dd : translate,
M : "mjesec",
MM : translate,
y : "godinu",
yy : translate
},
ordinal : '%d.',
week : {
dow : 1, // Monday is the first day of the week.
doy : 7 // The week that contains Jan 1st is the first week of the year.
}
});
}));

View file

@ -0,0 +1,98 @@
// moment.js language configuration
// language : hungarian (hu)
// author : Adam Brunner : https://github.com/adambrunner
(function (factory) {
if (typeof define === 'function' && define.amd) {
define(['moment'], factory); // AMD
} else if (typeof exports === 'object') {
module.exports = factory(require('../moment')); // Node
} else {
factory(window.moment); // Browser global
}
}(function (moment) {
var weekEndings = 'vasárnap hétfőn kedden szerdán csütörtökön pénteken szombaton'.split(' ');
function translate(number, withoutSuffix, key, isFuture) {
var num = number,
suffix;
switch (key) {
case 's':
return (isFuture || withoutSuffix) ? 'néhány másodperc' : 'néhány másodperce';
case 'm':
return 'egy' + (isFuture || withoutSuffix ? ' perc' : ' perce');
case 'mm':
return num + (isFuture || withoutSuffix ? ' perc' : ' perce');
case 'h':
return 'egy' + (isFuture || withoutSuffix ? ' óra' : ' órája');
case 'hh':
return num + (isFuture || withoutSuffix ? ' óra' : ' órája');
case 'd':
return 'egy' + (isFuture || withoutSuffix ? ' nap' : ' napja');
case 'dd':
return num + (isFuture || withoutSuffix ? ' nap' : ' napja');
case 'M':
return 'egy' + (isFuture || withoutSuffix ? ' hónap' : ' hónapja');
case 'MM':
return num + (isFuture || withoutSuffix ? ' hónap' : ' hónapja');
case 'y':
return 'egy' + (isFuture || withoutSuffix ? ' év' : ' éve');
case 'yy':
return num + (isFuture || withoutSuffix ? ' év' : ' éve');
}
return '';
}
function week(isFuture) {
return (isFuture ? '' : '[múlt] ') + '[' + weekEndings[this.day()] + '] LT[-kor]';
}
return moment.lang('hu', {
months : "január_február_március_április_május_június_július_augusztus_szeptember_október_november_december".split("_"),
monthsShort : "jan_feb_márc_ápr_máj_jún_júl_aug_szept_okt_nov_dec".split("_"),
weekdays : "vasárnap_hétfő_kedd_szerda_csütörtök_péntek_szombat".split("_"),
weekdaysShort : "vas_hét_kedd_sze_csüt_pén_szo".split("_"),
weekdaysMin : "v_h_k_sze_cs_p_szo".split("_"),
longDateFormat : {
LT : "H:mm",
L : "YYYY.MM.DD.",
LL : "YYYY. MMMM D.",
LLL : "YYYY. MMMM D., LT",
LLLL : "YYYY. MMMM D., dddd LT"
},
calendar : {
sameDay : '[ma] LT[-kor]',
nextDay : '[holnap] LT[-kor]',
nextWeek : function () {
return week.call(this, true);
},
lastDay : '[tegnap] LT[-kor]',
lastWeek : function () {
return week.call(this, false);
},
sameElse : 'L'
},
relativeTime : {
future : "%s múlva",
past : "%s",
s : translate,
m : translate,
mm : translate,
h : translate,
hh : translate,
d : translate,
dd : translate,
M : translate,
MM : translate,
y : translate,
yy : translate
},
ordinal : '%d.',
week : {
dow : 1, // Monday is the first day of the week.
doy : 7 // The week that contains Jan 1st is the first week of the year.
}
});
}));

View file

@ -0,0 +1,67 @@
// moment.js language configuration
// language : Bahasa Indonesia (id)
// author : Mohammad Satrio Utomo : https://github.com/tyok
// reference: http://id.wikisource.org/wiki/Pedoman_Umum_Ejaan_Bahasa_Indonesia_yang_Disempurnakan
(function (factory) {
if (typeof define === 'function' && define.amd) {
define(['moment'], factory); // AMD
} else if (typeof exports === 'object') {
module.exports = factory(require('../moment')); // Node
} else {
factory(window.moment); // Browser global
}
}(function (moment) {
return moment.lang('id', {
months : "Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_November_Desember".split("_"),
monthsShort : "Jan_Feb_Mar_Apr_Mei_Jun_Jul_Ags_Sep_Okt_Nov_Des".split("_"),
weekdays : "Minggu_Senin_Selasa_Rabu_Kamis_Jumat_Sabtu".split("_"),
weekdaysShort : "Min_Sen_Sel_Rab_Kam_Jum_Sab".split("_"),
weekdaysMin : "Mg_Sn_Sl_Rb_Km_Jm_Sb".split("_"),
longDateFormat : {
LT : "HH.mm",
L : "DD/MM/YYYY",
LL : "D MMMM YYYY",
LLL : "D MMMM YYYY [pukul] LT",
LLLL : "dddd, D MMMM YYYY [pukul] LT"
},
meridiem : function (hours, minutes, isLower) {
if (hours < 11) {
return 'pagi';
} else if (hours < 15) {
return 'siang';
} else if (hours < 19) {
return 'sore';
} else {
return 'malam';
}
},
calendar : {
sameDay : '[Hari ini pukul] LT',
nextDay : '[Besok pukul] LT',
nextWeek : 'dddd [pukul] LT',
lastDay : '[Kemarin pukul] LT',
lastWeek : 'dddd [lalu pukul] LT',
sameElse : 'L'
},
relativeTime : {
future : "dalam %s",
past : "%s yang lalu",
s : "beberapa detik",
m : "semenit",
mm : "%d menit",
h : "sejam",
hh : "%d jam",
d : "sehari",
dd : "%d hari",
M : "sebulan",
MM : "%d bulan",
y : "setahun",
yy : "%d tahun"
},
week : {
dow : 1, // Monday is the first day of the week.
doy : 7 // The week that contains Jan 1st is the first week of the year.
}
});
}));

View file

@ -0,0 +1,124 @@
// moment.js language configuration
// language : icelandic (is)
// author : Hinrik Örn Sigurðsson : https://github.com/hinrik
(function (factory) {
if (typeof define === 'function' && define.amd) {
define(['moment'], factory); // AMD
} else if (typeof exports === 'object') {
module.exports = factory(require('../moment')); // Node
} else {
factory(window.moment); // Browser global
}
}(function (moment) {
function plural(n) {
if (n % 100 === 11) {
return true;
} else if (n % 10 === 1) {
return false;
}
return true;
}
function translate(number, withoutSuffix, key, isFuture) {
var result = number + " ";
switch (key) {
case 's':
return withoutSuffix || isFuture ? 'nokkrar sekúndur' : 'nokkrum sekúndum';
case 'm':
return withoutSuffix ? 'mínúta' : 'mínútu';
case 'mm':
if (plural(number)) {
return result + (withoutSuffix || isFuture ? 'mínútur' : 'mínútum');
} else if (withoutSuffix) {
return result + 'mínúta';
}
return result + 'mínútu';
case 'hh':
if (plural(number)) {
return result + (withoutSuffix || isFuture ? 'klukkustundir' : 'klukkustundum');
}
return result + 'klukkustund';
case 'd':
if (withoutSuffix) {
return 'dagur';
}
return isFuture ? 'dag' : 'degi';
case 'dd':
if (plural(number)) {
if (withoutSuffix) {
return result + 'dagar';
}
return result + (isFuture ? 'daga' : 'dögum');
} else if (withoutSuffix) {
return result + 'dagur';
}
return result + (isFuture ? 'dag' : 'degi');
case 'M':
if (withoutSuffix) {
return 'mánuður';
}
return isFuture ? 'mánuð' : 'mánuði';
case 'MM':
if (plural(number)) {
if (withoutSuffix) {
return result + 'mánuðir';
}
return result + (isFuture ? 'mánuði' : 'mánuðum');
} else if (withoutSuffix) {
return result + 'mánuður';
}
return result + (isFuture ? 'mánuð' : 'mánuði');
case 'y':
return withoutSuffix || isFuture ? 'ár' : 'ári';
case 'yy':
if (plural(number)) {
return result + (withoutSuffix || isFuture ? 'ár' : 'árum');
}
return result + (withoutSuffix || isFuture ? 'ár' : 'ári');
}
}
return moment.lang('is', {
months : "janúar_febrúar_mars_apríl_maí_júní_júlí_ágúst_september_október_nóvember_desember".split("_"),
monthsShort : "jan_feb_mar_apr_maí_jún_júl_ágú_sep_okt_nóv_des".split("_"),
weekdays : "sunnudagur_mánudagur_þriðjudagur_miðvikudagur_fimmtudagur_föstudagur_laugardagur".split("_"),
weekdaysShort : "sun_mán_þri_mið_fim_fös_lau".split("_"),
weekdaysMin : "Su_Má_Þr_Mi_Fi_Fö_La".split("_"),
longDateFormat : {
LT : "H:mm",
L : "DD/MM/YYYY",
LL : "D. MMMM YYYY",
LLL : "D. MMMM YYYY [kl.] LT",
LLLL : "dddd, D. MMMM YYYY [kl.] LT"
},
calendar : {
sameDay : '[í dag kl.] LT',
nextDay : '[á morgun kl.] LT',
nextWeek : 'dddd [kl.] LT',
lastDay : '[í gær kl.] LT',
lastWeek : '[síðasta] dddd [kl.] LT',
sameElse : 'L'
},
relativeTime : {
future : "eftir %s",
past : "fyrir %s síðan",
s : translate,
m : translate,
mm : translate,
h : "klukkustund",
hh : translate,
d : translate,
dd : translate,
M : translate,
MM : translate,
y : translate,
yy : translate
},
ordinal : '%d.',
week : {
dow : 1, // Monday is the first day of the week.
doy : 4 // The week that contains Jan 4th is the first week of the year.
}
});
}));

View file

@ -0,0 +1,59 @@
// moment.js language configuration
// language : italian (it)
// author : Lorenzo : https://github.com/aliem
// author: Mattia Larentis: https://github.com/nostalgiaz
(function (factory) {
if (typeof define === 'function' && define.amd) {
define(['moment'], factory); // AMD
} else if (typeof exports === 'object') {
module.exports = factory(require('../moment')); // Node
} else {
factory(window.moment); // Browser global
}
}(function (moment) {
return moment.lang('it', {
months : "Gennaio_Febbraio_Marzo_Aprile_Maggio_Giugno_Luglio_Agosto_Settembre_Ottobre_Novembre_Dicembre".split("_"),
monthsShort : "Gen_Feb_Mar_Apr_Mag_Giu_Lug_Ago_Set_Ott_Nov_Dic".split("_"),
weekdays : "Domenica_Lunedì_Martedì_Mercoledì_Giovedì_Venerdì_Sabato".split("_"),
weekdaysShort : "Dom_Lun_Mar_Mer_Gio_Ven_Sab".split("_"),
weekdaysMin : "D_L_Ma_Me_G_V_S".split("_"),
longDateFormat : {
LT : "HH:mm",
L : "DD/MM/YYYY",
LL : "D MMMM YYYY",
LLL : "D MMMM YYYY LT",
LLLL : "dddd, D MMMM YYYY LT"
},
calendar : {
sameDay: '[Oggi alle] LT',
nextDay: '[Domani alle] LT',
nextWeek: 'dddd [alle] LT',
lastDay: '[Ieri alle] LT',
lastWeek: '[lo scorso] dddd [alle] LT',
sameElse: 'L'
},
relativeTime : {
future : function (s) {
return ((/^[0-9].+$/).test(s) ? "tra" : "in") + " " + s;
},
past : "%s fa",
s : "secondi",
m : "un minuto",
mm : "%d minuti",
h : "un'ora",
hh : "%d ore",
d : "un giorno",
dd : "%d giorni",
M : "un mese",
MM : "%d mesi",
y : "un anno",
yy : "%d anni"
},
ordinal: '%dº',
week : {
dow : 1, // Monday is the first day of the week.
doy : 4 // The week that contains Jan 4th is the first week of the year.
}
});
}));

View file

@ -0,0 +1,58 @@
// moment.js language configuration
// language : japanese (ja)
// author : LI Long : https://github.com/baryon
(function (factory) {
if (typeof define === 'function' && define.amd) {
define(['moment'], factory); // AMD
} else if (typeof exports === 'object') {
module.exports = factory(require('../moment')); // Node
} else {
factory(window.moment); // Browser global
}
}(function (moment) {
return moment.lang('ja', {
months : "1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),
monthsShort : "1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),
weekdays : "日曜日_月曜日_火曜日_水曜日_木曜日_金曜日_土曜日".split("_"),
weekdaysShort : "日_月_火_水_木_金_土".split("_"),
weekdaysMin : "日_月_火_水_木_金_土".split("_"),
longDateFormat : {
LT : "Ah時m分",
L : "YYYY/MM/DD",
LL : "YYYY年M月D日",
LLL : "YYYY年M月D日LT",
LLLL : "YYYY年M月D日LT dddd"
},
meridiem : function (hour, minute, isLower) {
if (hour < 12) {
return "午前";
} else {
return "午後";
}
},
calendar : {
sameDay : '[今日] LT',
nextDay : '[明日] LT',
nextWeek : '[来週]dddd LT',
lastDay : '[昨日] LT',
lastWeek : '[前週]dddd LT',
sameElse : 'L'
},
relativeTime : {
future : "%s後",
past : "%s前",
s : "数秒",
m : "1分",
mm : "%d分",
h : "1時間",
hh : "%d時間",
d : "1日",
dd : "%d日",
M : "1ヶ月",
MM : "%dヶ月",
y : "1年",
yy : "%d年"
}
});
}));

View file

@ -0,0 +1,108 @@
// moment.js language configuration
// language : Georgian (ka)
// author : Irakli Janiashvili : https://github.com/irakli-janiashvili
(function (factory) {
if (typeof define === 'function' && define.amd) {
define(['moment'], factory); // AMD
} else if (typeof exports === 'object') {
module.exports = factory(require('../moment')); // Node
} else {
factory(window.moment); // Browser global
}
}(function (moment) {
function monthsCaseReplace(m, format) {
var months = {
'nominative': 'იანვარი_თებერვალი_მარტი_აპრილი_მაისი_ივნისი_ივლისი_აგვისტო_სექტემბერი_ოქტომბერი_ნოემბერი_დეკემბერი'.split('_'),
'accusative': 'იანვარს_თებერვალს_მარტს_აპრილის_მაისს_ივნისს_ივლისს_აგვისტს_სექტემბერს_ოქტომბერს_ნოემბერს_დეკემბერს'.split('_')
},
nounCase = (/D[oD] *MMMM?/).test(format) ?
'accusative' :
'nominative';
return months[nounCase][m.month()];
}
function weekdaysCaseReplace(m, format) {
var weekdays = {
'nominative': 'კვირა_ორშაბათი_სამშაბათი_ოთხშაბათი_ხუთშაბათი_პარასკევი_შაბათი'.split('_'),
'accusative': 'კვირას_ორშაბათს_სამშაბათს_ოთხშაბათს_ხუთშაბათს_პარასკევს_შაბათს'.split('_')
},
nounCase = (/(წინა|შემდეგ)/).test(format) ?
'accusative' :
'nominative';
return weekdays[nounCase][m.day()];
}
return moment.lang('ka', {
months : monthsCaseReplace,
monthsShort : "იან_თებ_მარ_აპრ_მაი_ივნ_ივლ_აგვ_სექ_ოქტ_ნოე_დეკ".split("_"),
weekdays : weekdaysCaseReplace,
weekdaysShort : "კვი_ორშ_სამ_ოთხ_ხუთ_პარ_შაბ".split("_"),
weekdaysMin : "კვ_ორ_სა_ოთ_ხუ_პა_შა".split("_"),
longDateFormat : {
LT : "h:mm A",
L : "DD/MM/YYYY",
LL : "D MMMM YYYY",
LLL : "D MMMM YYYY LT",
LLLL : "dddd, D MMMM YYYY LT"
},
calendar : {
sameDay : '[დღეს] LT[-ზე]',
nextDay : '[ხვალ] LT[-ზე]',
lastDay : '[გუშინ] LT[-ზე]',
nextWeek : '[შემდეგ] dddd LT[-ზე]',
lastWeek : '[წინა] dddd LT-ზე',
sameElse : 'L'
},
relativeTime : {
future : function (s) {
return (/(წამი|წუთი|საათი|წელი)/).test(s) ?
s.replace(/ი$/, "ში") :
s + "ში";
},
past : function (s) {
if ((/(წამი|წუთი|საათი|დღე|თვე)/).test(s)) {
return s.replace(/(ი|ე)$/, "ის წინ");
}
if ((/წელი/).test(s)) {
return s.replace(/წელი$/, "წლის წინ");
}
},
s : "რამდენიმე წამი",
m : "წუთი",
mm : "%d წუთი",
h : "საათი",
hh : "%d საათი",
d : "დღე",
dd : "%d დღე",
M : "თვე",
MM : "%d თვე",
y : "წელი",
yy : "%d წელი"
},
ordinal : function (number) {
if (number === 0) {
return number;
}
if (number === 1) {
return number + "-ლი";
}
if ((number < 20) || (number <= 100 && (number % 20 === 0)) || (number % 100 === 0)) {
return "მე-" + number;
}
return number + "-ე";
},
week : {
dow : 1,
doy : 7
}
});
}));

View file

@ -0,0 +1,56 @@
// moment.js language configuration
// language : korean (ko)
// author : Kyungwook, Park : https://github.com/kyungw00k
(function (factory) {
if (typeof define === 'function' && define.amd) {
define(['moment'], factory); // AMD
} else if (typeof exports === 'object') {
module.exports = factory(require('../moment')); // Node
} else {
factory(window.moment); // Browser global
}
}(function (moment) {
return moment.lang('ko', {
months : "1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월".split("_"),
monthsShort : "1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월".split("_"),
weekdays : "일요일_월요일_화요일_수요일_목요일_금요일_토요일".split("_"),
weekdaysShort : "일_월_화_수_목_금_토".split("_"),
weekdaysMin : "일_월_화_수_목_금_토".split("_"),
longDateFormat : {
LT : "A h시 mm분",
L : "YYYY.MM.DD",
LL : "YYYY년 MMMM D일",
LLL : "YYYY년 MMMM D일 LT",
LLLL : "YYYY년 MMMM D일 dddd LT"
},
meridiem : function (hour, minute, isUpper) {
return hour < 12 ? '오전' : '오후';
},
calendar : {
sameDay : '오늘 LT',
nextDay : '내일 LT',
nextWeek : 'dddd LT',
lastDay : '어제 LT',
lastWeek : '지난주 dddd LT',
sameElse : 'L'
},
relativeTime : {
future : "%s 후",
past : "%s 전",
s : "몇초",
ss : "%d초",
m : "일분",
mm : "%d분",
h : "한시간",
hh : "%d시간",
d : "하루",
dd : "%d일",
M : "한달",
MM : "%d달",
y : "일년",
yy : "%d년"
},
ordinal : '%d일'
});
}));

View file

@ -0,0 +1,118 @@
// moment.js language configuration
// language : Lithuanian (lt)
// author : Mindaugas Mozūras : https://github.com/mmozuras
(function (factory) {
if (typeof define === 'function' && define.amd) {
define(['moment'], factory); // AMD
} else if (typeof exports === 'object') {
module.exports = factory(require('../moment')); // Node
} else {
factory(window.moment); // Browser global
}
}(function (moment) {
var units = {
"m" : "minutė_minutės_minutę",
"mm": "minutės_minučių_minutes",
"h" : "valanda_valandos_valandą",
"hh": "valandos_valandų_valandas",
"d" : "diena_dienos_dieną",
"dd": "dienos_dienų_dienas",
"M" : "mėnuo_mėnesio_mėnesį",
"MM": "mėnesiai_mėnesių_mėnesius",
"y" : "metai_metų_metus",
"yy": "metai_metų_metus"
},
weekDays = "pirmadienis_antradienis_trečiadienis_ketvirtadienis_penktadienis_šeštadienis_sekmadienis".split("_");
function translateSeconds(number, withoutSuffix, key, isFuture) {
if (withoutSuffix) {
return "kelios sekundės";
} else {
return isFuture ? "kelių sekundžių" : "kelias sekundes";
}
}
function translateSingular(number, withoutSuffix, key, isFuture) {
return withoutSuffix ? forms(key)[0] : (isFuture ? forms(key)[1] : forms(key)[2]);
}
function special(number) {
return number % 10 === 0 || (number > 10 && number < 20);
}
function forms(key) {
return units[key].split("_");
}
function translate(number, withoutSuffix, key, isFuture) {
var result = number + " ";
if (number === 1) {
return result + translateSingular(number, withoutSuffix, key[0], isFuture);
} else if (withoutSuffix) {
return result + (special(number) ? forms(key)[1] : forms(key)[0]);
} else {
if (isFuture) {
return result + forms(key)[1];
} else {
return result + (special(number) ? forms(key)[1] : forms(key)[2]);
}
}
}
function relativeWeekDay(moment, format) {
var nominative = format.indexOf('dddd LT') === -1,
weekDay = weekDays[moment.weekday()];
return nominative ? weekDay : weekDay.substring(0, weekDay.length - 2) + "į";
}
return moment.lang("lt", {
months : "sausio_vasario_kovo_balandžio_gegužės_biržėlio_liepos_rugpjūčio_rugsėjo_spalio_lapkričio_gruodžio".split("_"),
monthsShort : "sau_vas_kov_bal_geg_bir_lie_rgp_rgs_spa_lap_grd".split("_"),
weekdays : relativeWeekDay,
weekdaysShort : "Sek_Pir_Ant_Tre_Ket_Pen_Šeš".split("_"),
weekdaysMin : "S_P_A_T_K_Pn_Š".split("_"),
longDateFormat : {
LT : "HH:mm",
L : "YYYY-MM-DD",
LL : "YYYY [m.] MMMM D [d.]",
LLL : "YYYY [m.] MMMM D [d.], LT [val.]",
LLLL : "YYYY [m.] MMMM D [d.], dddd, LT [val.]",
l : "YYYY-MM-DD",
ll : "YYYY [m.] MMMM D [d.]",
lll : "YYYY [m.] MMMM D [d.], LT [val.]",
llll : "YYYY [m.] MMMM D [d.], ddd, LT [val.]"
},
calendar : {
sameDay : "[Šiandien] LT",
nextDay : "[Rytoj] LT",
nextWeek : "dddd LT",
lastDay : "[Vakar] LT",
lastWeek : "[Praėjusį] dddd LT",
sameElse : "L"
},
relativeTime : {
future : "po %s",
past : "prieš %s",
s : translateSeconds,
m : translateSingular,
mm : translate,
h : translateSingular,
hh : translate,
d : translateSingular,
dd : translate,
M : translateSingular,
MM : translate,
y : translateSingular,
yy : translate
},
ordinal : function (number) {
return number + '-oji';
},
week : {
dow : 1, // Monday is the first day of the week.
doy : 4 // The week that contains Jan 4th is the first week of the year.
}
});
}));

View file

@ -0,0 +1,77 @@
// moment.js language configuration
// language : latvian (lv)
// author : Kristaps Karlsons : https://github.com/skakri
(function (factory) {
if (typeof define === 'function' && define.amd) {
define(['moment'], factory); // AMD
} else if (typeof exports === 'object') {
module.exports = factory(require('../moment')); // Node
} else {
factory(window.moment); // Browser global
}
}(function (moment) {
var units = {
'mm': 'minūti_minūtes_minūte_minūtes',
'hh': 'stundu_stundas_stunda_stundas',
'dd': 'dienu_dienas_diena_dienas',
'MM': 'mēnesi_mēnešus_mēnesis_mēneši',
'yy': 'gadu_gadus_gads_gadi'
};
function format(word, number, withoutSuffix) {
var forms = word.split('_');
if (withoutSuffix) {
return number % 10 === 1 && number !== 11 ? forms[2] : forms[3];
} else {
return number % 10 === 1 && number !== 11 ? forms[0] : forms[1];
}
}
function relativeTimeWithPlural(number, withoutSuffix, key) {
return number + ' ' + format(units[key], number, withoutSuffix);
}
return moment.lang('lv', {
months : "janvāris_februāris_marts_aprīlis_maijs_jūnijs_jūlijs_augusts_septembris_oktobris_novembris_decembris".split("_"),
monthsShort : "jan_feb_mar_apr_mai_jūn_jūl_aug_sep_okt_nov_dec".split("_"),
weekdays : "svētdiena_pirmdiena_otrdiena_trešdiena_ceturtdiena_piektdiena_sestdiena".split("_"),
weekdaysShort : "Sv_P_O_T_C_Pk_S".split("_"),
weekdaysMin : "Sv_P_O_T_C_Pk_S".split("_"),
longDateFormat : {
LT : "HH:mm",
L : "DD.MM.YYYY",
LL : "YYYY. [gada] D. MMMM",
LLL : "YYYY. [gada] D. MMMM, LT",
LLLL : "YYYY. [gada] D. MMMM, dddd, LT"
},
calendar : {
sameDay : '[Šodien pulksten] LT',
nextDay : '[Rīt pulksten] LT',
nextWeek : 'dddd [pulksten] LT',
lastDay : '[Vakar pulksten] LT',
lastWeek : '[Pagājušā] dddd [pulksten] LT',
sameElse : 'L'
},
relativeTime : {
future : "%s vēlāk",
past : "%s agrāk",
s : "dažas sekundes",
m : "minūti",
mm : relativeTimeWithPlural,
h : "stundu",
hh : relativeTimeWithPlural,
d : "dienu",
dd : relativeTimeWithPlural,
M : "mēnesi",
MM : relativeTimeWithPlural,
y : "gadu",
yy : relativeTimeWithPlural
},
ordinal : '%d.',
week : {
dow : 1, // Monday is the first day of the week.
doy : 4 // The week that contains Jan 4th is the first week of the year.
}
});
}));

View file

@ -0,0 +1,64 @@
// moment.js language configuration
// language : malayalam (ml)
// author : Floyd Pink : https://github.com/floydpink
(function (factory) {
if (typeof define === 'function' && define.amd) {
define(['moment'], factory); // AMD
} else if (typeof exports === 'object') {
module.exports = factory(require('../moment')); // Node
} else {
factory(window.moment); // Browser global
}
}(function (moment) {
return moment.lang('ml', {
months : 'ജനുവരി_ഫെബ്രുവരി_മാർച്ച്_ഏപ്രിൽ_മേയ്_ജൂൺ_ജൂലൈ_ഓഗസ്റ്റ്_സെപ്റ്റബർ_ഒക്ടോബർ_നവബർ_ഡിസബർ'.split("_"),
monthsShort : 'ജനു._ഫെബ്രു._മാർ._ഏപ്രി._മേയ്_ജൂൺ_ജൂലൈ._ഓഗ._സെപ്റ്റ._ഒക്ടോ._നവ._ഡിസ.'.split("_"),
weekdays : 'ഞായറാഴ്ച_തിങ്കളാഴ്ച_ചൊവ്വാഴ്ച_ബുധനാഴ്ച_വ്യാഴാഴ്ച_വെള്ളിയാഴ്ച_ശനിയാഴ്ച'.split("_"),
weekdaysShort : 'ഞായർ_തിങ്കൾ_ചൊവ്വ_ബുധൻ_വ്യാഴ_വെള്ളി_ശനി'.split("_"),
weekdaysMin : 'ഞാ_തി_ചൊ_ബു_വ്യാ_വെ_ശ'.split("_"),
longDateFormat : {
LT : "A h:mm -നു",
L : "DD/MM/YYYY",
LL : "D MMMM YYYY",
LLL : "D MMMM YYYY, LT",
LLLL : "dddd, D MMMM YYYY, LT"
},
calendar : {
sameDay : '[ഇന്ന്] LT',
nextDay : '[നാളെ] LT',
nextWeek : 'dddd, LT',
lastDay : '[ഇന്നലെ] LT',
lastWeek : '[കഴിഞ്ഞ] dddd, LT',
sameElse : 'L'
},
relativeTime : {
future : "%s കഴിഞ്ഞ്",
past : "%s മുൻപ്",
s : "അൽപ നിമിഷങ്ങൾ",
m : "ഒരു മിനിറ്റ്",
mm : "%d മിനിറ്റ്",
h : "ഒരു മണിക്കൂർ",
hh : "%d മണിക്കൂർ",
d : "ഒരു ദിവസം",
dd : "%d ദിവസം",
M : "ഒരു മാസം",
MM : "%d മാസം",
y : "ഒരു വർഷം",
yy : "%d വർഷം"
},
meridiem : function (hour, minute, isLower) {
if (hour < 4) {
return "രാത്രി";
} else if (hour < 12) {
return "രാവിലെ";
} else if (hour < 17) {
return "ഉച്ച കഴിഞ്ഞ്";
} else if (hour < 20) {
return "വൈകുന്നേരം";
} else {
return "രാത്രി";
}
}
});
}));

View file

@ -0,0 +1,104 @@
// moment.js language configuration
// language : Marathi (mr)
// author : Harshad Kale : https://github.com/kalehv
(function (factory) {
if (typeof define === 'function' && define.amd) {
define(['moment'], factory); // AMD
} else if (typeof exports === 'object') {
module.exports = factory(require('../moment')); // Node
} else {
factory(window.moment); // Browser global
}
}(function (moment) {
var symbolMap = {
'1': '१',
'2': '२',
'3': '३',
'4': '४',
'5': '५',
'6': '६',
'7': '७',
'8': '८',
'9': '९',
'0': ''
},
numberMap = {
'१': '1',
'२': '2',
'३': '3',
'४': '4',
'५': '5',
'६': '6',
'७': '7',
'८': '8',
'९': '9',
'': '0'
};
return moment.lang('mr', {
months : 'जानेवारी_फेब्रुवारी_मार्च_एप्रिल_मे_जून_जुलै_ऑगस्ट_सप्टेंबर_ऑक्टोबर_नोव्हेंबर_डिसेंबर'.split("_"),
monthsShort: 'जाने._फेब्रु._मार्च._एप्रि._मे._जून._जुलै._ऑग._सप्टें._ऑक्टो._नोव्हें._डिसें.'.split("_"),
weekdays : 'रविवार_सोमवार_मंगळवार_बुधवार_गुरूवार_शुक्रवार_शनिवार'.split("_"),
weekdaysShort : 'रवि_सोम_मंगळ_बुध_गुरू_शुक्र_शनि'.split("_"),
weekdaysMin : 'र_सो_मं_बु_गु_शु_श'.split("_"),
longDateFormat : {
LT : "A h:mm वाजता",
L : "DD/MM/YYYY",
LL : "D MMMM YYYY",
LLL : "D MMMM YYYY, LT",
LLLL : "dddd, D MMMM YYYY, LT"
},
calendar : {
sameDay : '[आज] LT',
nextDay : '[उद्या] LT',
nextWeek : 'dddd, LT',
lastDay : '[काल] LT',
lastWeek: '[मागील] dddd, LT',
sameElse : 'L'
},
relativeTime : {
future : "%s नंतर",
past : "%s पूर्वी",
s : "सेकंद",
m: "एक मिनिट",
mm: "%d मिनिटे",
h : "एक तास",
hh : "%d तास",
d : "एक दिवस",
dd : "%d दिवस",
M : "एक महिना",
MM : "%d महिने",
y : "एक वर्ष",
yy : "%d वर्षे"
},
preparse: function (string) {
return string.replace(/[१२३४५६७८९०]/g, function (match) {
return numberMap[match];
});
},
postformat: function (string) {
return string.replace(/\d/g, function (match) {
return symbolMap[match];
});
},
meridiem: function (hour, minute, isLower)
{
if (hour < 4) {
return "रात्री";
} else if (hour < 10) {
return "सकाळी";
} else if (hour < 17) {
return "दुपारी";
} else if (hour < 20) {
return "सायंकाळी";
} else {
return "रात्री";
}
},
week : {
dow : 0, // Sunday is the first day of the week.
doy : 6 // The week that contains Jan 1st is the first week of the year.
}
});
}));

View file

@ -0,0 +1,66 @@
// moment.js language configuration
// language : Bahasa Malaysia (ms-MY)
// author : Weldan Jamili : https://github.com/weldan
(function (factory) {
if (typeof define === 'function' && define.amd) {
define(['moment'], factory); // AMD
} else if (typeof exports === 'object') {
module.exports = factory(require('../moment')); // Node
} else {
factory(window.moment); // Browser global
}
}(function (moment) {
return moment.lang('ms-my', {
months : "Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember".split("_"),
monthsShort : "Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis".split("_"),
weekdays : "Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu".split("_"),
weekdaysShort : "Ahd_Isn_Sel_Rab_Kha_Jum_Sab".split("_"),
weekdaysMin : "Ah_Is_Sl_Rb_Km_Jm_Sb".split("_"),
longDateFormat : {
LT : "HH.mm",
L : "DD/MM/YYYY",
LL : "D MMMM YYYY",
LLL : "D MMMM YYYY [pukul] LT",
LLLL : "dddd, D MMMM YYYY [pukul] LT"
},
meridiem : function (hours, minutes, isLower) {
if (hours < 11) {
return 'pagi';
} else if (hours < 15) {
return 'tengahari';
} else if (hours < 19) {
return 'petang';
} else {
return 'malam';
}
},
calendar : {
sameDay : '[Hari ini pukul] LT',
nextDay : '[Esok pukul] LT',
nextWeek : 'dddd [pukul] LT',
lastDay : '[Kelmarin pukul] LT',
lastWeek : 'dddd [lepas pukul] LT',
sameElse : 'L'
},
relativeTime : {
future : "dalam %s",
past : "%s yang lepas",
s : "beberapa saat",
m : "seminit",
mm : "%d minit",
h : "sejam",
hh : "%d jam",
d : "sehari",
dd : "%d hari",
M : "sebulan",
MM : "%d bulan",
y : "setahun",
yy : "%d tahun"
},
week : {
dow : 1, // Monday is the first day of the week.
doy : 7 // The week that contains Jan 1st is the first week of the year.
}
});
}));

View file

@ -0,0 +1,57 @@
// moment.js language configuration
// language : norwegian bokmål (nb)
// authors : Espen Hovlandsdal : https://github.com/rexxars
// Sigurd Gartmann : https://github.com/sigurdga
(function (factory) {
if (typeof define === 'function' && define.amd) {
define(['moment'], factory); // AMD
} else if (typeof exports === 'object') {
module.exports = factory(require('../moment')); // Node
} else {
factory(window.moment); // Browser global
}
}(function (moment) {
return moment.lang('nb', {
months : "januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember".split("_"),
monthsShort : "jan._feb._mars_april_mai_juni_juli_aug._sep._okt._nov._des.".split("_"),
weekdays : "søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag".split("_"),
weekdaysShort : "sø._ma._ti._on._to._fr._lø.".split("_"),
weekdaysMin : "sø_ma_ti_on_to_fr_lø".split("_"),
longDateFormat : {
LT : "H.mm",
L : "DD.MM.YYYY",
LL : "D. MMMM YYYY",
LLL : "D. MMMM YYYY [kl.] LT",
LLLL : "dddd D. MMMM YYYY [kl.] LT"
},
calendar : {
sameDay: '[i dag kl.] LT',
nextDay: '[i morgen kl.] LT',
nextWeek: 'dddd [kl.] LT',
lastDay: '[i går kl.] LT',
lastWeek: '[forrige] dddd [kl.] LT',
sameElse: 'L'
},
relativeTime : {
future : "om %s",
past : "for %s siden",
s : "noen sekunder",
m : "ett minutt",
mm : "%d minutter",
h : "en time",
hh : "%d timer",
d : "en dag",
dd : "%d dager",
M : "en måned",
MM : "%d måneder",
y : "ett år",
yy : "%d år"
},
ordinal : '%d.',
week : {
dow : 1, // Monday is the first day of the week.
doy : 4 // The week that contains Jan 4th is the first week of the year.
}
});
}));

View file

@ -0,0 +1,105 @@
// moment.js language configuration
// language : nepali/nepalese
// author : suvash : https://github.com/suvash
(function (factory) {
if (typeof define === 'function' && define.amd) {
define(['moment'], factory); // AMD
} else if (typeof exports === 'object') {
module.exports = factory(require('../moment')); // Node
} else {
factory(window.moment); // Browser global
}
}(function (moment) {
var symbolMap = {
'1': '१',
'2': '२',
'3': '३',
'4': '४',
'5': '५',
'6': '६',
'7': '७',
'8': '८',
'9': '९',
'0': ''
},
numberMap = {
'१': '1',
'२': '2',
'३': '3',
'४': '4',
'५': '5',
'६': '6',
'७': '7',
'८': '8',
'९': '9',
'': '0'
};
return moment.lang('ne', {
months : 'जनवरी_फेब्रुवरी_मार्च_अप्रिल_मई_जुन_जुलाई_अगष्ट_सेप्टेम्बर_अक्टोबर_नोभेम्बर_डिसेम्बर'.split("_"),
monthsShort : 'जन._फेब्रु._मार्च_अप्रि._मई_जुन_जुलाई._अग._सेप्ट._अक्टो._नोभे._डिसे.'.split("_"),
weekdays : 'आइतबार_सोमबार_मङ्गलबार_बुधबार_बिहिबार_शुक्रबार_शनिबार'.split("_"),
weekdaysShort : 'आइत._सोम._मङ्गल._बुध._बिहि._शुक्र._शनि.'.split("_"),
weekdaysMin : 'आइ._सो._मङ्_बु._बि._शु._श.'.split("_"),
longDateFormat : {
LT : "Aको h:mm बजे",
L : "DD/MM/YYYY",
LL : "D MMMM YYYY",
LLL : "D MMMM YYYY, LT",
LLLL : "dddd, D MMMM YYYY, LT"
},
preparse: function (string) {
return string.replace(/[१२३४५६७८९०]/g, function (match) {
return numberMap[match];
});
},
postformat: function (string) {
return string.replace(/\d/g, function (match) {
return symbolMap[match];
});
},
meridiem : function (hour, minute, isLower) {
if (hour < 3) {
return "राती";
} else if (hour < 10) {
return "बिहान";
} else if (hour < 15) {
return "दिउँसो";
} else if (hour < 18) {
return "बेलुका";
} else if (hour < 20) {
return "साँझ";
} else {
return "राती";
}
},
calendar : {
sameDay : '[आज] LT',
nextDay : '[भोली] LT',
nextWeek : '[आउँदो] dddd[,] LT',
lastDay : '[हिजो] LT',
lastWeek : '[गएको] dddd[,] LT',
sameElse : 'L'
},
relativeTime : {
future : "%sमा",
past : "%s अगाडी",
s : "केही समय",
m : "एक मिनेट",
mm : "%d मिनेट",
h : "एक घण्टा",
hh : "%d घण्टा",
d : "एक दिन",
dd : "%d दिन",
M : "एक महिना",
MM : "%d महिना",
y : "एक बर्ष",
yy : "%d बर्ष"
},
week : {
dow : 1, // Monday is the first day of the week.
doy : 7 // The week that contains Jan 1st is the first week of the year.
}
});
}));

View file

@ -0,0 +1,67 @@
// moment.js language configuration
// language : dutch (nl)
// author : Joris Röling : https://github.com/jjupiter
(function (factory) {
if (typeof define === 'function' && define.amd) {
define(['moment'], factory); // AMD
} else if (typeof exports === 'object') {
module.exports = factory(require('../moment')); // Node
} else {
factory(window.moment); // Browser global
}
}(function (moment) {
var monthsShortWithDots = "jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.".split("_"),
monthsShortWithoutDots = "jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec".split("_");
return moment.lang('nl', {
months : "januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december".split("_"),
monthsShort : function (m, format) {
if (/-MMM-/.test(format)) {
return monthsShortWithoutDots[m.month()];
} else {
return monthsShortWithDots[m.month()];
}
},
weekdays : "zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag".split("_"),
weekdaysShort : "zo._ma._di._wo._do._vr._za.".split("_"),
weekdaysMin : "Zo_Ma_Di_Wo_Do_Vr_Za".split("_"),
longDateFormat : {
LT : "HH:mm",
L : "DD-MM-YYYY",
LL : "D MMMM YYYY",
LLL : "D MMMM YYYY LT",
LLLL : "dddd D MMMM YYYY LT"
},
calendar : {
sameDay: '[vandaag om] LT',
nextDay: '[morgen om] LT',
nextWeek: 'dddd [om] LT',
lastDay: '[gisteren om] LT',
lastWeek: '[afgelopen] dddd [om] LT',
sameElse: 'L'
},
relativeTime : {
future : "over %s",
past : "%s geleden",
s : "een paar seconden",
m : "één minuut",
mm : "%d minuten",
h : "één uur",
hh : "%d uur",
d : "één dag",
dd : "%d dagen",
M : "één maand",
MM : "%d maanden",
y : "één jaar",
yy : "%d jaar"
},
ordinal : function (number) {
return number + ((number === 1 || number === 8 || number >= 20) ? 'ste' : 'de');
},
week : {
dow : 1, // Monday is the first day of the week.
doy : 4 // The week that contains Jan 4th is the first week of the year.
}
});
}));

View file

@ -0,0 +1,56 @@
// moment.js language configuration
// language : norwegian nynorsk (nn)
// author : https://github.com/mechuwind
(function (factory) {
if (typeof define === 'function' && define.amd) {
define(['moment'], factory); // AMD
} else if (typeof exports === 'object') {
module.exports = factory(require('../moment')); // Node
} else {
factory(window.moment); // Browser global
}
}(function (moment) {
return moment.lang('nn', {
months : "januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember".split("_"),
monthsShort : "jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des".split("_"),
weekdays : "sundag_måndag_tysdag_onsdag_torsdag_fredag_laurdag".split("_"),
weekdaysShort : "sun_mån_tys_ons_tor_fre_lau".split("_"),
weekdaysMin : "su_må_ty_on_to_fr_lø".split("_"),
longDateFormat : {
LT : "HH:mm",
L : "DD.MM.YYYY",
LL : "D MMMM YYYY",
LLL : "D MMMM YYYY LT",
LLLL : "dddd D MMMM YYYY LT"
},
calendar : {
sameDay: '[I dag klokka] LT',
nextDay: '[I morgon klokka] LT',
nextWeek: 'dddd [klokka] LT',
lastDay: '[I går klokka] LT',
lastWeek: '[Føregående] dddd [klokka] LT',
sameElse: 'L'
},
relativeTime : {
future : "om %s",
past : "for %s siden",
s : "noen sekund",
m : "ett minutt",
mm : "%d minutt",
h : "en time",
hh : "%d timar",
d : "en dag",
dd : "%d dagar",
M : "en månad",
MM : "%d månader",
y : "ett år",
yy : "%d år"
},
ordinal : '%d.',
week : {
dow : 1, // Monday is the first day of the week.
doy : 4 // The week that contains Jan 4th is the first week of the year.
}
});
}));

View file

@ -0,0 +1,98 @@
// moment.js language configuration
// language : polish (pl)
// author : Rafal Hirsz : https://github.com/evoL
(function (factory) {
if (typeof define === 'function' && define.amd) {
define(['moment'], factory); // AMD
} else if (typeof exports === 'object') {
module.exports = factory(require('../moment')); // Node
} else {
factory(window.moment); // Browser global
}
}(function (moment) {
var monthsNominative = "styczeń_luty_marzec_kwiecień_maj_czerwiec_lipiec_sierpień_wrzesień_październik_listopad_grudzień".split("_"),
monthsSubjective = "stycznia_lutego_marca_kwietnia_maja_czerwca_lipca_sierpnia_września_października_listopada_grudnia".split("_");
function plural(n) {
return (n % 10 < 5) && (n % 10 > 1) && (~~(n / 10) !== 1);
}
function translate(number, withoutSuffix, key) {
var result = number + " ";
switch (key) {
case 'm':
return withoutSuffix ? 'minuta' : 'minutę';
case 'mm':
return result + (plural(number) ? 'minuty' : 'minut');
case 'h':
return withoutSuffix ? 'godzina' : 'godzinę';
case 'hh':
return result + (plural(number) ? 'godziny' : 'godzin');
case 'MM':
return result + (plural(number) ? 'miesiące' : 'miesięcy');
case 'yy':
return result + (plural(number) ? 'lata' : 'lat');
}
}
return moment.lang('pl', {
months : function (momentToFormat, format) {
if (/D MMMM/.test(format)) {
return monthsSubjective[momentToFormat.month()];
} else {
return monthsNominative[momentToFormat.month()];
}
},
monthsShort : "sty_lut_mar_kwi_maj_cze_lip_sie_wrz_paź_lis_gru".split("_"),
weekdays : "niedziela_poniedziałek_wtorek_środa_czwartek_piątek_sobota".split("_"),
weekdaysShort : "nie_pon_wt_śr_czw_pt_sb".split("_"),
weekdaysMin : "N_Pn_Wt_Śr_Cz_Pt_So".split("_"),
longDateFormat : {
LT : "HH:mm",
L : "DD.MM.YYYY",
LL : "D MMMM YYYY",
LLL : "D MMMM YYYY LT",
LLLL : "dddd, D MMMM YYYY LT"
},
calendar : {
sameDay: '[Dziś o] LT',
nextDay: '[Jutro o] LT',
nextWeek: '[W] dddd [o] LT',
lastDay: '[Wczoraj o] LT',
lastWeek: function () {
switch (this.day()) {
case 0:
return '[W zeszłą niedzielę o] LT';
case 3:
return '[W zeszłą środę o] LT';
case 6:
return '[W zeszłą sobotę o] LT';
default:
return '[W zeszły] dddd [o] LT';
}
},
sameElse: 'L'
},
relativeTime : {
future : "za %s",
past : "%s temu",
s : "kilka sekund",
m : translate,
mm : translate,
h : translate,
hh : translate,
d : "1 dzień",
dd : '%d dni',
M : "miesiąc",
MM : translate,
y : "rok",
yy : translate
},
ordinal : '%d.',
week : {
dow : 1, // Monday is the first day of the week.
doy : 4 // The week that contains Jan 4th is the first week of the year.
}
});
}));

View file

@ -0,0 +1,56 @@
// moment.js language configuration
// language : brazilian portuguese (pt-br)
// author : Caio Ribeiro Pereira : https://github.com/caio-ribeiro-pereira
(function (factory) {
if (typeof define === 'function' && define.amd) {
define(['moment'], factory); // AMD
} else if (typeof exports === 'object') {
module.exports = factory(require('../moment')); // Node
} else {
factory(window.moment); // Browser global
}
}(function (moment) {
return moment.lang('pt-br', {
months : "Janeiro_Fevereiro_Março_Abril_Maio_Junho_Julho_Agosto_Setembro_Outubro_Novembro_Dezembro".split("_"),
monthsShort : "Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez".split("_"),
weekdays : "Domingo_Segunda-feira_Terça-feira_Quarta-feira_Quinta-feira_Sexta-feira_Sábado".split("_"),
weekdaysShort : "Dom_Seg_Ter_Qua_Qui_Sex_Sáb".split("_"),
weekdaysMin : "Dom_2ª_3ª_4ª_5ª_6ª_Sáb".split("_"),
longDateFormat : {
LT : "HH:mm",
L : "DD/MM/YYYY",
LL : "D [de] MMMM [de] YYYY",
LLL : "D [de] MMMM [de] YYYY LT",
LLLL : "dddd, D [de] MMMM [de] YYYY LT"
},
calendar : {
sameDay: '[Hoje às] LT',
nextDay: '[Amanhã às] LT',
nextWeek: 'dddd [às] LT',
lastDay: '[Ontem às] LT',
lastWeek: function () {
return (this.day() === 0 || this.day() === 6) ?
'[Último] dddd [às] LT' : // Saturday + Sunday
'[Última] dddd [às] LT'; // Monday - Friday
},
sameElse: 'L'
},
relativeTime : {
future : "em %s",
past : "%s atrás",
s : "segundos",
m : "um minuto",
mm : "%d minutos",
h : "uma hora",
hh : "%d horas",
d : "um dia",
dd : "%d dias",
M : "um mês",
MM : "%d meses",
y : "um ano",
yy : "%d anos"
},
ordinal : '%dº'
});
}));

View file

@ -0,0 +1,60 @@
// moment.js language configuration
// language : portuguese (pt)
// author : Jefferson : https://github.com/jalex79
(function (factory) {
if (typeof define === 'function' && define.amd) {
define(['moment'], factory); // AMD
} else if (typeof exports === 'object') {
module.exports = factory(require('../moment')); // Node
} else {
factory(window.moment); // Browser global
}
}(function (moment) {
return moment.lang('pt', {
months : "Janeiro_Fevereiro_Março_Abril_Maio_Junho_Julho_Agosto_Setembro_Outubro_Novembro_Dezembro".split("_"),
monthsShort : "Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez".split("_"),
weekdays : "Domingo_Segunda-feira_Terça-feira_Quarta-feira_Quinta-feira_Sexta-feira_Sábado".split("_"),
weekdaysShort : "Dom_Seg_Ter_Qua_Qui_Sex_Sáb".split("_"),
weekdaysMin : "Dom_2ª_3ª_4ª_5ª_6ª_Sáb".split("_"),
longDateFormat : {
LT : "HH:mm",
L : "DD/MM/YYYY",
LL : "D [de] MMMM [de] YYYY",
LLL : "D [de] MMMM [de] YYYY LT",
LLLL : "dddd, D [de] MMMM [de] YYYY LT"
},
calendar : {
sameDay: '[Hoje às] LT',
nextDay: '[Amanhã às] LT',
nextWeek: 'dddd [às] LT',
lastDay: '[Ontem às] LT',
lastWeek: function () {
return (this.day() === 0 || this.day() === 6) ?
'[Último] dddd [às] LT' : // Saturday + Sunday
'[Última] dddd [às] LT'; // Monday - Friday
},
sameElse: 'L'
},
relativeTime : {
future : "em %s",
past : "%s atrás",
s : "segundos",
m : "um minuto",
mm : "%d minutos",
h : "uma hora",
hh : "%d horas",
d : "um dia",
dd : "%d dias",
M : "um mês",
MM : "%d meses",
y : "um ano",
yy : "%d anos"
},
ordinal : '%dº',
week : {
dow : 1, // Monday is the first day of the week.
doy : 4 // The week that contains Jan 4th is the first week of the year.
}
});
}));

View file

@ -0,0 +1,56 @@
// moment.js language configuration
// language : romanian (ro)
// author : Vlad Gurdiga : https://github.com/gurdiga
// author : Valentin Agachi : https://github.com/avaly
(function (factory) {
if (typeof define === 'function' && define.amd) {
define(['moment'], factory); // AMD
} else if (typeof exports === 'object') {
module.exports = factory(require('../moment')); // Node
} else {
factory(window.moment); // Browser global
}
}(function (moment) {
return moment.lang('ro', {
months : "Ianuarie_Februarie_Martie_Aprilie_Mai_Iunie_Iulie_August_Septembrie_Octombrie_Noiembrie_Decembrie".split("_"),
monthsShort : "Ian_Feb_Mar_Apr_Mai_Iun_Iul_Aug_Sep_Oct_Noi_Dec".split("_"),
weekdays : "Duminică_Luni_Marţi_Miercuri_Joi_Vineri_Sâmbătă".split("_"),
weekdaysShort : "Dum_Lun_Mar_Mie_Joi_Vin_Sâm".split("_"),
weekdaysMin : "Du_Lu_Ma_Mi_Jo_Vi_Sâ".split("_"),
longDateFormat : {
LT : "H:mm",
L : "DD/MM/YYYY",
LL : "D MMMM YYYY",
LLL : "D MMMM YYYY H:mm",
LLLL : "dddd, D MMMM YYYY H:mm"
},
calendar : {
sameDay: "[azi la] LT",
nextDay: '[mâine la] LT',
nextWeek: 'dddd [la] LT',
lastDay: '[ieri la] LT',
lastWeek: '[fosta] dddd [la] LT',
sameElse: 'L'
},
relativeTime : {
future : "peste %s",
past : "%s în urmă",
s : "câteva secunde",
m : "un minut",
mm : "%d minute",
h : "o oră",
hh : "%d ore",
d : "o zi",
dd : "%d zile",
M : "o lună",
MM : "%d luni",
y : "un an",
yy : "%d ani"
},
week : {
dow : 1, // Monday is the first day of the week.
doy : 7 // The week that contains Jan 1st is the first week of the year.
}
});
}));

View file

@ -0,0 +1,163 @@
// moment.js language configuration
// language : russian (ru)
// author : Viktorminator : https://github.com/Viktorminator
// Author : Menelion Elensúle : https://github.com/Oire
(function (factory) {
if (typeof define === 'function' && define.amd) {
define(['moment'], factory); // AMD
} else if (typeof exports === 'object') {
module.exports = factory(require('../moment')); // Node
} else {
factory(window.moment); // Browser global
}
}(function (moment) {
function plural(word, num) {
var forms = word.split('_');
return num % 10 === 1 && num % 100 !== 11 ? forms[0] : (num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20) ? forms[1] : forms[2]);
}
function relativeTimeWithPlural(number, withoutSuffix, key) {
var format = {
'mm': 'минута_минуты_минут',
'hh': асасаасов',
'dd': ень_дня_дней',
'MM': есяц_месяцаесяцев',
'yy': 'год_годает'
};
if (key === 'm') {
return withoutSuffix ? 'минута' : 'минуту';
}
else {
return number + ' ' + plural(format[key], +number);
}
}
function monthsCaseReplace(m, format) {
var months = {
'nominative': 'январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь'.split('_'),
'accusative': 'января_февраля_марта_апреля_мая_июня_июля_августа_сентября_октября_ноября_декабря'.split('_')
},
nounCase = (/D[oD]? *MMMM?/).test(format) ?
'accusative' :
'nominative';
return months[nounCase][m.month()];
}
function monthsShortCaseReplace(m, format) {
var monthsShort = {
'nominative': 'янв_фев_мар_апрай_июнь_июль_авг_сен_окт_ноя_дек'.split('_'),
'accusative': 'янв_фев_мар_апрая_июня_июля_авг_сен_окт_ноя_дек'.split('_')
},
nounCase = (/D[oD]? *MMMM?/).test(format) ?
'accusative' :
'nominative';
return monthsShort[nounCase][m.month()];
}
function weekdaysCaseReplace(m, format) {
var weekdays = {
'nominative': оскресенье_понедельник_вторник_средаетверг_пятница_суббота'.split('_'),
'accusative': оскресенье_понедельник_вторник_средуетверг_пятницу_субботу'.split('_')
},
nounCase = (/\[ ?[Вв] ?(?:прошлую|следующую)? ?\] ?dddd/).test(format) ?
'accusative' :
'nominative';
return weekdays[nounCase][m.day()];
}
return moment.lang('ru', {
months : monthsCaseReplace,
monthsShort : monthsShortCaseReplace,
weekdays : weekdaysCaseReplace,
weekdaysShort : с_пн_вт_ср_чт_пт_сб".split("_"),
weekdaysMin : с_пн_вт_ср_чт_пт_сб".split("_"),
monthsParse : [/^янв/i, /^фев/i, /^мар/i, /^апр/i, /^ма[й|я]/i, /^июн/i, /^июл/i, /^авг/i, /^сен/i, /^окт/i, /^ноя/i, /^дек/i],
longDateFormat : {
LT : "HH:mm",
L : "DD.MM.YYYY",
LL : "D MMMM YYYY г.",
LLL : "D MMMM YYYY г., LT",
LLLL : "dddd, D MMMM YYYY г., LT"
},
calendar : {
sameDay: '[Сегодня в] LT',
nextDay: '[Завтра в] LT',
lastDay: '[Вчера в] LT',
nextWeek: function () {
return this.day() === 2 ? '[Во] dddd [в] LT' : '[В] dddd [в] LT';
},
lastWeek: function () {
switch (this.day()) {
case 0:
return '[В прошлое] dddd [в] LT';
case 1:
case 2:
case 4:
return '[В прошлый] dddd [в] LT';
case 3:
case 5:
case 6:
return '[В прошлую] dddd [в] LT';
}
},
sameElse: 'L'
},
relativeTime : {
future : "через %s",
past : "%s назад",
s : "несколько секунд",
m : relativeTimeWithPlural,
mm : relativeTimeWithPlural,
h : "час",
hh : relativeTimeWithPlural,
d : "день",
dd : relativeTimeWithPlural,
M : "месяц",
MM : relativeTimeWithPlural,
y : "год",
yy : relativeTimeWithPlural
},
// M. E.: those two are virtually unused but a user might want to implement them for his/her website for some reason
meridiem : function (hour, minute, isLower) {
if (hour < 4) {
return "ночи";
} else if (hour < 12) {
return "утра";
} else if (hour < 17) {
return "дня";
} else {
return "вечера";
}
},
ordinal: function (number, period) {
switch (period) {
case 'M':
case 'd':
case 'DDD':
return number + '-й';
case 'D':
return number + '-го';
case 'w':
case 'W':
return number + '-я';
default:
return number;
}
},
week : {
dow : 1, // Monday is the first day of the week.
doy : 7 // The week that contains Jan 1st is the first week of the year.
}
});
}));

View file

@ -0,0 +1,156 @@
// moment.js language configuration
// language : slovak (sk)
// author : Martin Minka : https://github.com/k2s
// based on work of petrbela : https://github.com/petrbela
(function (factory) {
if (typeof define === 'function' && define.amd) {
define(['moment'], factory); // AMD
} else if (typeof exports === 'object') {
module.exports = factory(require('../moment')); // Node
} else {
factory(window.moment); // Browser global
}
}(function (moment) {
var months = "január_február_marec_apríl_máj_jún_júl_august_september_október_november_december".split("_"),
monthsShort = "jan_feb_mar_apr_máj_jún_júl_aug_sep_okt_nov_dec".split("_");
function plural(n) {
return (n > 1) && (n < 5);
}
function translate(number, withoutSuffix, key, isFuture) {
var result = number + " ";
switch (key) {
case 's': // a few seconds / in a few seconds / a few seconds ago
return (withoutSuffix || isFuture) ? 'pár sekúnd' : 'pár sekundami';
case 'm': // a minute / in a minute / a minute ago
return withoutSuffix ? 'minúta' : (isFuture ? 'minútu' : 'minútou');
case 'mm': // 9 minutes / in 9 minutes / 9 minutes ago
if (withoutSuffix || isFuture) {
return result + (plural(number) ? 'minúty' : 'minút');
} else {
return result + 'minútami';
}
break;
case 'h': // an hour / in an hour / an hour ago
return withoutSuffix ? 'hodina' : (isFuture ? 'hodinu' : 'hodinou');
case 'hh': // 9 hours / in 9 hours / 9 hours ago
if (withoutSuffix || isFuture) {
return result + (plural(number) ? 'hodiny' : 'hodín');
} else {
return result + 'hodinami';
}
break;
case 'd': // a day / in a day / a day ago
return (withoutSuffix || isFuture) ? 'deň' : 'dňom';
case 'dd': // 9 days / in 9 days / 9 days ago
if (withoutSuffix || isFuture) {
return result + (plural(number) ? 'dni' : 'dní');
} else {
return result + 'dňami';
}
break;
case 'M': // a month / in a month / a month ago
return (withoutSuffix || isFuture) ? 'mesiac' : 'mesiacom';
case 'MM': // 9 months / in 9 months / 9 months ago
if (withoutSuffix || isFuture) {
return result + (plural(number) ? 'mesiace' : 'mesiacov');
} else {
return result + 'mesiacmi';
}
break;
case 'y': // a year / in a year / a year ago
return (withoutSuffix || isFuture) ? 'rok' : 'rokom';
case 'yy': // 9 years / in 9 years / 9 years ago
if (withoutSuffix || isFuture) {
return result + (plural(number) ? 'roky' : 'rokov');
} else {
return result + 'rokmi';
}
break;
}
}
return moment.lang('sk', {
months : months,
monthsShort : monthsShort,
monthsParse : (function (months, monthsShort) {
var i, _monthsParse = [];
for (i = 0; i < 12; i++) {
// use custom parser to solve problem with July (červenec)
_monthsParse[i] = new RegExp('^' + months[i] + '$|^' + monthsShort[i] + '$', 'i');
}
return _monthsParse;
}(months, monthsShort)),
weekdays : "nedeľa_pondelok_utorok_streda_štvrtok_piatok_sobota".split("_"),
weekdaysShort : "ne_po_ut_st_št_pi_so".split("_"),
weekdaysMin : "ne_po_ut_st_št_pi_so".split("_"),
longDateFormat : {
LT: "H:mm",
L : "DD.MM.YYYY",
LL : "D. MMMM YYYY",
LLL : "D. MMMM YYYY LT",
LLLL : "dddd D. MMMM YYYY LT"
},
calendar : {
sameDay: "[dnes o] LT",
nextDay: '[zajtra o] LT',
nextWeek: function () {
switch (this.day()) {
case 0:
return '[v nedeľu o] LT';
case 1:
case 2:
return '[v] dddd [o] LT';
case 3:
return '[v stredu o] LT';
case 4:
return '[vo štvrtok o] LT';
case 5:
return '[v piatok o] LT';
case 6:
return '[v sobotu o] LT';
}
},
lastDay: '[včera o] LT',
lastWeek: function () {
switch (this.day()) {
case 0:
return '[minulú nedeľu o] LT';
case 1:
case 2:
return '[minulý] dddd [o] LT';
case 3:
return '[minulú stredu o] LT';
case 4:
case 5:
return '[minulý] dddd [o] LT';
case 6:
return '[minulú sobotu o] LT';
}
},
sameElse: "L"
},
relativeTime : {
future : "za %s",
past : "pred %s",
s : translate,
m : translate,
mm : translate,
h : translate,
hh : translate,
d : translate,
dd : translate,
M : translate,
MM : translate,
y : translate,
yy : translate
},
ordinal : '%d.',
week : {
dow : 1, // Monday is the first day of the week.
doy : 4 // The week that contains Jan 4th is the first week of the year.
}
});
}));

View file

@ -0,0 +1,144 @@
// moment.js language configuration
// language : slovenian (sl)
// author : Robert Sedovšek : https://github.com/sedovsek
(function (factory) {
if (typeof define === 'function' && define.amd) {
define(['moment'], factory); // AMD
} else if (typeof exports === 'object') {
module.exports = factory(require('../moment')); // Node
} else {
factory(window.moment); // Browser global
}
}(function (moment) {
function translate(number, withoutSuffix, key) {
var result = number + " ";
switch (key) {
case 'm':
return withoutSuffix ? 'ena minuta' : 'eno minuto';
case 'mm':
if (number === 1) {
result += 'minuta';
} else if (number === 2) {
result += 'minuti';
} else if (number === 3 || number === 4) {
result += 'minute';
} else {
result += 'minut';
}
return result;
case 'h':
return withoutSuffix ? 'ena ura' : 'eno uro';
case 'hh':
if (number === 1) {
result += 'ura';
} else if (number === 2) {
result += 'uri';
} else if (number === 3 || number === 4) {
result += 'ure';
} else {
result += 'ur';
}
return result;
case 'dd':
if (number === 1) {
result += 'dan';
} else {
result += 'dni';
}
return result;
case 'MM':
if (number === 1) {
result += 'mesec';
} else if (number === 2) {
result += 'meseca';
} else if (number === 3 || number === 4) {
result += 'mesece';
} else {
result += 'mesecev';
}
return result;
case 'yy':
if (number === 1) {
result += 'leto';
} else if (number === 2) {
result += 'leti';
} else if (number === 3 || number === 4) {
result += 'leta';
} else {
result += 'let';
}
return result;
}
}
return moment.lang('sl', {
months : "januar_februar_marec_april_maj_junij_julij_avgust_september_oktober_november_december".split("_"),
monthsShort : "jan._feb._mar._apr._maj._jun._jul._avg._sep._okt._nov._dec.".split("_"),
weekdays : "nedelja_ponedeljek_torek_sreda_četrtek_petek_sobota".split("_"),
weekdaysShort : "ned._pon._tor._sre._čet._pet._sob.".split("_"),
weekdaysMin : "ne_po_to_sr_če_pe_so".split("_"),
longDateFormat : {
LT : "H:mm",
L : "DD. MM. YYYY",
LL : "D. MMMM YYYY",
LLL : "D. MMMM YYYY LT",
LLLL : "dddd, D. MMMM YYYY LT"
},
calendar : {
sameDay : '[danes ob] LT',
nextDay : '[jutri ob] LT',
nextWeek : function () {
switch (this.day()) {
case 0:
return '[v] [nedeljo] [ob] LT';
case 3:
return '[v] [sredo] [ob] LT';
case 6:
return '[v] [soboto] [ob] LT';
case 1:
case 2:
case 4:
case 5:
return '[v] dddd [ob] LT';
}
},
lastDay : '[včeraj ob] LT',
lastWeek : function () {
switch (this.day()) {
case 0:
case 3:
case 6:
return '[prejšnja] dddd [ob] LT';
case 1:
case 2:
case 4:
case 5:
return '[prejšnji] dddd [ob] LT';
}
},
sameElse : 'L'
},
relativeTime : {
future : "čez %s",
past : "%s nazaj",
s : "nekaj sekund",
m : translate,
mm : translate,
h : translate,
hh : translate,
d : "en dan",
dd : translate,
M : "en mesec",
MM : translate,
y : "eno leto",
yy : translate
},
ordinal : '%d.',
week : {
dow : 1, // Monday is the first day of the week.
doy : 7 // The week that contains Jan 1st is the first week of the year.
}
});
}));

View file

@ -0,0 +1,57 @@
// moment.js language configuration
// language : Albanian (sq)
// author : Flakërim Ismani : https://github.com/flakerimi
// author: Menelion Elensúle: https://github.com/Oire (tests)
(function (factory) {
if (typeof define === 'function' && define.amd) {
define(['moment'], factory); // AMD
} else if (typeof exports === 'object') {
module.exports = factory(require('../moment')); // Node
} else {
factory(window.moment); // Browser global
}
}(function (moment) {
return moment.lang('sq', {
months : "Janar_Shkurt_Mars_Prill_Maj_Qershor_Korrik_Gusht_Shtator_Tetor_Nëntor_Dhjetor".split("_"),
monthsShort : "Jan_Shk_Mar_Pri_Maj_Qer_Kor_Gus_Sht_Tet_Nën_Dhj".split("_"),
weekdays : "E Diel_E Hënë_E Marte_E Mërkure_E Enjte_E Premte_E Shtunë".split("_"),
weekdaysShort : "Die_Hën_Mar_Mër_Enj_Pre_Sht".split("_"),
weekdaysMin : "D_H_Ma_Më_E_P_Sh".split("_"),
longDateFormat : {
LT : "HH:mm",
L : "DD/MM/YYYY",
LL : "D MMMM YYYY",
LLL : "D MMMM YYYY LT",
LLLL : "dddd, D MMMM YYYY LT"
},
calendar : {
sameDay : '[Sot në] LT',
nextDay : '[Neser në] LT',
nextWeek : 'dddd [në] LT',
lastDay : '[Dje në] LT',
lastWeek : 'dddd [e kaluar në] LT',
sameElse : 'L'
},
relativeTime : {
future : "në %s",
past : "%s me parë",
s : "disa seconda",
m : "një minut",
mm : "%d minutea",
h : "një orë",
hh : "%d orë",
d : "një ditë",
dd : "%d ditë",
M : "një muaj",
MM : "%d muaj",
y : "një vit",
yy : "%d vite"
},
ordinal : '%d.',
week : {
dow : 1, // Monday is the first day of the week.
doy : 4 // The week that contains Jan 4th is the first week of the year.
}
});
}));

View file

@ -0,0 +1,63 @@
// moment.js language configuration
// language : swedish (sv)
// author : Jens Alm : https://github.com/ulmus
(function (factory) {
if (typeof define === 'function' && define.amd) {
define(['moment'], factory); // AMD
} else if (typeof exports === 'object') {
module.exports = factory(require('../moment')); // Node
} else {
factory(window.moment); // Browser global
}
}(function (moment) {
return moment.lang('sv', {
months : "januari_februari_mars_april_maj_juni_juli_augusti_september_oktober_november_december".split("_"),
monthsShort : "jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec".split("_"),
weekdays : "söndag_måndag_tisdag_onsdag_torsdag_fredag_lördag".split("_"),
weekdaysShort : "sön_mån_tis_ons_tor_fre_lör".split("_"),
weekdaysMin : "sö_må_ti_on_to_fr_lö".split("_"),
longDateFormat : {
LT : "HH:mm",
L : "YYYY-MM-DD",
LL : "D MMMM YYYY",
LLL : "D MMMM YYYY LT",
LLLL : "dddd D MMMM YYYY LT"
},
calendar : {
sameDay: '[Idag] LT',
nextDay: '[Imorgon] LT',
lastDay: '[Igår] LT',
nextWeek: 'dddd LT',
lastWeek: '[Förra] dddd[en] LT',
sameElse: 'L'
},
relativeTime : {
future : "om %s",
past : "för %s sedan",
s : "några sekunder",
m : "en minut",
mm : "%d minuter",
h : "en timme",
hh : "%d timmar",
d : "en dag",
dd : "%d dagar",
M : "en månad",
MM : "%d månader",
y : "ett år",
yy : "%d år"
},
ordinal : function (number) {
var b = number % 10,
output = (~~ (number % 100 / 10) === 1) ? 'e' :
(b === 1) ? 'a' :
(b === 2) ? 'a' :
(b === 3) ? 'e' : 'e';
return number + output;
},
week : {
dow : 1, // Monday is the first day of the week.
doy : 4 // The week that contains Jan 4th is the first week of the year.
}
});
}));

View file

@ -0,0 +1,58 @@
// moment.js language configuration
// language : thai (th)
// author : Kridsada Thanabulpong : https://github.com/sirn
(function (factory) {
if (typeof define === 'function' && define.amd) {
define(['moment'], factory); // AMD
} else if (typeof exports === 'object') {
module.exports = factory(require('../moment')); // Node
} else {
factory(window.moment); // Browser global
}
}(function (moment) {
return moment.lang('th', {
months : "มกราคม_กุมภาพันธ์_มีนาคม_เมษายน_พฤษภาคม_มิถุนายน_กรกฎาคม_สิงหาคม_กันยายน_ตุลาคม_พฤศจิกายน_ธันวาคม".split("_"),
monthsShort : "มกรา_กุมภา_มีนา_เมษา_พฤษภา_มิถุนา_กรกฎา_สิงหา_กันยา_ตุลา_พฤศจิกา_ธันวา".split("_"),
weekdays : "อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัสบดี_ศุกร์_เสาร์".split("_"),
weekdaysShort : "อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัส_ศุกร์_เสาร์".split("_"), // yes, three characters difference
weekdaysMin : "อา._จ._อ._พ._พฤ._ศ._ส.".split("_"),
longDateFormat : {
LT : "H นาฬิกา m นาที",
L : "YYYY/MM/DD",
LL : "D MMMM YYYY",
LLL : "D MMMM YYYY เวลา LT",
LLLL : "วันddddที่ D MMMM YYYY เวลา LT"
},
meridiem : function (hour, minute, isLower) {
if (hour < 12) {
return "ก่อนเที่ยง";
} else {
return "หลังเที่ยง";
}
},
calendar : {
sameDay : '[วันนี้ เวลา] LT',
nextDay : '[พรุ่งนี้ เวลา] LT',
nextWeek : 'dddd[หน้า เวลา] LT',
lastDay : '[เมื่อวานนี้ เวลา] LT',
lastWeek : '[วัน]dddd[ที่แล้ว เวลา] LT',
sameElse : 'L'
},
relativeTime : {
future : "อีก %s",
past : "%sที่แล้ว",
s : "ไม่กี่วินาที",
m : "1 นาที",
mm : "%d นาที",
h : "1 ชั่วโมง",
hh : "%d ชั่วโมง",
d : "1 วัน",
dd : "%d วัน",
M : "1 เดือน",
MM : "%d เดือน",
y : "1 ปี",
yy : "%d ปี"
}
});
}));

View file

@ -0,0 +1,93 @@
// moment.js language configuration
// language : turkish (tr)
// authors : Erhan Gundogan : https://github.com/erhangundogan,
// Burak Yiğit Kaya: https://github.com/BYK
(function (factory) {
if (typeof define === 'function' && define.amd) {
define(['moment'], factory); // AMD
} else if (typeof exports === 'object') {
module.exports = factory(require('../moment')); // Node
} else {
factory(window.moment); // Browser global
}
}(function (moment) {
var suffixes = {
1: "'inci",
5: "'inci",
8: "'inci",
70: "'inci",
80: "'inci",
2: "'nci",
7: "'nci",
20: "'nci",
50: "'nci",
3: "'üncü",
4: "'üncü",
100: "'üncü",
6: "'ncı",
9: "'uncu",
10: "'uncu",
30: "'uncu",
60: "'ıncı",
90: "'ıncı"
};
return moment.lang('tr', {
months : "Ocak_Şubat_Mart_Nisan_Mayıs_Haziran_Temmuz_Ağustos_Eylül_Ekim_Kasım_Aralık".split("_"),
monthsShort : "Oca_Şub_Mar_Nis_May_Haz_Tem_Ağu_Eyl_Eki_Kas_Ara".split("_"),
weekdays : "Pazar_Pazartesi_Salı_Çarşamba_Perşembe_Cuma_Cumartesi".split("_"),
weekdaysShort : "Paz_Pts_Sal_Çar_Per_Cum_Cts".split("_"),
weekdaysMin : "Pz_Pt_Sa_Ça_Pe_Cu_Ct".split("_"),
longDateFormat : {
LT : "HH:mm",
L : "DD.MM.YYYY",
LL : "D MMMM YYYY",
LLL : "D MMMM YYYY LT",
LLLL : "dddd, D MMMM YYYY LT"
},
calendar : {
sameDay : '[bugün saat] LT',
nextDay : '[yarın saat] LT',
nextWeek : '[haftaya] dddd [saat] LT',
lastDay : '[dün] LT',
lastWeek : '[geçen hafta] dddd [saat] LT',
sameElse : 'L'
},
relativeTime : {
future : "%s sonra",
past : "%s önce",
s : "birkaç saniye",
m : "bir dakika",
mm : "%d dakika",
h : "bir saat",
hh : "%d saat",
d : "bir gün",
dd : "%d gün",
M : "bir ay",
MM : "%d ay",
y : "bir yıl",
yy : "%d yıl"
},
ordinal : function (number) {
if (number === 0) { // special case for zero
return number + "'ıncı";
}
var a = number % 10,
b = number % 100 - a,
c = number >= 100 ? 100 : null;
return number + (suffixes[a] || suffixes[b] || suffixes[c]);
},
week : {
dow : 1, // Monday is the first day of the week.
doy : 7 // The week that contains Jan 1st is the first week of the year.
}
});
}));

View file

@ -0,0 +1,55 @@
// moment.js language configuration
// language : Morocco Central Atlas Tamaziɣt in Latin (tzm-la)
// author : Abdel Said : https://github.com/abdelsaid
(function (factory) {
if (typeof define === 'function' && define.amd) {
define(['moment'], factory); // AMD
} else if (typeof exports === 'object') {
module.exports = factory(require('../moment')); // Node
} else {
factory(window.moment); // Browser global
}
}(function (moment) {
return moment.lang('tzm-la', {
months : "innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir".split("_"),
monthsShort : "innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir".split("_"),
weekdays : "asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas".split("_"),
weekdaysShort : "asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas".split("_"),
weekdaysMin : "asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas".split("_"),
longDateFormat : {
LT : "HH:mm",
L : "DD/MM/YYYY",
LL : "D MMMM YYYY",
LLL : "D MMMM YYYY LT",
LLLL : "dddd D MMMM YYYY LT"
},
calendar : {
sameDay: "[asdkh g] LT",
nextDay: '[aska g] LT',
nextWeek: 'dddd [g] LT',
lastDay: '[assant g] LT',
lastWeek: 'dddd [g] LT',
sameElse: 'L'
},
relativeTime : {
future : "dadkh s yan %s",
past : "yan %s",
s : "imik",
m : "minuḍ",
mm : "%d minuḍ",
h : "saɛa",
hh : "%d tassaɛin",
d : "ass",
dd : "%d ossan",
M : "ayowr",
MM : "%d iyyirn",
y : "asgas",
yy : "%d isgasn"
},
week : {
dow : 6, // Saturday is the first day of the week.
doy : 12 // The week that contains Jan 1st is the first week of the year.
}
});
}));

View file

@ -0,0 +1,55 @@
// moment.js language configuration
// language : Morocco Central Atlas Tamaziɣt (tzm)
// author : Abdel Said : https://github.com/abdelsaid
(function (factory) {
if (typeof define === 'function' && define.amd) {
define(['moment'], factory); // AMD
} else if (typeof exports === 'object') {
module.exports = factory(require('../moment')); // Node
} else {
factory(window.moment); // Browser global
}
}(function (moment) {
return moment.lang('tzm', {
months : "ⵉⴰⵢ_ⴱⴰⵢ_ⵎⴰⵚ_ⵉⴱ_ⵎⴰⵢⵢⵓ_ⵢⵓⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⴱⵉ_ⴽⵟⵓⴱ_ⵓⵡⴰⴱⵉ_ⴷⵓⵊⴱⵉ".split("_"),
monthsShort : "ⵉⴰⵢ_ⴱⴰⵢ_ⵎⴰⵚ_ⵉⴱ_ⵎⴰⵢⵢⵓ_ⵢⵓⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⴱⵉ_ⴽⵟⵓⴱ_ⵓⵡⴰⴱⵉ_ⴷⵓⵊⴱⵉ".split("_"),
weekdays : "ⴰⵙⴰⵎⴰⵙ_ⴰⵢⴰⵙ_ⴰⵙⵉⴰⵙ_ⴰⴽⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⵢⴰⵙ".split("_"),
weekdaysShort : "ⴰⵙⴰⵎⴰⵙ_ⴰⵢⴰⵙ_ⴰⵙⵉⴰⵙ_ⴰⴽⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⵢⴰⵙ".split("_"),
weekdaysMin : "ⴰⵙⴰⵎⴰⵙ_ⴰⵢⴰⵙ_ⴰⵙⵉⴰⵙ_ⴰⴽⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⵢⴰⵙ".split("_"),
longDateFormat : {
LT : "HH:mm",
L : "DD/MM/YYYY",
LL : "D MMMM YYYY",
LLL : "D MMMM YYYY LT",
LLLL : "dddd D MMMM YYYY LT"
},
calendar : {
sameDay: "[ⴰⵙⴷⵅ ⴴ] LT",
nextDay: '[ⴰⵙⴽⴰ ⴴ] LT',
nextWeek: 'dddd [ⴴ] LT',
lastDay: '[ⴰⵚⴰⵏⵜ ⴴ] LT',
lastWeek: 'dddd [ⴴ] LT',
sameElse: 'L'
},
relativeTime : {
future : "ⴷⴰⴷⵅ ⵙ ⵢⴰⵏ %s",
past : "ⵢⴰⵏ %s",
s : "ⵉⵎⵉⴽ",
m : "ⵎⵉⵏⵓⴺ",
mm : "%d ⵎⵉⵏⵓⴺ",
h : "ⵙⴰⵄⴰ",
hh : "%d ⵜⴰⵙⵙⴰⵄⵉⵏ",
d : "ⴰⵙⵙ",
dd : "%d oⵙⵙⴰ",
M : "ⴰⵢoⵓ",
MM : "%d ⵉⵢⵢⵉⵔⵏ",
y : "ⴰⵙⴳⴰⵙ",
yy : "%d ⵉⵙⴳⴰⵙⵏ"
},
week : {
dow : 6, // Saturday is the first day of the week.
doy : 12 // The week that contains Jan 1st is the first week of the year.
}
});
}));

View file

@ -0,0 +1,157 @@
// moment.js language configuration
// language : ukrainian (uk)
// author : zemlanin : https://github.com/zemlanin
// Author : Menelion Elensúle : https://github.com/Oire
(function (factory) {
if (typeof define === 'function' && define.amd) {
define(['moment'], factory); // AMD
} else if (typeof exports === 'object') {
module.exports = factory(require('../moment')); // Node
} else {
factory(window.moment); // Browser global
}
}(function (moment) {
function plural(word, num) {
var forms = word.split('_');
return num % 10 === 1 && num % 100 !== 11 ? forms[0] : (num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20) ? forms[1] : forms[2]);
}
function relativeTimeWithPlural(number, withoutSuffix, key) {
var format = {
'mm': 'хвилина_хвилини_хвилин',
'hh': 'година_години_годин',
'dd': ень_дні_днів',
'MM': ісяць_місяціісяців',
'yy': 'рік_роки_років'
};
if (key === 'm') {
return withoutSuffix ? 'хвилина' : 'хвилину';
}
else if (key === 'h') {
return withoutSuffix ? 'година' : 'годину';
}
else {
return number + ' ' + plural(format[key], +number);
}
}
function monthsCaseReplace(m, format) {
var months = {
'nominative': 'січень_лютий_березень_квітень_травень_червень_липень_серпень_вересень_жовтень_листопад_грудень'.split('_'),
'accusative': 'січня_лютого_березня_квітня_травня_червня_липня_серпня_вересня_жовтня_листопада_грудня'.split('_')
},
nounCase = (/D[oD]? *MMMM?/).test(format) ?
'accusative' :
'nominative';
return months[nounCase][m.month()];
}
function weekdaysCaseReplace(m, format) {
var weekdays = {
'nominative': еділя_понеділок_вівторок_середаетвер_пятниця_субота'.split('_'),
'accusative': еділю_понеділок_вівторок_середуетвер_пятницю_суботу'.split('_'),
'genitive': еділі_понеділкаівторка_середи_четверга_пятниці_суботи'.split('_')
},
nounCase = (/(\[[ВвУу]\]) ?dddd/).test(format) ?
'accusative' :
((/\[?(?:минулої|наступної)? ?\] ?dddd/).test(format) ?
'genitive' :
'nominative');
return weekdays[nounCase][m.day()];
}
function processHoursFunction(str) {
return function () {
return str + 'о' + (this.hours() === 11 ? 'б' : '') + '] LT';
};
}
return moment.lang('uk', {
months : monthsCaseReplace,
monthsShort : "січ_лют_бер_квіт_трав_черв_лип_серп_веровт_лист_груд".split("_"),
weekdays : weekdaysCaseReplace,
weekdaysShort : "нд_пн_вт_ср_чт_пт_сб".split("_"),
weekdaysMin : "нд_пн_вт_ср_чт_пт_сб".split("_"),
longDateFormat : {
LT : "HH:mm",
L : "DD.MM.YYYY",
LL : "D MMMM YYYY р.",
LLL : "D MMMM YYYY р., LT",
LLLL : "dddd, D MMMM YYYY р., LT"
},
calendar : {
sameDay: processHoursFunction('[Сьогодні '),
nextDay: processHoursFunction('[Завтра '),
lastDay: processHoursFunction('[Вчора '),
nextWeek: processHoursFunction('[У] dddd ['),
lastWeek: function () {
switch (this.day()) {
case 0:
case 3:
case 5:
case 6:
return processHoursFunction('[Минулої] dddd [').call(this);
case 1:
case 2:
case 4:
return processHoursFunction('[Минулого] dddd [').call(this);
}
},
sameElse: 'L'
},
relativeTime : {
future : "за %s",
past : "%s тому",
s : "декілька секунд",
m : relativeTimeWithPlural,
mm : relativeTimeWithPlural,
h : "годину",
hh : relativeTimeWithPlural,
d : "день",
dd : relativeTimeWithPlural,
M : "місяць",
MM : relativeTimeWithPlural,
y : "рік",
yy : relativeTimeWithPlural
},
// M. E.: those two are virtually unused but a user might want to implement them for his/her website for some reason
meridiem : function (hour, minute, isLower) {
if (hour < 4) {
return "ночі";
} else if (hour < 12) {
return "ранку";
} else if (hour < 17) {
return "дня";
} else {
return "вечора";
}
},
ordinal: function (number, period) {
switch (period) {
case 'M':
case 'd':
case 'DDD':
case 'w':
case 'W':
return number + '-й';
case 'D':
return number + '-го';
default:
return number;
}
},
week : {
dow : 1, // Monday is the first day of the week.
doy : 7 // The week that contains Jan 1st is the first week of the year.
}
});
}));

View file

@ -0,0 +1,55 @@
// moment.js language configuration
// language : uzbek
// author : Sardor Muminov : https://github.com/muminoff
(function (factory) {
if (typeof define === 'function' && define.amd) {
define(['moment'], factory); // AMD
} else if (typeof exports === 'object') {
module.exports = factory(require('../moment')); // Node
} else {
factory(window.moment); // Browser global
}
}(function (moment) {
return moment.lang('uz', {
months : "январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь".split("_"),
monthsShort : "янв_фев_мар_апрай_июн_июл_авг_сен_окт_ноя_дек".split("_"),
weekdays : "Якшанбаушанба_Сешанбаоршанбаайшанбаумаанба".split("_"),
weekdaysShort : "Якш_Душ_Сеш_Чорай_Жум_Шан".split("_"),
weekdaysMin : "Як_Ду_Сеоауа".split("_"),
longDateFormat : {
LT : "HH:mm",
L : "DD/MM/YYYY",
LL : "D MMMM YYYY",
LLL : "D MMMM YYYY LT",
LLLL : "D MMMM YYYY, dddd LT"
},
calendar : {
sameDay : '[Бугун соат] LT [да]',
nextDay : '[Эртага] LT [да]',
nextWeek : 'dddd [куни соат] LT [да]',
lastDay : '[Кеча соат] LT [да]',
lastWeek : '[Утган] dddd [куни соат] LT [да]',
sameElse : 'L'
},
relativeTime : {
future : "Якин %s ичида",
past : "Бир неча %s олдин",
s : "фурсат",
m : "бир дакика",
mm : "%d дакика",
h : "бир соат",
hh : "%d соат",
d : "бир кун",
dd : "%d кун",
M : "бир ой",
MM : "%d ой",
y : "бир йил",
yy : "%d йил"
},
week : {
dow : 1, // Monday is the first day of the week.
doy : 7 // The week that contains Jan 4th is the first week of the year.
}
});
}));

View file

@ -0,0 +1,62 @@
// moment.js language configuration
// language : vietnamese (vn)
// author : Bang Nguyen : https://github.com/bangnk
(function (factory) {
if (typeof define === 'function' && define.amd) {
define(['moment'], factory); // AMD
} else if (typeof exports === 'object') {
module.exports = factory(require('../moment')); // Node
} else {
factory(window.moment); // Browser global
}
}(function (moment) {
return moment.lang('vn', {
months : "tháng 1_tháng 2_tháng 3_tháng 4_tháng 5_tháng 6_tháng 7_tháng 8_tháng 9_tháng 10_tháng 11_tháng 12".split("_"),
monthsShort : "Th01_Th02_Th03_Th04_Th05_Th06_Th07_Th08_Th09_Th10_Th11_Th12".split("_"),
weekdays : "chủ nhật_thứ hai_thứ ba_thứ tư_thứ năm_thứ sáu_thứ bảy".split("_"),
weekdaysShort : "CN_T2_T3_T4_T5_T6_T7".split("_"),
weekdaysMin : "CN_T2_T3_T4_T5_T6_T7".split("_"),
longDateFormat : {
LT : "HH:mm",
L : "DD/MM/YYYY",
LL : "D MMMM [năm] YYYY",
LLL : "D MMMM [năm] YYYY LT",
LLLL : "dddd, D MMMM [năm] YYYY LT",
l : "DD/M/YYYY",
ll : "D MMM YYYY",
lll : "D MMM YYYY LT",
llll : "ddd, D MMM YYYY LT"
},
calendar : {
sameDay: "[Hôm nay lúc] LT",
nextDay: '[Ngày mai lúc] LT',
nextWeek: 'dddd [tuần tới lúc] LT',
lastDay: '[Hôm qua lúc] LT',
lastWeek: 'dddd [tuần rồi lúc] LT',
sameElse: 'L'
},
relativeTime : {
future : "%s tới",
past : "%s trước",
s : "vài giây",
m : "một phút",
mm : "%d phút",
h : "một giờ",
hh : "%d giờ",
d : "một ngày",
dd : "%d ngày",
M : "một tháng",
MM : "%d tháng",
y : "một năm",
yy : "%d năm"
},
ordinal : function (number) {
return number;
},
week : {
dow : 1, // Monday is the first day of the week.
doy : 4 // The week that contains Jan 4th is the first week of the year.
}
});
}));

View file

@ -0,0 +1,108 @@
// moment.js language configuration
// language : chinese
// author : suupic : https://github.com/suupic
// author : Zeno Zeng : https://github.com/zenozeng
(function (factory) {
if (typeof define === 'function' && define.amd) {
define(['moment'], factory); // AMD
} else if (typeof exports === 'object') {
module.exports = factory(require('../moment')); // Node
} else {
factory(window.moment); // Browser global
}
}(function (moment) {
return moment.lang('zh-cn', {
months : "一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),
monthsShort : "1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),
weekdays : "星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),
weekdaysShort : "周日_周一_周二_周三_周四_周五_周六".split("_"),
weekdaysMin : "日_一_二_三_四_五_六".split("_"),
longDateFormat : {
LT : "Ah点mm",
L : "YYYY年MMMD日",
LL : "YYYY年MMMD日",
LLL : "YYYY年MMMD日LT",
LLLL : "YYYY年MMMD日ddddLT",
l : "YYYY年MMMD日",
ll : "YYYY年MMMD日",
lll : "YYYY年MMMD日LT",
llll : "YYYY年MMMD日ddddLT"
},
meridiem : function (hour, minute, isLower) {
var hm = hour * 100 + minute;
if (hm < 600) {
return "凌晨";
} else if (hm < 900) {
return "早上";
} else if (hm < 1130) {
return "上午";
} else if (hm < 1230) {
return "中午";
} else if (hm < 1800) {
return "下午";
} else {
return "晚上";
}
},
calendar : {
sameDay : function () {
return this.minutes() === 0 ? "[今天]Ah[点整]" : "[今天]LT";
},
nextDay : function () {
return this.minutes() === 0 ? "[明天]Ah[点整]" : "[明天]LT";
},
lastDay : function () {
return this.minutes() === 0 ? "[昨天]Ah[点整]" : "[昨天]LT";
},
nextWeek : function () {
var startOfWeek, prefix;
startOfWeek = moment().startOf('week');
prefix = this.unix() - startOfWeek.unix() >= 7 * 24 * 3600 ? '[下]' : '[本]';
return this.minutes() === 0 ? prefix + "dddAh点整" : prefix + "dddAh点mm";
},
lastWeek : function () {
var startOfWeek, prefix;
startOfWeek = moment().startOf('week');
prefix = this.unix() < startOfWeek.unix() ? '[上]' : '[本]';
return this.minutes() === 0 ? prefix + "dddAh点整" : prefix + "dddAh点mm";
},
sameElse : 'L'
},
ordinal : function (number, period) {
switch (period) {
case "d":
case "D":
case "DDD":
return number + "日";
case "M":
return number + "月";
case "w":
case "W":
return number + "周";
default:
return number;
}
},
relativeTime : {
future : "%s内",
past : "%s前",
s : "几秒",
m : "1分钟",
mm : "%d分钟",
h : "1小时",
hh : "%d小时",
d : "1天",
dd : "%d天",
M : "1个月",
MM : "%d个月",
y : "1年",
yy : "%d年"
},
week : {
// GB/T 7408-1994《数据元和交换格式·信息交换·日期和时间表示法》与ISO 8601:1988等效
dow : 1, // Monday is the first day of the week.
doy : 4 // The week that contains Jan 4th is the first week of the year.
}
});
}));

View file

@ -0,0 +1,84 @@
// moment.js language configuration
// language : traditional chinese (zh-tw)
// author : Ben : https://github.com/ben-lin
(function (factory) {
if (typeof define === 'function' && define.amd) {
define(['moment'], factory); // AMD
} else if (typeof exports === 'object') {
module.exports = factory(require('../moment')); // Node
} else {
factory(window.moment); // Browser global
}
}(function (moment) {
return moment.lang('zh-tw', {
months : "一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),
monthsShort : "1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),
weekdays : "星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),
weekdaysShort : "週日_週一_週二_週三_週四_週五_週六".split("_"),
weekdaysMin : "日_一_二_三_四_五_六".split("_"),
longDateFormat : {
LT : "Ah點mm",
L : "YYYY年MMMD日",
LL : "YYYY年MMMD日",
LLL : "YYYY年MMMD日LT",
LLLL : "YYYY年MMMD日ddddLT",
l : "YYYY年MMMD日",
ll : "YYYY年MMMD日",
lll : "YYYY年MMMD日LT",
llll : "YYYY年MMMD日ddddLT"
},
meridiem : function (hour, minute, isLower) {
var hm = hour * 100 + minute;
if (hm < 900) {
return "早上";
} else if (hm < 1130) {
return "上午";
} else if (hm < 1230) {
return "中午";
} else if (hm < 1800) {
return "下午";
} else {
return "晚上";
}
},
calendar : {
sameDay : '[今天]LT',
nextDay : '[明天]LT',
nextWeek : '[下]ddddLT',
lastDay : '[昨天]LT',
lastWeek : '[上]ddddLT',
sameElse : 'L'
},
ordinal : function (number, period) {
switch (period) {
case "d" :
case "D" :
case "DDD" :
return number + "日";
case "M" :
return number + "月";
case "w" :
case "W" :
return number + "週";
default :
return number;
}
},
relativeTime : {
future : "%s內",
past : "%s前",
s : "幾秒",
m : "一分鐘",
mm : "%d分鐘",
h : "一小時",
hh : "%d小時",
d : "一天",
dd : "%d天",
M : "一個月",
MM : "%d個月",
y : "一年",
yy : "%d年"
}
});
}));

Some files were not shown because too many files have changed in this diff Show more