/*!
* @copyright Copyright &copy; Kartik Visweswaran, Krajee.com, 2014 - 2015
* @package bootstrap-fileinput
* @version 4.1.7
*
* File input styling for Bootstrap 3.0
* Built for Yii Framework 2.0
* Author: Kartik Visweswaran
* Year: 2015
* For more Yii related demos visit http://demos.krajee.com
*/!function(e){"use strict";String.prototype.repl=function(e,i){return this.split(e).join(i)};var i=function(e){var i,t=document.createElement("div");return t.innerHTML="<!--[if IE "+e+"]><i></i><![endif]-->",i=1===t.getElementsByTagName("i").length,document.body.appendChild(t),t.parentNode.removeChild(t),i},t=function(){return window.File&&window.FileReader},a=function(){var e=document.createElement("div");return!i(9)&&(void 0!==e.draggable||void 0!==e.ondragstart&&void 0!==e.ondrop)},n=function(){return t&&window.FormData},r=function(e,i){e.removeClass(i).addClass(i)},l='style="width:{width};height:{height};"',o='      <param name="controller" value="true" />\n      <param name="allowFullScreen" value="true" />\n      <param name="allowScriptAccess" value="always" />\n      <param name="autoPlay" value="false" />\n      <param name="autoStart" value="false" />\n      <param name="quality" value="high" />\n',s='<div class="file-preview-other">\n       <i class="glyphicon glyphicon-file"></i>\n   </div>',d={removeIcon:'<i class="glyphicon glyphicon-trash text-danger"></i>',removeClass:"btn btn-xs btn-default",removeTitle:"Remove file",uploadIcon:'<i class="glyphicon glyphicon-upload text-info"></i>',uploadClass:"btn btn-xs btn-default",uploadTitle:"Upload file",indicatorNew:'<i class="glyphicon glyphicon-hand-down text-warning"></i>',indicatorSuccess:'<i class="glyphicon glyphicon-ok-sign file-icon-large text-success"></i>',indicatorError:'<i class="glyphicon glyphicon-exclamation-sign text-danger"></i>',indicatorLoading:'<i class="glyphicon glyphicon-hand-up text-muted"></i>',indicatorNewTitle:"Not uploaded yet",indicatorSuccessTitle:"Uploaded",indicatorErrorTitle:"Upload Error",indicatorLoadingTitle:"Uploading ..."},p='{preview}\n<div class="kv-upload-progress hide"></div>\n<div class="input-group {class}">\n   {caption}\n   <div class="input-group-btn">\n       {remove}\n       {cancel}\n       {upload}\n       {browse}\n   </div>\n</div>',c='{preview}\n<div class="kv-upload-progress hide"></div>\n{remove}\n{cancel}\n{upload}\n{browse}\n',f='<div class="file-preview {class}">\n    <div class="close fileinput-remove">&times;</div>\n    <div class="{dropClass}">\n    <div class="file-preview-thumbnails">\n    </div>\n    <div class="clearfix"></div>    <div class="file-preview-status text-center text-success"></div>\n    <div class="kv-fileinput-error"></div>\n    </div>\n</div>',u='<span class="glyphicon glyphicon-file kv-caption-icon"></span>',v='<div tabindex="-1" class="form-control file-caption {class}">\n   <span class="file-caption-ellipsis">&hellip;</span>\n   <div class="file-caption-name"></div>\n</div>',h='<div id="{id}" class="modal fade">\n  <div class="modal-dialog modal-lg">\n    <div class="modal-content">\n      <div class="modal-header">\n        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>\n        <h3 class="modal-title">Detailed Preview <small>{title}</small></h3>\n      </div>\n      <div class="modal-body">\n        <textarea class="form-control" style="font-family:Monaco,Consolas,monospace; height: {height}px;" readonly>{body}</textarea>\n      </div>\n    </div>\n  </div>\n</div>',m='<div class="progress">\n    <div class="{class}" role="progressbar" aria-valuenow="{percent}" aria-valuemin="0" aria-valuemax="100" style="width:{percent}%;">\n        {percent}%\n     </div>\n</div>',g='<div class="file-thumbnail-footer">\n    <div class="file-caption-name">{caption}</div>\n    {actions}\n</div>',w='<div class="file-actions">\n    <div class="file-footer-buttons">\n        {upload}{delete}{other}    </div>\n    <div class="file-upload-indicator" tabindex="-1" title="{indicatorTitle}">{indicator}</div>\n    <div class="clearfix"></div>\n</div>',b='<button type="button" class="kv-file-remove {removeClass}" title="{removeTitle}"{dataUrl}{dataKey}>{removeIcon}</button>\n',C='<button type="button" class="kv-file-upload {uploadClass}" title="{uploadTitle}">   {uploadIcon}\n</button>\n',x='<div class="file-preview-frame{frameClass}" id="{previewId}" data-fileindex="{fileindex}">\n   {content}\n   {footer}\n</div>\n',y='<div class="file-preview-frame{frameClass}" id="{previewId}" data-fileindex="{fileindex}">\n    <object data="{data}" type="{type}" width="{width}" height="{height}">\n       '+s+"\n    </object>\n   {footer}\n</div>",$='<div class="file-preview-frame{frameClass}" id="{previewId}" data-fileindex="{fileindex}">\n   <img src="{data}" class="file-preview-image" title="{caption}" alt="{caption}" '+l+">\n   {footer}\n</div>\n",T='<div class="file-preview-frame{frameClass}" id="{previewId}" data-fileindex="{fileindex}">\n   <div class="file-preview-text" title="{caption}" '+l+">\n       {data}\n   </div>\n   {footer}\n</div>",k='<div class="file-preview-frame{frameClass}" id="{previewId}" data-fileindex="{fileindex}" title="{caption}" '+l+'>\n   <video width="{width}" height="{height}" controls>\n       <source src="{data}" type="{type}">\n       '+s+"\n   </video>\n   {footer}\n</div>\n",E='<div class="file-preview-frame{frameClass}" id="{previewId}" data-fileindex="{fileindex}" title="{caption}" '+l+'>\n   <audio controls>\n       <source src="{data}" type="{type}">\n       '+s+"\n   </audio>\n   {footer}\n</div>",F='<div class="file-preview-frame{frameClass}" id="{previewId}" data-fileindex="{fileindex}" title="{caption}" '+l+'>\n   <object type="application/x-shockwave-flash" width="{width}" height="{height}" data="{data}">\n'+o+"       "+s+"\n   </object>\n   {footer}\n</div>\n",P='<div class="file-preview-frame{frameClass}" id="{previewId}" data-fileindex="{fileindex}" title="{caption}" '+l+'>\n   <object data="{data}" type="{type}" width="{width}" height="{height}">\n       <param name="movie" value="{caption}" />\n'+o+"         "+s+"\n   </object>\n   {footer}\n</div>",I='<div class="file-preview-frame{frameClass}" id="{previewId}" data-fileindex="{fileindex}" title="{caption}" '+l+">\n   "+s+"\n   {footer}\n</div>",D={main1:p,main2:c,preview:f,icon:u,caption:v,modal:h,progress:m,footer:g,actions:w,actionDelete:b,actionUpload:C},S={generic:x,html:y,image:$,text:T,video:k,audio:E,flash:F,object:P,other:I},U=["image","html","text","video","audio","flash","object"],j={image:{width:"auto",height:"160px"},html:{width:"213px",height:"160px"},text:{width:"160px",height:"160px"},video:{width:"213px",height:"160px"},audio:{width:"213px",height:"80px"},flash:{width:"213px",height:"160px"},object:{width:"160px",height:"160px"},other:{width:"160px",height:"160px"}},A={image:function(e,i){return void 0!==e?e.match("image.*"):i.match(/\.(gif|png|jpe?g)$/i)},html:function(e,i){return void 0!==e?"text/html"===e:i.match(/\.(htm|html)$/i)},text:function(e,i){return void 0!==e&&e.match("text.*")||i.match(/\.(txt|md|csv|nfo|php|ini)$/i)},video:function(e,i){return void 0!==e&&e.match(/\.video\/(ogg|mp4|webm)$/i)||i.match(/\.(og?|mp4|webm)$/i)},audio:function(e,i){return void 0!==e&&e.match(/\.audio\/(ogg|mp3|wav)$/i)||i.match(/\.(ogg|mp3|wav)$/i)},flash:function(e,i){return void 0!==e&&"application/x-shockwave-flash"===e||i.match(/\.(swf)$/i)},object:function(){return!0},other:function(){return!0}},L=function(i,t){return null===i||void 0===i||0===i.length||t&&""===e.trim(i)},R=function(e){return Array.isArray(e)||"[object Array]"===Object.prototype.toString.call(e)},O=function(e,i){return"object"==typeof i&&e in i},z=function(i,t,a){return L(i)||L(i[t])?a:e(i[t])},M=function(){return Math.round((new Date).getTime()+100*Math.random())},Z=function(e){return String(e).repl("&","&amp;").repl('"',"&quot;").repl("'","&#39;").repl("<","&lt;").repl(">","&gt;")},B=function(i,t){var a=i;return e.each(t,function(e,i){"function"==typeof i&&(i=i()),a=a.repl(e,i)}),a},N=window.URL||window.webkitURL,_=function(a,n){this.$element=e(a),t()||i(9)?(this.init(n),this.listen()):this.$element.removeClass("file-loading")};_.prototype={constructor:_,init:function(t){var l,o,s=this,p=s.$element;e.each(t,function(e,i){s[e]=i}),L(s.allowedPreviewTypes)&&(s.allowedPreviewTypes=U),s.uploadFileAttr=L(p.attr("name"))?"file_data":p.attr("name"),s.reader=null,s.formdata={},s.isIE9=i(9),s.isIE10=i(10),s.filestack=[],s.ajaxRequests=[],s.isError=!1,s.dropZoneEnabled=a()&&s.dropZoneEnabled,s.isDisabled=s.$element.attr("disabled")||s.$element.attr("readonly"),s.isUploadable=n&&!L(s.uploadUrl),s.slug="function"==typeof t.slugCallback?t.slugCallback:s.slugDefault,s.mainTemplate=s.getLayoutTemplate(s.showCaption?"main1":"main2"),s.captionTemplate=s.getLayoutTemplate("caption"),s.previewGenericTemplate=s.getPreviewTemplate("generic"),L(s.$element.attr("id"))&&s.$element.attr("id",M()),void 0===s.$container?s.$container=s.createContainer():s.refreshContainer(),s.$progress=s.$container.find(".kv-upload-progress"),s.$btnUpload=s.$container.find(".kv-fileinput-upload"),s.$captionContainer=z(t,"elCaptionContainer",s.$container.find(".file-caption")),s.$caption=z(t,"elCaptionText",s.$container.find(".file-caption-name")),s.$previewContainer=z(t,"elPreviewContainer",s.$container.find(".file-preview")),s.$preview=z(t,"elPreviewImage",s.$container.find(".file-preview-thumbnails")),s.$previewStatus=z(t,"elPreviewStatus",s.$container.find(".file-preview-status")),s.$errorContainer=z(t,"elErrorContainer",s.$previewContainer.find(".kv-fileinput-error")),L(s.msgErrorClass)||r(s.$errorContainer,s.msgErrorClass),s.$errorContainer.hide(),s.initialPreviewContent="",l=s.initialPreview,s.initialPreviewCount=R(l)?l.length:l.length>0?l.split(s.initialPreviewDelimiter).length:0,s.fileActionSettings=e.extend(d,t.fileActionSettings),s.previewInitId="preview-"+M(),s.initPreview(),s.initPreviewDeletes(),s.original={preview:s.$preview.html(),caption:s.$caption.html()},s.options=t,s.setFileDropZoneTitle(),s.uploadCount=0,s.uploadPercent=0,s.$element.removeClass("file-loading"),o=s.getLayoutTemplate("progress"),s.progressTemplate=o.replace("{class}",s.progressClass),s.progressCompleteTemplate=o.replace("{class}",s.progressCompleteClass),s.setEllipsis()},raise:function(e,i){var t=this;void 0!==i?t.$element.trigger(e,i):t.$element.trigger(e)},getLayoutTemplate:function(e){var i=this,t=O(e,i.layoutTemplates)?i.layoutTemplates[e]:D[e];return L(i.customLayoutTags)?t:B(t,i.customLayoutTags)},getPreviewTemplate:function(e){var i=this,t=O(e,i.previewTemplates)?i.previewTemplates[e]:S[e];return L(i.customPreviewTags)?t:B(t,i.customPreviewTags)},getOutData:function(e,i,t){var a=this;return e=e||{},i=i||{},t=t||a.filestack.slice(0),{form:a.formdata,files:t,extra:a.getExtraData(),response:i,reader:a.reader,jqXHR:e}},setEllipsis:function(){var e=this,i=e.$captionContainer,t=e.$caption,a=t.clone().css("height","auto").hide();i.parent().before(a),i.removeClass("kv-has-ellipsis"),a.outerWidth()>t.outerWidth()&&i.addClass("kv-has-ellipsis"),a.remove()},listen:function(){var i=this,t=i.$element,a=i.$captionContainer,n=i.$btnFile;t.on("change",e.proxy(i.change,i)),e(window).on("resize",function(){i.setEllipsis()}),n.off("click").on("click",function(){i.raise("filebrowse"),i.isError&&!i.isUploadable&&i.clear(!0),a.focus()}),t.closest("form").off("reset").on("reset",e.proxy(i.reset,i)),i.$container.off("click").on("click",".fileinput-remove:not([disabled])",e.proxy(i.clear,i)).on("click",".fileinput-cancel",e.proxy(i.cancel,i)),i.isUploadable&&i.dropZoneEnabled&&i.showPreview&&i.initDragDrop(),i.isUploadable&&i.$container.find(".kv-fileinput-upload").off("click").on("click",function(t){i.isUploadable&&(t.preventDefault(),!e(this).hasClass("disabled")&&L(e(this).attr("disabled"))&&i.upload())})},setProgress:function(e){var i=this,t=Math.min(e,100),a=100>t?i.progressTemplate:i.progressCompleteTemplate;i.$progress.html(a.repl("{percent}",t))},upload:function(){var e,i,t,a=this,n=a.getFileStack().length;if(a.isUploadable&&!a.isDisabled&&0!==n)if(a.resetUpload(),a.$progress.removeClass("hide"),a.uploadCount=0,a.uploadPercent=0,a.lock(),a.setProgress(0),t=a.filestack.length,!a.uploadAsync&&1!==n||!a.showPreview)a.uploadBatch();else for(i=a.getOutData(),a.raise("filebatchpreupload",[i]),e=0;t>e;e+=1)void 0!==a.filestack[e]&&a.uploadSingle(e,a.filestack,!0)},lock:function(){var e=this;e.resetErrors(),e.disable(),e.showRemove&&r(e.$container.find(".fileinput-remove"),"hide"),e.showCancel&&e.$container.find(".fileinput-cancel").removeClass("hide"),e.raise("filelock",[e.filestack,e.getExtraData()])},unlock:function(e){var i=this;void 0===e&&(e=!0),i.enable(),i.showCancel&&r(i.$container.find(".fileinput-cancel"),"hide"),i.showRemove&&i.$container.find(".fileinput-remove").removeClass("hide"),e&&i.resetFileStack(),i.raise("fileunlock",[i.filestack,i.getExtraData()])},resetFileStack:function(){var i=this,t=0,a=[];i.$preview.find(".file-preview-frame").each(function(){var n=e(this),r=n.attr("data-fileindex"),l=i.filestack[r];-1!=r&&(void 0!==l?(a[t]=l,n.attr({id:i.previewInitId+"-"+t,"data-fileindex":t}),t+=1):n.attr({id:"uploaded-"+M(),"data-fileindex":"-1"}))}),i.filestack=a},refresh:function(i){var t,a=this,n=a.$element,r=arguments.length?e.extend(a.options,i):a.options;n.off(),a.init(r),t=a.$container.find(".file-drop-zone"),t.off("dragenter dragover drop"),e(document).off("dragenter dragover drop"),a.listen(),a.setFileDropZoneTitle()},initDragDrop:function(){var i=this,t=i.$container.find(".file-drop-zone");t.off("dragenter dragover drop"),e(document).off("dragenter dragover drop"),t.on("dragenter dragover",function(t){t.stopPropagation(),t.preventDefault(),i.isDisabled||r(e(this),"highlighted")}),t.on("dragleave",function(t){t.stopPropagation(),t.preventDefault(),i.isDisabled||e(this).removeClass("highlighted")}),t.on("drop",function(t){t.preventDefault(),i.isDisabled||(i.change(t,"dragdrop"),e(this).removeClass("highlighted"))}),e(document).on("dragenter dragover drop",function(e){e.stopPropagation(),e.preventDefault()})},setFileDropZoneTitle:function(){var e=this,i=e.$container.find(".file-drop-zone");i.find("."+e.dropZoneTitleClass).remove(),e.isUploadable&&e.showPreview&&0!==i.length&&!(e.getFileStack().length>0)&&e.dropZoneEnabled&&(0===i.find(".file-preview-frame").length&&i.prepend('<div class="'+e.dropZoneTitleClass+'">'+e.dropZoneTitle+"</div>"),e.$container.removeClass("file-input-new"),r(e.$container,"file-input-ajax-new"))},initFileActions:function(){var i=this;i.$preview.find(".kv-file-remove").each(function(){var t,a,n=e(this),r=n.closest(".file-preview-frame"),l=r.attr("data-fileindex");n.off("click").on("click",function(){r.fadeOut("slow",function(){i.filestack[l]=void 0,i.clearObjects(r),r.remove();var e=i.getFileStack(),n=e.length,o=i.$container.find(".file-preview-initial").length;0===n&&0===o?(i.original.preview="",i.reset()):(t=i.initialPreviewCount+n,a=t>1?i.msgSelected.repl("{n}",t):e[0].name,i.setCaption(a))})})}),i.$preview.find(".kv-file-upload").each(function(){var t=e(this);t.off("click").on("click",function(){var e=t.closest(".file-preview-frame"),a=e.attr("data-fileindex");i.uploadSingle(a,i.filestack,!1)})})},renderInitFileFooter:function(e){if(0===this.initialPreviewConfig.length||L(this.initialPreviewConfig[e]))return"";var i=this,t=i.getLayoutTemplate("footer"),a=i.initialPreviewConfig[e],n=O("caption",a)?a.caption:"",r=O("width",a)?a.width:"auto",l=O("url",a)?a.url:!1,o=O("key",a)?a.key:null,s=l===!1,d=i.initialPreviewShowDelete?i.renderFileActions(!1,!0,s,l,o):"",p=t.repl("{actions}",d);return p.repl("{caption}",n).repl("{width}",r).repl("{indicator}","").repl("{indicatorTitle}","")},renderFileFooter:function(e,i){var t,a=this,n=a.fileActionSettings,r=a.getLayoutTemplate("footer");return a.isUploadable?(t=r.repl("{actions}",a.renderFileActions(!0,!0,!1,!1,!1)),t.repl("{caption}",e).repl("{width}",i).repl("{indicator}",n.indicatorNew).repl("{indicatorTitle}",n.indicatorNewTitle)):r.repl("{actions}","").repl("{caption}",e).repl("{width}",i).repl("{indicator}","").repl("{indicatorTitle}","")},renderFileActions:function(e,i,t,a,n){if(!e&&!i)return"";var r=this,l=a===!1?"":' data-url="'+a+'"',o=n===!1?"":' data-key="'+n+'"',s=r.getLayoutTemplate("actionDelete"),d="",p=r.getLayoutTemplate("actions"),c=r.otherActionButtons.repl("{dataKey}",o),f=r.fileActionSettings,u=t?f.removeClass+" disabled":f.removeClass;return s=s.repl("{removeClass}",u).repl("{removeIcon}",f.removeIcon).repl("{removeTitle}",f.removeTitle).repl("{dataUrl}",l).repl("{dataKey}",o),e&&(d=r.getLayoutTemplate("actionUpload").repl("{uploadClass}",f.uploadClass).repl("{uploadIcon}",f.uploadIcon).repl("{uploadTitle}",f.uploadTitle)),p.repl("{delete}",s).repl("{upload}",d).repl("{other}",c)},getInitialPreview:function(e,i,t){var a=this,n="init_"+t,r=a.previewInitId+"-"+n,l=a.renderInitFileFooter(t,!1);return e.repl("{previewId}",r).repl("{frameClass}"," file-preview-initial").repl("{fileindex}",n).repl("{content}",i).repl("{footer}",l)},initPreview:function(){var e,i,t=this,a="",n=t.initialPreview,r=t.initialPreviewCount,l=t.initialCaption.length,o=l>0?t.initialCaption:t.msgSelected.repl("{n}",r);if(R(n)&&r>0){for(e=0;r>e;e+=1)a+=t.getInitialPreview(t.previewGenericTemplate,n[e],e);r>1&&0===l&&(o=t.msgSelected.repl("{n}",r))}else{if(!(r>0))return void(l>0&&t.setCaption(o));for(i=n.split(t.initialPreviewDelimiter),e=0;r>e;e+=1)a+=t.getInitialPreview(t.previewGenericTemplate,i[e],e);r>1&&0===l&&(o=t.msgSelected.repl("{n}",r))}t.initialPreviewContent=a,t.$preview.html(a),t.setCaption(o),t.$container.removeClass("file-input-new")},initPreviewDeletes:function(){var i=this,t=function(){0===i.$preview.find(".kv-file-remove").length&&i.reset()};i.$preview.find(".kv-file-remove").each(function(){var a,n=e(this),l=n.closest(".file-preview-frame"),o=n.attr("data-url"),s=n.attr("data-key");void 0!==o&&void 0!==s&&n.off("click").on("click",function(){e.ajax({url:o,type:"POST",dataType:"json",data:{key:s},beforeSend:function(e){r(l,"file-uploading"),r(n,"disabled"),i.raise("filepredelete",[s,e])},success:function(r,o,d){void 0===r.error?i.raise("filedeleted",[s,d]):(i.showError(r.error,null,n.attr("id"),s,"filedeleteerror",d),t()),l.removeClass("file-uploading").addClass("file-deleted"),l.fadeOut("slow",function(){i.clearObjects(l),l.remove(),a=e(document.createElement("div")).html(i.original.preview),a.find(".file-preview-frame").each(function(){var i=e(this);i.find(".kv-file-remove").attr("data-key")==s&&i.remove()}),i.initialPreviewContent=a.html(),i.initialPreviewCount>0&&(i.initialPreviewCount-=1);var n=i.initialCaption;0===i.initialCaption.length&&(n=i.msgSelected.repl("{n}",i.initialPreviewCount)),i.original.preview=a.html(),i.setCaption(n),i.original.caption=i.$caption.html(),a.remove(),t()})},error:function(e,a,r){i.showError(r,null,n.attr("id"),s,"filedeleteerror",e),l.removeClass("file-uploading"),t()}})})})},clearObjects:function(i){i.find("video audio").each(function(){this.pause(),e(this).remove()}),i.find("img object div").each(function(){e(this).remove()})},clearFileInput:function(){var i,t,a,n=this,r=n.$element;L(r.val())||(n.isIE9||n.isIE10?(i=r.closest("form"),t=e(document.createElement("form")),a=e(document.createElement("div")),r.before(a),i.length?i.after(t):a.after(t),t.append(r).trigger("reset"),a.before(r).remove(),t.remove()):r.val(""))},resetUpload:function(){var e=this;e.uploadCount=0,e.uploadPercent=0,e.$btnUpload.removeAttr("disabled"),e.setProgress(0),r(e.$progress,"hide"),e.resetErrors(!1),e.ajaxRequests=[]},cancel:function(){var i,t=this,a=t.ajaxRequests,n=a.length;if(n>0)for(i=0;n>i;i+=1)a[i].abort();t.$preview.find(".file-preview-frame").each(function(){var i=e(this),a=i.attr("data-fileindex");i.removeClass("file-uploading"),void 0!==t.filestack[a]&&(i.find(".kv-file-upload").removeClass("disabled").removeAttr("disabled"),i.find(".kv-file-remove").removeClass("disabled").removeAttr("disabled")),t.unlock()})},clear:function(i){var t,a=this;!a.isIE9&&a.reader instanceof FileReader&&a.reader.abort(),a.$btnUpload.removeAttr("disabled"),a.resetUpload(),a.filestack=[],a.clearFileInput(),a.resetErrors(!0),i!==!0&&(a.raise("change"),a.raise("fileclear")),a.overwriteInitial&&(a.initialPreviewCount=0,a.initialPreviewContent=""),!a.overwriteInitial&&a.initialPreviewContent.length>0?(a.showFileIcon(),a.$preview.html(a.original.preview),a.$caption.html(a.original.caption),a.setEllipsis(),a.initPreviewDeletes(),a.$container.removeClass("file-input-new")):(a.$preview.find(".file-preview-frame").each(function(){a.clearObjects(e(this))}),a.$preview.html(""),t=!a.overwriteInitial&&a.initialCaption.length>0?a.original.caption:"",a.$caption.html(t),a.setEllipsis(),a.$caption.attr("title",""),r(a.$container,"file-input-new")),0===a.$container.find(".file-preview-frame").length&&(a.initialCaption="",a.original.caption="",a.$caption.html(""),a.setEllipsis(),a.$captionContainer.find(".kv-caption-icon").hide()),a.hideFileIcon(),a.raise("filecleared"),a.$captionContainer.focus(),a.setFileDropZoneTitle()},reset:function(){var e=this;e.clear(!0),e.$preview.html(e.original.preview),e.$caption.html(e.original.caption),e.setEllipsis(),e.$container.find(".fileinput-filename").text(""),e.raise("filereset"),e.initialPreview.length>0&&e.$container.removeClass("file-input-new"),e.setFileDropZoneTitle(),e.isUploadable&&e.resetUpload(),e.filestack=[],e.formdata={}},disable:function(){var e=this;e.isDisabled=!0,e.raise("filedisabled"),e.$element.attr("disabled","disabled"),e.$container.find(".kv-fileinput-caption").addClass("file-caption-disabled"),e.$container.find(".btn-file, .fileinput-remove, .kv-fileinput-upload").attr("disabled",!0),e.initDragDrop()},enable:function(){var e=this;e.isDisabled=!1,e.raise("fileenabled"),e.$element.removeAttr("disabled"),e.$container.find(".kv-fileinput-caption").removeClass("file-caption-disabled"),e.$container.find(".btn-file, .fileinput-remove, .kv-fileinput-upload").removeAttr("disabled"),e.initDragDrop()},getExtraData:function(){var e=this,i=e.uploadExtraData;return"function"==typeof e.uploadExtraData&&(i=e.uploadExtraData()),i},uploadExtra:function(){var i=this,t=i.getExtraData();0!==t.length&&e.each(t,function(e,t){i.formdata.append(e,t)})},initXhr:function(e,i){var t=this;return e.upload&&e.upload.addEventListener("progress",function(e){var a=0,n=e.loaded||e.position,r=e.total;e.lengthComputable&&(a=Math.ceil(n/r*i)),t.uploadPercent=Math.max(a,t.uploadPercent),t.setProgress(t.uploadPercent)},!1),e},ajaxSubmit:function(i,t,a,n){var r,l=this;l.uploadExtra(),r=e.extend(l.ajaxSettings,{xhr:function(){var i=e.ajaxSettings.xhr();return l.initXhr(i,98)},url:l.uploadUrl,type:"POST",dataType:"json",data:l.formdata,cache:!1,processData:!1,contentType:!1,beforeSend:i,success:t,complete:a,error:n}),l.ajaxRequests.push(e.ajax(r))},uploadSingle:function(i,t,a){var n,l,o,s,d,p,c,f,u,v,h,m=this,g=m.getFileStack().length,w=new FormData,b=m.previewInitId+"-"+i,C=e("#"+b),x=C.find(".kv-file-upload"),y=C.find(".kv-file-remove"),$=C.find(".file-upload-indicator"),T=m.fileActionSettings,k=m.filestack.length>0||!e.isEmptyObject(m.uploadExtraData);m.formdata=w,0!==g&&k&&!x.hasClass("disabled")&&(s=function(){var e=m.$preview.find(".file-preview-frame.file-uploading"),i=e.length;i>0||(m.setProgress(100),m.unlock(),m.clearFileInput(),m.raise("filebatchuploadcomplete",[m.filestack,m.getExtraData()]))},d=function(e,i){$.html(T[e]),$.attr("title",T[i])},p=function(){!a||0===g||m.uploadPercent>=100||(m.uploadCount+=1,o=80+Math.ceil(20*m.uploadCount/g),m.uploadPercent=Math.max(o,m.uploadPercent),m.setProgress(m.uploadPercent),m.initPreviewDeletes())},c=function(){x.removeAttr("disabled"),y.removeAttr("disabled"),C.removeClass("file-uploading")},f=function(e){n=m.getOutData(e),d("indicatorLoading","indicatorLoadingTitle"),r(C,"file-uploading"),x.attr("disabled",!0),y.attr("disabled",!0),a||m.lock(),m.raise("filepreupload",[n,b,i])},u=function(e,t,r){n=m.getOutData(r,e),setTimeout(function(){void 0===e.error?(d("indicatorSuccess","indicatorSuccessTitle"),x.hide(),y.hide(),m.filestack[i]=void 0,a||m.resetFileStack(),m.raise("fileuploaded",[n,b,i])):(d("indicatorError","indicatorErrorTitle"),m.showUploadError(e.error,n,b,i))},100)},v=function(){setTimeout(function(){p(),c(),a?s():m.unlock(!1)},100)},h=function(e,r,o){d("indicatorError","indicatorErrorTitle"),n=m.getOutData(e),a?(l=t[i].name,m.showUploadError("<b>"+l+"</b>: "+o,n,b,i)):m.showUploadError(o,n,b,i)},w.append(m.uploadFileAttr,t[i]),w.append("file_id",i),m.ajaxSubmit(f,u,v,h))},uploadBatch:function(){var i,t,a,n,l,o,s,d,p=this,c=p.filestack,f=c.length,u=p.filestack.length>0||!e.isEmptyObject(p.uploadExtraData);p.formdata=new FormData,0!==f&&u&&(i=p.fileActionSettings,t=function(t,a,n){var r=e("#"+p.previewInitId+"-"+t).find(".file-upload-indicator");r.html(i[a]),r.attr("title",i[n])},n=function(i){var t=e("#"+p.previewInitId+"-"+i),a=t.find(".kv-file-upload"),n=t.find(".kv-file-delete");t.removeClass("file-uploading"),a.removeAttr("disabled"),n.removeAttr("disabled")},a=function(){e.each(c,function(e){p.filestack[e]=void 0}),p.clearFileInput()},l=function(i){p.lock();var t=p.getOutData(i);p.showPreview&&(p.$preview.find(".file-preview-frame").each(function(){var i=e(this),t=i.find(".kv-file-upload"),a=i.find(".kv-file-remove");r(i,"file-uploading"),t.attr("disabled",!0),a.attr("disabled",!0)}),p.raise("filebatchpreupload",[t]))},o=function(i,r,l){var o=p.getOutData(l,i),s=L(i.errorkeys)?[]:i.errorkeys;void 0===i.error||L(i.error)?(p.raise("filebatchuploadsuccess",[o]),a(),p.showPreview?(p.$preview.find(".kv-file-upload").hide(),p.$preview.find(".kv-file-remove").hide(),p.$preview.find(".file-preview-frame").each(function(){var i=e(this),a=i.attr("data-fileindex");t(a,"indicatorSuccess","indicatorSuccessTitle"),n(a)})):p.reset()):(p.$preview.find(".file-preview-frame").each(function(){var i=e(this),a=parseInt(i.attr("data-fileindex"),10);return n(a),0===s.length?void t(a,"indicatorError","indicatorErrorTitle"):void(-1!==e.inArray(a,s)?t(a,"indicatorError","indicatorErrorTitle"):(i.find(".kv-file-upload").hide(),i.find(".kv-file-remove").hide(),t(a,"indicatorSuccess","indicatorSuccessTitle"),p.filestack[a]=void 0))}),p.showUploadError(i.error,o,null,null,"filebatchuploaderror"))},s=function(){p.setProgress(100),p.unlock(),p.raise("filebatchuploadcomplete",[p.filestack,p.getExtraData()]),p.clearFileInput()},d=function(i,a,n){var r=p.getOutData(i);p.showUploadError(n,r,null,null,"filebatchuploaderror"),p.uploadFileCount=f-1,p.$preview.find(".file-preview-frame").each(function(){var i=e(this),a=i.attr("data-fileindex");i.removeClass("file-uploading"),void 0!==p.filestack[a]&&t(a,"indicatorError","indicatorErrorTitle")}),p.$preview.find(".file-preview-frame").removeClass("file-uploading"),p.$preview.find(".file-preview-frame kv-file-upload").removeAttr("disabled"),p.$preview.find(".file-preview-frame kv-file-delete").removeAttr("disabled")},e.each(c,function(e,i){L(c[e])||p.formdata.append(p.uploadFileAttr,i)}),p.ajaxSubmit(l,o,s,d))},hideFileIcon:function(){this.overwriteInitial&&this.$captionContainer.find(".kv-caption-icon").hide()},showFileIcon:function(){this.$captionContainer.find(".kv-caption-icon").show()},resetErrors:function(e){var i=this,t=i.$errorContainer;i.isError=!1,i.$container.removeClass("has-error"),t.html(""),e?t.fadeOut("slow"):t.hide()},showUploadError:function(e,i,t,a,n){var l=this,o=l.$errorContainer;return n=n||"fileuploaderror",0===o.find("ul").length?o.html('<ul class="text-left"><li>'+e+"</li></ul>"):o.find("ul").append("<li>"+e+"</li>"),o.fadeIn(800),l.raise(n,[i,t,a,l.reader]),r(l.$container,"has-error"),!0},showError:function(e,i,t,a,n,l){var o=this,s=o.$errorContainer;return n=n||"fileerror",l=l||{},s.html(e),s.fadeIn(800),o.raise(n,[i,t,a,o.reader,l]),o.isUploadable||o.clearFileInput(),r(o.$container,"has-error"),o.$btnUpload.attr("disabled",!0),!0},errorHandler:function(e,i){var t=this,a=e.target.error;switch(a.code){case a.NOT_FOUND_ERR:t.addError(t.msgFileNotFound.repl("{name}",i));break;case a.SECURITY_ERR:t.addError(t.msgFileSecured.repl("{name}",i));break;case a.NOT_READABLE_ERR:t.addError(t.msgFileNotReadable.repl("{name}",i));break;case a.ABORT_ERR:t.addError(t.msgFilePreviewAborted.repl("{name}",i));break;default:t.addError(t.msgFilePreviewError.repl("{name}",i))}},parseFileType:function(e){var i,t,a,n,r=this;for(n=0;n<U.length;n+=1)if(a=U[n],i=O(a,r.fileTypeSettings)?r.fileTypeSettings[a]:A[a],t=i(e.type,e.name)?a:"",!L(t))return t;return"other"},previewDefault:function(i,t,a){if(this.showPreview){var n=this,r=N.createObjectURL(i),l=e("#"+t),o=n.previewSettings.other,s=n.renderFileFooter(i.name,o.width),d=n.getPreviewTemplate("other"),p=t.slice(t.lastIndexOf("-")+1),c="";a===!0&&(c=" btn disabled",s+='<div class="file-other-error text-danger"><i class="glyphicon glyphicon-exclamation-sign"></i></div>'),n.$preview.append("\n"+d.repl("{previewId}",t).repl("{frameClass}",c).repl("{fileindex}",p).repl("{caption}",n.slug(i.name)).repl("{width}",o.width).repl("{height}",o.height).repl("{type}",i.type).repl("{data}",r).repl("{footer}",s)),l.on("load",function(){N.revokeObjectURL(l.attr("data"))})}},previewFile:function(e,i,t,a){if(this.showPreview){var n,r,l,o,s=this,d=s.parseFileType(e),p=s.slug(e.name),c=s.allowedPreviewTypes,f=s.allowedPreviewMimeTypes,u=O(d,s.previewTemplates)?s.previewTemplates[d]:S[d],v=O(d,s.previewSettings)?s.previewSettings[d]:j[d],h=parseInt(s.wrapTextLength,10),m=s.wrapIndicator,g=c.indexOf(d)>=0,w=L(f)||!L(f)&&O(e.type,f),b=s.renderFileFooter(p,v.width),C="",x=t.slice(t.lastIndexOf("-")+1);g&&w?("text"===d?(r=Z(i.target.result),N.revokeObjectURL(a),r.length>h&&(l="text-"+M(),o=.75*window.innerHeight,C=s.getLayoutTemplate("modal").repl("{id}",l).repl("{title}",p).repl("{height}",o).repl("{body}",r),m=m.repl("{title}",p).repl("{dialog}","$('#"+l+"').modal('show')"),r=r.substring(0,h-1)+m),n=u.repl("{previewId}",t).repl("{caption}",p).repl("{frameClass}","").repl("{type}",e.type).repl("{width}",v.width).repl("{height}",v.height).repl("{data}",r).repl("{footer}",b).repl("{fileindex}",x)+C):n=u.repl("{previewId}",t).repl("{caption}",p).repl("{frameClass}","").repl("{type}",e.type).repl("{data}",a).repl("{width}",v.width).repl("{height}",v.height).repl("{footer}",b).repl("{fileindex}",x),s.$preview.append("\n"+n),s.autoSizeImage(t)):s.previewDefault(e,t)}},slugDefault:function(e){return L(e)?"":e.split(/(\\|\/)/g).pop().replace(/[^\w\-.\\\/ ]+/g,"")},getFileStack:function(){var e=this;return e.filestack.filter(function(e){return void 0!==e})},readFiles:function(e){function i(h){if(L(a.attr("multiple"))&&(c=1),h>=c)return l.removeClass("loading"),void o.html("");var m,g,w,b,C,x,y=u+h,$=p+"-"+y,T=e[h],k=t.slug(T.name),E=(T.size||0)/1e3,F="",P=N.createObjectURL(T),I=0,D=t.allowedFileTypes,S=L(D)?"":D.join(", "),U=t.allowedFileExtensions,j=L(U)?"":U.join(", ");if(L(U)||(F=new RegExp("\\.("+U.join("|")+")$","i")),E=E.toFixed(2),t.maxFileSize>0&&E>t.maxFileSize)return b=t.msgSizeTooLarge.repl("{name}",k).repl("{size}",E).repl("{maxSize}",t.maxFileSize),void(t.isError=v(b,T,$,h));if(!L(D)&&R(D)){for(w=0;w<D.length;w+=1)C=D[w],g=f[C],x=void 0!==g&&g(T.type,k),I+=L(x)?0:x.length;if(0===I)return b=t.msgInvalidFileType.repl("{name}",k).repl("{types}",S),void(t.isError=v(b,T,$,h))}return 0!==I||L(U)||!R(U)||L(F)||(x=k.match(F),I+=L(x)?0:x.length,0!==I)?t.showPreview?(n.length>0&&void 0!==FileReader?(o.html(s.repl("{index}",h+1).repl("{files}",c)),l.addClass("loading"),r.onerror=function(e){t.errorHandler(e,k)},r.onload=function(e){t.previewFile(T,e,$,P),t.initFileActions()},r.onloadend=function(){b=d.repl("{index}",h+1).repl("{files}",c).repl("{percent}",50).repl("{name}",k),setTimeout(function(){o.html(b),N.revokeObjectURL(P)},100),setTimeout(function(){i(h+1),t.updateFileDetails(c)},100),t.raise("fileloaded",[T,$,h,r])},r.onprogress=function(e){if(e.lengthComputable){var i=e.loaded/e.total*100,t=Math.ceil(i);b=d.repl("{index}",h+1).repl("{files}",c).repl("{percent}",t).repl("{name}",k),setTimeout(function(){o.html(b)},100)}},m=O("text",f)?f.text:A.text,m(T.type,k)?r.readAsText(T,t.textEncoding):r.readAsArrayBuffer(T)):(t.previewDefault(T,$),setTimeout(function(){i(h+1),t.updateFileDetails(c)
},100),t.raise("fileloaded",[T,$,h,r])),void t.filestack.push(T)):(t.filestack.push(T),setTimeout(i(h+1),100),void t.raise("fileloaded",[T,$,h,r])):(b=t.msgInvalidFileExtension.repl("{name}",k).repl("{extensions}",j),void(t.isError=v(b,T,$,h)))}this.reader=new FileReader;var t=this,a=t.$element,n=t.$preview,r=t.reader,l=t.$previewContainer,o=t.$previewStatus,s=t.msgLoading,d=t.msgProgress,p=t.previewInitId,c=e.length,f=t.fileTypeSettings,u=t.filestack.length,v=function(i,a,n,r){t.previewDefault(a,n,!0);var l=t.getOutData({},{},e);return t.isUploadable?t.showUploadError(i,l,n,r):t.showError(i,a,n,r)};i(0),t.updateFileDetails(c,!1)},updateFileDetails:function(e){var i=this,t=i.msgSelected,a=i.$element,n=i.getFileStack(),r=a.val()||n.length&&n[0].name||"",l=i.slug(r),o=i.isUploadable?n.length:e,s=i.initialPreviewCount+o,d=o>1?t.repl("{n}",s):l;i.isError?(i.$previewContainer.removeClass("loading"),i.$previewStatus.html(""),i.$captionContainer.find(".kv-caption-icon").hide(),d=i.msgValidationError):i.showFileIcon(),i.setCaption(d),i.$container.removeClass("file-input-new file-input-ajax-new"),1===arguments.length&&i.raise("fileselect",[e,l])},change:function(e){var i,t,a,n=this,r=n.$element,l=n.$preview,o=arguments.length>1,s=o?e.originalEvent.dataTransfer.files:r.get(0).files,d=L(r.attr("multiple")),p=n.filestack.length,c=n.isUploadable&&0!==p,f=function(e,i,t,a){var r=n.getOutData({},{},s);return n.isUploadable?n.showUploadError(e,r,t,a):n.showError(e,i,t,a)};return n.resetUpload(),n.hideFileIcon(),n.$container.find(".file-drop-zone ."+n.dropZoneTitleClass).remove(),i=o?s:void 0===e.target.files?e.target&&e.target.value?[{name:e.target.value.replace(/^.+\\/,"")}]:[]:e.target.files,L(i)||0===i.length?(c||n.clear(!0),void n.raise("fileselectnone")):(n.resetErrors(),(!c||d&&p>0)&&(l.html(n.overwriteInitial?"":n.initialPreviewContent),d&&p>0&&(n.filestack=[])),a=n.isUploadable?n.getFileStack().length+i.length:i.length,n.maxFileCount>0&&a>n.maxFileCount?(t=n.msgFilesTooMany.repl("{m}",n.maxFileCount).repl("{n}",a),n.isError=f(t,null,null,null),n.$captionContainer.find(".kv-caption-icon").hide(),n.$caption.html(n.msgValidationError),n.setEllipsis(),void n.$container.removeClass("file-input-new file-input-ajax-new")):(n.isIE9?n.updateFileDetails(1):n.readFiles(s),c?n.raise("filebatchselected",[n.getFileStack()]):n.raise("filebatchselected",[i]),void(n.reader=null)))},autoSizeImage:function(e){var i,t,a,n=this,r=n.$preview,l=r.find("#"+e),o=l.find("img");o.length&&o.on("load",function(){i=l.width(),t=r.width(),i>t&&(o.css("width","100%"),l.css("width","97%")),a=o.closest(".file-preview-frame").find(".file-caption-name"),a.length&&(a.width(o.width()),a.attr("title",a.text())),n.raise("fileimageloaded",e)})},setCaption:function(i){var t=this,a=e("<div>"+i+"</div>").text(),n=t.getLayoutTemplate("icon"),r=n+a;0!==t.$caption.length&&(t.$caption.html(r),t.$caption.attr("title",a),t.$captionContainer.find(".file-caption-ellipsis").attr("title",a),t.setEllipsis())},initBrowse:function(e){var i=this;i.$btnFile=e.find(".btn-file"),i.$btnFile.append(i.$element)},createContainer:function(){var i=this,t=e(document.createElement("span")).attr({"class":"file-input file-input-new"}).html(i.renderMain());return i.$element.before(t),i.initBrowse(t),t},refreshContainer:function(){var e=this,i=e.$container;i.before(e.$element),i.html(e.renderMain()),e.initBrowse(i)},renderMain:function(){var e=this,i=e.isUploadable&&e.dropZoneEnabled?" file-drop-zone":"",t=e.showPreview?e.getLayoutTemplate("preview").repl("{class}",e.previewClass).repl("{dropClass}",i):"",a=e.isDisabled?e.captionClass+" file-caption-disabled":e.captionClass,n=e.captionTemplate.repl("{class}",a+" kv-fileinput-caption");return e.mainTemplate.repl("{class}",e.mainClass).repl("{preview}",t).repl("{caption}",n).repl("{upload}",e.renderUpload()).repl("{remove}",e.renderRemove()).repl("{cancel}",e.renderCancel()).repl("{browse}",e.renderBrowse())},renderBrowse:function(){var e=this,i=e.browseClass+" btn-file",t="";return e.isDisabled&&(t=" disabled "),'<div class="'+i+'"'+t+"> "+e.browseIcon+e.browseLabel+" </div>"},renderRemove:function(){var e=this,i=e.removeClass+" fileinput-remove fileinput-remove-button",t="";return e.showRemove?(e.isDisabled&&(t=" disabled "),'<button type="button" title="'+e.removeTitle+'" class="'+i+'"'+t+">"+e.removeIcon+e.removeLabel+"</button>"):""},renderCancel:function(){var e=this,i=e.cancelClass+" fileinput-cancel fileinput-cancel-button";return e.showCancel?'<button type="button" title="'+e.cancelTitle+'" class="hide '+i+'">'+e.cancelIcon+e.cancelLabel+"</button>":""},renderUpload:function(){var e=this,i=e.uploadClass+" kv-fileinput-upload fileinput-upload-button",t="",a="";return e.showUpload?(e.isDisabled&&(a=" disabled "),t=!e.isUploadable||e.isDisabled?'<button type="submit" title="'+e.uploadTitle+'"class="'+i+'"'+a+">"+e.uploadIcon+e.uploadLabel+"</button>":'<a href="'+e.uploadUrl+'" title="'+e.uploadTitle+'" class="'+i+'"'+a+">"+e.uploadIcon+e.uploadLabel+"</a>"):""}},e.fn.fileinput=function(a){if(t()||i(9)){var n=Array.apply(null,arguments);return n.shift(),this.each(function(){var i=e(this),t=i.data("fileinput"),r="object"==typeof a&&a;t||(t=new _(this,e.extend({},e.fn.fileinput.defaults,r,e(this).data())),i.data("fileinput",t)),"string"==typeof a&&t[a].apply(t,n)})}},e.fn.fileinput.defaults={showCaption:!0,showPreview:!0,showRemove:!0,showUpload:!0,showCancel:!0,mainClass:"",previewClass:"",captionClass:"",mainTemplate:null,initialCaption:"",initialPreview:"",initialPreviewCount:0,initialPreviewDelimiter:"*$$*",initialPreviewConfig:[],initialPreviewShowDelete:!0,overwriteInitial:!0,layoutTemplates:D,previewTemplates:S,allowedPreviewTypes:U,allowedPreviewMimeTypes:null,allowedFileTypes:null,allowedFileExtensions:null,customLayoutTags:{},customPreviewTags:{},previewSettings:j,fileTypeSettings:A,browseLabel:"Browse &hellip;",browseIcon:'<i class="glyphicon glyphicon-folder-open"></i> &nbsp;',browseClass:"btn btn-primary",removeLabel:"Remove",removeTitle:"Clear selected files",removeIcon:'<i class="glyphicon glyphicon-trash"></i> ',removeClass:"btn btn-default",cancelLabel:"Cancel",cancelTitle:"Abort ongoing upload",cancelIcon:'<i class="glyphicon glyphicon-ban-circle"></i> ',cancelClass:"btn btn-default",uploadLabel:"Upload",uploadTitle:"Upload selected files",uploadIcon:'<i class="glyphicon glyphicon-upload"></i> ',uploadClass:"btn btn-default",uploadUrl:null,uploadExtraData:[],uploadAsync:!0,maxFileSize:0,maxFileCount:0,msgSizeTooLarge:'File "{name}" (<b>{size} KB</b>) exceeds maximum allowed upload size of <b>{maxSize} KB</b>. Please retry your upload!',msgFilesTooMany:"Number of files selected for upload <b>({n})</b> exceeds maximum allowed limit of <b>{m}</b>. Please retry your upload!",msgFileNotFound:'File "{name}" not found!',msgFileSecured:'Security restrictions prevent reading the file "{name}".',msgFileNotReadable:'File "{name}" is not readable.',msgFilePreviewAborted:'File preview aborted for "{name}".',msgFilePreviewError:'An error occurred while reading the file "{name}".',msgInvalidFileType:'Invalid type for file "{name}". Only "{types}" files are supported.',msgInvalidFileExtension:'Invalid extension for file "{name}". Only "{extensions}" files are supported.',msgValidationError:'<span class="text-danger"><i class="glyphicon glyphicon-exclamation-sign"></i> File Upload Error</span>',msgErrorClass:"file-error-message",msgLoading:"Loading  file {index} of {files} &hellip;",msgProgress:"Loading file {index} of {files} - {name} - {percent}% completed.",msgSelected:"{n} files selected",progressClass:"progress-bar progress-bar-success progress-bar-striped active",progressCompleteClass:"progress-bar progress-bar-success",previewFileType:"image",wrapTextLength:250,wrapIndicator:' <span class="wrap-indicator" title="{title}" onclick="{dialog}">[&hellip;]</span>',elCaptionContainer:null,elCaptionText:null,elPreviewContainer:null,elPreviewImage:null,elPreviewStatus:null,elErrorContainer:null,slugCallback:null,dropZoneEnabled:!0,dropZoneTitle:"Drag & drop files here &hellip;",dropZoneTitleClass:"file-drop-zone-title",fileActionSettings:{},otherActionButtons:"",textEncoding:"UTF-8",ajaxSettings:{}},e.fn.fileinput.Constructor=_,e(document).ready(function(){var i=e("input.file[type=file]"),t=i.attr("type")?i.length:0;t>0&&i.fileinput()})}(window.jQuery);