{"version":3,"names":[],"mappings":"","sources":["vendor/bs-filestyle.js"],"sourcesContent":["/*!\r\n * bootstrap-fileinput v5.1.5\r\n * http://plugins.krajee.com/file-input\r\n *\r\n * Author: Kartik Visweswaran\r\n * Copyright: 2014 - 2021, Kartik Visweswaran, Krajee.com\r\n *\r\n * Licensed under the BSD-3-Clause\r\n * https://github.com/kartik-v/bootstrap-fileinput/blob/master/LICENSE.md\r\n */\r\n!function (e) {\r\n \"use strict\";\r\n \"function\" == typeof define && define.amd ? define([\"jquery\"], e) : \"object\" == typeof module && module.exports ? module.exports = e(require(\"jquery\")) : e(window.jQuery)\r\n}(function (L) {\r\n \"use strict\";\r\n var N, c;\r\n L.fn.fileinputLocales = {}, L.fn.fileinputThemes = {}, String.prototype.setTokens = function (e) {\r\n var t, i, a = this.toString();\r\n for (t in e) e.hasOwnProperty(t) && (i = new RegExp(\"{\" + t + \"}\", \"g\"), a = a.replace(i, e[t]));\r\n return a\r\n }, Array.prototype.flatMap || (Array.prototype.flatMap = function (e) {\r\n return [].concat(this.map(e))\r\n }), N = {\r\n FRAMES: \".kv-preview-thumb\",\r\n SORT_CSS: \"file-sortable\",\r\n INIT_FLAG: \"init-\",\r\n OBJECT_PARAMS: '\\n\\n\\n\\n\\n\\n',\r\n DEFAULT_PREVIEW: '
\\n{previewFileIcon}\\n
',\r\n MODAL_ID: \"kvFileinputModal\",\r\n MODAL_EVENTS: [\"show\", \"shown\", \"hide\", \"hidden\", \"loaded\"],\r\n logMessages: {\r\n ajaxError: \"{status}: {error}. Error Details: {text}.\",\r\n badDroppedFiles: \"Error scanning dropped files!\",\r\n badExifParser: \"Error loading the piexif.js library. {details}\",\r\n badInputType: 'The input \"type\" must be set to \"file\" for initializing the \"bootstrap-fileinput\" plugin.',\r\n exifWarning: 'To avoid this warning, either set \"autoOrientImage\" to \"false\" OR ensure you have loaded the \"piexif.js\" library correctly on your page before the \"fileinput.js\" script.',\r\n invalidChunkSize: 'Invalid upload chunk size: \"{chunkSize}\". Resumable uploads are disabled.',\r\n invalidThumb: 'Invalid thumb frame with id: \"{id}\".',\r\n noResumableSupport: \"The browser does not support resumable or chunk uploads.\",\r\n noUploadUrl: 'The \"uploadUrl\" is not set. Ajax uploads and resumable uploads have been disabled.',\r\n retryStatus: \"Retrying upload for chunk # {chunk} for {filename}... retry # {retry}.\",\r\n chunkQueueError: \"Could not push task to ajax pool for chunk index # {index}.\",\r\n resumableMaxRetriesReached: \"Maximum resumable ajax retries ({n}) reached.\",\r\n resumableRetryError: \"Could not retry the resumable request (try # {n})... aborting.\",\r\n resumableAborting: \"Aborting / cancelling the resumable request.\",\r\n resumableRequestError: \"Error processing resumable request. {msg}\"\r\n },\r\n objUrl: window.URL || window.webkitURL,\r\n now: function () {\r\n return (new Date).getTime()\r\n },\r\n round: function (e) {\r\n return e = parseFloat(e), isNaN(e) ? 0 : Math.floor(Math.round(e))\r\n },\r\n getArray: function (e) {\r\n for (var t = [], i = e && e.length || 0, a = 0; a < i; a++) t.push(e[a]);\r\n return t\r\n },\r\n getFileRelativePath: function (e) {\r\n return String(e.newPath || e.relativePath || e.webkitRelativePath || N.getFileName(e) || null)\r\n },\r\n getFileId: function (e, t) {\r\n var i = N.getFileRelativePath(e);\r\n return \"function\" == typeof t ? t(e) : e && i ? e.size + \"_\" + encodeURIComponent(i).replace(/%/g, \"_\") : null\r\n },\r\n getFrameSelector: function (e, t) {\r\n return '[id=\"' + e + '\"]' + (t = t || \"\")\r\n },\r\n getZoomSelector: function (e, t) {\r\n return N.getFrameSelector(\"zoom-\" + e, t)\r\n },\r\n getFrameElement: function (e, t, i) {\r\n return e.find(N.getFrameSelector(t, i))\r\n },\r\n getZoomElement: function (e, t, i) {\r\n return e.find(N.getZoomSelector(t, i))\r\n },\r\n getElapsed: function (e) {\r\n var t = e, i = \"\", a = {},\r\n r = {year: 31536e3, month: 2592e3, week: 604800, day: 86400, hour: 3600, minute: 60, second: 1};\r\n return N.getObjectKeys(r).forEach(function (e) {\r\n a[e] = Math.floor(t / r[e]), t -= a[e] * r[e]\r\n }), L.each(a, function (e, t) {\r\n 0 < t && (i += (i ? \" \" : \"\") + t + e.substring(0, 1))\r\n }), i\r\n },\r\n debounce: function (i, a) {\r\n var r;\r\n return function () {\r\n var e = arguments, t = this;\r\n clearTimeout(r), r = setTimeout(function () {\r\n i.apply(t, e)\r\n }, a)\r\n }\r\n },\r\n stopEvent: function (e) {\r\n e.stopPropagation(), e.preventDefault()\r\n },\r\n getFileName: function (e) {\r\n return e && (e.fileName || e.name) || \"\"\r\n },\r\n createObjectURL: function (e) {\r\n return N.objUrl && N.objUrl.createObjectURL && e ? N.objUrl.createObjectURL(e) : \"\"\r\n },\r\n revokeObjectURL: function (e) {\r\n N.objUrl && N.objUrl.revokeObjectURL && e && N.objUrl.revokeObjectURL(e)\r\n },\r\n compare: function (e, t, i) {\r\n return void 0 !== e && (i ? e === t : e.match(t))\r\n },\r\n isIE: function (e) {\r\n var t;\r\n return \"Microsoft Internet Explorer\" === navigator.appName && (10 === e ? new RegExp(\"msie\\\\s\" + e, \"i\").test(navigator.userAgent) : ((t = document.createElement(\"div\")).innerHTML = \"\\x3c!--[if IE \" + e + \"]> > 4) {\r\n case 0:\r\n case 1:\r\n case 2:\r\n case 3:\r\n case 4:\r\n case 5:\r\n case 6:\r\n case 7:\r\n n += String.fromCharCode(t);\r\n break;\r\n case 12:\r\n case 13:\r\n i = r[o++], n += String.fromCharCode((31 & t) << 6 | 63 & i);\r\n break;\r\n case 14:\r\n i = r[o++], a = r[o++], n += String.fromCharCode((15 & t) << 12 | (63 & i) << 6 | (63 & a) << 0)\r\n }\r\n return n\r\n },\r\n isHtml: function (e) {\r\n var t = document.createElement(\"div\");\r\n t.innerHTML = e;\r\n for (var i = t.childNodes, a = i.length; a--;) if (1 === i[a].nodeType) return !0;\r\n return !1\r\n },\r\n isSvg: function (e) {\r\n return e.match(/^\\s*<\\?xml/i) && (e.match(/\" + e + \"\"))\r\n },\r\n uniqId: function () {\r\n return ((new Date).getTime() + Math.floor(Math.random() * Math.pow(10, 15))).toString(36)\r\n },\r\n cspBuffer: {\r\n CSP_ATTRIB: \"data-csp-01928735\", domElementsStyles: {}, stash: function (e) {\r\n var n = this, t = L.parseHTML(\"
\" + e + \"
\"), e = L(t);\r\n return e.find(\"[style]\").each(function (e, t) {\r\n var i = L(t), a = i[0].style, t = N.uniqId(), r = {};\r\n a && a.length && (L(a).each(function () {\r\n r[this] = a[this]\r\n }), n.domElementsStyles[t] = r, i.removeAttr(\"style\").attr(n.CSP_ATTRIB, t))\r\n }), e.filter(\"*\").removeAttr(\"style\"), (Object.values ? Object.values(t) : Object.keys(t).map(function (e) {\r\n return t[e]\r\n })).flatMap(function (e) {\r\n return e.innerHTML\r\n }).join(\"\")\r\n }, apply: function (e) {\r\n var a = this;\r\n L(e).find(\"[\" + a.CSP_ATTRIB + \"]\").each(function (e, t) {\r\n var i = L(t), t = i.attr(a.CSP_ATTRIB), t = a.domElementsStyles[t];\r\n t && i.css(t), i.removeAttr(a.CSP_ATTRIB)\r\n }), a.domElementsStyles = {}\r\n }\r\n },\r\n setHtml: function (e, t) {\r\n var i = N.cspBuffer;\r\n return e.html(i.stash(t)), i.apply(e), e\r\n },\r\n htmlEncode: function (e, t) {\r\n return void 0 === e ? t || null : e.replace(/&/g, \"&\").replace(//g, \">\").replace(/\"/g, \""\").replace(/'/g, \"'\")\r\n },\r\n replaceTags: function (e, t) {\r\n var i = e;\r\n return t && L.each(t, function (e, t) {\r\n \"function\" == typeof t && (t = t()), i = i.split(e).join(t)\r\n }), i\r\n },\r\n cleanMemory: function (e) {\r\n e = (e.is(\"img\") ? e : e.find(\"source\")).attr(\"src\");\r\n N.revokeObjectURL(e)\r\n },\r\n findFileName: function (e) {\r\n var t = e.lastIndexOf(\"/\");\r\n return -1 === t && (t = e.lastIndexOf(\"\\\\\")), e.split(e.substring(t, t + 1)).pop()\r\n },\r\n checkFullScreen: function () {\r\n return document.fullscreenElement || document.mozFullScreenElement || document.webkitFullscreenElement || document.msFullscreenElement\r\n },\r\n toggleFullScreen: function (e) {\r\n var t = document, i = t.documentElement, a = N.checkFullScreen();\r\n i && e && !a ? i.requestFullscreen ? i.requestFullscreen() : i.msRequestFullscreen ? i.msRequestFullscreen() : i.mozRequestFullScreen ? i.mozRequestFullScreen() : i.webkitRequestFullscreen && i.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT) : a && (t.exitFullscreen ? t.exitFullscreen() : t.msExitFullscreen ? t.msExitFullscreen() : t.mozCancelFullScreen ? t.mozCancelFullScreen() : t.webkitExitFullscreen && t.webkitExitFullscreen())\r\n },\r\n moveArray: function (e, t, i, a) {\r\n var r = L.extend(!0, [], e);\r\n if (a && r.reverse(), i >= r.length) for (var n = i - r.length; 1 + n--;) r.push(void 0);\r\n return r.splice(i, 0, r.splice(t, 1)[0]), a && r.reverse(), r\r\n },\r\n closeButton: function (e) {\r\n return ''\r\n },\r\n getRotation: function (e) {\r\n switch (e) {\r\n case 2:\r\n return \"rotateY(180deg)\";\r\n case 3:\r\n return \"rotate(180deg)\";\r\n case 4:\r\n return \"rotate(180deg) rotateY(180deg)\";\r\n case 5:\r\n return \"rotate(270deg) rotateY(180deg)\";\r\n case 6:\r\n return \"rotate(90deg)\";\r\n case 7:\r\n return \"rotate(90deg) rotateY(180deg)\";\r\n case 8:\r\n return \"rotate(270deg)\";\r\n default:\r\n return \"\"\r\n }\r\n },\r\n setTransform: function (e, t) {\r\n e && (e.style.transform = t, e.style.webkitTransform = t, e.style[\"-moz-transform\"] = t, e.style[\"-ms-transform\"] = t, e.style[\"-o-transform\"] = t)\r\n },\r\n getObjectKeys: function (e) {\r\n var t = [];\r\n return e && L.each(e, function (e) {\r\n t.push(e)\r\n }), t\r\n },\r\n getObjectSize: function (e) {\r\n return N.getObjectKeys(e).length\r\n },\r\n whenAll: function (e) {\r\n for (var t, i, a, r = [].slice, n = 1 === arguments.length && N.isArray(e) ? e : r.call(arguments), o = L.Deferred(), s = 0, l = n.length, d = l, c = i = a = Array(l), u = function (e, t, i) {\r\n return function () {\r\n i !== n && s++, o.notifyWith(t[e] = this, i[e] = r.call(arguments)), --d || o[(s ? \"reject\" : \"resolve\") + \"With\"](t, i)\r\n }\r\n }, p = 0; p < l; p++) (t = n[p]) && L.isFunction(t.promise) ? t.promise().done(u(p, a, n)).fail(u(p, c, i)) : (o.notifyWith(this, t), --d);\r\n return d || o.resolveWith(a, n), o.promise()\r\n }\r\n }, (c = function (e, t) {\r\n var i = this;\r\n i.$element = L(e), i.$parent = i.$element.parent(), i._validate() && (i.isPreviewable = N.hasFileAPISupport(), i.isIE9 = N.isIE(9), i.isIE10 = N.isIE(10), (i.isPreviewable || i.isIE9) && (i._init(t), i._listen()), i.$element.removeClass(\"file-loading\"))\r\n }).prototype = {\r\n constructor: c, _cleanup: function () {\r\n var e = this;\r\n e.reader = null, e.clearFileStack(), e.fileBatchCompleted = !0, e.isError = !1, e.isDuplicateError = !1, e.isPersistentError = !1, e.cancelling = !1, e.paused = !1, e.lastProgress = 0, e._initAjax()\r\n }, _isAborted: function () {\r\n return this.cancelling || this.paused\r\n }, _initAjax: function () {\r\n var i = this.taskManager = {\r\n pool: {}, addPool: function (e) {\r\n return i.pool[e] = new i.TasksPool(e)\r\n }, getPool: function (e) {\r\n return i.pool[e]\r\n }, addTask: function (e, t) {\r\n return new i.Task(e, t)\r\n }, TasksPool: function (e) {\r\n var c = this;\r\n c.id = e, c.cancelled = !1, c.cancelledDeferrer = L.Deferred(), c.tasks = {}, c.addTask = function (e, t) {\r\n return c.tasks[e] = new i.Task(e, t)\r\n }, c.size = function () {\r\n return N.getObjectSize(c.tasks)\r\n }, c.run = function (e) {\r\n var t, i, a, r = 0, n = !1, o = N.getObjectKeys(c.tasks).map(function (e) {\r\n return c.tasks[e]\r\n }), s = [], l = L.Deferred();\r\n if (c.cancelled) return c.cancelledDeferrer.resolve(), l.reject();\r\n if (!e) {\r\n var d = N.getObjectKeys(c.tasks).map(function (e) {\r\n return c.tasks[e].deferred\r\n });\r\n return N.whenAll(d).done(function () {\r\n var e = N.getArray(arguments);\r\n c.cancelled ? (l.reject.apply(null, e), c.cancelledDeferrer.resolve()) : (l.resolve.apply(null, e), c.cancelledDeferrer.reject())\r\n }).fail(function () {\r\n var e = N.getArray(arguments);\r\n l.reject.apply(null, e), c.cancelled ? c.cancelledDeferrer.resolve() : c.cancelledDeferrer.reject()\r\n }), L.each(c.tasks, function (e) {\r\n (t = c.tasks[e]).run()\r\n }), l\r\n }\r\n for (i = function (e) {\r\n L.when(e.deferred).fail(function () {\r\n n = !0, a.apply(null, arguments)\r\n }).always(a)\r\n }, a = function () {\r\n var e = N.getArray(arguments);\r\n if (l.notify(e), s.push(e), c.cancelled) return l.reject.apply(null, s), void c.cancelledDeferrer.resolve();\r\n s.length === c.size() && (n ? l.reject : l.resolve).apply(null, s), o.length && (t = o.shift(), i(t), t.run())\r\n }; o.length && r++ < e;) t = o.shift(), i(t), t.run();\r\n return l\r\n }, c.cancel = function () {\r\n return c.cancelled = !0, c.cancelledDeferrer\r\n }\r\n }, Task: function (e, t) {\r\n var i = this;\r\n i.id = e, i.deferred = L.Deferred(), i.logic = t, i.context = null, i.run = function () {\r\n var e = N.getArray(arguments);\r\n return e.unshift(i.deferred), t.apply(i.context, e), i.deferred\r\n }, i.runWithContext = function (e) {\r\n return i.context = e, i.run()\r\n }\r\n }\r\n };\r\n this.ajaxQueue = [], this.ajaxRequests = [], this.ajaxAborted = !1\r\n }, _init: function (e, t) {\r\n var i, a, r = this, n = r.$element;\r\n r.options = e, r.canOrientImage = N.canOrientImage(n), L.each(e, function (e, t) {\r\n switch (e) {\r\n case\"minFileCount\":\r\n case\"maxFileCount\":\r\n case\"maxTotalFileCount\":\r\n case\"minFileSize\":\r\n case\"maxFileSize\":\r\n case\"maxFilePreviewSize\":\r\n case\"resizeImageQuality\":\r\n case\"resizeIfSizeMoreThan\":\r\n case\"progressUploadThreshold\":\r\n case\"initialPreviewCount\":\r\n case\"zoomModalHeight\":\r\n case\"minImageHeight\":\r\n case\"maxImageHeight\":\r\n case\"minImageWidth\":\r\n case\"maxImageWidth\":\r\n r[e] = N.getNum(t);\r\n break;\r\n default:\r\n r[e] = t\r\n }\r\n }), 0 < r.maxTotalFileCount && r.maxTotalFileCount < r.maxFileCount && (r.maxTotalFileCount = r.maxFileCount), r.rtl && (a = r.previewZoomButtonIcons.prev, r.previewZoomButtonIcons.prev = r.previewZoomButtonIcons.next, r.previewZoomButtonIcons.next = a), !isNaN(r.maxAjaxThreads) && r.maxAjaxThreads < r.resumableUploadOptions.maxThreads && (r.resumableUploadOptions.maxThreads = r.maxAjaxThreads), r._initFileManager(), \"function\" == typeof r.autoOrientImage && (r.autoOrientImage = r.autoOrientImage()), \"function\" == typeof r.autoOrientImageInitial && (r.autoOrientImageInitial = r.autoOrientImageInitial()), t || r._cleanup(), r.duplicateErrors = [], r.$form = n.closest(\"form\"), r._initTemplateDefaults(), r.uploadFileAttr = N.isEmpty(n.attr(\"name\")) ? \"file_data\" : n.attr(\"name\"), i = r._getLayoutTemplate(\"progress\"), r.progressTemplate = i.replace(\"{class}\", r.progressClass), r.progressInfoTemplate = i.replace(\"{class}\", r.progressInfoClass), r.progressPauseTemplate = i.replace(\"{class}\", r.progressPauseClass), r.progressCompleteTemplate = i.replace(\"{class}\", r.progressCompleteClass), r.progressErrorTemplate = i.replace(\"{class}\", r.progressErrorClass), r.isDisabled = n.attr(\"disabled\") || n.attr(\"readonly\"), r.isDisabled && n.attr(\"disabled\", !0), r.isClickable = r.browseOnZoneClick && r.showPreview && (r.dropZoneEnabled || !N.isEmpty(r.defaultPreviewContent)), r.isAjaxUpload = N.hasFileUploadSupport() && !N.isEmpty(r.uploadUrl), r.dropZoneEnabled = N.hasDragDropSupport() && r.dropZoneEnabled, r.isAjaxUpload || (r.dropZoneEnabled = r.dropZoneEnabled && N.canAssignFilesToInput()), r.slug = \"function\" == typeof e.slugCallback ? e.slugCallback : r._slugDefault, r.mainTemplate = r.showCaption ? r._getLayoutTemplate(\"main1\") : r._getLayoutTemplate(\"main2\"), r.captionTemplate = r._getLayoutTemplate(\"caption\"), r.previewGenericTemplate = r._getPreviewTemplate(\"generic\"), !r.imageCanvas && r.resizeImage && (r.maxImageWidth || r.maxImageHeight) && (r.imageCanvas = document.createElement(\"canvas\"), r.imageCanvasContext = r.imageCanvas.getContext(\"2d\")), N.isEmpty(n.attr(\"id\")) && n.attr(\"id\", N.uniqId()), r.namespace = \".fileinput_\" + n.attr(\"id\").replace(/-/g, \"_\"), void 0 === r.$container ? r.$container = r._createContainer() : r._refreshContainer(), a = r.$container, r.$dropZone = a.find(\".file-drop-zone\"), r.$progress = a.find(\".kv-upload-progress\"), r.$btnUpload = a.find(\".fileinput-upload\"), r.$captionContainer = N.getElement(e, \"elCaptionContainer\", a.find(\".file-caption\")), r.$caption = N.getElement(e, \"elCaptionText\", a.find(\".file-caption-name\")), N.isEmpty(r.msgPlaceholder) || (i = n.attr(\"multiple\") ? r.filePlural : r.fileSingle, r.$caption.attr(\"placeholder\", r.msgPlaceholder.replace(\"{files}\", i))), r.$captionIcon = r.$captionContainer.find(\".file-caption-icon\"), r.$previewContainer = N.getElement(e, \"elPreviewContainer\", a.find(\".file-preview\")), r.$preview = N.getElement(e, \"elPreviewImage\", a.find(\".file-preview-thumbnails\")), r.$previewStatus = N.getElement(e, \"elPreviewStatus\", a.find(\".file-preview-status\")), r.$errorContainer = N.getElement(e, \"elErrorContainer\", r.$previewContainer.find(\".kv-fileinput-error\")), r._validateDisabled(), N.isEmpty(r.msgErrorClass) || N.addCss(r.$errorContainer, r.msgErrorClass), t ? r._errorsExist() || r.$errorContainer.hide() : (r._resetErrors(), r.$errorContainer.hide(), r.previewInitId = \"thumb-\" + n.attr(\"id\"), r._initPreviewCache(), r._initPreview(!0), r._initPreviewActions(), r.$parent.hasClass(\"file-loading\") && (r.$container.insertBefore(r.$parent), r.$parent.remove())), r._setFileDropZoneTitle(), n.attr(\"disabled\") && r.disable(), r._initZoom(), r.hideThumbnailContent && N.addCss(r.$preview, \"hide-content\")\r\n }, _initFileManager: function () {\r\n var d = this;\r\n d.uploadStartTime = N.now(), d.fileManager = {\r\n stack: {},\r\n filesProcessed: [],\r\n errors: [],\r\n loadedImages: {},\r\n totalImages: 0,\r\n totalFiles: null,\r\n totalSize: null,\r\n uploadedSize: 0,\r\n stats: {},\r\n bpsLog: [],\r\n bps: 0,\r\n initStats: function (e) {\r\n var t = {started: N.now()};\r\n e ? d.fileManager.stats[e] = t : d.fileManager.stats = t\r\n },\r\n getUploadStats: function (e, t, i) {\r\n var n = d.fileManager, a = e ? n.stats[e] && n.stats[e].started || N.now() : d.uploadStartTime,\r\n r = (N.now() - a) / 1e3, o = Math.ceil(r ? t / r : 0), s = i - t,\r\n l = n.bpsLog.length ? d.bitrateUpdateDelay : 0;\r\n return setTimeout(function () {\r\n var e, t, i, a = 0, r = 0;\r\n for (n.bpsLog.push(o), n.bpsLog.sort(function (e, t) {\r\n return e - t\r\n }), i = 10 < (t = n.bpsLog.length) ? t - 10 : Math.ceil(t / 2), e = t; i < e; e--) r = parseFloat(n.bpsLog[e]), a++;\r\n n.bps = 64 * (0 < a ? r / a : 0)\r\n }, l), s = {\r\n fileId: e,\r\n started: a,\r\n elapsed: r,\r\n loaded: t,\r\n total: i,\r\n bps: n.bps,\r\n bitrate: d._getSize(n.bps, [\"B/s\", \"KB/s\", \"MB/s\", \"GB/s\", \"TB/s\", \"PB/s\", \"EB/s\", \"ZB/s\", \"YB/s\"]),\r\n pendingBytes: s\r\n }, e ? n.stats[e] = s : n.stats = s, s\r\n },\r\n exists: function (e) {\r\n return -1 !== L.inArray(e, d.fileManager.getIdList())\r\n },\r\n count: function () {\r\n return d.fileManager.getIdList().length\r\n },\r\n total: function () {\r\n var e = d.fileManager;\r\n return e.totalFiles || (e.totalFiles = e.count()), e.totalFiles\r\n },\r\n getTotalSize: function () {\r\n var i = d.fileManager;\r\n return i.totalSize || (i.totalSize = 0, L.each(d.getFileStack(), function (e, t) {\r\n t = parseFloat(t.size);\r\n i.totalSize += isNaN(t) ? 0 : t\r\n }), i.totalSize)\r\n },\r\n add: function (e, t) {\r\n (t = t || d.fileManager.getId(e)) && (d.fileManager.stack[t] = {\r\n file: e,\r\n name: N.getFileName(e),\r\n relativePath: N.getFileRelativePath(e),\r\n size: e.size,\r\n nameFmt: d._getFileName(e, \"\"),\r\n sizeFmt: d._getSize(e.size)\r\n })\r\n },\r\n remove: function (e) {\r\n e = d._getThumbFileId(e);\r\n e && d.fileManager.removeFile(e)\r\n },\r\n removeFile: function (e) {\r\n delete d.fileManager.stack[e], delete d.fileManager.loadedImages[e]\r\n },\r\n move: function (i, a) {\r\n var r = {}, n = d.fileManager.stack;\r\n (i || a) && i !== a && (L.each(n, function (e, t) {\r\n e !== i && (r[e] = t), e === a && (r[i] = n[i])\r\n }), d.fileManager.stack = r)\r\n },\r\n list: function () {\r\n var i = [];\r\n return L.each(d.getFileStack(), function (e, t) {\r\n t && t.file && i.push(t.file)\r\n }), i\r\n },\r\n isPending: function (e) {\r\n return -1 === L.inArray(e, d.fileManager.filesProcessed) && d.fileManager.exists(e)\r\n },\r\n isProcessed: function () {\r\n var t = !0, i = d.fileManager;\r\n return L.each(d.getFileStack(), function (e) {\r\n i.isPending(e) && (t = !1)\r\n }), t\r\n },\r\n clear: function () {\r\n var e = d.fileManager;\r\n d.isDuplicateError = !1, d.isPersistentError = !1, e.totalFiles = null, e.totalSize = null, e.uploadedSize = 0, e.stack = {}, e.errors = [], e.filesProcessed = [], e.stats = {}, e.bpsLog = [], e.bps = 0, e.clearImages()\r\n },\r\n clearImages: function () {\r\n d.fileManager.loadedImages = {}, d.fileManager.totalImages = 0\r\n },\r\n addImage: function (e, t) {\r\n d.fileManager.loadedImages[e] = t\r\n },\r\n removeImage: function (e) {\r\n delete d.fileManager.loadedImages[e]\r\n },\r\n getImageIdList: function () {\r\n return N.getObjectKeys(d.fileManager.loadedImages)\r\n },\r\n getImageCount: function () {\r\n return d.fileManager.getImageIdList().length\r\n },\r\n getId: function (e) {\r\n return d._getFileId(e)\r\n },\r\n getIndex: function (e) {\r\n return d.fileManager.getIdList().indexOf(e)\r\n },\r\n getThumb: function (t) {\r\n var i = null;\r\n return d._getThumbs().each(function () {\r\n var e = L(this);\r\n d._getThumbFileId(e) === t && (i = e)\r\n }), i\r\n },\r\n getThumbIndex: function (e) {\r\n e = d._getThumbFileId(e);\r\n return d.fileManager.getIndex(e)\r\n },\r\n getIdList: function () {\r\n return N.getObjectKeys(d.fileManager.stack)\r\n },\r\n getFile: function (e) {\r\n return d.fileManager.stack[e] || null\r\n },\r\n getFileName: function (e, t) {\r\n e = d.fileManager.getFile(e);\r\n return e ? t ? e.nameFmt || \"\" : e.name || \"\" : \"\"\r\n },\r\n getFirstFile: function () {\r\n var e = d.fileManager.getIdList(), e = e && e.length ? e[0] : null;\r\n return d.fileManager.getFile(e)\r\n },\r\n setFile: function (e, t) {\r\n d.fileManager.getFile(e) ? d.fileManager.stack[e].file = t : d.fileManager.add(t, e)\r\n },\r\n setProcessed: function (e) {\r\n d.fileManager.filesProcessed.push(e)\r\n },\r\n getProgress: function () {\r\n var e = d.fileManager.total(), t = d.fileManager.filesProcessed.length;\r\n return e ? Math.ceil(t / e * 100) : 0\r\n },\r\n setProgress: function (e, t) {\r\n e = d.fileManager.getFile(e);\r\n !isNaN(t) && e && (e.progress = t)\r\n }\r\n }\r\n }, _setUploadData: function (i, e) {\r\n var a = this;\r\n L.each(e, function (e, t) {\r\n e = a.uploadParamNames[e] || e;\r\n N.isArray(t) ? i.append(e, t[0], t[1]) : i.append(e, t)\r\n })\r\n }, _initResumableUpload: function () {\r\n var g, m = this, h = m.resumableUploadOptions, v = N.logMessages, w = m.fileManager;\r\n if (m.enableResumableUpload) {\r\n if (!1 !== h.fallback && \"function\" != typeof h.fallback && (h.fallback = function (e) {\r\n e._log(v.noResumableSupport), e.enableResumableUpload = !1\r\n }), N.hasResumableUploadSupport() || !1 === h.fallback) return !m.uploadUrl && m.enableResumableUpload ? (m._log(v.noUploadUrl), void (m.enableResumableUpload = !1)) : (h.chunkSize = parseFloat(h.chunkSize), h.chunkSize <= 0 || isNaN(h.chunkSize) ? (m._log(v.invalidChunkSize, {chunkSize: h.chunkSize}), void (m.enableResumableUpload = !1)) : void (g = m.resumableManager = {\r\n init: function (e, t, i) {\r\n g.logs = [], g.stack = [], g.error = \"\", g.id = e, g.file = t.file, g.fileName = t.name, g.fileIndex = i, g.completed = !1, g.lastProgress = 0, m.showPreview && (g.$thumb = w.getThumb(e) || null, g.$progress = g.$btnDelete = null, g.$thumb && g.$thumb.length && (g.$progress = g.$thumb.find(\".file-thumb-progress\"), g.$btnDelete = g.$thumb.find(\".kv-file-remove\"))), g.chunkSize = 1024 * h.chunkSize, g.chunkCount = g.getTotalChunks()\r\n }, setAjaxError: function (e, t, i, a) {\r\n e.responseJSON && e.responseJSON.error && (i = e.responseJSON.error.toString()), a || (g.error = i), h.showErrorLog && m._log(v.ajaxError, {\r\n status: e.status,\r\n error: i,\r\n text: e.responseText || \"\"\r\n })\r\n }, reset: function () {\r\n g.stack = [], g.chunksProcessed = {}\r\n }, setProcessed: function (e) {\r\n var t = g.id, i = g.$thumb, a = g.$progress, r = i && i.length,\r\n n = {id: r ? i.attr(\"id\") : \"\", index: w.getIndex(t), fileId: t},\r\n o = m.resumableUploadOptions.skipErrorsAndProceed;\r\n g.completed = !0, g.lastProgress = 0, r && i.removeClass(\"file-uploading\"), \"success\" === e ? (w.uploadedSize += g.file.size, m.showPreview && (m._setProgress(101, a), m._setThumbStatus(i, \"Success\"), m._initUploadSuccess(g.chunksProcessed[t].data, i)), w.removeFile(t), delete g.chunksProcessed[t], m._raise(\"fileuploaded\", [n.id, n.index, n.fileId]), w.isProcessed() && m._setProgress(101)) : \"cancel\" !== e && (m.showPreview && (m._setThumbStatus(i, \"Error\"), m._setPreviewError(i, !0), m._setProgress(101, a, m.msgProgressError), m._setProgress(101, m.$progress, m.msgProgressError), m.cancelling = !o), m.$errorContainer.find('li[data-file-id=\"' + n.fileId + '\"]').length || (i = {\r\n file: g.fileName,\r\n max: h.maxRetries,\r\n error: g.error\r\n }, a = m.msgResumableUploadRetriesExceeded.setTokens(i), L.extend(n, i), m._showFileError(a, n, \"filemaxretries\"), o && (w.removeFile(t), delete g.chunksProcessed[t], w.isProcessed() && m._setProgress(101)))), w.isProcessed() && g.reset()\r\n }, check: function () {\r\n L.each(g.logs, function (e, t) {\r\n if (!t) return !1\r\n })\r\n }, processedResumables: function () {\r\n var e, t = g.logs, i = 0;\r\n if (!t || !t.length) return 0;\r\n for (e = 0; e < t.length; e++) !0 === t[e] && i++;\r\n return i\r\n }, getUploadedSize: function () {\r\n var e = g.processedResumables() * g.chunkSize;\r\n return e > g.file.size ? g.file.size : e\r\n }, getTotalChunks: function () {\r\n var e = parseFloat(g.chunkSize);\r\n return !isNaN(e) && 0 < e ? Math.ceil(g.file.size / e) : 0\r\n }, getProgress: function () {\r\n var e = g.processedResumables(), t = g.chunkCount;\r\n return 0 === t ? 0 : Math.ceil(e / t * 100)\r\n }, checkAborted: function (e) {\r\n m._isAborted() && (clearInterval(e), m.unlock())\r\n }, upload: function () {\r\n var t = w.getIdList(), i = \"new\", a = setInterval(function () {\r\n var e;\r\n g.checkAborted(a), \"new\" === i && (m.lock(), i = \"processing\", e = t.shift(), w.initStats(e), w.stack[e] && (g.init(e, w.stack[e], w.getIndex(e)), g.processUpload())), !w.isPending(e) && g.completed && (i = \"new\"), w.isProcessed() && ((e = m.$preview.find(\".file-preview-initial\")).length && (N.addCss(e, N.SORT_CSS), m._initSortable()), clearInterval(a), m._clearFileInput(), m.unlock(), setTimeout(function () {\r\n var e = m.previewCache.data;\r\n e && (m.initialPreview = e.content, m.initialPreviewConfig = e.config, m.initialPreviewThumbTags = e.tags), m._raise(\"filebatchuploadcomplete\", [m.initialPreview, m.initialPreviewConfig, m.initialPreviewThumbTags, m._getExtraData()])\r\n }, m.processDelay))\r\n }, m.processDelay)\r\n }, uploadResumable: function () {\r\n for (var e = m.taskManager, t = g.chunkCount, i = e.addPool(g.id), a = 0; a < t; a++) g.logs[a] = !(!g.chunksProcessed[g.id] || !g.chunksProcessed[g.id][a]), g.logs[a] || g.pushAjax(a, 0);\r\n i.run(h.maxThreads).done(function () {\r\n g.setProcessed(\"success\")\r\n }).fail(function () {\r\n g.setProcessed(i.cancelled ? \"cancel\" : \"error\")\r\n })\r\n }, processUpload: function () {\r\n var r, e, t, i, a, n, o = g.id;\r\n h.testUrl ? (r = new FormData, a = w.stack[o], m._setUploadData(r, {\r\n fileId: o,\r\n fileName: a.fileName,\r\n fileSize: a.size,\r\n fileRelativePath: a.relativePath,\r\n chunkSize: g.chunkSize,\r\n chunkCount: g.chunkCount\r\n }), e = function (e) {\r\n n = m._getOutData(r, e), m._raise(\"filetestbeforesend\", [o, w, g, n])\r\n }, t = function (e, t, i) {\r\n n = m._getOutData(r, i, e);\r\n var a = m.uploadParamNames.chunksUploaded || \"chunksUploaded\", i = [o, w, g, n];\r\n e[a] && N.isArray(e[a]) ? (g.chunksProcessed[o] || (g.chunksProcessed[o] = {}), L.each(e[a], function (e, t) {\r\n g.logs[t] = !0, g.chunksProcessed[o][t] = !0\r\n }), g.chunksProcessed[o].data = e, m._raise(\"filetestsuccess\", i)) : m._raise(\"filetesterror\", i), g.uploadResumable()\r\n }, i = function (e, t, i) {\r\n n = m._getOutData(r, e), m._raise(\"filetestajaxerror\", [o, w, g, n]), g.setAjaxError(e, t, i, !0), g.uploadResumable()\r\n }, a = function () {\r\n m._raise(\"filetestcomplete\", [o, w, g, m._getOutData(r)])\r\n }, m._ajaxSubmit(e, t, a, i, r, o, g.fileIndex, h.testUrl)) : g.uploadResumable()\r\n }, pushAjax: function (e, t) {\r\n var i = m.taskManager.getPool(g.id);\r\n i.addTask(i.size() + 1, function (e) {\r\n var t = g.stack.shift(), i = t[0];\r\n g.chunksProcessed[g.id] && g.chunksProcessed[g.id][i] ? m._log(v.chunkQueueError, {index: i}) : g.sendAjax(i, t[1], e)\r\n }), g.stack.push([e, t])\r\n }, sendAjax: function (r, n, o) {\r\n function s(e, t) {\r\n t && (e = e.setTokens(t)), e = d.resumableRequestError.setTokens({msg: e}), m._log(e), o.reject(e)\r\n }\r\n\r\n var e = g.chunkSize, l = g.id, t = g.file, i = g.$thumb, d = N.logMessages, a = g.$btnDelete;\r\n if (!g.chunksProcessed[l] || !g.chunksProcessed[l][r]) {\r\n if (n > h.maxRetries) return s(d.resumableMaxRetriesReached, {n: h.maxRetries}), void g.setProcessed(\"error\");\r\n var c,\r\n u = t[t.slice ? \"slice\" : t.mozSlice ? \"mozSlice\" : t.webkitSlice ? \"webkitSlice\" : \"slice\"](e * r, e * (r + 1)),\r\n p = new FormData, f = w.stack[l];\r\n m._setUploadData(p, {\r\n chunkCount: g.chunkCount,\r\n chunkIndex: r,\r\n chunkSize: e,\r\n chunkSizeStart: e * r,\r\n fileBlob: [u, g.fileName],\r\n fileId: l,\r\n fileName: g.fileName,\r\n fileRelativePath: f.relativePath,\r\n fileSize: t.size,\r\n retryCount: n\r\n }), g.$progress && g.$progress.length && g.$progress.show(), e = function (e) {\r\n c = m._getOutData(p, e), m.showPreview && (i.hasClass(\"file-preview-success\") || (m._setThumbStatus(i, \"Loading\"), N.addCss(i, \"file-uploading\")), a.attr(\"disabled\", !0)), m._raise(\"filechunkbeforesend\", [l, r, n, w, g, c])\r\n }, u = function (e, t, i) {\r\n var a;\r\n m._isAborted() ? s(d.resumableAborting) : (c = m._getOutData(p, i, e), a = m.uploadParamNames.chunkIndex || \"chunkIndex\", i = [l, r, n, w, g, c], e.error ? (h.showErrorLog && m._log(v.retryStatus, {\r\n retry: n + 1,\r\n filename: g.fileName,\r\n chunk: r\r\n }), m._raise(\"filechunkerror\", i), g.pushAjax(r, n + 1), g.error = e.error, s(e.error)) : (g.logs[e[a]] = !0, g.chunksProcessed[l] || (g.chunksProcessed[l] = {}), g.chunksProcessed[l][e[a]] = !0, g.chunksProcessed[l].data = e, o.resolve.call(null, e), m._raise(\"filechunksuccess\", i), g.check()))\r\n }, f = function (e, t, i) {\r\n m._isAborted() ? s(d.resumableAborting) : (c = m._getOutData(p, e), g.setAjaxError(e, t, i), m._raise(\"filechunkajaxerror\", [l, r, n, w, g, c]), g.pushAjax(r, n + 1), s(d.resumableRetryError, {n: n - 1}))\r\n }, t = function () {\r\n m._isAborted() || m._raise(\"filechunkcomplete\", [l, r, n, w, g, m._getOutData(p)])\r\n }, m._ajaxSubmit(e, u, t, f, p, l, g.fileIndex)\r\n }\r\n }\r\n }).reset());\r\n h.fallback(m)\r\n }\r\n }, _initTemplateDefaults: function () {\r\n var i = this, e = function (e, t) {\r\n return '\\n\" + N.DEFAULT_PREVIEW + \"\\n\\n\"\r\n }, t = N.closeButton(\"fileinput-remove\"), a = N.MODAL_ID + \"Label\",\r\n r = '
',\r\n n = '
\\n
\\n
\\n
{heading}
\\n \\n
{toggleheader}{fullscreen}{borderless}{close}
\\n
\\n
\\n
\\n
\\n{prev} {next}\\n
\\n
\\n
\\n',\r\n o = \" {style}\", s = e(\"html\", \"text/html\"), l = e(\"text\", \"text/plain;charset=UTF-8\"),\r\n d = e(\"pdf\", \"application/pdf\"),\r\n c = '\"{alt}\"'\\n\",\r\n u = '\",\r\n p = '\",\r\n f = '\\n\",\r\n g = '\\x3c!--suppress ALL --\\x3e\\n\",\r\n m = '\\n\",\r\n a = '\\n\\n' + N.OBJECT_PARAMS + \" \" + N.DEFAULT_PREVIEW + \"\\n\\n\",\r\n h = '
\\n\" + N.DEFAULT_PREVIEW + \"\\n
\\n\",\r\n e = {width: \"100%\", height: \"100%\", \"min-height\": \"480px\"};\r\n i._isPdfRendered() && (d = i.pdfRendererTemplate.replace(\"{renderer}\", i._encodeURI(i.pdfRendererUrl))), i.defaults = {\r\n layoutTemplates: {\r\n main1: '{preview}\\n
\\n
\\n {caption}\\n
\\n {remove}\\n {cancel}\\n {pause}\\n {upload}\\n {browse}\\n
\\n
',\r\n main2: '{preview}\\n
\\n
\\n{remove}\\n{cancel}\\n{upload}\\n{browse}\\n',\r\n preview: '
\\n {close}
\\n
\\n
\\n
\\n
\\n
\\n
',\r\n close: t,\r\n fileIcon: '',\r\n caption: '
\\n \\n \\n
',\r\n modalMain: r,\r\n modal: n,\r\n progress: '
\\n
\\n {status}\\n
\\n
{stats}',\r\n stats: '
{pendingTime} {uploadSpeed}
',\r\n size: \" ({sizeText})\",\r\n footer: '
\\n \\n {progress}\\n{indicator}\\n{actions}\\n
',\r\n indicator: '
{indicator}
',\r\n actions: '
\\n \\n
\\n{drag}\\n
',\r\n actionDelete: '\\n',\r\n actionUpload: '',\r\n actionDownload: '{downloadIcon}',\r\n actionZoom: '',\r\n actionDrag: '{dragIcon}',\r\n btnDefault: '',\r\n btnLink: '{icon} {label}',\r\n btnBrowse: '
{icon} {label}
',\r\n zoomCache: '
{zoomContent}
'\r\n },\r\n previewMarkupTags: {\r\n tagBefore1: '
\\n',\r\n tagBefore2: '
\\n',\r\n tagAfter: \"
{footer}\\n{zoomCache}
\\n\"\r\n },\r\n previewContentTemplates: {\r\n generic: \"{content}\\n\",\r\n html: s,\r\n image: c,\r\n text: l,\r\n office: u,\r\n gdocs: p,\r\n video: f,\r\n audio: g,\r\n flash: m,\r\n object: a,\r\n pdf: d,\r\n other: h\r\n },\r\n allowedPreviewTypes: [\"image\", \"html\", \"text\", \"video\", \"audio\", \"flash\", \"pdf\", \"object\"],\r\n previewTemplates: {},\r\n previewSettings: {\r\n image: {width: \"auto\", height: \"auto\", \"max-width\": \"100%\", \"max-height\": \"100%\"},\r\n html: {width: \"213px\", height: \"160px\"},\r\n text: {width: \"213px\", height: \"160px\"},\r\n office: {width: \"213px\", height: \"160px\"},\r\n gdocs: {width: \"213px\", height: \"160px\"},\r\n video: {width: \"213px\", height: \"160px\"},\r\n audio: {width: \"100%\", height: \"30px\"},\r\n flash: {width: \"213px\", height: \"160px\"},\r\n object: {width: \"213px\", height: \"160px\"},\r\n pdf: {width: \"100%\", height: \"160px\", position: \"relative\"},\r\n other: {width: \"213px\", height: \"160px\"}\r\n },\r\n previewSettingsSmall: {\r\n image: {width: \"auto\", height: \"auto\", \"max-width\": \"100%\", \"max-height\": \"100%\"},\r\n html: {width: \"100%\", height: \"160px\"},\r\n text: {width: \"100%\", height: \"160px\"},\r\n office: {width: \"100%\", height: \"160px\"},\r\n gdocs: {width: \"100%\", height: \"160px\"},\r\n video: {width: \"100%\", height: \"auto\"},\r\n audio: {width: \"100%\", height: \"30px\"},\r\n flash: {width: \"100%\", height: \"auto\"},\r\n object: {width: \"100%\", height: \"auto\"},\r\n pdf: {width: \"100%\", height: \"160px\"},\r\n other: {width: \"100%\", height: \"160px\"}\r\n },\r\n previewZoomSettings: {\r\n image: {width: \"auto\", height: \"auto\", \"max-width\": \"100%\", \"max-height\": \"100%\"},\r\n html: e,\r\n text: e,\r\n office: {width: \"100%\", height: \"100%\", \"max-width\": \"100%\", \"min-height\": \"480px\"},\r\n gdocs: {width: \"100%\", height: \"100%\", \"max-width\": \"100%\", \"min-height\": \"480px\"},\r\n video: {width: \"auto\", height: \"100%\", \"max-width\": \"100%\"},\r\n audio: {width: \"100%\", height: \"30px\"},\r\n flash: {width: \"auto\", height: \"480px\"},\r\n object: {width: \"auto\", height: \"100%\", \"max-width\": \"100%\", \"min-height\": \"480px\"},\r\n pdf: e,\r\n other: {width: \"auto\", height: \"100%\", \"min-height\": \"480px\"}\r\n },\r\n mimeTypeAliases: {\"video/quicktime\": \"video/mp4\"},\r\n fileTypeSettings: {\r\n image: function (e, t) {\r\n return N.compare(e, \"image.*\") && !N.compare(e, /(tiff?|wmf)$/i) || N.compare(t, /\\.(gif|png|jpe?g)$/i)\r\n }, html: function (e, t) {\r\n return N.compare(e, \"text/html\") || N.compare(t, /\\.(htm|html)$/i)\r\n }, office: function (e, t) {\r\n return N.compare(e, /(word|excel|powerpoint|office)$/i) || N.compare(t, /\\.(docx?|xlsx?|pptx?|pps|potx?)$/i)\r\n }, gdocs: function (e, t) {\r\n return N.compare(e, /(word|excel|powerpoint|office|iwork-pages|tiff?)$/i) || N.compare(t, /\\.(docx?|xlsx?|pptx?|pps|potx?|rtf|ods|odt|pages|ai|dxf|ttf|tiff?|wmf|e?ps)$/i)\r\n }, text: function (e, t) {\r\n return N.compare(e, \"text.*\") || N.compare(t, /\\.(xml|javascript)$/i) || N.compare(t, /\\.(txt|md|nfo|ini|json|php|js|css)$/i)\r\n }, video: function (e, t) {\r\n return N.compare(e, \"video.*\") && (N.compare(e, /(ogg|mp4|mp?g|mov|webm|3gp)$/i) || N.compare(t, /\\.(og?|mp4|webm|mp?g|mov|3gp)$/i))\r\n }, audio: function (e, t) {\r\n return N.compare(e, \"audio.*\") && (N.compare(t, /(ogg|mp3|mp?g|wav)$/i) || N.compare(t, /\\.(og?|mp3|mp?g|wav)$/i))\r\n }, flash: function (e, t) {\r\n return N.compare(e, \"application/x-shockwave-flash\", !0) || N.compare(t, /\\.(swf)$/i)\r\n }, pdf: function (e, t) {\r\n return N.compare(e, \"application/pdf\", !0) || N.compare(t, /\\.(pdf)$/i)\r\n }, object: function () {\r\n return !0\r\n }, other: function () {\r\n return !0\r\n }\r\n },\r\n fileActionSettings: {\r\n showRemove: !0,\r\n showUpload: !0,\r\n showDownload: !0,\r\n showZoom: !0,\r\n showDrag: !0,\r\n removeIcon: '',\r\n removeClass: \"btn btn-sm btn-kv btn-default btn-outline-secondary\",\r\n removeErrorClass: \"btn btn-sm btn-kv btn-danger\",\r\n removeTitle: \"Remove file\",\r\n uploadIcon: '',\r\n uploadClass: \"btn btn-sm btn-kv btn-default btn-outline-secondary\",\r\n uploadTitle: \"Upload file\",\r\n uploadRetryIcon: '',\r\n uploadRetryTitle: \"Retry upload\",\r\n downloadIcon: '',\r\n downloadClass: \"btn btn-sm btn-kv btn-default btn-outline-secondary\",\r\n downloadTitle: \"Download file\",\r\n zoomIcon: '',\r\n zoomClass: \"btn btn-sm btn-kv btn-default btn-outline-secondary\",\r\n zoomTitle: \"View Details\",\r\n dragIcon: '',\r\n dragClass: \"text-info\",\r\n dragTitle: \"Move / Rearrange\",\r\n dragSettings: {},\r\n indicatorNew: '',\r\n indicatorSuccess: '',\r\n indicatorError: '',\r\n indicatorLoading: '',\r\n indicatorPaused: '',\r\n indicatorNewTitle: \"Not uploaded yet\",\r\n indicatorSuccessTitle: \"Uploaded\",\r\n indicatorErrorTitle: \"Upload Error\",\r\n indicatorLoadingTitle: \"Uploading …\",\r\n indicatorPausedTitle: \"Upload Paused\"\r\n }\r\n }, L.each(i.defaults, function (e, t) {\r\n \"allowedPreviewTypes\" !== e ? i[e] = L.extend(!0, {}, t, i[e]) : void 0 === i.allowedPreviewTypes && (i.allowedPreviewTypes = t)\r\n }), i._initPreviewTemplates()\r\n }, _initPreviewTemplates: function () {\r\n var i, a = this, r = a.previewMarkupTags, n = r.tagAfter;\r\n L.each(a.previewContentTemplates, function (e, t) {\r\n N.isEmpty(a.previewTemplates[e]) && (i = r.tagBefore2, \"generic\" !== e && \"image\" !== e || (i = r.tagBefore1), a._isPdfRendered() && \"pdf\" === e && (i = i.replace(\"kv-file-content\", \"kv-file-content kv-pdf-rendered\")), a.previewTemplates[e] = i + t + n)\r\n })\r\n }, _initPreviewCache: function () {\r\n var f = this;\r\n f.previewCache = {\r\n data: {}, init: function () {\r\n var e = f.initialPreview;\r\n 0 < e.length && !N.isArray(e) && (e = e.split(f.initialPreviewDelimiter)), f.previewCache.data = {\r\n content: e,\r\n config: f.initialPreviewConfig,\r\n tags: f.initialPreviewThumbTags\r\n }\r\n }, count: function (e) {\r\n return f.previewCache.data && f.previewCache.data.content ? (e ? f.previewCache.data.content.filter(function (e) {\r\n return null !== e\r\n }) : f.previewCache.data.content).length : 0\r\n }, get: function (e, t) {\r\n function i(e, t, i, a, r, n, o, s) {\r\n var l = \" file-preview-initial \" + N.SORT_CSS + (o ? \" \" + o : \"\"), d = f.previewInitId + \"-\" + n,\r\n o = c && c.fileId || d;\r\n return f._generatePreviewTemplate(e, t, i, a, d, o, !1, null, l, r, n, s, p, c && c.zoomData || t)\r\n }\r\n\r\n var a, r, n, o, s = N.INIT_FLAG + e, l = f.previewCache.data, c = l.config[e], d = l.content[e],\r\n u = N.ifSet(\"previewAsData\", c, f.initialPreviewAsData),\r\n p = c ? {title: c.title || null, alt: c.alt || null} : {title: null, alt: null};\r\n return d && d.length ? (t = void 0 === t || t, a = N.ifSet(\"type\", c, f.initialPreviewFileType || \"generic\"), n = N.ifSet(\"filename\", c, N.ifSet(\"caption\", c)), o = N.ifSet(\"filetype\", c, a), r = f.previewCache.footer(e, t, c && c.size || null), t = N.ifSet(\"frameClass\", c), a = u ? i(a, d, n, o, r, s, t) : i(\"generic\", d, n, o, r, s, t, a).setTokens({content: l.content[e]}), l.tags.length && l.tags[e] && (a = N.replaceTags(a, l.tags[e])), N.isEmpty(c) || N.isEmpty(c.frameAttr) || ((e = N.createElement(a)).find(\".file-preview-initial\").attr(c.frameAttr), a = e.html(), e.remove()), a) : \"\"\r\n }, clean: function (e) {\r\n e.content = N.cleanArray(e.content), e.config = N.cleanArray(e.config), e.tags = N.cleanArray(e.tags), f.previewCache.data = e\r\n }, add: function (e, t, i, a) {\r\n var r, n = f.previewCache.data;\r\n return e && e.length ? (r = e.length - 1, N.isArray(e) || (e = e.split(f.initialPreviewDelimiter)), a && n.content ? (r = n.content.push(e[0]) - 1, n.config[r] = t, n.tags[r] = i) : (n.content = e, n.config = t, n.tags = i), f.previewCache.clean(n), r) : 0\r\n }, set: function (e, t, i, a) {\r\n var r, n = f.previewCache.data;\r\n if (e && e.length && (N.isArray(e) || (e = e.split(f.initialPreviewDelimiter)), e.filter(function (e) {\r\n return null !== e\r\n }).length)) {\r\n if (void 0 === n.content && (n.content = []), void 0 === n.config && (n.config = []), void 0 === n.tags && (n.tags = []), a) {\r\n for (r = 0; r < e.length; r++) e[r] && n.content.push(e[r]);\r\n for (r = 0; r < t.length; r++) t[r] && n.config.push(t[r]);\r\n for (r = 0; r < i.length; r++) i[r] && n.tags.push(i[r])\r\n } else n.content = e, n.config = t, n.tags = i;\r\n f.previewCache.clean(n)\r\n }\r\n }, unset: function (e) {\r\n var t = f.previewCache.count(), i = f.reversePreviewOrder;\r\n if (t) {\r\n if (1 === t) return f.previewCache.data.content = [], f.previewCache.data.config = [], f.previewCache.data.tags = [], f.initialPreview = [], f.initialPreviewConfig = [], void (f.initialPreviewThumbTags = []);\r\n f.previewCache.data.content = N.spliceArray(f.previewCache.data.content, e, i), f.previewCache.data.config = N.spliceArray(f.previewCache.data.config, e, i), f.previewCache.data.tags = N.spliceArray(f.previewCache.data.tags, e, i);\r\n i = L.extend(!0, {}, f.previewCache.data);\r\n f.previewCache.clean(i)\r\n }\r\n }, out: function () {\r\n var e, t, i = \"\", a = f.previewCache.count();\r\n if (0 === a) return {content: \"\", caption: \"\"};\r\n for (e = 0; e < a; e++) t = f.previewCache.get(e), i = f.reversePreviewOrder ? t + i : i + t;\r\n return {content: i, caption: f._getMsgSelected(a)}\r\n }, footer: function (e, t, i) {\r\n var a = f.previewCache.data || {};\r\n if (N.isEmpty(a.content)) return \"\";\r\n (N.isEmpty(a.config) || N.isEmpty(a.config[e])) && (a.config[e] = {}), t = void 0 === t || t;\r\n var r = a.config[e], n = N.ifSet(\"caption\", r), o = N.ifSet(\"width\", r, \"auto\"), s = N.ifSet(\"url\", r, !1),\r\n l = N.ifSet(\"key\", r, null), d = N.ifSet(\"fileId\", r, null), c = f.fileActionSettings,\r\n u = f.initialPreviewShowDelete || !1,\r\n p = f.initialPreviewDownloadUrl ? f.initialPreviewDownloadUrl + \"?key=\" + l + (d ? \"&fileId=\" + d : \"\") : \"\",\r\n a = r.downloadUrl || p, e = r.filename || r.caption || \"\", d = !!a, p = N.ifSet(\"showRemove\", r, u),\r\n u = N.ifSet(\"showDownload\", r, N.ifSet(\"showDownload\", c, d)),\r\n d = N.ifSet(\"showZoom\", r, N.ifSet(\"showZoom\", c, !0)),\r\n c = N.ifSet(\"showDrag\", r, N.ifSet(\"showDrag\", c, !0)), t = !1 === s && t,\r\n u = u && !1 !== r.downloadUrl && !!a, e = f._renderFileActions(r, !1, u, p, d, c, t, s, l, !0, a, e);\r\n return f._getLayoutTemplate(\"footer\").setTokens({\r\n progress: f._renderThumbProgress(),\r\n actions: e,\r\n caption: n,\r\n size: f._getSize(i),\r\n width: o,\r\n indicator: \"\"\r\n })\r\n }\r\n }, f.previewCache.init()\r\n }, _isPdfRendered: function () {\r\n var e = this.usePdfRenderer;\r\n return (\"function\" == typeof e ? e() : !!e) && this.pdfRendererUrl\r\n }, _handler: function (e, t, i) {\r\n var a = this.namespace, a = t.split(\" \").join(a + \" \") + a;\r\n e && e.length && e.off(a).on(a, i)\r\n }, _encodeURI: function (e) {\r\n return this.encodeUrl ? encodeURI(e) : e\r\n }, _log: function (e, t) {\r\n var i = this.$element.attr(\"id\");\r\n this.showConsoleLogs && (i && (e = '\"' + i + '\": ' + e), e = \"bootstrap-fileinput: \" + e, \"object\" == typeof t && (e = e.setTokens(t)), window.console && void 0 !== window.console.log ? window.console.log(e) : window.alert(e))\r\n }, _validate: function () {\r\n var e = \"file\" === this.$element.attr(\"type\");\r\n return e || this._log(N.logMessages.badInputType), e\r\n }, _errorsExist: function () {\r\n var e;\r\n return !!this.$errorContainer.find(\"li\").length || ((e = N.createElement(this.$errorContainer.html())).find(\".kv-error-close\").remove(), e.find(\"ul\").remove(), !!L.trim(e.text()).length)\r\n }, _errorHandler: function (e, t) {\r\n var i = this, a = e.target.error, e = function (e) {\r\n i._showError(e.replace(\"{name}\", t))\r\n };\r\n a.code === a.NOT_FOUND_ERR ? e(i.msgFileNotFound) : a.code === a.SECURITY_ERR ? e(i.msgFileSecured) : a.code === a.NOT_READABLE_ERR ? e(i.msgFileNotReadable) : a.code === a.ABORT_ERR ? e(i.msgFilePreviewAborted) : e(i.msgFilePreviewError)\r\n }, _addError: function (e) {\r\n var t = this, i = t.$errorContainer;\r\n e && i.length && (N.setHtml(i, t.errorCloseButton + e), t._handler(i.find(\".kv-error-close\"), \"click\", function () {\r\n setTimeout(function () {\r\n t.showPreview && !t.getFrames().length && t.clear(), i.fadeOut(\"slow\")\r\n }, t.processDelay)\r\n }))\r\n }, _setValidationError: function (e) {\r\n e = (e ? e + \" \" : \"\") + \"has-error\", this.$container.removeClass(e).addClass(\"has-error\"), N.addCss(this.$captionContainer, \"is-invalid\")\r\n }, _resetErrors: function (e) {\r\n var t = this, i = t.$errorContainer, a = t.resumableUploadOptions.retainErrorHistory;\r\n t.isPersistentError || t.enableResumableUpload && a || (t.isError = !1, t.$container.removeClass(\"has-error\"), t.$captionContainer.removeClass(\"is-invalid\"), i.html(\"\"), e ? i.fadeOut(\"slow\") : i.hide())\r\n }, _showFolderError: function (e) {\r\n var t, i = this, a = i.$errorContainer;\r\n e && (i.isAjaxUpload || i._clearFileInput(), t = i.msgFoldersNotAllowed.replace(\"{n}\", e), i._addError(t), i._setValidationError(), a.fadeIn(i.fadeDelay), i._raise(\"filefoldererror\", [e, t]))\r\n }, _showFileError: function (e, t, i) {\r\n var a = this, r = a.$errorContainer, n = i || \"fileuploaderror\", i = t && t.fileId || \"\",\r\n i = t && t.id ? '
  • ' + e + \"
  • \" : \"
  • \" + e + \"
  • \";\r\n return 0 === r.find(\"ul\").length ? a._addError(\"\") : r.find(\"ul\").append(i), r.fadeIn(a.fadeDelay), a._raise(n, [t, e]), a._setValidationError(\"file-input-new\"), !0\r\n }, _showError: function (e, t, i) {\r\n var a = this, r = a.$errorContainer, i = i || \"fileerror\";\r\n return (t = t || {}).reader = a.reader, a._addError(e), r.fadeIn(a.fadeDelay), a._raise(i, [t, e]), a.isAjaxUpload || a._clearFileInput(), a._setValidationError(\"file-input-new\"), a.$btnUpload.attr(\"disabled\", !0), !0\r\n }, _noFilesError: function (e) {\r\n var t = this, i = 1 < t.minFileCount ? t.filePlural : t.fileSingle,\r\n a = t.msgFilesTooLess.replace(\"{n}\", t.minFileCount).replace(\"{files}\", i), i = t.$errorContainer,\r\n a = \"
  • \" + a + \"
  • \";\r\n 0 === i.find(\"ul\").length ? t._addError(\"\") : i.find(\"ul\").append(a), t.isError = !0, t._updateFileDetails(0), i.fadeIn(t.fadeDelay), t._raise(\"fileerror\", [e, a]), t._clearFileInput(), t._setValidationError()\r\n }, _parseError: function (e, t, i, a) {\r\n var r = this, n = L.trim(i + \"\"),\r\n i = t.responseJSON && t.responseJSON.error ? t.responseJSON.error.toString() : \"\", t = i || t.responseText;\r\n return r.cancelling && r.msgUploadAborted && (n = r.msgUploadAborted), r.showAjaxErrorDetails && t && (i ? n = L.trim(i + \"\") : (i = (t = L.trim(t.replace(/\\n\\s*\\n/g, \"\\n\"))).length ? \"
    \" + t + \"
    \" : \"\", n += n ? i : t)), n = n || r.msgAjaxError.replace(\"{operation}\", e), r.cancelling = !1, a ? \"\" + a + \": \" + n : n\r\n }, _parseFileType: function (e, t) {\r\n var i, a, r = this.allowedPreviewTypes || [];\r\n if (\"application/text-plain\" === e) return \"text\";\r\n for (a = 0; a < r.length; a++) if (i = r[a], i = (0, this.fileTypeSettings[i])(e, t) ? i : \"\", !N.isEmpty(i)) return i;\r\n return \"other\"\r\n }, _getPreviewIcon: function (e) {\r\n var i, a = this, r = null;\r\n return e && -1 < e.indexOf(\".\") && (i = e.split(\".\").pop(), a.previewFileIconSettings && (r = a.previewFileIconSettings[i] || a.previewFileIconSettings[i.toLowerCase()] || null), a.previewFileExtSettings && L.each(a.previewFileExtSettings, function (e, t) {\r\n a.previewFileIconSettings[e] && t(i) && (r = a.previewFileIconSettings[e])\r\n })), r || a.previewFileIcon\r\n }, _parseFilePreviewIcon: function (e, t) {\r\n t = this._getPreviewIcon(t);\r\n return -1 < e.indexOf(\"{previewFileIcon}\") && (e = e.setTokens({\r\n previewFileIconClass: this.previewFileIconClass,\r\n previewFileIcon: t\r\n })), e\r\n }, _raise: function (e, t) {\r\n var i = L.Event(e);\r\n if (void 0 !== t ? this.$element.trigger(i, t) : this.$element.trigger(i), i.isDefaultPrevented() || !1 === i.result) return !1;\r\n switch (e) {\r\n case\"filebatchuploadcomplete\":\r\n case\"filebatchuploadsuccess\":\r\n case\"fileuploaded\":\r\n case\"fileclear\":\r\n case\"filecleared\":\r\n case\"filereset\":\r\n case\"fileerror\":\r\n case\"filefoldererror\":\r\n case\"fileuploaderror\":\r\n case\"filebatchuploaderror\":\r\n case\"filedeleteerror\":\r\n case\"filecustomerror\":\r\n case\"filesuccessremove\":\r\n break;\r\n default:\r\n this.ajaxAborted || (this.ajaxAborted = i.result)\r\n }\r\n return !0\r\n }, _listenFullScreen: function (e) {\r\n var t, i, a = this.$modal;\r\n a && a.length && (t = a && a.find(\".btn-fullscreen\"), i = a && a.find(\".btn-borderless\"), t.length && i.length && (t.removeClass(\"active\").attr(\"aria-pressed\", \"false\"), i.removeClass(\"active\").attr(\"aria-pressed\", \"false\"), (e ? t : i).addClass(\"active\").attr(\"aria-pressed\", \"true\"), a.hasClass(\"file-zoom-fullscreen\") || e ? this._maximizeZoomDialog() : i.removeClass(\"active\").attr(\"aria-pressed\", \"false\")))\r\n }, _listen: function () {\r\n var e, t, i = this, a = i.$element, r = i.$form, n = i.$container;\r\n i._handler(a, \"click\", function (e) {\r\n a.hasClass(\"file-no-browse\") && (a.data(\"zoneClicked\") ? a.data(\"zoneClicked\", !1) : e.preventDefault())\r\n }), i._handler(a, \"change\", L.proxy(i._change, i)), i.showBrowse && i._handler(i.$btnFile, \"click\", L.proxy(i._browse, i)), e = n.find(\".file-caption-name\"), t = function () {\r\n return !1\r\n }, i._handler(n.find(\".fileinput-remove:not([disabled])\"), \"click\", L.proxy(i.clear, i)), i._handler(n.find(\".fileinput-cancel\"), \"click\", L.proxy(i.cancel, i)), i._handler(n.find(\".fileinput-pause\"), \"click\", L.proxy(i.pause, i)), i._handler(e, \"keydown\", t), i._handler(e, \"paste\", t), i._initDragDrop(), i._handler(r, \"reset\", L.proxy(i.clear, i)), i.isAjaxUpload || i._handler(r, \"submit\", L.proxy(i._submitForm, i)), i._handler(i.$container.find(\".fileinput-upload\"), \"click\", L.proxy(i._uploadClick, i)), i._handler(L(window), \"resize\", function () {\r\n i._listenFullScreen(screen.width === window.innerWidth && screen.height === window.innerHeight)\r\n }), i._handler(L(document), \"webkitfullscreenchange mozfullscreenchange fullscreenchange MSFullscreenChange\", function () {\r\n i._listenFullScreen(N.checkFullScreen())\r\n }), i._autoFitContent(), i._initClickable(), i._refreshPreview()\r\n }, _autoFitContent: function () {\r\n var i, e = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth, a = this,\r\n e = e < 400 ? a.previewSettingsSmall || a.defaults.previewSettingsSmall : a.previewSettings || a.defaults.previewSettings;\r\n L.each(e, function (e, t) {\r\n i = \".file-preview-frame .file-preview-\" + e, a.$preview.find(i + \".kv-preview-data,\" + i + \" .kv-preview-data\").css(t)\r\n })\r\n }, _scanDroppedItems: function (t, i, a) {\r\n a = a || \"\";\r\n\r\n function e(e) {\r\n s._log(N.logMessages.badDroppedFiles), s._log(e)\r\n }\r\n\r\n var r, n, o, s = this;\r\n t.isFile ? t.file(function (e) {\r\n a && (e.newPath = a + e.name), i.push(e)\r\n }, e) : t.isDirectory && (n = t.createReader(), (o = function () {\r\n n.readEntries(function (e) {\r\n if (e && 0 < e.length) {\r\n for (r = 0; r < e.length; r++) s._scanDroppedItems(e[r], i, a + t.name + \"/\");\r\n o()\r\n }\r\n return null\r\n }, e)\r\n })())\r\n }, _initDragDrop: function () {\r\n var e = this, t = e.$dropZone;\r\n e.dropZoneEnabled && e.showPreview && (e._handler(t, \"dragenter dragover\", L.proxy(e._zoneDragEnter, e)), e._handler(t, \"dragleave\", L.proxy(e._zoneDragLeave, e)), e._handler(t, \"drop\", L.proxy(e._zoneDrop, e)), e._handler(L(document), \"dragenter dragover drop\", e._zoneDragDropInit))\r\n }, _zoneDragDropInit: function (e) {\r\n e.stopPropagation(), e.preventDefault()\r\n }, _zoneDragEnter: function (e) {\r\n var t = e.originalEvent.dataTransfer, i = -1 < L.inArray(\"Files\", t.types);\r\n if (this._zoneDragDropInit(e), this.isDisabled || !i) return t.effectAllowed = \"none\", void (t.dropEffect = \"none\");\r\n t.dropEffect = \"copy\", this._raise(\"fileDragEnter\", {\r\n sourceEvent: e,\r\n files: t.types.Files\r\n }) && N.addCss(this.$dropZone, \"file-highlighted\")\r\n }, _zoneDragLeave: function (e) {\r\n this._zoneDragDropInit(e), this.isDisabled || this._raise(\"fileDragLeave\", {sourceEvent: e}) && this.$dropZone.removeClass(\"file-highlighted\")\r\n }, _zoneDrop: function (e) {\r\n function t() {\r\n a.isAjaxUpload ? a._change(e, o) : (a.changeTriggered = !0, r.get(0).files = o, setTimeout(function () {\r\n a.changeTriggered = !1, r.trigger(\"change\" + a.namespace)\r\n }, a.processDelay)), a.$dropZone.removeClass(\"file-highlighted\")\r\n }\r\n\r\n var i, a = this, r = a.$element, n = e.originalEvent.dataTransfer, o = n.files, s = n.items,\r\n n = N.getDragDropFolders(s);\r\n if (e.preventDefault(), !a.isDisabled && !N.isEmpty(o) && a._raise(\"fileDragDrop\", {\r\n sourceEvent: e,\r\n files: o\r\n })) if (0 < n) if (a.isAjaxUpload) {\r\n for (o = [], i = 0; i < s.length; i++) {\r\n var l = s[i].webkitGetAsEntry();\r\n l && a._scanDroppedItems(l, o)\r\n }\r\n setTimeout(function () {\r\n t()\r\n }, 500)\r\n } else a._showFolderError(n); else t()\r\n }, _uploadClick: function (e) {\r\n var t = this.$container.find(\".fileinput-upload\"), i = !t.hasClass(\"disabled\") && N.isEmpty(t.attr(\"disabled\"));\r\n e && e.isDefaultPrevented() || (this.isAjaxUpload ? (e.preventDefault(), i && this.upload()) : i && \"submit\" !== t.attr(\"type\") && ((t = t.closest(\"form\")).length && t.trigger(\"submit\"), e.preventDefault()))\r\n }, _submitForm: function () {\r\n return this._isFileSelectionValid() && !this._abort({})\r\n }, _clearPreview: function () {\r\n var e = this;\r\n (e.showUploadedThumbs ? e.getFrames(\":not(.file-preview-success)\") : e.getFrames()).each(function () {\r\n L(this).remove()\r\n }), e.getFrames().length && e.showPreview || e._resetUpload(), e._validateDefaultPreview()\r\n }, _initSortable: function () {\r\n var e, l = this, t = l.$preview, i = \".\" + N.SORT_CSS, a = L(\"body\"), r = L(\"html\"), d = l.reversePreviewOrder,\r\n n = window.Sortable;\r\n n && 0 !== t.find(i).length && (e = a.length ? a : r.length ? r : l.$container, r = {\r\n handle: \".drag-handle-init\",\r\n dataIdAttr: \"data-fileid\",\r\n animation: 600,\r\n draggable: i,\r\n scroll: !(r = function () {\r\n e.removeClass(\"file-grabbing\")\r\n }),\r\n forceFallback: !0,\r\n onChoose: i = function () {\r\n e.addClass(\"file-grabbing\")\r\n },\r\n onStart: i,\r\n onUnchoose: r,\r\n onEnd: r,\r\n onSort: function (e) {\r\n var t, i = e.oldIndex, a = e.newIndex, r = 0, n = l.initialPreviewConfig.length, o = 0 < n && n <= a,\r\n s = L(e.item);\r\n o && (a = n - 1), l.initialPreview = N.moveArray(l.initialPreview, i, a, d), l.initialPreviewConfig = N.moveArray(l.initialPreviewConfig, i, a, d), l.previewCache.init(), l.getFrames(\".file-preview-initial\").each(function () {\r\n L(this).attr(\"data-fileindex\", N.INIT_FLAG + r), r++\r\n }), o && (t = l.getFrames(\":not(.file-preview-initial):first\")).length && s.slideUp(function () {\r\n s.insertBefore(t).slideDown()\r\n }), l._raise(\"filesorted\", {previewId: s.attr(\"id\"), oldIndex: i, newIndex: a, stack: l.initialPreviewConfig})\r\n }\r\n }, L.extend(!0, r, l.fileActionSettings.dragSettings), l.sortable && l.sortable.destroy(), l.sortable = n.create(t[0], r))\r\n }, _setPreviewContent: function (e) {\r\n N.setHtml(this.$preview, e), this._autoFitContent()\r\n }, _initPreviewImageOrientations: function () {\r\n var r = this, n = 0, o = r.canOrientImage;\r\n (r.autoOrientImageInitial || o) && r.getFrames(\".file-preview-initial\").each(function () {\r\n var e, t, i = L(this), a = r.initialPreviewConfig[n];\r\n a && a.exif && a.exif.Orientation && (t = i.attr(\"id\"), e = i.find(\">.kv-file-content img\"), t = r._getZoom(t, \" >.kv-file-content img\"), o ? e.css(\"image-orientation\", r.autoOrientImageInitial ? \"from-image\" : \"none\") : r.setImageOrientation(e, t, a.exif.Orientation, i)), n++\r\n })\r\n }, _initPreview: function (e) {\r\n var t, i = this, a = i.initialCaption || \"\";\r\n if (!i.previewCache.count(!0)) return i._clearPreview(), void (e ? i._setCaption(a) : i._initCaption());\r\n t = i.previewCache.out(), a = e && i.initialCaption ? i.initialCaption : t.caption, i._setPreviewContent(t.content), i._setInitThumbAttr(), i._setCaption(a), i._initSortable(), N.isEmpty(t.content) || i.$container.removeClass(\"file-input-new\"), i._initPreviewImageOrientations()\r\n }, _getZoomButton: function (e) {\r\n var t = this.previewZoomButtonIcons[e], i = this.previewZoomButtonClasses[e],\r\n a = ' title=\"' + (this.previewZoomButtonTitles[e] || \"\") + '\" ' + (\"close\" === e ? ' data-dismiss=\"modal\" aria-hidden=\"true\"' : \"\");\r\n return \"fullscreen\" !== e && \"borderless\" !== e && \"toggleheader\" !== e || (a += ' data-toggle=\"button\" aria-pressed=\"false\" autocomplete=\"off\"'), '\"\r\n }, _getModalContent: function () {\r\n var e = this;\r\n return e._getLayoutTemplate(\"modal\").setTokens({\r\n rtl: e.rtl ? \" kv-rtl\" : \"\",\r\n zoomFrameClass: e.frameClass,\r\n heading: e.msgZoomModalHeading,\r\n prev: e._getZoomButton(\"prev\"),\r\n next: e._getZoomButton(\"next\"),\r\n toggleheader: e._getZoomButton(\"toggleheader\"),\r\n fullscreen: e._getZoomButton(\"fullscreen\"),\r\n borderless: e._getZoomButton(\"borderless\"),\r\n close: e._getZoomButton(\"close\")\r\n })\r\n }, _listenModalEvent: function (a) {\r\n var r = this, n = r.$modal;\r\n n.on(a + \".bs.modal\", function (e) {\r\n var t, i;\r\n \"bs.modal\" === e.namespace && (t = n.find(\".btn-fullscreen\"), i = n.find(\".btn-borderless\"), n.data(\"fileinputPluginId\") === r.$element.attr(\"id\") && r._raise(\"filezoom\" + a, {\r\n sourceEvent: e,\r\n previewId: n.data(\"previewId\"),\r\n modal: n\r\n }), \"shown\" === a && (i.removeClass(\"active\").attr(\"aria-pressed\", \"false\"), t.removeClass(\"active\").attr(\"aria-pressed\", \"false\"), n.hasClass(\"file-zoom-fullscreen\") && (r._maximizeZoomDialog(), (N.checkFullScreen() ? t : i).addClass(\"active\").attr(\"aria-pressed\", \"true\"))))\r\n })\r\n }, _initZoom: function () {\r\n var i = this, e = i._getLayoutTemplate(\"modalMain\"), t = \"#\" + N.MODAL_ID;\r\n i.showPreview && (i.$modal = L(t), i.$modal && i.$modal.length || (e = N.createElement(N.cspBuffer.stash(e)).insertAfter(i.$container), i.$modal = L(t).insertBefore(e), N.cspBuffer.apply(i.$modal), e.remove()), N.initModal(i.$modal), i.$modal.html(N.cspBuffer.stash(i._getModalContent())), N.cspBuffer.apply(i.$modal), L.each(N.MODAL_EVENTS, function (e, t) {\r\n i._listenModalEvent(t)\r\n }))\r\n }, _initZoomButtons: function () {\r\n var e, t = this.$modal.data(\"previewId\") || \"\", i = this.getFrames().toArray(), a = i.length,\r\n r = this.$modal.find(\".btn-prev\"), n = this.$modal.find(\".btn-next\");\r\n if (i.length < 2) return r.hide(), void n.hide();\r\n r.show(), n.show(), a && (e = L(i[0]), a = L(i[a - 1]), r.removeAttr(\"disabled\"), n.removeAttr(\"disabled\"), e.length && e.attr(\"id\") === t && r.attr(\"disabled\", !0), a.length && a.attr(\"id\") === t && n.attr(\"disabled\", !0))\r\n }, _maximizeZoomDialog: function () {\r\n var e = this.$modal, t = e.find(\".modal-header:visible\"), i = e.find(\".modal-footer:visible\"),\r\n a = e.find(\".modal-body\"), r = L(window).height();\r\n e.addClass(\"file-zoom-fullscreen\"), t && t.length && (r -= t.outerHeight(!0)), i && i.length && (r -= i.outerHeight(!0)), a && a.length && (r -= a.outerHeight(!0) - a.height()), e.find(\".kv-zoom-body\").height(r)\r\n }, _resizeZoomDialog: function (e) {\r\n var t = this, i = t.$modal, a = i.find(\".btn-fullscreen\"), r = i.find(\".btn-borderless\");\r\n if (i.hasClass(\"file-zoom-fullscreen\")) N.toggleFullScreen(!1), e ? a.hasClass(\"active\") || (i.removeClass(\"file-zoom-fullscreen\"), t._resizeZoomDialog(!0), r.hasClass(\"active\") && r.removeClass(\"active\").attr(\"aria-pressed\", \"false\")) : a.hasClass(\"active\") ? a.removeClass(\"active\").attr(\"aria-pressed\", \"false\") : (i.removeClass(\"file-zoom-fullscreen\"), t.$modal.find(\".kv-zoom-body\").css(\"height\", t.zoomModalHeight)); else {\r\n if (!e) return void t._maximizeZoomDialog();\r\n N.toggleFullScreen(!0)\r\n }\r\n i.focus()\r\n }, _setZoomContent: function (e, t) {\r\n var i, a, r, o = this, n = e.attr(\"id\"), s = o._getZoom(n), l = o.$modal, d = l.find(\".btn-fullscreen\"),\r\n c = l.find(\".btn-borderless\"), u = l.find(\".btn-toggleheader\"), p = s.attr(\"data-template\") || \"generic\",\r\n s = s.find(\".kv-file-content\"), s = s.length ? s.html() : \"\",\r\n e = (e.data(\"caption\") || \"\") + \" \" + (e.data(\"size\") || \"\");\r\n l.find(\".kv-zoom-title\").attr(\"title\", L(\"
    \").html(e).text()).html(e), i = l.find(\".kv-zoom-body\"), l.removeClass(\"kv-single-content\"), t ? (r = i.addClass(\"file-thumb-loading\").clone().insertAfter(i), N.setHtml(i, s).hide(), r.fadeOut(\"fast\", function () {\r\n i.fadeIn(\"fast\", function () {\r\n i.removeClass(\"file-thumb-loading\")\r\n }), r.remove()\r\n })) : N.setHtml(i, s), (p = o.previewZoomSettings[p]) && (a = i.find(\".kv-preview-data\"), N.addCss(a, \"file-zoom-detail\"), L.each(p, function (e, t) {\r\n a.css(e, t), (a.attr(\"width\") && \"width\" === e || a.attr(\"height\") && \"height\" === e) && a.removeAttr(e)\r\n })), l.data(\"previewId\", n), o._handler(l.find(\".btn-prev\"), \"click\", function () {\r\n o._zoomSlideShow(\"prev\", n)\r\n }), o._handler(l.find(\".btn-next\"), \"click\", function () {\r\n o._zoomSlideShow(\"next\", n)\r\n }), o._handler(d, \"click\", function () {\r\n o._resizeZoomDialog(!0)\r\n }), o._handler(c, \"click\", function () {\r\n o._resizeZoomDialog(!1)\r\n }), o._handler(u, \"click\", function () {\r\n function e(e) {\r\n var t = o.$modal.find(\".kv-zoom-body\"), i = o.zoomModalHeight;\r\n l.hasClass(\"file-zoom-fullscreen\") && (i = t.outerHeight(!0), e || (i -= a.outerHeight(!0))), t.css(\"height\", e ? i + e : i)\r\n }\r\n\r\n var t, a = l.find(\".modal-header\"), i = l.find(\".modal-body .floating-buttons\"), r = a.find(\".kv-zoom-actions\");\r\n a.is(\":visible\") ? (t = a.outerHeight(!0), a.slideUp(\"slow\", function () {\r\n r.find(\".btn\").appendTo(i), e(t)\r\n })) : (i.find(\".btn\").appendTo(r), a.slideDown(\"slow\", function () {\r\n e()\r\n })), l.focus()\r\n }), o._handler(l, \"keydown\", function (e) {\r\n var t = e.which || e.keyCode, i = L(this).find(\".btn-prev\"), a = L(this).find(\".btn-next\"),\r\n r = L(this).data(\"previewId\"), n = o.rtl ? 39 : 37, e = o.rtl ? 37 : 39;\r\n t === n && i.length && !i.attr(\"disabled\") && o._zoomSlideShow(\"prev\", r), t === e && a.length && !a.attr(\"disabled\") && o._zoomSlideShow(\"next\", r)\r\n })\r\n }, _showModal: function (e) {\r\n var t = this, i = t.$modal;\r\n e && e.length && (N.initModal(i), N.setHtml(i, t._getModalContent()), t._setZoomContent(e), i.data(\"fileinputPluginId\", t.$element.attr(\"id\")), i.modal(\"show\"), t._initZoomButtons())\r\n }, _zoomPreview: function (e) {\r\n if (!e.length) throw\"Cannot zoom to detailed preview!\";\r\n e = e.closest(N.FRAMES), this._showModal(e)\r\n }, _zoomSlideShow: function (e, t) {\r\n var i, a, r, n = this, o = n.$modal.find(\".kv-zoom-actions .btn-\" + e), s = n.getFrames().toArray(), l = [],\r\n d = s.length;\r\n if (!o.attr(\"disabled\")) {\r\n for (i = 0; i < d; i++) (a = L(s[i])) && a.length && a.find(\".kv-file-zoom:visible\").length && l.push(s[i]);\r\n for (d = l.length, i = 0; i < d; i++) if (L(l[i]).attr(\"id\") === t) {\r\n r = \"prev\" === e ? i - 1 : i + 1;\r\n break\r\n }\r\n r < 0 || d <= r || !l[r] || ((o = L(l[r])).length && n._setZoomContent(o, !0), n._initZoomButtons(), n._raise(\"filezoom\" + e, {\r\n previewId: t,\r\n modal: n.$modal\r\n }))\r\n }\r\n }, _initZoomButton: function () {\r\n var t = this;\r\n t.$preview.find(\".kv-file-zoom\").each(function () {\r\n var e = L(this);\r\n t._handler(e, \"click\", function () {\r\n t._zoomPreview(e)\r\n })\r\n })\r\n }, _inputFileCount: function () {\r\n return this.$element[0].files.length\r\n }, _refreshPreview: function () {\r\n var e, t = this;\r\n (t._inputFileCount() || t.isAjaxUpload) && t.showPreview && t.isPreviewable && (t.isAjaxUpload && 0 < t.fileManager.count() ? (e = L.extend(!0, {}, t.getFileList()), t.fileManager.clear(), t._clearFileInput()) : e = t.$element[0].files, e && e.length && (t.readFiles(e), t._setFileDropZoneTitle()))\r\n }, _clearObjects: function (e) {\r\n e.find(\"video audio\").each(function () {\r\n this.pause(), L(this).remove()\r\n }), e.find(\"img object div\").each(function () {\r\n L(this).remove()\r\n })\r\n }, _clearFileInput: function () {\r\n var e, t, i, a = this.$element;\r\n this._inputFileCount() && (e = a.closest(\"form\"), t = L(document.createElement(\"form\")), i = L(document.createElement(\"div\")), a.before(i), (e.length ? e : i).after(t), t.append(a).trigger(\"reset\"), i.before(a).remove(), t.remove())\r\n }, _resetUpload: function () {\r\n var e = this;\r\n e.uploadStartTime = N.now(), e.uploadCache = [], e.$btnUpload.removeAttr(\"disabled\"), e._setProgress(0), e._hideProgress(), e._resetErrors(!1), e._initAjax(), e.fileManager.clearImages(), e._resetCanvas(), e.overwriteInitial && (e.initialPreview = [], e.initialPreviewConfig = [], e.initialPreviewThumbTags = [], e.previewCache.data = {\r\n content: [],\r\n config: [],\r\n tags: []\r\n })\r\n }, _resetCanvas: function () {\r\n var e = this;\r\n e.canvas && e.imageCanvasContext && e.imageCanvasContext.clearRect(0, 0, e.canvas.width, e.canvas.height)\r\n }, _hasInitialPreview: function () {\r\n return !this.overwriteInitial && this.previewCache.count(!0)\r\n }, _resetPreview: function () {\r\n var e, t, i = this, a = i.showUploadedThumbs, r = !i.removeFromPreviewOnError, n = (a || r) && i.isDuplicateError;\r\n i.previewCache.count(!0) ? (e = i.previewCache.out(), n && (t = N.createElement(\"\").insertAfter(i.$container), i.getFrames().each(function () {\r\n var e = L(this);\r\n (a && e.hasClass(\"file-preview-success\") || r && e.hasClass(\"file-preview-error\")) && t.append(e)\r\n })), i._setPreviewContent(e.content), i._setInitThumbAttr(), e = i.initialCaption || e.caption, i._setCaption(e), n && (t.contents().appendTo(i.$preview), t.remove())) : (i._clearPreview(), i._initCaption()), i.showPreview && (i._initZoom(), i._initSortable()), i.isDuplicateError = !1\r\n }, _clearDefaultPreview: function () {\r\n this.$preview.find(\".file-default-preview\").remove()\r\n }, _validateDefaultPreview: function () {\r\n var e = this;\r\n e.showPreview && !N.isEmpty(e.defaultPreviewContent) && (e._setPreviewContent('
    ' + e.defaultPreviewContent + \"
    \"), e.$container.removeClass(\"file-input-new\"), e._initClickable())\r\n }, _resetPreviewThumbs: function (e) {\r\n var t = this;\r\n if (e) return t._clearPreview(), void t.clearFileStack();\r\n t._hasInitialPreview() ? (e = t.previewCache.out(), t._setPreviewContent(e.content), t._setInitThumbAttr(), t._setCaption(e.caption), t._initPreviewActions()) : t._clearPreview()\r\n }, _getLayoutTemplate: function (e) {\r\n e = this.layoutTemplates[e];\r\n return N.isEmpty(this.customLayoutTags) ? e : N.replaceTags(e, this.customLayoutTags)\r\n }, _getPreviewTemplate: function (e) {\r\n var t = this.previewTemplates, t = t[e] || t.other;\r\n return N.isEmpty(this.customPreviewTags) ? t : N.replaceTags(t, this.customPreviewTags)\r\n }, _getOutData: function (e, t, i, a) {\r\n var r = this;\r\n return t = t || {}, i = i || {}, {\r\n formdata: e,\r\n files: a = a || r.fileManager.list(),\r\n filenames: r.filenames,\r\n filescount: r.getFilesCount(),\r\n extra: r._getExtraData(),\r\n response: i,\r\n reader: r.reader,\r\n jqXHR: t\r\n }\r\n }, _getMsgSelected: function (e) {\r\n var t = 1 === e ? this.fileSingle : this.filePlural;\r\n return 0 < e ? this.msgSelected.replace(\"{n}\", e).replace(\"{files}\", t) : this.msgNoFilesSelected\r\n }, _getFrame: function (e, t) {\r\n var i = N.getFrameElement(this.$preview, e);\r\n return !this.showPreview || t || i.length || this._log(N.logMessages.invalidThumb, {id: e}), i\r\n }, _getZoom: function (e, t) {\r\n t = N.getZoomElement(this.$preview, e, t);\r\n return this.showPreview && !t.length && this._log(N.logMessages.invalidThumb, {id: e}), t\r\n }, _getThumbs: function (e) {\r\n return e = e || \"\", this.getFrames(\":not(.file-preview-initial)\" + e)\r\n }, _getThumbId: function (e) {\r\n return this.previewInitId + \"-\" + e\r\n }, _getExtraData: function (e, t) {\r\n var i = this.uploadExtraData;\r\n return \"function\" == typeof this.uploadExtraData && (i = this.uploadExtraData(e, t)), i\r\n }, _initXhr: function (e, n) {\r\n var o = this, s = o.fileManager, t = function (e) {\r\n var t = 0, i = e.total, a = e.loaded || e.position, r = s.getUploadStats(n, a, i);\r\n e.lengthComputable && !o.enableResumableUpload && (t = N.round(a / i * 100)), n ? o._setFileUploadStats(n, t, r) : o._setProgress(t, null, null, o._getStats(r)), o._raise(\"fileajaxprogress\", [r])\r\n };\r\n return e.upload && (o.progressDelay && (t = N.debounce(t, o.progressDelay)), e.upload.addEventListener(\"progress\", t, !1)), e\r\n }, _initAjaxSettings: function () {\r\n this._ajaxSettings = L.extend(!0, {}, this.ajaxSettings), this._ajaxDeleteSettings = L.extend(!0, {}, this.ajaxDeleteSettings)\r\n }, _mergeAjaxCallback: function (e, t, i) {\r\n var a, r = this._ajaxSettings, n = this.mergeAjaxCallbacks;\r\n \"delete\" === i && (r = this._ajaxDeleteSettings, n = this.mergeAjaxDeleteCallbacks), a = r[e], r[e] = n && \"function\" == typeof a ? \"before\" === n ? function () {\r\n a.apply(this, arguments), t.apply(this, arguments)\r\n } : function () {\r\n t.apply(this, arguments), a.apply(this, arguments)\r\n } : t\r\n }, _ajaxSubmit: function (e, t, i, a, r, n, o, s) {\r\n var l = this;\r\n l._raise(\"filepreajax\", [r, n, o]) && (r.append(\"initialPreview\", JSON.stringify(l.initialPreview)), r.append(\"initialPreviewConfig\", JSON.stringify(l.initialPreviewConfig)), r.append(\"initialPreviewThumbTags\", JSON.stringify(l.initialPreviewThumbTags)), l._initAjaxSettings(), l._mergeAjaxCallback(\"beforeSend\", e), l._mergeAjaxCallback(\"success\", t), l._mergeAjaxCallback(\"complete\", i), l._mergeAjaxCallback(\"error\", a), \"function\" == typeof (s = s || l.uploadUrlThumb || l.uploadUrl) && (s = s()), \"object\" == typeof (a = l._getExtraData(n, o) || {}) && L.each(a, function (e, t) {\r\n r.append(e, t)\r\n }), s = {\r\n xhr: function () {\r\n var e = L.ajaxSettings.xhr();\r\n return l._initXhr(e, n)\r\n }, url: l._encodeURI(s), type: \"POST\", dataType: \"json\", data: r, cache: !1, processData: !1, contentType: !1\r\n }, s = L.extend(!0, {}, s, l._ajaxSettings), o = l.taskManager.addTask(n + \"-\" + o, function () {\r\n var e = this.self, t = e.ajaxQueue.shift(), t = L.ajax(t);\r\n e.ajaxRequests.push(t)\r\n }), l.ajaxQueue.push(s), o.runWithContext({self: l}))\r\n }, _mergeArray: function (e, t) {\r\n var i = N.cleanArray(this[e]), t = N.cleanArray(t);\r\n this[e] = i.concat(t)\r\n }, _initUploadSuccess: function (e, t, i) {\r\n var a, r, n, o, s, l = this;\r\n l.showPreview && \"object\" == typeof e && !L.isEmptyObject(e) && void 0 !== e.initialPreview && 0 < e.initialPreview.length && (l.hasInitData = !0, r = e.initialPreview || [], n = e.initialPreviewConfig || [], o = e.initialPreviewThumbTags || [], e = void 0 === e.append || e.append, 0 < r.length && !N.isArray(r) && (r = r.split(l.initialPreviewDelimiter)), r.length && (l._mergeArray(\"initialPreview\", r), l._mergeArray(\"initialPreviewConfig\", n), l._mergeArray(\"initialPreviewThumbTags\", o)), void 0 !== t ? i ? (s = t.attr(\"id\"), null !== (i = l._getUploadCacheIndex(s)) && (l.uploadCache[i] = {\r\n id: s,\r\n content: r[0],\r\n config: n[0] || [],\r\n tags: o[0] || [],\r\n append: e\r\n })) : (s = l.previewCache.add(r[0], n[0], o[0], e), s = l.previewCache.get(s, !1), (s = (a = N.createElement(s).hide().appendTo(t)).find(\".kv-zoom-cache\")) && s.length && s.appendTo(t), t.fadeOut(\"slow\", function () {\r\n var e = a.find(\".file-preview-frame\");\r\n e && e.length && e.insertBefore(t).fadeIn(\"slow\").css(\"display:inline-block\"), l._initPreviewActions(), l._clearFileInput(), t.remove(), a.remove(), l._initSortable()\r\n })) : (l.previewCache.set(r, n, o, e), l._initPreview(), l._initPreviewActions())), l._resetCaption()\r\n }, _getUploadCacheIndex: function (e) {\r\n for (var t = this.uploadCache.length, i = 0; i < t; i++) if (this.uploadCache[i].id === e) return i;\r\n return null\r\n }, _initSuccessThumbs: function () {\r\n var i = this;\r\n i.showPreview && i._getThumbs(N.FRAMES + \".file-preview-success\").each(function () {\r\n var t = L(this), e = t.find(\".kv-file-remove\");\r\n e.removeAttr(\"disabled\"), i._handler(e, \"click\", function () {\r\n var e = t.attr(\"id\"), e = i._raise(\"filesuccessremove\", [e, t.attr(\"data-fileindex\")]);\r\n N.cleanMemory(t), !1 !== e && t.fadeOut(\"slow\", function () {\r\n t.remove(), i.getFrames().length || i.reset()\r\n })\r\n })\r\n })\r\n }, _updateInitialPreview: function () {\r\n var i = this, e = i.uploadCache;\r\n i.showPreview && (L.each(e, function (e, t) {\r\n i.previewCache.add(t.content, t.config, t.tags, t.append)\r\n }), i.hasInitData && (i._initPreview(), i._initPreviewActions()))\r\n }, _getThumbFileId: function (e) {\r\n return this.showPreview && void 0 !== e ? e.attr(\"data-fileid\") : null\r\n }, _getThumbFile: function (e) {\r\n e = this._getThumbFileId(e);\r\n return e ? this.fileManager.getFile(e) : null\r\n }, _uploadSingle: function (r, n, o) {\r\n var s, l, e, d, t, c, u, i, p, a, f, g = this, m = g.fileManager, h = m.count(), v = new FormData,\r\n w = g._getThumbId(n), b = 0 < h || !L.isEmptyObject(g.uploadExtraData), _ = g.ajaxOperations.uploadThumb,\r\n C = m.getFile(n), y = {id: w, index: r, fileId: n}, x = g.fileManager.getFileName(n, !0);\r\n g.enableResumableUpload || (g.showPreview && (l = m.getThumb(n), u = l.find(\".file-thumb-progress\"), d = l.find(\".kv-file-upload\"), t = l.find(\".kv-file-remove\"), u.show()), 0 === h || !b || g.showPreview && d && d.hasClass(\"disabled\") || g._abort(y) || (f = function () {\r\n c ? m.errors.push(n) : m.removeFile(n), m.setProcessed(n), m.isProcessed() && (g.fileBatchCompleted = !0, e())\r\n }, e = function () {\r\n var i;\r\n g.fileBatchCompleted && setTimeout(function () {\r\n var e = 0 === m.count(), t = m.errors.length;\r\n g._updateInitialPreview(), g.unlock(e), e && g._clearFileInput(), i = g.$preview.find(\".file-preview-initial\"), g.uploadAsync && i.length && (N.addCss(i, N.SORT_CSS), g._initSortable()), g._raise(\"filebatchuploadcomplete\", [m.stack, g._getExtraData()]), g.retryErrorUploads && 0 !== t || m.clear(), g._setProgress(101), g.ajaxAborted = !1\r\n }, g.processDelay)\r\n }, i = function (e) {\r\n s = g._getOutData(v, e), m.initStats(n), g.fileBatchCompleted = !1, o || (g.ajaxAborted = !1), g.showPreview && (l.hasClass(\"file-preview-success\") || (g._setThumbStatus(l, \"Loading\"), N.addCss(l, \"file-uploading\")), d.attr(\"disabled\", !0), t.attr(\"disabled\", !0)), o || g.lock(), -1 !== m.errors.indexOf(n) && delete m.errors[n], g._raise(\"filepreupload\", [s, w, r, g._getThumbFileId(l)]), L.extend(!0, y, s), g._abort(y) && (e.abort(), o || (g._setThumbStatus(l, \"New\"), l.removeClass(\"file-uploading\"), d.removeAttr(\"disabled\"), t.removeAttr(\"disabled\"), g.unlock()), g._setProgressCancelled())\r\n }, a = function (e, t, i) {\r\n var a = g.showPreview && l.attr(\"id\") ? l.attr(\"id\") : w;\r\n s = g._getOutData(v, i, e), L.extend(!0, y, s), setTimeout(function () {\r\n N.isEmpty(e) || N.isEmpty(e.error) ? (g.showPreview && (g._setThumbStatus(l, \"Success\"), d.hide(), g._initUploadSuccess(e, l, o), g._setProgress(101, u)), g._raise(\"fileuploaded\", [s, a, r, g._getThumbFileId(l)]), o ? f() : g.fileManager.remove(l)) : (c = !0, p = g._parseError(_, i, g.msgUploadError, g.fileManager.getFileName(n)), g._showFileError(p, y), g._setPreviewError(l, !0), g.retryErrorUploads || d.hide(), o && f(), g._setProgress(101, g._getFrame(a).find(\".file-thumb-progress\"), g.msgUploadError))\r\n }, g.processDelay)\r\n }, h = function () {\r\n g.showPreview && (d.removeAttr(\"disabled\"), t.removeAttr(\"disabled\"), l.removeClass(\"file-uploading\")), o ? e() : (g.unlock(!1), g._clearFileInput()), g._initSuccessThumbs()\r\n }, b = function (t, e, i) {\r\n p = g._parseError(_, t, i, g.fileManager.getFileName(n)), c = !0, setTimeout(function () {\r\n var e;\r\n o && f(), g.fileManager.setProgress(n, 100), g._setPreviewError(l, !0), g.retryErrorUploads || d.hide(), L.extend(!0, y, g._getOutData(v, t)), g._setProgress(101, g.$progress, g.msgAjaxProgressError.replace(\"{operation}\", _)), e = g.showPreview && l ? l.find(\".file-thumb-progress\") : \"\", g._setProgress(101, e, g.msgUploadError), g._showFileError(p, y)\r\n }, g.processDelay)\r\n }, g._setFileData(v, C.file, x, n), g._setUploadData(v, {fileId: n}), g._ajaxSubmit(i, a, h, b, v, n, r)))\r\n }, _setFileData: function (e, t, i, a) {\r\n var r = this.preProcessUpload;\r\n r && \"function\" == typeof r ? e.append(this.uploadFileAttr, r(a, t)) : e.append(this.uploadFileAttr, t, i)\r\n }, _uploadBatch: function () {\r\n var e, t, i, s, l, a, d = this, r = d.fileManager, n = r.total(),\r\n o = 0 < n || !L.isEmptyObject(d.uploadExtraData), c = new FormData, u = d.ajaxOperations.uploadBatch;\r\n 0 !== n && o && !d._abort({}) && (l = function () {\r\n d.fileManager.clear(), d._clearFileInput()\r\n }, e = function (e) {\r\n d.lock(), r.initStats();\r\n var t = d._getOutData(c, e);\r\n d.ajaxAborted = !1, d.showPreview && d._getThumbs().each(function () {\r\n var e = L(this), t = e.find(\".kv-file-upload\"), i = e.find(\".kv-file-remove\");\r\n e.hasClass(\"file-preview-success\") || (d._setThumbStatus(e, \"Loading\"), N.addCss(e, \"file-uploading\")), t.attr(\"disabled\", !0), i.attr(\"disabled\", !0)\r\n }), d._raise(\"filebatchpreupload\", [t]), d._abort(t) && (e.abort(), d._getThumbs().each(function () {\r\n var e = L(this), t = e.find(\".kv-file-upload\"), i = e.find(\".kv-file-remove\");\r\n e.hasClass(\"file-preview-loading\") && (d._setThumbStatus(e, \"New\"), e.removeClass(\"file-uploading\")), t.removeAttr(\"disabled\"), i.removeAttr(\"disabled\")\r\n }), d._setProgressCancelled())\r\n }, t = function (e, t, i) {\r\n var a = d._getOutData(c, i, e), r = 0, n = d._getThumbs(\":not(.file-preview-success)\"),\r\n o = N.isEmpty(e) || N.isEmpty(e.errorkeys) ? [] : e.errorkeys;\r\n N.isEmpty(e) || N.isEmpty(e.error) ? (d._raise(\"filebatchuploadsuccess\", [a]), l(), d.showPreview ? (n.each(function () {\r\n var e = L(this);\r\n d._setThumbStatus(e, \"Success\"), e.removeClass(\"file-uploading\"), e.find(\".kv-file-upload\").hide().removeAttr(\"disabled\")\r\n }), d._initUploadSuccess(e)) : d.reset(), d._setProgress(101)) : (d.showPreview && (n.each(function () {\r\n var e = L(this);\r\n e.removeClass(\"file-uploading\"), e.find(\".kv-file-upload\").removeAttr(\"disabled\"), e.find(\".kv-file-remove\").removeAttr(\"disabled\"), 0 === o.length || -1 !== L.inArray(r, o) ? (d._setPreviewError(e, !0), d.retryErrorUploads || (e.find(\".kv-file-upload\").hide(), d.fileManager.remove(e))) : (e.find(\".kv-file-upload\").hide(), d._setThumbStatus(e, \"Success\"), d.fileManager.remove(e)), e.hasClass(\"file-preview-error\") && !d.retryErrorUploads || r++\r\n }), d._initUploadSuccess(e)), s = d._parseError(u, i, d.msgUploadError), d._showFileError(s, a, \"filebatchuploaderror\"), d._setProgress(101, d.$progress, d.msgUploadError))\r\n }, i = function () {\r\n d.unlock(), d._initSuccessThumbs(), d._clearFileInput(), d._raise(\"filebatchuploadcomplete\", [d.fileManager.stack, d._getExtraData()])\r\n }, o = function (e, t, i) {\r\n var a = d._getOutData(c, e);\r\n s = d._parseError(u, e, i), d._showFileError(s, a, \"filebatchuploaderror\"), d.uploadFileCount = n - 1, d.showPreview && (d._getThumbs().each(function () {\r\n var e = L(this);\r\n e.removeClass(\"file-uploading\"), d._getThumbFile(e) && d._setPreviewError(e)\r\n }), d._getThumbs().removeClass(\"file-uploading\"), d._getThumbs(\" .kv-file-upload\").removeAttr(\"disabled\"), d._getThumbs(\" .kv-file-delete\").removeAttr(\"disabled\"), d._setProgress(101, d.$progress, d.msgAjaxProgressError.replace(\"{operation}\", u)))\r\n }, a = 0, L.each(d.fileManager.stack, function (e, t) {\r\n N.isEmpty(t.file) || d._setFileData(c, t.file, t.nameFmt || \"untitled_\" + a, e), a++\r\n }), d._ajaxSubmit(e, t, i, o, c))\r\n }, _uploadExtraOnly: function () {\r\n var e, t, i, a, r, n = this, o = {}, s = new FormData, l = n.ajaxOperations.uploadExtra;\r\n n._abort(o) || (e = function (e) {\r\n n.lock();\r\n var t = n._getOutData(s, e);\r\n n._raise(\"filebatchpreupload\", [t]), n._setProgress(50), o.data = t, o.xhr = e, n._abort(o) && (e.abort(), n._setProgressCancelled())\r\n }, t = function (e, t, i) {\r\n var a = n._getOutData(s, i, e);\r\n N.isEmpty(e) || N.isEmpty(e.error) ? (n._raise(\"filebatchuploadsuccess\", [a]), n._clearFileInput(), n._initUploadSuccess(e), n._setProgress(101)) : (r = n._parseError(l, i, n.msgUploadError), n._showFileError(r, a, \"filebatchuploaderror\"))\r\n }, i = function () {\r\n n.unlock(), n._clearFileInput(), n._raise(\"filebatchuploadcomplete\", [n.fileManager.stack, n._getExtraData()])\r\n }, a = function (e, t, i) {\r\n var a = n._getOutData(s, e);\r\n r = n._parseError(l, e, i), o.data = a, n._showFileError(r, a, \"filebatchuploaderror\"), n._setProgress(101, n.$progress, n.msgAjaxProgressError.replace(\"{operation}\", l))\r\n }, n._ajaxSubmit(e, t, i, a, s))\r\n }, _deleteFileIndex: function (e) {\r\n var t = this, i = e.attr(\"data-fileindex\"), e = t.reversePreviewOrder;\r\n i.substring(0, 5) === N.INIT_FLAG && (i = parseInt(i.replace(N.INIT_FLAG, \"\")), t.initialPreview = N.spliceArray(t.initialPreview, i, e), t.initialPreviewConfig = N.spliceArray(t.initialPreviewConfig, i, e), t.initialPreviewThumbTags = N.spliceArray(t.initialPreviewThumbTags, i, e), t.getFrames().each(function () {\r\n var e = L(this), t = e.attr(\"data-fileindex\");\r\n t.substring(0, 5) === N.INIT_FLAG && (t = parseInt(t.replace(N.INIT_FLAG, \"\")), i < t && (t--, e.attr(\"data-fileindex\", N.INIT_FLAG + t)))\r\n }))\r\n }, _resetCaption: function () {\r\n var r = this;\r\n setTimeout(function () {\r\n var e, t = r.previewCache.count(!0), i = r.fileManager.count(),\r\n a = r.showPreview && r.getFrames(\":not(.file-preview-success):not(.file-preview-error)\").length;\r\n 0 !== i || 0 !== t || a ? (e = 1 < (i = t + i) ? r._getMsgSelected(i) : (e = r.fileManager.getFirstFile()) ? e.nameFmt : \"_\", r._setCaption(e)) : r.reset()\r\n }, r.processDelay)\r\n }, _initFileActions: function () {\r\n var n = this;\r\n n.showPreview && (n._initZoomButton(), n.getFrames(\" .kv-file-remove\").each(function () {\r\n var e, t = L(this), i = t.closest(N.FRAMES), a = i.attr(\"id\"), r = i.attr(\"data-fileindex\");\r\n n._handler(t, \"click\", function () {\r\n return !(!1 === n._raise(\"filepreremove\", [a, r]) || !n._validateMinCount()) && (e = i.hasClass(\"file-preview-error\"), N.cleanMemory(i), void i.fadeOut(\"slow\", function () {\r\n n.fileManager.remove(i), n._clearObjects(i), i.remove(), a && e && n.$errorContainer.find('li[data-thumb-id=\"' + a + '\"]').fadeOut(\"fast\", function () {\r\n L(this).remove(), n._errorsExist() || n._resetErrors()\r\n }), n._clearFileInput(), n._resetCaption(), n._raise(\"fileremoved\", [a, r])\r\n }))\r\n })\r\n }), n.getFrames(\" .kv-file-upload\").each(function () {\r\n var i = L(this);\r\n n._handler(i, \"click\", function () {\r\n var e = i.closest(N.FRAMES), t = n._getThumbFileId(e);\r\n n._hideProgress(), e.hasClass(\"file-preview-error\") && !n.retryErrorUploads || n._uploadSingle(n.fileManager.getIndex(t), t, !1)\r\n })\r\n }))\r\n }, _initPreviewActions: function () {\r\n function g() {\r\n var e = m.isAjaxUpload ? m.previewCache.count(!0) : m._inputFileCount();\r\n m.getFrames().length || e || (m._setCaption(\"\"), m.reset(), m.initialCaption = \"\")\r\n }\r\n\r\n var m = this, e = m.$preview, h = m.deleteExtraData || {}, t = N.FRAMES + \" .kv-file-remove\",\r\n i = m.fileActionSettings, v = i.removeClass, w = i.removeErrorClass;\r\n m._initZoomButton(), e.find(t).each(function () {\r\n var r, e, n, t, i, o, s, a, l, d, c = L(this), u = c.data(\"url\") || m.deleteUrl, p = c.data(\"key\"),\r\n f = m.ajaxOperations.deleteThumb;\r\n N.isEmpty(u) || void 0 === p || (\"function\" == typeof u && (u = u()), n = c.closest(N.FRAMES), t = m.previewCache.data, s = n.attr(\"data-fileindex\"), s = parseInt(s.replace(N.INIT_FLAG, \"\")), a = N.isEmpty(t.config) && N.isEmpty(t.config[s]) ? null : t.config[s], l = N.isEmpty(a) || N.isEmpty(a.extra) ? h : a.extra, d = a && (a.filename || a.caption) || \"\", \"function\" == typeof l && (l = l()), o = {\r\n id: c.attr(\"id\"),\r\n key: p,\r\n extra: l\r\n }, e = function (e) {\r\n m.ajaxAborted = !1, m._raise(\"filepredelete\", [p, e, l]), m._abort() ? e.abort() : (c.removeClass(w), N.addCss(n, \"file-uploading\"), N.addCss(c, \"disabled \" + v))\r\n }, t = function (e, t, i) {\r\n var a;\r\n if (!N.isEmpty(e) && !N.isEmpty(e.error)) return o.jqXHR = i, o.response = e, r = m._parseError(f, i, m.msgDeleteError, d), m._showFileError(r, o, \"filedeleteerror\"), n.removeClass(\"file-uploading\"), c.removeClass(\"disabled \" + v).addClass(w), void g();\r\n n.removeClass(\"file-uploading\").addClass(\"file-deleted\"), n.fadeOut(\"slow\", function () {\r\n s = parseInt(n.attr(\"data-fileindex\").replace(N.INIT_FLAG, \"\")), m.previewCache.unset(s), m._deleteFileIndex(n), a = m.previewCache.count(!0), a = 0 < a ? m._getMsgSelected(a) : \"\", m._setCaption(a), m._raise(\"filedeleted\", [p, i, l]), m._clearObjects(n), n.remove(), g()\r\n })\r\n }, a = function (e, t, i) {\r\n i = m._parseError(f, e, i, d);\r\n o.jqXHR = e, o.response = {}, m._showFileError(i, o, \"filedeleteerror\"), n.removeClass(\"file-uploading\"), c.removeClass(\"disabled \" + v).addClass(w), g()\r\n }, m._initAjaxSettings(), m._mergeAjaxCallback(\"beforeSend\", e, \"delete\"), m._mergeAjaxCallback(\"success\", t, \"delete\"), m._mergeAjaxCallback(\"error\", a, \"delete\"), i = L.extend(!0, {}, {\r\n url: m._encodeURI(u),\r\n type: \"POST\",\r\n dataType: \"json\",\r\n data: L.extend(!0, {}, {key: p}, l)\r\n }, m._ajaxDeleteSettings), m._handler(c, \"click\", function () {\r\n return !!m._validateMinCount() && (m.ajaxAborted = !1, m._raise(\"filebeforedelete\", [p, l]), void (m.ajaxAborted instanceof Promise ? m.ajaxAborted.then(function (e) {\r\n e || L.ajax(i)\r\n }) : m.ajaxAborted || L.ajax(i)))\r\n }))\r\n })\r\n }, _hideFileIcon: function () {\r\n this.overwriteInitial && this.$captionContainer.removeClass(\"icon-visible\")\r\n }, _showFileIcon: function () {\r\n N.addCss(this.$captionContainer, \"icon-visible\")\r\n }, _getSize: function (e, t) {\r\n var i, a = parseFloat(e), r = this.fileSizeGetter;\r\n return L.isNumeric(e) && L.isNumeric(a) ? (i = \"function\" == typeof r ? r(a) : 0 === a ? \"0.00 B\" : (t = t || [\"B\", \"KB\", \"MB\", \"GB\", \"TB\", \"PB\", \"EB\", \"ZB\", \"YB\"], i = Math.floor(Math.log(a) / Math.log(1024)), (a / Math.pow(1024, i)).toFixed(2) + \" \" + t[i]), this._getLayoutTemplate(\"size\").replace(\"{sizeText}\", i)) : \"\"\r\n }, _getFileType: function (e) {\r\n return this.mimeTypeAliases[e] || e\r\n }, _generatePreviewTemplate: function (n, e, o, s, l, d, t, i, c, a, u, p, f, r) {\r\n var g = this, m = g.slug(o), h = \"\", v = \"\",\r\n w = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth, b = m, _ = m,\r\n C = \"type-default\", y = a || g._renderFileFooter(n, m, i, \"auto\", t), a = g.preferIconicPreview,\r\n i = g.preferIconicZoomPreview, t = a ? \"other\" : n,\r\n t = w < 400 ? g.previewSettingsSmall[t] || g.defaults.previewSettingsSmall[t] : g.previewSettings[t] || g.defaults.previewSettings[t];\r\n return t && L.each(t, function (e, t) {\r\n v += e + \":\" + t + \";\"\r\n }), t = function (e, t, i, a) {\r\n var r = i ? \"zoom-\" + l : l, e = g._getPreviewTemplate(e), a = (c || \"\") + \" \" + a;\r\n return g.frameClass && (a = g.frameClass + \" \" + a), i && (a = a.replace(\" \" + N.SORT_CSS, \"\")), e = g._parseFilePreviewIcon(e, o), \"object\" !== n || s || L.each(g.defaults.fileTypeSettings, function (e, t) {\r\n \"object\" !== e && \"other\" !== e && t(o, s) && (C = \"type-\" + e)\r\n }), N.isEmpty(f) || (void 0 !== f.title && null !== f.title && (b = f.title), void 0 !== f.alt && null !== f.alt && (b = f.alt)), e.setTokens({\r\n previewId: r,\r\n caption: m,\r\n title: b,\r\n alt: _,\r\n frameClass: a,\r\n type: g._getFileType(s),\r\n fileindex: u,\r\n fileid: d || \"\",\r\n typeCss: C,\r\n footer: y,\r\n data: t,\r\n template: p || n,\r\n style: v ? 'style=\"' + v + '\"' : \"\"\r\n })\r\n }, u = u || l.slice(l.lastIndexOf(\"-\") + 1), g.fileActionSettings.showZoom && (h = t(i ? \"other\" : n, r || e, !0, \"kv-zoom-thumb\")), h = \"\\n\" + g._getLayoutTemplate(\"zoomCache\").replace(\"{zoomContent}\", h), \"function\" == typeof g.sanitizeZoomCache && (h = g.sanitizeZoomCache(h)), t(a ? \"other\" : n, e, !1, \"kv-preview-thumb\").setTokens({zoomCache: h})\r\n }, _addToPreview: function (e, t) {\r\n return t = N.cspBuffer.stash(t), t = this.reversePreviewOrder ? e.prepend(t) : e.append(t), N.cspBuffer.apply(e), t\r\n }, _previewDefault: function (e, t) {\r\n var i, a, r, n, o, s, l, d = this, c = d.$preview;\r\n d.showPreview && (i = N.getFileName(e), a = e ? e.type : \"\", r = e.size || 0, n = d._getFileName(e, \"\"), o = !0 === t && !d.isAjaxUpload, s = N.createObjectURL(e), l = d.fileManager.getId(e), e = d._getThumbId(l), d._clearDefaultPreview(), o = d._generatePreviewTemplate(\"other\", s, i, a, e, l, o, r), d._addToPreview(c, o), d._setThumbAttr(e, n, r), !0 === t && d.isAjaxUpload && d._setThumbStatus(d._getFrame(e), \"Error\"))\r\n }, _previewFile: function (e, t, i, a, r) {\r\n var n, o, s, l, d, c, u;\r\n this.showPreview && (n = this, u = N.getFileName(t), o = r.type, s = r.name, l = n._parseFileType(o, u), d = n.$preview, c = t.size || 0, r = \"image\" === l ? i.target.result : a, i = n.fileManager.getId(t), a = n._getThumbId(i), u = n._generatePreviewTemplate(l, r, u, o, a, i, !1, c), n._clearDefaultPreview(), n._addToPreview(d, u), u = n._getFrame(a), n._validateImageOrientation(u.find(\"img\"), t, a, i, s, o, c, r), n._setThumbAttr(a, s, c), n._initSortable())\r\n }, _setThumbAttr: function (e, t, i) {\r\n e = this._getFrame(e);\r\n e.length && (i = i && 0 < i ? this._getSize(i) : \"\", e.data({caption: t, size: i}))\r\n }, _setInitThumbAttr: function () {\r\n var e, t, i, a = this.previewCache.data, r = this.previewCache.count(!0);\r\n if (0 !== r) for (var n = 0; n < r; n++) t = a.config[n], i = this.previewInitId + \"-\" + N.INIT_FLAG + n, e = N.ifSet(\"caption\", t, N.ifSet(\"filename\", t)), t = N.ifSet(\"size\", t), this._setThumbAttr(i, e, t)\r\n }, _slugDefault: function (e) {\r\n return N.isEmpty(e, !0) ? \"\" : String(e).replace(/[\\[\\]\\/\\{}:;#%=\\(\\)\\*\\+\\?\\\\\\^\\$\\|<>&\"']/g, \"_\")\r\n }, _updateFileDetails: function (e, t) {\r\n var i = this, a = i.$element, r = N.isIE(9) && N.findFileName(a.val()) || a[0].files[0] && a[0].files[0].name,\r\n n = !r && 0 < i.fileManager.count() ? i.fileManager.getFirstFile().nameFmt : r ? i.slug(r) : \"_\",\r\n a = i.isAjaxUpload ? i.fileManager.count() : e, r = i.previewCache.count(!0) + a,\r\n r = 1 === a ? n : i._getMsgSelected(r);\r\n i.isError ? (i.$previewContainer.removeClass(\"file-thumb-loading\"), i.$previewStatus.html(\"\"), i.$captionContainer.removeClass(\"icon-visible\")) : i._showFileIcon(), i._setCaption(r, i.isError), i.$container.removeClass(\"file-input-new file-input-ajax-new\"), t || i._raise(\"fileselect\", [e, n]), i.previewCache.count(!0) && i._initPreviewActions()\r\n }, _setThumbStatus: function (e, t) {\r\n var i, a, r, n, o;\r\n this.showPreview && (a = (i = \"indicator\" + t) + \"Title\", r = \"file-preview-\" + t.toLowerCase(), n = e.find(\".file-upload-indicator\"), o = this.fileActionSettings, e.removeClass(\"file-preview-success file-preview-error file-preview-paused file-preview-loading\"), \"Success\" === t && e.find(\".file-drag-handle\").remove(), N.setHtml(n, o[i]), n.attr(\"title\", o[a]), e.addClass(r), \"Error\" !== t || this.retryErrorUploads || e.find(\".kv-file-upload\").attr(\"disabled\", !0))\r\n }, _setProgressCancelled: function () {\r\n this._setProgress(101, this.$progress, this.msgCancelled)\r\n }, _setProgress: function (e, t, i, a) {\r\n var r, n, o, s = this;\r\n (t = t || s.$progress).length && (r = Math.min(e, 100), n = s.progressUploadThreshold, o = e <= 100 ? s.progressTemplate : s.progressCompleteTemplate, o = r < 100 ? s.progressTemplate : i ? s.paused ? s.progressPauseTemplate : s.progressErrorTemplate : o, 100 <= e && (a = \"\"), N.isEmpty(o) || (a = a || \"\", r = (r = n && n < r && e <= 100 ? o.setTokens({\r\n percent: n,\r\n status: s.msgUploadThreshold\r\n }) : o.setTokens({\r\n percent: r,\r\n status: 100 < e ? s.msgUploadEnd : r + \"%\"\r\n })).setTokens({stats: a}), N.setHtml(t, r), i && N.setHtml(t.find('[role=\"progressbar\"]'), i)))\r\n }, _hasFiles: function () {\r\n var e = this.$element[0];\r\n return !!(e && e.files && e.files.length)\r\n }, _setFileDropZoneTitle: function () {\r\n var e, t = this, i = t.$container.find(\".file-drop-zone\"), a = t.dropZoneTitle;\r\n t.isClickable && (e = N.isEmpty(t.$element.attr(\"multiple\")) ? t.fileSingle : t.filePlural, a += t.dropZoneClickTitle.replace(\"{files}\", e)), i.find(\".\" + t.dropZoneTitleClass).remove(), !t.showPreview || 0 === i.length || 0 < t.fileManager.count() || !t.dropZoneEnabled || 0 < t.previewCache.count() || !t.isAjaxUpload && t._hasFiles() || (0 === i.find(N.FRAMES).length && N.isEmpty(t.defaultPreviewContent) && i.prepend('
    ' + a + \"
    \"), t.$container.removeClass(\"file-input-new\"), N.addCss(t.$container, \"file-input-ajax-new\"))\r\n }, _getStats: function (e) {\r\n var t, i;\r\n return this.showUploadStats && e && e.bitrate ? (i = this._getLayoutTemplate(\"stats\"), t = e.elapsed && e.bps ? this.msgPendingTime.setTokens({time: N.getElapsed(Math.ceil(e.pendingBytes / e.bps))}) : this.msgCalculatingTime, i.setTokens({\r\n uploadSpeed: e.bitrate,\r\n pendingTime: t\r\n })) : \"\"\r\n }, _setResumableProgress: function (e, t, i) {\r\n var a = this.resumableManager, a = i ? a : this, i = i ? i.find(\".file-thumb-progress\") : null;\r\n 0 === a.lastProgress && (a.lastProgress = e), e < a.lastProgress && (e = a.lastProgress), this._setProgress(e, i, null, this._getStats(t)), a.lastProgress = e\r\n }, _toggleResumableProgress: function (e, t) {\r\n var i = this.$progress;\r\n i && i.length && N.setHtml(i, e.setTokens({percent: 101, status: t, stats: \"\"}))\r\n }, _setFileUploadStats: function (e, t, i) {\r\n var a, r, n, o, s, l, d, c, u, p = this, f = p.$progress;\r\n (p.showPreview || f && f.length) && (a = p.fileManager, u = p.resumableManager, r = a.getThumb(e), n = 0, o = a.getTotalSize(), s = L.extend(!0, {}, i), p.enableResumableUpload ? (l = i.loaded, d = u.getUploadedSize(), c = u.file.size, l += d, u = a.uploadedSize + l, t = N.round(100 * l / c), i.pendingBytes = c - d, p._setResumableProgress(t, i, r), d = Math.floor(100 * u / o), s.pendingBytes = o - u, p._setResumableProgress(d, s)) : (a.setProgress(e, t), f = r && r.length ? r.find(\".file-thumb-progress\") : null, p._setProgress(t, f, null, p._getStats(i)), L.each(a.stats, function (e, t) {\r\n n += t.loaded\r\n }), s.pendingBytes = o - n, d = N.round(n / o * 100), p._setProgress(d, null, null, p._getStats(s))))\r\n }, _validateMinCount: function () {\r\n var e = this, t = e.isAjaxUpload ? e.fileManager.count() : e._inputFileCount();\r\n return !(e.validateInitialCount && 0 < e.minFileCount && e._getFileCount(t - 1) < e.minFileCount) || (e._noFilesError({}), !1)\r\n }, _getFileCount: function (e, t) {\r\n return void 0 === t && (t = this.validateInitialCount && !this.overwriteInitial), t && (e += this.previewCache.count(!0)), e\r\n }, _getFileId: function (e) {\r\n return N.getFileId(e, this.generateFileId)\r\n }, _getFileName: function (e, t) {\r\n e = N.getFileName(e);\r\n return e ? this.slug(e) : t\r\n }, _getFileNames: function (t) {\r\n return this.filenames.filter(function (e) {\r\n return t ? void 0 !== e : null != e\r\n })\r\n }, _setPreviewError: function (e, t) {\r\n var i = this, a = i.removeFromPreviewOnError && !i.retryErrorUploads;\r\n t && !a || i.fileManager.remove(e), i.showPreview && (a ? e.remove() : (i._setThumbStatus(e, \"Error\"), i._refreshUploadButton(e)))\r\n }, _refreshUploadButton: function (e) {\r\n var t = e.find(\".kv-file-upload\"), i = this.fileActionSettings, a = i.uploadIcon, e = i.uploadTitle;\r\n t.length && (this.retryErrorUploads && (a = i.uploadRetryIcon, e = i.uploadRetryTitle), t.attr(\"title\", e), N.setHtml(t, a))\r\n }, _checkDimensions: function (e, t, i, a, r, n, o) {\r\n var s = this[(\"Small\" === t ? \"min\" : \"max\") + \"Image\" + n];\r\n !N.isEmpty(s) && i.length && (i = i[0], i = \"Width\" === n ? i.naturalWidth || i.width : i.naturalHeight || i.height, (\"Small\" === t ? s <= i : i <= s) || (s = this[\"msgImage\" + n + t].setTokens({\r\n name: r,\r\n size: s\r\n }), this._showFileError(s, o), this._setPreviewError(a)))\r\n }, _getExifObj: function (e) {\r\n var t, i = N.logMessages.exifWarning;\r\n if (\"data:image/jpeg;base64,\" === e.slice(0, 23) || \"data:image/jpg;base64,\" === e.slice(0, 22)) {\r\n try {\r\n t = window.piexif ? window.piexif.load(e) : null\r\n } catch (e) {\r\n t = null, i = e && e.message || \"\"\r\n }\r\n return t || this._log(N.logMessages.badExifParser, {details: i}), t\r\n }\r\n t = null\r\n }, setImageOrientation: function (o, s, l, d) {\r\n var c, u, p = this, e = !o || !o.length, t = !s || !s.length, f = !1,\r\n g = e && d && \"image\" === d.attr(\"data-template\");\r\n e && t || (t = \"load.fileinputimageorient\", g ? (o = s, s = null, o.css(p.previewSettings.image), u = L(document.createElement(\"div\")).appendTo(d.find(\".kv-file-content\")), c = L(document.createElement(\"span\")).insertBefore(o), o.css(\"visibility\", \"hidden\").removeClass(\"file-zoom-detail\").appendTo(u)) : f = !o.is(\":visible\"), o.off(t).on(t, function () {\r\n f && (p.$preview.removeClass(\"hide-content\"), d.find(\".kv-file-content\").css(\"visibility\", \"hidden\"));\r\n var e = o[0], t = s && s.length ? s[0] : null, i = e.offsetHeight, a = e.offsetWidth, r = N.getRotation(l);\r\n if (f && (d.find(\".kv-file-content\").css(\"visibility\", \"visible\"), p.$preview.addClass(\"hide-content\")), o.data(\"orientation\", l), t && s.data(\"orientation\", l), l < 5) return N.setTransform(e, r), void N.setTransform(t, r);\r\n var n = Math.atan(a / i), a = Math.sqrt(Math.pow(i, 2) + Math.pow(a, 2)),\r\n a = a ? i / Math.cos(Math.PI / 2 + n) / a : 1, a = \" scale(\" + Math.abs(a) + \")\";\r\n N.setTransform(e, r + a), N.setTransform(t, r + a), g && (o.css(\"visibility\", \"visible\").insertAfter(c).addClass(\"file-zoom-detail\"), c.remove(), u.remove())\r\n }))\r\n }, _validateImageOrientation: function (e, t, i, a, r, n, o, s) {\r\n var l, d = this, c = null, u = d.autoOrientImage;\r\n if (d.canOrientImage) return e.css(\"image-orientation\", u ? \"from-image\" : \"none\"), void d._validateImage(i, a, r, n, o, s, c);\r\n l = N.getZoomSelector(i, \" img\"), (u = (c = u ? d._getExifObj(s) : null) ? c[\"0th\"][piexif.ImageIFD.Orientation] : null) && (d.setImageOrientation(e, L(l), u, d._getFrame(i)), d._raise(\"fileimageoriented\", {\r\n $img: e,\r\n file: t\r\n })), d._validateImage(i, a, r, n, o, s, c)\r\n }, _validateImage: function (e, t, i, a, r, n, o) {\r\n var s, l = this, d = l.$preview, c = l._getFrame(e), u = c.attr(\"data-fileindex\"), p = c.find(\"img\");\r\n i = i || \"Untitled\", p.one(\"load\", function () {\r\n s = c.width(), d.width() < s && p.css(\"width\", \"100%\"), s = {\r\n ind: u,\r\n id: e,\r\n fileId: t\r\n }, l._checkDimensions(u, \"Small\", p, c, i, \"Width\", s), l._checkDimensions(u, \"Small\", p, c, i, \"Height\", s), l.resizeImage || (l._checkDimensions(u, \"Large\", p, c, i, \"Width\", s), l._checkDimensions(u, \"Large\", p, c, i, \"Height\", s)), l._raise(\"fileimageloaded\", [e]), l.fileManager.addImage(t, {\r\n ind: u,\r\n img: p,\r\n thumb: c,\r\n pid: e,\r\n typ: a,\r\n siz: r,\r\n validated: !1,\r\n imgData: n,\r\n exifObj: o\r\n }), c.data(\"exif\", o), l._validateAllImages()\r\n }).one(\"error\", function () {\r\n l._raise(\"fileimageloaderror\", [e])\r\n }).each(function () {\r\n this.complete ? L(this).trigger(\"load\") : this.error && L(this).trigger(\"error\")\r\n })\r\n }, _validateAllImages: function () {\r\n var i, a = this, r = {val: 0}, n = a.fileManager.getImageCount(), o = a.resizeIfSizeMoreThan;\r\n n === a.fileManager.totalImages && (a._raise(\"fileimagesloaded\"), a.resizeImage && L.each(a.fileManager.loadedImages, function (e, t) {\r\n t.validated || ((i = t.siz) && 1e3 * o < i && a._getResizedImage(e, t, r, n), t.validated = !0)\r\n }))\r\n }, _getResizedImage: function (e, t, i, a) {\r\n var r, n, o = this, s = L(t.img)[0], l = s.naturalWidth, d = s.naturalHeight, c = 1, u = o.maxImageWidth || l,\r\n p = o.maxImageHeight || d, f = !(!l || !d), g = o.imageCanvas, m = o.imageCanvasContext, h = t.typ, v = t.pid,\r\n w = t.ind, b = t.thumb, _ = t.exifObj, C = function (e, t, i) {\r\n o.isAjaxUpload ? o._showFileError(e, t, i) : o._showError(e, t, i), o._setPreviewError(b)\r\n }, t = o.fileManager.getFile(e), y = {id: v, index: w, fileId: e}, x = [e, v, w];\r\n if (t && f && !(l <= u && d <= p) || (f && t && o._raise(\"fileimageresized\", x), i.val++, i.val === a && o._raise(\"fileimagesresized\"), f)) {\r\n h = h || o.resizeDefaultImageType, t = u < l, f = p < d, c = \"width\" === o.resizePreference ? t ? u / l : f ? p / d : 1 : f ? p / d : t ? u / l : 1, o._resetCanvas(), l *= c, d *= c, g.width = l, g.height = d;\r\n try {\r\n m.drawImage(s, 0, 0, l, d), r = g.toDataURL(h, o.resizeQuality), _ && (n = window.piexif.dump(_), r = window.piexif.insert(n, r)), r = N.dataURI2Blob(r), o.fileManager.setFile(e, r), o._raise(\"fileimageresized\", x), i.val++, i.val === a && o._raise(\"fileimagesresized\", [void 0, void 0]), r instanceof Blob || C(o.msgImageResizeError, y, \"fileimageresizeerror\")\r\n } catch (e) {\r\n i.val++, i.val === a && o._raise(\"fileimagesresized\", [void 0, void 0]), C(o.msgImageResizeException.replace(\"{errors}\", e.message), y, \"fileimageresizeexception\")\r\n }\r\n } else C(o.msgImageResizeError, y, \"fileimageresizeerror\")\r\n }, _showProgress: function () {\r\n this.$progress && this.$progress.length && this.$progress.show()\r\n }, _hideProgress: function () {\r\n this.$progress && this.$progress.length && this.$progress.hide()\r\n }, _initBrowse: function (e) {\r\n var t = this.$element;\r\n this.showBrowse ? this.$btnFile = e.find(\".btn-file\").append(t) : (t.appendTo(e).attr(\"tabindex\", -1), N.addCss(t, \"file-no-browse\"))\r\n }, _initClickable: function () {\r\n var t, e, i = this;\r\n i.isClickable && (t = i.$dropZone, i.isAjaxUpload || (e = i.$preview.find(\".file-default-preview\")).length && (t = e), N.addCss(t, \"clickable\"), t.attr(\"tabindex\", -1), i._handler(t, \"click\", function (e) {\r\n e = L(e.target);\r\n i.$errorContainer.is(\":visible\") || e.parents(\".file-preview-thumbnails\").length && !e.parents(\".file-default-preview\").length || (i.$element.data(\"zoneClicked\", !0).trigger(\"click\"), t.blur())\r\n }))\r\n }, _initCaption: function () {\r\n var e = this.initialCaption || \"\";\r\n return this.overwriteInitial || N.isEmpty(e) ? (this.$caption.val(\"\"), !1) : (this._setCaption(e), !0)\r\n }, _setCaption: function (e, t) {\r\n var i, a, r, n = this;\r\n if (n.$caption.length) {\r\n if (n.$captionContainer.removeClass(\"icon-visible\"), t) i = L(\"
    \" + n.msgValidationError + \"
    \").text(), r = (a = n.fileManager.count()) ? (r = n.fileManager.getFirstFile(), 1 === a && r ? r.nameFmt : n._getMsgSelected(a)) : n._getMsgSelected(n.msgNo), a = N.isEmpty(e) ? r : e, r = '' + n.msgValidationErrorIcon + \"\"; else {\r\n if (N.isEmpty(e)) return;\r\n a = i = L(\"
    \" + e + \"
    \").text(), r = n._getLayoutTemplate(\"fileIcon\")\r\n }\r\n n.$captionContainer.addClass(\"icon-visible\"), n.$caption.attr(\"title\", i).val(a), N.setHtml(n.$captionIcon, r)\r\n }\r\n }, _createContainer: function () {\r\n var e = this, t = {class: \"file-input file-input-new\" + (e.rtl ? \" kv-rtl\" : \"\")},\r\n i = N.createElement(N.cspBuffer.stash(e._renderMain()));\r\n return N.cspBuffer.apply(i), i.insertBefore(e.$element).attr(t), e._initBrowse(i), e.theme && i.addClass(\"theme-\" + e.theme), i\r\n }, _refreshContainer: function () {\r\n var e = this, t = e.$container;\r\n e.$element.insertAfter(t), N.setHtml(t, e._renderMain()), e._initBrowse(t), e._validateDisabled()\r\n }, _validateDisabled: function () {\r\n this.$caption.attr({readonly: this.isDisabled})\r\n }, _renderMain: function () {\r\n var e = this, t = e.dropZoneEnabled ? \" file-drop-zone\" : \"file-drop-disabled\",\r\n i = e.showClose ? e._getLayoutTemplate(\"close\") : \"\",\r\n a = e.showPreview ? e._getLayoutTemplate(\"preview\").setTokens({class: e.previewClass, dropClass: t}) : \"\",\r\n t = e.isDisabled ? e.captionClass + \" file-caption-disabled\" : e.captionClass,\r\n t = e.captionTemplate.setTokens({class: t + \" kv-fileinput-caption\"});\r\n return e.mainTemplate.setTokens({\r\n class: e.mainClass + (!e.showBrowse && e.showCaption ? \" no-browse\" : \"\"),\r\n preview: a,\r\n close: i,\r\n caption: t,\r\n upload: e._renderButton(\"upload\"),\r\n remove: e._renderButton(\"remove\"),\r\n cancel: e._renderButton(\"cancel\"),\r\n pause: e._renderButton(\"pause\"),\r\n browse: e._renderButton(\"browse\")\r\n })\r\n }, _renderButton: function (e) {\r\n var t = this, i = t._getLayoutTemplate(\"btnDefault\"), a = t[e + \"Class\"], r = t[e + \"Title\"], n = t[e + \"Icon\"],\r\n o = t[e + \"Label\"], s = t.isDisabled ? \" disabled\" : \"\", l = \"button\";\r\n switch (e) {\r\n case\"remove\":\r\n if (!t.showRemove) return \"\";\r\n break;\r\n case\"cancel\":\r\n if (!t.showCancel) return \"\";\r\n a += \" kv-hidden\";\r\n break;\r\n case\"pause\":\r\n if (!t.showPause) return \"\";\r\n a += \" kv-hidden\";\r\n break;\r\n case\"upload\":\r\n if (!t.showUpload) return \"\";\r\n t.isAjaxUpload && !t.isDisabled ? i = t._getLayoutTemplate(\"btnLink\").replace(\"{href}\", t.uploadUrl) : l = \"submit\";\r\n break;\r\n case\"browse\":\r\n if (!t.showBrowse) return \"\";\r\n i = t._getLayoutTemplate(\"btnBrowse\");\r\n break;\r\n default:\r\n return \"\"\r\n }\r\n return a += \"browse\" === e ? \" btn-file\" : \" fileinput-\" + e + \" fileinput-\" + e + \"-button\", N.isEmpty(o) || (o = ' ' + o + \"\"), i.setTokens({\r\n type: l,\r\n css: a,\r\n title: r,\r\n status: s,\r\n icon: n,\r\n label: o\r\n })\r\n }, _renderThumbProgress: function () {\r\n return '
    ' + this.progressInfoTemplate.setTokens({\r\n percent: 101,\r\n status: this.msgUploadBegin,\r\n stats: \"\"\r\n }) + \"
    \"\r\n }, _renderFileFooter: function (e, t, i, a, r) {\r\n var n = this, o = n.fileActionSettings, s = o.showRemove, l = o.showDrag, d = o.showUpload, c = o.showZoom,\r\n u = n._getLayoutTemplate(\"footer\"), p = n._getLayoutTemplate(\"indicator\"),\r\n f = r ? o.indicatorError : o.indicatorNew, o = r ? o.indicatorErrorTitle : o.indicatorNewTitle,\r\n o = p.setTokens({indicator: f, indicatorTitle: o}),\r\n o = {type: e, caption: t, size: i = n._getSize(i), width: a, progress: \"\", indicator: o};\r\n return n.isAjaxUpload ? (o.progress = n._renderThumbProgress(), o.actions = n._renderFileActions(o, d, !1, s, c, l, !1, !1, !1)) : o.actions = n._renderFileActions(o, !1, !1, !1, c, l, !1, !1, !1), o = u.setTokens(o), o = N.replaceTags(o, n.previewThumbTags)\r\n }, _renderFileActions: function (e, t, i, a, r, n, o, s, l, d, c, u) {\r\n var p = this;\r\n if (!e.type && d && (e.type = \"image\"), p.enableResumableUpload ? t = !1 : \"function\" == typeof t && (t = t(e)), \"function\" == typeof i && (i = i(e)), \"function\" == typeof a && (a = a(e)), \"function\" == typeof r && (r = r(e)), \"function\" == typeof n && (n = n(e)), !(t || i || a || r || n)) return \"\";\r\n var f = !1 === s ? \"\" : ' data-url=\"' + s + '\"', g = \"\", m = \"\", h = !1 === l ? \"\" : ' data-key=\"' + l + '\"',\r\n v = \"\", w = \"\", b = \"\", _ = p._getLayoutTemplate(\"actions\"), e = p.fileActionSettings,\r\n s = p.otherActionButtons.setTokens({dataKey: h, key: l}), o = o ? e.removeClass + \" disabled\" : e.removeClass;\r\n return a && (v = p._getLayoutTemplate(\"actionDelete\").setTokens({\r\n removeClass: o,\r\n removeIcon: e.removeIcon,\r\n removeTitle: e.removeTitle,\r\n dataUrl: f,\r\n dataKey: h,\r\n key: l\r\n })), t && (w = p._getLayoutTemplate(\"actionUpload\").setTokens({\r\n uploadClass: e.uploadClass,\r\n uploadIcon: e.uploadIcon,\r\n uploadTitle: e.uploadTitle\r\n })), i && (b = (b = p._getLayoutTemplate(\"actionDownload\").setTokens({\r\n downloadClass: e.downloadClass,\r\n downloadIcon: e.downloadIcon,\r\n downloadTitle: e.downloadTitle,\r\n downloadUrl: c || p.initialPreviewDownloadUrl\r\n })).setTokens({\r\n filename: u,\r\n key: l\r\n })), r && (g = p._getLayoutTemplate(\"actionZoom\").setTokens({\r\n zoomClass: e.zoomClass,\r\n zoomIcon: e.zoomIcon,\r\n zoomTitle: e.zoomTitle\r\n })), n && d && (d = \"drag-handle-init \" + e.dragClass, m = p._getLayoutTemplate(\"actionDrag\").setTokens({\r\n dragClass: d,\r\n dragTitle: e.dragTitle,\r\n dragIcon: e.dragIcon\r\n })), _.setTokens({delete: v, upload: w, download: b, zoom: g, drag: m, other: s})\r\n }, _browse: function (e) {\r\n var t = this;\r\n e && e.isDefaultPrevented() || !t._raise(\"filebrowse\") || (t.isError && !t.isAjaxUpload && t.clear(), t.focusCaptionOnBrowse && t.$captionContainer.focus())\r\n }, _change: function (e) {\r\n var n = this;\r\n if (!n.changeTriggered) {\r\n var t = n.$element, i = 1 < arguments.length, o = n.isAjaxUpload, s = i ? arguments[1] : t[0].files,\r\n a = n.fileManager.count(), r = N.isEmpty(t.attr(\"multiple\")), l = !o && r ? 1 : n.maxFileCount,\r\n d = n.maxTotalFileCount, c = 0 < d && l < d, u = r && 0 < a, p = function (e, t, i) {\r\n var a, r = (r = i ? n.msgTotalFilesTooMany : n.msgFilesTooMany).replace(\"{m}\", t).replace(\"{n}\", e);\r\n n.isError = (a = r, e = t = i = null, r = L.extend(!0, {}, n._getOutData(null, {}, {}, s), {\r\n id: t,\r\n index: e\r\n }), i = {\r\n id: t,\r\n index: e,\r\n file: i,\r\n files: s\r\n }, n.isPersistentError = !0, o ? n._showFileError(a, r) : n._showError(a, i)), n.$captionContainer.removeClass(\"icon-visible\"), n._setCaption(\"\", !0), n.$container.removeClass(\"file-input-new file-input-ajax-new\")\r\n };\r\n if (n.reader = null, n._resetUpload(), n._hideFileIcon(), n.dropZoneEnabled && n.$container.find(\".file-drop-zone .\" + n.dropZoneTitleClass).remove(), o || (s = e.target && void 0 === e.target.files ? e.target.value ? [{name: e.target.value.replace(/^.+\\\\/, \"\")}] : [] : e.target.files || {}), i = s, N.isEmpty(i) || 0 === i.length) return o || n.clear(), void n._raise(\"fileselectnone\");\r\n if (n._resetErrors(), t = i.length, r = o ? n.fileManager.count() + t : t, e = n._getFileCount(r, !c && void 0), 0 < l && l < e) {\r\n if (!n.autoReplace || l < t) return void p(n.autoReplace && l < t ? t : e, l);\r\n l < e && n._resetPreviewThumbs(o)\r\n } else {\r\n if (c && (e = n._getFileCount(r, !0), 0 < d && d < e)) {\r\n if (!n.autoReplace || l < t) return void p(n.autoReplace && d < t ? t : e, d, !0);\r\n l < e && n._resetPreviewThumbs(o)\r\n }\r\n !o || u ? (n._resetPreviewThumbs(!1), u && n.clearFileStack()) : !o || 0 !== a || n.previewCache.count(!0) && !n.overwriteInitial || n._resetPreviewThumbs(!0)\r\n }\r\n n.readFiles(i)\r\n }\r\n }, _abort: function (e) {\r\n var t = this;\r\n return t.ajaxAborted && \"object\" == typeof t.ajaxAborted && void 0 !== t.ajaxAborted.message ? ((e = L.extend(!0, {}, t._getOutData(null), e)).abortData = t.ajaxAborted.data || {}, e.abortMessage = t.ajaxAborted.message, t._setProgress(101, t.$progress, t.msgCancelled), t._showFileError(t.ajaxAborted.message, e, \"filecustomerror\"), t.cancel(), !0) : !!t.ajaxAborted\r\n }, _resetFileStack: function () {\r\n var a = this, r = 0;\r\n a._getThumbs().each(function () {\r\n var e = L(this), t = e.attr(\"data-fileindex\"), i = e.attr(\"id\");\r\n \"-1\" !== t && -1 !== t && (a._getThumbFile(e) ? e.attr({\"data-fileindex\": \"-1\"}) : (e.attr({\"data-fileindex\": r}), r++), a._getZoom(i).attr({\"data-fileindex\": e.attr(\"data-fileindex\")}))\r\n })\r\n }, _isFileSelectionValid: function (e) {\r\n var t = this;\r\n return e = e || 0, t.required && !t.getFilesCount() ? (t.$errorContainer.html(\"\"), t._showFileError(t.msgFileRequired), !1) : !(0 < t.minFileCount && t._getFileCount(e) < t.minFileCount) || (t._noFilesError({}), !1)\r\n }, _canPreview: function (e) {\r\n var t = this;\r\n if (!(e && t.showPreview && t.$preview && t.$preview.length)) return !1;\r\n var i = e.name || \"\", a = e.type || \"\", r = (e.size || 0) / 1e3, n = t._parseFileType(a, i),\r\n o = t.allowedPreviewTypes, s = t.allowedPreviewMimeTypes, l = t.allowedPreviewExtensions || [],\r\n d = t.disabledPreviewTypes, c = t.disabledPreviewMimeTypes, u = t.disabledPreviewExtensions || [],\r\n p = t.maxFilePreviewSize && parseFloat(t.maxFilePreviewSize) || 0,\r\n e = new RegExp(\"\\\\.(\" + l.join(\"|\") + \")$\", \"i\"), t = new RegExp(\"\\\\.(\" + u.join(\"|\") + \")$\", \"i\"),\r\n o = !o || -1 !== o.indexOf(n), s = !s || -1 !== s.indexOf(a), e = !l.length || N.compare(i, e);\r\n return !(d && -1 !== d.indexOf(n) || c && -1 !== c.indexOf(a) || u.length && N.compare(i, t) || p && !isNaN(p) && p < r) && (o || s || e)\r\n }, addToStack: function (e, t) {\r\n this.fileManager.add(e, t)\r\n }, clearFileStack: function () {\r\n var e = this;\r\n return e.fileManager.clear(), e._initResumableUpload(), e.enableResumableUpload ? (null === e.showPause && (e.showPause = !0), null === e.showCancel && (e.showCancel = !1)) : (e.showPause = !1, null === e.showCancel && (e.showCancel = !0)), e.$element\r\n }, getFileStack: function () {\r\n return this.fileManager.stack\r\n }, getFileList: function () {\r\n return this.fileManager.list()\r\n }, getFilesSize: function () {\r\n return this.fileManager.getTotalSize()\r\n }, getFilesCount: function (e) {\r\n var t = this, i = t.isAjaxUpload ? t.fileManager.count() : t._inputFileCount();\r\n return e && (i += t.previewCache.count(!0)), t._getFileCount(i)\r\n }, readFiles: function (P) {\r\n this.reader = new FileReader;\r\n\r\n function F(e, t, i, a, r) {\r\n var n = L.extend(!0, {}, E._getOutData(null, {}, {}, P), {id: i, index: a, fileId: r}),\r\n r = {id: i, index: a, fileId: r, file: t, files: P};\r\n E._previewDefault(t, !0), i = E._getFrame(i, !0), E.isAjaxUpload ? setTimeout(function () {\r\n k(a + 1)\r\n }, E.processDelay) : (E.unlock(), U = 0), E.removeFromPreviewOnError && i.length ? i.remove() : (E._initFileActions(), i.find(\".kv-file-upload\").remove()), E.isPersistentError = !0, E.isError = E.isAjaxUpload ? E._showFileError(e, n) : E._showError(e, r), E._updateFileDetails(U)\r\n }\r\n\r\n var k, E = this, S = E.reader, I = E.$previewContainer, A = E.$previewStatus, D = E.msgLoading, z = E.msgProgress,\r\n j = E.previewInitId, U = P.length, M = E.fileTypeSettings, $ = E.allowedFileTypes, R = $ ? $.length : 0,\r\n O = E.allowedFileExtensions, B = N.isEmpty(O) ? \"\" : O.join(\", \");\r\n E.fileManager.clearImages(), L.each(P, function (e, t) {\r\n var i = E.fileTypeSettings.image;\r\n i && i(t.type) && E.fileManager.totalImages++\r\n }), (k = function (d) {\r\n var e = E.$errorContainer, t = E.fileManager;\r\n if (U <= d) return E.unlock(), E.duplicateErrors.length && (x = \"
  • \" + E.duplicateErrors.join(\"
  • \") + \"
  • \", 0 === e.find(\"ul\").length ? N.setHtml(e, E.errorCloseButton + \"
      \" + x + \"
    \") : e.find(\"ul\").append(x), e.fadeIn(E.fadeDelay), E._handler(e.find(\".kv-error-close\"), \"click\", function () {\r\n e.fadeOut(E.fadeDelay)\r\n }), E.duplicateErrors = []), E.isAjaxUpload ? (E._raise(\"filebatchselected\", [t.stack]), 0 !== t.count() || E.isError || E.reset()) : E._raise(\"filebatchselected\", [P]), I.removeClass(\"file-thumb-loading\"), void A.html(\"\");\r\n E.lock(!0);\r\n\r\n function c() {\r\n var e = z.setTokens({index: d + 1, files: U, percent: 50, name: m});\r\n setTimeout(function () {\r\n A.html(e), E._updateFileDetails(U), k(d + 1)\r\n }, E.processDelay), E._raise(\"fileloaded\", [f, l, s, d, S]) && E.isAjaxUpload && t.add(f)\r\n }\r\n\r\n var i, u, a, r, n, o, p, f = P[d], s = E._getFileId(f), l = j + \"-\" + s, g = M.image, m = E._getFileName(f, \"\"),\r\n h = (f && f.size || 0) / 1e3, v = \"\", w = N.createObjectURL(f), b = 0, _ = \"\", C = !1, y = 0;\r\n if (f) {\r\n if (r = t.getId(f), 0 < R) for (u = 0; u < R; u++) a = $[u], a = E.msgFileTypes[a] || a, _ += 0 === u ? a : \", \" + a;\r\n if (!1 !== m) {\r\n if (0 === m.length) return T = E.msgInvalidFileName.replace(\"{name}\", N.htmlEncode(N.getFileName(f), \"[unknown]\")), void F(T, f, l, d, r);\r\n if (N.isEmpty(O) || (v = new RegExp(\"\\\\.(\" + O.join(\"|\") + \")$\", \"i\")), i = h.toFixed(2), E.isAjaxUpload && t.exists(r) || E._getFrame(l, !0).length) {\r\n var x = {id: l, index: d, fileId: r, file: f, files: P},\r\n T = E.msgDuplicateFile.setTokens({name: m, size: i});\r\n return E.isAjaxUpload ? (E.duplicateErrors.push(T), E.isDuplicateError = !0, E._raise(\"fileduplicateerror\", [f, r, m, i, l, d]), k(d + 1)) : (E._showError(T, x), E.unlock(), U = 0, E._clearFileInput(), E.reset()), void E._updateFileDetails(U)\r\n }\r\n if (0 < E.maxFileSize && h > E.maxFileSize) return T = E.msgSizeTooLarge.setTokens({\r\n name: m,\r\n size: i,\r\n maxSize: E.maxFileSize\r\n }), void F(T, f, l, d, r);\r\n if (null !== E.minFileSize && h <= N.getNum(E.minFileSize)) return T = E.msgSizeTooSmall.setTokens({\r\n name: m,\r\n size: i,\r\n minSize: E.minFileSize\r\n }), void F(T, f, l, d, r);\r\n if (!N.isEmpty($) && N.isArray($)) {\r\n for (u = 0; u < $.length; u += 1) o = $[u], b += (o = M[o]) && \"function\" == typeof o && o(f.type, N.getFileName(f)) ? 1 : 0;\r\n if (0 === b) return T = E.msgInvalidFileType.setTokens({name: m, types: _}), void F(T, f, l, d, r)\r\n }\r\n return 0 !== b || N.isEmpty(O) || !N.isArray(O) || N.isEmpty(v) || (v = N.compare(m, v), 0 !== (b += N.isEmpty(v) ? 0 : v.length)) ? E._canPreview(f) ? (p = g(f.type, m), A.html(D.replace(\"{index}\", d + 1).replace(\"{files}\", U)), I.addClass(\"file-thumb-loading\"), S.onerror = function (e) {\r\n E._errorHandler(e, m)\r\n }, S.onload = function (e) {\r\n var t, i, a, r, n, o, s = [], l = {name: m, type: f.type};\r\n if (L.each(M, function (e, t) {\r\n \"object\" !== e && \"other\" !== e && \"function\" == typeof t && t(f.type, m) && y++\r\n }), 0 === y) {\r\n for (i = new Uint8Array(e.target.result), u = 0; u < i.length; u++) a = i[u].toString(16), s.push(a);\r\n if (t = s.join(\"\").toLowerCase().substring(0, 8), n = N.getMimeType(t, \"\", \"\"), N.isEmpty(n) && (r = N.arrayBuffer2String(S.result), n = N.isSvg(r) ? \"image/svg+xml\" : N.getMimeType(t, r, f.type)), l = {\r\n name: m,\r\n type: n\r\n }, p = g(n, \"\")) return (o = new FileReader).onerror = function (e) {\r\n E._errorHandler(e, m)\r\n }, o.onload = function (e) {\r\n if (E.isAjaxUpload && !E._raise(\"filebeforeload\", [f, d, S])) return C = !0, E._resetCaption(), S.abort(), A.html(\"\"), I.removeClass(\"file-thumb-loading\"), void E.enable();\r\n E._previewFile(d, f, e, w, l), E._initFileActions(), c()\r\n }, void o.readAsDataURL(f)\r\n }\r\n if (E.isAjaxUpload && !E._raise(\"filebeforeload\", [f, d, S])) return C = !0, E._resetCaption(), S.abort(), A.html(\"\"), I.removeClass(\"file-thumb-loading\"), void E.enable();\r\n E._previewFile(d, f, e, w, l), E._initFileActions(), c()\r\n }, S.onprogress = function (e) {\r\n e.lengthComputable && (e = e.loaded / e.total * 100, e = Math.ceil(e), T = z.setTokens({\r\n index: d + 1,\r\n files: U,\r\n percent: e,\r\n name: m\r\n }), setTimeout(function () {\r\n C || A.html(T)\r\n }, E.processDelay))\r\n }, void (p ? S.readAsDataURL(f) : S.readAsArrayBuffer(f))) : (n = E.isAjaxUpload && E._raise(\"filebeforeload\", [f, d, S]), E.isAjaxUpload && n && t.add(f), E.showPreview && n && (I.addClass(\"file-thumb-loading\"), E._previewDefault(f), E._initFileActions()), void setTimeout(function () {\r\n n && E._updateFileDetails(U), k(d + 1), E._raise(\"fileloaded\", [f, l, s, d])\r\n }, 10)) : (T = E.msgInvalidFileExtension.setTokens({name: m, extensions: B}), void F(T, f, l, d, r))\r\n }\r\n k(d + 1)\r\n }\r\n })(0), E._updateFileDetails(U, !0)\r\n }, lock: function (e) {\r\n var t = this, i = t.$container;\r\n return t._resetErrors(), t.disable(), !e && t.showCancel && i.find(\".fileinput-cancel\").show(), !e && t.showPause && i.find(\".fileinput-pause\").show(), t._raise(\"filelock\", [t.fileManager.stack, t._getExtraData()]), t.$element\r\n }, unlock: function (e) {\r\n var t = this, i = t.$container;\r\n return void 0 === e && (e = !0), t.enable(), i.removeClass(\"is-locked\"), t.showCancel && i.find(\".fileinput-cancel\").hide(), t.showPause && i.find(\".fileinput-pause\").hide(), e && t._resetFileStack(), t._raise(\"fileunlock\", [t.fileManager.stack, t._getExtraData()]), t.$element\r\n }, resume: function () {\r\n var e = this, t = e.fileManager, i = !1, a = e.resumableManager;\r\n return t.bpsLog = [], t.bps = 0, e.enableResumableUpload && (e.paused ? e._toggleResumableProgress(e.progressPauseTemplate, e.msgUploadResume) : i = !0, e.paused = !1, i && e._toggleResumableProgress(e.progressInfoTemplate, e.msgUploadBegin), setTimeout(function () {\r\n a.upload()\r\n }, e.processDelay)), e.$element\r\n }, pause: function () {\r\n var e, a = this, t = a.resumableManager, i = a.ajaxRequests, r = i.length, n = t.getProgress(),\r\n o = a.fileActionSettings, s = a.taskManager.getPool(t.id);\r\n if (!a.enableResumableUpload) return a.$element;\r\n if (s && s.cancel(), a._raise(\"fileuploadpaused\", [a.fileManager, t]), 0 < r) for (e = 0; e < r; e += 1) a.paused = !0, i[e].abort();\r\n return a.showPreview && a._getThumbs().each(function () {\r\n var e = L(this), t = a._getLayoutTemplate(\"stats\"), i = e.find(\".file-upload-indicator\");\r\n e.removeClass(\"file-uploading\"), i.attr(\"title\") === o.indicatorLoadingTitle && (a._setThumbStatus(e, \"Paused\"), t = t.setTokens({\r\n pendingTime: a.msgPaused,\r\n uploadSpeed: \"\"\r\n }), a.paused = !0, a._setProgress(n, e.find(\".file-thumb-progress\"), n + \"%\", t)), a._getThumbFile(e) || e.find(\".kv-file-remove\").removeClass(\"disabled\").removeAttr(\"disabled\")\r\n }), a._setProgress(101, a.$progress, a.msgPaused), a.$element\r\n }, cancel: function () {\r\n var e, i = this, t = i.ajaxRequests, a = i.resumableManager, r = i.taskManager, r = a ? r.getPool(a.id) : void 0,\r\n n = t.length;\r\n if (i.enableResumableUpload && r ? (r.cancel().done(function () {\r\n i._setProgressCancelled()\r\n }), a.reset(), i._raise(\"fileuploadcancelled\", [i.fileManager, a])) : i._raise(\"fileuploadcancelled\", [i.fileManager]), i._initAjax(), 0 < n) for (e = 0; e < n; e += 1) i.cancelling = !0, t[e].abort();\r\n return i._getThumbs().each(function () {\r\n var e = L(this), t = e.find(\".file-thumb-progress\");\r\n e.removeClass(\"file-uploading\"), i._setProgress(0, t), t.hide(), i._getThumbFile(e) || (e.find(\".kv-file-upload\").removeClass(\"disabled\").removeAttr(\"disabled\"), e.find(\".kv-file-remove\").removeClass(\"disabled\").removeAttr(\"disabled\")), i.unlock()\r\n }), setTimeout(function () {\r\n i._setProgressCancelled()\r\n }, i.processDelay), i.$element\r\n }, clear: function () {\r\n var e, t = this;\r\n if (t._raise(\"fileclear\")) return t.$btnUpload.removeAttr(\"disabled\"), t._getThumbs().find(\"video,audio,img\").each(function () {\r\n N.cleanMemory(L(this))\r\n }), t._clearFileInput(), t._resetUpload(), t.clearFileStack(), t.isDuplicateError = !1, t.isPersistentError = !1, t._resetErrors(!0), t._hasInitialPreview() ? (t._showFileIcon(), t._resetPreview(), t._initPreviewActions(), t.$container.removeClass(\"file-input-new\")) : (t._getThumbs().each(function () {\r\n t._clearObjects(L(this))\r\n }), t.isAjaxUpload && (t.previewCache.data = {}), t.$preview.html(\"\"), e = !t.overwriteInitial && 0 < t.initialCaption.length ? t.initialCaption : \"\", t.$caption.attr(\"title\", \"\").val(e), N.addCss(t.$container, \"file-input-new\"), t._validateDefaultPreview()), 0 === t.$container.find(N.FRAMES).length && (t._initCaption() || t.$captionContainer.removeClass(\"icon-visible\")), t._hideFileIcon(), t.focusCaptionOnClear && t.$captionContainer.focus(), t._setFileDropZoneTitle(), t._raise(\"filecleared\"), t.$element\r\n }, reset: function () {\r\n var e = this;\r\n if (e._raise(\"filereset\")) return e.lastProgress = 0, e._resetPreview(), e.$container.find(\".fileinput-filename\").text(\"\"), N.addCss(e.$container, \"file-input-new\"), e.getFrames().length && e.$container.removeClass(\"file-input-new\"), e.clearFileStack(), e._setFileDropZoneTitle(), e.$element\r\n }, disable: function () {\r\n var e = this, t = e.$container;\r\n return e.isDisabled = !0, e._raise(\"filedisabled\"), e.$element.attr(\"disabled\", \"disabled\"), t.addClass(\"is-locked\"), N.addCss(t.find(\".btn-file\"), \"disabled\"), t.find(\".kv-fileinput-caption\").addClass(\"file-caption-disabled\"), t.find(\".fileinput-remove, .fileinput-upload, .file-preview-frame button\").attr(\"disabled\", !0), e._initDragDrop(), e.$element\r\n }, enable: function () {\r\n var e = this, t = e.$container;\r\n return e.isDisabled = !1, e._raise(\"fileenabled\"), e.$element.removeAttr(\"disabled\"), t.removeClass(\"is-locked\"), t.find(\".kv-fileinput-caption\").removeClass(\"file-caption-disabled\"), t.find(\".fileinput-remove, .fileinput-upload, .file-preview-frame button\").removeAttr(\"disabled\"), t.find(\".btn-file\").removeClass(\"disabled\"), e._initDragDrop(), e.$element\r\n }, upload: function () {\r\n var t, i = this, e = i.fileManager, a = e.count(), r = !L.isEmptyObject(i._getExtraData());\r\n if (e.bpsLog = [], e.bps = 0, i.isAjaxUpload && !i.isDisabled && i._isFileSelectionValid(a)) {\r\n if (i.lastProgress = 0, i._resetUpload(), 0 !== a || r) return i.cancelling = !1, i._showProgress(), i.lock(), 0 === a && r ? (i._setProgress(2), void i._uploadExtraOnly()) : i.enableResumableUpload ? i.resume() : ((i.uploadAsync || i.enableResumableUpload) && (r = i._getOutData(null), i._raise(\"filebatchpreupload\", [r]), i.fileBatchCompleted = !1, i.uploadCache = [], L.each(i.getFileStack(), function (e) {\r\n e = i._getThumbId(e);\r\n i.uploadCache.push({id: e, content: null, config: null, tags: null, append: !0})\r\n }), i.$preview.find(\".file-preview-initial\").removeClass(N.SORT_CSS), i._initSortable()), i._setProgress(2), i.hasInitData = !1, i.uploadAsync ? (t = 0, void L.each(i.getFileStack(), function (e) {\r\n i._uploadSingle(t, e, !0), t++\r\n })) : (i._uploadBatch(), i.$element));\r\n i._showFileError(i.msgUploadEmpty)\r\n }\r\n }, destroy: function () {\r\n var e = this, t = e.$form, i = e.$container, a = e.$element, r = e.namespace;\r\n return L(document).off(r), L(window).off(r), t && t.length && t.off(r), e.isAjaxUpload && e._clearFileInput(), e._cleanup(), e._initPreviewCache(), a.insertBefore(i).off(r).removeData(), i.off().remove(), a\r\n }, refresh: function (e) {\r\n var t = this, i = t.$element;\r\n return e = \"object\" != typeof e || N.isEmpty(e) ? t.options : L.extend(!0, {}, t.options, e), t._init(e, !0), t._listen(), i\r\n }, zoom: function (e) {\r\n e = this._getFrame(e);\r\n this._showModal(e)\r\n }, getExif: function (e) {\r\n e = this._getFrame(e);\r\n return e && e.data(\"exif\") || null\r\n }, getFrames: function (e) {\r\n return e = e || \"\", e = this.$preview.find(N.FRAMES + e), this.reversePreviewOrder && (e = L(e.get().reverse())), e\r\n }, getPreview: function () {\r\n return {content: this.initialPreview, config: this.initialPreviewConfig, tags: this.initialPreviewThumbTags}\r\n }\r\n }, L.fn.fileinput = function (s) {\r\n if (N.hasFileAPISupport() || N.isIE(9)) {\r\n var l = Array.apply(null, arguments), d = [];\r\n switch (l.shift(), this.each(function () {\r\n var e = L(this), t = e.data(\"fileinput\"), i = \"object\" == typeof s && s, a = i.theme || e.data(\"theme\"), r = {},\r\n n = {}, o = i.language || e.data(\"language\") || L.fn.fileinput.defaults.language || \"en\";\r\n t || (a && (n = L.fn.fileinputThemes[a] || {}), \"en\" === o || N.isEmpty(L.fn.fileinputLocales[o]) || (r = L.fn.fileinputLocales[o] || {}), i = L.extend(!0, {}, L.fn.fileinput.defaults, n, L.fn.fileinputLocales.en, r, i, e.data()), t = new c(this, i), e.data(\"fileinput\", t)), \"string\" == typeof s && d.push(t[s].apply(t, l))\r\n }), d.length) {\r\n case 0:\r\n return this;\r\n case 1:\r\n return d[0];\r\n default:\r\n return d\r\n }\r\n }\r\n };\r\n L.fn.fileinput.defaults = {\r\n language: \"en\",\r\n showCaption: !0,\r\n showBrowse: !0,\r\n showPreview: !0,\r\n showRemove: !0,\r\n showUpload: !0,\r\n showUploadStats: !0,\r\n showCancel: null,\r\n showPause: null,\r\n showClose: !0,\r\n showUploadedThumbs: !0,\r\n showConsoleLogs: !1,\r\n browseOnZoneClick: !1,\r\n autoReplace: !1,\r\n autoOrientImage: function () {\r\n var e = window.navigator.userAgent, t = !!e.match(/WebKit/i);\r\n return !(!!e.match(/iP(od|ad|hone)/i) && t && !e.match(/CriOS/i))\r\n },\r\n autoOrientImageInitial: !0,\r\n required: !1,\r\n rtl: !1,\r\n hideThumbnailContent: !1,\r\n encodeUrl: !0,\r\n focusCaptionOnBrowse: !0,\r\n focusCaptionOnClear: !0,\r\n generateFileId: null,\r\n previewClass: \"\",\r\n captionClass: \"\",\r\n frameClass: \"krajee-default\",\r\n mainClass: \"file-caption-main\",\r\n mainTemplate: null,\r\n fileSizeGetter: null,\r\n initialCaption: \"\",\r\n initialPreview: [],\r\n initialPreviewDelimiter: \"*$$*\",\r\n initialPreviewAsData: !1,\r\n initialPreviewFileType: \"image\",\r\n initialPreviewConfig: [],\r\n initialPreviewThumbTags: [],\r\n previewThumbTags: {},\r\n initialPreviewShowDelete: !0,\r\n initialPreviewDownloadUrl: \"\",\r\n removeFromPreviewOnError: !1,\r\n deleteUrl: \"\",\r\n deleteExtraData: {},\r\n overwriteInitial: !0,\r\n sanitizeZoomCache: function (e) {\r\n e = N.createElement(e);\r\n return e.find(\"input,textarea,select,datalist,form,.file-thumbnail-footer\").remove(), e.html()\r\n },\r\n previewZoomButtonIcons: {\r\n prev: '',\r\n next: '',\r\n toggleheader: '',\r\n fullscreen: '',\r\n borderless: '',\r\n close: ''\r\n },\r\n previewZoomButtonClasses: {\r\n prev: \"btn btn-navigate\",\r\n next: \"btn btn-navigate\",\r\n toggleheader: \"btn btn-sm btn-kv btn-default btn-outline-secondary\",\r\n fullscreen: \"btn btn-sm btn-kv btn-default btn-outline-secondary\",\r\n borderless: \"btn btn-sm btn-kv btn-default btn-outline-secondary\",\r\n close: \"btn btn-sm btn-kv btn-default btn-outline-secondary\"\r\n },\r\n previewTemplates: {},\r\n previewContentTemplates: {},\r\n preferIconicPreview: !1,\r\n preferIconicZoomPreview: !1,\r\n allowedFileTypes: null,\r\n allowedFileExtensions: null,\r\n allowedPreviewTypes: void 0,\r\n allowedPreviewMimeTypes: null,\r\n allowedPreviewExtensions: null,\r\n disabledPreviewTypes: void 0,\r\n disabledPreviewExtensions: [\"msi\", \"exe\", \"com\", \"zip\", \"rar\", \"app\", \"vb\", \"scr\"],\r\n disabledPreviewMimeTypes: null,\r\n defaultPreviewContent: null,\r\n customLayoutTags: {},\r\n customPreviewTags: {},\r\n previewFileIcon: '',\r\n previewFileIconClass: \"file-other-icon\",\r\n previewFileIconSettings: {},\r\n previewFileExtSettings: {},\r\n buttonLabelClass: \"hidden-xs\",\r\n browseIcon: ' ',\r\n browseClass: \"btn btn-application\", // STM 2022-0628--replaced btn-primary class with btn-application class\r\n removeIcon: '',\r\n removeClass: \"btn btn-default btn-secondary\",\r\n cancelIcon: '',\r\n cancelClass: \"btn btn-default btn-secondary\",\r\n pauseIcon: '',\r\n pauseClass: \"btn btn-default btn-secondary\",\r\n uploadIcon: '',\r\n uploadClass: \"btn btn-default btn-secondary\",\r\n uploadUrl: null,\r\n uploadUrlThumb: null,\r\n uploadAsync: !0,\r\n uploadParamNames: {\r\n chunkCount: \"chunkCount\",\r\n chunkIndex: \"chunkIndex\",\r\n chunkSize: \"chunkSize\",\r\n chunkSizeStart: \"chunkSizeStart\",\r\n chunksUploaded: \"chunksUploaded\",\r\n fileBlob: \"fileBlob\",\r\n fileId: \"fileId\",\r\n fileName: \"fileName\",\r\n fileRelativePath: \"fileRelativePath\",\r\n fileSize: \"fileSize\",\r\n retryCount: \"retryCount\"\r\n },\r\n maxAjaxThreads: 5,\r\n fadeDelay: 800,\r\n processDelay: 100,\r\n bitrateUpdateDelay: 500,\r\n queueDelay: 10,\r\n progressDelay: 0,\r\n enableResumableUpload: !1,\r\n resumableUploadOptions: {\r\n fallback: null,\r\n testUrl: null,\r\n chunkSize: 2048,\r\n maxThreads: 4,\r\n maxRetries: 3,\r\n showErrorLog: !0,\r\n retainErrorHistory: !0,\r\n skipErrorsAndProceed: !1\r\n },\r\n uploadExtraData: {},\r\n zoomModalHeight: 480,\r\n minImageWidth: null,\r\n minImageHeight: null,\r\n maxImageWidth: null,\r\n maxImageHeight: null,\r\n resizeImage: !1,\r\n resizePreference: \"width\",\r\n resizeQuality: .92,\r\n resizeDefaultImageType: \"image/jpeg\",\r\n resizeIfSizeMoreThan: 0,\r\n minFileSize: -1,\r\n maxFileSize: 0,\r\n maxFilePreviewSize: 25600,\r\n minFileCount: 0,\r\n maxFileCount: 0,\r\n maxTotalFileCount: 0,\r\n validateInitialCount: !1,\r\n msgValidationErrorClass: \"text-danger\",\r\n msgValidationErrorIcon: ' ',\r\n msgErrorClass: \"file-error-message\",\r\n progressThumbClass: \"progress-bar progress-bar-striped active progress-bar-animated\",\r\n progressClass: \"progress-bar bg-success progress-bar-success progress-bar-striped active progress-bar-animated\",\r\n progressInfoClass: \"progress-bar bg-info progress-bar-info progress-bar-striped active progress-bar-animated\",\r\n progressCompleteClass: \"progress-bar bg-success progress-bar-success\",\r\n progressPauseClass: \"progress-bar bg-primary progress-bar-primary progress-bar-striped active progress-bar-animated\",\r\n progressErrorClass: \"progress-bar bg-danger progress-bar-danger\",\r\n progressUploadThreshold: 99,\r\n previewFileType: \"image\",\r\n elCaptionContainer: null,\r\n elCaptionText: null,\r\n elPreviewContainer: null,\r\n elPreviewImage: null,\r\n elPreviewStatus: null,\r\n elErrorContainer: null,\r\n errorCloseButton: N.closeButton(\"kv-error-close\"),\r\n slugCallback: null,\r\n dropZoneEnabled: !0,\r\n dropZoneTitleClass: \"file-drop-zone-title\",\r\n fileActionSettings: {},\r\n otherActionButtons: \"\",\r\n textEncoding: \"UTF-8\",\r\n preProcessUpload: null,\r\n ajaxSettings: {},\r\n ajaxDeleteSettings: {},\r\n showAjaxErrorDetails: !0,\r\n mergeAjaxCallbacks: !1,\r\n mergeAjaxDeleteCallbacks: !1,\r\n retryErrorUploads: !0,\r\n reversePreviewOrder: !1,\r\n usePdfRenderer: function () {\r\n var e = !!window.MSInputMethodContext && !!document.documentMode;\r\n return !!navigator.userAgent.match(/(iPod|iPhone|iPad|Android)/i) || e\r\n },\r\n pdfRendererUrl: \"\",\r\n pdfRendererTemplate: ''\r\n }, L.fn.fileinputLocales.en = {\r\n fileSingle: \"file\",\r\n filePlural: \"files\",\r\n browseLabel: \"Browse …\",\r\n removeLabel: \"Remove\",\r\n removeTitle: \"Clear all unprocessed files\",\r\n cancelLabel: \"Cancel\",\r\n cancelTitle: \"Abort ongoing upload\",\r\n pauseLabel: \"Pause\",\r\n pauseTitle: \"Pause ongoing upload\",\r\n uploadLabel: \"Upload\",\r\n uploadTitle: \"Upload selected files\",\r\n msgNo: \"No\",\r\n msgNoFilesSelected: \"No files selected\",\r\n msgCancelled: \"Cancelled\",\r\n msgPaused: \"Paused\",\r\n msgPlaceholder: \"Select {files} ...\",\r\n msgZoomModalHeading: \"Detailed Preview\",\r\n msgFileRequired: \"You must select a file to upload.\",\r\n msgSizeTooSmall: 'File \"{name}\" ({size} KB) is too small and must be larger than {minSize} KB.',\r\n msgSizeTooLarge: 'File \"{name}\" ({size} KB) exceeds maximum allowed upload size of {maxSize} KB.',\r\n msgFilesTooLess: \"You must select at least {n} {files} to upload.\",\r\n msgFilesTooMany: \"Number of files selected for upload ({n}) exceeds maximum allowed limit of {m}.\",\r\n msgTotalFilesTooMany: \"You can upload a maximum of {m} files ({n} files detected).\",\r\n msgFileNotFound: 'File \"{name}\" not found!',\r\n msgFileSecured: 'Security restrictions prevent reading the file \"{name}\".',\r\n msgFileNotReadable: 'File \"{name}\" is not readable.',\r\n msgFilePreviewAborted: 'File preview aborted for \"{name}\".',\r\n msgFilePreviewError: 'An error occurred while reading the file \"{name}\".',\r\n msgInvalidFileName: 'Invalid or unsupported characters in file name \"{name}\".',\r\n msgInvalidFileType: 'Invalid type for file \"{name}\". Only \"{types}\" files are supported.',\r\n msgInvalidFileExtension: 'Invalid extension for file \"{name}\". Only \"{extensions}\" files are supported.',\r\n msgFileTypes: {\r\n image: \"image\",\r\n html: \"HTML\",\r\n text: \"text\",\r\n video: \"video\",\r\n audio: \"audio\",\r\n flash: \"flash\",\r\n pdf: \"PDF\",\r\n object: \"object\"\r\n },\r\n msgUploadAborted: \"The file upload was aborted\",\r\n msgUploadThreshold: \"Processing …\",\r\n msgUploadBegin: \"Initializing …\",\r\n msgUploadEnd: \"Done\",\r\n msgUploadResume: \"Resuming upload …\",\r\n msgUploadEmpty: \"No valid data available for upload.\",\r\n msgUploadError: \"Upload Error\",\r\n msgDeleteError: \"Delete Error\",\r\n msgProgressError: \"Error\",\r\n msgValidationError: \"Validation Error\",\r\n msgLoading: \"Loading file {index} of {files} …\",\r\n msgProgress: \"Loading file {index} of {files} - {name} - {percent}% completed.\",\r\n msgSelected: \"{n} {files} selected\",\r\n msgFoldersNotAllowed: \"Drag & drop files only! {n} folder(s) dropped were skipped.\",\r\n msgImageWidthSmall: 'Width of image file \"{name}\" must be at least {size} px.',\r\n msgImageHeightSmall: 'Height of image file \"{name}\" must be at least {size} px.',\r\n msgImageWidthLarge: 'Width of image file \"{name}\" cannot exceed {size} px.',\r\n msgImageHeightLarge: 'Height of image file \"{name}\" cannot exceed {size} px.',\r\n msgImageResizeError: \"Could not get the image dimensions to resize.\",\r\n msgImageResizeException: \"Error while resizing the image.
    {errors}
    \",\r\n msgAjaxError: \"Something went wrong with the {operation} operation. Please try again later!\",\r\n msgAjaxProgressError: \"{operation} failed\",\r\n msgDuplicateFile: 'File \"{name}\" of same size \"{size} KB\" has already been selected earlier. Skipping duplicate selection.',\r\n msgResumableUploadRetriesExceeded: \"Upload aborted beyond {max} retries for file {file}! Error Details:
    {error}
    \",\r\n msgPendingTime: \"{time} remaining\",\r\n msgCalculatingTime: \"calculating time remaining\",\r\n ajaxOperations: {\r\n deleteThumb: \"file delete\",\r\n uploadThumb: \"file upload\",\r\n uploadBatch: \"batch file upload\",\r\n uploadExtra: \"form data upload\"\r\n },\r\n dropZoneTitle: \"Drag & drop files here …\",\r\n dropZoneClickTitle: \"
    (or click to select {files})\",\r\n previewZoomButtonTitles: {\r\n prev: \"View previous file\",\r\n next: \"View next file\",\r\n toggleheader: \"Toggle header\",\r\n fullscreen: \"Toggle full screen\",\r\n borderless: \"Toggle borderless mode\",\r\n close: \"Close detailed preview\"\r\n }\r\n }, L.fn.fileinput.Constructor = c, L(document).ready(function () {\r\n var e = L(\"input.file[type=file]\");\r\n e.length && e.fileinput()\r\n })\r\n});\r\n"],"file":"vendor/bs-filestyle.js"}