!function(e,t){if("function"==typeof define&&define.amd)define(["elfinder"],e);else if(t){var n=t.prototype._options.commandsOptions.edit.editors;t.prototype._options.commandsOptions.edit.editors=n.concat(e(t))}}(function(e){"use strict";var t=window.location.search.match(/getfile=([a-z]+)/),n=e.hasRequire,i=function(){var e;try{e=!!new ActiveXObject("ShockwaveFlash.ShockwaveFlash")}catch(t){e=!!("undefined"==typeof window.orientation||navigator&&navigator.mimeTypes["application/x-shockwave-flash"])}return e}(),o=function(e,t,n,i){var o=$(this).children("img:first"),a=$("
").css({position:"absolute",top:"50%",textAlign:"center",width:"100%",fontSize:"16pt"}).html(i.i18n("ntfloadimg")).hide().appendTo(this);o.attr("id",e+"-img").attr("src",n).css({height:"","max-width":"100%","max-height":"100%",cursor:"pointer"}).data("loading",function(e){var t=o.closest(".elfinder-dialog").find("button,.elfinder-titlebar-button");return t.prop("disabled",!e)[e?"removeClass":"addClass"]("ui-state-disabled"),o.css("opacity",e?"":"0.3"),a[e?"hide":"show"](),o})},a=function(e,t){var n,i,o,a=e.attr("style");try{e.attr("style",""),n=e.get(0),i=document.createElement("canvas"),i.width=n.width,i.height=n.height,e.attr("style",a),i.getContext("2d").drawImage(n,0,0),o=i.toDataURL(t)}catch(r){o=e.attr("src")}return o},r=function(){if(i&&window.parent!==window){var e,t,n,o,a=window.location.search.match(/[?&]pixlr=([^&]+)/),r=window.location.search.match(/[?&]image=([^&]+)/);a&&(e=window.parent,t=e.$("#"+a[1]+"iframe").hide(),o=e.$("#"+a[1]).data("resizeoff")(),"http"===r[1].substr(0,4)?(n=r[1],"https:"===window.location.protocol&&(n=n.replace(/^http:/,"https:")),o.on("load error",function(){o.data("loading")(!0)}).attr("src",n).data("loading")()):o.data("loading")(!0),t.remove())}},c=function(e,t){i&&!t.UA.ltIE8||(this.disabled=!0)},s=function(e,t){var n,i=this.fm,o=$(t).children("img:first").data("loading")().data("resizeoff",function(){return $(window).off("resize."+o.attr("id")),o}).on("click",function(){m()}),a=i.getUI(),r=$('