/*! For license information please see npm.bs-custom-file-input.38e65693f1595035291c.js.LICENSE.txt */
(self.webpackChunkpaper_admin=self.webpackChunkpaper_admin||[]).push([[9357],{3216:function(e){e.exports=function(){"use strict";var e={CUSTOMFILE:'.custom-file input[type="file"]',CUSTOMFILELABEL:".custom-file-label",FORM:"form",INPUT:"input"},t=3,n=function(t){var n="",r=t.parentNode.querySelector(e.CUSTOMFILELABEL);return r&&(n=r.textContent),n},r=function(e){if(e.childNodes.length>0)for(var n=[].slice.call(e.childNodes),r=0;r<n.length;r++){var l=n[r];if(l.nodeType!==t)return l}return e},l=function(t){var n=t.bsCustomFileInput.defaultText,l=t.parentNode.querySelector(e.CUSTOMFILELABEL);l&&(r(l).textContent=n)},i=!!window.File,u="fakepath",o="\\",a=function(e){if(e.hasAttribute("multiple")&&i)return[].slice.call(e.files).map((function(e){return e.name})).join(", ");if(-1!==e.value.indexOf(u)){var t=e.value.split(o);return t[t.length-1]}return e.value};function c(){var t=this.parentNode.querySelector(e.CUSTOMFILELABEL);if(t){var n=r(t),i=a(this);i.length?n.textContent=i:l(this)}}function f(){for(var t=[].slice.call(this.querySelectorAll(e.INPUT)).filter((function(e){return!!e.bsCustomFileInput})),n=0,r=t.length;n<r;n++)l(t[n])}var s="bsCustomFileInput",v={FORMRESET:"reset",INPUTCHANGE:"change"};return{init:function(t,r){void 0===t&&(t=e.CUSTOMFILE),void 0===r&&(r=e.FORM);for(var l=[].slice.call(document.querySelectorAll(t)),i=[].slice.call(document.querySelectorAll(r)),u=0,o=l.length;u<o;u++){var a=l[u];Object.defineProperty(a,s,{value:{defaultText:n(a)},writable:!0}),c.call(a),a.addEventListener(v.INPUTCHANGE,c)}for(var d=0,p=i.length;d<p;d++)i[d].addEventListener(v.FORMRESET,f),Object.defineProperty(i[d],s,{value:!0,writable:!0})},destroy:function(){for(var t=[].slice.call(document.querySelectorAll(e.FORM)).filter((function(e){return!!e.bsCustomFileInput})),n=[].slice.call(document.querySelectorAll(e.INPUT)).filter((function(e){return!!e.bsCustomFileInput})),r=0,i=n.length;r<i;r++){var u=n[r];l(u),u[s]=void 0,u.removeEventListener(v.INPUTCHANGE,c)}for(var o=0,a=t.length;o<a;o++)t[o].removeEventListener(v.FORMRESET,f),t[o][s]=void 0}}}()}}]);
//# sourceMappingURL=npm.bs-custom-file-input.38e65693f1595035291c.js.map