25 lines
37 KiB
JavaScript
Raw Normal View History

"use strict";(self.webpackChunk=self.webpackChunk||[]).push([["dropzone"],{"./node_modules/dropzone/dist/dropzone.css":function(C,f,g){g.r(f)},"./node_modules/dropzone/dist/dropzone.mjs":function(C,f,g){g.r(f),g.d(f,{Dropzone:function(){return r},default:function(){return r}});var v=F;function F(){var n=[].slice.call(arguments),e=!1;typeof n[0]=="boolean"&&(e=n.shift());var i=n[0];if(y(i))throw new Error("extendee must be an object");for(var t=n.slice(1),s=t.length,l=0;l<s;l++){var o=t[l];for(var a in o)if(Object.prototype.hasOwnProperty.call(o,a)){var u=o[a];if(e&&b(u)){var d=Array.isArray(u)?[]:{};i[a]=F(!0,Object.prototype.hasOwnProperty.call(i,a)&&!y(i[a])?i[a]:d,u)}else i[a]=u}}return i}function b(n){return Array.isArray(n)||{}.toString.call(n)=="[object Object]"}function y(n){return!n||typeof n!="object"&&typeof n!="function"}function z(n){return n&&n.__esModule?n.default:n}class E{on(e,i){return this._callbacks=this._callbacks||{},this._callbacks[e]||(this._callbacks[e]=[]),this._callbacks[e].push(i),this}emit(e,...i){this._callbacks=this._callbacks||{};let t=this._callbacks[e];if(t)for(let s of t)s.apply(this,i);return this.element&&this.element.dispatchEvent(this.makeEvent("dropzone:"+e,{args:i})),this}makeEvent(e,i){let t={bubbles:!0,cancelable:!0,detail:i};if(typeof window.CustomEvent=="function")return new CustomEvent(e,t);var s=document.createEvent("CustomEvent");return s.initCustomEvent(e,t.bubbles,t.cancelable,t.detail),s}off(e,i){if(!this._callbacks||arguments.length===0)return this._callbacks={},this;let t=this._callbacks[e];if(!t)return this;if(arguments.length===1)return delete this._callbacks[e],this;for(let s=0;s<t.length;s++)if(t[s]===i){t.splice(s,1);break}return this}}var w={};w=`<div class="dz-preview dz-file-preview">
<div class="dz-image"><img data-dz-thumbnail=""></div>
<div class="dz-details">
<div class="dz-size"><span data-dz-size=""></span></div>
<div class="dz-filename"><span data-dz-name=""></span></div>
</div>
<div class="dz-progress">
<span class="dz-upload" data-dz-uploadprogress=""></span>
</div>
<div class="dz-error-message"><span data-dz-errormessage=""></span></div>
<div class="dz-success-mark">
<svg width="54" height="54" viewBox="0 0 54 54" fill="white" xmlns="http://www.w3.org/2000/svg">
<path d="M10.2071 29.7929L14.2929 25.7071C14.6834 25.3166 15.3166 25.3166 15.7071 25.7071L21.2929 31.2929C21.6834 31.6834 22.3166 31.6834 22.7071 31.2929L38.2929 15.7071C38.6834 15.3166 39.3166 15.3166 39.7071 15.7071L43.7929 19.7929C44.1834 20.1834 44.1834 20.8166 43.7929 21.2071L22.7071 42.2929C22.3166 42.6834 21.6834 42.6834 21.2929 42.2929L10.2071 31.2071C9.81658 30.8166 9.81658 30.1834 10.2071 29.7929Z"></path>
</svg>
</div>
<div class="dz-error-mark">
<svg width="54" height="54" viewBox="0 0 54 54" fill="white" xmlns="http://www.w3.org/2000/svg">
<path d="M26.2929 20.2929L19.2071 13.2071C18.8166 12.8166 18.1834 12.8166 17.7929 13.2071L13.2071 17.7929C12.8166 18.1834 12.8166 18.8166 13.2071 19.2071L20.2929 26.2929C20.6834 26.6834 20.6834 27.3166 20.2929 27.7071L13.2071 34.7929C12.8166 35.1834 12.8166 35.8166 13.2071 36.2071L17.7929 40.7929C18.1834 41.1834 18.8166 41.1834 19.2071 40.7929L26.2929 33.7071C26.6834 33.3166 27.3166 33.3166 27.7071 33.7071L34.7929 40.7929C35.1834 41.1834 35.8166 41.1834 36.2071 40.7929L40.7929 36.2071C41.1834 35.8166 41.1834 35.1834 40.7929 34.7929L33.7071 27.7071C33.3166 27.3166 33.3166 26.6834 33.7071 26.2929L40.7929 19.2071C41.1834 18.8166 41.1834 18.1834 40.7929 17.7929L36.2071 13.2071C35.8166 12.8166 35.1834 12.8166 34.7929 13.2071L27.7071 20.2929C27.3166 20.6834 26.6834 20.6834 26.2929 20.2929Z"></path>
</svg>
</div>
</div>
`;var L={url:null,method:"post",withCredentials:!1,timeout:null,parallelUploads:2,uploadMultiple:!1,chunking:!1,forceChunking:!1,chunkSize:2097152,parallelChunkUploads:!1,retryChunks:!1,retryChunksLimit:3,maxFilesize:256,paramName:"file",createImageThumbnails:!0,maxThumbnailFilesize:10,thumbnailWidth:120,thumbnailHeight:120,thumbnailMethod:"crop",resizeWidth:null,resizeHeight:null,resizeMimeType:null,resizeQuality:.8,resizeMethod:"contain",filesizeBase:1e3,maxFiles:null,headers:null,defaultHeaders:!0,clickable:!0,ignoreHiddenFiles:!0,acceptedFiles:null,acceptedMimeTypes:null,autoProcessQueue:!0,autoQueue:!0,addRemoveLinks:!1,previewsContainer:null,disablePreviews:!1,hiddenInputContainer:"body",capture:null,renameFilename:null,renameFile:null,forceFallback:!1,dictDefaultMessage:"Drop files here to upload",dictFallbackMessage:"Your browser does not support drag'n'drop file uploads.",dictFallbackText:"Please use the fallback form below to upload your files like in the olden days.",dictFileTooBig:"File is too big ({{filesize}}MiB). Max filesize: {{maxFilesize}}MiB.",dictInvalidFileType:"You can't upload files of this type.",dictResponseError:"Server responded with {{statusCode}} code.",dictCancelUpload:"Cancel upload",dictUploadCanceled:"Upload canceled.",dictCancelUploadConfirmation:"Are you sure you want to cancel this upload?",dictRemoveFile:"Remove file",dictRemoveFileConfirmation:null,dictMaxFilesExceeded:"You can not upload any more files.",dictFileSizeUnits:{tb:"TB",gb:"GB",mb:"MB",kb:"KB",b:"b"},init(){},params(n,e,i){if(i)return{dzuuid:i.file.upload.uuid,dzchunkindex:i.index,dztotalfilesize:i.file.size,dzchunksize:this.options.chunkSize,dztotalchunkcount:i.file.upload.totalChunkCount,dzchunkbyteoffset:i.index*this.options.chunkSize}},accept(n,e){return e()},chunksUploaded:function(n,e){e()},binaryBody:!1,fallback(){let n;this.element.className=`${this.element.className} dz-browser-not-supported`;for(let i of this.element.getElementsByTagName("div"))if(/(^| )dz-message($| )/.test(i.className)){n=i,i.className="dz-message";break}n||(n=r.createElement('<div class="dz-message"><span></span></div>'),this.element.appendChild(n));let e=n.getElementsByTagName("span")[0];return e&&(e.textContent!=null?e.textContent=this.options.dictFallbackMessage:e.innerText!=null&&(e.innerText=this.options.dictFallbackMessage)),this.element.appendChild(this.getFallbackForm())},resize(n,e,i,t){let s={srcX:0,srcY:0,srcWidth:n.width,srcHeight:n.height},l=n.width/n.height;e==null&&i==null?(e=s.srcWidth,i=s.srcHeight):e==null?e=i*l:i==null&&(i=e/l),e=Math.min(e,s.srcWidth),i=Math.min(i,s.srcHeight);let o=e/i;if(s.srcWidth>e||s.srcHeight>i)if(t==="crop")l>o?(s.srcHeight=n.height,s.srcWidth=s.srcHeight*o):(s.srcWidth=n.width,s.srcHeight=s.srcWidth/o);else if(t==="contain")l>o?i=e/l:e=i*l;else throw new Error(`Unknown resizeMethod '${t}'`);return s.srcX=(n.width-s.srcWidth)/2,s.srcY=(n.height-s.srcHeight)/2,s.trgWidth=e,s.trgHeight=i,s},transformFile(n,e){return(this.options.resizeWidth||this.options.resizeHeight)&&n.type.match(/image.*/)?this.resizeImage(n,this.options.resizeWidth,this.options.resizeHeight,this.options.resizeMethod,e):e(n)},previewTemplate:z(w),drop(n){return this.element.classList.remove("dz-drag-hover")},dragstart(n){},dragend(n){return this.element.classList.remove("dz-drag-hover")},dragenter(n){return this.element.classList.add("dz-drag-hover")},dragover(n){return this.element.classList.add("dz-drag-hover")},dragleave(n){return this.element.classList.remove("dz-drag-hover")},paste(n){},reset(){return this.element.classList.remove("dz-started")},addedfile(n){if(this.element===this.previewsContainer&&this.element.classList.add("dz-started"),this.previewsContainer&&!this.options.disablePreviews){n.previewElement=r.createElement(this.options.previewTemplate.trim()),n.previewTemplate=n.previewElement,this.previewsContainer.appendChild(n.previewElement);for(var e of n.previewElement.querySelectorAll("[data-dz-name]"))e.textContent=n.name;for(e of n.previewElement.querySelectorAll("[data-dz-size]"))e.innerHTML=this.filesize(n.size)
Valid base64 characters are A-Z, a-z, 0-9, '+', '/',and '='
Expect errors in decoding.`),e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"");o=this.KEY_STR.indexOf(e.charAt(h++)),a=this.KEY_STR.indexOf(e.charAt(h++)),u=this.KEY_STR.indexOf(e.charAt(h++)),d=this.KEY_STR.indexOf(e.charAt(h++)),t=o<<2|a>>4,s=(a&15)<<4|u>>2,l=(u&3)<<6|d,p.push(t),u!==64&&p.push(s),d!==64&&p.push(l),t=s=l="",o=a=u=d="",h<e.length;);return p}}k.initClass();let I=function(n,e){let i=!1,t=!0,s=n.document,l=s.documentElement,o=s.addEventListener?"addEventListener":"attachEvent",a=s.addEventListener?"removeEventListener":"detachEvent",u=s.addEventListener?"":"on";var d=function(p){if(!(p.type==="readystatechange"&&s.readyState!=="complete")&&((p.type==="load"?n:s)[a](u+p.type,d,!1),!i&&(i=!0)))return e.call(n,p.type||p)},h=function(){try{l.doScroll("left")}catch{setTimeout(h,50);return}return d("poll")};if(s.readyState!=="complete"){if(s.createEventObject&&l.doScroll){try{t=!n.frameElement}catch{}t&&h()}return s[o](u+"DOMContentLoaded",d,!1),s[o](u+"readystatechange",d,!1),n[o](u+"load",d,!1)}};function U(n,e){return typeof n<"u"&&n!==null?e(n):void 0}function M(n,e,i){if(typeof n<"u"&&n!==null&&typeof n[e]=="function")return i(n,e)}}}]);