class FileUpload{constructor(){this.init()}init(){var e;"undefined"==typeof Dropzone?console.warn("Dropzone is not loaded."):(Dropzone.autoDiscover=!1,(e=document.querySelectorAll('[data-plugin="dropzone"]'))&&e.forEach(e=>{var o=e.getAttribute("action")||"/",t=e.dataset.previewsContainer,n=e.dataset.uploadPreviewTemplate,o={url:o,acceptedFiles:"image/*"};t&&(o.previewsContainer=t),n&&(t=document.querySelector(n))&&(o.previewTemplate=t.innerHTML);try{new Dropzone(e,o)}catch(e){console.error("Dropzone initialization failed:",e)}}))}}document.addEventListener("DOMContentLoaded",()=>{if(new FileUpload,"undefined"!=typeof FilePond){try{FilePond.registerPlugin(FilePondPluginImagePreview)}catch(e){console.warn("FilePond plugins registration failed:",e)}var e=Array.from(document.querySelectorAll("input.filepond-input-multiple")),e=(0<e.length?e.forEach(e=>{FilePond.create(e)}):console.warn("FilePond multiple-file inputs not found."),Array.from(document.querySelectorAll("input.filepond-input-circle")));0<e.length?e.forEach(e=>{FilePond.create(e,{imageCropAspectRatio:"1:1",imageResizeTargetWidth:200,imageResizeTargetHeight:200,stylePanelLayout:"compact circle",styleLoadIndicatorPosition:"center bottom",styleProgressIndicatorPosition:"right bottom",styleButtonRemoveItemPosition:"left bottom",styleButtonProcessItemPosition:"right bottom",allowImagePreview:!0,imagePreviewHeight:100,labelIdle:'<svg  xmlns="http://www.w3.org/2000/svg"  width="32"  height="32"  viewBox="0 0 24 24"  fill="none"  stroke="currentColor"  stroke-width="2"  stroke-linecap="round"  stroke-linejoin="round" class="text-muted"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M5 7h1a2 2 0 0 0 2 -2a1 1 0 0 1 1 -1h6a1 1 0 0 1 1 1a2 2 0 0 0 2 2h1a2 2 0 0 1 2 2v9a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-9a2 2 0 0 1 2 -2" /><path d="M9 13a3 3 0 1 0 6 0a3 3 0 0 0 -6 0" /></svg>'})}):console.warn("FilePond circle-style inputs not found.")}else console.warn("FilePond is not loaded.")});