From 9c61790c9979ca99e74930dc8f66af65f7c84821 Mon Sep 17 00:00:00 2001 From: Ilia Rostovtsev Date: Sun, 22 Dec 2019 17:41:54 +0300 Subject: [PATCH] Fix missing priority labels for new mail composer https://github.com/authentic-theme/authentic-theme/issues/431#issuecomment-568239172 --- extensions/mail/mail.min.js | 2 +- extensions/mail/mail.min.js.gz | Bin 19677 -> 19676 bytes extensions/mail/mail.src.js | 14 +++++++------- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/extensions/mail/mail.min.js b/extensions/mail/mail.min.js index 218cd8c62..f6da1745d 100644 --- a/extensions/mail/mail.min.js +++ b/extensions/mail/mail.min.js @@ -1 +1 @@ -'use strict';var _slicedToArray=function(){function sliceIterator(arr,i){var _arr=[];var _n=true;var _d=false;var _e=undefined;try{for(var _i=arr[Symbol.iterator](),_s;!(_n=(_s=_i.next()).done);_n=true){_arr.push(_s.value);if(i&&_arr.length===i)break;}}catch(err){_d=true;_e=err;}finally{try{if(!_n&&_i["return"])_i["return"]();}finally{if(_d)throw _e;}}return _arr;}return function(arr,i){if(Array.isArray(arr)){return arr;}else if(Symbol.iterator in Object(arr)){return sliceIterator(arr,i);}else{throw new TypeError("Invalid attempt to destructure non-iterable instance");}};}();var _typeof=typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"?function(obj){return typeof obj;}:function(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};function _defineProperty(obj,key,value){if(key in obj){Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true});}else{obj[key]=value;}return obj;}var mail=function(){var _={path:{origin:v___location_origin,prefix:v___location_prefix,extensions:v___server_extensions_path,css:v___server_css_path,js:v___server_js_path},variable:{switch:function _switch(){return $t_uri_webmail;},module:{name:function name(){return v___module;},link:function link(){var prefix=v___location_prefix;return prefix?prefix+'/'+v___module:'/'+this.name();}},locale:{short:config_portable_theme_locale_format_short}},platform:{mac:window.navigator.platform==='MacIntel'},content:get_pjax_content,load:load,sdata:get_server_data,mavailable:core.moduleAvailable,lang:theme_language,notification:plugins.messenger.post,file_chooser:plugins.chooser.file,button_progress:snippets.progressive_button,rows:page_table_rows_control,document_title:theme_title_generate,update_mdata:core.updateModuleData,uri_param:uri_parse_param,error:connection_error,navigation:{reset:plugins.navigation.reset},plugin:{json_to_query:Convert.json_to_query,serialized_to_json:Convert.serialized_to_json,nice_size:Convert.nice_size,html_escape:Convert.htmlEscape,timestamp:snippets.datetime.locale,offset_adjust:page.handle.content.offset,moment:moment,select:function select(data){var size=arguments.length>1&&arguments[1]!==undefined?arguments[1]:'34';if(Array.isArray(data)){data[0].select2(data[1]);return;}data.select2({minimumResultsForSearch:5,containerCssClass:'select2-content heighter-'+size,dropdownCssClass:'select2-content h'+size});data.next('.select2').addClass('select2-content-container');data.on('select2:open',function(){$('.select2-container').off('click.container').on('click.container',function(event){event.stopPropagation();});});},scroll:function scroll(target,options){if(typeof target==='string'){$(target).mCustomScrollbar(options);}else{$(target[0]).mCustomScrollbar('scrollTo',target[1],{scrollOffset:[$(target[0]),3,4]});}},arialabel:function arialabel(){var arialabel='aria-label';document.querySelectorAll('[data-tooltip="mailbox"]:not('+arialabel+')').forEach(function(t){return t.setAttribute(arialabel,t.getAttribute('data-title'));});},tooltip:function tooltip(target){var $target=target||$('[data-tooltip="mailbox"]');$target.tooltip({html:true,trigger:'hover',container:'body',sanitize:false,delay:{show:600,hide:30}});}}},$$={$:{layout:{container:'container-fluid',controls:'mail-controls',panel:'panel-mail panel-body',row:{controls:'row row-controls',messages:'row row-messages colorify',quota:'row row-quota',centered:'row text-center'},column:{3:'col-xs-3',4:'col-xs-4',6:'col-xs-6',8:'col-xs-8',9:'col-xs-9',12:'col-xs-12'},button:{link:'btn btn-link text-decoration-none',transparent:{plain:'btn btn-transparent',link:'btn btn-link btn-transparent'},default:'btn btn-default',primary:'btn btn-primary',block:{default:'btn btn-default btn-block',transparent:'btn btn-transparent btn-block'},dropdown:{default:'btn btn-default dropdown-toggle'}}},tree:{container:'data-mail-folders',active:'fancytree-active',loader:'fancytree-loader',title:'fancytree-title',bubble:'label label-danger'},controls:{compose:{button:'[data-compose]',icon:'fa-fw fa-plus'},select:{dropdown:'dropdown-select',checkbox:'[data-select] input',menus:'[data-select-mass]'},delete:'btn btn-default fa fa-trash',forward:'btn btn-default fa fa-forward',search:{link:'[data-href^="sort.cgi"]',clear:{link:'search-clear text-danger',icon:'fa-fw fa-times-circle-o'},dropdown:'dropdown-search',icon:'fa-search',data:{form:{action:'data-form-action',type:'data-form-action-type',advanced:'data-form-action-advanced'}},button:{type:'[data-toggle-type="1"]'},caret:{down:'fa-caret-down',up:'fa-caret-up'},submit:'[data-search-submit]'},move:{dropdown:'dropdown-move',checkbox:'[data-copy-only]',icon:'fa-folder-move',submit:'[data-transfer-submit]'},more:{dropdown:'dropdown-more',icon:'fa-dots-vertical',menu:{read:'[data-form-action="markas1"]',unread:'[data-form-action="markas0"]',special:'[data-form-action="markas2"]',spam:'[data-form-action="razor"]',ham:'[data-form-action="ham"]',black:'[data-form-action="black"]',white:'[data-form-action="white"]'}},sort:{dropdown:'dropdown-sort',icon:'fa-fw fa-sort'},counter:'mail-selected-count',refresh:{button:'btn btn-transparent-link btn-lg btn-transparent fa fa-refresh',animation:'fa-spin-gradual'},pagination:'pagination-title',settings:'btn btn-default fa fa-cog'},messages:{checkbox:'input[data-check]',flag:'mail-list-trow-flag-security',special:{star:'star',starred:'fa-star star',unstarred:'fa-star-o star'},row:{empty:'fa fa-fw fa-1_50x fa-inbox'}},compose:{button:{inverse:'btn-inverse',submit:'btn-primary',schedule:'btn-info'},hidden:'hidden',panel:{content:'jsPanel-content',container:'jspCompose',container_shown:'jspShown',backdrop:'compose_backdrop'},editor:{compose:'ql-compose',composer:'data-composer',scheduled:'scheduled',content:'ql-editor',toolbar:'ql-toolbar',disabled:'ql-disabled',tb_bold:'ql-bold',tb_link:'ql-link',tb_image:'ql-image',controls:{compose:'compose-controls',more:'more-options',extra:{attach:'e-attachment',link:'e-ql-link',image:'e-ql-image',html:'e-html',discard:'e-discard'}}},form:{header:'form-head',recipients:{control:'recipients-control',fields:'recipients-control-fields'},name:{tattach:'tattachments',scheduled:'scheduled'}},icons:{upload:{server:'fa fa-fw fa-download-cloud',attach:'fa2 fa2-attach'}}},notification:{danger:'exclamation-triangle',error:'exclamation-circle',success:'check-circle',type:{search:'search',scheduled:'clock',trash:'- fa2 fa2-trash'}},class:{events_none:'pointer-events-none'},template:{compose:function compose(data){var hidden=' class="'+data.class.hidden+'"',empty=String(),status={server_file:empty,abook:empty,crypt:empty,sign:empty,dsn:empty,del:empty,menu:{server_file:empty,encrypt:empty,options:empty}},value={server_file:data.toggle.more.server_file,crypt:data.toggle.more.crypt[0],sign:data.toggle.more.sign[0],abook:data.toggle.more.abook,dsn:data.toggle.more.dsn,del:data.toggle.more.del};value.server_file===null&&(status.server_file=hidden);if(value.server_file===null){status.menu.server_file=hidden;}value.crypt===null&&(status.crypt=hidden);value.sign===null&&(status.sign=hidden);if(value.crypt===null&&value.sign===null){status.menu.encrypt=hidden;}value.abook===null&&(status.abook=hidden);value.dsn===null&&(status.dsn=hidden);value.del===null&&(status.del=hidden);if(value.abook===null&&value.dsn===null&&value.del===null){status.menu.options=hidden;}return'\n
\n
\n
\n
\n
\n
\n \n
\n
\n \n \n \n \n '+data.from+'\n
\n
\n
\n
\n
\n
\n \n
\n
\n '+data.to+'\n
\n
\n
\n
\n
\n
\n
\n \n
\n
\n '+data.cc+'\n
\n
\n
\n
\n
\n
\n \n
\n
\n '+data.bcc+'\n
\n
\n
\n
\n
\n
\n
\n \n
\n
\n '+data.subject+'\n
\n
\n
\n
\n \n
\n
\n
\n
\n \n
'+data.body+'
\n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n
\n
\n \n \n \n \n \n \n \n
\n
\n \n \n
\n
\n \n \n \n \n \n \n '+data.language._options+'\n \n \n \n \n \n
\n \n \n
\n ';}}},create:{$:function $(classes,data){var type=arguments.length>2&&arguments[2]!==undefined?arguments[2]:'div';var content=arguments.length>3&&arguments[3]!==undefined?arguments[3]:String();var tooltip=arguments.length>4&&arguments[4]!==undefined?arguments[4]:String();var attributes=this._attributes(data);classes=this._classes(classes);if(tooltip){tooltip='data-tooltip="mailbox" data-placement="bottom" data-title="'+tooltip+'"';}return'<'+type+' '+attributes+' '+tooltip+' class="'+classes+'">'+content+'';},icon:function icon(classes){var attributes=arguments.length>1&&arguments[1]!==undefined?arguments[1]:String();var attribute=this._attributes(attributes),icon=this._classes(classes);return'';},button:function button(classes,data,content,icon,tooltip){icon=this._classes(icon);return this.$(classes,data,'button',(icon?'  ':'')+content+'',tooltip);},input:function input(){var name=arguments.length>0&&arguments[0]!==undefined?arguments[0]:String();var placeholder=arguments.length>1&&arguments[1]!==undefined?arguments[1]:String();var value=arguments.length>2&&arguments[2]!==undefined?arguments[2]:String();var type=arguments.length>3&&arguments[3]!==undefined?arguments[3]:'text';var attributes=arguments.length>4&&arguments[4]!==undefined?arguments[4]:String();var attribute=this._attributes(attributes),id=name;if((typeof name==='undefined'?'undefined':_typeof(name))==='object'){id=name[1];name=name[0];}return'';},textarea:function textarea(){var name=arguments.length>0&&arguments[0]!==undefined?arguments[0]:String();var placeholder=arguments.length>1&&arguments[1]!==undefined?arguments[1]:String();var value=arguments.length>2&&arguments[2]!==undefined?arguments[2]:String();var attributes=arguments.length>3&&arguments[3]!==undefined?arguments[3]:String();var attribute=this._attributes(attributes),id=name;if((typeof name==='undefined'?'undefined':_typeof(name))==='object'){id=name[1];name=name[0];}return'';},label:function label(){var target=arguments.length>0&&arguments[0]!==undefined?arguments[0]:String();var content=arguments.length>1&&arguments[1]!==undefined?arguments[1]:String();var attributes=arguments.length>2&&arguments[2]!==undefined?arguments[2]:String();var attribute=this._attributes(attributes);return'';},select:function select(data){var attributes=arguments.length>1&&arguments[1]!==undefined?arguments[1]:String();var name=arguments.length>2&&arguments[2]!==undefined?arguments[2]:String();var attribute=this._attributes(attributes),select='';return select;},checkbox:function checkbox(){var attributes=arguments.length>0&&arguments[0]!==undefined?arguments[0]:String();var name=arguments.length>1&&arguments[1]!==undefined?arguments[1]:String();var value=arguments.length>2&&arguments[2]!==undefined?arguments[2]:String();var label=arguments.length>3&&arguments[3]!==undefined?arguments[3]:' ';var checked=arguments.length>4&&arguments[4]!==undefined?arguments[4]:String();var attribute=this._attributes(attributes),checkbox=String(),id=name+'-'+Math.floor(Math.random()*9e10);!label&&(label=' ');checked&&(checked='checked');checkbox+='';checkbox+='';checkbox+='';checkbox+='';return checkbox;},radio:function radio(){var attributes=arguments.length>0&&arguments[0]!==undefined?arguments[0]:String();var name=arguments.length>1&&arguments[1]!==undefined?arguments[1]:String();var value=arguments.length>2&&arguments[2]!==undefined?arguments[2]:String();var label=arguments.length>3&&arguments[3]!==undefined?arguments[3]:' ';var id=arguments.length>4&&arguments[4]!==undefined?arguments[4]:String();var checked=arguments.length>5&&arguments[5]!==undefined?arguments[5]:String();var attribute=this._attributes(attributes),checkbox=String();checkbox+='';checkbox+='';checkbox+='';checkbox+='';return checkbox;},dropdown:function dropdown(classes,data,button,icon,tooltip){var dropdown=String();classes=this._classes(classes);dropdown+='
';if(button){if(/<[a-z][\s\S]*>/i.test(button)){dropdown+=this.$('layout.button.default',false,'span',button);}else{dropdown+=this.button('layout.button.default',false,button);}}dropdown+=this.button('layout.button.dropdown.default',{'toggle':'dropdown'},'',false,tooltip);dropdown+='';dropdown+='
';return data[0].length?dropdown:String();},_attributes:function _attributes(data){var attributes=String();if(Array.isArray(data)){attributes=data.join(' ');}else if(data){attributes=Object.entries(data).map(function(_ref5){var _ref6=_slicedToArray(_ref5,2),k=_ref6[0],v=_ref6[1];return attributes+=(k.startsWith('data-')?k:'data-'+k)+'='+v+' ';}).slice(-1)[0];}return attributes;},_classes:function _classes(classes){return classes?classes.split('.').reduce(function(a,b){return a?a[b]:undefined;},$$.$):String();}},selector:function selector(_selector){_selector=this.create._classes(_selector);return _selector.startsWith('[')?_selector:"."+_selector.replace(/\s+/g,".");},element:function element(_element){return _element?$(this.selector(_element)):String();}};var compose=function(){var xtarget={};xtarget.send='send_mail.cgi';xtarget.reply='reply_mail.cgi';_.load.bundle(['jquery.jspanel','quill'],1);var message=function message(){var form=arguments.length>0&&arguments[0]!==undefined?arguments[0]:false;var inline=arguments.length>1&&arguments[1]!==undefined?arguments[1]:false;var types=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};var path=_.path.prefix,cmodule=_.variable.module.name(),prefix=path+'/'+cmodule;xtarget.getSize=path+'/index.cgi/?xhr-get_size=1&xhr-get_size_nodir=1&xhr-get_size_path=';xtarget.delete=prefix+'/delete_mail.cgi?confirm=1&delete=1&noredirect=1';xtarget.schedule=path+'/schedule/save.cgi';if((typeof form==='undefined'?'undefined':_typeof(form))==='object'&&form.length){form=$(form).serialize()+'&reply=1';types.new=0;}else{form='new=1';types.new=1;}if(types.reply_all){form+='&rall=1';}else if(types.forward){form+='&forward=1';}fetch(prefix+'/'+xtarget.reply+'?'+form).then(function(rs){return rs.text();}).then(function(rs){var $form=$(rs).find('[action*="'+xtarget.send+'"]'),generate={timestamp:function timestamp(){return _.plugin.moment().valueOf()*1e2;},random:function random(){return Math.floor(Math.random()*9e14);}},id=generate.timestamp(),form_data_lost=$form.find(':checkbox:not(:checked)').attr('value','0').prop('checked',true).map(function(){return this.name;}).get(),form_data=$form.serialize();if(form_data){form_data=_.plugin.serialized_to_json(form_data);var data={visible:{},hidden:{}},classes=$$.$.compose,toggle={recipients:function recipients(id,data,data_visible){if((typeof data==='undefined'?'undefined':_typeof(data))==='object'){var target=data[0],state=data[1],rcs='.'+classes.form.recipients.control,rcsf='.'+classes.form.recipients.fields,rc=target.querySelector(rcs),rf=target.querySelector(rcsf);rc.querySelector('.'+id).classList.toggle(classes.button.inverse,!state);rf.querySelector('.'+id).classList.toggle(classes.hidden,state);return;}else if(data==='rc'){return!data_visible[id]?String():' '+classes.button.inverse;}else if(data==='rf'){return data_visible[id]?String():' '+classes.hidden;}},attachments:function attachments(panel){var a=panel.querySelector('[name="'+classes.form.name.tattach+'"]'),l=a.previousSibling.querySelectorAll('.tag').length;a.parentNode.parentNode.classList.toggle(classes.hidden,!l);adjust.contenteditable(panel);},backdrop:function backdrop(panel,show){var body=$('body'),re_zi=99999,compose_backdrop=classes.panel.backdrop;if(show){panel[0].dataset.zIndex=panel[0].style.zIndex;panel[0].style.zIndex=re_zi+1;panel[0].setAttribute('maximized',1);body.append('');}else{if(panel[0]){panel[0].style.zIndex=panel[0].dataset.zIndex;panel[0].removeAttribute('maximized');delete panel[0].dataset.zIndex;}body.find('.modal-backdrop.'+compose_backdrop).remove();}},formatting:function formatting(target,status){var es=classes.editor.composer,eb=target.querySelectorAll('['+es+'-h]'),ed=target.querySelectorAll('['+es+']');eb.forEach(function(b){b.classList.toggle(classes.hidden,!status);});ed.forEach(function(e){if(e.getAttribute(es)==='text'){e.classList.toggle(classes.hidden,status);}else{e.classList.toggle(classes.hidden,!status);}});adjust.contenteditable(target);}},adjust={contenteditable:function contenteditable(panel){var target=panel.querySelector('.'+classes.panel.content),container=target?target.offsetHeight:window.innerHeight/4,top_block=panel.querySelector('.'+classes.form.header).offsetHeight,editor_toolbar=panel.querySelector('.'+classes.editor.toolbar).offsetHeight,editor=panel.querySelector('['+classes.editor.composer+']:not(.'+classes.hidden+')'),offset=50+editor_toolbar,height=container-top_block-offset+'px';editor.style.height=height;},modifier:function modifier(str){return str.replace(/%cmd/,_.platform.mac?'Cmd':'Ctrl');}},check={field:function field(_field,object){var value=object[_field];if(value&&!isNaN(value)){value=~~value;}return typeof value==='undefined'?null:value;}},element={input:function input(str,data){var readonly=arguments.length>2&&arguments[2]!==undefined?arguments[2]:false;var no_escape=arguments.length>3&&arguments[3]!==undefined?arguments[3]:false;var type=arguments.length>4&&arguments[4]!==undefined?arguments[4]:'text';var value=(typeof data==='undefined'?'undefined':_typeof(data))==='object'?data[str]:data;if(readonly){readonly=['readonly'];}if(!no_escape){value=_.plugin.html_escape(value);}return $$.create.input([str,'c-'+str+'-'+id],String(),value,type,readonly);},select:{},type:{time:function time(){var ct=new Date(),format=function format(s){return('0'+s).substr(-2);},round=function round(m){var r=Math.ceil(m/10)*10;return r===60?r-5:r;},h=format(ct.getHours()),m=round(format(ct.getMinutes()));return'';},date:function date(){var ct=new Date(),y=ct.getFullYear(),m=ct.getMonth()+1,d=ct.getDate();return'';}},composer:function composer(target){var panel=target,paneled=panel.header?true:false,config={html:{allowed:parseInt(data.hidden.html_edit),initial:parseInt(data.hidden.html_edit_config)}},config_update=function config_update(option,value){_.update_mdata("/uconfig.cgi?mailbox","/uconfig_save.cgi",_defineProperty({},option,value));};target=target[0];var asb=target.querySelector('.'+classes.form.header),ccs=target.querySelectorAll('.'+classes.editor.controls.compose),rcs=target.querySelector('.'+classes.form.recipients.control),qtg=target.querySelector('.'+classes.editor.compose),tcm=target.querySelector('['+classes.editor.composer+'="text"]'),editor={this:new Quill(qtg,{modules:{formula:false,syntax:false,imageDrop:true,toolbar:target.querySelector('#tb-'+id)},bounds:target,theme:'snow'}),get:{text:function text(){return tcm.value;},html:function html(){return editor.this.root.innerHTML;},data:function data(){return config.html.allowed?editor.get.html():editor.get.text();}},convert:function convert(){var he=editor.this,te=he.root.parentElement.previousElementSibling;if(config.html.allowed){he.setText(te.value);}else{te.value=he.getText();}},maximized:function maximized(){return target.hasAttribute('maximized');}},title_update=function title_update(ds){var sf=asb.querySelector('[name="subject"]'),ud=function ud(){sf.dispatchEvent(new Event('input'));},us=function us(tg,df){if(paneled){tg.style.opacity=df?0.7:1;}},du=function du(tg){if(ds===1){tg.textContent=_.lang('mail_composer_draft_saving');us(tg,true);}else if(ds===-1){tg.textContent=_.lang('mail_composer_draft_saved');us(tg,true);setTimeout(function(){us(tg);ud();},2e3);}};if(paneled){var pt=panel.header.title[0],pti=pt.textContent;if(ds){du(pt,pti);}else{sf.addEventListener('input',function(){pt.textContent=this.value||pti;});ud();}}};paneled&&target.classList.add(classes.panel.container,classes.panel.container_shown);adjust.contenteditable(target);title_update();var ctl_tgl=ccs[0].querySelector('.'+classes.editor.controls.extra.html);ctl_tgl.addEventListener('click',function(){var st=parseInt(config.html.allowed)||0,ia=parseInt(config.html.initial)||0,sg=+!st,co=sg?2:ia===1?1:0;toggle.formatting(target,sg);config.html.allowed=sg;config_update('html_edit',co);editor.convert();});setTimeout(function(){var tb=editor.this.options.modules.toolbar.container,upload_list=[],server_list=[],priority=null,server_attach_previous=null,attachments=target.querySelector('[name="'+classes.form.name.tattach+'"]'),content=target.querySelector('.'+classes.editor.content),ctl_att=ccs[0].querySelector('.'+classes.editor.controls.extra.attach),ctl_lnk=ccs[0].querySelector('.'+classes.editor.controls.extra.link),ctl_img=ccs[0].querySelector('.'+classes.editor.controls.extra.image),ctl_dis=ccs[1].querySelector('.'+classes.editor.controls.extra.discard),submit=target.querySelector('button[type="submit"]'),$more_options=$(target).find('.'+classes.editor.controls.more),scheduled={target:target.querySelector('[name="'+classes.form.name.scheduled+'"]'),container:target.querySelector('.'+classes.editor.scheduled),events:function events(){this.container.addEventListener('click',function(event){event.stopPropagation();});this.checkbox().addEventListener('click',function(){var s=submit,t=s.querySelector('span').querySelector('span'),ct=_.lang('mail_composer_schedule'),c=this.checked,sb=classes.button.submit,sc=classes.button.schedule,d=s.nextElementSibling,st=language._send;s.classList.toggle(sc,c);s.classList.toggle(sb,!c);d.classList.toggle(sc,c);d.classList.toggle(sb,!c);t.textContent=c?ct:st;});this.datepicker();},status:function status(){return this.target.checked;},checkbox:function checkbox(){return this.container.querySelector('[type="checkbox"]');},holder:function holder(){return this.container.querySelector('[data-t]');},datepicker:function datepicker(){var tag=this.holder(),input=tag.previousSibling;tag.addEventListener('click',function(){$(input).datepicker('show');});$(input).datepicker({language:_.sdata("language"),todayHighlight:true,autoclose:true,startDate:"0d"}).on("changeDate",function(l){var today=_.lang('global_today').toLowerCase(),tomorrow=_.lang('global_tomorrow').toLowerCase(),label=today,now=new Date(),y=now.getFullYear(),m=now.getMonth()+1,d=now.getDate(),py=l.date.getFullYear(),pm=l.date.getMonth()+1,pd=l.date.getDate(),date=l.dates[0],date_=py+'-'+pm+'-'+pd,date_formatted=moment(date).format(_.variable.locale.short);this.dataset.value=date_;if(y===py&&m===pm&&(d===pd||d+1===pd)){if(d+1===pd){label=tomorrow;}}else{label=date_formatted;}tag.textContent=label;});}},draft={timeout:{update:null,discard:null},data:[],reset:function reset(){var folder=this.data[0];this.data=[];if(folder){this.data.push(folder);}},test:function test(){return this.data.length>=1;},save:function save(){this.terminate();this.timeout.update=setTimeout(function(){submit.dispatchEvent(new Event('click'));},2e3);},terminate:function terminate(){typeof this.timeout.update==='number'&&clearTimeout(this.timeout.update);},purge:function purge(id,folder,message){fetch(xtarget.delete+'&id='+id+'&folder='+folder+'&d='+message).then(function(r){r.text().then(function(){draft.refresh();});});},refresh:function refresh(){if(this.test()&&folders.check(this.data[0])){folders.refresh();}},clean:function clean(){this.test()&&this.purge(this.data[0],this.data[1],this.data[3]);this.reset();this.terminate();},control:{discard:function discard(){editor.maximized()&&panel.normalize();draft.timeout.discard=setTimeout(function(){draft.test()&&draft.purge(draft.data[0],draft.data[1],draft.data[3]);draft.reset();draft.terminate();paneled&&panel.close();},5e3);},undo:function undo(){target.classList.remove(classes.hidden);typeof draft.timeout.discard==='number'&&clearTimeout(draft.timeout.discard);}}},add_attachment=function add_attachment(type,id,filedata,size,update){var icon=type==='server'?classes.icons.upload.server:classes.icons.upload.attach,name=filedata.name.split("/").pop()||filedata.name;$(attachments).tagsinput('add','[i class="'+icon+'"][/i]'+name+' [em]('+_.plugin.nice_size(size)+')[/em]');var tags=attachments.previousSibling.querySelectorAll('.tag'),last=tags[tags.length-1];last.dataset.reference=id;if(type==='server'){server_list[id]=filedata.name;}else{upload_list[id]=filedata.file;}if(update){adjust.contenteditable(target);toggle.attachments(target);}};ctl_lnk.addEventListener('click',function(){tb.querySelector('.'+classes.editor.tb_link).dispatchEvent(new Event('click'));});ctl_img.addEventListener('click',function(){tb.querySelector('.'+classes.editor.tb_image).dispatchEvent(new Event('click'));});ctl_dis.addEventListener('click',function(){draft.control.discard();var undo={cancel:{label:_.lang('global_undo'),action:function action(){this.hide();draft.control.undo();}}};_.notification([$$.$.notification.type.trash,_.lang('mail_composer_discarded_draft')],5,"warning",'discard-'+id,1,['bottom','center'],undo);target.classList.add(classes.hidden);});rcs.querySelectorAll('button').forEach(function(b){b.addEventListener('click',function(){var enabled=b.classList.contains(classes.button.inverse),type=b.classList.contains("bcc")?'bcc':'cc';toggle.recipients(type,[target,enabled]);adjust.contenteditable(target);});});ctl_att.addEventListener('click',function(){var form=target.querySelector('form'),xu=document.createElement('input');xu.type="file";xu.setAttribute('multiple',1);xu.classList.add(classes.hidden);xu=form.appendChild(xu);xu.click();xu.addEventListener('change',function(){Array.from(this.files).forEach(function(file,i,arr){var fuid=generate.random()+i,size=file.size,name=file.name,last=i===arr.length-1;add_attachment('upload',fuid,{name:name,file:file},size,last);last&&xu.remove();});});});$more_options.find('.dropdown-menu').on("click.bs.dropdown",function(event){var type=this.dataset.type,etarget=event.target,action=etarget.dataset.value;if(action==='server-attach'){var error={read:_.lang('mail_composer_server_attach_error_read'),dir:_.lang('mail_composer_server_attach_error_dir')};_.file_chooser({file:server_attach_previous}).then(function(file){if(file){var suid=generate.random();fetch(xtarget.getSize+file).then(function(r){r.text().then(function(rs){var s=rs.split('|'),size=s[1].replace(/\s+/g,String());if(size==-1||size==-2){var _message=size==-1?error.read:error.dir;_.notification([$$.$.notification.danger,_message],10,"error",0,1,['bottom','center']);}else{add_attachment('server',suid,{name:file},size,true);}});});}server_attach_previous=file;});return;}event.stopPropagation();if(type==='priority'){var _check=etarget.closest('ul').querySelector('i');_check.remove();etarget.appendChild(_check);priority=action?~~action:null;}if(type==='options'){var cb=etarget.querySelector('input[type="checkbox"]');cb&&(cb.checked^=1);}});$(attachments).tagsinput({allowDuplicates:true,confirmKeys:[13],delimiter:'\\000'});$(attachments).on('itemRemoved',function(event){var item=event.item[1];if(item){delete upload_list[item];delete server_list[item];}toggle.attachments(target);});_.plugin.tooltip($(ctl_att).add(ctl_img).add(ctl_att).add(ctl_lnk).add(ctl_tgl).add(ctl_dis));var editor_controls=['font','size','bold','italic','underline','color','background','align',{'list':'ordered'},{'list':'bullet'},'strike','blockquote','code-block','link','clean'];editor_controls.forEach(function(v){var button=void 0,key=void 0,value=void 0,language='editor_tb';if((typeof v==='undefined'?'undefined':_typeof(v))==='object'){key=Object.keys(v)[0];value=key+'[value="'+v[key]+'"]';language+='_'+key+'_'+v[key];}else{value=v;language+='_'+v;}button=tb.querySelector('.ql-'+value);button.dataset.title=adjust.modifier(_.lang(language));_.plugin.tooltip($(button));});asb.addEventListener('input',function(){draft.save();});asb.querySelectorAll('input').forEach(function(input){input.addEventListener('keydown',function(event){if(event.keyCode===13){event.preventDefault();return;}draft.save();});});editor.this.on('text-change',function(){draft.save();});tcm.addEventListener('input',function(){draft.save();});scheduled.events();submit.addEventListener('click',function(event){var _this=this;event.preventDefault();var form=this.closest('form'),form_data=new FormData(form),trusted=event.isTrusted||~~submit.dataset.isTrusted,draft_status=!trusted;this.dataset.isTrusted=0;if(trusted){draft.terminate();}form_data.append('body',editor.get.data());var pri_key='pri';priority?form_data.set(pri_key,priority):form_data.delete(pri_key);Object.entries(data.hidden).forEach(function(e){var key=e[0],value=e[1];if(!form_data.has(key)){form_data.set(key,value);}});var fsus=Object.values(upload_list);fsus.length&&fsus.forEach(function(f,i){form_data.set('attach'+i,f);});var ssus=Object.values(server_list);ssus.length&&ssus.forEach(function(f,i){form_data.set('file'+i,f);});form_data.set('html_edit',config.html.allowed);draft_status&&(form_data.set('new',0),form_data.set('enew',1),form_data.set('save',1),title_update(1));var schedule={date:{get:function get(d){var date=this.value,t=scheduled.container.querySelector('[name="date"]');if(t){date=t.dataset.value.split('-');}return d==='y'?~~date[0]:d==='m'?~~date[1]:~~date[2];}},time:{value:scheduled.container.querySelector('[type="time"]').value,get:function get(t){var time=['12','00'];if(this.value){time=this.value.split(':');}return t==='h'?~~time[0]:~~time[1];}}};if(scheduled.status()&&!draft_status){var m={body:'mail',is_html:config.html.allowed,delete_after:1,enabled:1,status:1,mode:1,hour:schedule.time.get('h'),min:schedule.time.get('m'),day:schedule.date.get('d'),month:schedule.date.get('m'),year:schedule.date.get('y')};Object.entries(m).forEach(function(e,i){if(i){form_data.set(e[0],e[1]);}else{form_data.set(e[1],form_data.get(e[0]));form_data.delete(e[0]);}});}var xhr=new XMLHttpRequest(),link=scheduled.status()&&!draft_status?xtarget.schedule:form.getAttribute('action');xhr.open("POST",link);xhr.upload.onprogress=function(e){!draft_status&&_.button_progress(_this,Math.ceil(e.loaded/e.total*100));};xhr.onload=function(e){var rs=e.target.responseText,status=String(),error=String(),error_container=false,parser=new DOMParser(),_g=function _g(param){return _.uri_param(param,e.target.responseURL);},_d={id:_g('id'),folder:{index:_g('folder'),type:_g('folder_type'),id:_g('folder_id')},input:{id:form.querySelector('[name="id"]'),folder:form.querySelector('[name="folder"]')}};if(draft_status){title_update(-1);draft.data=[_d.folder.id,_d.folder.index,_d.input.id&&_d.input.id.value,_d.id];if(_d.folder.type==2||_d.folder.type==4){if(_d.input.id){draft.purge.apply(null,draft.data);}else{draft.refresh();}}else{draft.refresh();}_d.input.id&&_d.input.id.remove();_d.input.folder&&_d.input.folder.remove();form.insertAdjacentHTML('beforeend',element.input('id',_d.id,false,false,'hidden'));form.insertAdjacentHTML('beforeend',element.input('folder',_d.folder.index,false,false,'hidden'));}else{rs=parser.parseFromString(rs,'text/html');if(rs){rs=rs.querySelector('.panel-body'),error_container=rs.querySelector('h3');if(error_container){error=error_container.innerHTML.replace(/\s:/,': ');_.notification([$$.$.notification.danger,error],10,"error",0,1,['bottom','center']);_.button_progress(_this,0);}else{status=rs.innerHTML;_.notification([scheduled.status()?$$.$.notification.type.scheduled:$$.$.notification.success,status],10,"success",0,1,['bottom','center']);paneled&&panel.close();draft.clean();}}}};xhr.onerror=function(e){_.button_progress(_this,0);_.error({responseText:e.target.responseText,status:xhr.status},1);};xhr.send(form_data);});target.addEventListener('keydown',function(e){var meta=_.platform.mac?e.metaKey:e.ctrlKey,enter=e.keyCode===13;if(meta&&enter){submit.dataset.isTrusted=1;submit.dispatchEvent(new Event('click'));}});},3e2);}},language={},template={};Object.entries(form_data).filter(function(f){['from','to','cc','bcc','subject','body'].includes(f[0])?data.visible[f[0]]=f[1]:data.hidden[f[0]]=f[1];});Object.entries(data.visible).forEach(function(e){var id=e[0];language[id]=$form.find('[name='+id+']').parent().prev().text();});Object.entries(data.hidden).forEach(function(e){var id=e[0];if(['crypt','sign'].includes(id)){language[id]=$form.find('[name='+id+']').parent().prev().text();}else if(['pri'].includes(id)){var _data={};$form.find('[name='+id+'] option').map(function(){_data[this.innerText.toLowerCase()]=this.innerText;});language[id]={label:$form.find('[name='+id+']').parent().prev().text(),data:_data};}});language._attachments=_.lang('global_attachments');language._send=_.lang('mail_composer_send');language._scheduled=_.lang('mail_composer_scheduled').replace(/%1/,''+element.type.date()+''+_.lang('global_today').toLowerCase()+'').replace(/%2/,element.type.time());language._attach=_.lang('mail_composer_attach');language._insert_link=adjust.modifier(_.lang('editor_tb_link'));language._insert_picture=_.lang('mail_composer_insert_picture');language._toggle=_.lang('mail_composer_toggle');language._discard=_.lang('mail_composer_discard');language._server_attach=_.lang('mail_composer_server_attach');language._notifications=_.lang('global_notifications');language._notifications_dsn=_.lang('mail_composer_notifications_dsn');language._notifications_del=_.lang('mail_composer_notifications_del');language._encrypt=_.lang('global_encrypt');language._options=_.lang('global_options');language._addrecipients=_.lang('mail_composer_addrecipients');element.select.from=$form[0].querySelector('select[name="from"]');element.select.sign=$form[0].querySelector('select[name="sign"]');element.select.crypt=$form[0].querySelector('select[name="crypt"]');if(element.select.from){element.select.from=element.select.from.outerHTML;}if(element.select.sign){element.select.sign=element.select.sign.outerHTML;}if(element.select.crypt){element.select.crypt=element.select.crypt.outerHTML;}template.form=$$.$.template.compose({prefix:prefix,target:{send:xtarget.send},charset:data.hidden.charset,id:id,class:classes,language:language,status:{text:~~data.hidden.html_edit?classes.hidden:String(),html:~~data.hidden.html_edit?String():classes.hidden,module:{schedule:_.mavailable('schedule')?String():classes.hidden}},toggle:{recipients:{cc:toggle.recipients('cc','rc',data.visible),bcc:toggle.recipients('bcc','rc',data.visible),ccf:toggle.recipients('cc','rf',data.visible),bccf:toggle.recipients('bcc','rf',data.visible)},more:_defineProperty({server_file:check.field('file0',data.hidden),abook:check.field('abook',data.hidden),dsn:check.field('dsn',data.hidden),del:check.field('del',data.hidden),sign:[check.field('sign',data.hidden),element.select.sign],crypt:[check.field('crypt',data.hidden),element.select.crypt]},'del',check.field('pri',data.hidden))},from:element.select.from||element.input('from',data.visible,true),to:element.input('to',data.visible),cc:element.input('cc',data.visible),bcc:element.input('bcc',data.visible),subject:element.input('subject',data.visible),attachments:element.input(classes.form.name.tattach,data.visible,false,true),body:data.visible.body});if(inline){var inlne_form=inline.append(template.form);element.composer(inlne_form);}else{var composers=$('.'+classes.panel.container+' .'+classes.editor.compose).length,window_width=window.innerWidth,small_window_width=window_width<640,window_height=window.innerHeight,small_window_height=window_height<640,small_window=small_window_width||small_window_height,ioffset=-15,offset=composers?ioffset*5*composers:ioffset,position=small_window?{}:{my:"right-bottom",at:"right-bottom",offsetX:offset,offsetY:offset},panel=$.jsPanel({position:position,theme:"dimgrey",onwindowresize:true,panelSize:{width:small_window?window_width+4*ioffset:600,height:small_window?window_height+4*ioffset:600},headerTitle:_.lang('mail_new_message'),content:template.form,maximizedMargin:{top:small_window?-1*ioffset:window_height*0.03,bottom:small_window?-1*ioffset:window_height*0.03,left:small_window?-1*ioffset:window_height*0.1,right:small_window?-1*ioffset:window_height*0.1},footerToolbar:function footerToolbar(){},dblclicks:{title:"maximize"},onminimized:function onminimized(){toggle.backdrop(this);},onclosed:function onclosed(){toggle.backdrop(this);},onnormalized:function onnormalized(){adjust.contenteditable(this[0]);toggle.backdrop(this);},onmaximized:function onmaximized(){adjust.contenteditable(this[0]);toggle.backdrop(this,1);},callback:function callback(){element.composer(this);if(small_window){this.maximize();}}});panel.header.title.addClass('plain');}}});};return{message:message};}();var messages=function(){var get=function get(data){loader.start();$.post(_.path.extensions+'/mail/messages.cgi?'+_.plugin.json_to_query(data),function(data){render(data);loader.end();_.document_title(0,_.lang('titles_mail'));});},loader={target:$$.selector('tree.active'),start:function start(){$(this.target).addClass($$.$.tree.loader);},end:function end(){$(this.target).removeClass($$.$.tree.loader);}},preview_length=function preview_length(){return parseInt($(window).width()/10);},storage={target:'['+$$.$.tree.container+']',counter:$$.selector('controls.counter'),get:function get(){var status=arguments.length>0&&arguments[0]!==undefined?arguments[0]:0;var data=$(this.target).data('messages')||{};if(!status){data=Object.keys(data);}return data;},set:function set(id,state,status,starred,data){var storage=this.get(1);state?storage[id]=[+status,+starred]:delete storage[id];$(this.target).data('messages',storage);var selected_count=Object.keys(storage).length;$(this.counter).text((selected_count?selected_count+' '+_.lang('global_selected'):String()).toLowerCase());var controls=$$.selector('layout.controls');$(controls).toggleClass('hidden',!selected_count);},restore:function restore(){var data=this.get(),checkboxes=$$.$.messages.checkbox;$(checkboxes).filter(function(i,t){data.includes(t.value)&&$(t).prop('checked',1);}).promise().done(function(){$(checkboxes).trigger('change');});},reset:function reset(){var checkboxes=$$.$.messages.checkbox;$(this.target).data('messages',{});$(checkboxes+':checked').prop('checked',0).trigger('change');}},status={action:function action(_action){var string=arguments.length>1&&arguments[1]!==undefined?arguments[1]:false;_action=parseInt(_action.replace(/^\D+/g,''));if(string){return _action?'read':'unread';}return _action;},set:function set(action,messages){var $messages=$($$.$.messages.checkbox).filter(function(i,c){return messages.includes(c.value);}),$targets=$messages.parent().parents('td').parents('tr');$targets.attr('data-unread',+!this.action(action));},write:function write(data){var messages=arguments.length>1&&arguments[1]!==undefined?arguments[1]:false;var folder_index=data[1].searched_folder_index||data[1].folder_index;if(messages){var action=this.action(data[0],1);messages='&d='+messages.join('&d=');$.post(_.path.extensions+'/mail/message.cgi?folder='+folder_index+'&mark='+action+messages+'');}else{var _action2=this.action(data[0],1),server=data[1],_messages=storage.get(1),starred={read:[],unread:[]};$.each(_messages,function(i,o){if(o[1]===1){o[0]===1?starred.unread.push(i):starred.read.push(i);delete _messages[i];}});submit(server,_defineProperty({},data[0],1),Object.keys(_messages),0,1);var link=_.path.extensions+'/mail/message.cgi?folder='+folder_index+'&mark=starred&state='+_action2+'';starred.read.length&&$.post(link+('&d='+starred.read.join('&d='))+'');starred.unread.length&&$.post(link+''+('&d='+starred.unread.join('&d='))+'');}}},events=function events(data){var button={compose:$$.$.controls.compose.button,search:$$.element('controls.search.dropdown'),refresh:$$.element('controls.refresh.button'),delete:$$.element('controls.delete'),forward:$$.element('controls.forward'),special:{star:$$.selector('messages.special.star'),starred:$$.selector('messages.special.starred'),unstarred:$$.selector('messages.special.unstarred')}},dropdown={mark:{read:$$.element('controls.more.menu.read'),unread:$$.element('controls.more.menu.unread'),special:$$.element('controls.more.menu.special'),spam:$$.element('controls.more.menu.spam'),ham:$$.element('controls.more.menu.ham'),black:$$.element('controls.more.menu.black'),white:$$.element('controls.more.menu.white')},select:$$.selector('controls.select.dropdown'),move:$$.element('controls.move.dropdown'),search:$$.element('controls.search.dropdown')},checkbox=$($$.$.controls.select.checkbox),checkboxes=$$.$.messages.checkbox,flags=$$.selector('messages.flag');checkbox.on('change',function(){var $this=$(this),state=$this.is(':checked');$(checkboxes).prop('checked',state).trigger('change');}).parent().parent().on('click',function(event){var $input=$(this).find('input');!$(event.target).is($input)&&$input.prop('checked',!$input.is(':checked')).trigger('change');});$(flags).on('click',function(event){event.stopPropagation();});$(dropdown.select).find($$.$.controls.select.menus).on('click',function(event){var _$=$(event.target).data('type'),$_=$(checkboxes),$__='change',__$='checked';if(_$===5||_$===4){$_.prop(__$,_$&1).trigger($__);}else if(_$===3){$_.prop(__$,function(){return!this.checked;}).trigger($__);}else if(_$===2||_$===1){$_.prop(__$,function(){return+$(this).parents('tr').attr('data-unread')===(_$&1);}).trigger($__);}else if(_$===0){$_.prop(__$,function(){return+$(this).parents('tr').attr('data-starred')===+!(_$&1);}).trigger($__);}});$(checkboxes).on('change',function(){var $this=$(this),$row=$this.parents('td').parent('tr'),state=$this.is(':checked'),id=$this.val(),checked=checkboxes+':checked',status=$row.attr('data-unread'),starred=$row.attr('data-starred');storage.set(id,state,status,starred,data);$(checked).length===$(checkboxes).length?checkbox.prop('checked',1):checkbox.prop('checked',0);});button.delete.on('click',function(){submit(data,{'delete':1},storage.get(),1,1);});var $dropdown_move_select=dropdown.move.find('select');$dropdown_move_select.find('option').map(function(i,o){o.value<=-1&&o.remove();});_.plugin.select($dropdown_move_select);$dropdown_move_select.on('change',function(){var _this2=this;setTimeout(function(){$($$.$.controls.move.submit).toggleClass('disabled',!_this2.value).trigger('focus');});});dropdown.move.find('li').on('click',function(event){event.stopPropagation();var $target=$(event.target),$submit=$($$.$.controls.move.submit),$copy=$($$.$.controls.move.checkbox),copy=$copy.is(':checked');if($target.is($copy)){$submit.text(copy?_.lang('global_copy'):_.lang('global_move'));}if($target.is('button:not(.disabled)')){var _submit2;var action=copy,target=parseInt($dropdown_move_select.val());submit(data,(_submit2={},_defineProperty(_submit2,(action?'copy':'move')+'1',1),_defineProperty(_submit2,'mfolder1',target),_submit2),storage.get(),+!action||(data.searched_folder_index||data.folder_index)===target,1);dropdown.move.removeClass('open');}});dropdown.move.on('shown.bs.dropdown',function(){_.plugin.select([$dropdown_move_select,'open']);});button.forward.on('click',function(){_.notification([$$.$.notification.danger,'Forward functionality is no yet implemented. Expect it in the future beta pre-release.'],10,"info",0,1,['bottom','center']);});var $dropdown_search_select=dropdown.search.find('select'),$dropdown_search_simple=dropdown.search.find('[data-search-mail]'),$dropdown_search_advanced_all=dropdown.search.find('[name="search-wordsin"]');if($dropdown_search_select.length){$dropdown_search_select[0].value=data.searched_folder_index||data.folder_index;}_.plugin.select($dropdown_search_select);button.search.find('li').on('click keyup',function(event){event.stopPropagation();var $target=$(event.target),$advanced_form=dropdown.search.find('['+$$.$.controls.search.data.form.advanced+']'),advanced_form_hidden=function advanced_form_hidden(){return window.getComputedStyle($advanced_form[0]).display==='none';};if(event.keyCode===27){button.search.trigger('click');return;}if((event.keyCode===32||event.keyCode===9||event.keyCode===13||event.type==='click')&&$target.is($($$.selector('controls.search.caret.down')).add($$.selector('controls.search.button.type')))){var $caret=$target.is('i')?$target:$target.find('i');$caret.toggleClass($$.$.controls.search.caret.up);$advanced_form.toggleClass('show');$dropdown_search_simple[0].disabled=!advanced_form_hidden();var focus_target=advanced_form_hidden()?$dropdown_search_simple:$advanced_form[0].querySelector('input');focus_target.focus();if(advanced_form_hidden()){$dropdown_search_simple.val($dropdown_search_advanced_all.val());$dropdown_search_advanced_all.val(String());}else{$dropdown_search_advanced_all.val($dropdown_search_simple.val());$dropdown_search_simple.val(String());}return;}if(event.type==='keyup'&&event.keyCode===13&&$target.is('[type="text"], [type="number"]')||event.type==='click'&&$target.is('button:not(.disabled)')){var simple_query={folder:parseInt($dropdown_search_select[0].value),search:$dropdown_search_simple[0].value};if(advanced_form_hidden()){if(simple_query.search){$.post(_.path.prefix+'/'+_.variable.module.name()+'/mail_search.cgi?returned_format=json&json-error=1&simple=1&'+_.plugin.json_to_query(simple_query),function(data){messages.get(data);});}}else{var $elements_input=$advanced_form.find('input[type="text"]').filter(function(i,v){return v.value;}),$elements_radios_status=$advanced_form.find('input[name="status"]'),$elements_limit=$advanced_form.find('input[name^="limit"]'),$elements_attach=$advanced_form.find('input[name="attach"]'),query={};query.all=1;query.dest_def=1;query.folder=simple_query.folder;for(var i=0;i<$elements_input.length;i++){var value=$elements_input[i].value,special=$elements_input[i].name.includes('words'),name=$elements_input[i].name.replace('search-',String());if(value){query['what_'+i]=value;if(special){query['field_'+i]='all';query['neg_'+i]=~~$elements_input[i].name.includes('out');}else{query['field_'+i]=name;query['neg_'+i]=0;}}}query.status_def=0;for(var _i=0;_i<$elements_radios_status.length;_i++){var $this=$elements_radios_status[_i],_value=$this.value,def=_value==-1?1:0;if($this.checked){query.status_def=def;if(!def){query.status=_value;}}}for(var _i2=0;_i2<$elements_limit.length;_i2++){var _$this=$elements_limit[_i2],_name=_$this.name;if(_$this.checked&&_$this.name==='limit_def'||_$this.name!=='limit_def'){query[_name]=_$this.value;}}query.attach=~~$elements_attach[0].checked;$.post(_.path.prefix+'/'+_.variable.module.name()+'/mail_search.cgi?returned_format=json&json-error=1&'+_.plugin.json_to_query(query),function(data){messages.get(data);});}}});dropdown.search.on('shown.bs.dropdown',function(){$dropdown_search_simple.trigger('focus');});button.refresh.on('click',function(){$(this).addClass($$.$.controls.refresh.animation);$$.element('tree.active').click();});$(button.special.star).on('click',function(event){event.stopImmediatePropagation();var $this=$(this),$row=$(event.target).parents('td').parent('tr'),target=$$.$.messages.special,id=$row.find('input[value]').val(),state=$(event.target).is($(button.special.starred))?1:0,unread=+$row.attr('data-unread'),text=_.lang('global_'+(state?'unstarred':'starred')+'');$row.attr('data-starred',+!state);submit(data,_defineProperty({},'markas'+(state?1:2)+'',1),[id]);$this.removeClass(target[state?'starred':'unstarred']).addClass(target[state?'unstarred':'starred']).attr('data-original-title',text).next().remove();status.write([(+!unread).toString(),data],[id]);});dropdown.mark.read.add(dropdown.mark.unread).on('click',function(){var action=$(this).data('form-action'),messages=storage.get();status.write([action,data]);status.set(action,messages);});dropdown.mark.spam.add(dropdown.mark.ham).add(dropdown.mark.black).add(dropdown.mark.white).on('click',function(){var action=$(this).data('form-action'),messages=storage.get(),refetch=/razor|black/.test(action);submit(data,_defineProperty({},action,1),messages,+refetch,1);});$($$.$.controls.search.link).on('click',function(){var link=this.getAttribute('data-href');fetch(link).then(function(response){return response.json();}).then(function(data){messages.get(data);});});$(folders.data.selector.navigation).off('click',button.compose).on('click',button.compose,function(){compose.message();});},submit=function submit(data,actions,messages){var refetch=arguments.length>3&&arguments[3]!==undefined?arguments[3]:0;var reset=arguments.length>4&&arguments[4]!==undefined?arguments[4]:0;var form=data.form_list,target=_.variable.module.link()+('/'+form.target+'?'),hidden=form.hidden,searched_index=data.searched_folder_index,mail_system=parseInt(data.mail_system);hidden=_.plugin.json_to_query(hidden)+'&noredirect=1&';if(searched_index&&(mail_system===2||mail_system===4)){hidden=hidden.replace(/folder=\d+/,'folder='+searched_index);}actions=_.plugin.json_to_query(actions);messages='&d='+messages.join('&d=');refetch&&(loader.start(),_.notification('hide-all'));$.post(target+hidden+actions+encodeURI(messages),function(){if(reset){storage.reset();}if(refetch||data.folder_counts_allowed){$.post(_.path.extensions+'/mail/messages.cgi?'+hidden+'show_body_len='+preview_length()+'',function(data){render(data);loader.end();});}});},row=function row(text,icon){var row=String(),centered_row=$$.create.$('layout.row.centered');row=$(centered_row).append((icon?$$.create.icon(icon):String())+'
'+text+'
');return row;},render=function render(source){var container=$$.element('layout.container'),data=source[0],messages_list=data.list.messages&&data.form_list.buttons?data.list.messages.replace(/�/g,''):String();if(data.error){var errors=data.error.error;for(var i=0;i128?1:0;if(!messages_list_available&&data.searched){_.notification([$$.$.notification.type.search,_.lang('mail_search_empty')],5,"info",0,1,['bottom','center']);return;}container.empty().append($$.create.$('layout.panel'));var panel=container.find($$.selector('layout.panel'));if(messages_list_available){var _$$$create$$,_$$$create$$2,_$$$create$$3,_$$$create$$4,_$$$create$$5,_$$$create$$6,_$$$create$$7,_$$$create$$8,_$$$create$$9,_$$$create$$10,_$$$create$$11;var controls={select:data.form_list.buttons.select,submit:data.form_list.buttons.submit},pagination={link:data.pagination_arrow_last||data.pagination_arrow_first||String(),title:data.pagination_arrow_last?_.lang('mail_pagination_last'):data.pagination_arrow_first?_.lang('mail_pagination_first'):false};panel.append($$.create.$('layout.row.controls')).find($$.selector('layout.row.controls')).append($$.create.$('layout.column.6'),$$.create.$('layout.column.6')).find($$.selector('layout.column.6')).first().append($$.create.dropdown('controls.select.dropdown',[[controls.select.all,controls.select.none,controls.select.invert,controls.select.read,controls.select.unread,controls.select.special],3],$$.create.checkbox({select:1}),String(),_.lang('global_select')));var $form_controls=$($$.create.$('layout.controls',{'form-controls':1},'div'));Object.entries(controls.submit).map(function(_ref7){var _ref8=_slicedToArray(_ref7,2),type=_ref8[0],data=_ref8[1];var _iteratorNormalCompletion3=true;var _didIteratorError3=false;var _iteratorError3=undefined;try{for(var _iterator3=data.entries()[Symbol.iterator](),_step3;!(_iteratorNormalCompletion3=(_step3=_iterator3.next()).done);_iteratorNormalCompletion3=true){var _ref9=_step3.value;var _ref10=_slicedToArray(_ref9,2);var _i3=_ref10[0];var v=_ref10[1];if(type==='buttons'){$form_controls.append($$.create.$('controls.'+v[0],{'form-control':v[0]},'span',String(),_.lang('global_'+v[0]+'')));}else if(type==='dropdowns'){var _iteratorNormalCompletion4=true;var _didIteratorError4=false;var _iteratorError4=undefined;try{for(var _iterator4=v.entries()[Symbol.iterator](),_step4;!(_iteratorNormalCompletion4=(_step4=_iterator4.next()).done);_iteratorNormalCompletion4=true){var _ref11=_step4.value;var _ref12=_slicedToArray(_ref11,2);var di=_ref12[0];var dd=_ref12[1];var entries=[];var _iteratorNormalCompletion5=true;var _didIteratorError5=false;var _iteratorError5=undefined;try{for(var _iterator5=v[1].entries()[Symbol.iterator](),_step5;!(_iteratorNormalCompletion5=(_step5=_iterator5.next()).done);_iteratorNormalCompletion5=true){var _ref13=_step5.value;var _ref14=_slicedToArray(_ref13,2);var index=_ref14[0];var _data2=_ref14[1];_data2[0]&&entries.push($$.create.$(0,{'form-action':_data2[0]},'span',_data2[1]));}}catch(err){_didIteratorError5=true;_iteratorError5=err;}finally{try{if(!_iteratorNormalCompletion5&&_iterator5.return){_iterator5.return();}}finally{if(_didIteratorError5){throw _iteratorError5;}}}if(typeof dd==="string"){$form_controls.append($$.create.dropdown('controls.'+dd+'.dropdown',[entries,2],0,dd,_.lang('mail_'+dd+'')||_.lang('global_'+dd+'')));}}}catch(err){_didIteratorError4=true;_iteratorError4=err;}finally{try{if(!_iteratorNormalCompletion4&&_iterator4.return){_iterator4.return();}}finally{if(_didIteratorError4){throw _iteratorError4;}}}}}}catch(err){_didIteratorError3=true;_iteratorError3=err;}finally{try{if(!_iteratorNormalCompletion3&&_iterator3.return){_iterator3.return();}}finally{if(_didIteratorError3){throw _iteratorError3;}}}});panel.find($$.selector('layout.column.6')).first().append($form_controls,$$.create.dropdown('controls.sort.dropdown',[[data.list.sort.date,data.list.sort.from,data.list.sort.size,data.list.sort.subject,data.list.sort.spam],5],data.list.sorted,'sort',_.lang('global_sort')),$$.create.dropdown('controls.search.dropdown',[[$$.create.$(0,(_$$$create$$={},_defineProperty(_$$$create$$,$$.$.controls.search.data.form.action,'search'),_defineProperty(_$$$create$$,$$.$.controls.search.data.form.type,'simple'),_$$$create$$),'span',$$.create.input('search',_.lang('mail_search_search_mail'),String(),'text',{'search-mail':1})+$$.create.button('layout.button.transparent.link',{'toggle-type':1},String(),'controls.search.caret.down')),$$.create.$(0,(_$$$create$$2={},_defineProperty(_$$$create$$2,$$.$.controls.search.data.form.action,'search'),_defineProperty(_$$$create$$2,$$.$.controls.search.data.form.advanced,1),_$$$create$$2),'span',$$.create.$('layout.column.3',{},'span',$$.create.label('search-from',_.lang('mail_search_from')))+$$.create.$('layout.column.9',{},'span',$$.create.input('search-from'))),$$.create.$(0,(_$$$create$$3={},_defineProperty(_$$$create$$3,$$.$.controls.search.data.form.action,'search'),_defineProperty(_$$$create$$3,$$.$.controls.search.data.form.advanced,1),_$$$create$$3),'span',$$.create.$('layout.column.3',0,'span',$$.create.label('search-to',_.lang('mail_search_to')))+$$.create.$('layout.column.9',0,'span',$$.create.input('search-to'))),$$.create.$(0,(_$$$create$$4={},_defineProperty(_$$$create$$4,$$.$.controls.search.data.form.action,'search'),_defineProperty(_$$$create$$4,$$.$.controls.search.data.form.advanced,1),_$$$create$$4),'span',$$.create.$('layout.column.3',0,'span',$$.create.label('search-subject',_.lang('mail_search_subject')))+$$.create.$('layout.column.9',0,'span',$$.create.input('search-subject'))),$$.create.$(0,(_$$$create$$5={},_defineProperty(_$$$create$$5,$$.$.controls.search.data.form.action,'search'),_defineProperty(_$$$create$$5,$$.$.controls.search.data.form.advanced,1),_$$$create$$5),'span',$$.create.$('layout.column.3',0,'span',$$.create.label('search-wordsin',_.lang('mail_search_has_words')))+$$.create.$('layout.column.9',0,'span',$$.create.input('search-wordsin'))),$$.create.$(0,(_$$$create$$6={},_defineProperty(_$$$create$$6,$$.$.controls.search.data.form.action,'search'),_defineProperty(_$$$create$$6,$$.$.controls.search.data.form.advanced,1),_$$$create$$6),'span',$$.create.$('layout.column.3',0,'span',$$.create.label('search-wordsout',_.lang('mail_search_doesnt_have_words')))+$$.create.$('layout.column.9',0,'span',$$.create.input('search-wordsout'))),$$.create.$(0,(_$$$create$$7={},_defineProperty(_$$$create$$7,$$.$.controls.search.data.form.action,'search'),_defineProperty(_$$$create$$7,$$.$.controls.search.data.form.advanced,1),_$$$create$$7),'span',$$.create.$('layout.column.3',0,'span',$$.create.label('search-status',_.lang('mail_search_with_status')))+$$.create.$('layout.column.9',0,'span',$$.create.radio(0,'status',-1,_.lang('mail_search_with_status_any'),'status_def','checked')+$$.create.radio(0,'status',0,_.lang('mail_search_with_status_unread'),'status0')+$$.create.radio(0,'status',1,_.lang('mail_search_with_status_read'),'status1')+$$.create.radio(0,'status',2,_.lang('mail_search_with_status_special'),'status2'))),$$.create.$(0,(_$$$create$$8={},_defineProperty(_$$$create$$8,$$.$.controls.search.data.form.action,'search'),_defineProperty(_$$$create$$8,$$.$.controls.search.data.form.advanced,1),_defineProperty(_$$$create$$8,$$.$.controls.search.data.form.type,'search-in'),_$$$create$$8),'span',$$.create.$('layout.column.3',0,'span',$$.create.label('search-folder',_.lang('mail_search_search_in')))+$$.create.$('layout.column.9',0,'span',data.form_list.buttons.submit.dropdowns[0][1][0][1])),$$.create.$(0,(_$$$create$$9={},_defineProperty(_$$$create$$9,$$.$.controls.search.data.form.action,'search'),_defineProperty(_$$$create$$9,$$.$.controls.search.data.form.advanced,1),_defineProperty(_$$$create$$9,$$.$.controls.search.data.form.type,'limit'),_$$$create$$9),'span',$$.create.$('layout.column.3',0,'span',$$.create.label('search-wordsout',_.lang('mail_search_limit_results')))+$$.create.$('layout.column.9',0,'span',$$.create.radio(0,'limit_def',1,_.lang('global_no'),'limit_def0','checked')+$$.create.radio(0,'limit_def',0,_.lang('mail_search_limit_results_yes')+' '+$$.create.input('limit','',20,'number',['step="20"','min="10"'])+' latest messages','limit_def1'))),$$.create.$(0,(_$$$create$$10={},_defineProperty(_$$$create$$10,$$.$.controls.search.data.form.action,'search'),_defineProperty(_$$$create$$10,$$.$.controls.search.data.form.advanced,1),_defineProperty(_$$$create$$10,$$.$.controls.search.data.form.type,'attach'),_$$$create$$10),'span',$$.create.checkbox(0,'attach',1,_.lang('mail_search_has_attach'))),$$.create.$(0,(_$$$create$$11={},_defineProperty(_$$$create$$11,$$.$.controls.search.data.form.action,'search'),_defineProperty(_$$$create$$11,$$.$.controls.search.data.form.advanced,1),_defineProperty(_$$$create$$11,$$.$.controls.search.data.form.type,'submit'),_$$$create$$11),'span',$$.create.button('layout.button.primary',false,_.lang('global_search'),'controls.search.icon'))],5],data.searched_message?$$.create.$('controls.search.clear.link',['href="index.cgi?folder='+data.searched_folder_index+'"'],'a',$$.create.icon('controls.search.clear.icon')+' '+data.searched_message.toLowerCase(),_.lang('mail_search_clear')):String(),'search',_.lang('global_search')),$$.create.$('controls.counter',0,'span')).end().last().append($$.create.$('controls.refresh.button',{'refresh':1},'span',String(),_.lang('global_refresh')),$$.create.$('controls.pagination',pagination.link?['href="'+pagination.link+'"','data-href="'+pagination.link+'"']:false,'a',data.pagination_message,pagination.title),data.pagination_arrow_left,data.pagination_arrow_right);panel.append($$.create.$('layout.row.messages')).find($$.selector('layout.row.messages')).append($$.create.$('layout.column.12')).find($$.selector('layout.column.12')).append(messages_list);if(data.quota){panel.append($$.create.$('layout.row.quota')).find($$.selector('layout.row.quota')).last().append($$.create.$('layout.column.12')).find($$.selector('layout.column.12')).append(data.quota);}_.plugin.timestamp();_.plugin.arialabel();_.plugin.tooltip();_.plugin.offset_adjust(true);_.rows();folders.set(data);folders.update(data);events(data);messages.storage.restore();}else{events();panel.append(row(data.folder_index===0?_.lang('mail_no_new_mail'):_.lang('mail_no_mail'),'messages.row.empty'));}};return{get:get,storage:storage};}();var folders=function(){var data={file:{fancytree:'jquery.fancytree'},selector:{navigation:'aside .navigation'},options:{tree:{escapeTitles:false,autoActivate:false,autoScroll:true,keyboard:false,toggleEffect:false},scroll:{axis:'xy',theme:'minimal',keyboard:false,scrollInertia:300,scrollButtons:true,autoHideScrollbar:false}},plugin:{tree:function tree(source){source=source==='get'?'getTree':source==='node'?'getActiveNode':Object.assign(data.options.tree,{source:source,scrollParent:$('['+$$.$.tree.container+']'),click:function click(e,d){if(d.targetType==='title'){setTimeout(function(){_tree.adjust();},1e2);_.content(data.url.link+encodeURIComponent(d.node.key));messages.storage.reset();_.navigation.reset();}}});if($(_tree.container).length){return $(_tree.container).fancytree(source);}}},url:{link:_.path.origin+_.path.prefix+'/mailbox/index.cgi?id='}};var _tree={fetched:0,container:'['+$$.$.tree.container+']',container_adjust:function container_adjust(){var container=$(this.container+' >:first'),content=$(this.container+' >>:first');if(container.height()>content.height()){container.css('height',content.height());}},init:function init(source){if(this.fetched===0){this.load();return;}if($(data.selector.navigation+' '+this.container).length===0){$(data.selector.navigation).prepend('
  • ');$(data.selector.navigation).prepend('
  • '+$$.create.$('layout.button.block.transparent',{'compose':1},'span',$$.create.icon('controls.compose.icon')+" "+_.lang('mail_new_message'))+'
  • ');}else{return;}data.plugin.tree(source);_.plugin.scroll(this.container,data.options.scroll);this.container_adjust();},expand:function expand(node){var expanded=node.isExpanded();!expanded&&node.toggleExpanded();},load:function load(){this.fetched=1;_.load.bundle(data.file.fancytree,1,_.variable.switch()?[get]:0,1);},reload:function reload(source){var _this3=this;var tree=data.plugin.tree('get');tree.$container.empty();tree.reload(source);setTimeout(function(){_this3.adjust();},1e2);},node:function node(){return data.plugin.tree('node');},adjust:function adjust(){var $_=this.node();if($_&&$_.li&&$($_.li).length){_.plugin.scroll([this.container,$($_.li)]);}this.container_adjust();}};var get=function get(key){key=key?'?key='+key.replace(/&/g,'%26'):String();$.post(_.path.extensions+'/mail/folders.cgi'+key+'',function(source){if(!!key){_tree.reload(source);}else{_tree.init(source);}});};var set=function set(key){var _this4=this;var tree=data.plugin.tree('get');if((typeof key==='undefined'?'undefined':_typeof(key))==='object'){var search={id:key.searched_folder_id,file:key.searched_folder_file},id=key.folder_id;if(search.file&&search.id!=null&&key.mail_system!=2&&key.mail_system!=4){key=search.file;}else{key=search.id||id;}}if((typeof tree==='undefined'?'undefined':_typeof(tree))==='object'&&typeof tree.activateKey==='function'){tree.activateKey(key);}else{setTimeout(function(){_this4.set(key);},1e2);}};var refresh=function refresh(){var node=_tree.node();node.span.click();};var update=function update(data){var allowed=data.folder_counts_allowed,unread_count=data.unread,$node_titles=$($$.selector('tree.title')),active_node=$$.selector('tree.active'),node_bubble=$$.selector('tree.bubble'),$active_node_title=$(active_node).find($$.selector('tree.title')),$active_node_bubble=$(active_node).find(node_bubble);if(allowed){if(unread_count){if($active_node_bubble.length){$active_node_bubble.text(unread_count);}else{$active_node_title.append($$.create.$('tree.bubble',false,'span',unread_count));}}else{$active_node_bubble.remove();}}else{$node_titles.find(node_bubble).remove();}};var check=function check(folder){var node=_tree.node();if(node&&node.key===folder){return true;}return false;};var adjust=function adjust(){_tree.adjust();};return{get:get,set:set,refresh:refresh,update:update,check:check,adjust:adjust,data:data};}();return{folders:{get:folders.get,set:folders.set,refresh:folders.refresh,update:folders.update,check:folders.check,adjust:folders.adjust},messages:{get:messages.get,sort:messages.sort},compose:compose.message};}(); +'use strict';var _slicedToArray=function(){function sliceIterator(arr,i){var _arr=[];var _n=true;var _d=false;var _e=undefined;try{for(var _i=arr[Symbol.iterator](),_s;!(_n=(_s=_i.next()).done);_n=true){_arr.push(_s.value);if(i&&_arr.length===i)break;}}catch(err){_d=true;_e=err;}finally{try{if(!_n&&_i["return"])_i["return"]();}finally{if(_d)throw _e;}}return _arr;}return function(arr,i){if(Array.isArray(arr)){return arr;}else if(Symbol.iterator in Object(arr)){return sliceIterator(arr,i);}else{throw new TypeError("Invalid attempt to destructure non-iterable instance");}};}();var _typeof=typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"?function(obj){return typeof obj;}:function(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};function _defineProperty(obj,key,value){if(key in obj){Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true});}else{obj[key]=value;}return obj;}var mail=function(){var _={path:{origin:v___location_origin,prefix:v___location_prefix,extensions:v___server_extensions_path,css:v___server_css_path,js:v___server_js_path},variable:{switch:function _switch(){return $t_uri_webmail;},module:{name:function name(){return v___module;},link:function link(){var prefix=v___location_prefix;return prefix?prefix+'/'+v___module:'/'+this.name();}},locale:{short:config_portable_theme_locale_format_short}},platform:{mac:window.navigator.platform==='MacIntel'},content:get_pjax_content,load:load,sdata:get_server_data,mavailable:core.moduleAvailable,lang:theme_language,notification:plugins.messenger.post,file_chooser:plugins.chooser.file,button_progress:snippets.progressive_button,rows:page_table_rows_control,document_title:theme_title_generate,update_mdata:core.updateModuleData,uri_param:uri_parse_param,error:connection_error,navigation:{reset:plugins.navigation.reset},plugin:{json_to_query:Convert.json_to_query,serialized_to_json:Convert.serialized_to_json,nice_size:Convert.nice_size,html_escape:Convert.htmlEscape,timestamp:snippets.datetime.locale,offset_adjust:page.handle.content.offset,moment:moment,select:function select(data){var size=arguments.length>1&&arguments[1]!==undefined?arguments[1]:'34';if(Array.isArray(data)){data[0].select2(data[1]);return;}data.select2({minimumResultsForSearch:5,containerCssClass:'select2-content heighter-'+size,dropdownCssClass:'select2-content h'+size});data.next('.select2').addClass('select2-content-container');data.on('select2:open',function(){$('.select2-container').off('click.container').on('click.container',function(event){event.stopPropagation();});});},scroll:function scroll(target,options){if(typeof target==='string'){$(target).mCustomScrollbar(options);}else{$(target[0]).mCustomScrollbar('scrollTo',target[1],{scrollOffset:[$(target[0]),3,4]});}},arialabel:function arialabel(){var arialabel='aria-label';document.querySelectorAll('[data-tooltip="mailbox"]:not('+arialabel+')').forEach(function(t){return t.setAttribute(arialabel,t.getAttribute('data-title'));});},tooltip:function tooltip(target){var $target=target||$('[data-tooltip="mailbox"]');$target.tooltip({html:true,trigger:'hover',container:'body',sanitize:false,delay:{show:600,hide:30}});}}},$$={$:{layout:{container:'container-fluid',controls:'mail-controls',panel:'panel-mail panel-body',row:{controls:'row row-controls',messages:'row row-messages colorify',quota:'row row-quota',centered:'row text-center'},column:{3:'col-xs-3',4:'col-xs-4',6:'col-xs-6',8:'col-xs-8',9:'col-xs-9',12:'col-xs-12'},button:{link:'btn btn-link text-decoration-none',transparent:{plain:'btn btn-transparent',link:'btn btn-link btn-transparent'},default:'btn btn-default',primary:'btn btn-primary',block:{default:'btn btn-default btn-block',transparent:'btn btn-transparent btn-block'},dropdown:{default:'btn btn-default dropdown-toggle'}}},tree:{container:'data-mail-folders',active:'fancytree-active',loader:'fancytree-loader',title:'fancytree-title',bubble:'label label-danger'},controls:{compose:{button:'[data-compose]',icon:'fa-fw fa-plus'},select:{dropdown:'dropdown-select',checkbox:'[data-select] input',menus:'[data-select-mass]'},delete:'btn btn-default fa fa-trash',forward:'btn btn-default fa fa-forward',search:{link:'[data-href^="sort.cgi"]',clear:{link:'search-clear text-danger',icon:'fa-fw fa-times-circle-o'},dropdown:'dropdown-search',icon:'fa-search',data:{form:{action:'data-form-action',type:'data-form-action-type',advanced:'data-form-action-advanced'}},button:{type:'[data-toggle-type="1"]'},caret:{down:'fa-caret-down',up:'fa-caret-up'},submit:'[data-search-submit]'},move:{dropdown:'dropdown-move',checkbox:'[data-copy-only]',icon:'fa-folder-move',submit:'[data-transfer-submit]'},more:{dropdown:'dropdown-more',icon:'fa-dots-vertical',menu:{read:'[data-form-action="markas1"]',unread:'[data-form-action="markas0"]',special:'[data-form-action="markas2"]',spam:'[data-form-action="razor"]',ham:'[data-form-action="ham"]',black:'[data-form-action="black"]',white:'[data-form-action="white"]'}},sort:{dropdown:'dropdown-sort',icon:'fa-fw fa-sort'},counter:'mail-selected-count',refresh:{button:'btn btn-transparent-link btn-lg btn-transparent fa fa-refresh',animation:'fa-spin-gradual'},pagination:'pagination-title',settings:'btn btn-default fa fa-cog'},messages:{checkbox:'input[data-check]',flag:'mail-list-trow-flag-security',special:{star:'star',starred:'fa-star star',unstarred:'fa-star-o star'},row:{empty:'fa fa-fw fa-1_50x fa-inbox'}},compose:{button:{inverse:'btn-inverse',submit:'btn-primary',schedule:'btn-info'},hidden:'hidden',panel:{content:'jsPanel-content',container:'jspCompose',container_shown:'jspShown',backdrop:'compose_backdrop'},editor:{compose:'ql-compose',composer:'data-composer',scheduled:'scheduled',content:'ql-editor',toolbar:'ql-toolbar',disabled:'ql-disabled',tb_bold:'ql-bold',tb_link:'ql-link',tb_image:'ql-image',controls:{compose:'compose-controls',more:'more-options',extra:{attach:'e-attachment',link:'e-ql-link',image:'e-ql-image',html:'e-html',discard:'e-discard'}}},form:{header:'form-head',recipients:{control:'recipients-control',fields:'recipients-control-fields'},name:{tattach:'tattachments',scheduled:'scheduled'}},icons:{upload:{server:'fa fa-fw fa-download-cloud',attach:'fa2 fa2-attach'}}},notification:{danger:'exclamation-triangle',error:'exclamation-circle',success:'check-circle',type:{search:'search',scheduled:'clock',trash:'- fa2 fa2-trash'}},class:{events_none:'pointer-events-none'},template:{compose:function compose(data){var hidden=' class="'+data.class.hidden+'"',empty=String(),status={server_file:empty,abook:empty,crypt:empty,sign:empty,dsn:empty,del:empty,menu:{server_file:empty,encrypt:empty,options:empty}},value={server_file:data.toggle.more.server_file,crypt:data.toggle.more.crypt[0],sign:data.toggle.more.sign[0],abook:data.toggle.more.abook,dsn:data.toggle.more.dsn,del:data.toggle.more.del};value.server_file===null&&(status.server_file=hidden);if(value.server_file===null){status.menu.server_file=hidden;}value.crypt===null&&(status.crypt=hidden);value.sign===null&&(status.sign=hidden);if(value.crypt===null&&value.sign===null){status.menu.encrypt=hidden;}value.abook===null&&(status.abook=hidden);value.dsn===null&&(status.dsn=hidden);value.del===null&&(status.del=hidden);if(value.abook===null&&value.dsn===null&&value.del===null){status.menu.options=hidden;}return'\n
    \n
    \n
    \n
    \n
    \n
    \n \n
    \n
    \n \n \n \n \n '+data.from+'\n
    \n
    \n
    \n
    \n
    \n
    \n \n
    \n
    \n '+data.to+'\n
    \n
    \n
    \n
    \n
    \n
    \n
    \n \n
    \n
    \n '+data.cc+'\n
    \n
    \n
    \n
    \n
    \n
    \n \n
    \n
    \n '+data.bcc+'\n
    \n
    \n
    \n
    \n
    \n
    \n
    \n \n
    \n
    \n '+data.subject+'\n
    \n
    \n
    \n
    \n \n
    \n
    \n
    \n
    \n \n
    '+data.body+'
    \n
    \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    \n
    \n
    \n \n \n \n \n \n \n \n
    \n
    \n \n \n
    \n
    \n \n \n \n \n \n \n '+data.language._options+'\n \n \n \n \n \n
    \n \n \n
    \n ';}}},create:{$:function $(classes,data){var type=arguments.length>2&&arguments[2]!==undefined?arguments[2]:'div';var content=arguments.length>3&&arguments[3]!==undefined?arguments[3]:String();var tooltip=arguments.length>4&&arguments[4]!==undefined?arguments[4]:String();var attributes=this._attributes(data);classes=this._classes(classes);if(tooltip){tooltip='data-tooltip="mailbox" data-placement="bottom" data-title="'+tooltip+'"';}return'<'+type+' '+attributes+' '+tooltip+' class="'+classes+'">'+content+'';},icon:function icon(classes){var attributes=arguments.length>1&&arguments[1]!==undefined?arguments[1]:String();var attribute=this._attributes(attributes),icon=this._classes(classes);return'';},button:function button(classes,data,content,icon,tooltip){icon=this._classes(icon);return this.$(classes,data,'button',(icon?'  ':'')+content+'',tooltip);},input:function input(){var name=arguments.length>0&&arguments[0]!==undefined?arguments[0]:String();var placeholder=arguments.length>1&&arguments[1]!==undefined?arguments[1]:String();var value=arguments.length>2&&arguments[2]!==undefined?arguments[2]:String();var type=arguments.length>3&&arguments[3]!==undefined?arguments[3]:'text';var attributes=arguments.length>4&&arguments[4]!==undefined?arguments[4]:String();var attribute=this._attributes(attributes),id=name;if((typeof name==='undefined'?'undefined':_typeof(name))==='object'){id=name[1];name=name[0];}return'';},textarea:function textarea(){var name=arguments.length>0&&arguments[0]!==undefined?arguments[0]:String();var placeholder=arguments.length>1&&arguments[1]!==undefined?arguments[1]:String();var value=arguments.length>2&&arguments[2]!==undefined?arguments[2]:String();var attributes=arguments.length>3&&arguments[3]!==undefined?arguments[3]:String();var attribute=this._attributes(attributes),id=name;if((typeof name==='undefined'?'undefined':_typeof(name))==='object'){id=name[1];name=name[0];}return'';},label:function label(){var target=arguments.length>0&&arguments[0]!==undefined?arguments[0]:String();var content=arguments.length>1&&arguments[1]!==undefined?arguments[1]:String();var attributes=arguments.length>2&&arguments[2]!==undefined?arguments[2]:String();var attribute=this._attributes(attributes);return'';},select:function select(data){var attributes=arguments.length>1&&arguments[1]!==undefined?arguments[1]:String();var name=arguments.length>2&&arguments[2]!==undefined?arguments[2]:String();var attribute=this._attributes(attributes),select='';return select;},checkbox:function checkbox(){var attributes=arguments.length>0&&arguments[0]!==undefined?arguments[0]:String();var name=arguments.length>1&&arguments[1]!==undefined?arguments[1]:String();var value=arguments.length>2&&arguments[2]!==undefined?arguments[2]:String();var label=arguments.length>3&&arguments[3]!==undefined?arguments[3]:' ';var checked=arguments.length>4&&arguments[4]!==undefined?arguments[4]:String();var attribute=this._attributes(attributes),checkbox=String(),id=name+'-'+Math.floor(Math.random()*9e10);!label&&(label=' ');checked&&(checked='checked');checkbox+='';checkbox+='';checkbox+='';checkbox+='';return checkbox;},radio:function radio(){var attributes=arguments.length>0&&arguments[0]!==undefined?arguments[0]:String();var name=arguments.length>1&&arguments[1]!==undefined?arguments[1]:String();var value=arguments.length>2&&arguments[2]!==undefined?arguments[2]:String();var label=arguments.length>3&&arguments[3]!==undefined?arguments[3]:' ';var id=arguments.length>4&&arguments[4]!==undefined?arguments[4]:String();var checked=arguments.length>5&&arguments[5]!==undefined?arguments[5]:String();var attribute=this._attributes(attributes),checkbox=String();checkbox+='';checkbox+='';checkbox+='';checkbox+='';return checkbox;},dropdown:function dropdown(classes,data,button,icon,tooltip){var dropdown=String();classes=this._classes(classes);dropdown+='
    ';if(button){if(/<[a-z][\s\S]*>/i.test(button)){dropdown+=this.$('layout.button.default',false,'span',button);}else{dropdown+=this.button('layout.button.default',false,button);}}dropdown+=this.button('layout.button.dropdown.default',{'toggle':'dropdown'},'',false,tooltip);dropdown+='';dropdown+='
    ';return data[0].length?dropdown:String();},_attributes:function _attributes(data){var attributes=String();if(Array.isArray(data)){attributes=data.join(' ');}else if(data){attributes=Object.entries(data).map(function(_ref5){var _ref6=_slicedToArray(_ref5,2),k=_ref6[0],v=_ref6[1];return attributes+=(k.startsWith('data-')?k:'data-'+k)+'='+v+' ';}).slice(-1)[0];}return attributes;},_classes:function _classes(classes){return classes?classes.split('.').reduce(function(a,b){return a?a[b]:undefined;},$$.$):String();}},selector:function selector(_selector){_selector=this.create._classes(_selector);return _selector.startsWith('[')?_selector:"."+_selector.replace(/\s+/g,".");},element:function element(_element){return _element?$(this.selector(_element)):String();}};var compose=function(){var xtarget={};xtarget.send='send_mail.cgi';xtarget.reply='reply_mail.cgi';_.load.bundle(['jquery.jspanel','quill'],1);var message=function message(){var form=arguments.length>0&&arguments[0]!==undefined?arguments[0]:false;var inline=arguments.length>1&&arguments[1]!==undefined?arguments[1]:false;var types=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};var path=_.path.prefix,cmodule=_.variable.module.name(),prefix=path+'/'+cmodule;xtarget.getSize=path+'/index.cgi/?xhr-get_size=1&xhr-get_size_nodir=1&xhr-get_size_path=';xtarget.delete=prefix+'/delete_mail.cgi?confirm=1&delete=1&noredirect=1';xtarget.schedule=path+'/schedule/save.cgi';if((typeof form==='undefined'?'undefined':_typeof(form))==='object'&&form.length){form=$(form).serialize()+'&reply=1';types.new=0;}else{form='new=1';types.new=1;}if(types.reply_all){form+='&rall=1';}else if(types.forward){form+='&forward=1';}fetch(prefix+'/'+xtarget.reply+'?'+form).then(function(rs){return rs.text();}).then(function(rs){var $form=$(rs).find('[action*="'+xtarget.send+'"]'),generate={timestamp:function timestamp(){return _.plugin.moment().valueOf()*1e2;},random:function random(){return Math.floor(Math.random()*9e14);}},id=generate.timestamp(),form_data_lost=$form.find(':checkbox:not(:checked)').attr('value','0').prop('checked',true).map(function(){return this.name;}).get(),form_data=$form.serialize();if(form_data){form_data=_.plugin.serialized_to_json(form_data);var data={visible:{},hidden:{}},classes=$$.$.compose,toggle={recipients:function recipients(id,data,data_visible){if((typeof data==='undefined'?'undefined':_typeof(data))==='object'){var target=data[0],state=data[1],rcs='.'+classes.form.recipients.control,rcsf='.'+classes.form.recipients.fields,rc=target.querySelector(rcs),rf=target.querySelector(rcsf);rc.querySelector('.'+id).classList.toggle(classes.button.inverse,!state);rf.querySelector('.'+id).classList.toggle(classes.hidden,state);return;}else if(data==='rc'){return!data_visible[id]?String():' '+classes.button.inverse;}else if(data==='rf'){return data_visible[id]?String():' '+classes.hidden;}},attachments:function attachments(panel){var a=panel.querySelector('[name="'+classes.form.name.tattach+'"]'),l=a.previousSibling.querySelectorAll('.tag').length;a.parentNode.parentNode.classList.toggle(classes.hidden,!l);adjust.contenteditable(panel);},backdrop:function backdrop(panel,show){var body=$('body'),re_zi=99999,compose_backdrop=classes.panel.backdrop;if(show){panel[0].dataset.zIndex=panel[0].style.zIndex;panel[0].style.zIndex=re_zi+1;panel[0].setAttribute('maximized',1);body.append('');}else{if(panel[0]){panel[0].style.zIndex=panel[0].dataset.zIndex;panel[0].removeAttribute('maximized');delete panel[0].dataset.zIndex;}body.find('.modal-backdrop.'+compose_backdrop).remove();}},formatting:function formatting(target,status){var es=classes.editor.composer,eb=target.querySelectorAll('['+es+'-h]'),ed=target.querySelectorAll('['+es+']');eb.forEach(function(b){b.classList.toggle(classes.hidden,!status);});ed.forEach(function(e){if(e.getAttribute(es)==='text'){e.classList.toggle(classes.hidden,status);}else{e.classList.toggle(classes.hidden,!status);}});adjust.contenteditable(target);}},adjust={contenteditable:function contenteditable(panel){var target=panel.querySelector('.'+classes.panel.content),container=target?target.offsetHeight:window.innerHeight/4,top_block=panel.querySelector('.'+classes.form.header).offsetHeight,editor_toolbar=panel.querySelector('.'+classes.editor.toolbar).offsetHeight,editor=panel.querySelector('['+classes.editor.composer+']:not(.'+classes.hidden+')'),offset=50+editor_toolbar,height=container-top_block-offset+'px';editor.style.height=height;},modifier:function modifier(str){return str.replace(/%cmd/,_.platform.mac?'Cmd':'Ctrl');}},check={field:function field(_field,object){var value=object[_field];if(value&&!isNaN(value)){value=~~value;}return typeof value==='undefined'?null:value;}},element={input:function input(str,data){var readonly=arguments.length>2&&arguments[2]!==undefined?arguments[2]:false;var no_escape=arguments.length>3&&arguments[3]!==undefined?arguments[3]:false;var type=arguments.length>4&&arguments[4]!==undefined?arguments[4]:'text';var value=(typeof data==='undefined'?'undefined':_typeof(data))==='object'?data[str]:data;if(readonly){readonly=['readonly'];}if(!no_escape){value=_.plugin.html_escape(value);}return $$.create.input([str,'c-'+str+'-'+id],String(),value,type,readonly);},select:{},type:{time:function time(){var ct=new Date(),format=function format(s){return('0'+s).substr(-2);},round=function round(m){var r=Math.ceil(m/10)*10;return r===60?r-5:r;},h=format(ct.getHours()),m=round(format(ct.getMinutes()));return'';},date:function date(){var ct=new Date(),y=ct.getFullYear(),m=ct.getMonth()+1,d=ct.getDate();return'';}},composer:function composer(target){var panel=target,paneled=panel.header?true:false,config={html:{allowed:parseInt(data.hidden.html_edit),initial:parseInt(data.hidden.html_edit_config)}},config_update=function config_update(option,value){_.update_mdata("/uconfig.cgi?mailbox","/uconfig_save.cgi",_defineProperty({},option,value));};target=target[0];var asb=target.querySelector('.'+classes.form.header),ccs=target.querySelectorAll('.'+classes.editor.controls.compose),rcs=target.querySelector('.'+classes.form.recipients.control),qtg=target.querySelector('.'+classes.editor.compose),tcm=target.querySelector('['+classes.editor.composer+'="text"]'),editor={this:new Quill(qtg,{modules:{formula:false,syntax:false,imageDrop:true,toolbar:target.querySelector('#tb-'+id)},bounds:target,theme:'snow'}),get:{text:function text(){return tcm.value;},html:function html(){return editor.this.root.innerHTML;},data:function data(){return config.html.allowed?editor.get.html():editor.get.text();}},convert:function convert(){var he=editor.this,te=he.root.parentElement.previousElementSibling;if(config.html.allowed){he.setText(te.value);}else{te.value=he.getText();}},maximized:function maximized(){return target.hasAttribute('maximized');}},title_update=function title_update(ds){var sf=asb.querySelector('[name="subject"]'),ud=function ud(){sf.dispatchEvent(new Event('input'));},us=function us(tg,df){if(paneled){tg.style.opacity=df?0.7:1;}},du=function du(tg){if(ds===1){tg.textContent=_.lang('mail_composer_draft_saving');us(tg,true);}else if(ds===-1){tg.textContent=_.lang('mail_composer_draft_saved');us(tg,true);setTimeout(function(){us(tg);ud();},2e3);}};if(paneled){var pt=panel.header.title[0],pti=pt.textContent;if(ds){du(pt,pti);}else{sf.addEventListener('input',function(){pt.textContent=this.value||pti;});ud();}}};paneled&&target.classList.add(classes.panel.container,classes.panel.container_shown);adjust.contenteditable(target);title_update();var ctl_tgl=ccs[0].querySelector('.'+classes.editor.controls.extra.html);ctl_tgl.addEventListener('click',function(){var st=parseInt(config.html.allowed)||0,ia=parseInt(config.html.initial)||0,sg=+!st,co=sg?2:ia===1?1:0;toggle.formatting(target,sg);config.html.allowed=sg;config_update('html_edit',co);editor.convert();});setTimeout(function(){var tb=editor.this.options.modules.toolbar.container,upload_list=[],server_list=[],priority=null,server_attach_previous=null,attachments=target.querySelector('[name="'+classes.form.name.tattach+'"]'),content=target.querySelector('.'+classes.editor.content),ctl_att=ccs[0].querySelector('.'+classes.editor.controls.extra.attach),ctl_lnk=ccs[0].querySelector('.'+classes.editor.controls.extra.link),ctl_img=ccs[0].querySelector('.'+classes.editor.controls.extra.image),ctl_dis=ccs[1].querySelector('.'+classes.editor.controls.extra.discard),submit=target.querySelector('button[type="submit"]'),$more_options=$(target).find('.'+classes.editor.controls.more),scheduled={target:target.querySelector('[name="'+classes.form.name.scheduled+'"]'),container:target.querySelector('.'+classes.editor.scheduled),events:function events(){this.container.addEventListener('click',function(event){event.stopPropagation();});this.checkbox().addEventListener('click',function(){var s=submit,t=s.querySelector('span').querySelector('span'),ct=_.lang('mail_composer_schedule'),c=this.checked,sb=classes.button.submit,sc=classes.button.schedule,d=s.nextElementSibling,st=language._send;s.classList.toggle(sc,c);s.classList.toggle(sb,!c);d.classList.toggle(sc,c);d.classList.toggle(sb,!c);t.textContent=c?ct:st;});this.datepicker();},status:function status(){return this.target.checked;},checkbox:function checkbox(){return this.container.querySelector('[type="checkbox"]');},holder:function holder(){return this.container.querySelector('[data-t]');},datepicker:function datepicker(){var tag=this.holder(),input=tag.previousSibling;tag.addEventListener('click',function(){$(input).datepicker('show');});$(input).datepicker({language:_.sdata("language"),todayHighlight:true,autoclose:true,startDate:"0d"}).on("changeDate",function(l){var today=_.lang('global_today').toLowerCase(),tomorrow=_.lang('global_tomorrow').toLowerCase(),label=today,now=new Date(),y=now.getFullYear(),m=now.getMonth()+1,d=now.getDate(),py=l.date.getFullYear(),pm=l.date.getMonth()+1,pd=l.date.getDate(),date=l.dates[0],date_=py+'-'+pm+'-'+pd,date_formatted=moment(date).format(_.variable.locale.short);this.dataset.value=date_;if(y===py&&m===pm&&(d===pd||d+1===pd)){if(d+1===pd){label=tomorrow;}}else{label=date_formatted;}tag.textContent=label;});}},draft={timeout:{update:null,discard:null},data:[],reset:function reset(){var folder=this.data[0];this.data=[];if(folder){this.data.push(folder);}},test:function test(){return this.data.length>=1;},save:function save(){this.terminate();this.timeout.update=setTimeout(function(){submit.dispatchEvent(new Event('click'));},2e3);},terminate:function terminate(){typeof this.timeout.update==='number'&&clearTimeout(this.timeout.update);},purge:function purge(id,folder,message){fetch(xtarget.delete+'&id='+id+'&folder='+folder+'&d='+message).then(function(r){r.text().then(function(){draft.refresh();});});},refresh:function refresh(){if(this.test()&&folders.check(this.data[0])){folders.refresh();}},clean:function clean(){this.test()&&this.purge(this.data[0],this.data[1],this.data[3]);this.reset();this.terminate();},control:{discard:function discard(){editor.maximized()&&panel.normalize();draft.timeout.discard=setTimeout(function(){draft.test()&&draft.purge(draft.data[0],draft.data[1],draft.data[3]);draft.reset();draft.terminate();paneled&&panel.close();},5e3);},undo:function undo(){target.classList.remove(classes.hidden);typeof draft.timeout.discard==='number'&&clearTimeout(draft.timeout.discard);}}},add_attachment=function add_attachment(type,id,filedata,size,update){var icon=type==='server'?classes.icons.upload.server:classes.icons.upload.attach,name=filedata.name.split("/").pop()||filedata.name;$(attachments).tagsinput('add','[i class="'+icon+'"][/i]'+name+' [em]('+_.plugin.nice_size(size)+')[/em]');var tags=attachments.previousSibling.querySelectorAll('.tag'),last=tags[tags.length-1];last.dataset.reference=id;if(type==='server'){server_list[id]=filedata.name;}else{upload_list[id]=filedata.file;}if(update){adjust.contenteditable(target);toggle.attachments(target);}};ctl_lnk.addEventListener('click',function(){tb.querySelector('.'+classes.editor.tb_link).dispatchEvent(new Event('click'));});ctl_img.addEventListener('click',function(){tb.querySelector('.'+classes.editor.tb_image).dispatchEvent(new Event('click'));});ctl_dis.addEventListener('click',function(){draft.control.discard();var undo={cancel:{label:_.lang('global_undo'),action:function action(){this.hide();draft.control.undo();}}};_.notification([$$.$.notification.type.trash,_.lang('mail_composer_discarded_draft')],5,"warning",'discard-'+id,1,['bottom','center'],undo);target.classList.add(classes.hidden);});rcs.querySelectorAll('button').forEach(function(b){b.addEventListener('click',function(){var enabled=b.classList.contains(classes.button.inverse),type=b.classList.contains("bcc")?'bcc':'cc';toggle.recipients(type,[target,enabled]);adjust.contenteditable(target);});});ctl_att.addEventListener('click',function(){var form=target.querySelector('form'),xu=document.createElement('input');xu.type="file";xu.setAttribute('multiple',1);xu.classList.add(classes.hidden);xu=form.appendChild(xu);xu.click();xu.addEventListener('change',function(){Array.from(this.files).forEach(function(file,i,arr){var fuid=generate.random()+i,size=file.size,name=file.name,last=i===arr.length-1;add_attachment('upload',fuid,{name:name,file:file},size,last);last&&xu.remove();});});});$more_options.find('.dropdown-menu').on("click.bs.dropdown",function(event){var type=this.dataset.type,etarget=event.target,action=etarget.dataset.value;if(action==='server-attach'){var error={read:_.lang('mail_composer_server_attach_error_read'),dir:_.lang('mail_composer_server_attach_error_dir')};_.file_chooser({file:server_attach_previous}).then(function(file){if(file){var suid=generate.random();fetch(xtarget.getSize+file).then(function(r){r.text().then(function(rs){var s=rs.split('|'),size=s[1].replace(/\s+/g,String());if(size==-1||size==-2){var _message=size==-1?error.read:error.dir;_.notification([$$.$.notification.danger,_message],10,"error",0,1,['bottom','center']);}else{add_attachment('server',suid,{name:file},size,true);}});});}server_attach_previous=file;});return;}event.stopPropagation();if(type==='priority'){var _check=etarget.closest('ul').querySelector('i');_check.remove();etarget.appendChild(_check);priority=action?~~action:null;}if(type==='options'){var cb=etarget.querySelector('input[type="checkbox"]');cb&&(cb.checked^=1);}});$(attachments).tagsinput({allowDuplicates:true,confirmKeys:[13],delimiter:'\\000'});$(attachments).on('itemRemoved',function(event){var item=event.item[1];if(item){delete upload_list[item];delete server_list[item];}toggle.attachments(target);});_.plugin.tooltip($(ctl_att).add(ctl_img).add(ctl_att).add(ctl_lnk).add(ctl_tgl).add(ctl_dis));var editor_controls=['font','size','bold','italic','underline','color','background','align',{'list':'ordered'},{'list':'bullet'},'strike','blockquote','code-block','link','clean'];editor_controls.forEach(function(v){var button=void 0,key=void 0,value=void 0,language='editor_tb';if((typeof v==='undefined'?'undefined':_typeof(v))==='object'){key=Object.keys(v)[0];value=key+'[value="'+v[key]+'"]';language+='_'+key+'_'+v[key];}else{value=v;language+='_'+v;}button=tb.querySelector('.ql-'+value);button.dataset.title=adjust.modifier(_.lang(language));_.plugin.tooltip($(button));});asb.addEventListener('input',function(){draft.save();});asb.querySelectorAll('input').forEach(function(input){input.addEventListener('keydown',function(event){if(event.keyCode===13){event.preventDefault();return;}draft.save();});});editor.this.on('text-change',function(){draft.save();});tcm.addEventListener('input',function(){draft.save();});scheduled.events();submit.addEventListener('click',function(event){var _this=this;event.preventDefault();var form=this.closest('form'),form_data=new FormData(form),trusted=event.isTrusted||~~submit.dataset.isTrusted,draft_status=!trusted;this.dataset.isTrusted=0;if(trusted){draft.terminate();}form_data.append('body',editor.get.data());var pri_key='pri';priority?form_data.set(pri_key,priority):form_data.delete(pri_key);Object.entries(data.hidden).forEach(function(e){var key=e[0],value=e[1];if(!form_data.has(key)){form_data.set(key,value);}});var fsus=Object.values(upload_list);fsus.length&&fsus.forEach(function(f,i){form_data.set('attach'+i,f);});var ssus=Object.values(server_list);ssus.length&&ssus.forEach(function(f,i){form_data.set('file'+i,f);});form_data.set('html_edit',config.html.allowed);draft_status&&(form_data.set('new',0),form_data.set('enew',1),form_data.set('save',1),title_update(1));var schedule={date:{get:function get(d){var date=this.value,t=scheduled.container.querySelector('[name="date"]');if(t){date=t.dataset.value.split('-');}return d==='y'?~~date[0]:d==='m'?~~date[1]:~~date[2];}},time:{value:scheduled.container.querySelector('[type="time"]').value,get:function get(t){var time=['12','00'];if(this.value){time=this.value.split(':');}return t==='h'?~~time[0]:~~time[1];}}};if(scheduled.status()&&!draft_status){var m={body:'mail',is_html:config.html.allowed,delete_after:1,enabled:1,status:1,mode:1,hour:schedule.time.get('h'),min:schedule.time.get('m'),day:schedule.date.get('d'),month:schedule.date.get('m'),year:schedule.date.get('y')};Object.entries(m).forEach(function(e,i){if(i){form_data.set(e[0],e[1]);}else{form_data.set(e[1],form_data.get(e[0]));form_data.delete(e[0]);}});}var xhr=new XMLHttpRequest(),link=scheduled.status()&&!draft_status?xtarget.schedule:form.getAttribute('action');xhr.open("POST",link);xhr.upload.onprogress=function(e){!draft_status&&_.button_progress(_this,Math.ceil(e.loaded/e.total*100));};xhr.onload=function(e){var rs=e.target.responseText,status=String(),error=String(),error_container=false,parser=new DOMParser(),_g=function _g(param){return _.uri_param(param,e.target.responseURL);},_d={id:_g('id'),folder:{index:_g('folder'),type:_g('folder_type'),id:_g('folder_id')},input:{id:form.querySelector('[name="id"]'),folder:form.querySelector('[name="folder"]')}};if(draft_status){title_update(-1);draft.data=[_d.folder.id,_d.folder.index,_d.input.id&&_d.input.id.value,_d.id];if(_d.folder.type==2||_d.folder.type==4){if(_d.input.id){draft.purge.apply(null,draft.data);}else{draft.refresh();}}else{draft.refresh();}_d.input.id&&_d.input.id.remove();_d.input.folder&&_d.input.folder.remove();form.insertAdjacentHTML('beforeend',element.input('id',_d.id,false,false,'hidden'));form.insertAdjacentHTML('beforeend',element.input('folder',_d.folder.index,false,false,'hidden'));}else{rs=parser.parseFromString(rs,'text/html');if(rs){rs=rs.querySelector('.panel-body'),error_container=rs.querySelector('h3');if(error_container){error=error_container.innerHTML.replace(/\s:/,': ');_.notification([$$.$.notification.danger,error],10,"error",0,1,['bottom','center']);_.button_progress(_this,0);}else{status=rs.innerHTML;_.notification([scheduled.status()?$$.$.notification.type.scheduled:$$.$.notification.success,status],10,"success",0,1,['bottom','center']);paneled&&panel.close();draft.clean();}}}};xhr.onerror=function(e){_.button_progress(_this,0);_.error({responseText:e.target.responseText,status:xhr.status},1);};xhr.send(form_data);});target.addEventListener('keydown',function(e){var meta=_.platform.mac?e.metaKey:e.ctrlKey,enter=e.keyCode===13;if(meta&&enter){submit.dataset.isTrusted=1;submit.dispatchEvent(new Event('click'));}});},3e2);}},language={},template={};Object.entries(form_data).filter(function(f){['from','to','cc','bcc','subject','body'].includes(f[0])?data.visible[f[0]]=f[1]:data.hidden[f[0]]=f[1];});Object.entries(data.visible).forEach(function(e){var id=e[0];language[id]=$form.find('[name='+id+']').parent().prev().text();});Object.entries(data.hidden).forEach(function(e){var id=e[0];if(['crypt','sign'].includes(id)){language[id]=$form.find('[name='+id+']').parent().prev().text();}else if(['pri'].includes(id)){var _data={};$form.find('[name='+id+'] option').map(function(ix){_data[ix]=this.innerText;});language[id]={label:$form.find('[name='+id+']').parent().prev().text(),data:_data};}});language._attachments=_.lang('global_attachments');language._send=_.lang('mail_composer_send');language._scheduled=_.lang('mail_composer_scheduled').replace(/%1/,''+element.type.date()+''+_.lang('global_today').toLowerCase()+'').replace(/%2/,element.type.time());language._attach=_.lang('mail_composer_attach');language._insert_link=adjust.modifier(_.lang('editor_tb_link'));language._insert_picture=_.lang('mail_composer_insert_picture');language._toggle=_.lang('mail_composer_toggle');language._discard=_.lang('mail_composer_discard');language._server_attach=_.lang('mail_composer_server_attach');language._notifications=_.lang('global_notifications');language._notifications_dsn=_.lang('mail_composer_notifications_dsn');language._notifications_del=_.lang('mail_composer_notifications_del');language._encrypt=_.lang('global_encrypt');language._options=_.lang('global_options');language._addrecipients=_.lang('mail_composer_addrecipients');element.select.from=$form[0].querySelector('select[name="from"]');element.select.sign=$form[0].querySelector('select[name="sign"]');element.select.crypt=$form[0].querySelector('select[name="crypt"]');if(element.select.from){element.select.from=element.select.from.outerHTML;}if(element.select.sign){element.select.sign=element.select.sign.outerHTML;}if(element.select.crypt){element.select.crypt=element.select.crypt.outerHTML;}template.form=$$.$.template.compose({prefix:prefix,target:{send:xtarget.send},charset:data.hidden.charset,id:id,class:classes,language:language,status:{text:~~data.hidden.html_edit?classes.hidden:String(),html:~~data.hidden.html_edit?String():classes.hidden,module:{schedule:_.mavailable('schedule')?String():classes.hidden}},toggle:{recipients:{cc:toggle.recipients('cc','rc',data.visible),bcc:toggle.recipients('bcc','rc',data.visible),ccf:toggle.recipients('cc','rf',data.visible),bccf:toggle.recipients('bcc','rf',data.visible)},more:_defineProperty({server_file:check.field('file0',data.hidden),abook:check.field('abook',data.hidden),dsn:check.field('dsn',data.hidden),del:check.field('del',data.hidden),sign:[check.field('sign',data.hidden),element.select.sign],crypt:[check.field('crypt',data.hidden),element.select.crypt]},'del',check.field('pri',data.hidden))},from:element.select.from||element.input('from',data.visible,true),to:element.input('to',data.visible),cc:element.input('cc',data.visible),bcc:element.input('bcc',data.visible),subject:element.input('subject',data.visible),attachments:element.input(classes.form.name.tattach,data.visible,false,true),body:data.visible.body});if(inline){var inlne_form=inline.append(template.form);element.composer(inlne_form);}else{var composers=$('.'+classes.panel.container+' .'+classes.editor.compose).length,window_width=window.innerWidth,small_window_width=window_width<640,window_height=window.innerHeight,small_window_height=window_height<640,small_window=small_window_width||small_window_height,ioffset=-15,offset=composers?ioffset*5*composers:ioffset,position=small_window?{}:{my:"right-bottom",at:"right-bottom",offsetX:offset,offsetY:offset},panel=$.jsPanel({position:position,theme:"dimgrey",onwindowresize:true,panelSize:{width:small_window?window_width+4*ioffset:600,height:small_window?window_height+4*ioffset:600},headerTitle:_.lang('mail_new_message'),content:template.form,maximizedMargin:{top:small_window?-1*ioffset:window_height*0.03,bottom:small_window?-1*ioffset:window_height*0.03,left:small_window?-1*ioffset:window_height*0.1,right:small_window?-1*ioffset:window_height*0.1},footerToolbar:function footerToolbar(){},dblclicks:{title:"maximize"},onminimized:function onminimized(){toggle.backdrop(this);},onclosed:function onclosed(){toggle.backdrop(this);},onnormalized:function onnormalized(){adjust.contenteditable(this[0]);toggle.backdrop(this);},onmaximized:function onmaximized(){adjust.contenteditable(this[0]);toggle.backdrop(this,1);},callback:function callback(){element.composer(this);if(small_window){this.maximize();}}});panel.header.title.addClass('plain');}}});};return{message:message};}();var messages=function(){var get=function get(data){loader.start();$.post(_.path.extensions+'/mail/messages.cgi?'+_.plugin.json_to_query(data),function(data){render(data);loader.end();_.document_title(0,_.lang('titles_mail'));});},loader={target:$$.selector('tree.active'),start:function start(){$(this.target).addClass($$.$.tree.loader);},end:function end(){$(this.target).removeClass($$.$.tree.loader);}},preview_length=function preview_length(){return parseInt($(window).width()/10);},storage={target:'['+$$.$.tree.container+']',counter:$$.selector('controls.counter'),get:function get(){var status=arguments.length>0&&arguments[0]!==undefined?arguments[0]:0;var data=$(this.target).data('messages')||{};if(!status){data=Object.keys(data);}return data;},set:function set(id,state,status,starred,data){var storage=this.get(1);state?storage[id]=[+status,+starred]:delete storage[id];$(this.target).data('messages',storage);var selected_count=Object.keys(storage).length;$(this.counter).text((selected_count?selected_count+' '+_.lang('global_selected'):String()).toLowerCase());var controls=$$.selector('layout.controls');$(controls).toggleClass('hidden',!selected_count);},restore:function restore(){var data=this.get(),checkboxes=$$.$.messages.checkbox;$(checkboxes).filter(function(i,t){data.includes(t.value)&&$(t).prop('checked',1);}).promise().done(function(){$(checkboxes).trigger('change');});},reset:function reset(){var checkboxes=$$.$.messages.checkbox;$(this.target).data('messages',{});$(checkboxes+':checked').prop('checked',0).trigger('change');}},status={action:function action(_action){var string=arguments.length>1&&arguments[1]!==undefined?arguments[1]:false;_action=parseInt(_action.replace(/^\D+/g,''));if(string){return _action?'read':'unread';}return _action;},set:function set(action,messages){var $messages=$($$.$.messages.checkbox).filter(function(i,c){return messages.includes(c.value);}),$targets=$messages.parent().parents('td').parents('tr');$targets.attr('data-unread',+!this.action(action));},write:function write(data){var messages=arguments.length>1&&arguments[1]!==undefined?arguments[1]:false;var folder_index=data[1].searched_folder_index||data[1].folder_index;if(messages){var action=this.action(data[0],1);messages='&d='+messages.join('&d=');$.post(_.path.extensions+'/mail/message.cgi?folder='+folder_index+'&mark='+action+messages+'');}else{var _action2=this.action(data[0],1),server=data[1],_messages=storage.get(1),starred={read:[],unread:[]};$.each(_messages,function(i,o){if(o[1]===1){o[0]===1?starred.unread.push(i):starred.read.push(i);delete _messages[i];}});submit(server,_defineProperty({},data[0],1),Object.keys(_messages),0,1);var link=_.path.extensions+'/mail/message.cgi?folder='+folder_index+'&mark=starred&state='+_action2+'';starred.read.length&&$.post(link+('&d='+starred.read.join('&d='))+'');starred.unread.length&&$.post(link+''+('&d='+starred.unread.join('&d='))+'');}}},events=function events(data){var button={compose:$$.$.controls.compose.button,search:$$.element('controls.search.dropdown'),refresh:$$.element('controls.refresh.button'),delete:$$.element('controls.delete'),forward:$$.element('controls.forward'),special:{star:$$.selector('messages.special.star'),starred:$$.selector('messages.special.starred'),unstarred:$$.selector('messages.special.unstarred')}},dropdown={mark:{read:$$.element('controls.more.menu.read'),unread:$$.element('controls.more.menu.unread'),special:$$.element('controls.more.menu.special'),spam:$$.element('controls.more.menu.spam'),ham:$$.element('controls.more.menu.ham'),black:$$.element('controls.more.menu.black'),white:$$.element('controls.more.menu.white')},select:$$.selector('controls.select.dropdown'),move:$$.element('controls.move.dropdown'),search:$$.element('controls.search.dropdown')},checkbox=$($$.$.controls.select.checkbox),checkboxes=$$.$.messages.checkbox,flags=$$.selector('messages.flag');checkbox.on('change',function(){var $this=$(this),state=$this.is(':checked');$(checkboxes).prop('checked',state).trigger('change');}).parent().parent().on('click',function(event){var $input=$(this).find('input');!$(event.target).is($input)&&$input.prop('checked',!$input.is(':checked')).trigger('change');});$(flags).on('click',function(event){event.stopPropagation();});$(dropdown.select).find($$.$.controls.select.menus).on('click',function(event){var _$=$(event.target).data('type'),$_=$(checkboxes),$__='change',__$='checked';if(_$===5||_$===4){$_.prop(__$,_$&1).trigger($__);}else if(_$===3){$_.prop(__$,function(){return!this.checked;}).trigger($__);}else if(_$===2||_$===1){$_.prop(__$,function(){return+$(this).parents('tr').attr('data-unread')===(_$&1);}).trigger($__);}else if(_$===0){$_.prop(__$,function(){return+$(this).parents('tr').attr('data-starred')===+!(_$&1);}).trigger($__);}});$(checkboxes).on('change',function(){var $this=$(this),$row=$this.parents('td').parent('tr'),state=$this.is(':checked'),id=$this.val(),checked=checkboxes+':checked',status=$row.attr('data-unread'),starred=$row.attr('data-starred');storage.set(id,state,status,starred,data);$(checked).length===$(checkboxes).length?checkbox.prop('checked',1):checkbox.prop('checked',0);});button.delete.on('click',function(){submit(data,{'delete':1},storage.get(),1,1);});var $dropdown_move_select=dropdown.move.find('select');$dropdown_move_select.find('option').map(function(i,o){o.value<=-1&&o.remove();});_.plugin.select($dropdown_move_select);$dropdown_move_select.on('change',function(){var _this2=this;setTimeout(function(){$($$.$.controls.move.submit).toggleClass('disabled',!_this2.value).trigger('focus');});});dropdown.move.find('li').on('click',function(event){event.stopPropagation();var $target=$(event.target),$submit=$($$.$.controls.move.submit),$copy=$($$.$.controls.move.checkbox),copy=$copy.is(':checked');if($target.is($copy)){$submit.text(copy?_.lang('global_copy'):_.lang('global_move'));}if($target.is('button:not(.disabled)')){var _submit2;var action=copy,target=parseInt($dropdown_move_select.val());submit(data,(_submit2={},_defineProperty(_submit2,(action?'copy':'move')+'1',1),_defineProperty(_submit2,'mfolder1',target),_submit2),storage.get(),+!action||(data.searched_folder_index||data.folder_index)===target,1);dropdown.move.removeClass('open');}});dropdown.move.on('shown.bs.dropdown',function(){_.plugin.select([$dropdown_move_select,'open']);});button.forward.on('click',function(){_.notification([$$.$.notification.danger,'Forward functionality is no yet implemented. Expect it in the future beta pre-release.'],10,"info",0,1,['bottom','center']);});var $dropdown_search_select=dropdown.search.find('select'),$dropdown_search_simple=dropdown.search.find('[data-search-mail]'),$dropdown_search_advanced_all=dropdown.search.find('[name="search-wordsin"]');if($dropdown_search_select.length){$dropdown_search_select[0].value=data.searched_folder_index||data.folder_index;}_.plugin.select($dropdown_search_select);button.search.find('li').on('click keyup',function(event){event.stopPropagation();var $target=$(event.target),$advanced_form=dropdown.search.find('['+$$.$.controls.search.data.form.advanced+']'),advanced_form_hidden=function advanced_form_hidden(){return window.getComputedStyle($advanced_form[0]).display==='none';};if(event.keyCode===27){button.search.trigger('click');return;}if((event.keyCode===32||event.keyCode===9||event.keyCode===13||event.type==='click')&&$target.is($($$.selector('controls.search.caret.down')).add($$.selector('controls.search.button.type')))){var $caret=$target.is('i')?$target:$target.find('i');$caret.toggleClass($$.$.controls.search.caret.up);$advanced_form.toggleClass('show');$dropdown_search_simple[0].disabled=!advanced_form_hidden();var focus_target=advanced_form_hidden()?$dropdown_search_simple:$advanced_form[0].querySelector('input');focus_target.focus();if(advanced_form_hidden()){$dropdown_search_simple.val($dropdown_search_advanced_all.val());$dropdown_search_advanced_all.val(String());}else{$dropdown_search_advanced_all.val($dropdown_search_simple.val());$dropdown_search_simple.val(String());}return;}if(event.type==='keyup'&&event.keyCode===13&&$target.is('[type="text"], [type="number"]')||event.type==='click'&&$target.is('button:not(.disabled)')){var simple_query={folder:parseInt($dropdown_search_select[0].value),search:$dropdown_search_simple[0].value};if(advanced_form_hidden()){if(simple_query.search){$.post(_.path.prefix+'/'+_.variable.module.name()+'/mail_search.cgi?returned_format=json&json-error=1&simple=1&'+_.plugin.json_to_query(simple_query),function(data){messages.get(data);});}}else{var $elements_input=$advanced_form.find('input[type="text"]').filter(function(i,v){return v.value;}),$elements_radios_status=$advanced_form.find('input[name="status"]'),$elements_limit=$advanced_form.find('input[name^="limit"]'),$elements_attach=$advanced_form.find('input[name="attach"]'),query={};query.all=1;query.dest_def=1;query.folder=simple_query.folder;for(var i=0;i<$elements_input.length;i++){var value=$elements_input[i].value,special=$elements_input[i].name.includes('words'),name=$elements_input[i].name.replace('search-',String());if(value){query['what_'+i]=value;if(special){query['field_'+i]='all';query['neg_'+i]=~~$elements_input[i].name.includes('out');}else{query['field_'+i]=name;query['neg_'+i]=0;}}}query.status_def=0;for(var _i=0;_i<$elements_radios_status.length;_i++){var $this=$elements_radios_status[_i],_value=$this.value,def=_value==-1?1:0;if($this.checked){query.status_def=def;if(!def){query.status=_value;}}}for(var _i2=0;_i2<$elements_limit.length;_i2++){var _$this=$elements_limit[_i2],_name=_$this.name;if(_$this.checked&&_$this.name==='limit_def'||_$this.name!=='limit_def'){query[_name]=_$this.value;}}query.attach=~~$elements_attach[0].checked;$.post(_.path.prefix+'/'+_.variable.module.name()+'/mail_search.cgi?returned_format=json&json-error=1&'+_.plugin.json_to_query(query),function(data){messages.get(data);});}}});dropdown.search.on('shown.bs.dropdown',function(){$dropdown_search_simple.trigger('focus');});button.refresh.on('click',function(){$(this).addClass($$.$.controls.refresh.animation);$$.element('tree.active').click();});$(button.special.star).on('click',function(event){event.stopImmediatePropagation();var $this=$(this),$row=$(event.target).parents('td').parent('tr'),target=$$.$.messages.special,id=$row.find('input[value]').val(),state=$(event.target).is($(button.special.starred))?1:0,unread=+$row.attr('data-unread'),text=_.lang('global_'+(state?'unstarred':'starred')+'');$row.attr('data-starred',+!state);submit(data,_defineProperty({},'markas'+(state?1:2)+'',1),[id]);$this.removeClass(target[state?'starred':'unstarred']).addClass(target[state?'unstarred':'starred']).attr('data-original-title',text).next().remove();status.write([(+!unread).toString(),data],[id]);});dropdown.mark.read.add(dropdown.mark.unread).on('click',function(){var action=$(this).data('form-action'),messages=storage.get();status.write([action,data]);status.set(action,messages);});dropdown.mark.spam.add(dropdown.mark.ham).add(dropdown.mark.black).add(dropdown.mark.white).on('click',function(){var action=$(this).data('form-action'),messages=storage.get(),refetch=/razor|black/.test(action);submit(data,_defineProperty({},action,1),messages,+refetch,1);});$($$.$.controls.search.link).on('click',function(){var link=this.getAttribute('data-href');fetch(link).then(function(response){return response.json();}).then(function(data){messages.get(data);});});$(folders.data.selector.navigation).off('click',button.compose).on('click',button.compose,function(){compose.message();});},submit=function submit(data,actions,messages){var refetch=arguments.length>3&&arguments[3]!==undefined?arguments[3]:0;var reset=arguments.length>4&&arguments[4]!==undefined?arguments[4]:0;var form=data.form_list,target=_.variable.module.link()+('/'+form.target+'?'),hidden=form.hidden,searched_index=data.searched_folder_index,mail_system=parseInt(data.mail_system);hidden=_.plugin.json_to_query(hidden)+'&noredirect=1&';if(searched_index&&(mail_system===2||mail_system===4)){hidden=hidden.replace(/folder=\d+/,'folder='+searched_index);}actions=_.plugin.json_to_query(actions);messages='&d='+messages.join('&d=');refetch&&(loader.start(),_.notification('hide-all'));$.post(target+hidden+actions+encodeURI(messages),function(){if(reset){storage.reset();}if(refetch||data.folder_counts_allowed){$.post(_.path.extensions+'/mail/messages.cgi?'+hidden+'show_body_len='+preview_length()+'',function(data){render(data);loader.end();});}});},row=function row(text,icon){var row=String(),centered_row=$$.create.$('layout.row.centered');row=$(centered_row).append((icon?$$.create.icon(icon):String())+'
    '+text+'
    ');return row;},render=function render(source){var container=$$.element('layout.container'),data=source[0],messages_list=data.list.messages&&data.form_list.buttons?data.list.messages.replace(/�/g,''):String();if(data.error){var errors=data.error.error;for(var i=0;i128?1:0;if(!messages_list_available&&data.searched){_.notification([$$.$.notification.type.search,_.lang('mail_search_empty')],5,"info",0,1,['bottom','center']);return;}container.empty().append($$.create.$('layout.panel'));var panel=container.find($$.selector('layout.panel'));if(messages_list_available){var _$$$create$$,_$$$create$$2,_$$$create$$3,_$$$create$$4,_$$$create$$5,_$$$create$$6,_$$$create$$7,_$$$create$$8,_$$$create$$9,_$$$create$$10,_$$$create$$11;var controls={select:data.form_list.buttons.select,submit:data.form_list.buttons.submit},pagination={link:data.pagination_arrow_last||data.pagination_arrow_first||String(),title:data.pagination_arrow_last?_.lang('mail_pagination_last'):data.pagination_arrow_first?_.lang('mail_pagination_first'):false};panel.append($$.create.$('layout.row.controls')).find($$.selector('layout.row.controls')).append($$.create.$('layout.column.6'),$$.create.$('layout.column.6')).find($$.selector('layout.column.6')).first().append($$.create.dropdown('controls.select.dropdown',[[controls.select.all,controls.select.none,controls.select.invert,controls.select.read,controls.select.unread,controls.select.special],3],$$.create.checkbox({select:1}),String(),_.lang('global_select')));var $form_controls=$($$.create.$('layout.controls',{'form-controls':1},'div'));Object.entries(controls.submit).map(function(_ref7){var _ref8=_slicedToArray(_ref7,2),type=_ref8[0],data=_ref8[1];var _iteratorNormalCompletion3=true;var _didIteratorError3=false;var _iteratorError3=undefined;try{for(var _iterator3=data.entries()[Symbol.iterator](),_step3;!(_iteratorNormalCompletion3=(_step3=_iterator3.next()).done);_iteratorNormalCompletion3=true){var _ref9=_step3.value;var _ref10=_slicedToArray(_ref9,2);var _i3=_ref10[0];var v=_ref10[1];if(type==='buttons'){$form_controls.append($$.create.$('controls.'+v[0],{'form-control':v[0]},'span',String(),_.lang('global_'+v[0]+'')));}else if(type==='dropdowns'){var _iteratorNormalCompletion4=true;var _didIteratorError4=false;var _iteratorError4=undefined;try{for(var _iterator4=v.entries()[Symbol.iterator](),_step4;!(_iteratorNormalCompletion4=(_step4=_iterator4.next()).done);_iteratorNormalCompletion4=true){var _ref11=_step4.value;var _ref12=_slicedToArray(_ref11,2);var di=_ref12[0];var dd=_ref12[1];var entries=[];var _iteratorNormalCompletion5=true;var _didIteratorError5=false;var _iteratorError5=undefined;try{for(var _iterator5=v[1].entries()[Symbol.iterator](),_step5;!(_iteratorNormalCompletion5=(_step5=_iterator5.next()).done);_iteratorNormalCompletion5=true){var _ref13=_step5.value;var _ref14=_slicedToArray(_ref13,2);var index=_ref14[0];var _data2=_ref14[1];_data2[0]&&entries.push($$.create.$(0,{'form-action':_data2[0]},'span',_data2[1]));}}catch(err){_didIteratorError5=true;_iteratorError5=err;}finally{try{if(!_iteratorNormalCompletion5&&_iterator5.return){_iterator5.return();}}finally{if(_didIteratorError5){throw _iteratorError5;}}}if(typeof dd==="string"){$form_controls.append($$.create.dropdown('controls.'+dd+'.dropdown',[entries,2],0,dd,_.lang('mail_'+dd+'')||_.lang('global_'+dd+'')));}}}catch(err){_didIteratorError4=true;_iteratorError4=err;}finally{try{if(!_iteratorNormalCompletion4&&_iterator4.return){_iterator4.return();}}finally{if(_didIteratorError4){throw _iteratorError4;}}}}}}catch(err){_didIteratorError3=true;_iteratorError3=err;}finally{try{if(!_iteratorNormalCompletion3&&_iterator3.return){_iterator3.return();}}finally{if(_didIteratorError3){throw _iteratorError3;}}}});panel.find($$.selector('layout.column.6')).first().append($form_controls,$$.create.dropdown('controls.sort.dropdown',[[data.list.sort.date,data.list.sort.from,data.list.sort.size,data.list.sort.subject,data.list.sort.spam],5],data.list.sorted,'sort',_.lang('global_sort')),$$.create.dropdown('controls.search.dropdown',[[$$.create.$(0,(_$$$create$$={},_defineProperty(_$$$create$$,$$.$.controls.search.data.form.action,'search'),_defineProperty(_$$$create$$,$$.$.controls.search.data.form.type,'simple'),_$$$create$$),'span',$$.create.input('search',_.lang('mail_search_search_mail'),String(),'text',{'search-mail':1})+$$.create.button('layout.button.transparent.link',{'toggle-type':1},String(),'controls.search.caret.down')),$$.create.$(0,(_$$$create$$2={},_defineProperty(_$$$create$$2,$$.$.controls.search.data.form.action,'search'),_defineProperty(_$$$create$$2,$$.$.controls.search.data.form.advanced,1),_$$$create$$2),'span',$$.create.$('layout.column.3',{},'span',$$.create.label('search-from',_.lang('mail_search_from')))+$$.create.$('layout.column.9',{},'span',$$.create.input('search-from'))),$$.create.$(0,(_$$$create$$3={},_defineProperty(_$$$create$$3,$$.$.controls.search.data.form.action,'search'),_defineProperty(_$$$create$$3,$$.$.controls.search.data.form.advanced,1),_$$$create$$3),'span',$$.create.$('layout.column.3',0,'span',$$.create.label('search-to',_.lang('mail_search_to')))+$$.create.$('layout.column.9',0,'span',$$.create.input('search-to'))),$$.create.$(0,(_$$$create$$4={},_defineProperty(_$$$create$$4,$$.$.controls.search.data.form.action,'search'),_defineProperty(_$$$create$$4,$$.$.controls.search.data.form.advanced,1),_$$$create$$4),'span',$$.create.$('layout.column.3',0,'span',$$.create.label('search-subject',_.lang('mail_search_subject')))+$$.create.$('layout.column.9',0,'span',$$.create.input('search-subject'))),$$.create.$(0,(_$$$create$$5={},_defineProperty(_$$$create$$5,$$.$.controls.search.data.form.action,'search'),_defineProperty(_$$$create$$5,$$.$.controls.search.data.form.advanced,1),_$$$create$$5),'span',$$.create.$('layout.column.3',0,'span',$$.create.label('search-wordsin',_.lang('mail_search_has_words')))+$$.create.$('layout.column.9',0,'span',$$.create.input('search-wordsin'))),$$.create.$(0,(_$$$create$$6={},_defineProperty(_$$$create$$6,$$.$.controls.search.data.form.action,'search'),_defineProperty(_$$$create$$6,$$.$.controls.search.data.form.advanced,1),_$$$create$$6),'span',$$.create.$('layout.column.3',0,'span',$$.create.label('search-wordsout',_.lang('mail_search_doesnt_have_words')))+$$.create.$('layout.column.9',0,'span',$$.create.input('search-wordsout'))),$$.create.$(0,(_$$$create$$7={},_defineProperty(_$$$create$$7,$$.$.controls.search.data.form.action,'search'),_defineProperty(_$$$create$$7,$$.$.controls.search.data.form.advanced,1),_$$$create$$7),'span',$$.create.$('layout.column.3',0,'span',$$.create.label('search-status',_.lang('mail_search_with_status')))+$$.create.$('layout.column.9',0,'span',$$.create.radio(0,'status',-1,_.lang('mail_search_with_status_any'),'status_def','checked')+$$.create.radio(0,'status',0,_.lang('mail_search_with_status_unread'),'status0')+$$.create.radio(0,'status',1,_.lang('mail_search_with_status_read'),'status1')+$$.create.radio(0,'status',2,_.lang('mail_search_with_status_special'),'status2'))),$$.create.$(0,(_$$$create$$8={},_defineProperty(_$$$create$$8,$$.$.controls.search.data.form.action,'search'),_defineProperty(_$$$create$$8,$$.$.controls.search.data.form.advanced,1),_defineProperty(_$$$create$$8,$$.$.controls.search.data.form.type,'search-in'),_$$$create$$8),'span',$$.create.$('layout.column.3',0,'span',$$.create.label('search-folder',_.lang('mail_search_search_in')))+$$.create.$('layout.column.9',0,'span',data.form_list.buttons.submit.dropdowns[0][1][0][1])),$$.create.$(0,(_$$$create$$9={},_defineProperty(_$$$create$$9,$$.$.controls.search.data.form.action,'search'),_defineProperty(_$$$create$$9,$$.$.controls.search.data.form.advanced,1),_defineProperty(_$$$create$$9,$$.$.controls.search.data.form.type,'limit'),_$$$create$$9),'span',$$.create.$('layout.column.3',0,'span',$$.create.label('search-wordsout',_.lang('mail_search_limit_results')))+$$.create.$('layout.column.9',0,'span',$$.create.radio(0,'limit_def',1,_.lang('global_no'),'limit_def0','checked')+$$.create.radio(0,'limit_def',0,_.lang('mail_search_limit_results_yes')+' '+$$.create.input('limit','',20,'number',['step="20"','min="10"'])+' latest messages','limit_def1'))),$$.create.$(0,(_$$$create$$10={},_defineProperty(_$$$create$$10,$$.$.controls.search.data.form.action,'search'),_defineProperty(_$$$create$$10,$$.$.controls.search.data.form.advanced,1),_defineProperty(_$$$create$$10,$$.$.controls.search.data.form.type,'attach'),_$$$create$$10),'span',$$.create.checkbox(0,'attach',1,_.lang('mail_search_has_attach'))),$$.create.$(0,(_$$$create$$11={},_defineProperty(_$$$create$$11,$$.$.controls.search.data.form.action,'search'),_defineProperty(_$$$create$$11,$$.$.controls.search.data.form.advanced,1),_defineProperty(_$$$create$$11,$$.$.controls.search.data.form.type,'submit'),_$$$create$$11),'span',$$.create.button('layout.button.primary',false,_.lang('global_search'),'controls.search.icon'))],5],data.searched_message?$$.create.$('controls.search.clear.link',['href="index.cgi?folder='+data.searched_folder_index+'"'],'a',$$.create.icon('controls.search.clear.icon')+' '+data.searched_message.toLowerCase(),_.lang('mail_search_clear')):String(),'search',_.lang('global_search')),$$.create.$('controls.counter',0,'span')).end().last().append($$.create.$('controls.refresh.button',{'refresh':1},'span',String(),_.lang('global_refresh')),$$.create.$('controls.pagination',pagination.link?['href="'+pagination.link+'"','data-href="'+pagination.link+'"']:false,'a',data.pagination_message,pagination.title),data.pagination_arrow_left,data.pagination_arrow_right);panel.append($$.create.$('layout.row.messages')).find($$.selector('layout.row.messages')).append($$.create.$('layout.column.12')).find($$.selector('layout.column.12')).append(messages_list);if(data.quota){panel.append($$.create.$('layout.row.quota')).find($$.selector('layout.row.quota')).last().append($$.create.$('layout.column.12')).find($$.selector('layout.column.12')).append(data.quota);}_.plugin.timestamp();_.plugin.arialabel();_.plugin.tooltip();_.plugin.offset_adjust(true);_.rows();folders.set(data);folders.update(data);events(data);messages.storage.restore();}else{events();panel.append(row(data.folder_index===0?_.lang('mail_no_new_mail'):_.lang('mail_no_mail'),'messages.row.empty'));}};return{get:get,storage:storage};}();var folders=function(){var data={file:{fancytree:'jquery.fancytree'},selector:{navigation:'aside .navigation'},options:{tree:{escapeTitles:false,autoActivate:false,autoScroll:true,keyboard:false,toggleEffect:false},scroll:{axis:'xy',theme:'minimal',keyboard:false,scrollInertia:300,scrollButtons:true,autoHideScrollbar:false}},plugin:{tree:function tree(source){source=source==='get'?'getTree':source==='node'?'getActiveNode':Object.assign(data.options.tree,{source:source,scrollParent:$('['+$$.$.tree.container+']'),click:function click(e,d){if(d.targetType==='title'){setTimeout(function(){_tree.adjust();},1e2);_.content(data.url.link+encodeURIComponent(d.node.key));messages.storage.reset();_.navigation.reset();}}});if($(_tree.container).length){return $(_tree.container).fancytree(source);}}},url:{link:_.path.origin+_.path.prefix+'/mailbox/index.cgi?id='}};var _tree={fetched:0,container:'['+$$.$.tree.container+']',container_adjust:function container_adjust(){var container=$(this.container+' >:first'),content=$(this.container+' >>:first');if(container.height()>content.height()){container.css('height',content.height());}},init:function init(source){if(this.fetched===0){this.load();return;}if($(data.selector.navigation+' '+this.container).length===0){$(data.selector.navigation).prepend('
  • ');$(data.selector.navigation).prepend('
  • '+$$.create.$('layout.button.block.transparent',{'compose':1},'span',$$.create.icon('controls.compose.icon')+" "+_.lang('mail_new_message'))+'
  • ');}else{return;}data.plugin.tree(source);_.plugin.scroll(this.container,data.options.scroll);this.container_adjust();},expand:function expand(node){var expanded=node.isExpanded();!expanded&&node.toggleExpanded();},load:function load(){this.fetched=1;_.load.bundle(data.file.fancytree,1,_.variable.switch()?[get]:0,1);},reload:function reload(source){var _this3=this;var tree=data.plugin.tree('get');tree.$container.empty();tree.reload(source);setTimeout(function(){_this3.adjust();},1e2);},node:function node(){return data.plugin.tree('node');},adjust:function adjust(){var $_=this.node();if($_&&$_.li&&$($_.li).length){_.plugin.scroll([this.container,$($_.li)]);}this.container_adjust();}};var get=function get(key){key=key?'?key='+key.replace(/&/g,'%26'):String();$.post(_.path.extensions+'/mail/folders.cgi'+key+'',function(source){if(!!key){_tree.reload(source);}else{_tree.init(source);}});};var set=function set(key){var _this4=this;var tree=data.plugin.tree('get');if((typeof key==='undefined'?'undefined':_typeof(key))==='object'){var search={id:key.searched_folder_id,file:key.searched_folder_file},id=key.folder_id;if(search.file&&search.id!=null&&key.mail_system!=2&&key.mail_system!=4){key=search.file;}else{key=search.id||id;}}if((typeof tree==='undefined'?'undefined':_typeof(tree))==='object'&&typeof tree.activateKey==='function'){tree.activateKey(key);}else{setTimeout(function(){_this4.set(key);},1e2);}};var refresh=function refresh(){var node=_tree.node();node.span.click();};var update=function update(data){var allowed=data.folder_counts_allowed,unread_count=data.unread,$node_titles=$($$.selector('tree.title')),active_node=$$.selector('tree.active'),node_bubble=$$.selector('tree.bubble'),$active_node_title=$(active_node).find($$.selector('tree.title')),$active_node_bubble=$(active_node).find(node_bubble);if(allowed){if(unread_count){if($active_node_bubble.length){$active_node_bubble.text(unread_count);}else{$active_node_title.append($$.create.$('tree.bubble',false,'span',unread_count));}}else{$active_node_bubble.remove();}}else{$node_titles.find(node_bubble).remove();}};var check=function check(folder){var node=_tree.node();if(node&&node.key===folder){return true;}return false;};var adjust=function adjust(){_tree.adjust();};return{get:get,set:set,refresh:refresh,update:update,check:check,adjust:adjust,data:data};}();return{folders:{get:folders.get,set:folders.set,refresh:folders.refresh,update:folders.update,check:folders.check,adjust:folders.adjust},messages:{get:messages.get,sort:messages.sort},compose:compose.message};}(); diff --git a/extensions/mail/mail.min.js.gz b/extensions/mail/mail.min.js.gz index a53fa7bf045c434194b6c72d93afd903b7bb9e6a..f041df36e35789dd011ab780fd3cb7a9cacc6d8b 100644 GIT binary patch delta 15403 zcmV+`Jk-P8nE~9H0S6z82nc3?|FH)(5r5`9vI9N;6KUw~pyB+>(Xb^}qE#7=5Mw#k z94u|6ulq_odb@*1Z(fOpcROf!`w}$#AvUHOGnx-^zi3=qZ{rV*OC33{YTZn$2O2lW zSo-`L0*?*d-MrvR6@+*0oq44XxNA$VK@=4qPrQ_xIjW;Pc@E7`94U4mm)EE*pMOA+ z4+;BAQ;cr#85GO7M6rw?qu4sxKb0BTqrLs!MSbzLM00G*qsxg!xpgPnEgWe+D~=y| zl~u*3mVHXO3p(jwM|4mPf?_DMu~hhs?d=h!h&J+R?Gy^3k!~ZAZs;uX_Tg zSagKBIbx`e>rENgn{Bw>T=(qxD}RK}o{m{V_qL4g?KX68*U$y_AkTb2XG;$Y0G}7r zH>@$)CS@5$r)e0H+Dl8D*nEyB3+Ox!LW#tH0?@YSb-^|D@BkWjs>TI?VL<5pLO~%V zUGZWoi6M?RPaFQDk+MkM17be8%!vS|T&I?6oZ0^b;my3Rv$}X}6Jgu9ZGYKO)?jgh zHL9#3HOC;h?~eC#UFCE|1U2%6kHr12Ni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g;%|Vl)vU_KuOYPWepFJCE?3VR9h9UwwefAVuu1ZiR zm#Gj>IC3kAy@O}$)HT7}K%2 z9q6OBWy3@ty#~1|M1S)I`)VgSdQ#64@w#!zg)1XUZus=0d|#v0HF~CyAtv(I_`sHF z)?Hw8h%bt^vAKr}=LKzYlHeCHCsZkc@_n{gCL5z(o&@8n%!?yS;~Yv#gr8(XZEcEb zGJYz^MSUd)d%RvP{uS+hFov>8`e_1~Wy&t}|6aV@Ezs+pgnw{Y`2%v)4%}Y75w7s#94^svoLu(%lJdWpm*9?ZAisr4@nFb}JaxB? zd4I{YwB9LxX{}TKE2^ZZf&pt1+~B`IBNP*pF<;~b=MW%@KjL>Hib3NFsUIFc4YW}rhhk+@u@Yh2^w=3-6-dN}bg=XUzh?^yyF`zy(O`L5)&Sc|CMoWSoX=HZ4S(xwEo-fT2&eu-zO6 z7L$;3@PEy;{Fcd7Tbr3jQ|*IDh7WX`FY^#@Sy3m=Fd3zFW`pX(6{U z+;s*K5bLPTeX92*s&zy+w}1;rNuPsUEDN_Q{&p-4$U)g9`#r;NLIw>m(`^6{!>xAO zP&?;zxA9>c0>s#oywue*&v@K}eI*d{q;W_ZW*uXz2{C5-F;IE(y{~9BU4w_i}%f*+rmBl`L z97O;ELZ{XoLmLZq9UoKwnQxi+d~ueI^4JPTA|2S)a%whu^IRRcdC+^1=y>7$;jY%o zfx(USJIS~db%U-ffCynlX58EZ+KAh3%Mb)*inyXaG_j@x!B01AJ}#mz`c z)sU-*^dnW!3RZjO?)VBwn-@`?+x%WgK+oyUJTX0(Ki z)`X}yfC5gILIKG=p}Mm~3A$UAR_orCF~~6Vy<-nYCGzK1n ${data.language.pri.label} @@ -1838,8 +1838,8 @@ const mail = (function() { language[id] = $form.find(`[name=${id}]`).parent().prev().text(); } else if (['pri'].includes(id)) { let data = {}; - $form.find(`[name=${id}] option`).map(function() { - data[this.innerText.toLowerCase()] = this.innerText + $form.find(`[name=${id}] option`).map(function(ix) { + data[ix] = this.innerText }); language[id] = { label: $form.find(`[name=${id}]`).parent().prev().text(), data: data }; }