(window.webpackJsonp=window.webpackJsonp||[]).push([[1],{1039:function(t,n,e){"use strict";e.d(n,"a",(function(){return i}));var a=e(43);
/*
 * @copyright 2019 Christoph Wurst <christoph@winzerhof-wurst.at>
 *
 * @author 2019 Christoph Wurst <christoph@winzerhof-wurst.at>
 *
 * @license GNU AGPL version 3 or any later version
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as
 * published by the Free Software Foundation, either version 3 of the
 * License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
const i=t=>{if(t.specialUse.length>0)try{return(t=>{if(t.specialUse.includes("all"))return Object(a.translate)("mail","All");if(t.specialUse.includes("archive"))return Object(a.translate)("mail","Archive");if(t.specialUse.includes("drafts"))return Object(a.translate)("mail","Drafts");if(t.specialUse.includes("flagged"))return Object(a.translate)("mail","Favorites");if(t.specialUse.includes("inbox"))return t.isPriorityInbox?Object(a.translate)("mail","Priority inbox"):t.isUnified?Object(a.translate)("mail","All inboxes"):Object(a.translate)("mail","Inbox");if(t.specialUse.includes("junk"))return Object(a.translate)("mail","Junk");if(t.specialUse.includes("sent"))return Object(a.translate)("mail","Sent");if(t.specialUse.includes("trash"))return Object(a.translate)("mail","Trash");throw new Error("unknown special use ".concat(t.specialUse))})(t)}catch(t){console.error("could not translate special mailbox",t)}return t.displayName}},1092:function(t,n,e){"use strict";e.d(n,"b",(function(){return s})),e.d(n,"a",(function(){return r}));var a=e(1),i=e(2),o=e.n(i);async function s(t,n,e){const i=Object(a.generateUrl)("/apps/mail/api/trustedsenders/{email}?type={type}",{email:t,type:n});e?await o.a.put(i):await o.a.delete(i)}async function r(){const t=Object(a.generateUrl)("/apps/mail/api/trustedsenders");return(await o.a.get(t)).data.data}},1157:function(n,e,a){"use strict";var i=a(1398),o=a.n(i),s=a(1399),r=a.n(s),l=a(1400),c=a.n(l),d=a(1401),u=a.n(d),m=a(8),p=a(861),g=a.n(p),A=a(1402),h=a.n(A),v=a(711),b=a.n(v),f=a(829),C=a.n(f),x=a(822),y=a.n(x),w=a(821),_=a.n(w),S=a(830),k=a(1),M=a(891),I=a(108),P=a(1162),T={name:"EditorSettings",props:{account:{type:Object,required:!0}},data(){return{mode:this.account.editorMode}},watch:{mode(t,n){this.$store.dispatch("patchAccount",{account:this.account,data:{editorMode:t}}).then(()=>{m.a.info("editor mode updated")}).catch(t=>{throw m.a.error("could not update editor mode",{error:t}),this.editorMode=n,t})}}},E=a(35),O=a.n(E),B=a(1406),N={insert:"head",singleton:!1},$=(O()(B.a,N),B.a.locals,a(29)),j=Object($.a)(T,(function(){var t=this,n=t.$createElement,e=t._self._c||n;return e("div",[e("p",[e("input",{directives:[{name:"model",rawName:"v-model",value:t.mode,expression:"mode"}],staticClass:"radio",attrs:{id:"plaintext",type:"radio",value:"plaintext"},domProps:{checked:t._q(t.mode,"plaintext")},on:{change:function(n){t.mode="plaintext"}}}),t._v(" "),e("label",{class:{primary:"plaintext"===t.mode},attrs:{for:"plaintext"}},[t._v("\n\t\t\t"+t._s(t.t("mail","Plain text"))+"\n\t\t")]),t._v(" "),e("input",{directives:[{name:"model",rawName:"v-model",value:t.mode,expression:"mode"}],staticClass:"radio",attrs:{id:"richtext",type:"radio",value:"richtext"},domProps:{checked:t._q(t.mode,"richtext")},on:{change:function(n){t.mode="richtext"}}}),t._v(" "),e("label",{class:{primary:"richtext"===t.mode},attrs:{for:"richtext"}},[t._v("\n\t\t\t"+t._s(t.t("mail","Rich text"))+"\n\t\t")])])])}),[],!1,null,"7db23f84",null).exports,U=a(1407),D=a.n(U),q=(a(1421),{name:"MailboxInlinePicker",components:{Treeselect:D.a},props:{account:{type:Object,required:!0},disabled:{type:Boolean,default:!1},value:{type:Number,required:!1}},data(){return{selected:this.value}},computed:{mailboxes(){return this.getMailboxes()}},watch:{selected(t){t!==this.value&&(this.$emit("input",t),this.selected=t)}},methods:{getMailboxes(t){let n=[];return n=t?this.$store.getters.getSubMailboxes(t):this.$store.getters.getMailboxes(this.account.accountId),n.map(t=>({id:t.databaseId,label:t.displayName,children:t.mailboxes.length>0?this.getMailboxes(t.databaseId):""}))}}}),R=a(1423),F={insert:"head",singleton:!1},L=(O()(R.a,F),R.a.locals,{name:"AccountDefaultsSettings",components:{MailboxInlinePicker:Object($.a)(q,(function(){var t=this,n=t.$createElement;return(t._self._c||n)("Treeselect",{ref:"Treeselect",attrs:{options:t.mailboxes,multiple:!1,clearable:!1,disabled:t.disabled},model:{value:t.selected,callback:function(n){t.selected=n},expression:"selected"}})}),[],!1,null,null,null).exports},props:{account:{type:Object,required:!0}},data:()=>({saving:!1}),computed:{draftsMailbox:{get(){const t=this.$store.getters.getMailbox(this.account.draftsMailboxId);if(t)return t.databaseId},async set(t){m.a.debug("setting drafts mailbox to "+t),this.saving=!0;try{await this.$store.dispatch("patchAccount",{account:this.account,data:{draftsMailboxId:t}})}catch(t){m.a.error("could not set drafts mailbox",{error:t})}finally{this.saving=!1}}},sentMailbox:{get(){const t=this.$store.getters.getMailbox(this.account.sentMailboxId);if(t)return t.databaseId},async set(t){m.a.debug("setting sent mailbox to "+t),this.saving=!0;try{await this.$store.dispatch("patchAccount",{account:this.account,data:{sentMailboxId:t}})}catch(t){m.a.error("could not set sent mailbox",{error:t})}finally{this.saving=!1}}},trashMailbox:{get(){const t=this.$store.getters.getMailbox(this.account.trashMailboxId);if(t)return t.databaseId},async set(t){m.a.debug("setting trash mailbox to "+t),this.saving=!0;try{await this.$store.dispatch("patchAccount",{account:this.account,data:{trashMailboxId:t}})}catch(t){m.a.error("could not set trash mailbox",{error:t})}finally{this.saving=!1}}}}}),H=a(1424),K={insert:"head",singleton:!1},G=(O()(H.a,K),H.a.locals,Object($.a)(L,(function(){var t=this,n=t.$createElement,e=t._self._c||n;return e("div",[e("p",[t._v("\n\t\t"+t._s(t.t("mail","Drafts are saved in:"))+"\n\t")]),t._v(" "),e("MailboxInlinePicker",{attrs:{account:t.account,disabled:t.saving},model:{value:t.draftsMailbox,callback:function(n){t.draftsMailbox=n},expression:"draftsMailbox"}}),t._v(" "),e("p",[t._v("\n\t\t"+t._s(t.t("mail","Sent messages are saved in:"))+"\n\t")]),t._v(" "),e("MailboxInlinePicker",{attrs:{account:t.account,disabled:t.saving},model:{value:t.sentMailbox,callback:function(n){t.sentMailbox=n},expression:"sentMailbox"}}),t._v(" "),e("p",[t._v("\n\t\t"+t._s(t.t("mail","Deleted messages are moved in:"))+"\n\t")]),t._v(" "),e("MailboxInlinePicker",{attrs:{account:t.account,disabled:t.saving},model:{value:t.trashMailbox,callback:function(n){t.trashMailbox=n},expression:"trashMailbox"}})],1)}),[],!1,null,"3a6599f7",null).exports),z=a(1160),Q=a(753),W=a(7),Y=a(782),V=a.n(Y),J={name:"SignatureSettings",components:{TextEditor:z.a,Multiselect:V.a},props:{account:{type:Object,required:!0}},data(){return{loading:!1,bus:new W.default,identity:null,signature:"",signatureAboveQuote:this.account.signatureAboveQuote}},computed:{identities(){const t=this.account.aliases.map(t=>({id:t.id,label:t.name+" ("+t.alias+")",signature:t.signature}));return t.unshift({id:-1,label:this.account.name+" ("+this.account.emailAddress+")",signature:this.account.signature}),t}},watch:{async signatureAboveQuote(t,n){try{await this.$store.dispatch("patchAccount",{account:this.account,data:{signatureAboveQuote:t}}),m.a.debug("signature above quoted updated to "+t)}catch(t){m.a.error("could not update signature above quote",{e:t}),this.signatureAboveQuote=n}}},beforeMount(){this.changeIdentity(this.identities[0])},methods:{changeIdentity(t){m.a.debug("select identity",{identity:t}),this.identity=t,this.signature=t.signature?Object(Q.d)(Object(Q.a)(t.signature)).value:""},async deleteSignature(){this.signature=null,await this.saveSignature()},async saveSignature(){this.loading=!0;let t="updateAccountSignature";const n={account:this.account,signature:this.signature};return this.identity.id>-1&&(t="updateAliasSignature",n.aliasId=this.identity.id),this.$store.dispatch(t,n).then(()=>{m.a.info("signature updated"),this.loading=!1}).catch(t=>{throw m.a.error("could not update account signature",{error:t}),t})}}},X=a(1425),Z={insert:"head",singleton:!1},tt=(O()(X.a,Z),X.a.locals,a(1426)),nt={insert:"head",singleton:!1},et=(O()(tt.a,nt),tt.a.locals,Object($.a)(J,(function(){var t=this,n=t.$createElement,e=t._self._c||n;return e("div",{staticClass:"section"},[e("div",[e("input",{directives:[{name:"model",rawName:"v-model",value:t.signatureAboveQuote,expression:"signatureAboveQuote"}],staticClass:"checkbox",attrs:{id:"signature-above-quote-toggle",type:"checkbox"},domProps:{checked:Array.isArray(t.signatureAboveQuote)?t._i(t.signatureAboveQuote,null)>-1:t.signatureAboveQuote},on:{change:function(n){var e=t.signatureAboveQuote,a=n.target,i=!!a.checked;if(Array.isArray(e)){var o=t._i(e,null);a.checked?o<0&&(t.signatureAboveQuote=e.concat([null])):o>-1&&(t.signatureAboveQuote=e.slice(0,o).concat(e.slice(o+1)))}else t.signatureAboveQuote=i}}}),t._v(" "),e("label",{attrs:{for:"signature-above-quote-toggle"}},[t._v("\n\t\t\t"+t._s(t.t("mail","Place signature above quoted text"))+"\n\t\t")])]),t._v(" "),t.identities.length>1?e("Multiselect",{attrs:{"allow-empty":!1,options:t.identities,searchable:!1,value:t.identity,label:"label","track-by":"id"},on:{select:t.changeIdentity}}):t._e(),t._v(" "),e("TextEditor",{attrs:{html:!0,placeholder:t.t("mail","Signature …"),bus:t.bus},model:{value:t.signature,callback:function(n){t.signature=n},expression:"signature"}}),t._v(" "),e("button",{staticClass:"primary",class:t.loading?"icon-loading-small-dark":"icon-checkmark-white",attrs:{disabled:t.loading},on:{click:t.saveSignature}},[t._v("\n\t\t"+t._s(t.t("mail","Save signature"))+"\n\t")]),t._v(" "),t.signature?e("button",{staticClass:"button-text",on:{click:t.deleteSignature}},[t._v("\n\t\t"+t._s(t.t("mail","Delete"))+"\n\t")]):t._e()],1)}),[],!1,null,"1c55c63e",null).exports),at={name:"AliasForm",props:{account:{type:Object,required:!0},alias:{type:Object,required:!0}},data(){return{changeAlias:this.alias.alias,changeName:this.alias.name,showForm:!1,loading:!1}},methods:{async updateAlias(t){this.loading=!0,await this.$store.dispatch("updateAlias",{account:this.account,aliasId:this.alias.id,alias:this.changeAlias,name:this.changeName}),m.a.debug("updated alias",{accountId:this.account.id,aliasId:this.alias.id,alias:this.changeAlias,name:this.changeName}),this.showForm=!1,this.loading=!1},async deleteAlias(){this.loading=!0,await this.$store.dispatch("deleteAlias",{account:this.account,aliasId:this.alias.id}),m.a.debug("deleted alias",{accountId:this.account.id,aliasId:this.alias.id,alias:this.alias.alias,name:this.alias.name}),this.showForm=!1,this.loading=!1}}},it=a(1427),ot={insert:"head",singleton:!1},st=(O()(it.a,ot),it.a.locals,{name:"AliasSettings",components:{AliasForm:Object($.a)(at,(function(){var t=this,n=t.$createElement,e=t._self._c||n;return e("div",[t.showForm?e("form",{staticClass:"alias-form",on:{submit:function(n){return n.preventDefault(),t.updateAlias.apply(null,arguments)}}},[e("div",[e("input",{directives:[{name:"model",rawName:"v-model",value:t.changeName,expression:"changeName"}],attrs:{type:"text",required:""},domProps:{value:t.changeName},on:{input:function(n){n.target.composing||(t.changeName=n.target.value)}}}),t._v(" "),e("input",{directives:[{name:"model",rawName:"v-model",value:t.changeAlias,expression:"changeAlias"}],attrs:{type:"email",disabled:t.alias.provisioned,required:""},domProps:{value:t.changeAlias},on:{input:function(n){n.target.composing||(t.changeAlias=n.target.value)}}})]),t._v(" "),e("div",{staticClass:"button-group"},[e("button",{staticClass:"icon",class:t.loading?"icon-loading-small-dark":"icon-checkmark",attrs:{type:"submit",title:t.t("mail","Update alias")}})])]):e("div",{staticClass:"alias-item"},[e("p",[e("strong",[t._v(t._s(t.alias.name))]),t._v(" <"+t._s(t.alias.alias)+">")]),t._v(" "),e("div",{staticClass:"button-group"},[e("button",{staticClass:"icon icon-rename",attrs:{title:t.t("mail","Show update alias form")},on:{click:function(n){t.showForm=!0}}}),t._v(" "),t.alias.provisioned?t._e():e("button",{staticClass:"icon",class:t.loading?"icon-loading-small-dark":"icon-delete",attrs:{title:t.t("mail","Delete alias")},on:{click:t.deleteAlias}})])])])}),[],!1,null,"2c30c231",null).exports},props:{account:{type:Object,required:!0}},data(){return{newAlias:"",newName:this.account.name,showForm:!1,loading:!1}},computed:{aliases(){return this.account.aliases}},methods:{async createAlias(){this.loading=!0,await this.$store.dispatch("createAlias",{account:this.account,alias:this.newAlias,name:this.newName}),m.a.debug("created alias",{accountId:this.account.id,alias:this.newAlias,name:this.newName}),this.resetCreate(),this.loading=!1},resetCreate(){this.newAlias="",this.newName=this.account.name,this.showForm=!1}}}),rt=a(1428),lt={insert:"head",singleton:!1},ct=(O()(rt.a,lt),rt.a.locals,Object($.a)(st,(function(){var t=this,n=t.$createElement,e=t._self._c||n;return e("div",[e("ul",{staticClass:"aliases-list"},[t._l(t.aliases,(function(n){return e("li",{key:n.id},[e("AliasForm",{attrs:{account:t.account,alias:n}})],1)})),t._v(" "),t.showForm?e("li",[e("form",{attrs:{id:"createAliasForm"},on:{submit:function(n){return n.preventDefault(),t.createAlias.apply(null,arguments)}}},[e("input",{directives:[{name:"model",rawName:"v-model",value:t.newName,expression:"newName"}],attrs:{type:"text",placeholder:t.t("mail","Name"),required:""},domProps:{value:t.newName},on:{input:function(n){n.target.composing||(t.newName=n.target.value)}}}),t._v(" "),e("input",{directives:[{name:"model",rawName:"v-model",value:t.newAlias,expression:"newAlias"}],attrs:{type:"email",placeholder:t.t("mail","Email address"),required:""},domProps:{value:t.newAlias},on:{input:function(n){n.target.composing||(t.newAlias=n.target.value)}}})])]):t._e()],2),t._v(" "),t.account.provisioningId?t._e():e("div",[t.showForm?t._e():e("button",{staticClass:"primary icon-add",on:{click:function(n){t.showForm=!0}}},[t._v("\n\t\t\t"+t._s(t.t("mail","Add alias"))+"\n\t\t")]),t._v(" "),t.showForm?e("button",{staticClass:"primary",class:t.loading?"icon-loading-small-dark":"icon-checkmark-white",attrs:{type:"submit",form:"createAliasForm",disabled:t.loading}},[t._v("\n\t\t\t"+t._s(t.t("mail","Create alias"))+"\n\t\t")]):t._e(),t._v(" "),t.showForm?e("button",{staticClass:"button-text",on:{click:t.resetCreate}},[t._v("\n\t\t\t"+t._s(t.t("mail","Cancel"))+"\n\t\t")]):t._e()])])}),[],!1,null,"3d86b7aa",null).exports),dt=a(1429),ut=a.n(dt),mt=a(1431),pt=a.n(mt),gt=a(1092),At=a(546),ht=a.n(At),vt=a(1432),bt=a.n(vt),ft=a(59);const Ct=bt()(ht()("email"));var xt={name:"TrustedSenders",data:()=>({list:[]}),computed:{sortedSenders(){return Ct(this.list)}},async mounted(){this.list=await Object(gt.a)()},methods:{async removeSender(n){this.list=this.list.filter(t=>t.id!==n.id);try{await Object(gt.b)(n.email,n.type,!1)}catch(e){m.a.error("Could not remove trusted sender ".concat(n.email),{error:e}),Object(ft.b)(t("mail","Could not remove trusted sender {sender}",{sender:n.email})),this.list.push(n)}},senderType(n){switch(n){case"individual":return t("mail","individual");case"domain":return t("mail","domain")}return n}}},yt=Object($.a)(xt,(function(){var t=this,n=t.$createElement,e=t._self._c||n;return e("div",[t._l(t.sortedSenders,(function(n){return e("div",{key:n.email},[t._v("\n\t\t"+t._s(n.email)+"\n\t\t"+t._s(t.senderType(n.type))+"\n\t\t"),e("button",{staticClass:"button",on:{click:function(e){return t.removeSender(n)}}},[t._v("\n\t\t\t"+t._s(t.t("mail","Remove"))+"\n\t\t")])])})),t._v(" "),t.sortedSenders.length?t._e():e("span",[t._v(" "+t._s(t.t("mail","No senders are trusted at the moment.")))])],2)}),[],!1,null,"e41e0a8c",null).exports,wt={name:"SieveAccountForm",props:{account:{type:Object,required:!0}},data(){return{sieveConfig:{sieveEnabled:this.account.sieveEnabled,sieveHost:this.account.sieveHost||this.account.imapHost,sievePort:this.account.sievePort||4190,sieveUser:this.account.sieveUser||"",sievePassword:"",sieveSslMode:this.account.sieveSslMode||"tls"},loading:!1,useImapCredentials:!this.account.sieveUser,errorMessage:"",submitButtonText:t("mail","Save sieve settings")}},methods:{async onSubmit(){this.loading=!0,this.errorMessage="",""===this.sieveConfig.sieveUser&&""===this.sieveConfig.sievePassword&&(this.useImapCredentials=!0),this.useImapCredentials&&(this.sieveConfig.sieveUser="",this.sieveConfig.sievePassword="");try{await this.$store.dispatch("updateSieveAccount",{account:this.account,data:this.sieveConfig})}catch(t){this.errorMessage=t.message}this.loading=!1}}},_t=a(1434),St={insert:"head",singleton:!1},kt=(O()(_t.a,St),_t.a.locals,Object($.a)(wt,(function(){var t=this,n=t.$createElement,e=t._self._c||n;return e("form",{attrs:{id:"sieve-form"}},[e("p",[e("input",{directives:[{name:"model",rawName:"v-model",value:t.sieveConfig.sieveEnabled,expression:"sieveConfig.sieveEnabled"}],staticClass:"radio",attrs:{id:"sieve-disabled",type:"radio",name:"sieve-active"},domProps:{value:!1,checked:t._q(t.sieveConfig.sieveEnabled,!1)},on:{change:function(n){return t.$set(t.sieveConfig,"sieveEnabled",!1)}}}),t._v(" "),e("label",{class:{primary:!t.sieveConfig.sieveEnabled},attrs:{for:"sieve-disabled"}},[t._v("\n\t\t\t"+t._s(t.t("mail","Disabled"))+"\n\t\t")]),t._v(" "),e("input",{directives:[{name:"model",rawName:"v-model",value:t.sieveConfig.sieveEnabled,expression:"sieveConfig.sieveEnabled"}],staticClass:"radio",attrs:{id:"sieve-enabled",type:"radio",name:"sieve-active"},domProps:{value:!0,checked:t._q(t.sieveConfig.sieveEnabled,!0)},on:{change:function(n){return t.$set(t.sieveConfig,"sieveEnabled",!0)}}}),t._v(" "),e("label",{class:{primary:t.sieveConfig.sieveEnabled},attrs:{for:"sieve-enabled"}},[t._v("\n\t\t\t"+t._s(t.t("mail","Enabled"))+"\n\t\t")])]),t._v(" "),t.sieveConfig.sieveEnabled?[e("label",{attrs:{for:"sieve-host"}},[t._v(t._s(t.t("mail","Sieve Host")))]),t._v(" "),e("input",{directives:[{name:"model",rawName:"v-model",value:t.sieveConfig.sieveHost,expression:"sieveConfig.sieveHost"}],attrs:{id:"sieve-host",type:"text",required:""},domProps:{value:t.sieveConfig.sieveHost},on:{input:function(n){n.target.composing||t.$set(t.sieveConfig,"sieveHost",n.target.value)}}}),t._v(" "),e("h4",[t._v(t._s(t.t("mail","Sieve Security")))]),t._v(" "),e("div",{staticClass:"flex-row"},[e("input",{directives:[{name:"model",rawName:"v-model",value:t.sieveConfig.sieveSslMode,expression:"sieveConfig.sieveSslMode"}],attrs:{id:"sieve-sec-none",type:"radio",name:"sieve-sec",value:"none"},domProps:{checked:t._q(t.sieveConfig.sieveSslMode,"none")},on:{change:function(n){return t.$set(t.sieveConfig,"sieveSslMode","none")}}}),t._v(" "),e("label",{staticClass:"button",class:{primary:"none"===t.sieveConfig.sieveSslMode},attrs:{for:"sieve-sec-none"}},[t._v(t._s(t.t("mail","None")))]),t._v(" "),e("input",{directives:[{name:"model",rawName:"v-model",value:t.sieveConfig.sieveSslMode,expression:"sieveConfig.sieveSslMode"}],attrs:{id:"sieve-sec-ssl",type:"radio",name:"sieve-sec",value:"ssl"},domProps:{checked:t._q(t.sieveConfig.sieveSslMode,"ssl")},on:{change:function(n){return t.$set(t.sieveConfig,"sieveSslMode","ssl")}}}),t._v(" "),e("label",{staticClass:"button",class:{primary:"ssl"===t.sieveConfig.sieveSslMode},attrs:{for:"sieve-sec-ssl"}},[t._v("\n\t\t\t\t"+t._s(t.t("mail","SSL/TLS"))+"\n\t\t\t")]),t._v(" "),e("input",{directives:[{name:"model",rawName:"v-model",value:t.sieveConfig.sieveSslMode,expression:"sieveConfig.sieveSslMode"}],attrs:{id:"sieve-sec-tls",type:"radio",name:"sieve-sec",value:"tls"},domProps:{checked:t._q(t.sieveConfig.sieveSslMode,"tls")},on:{change:function(n){return t.$set(t.sieveConfig,"sieveSslMode","tls")}}}),t._v(" "),e("label",{staticClass:"button",class:{primary:"tls"===t.sieveConfig.sieveSslMode},attrs:{for:"sieve-sec-tls"}},[t._v("\n\t\t\t\t"+t._s(t.t("mail","STARTTLS"))+"\n\t\t\t")])]),t._v(" "),e("label",{attrs:{for:"sieve-port"}},[t._v(t._s(t.t("mail","Sieve Port")))]),t._v(" "),e("input",{directives:[{name:"model",rawName:"v-model",value:t.sieveConfig.sievePort,expression:"sieveConfig.sievePort"}],attrs:{id:"sieve-port",type:"text",required:""},domProps:{value:t.sieveConfig.sievePort},on:{input:function(n){n.target.composing||t.$set(t.sieveConfig,"sievePort",n.target.value)}}}),t._v(" "),e("h4",[t._v(t._s(t.t("mail","Sieve Credentials")))]),t._v(" "),e("p",[e("input",{directives:[{name:"model",rawName:"v-model",value:t.useImapCredentials,expression:"useImapCredentials"}],staticClass:"radio",attrs:{id:"sieve-credentials-imap",type:"radio"},domProps:{value:!0,checked:t._q(t.useImapCredentials,!0)},on:{change:function(n){t.useImapCredentials=!0}}}),t._v(" "),e("label",{class:{primary:t.useImapCredentials},attrs:{for:"sieve-credentials-imap"}},[t._v("\n\t\t\t\t"+t._s(t.t("mail","IMAP Credentials"))+"\n\t\t\t")]),t._v(" "),e("input",{directives:[{name:"model",rawName:"v-model",value:t.useImapCredentials,expression:"useImapCredentials"}],staticClass:"radio",attrs:{id:"sieve-credentials-custom",type:"radio"},domProps:{value:!1,checked:t._q(t.useImapCredentials,!1)},on:{change:function(n){t.useImapCredentials=!1}}}),t._v(" "),e("label",{class:{primary:!t.useImapCredentials},attrs:{for:"sieve-credentials-custom"}},[t._v("\n\t\t\t\t"+t._s(t.t("mail","Custom"))+"\n\t\t\t")])]),t._v(" "),t.useImapCredentials?t._e():[e("label",{attrs:{for:"sieve-user"}},[t._v(t._s(t.t("mail","Sieve User")))]),t._v(" "),e("input",{directives:[{name:"model",rawName:"v-model",value:t.sieveConfig.sieveUser,expression:"sieveConfig.sieveUser"}],attrs:{id:"sieve-user",type:"text",required:""},domProps:{value:t.sieveConfig.sieveUser},on:{input:function(n){n.target.composing||t.$set(t.sieveConfig,"sieveUser",n.target.value)}}}),t._v(" "),e("label",{attrs:{for:"sieve-password"}},[t._v(t._s(t.t("mail","Sieve Password")))]),t._v(" "),e("input",{directives:[{name:"model",rawName:"v-model",value:t.sieveConfig.sievePassword,expression:"sieveConfig.sievePassword"}],attrs:{id:"sieve-password",type:"password",required:""},domProps:{value:t.sieveConfig.sievePassword},on:{input:function(n){n.target.composing||t.$set(t.sieveConfig,"sievePassword",n.target.value)}}})]]:t._e(),t._v(" "),t._t("feedback"),t._v(" "),t.errorMessage?e("p",[t._v("\n\t\t"+t._s(t.t("mail","Oh Snap!"))+"\n\t\t"+t._s(t.errorMessage)+"\n\t")]):t._e(),t._v(" "),e("input",{staticClass:"primary",attrs:{type:"submit",disabled:t.loading},domProps:{value:t.submitButtonText},on:{click:function(n){return n.preventDefault(),t.onSubmit.apply(null,arguments)}}})],2)}),[],!1,null,"8b1dc5a0",null).exports),Mt=a(568),It={name:"SieveFilterForm",props:{account:{type:Object,required:!0}},data:()=>({active:{},loading:!1,errorMessage:""}),async mounted(){this.active=await Object(Mt.a)(this.account.id)},methods:{async saveActiveScript(){this.loading=!0,this.errorMessage="";try{await Object(Mt.c)(this.account.id,this.active)}catch(t){this.errorMessage=t.message}this.loading=!1}}},Pt=a(1435),Tt={insert:"head",singleton:!1},Et=(O()(Pt.a,Tt),Pt.a.locals,{name:"AccountSettings",components:{SieveAccountForm:kt,SieveFilterForm:Object($.a)(It,(function(){var t=this,n=t.$createElement,e=t._self._c||n;return e("div",{staticClass:"section"},[e("textarea",{directives:[{name:"model",rawName:"v-model",value:t.active.script,expression:"active.script"},{name:"shortkey",rawName:"v-shortkey.avoid",modifiers:{avoid:!0}}],attrs:{id:"sieve-text-area",rows:"20",disabled:t.loading},domProps:{value:t.active.script},on:{input:function(n){n.target.composing||t.$set(t.active,"script",n.target.value)}}}),t._v(" "),t.errorMessage?e("p",[t._v("\n\t\t"+t._s(t.t("mail","Oh Snap!"))+"\n\t\t"+t._s(t.errorMessage)+"\n\t")]):t._e(),t._v(" "),e("button",{staticClass:"primary",class:t.loading?"icon-loading-small-dark":"icon-checkmark-white",attrs:{disabled:t.loading},on:{click:t.saveActiveScript}},[t._v("\n\t\t"+t._s(t.t("mail","Save sieve script"))+"\n\t")])])}),[],!1,null,"568aaba6",null).exports,TrustedSenders:yt,AccountForm:P.a,AliasSettings:ct,EditorSettings:j,SignatureSettings:et,AppSettingsDialog:ut.a,AppSettingsSection:pt.a,AccountDefaultsSettings:G},props:{account:{required:!0,type:Object},open:{required:!0,type:Boolean}},data:()=>({showSettings:!1}),computed:{menu(){return this.buildMenu()},displayName(){return this.account.name},email(){return this.account.emailAddress}},watch:{showSettings(t){t||this.$emit("update:open",t)},open(t){t&&(this.showSettings=!0)}},methods:{onSave(t){return m.a.log("saving data",{data:t}),this.$store.dispatch("updateAccount",{...t,accountId:this.account.id}).then(t=>t).catch(t=>{throw m.a.error("account update failed:",{error:t}),t})},handleClick(){this.$refs.accountForm.$el.scrollIntoView({behavior:"smooth"})}}}),Ot=a(1436),Bt={insert:"head",singleton:!1},Nt=(O()(Ot.a,Bt),Ot.a.locals,Object($.a)(Et,(function(){var t=this,n=t.$createElement,e=t._self._c||n;return e("AppSettingsDialog",{attrs:{open:t.showSettings,"show-navigation":!0},on:{"update:open":function(n){t.showSettings=n}}},[e("AppSettingsSection",{attrs:{title:t.t("mail","Account settings")}},[e("div",{staticClass:"alias-item"},[e("p",[e("strong",[t._v(t._s(t.displayName))]),t._v(" <"+t._s(t.email)+">")]),t._v(" "),t.account.provisioningId?t._e():e("a",{staticClass:"button icon-rename",attrs:{title:t.t("mail","Change name")},on:{click:t.handleClick}})]),t._v(" "),e("AliasSettings",{attrs:{account:t.account}})],1),t._v(" "),e("AppSettingsSection",{attrs:{title:t.t("mail","Signature")}},[e("p",{staticClass:"settings-hint"},[t._v("\n\t\t\t"+t._s(t.t("mail","A signature is added to the text of new messages and replies."))+"\n\t\t")]),t._v(" "),e("SignatureSettings",{attrs:{account:t.account}})],1),t._v(" "),e("AppSettingsSection",{attrs:{title:t.t("mail","Writing mode")}},[e("p",{staticClass:"settings-hint"},[t._v("\n\t\t\t"+t._s(t.t("mail","Preferred writing mode for new messages and replies."))+"\n\t\t")]),t._v(" "),e("EditorSettings",{attrs:{account:t.account}})],1),t._v(" "),e("AppSettingsSection",{attrs:{title:t.t("mail","Default folders")}},[e("p",{staticClass:"settings-hint"},[t._v("\n\t\t\t"+t._s(t.t("mail","The folders to use for drafts, sent messages and deleted messages."))+"\n\t\t")]),t._v(" "),e("AccountDefaultsSettings",{attrs:{account:t.account}})],1),t._v(" "),t.account&&!t.account.provisioningId?e("AppSettingsSection",{attrs:{title:t.t("mail","Mail server")}},[e("div",{attrs:{id:"mail-settings"}},[e("AccountForm",{key:t.account.accountId,ref:"accountForm",attrs:{"display-name":t.displayName,email:t.email,save:t.onSave,account:t.account}})],1)]):t._e(),t._v(" "),t.account&&!t.account.provisioningId?e("AppSettingsSection",{attrs:{title:t.t("mail","Sieve filter server")}},[e("div",{attrs:{id:"sieve-settings"}},[e("SieveAccountForm",{key:t.account.accountId,ref:"sieveAccountForm",attrs:{account:t.account}})],1)]):t._e(),t._v(" "),t.account&&t.account.sieveEnabled?e("AppSettingsSection",{attrs:{title:t.t("mail","Sieve filter rules")}},[e("div",{attrs:{id:"sieve-filter"}},[e("SieveFilterForm",{key:t.account.accountId,ref:"sieveFilterForm",attrs:{account:t.account}})],1)]):t._e(),t._v(" "),e("AppSettingsSection",{attrs:{title:t.t("mail","Trusted senders")}},[e("TrustedSenders")],1)],1)}),[],!1,null,"13a5c8ff",null).exports),$t={name:"NavigationAccount",components:{AppNavigationItem:g.a,AppNavigationIconBullet:h.a,ActionButton:b.a,ActionCheckbox:C.a,ActionInput:y.a,ActionText:_.a,AccountSettings:Nt},props:{account:{type:Object,required:!0},firstMailbox:{type:Object,default:()=>{}},isFirst:{type:Boolean,default:!1},isLast:{type:Boolean,default:!1}},data:()=>({menuOpen:!1,loading:{delete:!1},savingShowOnlySubscribed:!1,quota:void 0,editing:!1,showSaving:!1,showSettings:!1}),computed:{visible(){return!0!==this.account.isUnified&&!1!==this.account.visible},firstMailboxRoute(){return this.firstMailbox?{name:"mailbox",params:{mailboxId:this.firstMailbox.databaseId}}:""},id(){return"account-"+this.account.id},bulletColor(){return this.account.error?void 0:Object(M.a)(this.account.emailAddress)},iconError(){return this.account.error?"icon-error":void 0},quotaText(){return void 0===this.quota?t("mail","Loading …"):!1===this.quota?t("mail","Not supported by the server"):t("mail","{usage} of {limit} used",{usage:Object(S.formatFileSize)(this.quota.usage),limit:Object(S.formatFileSize)(this.quota.limit)})}},methods:{createMailbox(t){this.editing=!0;const n=t.target.elements[1].value;m.a.info("creating mailbox "+n),this.menuOpen=!1,this.$store.dispatch("createMailbox",{account:this.account,name:n}).then(()=>m.a.info("mailbox ".concat(n," created"))).catch(t=>{throw m.a.error("could not create mailbox",{error:t}),t}),this.editing=!1,this.showSaving=!1},openCreateMailbox(){this.editing=!0,this.showSaving=!1},removeAccount(){const n=this.account.id;m.a.info("delete account",{account:this.account});const e=t("mail","The account for {email} and cached email data will be removed from Nextcloud, but not from your email provider.",{email:this.account.emailAddress});OC.dialogs.confirmDestructive(e,t("mail","Remove account {email}",{email:this.account.emailAddress}),{type:OC.dialogs.YES_NO_BUTTONS,confirm:t("mail","Remove {email}",{email:this.account.emailAddress}),confirmClasses:"error",cancel:t("mail","Cancel")},t=>{if(t)return this.$store.dispatch("deleteAccount",this.account).then(()=>{this.loading.delete=!0}).then(()=>{m.a.info("account ".concat(n," deleted, redirecting …")),location.href=Object(k.generateUrl)("/apps/mail")}).catch(t=>m.a.error("could not delete account",{error:t}));this.loading.delete=!1})},changeAccountOrderUp(){this.$store.dispatch("moveAccount",{account:this.account,up:!0}).catch(t=>m.a.error("could not move account up",{error:t}))},changeAccountOrderDown(){this.$store.dispatch("moveAccount",{account:this.account}).catch(t=>m.a.error("could not move account down",{error:t}))},changeShowSubscribedOnly(t){this.savingShowOnlySubscribed=!0,this.$store.dispatch("patchAccount",{account:this.account,data:{showSubscribedOnly:t}}).then(()=>{this.savingShowOnlySubscribed=!1,m.a.info("show only subscribed mailboxes updated to "+t)}).catch(t=>{throw m.a.error("could not update subscription mode",{error:t}),this.savingShowOnlySubscribed=!1,t})},onMenuToggle(t){t&&(console.debug("accounts menu opened, fetching quota"),this.fetchQuota())},async fetchQuota(){const t=await Object(I.e)(this.account.id);console.debug("quota fetched",{quota:t}),this.quota=void 0!==t&&t},toggleAccountSettings(){this.displayAccountSettings=!this.displayAccountSettings},showAccountSettings(){this.showSettings=!0}}},jt=Object($.a)($t,(function(){var t=this,n=t.$createElement,e=t._self._c||n;return t.visible?e("AppNavigationItem",{key:t.id,attrs:{id:t.id,icon:t.iconError,"menu-open":t.menuOpen,title:t.account.emailAddress,to:t.firstMailboxRoute,exact:!0},on:{"update:menuOpen":[function(n){t.menuOpen=n},t.onMenuToggle],"update:menu-open":function(n){t.menuOpen=n}},scopedSlots:t._u([{key:"actions",fn:function(){return[t.account.isUnified?t._e():e("ActionText",{attrs:{icon:"icon-info",title:t.t("mail","Quota")}},[t._v("\n\t\t\t"+t._s(t.quotaText)+"\n\t\t")]),t._v(" "),e("ActionButton",{attrs:{icon:"icon-settings","close-after-click":!0},on:{click:t.showAccountSettings,shortkey:t.toggleAccountSettings}},[t._v("\n\t\t\t"+t._s(t.t("mail","Account settings"))+"\n\t\t")]),t._v(" "),e("ActionCheckbox",{attrs:{checked:t.account.showSubscribedOnly,disabled:t.savingShowOnlySubscribed},on:{"update:checked":t.changeShowSubscribedOnly}},[t._v("\n\t\t\t"+t._s(t.t("mail","Show only subscribed mailboxes"))+"\n\t\t")]),t._v(" "),t.editing?t._e():e("ActionButton",{attrs:{icon:"icon-folder"},on:{click:t.openCreateMailbox}},[t._v("\n\t\t\t"+t._s(t.t("mail","Add mailbox"))+"\n\t\t")]),t._v(" "),t.editing?e("ActionInput",{attrs:{icon:"icon-folder"},on:{submit:function(n){return n.preventDefault(),n.stopPropagation(),t.createMailbox.apply(null,arguments)}}}):t._e(),t._v(" "),t.showSaving?e("ActionText",{attrs:{icon:"icon-loading-small"}},[t._v("\n\t\t\t"+t._s(t.t("mail","Saving"))+"\n\t\t")]):t._e(),t._v(" "),t.isFirst?t._e():e("ActionButton",{attrs:{icon:"icon-triangle-n"},on:{click:t.changeAccountOrderUp}},[t._v("\n\t\t\t"+t._s(t.t("mail","Move up"))+"\n\t\t")]),t._v(" "),t.isLast?t._e():e("ActionButton",{attrs:{icon:"icon-triangle-s"},on:{click:t.changeAccountOrderDown}},[t._v("\n\t\t\t"+t._s(t.t("mail","Move down"))+"\n\t\t")]),t._v(" "),t.account.provisioningId?t._e():e("ActionButton",{attrs:{icon:"icon-delete"},on:{click:t.removeAccount}},[t._v("\n\t\t\t"+t._s(t.t("mail","Remove account"))+"\n\t\t")])]},proxy:!0},{key:"extra",fn:function(){return[e("AccountSettings",{attrs:{open:t.showSettings,account:t.account},on:{"update:open":function(n){t.showSettings=n}}})]},proxy:!0}],null,!1,635850782)},[t.bulletColor?e("AppNavigationIconBullet",{attrs:{slot:"icon",color:t.bulletColor},slot:"icon"}):t._e()],1):t._e()}),[],!1,null,null,null).exports,Ut={name:"NavigationAccountExpandCollapse",components:{AppNavigationItem:g.a},props:{account:{type:Object,required:!0}},computed:{id(){return"collapse-"+this.account.id},title(){return this.account.collapsed&&this.account.showSubscribedOnly?t("mail","Show all subscribed mailboxes"):this.account.collapsed&&!this.account.showSubscribedOnly?t("mail","Show all mailboxes"):t("mail","Collapse mailboxes")}},methods:{async toggleCollapse(){m.a.debug("toggling collapsed mailboxes for account "+this.account.id);try{await this.$store.commit("toggleAccountCollapsed",this.account.id),await this.$store.dispatch("setAccountSetting",{accountId:this.account.id,key:"collapsed",value:this.account.collapsed})}catch(t){m.a.error("could not update account settings",{error:t})}}}},Dt=a(1437),qt={insert:"head",singleton:!1},Rt=(O()(Dt.a,qt),Dt.a.locals,Object($.a)(Ut,(function(){var t=this.$createElement;return(this._self._c||t)("AppNavigationItem",{attrs:{title:this.title},on:{click:this.toggleCollapse}})}),[],!1,null,"2d33cadc",null).exports),Ft=a(1438),Lt=a.n(Ft),Ht={name:"MoveMailboxModal",components:{MailboxPicker:a(1163).a},props:{account:{type:Object,required:!0},mailbox:{type:Object,required:!0}},data:()=>({moving:!1,destMailboxId:void 0}),methods:{onClose(){this.$emit("close")},async onMove(){if(this.moving=!0,this.mailbox.id!==this.destMailboxId)try{if(this.destMailboxId){const t=this.$store.getters.getMailbox(this.destMailboxId).name+this.mailbox.delimiter+this.mailbox.name;await this.$store.dispatch("renameMailbox",{account:this.account,mailbox:this.mailbox,newName:t})}else{const t=this.mailbox.displayName;await this.$store.dispatch("renameMailbox",{account:this.account,mailbox:this.mailbox,newName:t})}}catch(t){m.a.error("could not move mailbox",{error:t})}finally{this.moving=!1,this.$emit("close")}},genId:t=>"mailbox-"+t.databaseId}},Kt=Object($.a)(Ht,(function(){var t=this,n=t.$createElement;return(t._self._c||n)("MailboxPicker",{attrs:{account:t.account,selected:t.destMailboxId,loading:t.moving,"picked-mailbox":t.mailbox,"allow-root":!0,"label-select":t.t("mail","Move"),"label-select-loading":t.t("mail","Moving")},on:{"update:selected":function(n){t.destMailboxId=n},select:t.onMove,close:t.onClose}})}),[],!1,null,null,null).exports,Gt=a(38),zt=a(107),Qt=a(43),Wt=a(1039),Yt=a(82),Vt=a(778);class Jt{constructor(t,n,e){this.el=t,this.options=e,this.registerListeners.bind(this)(t),this.setInitialAttributes()}setInitialAttributes(){this.draggableInfo={},this.setStatus("enabled")}update(t,n){this.setInitialAttributes(),this.options=n.options}registerListeners(t){Vt.a.$on("dragStart",this.onDragStart.bind(this)),Vt.a.$on("dragEnd",this.onDragEnd.bind(this)),t.firstChild.addEventListener("dragover",this.onDragOver.bind(this)),t.firstChild.addEventListener("dragleave",this.onDragLeave.bind(this)),t.firstChild.addEventListener("drop",this.onDrop.bind(this))}removeListeners(t){Vt.a.$off("dragStart",this.onDragStart),Vt.a.$off("dragEnd",this.onDragEnd),t.firstChild.removeEventListener("dragover",this.onDragOver),t.firstChild.removeEventListener("dragleave",this.onDragLeave),t.firstChild.removeEventListener("drop",this.onDrop)}setStatus(t){this.el.setAttribute("droppable-mailbox",t)}onDragStart(t){this.draggableInfo=t,this.canBeDropped()||this.setStatus("disabled")}canBeDropped(){return this.isSameAccount()&&this.options.isValidDropTarget}isSameAccount(){return this.draggableInfo.accountId===this.options.accountId}onDragEnd(){this.setInitialAttributes()}onDragOver(t){t.preventDefault(),this.draggableInfo.mailboxId!==this.options.mailboxId&&(this.options.isValidDropTarget&&this.setStatus("dragover"),t.dataTransfer.dropEffect="move")}onDragLeave(t){t.preventDefault(),this.setStatus("enabled")}async onDrop(t){if(t.preventDefault(),this.draggableInfo.mailboxId===this.options.mailboxId)return;this.setInitialAttributes();const n=JSON.parse(t.dataTransfer.getData("text"));Vt.a.$emit("envelopesDropped",{envelopes:n});try{const t=n.map(async t=>await this.processDroppedItem(parseInt(t.envelopeId)));await Promise.all(t)}catch(t){m.a.error("could not process dropped messages",t)}finally{Vt.a.$emit("envelopesMoved",{mailboxId:this.options.mailboxId,movedEnvelopes:n})}}async processDroppedItem(t){const n=document.querySelector('[data-envelope-id="'.concat(t,'"]'));n.setAttribute("draggable-envelope","pending");try{await Yt.a.dispatch("moveMessage",{id:t,destMailboxId:this.options.mailboxId})}catch(t){n.removeAttribute("draggable-envelope"),m.a.error("could not move messages",t)}}}let Xt;const Zt={bind(t,n,e){Xt=new Jt(t,e.context,n.value)},componentUpdated(t,n){Xt.options=n.value,Xt.update(t,Xt)}};var tn={name:"NavigationMailbox",components:{AppNavigationItem:g.a,AppNavigationCounter:Lt.a,ActionText:_.a,ActionButton:b.a,ActionCheckbox:C.a,ActionInput:y.a,MoveMailboxModal:Kt},directives:{droppableMailbox:Zt},props:{account:{type:Object,required:!0},mailbox:{type:Object,required:!0},top:{type:Boolean,default:!0},filter:{type:String,default:"",required:!1}},data(){var t,n;return{debug:(null===(t=window)||void 0===t||null===(n=t.OC)||void 0===n?void 0:n.debug)||!1,mailboxStats:void 0,loadingMarkAsRead:!1,clearingCache:!1,showSaving:!1,changeSubscription:!1,changingSyncInBackground:!1,editing:!1,showSubMailboxes:!1,menuOpen:!1,renameLabel:!0,renameInput:!1,mailboxName:this.mailbox.displayName,showMoveModal:!1,hasDelimiter:!!this.mailbox.delimiter}},computed:{visible(){return(!1===this.account.showSubscribedOnly||this.mailbox.attributes&&this.mailbox.attributes.includes("\\subscribed"))&&this.isUnifiedButOnlyInbox},notInbox(){return"inbox"!==this.mailbox.name.toLowerCase()},notVirtual(){return!this.account.isUnified&&"flagged"!==this.mailbox.specialRole},title(){return"starred"===this.filter?Object(Wt.a)({...this.mailbox,specialUse:["flagged"]}):Object(Wt.a)(this.mailbox)},icon(){return"starred"===this.filter?"icon-flagged":this.mailbox.isPriorityInbox?"icon-important":this.mailbox.specialRole?"icon-"+this.mailbox.specialRole:"icon-folder"},to(){return{name:"mailbox",params:{mailboxId:this.mailbox.databaseId,filter:this.filter?this.filter:void 0}}},hasSubMailboxes(){return this.subMailboxes.length>0},subMailboxes(){return this.$store.getters.getSubMailboxes(this.mailbox.databaseId)},statsText(){return this.mailboxStats&&"total"in this.mailboxStats&&"unread"in this.mailboxStats?0===this.mailboxStats.unread?Object(Qt.translatePlural)("mail","{total} message","{total} messages",this.mailboxStats.total,{total:this.mailboxStats.total}):Object(Qt.translatePlural)("mail","{unread} unread of {total}","{unread} unread of {total}",this.mailboxStats.unread,{total:this.mailboxStats.total,unread:this.mailboxStats.unread}):t("mail","Loading …")},isSubscribed(){return this.mailbox.attributes&&this.mailbox.attributes.includes("\\subscribed")},isDroppableSpecialMailbox(){return"starred"!==this.filter&&![this.account.draftsMailboxId,this.account.sentMailboxId].includes(this.mailbox.databaseId)},isActive(){return this.$route.params.mailboxId===this.mailbox.databaseId},isValidDropTarget(){return!this.isActive&&(this.isDroppableSpecialMailbox||!this.mailbox.specialRole&&!this.account.isUnified)},isUnifiedButOnlyInbox(){return!this.mailbox.isUnified||this.mailbox.specialUse.includes("inbox")&&this.$store.getters.accounts.length>2},showUnreadCounter(){return this.mailbox.unread>0&&"starred"!==this.filter}},mounted(){Vt.a.$on("dragStart",this.onDragStart),Vt.a.$on("dragEnd",this.onDragEnd),Vt.a.$on("envelopesMoved",this.onEnvelopesMoved)},beforeDestroy(){Vt.a.$off("dragStart",this.onDragStart),Vt.a.$off("dragEnd",this.onDragEnd),Vt.a.$off("envelopesMoved",this.onEnvelopesMoved)},methods:{genId:t=>"mailbox-"+t.databaseId,onMenuToggle(t){t&&this.fetchMailboxStats()},async fetchMailboxStats(){if(this.mailboxStats=null,!this.account.isUnified&&"flagged"!==this.mailbox.specialRole)try{const t=await Object(zt.d)(this.mailbox.databaseId);m.a.debug("loaded mailbox stats for ".concat(this.mailbox.databaseId),{stats:t}),this.mailboxStats=t}catch(t){this.mailboxStats={error:!0},m.a.error("could not load mailbox stats for ".concat(this.mailbox.databaseId),t)}},async createMailbox(t){this.editing=!0;const n=t.target.elements[1].value,e=this.mailbox.name+this.mailbox.delimiter+n;m.a.info("creating mailbox ".concat(e," as submailbox of ").concat(this.mailbox.databaseId)),this.menuOpen=!1;try{await this.$store.dispatch("createMailbox",{account:this.account,name:e})}catch(t){throw m.a.error("could not create mailbox ".concat(e),{error:t}),t}finally{this.editing=!1,this.showSaving=!1}m.a.info("mailbox ".concat(e," created")),this.showSubMailboxes=!0},openCreateMailbox(){this.editing=!0,this.showSaving=!1},markAsRead(){this.loadingMarkAsRead=!0,this.$store.dispatch("markMailboxRead",{accountId:this.account.id,mailboxId:this.mailbox.databaseId}).then(()=>m.a.info("mailbox ".concat(this.mailbox.databaseId," marked as read"))).catch(t=>m.a.error("could not mark mailbox ".concat(this.mailbox.databaseId," as read"),{error:t})).then(()=>this.loadingMarkAsRead=!1)},async changeFolderSubscription(t){try{this.changeSubscription=!0,await this.$store.dispatch("changeMailboxSubscription",{mailbox:this.mailbox,subscribed:t})}catch(t){throw m.a.error("could not update subscription of mailbox ".concat(this.mailbox.databaseId),{error:t}),t}finally{this.changeSubscription=!1}},async changeSyncInBackground(t){try{this.changingSyncInBackground=!0,await this.$store.dispatch("patchMailbox",{mailbox:this.mailbox,attributes:{syncInBackground:t}})}catch(t){throw m.a.error("could not update background sync flag of mailbox ".concat(this.mailbox.databaseId),{error:t}),t}finally{this.changingSyncInBackground=!1}},async clearCache(){try{this.clearingCache=!0,m.a.debug("clearing message cache",{accountId:this.account.id,mailboxId:this.mailbox.databaseId}),await Object(Gt.a)(this.account.id,this.mailbox.databaseId),window.location.reload(!1)}finally{this.clearCache=!1}},deleteMailbox(){const n=this.mailbox.databaseId;m.a.info("delete mailbox",{mailbox:this.mailbox}),OC.dialogs.confirmDestructive(t("mail","The mailbox and all messages in it will be deleted."),t("mail","Delete mailbox"),{type:OC.dialogs.YES_NO_BUTTONS,confirm:t("mail","Delete mailbox {name}",{name:this.mailbox.displayName}),confirmClasses:"error",cancel:t("mail","Cancel")},t=>{if(t)return this.$store.dispatch("deleteMailbox",{mailbox:this.mailbox}).then(()=>{m.a.info("mailbox ".concat(n," deleted"))}).catch(t=>m.a.error("could not delete mailbox",{error:t}))})},async renameMailbox(){this.renameInput=!1,this.showSaving=!1;try{await this.$store.dispatch("renameMailbox",{account:this.account,mailbox:this.mailbox,newName:this.mailboxName}),this.renameLabel=!0,this.renameInput=!1,this.showSaving=!1}catch(n){Object(ft.c)(t("mail","An error occurred, unable to rename the mailbox.")),console.error(n),this.renameLabel=!1,this.renameInput=!1,this.showSaving=!0}},openRenameInput(){this.renameLabel=!1,this.renameInput=!0,this.showSaving=!1},onOpenMoveModal(){this.showMoveModal=!0},onCloseMoveModal(){this.showMoveModal=!1},onDragStart(t){let{accountId:n}=t;n===this.mailbox.accountId&&(this.$store.commit("expandAccount",n),this.showSubMailboxes=!0)},onDragEnd(t){let{accountId:n}=t;n===this.mailbox.accountId&&(this.showSubMailboxes=!1)},onEnvelopesMoved(t){let{mailboxId:n,movedEnvelopes:e}=t;if(this.mailbox.databaseId!==n)return;const a=e.find(t=>t.envelopeId===this.$route.params.threadId);var i;"message"===this.$route.name&&a&&this.$router.push({name:"mailbox",params:{mailboxId:this.$route.params.mailboxId,filter:null===(i=this.$route.params)||void 0===i?void 0:i.filter}})}}},nn=Object($.a)(tn,(function(){var t=this,n=t.$createElement,e=t._self._c||n;return t.visible?e("AppNavigationItem",{directives:[{name:"droppable-mailbox",rawName:"v-droppable-mailbox",value:{mailboxId:t.mailbox.databaseId,accountId:t.mailbox.accountId,isValidDropTarget:t.isValidDropTarget},expression:"{\n\t\tmailboxId: mailbox.databaseId,\n\t\taccountId: mailbox.accountId,\n\t\tisValidDropTarget,\n\t}"}],key:t.genId(t.mailbox),attrs:{id:t.genId(t.mailbox),"allow-collapse":!0,"menu-open":t.menuOpen,"force-menu":!0,icon:t.icon,title:t.title,to:t.to,open:t.showSubMailboxes},on:{"update:menuOpen":[function(n){t.menuOpen=n},t.onMenuToggle],"update:menu-open":function(n){t.menuOpen=n},"update:open":function(n){t.showSubMailboxes=n}}},[e("template",{slot:"actions"},[t.account.isUnified||"flagged"===t.mailbox.specialRole?t._e():e("ActionText",{attrs:{icon:"icon-info",title:t.mailbox.name}},[t._v("\n\t\t\t"+t._s(t.statsText)+"\n\t\t")]),t._v(" "),"flagged"===t.mailbox.specialRole||t.account.isUnified?t._e():e("ActionButton",{attrs:{icon:"icon-mail",title:t.t("mail","Mark all as read"),disabled:t.loadingMarkAsRead},on:{click:t.markAsRead}},[t._v("\n\t\t\t"+t._s(t.t("mail","Mark all messages of this mailbox as read"))+"\n\t\t")]),t._v(" "),!t.editing&&t.top&&!t.account.isUnified&&t.hasDelimiter&&"flagged"!==t.mailbox.specialRole?e("ActionButton",{attrs:{icon:"icon-folder"},on:{click:t.openCreateMailbox}},[t._v("\n\t\t\t"+t._s(t.t("mail","Add submailbox"))+"\n\t\t")]):t._e(),t._v(" "),t.editing?e("ActionInput",{attrs:{icon:"icon-folder"},on:{submit:function(n){return n.preventDefault(),n.stopPropagation(),t.createMailbox.apply(null,arguments)}}}):t._e(),t._v(" "),!t.renameLabel||t.hasSubMailboxes||t.account.isUnified?t._e():e("ActionButton",{attrs:{icon:"icon-rename"},on:{click:function(n){return n.preventDefault(),n.stopPropagation(),t.openRenameInput.apply(null,arguments)}}},[t._v("\n\t\t\t"+t._s(t.t("mail","Edit name"))+"\n\t\t")]),t._v(" "),t.renameInput?e("ActionInput",{attrs:{icon:"icon-rename",value:t.mailboxName},on:{"update:value":function(n){t.mailboxName=n},submit:function(n){return n.preventDefault(),n.stopPropagation(),t.renameMailbox.apply(null,arguments)}}}):t._e(),t._v(" "),t.showSaving?e("ActionText",{attrs:{icon:"icon-loading-small"}},[t._v("\n\t\t\t"+t._s(t.t("mail","Saving"))+"\n\t\t")]):t._e(),t._v(" "),t.account.isUnified||!t.hasDelimiter||t.mailbox.specialRole||t.hasSubMailboxes?t._e():e("ActionButton",{attrs:{id:t.genId(t.mailbox),icon:"icon-external","close-after-click":!0},on:{click:function(n){return n.preventDefault(),t.onOpenMoveModal.apply(null,arguments)}}},[t._v("\n\t\t\t"+t._s(t.t("mail","Move"))+"\n\t\t")]),t._v(" "),t.debug&&!t.account.isUnified&&"flagged"!==t.mailbox.specialRole?e("ActionButton",{attrs:{icon:"icon-settings",title:t.t("mail","Clear cache"),disabled:t.clearingCache},on:{click:t.clearCache}},[t._v("\n\t\t\t"+t._s(t.t("mail","Clear locally cached data, in case there are issues with synchronization."))+"\n\t\t")]):t._e(),t._v(" "),t.notVirtual?e("ActionCheckbox",{attrs:{checked:t.isSubscribed,disabled:t.changeSubscription},on:{"update:checked":t.changeFolderSubscription}},[t._v("\n\t\t\t"+t._s(t.t("mail","Subscribed"))+"\n\t\t")]):t._e(),t._v(" "),t.notVirtual&&t.notInbox?e("ActionCheckbox",{attrs:{checked:t.mailbox.syncInBackground,disabled:t.changingSyncInBackground},on:{"update:checked":t.changeSyncInBackground}},[t._v("\n\t\t\t"+t._s(t.t("mail","Sync in background"))+"\n\t\t")]):t._e(),t._v(" "),t.account.isUnified||t.mailbox.specialRole||t.hasSubMailboxes?t._e():e("ActionButton",{attrs:{icon:"icon-delete"},on:{click:t.deleteMailbox}},[t._v("\n\t\t\t"+t._s(t.t("mail","Delete mailbox"))+"\n\t\t")])],1),t._v(" "),t.showUnreadCounter&&"trash"!==t.mailbox.specialRole?e("AppNavigationCounter",{attrs:{slot:"counter"},slot:"counter"},[t._v("\n\t\t"+t._s(t.mailbox.unread)+"\n\t")]):t._e(),t._v(" "),e("template",{slot:"extra"},[t.showMoveModal?e("MoveMailboxModal",{attrs:{account:t.account,mailbox:t.mailbox},on:{close:t.onCloseMoveModal}}):t._e()],1),t._v(" "),t._l(t.subMailboxes,(function(n){return e("NavigationMailbox",{key:t.genId(n),attrs:{account:t.account,mailbox:n,top:!1}})}))],2):t._e()}),[],!1,null,null,null).exports,en=a(755),an={name:"KeyboardShortcuts",components:{Modal:a.n(en).a}},on=a(1439),sn={insert:"head",singleton:!1},rn=(O()(on.a,sn),on.a.locals,{name:"AppSettingsMenu",components:{KeyboardShortcuts:Object($.a)(an,(function(){var t=this,n=t.$createElement,e=t._self._c||n;return e("Modal",{attrs:{size:"large",title:t.t("mail","Keyboard shortcut")},on:{close:function(n){return t.$emit("close")}}},[e("h2",[t._v(t._s(t.t("mail","Keyboard shortcuts")))]),t._v(" "),e("p",[t._v(t._s(t.t("mail","Speed up your Mail experience with these quick shortcuts.")))]),t._v(" "),e("dl",[e("div",[e("dt",[e("kbd",[t._v("C")])]),t._v(" "),e("dd",[t._v(t._s(t.t("mail","Compose new message")))])]),t._v(" "),e("div",[e("dt",[e("kbd",[t._v("←")])]),t._v(" "),e("dd",[t._v(t._s(t.t("mail","Newer message")))])]),t._v(" "),e("div",[e("dt",[e("kbd",[t._v("→")])]),t._v(" "),e("dd",[t._v(t._s(t.t("mail","Older message")))])]),t._v(" "),e("div",[e("dt",[e("kbd",[t._v("S")])]),t._v(" "),e("dd",[t._v(t._s(t.t("mail","Toggle star")))])]),t._v(" "),e("div",[e("dt",[e("kbd",[t._v("U")])]),t._v(" "),e("dd",[t._v(t._s(t.t("mail","Toggle unread")))])]),t._v(" "),e("div",[e("dt",[e("kbd",[t._v("Del")])]),t._v(" "),e("dd",[t._v(t._s(t.t("mail","Delete")))])]),t._v(" "),e("div",[e("dt",[e("kbd",[t._v("Ctrl")]),t._v(" + "),e("kbd",[t._v("F")])]),t._v(" "),e("dd",[t._v(t._s(t.t("mail","Search")))])]),t._v(" "),e("div",[e("dt",[e("kbd",[t._v("Ctrl")]),t._v(" + "),e("kbd",[t._v("Enter")])]),t._v(" "),e("dd",[t._v(t._s(t.t("mail","Send")))])]),t._v(" "),e("div",[e("dt",[e("kbd",[t._v("R")])]),t._v(" "),e("dd",[t._v(t._s(t.t("mail","Refresh")))])])])])}),[],!1,null,"17460ac4",null).exports},data:()=>({loadingAvatarSettings:!1,optOutSettingsText:t("mail","Allow the app to collect data about your interactions. Based on this data, the app will adapt to your preferences. The data will only be stored locally."),loadingOptOutSettings:!1,replySettingsText:t("mail","Put my text to the bottom of a reply instead of on top of it."),loadingReplySettings:!1,displayKeyboardShortcuts:!1,autoTaggingText:t("mail","Automatically classify importance of new email"),toggleAutoTagging:!1}),computed:{useBottomReplies(){return"bottom"===this.$store.getters.getPreference("reply-mode","top")},useExternalAvatars(){return"true"===this.$store.getters.getPreference("external-avatars","true")},useDataCollection(){return"true"===this.$store.getters.getPreference("collect-data","true")},useAutoTagging(){return"true"===this.$store.getters.getPreference("tag-classified-messages","true")}},methods:{onToggleButtonReplies(t){this.loadingReplySettings=!0,this.$store.dispatch("savePreference",{key:"reply-mode",value:t.target.checked?"bottom":"top"}).catch(t=>m.a.error("could not save preferences",{error:t})).then(()=>{this.loadingReplySettings=!1})},onToggleExternalAvatars(t){this.loadingAvatarSettings=!0,this.$store.dispatch("savePreference",{key:"external-avatars",value:t.target.checked?"true":"false"}).catch(t=>m.a.error("could not save preferences",{error:t})).then(()=>{this.loadingAvatarSettings=!1})},onToggleCollectData(t){this.loadingOptOutSettings=!0,this.$store.dispatch("savePreference",{key:"collect-data",value:t.target.checked?"true":"false"}).catch(t=>m.a.error("could not save preferences",{error:t})).then(()=>{this.loadingOptOutSettings=!1})},async onToggleAutoTagging(n){this.toggleAutoTagging=!0;try{await this.$store.dispatch("savePreference",{key:"tag-classified-messages",value:n.target.checked?"true":"false"})}catch(n){m.a.error("could not save preferences",{error:n}),Object(ft.b)(t("mail","Could not update preference"))}finally{this.toggleAutoTagging=!1}},registerProtocolHandler(){if(window.navigator.registerProtocolHandler){const t=window.location.protocol+"//"+window.location.host+Object(k.generateUrl)("apps/mail/compose?uri=%s");try{window.navigator.registerProtocolHandler("mailto",t,OC.theme.name+" Mail")}catch(t){m.a.error("could not register protocol handler",{err:t})}}},showKeyboardShortcuts(){this.displayKeyboardShortcuts=!0},closeKeyboardShortcuts(){this.displayKeyboardShortcuts=!1},toggleKeyboardShortcuts(){this.displayKeyboardShortcuts=!this.displayKeyboardShortcuts}}}),ln=a(1440),cn={insert:"head",singleton:!1},dn=(O()(ln.a,cn),ln.a.locals,Object($.a)(rn,(function(){var t=this,n=t.$createElement,e=t._self._c||n;return e("div",[e("router-link",{staticClass:"icon-add-white app-settings-button button primary new-button",attrs:{to:"/setup"}},[t._v("\n\t\t"+t._s(t.t("mail","Add mail account"))+"\n\t")]),t._v(" "),t.loadingOptOutSettings?e("p",{staticClass:"app-settings"},[e("span",{staticClass:"icon-loading-small"}),t._v("\n\t\t"+t._s(t.optOutSettingsText)+"\n\t")]):e("p",{staticClass:"app-settings"},[e("input",{staticClass:"checkbox",attrs:{id:"data-collection-toggle",type:"checkbox"},domProps:{checked:t.useDataCollection},on:{change:t.onToggleCollectData}}),t._v(" "),e("label",{attrs:{for:"data-collection-toggle"}},[t._v(t._s(t.optOutSettingsText))])]),t._v(" "),t.toggleAutoTagging?e("p",{staticClass:"app-settings"},[e("span",{staticClass:"icon-loading-small"}),t._v("\n\t\t"+t._s(t.autoTaggingText)+"\n\t")]):e("p",{staticClass:"app-settings"},[e("input",{staticClass:"checkbox",attrs:{id:"auto-tagging-toggle",type:"checkbox"},domProps:{checked:t.useAutoTagging},on:{change:t.onToggleAutoTagging}}),t._v(" "),e("label",{attrs:{for:"auto-tagging-toggle"}},[t._v(t._s(t.autoTaggingText))])]),t._v(" "),t.loadingAvatarSettings?e("p",{staticClass:"app-settings avatar-settings"},[e("span",{staticClass:"icon-loading-small"}),t._v("\n\t\t"+t._s(t.t("mail","Use Gravatar and favicon avatars"))+"\n\t")]):e("p",{staticClass:"app-settings"},[e("input",{staticClass:"checkbox",attrs:{id:"gravatar-enabled",type:"checkbox"},domProps:{checked:t.useExternalAvatars},on:{change:t.onToggleExternalAvatars}}),t._v(" "),e("label",{attrs:{for:"gravatar-enabled"}},[t._v(t._s(t.t("mail","Use Gravatar and favicon avatars")))])]),t._v(" "),t.loadingReplySettings?e("p",{staticClass:"app-settings reply-settings"},[e("span",{staticClass:"icon-loading-small"}),t._v("\n\t\t"+t._s(t.replySettingsText)+"\n\t")]):e("p",{staticClass:"app-settings"},[e("input",{staticClass:"checkbox",attrs:{id:"bottom-reply-enabled",type:"checkbox"},domProps:{checked:t.useBottomReplies},on:{change:t.onToggleButtonReplies}}),t._v(" "),e("label",{attrs:{for:"bottom-reply-enabled"}},[t._v(t._s(t.replySettingsText))])]),t._v(" "),e("p",[e("button",{staticClass:"icon-mail app-settings-button",on:{click:t.registerProtocolHandler}},[t._v("\n\t\t\t"+t._s(t.t("mail","Register as application for mail links"))+"\n\t\t")])]),t._v(" "),e("button",{staticClass:"icon-details app-settings-button",on:{click:function(n){return n.preventDefault(),n.stopPropagation(),t.showKeyboardShortcuts.apply(null,arguments)},shortkey:t.toggleKeyboardShortcuts}},[t._v("\n\t\t"+t._s(t.t("mail","Show keyboard shortcuts"))+"\n\t")]),t._v(" "),t.displayKeyboardShortcuts?e("KeyboardShortcuts",{on:{close:t.closeKeyboardShortcuts}}):t._e()],1)}),[],!1,null,"350e690d",null).exports),un={name:"Navigation",components:{AppNavigation:o.a,AppNavigationNew:r.a,AppNavigationSettings:c.a,AppNavigationSpacer:u.a,AppSettingsMenu:dn,NavigationAccount:jt,NavigationAccountExpandCollapse:Rt,NavigationMailbox:nn},data:()=>({refreshing:!1}),computed:{menu(){return this.$store.getters.accounts.map(t=>{const n=this.$store.getters.getMailboxes(t.id),e=n.filter(n=>this.isCollapsed(t,n)).length>1;return{id:t.id,account:t,mailboxes:n,isCollapsible:e}})},currentMailbox(){if("message"===this.$route.name||"mailbox"===this.$route.name)return this.$store.getters.getMailbox(this.$route.params.mailboxId)}},methods:{isCollapsed:(t,n)=>"inbox"!==n.specialRole&&(n.databaseId!==t.draftsMailboxId&&n.databaseId!==t.sentMailboxId&&n.databaseId!==t.trashMailboxId),onNewMessage(){var t;const n=this.$route.params.accountId||this.$store.getters.accounts[0].id,e=this.$route.params.mailboxId||(null===(t=this.$store.getters.getMailboxes(n)[0])||void 0===t?void 0:t.databaseId);"message"!==this.$router.currentRoute.name||"new"!==this.$router.currentRoute.params.threadId?this.$router.push({name:"message",params:{mailboxId:e,filter:this.$route.params.filter?this.$route.params.filter:void 0,threadId:"new"}}).catch(t=>{m.a.error(t)}):this.$root.$emit("newMessage")},isFirst(t){return t===this.$store.getters.accounts[1]},isLast(t){const n=this.$store.getters.accounts;return t===n[n.length-1]},async refreshMailbox(){if(!0!==this.refreshing){this.refreshing=!0;try{await this.$store.dispatch("syncEnvelopes",{mailboxId:this.currentMailbox.databaseId}),m.a.debug("Current mailbox is sync'ing ")}catch(t){m.a.error("could not sync current mailbox",{error:t})}finally{this.refreshing=!1}}else m.a.debug("already sync'ing mailbox.. aborting")}}},mn=a(1441),pn={insert:"head",singleton:!1},gn=(O()(mn.a,pn),mn.a.locals,Object($.a)(un,(function(){var t=this,n=t.$createElement,e=t._self._c||n;return e("AppNavigation",{scopedSlots:t._u([{key:"list",fn:function(){return[e("ul",{attrs:{id:"accounts-list"}},[t._l(t.menu,(function(n){return[n.account?e("NavigationAccount",{key:n.account.id,attrs:{account:n.account,"first-mailbox":n.mailboxes[0],"is-first":t.isFirst(n.account),"is-last":t.isLast(n.account)}}):t._e(),t._v(" "),t._l(n.mailboxes,(function(a){return[e("NavigationMailbox",{directives:[{name:"show",rawName:"v-show",value:!n.isCollapsible||!n.account.collapsed||!t.isCollapsed(n.account,a),expression:"\n\t\t\t\t\t\t\t!group.isCollapsible ||\n\t\t\t\t\t\t\t\t!group.account.collapsed ||\n\t\t\t\t\t\t\t\t!isCollapsed(group.account, item)\n\t\t\t\t\t\t"}],key:"mailbox-"+a.databaseId,attrs:{account:n.account,mailbox:a}}),t._v(" "),n.account.isUnified||"inbox"!==a.specialRole?t._e():e("NavigationMailbox",{key:a.databaseId+"-starred",attrs:{account:n.account,mailbox:a,filter:"starred"}})]})),t._v(" "),!n.account.isUnified&&n.isCollapsible?e("NavigationAccountExpandCollapse",{key:"collapse-"+n.account.id,attrs:{account:n.account}}):t._e(),t._v(" "),e("AppNavigationSpacer",{key:"spacer-"+n.account.id})]}))],2)]},proxy:!0},{key:"footer",fn:function(){return[e("AppNavigationSettings",{attrs:{title:t.t("mail","Settings")}},[e("AppSettingsMenu")],1)]},proxy:!0}])},[e("AppNavigationNew",{attrs:{text:t.t("mail","New message"),"button-id":"mail_new_message","button-class":"icon-add",role:"complementary"},on:{click:t.onNewMessage}}),t._v(" "),t.currentMailbox?e("button",{staticClass:"button icon-history",attrs:{disabled:t.refreshing},on:{click:t.refreshMailbox}}):t._e()],1)}),[],!1,null,"72a80ec2",null));e.a=gn.exports},1160:function(t,n,e){"use strict";var a=e(1330),i=e.n(a),o=e(1453),s=e(1460),r=e(1446),l=e(1454),c=e(1458),d=e(871),u=e(1447),m=e(1459),p=e(1444),g=e(1445),A=e(687),h=e(702);class v extends h.a{removeSignatureElement(t,n){const e=t.model.createRangeIn(t.model.document.getRoot());for(const t of e.getWalker({shallow:!0}))t.item.is("element")&&"signature"===t.item.name&&n.remove(t.item)}insertSignatureElement(t,n,e,a){if(0===e.length)return;const i=t.data.processor.toView(e),o=t.data.toModel(i),s=n.createElement("signature");n.append(n.createText("-- "),s),n.append(n.createElement("paragraph"),s),n.append(o,s),a&&n.append(n.createElement("paragraph"),s);const r=a?this.findPositionAboveQuote(t,n):n.createPositionAt(t.model.document.getRoot(),"end");t.model.insertContent(s,r)}findPositionAboveQuote(t,n){const e=t.model.createRangeIn(t.model.document.getRoot());for(const t of e.getWalker({shallow:!0}))if(t.item.is("element")&&"quote"===t.item.name)return n.createPositionBefore(t.item);return n.createPositionAt(t.model.document.getRoot(),"end")}execute(t){let{signature:n,signatureAboveQuote:e}=t;this.editor.model.change(t=>{this.removeSignatureElement(this.editor,t),this.insertSignatureElement(this.editor,t,n,e)})}refresh(){this.isEnabled=!0}}class b extends A.a{init(){this._defineSchema(),this._defineConverters(),this.editor.commands.add("insertSignature",new v(this.editor))}_defineSchema(){this.editor.model.schema.register("signature",{allowIn:"$root",isLimit:!0,allowContentOf:"$block"})}_defineConverters(){this.editor.conversion.elementToElement({model:"signature",view:{name:"div",classes:"signature"}})}}
/**
 * @copyright 2021 Silvio Zimmer <silvio.zimmer@die-kinderwelt.com>
 *
 * @author 2021 Silvio Zimmer <silvio.zimmer@die-kinderwelt.com>
 *
 * @license GNU AGPL version 3 or any later version
 *
 * This code is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License, version 3,
 * as published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License, version 3,
 * along with this program.  If not, see <http://www.gnu.org/licenses/>
 *
 */class f extends A.a{init(){this._defineSchema(),this._defineConverters()}_defineSchema(){this.editor.model.schema.register("quote",{inheritAllFrom:"$block"})}_defineConverters(){this.editor.conversion.elementToElement({model:"quote",view:{name:"div",classes:"quote"}})}}var C=e(43),x=e(1367),y=e.n(x),w=e(8),_={name:"TextEditor",components:{ckeditor:i.a.component},props:{value:{type:String,required:!0},html:{type:Boolean,default:!1},placeholder:{type:String,default:""},focus:{type:Boolean,default:!1},bus:{type:Object,required:!0}},data(){const t=[r.a,d.a,b,f],n=["undo","redo"];return this.html&&(t.push(u.a,o.a,c.a,m.a,l.a,p.a,g.a),n.unshift("heading","alignment","bold","italic","bulletedList","numberedList","blockquote","link")),{text:"",ready:!1,editor:s.a,config:{placeholder:this.placeholder,plugins:t,toolbar:{items:n},language:"en"}}},computed:{sanitizedValue(){return y.a.sanitize(this.value,{FORBID_TAGS:["style"]})}},watch:{sanitizedValue(t){this.text=t}},beforeMount(){this.loadEditorTranslations(Object(C.getLanguage)())},methods:{async loadEditorTranslations(t){if("en"===t)return this.showEditor("en");try{w.a.debug("loading ".concat(t," translations for CKEditor")),await e(1368)("./".concat(t)),this.showEditor(t)}catch(n){w.a.error('could not find CKEditor translations for "'.concat(t,'"'),{error:n}),this.showEditor("en")}},showEditor(t){w.a.debug('using "'.concat(t,'" as CKEditor language')),this.config.language=t,this.ready=!0},onEditorReady(t){const n=t.model.schema;w.a.debug("CKEditor editor is ready",{editor:t,schema:n}),this.editorInstance=t,t.conversion.for("downcast").add(t=>{t.on("insert:paragraph",(t,n,e)=>{e.writer.setStyle("margin","0",e.mapper.toViewElement(n.item))},{priority:"low"})}),n.on("checkChild",(t,n)=>{n[0].endsWith("blockQuote")&&(t.stop(),t.return=!0)},{priority:"highest"}),this.focus&&(w.a.debug("focusing TextEditor"),t.editing.view.focus()),this.text=this.sanitizedValue,w.a.debug("setting TextEditor contents to <".concat(this.text,">")),this.bus.$on("appendToBodyAtCursor",this.appendToBodyAtCursor),this.bus.$on("insertSignature",this.onInsertSignature)},onInput(){w.a.debug("TextEditor input changed to <".concat(this.text,">")),this.$emit("input",this.text)},appendToBodyAtCursor(t){const n=this.editorInstance.data.processor.toView(t),e=this.editorInstance.data.toModel(n);this.editorInstance.model.insertContent(e)},onInsertSignature(t,n){this.editorInstance.execute("insertSignature",{signature:t,signatureAboveQuote:n})}}},S=e(35),k=e.n(S),M=e(1369),I={insert:"head",singleton:!1},P=(k()(M.a,I),M.a.locals,e(29)),T=Object(P.a)(_,(function(){var t=this,n=t.$createElement,e=t._self._c||n;return t.ready?e("ckeditor",{attrs:{config:t.config,editor:t.editor},on:{input:t.onInput,ready:t.onEditorReady},model:{value:t.text,callback:function(n){t.text=n},expression:"text"}}):t._e()}),[],!1,null,"157e74cb",null);n.a=T.exports},1162:function(n,e,a){"use strict";var i=a(1403),o=a(8),s={name:"AccountForm",components:{Tab:i.Tab,Tabs:i.Tabs},props:{displayName:{type:String,default:""},email:{type:String,default:""},save:{type:Function,required:!0},account:{type:Object,required:!1,default:()=>{}}},data(){const n=(t,n)=>void 0!==this.account?this.account[t]:n;return{loading:!1,mode:"auto",autoConfig:{accountName:this.displayName,emailAddress:this.email,password:""},manualConfig:{accountName:"",emailAddress:"",imapHost:n("imapHost",""),imapPort:n("imapPort",993),imapSslMode:n("imapSslMode","ssl"),imapUser:n("imapUser",""),imapPassword:"",smtpHost:n("smtpHost",""),smtpPort:n("smtpPort",587),smtpSslMode:n("smtpSslMode","tls"),smtpUser:n("smtpUser",""),smtpPassword:""},submitButtonText:this.account?t("mail","Save"):t("mail","Connect")}},computed:{settingsPage(){return void 0!==this.account}},methods:{onModeChanged(t){this.mode=t.tab.id,"manual"===this.mode&&(""===this.manualConfig.accountName&&(this.manualConfig.accountName=this.autoConfig.accountName),""===this.manualConfig.emailAddress&&(this.manualConfig.emailAddress=this.autoConfig.emailAddress),""===this.manualConfig.imapUser&&(this.manualConfig.imapUser=this.autoConfig.emailAddress),""===this.manualConfig.imapPassword&&(this.manualConfig.imapPassword=this.autoConfig.password),""===this.manualConfig.smtpUser&&(this.manualConfig.smtpUser=this.autoConfig.emailAddress),""===this.manualConfig.smtpPassword&&(this.manualConfig.smtpPassword=this.autoConfig.password))},onImapSslModeChange(){switch(this.manualConfig.imapSslMode){case"none":case"tls":this.manualConfig.imapPort=143;break;case"ssl":this.manualConfig.imapPort=993}},onSmtpSslModeChange(){switch(this.manualConfig.smtpSslMode){case"none":case"tls":this.manualConfig.smtpPort=587;break;case"ssl":this.manualConfig.smtpPort=465}},saveChanges(){return"auto"===this.mode?this.save({autoDetect:!0,...this.autoConfig}):this.save({autoDetect:!1,...this.manualConfig})},onSubmit(t){console.debug("account form submitted",{event:t}),this.loading=!0,this.saveChanges().catch(t=>o.a.error("could not save account details",{error:t})).then(()=>this.loading=!1)}}},r=a(35),l=a.n(r),c=a(1404),d={insert:"head",singleton:!1},u=(l()(c.a,d),c.a.locals,a(1405)),m={insert:"head",singleton:!1},p=(l()(u.a,m),u.a.locals,a(29)),g=Object(p.a)(s,(function(){var t=this,n=t.$createElement,e=t._self._c||n;return e("form",{attrs:{id:"account-form"},on:{submit:function(n){return n.preventDefault(),t.onSubmit.apply(null,arguments)}}},[e("Tabs",{attrs:{options:{useUrlFragment:!1,defaultTabHash:t.settingsPage?"manual":"auto"},"cache-lifetime":"0"},on:{changed:t.onModeChanged}},[e("Tab",{key:"auto",attrs:{id:"auto",name:t.t("mail","Auto")}},[e("label",{attrs:{for:"auto-name"}},[t._v(t._s(t.t("mail","Name")))]),t._v(" "),e("input",{directives:[{name:"model",rawName:"v-model",value:t.autoConfig.accountName,expression:"autoConfig.accountName"}],attrs:{id:"auto-name",type:"text",placeholder:t.t("mail","Name"),disabled:t.loading,autofocus:""},domProps:{value:t.autoConfig.accountName},on:{input:function(n){n.target.composing||t.$set(t.autoConfig,"accountName",n.target.value)}}}),t._v(" "),e("label",{attrs:{for:"auto-address"}},[t._v(t._s(t.t("mail","Mail Address")))]),t._v(" "),e("input",{directives:[{name:"model",rawName:"v-model",value:t.autoConfig.emailAddress,expression:"autoConfig.emailAddress"}],attrs:{id:"auto-address",type:"email",placeholder:t.t("mail","Mail Address"),disabled:t.loading,required:""},domProps:{value:t.autoConfig.emailAddress},on:{input:function(n){n.target.composing||t.$set(t.autoConfig,"emailAddress",n.target.value)}}}),t._v(" "),e("label",{attrs:{for:"auto-password"}},[t._v(t._s(t.t("mail","Password")))]),t._v(" "),e("input",{directives:[{name:"model",rawName:"v-model",value:t.autoConfig.password,expression:"autoConfig.password"}],attrs:{id:"auto-password",type:"password",placeholder:t.t("mail","Password"),disabled:t.loading,required:""},domProps:{value:t.autoConfig.password},on:{input:function(n){n.target.composing||t.$set(t.autoConfig,"password",n.target.value)}}})]),t._v(" "),e("Tab",{key:"manual",attrs:{id:"manual",name:t.t("mail","Manual")}},[e("label",{attrs:{for:"man-name"}},[t._v(t._s(t.t("mail","Name")))]),t._v(" "),e("input",{directives:[{name:"model",rawName:"v-model",value:t.manualConfig.accountName,expression:"manualConfig.accountName"}],attrs:{id:"man-name",type:"text",placeholder:t.t("mail","Name"),disabled:t.loading},domProps:{value:t.manualConfig.accountName},on:{input:function(n){n.target.composing||t.$set(t.manualConfig,"accountName",n.target.value)}}}),t._v(" "),e("label",{attrs:{for:"man-address"}},[t._v(t._s(t.t("mail","Mail Address")))]),t._v(" "),e("input",{directives:[{name:"model",rawName:"v-model",value:t.manualConfig.emailAddress,expression:"manualConfig.emailAddress"}],attrs:{id:"man-address",type:"email",placeholder:t.t("mail","Mail Address"),disabled:t.loading,required:""},domProps:{value:t.manualConfig.emailAddress},on:{input:function(n){n.target.composing||t.$set(t.manualConfig,"emailAddress",n.target.value)}}}),t._v(" "),e("h3",[t._v(t._s(t.t("mail","IMAP Settings")))]),t._v(" "),e("label",{attrs:{for:"man-imap-host"}},[t._v(t._s(t.t("mail","IMAP Host")))]),t._v(" "),e("input",{directives:[{name:"model",rawName:"v-model",value:t.manualConfig.imapHost,expression:"manualConfig.imapHost"}],attrs:{id:"man-imap-host",type:"text",placeholder:t.t("mail","IMAP Host"),disabled:t.loading,required:""},domProps:{value:t.manualConfig.imapHost},on:{input:function(n){n.target.composing||t.$set(t.manualConfig,"imapHost",n.target.value)}}}),t._v(" "),e("h4",[t._v(t._s(t.t("mail","IMAP Security")))]),t._v(" "),e("div",{staticClass:"flex-row"},[e("input",{directives:[{name:"model",rawName:"v-model",value:t.manualConfig.imapSslMode,expression:"manualConfig.imapSslMode"}],attrs:{id:"man-imap-sec-none",type:"radio",name:"man-imap-sec",disabled:t.loading,value:"none"},domProps:{checked:t._q(t.manualConfig.imapSslMode,"none")},on:{change:[function(n){return t.$set(t.manualConfig,"imapSslMode","none")},t.onImapSslModeChange]}}),t._v(" "),e("label",{staticClass:"button",class:{primary:"none"===t.manualConfig.imapSslMode},attrs:{for:"man-imap-sec-none"}},[t._v(t._s(t.t("mail","None")))]),t._v(" "),e("input",{directives:[{name:"model",rawName:"v-model",value:t.manualConfig.imapSslMode,expression:"manualConfig.imapSslMode"}],attrs:{id:"man-imap-sec-ssl",type:"radio",name:"man-imap-sec",disabled:t.loading,value:"ssl"},domProps:{checked:t._q(t.manualConfig.imapSslMode,"ssl")},on:{change:[function(n){return t.$set(t.manualConfig,"imapSslMode","ssl")},t.onImapSslModeChange]}}),t._v(" "),e("label",{staticClass:"button",class:{primary:"ssl"===t.manualConfig.imapSslMode},attrs:{for:"man-imap-sec-ssl"}},[t._v(t._s(t.t("mail","SSL/TLS")))]),t._v(" "),e("input",{directives:[{name:"model",rawName:"v-model",value:t.manualConfig.imapSslMode,expression:"manualConfig.imapSslMode"}],attrs:{id:"man-imap-sec-tls",type:"radio",name:"man-imap-sec",disabled:t.loading,value:"tls"},domProps:{checked:t._q(t.manualConfig.imapSslMode,"tls")},on:{change:[function(n){return t.$set(t.manualConfig,"imapSslMode","tls")},t.onImapSslModeChange]}}),t._v(" "),e("label",{staticClass:"button",class:{primary:"tls"===t.manualConfig.imapSslMode},attrs:{for:"man-imap-sec-tls"}},[t._v(t._s(t.t("mail","STARTTLS")))])]),t._v(" "),e("label",{attrs:{for:"man-imap-port"}},[t._v(t._s(t.t("mail","IMAP Port")))]),t._v(" "),e("input",{directives:[{name:"model",rawName:"v-model",value:t.manualConfig.imapPort,expression:"manualConfig.imapPort"}],attrs:{id:"man-imap-port",type:"number",placeholder:t.t("mail","IMAP Port"),disabled:t.loading,required:""},domProps:{value:t.manualConfig.imapPort},on:{input:function(n){n.target.composing||t.$set(t.manualConfig,"imapPort",n.target.value)}}}),t._v(" "),e("label",{attrs:{for:"man-imap-user"}},[t._v(t._s(t.t("mail","IMAP User")))]),t._v(" "),e("input",{directives:[{name:"model",rawName:"v-model",value:t.manualConfig.imapUser,expression:"manualConfig.imapUser"}],attrs:{id:"man-imap-user",type:"text",placeholder:t.t("mail","IMAP User"),disabled:t.loading,required:""},domProps:{value:t.manualConfig.imapUser},on:{input:function(n){n.target.composing||t.$set(t.manualConfig,"imapUser",n.target.value)}}}),t._v(" "),e("label",{attrs:{for:"man-imap-password"}},[t._v(t._s(t.t("mail","IMAP Password")))]),t._v(" "),e("input",{directives:[{name:"model",rawName:"v-model",value:t.manualConfig.imapPassword,expression:"manualConfig.imapPassword"}],attrs:{id:"man-imap-password",type:"password",placeholder:t.t("mail","IMAP Password"),disabled:t.loading,required:""},domProps:{value:t.manualConfig.imapPassword},on:{input:function(n){n.target.composing||t.$set(t.manualConfig,"imapPassword",n.target.value)}}}),t._v(" "),e("h3",[t._v(t._s(t.t("mail","SMTP Settings")))]),t._v(" "),e("label",{attrs:{for:"man-smtp-host"}},[t._v(t._s(t.t("mail","SMTP Host")))]),t._v(" "),e("input",{directives:[{name:"model",rawName:"v-model",value:t.manualConfig.smtpHost,expression:"manualConfig.smtpHost"}],ref:"smtpHost",attrs:{id:"man-smtp-host",type:"text",name:"smtp-host",placeholder:t.t("mail","SMTP Host"),disabled:t.loading,required:""},domProps:{value:t.manualConfig.smtpHost},on:{input:function(n){n.target.composing||t.$set(t.manualConfig,"smtpHost",n.target.value)}}}),t._v(" "),e("h4",[t._v(t._s(t.t("mail","SMTP Security")))]),t._v(" "),e("div",{staticClass:"flex-row"},[e("input",{directives:[{name:"model",rawName:"v-model",value:t.manualConfig.smtpSslMode,expression:"manualConfig.smtpSslMode"}],attrs:{id:"man-smtp-sec-none",type:"radio",name:"man-smtp-sec",disabled:t.loading,value:"none"},domProps:{checked:t._q(t.manualConfig.smtpSslMode,"none")},on:{change:[function(n){return t.$set(t.manualConfig,"smtpSslMode","none")},t.onSmtpSslModeChange]}}),t._v(" "),e("label",{staticClass:"button",class:{primary:"none"===t.manualConfig.smtpSslMode},attrs:{for:"man-smtp-sec-none"}},[t._v(t._s(t.t("mail","None")))]),t._v(" "),e("input",{directives:[{name:"model",rawName:"v-model",value:t.manualConfig.smtpSslMode,expression:"manualConfig.smtpSslMode"}],attrs:{id:"man-smtp-sec-ssl",type:"radio",name:"man-smtp-sec",disabled:t.loading,value:"ssl"},domProps:{checked:t._q(t.manualConfig.smtpSslMode,"ssl")},on:{change:[function(n){return t.$set(t.manualConfig,"smtpSslMode","ssl")},t.onSmtpSslModeChange]}}),t._v(" "),e("label",{staticClass:"button",class:{primary:"ssl"===t.manualConfig.smtpSslMode},attrs:{for:"man-smtp-sec-ssl"}},[t._v(t._s(t.t("mail","SSL/TLS")))]),t._v(" "),e("input",{directives:[{name:"model",rawName:"v-model",value:t.manualConfig.smtpSslMode,expression:"manualConfig.smtpSslMode"}],attrs:{id:"man-smtp-sec-tls",type:"radio",name:"man-smtp-sec",disabled:t.loading,value:"tls"},domProps:{checked:t._q(t.manualConfig.smtpSslMode,"tls")},on:{change:[function(n){return t.$set(t.manualConfig,"smtpSslMode","tls")},t.onSmtpSslModeChange]}}),t._v(" "),e("label",{staticClass:"button",class:{primary:"tls"===t.manualConfig.smtpSslMode},attrs:{for:"man-smtp-sec-tls"}},[t._v(t._s(t.t("mail","STARTTLS")))])]),t._v(" "),e("label",{attrs:{for:"man-smtp-port"}},[t._v(t._s(t.t("mail","SMTP Port")))]),t._v(" "),e("input",{directives:[{name:"model",rawName:"v-model",value:t.manualConfig.smtpPort,expression:"manualConfig.smtpPort"}],attrs:{id:"man-smtp-port",type:"number",placeholder:t.t("mail","SMTP Port"),disabled:t.loading,required:""},domProps:{value:t.manualConfig.smtpPort},on:{input:function(n){n.target.composing||t.$set(t.manualConfig,"smtpPort",n.target.value)}}}),t._v(" "),e("label",{attrs:{for:"man-smtp-user"}},[t._v(t._s(t.t("mail","SMTP User")))]),t._v(" "),e("input",{directives:[{name:"model",rawName:"v-model",value:t.manualConfig.smtpUser,expression:"manualConfig.smtpUser"}],attrs:{id:"man-smtp-user",type:"text",placeholder:t.t("mail","SMTP User"),disabled:t.loading,required:""},domProps:{value:t.manualConfig.smtpUser},on:{input:function(n){n.target.composing||t.$set(t.manualConfig,"smtpUser",n.target.value)}}}),t._v(" "),e("label",{attrs:{for:"man-smtp-password"}},[t._v(t._s(t.t("mail","SMTP Password")))]),t._v(" "),e("input",{directives:[{name:"model",rawName:"v-model",value:t.manualConfig.smtpPassword,expression:"manualConfig.smtpPassword"}],attrs:{id:"man-smtp-password",type:"password",placeholder:t.t("mail","SMTP Password"),disabled:t.loading,required:""},domProps:{value:t.manualConfig.smtpPassword},on:{input:function(n){n.target.composing||t.$set(t.manualConfig,"smtpPassword",n.target.value)}}})])],1),t._v(" "),t._t("feedback"),t._v(" "),e("input",{staticClass:"primary",attrs:{type:"submit",disabled:t.loading},domProps:{value:t.submitButtonText},on:{click:function(n){return n.preventDefault(),t.onSubmit.apply(null,arguments)}}})],2)}),[],!1,null,"2bf4e148",null);e.a=g.exports},1163:function(t,n,e){"use strict";var a=e(755),i=e.n(a),o=e(43),s=e(1039),r={name:"MailboxPicker",components:{Modal:i.a},props:{account:{type:Object,required:!0},selected:{type:Number,required:!1,default:void 0},loading:{type:Boolean,required:!1,default:!1},labelSelect:{type:String,default:Object(o.translate)("mail","Choose")},labelSelectLoading:{type:String,default:Object(o.translate)("mail","Choose")},pickedMailbox:{type:Object,required:!1,default:()=>{}},allowRoot:{type:Boolean,default:!1}},data:()=>({selectedMailboxId:void 0,mailboxCrumbs:[]}),computed:{mailboxes(){return this.selectedMailboxId?this.$store.getters.getSubMailboxes(this.selectedMailboxId):this.$store.getters.getMailboxes(this.account.accountId)},filteredMailboxes(){return this.pickedMailbox?this.mailboxes.filter(t=>t.databaseId!==this.pickedMailbox.databaseId):this.mailboxes}},methods:{getMailboxIcon:t=>t.specialRole?"icon-"+t.specialRole:"icon-folder",getMailboxTitle:t=>Object(s.a)(t),onClickHome(){this.selectedMailboxId=void 0,this.$emit("update:selected",void 0),this.mailboxCrumbs=[]},onClickCrumb(t){this.selectedMailboxId=this.mailboxCrumbs[t].databaseId,this.$emit("update:selected",this.selectedMailboxId),this.mailboxCrumbs=this.mailboxCrumbs.slice(0,t+1)},onClickMailbox(t){this.selectedMailboxId=t.databaseId,this.$emit("update:selected",this.selectedMailboxId),this.mailboxCrumbs.push(t)},onSelect(){this.$emit("select",this.selectedMailboxId)},onClose(){this.$emit("close")}}},l=e(35),c=e.n(l),d=e(1241),u={insert:"head",singleton:!1},m=(c()(d.a,u),d.a.locals,e(29)),p=Object(m.a)(r,(function(){var t=this,n=t.$createElement,e=t._self._c||n;return e("Modal",{on:{close:t.onClose}},[e("div",{ref:"content",staticClass:"modal-content"},[e("h2",{staticClass:"oc-dialog-title"},[t._v("\n\t\t\t"+t._s(t.t("mail","Choose target mailbox"))+"\n\t\t")]),t._v(" "),e("span",{staticClass:"crumbs"},[e("div",{staticClass:"level icon-breadcrumb"},[e("a",{staticClass:"icon-home",on:{click:function(n){return n.preventDefault(),t.onClickHome.apply(null,arguments)}}})]),t._v(" "),t._l(t.mailboxCrumbs,(function(n,a){return e("div",{key:n.databaseId,staticClass:"level icon-breadcrumb"},[e("a",{on:{click:function(n){return n.preventDefault(),t.onClickCrumb(a)}}},[t._v("\n\t\t\t\t\t"+t._s(t.getMailboxTitle(n))+"\n\t\t\t\t")])])}))],2),t._v(" "),e("div",{staticClass:"mailbox-list"},[t.filteredMailboxes.length>0?e("ul",t._l(t.filteredMailboxes,(function(n){return e("li",{key:n.databaseId,on:{click:function(e){return e.preventDefault(),t.onClickMailbox(n)}}},[e("div",{class:["mailbox-icon",t.getMailboxIcon(n)]}),t._v(" "),e("div",{staticClass:"mailbox-title"},[t._v("\n\t\t\t\t\t\t"+t._s(t.getMailboxTitle(n))+"\n\t\t\t\t\t")])])})),0):e("div",{staticClass:"empty"},[e("div",{staticClass:"empty-icon icon-folder"}),t._v(" "),e("h2",[t._v(t._s(t.t("mail","No more submailboxes in here")))])])]),t._v(" "),e("div",{staticClass:"buttons"},[e("button",{staticClass:"primary",attrs:{disabled:t.loading||!t.allowRoot&&!t.selectedMailboxId},on:{click:t.onSelect}},[t.loading?e("span",{staticClass:"icon-loading-small spinner"}):t._e(),t._v("\n\t\t\t\t"+t._s(t.loading?t.labelSelectLoading:t.labelSelect)+"\n\t\t\t")])])])])}),[],!1,null,"84d66076",null);n.a=p.exports},1221:function(t,n){},1241:function(t,n,e){"use strict";var a=e(36),i=e.n(a),o=e(37),s=e.n(o)()(i.a);s.push([t.i,"[data-v-84d66076] .modal-container{width:calc(100vw - 120px) !important;height:calc(100vh - 120px) !important;max-width:600px !important;max-height:500px !important}.modal-content[data-v-84d66076]{display:flex;box-sizing:border-box;width:100%;height:100%;flex-direction:column;padding:15px}.crumbs[data-v-84d66076]{display:inline-flex;padding-left:12px;padding-right:0px;flex-wrap:wrap}.crumbs .level[data-v-84d66076]{display:inline-flex;height:44px;min-width:0px;flex:0 0 auto;order:1;padding-right:7px;background-position:right center;background-size:auto 24px}.crumbs a[data-v-84d66076]{position:relative;padding:12px;opacity:.5;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;flex:0 0 auto;min-width:0px;max-width:200px}.crumbs a[data-v-84d66076]:hover{opacity:.7}.crumbs a.icon-home[data-v-84d66076]{width:0px;background-position:left center}.mailbox-list[data-v-84d66076]{display:inline-block;width:100%;height:100%;overflow-y:auto;flex:1}.mailbox-list li[data-v-84d66076]{display:flex;cursor:pointer}.mailbox-list li[data-v-84d66076]:hover{background-color:var(--color-background-hover)}.mailbox-list li[data-v-84d66076]:not(:last-child){border-bottom:1px solid var(--color-border)}.mailbox-list .empty[data-v-84d66076]{width:100%;color:var(--color-text-maxcontrast);text-align:center;margin-top:80px}.mailbox-list .empty-icon[data-v-84d66076]{opacity:.4;background-size:64px;height:64px;width:64px;margin:0 auto 15px}.mailbox-list .mailbox-icon[data-v-84d66076]{width:24px;height:24px;padding:14px;opacity:.9;background-size:24px}.mailbox-list .mailbox-title[data-v-84d66076]{padding:14px 14px 14px 0;flex:1;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.buttons[data-v-84d66076]{display:flex;justify-content:flex-end;padding-top:10px}.buttons .spinner[data-v-84d66076]{margin-right:5px}","",{version:3,sources:["webpack://./src/components/MailboxPicker.vue"],names:[],mappings:"AA+IA,mCACC,oCAAA,CACA,qCAAA,CACA,0BAAA,CACA,2BAAA,CAGD,gCACC,YAAA,CACA,qBAAA,CACA,UAAA,CACA,WAAA,CACA,qBAAA,CACA,YAAA,CAGD,yBACC,mBAAA,CACA,iBAAA,CACA,iBAAA,CACA,cAAA,CAEA,gCACC,mBAAA,CACA,WAAA,CACA,aAAA,CACA,aAAA,CACA,OAAA,CACA,iBAAA,CACA,gCAAA,CACA,yBAAA,CAGD,2BACC,iBAAA,CACA,YAAA,CACA,UAAA,CACA,sBAAA,CACA,kBAAA,CACA,eAAA,CACA,aAAA,CACA,aAAA,CACA,eAAA,CAEA,iCACC,UAAA,CAIF,qCACC,SAAA,CACA,+BAAA,CAIF,+BACC,oBAAA,CACA,UAAA,CACA,WAAA,CACA,eAAA,CACA,MAAA,CAEA,kCACC,YAAA,CACA,cAAA,CAEA,wCACC,8CAAA,CAGD,mDACC,2CAAA,CAIF,sCACC,UAAA,CACA,mCAAA,CACA,iBAAA,CACA,eAAA,CAGD,2CACC,UAAA,CACA,oBAAA,CACA,WAAA,CACA,UAAA,CACA,kBAAA,CAGD,6CACC,UAAA,CACA,WAAA,CACA,YAAA,CACA,UAAA,CACA,oBAAA,CAGD,8CACC,wBAAA,CACA,MAAA,CACA,eAAA,CACA,kBAAA,CACA,sBAAA,CAIF,0BACC,YAAA,CACA,wBAAA,CACA,gBAAA,CAEA,mCACC,gBAAA",sourcesContent:["\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n::v-deep .modal-container {\n\twidth: calc(100vw - 120px) !important;\n\theight: calc(100vh - 120px) !important;\n\tmax-width: 600px !important;\n\tmax-height: 500px !important;\n}\n\n.modal-content {\n\tdisplay: flex;\n\tbox-sizing: border-box;\n\twidth: 100%;\n\theight: 100%;\n\tflex-direction: column;\n\tpadding: 15px;\n}\n\n.crumbs {\n\tdisplay: inline-flex;\n\tpadding-left: 12px;\n\tpadding-right: 0px;\n\tflex-wrap: wrap;\n\n\t.level {\n\t\tdisplay: inline-flex;\n\t\theight: 44px;\n\t\tmin-width: 0px;\n\t\tflex: 0 0 auto;\n\t\torder: 1;\n\t\tpadding-right: 7px;\n\t\tbackground-position: right center;\n\t\tbackground-size: auto 24px;\n\t}\n\n\ta {\n\t\tposition: relative;\n\t\tpadding: 12px;\n\t\topacity: 0.5;\n\t\ttext-overflow: ellipsis;\n\t\twhite-space: nowrap;\n\t\toverflow: hidden;\n\t\tflex: 0 0 auto;\n\t\tmin-width: 0px;\n\t\tmax-width: 200px;\n\n\t\t&:hover {\n\t\t\topacity: 0.7;\n\t\t}\n\t}\n\n\ta.icon-home {\n\t\twidth: 0px;\n\t\tbackground-position: left center;\n\t}\n}\n\n.mailbox-list {\n\tdisplay: inline-block;\n\twidth: 100%;\n\theight: 100%;\n\toverflow-y: auto;\n\tflex: 1;\n\n\tli {\n\t\tdisplay: flex;\n\t\tcursor: pointer;\n\n\t\t&:hover {\n\t\t\tbackground-color: var(--color-background-hover);\n\t\t}\n\n\t\t&:not(:last-child) {\n\t\t\tborder-bottom: 1px solid var(--color-border);\n\t\t}\n\t}\n\n\t.empty {\n\t\twidth: 100%;\n\t\tcolor: var(--color-text-maxcontrast);\n\t\ttext-align: center;\n\t\tmargin-top: 80px;\n\t}\n\n\t.empty-icon {\n\t\topacity: 0.4;\n\t\tbackground-size: 64px;\n\t\theight: 64px;\n\t\twidth: 64px;\n\t\tmargin: 0 auto 15px;\n\t}\n\n\t.mailbox-icon {\n\t\twidth: 24px;\n\t\theight: 24px;\n\t\tpadding: 14px;\n\t\topacity: 0.9;\n\t\tbackground-size: 24px;\n\t}\n\n\t.mailbox-title {\n\t\tpadding: 14px 14px 14px 0;\n\t\tflex: 1;\n\t\toverflow: hidden;\n\t\twhite-space: nowrap;\n\t\ttext-overflow: ellipsis;\n\t}\n}\n\n.buttons {\n\tdisplay: flex;\n\tjustify-content: flex-end;\n\tpadding-top: 10px;\n\n\t.spinner {\n\t\tmargin-right: 5px;\n\t}\n}\n"],sourceRoot:""}]),n.a=s},1368:function(t,n,e){var a={"./af":1095,"./af.js":1095,"./ar":1096,"./ar.js":1096,"./ast":1097,"./ast.js":1097,"./az":1098,"./az.js":1098,"./bg":1099,"./bg.js":1099,"./ca":1100,"./ca.js":1100,"./cs":1101,"./cs.js":1101,"./da":1102,"./da.js":1102,"./de":1104,"./de-ch":1103,"./de-ch.js":1103,"./de.js":1104,"./el":1105,"./el.js":1105,"./en-au":1106,"./en-au.js":1106,"./en-gb":1107,"./en-gb.js":1107,"./eo":1108,"./eo.js":1108,"./es":1109,"./es.js":1109,"./et":1110,"./et.js":1110,"./eu":1111,"./eu.js":1111,"./fa":1112,"./fa.js":1112,"./fi":1113,"./fi.js":1113,"./fr":1114,"./fr.js":1114,"./gl":1115,"./gl.js":1115,"./gu":1116,"./gu.js":1116,"./he":1117,"./he.js":1117,"./hi":1118,"./hi.js":1118,"./hr":1119,"./hr.js":1119,"./hu":1120,"./hu.js":1120,"./id":1121,"./id.js":1121,"./it":1122,"./it.js":1122,"./ja":1123,"./ja.js":1123,"./km":1124,"./km.js":1124,"./kn":1125,"./kn.js":1125,"./ko":1126,"./ko.js":1126,"./ku":1127,"./ku.js":1127,"./lt":1128,"./lt.js":1128,"./lv":1129,"./lv.js":1129,"./ms":1130,"./ms.js":1130,"./nb":1131,"./nb.js":1131,"./ne":1132,"./ne.js":1132,"./nl":1133,"./nl.js":1133,"./no":1134,"./no.js":1134,"./oc":1135,"./oc.js":1135,"./pl":1136,"./pl.js":1136,"./pt":1138,"./pt-br":1137,"./pt-br.js":1137,"./pt.js":1138,"./ro":1139,"./ro.js":1139,"./ru":1140,"./ru.js":1140,"./si":1141,"./si.js":1141,"./sk":1142,"./sk.js":1142,"./sl":1143,"./sl.js":1143,"./sq":1144,"./sq.js":1144,"./sr":1146,"./sr-latn":1145,"./sr-latn.js":1145,"./sr.js":1146,"./sv":1147,"./sv.js":1147,"./th":1148,"./th.js":1148,"./tk":1149,"./tk.js":1149,"./tr":1150,"./tr.js":1150,"./tt":1151,"./tt.js":1151,"./ug":1152,"./ug.js":1152,"./uk":1153,"./uk.js":1153,"./vi":1154,"./vi.js":1154,"./zh":1156,"./zh-cn":1155,"./zh-cn.js":1155,"./zh.js":1156};function i(t){return o(t).then((function(t){return e.t(t,7)}))}function o(t){return e.e(8).then((function(){if(!e.o(a,t)){var n=new Error("Cannot find module '"+t+"'");throw n.code="MODULE_NOT_FOUND",n}return a[t]}))}i.keys=function(){return Object.keys(a)},i.resolve=o,i.id=1368,t.exports=i},1369:function(t,n,e){"use strict";var a=e(36),i=e.n(a),o=e(37),s=e.n(o)()(i.a);s.push([t.i,"[data-v-157e74cb] a{color:#07d}[data-v-157e74cb] p{cursor:text}","",{version:3,sources:["webpack://./src/components/TextEditor.vue"],names:[],mappings:"AAwNA,oBACC,UAAA,CAED,oBACC,WAAA",sourcesContent:["\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n::v-deep a {\n\tcolor: #07d;\n}\n::v-deep p {\n\tcursor: text;\n}\n"],sourceRoot:""}]),n.a=s},1404:function(t,n,e){"use strict";var a=e(36),i=e.n(a),o=e(37),s=e.n(o)()(i.a);s.push([t.i,"[data-v-2bf4e148] .tabs-component-tabs{display:flex}[data-v-2bf4e148] .tabs-component-tab{flex-grow:1;text-align:center;color:var(--color-text-lighter);margin-bottom:10px}[data-v-2bf4e148] .tabs-component-tab.is-active{border-bottom:1px solid #000;font-weight:bold}.tabs-component-panels[data-v-2bf4e148]{padding-top:20px}.tabs-component-panels label[data-v-2bf4e148]{text-align:left;width:100%;display:inline-block}.tabs-component-panels input[data-v-2bf4e148],.tabs-component-panels select[data-v-2bf4e148]{margin-bottom:10px}","",{version:3,sources:["webpack://./src/components/AccountForm.vue"],names:[],mappings:"AAkWA,uCACC,YAAA,CAGD,sCACC,WAAA,CACA,iBAAA,CACA,+BAAA,CACA,kBAAA,CAGD,gDACC,4BAAA,CACA,gBAAA,CAGD,wCACC,gBAAA,CAGD,8CACC,eAAA,CACA,UAAA,CACA,oBAAA,CAGD,6FAEC,kBAAA",sourcesContent:["\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n::v-deep .tabs-component-tabs {\n\tdisplay: flex;\n}\n\n::v-deep .tabs-component-tab {\n\tflex-grow: 1;\n\ttext-align: center;\n\tcolor: var(--color-text-lighter);\n\tmargin-bottom: 10px;\n}\n\n::v-deep .tabs-component-tab.is-active {\n\tborder-bottom: 1px solid black;\n\tfont-weight: bold;\n}\n\n.tabs-component-panels {\n\tpadding-top: 20px;\n}\n\n.tabs-component-panels label {\n\ttext-align: left;\n\twidth: 100%;\n\tdisplay: inline-block;\n}\n\n.tabs-component-panels input,\n.tabs-component-panels select {\n\tmargin-bottom: 10px;\n}\n"],sourceRoot:""}]),n.a=s},1405:function(t,n,e){"use strict";var a=e(36),i=e.n(a),o=e(37),s=e.n(o)()(i.a);s.push([t.i,"\nh4[data-v-2bf4e148] {\n\ttext-align: left;\n}\n.flex-row[data-v-2bf4e148] {\n\tdisplay: flex;\n}\nlabel.button[data-v-2bf4e148] {\n\tdisplay: inline-block;\n\ttext-align: center;\n\tflex-grow: 1;\n}\nlabel.primary[data-v-2bf4e148] {\n\tcolor: var(--color-main-background);\n}\ninput.primary[data-v-2bf4e148] {\n\tcolor: var(--color-main-background);\n}\ninput[type='radio'][data-v-2bf4e148] {\n\tdisplay: none;\n}\ninput[type='radio'][disabled] + label[data-v-2bf4e148] {\n\tcursor: default;\n\topacity: 0.5;\n}\n","",{version:3,sources:["webpack://./src/components/AccountForm.vue"],names:[],mappings:";AAmYA;CACA,gBAAA;AACA;AAEA;CACA,aAAA;AACA;AAEA;CACA,qBAAA;CACA,kBAAA;CACA,YAAA;AACA;AACA;CACA,mCAAA;AACA;AACA;CACA,mCAAA;AACA;AAEA;CACA,aAAA;AACA;AAEA;CACA,eAAA;CACA,YAAA;AACA",sourcesContent:['<template>\n\t<form id="account-form" @submit.prevent="onSubmit">\n\t\t<Tabs\n\t\t\t:options="{useUrlFragment: false, defaultTabHash: settingsPage ? \'manual\' : \'auto\'}"\n\t\t\tcache-lifetime="0"\n\t\t\t@changed="onModeChanged">\n\t\t\t<Tab id="auto" key="auto" :name="t(\'mail\', \'Auto\')">\n\t\t\t\t<label for="auto-name">{{ t(\'mail\', \'Name\') }}</label>\n\t\t\t\t<input\n\t\t\t\t\tid="auto-name"\n\t\t\t\t\tv-model="autoConfig.accountName"\n\t\t\t\t\ttype="text"\n\t\t\t\t\t:placeholder="t(\'mail\', \'Name\')"\n\t\t\t\t\t:disabled="loading"\n\t\t\t\t\tautofocus>\n\t\t\t\t<label for="auto-address">{{ t(\'mail\', \'Mail Address\') }}</label>\n\t\t\t\t<input\n\t\t\t\t\tid="auto-address"\n\t\t\t\t\tv-model="autoConfig.emailAddress"\n\t\t\t\t\ttype="email"\n\t\t\t\t\t:placeholder="t(\'mail\', \'Mail Address\')"\n\t\t\t\t\t:disabled="loading"\n\t\t\t\t\trequired>\n\t\t\t\t<label for="auto-password">{{ t(\'mail\', \'Password\') }}</label>\n\t\t\t\t<input\n\t\t\t\t\tid="auto-password"\n\t\t\t\t\tv-model="autoConfig.password"\n\t\t\t\t\ttype="password"\n\t\t\t\t\t:placeholder="t(\'mail\', \'Password\')"\n\t\t\t\t\t:disabled="loading"\n\t\t\t\t\trequired>\n\t\t\t</Tab>\n\t\t\t<Tab id="manual" key="manual" :name="t(\'mail\', \'Manual\')">\n\t\t\t\t<label for="man-name">{{ t(\'mail\', \'Name\') }}</label>\n\t\t\t\t<input\n\t\t\t\t\tid="man-name"\n\t\t\t\t\tv-model="manualConfig.accountName"\n\t\t\t\t\ttype="text"\n\t\t\t\t\t:placeholder="t(\'mail\', \'Name\')"\n\t\t\t\t\t:disabled="loading">\n\t\t\t\t<label for="man-address">{{ t(\'mail\', \'Mail Address\') }}</label>\n\t\t\t\t<input\n\t\t\t\t\tid="man-address"\n\t\t\t\t\tv-model="manualConfig.emailAddress"\n\t\t\t\t\ttype="email"\n\t\t\t\t\t:placeholder="t(\'mail\', \'Mail Address\')"\n\t\t\t\t\t:disabled="loading"\n\t\t\t\t\trequired>\n\n\t\t\t\t<h3>{{ t(\'mail\', \'IMAP Settings\') }}</h3>\n\t\t\t\t<label for="man-imap-host">{{ t(\'mail\', \'IMAP Host\') }}</label>\n\t\t\t\t<input\n\t\t\t\t\tid="man-imap-host"\n\t\t\t\t\tv-model="manualConfig.imapHost"\n\t\t\t\t\ttype="text"\n\t\t\t\t\t:placeholder="t(\'mail\', \'IMAP Host\')"\n\t\t\t\t\t:disabled="loading"\n\t\t\t\t\trequired>\n\t\t\t\t<h4>{{ t(\'mail\', \'IMAP Security\') }}</h4>\n\t\t\t\t<div class="flex-row">\n\t\t\t\t\t<input\n\t\t\t\t\t\tid="man-imap-sec-none"\n\t\t\t\t\t\tv-model="manualConfig.imapSslMode"\n\t\t\t\t\t\ttype="radio"\n\t\t\t\t\t\tname="man-imap-sec"\n\t\t\t\t\t\t:disabled="loading"\n\t\t\t\t\t\tvalue="none"\n\t\t\t\t\t\t@change="onImapSslModeChange">\n\t\t\t\t\t<label\n\t\t\t\t\t\tclass="button"\n\t\t\t\t\t\tfor="man-imap-sec-none"\n\t\t\t\t\t\t:class="{primary: manualConfig.imapSslMode === \'none\'}">{{ t(\'mail\', \'None\') }}</label>\n\t\t\t\t\t<input\n\t\t\t\t\t\tid="man-imap-sec-ssl"\n\t\t\t\t\t\tv-model="manualConfig.imapSslMode"\n\t\t\t\t\t\ttype="radio"\n\t\t\t\t\t\tname="man-imap-sec"\n\t\t\t\t\t\t:disabled="loading"\n\t\t\t\t\t\tvalue="ssl"\n\t\t\t\t\t\t@change="onImapSslModeChange">\n\t\t\t\t\t<label\n\t\t\t\t\t\tclass="button"\n\t\t\t\t\t\tfor="man-imap-sec-ssl"\n\t\t\t\t\t\t:class="{primary: manualConfig.imapSslMode === \'ssl\'}">{{ t(\'mail\', \'SSL/TLS\') }}</label>\n\t\t\t\t\t<input\n\t\t\t\t\t\tid="man-imap-sec-tls"\n\t\t\t\t\t\tv-model="manualConfig.imapSslMode"\n\t\t\t\t\t\ttype="radio"\n\t\t\t\t\t\tname="man-imap-sec"\n\t\t\t\t\t\t:disabled="loading"\n\t\t\t\t\t\tvalue="tls"\n\t\t\t\t\t\t@change="onImapSslModeChange">\n\t\t\t\t\t<label\n\t\t\t\t\t\tclass="button"\n\t\t\t\t\t\tfor="man-imap-sec-tls"\n\t\t\t\t\t\t:class="{primary: manualConfig.imapSslMode === \'tls\'}">{{ t(\'mail\', \'STARTTLS\') }}</label>\n\t\t\t\t</div>\n\t\t\t\t<label for="man-imap-port">{{ t(\'mail\', \'IMAP Port\') }}</label>\n\t\t\t\t<input\n\t\t\t\t\tid="man-imap-port"\n\t\t\t\t\tv-model="manualConfig.imapPort"\n\t\t\t\t\ttype="number"\n\t\t\t\t\t:placeholder="t(\'mail\', \'IMAP Port\')"\n\t\t\t\t\t:disabled="loading"\n\t\t\t\t\trequired>\n\t\t\t\t<label for="man-imap-user">{{ t(\'mail\', \'IMAP User\') }}</label>\n\t\t\t\t<input\n\t\t\t\t\tid="man-imap-user"\n\t\t\t\t\tv-model="manualConfig.imapUser"\n\t\t\t\t\ttype="text"\n\t\t\t\t\t:placeholder="t(\'mail\', \'IMAP User\')"\n\t\t\t\t\t:disabled="loading"\n\t\t\t\t\trequired>\n\t\t\t\t<label for="man-imap-password">{{ t(\'mail\', \'IMAP Password\') }}</label>\n\t\t\t\t<input\n\t\t\t\t\tid="man-imap-password"\n\t\t\t\t\tv-model="manualConfig.imapPassword"\n\t\t\t\t\ttype="password"\n\t\t\t\t\t:placeholder="t(\'mail\', \'IMAP Password\')"\n\t\t\t\t\t:disabled="loading"\n\t\t\t\t\trequired>\n\n\t\t\t\t<h3>{{ t(\'mail\', \'SMTP Settings\') }}</h3>\n\t\t\t\t<label for="man-smtp-host">{{ t(\'mail\', \'SMTP Host\') }}</label>\n\t\t\t\t<input\n\t\t\t\t\tid="man-smtp-host"\n\t\t\t\t\tref="smtpHost"\n\t\t\t\t\tv-model="manualConfig.smtpHost"\n\t\t\t\t\ttype="text"\n\t\t\t\t\tname="smtp-host"\n\t\t\t\t\t:placeholder="t(\'mail\', \'SMTP Host\')"\n\t\t\t\t\t:disabled="loading"\n\t\t\t\t\trequired>\n\t\t\t\t<h4>{{ t(\'mail\', \'SMTP Security\') }}</h4>\n\t\t\t\t<div class="flex-row">\n\t\t\t\t\t<input\n\t\t\t\t\t\tid="man-smtp-sec-none"\n\t\t\t\t\t\tv-model="manualConfig.smtpSslMode"\n\t\t\t\t\t\ttype="radio"\n\t\t\t\t\t\tname="man-smtp-sec"\n\t\t\t\t\t\t:disabled="loading"\n\t\t\t\t\t\tvalue="none"\n\t\t\t\t\t\t@change="onSmtpSslModeChange">\n\t\t\t\t\t<label\n\t\t\t\t\t\tclass="button"\n\t\t\t\t\t\tfor="man-smtp-sec-none"\n\t\t\t\t\t\t:class="{primary: manualConfig.smtpSslMode === \'none\'}">{{ t(\'mail\', \'None\') }}</label>\n\t\t\t\t\t<input\n\t\t\t\t\t\tid="man-smtp-sec-ssl"\n\t\t\t\t\t\tv-model="manualConfig.smtpSslMode"\n\t\t\t\t\t\ttype="radio"\n\t\t\t\t\t\tname="man-smtp-sec"\n\t\t\t\t\t\t:disabled="loading"\n\t\t\t\t\t\tvalue="ssl"\n\t\t\t\t\t\t@change="onSmtpSslModeChange">\n\t\t\t\t\t<label\n\t\t\t\t\t\tclass="button"\n\t\t\t\t\t\tfor="man-smtp-sec-ssl"\n\t\t\t\t\t\t:class="{primary: manualConfig.smtpSslMode === \'ssl\'}">{{ t(\'mail\', \'SSL/TLS\') }}</label>\n\t\t\t\t\t<input\n\t\t\t\t\t\tid="man-smtp-sec-tls"\n\t\t\t\t\t\tv-model="manualConfig.smtpSslMode"\n\t\t\t\t\t\ttype="radio"\n\t\t\t\t\t\tname="man-smtp-sec"\n\t\t\t\t\t\t:disabled="loading"\n\t\t\t\t\t\tvalue="tls"\n\t\t\t\t\t\t@change="onSmtpSslModeChange">\n\t\t\t\t\t<label\n\t\t\t\t\t\tclass="button"\n\t\t\t\t\t\tfor="man-smtp-sec-tls"\n\t\t\t\t\t\t:class="{primary: manualConfig.smtpSslMode === \'tls\'}">{{ t(\'mail\', \'STARTTLS\') }}</label>\n\t\t\t\t</div>\n\t\t\t\t<label for="man-smtp-port">{{ t(\'mail\', \'SMTP Port\') }}</label>\n\t\t\t\t<input\n\t\t\t\t\tid="man-smtp-port"\n\t\t\t\t\tv-model="manualConfig.smtpPort"\n\t\t\t\t\ttype="number"\n\t\t\t\t\t:placeholder="t(\'mail\', \'SMTP Port\')"\n\t\t\t\t\t:disabled="loading"\n\t\t\t\t\trequired>\n\t\t\t\t<label for="man-smtp-user">{{ t(\'mail\', \'SMTP User\') }}</label>\n\t\t\t\t<input\n\t\t\t\t\tid="man-smtp-user"\n\t\t\t\t\tv-model="manualConfig.smtpUser"\n\t\t\t\t\ttype="text"\n\t\t\t\t\t:placeholder="t(\'mail\', \'SMTP User\')"\n\t\t\t\t\t:disabled="loading"\n\t\t\t\t\trequired>\n\t\t\t\t<label for="man-smtp-password">{{ t(\'mail\', \'SMTP Password\') }}</label>\n\t\t\t\t<input\n\t\t\t\t\tid="man-smtp-password"\n\t\t\t\t\tv-model="manualConfig.smtpPassword"\n\t\t\t\t\ttype="password"\n\t\t\t\t\t:placeholder="t(\'mail\', \'SMTP Password\')"\n\t\t\t\t\t:disabled="loading"\n\t\t\t\t\trequired>\n\t\t\t</Tab>\n\t\t</Tabs>\n\t\t<slot name="feedback" />\n\t\t<input type="submit"\n\t\t\tclass="primary"\n\t\t\t:disabled="loading"\n\t\t\t:value="submitButtonText"\n\t\t\t@click.prevent="onSubmit">\n\t</form>\n</template>\n\n<script>\nimport { Tab, Tabs } from \'vue-tabs-component\'\n\nimport logger from \'../logger\'\n\nexport default {\n\tname: \'AccountForm\',\n\tcomponents: {\n\t\tTab,\n\t\tTabs,\n\t},\n\tprops: {\n\t\tdisplayName: {\n\t\t\ttype: String,\n\t\t\tdefault: \'\',\n\t\t},\n\t\temail: {\n\t\t\ttype: String,\n\t\t\tdefault: \'\',\n\t\t},\n\t\tsave: {\n\t\t\ttype: Function,\n\t\t\trequired: true,\n\t\t},\n\t\taccount: {\n\t\t\ttype: Object,\n\t\t\trequired: false,\n\t\t\tdefault: () => undefined,\n\t\t},\n\t},\n\tdata() {\n\t\tconst fromAccountOr = (prop, def) => {\n\t\t\tif (this.account !== undefined) {\n\t\t\t\treturn this.account[prop]\n\t\t\t} else {\n\t\t\t\treturn def\n\t\t\t}\n\t\t}\n\n\t\treturn {\n\t\t\tloading: false,\n\t\t\tmode: \'auto\',\n\t\t\tautoConfig: {\n\t\t\t\taccountName: this.displayName,\n\t\t\t\temailAddress: this.email,\n\t\t\t\tpassword: \'\',\n\t\t\t},\n\t\t\tmanualConfig: {\n\t\t\t\taccountName: \'\',\n\t\t\t\temailAddress: \'\',\n\t\t\t\timapHost: fromAccountOr(\'imapHost\', \'\'),\n\t\t\t\timapPort: fromAccountOr(\'imapPort\', 993),\n\t\t\t\timapSslMode: fromAccountOr(\'imapSslMode\', \'ssl\'),\n\t\t\t\timapUser: fromAccountOr(\'imapUser\', \'\'),\n\t\t\t\timapPassword: \'\',\n\t\t\t\tsmtpHost: fromAccountOr(\'smtpHost\', \'\'),\n\t\t\t\tsmtpPort: fromAccountOr(\'smtpPort\', 587),\n\t\t\t\tsmtpSslMode: fromAccountOr(\'smtpSslMode\', \'tls\'),\n\t\t\t\tsmtpUser: fromAccountOr(\'smtpUser\', \'\'),\n\t\t\t\tsmtpPassword: \'\',\n\t\t\t},\n\t\t\tsubmitButtonText: this.account ? t(\'mail\', \'Save\') : t(\'mail\', \'Connect\'),\n\t\t}\n\t},\n\tcomputed: {\n\t\tsettingsPage() {\n\t\t\treturn this.account !== undefined\n\t\t},\n\t},\n\tmethods: {\n\t\tonModeChanged(e) {\n\t\t\tthis.mode = e.tab.id\n\n\t\t\tif (this.mode === \'manual\') {\n\t\t\t\tif (this.manualConfig.accountName === \'\') {\n\t\t\t\t\tthis.manualConfig.accountName = this.autoConfig.accountName\n\t\t\t\t}\n\t\t\t\tif (this.manualConfig.emailAddress === \'\') {\n\t\t\t\t\tthis.manualConfig.emailAddress = this.autoConfig.emailAddress\n\t\t\t\t}\n\n\t\t\t\t// IMAP\n\t\t\t\tif (this.manualConfig.imapUser === \'\') {\n\t\t\t\t\tthis.manualConfig.imapUser = this.autoConfig.emailAddress\n\t\t\t\t}\n\t\t\t\tif (this.manualConfig.imapPassword === \'\') {\n\t\t\t\t\tthis.manualConfig.imapPassword = this.autoConfig.password\n\t\t\t\t}\n\n\t\t\t\t// SMTP\n\t\t\t\tif (this.manualConfig.smtpUser === \'\') {\n\t\t\t\t\tthis.manualConfig.smtpUser = this.autoConfig.emailAddress\n\t\t\t\t}\n\t\t\t\tif (this.manualConfig.smtpPassword === \'\') {\n\t\t\t\t\tthis.manualConfig.smtpPassword = this.autoConfig.password\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tonImapSslModeChange() {\n\t\t\tswitch (this.manualConfig.imapSslMode) {\n\t\t\tcase \'none\':\n\t\t\tcase \'tls\':\n\t\t\t\tthis.manualConfig.imapPort = 143\n\t\t\t\tbreak\n\t\t\tcase \'ssl\':\n\t\t\t\tthis.manualConfig.imapPort = 993\n\t\t\t\tbreak\n\t\t\t}\n\t\t},\n\t\tonSmtpSslModeChange() {\n\t\t\tswitch (this.manualConfig.smtpSslMode) {\n\t\t\tcase \'none\':\n\t\t\tcase \'tls\':\n\t\t\t\tthis.manualConfig.smtpPort = 587\n\t\t\t\tbreak\n\t\t\tcase \'ssl\':\n\t\t\t\tthis.manualConfig.smtpPort = 465\n\t\t\t\tbreak\n\t\t\t}\n\t\t},\n\t\tsaveChanges() {\n\t\t\tif (this.mode === \'auto\') {\n\t\t\t\treturn this.save({\n\t\t\t\t\tautoDetect: true,\n\t\t\t\t\t...this.autoConfig,\n\t\t\t\t})\n\t\t\t} else {\n\t\t\t\treturn this.save({\n\t\t\t\t\tautoDetect: false,\n\t\t\t\t\t...this.manualConfig,\n\t\t\t\t})\n\t\t\t}\n\t\t},\n\t\tonSubmit(event) {\n\t\t\tconsole.debug(\'account form submitted\', { event })\n\n\t\t\tthis.loading = true\n\n\t\t\tthis.saveChanges()\n\t\t\t\t.catch((error) => logger.error(\'could not save account details\', { error }))\n\t\t\t\t.then(() => (this.loading = false))\n\t\t},\n\t},\n}\n<\/script>\n\n<style lang="scss" scoped>\n::v-deep .tabs-component-tabs {\n\tdisplay: flex;\n}\n\n::v-deep .tabs-component-tab {\n\tflex-grow: 1;\n\ttext-align: center;\n\tcolor: var(--color-text-lighter);\n\tmargin-bottom: 10px;\n}\n\n::v-deep .tabs-component-tab.is-active {\n\tborder-bottom: 1px solid black;\n\tfont-weight: bold;\n}\n\n.tabs-component-panels {\n\tpadding-top: 20px;\n}\n\n.tabs-component-panels label {\n\ttext-align: left;\n\twidth: 100%;\n\tdisplay: inline-block;\n}\n\n.tabs-component-panels input,\n.tabs-component-panels select {\n\tmargin-bottom: 10px;\n}\n</style>\n\n<style scoped>\nh4 {\n\ttext-align: left;\n}\n\n.flex-row {\n\tdisplay: flex;\n}\n\nlabel.button {\n\tdisplay: inline-block;\n\ttext-align: center;\n\tflex-grow: 1;\n}\nlabel.primary {\n\tcolor: var(--color-main-background);\n}\ninput.primary {\n\tcolor: var(--color-main-background);\n}\n\ninput[type=\'radio\'] {\n\tdisplay: none;\n}\n\ninput[type=\'radio\'][disabled] + label {\n\tcursor: default;\n\topacity: 0.5;\n}\n</style>\n'],sourceRoot:""}]),n.a=s},1406:function(t,n,e){"use strict";var a=e(36),i=e.n(a),o=e(37),s=e.n(o)()(i.a);s.push([t.i,"label[data-v-7db23f84]{padding-right:12px}","",{version:3,sources:["webpack://./src/components/EditorSettings.vue"],names:[],mappings:"AAoFA,uBACC,kBAAA",sourcesContent:["\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nlabel {\n\tpadding-right: 12px;\n}\n"],sourceRoot:""}]),n.a=s},1423:function(t,n,e){"use strict";var a=e(36),i=e.n(a),o=e(37),s=e.n(o)()(i.a);s.push([t.i,"\n.vue-treeselect__control {\n\tpadding: 0;\n\tborder: 0;\n\twidth: 250px;\n}\n.vue-treeselect__control-arrow-container {\n\tdisplay: none;\n}\n.vue-treeselect--searchable .vue-treeselect__input-container {\n\tpadding-left: 0;\n}\ninput.vue-treeselect__input {\n\tmargin: 0;\n\tpadding: 0;\n}\n","",{version:3,sources:["webpack://./src/components/MailboxInlinePicker.vue"],names:[],mappings:";AAsEA;CACA,UAAA;CACA,SAAA;CACA,YAAA;AACA;AACA;CACA,aAAA;AACA;AACA;CACA,eAAA;AACA;AACA;CACA,SAAA;CACA,UAAA;AACA",sourcesContent:['<template>\n\t<Treeselect\n\t\tref="Treeselect"\n\t\tv-model="selected"\n\t\t:options="mailboxes"\n\t\t:multiple="false"\n\t\t:clearable="false"\n\t\t:disabled="disabled" />\n</template>\n<script>\nimport Treeselect from \'@riophae/vue-treeselect\'\nimport \'@riophae/vue-treeselect/dist/vue-treeselect.css\'\n\nexport default {\n\tname: \'MailboxInlinePicker\',\n\tcomponents: {\n\t\tTreeselect,\n\t},\n\tprops: {\n\t\taccount: {\n\t\t\ttype: Object,\n\t\t\trequired: true,\n\t\t},\n\t\tdisabled: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t\tvalue: {\n\t\t\ttype: Number,\n\t\t\trequired: false,\n\t\t},\n\t},\n\tdata() {\n\t\treturn {\n\t\t\tselected: this.value,\n\t\t}\n\t},\n\tcomputed: {\n\t\tmailboxes() {\n\t\t\treturn this.getMailboxes()\n\t\t},\n\t},\n\twatch: {\n\t\tselected(val) {\n\t\t\tif (val !== this.value) {\n\t\t\t\tthis.$emit(\'input\', val)\n\t\t\t\tthis.selected = val\n\t\t\t}\n\t\t},\n\t},\n\tmethods: {\n\t\tgetMailboxes(mailboxId) {\n\t\t\tlet mailboxes = []\n\t\t\tif (!mailboxId) {\n\t\t\t\tmailboxes = this.$store.getters.getMailboxes(this.account.accountId)\n\t\t\t} else {\n\t\t\t\tmailboxes = this.$store.getters.getSubMailboxes(mailboxId)\n\t\t\t}\n\t\t\treturn mailboxes.map((mailbox) => {\n\t\t\t\t return {\n\t\t\t\t\tid: mailbox.databaseId,\n\t\t\t\t\tlabel: mailbox.displayName,\n\t\t\t\t\tchildren: mailbox.mailboxes.length > 0 ? this.getMailboxes(mailbox.databaseId) : \'\',\n\t\t\t\t}\n\t\t\t})\n\t\t},\n\t},\n}\n<\/script>\n<style>\n.vue-treeselect__control {\n\tpadding: 0;\n\tborder: 0;\n\twidth: 250px;\n}\n.vue-treeselect__control-arrow-container {\n\tdisplay: none;\n}\n.vue-treeselect--searchable .vue-treeselect__input-container {\n\tpadding-left: 0;\n}\ninput.vue-treeselect__input {\n\tmargin: 0;\n\tpadding: 0;\n}\n</style>\n'],sourceRoot:""}]),n.a=s},1424:function(t,n,e){"use strict";var a=e(36),i=e.n(a),o=e(37),s=e.n(o)()(i.a);s.push([t.i,".button.icon-rename[data-v-3a6599f7]{background-color:transparent;border:none;opacity:.3}.button.icon-rename[data-v-3a6599f7]:hover,.button.icon-rename[data-v-3a6599f7]:focus{opacity:1}","",{version:3,sources:["webpack://./src/components/AccountDefaultsSettings.vue"],names:[],mappings:"AAoJA,qCACC,4BAAA,CACA,WAAA,CACA,UAAA,CAEA,sFAEC,SAAA",sourcesContent:["\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n.button.icon-rename {\n\tbackground-color: transparent;\n\tborder: none;\n\topacity: 0.3;\n\n\t&:hover,\n\t&:focus {\n\t\topacity: 1;\n\t}\n}\n"],sourceRoot:""}]),n.a=s},1425:function(t,n,e){"use strict";var a=e(36),i=e.n(a),o=e(37),s=e.n(o)()(i.a);s.push([t.i,".ck.ck-editor__editable_inline[data-v-1c55c63e]{width:100%;max-width:78vw;height:100px;border-radius:var(--border-radius) !important;border:1px solid var(--color-border) !important;box-shadow:none !important}.primary[data-v-1c55c63e]{padding-left:26px;background-position:6px;color:var(--color-main-background)}.primary[data-v-1c55c63e]:after{left:14px}.button-text[data-v-1c55c63e]{background-color:transparent;border:none;color:var(--color-text-maxcontrast);font-weight:normal}.button-text[data-v-1c55c63e]:hover,.button-text[data-v-1c55c63e]:focus{color:var(--color-main-text)}.section[data-v-1c55c63e]{display:block;padding:0;margin-bottom:23px}.multiselect--single[data-v-1c55c63e]{width:100%}","",{version:3,sources:["webpack://./src/components/SignatureSettings.vue"],names:[],mappings:"AAwKA,gDACE,UAAA,CACA,cAAA,CACA,YAAA,CACA,6CAAA,CACA,+CAAA,CACA,0BAAA,CAGF,0BACE,iBAAA,CACA,uBAAA,CACA,kCAAA,CAEA,gCACE,SAAA,CAIJ,8BACE,4BAAA,CACA,WAAA,CACA,mCAAA,CACA,kBAAA,CAEA,wEAEE,4BAAA,CAGJ,0BACE,aAAA,CACA,SAAA,CACA,kBAAA,CAEF,sCACE,UAAA",sourcesContent:["\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n.ck.ck-editor__editable_inline {\n  width: 100%;\n  max-width: 78vw;\n  height: 100px;\n  border-radius: var(--border-radius) !important;\n  border: 1px solid var(--color-border) !important;\n  box-shadow: none !important;\n}\n\n.primary {\n  padding-left: 26px;\n  background-position: 6px;\n  color: var(--color-main-background);\n\n  &:after {\n    left: 14px;\n  }\n}\n\n.button-text {\n  background-color: transparent;\n  border: none;\n  color: var(--color-text-maxcontrast);\n  font-weight: normal;\n\n  &:hover,\n  &:focus {\n    color: var(--color-main-text);\n  }\n}\n.section {\n  display: block;\n  padding: 0;\n  margin-bottom: 23px;\n}\n.multiselect--single {\n  width: 100%;\n}\n"],sourceRoot:""}]),n.a=s},1426:function(t,n,e){"use strict";var a=e(36),i=e.n(a),o=e(37),s=e.n(o)()(i.a);s.push([t.i,"\n.ck-balloon-panel {\n  z-index: 10000 !important;\n}\n","",{version:3,sources:["webpack://./src/components/SignatureSettings.vue"],names:[],mappings:";AAgNA;EACA,yBAAA;AACA",sourcesContent:['\x3c!--\n  - @copyright 2019 Christoph Wurst <christoph@winzerhof-wurst.at>\n  -\n  - @author 2019 Christoph Wurst <christoph@winzerhof-wurst.at>\n  -\n  - @license GNU AGPL version 3 or any later version\n  -\n  - This program is free software: you can redistribute it and/or modify\n  - it under the terms of the GNU Affero General Public License as\n  - published by the Free Software Foundation, either version 3 of the\n  - License, or (at your option) any later version.\n  -\n  - This program is distributed in the hope that it will be useful,\n  - but WITHOUT ANY WARRANTY; without even the implied warranty of\n  - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n  - GNU Affero General Public License for more details.\n  -\n  - You should have received a copy of the GNU Affero General Public License\n  - along with this program.  If not, see <http://www.gnu.org/licenses/>.\n  --\x3e\n\n<template>\n\t<div class="section">\n\t\t<div>\n\t\t\t<input\n\t\t\t\tid="signature-above-quote-toggle"\n\t\t\t\tv-model="signatureAboveQuote"\n\t\t\t\ttype="checkbox"\n\t\t\t\tclass="checkbox">\n\t\t\t<label for="signature-above-quote-toggle">\n\t\t\t\t{{ t("mail", "Place signature above quoted text") }}\n\t\t\t</label>\n\t\t</div>\n\t\t<Multiselect\n\t\t\tv-if="identities.length > 1"\n\t\t\t:allow-empty="false"\n\t\t\t:options="identities"\n\t\t\t:searchable="false"\n\t\t\t:value="identity"\n\t\t\tlabel="label"\n\t\t\ttrack-by="id"\n\t\t\t@select="changeIdentity" />\n\t\t<TextEditor\n\t\t\tv-model="signature"\n\t\t\t:html="true"\n\t\t\t:placeholder="t(\'mail\', \'Signature …\')"\n\t\t\t:bus="bus" />\n\t\t<button\n\t\t\tclass="primary"\n\t\t\t:class="loading ? \'icon-loading-small-dark\' : \'icon-checkmark-white\'"\n\t\t\t:disabled="loading"\n\t\t\t@click="saveSignature">\n\t\t\t{{ t("mail", "Save signature") }}\n\t\t</button>\n\t\t<button v-if="signature" class="button-text" @click="deleteSignature">\n\t\t\t{{ t("mail", "Delete") }}\n\t\t</button>\n\t</div>\n</template>\n\n<script>\nimport logger from \'../logger\'\nimport TextEditor from \'./TextEditor\'\nimport { detect, toHtml } from \'../util/text\'\nimport Vue from \'vue\'\nimport Multiselect from \'@nextcloud/vue/dist/Components/Multiselect\'\n\nexport default {\n\tname: \'SignatureSettings\',\n\tcomponents: {\n\t\tTextEditor,\n\t\tMultiselect,\n\t},\n\tprops: {\n\t\taccount: {\n\t\t\ttype: Object,\n\t\t\trequired: true,\n\t\t},\n\t},\n\tdata() {\n\t\treturn {\n\t\t\tloading: false,\n\t\t\tbus: new Vue(),\n\t\t\tidentity: null,\n\t\t\tsignature: \'\',\n\t\t\tsignatureAboveQuote: this.account.signatureAboveQuote,\n\t\t}\n\t},\n\tcomputed: {\n\t\tidentities() {\n\t\t\tconst identities = this.account.aliases.map((alias) => {\n\t\t\t\treturn {\n\t\t\t\t\tid: alias.id,\n\t\t\t\t\tlabel: alias.name + \' (\' + alias.alias + \')\',\n\t\t\t\t\tsignature: alias.signature,\n\t\t\t\t}\n\t\t\t})\n\n\t\t\tidentities.unshift({\n\t\t\t\tid: -1,\n\t\t\t\tlabel: this.account.name + \' (\' + this.account.emailAddress + \')\',\n\t\t\t\tsignature: this.account.signature,\n\t\t\t})\n\n\t\t\treturn identities\n\t\t},\n\t},\n\twatch: {\n\t\tasync signatureAboveQuote(val, oldVal) {\n\t\t\ttry {\n\t\t\t\tawait this.$store.dispatch(\'patchAccount\', {\n\t\t\t\t\taccount: this.account,\n\t\t\t\t\tdata: {\n\t\t\t\t\t\tsignatureAboveQuote: val,\n\t\t\t\t\t},\n\t\t\t\t})\n\t\t\t\tlogger.debug(\'signature above quoted updated to \' + val)\n\t\t\t} catch (e) {\n\t\t\t\tlogger.error(\'could not update signature above quote\', { e })\n\t\t\t\tthis.signatureAboveQuote = oldVal\n\t\t\t}\n\t\t},\n\t},\n\tbeforeMount() {\n\t\tthis.changeIdentity(this.identities[0])\n\t},\n\tmethods: {\n\t\tchangeIdentity(identity) {\n\t\t\tlogger.debug(\'select identity\', { identity })\n\t\t\tthis.identity = identity\n\t\t\tthis.signature = identity.signature\n\t\t\t\t? toHtml(detect(identity.signature)).value\n\t\t\t\t: \'\'\n\t\t},\n\t\tasync deleteSignature() {\n\t\t\tthis.signature = null\n\t\t\tawait this.saveSignature()\n\t\t},\n\t\tasync saveSignature() {\n\t\t\tthis.loading = true\n\n\t\t\tlet dispatchType = \'updateAccountSignature\'\n\t\t\tconst payload = {\n\t\t\t\taccount: this.account,\n\t\t\t\tsignature: this.signature,\n\t\t\t}\n\n\t\t\tif (this.identity.id > -1) {\n\t\t\t\tdispatchType = \'updateAliasSignature\'\n\t\t\t\tpayload.aliasId = this.identity.id\n\t\t\t}\n\n\t\t\treturn this.$store\n\t\t\t\t.dispatch(dispatchType, payload)\n\t\t\t\t.then(() => {\n\t\t\t\t\tlogger.info(\'signature updated\')\n\t\t\t\t\tthis.loading = false\n\t\t\t\t})\n\t\t\t\t.catch((error) => {\n\t\t\t\t\tlogger.error(\'could not update account signature\', { error })\n\t\t\t\t\tthrow error\n\t\t\t\t})\n\t\t},\n\t},\n}\n<\/script>\n\n<style lang="scss" scoped>\n.ck.ck-editor__editable_inline {\n  width: 100%;\n  max-width: 78vw;\n  height: 100px;\n  border-radius: var(--border-radius) !important;\n  border: 1px solid var(--color-border) !important;\n  box-shadow: none !important;\n}\n\n.primary {\n  padding-left: 26px;\n  background-position: 6px;\n  color: var(--color-main-background);\n\n  &:after {\n    left: 14px;\n  }\n}\n\n.button-text {\n  background-color: transparent;\n  border: none;\n  color: var(--color-text-maxcontrast);\n  font-weight: normal;\n\n  &:hover,\n  &:focus {\n    color: var(--color-main-text);\n  }\n}\n.section {\n  display: block;\n  padding: 0;\n  margin-bottom: 23px;\n}\n.multiselect--single {\n  width: 100%;\n}\n</style>\n<style>\n.ck-balloon-panel {\n  z-index: 10000 !important;\n}\n</style>\n'],sourceRoot:""}]),n.a=s},1427:function(t,n,e){"use strict";var a=e(36),i=e.n(a),o=e(37),s=e.n(o)()(i.a);s.push([t.i,".alias-form[data-v-2c30c231],.alias-item[data-v-2c30c231]{display:flex;justify-content:space-between;align-items:center}.button-group[data-v-2c30c231]{display:flex;align-items:center}.icon[data-v-2c30c231]{background-color:var(--color-main-background);border:none;opacity:.7}.icon[data-v-2c30c231]:hover,.icon[data-v-2c30c231]:focus{opacity:1}.icon-checkmark[data-v-2c30c231]{background-image:var(--icon-checkmark-000)}.icon-delete[data-v-2c30c231]{background-image:var(--icon-delete-000)}.icon-rename[data-v-2c30c231]{background-image:var(--icon-rename-000)}","",{version:3,sources:["webpack://./src/components/AliasForm.vue"],names:[],mappings:"AA6HA,0DACC,YAAA,CACA,6BAAA,CACA,kBAAA,CAGD,+BACC,YAAA,CACA,kBAAA,CAGD,uBACC,6CAAA,CACA,WAAA,CACA,UAAA,CAEA,0DACC,SAAA,CAIF,iCACC,0CAAA,CAGD,8BACC,uCAAA,CAGD,8BACC,uCAAA",sourcesContent:["\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n.alias-form, .alias-item {\n\tdisplay: flex;\n\tjustify-content: space-between;\n\talign-items: center;\n}\n\n.button-group {\n\tdisplay: flex;\n\talign-items: center;\n}\n\n.icon {\n\tbackground-color: var(--color-main-background);\n\tborder: none;\n\topacity: 0.7;\n\n\t&:hover, &:focus {\n\t\topacity: 1;\n\t}\n}\n\n.icon-checkmark {\n\tbackground-image: var(--icon-checkmark-000);\n}\n\n.icon-delete {\n\tbackground-image: var(--icon-delete-000);\n}\n\n.icon-rename {\n\tbackground-image: var(--icon-rename-000);\n}\n"],sourceRoot:""}]),n.a=s},1428:function(t,n,e){"use strict";var a=e(36),i=e.n(a),o=e(37),s=e.n(o)()(i.a);s.push([t.i,".primary[data-v-3d86b7aa]{padding-left:26px;background-position:6px;color:var(--color-main-background)}.primary[data-v-3d86b7aa]:after{left:14px}.button-text[data-v-3d86b7aa]{background-color:transparent;border:none;color:var(--color-text-maxcontrast);font-weight:normal}.button-text[data-v-3d86b7aa]:hover,.button-text[data-v-3d86b7aa]:focus{color:var(--color-main-text)}input[data-v-3d86b7aa]{width:195px}.icon-add[data-v-3d86b7aa]{background-image:var(--icon-add-fff)}","",{version:3,sources:["webpack://./src/components/AliasSettings.vue"],names:[],mappings:"AAoHA,0BACC,iBAAA,CACA,uBAAA,CACA,kCAAA,CAEA,gCACC,SAAA,CAIF,8BACC,4BAAA,CACA,WAAA,CACA,mCAAA,CACA,kBAAA,CAEA,wEAEC,4BAAA,CAIF,uBACC,WAAA,CAGD,2BACC,oCAAA",sourcesContent:["\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n.primary {\n\tpadding-left: 26px;\n\tbackground-position: 6px;\n\tcolor: var(--color-main-background);\n\n\t&:after {\n\t\tleft: 14px;\n\t}\n}\n\n.button-text {\n\tbackground-color: transparent;\n\tborder: none;\n\tcolor: var(--color-text-maxcontrast);\n\tfont-weight: normal;\n\n\t&:hover,\n\t&:focus {\n\t\tcolor: var(--color-main-text);\n\t}\n}\n\ninput {\n\twidth: 195px;\n}\n\n.icon-add {\n\tbackground-image: var(--icon-add-fff);\n}\n"],sourceRoot:""}]),n.a=s},1434:function(t,n,e){"use strict";var a=e(36),i=e.n(a),o=e(37),s=e.n(o)()(i.a);s.push([t.i,"\nform[data-v-8b1dc5a0] {\n\twidth: 250px\n}\nlabel[data-v-8b1dc5a0] {\n\tdisplay: inline-block;\n}\ninput[data-v-8b1dc5a0] {\n\twidth: 100%;\n}\n.flex-row[data-v-8b1dc5a0] {\n\tdisplay: flex;\n}\nlabel.button[data-v-8b1dc5a0] {\n\ttext-align: center;\n\tflex-grow: 1;\n}\nlabel.error[data-v-8b1dc5a0] {\n\tcolor: red;\n}\ninput[type='radio'][data-v-8b1dc5a0] {\n\tdisplay: none;\n}\n","",{version:3,sources:["webpack://./src/components/SieveAccountForm.vue"],names:[],mappings:";AAgMA;CACA;AACA;AAEA;CACA,qBAAA;AACA;AAEA;CACA,WAAA;AACA;AAEA;CACA,aAAA;AACA;AAEA;CACA,kBAAA;CACA,YAAA;AACA;AAEA;CACA,UAAA;AACA;AAEA;CACA,aAAA;AACA",sourcesContent:['<template>\n\t<form id="sieve-form">\n\t\t<p>\n\t\t\t<input\n\t\t\t\tid="sieve-disabled"\n\t\t\t\tv-model="sieveConfig.sieveEnabled"\n\t\t\t\ttype="radio"\n\t\t\t\tclass="radio"\n\t\t\t\tname="sieve-active"\n\t\t\t\t:value="false">\n\t\t\t<label\n\t\t\t\t:class="{primary: !sieveConfig.sieveEnabled}"\n\t\t\t\tfor="sieve-disabled">\n\t\t\t\t{{ t(\'mail\', \'Disabled\') }}\n\t\t\t</label>\n\t\t\t<input\n\t\t\t\tid="sieve-enabled"\n\t\t\t\tv-model="sieveConfig.sieveEnabled"\n\t\t\t\ttype="radio"\n\t\t\t\tclass="radio"\n\t\t\t\tname="sieve-active"\n\t\t\t\t:value="true">\n\t\t\t<label\n\t\t\t\t:class="{primary: sieveConfig.sieveEnabled}"\n\t\t\t\tfor="sieve-enabled">\n\t\t\t\t{{ t(\'mail\', \'Enabled\') }}\n\t\t\t</label>\n\t\t</p>\n\t\t<template v-if="sieveConfig.sieveEnabled">\n\t\t\t<label for="sieve-host">{{ t(\'mail\', \'Sieve Host\') }}</label>\n\t\t\t<input\n\t\t\t\tid="sieve-host"\n\t\t\t\tv-model="sieveConfig.sieveHost"\n\t\t\t\ttype="text"\n\t\t\t\trequired>\n\t\t\t<h4>{{ t(\'mail\', \'Sieve Security\') }}</h4>\n\t\t\t<div class="flex-row">\n\t\t\t\t<input\n\t\t\t\t\tid="sieve-sec-none"\n\t\t\t\t\tv-model="sieveConfig.sieveSslMode"\n\t\t\t\t\ttype="radio"\n\t\t\t\t\tname="sieve-sec"\n\t\t\t\t\tvalue="none">\n\t\t\t\t<label\n\t\t\t\t\tclass="button"\n\t\t\t\t\tfor="sieve-sec-none"\n\t\t\t\t\t:class="{primary: sieveConfig.sieveSslMode === \'none\'}">{{\n\t\t\t\t\t\tt(\'mail\', \'None\')\n\t\t\t\t\t}}</label>\n\t\t\t\t<input\n\t\t\t\t\tid="sieve-sec-ssl"\n\t\t\t\t\tv-model="sieveConfig.sieveSslMode"\n\t\t\t\t\ttype="radio"\n\t\t\t\t\tname="sieve-sec"\n\t\t\t\t\tvalue="ssl">\n\t\t\t\t<label\n\t\t\t\t\tclass="button"\n\t\t\t\t\tfor="sieve-sec-ssl"\n\t\t\t\t\t:class="{primary: sieveConfig.sieveSslMode === \'ssl\'}">\n\t\t\t\t\t{{ t(\'mail\', \'SSL/TLS\') }}\n\t\t\t\t</label>\n\t\t\t\t<input\n\t\t\t\t\tid="sieve-sec-tls"\n\t\t\t\t\tv-model="sieveConfig.sieveSslMode"\n\t\t\t\t\ttype="radio"\n\t\t\t\t\tname="sieve-sec"\n\t\t\t\t\tvalue="tls">\n\t\t\t\t<label\n\t\t\t\t\tclass="button"\n\t\t\t\t\tfor="sieve-sec-tls"\n\t\t\t\t\t:class="{primary: sieveConfig.sieveSslMode === \'tls\'}">\n\t\t\t\t\t{{ t(\'mail\', \'STARTTLS\') }}\n\t\t\t\t</label>\n\t\t\t</div>\n\t\t\t<label for="sieve-port">{{ t(\'mail\', \'Sieve Port\') }}</label>\n\t\t\t<input\n\t\t\t\tid="sieve-port"\n\t\t\t\tv-model="sieveConfig.sievePort"\n\t\t\t\ttype="text"\n\t\t\t\trequired>\n\t\t\t<h4>{{ t(\'mail\', \'Sieve Credentials\') }}</h4>\n\t\t\t<p>\n\t\t\t\t<input\n\t\t\t\t\tid="sieve-credentials-imap"\n\t\t\t\t\tv-model="useImapCredentials"\n\t\t\t\t\ttype="radio"\n\t\t\t\t\tclass="radio"\n\t\t\t\t\t:value="true">\n\t\t\t\t<label\n\t\t\t\t\t:class="{primary: useImapCredentials}"\n\t\t\t\t\tfor="sieve-credentials-imap">\n\t\t\t\t\t{{ t(\'mail\', \'IMAP Credentials\') }}\n\t\t\t\t</label>\n\t\t\t\t<input\n\t\t\t\t\tid="sieve-credentials-custom"\n\t\t\t\t\tv-model="useImapCredentials"\n\t\t\t\t\ttype="radio"\n\t\t\t\t\tclass="radio"\n\t\t\t\t\t:value="false">\n\t\t\t\t<label\n\t\t\t\t\t:class="{primary: !useImapCredentials}"\n\t\t\t\t\tfor="sieve-credentials-custom">\n\t\t\t\t\t{{ t(\'mail\', \'Custom\') }}\n\t\t\t\t</label>\n\t\t\t</p>\n\t\t\t<template v-if="!useImapCredentials">\n\t\t\t\t<label for="sieve-user">{{ t(\'mail\', \'Sieve User\') }}</label>\n\t\t\t\t<input\n\t\t\t\t\tid="sieve-user"\n\t\t\t\t\tv-model="sieveConfig.sieveUser"\n\t\t\t\t\ttype="text"\n\t\t\t\t\trequired>\n\t\t\t\t<label for="sieve-password">{{\n\t\t\t\t\tt(\'mail\', \'Sieve Password\')\n\t\t\t\t}}</label>\n\t\t\t\t<input\n\t\t\t\t\tid="sieve-password"\n\t\t\t\t\tv-model="sieveConfig.sievePassword"\n\t\t\t\t\ttype="password"\n\t\t\t\t\trequired>\n\t\t\t</template>\n\t\t</template>\n\t\t<slot name="feedback" />\n\t\t<p v-if="errorMessage">\n\t\t\t{{ t(\'mail\', \'Oh Snap!\') }}\n\t\t\t{{ errorMessage }}\n\t\t</p>\n\t\t<input type="submit"\n\t\t\tclass="primary"\n\t\t\t:disabled="loading"\n\t\t\t:value="submitButtonText"\n\t\t\t@click.prevent="onSubmit">\n\t</form>\n</template>\n\n<script>\nexport default {\n\tname: \'SieveAccountForm\',\n\tprops: {\n\t\taccount: {\n\t\t\ttype: Object,\n\t\t\trequired: true,\n\t\t},\n\t},\n\tdata() {\n\t\treturn {\n\t\t\tsieveConfig: {\n\t\t\t\tsieveEnabled: this.account.sieveEnabled,\n\t\t\t\tsieveHost: this.account.sieveHost || this.account.imapHost,\n\t\t\t\tsievePort: this.account.sievePort || 4190,\n\t\t\t\tsieveUser: this.account.sieveUser || \'\',\n\t\t\t\tsievePassword: \'\',\n\t\t\t\tsieveSslMode: this.account.sieveSslMode || \'tls\',\n\t\t\t},\n\t\t\tloading: false,\n\t\t\tuseImapCredentials: !this.account.sieveUser,\n\t\t\terrorMessage: \'\',\n\t\t\tsubmitButtonText: t(\'mail\', \'Save sieve settings\'),\n\t\t}\n\t},\n\tmethods: {\n\t\tasync onSubmit() {\n\t\t\tthis.loading = true\n\t\t\tthis.errorMessage = \'\'\n\n\t\t\t// empty user and password => use imap credentials\n\t\t\tif (this.sieveConfig.sieveUser === \'\' && this.sieveConfig.sievePassword === \'\') {\n\t\t\t\tthis.useImapCredentials = true\n\t\t\t}\n\n\t\t\t// clear user and password if imap credentials are used\n\t\t\tif (this.useImapCredentials) {\n\t\t\t\tthis.sieveConfig.sieveUser = \'\'\n\t\t\t\tthis.sieveConfig.sievePassword = \'\'\n\t\t\t}\n\n\t\t\ttry {\n\t\t\t\tawait this.$store.dispatch(\'updateSieveAccount\', {\n\t\t\t\t\taccount: this.account,\n\t\t\t\t\tdata: this.sieveConfig,\n\t\t\t\t})\n\t\t\t} catch (error) {\n\t\t\t\tthis.errorMessage = error.message\n\t\t\t}\n\n\t\t\tthis.loading = false\n\t\t},\n\t},\n}\n<\/script>\n\n<style scoped>\nform {\n\twidth: 250px\n}\n\nlabel {\n\tdisplay: inline-block;\n}\n\ninput {\n\twidth: 100%;\n}\n\n.flex-row {\n\tdisplay: flex;\n}\n\nlabel.button {\n\ttext-align: center;\n\tflex-grow: 1;\n}\n\nlabel.error {\n\tcolor: red;\n}\n\ninput[type=\'radio\'] {\n\tdisplay: none;\n}\n</style>\n'],sourceRoot:""}]),n.a=s},1435:function(t,n,e){"use strict";var a=e(36),i=e.n(a),o=e(37),s=e.n(o)()(i.a);s.push([t.i,".section[data-v-568aaba6]{display:block;padding:0;margin-bottom:23px}textarea[data-v-568aaba6]{width:100%}.primary[data-v-568aaba6]{padding-left:26px;background-position:6px;color:var(--color-main-background)}.primary[data-v-568aaba6]:after{left:14px}","",{version:3,sources:["webpack://./src/components/SieveFilterForm.vue"],names:[],mappings:"AA6DA,0BACC,aAAA,CACA,SAAA,CACA,kBAAA,CAGD,0BACC,UAAA,CAGD,0BACC,iBAAA,CACA,uBAAA,CACA,kCAAA,CAEA,gCACE,SAAA",sourcesContent:["\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n.section {\n\tdisplay: block;\n\tpadding: 0;\n\tmargin-bottom: 23px;\n}\n\ntextarea {\n\twidth: 100%;\n}\n\n.primary {\n\tpadding-left: 26px;\n\tbackground-position: 6px;\n\tcolor: var(--color-main-background);\n\n\t&:after {\n\t\t left: 14px;\n\t }\n}\n"],sourceRoot:""}]),n.a=s},1436:function(t,n,e){"use strict";var a=e(36),i=e.n(a),o=e(37),s=e.n(o)()(i.a);s.push([t.i,".alias-item[data-v-13a5c8ff]{display:flex;justify-content:space-between}[data-v-13a5c8ff] .modal-container{display:block;overflow:scroll;transition:transform 300ms ease;border-radius:var(--border-radius-large);box-shadow:0 0 40px rgba(0,0,0,.2);padding:30px 70px 20px}.button.icon-rename[data-v-13a5c8ff]{background-image:var(--icon-rename-000);background-color:var(--color-main-background);border:none;opacity:.7}.button.icon-rename[data-v-13a5c8ff]:hover,.button.icon-rename[data-v-13a5c8ff]:focus{opacity:1}.settings-hint[data-v-13a5c8ff]{margin-top:-12px;margin-bottom:6px;color:var(--color-text-maxcontrast)}h2[data-v-13a5c8ff]{font-weight:bold;font-size:20px;margin-bottom:12px;margin-left:-30px;line-height:30px;color:var(--color-text-light)}.app-settings-section[data-v-13a5c8ff]{margin-bottom:45px}","",{version:3,sources:["webpack://./src/components/AccountSettings.vue"],names:[],mappings:"AAsLA,6BACC,YAAA,CACA,6BAAA,CAGD,mCACC,aAAA,CACA,eAAA,CACA,+BAAA,CACA,wCAAA,CACA,kCAAA,CACA,sBAAA,CAED,qCACC,uCAAA,CACA,6CAAA,CACA,WAAA,CACA,UAAA,CACA,sFAEC,SAAA,CAGF,gCACC,gBAAA,CACA,iBAAA,CACA,mCAAA,CAED,oBACC,gBAAA,CACA,cAAA,CACA,kBAAA,CACA,iBAAA,CACA,gBAAA,CACA,6BAAA,CAED,uCACA,kBAAA",sourcesContent:["\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n.alias-item {\n\tdisplay: flex;\n\tjustify-content: space-between;\n}\n\n::v-deep .modal-container {\n\tdisplay: block;\n\toverflow: scroll;\n\ttransition: transform 300ms ease;\n\tborder-radius: var(--border-radius-large);\n\tbox-shadow: 0 0 40px rgba(0,0,0,0.2);\n\tpadding: 30px 70px 20px;\n}\n.button.icon-rename {\n\tbackground-image: var(--icon-rename-000);\n\tbackground-color: var(--color-main-background);\n\tborder: none;\n\topacity: 0.7;\n\t&:hover,\n\t&:focus {\n\t\topacity: 1;\n\t}\n}\n.settings-hint {\n\tmargin-top: -12px;\n\tmargin-bottom: 6px;\n\tcolor: var(--color-text-maxcontrast);\n}\nh2 {\n\tfont-weight: bold;\n\tfont-size: 20px;\n\tmargin-bottom: 12px;\n\tmargin-left: -30px;\n\tline-height: 30px;\n\tcolor: var(--color-text-light);\n}\n.app-settings-section {\nmargin-bottom: 45px;\n}\n"],sourceRoot:""}]),n.a=s},1437:function(t,n,e){"use strict";var a=e(36),i=e.n(a),o=e(37),s=e.n(o)()(i.a);s.push([t.i,"[data-v-2d33cadc] .app-navigation-entry__title{color:var(--color-text-maxcontrast)}","",{version:3,sources:["webpack://./src/components/NavigationAccountExpandCollapse.vue"],names:[],mappings:"AA2EA,+CACC,mCAAA",sourcesContent:["\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n::v-deep .app-navigation-entry__title {\n\tcolor: var(--color-text-maxcontrast);\n}\n"],sourceRoot:""}]),n.a=s},1439:function(t,n,e){"use strict";var a=e(36),i=e.n(a),o=e(37),s=e.n(o)()(i.a);s.push([t.i,"[data-v-17460ac4] .modal-wrapper .modal-container{display:block;overflow:scroll;transition:transform 300ms ease;border-radius:var(--border-radius-large);box-shadow:0 0 40px rgba(0,0,0,.2);padding:30px 40px 20px}dt[data-v-17460ac4]{width:auto;text-align:left}","",{version:3,sources:["webpack://./src/views/KeyboardShortcuts.vue"],names:[],mappings:"AAgEA,kDACC,aAAA,CACA,eAAA,CACA,+BAAA,CACA,wCAAA,CACA,kCAAA,CACA,sBAAA,CAED,oBACC,UAAA,CACA,eAAA",sourcesContent:["\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n::v-deep .modal-wrapper .modal-container {\n\tdisplay: block;\n\toverflow: scroll;\n\ttransition: transform 300ms ease;\n\tborder-radius: var(--border-radius-large);\n\tbox-shadow: 0 0 40px rgba(0,0,0,0.2);\n\tpadding: 30px 40px 20px;\n}\ndt {\n\twidth: auto;\n\ttext-align: left;\n}\n\n"],sourceRoot:""}]),n.a=s},1440:function(t,n,e){"use strict";var a=e(36),i=e.n(a),o=e(37),s=e.n(o)()(i.a);s.push([t.i,"\np.app-settings span.icon-loading-small[data-v-350e690d] {\n\tdisplay: inline-block;\n\tvertical-align: middle;\n\tpadding: 5px 0;\n}\np.app-settings[data-v-350e690d] {\n\tpadding: 10px 0;\n}\n.app-settings-button[data-v-350e690d] {\n\tdisplay: block;\n\n\tpadding-left: 34px;\n\tbackground-position: 10px center;\n\ttext-align: left;\n}\n.app-settings-button.button.primary.new-button[data-v-350e690d] {\n\tcolor: var(--color-main-background);\n}\n.app-settings-link[data-v-350e690d] {\n\ttext-decoration: underline;\n}\n","",{version:3,sources:["webpack://./src/components/AppSettingsMenu.vue"],names:[],mappings:";AAkNA;CACA,qBAAA;CACA,sBAAA;CACA,cAAA;AACA;AACA;CACA,eAAA;AACA;AACA;CACA,cAAA;;CAEA,kBAAA;CACA,gCAAA;CACA,gBAAA;AACA;AACA;CACA,mCAAA;AACA;AACA;CACA,0BAAA;AACA",sourcesContent:["<template>\n\t<div>\n\t\t<router-link to=\"/setup\" class=\"icon-add-white app-settings-button button primary new-button\">\n\t\t\t{{ t('mail', 'Add mail account') }}\n\t\t</router-link>\n\n\t\t<p v-if=\"loadingOptOutSettings\" class=\"app-settings\">\n\t\t\t<span class=\"icon-loading-small\" />\n\t\t\t{{ optOutSettingsText }}\n\t\t</p>\n\t\t<p v-else class=\"app-settings\">\n\t\t\t<input\n\t\t\t\tid=\"data-collection-toggle\"\n\t\t\t\tclass=\"checkbox\"\n\t\t\t\ttype=\"checkbox\"\n\t\t\t\t:checked=\"useDataCollection\"\n\t\t\t\t@change=\"onToggleCollectData\">\n\t\t\t<label for=\"data-collection-toggle\">{{ optOutSettingsText }}</label>\n\t\t</p>\n\n\t\t<p v-if=\"toggleAutoTagging\" class=\"app-settings\">\n\t\t\t<span class=\"icon-loading-small\" />\n\t\t\t{{ autoTaggingText }}\n\t\t</p>\n\t\t<p v-else class=\"app-settings\">\n\t\t\t<input\n\t\t\t\tid=\"auto-tagging-toggle\"\n\t\t\t\tclass=\"checkbox\"\n\t\t\t\ttype=\"checkbox\"\n\t\t\t\t:checked=\"useAutoTagging\"\n\t\t\t\t@change=\"onToggleAutoTagging\">\n\t\t\t<label for=\"auto-tagging-toggle\">{{ autoTaggingText }}</label>\n\t\t</p>\n\n\t\t<p v-if=\"loadingAvatarSettings\" class=\"app-settings avatar-settings\">\n\t\t\t<span class=\"icon-loading-small\" />\n\t\t\t{{ t('mail', 'Use Gravatar and favicon avatars') }}\n\t\t</p>\n\t\t<p v-else class=\"app-settings\">\n\t\t\t<input\n\t\t\t\tid=\"gravatar-enabled\"\n\t\t\t\tclass=\"checkbox\"\n\t\t\t\ttype=\"checkbox\"\n\t\t\t\t:checked=\"useExternalAvatars\"\n\t\t\t\t@change=\"onToggleExternalAvatars\">\n\t\t\t<label for=\"gravatar-enabled\">{{ t('mail', 'Use Gravatar and favicon avatars') }}</label>\n\t\t</p>\n\n\t\t<p v-if=\"loadingReplySettings\" class=\"app-settings reply-settings\">\n\t\t\t<span class=\"icon-loading-small\" />\n\t\t\t{{ replySettingsText }}\n\t\t</p>\n\t\t<p v-else class=\"app-settings\">\n\t\t\t<input\n\t\t\t\tid=\"bottom-reply-enabled\"\n\t\t\t\tclass=\"checkbox\"\n\t\t\t\ttype=\"checkbox\"\n\t\t\t\t:checked=\"useBottomReplies\"\n\t\t\t\t@change=\"onToggleButtonReplies\">\n\t\t\t<label for=\"bottom-reply-enabled\">{{ replySettingsText }}</label>\n\t\t</p>\n\n\t\t<p>\n\t\t\t<button class=\"icon-mail app-settings-button\" @click=\"registerProtocolHandler\">\n\t\t\t\t{{ t('mail', 'Register as application for mail links') }}\n\t\t\t</button>\n\t\t</p>\n\n\t\t<button\n\t\t\tclass=\"icon-details app-settings-button\"\n\t\t\t@click.prevent.stop=\"showKeyboardShortcuts\"\n\t\t\t@shortkey=\"toggleKeyboardShortcuts\">\n\t\t\t{{ t('mail', 'Show keyboard shortcuts') }}\n\t\t</button>\n\t\t<KeyboardShortcuts v-if=\"displayKeyboardShortcuts\" @close=\"closeKeyboardShortcuts\" />\n\t</div>\n</template>\n\n<script>\nimport { generateUrl } from '@nextcloud/router'\nimport { showError } from '@nextcloud/dialogs'\n\nimport Logger from '../logger'\nimport KeyboardShortcuts from '../views/KeyboardShortcuts'\n\nexport default {\n\tname: 'AppSettingsMenu',\n\tcomponents: {\n\t\tKeyboardShortcuts,\n\t},\n\tdata() {\n\t\treturn {\n\t\t\tloadingAvatarSettings: false,\n\t\t\t// eslint-disable-next-line\n\t\t\toptOutSettingsText: t('mail', 'Allow the app to collect data about your interactions. Based on this data, the app will adapt to your preferences. The data will only be stored locally.'),\n\t\t\tloadingOptOutSettings: false,\n\t\t\t// eslint-disable-next-line\n\t\t\treplySettingsText: t('mail', 'Put my text to the bottom of a reply instead of on top of it.'),\n\t\t\tloadingReplySettings: false,\n\t\t\tdisplayKeyboardShortcuts: false,\n\t\t\t// eslint-disable-next-line\n\t\t\tautoTaggingText: t('mail', 'Automatically classify importance of new email'),\n\t\t\ttoggleAutoTagging: false,\n\t\t}\n\t},\n\tcomputed: {\n\t\tuseBottomReplies() {\n\t\t\treturn this.$store.getters.getPreference('reply-mode', 'top') === 'bottom'\n\t\t},\n\t\tuseExternalAvatars() {\n\t\t\treturn this.$store.getters.getPreference('external-avatars', 'true') === 'true'\n\t\t},\n\t\tuseDataCollection() {\n\t\t\treturn this.$store.getters.getPreference('collect-data', 'true') === 'true'\n\t\t},\n\t\tuseAutoTagging() {\n\t\t\treturn this.$store.getters.getPreference('tag-classified-messages', 'true') === 'true'\n\t\t},\n\t},\n\tmethods: {\n\t\tonToggleButtonReplies(e) {\n\t\t\tthis.loadingReplySettings = true\n\n\t\t\tthis.$store\n\t\t\t\t.dispatch('savePreference', {\n\t\t\t\t\tkey: 'reply-mode',\n\t\t\t\t\tvalue: e.target.checked ? 'bottom' : 'top',\n\t\t\t\t})\n\t\t\t\t.catch((error) => Logger.error('could not save preferences', { error }))\n\t\t\t\t.then(() => {\n\t\t\t\t\tthis.loadingReplySettings = false\n\t\t\t\t})\n\t\t},\n\t\tonToggleExternalAvatars(e) {\n\t\t\tthis.loadingAvatarSettings = true\n\n\t\t\tthis.$store\n\t\t\t\t.dispatch('savePreference', {\n\t\t\t\t\tkey: 'external-avatars',\n\t\t\t\t\tvalue: e.target.checked ? 'true' : 'false',\n\t\t\t\t})\n\t\t\t\t.catch((error) => Logger.error('could not save preferences', { error }))\n\t\t\t\t.then(() => {\n\t\t\t\t\tthis.loadingAvatarSettings = false\n\t\t\t\t})\n\t\t},\n\t\tonToggleCollectData(e) {\n\t\t\tthis.loadingOptOutSettings = true\n\n\t\t\tthis.$store\n\t\t\t\t.dispatch('savePreference', {\n\t\t\t\t\tkey: 'collect-data',\n\t\t\t\t\tvalue: e.target.checked ? 'true' : 'false',\n\t\t\t\t})\n\t\t\t\t.catch((error) => Logger.error('could not save preferences', { error }))\n\t\t\t\t.then(() => {\n\t\t\t\t\tthis.loadingOptOutSettings = false\n\t\t\t\t})\n\t\t},\n\t\tasync onToggleAutoTagging(e) {\n\t\t\tthis.toggleAutoTagging = true\n\n\t\t\ttry {\n\t\t\t\tawait this.$store\n\t\t\t\t\t.dispatch('savePreference', {\n\t\t\t\t\t\tkey: 'tag-classified-messages',\n\t\t\t\t\t\tvalue: e.target.checked ? 'true' : 'false',\n\t\t\t\t\t})\n\t\t\t} catch (error) {\n\t\t\t\tLogger.error('could not save preferences', { error })\n\n\t\t\t\tshowError(t('mail', 'Could not update preference'))\n\t\t\t} finally {\n\t\t\t\tthis.toggleAutoTagging = false\n\t\t\t}\n\t\t},\n\t\tregisterProtocolHandler() {\n\t\t\tif (window.navigator.registerProtocolHandler) {\n\t\t\t\tconst url\n\t\t\t\t\t= window.location.protocol + '//' + window.location.host + generateUrl('apps/mail/compose?uri=%s')\n\t\t\t\ttry {\n\t\t\t\t\twindow.navigator.registerProtocolHandler('mailto', url, OC.theme.name + ' Mail')\n\t\t\t\t} catch (err) {\n\t\t\t\t\tLogger.error('could not register protocol handler', { err })\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t/**\n\t\t * Show the keyboard shortcuts overview\n\t\t */\n\t\tshowKeyboardShortcuts() {\n\t\t\tthis.displayKeyboardShortcuts = true\n\t\t},\n\t\t/**\n\t\t * Hide the keyboard shortcuts overview\n\t\t */\n\t\tcloseKeyboardShortcuts() {\n\t\t\tthis.displayKeyboardShortcuts = false\n\t\t},\n\t\t/**\n\t\t * Toggles the keyboard shortcuts overview\n\t\t */\n\t\ttoggleKeyboardShortcuts() {\n\t\t\tthis.displayKeyboardShortcuts = !this.displayKeyboardShortcuts\n\t\t},\n\t},\n}\n<\/script>\n\n<style scoped>\np.app-settings span.icon-loading-small {\n\tdisplay: inline-block;\n\tvertical-align: middle;\n\tpadding: 5px 0;\n}\np.app-settings {\n\tpadding: 10px 0;\n}\n.app-settings-button {\n\tdisplay: block;\n\n\tpadding-left: 34px;\n\tbackground-position: 10px center;\n\ttext-align: left;\n}\n.app-settings-button.button.primary.new-button {\n\tcolor: var(--color-main-background);\n}\n.app-settings-link {\n\ttext-decoration: underline;\n}\n</style>\n"],sourceRoot:""}]),n.a=s},1441:function(t,n,e){"use strict";var a=e(36),i=e.n(a),o=e(37),s=e.n(o)()(i.a);s.push([t.i,".button[data-v-72a80ec2]{width:44px;height:44px;background-color:var(--color-main-background);border:none;display:inline-block;position:absolute;margin-left:254px;margin-top:13px;opacity:.7}.button[data-v-72a80ec2]:hover,.button[data-v-72a80ec2]:focus{opacity:1;background-color:var(--color-background-hover)}.button[data-v-72a80ec2]:disabled{cursor:not-allowed;opacity:.5;animation:rotation-data-v-72a80ec2 2s linear}[data-v-72a80ec2] .app-navigation-new button{width:240px !important;height:44px}@keyframes rotation-data-v-72a80ec2{from{transform:rotate(0deg)}to{transform:rotate(-360deg)}}.app-navigation-spacer[data-v-72a80ec2]{order:0 !important}","",{version:3,sources:["webpack://./src/components/Navigation.vue"],names:[],mappings:"AA2MA,yBACC,UAAA,CACA,WAAA,CACA,6CAAA,CACA,WAAA,CACA,oBAAA,CACA,iBAAA,CACA,iBAAA,CACA,eAAA,CACA,UAAA,CACA,8DAEC,SAAA,CACA,8CAAA,CAED,kCACC,kBAAA,CACA,UAAA,CACA,4CAAA,CAGF,6CACC,sBAAA,CACA,WAAA,CAED,oCACA,KACC,sBAAA,CAED,GACE,yBAAA,CAAA,CAGF,wCACC,kBAAA",sourcesContent:["\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n.button {\n\twidth: 44px;\n\theight: 44px;\n\tbackground-color: var(--color-main-background);\n\tborder: none;\n\tdisplay: inline-block;\n\tposition: absolute;\n\tmargin-left: 254px;\n\tmargin-top: 13px;\n\topacity: .7;\n\t&:hover,\n\t&:focus {\n\t\topacity: 1;\n\t\tbackground-color:var(--color-background-hover);\n\t}\n\t&:disabled {\n\t\tcursor: not-allowed;\n\t\topacity: .5;\n\t\tanimation: rotation 2s linear;\n\t}\n}\n::v-deep .app-navigation-new button {\n\twidth: 240px !important;\n\theight: 44px;\n}\n@keyframes rotation {\nfrom {\n\ttransform: rotate(-0deg);\n}\nto {\n\t\ttransform: rotate(-360deg);\n\t}\n}\n.app-navigation-spacer {\n\torder: 0 !important;\n}\n"],sourceRoot:""}]),n.a=s},753:function(t,n,e){"use strict";e.d(n,"c",(function(){return c})),e.d(n,"b",(function(){return d})),e.d(n,"a",(function(){return u})),e.d(n,"e",(function(){return p})),e.d(n,"d",(function(){return g}));var a=e(1190),i=e.n(a),o=e(670),s=e(1191);
/**
 * @copyright 2020 Christoph Wurst <christoph@winzerhof-wurst.at>
 *
 * @author 2020 Christoph Wurst <christoph@winzerhof-wurst.at>
 *
 * @license GNU AGPL version 3 or any later version
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as
 * published by the Free Software Foundation, either version 3 of the
 * License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
class r{constructor(t,n){this.format=t,this.value=n}append(t){if(this.format!==t.format)throw new Error("can't append two different formats");return new r(this.format,this.value+t.value)}}const l=Object(o.a)((t,n)=>new r(t,n)),c=l("plain"),d=l("html"),u=t=>i()(t)?t.includes(">")?d(t):c(t):c(""),m=Object(o.a)((t,n)=>n.format===t),p=(m("plain"),m("html"),t=>{if("plain"===t.format)return t;const n=t.value.replace(/<\/div>/gi,"</div><br>"),e=Object(s.fromString)(n,{noLinkBrackets:!0,ignoreHref:!0,ignoreImage:!0,wordwrap:!1,format:{blockquote:(t,n,e)=>n(t.children,e).replace(/\n\n\n/g,"\n\n").replace(/^/gm,"> "),paragraph:(t,n,e)=>n(t.children,e)+"\n"}});return c(e.replace(/\n\n\n/g,"\n\n").replace(/^[\n\r]+/g,"").replace(/ $/gm,"").replace(/^--$/gm,"-- "))}),g=t=>{if("html"===t.format)return t;if("plain"===t.format)return d(t.value.replace(/([^>\r\n]?)(\r\n|\n\r|\r|\n)/g,"$1<br>$2"));throw new Error("Unknown format ".concat(t.format))}},778:function(t,n,e){"use strict";const a=new(e(7).default);n.a=a},891:function(t,n,e){"use strict";e.d(n,"a",(function(){return r}));var a=e(510),i=e.n(a),o=e(892),s=e.n(o);
/**
 * @copyright 2018 Christoph Wurst <christoph@winzerhof-wurst.at>
 *
 * @author 2018 Christoph Wurst <christoph@winzerhof-wurst.at>
 *
 * @license GNU AGPL version 3 or any later version
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as
 * published by the Free Software Foundation, either version 3 of the
 * License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
const r=t=>{const n=i()(t),e=s.a.hex.hsl(n),a=[40*Math.round(e[0]/40),e[1],e[2]];return"#"+s.a.hsl.hex(a)}}}]);
//# sourceMappingURL=mail.1.275731847f2d40aa2590.js.map