/* =========================================================== * Bootstrap: fileinput.js v4.0.0 * https://www.jasny.net/bootstrap/ * =========================================================== * Copyright 2012-2014 Arnold Daniels * * Licensed under the Apache License, Version 2.0 (the "License") * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * ========================================================== */ !function(u){"use strict";var i="Microsoft Internet Explorer"==window.navigator.appName,n=function(e,t){if(this.$element=u(e),this.options=u.extend({},n.DEFAULTS,t),this.$input=this.$element.find(":file"),0!==this.$input.length){this.name=this.$input.attr("name")||t.name,this.$hidden=this.$element.find('input[type=hidden][name="'+this.name+'"]'),0===this.$hidden.length&&(this.$hidden=u('').insertBefore(this.$input)),this.$preview=this.$element.find(".fileinput-preview");var i=this.$preview.css("height");"inline"!==this.$preview.css("display")&&"0px"!==i&&"none"!==i&&this.$preview.css("line-height",i),this.original={exists:this.$element.hasClass("fileinput-exists"),preview:this.$preview.html(),hiddenVal:this.$hidden.val()},this.listen(),this.reset()}};n.DEFAULTS={clearName:!0},n.prototype.listen=function(){this.$input.on("change.bs.fileinput",u.proxy(this.change,this)),u(this.$input[0].form).on("reset.bs.fileinput",u.proxy(this.reset,this)),this.$element.find('[data-trigger="fileinput"]').on("click.bs.fileinput",u.proxy(this.trigger,this)),this.$element.find('[data-dismiss="fileinput"]').on("click.bs.fileinput",u.proxy(this.clear,this))},n.prototype.verifySizes=function(e){if(void 0===this.options.maxSize)return!0;var t=parseFloat(this.options.maxSize);if(t!==this.options.maxSize)return!0;for(var i=0;i");if(t[0].src=e.target.result,l[0].result=e.target.result,o.find(".fileinput-filename").text(h.name),"none"!=f.css("max-height")){var i=parseInt(f.css("max-height"),10)||0,n=parseInt(f.css("padding-top"),10)||0,s=parseInt(f.css("padding-bottom"),10)||0,r=parseInt(f.css("border-top"),10)||0,a=parseInt(f.css("border-bottom"),10)||0;t.css("max-height",i-n-s-r-a)}f.html(t),p.options.exif&&p.setImageTransform(t,h),o.addClass("fileinput-exists").removeClass("fileinput-new"),o.trigger("change.bs.fileinput",l)},t.readAsDataURL(h)}else{var i=h.name,n=this.$element.find(".fileinput-filename");1