/* RainLoop Webmail (c) RainLoop Team | MIT */ (function(){function a(a){function l(){if(g&&d0&&clearTimeout(e),e=0},t.getEvent=function(e){return e=e&&(e.originalEvent?e.originalEvent:e)||o.event,e.dataTransfer?e:null},t.getValue=function(e,n,o){return e&&n&&!t.isUndefined(e[n])?e[n]:o},t.setValue=function(e,t,n){e[t]=n},t.isNonEmptyArray=function(e){return e&&e.length&&0a&&l&&(g=!0,l(u))});else if(i&&e.isDirectory&&e.createReader){var s=e.createReader(),p=0,d=0;s&&s.readEntries&&s.readEntries(function(i){if(i&&t.isNonEmptyArray(i))for(p=0,d=i.length;d>p;p++)m(i[p],n+e.name+"/",o,r)})}};if(i=t.isUndefined(i)?!0:!!i,o=t.isUndefined(o)?!1:!!o,a=t.isUndefined(a)?r.iDefLimit:t.pInt(a),u=a,f=a>0,e=e&&0p;p++)d=e[p],d&&(o?"file"===d.kind&&d.webkitGetAsEntry&&(c=d.webkitGetAsEntry(),c&&m(c,"",n,l)):!f||0<=--a?n(t.getDataFromFile(d)):f&&!g&&0>a&&l&&(g=!0,l(u)))},t.getDataFromInput=function(e,n,o,i){var r=e&&e.files&&0n;n++)if("files"===e.dataTransfer.types[n].toLowerCase()){t=!0;break}return t},t.getDataFromDragEvent=function(e,n,o,i,r){var a=null,l=null;e=t.getEvent(e),e&&(a=(e.dataTransfer?t.getValue(e.dataTransfer,"items",null):null)||t.getValue(e,"items",null),a&&0').css({opacity:0})},t.createNextInput=function(){return i('')},t.getNewInput=function(e,n){e=t.isUndefined(e)?"":e.toString();var o=t.createNextInput();return 0').attr("name","jua-post-type").val("iframe")),i.each(l,function(e,n){r.append(i('').attr("name",e).val(a.getStringOrCallFunction(n,[t])))}),r.trigger("submit"),u&&u(e),r.find("iframe").on("load",function(){var t=!1,a=null,l={};if(s){try{a=this.contentDocument?this.contentDocument:this.contentWindow.document,l=i.parseJSON(a.body.innerHTML),t=!0}catch(u){l={}}s(e,t,l)}n(null,e),o.setTimeout(function(){r.remove()},100)})):n(null,e),!0},t.prototype.generateNewInput=function(e){var t=this,n="",o=null,l=null,u=a.getValue(this.oOptions,"action",""),s=null;e&&(n=a.getNewUid(),o=a.getNewInput(a.getValue(this.oOptions,"name","juaFile"),!a.getValue(this.oOptions,"disableMultiple",!1)),s=i('
'),l=i('