diff --git a/js/jquery.plupload.queue/jquery.plupload.queue.js b/js/jquery.plupload.queue/jquery.plupload.queue.js
index ae8874d4..0b978ed8 100644
--- a/js/jquery.plupload.queue/jquery.plupload.queue.js
+++ b/js/jquery.plupload.queue/jquery.plupload.queue.js
@@ -223,7 +223,7 @@ used as it is.
fileList.append(
'
' +
- '' + file.name + '
' +
+ '' + plupload.xmlEncode(file.name) + '
' +
'' +
'' + file.percent + '%
' +
'' + plupload.formatSize(file.size) + '
' +
diff --git a/js/jquery.plupload.queue/jquery.plupload.queue.min.js b/js/jquery.plupload.queue/jquery.plupload.queue.min.js
index a8414035..42cf237c 100644
--- a/js/jquery.plupload.queue/jquery.plupload.queue.min.js
+++ b/js/jquery.plupload.queue/jquery.plupload.queue.min.js
@@ -1 +1 @@
-!function(t){function e(t){return plupload.translate(t)||t}function i(i,s){s.contents().each(function(e,i){i=t(i),i.is(".plupload")||i.remove()}),s.prepend('")}var s={};t.fn.pluploadQueue=function(n){return n?(this.each(function(){function a(e){var i;e.status==plupload.DONE&&(i="plupload_done"),e.status==plupload.FAILED&&(i="plupload_failed"),e.status==plupload.QUEUED&&(i="plupload_delete"),e.status==plupload.UPLOADING&&(i="plupload_uploading");var s=t("#"+e.id).attr("class",i).find("a").css("display","block");e.hint&&s.attr("title",e.hint)}function o(){t("span.plupload_total_status",d).html(u.total.percent+"%"),t("div.plupload_progress_bar",d).css("width",u.total.percent+"%"),t("span.plupload_upload_status",d).html(plupload.sprintf(e("Uploaded %d/%d files"),u.total.uploaded,u.files.length))}function l(){var i,s=t("ul.plupload_filelist",d).html(""),n=0;t.each(u.files,function(e,o){i="",o.status==plupload.DONE&&(o.target_name&&(i+=' '),i+=' ',i+=' ',n++,t("#"+p+"_count").val(n)),s.append(' '+''+o.name+"
"+''+''+o.percent+"%
"+''+plupload.formatSize(o.size)+"
"+'
'+i+" "),a(o),t("#"+o.id+".plupload_delete a").click(function(e){t("#"+o.id).remove(),u.removeFile(o),e.preventDefault()})}),t("span.plupload_total_file_size",d).html(plupload.formatSize(u.total.size)),0===u.total.queued?t("span.plupload_add_text",d).html(e("Add Files")):t("span.plupload_add_text",d).html(plupload.sprintf(e("%d files queued"),u.total.queued)),t("a.plupload_start",d).toggleClass("plupload_disabled",u.files.length==u.total.uploaded+u.total.failed),s[0].scrollTop=s[0].scrollHeight,o(),!u.files.length&&u.features.dragdrop&&u.settings.dragdrop&&t("#"+p+"_filelist").append(''+e("Drag files here.")+" ")}function r(){delete s[p],u.destroy(),d.html(c),u=d=c=null}var u,d,p,c;d=t(this),p=d.attr("id"),p||(p=plupload.guid(),d.attr("id",p)),c=d.html(),i(p,d),n=t.extend({dragdrop:!0,browse_button:p+"_browse",container:p},n),n.dragdrop&&(n.drop_element=p+"_filelist"),u=new plupload.Uploader(n),s[p]=u,u.bind("UploadFile",function(e,i){t("#"+i.id).addClass("plupload_current_file")}),u.bind("Init",function(e,i){!n.unique_names&&n.rename&&d.on("click","#"+p+"_filelist div.plupload_file_name span",function(i){var s,n,a,o=t(i.target),l="";s=e.getFile(o.parents("li")[0].id),a=s.name,n=/^(.+)(\.[^.]+)$/.exec(a),n&&(a=n[1],l=n[2]),o.hide().after(' '),o.next().val(a).focus().blur(function(){o.show().next().remove()}).keydown(function(e){var i=t(this);13==e.keyCode&&(e.preventDefault(),s.name=i.val()+l,o.text(s.name),i.blur())})}),t("#"+p+"_container").attr("title","Using runtime: "+i.runtime),t("a.plupload_start",d).click(function(e){t(this).hasClass("plupload_disabled")||u.start(),e.preventDefault()}),t("a.plupload_stop",d).click(function(t){t.preventDefault(),u.stop()}),t("a.plupload_start",d).addClass("plupload_disabled")}),u.bind("Error",function(i,s){var n,a=s.file;a&&(n=s.message,s.details&&(n+=" ("+s.details+")"),s.code==plupload.FILE_SIZE_ERROR&&alert(e("Error: File too large:")+" "+a.name),s.code==plupload.FILE_EXTENSION_ERROR&&alert(e("Error: Invalid file extension:")+" "+a.name),a.hint=n,t("#"+a.id).attr("class","plupload_failed").find("a").css("display","block").attr("title",n)),s.code===plupload.INIT_ERROR&&setTimeout(function(){r()},1)}),u.bind("PostInit",function(i){i.settings.dragdrop&&i.features.dragdrop&&t("#"+p+"_filelist").append(''+e("Drag files here.")+" ")}),u.init(),u.bind("StateChanged",function(){u.state===plupload.STARTED?(t("li.plupload_delete a,div.plupload_buttons",d).hide(),u.disableBrowse(!0),t("span.plupload_upload_status,div.plupload_progress,a.plupload_stop",d).css("display","block"),t("span.plupload_upload_status",d).html("Uploaded "+u.total.uploaded+"/"+u.files.length+" files"),n.multiple_queues&&t("span.plupload_total_status,span.plupload_total_file_size",d).show()):(l(),t("a.plupload_stop,div.plupload_progress",d).hide(),t("a.plupload_delete",d).css("display","block"),n.multiple_queues&&u.total.uploaded+u.total.failed==u.files.length&&(t(".plupload_buttons,.plupload_upload_status",d).css("display","inline"),u.disableBrowse(!1),t(".plupload_start",d).addClass("plupload_disabled"),t("span.plupload_total_status,span.plupload_total_file_size",d).hide()))}),u.bind("FilesAdded",l),u.bind("FilesRemoved",function(){var e=t("#"+p+"_filelist").scrollTop();l(),t("#"+p+"_filelist").scrollTop(e)}),u.bind("FileUploaded",function(t,e){a(e)}),u.bind("UploadProgress",function(e,i){t("#"+i.id+" div.plupload_file_status",d).html(i.percent+"%"),a(i),o()}),n.setup&&n.setup(u)}),this):s[t(this[0]).attr("id")]}}(jQuery);
\ No newline at end of file
+!function(t){function e(t){return plupload.translate(t)||t}function i(i,s){s.contents().each(function(e,i){i=t(i),i.is(".plupload")||i.remove()}),s.prepend('")}var s={};t.fn.pluploadQueue=function(n){return n?(this.each(function(){function a(e){var i;e.status==plupload.DONE&&(i="plupload_done"),e.status==plupload.FAILED&&(i="plupload_failed"),e.status==plupload.QUEUED&&(i="plupload_delete"),e.status==plupload.UPLOADING&&(i="plupload_uploading");var s=t("#"+e.id).attr("class",i).find("a").css("display","block");e.hint&&s.attr("title",e.hint)}function o(){t("span.plupload_total_status",d).html(u.total.percent+"%"),t("div.plupload_progress_bar",d).css("width",u.total.percent+"%"),t("span.plupload_upload_status",d).html(plupload.sprintf(e("Uploaded %d/%d files"),u.total.uploaded,u.files.length))}function l(){var i,s=t("ul.plupload_filelist",d).html(""),n=0;t.each(u.files,function(e,o){i="",o.status==plupload.DONE&&(o.target_name&&(i+=' '),i+=' ',i+=' ',n++,t("#"+p+"_count").val(n)),s.append(''+''+plupload.xmlEncode(o.name)+"
"+''+''+o.percent+"%
"+''+plupload.formatSize(o.size)+"
"+'
'+i+" "),a(o),t("#"+o.id+".plupload_delete a").click(function(e){t("#"+o.id).remove(),u.removeFile(o),e.preventDefault()})}),t("span.plupload_total_file_size",d).html(plupload.formatSize(u.total.size)),0===u.total.queued?t("span.plupload_add_text",d).html(e("Add Files")):t("span.plupload_add_text",d).html(plupload.sprintf(e("%d files queued"),u.total.queued)),t("a.plupload_start",d).toggleClass("plupload_disabled",u.files.length==u.total.uploaded+u.total.failed),s[0].scrollTop=s[0].scrollHeight,o(),!u.files.length&&u.features.dragdrop&&u.settings.dragdrop&&t("#"+p+"_filelist").append(''+e("Drag files here.")+" ")}function r(){delete s[p],u.destroy(),d.html(c),u=d=c=null}var u,d,p,c;d=t(this),p=d.attr("id"),p||(p=plupload.guid(),d.attr("id",p)),c=d.html(),i(p,d),n=t.extend({dragdrop:!0,browse_button:p+"_browse",container:p},n),n.dragdrop&&(n.drop_element=p+"_filelist"),u=new plupload.Uploader(n),s[p]=u,u.bind("UploadFile",function(e,i){t("#"+i.id).addClass("plupload_current_file")}),u.bind("Init",function(e,i){!n.unique_names&&n.rename&&d.on("click","#"+p+"_filelist div.plupload_file_name span",function(i){var s,n,a,o=t(i.target),l="";s=e.getFile(o.parents("li")[0].id),a=s.name,n=/^(.+)(\.[^.]+)$/.exec(a),n&&(a=n[1],l=n[2]),o.hide().after(' '),o.next().val(a).focus().blur(function(){o.show().next().remove()}).keydown(function(e){var i=t(this);13==e.keyCode&&(e.preventDefault(),s.name=i.val()+l,o.text(s.name),i.blur())})}),t("#"+p+"_container").attr("title","Using runtime: "+i.runtime),t("a.plupload_start",d).click(function(e){t(this).hasClass("plupload_disabled")||u.start(),e.preventDefault()}),t("a.plupload_stop",d).click(function(t){t.preventDefault(),u.stop()}),t("a.plupload_start",d).addClass("plupload_disabled")}),u.bind("Error",function(i,s){var n,a=s.file;a&&(n=s.message,s.details&&(n+=" ("+s.details+")"),s.code==plupload.FILE_SIZE_ERROR&&alert(e("Error: File too large:")+" "+a.name),s.code==plupload.FILE_EXTENSION_ERROR&&alert(e("Error: Invalid file extension:")+" "+a.name),a.hint=n,t("#"+a.id).attr("class","plupload_failed").find("a").css("display","block").attr("title",n)),s.code===plupload.INIT_ERROR&&setTimeout(function(){r()},1)}),u.bind("PostInit",function(i){i.settings.dragdrop&&i.features.dragdrop&&t("#"+p+"_filelist").append(''+e("Drag files here.")+" ")}),u.init(),u.bind("StateChanged",function(){u.state===plupload.STARTED?(t("li.plupload_delete a,div.plupload_buttons",d).hide(),u.disableBrowse(!0),t("span.plupload_upload_status,div.plupload_progress,a.plupload_stop",d).css("display","block"),t("span.plupload_upload_status",d).html("Uploaded "+u.total.uploaded+"/"+u.files.length+" files"),n.multiple_queues&&t("span.plupload_total_status,span.plupload_total_file_size",d).show()):(l(),t("a.plupload_stop,div.plupload_progress",d).hide(),t("a.plupload_delete",d).css("display","block"),n.multiple_queues&&u.total.uploaded+u.total.failed==u.files.length&&(t(".plupload_buttons,.plupload_upload_status",d).css("display","inline"),u.disableBrowse(!1),t(".plupload_start",d).addClass("plupload_disabled"),t("span.plupload_total_status,span.plupload_total_file_size",d).hide()))}),u.bind("FilesAdded",l),u.bind("FilesRemoved",function(){var e=t("#"+p+"_filelist").scrollTop();l(),t("#"+p+"_filelist").scrollTop(e)}),u.bind("FileUploaded",function(t,e){a(e)}),u.bind("UploadProgress",function(e,i){t("#"+i.id+" div.plupload_file_status",d).html(i.percent+"%"),a(i),o()}),n.setup&&n.setup(u)}),this):s[t(this[0]).attr("id")]}}(jQuery);
\ No newline at end of file
diff --git a/js/jquery.ui.plupload/jquery.ui.plupload.js b/js/jquery.ui.plupload/jquery.ui.plupload.js
index 5907c56b..68cdbbbd 100644
--- a/js/jquery.ui.plupload/jquery.ui.plupload.js
+++ b/js/jquery.ui.plupload/jquery.ui.plupload.js
@@ -1165,7 +1165,7 @@ $.widget("ui.plupload", {
return ext;
default:
- return file[$1] || '';
+ return plupload.xmlEncode(file[$1] || '');
}
});
});
diff --git a/js/jquery.ui.plupload/jquery.ui.plupload.min.js b/js/jquery.ui.plupload/jquery.ui.plupload.min.js
index 34fff3a5..168b849a 100644
--- a/js/jquery.ui.plupload/jquery.ui.plupload.min.js
+++ b/js/jquery.ui.plupload/jquery.ui.plupload.min.js
@@ -1 +1 @@
-!function(t,e,i,s){function n(t){return i.translate(t)||t}function o(t){t.id=t.attr("id"),t.html('"+'"+'
'+'
'+n("Drag files here.")+"
"+'
'+'
'+"
"+'"+"
"+'
'+"
")}var a={};s.widget("ui.plupload",{widgetEventPrefix:"",contents_bak:"",options:{browse_button_hover:"ui-state-hover",browse_button_active:"ui-state-active",filters:{},buttons:{browse:!0,start:!0,stop:!0},views:{list:!0,thumbs:!1,active:"list",remember:!0},thumb_width:100,thumb_height:60,multiple_queues:!0,dragdrop:!0,autostart:!1,sortable:!1,rename:!1},FILE_COUNT_ERROR:-9001,_create:function(){var t=this.element.attr("id");t||(t=i.guid(),this.element.attr("id",t)),this.id=t,this.contents_bak=this.element.html(),o(this.element),this.container=s(".plupload_container",this.element).attr("id",t+"_container"),this.content=s(".plupload_content",this.element),s.fn.resizable&&this.container.resizable({handles:"s",minHeight:300}),this.filelist=s(".plupload_filelist_content",this.container).attr({id:t+"_filelist",unselectable:"on"}),this.browse_button=s(".plupload_add",this.container).attr("id",t+"_browse"),this.start_button=s(".plupload_start",this.container).attr("id",t+"_start"),this.stop_button=s(".plupload_stop",this.container).attr("id",t+"_stop"),this.thumbs_switcher=s("#"+t+"_view_thumbs"),this.list_switcher=s("#"+t+"_view_list"),s.ui.button&&(this.browse_button.button({icons:{primary:"ui-icon-circle-plus"},disabled:!0}),this.start_button.button({icons:{primary:"ui-icon-circle-arrow-e"},disabled:!0}),this.stop_button.button({icons:{primary:"ui-icon-circle-close"}}),this.list_switcher.button({text:!1,icons:{secondary:"ui-icon-grip-dotted-horizontal"}}),this.thumbs_switcher.button({text:!1,icons:{secondary:"ui-icon-image"}})),this.progressbar=s(".plupload_progress_container",this.container),s.ui.progressbar&&this.progressbar.progressbar(),this.counter=s(".plupload_count",this.element).attr({id:t+"_count",name:t+"_count"}),this._initUploader()},_initUploader:function(){var t,e=this,o=this.id,r={container:o+"_buttons",browse_button:o+"_browse",required_features:{},filters:{}};s(".plupload_buttons",this.element).attr("id",o+"_buttons"),e.options.dragdrop&&(this.filelist.parent().attr("id",this.id+"_dropbox"),r.drop_element=this.id+"_dropbox"),this.filelist.on("click",function(t){s(t.target).hasClass("plupload_action_icon")&&(e.removeFile(s(t.target).closest(".plupload_file").attr("id")),t.preventDefault())}),e.options.views.thumbs&&(r.required_features.display_media=!0),e.options.max_file_count&&(r.filters.max_file_count=e.options.max_file_count),t=this.uploader=a[o]=new i.Uploader(s.extend(this.options,r)),this.options=t.getOption(),i.addFileFilter("max_file_count",function(t,i,s){t<=this.files.length-(this.total.uploaded+this.total.failed)?(e.browse_button.button("disable"),this.disableBrowse(),this.trigger("Error",{code:e.FILE_COUNT_ERROR,message:n("File count error."),file:i}),s(!1)):s(!0)}),t.bind("Error",function(t,s){var o,a="";switch(o=""+s.message+" ",s.code){case i.FILE_EXTENSION_ERROR:a=i.sprintf(n("File: %s"),s.file.name);break;case i.FILE_SIZE_ERROR:a=i.sprintf(n("File: %s, size: %d, max file size: %d"),s.file.name,i.formatSize(s.file.size),i.formatSize(i.parseSize(t.getOption("filters").max_file_size)));break;case i.FILE_DUPLICATE_ERROR:a=i.sprintf(n("%s already present in the queue."),s.file.name);break;case e.FILE_COUNT_ERROR:a=i.sprintf(n("Upload element accepts only %d file(s) at a time. Extra files were stripped."),t.getOption("filters").max_file_count||0);break;case i.IMAGE_FORMAT_ERROR:a=n("Image format either wrong or not supported.");break;case i.IMAGE_MEMORY_ERROR:a=n("Runtime ran out of available memory.");break;case i.HTTP_ERROR:a=n("Upload URL might be wrong or doesn't exist.")}o+=" "+i.xmlEncode(a)+" ",e._trigger("error",null,{up:t,error:s}),s.code===i.INIT_ERROR?setTimeout(function(){e.destroy()},1):e.notify("error",o)}),t.bind("PostInit",function(t){e.options.buttons.browse?e.browse_button.button("enable"):(e.browse_button.button("disable").hide(),t.disableBrowse(!0)),e.options.buttons.start||e.start_button.button("disable").hide(),e.options.buttons.stop||e.stop_button.button("disable").hide(),!e.options.unique_names&&e.options.rename&&e._enableRenaming(),e.options.dragdrop&&t.features.dragdrop&&e.filelist.parent().addClass("plupload_dropbox"),e._enableViewSwitcher(),e.start_button.click(function(t){s(this).button("option","disabled")||e.start(),t.preventDefault()}),e.stop_button.click(function(t){e.stop(),t.preventDefault()}),e._trigger("ready",null,{up:t})}),t.init(),t.bind("FileFiltered",function(t,i){e._addFiles(i)}),t.bind("FilesAdded",function(t,i){e._trigger("selected",null,{up:t,files:i}),e.options.sortable&&s.ui.sortable&&e._enableSortingList(),e._trigger("updatelist",null,{filelist:e.filelist}),e.options.autostart&&setTimeout(function(){e.start()},10)}),t.bind("FilesRemoved",function(t,i){s.ui.sortable&&e.options.sortable&&s("tbody",e.filelist).sortable("destroy"),s.each(i,function(t,e){s("#"+e.id).toggle("highlight",function(){s(this).remove()})}),t.files.length&&e.options.sortable&&s.ui.sortable&&e._enableSortingList(),e._trigger("updatelist",null,{filelist:e.filelist}),e._trigger("removed",null,{up:t,files:i})}),t.bind("QueueChanged",function(){e._handleState()}),t.bind("StateChanged",function(t){e._handleState(),i.STARTED===t.state?e._trigger("started",null,{up:this.uploader}):i.STOPPED===t.state&&e._trigger("stopped",null,{up:this.uploader})}),t.bind("UploadFile",function(t,i){e._handleFileStatus(i)}),t.bind("FileUploaded",function(t,i,s){e._handleFileStatus(i),e._trigger("uploaded",null,{up:t,file:i,result:s})}),t.bind("UploadProgress",function(t,i){e._handleFileStatus(i),e._updateTotalProgress(),e._trigger("progress",null,{up:t,file:i})}),t.bind("UploadComplete",function(t,i){e._addFormFields(),e._trigger("complete",null,{up:t,files:i})})},_setOption:function(t,e){var i=this;"buttons"==t&&"object"==typeof e&&(e=s.extend(i.options.buttons,e),e.browse?(i.browse_button.button("enable").show(),i.uploader.disableBrowse(!1)):(i.browse_button.button("disable").hide(),i.uploader.disableBrowse(!0)),e.start?i.start_button.button("enable").show():i.start_button.button("disable").hide(),e.stop?i.start_button.button("enable").show():i.stop_button.button("disable").hide()),i.uploader.setOption(t,e)},start:function(){this.uploader.start()},stop:function(){this.uploader.stop()},enable:function(){this.browse_button.button("enable"),this.uploader.disableBrowse(!1)},disable:function(){this.browse_button.button("disable"),this.uploader.disableBrowse(!0)},getFile:function(t){var e;return e="number"==typeof t?this.uploader.files[t]:this.uploader.getFile(t)},getFiles:function(){return this.uploader.files},removeFile:function(t){"string"===i.typeOf(t)&&(t=this.getFile(t)),this.uploader.removeFile(t)},clearQueue:function(){this.uploader.splice()},getUploader:function(){return this.uploader},refresh:function(){this.uploader.refresh()},notify:function(t,e){var i=s('");i.addClass("ui-state-"+("error"===t?"error":"highlight")).find("p .ui-icon").addClass("ui-icon-"+("error"===t?"alert":"info")).end().find(".plupload_message_close").click(function(){i.remove()}).end(),s(".plupload_header",this.container).append(i)},destroy:function(){this.uploader.destroy(),s(".plupload_button",this.element).unbind(),s.ui.button&&s(".plupload_add, .plupload_start, .plupload_stop",this.container).button("destroy"),s.ui.progressbar&&this.progressbar.progressbar("destroy"),s.ui.sortable&&this.options.sortable&&s("tbody",this.filelist).sortable("destroy"),this.element.empty().html(this.contents_bak),this.contents_bak="",s.Widget.prototype.destroy.apply(this)},_handleState:function(){var t=this.uploader,e=t.files.length-(t.total.uploaded+t.total.failed),o=t.getOption("filters").max_file_count||0;i.STARTED===t.state?(s([]).add(this.stop_button).add(".plupload_started").removeClass("plupload_hidden"),this.start_button.button("disable"),this.options.multiple_queues||(this.browse_button.button("disable"),t.disableBrowse()),s(".plupload_upload_status",this.element).html(i.sprintf(n("Uploaded %d/%d files"),t.total.uploaded,t.files.length)),s(".plupload_header_content",this.element).addClass("plupload_header_content_bw")):i.STOPPED===t.state&&(s([]).add(this.stop_button).add(".plupload_started").addClass("plupload_hidden"),e?this.start_button.button("enable"):this.start_button.button("disable"),this.options.multiple_queues&&s(".plupload_header_content",this.element).removeClass("plupload_header_content_bw"),this.options.multiple_queues&&o&&o>e&&(this.browse_button.button("enable"),t.disableBrowse(!1)),this.container.toggleClass("plupload_files_queued",t.files.length),this._updateTotalProgress()),0===t.total.queued?s(".ui-button-text",this.browse_button).html(n("Add Files")):s(".ui-button-text",this.browse_button).html(i.sprintf(n("%d files queued"),t.total.queued)),t.refresh()},_handleFileStatus:function(t){var e,n,o=s("#"+t.id);if(o.length){switch(t.status){case i.DONE:e="plupload_done",n="plupload_action_icon ui-icon ui-icon-circle-check";break;case i.FAILED:e="ui-state-error plupload_failed",n="plupload_action_icon ui-icon ui-icon-alert";break;case i.QUEUED:e="plupload_delete",n="plupload_action_icon ui-icon ui-icon-circle-minus";break;case i.UPLOADING:e="ui-state-highlight plupload_uploading",n="plupload_action_icon ui-icon ui-icon-circle-arrow-w";var a=s(".plupload_scroll",this.container),r=a.scrollTop(),l=a.height(),u=o.position().top+o.height();u>l&&a.scrollTop(r+u-l),o.find(".plupload_file_percent").html(t.percent+"%").end().find(".plupload_file_progress").css("width",t.percent+"%").end().find(".plupload_file_size").html(i.formatSize(t.size))}e+=" ui-state-default plupload_file",o.attr("class",e).find(".plupload_action_icon").attr("class",n)}},_updateTotalProgress:function(){var t=this.uploader;this.filelist[0].scrollTop=this.filelist[0].scrollHeight,this.progressbar.progressbar("value",t.total.percent),this.element.find(".plupload_total_status").html(t.total.percent+"%").end().find(".plupload_total_file_size").html(i.formatSize(t.total.size)).end().find(".plupload_upload_status").html(i.sprintf(n("Uploaded %d/%d files"),t.total.uploaded,t.files.length))},_displayThumbs:function(){function t(t,e,i){var s;t.on(e,function(){clearTimeout(s),s=setTimeout(function(){clearTimeout(s),i()},300)})}function e(){if(!l||!u){var t=s(".plupload_file:eq(0)",p.filelist);l=t.outerWidth(!0),u=t.outerHeight(!0)}var e=p.content.width(),i=p.content.height();d=Math.floor(e/l),c=d*(Math.ceil(i/u)+1)}function n(){var t=Math.floor(p.content.scrollTop()/u)*d;h=s(".plupload_file .plupload_file_thumb",p.filelist).slice(t,t+c).filter(".plupload_thumb_toload").get()}function o(){function i(){"thumbs"===p.view_mode&&(e(),n(),r())}s.fn.resizable&&t(p.container,"resize",i),t(p.window,"resize",i),t(p.content,"scroll",i),p.element.on("viewchanged selected",i),i()}function a(t,e){var n=new i.Image;n.onload=function(){var e=s("#"+t.id+" .plupload_file_thumb",p.filelist);this.embed(e[0],{width:p.options.thumb_width,height:p.options.thumb_height,crop:!0,fit:!0,preserveHeaders:!1,swf_url:i.resolveUrl(p.options.flash_swf_url),xap_url:i.resolveUrl(p.options.silverlight_xap_url)})},n.bind("embedded error",function(i){s("#"+t.id,p.filelist).find(".plupload_file_thumb").removeClass("plupload_thumb_loading").addClass("plupload_thumb_"+i.type),this.destroy(),setTimeout(e,1)}),s("#"+t.id,p.filelist).find(".plupload_file_thumb").removeClass("plupload_thumb_toload").addClass("plupload_thumb_loading"),n.load(t.getSource())}function r(){"thumbs"!==p.view_mode||f||(n(),h.length&&(f=!0,a(p.getFile(s(h.shift()).closest(".plupload_file").attr("id")),function(){f=!1,r()})))}var l,u,d,p=this,c=0,h=[],f=!1;this.options.views.thumbs&&this.element.on("selected",function _(){p.element.off("selected",_),o()})},_addFiles:function(t){var e,n=this,o="";e='{percent}
{name}
{size}
',"array"!==i.typeOf(t)&&(t=[t]),s.each(t,function(t,s){var a=s.name.match(/\.([^.]+)$/),r=a&&a[1].toLowerCase()||"none";o+=e.replace(/\{(\w+)\}/g,function(t,e){switch(e){case"thumb_width":case"thumb_height":return n.options[e];case"size":return i.formatSize(s.size);case"ext":return r;default:return s[e]||""}})}),n.filelist.append(o)},_addFormFields:function(){var t=this;s(".plupload_file_fields",this.filelist).html(""),i.each(this.uploader.files,function(e,n){var o="",a=t.id+"_"+n;e.target_name&&(o+=' '),o+=' ',o+=' ',s("#"+e.id).find(".plupload_file_fields").html(o)}),this.counter.val(this.uploader.files.length)},_viewChanged:function(t){this.options.views.remember&&s.cookie&&s.cookie("plupload_ui_view",t,{expires:7,path:"/"}),"IE"===i.ua.browser&&i.ua.version<7&&this.content.attr("style",'height:expression(document.getElementById("'+this.id+"_container"+'").clientHeight - '+("list"===t?132:102)+")"),this.container.removeClass("plupload_view_list plupload_view_thumbs").addClass("plupload_view_"+t),this.view_mode=t,this._trigger("viewchanged",null,{view:t})},_enableViewSwitcher:function(){var t,e,n,o=this,a=s(".plupload_view_switch",this.container);i.each(["list","thumbs"],function(t){o.options.views[t]||a.find('[for="'+o.id+"_view_"+t+'"], #'+o.id+"_view_"+t).remove()}),e=a.find(".plupload_button"),1===e.length?(a.hide(),t=e.eq(0).data("view"),this._viewChanged(t)):s.ui.button&&e.length>1?(this.options.views.remember&&s.cookie&&(t=s.cookie("plupload_ui_view")),~i.inArray(t,["list","thumbs"])||(t=this.options.views.active),a.show().buttonset().find(".ui-button").click(function(e){t=s(this).data("view"),o._viewChanged(t),e.preventDefault()}),n=a.find('[for="'+o.id+"_view_"+t+'"]'),n.length&&n.trigger("click")):(a.show(),this._viewChanged(this.options.views.active)),this.options.views.thumbs&&this._displayThumbs()},_enableRenaming:function(){var t=this;this.filelist.dblclick(function(e){var i,n,o,a,r=s(e.target),l="";r.hasClass("plupload_file_name_wrapper")&&(n=t.uploader.getFile(r.closest(".plupload_file")[0].id),a=n.name,o=/^(.+)(\.[^.]+)$/.exec(a),o&&(a=o[1],l=o[2]),i=s(' ').width(r.width()).insertAfter(r.hide()),i.val(a).blur(function(){r.show().parent().scrollLeft(0).end().next().remove()}).keydown(function(t){var e=s(this);-1!==s.inArray(t.keyCode,[13,27])&&(t.preventDefault(),13===t.keyCode&&(n.name=e.val()+l,r.text(n.name)),e.blur())})[0].focus())})},_enableSortingList:function(){var t=this;s(".plupload_file",this.filelist).length<2||(s("tbody",this.filelist).sortable("destroy"),this.filelist.sortable({items:".plupload_delete",cancel:"object, .plupload_clearer",stop:function(){var e=[];s.each(s(this).sortable("toArray"),function(i,s){e[e.length]=t.uploader.getFile(s)}),e.unshift(e.length),e.unshift(0),Array.prototype.splice.apply(t.uploader.files,e)}}))}})}(window,document,plupload,jQuery);
\ No newline at end of file
+!function(t,e,i,s){function n(t){return i.translate(t)||t}function o(t){t.id=t.attr("id"),t.html('"+'"+'
'+'
'+n("Drag files here.")+"
"+'
'+'
'+"
"+'"+"
"+'
'+"
")}var a={};s.widget("ui.plupload",{widgetEventPrefix:"",contents_bak:"",options:{browse_button_hover:"ui-state-hover",browse_button_active:"ui-state-active",filters:{},buttons:{browse:!0,start:!0,stop:!0},views:{list:!0,thumbs:!1,active:"list",remember:!0},thumb_width:100,thumb_height:60,multiple_queues:!0,dragdrop:!0,autostart:!1,sortable:!1,rename:!1},FILE_COUNT_ERROR:-9001,_create:function(){var t=this.element.attr("id");t||(t=i.guid(),this.element.attr("id",t)),this.id=t,this.contents_bak=this.element.html(),o(this.element),this.container=s(".plupload_container",this.element).attr("id",t+"_container"),this.content=s(".plupload_content",this.element),s.fn.resizable&&this.container.resizable({handles:"s",minHeight:300}),this.filelist=s(".plupload_filelist_content",this.container).attr({id:t+"_filelist",unselectable:"on"}),this.browse_button=s(".plupload_add",this.container).attr("id",t+"_browse"),this.start_button=s(".plupload_start",this.container).attr("id",t+"_start"),this.stop_button=s(".plupload_stop",this.container).attr("id",t+"_stop"),this.thumbs_switcher=s("#"+t+"_view_thumbs"),this.list_switcher=s("#"+t+"_view_list"),s.ui.button&&(this.browse_button.button({icons:{primary:"ui-icon-circle-plus"},disabled:!0}),this.start_button.button({icons:{primary:"ui-icon-circle-arrow-e"},disabled:!0}),this.stop_button.button({icons:{primary:"ui-icon-circle-close"}}),this.list_switcher.button({text:!1,icons:{secondary:"ui-icon-grip-dotted-horizontal"}}),this.thumbs_switcher.button({text:!1,icons:{secondary:"ui-icon-image"}})),this.progressbar=s(".plupload_progress_container",this.container),s.ui.progressbar&&this.progressbar.progressbar(),this.counter=s(".plupload_count",this.element).attr({id:t+"_count",name:t+"_count"}),this._initUploader()},_initUploader:function(){var t,e=this,o=this.id,r={container:o+"_buttons",browse_button:o+"_browse",required_features:{},filters:{}};s(".plupload_buttons",this.element).attr("id",o+"_buttons"),e.options.dragdrop&&(this.filelist.parent().attr("id",this.id+"_dropbox"),r.drop_element=this.id+"_dropbox"),this.filelist.on("click",function(t){s(t.target).hasClass("plupload_action_icon")&&(e.removeFile(s(t.target).closest(".plupload_file").attr("id")),t.preventDefault())}),e.options.views.thumbs&&(r.required_features.display_media=!0),e.options.max_file_count&&(r.filters.max_file_count=e.options.max_file_count),t=this.uploader=a[o]=new i.Uploader(s.extend(this.options,r)),this.options=t.getOption(),i.addFileFilter("max_file_count",function(t,i,s){t<=this.files.length-(this.total.uploaded+this.total.failed)?(e.browse_button.button("disable"),this.disableBrowse(),this.trigger("Error",{code:e.FILE_COUNT_ERROR,message:n("File count error."),file:i}),s(!1)):s(!0)}),t.bind("Error",function(t,s){var o,a="";switch(o=""+s.message+" ",s.code){case i.FILE_EXTENSION_ERROR:a=i.sprintf(n("File: %s"),s.file.name);break;case i.FILE_SIZE_ERROR:a=i.sprintf(n("File: %s, size: %d, max file size: %d"),s.file.name,i.formatSize(s.file.size),i.formatSize(i.parseSize(t.getOption("filters").max_file_size)));break;case i.FILE_DUPLICATE_ERROR:a=i.sprintf(n("%s already present in the queue."),s.file.name);break;case e.FILE_COUNT_ERROR:a=i.sprintf(n("Upload element accepts only %d file(s) at a time. Extra files were stripped."),t.getOption("filters").max_file_count||0);break;case i.IMAGE_FORMAT_ERROR:a=n("Image format either wrong or not supported.");break;case i.IMAGE_MEMORY_ERROR:a=n("Runtime ran out of available memory.");break;case i.HTTP_ERROR:a=n("Upload URL might be wrong or doesn't exist.")}o+=" "+i.xmlEncode(a)+" ",e._trigger("error",null,{up:t,error:s}),s.code===i.INIT_ERROR?setTimeout(function(){e.destroy()},1):e.notify("error",o)}),t.bind("PostInit",function(t){e.options.buttons.browse?e.browse_button.button("enable"):(e.browse_button.button("disable").hide(),t.disableBrowse(!0)),e.options.buttons.start||e.start_button.button("disable").hide(),e.options.buttons.stop||e.stop_button.button("disable").hide(),!e.options.unique_names&&e.options.rename&&e._enableRenaming(),e.options.dragdrop&&t.features.dragdrop&&e.filelist.parent().addClass("plupload_dropbox"),e._enableViewSwitcher(),e.start_button.click(function(t){s(this).button("option","disabled")||e.start(),t.preventDefault()}),e.stop_button.click(function(t){e.stop(),t.preventDefault()}),e._trigger("ready",null,{up:t})}),t.init(),t.bind("FileFiltered",function(t,i){e._addFiles(i)}),t.bind("FilesAdded",function(t,i){e._trigger("selected",null,{up:t,files:i}),e.options.sortable&&s.ui.sortable&&e._enableSortingList(),e._trigger("updatelist",null,{filelist:e.filelist}),e.options.autostart&&setTimeout(function(){e.start()},10)}),t.bind("FilesRemoved",function(t,i){s.ui.sortable&&e.options.sortable&&s("tbody",e.filelist).sortable("destroy"),s.each(i,function(t,e){s("#"+e.id).toggle("highlight",function(){s(this).remove()})}),t.files.length&&e.options.sortable&&s.ui.sortable&&e._enableSortingList(),e._trigger("updatelist",null,{filelist:e.filelist}),e._trigger("removed",null,{up:t,files:i})}),t.bind("QueueChanged",function(){e._handleState()}),t.bind("StateChanged",function(t){e._handleState(),i.STARTED===t.state?e._trigger("started",null,{up:this.uploader}):i.STOPPED===t.state&&e._trigger("stopped",null,{up:this.uploader})}),t.bind("UploadFile",function(t,i){e._handleFileStatus(i)}),t.bind("FileUploaded",function(t,i,s){e._handleFileStatus(i),e._trigger("uploaded",null,{up:t,file:i,result:s})}),t.bind("UploadProgress",function(t,i){e._handleFileStatus(i),e._updateTotalProgress(),e._trigger("progress",null,{up:t,file:i})}),t.bind("UploadComplete",function(t,i){e._addFormFields(),e._trigger("complete",null,{up:t,files:i})})},_setOption:function(t,e){var i=this;"buttons"==t&&"object"==typeof e&&(e=s.extend(i.options.buttons,e),e.browse?(i.browse_button.button("enable").show(),i.uploader.disableBrowse(!1)):(i.browse_button.button("disable").hide(),i.uploader.disableBrowse(!0)),e.start?i.start_button.button("enable").show():i.start_button.button("disable").hide(),e.stop?i.start_button.button("enable").show():i.stop_button.button("disable").hide()),i.uploader.setOption(t,e)},start:function(){this.uploader.start()},stop:function(){this.uploader.stop()},enable:function(){this.browse_button.button("enable"),this.uploader.disableBrowse(!1)},disable:function(){this.browse_button.button("disable"),this.uploader.disableBrowse(!0)},getFile:function(t){var e;return e="number"==typeof t?this.uploader.files[t]:this.uploader.getFile(t)},getFiles:function(){return this.uploader.files},removeFile:function(t){"string"===i.typeOf(t)&&(t=this.getFile(t)),this.uploader.removeFile(t)},clearQueue:function(){this.uploader.splice()},getUploader:function(){return this.uploader},refresh:function(){this.uploader.refresh()},notify:function(t,e){var i=s('");i.addClass("ui-state-"+("error"===t?"error":"highlight")).find("p .ui-icon").addClass("ui-icon-"+("error"===t?"alert":"info")).end().find(".plupload_message_close").click(function(){i.remove()}).end(),s(".plupload_header",this.container).append(i)},destroy:function(){this.uploader.destroy(),s(".plupload_button",this.element).unbind(),s.ui.button&&s(".plupload_add, .plupload_start, .plupload_stop",this.container).button("destroy"),s.ui.progressbar&&this.progressbar.progressbar("destroy"),s.ui.sortable&&this.options.sortable&&s("tbody",this.filelist).sortable("destroy"),this.element.empty().html(this.contents_bak),this.contents_bak="",s.Widget.prototype.destroy.apply(this)},_handleState:function(){var t=this.uploader,e=t.files.length-(t.total.uploaded+t.total.failed),o=t.getOption("filters").max_file_count||0;i.STARTED===t.state?(s([]).add(this.stop_button).add(".plupload_started").removeClass("plupload_hidden"),this.start_button.button("disable"),this.options.multiple_queues||(this.browse_button.button("disable"),t.disableBrowse()),s(".plupload_upload_status",this.element).html(i.sprintf(n("Uploaded %d/%d files"),t.total.uploaded,t.files.length)),s(".plupload_header_content",this.element).addClass("plupload_header_content_bw")):i.STOPPED===t.state&&(s([]).add(this.stop_button).add(".plupload_started").addClass("plupload_hidden"),e?this.start_button.button("enable"):this.start_button.button("disable"),this.options.multiple_queues&&s(".plupload_header_content",this.element).removeClass("plupload_header_content_bw"),this.options.multiple_queues&&o&&o>e&&(this.browse_button.button("enable"),t.disableBrowse(!1)),this.container.toggleClass("plupload_files_queued",t.files.length),this._updateTotalProgress()),0===t.total.queued?s(".ui-button-text",this.browse_button).html(n("Add Files")):s(".ui-button-text",this.browse_button).html(i.sprintf(n("%d files queued"),t.total.queued)),t.refresh()},_handleFileStatus:function(t){var e,n,o=s("#"+t.id);if(o.length){switch(t.status){case i.DONE:e="plupload_done",n="plupload_action_icon ui-icon ui-icon-circle-check";break;case i.FAILED:e="ui-state-error plupload_failed",n="plupload_action_icon ui-icon ui-icon-alert";break;case i.QUEUED:e="plupload_delete",n="plupload_action_icon ui-icon ui-icon-circle-minus";break;case i.UPLOADING:e="ui-state-highlight plupload_uploading",n="plupload_action_icon ui-icon ui-icon-circle-arrow-w";var a=s(".plupload_scroll",this.container),r=a.scrollTop(),l=a.height(),u=o.position().top+o.height();u>l&&a.scrollTop(r+u-l),o.find(".plupload_file_percent").html(t.percent+"%").end().find(".plupload_file_progress").css("width",t.percent+"%").end().find(".plupload_file_size").html(i.formatSize(t.size))}e+=" ui-state-default plupload_file",o.attr("class",e).find(".plupload_action_icon").attr("class",n)}},_updateTotalProgress:function(){var t=this.uploader;this.filelist[0].scrollTop=this.filelist[0].scrollHeight,this.progressbar.progressbar("value",t.total.percent),this.element.find(".plupload_total_status").html(t.total.percent+"%").end().find(".plupload_total_file_size").html(i.formatSize(t.total.size)).end().find(".plupload_upload_status").html(i.sprintf(n("Uploaded %d/%d files"),t.total.uploaded,t.files.length))},_displayThumbs:function(){function t(t,e,i){var s;t.on(e,function(){clearTimeout(s),s=setTimeout(function(){clearTimeout(s),i()},300)})}function e(){if(!l||!u){var t=s(".plupload_file:eq(0)",p.filelist);l=t.outerWidth(!0),u=t.outerHeight(!0)}var e=p.content.width(),i=p.content.height();d=Math.floor(e/l),c=d*(Math.ceil(i/u)+1)}function n(){var t=Math.floor(p.content.scrollTop()/u)*d;h=s(".plupload_file .plupload_file_thumb",p.filelist).slice(t,t+c).filter(".plupload_thumb_toload").get()}function o(){function i(){"thumbs"===p.view_mode&&(e(),n(),r())}s.fn.resizable&&t(p.container,"resize",i),t(p.window,"resize",i),t(p.content,"scroll",i),p.element.on("viewchanged selected",i),i()}function a(t,e){var n=new i.Image;n.onload=function(){var e=s("#"+t.id+" .plupload_file_thumb",p.filelist);this.embed(e[0],{width:p.options.thumb_width,height:p.options.thumb_height,crop:!0,fit:!0,preserveHeaders:!1,swf_url:i.resolveUrl(p.options.flash_swf_url),xap_url:i.resolveUrl(p.options.silverlight_xap_url)})},n.bind("embedded error",function(i){s("#"+t.id,p.filelist).find(".plupload_file_thumb").removeClass("plupload_thumb_loading").addClass("plupload_thumb_"+i.type),this.destroy(),setTimeout(e,1)}),s("#"+t.id,p.filelist).find(".plupload_file_thumb").removeClass("plupload_thumb_toload").addClass("plupload_thumb_loading"),n.load(t.getSource())}function r(){"thumbs"!==p.view_mode||f||(n(),h.length&&(f=!0,a(p.getFile(s(h.shift()).closest(".plupload_file").attr("id")),function(){f=!1,r()})))}var l,u,d,p=this,c=0,h=[],f=!1;this.options.views.thumbs&&this.element.on("selected",function _(){p.element.off("selected",_),o()})},_addFiles:function(t){var e,n=this,o="";e='{percent}
{name}
{size}
',"array"!==i.typeOf(t)&&(t=[t]),s.each(t,function(t,s){var a=s.name.match(/\.([^.]+)$/),r=a&&a[1].toLowerCase()||"none";o+=e.replace(/\{(\w+)\}/g,function(t,e){switch(e){case"thumb_width":case"thumb_height":return n.options[e];case"size":return i.formatSize(s.size);case"ext":return r;default:return i.xmlEncode(s[e]||"")}})}),n.filelist.append(o)},_addFormFields:function(){var t=this;s(".plupload_file_fields",this.filelist).html(""),i.each(this.uploader.files,function(e,n){var o="",a=t.id+"_"+n;e.target_name&&(o+=' '),o+=' ',o+=' ',s("#"+e.id).find(".plupload_file_fields").html(o)}),this.counter.val(this.uploader.files.length)},_viewChanged:function(t){this.options.views.remember&&s.cookie&&s.cookie("plupload_ui_view",t,{expires:7,path:"/"}),"IE"===i.ua.browser&&i.ua.version<7&&this.content.attr("style",'height:expression(document.getElementById("'+this.id+"_container"+'").clientHeight - '+("list"===t?132:102)+")"),this.container.removeClass("plupload_view_list plupload_view_thumbs").addClass("plupload_view_"+t),this.view_mode=t,this._trigger("viewchanged",null,{view:t})},_enableViewSwitcher:function(){var t,e,n,o=this,a=s(".plupload_view_switch",this.container);i.each(["list","thumbs"],function(t){o.options.views[t]||a.find('[for="'+o.id+"_view_"+t+'"], #'+o.id+"_view_"+t).remove()}),e=a.find(".plupload_button"),1===e.length?(a.hide(),t=e.eq(0).data("view"),this._viewChanged(t)):s.ui.button&&e.length>1?(this.options.views.remember&&s.cookie&&(t=s.cookie("plupload_ui_view")),~i.inArray(t,["list","thumbs"])||(t=this.options.views.active),a.show().buttonset().find(".ui-button").click(function(e){t=s(this).data("view"),o._viewChanged(t),e.preventDefault()}),n=a.find('[for="'+o.id+"_view_"+t+'"]'),n.length&&n.trigger("click")):(a.show(),this._viewChanged(this.options.views.active)),this.options.views.thumbs&&this._displayThumbs()},_enableRenaming:function(){var t=this;this.filelist.dblclick(function(e){var i,n,o,a,r=s(e.target),l="";r.hasClass("plupload_file_name_wrapper")&&(n=t.uploader.getFile(r.closest(".plupload_file")[0].id),a=n.name,o=/^(.+)(\.[^.]+)$/.exec(a),o&&(a=o[1],l=o[2]),i=s(' ').width(r.width()).insertAfter(r.hide()),i.val(a).blur(function(){r.show().parent().scrollLeft(0).end().next().remove()}).keydown(function(t){var e=s(this);-1!==s.inArray(t.keyCode,[13,27])&&(t.preventDefault(),13===t.keyCode&&(n.name=e.val()+l,r.text(n.name)),e.blur())})[0].focus())})},_enableSortingList:function(){var t=this;s(".plupload_file",this.filelist).length<2||(s("tbody",this.filelist).sortable("destroy"),this.filelist.sortable({items:".plupload_delete",cancel:"object, .plupload_clearer",stop:function(){var e=[];s.each(s(this).sortable("toArray"),function(i,s){e[e.length]=t.uploader.getFile(s)}),e.unshift(e.length),e.unshift(0),Array.prototype.splice.apply(t.uploader.files,e)}}))}})}(window,document,plupload,jQuery);
\ No newline at end of file
diff --git a/js/plupload.full.min.js b/js/plupload.full.min.js
index 63bcd5b7..7c30e32c 100644
--- a/js/plupload.full.min.js
+++ b/js/plupload.full.min.js
@@ -16,7 +16,7 @@
o.files=[],n.each(e,function(e){o.files.push(new t(a.uid,e))})},999),a.shimExec.call(this,"FileInput","init",r(e.accept),e.multiple),this.trigger("ready")},setOption:function(e,t){"accept"==e&&(t=r(t)),this.getRuntime().shimExec.call(this,"FileInput","setOption",e,t)}};return e.FileInput=o}),n("moxie/runtime/silverlight/file/FileDrop",["moxie/runtime/silverlight/Runtime","moxie/core/utils/Dom","moxie/core/utils/Events"],function(e,t,i){var n={init:function(){var e,n=this,r=n.getRuntime();return e=r.getShimContainer(),i.addEvent(e,"dragover",function(e){e.preventDefault(),e.stopPropagation(),e.dataTransfer.dropEffect="copy"},n.uid),i.addEvent(e,"dragenter",function(e){e.preventDefault();var i=t.get(r.uid).dragEnter(e);i&&e.stopPropagation()},n.uid),i.addEvent(e,"drop",function(e){e.preventDefault();var i=t.get(r.uid).dragDrop(e);i&&e.stopPropagation()},n.uid),r.shimExec.call(this,"FileDrop","init")}};return e.FileDrop=n}),n("moxie/runtime/silverlight/file/FileReader",["moxie/runtime/silverlight/Runtime","moxie/core/utils/Basic","moxie/runtime/flash/file/FileReader"],function(e,t,i){return e.FileReader=t.extend({},i)}),n("moxie/runtime/silverlight/file/FileReaderSync",["moxie/runtime/silverlight/Runtime","moxie/core/utils/Basic","moxie/runtime/flash/file/FileReaderSync"],function(e,t,i){return e.FileReaderSync=t.extend({},i)}),n("moxie/runtime/silverlight/runtime/Transporter",["moxie/runtime/silverlight/Runtime","moxie/core/utils/Basic","moxie/runtime/flash/runtime/Transporter"],function(e,t,i){return e.Transporter=t.extend({},i)}),n("moxie/runtime/silverlight/xhr/XMLHttpRequest",["moxie/runtime/silverlight/Runtime","moxie/core/utils/Basic","moxie/runtime/flash/xhr/XMLHttpRequest","moxie/runtime/silverlight/file/FileReaderSync","moxie/runtime/silverlight/runtime/Transporter"],function(e,t,i){return e.XMLHttpRequest=t.extend({},i)}),n("moxie/runtime/silverlight/image/Image",["moxie/runtime/silverlight/Runtime","moxie/core/utils/Basic","moxie/file/Blob","moxie/runtime/flash/image/Image"],function(e,t,i,n){return e.Image=t.extend({},n,{getInfo:function(){var e=this.getRuntime(),n=["tiff","exif","gps","thumb"],r={meta:{}},o=e.shimExec.call(this,"Image","getInfo");return o.meta&&(t.each(n,function(e){var t,i,n,a,s=o.meta[e];if(s&&s.keys)for(r.meta[e]={},i=0,n=s.keys.length;n>i;i++)t=s.keys[i],a=s[t],a&&(/^(\d|[1-9]\d+)$/.test(a)?a=parseInt(a,10):/^\d*\.\d+$/.test(a)&&(a=parseFloat(a)),r.meta[e][t]=a)}),r.meta&&r.meta.thumb&&r.meta.thumb.data&&!(e.meta.thumb.data instanceof i)&&(r.meta.thumb.data=new i(e.uid,r.meta.thumb.data))),r.width=parseInt(o.width,10),r.height=parseInt(o.height,10),r.size=parseInt(o.size,10),r.type=o.type,r.name=o.name,r},resize:function(e,t,i){this.getRuntime().shimExec.call(this,"Image","resize",e.x,e.y,e.width,e.height,t,i.preserveHeaders,i.resample)}})}),n("moxie/runtime/html4/Runtime",["moxie/core/utils/Basic","moxie/core/Exceptions","moxie/runtime/Runtime","moxie/core/utils/Env"],function(e,t,i,n){function o(t){var o=this,u=i.capTest,c=i.capTrue;i.call(this,t,a,{access_binary:u(window.FileReader||window.File&&File.getAsDataURL),access_image_binary:!1,display_media:u((n.can("create_canvas")||n.can("use_data_uri_over32kb"))&&r("moxie/image/Image")),do_cors:!1,drag_and_drop:!1,filter_by_extension:u(function(){return!("Chrome"===n.browser&&n.verComp(n.version,28,"<")||"IE"===n.browser&&n.verComp(n.version,10,"<")||"Safari"===n.browser&&n.verComp(n.version,11,"<=")||"Firefox"===n.browser&&n.verComp(n.version,37,"<")||"iOS"===n.os||"Android"===n.os)}()),resize_image:function(){return s.Image&&o.can("access_binary")&&n.can("create_canvas")},report_upload_progress:!1,return_response_headers:!1,return_response_type:function(t){return"json"===t&&window.JSON?!0:!!~e.inArray(t,["text","document",""])},return_status_code:function(t){return!e.arrayDiff(t,[200,404])},select_file:function(){return n.can("use_fileinput")},select_multiple:!1,send_binary_string:!1,send_custom_headers:!1,send_multipart:!0,slice_blob:!1,stream_upload:function(){return o.can("select_file")},summon_file_dialog:function(){return o.can("select_file")&&!("Firefox"===n.browser&&n.verComp(n.version,4,"<")||"Opera"===n.browser&&n.verComp(n.version,12,"<")||"IE"===n.browser&&n.verComp(n.version,10,"<"))},upload_filesize:c,use_http_method:function(t){return!e.arrayDiff(t,["GET","POST"])}}),e.extend(this,{init:function(){this.trigger("Init")},destroy:function(e){return function(){e.call(o),e=o=null}}(this.destroy)}),e.extend(this.getShim(),s)}var a="html4",s={};return i.addConstructor(a,o),s}),n("moxie/runtime/html4/file/FileInput",["moxie/runtime/html4/Runtime","moxie/file/File","moxie/core/utils/Basic","moxie/core/utils/Dom","moxie/core/utils/Events","moxie/core/utils/Mime","moxie/core/utils/Env"],function(e,t,i,n,r,o,a){function s(){function e(){var o,c,d,m,h,f,p=this,g=p.getRuntime();f=i.guid("uid_"),o=g.getShimContainer(),s&&(d=n.get(s+"_form"),d&&(i.extend(d.style,{top:"100%"}),d.firstChild.setAttribute("tabindex",-1))),m=document.createElement("form"),m.setAttribute("id",f+"_form"),m.setAttribute("method","post"),m.setAttribute("enctype","multipart/form-data"),m.setAttribute("encoding","multipart/form-data"),i.extend(m.style,{overflow:"hidden",position:"absolute",top:0,left:0,width:"100%",height:"100%"}),h=document.createElement("input"),h.setAttribute("id",f),h.setAttribute("type","file"),h.setAttribute("accept",l.join(",")),g.can("summon_file_dialog")&&h.setAttribute("tabindex",-1),i.extend(h.style,{fontSize:"999px",opacity:0}),m.appendChild(h),o.appendChild(m),i.extend(h.style,{position:"absolute",top:0,left:0,width:"100%",height:"100%"}),"IE"===a.browser&&a.verComp(a.version,10,"<")&&i.extend(h.style,{filter:"progid:DXImageTransform.Microsoft.Alpha(opacity=0)"}),h.onchange=function(){var i;this.value&&(i=this.files?this.files[0]:{name:this.value},i=new t(g.uid,i),this.onchange=function(){},e.call(p),p.files=[i],h.setAttribute("id",i.uid),m.setAttribute("id",i.uid+"_form"),p.trigger("change"),h=m=null)},g.can("summon_file_dialog")&&(c=n.get(u.browse_button),r.removeEvent(c,"click",p.uid),r.addEvent(c,"click",function(e){h&&!h.disabled&&h.click(),e.preventDefault()},p.uid)),s=f,o=d=c=null}var s,u,c,l=[];i.extend(this,{init:function(t){var i,a=this,s=a.getRuntime();u=t,l=o.extList2mimes(t.accept,s.can("filter_by_extension")),i=s.getShimContainer(),function(){var e,o,l;e=n.get(t.browse_button),c=n.getStyle(e,"z-index")||"auto",s.can("summon_file_dialog")?("static"===n.getStyle(e,"position")&&(e.style.position="relative"),a.bind("Refresh",function(){o=parseInt(c,10)||1,n.get(u.browse_button).style.zIndex=o,this.getRuntime().getShimContainer().style.zIndex=o-1})):e.setAttribute("tabindex",-1),l=s.can("summon_file_dialog")?e:i,r.addEvent(l,"mouseover",function(){a.trigger("mouseenter")},a.uid),r.addEvent(l,"mouseout",function(){a.trigger("mouseleave")},a.uid),r.addEvent(l,"mousedown",function(){a.trigger("mousedown")},a.uid),r.addEvent(n.get(t.container),"mouseup",function(){a.trigger("mouseup")},a.uid),e=null}(),e.call(this),i=null,a.trigger({type:"ready",async:!0})},setOption:function(e,t){var i,r=this.getRuntime();"accept"==e&&(l=t.mimes||o.extList2mimes(t,r.can("filter_by_extension"))),i=n.get(s),i&&i.setAttribute("accept",l.join(","))},disable:function(e){var t;(t=n.get(s))&&(t.disabled=!!e)},destroy:function(){var e=this.getRuntime(),t=e.getShim(),i=e.getShimContainer(),o=u&&n.get(u.container),a=u&&n.get(u.browse_button);o&&r.removeAllEvents(o,this.uid),a&&(r.removeAllEvents(a,this.uid),a.style.zIndex=c),i&&(r.removeAllEvents(i,this.uid),i.innerHTML=""),t.removeInstance(this.uid),s=l=u=i=o=a=t=null}})}return e.FileInput=s}),n("moxie/runtime/html4/file/FileReader",["moxie/runtime/html4/Runtime","moxie/runtime/html5/file/FileReader"],function(e,t){return e.FileReader=t}),n("moxie/runtime/html4/xhr/XMLHttpRequest",["moxie/runtime/html4/Runtime","moxie/core/utils/Basic","moxie/core/utils/Dom","moxie/core/utils/Url","moxie/core/Exceptions","moxie/core/utils/Events","moxie/file/Blob","moxie/xhr/FormData"],function(e,t,i,n,r,o,a,s){function u(){function e(e){var t,n,r,a,s=this,u=!1;if(l){if(t=l.id.replace(/_iframe$/,""),n=i.get(t+"_form")){for(r=n.getElementsByTagName("input"),a=r.length;a--;)switch(r[a].getAttribute("type")){case"hidden":r[a].parentNode.removeChild(r[a]);break;case"file":u=!0}r=[],u||n.parentNode.removeChild(n),n=null}setTimeout(function(){o.removeEvent(l,"load",s.uid),l.parentNode&&l.parentNode.removeChild(l);var t=s.getRuntime().getShimContainer();t.children.length||t.parentNode.removeChild(t),t=l=null,e()},1)}}var u,c,l;t.extend(this,{send:function(d,m){function h(){var i=w.getShimContainer()||document.body,r=document.createElement("div");r.innerHTML='',l=r.firstChild,i.appendChild(l),o.addEvent(l,"load",function(){var i;try{i=l.contentWindow.document||l.contentDocument||window.frames[l.id].document,/^4(0[0-9]|1[0-7]|2[2346])\s/.test(i.title)?u=i.title.replace(/^(\d+).*$/,"$1"):(u=200,c=t.trim(i.body.innerHTML),v.trigger({type:"progress",loaded:c.length,total:c.length}),x&&v.trigger({type:"uploadprogress",loaded:x.size||1025,total:x.size||1025}))}catch(r){if(!n.hasSameOrigin(d.url))return e.call(v,function(){v.trigger("error")}),void 0;u=404}e.call(v,function(){v.trigger("load")})},v.uid)}var f,p,g,x,v=this,w=v.getRuntime();if(u=c=null,m instanceof s&&m.hasBlob()){if(x=m.getBlob(),f=x.uid,g=i.get(f),p=i.get(f+"_form"),!p)throw new r.DOMException(r.DOMException.NOT_FOUND_ERR)}else f=t.guid("uid_"),p=document.createElement("form"),p.setAttribute("id",f+"_form"),p.setAttribute("method",d.method),p.setAttribute("enctype","multipart/form-data"),p.setAttribute("encoding","multipart/form-data"),w.getShimContainer().appendChild(p);p.setAttribute("target",f+"_iframe"),m instanceof s&&m.each(function(e,i){if(e instanceof a)g&&g.setAttribute("name",i);else{var n=document.createElement("input");t.extend(n,{type:"hidden",name:i,value:e}),g?p.insertBefore(n,g):p.appendChild(n)}}),p.setAttribute("action",d.url),h(),p.submit(),v.trigger("loadstart")},getStatus:function(){return u},getResponse:function(e){if("json"===e&&"string"===t.typeOf(c)&&window.JSON)try{return JSON.parse(c.replace(/^\s*]*>/,"").replace(/<\/pre>\s*$/,""))}catch(i){return null}return c},abort:function(){var t=this;l&&l.contentWindow&&(l.contentWindow.stop?l.contentWindow.stop():l.contentWindow.document.execCommand?l.contentWindow.document.execCommand("Stop"):l.src="about:blank"),e.call(this,function(){t.dispatchEvent("abort")})},destroy:function(){this.getRuntime().getShim().removeInstance(this.uid)}})}return e.XMLHttpRequest=u}),n("moxie/runtime/html4/image/Image",["moxie/runtime/html4/Runtime","moxie/runtime/html5/image/Image"],function(e,t){return e.Image=t}),a(["moxie/core/utils/Basic","moxie/core/utils/Encode","moxie/core/utils/Env","moxie/core/Exceptions","moxie/core/utils/Dom","moxie/core/EventTarget","moxie/runtime/Runtime","moxie/runtime/RuntimeClient","moxie/file/Blob","moxie/core/I18n","moxie/core/utils/Mime","moxie/file/FileInput","moxie/file/File","moxie/file/FileDrop","moxie/file/FileReader","moxie/core/utils/Url","moxie/runtime/RuntimeTarget","moxie/xhr/FormData","moxie/xhr/XMLHttpRequest","moxie/image/Image","moxie/core/utils/Events","moxie/runtime/html5/image/ResizerCanvas"])}(this)});
/**
* Plupload - multi-runtime File Uploader
- * v3.1.2
+ * v3.1.5
*
* Copyright 2018, Ephox
* Released under AGPLv3 License.
@@ -24,6 +24,6 @@ o.files=[],n.each(e,function(e){o.files.push(new t(a.uid,e))})},999),a.shimExec.
* License: http://www.plupload.com/license
* Contributing: http://www.plupload.com/contributing
*
- * Date: 2018-02-20
+ * Date: 2021-11-15
*/
!function(t,e){var i=function(){var t={};return e.apply(t,arguments),t.plupload};"function"==typeof define&&define.amd?define("plupload",["./moxie"],i):"object"==typeof module&&module.exports?module.exports=i(require("./moxie")):t.plupload=i(t.moxie)}(this||window,function(t){!function(e,i){"use strict";function n(t,e){for(var i,n=[],r=0;r":"gt","&":"amp",'"':"quot","'":"#39"},i=/[<>&\"\']/g;return t?(""+t).replace(i,function(t){return e[t]?"&"+e[t]+";":t}):t},toArray:i.Basic.toArray,inArray:i.Basic.inArray,addI18n:e.core.I18n.addI18n,translate:e.core.I18n.translate,sprintf:i.Basic.sprintf,isEmptyObj:i.Basic.isEmptyObj,hasClass:i.Dom.hasClass,addClass:i.Dom.addClass,removeClass:i.Dom.removeClass,getStyle:i.Dom.getStyle,addEvent:i.Events.addEvent,removeEvent:i.Events.removeEvent,removeAllEvents:i.Events.removeAllEvents,cleanName:function(t){var e,i;for(i=[/[\300-\306]/g,"A",/[\340-\346]/g,"a",/\307/g,"C",/\347/g,"c",/[\310-\313]/g,"E",/[\350-\353]/g,"e",/[\314-\317]/g,"I",/[\354-\357]/g,"i",/\321/g,"N",/\361/g,"n",/[\322-\330]/g,"O",/[\362-\370]/g,"o",/[\331-\334]/g,"U",/[\371-\374]/g,"u"],e=0;e0?"&":"?")+n),t},formatSize:function(t){function e(t,e){return Math.round(t*Math.pow(10,e))/Math.pow(10,e)}var i=this;if(t=parseInt(t,10),isNaN(t))return i.translate("N/A");var n=Math.pow(1024,4);return t>n?e(t/n,1)+" "+i.translate("tb"):t>(n/=1024)?e(t/n,1)+" "+i.translate("gb"):t>(n/=1024)?e(t/n,1)+" "+i.translate("mb"):t>1024?Math.round(t/1024)+" "+i.translate("kb"):t+" "+i.translate("b")},mimes2extList:t.core.utils.Mime.mimes2extList,resolveUrl:i.Url.resolveUrl,parseSize:i.Basic.parseSizeStr,delay:i.Basic.delay,EventTarget:t.core.EventTarget,Runtime:t.runtime.Runtime,FileInput:t.file.FileInput,FileReader:t.file.FileReader}}),r("plupload/core/Collection",["plupload"],function(){var t=function(){function e(){var t;for(t in n);return n[t]}var i,n={},r=0;plupload.extend(this,{count:function(){return r},hasKey:function(t){return n.hasOwnProperty(t)},get:function(t){return n[t]},first:function(){for(var t in n)return n[t]},last:function(){return i},toObject:function(){return n},add:function(t,e){var s=this;return"object"!=typeof t||e?n.hasOwnProperty(t)?s.update.apply(s,arguments):(n[t]=i=e,r++,void 0):plupload.each(t,function(t,e){s.add(e,t)})},remove:function(t){if(this.hasKey(t)){var s=n[t];delete n[t],r--,i===s&&(i=e())}},extract:function(t){var e=this.get(t);return this.remove(t),e},shift:function(){var t,e,i=this;for(e in n)return t=n[e],i.remove(e),t},update:function(t,e){n[t]=e},each:function(t){plupload.each(n,t)},combineWith:function(){var e=new t;return e.add(n),plupload.each(arguments,function(i){i instanceof t&&e.add(i.toObject())}),e},clear:function(){n={},i=null,r=0}})};return t}),r("plupload/core/ArrCollection",["plupload"],function(t){var e=function(){var e=[];t.extend(this,{count:function(){return e.length},hasKey:function(t){return this.getIdx(t)>-1},get:function(t){var i=this.getIdx(t);return i>-1?e[i]:null},getIdx:function(t){for(var i=0,n=e.length;n>i;i++)if(e[i].uid===t)return i;return-1},getByIdx:function(t){return e[t]},first:function(){return e[0]},last:function(){return e[e.length-1]},add:function(t){t=arguments[1]||t;var i=this.getIdx(t.uid);return i>-1?(e[i]=t,i):(e.push(t),e.length-1)},remove:function(t){return!!this.extract(t)},splice:function(i,n){return i="undefinded"===t.typeOf(i)?0:Math.max(i,0),n="undefinded"!==t.typeOf(n)&&i+n-1?e.splice(i,1):null},shift:function(){return e.shift()},update:function(t,i){var n=this.getIdx(t);return n>-1?(e[n]=i,!0):!1},each:function(i){t.each(e,i)},combineWith:function(){return Array.prototype.concat.apply(this.toArray(),arguments)},sort:function(t){e.sort(t||function(t,e){return t.priority-e.priority})},clear:function(){e=[]},toObject:function(){for(var t={},i=0,n=e.length;n>i;i++)t[e[i].uid]=e[i];return t},toArray:function(){return Array.prototype.slice.call(e)}})};return e}),r("plupload/core/Optionable",["plupload"],function(e){var i=t.core.EventTarget;return function(t){function i(){t.apply(this,arguments),this._options={}}return e.inherit(i,t),e.extend(i.prototype,{setOption:function(t,i,n){var r,s=this;return"object"==typeof t?(n=i,e.each(t,function(t,e){s.setOption(e,t,n)}),void 0):((!n||s._options.hasOwnProperty(t))&&(r=e.clone(s._options[t]),"object"===e.typeOf(i)&&"object"===e.typeOf(s._options[t])?e.extend(s._options[t],i):s._options[t]=i,s.trigger("OptionChanged",t,i,r)),void 0)},getOption:function(t){if(!t)return this._options;var i=this._options[t];return e.inArray(e.typeOf(i),["array","object"])>-1?e.extendImmutable({},i):i},setOptions:function(t,e){"object"==typeof t&&this.setOption(t,e)},getOptions:function(){return this.getOption()}}),i}(i)}),r("plupload/core/Queueable",["plupload","plupload/core/Optionable"],function(t,e){return function(e){function i(){e.apply(this,arguments),this.uid=t.guid(),this.state=i.IDLE,this.processed=0,this.total=0,this.percent=0,this.retries=0,this.priority=0,this.startedTimestamp=0,this.processedTimestamp=0}return i.IDLE=1,i.PROCESSING=2,i.PAUSED=6,i.RESUMED=7,i.DONE=5,i.FAILED=4,i.DESTROYED=8,t.inherit(i,e),t.extend(i.prototype,{start:function(){var t=this.state;return this.state===i.PROCESSING?!1:(this.startedTimestamp||(this.startedTimestamp=+new Date),this.state=i.PROCESSING,this.trigger("statechanged",this.state,t),this.trigger("started"),!0)},pause:function(){var e=this.state;return-1===t.inArray(this.state,[i.IDLE,i.RESUMED,i.PROCESSING])?!1:(this.processed=this.percent=0,this.loaded=this.processed,this.state=i.PAUSED,this.trigger("statechanged",this.state,e),this.trigger("paused"),!0)},resume:function(){var t=this.state;return this.state!==i.PAUSED&&this.state!==i.RESUMED?!1:(this.state=i.RESUMED,this.trigger("statechanged",this.state,t),this.trigger("resumed"),!0)},stop:function(){var t=this.state;return this.state===i.IDLE?!1:(this.processed=this.percent=0,this.loaded=this.processed,this.startedTimestamp=0,this.state=i.IDLE,this.trigger("statechanged",this.state,t),this.trigger("stopped"),!0)},done:function(t){var e=this.state;return this.state===i.DONE?!1:(this.processed=this.total,this.loaded=this.processed,this.percent=100,this.processedTimestamp=+new Date,this.state=i.DONE,this.trigger("statechanged",this.state,e),this.trigger("done",t),this.trigger("processed"),!0)},failed:function(t){var e=this.state;return this.state===i.FAILED?!1:(this.processed=this.percent=0,this.loaded=this.processed,this.processedTimestamp=+new Date,this.state=i.FAILED,this.trigger("statechanged",this.state,e),this.trigger("failed",t),this.trigger("processed"),!0)},progress:function(t,e){e&&(this.total=e),this.processed=Math.min(t,this.total),this.loaded=this.processed,this.percent=Math.ceil(100*(this.processed/this.total)),this.trigger({type:"progress",loaded:this.processed,total:this.total})},destroy:function(){var t=this.state;return this.state===i.DESTROYED?!1:(this.state=i.DESTROYED,this.trigger("statechanged",this.state,t),this.trigger("destroy"),this.unbindAll(),!0)}}),i}(e)}),r("plupload/core/Stats",[],function(){return function(){var t=this;t.size=0,t.total=0,t.loaded=0,t.uploaded=0,t.done=0,t.failed=0,t.queued=0,t.paused=0,t.processing=0,t.paused=0,t.percent=0,t.bytesPerSec=0,t.processedPerSec=0,t.reset=function(){t.size=t.total=t.loaded=t.processed=t.uploaded=t.done=t.failed=t.queued=t.processing=t.paused=t.percent=t.bytesPerSec=t.processedPerSec=0}}}),r("plupload/core/Queue",["plupload","plupload/core/ArrCollection","plupload/core/Queueable","plupload/core/Stats"],function(t,e,i,n){return function(r){function s(i){r.apply(this,arguments),this._queue=new e,this.stats=new n,this._options=t.extend({},this._options,{max_slots:1,max_retries:0,auto_start:!1,finish_active:!1},i)}function o(){var t;return this.forEachItem(function(e){return e.state===i.IDLE||e.state===i.RESUMED?(t=e,!1):void 0}),t?t:null}function a(){var t;if(this.state!==i.PROCESSING&&this.state!==i.PAUSED)return!1;if(this.stats.processingt.startedTimestamp)&&(r+=n),e.processedPerSec=Math.ceil(r/((+new Date-t.startedTimestamp||1)/1e3)),e.processed=n,e.total+=s.total,e.total&&(e.percent=Math.ceil(100*(e.processed/e.total)))}),t.percent=e.percent,e.loaded=e.processed,e.size=e.total,e.bytesPerSec=e.processedPerSec,!0):!1},destroy:function(){var e=this;return e.state===i.DESTROYED?!1:e.state!==i.IDLE?(e.bindOnce("Stopped",function(){t.delay.call(e,e.destroy)}),e.stop()):(e.clear(),s.parent.destroy.call(this),e._queue=e.stats=null,!0)}}),s}(i)}),r("plupload/QueueUpload",["plupload","plupload/core/Queue"],function(t,e){return function(i){function n(t){e.call(this,{max_slots:1,max_retries:0,auto_start:!1,finish_active:!1,url:!1,chunk_size:0,multipart:!0,http_method:"POST",params:{},headers:!1,file_data_name:"file",send_file_name:!0,stop_on_fail:!0}),this.setOption=function(t,e){"object"!=typeof t&&"max_upload_slots"==t&&(t="max_slots"),n.prototype.setOption.call(this,t,e,!0)},this.setOptions(t)}return t.inherit(n,i),n}(e)}),r("plupload/QueueResize",["plupload","plupload/core/Queue"],function(t,e){return function(i){function n(t){e.call(this,{max_slots:1,max_retries:0,auto_start:!1,finish_active:!1,resize:{}}),this.setOption=function(t,e){"object"!=typeof t&&"max_resize_slots"==t&&(t="max_slots"),n.prototype.setOption.call(this,t,e,!0)},this.setOptions(t)}return t.inherit(n,i),n}(e)}),r("plupload/ChunkUploader",["plupload","plupload/core/Collection","plupload/core/Queueable"],function(e,i,n){function r(t){function i(t,i){var n="";return e.each(i,function(t,e){n+=(n?"&":"")+encodeURIComponent(e)+"="+encodeURIComponent(t)}),n&&(t+=(t.indexOf("?")>0?"&":"?")+n),t}var a;n.call(this),this._options={file_data_name:"file",headers:!1,http_method:"POST",multipart:!0,params:{},send_file_name:!0,url:!1},e.extend(this,{start:function(){var r,u,l=this,p=this.state,c=l._options;if(this.state===n.PROCESSING)return!1;this.startedTimestamp||(this.startedTimestamp=+new Date),this.state=n.PROCESSING,this.trigger("statechanged",this.state,p),a=new s,a.upload&&(a.upload.onprogress=function(t){l.progress(t.loaded,t.total)}),a.onload=function(){var t={response:this.responseText,status:this.status,responseHeaders:this.getAllResponseHeaders()};return this.status<200||this.status>=400?l.failed(t):(l.done(t),void 0)},a.onerror=function(){l.failed()},a.onloadend=function(){setTimeout(function(){a&&(a.destroy(),a=null)},1)};try{r=c.multipart?c.url:i(c.url,c.params),a.open(c.http_method,r,!0),e.isEmptyObj(c.headers)||e.each(c.headers,function(t,e){a.setRequestHeader(e,t)}),c.multipart?(u=new o,e.isEmptyObj(c.params)||e.each(c.params,function(t,e){u.append(e,t)}),u.append(c.file_data_name,t),a.send(u)):((e.isEmptyObj(c.headers)||!a.hasRequestHeader("content-type"))&&a.setRequestHeader("content-type","application/octet-stream"),a.send(t)),this.trigger("started")}catch(d){l.failed()}},stop:function(){a&&(a.abort(),a.destroy(),a=null),r.prototype.stop.call(this)},setOption:function(t,e){r.prototype.setOption.call(this,t,e,!0)},setOptions:function(t){r.prototype.setOption.call(this,t,!0)},destroy:function(){this.stop(),r.prototype.destroy.call(this)}})}var s=t.xhr.XMLHttpRequest,o=t.xhr.FormData;return e.inherit(r,n),r}),r("plupload/FileUploader",["plupload","plupload/core/Collection","plupload/core/Queueable","plupload/ChunkUploader"],function(t,e,i,n){function r(s,o){function a(){var t=0;return l.each(function(e){e.state===i.DONE&&(t+=e.end-e.start)}),t}function u(){for(var t=0;p>t&&l.hasKey(t);)t++;return t}var l=new e,p=1;i.call(this),this._options={chunk_size:0,params:{},send_file_name:!0,stop_on_fail:!0},t.extend(this,{name:s.name,start:function(){var t,e=this,r=this.state;return this.state===i.PROCESSING?!1:(this.startedTimestamp||(this.startedTimestamp=+new Date),this.state=i.PROCESSING,this.trigger("statechanged",this.state,r),e._options.send_file_name&&(e._options.params.name=e.target_name||e.name),e._options.chunk_size?(p=Math.ceil(s.size/e._options.chunk_size),e.uploadChunk(!1,!0)):(t=new n(s),t.bind("progress",function(t){e.progress(t.loaded,t.total)}),t.bind("done",function(t,i){e.done(i)}),t.bind("failed",function(t,i){e.failed(i)}),t.setOptions(e._options),o.addItem(t)),this.trigger("started"),void 0)},uploadChunk:function(e,r){var c,d,h=this,f=this.getOption("chunk_size"),g={};return g.seq=parseInt(e,10)||u(),g.start=g.seq*f,g.end=Math.min(g.start+f,s.size),g.total=s.size,g.start<0||g.start>=s.size?!1:(d=t.extendImmutable({},this.getOptions(),{params:{chunk:g.seq,chunks:p}}),c=new n(s.slice(g.start,g.end,s.type)),c.bind("progress",function(t){h.progress(a()+t.loaded,s.size)}),c.bind("failed",function(e,n){l.add(g.seq,t.extend({state:i.FAILED},g)),h.trigger("chunkuploadfailed",t.extendImmutable({},g,n)),d.stop_on_fail&&h.failed(n)}),c.bind("done",function(e,n){l.add(g.seq,t.extend({state:i.DONE},g)),h.trigger("chunkuploaded",t.extendImmutable({},g,n)),a()>=s.size?(h.progress(s.size,s.size),h.done(n)):r&&t.delay(function(){h.uploadChunk(u(),r)})}),c.bind("processed",function(){this.destroy()}),c.setOptions(d),l.add(g.seq,t.extend({state:i.PROCESSING},g)),o.addItem(c),r&&o.countSpareSlots()&&h.uploadChunk(u(),r),!0)},destroy:function(){r.prototype.destroy.call(this),l.clear()}})}return t.inherit(r,i),r}),r("plupload/ImageResizer",["plupload","plupload/core/Queueable"],function(e,i){function n(t){i.call(this),this._options={type:"image/jpeg",quality:90,crop:!1,fit:!0,preserveHeaders:!0,resample:"default",multipass:!0},this.setOption=function(t){("object"==typeof t||this._options.hasOwnProperty(t))&&n.prototype.setOption.apply(this,arguments)},this.start=function(e){var i,n=this;e&&this.setOptions(e.resize),i=new r,i.bind("load",function(){this.resize(n.getOptions())}),i.bind("resize",function(){n.done(this.getAsBlob(n.getOption("type"),n.getOption("quality"))),this.destroy()}),i.bind("error",function(){n.failed(),this.destroy()}),i.load(t,n.getOption("runtimeOptions"))}}var r=t.image.Image;return e.inherit(n,i),e.Image=r,n}),r("plupload/File",["plupload","plupload/core/Queueable","plupload/FileUploader","plupload/ImageResizer"],function(t,e,i,n){function r(a,u,l){e.call(this),t.extend(this,{id:this.uid,name:a.name,target_name:null,type:a.type,size:a.size,origSize:a.size,start:function(){var i=this.state;return this.state===e.PROCESSING?!1:(this.state=e.PROCESSING,this.trigger("statechanged",this.state,i),this.trigger("started"),!t.isEmptyObj(this._options.resize)&&s(this.type)&&o(a,"send_binary_string")?this.resizeAndUpload():this.upload(),!0)},getSource:function(){return a},getNative:function(){return this.getFile().getSource()},resizeAndUpload:function(){var t=this,e=t.getOptions(),i=new n(a);i.bind("progress",function(e){t.progress(e.loaded,e.total)}),i.bind("done",function(e,i){i=i,t.upload()}),i.bind("failed",function(){t.upload()}),i.setOption("runtimeOptions",{runtime_order:e.runtimes,required_caps:e.required_features,preferred_caps:e.preferred_caps,swf_url:e.flash_swf_url,xap_url:e.silverlight_xap_url}),l.addItem(i)},upload:function(){var t=this,e=new i(a,u);e.bind("paused",function(){t.pause()}),e.bind("resumed",function(){this.start()}),e.bind("started",function(){t.trigger("startupload")}),e.bind("progress",function(e){t.progress(e.loaded,e.total)}),e.bind("done",function(e,i){t.done(i)}),e.bind("failed",function(e,i){t.failed(i)}),e.setOptions(t.getOptions()),e.start()},destroy:function(){r.prototype.destroy.call(this),a=null}})}function s(e){return t.inArray(e,["image/jpeg","image/png"])>-1}function o(e,i){if(e.ruid){var n=t.Runtime.getInfo(e.ruid);if(n)return n.can(i)}return!1}return t.inherit(r,e),r}),r("plupload/Uploader",["plupload","plupload/core/Collection","plupload/core/Queue","plupload/QueueUpload","plupload/QueueResize","plupload/File"],function(e,i,n,r,s,o){function a(i){function u(){var t=O[0]||b[0];return t?t.getRuntime().uid:!1}function c(){this.bind("FilesAdded FilesRemoved",function(t){t.trigger("QueueChanged"),t.refresh()},this,999),this.bind("BeforeUpload",g),this.bind("Stopped",function(t){t.trigger("UploadComplete")}),this.bind("Error",m),this.bind("Destroy",_)}function d(i){var n=this,r=0,s=[],o={runtime_order:n.getOption("runtimes"),required_caps:n.getOption("required_features"),preferred_caps:n.getOption("preferred_caps"),swf_url:n.getOption("flash_swf_url"),xap_url:n.getOption("silverlight_xap_url")};e.each(n.getOption("runtimes").split(/\s*,\s*/),function(t){n.getOption(t)&&(o[t]=n.getOption(t))}),n.getOption("browse_button")&&e.each(n.getOption("browse_button"),function(i){s.push(function(s){var a=new t.file.FileInput(e.extend({},o,{accept:n.getOption("filters").mime_types,name:n.getOption("file_data_name"),multiple:n.getOption("multi_selection"),container:n.getOption("container"),browse_button:i}));a.onready=function(){var t=e.Runtime.getInfo(this.ruid);e.extend(n.features,{chunks:t.can("slice_blob"),multipart:t.can("send_multipart"),multi_selection:t.can("select_multiple")}),r++,O.push(this),s()},a.onchange=function(){n.addFile(this.files)},a.bind("mouseenter mouseleave mousedown mouseup",function(t){R||(n.getOption("browse_button_hover")&&("mouseenter"===t.type?e.addClass(i,n.getOption("browse_button_hover")):"mouseleave"===t.type&&e.removeClass(i,n.getOption("browse_button_hover"))),n.getOption("browse_button_active")&&("mousedown"===t.type?e.addClass(i,n.getOption("browse_button_active")):"mouseup"===t.type&&e.removeClass(i,n.getOption("browse_button_active"))))}),a.bind("mousedown",function(){n.trigger("Browse")}),a.bind("error runtimeerror",function(){a=null,s()}),a.init()})}),n.getOption("drop_element")&&e.each(n.getOption("drop_element"),function(i){s.push(function(s){var a=new t.file.FileDrop(e.extend({},o,{drop_zone:i}));a.onready=function(){var t=e.Runtime.getInfo(this.ruid);e.extend(n.features,{chunks:t.can("slice_blob"),multipart:t.can("send_multipart"),dragdrop:t.can("drag_and_drop")}),r++,b.push(this),s()},a.ondrop=function(){n.addFile(this.files)},a.bind("error runtimeerror",function(){a=null,s()}),a.init()})}),e.inParallel(s,function(){"function"==typeof i&&i(r)})}function g(t,e){if(t.getOption("unique_names")){var i=e.name.match(/\.([^.]+)$/),n="part";i&&(n=i[1]),e.target_name=e.id+"."+n}}function m(t,i){i.code===e.INIT_ERROR?t.destroy():i.code===e.HTTP_ERROR&&t.state==e.STARTED&&t.trigger("CancelUpload")}function _(t){t.forEachItem(function(t){t.destroy()}),O.length&&(e.each(O,function(t){t.destroy()}),O=[]),b.length&&(e.each(b,function(t){t.destroy()}),b=[]),E=!1,y&&y.destroy(),v&&v.destroy(),I=y=v=null}var y,v,O=[],b=[],E=!1,R=!1,I=l(e.extend({backward_compatibility:!0,chunk_size:0,file_data_name:"file",filters:{mime_types:"*",prevent_duplicates:!1,max_file_size:0},flash_swf_url:"js/Moxie.swf",http_method:"POST",max_resize_slots:1,max_retries:0,max_upload_slots:1,multipart:!0,multipart_params:{},multi_selection:!0,params:{},resize:!1,runtimes:e.Runtime.order,send_chunk_number:!0,send_file_name:!0,silverlight_xap_url:"js/Moxie.xap",required_features:!1,preferred_caps:!1},i));n.call(this),e.extend(this,{_options:I,id:this.uid,state:e.STOPPED,features:{},settings:I,runtime:null,files:[],total:this.stats,init:function(){var t,i,n=this;return t=n.getOption("preinit"),"function"==typeof t?t(n):e.each(t,function(t,e){n.bind(e,t)}),c.call(n),e.each(["container","browse_button","drop_element"],function(t){return null===n.getOption(t)?(i={code:e.INIT_ERROR,message:e.sprintf(e.translate("%s specified, but cannot be found."),t)},!1):void 0}),i?n.trigger("Error",i):n.getOption("browse_button")||n.getOption("drop_element")?(d.call(n,function(t){var i,o=n.getOption("init"),a=e.extendImmutable({},n.getOption(),{auto_start:!0});"function"==typeof o?o(n):e.each(o,function(t,e){n.bind(e,t)}),t?(E=!0,i=e.Runtime.getInfo(u()),y=new r(a),v=new s(a),n.trigger("Init",{ruid:i.uid,runtime:n.runtime=i.type}),n.trigger("PostInit")):n.trigger("Error",{code:e.INIT_ERROR,message:e.translate("Init error.")})}),void 0):n.trigger("Error",{code:e.INIT_ERROR,message:e.translate("You must specify either browse_button or drop_element.")})},setOption:function(t,i){return E&&e.inArray(t,["container","browse_button","drop_element","runtimes","multi_selection","flash_swf_url","silverlight_xap_url"])>-1?this.trigger("Error",{code:e.OPTION_ERROR,message:e.sprintf(e.translate("%s option cannot be changed.")),option:t}):("object"!=typeof t&&(i=p(t,i,this._options),y&&y.setOption(t,i),v&&v.setOption(t,i)),a.prototype.setOption.call(this,t,i),void 0)},refresh:function(){O.length&&e.each(O,function(t){t.trigger("Refresh")}),b.length&&e.each(b,function(t){t.trigger("Refresh")}),this.trigger("Refresh")},stop:function(){a.prototype.stop.call(this)&&this.state!=e.STOPPED&&this.trigger("CancelUpload")},disableBrowse:function(){R=arguments[0]!==h?arguments[0]:!0,O.length&&e.each(O,function(t){t.disable(R)}),this.trigger("DisableBrowse",R)},getFile:function(t){return this.getItem(t)},addFile:function(i,n){function r(t){t.bind("beforestart",function(t){return p.trigger("BeforeUpload",t.target)}),t.bind("startupload",function(){p.trigger("UploadFile",this)}),t.bind("progress",function(){p.trigger("UploadProgress",this)}),t.bind("done",function(t,e){p.trigger("FileUploaded",this,e)}),t.bind("failed",function(t,i){p.trigger("Error",e.extend({code:e.HTTP_ERROR,message:e.translate("HTTP Error."),file:this},i))})}function s(t,i){var n=[];e.each(p.getOption("filters"),function(e,i){f[i]&&n.push(function(n){f[i].call(p,e,t,function(t){n(!t)})})}),e.inParallel(n,i)}function a(i){var u=e.typeOf(i);if(i instanceof t.file.File){if(!i.ruid&&!i.isDetached()){if(!l)return!1;i.ruid=l,i.connectRuntime(l)}c.push(function(t){s(i,function(s){var a;s||(a=new o(i,y,v),n&&(a.name=n),r(a),p.addItem(a),d.push(a),p.trigger("FileFiltered",a)),e.delay(t)})})}else i instanceof t.file.Blob?(a(i.getSource()),i.destroy()):-1!==e.inArray(u,["file","blob"])?a(new t.file.File(null,i)):"node"===u&&"filelist"===e.typeOf(i.files)?e.each(i.files,a):"array"===u&&(n=null,e.each(i,a))}var l,p=this,c=[],d=[];l=u(),a(i),c.length&&e.inParallel(c,function(){d.length&&p.trigger("FilesAdded",d)})},removeFile:function(t){var e=this.extractItem("string"==typeof t?t:t.uid);e&&(this.trigger("FilesRemoved",[e]),e.destroy())},splice:function(){var t=0,i=e.STARTED==this.state,r=n.prototype.splice.apply(this,arguments);if(r.length){for(this.trigger("FilesRemoved",r),i&&this.stop(),t=0;t0&&(r.slice_blob=!0),e.isEmptyObj(t.resize)&&t.multipart!==!1||(r.send_binary_string=!0),t.http_method&&(r.use_http_method=t.http_method),e.each(t,function(t,e){i(e,!!t,!0)})),r}function l(t){return e.each(t,function(e,i){t[i]=p(i,e,t)}),t}function p(t,i,n){switch(t){case"chunk_size":(i=e.parseSize(i))&&(n.send_file_name=!0);break;case"headers":var r={};return"object"==typeof i&&e.each(i,function(t,e){r[e.toLowerCase()]=t}),r;case"http_method":return"PUT"===i.toUpperCase()?"PUT":"POST";case"filters":return"array"===e.typeOf(i)&&(i={mime_types:i}),i.mime_types&&("string"===e.typeOf(i.mime_types)&&(i.mime_types=e.mimes2extList(i.mime_types)),n.re_ext_filter=function(t){var i=[];return e.each(t,function(t){e.each(t.extensions.split(/,/),function(t){/^\s*\*\s*$/.test(t)?i.push("\\.*"):i.push("\\."+t.replace(new RegExp("["+"/^$.*+?|()[]{}\\".replace(/./g,"\\$&")+"]","g"),"\\$&"))})}),new RegExp("("+i.join("|")+")$","i")}(i.mime_types)),i;case"max_file_size":n&&!n.filters&&(n.filters={}),n.filters.max_file_size=i;break;case"multipart":i||(n.send_file_name=!0);break;case"multipart_params":n.params=n.multipart_params=i;break;case"resize":return i?e.extend({preserve_headers:!0,crop:!1},i):!1;case"prevent_duplicates":n&&!n.filters&&(n.filters={}),n.filters.prevent_duplicates=!!i;break;case"unique_names":i&&(n.send_file_name=!0);break;case"required_features":return u(e.extend({},n));case"preferred_caps":return u(e.extend({},n,{required_features:!0}));case"container":case"browse_button":case"drop_element":return"container"===t?e.get(i):e.getAll(i)}return i}function c(t,e){f[t]=e}function d(t,i){var n,r;return n=new a(t),r=e.Runtime.thatCan(n.getOption("required_features"),i||t.runtimes),n.destroy(),r}var h,f={};return c("mime_types",function(t,i,n){t.length&&!this.getOption("re_ext_filter").test(i.name)?(this.trigger("Error",{code:e.FILE_EXTENSION_ERROR,message:e.translate("File extension error."),file:i}),n(!1)):n(!0)}),c("max_file_size",function(t,i,n){var r;t=e.parseSize(t),i.size!==r&&t&&i.size>t?(this.trigger("Error",{code:e.FILE_SIZE_ERROR,message:e.translate("File size error."),file:i}),n(!1)):n(!0)}),c("prevent_duplicates",function(t,i,n){var r=this;t&&this.forEachItem(function(t){return i.name===t.name&&i.size===t.size?(r.trigger("Error",{code:e.FILE_DUPLICATE_ERROR,message:e.translate("Duplicate file error."),file:i}),n(!1),void 0):void 0}),n(!0)}),c("prevent_empty",function(t,i,n){t&&!i.size&&i.size!==h?(this.trigger("Error",{code:e.FILE_SIZE_ERROR,message:e.translate("File size error."),file:i}),n(!1)):n(!0)}),a.addFileFilter=c,e.inherit(a,n),e.addFileFilter=c,e.predictRuntime=d,a}),o(["plupload","plupload/core/Collection","plupload/core/ArrCollection","plupload/core/Optionable","plupload/core/Queueable","plupload/core/Stats","plupload/core/Queue","plupload/QueueUpload","plupload/QueueResize","plupload/ChunkUploader","plupload/FileUploader","plupload/ImageResizer","plupload/File","plupload/Uploader"])}(this)});
\ No newline at end of file
diff --git a/package.json b/package.json
index 5617bc63..4f3ad0b2 100644
--- a/package.json
+++ b/package.json
@@ -1,7 +1,7 @@
{
"name": "plupload",
"description": "Plupload is a JavaScript API for dealing with file uploads it supports features like multiple file selection, file type filtering, request chunking, client side image scaling and it uses different runtimes to achieve this such as HTML 5, Silverlight and Flash.",
- "version": "3.1.4",
+ "version": "3.1.5",
"releaseDate": "2021-11-15",
"author": "Ephox",
"contributors": [{