varqq=function(a){"use strict";return{hide:function(){returna.style.display="none",this},attach:function(b,c){returna.addEventListener?a.addEventListener(b,c,!1):a.attachEvent&&a.attachEvent("on"+b,c),function(){qq(a).detach(b,c)}},detach:function(b,c){returna.removeEventListener?a.removeEventListener(b,c,!1):a.attachEvent&&a.detachEvent("on"+b,c),this},contains:function(b){returnb?a===b?!0:a.contains?a.contains(b):!!(8&b.compareDocumentPosition(a)):!1},insertBefore:function(b){returnb.parentNode.insertBefore(a,b),this},remove:function(){returna.parentNode.removeChild(a),this},css:function(b){if(null==a.style)thrownewqq.Error("Can't apply style to node as it is not on the HTMLElement prototype chain!");returnnull!=b.opacity&&"string"!=typeofa.style.opacity&&"undefined"!=typeofa.filters&&(b.filter="alpha(opacity="+Math.round(100*b.opacity)+")"),qq.extend(a.style,b),this},hasClass:function(b,c){vard=newRegExp("(^| )"+b+"( |$)");returnd.test(a.className)||!(!c||!d.test(a.parentNode.className))},addClass:function(b){returnqq(a).hasClass(b)||(a.className+=" "+b),this},removeClass:function(b){varc=newRegExp("(^| )"+b+"( |$)");returna.className=a.className.replace(c," ").replace(/^\s+|\s+$/g,""),this},getByClass:function(b){varc,d=[];returna.querySelectorAll?a.querySelectorAll("."+b):(c=a.getElementsByTagName("*"),qq.each(c,function(a,c){qq(c).hasClass(b)&&d.push(c)}),d)},children:function(){for(varb=[],c=a.firstChild;c;)1===c.nodeType&&b.push(c),c=c.nextSibling;returnb},setText:function(b){returna.innerText=b,a.textContent=b,this},clearText:function(){returnqq(a).setText("")},hasAttribute:function(b){varc;returna.hasAttribute?a.hasAttribute(b)?null==/^false$/i.exec(a.getAttribute(b)):!1:(c=a[b],void0===c?!1:null==/^false$/i.exec(c))}}};!function(){"use strict";qq.canvasToBlob=function(a,b,c){returnqq.dataUriToBlob(a.toDataURL(b,c))},qq.dataUriToBlob=function(a){varb,c,d,e,f=function(a,b){varc=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder,d=c&&newc;returnd?(d.append(a),d.getBlob(b)):newBlob([a],{type:b})};returnc=a.split(",")[0].indexOf("base64")>=0?atob(a.split(",")[1]):decodeURI(a.split(",")[1]),e=a.split(",")[0].split(":")[1].split(";")[0],b=newArrayBuffer(c.length),d=newUint8Array(b),qq.each(c,function(a,b){d[a]=b.charCodeAt(0)}),f(b,e)},qq.log=function(a,b){window.console&&(b&&"info"!==b?window.console[b]?window.console[b](a):window.console.log("<"+b+"> "+a):window.console.log(a))},qq.isObject=function(a){returna&&!a.nodeType&&"[object Object]"===Object.prototype.toString.call(a)},qq.isFunction=function(a){return"function"==typeofa},qq.isArray=function(a){return"[object Array]"===Object.prototype.toString.call(a)||a&&window.ArrayBuffer&&a.buffer&&a.buffer.constructor===ArrayBuffer},qq.isItemList=function(a){return"[object DataTransferItemList]"===Object.prototype.toString.call(a)},qq.isNodeList=function(a){return"[object NodeList]"===Object.prototype.toString.call(a)||a.item&&a.namedItem},qq.isString=function(a){return"[object String]"===Object.prototype.toString.call(a)},qq.trimStr=function(a){returnString.prototype.trim?a.trim():a.replace(/^\s+|\s+$/g,"")},qq.format=function(a){varb=Array.prototype.slice.call(arguments,1),c=a,d=c.indexOf("{}");returnqq.each(b,function(a,b){vare=c.substring(0,d),f=c.substring(d+2);returnc=e+b+f,d=c.indexOf("{}",d+b.length),0>d?!1:void0}),c},qq.isFile=function(a){returnwindow.File&&"[object File]"===Object.prototype.toString.call(a)},qq.isFileList=function(a){returnwindow.FileList&&"[object FileList]"===Object.prototype.toString.call(a)},qq.isFileOrInput=function(a){returnqq.isFile(a)||qq.isInput(a)},qq.isInput=function(a,b){varc=function(a){varc=a.toLowerCase();returnb?"file"!==c:"file"===c};returnwindow.HTMLInputElement&&"[object HTMLInputElement]"===Object.prototype.toString.call(a)&&a.type&&c(a.type)?!0:a.tagName&&"input"===a.tagName.toLowerCase()&&a.type&&c(a.type)?!0:!1},qq.isBlob=function(a){returnwindow.Blob&&"[object Blob]"===Object.prototype.toString.call(a)?!0:void0},qq.isXhrUpload
},_isDeletePossible:function(){returnqq.DeleteFileAjaxRequester&&this._options.deleteFile.enabled?this._options.cors.expected?qq.supportedFeatures.deleteFileCorsXhr?!0:qq.supportedFeatures.deleteFileCorsXdr&&this._options.cors.allowXdr?!0:!1:!0:!1},_isAllowedExtension:function(a,b){varc=!1;returna.length?(qq.each(a,function(a,d){if(qq.isString(d)){vare=newRegExp("\\."+d+"$","i");if(null!=b.match(e))returnc=!0,!1}}),c):!0},_itemError:function(a,b,c){functiond(a,b){g=g.replace(a,b)}vare,f,g=this._options.messages[a],h=[],i=[].concat(b),j=i[0],k=this._getButtonId(c),l=this._getValidationBase(k);returnqq.each(l.allowedExtensions,function(a,b){qq.isString(b)&&h.push(b)}),e=h.join(", ").toLowerCase(),d("{file}",this._options.formatFileName(j)),d("{extensions}",e),d("{sizeLimit}",this._formatSize(l.sizeLimit)),d("{minSizeLimit}",this._formatSize(l.minSizeLimit)),f=g.match(/(\{\w+\})/g),null!==f&&qq.each(f,function(a,b){d(b,i[a])}),this._options.callbacks.onError(null,j,g,void0),g},_manualRetry:function(a,b){returnthis._onBeforeManualRetry(a)?(this._netUploadedOrQueued++,this._uploadData.setStatus(a,qq.status.UPLOAD_RETRYING),b?b(a):this._handler.retry(a),!0):void0},_maybeAllComplete:function(a,b){varc=this,d=this._getNotFinished();b===qq.status.UPLOAD_SUCCESSFUL?this._succeededSinceLastAllComplete.push(a):b===qq.status.UPLOAD_FAILED&&this._failedSinceLastAllComplete.push(a),0===d&&(this._succeededSinceLastAllComplete.length||this._failedSinceLastAllComplete.length)&&setTimeout(function(){c._onAllComplete(c._succeededSinceLastAllComplete,c._failedSinceLastAllComplete)},0)},_maybeHandleIos8SafariWorkaround:function(){vara=this;if(this._options.workarounds.ios8SafariUploads&&qq.ios800()&&qq.iosSafari())throwsetTimeout(function(){window.alert(a._options.messages.unsupportedBrowserIos8Safari)},0),newqq.Error(this._options.messages.unsupportedBrowserIos8Safari)},_maybeParseAndSendUploadError:function(a,b,c,d){if(!c.success)if(d&&200!==d.status&&!c.error)this._options.callbacks.onError(a,b,"XHR returned response code "+d.status,d);else{vare=c.error?c.error:this._options.text.defaultResponseError;this._options.callbacks.onError(a,b,e,d)}},_maybeProcessNextItemAfterOnValidateCallback:function(a,b,c,d,e){varf=this;if(b.length>c)if(a||!this._options.validation.stopOnFirstInvalidFile)setTimeout(function(){vara=f._getValidationDescriptor(b[c]),g=f._getButtonId(b[c].file),h=f._getButton(g);f._handleCheckedCallback({name:"onValidate",callback:qq.bind(f._options.callbacks.onValidate,f,a,h),onSuccess:qq.bind(f._onValidateCallbackSuccess,f,b,c,d,e),onFailure:qq.bind(f._onValidateCallbackFailure,f,b,c,d,e),identifier:"Item '"+a.name+"', size: "+a.size})},0);elseif(!a)for(;c<b.length;c++)f._fileOrBlobRejected(b[c].id)},_onAllComplete:function(a,b){this._totalProgress&&this._totalProgress.onAllComplete(a,b,this._preventRetries),this._options.callbacks.onAllComplete(qq.extend([],a),qq.extend([],b)),this._succeededSinceLastAllComplete=[],this._failedSinceLastAllComplete=[]},_onAutoRetry:function(a,b,c,d,e){varf=this;returnf._preventRetries[a]=c[f._options.retry.preventRetryResponseProperty],f._shouldAutoRetry(a,b,c)?(f._maybeParseAndSendUploadError.apply(f,arguments),f._options.callbacks.onAutoRetry(a,b,f._autoRetries[a]),f._onBeforeAutoRetry(a,b),f._retryTimeouts[a]=setTimeout(function(){f.log("Retrying "+b+"..."),f._uploadData.setStatus(a,qq.status.UPLOAD_RETRYING),e?e(a):f._handler.retry(a)},1e3*f._options.retry.autoAttemptDelay),!0):void0},_onBeforeAutoRetry:function(a,b){this.log("Waiting "+this._options.retry.autoAttemptDelay+" seconds before retrying "+b+"...")},_onBeforeManualRetry:function(a){varb,c=this._currentItemLimit;returnthis._preventRetries[a]?(this.log("Retries are forbidden for id "+a,"warn"),!1):this._handler.isValid(a)?(b=this.getName(a),this._options.callbacks.onManualRetry(a,b)===!1?!1:c>0&&this._netUploadedOrQueued+1>c?(this._itemError("retryFailTooManyItems"),!1):(this.log("Retrying upload for '"+b+"' (id: "+a+")..."),!0)):(this.log("'"+a+"' is not a valid file ID","error"),!1)},_onCancel:function(a)
},_attachLoadEvent:function(a,b){varc;m?e(a,b):k[a.id]=qq(a).attach("load",function(){if(p("Received response for "+a.id),a.parentNode){try{if(a.contentDocument&&a.contentDocument.body&&"false"==a.contentDocument.body.innerHTML)return}catch(d){p("Error when attempting to access iframe during handling of upload response ("+d.message+")","error"),c={success:!1}}b(c)}})},_createIframe:function(a){varb=g._getIframeName(a);returnd(b)},_detachLoadEvent:function(a){void0!==k[a]&&(k[a](),deletek[a])},_getIframeName:function(a){returna+"_"+i},_initFormForUpload:function(a){varb=a.method,c=a.endpoint,d=a.params,e=a.paramsInBody,f=a.targetName,g=qq.toElement("<form method='"+b+"' enctype='multipart/form-data'></form>"),h=c;returne?qq.obj2Inputs(d,g):h=qq.obj2url(d,c),g.setAttribute("action",h),g.setAttribute("target",f),g.style.display="none",document.body.appendChild(g),g},_parseJsonResponse:function(a){varb={};try{b=qq.parseJson(a)}catch(c){p("Error when attempting to parse iframe upload response ("+c.message+")","error")}returnb}})},qq.XhrUploadHandler=function(a){"use strict";functionb(a){qq.each(c._getXhrs(a),function(b,d){vare=c._getAjaxRequester(a,b);d.onreadystatechange=null,d.upload.onprogress=null,d.abort(),e&&e.canceled&&e.canceled(a)})}varc=this,d=a.options.namespace,e=a.proxy,f=a.options.chunking,g=a.options.resume,h=f&&a.options.chunking.enabled&&qq.supportedFeatures.chunking,i=g&&a.options.resume.enabled&&h&&qq.supportedFeatures.resume,j=e.getName,k=e.getSize,l=e.getUuid,m=e.getEndpoint,n=e.getDataByUuid,o=e.onUuidChanged,p=e.onProgress,q=e.log;qq.extend(this,newqq.UploadHandler(a)),qq.override(this,function(a){return{add:function(b,d){if(qq.isFile(d)||qq.isBlob(d))a.add(b,{file:d});else{if(!(dinstanceofqq.BlobProxy))thrownewError("Passed obj is not a File, Blob, or proxy");a.add(b,{proxy:d})}c._initTempState(b),i&&c._maybePrepareForResume(b)},expunge:function(d){b(d),c._maybeDeletePersistedChunkData(d),c._clearXhrs(d),a.expunge(d)}}}),qq.extend(this,{clearCachedChunk:function(a,b){deletec._getFileState(a).temp.cachedChunks[b]},clearXhr:function(a,b){vard=c._getFileState(a).temp;d.xhrs&&deleted.xhrs[b],d.ajaxRequesters&&deleted.ajaxRequesters[b]},finalizeChunks:function(a,b){vard=c._getTotalChunks(a)-1,e=c._getXhr(a,d);returnb?(newqq.Promise).success(b(e),e):(newqq.Promise).success({},e)},getFile:function(a){returnc.isValid(a)&&c._getFileState(a).file},getProxy:function(a){returnc.isValid(a)&&c._getFileState(a).proxy},getResumableFilesData:function(){vara=[];returnc._iterateResumeRecords(function(b,d){c.moveInProgressToRemaining(null,d.chunking.inProgress,d.chunking.remaining);vare={name:d.name,remaining:d.chunking.remaining,size:d.size,uuid:d.uuid};d.key&&(e.key=d.key),a.push(e)}),a},isResumable:function(a){return!!f&&c.isValid(a)&&!c._getFileState(a).notResumable},moveInProgressToRemaining:function(a,b,d){vare=b||c._getFileState(a).chunking.inProgress,f=d||c._getFileState(a).chunking.remaining;e&&(e.reverse(),qq.each(e,function(a,b){f.unshift(b)}),e.length=0)},pause:function(a){returnc.isValid(a)?(q(qq.format("Aborting XHR upload for {} '{}' due to pause instruction.",a,j(a))),c._getFileState(a).paused=!0,b(a),!0):void0},reevaluateChunking:function(a){if(f&&c.isValid(a)){varb,d,e=c._getFileState(a);if(deletee.chunking,e.chunking={},b=c._getTotalChunks(a),b>1||f.mandatory){for(e.chunking.enabled=!0,e.chunking.parts=b,e.chunking.remaining=[],d=0;b>d;d++)e.chunking.remaining.push(d);c._initTempState(a)}elsee.chunking.enabled=!1}},updateBlob:function(a,b){c.isValid(a)&&(c._getFileState(a).file=b)},_clearXhrs:function(a){varb=c._getFileState(a).temp;qq.each(b.ajaxRequesters,function(a){deleteb.ajaxRequesters[a]}),qq.each(b.xhrs,function(a){deleteb.xhrs[a]})},_createXhr:function(a,b){returnc._registerXhr(a,b,qq.createXhrInstance())},_getAjaxRequester:function(a,b){vard=null==b?-1:b;returnc._getFileState(a).temp.ajaxRequesters[d]},_getChunkData:function(a,b){vard=f.partSize,e=k(a),g=c.getFile(a),h=d*b,i=h+d>=e?e:h+d,j=c._getTotalChunks(a),l=this._getFileState(a).temp.cachedChun
}},d}};qq.extend(this,{uploadChunk:u.start,uploadFile:u.start}),qq.extend(this,newqq.XhrUploadHandler({options:qq.extend({namespace:"s3"},a),proxy:qq.extend({getEndpoint:a.endpointStore.get},b)})),qq.override(this,function(a){return{expunge:function(b){varc=p._getPersistableData(b)&&p._getPersistableData(b).uploadId,d=p._maybeDeletePersistedChunkData(b);void0!==c&&d&&s.abortMultipart.send(b,c),a.expunge(b)},finalizeChunks:function(a){returnr.combine(a)},_getLocalStorageId:function(b){varc=a._getLocalStorageId(b),d=u.bucket.getName(b);returnc+"-"+d}}})},qq.s3.FormUploadHandler=function(a,b){"use strict";functionc(b,c){vard,e,f,g=a.endpointStore.get(b),i=qq.s3.util.getBucket(g);try{if(d=c.contentDocument||c.contentWindow.document,e=d.body.innerHTML,f=qq.s3.util.parseIframeResponse(c),f.bucket===i&&f.key===qq.s3.util.encodeQueryStringParam(h.getThirdPartyFileId(b)))return!0;l("Response from AWS included an unexpected bucket or key name.","error")}catch(j){l("Error when attempting to parse form upload response ("+j.message+")","error")}return!1}functiond(a){varb=p.get(a);returnb[o]=j(a),qq.s3.util.generateAwsParams({endpoint:q.get(a),params:b,bucket:h._getFileState(a).bucket,key:h.getThirdPartyFileId(a),accessKey:x.get().accessKey,sessionToken:x.get().sessionToken,acl:r.get(a),minFileSize:u.minSizeLimit,maxFileSize:u.maxSizeLimit,successRedirectUrl:w,reducedRedundancy:s,serverSideEncryption:t,log:l},qq.bind(y.getSignature,this,a))}functione(b,c){vare=newqq.Promise,f="POST",i=a.endpointStore.get(b),k=j(b);returnd(b).then(function(a){varb=h._initFormForUpload({method:f,endpoint:i,params:a,paramsInBody:!0,targetName:c.name});e.success(b)},function(a){e.failure(a),g(b,c,k,{error:a})}),e}functionf(a){varb=h._createIframe(a),d=h.getInput(a),f=newqq.Promise;returne(a,b).then(function(e){e.appendChild(d),h._attachLoadEvent(b,function(d){l("iframe loaded"),d?d.success===!1&&(l("Amazon likely rejected the upload request","error"),f.failure(d)):(d={},d.success=c(a,b),d.success===!1?(l("A success response was received by Amazon, but it was invalid in some way.","error"),f.failure(d)):(qq.extend(d,qq.s3.util.parseIframeResponse(b)),f.success(d))),g(a,b)}),l("Sending upload request for "+a),e.submit(),qq(e).remove()},f.failure),f}functiong(a,b){h._detachLoadEvent(a),b&&qq(b).remove()}varh=this,i=b.onUuidChanged,j=b.getName,k=b.getUuid,l=b.log,m=a.getBucket,n=a.getKeyName,o=a.filenameParam,p=a.paramsStore,q=a.endpointStore,r=a.aclStore,s=a.objectProperties.reducedRedundancy,t=a.objectProperties.serverSideEncryption,u=a.validation,v=a.signature,w=a.iframeSupport.localBlankPagePath,x=a.signature.credentialsProvider,y=newqq.s3.RequestSigner({signatureSpec:v,cors:a.cors,log:l});if(void0===w)thrownewError("successRedirectEndpoint MUST be defined if you intend to use browsers that do not support the File API!");qq.extend(this,newqq.FormUploadHandler({options:{isCors:!1,inputName:"file"},proxy:{onCancel:a.onCancel,onUuidChanged:i,getName:j,getUuid:k,log:l}})),qq.extend(this,{uploadFile:function(a){varb=j(a),c=newqq.Promise;returnh.getThirdPartyFileId(a)?h._getFileState(a).bucket?f(a).then(c.success,c.failure):m(a).then(function(b){h._getFileState(a).bucket=b,f(a).then(c.success,c.failure)}):n(a,b).then(function(b){m(a).then(function(d){h._getFileState(a).bucket=d,h._setThirdPartyFileId(a,b),f(a).then(c.success,c.failure)},function(a){c.failure({error:a})})},function(a){c.failure({error:a})}),c}})},function(){"use strict";qq.s3.FineUploader=function(a){varb={failedUploadTextDisplay:{mode:"custom"}};qq.extend(b,a,!0),qq.FineUploader.call(this,b,"s3"),qq.supportedFeatures.ajaxUploading||void0!==b.iframeSupport.localBlankPagePath||(this._options.element.innerHTML="<div>You MUST set the <code>localBlankPagePath</code> property of the <code>iframeSupport</code> option since this browser does not support the File API!</div>")},qq.extend(qq.s3.FineUploader.prototype,qq.s3.FineUploaderBasic.prototype),qq.extend(qq.s3.FineUploader.prototype,qq.uiPublicApi),qq.extend(qq.s3.FineUploader.prototype,qq.uiPrivateApi)}(),qq.PasteS