diff --git a/dist/bootstrap-editable/js/bootstrap-editable.js b/dist/bootstrap-editable/js/bootstrap-editable.js
index ab06501..c13dd95 100644
--- a/dist/bootstrap-editable/js/bootstrap-editable.js
+++ b/dist/bootstrap-editable/js/bootstrap-editable.js
@@ -2601,7 +2601,7 @@ List - abstract class for inputs that have source option loaded from js array or
         onSourceReady: function (success, error) {
             //run source if it function
             var source;
-            if ($.isFunction(this.options.source)) {
+            if (typeof(this.options.source) === 'function') {
                 source = this.options.source.call(this.options.scope);
                 this.sourceData = null;
                 //note: if function returns the same source as URL - sourceData will be taken from cahce and no extra request performed
@@ -2718,7 +2718,7 @@ List - abstract class for inputs that have source option loaded from js array or
             
             if(!Array.isArray(this.prependData)) {
                 //run prepend if it is function (once)
-                if ($.isFunction(this.options.prepend)) {
+                if (typeof (this.options.prepend) === 'function') {
                     this.options.prepend = this.options.prepend.call(this.options.scope);
                 }
               
@@ -3695,7 +3695,7 @@ $(function(){
         if(!options.select2.tags && options.source) {
             var source = options.source;
             //if source is function, call it (once!)
-            if ($.isFunction(options.source)) {
+            if (typeof (options.source) === 'function') {
                 source = options.source.call(options.scope);
             }               
 
diff --git a/dist/bootstrap-editable/js/bootstrap-editable.min.js b/dist/bootstrap-editable/js/bootstrap-editable.min.js
index 9c782f3..68652c9 100644
--- a/dist/bootstrap-editable/js/bootstrap-editable.min.js
+++ b/dist/bootstrap-editable/js/bootstrap-editable.min.js
@@ -2,4 +2,4 @@
 * A maintained fork of x-editable for Bootstrap 5 support.
 * https://git.24unix.net/tracer/x-editable
 * Copyright (c) 2025 Micha Espey; Licensed MIT */
-(a=>{function n(t,e){this.options=a.extend({},a.fn.editableform.defaults,e),this.$div=a(t),this.options.scope||(this.options.scope=this)}n.prototype={constructor:n,initInput:function(){this.input=this.options.input,this.value=this.input.str2value(this.options.value),this.input.prerender()},initTemplate:function(){this.$form=a(a.fn.editableform.template)},initButtons:function(){var t=this.$form.find(".editable-buttons");t.append(a.fn.editableform.buttons),"bottom"===this.options.showbuttons&&t.addClass("editable-buttons-bottom")},render:function(){this.$loading=a(a.fn.editableform.loading),this.$div.empty().append(this.$loading),this.initTemplate(),this.options.showbuttons?this.initButtons():this.$form.find(".editable-buttons").remove(),this.showLoading(),this.isSaving=!1,this.$div.triggerHandler("rendering"),this.initInput(),this.$form.find("div.editable-input").append(this.input.$tpl),this.$div.append(this.$form),a.when(this.input.render()).then(a.proxy(function(){var t;this.options.showbuttons||this.input.autosubmit(),this.$form.find(".editable-cancel").click(a.proxy(this.cancel,this)),this.input.error?(this.error(this.input.error),this.$form.find(".editable-submit").attr("disabled",!0),this.input.$input.attr("disabled",!0),this.$form.submit(function(t){t.preventDefault()})):(this.error(!1),this.input.$input.removeAttr("disabled"),this.$form.find(".editable-submit").removeAttr("disabled"),t=null==this.value||""===this.value?this.options.defaultValue:this.value,this.input.value2input(t),this.$form.submit(a.proxy(this.submit,this))),this.$div.triggerHandler("rendered"),this.showForm(),this.input.postrender&&this.input.postrender()},this))},cancel:function(){this.$div.triggerHandler("cancel")},showLoading:function(){var t,e;this.$form?(t=this.$form.outerWidth(),e=this.$form.outerHeight(),t&&this.$loading.width(t),e&&this.$loading.height(e),this.$form.hide()):(t=this.$loading.parent().width())&&this.$loading.width(t),this.$loading.show()},showForm:function(t){this.$loading.hide(),this.$form.show(),!1!==t&&this.input.activate(),this.$div.triggerHandler("show")},error:function(t){var e=this.$form.find(".control-group"),i=this.$form.find(".editable-error-block");if(!1===t)e.removeClass(a.fn.editableform.errorGroupClass),i.removeClass(a.fn.editableform.errorBlockClass).empty().hide();else{if(t){for(var s=(""+t).split("\n"),n=0;n<s.length;n++)s[n]=a("<div>").text(s[n]).html();t=s.join("<br>")}e.addClass(a.fn.editableform.errorGroupClass),i.addClass(a.fn.editableform.errorBlockClass).html(t).show()}},submit:function(t){t.stopPropagation(),t.preventDefault();var i,s=this.input.input2value(),t=this.validate(s);if("object"===a.type(t)&&void 0!==t.newValue){if(s=t.newValue,this.input.value2input(s),"string"==typeof t.msg)return this.error(t.msg),void this.showForm()}else if(t)return this.error(t),void this.showForm();this.options.savenochange||this.input.value2str(s)!=this.input.value2str(this.value)?(i=this.input.value2submit(s),this.isSaving=!0,a.when(this.save(i)).done(a.proxy(function(t){this.isSaving=!1;var e="function"==typeof this.options.success?this.options.success.call(this.options.scope,t,s):null;!1===e?(this.error(!1),this.showForm(!1)):"string"==typeof e?(this.error(e),this.showForm()):(e&&"object"==typeof e&&e.hasOwnProperty("newValue")&&(s=e.newValue),this.error(!1),this.value=s,this.$div.triggerHandler("save",{newValue:s,submitValue:i,response:t}))},this)).fail(a.proxy(function(t){this.isSaving=!1,t="function"==typeof this.options.error?this.options.error.call(this.options.scope,t,s):"string"==typeof t?t:t.responseText||t.statusText||"Unknown error!",this.error(t),this.showForm()},this))):this.$div.triggerHandler("nochange")},save:function(t){this.options.pk=a.fn.editableutils.tryParseJson(this.options.pk,!0);var e="function"==typeof this.options.pk?this.options.pk.call(this.options.scope):this.options.pk;if(!!("function"==typeof this.options.url||this.options.url&&("always"===this.options.send||"auto"===this.options.send&&null!=e)))return this.showLoading(),t={name:this.options.name||"",value:t,pk:e},"function"==typeof this.options.params?t=this.options.params.call(this.options.scope,t):(this.options.params=a.fn.editableutils.tryParseJson(this.options.params,!0),a.extend(t,this.options.params)),"function"==typeof this.options.url?this.options.url.call(this.options.scope,t):a.ajax(a.extend({url:this.options.url,data:t,type:"POST"},this.options.ajaxOptions))},validate:function(t){if(void 0===t&&(t=this.value),"function"==typeof this.options.validate)return this.options.validate.call(this.options.scope,t)},option:function(t,e){t in this.options&&(this.options[t]=e),"value"===t&&this.setValue(e)},setValue:function(t,e){this.value=e?this.input.str2value(t):t,this.$form&&this.$form.is(":visible")&&this.input.value2input(this.value)}},a.fn.editableform=function(i){var s=arguments;return this.each(function(){var t=a(this),e=t.data("editableform");e||t.data("editableform",e=new n(this,"object"==typeof i&&i)),"string"==typeof i&&e[i].apply(e,Array.prototype.slice.call(s,1))})},a.fn.editableform.Constructor=n,a.fn.editableform.defaults={type:"text",url:null,params:null,name:null,pk:null,value:null,defaultValue:null,send:"auto",validate:null,success:null,error:null,ajaxOptions:null,showbuttons:!0,scope:null,savenochange:!1},a.fn.editableform.template='<form class="form-inline editableform"><div class="control-group"><div><div class="editable-input"></div><div class="editable-buttons"></div></div><div class="editable-error-block"></div></div></form>',a.fn.editableform.loading='<div class="editableform-loading"></div>',a.fn.editableform.buttons='<button type="submit" class="editable-submit">ok</button><button type="button" class="editable-cancel">cancel</button>',a.fn.editableform.errorGroupClass=null,a.fn.editableform.errorBlockClass="editable-error",a.fn.editableform.engine="jquery"})(window.jQuery),(l=>{l.fn.editableutils={inherit:function(t,e){function i(){}i.prototype=e.prototype,t.prototype=new i,(t.prototype.constructor=t).superclass=e.prototype},setCursorPosition:function(t,e){t.setSelectionRange?t.setSelectionRange(e,e):t.createTextRange&&((t=t.createTextRange()).collapse(!0),t.moveEnd("character",e),t.moveStart("character",e),t.select())},tryParseJson:function(t,e){if("string"==typeof t&&t.length&&t.match(/^[\{\[].*[\}\]]$/))if(e)try{t=new Function("return "+t)()}catch(t){}finally{return t}else t=new Function("return "+t)();return t},sliceObj:function(t,e,i){var s,n,a={};if(Array.isArray(e)&&e.length)for(var o=0;o<e.length;o++)t.hasOwnProperty(s=e[o])&&(a[s]=t[s]),!0!==i&&(n=s.toLowerCase(),t.hasOwnProperty(n))&&(a[s]=t[n]);return a},getConfigData:function(t){var i={};return l.each(t.data(),function(t,e){"object"==typeof e&&(!e||"object"!=typeof e||e.constructor!==Object&&e.constructor!==Array)||(i[t]=e)}),i},objectKeys:function(t){if(Object.keys)return Object.keys(t);if(t!==Object(t))throw new TypeError("Object.keys called on a non-object");var e,i=[];for(e in t)Object.prototype.hasOwnProperty.call(t,e)&&i.push(e);return i},escape:function(t){return l("<div>").text(t).html()},itemsByValue:function(s,t,n){var e,a,o,r;return t&&null!==s?("function"!=typeof n&&(e=n||"value",n=function(t){return t[e]}),a=Array.isArray(s),o=[],r=this,l.each(t,function(t,e){var i;e.children?o=o.concat(r.itemsByValue(s,e.children,n)):a?l.grep(s,function(t){return t==(e&&"object"==typeof e?n(e):e)}).length&&o.push(e):(i=e&&"object"==typeof e?n(e):e,s==i&&o.push(e))}),o):[]},createInput:function(t){var e,i=t.type;return"date"===i&&("inline"===t.mode?l.fn.editabletypes.datefield?i="datefield":l.fn.editabletypes.dateuifield&&(i="dateuifield"):l.fn.editabletypes.date?i="date":l.fn.editabletypes.dateui&&(i="dateui"),"date"!==i||l.fn.editabletypes.date||(i="combodate")),"wysihtml5"!==(i="datetime"===i&&"inline"===t.mode?"datetimefield":i)||l.fn.editabletypes[i]||(i="textarea"),"function"==typeof l.fn.editabletypes[i]?new(e=l.fn.editabletypes[i])(this.sliceObj(t,this.objectKeys(e.defaults))):(l.error("Unknown type: "+i),!1)},supportsTransitions:function(){var t=(document.body||document.documentElement).style,e=["Moz","Webkit","Khtml","O","ms"];if("string"==typeof t[i="transition"])return!0;for(var i=i.charAt(0).toUpperCase()+i.substr(1),s=0;s<e.length;s++)if("string"==typeof t[e[s]+i])return!0;return!1}}})(window.jQuery),(r=>{function l(t,e){this.init(t,e)}function h(t,e){this.init(t,e)}l.prototype={containerName:null,containerDataName:null,innerCss:null,containerClass:"editable-container editable-popup",defaults:{},init:function(t,e){this.$element=r(t),this.options=r.extend({},r.fn.editableContainer.defaults,e),this.splitOptions(),this.formOptions.scope=this.$element[0],this.initContainer(),this.delayedHide=!1,this.$element.on("destroyed",r.proxy(function(){this.destroy()},this)),r(document).data("editable-handlers-attached")||(r(document).on("keyup.editable",function(t){27===t.which&&r(".editable-open").editableContainer("hide")}),r(document).on("click.editable",function(t){var e,i=r(t.target),s=[".editable-container",".ui-datepicker-header",".datepicker",".modal-backdrop",".bootstrap-wysihtml5-insert-image-modal",".bootstrap-wysihtml5-insert-link-modal"];if(r.contains(document.documentElement,t.target)&&!i.is(document)){for(e=0;e<s.length;e++)if(i.is(s[e])||i.parents(s[e]).length)return;l.prototype.closeOthers(t.target)}}),r(document).data("editable-handlers-attached",!0))},splitOptions:function(){if(this.containerOptions={},this.formOptions={},!r.fn[this.containerName])throw new Error(this.containerName+" not found. Have you included corresponding js file?");for(var t in this.options)t in this.defaults?this.containerOptions[t]=this.options[t]:this.formOptions[t]=this.options[t]},tip:function(){return this.container()?this.container().$tip:null},container:function(){var t;return t=this.containerDataName&&(t=this.$element.data(this.containerDataName))?t:this.$element.data(this.containerName)},call:function(){this.$element[this.containerName].apply(this.$element,arguments)},initContainer:function(){this.call(this.containerOptions)},renderForm:function(){this.$form.editableform(this.formOptions).on({save:r.proxy(this.save,this),nochange:r.proxy(function(){this.hide("nochange")},this),cancel:r.proxy(function(){this.hide("cancel")},this),show:r.proxy(function(){this.delayedHide?(this.hide(this.delayedHide.reason),this.delayedHide=!1):this.setPosition()},this),rendering:r.proxy(this.setPosition,this),resize:r.proxy(this.setPosition,this),rendered:r.proxy(function(){this.$element.triggerHandler("shown",r(this.options.scope).data("editable"))},this)}).editableform("render")},show:function(t){this.$element.addClass("editable-open"),!1!==t&&this.closeOthers(this.$element[0]),this.innerShow(),this.tip().addClass(this.containerClass),this.$form,this.$form=r("<div>"),(this.tip().is(this.innerCss)?this.tip():this.tip().find(this.innerCss)).append(this.$form),this.renderForm()},hide:function(t){this.tip()&&this.tip().is(":visible")&&this.$element.hasClass("editable-open")&&(this.$form.data("editableform").isSaving?this.delayedHide={reason:t}:(this.delayedHide=!1,this.$element.removeClass("editable-open"),this.innerHide(),this.$element.triggerHandler("hidden",t||"manual")))},innerShow:function(){},innerHide:function(){},toggle:function(t){this.container()&&this.tip()&&this.tip().is(":visible")?this.hide():this.show(t)},setPosition:function(){},save:function(t,e){this.$element.triggerHandler("save",e),this.hide("save")},option:function(t,e){this.options[t]=e,t in this.containerOptions?(this.containerOptions[t]=e,this.setContainerOption(t,e)):(this.formOptions[t]=e,this.$form&&this.$form.editableform("option",t,e))},setContainerOption:function(t,e){this.call("option",t,e)},destroy:function(){this.hide(),this.innerDestroy(),this.$element.off("destroyed"),this.$element.removeData("editableContainer")},innerDestroy:function(){},closeOthers:function(s){r(".editable-open").each(function(t,e){var i;e===s||r(e).find(s).length||(i=(e=r(e)).data("editableContainer"))&&("cancel"===i.options.onblur?e.data("editableContainer").hide("onblur"):"submit"===i.options.onblur&&e.data("editableContainer").tip().find("form").submit())})},activate:function(){this.tip&&this.tip().is(":visible")&&this.$form&&this.$form.data("editableform").input.activate()}},r.fn.editableContainer=function(a){var o=arguments;return this.each(function(){var t=r(this),e="editableContainer",i=t.data(e),s="object"==typeof a&&a,n="inline"===s.mode?h:l;i||t.data(e,i=new n(this,s)),"string"==typeof a&&i[a].apply(i,Array.prototype.slice.call(o,1))})},r.fn.editableContainer.Popup=l,r.fn.editableContainer.Inline=h,r.fn.editableContainer.defaults={value:null,placement:"top",autohide:!0,onblur:"cancel",anim:!1,mode:"popup"},jQuery.event.special.destroyed={remove:function(t){t.handler&&t.handler()}}})(window.jQuery),(t=>{t.extend(t.fn.editableContainer.Inline.prototype,t.fn.editableContainer.Popup.prototype,{containerName:"editableform",innerCss:".editable-inline",containerClass:"editable-container editable-inline",initContainer:function(){this.$tip=t("<span></span>"),this.options.anim||(this.options.anim=0)},splitOptions:function(){this.containerOptions={},this.formOptions=this.options},tip:function(){return this.$tip},innerShow:function(){this.$element.hide(),this.tip().insertAfter(this.$element).show()},innerHide:function(){this.$tip.hide(this.options.anim,t.proxy(function(){this.$element.show(),this.innerDestroy()},this))},innerDestroy:function(){this.tip()&&this.tip().empty().remove()}})})(window.jQuery),(p=>{function u(t,e){this.$element=p(t),this.options=p.extend({},p.fn.editable.defaults,e,p.fn.editableutils.getConfigData(this.$element)),this.options.selector?this.initLive():this.init(),this.options.highlight&&!p.fn.editableutils.supportsTransitions()&&(this.options.highlight=!1)}u.prototype={constructor:u,init:function(){var t,e=!1;if(this.options.name=this.options.name||this.$element.attr("id"),this.options.scope=this.$element[0],this.input=p.fn.editableutils.createInput(this.options),this.input){switch(null==this.options.value?(this.value=this.input.html2value(p.trim(this.$element.html())),e=!0):(this.options.value=p.fn.editableutils.tryParseJson(this.options.value,!0),"string"==typeof this.options.value?this.value=this.input.str2value(this.options.value):this.value=this.options.value),this.$element.addClass("editable"),"textarea"===this.input.type&&this.$element.addClass("editable-pre-wrapped"),"manual"!==this.options.toggle?(this.$element.addClass("editable-click"),this.$element.on(this.options.toggle+".editable",p.proxy(function(t){this.options.disabled||t.preventDefault(),"mouseenter"===this.options.toggle?this.show():(t="click"!==this.options.toggle,this.toggle(t))},this))):this.$element.attr("tabindex",-1),"function"==typeof this.options.display&&(this.options.autotext="always"),this.options.autotext){case"always":t=!0;break;case"auto":t=!p.trim(this.$element.text()).length&&null!=this.value&&!e;break;default:t=!1}p.when(!t||this.render()).then(p.proxy(function(){this.options.disabled?this.disable():this.enable(),this.$element.triggerHandler("init",this)},this))}},initLive:function(){var t=this.options.selector;this.options.selector=!1,this.options.autotext="never",this.$element.on(this.options.toggle+".editable",t,p.proxy(function(t){var e=p(t.target);e.data("editable")||(e.hasClass(this.options.emptyclass)&&e.empty(),e.editable(this.options).trigger(t))},this))},render:function(t){if(!1!==this.options.display)return this.input.value2htmlFinal?this.input.value2html(this.value,this.$element[0],this.options.display,t):"function"==typeof this.options.display?this.options.display.call(this.$element[0],this.value,t):this.input.value2html(this.value,this.$element[0])},enable:function(){this.options.disabled=!1,this.$element.removeClass("editable-disabled"),this.handleEmpty(this.isEmpty),"manual"!==this.options.toggle&&"-1"===this.$element.attr("tabindex")&&this.$element.removeAttr("tabindex")},disable:function(){this.options.disabled=!0,this.hide(),this.$element.addClass("editable-disabled"),this.handleEmpty(this.isEmpty),this.$element.attr("tabindex",-1)},toggleDisabled:function(){this.options.disabled?this.enable():this.disable()},option:function(t,e){if(t&&"object"==typeof t)p.each(t,p.proxy(function(t,e){this.option(p.trim(t),e)},this));else{if(this.options[t]=e,"disabled"===t)return e?this.disable():this.enable();"value"===t&&this.setValue(e),this.container&&this.container.option(t,e),this.input.option&&this.input.option(t,e)}},handleEmpty:function(t){!1!==this.options.display&&(void 0!==t?this.isEmpty=t:"function"==typeof this.input.isEmpty?this.isEmpty=this.input.isEmpty(this.$element):this.isEmpty=""===p.trim(this.$element.html()),this.options.disabled?this.isEmpty&&(this.$element.empty(),this.options.emptyclass)&&this.$element.removeClass(this.options.emptyclass):this.isEmpty?(this.$element.html(this.options.emptytext),this.options.emptyclass&&this.$element.addClass(this.options.emptyclass)):this.options.emptyclass&&this.$element.removeClass(this.options.emptyclass))},show:function(t){if(!this.options.disabled){if(this.container){if(this.container.tip().is(":visible"))return}else{var e=p.extend({},this.options,{value:this.value,input:this.input});this.$element.editableContainer(e),this.$element.on("save.internal",p.proxy(this.save,this)),this.container=this.$element.data("editableContainer")}this.container.show(t)}},hide:function(){this.container&&this.container.hide()},toggle:function(t){this.container&&this.container.tip().is(":visible")?this.hide():this.show(t)},save:function(t,e){var i,s;this.options.unsavedclass&&("function"==typeof this.options.url||!1===this.options.display||void 0!==e.response||this.options.savenochange&&this.input.value2str(this.value)!==this.input.value2str(e.newValue)?this.$element.removeClass(this.options.unsavedclass):this.$element.addClass(this.options.unsavedclass)),this.options.highlight&&(i=this.$element,s=i.css("background-color"),i.css("background-color",this.options.highlight),setTimeout(function(){"transparent"===s&&(s=""),i.css("background-color",s),i.addClass("editable-bg-transition"),setTimeout(function(){i.removeClass("editable-bg-transition")},1700)},10)),this.setValue(e.newValue,!1,e.response)},validate:function(){if("function"==typeof this.options.validate)return this.options.validate.call(this,this.value)},setValue:function(t,e,i){this.value=e?this.input.str2value(t):t,this.container&&this.container.option("value",this.value),p.when(this.render(i)).then(p.proxy(function(){this.handleEmpty()},this))},activate:function(){this.container&&this.container.activate()},destroy:function(){this.disable(),this.container&&this.container.destroy(),this.input.destroy(),"manual"!==this.options.toggle&&(this.$element.removeClass("editable-click"),this.$element.off(this.options.toggle+".editable")),this.$element.off("save.internal"),this.$element.removeClass("editable editable-open editable-disabled"),this.$element.removeData("editable")}},p.fn.editable=function(s){var i={},n=arguments,a="editable";switch(s){case"validate":return this.each(function(){var t,e=p(this).data(a);e&&(t=e.validate())&&(i[e.options.name]=t)}),i;case"getValue":return 2===arguments.length&&!0===arguments[1]?i=this.eq(0).data(a).value:this.each(function(){var t=p(this).data(a);t&&null!=t.value&&(i[t.options.name]=t.input.value2submit(t.value))}),i;case"submit":var t,e,o,r=arguments[1]||{},l=this,h=this.editable("validate");return p.isEmptyObject(h)?(o={},1===l.length?(e={name:(t=l.data("editable")).options.name||"",value:t.input.value2submit(t.value),pk:"function"==typeof t.options.pk?t.options.pk.call(t.options.scope):t.options.pk},"function"==typeof t.options.params?e=t.options.params.call(t.options.scope,e):(t.options.params=p.fn.editableutils.tryParseJson(t.options.params,!0),p.extend(e,t.options.params)),o={url:t.options.url,data:e,type:"POST"},r.success=r.success||t.options.success,r.error=r.error||t.options.error):(e=this.editable("getValue"),o={url:r.url,data:e,type:"POST"}),o.success="function"==typeof r.success?function(t){r.success.call(l,t,r)}:p.noop,o.error="function"==typeof r.error?function(){r.error.apply(l,arguments)}:p.noop,r.ajaxOptions&&p.extend(o,r.ajaxOptions),r.data&&p.extend(o.data,r.data),p.ajax(o)):"function"==typeof r.error&&r.error.call(l,h),this}return this.each(function(){var t=p(this),e=t.data(a),i="object"==typeof s&&s;i&&i.selector?e=new u(this,i):(e||t.data(a,e=new u(this,i)),"string"==typeof s&&e[s].apply(e,Array.prototype.slice.call(n,1)))})},p.fn.editable.defaults={type:"text",disabled:!1,toggle:"click",emptytext:"Empty",autotext:"auto",value:null,display:null,emptyclass:"editable-empty",unsavedclass:"editable-unsaved",selector:null,highlight:"#FFFF80"}})(window.jQuery),(s=>{function t(){}s.fn.editabletypes={},t.prototype={init:function(t,e,i){this.type=t,this.options=s.extend({},i,e)},prerender:function(){this.$tpl=s(this.options.tpl),this.$input=this.$tpl,this.$clear=null,this.error=null},render:function(){},value2html:function(t,e){s(e)[this.options.escape?"text":"html"](s.trim(t))},html2value:function(t){return s("<div>").html(t).text()},value2str:function(t){return t},str2value:function(t){return t},value2submit:function(t){return t},value2input:function(t){this.$input.val(t)},input2value:function(){return this.$input.val()},activate:function(){this.$input.is(":visible")&&this.$input.focus()},clear:function(){this.$input.val(null)},escape:function(t){return s("<div>").text(t).html()},autosubmit:function(){},destroy:function(){},setClass:function(){this.options.inputclass&&this.$input.addClass(this.options.inputclass)},setAttr:function(t){null!=this.options[t]&&this.$input.attr(t,this.options[t])},option:function(t,e){this.options[t]=e}},t.defaults={tpl:"",inputclass:null,escape:!0,scope:null,showbuttons:!0},s.extend(s.fn.editabletypes,{abstractinput:t})})(window.jQuery),(r=>{function t(t){}r.fn.editableutils.inherit(t,r.fn.editabletypes.abstractinput),r.extend(t.prototype,{render:function(){var t=r.Deferred();return this.error=null,this.onSourceReady(function(){this.renderList(),t.resolve()},function(){this.error=this.options.sourceError,t.resolve()}),t.promise()},html2value:function(t){return null},value2html:function(t,e,i,s){function n(){"function"==typeof i?i.call(e,t,this.sourceData,s):this.value2htmlFinal(t,e),a.resolve()}var a=r.Deferred();return null===t?n.call(this):this.onSourceReady(n,function(){a.resolve()}),a.promise()},onSourceReady:function(e,i){var t;if(r.isFunction(this.options.source)?(t=this.options.source.call(this.options.scope),this.sourceData=null):t=this.options.source,this.options.sourceCache&&Array.isArray(this.sourceData))e.call(this);else{try{t=r.fn.editableutils.tryParseJson(t,!1)}catch(t){return void i.call(this)}if("string"==typeof t){if(this.options.sourceCache){var s,n=t;if(r(document).data(n)||r(document).data(n,{}),!1===(s=r(document).data(n)).loading&&s.sourceData)return this.sourceData=s.sourceData,this.doPrepend(),void e.call(this);if(!0===s.loading)return s.callbacks.push(r.proxy(function(){this.sourceData=s.sourceData,this.doPrepend(),e.call(this)},this)),void s.err_callbacks.push(r.proxy(i,this));s.loading=!0,s.callbacks=[],s.err_callbacks=[]}n=r.extend({url:t,type:"get",cache:!1,dataType:"json",success:r.proxy(function(t){s&&(s.loading=!1),this.sourceData=this.makeArray(t),Array.isArray(this.sourceData)?(s&&(s.sourceData=this.sourceData,r.each(s.callbacks,function(){this.call()})),this.doPrepend(),e.call(this)):(i.call(this),s&&r.each(s.err_callbacks,function(){this.call()}))},this),error:r.proxy(function(){i.call(this),s&&(s.loading=!1,r.each(s.err_callbacks,function(){this.call()}))},this)},this.options.sourceOptions);r.ajax(n)}else this.sourceData=this.makeArray(t),(Array.isArray(this.sourceData)?(this.doPrepend(),e):i).call(this)}},doPrepend:function(){null!=this.options.prepend&&(Array.isArray(this.prependData)||(r.isFunction(this.options.prepend)&&(this.options.prepend=this.options.prepend.call(this.options.scope)),this.options.prepend=r.fn.editableutils.tryParseJson(this.options.prepend,!0),"string"==typeof this.options.prepend&&(this.options.prepend={"":this.options.prepend}),this.prependData=this.makeArray(this.options.prepend)),Array.isArray(this.prependData))&&Array.isArray(this.sourceData)&&(this.sourceData=this.prependData.concat(this.sourceData))},renderList:function(){},value2htmlFinal:function(t,e){},makeArray:function(t){var i,s,e,n=[];if(!t||"string"==typeof t)return null;if(Array.isArray(t))for(var a=function(t,e){if(s={value:t,text:e},2<=i++)return!1},o=0;o<t.length;o++)"object"==typeof(e=t[o])?(i=0,r.each(e,a),1===i?n.push(s):1<i&&(e.children&&(e.children=this.makeArray(e.children)),n.push(e))):n.push({value:e,text:e});else r.each(t,function(t,e){n.push({value:t,text:e})});return n},option:function(t,e){this.options[t]=e,"source"===t&&(this.sourceData=null),"prepend"===t&&(this.prependData=null)}}),t.defaults=r.extend({},r.fn.editabletypes.abstractinput.defaults,{source:null,prepend:!1,sourceError:"Error when loading list",sourceCache:!0,sourceOptions:null}),r.fn.editabletypes.list=t})(window.jQuery),(i=>{function e(t){this.init("text",t,e.defaults)}i.fn.editableutils.inherit(e,i.fn.editabletypes.abstractinput),i.extend(e.prototype,{render:function(){this.renderClear(),this.setClass(),this.setAttr("placeholder")},activate:function(){this.$input.is(":visible")&&(this.$input.focus(),i.fn.editableutils.setCursorPosition(this.$input.get(0),this.$input.val().length),this.toggleClear)&&this.toggleClear()},renderClear:function(){this.options.clear&&(this.$clear=i('<span class="editable-clear-x"></span>'),this.$input.after(this.$clear).css("padding-right",24).keyup(i.proxy(function(t){var e;~i.inArray(t.keyCode,[40,38,9,13,27])||(clearTimeout(this.t),(e=this).t=setTimeout(function(){e.toggleClear(t)},100))},this)).parent().css("position","relative"),this.$clear.click(i.proxy(this.clear,this)))},postrender:function(){},toggleClear:function(t){var e,i;this.$clear&&(e=this.$input.val().length,i=this.$clear.is(":visible"),e&&!i&&this.$clear.show(),!e)&&i&&this.$clear.hide()},clear:function(){this.$clear.hide(),this.$input.val("").focus()}}),e.defaults=i.extend({},i.fn.editabletypes.abstractinput.defaults,{tpl:'<input type="text">',placeholder:null,clear:!0}),i.fn.editabletypes.text=e})(window.jQuery),(e=>{function i(t){this.init("textarea",t,i.defaults)}e.fn.editableutils.inherit(i,e.fn.editabletypes.abstractinput),e.extend(i.prototype,{render:function(){this.setClass(),this.setAttr("placeholder"),this.setAttr("rows"),this.$input.keydown(function(t){t.ctrlKey&&13===t.which&&e(this).closest("form").submit()})},activate:function(){e.fn.editabletypes.text.prototype.activate.call(this)}}),i.defaults=e.extend({},e.fn.editabletypes.abstractinput.defaults,{tpl:"<textarea></textarea>",inputclass:"input-large",placeholder:null,rows:7}),e.fn.editabletypes.textarea=i})(window.jQuery),(a=>{function e(t){this.init("select",t,e.defaults)}a.fn.editableutils.inherit(e,a.fn.editabletypes.list),a.extend(e.prototype,{renderList:function(){this.$input.empty();var n=function(t,e){var i;if(Array.isArray(e))for(var s=0;s<e.length;s++)i={},e[s].children?(i.label=e[s].text,t.append(n(a("<optgroup>",i),e[s].children))):(i.value=e[s].value,e[s].disabled&&(i.disabled=!0),t.append(a("<option>",i).text(e[s].text)));return t};n(this.$input,this.sourceData),this.setClass(),this.$input.on("keydown.editable",function(t){13===t.which&&a(this).closest("form").submit()})},value2htmlFinal:function(t,e){var i="",t=a.fn.editableutils.itemsByValue(t,this.sourceData);t.length&&(i=t[0].text),a.fn.editabletypes.abstractinput.prototype.value2html.call(this,i,e)},autosubmit:function(){this.$input.off("keydown.editable").on("change.editable",function(){a(this).closest("form").submit()})}}),e.defaults=a.extend({},a.fn.editabletypes.list.defaults,{tpl:"<select></select>"}),a.fn.editabletypes.select=e})(window.jQuery),(n=>{function e(t){this.init("checklist",t,e.defaults)}n.fn.editableutils.inherit(e,n.fn.editabletypes.list),n.extend(e.prototype,{renderList:function(){var t;if(this.$tpl.empty(),Array.isArray(this.sourceData)){for(var e=0;e<this.sourceData.length;e++)t=n("<label>").append(n("<input>",{type:"checkbox",value:this.sourceData[e].value})).append(n("<span>").text(" "+this.sourceData[e].text)),n("<div>").append(t).appendTo(this.$tpl);this.$input=this.$tpl.find('input[type="checkbox"]'),this.setClass()}},value2str:function(t){return Array.isArray(t)?t.sort().join(this.options.separator.trim()):""},str2value:function(t){var e;return"string"==typeof t&&t.length?(e=new RegExp("\\s*"+n.trim(this.options.separator)+"\\s*"),t.split(e)):Array.isArray(t)?t:[t]},value2input:function(s){this.$input.prop("checked",!1),Array.isArray(s)&&s.length&&this.$input.each(function(t,e){var i=n(e);n.each(s,function(t,e){i.val()==e&&i.prop("checked",!0)})})},input2value:function(){var i=[];return this.$input.filter(":checked").each(function(t,e){i.push(n(e).val())}),i},value2htmlFinal:function(t,e){var i=[],t=n.fn.editableutils.itemsByValue(t,this.sourceData),s=this.options.escape;t.length?(n.each(t,function(t,e){e=s?n.fn.editableutils.escape(e.text):e.text;i.push(e)}),n(e).html(i.join("<br>"))):n(e).empty()},activate:function(){this.$input.first().focus()},autosubmit:function(){this.$input.on("keydown",function(t){13===t.which&&n(this).closest("form").submit()})}}),e.defaults=n.extend({},n.fn.editabletypes.list.defaults,{tpl:'<div class="editable-checklist"></div>',inputclass:null,separator:","}),n.fn.editabletypes.checklist=e})(window.jQuery),(i=>{function e(t){this.init("password",t,e.defaults)}i.fn.editableutils.inherit(e,i.fn.editabletypes.text),i.extend(e.prototype,{value2html:function(t,e){t?i(e).text("[hidden]"):i(e).empty()},html2value:function(t){return null}}),e.defaults=i.extend({},i.fn.editabletypes.text.defaults,{tpl:'<input type="password">'}),i.fn.editabletypes.password=e})(window.jQuery),(t=>{function e(t){this.init("email",t,e.defaults)}t.fn.editableutils.inherit(e,t.fn.editabletypes.text),e.defaults=t.extend({},t.fn.editabletypes.text.defaults,{tpl:'<input type="email">'}),t.fn.editabletypes.email=e})(window.jQuery),(t=>{function e(t){this.init("url",t,e.defaults)}t.fn.editableutils.inherit(e,t.fn.editabletypes.text),e.defaults=t.extend({},t.fn.editabletypes.text.defaults,{tpl:'<input type="url">'}),t.fn.editabletypes.url=e})(window.jQuery),(t=>{function e(t){this.init("tel",t,e.defaults)}t.fn.editableutils.inherit(e,t.fn.editabletypes.text),e.defaults=t.extend({},t.fn.editabletypes.text.defaults,{tpl:'<input type="tel">'}),t.fn.editabletypes.tel=e})(window.jQuery),(t=>{function e(t){this.init("number",t,e.defaults)}t.fn.editableutils.inherit(e,t.fn.editabletypes.text),t.extend(e.prototype,{render:function(){e.superclass.render.call(this),this.setAttr("min"),this.setAttr("max"),this.setAttr("step")},postrender:function(){this.$clear&&this.$clear.css({right:24})}}),e.defaults=t.extend({},t.fn.editabletypes.text.defaults,{tpl:'<input type="number">',inputclass:"input-mini",min:null,max:null,step:null}),t.fn.editabletypes.number=e})(window.jQuery),(t=>{function e(t){this.init("range",t,e.defaults)}t.fn.editableutils.inherit(e,t.fn.editabletypes.number),t.extend(e.prototype,{render:function(){this.$input=this.$tpl.filter("input"),this.setClass(),this.setAttr("min"),this.setAttr("max"),this.setAttr("step"),this.$input.on("input",function(){t(this).siblings("output").text(t(this).val())})},activate:function(){this.$input.focus()}}),e.defaults=t.extend({},t.fn.editabletypes.number.defaults,{tpl:'<input type="range"><output style="width: 30px; display: inline-block"></output>',inputclass:"input-medium"}),t.fn.editabletypes.range=e})(window.jQuery),(t=>{function e(t){this.init("time",t,e.defaults)}t.fn.editableutils.inherit(e,t.fn.editabletypes.abstractinput),t.extend(e.prototype,{render:function(){this.setClass()}}),e.defaults=t.extend({},t.fn.editabletypes.abstractinput.defaults,{tpl:'<input type="time">'}),t.fn.editabletypes.time=e})(window.jQuery),(a=>{function o(t){var e,i;this.init("select2",t,o.defaults),t.select2=t.select2||{},this.sourceData=null,t.placeholder&&(t.select2.placeholder=t.placeholder),!t.select2.tags&&t.source&&(e=t.source,"string"==typeof(e=a.isFunction(t.source)?t.source.call(t.scope):e)?(t.select2.ajax=t.select2.ajax||{},t.select2.ajax.data||(t.select2.ajax.data=function(t){return{query:t}}),t.select2.ajax.results||(t.select2.ajax.results=function(t){return{results:t}}),t.select2.ajax.url=e):(this.sourceData=this.convertSource(e),t.select2.data=this.sourceData)),this.options.select2=a.extend({},o.defaults.select2,t.select2),this.isMultiple=this.options.select2.tags||this.options.select2.multiple,this.isRemote="ajax"in this.options.select2,this.idFunc=this.options.select2.id,"function"!=typeof this.idFunc&&(i=this.idFunc||"id",this.idFunc=function(t){return t[i]}),this.formatSelection=this.options.select2.formatSelection,"function"!=typeof this.formatSelection&&(this.formatSelection=function(t){return t.text})}a.fn.editableutils.inherit(o,a.fn.editabletypes.abstractinput),a.extend(o.prototype,{render:function(){this.setClass(),this.isRemote&&this.$input.on("select2-loaded",a.proxy(function(t){this.sourceData=t.items.results},this)),this.isMultiple&&this.$input.on("change",function(){a(this).closest("form").parent().triggerHandler("resize")})},value2html:function(t,e){var i,s="",n=this;this.options.select2.tags?i=t:this.sourceData&&(i=a.fn.editableutils.itemsByValue(t,this.sourceData,this.idFunc)),Array.isArray(i)?(s=[],a.each(i,function(t,e){s.push(e&&"object"==typeof e?n.formatSelection(e):e)})):i&&(s=n.formatSelection(i)),s=Array.isArray(s)?s.join(this.options.viewseparator):s,o.superclass.value2html.call(this,s,e)},html2value:function(t){return this.options.select2.tags?this.str2value(t,this.options.viewseparator):null},value2input:function(t){var e,i;Array.isArray(t)&&(t=t.join(this.getSeparator())),this.$input.data("select2")?this.$input.val(t).trigger("change",!0):(this.$input.val(t),this.$input.select2(this.options.select2)),!this.isRemote||this.isMultiple||this.options.select2.initSelection||(e=this.options.select2.id,i=this.options.select2.formatSelection,e)||i||(e=a(this.options.scope)).data("editable").isEmpty||(i={id:t,text:e.text()},this.$input.select2("data",i))},input2value:function(){return this.$input.select2("val")},str2value:function(t,e){if("string"!=typeof t||!this.isMultiple)return t;var i,s,n;if(e=e||this.getSeparator(),null===t||t.length<1)return null;for(s=0,n=(i=t.split(e)).length;s<n;s+=1)i[s]=a.trim(i[s]);return i},autosubmit:function(){this.$input.on("change",function(t,e){e||a(this).closest("form").submit()})},getSeparator:function(){return this.options.select2.separator||a.fn.select2.defaults.separator},convertSource:function(t){if(Array.isArray(t)&&t.length&&void 0!==t[0].value)for(var e=0;e<t.length;e++)void 0!==t[e].value&&(t[e].id=t[e].value,delete t[e].value);return t},destroy:function(){this.$input&&this.$input.data("select2")&&this.$input.select2("destroy")}}),o.defaults=a.extend({},a.fn.editabletypes.abstractinput.defaults,{tpl:'<input type="hidden">',select2:null,placeholder:null,source:null,viewseparator:", "}),a.fn.editabletypes.select2=o})(window.jQuery),(o=>{function n(t,e){this.$element=o(t),this.$element.is("input")?(this.options=o.extend({},o.fn.combodate.defaults,e,this.$element.data()),this.init()):o.error("Combodate should be applied to INPUT element")}n.prototype={constructor:n,init:function(){this.map={day:["D","date"],month:["M","month"],year:["Y","year"],hour:["[Hh]","hours"],minute:["m","minutes"],second:["s","seconds"],ampm:["[Aa]",""]},this.$widget=o('<span class="combodate"></span>').html(this.getTemplate()),this.initCombos(),this.$widget.on("change","select",o.proxy(function(t){this.$element.val(this.getValue()).change(),this.options.smartDays&&(o(t.target).is(".month")||o(t.target).is(".year"))&&this.fillCombo("day")},this)),this.$widget.find("select").css("width","auto"),this.$element.hide().after(this.$widget),this.setValue(this.$element.val()||this.options.value)},getTemplate:function(){var s=this.options.template;return o.each(this.map,function(t,e){e=e[0];var i=new RegExp(e+"+"),e=1<e.length?e.substring(1,2):e;s=s.replace(i,"{"+e+"}")}),s=s.replace(/ /g,"&nbsp;"),o.each(this.map,function(t,e){e=1<(e=e[0]).length?e.substring(1,2):e;s=s.replace("{"+e+"}",'<select class="'+t+'"></select>')}),s},initCombos:function(){for(var t in this.map){var e=this.$widget.find("."+t);this["$"+t]=e.length?e:null,this.fillCombo(t)}},fillCombo:function(t){var e=this["$"+t];if(e){var i=this["fill"+t.charAt(0).toUpperCase()+t.slice(1)](),t=e.val();e.empty();for(var s=0;s<i.length;s++)e.append('<option value="'+i[s][0]+'">'+i[s][1]+"</option>");e.val(t)}},fillCommon:function(t){var e,i=[];return"name"===this.options.firstItem?(e=(e="function"==typeof(e=moment.relativeTime||moment.langData()._relativeTime)[t]?e[t](1,!0,t,!1):e[t]).split(" ").reverse()[0],i.push(["",e])):"empty"===this.options.firstItem&&i.push(["",""]),i},fillDay:function(){var t,e,i,s,n=this.fillCommon("d"),a=-1!==this.options.template.indexOf("DD"),o=31;for(this.options.smartDays&&this.$month&&this.$year&&(i=parseInt(this.$month.val(),10),s=parseInt(this.$year.val(),10),isNaN(i)||isNaN(s)||(o=moment([s,i]).daysInMonth())),e=1;e<=o;e++)t=a?this.leadZero(e):e,n.push([e,t]);return n},fillMonth:function(){for(var t,e=this.fillCommon("M"),i=-1!==this.options.template.indexOf("MMMM"),s=-1!==this.options.template.indexOf("MMM"),n=-1!==this.options.template.indexOf("MM"),a=0;a<=11;a++)t=i?moment().date(1).month(a).format("MMMM"):s?moment().date(1).month(a).format("MMM"):n?this.leadZero(a+1):a+1,e.push([a,t]);return e},fillYear:function(){for(var t,e=[],i=-1!==this.options.template.indexOf("YYYY"),s=this.options.maxYear;s>=this.options.minYear;s--)t=i?s:(s+"").substring(2),e[this.options.yearDescending?"push":"unshift"]([s,t]);return e=this.fillCommon("y").concat(e)},fillHour:function(){for(var t,e=this.fillCommon("h"),i=-1!==this.options.template.indexOf("h"),s=(this.options.template.indexOf("H"),-1!==this.options.template.toLowerCase().indexOf("hh")),n=i?12:23,a=i?1:0;a<=n;a++)t=s?this.leadZero(a):a,e.push([a,t]);return e},fillMinute:function(){for(var t,e=this.fillCommon("m"),i=-1!==this.options.template.indexOf("mm"),s=0;s<=59;s+=this.options.minuteStep)t=i?this.leadZero(s):s,e.push([s,t]);return e},fillSecond:function(){for(var t,e=this.fillCommon("s"),i=-1!==this.options.template.indexOf("ss"),s=0;s<=59;s+=this.options.secondStep)t=i?this.leadZero(s):s,e.push([s,t]);return e},fillAmpm:function(){var t=-1!==this.options.template.indexOf("a");this.options.template.indexOf("A");return[["am",t?"am":"AM"],["pm",t?"pm":"PM"]]},getValue:function(t){var e,s={},n=this,a=!1;return o.each(this.map,function(t,e){var i;if("ampm"!==t)return i="day"===t?1:0,s[t]=n["$"+t]?parseInt(n["$"+t].val(),10):i,isNaN(s[t])?!(a=!0):void 0}),a?"":(this.$ampm&&(s.hour=12===s.hour?"am"===this.$ampm.val()?0:12:"am"===this.$ampm.val()?s.hour:s.hour+12),e=moment([s.year,s.month,s.day,s.hour,s.minute,s.second]),this.highlight(e),null===(t=void 0===t?this.options.format:t)?e.isValid()?e:null:e.isValid()?e.format(t):"")},setValue:function(t){var i,s,n;function a(t,s){var n={};return t.children("option").each(function(t,e){var i,e=o(e).attr("value");""!==e&&(i=Math.abs(e-s),void 0===n.distance||i<n.distance)&&(n={value:e,distance:i})}),n.value}t&&(i="string"==typeof t?moment(t,this.options.format):moment(t),s=this,n={},i.isValid())&&(o.each(this.map,function(t,e){"ampm"!==t&&(n[t]=i[e[1]]())}),this.$ampm&&(12<=n.hour?(n.ampm="pm",12<n.hour&&(n.hour-=12)):(n.ampm="am",0===n.hour&&(n.hour=12))),o.each(n,function(t,e){s["$"+t]&&("minute"===t&&1<s.options.minuteStep&&s.options.roundTime&&(e=a(s["$"+t],e)),"second"===t&&1<s.options.secondStep&&s.options.roundTime&&(e=a(s["$"+t],e)),s["$"+t].val(e))}),this.options.smartDays&&this.fillCombo("day"),this.$element.val(i.format(this.options.format)).change())},highlight:function(t){t.isValid()?this.options.errorClass?this.$widget.removeClass(this.options.errorClass):this.$widget.find("select").css("border-color",this.borderColor):this.options.errorClass?this.$widget.addClass(this.options.errorClass):(this.borderColor||(this.borderColor=this.$widget.find("select").css("border-color")),this.$widget.find("select").css("border-color","red"))},leadZero:function(t){return t<=9?"0"+t:t},destroy:function(){this.$widget.remove(),this.$element.removeData("combodate").show()}},o.fn.combodate=function(i){var t,s=Array.apply(null,arguments);return s.shift(),"getValue"===i&&this.length&&(t=this.eq(0).data("combodate"))?t.getValue.apply(t,s):this.each(function(){var t=o(this),e=t.data("combodate");e||t.data("combodate",e=new n(this,"object"==typeof i&&i)),"string"==typeof i&&"function"==typeof e[i]&&e[i].apply(e,s)})},o.fn.combodate.defaults={format:"DD-MM-YYYY HH:mm",template:"D / MMM / YYYY   H : mm",value:null,minYear:1970,maxYear:(new Date).getFullYear(),yearDescending:!0,minuteStep:5,secondStep:1,firstItem:"empty",errorClass:null,roundTime:!0,smartDays:!1}})(window.jQuery),(e=>{function i(t){this.init("combodate",t,i.defaults),this.options.viewformat||(this.options.viewformat=this.options.format),t.combodate=e.fn.editableutils.tryParseJson(t.combodate,!0),this.options.combodate=e.extend({},i.defaults.combodate,t.combodate,{format:this.options.format,template:this.options.template})}e.fn.editableutils.inherit(i,e.fn.editabletypes.abstractinput),e.extend(i.prototype,{render:function(){this.$input.combodate(this.options.combodate),"bs3"===e.fn.editableform.engine&&this.$input.siblings().find("select").addClass("form-control"),this.options.inputclass&&this.$input.siblings().find("select").addClass(this.options.inputclass)},value2html:function(t,e){t=t?t.format(this.options.viewformat):"";i.superclass.value2html.call(this,t,e)},html2value:function(t){return t?moment(t,this.options.viewformat):null},value2str:function(t){return t?t.format(this.options.format):""},str2value:function(t){return t?moment(t,this.options.format):null},value2submit:function(t){return this.value2str(t)},value2input:function(t){this.$input.combodate("setValue",t)},input2value:function(){return this.$input.combodate("getValue",null)},activate:function(){this.$input.siblings(".combodate").find("select").eq(0).focus()},autosubmit:function(){}}),i.defaults=e.extend({},e.fn.editabletypes.abstractinput.defaults,{tpl:'<input type="text">',inputclass:null,format:"YYYY-MM-DD",viewformat:null,template:"D / MMM / YYYY",combodate:null}),e.fn.editabletypes.combodate=i})(window.jQuery),(s=>{var n=s.fn.editableform.Constructor.prototype.initInput;s.extend(s.fn.editableform.Constructor.prototype,{initTemplate:function(){this.$form=s(s.fn.editableform.template),this.$form.find(".editable-error-block").addClass("help-block")},initInput:function(){n.apply(this);var t=null===this.input.options.inputclass||!1===this.input.options.inputclass,e="input-medium",i="text,select,textarea,password,email,url,tel,number,range,time".split(",");~s.inArray(this.input.type,i)&&t&&(this.input.options.inputclass=e,this.input.$input.addClass(e))}}),s.fn.editableform.buttons='<button type="submit" class="btn btn-primary editable-submit"><i class="icon-ok icon-white"></i></button><button type="button" class="btn editable-cancel"><i class="icon-remove"></i></button>',s.fn.editableform.errorGroupClass="error",s.fn.editableform.errorBlockClass=null,s.fn.editableform.engine="bs2"})(window.jQuery),(u=>{u.extend(u.fn.editableContainer.Popup.prototype,{containerName:"popover",innerCss:u.fn.popover&&u(u.fn.popover.defaults.template).find("p").length?".popover-content p":".popover-content",defaults:u.fn.popover.defaults,initContainer:function(){var t;u.extend(this.containerOptions,{trigger:"manual",selector:!1,content:" ",template:this.defaults.template}),this.$element.data("template")&&(t=this.$element.data("template"),this.$element.removeData("template")),this.call(this.containerOptions),t&&this.$element.data("template",t)},innerShow:function(){this.call("show")},innerHide:function(){this.call("hide")},innerDestroy:function(){this.call("destroy")},setContainerOption:function(t,e){this.container().options[t]=e},setPosition:function(){!function(){var t,e,i,s,n,a,o,r,l=this.tip(),h="function"==typeof this.options.placement?this.options.placement.call(this,l[0],this.$element[0]):this.options.placement,p=/in/.test(h);switch(l.removeClass("top right bottom left").css({top:0,left:0,display:"block"}),t=this.getPosition(p),e=l[0].offsetWidth,i=l[0].offsetHeight,h=p?h.split(" ")[1]:h,a={top:t.top+t.height,left:t.left+t.width/2-e/2},n={top:t.top-i,left:t.left+t.width/2-e/2},o={top:t.top+t.height/2-i/2,left:t.left-e},r={top:t.top+t.height/2-i/2,left:t.left+t.width},h){case"bottom":a.top+i>u(window).scrollTop()+u(window).height()&&(h=n.top>u(window).scrollTop()?"top":!(r.left+e<u(window).scrollLeft()+u(window).width())&&o.left>u(window).scrollLeft()?"left":"right");break;case"top":n.top<u(window).scrollTop()&&(h=a.top+i<u(window).scrollTop()+u(window).height()?"bottom":!(r.left+e<u(window).scrollLeft()+u(window).width())&&o.left>u(window).scrollLeft()?"left":"right");break;case"left":o.left<u(window).scrollLeft()&&(h=r.left+e<u(window).scrollLeft()+u(window).width()?"right":n.top>u(window).scrollTop()?"top":n.top>u(window).scrollTop()?"bottom":"right");break;case"right":r.left+e>u(window).scrollLeft()+u(window).width()&&(o.left>u(window).scrollLeft()?h="left":n.top>u(window).scrollTop()?h="top":n.top>u(window).scrollTop()&&(h="bottom"))}switch(h){case"bottom":s=a;break;case"top":s=n;break;case"left":s=o;break;case"right":s=r}l.offset(s).addClass(h).addClass("in")}.call(this.container())}})})(window.jQuery),(y=>{function v(){return new Date(Date.UTC.apply(Date,arguments))}function b(t,e){this._process_options(e),this.element=y(t),this.isInline=!1,this.isInput=this.element.is("input"),this.component=!!this.element.is(".date")&&this.element.find(".add-on, .btn"),this.hasInput=this.component&&this.element.find("input").length,this.component&&0===this.component.length&&(this.component=!1),this.picker=y(w.template),this._buildEvents(),this._attachEvents(),this.isInline?this.picker.addClass("datepicker-inline").appendTo(this.element):this.picker.addClass("datepicker-dropdown dropdown-menu"),this.o.rtl&&(this.picker.addClass("datepicker-rtl"),this.picker.find(".prev i, .next i").toggleClass("icon-arrow-left icon-arrow-right")),this.viewMode=this.o.startView,this.o.calendarWeeks&&this.picker.find("tfoot th.today").attr("colspan",function(t,e){return parseInt(e)+1}),this._allow_update=!1,this.setStartDate(this.o.startDate),this.setEndDate(this.o.endDate),this.setDaysOfWeekDisabled(this.o.daysOfWeekDisabled),this.fillDow(),this.fillMonths(),this._allow_update=!0,this.update(),this.showMode(),this.isInline&&this.show()}function l(t,e){this.element=y(t),this.inputs=y.map(e.inputs,function(t){return t.jquery?t[0]:t}),delete e.inputs,y(this.inputs).datepicker(e).bind("changeDate",y.proxy(this.dateUpdated,this)),this.pickers=y.map(this.inputs,function(t){return y(t).data("datepicker")}),this.updateDates()}b.prototype={constructor:b,_process_options:function(t){this._o=y.extend({},this._o,t);var e=this.o=y.extend({},this._o),t=e.language;switch(g[t]||(t=t.split("-")[0],g[t])||(t=h.language),e.language=t,e.startView){case 2:case"decade":e.startView=2;break;case 1:case"year":e.startView=1;break;default:e.startView=0}switch(e.minViewMode){case 1:case"months":e.minViewMode=1;break;case 2:case"years":e.minViewMode=2;break;default:e.minViewMode=0}e.startView=Math.max(e.startView,e.minViewMode),e.weekStart%=7,e.weekEnd=(e.weekStart+6)%7;t=w.parseFormat(e.format);e.startDate!==-1/0&&(e.startDate=w.parseDate(e.startDate,t,e.language)),e.endDate!==1/0&&(e.endDate=w.parseDate(e.endDate,t,e.language)),e.daysOfWeekDisabled=e.daysOfWeekDisabled||[],Array.isArray(e.daysOfWeekDisabled)||(e.daysOfWeekDisabled=e.daysOfWeekDisabled.split(/[,\s]*/)),e.daysOfWeekDisabled=y.map(e.daysOfWeekDisabled,function(t){return parseInt(t,10)})},_events:[],_secondaryEvents:[],_applyEvents:function(t){for(var e,i,s=0;s<t.length;s++)e=t[s][0],i=t[s][1],e.on(i)},_unapplyEvents:function(t){for(var e,i,s=0;s<t.length;s++)e=t[s][0],i=t[s][1],e.off(i)},_buildEvents:function(){this.isInput?this._events=[[this.element,{focus:y.proxy(this.show,this),keyup:y.proxy(this.update,this),keydown:y.proxy(this.keydown,this)}]]:this.component&&this.hasInput?this._events=[[this.element.find("input"),{focus:y.proxy(this.show,this),keyup:y.proxy(this.update,this),keydown:y.proxy(this.keydown,this)}],[this.component,{click:y.proxy(this.show,this)}]]:this.element.is("div")?this.isInline=!0:this._events=[[this.element,{click:y.proxy(this.show,this)}]],this._secondaryEvents=[[this.picker,{click:y.proxy(this.click,this)}],[y(window),{resize:y.proxy(this.place,this)}],[y(document),{mousedown:y.proxy(function(t){this.element.is(t.target)||this.element.find(t.target).size()||this.picker.is(t.target)||this.picker.find(t.target).size()||this.hide()},this)}]]},_attachEvents:function(){this._detachEvents(),this._applyEvents(this._events)},_detachEvents:function(){this._unapplyEvents(this._events)},_attachSecondaryEvents:function(){this._detachSecondaryEvents(),this._applyEvents(this._secondaryEvents)},_detachSecondaryEvents:function(){this._unapplyEvents(this._secondaryEvents)},_trigger:function(t,e){var i=e||this.date,e=new Date(i.getTime()+6e4*i.getTimezoneOffset());this.element.trigger({type:t,date:e,format:y.proxy(function(t){t=t||this.o.format;return w.formatDate(i,t,this.o.language)},this)})},show:function(t){this.isInline||this.picker.appendTo("body"),this.picker.show(),this.height=(this.component||this.element).outerHeight(),this.place(),this._attachSecondaryEvents(),t&&t.preventDefault(),this._trigger("show")},hide:function(t){this.isInline||this.picker.is(":visible")&&(this.picker.hide().detach(),this._detachSecondaryEvents(),this.viewMode=this.o.startView,this.showMode(),this.o.forceParse&&(this.isInput&&this.element.val()||this.hasInput&&this.element.find("input").val())&&this.setValue(),this._trigger("hide"))},remove:function(){this.hide(),this._detachEvents(),this._detachSecondaryEvents(),this.picker.remove(),delete this.element.data().datepicker,this.isInput||delete this.element.data().date},getDate:function(){var t=this.getUTCDate();return new Date(t.getTime()+6e4*t.getTimezoneOffset())},getUTCDate:function(){return this.date},setDate:function(t){this.setUTCDate(new Date(t.getTime()-6e4*t.getTimezoneOffset()))},setUTCDate:function(t){this.date=t,this.setValue()},setValue:function(){var t=this.getFormattedDate();this.isInput?this.element.val(t):this.component&&this.element.find("input").val(t)},getFormattedDate:function(t){return void 0===t&&(t=this.o.format),w.formatDate(this.date,t,this.o.language)},setStartDate:function(t){this._process_options({startDate:t}),this.update(),this.updateNavArrows()},setEndDate:function(t){this._process_options({endDate:t}),this.update(),this.updateNavArrows()},setDaysOfWeekDisabled:function(t){this._process_options({daysOfWeekDisabled:t}),this.update(),this.updateNavArrows()},place:function(){var t,e,i;this.isInline||(t=parseInt(this.element.parents().filter(function(){return"auto"!=y(this).css("z-index")}).first().css("z-index"))+10,e=(this.component?this.component.parent():this.element).offset(),i=(this.component||this.element).outerHeight(!0),this.picker.css({top:e.top+i,left:e.left,zIndex:t}))},_allow_update:!0,update:function(){var t,e;this._allow_update&&(e=!1,arguments&&arguments.length&&("string"==typeof arguments[0]||arguments[0]instanceof Date)?(t=arguments[0],e=!0):(t=this.isInput?this.element.val():this.element.data("date")||this.element.find("input").val(),delete this.element.data().date),this.date=w.parseDate(t,this.o.format,this.o.language),e&&this.setValue(),this.date<this.o.startDate?this.viewDate=new Date(this.o.startDate):this.date>this.o.endDate?this.viewDate=new Date(this.o.endDate):this.viewDate=new Date(this.date),this.fill())},fillDow:function(){var t,e=this.o.weekStart,i="<tr>";for(this.o.calendarWeeks&&(i+=t='<th class="cw">&nbsp;</th>',this.picker.find(".datepicker-days thead tr:first-child").prepend(t));e<this.o.weekStart+7;)i+='<th class="dow">'+g[this.o.language].daysMin[e++%7]+"</th>";i+="</tr>",this.picker.find(".datepicker-days thead").append(i)},fillMonths:function(){for(var t="",e=0;e<12;)t+='<span class="month">'+g[this.o.language].monthsShort[e++]+"</span>";this.picker.find(".datepicker-months td").html(t)},setRange:function(t){t&&t.length?this.range=y.map(t,function(t){return t.valueOf()}):delete this.range,this.fill()},getClassNames:function(t){var e=[],i=this.viewDate.getUTCFullYear(),s=this.viewDate.getUTCMonth(),n=this.date.valueOf(),a=new Date;return t.getUTCFullYear()<i||t.getUTCFullYear()==i&&t.getUTCMonth()<s?e.push("old"):(t.getUTCFullYear()>i||t.getUTCFullYear()==i&&t.getUTCMonth()>s)&&e.push("new"),this.o.todayHighlight&&t.getUTCFullYear()==a.getFullYear()&&t.getUTCMonth()==a.getMonth()&&t.getUTCDate()==a.getDate()&&e.push("today"),n&&t.valueOf()==n&&e.push("active"),(t.valueOf()<this.o.startDate||t.valueOf()>this.o.endDate||-1!==y.inArray(t.getUTCDay(),this.o.daysOfWeekDisabled))&&e.push("disabled"),this.range&&(t>this.range[0]&&t<this.range[this.range.length-1]&&e.push("range"),-1!=y.inArray(t.valueOf(),this.range))&&e.push("selected"),e},fill:function(){for(var t,e=new Date(this.viewDate),i=e.getUTCFullYear(),e=e.getUTCMonth(),s=this.o.startDate!==-1/0?this.o.startDate.getUTCFullYear():-1/0,n=this.o.startDate!==-1/0?this.o.startDate.getUTCMonth():-1/0,a=this.o.endDate!==1/0?this.o.endDate.getUTCFullYear():1/0,o=this.o.endDate!==1/0?this.o.endDate.getUTCMonth():1/0,r=(this.date&&this.date.valueOf(),this.picker.find(".datepicker-days thead th.datepicker-switch").text(g[this.o.language].months[e]+" "+i),this.picker.find("tfoot th.today").text(g[this.o.language].today).toggle(!1!==this.o.todayBtn),this.picker.find("tfoot th.clear").text(g[this.o.language].clear).toggle(!1!==this.o.clearBtn),this.updateNavArrows(),this.fillMonths(),v(i,e-1,28,0,0,0,0)),e=w.getDaysInMonth(r.getUTCFullYear(),r.getUTCMonth()),l=(r.setUTCDate(e),r.setUTCDate(e-(r.getUTCDay()-this.o.weekStart+7)%7),new Date(r)),h=(l.setUTCDate(l.getUTCDate()+42),l=l.valueOf(),[]);r.valueOf()<l;){r.getUTCDay()==this.o.weekStart&&(h.push("<tr>"),this.o.calendarWeeks)&&(p=new Date(+r+(this.o.weekStart-r.getUTCDay()-7)%7*864e5),p=new Date(+p+(11-p.getUTCDay())%7*864e5),u=new Date(+(u=v(p.getUTCFullYear(),0,1))+(11-u.getUTCDay())%7*864e5),h.push('<td class="cw">'+((p-u)/864e5/7+1)+"</td>")),(p=this.getClassNames(r)).push("day");var p,u=this.o.beforeShowDay(r);void 0===u?u={}:"boolean"==typeof u?u={enabled:u}:"string"==typeof u&&(u={classes:u}),!1===u.enabled&&p.push("disabled"),u.classes&&(p=p.concat(u.classes.split(/\s+/))),u.tooltip&&(t=u.tooltip),p=y.unique(p),h.push('<td class="'+p.join(" ")+'"'+(t?' title="'+t+'"':"")+">"+r.getUTCDate()+"</td>"),r.getUTCDay()==this.o.weekEnd&&h.push("</tr>"),r.setUTCDate(r.getUTCDate()+1)}this.picker.find(".datepicker-days tbody").empty().append(h.join(""));var d=this.date&&this.date.getUTCFullYear(),e=this.picker.find(".datepicker-months").find("th:eq(1)").text(i).end().find("span").removeClass("active"),n=(d&&d==i&&e.eq(this.date.getUTCMonth()).addClass("active"),(i<s||a<i)&&e.addClass("disabled"),i==s&&e.slice(0,n).addClass("disabled"),i==a&&e.slice(o+1).addClass("disabled"),h="",i=10*parseInt(i/10,10),this.picker.find(".datepicker-years").find("th:eq(1)").text(i+"-"+(i+9)).end().find("td"));--i;for(var c=-1;c<11;c++)h+='<span class="year'+(-1==c?" old":10==c?" new":"")+(d==i?" active":"")+(i<s||a<i?" disabled":"")+'">'+i+"</span>",i+=1;n.html(h)},updateNavArrows:function(){if(this._allow_update){var t=new Date(this.viewDate),e=t.getUTCFullYear(),i=t.getUTCMonth();switch(this.viewMode){case 0:this.o.startDate!==-1/0&&e<=this.o.startDate.getUTCFullYear()&&i<=this.o.startDate.getUTCMonth()?this.picker.find(".prev").css({visibility:"hidden"}):this.picker.find(".prev").css({visibility:"visible"}),this.o.endDate!==1/0&&e>=this.o.endDate.getUTCFullYear()&&i>=this.o.endDate.getUTCMonth()?this.picker.find(".next").css({visibility:"hidden"}):this.picker.find(".next").css({visibility:"visible"});break;case 1:case 2:this.o.startDate!==-1/0&&e<=this.o.startDate.getUTCFullYear()?this.picker.find(".prev").css({visibility:"hidden"}):this.picker.find(".prev").css({visibility:"visible"}),this.o.endDate!==1/0&&e>=this.o.endDate.getUTCFullYear()?this.picker.find(".next").css({visibility:"hidden"}):this.picker.find(".next").css({visibility:"visible"})}}},click:function(t){t.preventDefault();var e,i,s,n,a=y(t.target).closest("span, td, th");if(1==a.length)switch(a[0].nodeName.toLowerCase()){case"th":switch(a[0].className){case"datepicker-switch":this.showMode(1);break;case"prev":case"next":var o=w.modes[this.viewMode].navStep*("prev"==a[0].className?-1:1);switch(this.viewMode){case 0:this.viewDate=this.moveMonth(this.viewDate,o);break;case 1:case 2:this.viewDate=this.moveYear(this.viewDate,o)}this.fill();break;case"today":var r=v((r=new Date).getFullYear(),r.getMonth(),r.getDate(),0,0,0),l=(this.showMode(-2),"linked"==this.o.todayBtn?null:"view");this._setDate(r,l);break;case"clear":this.isInput?e=this.element:this.component&&(e=this.element.find("input")),e&&e.val("").change(),this._trigger("changeDate"),this.update(),this.o.autoclose&&this.hide()}break;case"span":a.is(".disabled")||(this.viewDate.setUTCDate(1),a.is(".month")?(i=1,n=a.parent().find("span").index(a),s=this.viewDate.getUTCFullYear(),this.viewDate.setUTCMonth(n),this._trigger("changeMonth",this.viewDate),1===this.o.minViewMode&&this._setDate(v(s,n,i,0,0,0,0))):(s=parseInt(a.text(),10)||0,i=1,n=0,this.viewDate.setUTCFullYear(s),this._trigger("changeYear",this.viewDate),2===this.o.minViewMode&&this._setDate(v(s,n,i,0,0,0,0))),this.showMode(-1),this.fill());break;case"td":a.is(".day")&&!a.is(".disabled")&&(i=parseInt(a.text(),10)||1,s=this.viewDate.getUTCFullYear(),n=this.viewDate.getUTCMonth(),a.is(".old")?0===n?(n=11,--s):--n:a.is(".new")&&(11==n?(n=0,s+=1):n+=1),this._setDate(v(s,n,i,0,0,0,0)))}},_setDate:function(t,e){var i;e&&"date"!=e||(this.date=new Date(t)),e&&"view"!=e||(this.viewDate=new Date(t)),this.fill(),this.setValue(),this._trigger("changeDate"),this.isInput?i=this.element:this.component&&(i=this.element.find("input")),i&&(i.change(),!this.o.autoclose||e&&"date"!=e||this.hide())},moveMonth:function(t,e){if(!e)return t;var i,s,n=new Date(t.valueOf()),a=n.getUTCDate(),o=n.getUTCMonth(),r=Math.abs(e);if(e=0<e?1:-1,1==r)s=-1==e?function(){return n.getUTCMonth()==o}:function(){return n.getUTCMonth()!=i},i=o+e,n.setUTCMonth(i),(i<0||11<i)&&(i=(i+12)%12);else{for(var l=0;l<r;l++)n=this.moveMonth(n,e);i=n.getUTCMonth(),n.setUTCDate(a),s=function(){return i!=n.getUTCMonth()}}for(;s();)n.setUTCDate(--a),n.setUTCMonth(i);return n},moveYear:function(t,e){return this.moveMonth(t,12*e)},dateWithinRange:function(t){return t>=this.o.startDate&&t<=this.o.endDate},keydown:function(t){if(this.picker.is(":not(:visible)"))27==t.keyCode&&this.show();else{var e,i,s,n,a=!1;switch(t.keyCode){case 27:this.hide(),t.preventDefault();break;case 37:case 39:this.o.keyboardNavigation&&(e=37==t.keyCode?-1:1,t.ctrlKey?(i=this.moveYear(this.date,e),s=this.moveYear(this.viewDate,e)):t.shiftKey?(i=this.moveMonth(this.date,e),s=this.moveMonth(this.viewDate,e)):((i=new Date(this.date)).setUTCDate(this.date.getUTCDate()+e),(s=new Date(this.viewDate)).setUTCDate(this.viewDate.getUTCDate()+e)),this.dateWithinRange(i))&&(this.date=i,this.viewDate=s,this.setValue(),this.update(),t.preventDefault(),a=!0);break;case 38:case 40:this.o.keyboardNavigation&&(e=38==t.keyCode?-1:1,t.ctrlKey?(i=this.moveYear(this.date,e),s=this.moveYear(this.viewDate,e)):t.shiftKey?(i=this.moveMonth(this.date,e),s=this.moveMonth(this.viewDate,e)):((i=new Date(this.date)).setUTCDate(this.date.getUTCDate()+7*e),(s=new Date(this.viewDate)).setUTCDate(this.viewDate.getUTCDate()+7*e)),this.dateWithinRange(i))&&(this.date=i,this.viewDate=s,this.setValue(),this.update(),t.preventDefault(),a=!0);break;case 13:this.hide(),t.preventDefault();break;case 9:this.hide()}a&&(this._trigger("changeDate"),this.isInput?n=this.element:this.component&&(n=this.element.find("input")),n)&&n.change()}},showMode:function(t){t&&(this.viewMode=Math.max(this.o.minViewMode,Math.min(2,this.viewMode+t))),this.picker.find(">div").hide().filter(".datepicker-"+w.modes[this.viewMode].clsName).css("display","block"),this.updateNavArrows()}},l.prototype={updateDates:function(){this.dates=y.map(this.pickers,function(t){return t.date}),this.updateRanges()},updateRanges:function(){var i=y.map(this.dates,function(t){return t.valueOf()});y.each(this.pickers,function(t,e){e.setRange(i)})},dateUpdated:function(t){var e=y(t.target).data("datepicker").getUTCDate(),i=y.inArray(t.target,this.inputs),s=this.inputs.length;if(-1!=i){if(e<this.dates[i])for(;0<=i&&e<this.dates[i];)this.pickers[i--].setUTCDate(e);else if(e>this.dates[i])for(;i<s&&e>this.dates[i];)this.pickers[i++].setUTCDate(e);this.updateDates()}},remove:function(){y.map(this.pickers,function(t){t.remove()}),delete this.element.data().datepicker}};var t=y.fn.datepicker,i=y.fn.datepicker=function(a){var o,r=Array.apply(null,arguments);return r.shift(),this.each(function(){var t,e,i=y(this),s=i.data("datepicker"),n="object"==typeof a&&a;if(s||(e=((t,e)=>{var i,s=y(t).data(),n={},a=new RegExp("^"+e.toLowerCase()+"([A-Z])"),e=new RegExp("^"+e.toLowerCase());for(i in s)e.test(i)&&(n[i.replace(a,function(t,e){return e.toLowerCase()})]=s[i]);return n})(this,"date"),t=(t=>{var i,s={};if(g[t]||(t=t.split("-")[0],g[t]))return i=g[t],y.each(p,function(t,e){e in i&&(s[e]=i[e])}),s})(y.extend({},h,e,n).language),t=y.extend({},h,t,e,n),i.is(".input-daterange")||t.inputs?(e={inputs:t.inputs||i.find("input").toArray()},i.data("datepicker",s=new l(this,y.extend(t,e)))):i.data("datepicker",s=new b(this,t))),"string"==typeof a&&"function"==typeof s[a]&&void 0!==(o=s[a].apply(s,r)))return!1}),void 0!==o?o:this},h=y.fn.datepicker.defaults={autoclose:!1,beforeShowDay:y.noop,calendarWeeks:!1,clearBtn:!1,daysOfWeekDisabled:[],endDate:1/0,forceParse:!0,format:"mm/dd/yyyy",keyboardNavigation:!0,language:"en",minViewMode:0,rtl:!1,startDate:-1/0,startView:0,todayBtn:!1,todayHighlight:!1,weekStart:0},p=y.fn.datepicker.locale_opts=["format","rtl","weekStart"],g=(y.fn.datepicker.Constructor=b,y.fn.datepicker.dates={en:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],daysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sun"],daysMin:["Su","Mo","Tu","We","Th","Fr","Sa","Su"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],today:"Today",clear:"Clear"}}),w={modes:[{clsName:"days",navFnc:"Month",navStep:1},{clsName:"months",navFnc:"FullYear",navStep:1},{clsName:"years",navFnc:"FullYear",navStep:10}],isLeapYear:function(t){return t%4==0&&t%100!=0||t%400==0},getDaysInMonth:function(t,e){return[31,w.isLeapYear(t)?29:28,31,30,31,30,31,31,30,31,30,31][e]},validParts:/dd?|DD?|mm?|MM?|yy(?:yy)?/g,nonpunctuation:/[^ -\/:-@\[\u3400-\u9fff-`{-~\t\n\r]+/g,parseFormat:function(t){var e=t.replace(this.validParts,"\0").split("\0"),t=t.match(this.validParts);if(e&&e.length&&t&&0!==t.length)return{separators:e,parts:t};throw new Error("Invalid date format.")},parseDate:function(t,e,i){if(!(t instanceof Date)){if("string"==typeof e&&(e=w.parseFormat(e)),/^[\-+]\d+[dmwy]([\s,]+[\-+]\d+[dmwy])*$/.test(t)){var s,n=/([\-+]\d+)([dmwy])/,a=t.match(/([\-+]\d+)([dmwy])/g);t=new Date;for(var o=0;o<a.length;o++)switch(h=n.exec(a[o]),s=parseInt(h[1]),h[2]){case"d":t.setUTCDate(t.getUTCDate()+s);break;case"m":t=b.prototype.moveMonth.call(b.prototype,t,s);break;case"w":t.setUTCDate(t.getUTCDate()+7*s);break;case"y":t=b.prototype.moveYear.call(b.prototype,t,s)}return v(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate(),0,0,0)}var r,l,h,a=t&&t.match(this.nonpunctuation)||[],t=new Date,p={},u=["yyyy","yy","M","MM","m","mm","d","dd"],d={yyyy:function(t,e){return t.setUTCFullYear(e)},yy:function(t,e){return t.setUTCFullYear(2e3+e)},m:function(t,e){for(--e;e<0;)e+=12;for(t.setUTCMonth(e%=12);t.getUTCMonth()!=e;)t.setUTCDate(t.getUTCDate()-1);return t},d:function(t,e){return t.setUTCDate(e)}},c=(d.M=d.MM=d.mm=d.m,d.dd=d.d,t=v(t.getFullYear(),t.getMonth(),t.getDate(),0,0,0),e.parts.slice());if(a.length!=c.length&&(c=y(c).filter(function(t,e){return-1!==y.inArray(e,u)}).toArray()),a.length==c.length){for(var o=0,f=c.length;o<f;o++){if(r=parseInt(a[o],10),h=c[o],isNaN(r))switch(h){case"MM":l=y(g[i].months).filter(function(){var t=this.slice(0,a[o].length);return t==a[o].slice(0,t.length)}),r=y.inArray(l[0],g[i].months)+1;break;case"M":l=y(g[i].monthsShort).filter(function(){var t=this.slice(0,a[o].length);return t==a[o].slice(0,t.length)}),r=y.inArray(l[0],g[i].monthsShort)+1}p[h]=r}for(var m,o=0;o<u.length;o++)(m=u[o])in p&&!isNaN(p[m])&&d[m](t,p[m])}}return t},formatDate:function(t,e,i){"string"==typeof e&&(e=w.parseFormat(e));for(var s={d:t.getUTCDate(),D:g[i].daysShort[t.getUTCDay()],DD:g[i].days[t.getUTCDay()],m:t.getUTCMonth()+1,M:g[i].monthsShort[t.getUTCMonth()],MM:g[i].months[t.getUTCMonth()],yy:t.getUTCFullYear().toString().substring(2),yyyy:t.getUTCFullYear()},t=(s.dd=(s.d<10?"0":"")+s.d,s.mm=(s.m<10?"0":"")+s.m,[]),n=y.extend([],e.separators),a=0,o=e.parts.length;a<=o;a++)n.length&&t.push(n.shift()),t.push(s[e.parts[a]]);return t.join("")},headTemplate:'<thead><tr><th class="prev"><i class="icon-arrow-left"/></th><th colspan="5" class="datepicker-switch"></th><th class="next"><i class="icon-arrow-right"/></th></tr></thead>',contTemplate:'<tbody><tr><td colspan="7"></td></tr></tbody>',footTemplate:'<tfoot><tr><th colspan="7" class="today"></th></tr><tr><th colspan="7" class="clear"></th></tr></tfoot>'};w.template='<div class="datepicker"><div class="datepicker-days"><table class=" table-condensed">'+w.headTemplate+"<tbody></tbody>"+w.footTemplate+'</table></div><div class="datepicker-months"><table class="table-condensed">'+w.headTemplate+w.contTemplate+w.footTemplate+'</table></div><div class="datepicker-years"><table class="table-condensed">'+w.headTemplate+w.contTemplate+w.footTemplate+"</table></div></div>",y.fn.datepicker.DPGlobal=w,y.fn.datepicker.noConflict=function(){return y.fn.datepicker=t,this},y(document).on("focus.datepicker.data-api click.datepicker.data-api",'[data-provide="datepicker"]',function(t){var e=y(this);e.data("datepicker")||(t.preventDefault(),i.call(e,"show"))}),y(function(){i.call(y('[data-provide="datepicker-inline"]'))})})(window.jQuery),(i=>{function s(t){this.init("date",t,s.defaults),this.initPicker(t,s.defaults)}i.fn.bdatepicker=i.fn.datepicker.noConflict(),i.fn.datepicker||(i.fn.datepicker=i.fn.bdatepicker),i.fn.editableutils.inherit(s,i.fn.editabletypes.abstractinput),i.extend(s.prototype,{initPicker:function(t,e){this.options.viewformat||(this.options.viewformat=this.options.format),t.datepicker=i.fn.editableutils.tryParseJson(t.datepicker,!0),this.options.datepicker=i.extend({},e.datepicker,t.datepicker,{format:this.options.viewformat}),this.options.datepicker.language=this.options.datepicker.language||"en",this.dpg=i.fn.bdatepicker.DPGlobal,this.parsedFormat=this.dpg.parseFormat(this.options.format),this.parsedViewFormat=this.dpg.parseFormat(this.options.viewformat)},render:function(){this.$input.bdatepicker(this.options.datepicker),this.options.clear&&(this.$clear=i('<a href="#"></a>').html(this.options.clear).click(i.proxy(function(t){t.preventDefault(),t.stopPropagation(),this.clear()},this)),this.$tpl.parent().append(i('<div class="editable-clear">').append(this.$clear)))},value2html:function(t,e){t=t?this.dpg.formatDate(t,this.parsedViewFormat,this.options.datepicker.language):"";s.superclass.value2html.call(this,t,e)},html2value:function(t){return this.parseDate(t,this.parsedViewFormat)},value2str:function(t){return t?this.dpg.formatDate(t,this.parsedFormat,this.options.datepicker.language):""},str2value:function(t){return this.parseDate(t,this.parsedFormat)},value2submit:function(t){return this.value2str(t)},value2input:function(t){this.$input.bdatepicker("update",t)},input2value:function(){return this.$input.data("datepicker").date},activate:function(){},clear:function(){this.$input.data("datepicker").date=null,this.$input.find(".active").removeClass("active"),this.options.showbuttons||this.$input.closest("form").submit()},autosubmit:function(){this.$input.on("mouseup",".day",function(t){var e;i(t.currentTarget).is(".old")||i(t.currentTarget).is(".new")||(e=i(this).closest("form"),setTimeout(function(){e.submit()},200))})},parseDate:function(t,e){var i=null;return i=t&&(i=this.dpg.parseDate(t,e,this.options.datepicker.language),"string"==typeof t)&&t!==this.dpg.formatDate(i,e,this.options.datepicker.language)?null:i}}),s.defaults=i.extend({},i.fn.editabletypes.abstractinput.defaults,{tpl:'<div class="editable-date well"></div>',inputclass:null,format:"yyyy-mm-dd",viewformat:null,datepicker:{weekStart:0,startView:0,minViewMode:0,autoclose:!1},clear:"&times; clear"}),i.fn.editabletypes.date=s})(window.jQuery),(t=>{function e(t){this.init("datefield",t,e.defaults),this.initPicker(t,e.defaults)}t.fn.editableutils.inherit(e,t.fn.editabletypes.date),t.extend(e.prototype,{render:function(){this.$input=this.$tpl.find("input"),this.setClass(),this.setAttr("placeholder"),this.$tpl.bdatepicker(this.options.datepicker),this.$input.off("focus keydown"),this.$input.keyup(t.proxy(function(){this.$tpl.removeData("date"),this.$tpl.bdatepicker("update")},this))},value2input:function(t){this.$input.val(t?this.dpg.formatDate(t,this.parsedViewFormat,this.options.datepicker.language):""),this.$tpl.bdatepicker("update")},input2value:function(){return this.html2value(this.$input.val())},activate:function(){t.fn.editabletypes.text.prototype.activate.call(this)},autosubmit:function(){}}),e.defaults=t.extend({},t.fn.editabletypes.date.defaults,{tpl:'<div class="input-append date"><input type="text"/><span class="add-on"><i class="icon-th"></i></span></div>',inputclass:"input-small",datepicker:{weekStart:0,startView:0,minViewMode:0,autoclose:!0}}),t.fn.editabletypes.datefield=e})(window.jQuery),(i=>{function s(t){this.init("datetime",t,s.defaults),this.initPicker(t,s.defaults)}i.fn.editableutils.inherit(s,i.fn.editabletypes.abstractinput),i.extend(s.prototype,{initPicker:function(t,e){this.options.viewformat||(this.options.viewformat=this.options.format),t.datetimepicker=i.fn.editableutils.tryParseJson(t.datetimepicker,!0),this.options.datetimepicker=i.extend({},e.datetimepicker,t.datetimepicker,{format:this.options.viewformat}),this.options.datetimepicker.language=this.options.datetimepicker.language||"en",this.dpg=i.fn.datetimepicker.DPGlobal,this.parsedFormat=this.dpg.parseFormat(this.options.format,this.options.formatType),this.parsedViewFormat=this.dpg.parseFormat(this.options.viewformat,this.options.formatType)},render:function(){this.$input.datetimepicker(this.options.datetimepicker),this.$input.on("changeMode",function(t){var e=i(this).closest("form").parent();setTimeout(function(){e.triggerHandler("resize")},0)}),this.options.clear&&(this.$clear=i('<a href="#"></a>').html(this.options.clear).click(i.proxy(function(t){t.preventDefault(),t.stopPropagation(),this.clear()},this)),this.$tpl.parent().append(i('<div class="editable-clear">').append(this.$clear)))},value2html:function(t,e){t=t?this.dpg.formatDate(this.toUTC(t),this.parsedViewFormat,this.options.datetimepicker.language,this.options.formatType):"";if(!e)return t;s.superclass.value2html.call(this,t,e)},html2value:function(t){t=this.parseDate(t,this.parsedViewFormat);return t?this.fromUTC(t):null},value2str:function(t){return t?this.dpg.formatDate(this.toUTC(t),this.parsedFormat,this.options.datetimepicker.language,this.options.formatType):""},str2value:function(t){t=this.parseDate(t,this.parsedFormat);return t?this.fromUTC(t):null},value2submit:function(t){return this.value2str(t)},value2input:function(t){t&&this.$input.data("datetimepicker").setDate(t)},input2value:function(){var t=this.$input.data("datetimepicker");return t.date?t.getDate():null},activate:function(){},clear:function(){this.$input.data("datetimepicker").date=null,this.$input.find(".active").removeClass("active"),this.options.showbuttons||this.$input.closest("form").submit()},autosubmit:function(){this.$input.on("mouseup",".minute",function(t){var e=i(this).closest("form");setTimeout(function(){e.submit()},200)})},toUTC:function(t){return t&&new Date(t.valueOf()-6e4*t.getTimezoneOffset())},fromUTC:function(t){return t&&new Date(t.valueOf()+6e4*t.getTimezoneOffset())},parseDate:function(t,e){var i=null;return i=t&&(i=this.dpg.parseDate(t,e,this.options.datetimepicker.language,this.options.formatType),"string"==typeof t)&&t!==this.dpg.formatDate(i,e,this.options.datetimepicker.language,this.options.formatType)?null:i}}),s.defaults=i.extend({},i.fn.editabletypes.abstractinput.defaults,{tpl:'<div class="editable-date well"></div>',inputclass:null,format:"yyyy-mm-dd hh:ii",formatType:"standard",viewformat:null,datetimepicker:{todayHighlight:!1,autoclose:!1},clear:"&times; clear"}),i.fn.editabletypes.datetime=s})(window.jQuery),(t=>{function e(t){this.init("datetimefield",t,e.defaults),this.initPicker(t,e.defaults)}t.fn.editableutils.inherit(e,t.fn.editabletypes.datetime),t.extend(e.prototype,{render:function(){this.$input=this.$tpl.find("input"),this.setClass(),this.setAttr("placeholder"),this.$tpl.datetimepicker(this.options.datetimepicker),this.$input.off("focus keydown"),this.$input.keyup(t.proxy(function(){this.$tpl.removeData("date"),this.$tpl.datetimepicker("update")},this))},value2input:function(t){this.$input.val(this.value2html(t)),this.$tpl.datetimepicker("update")},input2value:function(){return this.html2value(this.$input.val())},activate:function(){t.fn.editabletypes.text.prototype.activate.call(this)},autosubmit:function(){}}),e.defaults=t.extend({},t.fn.editabletypes.datetime.defaults,{tpl:'<div class="input-append date"><input type="text"/><span class="add-on"><i class="icon-th"></i></span></div>',inputclass:"input-medium",datetimepicker:{todayHighlight:!1,autoclose:!0}}),t.fn.editabletypes.datetimefield=e})(window.jQuery),(s=>{function e(t){this.init("typeahead",t,e.defaults),this.options.typeahead=s.extend({},e.defaults.typeahead,{matcher:this.matcher,sorter:this.sorter,highlighter:this.highlighter,updater:this.updater},t.typeahead)}s.fn.editableutils.inherit(e,s.fn.editabletypes.list),s.extend(e.prototype,{renderList:function(){this.$input=this.$tpl.is("input")?this.$tpl:this.$tpl.find('input[type="text"]'),this.options.typeahead.source=this.sourceData,this.$input.typeahead(this.options.typeahead);var t=this.$input.data("typeahead");t.render=s.proxy(this.typeaheadRender,t),t.select=s.proxy(this.typeaheadSelect,t),t.move=s.proxy(this.typeaheadMove,t),this.renderClear(),this.setClass(),this.setAttr("placeholder")},value2htmlFinal:function(t,e){var i;this.getIsObjects()&&(t=(i=s.fn.editableutils.itemsByValue(t,this.sourceData)).length?i[0].text:""),s.fn.editabletypes.abstractinput.prototype.value2html.call(this,t,e)},html2value:function(t){return t||null},value2input:function(t){var e;this.getIsObjects()?(e=s.fn.editableutils.itemsByValue(t,this.sourceData),this.$input.data("value",t).val(e.length?e[0].text:"")):this.$input.val(t)},input2value:function(){var t,e;return this.getIsObjects()?(t=this.$input.data("value"),(e=s.fn.editableutils.itemsByValue(t,this.sourceData)).length&&e[0].text.toLowerCase()===this.$input.val().toLowerCase()?t:null):this.$input.val()},getIsObjects:function(){if(void 0===this.isObjects){this.isObjects=!1;for(var t=0;t<this.sourceData.length;t++)if(this.sourceData[t].value!==this.sourceData[t].text){this.isObjects=!0;break}}return this.isObjects},activate:s.fn.editabletypes.text.prototype.activate,renderClear:s.fn.editabletypes.text.prototype.renderClear,postrender:s.fn.editabletypes.text.prototype.postrender,toggleClear:s.fn.editabletypes.text.prototype.toggleClear,clear:function(){s.fn.editabletypes.text.prototype.clear.call(this),this.$input.data("value","")},matcher:function(t){return s.fn.typeahead.Constructor.prototype.matcher.call(this,t.text)},sorter:function(t){for(var e,i,s=[],n=[],a=[];e=t.shift();)((i=e.text).toLowerCase().indexOf(this.query.toLowerCase())?~i.indexOf(this.query)?n:a:s).push(e);return s.concat(n,a)},highlighter:function(t){return s.fn.typeahead.Constructor.prototype.highlighter.call(this,t.text)},updater:function(t){return this.$element.data("value",t.value),t.text},typeaheadRender:function(t){var i=this;return t=s(t).map(function(t,e){return(t=s(i.options.item).data("item",e)).find("a").html(i.highlighter(e)),t[0]}),this.options.autoSelect&&t.first().addClass("active"),this.$menu.html(t),this},typeaheadSelect:function(){var t=this.$menu.find(".active").data("item");return(this.options.autoSelect||t)&&this.$element.val(this.updater(t)).change(),this.hide()},typeaheadMove:function(t){if(this.shown){switch(t.keyCode){case 9:case 13:case 27:if(!this.$menu.find(".active").length)return;t.preventDefault();break;case 38:t.preventDefault(),this.prev();break;case 40:t.preventDefault(),this.next()}t.stopPropagation()}}}),e.defaults=s.extend({},s.fn.editabletypes.list.defaults,{tpl:'<input type="text">',typeahead:null,clear:!0}),s.fn.editabletypes.typeahead=e})(window.jQuery);
\ No newline at end of file
+(a=>{function n(t,e){this.options=a.extend({},a.fn.editableform.defaults,e),this.$div=a(t),this.options.scope||(this.options.scope=this)}n.prototype={constructor:n,initInput:function(){this.input=this.options.input,this.value=this.input.str2value(this.options.value),this.input.prerender()},initTemplate:function(){this.$form=a(a.fn.editableform.template)},initButtons:function(){var t=this.$form.find(".editable-buttons");t.append(a.fn.editableform.buttons),"bottom"===this.options.showbuttons&&t.addClass("editable-buttons-bottom")},render:function(){this.$loading=a(a.fn.editableform.loading),this.$div.empty().append(this.$loading),this.initTemplate(),this.options.showbuttons?this.initButtons():this.$form.find(".editable-buttons").remove(),this.showLoading(),this.isSaving=!1,this.$div.triggerHandler("rendering"),this.initInput(),this.$form.find("div.editable-input").append(this.input.$tpl),this.$div.append(this.$form),a.when(this.input.render()).then(a.proxy(function(){var t;this.options.showbuttons||this.input.autosubmit(),this.$form.find(".editable-cancel").click(a.proxy(this.cancel,this)),this.input.error?(this.error(this.input.error),this.$form.find(".editable-submit").attr("disabled",!0),this.input.$input.attr("disabled",!0),this.$form.submit(function(t){t.preventDefault()})):(this.error(!1),this.input.$input.removeAttr("disabled"),this.$form.find(".editable-submit").removeAttr("disabled"),t=null==this.value||""===this.value?this.options.defaultValue:this.value,this.input.value2input(t),this.$form.submit(a.proxy(this.submit,this))),this.$div.triggerHandler("rendered"),this.showForm(),this.input.postrender&&this.input.postrender()},this))},cancel:function(){this.$div.triggerHandler("cancel")},showLoading:function(){var t,e;this.$form?(t=this.$form.outerWidth(),e=this.$form.outerHeight(),t&&this.$loading.width(t),e&&this.$loading.height(e),this.$form.hide()):(t=this.$loading.parent().width())&&this.$loading.width(t),this.$loading.show()},showForm:function(t){this.$loading.hide(),this.$form.show(),!1!==t&&this.input.activate(),this.$div.triggerHandler("show")},error:function(t){var e=this.$form.find(".control-group"),i=this.$form.find(".editable-error-block");if(!1===t)e.removeClass(a.fn.editableform.errorGroupClass),i.removeClass(a.fn.editableform.errorBlockClass).empty().hide();else{if(t){for(var s=(""+t).split("\n"),n=0;n<s.length;n++)s[n]=a("<div>").text(s[n]).html();t=s.join("<br>")}e.addClass(a.fn.editableform.errorGroupClass),i.addClass(a.fn.editableform.errorBlockClass).html(t).show()}},submit:function(t){t.stopPropagation(),t.preventDefault();var i,s=this.input.input2value(),t=this.validate(s);if("object"===a.type(t)&&void 0!==t.newValue){if(s=t.newValue,this.input.value2input(s),"string"==typeof t.msg)return this.error(t.msg),void this.showForm()}else if(t)return this.error(t),void this.showForm();this.options.savenochange||this.input.value2str(s)!=this.input.value2str(this.value)?(i=this.input.value2submit(s),this.isSaving=!0,a.when(this.save(i)).done(a.proxy(function(t){this.isSaving=!1;var e="function"==typeof this.options.success?this.options.success.call(this.options.scope,t,s):null;!1===e?(this.error(!1),this.showForm(!1)):"string"==typeof e?(this.error(e),this.showForm()):(e&&"object"==typeof e&&e.hasOwnProperty("newValue")&&(s=e.newValue),this.error(!1),this.value=s,this.$div.triggerHandler("save",{newValue:s,submitValue:i,response:t}))},this)).fail(a.proxy(function(t){this.isSaving=!1,t="function"==typeof this.options.error?this.options.error.call(this.options.scope,t,s):"string"==typeof t?t:t.responseText||t.statusText||"Unknown error!",this.error(t),this.showForm()},this))):this.$div.triggerHandler("nochange")},save:function(t){this.options.pk=a.fn.editableutils.tryParseJson(this.options.pk,!0);var e="function"==typeof this.options.pk?this.options.pk.call(this.options.scope):this.options.pk;if(!!("function"==typeof this.options.url||this.options.url&&("always"===this.options.send||"auto"===this.options.send&&null!=e)))return this.showLoading(),t={name:this.options.name||"",value:t,pk:e},"function"==typeof this.options.params?t=this.options.params.call(this.options.scope,t):(this.options.params=a.fn.editableutils.tryParseJson(this.options.params,!0),a.extend(t,this.options.params)),"function"==typeof this.options.url?this.options.url.call(this.options.scope,t):a.ajax(a.extend({url:this.options.url,data:t,type:"POST"},this.options.ajaxOptions))},validate:function(t){if(void 0===t&&(t=this.value),"function"==typeof this.options.validate)return this.options.validate.call(this.options.scope,t)},option:function(t,e){t in this.options&&(this.options[t]=e),"value"===t&&this.setValue(e)},setValue:function(t,e){this.value=e?this.input.str2value(t):t,this.$form&&this.$form.is(":visible")&&this.input.value2input(this.value)}},a.fn.editableform=function(i){var s=arguments;return this.each(function(){var t=a(this),e=t.data("editableform");e||t.data("editableform",e=new n(this,"object"==typeof i&&i)),"string"==typeof i&&e[i].apply(e,Array.prototype.slice.call(s,1))})},a.fn.editableform.Constructor=n,a.fn.editableform.defaults={type:"text",url:null,params:null,name:null,pk:null,value:null,defaultValue:null,send:"auto",validate:null,success:null,error:null,ajaxOptions:null,showbuttons:!0,scope:null,savenochange:!1},a.fn.editableform.template='<form class="form-inline editableform"><div class="control-group"><div><div class="editable-input"></div><div class="editable-buttons"></div></div><div class="editable-error-block"></div></div></form>',a.fn.editableform.loading='<div class="editableform-loading"></div>',a.fn.editableform.buttons='<button type="submit" class="editable-submit">ok</button><button type="button" class="editable-cancel">cancel</button>',a.fn.editableform.errorGroupClass=null,a.fn.editableform.errorBlockClass="editable-error",a.fn.editableform.engine="jquery"})(window.jQuery),(l=>{l.fn.editableutils={inherit:function(t,e){function i(){}i.prototype=e.prototype,t.prototype=new i,(t.prototype.constructor=t).superclass=e.prototype},setCursorPosition:function(t,e){t.setSelectionRange?t.setSelectionRange(e,e):t.createTextRange&&((t=t.createTextRange()).collapse(!0),t.moveEnd("character",e),t.moveStart("character",e),t.select())},tryParseJson:function(t,e){if("string"==typeof t&&t.length&&t.match(/^[\{\[].*[\}\]]$/))if(e)try{t=new Function("return "+t)()}catch(t){}finally{return t}else t=new Function("return "+t)();return t},sliceObj:function(t,e,i){var s,n,a={};if(Array.isArray(e)&&e.length)for(var o=0;o<e.length;o++)t.hasOwnProperty(s=e[o])&&(a[s]=t[s]),!0!==i&&(n=s.toLowerCase(),t.hasOwnProperty(n))&&(a[s]=t[n]);return a},getConfigData:function(t){var i={};return l.each(t.data(),function(t,e){"object"==typeof e&&(!e||"object"!=typeof e||e.constructor!==Object&&e.constructor!==Array)||(i[t]=e)}),i},objectKeys:function(t){if(Object.keys)return Object.keys(t);if(t!==Object(t))throw new TypeError("Object.keys called on a non-object");var e,i=[];for(e in t)Object.prototype.hasOwnProperty.call(t,e)&&i.push(e);return i},escape:function(t){return l("<div>").text(t).html()},itemsByValue:function(s,t,n){var e,a,o,r;return t&&null!==s?("function"!=typeof n&&(e=n||"value",n=function(t){return t[e]}),a=Array.isArray(s),o=[],r=this,l.each(t,function(t,e){var i;e.children?o=o.concat(r.itemsByValue(s,e.children,n)):a?l.grep(s,function(t){return t==(e&&"object"==typeof e?n(e):e)}).length&&o.push(e):(i=e&&"object"==typeof e?n(e):e,s==i&&o.push(e))}),o):[]},createInput:function(t){var e,i=t.type;return"date"===i&&("inline"===t.mode?l.fn.editabletypes.datefield?i="datefield":l.fn.editabletypes.dateuifield&&(i="dateuifield"):l.fn.editabletypes.date?i="date":l.fn.editabletypes.dateui&&(i="dateui"),"date"!==i||l.fn.editabletypes.date||(i="combodate")),"wysihtml5"!==(i="datetime"===i&&"inline"===t.mode?"datetimefield":i)||l.fn.editabletypes[i]||(i="textarea"),"function"==typeof l.fn.editabletypes[i]?new(e=l.fn.editabletypes[i])(this.sliceObj(t,this.objectKeys(e.defaults))):(l.error("Unknown type: "+i),!1)},supportsTransitions:function(){var t=(document.body||document.documentElement).style,e=["Moz","Webkit","Khtml","O","ms"];if("string"==typeof t[i="transition"])return!0;for(var i=i.charAt(0).toUpperCase()+i.substr(1),s=0;s<e.length;s++)if("string"==typeof t[e[s]+i])return!0;return!1}}})(window.jQuery),(r=>{function l(t,e){this.init(t,e)}function h(t,e){this.init(t,e)}l.prototype={containerName:null,containerDataName:null,innerCss:null,containerClass:"editable-container editable-popup",defaults:{},init:function(t,e){this.$element=r(t),this.options=r.extend({},r.fn.editableContainer.defaults,e),this.splitOptions(),this.formOptions.scope=this.$element[0],this.initContainer(),this.delayedHide=!1,this.$element.on("destroyed",r.proxy(function(){this.destroy()},this)),r(document).data("editable-handlers-attached")||(r(document).on("keyup.editable",function(t){27===t.which&&r(".editable-open").editableContainer("hide")}),r(document).on("click.editable",function(t){var e,i=r(t.target),s=[".editable-container",".ui-datepicker-header",".datepicker",".modal-backdrop",".bootstrap-wysihtml5-insert-image-modal",".bootstrap-wysihtml5-insert-link-modal"];if(r.contains(document.documentElement,t.target)&&!i.is(document)){for(e=0;e<s.length;e++)if(i.is(s[e])||i.parents(s[e]).length)return;l.prototype.closeOthers(t.target)}}),r(document).data("editable-handlers-attached",!0))},splitOptions:function(){if(this.containerOptions={},this.formOptions={},!r.fn[this.containerName])throw new Error(this.containerName+" not found. Have you included corresponding js file?");for(var t in this.options)t in this.defaults?this.containerOptions[t]=this.options[t]:this.formOptions[t]=this.options[t]},tip:function(){return this.container()?this.container().$tip:null},container:function(){var t;return t=this.containerDataName&&(t=this.$element.data(this.containerDataName))?t:this.$element.data(this.containerName)},call:function(){this.$element[this.containerName].apply(this.$element,arguments)},initContainer:function(){this.call(this.containerOptions)},renderForm:function(){this.$form.editableform(this.formOptions).on({save:r.proxy(this.save,this),nochange:r.proxy(function(){this.hide("nochange")},this),cancel:r.proxy(function(){this.hide("cancel")},this),show:r.proxy(function(){this.delayedHide?(this.hide(this.delayedHide.reason),this.delayedHide=!1):this.setPosition()},this),rendering:r.proxy(this.setPosition,this),resize:r.proxy(this.setPosition,this),rendered:r.proxy(function(){this.$element.triggerHandler("shown",r(this.options.scope).data("editable"))},this)}).editableform("render")},show:function(t){this.$element.addClass("editable-open"),!1!==t&&this.closeOthers(this.$element[0]),this.innerShow(),this.tip().addClass(this.containerClass),this.$form,this.$form=r("<div>"),(this.tip().is(this.innerCss)?this.tip():this.tip().find(this.innerCss)).append(this.$form),this.renderForm()},hide:function(t){this.tip()&&this.tip().is(":visible")&&this.$element.hasClass("editable-open")&&(this.$form.data("editableform").isSaving?this.delayedHide={reason:t}:(this.delayedHide=!1,this.$element.removeClass("editable-open"),this.innerHide(),this.$element.triggerHandler("hidden",t||"manual")))},innerShow:function(){},innerHide:function(){},toggle:function(t){this.container()&&this.tip()&&this.tip().is(":visible")?this.hide():this.show(t)},setPosition:function(){},save:function(t,e){this.$element.triggerHandler("save",e),this.hide("save")},option:function(t,e){this.options[t]=e,t in this.containerOptions?(this.containerOptions[t]=e,this.setContainerOption(t,e)):(this.formOptions[t]=e,this.$form&&this.$form.editableform("option",t,e))},setContainerOption:function(t,e){this.call("option",t,e)},destroy:function(){this.hide(),this.innerDestroy(),this.$element.off("destroyed"),this.$element.removeData("editableContainer")},innerDestroy:function(){},closeOthers:function(s){r(".editable-open").each(function(t,e){var i;e===s||r(e).find(s).length||(i=(e=r(e)).data("editableContainer"))&&("cancel"===i.options.onblur?e.data("editableContainer").hide("onblur"):"submit"===i.options.onblur&&e.data("editableContainer").tip().find("form").submit())})},activate:function(){this.tip&&this.tip().is(":visible")&&this.$form&&this.$form.data("editableform").input.activate()}},r.fn.editableContainer=function(a){var o=arguments;return this.each(function(){var t=r(this),e="editableContainer",i=t.data(e),s="object"==typeof a&&a,n="inline"===s.mode?h:l;i||t.data(e,i=new n(this,s)),"string"==typeof a&&i[a].apply(i,Array.prototype.slice.call(o,1))})},r.fn.editableContainer.Popup=l,r.fn.editableContainer.Inline=h,r.fn.editableContainer.defaults={value:null,placement:"top",autohide:!0,onblur:"cancel",anim:!1,mode:"popup"},jQuery.event.special.destroyed={remove:function(t){t.handler&&t.handler()}}})(window.jQuery),(t=>{t.extend(t.fn.editableContainer.Inline.prototype,t.fn.editableContainer.Popup.prototype,{containerName:"editableform",innerCss:".editable-inline",containerClass:"editable-container editable-inline",initContainer:function(){this.$tip=t("<span></span>"),this.options.anim||(this.options.anim=0)},splitOptions:function(){this.containerOptions={},this.formOptions=this.options},tip:function(){return this.$tip},innerShow:function(){this.$element.hide(),this.tip().insertAfter(this.$element).show()},innerHide:function(){this.$tip.hide(this.options.anim,t.proxy(function(){this.$element.show(),this.innerDestroy()},this))},innerDestroy:function(){this.tip()&&this.tip().empty().remove()}})})(window.jQuery),(p=>{function u(t,e){this.$element=p(t),this.options=p.extend({},p.fn.editable.defaults,e,p.fn.editableutils.getConfigData(this.$element)),this.options.selector?this.initLive():this.init(),this.options.highlight&&!p.fn.editableutils.supportsTransitions()&&(this.options.highlight=!1)}u.prototype={constructor:u,init:function(){var t,e=!1;if(this.options.name=this.options.name||this.$element.attr("id"),this.options.scope=this.$element[0],this.input=p.fn.editableutils.createInput(this.options),this.input){switch(null==this.options.value?(this.value=this.input.html2value(p.trim(this.$element.html())),e=!0):(this.options.value=p.fn.editableutils.tryParseJson(this.options.value,!0),"string"==typeof this.options.value?this.value=this.input.str2value(this.options.value):this.value=this.options.value),this.$element.addClass("editable"),"textarea"===this.input.type&&this.$element.addClass("editable-pre-wrapped"),"manual"!==this.options.toggle?(this.$element.addClass("editable-click"),this.$element.on(this.options.toggle+".editable",p.proxy(function(t){this.options.disabled||t.preventDefault(),"mouseenter"===this.options.toggle?this.show():(t="click"!==this.options.toggle,this.toggle(t))},this))):this.$element.attr("tabindex",-1),"function"==typeof this.options.display&&(this.options.autotext="always"),this.options.autotext){case"always":t=!0;break;case"auto":t=!p.trim(this.$element.text()).length&&null!=this.value&&!e;break;default:t=!1}p.when(!t||this.render()).then(p.proxy(function(){this.options.disabled?this.disable():this.enable(),this.$element.triggerHandler("init",this)},this))}},initLive:function(){var t=this.options.selector;this.options.selector=!1,this.options.autotext="never",this.$element.on(this.options.toggle+".editable",t,p.proxy(function(t){var e=p(t.target);e.data("editable")||(e.hasClass(this.options.emptyclass)&&e.empty(),e.editable(this.options).trigger(t))},this))},render:function(t){if(!1!==this.options.display)return this.input.value2htmlFinal?this.input.value2html(this.value,this.$element[0],this.options.display,t):"function"==typeof this.options.display?this.options.display.call(this.$element[0],this.value,t):this.input.value2html(this.value,this.$element[0])},enable:function(){this.options.disabled=!1,this.$element.removeClass("editable-disabled"),this.handleEmpty(this.isEmpty),"manual"!==this.options.toggle&&"-1"===this.$element.attr("tabindex")&&this.$element.removeAttr("tabindex")},disable:function(){this.options.disabled=!0,this.hide(),this.$element.addClass("editable-disabled"),this.handleEmpty(this.isEmpty),this.$element.attr("tabindex",-1)},toggleDisabled:function(){this.options.disabled?this.enable():this.disable()},option:function(t,e){if(t&&"object"==typeof t)p.each(t,p.proxy(function(t,e){this.option(p.trim(t),e)},this));else{if(this.options[t]=e,"disabled"===t)return e?this.disable():this.enable();"value"===t&&this.setValue(e),this.container&&this.container.option(t,e),this.input.option&&this.input.option(t,e)}},handleEmpty:function(t){!1!==this.options.display&&(void 0!==t?this.isEmpty=t:"function"==typeof this.input.isEmpty?this.isEmpty=this.input.isEmpty(this.$element):this.isEmpty=""===p.trim(this.$element.html()),this.options.disabled?this.isEmpty&&(this.$element.empty(),this.options.emptyclass)&&this.$element.removeClass(this.options.emptyclass):this.isEmpty?(this.$element.html(this.options.emptytext),this.options.emptyclass&&this.$element.addClass(this.options.emptyclass)):this.options.emptyclass&&this.$element.removeClass(this.options.emptyclass))},show:function(t){if(!this.options.disabled){if(this.container){if(this.container.tip().is(":visible"))return}else{var e=p.extend({},this.options,{value:this.value,input:this.input});this.$element.editableContainer(e),this.$element.on("save.internal",p.proxy(this.save,this)),this.container=this.$element.data("editableContainer")}this.container.show(t)}},hide:function(){this.container&&this.container.hide()},toggle:function(t){this.container&&this.container.tip().is(":visible")?this.hide():this.show(t)},save:function(t,e){var i,s;this.options.unsavedclass&&("function"==typeof this.options.url||!1===this.options.display||void 0!==e.response||this.options.savenochange&&this.input.value2str(this.value)!==this.input.value2str(e.newValue)?this.$element.removeClass(this.options.unsavedclass):this.$element.addClass(this.options.unsavedclass)),this.options.highlight&&(i=this.$element,s=i.css("background-color"),i.css("background-color",this.options.highlight),setTimeout(function(){"transparent"===s&&(s=""),i.css("background-color",s),i.addClass("editable-bg-transition"),setTimeout(function(){i.removeClass("editable-bg-transition")},1700)},10)),this.setValue(e.newValue,!1,e.response)},validate:function(){if("function"==typeof this.options.validate)return this.options.validate.call(this,this.value)},setValue:function(t,e,i){this.value=e?this.input.str2value(t):t,this.container&&this.container.option("value",this.value),p.when(this.render(i)).then(p.proxy(function(){this.handleEmpty()},this))},activate:function(){this.container&&this.container.activate()},destroy:function(){this.disable(),this.container&&this.container.destroy(),this.input.destroy(),"manual"!==this.options.toggle&&(this.$element.removeClass("editable-click"),this.$element.off(this.options.toggle+".editable")),this.$element.off("save.internal"),this.$element.removeClass("editable editable-open editable-disabled"),this.$element.removeData("editable")}},p.fn.editable=function(s){var i={},n=arguments,a="editable";switch(s){case"validate":return this.each(function(){var t,e=p(this).data(a);e&&(t=e.validate())&&(i[e.options.name]=t)}),i;case"getValue":return 2===arguments.length&&!0===arguments[1]?i=this.eq(0).data(a).value:this.each(function(){var t=p(this).data(a);t&&null!=t.value&&(i[t.options.name]=t.input.value2submit(t.value))}),i;case"submit":var t,e,o,r=arguments[1]||{},l=this,h=this.editable("validate");return p.isEmptyObject(h)?(o={},1===l.length?(e={name:(t=l.data("editable")).options.name||"",value:t.input.value2submit(t.value),pk:"function"==typeof t.options.pk?t.options.pk.call(t.options.scope):t.options.pk},"function"==typeof t.options.params?e=t.options.params.call(t.options.scope,e):(t.options.params=p.fn.editableutils.tryParseJson(t.options.params,!0),p.extend(e,t.options.params)),o={url:t.options.url,data:e,type:"POST"},r.success=r.success||t.options.success,r.error=r.error||t.options.error):(e=this.editable("getValue"),o={url:r.url,data:e,type:"POST"}),o.success="function"==typeof r.success?function(t){r.success.call(l,t,r)}:p.noop,o.error="function"==typeof r.error?function(){r.error.apply(l,arguments)}:p.noop,r.ajaxOptions&&p.extend(o,r.ajaxOptions),r.data&&p.extend(o.data,r.data),p.ajax(o)):"function"==typeof r.error&&r.error.call(l,h),this}return this.each(function(){var t=p(this),e=t.data(a),i="object"==typeof s&&s;i&&i.selector?e=new u(this,i):(e||t.data(a,e=new u(this,i)),"string"==typeof s&&e[s].apply(e,Array.prototype.slice.call(n,1)))})},p.fn.editable.defaults={type:"text",disabled:!1,toggle:"click",emptytext:"Empty",autotext:"auto",value:null,display:null,emptyclass:"editable-empty",unsavedclass:"editable-unsaved",selector:null,highlight:"#FFFF80"}})(window.jQuery),(s=>{function t(){}s.fn.editabletypes={},t.prototype={init:function(t,e,i){this.type=t,this.options=s.extend({},i,e)},prerender:function(){this.$tpl=s(this.options.tpl),this.$input=this.$tpl,this.$clear=null,this.error=null},render:function(){},value2html:function(t,e){s(e)[this.options.escape?"text":"html"](s.trim(t))},html2value:function(t){return s("<div>").html(t).text()},value2str:function(t){return t},str2value:function(t){return t},value2submit:function(t){return t},value2input:function(t){this.$input.val(t)},input2value:function(){return this.$input.val()},activate:function(){this.$input.is(":visible")&&this.$input.focus()},clear:function(){this.$input.val(null)},escape:function(t){return s("<div>").text(t).html()},autosubmit:function(){},destroy:function(){},setClass:function(){this.options.inputclass&&this.$input.addClass(this.options.inputclass)},setAttr:function(t){null!=this.options[t]&&this.$input.attr(t,this.options[t])},option:function(t,e){this.options[t]=e}},t.defaults={tpl:"",inputclass:null,escape:!0,scope:null,showbuttons:!0},s.extend(s.fn.editabletypes,{abstractinput:t})})(window.jQuery),(r=>{function t(t){}r.fn.editableutils.inherit(t,r.fn.editabletypes.abstractinput),r.extend(t.prototype,{render:function(){var t=r.Deferred();return this.error=null,this.onSourceReady(function(){this.renderList(),t.resolve()},function(){this.error=this.options.sourceError,t.resolve()}),t.promise()},html2value:function(t){return null},value2html:function(t,e,i,s){function n(){"function"==typeof i?i.call(e,t,this.sourceData,s):this.value2htmlFinal(t,e),a.resolve()}var a=r.Deferred();return null===t?n.call(this):this.onSourceReady(n,function(){a.resolve()}),a.promise()},onSourceReady:function(e,i){var t;if("function"==typeof this.options.source?(t=this.options.source.call(this.options.scope),this.sourceData=null):t=this.options.source,this.options.sourceCache&&Array.isArray(this.sourceData))e.call(this);else{try{t=r.fn.editableutils.tryParseJson(t,!1)}catch(t){return void i.call(this)}if("string"==typeof t){if(this.options.sourceCache){var s,n=t;if(r(document).data(n)||r(document).data(n,{}),!1===(s=r(document).data(n)).loading&&s.sourceData)return this.sourceData=s.sourceData,this.doPrepend(),void e.call(this);if(!0===s.loading)return s.callbacks.push(r.proxy(function(){this.sourceData=s.sourceData,this.doPrepend(),e.call(this)},this)),void s.err_callbacks.push(r.proxy(i,this));s.loading=!0,s.callbacks=[],s.err_callbacks=[]}n=r.extend({url:t,type:"get",cache:!1,dataType:"json",success:r.proxy(function(t){s&&(s.loading=!1),this.sourceData=this.makeArray(t),Array.isArray(this.sourceData)?(s&&(s.sourceData=this.sourceData,r.each(s.callbacks,function(){this.call()})),this.doPrepend(),e.call(this)):(i.call(this),s&&r.each(s.err_callbacks,function(){this.call()}))},this),error:r.proxy(function(){i.call(this),s&&(s.loading=!1,r.each(s.err_callbacks,function(){this.call()}))},this)},this.options.sourceOptions);r.ajax(n)}else this.sourceData=this.makeArray(t),(Array.isArray(this.sourceData)?(this.doPrepend(),e):i).call(this)}},doPrepend:function(){null!=this.options.prepend&&(Array.isArray(this.prependData)||("function"==typeof this.options.prepend&&(this.options.prepend=this.options.prepend.call(this.options.scope)),this.options.prepend=r.fn.editableutils.tryParseJson(this.options.prepend,!0),"string"==typeof this.options.prepend&&(this.options.prepend={"":this.options.prepend}),this.prependData=this.makeArray(this.options.prepend)),Array.isArray(this.prependData))&&Array.isArray(this.sourceData)&&(this.sourceData=this.prependData.concat(this.sourceData))},renderList:function(){},value2htmlFinal:function(t,e){},makeArray:function(t){var i,s,e,n=[];if(!t||"string"==typeof t)return null;if(Array.isArray(t))for(var a=function(t,e){if(s={value:t,text:e},2<=i++)return!1},o=0;o<t.length;o++)"object"==typeof(e=t[o])?(i=0,r.each(e,a),1===i?n.push(s):1<i&&(e.children&&(e.children=this.makeArray(e.children)),n.push(e))):n.push({value:e,text:e});else r.each(t,function(t,e){n.push({value:t,text:e})});return n},option:function(t,e){this.options[t]=e,"source"===t&&(this.sourceData=null),"prepend"===t&&(this.prependData=null)}}),t.defaults=r.extend({},r.fn.editabletypes.abstractinput.defaults,{source:null,prepend:!1,sourceError:"Error when loading list",sourceCache:!0,sourceOptions:null}),r.fn.editabletypes.list=t})(window.jQuery),(i=>{function e(t){this.init("text",t,e.defaults)}i.fn.editableutils.inherit(e,i.fn.editabletypes.abstractinput),i.extend(e.prototype,{render:function(){this.renderClear(),this.setClass(),this.setAttr("placeholder")},activate:function(){this.$input.is(":visible")&&(this.$input.focus(),i.fn.editableutils.setCursorPosition(this.$input.get(0),this.$input.val().length),this.toggleClear)&&this.toggleClear()},renderClear:function(){this.options.clear&&(this.$clear=i('<span class="editable-clear-x"></span>'),this.$input.after(this.$clear).css("padding-right",24).keyup(i.proxy(function(t){var e;~i.inArray(t.keyCode,[40,38,9,13,27])||(clearTimeout(this.t),(e=this).t=setTimeout(function(){e.toggleClear(t)},100))},this)).parent().css("position","relative"),this.$clear.click(i.proxy(this.clear,this)))},postrender:function(){},toggleClear:function(t){var e,i;this.$clear&&(e=this.$input.val().length,i=this.$clear.is(":visible"),e&&!i&&this.$clear.show(),!e)&&i&&this.$clear.hide()},clear:function(){this.$clear.hide(),this.$input.val("").focus()}}),e.defaults=i.extend({},i.fn.editabletypes.abstractinput.defaults,{tpl:'<input type="text">',placeholder:null,clear:!0}),i.fn.editabletypes.text=e})(window.jQuery),(e=>{function i(t){this.init("textarea",t,i.defaults)}e.fn.editableutils.inherit(i,e.fn.editabletypes.abstractinput),e.extend(i.prototype,{render:function(){this.setClass(),this.setAttr("placeholder"),this.setAttr("rows"),this.$input.keydown(function(t){t.ctrlKey&&13===t.which&&e(this).closest("form").submit()})},activate:function(){e.fn.editabletypes.text.prototype.activate.call(this)}}),i.defaults=e.extend({},e.fn.editabletypes.abstractinput.defaults,{tpl:"<textarea></textarea>",inputclass:"input-large",placeholder:null,rows:7}),e.fn.editabletypes.textarea=i})(window.jQuery),(a=>{function e(t){this.init("select",t,e.defaults)}a.fn.editableutils.inherit(e,a.fn.editabletypes.list),a.extend(e.prototype,{renderList:function(){this.$input.empty();var n=function(t,e){var i;if(Array.isArray(e))for(var s=0;s<e.length;s++)i={},e[s].children?(i.label=e[s].text,t.append(n(a("<optgroup>",i),e[s].children))):(i.value=e[s].value,e[s].disabled&&(i.disabled=!0),t.append(a("<option>",i).text(e[s].text)));return t};n(this.$input,this.sourceData),this.setClass(),this.$input.on("keydown.editable",function(t){13===t.which&&a(this).closest("form").submit()})},value2htmlFinal:function(t,e){var i="",t=a.fn.editableutils.itemsByValue(t,this.sourceData);t.length&&(i=t[0].text),a.fn.editabletypes.abstractinput.prototype.value2html.call(this,i,e)},autosubmit:function(){this.$input.off("keydown.editable").on("change.editable",function(){a(this).closest("form").submit()})}}),e.defaults=a.extend({},a.fn.editabletypes.list.defaults,{tpl:"<select></select>"}),a.fn.editabletypes.select=e})(window.jQuery),(n=>{function e(t){this.init("checklist",t,e.defaults)}n.fn.editableutils.inherit(e,n.fn.editabletypes.list),n.extend(e.prototype,{renderList:function(){var t;if(this.$tpl.empty(),Array.isArray(this.sourceData)){for(var e=0;e<this.sourceData.length;e++)t=n("<label>").append(n("<input>",{type:"checkbox",value:this.sourceData[e].value})).append(n("<span>").text(" "+this.sourceData[e].text)),n("<div>").append(t).appendTo(this.$tpl);this.$input=this.$tpl.find('input[type="checkbox"]'),this.setClass()}},value2str:function(t){return Array.isArray(t)?t.sort().join(this.options.separator.trim()):""},str2value:function(t){var e;return"string"==typeof t&&t.length?(e=new RegExp("\\s*"+n.trim(this.options.separator)+"\\s*"),t.split(e)):Array.isArray(t)?t:[t]},value2input:function(s){this.$input.prop("checked",!1),Array.isArray(s)&&s.length&&this.$input.each(function(t,e){var i=n(e);n.each(s,function(t,e){i.val()==e&&i.prop("checked",!0)})})},input2value:function(){var i=[];return this.$input.filter(":checked").each(function(t,e){i.push(n(e).val())}),i},value2htmlFinal:function(t,e){var i=[],t=n.fn.editableutils.itemsByValue(t,this.sourceData),s=this.options.escape;t.length?(n.each(t,function(t,e){e=s?n.fn.editableutils.escape(e.text):e.text;i.push(e)}),n(e).html(i.join("<br>"))):n(e).empty()},activate:function(){this.$input.first().focus()},autosubmit:function(){this.$input.on("keydown",function(t){13===t.which&&n(this).closest("form").submit()})}}),e.defaults=n.extend({},n.fn.editabletypes.list.defaults,{tpl:'<div class="editable-checklist"></div>',inputclass:null,separator:","}),n.fn.editabletypes.checklist=e})(window.jQuery),(i=>{function e(t){this.init("password",t,e.defaults)}i.fn.editableutils.inherit(e,i.fn.editabletypes.text),i.extend(e.prototype,{value2html:function(t,e){t?i(e).text("[hidden]"):i(e).empty()},html2value:function(t){return null}}),e.defaults=i.extend({},i.fn.editabletypes.text.defaults,{tpl:'<input type="password">'}),i.fn.editabletypes.password=e})(window.jQuery),(t=>{function e(t){this.init("email",t,e.defaults)}t.fn.editableutils.inherit(e,t.fn.editabletypes.text),e.defaults=t.extend({},t.fn.editabletypes.text.defaults,{tpl:'<input type="email">'}),t.fn.editabletypes.email=e})(window.jQuery),(t=>{function e(t){this.init("url",t,e.defaults)}t.fn.editableutils.inherit(e,t.fn.editabletypes.text),e.defaults=t.extend({},t.fn.editabletypes.text.defaults,{tpl:'<input type="url">'}),t.fn.editabletypes.url=e})(window.jQuery),(t=>{function e(t){this.init("tel",t,e.defaults)}t.fn.editableutils.inherit(e,t.fn.editabletypes.text),e.defaults=t.extend({},t.fn.editabletypes.text.defaults,{tpl:'<input type="tel">'}),t.fn.editabletypes.tel=e})(window.jQuery),(t=>{function e(t){this.init("number",t,e.defaults)}t.fn.editableutils.inherit(e,t.fn.editabletypes.text),t.extend(e.prototype,{render:function(){e.superclass.render.call(this),this.setAttr("min"),this.setAttr("max"),this.setAttr("step")},postrender:function(){this.$clear&&this.$clear.css({right:24})}}),e.defaults=t.extend({},t.fn.editabletypes.text.defaults,{tpl:'<input type="number">',inputclass:"input-mini",min:null,max:null,step:null}),t.fn.editabletypes.number=e})(window.jQuery),(t=>{function e(t){this.init("range",t,e.defaults)}t.fn.editableutils.inherit(e,t.fn.editabletypes.number),t.extend(e.prototype,{render:function(){this.$input=this.$tpl.filter("input"),this.setClass(),this.setAttr("min"),this.setAttr("max"),this.setAttr("step"),this.$input.on("input",function(){t(this).siblings("output").text(t(this).val())})},activate:function(){this.$input.focus()}}),e.defaults=t.extend({},t.fn.editabletypes.number.defaults,{tpl:'<input type="range"><output style="width: 30px; display: inline-block"></output>',inputclass:"input-medium"}),t.fn.editabletypes.range=e})(window.jQuery),(t=>{function e(t){this.init("time",t,e.defaults)}t.fn.editableutils.inherit(e,t.fn.editabletypes.abstractinput),t.extend(e.prototype,{render:function(){this.setClass()}}),e.defaults=t.extend({},t.fn.editabletypes.abstractinput.defaults,{tpl:'<input type="time">'}),t.fn.editabletypes.time=e})(window.jQuery),(a=>{function o(t){var e,i;this.init("select2",t,o.defaults),t.select2=t.select2||{},this.sourceData=null,t.placeholder&&(t.select2.placeholder=t.placeholder),!t.select2.tags&&t.source&&(e=t.source,"string"==typeof(e="function"==typeof t.source?t.source.call(t.scope):e)?(t.select2.ajax=t.select2.ajax||{},t.select2.ajax.data||(t.select2.ajax.data=function(t){return{query:t}}),t.select2.ajax.results||(t.select2.ajax.results=function(t){return{results:t}}),t.select2.ajax.url=e):(this.sourceData=this.convertSource(e),t.select2.data=this.sourceData)),this.options.select2=a.extend({},o.defaults.select2,t.select2),this.isMultiple=this.options.select2.tags||this.options.select2.multiple,this.isRemote="ajax"in this.options.select2,this.idFunc=this.options.select2.id,"function"!=typeof this.idFunc&&(i=this.idFunc||"id",this.idFunc=function(t){return t[i]}),this.formatSelection=this.options.select2.formatSelection,"function"!=typeof this.formatSelection&&(this.formatSelection=function(t){return t.text})}a.fn.editableutils.inherit(o,a.fn.editabletypes.abstractinput),a.extend(o.prototype,{render:function(){this.setClass(),this.isRemote&&this.$input.on("select2-loaded",a.proxy(function(t){this.sourceData=t.items.results},this)),this.isMultiple&&this.$input.on("change",function(){a(this).closest("form").parent().triggerHandler("resize")})},value2html:function(t,e){var i,s="",n=this;this.options.select2.tags?i=t:this.sourceData&&(i=a.fn.editableutils.itemsByValue(t,this.sourceData,this.idFunc)),Array.isArray(i)?(s=[],a.each(i,function(t,e){s.push(e&&"object"==typeof e?n.formatSelection(e):e)})):i&&(s=n.formatSelection(i)),s=Array.isArray(s)?s.join(this.options.viewseparator):s,o.superclass.value2html.call(this,s,e)},html2value:function(t){return this.options.select2.tags?this.str2value(t,this.options.viewseparator):null},value2input:function(t){var e,i;Array.isArray(t)&&(t=t.join(this.getSeparator())),this.$input.data("select2")?this.$input.val(t).trigger("change",!0):(this.$input.val(t),this.$input.select2(this.options.select2)),!this.isRemote||this.isMultiple||this.options.select2.initSelection||(e=this.options.select2.id,i=this.options.select2.formatSelection,e)||i||(e=a(this.options.scope)).data("editable").isEmpty||(i={id:t,text:e.text()},this.$input.select2("data",i))},input2value:function(){return this.$input.select2("val")},str2value:function(t,e){if("string"!=typeof t||!this.isMultiple)return t;var i,s,n;if(e=e||this.getSeparator(),null===t||t.length<1)return null;for(s=0,n=(i=t.split(e)).length;s<n;s+=1)i[s]=a.trim(i[s]);return i},autosubmit:function(){this.$input.on("change",function(t,e){e||a(this).closest("form").submit()})},getSeparator:function(){return this.options.select2.separator||a.fn.select2.defaults.separator},convertSource:function(t){if(Array.isArray(t)&&t.length&&void 0!==t[0].value)for(var e=0;e<t.length;e++)void 0!==t[e].value&&(t[e].id=t[e].value,delete t[e].value);return t},destroy:function(){this.$input&&this.$input.data("select2")&&this.$input.select2("destroy")}}),o.defaults=a.extend({},a.fn.editabletypes.abstractinput.defaults,{tpl:'<input type="hidden">',select2:null,placeholder:null,source:null,viewseparator:", "}),a.fn.editabletypes.select2=o})(window.jQuery),(o=>{function n(t,e){this.$element=o(t),this.$element.is("input")?(this.options=o.extend({},o.fn.combodate.defaults,e,this.$element.data()),this.init()):o.error("Combodate should be applied to INPUT element")}n.prototype={constructor:n,init:function(){this.map={day:["D","date"],month:["M","month"],year:["Y","year"],hour:["[Hh]","hours"],minute:["m","minutes"],second:["s","seconds"],ampm:["[Aa]",""]},this.$widget=o('<span class="combodate"></span>').html(this.getTemplate()),this.initCombos(),this.$widget.on("change","select",o.proxy(function(t){this.$element.val(this.getValue()).change(),this.options.smartDays&&(o(t.target).is(".month")||o(t.target).is(".year"))&&this.fillCombo("day")},this)),this.$widget.find("select").css("width","auto"),this.$element.hide().after(this.$widget),this.setValue(this.$element.val()||this.options.value)},getTemplate:function(){var s=this.options.template;return o.each(this.map,function(t,e){e=e[0];var i=new RegExp(e+"+"),e=1<e.length?e.substring(1,2):e;s=s.replace(i,"{"+e+"}")}),s=s.replace(/ /g,"&nbsp;"),o.each(this.map,function(t,e){e=1<(e=e[0]).length?e.substring(1,2):e;s=s.replace("{"+e+"}",'<select class="'+t+'"></select>')}),s},initCombos:function(){for(var t in this.map){var e=this.$widget.find("."+t);this["$"+t]=e.length?e:null,this.fillCombo(t)}},fillCombo:function(t){var e=this["$"+t];if(e){var i=this["fill"+t.charAt(0).toUpperCase()+t.slice(1)](),t=e.val();e.empty();for(var s=0;s<i.length;s++)e.append('<option value="'+i[s][0]+'">'+i[s][1]+"</option>");e.val(t)}},fillCommon:function(t){var e,i=[];return"name"===this.options.firstItem?(e=(e="function"==typeof(e=moment.relativeTime||moment.langData()._relativeTime)[t]?e[t](1,!0,t,!1):e[t]).split(" ").reverse()[0],i.push(["",e])):"empty"===this.options.firstItem&&i.push(["",""]),i},fillDay:function(){var t,e,i,s,n=this.fillCommon("d"),a=-1!==this.options.template.indexOf("DD"),o=31;for(this.options.smartDays&&this.$month&&this.$year&&(i=parseInt(this.$month.val(),10),s=parseInt(this.$year.val(),10),isNaN(i)||isNaN(s)||(o=moment([s,i]).daysInMonth())),e=1;e<=o;e++)t=a?this.leadZero(e):e,n.push([e,t]);return n},fillMonth:function(){for(var t,e=this.fillCommon("M"),i=-1!==this.options.template.indexOf("MMMM"),s=-1!==this.options.template.indexOf("MMM"),n=-1!==this.options.template.indexOf("MM"),a=0;a<=11;a++)t=i?moment().date(1).month(a).format("MMMM"):s?moment().date(1).month(a).format("MMM"):n?this.leadZero(a+1):a+1,e.push([a,t]);return e},fillYear:function(){for(var t,e=[],i=-1!==this.options.template.indexOf("YYYY"),s=this.options.maxYear;s>=this.options.minYear;s--)t=i?s:(s+"").substring(2),e[this.options.yearDescending?"push":"unshift"]([s,t]);return e=this.fillCommon("y").concat(e)},fillHour:function(){for(var t,e=this.fillCommon("h"),i=-1!==this.options.template.indexOf("h"),s=(this.options.template.indexOf("H"),-1!==this.options.template.toLowerCase().indexOf("hh")),n=i?12:23,a=i?1:0;a<=n;a++)t=s?this.leadZero(a):a,e.push([a,t]);return e},fillMinute:function(){for(var t,e=this.fillCommon("m"),i=-1!==this.options.template.indexOf("mm"),s=0;s<=59;s+=this.options.minuteStep)t=i?this.leadZero(s):s,e.push([s,t]);return e},fillSecond:function(){for(var t,e=this.fillCommon("s"),i=-1!==this.options.template.indexOf("ss"),s=0;s<=59;s+=this.options.secondStep)t=i?this.leadZero(s):s,e.push([s,t]);return e},fillAmpm:function(){var t=-1!==this.options.template.indexOf("a");this.options.template.indexOf("A");return[["am",t?"am":"AM"],["pm",t?"pm":"PM"]]},getValue:function(t){var e,s={},n=this,a=!1;return o.each(this.map,function(t,e){var i;if("ampm"!==t)return i="day"===t?1:0,s[t]=n["$"+t]?parseInt(n["$"+t].val(),10):i,isNaN(s[t])?!(a=!0):void 0}),a?"":(this.$ampm&&(s.hour=12===s.hour?"am"===this.$ampm.val()?0:12:"am"===this.$ampm.val()?s.hour:s.hour+12),e=moment([s.year,s.month,s.day,s.hour,s.minute,s.second]),this.highlight(e),null===(t=void 0===t?this.options.format:t)?e.isValid()?e:null:e.isValid()?e.format(t):"")},setValue:function(t){var i,s,n;function a(t,s){var n={};return t.children("option").each(function(t,e){var i,e=o(e).attr("value");""!==e&&(i=Math.abs(e-s),void 0===n.distance||i<n.distance)&&(n={value:e,distance:i})}),n.value}t&&(i="string"==typeof t?moment(t,this.options.format):moment(t),s=this,n={},i.isValid())&&(o.each(this.map,function(t,e){"ampm"!==t&&(n[t]=i[e[1]]())}),this.$ampm&&(12<=n.hour?(n.ampm="pm",12<n.hour&&(n.hour-=12)):(n.ampm="am",0===n.hour&&(n.hour=12))),o.each(n,function(t,e){s["$"+t]&&("minute"===t&&1<s.options.minuteStep&&s.options.roundTime&&(e=a(s["$"+t],e)),"second"===t&&1<s.options.secondStep&&s.options.roundTime&&(e=a(s["$"+t],e)),s["$"+t].val(e))}),this.options.smartDays&&this.fillCombo("day"),this.$element.val(i.format(this.options.format)).change())},highlight:function(t){t.isValid()?this.options.errorClass?this.$widget.removeClass(this.options.errorClass):this.$widget.find("select").css("border-color",this.borderColor):this.options.errorClass?this.$widget.addClass(this.options.errorClass):(this.borderColor||(this.borderColor=this.$widget.find("select").css("border-color")),this.$widget.find("select").css("border-color","red"))},leadZero:function(t){return t<=9?"0"+t:t},destroy:function(){this.$widget.remove(),this.$element.removeData("combodate").show()}},o.fn.combodate=function(i){var t,s=Array.apply(null,arguments);return s.shift(),"getValue"===i&&this.length&&(t=this.eq(0).data("combodate"))?t.getValue.apply(t,s):this.each(function(){var t=o(this),e=t.data("combodate");e||t.data("combodate",e=new n(this,"object"==typeof i&&i)),"string"==typeof i&&"function"==typeof e[i]&&e[i].apply(e,s)})},o.fn.combodate.defaults={format:"DD-MM-YYYY HH:mm",template:"D / MMM / YYYY   H : mm",value:null,minYear:1970,maxYear:(new Date).getFullYear(),yearDescending:!0,minuteStep:5,secondStep:1,firstItem:"empty",errorClass:null,roundTime:!0,smartDays:!1}})(window.jQuery),(e=>{function i(t){this.init("combodate",t,i.defaults),this.options.viewformat||(this.options.viewformat=this.options.format),t.combodate=e.fn.editableutils.tryParseJson(t.combodate,!0),this.options.combodate=e.extend({},i.defaults.combodate,t.combodate,{format:this.options.format,template:this.options.template})}e.fn.editableutils.inherit(i,e.fn.editabletypes.abstractinput),e.extend(i.prototype,{render:function(){this.$input.combodate(this.options.combodate),"bs3"===e.fn.editableform.engine&&this.$input.siblings().find("select").addClass("form-control"),this.options.inputclass&&this.$input.siblings().find("select").addClass(this.options.inputclass)},value2html:function(t,e){t=t?t.format(this.options.viewformat):"";i.superclass.value2html.call(this,t,e)},html2value:function(t){return t?moment(t,this.options.viewformat):null},value2str:function(t){return t?t.format(this.options.format):""},str2value:function(t){return t?moment(t,this.options.format):null},value2submit:function(t){return this.value2str(t)},value2input:function(t){this.$input.combodate("setValue",t)},input2value:function(){return this.$input.combodate("getValue",null)},activate:function(){this.$input.siblings(".combodate").find("select").eq(0).focus()},autosubmit:function(){}}),i.defaults=e.extend({},e.fn.editabletypes.abstractinput.defaults,{tpl:'<input type="text">',inputclass:null,format:"YYYY-MM-DD",viewformat:null,template:"D / MMM / YYYY",combodate:null}),e.fn.editabletypes.combodate=i})(window.jQuery),(s=>{var n=s.fn.editableform.Constructor.prototype.initInput;s.extend(s.fn.editableform.Constructor.prototype,{initTemplate:function(){this.$form=s(s.fn.editableform.template),this.$form.find(".editable-error-block").addClass("help-block")},initInput:function(){n.apply(this);var t=null===this.input.options.inputclass||!1===this.input.options.inputclass,e="input-medium",i="text,select,textarea,password,email,url,tel,number,range,time".split(",");~s.inArray(this.input.type,i)&&t&&(this.input.options.inputclass=e,this.input.$input.addClass(e))}}),s.fn.editableform.buttons='<button type="submit" class="btn btn-primary editable-submit"><i class="icon-ok icon-white"></i></button><button type="button" class="btn editable-cancel"><i class="icon-remove"></i></button>',s.fn.editableform.errorGroupClass="error",s.fn.editableform.errorBlockClass=null,s.fn.editableform.engine="bs2"})(window.jQuery),(u=>{u.extend(u.fn.editableContainer.Popup.prototype,{containerName:"popover",innerCss:u.fn.popover&&u(u.fn.popover.defaults.template).find("p").length?".popover-content p":".popover-content",defaults:u.fn.popover.defaults,initContainer:function(){var t;u.extend(this.containerOptions,{trigger:"manual",selector:!1,content:" ",template:this.defaults.template}),this.$element.data("template")&&(t=this.$element.data("template"),this.$element.removeData("template")),this.call(this.containerOptions),t&&this.$element.data("template",t)},innerShow:function(){this.call("show")},innerHide:function(){this.call("hide")},innerDestroy:function(){this.call("destroy")},setContainerOption:function(t,e){this.container().options[t]=e},setPosition:function(){!function(){var t,e,i,s,n,a,o,r,l=this.tip(),h="function"==typeof this.options.placement?this.options.placement.call(this,l[0],this.$element[0]):this.options.placement,p=/in/.test(h);switch(l.removeClass("top right bottom left").css({top:0,left:0,display:"block"}),t=this.getPosition(p),e=l[0].offsetWidth,i=l[0].offsetHeight,h=p?h.split(" ")[1]:h,a={top:t.top+t.height,left:t.left+t.width/2-e/2},n={top:t.top-i,left:t.left+t.width/2-e/2},o={top:t.top+t.height/2-i/2,left:t.left-e},r={top:t.top+t.height/2-i/2,left:t.left+t.width},h){case"bottom":a.top+i>u(window).scrollTop()+u(window).height()&&(h=n.top>u(window).scrollTop()?"top":!(r.left+e<u(window).scrollLeft()+u(window).width())&&o.left>u(window).scrollLeft()?"left":"right");break;case"top":n.top<u(window).scrollTop()&&(h=a.top+i<u(window).scrollTop()+u(window).height()?"bottom":!(r.left+e<u(window).scrollLeft()+u(window).width())&&o.left>u(window).scrollLeft()?"left":"right");break;case"left":o.left<u(window).scrollLeft()&&(h=r.left+e<u(window).scrollLeft()+u(window).width()?"right":n.top>u(window).scrollTop()?"top":n.top>u(window).scrollTop()?"bottom":"right");break;case"right":r.left+e>u(window).scrollLeft()+u(window).width()&&(o.left>u(window).scrollLeft()?h="left":n.top>u(window).scrollTop()?h="top":n.top>u(window).scrollTop()&&(h="bottom"))}switch(h){case"bottom":s=a;break;case"top":s=n;break;case"left":s=o;break;case"right":s=r}l.offset(s).addClass(h).addClass("in")}.call(this.container())}})})(window.jQuery),(y=>{function v(){return new Date(Date.UTC.apply(Date,arguments))}function b(t,e){this._process_options(e),this.element=y(t),this.isInline=!1,this.isInput=this.element.is("input"),this.component=!!this.element.is(".date")&&this.element.find(".add-on, .btn"),this.hasInput=this.component&&this.element.find("input").length,this.component&&0===this.component.length&&(this.component=!1),this.picker=y(w.template),this._buildEvents(),this._attachEvents(),this.isInline?this.picker.addClass("datepicker-inline").appendTo(this.element):this.picker.addClass("datepicker-dropdown dropdown-menu"),this.o.rtl&&(this.picker.addClass("datepicker-rtl"),this.picker.find(".prev i, .next i").toggleClass("icon-arrow-left icon-arrow-right")),this.viewMode=this.o.startView,this.o.calendarWeeks&&this.picker.find("tfoot th.today").attr("colspan",function(t,e){return parseInt(e)+1}),this._allow_update=!1,this.setStartDate(this.o.startDate),this.setEndDate(this.o.endDate),this.setDaysOfWeekDisabled(this.o.daysOfWeekDisabled),this.fillDow(),this.fillMonths(),this._allow_update=!0,this.update(),this.showMode(),this.isInline&&this.show()}function l(t,e){this.element=y(t),this.inputs=y.map(e.inputs,function(t){return t.jquery?t[0]:t}),delete e.inputs,y(this.inputs).datepicker(e).bind("changeDate",y.proxy(this.dateUpdated,this)),this.pickers=y.map(this.inputs,function(t){return y(t).data("datepicker")}),this.updateDates()}b.prototype={constructor:b,_process_options:function(t){this._o=y.extend({},this._o,t);var e=this.o=y.extend({},this._o),t=e.language;switch(g[t]||(t=t.split("-")[0],g[t])||(t=h.language),e.language=t,e.startView){case 2:case"decade":e.startView=2;break;case 1:case"year":e.startView=1;break;default:e.startView=0}switch(e.minViewMode){case 1:case"months":e.minViewMode=1;break;case 2:case"years":e.minViewMode=2;break;default:e.minViewMode=0}e.startView=Math.max(e.startView,e.minViewMode),e.weekStart%=7,e.weekEnd=(e.weekStart+6)%7;t=w.parseFormat(e.format);e.startDate!==-1/0&&(e.startDate=w.parseDate(e.startDate,t,e.language)),e.endDate!==1/0&&(e.endDate=w.parseDate(e.endDate,t,e.language)),e.daysOfWeekDisabled=e.daysOfWeekDisabled||[],Array.isArray(e.daysOfWeekDisabled)||(e.daysOfWeekDisabled=e.daysOfWeekDisabled.split(/[,\s]*/)),e.daysOfWeekDisabled=y.map(e.daysOfWeekDisabled,function(t){return parseInt(t,10)})},_events:[],_secondaryEvents:[],_applyEvents:function(t){for(var e,i,s=0;s<t.length;s++)e=t[s][0],i=t[s][1],e.on(i)},_unapplyEvents:function(t){for(var e,i,s=0;s<t.length;s++)e=t[s][0],i=t[s][1],e.off(i)},_buildEvents:function(){this.isInput?this._events=[[this.element,{focus:y.proxy(this.show,this),keyup:y.proxy(this.update,this),keydown:y.proxy(this.keydown,this)}]]:this.component&&this.hasInput?this._events=[[this.element.find("input"),{focus:y.proxy(this.show,this),keyup:y.proxy(this.update,this),keydown:y.proxy(this.keydown,this)}],[this.component,{click:y.proxy(this.show,this)}]]:this.element.is("div")?this.isInline=!0:this._events=[[this.element,{click:y.proxy(this.show,this)}]],this._secondaryEvents=[[this.picker,{click:y.proxy(this.click,this)}],[y(window),{resize:y.proxy(this.place,this)}],[y(document),{mousedown:y.proxy(function(t){this.element.is(t.target)||this.element.find(t.target).size()||this.picker.is(t.target)||this.picker.find(t.target).size()||this.hide()},this)}]]},_attachEvents:function(){this._detachEvents(),this._applyEvents(this._events)},_detachEvents:function(){this._unapplyEvents(this._events)},_attachSecondaryEvents:function(){this._detachSecondaryEvents(),this._applyEvents(this._secondaryEvents)},_detachSecondaryEvents:function(){this._unapplyEvents(this._secondaryEvents)},_trigger:function(t,e){var i=e||this.date,e=new Date(i.getTime()+6e4*i.getTimezoneOffset());this.element.trigger({type:t,date:e,format:y.proxy(function(t){t=t||this.o.format;return w.formatDate(i,t,this.o.language)},this)})},show:function(t){this.isInline||this.picker.appendTo("body"),this.picker.show(),this.height=(this.component||this.element).outerHeight(),this.place(),this._attachSecondaryEvents(),t&&t.preventDefault(),this._trigger("show")},hide:function(t){this.isInline||this.picker.is(":visible")&&(this.picker.hide().detach(),this._detachSecondaryEvents(),this.viewMode=this.o.startView,this.showMode(),this.o.forceParse&&(this.isInput&&this.element.val()||this.hasInput&&this.element.find("input").val())&&this.setValue(),this._trigger("hide"))},remove:function(){this.hide(),this._detachEvents(),this._detachSecondaryEvents(),this.picker.remove(),delete this.element.data().datepicker,this.isInput||delete this.element.data().date},getDate:function(){var t=this.getUTCDate();return new Date(t.getTime()+6e4*t.getTimezoneOffset())},getUTCDate:function(){return this.date},setDate:function(t){this.setUTCDate(new Date(t.getTime()-6e4*t.getTimezoneOffset()))},setUTCDate:function(t){this.date=t,this.setValue()},setValue:function(){var t=this.getFormattedDate();this.isInput?this.element.val(t):this.component&&this.element.find("input").val(t)},getFormattedDate:function(t){return void 0===t&&(t=this.o.format),w.formatDate(this.date,t,this.o.language)},setStartDate:function(t){this._process_options({startDate:t}),this.update(),this.updateNavArrows()},setEndDate:function(t){this._process_options({endDate:t}),this.update(),this.updateNavArrows()},setDaysOfWeekDisabled:function(t){this._process_options({daysOfWeekDisabled:t}),this.update(),this.updateNavArrows()},place:function(){var t,e,i;this.isInline||(t=parseInt(this.element.parents().filter(function(){return"auto"!=y(this).css("z-index")}).first().css("z-index"))+10,e=(this.component?this.component.parent():this.element).offset(),i=(this.component||this.element).outerHeight(!0),this.picker.css({top:e.top+i,left:e.left,zIndex:t}))},_allow_update:!0,update:function(){var t,e;this._allow_update&&(e=!1,arguments&&arguments.length&&("string"==typeof arguments[0]||arguments[0]instanceof Date)?(t=arguments[0],e=!0):(t=this.isInput?this.element.val():this.element.data("date")||this.element.find("input").val(),delete this.element.data().date),this.date=w.parseDate(t,this.o.format,this.o.language),e&&this.setValue(),this.date<this.o.startDate?this.viewDate=new Date(this.o.startDate):this.date>this.o.endDate?this.viewDate=new Date(this.o.endDate):this.viewDate=new Date(this.date),this.fill())},fillDow:function(){var t,e=this.o.weekStart,i="<tr>";for(this.o.calendarWeeks&&(i+=t='<th class="cw">&nbsp;</th>',this.picker.find(".datepicker-days thead tr:first-child").prepend(t));e<this.o.weekStart+7;)i+='<th class="dow">'+g[this.o.language].daysMin[e++%7]+"</th>";i+="</tr>",this.picker.find(".datepicker-days thead").append(i)},fillMonths:function(){for(var t="",e=0;e<12;)t+='<span class="month">'+g[this.o.language].monthsShort[e++]+"</span>";this.picker.find(".datepicker-months td").html(t)},setRange:function(t){t&&t.length?this.range=y.map(t,function(t){return t.valueOf()}):delete this.range,this.fill()},getClassNames:function(t){var e=[],i=this.viewDate.getUTCFullYear(),s=this.viewDate.getUTCMonth(),n=this.date.valueOf(),a=new Date;return t.getUTCFullYear()<i||t.getUTCFullYear()==i&&t.getUTCMonth()<s?e.push("old"):(t.getUTCFullYear()>i||t.getUTCFullYear()==i&&t.getUTCMonth()>s)&&e.push("new"),this.o.todayHighlight&&t.getUTCFullYear()==a.getFullYear()&&t.getUTCMonth()==a.getMonth()&&t.getUTCDate()==a.getDate()&&e.push("today"),n&&t.valueOf()==n&&e.push("active"),(t.valueOf()<this.o.startDate||t.valueOf()>this.o.endDate||-1!==y.inArray(t.getUTCDay(),this.o.daysOfWeekDisabled))&&e.push("disabled"),this.range&&(t>this.range[0]&&t<this.range[this.range.length-1]&&e.push("range"),-1!=y.inArray(t.valueOf(),this.range))&&e.push("selected"),e},fill:function(){for(var t,e=new Date(this.viewDate),i=e.getUTCFullYear(),e=e.getUTCMonth(),s=this.o.startDate!==-1/0?this.o.startDate.getUTCFullYear():-1/0,n=this.o.startDate!==-1/0?this.o.startDate.getUTCMonth():-1/0,a=this.o.endDate!==1/0?this.o.endDate.getUTCFullYear():1/0,o=this.o.endDate!==1/0?this.o.endDate.getUTCMonth():1/0,r=(this.date&&this.date.valueOf(),this.picker.find(".datepicker-days thead th.datepicker-switch").text(g[this.o.language].months[e]+" "+i),this.picker.find("tfoot th.today").text(g[this.o.language].today).toggle(!1!==this.o.todayBtn),this.picker.find("tfoot th.clear").text(g[this.o.language].clear).toggle(!1!==this.o.clearBtn),this.updateNavArrows(),this.fillMonths(),v(i,e-1,28,0,0,0,0)),e=w.getDaysInMonth(r.getUTCFullYear(),r.getUTCMonth()),l=(r.setUTCDate(e),r.setUTCDate(e-(r.getUTCDay()-this.o.weekStart+7)%7),new Date(r)),h=(l.setUTCDate(l.getUTCDate()+42),l=l.valueOf(),[]);r.valueOf()<l;){r.getUTCDay()==this.o.weekStart&&(h.push("<tr>"),this.o.calendarWeeks)&&(p=new Date(+r+(this.o.weekStart-r.getUTCDay()-7)%7*864e5),p=new Date(+p+(11-p.getUTCDay())%7*864e5),u=new Date(+(u=v(p.getUTCFullYear(),0,1))+(11-u.getUTCDay())%7*864e5),h.push('<td class="cw">'+((p-u)/864e5/7+1)+"</td>")),(p=this.getClassNames(r)).push("day");var p,u=this.o.beforeShowDay(r);void 0===u?u={}:"boolean"==typeof u?u={enabled:u}:"string"==typeof u&&(u={classes:u}),!1===u.enabled&&p.push("disabled"),u.classes&&(p=p.concat(u.classes.split(/\s+/))),u.tooltip&&(t=u.tooltip),p=y.unique(p),h.push('<td class="'+p.join(" ")+'"'+(t?' title="'+t+'"':"")+">"+r.getUTCDate()+"</td>"),r.getUTCDay()==this.o.weekEnd&&h.push("</tr>"),r.setUTCDate(r.getUTCDate()+1)}this.picker.find(".datepicker-days tbody").empty().append(h.join(""));var d=this.date&&this.date.getUTCFullYear(),e=this.picker.find(".datepicker-months").find("th:eq(1)").text(i).end().find("span").removeClass("active"),n=(d&&d==i&&e.eq(this.date.getUTCMonth()).addClass("active"),(i<s||a<i)&&e.addClass("disabled"),i==s&&e.slice(0,n).addClass("disabled"),i==a&&e.slice(o+1).addClass("disabled"),h="",i=10*parseInt(i/10,10),this.picker.find(".datepicker-years").find("th:eq(1)").text(i+"-"+(i+9)).end().find("td"));--i;for(var c=-1;c<11;c++)h+='<span class="year'+(-1==c?" old":10==c?" new":"")+(d==i?" active":"")+(i<s||a<i?" disabled":"")+'">'+i+"</span>",i+=1;n.html(h)},updateNavArrows:function(){if(this._allow_update){var t=new Date(this.viewDate),e=t.getUTCFullYear(),i=t.getUTCMonth();switch(this.viewMode){case 0:this.o.startDate!==-1/0&&e<=this.o.startDate.getUTCFullYear()&&i<=this.o.startDate.getUTCMonth()?this.picker.find(".prev").css({visibility:"hidden"}):this.picker.find(".prev").css({visibility:"visible"}),this.o.endDate!==1/0&&e>=this.o.endDate.getUTCFullYear()&&i>=this.o.endDate.getUTCMonth()?this.picker.find(".next").css({visibility:"hidden"}):this.picker.find(".next").css({visibility:"visible"});break;case 1:case 2:this.o.startDate!==-1/0&&e<=this.o.startDate.getUTCFullYear()?this.picker.find(".prev").css({visibility:"hidden"}):this.picker.find(".prev").css({visibility:"visible"}),this.o.endDate!==1/0&&e>=this.o.endDate.getUTCFullYear()?this.picker.find(".next").css({visibility:"hidden"}):this.picker.find(".next").css({visibility:"visible"})}}},click:function(t){t.preventDefault();var e,i,s,n,a=y(t.target).closest("span, td, th");if(1==a.length)switch(a[0].nodeName.toLowerCase()){case"th":switch(a[0].className){case"datepicker-switch":this.showMode(1);break;case"prev":case"next":var o=w.modes[this.viewMode].navStep*("prev"==a[0].className?-1:1);switch(this.viewMode){case 0:this.viewDate=this.moveMonth(this.viewDate,o);break;case 1:case 2:this.viewDate=this.moveYear(this.viewDate,o)}this.fill();break;case"today":var r=v((r=new Date).getFullYear(),r.getMonth(),r.getDate(),0,0,0),l=(this.showMode(-2),"linked"==this.o.todayBtn?null:"view");this._setDate(r,l);break;case"clear":this.isInput?e=this.element:this.component&&(e=this.element.find("input")),e&&e.val("").change(),this._trigger("changeDate"),this.update(),this.o.autoclose&&this.hide()}break;case"span":a.is(".disabled")||(this.viewDate.setUTCDate(1),a.is(".month")?(i=1,n=a.parent().find("span").index(a),s=this.viewDate.getUTCFullYear(),this.viewDate.setUTCMonth(n),this._trigger("changeMonth",this.viewDate),1===this.o.minViewMode&&this._setDate(v(s,n,i,0,0,0,0))):(s=parseInt(a.text(),10)||0,i=1,n=0,this.viewDate.setUTCFullYear(s),this._trigger("changeYear",this.viewDate),2===this.o.minViewMode&&this._setDate(v(s,n,i,0,0,0,0))),this.showMode(-1),this.fill());break;case"td":a.is(".day")&&!a.is(".disabled")&&(i=parseInt(a.text(),10)||1,s=this.viewDate.getUTCFullYear(),n=this.viewDate.getUTCMonth(),a.is(".old")?0===n?(n=11,--s):--n:a.is(".new")&&(11==n?(n=0,s+=1):n+=1),this._setDate(v(s,n,i,0,0,0,0)))}},_setDate:function(t,e){var i;e&&"date"!=e||(this.date=new Date(t)),e&&"view"!=e||(this.viewDate=new Date(t)),this.fill(),this.setValue(),this._trigger("changeDate"),this.isInput?i=this.element:this.component&&(i=this.element.find("input")),i&&(i.change(),!this.o.autoclose||e&&"date"!=e||this.hide())},moveMonth:function(t,e){if(!e)return t;var i,s,n=new Date(t.valueOf()),a=n.getUTCDate(),o=n.getUTCMonth(),r=Math.abs(e);if(e=0<e?1:-1,1==r)s=-1==e?function(){return n.getUTCMonth()==o}:function(){return n.getUTCMonth()!=i},i=o+e,n.setUTCMonth(i),(i<0||11<i)&&(i=(i+12)%12);else{for(var l=0;l<r;l++)n=this.moveMonth(n,e);i=n.getUTCMonth(),n.setUTCDate(a),s=function(){return i!=n.getUTCMonth()}}for(;s();)n.setUTCDate(--a),n.setUTCMonth(i);return n},moveYear:function(t,e){return this.moveMonth(t,12*e)},dateWithinRange:function(t){return t>=this.o.startDate&&t<=this.o.endDate},keydown:function(t){if(this.picker.is(":not(:visible)"))27==t.keyCode&&this.show();else{var e,i,s,n,a=!1;switch(t.keyCode){case 27:this.hide(),t.preventDefault();break;case 37:case 39:this.o.keyboardNavigation&&(e=37==t.keyCode?-1:1,t.ctrlKey?(i=this.moveYear(this.date,e),s=this.moveYear(this.viewDate,e)):t.shiftKey?(i=this.moveMonth(this.date,e),s=this.moveMonth(this.viewDate,e)):((i=new Date(this.date)).setUTCDate(this.date.getUTCDate()+e),(s=new Date(this.viewDate)).setUTCDate(this.viewDate.getUTCDate()+e)),this.dateWithinRange(i))&&(this.date=i,this.viewDate=s,this.setValue(),this.update(),t.preventDefault(),a=!0);break;case 38:case 40:this.o.keyboardNavigation&&(e=38==t.keyCode?-1:1,t.ctrlKey?(i=this.moveYear(this.date,e),s=this.moveYear(this.viewDate,e)):t.shiftKey?(i=this.moveMonth(this.date,e),s=this.moveMonth(this.viewDate,e)):((i=new Date(this.date)).setUTCDate(this.date.getUTCDate()+7*e),(s=new Date(this.viewDate)).setUTCDate(this.viewDate.getUTCDate()+7*e)),this.dateWithinRange(i))&&(this.date=i,this.viewDate=s,this.setValue(),this.update(),t.preventDefault(),a=!0);break;case 13:this.hide(),t.preventDefault();break;case 9:this.hide()}a&&(this._trigger("changeDate"),this.isInput?n=this.element:this.component&&(n=this.element.find("input")),n)&&n.change()}},showMode:function(t){t&&(this.viewMode=Math.max(this.o.minViewMode,Math.min(2,this.viewMode+t))),this.picker.find(">div").hide().filter(".datepicker-"+w.modes[this.viewMode].clsName).css("display","block"),this.updateNavArrows()}},l.prototype={updateDates:function(){this.dates=y.map(this.pickers,function(t){return t.date}),this.updateRanges()},updateRanges:function(){var i=y.map(this.dates,function(t){return t.valueOf()});y.each(this.pickers,function(t,e){e.setRange(i)})},dateUpdated:function(t){var e=y(t.target).data("datepicker").getUTCDate(),i=y.inArray(t.target,this.inputs),s=this.inputs.length;if(-1!=i){if(e<this.dates[i])for(;0<=i&&e<this.dates[i];)this.pickers[i--].setUTCDate(e);else if(e>this.dates[i])for(;i<s&&e>this.dates[i];)this.pickers[i++].setUTCDate(e);this.updateDates()}},remove:function(){y.map(this.pickers,function(t){t.remove()}),delete this.element.data().datepicker}};var t=y.fn.datepicker,i=y.fn.datepicker=function(a){var o,r=Array.apply(null,arguments);return r.shift(),this.each(function(){var t,e,i=y(this),s=i.data("datepicker"),n="object"==typeof a&&a;if(s||(e=((t,e)=>{var i,s=y(t).data(),n={},a=new RegExp("^"+e.toLowerCase()+"([A-Z])"),e=new RegExp("^"+e.toLowerCase());for(i in s)e.test(i)&&(n[i.replace(a,function(t,e){return e.toLowerCase()})]=s[i]);return n})(this,"date"),t=(t=>{var i,s={};if(g[t]||(t=t.split("-")[0],g[t]))return i=g[t],y.each(p,function(t,e){e in i&&(s[e]=i[e])}),s})(y.extend({},h,e,n).language),t=y.extend({},h,t,e,n),i.is(".input-daterange")||t.inputs?(e={inputs:t.inputs||i.find("input").toArray()},i.data("datepicker",s=new l(this,y.extend(t,e)))):i.data("datepicker",s=new b(this,t))),"string"==typeof a&&"function"==typeof s[a]&&void 0!==(o=s[a].apply(s,r)))return!1}),void 0!==o?o:this},h=y.fn.datepicker.defaults={autoclose:!1,beforeShowDay:y.noop,calendarWeeks:!1,clearBtn:!1,daysOfWeekDisabled:[],endDate:1/0,forceParse:!0,format:"mm/dd/yyyy",keyboardNavigation:!0,language:"en",minViewMode:0,rtl:!1,startDate:-1/0,startView:0,todayBtn:!1,todayHighlight:!1,weekStart:0},p=y.fn.datepicker.locale_opts=["format","rtl","weekStart"],g=(y.fn.datepicker.Constructor=b,y.fn.datepicker.dates={en:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],daysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sun"],daysMin:["Su","Mo","Tu","We","Th","Fr","Sa","Su"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],today:"Today",clear:"Clear"}}),w={modes:[{clsName:"days",navFnc:"Month",navStep:1},{clsName:"months",navFnc:"FullYear",navStep:1},{clsName:"years",navFnc:"FullYear",navStep:10}],isLeapYear:function(t){return t%4==0&&t%100!=0||t%400==0},getDaysInMonth:function(t,e){return[31,w.isLeapYear(t)?29:28,31,30,31,30,31,31,30,31,30,31][e]},validParts:/dd?|DD?|mm?|MM?|yy(?:yy)?/g,nonpunctuation:/[^ -\/:-@\[\u3400-\u9fff-`{-~\t\n\r]+/g,parseFormat:function(t){var e=t.replace(this.validParts,"\0").split("\0"),t=t.match(this.validParts);if(e&&e.length&&t&&0!==t.length)return{separators:e,parts:t};throw new Error("Invalid date format.")},parseDate:function(t,e,i){if(!(t instanceof Date)){if("string"==typeof e&&(e=w.parseFormat(e)),/^[\-+]\d+[dmwy]([\s,]+[\-+]\d+[dmwy])*$/.test(t)){var s,n=/([\-+]\d+)([dmwy])/,a=t.match(/([\-+]\d+)([dmwy])/g);t=new Date;for(var o=0;o<a.length;o++)switch(h=n.exec(a[o]),s=parseInt(h[1]),h[2]){case"d":t.setUTCDate(t.getUTCDate()+s);break;case"m":t=b.prototype.moveMonth.call(b.prototype,t,s);break;case"w":t.setUTCDate(t.getUTCDate()+7*s);break;case"y":t=b.prototype.moveYear.call(b.prototype,t,s)}return v(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate(),0,0,0)}var r,l,h,a=t&&t.match(this.nonpunctuation)||[],t=new Date,p={},u=["yyyy","yy","M","MM","m","mm","d","dd"],d={yyyy:function(t,e){return t.setUTCFullYear(e)},yy:function(t,e){return t.setUTCFullYear(2e3+e)},m:function(t,e){for(--e;e<0;)e+=12;for(t.setUTCMonth(e%=12);t.getUTCMonth()!=e;)t.setUTCDate(t.getUTCDate()-1);return t},d:function(t,e){return t.setUTCDate(e)}},c=(d.M=d.MM=d.mm=d.m,d.dd=d.d,t=v(t.getFullYear(),t.getMonth(),t.getDate(),0,0,0),e.parts.slice());if(a.length!=c.length&&(c=y(c).filter(function(t,e){return-1!==y.inArray(e,u)}).toArray()),a.length==c.length){for(var o=0,f=c.length;o<f;o++){if(r=parseInt(a[o],10),h=c[o],isNaN(r))switch(h){case"MM":l=y(g[i].months).filter(function(){var t=this.slice(0,a[o].length);return t==a[o].slice(0,t.length)}),r=y.inArray(l[0],g[i].months)+1;break;case"M":l=y(g[i].monthsShort).filter(function(){var t=this.slice(0,a[o].length);return t==a[o].slice(0,t.length)}),r=y.inArray(l[0],g[i].monthsShort)+1}p[h]=r}for(var m,o=0;o<u.length;o++)(m=u[o])in p&&!isNaN(p[m])&&d[m](t,p[m])}}return t},formatDate:function(t,e,i){"string"==typeof e&&(e=w.parseFormat(e));for(var s={d:t.getUTCDate(),D:g[i].daysShort[t.getUTCDay()],DD:g[i].days[t.getUTCDay()],m:t.getUTCMonth()+1,M:g[i].monthsShort[t.getUTCMonth()],MM:g[i].months[t.getUTCMonth()],yy:t.getUTCFullYear().toString().substring(2),yyyy:t.getUTCFullYear()},t=(s.dd=(s.d<10?"0":"")+s.d,s.mm=(s.m<10?"0":"")+s.m,[]),n=y.extend([],e.separators),a=0,o=e.parts.length;a<=o;a++)n.length&&t.push(n.shift()),t.push(s[e.parts[a]]);return t.join("")},headTemplate:'<thead><tr><th class="prev"><i class="icon-arrow-left"/></th><th colspan="5" class="datepicker-switch"></th><th class="next"><i class="icon-arrow-right"/></th></tr></thead>',contTemplate:'<tbody><tr><td colspan="7"></td></tr></tbody>',footTemplate:'<tfoot><tr><th colspan="7" class="today"></th></tr><tr><th colspan="7" class="clear"></th></tr></tfoot>'};w.template='<div class="datepicker"><div class="datepicker-days"><table class=" table-condensed">'+w.headTemplate+"<tbody></tbody>"+w.footTemplate+'</table></div><div class="datepicker-months"><table class="table-condensed">'+w.headTemplate+w.contTemplate+w.footTemplate+'</table></div><div class="datepicker-years"><table class="table-condensed">'+w.headTemplate+w.contTemplate+w.footTemplate+"</table></div></div>",y.fn.datepicker.DPGlobal=w,y.fn.datepicker.noConflict=function(){return y.fn.datepicker=t,this},y(document).on("focus.datepicker.data-api click.datepicker.data-api",'[data-provide="datepicker"]',function(t){var e=y(this);e.data("datepicker")||(t.preventDefault(),i.call(e,"show"))}),y(function(){i.call(y('[data-provide="datepicker-inline"]'))})})(window.jQuery),(i=>{function s(t){this.init("date",t,s.defaults),this.initPicker(t,s.defaults)}i.fn.bdatepicker=i.fn.datepicker.noConflict(),i.fn.datepicker||(i.fn.datepicker=i.fn.bdatepicker),i.fn.editableutils.inherit(s,i.fn.editabletypes.abstractinput),i.extend(s.prototype,{initPicker:function(t,e){this.options.viewformat||(this.options.viewformat=this.options.format),t.datepicker=i.fn.editableutils.tryParseJson(t.datepicker,!0),this.options.datepicker=i.extend({},e.datepicker,t.datepicker,{format:this.options.viewformat}),this.options.datepicker.language=this.options.datepicker.language||"en",this.dpg=i.fn.bdatepicker.DPGlobal,this.parsedFormat=this.dpg.parseFormat(this.options.format),this.parsedViewFormat=this.dpg.parseFormat(this.options.viewformat)},render:function(){this.$input.bdatepicker(this.options.datepicker),this.options.clear&&(this.$clear=i('<a href="#"></a>').html(this.options.clear).click(i.proxy(function(t){t.preventDefault(),t.stopPropagation(),this.clear()},this)),this.$tpl.parent().append(i('<div class="editable-clear">').append(this.$clear)))},value2html:function(t,e){t=t?this.dpg.formatDate(t,this.parsedViewFormat,this.options.datepicker.language):"";s.superclass.value2html.call(this,t,e)},html2value:function(t){return this.parseDate(t,this.parsedViewFormat)},value2str:function(t){return t?this.dpg.formatDate(t,this.parsedFormat,this.options.datepicker.language):""},str2value:function(t){return this.parseDate(t,this.parsedFormat)},value2submit:function(t){return this.value2str(t)},value2input:function(t){this.$input.bdatepicker("update",t)},input2value:function(){return this.$input.data("datepicker").date},activate:function(){},clear:function(){this.$input.data("datepicker").date=null,this.$input.find(".active").removeClass("active"),this.options.showbuttons||this.$input.closest("form").submit()},autosubmit:function(){this.$input.on("mouseup",".day",function(t){var e;i(t.currentTarget).is(".old")||i(t.currentTarget).is(".new")||(e=i(this).closest("form"),setTimeout(function(){e.submit()},200))})},parseDate:function(t,e){var i=null;return i=t&&(i=this.dpg.parseDate(t,e,this.options.datepicker.language),"string"==typeof t)&&t!==this.dpg.formatDate(i,e,this.options.datepicker.language)?null:i}}),s.defaults=i.extend({},i.fn.editabletypes.abstractinput.defaults,{tpl:'<div class="editable-date well"></div>',inputclass:null,format:"yyyy-mm-dd",viewformat:null,datepicker:{weekStart:0,startView:0,minViewMode:0,autoclose:!1},clear:"&times; clear"}),i.fn.editabletypes.date=s})(window.jQuery),(t=>{function e(t){this.init("datefield",t,e.defaults),this.initPicker(t,e.defaults)}t.fn.editableutils.inherit(e,t.fn.editabletypes.date),t.extend(e.prototype,{render:function(){this.$input=this.$tpl.find("input"),this.setClass(),this.setAttr("placeholder"),this.$tpl.bdatepicker(this.options.datepicker),this.$input.off("focus keydown"),this.$input.keyup(t.proxy(function(){this.$tpl.removeData("date"),this.$tpl.bdatepicker("update")},this))},value2input:function(t){this.$input.val(t?this.dpg.formatDate(t,this.parsedViewFormat,this.options.datepicker.language):""),this.$tpl.bdatepicker("update")},input2value:function(){return this.html2value(this.$input.val())},activate:function(){t.fn.editabletypes.text.prototype.activate.call(this)},autosubmit:function(){}}),e.defaults=t.extend({},t.fn.editabletypes.date.defaults,{tpl:'<div class="input-append date"><input type="text"/><span class="add-on"><i class="icon-th"></i></span></div>',inputclass:"input-small",datepicker:{weekStart:0,startView:0,minViewMode:0,autoclose:!0}}),t.fn.editabletypes.datefield=e})(window.jQuery),(i=>{function s(t){this.init("datetime",t,s.defaults),this.initPicker(t,s.defaults)}i.fn.editableutils.inherit(s,i.fn.editabletypes.abstractinput),i.extend(s.prototype,{initPicker:function(t,e){this.options.viewformat||(this.options.viewformat=this.options.format),t.datetimepicker=i.fn.editableutils.tryParseJson(t.datetimepicker,!0),this.options.datetimepicker=i.extend({},e.datetimepicker,t.datetimepicker,{format:this.options.viewformat}),this.options.datetimepicker.language=this.options.datetimepicker.language||"en",this.dpg=i.fn.datetimepicker.DPGlobal,this.parsedFormat=this.dpg.parseFormat(this.options.format,this.options.formatType),this.parsedViewFormat=this.dpg.parseFormat(this.options.viewformat,this.options.formatType)},render:function(){this.$input.datetimepicker(this.options.datetimepicker),this.$input.on("changeMode",function(t){var e=i(this).closest("form").parent();setTimeout(function(){e.triggerHandler("resize")},0)}),this.options.clear&&(this.$clear=i('<a href="#"></a>').html(this.options.clear).click(i.proxy(function(t){t.preventDefault(),t.stopPropagation(),this.clear()},this)),this.$tpl.parent().append(i('<div class="editable-clear">').append(this.$clear)))},value2html:function(t,e){t=t?this.dpg.formatDate(this.toUTC(t),this.parsedViewFormat,this.options.datetimepicker.language,this.options.formatType):"";if(!e)return t;s.superclass.value2html.call(this,t,e)},html2value:function(t){t=this.parseDate(t,this.parsedViewFormat);return t?this.fromUTC(t):null},value2str:function(t){return t?this.dpg.formatDate(this.toUTC(t),this.parsedFormat,this.options.datetimepicker.language,this.options.formatType):""},str2value:function(t){t=this.parseDate(t,this.parsedFormat);return t?this.fromUTC(t):null},value2submit:function(t){return this.value2str(t)},value2input:function(t){t&&this.$input.data("datetimepicker").setDate(t)},input2value:function(){var t=this.$input.data("datetimepicker");return t.date?t.getDate():null},activate:function(){},clear:function(){this.$input.data("datetimepicker").date=null,this.$input.find(".active").removeClass("active"),this.options.showbuttons||this.$input.closest("form").submit()},autosubmit:function(){this.$input.on("mouseup",".minute",function(t){var e=i(this).closest("form");setTimeout(function(){e.submit()},200)})},toUTC:function(t){return t&&new Date(t.valueOf()-6e4*t.getTimezoneOffset())},fromUTC:function(t){return t&&new Date(t.valueOf()+6e4*t.getTimezoneOffset())},parseDate:function(t,e){var i=null;return i=t&&(i=this.dpg.parseDate(t,e,this.options.datetimepicker.language,this.options.formatType),"string"==typeof t)&&t!==this.dpg.formatDate(i,e,this.options.datetimepicker.language,this.options.formatType)?null:i}}),s.defaults=i.extend({},i.fn.editabletypes.abstractinput.defaults,{tpl:'<div class="editable-date well"></div>',inputclass:null,format:"yyyy-mm-dd hh:ii",formatType:"standard",viewformat:null,datetimepicker:{todayHighlight:!1,autoclose:!1},clear:"&times; clear"}),i.fn.editabletypes.datetime=s})(window.jQuery),(t=>{function e(t){this.init("datetimefield",t,e.defaults),this.initPicker(t,e.defaults)}t.fn.editableutils.inherit(e,t.fn.editabletypes.datetime),t.extend(e.prototype,{render:function(){this.$input=this.$tpl.find("input"),this.setClass(),this.setAttr("placeholder"),this.$tpl.datetimepicker(this.options.datetimepicker),this.$input.off("focus keydown"),this.$input.keyup(t.proxy(function(){this.$tpl.removeData("date"),this.$tpl.datetimepicker("update")},this))},value2input:function(t){this.$input.val(this.value2html(t)),this.$tpl.datetimepicker("update")},input2value:function(){return this.html2value(this.$input.val())},activate:function(){t.fn.editabletypes.text.prototype.activate.call(this)},autosubmit:function(){}}),e.defaults=t.extend({},t.fn.editabletypes.datetime.defaults,{tpl:'<div class="input-append date"><input type="text"/><span class="add-on"><i class="icon-th"></i></span></div>',inputclass:"input-medium",datetimepicker:{todayHighlight:!1,autoclose:!0}}),t.fn.editabletypes.datetimefield=e})(window.jQuery),(s=>{function e(t){this.init("typeahead",t,e.defaults),this.options.typeahead=s.extend({},e.defaults.typeahead,{matcher:this.matcher,sorter:this.sorter,highlighter:this.highlighter,updater:this.updater},t.typeahead)}s.fn.editableutils.inherit(e,s.fn.editabletypes.list),s.extend(e.prototype,{renderList:function(){this.$input=this.$tpl.is("input")?this.$tpl:this.$tpl.find('input[type="text"]'),this.options.typeahead.source=this.sourceData,this.$input.typeahead(this.options.typeahead);var t=this.$input.data("typeahead");t.render=s.proxy(this.typeaheadRender,t),t.select=s.proxy(this.typeaheadSelect,t),t.move=s.proxy(this.typeaheadMove,t),this.renderClear(),this.setClass(),this.setAttr("placeholder")},value2htmlFinal:function(t,e){var i;this.getIsObjects()&&(t=(i=s.fn.editableutils.itemsByValue(t,this.sourceData)).length?i[0].text:""),s.fn.editabletypes.abstractinput.prototype.value2html.call(this,t,e)},html2value:function(t){return t||null},value2input:function(t){var e;this.getIsObjects()?(e=s.fn.editableutils.itemsByValue(t,this.sourceData),this.$input.data("value",t).val(e.length?e[0].text:"")):this.$input.val(t)},input2value:function(){var t,e;return this.getIsObjects()?(t=this.$input.data("value"),(e=s.fn.editableutils.itemsByValue(t,this.sourceData)).length&&e[0].text.toLowerCase()===this.$input.val().toLowerCase()?t:null):this.$input.val()},getIsObjects:function(){if(void 0===this.isObjects){this.isObjects=!1;for(var t=0;t<this.sourceData.length;t++)if(this.sourceData[t].value!==this.sourceData[t].text){this.isObjects=!0;break}}return this.isObjects},activate:s.fn.editabletypes.text.prototype.activate,renderClear:s.fn.editabletypes.text.prototype.renderClear,postrender:s.fn.editabletypes.text.prototype.postrender,toggleClear:s.fn.editabletypes.text.prototype.toggleClear,clear:function(){s.fn.editabletypes.text.prototype.clear.call(this),this.$input.data("value","")},matcher:function(t){return s.fn.typeahead.Constructor.prototype.matcher.call(this,t.text)},sorter:function(t){for(var e,i,s=[],n=[],a=[];e=t.shift();)((i=e.text).toLowerCase().indexOf(this.query.toLowerCase())?~i.indexOf(this.query)?n:a:s).push(e);return s.concat(n,a)},highlighter:function(t){return s.fn.typeahead.Constructor.prototype.highlighter.call(this,t.text)},updater:function(t){return this.$element.data("value",t.value),t.text},typeaheadRender:function(t){var i=this;return t=s(t).map(function(t,e){return(t=s(i.options.item).data("item",e)).find("a").html(i.highlighter(e)),t[0]}),this.options.autoSelect&&t.first().addClass("active"),this.$menu.html(t),this},typeaheadSelect:function(){var t=this.$menu.find(".active").data("item");return(this.options.autoSelect||t)&&this.$element.val(this.updater(t)).change(),this.hide()},typeaheadMove:function(t){if(this.shown){switch(t.keyCode){case 9:case 13:case 27:if(!this.$menu.find(".active").length)return;t.preventDefault();break;case 38:t.preventDefault(),this.prev();break;case 40:t.preventDefault(),this.next()}t.stopPropagation()}}}),e.defaults=s.extend({},s.fn.editabletypes.list.defaults,{tpl:'<input type="text">',typeahead:null,clear:!0}),s.fn.editabletypes.typeahead=e})(window.jQuery);
\ No newline at end of file
diff --git a/dist/bootstrap3-editable/js/bootstrap-editable.js b/dist/bootstrap3-editable/js/bootstrap-editable.js
index 53d3494..3fc9bae 100644
--- a/dist/bootstrap3-editable/js/bootstrap-editable.js
+++ b/dist/bootstrap3-editable/js/bootstrap-editable.js
@@ -2601,7 +2601,7 @@ List - abstract class for inputs that have source option loaded from js array or
         onSourceReady: function (success, error) {
             //run source if it function
             var source;
-            if ($.isFunction(this.options.source)) {
+            if (typeof(this.options.source) === 'function') {
                 source = this.options.source.call(this.options.scope);
                 this.sourceData = null;
                 //note: if function returns the same source as URL - sourceData will be taken from cahce and no extra request performed
@@ -2718,7 +2718,7 @@ List - abstract class for inputs that have source option loaded from js array or
             
             if(!Array.isArray(this.prependData)) {
                 //run prepend if it is function (once)
-                if ($.isFunction(this.options.prepend)) {
+                if (typeof (this.options.prepend) === 'function') {
                     this.options.prepend = this.options.prepend.call(this.options.scope);
                 }
               
@@ -3695,7 +3695,7 @@ $(function(){
         if(!options.select2.tags && options.source) {
             var source = options.source;
             //if source is function, call it (once!)
-            if ($.isFunction(options.source)) {
+            if (typeof (options.source) === 'function') {
                 source = options.source.call(options.scope);
             }               
 
diff --git a/dist/bootstrap3-editable/js/bootstrap-editable.min.js b/dist/bootstrap3-editable/js/bootstrap-editable.min.js
index c530c2d..84d8618 100644
--- a/dist/bootstrap3-editable/js/bootstrap-editable.min.js
+++ b/dist/bootstrap3-editable/js/bootstrap-editable.min.js
@@ -2,4 +2,4 @@
 * A maintained fork of x-editable for Bootstrap 5 support.
 * https://git.24unix.net/tracer/x-editable
 * Copyright (c) 2025 Micha Espey; Licensed MIT */
-(a=>{function n(t,e){this.options=a.extend({},a.fn.editableform.defaults,e),this.$div=a(t),this.options.scope||(this.options.scope=this)}n.prototype={constructor:n,initInput:function(){this.input=this.options.input,this.value=this.input.str2value(this.options.value),this.input.prerender()},initTemplate:function(){this.$form=a(a.fn.editableform.template)},initButtons:function(){var t=this.$form.find(".editable-buttons");t.append(a.fn.editableform.buttons),"bottom"===this.options.showbuttons&&t.addClass("editable-buttons-bottom")},render:function(){this.$loading=a(a.fn.editableform.loading),this.$div.empty().append(this.$loading),this.initTemplate(),this.options.showbuttons?this.initButtons():this.$form.find(".editable-buttons").remove(),this.showLoading(),this.isSaving=!1,this.$div.triggerHandler("rendering"),this.initInput(),this.$form.find("div.editable-input").append(this.input.$tpl),this.$div.append(this.$form),a.when(this.input.render()).then(a.proxy(function(){var t;this.options.showbuttons||this.input.autosubmit(),this.$form.find(".editable-cancel").click(a.proxy(this.cancel,this)),this.input.error?(this.error(this.input.error),this.$form.find(".editable-submit").attr("disabled",!0),this.input.$input.attr("disabled",!0),this.$form.submit(function(t){t.preventDefault()})):(this.error(!1),this.input.$input.removeAttr("disabled"),this.$form.find(".editable-submit").removeAttr("disabled"),t=null==this.value||""===this.value?this.options.defaultValue:this.value,this.input.value2input(t),this.$form.submit(a.proxy(this.submit,this))),this.$div.triggerHandler("rendered"),this.showForm(),this.input.postrender&&this.input.postrender()},this))},cancel:function(){this.$div.triggerHandler("cancel")},showLoading:function(){var t,e;this.$form?(t=this.$form.outerWidth(),e=this.$form.outerHeight(),t&&this.$loading.width(t),e&&this.$loading.height(e),this.$form.hide()):(t=this.$loading.parent().width())&&this.$loading.width(t),this.$loading.show()},showForm:function(t){this.$loading.hide(),this.$form.show(),!1!==t&&this.input.activate(),this.$div.triggerHandler("show")},error:function(t){var e=this.$form.find(".control-group"),i=this.$form.find(".editable-error-block");if(!1===t)e.removeClass(a.fn.editableform.errorGroupClass),i.removeClass(a.fn.editableform.errorBlockClass).empty().hide();else{if(t){for(var s=(""+t).split("\n"),n=0;n<s.length;n++)s[n]=a("<div>").text(s[n]).html();t=s.join("<br>")}e.addClass(a.fn.editableform.errorGroupClass),i.addClass(a.fn.editableform.errorBlockClass).html(t).show()}},submit:function(t){t.stopPropagation(),t.preventDefault();var i,s=this.input.input2value(),t=this.validate(s);if("object"===a.type(t)&&void 0!==t.newValue){if(s=t.newValue,this.input.value2input(s),"string"==typeof t.msg)return this.error(t.msg),void this.showForm()}else if(t)return this.error(t),void this.showForm();this.options.savenochange||this.input.value2str(s)!=this.input.value2str(this.value)?(i=this.input.value2submit(s),this.isSaving=!0,a.when(this.save(i)).done(a.proxy(function(t){this.isSaving=!1;var e="function"==typeof this.options.success?this.options.success.call(this.options.scope,t,s):null;!1===e?(this.error(!1),this.showForm(!1)):"string"==typeof e?(this.error(e),this.showForm()):(e&&"object"==typeof e&&e.hasOwnProperty("newValue")&&(s=e.newValue),this.error(!1),this.value=s,this.$div.triggerHandler("save",{newValue:s,submitValue:i,response:t}))},this)).fail(a.proxy(function(t){this.isSaving=!1,t="function"==typeof this.options.error?this.options.error.call(this.options.scope,t,s):"string"==typeof t?t:t.responseText||t.statusText||"Unknown error!",this.error(t),this.showForm()},this))):this.$div.triggerHandler("nochange")},save:function(t){this.options.pk=a.fn.editableutils.tryParseJson(this.options.pk,!0);var e="function"==typeof this.options.pk?this.options.pk.call(this.options.scope):this.options.pk;if(!!("function"==typeof this.options.url||this.options.url&&("always"===this.options.send||"auto"===this.options.send&&null!=e)))return this.showLoading(),t={name:this.options.name||"",value:t,pk:e},"function"==typeof this.options.params?t=this.options.params.call(this.options.scope,t):(this.options.params=a.fn.editableutils.tryParseJson(this.options.params,!0),a.extend(t,this.options.params)),"function"==typeof this.options.url?this.options.url.call(this.options.scope,t):a.ajax(a.extend({url:this.options.url,data:t,type:"POST"},this.options.ajaxOptions))},validate:function(t){if(void 0===t&&(t=this.value),"function"==typeof this.options.validate)return this.options.validate.call(this.options.scope,t)},option:function(t,e){t in this.options&&(this.options[t]=e),"value"===t&&this.setValue(e)},setValue:function(t,e){this.value=e?this.input.str2value(t):t,this.$form&&this.$form.is(":visible")&&this.input.value2input(this.value)}},a.fn.editableform=function(i){var s=arguments;return this.each(function(){var t=a(this),e=t.data("editableform");e||t.data("editableform",e=new n(this,"object"==typeof i&&i)),"string"==typeof i&&e[i].apply(e,Array.prototype.slice.call(s,1))})},a.fn.editableform.Constructor=n,a.fn.editableform.defaults={type:"text",url:null,params:null,name:null,pk:null,value:null,defaultValue:null,send:"auto",validate:null,success:null,error:null,ajaxOptions:null,showbuttons:!0,scope:null,savenochange:!1},a.fn.editableform.template='<form class="form-inline editableform"><div class="control-group"><div><div class="editable-input"></div><div class="editable-buttons"></div></div><div class="editable-error-block"></div></div></form>',a.fn.editableform.loading='<div class="editableform-loading"></div>',a.fn.editableform.buttons='<button type="submit" class="editable-submit">ok</button><button type="button" class="editable-cancel">cancel</button>',a.fn.editableform.errorGroupClass=null,a.fn.editableform.errorBlockClass="editable-error",a.fn.editableform.engine="jquery"})(window.jQuery),(l=>{l.fn.editableutils={inherit:function(t,e){function i(){}i.prototype=e.prototype,t.prototype=new i,(t.prototype.constructor=t).superclass=e.prototype},setCursorPosition:function(t,e){t.setSelectionRange?t.setSelectionRange(e,e):t.createTextRange&&((t=t.createTextRange()).collapse(!0),t.moveEnd("character",e),t.moveStart("character",e),t.select())},tryParseJson:function(t,e){if("string"==typeof t&&t.length&&t.match(/^[\{\[].*[\}\]]$/))if(e)try{t=new Function("return "+t)()}catch(t){}finally{return t}else t=new Function("return "+t)();return t},sliceObj:function(t,e,i){var s,n,a={};if(Array.isArray(e)&&e.length)for(var o=0;o<e.length;o++)t.hasOwnProperty(s=e[o])&&(a[s]=t[s]),!0!==i&&(n=s.toLowerCase(),t.hasOwnProperty(n))&&(a[s]=t[n]);return a},getConfigData:function(t){var i={};return l.each(t.data(),function(t,e){"object"==typeof e&&(!e||"object"!=typeof e||e.constructor!==Object&&e.constructor!==Array)||(i[t]=e)}),i},objectKeys:function(t){if(Object.keys)return Object.keys(t);if(t!==Object(t))throw new TypeError("Object.keys called on a non-object");var e,i=[];for(e in t)Object.prototype.hasOwnProperty.call(t,e)&&i.push(e);return i},escape:function(t){return l("<div>").text(t).html()},itemsByValue:function(s,t,n){var e,a,o,r;return t&&null!==s?("function"!=typeof n&&(e=n||"value",n=function(t){return t[e]}),a=Array.isArray(s),o=[],r=this,l.each(t,function(t,e){var i;e.children?o=o.concat(r.itemsByValue(s,e.children,n)):a?l.grep(s,function(t){return t==(e&&"object"==typeof e?n(e):e)}).length&&o.push(e):(i=e&&"object"==typeof e?n(e):e,s==i&&o.push(e))}),o):[]},createInput:function(t){var e,i=t.type;return"date"===i&&("inline"===t.mode?l.fn.editabletypes.datefield?i="datefield":l.fn.editabletypes.dateuifield&&(i="dateuifield"):l.fn.editabletypes.date?i="date":l.fn.editabletypes.dateui&&(i="dateui"),"date"!==i||l.fn.editabletypes.date||(i="combodate")),"wysihtml5"!==(i="datetime"===i&&"inline"===t.mode?"datetimefield":i)||l.fn.editabletypes[i]||(i="textarea"),"function"==typeof l.fn.editabletypes[i]?new(e=l.fn.editabletypes[i])(this.sliceObj(t,this.objectKeys(e.defaults))):(l.error("Unknown type: "+i),!1)},supportsTransitions:function(){var t=(document.body||document.documentElement).style,e=["Moz","Webkit","Khtml","O","ms"];if("string"==typeof t[i="transition"])return!0;for(var i=i.charAt(0).toUpperCase()+i.substr(1),s=0;s<e.length;s++)if("string"==typeof t[e[s]+i])return!0;return!1}}})(window.jQuery),(r=>{function l(t,e){this.init(t,e)}function h(t,e){this.init(t,e)}l.prototype={containerName:null,containerDataName:null,innerCss:null,containerClass:"editable-container editable-popup",defaults:{},init:function(t,e){this.$element=r(t),this.options=r.extend({},r.fn.editableContainer.defaults,e),this.splitOptions(),this.formOptions.scope=this.$element[0],this.initContainer(),this.delayedHide=!1,this.$element.on("destroyed",r.proxy(function(){this.destroy()},this)),r(document).data("editable-handlers-attached")||(r(document).on("keyup.editable",function(t){27===t.which&&r(".editable-open").editableContainer("hide")}),r(document).on("click.editable",function(t){var e,i=r(t.target),s=[".editable-container",".ui-datepicker-header",".datepicker",".modal-backdrop",".bootstrap-wysihtml5-insert-image-modal",".bootstrap-wysihtml5-insert-link-modal"];if(r.contains(document.documentElement,t.target)&&!i.is(document)){for(e=0;e<s.length;e++)if(i.is(s[e])||i.parents(s[e]).length)return;l.prototype.closeOthers(t.target)}}),r(document).data("editable-handlers-attached",!0))},splitOptions:function(){if(this.containerOptions={},this.formOptions={},!r.fn[this.containerName])throw new Error(this.containerName+" not found. Have you included corresponding js file?");for(var t in this.options)t in this.defaults?this.containerOptions[t]=this.options[t]:this.formOptions[t]=this.options[t]},tip:function(){return this.container()?this.container().$tip:null},container:function(){var t;return t=this.containerDataName&&(t=this.$element.data(this.containerDataName))?t:this.$element.data(this.containerName)},call:function(){this.$element[this.containerName].apply(this.$element,arguments)},initContainer:function(){this.call(this.containerOptions)},renderForm:function(){this.$form.editableform(this.formOptions).on({save:r.proxy(this.save,this),nochange:r.proxy(function(){this.hide("nochange")},this),cancel:r.proxy(function(){this.hide("cancel")},this),show:r.proxy(function(){this.delayedHide?(this.hide(this.delayedHide.reason),this.delayedHide=!1):this.setPosition()},this),rendering:r.proxy(this.setPosition,this),resize:r.proxy(this.setPosition,this),rendered:r.proxy(function(){this.$element.triggerHandler("shown",r(this.options.scope).data("editable"))},this)}).editableform("render")},show:function(t){this.$element.addClass("editable-open"),!1!==t&&this.closeOthers(this.$element[0]),this.innerShow(),this.tip().addClass(this.containerClass),this.$form,this.$form=r("<div>"),(this.tip().is(this.innerCss)?this.tip():this.tip().find(this.innerCss)).append(this.$form),this.renderForm()},hide:function(t){this.tip()&&this.tip().is(":visible")&&this.$element.hasClass("editable-open")&&(this.$form.data("editableform").isSaving?this.delayedHide={reason:t}:(this.delayedHide=!1,this.$element.removeClass("editable-open"),this.innerHide(),this.$element.triggerHandler("hidden",t||"manual")))},innerShow:function(){},innerHide:function(){},toggle:function(t){this.container()&&this.tip()&&this.tip().is(":visible")?this.hide():this.show(t)},setPosition:function(){},save:function(t,e){this.$element.triggerHandler("save",e),this.hide("save")},option:function(t,e){this.options[t]=e,t in this.containerOptions?(this.containerOptions[t]=e,this.setContainerOption(t,e)):(this.formOptions[t]=e,this.$form&&this.$form.editableform("option",t,e))},setContainerOption:function(t,e){this.call("option",t,e)},destroy:function(){this.hide(),this.innerDestroy(),this.$element.off("destroyed"),this.$element.removeData("editableContainer")},innerDestroy:function(){},closeOthers:function(s){r(".editable-open").each(function(t,e){var i;e===s||r(e).find(s).length||(i=(e=r(e)).data("editableContainer"))&&("cancel"===i.options.onblur?e.data("editableContainer").hide("onblur"):"submit"===i.options.onblur&&e.data("editableContainer").tip().find("form").submit())})},activate:function(){this.tip&&this.tip().is(":visible")&&this.$form&&this.$form.data("editableform").input.activate()}},r.fn.editableContainer=function(a){var o=arguments;return this.each(function(){var t=r(this),e="editableContainer",i=t.data(e),s="object"==typeof a&&a,n="inline"===s.mode?h:l;i||t.data(e,i=new n(this,s)),"string"==typeof a&&i[a].apply(i,Array.prototype.slice.call(o,1))})},r.fn.editableContainer.Popup=l,r.fn.editableContainer.Inline=h,r.fn.editableContainer.defaults={value:null,placement:"top",autohide:!0,onblur:"cancel",anim:!1,mode:"popup"},jQuery.event.special.destroyed={remove:function(t){t.handler&&t.handler()}}})(window.jQuery),(t=>{t.extend(t.fn.editableContainer.Inline.prototype,t.fn.editableContainer.Popup.prototype,{containerName:"editableform",innerCss:".editable-inline",containerClass:"editable-container editable-inline",initContainer:function(){this.$tip=t("<span></span>"),this.options.anim||(this.options.anim=0)},splitOptions:function(){this.containerOptions={},this.formOptions=this.options},tip:function(){return this.$tip},innerShow:function(){this.$element.hide(),this.tip().insertAfter(this.$element).show()},innerHide:function(){this.$tip.hide(this.options.anim,t.proxy(function(){this.$element.show(),this.innerDestroy()},this))},innerDestroy:function(){this.tip()&&this.tip().empty().remove()}})})(window.jQuery),(p=>{function u(t,e){this.$element=p(t),this.options=p.extend({},p.fn.editable.defaults,e,p.fn.editableutils.getConfigData(this.$element)),this.options.selector?this.initLive():this.init(),this.options.highlight&&!p.fn.editableutils.supportsTransitions()&&(this.options.highlight=!1)}u.prototype={constructor:u,init:function(){var t,e=!1;if(this.options.name=this.options.name||this.$element.attr("id"),this.options.scope=this.$element[0],this.input=p.fn.editableutils.createInput(this.options),this.input){switch(null==this.options.value?(this.value=this.input.html2value(p.trim(this.$element.html())),e=!0):(this.options.value=p.fn.editableutils.tryParseJson(this.options.value,!0),"string"==typeof this.options.value?this.value=this.input.str2value(this.options.value):this.value=this.options.value),this.$element.addClass("editable"),"textarea"===this.input.type&&this.$element.addClass("editable-pre-wrapped"),"manual"!==this.options.toggle?(this.$element.addClass("editable-click"),this.$element.on(this.options.toggle+".editable",p.proxy(function(t){this.options.disabled||t.preventDefault(),"mouseenter"===this.options.toggle?this.show():(t="click"!==this.options.toggle,this.toggle(t))},this))):this.$element.attr("tabindex",-1),"function"==typeof this.options.display&&(this.options.autotext="always"),this.options.autotext){case"always":t=!0;break;case"auto":t=!p.trim(this.$element.text()).length&&null!=this.value&&!e;break;default:t=!1}p.when(!t||this.render()).then(p.proxy(function(){this.options.disabled?this.disable():this.enable(),this.$element.triggerHandler("init",this)},this))}},initLive:function(){var t=this.options.selector;this.options.selector=!1,this.options.autotext="never",this.$element.on(this.options.toggle+".editable",t,p.proxy(function(t){var e=p(t.target);e.data("editable")||(e.hasClass(this.options.emptyclass)&&e.empty(),e.editable(this.options).trigger(t))},this))},render:function(t){if(!1!==this.options.display)return this.input.value2htmlFinal?this.input.value2html(this.value,this.$element[0],this.options.display,t):"function"==typeof this.options.display?this.options.display.call(this.$element[0],this.value,t):this.input.value2html(this.value,this.$element[0])},enable:function(){this.options.disabled=!1,this.$element.removeClass("editable-disabled"),this.handleEmpty(this.isEmpty),"manual"!==this.options.toggle&&"-1"===this.$element.attr("tabindex")&&this.$element.removeAttr("tabindex")},disable:function(){this.options.disabled=!0,this.hide(),this.$element.addClass("editable-disabled"),this.handleEmpty(this.isEmpty),this.$element.attr("tabindex",-1)},toggleDisabled:function(){this.options.disabled?this.enable():this.disable()},option:function(t,e){if(t&&"object"==typeof t)p.each(t,p.proxy(function(t,e){this.option(p.trim(t),e)},this));else{if(this.options[t]=e,"disabled"===t)return e?this.disable():this.enable();"value"===t&&this.setValue(e),this.container&&this.container.option(t,e),this.input.option&&this.input.option(t,e)}},handleEmpty:function(t){!1!==this.options.display&&(void 0!==t?this.isEmpty=t:"function"==typeof this.input.isEmpty?this.isEmpty=this.input.isEmpty(this.$element):this.isEmpty=""===p.trim(this.$element.html()),this.options.disabled?this.isEmpty&&(this.$element.empty(),this.options.emptyclass)&&this.$element.removeClass(this.options.emptyclass):this.isEmpty?(this.$element.html(this.options.emptytext),this.options.emptyclass&&this.$element.addClass(this.options.emptyclass)):this.options.emptyclass&&this.$element.removeClass(this.options.emptyclass))},show:function(t){if(!this.options.disabled){if(this.container){if(this.container.tip().is(":visible"))return}else{var e=p.extend({},this.options,{value:this.value,input:this.input});this.$element.editableContainer(e),this.$element.on("save.internal",p.proxy(this.save,this)),this.container=this.$element.data("editableContainer")}this.container.show(t)}},hide:function(){this.container&&this.container.hide()},toggle:function(t){this.container&&this.container.tip().is(":visible")?this.hide():this.show(t)},save:function(t,e){var i,s;this.options.unsavedclass&&("function"==typeof this.options.url||!1===this.options.display||void 0!==e.response||this.options.savenochange&&this.input.value2str(this.value)!==this.input.value2str(e.newValue)?this.$element.removeClass(this.options.unsavedclass):this.$element.addClass(this.options.unsavedclass)),this.options.highlight&&(i=this.$element,s=i.css("background-color"),i.css("background-color",this.options.highlight),setTimeout(function(){"transparent"===s&&(s=""),i.css("background-color",s),i.addClass("editable-bg-transition"),setTimeout(function(){i.removeClass("editable-bg-transition")},1700)},10)),this.setValue(e.newValue,!1,e.response)},validate:function(){if("function"==typeof this.options.validate)return this.options.validate.call(this,this.value)},setValue:function(t,e,i){this.value=e?this.input.str2value(t):t,this.container&&this.container.option("value",this.value),p.when(this.render(i)).then(p.proxy(function(){this.handleEmpty()},this))},activate:function(){this.container&&this.container.activate()},destroy:function(){this.disable(),this.container&&this.container.destroy(),this.input.destroy(),"manual"!==this.options.toggle&&(this.$element.removeClass("editable-click"),this.$element.off(this.options.toggle+".editable")),this.$element.off("save.internal"),this.$element.removeClass("editable editable-open editable-disabled"),this.$element.removeData("editable")}},p.fn.editable=function(s){var i={},n=arguments,a="editable";switch(s){case"validate":return this.each(function(){var t,e=p(this).data(a);e&&(t=e.validate())&&(i[e.options.name]=t)}),i;case"getValue":return 2===arguments.length&&!0===arguments[1]?i=this.eq(0).data(a).value:this.each(function(){var t=p(this).data(a);t&&null!=t.value&&(i[t.options.name]=t.input.value2submit(t.value))}),i;case"submit":var t,e,o,r=arguments[1]||{},l=this,h=this.editable("validate");return p.isEmptyObject(h)?(o={},1===l.length?(e={name:(t=l.data("editable")).options.name||"",value:t.input.value2submit(t.value),pk:"function"==typeof t.options.pk?t.options.pk.call(t.options.scope):t.options.pk},"function"==typeof t.options.params?e=t.options.params.call(t.options.scope,e):(t.options.params=p.fn.editableutils.tryParseJson(t.options.params,!0),p.extend(e,t.options.params)),o={url:t.options.url,data:e,type:"POST"},r.success=r.success||t.options.success,r.error=r.error||t.options.error):(e=this.editable("getValue"),o={url:r.url,data:e,type:"POST"}),o.success="function"==typeof r.success?function(t){r.success.call(l,t,r)}:p.noop,o.error="function"==typeof r.error?function(){r.error.apply(l,arguments)}:p.noop,r.ajaxOptions&&p.extend(o,r.ajaxOptions),r.data&&p.extend(o.data,r.data),p.ajax(o)):"function"==typeof r.error&&r.error.call(l,h),this}return this.each(function(){var t=p(this),e=t.data(a),i="object"==typeof s&&s;i&&i.selector?e=new u(this,i):(e||t.data(a,e=new u(this,i)),"string"==typeof s&&e[s].apply(e,Array.prototype.slice.call(n,1)))})},p.fn.editable.defaults={type:"text",disabled:!1,toggle:"click",emptytext:"Empty",autotext:"auto",value:null,display:null,emptyclass:"editable-empty",unsavedclass:"editable-unsaved",selector:null,highlight:"#FFFF80"}})(window.jQuery),(s=>{function t(){}s.fn.editabletypes={},t.prototype={init:function(t,e,i){this.type=t,this.options=s.extend({},i,e)},prerender:function(){this.$tpl=s(this.options.tpl),this.$input=this.$tpl,this.$clear=null,this.error=null},render:function(){},value2html:function(t,e){s(e)[this.options.escape?"text":"html"](s.trim(t))},html2value:function(t){return s("<div>").html(t).text()},value2str:function(t){return t},str2value:function(t){return t},value2submit:function(t){return t},value2input:function(t){this.$input.val(t)},input2value:function(){return this.$input.val()},activate:function(){this.$input.is(":visible")&&this.$input.focus()},clear:function(){this.$input.val(null)},escape:function(t){return s("<div>").text(t).html()},autosubmit:function(){},destroy:function(){},setClass:function(){this.options.inputclass&&this.$input.addClass(this.options.inputclass)},setAttr:function(t){null!=this.options[t]&&this.$input.attr(t,this.options[t])},option:function(t,e){this.options[t]=e}},t.defaults={tpl:"",inputclass:null,escape:!0,scope:null,showbuttons:!0},s.extend(s.fn.editabletypes,{abstractinput:t})})(window.jQuery),(r=>{function t(t){}r.fn.editableutils.inherit(t,r.fn.editabletypes.abstractinput),r.extend(t.prototype,{render:function(){var t=r.Deferred();return this.error=null,this.onSourceReady(function(){this.renderList(),t.resolve()},function(){this.error=this.options.sourceError,t.resolve()}),t.promise()},html2value:function(t){return null},value2html:function(t,e,i,s){function n(){"function"==typeof i?i.call(e,t,this.sourceData,s):this.value2htmlFinal(t,e),a.resolve()}var a=r.Deferred();return null===t?n.call(this):this.onSourceReady(n,function(){a.resolve()}),a.promise()},onSourceReady:function(e,i){var t;if(r.isFunction(this.options.source)?(t=this.options.source.call(this.options.scope),this.sourceData=null):t=this.options.source,this.options.sourceCache&&Array.isArray(this.sourceData))e.call(this);else{try{t=r.fn.editableutils.tryParseJson(t,!1)}catch(t){return void i.call(this)}if("string"==typeof t){if(this.options.sourceCache){var s,n=t;if(r(document).data(n)||r(document).data(n,{}),!1===(s=r(document).data(n)).loading&&s.sourceData)return this.sourceData=s.sourceData,this.doPrepend(),void e.call(this);if(!0===s.loading)return s.callbacks.push(r.proxy(function(){this.sourceData=s.sourceData,this.doPrepend(),e.call(this)},this)),void s.err_callbacks.push(r.proxy(i,this));s.loading=!0,s.callbacks=[],s.err_callbacks=[]}n=r.extend({url:t,type:"get",cache:!1,dataType:"json",success:r.proxy(function(t){s&&(s.loading=!1),this.sourceData=this.makeArray(t),Array.isArray(this.sourceData)?(s&&(s.sourceData=this.sourceData,r.each(s.callbacks,function(){this.call()})),this.doPrepend(),e.call(this)):(i.call(this),s&&r.each(s.err_callbacks,function(){this.call()}))},this),error:r.proxy(function(){i.call(this),s&&(s.loading=!1,r.each(s.err_callbacks,function(){this.call()}))},this)},this.options.sourceOptions);r.ajax(n)}else this.sourceData=this.makeArray(t),(Array.isArray(this.sourceData)?(this.doPrepend(),e):i).call(this)}},doPrepend:function(){null!=this.options.prepend&&(Array.isArray(this.prependData)||(r.isFunction(this.options.prepend)&&(this.options.prepend=this.options.prepend.call(this.options.scope)),this.options.prepend=r.fn.editableutils.tryParseJson(this.options.prepend,!0),"string"==typeof this.options.prepend&&(this.options.prepend={"":this.options.prepend}),this.prependData=this.makeArray(this.options.prepend)),Array.isArray(this.prependData))&&Array.isArray(this.sourceData)&&(this.sourceData=this.prependData.concat(this.sourceData))},renderList:function(){},value2htmlFinal:function(t,e){},makeArray:function(t){var i,s,e,n=[];if(!t||"string"==typeof t)return null;if(Array.isArray(t))for(var a=function(t,e){if(s={value:t,text:e},2<=i++)return!1},o=0;o<t.length;o++)"object"==typeof(e=t[o])?(i=0,r.each(e,a),1===i?n.push(s):1<i&&(e.children&&(e.children=this.makeArray(e.children)),n.push(e))):n.push({value:e,text:e});else r.each(t,function(t,e){n.push({value:t,text:e})});return n},option:function(t,e){this.options[t]=e,"source"===t&&(this.sourceData=null),"prepend"===t&&(this.prependData=null)}}),t.defaults=r.extend({},r.fn.editabletypes.abstractinput.defaults,{source:null,prepend:!1,sourceError:"Error when loading list",sourceCache:!0,sourceOptions:null}),r.fn.editabletypes.list=t})(window.jQuery),(i=>{function e(t){this.init("text",t,e.defaults)}i.fn.editableutils.inherit(e,i.fn.editabletypes.abstractinput),i.extend(e.prototype,{render:function(){this.renderClear(),this.setClass(),this.setAttr("placeholder")},activate:function(){this.$input.is(":visible")&&(this.$input.focus(),i.fn.editableutils.setCursorPosition(this.$input.get(0),this.$input.val().length),this.toggleClear)&&this.toggleClear()},renderClear:function(){this.options.clear&&(this.$clear=i('<span class="editable-clear-x"></span>'),this.$input.after(this.$clear).css("padding-right",24).keyup(i.proxy(function(t){var e;~i.inArray(t.keyCode,[40,38,9,13,27])||(clearTimeout(this.t),(e=this).t=setTimeout(function(){e.toggleClear(t)},100))},this)).parent().css("position","relative"),this.$clear.click(i.proxy(this.clear,this)))},postrender:function(){},toggleClear:function(t){var e,i;this.$clear&&(e=this.$input.val().length,i=this.$clear.is(":visible"),e&&!i&&this.$clear.show(),!e)&&i&&this.$clear.hide()},clear:function(){this.$clear.hide(),this.$input.val("").focus()}}),e.defaults=i.extend({},i.fn.editabletypes.abstractinput.defaults,{tpl:'<input type="text">',placeholder:null,clear:!0}),i.fn.editabletypes.text=e})(window.jQuery),(e=>{function i(t){this.init("textarea",t,i.defaults)}e.fn.editableutils.inherit(i,e.fn.editabletypes.abstractinput),e.extend(i.prototype,{render:function(){this.setClass(),this.setAttr("placeholder"),this.setAttr("rows"),this.$input.keydown(function(t){t.ctrlKey&&13===t.which&&e(this).closest("form").submit()})},activate:function(){e.fn.editabletypes.text.prototype.activate.call(this)}}),i.defaults=e.extend({},e.fn.editabletypes.abstractinput.defaults,{tpl:"<textarea></textarea>",inputclass:"input-large",placeholder:null,rows:7}),e.fn.editabletypes.textarea=i})(window.jQuery),(a=>{function e(t){this.init("select",t,e.defaults)}a.fn.editableutils.inherit(e,a.fn.editabletypes.list),a.extend(e.prototype,{renderList:function(){this.$input.empty();var n=function(t,e){var i;if(Array.isArray(e))for(var s=0;s<e.length;s++)i={},e[s].children?(i.label=e[s].text,t.append(n(a("<optgroup>",i),e[s].children))):(i.value=e[s].value,e[s].disabled&&(i.disabled=!0),t.append(a("<option>",i).text(e[s].text)));return t};n(this.$input,this.sourceData),this.setClass(),this.$input.on("keydown.editable",function(t){13===t.which&&a(this).closest("form").submit()})},value2htmlFinal:function(t,e){var i="",t=a.fn.editableutils.itemsByValue(t,this.sourceData);t.length&&(i=t[0].text),a.fn.editabletypes.abstractinput.prototype.value2html.call(this,i,e)},autosubmit:function(){this.$input.off("keydown.editable").on("change.editable",function(){a(this).closest("form").submit()})}}),e.defaults=a.extend({},a.fn.editabletypes.list.defaults,{tpl:"<select></select>"}),a.fn.editabletypes.select=e})(window.jQuery),(n=>{function e(t){this.init("checklist",t,e.defaults)}n.fn.editableutils.inherit(e,n.fn.editabletypes.list),n.extend(e.prototype,{renderList:function(){var t;if(this.$tpl.empty(),Array.isArray(this.sourceData)){for(var e=0;e<this.sourceData.length;e++)t=n("<label>").append(n("<input>",{type:"checkbox",value:this.sourceData[e].value})).append(n("<span>").text(" "+this.sourceData[e].text)),n("<div>").append(t).appendTo(this.$tpl);this.$input=this.$tpl.find('input[type="checkbox"]'),this.setClass()}},value2str:function(t){return Array.isArray(t)?t.sort().join(this.options.separator.trim()):""},str2value:function(t){var e;return"string"==typeof t&&t.length?(e=new RegExp("\\s*"+n.trim(this.options.separator)+"\\s*"),t.split(e)):Array.isArray(t)?t:[t]},value2input:function(s){this.$input.prop("checked",!1),Array.isArray(s)&&s.length&&this.$input.each(function(t,e){var i=n(e);n.each(s,function(t,e){i.val()==e&&i.prop("checked",!0)})})},input2value:function(){var i=[];return this.$input.filter(":checked").each(function(t,e){i.push(n(e).val())}),i},value2htmlFinal:function(t,e){var i=[],t=n.fn.editableutils.itemsByValue(t,this.sourceData),s=this.options.escape;t.length?(n.each(t,function(t,e){e=s?n.fn.editableutils.escape(e.text):e.text;i.push(e)}),n(e).html(i.join("<br>"))):n(e).empty()},activate:function(){this.$input.first().focus()},autosubmit:function(){this.$input.on("keydown",function(t){13===t.which&&n(this).closest("form").submit()})}}),e.defaults=n.extend({},n.fn.editabletypes.list.defaults,{tpl:'<div class="editable-checklist"></div>',inputclass:null,separator:","}),n.fn.editabletypes.checklist=e})(window.jQuery),(i=>{function e(t){this.init("password",t,e.defaults)}i.fn.editableutils.inherit(e,i.fn.editabletypes.text),i.extend(e.prototype,{value2html:function(t,e){t?i(e).text("[hidden]"):i(e).empty()},html2value:function(t){return null}}),e.defaults=i.extend({},i.fn.editabletypes.text.defaults,{tpl:'<input type="password">'}),i.fn.editabletypes.password=e})(window.jQuery),(t=>{function e(t){this.init("email",t,e.defaults)}t.fn.editableutils.inherit(e,t.fn.editabletypes.text),e.defaults=t.extend({},t.fn.editabletypes.text.defaults,{tpl:'<input type="email">'}),t.fn.editabletypes.email=e})(window.jQuery),(t=>{function e(t){this.init("url",t,e.defaults)}t.fn.editableutils.inherit(e,t.fn.editabletypes.text),e.defaults=t.extend({},t.fn.editabletypes.text.defaults,{tpl:'<input type="url">'}),t.fn.editabletypes.url=e})(window.jQuery),(t=>{function e(t){this.init("tel",t,e.defaults)}t.fn.editableutils.inherit(e,t.fn.editabletypes.text),e.defaults=t.extend({},t.fn.editabletypes.text.defaults,{tpl:'<input type="tel">'}),t.fn.editabletypes.tel=e})(window.jQuery),(t=>{function e(t){this.init("number",t,e.defaults)}t.fn.editableutils.inherit(e,t.fn.editabletypes.text),t.extend(e.prototype,{render:function(){e.superclass.render.call(this),this.setAttr("min"),this.setAttr("max"),this.setAttr("step")},postrender:function(){this.$clear&&this.$clear.css({right:24})}}),e.defaults=t.extend({},t.fn.editabletypes.text.defaults,{tpl:'<input type="number">',inputclass:"input-mini",min:null,max:null,step:null}),t.fn.editabletypes.number=e})(window.jQuery),(t=>{function e(t){this.init("range",t,e.defaults)}t.fn.editableutils.inherit(e,t.fn.editabletypes.number),t.extend(e.prototype,{render:function(){this.$input=this.$tpl.filter("input"),this.setClass(),this.setAttr("min"),this.setAttr("max"),this.setAttr("step"),this.$input.on("input",function(){t(this).siblings("output").text(t(this).val())})},activate:function(){this.$input.focus()}}),e.defaults=t.extend({},t.fn.editabletypes.number.defaults,{tpl:'<input type="range"><output style="width: 30px; display: inline-block"></output>',inputclass:"input-medium"}),t.fn.editabletypes.range=e})(window.jQuery),(t=>{function e(t){this.init("time",t,e.defaults)}t.fn.editableutils.inherit(e,t.fn.editabletypes.abstractinput),t.extend(e.prototype,{render:function(){this.setClass()}}),e.defaults=t.extend({},t.fn.editabletypes.abstractinput.defaults,{tpl:'<input type="time">'}),t.fn.editabletypes.time=e})(window.jQuery),(a=>{function o(t){var e,i;this.init("select2",t,o.defaults),t.select2=t.select2||{},this.sourceData=null,t.placeholder&&(t.select2.placeholder=t.placeholder),!t.select2.tags&&t.source&&(e=t.source,"string"==typeof(e=a.isFunction(t.source)?t.source.call(t.scope):e)?(t.select2.ajax=t.select2.ajax||{},t.select2.ajax.data||(t.select2.ajax.data=function(t){return{query:t}}),t.select2.ajax.results||(t.select2.ajax.results=function(t){return{results:t}}),t.select2.ajax.url=e):(this.sourceData=this.convertSource(e),t.select2.data=this.sourceData)),this.options.select2=a.extend({},o.defaults.select2,t.select2),this.isMultiple=this.options.select2.tags||this.options.select2.multiple,this.isRemote="ajax"in this.options.select2,this.idFunc=this.options.select2.id,"function"!=typeof this.idFunc&&(i=this.idFunc||"id",this.idFunc=function(t){return t[i]}),this.formatSelection=this.options.select2.formatSelection,"function"!=typeof this.formatSelection&&(this.formatSelection=function(t){return t.text})}a.fn.editableutils.inherit(o,a.fn.editabletypes.abstractinput),a.extend(o.prototype,{render:function(){this.setClass(),this.isRemote&&this.$input.on("select2-loaded",a.proxy(function(t){this.sourceData=t.items.results},this)),this.isMultiple&&this.$input.on("change",function(){a(this).closest("form").parent().triggerHandler("resize")})},value2html:function(t,e){var i,s="",n=this;this.options.select2.tags?i=t:this.sourceData&&(i=a.fn.editableutils.itemsByValue(t,this.sourceData,this.idFunc)),Array.isArray(i)?(s=[],a.each(i,function(t,e){s.push(e&&"object"==typeof e?n.formatSelection(e):e)})):i&&(s=n.formatSelection(i)),s=Array.isArray(s)?s.join(this.options.viewseparator):s,o.superclass.value2html.call(this,s,e)},html2value:function(t){return this.options.select2.tags?this.str2value(t,this.options.viewseparator):null},value2input:function(t){var e,i;Array.isArray(t)&&(t=t.join(this.getSeparator())),this.$input.data("select2")?this.$input.val(t).trigger("change",!0):(this.$input.val(t),this.$input.select2(this.options.select2)),!this.isRemote||this.isMultiple||this.options.select2.initSelection||(e=this.options.select2.id,i=this.options.select2.formatSelection,e)||i||(e=a(this.options.scope)).data("editable").isEmpty||(i={id:t,text:e.text()},this.$input.select2("data",i))},input2value:function(){return this.$input.select2("val")},str2value:function(t,e){if("string"!=typeof t||!this.isMultiple)return t;var i,s,n;if(e=e||this.getSeparator(),null===t||t.length<1)return null;for(s=0,n=(i=t.split(e)).length;s<n;s+=1)i[s]=a.trim(i[s]);return i},autosubmit:function(){this.$input.on("change",function(t,e){e||a(this).closest("form").submit()})},getSeparator:function(){return this.options.select2.separator||a.fn.select2.defaults.separator},convertSource:function(t){if(Array.isArray(t)&&t.length&&void 0!==t[0].value)for(var e=0;e<t.length;e++)void 0!==t[e].value&&(t[e].id=t[e].value,delete t[e].value);return t},destroy:function(){this.$input&&this.$input.data("select2")&&this.$input.select2("destroy")}}),o.defaults=a.extend({},a.fn.editabletypes.abstractinput.defaults,{tpl:'<input type="hidden">',select2:null,placeholder:null,source:null,viewseparator:", "}),a.fn.editabletypes.select2=o})(window.jQuery),(o=>{function n(t,e){this.$element=o(t),this.$element.is("input")?(this.options=o.extend({},o.fn.combodate.defaults,e,this.$element.data()),this.init()):o.error("Combodate should be applied to INPUT element")}n.prototype={constructor:n,init:function(){this.map={day:["D","date"],month:["M","month"],year:["Y","year"],hour:["[Hh]","hours"],minute:["m","minutes"],second:["s","seconds"],ampm:["[Aa]",""]},this.$widget=o('<span class="combodate"></span>').html(this.getTemplate()),this.initCombos(),this.$widget.on("change","select",o.proxy(function(t){this.$element.val(this.getValue()).change(),this.options.smartDays&&(o(t.target).is(".month")||o(t.target).is(".year"))&&this.fillCombo("day")},this)),this.$widget.find("select").css("width","auto"),this.$element.hide().after(this.$widget),this.setValue(this.$element.val()||this.options.value)},getTemplate:function(){var s=this.options.template;return o.each(this.map,function(t,e){e=e[0];var i=new RegExp(e+"+"),e=1<e.length?e.substring(1,2):e;s=s.replace(i,"{"+e+"}")}),s=s.replace(/ /g,"&nbsp;"),o.each(this.map,function(t,e){e=1<(e=e[0]).length?e.substring(1,2):e;s=s.replace("{"+e+"}",'<select class="'+t+'"></select>')}),s},initCombos:function(){for(var t in this.map){var e=this.$widget.find("."+t);this["$"+t]=e.length?e:null,this.fillCombo(t)}},fillCombo:function(t){var e=this["$"+t];if(e){var i=this["fill"+t.charAt(0).toUpperCase()+t.slice(1)](),t=e.val();e.empty();for(var s=0;s<i.length;s++)e.append('<option value="'+i[s][0]+'">'+i[s][1]+"</option>");e.val(t)}},fillCommon:function(t){var e,i=[];return"name"===this.options.firstItem?(e=(e="function"==typeof(e=moment.relativeTime||moment.langData()._relativeTime)[t]?e[t](1,!0,t,!1):e[t]).split(" ").reverse()[0],i.push(["",e])):"empty"===this.options.firstItem&&i.push(["",""]),i},fillDay:function(){var t,e,i,s,n=this.fillCommon("d"),a=-1!==this.options.template.indexOf("DD"),o=31;for(this.options.smartDays&&this.$month&&this.$year&&(i=parseInt(this.$month.val(),10),s=parseInt(this.$year.val(),10),isNaN(i)||isNaN(s)||(o=moment([s,i]).daysInMonth())),e=1;e<=o;e++)t=a?this.leadZero(e):e,n.push([e,t]);return n},fillMonth:function(){for(var t,e=this.fillCommon("M"),i=-1!==this.options.template.indexOf("MMMM"),s=-1!==this.options.template.indexOf("MMM"),n=-1!==this.options.template.indexOf("MM"),a=0;a<=11;a++)t=i?moment().date(1).month(a).format("MMMM"):s?moment().date(1).month(a).format("MMM"):n?this.leadZero(a+1):a+1,e.push([a,t]);return e},fillYear:function(){for(var t,e=[],i=-1!==this.options.template.indexOf("YYYY"),s=this.options.maxYear;s>=this.options.minYear;s--)t=i?s:(s+"").substring(2),e[this.options.yearDescending?"push":"unshift"]([s,t]);return e=this.fillCommon("y").concat(e)},fillHour:function(){for(var t,e=this.fillCommon("h"),i=-1!==this.options.template.indexOf("h"),s=(this.options.template.indexOf("H"),-1!==this.options.template.toLowerCase().indexOf("hh")),n=i?12:23,a=i?1:0;a<=n;a++)t=s?this.leadZero(a):a,e.push([a,t]);return e},fillMinute:function(){for(var t,e=this.fillCommon("m"),i=-1!==this.options.template.indexOf("mm"),s=0;s<=59;s+=this.options.minuteStep)t=i?this.leadZero(s):s,e.push([s,t]);return e},fillSecond:function(){for(var t,e=this.fillCommon("s"),i=-1!==this.options.template.indexOf("ss"),s=0;s<=59;s+=this.options.secondStep)t=i?this.leadZero(s):s,e.push([s,t]);return e},fillAmpm:function(){var t=-1!==this.options.template.indexOf("a");this.options.template.indexOf("A");return[["am",t?"am":"AM"],["pm",t?"pm":"PM"]]},getValue:function(t){var e,s={},n=this,a=!1;return o.each(this.map,function(t,e){var i;if("ampm"!==t)return i="day"===t?1:0,s[t]=n["$"+t]?parseInt(n["$"+t].val(),10):i,isNaN(s[t])?!(a=!0):void 0}),a?"":(this.$ampm&&(s.hour=12===s.hour?"am"===this.$ampm.val()?0:12:"am"===this.$ampm.val()?s.hour:s.hour+12),e=moment([s.year,s.month,s.day,s.hour,s.minute,s.second]),this.highlight(e),null===(t=void 0===t?this.options.format:t)?e.isValid()?e:null:e.isValid()?e.format(t):"")},setValue:function(t){var i,s,n;function a(t,s){var n={};return t.children("option").each(function(t,e){var i,e=o(e).attr("value");""!==e&&(i=Math.abs(e-s),void 0===n.distance||i<n.distance)&&(n={value:e,distance:i})}),n.value}t&&(i="string"==typeof t?moment(t,this.options.format):moment(t),s=this,n={},i.isValid())&&(o.each(this.map,function(t,e){"ampm"!==t&&(n[t]=i[e[1]]())}),this.$ampm&&(12<=n.hour?(n.ampm="pm",12<n.hour&&(n.hour-=12)):(n.ampm="am",0===n.hour&&(n.hour=12))),o.each(n,function(t,e){s["$"+t]&&("minute"===t&&1<s.options.minuteStep&&s.options.roundTime&&(e=a(s["$"+t],e)),"second"===t&&1<s.options.secondStep&&s.options.roundTime&&(e=a(s["$"+t],e)),s["$"+t].val(e))}),this.options.smartDays&&this.fillCombo("day"),this.$element.val(i.format(this.options.format)).change())},highlight:function(t){t.isValid()?this.options.errorClass?this.$widget.removeClass(this.options.errorClass):this.$widget.find("select").css("border-color",this.borderColor):this.options.errorClass?this.$widget.addClass(this.options.errorClass):(this.borderColor||(this.borderColor=this.$widget.find("select").css("border-color")),this.$widget.find("select").css("border-color","red"))},leadZero:function(t){return t<=9?"0"+t:t},destroy:function(){this.$widget.remove(),this.$element.removeData("combodate").show()}},o.fn.combodate=function(i){var t,s=Array.apply(null,arguments);return s.shift(),"getValue"===i&&this.length&&(t=this.eq(0).data("combodate"))?t.getValue.apply(t,s):this.each(function(){var t=o(this),e=t.data("combodate");e||t.data("combodate",e=new n(this,"object"==typeof i&&i)),"string"==typeof i&&"function"==typeof e[i]&&e[i].apply(e,s)})},o.fn.combodate.defaults={format:"DD-MM-YYYY HH:mm",template:"D / MMM / YYYY   H : mm",value:null,minYear:1970,maxYear:(new Date).getFullYear(),yearDescending:!0,minuteStep:5,secondStep:1,firstItem:"empty",errorClass:null,roundTime:!0,smartDays:!1}})(window.jQuery),(e=>{function i(t){this.init("combodate",t,i.defaults),this.options.viewformat||(this.options.viewformat=this.options.format),t.combodate=e.fn.editableutils.tryParseJson(t.combodate,!0),this.options.combodate=e.extend({},i.defaults.combodate,t.combodate,{format:this.options.format,template:this.options.template})}e.fn.editableutils.inherit(i,e.fn.editabletypes.abstractinput),e.extend(i.prototype,{render:function(){this.$input.combodate(this.options.combodate),"bs3"===e.fn.editableform.engine&&this.$input.siblings().find("select").addClass("form-control"),this.options.inputclass&&this.$input.siblings().find("select").addClass(this.options.inputclass)},value2html:function(t,e){t=t?t.format(this.options.viewformat):"";i.superclass.value2html.call(this,t,e)},html2value:function(t){return t?moment(t,this.options.viewformat):null},value2str:function(t){return t?t.format(this.options.format):""},str2value:function(t){return t?moment(t,this.options.format):null},value2submit:function(t){return this.value2str(t)},value2input:function(t){this.$input.combodate("setValue",t)},input2value:function(){return this.$input.combodate("getValue",null)},activate:function(){this.$input.siblings(".combodate").find("select").eq(0).focus()},autosubmit:function(){}}),i.defaults=e.extend({},e.fn.editabletypes.abstractinput.defaults,{tpl:'<input type="text">',inputclass:null,format:"YYYY-MM-DD",viewformat:null,template:"D / MMM / YYYY",combodate:null}),e.fn.editabletypes.combodate=i})(window.jQuery),(o=>{var r=o.fn.editableform.Constructor.prototype.initInput;o.extend(o.fn.editableform.Constructor.prototype,{initTemplate:function(){this.$form=o(o.fn.editableform.template),this.$form.find(".control-group").addClass("form-group"),this.$form.find(".editable-error-block").addClass("help-block")},initInput:function(){r.apply(this);for(var t=null===this.input.options.inputclass||!1===this.input.options.inputclass,e="input-sm",i="text,select,textarea,password,email,url,tel,number,range,time,typeaheadjs".split(","),s=(~o.inArray(this.input.type,i)&&(this.input.$input.addClass("form-control"),t)&&(this.input.options.inputclass=e,this.input.$input.addClass(e)),this.$form.find(".editable-buttons")),n=t?[e]:this.input.options.inputclass.split(" "),a=0;a<n.length;a++)"input-lg"===n[a].toLowerCase()&&s.find("button").removeClass("btn-sm").addClass("btn-lg")}}),o.fn.editableform.buttons='<button type="submit" class="btn btn-primary btn-sm editable-submit"><i class="glyphicon glyphicon-ok"></i></button><button type="button" class="btn btn-default btn-sm editable-cancel"><i class="glyphicon glyphicon-remove"></i></button>',o.fn.editableform.errorGroupClass="has-error",o.fn.editableform.errorBlockClass=null,o.fn.editableform.engine="bs3"})(window.jQuery),(e=>{e.extend(e.fn.editableContainer.Popup.prototype,{containerName:"popover",containerDataName:"bs.popover",innerCss:".popover-content",defaults:e.fn.popover.Constructor.DEFAULTS,initContainer:function(){var t;e.extend(this.containerOptions,{trigger:"manual",selector:!1,content:" ",template:this.defaults.template}),this.$element.data("template")&&(t=this.$element.data("template"),this.$element.removeData("template")),this.call(this.containerOptions),t&&this.$element.data("template",t)},innerShow:function(){this.call("show")},innerHide:function(){this.call("hide")},innerDestroy:function(){this.call("destroy")},setContainerOption:function(t,e){this.container().options[t]=e},setPosition:function(){!function(){var t,e,i,s=this.tip(),n="function"==typeof this.options.placement?this.options.placement.call(this,s[0],this.$element[0]):this.options.placement,a=/\s?auto?\s?/i,o=a.test(n),a=(o&&(n=n.replace(a,"")||"top"),this.getPosition()),r=s[0].offsetWidth,l=s[0].offsetHeight,h=(o&&(o=this.$element.parent(),t=n,e=document.documentElement.scrollTop||document.body.scrollTop,i="body"==this.options.container?window.innerWidth:o.outerWidth(),h="body"==this.options.container?window.innerHeight:o.outerHeight(),o="body"==this.options.container?0:o.offset().left,n="bottom"==n&&a.top+a.height+l-e>h?"top":"top"==n&&a.top-e-l<0?"bottom":"right"==n&&a.right+r>i?"left":"left"==n&&a.left-r<o?"right":n,s.removeClass(t).addClass(n)),this.getCalculatedOffset(n,a,r,l));this.applyPlacement(h,n)}.call(this.container())}})})(window.jQuery),(y=>{function v(){return new Date(Date.UTC.apply(Date,arguments))}function b(t,e){this._process_options(e),this.element=y(t),this.isInline=!1,this.isInput=this.element.is("input"),this.component=!!this.element.is(".date")&&this.element.find(".add-on, .btn"),this.hasInput=this.component&&this.element.find("input").length,this.component&&0===this.component.length&&(this.component=!1),this.picker=y(w.template),this._buildEvents(),this._attachEvents(),this.isInline?this.picker.addClass("datepicker-inline").appendTo(this.element):this.picker.addClass("datepicker-dropdown dropdown-menu"),this.o.rtl&&(this.picker.addClass("datepicker-rtl"),this.picker.find(".prev i, .next i").toggleClass("icon-arrow-left icon-arrow-right")),this.viewMode=this.o.startView,this.o.calendarWeeks&&this.picker.find("tfoot th.today").attr("colspan",function(t,e){return parseInt(e)+1}),this._allow_update=!1,this.setStartDate(this.o.startDate),this.setEndDate(this.o.endDate),this.setDaysOfWeekDisabled(this.o.daysOfWeekDisabled),this.fillDow(),this.fillMonths(),this._allow_update=!0,this.update(),this.showMode(),this.isInline&&this.show()}function l(t,e){this.element=y(t),this.inputs=y.map(e.inputs,function(t){return t.jquery?t[0]:t}),delete e.inputs,y(this.inputs).datepicker(e).bind("changeDate",y.proxy(this.dateUpdated,this)),this.pickers=y.map(this.inputs,function(t){return y(t).data("datepicker")}),this.updateDates()}b.prototype={constructor:b,_process_options:function(t){this._o=y.extend({},this._o,t);var e=this.o=y.extend({},this._o),t=e.language;switch(g[t]||(t=t.split("-")[0],g[t])||(t=h.language),e.language=t,e.startView){case 2:case"decade":e.startView=2;break;case 1:case"year":e.startView=1;break;default:e.startView=0}switch(e.minViewMode){case 1:case"months":e.minViewMode=1;break;case 2:case"years":e.minViewMode=2;break;default:e.minViewMode=0}e.startView=Math.max(e.startView,e.minViewMode),e.weekStart%=7,e.weekEnd=(e.weekStart+6)%7;t=w.parseFormat(e.format);e.startDate!==-1/0&&(e.startDate=w.parseDate(e.startDate,t,e.language)),e.endDate!==1/0&&(e.endDate=w.parseDate(e.endDate,t,e.language)),e.daysOfWeekDisabled=e.daysOfWeekDisabled||[],Array.isArray(e.daysOfWeekDisabled)||(e.daysOfWeekDisabled=e.daysOfWeekDisabled.split(/[,\s]*/)),e.daysOfWeekDisabled=y.map(e.daysOfWeekDisabled,function(t){return parseInt(t,10)})},_events:[],_secondaryEvents:[],_applyEvents:function(t){for(var e,i,s=0;s<t.length;s++)e=t[s][0],i=t[s][1],e.on(i)},_unapplyEvents:function(t){for(var e,i,s=0;s<t.length;s++)e=t[s][0],i=t[s][1],e.off(i)},_buildEvents:function(){this.isInput?this._events=[[this.element,{focus:y.proxy(this.show,this),keyup:y.proxy(this.update,this),keydown:y.proxy(this.keydown,this)}]]:this.component&&this.hasInput?this._events=[[this.element.find("input"),{focus:y.proxy(this.show,this),keyup:y.proxy(this.update,this),keydown:y.proxy(this.keydown,this)}],[this.component,{click:y.proxy(this.show,this)}]]:this.element.is("div")?this.isInline=!0:this._events=[[this.element,{click:y.proxy(this.show,this)}]],this._secondaryEvents=[[this.picker,{click:y.proxy(this.click,this)}],[y(window),{resize:y.proxy(this.place,this)}],[y(document),{mousedown:y.proxy(function(t){this.element.is(t.target)||this.element.find(t.target).size()||this.picker.is(t.target)||this.picker.find(t.target).size()||this.hide()},this)}]]},_attachEvents:function(){this._detachEvents(),this._applyEvents(this._events)},_detachEvents:function(){this._unapplyEvents(this._events)},_attachSecondaryEvents:function(){this._detachSecondaryEvents(),this._applyEvents(this._secondaryEvents)},_detachSecondaryEvents:function(){this._unapplyEvents(this._secondaryEvents)},_trigger:function(t,e){var i=e||this.date,e=new Date(i.getTime()+6e4*i.getTimezoneOffset());this.element.trigger({type:t,date:e,format:y.proxy(function(t){t=t||this.o.format;return w.formatDate(i,t,this.o.language)},this)})},show:function(t){this.isInline||this.picker.appendTo("body"),this.picker.show(),this.height=(this.component||this.element).outerHeight(),this.place(),this._attachSecondaryEvents(),t&&t.preventDefault(),this._trigger("show")},hide:function(t){this.isInline||this.picker.is(":visible")&&(this.picker.hide().detach(),this._detachSecondaryEvents(),this.viewMode=this.o.startView,this.showMode(),this.o.forceParse&&(this.isInput&&this.element.val()||this.hasInput&&this.element.find("input").val())&&this.setValue(),this._trigger("hide"))},remove:function(){this.hide(),this._detachEvents(),this._detachSecondaryEvents(),this.picker.remove(),delete this.element.data().datepicker,this.isInput||delete this.element.data().date},getDate:function(){var t=this.getUTCDate();return new Date(t.getTime()+6e4*t.getTimezoneOffset())},getUTCDate:function(){return this.date},setDate:function(t){this.setUTCDate(new Date(t.getTime()-6e4*t.getTimezoneOffset()))},setUTCDate:function(t){this.date=t,this.setValue()},setValue:function(){var t=this.getFormattedDate();this.isInput?this.element.val(t):this.component&&this.element.find("input").val(t)},getFormattedDate:function(t){return void 0===t&&(t=this.o.format),w.formatDate(this.date,t,this.o.language)},setStartDate:function(t){this._process_options({startDate:t}),this.update(),this.updateNavArrows()},setEndDate:function(t){this._process_options({endDate:t}),this.update(),this.updateNavArrows()},setDaysOfWeekDisabled:function(t){this._process_options({daysOfWeekDisabled:t}),this.update(),this.updateNavArrows()},place:function(){var t,e,i;this.isInline||(t=parseInt(this.element.parents().filter(function(){return"auto"!=y(this).css("z-index")}).first().css("z-index"))+10,e=(this.component?this.component.parent():this.element).offset(),i=(this.component||this.element).outerHeight(!0),this.picker.css({top:e.top+i,left:e.left,zIndex:t}))},_allow_update:!0,update:function(){var t,e;this._allow_update&&(e=!1,arguments&&arguments.length&&("string"==typeof arguments[0]||arguments[0]instanceof Date)?(t=arguments[0],e=!0):(t=this.isInput?this.element.val():this.element.data("date")||this.element.find("input").val(),delete this.element.data().date),this.date=w.parseDate(t,this.o.format,this.o.language),e&&this.setValue(),this.date<this.o.startDate?this.viewDate=new Date(this.o.startDate):this.date>this.o.endDate?this.viewDate=new Date(this.o.endDate):this.viewDate=new Date(this.date),this.fill())},fillDow:function(){var t,e=this.o.weekStart,i="<tr>";for(this.o.calendarWeeks&&(i+=t='<th class="cw">&nbsp;</th>',this.picker.find(".datepicker-days thead tr:first-child").prepend(t));e<this.o.weekStart+7;)i+='<th class="dow">'+g[this.o.language].daysMin[e++%7]+"</th>";i+="</tr>",this.picker.find(".datepicker-days thead").append(i)},fillMonths:function(){for(var t="",e=0;e<12;)t+='<span class="month">'+g[this.o.language].monthsShort[e++]+"</span>";this.picker.find(".datepicker-months td").html(t)},setRange:function(t){t&&t.length?this.range=y.map(t,function(t){return t.valueOf()}):delete this.range,this.fill()},getClassNames:function(t){var e=[],i=this.viewDate.getUTCFullYear(),s=this.viewDate.getUTCMonth(),n=this.date.valueOf(),a=new Date;return t.getUTCFullYear()<i||t.getUTCFullYear()==i&&t.getUTCMonth()<s?e.push("old"):(t.getUTCFullYear()>i||t.getUTCFullYear()==i&&t.getUTCMonth()>s)&&e.push("new"),this.o.todayHighlight&&t.getUTCFullYear()==a.getFullYear()&&t.getUTCMonth()==a.getMonth()&&t.getUTCDate()==a.getDate()&&e.push("today"),n&&t.valueOf()==n&&e.push("active"),(t.valueOf()<this.o.startDate||t.valueOf()>this.o.endDate||-1!==y.inArray(t.getUTCDay(),this.o.daysOfWeekDisabled))&&e.push("disabled"),this.range&&(t>this.range[0]&&t<this.range[this.range.length-1]&&e.push("range"),-1!=y.inArray(t.valueOf(),this.range))&&e.push("selected"),e},fill:function(){for(var t,e=new Date(this.viewDate),i=e.getUTCFullYear(),e=e.getUTCMonth(),s=this.o.startDate!==-1/0?this.o.startDate.getUTCFullYear():-1/0,n=this.o.startDate!==-1/0?this.o.startDate.getUTCMonth():-1/0,a=this.o.endDate!==1/0?this.o.endDate.getUTCFullYear():1/0,o=this.o.endDate!==1/0?this.o.endDate.getUTCMonth():1/0,r=(this.date&&this.date.valueOf(),this.picker.find(".datepicker-days thead th.datepicker-switch").text(g[this.o.language].months[e]+" "+i),this.picker.find("tfoot th.today").text(g[this.o.language].today).toggle(!1!==this.o.todayBtn),this.picker.find("tfoot th.clear").text(g[this.o.language].clear).toggle(!1!==this.o.clearBtn),this.updateNavArrows(),this.fillMonths(),v(i,e-1,28,0,0,0,0)),e=w.getDaysInMonth(r.getUTCFullYear(),r.getUTCMonth()),l=(r.setUTCDate(e),r.setUTCDate(e-(r.getUTCDay()-this.o.weekStart+7)%7),new Date(r)),h=(l.setUTCDate(l.getUTCDate()+42),l=l.valueOf(),[]);r.valueOf()<l;){r.getUTCDay()==this.o.weekStart&&(h.push("<tr>"),this.o.calendarWeeks)&&(p=new Date(+r+(this.o.weekStart-r.getUTCDay()-7)%7*864e5),p=new Date(+p+(11-p.getUTCDay())%7*864e5),u=new Date(+(u=v(p.getUTCFullYear(),0,1))+(11-u.getUTCDay())%7*864e5),h.push('<td class="cw">'+((p-u)/864e5/7+1)+"</td>")),(p=this.getClassNames(r)).push("day");var p,u=this.o.beforeShowDay(r);void 0===u?u={}:"boolean"==typeof u?u={enabled:u}:"string"==typeof u&&(u={classes:u}),!1===u.enabled&&p.push("disabled"),u.classes&&(p=p.concat(u.classes.split(/\s+/))),u.tooltip&&(t=u.tooltip),p=y.unique(p),h.push('<td class="'+p.join(" ")+'"'+(t?' title="'+t+'"':"")+">"+r.getUTCDate()+"</td>"),r.getUTCDay()==this.o.weekEnd&&h.push("</tr>"),r.setUTCDate(r.getUTCDate()+1)}this.picker.find(".datepicker-days tbody").empty().append(h.join(""));var d=this.date&&this.date.getUTCFullYear(),e=this.picker.find(".datepicker-months").find("th:eq(1)").text(i).end().find("span").removeClass("active"),n=(d&&d==i&&e.eq(this.date.getUTCMonth()).addClass("active"),(i<s||a<i)&&e.addClass("disabled"),i==s&&e.slice(0,n).addClass("disabled"),i==a&&e.slice(o+1).addClass("disabled"),h="",i=10*parseInt(i/10,10),this.picker.find(".datepicker-years").find("th:eq(1)").text(i+"-"+(i+9)).end().find("td"));--i;for(var c=-1;c<11;c++)h+='<span class="year'+(-1==c?" old":10==c?" new":"")+(d==i?" active":"")+(i<s||a<i?" disabled":"")+'">'+i+"</span>",i+=1;n.html(h)},updateNavArrows:function(){if(this._allow_update){var t=new Date(this.viewDate),e=t.getUTCFullYear(),i=t.getUTCMonth();switch(this.viewMode){case 0:this.o.startDate!==-1/0&&e<=this.o.startDate.getUTCFullYear()&&i<=this.o.startDate.getUTCMonth()?this.picker.find(".prev").css({visibility:"hidden"}):this.picker.find(".prev").css({visibility:"visible"}),this.o.endDate!==1/0&&e>=this.o.endDate.getUTCFullYear()&&i>=this.o.endDate.getUTCMonth()?this.picker.find(".next").css({visibility:"hidden"}):this.picker.find(".next").css({visibility:"visible"});break;case 1:case 2:this.o.startDate!==-1/0&&e<=this.o.startDate.getUTCFullYear()?this.picker.find(".prev").css({visibility:"hidden"}):this.picker.find(".prev").css({visibility:"visible"}),this.o.endDate!==1/0&&e>=this.o.endDate.getUTCFullYear()?this.picker.find(".next").css({visibility:"hidden"}):this.picker.find(".next").css({visibility:"visible"})}}},click:function(t){t.preventDefault();var e,i,s,n,a=y(t.target).closest("span, td, th");if(1==a.length)switch(a[0].nodeName.toLowerCase()){case"th":switch(a[0].className){case"datepicker-switch":this.showMode(1);break;case"prev":case"next":var o=w.modes[this.viewMode].navStep*("prev"==a[0].className?-1:1);switch(this.viewMode){case 0:this.viewDate=this.moveMonth(this.viewDate,o);break;case 1:case 2:this.viewDate=this.moveYear(this.viewDate,o)}this.fill();break;case"today":var r=v((r=new Date).getFullYear(),r.getMonth(),r.getDate(),0,0,0),l=(this.showMode(-2),"linked"==this.o.todayBtn?null:"view");this._setDate(r,l);break;case"clear":this.isInput?e=this.element:this.component&&(e=this.element.find("input")),e&&e.val("").change(),this._trigger("changeDate"),this.update(),this.o.autoclose&&this.hide()}break;case"span":a.is(".disabled")||(this.viewDate.setUTCDate(1),a.is(".month")?(i=1,n=a.parent().find("span").index(a),s=this.viewDate.getUTCFullYear(),this.viewDate.setUTCMonth(n),this._trigger("changeMonth",this.viewDate),1===this.o.minViewMode&&this._setDate(v(s,n,i,0,0,0,0))):(s=parseInt(a.text(),10)||0,i=1,n=0,this.viewDate.setUTCFullYear(s),this._trigger("changeYear",this.viewDate),2===this.o.minViewMode&&this._setDate(v(s,n,i,0,0,0,0))),this.showMode(-1),this.fill());break;case"td":a.is(".day")&&!a.is(".disabled")&&(i=parseInt(a.text(),10)||1,s=this.viewDate.getUTCFullYear(),n=this.viewDate.getUTCMonth(),a.is(".old")?0===n?(n=11,--s):--n:a.is(".new")&&(11==n?(n=0,s+=1):n+=1),this._setDate(v(s,n,i,0,0,0,0)))}},_setDate:function(t,e){var i;e&&"date"!=e||(this.date=new Date(t)),e&&"view"!=e||(this.viewDate=new Date(t)),this.fill(),this.setValue(),this._trigger("changeDate"),this.isInput?i=this.element:this.component&&(i=this.element.find("input")),i&&(i.change(),!this.o.autoclose||e&&"date"!=e||this.hide())},moveMonth:function(t,e){if(!e)return t;var i,s,n=new Date(t.valueOf()),a=n.getUTCDate(),o=n.getUTCMonth(),r=Math.abs(e);if(e=0<e?1:-1,1==r)s=-1==e?function(){return n.getUTCMonth()==o}:function(){return n.getUTCMonth()!=i},i=o+e,n.setUTCMonth(i),(i<0||11<i)&&(i=(i+12)%12);else{for(var l=0;l<r;l++)n=this.moveMonth(n,e);i=n.getUTCMonth(),n.setUTCDate(a),s=function(){return i!=n.getUTCMonth()}}for(;s();)n.setUTCDate(--a),n.setUTCMonth(i);return n},moveYear:function(t,e){return this.moveMonth(t,12*e)},dateWithinRange:function(t){return t>=this.o.startDate&&t<=this.o.endDate},keydown:function(t){if(this.picker.is(":not(:visible)"))27==t.keyCode&&this.show();else{var e,i,s,n,a=!1;switch(t.keyCode){case 27:this.hide(),t.preventDefault();break;case 37:case 39:this.o.keyboardNavigation&&(e=37==t.keyCode?-1:1,t.ctrlKey?(i=this.moveYear(this.date,e),s=this.moveYear(this.viewDate,e)):t.shiftKey?(i=this.moveMonth(this.date,e),s=this.moveMonth(this.viewDate,e)):((i=new Date(this.date)).setUTCDate(this.date.getUTCDate()+e),(s=new Date(this.viewDate)).setUTCDate(this.viewDate.getUTCDate()+e)),this.dateWithinRange(i))&&(this.date=i,this.viewDate=s,this.setValue(),this.update(),t.preventDefault(),a=!0);break;case 38:case 40:this.o.keyboardNavigation&&(e=38==t.keyCode?-1:1,t.ctrlKey?(i=this.moveYear(this.date,e),s=this.moveYear(this.viewDate,e)):t.shiftKey?(i=this.moveMonth(this.date,e),s=this.moveMonth(this.viewDate,e)):((i=new Date(this.date)).setUTCDate(this.date.getUTCDate()+7*e),(s=new Date(this.viewDate)).setUTCDate(this.viewDate.getUTCDate()+7*e)),this.dateWithinRange(i))&&(this.date=i,this.viewDate=s,this.setValue(),this.update(),t.preventDefault(),a=!0);break;case 13:this.hide(),t.preventDefault();break;case 9:this.hide()}a&&(this._trigger("changeDate"),this.isInput?n=this.element:this.component&&(n=this.element.find("input")),n)&&n.change()}},showMode:function(t){t&&(this.viewMode=Math.max(this.o.minViewMode,Math.min(2,this.viewMode+t))),this.picker.find(">div").hide().filter(".datepicker-"+w.modes[this.viewMode].clsName).css("display","block"),this.updateNavArrows()}},l.prototype={updateDates:function(){this.dates=y.map(this.pickers,function(t){return t.date}),this.updateRanges()},updateRanges:function(){var i=y.map(this.dates,function(t){return t.valueOf()});y.each(this.pickers,function(t,e){e.setRange(i)})},dateUpdated:function(t){var e=y(t.target).data("datepicker").getUTCDate(),i=y.inArray(t.target,this.inputs),s=this.inputs.length;if(-1!=i){if(e<this.dates[i])for(;0<=i&&e<this.dates[i];)this.pickers[i--].setUTCDate(e);else if(e>this.dates[i])for(;i<s&&e>this.dates[i];)this.pickers[i++].setUTCDate(e);this.updateDates()}},remove:function(){y.map(this.pickers,function(t){t.remove()}),delete this.element.data().datepicker}};var t=y.fn.datepicker,i=y.fn.datepicker=function(a){var o,r=Array.apply(null,arguments);return r.shift(),this.each(function(){var t,e,i=y(this),s=i.data("datepicker"),n="object"==typeof a&&a;if(s||(e=((t,e)=>{var i,s=y(t).data(),n={},a=new RegExp("^"+e.toLowerCase()+"([A-Z])"),e=new RegExp("^"+e.toLowerCase());for(i in s)e.test(i)&&(n[i.replace(a,function(t,e){return e.toLowerCase()})]=s[i]);return n})(this,"date"),t=(t=>{var i,s={};if(g[t]||(t=t.split("-")[0],g[t]))return i=g[t],y.each(p,function(t,e){e in i&&(s[e]=i[e])}),s})(y.extend({},h,e,n).language),t=y.extend({},h,t,e,n),i.is(".input-daterange")||t.inputs?(e={inputs:t.inputs||i.find("input").toArray()},i.data("datepicker",s=new l(this,y.extend(t,e)))):i.data("datepicker",s=new b(this,t))),"string"==typeof a&&"function"==typeof s[a]&&void 0!==(o=s[a].apply(s,r)))return!1}),void 0!==o?o:this},h=y.fn.datepicker.defaults={autoclose:!1,beforeShowDay:y.noop,calendarWeeks:!1,clearBtn:!1,daysOfWeekDisabled:[],endDate:1/0,forceParse:!0,format:"mm/dd/yyyy",keyboardNavigation:!0,language:"en",minViewMode:0,rtl:!1,startDate:-1/0,startView:0,todayBtn:!1,todayHighlight:!1,weekStart:0},p=y.fn.datepicker.locale_opts=["format","rtl","weekStart"],g=(y.fn.datepicker.Constructor=b,y.fn.datepicker.dates={en:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],daysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sun"],daysMin:["Su","Mo","Tu","We","Th","Fr","Sa","Su"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],today:"Today",clear:"Clear"}}),w={modes:[{clsName:"days",navFnc:"Month",navStep:1},{clsName:"months",navFnc:"FullYear",navStep:1},{clsName:"years",navFnc:"FullYear",navStep:10}],isLeapYear:function(t){return t%4==0&&t%100!=0||t%400==0},getDaysInMonth:function(t,e){return[31,w.isLeapYear(t)?29:28,31,30,31,30,31,31,30,31,30,31][e]},validParts:/dd?|DD?|mm?|MM?|yy(?:yy)?/g,nonpunctuation:/[^ -\/:-@\[\u3400-\u9fff-`{-~\t\n\r]+/g,parseFormat:function(t){var e=t.replace(this.validParts,"\0").split("\0"),t=t.match(this.validParts);if(e&&e.length&&t&&0!==t.length)return{separators:e,parts:t};throw new Error("Invalid date format.")},parseDate:function(t,e,i){if(!(t instanceof Date)){if("string"==typeof e&&(e=w.parseFormat(e)),/^[\-+]\d+[dmwy]([\s,]+[\-+]\d+[dmwy])*$/.test(t)){var s,n=/([\-+]\d+)([dmwy])/,a=t.match(/([\-+]\d+)([dmwy])/g);t=new Date;for(var o=0;o<a.length;o++)switch(h=n.exec(a[o]),s=parseInt(h[1]),h[2]){case"d":t.setUTCDate(t.getUTCDate()+s);break;case"m":t=b.prototype.moveMonth.call(b.prototype,t,s);break;case"w":t.setUTCDate(t.getUTCDate()+7*s);break;case"y":t=b.prototype.moveYear.call(b.prototype,t,s)}return v(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate(),0,0,0)}var r,l,h,a=t&&t.match(this.nonpunctuation)||[],t=new Date,p={},u=["yyyy","yy","M","MM","m","mm","d","dd"],d={yyyy:function(t,e){return t.setUTCFullYear(e)},yy:function(t,e){return t.setUTCFullYear(2e3+e)},m:function(t,e){for(--e;e<0;)e+=12;for(t.setUTCMonth(e%=12);t.getUTCMonth()!=e;)t.setUTCDate(t.getUTCDate()-1);return t},d:function(t,e){return t.setUTCDate(e)}},c=(d.M=d.MM=d.mm=d.m,d.dd=d.d,t=v(t.getFullYear(),t.getMonth(),t.getDate(),0,0,0),e.parts.slice());if(a.length!=c.length&&(c=y(c).filter(function(t,e){return-1!==y.inArray(e,u)}).toArray()),a.length==c.length){for(var o=0,f=c.length;o<f;o++){if(r=parseInt(a[o],10),h=c[o],isNaN(r))switch(h){case"MM":l=y(g[i].months).filter(function(){var t=this.slice(0,a[o].length);return t==a[o].slice(0,t.length)}),r=y.inArray(l[0],g[i].months)+1;break;case"M":l=y(g[i].monthsShort).filter(function(){var t=this.slice(0,a[o].length);return t==a[o].slice(0,t.length)}),r=y.inArray(l[0],g[i].monthsShort)+1}p[h]=r}for(var m,o=0;o<u.length;o++)(m=u[o])in p&&!isNaN(p[m])&&d[m](t,p[m])}}return t},formatDate:function(t,e,i){"string"==typeof e&&(e=w.parseFormat(e));for(var s={d:t.getUTCDate(),D:g[i].daysShort[t.getUTCDay()],DD:g[i].days[t.getUTCDay()],m:t.getUTCMonth()+1,M:g[i].monthsShort[t.getUTCMonth()],MM:g[i].months[t.getUTCMonth()],yy:t.getUTCFullYear().toString().substring(2),yyyy:t.getUTCFullYear()},t=(s.dd=(s.d<10?"0":"")+s.d,s.mm=(s.m<10?"0":"")+s.m,[]),n=y.extend([],e.separators),a=0,o=e.parts.length;a<=o;a++)n.length&&t.push(n.shift()),t.push(s[e.parts[a]]);return t.join("")},headTemplate:'<thead><tr><th class="prev"><i class="icon-arrow-left"/></th><th colspan="5" class="datepicker-switch"></th><th class="next"><i class="icon-arrow-right"/></th></tr></thead>',contTemplate:'<tbody><tr><td colspan="7"></td></tr></tbody>',footTemplate:'<tfoot><tr><th colspan="7" class="today"></th></tr><tr><th colspan="7" class="clear"></th></tr></tfoot>'};w.template='<div class="datepicker"><div class="datepicker-days"><table class=" table-condensed">'+w.headTemplate+"<tbody></tbody>"+w.footTemplate+'</table></div><div class="datepicker-months"><table class="table-condensed">'+w.headTemplate+w.contTemplate+w.footTemplate+'</table></div><div class="datepicker-years"><table class="table-condensed">'+w.headTemplate+w.contTemplate+w.footTemplate+"</table></div></div>",y.fn.datepicker.DPGlobal=w,y.fn.datepicker.noConflict=function(){return y.fn.datepicker=t,this},y(document).on("focus.datepicker.data-api click.datepicker.data-api",'[data-provide="datepicker"]',function(t){var e=y(this);e.data("datepicker")||(t.preventDefault(),i.call(e,"show"))}),y(function(){i.call(y('[data-provide="datepicker-inline"]'))})})(window.jQuery),(i=>{function s(t){this.init("date",t,s.defaults),this.initPicker(t,s.defaults)}i.fn.bdatepicker=i.fn.datepicker.noConflict(),i.fn.datepicker||(i.fn.datepicker=i.fn.bdatepicker),i.fn.editableutils.inherit(s,i.fn.editabletypes.abstractinput),i.extend(s.prototype,{initPicker:function(t,e){this.options.viewformat||(this.options.viewformat=this.options.format),t.datepicker=i.fn.editableutils.tryParseJson(t.datepicker,!0),this.options.datepicker=i.extend({},e.datepicker,t.datepicker,{format:this.options.viewformat}),this.options.datepicker.language=this.options.datepicker.language||"en",this.dpg=i.fn.bdatepicker.DPGlobal,this.parsedFormat=this.dpg.parseFormat(this.options.format),this.parsedViewFormat=this.dpg.parseFormat(this.options.viewformat)},render:function(){this.$input.bdatepicker(this.options.datepicker),this.options.clear&&(this.$clear=i('<a href="#"></a>').html(this.options.clear).click(i.proxy(function(t){t.preventDefault(),t.stopPropagation(),this.clear()},this)),this.$tpl.parent().append(i('<div class="editable-clear">').append(this.$clear)))},value2html:function(t,e){t=t?this.dpg.formatDate(t,this.parsedViewFormat,this.options.datepicker.language):"";s.superclass.value2html.call(this,t,e)},html2value:function(t){return this.parseDate(t,this.parsedViewFormat)},value2str:function(t){return t?this.dpg.formatDate(t,this.parsedFormat,this.options.datepicker.language):""},str2value:function(t){return this.parseDate(t,this.parsedFormat)},value2submit:function(t){return this.value2str(t)},value2input:function(t){this.$input.bdatepicker("update",t)},input2value:function(){return this.$input.data("datepicker").date},activate:function(){},clear:function(){this.$input.data("datepicker").date=null,this.$input.find(".active").removeClass("active"),this.options.showbuttons||this.$input.closest("form").submit()},autosubmit:function(){this.$input.on("mouseup",".day",function(t){var e;i(t.currentTarget).is(".old")||i(t.currentTarget).is(".new")||(e=i(this).closest("form"),setTimeout(function(){e.submit()},200))})},parseDate:function(t,e){var i=null;return i=t&&(i=this.dpg.parseDate(t,e,this.options.datepicker.language),"string"==typeof t)&&t!==this.dpg.formatDate(i,e,this.options.datepicker.language)?null:i}}),s.defaults=i.extend({},i.fn.editabletypes.abstractinput.defaults,{tpl:'<div class="editable-date well"></div>',inputclass:null,format:"yyyy-mm-dd",viewformat:null,datepicker:{weekStart:0,startView:0,minViewMode:0,autoclose:!1},clear:"&times; clear"}),i.fn.editabletypes.date=s})(window.jQuery),(t=>{function e(t){this.init("datefield",t,e.defaults),this.initPicker(t,e.defaults)}t.fn.editableutils.inherit(e,t.fn.editabletypes.date),t.extend(e.prototype,{render:function(){this.$input=this.$tpl.find("input"),this.setClass(),this.setAttr("placeholder"),this.$tpl.bdatepicker(this.options.datepicker),this.$input.off("focus keydown"),this.$input.keyup(t.proxy(function(){this.$tpl.removeData("date"),this.$tpl.bdatepicker("update")},this))},value2input:function(t){this.$input.val(t?this.dpg.formatDate(t,this.parsedViewFormat,this.options.datepicker.language):""),this.$tpl.bdatepicker("update")},input2value:function(){return this.html2value(this.$input.val())},activate:function(){t.fn.editabletypes.text.prototype.activate.call(this)},autosubmit:function(){}}),e.defaults=t.extend({},t.fn.editabletypes.date.defaults,{tpl:'<div class="input-append date"><input type="text"/><span class="add-on"><i class="icon-th"></i></span></div>',inputclass:"input-small",datepicker:{weekStart:0,startView:0,minViewMode:0,autoclose:!0}}),t.fn.editabletypes.datefield=e})(window.jQuery),(i=>{function s(t){this.init("datetime",t,s.defaults),this.initPicker(t,s.defaults)}i.fn.editableutils.inherit(s,i.fn.editabletypes.abstractinput),i.extend(s.prototype,{initPicker:function(t,e){this.options.viewformat||(this.options.viewformat=this.options.format),t.datetimepicker=i.fn.editableutils.tryParseJson(t.datetimepicker,!0),this.options.datetimepicker=i.extend({},e.datetimepicker,t.datetimepicker,{format:this.options.viewformat}),this.options.datetimepicker.language=this.options.datetimepicker.language||"en",this.dpg=i.fn.datetimepicker.DPGlobal,this.parsedFormat=this.dpg.parseFormat(this.options.format,this.options.formatType),this.parsedViewFormat=this.dpg.parseFormat(this.options.viewformat,this.options.formatType)},render:function(){this.$input.datetimepicker(this.options.datetimepicker),this.$input.on("changeMode",function(t){var e=i(this).closest("form").parent();setTimeout(function(){e.triggerHandler("resize")},0)}),this.options.clear&&(this.$clear=i('<a href="#"></a>').html(this.options.clear).click(i.proxy(function(t){t.preventDefault(),t.stopPropagation(),this.clear()},this)),this.$tpl.parent().append(i('<div class="editable-clear">').append(this.$clear)))},value2html:function(t,e){t=t?this.dpg.formatDate(this.toUTC(t),this.parsedViewFormat,this.options.datetimepicker.language,this.options.formatType):"";if(!e)return t;s.superclass.value2html.call(this,t,e)},html2value:function(t){t=this.parseDate(t,this.parsedViewFormat);return t?this.fromUTC(t):null},value2str:function(t){return t?this.dpg.formatDate(this.toUTC(t),this.parsedFormat,this.options.datetimepicker.language,this.options.formatType):""},str2value:function(t){t=this.parseDate(t,this.parsedFormat);return t?this.fromUTC(t):null},value2submit:function(t){return this.value2str(t)},value2input:function(t){t&&this.$input.data("datetimepicker").setDate(t)},input2value:function(){var t=this.$input.data("datetimepicker");return t.date?t.getDate():null},activate:function(){},clear:function(){this.$input.data("datetimepicker").date=null,this.$input.find(".active").removeClass("active"),this.options.showbuttons||this.$input.closest("form").submit()},autosubmit:function(){this.$input.on("mouseup",".minute",function(t){var e=i(this).closest("form");setTimeout(function(){e.submit()},200)})},toUTC:function(t){return t&&new Date(t.valueOf()-6e4*t.getTimezoneOffset())},fromUTC:function(t){return t&&new Date(t.valueOf()+6e4*t.getTimezoneOffset())},parseDate:function(t,e){var i=null;return i=t&&(i=this.dpg.parseDate(t,e,this.options.datetimepicker.language,this.options.formatType),"string"==typeof t)&&t!==this.dpg.formatDate(i,e,this.options.datetimepicker.language,this.options.formatType)?null:i}}),s.defaults=i.extend({},i.fn.editabletypes.abstractinput.defaults,{tpl:'<div class="editable-date well"></div>',inputclass:null,format:"yyyy-mm-dd hh:ii",formatType:"standard",viewformat:null,datetimepicker:{todayHighlight:!1,autoclose:!1},clear:"&times; clear"}),i.fn.editabletypes.datetime=s})(window.jQuery),(t=>{function e(t){this.init("datetimefield",t,e.defaults),this.initPicker(t,e.defaults)}t.fn.editableutils.inherit(e,t.fn.editabletypes.datetime),t.extend(e.prototype,{render:function(){this.$input=this.$tpl.find("input"),this.setClass(),this.setAttr("placeholder"),this.$tpl.datetimepicker(this.options.datetimepicker),this.$input.off("focus keydown"),this.$input.keyup(t.proxy(function(){this.$tpl.removeData("date"),this.$tpl.datetimepicker("update")},this))},value2input:function(t){this.$input.val(this.value2html(t)),this.$tpl.datetimepicker("update")},input2value:function(){return this.html2value(this.$input.val())},activate:function(){t.fn.editabletypes.text.prototype.activate.call(this)},autosubmit:function(){}}),e.defaults=t.extend({},t.fn.editabletypes.datetime.defaults,{tpl:'<div class="input-append date"><input type="text"/><span class="add-on"><i class="icon-th"></i></span></div>',inputclass:"input-medium",datetimepicker:{todayHighlight:!1,autoclose:!0}}),t.fn.editabletypes.datetimefield=e})(window.jQuery);
\ No newline at end of file
+(a=>{function n(t,e){this.options=a.extend({},a.fn.editableform.defaults,e),this.$div=a(t),this.options.scope||(this.options.scope=this)}n.prototype={constructor:n,initInput:function(){this.input=this.options.input,this.value=this.input.str2value(this.options.value),this.input.prerender()},initTemplate:function(){this.$form=a(a.fn.editableform.template)},initButtons:function(){var t=this.$form.find(".editable-buttons");t.append(a.fn.editableform.buttons),"bottom"===this.options.showbuttons&&t.addClass("editable-buttons-bottom")},render:function(){this.$loading=a(a.fn.editableform.loading),this.$div.empty().append(this.$loading),this.initTemplate(),this.options.showbuttons?this.initButtons():this.$form.find(".editable-buttons").remove(),this.showLoading(),this.isSaving=!1,this.$div.triggerHandler("rendering"),this.initInput(),this.$form.find("div.editable-input").append(this.input.$tpl),this.$div.append(this.$form),a.when(this.input.render()).then(a.proxy(function(){var t;this.options.showbuttons||this.input.autosubmit(),this.$form.find(".editable-cancel").click(a.proxy(this.cancel,this)),this.input.error?(this.error(this.input.error),this.$form.find(".editable-submit").attr("disabled",!0),this.input.$input.attr("disabled",!0),this.$form.submit(function(t){t.preventDefault()})):(this.error(!1),this.input.$input.removeAttr("disabled"),this.$form.find(".editable-submit").removeAttr("disabled"),t=null==this.value||""===this.value?this.options.defaultValue:this.value,this.input.value2input(t),this.$form.submit(a.proxy(this.submit,this))),this.$div.triggerHandler("rendered"),this.showForm(),this.input.postrender&&this.input.postrender()},this))},cancel:function(){this.$div.triggerHandler("cancel")},showLoading:function(){var t,e;this.$form?(t=this.$form.outerWidth(),e=this.$form.outerHeight(),t&&this.$loading.width(t),e&&this.$loading.height(e),this.$form.hide()):(t=this.$loading.parent().width())&&this.$loading.width(t),this.$loading.show()},showForm:function(t){this.$loading.hide(),this.$form.show(),!1!==t&&this.input.activate(),this.$div.triggerHandler("show")},error:function(t){var e=this.$form.find(".control-group"),i=this.$form.find(".editable-error-block");if(!1===t)e.removeClass(a.fn.editableform.errorGroupClass),i.removeClass(a.fn.editableform.errorBlockClass).empty().hide();else{if(t){for(var s=(""+t).split("\n"),n=0;n<s.length;n++)s[n]=a("<div>").text(s[n]).html();t=s.join("<br>")}e.addClass(a.fn.editableform.errorGroupClass),i.addClass(a.fn.editableform.errorBlockClass).html(t).show()}},submit:function(t){t.stopPropagation(),t.preventDefault();var i,s=this.input.input2value(),t=this.validate(s);if("object"===a.type(t)&&void 0!==t.newValue){if(s=t.newValue,this.input.value2input(s),"string"==typeof t.msg)return this.error(t.msg),void this.showForm()}else if(t)return this.error(t),void this.showForm();this.options.savenochange||this.input.value2str(s)!=this.input.value2str(this.value)?(i=this.input.value2submit(s),this.isSaving=!0,a.when(this.save(i)).done(a.proxy(function(t){this.isSaving=!1;var e="function"==typeof this.options.success?this.options.success.call(this.options.scope,t,s):null;!1===e?(this.error(!1),this.showForm(!1)):"string"==typeof e?(this.error(e),this.showForm()):(e&&"object"==typeof e&&e.hasOwnProperty("newValue")&&(s=e.newValue),this.error(!1),this.value=s,this.$div.triggerHandler("save",{newValue:s,submitValue:i,response:t}))},this)).fail(a.proxy(function(t){this.isSaving=!1,t="function"==typeof this.options.error?this.options.error.call(this.options.scope,t,s):"string"==typeof t?t:t.responseText||t.statusText||"Unknown error!",this.error(t),this.showForm()},this))):this.$div.triggerHandler("nochange")},save:function(t){this.options.pk=a.fn.editableutils.tryParseJson(this.options.pk,!0);var e="function"==typeof this.options.pk?this.options.pk.call(this.options.scope):this.options.pk;if(!!("function"==typeof this.options.url||this.options.url&&("always"===this.options.send||"auto"===this.options.send&&null!=e)))return this.showLoading(),t={name:this.options.name||"",value:t,pk:e},"function"==typeof this.options.params?t=this.options.params.call(this.options.scope,t):(this.options.params=a.fn.editableutils.tryParseJson(this.options.params,!0),a.extend(t,this.options.params)),"function"==typeof this.options.url?this.options.url.call(this.options.scope,t):a.ajax(a.extend({url:this.options.url,data:t,type:"POST"},this.options.ajaxOptions))},validate:function(t){if(void 0===t&&(t=this.value),"function"==typeof this.options.validate)return this.options.validate.call(this.options.scope,t)},option:function(t,e){t in this.options&&(this.options[t]=e),"value"===t&&this.setValue(e)},setValue:function(t,e){this.value=e?this.input.str2value(t):t,this.$form&&this.$form.is(":visible")&&this.input.value2input(this.value)}},a.fn.editableform=function(i){var s=arguments;return this.each(function(){var t=a(this),e=t.data("editableform");e||t.data("editableform",e=new n(this,"object"==typeof i&&i)),"string"==typeof i&&e[i].apply(e,Array.prototype.slice.call(s,1))})},a.fn.editableform.Constructor=n,a.fn.editableform.defaults={type:"text",url:null,params:null,name:null,pk:null,value:null,defaultValue:null,send:"auto",validate:null,success:null,error:null,ajaxOptions:null,showbuttons:!0,scope:null,savenochange:!1},a.fn.editableform.template='<form class="form-inline editableform"><div class="control-group"><div><div class="editable-input"></div><div class="editable-buttons"></div></div><div class="editable-error-block"></div></div></form>',a.fn.editableform.loading='<div class="editableform-loading"></div>',a.fn.editableform.buttons='<button type="submit" class="editable-submit">ok</button><button type="button" class="editable-cancel">cancel</button>',a.fn.editableform.errorGroupClass=null,a.fn.editableform.errorBlockClass="editable-error",a.fn.editableform.engine="jquery"})(window.jQuery),(l=>{l.fn.editableutils={inherit:function(t,e){function i(){}i.prototype=e.prototype,t.prototype=new i,(t.prototype.constructor=t).superclass=e.prototype},setCursorPosition:function(t,e){t.setSelectionRange?t.setSelectionRange(e,e):t.createTextRange&&((t=t.createTextRange()).collapse(!0),t.moveEnd("character",e),t.moveStart("character",e),t.select())},tryParseJson:function(t,e){if("string"==typeof t&&t.length&&t.match(/^[\{\[].*[\}\]]$/))if(e)try{t=new Function("return "+t)()}catch(t){}finally{return t}else t=new Function("return "+t)();return t},sliceObj:function(t,e,i){var s,n,a={};if(Array.isArray(e)&&e.length)for(var o=0;o<e.length;o++)t.hasOwnProperty(s=e[o])&&(a[s]=t[s]),!0!==i&&(n=s.toLowerCase(),t.hasOwnProperty(n))&&(a[s]=t[n]);return a},getConfigData:function(t){var i={};return l.each(t.data(),function(t,e){"object"==typeof e&&(!e||"object"!=typeof e||e.constructor!==Object&&e.constructor!==Array)||(i[t]=e)}),i},objectKeys:function(t){if(Object.keys)return Object.keys(t);if(t!==Object(t))throw new TypeError("Object.keys called on a non-object");var e,i=[];for(e in t)Object.prototype.hasOwnProperty.call(t,e)&&i.push(e);return i},escape:function(t){return l("<div>").text(t).html()},itemsByValue:function(s,t,n){var e,a,o,r;return t&&null!==s?("function"!=typeof n&&(e=n||"value",n=function(t){return t[e]}),a=Array.isArray(s),o=[],r=this,l.each(t,function(t,e){var i;e.children?o=o.concat(r.itemsByValue(s,e.children,n)):a?l.grep(s,function(t){return t==(e&&"object"==typeof e?n(e):e)}).length&&o.push(e):(i=e&&"object"==typeof e?n(e):e,s==i&&o.push(e))}),o):[]},createInput:function(t){var e,i=t.type;return"date"===i&&("inline"===t.mode?l.fn.editabletypes.datefield?i="datefield":l.fn.editabletypes.dateuifield&&(i="dateuifield"):l.fn.editabletypes.date?i="date":l.fn.editabletypes.dateui&&(i="dateui"),"date"!==i||l.fn.editabletypes.date||(i="combodate")),"wysihtml5"!==(i="datetime"===i&&"inline"===t.mode?"datetimefield":i)||l.fn.editabletypes[i]||(i="textarea"),"function"==typeof l.fn.editabletypes[i]?new(e=l.fn.editabletypes[i])(this.sliceObj(t,this.objectKeys(e.defaults))):(l.error("Unknown type: "+i),!1)},supportsTransitions:function(){var t=(document.body||document.documentElement).style,e=["Moz","Webkit","Khtml","O","ms"];if("string"==typeof t[i="transition"])return!0;for(var i=i.charAt(0).toUpperCase()+i.substr(1),s=0;s<e.length;s++)if("string"==typeof t[e[s]+i])return!0;return!1}}})(window.jQuery),(r=>{function l(t,e){this.init(t,e)}function h(t,e){this.init(t,e)}l.prototype={containerName:null,containerDataName:null,innerCss:null,containerClass:"editable-container editable-popup",defaults:{},init:function(t,e){this.$element=r(t),this.options=r.extend({},r.fn.editableContainer.defaults,e),this.splitOptions(),this.formOptions.scope=this.$element[0],this.initContainer(),this.delayedHide=!1,this.$element.on("destroyed",r.proxy(function(){this.destroy()},this)),r(document).data("editable-handlers-attached")||(r(document).on("keyup.editable",function(t){27===t.which&&r(".editable-open").editableContainer("hide")}),r(document).on("click.editable",function(t){var e,i=r(t.target),s=[".editable-container",".ui-datepicker-header",".datepicker",".modal-backdrop",".bootstrap-wysihtml5-insert-image-modal",".bootstrap-wysihtml5-insert-link-modal"];if(r.contains(document.documentElement,t.target)&&!i.is(document)){for(e=0;e<s.length;e++)if(i.is(s[e])||i.parents(s[e]).length)return;l.prototype.closeOthers(t.target)}}),r(document).data("editable-handlers-attached",!0))},splitOptions:function(){if(this.containerOptions={},this.formOptions={},!r.fn[this.containerName])throw new Error(this.containerName+" not found. Have you included corresponding js file?");for(var t in this.options)t in this.defaults?this.containerOptions[t]=this.options[t]:this.formOptions[t]=this.options[t]},tip:function(){return this.container()?this.container().$tip:null},container:function(){var t;return t=this.containerDataName&&(t=this.$element.data(this.containerDataName))?t:this.$element.data(this.containerName)},call:function(){this.$element[this.containerName].apply(this.$element,arguments)},initContainer:function(){this.call(this.containerOptions)},renderForm:function(){this.$form.editableform(this.formOptions).on({save:r.proxy(this.save,this),nochange:r.proxy(function(){this.hide("nochange")},this),cancel:r.proxy(function(){this.hide("cancel")},this),show:r.proxy(function(){this.delayedHide?(this.hide(this.delayedHide.reason),this.delayedHide=!1):this.setPosition()},this),rendering:r.proxy(this.setPosition,this),resize:r.proxy(this.setPosition,this),rendered:r.proxy(function(){this.$element.triggerHandler("shown",r(this.options.scope).data("editable"))},this)}).editableform("render")},show:function(t){this.$element.addClass("editable-open"),!1!==t&&this.closeOthers(this.$element[0]),this.innerShow(),this.tip().addClass(this.containerClass),this.$form,this.$form=r("<div>"),(this.tip().is(this.innerCss)?this.tip():this.tip().find(this.innerCss)).append(this.$form),this.renderForm()},hide:function(t){this.tip()&&this.tip().is(":visible")&&this.$element.hasClass("editable-open")&&(this.$form.data("editableform").isSaving?this.delayedHide={reason:t}:(this.delayedHide=!1,this.$element.removeClass("editable-open"),this.innerHide(),this.$element.triggerHandler("hidden",t||"manual")))},innerShow:function(){},innerHide:function(){},toggle:function(t){this.container()&&this.tip()&&this.tip().is(":visible")?this.hide():this.show(t)},setPosition:function(){},save:function(t,e){this.$element.triggerHandler("save",e),this.hide("save")},option:function(t,e){this.options[t]=e,t in this.containerOptions?(this.containerOptions[t]=e,this.setContainerOption(t,e)):(this.formOptions[t]=e,this.$form&&this.$form.editableform("option",t,e))},setContainerOption:function(t,e){this.call("option",t,e)},destroy:function(){this.hide(),this.innerDestroy(),this.$element.off("destroyed"),this.$element.removeData("editableContainer")},innerDestroy:function(){},closeOthers:function(s){r(".editable-open").each(function(t,e){var i;e===s||r(e).find(s).length||(i=(e=r(e)).data("editableContainer"))&&("cancel"===i.options.onblur?e.data("editableContainer").hide("onblur"):"submit"===i.options.onblur&&e.data("editableContainer").tip().find("form").submit())})},activate:function(){this.tip&&this.tip().is(":visible")&&this.$form&&this.$form.data("editableform").input.activate()}},r.fn.editableContainer=function(a){var o=arguments;return this.each(function(){var t=r(this),e="editableContainer",i=t.data(e),s="object"==typeof a&&a,n="inline"===s.mode?h:l;i||t.data(e,i=new n(this,s)),"string"==typeof a&&i[a].apply(i,Array.prototype.slice.call(o,1))})},r.fn.editableContainer.Popup=l,r.fn.editableContainer.Inline=h,r.fn.editableContainer.defaults={value:null,placement:"top",autohide:!0,onblur:"cancel",anim:!1,mode:"popup"},jQuery.event.special.destroyed={remove:function(t){t.handler&&t.handler()}}})(window.jQuery),(t=>{t.extend(t.fn.editableContainer.Inline.prototype,t.fn.editableContainer.Popup.prototype,{containerName:"editableform",innerCss:".editable-inline",containerClass:"editable-container editable-inline",initContainer:function(){this.$tip=t("<span></span>"),this.options.anim||(this.options.anim=0)},splitOptions:function(){this.containerOptions={},this.formOptions=this.options},tip:function(){return this.$tip},innerShow:function(){this.$element.hide(),this.tip().insertAfter(this.$element).show()},innerHide:function(){this.$tip.hide(this.options.anim,t.proxy(function(){this.$element.show(),this.innerDestroy()},this))},innerDestroy:function(){this.tip()&&this.tip().empty().remove()}})})(window.jQuery),(p=>{function u(t,e){this.$element=p(t),this.options=p.extend({},p.fn.editable.defaults,e,p.fn.editableutils.getConfigData(this.$element)),this.options.selector?this.initLive():this.init(),this.options.highlight&&!p.fn.editableutils.supportsTransitions()&&(this.options.highlight=!1)}u.prototype={constructor:u,init:function(){var t,e=!1;if(this.options.name=this.options.name||this.$element.attr("id"),this.options.scope=this.$element[0],this.input=p.fn.editableutils.createInput(this.options),this.input){switch(null==this.options.value?(this.value=this.input.html2value(p.trim(this.$element.html())),e=!0):(this.options.value=p.fn.editableutils.tryParseJson(this.options.value,!0),"string"==typeof this.options.value?this.value=this.input.str2value(this.options.value):this.value=this.options.value),this.$element.addClass("editable"),"textarea"===this.input.type&&this.$element.addClass("editable-pre-wrapped"),"manual"!==this.options.toggle?(this.$element.addClass("editable-click"),this.$element.on(this.options.toggle+".editable",p.proxy(function(t){this.options.disabled||t.preventDefault(),"mouseenter"===this.options.toggle?this.show():(t="click"!==this.options.toggle,this.toggle(t))},this))):this.$element.attr("tabindex",-1),"function"==typeof this.options.display&&(this.options.autotext="always"),this.options.autotext){case"always":t=!0;break;case"auto":t=!p.trim(this.$element.text()).length&&null!=this.value&&!e;break;default:t=!1}p.when(!t||this.render()).then(p.proxy(function(){this.options.disabled?this.disable():this.enable(),this.$element.triggerHandler("init",this)},this))}},initLive:function(){var t=this.options.selector;this.options.selector=!1,this.options.autotext="never",this.$element.on(this.options.toggle+".editable",t,p.proxy(function(t){var e=p(t.target);e.data("editable")||(e.hasClass(this.options.emptyclass)&&e.empty(),e.editable(this.options).trigger(t))},this))},render:function(t){if(!1!==this.options.display)return this.input.value2htmlFinal?this.input.value2html(this.value,this.$element[0],this.options.display,t):"function"==typeof this.options.display?this.options.display.call(this.$element[0],this.value,t):this.input.value2html(this.value,this.$element[0])},enable:function(){this.options.disabled=!1,this.$element.removeClass("editable-disabled"),this.handleEmpty(this.isEmpty),"manual"!==this.options.toggle&&"-1"===this.$element.attr("tabindex")&&this.$element.removeAttr("tabindex")},disable:function(){this.options.disabled=!0,this.hide(),this.$element.addClass("editable-disabled"),this.handleEmpty(this.isEmpty),this.$element.attr("tabindex",-1)},toggleDisabled:function(){this.options.disabled?this.enable():this.disable()},option:function(t,e){if(t&&"object"==typeof t)p.each(t,p.proxy(function(t,e){this.option(p.trim(t),e)},this));else{if(this.options[t]=e,"disabled"===t)return e?this.disable():this.enable();"value"===t&&this.setValue(e),this.container&&this.container.option(t,e),this.input.option&&this.input.option(t,e)}},handleEmpty:function(t){!1!==this.options.display&&(void 0!==t?this.isEmpty=t:"function"==typeof this.input.isEmpty?this.isEmpty=this.input.isEmpty(this.$element):this.isEmpty=""===p.trim(this.$element.html()),this.options.disabled?this.isEmpty&&(this.$element.empty(),this.options.emptyclass)&&this.$element.removeClass(this.options.emptyclass):this.isEmpty?(this.$element.html(this.options.emptytext),this.options.emptyclass&&this.$element.addClass(this.options.emptyclass)):this.options.emptyclass&&this.$element.removeClass(this.options.emptyclass))},show:function(t){if(!this.options.disabled){if(this.container){if(this.container.tip().is(":visible"))return}else{var e=p.extend({},this.options,{value:this.value,input:this.input});this.$element.editableContainer(e),this.$element.on("save.internal",p.proxy(this.save,this)),this.container=this.$element.data("editableContainer")}this.container.show(t)}},hide:function(){this.container&&this.container.hide()},toggle:function(t){this.container&&this.container.tip().is(":visible")?this.hide():this.show(t)},save:function(t,e){var i,s;this.options.unsavedclass&&("function"==typeof this.options.url||!1===this.options.display||void 0!==e.response||this.options.savenochange&&this.input.value2str(this.value)!==this.input.value2str(e.newValue)?this.$element.removeClass(this.options.unsavedclass):this.$element.addClass(this.options.unsavedclass)),this.options.highlight&&(i=this.$element,s=i.css("background-color"),i.css("background-color",this.options.highlight),setTimeout(function(){"transparent"===s&&(s=""),i.css("background-color",s),i.addClass("editable-bg-transition"),setTimeout(function(){i.removeClass("editable-bg-transition")},1700)},10)),this.setValue(e.newValue,!1,e.response)},validate:function(){if("function"==typeof this.options.validate)return this.options.validate.call(this,this.value)},setValue:function(t,e,i){this.value=e?this.input.str2value(t):t,this.container&&this.container.option("value",this.value),p.when(this.render(i)).then(p.proxy(function(){this.handleEmpty()},this))},activate:function(){this.container&&this.container.activate()},destroy:function(){this.disable(),this.container&&this.container.destroy(),this.input.destroy(),"manual"!==this.options.toggle&&(this.$element.removeClass("editable-click"),this.$element.off(this.options.toggle+".editable")),this.$element.off("save.internal"),this.$element.removeClass("editable editable-open editable-disabled"),this.$element.removeData("editable")}},p.fn.editable=function(s){var i={},n=arguments,a="editable";switch(s){case"validate":return this.each(function(){var t,e=p(this).data(a);e&&(t=e.validate())&&(i[e.options.name]=t)}),i;case"getValue":return 2===arguments.length&&!0===arguments[1]?i=this.eq(0).data(a).value:this.each(function(){var t=p(this).data(a);t&&null!=t.value&&(i[t.options.name]=t.input.value2submit(t.value))}),i;case"submit":var t,e,o,r=arguments[1]||{},l=this,h=this.editable("validate");return p.isEmptyObject(h)?(o={},1===l.length?(e={name:(t=l.data("editable")).options.name||"",value:t.input.value2submit(t.value),pk:"function"==typeof t.options.pk?t.options.pk.call(t.options.scope):t.options.pk},"function"==typeof t.options.params?e=t.options.params.call(t.options.scope,e):(t.options.params=p.fn.editableutils.tryParseJson(t.options.params,!0),p.extend(e,t.options.params)),o={url:t.options.url,data:e,type:"POST"},r.success=r.success||t.options.success,r.error=r.error||t.options.error):(e=this.editable("getValue"),o={url:r.url,data:e,type:"POST"}),o.success="function"==typeof r.success?function(t){r.success.call(l,t,r)}:p.noop,o.error="function"==typeof r.error?function(){r.error.apply(l,arguments)}:p.noop,r.ajaxOptions&&p.extend(o,r.ajaxOptions),r.data&&p.extend(o.data,r.data),p.ajax(o)):"function"==typeof r.error&&r.error.call(l,h),this}return this.each(function(){var t=p(this),e=t.data(a),i="object"==typeof s&&s;i&&i.selector?e=new u(this,i):(e||t.data(a,e=new u(this,i)),"string"==typeof s&&e[s].apply(e,Array.prototype.slice.call(n,1)))})},p.fn.editable.defaults={type:"text",disabled:!1,toggle:"click",emptytext:"Empty",autotext:"auto",value:null,display:null,emptyclass:"editable-empty",unsavedclass:"editable-unsaved",selector:null,highlight:"#FFFF80"}})(window.jQuery),(s=>{function t(){}s.fn.editabletypes={},t.prototype={init:function(t,e,i){this.type=t,this.options=s.extend({},i,e)},prerender:function(){this.$tpl=s(this.options.tpl),this.$input=this.$tpl,this.$clear=null,this.error=null},render:function(){},value2html:function(t,e){s(e)[this.options.escape?"text":"html"](s.trim(t))},html2value:function(t){return s("<div>").html(t).text()},value2str:function(t){return t},str2value:function(t){return t},value2submit:function(t){return t},value2input:function(t){this.$input.val(t)},input2value:function(){return this.$input.val()},activate:function(){this.$input.is(":visible")&&this.$input.focus()},clear:function(){this.$input.val(null)},escape:function(t){return s("<div>").text(t).html()},autosubmit:function(){},destroy:function(){},setClass:function(){this.options.inputclass&&this.$input.addClass(this.options.inputclass)},setAttr:function(t){null!=this.options[t]&&this.$input.attr(t,this.options[t])},option:function(t,e){this.options[t]=e}},t.defaults={tpl:"",inputclass:null,escape:!0,scope:null,showbuttons:!0},s.extend(s.fn.editabletypes,{abstractinput:t})})(window.jQuery),(r=>{function t(t){}r.fn.editableutils.inherit(t,r.fn.editabletypes.abstractinput),r.extend(t.prototype,{render:function(){var t=r.Deferred();return this.error=null,this.onSourceReady(function(){this.renderList(),t.resolve()},function(){this.error=this.options.sourceError,t.resolve()}),t.promise()},html2value:function(t){return null},value2html:function(t,e,i,s){function n(){"function"==typeof i?i.call(e,t,this.sourceData,s):this.value2htmlFinal(t,e),a.resolve()}var a=r.Deferred();return null===t?n.call(this):this.onSourceReady(n,function(){a.resolve()}),a.promise()},onSourceReady:function(e,i){var t;if("function"==typeof this.options.source?(t=this.options.source.call(this.options.scope),this.sourceData=null):t=this.options.source,this.options.sourceCache&&Array.isArray(this.sourceData))e.call(this);else{try{t=r.fn.editableutils.tryParseJson(t,!1)}catch(t){return void i.call(this)}if("string"==typeof t){if(this.options.sourceCache){var s,n=t;if(r(document).data(n)||r(document).data(n,{}),!1===(s=r(document).data(n)).loading&&s.sourceData)return this.sourceData=s.sourceData,this.doPrepend(),void e.call(this);if(!0===s.loading)return s.callbacks.push(r.proxy(function(){this.sourceData=s.sourceData,this.doPrepend(),e.call(this)},this)),void s.err_callbacks.push(r.proxy(i,this));s.loading=!0,s.callbacks=[],s.err_callbacks=[]}n=r.extend({url:t,type:"get",cache:!1,dataType:"json",success:r.proxy(function(t){s&&(s.loading=!1),this.sourceData=this.makeArray(t),Array.isArray(this.sourceData)?(s&&(s.sourceData=this.sourceData,r.each(s.callbacks,function(){this.call()})),this.doPrepend(),e.call(this)):(i.call(this),s&&r.each(s.err_callbacks,function(){this.call()}))},this),error:r.proxy(function(){i.call(this),s&&(s.loading=!1,r.each(s.err_callbacks,function(){this.call()}))},this)},this.options.sourceOptions);r.ajax(n)}else this.sourceData=this.makeArray(t),(Array.isArray(this.sourceData)?(this.doPrepend(),e):i).call(this)}},doPrepend:function(){null!=this.options.prepend&&(Array.isArray(this.prependData)||("function"==typeof this.options.prepend&&(this.options.prepend=this.options.prepend.call(this.options.scope)),this.options.prepend=r.fn.editableutils.tryParseJson(this.options.prepend,!0),"string"==typeof this.options.prepend&&(this.options.prepend={"":this.options.prepend}),this.prependData=this.makeArray(this.options.prepend)),Array.isArray(this.prependData))&&Array.isArray(this.sourceData)&&(this.sourceData=this.prependData.concat(this.sourceData))},renderList:function(){},value2htmlFinal:function(t,e){},makeArray:function(t){var i,s,e,n=[];if(!t||"string"==typeof t)return null;if(Array.isArray(t))for(var a=function(t,e){if(s={value:t,text:e},2<=i++)return!1},o=0;o<t.length;o++)"object"==typeof(e=t[o])?(i=0,r.each(e,a),1===i?n.push(s):1<i&&(e.children&&(e.children=this.makeArray(e.children)),n.push(e))):n.push({value:e,text:e});else r.each(t,function(t,e){n.push({value:t,text:e})});return n},option:function(t,e){this.options[t]=e,"source"===t&&(this.sourceData=null),"prepend"===t&&(this.prependData=null)}}),t.defaults=r.extend({},r.fn.editabletypes.abstractinput.defaults,{source:null,prepend:!1,sourceError:"Error when loading list",sourceCache:!0,sourceOptions:null}),r.fn.editabletypes.list=t})(window.jQuery),(i=>{function e(t){this.init("text",t,e.defaults)}i.fn.editableutils.inherit(e,i.fn.editabletypes.abstractinput),i.extend(e.prototype,{render:function(){this.renderClear(),this.setClass(),this.setAttr("placeholder")},activate:function(){this.$input.is(":visible")&&(this.$input.focus(),i.fn.editableutils.setCursorPosition(this.$input.get(0),this.$input.val().length),this.toggleClear)&&this.toggleClear()},renderClear:function(){this.options.clear&&(this.$clear=i('<span class="editable-clear-x"></span>'),this.$input.after(this.$clear).css("padding-right",24).keyup(i.proxy(function(t){var e;~i.inArray(t.keyCode,[40,38,9,13,27])||(clearTimeout(this.t),(e=this).t=setTimeout(function(){e.toggleClear(t)},100))},this)).parent().css("position","relative"),this.$clear.click(i.proxy(this.clear,this)))},postrender:function(){},toggleClear:function(t){var e,i;this.$clear&&(e=this.$input.val().length,i=this.$clear.is(":visible"),e&&!i&&this.$clear.show(),!e)&&i&&this.$clear.hide()},clear:function(){this.$clear.hide(),this.$input.val("").focus()}}),e.defaults=i.extend({},i.fn.editabletypes.abstractinput.defaults,{tpl:'<input type="text">',placeholder:null,clear:!0}),i.fn.editabletypes.text=e})(window.jQuery),(e=>{function i(t){this.init("textarea",t,i.defaults)}e.fn.editableutils.inherit(i,e.fn.editabletypes.abstractinput),e.extend(i.prototype,{render:function(){this.setClass(),this.setAttr("placeholder"),this.setAttr("rows"),this.$input.keydown(function(t){t.ctrlKey&&13===t.which&&e(this).closest("form").submit()})},activate:function(){e.fn.editabletypes.text.prototype.activate.call(this)}}),i.defaults=e.extend({},e.fn.editabletypes.abstractinput.defaults,{tpl:"<textarea></textarea>",inputclass:"input-large",placeholder:null,rows:7}),e.fn.editabletypes.textarea=i})(window.jQuery),(a=>{function e(t){this.init("select",t,e.defaults)}a.fn.editableutils.inherit(e,a.fn.editabletypes.list),a.extend(e.prototype,{renderList:function(){this.$input.empty();var n=function(t,e){var i;if(Array.isArray(e))for(var s=0;s<e.length;s++)i={},e[s].children?(i.label=e[s].text,t.append(n(a("<optgroup>",i),e[s].children))):(i.value=e[s].value,e[s].disabled&&(i.disabled=!0),t.append(a("<option>",i).text(e[s].text)));return t};n(this.$input,this.sourceData),this.setClass(),this.$input.on("keydown.editable",function(t){13===t.which&&a(this).closest("form").submit()})},value2htmlFinal:function(t,e){var i="",t=a.fn.editableutils.itemsByValue(t,this.sourceData);t.length&&(i=t[0].text),a.fn.editabletypes.abstractinput.prototype.value2html.call(this,i,e)},autosubmit:function(){this.$input.off("keydown.editable").on("change.editable",function(){a(this).closest("form").submit()})}}),e.defaults=a.extend({},a.fn.editabletypes.list.defaults,{tpl:"<select></select>"}),a.fn.editabletypes.select=e})(window.jQuery),(n=>{function e(t){this.init("checklist",t,e.defaults)}n.fn.editableutils.inherit(e,n.fn.editabletypes.list),n.extend(e.prototype,{renderList:function(){var t;if(this.$tpl.empty(),Array.isArray(this.sourceData)){for(var e=0;e<this.sourceData.length;e++)t=n("<label>").append(n("<input>",{type:"checkbox",value:this.sourceData[e].value})).append(n("<span>").text(" "+this.sourceData[e].text)),n("<div>").append(t).appendTo(this.$tpl);this.$input=this.$tpl.find('input[type="checkbox"]'),this.setClass()}},value2str:function(t){return Array.isArray(t)?t.sort().join(this.options.separator.trim()):""},str2value:function(t){var e;return"string"==typeof t&&t.length?(e=new RegExp("\\s*"+n.trim(this.options.separator)+"\\s*"),t.split(e)):Array.isArray(t)?t:[t]},value2input:function(s){this.$input.prop("checked",!1),Array.isArray(s)&&s.length&&this.$input.each(function(t,e){var i=n(e);n.each(s,function(t,e){i.val()==e&&i.prop("checked",!0)})})},input2value:function(){var i=[];return this.$input.filter(":checked").each(function(t,e){i.push(n(e).val())}),i},value2htmlFinal:function(t,e){var i=[],t=n.fn.editableutils.itemsByValue(t,this.sourceData),s=this.options.escape;t.length?(n.each(t,function(t,e){e=s?n.fn.editableutils.escape(e.text):e.text;i.push(e)}),n(e).html(i.join("<br>"))):n(e).empty()},activate:function(){this.$input.first().focus()},autosubmit:function(){this.$input.on("keydown",function(t){13===t.which&&n(this).closest("form").submit()})}}),e.defaults=n.extend({},n.fn.editabletypes.list.defaults,{tpl:'<div class="editable-checklist"></div>',inputclass:null,separator:","}),n.fn.editabletypes.checklist=e})(window.jQuery),(i=>{function e(t){this.init("password",t,e.defaults)}i.fn.editableutils.inherit(e,i.fn.editabletypes.text),i.extend(e.prototype,{value2html:function(t,e){t?i(e).text("[hidden]"):i(e).empty()},html2value:function(t){return null}}),e.defaults=i.extend({},i.fn.editabletypes.text.defaults,{tpl:'<input type="password">'}),i.fn.editabletypes.password=e})(window.jQuery),(t=>{function e(t){this.init("email",t,e.defaults)}t.fn.editableutils.inherit(e,t.fn.editabletypes.text),e.defaults=t.extend({},t.fn.editabletypes.text.defaults,{tpl:'<input type="email">'}),t.fn.editabletypes.email=e})(window.jQuery),(t=>{function e(t){this.init("url",t,e.defaults)}t.fn.editableutils.inherit(e,t.fn.editabletypes.text),e.defaults=t.extend({},t.fn.editabletypes.text.defaults,{tpl:'<input type="url">'}),t.fn.editabletypes.url=e})(window.jQuery),(t=>{function e(t){this.init("tel",t,e.defaults)}t.fn.editableutils.inherit(e,t.fn.editabletypes.text),e.defaults=t.extend({},t.fn.editabletypes.text.defaults,{tpl:'<input type="tel">'}),t.fn.editabletypes.tel=e})(window.jQuery),(t=>{function e(t){this.init("number",t,e.defaults)}t.fn.editableutils.inherit(e,t.fn.editabletypes.text),t.extend(e.prototype,{render:function(){e.superclass.render.call(this),this.setAttr("min"),this.setAttr("max"),this.setAttr("step")},postrender:function(){this.$clear&&this.$clear.css({right:24})}}),e.defaults=t.extend({},t.fn.editabletypes.text.defaults,{tpl:'<input type="number">',inputclass:"input-mini",min:null,max:null,step:null}),t.fn.editabletypes.number=e})(window.jQuery),(t=>{function e(t){this.init("range",t,e.defaults)}t.fn.editableutils.inherit(e,t.fn.editabletypes.number),t.extend(e.prototype,{render:function(){this.$input=this.$tpl.filter("input"),this.setClass(),this.setAttr("min"),this.setAttr("max"),this.setAttr("step"),this.$input.on("input",function(){t(this).siblings("output").text(t(this).val())})},activate:function(){this.$input.focus()}}),e.defaults=t.extend({},t.fn.editabletypes.number.defaults,{tpl:'<input type="range"><output style="width: 30px; display: inline-block"></output>',inputclass:"input-medium"}),t.fn.editabletypes.range=e})(window.jQuery),(t=>{function e(t){this.init("time",t,e.defaults)}t.fn.editableutils.inherit(e,t.fn.editabletypes.abstractinput),t.extend(e.prototype,{render:function(){this.setClass()}}),e.defaults=t.extend({},t.fn.editabletypes.abstractinput.defaults,{tpl:'<input type="time">'}),t.fn.editabletypes.time=e})(window.jQuery),(a=>{function o(t){var e,i;this.init("select2",t,o.defaults),t.select2=t.select2||{},this.sourceData=null,t.placeholder&&(t.select2.placeholder=t.placeholder),!t.select2.tags&&t.source&&(e=t.source,"string"==typeof(e="function"==typeof t.source?t.source.call(t.scope):e)?(t.select2.ajax=t.select2.ajax||{},t.select2.ajax.data||(t.select2.ajax.data=function(t){return{query:t}}),t.select2.ajax.results||(t.select2.ajax.results=function(t){return{results:t}}),t.select2.ajax.url=e):(this.sourceData=this.convertSource(e),t.select2.data=this.sourceData)),this.options.select2=a.extend({},o.defaults.select2,t.select2),this.isMultiple=this.options.select2.tags||this.options.select2.multiple,this.isRemote="ajax"in this.options.select2,this.idFunc=this.options.select2.id,"function"!=typeof this.idFunc&&(i=this.idFunc||"id",this.idFunc=function(t){return t[i]}),this.formatSelection=this.options.select2.formatSelection,"function"!=typeof this.formatSelection&&(this.formatSelection=function(t){return t.text})}a.fn.editableutils.inherit(o,a.fn.editabletypes.abstractinput),a.extend(o.prototype,{render:function(){this.setClass(),this.isRemote&&this.$input.on("select2-loaded",a.proxy(function(t){this.sourceData=t.items.results},this)),this.isMultiple&&this.$input.on("change",function(){a(this).closest("form").parent().triggerHandler("resize")})},value2html:function(t,e){var i,s="",n=this;this.options.select2.tags?i=t:this.sourceData&&(i=a.fn.editableutils.itemsByValue(t,this.sourceData,this.idFunc)),Array.isArray(i)?(s=[],a.each(i,function(t,e){s.push(e&&"object"==typeof e?n.formatSelection(e):e)})):i&&(s=n.formatSelection(i)),s=Array.isArray(s)?s.join(this.options.viewseparator):s,o.superclass.value2html.call(this,s,e)},html2value:function(t){return this.options.select2.tags?this.str2value(t,this.options.viewseparator):null},value2input:function(t){var e,i;Array.isArray(t)&&(t=t.join(this.getSeparator())),this.$input.data("select2")?this.$input.val(t).trigger("change",!0):(this.$input.val(t),this.$input.select2(this.options.select2)),!this.isRemote||this.isMultiple||this.options.select2.initSelection||(e=this.options.select2.id,i=this.options.select2.formatSelection,e)||i||(e=a(this.options.scope)).data("editable").isEmpty||(i={id:t,text:e.text()},this.$input.select2("data",i))},input2value:function(){return this.$input.select2("val")},str2value:function(t,e){if("string"!=typeof t||!this.isMultiple)return t;var i,s,n;if(e=e||this.getSeparator(),null===t||t.length<1)return null;for(s=0,n=(i=t.split(e)).length;s<n;s+=1)i[s]=a.trim(i[s]);return i},autosubmit:function(){this.$input.on("change",function(t,e){e||a(this).closest("form").submit()})},getSeparator:function(){return this.options.select2.separator||a.fn.select2.defaults.separator},convertSource:function(t){if(Array.isArray(t)&&t.length&&void 0!==t[0].value)for(var e=0;e<t.length;e++)void 0!==t[e].value&&(t[e].id=t[e].value,delete t[e].value);return t},destroy:function(){this.$input&&this.$input.data("select2")&&this.$input.select2("destroy")}}),o.defaults=a.extend({},a.fn.editabletypes.abstractinput.defaults,{tpl:'<input type="hidden">',select2:null,placeholder:null,source:null,viewseparator:", "}),a.fn.editabletypes.select2=o})(window.jQuery),(o=>{function n(t,e){this.$element=o(t),this.$element.is("input")?(this.options=o.extend({},o.fn.combodate.defaults,e,this.$element.data()),this.init()):o.error("Combodate should be applied to INPUT element")}n.prototype={constructor:n,init:function(){this.map={day:["D","date"],month:["M","month"],year:["Y","year"],hour:["[Hh]","hours"],minute:["m","minutes"],second:["s","seconds"],ampm:["[Aa]",""]},this.$widget=o('<span class="combodate"></span>').html(this.getTemplate()),this.initCombos(),this.$widget.on("change","select",o.proxy(function(t){this.$element.val(this.getValue()).change(),this.options.smartDays&&(o(t.target).is(".month")||o(t.target).is(".year"))&&this.fillCombo("day")},this)),this.$widget.find("select").css("width","auto"),this.$element.hide().after(this.$widget),this.setValue(this.$element.val()||this.options.value)},getTemplate:function(){var s=this.options.template;return o.each(this.map,function(t,e){e=e[0];var i=new RegExp(e+"+"),e=1<e.length?e.substring(1,2):e;s=s.replace(i,"{"+e+"}")}),s=s.replace(/ /g,"&nbsp;"),o.each(this.map,function(t,e){e=1<(e=e[0]).length?e.substring(1,2):e;s=s.replace("{"+e+"}",'<select class="'+t+'"></select>')}),s},initCombos:function(){for(var t in this.map){var e=this.$widget.find("."+t);this["$"+t]=e.length?e:null,this.fillCombo(t)}},fillCombo:function(t){var e=this["$"+t];if(e){var i=this["fill"+t.charAt(0).toUpperCase()+t.slice(1)](),t=e.val();e.empty();for(var s=0;s<i.length;s++)e.append('<option value="'+i[s][0]+'">'+i[s][1]+"</option>");e.val(t)}},fillCommon:function(t){var e,i=[];return"name"===this.options.firstItem?(e=(e="function"==typeof(e=moment.relativeTime||moment.langData()._relativeTime)[t]?e[t](1,!0,t,!1):e[t]).split(" ").reverse()[0],i.push(["",e])):"empty"===this.options.firstItem&&i.push(["",""]),i},fillDay:function(){var t,e,i,s,n=this.fillCommon("d"),a=-1!==this.options.template.indexOf("DD"),o=31;for(this.options.smartDays&&this.$month&&this.$year&&(i=parseInt(this.$month.val(),10),s=parseInt(this.$year.val(),10),isNaN(i)||isNaN(s)||(o=moment([s,i]).daysInMonth())),e=1;e<=o;e++)t=a?this.leadZero(e):e,n.push([e,t]);return n},fillMonth:function(){for(var t,e=this.fillCommon("M"),i=-1!==this.options.template.indexOf("MMMM"),s=-1!==this.options.template.indexOf("MMM"),n=-1!==this.options.template.indexOf("MM"),a=0;a<=11;a++)t=i?moment().date(1).month(a).format("MMMM"):s?moment().date(1).month(a).format("MMM"):n?this.leadZero(a+1):a+1,e.push([a,t]);return e},fillYear:function(){for(var t,e=[],i=-1!==this.options.template.indexOf("YYYY"),s=this.options.maxYear;s>=this.options.minYear;s--)t=i?s:(s+"").substring(2),e[this.options.yearDescending?"push":"unshift"]([s,t]);return e=this.fillCommon("y").concat(e)},fillHour:function(){for(var t,e=this.fillCommon("h"),i=-1!==this.options.template.indexOf("h"),s=(this.options.template.indexOf("H"),-1!==this.options.template.toLowerCase().indexOf("hh")),n=i?12:23,a=i?1:0;a<=n;a++)t=s?this.leadZero(a):a,e.push([a,t]);return e},fillMinute:function(){for(var t,e=this.fillCommon("m"),i=-1!==this.options.template.indexOf("mm"),s=0;s<=59;s+=this.options.minuteStep)t=i?this.leadZero(s):s,e.push([s,t]);return e},fillSecond:function(){for(var t,e=this.fillCommon("s"),i=-1!==this.options.template.indexOf("ss"),s=0;s<=59;s+=this.options.secondStep)t=i?this.leadZero(s):s,e.push([s,t]);return e},fillAmpm:function(){var t=-1!==this.options.template.indexOf("a");this.options.template.indexOf("A");return[["am",t?"am":"AM"],["pm",t?"pm":"PM"]]},getValue:function(t){var e,s={},n=this,a=!1;return o.each(this.map,function(t,e){var i;if("ampm"!==t)return i="day"===t?1:0,s[t]=n["$"+t]?parseInt(n["$"+t].val(),10):i,isNaN(s[t])?!(a=!0):void 0}),a?"":(this.$ampm&&(s.hour=12===s.hour?"am"===this.$ampm.val()?0:12:"am"===this.$ampm.val()?s.hour:s.hour+12),e=moment([s.year,s.month,s.day,s.hour,s.minute,s.second]),this.highlight(e),null===(t=void 0===t?this.options.format:t)?e.isValid()?e:null:e.isValid()?e.format(t):"")},setValue:function(t){var i,s,n;function a(t,s){var n={};return t.children("option").each(function(t,e){var i,e=o(e).attr("value");""!==e&&(i=Math.abs(e-s),void 0===n.distance||i<n.distance)&&(n={value:e,distance:i})}),n.value}t&&(i="string"==typeof t?moment(t,this.options.format):moment(t),s=this,n={},i.isValid())&&(o.each(this.map,function(t,e){"ampm"!==t&&(n[t]=i[e[1]]())}),this.$ampm&&(12<=n.hour?(n.ampm="pm",12<n.hour&&(n.hour-=12)):(n.ampm="am",0===n.hour&&(n.hour=12))),o.each(n,function(t,e){s["$"+t]&&("minute"===t&&1<s.options.minuteStep&&s.options.roundTime&&(e=a(s["$"+t],e)),"second"===t&&1<s.options.secondStep&&s.options.roundTime&&(e=a(s["$"+t],e)),s["$"+t].val(e))}),this.options.smartDays&&this.fillCombo("day"),this.$element.val(i.format(this.options.format)).change())},highlight:function(t){t.isValid()?this.options.errorClass?this.$widget.removeClass(this.options.errorClass):this.$widget.find("select").css("border-color",this.borderColor):this.options.errorClass?this.$widget.addClass(this.options.errorClass):(this.borderColor||(this.borderColor=this.$widget.find("select").css("border-color")),this.$widget.find("select").css("border-color","red"))},leadZero:function(t){return t<=9?"0"+t:t},destroy:function(){this.$widget.remove(),this.$element.removeData("combodate").show()}},o.fn.combodate=function(i){var t,s=Array.apply(null,arguments);return s.shift(),"getValue"===i&&this.length&&(t=this.eq(0).data("combodate"))?t.getValue.apply(t,s):this.each(function(){var t=o(this),e=t.data("combodate");e||t.data("combodate",e=new n(this,"object"==typeof i&&i)),"string"==typeof i&&"function"==typeof e[i]&&e[i].apply(e,s)})},o.fn.combodate.defaults={format:"DD-MM-YYYY HH:mm",template:"D / MMM / YYYY   H : mm",value:null,minYear:1970,maxYear:(new Date).getFullYear(),yearDescending:!0,minuteStep:5,secondStep:1,firstItem:"empty",errorClass:null,roundTime:!0,smartDays:!1}})(window.jQuery),(e=>{function i(t){this.init("combodate",t,i.defaults),this.options.viewformat||(this.options.viewformat=this.options.format),t.combodate=e.fn.editableutils.tryParseJson(t.combodate,!0),this.options.combodate=e.extend({},i.defaults.combodate,t.combodate,{format:this.options.format,template:this.options.template})}e.fn.editableutils.inherit(i,e.fn.editabletypes.abstractinput),e.extend(i.prototype,{render:function(){this.$input.combodate(this.options.combodate),"bs3"===e.fn.editableform.engine&&this.$input.siblings().find("select").addClass("form-control"),this.options.inputclass&&this.$input.siblings().find("select").addClass(this.options.inputclass)},value2html:function(t,e){t=t?t.format(this.options.viewformat):"";i.superclass.value2html.call(this,t,e)},html2value:function(t){return t?moment(t,this.options.viewformat):null},value2str:function(t){return t?t.format(this.options.format):""},str2value:function(t){return t?moment(t,this.options.format):null},value2submit:function(t){return this.value2str(t)},value2input:function(t){this.$input.combodate("setValue",t)},input2value:function(){return this.$input.combodate("getValue",null)},activate:function(){this.$input.siblings(".combodate").find("select").eq(0).focus()},autosubmit:function(){}}),i.defaults=e.extend({},e.fn.editabletypes.abstractinput.defaults,{tpl:'<input type="text">',inputclass:null,format:"YYYY-MM-DD",viewformat:null,template:"D / MMM / YYYY",combodate:null}),e.fn.editabletypes.combodate=i})(window.jQuery),(o=>{var r=o.fn.editableform.Constructor.prototype.initInput;o.extend(o.fn.editableform.Constructor.prototype,{initTemplate:function(){this.$form=o(o.fn.editableform.template),this.$form.find(".control-group").addClass("form-group"),this.$form.find(".editable-error-block").addClass("help-block")},initInput:function(){r.apply(this);for(var t=null===this.input.options.inputclass||!1===this.input.options.inputclass,e="input-sm",i="text,select,textarea,password,email,url,tel,number,range,time,typeaheadjs".split(","),s=(~o.inArray(this.input.type,i)&&(this.input.$input.addClass("form-control"),t)&&(this.input.options.inputclass=e,this.input.$input.addClass(e)),this.$form.find(".editable-buttons")),n=t?[e]:this.input.options.inputclass.split(" "),a=0;a<n.length;a++)"input-lg"===n[a].toLowerCase()&&s.find("button").removeClass("btn-sm").addClass("btn-lg")}}),o.fn.editableform.buttons='<button type="submit" class="btn btn-primary btn-sm editable-submit"><i class="glyphicon glyphicon-ok"></i></button><button type="button" class="btn btn-default btn-sm editable-cancel"><i class="glyphicon glyphicon-remove"></i></button>',o.fn.editableform.errorGroupClass="has-error",o.fn.editableform.errorBlockClass=null,o.fn.editableform.engine="bs3"})(window.jQuery),(e=>{e.extend(e.fn.editableContainer.Popup.prototype,{containerName:"popover",containerDataName:"bs.popover",innerCss:".popover-content",defaults:e.fn.popover.Constructor.DEFAULTS,initContainer:function(){var t;e.extend(this.containerOptions,{trigger:"manual",selector:!1,content:" ",template:this.defaults.template}),this.$element.data("template")&&(t=this.$element.data("template"),this.$element.removeData("template")),this.call(this.containerOptions),t&&this.$element.data("template",t)},innerShow:function(){this.call("show")},innerHide:function(){this.call("hide")},innerDestroy:function(){this.call("destroy")},setContainerOption:function(t,e){this.container().options[t]=e},setPosition:function(){!function(){var t,e,i,s=this.tip(),n="function"==typeof this.options.placement?this.options.placement.call(this,s[0],this.$element[0]):this.options.placement,a=/\s?auto?\s?/i,o=a.test(n),a=(o&&(n=n.replace(a,"")||"top"),this.getPosition()),r=s[0].offsetWidth,l=s[0].offsetHeight,h=(o&&(o=this.$element.parent(),t=n,e=document.documentElement.scrollTop||document.body.scrollTop,i="body"==this.options.container?window.innerWidth:o.outerWidth(),h="body"==this.options.container?window.innerHeight:o.outerHeight(),o="body"==this.options.container?0:o.offset().left,n="bottom"==n&&a.top+a.height+l-e>h?"top":"top"==n&&a.top-e-l<0?"bottom":"right"==n&&a.right+r>i?"left":"left"==n&&a.left-r<o?"right":n,s.removeClass(t).addClass(n)),this.getCalculatedOffset(n,a,r,l));this.applyPlacement(h,n)}.call(this.container())}})})(window.jQuery),(y=>{function v(){return new Date(Date.UTC.apply(Date,arguments))}function b(t,e){this._process_options(e),this.element=y(t),this.isInline=!1,this.isInput=this.element.is("input"),this.component=!!this.element.is(".date")&&this.element.find(".add-on, .btn"),this.hasInput=this.component&&this.element.find("input").length,this.component&&0===this.component.length&&(this.component=!1),this.picker=y(w.template),this._buildEvents(),this._attachEvents(),this.isInline?this.picker.addClass("datepicker-inline").appendTo(this.element):this.picker.addClass("datepicker-dropdown dropdown-menu"),this.o.rtl&&(this.picker.addClass("datepicker-rtl"),this.picker.find(".prev i, .next i").toggleClass("icon-arrow-left icon-arrow-right")),this.viewMode=this.o.startView,this.o.calendarWeeks&&this.picker.find("tfoot th.today").attr("colspan",function(t,e){return parseInt(e)+1}),this._allow_update=!1,this.setStartDate(this.o.startDate),this.setEndDate(this.o.endDate),this.setDaysOfWeekDisabled(this.o.daysOfWeekDisabled),this.fillDow(),this.fillMonths(),this._allow_update=!0,this.update(),this.showMode(),this.isInline&&this.show()}function l(t,e){this.element=y(t),this.inputs=y.map(e.inputs,function(t){return t.jquery?t[0]:t}),delete e.inputs,y(this.inputs).datepicker(e).bind("changeDate",y.proxy(this.dateUpdated,this)),this.pickers=y.map(this.inputs,function(t){return y(t).data("datepicker")}),this.updateDates()}b.prototype={constructor:b,_process_options:function(t){this._o=y.extend({},this._o,t);var e=this.o=y.extend({},this._o),t=e.language;switch(g[t]||(t=t.split("-")[0],g[t])||(t=h.language),e.language=t,e.startView){case 2:case"decade":e.startView=2;break;case 1:case"year":e.startView=1;break;default:e.startView=0}switch(e.minViewMode){case 1:case"months":e.minViewMode=1;break;case 2:case"years":e.minViewMode=2;break;default:e.minViewMode=0}e.startView=Math.max(e.startView,e.minViewMode),e.weekStart%=7,e.weekEnd=(e.weekStart+6)%7;t=w.parseFormat(e.format);e.startDate!==-1/0&&(e.startDate=w.parseDate(e.startDate,t,e.language)),e.endDate!==1/0&&(e.endDate=w.parseDate(e.endDate,t,e.language)),e.daysOfWeekDisabled=e.daysOfWeekDisabled||[],Array.isArray(e.daysOfWeekDisabled)||(e.daysOfWeekDisabled=e.daysOfWeekDisabled.split(/[,\s]*/)),e.daysOfWeekDisabled=y.map(e.daysOfWeekDisabled,function(t){return parseInt(t,10)})},_events:[],_secondaryEvents:[],_applyEvents:function(t){for(var e,i,s=0;s<t.length;s++)e=t[s][0],i=t[s][1],e.on(i)},_unapplyEvents:function(t){for(var e,i,s=0;s<t.length;s++)e=t[s][0],i=t[s][1],e.off(i)},_buildEvents:function(){this.isInput?this._events=[[this.element,{focus:y.proxy(this.show,this),keyup:y.proxy(this.update,this),keydown:y.proxy(this.keydown,this)}]]:this.component&&this.hasInput?this._events=[[this.element.find("input"),{focus:y.proxy(this.show,this),keyup:y.proxy(this.update,this),keydown:y.proxy(this.keydown,this)}],[this.component,{click:y.proxy(this.show,this)}]]:this.element.is("div")?this.isInline=!0:this._events=[[this.element,{click:y.proxy(this.show,this)}]],this._secondaryEvents=[[this.picker,{click:y.proxy(this.click,this)}],[y(window),{resize:y.proxy(this.place,this)}],[y(document),{mousedown:y.proxy(function(t){this.element.is(t.target)||this.element.find(t.target).size()||this.picker.is(t.target)||this.picker.find(t.target).size()||this.hide()},this)}]]},_attachEvents:function(){this._detachEvents(),this._applyEvents(this._events)},_detachEvents:function(){this._unapplyEvents(this._events)},_attachSecondaryEvents:function(){this._detachSecondaryEvents(),this._applyEvents(this._secondaryEvents)},_detachSecondaryEvents:function(){this._unapplyEvents(this._secondaryEvents)},_trigger:function(t,e){var i=e||this.date,e=new Date(i.getTime()+6e4*i.getTimezoneOffset());this.element.trigger({type:t,date:e,format:y.proxy(function(t){t=t||this.o.format;return w.formatDate(i,t,this.o.language)},this)})},show:function(t){this.isInline||this.picker.appendTo("body"),this.picker.show(),this.height=(this.component||this.element).outerHeight(),this.place(),this._attachSecondaryEvents(),t&&t.preventDefault(),this._trigger("show")},hide:function(t){this.isInline||this.picker.is(":visible")&&(this.picker.hide().detach(),this._detachSecondaryEvents(),this.viewMode=this.o.startView,this.showMode(),this.o.forceParse&&(this.isInput&&this.element.val()||this.hasInput&&this.element.find("input").val())&&this.setValue(),this._trigger("hide"))},remove:function(){this.hide(),this._detachEvents(),this._detachSecondaryEvents(),this.picker.remove(),delete this.element.data().datepicker,this.isInput||delete this.element.data().date},getDate:function(){var t=this.getUTCDate();return new Date(t.getTime()+6e4*t.getTimezoneOffset())},getUTCDate:function(){return this.date},setDate:function(t){this.setUTCDate(new Date(t.getTime()-6e4*t.getTimezoneOffset()))},setUTCDate:function(t){this.date=t,this.setValue()},setValue:function(){var t=this.getFormattedDate();this.isInput?this.element.val(t):this.component&&this.element.find("input").val(t)},getFormattedDate:function(t){return void 0===t&&(t=this.o.format),w.formatDate(this.date,t,this.o.language)},setStartDate:function(t){this._process_options({startDate:t}),this.update(),this.updateNavArrows()},setEndDate:function(t){this._process_options({endDate:t}),this.update(),this.updateNavArrows()},setDaysOfWeekDisabled:function(t){this._process_options({daysOfWeekDisabled:t}),this.update(),this.updateNavArrows()},place:function(){var t,e,i;this.isInline||(t=parseInt(this.element.parents().filter(function(){return"auto"!=y(this).css("z-index")}).first().css("z-index"))+10,e=(this.component?this.component.parent():this.element).offset(),i=(this.component||this.element).outerHeight(!0),this.picker.css({top:e.top+i,left:e.left,zIndex:t}))},_allow_update:!0,update:function(){var t,e;this._allow_update&&(e=!1,arguments&&arguments.length&&("string"==typeof arguments[0]||arguments[0]instanceof Date)?(t=arguments[0],e=!0):(t=this.isInput?this.element.val():this.element.data("date")||this.element.find("input").val(),delete this.element.data().date),this.date=w.parseDate(t,this.o.format,this.o.language),e&&this.setValue(),this.date<this.o.startDate?this.viewDate=new Date(this.o.startDate):this.date>this.o.endDate?this.viewDate=new Date(this.o.endDate):this.viewDate=new Date(this.date),this.fill())},fillDow:function(){var t,e=this.o.weekStart,i="<tr>";for(this.o.calendarWeeks&&(i+=t='<th class="cw">&nbsp;</th>',this.picker.find(".datepicker-days thead tr:first-child").prepend(t));e<this.o.weekStart+7;)i+='<th class="dow">'+g[this.o.language].daysMin[e++%7]+"</th>";i+="</tr>",this.picker.find(".datepicker-days thead").append(i)},fillMonths:function(){for(var t="",e=0;e<12;)t+='<span class="month">'+g[this.o.language].monthsShort[e++]+"</span>";this.picker.find(".datepicker-months td").html(t)},setRange:function(t){t&&t.length?this.range=y.map(t,function(t){return t.valueOf()}):delete this.range,this.fill()},getClassNames:function(t){var e=[],i=this.viewDate.getUTCFullYear(),s=this.viewDate.getUTCMonth(),n=this.date.valueOf(),a=new Date;return t.getUTCFullYear()<i||t.getUTCFullYear()==i&&t.getUTCMonth()<s?e.push("old"):(t.getUTCFullYear()>i||t.getUTCFullYear()==i&&t.getUTCMonth()>s)&&e.push("new"),this.o.todayHighlight&&t.getUTCFullYear()==a.getFullYear()&&t.getUTCMonth()==a.getMonth()&&t.getUTCDate()==a.getDate()&&e.push("today"),n&&t.valueOf()==n&&e.push("active"),(t.valueOf()<this.o.startDate||t.valueOf()>this.o.endDate||-1!==y.inArray(t.getUTCDay(),this.o.daysOfWeekDisabled))&&e.push("disabled"),this.range&&(t>this.range[0]&&t<this.range[this.range.length-1]&&e.push("range"),-1!=y.inArray(t.valueOf(),this.range))&&e.push("selected"),e},fill:function(){for(var t,e=new Date(this.viewDate),i=e.getUTCFullYear(),e=e.getUTCMonth(),s=this.o.startDate!==-1/0?this.o.startDate.getUTCFullYear():-1/0,n=this.o.startDate!==-1/0?this.o.startDate.getUTCMonth():-1/0,a=this.o.endDate!==1/0?this.o.endDate.getUTCFullYear():1/0,o=this.o.endDate!==1/0?this.o.endDate.getUTCMonth():1/0,r=(this.date&&this.date.valueOf(),this.picker.find(".datepicker-days thead th.datepicker-switch").text(g[this.o.language].months[e]+" "+i),this.picker.find("tfoot th.today").text(g[this.o.language].today).toggle(!1!==this.o.todayBtn),this.picker.find("tfoot th.clear").text(g[this.o.language].clear).toggle(!1!==this.o.clearBtn),this.updateNavArrows(),this.fillMonths(),v(i,e-1,28,0,0,0,0)),e=w.getDaysInMonth(r.getUTCFullYear(),r.getUTCMonth()),l=(r.setUTCDate(e),r.setUTCDate(e-(r.getUTCDay()-this.o.weekStart+7)%7),new Date(r)),h=(l.setUTCDate(l.getUTCDate()+42),l=l.valueOf(),[]);r.valueOf()<l;){r.getUTCDay()==this.o.weekStart&&(h.push("<tr>"),this.o.calendarWeeks)&&(p=new Date(+r+(this.o.weekStart-r.getUTCDay()-7)%7*864e5),p=new Date(+p+(11-p.getUTCDay())%7*864e5),u=new Date(+(u=v(p.getUTCFullYear(),0,1))+(11-u.getUTCDay())%7*864e5),h.push('<td class="cw">'+((p-u)/864e5/7+1)+"</td>")),(p=this.getClassNames(r)).push("day");var p,u=this.o.beforeShowDay(r);void 0===u?u={}:"boolean"==typeof u?u={enabled:u}:"string"==typeof u&&(u={classes:u}),!1===u.enabled&&p.push("disabled"),u.classes&&(p=p.concat(u.classes.split(/\s+/))),u.tooltip&&(t=u.tooltip),p=y.unique(p),h.push('<td class="'+p.join(" ")+'"'+(t?' title="'+t+'"':"")+">"+r.getUTCDate()+"</td>"),r.getUTCDay()==this.o.weekEnd&&h.push("</tr>"),r.setUTCDate(r.getUTCDate()+1)}this.picker.find(".datepicker-days tbody").empty().append(h.join(""));var d=this.date&&this.date.getUTCFullYear(),e=this.picker.find(".datepicker-months").find("th:eq(1)").text(i).end().find("span").removeClass("active"),n=(d&&d==i&&e.eq(this.date.getUTCMonth()).addClass("active"),(i<s||a<i)&&e.addClass("disabled"),i==s&&e.slice(0,n).addClass("disabled"),i==a&&e.slice(o+1).addClass("disabled"),h="",i=10*parseInt(i/10,10),this.picker.find(".datepicker-years").find("th:eq(1)").text(i+"-"+(i+9)).end().find("td"));--i;for(var c=-1;c<11;c++)h+='<span class="year'+(-1==c?" old":10==c?" new":"")+(d==i?" active":"")+(i<s||a<i?" disabled":"")+'">'+i+"</span>",i+=1;n.html(h)},updateNavArrows:function(){if(this._allow_update){var t=new Date(this.viewDate),e=t.getUTCFullYear(),i=t.getUTCMonth();switch(this.viewMode){case 0:this.o.startDate!==-1/0&&e<=this.o.startDate.getUTCFullYear()&&i<=this.o.startDate.getUTCMonth()?this.picker.find(".prev").css({visibility:"hidden"}):this.picker.find(".prev").css({visibility:"visible"}),this.o.endDate!==1/0&&e>=this.o.endDate.getUTCFullYear()&&i>=this.o.endDate.getUTCMonth()?this.picker.find(".next").css({visibility:"hidden"}):this.picker.find(".next").css({visibility:"visible"});break;case 1:case 2:this.o.startDate!==-1/0&&e<=this.o.startDate.getUTCFullYear()?this.picker.find(".prev").css({visibility:"hidden"}):this.picker.find(".prev").css({visibility:"visible"}),this.o.endDate!==1/0&&e>=this.o.endDate.getUTCFullYear()?this.picker.find(".next").css({visibility:"hidden"}):this.picker.find(".next").css({visibility:"visible"})}}},click:function(t){t.preventDefault();var e,i,s,n,a=y(t.target).closest("span, td, th");if(1==a.length)switch(a[0].nodeName.toLowerCase()){case"th":switch(a[0].className){case"datepicker-switch":this.showMode(1);break;case"prev":case"next":var o=w.modes[this.viewMode].navStep*("prev"==a[0].className?-1:1);switch(this.viewMode){case 0:this.viewDate=this.moveMonth(this.viewDate,o);break;case 1:case 2:this.viewDate=this.moveYear(this.viewDate,o)}this.fill();break;case"today":var r=v((r=new Date).getFullYear(),r.getMonth(),r.getDate(),0,0,0),l=(this.showMode(-2),"linked"==this.o.todayBtn?null:"view");this._setDate(r,l);break;case"clear":this.isInput?e=this.element:this.component&&(e=this.element.find("input")),e&&e.val("").change(),this._trigger("changeDate"),this.update(),this.o.autoclose&&this.hide()}break;case"span":a.is(".disabled")||(this.viewDate.setUTCDate(1),a.is(".month")?(i=1,n=a.parent().find("span").index(a),s=this.viewDate.getUTCFullYear(),this.viewDate.setUTCMonth(n),this._trigger("changeMonth",this.viewDate),1===this.o.minViewMode&&this._setDate(v(s,n,i,0,0,0,0))):(s=parseInt(a.text(),10)||0,i=1,n=0,this.viewDate.setUTCFullYear(s),this._trigger("changeYear",this.viewDate),2===this.o.minViewMode&&this._setDate(v(s,n,i,0,0,0,0))),this.showMode(-1),this.fill());break;case"td":a.is(".day")&&!a.is(".disabled")&&(i=parseInt(a.text(),10)||1,s=this.viewDate.getUTCFullYear(),n=this.viewDate.getUTCMonth(),a.is(".old")?0===n?(n=11,--s):--n:a.is(".new")&&(11==n?(n=0,s+=1):n+=1),this._setDate(v(s,n,i,0,0,0,0)))}},_setDate:function(t,e){var i;e&&"date"!=e||(this.date=new Date(t)),e&&"view"!=e||(this.viewDate=new Date(t)),this.fill(),this.setValue(),this._trigger("changeDate"),this.isInput?i=this.element:this.component&&(i=this.element.find("input")),i&&(i.change(),!this.o.autoclose||e&&"date"!=e||this.hide())},moveMonth:function(t,e){if(!e)return t;var i,s,n=new Date(t.valueOf()),a=n.getUTCDate(),o=n.getUTCMonth(),r=Math.abs(e);if(e=0<e?1:-1,1==r)s=-1==e?function(){return n.getUTCMonth()==o}:function(){return n.getUTCMonth()!=i},i=o+e,n.setUTCMonth(i),(i<0||11<i)&&(i=(i+12)%12);else{for(var l=0;l<r;l++)n=this.moveMonth(n,e);i=n.getUTCMonth(),n.setUTCDate(a),s=function(){return i!=n.getUTCMonth()}}for(;s();)n.setUTCDate(--a),n.setUTCMonth(i);return n},moveYear:function(t,e){return this.moveMonth(t,12*e)},dateWithinRange:function(t){return t>=this.o.startDate&&t<=this.o.endDate},keydown:function(t){if(this.picker.is(":not(:visible)"))27==t.keyCode&&this.show();else{var e,i,s,n,a=!1;switch(t.keyCode){case 27:this.hide(),t.preventDefault();break;case 37:case 39:this.o.keyboardNavigation&&(e=37==t.keyCode?-1:1,t.ctrlKey?(i=this.moveYear(this.date,e),s=this.moveYear(this.viewDate,e)):t.shiftKey?(i=this.moveMonth(this.date,e),s=this.moveMonth(this.viewDate,e)):((i=new Date(this.date)).setUTCDate(this.date.getUTCDate()+e),(s=new Date(this.viewDate)).setUTCDate(this.viewDate.getUTCDate()+e)),this.dateWithinRange(i))&&(this.date=i,this.viewDate=s,this.setValue(),this.update(),t.preventDefault(),a=!0);break;case 38:case 40:this.o.keyboardNavigation&&(e=38==t.keyCode?-1:1,t.ctrlKey?(i=this.moveYear(this.date,e),s=this.moveYear(this.viewDate,e)):t.shiftKey?(i=this.moveMonth(this.date,e),s=this.moveMonth(this.viewDate,e)):((i=new Date(this.date)).setUTCDate(this.date.getUTCDate()+7*e),(s=new Date(this.viewDate)).setUTCDate(this.viewDate.getUTCDate()+7*e)),this.dateWithinRange(i))&&(this.date=i,this.viewDate=s,this.setValue(),this.update(),t.preventDefault(),a=!0);break;case 13:this.hide(),t.preventDefault();break;case 9:this.hide()}a&&(this._trigger("changeDate"),this.isInput?n=this.element:this.component&&(n=this.element.find("input")),n)&&n.change()}},showMode:function(t){t&&(this.viewMode=Math.max(this.o.minViewMode,Math.min(2,this.viewMode+t))),this.picker.find(">div").hide().filter(".datepicker-"+w.modes[this.viewMode].clsName).css("display","block"),this.updateNavArrows()}},l.prototype={updateDates:function(){this.dates=y.map(this.pickers,function(t){return t.date}),this.updateRanges()},updateRanges:function(){var i=y.map(this.dates,function(t){return t.valueOf()});y.each(this.pickers,function(t,e){e.setRange(i)})},dateUpdated:function(t){var e=y(t.target).data("datepicker").getUTCDate(),i=y.inArray(t.target,this.inputs),s=this.inputs.length;if(-1!=i){if(e<this.dates[i])for(;0<=i&&e<this.dates[i];)this.pickers[i--].setUTCDate(e);else if(e>this.dates[i])for(;i<s&&e>this.dates[i];)this.pickers[i++].setUTCDate(e);this.updateDates()}},remove:function(){y.map(this.pickers,function(t){t.remove()}),delete this.element.data().datepicker}};var t=y.fn.datepicker,i=y.fn.datepicker=function(a){var o,r=Array.apply(null,arguments);return r.shift(),this.each(function(){var t,e,i=y(this),s=i.data("datepicker"),n="object"==typeof a&&a;if(s||(e=((t,e)=>{var i,s=y(t).data(),n={},a=new RegExp("^"+e.toLowerCase()+"([A-Z])"),e=new RegExp("^"+e.toLowerCase());for(i in s)e.test(i)&&(n[i.replace(a,function(t,e){return e.toLowerCase()})]=s[i]);return n})(this,"date"),t=(t=>{var i,s={};if(g[t]||(t=t.split("-")[0],g[t]))return i=g[t],y.each(p,function(t,e){e in i&&(s[e]=i[e])}),s})(y.extend({},h,e,n).language),t=y.extend({},h,t,e,n),i.is(".input-daterange")||t.inputs?(e={inputs:t.inputs||i.find("input").toArray()},i.data("datepicker",s=new l(this,y.extend(t,e)))):i.data("datepicker",s=new b(this,t))),"string"==typeof a&&"function"==typeof s[a]&&void 0!==(o=s[a].apply(s,r)))return!1}),void 0!==o?o:this},h=y.fn.datepicker.defaults={autoclose:!1,beforeShowDay:y.noop,calendarWeeks:!1,clearBtn:!1,daysOfWeekDisabled:[],endDate:1/0,forceParse:!0,format:"mm/dd/yyyy",keyboardNavigation:!0,language:"en",minViewMode:0,rtl:!1,startDate:-1/0,startView:0,todayBtn:!1,todayHighlight:!1,weekStart:0},p=y.fn.datepicker.locale_opts=["format","rtl","weekStart"],g=(y.fn.datepicker.Constructor=b,y.fn.datepicker.dates={en:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],daysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sun"],daysMin:["Su","Mo","Tu","We","Th","Fr","Sa","Su"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],today:"Today",clear:"Clear"}}),w={modes:[{clsName:"days",navFnc:"Month",navStep:1},{clsName:"months",navFnc:"FullYear",navStep:1},{clsName:"years",navFnc:"FullYear",navStep:10}],isLeapYear:function(t){return t%4==0&&t%100!=0||t%400==0},getDaysInMonth:function(t,e){return[31,w.isLeapYear(t)?29:28,31,30,31,30,31,31,30,31,30,31][e]},validParts:/dd?|DD?|mm?|MM?|yy(?:yy)?/g,nonpunctuation:/[^ -\/:-@\[\u3400-\u9fff-`{-~\t\n\r]+/g,parseFormat:function(t){var e=t.replace(this.validParts,"\0").split("\0"),t=t.match(this.validParts);if(e&&e.length&&t&&0!==t.length)return{separators:e,parts:t};throw new Error("Invalid date format.")},parseDate:function(t,e,i){if(!(t instanceof Date)){if("string"==typeof e&&(e=w.parseFormat(e)),/^[\-+]\d+[dmwy]([\s,]+[\-+]\d+[dmwy])*$/.test(t)){var s,n=/([\-+]\d+)([dmwy])/,a=t.match(/([\-+]\d+)([dmwy])/g);t=new Date;for(var o=0;o<a.length;o++)switch(h=n.exec(a[o]),s=parseInt(h[1]),h[2]){case"d":t.setUTCDate(t.getUTCDate()+s);break;case"m":t=b.prototype.moveMonth.call(b.prototype,t,s);break;case"w":t.setUTCDate(t.getUTCDate()+7*s);break;case"y":t=b.prototype.moveYear.call(b.prototype,t,s)}return v(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate(),0,0,0)}var r,l,h,a=t&&t.match(this.nonpunctuation)||[],t=new Date,p={},u=["yyyy","yy","M","MM","m","mm","d","dd"],d={yyyy:function(t,e){return t.setUTCFullYear(e)},yy:function(t,e){return t.setUTCFullYear(2e3+e)},m:function(t,e){for(--e;e<0;)e+=12;for(t.setUTCMonth(e%=12);t.getUTCMonth()!=e;)t.setUTCDate(t.getUTCDate()-1);return t},d:function(t,e){return t.setUTCDate(e)}},c=(d.M=d.MM=d.mm=d.m,d.dd=d.d,t=v(t.getFullYear(),t.getMonth(),t.getDate(),0,0,0),e.parts.slice());if(a.length!=c.length&&(c=y(c).filter(function(t,e){return-1!==y.inArray(e,u)}).toArray()),a.length==c.length){for(var o=0,f=c.length;o<f;o++){if(r=parseInt(a[o],10),h=c[o],isNaN(r))switch(h){case"MM":l=y(g[i].months).filter(function(){var t=this.slice(0,a[o].length);return t==a[o].slice(0,t.length)}),r=y.inArray(l[0],g[i].months)+1;break;case"M":l=y(g[i].monthsShort).filter(function(){var t=this.slice(0,a[o].length);return t==a[o].slice(0,t.length)}),r=y.inArray(l[0],g[i].monthsShort)+1}p[h]=r}for(var m,o=0;o<u.length;o++)(m=u[o])in p&&!isNaN(p[m])&&d[m](t,p[m])}}return t},formatDate:function(t,e,i){"string"==typeof e&&(e=w.parseFormat(e));for(var s={d:t.getUTCDate(),D:g[i].daysShort[t.getUTCDay()],DD:g[i].days[t.getUTCDay()],m:t.getUTCMonth()+1,M:g[i].monthsShort[t.getUTCMonth()],MM:g[i].months[t.getUTCMonth()],yy:t.getUTCFullYear().toString().substring(2),yyyy:t.getUTCFullYear()},t=(s.dd=(s.d<10?"0":"")+s.d,s.mm=(s.m<10?"0":"")+s.m,[]),n=y.extend([],e.separators),a=0,o=e.parts.length;a<=o;a++)n.length&&t.push(n.shift()),t.push(s[e.parts[a]]);return t.join("")},headTemplate:'<thead><tr><th class="prev"><i class="icon-arrow-left"/></th><th colspan="5" class="datepicker-switch"></th><th class="next"><i class="icon-arrow-right"/></th></tr></thead>',contTemplate:'<tbody><tr><td colspan="7"></td></tr></tbody>',footTemplate:'<tfoot><tr><th colspan="7" class="today"></th></tr><tr><th colspan="7" class="clear"></th></tr></tfoot>'};w.template='<div class="datepicker"><div class="datepicker-days"><table class=" table-condensed">'+w.headTemplate+"<tbody></tbody>"+w.footTemplate+'</table></div><div class="datepicker-months"><table class="table-condensed">'+w.headTemplate+w.contTemplate+w.footTemplate+'</table></div><div class="datepicker-years"><table class="table-condensed">'+w.headTemplate+w.contTemplate+w.footTemplate+"</table></div></div>",y.fn.datepicker.DPGlobal=w,y.fn.datepicker.noConflict=function(){return y.fn.datepicker=t,this},y(document).on("focus.datepicker.data-api click.datepicker.data-api",'[data-provide="datepicker"]',function(t){var e=y(this);e.data("datepicker")||(t.preventDefault(),i.call(e,"show"))}),y(function(){i.call(y('[data-provide="datepicker-inline"]'))})})(window.jQuery),(i=>{function s(t){this.init("date",t,s.defaults),this.initPicker(t,s.defaults)}i.fn.bdatepicker=i.fn.datepicker.noConflict(),i.fn.datepicker||(i.fn.datepicker=i.fn.bdatepicker),i.fn.editableutils.inherit(s,i.fn.editabletypes.abstractinput),i.extend(s.prototype,{initPicker:function(t,e){this.options.viewformat||(this.options.viewformat=this.options.format),t.datepicker=i.fn.editableutils.tryParseJson(t.datepicker,!0),this.options.datepicker=i.extend({},e.datepicker,t.datepicker,{format:this.options.viewformat}),this.options.datepicker.language=this.options.datepicker.language||"en",this.dpg=i.fn.bdatepicker.DPGlobal,this.parsedFormat=this.dpg.parseFormat(this.options.format),this.parsedViewFormat=this.dpg.parseFormat(this.options.viewformat)},render:function(){this.$input.bdatepicker(this.options.datepicker),this.options.clear&&(this.$clear=i('<a href="#"></a>').html(this.options.clear).click(i.proxy(function(t){t.preventDefault(),t.stopPropagation(),this.clear()},this)),this.$tpl.parent().append(i('<div class="editable-clear">').append(this.$clear)))},value2html:function(t,e){t=t?this.dpg.formatDate(t,this.parsedViewFormat,this.options.datepicker.language):"";s.superclass.value2html.call(this,t,e)},html2value:function(t){return this.parseDate(t,this.parsedViewFormat)},value2str:function(t){return t?this.dpg.formatDate(t,this.parsedFormat,this.options.datepicker.language):""},str2value:function(t){return this.parseDate(t,this.parsedFormat)},value2submit:function(t){return this.value2str(t)},value2input:function(t){this.$input.bdatepicker("update",t)},input2value:function(){return this.$input.data("datepicker").date},activate:function(){},clear:function(){this.$input.data("datepicker").date=null,this.$input.find(".active").removeClass("active"),this.options.showbuttons||this.$input.closest("form").submit()},autosubmit:function(){this.$input.on("mouseup",".day",function(t){var e;i(t.currentTarget).is(".old")||i(t.currentTarget).is(".new")||(e=i(this).closest("form"),setTimeout(function(){e.submit()},200))})},parseDate:function(t,e){var i=null;return i=t&&(i=this.dpg.parseDate(t,e,this.options.datepicker.language),"string"==typeof t)&&t!==this.dpg.formatDate(i,e,this.options.datepicker.language)?null:i}}),s.defaults=i.extend({},i.fn.editabletypes.abstractinput.defaults,{tpl:'<div class="editable-date well"></div>',inputclass:null,format:"yyyy-mm-dd",viewformat:null,datepicker:{weekStart:0,startView:0,minViewMode:0,autoclose:!1},clear:"&times; clear"}),i.fn.editabletypes.date=s})(window.jQuery),(t=>{function e(t){this.init("datefield",t,e.defaults),this.initPicker(t,e.defaults)}t.fn.editableutils.inherit(e,t.fn.editabletypes.date),t.extend(e.prototype,{render:function(){this.$input=this.$tpl.find("input"),this.setClass(),this.setAttr("placeholder"),this.$tpl.bdatepicker(this.options.datepicker),this.$input.off("focus keydown"),this.$input.keyup(t.proxy(function(){this.$tpl.removeData("date"),this.$tpl.bdatepicker("update")},this))},value2input:function(t){this.$input.val(t?this.dpg.formatDate(t,this.parsedViewFormat,this.options.datepicker.language):""),this.$tpl.bdatepicker("update")},input2value:function(){return this.html2value(this.$input.val())},activate:function(){t.fn.editabletypes.text.prototype.activate.call(this)},autosubmit:function(){}}),e.defaults=t.extend({},t.fn.editabletypes.date.defaults,{tpl:'<div class="input-append date"><input type="text"/><span class="add-on"><i class="icon-th"></i></span></div>',inputclass:"input-small",datepicker:{weekStart:0,startView:0,minViewMode:0,autoclose:!0}}),t.fn.editabletypes.datefield=e})(window.jQuery),(i=>{function s(t){this.init("datetime",t,s.defaults),this.initPicker(t,s.defaults)}i.fn.editableutils.inherit(s,i.fn.editabletypes.abstractinput),i.extend(s.prototype,{initPicker:function(t,e){this.options.viewformat||(this.options.viewformat=this.options.format),t.datetimepicker=i.fn.editableutils.tryParseJson(t.datetimepicker,!0),this.options.datetimepicker=i.extend({},e.datetimepicker,t.datetimepicker,{format:this.options.viewformat}),this.options.datetimepicker.language=this.options.datetimepicker.language||"en",this.dpg=i.fn.datetimepicker.DPGlobal,this.parsedFormat=this.dpg.parseFormat(this.options.format,this.options.formatType),this.parsedViewFormat=this.dpg.parseFormat(this.options.viewformat,this.options.formatType)},render:function(){this.$input.datetimepicker(this.options.datetimepicker),this.$input.on("changeMode",function(t){var e=i(this).closest("form").parent();setTimeout(function(){e.triggerHandler("resize")},0)}),this.options.clear&&(this.$clear=i('<a href="#"></a>').html(this.options.clear).click(i.proxy(function(t){t.preventDefault(),t.stopPropagation(),this.clear()},this)),this.$tpl.parent().append(i('<div class="editable-clear">').append(this.$clear)))},value2html:function(t,e){t=t?this.dpg.formatDate(this.toUTC(t),this.parsedViewFormat,this.options.datetimepicker.language,this.options.formatType):"";if(!e)return t;s.superclass.value2html.call(this,t,e)},html2value:function(t){t=this.parseDate(t,this.parsedViewFormat);return t?this.fromUTC(t):null},value2str:function(t){return t?this.dpg.formatDate(this.toUTC(t),this.parsedFormat,this.options.datetimepicker.language,this.options.formatType):""},str2value:function(t){t=this.parseDate(t,this.parsedFormat);return t?this.fromUTC(t):null},value2submit:function(t){return this.value2str(t)},value2input:function(t){t&&this.$input.data("datetimepicker").setDate(t)},input2value:function(){var t=this.$input.data("datetimepicker");return t.date?t.getDate():null},activate:function(){},clear:function(){this.$input.data("datetimepicker").date=null,this.$input.find(".active").removeClass("active"),this.options.showbuttons||this.$input.closest("form").submit()},autosubmit:function(){this.$input.on("mouseup",".minute",function(t){var e=i(this).closest("form");setTimeout(function(){e.submit()},200)})},toUTC:function(t){return t&&new Date(t.valueOf()-6e4*t.getTimezoneOffset())},fromUTC:function(t){return t&&new Date(t.valueOf()+6e4*t.getTimezoneOffset())},parseDate:function(t,e){var i=null;return i=t&&(i=this.dpg.parseDate(t,e,this.options.datetimepicker.language,this.options.formatType),"string"==typeof t)&&t!==this.dpg.formatDate(i,e,this.options.datetimepicker.language,this.options.formatType)?null:i}}),s.defaults=i.extend({},i.fn.editabletypes.abstractinput.defaults,{tpl:'<div class="editable-date well"></div>',inputclass:null,format:"yyyy-mm-dd hh:ii",formatType:"standard",viewformat:null,datetimepicker:{todayHighlight:!1,autoclose:!1},clear:"&times; clear"}),i.fn.editabletypes.datetime=s})(window.jQuery),(t=>{function e(t){this.init("datetimefield",t,e.defaults),this.initPicker(t,e.defaults)}t.fn.editableutils.inherit(e,t.fn.editabletypes.datetime),t.extend(e.prototype,{render:function(){this.$input=this.$tpl.find("input"),this.setClass(),this.setAttr("placeholder"),this.$tpl.datetimepicker(this.options.datetimepicker),this.$input.off("focus keydown"),this.$input.keyup(t.proxy(function(){this.$tpl.removeData("date"),this.$tpl.datetimepicker("update")},this))},value2input:function(t){this.$input.val(this.value2html(t)),this.$tpl.datetimepicker("update")},input2value:function(){return this.html2value(this.$input.val())},activate:function(){t.fn.editabletypes.text.prototype.activate.call(this)},autosubmit:function(){}}),e.defaults=t.extend({},t.fn.editabletypes.datetime.defaults,{tpl:'<div class="input-append date"><input type="text"/><span class="add-on"><i class="icon-th"></i></span></div>',inputclass:"input-medium",datetimepicker:{todayHighlight:!1,autoclose:!0}}),t.fn.editabletypes.datetimefield=e})(window.jQuery);
\ No newline at end of file
diff --git a/dist/bootstrap5-editable/js/bootstrap-editable.js b/dist/bootstrap5-editable/js/bootstrap-editable.js
index 92e552e..e45347e 100644
--- a/dist/bootstrap5-editable/js/bootstrap-editable.js
+++ b/dist/bootstrap5-editable/js/bootstrap-editable.js
@@ -2601,7 +2601,7 @@ List - abstract class for inputs that have source option loaded from js array or
         onSourceReady: function (success, error) {
             //run source if it function
             var source;
-            if ($.isFunction(this.options.source)) {
+            if (typeof(this.options.source) === 'function') {
                 source = this.options.source.call(this.options.scope);
                 this.sourceData = null;
                 //note: if function returns the same source as URL - sourceData will be taken from cahce and no extra request performed
@@ -2718,7 +2718,7 @@ List - abstract class for inputs that have source option loaded from js array or
             
             if(!Array.isArray(this.prependData)) {
                 //run prepend if it is function (once)
-                if ($.isFunction(this.options.prepend)) {
+                if (typeof (this.options.prepend) === 'function') {
                     this.options.prepend = this.options.prepend.call(this.options.scope);
                 }
               
@@ -3695,7 +3695,7 @@ $(function(){
         if(!options.select2.tags && options.source) {
             var source = options.source;
             //if source is function, call it (once!)
-            if ($.isFunction(options.source)) {
+            if (typeof (options.source) === 'function') {
                 source = options.source.call(options.scope);
             }               
 
diff --git a/dist/bootstrap5-editable/js/bootstrap-editable.min.js b/dist/bootstrap5-editable/js/bootstrap-editable.min.js
index 2f193d4..9120a3a 100644
--- a/dist/bootstrap5-editable/js/bootstrap-editable.min.js
+++ b/dist/bootstrap5-editable/js/bootstrap-editable.min.js
@@ -2,4 +2,4 @@
 * A maintained fork of x-editable for Bootstrap 5 support.
 * https://git.24unix.net/tracer/x-editable
 * Copyright (c) 2025 Micha Espey; Licensed MIT */
-(a=>{function n(t,e){this.options=a.extend({},a.fn.editableform.defaults,e),this.$div=a(t),this.options.scope||(this.options.scope=this)}n.prototype={constructor:n,initInput:function(){this.input=this.options.input,this.value=this.input.str2value(this.options.value),this.input.prerender()},initTemplate:function(){this.$form=a(a.fn.editableform.template)},initButtons:function(){var t=this.$form.find(".editable-buttons");t.append(a.fn.editableform.buttons),"bottom"===this.options.showbuttons&&t.addClass("editable-buttons-bottom")},render:function(){this.$loading=a(a.fn.editableform.loading),this.$div.empty().append(this.$loading),this.initTemplate(),this.options.showbuttons?this.initButtons():this.$form.find(".editable-buttons").remove(),this.showLoading(),this.isSaving=!1,this.$div.triggerHandler("rendering"),this.initInput(),this.$form.find("div.editable-input").append(this.input.$tpl),this.$div.append(this.$form),a.when(this.input.render()).then(a.proxy(function(){var t;this.options.showbuttons||this.input.autosubmit(),this.$form.find(".editable-cancel").click(a.proxy(this.cancel,this)),this.input.error?(this.error(this.input.error),this.$form.find(".editable-submit").attr("disabled",!0),this.input.$input.attr("disabled",!0),this.$form.submit(function(t){t.preventDefault()})):(this.error(!1),this.input.$input.removeAttr("disabled"),this.$form.find(".editable-submit").removeAttr("disabled"),t=null==this.value||""===this.value?this.options.defaultValue:this.value,this.input.value2input(t),this.$form.submit(a.proxy(this.submit,this))),this.$div.triggerHandler("rendered"),this.showForm(),this.input.postrender&&this.input.postrender()},this))},cancel:function(){this.$div.triggerHandler("cancel")},showLoading:function(){var t,e;this.$form?(t=this.$form.outerWidth(),e=this.$form.outerHeight(),t&&this.$loading.width(t),e&&this.$loading.height(e),this.$form.hide()):(t=this.$loading.parent().width())&&this.$loading.width(t),this.$loading.show()},showForm:function(t){this.$loading.hide(),this.$form.show(),!1!==t&&this.input.activate(),this.$div.triggerHandler("show")},error:function(t){var e=this.$form.find(".control-group"),i=this.$form.find(".editable-error-block");if(!1===t)e.removeClass(a.fn.editableform.errorGroupClass),i.removeClass(a.fn.editableform.errorBlockClass).empty().hide();else{if(t){for(var s=(""+t).split("\n"),n=0;n<s.length;n++)s[n]=a("<div>").text(s[n]).html();t=s.join("<br>")}e.addClass(a.fn.editableform.errorGroupClass),i.addClass(a.fn.editableform.errorBlockClass).html(t).show()}},submit:function(t){t.stopPropagation(),t.preventDefault();var i,s=this.input.input2value(),t=this.validate(s);if("object"===a.type(t)&&void 0!==t.newValue){if(s=t.newValue,this.input.value2input(s),"string"==typeof t.msg)return this.error(t.msg),void this.showForm()}else if(t)return this.error(t),void this.showForm();this.options.savenochange||this.input.value2str(s)!=this.input.value2str(this.value)?(i=this.input.value2submit(s),this.isSaving=!0,a.when(this.save(i)).done(a.proxy(function(t){this.isSaving=!1;var e="function"==typeof this.options.success?this.options.success.call(this.options.scope,t,s):null;!1===e?(this.error(!1),this.showForm(!1)):"string"==typeof e?(this.error(e),this.showForm()):(e&&"object"==typeof e&&e.hasOwnProperty("newValue")&&(s=e.newValue),this.error(!1),this.value=s,this.$div.triggerHandler("save",{newValue:s,submitValue:i,response:t}))},this)).fail(a.proxy(function(t){this.isSaving=!1,t="function"==typeof this.options.error?this.options.error.call(this.options.scope,t,s):"string"==typeof t?t:t.responseText||t.statusText||"Unknown error!",this.error(t),this.showForm()},this))):this.$div.triggerHandler("nochange")},save:function(t){this.options.pk=a.fn.editableutils.tryParseJson(this.options.pk,!0);var e="function"==typeof this.options.pk?this.options.pk.call(this.options.scope):this.options.pk;if(!!("function"==typeof this.options.url||this.options.url&&("always"===this.options.send||"auto"===this.options.send&&null!=e)))return this.showLoading(),t={name:this.options.name||"",value:t,pk:e},"function"==typeof this.options.params?t=this.options.params.call(this.options.scope,t):(this.options.params=a.fn.editableutils.tryParseJson(this.options.params,!0),a.extend(t,this.options.params)),"function"==typeof this.options.url?this.options.url.call(this.options.scope,t):a.ajax(a.extend({url:this.options.url,data:t,type:"POST"},this.options.ajaxOptions))},validate:function(t){if(void 0===t&&(t=this.value),"function"==typeof this.options.validate)return this.options.validate.call(this.options.scope,t)},option:function(t,e){t in this.options&&(this.options[t]=e),"value"===t&&this.setValue(e)},setValue:function(t,e){this.value=e?this.input.str2value(t):t,this.$form&&this.$form.is(":visible")&&this.input.value2input(this.value)}},a.fn.editableform=function(i){var s=arguments;return this.each(function(){var t=a(this),e=t.data("editableform");e||t.data("editableform",e=new n(this,"object"==typeof i&&i)),"string"==typeof i&&e[i].apply(e,Array.prototype.slice.call(s,1))})},a.fn.editableform.Constructor=n,a.fn.editableform.defaults={type:"text",url:null,params:null,name:null,pk:null,value:null,defaultValue:null,send:"auto",validate:null,success:null,error:null,ajaxOptions:null,showbuttons:!0,scope:null,savenochange:!1},a.fn.editableform.template='<form class="form-inline editableform"><div class="control-group"><div><div class="editable-input"></div><div class="editable-buttons"></div></div><div class="editable-error-block"></div></div></form>',a.fn.editableform.loading='<div class="editableform-loading"></div>',a.fn.editableform.buttons='<button type="submit" class="editable-submit">ok</button><button type="button" class="editable-cancel">cancel</button>',a.fn.editableform.errorGroupClass=null,a.fn.editableform.errorBlockClass="editable-error",a.fn.editableform.engine="jquery"})(window.jQuery),(l=>{l.fn.editableutils={inherit:function(t,e){function i(){}i.prototype=e.prototype,t.prototype=new i,(t.prototype.constructor=t).superclass=e.prototype},setCursorPosition:function(t,e){t.setSelectionRange?t.setSelectionRange(e,e):t.createTextRange&&((t=t.createTextRange()).collapse(!0),t.moveEnd("character",e),t.moveStart("character",e),t.select())},tryParseJson:function(t,e){if("string"==typeof t&&t.length&&t.match(/^[\{\[].*[\}\]]$/))if(e)try{t=new Function("return "+t)()}catch(t){}finally{return t}else t=new Function("return "+t)();return t},sliceObj:function(t,e,i){var s,n,a={};if(Array.isArray(e)&&e.length)for(var o=0;o<e.length;o++)t.hasOwnProperty(s=e[o])&&(a[s]=t[s]),!0!==i&&(n=s.toLowerCase(),t.hasOwnProperty(n))&&(a[s]=t[n]);return a},getConfigData:function(t){var i={};return l.each(t.data(),function(t,e){"object"==typeof e&&(!e||"object"!=typeof e||e.constructor!==Object&&e.constructor!==Array)||(i[t]=e)}),i},objectKeys:function(t){if(Object.keys)return Object.keys(t);if(t!==Object(t))throw new TypeError("Object.keys called on a non-object");var e,i=[];for(e in t)Object.prototype.hasOwnProperty.call(t,e)&&i.push(e);return i},escape:function(t){return l("<div>").text(t).html()},itemsByValue:function(s,t,n){var e,a,o,r;return t&&null!==s?("function"!=typeof n&&(e=n||"value",n=function(t){return t[e]}),a=Array.isArray(s),o=[],r=this,l.each(t,function(t,e){var i;e.children?o=o.concat(r.itemsByValue(s,e.children,n)):a?l.grep(s,function(t){return t==(e&&"object"==typeof e?n(e):e)}).length&&o.push(e):(i=e&&"object"==typeof e?n(e):e,s==i&&o.push(e))}),o):[]},createInput:function(t){var e,i=t.type;return"date"===i&&("inline"===t.mode?l.fn.editabletypes.datefield?i="datefield":l.fn.editabletypes.dateuifield&&(i="dateuifield"):l.fn.editabletypes.date?i="date":l.fn.editabletypes.dateui&&(i="dateui"),"date"!==i||l.fn.editabletypes.date||(i="combodate")),"wysihtml5"!==(i="datetime"===i&&"inline"===t.mode?"datetimefield":i)||l.fn.editabletypes[i]||(i="textarea"),"function"==typeof l.fn.editabletypes[i]?new(e=l.fn.editabletypes[i])(this.sliceObj(t,this.objectKeys(e.defaults))):(l.error("Unknown type: "+i),!1)},supportsTransitions:function(){var t=(document.body||document.documentElement).style,e=["Moz","Webkit","Khtml","O","ms"];if("string"==typeof t[i="transition"])return!0;for(var i=i.charAt(0).toUpperCase()+i.substr(1),s=0;s<e.length;s++)if("string"==typeof t[e[s]+i])return!0;return!1}}})(window.jQuery),(r=>{function l(t,e){this.init(t,e)}function h(t,e){this.init(t,e)}l.prototype={containerName:null,containerDataName:null,innerCss:null,containerClass:"editable-container editable-popup",defaults:{},init:function(t,e){this.$element=r(t),this.options=r.extend({},r.fn.editableContainer.defaults,e),this.splitOptions(),this.formOptions.scope=this.$element[0],this.initContainer(),this.delayedHide=!1,this.$element.on("destroyed",r.proxy(function(){this.destroy()},this)),r(document).data("editable-handlers-attached")||(r(document).on("keyup.editable",function(t){27===t.which&&r(".editable-open").editableContainer("hide")}),r(document).on("click.editable",function(t){var e,i=r(t.target),s=[".editable-container",".ui-datepicker-header",".datepicker",".modal-backdrop",".bootstrap-wysihtml5-insert-image-modal",".bootstrap-wysihtml5-insert-link-modal"];if(r.contains(document.documentElement,t.target)&&!i.is(document)){for(e=0;e<s.length;e++)if(i.is(s[e])||i.parents(s[e]).length)return;l.prototype.closeOthers(t.target)}}),r(document).data("editable-handlers-attached",!0))},splitOptions:function(){if(this.containerOptions={},this.formOptions={},!r.fn[this.containerName])throw new Error(this.containerName+" not found. Have you included corresponding js file?");for(var t in this.options)t in this.defaults?this.containerOptions[t]=this.options[t]:this.formOptions[t]=this.options[t]},tip:function(){return this.container()?this.container().$tip:null},container:function(){var t;return t=this.containerDataName&&(t=this.$element.data(this.containerDataName))?t:this.$element.data(this.containerName)},call:function(){this.$element[this.containerName].apply(this.$element,arguments)},initContainer:function(){this.call(this.containerOptions)},renderForm:function(){this.$form.editableform(this.formOptions).on({save:r.proxy(this.save,this),nochange:r.proxy(function(){this.hide("nochange")},this),cancel:r.proxy(function(){this.hide("cancel")},this),show:r.proxy(function(){this.delayedHide?(this.hide(this.delayedHide.reason),this.delayedHide=!1):this.setPosition()},this),rendering:r.proxy(this.setPosition,this),resize:r.proxy(this.setPosition,this),rendered:r.proxy(function(){this.$element.triggerHandler("shown",r(this.options.scope).data("editable"))},this)}).editableform("render")},show:function(t){this.$element.addClass("editable-open"),!1!==t&&this.closeOthers(this.$element[0]),this.innerShow(),this.tip().addClass(this.containerClass),this.$form,this.$form=r("<div>"),(this.tip().is(this.innerCss)?this.tip():this.tip().find(this.innerCss)).append(this.$form),this.renderForm()},hide:function(t){this.tip()&&this.tip().is(":visible")&&this.$element.hasClass("editable-open")&&(this.$form.data("editableform").isSaving?this.delayedHide={reason:t}:(this.delayedHide=!1,this.$element.removeClass("editable-open"),this.innerHide(),this.$element.triggerHandler("hidden",t||"manual")))},innerShow:function(){},innerHide:function(){},toggle:function(t){this.container()&&this.tip()&&this.tip().is(":visible")?this.hide():this.show(t)},setPosition:function(){},save:function(t,e){this.$element.triggerHandler("save",e),this.hide("save")},option:function(t,e){this.options[t]=e,t in this.containerOptions?(this.containerOptions[t]=e,this.setContainerOption(t,e)):(this.formOptions[t]=e,this.$form&&this.$form.editableform("option",t,e))},setContainerOption:function(t,e){this.call("option",t,e)},destroy:function(){this.hide(),this.innerDestroy(),this.$element.off("destroyed"),this.$element.removeData("editableContainer")},innerDestroy:function(){},closeOthers:function(s){r(".editable-open").each(function(t,e){var i;e===s||r(e).find(s).length||(i=(e=r(e)).data("editableContainer"))&&("cancel"===i.options.onblur?e.data("editableContainer").hide("onblur"):"submit"===i.options.onblur&&e.data("editableContainer").tip().find("form").submit())})},activate:function(){this.tip&&this.tip().is(":visible")&&this.$form&&this.$form.data("editableform").input.activate()}},r.fn.editableContainer=function(a){var o=arguments;return this.each(function(){var t=r(this),e="editableContainer",i=t.data(e),s="object"==typeof a&&a,n="inline"===s.mode?h:l;i||t.data(e,i=new n(this,s)),"string"==typeof a&&i[a].apply(i,Array.prototype.slice.call(o,1))})},r.fn.editableContainer.Popup=l,r.fn.editableContainer.Inline=h,r.fn.editableContainer.defaults={value:null,placement:"top",autohide:!0,onblur:"cancel",anim:!1,mode:"popup"},jQuery.event.special.destroyed={remove:function(t){t.handler&&t.handler()}}})(window.jQuery),(t=>{t.extend(t.fn.editableContainer.Inline.prototype,t.fn.editableContainer.Popup.prototype,{containerName:"editableform",innerCss:".editable-inline",containerClass:"editable-container editable-inline",initContainer:function(){this.$tip=t("<span></span>"),this.options.anim||(this.options.anim=0)},splitOptions:function(){this.containerOptions={},this.formOptions=this.options},tip:function(){return this.$tip},innerShow:function(){this.$element.hide(),this.tip().insertAfter(this.$element).show()},innerHide:function(){this.$tip.hide(this.options.anim,t.proxy(function(){this.$element.show(),this.innerDestroy()},this))},innerDestroy:function(){this.tip()&&this.tip().empty().remove()}})})(window.jQuery),(p=>{function u(t,e){this.$element=p(t),this.options=p.extend({},p.fn.editable.defaults,e,p.fn.editableutils.getConfigData(this.$element)),this.options.selector?this.initLive():this.init(),this.options.highlight&&!p.fn.editableutils.supportsTransitions()&&(this.options.highlight=!1)}u.prototype={constructor:u,init:function(){var t,e=!1;if(this.options.name=this.options.name||this.$element.attr("id"),this.options.scope=this.$element[0],this.input=p.fn.editableutils.createInput(this.options),this.input){switch(null==this.options.value?(this.value=this.input.html2value(p.trim(this.$element.html())),e=!0):(this.options.value=p.fn.editableutils.tryParseJson(this.options.value,!0),"string"==typeof this.options.value?this.value=this.input.str2value(this.options.value):this.value=this.options.value),this.$element.addClass("editable"),"textarea"===this.input.type&&this.$element.addClass("editable-pre-wrapped"),"manual"!==this.options.toggle?(this.$element.addClass("editable-click"),this.$element.on(this.options.toggle+".editable",p.proxy(function(t){this.options.disabled||t.preventDefault(),"mouseenter"===this.options.toggle?this.show():(t="click"!==this.options.toggle,this.toggle(t))},this))):this.$element.attr("tabindex",-1),"function"==typeof this.options.display&&(this.options.autotext="always"),this.options.autotext){case"always":t=!0;break;case"auto":t=!p.trim(this.$element.text()).length&&null!=this.value&&!e;break;default:t=!1}p.when(!t||this.render()).then(p.proxy(function(){this.options.disabled?this.disable():this.enable(),this.$element.triggerHandler("init",this)},this))}},initLive:function(){var t=this.options.selector;this.options.selector=!1,this.options.autotext="never",this.$element.on(this.options.toggle+".editable",t,p.proxy(function(t){var e=p(t.target);e.data("editable")||(e.hasClass(this.options.emptyclass)&&e.empty(),e.editable(this.options).trigger(t))},this))},render:function(t){if(!1!==this.options.display)return this.input.value2htmlFinal?this.input.value2html(this.value,this.$element[0],this.options.display,t):"function"==typeof this.options.display?this.options.display.call(this.$element[0],this.value,t):this.input.value2html(this.value,this.$element[0])},enable:function(){this.options.disabled=!1,this.$element.removeClass("editable-disabled"),this.handleEmpty(this.isEmpty),"manual"!==this.options.toggle&&"-1"===this.$element.attr("tabindex")&&this.$element.removeAttr("tabindex")},disable:function(){this.options.disabled=!0,this.hide(),this.$element.addClass("editable-disabled"),this.handleEmpty(this.isEmpty),this.$element.attr("tabindex",-1)},toggleDisabled:function(){this.options.disabled?this.enable():this.disable()},option:function(t,e){if(t&&"object"==typeof t)p.each(t,p.proxy(function(t,e){this.option(p.trim(t),e)},this));else{if(this.options[t]=e,"disabled"===t)return e?this.disable():this.enable();"value"===t&&this.setValue(e),this.container&&this.container.option(t,e),this.input.option&&this.input.option(t,e)}},handleEmpty:function(t){!1!==this.options.display&&(void 0!==t?this.isEmpty=t:"function"==typeof this.input.isEmpty?this.isEmpty=this.input.isEmpty(this.$element):this.isEmpty=""===p.trim(this.$element.html()),this.options.disabled?this.isEmpty&&(this.$element.empty(),this.options.emptyclass)&&this.$element.removeClass(this.options.emptyclass):this.isEmpty?(this.$element.html(this.options.emptytext),this.options.emptyclass&&this.$element.addClass(this.options.emptyclass)):this.options.emptyclass&&this.$element.removeClass(this.options.emptyclass))},show:function(t){if(!this.options.disabled){if(this.container){if(this.container.tip().is(":visible"))return}else{var e=p.extend({},this.options,{value:this.value,input:this.input});this.$element.editableContainer(e),this.$element.on("save.internal",p.proxy(this.save,this)),this.container=this.$element.data("editableContainer")}this.container.show(t)}},hide:function(){this.container&&this.container.hide()},toggle:function(t){this.container&&this.container.tip().is(":visible")?this.hide():this.show(t)},save:function(t,e){var i,s;this.options.unsavedclass&&("function"==typeof this.options.url||!1===this.options.display||void 0!==e.response||this.options.savenochange&&this.input.value2str(this.value)!==this.input.value2str(e.newValue)?this.$element.removeClass(this.options.unsavedclass):this.$element.addClass(this.options.unsavedclass)),this.options.highlight&&(i=this.$element,s=i.css("background-color"),i.css("background-color",this.options.highlight),setTimeout(function(){"transparent"===s&&(s=""),i.css("background-color",s),i.addClass("editable-bg-transition"),setTimeout(function(){i.removeClass("editable-bg-transition")},1700)},10)),this.setValue(e.newValue,!1,e.response)},validate:function(){if("function"==typeof this.options.validate)return this.options.validate.call(this,this.value)},setValue:function(t,e,i){this.value=e?this.input.str2value(t):t,this.container&&this.container.option("value",this.value),p.when(this.render(i)).then(p.proxy(function(){this.handleEmpty()},this))},activate:function(){this.container&&this.container.activate()},destroy:function(){this.disable(),this.container&&this.container.destroy(),this.input.destroy(),"manual"!==this.options.toggle&&(this.$element.removeClass("editable-click"),this.$element.off(this.options.toggle+".editable")),this.$element.off("save.internal"),this.$element.removeClass("editable editable-open editable-disabled"),this.$element.removeData("editable")}},p.fn.editable=function(s){var i={},n=arguments,a="editable";switch(s){case"validate":return this.each(function(){var t,e=p(this).data(a);e&&(t=e.validate())&&(i[e.options.name]=t)}),i;case"getValue":return 2===arguments.length&&!0===arguments[1]?i=this.eq(0).data(a).value:this.each(function(){var t=p(this).data(a);t&&null!=t.value&&(i[t.options.name]=t.input.value2submit(t.value))}),i;case"submit":var t,e,o,r=arguments[1]||{},l=this,h=this.editable("validate");return p.isEmptyObject(h)?(o={},1===l.length?(e={name:(t=l.data("editable")).options.name||"",value:t.input.value2submit(t.value),pk:"function"==typeof t.options.pk?t.options.pk.call(t.options.scope):t.options.pk},"function"==typeof t.options.params?e=t.options.params.call(t.options.scope,e):(t.options.params=p.fn.editableutils.tryParseJson(t.options.params,!0),p.extend(e,t.options.params)),o={url:t.options.url,data:e,type:"POST"},r.success=r.success||t.options.success,r.error=r.error||t.options.error):(e=this.editable("getValue"),o={url:r.url,data:e,type:"POST"}),o.success="function"==typeof r.success?function(t){r.success.call(l,t,r)}:p.noop,o.error="function"==typeof r.error?function(){r.error.apply(l,arguments)}:p.noop,r.ajaxOptions&&p.extend(o,r.ajaxOptions),r.data&&p.extend(o.data,r.data),p.ajax(o)):"function"==typeof r.error&&r.error.call(l,h),this}return this.each(function(){var t=p(this),e=t.data(a),i="object"==typeof s&&s;i&&i.selector?e=new u(this,i):(e||t.data(a,e=new u(this,i)),"string"==typeof s&&e[s].apply(e,Array.prototype.slice.call(n,1)))})},p.fn.editable.defaults={type:"text",disabled:!1,toggle:"click",emptytext:"Empty",autotext:"auto",value:null,display:null,emptyclass:"editable-empty",unsavedclass:"editable-unsaved",selector:null,highlight:"#FFFF80"}})(window.jQuery),(s=>{function t(){}s.fn.editabletypes={},t.prototype={init:function(t,e,i){this.type=t,this.options=s.extend({},i,e)},prerender:function(){this.$tpl=s(this.options.tpl),this.$input=this.$tpl,this.$clear=null,this.error=null},render:function(){},value2html:function(t,e){s(e)[this.options.escape?"text":"html"](s.trim(t))},html2value:function(t){return s("<div>").html(t).text()},value2str:function(t){return t},str2value:function(t){return t},value2submit:function(t){return t},value2input:function(t){this.$input.val(t)},input2value:function(){return this.$input.val()},activate:function(){this.$input.is(":visible")&&this.$input.focus()},clear:function(){this.$input.val(null)},escape:function(t){return s("<div>").text(t).html()},autosubmit:function(){},destroy:function(){},setClass:function(){this.options.inputclass&&this.$input.addClass(this.options.inputclass)},setAttr:function(t){null!=this.options[t]&&this.$input.attr(t,this.options[t])},option:function(t,e){this.options[t]=e}},t.defaults={tpl:"",inputclass:null,escape:!0,scope:null,showbuttons:!0},s.extend(s.fn.editabletypes,{abstractinput:t})})(window.jQuery),(r=>{function t(t){}r.fn.editableutils.inherit(t,r.fn.editabletypes.abstractinput),r.extend(t.prototype,{render:function(){var t=r.Deferred();return this.error=null,this.onSourceReady(function(){this.renderList(),t.resolve()},function(){this.error=this.options.sourceError,t.resolve()}),t.promise()},html2value:function(t){return null},value2html:function(t,e,i,s){function n(){"function"==typeof i?i.call(e,t,this.sourceData,s):this.value2htmlFinal(t,e),a.resolve()}var a=r.Deferred();return null===t?n.call(this):this.onSourceReady(n,function(){a.resolve()}),a.promise()},onSourceReady:function(e,i){var t;if(r.isFunction(this.options.source)?(t=this.options.source.call(this.options.scope),this.sourceData=null):t=this.options.source,this.options.sourceCache&&Array.isArray(this.sourceData))e.call(this);else{try{t=r.fn.editableutils.tryParseJson(t,!1)}catch(t){return void i.call(this)}if("string"==typeof t){if(this.options.sourceCache){var s,n=t;if(r(document).data(n)||r(document).data(n,{}),!1===(s=r(document).data(n)).loading&&s.sourceData)return this.sourceData=s.sourceData,this.doPrepend(),void e.call(this);if(!0===s.loading)return s.callbacks.push(r.proxy(function(){this.sourceData=s.sourceData,this.doPrepend(),e.call(this)},this)),void s.err_callbacks.push(r.proxy(i,this));s.loading=!0,s.callbacks=[],s.err_callbacks=[]}n=r.extend({url:t,type:"get",cache:!1,dataType:"json",success:r.proxy(function(t){s&&(s.loading=!1),this.sourceData=this.makeArray(t),Array.isArray(this.sourceData)?(s&&(s.sourceData=this.sourceData,r.each(s.callbacks,function(){this.call()})),this.doPrepend(),e.call(this)):(i.call(this),s&&r.each(s.err_callbacks,function(){this.call()}))},this),error:r.proxy(function(){i.call(this),s&&(s.loading=!1,r.each(s.err_callbacks,function(){this.call()}))},this)},this.options.sourceOptions);r.ajax(n)}else this.sourceData=this.makeArray(t),(Array.isArray(this.sourceData)?(this.doPrepend(),e):i).call(this)}},doPrepend:function(){null!=this.options.prepend&&(Array.isArray(this.prependData)||(r.isFunction(this.options.prepend)&&(this.options.prepend=this.options.prepend.call(this.options.scope)),this.options.prepend=r.fn.editableutils.tryParseJson(this.options.prepend,!0),"string"==typeof this.options.prepend&&(this.options.prepend={"":this.options.prepend}),this.prependData=this.makeArray(this.options.prepend)),Array.isArray(this.prependData))&&Array.isArray(this.sourceData)&&(this.sourceData=this.prependData.concat(this.sourceData))},renderList:function(){},value2htmlFinal:function(t,e){},makeArray:function(t){var i,s,e,n=[];if(!t||"string"==typeof t)return null;if(Array.isArray(t))for(var a=function(t,e){if(s={value:t,text:e},2<=i++)return!1},o=0;o<t.length;o++)"object"==typeof(e=t[o])?(i=0,r.each(e,a),1===i?n.push(s):1<i&&(e.children&&(e.children=this.makeArray(e.children)),n.push(e))):n.push({value:e,text:e});else r.each(t,function(t,e){n.push({value:t,text:e})});return n},option:function(t,e){this.options[t]=e,"source"===t&&(this.sourceData=null),"prepend"===t&&(this.prependData=null)}}),t.defaults=r.extend({},r.fn.editabletypes.abstractinput.defaults,{source:null,prepend:!1,sourceError:"Error when loading list",sourceCache:!0,sourceOptions:null}),r.fn.editabletypes.list=t})(window.jQuery),(i=>{function e(t){this.init("text",t,e.defaults)}i.fn.editableutils.inherit(e,i.fn.editabletypes.abstractinput),i.extend(e.prototype,{render:function(){this.renderClear(),this.setClass(),this.setAttr("placeholder")},activate:function(){this.$input.is(":visible")&&(this.$input.focus(),i.fn.editableutils.setCursorPosition(this.$input.get(0),this.$input.val().length),this.toggleClear)&&this.toggleClear()},renderClear:function(){this.options.clear&&(this.$clear=i('<span class="editable-clear-x"></span>'),this.$input.after(this.$clear).css("padding-right",24).keyup(i.proxy(function(t){var e;~i.inArray(t.keyCode,[40,38,9,13,27])||(clearTimeout(this.t),(e=this).t=setTimeout(function(){e.toggleClear(t)},100))},this)).parent().css("position","relative"),this.$clear.click(i.proxy(this.clear,this)))},postrender:function(){},toggleClear:function(t){var e,i;this.$clear&&(e=this.$input.val().length,i=this.$clear.is(":visible"),e&&!i&&this.$clear.show(),!e)&&i&&this.$clear.hide()},clear:function(){this.$clear.hide(),this.$input.val("").focus()}}),e.defaults=i.extend({},i.fn.editabletypes.abstractinput.defaults,{tpl:'<input type="text">',placeholder:null,clear:!0}),i.fn.editabletypes.text=e})(window.jQuery),(e=>{function i(t){this.init("textarea",t,i.defaults)}e.fn.editableutils.inherit(i,e.fn.editabletypes.abstractinput),e.extend(i.prototype,{render:function(){this.setClass(),this.setAttr("placeholder"),this.setAttr("rows"),this.$input.keydown(function(t){t.ctrlKey&&13===t.which&&e(this).closest("form").submit()})},activate:function(){e.fn.editabletypes.text.prototype.activate.call(this)}}),i.defaults=e.extend({},e.fn.editabletypes.abstractinput.defaults,{tpl:"<textarea></textarea>",inputclass:"input-large",placeholder:null,rows:7}),e.fn.editabletypes.textarea=i})(window.jQuery),(a=>{function e(t){this.init("select",t,e.defaults)}a.fn.editableutils.inherit(e,a.fn.editabletypes.list),a.extend(e.prototype,{renderList:function(){this.$input.empty();var n=function(t,e){var i;if(Array.isArray(e))for(var s=0;s<e.length;s++)i={},e[s].children?(i.label=e[s].text,t.append(n(a("<optgroup>",i),e[s].children))):(i.value=e[s].value,e[s].disabled&&(i.disabled=!0),t.append(a("<option>",i).text(e[s].text)));return t};n(this.$input,this.sourceData),this.setClass(),this.$input.on("keydown.editable",function(t){13===t.which&&a(this).closest("form").submit()})},value2htmlFinal:function(t,e){var i="",t=a.fn.editableutils.itemsByValue(t,this.sourceData);t.length&&(i=t[0].text),a.fn.editabletypes.abstractinput.prototype.value2html.call(this,i,e)},autosubmit:function(){this.$input.off("keydown.editable").on("change.editable",function(){a(this).closest("form").submit()})}}),e.defaults=a.extend({},a.fn.editabletypes.list.defaults,{tpl:"<select></select>"}),a.fn.editabletypes.select=e})(window.jQuery),(n=>{function e(t){this.init("checklist",t,e.defaults)}n.fn.editableutils.inherit(e,n.fn.editabletypes.list),n.extend(e.prototype,{renderList:function(){var t;if(this.$tpl.empty(),Array.isArray(this.sourceData)){for(var e=0;e<this.sourceData.length;e++)t=n("<label>").append(n("<input>",{type:"checkbox",value:this.sourceData[e].value})).append(n("<span>").text(" "+this.sourceData[e].text)),n("<div>").append(t).appendTo(this.$tpl);this.$input=this.$tpl.find('input[type="checkbox"]'),this.setClass()}},value2str:function(t){return Array.isArray(t)?t.sort().join(this.options.separator.trim()):""},str2value:function(t){var e;return"string"==typeof t&&t.length?(e=new RegExp("\\s*"+n.trim(this.options.separator)+"\\s*"),t.split(e)):Array.isArray(t)?t:[t]},value2input:function(s){this.$input.prop("checked",!1),Array.isArray(s)&&s.length&&this.$input.each(function(t,e){var i=n(e);n.each(s,function(t,e){i.val()==e&&i.prop("checked",!0)})})},input2value:function(){var i=[];return this.$input.filter(":checked").each(function(t,e){i.push(n(e).val())}),i},value2htmlFinal:function(t,e){var i=[],t=n.fn.editableutils.itemsByValue(t,this.sourceData),s=this.options.escape;t.length?(n.each(t,function(t,e){e=s?n.fn.editableutils.escape(e.text):e.text;i.push(e)}),n(e).html(i.join("<br>"))):n(e).empty()},activate:function(){this.$input.first().focus()},autosubmit:function(){this.$input.on("keydown",function(t){13===t.which&&n(this).closest("form").submit()})}}),e.defaults=n.extend({},n.fn.editabletypes.list.defaults,{tpl:'<div class="editable-checklist"></div>',inputclass:null,separator:","}),n.fn.editabletypes.checklist=e})(window.jQuery),(i=>{function e(t){this.init("password",t,e.defaults)}i.fn.editableutils.inherit(e,i.fn.editabletypes.text),i.extend(e.prototype,{value2html:function(t,e){t?i(e).text("[hidden]"):i(e).empty()},html2value:function(t){return null}}),e.defaults=i.extend({},i.fn.editabletypes.text.defaults,{tpl:'<input type="password">'}),i.fn.editabletypes.password=e})(window.jQuery),(t=>{function e(t){this.init("email",t,e.defaults)}t.fn.editableutils.inherit(e,t.fn.editabletypes.text),e.defaults=t.extend({},t.fn.editabletypes.text.defaults,{tpl:'<input type="email">'}),t.fn.editabletypes.email=e})(window.jQuery),(t=>{function e(t){this.init("url",t,e.defaults)}t.fn.editableutils.inherit(e,t.fn.editabletypes.text),e.defaults=t.extend({},t.fn.editabletypes.text.defaults,{tpl:'<input type="url">'}),t.fn.editabletypes.url=e})(window.jQuery),(t=>{function e(t){this.init("tel",t,e.defaults)}t.fn.editableutils.inherit(e,t.fn.editabletypes.text),e.defaults=t.extend({},t.fn.editabletypes.text.defaults,{tpl:'<input type="tel">'}),t.fn.editabletypes.tel=e})(window.jQuery),(t=>{function e(t){this.init("number",t,e.defaults)}t.fn.editableutils.inherit(e,t.fn.editabletypes.text),t.extend(e.prototype,{render:function(){e.superclass.render.call(this),this.setAttr("min"),this.setAttr("max"),this.setAttr("step")},postrender:function(){this.$clear&&this.$clear.css({right:24})}}),e.defaults=t.extend({},t.fn.editabletypes.text.defaults,{tpl:'<input type="number">',inputclass:"input-mini",min:null,max:null,step:null}),t.fn.editabletypes.number=e})(window.jQuery),(t=>{function e(t){this.init("range",t,e.defaults)}t.fn.editableutils.inherit(e,t.fn.editabletypes.number),t.extend(e.prototype,{render:function(){this.$input=this.$tpl.filter("input"),this.setClass(),this.setAttr("min"),this.setAttr("max"),this.setAttr("step"),this.$input.on("input",function(){t(this).siblings("output").text(t(this).val())})},activate:function(){this.$input.focus()}}),e.defaults=t.extend({},t.fn.editabletypes.number.defaults,{tpl:'<input type="range"><output style="width: 30px; display: inline-block"></output>',inputclass:"input-medium"}),t.fn.editabletypes.range=e})(window.jQuery),(t=>{function e(t){this.init("time",t,e.defaults)}t.fn.editableutils.inherit(e,t.fn.editabletypes.abstractinput),t.extend(e.prototype,{render:function(){this.setClass()}}),e.defaults=t.extend({},t.fn.editabletypes.abstractinput.defaults,{tpl:'<input type="time">'}),t.fn.editabletypes.time=e})(window.jQuery),(a=>{function o(t){var e,i;this.init("select2",t,o.defaults),t.select2=t.select2||{},this.sourceData=null,t.placeholder&&(t.select2.placeholder=t.placeholder),!t.select2.tags&&t.source&&(e=t.source,"string"==typeof(e=a.isFunction(t.source)?t.source.call(t.scope):e)?(t.select2.ajax=t.select2.ajax||{},t.select2.ajax.data||(t.select2.ajax.data=function(t){return{query:t}}),t.select2.ajax.results||(t.select2.ajax.results=function(t){return{results:t}}),t.select2.ajax.url=e):(this.sourceData=this.convertSource(e),t.select2.data=this.sourceData)),this.options.select2=a.extend({},o.defaults.select2,t.select2),this.isMultiple=this.options.select2.tags||this.options.select2.multiple,this.isRemote="ajax"in this.options.select2,this.idFunc=this.options.select2.id,"function"!=typeof this.idFunc&&(i=this.idFunc||"id",this.idFunc=function(t){return t[i]}),this.formatSelection=this.options.select2.formatSelection,"function"!=typeof this.formatSelection&&(this.formatSelection=function(t){return t.text})}a.fn.editableutils.inherit(o,a.fn.editabletypes.abstractinput),a.extend(o.prototype,{render:function(){this.setClass(),this.isRemote&&this.$input.on("select2-loaded",a.proxy(function(t){this.sourceData=t.items.results},this)),this.isMultiple&&this.$input.on("change",function(){a(this).closest("form").parent().triggerHandler("resize")})},value2html:function(t,e){var i,s="",n=this;this.options.select2.tags?i=t:this.sourceData&&(i=a.fn.editableutils.itemsByValue(t,this.sourceData,this.idFunc)),Array.isArray(i)?(s=[],a.each(i,function(t,e){s.push(e&&"object"==typeof e?n.formatSelection(e):e)})):i&&(s=n.formatSelection(i)),s=Array.isArray(s)?s.join(this.options.viewseparator):s,o.superclass.value2html.call(this,s,e)},html2value:function(t){return this.options.select2.tags?this.str2value(t,this.options.viewseparator):null},value2input:function(t){var e,i;Array.isArray(t)&&(t=t.join(this.getSeparator())),this.$input.data("select2")?this.$input.val(t).trigger("change",!0):(this.$input.val(t),this.$input.select2(this.options.select2)),!this.isRemote||this.isMultiple||this.options.select2.initSelection||(e=this.options.select2.id,i=this.options.select2.formatSelection,e)||i||(e=a(this.options.scope)).data("editable").isEmpty||(i={id:t,text:e.text()},this.$input.select2("data",i))},input2value:function(){return this.$input.select2("val")},str2value:function(t,e){if("string"!=typeof t||!this.isMultiple)return t;var i,s,n;if(e=e||this.getSeparator(),null===t||t.length<1)return null;for(s=0,n=(i=t.split(e)).length;s<n;s+=1)i[s]=a.trim(i[s]);return i},autosubmit:function(){this.$input.on("change",function(t,e){e||a(this).closest("form").submit()})},getSeparator:function(){return this.options.select2.separator||a.fn.select2.defaults.separator},convertSource:function(t){if(Array.isArray(t)&&t.length&&void 0!==t[0].value)for(var e=0;e<t.length;e++)void 0!==t[e].value&&(t[e].id=t[e].value,delete t[e].value);return t},destroy:function(){this.$input&&this.$input.data("select2")&&this.$input.select2("destroy")}}),o.defaults=a.extend({},a.fn.editabletypes.abstractinput.defaults,{tpl:'<input type="hidden">',select2:null,placeholder:null,source:null,viewseparator:", "}),a.fn.editabletypes.select2=o})(window.jQuery),(o=>{function n(t,e){this.$element=o(t),this.$element.is("input")?(this.options=o.extend({},o.fn.combodate.defaults,e,this.$element.data()),this.init()):o.error("Combodate should be applied to INPUT element")}n.prototype={constructor:n,init:function(){this.map={day:["D","date"],month:["M","month"],year:["Y","year"],hour:["[Hh]","hours"],minute:["m","minutes"],second:["s","seconds"],ampm:["[Aa]",""]},this.$widget=o('<span class="combodate"></span>').html(this.getTemplate()),this.initCombos(),this.$widget.on("change","select",o.proxy(function(t){this.$element.val(this.getValue()).change(),this.options.smartDays&&(o(t.target).is(".month")||o(t.target).is(".year"))&&this.fillCombo("day")},this)),this.$widget.find("select").css("width","auto"),this.$element.hide().after(this.$widget),this.setValue(this.$element.val()||this.options.value)},getTemplate:function(){var s=this.options.template;return o.each(this.map,function(t,e){e=e[0];var i=new RegExp(e+"+"),e=1<e.length?e.substring(1,2):e;s=s.replace(i,"{"+e+"}")}),s=s.replace(/ /g,"&nbsp;"),o.each(this.map,function(t,e){e=1<(e=e[0]).length?e.substring(1,2):e;s=s.replace("{"+e+"}",'<select class="'+t+'"></select>')}),s},initCombos:function(){for(var t in this.map){var e=this.$widget.find("."+t);this["$"+t]=e.length?e:null,this.fillCombo(t)}},fillCombo:function(t){var e=this["$"+t];if(e){var i=this["fill"+t.charAt(0).toUpperCase()+t.slice(1)](),t=e.val();e.empty();for(var s=0;s<i.length;s++)e.append('<option value="'+i[s][0]+'">'+i[s][1]+"</option>");e.val(t)}},fillCommon:function(t){var e,i=[];return"name"===this.options.firstItem?(e=(e="function"==typeof(e=moment.relativeTime||moment.langData()._relativeTime)[t]?e[t](1,!0,t,!1):e[t]).split(" ").reverse()[0],i.push(["",e])):"empty"===this.options.firstItem&&i.push(["",""]),i},fillDay:function(){var t,e,i,s,n=this.fillCommon("d"),a=-1!==this.options.template.indexOf("DD"),o=31;for(this.options.smartDays&&this.$month&&this.$year&&(i=parseInt(this.$month.val(),10),s=parseInt(this.$year.val(),10),isNaN(i)||isNaN(s)||(o=moment([s,i]).daysInMonth())),e=1;e<=o;e++)t=a?this.leadZero(e):e,n.push([e,t]);return n},fillMonth:function(){for(var t,e=this.fillCommon("M"),i=-1!==this.options.template.indexOf("MMMM"),s=-1!==this.options.template.indexOf("MMM"),n=-1!==this.options.template.indexOf("MM"),a=0;a<=11;a++)t=i?moment().date(1).month(a).format("MMMM"):s?moment().date(1).month(a).format("MMM"):n?this.leadZero(a+1):a+1,e.push([a,t]);return e},fillYear:function(){for(var t,e=[],i=-1!==this.options.template.indexOf("YYYY"),s=this.options.maxYear;s>=this.options.minYear;s--)t=i?s:(s+"").substring(2),e[this.options.yearDescending?"push":"unshift"]([s,t]);return e=this.fillCommon("y").concat(e)},fillHour:function(){for(var t,e=this.fillCommon("h"),i=-1!==this.options.template.indexOf("h"),s=(this.options.template.indexOf("H"),-1!==this.options.template.toLowerCase().indexOf("hh")),n=i?12:23,a=i?1:0;a<=n;a++)t=s?this.leadZero(a):a,e.push([a,t]);return e},fillMinute:function(){for(var t,e=this.fillCommon("m"),i=-1!==this.options.template.indexOf("mm"),s=0;s<=59;s+=this.options.minuteStep)t=i?this.leadZero(s):s,e.push([s,t]);return e},fillSecond:function(){for(var t,e=this.fillCommon("s"),i=-1!==this.options.template.indexOf("ss"),s=0;s<=59;s+=this.options.secondStep)t=i?this.leadZero(s):s,e.push([s,t]);return e},fillAmpm:function(){var t=-1!==this.options.template.indexOf("a");this.options.template.indexOf("A");return[["am",t?"am":"AM"],["pm",t?"pm":"PM"]]},getValue:function(t){var e,s={},n=this,a=!1;return o.each(this.map,function(t,e){var i;if("ampm"!==t)return i="day"===t?1:0,s[t]=n["$"+t]?parseInt(n["$"+t].val(),10):i,isNaN(s[t])?!(a=!0):void 0}),a?"":(this.$ampm&&(s.hour=12===s.hour?"am"===this.$ampm.val()?0:12:"am"===this.$ampm.val()?s.hour:s.hour+12),e=moment([s.year,s.month,s.day,s.hour,s.minute,s.second]),this.highlight(e),null===(t=void 0===t?this.options.format:t)?e.isValid()?e:null:e.isValid()?e.format(t):"")},setValue:function(t){var i,s,n;function a(t,s){var n={};return t.children("option").each(function(t,e){var i,e=o(e).attr("value");""!==e&&(i=Math.abs(e-s),void 0===n.distance||i<n.distance)&&(n={value:e,distance:i})}),n.value}t&&(i="string"==typeof t?moment(t,this.options.format):moment(t),s=this,n={},i.isValid())&&(o.each(this.map,function(t,e){"ampm"!==t&&(n[t]=i[e[1]]())}),this.$ampm&&(12<=n.hour?(n.ampm="pm",12<n.hour&&(n.hour-=12)):(n.ampm="am",0===n.hour&&(n.hour=12))),o.each(n,function(t,e){s["$"+t]&&("minute"===t&&1<s.options.minuteStep&&s.options.roundTime&&(e=a(s["$"+t],e)),"second"===t&&1<s.options.secondStep&&s.options.roundTime&&(e=a(s["$"+t],e)),s["$"+t].val(e))}),this.options.smartDays&&this.fillCombo("day"),this.$element.val(i.format(this.options.format)).change())},highlight:function(t){t.isValid()?this.options.errorClass?this.$widget.removeClass(this.options.errorClass):this.$widget.find("select").css("border-color",this.borderColor):this.options.errorClass?this.$widget.addClass(this.options.errorClass):(this.borderColor||(this.borderColor=this.$widget.find("select").css("border-color")),this.$widget.find("select").css("border-color","red"))},leadZero:function(t){return t<=9?"0"+t:t},destroy:function(){this.$widget.remove(),this.$element.removeData("combodate").show()}},o.fn.combodate=function(i){var t,s=Array.apply(null,arguments);return s.shift(),"getValue"===i&&this.length&&(t=this.eq(0).data("combodate"))?t.getValue.apply(t,s):this.each(function(){var t=o(this),e=t.data("combodate");e||t.data("combodate",e=new n(this,"object"==typeof i&&i)),"string"==typeof i&&"function"==typeof e[i]&&e[i].apply(e,s)})},o.fn.combodate.defaults={format:"DD-MM-YYYY HH:mm",template:"D / MMM / YYYY   H : mm",value:null,minYear:1970,maxYear:(new Date).getFullYear(),yearDescending:!0,minuteStep:5,secondStep:1,firstItem:"empty",errorClass:null,roundTime:!0,smartDays:!1}})(window.jQuery),(e=>{function i(t){this.init("combodate",t,i.defaults),this.options.viewformat||(this.options.viewformat=this.options.format),t.combodate=e.fn.editableutils.tryParseJson(t.combodate,!0),this.options.combodate=e.extend({},i.defaults.combodate,t.combodate,{format:this.options.format,template:this.options.template})}e.fn.editableutils.inherit(i,e.fn.editabletypes.abstractinput),e.extend(i.prototype,{render:function(){this.$input.combodate(this.options.combodate),"bs3"===e.fn.editableform.engine&&this.$input.siblings().find("select").addClass("form-control"),this.options.inputclass&&this.$input.siblings().find("select").addClass(this.options.inputclass)},value2html:function(t,e){t=t?t.format(this.options.viewformat):"";i.superclass.value2html.call(this,t,e)},html2value:function(t){return t?moment(t,this.options.viewformat):null},value2str:function(t){return t?t.format(this.options.format):""},str2value:function(t){return t?moment(t,this.options.format):null},value2submit:function(t){return this.value2str(t)},value2input:function(t){this.$input.combodate("setValue",t)},input2value:function(){return this.$input.combodate("getValue",null)},activate:function(){this.$input.siblings(".combodate").find("select").eq(0).focus()},autosubmit:function(){}}),i.defaults=e.extend({},e.fn.editabletypes.abstractinput.defaults,{tpl:'<input type="text">',inputclass:null,format:"YYYY-MM-DD",viewformat:null,template:"D / MMM / YYYY",combodate:null}),e.fn.editabletypes.combodate=i})(window.jQuery),(a=>{let o=a.fn.editableform.Constructor.prototype.initInput;a.extend(a.fn.editableform.Constructor.prototype,{initInput:function(){o.apply(this);var t=null===this.input.options.inputclass||!1===this.input.options.inputclass,e="input-sm",i="text,select,textarea,password,email,url,tel,number,range,time,typeaheadjs".split(","),s=(~a.inArray(this.input.type,i)&&(this.input.$input.addClass("form-control editable"),t)&&(this.input.options.inputclass=e,this.input.$input.addClass(e)),"select"===this.input.type&&setTimeout(()=>{this.input.$input.focus().click()},50),this.$form.find(".editable-buttons")),n=t?[e]:this.input.options.inputclass.split(" ");for(let t=0;t<n.length;t++)"input-lg"===n[t].toLowerCase()&&s.find("button").removeClass("btn-sm").addClass("btn-lg")}}),a.fn.editableform.buttons='<button type="submit" class="btn btn-primary btn-sm editable-submit"><i class="bi bi-check"></i></button><button type="button" class="btn btn-secondary btn-sm editable-cancel"><i class="bi bi-x"></i></button>',a.fn.editableform.errorGroupClass="has-error",a.fn.editableform.errorBlockClass=null,a.fn.editableform.engine="bs3"})(window.jQuery),(e=>{e.extend(e.fn.editableContainer.Popup.prototype,{containerName:"popover",containerDataName:"bs.popover",innerCss:".popover-content",defaults:e.fn.popover.Constructor.DEFAULTS,initContainer:function(){var t;e.extend(this.containerOptions,{trigger:"manual",selector:!1,content:" ",template:this.defaults.template}),this.$element.data("template")&&(t=this.$element.data("template"),this.$element.removeData("template")),this.call(this.containerOptions),t&&this.$element.data("template",t)},innerShow:function(){this.call("show")},innerHide:function(){this.call("hide")},innerDestroy:function(){this.call("destroy")},setContainerOption:function(t,e){this.container().options[t]=e},setPosition:function(){!function(){var t,e,i,s=this.tip(),n="function"==typeof this.options.placement?this.options.placement.call(this,s[0],this.$element[0]):this.options.placement,a=/\s?auto?\s?/i,o=a.test(n),a=(o&&(n=n.replace(a,"")||"top"),this.getPosition()),r=s[0].offsetWidth,l=s[0].offsetHeight,h=(o&&(o=this.$element.parent(),t=n,e=document.documentElement.scrollTop||document.body.scrollTop,i="body"==this.options.container?window.innerWidth:o.outerWidth(),h="body"==this.options.container?window.innerHeight:o.outerHeight(),o="body"==this.options.container?0:o.offset().left,n="bottom"==n&&a.top+a.height+l-e>h?"top":"top"==n&&a.top-e-l<0?"bottom":"right"==n&&a.right+r>i?"left":"left"==n&&a.left-r<o?"right":n,s.removeClass(t).addClass(n)),this.getCalculatedOffset(n,a,r,l));this.applyPlacement(h,n)}.call(this.container())}})})(window.jQuery),(y=>{function v(){return new Date(Date.UTC.apply(Date,arguments))}function b(t,e){this._process_options(e),this.element=y(t),this.isInline=!1,this.isInput=this.element.is("input"),this.component=!!this.element.is(".date")&&this.element.find(".add-on, .btn"),this.hasInput=this.component&&this.element.find("input").length,this.component&&0===this.component.length&&(this.component=!1),this.picker=y(w.template),this._buildEvents(),this._attachEvents(),this.isInline?this.picker.addClass("datepicker-inline").appendTo(this.element):this.picker.addClass("datepicker-dropdown dropdown-menu"),this.o.rtl&&(this.picker.addClass("datepicker-rtl"),this.picker.find(".prev i, .next i").toggleClass("icon-arrow-left icon-arrow-right")),this.viewMode=this.o.startView,this.o.calendarWeeks&&this.picker.find("tfoot th.today").attr("colspan",function(t,e){return parseInt(e)+1}),this._allow_update=!1,this.setStartDate(this.o.startDate),this.setEndDate(this.o.endDate),this.setDaysOfWeekDisabled(this.o.daysOfWeekDisabled),this.fillDow(),this.fillMonths(),this._allow_update=!0,this.update(),this.showMode(),this.isInline&&this.show()}function l(t,e){this.element=y(t),this.inputs=y.map(e.inputs,function(t){return t.jquery?t[0]:t}),delete e.inputs,y(this.inputs).datepicker(e).bind("changeDate",y.proxy(this.dateUpdated,this)),this.pickers=y.map(this.inputs,function(t){return y(t).data("datepicker")}),this.updateDates()}b.prototype={constructor:b,_process_options:function(t){this._o=y.extend({},this._o,t);var e=this.o=y.extend({},this._o),t=e.language;switch(g[t]||(t=t.split("-")[0],g[t])||(t=h.language),e.language=t,e.startView){case 2:case"decade":e.startView=2;break;case 1:case"year":e.startView=1;break;default:e.startView=0}switch(e.minViewMode){case 1:case"months":e.minViewMode=1;break;case 2:case"years":e.minViewMode=2;break;default:e.minViewMode=0}e.startView=Math.max(e.startView,e.minViewMode),e.weekStart%=7,e.weekEnd=(e.weekStart+6)%7;t=w.parseFormat(e.format);e.startDate!==-1/0&&(e.startDate=w.parseDate(e.startDate,t,e.language)),e.endDate!==1/0&&(e.endDate=w.parseDate(e.endDate,t,e.language)),e.daysOfWeekDisabled=e.daysOfWeekDisabled||[],Array.isArray(e.daysOfWeekDisabled)||(e.daysOfWeekDisabled=e.daysOfWeekDisabled.split(/[,\s]*/)),e.daysOfWeekDisabled=y.map(e.daysOfWeekDisabled,function(t){return parseInt(t,10)})},_events:[],_secondaryEvents:[],_applyEvents:function(t){for(var e,i,s=0;s<t.length;s++)e=t[s][0],i=t[s][1],e.on(i)},_unapplyEvents:function(t){for(var e,i,s=0;s<t.length;s++)e=t[s][0],i=t[s][1],e.off(i)},_buildEvents:function(){this.isInput?this._events=[[this.element,{focus:y.proxy(this.show,this),keyup:y.proxy(this.update,this),keydown:y.proxy(this.keydown,this)}]]:this.component&&this.hasInput?this._events=[[this.element.find("input"),{focus:y.proxy(this.show,this),keyup:y.proxy(this.update,this),keydown:y.proxy(this.keydown,this)}],[this.component,{click:y.proxy(this.show,this)}]]:this.element.is("div")?this.isInline=!0:this._events=[[this.element,{click:y.proxy(this.show,this)}]],this._secondaryEvents=[[this.picker,{click:y.proxy(this.click,this)}],[y(window),{resize:y.proxy(this.place,this)}],[y(document),{mousedown:y.proxy(function(t){this.element.is(t.target)||this.element.find(t.target).size()||this.picker.is(t.target)||this.picker.find(t.target).size()||this.hide()},this)}]]},_attachEvents:function(){this._detachEvents(),this._applyEvents(this._events)},_detachEvents:function(){this._unapplyEvents(this._events)},_attachSecondaryEvents:function(){this._detachSecondaryEvents(),this._applyEvents(this._secondaryEvents)},_detachSecondaryEvents:function(){this._unapplyEvents(this._secondaryEvents)},_trigger:function(t,e){var i=e||this.date,e=new Date(i.getTime()+6e4*i.getTimezoneOffset());this.element.trigger({type:t,date:e,format:y.proxy(function(t){t=t||this.o.format;return w.formatDate(i,t,this.o.language)},this)})},show:function(t){this.isInline||this.picker.appendTo("body"),this.picker.show(),this.height=(this.component||this.element).outerHeight(),this.place(),this._attachSecondaryEvents(),t&&t.preventDefault(),this._trigger("show")},hide:function(t){this.isInline||this.picker.is(":visible")&&(this.picker.hide().detach(),this._detachSecondaryEvents(),this.viewMode=this.o.startView,this.showMode(),this.o.forceParse&&(this.isInput&&this.element.val()||this.hasInput&&this.element.find("input").val())&&this.setValue(),this._trigger("hide"))},remove:function(){this.hide(),this._detachEvents(),this._detachSecondaryEvents(),this.picker.remove(),delete this.element.data().datepicker,this.isInput||delete this.element.data().date},getDate:function(){var t=this.getUTCDate();return new Date(t.getTime()+6e4*t.getTimezoneOffset())},getUTCDate:function(){return this.date},setDate:function(t){this.setUTCDate(new Date(t.getTime()-6e4*t.getTimezoneOffset()))},setUTCDate:function(t){this.date=t,this.setValue()},setValue:function(){var t=this.getFormattedDate();this.isInput?this.element.val(t):this.component&&this.element.find("input").val(t)},getFormattedDate:function(t){return void 0===t&&(t=this.o.format),w.formatDate(this.date,t,this.o.language)},setStartDate:function(t){this._process_options({startDate:t}),this.update(),this.updateNavArrows()},setEndDate:function(t){this._process_options({endDate:t}),this.update(),this.updateNavArrows()},setDaysOfWeekDisabled:function(t){this._process_options({daysOfWeekDisabled:t}),this.update(),this.updateNavArrows()},place:function(){var t,e,i;this.isInline||(t=parseInt(this.element.parents().filter(function(){return"auto"!=y(this).css("z-index")}).first().css("z-index"))+10,e=(this.component?this.component.parent():this.element).offset(),i=(this.component||this.element).outerHeight(!0),this.picker.css({top:e.top+i,left:e.left,zIndex:t}))},_allow_update:!0,update:function(){var t,e;this._allow_update&&(e=!1,arguments&&arguments.length&&("string"==typeof arguments[0]||arguments[0]instanceof Date)?(t=arguments[0],e=!0):(t=this.isInput?this.element.val():this.element.data("date")||this.element.find("input").val(),delete this.element.data().date),this.date=w.parseDate(t,this.o.format,this.o.language),e&&this.setValue(),this.date<this.o.startDate?this.viewDate=new Date(this.o.startDate):this.date>this.o.endDate?this.viewDate=new Date(this.o.endDate):this.viewDate=new Date(this.date),this.fill())},fillDow:function(){var t,e=this.o.weekStart,i="<tr>";for(this.o.calendarWeeks&&(i+=t='<th class="cw">&nbsp;</th>',this.picker.find(".datepicker-days thead tr:first-child").prepend(t));e<this.o.weekStart+7;)i+='<th class="dow">'+g[this.o.language].daysMin[e++%7]+"</th>";i+="</tr>",this.picker.find(".datepicker-days thead").append(i)},fillMonths:function(){for(var t="",e=0;e<12;)t+='<span class="month">'+g[this.o.language].monthsShort[e++]+"</span>";this.picker.find(".datepicker-months td").html(t)},setRange:function(t){t&&t.length?this.range=y.map(t,function(t){return t.valueOf()}):delete this.range,this.fill()},getClassNames:function(t){var e=[],i=this.viewDate.getUTCFullYear(),s=this.viewDate.getUTCMonth(),n=this.date.valueOf(),a=new Date;return t.getUTCFullYear()<i||t.getUTCFullYear()==i&&t.getUTCMonth()<s?e.push("old"):(t.getUTCFullYear()>i||t.getUTCFullYear()==i&&t.getUTCMonth()>s)&&e.push("new"),this.o.todayHighlight&&t.getUTCFullYear()==a.getFullYear()&&t.getUTCMonth()==a.getMonth()&&t.getUTCDate()==a.getDate()&&e.push("today"),n&&t.valueOf()==n&&e.push("active"),(t.valueOf()<this.o.startDate||t.valueOf()>this.o.endDate||-1!==y.inArray(t.getUTCDay(),this.o.daysOfWeekDisabled))&&e.push("disabled"),this.range&&(t>this.range[0]&&t<this.range[this.range.length-1]&&e.push("range"),-1!=y.inArray(t.valueOf(),this.range))&&e.push("selected"),e},fill:function(){for(var t,e=new Date(this.viewDate),i=e.getUTCFullYear(),e=e.getUTCMonth(),s=this.o.startDate!==-1/0?this.o.startDate.getUTCFullYear():-1/0,n=this.o.startDate!==-1/0?this.o.startDate.getUTCMonth():-1/0,a=this.o.endDate!==1/0?this.o.endDate.getUTCFullYear():1/0,o=this.o.endDate!==1/0?this.o.endDate.getUTCMonth():1/0,r=(this.date&&this.date.valueOf(),this.picker.find(".datepicker-days thead th.datepicker-switch").text(g[this.o.language].months[e]+" "+i),this.picker.find("tfoot th.today").text(g[this.o.language].today).toggle(!1!==this.o.todayBtn),this.picker.find("tfoot th.clear").text(g[this.o.language].clear).toggle(!1!==this.o.clearBtn),this.updateNavArrows(),this.fillMonths(),v(i,e-1,28,0,0,0,0)),e=w.getDaysInMonth(r.getUTCFullYear(),r.getUTCMonth()),l=(r.setUTCDate(e),r.setUTCDate(e-(r.getUTCDay()-this.o.weekStart+7)%7),new Date(r)),h=(l.setUTCDate(l.getUTCDate()+42),l=l.valueOf(),[]);r.valueOf()<l;){r.getUTCDay()==this.o.weekStart&&(h.push("<tr>"),this.o.calendarWeeks)&&(p=new Date(+r+(this.o.weekStart-r.getUTCDay()-7)%7*864e5),p=new Date(+p+(11-p.getUTCDay())%7*864e5),u=new Date(+(u=v(p.getUTCFullYear(),0,1))+(11-u.getUTCDay())%7*864e5),h.push('<td class="cw">'+((p-u)/864e5/7+1)+"</td>")),(p=this.getClassNames(r)).push("day");var p,u=this.o.beforeShowDay(r);void 0===u?u={}:"boolean"==typeof u?u={enabled:u}:"string"==typeof u&&(u={classes:u}),!1===u.enabled&&p.push("disabled"),u.classes&&(p=p.concat(u.classes.split(/\s+/))),u.tooltip&&(t=u.tooltip),p=y.unique(p),h.push('<td class="'+p.join(" ")+'"'+(t?' title="'+t+'"':"")+">"+r.getUTCDate()+"</td>"),r.getUTCDay()==this.o.weekEnd&&h.push("</tr>"),r.setUTCDate(r.getUTCDate()+1)}this.picker.find(".datepicker-days tbody").empty().append(h.join(""));var d=this.date&&this.date.getUTCFullYear(),e=this.picker.find(".datepicker-months").find("th:eq(1)").text(i).end().find("span").removeClass("active"),n=(d&&d==i&&e.eq(this.date.getUTCMonth()).addClass("active"),(i<s||a<i)&&e.addClass("disabled"),i==s&&e.slice(0,n).addClass("disabled"),i==a&&e.slice(o+1).addClass("disabled"),h="",i=10*parseInt(i/10,10),this.picker.find(".datepicker-years").find("th:eq(1)").text(i+"-"+(i+9)).end().find("td"));--i;for(var c=-1;c<11;c++)h+='<span class="year'+(-1==c?" old":10==c?" new":"")+(d==i?" active":"")+(i<s||a<i?" disabled":"")+'">'+i+"</span>",i+=1;n.html(h)},updateNavArrows:function(){if(this._allow_update){var t=new Date(this.viewDate),e=t.getUTCFullYear(),i=t.getUTCMonth();switch(this.viewMode){case 0:this.o.startDate!==-1/0&&e<=this.o.startDate.getUTCFullYear()&&i<=this.o.startDate.getUTCMonth()?this.picker.find(".prev").css({visibility:"hidden"}):this.picker.find(".prev").css({visibility:"visible"}),this.o.endDate!==1/0&&e>=this.o.endDate.getUTCFullYear()&&i>=this.o.endDate.getUTCMonth()?this.picker.find(".next").css({visibility:"hidden"}):this.picker.find(".next").css({visibility:"visible"});break;case 1:case 2:this.o.startDate!==-1/0&&e<=this.o.startDate.getUTCFullYear()?this.picker.find(".prev").css({visibility:"hidden"}):this.picker.find(".prev").css({visibility:"visible"}),this.o.endDate!==1/0&&e>=this.o.endDate.getUTCFullYear()?this.picker.find(".next").css({visibility:"hidden"}):this.picker.find(".next").css({visibility:"visible"})}}},click:function(t){t.preventDefault();var e,i,s,n,a=y(t.target).closest("span, td, th");if(1==a.length)switch(a[0].nodeName.toLowerCase()){case"th":switch(a[0].className){case"datepicker-switch":this.showMode(1);break;case"prev":case"next":var o=w.modes[this.viewMode].navStep*("prev"==a[0].className?-1:1);switch(this.viewMode){case 0:this.viewDate=this.moveMonth(this.viewDate,o);break;case 1:case 2:this.viewDate=this.moveYear(this.viewDate,o)}this.fill();break;case"today":var r=v((r=new Date).getFullYear(),r.getMonth(),r.getDate(),0,0,0),l=(this.showMode(-2),"linked"==this.o.todayBtn?null:"view");this._setDate(r,l);break;case"clear":this.isInput?e=this.element:this.component&&(e=this.element.find("input")),e&&e.val("").change(),this._trigger("changeDate"),this.update(),this.o.autoclose&&this.hide()}break;case"span":a.is(".disabled")||(this.viewDate.setUTCDate(1),a.is(".month")?(i=1,n=a.parent().find("span").index(a),s=this.viewDate.getUTCFullYear(),this.viewDate.setUTCMonth(n),this._trigger("changeMonth",this.viewDate),1===this.o.minViewMode&&this._setDate(v(s,n,i,0,0,0,0))):(s=parseInt(a.text(),10)||0,i=1,n=0,this.viewDate.setUTCFullYear(s),this._trigger("changeYear",this.viewDate),2===this.o.minViewMode&&this._setDate(v(s,n,i,0,0,0,0))),this.showMode(-1),this.fill());break;case"td":a.is(".day")&&!a.is(".disabled")&&(i=parseInt(a.text(),10)||1,s=this.viewDate.getUTCFullYear(),n=this.viewDate.getUTCMonth(),a.is(".old")?0===n?(n=11,--s):--n:a.is(".new")&&(11==n?(n=0,s+=1):n+=1),this._setDate(v(s,n,i,0,0,0,0)))}},_setDate:function(t,e){var i;e&&"date"!=e||(this.date=new Date(t)),e&&"view"!=e||(this.viewDate=new Date(t)),this.fill(),this.setValue(),this._trigger("changeDate"),this.isInput?i=this.element:this.component&&(i=this.element.find("input")),i&&(i.change(),!this.o.autoclose||e&&"date"!=e||this.hide())},moveMonth:function(t,e){if(!e)return t;var i,s,n=new Date(t.valueOf()),a=n.getUTCDate(),o=n.getUTCMonth(),r=Math.abs(e);if(e=0<e?1:-1,1==r)s=-1==e?function(){return n.getUTCMonth()==o}:function(){return n.getUTCMonth()!=i},i=o+e,n.setUTCMonth(i),(i<0||11<i)&&(i=(i+12)%12);else{for(var l=0;l<r;l++)n=this.moveMonth(n,e);i=n.getUTCMonth(),n.setUTCDate(a),s=function(){return i!=n.getUTCMonth()}}for(;s();)n.setUTCDate(--a),n.setUTCMonth(i);return n},moveYear:function(t,e){return this.moveMonth(t,12*e)},dateWithinRange:function(t){return t>=this.o.startDate&&t<=this.o.endDate},keydown:function(t){if(this.picker.is(":not(:visible)"))27==t.keyCode&&this.show();else{var e,i,s,n,a=!1;switch(t.keyCode){case 27:this.hide(),t.preventDefault();break;case 37:case 39:this.o.keyboardNavigation&&(e=37==t.keyCode?-1:1,t.ctrlKey?(i=this.moveYear(this.date,e),s=this.moveYear(this.viewDate,e)):t.shiftKey?(i=this.moveMonth(this.date,e),s=this.moveMonth(this.viewDate,e)):((i=new Date(this.date)).setUTCDate(this.date.getUTCDate()+e),(s=new Date(this.viewDate)).setUTCDate(this.viewDate.getUTCDate()+e)),this.dateWithinRange(i))&&(this.date=i,this.viewDate=s,this.setValue(),this.update(),t.preventDefault(),a=!0);break;case 38:case 40:this.o.keyboardNavigation&&(e=38==t.keyCode?-1:1,t.ctrlKey?(i=this.moveYear(this.date,e),s=this.moveYear(this.viewDate,e)):t.shiftKey?(i=this.moveMonth(this.date,e),s=this.moveMonth(this.viewDate,e)):((i=new Date(this.date)).setUTCDate(this.date.getUTCDate()+7*e),(s=new Date(this.viewDate)).setUTCDate(this.viewDate.getUTCDate()+7*e)),this.dateWithinRange(i))&&(this.date=i,this.viewDate=s,this.setValue(),this.update(),t.preventDefault(),a=!0);break;case 13:this.hide(),t.preventDefault();break;case 9:this.hide()}a&&(this._trigger("changeDate"),this.isInput?n=this.element:this.component&&(n=this.element.find("input")),n)&&n.change()}},showMode:function(t){t&&(this.viewMode=Math.max(this.o.minViewMode,Math.min(2,this.viewMode+t))),this.picker.find(">div").hide().filter(".datepicker-"+w.modes[this.viewMode].clsName).css("display","block"),this.updateNavArrows()}},l.prototype={updateDates:function(){this.dates=y.map(this.pickers,function(t){return t.date}),this.updateRanges()},updateRanges:function(){var i=y.map(this.dates,function(t){return t.valueOf()});y.each(this.pickers,function(t,e){e.setRange(i)})},dateUpdated:function(t){var e=y(t.target).data("datepicker").getUTCDate(),i=y.inArray(t.target,this.inputs),s=this.inputs.length;if(-1!=i){if(e<this.dates[i])for(;0<=i&&e<this.dates[i];)this.pickers[i--].setUTCDate(e);else if(e>this.dates[i])for(;i<s&&e>this.dates[i];)this.pickers[i++].setUTCDate(e);this.updateDates()}},remove:function(){y.map(this.pickers,function(t){t.remove()}),delete this.element.data().datepicker}};var t=y.fn.datepicker,i=y.fn.datepicker=function(a){var o,r=Array.apply(null,arguments);return r.shift(),this.each(function(){var t,e,i=y(this),s=i.data("datepicker"),n="object"==typeof a&&a;if(s||(e=((t,e)=>{var i,s=y(t).data(),n={},a=new RegExp("^"+e.toLowerCase()+"([A-Z])"),e=new RegExp("^"+e.toLowerCase());for(i in s)e.test(i)&&(n[i.replace(a,function(t,e){return e.toLowerCase()})]=s[i]);return n})(this,"date"),t=(t=>{var i,s={};if(g[t]||(t=t.split("-")[0],g[t]))return i=g[t],y.each(p,function(t,e){e in i&&(s[e]=i[e])}),s})(y.extend({},h,e,n).language),t=y.extend({},h,t,e,n),i.is(".input-daterange")||t.inputs?(e={inputs:t.inputs||i.find("input").toArray()},i.data("datepicker",s=new l(this,y.extend(t,e)))):i.data("datepicker",s=new b(this,t))),"string"==typeof a&&"function"==typeof s[a]&&void 0!==(o=s[a].apply(s,r)))return!1}),void 0!==o?o:this},h=y.fn.datepicker.defaults={autoclose:!1,beforeShowDay:y.noop,calendarWeeks:!1,clearBtn:!1,daysOfWeekDisabled:[],endDate:1/0,forceParse:!0,format:"mm/dd/yyyy",keyboardNavigation:!0,language:"en",minViewMode:0,rtl:!1,startDate:-1/0,startView:0,todayBtn:!1,todayHighlight:!1,weekStart:0},p=y.fn.datepicker.locale_opts=["format","rtl","weekStart"],g=(y.fn.datepicker.Constructor=b,y.fn.datepicker.dates={en:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],daysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sun"],daysMin:["Su","Mo","Tu","We","Th","Fr","Sa","Su"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],today:"Today",clear:"Clear"}}),w={modes:[{clsName:"days",navFnc:"Month",navStep:1},{clsName:"months",navFnc:"FullYear",navStep:1},{clsName:"years",navFnc:"FullYear",navStep:10}],isLeapYear:function(t){return t%4==0&&t%100!=0||t%400==0},getDaysInMonth:function(t,e){return[31,w.isLeapYear(t)?29:28,31,30,31,30,31,31,30,31,30,31][e]},validParts:/dd?|DD?|mm?|MM?|yy(?:yy)?/g,nonpunctuation:/[^ -\/:-@\[\u3400-\u9fff-`{-~\t\n\r]+/g,parseFormat:function(t){var e=t.replace(this.validParts,"\0").split("\0"),t=t.match(this.validParts);if(e&&e.length&&t&&0!==t.length)return{separators:e,parts:t};throw new Error("Invalid date format.")},parseDate:function(t,e,i){if(!(t instanceof Date)){if("string"==typeof e&&(e=w.parseFormat(e)),/^[\-+]\d+[dmwy]([\s,]+[\-+]\d+[dmwy])*$/.test(t)){var s,n=/([\-+]\d+)([dmwy])/,a=t.match(/([\-+]\d+)([dmwy])/g);t=new Date;for(var o=0;o<a.length;o++)switch(h=n.exec(a[o]),s=parseInt(h[1]),h[2]){case"d":t.setUTCDate(t.getUTCDate()+s);break;case"m":t=b.prototype.moveMonth.call(b.prototype,t,s);break;case"w":t.setUTCDate(t.getUTCDate()+7*s);break;case"y":t=b.prototype.moveYear.call(b.prototype,t,s)}return v(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate(),0,0,0)}var r,l,h,a=t&&t.match(this.nonpunctuation)||[],t=new Date,p={},u=["yyyy","yy","M","MM","m","mm","d","dd"],d={yyyy:function(t,e){return t.setUTCFullYear(e)},yy:function(t,e){return t.setUTCFullYear(2e3+e)},m:function(t,e){for(--e;e<0;)e+=12;for(t.setUTCMonth(e%=12);t.getUTCMonth()!=e;)t.setUTCDate(t.getUTCDate()-1);return t},d:function(t,e){return t.setUTCDate(e)}},c=(d.M=d.MM=d.mm=d.m,d.dd=d.d,t=v(t.getFullYear(),t.getMonth(),t.getDate(),0,0,0),e.parts.slice());if(a.length!=c.length&&(c=y(c).filter(function(t,e){return-1!==y.inArray(e,u)}).toArray()),a.length==c.length){for(var o=0,f=c.length;o<f;o++){if(r=parseInt(a[o],10),h=c[o],isNaN(r))switch(h){case"MM":l=y(g[i].months).filter(function(){var t=this.slice(0,a[o].length);return t==a[o].slice(0,t.length)}),r=y.inArray(l[0],g[i].months)+1;break;case"M":l=y(g[i].monthsShort).filter(function(){var t=this.slice(0,a[o].length);return t==a[o].slice(0,t.length)}),r=y.inArray(l[0],g[i].monthsShort)+1}p[h]=r}for(var m,o=0;o<u.length;o++)(m=u[o])in p&&!isNaN(p[m])&&d[m](t,p[m])}}return t},formatDate:function(t,e,i){"string"==typeof e&&(e=w.parseFormat(e));for(var s={d:t.getUTCDate(),D:g[i].daysShort[t.getUTCDay()],DD:g[i].days[t.getUTCDay()],m:t.getUTCMonth()+1,M:g[i].monthsShort[t.getUTCMonth()],MM:g[i].months[t.getUTCMonth()],yy:t.getUTCFullYear().toString().substring(2),yyyy:t.getUTCFullYear()},t=(s.dd=(s.d<10?"0":"")+s.d,s.mm=(s.m<10?"0":"")+s.m,[]),n=y.extend([],e.separators),a=0,o=e.parts.length;a<=o;a++)n.length&&t.push(n.shift()),t.push(s[e.parts[a]]);return t.join("")},headTemplate:'<thead><tr><th class="prev"><i class="icon-arrow-left"/></th><th colspan="5" class="datepicker-switch"></th><th class="next"><i class="icon-arrow-right"/></th></tr></thead>',contTemplate:'<tbody><tr><td colspan="7"></td></tr></tbody>',footTemplate:'<tfoot><tr><th colspan="7" class="today"></th></tr><tr><th colspan="7" class="clear"></th></tr></tfoot>'};w.template='<div class="datepicker"><div class="datepicker-days"><table class=" table-condensed">'+w.headTemplate+"<tbody></tbody>"+w.footTemplate+'</table></div><div class="datepicker-months"><table class="table-condensed">'+w.headTemplate+w.contTemplate+w.footTemplate+'</table></div><div class="datepicker-years"><table class="table-condensed">'+w.headTemplate+w.contTemplate+w.footTemplate+"</table></div></div>",y.fn.datepicker.DPGlobal=w,y.fn.datepicker.noConflict=function(){return y.fn.datepicker=t,this},y(document).on("focus.datepicker.data-api click.datepicker.data-api",'[data-provide="datepicker"]',function(t){var e=y(this);e.data("datepicker")||(t.preventDefault(),i.call(e,"show"))}),y(function(){i.call(y('[data-provide="datepicker-inline"]'))})})(window.jQuery),(i=>{function s(t){this.init("date",t,s.defaults),this.initPicker(t,s.defaults)}i.fn.bdatepicker=i.fn.datepicker.noConflict(),i.fn.datepicker||(i.fn.datepicker=i.fn.bdatepicker),i.fn.editableutils.inherit(s,i.fn.editabletypes.abstractinput),i.extend(s.prototype,{initPicker:function(t,e){this.options.viewformat||(this.options.viewformat=this.options.format),t.datepicker=i.fn.editableutils.tryParseJson(t.datepicker,!0),this.options.datepicker=i.extend({},e.datepicker,t.datepicker,{format:this.options.viewformat}),this.options.datepicker.language=this.options.datepicker.language||"en",this.dpg=i.fn.bdatepicker.DPGlobal,this.parsedFormat=this.dpg.parseFormat(this.options.format),this.parsedViewFormat=this.dpg.parseFormat(this.options.viewformat)},render:function(){this.$input.bdatepicker(this.options.datepicker),this.options.clear&&(this.$clear=i('<a href="#"></a>').html(this.options.clear).click(i.proxy(function(t){t.preventDefault(),t.stopPropagation(),this.clear()},this)),this.$tpl.parent().append(i('<div class="editable-clear">').append(this.$clear)))},value2html:function(t,e){t=t?this.dpg.formatDate(t,this.parsedViewFormat,this.options.datepicker.language):"";s.superclass.value2html.call(this,t,e)},html2value:function(t){return this.parseDate(t,this.parsedViewFormat)},value2str:function(t){return t?this.dpg.formatDate(t,this.parsedFormat,this.options.datepicker.language):""},str2value:function(t){return this.parseDate(t,this.parsedFormat)},value2submit:function(t){return this.value2str(t)},value2input:function(t){this.$input.bdatepicker("update",t)},input2value:function(){return this.$input.data("datepicker").date},activate:function(){},clear:function(){this.$input.data("datepicker").date=null,this.$input.find(".active").removeClass("active"),this.options.showbuttons||this.$input.closest("form").submit()},autosubmit:function(){this.$input.on("mouseup",".day",function(t){var e;i(t.currentTarget).is(".old")||i(t.currentTarget).is(".new")||(e=i(this).closest("form"),setTimeout(function(){e.submit()},200))})},parseDate:function(t,e){var i=null;return i=t&&(i=this.dpg.parseDate(t,e,this.options.datepicker.language),"string"==typeof t)&&t!==this.dpg.formatDate(i,e,this.options.datepicker.language)?null:i}}),s.defaults=i.extend({},i.fn.editabletypes.abstractinput.defaults,{tpl:'<div class="editable-date well"></div>',inputclass:null,format:"yyyy-mm-dd",viewformat:null,datepicker:{weekStart:0,startView:0,minViewMode:0,autoclose:!1},clear:"&times; clear"}),i.fn.editabletypes.date=s})(window.jQuery),(t=>{function e(t){this.init("datefield",t,e.defaults),this.initPicker(t,e.defaults)}t.fn.editableutils.inherit(e,t.fn.editabletypes.date),t.extend(e.prototype,{render:function(){this.$input=this.$tpl.find("input"),this.setClass(),this.setAttr("placeholder"),this.$tpl.bdatepicker(this.options.datepicker),this.$input.off("focus keydown"),this.$input.keyup(t.proxy(function(){this.$tpl.removeData("date"),this.$tpl.bdatepicker("update")},this))},value2input:function(t){this.$input.val(t?this.dpg.formatDate(t,this.parsedViewFormat,this.options.datepicker.language):""),this.$tpl.bdatepicker("update")},input2value:function(){return this.html2value(this.$input.val())},activate:function(){t.fn.editabletypes.text.prototype.activate.call(this)},autosubmit:function(){}}),e.defaults=t.extend({},t.fn.editabletypes.date.defaults,{tpl:'<div class="input-append date"><input type="text"/><span class="add-on"><i class="icon-th"></i></span></div>',inputclass:"input-small",datepicker:{weekStart:0,startView:0,minViewMode:0,autoclose:!0}}),t.fn.editabletypes.datefield=e})(window.jQuery),(i=>{function s(t){this.init("datetime",t,s.defaults),this.initPicker(t,s.defaults)}i.fn.editableutils.inherit(s,i.fn.editabletypes.abstractinput),i.extend(s.prototype,{initPicker:function(t,e){this.options.viewformat||(this.options.viewformat=this.options.format),t.datetimepicker=i.fn.editableutils.tryParseJson(t.datetimepicker,!0),this.options.datetimepicker=i.extend({},e.datetimepicker,t.datetimepicker,{format:this.options.viewformat}),this.options.datetimepicker.language=this.options.datetimepicker.language||"en",this.dpg=i.fn.datetimepicker.DPGlobal,this.parsedFormat=this.dpg.parseFormat(this.options.format,this.options.formatType),this.parsedViewFormat=this.dpg.parseFormat(this.options.viewformat,this.options.formatType)},render:function(){this.$input.datetimepicker(this.options.datetimepicker),this.$input.on("changeMode",function(t){var e=i(this).closest("form").parent();setTimeout(function(){e.triggerHandler("resize")},0)}),this.options.clear&&(this.$clear=i('<a href="#"></a>').html(this.options.clear).click(i.proxy(function(t){t.preventDefault(),t.stopPropagation(),this.clear()},this)),this.$tpl.parent().append(i('<div class="editable-clear">').append(this.$clear)))},value2html:function(t,e){t=t?this.dpg.formatDate(this.toUTC(t),this.parsedViewFormat,this.options.datetimepicker.language,this.options.formatType):"";if(!e)return t;s.superclass.value2html.call(this,t,e)},html2value:function(t){t=this.parseDate(t,this.parsedViewFormat);return t?this.fromUTC(t):null},value2str:function(t){return t?this.dpg.formatDate(this.toUTC(t),this.parsedFormat,this.options.datetimepicker.language,this.options.formatType):""},str2value:function(t){t=this.parseDate(t,this.parsedFormat);return t?this.fromUTC(t):null},value2submit:function(t){return this.value2str(t)},value2input:function(t){t&&this.$input.data("datetimepicker").setDate(t)},input2value:function(){var t=this.$input.data("datetimepicker");return t.date?t.getDate():null},activate:function(){},clear:function(){this.$input.data("datetimepicker").date=null,this.$input.find(".active").removeClass("active"),this.options.showbuttons||this.$input.closest("form").submit()},autosubmit:function(){this.$input.on("mouseup",".minute",function(t){var e=i(this).closest("form");setTimeout(function(){e.submit()},200)})},toUTC:function(t){return t&&new Date(t.valueOf()-6e4*t.getTimezoneOffset())},fromUTC:function(t){return t&&new Date(t.valueOf()+6e4*t.getTimezoneOffset())},parseDate:function(t,e){var i=null;return i=t&&(i=this.dpg.parseDate(t,e,this.options.datetimepicker.language,this.options.formatType),"string"==typeof t)&&t!==this.dpg.formatDate(i,e,this.options.datetimepicker.language,this.options.formatType)?null:i}}),s.defaults=i.extend({},i.fn.editabletypes.abstractinput.defaults,{tpl:'<div class="editable-date well"></div>',inputclass:null,format:"yyyy-mm-dd hh:ii",formatType:"standard",viewformat:null,datetimepicker:{todayHighlight:!1,autoclose:!1},clear:"&times; clear"}),i.fn.editabletypes.datetime=s})(window.jQuery),(t=>{function e(t){this.init("datetimefield",t,e.defaults),this.initPicker(t,e.defaults)}t.fn.editableutils.inherit(e,t.fn.editabletypes.datetime),t.extend(e.prototype,{render:function(){this.$input=this.$tpl.find("input"),this.setClass(),this.setAttr("placeholder"),this.$tpl.datetimepicker(this.options.datetimepicker),this.$input.off("focus keydown"),this.$input.keyup(t.proxy(function(){this.$tpl.removeData("date"),this.$tpl.datetimepicker("update")},this))},value2input:function(t){this.$input.val(this.value2html(t)),this.$tpl.datetimepicker("update")},input2value:function(){return this.html2value(this.$input.val())},activate:function(){t.fn.editabletypes.text.prototype.activate.call(this)},autosubmit:function(){}}),e.defaults=t.extend({},t.fn.editabletypes.datetime.defaults,{tpl:'<div class="input-append date"><input type="text"/><span class="add-on"><i class="icon-th"></i></span></div>',inputclass:"input-medium",datetimepicker:{todayHighlight:!1,autoclose:!0}}),t.fn.editabletypes.datetimefield=e})(window.jQuery);
\ No newline at end of file
+(a=>{function n(t,e){this.options=a.extend({},a.fn.editableform.defaults,e),this.$div=a(t),this.options.scope||(this.options.scope=this)}n.prototype={constructor:n,initInput:function(){this.input=this.options.input,this.value=this.input.str2value(this.options.value),this.input.prerender()},initTemplate:function(){this.$form=a(a.fn.editableform.template)},initButtons:function(){var t=this.$form.find(".editable-buttons");t.append(a.fn.editableform.buttons),"bottom"===this.options.showbuttons&&t.addClass("editable-buttons-bottom")},render:function(){this.$loading=a(a.fn.editableform.loading),this.$div.empty().append(this.$loading),this.initTemplate(),this.options.showbuttons?this.initButtons():this.$form.find(".editable-buttons").remove(),this.showLoading(),this.isSaving=!1,this.$div.triggerHandler("rendering"),this.initInput(),this.$form.find("div.editable-input").append(this.input.$tpl),this.$div.append(this.$form),a.when(this.input.render()).then(a.proxy(function(){var t;this.options.showbuttons||this.input.autosubmit(),this.$form.find(".editable-cancel").click(a.proxy(this.cancel,this)),this.input.error?(this.error(this.input.error),this.$form.find(".editable-submit").attr("disabled",!0),this.input.$input.attr("disabled",!0),this.$form.submit(function(t){t.preventDefault()})):(this.error(!1),this.input.$input.removeAttr("disabled"),this.$form.find(".editable-submit").removeAttr("disabled"),t=null==this.value||""===this.value?this.options.defaultValue:this.value,this.input.value2input(t),this.$form.submit(a.proxy(this.submit,this))),this.$div.triggerHandler("rendered"),this.showForm(),this.input.postrender&&this.input.postrender()},this))},cancel:function(){this.$div.triggerHandler("cancel")},showLoading:function(){var t,e;this.$form?(t=this.$form.outerWidth(),e=this.$form.outerHeight(),t&&this.$loading.width(t),e&&this.$loading.height(e),this.$form.hide()):(t=this.$loading.parent().width())&&this.$loading.width(t),this.$loading.show()},showForm:function(t){this.$loading.hide(),this.$form.show(),!1!==t&&this.input.activate(),this.$div.triggerHandler("show")},error:function(t){var e=this.$form.find(".control-group"),i=this.$form.find(".editable-error-block");if(!1===t)e.removeClass(a.fn.editableform.errorGroupClass),i.removeClass(a.fn.editableform.errorBlockClass).empty().hide();else{if(t){for(var s=(""+t).split("\n"),n=0;n<s.length;n++)s[n]=a("<div>").text(s[n]).html();t=s.join("<br>")}e.addClass(a.fn.editableform.errorGroupClass),i.addClass(a.fn.editableform.errorBlockClass).html(t).show()}},submit:function(t){t.stopPropagation(),t.preventDefault();var i,s=this.input.input2value(),t=this.validate(s);if("object"===a.type(t)&&void 0!==t.newValue){if(s=t.newValue,this.input.value2input(s),"string"==typeof t.msg)return this.error(t.msg),void this.showForm()}else if(t)return this.error(t),void this.showForm();this.options.savenochange||this.input.value2str(s)!=this.input.value2str(this.value)?(i=this.input.value2submit(s),this.isSaving=!0,a.when(this.save(i)).done(a.proxy(function(t){this.isSaving=!1;var e="function"==typeof this.options.success?this.options.success.call(this.options.scope,t,s):null;!1===e?(this.error(!1),this.showForm(!1)):"string"==typeof e?(this.error(e),this.showForm()):(e&&"object"==typeof e&&e.hasOwnProperty("newValue")&&(s=e.newValue),this.error(!1),this.value=s,this.$div.triggerHandler("save",{newValue:s,submitValue:i,response:t}))},this)).fail(a.proxy(function(t){this.isSaving=!1,t="function"==typeof this.options.error?this.options.error.call(this.options.scope,t,s):"string"==typeof t?t:t.responseText||t.statusText||"Unknown error!",this.error(t),this.showForm()},this))):this.$div.triggerHandler("nochange")},save:function(t){this.options.pk=a.fn.editableutils.tryParseJson(this.options.pk,!0);var e="function"==typeof this.options.pk?this.options.pk.call(this.options.scope):this.options.pk;if(!!("function"==typeof this.options.url||this.options.url&&("always"===this.options.send||"auto"===this.options.send&&null!=e)))return this.showLoading(),t={name:this.options.name||"",value:t,pk:e},"function"==typeof this.options.params?t=this.options.params.call(this.options.scope,t):(this.options.params=a.fn.editableutils.tryParseJson(this.options.params,!0),a.extend(t,this.options.params)),"function"==typeof this.options.url?this.options.url.call(this.options.scope,t):a.ajax(a.extend({url:this.options.url,data:t,type:"POST"},this.options.ajaxOptions))},validate:function(t){if(void 0===t&&(t=this.value),"function"==typeof this.options.validate)return this.options.validate.call(this.options.scope,t)},option:function(t,e){t in this.options&&(this.options[t]=e),"value"===t&&this.setValue(e)},setValue:function(t,e){this.value=e?this.input.str2value(t):t,this.$form&&this.$form.is(":visible")&&this.input.value2input(this.value)}},a.fn.editableform=function(i){var s=arguments;return this.each(function(){var t=a(this),e=t.data("editableform");e||t.data("editableform",e=new n(this,"object"==typeof i&&i)),"string"==typeof i&&e[i].apply(e,Array.prototype.slice.call(s,1))})},a.fn.editableform.Constructor=n,a.fn.editableform.defaults={type:"text",url:null,params:null,name:null,pk:null,value:null,defaultValue:null,send:"auto",validate:null,success:null,error:null,ajaxOptions:null,showbuttons:!0,scope:null,savenochange:!1},a.fn.editableform.template='<form class="form-inline editableform"><div class="control-group"><div><div class="editable-input"></div><div class="editable-buttons"></div></div><div class="editable-error-block"></div></div></form>',a.fn.editableform.loading='<div class="editableform-loading"></div>',a.fn.editableform.buttons='<button type="submit" class="editable-submit">ok</button><button type="button" class="editable-cancel">cancel</button>',a.fn.editableform.errorGroupClass=null,a.fn.editableform.errorBlockClass="editable-error",a.fn.editableform.engine="jquery"})(window.jQuery),(l=>{l.fn.editableutils={inherit:function(t,e){function i(){}i.prototype=e.prototype,t.prototype=new i,(t.prototype.constructor=t).superclass=e.prototype},setCursorPosition:function(t,e){t.setSelectionRange?t.setSelectionRange(e,e):t.createTextRange&&((t=t.createTextRange()).collapse(!0),t.moveEnd("character",e),t.moveStart("character",e),t.select())},tryParseJson:function(t,e){if("string"==typeof t&&t.length&&t.match(/^[\{\[].*[\}\]]$/))if(e)try{t=new Function("return "+t)()}catch(t){}finally{return t}else t=new Function("return "+t)();return t},sliceObj:function(t,e,i){var s,n,a={};if(Array.isArray(e)&&e.length)for(var o=0;o<e.length;o++)t.hasOwnProperty(s=e[o])&&(a[s]=t[s]),!0!==i&&(n=s.toLowerCase(),t.hasOwnProperty(n))&&(a[s]=t[n]);return a},getConfigData:function(t){var i={};return l.each(t.data(),function(t,e){"object"==typeof e&&(!e||"object"!=typeof e||e.constructor!==Object&&e.constructor!==Array)||(i[t]=e)}),i},objectKeys:function(t){if(Object.keys)return Object.keys(t);if(t!==Object(t))throw new TypeError("Object.keys called on a non-object");var e,i=[];for(e in t)Object.prototype.hasOwnProperty.call(t,e)&&i.push(e);return i},escape:function(t){return l("<div>").text(t).html()},itemsByValue:function(s,t,n){var e,a,o,r;return t&&null!==s?("function"!=typeof n&&(e=n||"value",n=function(t){return t[e]}),a=Array.isArray(s),o=[],r=this,l.each(t,function(t,e){var i;e.children?o=o.concat(r.itemsByValue(s,e.children,n)):a?l.grep(s,function(t){return t==(e&&"object"==typeof e?n(e):e)}).length&&o.push(e):(i=e&&"object"==typeof e?n(e):e,s==i&&o.push(e))}),o):[]},createInput:function(t){var e,i=t.type;return"date"===i&&("inline"===t.mode?l.fn.editabletypes.datefield?i="datefield":l.fn.editabletypes.dateuifield&&(i="dateuifield"):l.fn.editabletypes.date?i="date":l.fn.editabletypes.dateui&&(i="dateui"),"date"!==i||l.fn.editabletypes.date||(i="combodate")),"wysihtml5"!==(i="datetime"===i&&"inline"===t.mode?"datetimefield":i)||l.fn.editabletypes[i]||(i="textarea"),"function"==typeof l.fn.editabletypes[i]?new(e=l.fn.editabletypes[i])(this.sliceObj(t,this.objectKeys(e.defaults))):(l.error("Unknown type: "+i),!1)},supportsTransitions:function(){var t=(document.body||document.documentElement).style,e=["Moz","Webkit","Khtml","O","ms"];if("string"==typeof t[i="transition"])return!0;for(var i=i.charAt(0).toUpperCase()+i.substr(1),s=0;s<e.length;s++)if("string"==typeof t[e[s]+i])return!0;return!1}}})(window.jQuery),(r=>{function l(t,e){this.init(t,e)}function h(t,e){this.init(t,e)}l.prototype={containerName:null,containerDataName:null,innerCss:null,containerClass:"editable-container editable-popup",defaults:{},init:function(t,e){this.$element=r(t),this.options=r.extend({},r.fn.editableContainer.defaults,e),this.splitOptions(),this.formOptions.scope=this.$element[0],this.initContainer(),this.delayedHide=!1,this.$element.on("destroyed",r.proxy(function(){this.destroy()},this)),r(document).data("editable-handlers-attached")||(r(document).on("keyup.editable",function(t){27===t.which&&r(".editable-open").editableContainer("hide")}),r(document).on("click.editable",function(t){var e,i=r(t.target),s=[".editable-container",".ui-datepicker-header",".datepicker",".modal-backdrop",".bootstrap-wysihtml5-insert-image-modal",".bootstrap-wysihtml5-insert-link-modal"];if(r.contains(document.documentElement,t.target)&&!i.is(document)){for(e=0;e<s.length;e++)if(i.is(s[e])||i.parents(s[e]).length)return;l.prototype.closeOthers(t.target)}}),r(document).data("editable-handlers-attached",!0))},splitOptions:function(){if(this.containerOptions={},this.formOptions={},!r.fn[this.containerName])throw new Error(this.containerName+" not found. Have you included corresponding js file?");for(var t in this.options)t in this.defaults?this.containerOptions[t]=this.options[t]:this.formOptions[t]=this.options[t]},tip:function(){return this.container()?this.container().$tip:null},container:function(){var t;return t=this.containerDataName&&(t=this.$element.data(this.containerDataName))?t:this.$element.data(this.containerName)},call:function(){this.$element[this.containerName].apply(this.$element,arguments)},initContainer:function(){this.call(this.containerOptions)},renderForm:function(){this.$form.editableform(this.formOptions).on({save:r.proxy(this.save,this),nochange:r.proxy(function(){this.hide("nochange")},this),cancel:r.proxy(function(){this.hide("cancel")},this),show:r.proxy(function(){this.delayedHide?(this.hide(this.delayedHide.reason),this.delayedHide=!1):this.setPosition()},this),rendering:r.proxy(this.setPosition,this),resize:r.proxy(this.setPosition,this),rendered:r.proxy(function(){this.$element.triggerHandler("shown",r(this.options.scope).data("editable"))},this)}).editableform("render")},show:function(t){this.$element.addClass("editable-open"),!1!==t&&this.closeOthers(this.$element[0]),this.innerShow(),this.tip().addClass(this.containerClass),this.$form,this.$form=r("<div>"),(this.tip().is(this.innerCss)?this.tip():this.tip().find(this.innerCss)).append(this.$form),this.renderForm()},hide:function(t){this.tip()&&this.tip().is(":visible")&&this.$element.hasClass("editable-open")&&(this.$form.data("editableform").isSaving?this.delayedHide={reason:t}:(this.delayedHide=!1,this.$element.removeClass("editable-open"),this.innerHide(),this.$element.triggerHandler("hidden",t||"manual")))},innerShow:function(){},innerHide:function(){},toggle:function(t){this.container()&&this.tip()&&this.tip().is(":visible")?this.hide():this.show(t)},setPosition:function(){},save:function(t,e){this.$element.triggerHandler("save",e),this.hide("save")},option:function(t,e){this.options[t]=e,t in this.containerOptions?(this.containerOptions[t]=e,this.setContainerOption(t,e)):(this.formOptions[t]=e,this.$form&&this.$form.editableform("option",t,e))},setContainerOption:function(t,e){this.call("option",t,e)},destroy:function(){this.hide(),this.innerDestroy(),this.$element.off("destroyed"),this.$element.removeData("editableContainer")},innerDestroy:function(){},closeOthers:function(s){r(".editable-open").each(function(t,e){var i;e===s||r(e).find(s).length||(i=(e=r(e)).data("editableContainer"))&&("cancel"===i.options.onblur?e.data("editableContainer").hide("onblur"):"submit"===i.options.onblur&&e.data("editableContainer").tip().find("form").submit())})},activate:function(){this.tip&&this.tip().is(":visible")&&this.$form&&this.$form.data("editableform").input.activate()}},r.fn.editableContainer=function(a){var o=arguments;return this.each(function(){var t=r(this),e="editableContainer",i=t.data(e),s="object"==typeof a&&a,n="inline"===s.mode?h:l;i||t.data(e,i=new n(this,s)),"string"==typeof a&&i[a].apply(i,Array.prototype.slice.call(o,1))})},r.fn.editableContainer.Popup=l,r.fn.editableContainer.Inline=h,r.fn.editableContainer.defaults={value:null,placement:"top",autohide:!0,onblur:"cancel",anim:!1,mode:"popup"},jQuery.event.special.destroyed={remove:function(t){t.handler&&t.handler()}}})(window.jQuery),(t=>{t.extend(t.fn.editableContainer.Inline.prototype,t.fn.editableContainer.Popup.prototype,{containerName:"editableform",innerCss:".editable-inline",containerClass:"editable-container editable-inline",initContainer:function(){this.$tip=t("<span></span>"),this.options.anim||(this.options.anim=0)},splitOptions:function(){this.containerOptions={},this.formOptions=this.options},tip:function(){return this.$tip},innerShow:function(){this.$element.hide(),this.tip().insertAfter(this.$element).show()},innerHide:function(){this.$tip.hide(this.options.anim,t.proxy(function(){this.$element.show(),this.innerDestroy()},this))},innerDestroy:function(){this.tip()&&this.tip().empty().remove()}})})(window.jQuery),(p=>{function u(t,e){this.$element=p(t),this.options=p.extend({},p.fn.editable.defaults,e,p.fn.editableutils.getConfigData(this.$element)),this.options.selector?this.initLive():this.init(),this.options.highlight&&!p.fn.editableutils.supportsTransitions()&&(this.options.highlight=!1)}u.prototype={constructor:u,init:function(){var t,e=!1;if(this.options.name=this.options.name||this.$element.attr("id"),this.options.scope=this.$element[0],this.input=p.fn.editableutils.createInput(this.options),this.input){switch(null==this.options.value?(this.value=this.input.html2value(p.trim(this.$element.html())),e=!0):(this.options.value=p.fn.editableutils.tryParseJson(this.options.value,!0),"string"==typeof this.options.value?this.value=this.input.str2value(this.options.value):this.value=this.options.value),this.$element.addClass("editable"),"textarea"===this.input.type&&this.$element.addClass("editable-pre-wrapped"),"manual"!==this.options.toggle?(this.$element.addClass("editable-click"),this.$element.on(this.options.toggle+".editable",p.proxy(function(t){this.options.disabled||t.preventDefault(),"mouseenter"===this.options.toggle?this.show():(t="click"!==this.options.toggle,this.toggle(t))},this))):this.$element.attr("tabindex",-1),"function"==typeof this.options.display&&(this.options.autotext="always"),this.options.autotext){case"always":t=!0;break;case"auto":t=!p.trim(this.$element.text()).length&&null!=this.value&&!e;break;default:t=!1}p.when(!t||this.render()).then(p.proxy(function(){this.options.disabled?this.disable():this.enable(),this.$element.triggerHandler("init",this)},this))}},initLive:function(){var t=this.options.selector;this.options.selector=!1,this.options.autotext="never",this.$element.on(this.options.toggle+".editable",t,p.proxy(function(t){var e=p(t.target);e.data("editable")||(e.hasClass(this.options.emptyclass)&&e.empty(),e.editable(this.options).trigger(t))},this))},render:function(t){if(!1!==this.options.display)return this.input.value2htmlFinal?this.input.value2html(this.value,this.$element[0],this.options.display,t):"function"==typeof this.options.display?this.options.display.call(this.$element[0],this.value,t):this.input.value2html(this.value,this.$element[0])},enable:function(){this.options.disabled=!1,this.$element.removeClass("editable-disabled"),this.handleEmpty(this.isEmpty),"manual"!==this.options.toggle&&"-1"===this.$element.attr("tabindex")&&this.$element.removeAttr("tabindex")},disable:function(){this.options.disabled=!0,this.hide(),this.$element.addClass("editable-disabled"),this.handleEmpty(this.isEmpty),this.$element.attr("tabindex",-1)},toggleDisabled:function(){this.options.disabled?this.enable():this.disable()},option:function(t,e){if(t&&"object"==typeof t)p.each(t,p.proxy(function(t,e){this.option(p.trim(t),e)},this));else{if(this.options[t]=e,"disabled"===t)return e?this.disable():this.enable();"value"===t&&this.setValue(e),this.container&&this.container.option(t,e),this.input.option&&this.input.option(t,e)}},handleEmpty:function(t){!1!==this.options.display&&(void 0!==t?this.isEmpty=t:"function"==typeof this.input.isEmpty?this.isEmpty=this.input.isEmpty(this.$element):this.isEmpty=""===p.trim(this.$element.html()),this.options.disabled?this.isEmpty&&(this.$element.empty(),this.options.emptyclass)&&this.$element.removeClass(this.options.emptyclass):this.isEmpty?(this.$element.html(this.options.emptytext),this.options.emptyclass&&this.$element.addClass(this.options.emptyclass)):this.options.emptyclass&&this.$element.removeClass(this.options.emptyclass))},show:function(t){if(!this.options.disabled){if(this.container){if(this.container.tip().is(":visible"))return}else{var e=p.extend({},this.options,{value:this.value,input:this.input});this.$element.editableContainer(e),this.$element.on("save.internal",p.proxy(this.save,this)),this.container=this.$element.data("editableContainer")}this.container.show(t)}},hide:function(){this.container&&this.container.hide()},toggle:function(t){this.container&&this.container.tip().is(":visible")?this.hide():this.show(t)},save:function(t,e){var i,s;this.options.unsavedclass&&("function"==typeof this.options.url||!1===this.options.display||void 0!==e.response||this.options.savenochange&&this.input.value2str(this.value)!==this.input.value2str(e.newValue)?this.$element.removeClass(this.options.unsavedclass):this.$element.addClass(this.options.unsavedclass)),this.options.highlight&&(i=this.$element,s=i.css("background-color"),i.css("background-color",this.options.highlight),setTimeout(function(){"transparent"===s&&(s=""),i.css("background-color",s),i.addClass("editable-bg-transition"),setTimeout(function(){i.removeClass("editable-bg-transition")},1700)},10)),this.setValue(e.newValue,!1,e.response)},validate:function(){if("function"==typeof this.options.validate)return this.options.validate.call(this,this.value)},setValue:function(t,e,i){this.value=e?this.input.str2value(t):t,this.container&&this.container.option("value",this.value),p.when(this.render(i)).then(p.proxy(function(){this.handleEmpty()},this))},activate:function(){this.container&&this.container.activate()},destroy:function(){this.disable(),this.container&&this.container.destroy(),this.input.destroy(),"manual"!==this.options.toggle&&(this.$element.removeClass("editable-click"),this.$element.off(this.options.toggle+".editable")),this.$element.off("save.internal"),this.$element.removeClass("editable editable-open editable-disabled"),this.$element.removeData("editable")}},p.fn.editable=function(s){var i={},n=arguments,a="editable";switch(s){case"validate":return this.each(function(){var t,e=p(this).data(a);e&&(t=e.validate())&&(i[e.options.name]=t)}),i;case"getValue":return 2===arguments.length&&!0===arguments[1]?i=this.eq(0).data(a).value:this.each(function(){var t=p(this).data(a);t&&null!=t.value&&(i[t.options.name]=t.input.value2submit(t.value))}),i;case"submit":var t,e,o,r=arguments[1]||{},l=this,h=this.editable("validate");return p.isEmptyObject(h)?(o={},1===l.length?(e={name:(t=l.data("editable")).options.name||"",value:t.input.value2submit(t.value),pk:"function"==typeof t.options.pk?t.options.pk.call(t.options.scope):t.options.pk},"function"==typeof t.options.params?e=t.options.params.call(t.options.scope,e):(t.options.params=p.fn.editableutils.tryParseJson(t.options.params,!0),p.extend(e,t.options.params)),o={url:t.options.url,data:e,type:"POST"},r.success=r.success||t.options.success,r.error=r.error||t.options.error):(e=this.editable("getValue"),o={url:r.url,data:e,type:"POST"}),o.success="function"==typeof r.success?function(t){r.success.call(l,t,r)}:p.noop,o.error="function"==typeof r.error?function(){r.error.apply(l,arguments)}:p.noop,r.ajaxOptions&&p.extend(o,r.ajaxOptions),r.data&&p.extend(o.data,r.data),p.ajax(o)):"function"==typeof r.error&&r.error.call(l,h),this}return this.each(function(){var t=p(this),e=t.data(a),i="object"==typeof s&&s;i&&i.selector?e=new u(this,i):(e||t.data(a,e=new u(this,i)),"string"==typeof s&&e[s].apply(e,Array.prototype.slice.call(n,1)))})},p.fn.editable.defaults={type:"text",disabled:!1,toggle:"click",emptytext:"Empty",autotext:"auto",value:null,display:null,emptyclass:"editable-empty",unsavedclass:"editable-unsaved",selector:null,highlight:"#FFFF80"}})(window.jQuery),(s=>{function t(){}s.fn.editabletypes={},t.prototype={init:function(t,e,i){this.type=t,this.options=s.extend({},i,e)},prerender:function(){this.$tpl=s(this.options.tpl),this.$input=this.$tpl,this.$clear=null,this.error=null},render:function(){},value2html:function(t,e){s(e)[this.options.escape?"text":"html"](s.trim(t))},html2value:function(t){return s("<div>").html(t).text()},value2str:function(t){return t},str2value:function(t){return t},value2submit:function(t){return t},value2input:function(t){this.$input.val(t)},input2value:function(){return this.$input.val()},activate:function(){this.$input.is(":visible")&&this.$input.focus()},clear:function(){this.$input.val(null)},escape:function(t){return s("<div>").text(t).html()},autosubmit:function(){},destroy:function(){},setClass:function(){this.options.inputclass&&this.$input.addClass(this.options.inputclass)},setAttr:function(t){null!=this.options[t]&&this.$input.attr(t,this.options[t])},option:function(t,e){this.options[t]=e}},t.defaults={tpl:"",inputclass:null,escape:!0,scope:null,showbuttons:!0},s.extend(s.fn.editabletypes,{abstractinput:t})})(window.jQuery),(r=>{function t(t){}r.fn.editableutils.inherit(t,r.fn.editabletypes.abstractinput),r.extend(t.prototype,{render:function(){var t=r.Deferred();return this.error=null,this.onSourceReady(function(){this.renderList(),t.resolve()},function(){this.error=this.options.sourceError,t.resolve()}),t.promise()},html2value:function(t){return null},value2html:function(t,e,i,s){function n(){"function"==typeof i?i.call(e,t,this.sourceData,s):this.value2htmlFinal(t,e),a.resolve()}var a=r.Deferred();return null===t?n.call(this):this.onSourceReady(n,function(){a.resolve()}),a.promise()},onSourceReady:function(e,i){var t;if("function"==typeof this.options.source?(t=this.options.source.call(this.options.scope),this.sourceData=null):t=this.options.source,this.options.sourceCache&&Array.isArray(this.sourceData))e.call(this);else{try{t=r.fn.editableutils.tryParseJson(t,!1)}catch(t){return void i.call(this)}if("string"==typeof t){if(this.options.sourceCache){var s,n=t;if(r(document).data(n)||r(document).data(n,{}),!1===(s=r(document).data(n)).loading&&s.sourceData)return this.sourceData=s.sourceData,this.doPrepend(),void e.call(this);if(!0===s.loading)return s.callbacks.push(r.proxy(function(){this.sourceData=s.sourceData,this.doPrepend(),e.call(this)},this)),void s.err_callbacks.push(r.proxy(i,this));s.loading=!0,s.callbacks=[],s.err_callbacks=[]}n=r.extend({url:t,type:"get",cache:!1,dataType:"json",success:r.proxy(function(t){s&&(s.loading=!1),this.sourceData=this.makeArray(t),Array.isArray(this.sourceData)?(s&&(s.sourceData=this.sourceData,r.each(s.callbacks,function(){this.call()})),this.doPrepend(),e.call(this)):(i.call(this),s&&r.each(s.err_callbacks,function(){this.call()}))},this),error:r.proxy(function(){i.call(this),s&&(s.loading=!1,r.each(s.err_callbacks,function(){this.call()}))},this)},this.options.sourceOptions);r.ajax(n)}else this.sourceData=this.makeArray(t),(Array.isArray(this.sourceData)?(this.doPrepend(),e):i).call(this)}},doPrepend:function(){null!=this.options.prepend&&(Array.isArray(this.prependData)||("function"==typeof this.options.prepend&&(this.options.prepend=this.options.prepend.call(this.options.scope)),this.options.prepend=r.fn.editableutils.tryParseJson(this.options.prepend,!0),"string"==typeof this.options.prepend&&(this.options.prepend={"":this.options.prepend}),this.prependData=this.makeArray(this.options.prepend)),Array.isArray(this.prependData))&&Array.isArray(this.sourceData)&&(this.sourceData=this.prependData.concat(this.sourceData))},renderList:function(){},value2htmlFinal:function(t,e){},makeArray:function(t){var i,s,e,n=[];if(!t||"string"==typeof t)return null;if(Array.isArray(t))for(var a=function(t,e){if(s={value:t,text:e},2<=i++)return!1},o=0;o<t.length;o++)"object"==typeof(e=t[o])?(i=0,r.each(e,a),1===i?n.push(s):1<i&&(e.children&&(e.children=this.makeArray(e.children)),n.push(e))):n.push({value:e,text:e});else r.each(t,function(t,e){n.push({value:t,text:e})});return n},option:function(t,e){this.options[t]=e,"source"===t&&(this.sourceData=null),"prepend"===t&&(this.prependData=null)}}),t.defaults=r.extend({},r.fn.editabletypes.abstractinput.defaults,{source:null,prepend:!1,sourceError:"Error when loading list",sourceCache:!0,sourceOptions:null}),r.fn.editabletypes.list=t})(window.jQuery),(i=>{function e(t){this.init("text",t,e.defaults)}i.fn.editableutils.inherit(e,i.fn.editabletypes.abstractinput),i.extend(e.prototype,{render:function(){this.renderClear(),this.setClass(),this.setAttr("placeholder")},activate:function(){this.$input.is(":visible")&&(this.$input.focus(),i.fn.editableutils.setCursorPosition(this.$input.get(0),this.$input.val().length),this.toggleClear)&&this.toggleClear()},renderClear:function(){this.options.clear&&(this.$clear=i('<span class="editable-clear-x"></span>'),this.$input.after(this.$clear).css("padding-right",24).keyup(i.proxy(function(t){var e;~i.inArray(t.keyCode,[40,38,9,13,27])||(clearTimeout(this.t),(e=this).t=setTimeout(function(){e.toggleClear(t)},100))},this)).parent().css("position","relative"),this.$clear.click(i.proxy(this.clear,this)))},postrender:function(){},toggleClear:function(t){var e,i;this.$clear&&(e=this.$input.val().length,i=this.$clear.is(":visible"),e&&!i&&this.$clear.show(),!e)&&i&&this.$clear.hide()},clear:function(){this.$clear.hide(),this.$input.val("").focus()}}),e.defaults=i.extend({},i.fn.editabletypes.abstractinput.defaults,{tpl:'<input type="text">',placeholder:null,clear:!0}),i.fn.editabletypes.text=e})(window.jQuery),(e=>{function i(t){this.init("textarea",t,i.defaults)}e.fn.editableutils.inherit(i,e.fn.editabletypes.abstractinput),e.extend(i.prototype,{render:function(){this.setClass(),this.setAttr("placeholder"),this.setAttr("rows"),this.$input.keydown(function(t){t.ctrlKey&&13===t.which&&e(this).closest("form").submit()})},activate:function(){e.fn.editabletypes.text.prototype.activate.call(this)}}),i.defaults=e.extend({},e.fn.editabletypes.abstractinput.defaults,{tpl:"<textarea></textarea>",inputclass:"input-large",placeholder:null,rows:7}),e.fn.editabletypes.textarea=i})(window.jQuery),(a=>{function e(t){this.init("select",t,e.defaults)}a.fn.editableutils.inherit(e,a.fn.editabletypes.list),a.extend(e.prototype,{renderList:function(){this.$input.empty();var n=function(t,e){var i;if(Array.isArray(e))for(var s=0;s<e.length;s++)i={},e[s].children?(i.label=e[s].text,t.append(n(a("<optgroup>",i),e[s].children))):(i.value=e[s].value,e[s].disabled&&(i.disabled=!0),t.append(a("<option>",i).text(e[s].text)));return t};n(this.$input,this.sourceData),this.setClass(),this.$input.on("keydown.editable",function(t){13===t.which&&a(this).closest("form").submit()})},value2htmlFinal:function(t,e){var i="",t=a.fn.editableutils.itemsByValue(t,this.sourceData);t.length&&(i=t[0].text),a.fn.editabletypes.abstractinput.prototype.value2html.call(this,i,e)},autosubmit:function(){this.$input.off("keydown.editable").on("change.editable",function(){a(this).closest("form").submit()})}}),e.defaults=a.extend({},a.fn.editabletypes.list.defaults,{tpl:"<select></select>"}),a.fn.editabletypes.select=e})(window.jQuery),(n=>{function e(t){this.init("checklist",t,e.defaults)}n.fn.editableutils.inherit(e,n.fn.editabletypes.list),n.extend(e.prototype,{renderList:function(){var t;if(this.$tpl.empty(),Array.isArray(this.sourceData)){for(var e=0;e<this.sourceData.length;e++)t=n("<label>").append(n("<input>",{type:"checkbox",value:this.sourceData[e].value})).append(n("<span>").text(" "+this.sourceData[e].text)),n("<div>").append(t).appendTo(this.$tpl);this.$input=this.$tpl.find('input[type="checkbox"]'),this.setClass()}},value2str:function(t){return Array.isArray(t)?t.sort().join(this.options.separator.trim()):""},str2value:function(t){var e;return"string"==typeof t&&t.length?(e=new RegExp("\\s*"+n.trim(this.options.separator)+"\\s*"),t.split(e)):Array.isArray(t)?t:[t]},value2input:function(s){this.$input.prop("checked",!1),Array.isArray(s)&&s.length&&this.$input.each(function(t,e){var i=n(e);n.each(s,function(t,e){i.val()==e&&i.prop("checked",!0)})})},input2value:function(){var i=[];return this.$input.filter(":checked").each(function(t,e){i.push(n(e).val())}),i},value2htmlFinal:function(t,e){var i=[],t=n.fn.editableutils.itemsByValue(t,this.sourceData),s=this.options.escape;t.length?(n.each(t,function(t,e){e=s?n.fn.editableutils.escape(e.text):e.text;i.push(e)}),n(e).html(i.join("<br>"))):n(e).empty()},activate:function(){this.$input.first().focus()},autosubmit:function(){this.$input.on("keydown",function(t){13===t.which&&n(this).closest("form").submit()})}}),e.defaults=n.extend({},n.fn.editabletypes.list.defaults,{tpl:'<div class="editable-checklist"></div>',inputclass:null,separator:","}),n.fn.editabletypes.checklist=e})(window.jQuery),(i=>{function e(t){this.init("password",t,e.defaults)}i.fn.editableutils.inherit(e,i.fn.editabletypes.text),i.extend(e.prototype,{value2html:function(t,e){t?i(e).text("[hidden]"):i(e).empty()},html2value:function(t){return null}}),e.defaults=i.extend({},i.fn.editabletypes.text.defaults,{tpl:'<input type="password">'}),i.fn.editabletypes.password=e})(window.jQuery),(t=>{function e(t){this.init("email",t,e.defaults)}t.fn.editableutils.inherit(e,t.fn.editabletypes.text),e.defaults=t.extend({},t.fn.editabletypes.text.defaults,{tpl:'<input type="email">'}),t.fn.editabletypes.email=e})(window.jQuery),(t=>{function e(t){this.init("url",t,e.defaults)}t.fn.editableutils.inherit(e,t.fn.editabletypes.text),e.defaults=t.extend({},t.fn.editabletypes.text.defaults,{tpl:'<input type="url">'}),t.fn.editabletypes.url=e})(window.jQuery),(t=>{function e(t){this.init("tel",t,e.defaults)}t.fn.editableutils.inherit(e,t.fn.editabletypes.text),e.defaults=t.extend({},t.fn.editabletypes.text.defaults,{tpl:'<input type="tel">'}),t.fn.editabletypes.tel=e})(window.jQuery),(t=>{function e(t){this.init("number",t,e.defaults)}t.fn.editableutils.inherit(e,t.fn.editabletypes.text),t.extend(e.prototype,{render:function(){e.superclass.render.call(this),this.setAttr("min"),this.setAttr("max"),this.setAttr("step")},postrender:function(){this.$clear&&this.$clear.css({right:24})}}),e.defaults=t.extend({},t.fn.editabletypes.text.defaults,{tpl:'<input type="number">',inputclass:"input-mini",min:null,max:null,step:null}),t.fn.editabletypes.number=e})(window.jQuery),(t=>{function e(t){this.init("range",t,e.defaults)}t.fn.editableutils.inherit(e,t.fn.editabletypes.number),t.extend(e.prototype,{render:function(){this.$input=this.$tpl.filter("input"),this.setClass(),this.setAttr("min"),this.setAttr("max"),this.setAttr("step"),this.$input.on("input",function(){t(this).siblings("output").text(t(this).val())})},activate:function(){this.$input.focus()}}),e.defaults=t.extend({},t.fn.editabletypes.number.defaults,{tpl:'<input type="range"><output style="width: 30px; display: inline-block"></output>',inputclass:"input-medium"}),t.fn.editabletypes.range=e})(window.jQuery),(t=>{function e(t){this.init("time",t,e.defaults)}t.fn.editableutils.inherit(e,t.fn.editabletypes.abstractinput),t.extend(e.prototype,{render:function(){this.setClass()}}),e.defaults=t.extend({},t.fn.editabletypes.abstractinput.defaults,{tpl:'<input type="time">'}),t.fn.editabletypes.time=e})(window.jQuery),(a=>{function o(t){var e,i;this.init("select2",t,o.defaults),t.select2=t.select2||{},this.sourceData=null,t.placeholder&&(t.select2.placeholder=t.placeholder),!t.select2.tags&&t.source&&(e=t.source,"string"==typeof(e="function"==typeof t.source?t.source.call(t.scope):e)?(t.select2.ajax=t.select2.ajax||{},t.select2.ajax.data||(t.select2.ajax.data=function(t){return{query:t}}),t.select2.ajax.results||(t.select2.ajax.results=function(t){return{results:t}}),t.select2.ajax.url=e):(this.sourceData=this.convertSource(e),t.select2.data=this.sourceData)),this.options.select2=a.extend({},o.defaults.select2,t.select2),this.isMultiple=this.options.select2.tags||this.options.select2.multiple,this.isRemote="ajax"in this.options.select2,this.idFunc=this.options.select2.id,"function"!=typeof this.idFunc&&(i=this.idFunc||"id",this.idFunc=function(t){return t[i]}),this.formatSelection=this.options.select2.formatSelection,"function"!=typeof this.formatSelection&&(this.formatSelection=function(t){return t.text})}a.fn.editableutils.inherit(o,a.fn.editabletypes.abstractinput),a.extend(o.prototype,{render:function(){this.setClass(),this.isRemote&&this.$input.on("select2-loaded",a.proxy(function(t){this.sourceData=t.items.results},this)),this.isMultiple&&this.$input.on("change",function(){a(this).closest("form").parent().triggerHandler("resize")})},value2html:function(t,e){var i,s="",n=this;this.options.select2.tags?i=t:this.sourceData&&(i=a.fn.editableutils.itemsByValue(t,this.sourceData,this.idFunc)),Array.isArray(i)?(s=[],a.each(i,function(t,e){s.push(e&&"object"==typeof e?n.formatSelection(e):e)})):i&&(s=n.formatSelection(i)),s=Array.isArray(s)?s.join(this.options.viewseparator):s,o.superclass.value2html.call(this,s,e)},html2value:function(t){return this.options.select2.tags?this.str2value(t,this.options.viewseparator):null},value2input:function(t){var e,i;Array.isArray(t)&&(t=t.join(this.getSeparator())),this.$input.data("select2")?this.$input.val(t).trigger("change",!0):(this.$input.val(t),this.$input.select2(this.options.select2)),!this.isRemote||this.isMultiple||this.options.select2.initSelection||(e=this.options.select2.id,i=this.options.select2.formatSelection,e)||i||(e=a(this.options.scope)).data("editable").isEmpty||(i={id:t,text:e.text()},this.$input.select2("data",i))},input2value:function(){return this.$input.select2("val")},str2value:function(t,e){if("string"!=typeof t||!this.isMultiple)return t;var i,s,n;if(e=e||this.getSeparator(),null===t||t.length<1)return null;for(s=0,n=(i=t.split(e)).length;s<n;s+=1)i[s]=a.trim(i[s]);return i},autosubmit:function(){this.$input.on("change",function(t,e){e||a(this).closest("form").submit()})},getSeparator:function(){return this.options.select2.separator||a.fn.select2.defaults.separator},convertSource:function(t){if(Array.isArray(t)&&t.length&&void 0!==t[0].value)for(var e=0;e<t.length;e++)void 0!==t[e].value&&(t[e].id=t[e].value,delete t[e].value);return t},destroy:function(){this.$input&&this.$input.data("select2")&&this.$input.select2("destroy")}}),o.defaults=a.extend({},a.fn.editabletypes.abstractinput.defaults,{tpl:'<input type="hidden">',select2:null,placeholder:null,source:null,viewseparator:", "}),a.fn.editabletypes.select2=o})(window.jQuery),(o=>{function n(t,e){this.$element=o(t),this.$element.is("input")?(this.options=o.extend({},o.fn.combodate.defaults,e,this.$element.data()),this.init()):o.error("Combodate should be applied to INPUT element")}n.prototype={constructor:n,init:function(){this.map={day:["D","date"],month:["M","month"],year:["Y","year"],hour:["[Hh]","hours"],minute:["m","minutes"],second:["s","seconds"],ampm:["[Aa]",""]},this.$widget=o('<span class="combodate"></span>').html(this.getTemplate()),this.initCombos(),this.$widget.on("change","select",o.proxy(function(t){this.$element.val(this.getValue()).change(),this.options.smartDays&&(o(t.target).is(".month")||o(t.target).is(".year"))&&this.fillCombo("day")},this)),this.$widget.find("select").css("width","auto"),this.$element.hide().after(this.$widget),this.setValue(this.$element.val()||this.options.value)},getTemplate:function(){var s=this.options.template;return o.each(this.map,function(t,e){e=e[0];var i=new RegExp(e+"+"),e=1<e.length?e.substring(1,2):e;s=s.replace(i,"{"+e+"}")}),s=s.replace(/ /g,"&nbsp;"),o.each(this.map,function(t,e){e=1<(e=e[0]).length?e.substring(1,2):e;s=s.replace("{"+e+"}",'<select class="'+t+'"></select>')}),s},initCombos:function(){for(var t in this.map){var e=this.$widget.find("."+t);this["$"+t]=e.length?e:null,this.fillCombo(t)}},fillCombo:function(t){var e=this["$"+t];if(e){var i=this["fill"+t.charAt(0).toUpperCase()+t.slice(1)](),t=e.val();e.empty();for(var s=0;s<i.length;s++)e.append('<option value="'+i[s][0]+'">'+i[s][1]+"</option>");e.val(t)}},fillCommon:function(t){var e,i=[];return"name"===this.options.firstItem?(e=(e="function"==typeof(e=moment.relativeTime||moment.langData()._relativeTime)[t]?e[t](1,!0,t,!1):e[t]).split(" ").reverse()[0],i.push(["",e])):"empty"===this.options.firstItem&&i.push(["",""]),i},fillDay:function(){var t,e,i,s,n=this.fillCommon("d"),a=-1!==this.options.template.indexOf("DD"),o=31;for(this.options.smartDays&&this.$month&&this.$year&&(i=parseInt(this.$month.val(),10),s=parseInt(this.$year.val(),10),isNaN(i)||isNaN(s)||(o=moment([s,i]).daysInMonth())),e=1;e<=o;e++)t=a?this.leadZero(e):e,n.push([e,t]);return n},fillMonth:function(){for(var t,e=this.fillCommon("M"),i=-1!==this.options.template.indexOf("MMMM"),s=-1!==this.options.template.indexOf("MMM"),n=-1!==this.options.template.indexOf("MM"),a=0;a<=11;a++)t=i?moment().date(1).month(a).format("MMMM"):s?moment().date(1).month(a).format("MMM"):n?this.leadZero(a+1):a+1,e.push([a,t]);return e},fillYear:function(){for(var t,e=[],i=-1!==this.options.template.indexOf("YYYY"),s=this.options.maxYear;s>=this.options.minYear;s--)t=i?s:(s+"").substring(2),e[this.options.yearDescending?"push":"unshift"]([s,t]);return e=this.fillCommon("y").concat(e)},fillHour:function(){for(var t,e=this.fillCommon("h"),i=-1!==this.options.template.indexOf("h"),s=(this.options.template.indexOf("H"),-1!==this.options.template.toLowerCase().indexOf("hh")),n=i?12:23,a=i?1:0;a<=n;a++)t=s?this.leadZero(a):a,e.push([a,t]);return e},fillMinute:function(){for(var t,e=this.fillCommon("m"),i=-1!==this.options.template.indexOf("mm"),s=0;s<=59;s+=this.options.minuteStep)t=i?this.leadZero(s):s,e.push([s,t]);return e},fillSecond:function(){for(var t,e=this.fillCommon("s"),i=-1!==this.options.template.indexOf("ss"),s=0;s<=59;s+=this.options.secondStep)t=i?this.leadZero(s):s,e.push([s,t]);return e},fillAmpm:function(){var t=-1!==this.options.template.indexOf("a");this.options.template.indexOf("A");return[["am",t?"am":"AM"],["pm",t?"pm":"PM"]]},getValue:function(t){var e,s={},n=this,a=!1;return o.each(this.map,function(t,e){var i;if("ampm"!==t)return i="day"===t?1:0,s[t]=n["$"+t]?parseInt(n["$"+t].val(),10):i,isNaN(s[t])?!(a=!0):void 0}),a?"":(this.$ampm&&(s.hour=12===s.hour?"am"===this.$ampm.val()?0:12:"am"===this.$ampm.val()?s.hour:s.hour+12),e=moment([s.year,s.month,s.day,s.hour,s.minute,s.second]),this.highlight(e),null===(t=void 0===t?this.options.format:t)?e.isValid()?e:null:e.isValid()?e.format(t):"")},setValue:function(t){var i,s,n;function a(t,s){var n={};return t.children("option").each(function(t,e){var i,e=o(e).attr("value");""!==e&&(i=Math.abs(e-s),void 0===n.distance||i<n.distance)&&(n={value:e,distance:i})}),n.value}t&&(i="string"==typeof t?moment(t,this.options.format):moment(t),s=this,n={},i.isValid())&&(o.each(this.map,function(t,e){"ampm"!==t&&(n[t]=i[e[1]]())}),this.$ampm&&(12<=n.hour?(n.ampm="pm",12<n.hour&&(n.hour-=12)):(n.ampm="am",0===n.hour&&(n.hour=12))),o.each(n,function(t,e){s["$"+t]&&("minute"===t&&1<s.options.minuteStep&&s.options.roundTime&&(e=a(s["$"+t],e)),"second"===t&&1<s.options.secondStep&&s.options.roundTime&&(e=a(s["$"+t],e)),s["$"+t].val(e))}),this.options.smartDays&&this.fillCombo("day"),this.$element.val(i.format(this.options.format)).change())},highlight:function(t){t.isValid()?this.options.errorClass?this.$widget.removeClass(this.options.errorClass):this.$widget.find("select").css("border-color",this.borderColor):this.options.errorClass?this.$widget.addClass(this.options.errorClass):(this.borderColor||(this.borderColor=this.$widget.find("select").css("border-color")),this.$widget.find("select").css("border-color","red"))},leadZero:function(t){return t<=9?"0"+t:t},destroy:function(){this.$widget.remove(),this.$element.removeData("combodate").show()}},o.fn.combodate=function(i){var t,s=Array.apply(null,arguments);return s.shift(),"getValue"===i&&this.length&&(t=this.eq(0).data("combodate"))?t.getValue.apply(t,s):this.each(function(){var t=o(this),e=t.data("combodate");e||t.data("combodate",e=new n(this,"object"==typeof i&&i)),"string"==typeof i&&"function"==typeof e[i]&&e[i].apply(e,s)})},o.fn.combodate.defaults={format:"DD-MM-YYYY HH:mm",template:"D / MMM / YYYY   H : mm",value:null,minYear:1970,maxYear:(new Date).getFullYear(),yearDescending:!0,minuteStep:5,secondStep:1,firstItem:"empty",errorClass:null,roundTime:!0,smartDays:!1}})(window.jQuery),(e=>{function i(t){this.init("combodate",t,i.defaults),this.options.viewformat||(this.options.viewformat=this.options.format),t.combodate=e.fn.editableutils.tryParseJson(t.combodate,!0),this.options.combodate=e.extend({},i.defaults.combodate,t.combodate,{format:this.options.format,template:this.options.template})}e.fn.editableutils.inherit(i,e.fn.editabletypes.abstractinput),e.extend(i.prototype,{render:function(){this.$input.combodate(this.options.combodate),"bs3"===e.fn.editableform.engine&&this.$input.siblings().find("select").addClass("form-control"),this.options.inputclass&&this.$input.siblings().find("select").addClass(this.options.inputclass)},value2html:function(t,e){t=t?t.format(this.options.viewformat):"";i.superclass.value2html.call(this,t,e)},html2value:function(t){return t?moment(t,this.options.viewformat):null},value2str:function(t){return t?t.format(this.options.format):""},str2value:function(t){return t?moment(t,this.options.format):null},value2submit:function(t){return this.value2str(t)},value2input:function(t){this.$input.combodate("setValue",t)},input2value:function(){return this.$input.combodate("getValue",null)},activate:function(){this.$input.siblings(".combodate").find("select").eq(0).focus()},autosubmit:function(){}}),i.defaults=e.extend({},e.fn.editabletypes.abstractinput.defaults,{tpl:'<input type="text">',inputclass:null,format:"YYYY-MM-DD",viewformat:null,template:"D / MMM / YYYY",combodate:null}),e.fn.editabletypes.combodate=i})(window.jQuery),(a=>{let o=a.fn.editableform.Constructor.prototype.initInput;a.extend(a.fn.editableform.Constructor.prototype,{initInput:function(){o.apply(this);var t=null===this.input.options.inputclass||!1===this.input.options.inputclass,e="input-sm",i="text,select,textarea,password,email,url,tel,number,range,time,typeaheadjs".split(","),s=(~a.inArray(this.input.type,i)&&(this.input.$input.addClass("form-control editable"),t)&&(this.input.options.inputclass=e,this.input.$input.addClass(e)),"select"===this.input.type&&setTimeout(()=>{this.input.$input.focus().click()},50),this.$form.find(".editable-buttons")),n=t?[e]:this.input.options.inputclass.split(" ");for(let t=0;t<n.length;t++)"input-lg"===n[t].toLowerCase()&&s.find("button").removeClass("btn-sm").addClass("btn-lg")}}),a.fn.editableform.buttons='<button type="submit" class="btn btn-primary btn-sm editable-submit"><i class="bi bi-check"></i></button><button type="button" class="btn btn-secondary btn-sm editable-cancel"><i class="bi bi-x"></i></button>',a.fn.editableform.errorGroupClass="has-error",a.fn.editableform.errorBlockClass=null,a.fn.editableform.engine="bs3"})(window.jQuery),(e=>{e.extend(e.fn.editableContainer.Popup.prototype,{containerName:"popover",containerDataName:"bs.popover",innerCss:".popover-content",defaults:e.fn.popover.Constructor.DEFAULTS,initContainer:function(){var t;e.extend(this.containerOptions,{trigger:"manual",selector:!1,content:" ",template:this.defaults.template}),this.$element.data("template")&&(t=this.$element.data("template"),this.$element.removeData("template")),this.call(this.containerOptions),t&&this.$element.data("template",t)},innerShow:function(){this.call("show")},innerHide:function(){this.call("hide")},innerDestroy:function(){this.call("destroy")},setContainerOption:function(t,e){this.container().options[t]=e},setPosition:function(){!function(){var t,e,i,s=this.tip(),n="function"==typeof this.options.placement?this.options.placement.call(this,s[0],this.$element[0]):this.options.placement,a=/\s?auto?\s?/i,o=a.test(n),a=(o&&(n=n.replace(a,"")||"top"),this.getPosition()),r=s[0].offsetWidth,l=s[0].offsetHeight,h=(o&&(o=this.$element.parent(),t=n,e=document.documentElement.scrollTop||document.body.scrollTop,i="body"==this.options.container?window.innerWidth:o.outerWidth(),h="body"==this.options.container?window.innerHeight:o.outerHeight(),o="body"==this.options.container?0:o.offset().left,n="bottom"==n&&a.top+a.height+l-e>h?"top":"top"==n&&a.top-e-l<0?"bottom":"right"==n&&a.right+r>i?"left":"left"==n&&a.left-r<o?"right":n,s.removeClass(t).addClass(n)),this.getCalculatedOffset(n,a,r,l));this.applyPlacement(h,n)}.call(this.container())}})})(window.jQuery),(y=>{function v(){return new Date(Date.UTC.apply(Date,arguments))}function b(t,e){this._process_options(e),this.element=y(t),this.isInline=!1,this.isInput=this.element.is("input"),this.component=!!this.element.is(".date")&&this.element.find(".add-on, .btn"),this.hasInput=this.component&&this.element.find("input").length,this.component&&0===this.component.length&&(this.component=!1),this.picker=y(w.template),this._buildEvents(),this._attachEvents(),this.isInline?this.picker.addClass("datepicker-inline").appendTo(this.element):this.picker.addClass("datepicker-dropdown dropdown-menu"),this.o.rtl&&(this.picker.addClass("datepicker-rtl"),this.picker.find(".prev i, .next i").toggleClass("icon-arrow-left icon-arrow-right")),this.viewMode=this.o.startView,this.o.calendarWeeks&&this.picker.find("tfoot th.today").attr("colspan",function(t,e){return parseInt(e)+1}),this._allow_update=!1,this.setStartDate(this.o.startDate),this.setEndDate(this.o.endDate),this.setDaysOfWeekDisabled(this.o.daysOfWeekDisabled),this.fillDow(),this.fillMonths(),this._allow_update=!0,this.update(),this.showMode(),this.isInline&&this.show()}function l(t,e){this.element=y(t),this.inputs=y.map(e.inputs,function(t){return t.jquery?t[0]:t}),delete e.inputs,y(this.inputs).datepicker(e).bind("changeDate",y.proxy(this.dateUpdated,this)),this.pickers=y.map(this.inputs,function(t){return y(t).data("datepicker")}),this.updateDates()}b.prototype={constructor:b,_process_options:function(t){this._o=y.extend({},this._o,t);var e=this.o=y.extend({},this._o),t=e.language;switch(g[t]||(t=t.split("-")[0],g[t])||(t=h.language),e.language=t,e.startView){case 2:case"decade":e.startView=2;break;case 1:case"year":e.startView=1;break;default:e.startView=0}switch(e.minViewMode){case 1:case"months":e.minViewMode=1;break;case 2:case"years":e.minViewMode=2;break;default:e.minViewMode=0}e.startView=Math.max(e.startView,e.minViewMode),e.weekStart%=7,e.weekEnd=(e.weekStart+6)%7;t=w.parseFormat(e.format);e.startDate!==-1/0&&(e.startDate=w.parseDate(e.startDate,t,e.language)),e.endDate!==1/0&&(e.endDate=w.parseDate(e.endDate,t,e.language)),e.daysOfWeekDisabled=e.daysOfWeekDisabled||[],Array.isArray(e.daysOfWeekDisabled)||(e.daysOfWeekDisabled=e.daysOfWeekDisabled.split(/[,\s]*/)),e.daysOfWeekDisabled=y.map(e.daysOfWeekDisabled,function(t){return parseInt(t,10)})},_events:[],_secondaryEvents:[],_applyEvents:function(t){for(var e,i,s=0;s<t.length;s++)e=t[s][0],i=t[s][1],e.on(i)},_unapplyEvents:function(t){for(var e,i,s=0;s<t.length;s++)e=t[s][0],i=t[s][1],e.off(i)},_buildEvents:function(){this.isInput?this._events=[[this.element,{focus:y.proxy(this.show,this),keyup:y.proxy(this.update,this),keydown:y.proxy(this.keydown,this)}]]:this.component&&this.hasInput?this._events=[[this.element.find("input"),{focus:y.proxy(this.show,this),keyup:y.proxy(this.update,this),keydown:y.proxy(this.keydown,this)}],[this.component,{click:y.proxy(this.show,this)}]]:this.element.is("div")?this.isInline=!0:this._events=[[this.element,{click:y.proxy(this.show,this)}]],this._secondaryEvents=[[this.picker,{click:y.proxy(this.click,this)}],[y(window),{resize:y.proxy(this.place,this)}],[y(document),{mousedown:y.proxy(function(t){this.element.is(t.target)||this.element.find(t.target).size()||this.picker.is(t.target)||this.picker.find(t.target).size()||this.hide()},this)}]]},_attachEvents:function(){this._detachEvents(),this._applyEvents(this._events)},_detachEvents:function(){this._unapplyEvents(this._events)},_attachSecondaryEvents:function(){this._detachSecondaryEvents(),this._applyEvents(this._secondaryEvents)},_detachSecondaryEvents:function(){this._unapplyEvents(this._secondaryEvents)},_trigger:function(t,e){var i=e||this.date,e=new Date(i.getTime()+6e4*i.getTimezoneOffset());this.element.trigger({type:t,date:e,format:y.proxy(function(t){t=t||this.o.format;return w.formatDate(i,t,this.o.language)},this)})},show:function(t){this.isInline||this.picker.appendTo("body"),this.picker.show(),this.height=(this.component||this.element).outerHeight(),this.place(),this._attachSecondaryEvents(),t&&t.preventDefault(),this._trigger("show")},hide:function(t){this.isInline||this.picker.is(":visible")&&(this.picker.hide().detach(),this._detachSecondaryEvents(),this.viewMode=this.o.startView,this.showMode(),this.o.forceParse&&(this.isInput&&this.element.val()||this.hasInput&&this.element.find("input").val())&&this.setValue(),this._trigger("hide"))},remove:function(){this.hide(),this._detachEvents(),this._detachSecondaryEvents(),this.picker.remove(),delete this.element.data().datepicker,this.isInput||delete this.element.data().date},getDate:function(){var t=this.getUTCDate();return new Date(t.getTime()+6e4*t.getTimezoneOffset())},getUTCDate:function(){return this.date},setDate:function(t){this.setUTCDate(new Date(t.getTime()-6e4*t.getTimezoneOffset()))},setUTCDate:function(t){this.date=t,this.setValue()},setValue:function(){var t=this.getFormattedDate();this.isInput?this.element.val(t):this.component&&this.element.find("input").val(t)},getFormattedDate:function(t){return void 0===t&&(t=this.o.format),w.formatDate(this.date,t,this.o.language)},setStartDate:function(t){this._process_options({startDate:t}),this.update(),this.updateNavArrows()},setEndDate:function(t){this._process_options({endDate:t}),this.update(),this.updateNavArrows()},setDaysOfWeekDisabled:function(t){this._process_options({daysOfWeekDisabled:t}),this.update(),this.updateNavArrows()},place:function(){var t,e,i;this.isInline||(t=parseInt(this.element.parents().filter(function(){return"auto"!=y(this).css("z-index")}).first().css("z-index"))+10,e=(this.component?this.component.parent():this.element).offset(),i=(this.component||this.element).outerHeight(!0),this.picker.css({top:e.top+i,left:e.left,zIndex:t}))},_allow_update:!0,update:function(){var t,e;this._allow_update&&(e=!1,arguments&&arguments.length&&("string"==typeof arguments[0]||arguments[0]instanceof Date)?(t=arguments[0],e=!0):(t=this.isInput?this.element.val():this.element.data("date")||this.element.find("input").val(),delete this.element.data().date),this.date=w.parseDate(t,this.o.format,this.o.language),e&&this.setValue(),this.date<this.o.startDate?this.viewDate=new Date(this.o.startDate):this.date>this.o.endDate?this.viewDate=new Date(this.o.endDate):this.viewDate=new Date(this.date),this.fill())},fillDow:function(){var t,e=this.o.weekStart,i="<tr>";for(this.o.calendarWeeks&&(i+=t='<th class="cw">&nbsp;</th>',this.picker.find(".datepicker-days thead tr:first-child").prepend(t));e<this.o.weekStart+7;)i+='<th class="dow">'+g[this.o.language].daysMin[e++%7]+"</th>";i+="</tr>",this.picker.find(".datepicker-days thead").append(i)},fillMonths:function(){for(var t="",e=0;e<12;)t+='<span class="month">'+g[this.o.language].monthsShort[e++]+"</span>";this.picker.find(".datepicker-months td").html(t)},setRange:function(t){t&&t.length?this.range=y.map(t,function(t){return t.valueOf()}):delete this.range,this.fill()},getClassNames:function(t){var e=[],i=this.viewDate.getUTCFullYear(),s=this.viewDate.getUTCMonth(),n=this.date.valueOf(),a=new Date;return t.getUTCFullYear()<i||t.getUTCFullYear()==i&&t.getUTCMonth()<s?e.push("old"):(t.getUTCFullYear()>i||t.getUTCFullYear()==i&&t.getUTCMonth()>s)&&e.push("new"),this.o.todayHighlight&&t.getUTCFullYear()==a.getFullYear()&&t.getUTCMonth()==a.getMonth()&&t.getUTCDate()==a.getDate()&&e.push("today"),n&&t.valueOf()==n&&e.push("active"),(t.valueOf()<this.o.startDate||t.valueOf()>this.o.endDate||-1!==y.inArray(t.getUTCDay(),this.o.daysOfWeekDisabled))&&e.push("disabled"),this.range&&(t>this.range[0]&&t<this.range[this.range.length-1]&&e.push("range"),-1!=y.inArray(t.valueOf(),this.range))&&e.push("selected"),e},fill:function(){for(var t,e=new Date(this.viewDate),i=e.getUTCFullYear(),e=e.getUTCMonth(),s=this.o.startDate!==-1/0?this.o.startDate.getUTCFullYear():-1/0,n=this.o.startDate!==-1/0?this.o.startDate.getUTCMonth():-1/0,a=this.o.endDate!==1/0?this.o.endDate.getUTCFullYear():1/0,o=this.o.endDate!==1/0?this.o.endDate.getUTCMonth():1/0,r=(this.date&&this.date.valueOf(),this.picker.find(".datepicker-days thead th.datepicker-switch").text(g[this.o.language].months[e]+" "+i),this.picker.find("tfoot th.today").text(g[this.o.language].today).toggle(!1!==this.o.todayBtn),this.picker.find("tfoot th.clear").text(g[this.o.language].clear).toggle(!1!==this.o.clearBtn),this.updateNavArrows(),this.fillMonths(),v(i,e-1,28,0,0,0,0)),e=w.getDaysInMonth(r.getUTCFullYear(),r.getUTCMonth()),l=(r.setUTCDate(e),r.setUTCDate(e-(r.getUTCDay()-this.o.weekStart+7)%7),new Date(r)),h=(l.setUTCDate(l.getUTCDate()+42),l=l.valueOf(),[]);r.valueOf()<l;){r.getUTCDay()==this.o.weekStart&&(h.push("<tr>"),this.o.calendarWeeks)&&(p=new Date(+r+(this.o.weekStart-r.getUTCDay()-7)%7*864e5),p=new Date(+p+(11-p.getUTCDay())%7*864e5),u=new Date(+(u=v(p.getUTCFullYear(),0,1))+(11-u.getUTCDay())%7*864e5),h.push('<td class="cw">'+((p-u)/864e5/7+1)+"</td>")),(p=this.getClassNames(r)).push("day");var p,u=this.o.beforeShowDay(r);void 0===u?u={}:"boolean"==typeof u?u={enabled:u}:"string"==typeof u&&(u={classes:u}),!1===u.enabled&&p.push("disabled"),u.classes&&(p=p.concat(u.classes.split(/\s+/))),u.tooltip&&(t=u.tooltip),p=y.unique(p),h.push('<td class="'+p.join(" ")+'"'+(t?' title="'+t+'"':"")+">"+r.getUTCDate()+"</td>"),r.getUTCDay()==this.o.weekEnd&&h.push("</tr>"),r.setUTCDate(r.getUTCDate()+1)}this.picker.find(".datepicker-days tbody").empty().append(h.join(""));var d=this.date&&this.date.getUTCFullYear(),e=this.picker.find(".datepicker-months").find("th:eq(1)").text(i).end().find("span").removeClass("active"),n=(d&&d==i&&e.eq(this.date.getUTCMonth()).addClass("active"),(i<s||a<i)&&e.addClass("disabled"),i==s&&e.slice(0,n).addClass("disabled"),i==a&&e.slice(o+1).addClass("disabled"),h="",i=10*parseInt(i/10,10),this.picker.find(".datepicker-years").find("th:eq(1)").text(i+"-"+(i+9)).end().find("td"));--i;for(var c=-1;c<11;c++)h+='<span class="year'+(-1==c?" old":10==c?" new":"")+(d==i?" active":"")+(i<s||a<i?" disabled":"")+'">'+i+"</span>",i+=1;n.html(h)},updateNavArrows:function(){if(this._allow_update){var t=new Date(this.viewDate),e=t.getUTCFullYear(),i=t.getUTCMonth();switch(this.viewMode){case 0:this.o.startDate!==-1/0&&e<=this.o.startDate.getUTCFullYear()&&i<=this.o.startDate.getUTCMonth()?this.picker.find(".prev").css({visibility:"hidden"}):this.picker.find(".prev").css({visibility:"visible"}),this.o.endDate!==1/0&&e>=this.o.endDate.getUTCFullYear()&&i>=this.o.endDate.getUTCMonth()?this.picker.find(".next").css({visibility:"hidden"}):this.picker.find(".next").css({visibility:"visible"});break;case 1:case 2:this.o.startDate!==-1/0&&e<=this.o.startDate.getUTCFullYear()?this.picker.find(".prev").css({visibility:"hidden"}):this.picker.find(".prev").css({visibility:"visible"}),this.o.endDate!==1/0&&e>=this.o.endDate.getUTCFullYear()?this.picker.find(".next").css({visibility:"hidden"}):this.picker.find(".next").css({visibility:"visible"})}}},click:function(t){t.preventDefault();var e,i,s,n,a=y(t.target).closest("span, td, th");if(1==a.length)switch(a[0].nodeName.toLowerCase()){case"th":switch(a[0].className){case"datepicker-switch":this.showMode(1);break;case"prev":case"next":var o=w.modes[this.viewMode].navStep*("prev"==a[0].className?-1:1);switch(this.viewMode){case 0:this.viewDate=this.moveMonth(this.viewDate,o);break;case 1:case 2:this.viewDate=this.moveYear(this.viewDate,o)}this.fill();break;case"today":var r=v((r=new Date).getFullYear(),r.getMonth(),r.getDate(),0,0,0),l=(this.showMode(-2),"linked"==this.o.todayBtn?null:"view");this._setDate(r,l);break;case"clear":this.isInput?e=this.element:this.component&&(e=this.element.find("input")),e&&e.val("").change(),this._trigger("changeDate"),this.update(),this.o.autoclose&&this.hide()}break;case"span":a.is(".disabled")||(this.viewDate.setUTCDate(1),a.is(".month")?(i=1,n=a.parent().find("span").index(a),s=this.viewDate.getUTCFullYear(),this.viewDate.setUTCMonth(n),this._trigger("changeMonth",this.viewDate),1===this.o.minViewMode&&this._setDate(v(s,n,i,0,0,0,0))):(s=parseInt(a.text(),10)||0,i=1,n=0,this.viewDate.setUTCFullYear(s),this._trigger("changeYear",this.viewDate),2===this.o.minViewMode&&this._setDate(v(s,n,i,0,0,0,0))),this.showMode(-1),this.fill());break;case"td":a.is(".day")&&!a.is(".disabled")&&(i=parseInt(a.text(),10)||1,s=this.viewDate.getUTCFullYear(),n=this.viewDate.getUTCMonth(),a.is(".old")?0===n?(n=11,--s):--n:a.is(".new")&&(11==n?(n=0,s+=1):n+=1),this._setDate(v(s,n,i,0,0,0,0)))}},_setDate:function(t,e){var i;e&&"date"!=e||(this.date=new Date(t)),e&&"view"!=e||(this.viewDate=new Date(t)),this.fill(),this.setValue(),this._trigger("changeDate"),this.isInput?i=this.element:this.component&&(i=this.element.find("input")),i&&(i.change(),!this.o.autoclose||e&&"date"!=e||this.hide())},moveMonth:function(t,e){if(!e)return t;var i,s,n=new Date(t.valueOf()),a=n.getUTCDate(),o=n.getUTCMonth(),r=Math.abs(e);if(e=0<e?1:-1,1==r)s=-1==e?function(){return n.getUTCMonth()==o}:function(){return n.getUTCMonth()!=i},i=o+e,n.setUTCMonth(i),(i<0||11<i)&&(i=(i+12)%12);else{for(var l=0;l<r;l++)n=this.moveMonth(n,e);i=n.getUTCMonth(),n.setUTCDate(a),s=function(){return i!=n.getUTCMonth()}}for(;s();)n.setUTCDate(--a),n.setUTCMonth(i);return n},moveYear:function(t,e){return this.moveMonth(t,12*e)},dateWithinRange:function(t){return t>=this.o.startDate&&t<=this.o.endDate},keydown:function(t){if(this.picker.is(":not(:visible)"))27==t.keyCode&&this.show();else{var e,i,s,n,a=!1;switch(t.keyCode){case 27:this.hide(),t.preventDefault();break;case 37:case 39:this.o.keyboardNavigation&&(e=37==t.keyCode?-1:1,t.ctrlKey?(i=this.moveYear(this.date,e),s=this.moveYear(this.viewDate,e)):t.shiftKey?(i=this.moveMonth(this.date,e),s=this.moveMonth(this.viewDate,e)):((i=new Date(this.date)).setUTCDate(this.date.getUTCDate()+e),(s=new Date(this.viewDate)).setUTCDate(this.viewDate.getUTCDate()+e)),this.dateWithinRange(i))&&(this.date=i,this.viewDate=s,this.setValue(),this.update(),t.preventDefault(),a=!0);break;case 38:case 40:this.o.keyboardNavigation&&(e=38==t.keyCode?-1:1,t.ctrlKey?(i=this.moveYear(this.date,e),s=this.moveYear(this.viewDate,e)):t.shiftKey?(i=this.moveMonth(this.date,e),s=this.moveMonth(this.viewDate,e)):((i=new Date(this.date)).setUTCDate(this.date.getUTCDate()+7*e),(s=new Date(this.viewDate)).setUTCDate(this.viewDate.getUTCDate()+7*e)),this.dateWithinRange(i))&&(this.date=i,this.viewDate=s,this.setValue(),this.update(),t.preventDefault(),a=!0);break;case 13:this.hide(),t.preventDefault();break;case 9:this.hide()}a&&(this._trigger("changeDate"),this.isInput?n=this.element:this.component&&(n=this.element.find("input")),n)&&n.change()}},showMode:function(t){t&&(this.viewMode=Math.max(this.o.minViewMode,Math.min(2,this.viewMode+t))),this.picker.find(">div").hide().filter(".datepicker-"+w.modes[this.viewMode].clsName).css("display","block"),this.updateNavArrows()}},l.prototype={updateDates:function(){this.dates=y.map(this.pickers,function(t){return t.date}),this.updateRanges()},updateRanges:function(){var i=y.map(this.dates,function(t){return t.valueOf()});y.each(this.pickers,function(t,e){e.setRange(i)})},dateUpdated:function(t){var e=y(t.target).data("datepicker").getUTCDate(),i=y.inArray(t.target,this.inputs),s=this.inputs.length;if(-1!=i){if(e<this.dates[i])for(;0<=i&&e<this.dates[i];)this.pickers[i--].setUTCDate(e);else if(e>this.dates[i])for(;i<s&&e>this.dates[i];)this.pickers[i++].setUTCDate(e);this.updateDates()}},remove:function(){y.map(this.pickers,function(t){t.remove()}),delete this.element.data().datepicker}};var t=y.fn.datepicker,i=y.fn.datepicker=function(a){var o,r=Array.apply(null,arguments);return r.shift(),this.each(function(){var t,e,i=y(this),s=i.data("datepicker"),n="object"==typeof a&&a;if(s||(e=((t,e)=>{var i,s=y(t).data(),n={},a=new RegExp("^"+e.toLowerCase()+"([A-Z])"),e=new RegExp("^"+e.toLowerCase());for(i in s)e.test(i)&&(n[i.replace(a,function(t,e){return e.toLowerCase()})]=s[i]);return n})(this,"date"),t=(t=>{var i,s={};if(g[t]||(t=t.split("-")[0],g[t]))return i=g[t],y.each(p,function(t,e){e in i&&(s[e]=i[e])}),s})(y.extend({},h,e,n).language),t=y.extend({},h,t,e,n),i.is(".input-daterange")||t.inputs?(e={inputs:t.inputs||i.find("input").toArray()},i.data("datepicker",s=new l(this,y.extend(t,e)))):i.data("datepicker",s=new b(this,t))),"string"==typeof a&&"function"==typeof s[a]&&void 0!==(o=s[a].apply(s,r)))return!1}),void 0!==o?o:this},h=y.fn.datepicker.defaults={autoclose:!1,beforeShowDay:y.noop,calendarWeeks:!1,clearBtn:!1,daysOfWeekDisabled:[],endDate:1/0,forceParse:!0,format:"mm/dd/yyyy",keyboardNavigation:!0,language:"en",minViewMode:0,rtl:!1,startDate:-1/0,startView:0,todayBtn:!1,todayHighlight:!1,weekStart:0},p=y.fn.datepicker.locale_opts=["format","rtl","weekStart"],g=(y.fn.datepicker.Constructor=b,y.fn.datepicker.dates={en:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],daysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sun"],daysMin:["Su","Mo","Tu","We","Th","Fr","Sa","Su"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],today:"Today",clear:"Clear"}}),w={modes:[{clsName:"days",navFnc:"Month",navStep:1},{clsName:"months",navFnc:"FullYear",navStep:1},{clsName:"years",navFnc:"FullYear",navStep:10}],isLeapYear:function(t){return t%4==0&&t%100!=0||t%400==0},getDaysInMonth:function(t,e){return[31,w.isLeapYear(t)?29:28,31,30,31,30,31,31,30,31,30,31][e]},validParts:/dd?|DD?|mm?|MM?|yy(?:yy)?/g,nonpunctuation:/[^ -\/:-@\[\u3400-\u9fff-`{-~\t\n\r]+/g,parseFormat:function(t){var e=t.replace(this.validParts,"\0").split("\0"),t=t.match(this.validParts);if(e&&e.length&&t&&0!==t.length)return{separators:e,parts:t};throw new Error("Invalid date format.")},parseDate:function(t,e,i){if(!(t instanceof Date)){if("string"==typeof e&&(e=w.parseFormat(e)),/^[\-+]\d+[dmwy]([\s,]+[\-+]\d+[dmwy])*$/.test(t)){var s,n=/([\-+]\d+)([dmwy])/,a=t.match(/([\-+]\d+)([dmwy])/g);t=new Date;for(var o=0;o<a.length;o++)switch(h=n.exec(a[o]),s=parseInt(h[1]),h[2]){case"d":t.setUTCDate(t.getUTCDate()+s);break;case"m":t=b.prototype.moveMonth.call(b.prototype,t,s);break;case"w":t.setUTCDate(t.getUTCDate()+7*s);break;case"y":t=b.prototype.moveYear.call(b.prototype,t,s)}return v(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate(),0,0,0)}var r,l,h,a=t&&t.match(this.nonpunctuation)||[],t=new Date,p={},u=["yyyy","yy","M","MM","m","mm","d","dd"],d={yyyy:function(t,e){return t.setUTCFullYear(e)},yy:function(t,e){return t.setUTCFullYear(2e3+e)},m:function(t,e){for(--e;e<0;)e+=12;for(t.setUTCMonth(e%=12);t.getUTCMonth()!=e;)t.setUTCDate(t.getUTCDate()-1);return t},d:function(t,e){return t.setUTCDate(e)}},c=(d.M=d.MM=d.mm=d.m,d.dd=d.d,t=v(t.getFullYear(),t.getMonth(),t.getDate(),0,0,0),e.parts.slice());if(a.length!=c.length&&(c=y(c).filter(function(t,e){return-1!==y.inArray(e,u)}).toArray()),a.length==c.length){for(var o=0,f=c.length;o<f;o++){if(r=parseInt(a[o],10),h=c[o],isNaN(r))switch(h){case"MM":l=y(g[i].months).filter(function(){var t=this.slice(0,a[o].length);return t==a[o].slice(0,t.length)}),r=y.inArray(l[0],g[i].months)+1;break;case"M":l=y(g[i].monthsShort).filter(function(){var t=this.slice(0,a[o].length);return t==a[o].slice(0,t.length)}),r=y.inArray(l[0],g[i].monthsShort)+1}p[h]=r}for(var m,o=0;o<u.length;o++)(m=u[o])in p&&!isNaN(p[m])&&d[m](t,p[m])}}return t},formatDate:function(t,e,i){"string"==typeof e&&(e=w.parseFormat(e));for(var s={d:t.getUTCDate(),D:g[i].daysShort[t.getUTCDay()],DD:g[i].days[t.getUTCDay()],m:t.getUTCMonth()+1,M:g[i].monthsShort[t.getUTCMonth()],MM:g[i].months[t.getUTCMonth()],yy:t.getUTCFullYear().toString().substring(2),yyyy:t.getUTCFullYear()},t=(s.dd=(s.d<10?"0":"")+s.d,s.mm=(s.m<10?"0":"")+s.m,[]),n=y.extend([],e.separators),a=0,o=e.parts.length;a<=o;a++)n.length&&t.push(n.shift()),t.push(s[e.parts[a]]);return t.join("")},headTemplate:'<thead><tr><th class="prev"><i class="icon-arrow-left"/></th><th colspan="5" class="datepicker-switch"></th><th class="next"><i class="icon-arrow-right"/></th></tr></thead>',contTemplate:'<tbody><tr><td colspan="7"></td></tr></tbody>',footTemplate:'<tfoot><tr><th colspan="7" class="today"></th></tr><tr><th colspan="7" class="clear"></th></tr></tfoot>'};w.template='<div class="datepicker"><div class="datepicker-days"><table class=" table-condensed">'+w.headTemplate+"<tbody></tbody>"+w.footTemplate+'</table></div><div class="datepicker-months"><table class="table-condensed">'+w.headTemplate+w.contTemplate+w.footTemplate+'</table></div><div class="datepicker-years"><table class="table-condensed">'+w.headTemplate+w.contTemplate+w.footTemplate+"</table></div></div>",y.fn.datepicker.DPGlobal=w,y.fn.datepicker.noConflict=function(){return y.fn.datepicker=t,this},y(document).on("focus.datepicker.data-api click.datepicker.data-api",'[data-provide="datepicker"]',function(t){var e=y(this);e.data("datepicker")||(t.preventDefault(),i.call(e,"show"))}),y(function(){i.call(y('[data-provide="datepicker-inline"]'))})})(window.jQuery),(i=>{function s(t){this.init("date",t,s.defaults),this.initPicker(t,s.defaults)}i.fn.bdatepicker=i.fn.datepicker.noConflict(),i.fn.datepicker||(i.fn.datepicker=i.fn.bdatepicker),i.fn.editableutils.inherit(s,i.fn.editabletypes.abstractinput),i.extend(s.prototype,{initPicker:function(t,e){this.options.viewformat||(this.options.viewformat=this.options.format),t.datepicker=i.fn.editableutils.tryParseJson(t.datepicker,!0),this.options.datepicker=i.extend({},e.datepicker,t.datepicker,{format:this.options.viewformat}),this.options.datepicker.language=this.options.datepicker.language||"en",this.dpg=i.fn.bdatepicker.DPGlobal,this.parsedFormat=this.dpg.parseFormat(this.options.format),this.parsedViewFormat=this.dpg.parseFormat(this.options.viewformat)},render:function(){this.$input.bdatepicker(this.options.datepicker),this.options.clear&&(this.$clear=i('<a href="#"></a>').html(this.options.clear).click(i.proxy(function(t){t.preventDefault(),t.stopPropagation(),this.clear()},this)),this.$tpl.parent().append(i('<div class="editable-clear">').append(this.$clear)))},value2html:function(t,e){t=t?this.dpg.formatDate(t,this.parsedViewFormat,this.options.datepicker.language):"";s.superclass.value2html.call(this,t,e)},html2value:function(t){return this.parseDate(t,this.parsedViewFormat)},value2str:function(t){return t?this.dpg.formatDate(t,this.parsedFormat,this.options.datepicker.language):""},str2value:function(t){return this.parseDate(t,this.parsedFormat)},value2submit:function(t){return this.value2str(t)},value2input:function(t){this.$input.bdatepicker("update",t)},input2value:function(){return this.$input.data("datepicker").date},activate:function(){},clear:function(){this.$input.data("datepicker").date=null,this.$input.find(".active").removeClass("active"),this.options.showbuttons||this.$input.closest("form").submit()},autosubmit:function(){this.$input.on("mouseup",".day",function(t){var e;i(t.currentTarget).is(".old")||i(t.currentTarget).is(".new")||(e=i(this).closest("form"),setTimeout(function(){e.submit()},200))})},parseDate:function(t,e){var i=null;return i=t&&(i=this.dpg.parseDate(t,e,this.options.datepicker.language),"string"==typeof t)&&t!==this.dpg.formatDate(i,e,this.options.datepicker.language)?null:i}}),s.defaults=i.extend({},i.fn.editabletypes.abstractinput.defaults,{tpl:'<div class="editable-date well"></div>',inputclass:null,format:"yyyy-mm-dd",viewformat:null,datepicker:{weekStart:0,startView:0,minViewMode:0,autoclose:!1},clear:"&times; clear"}),i.fn.editabletypes.date=s})(window.jQuery),(t=>{function e(t){this.init("datefield",t,e.defaults),this.initPicker(t,e.defaults)}t.fn.editableutils.inherit(e,t.fn.editabletypes.date),t.extend(e.prototype,{render:function(){this.$input=this.$tpl.find("input"),this.setClass(),this.setAttr("placeholder"),this.$tpl.bdatepicker(this.options.datepicker),this.$input.off("focus keydown"),this.$input.keyup(t.proxy(function(){this.$tpl.removeData("date"),this.$tpl.bdatepicker("update")},this))},value2input:function(t){this.$input.val(t?this.dpg.formatDate(t,this.parsedViewFormat,this.options.datepicker.language):""),this.$tpl.bdatepicker("update")},input2value:function(){return this.html2value(this.$input.val())},activate:function(){t.fn.editabletypes.text.prototype.activate.call(this)},autosubmit:function(){}}),e.defaults=t.extend({},t.fn.editabletypes.date.defaults,{tpl:'<div class="input-append date"><input type="text"/><span class="add-on"><i class="icon-th"></i></span></div>',inputclass:"input-small",datepicker:{weekStart:0,startView:0,minViewMode:0,autoclose:!0}}),t.fn.editabletypes.datefield=e})(window.jQuery),(i=>{function s(t){this.init("datetime",t,s.defaults),this.initPicker(t,s.defaults)}i.fn.editableutils.inherit(s,i.fn.editabletypes.abstractinput),i.extend(s.prototype,{initPicker:function(t,e){this.options.viewformat||(this.options.viewformat=this.options.format),t.datetimepicker=i.fn.editableutils.tryParseJson(t.datetimepicker,!0),this.options.datetimepicker=i.extend({},e.datetimepicker,t.datetimepicker,{format:this.options.viewformat}),this.options.datetimepicker.language=this.options.datetimepicker.language||"en",this.dpg=i.fn.datetimepicker.DPGlobal,this.parsedFormat=this.dpg.parseFormat(this.options.format,this.options.formatType),this.parsedViewFormat=this.dpg.parseFormat(this.options.viewformat,this.options.formatType)},render:function(){this.$input.datetimepicker(this.options.datetimepicker),this.$input.on("changeMode",function(t){var e=i(this).closest("form").parent();setTimeout(function(){e.triggerHandler("resize")},0)}),this.options.clear&&(this.$clear=i('<a href="#"></a>').html(this.options.clear).click(i.proxy(function(t){t.preventDefault(),t.stopPropagation(),this.clear()},this)),this.$tpl.parent().append(i('<div class="editable-clear">').append(this.$clear)))},value2html:function(t,e){t=t?this.dpg.formatDate(this.toUTC(t),this.parsedViewFormat,this.options.datetimepicker.language,this.options.formatType):"";if(!e)return t;s.superclass.value2html.call(this,t,e)},html2value:function(t){t=this.parseDate(t,this.parsedViewFormat);return t?this.fromUTC(t):null},value2str:function(t){return t?this.dpg.formatDate(this.toUTC(t),this.parsedFormat,this.options.datetimepicker.language,this.options.formatType):""},str2value:function(t){t=this.parseDate(t,this.parsedFormat);return t?this.fromUTC(t):null},value2submit:function(t){return this.value2str(t)},value2input:function(t){t&&this.$input.data("datetimepicker").setDate(t)},input2value:function(){var t=this.$input.data("datetimepicker");return t.date?t.getDate():null},activate:function(){},clear:function(){this.$input.data("datetimepicker").date=null,this.$input.find(".active").removeClass("active"),this.options.showbuttons||this.$input.closest("form").submit()},autosubmit:function(){this.$input.on("mouseup",".minute",function(t){var e=i(this).closest("form");setTimeout(function(){e.submit()},200)})},toUTC:function(t){return t&&new Date(t.valueOf()-6e4*t.getTimezoneOffset())},fromUTC:function(t){return t&&new Date(t.valueOf()+6e4*t.getTimezoneOffset())},parseDate:function(t,e){var i=null;return i=t&&(i=this.dpg.parseDate(t,e,this.options.datetimepicker.language,this.options.formatType),"string"==typeof t)&&t!==this.dpg.formatDate(i,e,this.options.datetimepicker.language,this.options.formatType)?null:i}}),s.defaults=i.extend({},i.fn.editabletypes.abstractinput.defaults,{tpl:'<div class="editable-date well"></div>',inputclass:null,format:"yyyy-mm-dd hh:ii",formatType:"standard",viewformat:null,datetimepicker:{todayHighlight:!1,autoclose:!1},clear:"&times; clear"}),i.fn.editabletypes.datetime=s})(window.jQuery),(t=>{function e(t){this.init("datetimefield",t,e.defaults),this.initPicker(t,e.defaults)}t.fn.editableutils.inherit(e,t.fn.editabletypes.datetime),t.extend(e.prototype,{render:function(){this.$input=this.$tpl.find("input"),this.setClass(),this.setAttr("placeholder"),this.$tpl.datetimepicker(this.options.datetimepicker),this.$input.off("focus keydown"),this.$input.keyup(t.proxy(function(){this.$tpl.removeData("date"),this.$tpl.datetimepicker("update")},this))},value2input:function(t){this.$input.val(this.value2html(t)),this.$tpl.datetimepicker("update")},input2value:function(){return this.html2value(this.$input.val())},activate:function(){t.fn.editabletypes.text.prototype.activate.call(this)},autosubmit:function(){}}),e.defaults=t.extend({},t.fn.editabletypes.datetime.defaults,{tpl:'<div class="input-append date"><input type="text"/><span class="add-on"><i class="icon-th"></i></span></div>',inputclass:"input-medium",datetimepicker:{todayHighlight:!1,autoclose:!0}}),t.fn.editabletypes.datetimefield=e})(window.jQuery);
\ No newline at end of file
diff --git a/dist/inputs-ext/typeaheadjs/lib/typeahead.js b/dist/inputs-ext/typeaheadjs/lib/typeahead.js
index d0db973..ac03190 100644
--- a/dist/inputs-ext/typeaheadjs/lib/typeahead.js
+++ b/dist/inputs-ext/typeaheadjs/lib/typeahead.js
@@ -24,7 +24,7 @@
             return typeof obj === "number";
         },
         isArray: Array.isArray,
-        isFunction: $.isFunction,
+        isFunction: (object) => typeof object === "function" && typeof object.call === "function",
         isObject: $.isPlainObject,
         isUndefined: function(obj) {
             return typeof obj === "undefined";
@@ -33,7 +33,7 @@
         bindAll: function(obj) {
             var val;
             for (var key in obj) {
-                $.isFunction(val = obj[key]) && (obj[key] = $.proxy(val, obj));
+                typeof(val = obj[key]) === 'function' && (obj[key] = $.proxy(val, obj));
             }
         },
         indexOf: function(haystack, needle) {
diff --git a/dist/jquery-editable/js/jquery-editable-poshytip.js b/dist/jquery-editable/js/jquery-editable-poshytip.js
index 905dee5..4915369 100644
--- a/dist/jquery-editable/js/jquery-editable-poshytip.js
+++ b/dist/jquery-editable/js/jquery-editable-poshytip.js
@@ -2601,7 +2601,7 @@ List - abstract class for inputs that have source option loaded from js array or
         onSourceReady: function (success, error) {
             //run source if it function
             var source;
-            if ($.isFunction(this.options.source)) {
+            if (typeof(this.options.source) === 'function') {
                 source = this.options.source.call(this.options.scope);
                 this.sourceData = null;
                 //note: if function returns the same source as URL - sourceData will be taken from cahce and no extra request performed
@@ -2718,7 +2718,7 @@ List - abstract class for inputs that have source option loaded from js array or
             
             if(!Array.isArray(this.prependData)) {
                 //run prepend if it is function (once)
-                if ($.isFunction(this.options.prepend)) {
+                if (typeof (this.options.prepend) === 'function') {
                     this.options.prepend = this.options.prepend.call(this.options.scope);
                 }
               
@@ -3695,7 +3695,7 @@ $(function(){
         if(!options.select2.tags && options.source) {
             var source = options.source;
             //if source is function, call it (once!)
-            if ($.isFunction(options.source)) {
+            if (typeof (options.source) === 'function') {
                 source = options.source.call(options.scope);
             }               
 
diff --git a/dist/jquery-editable/js/jquery-editable-poshytip.min.js b/dist/jquery-editable/js/jquery-editable-poshytip.min.js
index ecc9e54..72a2f88 100644
--- a/dist/jquery-editable/js/jquery-editable-poshytip.min.js
+++ b/dist/jquery-editable/js/jquery-editable-poshytip.min.js
@@ -2,4 +2,4 @@
 * A maintained fork of x-editable for Bootstrap 5 support.
 * https://git.24unix.net/tracer/x-editable
 * Copyright (c) 2025 Micha Espey; Licensed MIT */
-(o=>{function n(t,e){this.options=o.extend({},o.fn.editableform.defaults,e),this.$div=o(t),this.options.scope||(this.options.scope=this)}n.prototype={constructor:n,initInput:function(){this.input=this.options.input,this.value=this.input.str2value(this.options.value),this.input.prerender()},initTemplate:function(){this.$form=o(o.fn.editableform.template)},initButtons:function(){var t=this.$form.find(".editable-buttons");t.append(o.fn.editableform.buttons),"bottom"===this.options.showbuttons&&t.addClass("editable-buttons-bottom")},render:function(){this.$loading=o(o.fn.editableform.loading),this.$div.empty().append(this.$loading),this.initTemplate(),this.options.showbuttons?this.initButtons():this.$form.find(".editable-buttons").remove(),this.showLoading(),this.isSaving=!1,this.$div.triggerHandler("rendering"),this.initInput(),this.$form.find("div.editable-input").append(this.input.$tpl),this.$div.append(this.$form),o.when(this.input.render()).then(o.proxy(function(){var t;this.options.showbuttons||this.input.autosubmit(),this.$form.find(".editable-cancel").click(o.proxy(this.cancel,this)),this.input.error?(this.error(this.input.error),this.$form.find(".editable-submit").attr("disabled",!0),this.input.$input.attr("disabled",!0),this.$form.submit(function(t){t.preventDefault()})):(this.error(!1),this.input.$input.removeAttr("disabled"),this.$form.find(".editable-submit").removeAttr("disabled"),t=null==this.value||""===this.value?this.options.defaultValue:this.value,this.input.value2input(t),this.$form.submit(o.proxy(this.submit,this))),this.$div.triggerHandler("rendered"),this.showForm(),this.input.postrender&&this.input.postrender()},this))},cancel:function(){this.$div.triggerHandler("cancel")},showLoading:function(){var t,e;this.$form?(t=this.$form.outerWidth(),e=this.$form.outerHeight(),t&&this.$loading.width(t),e&&this.$loading.height(e),this.$form.hide()):(t=this.$loading.parent().width())&&this.$loading.width(t),this.$loading.show()},showForm:function(t){this.$loading.hide(),this.$form.show(),!1!==t&&this.input.activate(),this.$div.triggerHandler("show")},error:function(t){var e=this.$form.find(".control-group"),i=this.$form.find(".editable-error-block");if(!1===t)e.removeClass(o.fn.editableform.errorGroupClass),i.removeClass(o.fn.editableform.errorBlockClass).empty().hide();else{if(t){for(var s=(""+t).split("\n"),n=0;n<s.length;n++)s[n]=o("<div>").text(s[n]).html();t=s.join("<br>")}e.addClass(o.fn.editableform.errorGroupClass),i.addClass(o.fn.editableform.errorBlockClass).html(t).show()}},submit:function(t){t.stopPropagation(),t.preventDefault();var i,s=this.input.input2value(),t=this.validate(s);if("object"===o.type(t)&&void 0!==t.newValue){if(s=t.newValue,this.input.value2input(s),"string"==typeof t.msg)return this.error(t.msg),void this.showForm()}else if(t)return this.error(t),void this.showForm();this.options.savenochange||this.input.value2str(s)!=this.input.value2str(this.value)?(i=this.input.value2submit(s),this.isSaving=!0,o.when(this.save(i)).done(o.proxy(function(t){this.isSaving=!1;var e="function"==typeof this.options.success?this.options.success.call(this.options.scope,t,s):null;!1===e?(this.error(!1),this.showForm(!1)):"string"==typeof e?(this.error(e),this.showForm()):(e&&"object"==typeof e&&e.hasOwnProperty("newValue")&&(s=e.newValue),this.error(!1),this.value=s,this.$div.triggerHandler("save",{newValue:s,submitValue:i,response:t}))},this)).fail(o.proxy(function(t){this.isSaving=!1,t="function"==typeof this.options.error?this.options.error.call(this.options.scope,t,s):"string"==typeof t?t:t.responseText||t.statusText||"Unknown error!",this.error(t),this.showForm()},this))):this.$div.triggerHandler("nochange")},save:function(t){this.options.pk=o.fn.editableutils.tryParseJson(this.options.pk,!0);var e="function"==typeof this.options.pk?this.options.pk.call(this.options.scope):this.options.pk;if(!!("function"==typeof this.options.url||this.options.url&&("always"===this.options.send||"auto"===this.options.send&&null!=e)))return this.showLoading(),t={name:this.options.name||"",value:t,pk:e},"function"==typeof this.options.params?t=this.options.params.call(this.options.scope,t):(this.options.params=o.fn.editableutils.tryParseJson(this.options.params,!0),o.extend(t,this.options.params)),"function"==typeof this.options.url?this.options.url.call(this.options.scope,t):o.ajax(o.extend({url:this.options.url,data:t,type:"POST"},this.options.ajaxOptions))},validate:function(t){if(void 0===t&&(t=this.value),"function"==typeof this.options.validate)return this.options.validate.call(this.options.scope,t)},option:function(t,e){t in this.options&&(this.options[t]=e),"value"===t&&this.setValue(e)},setValue:function(t,e){this.value=e?this.input.str2value(t):t,this.$form&&this.$form.is(":visible")&&this.input.value2input(this.value)}},o.fn.editableform=function(i){var s=arguments;return this.each(function(){var t=o(this),e=t.data("editableform");e||t.data("editableform",e=new n(this,"object"==typeof i&&i)),"string"==typeof i&&e[i].apply(e,Array.prototype.slice.call(s,1))})},o.fn.editableform.Constructor=n,o.fn.editableform.defaults={type:"text",url:null,params:null,name:null,pk:null,value:null,defaultValue:null,send:"auto",validate:null,success:null,error:null,ajaxOptions:null,showbuttons:!0,scope:null,savenochange:!1},o.fn.editableform.template='<form class="form-inline editableform"><div class="control-group"><div><div class="editable-input"></div><div class="editable-buttons"></div></div><div class="editable-error-block"></div></div></form>',o.fn.editableform.loading='<div class="editableform-loading"></div>',o.fn.editableform.buttons='<button type="submit" class="editable-submit">ok</button><button type="button" class="editable-cancel">cancel</button>',o.fn.editableform.errorGroupClass=null,o.fn.editableform.errorBlockClass="editable-error",o.fn.editableform.engine="jquery"})(window.jQuery),(l=>{l.fn.editableutils={inherit:function(t,e){function i(){}i.prototype=e.prototype,t.prototype=new i,(t.prototype.constructor=t).superclass=e.prototype},setCursorPosition:function(t,e){t.setSelectionRange?t.setSelectionRange(e,e):t.createTextRange&&((t=t.createTextRange()).collapse(!0),t.moveEnd("character",e),t.moveStart("character",e),t.select())},tryParseJson:function(t,e){if("string"==typeof t&&t.length&&t.match(/^[\{\[].*[\}\]]$/))if(e)try{t=new Function("return "+t)()}catch(t){}finally{return t}else t=new Function("return "+t)();return t},sliceObj:function(t,e,i){var s,n,o={};if(Array.isArray(e)&&e.length)for(var a=0;a<e.length;a++)t.hasOwnProperty(s=e[a])&&(o[s]=t[s]),!0!==i&&(n=s.toLowerCase(),t.hasOwnProperty(n))&&(o[s]=t[n]);return o},getConfigData:function(t){var i={};return l.each(t.data(),function(t,e){"object"==typeof e&&(!e||"object"!=typeof e||e.constructor!==Object&&e.constructor!==Array)||(i[t]=e)}),i},objectKeys:function(t){if(Object.keys)return Object.keys(t);if(t!==Object(t))throw new TypeError("Object.keys called on a non-object");var e,i=[];for(e in t)Object.prototype.hasOwnProperty.call(t,e)&&i.push(e);return i},escape:function(t){return l("<div>").text(t).html()},itemsByValue:function(s,t,n){var e,o,a,r;return t&&null!==s?("function"!=typeof n&&(e=n||"value",n=function(t){return t[e]}),o=Array.isArray(s),a=[],r=this,l.each(t,function(t,e){var i;e.children?a=a.concat(r.itemsByValue(s,e.children,n)):o?l.grep(s,function(t){return t==(e&&"object"==typeof e?n(e):e)}).length&&a.push(e):(i=e&&"object"==typeof e?n(e):e,s==i&&a.push(e))}),a):[]},createInput:function(t){var e,i=t.type;return"date"===i&&("inline"===t.mode?l.fn.editabletypes.datefield?i="datefield":l.fn.editabletypes.dateuifield&&(i="dateuifield"):l.fn.editabletypes.date?i="date":l.fn.editabletypes.dateui&&(i="dateui"),"date"!==i||l.fn.editabletypes.date||(i="combodate")),"wysihtml5"!==(i="datetime"===i&&"inline"===t.mode?"datetimefield":i)||l.fn.editabletypes[i]||(i="textarea"),"function"==typeof l.fn.editabletypes[i]?new(e=l.fn.editabletypes[i])(this.sliceObj(t,this.objectKeys(e.defaults))):(l.error("Unknown type: "+i),!1)},supportsTransitions:function(){var t=(document.body||document.documentElement).style,e=["Moz","Webkit","Khtml","O","ms"];if("string"==typeof t[i="transition"])return!0;for(var i=i.charAt(0).toUpperCase()+i.substr(1),s=0;s<e.length;s++)if("string"==typeof t[e[s]+i])return!0;return!1}}})(window.jQuery),(r=>{function l(t,e){this.init(t,e)}function h(t,e){this.init(t,e)}l.prototype={containerName:null,containerDataName:null,innerCss:null,containerClass:"editable-container editable-popup",defaults:{},init:function(t,e){this.$element=r(t),this.options=r.extend({},r.fn.editableContainer.defaults,e),this.splitOptions(),this.formOptions.scope=this.$element[0],this.initContainer(),this.delayedHide=!1,this.$element.on("destroyed",r.proxy(function(){this.destroy()},this)),r(document).data("editable-handlers-attached")||(r(document).on("keyup.editable",function(t){27===t.which&&r(".editable-open").editableContainer("hide")}),r(document).on("click.editable",function(t){var e,i=r(t.target),s=[".editable-container",".ui-datepicker-header",".datepicker",".modal-backdrop",".bootstrap-wysihtml5-insert-image-modal",".bootstrap-wysihtml5-insert-link-modal"];if(r.contains(document.documentElement,t.target)&&!i.is(document)){for(e=0;e<s.length;e++)if(i.is(s[e])||i.parents(s[e]).length)return;l.prototype.closeOthers(t.target)}}),r(document).data("editable-handlers-attached",!0))},splitOptions:function(){if(this.containerOptions={},this.formOptions={},!r.fn[this.containerName])throw new Error(this.containerName+" not found. Have you included corresponding js file?");for(var t in this.options)t in this.defaults?this.containerOptions[t]=this.options[t]:this.formOptions[t]=this.options[t]},tip:function(){return this.container()?this.container().$tip:null},container:function(){var t;return t=this.containerDataName&&(t=this.$element.data(this.containerDataName))?t:this.$element.data(this.containerName)},call:function(){this.$element[this.containerName].apply(this.$element,arguments)},initContainer:function(){this.call(this.containerOptions)},renderForm:function(){this.$form.editableform(this.formOptions).on({save:r.proxy(this.save,this),nochange:r.proxy(function(){this.hide("nochange")},this),cancel:r.proxy(function(){this.hide("cancel")},this),show:r.proxy(function(){this.delayedHide?(this.hide(this.delayedHide.reason),this.delayedHide=!1):this.setPosition()},this),rendering:r.proxy(this.setPosition,this),resize:r.proxy(this.setPosition,this),rendered:r.proxy(function(){this.$element.triggerHandler("shown",r(this.options.scope).data("editable"))},this)}).editableform("render")},show:function(t){this.$element.addClass("editable-open"),!1!==t&&this.closeOthers(this.$element[0]),this.innerShow(),this.tip().addClass(this.containerClass),this.$form,this.$form=r("<div>"),(this.tip().is(this.innerCss)?this.tip():this.tip().find(this.innerCss)).append(this.$form),this.renderForm()},hide:function(t){this.tip()&&this.tip().is(":visible")&&this.$element.hasClass("editable-open")&&(this.$form.data("editableform").isSaving?this.delayedHide={reason:t}:(this.delayedHide=!1,this.$element.removeClass("editable-open"),this.innerHide(),this.$element.triggerHandler("hidden",t||"manual")))},innerShow:function(){},innerHide:function(){},toggle:function(t){this.container()&&this.tip()&&this.tip().is(":visible")?this.hide():this.show(t)},setPosition:function(){},save:function(t,e){this.$element.triggerHandler("save",e),this.hide("save")},option:function(t,e){this.options[t]=e,t in this.containerOptions?(this.containerOptions[t]=e,this.setContainerOption(t,e)):(this.formOptions[t]=e,this.$form&&this.$form.editableform("option",t,e))},setContainerOption:function(t,e){this.call("option",t,e)},destroy:function(){this.hide(),this.innerDestroy(),this.$element.off("destroyed"),this.$element.removeData("editableContainer")},innerDestroy:function(){},closeOthers:function(s){r(".editable-open").each(function(t,e){var i;e===s||r(e).find(s).length||(i=(e=r(e)).data("editableContainer"))&&("cancel"===i.options.onblur?e.data("editableContainer").hide("onblur"):"submit"===i.options.onblur&&e.data("editableContainer").tip().find("form").submit())})},activate:function(){this.tip&&this.tip().is(":visible")&&this.$form&&this.$form.data("editableform").input.activate()}},r.fn.editableContainer=function(o){var a=arguments;return this.each(function(){var t=r(this),e="editableContainer",i=t.data(e),s="object"==typeof o&&o,n="inline"===s.mode?h:l;i||t.data(e,i=new n(this,s)),"string"==typeof o&&i[o].apply(i,Array.prototype.slice.call(a,1))})},r.fn.editableContainer.Popup=l,r.fn.editableContainer.Inline=h,r.fn.editableContainer.defaults={value:null,placement:"top",autohide:!0,onblur:"cancel",anim:!1,mode:"popup"},jQuery.event.special.destroyed={remove:function(t){t.handler&&t.handler()}}})(window.jQuery),(t=>{t.extend(t.fn.editableContainer.Inline.prototype,t.fn.editableContainer.Popup.prototype,{containerName:"editableform",innerCss:".editable-inline",containerClass:"editable-container editable-inline",initContainer:function(){this.$tip=t("<span></span>"),this.options.anim||(this.options.anim=0)},splitOptions:function(){this.containerOptions={},this.formOptions=this.options},tip:function(){return this.$tip},innerShow:function(){this.$element.hide(),this.tip().insertAfter(this.$element).show()},innerHide:function(){this.$tip.hide(this.options.anim,t.proxy(function(){this.$element.show(),this.innerDestroy()},this))},innerDestroy:function(){this.tip()&&this.tip().empty().remove()}})})(window.jQuery),(u=>{function p(t,e){this.$element=u(t),this.options=u.extend({},u.fn.editable.defaults,e,u.fn.editableutils.getConfigData(this.$element)),this.options.selector?this.initLive():this.init(),this.options.highlight&&!u.fn.editableutils.supportsTransitions()&&(this.options.highlight=!1)}p.prototype={constructor:p,init:function(){var t,e=!1;if(this.options.name=this.options.name||this.$element.attr("id"),this.options.scope=this.$element[0],this.input=u.fn.editableutils.createInput(this.options),this.input){switch(null==this.options.value?(this.value=this.input.html2value(u.trim(this.$element.html())),e=!0):(this.options.value=u.fn.editableutils.tryParseJson(this.options.value,!0),"string"==typeof this.options.value?this.value=this.input.str2value(this.options.value):this.value=this.options.value),this.$element.addClass("editable"),"textarea"===this.input.type&&this.$element.addClass("editable-pre-wrapped"),"manual"!==this.options.toggle?(this.$element.addClass("editable-click"),this.$element.on(this.options.toggle+".editable",u.proxy(function(t){this.options.disabled||t.preventDefault(),"mouseenter"===this.options.toggle?this.show():(t="click"!==this.options.toggle,this.toggle(t))},this))):this.$element.attr("tabindex",-1),"function"==typeof this.options.display&&(this.options.autotext="always"),this.options.autotext){case"always":t=!0;break;case"auto":t=!u.trim(this.$element.text()).length&&null!=this.value&&!e;break;default:t=!1}u.when(!t||this.render()).then(u.proxy(function(){this.options.disabled?this.disable():this.enable(),this.$element.triggerHandler("init",this)},this))}},initLive:function(){var t=this.options.selector;this.options.selector=!1,this.options.autotext="never",this.$element.on(this.options.toggle+".editable",t,u.proxy(function(t){var e=u(t.target);e.data("editable")||(e.hasClass(this.options.emptyclass)&&e.empty(),e.editable(this.options).trigger(t))},this))},render:function(t){if(!1!==this.options.display)return this.input.value2htmlFinal?this.input.value2html(this.value,this.$element[0],this.options.display,t):"function"==typeof this.options.display?this.options.display.call(this.$element[0],this.value,t):this.input.value2html(this.value,this.$element[0])},enable:function(){this.options.disabled=!1,this.$element.removeClass("editable-disabled"),this.handleEmpty(this.isEmpty),"manual"!==this.options.toggle&&"-1"===this.$element.attr("tabindex")&&this.$element.removeAttr("tabindex")},disable:function(){this.options.disabled=!0,this.hide(),this.$element.addClass("editable-disabled"),this.handleEmpty(this.isEmpty),this.$element.attr("tabindex",-1)},toggleDisabled:function(){this.options.disabled?this.enable():this.disable()},option:function(t,e){if(t&&"object"==typeof t)u.each(t,u.proxy(function(t,e){this.option(u.trim(t),e)},this));else{if(this.options[t]=e,"disabled"===t)return e?this.disable():this.enable();"value"===t&&this.setValue(e),this.container&&this.container.option(t,e),this.input.option&&this.input.option(t,e)}},handleEmpty:function(t){!1!==this.options.display&&(void 0!==t?this.isEmpty=t:"function"==typeof this.input.isEmpty?this.isEmpty=this.input.isEmpty(this.$element):this.isEmpty=""===u.trim(this.$element.html()),this.options.disabled?this.isEmpty&&(this.$element.empty(),this.options.emptyclass)&&this.$element.removeClass(this.options.emptyclass):this.isEmpty?(this.$element.html(this.options.emptytext),this.options.emptyclass&&this.$element.addClass(this.options.emptyclass)):this.options.emptyclass&&this.$element.removeClass(this.options.emptyclass))},show:function(t){if(!this.options.disabled){if(this.container){if(this.container.tip().is(":visible"))return}else{var e=u.extend({},this.options,{value:this.value,input:this.input});this.$element.editableContainer(e),this.$element.on("save.internal",u.proxy(this.save,this)),this.container=this.$element.data("editableContainer")}this.container.show(t)}},hide:function(){this.container&&this.container.hide()},toggle:function(t){this.container&&this.container.tip().is(":visible")?this.hide():this.show(t)},save:function(t,e){var i,s;this.options.unsavedclass&&("function"==typeof this.options.url||!1===this.options.display||void 0!==e.response||this.options.savenochange&&this.input.value2str(this.value)!==this.input.value2str(e.newValue)?this.$element.removeClass(this.options.unsavedclass):this.$element.addClass(this.options.unsavedclass)),this.options.highlight&&(i=this.$element,s=i.css("background-color"),i.css("background-color",this.options.highlight),setTimeout(function(){"transparent"===s&&(s=""),i.css("background-color",s),i.addClass("editable-bg-transition"),setTimeout(function(){i.removeClass("editable-bg-transition")},1700)},10)),this.setValue(e.newValue,!1,e.response)},validate:function(){if("function"==typeof this.options.validate)return this.options.validate.call(this,this.value)},setValue:function(t,e,i){this.value=e?this.input.str2value(t):t,this.container&&this.container.option("value",this.value),u.when(this.render(i)).then(u.proxy(function(){this.handleEmpty()},this))},activate:function(){this.container&&this.container.activate()},destroy:function(){this.disable(),this.container&&this.container.destroy(),this.input.destroy(),"manual"!==this.options.toggle&&(this.$element.removeClass("editable-click"),this.$element.off(this.options.toggle+".editable")),this.$element.off("save.internal"),this.$element.removeClass("editable editable-open editable-disabled"),this.$element.removeData("editable")}},u.fn.editable=function(s){var i={},n=arguments,o="editable";switch(s){case"validate":return this.each(function(){var t,e=u(this).data(o);e&&(t=e.validate())&&(i[e.options.name]=t)}),i;case"getValue":return 2===arguments.length&&!0===arguments[1]?i=this.eq(0).data(o).value:this.each(function(){var t=u(this).data(o);t&&null!=t.value&&(i[t.options.name]=t.input.value2submit(t.value))}),i;case"submit":var t,e,a,r=arguments[1]||{},l=this,h=this.editable("validate");return u.isEmptyObject(h)?(a={},1===l.length?(e={name:(t=l.data("editable")).options.name||"",value:t.input.value2submit(t.value),pk:"function"==typeof t.options.pk?t.options.pk.call(t.options.scope):t.options.pk},"function"==typeof t.options.params?e=t.options.params.call(t.options.scope,e):(t.options.params=u.fn.editableutils.tryParseJson(t.options.params,!0),u.extend(e,t.options.params)),a={url:t.options.url,data:e,type:"POST"},r.success=r.success||t.options.success,r.error=r.error||t.options.error):(e=this.editable("getValue"),a={url:r.url,data:e,type:"POST"}),a.success="function"==typeof r.success?function(t){r.success.call(l,t,r)}:u.noop,a.error="function"==typeof r.error?function(){r.error.apply(l,arguments)}:u.noop,r.ajaxOptions&&u.extend(a,r.ajaxOptions),r.data&&u.extend(a.data,r.data),u.ajax(a)):"function"==typeof r.error&&r.error.call(l,h),this}return this.each(function(){var t=u(this),e=t.data(o),i="object"==typeof s&&s;i&&i.selector?e=new p(this,i):(e||t.data(o,e=new p(this,i)),"string"==typeof s&&e[s].apply(e,Array.prototype.slice.call(n,1)))})},u.fn.editable.defaults={type:"text",disabled:!1,toggle:"click",emptytext:"Empty",autotext:"auto",value:null,display:null,emptyclass:"editable-empty",unsavedclass:"editable-unsaved",selector:null,highlight:"#FFFF80"}})(window.jQuery),(s=>{function t(){}s.fn.editabletypes={},t.prototype={init:function(t,e,i){this.type=t,this.options=s.extend({},i,e)},prerender:function(){this.$tpl=s(this.options.tpl),this.$input=this.$tpl,this.$clear=null,this.error=null},render:function(){},value2html:function(t,e){s(e)[this.options.escape?"text":"html"](s.trim(t))},html2value:function(t){return s("<div>").html(t).text()},value2str:function(t){return t},str2value:function(t){return t},value2submit:function(t){return t},value2input:function(t){this.$input.val(t)},input2value:function(){return this.$input.val()},activate:function(){this.$input.is(":visible")&&this.$input.focus()},clear:function(){this.$input.val(null)},escape:function(t){return s("<div>").text(t).html()},autosubmit:function(){},destroy:function(){},setClass:function(){this.options.inputclass&&this.$input.addClass(this.options.inputclass)},setAttr:function(t){null!=this.options[t]&&this.$input.attr(t,this.options[t])},option:function(t,e){this.options[t]=e}},t.defaults={tpl:"",inputclass:null,escape:!0,scope:null,showbuttons:!0},s.extend(s.fn.editabletypes,{abstractinput:t})})(window.jQuery),(r=>{function t(t){}r.fn.editableutils.inherit(t,r.fn.editabletypes.abstractinput),r.extend(t.prototype,{render:function(){var t=r.Deferred();return this.error=null,this.onSourceReady(function(){this.renderList(),t.resolve()},function(){this.error=this.options.sourceError,t.resolve()}),t.promise()},html2value:function(t){return null},value2html:function(t,e,i,s){function n(){"function"==typeof i?i.call(e,t,this.sourceData,s):this.value2htmlFinal(t,e),o.resolve()}var o=r.Deferred();return null===t?n.call(this):this.onSourceReady(n,function(){o.resolve()}),o.promise()},onSourceReady:function(e,i){var t;if(r.isFunction(this.options.source)?(t=this.options.source.call(this.options.scope),this.sourceData=null):t=this.options.source,this.options.sourceCache&&Array.isArray(this.sourceData))e.call(this);else{try{t=r.fn.editableutils.tryParseJson(t,!1)}catch(t){return void i.call(this)}if("string"==typeof t){if(this.options.sourceCache){var s,n=t;if(r(document).data(n)||r(document).data(n,{}),!1===(s=r(document).data(n)).loading&&s.sourceData)return this.sourceData=s.sourceData,this.doPrepend(),void e.call(this);if(!0===s.loading)return s.callbacks.push(r.proxy(function(){this.sourceData=s.sourceData,this.doPrepend(),e.call(this)},this)),void s.err_callbacks.push(r.proxy(i,this));s.loading=!0,s.callbacks=[],s.err_callbacks=[]}n=r.extend({url:t,type:"get",cache:!1,dataType:"json",success:r.proxy(function(t){s&&(s.loading=!1),this.sourceData=this.makeArray(t),Array.isArray(this.sourceData)?(s&&(s.sourceData=this.sourceData,r.each(s.callbacks,function(){this.call()})),this.doPrepend(),e.call(this)):(i.call(this),s&&r.each(s.err_callbacks,function(){this.call()}))},this),error:r.proxy(function(){i.call(this),s&&(s.loading=!1,r.each(s.err_callbacks,function(){this.call()}))},this)},this.options.sourceOptions);r.ajax(n)}else this.sourceData=this.makeArray(t),(Array.isArray(this.sourceData)?(this.doPrepend(),e):i).call(this)}},doPrepend:function(){null!=this.options.prepend&&(Array.isArray(this.prependData)||(r.isFunction(this.options.prepend)&&(this.options.prepend=this.options.prepend.call(this.options.scope)),this.options.prepend=r.fn.editableutils.tryParseJson(this.options.prepend,!0),"string"==typeof this.options.prepend&&(this.options.prepend={"":this.options.prepend}),this.prependData=this.makeArray(this.options.prepend)),Array.isArray(this.prependData))&&Array.isArray(this.sourceData)&&(this.sourceData=this.prependData.concat(this.sourceData))},renderList:function(){},value2htmlFinal:function(t,e){},makeArray:function(t){var i,s,e,n=[];if(!t||"string"==typeof t)return null;if(Array.isArray(t))for(var o=function(t,e){if(s={value:t,text:e},2<=i++)return!1},a=0;a<t.length;a++)"object"==typeof(e=t[a])?(i=0,r.each(e,o),1===i?n.push(s):1<i&&(e.children&&(e.children=this.makeArray(e.children)),n.push(e))):n.push({value:e,text:e});else r.each(t,function(t,e){n.push({value:t,text:e})});return n},option:function(t,e){this.options[t]=e,"source"===t&&(this.sourceData=null),"prepend"===t&&(this.prependData=null)}}),t.defaults=r.extend({},r.fn.editabletypes.abstractinput.defaults,{source:null,prepend:!1,sourceError:"Error when loading list",sourceCache:!0,sourceOptions:null}),r.fn.editabletypes.list=t})(window.jQuery),(i=>{function e(t){this.init("text",t,e.defaults)}i.fn.editableutils.inherit(e,i.fn.editabletypes.abstractinput),i.extend(e.prototype,{render:function(){this.renderClear(),this.setClass(),this.setAttr("placeholder")},activate:function(){this.$input.is(":visible")&&(this.$input.focus(),i.fn.editableutils.setCursorPosition(this.$input.get(0),this.$input.val().length),this.toggleClear)&&this.toggleClear()},renderClear:function(){this.options.clear&&(this.$clear=i('<span class="editable-clear-x"></span>'),this.$input.after(this.$clear).css("padding-right",24).keyup(i.proxy(function(t){var e;~i.inArray(t.keyCode,[40,38,9,13,27])||(clearTimeout(this.t),(e=this).t=setTimeout(function(){e.toggleClear(t)},100))},this)).parent().css("position","relative"),this.$clear.click(i.proxy(this.clear,this)))},postrender:function(){},toggleClear:function(t){var e,i;this.$clear&&(e=this.$input.val().length,i=this.$clear.is(":visible"),e&&!i&&this.$clear.show(),!e)&&i&&this.$clear.hide()},clear:function(){this.$clear.hide(),this.$input.val("").focus()}}),e.defaults=i.extend({},i.fn.editabletypes.abstractinput.defaults,{tpl:'<input type="text">',placeholder:null,clear:!0}),i.fn.editabletypes.text=e})(window.jQuery),(e=>{function i(t){this.init("textarea",t,i.defaults)}e.fn.editableutils.inherit(i,e.fn.editabletypes.abstractinput),e.extend(i.prototype,{render:function(){this.setClass(),this.setAttr("placeholder"),this.setAttr("rows"),this.$input.keydown(function(t){t.ctrlKey&&13===t.which&&e(this).closest("form").submit()})},activate:function(){e.fn.editabletypes.text.prototype.activate.call(this)}}),i.defaults=e.extend({},e.fn.editabletypes.abstractinput.defaults,{tpl:"<textarea></textarea>",inputclass:"input-large",placeholder:null,rows:7}),e.fn.editabletypes.textarea=i})(window.jQuery),(o=>{function e(t){this.init("select",t,e.defaults)}o.fn.editableutils.inherit(e,o.fn.editabletypes.list),o.extend(e.prototype,{renderList:function(){this.$input.empty();var n=function(t,e){var i;if(Array.isArray(e))for(var s=0;s<e.length;s++)i={},e[s].children?(i.label=e[s].text,t.append(n(o("<optgroup>",i),e[s].children))):(i.value=e[s].value,e[s].disabled&&(i.disabled=!0),t.append(o("<option>",i).text(e[s].text)));return t};n(this.$input,this.sourceData),this.setClass(),this.$input.on("keydown.editable",function(t){13===t.which&&o(this).closest("form").submit()})},value2htmlFinal:function(t,e){var i="",t=o.fn.editableutils.itemsByValue(t,this.sourceData);t.length&&(i=t[0].text),o.fn.editabletypes.abstractinput.prototype.value2html.call(this,i,e)},autosubmit:function(){this.$input.off("keydown.editable").on("change.editable",function(){o(this).closest("form").submit()})}}),e.defaults=o.extend({},o.fn.editabletypes.list.defaults,{tpl:"<select></select>"}),o.fn.editabletypes.select=e})(window.jQuery),(n=>{function e(t){this.init("checklist",t,e.defaults)}n.fn.editableutils.inherit(e,n.fn.editabletypes.list),n.extend(e.prototype,{renderList:function(){var t;if(this.$tpl.empty(),Array.isArray(this.sourceData)){for(var e=0;e<this.sourceData.length;e++)t=n("<label>").append(n("<input>",{type:"checkbox",value:this.sourceData[e].value})).append(n("<span>").text(" "+this.sourceData[e].text)),n("<div>").append(t).appendTo(this.$tpl);this.$input=this.$tpl.find('input[type="checkbox"]'),this.setClass()}},value2str:function(t){return Array.isArray(t)?t.sort().join(this.options.separator.trim()):""},str2value:function(t){var e;return"string"==typeof t&&t.length?(e=new RegExp("\\s*"+n.trim(this.options.separator)+"\\s*"),t.split(e)):Array.isArray(t)?t:[t]},value2input:function(s){this.$input.prop("checked",!1),Array.isArray(s)&&s.length&&this.$input.each(function(t,e){var i=n(e);n.each(s,function(t,e){i.val()==e&&i.prop("checked",!0)})})},input2value:function(){var i=[];return this.$input.filter(":checked").each(function(t,e){i.push(n(e).val())}),i},value2htmlFinal:function(t,e){var i=[],t=n.fn.editableutils.itemsByValue(t,this.sourceData),s=this.options.escape;t.length?(n.each(t,function(t,e){e=s?n.fn.editableutils.escape(e.text):e.text;i.push(e)}),n(e).html(i.join("<br>"))):n(e).empty()},activate:function(){this.$input.first().focus()},autosubmit:function(){this.$input.on("keydown",function(t){13===t.which&&n(this).closest("form").submit()})}}),e.defaults=n.extend({},n.fn.editabletypes.list.defaults,{tpl:'<div class="editable-checklist"></div>',inputclass:null,separator:","}),n.fn.editabletypes.checklist=e})(window.jQuery),(i=>{function e(t){this.init("password",t,e.defaults)}i.fn.editableutils.inherit(e,i.fn.editabletypes.text),i.extend(e.prototype,{value2html:function(t,e){t?i(e).text("[hidden]"):i(e).empty()},html2value:function(t){return null}}),e.defaults=i.extend({},i.fn.editabletypes.text.defaults,{tpl:'<input type="password">'}),i.fn.editabletypes.password=e})(window.jQuery),(t=>{function e(t){this.init("email",t,e.defaults)}t.fn.editableutils.inherit(e,t.fn.editabletypes.text),e.defaults=t.extend({},t.fn.editabletypes.text.defaults,{tpl:'<input type="email">'}),t.fn.editabletypes.email=e})(window.jQuery),(t=>{function e(t){this.init("url",t,e.defaults)}t.fn.editableutils.inherit(e,t.fn.editabletypes.text),e.defaults=t.extend({},t.fn.editabletypes.text.defaults,{tpl:'<input type="url">'}),t.fn.editabletypes.url=e})(window.jQuery),(t=>{function e(t){this.init("tel",t,e.defaults)}t.fn.editableutils.inherit(e,t.fn.editabletypes.text),e.defaults=t.extend({},t.fn.editabletypes.text.defaults,{tpl:'<input type="tel">'}),t.fn.editabletypes.tel=e})(window.jQuery),(t=>{function e(t){this.init("number",t,e.defaults)}t.fn.editableutils.inherit(e,t.fn.editabletypes.text),t.extend(e.prototype,{render:function(){e.superclass.render.call(this),this.setAttr("min"),this.setAttr("max"),this.setAttr("step")},postrender:function(){this.$clear&&this.$clear.css({right:24})}}),e.defaults=t.extend({},t.fn.editabletypes.text.defaults,{tpl:'<input type="number">',inputclass:"input-mini",min:null,max:null,step:null}),t.fn.editabletypes.number=e})(window.jQuery),(t=>{function e(t){this.init("range",t,e.defaults)}t.fn.editableutils.inherit(e,t.fn.editabletypes.number),t.extend(e.prototype,{render:function(){this.$input=this.$tpl.filter("input"),this.setClass(),this.setAttr("min"),this.setAttr("max"),this.setAttr("step"),this.$input.on("input",function(){t(this).siblings("output").text(t(this).val())})},activate:function(){this.$input.focus()}}),e.defaults=t.extend({},t.fn.editabletypes.number.defaults,{tpl:'<input type="range"><output style="width: 30px; display: inline-block"></output>',inputclass:"input-medium"}),t.fn.editabletypes.range=e})(window.jQuery),(t=>{function e(t){this.init("time",t,e.defaults)}t.fn.editableutils.inherit(e,t.fn.editabletypes.abstractinput),t.extend(e.prototype,{render:function(){this.setClass()}}),e.defaults=t.extend({},t.fn.editabletypes.abstractinput.defaults,{tpl:'<input type="time">'}),t.fn.editabletypes.time=e})(window.jQuery),(o=>{function a(t){var e,i;this.init("select2",t,a.defaults),t.select2=t.select2||{},this.sourceData=null,t.placeholder&&(t.select2.placeholder=t.placeholder),!t.select2.tags&&t.source&&(e=t.source,"string"==typeof(e=o.isFunction(t.source)?t.source.call(t.scope):e)?(t.select2.ajax=t.select2.ajax||{},t.select2.ajax.data||(t.select2.ajax.data=function(t){return{query:t}}),t.select2.ajax.results||(t.select2.ajax.results=function(t){return{results:t}}),t.select2.ajax.url=e):(this.sourceData=this.convertSource(e),t.select2.data=this.sourceData)),this.options.select2=o.extend({},a.defaults.select2,t.select2),this.isMultiple=this.options.select2.tags||this.options.select2.multiple,this.isRemote="ajax"in this.options.select2,this.idFunc=this.options.select2.id,"function"!=typeof this.idFunc&&(i=this.idFunc||"id",this.idFunc=function(t){return t[i]}),this.formatSelection=this.options.select2.formatSelection,"function"!=typeof this.formatSelection&&(this.formatSelection=function(t){return t.text})}o.fn.editableutils.inherit(a,o.fn.editabletypes.abstractinput),o.extend(a.prototype,{render:function(){this.setClass(),this.isRemote&&this.$input.on("select2-loaded",o.proxy(function(t){this.sourceData=t.items.results},this)),this.isMultiple&&this.$input.on("change",function(){o(this).closest("form").parent().triggerHandler("resize")})},value2html:function(t,e){var i,s="",n=this;this.options.select2.tags?i=t:this.sourceData&&(i=o.fn.editableutils.itemsByValue(t,this.sourceData,this.idFunc)),Array.isArray(i)?(s=[],o.each(i,function(t,e){s.push(e&&"object"==typeof e?n.formatSelection(e):e)})):i&&(s=n.formatSelection(i)),s=Array.isArray(s)?s.join(this.options.viewseparator):s,a.superclass.value2html.call(this,s,e)},html2value:function(t){return this.options.select2.tags?this.str2value(t,this.options.viewseparator):null},value2input:function(t){var e,i;Array.isArray(t)&&(t=t.join(this.getSeparator())),this.$input.data("select2")?this.$input.val(t).trigger("change",!0):(this.$input.val(t),this.$input.select2(this.options.select2)),!this.isRemote||this.isMultiple||this.options.select2.initSelection||(e=this.options.select2.id,i=this.options.select2.formatSelection,e)||i||(e=o(this.options.scope)).data("editable").isEmpty||(i={id:t,text:e.text()},this.$input.select2("data",i))},input2value:function(){return this.$input.select2("val")},str2value:function(t,e){if("string"!=typeof t||!this.isMultiple)return t;var i,s,n;if(e=e||this.getSeparator(),null===t||t.length<1)return null;for(s=0,n=(i=t.split(e)).length;s<n;s+=1)i[s]=o.trim(i[s]);return i},autosubmit:function(){this.$input.on("change",function(t,e){e||o(this).closest("form").submit()})},getSeparator:function(){return this.options.select2.separator||o.fn.select2.defaults.separator},convertSource:function(t){if(Array.isArray(t)&&t.length&&void 0!==t[0].value)for(var e=0;e<t.length;e++)void 0!==t[e].value&&(t[e].id=t[e].value,delete t[e].value);return t},destroy:function(){this.$input&&this.$input.data("select2")&&this.$input.select2("destroy")}}),a.defaults=o.extend({},o.fn.editabletypes.abstractinput.defaults,{tpl:'<input type="hidden">',select2:null,placeholder:null,source:null,viewseparator:", "}),o.fn.editabletypes.select2=a})(window.jQuery),(a=>{function n(t,e){this.$element=a(t),this.$element.is("input")?(this.options=a.extend({},a.fn.combodate.defaults,e,this.$element.data()),this.init()):a.error("Combodate should be applied to INPUT element")}n.prototype={constructor:n,init:function(){this.map={day:["D","date"],month:["M","month"],year:["Y","year"],hour:["[Hh]","hours"],minute:["m","minutes"],second:["s","seconds"],ampm:["[Aa]",""]},this.$widget=a('<span class="combodate"></span>').html(this.getTemplate()),this.initCombos(),this.$widget.on("change","select",a.proxy(function(t){this.$element.val(this.getValue()).change(),this.options.smartDays&&(a(t.target).is(".month")||a(t.target).is(".year"))&&this.fillCombo("day")},this)),this.$widget.find("select").css("width","auto"),this.$element.hide().after(this.$widget),this.setValue(this.$element.val()||this.options.value)},getTemplate:function(){var s=this.options.template;return a.each(this.map,function(t,e){e=e[0];var i=new RegExp(e+"+"),e=1<e.length?e.substring(1,2):e;s=s.replace(i,"{"+e+"}")}),s=s.replace(/ /g,"&nbsp;"),a.each(this.map,function(t,e){e=1<(e=e[0]).length?e.substring(1,2):e;s=s.replace("{"+e+"}",'<select class="'+t+'"></select>')}),s},initCombos:function(){for(var t in this.map){var e=this.$widget.find("."+t);this["$"+t]=e.length?e:null,this.fillCombo(t)}},fillCombo:function(t){var e=this["$"+t];if(e){var i=this["fill"+t.charAt(0).toUpperCase()+t.slice(1)](),t=e.val();e.empty();for(var s=0;s<i.length;s++)e.append('<option value="'+i[s][0]+'">'+i[s][1]+"</option>");e.val(t)}},fillCommon:function(t){var e,i=[];return"name"===this.options.firstItem?(e=(e="function"==typeof(e=moment.relativeTime||moment.langData()._relativeTime)[t]?e[t](1,!0,t,!1):e[t]).split(" ").reverse()[0],i.push(["",e])):"empty"===this.options.firstItem&&i.push(["",""]),i},fillDay:function(){var t,e,i,s,n=this.fillCommon("d"),o=-1!==this.options.template.indexOf("DD"),a=31;for(this.options.smartDays&&this.$month&&this.$year&&(i=parseInt(this.$month.val(),10),s=parseInt(this.$year.val(),10),isNaN(i)||isNaN(s)||(a=moment([s,i]).daysInMonth())),e=1;e<=a;e++)t=o?this.leadZero(e):e,n.push([e,t]);return n},fillMonth:function(){for(var t,e=this.fillCommon("M"),i=-1!==this.options.template.indexOf("MMMM"),s=-1!==this.options.template.indexOf("MMM"),n=-1!==this.options.template.indexOf("MM"),o=0;o<=11;o++)t=i?moment().date(1).month(o).format("MMMM"):s?moment().date(1).month(o).format("MMM"):n?this.leadZero(o+1):o+1,e.push([o,t]);return e},fillYear:function(){for(var t,e=[],i=-1!==this.options.template.indexOf("YYYY"),s=this.options.maxYear;s>=this.options.minYear;s--)t=i?s:(s+"").substring(2),e[this.options.yearDescending?"push":"unshift"]([s,t]);return e=this.fillCommon("y").concat(e)},fillHour:function(){for(var t,e=this.fillCommon("h"),i=-1!==this.options.template.indexOf("h"),s=(this.options.template.indexOf("H"),-1!==this.options.template.toLowerCase().indexOf("hh")),n=i?12:23,o=i?1:0;o<=n;o++)t=s?this.leadZero(o):o,e.push([o,t]);return e},fillMinute:function(){for(var t,e=this.fillCommon("m"),i=-1!==this.options.template.indexOf("mm"),s=0;s<=59;s+=this.options.minuteStep)t=i?this.leadZero(s):s,e.push([s,t]);return e},fillSecond:function(){for(var t,e=this.fillCommon("s"),i=-1!==this.options.template.indexOf("ss"),s=0;s<=59;s+=this.options.secondStep)t=i?this.leadZero(s):s,e.push([s,t]);return e},fillAmpm:function(){var t=-1!==this.options.template.indexOf("a");this.options.template.indexOf("A");return[["am",t?"am":"AM"],["pm",t?"pm":"PM"]]},getValue:function(t){var e,s={},n=this,o=!1;return a.each(this.map,function(t,e){var i;if("ampm"!==t)return i="day"===t?1:0,s[t]=n["$"+t]?parseInt(n["$"+t].val(),10):i,isNaN(s[t])?!(o=!0):void 0}),o?"":(this.$ampm&&(s.hour=12===s.hour?"am"===this.$ampm.val()?0:12:"am"===this.$ampm.val()?s.hour:s.hour+12),e=moment([s.year,s.month,s.day,s.hour,s.minute,s.second]),this.highlight(e),null===(t=void 0===t?this.options.format:t)?e.isValid()?e:null:e.isValid()?e.format(t):"")},setValue:function(t){var i,s,n;function o(t,s){var n={};return t.children("option").each(function(t,e){var i,e=a(e).attr("value");""!==e&&(i=Math.abs(e-s),void 0===n.distance||i<n.distance)&&(n={value:e,distance:i})}),n.value}t&&(i="string"==typeof t?moment(t,this.options.format):moment(t),s=this,n={},i.isValid())&&(a.each(this.map,function(t,e){"ampm"!==t&&(n[t]=i[e[1]]())}),this.$ampm&&(12<=n.hour?(n.ampm="pm",12<n.hour&&(n.hour-=12)):(n.ampm="am",0===n.hour&&(n.hour=12))),a.each(n,function(t,e){s["$"+t]&&("minute"===t&&1<s.options.minuteStep&&s.options.roundTime&&(e=o(s["$"+t],e)),"second"===t&&1<s.options.secondStep&&s.options.roundTime&&(e=o(s["$"+t],e)),s["$"+t].val(e))}),this.options.smartDays&&this.fillCombo("day"),this.$element.val(i.format(this.options.format)).change())},highlight:function(t){t.isValid()?this.options.errorClass?this.$widget.removeClass(this.options.errorClass):this.$widget.find("select").css("border-color",this.borderColor):this.options.errorClass?this.$widget.addClass(this.options.errorClass):(this.borderColor||(this.borderColor=this.$widget.find("select").css("border-color")),this.$widget.find("select").css("border-color","red"))},leadZero:function(t){return t<=9?"0"+t:t},destroy:function(){this.$widget.remove(),this.$element.removeData("combodate").show()}},a.fn.combodate=function(i){var t,s=Array.apply(null,arguments);return s.shift(),"getValue"===i&&this.length&&(t=this.eq(0).data("combodate"))?t.getValue.apply(t,s):this.each(function(){var t=a(this),e=t.data("combodate");e||t.data("combodate",e=new n(this,"object"==typeof i&&i)),"string"==typeof i&&"function"==typeof e[i]&&e[i].apply(e,s)})},a.fn.combodate.defaults={format:"DD-MM-YYYY HH:mm",template:"D / MMM / YYYY   H : mm",value:null,minYear:1970,maxYear:(new Date).getFullYear(),yearDescending:!0,minuteStep:5,secondStep:1,firstItem:"empty",errorClass:null,roundTime:!0,smartDays:!1}})(window.jQuery),(e=>{function i(t){this.init("combodate",t,i.defaults),this.options.viewformat||(this.options.viewformat=this.options.format),t.combodate=e.fn.editableutils.tryParseJson(t.combodate,!0),this.options.combodate=e.extend({},i.defaults.combodate,t.combodate,{format:this.options.format,template:this.options.template})}e.fn.editableutils.inherit(i,e.fn.editabletypes.abstractinput),e.extend(i.prototype,{render:function(){this.$input.combodate(this.options.combodate),"bs3"===e.fn.editableform.engine&&this.$input.siblings().find("select").addClass("form-control"),this.options.inputclass&&this.$input.siblings().find("select").addClass(this.options.inputclass)},value2html:function(t,e){t=t?t.format(this.options.viewformat):"";i.superclass.value2html.call(this,t,e)},html2value:function(t){return t?moment(t,this.options.viewformat):null},value2str:function(t){return t?t.format(this.options.format):""},str2value:function(t){return t?moment(t,this.options.format):null},value2submit:function(t){return this.value2str(t)},value2input:function(t){this.$input.combodate("setValue",t)},input2value:function(){return this.$input.combodate("getValue",null)},activate:function(){this.$input.siblings(".combodate").find("select").eq(0).focus()},autosubmit:function(){}}),i.defaults=e.extend({},e.fn.editabletypes.abstractinput.defaults,{tpl:'<input type="text">',inputclass:null,format:"YYYY-MM-DD",viewformat:null,template:"D / MMM / YYYY",combodate:null}),e.fn.editabletypes.combodate=i})(window.jQuery),(l=>{var h,u,p;l.extend(l.fn.editableContainer.Popup.prototype,{containerName:"poshytip",innerCss:"div.tip-inner",defaults:l.fn.poshytip.defaults,initContainer:function(){this.handlePlacement(),l.extend(this.containerOptions,{showOn:"none",content:"",alignTo:"target"}),this.call(this.containerOptions)},show:function(t){this.$element.addClass("editable-open"),!1!==t&&this.closeOthers(this.$element[0]),this.$form=l("<div>"),this.renderForm();t=l("<label>").text(this.options.title||this.$element.data("title")||this.$element.data("originalTitle")),t=l("<div>").append(t).append(this.$form);this.call("update",t),this.call("show"),this.tip().addClass(this.containerClass),this.$form.data("editableform").input.activate()},innerHide:function(){this.call("hide")},innerDestroy:function(){this.call("destroy")},setPosition:function(){this.container().refresh(!1)},handlePlacement:function(){var t,e,i=0,s=0;switch(this.options.placement){case"top":t="center",e="top",s=5;break;case"right":t="right",e="center",i=10;break;case"bottom":t="center",e="bottom",s=5;break;case"left":t="left",e="center",i=10}l.extend(this.containerOptions,{alignX:t,offsetX:i,alignY:e,offsetY:s})}}),l.fn.editableContainer.defaults=l.extend({},l.fn.editableContainer.defaults,{className:"tip-yellowsimple"}),l.Poshytip&&(h=/^url\(["']?([^"'\)]*)["']?\);?$/i,u=/\.png$/i,p=!!window.createPopup&&"undefined"==document.documentElement.currentStyle.minWidth,l.Poshytip.prototype.refresh=function(t){if(!this.disabled){var e;if(t){if(!this.$tip.data("active"))return;e={left:this.$tip.css("left"),top:this.$tip.css("top")}}this.$tip.css({left:0,top:0}).appendTo(document.body),void 0===this.opacity&&(this.opacity=this.$tip.css("opacity"));var i,s,n,o,a=this.$tip.css("background-image").match(h),r=this.$arrow.css("background-image").match(h),a=(a&&(i=u.test(a[1]),p&&i?(this.$tip.css("background-image","none"),this.$inner.css({margin:0,border:0,padding:0}),a=i=!1):this.$tip.prepend('<table class="fallback" border="0" cellpadding="0" cellspacing="0"><tr><td class="tip-top tip-bg-image" colspan="2"><span></span></td><td class="tip-right tip-bg-image" rowspan="2"><span></span></td></tr><tr><td class="tip-left tip-bg-image" rowspan="2"><span></span></td><td></td></tr><tr><td class="tip-bottom tip-bg-image" colspan="2"><span></span></td></tr></table>').css({border:0,padding:0,"background-image":"none","background-color":"transparent"}).find(".tip-bg-image").css("background-image",'url("'+a[1]+'")').end().find("td").eq(3).append(this.$inner),i)&&!l.support.opacity&&(this.opts.fade=!1),r&&!l.support.opacity&&(p&&u.test(r[1])&&(r=!1,this.$arrow.css("background-image","none")),this.opts.fade=!1),this.$tip.find("table.fallback"));p?(this.$tip[0].style.width="",a.width("auto").find("td").eq(3).width("auto"),i=this.$tip.width(),s=parseInt(this.$tip.css("min-width"),10),n=parseInt(this.$tip.css("max-width"),10),!isNaN(s)&&i<s?i=s:!isNaN(n)&&n<i&&(i=n),this.$tip.add(a).width(i).eq(0).find("td").eq(3).width("100%")):a[0]&&a.width("auto").find("td").eq(3).width("auto").end().end().width(document.defaultView&&document.defaultView.getComputedStyle&&parseFloat(document.defaultView.getComputedStyle(this.$tip[0],null).width)||this.$tip.width()).find("td").eq(3).width("100%"),this.tipOuterW=this.$tip.outerWidth(),this.tipOuterH=this.$tip.outerHeight(),this.calcPos(),r&&this.pos.arrow&&(this.$arrow[0].className="tip-arrow tip-arrow-"+this.pos.arrow,this.$arrow.css("visibility","inherit")),t?(this.asyncAnimating=!0,(o=this).$tip.css(e).animate({left:this.pos.l,top:this.pos.t},200,function(){o.asyncAnimating=!1})):this.$tip.css({left:this.pos.l,top:this.pos.t})}})})(window.jQuery),(i=>{function s(t){this.init("dateui",t,s.defaults),this.initPicker(t,s.defaults)}i.fn.editableutils.inherit(s,i.fn.editabletypes.abstractinput),i.extend(s.prototype,{initPicker:function(t,e){this.options.viewformat||(this.options.viewformat=this.options.format),this.options.viewformat=this.options.viewformat.replace("yyyy","yy"),this.options.format=this.options.format.replace("yyyy","yy"),this.options.datepicker=i.extend({},e.datepicker,t.datepicker,{dateFormat:this.options.viewformat})},render:function(){this.$input.datepicker(this.options.datepicker),this.options.clear&&(this.$clear=i('<a href="#"></a>').html(this.options.clear).click(i.proxy(function(t){t.preventDefault(),t.stopPropagation(),this.clear()},this)),this.$tpl.parent().append(i('<div class="editable-clear">').append(this.$clear)))},value2html:function(t,e){t=i.datepicker.formatDate(this.options.viewformat,t);s.superclass.value2html.call(this,t,e)},html2value:function(t){if("string"!=typeof t)return t;var e;try{e=i.datepicker.parseDate(this.options.viewformat,t)}catch(t){}return e},value2str:function(t){return i.datepicker.formatDate(this.options.format,t)},str2value:function(t){if("string"!=typeof t)return t;var e;try{e=i.datepicker.parseDate(this.options.format,t)}catch(t){}return e},value2submit:function(t){return this.value2str(t)},value2input:function(t){this.$input.datepicker("setDate",t)},input2value:function(){return this.$input.datepicker("getDate")},activate:function(){},clear:function(){this.$input.datepicker("setDate",null),this.isAutosubmit&&this.submit()},autosubmit:function(){this.isAutosubmit=!0,this.$input.on("mouseup","table.ui-datepicker-calendar a.ui-state-default",i.proxy(this.submit,this))},submit:function(){var t=this.$input.closest("form");setTimeout(function(){t.submit()},200)}}),s.defaults=i.extend({},i.fn.editabletypes.abstractinput.defaults,{tpl:'<div class="editable-date"></div>',inputclass:null,format:"yyyy-mm-dd",viewformat:null,datepicker:{firstDay:0,changeYear:!0,changeMonth:!0,showOtherMonths:!0},clear:"&times; clear"}),i.fn.editabletypes.dateui=s})(window.jQuery),(e=>{function i(t){this.init("dateuifield",t,i.defaults),this.initPicker(t,i.defaults)}e.fn.editableutils.inherit(i,e.fn.editabletypes.dateui),e.extend(i.prototype,{render:function(){this.$input.datepicker(this.options.datepicker),e.fn.editabletypes.text.prototype.renderClear.call(this)},value2input:function(t){this.$input.val(e.datepicker.formatDate(this.options.viewformat,t))},input2value:function(){return this.html2value(this.$input.val())},activate:function(){e.fn.editabletypes.text.prototype.activate.call(this)},toggleClear:function(){e.fn.editabletypes.text.prototype.toggleClear.call(this)},autosubmit:function(){}}),i.defaults=e.extend({},e.fn.editabletypes.dateui.defaults,{tpl:'<input type="text"/>',inputclass:null,datepicker:{showOn:"button",buttonImage:"http://jqueryui.com/resources/demos/datepicker/images/calendar.gif",buttonImageOnly:!0,firstDay:0,changeYear:!0,changeMonth:!0,showOtherMonths:!0},clear:!1}),e.fn.editabletypes.dateuifield=i})(window.jQuery);
\ No newline at end of file
+(o=>{function n(t,e){this.options=o.extend({},o.fn.editableform.defaults,e),this.$div=o(t),this.options.scope||(this.options.scope=this)}n.prototype={constructor:n,initInput:function(){this.input=this.options.input,this.value=this.input.str2value(this.options.value),this.input.prerender()},initTemplate:function(){this.$form=o(o.fn.editableform.template)},initButtons:function(){var t=this.$form.find(".editable-buttons");t.append(o.fn.editableform.buttons),"bottom"===this.options.showbuttons&&t.addClass("editable-buttons-bottom")},render:function(){this.$loading=o(o.fn.editableform.loading),this.$div.empty().append(this.$loading),this.initTemplate(),this.options.showbuttons?this.initButtons():this.$form.find(".editable-buttons").remove(),this.showLoading(),this.isSaving=!1,this.$div.triggerHandler("rendering"),this.initInput(),this.$form.find("div.editable-input").append(this.input.$tpl),this.$div.append(this.$form),o.when(this.input.render()).then(o.proxy(function(){var t;this.options.showbuttons||this.input.autosubmit(),this.$form.find(".editable-cancel").click(o.proxy(this.cancel,this)),this.input.error?(this.error(this.input.error),this.$form.find(".editable-submit").attr("disabled",!0),this.input.$input.attr("disabled",!0),this.$form.submit(function(t){t.preventDefault()})):(this.error(!1),this.input.$input.removeAttr("disabled"),this.$form.find(".editable-submit").removeAttr("disabled"),t=null==this.value||""===this.value?this.options.defaultValue:this.value,this.input.value2input(t),this.$form.submit(o.proxy(this.submit,this))),this.$div.triggerHandler("rendered"),this.showForm(),this.input.postrender&&this.input.postrender()},this))},cancel:function(){this.$div.triggerHandler("cancel")},showLoading:function(){var t,e;this.$form?(t=this.$form.outerWidth(),e=this.$form.outerHeight(),t&&this.$loading.width(t),e&&this.$loading.height(e),this.$form.hide()):(t=this.$loading.parent().width())&&this.$loading.width(t),this.$loading.show()},showForm:function(t){this.$loading.hide(),this.$form.show(),!1!==t&&this.input.activate(),this.$div.triggerHandler("show")},error:function(t){var e=this.$form.find(".control-group"),i=this.$form.find(".editable-error-block");if(!1===t)e.removeClass(o.fn.editableform.errorGroupClass),i.removeClass(o.fn.editableform.errorBlockClass).empty().hide();else{if(t){for(var s=(""+t).split("\n"),n=0;n<s.length;n++)s[n]=o("<div>").text(s[n]).html();t=s.join("<br>")}e.addClass(o.fn.editableform.errorGroupClass),i.addClass(o.fn.editableform.errorBlockClass).html(t).show()}},submit:function(t){t.stopPropagation(),t.preventDefault();var i,s=this.input.input2value(),t=this.validate(s);if("object"===o.type(t)&&void 0!==t.newValue){if(s=t.newValue,this.input.value2input(s),"string"==typeof t.msg)return this.error(t.msg),void this.showForm()}else if(t)return this.error(t),void this.showForm();this.options.savenochange||this.input.value2str(s)!=this.input.value2str(this.value)?(i=this.input.value2submit(s),this.isSaving=!0,o.when(this.save(i)).done(o.proxy(function(t){this.isSaving=!1;var e="function"==typeof this.options.success?this.options.success.call(this.options.scope,t,s):null;!1===e?(this.error(!1),this.showForm(!1)):"string"==typeof e?(this.error(e),this.showForm()):(e&&"object"==typeof e&&e.hasOwnProperty("newValue")&&(s=e.newValue),this.error(!1),this.value=s,this.$div.triggerHandler("save",{newValue:s,submitValue:i,response:t}))},this)).fail(o.proxy(function(t){this.isSaving=!1,t="function"==typeof this.options.error?this.options.error.call(this.options.scope,t,s):"string"==typeof t?t:t.responseText||t.statusText||"Unknown error!",this.error(t),this.showForm()},this))):this.$div.triggerHandler("nochange")},save:function(t){this.options.pk=o.fn.editableutils.tryParseJson(this.options.pk,!0);var e="function"==typeof this.options.pk?this.options.pk.call(this.options.scope):this.options.pk;if(!!("function"==typeof this.options.url||this.options.url&&("always"===this.options.send||"auto"===this.options.send&&null!=e)))return this.showLoading(),t={name:this.options.name||"",value:t,pk:e},"function"==typeof this.options.params?t=this.options.params.call(this.options.scope,t):(this.options.params=o.fn.editableutils.tryParseJson(this.options.params,!0),o.extend(t,this.options.params)),"function"==typeof this.options.url?this.options.url.call(this.options.scope,t):o.ajax(o.extend({url:this.options.url,data:t,type:"POST"},this.options.ajaxOptions))},validate:function(t){if(void 0===t&&(t=this.value),"function"==typeof this.options.validate)return this.options.validate.call(this.options.scope,t)},option:function(t,e){t in this.options&&(this.options[t]=e),"value"===t&&this.setValue(e)},setValue:function(t,e){this.value=e?this.input.str2value(t):t,this.$form&&this.$form.is(":visible")&&this.input.value2input(this.value)}},o.fn.editableform=function(i){var s=arguments;return this.each(function(){var t=o(this),e=t.data("editableform");e||t.data("editableform",e=new n(this,"object"==typeof i&&i)),"string"==typeof i&&e[i].apply(e,Array.prototype.slice.call(s,1))})},o.fn.editableform.Constructor=n,o.fn.editableform.defaults={type:"text",url:null,params:null,name:null,pk:null,value:null,defaultValue:null,send:"auto",validate:null,success:null,error:null,ajaxOptions:null,showbuttons:!0,scope:null,savenochange:!1},o.fn.editableform.template='<form class="form-inline editableform"><div class="control-group"><div><div class="editable-input"></div><div class="editable-buttons"></div></div><div class="editable-error-block"></div></div></form>',o.fn.editableform.loading='<div class="editableform-loading"></div>',o.fn.editableform.buttons='<button type="submit" class="editable-submit">ok</button><button type="button" class="editable-cancel">cancel</button>',o.fn.editableform.errorGroupClass=null,o.fn.editableform.errorBlockClass="editable-error",o.fn.editableform.engine="jquery"})(window.jQuery),(l=>{l.fn.editableutils={inherit:function(t,e){function i(){}i.prototype=e.prototype,t.prototype=new i,(t.prototype.constructor=t).superclass=e.prototype},setCursorPosition:function(t,e){t.setSelectionRange?t.setSelectionRange(e,e):t.createTextRange&&((t=t.createTextRange()).collapse(!0),t.moveEnd("character",e),t.moveStart("character",e),t.select())},tryParseJson:function(t,e){if("string"==typeof t&&t.length&&t.match(/^[\{\[].*[\}\]]$/))if(e)try{t=new Function("return "+t)()}catch(t){}finally{return t}else t=new Function("return "+t)();return t},sliceObj:function(t,e,i){var s,n,o={};if(Array.isArray(e)&&e.length)for(var a=0;a<e.length;a++)t.hasOwnProperty(s=e[a])&&(o[s]=t[s]),!0!==i&&(n=s.toLowerCase(),t.hasOwnProperty(n))&&(o[s]=t[n]);return o},getConfigData:function(t){var i={};return l.each(t.data(),function(t,e){"object"==typeof e&&(!e||"object"!=typeof e||e.constructor!==Object&&e.constructor!==Array)||(i[t]=e)}),i},objectKeys:function(t){if(Object.keys)return Object.keys(t);if(t!==Object(t))throw new TypeError("Object.keys called on a non-object");var e,i=[];for(e in t)Object.prototype.hasOwnProperty.call(t,e)&&i.push(e);return i},escape:function(t){return l("<div>").text(t).html()},itemsByValue:function(s,t,n){var e,o,a,r;return t&&null!==s?("function"!=typeof n&&(e=n||"value",n=function(t){return t[e]}),o=Array.isArray(s),a=[],r=this,l.each(t,function(t,e){var i;e.children?a=a.concat(r.itemsByValue(s,e.children,n)):o?l.grep(s,function(t){return t==(e&&"object"==typeof e?n(e):e)}).length&&a.push(e):(i=e&&"object"==typeof e?n(e):e,s==i&&a.push(e))}),a):[]},createInput:function(t){var e,i=t.type;return"date"===i&&("inline"===t.mode?l.fn.editabletypes.datefield?i="datefield":l.fn.editabletypes.dateuifield&&(i="dateuifield"):l.fn.editabletypes.date?i="date":l.fn.editabletypes.dateui&&(i="dateui"),"date"!==i||l.fn.editabletypes.date||(i="combodate")),"wysihtml5"!==(i="datetime"===i&&"inline"===t.mode?"datetimefield":i)||l.fn.editabletypes[i]||(i="textarea"),"function"==typeof l.fn.editabletypes[i]?new(e=l.fn.editabletypes[i])(this.sliceObj(t,this.objectKeys(e.defaults))):(l.error("Unknown type: "+i),!1)},supportsTransitions:function(){var t=(document.body||document.documentElement).style,e=["Moz","Webkit","Khtml","O","ms"];if("string"==typeof t[i="transition"])return!0;for(var i=i.charAt(0).toUpperCase()+i.substr(1),s=0;s<e.length;s++)if("string"==typeof t[e[s]+i])return!0;return!1}}})(window.jQuery),(r=>{function l(t,e){this.init(t,e)}function h(t,e){this.init(t,e)}l.prototype={containerName:null,containerDataName:null,innerCss:null,containerClass:"editable-container editable-popup",defaults:{},init:function(t,e){this.$element=r(t),this.options=r.extend({},r.fn.editableContainer.defaults,e),this.splitOptions(),this.formOptions.scope=this.$element[0],this.initContainer(),this.delayedHide=!1,this.$element.on("destroyed",r.proxy(function(){this.destroy()},this)),r(document).data("editable-handlers-attached")||(r(document).on("keyup.editable",function(t){27===t.which&&r(".editable-open").editableContainer("hide")}),r(document).on("click.editable",function(t){var e,i=r(t.target),s=[".editable-container",".ui-datepicker-header",".datepicker",".modal-backdrop",".bootstrap-wysihtml5-insert-image-modal",".bootstrap-wysihtml5-insert-link-modal"];if(r.contains(document.documentElement,t.target)&&!i.is(document)){for(e=0;e<s.length;e++)if(i.is(s[e])||i.parents(s[e]).length)return;l.prototype.closeOthers(t.target)}}),r(document).data("editable-handlers-attached",!0))},splitOptions:function(){if(this.containerOptions={},this.formOptions={},!r.fn[this.containerName])throw new Error(this.containerName+" not found. Have you included corresponding js file?");for(var t in this.options)t in this.defaults?this.containerOptions[t]=this.options[t]:this.formOptions[t]=this.options[t]},tip:function(){return this.container()?this.container().$tip:null},container:function(){var t;return t=this.containerDataName&&(t=this.$element.data(this.containerDataName))?t:this.$element.data(this.containerName)},call:function(){this.$element[this.containerName].apply(this.$element,arguments)},initContainer:function(){this.call(this.containerOptions)},renderForm:function(){this.$form.editableform(this.formOptions).on({save:r.proxy(this.save,this),nochange:r.proxy(function(){this.hide("nochange")},this),cancel:r.proxy(function(){this.hide("cancel")},this),show:r.proxy(function(){this.delayedHide?(this.hide(this.delayedHide.reason),this.delayedHide=!1):this.setPosition()},this),rendering:r.proxy(this.setPosition,this),resize:r.proxy(this.setPosition,this),rendered:r.proxy(function(){this.$element.triggerHandler("shown",r(this.options.scope).data("editable"))},this)}).editableform("render")},show:function(t){this.$element.addClass("editable-open"),!1!==t&&this.closeOthers(this.$element[0]),this.innerShow(),this.tip().addClass(this.containerClass),this.$form,this.$form=r("<div>"),(this.tip().is(this.innerCss)?this.tip():this.tip().find(this.innerCss)).append(this.$form),this.renderForm()},hide:function(t){this.tip()&&this.tip().is(":visible")&&this.$element.hasClass("editable-open")&&(this.$form.data("editableform").isSaving?this.delayedHide={reason:t}:(this.delayedHide=!1,this.$element.removeClass("editable-open"),this.innerHide(),this.$element.triggerHandler("hidden",t||"manual")))},innerShow:function(){},innerHide:function(){},toggle:function(t){this.container()&&this.tip()&&this.tip().is(":visible")?this.hide():this.show(t)},setPosition:function(){},save:function(t,e){this.$element.triggerHandler("save",e),this.hide("save")},option:function(t,e){this.options[t]=e,t in this.containerOptions?(this.containerOptions[t]=e,this.setContainerOption(t,e)):(this.formOptions[t]=e,this.$form&&this.$form.editableform("option",t,e))},setContainerOption:function(t,e){this.call("option",t,e)},destroy:function(){this.hide(),this.innerDestroy(),this.$element.off("destroyed"),this.$element.removeData("editableContainer")},innerDestroy:function(){},closeOthers:function(s){r(".editable-open").each(function(t,e){var i;e===s||r(e).find(s).length||(i=(e=r(e)).data("editableContainer"))&&("cancel"===i.options.onblur?e.data("editableContainer").hide("onblur"):"submit"===i.options.onblur&&e.data("editableContainer").tip().find("form").submit())})},activate:function(){this.tip&&this.tip().is(":visible")&&this.$form&&this.$form.data("editableform").input.activate()}},r.fn.editableContainer=function(o){var a=arguments;return this.each(function(){var t=r(this),e="editableContainer",i=t.data(e),s="object"==typeof o&&o,n="inline"===s.mode?h:l;i||t.data(e,i=new n(this,s)),"string"==typeof o&&i[o].apply(i,Array.prototype.slice.call(a,1))})},r.fn.editableContainer.Popup=l,r.fn.editableContainer.Inline=h,r.fn.editableContainer.defaults={value:null,placement:"top",autohide:!0,onblur:"cancel",anim:!1,mode:"popup"},jQuery.event.special.destroyed={remove:function(t){t.handler&&t.handler()}}})(window.jQuery),(t=>{t.extend(t.fn.editableContainer.Inline.prototype,t.fn.editableContainer.Popup.prototype,{containerName:"editableform",innerCss:".editable-inline",containerClass:"editable-container editable-inline",initContainer:function(){this.$tip=t("<span></span>"),this.options.anim||(this.options.anim=0)},splitOptions:function(){this.containerOptions={},this.formOptions=this.options},tip:function(){return this.$tip},innerShow:function(){this.$element.hide(),this.tip().insertAfter(this.$element).show()},innerHide:function(){this.$tip.hide(this.options.anim,t.proxy(function(){this.$element.show(),this.innerDestroy()},this))},innerDestroy:function(){this.tip()&&this.tip().empty().remove()}})})(window.jQuery),(u=>{function p(t,e){this.$element=u(t),this.options=u.extend({},u.fn.editable.defaults,e,u.fn.editableutils.getConfigData(this.$element)),this.options.selector?this.initLive():this.init(),this.options.highlight&&!u.fn.editableutils.supportsTransitions()&&(this.options.highlight=!1)}p.prototype={constructor:p,init:function(){var t,e=!1;if(this.options.name=this.options.name||this.$element.attr("id"),this.options.scope=this.$element[0],this.input=u.fn.editableutils.createInput(this.options),this.input){switch(null==this.options.value?(this.value=this.input.html2value(u.trim(this.$element.html())),e=!0):(this.options.value=u.fn.editableutils.tryParseJson(this.options.value,!0),"string"==typeof this.options.value?this.value=this.input.str2value(this.options.value):this.value=this.options.value),this.$element.addClass("editable"),"textarea"===this.input.type&&this.$element.addClass("editable-pre-wrapped"),"manual"!==this.options.toggle?(this.$element.addClass("editable-click"),this.$element.on(this.options.toggle+".editable",u.proxy(function(t){this.options.disabled||t.preventDefault(),"mouseenter"===this.options.toggle?this.show():(t="click"!==this.options.toggle,this.toggle(t))},this))):this.$element.attr("tabindex",-1),"function"==typeof this.options.display&&(this.options.autotext="always"),this.options.autotext){case"always":t=!0;break;case"auto":t=!u.trim(this.$element.text()).length&&null!=this.value&&!e;break;default:t=!1}u.when(!t||this.render()).then(u.proxy(function(){this.options.disabled?this.disable():this.enable(),this.$element.triggerHandler("init",this)},this))}},initLive:function(){var t=this.options.selector;this.options.selector=!1,this.options.autotext="never",this.$element.on(this.options.toggle+".editable",t,u.proxy(function(t){var e=u(t.target);e.data("editable")||(e.hasClass(this.options.emptyclass)&&e.empty(),e.editable(this.options).trigger(t))},this))},render:function(t){if(!1!==this.options.display)return this.input.value2htmlFinal?this.input.value2html(this.value,this.$element[0],this.options.display,t):"function"==typeof this.options.display?this.options.display.call(this.$element[0],this.value,t):this.input.value2html(this.value,this.$element[0])},enable:function(){this.options.disabled=!1,this.$element.removeClass("editable-disabled"),this.handleEmpty(this.isEmpty),"manual"!==this.options.toggle&&"-1"===this.$element.attr("tabindex")&&this.$element.removeAttr("tabindex")},disable:function(){this.options.disabled=!0,this.hide(),this.$element.addClass("editable-disabled"),this.handleEmpty(this.isEmpty),this.$element.attr("tabindex",-1)},toggleDisabled:function(){this.options.disabled?this.enable():this.disable()},option:function(t,e){if(t&&"object"==typeof t)u.each(t,u.proxy(function(t,e){this.option(u.trim(t),e)},this));else{if(this.options[t]=e,"disabled"===t)return e?this.disable():this.enable();"value"===t&&this.setValue(e),this.container&&this.container.option(t,e),this.input.option&&this.input.option(t,e)}},handleEmpty:function(t){!1!==this.options.display&&(void 0!==t?this.isEmpty=t:"function"==typeof this.input.isEmpty?this.isEmpty=this.input.isEmpty(this.$element):this.isEmpty=""===u.trim(this.$element.html()),this.options.disabled?this.isEmpty&&(this.$element.empty(),this.options.emptyclass)&&this.$element.removeClass(this.options.emptyclass):this.isEmpty?(this.$element.html(this.options.emptytext),this.options.emptyclass&&this.$element.addClass(this.options.emptyclass)):this.options.emptyclass&&this.$element.removeClass(this.options.emptyclass))},show:function(t){if(!this.options.disabled){if(this.container){if(this.container.tip().is(":visible"))return}else{var e=u.extend({},this.options,{value:this.value,input:this.input});this.$element.editableContainer(e),this.$element.on("save.internal",u.proxy(this.save,this)),this.container=this.$element.data("editableContainer")}this.container.show(t)}},hide:function(){this.container&&this.container.hide()},toggle:function(t){this.container&&this.container.tip().is(":visible")?this.hide():this.show(t)},save:function(t,e){var i,s;this.options.unsavedclass&&("function"==typeof this.options.url||!1===this.options.display||void 0!==e.response||this.options.savenochange&&this.input.value2str(this.value)!==this.input.value2str(e.newValue)?this.$element.removeClass(this.options.unsavedclass):this.$element.addClass(this.options.unsavedclass)),this.options.highlight&&(i=this.$element,s=i.css("background-color"),i.css("background-color",this.options.highlight),setTimeout(function(){"transparent"===s&&(s=""),i.css("background-color",s),i.addClass("editable-bg-transition"),setTimeout(function(){i.removeClass("editable-bg-transition")},1700)},10)),this.setValue(e.newValue,!1,e.response)},validate:function(){if("function"==typeof this.options.validate)return this.options.validate.call(this,this.value)},setValue:function(t,e,i){this.value=e?this.input.str2value(t):t,this.container&&this.container.option("value",this.value),u.when(this.render(i)).then(u.proxy(function(){this.handleEmpty()},this))},activate:function(){this.container&&this.container.activate()},destroy:function(){this.disable(),this.container&&this.container.destroy(),this.input.destroy(),"manual"!==this.options.toggle&&(this.$element.removeClass("editable-click"),this.$element.off(this.options.toggle+".editable")),this.$element.off("save.internal"),this.$element.removeClass("editable editable-open editable-disabled"),this.$element.removeData("editable")}},u.fn.editable=function(s){var i={},n=arguments,o="editable";switch(s){case"validate":return this.each(function(){var t,e=u(this).data(o);e&&(t=e.validate())&&(i[e.options.name]=t)}),i;case"getValue":return 2===arguments.length&&!0===arguments[1]?i=this.eq(0).data(o).value:this.each(function(){var t=u(this).data(o);t&&null!=t.value&&(i[t.options.name]=t.input.value2submit(t.value))}),i;case"submit":var t,e,a,r=arguments[1]||{},l=this,h=this.editable("validate");return u.isEmptyObject(h)?(a={},1===l.length?(e={name:(t=l.data("editable")).options.name||"",value:t.input.value2submit(t.value),pk:"function"==typeof t.options.pk?t.options.pk.call(t.options.scope):t.options.pk},"function"==typeof t.options.params?e=t.options.params.call(t.options.scope,e):(t.options.params=u.fn.editableutils.tryParseJson(t.options.params,!0),u.extend(e,t.options.params)),a={url:t.options.url,data:e,type:"POST"},r.success=r.success||t.options.success,r.error=r.error||t.options.error):(e=this.editable("getValue"),a={url:r.url,data:e,type:"POST"}),a.success="function"==typeof r.success?function(t){r.success.call(l,t,r)}:u.noop,a.error="function"==typeof r.error?function(){r.error.apply(l,arguments)}:u.noop,r.ajaxOptions&&u.extend(a,r.ajaxOptions),r.data&&u.extend(a.data,r.data),u.ajax(a)):"function"==typeof r.error&&r.error.call(l,h),this}return this.each(function(){var t=u(this),e=t.data(o),i="object"==typeof s&&s;i&&i.selector?e=new p(this,i):(e||t.data(o,e=new p(this,i)),"string"==typeof s&&e[s].apply(e,Array.prototype.slice.call(n,1)))})},u.fn.editable.defaults={type:"text",disabled:!1,toggle:"click",emptytext:"Empty",autotext:"auto",value:null,display:null,emptyclass:"editable-empty",unsavedclass:"editable-unsaved",selector:null,highlight:"#FFFF80"}})(window.jQuery),(s=>{function t(){}s.fn.editabletypes={},t.prototype={init:function(t,e,i){this.type=t,this.options=s.extend({},i,e)},prerender:function(){this.$tpl=s(this.options.tpl),this.$input=this.$tpl,this.$clear=null,this.error=null},render:function(){},value2html:function(t,e){s(e)[this.options.escape?"text":"html"](s.trim(t))},html2value:function(t){return s("<div>").html(t).text()},value2str:function(t){return t},str2value:function(t){return t},value2submit:function(t){return t},value2input:function(t){this.$input.val(t)},input2value:function(){return this.$input.val()},activate:function(){this.$input.is(":visible")&&this.$input.focus()},clear:function(){this.$input.val(null)},escape:function(t){return s("<div>").text(t).html()},autosubmit:function(){},destroy:function(){},setClass:function(){this.options.inputclass&&this.$input.addClass(this.options.inputclass)},setAttr:function(t){null!=this.options[t]&&this.$input.attr(t,this.options[t])},option:function(t,e){this.options[t]=e}},t.defaults={tpl:"",inputclass:null,escape:!0,scope:null,showbuttons:!0},s.extend(s.fn.editabletypes,{abstractinput:t})})(window.jQuery),(r=>{function t(t){}r.fn.editableutils.inherit(t,r.fn.editabletypes.abstractinput),r.extend(t.prototype,{render:function(){var t=r.Deferred();return this.error=null,this.onSourceReady(function(){this.renderList(),t.resolve()},function(){this.error=this.options.sourceError,t.resolve()}),t.promise()},html2value:function(t){return null},value2html:function(t,e,i,s){function n(){"function"==typeof i?i.call(e,t,this.sourceData,s):this.value2htmlFinal(t,e),o.resolve()}var o=r.Deferred();return null===t?n.call(this):this.onSourceReady(n,function(){o.resolve()}),o.promise()},onSourceReady:function(e,i){var t;if("function"==typeof this.options.source?(t=this.options.source.call(this.options.scope),this.sourceData=null):t=this.options.source,this.options.sourceCache&&Array.isArray(this.sourceData))e.call(this);else{try{t=r.fn.editableutils.tryParseJson(t,!1)}catch(t){return void i.call(this)}if("string"==typeof t){if(this.options.sourceCache){var s,n=t;if(r(document).data(n)||r(document).data(n,{}),!1===(s=r(document).data(n)).loading&&s.sourceData)return this.sourceData=s.sourceData,this.doPrepend(),void e.call(this);if(!0===s.loading)return s.callbacks.push(r.proxy(function(){this.sourceData=s.sourceData,this.doPrepend(),e.call(this)},this)),void s.err_callbacks.push(r.proxy(i,this));s.loading=!0,s.callbacks=[],s.err_callbacks=[]}n=r.extend({url:t,type:"get",cache:!1,dataType:"json",success:r.proxy(function(t){s&&(s.loading=!1),this.sourceData=this.makeArray(t),Array.isArray(this.sourceData)?(s&&(s.sourceData=this.sourceData,r.each(s.callbacks,function(){this.call()})),this.doPrepend(),e.call(this)):(i.call(this),s&&r.each(s.err_callbacks,function(){this.call()}))},this),error:r.proxy(function(){i.call(this),s&&(s.loading=!1,r.each(s.err_callbacks,function(){this.call()}))},this)},this.options.sourceOptions);r.ajax(n)}else this.sourceData=this.makeArray(t),(Array.isArray(this.sourceData)?(this.doPrepend(),e):i).call(this)}},doPrepend:function(){null!=this.options.prepend&&(Array.isArray(this.prependData)||("function"==typeof this.options.prepend&&(this.options.prepend=this.options.prepend.call(this.options.scope)),this.options.prepend=r.fn.editableutils.tryParseJson(this.options.prepend,!0),"string"==typeof this.options.prepend&&(this.options.prepend={"":this.options.prepend}),this.prependData=this.makeArray(this.options.prepend)),Array.isArray(this.prependData))&&Array.isArray(this.sourceData)&&(this.sourceData=this.prependData.concat(this.sourceData))},renderList:function(){},value2htmlFinal:function(t,e){},makeArray:function(t){var i,s,e,n=[];if(!t||"string"==typeof t)return null;if(Array.isArray(t))for(var o=function(t,e){if(s={value:t,text:e},2<=i++)return!1},a=0;a<t.length;a++)"object"==typeof(e=t[a])?(i=0,r.each(e,o),1===i?n.push(s):1<i&&(e.children&&(e.children=this.makeArray(e.children)),n.push(e))):n.push({value:e,text:e});else r.each(t,function(t,e){n.push({value:t,text:e})});return n},option:function(t,e){this.options[t]=e,"source"===t&&(this.sourceData=null),"prepend"===t&&(this.prependData=null)}}),t.defaults=r.extend({},r.fn.editabletypes.abstractinput.defaults,{source:null,prepend:!1,sourceError:"Error when loading list",sourceCache:!0,sourceOptions:null}),r.fn.editabletypes.list=t})(window.jQuery),(i=>{function e(t){this.init("text",t,e.defaults)}i.fn.editableutils.inherit(e,i.fn.editabletypes.abstractinput),i.extend(e.prototype,{render:function(){this.renderClear(),this.setClass(),this.setAttr("placeholder")},activate:function(){this.$input.is(":visible")&&(this.$input.focus(),i.fn.editableutils.setCursorPosition(this.$input.get(0),this.$input.val().length),this.toggleClear)&&this.toggleClear()},renderClear:function(){this.options.clear&&(this.$clear=i('<span class="editable-clear-x"></span>'),this.$input.after(this.$clear).css("padding-right",24).keyup(i.proxy(function(t){var e;~i.inArray(t.keyCode,[40,38,9,13,27])||(clearTimeout(this.t),(e=this).t=setTimeout(function(){e.toggleClear(t)},100))},this)).parent().css("position","relative"),this.$clear.click(i.proxy(this.clear,this)))},postrender:function(){},toggleClear:function(t){var e,i;this.$clear&&(e=this.$input.val().length,i=this.$clear.is(":visible"),e&&!i&&this.$clear.show(),!e)&&i&&this.$clear.hide()},clear:function(){this.$clear.hide(),this.$input.val("").focus()}}),e.defaults=i.extend({},i.fn.editabletypes.abstractinput.defaults,{tpl:'<input type="text">',placeholder:null,clear:!0}),i.fn.editabletypes.text=e})(window.jQuery),(e=>{function i(t){this.init("textarea",t,i.defaults)}e.fn.editableutils.inherit(i,e.fn.editabletypes.abstractinput),e.extend(i.prototype,{render:function(){this.setClass(),this.setAttr("placeholder"),this.setAttr("rows"),this.$input.keydown(function(t){t.ctrlKey&&13===t.which&&e(this).closest("form").submit()})},activate:function(){e.fn.editabletypes.text.prototype.activate.call(this)}}),i.defaults=e.extend({},e.fn.editabletypes.abstractinput.defaults,{tpl:"<textarea></textarea>",inputclass:"input-large",placeholder:null,rows:7}),e.fn.editabletypes.textarea=i})(window.jQuery),(o=>{function e(t){this.init("select",t,e.defaults)}o.fn.editableutils.inherit(e,o.fn.editabletypes.list),o.extend(e.prototype,{renderList:function(){this.$input.empty();var n=function(t,e){var i;if(Array.isArray(e))for(var s=0;s<e.length;s++)i={},e[s].children?(i.label=e[s].text,t.append(n(o("<optgroup>",i),e[s].children))):(i.value=e[s].value,e[s].disabled&&(i.disabled=!0),t.append(o("<option>",i).text(e[s].text)));return t};n(this.$input,this.sourceData),this.setClass(),this.$input.on("keydown.editable",function(t){13===t.which&&o(this).closest("form").submit()})},value2htmlFinal:function(t,e){var i="",t=o.fn.editableutils.itemsByValue(t,this.sourceData);t.length&&(i=t[0].text),o.fn.editabletypes.abstractinput.prototype.value2html.call(this,i,e)},autosubmit:function(){this.$input.off("keydown.editable").on("change.editable",function(){o(this).closest("form").submit()})}}),e.defaults=o.extend({},o.fn.editabletypes.list.defaults,{tpl:"<select></select>"}),o.fn.editabletypes.select=e})(window.jQuery),(n=>{function e(t){this.init("checklist",t,e.defaults)}n.fn.editableutils.inherit(e,n.fn.editabletypes.list),n.extend(e.prototype,{renderList:function(){var t;if(this.$tpl.empty(),Array.isArray(this.sourceData)){for(var e=0;e<this.sourceData.length;e++)t=n("<label>").append(n("<input>",{type:"checkbox",value:this.sourceData[e].value})).append(n("<span>").text(" "+this.sourceData[e].text)),n("<div>").append(t).appendTo(this.$tpl);this.$input=this.$tpl.find('input[type="checkbox"]'),this.setClass()}},value2str:function(t){return Array.isArray(t)?t.sort().join(this.options.separator.trim()):""},str2value:function(t){var e;return"string"==typeof t&&t.length?(e=new RegExp("\\s*"+n.trim(this.options.separator)+"\\s*"),t.split(e)):Array.isArray(t)?t:[t]},value2input:function(s){this.$input.prop("checked",!1),Array.isArray(s)&&s.length&&this.$input.each(function(t,e){var i=n(e);n.each(s,function(t,e){i.val()==e&&i.prop("checked",!0)})})},input2value:function(){var i=[];return this.$input.filter(":checked").each(function(t,e){i.push(n(e).val())}),i},value2htmlFinal:function(t,e){var i=[],t=n.fn.editableutils.itemsByValue(t,this.sourceData),s=this.options.escape;t.length?(n.each(t,function(t,e){e=s?n.fn.editableutils.escape(e.text):e.text;i.push(e)}),n(e).html(i.join("<br>"))):n(e).empty()},activate:function(){this.$input.first().focus()},autosubmit:function(){this.$input.on("keydown",function(t){13===t.which&&n(this).closest("form").submit()})}}),e.defaults=n.extend({},n.fn.editabletypes.list.defaults,{tpl:'<div class="editable-checklist"></div>',inputclass:null,separator:","}),n.fn.editabletypes.checklist=e})(window.jQuery),(i=>{function e(t){this.init("password",t,e.defaults)}i.fn.editableutils.inherit(e,i.fn.editabletypes.text),i.extend(e.prototype,{value2html:function(t,e){t?i(e).text("[hidden]"):i(e).empty()},html2value:function(t){return null}}),e.defaults=i.extend({},i.fn.editabletypes.text.defaults,{tpl:'<input type="password">'}),i.fn.editabletypes.password=e})(window.jQuery),(t=>{function e(t){this.init("email",t,e.defaults)}t.fn.editableutils.inherit(e,t.fn.editabletypes.text),e.defaults=t.extend({},t.fn.editabletypes.text.defaults,{tpl:'<input type="email">'}),t.fn.editabletypes.email=e})(window.jQuery),(t=>{function e(t){this.init("url",t,e.defaults)}t.fn.editableutils.inherit(e,t.fn.editabletypes.text),e.defaults=t.extend({},t.fn.editabletypes.text.defaults,{tpl:'<input type="url">'}),t.fn.editabletypes.url=e})(window.jQuery),(t=>{function e(t){this.init("tel",t,e.defaults)}t.fn.editableutils.inherit(e,t.fn.editabletypes.text),e.defaults=t.extend({},t.fn.editabletypes.text.defaults,{tpl:'<input type="tel">'}),t.fn.editabletypes.tel=e})(window.jQuery),(t=>{function e(t){this.init("number",t,e.defaults)}t.fn.editableutils.inherit(e,t.fn.editabletypes.text),t.extend(e.prototype,{render:function(){e.superclass.render.call(this),this.setAttr("min"),this.setAttr("max"),this.setAttr("step")},postrender:function(){this.$clear&&this.$clear.css({right:24})}}),e.defaults=t.extend({},t.fn.editabletypes.text.defaults,{tpl:'<input type="number">',inputclass:"input-mini",min:null,max:null,step:null}),t.fn.editabletypes.number=e})(window.jQuery),(t=>{function e(t){this.init("range",t,e.defaults)}t.fn.editableutils.inherit(e,t.fn.editabletypes.number),t.extend(e.prototype,{render:function(){this.$input=this.$tpl.filter("input"),this.setClass(),this.setAttr("min"),this.setAttr("max"),this.setAttr("step"),this.$input.on("input",function(){t(this).siblings("output").text(t(this).val())})},activate:function(){this.$input.focus()}}),e.defaults=t.extend({},t.fn.editabletypes.number.defaults,{tpl:'<input type="range"><output style="width: 30px; display: inline-block"></output>',inputclass:"input-medium"}),t.fn.editabletypes.range=e})(window.jQuery),(t=>{function e(t){this.init("time",t,e.defaults)}t.fn.editableutils.inherit(e,t.fn.editabletypes.abstractinput),t.extend(e.prototype,{render:function(){this.setClass()}}),e.defaults=t.extend({},t.fn.editabletypes.abstractinput.defaults,{tpl:'<input type="time">'}),t.fn.editabletypes.time=e})(window.jQuery),(o=>{function a(t){var e,i;this.init("select2",t,a.defaults),t.select2=t.select2||{},this.sourceData=null,t.placeholder&&(t.select2.placeholder=t.placeholder),!t.select2.tags&&t.source&&(e=t.source,"string"==typeof(e="function"==typeof t.source?t.source.call(t.scope):e)?(t.select2.ajax=t.select2.ajax||{},t.select2.ajax.data||(t.select2.ajax.data=function(t){return{query:t}}),t.select2.ajax.results||(t.select2.ajax.results=function(t){return{results:t}}),t.select2.ajax.url=e):(this.sourceData=this.convertSource(e),t.select2.data=this.sourceData)),this.options.select2=o.extend({},a.defaults.select2,t.select2),this.isMultiple=this.options.select2.tags||this.options.select2.multiple,this.isRemote="ajax"in this.options.select2,this.idFunc=this.options.select2.id,"function"!=typeof this.idFunc&&(i=this.idFunc||"id",this.idFunc=function(t){return t[i]}),this.formatSelection=this.options.select2.formatSelection,"function"!=typeof this.formatSelection&&(this.formatSelection=function(t){return t.text})}o.fn.editableutils.inherit(a,o.fn.editabletypes.abstractinput),o.extend(a.prototype,{render:function(){this.setClass(),this.isRemote&&this.$input.on("select2-loaded",o.proxy(function(t){this.sourceData=t.items.results},this)),this.isMultiple&&this.$input.on("change",function(){o(this).closest("form").parent().triggerHandler("resize")})},value2html:function(t,e){var i,s="",n=this;this.options.select2.tags?i=t:this.sourceData&&(i=o.fn.editableutils.itemsByValue(t,this.sourceData,this.idFunc)),Array.isArray(i)?(s=[],o.each(i,function(t,e){s.push(e&&"object"==typeof e?n.formatSelection(e):e)})):i&&(s=n.formatSelection(i)),s=Array.isArray(s)?s.join(this.options.viewseparator):s,a.superclass.value2html.call(this,s,e)},html2value:function(t){return this.options.select2.tags?this.str2value(t,this.options.viewseparator):null},value2input:function(t){var e,i;Array.isArray(t)&&(t=t.join(this.getSeparator())),this.$input.data("select2")?this.$input.val(t).trigger("change",!0):(this.$input.val(t),this.$input.select2(this.options.select2)),!this.isRemote||this.isMultiple||this.options.select2.initSelection||(e=this.options.select2.id,i=this.options.select2.formatSelection,e)||i||(e=o(this.options.scope)).data("editable").isEmpty||(i={id:t,text:e.text()},this.$input.select2("data",i))},input2value:function(){return this.$input.select2("val")},str2value:function(t,e){if("string"!=typeof t||!this.isMultiple)return t;var i,s,n;if(e=e||this.getSeparator(),null===t||t.length<1)return null;for(s=0,n=(i=t.split(e)).length;s<n;s+=1)i[s]=o.trim(i[s]);return i},autosubmit:function(){this.$input.on("change",function(t,e){e||o(this).closest("form").submit()})},getSeparator:function(){return this.options.select2.separator||o.fn.select2.defaults.separator},convertSource:function(t){if(Array.isArray(t)&&t.length&&void 0!==t[0].value)for(var e=0;e<t.length;e++)void 0!==t[e].value&&(t[e].id=t[e].value,delete t[e].value);return t},destroy:function(){this.$input&&this.$input.data("select2")&&this.$input.select2("destroy")}}),a.defaults=o.extend({},o.fn.editabletypes.abstractinput.defaults,{tpl:'<input type="hidden">',select2:null,placeholder:null,source:null,viewseparator:", "}),o.fn.editabletypes.select2=a})(window.jQuery),(a=>{function n(t,e){this.$element=a(t),this.$element.is("input")?(this.options=a.extend({},a.fn.combodate.defaults,e,this.$element.data()),this.init()):a.error("Combodate should be applied to INPUT element")}n.prototype={constructor:n,init:function(){this.map={day:["D","date"],month:["M","month"],year:["Y","year"],hour:["[Hh]","hours"],minute:["m","minutes"],second:["s","seconds"],ampm:["[Aa]",""]},this.$widget=a('<span class="combodate"></span>').html(this.getTemplate()),this.initCombos(),this.$widget.on("change","select",a.proxy(function(t){this.$element.val(this.getValue()).change(),this.options.smartDays&&(a(t.target).is(".month")||a(t.target).is(".year"))&&this.fillCombo("day")},this)),this.$widget.find("select").css("width","auto"),this.$element.hide().after(this.$widget),this.setValue(this.$element.val()||this.options.value)},getTemplate:function(){var s=this.options.template;return a.each(this.map,function(t,e){e=e[0];var i=new RegExp(e+"+"),e=1<e.length?e.substring(1,2):e;s=s.replace(i,"{"+e+"}")}),s=s.replace(/ /g,"&nbsp;"),a.each(this.map,function(t,e){e=1<(e=e[0]).length?e.substring(1,2):e;s=s.replace("{"+e+"}",'<select class="'+t+'"></select>')}),s},initCombos:function(){for(var t in this.map){var e=this.$widget.find("."+t);this["$"+t]=e.length?e:null,this.fillCombo(t)}},fillCombo:function(t){var e=this["$"+t];if(e){var i=this["fill"+t.charAt(0).toUpperCase()+t.slice(1)](),t=e.val();e.empty();for(var s=0;s<i.length;s++)e.append('<option value="'+i[s][0]+'">'+i[s][1]+"</option>");e.val(t)}},fillCommon:function(t){var e,i=[];return"name"===this.options.firstItem?(e=(e="function"==typeof(e=moment.relativeTime||moment.langData()._relativeTime)[t]?e[t](1,!0,t,!1):e[t]).split(" ").reverse()[0],i.push(["",e])):"empty"===this.options.firstItem&&i.push(["",""]),i},fillDay:function(){var t,e,i,s,n=this.fillCommon("d"),o=-1!==this.options.template.indexOf("DD"),a=31;for(this.options.smartDays&&this.$month&&this.$year&&(i=parseInt(this.$month.val(),10),s=parseInt(this.$year.val(),10),isNaN(i)||isNaN(s)||(a=moment([s,i]).daysInMonth())),e=1;e<=a;e++)t=o?this.leadZero(e):e,n.push([e,t]);return n},fillMonth:function(){for(var t,e=this.fillCommon("M"),i=-1!==this.options.template.indexOf("MMMM"),s=-1!==this.options.template.indexOf("MMM"),n=-1!==this.options.template.indexOf("MM"),o=0;o<=11;o++)t=i?moment().date(1).month(o).format("MMMM"):s?moment().date(1).month(o).format("MMM"):n?this.leadZero(o+1):o+1,e.push([o,t]);return e},fillYear:function(){for(var t,e=[],i=-1!==this.options.template.indexOf("YYYY"),s=this.options.maxYear;s>=this.options.minYear;s--)t=i?s:(s+"").substring(2),e[this.options.yearDescending?"push":"unshift"]([s,t]);return e=this.fillCommon("y").concat(e)},fillHour:function(){for(var t,e=this.fillCommon("h"),i=-1!==this.options.template.indexOf("h"),s=(this.options.template.indexOf("H"),-1!==this.options.template.toLowerCase().indexOf("hh")),n=i?12:23,o=i?1:0;o<=n;o++)t=s?this.leadZero(o):o,e.push([o,t]);return e},fillMinute:function(){for(var t,e=this.fillCommon("m"),i=-1!==this.options.template.indexOf("mm"),s=0;s<=59;s+=this.options.minuteStep)t=i?this.leadZero(s):s,e.push([s,t]);return e},fillSecond:function(){for(var t,e=this.fillCommon("s"),i=-1!==this.options.template.indexOf("ss"),s=0;s<=59;s+=this.options.secondStep)t=i?this.leadZero(s):s,e.push([s,t]);return e},fillAmpm:function(){var t=-1!==this.options.template.indexOf("a");this.options.template.indexOf("A");return[["am",t?"am":"AM"],["pm",t?"pm":"PM"]]},getValue:function(t){var e,s={},n=this,o=!1;return a.each(this.map,function(t,e){var i;if("ampm"!==t)return i="day"===t?1:0,s[t]=n["$"+t]?parseInt(n["$"+t].val(),10):i,isNaN(s[t])?!(o=!0):void 0}),o?"":(this.$ampm&&(s.hour=12===s.hour?"am"===this.$ampm.val()?0:12:"am"===this.$ampm.val()?s.hour:s.hour+12),e=moment([s.year,s.month,s.day,s.hour,s.minute,s.second]),this.highlight(e),null===(t=void 0===t?this.options.format:t)?e.isValid()?e:null:e.isValid()?e.format(t):"")},setValue:function(t){var i,s,n;function o(t,s){var n={};return t.children("option").each(function(t,e){var i,e=a(e).attr("value");""!==e&&(i=Math.abs(e-s),void 0===n.distance||i<n.distance)&&(n={value:e,distance:i})}),n.value}t&&(i="string"==typeof t?moment(t,this.options.format):moment(t),s=this,n={},i.isValid())&&(a.each(this.map,function(t,e){"ampm"!==t&&(n[t]=i[e[1]]())}),this.$ampm&&(12<=n.hour?(n.ampm="pm",12<n.hour&&(n.hour-=12)):(n.ampm="am",0===n.hour&&(n.hour=12))),a.each(n,function(t,e){s["$"+t]&&("minute"===t&&1<s.options.minuteStep&&s.options.roundTime&&(e=o(s["$"+t],e)),"second"===t&&1<s.options.secondStep&&s.options.roundTime&&(e=o(s["$"+t],e)),s["$"+t].val(e))}),this.options.smartDays&&this.fillCombo("day"),this.$element.val(i.format(this.options.format)).change())},highlight:function(t){t.isValid()?this.options.errorClass?this.$widget.removeClass(this.options.errorClass):this.$widget.find("select").css("border-color",this.borderColor):this.options.errorClass?this.$widget.addClass(this.options.errorClass):(this.borderColor||(this.borderColor=this.$widget.find("select").css("border-color")),this.$widget.find("select").css("border-color","red"))},leadZero:function(t){return t<=9?"0"+t:t},destroy:function(){this.$widget.remove(),this.$element.removeData("combodate").show()}},a.fn.combodate=function(i){var t,s=Array.apply(null,arguments);return s.shift(),"getValue"===i&&this.length&&(t=this.eq(0).data("combodate"))?t.getValue.apply(t,s):this.each(function(){var t=a(this),e=t.data("combodate");e||t.data("combodate",e=new n(this,"object"==typeof i&&i)),"string"==typeof i&&"function"==typeof e[i]&&e[i].apply(e,s)})},a.fn.combodate.defaults={format:"DD-MM-YYYY HH:mm",template:"D / MMM / YYYY   H : mm",value:null,minYear:1970,maxYear:(new Date).getFullYear(),yearDescending:!0,minuteStep:5,secondStep:1,firstItem:"empty",errorClass:null,roundTime:!0,smartDays:!1}})(window.jQuery),(e=>{function i(t){this.init("combodate",t,i.defaults),this.options.viewformat||(this.options.viewformat=this.options.format),t.combodate=e.fn.editableutils.tryParseJson(t.combodate,!0),this.options.combodate=e.extend({},i.defaults.combodate,t.combodate,{format:this.options.format,template:this.options.template})}e.fn.editableutils.inherit(i,e.fn.editabletypes.abstractinput),e.extend(i.prototype,{render:function(){this.$input.combodate(this.options.combodate),"bs3"===e.fn.editableform.engine&&this.$input.siblings().find("select").addClass("form-control"),this.options.inputclass&&this.$input.siblings().find("select").addClass(this.options.inputclass)},value2html:function(t,e){t=t?t.format(this.options.viewformat):"";i.superclass.value2html.call(this,t,e)},html2value:function(t){return t?moment(t,this.options.viewformat):null},value2str:function(t){return t?t.format(this.options.format):""},str2value:function(t){return t?moment(t,this.options.format):null},value2submit:function(t){return this.value2str(t)},value2input:function(t){this.$input.combodate("setValue",t)},input2value:function(){return this.$input.combodate("getValue",null)},activate:function(){this.$input.siblings(".combodate").find("select").eq(0).focus()},autosubmit:function(){}}),i.defaults=e.extend({},e.fn.editabletypes.abstractinput.defaults,{tpl:'<input type="text">',inputclass:null,format:"YYYY-MM-DD",viewformat:null,template:"D / MMM / YYYY",combodate:null}),e.fn.editabletypes.combodate=i})(window.jQuery),(l=>{var h,u,p;l.extend(l.fn.editableContainer.Popup.prototype,{containerName:"poshytip",innerCss:"div.tip-inner",defaults:l.fn.poshytip.defaults,initContainer:function(){this.handlePlacement(),l.extend(this.containerOptions,{showOn:"none",content:"",alignTo:"target"}),this.call(this.containerOptions)},show:function(t){this.$element.addClass("editable-open"),!1!==t&&this.closeOthers(this.$element[0]),this.$form=l("<div>"),this.renderForm();t=l("<label>").text(this.options.title||this.$element.data("title")||this.$element.data("originalTitle")),t=l("<div>").append(t).append(this.$form);this.call("update",t),this.call("show"),this.tip().addClass(this.containerClass),this.$form.data("editableform").input.activate()},innerHide:function(){this.call("hide")},innerDestroy:function(){this.call("destroy")},setPosition:function(){this.container().refresh(!1)},handlePlacement:function(){var t,e,i=0,s=0;switch(this.options.placement){case"top":t="center",e="top",s=5;break;case"right":t="right",e="center",i=10;break;case"bottom":t="center",e="bottom",s=5;break;case"left":t="left",e="center",i=10}l.extend(this.containerOptions,{alignX:t,offsetX:i,alignY:e,offsetY:s})}}),l.fn.editableContainer.defaults=l.extend({},l.fn.editableContainer.defaults,{className:"tip-yellowsimple"}),l.Poshytip&&(h=/^url\(["']?([^"'\)]*)["']?\);?$/i,u=/\.png$/i,p=!!window.createPopup&&"undefined"==document.documentElement.currentStyle.minWidth,l.Poshytip.prototype.refresh=function(t){if(!this.disabled){var e;if(t){if(!this.$tip.data("active"))return;e={left:this.$tip.css("left"),top:this.$tip.css("top")}}this.$tip.css({left:0,top:0}).appendTo(document.body),void 0===this.opacity&&(this.opacity=this.$tip.css("opacity"));var i,s,n,o,a=this.$tip.css("background-image").match(h),r=this.$arrow.css("background-image").match(h),a=(a&&(i=u.test(a[1]),p&&i?(this.$tip.css("background-image","none"),this.$inner.css({margin:0,border:0,padding:0}),a=i=!1):this.$tip.prepend('<table class="fallback" border="0" cellpadding="0" cellspacing="0"><tr><td class="tip-top tip-bg-image" colspan="2"><span></span></td><td class="tip-right tip-bg-image" rowspan="2"><span></span></td></tr><tr><td class="tip-left tip-bg-image" rowspan="2"><span></span></td><td></td></tr><tr><td class="tip-bottom tip-bg-image" colspan="2"><span></span></td></tr></table>').css({border:0,padding:0,"background-image":"none","background-color":"transparent"}).find(".tip-bg-image").css("background-image",'url("'+a[1]+'")').end().find("td").eq(3).append(this.$inner),i)&&!l.support.opacity&&(this.opts.fade=!1),r&&!l.support.opacity&&(p&&u.test(r[1])&&(r=!1,this.$arrow.css("background-image","none")),this.opts.fade=!1),this.$tip.find("table.fallback"));p?(this.$tip[0].style.width="",a.width("auto").find("td").eq(3).width("auto"),i=this.$tip.width(),s=parseInt(this.$tip.css("min-width"),10),n=parseInt(this.$tip.css("max-width"),10),!isNaN(s)&&i<s?i=s:!isNaN(n)&&n<i&&(i=n),this.$tip.add(a).width(i).eq(0).find("td").eq(3).width("100%")):a[0]&&a.width("auto").find("td").eq(3).width("auto").end().end().width(document.defaultView&&document.defaultView.getComputedStyle&&parseFloat(document.defaultView.getComputedStyle(this.$tip[0],null).width)||this.$tip.width()).find("td").eq(3).width("100%"),this.tipOuterW=this.$tip.outerWidth(),this.tipOuterH=this.$tip.outerHeight(),this.calcPos(),r&&this.pos.arrow&&(this.$arrow[0].className="tip-arrow tip-arrow-"+this.pos.arrow,this.$arrow.css("visibility","inherit")),t?(this.asyncAnimating=!0,(o=this).$tip.css(e).animate({left:this.pos.l,top:this.pos.t},200,function(){o.asyncAnimating=!1})):this.$tip.css({left:this.pos.l,top:this.pos.t})}})})(window.jQuery),(i=>{function s(t){this.init("dateui",t,s.defaults),this.initPicker(t,s.defaults)}i.fn.editableutils.inherit(s,i.fn.editabletypes.abstractinput),i.extend(s.prototype,{initPicker:function(t,e){this.options.viewformat||(this.options.viewformat=this.options.format),this.options.viewformat=this.options.viewformat.replace("yyyy","yy"),this.options.format=this.options.format.replace("yyyy","yy"),this.options.datepicker=i.extend({},e.datepicker,t.datepicker,{dateFormat:this.options.viewformat})},render:function(){this.$input.datepicker(this.options.datepicker),this.options.clear&&(this.$clear=i('<a href="#"></a>').html(this.options.clear).click(i.proxy(function(t){t.preventDefault(),t.stopPropagation(),this.clear()},this)),this.$tpl.parent().append(i('<div class="editable-clear">').append(this.$clear)))},value2html:function(t,e){t=i.datepicker.formatDate(this.options.viewformat,t);s.superclass.value2html.call(this,t,e)},html2value:function(t){if("string"!=typeof t)return t;var e;try{e=i.datepicker.parseDate(this.options.viewformat,t)}catch(t){}return e},value2str:function(t){return i.datepicker.formatDate(this.options.format,t)},str2value:function(t){if("string"!=typeof t)return t;var e;try{e=i.datepicker.parseDate(this.options.format,t)}catch(t){}return e},value2submit:function(t){return this.value2str(t)},value2input:function(t){this.$input.datepicker("setDate",t)},input2value:function(){return this.$input.datepicker("getDate")},activate:function(){},clear:function(){this.$input.datepicker("setDate",null),this.isAutosubmit&&this.submit()},autosubmit:function(){this.isAutosubmit=!0,this.$input.on("mouseup","table.ui-datepicker-calendar a.ui-state-default",i.proxy(this.submit,this))},submit:function(){var t=this.$input.closest("form");setTimeout(function(){t.submit()},200)}}),s.defaults=i.extend({},i.fn.editabletypes.abstractinput.defaults,{tpl:'<div class="editable-date"></div>',inputclass:null,format:"yyyy-mm-dd",viewformat:null,datepicker:{firstDay:0,changeYear:!0,changeMonth:!0,showOtherMonths:!0},clear:"&times; clear"}),i.fn.editabletypes.dateui=s})(window.jQuery),(e=>{function i(t){this.init("dateuifield",t,i.defaults),this.initPicker(t,i.defaults)}e.fn.editableutils.inherit(i,e.fn.editabletypes.dateui),e.extend(i.prototype,{render:function(){this.$input.datepicker(this.options.datepicker),e.fn.editabletypes.text.prototype.renderClear.call(this)},value2input:function(t){this.$input.val(e.datepicker.formatDate(this.options.viewformat,t))},input2value:function(){return this.html2value(this.$input.val())},activate:function(){e.fn.editabletypes.text.prototype.activate.call(this)},toggleClear:function(){e.fn.editabletypes.text.prototype.toggleClear.call(this)},autosubmit:function(){}}),i.defaults=e.extend({},e.fn.editabletypes.dateui.defaults,{tpl:'<input type="text"/>',inputclass:null,datepicker:{showOn:"button",buttonImage:"http://jqueryui.com/resources/demos/datepicker/images/calendar.gif",buttonImageOnly:!0,firstDay:0,changeYear:!0,changeMonth:!0,showOtherMonths:!0},clear:!1}),e.fn.editabletypes.dateuifield=i})(window.jQuery);
\ No newline at end of file
diff --git a/dist/jqueryui-editable/js/jqueryui-editable.js b/dist/jqueryui-editable/js/jqueryui-editable.js
index 682dc0d..7bc4725 100644
--- a/dist/jqueryui-editable/js/jqueryui-editable.js
+++ b/dist/jqueryui-editable/js/jqueryui-editable.js
@@ -2601,7 +2601,7 @@ List - abstract class for inputs that have source option loaded from js array or
         onSourceReady: function (success, error) {
             //run source if it function
             var source;
-            if ($.isFunction(this.options.source)) {
+            if (typeof(this.options.source) === 'function') {
                 source = this.options.source.call(this.options.scope);
                 this.sourceData = null;
                 //note: if function returns the same source as URL - sourceData will be taken from cahce and no extra request performed
@@ -2718,7 +2718,7 @@ List - abstract class for inputs that have source option loaded from js array or
             
             if(!Array.isArray(this.prependData)) {
                 //run prepend if it is function (once)
-                if ($.isFunction(this.options.prepend)) {
+                if (typeof (this.options.prepend) === 'function') {
                     this.options.prepend = this.options.prepend.call(this.options.scope);
                 }
               
@@ -3695,7 +3695,7 @@ $(function(){
         if(!options.select2.tags && options.source) {
             var source = options.source;
             //if source is function, call it (once!)
-            if ($.isFunction(options.source)) {
+            if (typeof (options.source) === 'function') {
                 source = options.source.call(options.scope);
             }               
 
diff --git a/dist/jqueryui-editable/js/jqueryui-editable.min.js b/dist/jqueryui-editable/js/jqueryui-editable.min.js
index 41458e4..32c0338 100644
--- a/dist/jqueryui-editable/js/jqueryui-editable.min.js
+++ b/dist/jqueryui-editable/js/jqueryui-editable.min.js
@@ -2,4 +2,4 @@
 * A maintained fork of x-editable for Bootstrap 5 support.
 * https://git.24unix.net/tracer/x-editable
 * Copyright (c) 2025 Micha Espey; Licensed MIT */
-(o=>{function s(t,e){this.options=o.extend({},o.fn.editableform.defaults,e),this.$div=o(t),this.options.scope||(this.options.scope=this)}s.prototype={constructor:s,initInput:function(){this.input=this.options.input,this.value=this.input.str2value(this.options.value),this.input.prerender()},initTemplate:function(){this.$form=o(o.fn.editableform.template)},initButtons:function(){var t=this.$form.find(".editable-buttons");t.append(o.fn.editableform.buttons),"bottom"===this.options.showbuttons&&t.addClass("editable-buttons-bottom")},render:function(){this.$loading=o(o.fn.editableform.loading),this.$div.empty().append(this.$loading),this.initTemplate(),this.options.showbuttons?this.initButtons():this.$form.find(".editable-buttons").remove(),this.showLoading(),this.isSaving=!1,this.$div.triggerHandler("rendering"),this.initInput(),this.$form.find("div.editable-input").append(this.input.$tpl),this.$div.append(this.$form),o.when(this.input.render()).then(o.proxy(function(){var t;this.options.showbuttons||this.input.autosubmit(),this.$form.find(".editable-cancel").click(o.proxy(this.cancel,this)),this.input.error?(this.error(this.input.error),this.$form.find(".editable-submit").attr("disabled",!0),this.input.$input.attr("disabled",!0),this.$form.submit(function(t){t.preventDefault()})):(this.error(!1),this.input.$input.removeAttr("disabled"),this.$form.find(".editable-submit").removeAttr("disabled"),t=null==this.value||""===this.value?this.options.defaultValue:this.value,this.input.value2input(t),this.$form.submit(o.proxy(this.submit,this))),this.$div.triggerHandler("rendered"),this.showForm(),this.input.postrender&&this.input.postrender()},this))},cancel:function(){this.$div.triggerHandler("cancel")},showLoading:function(){var t,e;this.$form?(t=this.$form.outerWidth(),e=this.$form.outerHeight(),t&&this.$loading.width(t),e&&this.$loading.height(e),this.$form.hide()):(t=this.$loading.parent().width())&&this.$loading.width(t),this.$loading.show()},showForm:function(t){this.$loading.hide(),this.$form.show(),!1!==t&&this.input.activate(),this.$div.triggerHandler("show")},error:function(t){var e=this.$form.find(".control-group"),i=this.$form.find(".editable-error-block");if(!1===t)e.removeClass(o.fn.editableform.errorGroupClass),i.removeClass(o.fn.editableform.errorBlockClass).empty().hide();else{if(t){for(var n=(""+t).split("\n"),s=0;s<n.length;s++)n[s]=o("<div>").text(n[s]).html();t=n.join("<br>")}e.addClass(o.fn.editableform.errorGroupClass),i.addClass(o.fn.editableform.errorBlockClass).html(t).show()}},submit:function(t){t.stopPropagation(),t.preventDefault();var i,n=this.input.input2value(),t=this.validate(n);if("object"===o.type(t)&&void 0!==t.newValue){if(n=t.newValue,this.input.value2input(n),"string"==typeof t.msg)return this.error(t.msg),void this.showForm()}else if(t)return this.error(t),void this.showForm();this.options.savenochange||this.input.value2str(n)!=this.input.value2str(this.value)?(i=this.input.value2submit(n),this.isSaving=!0,o.when(this.save(i)).done(o.proxy(function(t){this.isSaving=!1;var e="function"==typeof this.options.success?this.options.success.call(this.options.scope,t,n):null;!1===e?(this.error(!1),this.showForm(!1)):"string"==typeof e?(this.error(e),this.showForm()):(e&&"object"==typeof e&&e.hasOwnProperty("newValue")&&(n=e.newValue),this.error(!1),this.value=n,this.$div.triggerHandler("save",{newValue:n,submitValue:i,response:t}))},this)).fail(o.proxy(function(t){this.isSaving=!1,t="function"==typeof this.options.error?this.options.error.call(this.options.scope,t,n):"string"==typeof t?t:t.responseText||t.statusText||"Unknown error!",this.error(t),this.showForm()},this))):this.$div.triggerHandler("nochange")},save:function(t){this.options.pk=o.fn.editableutils.tryParseJson(this.options.pk,!0);var e="function"==typeof this.options.pk?this.options.pk.call(this.options.scope):this.options.pk;if(!!("function"==typeof this.options.url||this.options.url&&("always"===this.options.send||"auto"===this.options.send&&null!=e)))return this.showLoading(),t={name:this.options.name||"",value:t,pk:e},"function"==typeof this.options.params?t=this.options.params.call(this.options.scope,t):(this.options.params=o.fn.editableutils.tryParseJson(this.options.params,!0),o.extend(t,this.options.params)),"function"==typeof this.options.url?this.options.url.call(this.options.scope,t):o.ajax(o.extend({url:this.options.url,data:t,type:"POST"},this.options.ajaxOptions))},validate:function(t){if(void 0===t&&(t=this.value),"function"==typeof this.options.validate)return this.options.validate.call(this.options.scope,t)},option:function(t,e){t in this.options&&(this.options[t]=e),"value"===t&&this.setValue(e)},setValue:function(t,e){this.value=e?this.input.str2value(t):t,this.$form&&this.$form.is(":visible")&&this.input.value2input(this.value)}},o.fn.editableform=function(i){var n=arguments;return this.each(function(){var t=o(this),e=t.data("editableform");e||t.data("editableform",e=new s(this,"object"==typeof i&&i)),"string"==typeof i&&e[i].apply(e,Array.prototype.slice.call(n,1))})},o.fn.editableform.Constructor=s,o.fn.editableform.defaults={type:"text",url:null,params:null,name:null,pk:null,value:null,defaultValue:null,send:"auto",validate:null,success:null,error:null,ajaxOptions:null,showbuttons:!0,scope:null,savenochange:!1},o.fn.editableform.template='<form class="form-inline editableform"><div class="control-group"><div><div class="editable-input"></div><div class="editable-buttons"></div></div><div class="editable-error-block"></div></div></form>',o.fn.editableform.loading='<div class="editableform-loading"></div>',o.fn.editableform.buttons='<button type="submit" class="editable-submit">ok</button><button type="button" class="editable-cancel">cancel</button>',o.fn.editableform.errorGroupClass=null,o.fn.editableform.errorBlockClass="editable-error",o.fn.editableform.engine="jquery"})(window.jQuery),(l=>{l.fn.editableutils={inherit:function(t,e){function i(){}i.prototype=e.prototype,t.prototype=new i,(t.prototype.constructor=t).superclass=e.prototype},setCursorPosition:function(t,e){t.setSelectionRange?t.setSelectionRange(e,e):t.createTextRange&&((t=t.createTextRange()).collapse(!0),t.moveEnd("character",e),t.moveStart("character",e),t.select())},tryParseJson:function(t,e){if("string"==typeof t&&t.length&&t.match(/^[\{\[].*[\}\]]$/))if(e)try{t=new Function("return "+t)()}catch(t){}finally{return t}else t=new Function("return "+t)();return t},sliceObj:function(t,e,i){var n,s,o={};if(Array.isArray(e)&&e.length)for(var a=0;a<e.length;a++)t.hasOwnProperty(n=e[a])&&(o[n]=t[n]),!0!==i&&(s=n.toLowerCase(),t.hasOwnProperty(s))&&(o[n]=t[s]);return o},getConfigData:function(t){var i={};return l.each(t.data(),function(t,e){"object"==typeof e&&(!e||"object"!=typeof e||e.constructor!==Object&&e.constructor!==Array)||(i[t]=e)}),i},objectKeys:function(t){if(Object.keys)return Object.keys(t);if(t!==Object(t))throw new TypeError("Object.keys called on a non-object");var e,i=[];for(e in t)Object.prototype.hasOwnProperty.call(t,e)&&i.push(e);return i},escape:function(t){return l("<div>").text(t).html()},itemsByValue:function(n,t,s){var e,o,a,r;return t&&null!==n?("function"!=typeof s&&(e=s||"value",s=function(t){return t[e]}),o=Array.isArray(n),a=[],r=this,l.each(t,function(t,e){var i;e.children?a=a.concat(r.itemsByValue(n,e.children,s)):o?l.grep(n,function(t){return t==(e&&"object"==typeof e?s(e):e)}).length&&a.push(e):(i=e&&"object"==typeof e?s(e):e,n==i&&a.push(e))}),a):[]},createInput:function(t){var e,i=t.type;return"date"===i&&("inline"===t.mode?l.fn.editabletypes.datefield?i="datefield":l.fn.editabletypes.dateuifield&&(i="dateuifield"):l.fn.editabletypes.date?i="date":l.fn.editabletypes.dateui&&(i="dateui"),"date"!==i||l.fn.editabletypes.date||(i="combodate")),"wysihtml5"!==(i="datetime"===i&&"inline"===t.mode?"datetimefield":i)||l.fn.editabletypes[i]||(i="textarea"),"function"==typeof l.fn.editabletypes[i]?new(e=l.fn.editabletypes[i])(this.sliceObj(t,this.objectKeys(e.defaults))):(l.error("Unknown type: "+i),!1)},supportsTransitions:function(){var t=(document.body||document.documentElement).style,e=["Moz","Webkit","Khtml","O","ms"];if("string"==typeof t[i="transition"])return!0;for(var i=i.charAt(0).toUpperCase()+i.substr(1),n=0;n<e.length;n++)if("string"==typeof t[e[n]+i])return!0;return!1}}})(window.jQuery),(r=>{function l(t,e){this.init(t,e)}function u(t,e){this.init(t,e)}l.prototype={containerName:null,containerDataName:null,innerCss:null,containerClass:"editable-container editable-popup",defaults:{},init:function(t,e){this.$element=r(t),this.options=r.extend({},r.fn.editableContainer.defaults,e),this.splitOptions(),this.formOptions.scope=this.$element[0],this.initContainer(),this.delayedHide=!1,this.$element.on("destroyed",r.proxy(function(){this.destroy()},this)),r(document).data("editable-handlers-attached")||(r(document).on("keyup.editable",function(t){27===t.which&&r(".editable-open").editableContainer("hide")}),r(document).on("click.editable",function(t){var e,i=r(t.target),n=[".editable-container",".ui-datepicker-header",".datepicker",".modal-backdrop",".bootstrap-wysihtml5-insert-image-modal",".bootstrap-wysihtml5-insert-link-modal"];if(r.contains(document.documentElement,t.target)&&!i.is(document)){for(e=0;e<n.length;e++)if(i.is(n[e])||i.parents(n[e]).length)return;l.prototype.closeOthers(t.target)}}),r(document).data("editable-handlers-attached",!0))},splitOptions:function(){if(this.containerOptions={},this.formOptions={},!r.fn[this.containerName])throw new Error(this.containerName+" not found. Have you included corresponding js file?");for(var t in this.options)t in this.defaults?this.containerOptions[t]=this.options[t]:this.formOptions[t]=this.options[t]},tip:function(){return this.container()?this.container().$tip:null},container:function(){var t;return t=this.containerDataName&&(t=this.$element.data(this.containerDataName))?t:this.$element.data(this.containerName)},call:function(){this.$element[this.containerName].apply(this.$element,arguments)},initContainer:function(){this.call(this.containerOptions)},renderForm:function(){this.$form.editableform(this.formOptions).on({save:r.proxy(this.save,this),nochange:r.proxy(function(){this.hide("nochange")},this),cancel:r.proxy(function(){this.hide("cancel")},this),show:r.proxy(function(){this.delayedHide?(this.hide(this.delayedHide.reason),this.delayedHide=!1):this.setPosition()},this),rendering:r.proxy(this.setPosition,this),resize:r.proxy(this.setPosition,this),rendered:r.proxy(function(){this.$element.triggerHandler("shown",r(this.options.scope).data("editable"))},this)}).editableform("render")},show:function(t){this.$element.addClass("editable-open"),!1!==t&&this.closeOthers(this.$element[0]),this.innerShow(),this.tip().addClass(this.containerClass),this.$form,this.$form=r("<div>"),(this.tip().is(this.innerCss)?this.tip():this.tip().find(this.innerCss)).append(this.$form),this.renderForm()},hide:function(t){this.tip()&&this.tip().is(":visible")&&this.$element.hasClass("editable-open")&&(this.$form.data("editableform").isSaving?this.delayedHide={reason:t}:(this.delayedHide=!1,this.$element.removeClass("editable-open"),this.innerHide(),this.$element.triggerHandler("hidden",t||"manual")))},innerShow:function(){},innerHide:function(){},toggle:function(t){this.container()&&this.tip()&&this.tip().is(":visible")?this.hide():this.show(t)},setPosition:function(){},save:function(t,e){this.$element.triggerHandler("save",e),this.hide("save")},option:function(t,e){this.options[t]=e,t in this.containerOptions?(this.containerOptions[t]=e,this.setContainerOption(t,e)):(this.formOptions[t]=e,this.$form&&this.$form.editableform("option",t,e))},setContainerOption:function(t,e){this.call("option",t,e)},destroy:function(){this.hide(),this.innerDestroy(),this.$element.off("destroyed"),this.$element.removeData("editableContainer")},innerDestroy:function(){},closeOthers:function(n){r(".editable-open").each(function(t,e){var i;e===n||r(e).find(n).length||(i=(e=r(e)).data("editableContainer"))&&("cancel"===i.options.onblur?e.data("editableContainer").hide("onblur"):"submit"===i.options.onblur&&e.data("editableContainer").tip().find("form").submit())})},activate:function(){this.tip&&this.tip().is(":visible")&&this.$form&&this.$form.data("editableform").input.activate()}},r.fn.editableContainer=function(o){var a=arguments;return this.each(function(){var t=r(this),e="editableContainer",i=t.data(e),n="object"==typeof o&&o,s="inline"===n.mode?u:l;i||t.data(e,i=new s(this,n)),"string"==typeof o&&i[o].apply(i,Array.prototype.slice.call(a,1))})},r.fn.editableContainer.Popup=l,r.fn.editableContainer.Inline=u,r.fn.editableContainer.defaults={value:null,placement:"top",autohide:!0,onblur:"cancel",anim:!1,mode:"popup"},jQuery.event.special.destroyed={remove:function(t){t.handler&&t.handler()}}})(window.jQuery),(t=>{t.extend(t.fn.editableContainer.Inline.prototype,t.fn.editableContainer.Popup.prototype,{containerName:"editableform",innerCss:".editable-inline",containerClass:"editable-container editable-inline",initContainer:function(){this.$tip=t("<span></span>"),this.options.anim||(this.options.anim=0)},splitOptions:function(){this.containerOptions={},this.formOptions=this.options},tip:function(){return this.$tip},innerShow:function(){this.$element.hide(),this.tip().insertAfter(this.$element).show()},innerHide:function(){this.$tip.hide(this.options.anim,t.proxy(function(){this.$element.show(),this.innerDestroy()},this))},innerDestroy:function(){this.tip()&&this.tip().empty().remove()}})})(window.jQuery),(h=>{function p(t,e){this.$element=h(t),this.options=h.extend({},h.fn.editable.defaults,e,h.fn.editableutils.getConfigData(this.$element)),this.options.selector?this.initLive():this.init(),this.options.highlight&&!h.fn.editableutils.supportsTransitions()&&(this.options.highlight=!1)}p.prototype={constructor:p,init:function(){var t,e=!1;if(this.options.name=this.options.name||this.$element.attr("id"),this.options.scope=this.$element[0],this.input=h.fn.editableutils.createInput(this.options),this.input){switch(null==this.options.value?(this.value=this.input.html2value(h.trim(this.$element.html())),e=!0):(this.options.value=h.fn.editableutils.tryParseJson(this.options.value,!0),"string"==typeof this.options.value?this.value=this.input.str2value(this.options.value):this.value=this.options.value),this.$element.addClass("editable"),"textarea"===this.input.type&&this.$element.addClass("editable-pre-wrapped"),"manual"!==this.options.toggle?(this.$element.addClass("editable-click"),this.$element.on(this.options.toggle+".editable",h.proxy(function(t){this.options.disabled||t.preventDefault(),"mouseenter"===this.options.toggle?this.show():(t="click"!==this.options.toggle,this.toggle(t))},this))):this.$element.attr("tabindex",-1),"function"==typeof this.options.display&&(this.options.autotext="always"),this.options.autotext){case"always":t=!0;break;case"auto":t=!h.trim(this.$element.text()).length&&null!=this.value&&!e;break;default:t=!1}h.when(!t||this.render()).then(h.proxy(function(){this.options.disabled?this.disable():this.enable(),this.$element.triggerHandler("init",this)},this))}},initLive:function(){var t=this.options.selector;this.options.selector=!1,this.options.autotext="never",this.$element.on(this.options.toggle+".editable",t,h.proxy(function(t){var e=h(t.target);e.data("editable")||(e.hasClass(this.options.emptyclass)&&e.empty(),e.editable(this.options).trigger(t))},this))},render:function(t){if(!1!==this.options.display)return this.input.value2htmlFinal?this.input.value2html(this.value,this.$element[0],this.options.display,t):"function"==typeof this.options.display?this.options.display.call(this.$element[0],this.value,t):this.input.value2html(this.value,this.$element[0])},enable:function(){this.options.disabled=!1,this.$element.removeClass("editable-disabled"),this.handleEmpty(this.isEmpty),"manual"!==this.options.toggle&&"-1"===this.$element.attr("tabindex")&&this.$element.removeAttr("tabindex")},disable:function(){this.options.disabled=!0,this.hide(),this.$element.addClass("editable-disabled"),this.handleEmpty(this.isEmpty),this.$element.attr("tabindex",-1)},toggleDisabled:function(){this.options.disabled?this.enable():this.disable()},option:function(t,e){if(t&&"object"==typeof t)h.each(t,h.proxy(function(t,e){this.option(h.trim(t),e)},this));else{if(this.options[t]=e,"disabled"===t)return e?this.disable():this.enable();"value"===t&&this.setValue(e),this.container&&this.container.option(t,e),this.input.option&&this.input.option(t,e)}},handleEmpty:function(t){!1!==this.options.display&&(void 0!==t?this.isEmpty=t:"function"==typeof this.input.isEmpty?this.isEmpty=this.input.isEmpty(this.$element):this.isEmpty=""===h.trim(this.$element.html()),this.options.disabled?this.isEmpty&&(this.$element.empty(),this.options.emptyclass)&&this.$element.removeClass(this.options.emptyclass):this.isEmpty?(this.$element.html(this.options.emptytext),this.options.emptyclass&&this.$element.addClass(this.options.emptyclass)):this.options.emptyclass&&this.$element.removeClass(this.options.emptyclass))},show:function(t){if(!this.options.disabled){if(this.container){if(this.container.tip().is(":visible"))return}else{var e=h.extend({},this.options,{value:this.value,input:this.input});this.$element.editableContainer(e),this.$element.on("save.internal",h.proxy(this.save,this)),this.container=this.$element.data("editableContainer")}this.container.show(t)}},hide:function(){this.container&&this.container.hide()},toggle:function(t){this.container&&this.container.tip().is(":visible")?this.hide():this.show(t)},save:function(t,e){var i,n;this.options.unsavedclass&&("function"==typeof this.options.url||!1===this.options.display||void 0!==e.response||this.options.savenochange&&this.input.value2str(this.value)!==this.input.value2str(e.newValue)?this.$element.removeClass(this.options.unsavedclass):this.$element.addClass(this.options.unsavedclass)),this.options.highlight&&(i=this.$element,n=i.css("background-color"),i.css("background-color",this.options.highlight),setTimeout(function(){"transparent"===n&&(n=""),i.css("background-color",n),i.addClass("editable-bg-transition"),setTimeout(function(){i.removeClass("editable-bg-transition")},1700)},10)),this.setValue(e.newValue,!1,e.response)},validate:function(){if("function"==typeof this.options.validate)return this.options.validate.call(this,this.value)},setValue:function(t,e,i){this.value=e?this.input.str2value(t):t,this.container&&this.container.option("value",this.value),h.when(this.render(i)).then(h.proxy(function(){this.handleEmpty()},this))},activate:function(){this.container&&this.container.activate()},destroy:function(){this.disable(),this.container&&this.container.destroy(),this.input.destroy(),"manual"!==this.options.toggle&&(this.$element.removeClass("editable-click"),this.$element.off(this.options.toggle+".editable")),this.$element.off("save.internal"),this.$element.removeClass("editable editable-open editable-disabled"),this.$element.removeData("editable")}},h.fn.editable=function(n){var i={},s=arguments,o="editable";switch(n){case"validate":return this.each(function(){var t,e=h(this).data(o);e&&(t=e.validate())&&(i[e.options.name]=t)}),i;case"getValue":return 2===arguments.length&&!0===arguments[1]?i=this.eq(0).data(o).value:this.each(function(){var t=h(this).data(o);t&&null!=t.value&&(i[t.options.name]=t.input.value2submit(t.value))}),i;case"submit":var t,e,a,r=arguments[1]||{},l=this,u=this.editable("validate");return h.isEmptyObject(u)?(a={},1===l.length?(e={name:(t=l.data("editable")).options.name||"",value:t.input.value2submit(t.value),pk:"function"==typeof t.options.pk?t.options.pk.call(t.options.scope):t.options.pk},"function"==typeof t.options.params?e=t.options.params.call(t.options.scope,e):(t.options.params=h.fn.editableutils.tryParseJson(t.options.params,!0),h.extend(e,t.options.params)),a={url:t.options.url,data:e,type:"POST"},r.success=r.success||t.options.success,r.error=r.error||t.options.error):(e=this.editable("getValue"),a={url:r.url,data:e,type:"POST"}),a.success="function"==typeof r.success?function(t){r.success.call(l,t,r)}:h.noop,a.error="function"==typeof r.error?function(){r.error.apply(l,arguments)}:h.noop,r.ajaxOptions&&h.extend(a,r.ajaxOptions),r.data&&h.extend(a.data,r.data),h.ajax(a)):"function"==typeof r.error&&r.error.call(l,u),this}return this.each(function(){var t=h(this),e=t.data(o),i="object"==typeof n&&n;i&&i.selector?e=new p(this,i):(e||t.data(o,e=new p(this,i)),"string"==typeof n&&e[n].apply(e,Array.prototype.slice.call(s,1)))})},h.fn.editable.defaults={type:"text",disabled:!1,toggle:"click",emptytext:"Empty",autotext:"auto",value:null,display:null,emptyclass:"editable-empty",unsavedclass:"editable-unsaved",selector:null,highlight:"#FFFF80"}})(window.jQuery),(n=>{function t(){}n.fn.editabletypes={},t.prototype={init:function(t,e,i){this.type=t,this.options=n.extend({},i,e)},prerender:function(){this.$tpl=n(this.options.tpl),this.$input=this.$tpl,this.$clear=null,this.error=null},render:function(){},value2html:function(t,e){n(e)[this.options.escape?"text":"html"](n.trim(t))},html2value:function(t){return n("<div>").html(t).text()},value2str:function(t){return t},str2value:function(t){return t},value2submit:function(t){return t},value2input:function(t){this.$input.val(t)},input2value:function(){return this.$input.val()},activate:function(){this.$input.is(":visible")&&this.$input.focus()},clear:function(){this.$input.val(null)},escape:function(t){return n("<div>").text(t).html()},autosubmit:function(){},destroy:function(){},setClass:function(){this.options.inputclass&&this.$input.addClass(this.options.inputclass)},setAttr:function(t){null!=this.options[t]&&this.$input.attr(t,this.options[t])},option:function(t,e){this.options[t]=e}},t.defaults={tpl:"",inputclass:null,escape:!0,scope:null,showbuttons:!0},n.extend(n.fn.editabletypes,{abstractinput:t})})(window.jQuery),(r=>{function t(t){}r.fn.editableutils.inherit(t,r.fn.editabletypes.abstractinput),r.extend(t.prototype,{render:function(){var t=r.Deferred();return this.error=null,this.onSourceReady(function(){this.renderList(),t.resolve()},function(){this.error=this.options.sourceError,t.resolve()}),t.promise()},html2value:function(t){return null},value2html:function(t,e,i,n){function s(){"function"==typeof i?i.call(e,t,this.sourceData,n):this.value2htmlFinal(t,e),o.resolve()}var o=r.Deferred();return null===t?s.call(this):this.onSourceReady(s,function(){o.resolve()}),o.promise()},onSourceReady:function(e,i){var t;if(r.isFunction(this.options.source)?(t=this.options.source.call(this.options.scope),this.sourceData=null):t=this.options.source,this.options.sourceCache&&Array.isArray(this.sourceData))e.call(this);else{try{t=r.fn.editableutils.tryParseJson(t,!1)}catch(t){return void i.call(this)}if("string"==typeof t){if(this.options.sourceCache){var n,s=t;if(r(document).data(s)||r(document).data(s,{}),!1===(n=r(document).data(s)).loading&&n.sourceData)return this.sourceData=n.sourceData,this.doPrepend(),void e.call(this);if(!0===n.loading)return n.callbacks.push(r.proxy(function(){this.sourceData=n.sourceData,this.doPrepend(),e.call(this)},this)),void n.err_callbacks.push(r.proxy(i,this));n.loading=!0,n.callbacks=[],n.err_callbacks=[]}s=r.extend({url:t,type:"get",cache:!1,dataType:"json",success:r.proxy(function(t){n&&(n.loading=!1),this.sourceData=this.makeArray(t),Array.isArray(this.sourceData)?(n&&(n.sourceData=this.sourceData,r.each(n.callbacks,function(){this.call()})),this.doPrepend(),e.call(this)):(i.call(this),n&&r.each(n.err_callbacks,function(){this.call()}))},this),error:r.proxy(function(){i.call(this),n&&(n.loading=!1,r.each(n.err_callbacks,function(){this.call()}))},this)},this.options.sourceOptions);r.ajax(s)}else this.sourceData=this.makeArray(t),(Array.isArray(this.sourceData)?(this.doPrepend(),e):i).call(this)}},doPrepend:function(){null!=this.options.prepend&&(Array.isArray(this.prependData)||(r.isFunction(this.options.prepend)&&(this.options.prepend=this.options.prepend.call(this.options.scope)),this.options.prepend=r.fn.editableutils.tryParseJson(this.options.prepend,!0),"string"==typeof this.options.prepend&&(this.options.prepend={"":this.options.prepend}),this.prependData=this.makeArray(this.options.prepend)),Array.isArray(this.prependData))&&Array.isArray(this.sourceData)&&(this.sourceData=this.prependData.concat(this.sourceData))},renderList:function(){},value2htmlFinal:function(t,e){},makeArray:function(t){var i,n,e,s=[];if(!t||"string"==typeof t)return null;if(Array.isArray(t))for(var o=function(t,e){if(n={value:t,text:e},2<=i++)return!1},a=0;a<t.length;a++)"object"==typeof(e=t[a])?(i=0,r.each(e,o),1===i?s.push(n):1<i&&(e.children&&(e.children=this.makeArray(e.children)),s.push(e))):s.push({value:e,text:e});else r.each(t,function(t,e){s.push({value:t,text:e})});return s},option:function(t,e){this.options[t]=e,"source"===t&&(this.sourceData=null),"prepend"===t&&(this.prependData=null)}}),t.defaults=r.extend({},r.fn.editabletypes.abstractinput.defaults,{source:null,prepend:!1,sourceError:"Error when loading list",sourceCache:!0,sourceOptions:null}),r.fn.editabletypes.list=t})(window.jQuery),(i=>{function e(t){this.init("text",t,e.defaults)}i.fn.editableutils.inherit(e,i.fn.editabletypes.abstractinput),i.extend(e.prototype,{render:function(){this.renderClear(),this.setClass(),this.setAttr("placeholder")},activate:function(){this.$input.is(":visible")&&(this.$input.focus(),i.fn.editableutils.setCursorPosition(this.$input.get(0),this.$input.val().length),this.toggleClear)&&this.toggleClear()},renderClear:function(){this.options.clear&&(this.$clear=i('<span class="editable-clear-x"></span>'),this.$input.after(this.$clear).css("padding-right",24).keyup(i.proxy(function(t){var e;~i.inArray(t.keyCode,[40,38,9,13,27])||(clearTimeout(this.t),(e=this).t=setTimeout(function(){e.toggleClear(t)},100))},this)).parent().css("position","relative"),this.$clear.click(i.proxy(this.clear,this)))},postrender:function(){},toggleClear:function(t){var e,i;this.$clear&&(e=this.$input.val().length,i=this.$clear.is(":visible"),e&&!i&&this.$clear.show(),!e)&&i&&this.$clear.hide()},clear:function(){this.$clear.hide(),this.$input.val("").focus()}}),e.defaults=i.extend({},i.fn.editabletypes.abstractinput.defaults,{tpl:'<input type="text">',placeholder:null,clear:!0}),i.fn.editabletypes.text=e})(window.jQuery),(e=>{function i(t){this.init("textarea",t,i.defaults)}e.fn.editableutils.inherit(i,e.fn.editabletypes.abstractinput),e.extend(i.prototype,{render:function(){this.setClass(),this.setAttr("placeholder"),this.setAttr("rows"),this.$input.keydown(function(t){t.ctrlKey&&13===t.which&&e(this).closest("form").submit()})},activate:function(){e.fn.editabletypes.text.prototype.activate.call(this)}}),i.defaults=e.extend({},e.fn.editabletypes.abstractinput.defaults,{tpl:"<textarea></textarea>",inputclass:"input-large",placeholder:null,rows:7}),e.fn.editabletypes.textarea=i})(window.jQuery),(o=>{function e(t){this.init("select",t,e.defaults)}o.fn.editableutils.inherit(e,o.fn.editabletypes.list),o.extend(e.prototype,{renderList:function(){this.$input.empty();var s=function(t,e){var i;if(Array.isArray(e))for(var n=0;n<e.length;n++)i={},e[n].children?(i.label=e[n].text,t.append(s(o("<optgroup>",i),e[n].children))):(i.value=e[n].value,e[n].disabled&&(i.disabled=!0),t.append(o("<option>",i).text(e[n].text)));return t};s(this.$input,this.sourceData),this.setClass(),this.$input.on("keydown.editable",function(t){13===t.which&&o(this).closest("form").submit()})},value2htmlFinal:function(t,e){var i="",t=o.fn.editableutils.itemsByValue(t,this.sourceData);t.length&&(i=t[0].text),o.fn.editabletypes.abstractinput.prototype.value2html.call(this,i,e)},autosubmit:function(){this.$input.off("keydown.editable").on("change.editable",function(){o(this).closest("form").submit()})}}),e.defaults=o.extend({},o.fn.editabletypes.list.defaults,{tpl:"<select></select>"}),o.fn.editabletypes.select=e})(window.jQuery),(s=>{function e(t){this.init("checklist",t,e.defaults)}s.fn.editableutils.inherit(e,s.fn.editabletypes.list),s.extend(e.prototype,{renderList:function(){var t;if(this.$tpl.empty(),Array.isArray(this.sourceData)){for(var e=0;e<this.sourceData.length;e++)t=s("<label>").append(s("<input>",{type:"checkbox",value:this.sourceData[e].value})).append(s("<span>").text(" "+this.sourceData[e].text)),s("<div>").append(t).appendTo(this.$tpl);this.$input=this.$tpl.find('input[type="checkbox"]'),this.setClass()}},value2str:function(t){return Array.isArray(t)?t.sort().join(this.options.separator.trim()):""},str2value:function(t){var e;return"string"==typeof t&&t.length?(e=new RegExp("\\s*"+s.trim(this.options.separator)+"\\s*"),t.split(e)):Array.isArray(t)?t:[t]},value2input:function(n){this.$input.prop("checked",!1),Array.isArray(n)&&n.length&&this.$input.each(function(t,e){var i=s(e);s.each(n,function(t,e){i.val()==e&&i.prop("checked",!0)})})},input2value:function(){var i=[];return this.$input.filter(":checked").each(function(t,e){i.push(s(e).val())}),i},value2htmlFinal:function(t,e){var i=[],t=s.fn.editableutils.itemsByValue(t,this.sourceData),n=this.options.escape;t.length?(s.each(t,function(t,e){e=n?s.fn.editableutils.escape(e.text):e.text;i.push(e)}),s(e).html(i.join("<br>"))):s(e).empty()},activate:function(){this.$input.first().focus()},autosubmit:function(){this.$input.on("keydown",function(t){13===t.which&&s(this).closest("form").submit()})}}),e.defaults=s.extend({},s.fn.editabletypes.list.defaults,{tpl:'<div class="editable-checklist"></div>',inputclass:null,separator:","}),s.fn.editabletypes.checklist=e})(window.jQuery),(i=>{function e(t){this.init("password",t,e.defaults)}i.fn.editableutils.inherit(e,i.fn.editabletypes.text),i.extend(e.prototype,{value2html:function(t,e){t?i(e).text("[hidden]"):i(e).empty()},html2value:function(t){return null}}),e.defaults=i.extend({},i.fn.editabletypes.text.defaults,{tpl:'<input type="password">'}),i.fn.editabletypes.password=e})(window.jQuery),(t=>{function e(t){this.init("email",t,e.defaults)}t.fn.editableutils.inherit(e,t.fn.editabletypes.text),e.defaults=t.extend({},t.fn.editabletypes.text.defaults,{tpl:'<input type="email">'}),t.fn.editabletypes.email=e})(window.jQuery),(t=>{function e(t){this.init("url",t,e.defaults)}t.fn.editableutils.inherit(e,t.fn.editabletypes.text),e.defaults=t.extend({},t.fn.editabletypes.text.defaults,{tpl:'<input type="url">'}),t.fn.editabletypes.url=e})(window.jQuery),(t=>{function e(t){this.init("tel",t,e.defaults)}t.fn.editableutils.inherit(e,t.fn.editabletypes.text),e.defaults=t.extend({},t.fn.editabletypes.text.defaults,{tpl:'<input type="tel">'}),t.fn.editabletypes.tel=e})(window.jQuery),(t=>{function e(t){this.init("number",t,e.defaults)}t.fn.editableutils.inherit(e,t.fn.editabletypes.text),t.extend(e.prototype,{render:function(){e.superclass.render.call(this),this.setAttr("min"),this.setAttr("max"),this.setAttr("step")},postrender:function(){this.$clear&&this.$clear.css({right:24})}}),e.defaults=t.extend({},t.fn.editabletypes.text.defaults,{tpl:'<input type="number">',inputclass:"input-mini",min:null,max:null,step:null}),t.fn.editabletypes.number=e})(window.jQuery),(t=>{function e(t){this.init("range",t,e.defaults)}t.fn.editableutils.inherit(e,t.fn.editabletypes.number),t.extend(e.prototype,{render:function(){this.$input=this.$tpl.filter("input"),this.setClass(),this.setAttr("min"),this.setAttr("max"),this.setAttr("step"),this.$input.on("input",function(){t(this).siblings("output").text(t(this).val())})},activate:function(){this.$input.focus()}}),e.defaults=t.extend({},t.fn.editabletypes.number.defaults,{tpl:'<input type="range"><output style="width: 30px; display: inline-block"></output>',inputclass:"input-medium"}),t.fn.editabletypes.range=e})(window.jQuery),(t=>{function e(t){this.init("time",t,e.defaults)}t.fn.editableutils.inherit(e,t.fn.editabletypes.abstractinput),t.extend(e.prototype,{render:function(){this.setClass()}}),e.defaults=t.extend({},t.fn.editabletypes.abstractinput.defaults,{tpl:'<input type="time">'}),t.fn.editabletypes.time=e})(window.jQuery),(o=>{function a(t){var e,i;this.init("select2",t,a.defaults),t.select2=t.select2||{},this.sourceData=null,t.placeholder&&(t.select2.placeholder=t.placeholder),!t.select2.tags&&t.source&&(e=t.source,"string"==typeof(e=o.isFunction(t.source)?t.source.call(t.scope):e)?(t.select2.ajax=t.select2.ajax||{},t.select2.ajax.data||(t.select2.ajax.data=function(t){return{query:t}}),t.select2.ajax.results||(t.select2.ajax.results=function(t){return{results:t}}),t.select2.ajax.url=e):(this.sourceData=this.convertSource(e),t.select2.data=this.sourceData)),this.options.select2=o.extend({},a.defaults.select2,t.select2),this.isMultiple=this.options.select2.tags||this.options.select2.multiple,this.isRemote="ajax"in this.options.select2,this.idFunc=this.options.select2.id,"function"!=typeof this.idFunc&&(i=this.idFunc||"id",this.idFunc=function(t){return t[i]}),this.formatSelection=this.options.select2.formatSelection,"function"!=typeof this.formatSelection&&(this.formatSelection=function(t){return t.text})}o.fn.editableutils.inherit(a,o.fn.editabletypes.abstractinput),o.extend(a.prototype,{render:function(){this.setClass(),this.isRemote&&this.$input.on("select2-loaded",o.proxy(function(t){this.sourceData=t.items.results},this)),this.isMultiple&&this.$input.on("change",function(){o(this).closest("form").parent().triggerHandler("resize")})},value2html:function(t,e){var i,n="",s=this;this.options.select2.tags?i=t:this.sourceData&&(i=o.fn.editableutils.itemsByValue(t,this.sourceData,this.idFunc)),Array.isArray(i)?(n=[],o.each(i,function(t,e){n.push(e&&"object"==typeof e?s.formatSelection(e):e)})):i&&(n=s.formatSelection(i)),n=Array.isArray(n)?n.join(this.options.viewseparator):n,a.superclass.value2html.call(this,n,e)},html2value:function(t){return this.options.select2.tags?this.str2value(t,this.options.viewseparator):null},value2input:function(t){var e,i;Array.isArray(t)&&(t=t.join(this.getSeparator())),this.$input.data("select2")?this.$input.val(t).trigger("change",!0):(this.$input.val(t),this.$input.select2(this.options.select2)),!this.isRemote||this.isMultiple||this.options.select2.initSelection||(e=this.options.select2.id,i=this.options.select2.formatSelection,e)||i||(e=o(this.options.scope)).data("editable").isEmpty||(i={id:t,text:e.text()},this.$input.select2("data",i))},input2value:function(){return this.$input.select2("val")},str2value:function(t,e){if("string"!=typeof t||!this.isMultiple)return t;var i,n,s;if(e=e||this.getSeparator(),null===t||t.length<1)return null;for(n=0,s=(i=t.split(e)).length;n<s;n+=1)i[n]=o.trim(i[n]);return i},autosubmit:function(){this.$input.on("change",function(t,e){e||o(this).closest("form").submit()})},getSeparator:function(){return this.options.select2.separator||o.fn.select2.defaults.separator},convertSource:function(t){if(Array.isArray(t)&&t.length&&void 0!==t[0].value)for(var e=0;e<t.length;e++)void 0!==t[e].value&&(t[e].id=t[e].value,delete t[e].value);return t},destroy:function(){this.$input&&this.$input.data("select2")&&this.$input.select2("destroy")}}),a.defaults=o.extend({},o.fn.editabletypes.abstractinput.defaults,{tpl:'<input type="hidden">',select2:null,placeholder:null,source:null,viewseparator:", "}),o.fn.editabletypes.select2=a})(window.jQuery),(a=>{function s(t,e){this.$element=a(t),this.$element.is("input")?(this.options=a.extend({},a.fn.combodate.defaults,e,this.$element.data()),this.init()):a.error("Combodate should be applied to INPUT element")}s.prototype={constructor:s,init:function(){this.map={day:["D","date"],month:["M","month"],year:["Y","year"],hour:["[Hh]","hours"],minute:["m","minutes"],second:["s","seconds"],ampm:["[Aa]",""]},this.$widget=a('<span class="combodate"></span>').html(this.getTemplate()),this.initCombos(),this.$widget.on("change","select",a.proxy(function(t){this.$element.val(this.getValue()).change(),this.options.smartDays&&(a(t.target).is(".month")||a(t.target).is(".year"))&&this.fillCombo("day")},this)),this.$widget.find("select").css("width","auto"),this.$element.hide().after(this.$widget),this.setValue(this.$element.val()||this.options.value)},getTemplate:function(){var n=this.options.template;return a.each(this.map,function(t,e){e=e[0];var i=new RegExp(e+"+"),e=1<e.length?e.substring(1,2):e;n=n.replace(i,"{"+e+"}")}),n=n.replace(/ /g,"&nbsp;"),a.each(this.map,function(t,e){e=1<(e=e[0]).length?e.substring(1,2):e;n=n.replace("{"+e+"}",'<select class="'+t+'"></select>')}),n},initCombos:function(){for(var t in this.map){var e=this.$widget.find("."+t);this["$"+t]=e.length?e:null,this.fillCombo(t)}},fillCombo:function(t){var e=this["$"+t];if(e){var i=this["fill"+t.charAt(0).toUpperCase()+t.slice(1)](),t=e.val();e.empty();for(var n=0;n<i.length;n++)e.append('<option value="'+i[n][0]+'">'+i[n][1]+"</option>");e.val(t)}},fillCommon:function(t){var e,i=[];return"name"===this.options.firstItem?(e=(e="function"==typeof(e=moment.relativeTime||moment.langData()._relativeTime)[t]?e[t](1,!0,t,!1):e[t]).split(" ").reverse()[0],i.push(["",e])):"empty"===this.options.firstItem&&i.push(["",""]),i},fillDay:function(){var t,e,i,n,s=this.fillCommon("d"),o=-1!==this.options.template.indexOf("DD"),a=31;for(this.options.smartDays&&this.$month&&this.$year&&(i=parseInt(this.$month.val(),10),n=parseInt(this.$year.val(),10),isNaN(i)||isNaN(n)||(a=moment([n,i]).daysInMonth())),e=1;e<=a;e++)t=o?this.leadZero(e):e,s.push([e,t]);return s},fillMonth:function(){for(var t,e=this.fillCommon("M"),i=-1!==this.options.template.indexOf("MMMM"),n=-1!==this.options.template.indexOf("MMM"),s=-1!==this.options.template.indexOf("MM"),o=0;o<=11;o++)t=i?moment().date(1).month(o).format("MMMM"):n?moment().date(1).month(o).format("MMM"):s?this.leadZero(o+1):o+1,e.push([o,t]);return e},fillYear:function(){for(var t,e=[],i=-1!==this.options.template.indexOf("YYYY"),n=this.options.maxYear;n>=this.options.minYear;n--)t=i?n:(n+"").substring(2),e[this.options.yearDescending?"push":"unshift"]([n,t]);return e=this.fillCommon("y").concat(e)},fillHour:function(){for(var t,e=this.fillCommon("h"),i=-1!==this.options.template.indexOf("h"),n=(this.options.template.indexOf("H"),-1!==this.options.template.toLowerCase().indexOf("hh")),s=i?12:23,o=i?1:0;o<=s;o++)t=n?this.leadZero(o):o,e.push([o,t]);return e},fillMinute:function(){for(var t,e=this.fillCommon("m"),i=-1!==this.options.template.indexOf("mm"),n=0;n<=59;n+=this.options.minuteStep)t=i?this.leadZero(n):n,e.push([n,t]);return e},fillSecond:function(){for(var t,e=this.fillCommon("s"),i=-1!==this.options.template.indexOf("ss"),n=0;n<=59;n+=this.options.secondStep)t=i?this.leadZero(n):n,e.push([n,t]);return e},fillAmpm:function(){var t=-1!==this.options.template.indexOf("a");this.options.template.indexOf("A");return[["am",t?"am":"AM"],["pm",t?"pm":"PM"]]},getValue:function(t){var e,n={},s=this,o=!1;return a.each(this.map,function(t,e){var i;if("ampm"!==t)return i="day"===t?1:0,n[t]=s["$"+t]?parseInt(s["$"+t].val(),10):i,isNaN(n[t])?!(o=!0):void 0}),o?"":(this.$ampm&&(n.hour=12===n.hour?"am"===this.$ampm.val()?0:12:"am"===this.$ampm.val()?n.hour:n.hour+12),e=moment([n.year,n.month,n.day,n.hour,n.minute,n.second]),this.highlight(e),null===(t=void 0===t?this.options.format:t)?e.isValid()?e:null:e.isValid()?e.format(t):"")},setValue:function(t){var i,n,s;function o(t,n){var s={};return t.children("option").each(function(t,e){var i,e=a(e).attr("value");""!==e&&(i=Math.abs(e-n),void 0===s.distance||i<s.distance)&&(s={value:e,distance:i})}),s.value}t&&(i="string"==typeof t?moment(t,this.options.format):moment(t),n=this,s={},i.isValid())&&(a.each(this.map,function(t,e){"ampm"!==t&&(s[t]=i[e[1]]())}),this.$ampm&&(12<=s.hour?(s.ampm="pm",12<s.hour&&(s.hour-=12)):(s.ampm="am",0===s.hour&&(s.hour=12))),a.each(s,function(t,e){n["$"+t]&&("minute"===t&&1<n.options.minuteStep&&n.options.roundTime&&(e=o(n["$"+t],e)),"second"===t&&1<n.options.secondStep&&n.options.roundTime&&(e=o(n["$"+t],e)),n["$"+t].val(e))}),this.options.smartDays&&this.fillCombo("day"),this.$element.val(i.format(this.options.format)).change())},highlight:function(t){t.isValid()?this.options.errorClass?this.$widget.removeClass(this.options.errorClass):this.$widget.find("select").css("border-color",this.borderColor):this.options.errorClass?this.$widget.addClass(this.options.errorClass):(this.borderColor||(this.borderColor=this.$widget.find("select").css("border-color")),this.$widget.find("select").css("border-color","red"))},leadZero:function(t){return t<=9?"0"+t:t},destroy:function(){this.$widget.remove(),this.$element.removeData("combodate").show()}},a.fn.combodate=function(i){var t,n=Array.apply(null,arguments);return n.shift(),"getValue"===i&&this.length&&(t=this.eq(0).data("combodate"))?t.getValue.apply(t,n):this.each(function(){var t=a(this),e=t.data("combodate");e||t.data("combodate",e=new s(this,"object"==typeof i&&i)),"string"==typeof i&&"function"==typeof e[i]&&e[i].apply(e,n)})},a.fn.combodate.defaults={format:"DD-MM-YYYY HH:mm",template:"D / MMM / YYYY   H : mm",value:null,minYear:1970,maxYear:(new Date).getFullYear(),yearDescending:!0,minuteStep:5,secondStep:1,firstItem:"empty",errorClass:null,roundTime:!0,smartDays:!1}})(window.jQuery),(e=>{function i(t){this.init("combodate",t,i.defaults),this.options.viewformat||(this.options.viewformat=this.options.format),t.combodate=e.fn.editableutils.tryParseJson(t.combodate,!0),this.options.combodate=e.extend({},i.defaults.combodate,t.combodate,{format:this.options.format,template:this.options.template})}e.fn.editableutils.inherit(i,e.fn.editabletypes.abstractinput),e.extend(i.prototype,{render:function(){this.$input.combodate(this.options.combodate),"bs3"===e.fn.editableform.engine&&this.$input.siblings().find("select").addClass("form-control"),this.options.inputclass&&this.$input.siblings().find("select").addClass(this.options.inputclass)},value2html:function(t,e){t=t?t.format(this.options.viewformat):"";i.superclass.value2html.call(this,t,e)},html2value:function(t){return t?moment(t,this.options.viewformat):null},value2str:function(t){return t?t.format(this.options.format):""},str2value:function(t){return t?moment(t,this.options.format):null},value2submit:function(t){return this.value2str(t)},value2input:function(t){this.$input.combodate("setValue",t)},input2value:function(){return this.$input.combodate("getValue",null)},activate:function(){this.$input.siblings(".combodate").find("select").eq(0).focus()},autosubmit:function(){}}),i.defaults=e.extend({},e.fn.editabletypes.abstractinput.defaults,{tpl:'<input type="text">',inputclass:null,format:"YYYY-MM-DD",viewformat:null,template:"D / MMM / YYYY",combodate:null}),e.fn.editabletypes.combodate=i})(window.jQuery),(e=>{e.extend(e.fn.editableform.Constructor.prototype,{initButtons:function(){var t=this.$form.find(".editable-buttons");t.append(e.fn.editableform.buttons),"bottom"===this.options.showbuttons&&t.addClass("editable-buttons-bottom"),this.$form.find(".editable-submit").button({icons:{primary:"ui-icon-check"},text:!1}).removeAttr("title"),this.$form.find(".editable-cancel").button({icons:{primary:"ui-icon-closethick"},text:!1}).removeAttr("title")}}),e.fn.editableform.errorGroupClass=null,e.fn.editableform.errorBlockClass="ui-state-error",e.fn.editableform.engine="jquery-ui"})(window.jQuery),(e=>{e.extend(e.fn.editableContainer.Popup.prototype,{containerName:"tooltip",containerDataName:"ui-tooltip",innerCss:".ui-tooltip-content",defaults:e.ui.tooltip.prototype.options,splitOptions:function(){if(this.containerOptions={},this.formOptions={},e.ui[this.containerName])for(var t in this.options)t in this.defaults?this.containerOptions[t]=this.options[t]:this.formOptions[t]=this.options[t];else e.error('Please use jQueryUI with "tooltip" widget! http://jqueryui.com/download')},initContainer:function(){this.handlePlacement(),e.extend(this.containerOptions,{items:"*",content:" ",track:!1,open:e.proxy(function(){this.container()._on(this.container().element,{mouseleave:function(t){t.stopImmediatePropagation()},focusout:function(t){t.stopImmediatePropagation()}})},this)}),this.call(this.containerOptions),this.container()._off(this.container().element,"mouseover focusin")},tip:function(){return this.container()?this.container()._find(this.container().element):null},innerShow:function(){this.call("open");var t=this.options.title||this.$element.data("ui-tooltip-title")||this.$element.data("originalTitle");this.tip().find(this.innerCss).empty().append(e("<label>").text(t))},innerHide:function(){this.call("close")},innerDestroy:function(){},setPosition:function(){this.tip().position(e.extend({of:this.$element},this.containerOptions.position))},handlePlacement:function(){var t;switch(this.options.placement){case"top":t={my:"center bottom-5",at:"center top",collision:"flipfit"};break;case"right":t={my:"left+5 center",at:"right center",collision:"flipfit"};break;case"bottom":t={my:"center top+5",at:"center bottom",collision:"flipfit"};break;case"left":t={my:"right-5 center",at:"left center",collision:"flipfit"}}this.containerOptions.position=t}})})(window.jQuery),(i=>{function n(t){this.init("dateui",t,n.defaults),this.initPicker(t,n.defaults)}i.fn.editableutils.inherit(n,i.fn.editabletypes.abstractinput),i.extend(n.prototype,{initPicker:function(t,e){this.options.viewformat||(this.options.viewformat=this.options.format),this.options.viewformat=this.options.viewformat.replace("yyyy","yy"),this.options.format=this.options.format.replace("yyyy","yy"),this.options.datepicker=i.extend({},e.datepicker,t.datepicker,{dateFormat:this.options.viewformat})},render:function(){this.$input.datepicker(this.options.datepicker),this.options.clear&&(this.$clear=i('<a href="#"></a>').html(this.options.clear).click(i.proxy(function(t){t.preventDefault(),t.stopPropagation(),this.clear()},this)),this.$tpl.parent().append(i('<div class="editable-clear">').append(this.$clear)))},value2html:function(t,e){t=i.datepicker.formatDate(this.options.viewformat,t);n.superclass.value2html.call(this,t,e)},html2value:function(t){if("string"!=typeof t)return t;var e;try{e=i.datepicker.parseDate(this.options.viewformat,t)}catch(t){}return e},value2str:function(t){return i.datepicker.formatDate(this.options.format,t)},str2value:function(t){if("string"!=typeof t)return t;var e;try{e=i.datepicker.parseDate(this.options.format,t)}catch(t){}return e},value2submit:function(t){return this.value2str(t)},value2input:function(t){this.$input.datepicker("setDate",t)},input2value:function(){return this.$input.datepicker("getDate")},activate:function(){},clear:function(){this.$input.datepicker("setDate",null),this.isAutosubmit&&this.submit()},autosubmit:function(){this.isAutosubmit=!0,this.$input.on("mouseup","table.ui-datepicker-calendar a.ui-state-default",i.proxy(this.submit,this))},submit:function(){var t=this.$input.closest("form");setTimeout(function(){t.submit()},200)}}),n.defaults=i.extend({},i.fn.editabletypes.abstractinput.defaults,{tpl:'<div class="editable-date"></div>',inputclass:null,format:"yyyy-mm-dd",viewformat:null,datepicker:{firstDay:0,changeYear:!0,changeMonth:!0,showOtherMonths:!0},clear:"&times; clear"}),i.fn.editabletypes.dateui=n})(window.jQuery),(e=>{function i(t){this.init("dateuifield",t,i.defaults),this.initPicker(t,i.defaults)}e.fn.editableutils.inherit(i,e.fn.editabletypes.dateui),e.extend(i.prototype,{render:function(){this.$input.datepicker(this.options.datepicker),e.fn.editabletypes.text.prototype.renderClear.call(this)},value2input:function(t){this.$input.val(e.datepicker.formatDate(this.options.viewformat,t))},input2value:function(){return this.html2value(this.$input.val())},activate:function(){e.fn.editabletypes.text.prototype.activate.call(this)},toggleClear:function(){e.fn.editabletypes.text.prototype.toggleClear.call(this)},autosubmit:function(){}}),i.defaults=e.extend({},e.fn.editabletypes.dateui.defaults,{tpl:'<input type="text"/>',inputclass:null,datepicker:{showOn:"button",buttonImage:"http://jqueryui.com/resources/demos/datepicker/images/calendar.gif",buttonImageOnly:!0,firstDay:0,changeYear:!0,changeMonth:!0,showOtherMonths:!0},clear:!1}),e.fn.editabletypes.dateuifield=i})(window.jQuery);
\ No newline at end of file
+(o=>{function s(t,e){this.options=o.extend({},o.fn.editableform.defaults,e),this.$div=o(t),this.options.scope||(this.options.scope=this)}s.prototype={constructor:s,initInput:function(){this.input=this.options.input,this.value=this.input.str2value(this.options.value),this.input.prerender()},initTemplate:function(){this.$form=o(o.fn.editableform.template)},initButtons:function(){var t=this.$form.find(".editable-buttons");t.append(o.fn.editableform.buttons),"bottom"===this.options.showbuttons&&t.addClass("editable-buttons-bottom")},render:function(){this.$loading=o(o.fn.editableform.loading),this.$div.empty().append(this.$loading),this.initTemplate(),this.options.showbuttons?this.initButtons():this.$form.find(".editable-buttons").remove(),this.showLoading(),this.isSaving=!1,this.$div.triggerHandler("rendering"),this.initInput(),this.$form.find("div.editable-input").append(this.input.$tpl),this.$div.append(this.$form),o.when(this.input.render()).then(o.proxy(function(){var t;this.options.showbuttons||this.input.autosubmit(),this.$form.find(".editable-cancel").click(o.proxy(this.cancel,this)),this.input.error?(this.error(this.input.error),this.$form.find(".editable-submit").attr("disabled",!0),this.input.$input.attr("disabled",!0),this.$form.submit(function(t){t.preventDefault()})):(this.error(!1),this.input.$input.removeAttr("disabled"),this.$form.find(".editable-submit").removeAttr("disabled"),t=null==this.value||""===this.value?this.options.defaultValue:this.value,this.input.value2input(t),this.$form.submit(o.proxy(this.submit,this))),this.$div.triggerHandler("rendered"),this.showForm(),this.input.postrender&&this.input.postrender()},this))},cancel:function(){this.$div.triggerHandler("cancel")},showLoading:function(){var t,e;this.$form?(t=this.$form.outerWidth(),e=this.$form.outerHeight(),t&&this.$loading.width(t),e&&this.$loading.height(e),this.$form.hide()):(t=this.$loading.parent().width())&&this.$loading.width(t),this.$loading.show()},showForm:function(t){this.$loading.hide(),this.$form.show(),!1!==t&&this.input.activate(),this.$div.triggerHandler("show")},error:function(t){var e=this.$form.find(".control-group"),i=this.$form.find(".editable-error-block");if(!1===t)e.removeClass(o.fn.editableform.errorGroupClass),i.removeClass(o.fn.editableform.errorBlockClass).empty().hide();else{if(t){for(var n=(""+t).split("\n"),s=0;s<n.length;s++)n[s]=o("<div>").text(n[s]).html();t=n.join("<br>")}e.addClass(o.fn.editableform.errorGroupClass),i.addClass(o.fn.editableform.errorBlockClass).html(t).show()}},submit:function(t){t.stopPropagation(),t.preventDefault();var i,n=this.input.input2value(),t=this.validate(n);if("object"===o.type(t)&&void 0!==t.newValue){if(n=t.newValue,this.input.value2input(n),"string"==typeof t.msg)return this.error(t.msg),void this.showForm()}else if(t)return this.error(t),void this.showForm();this.options.savenochange||this.input.value2str(n)!=this.input.value2str(this.value)?(i=this.input.value2submit(n),this.isSaving=!0,o.when(this.save(i)).done(o.proxy(function(t){this.isSaving=!1;var e="function"==typeof this.options.success?this.options.success.call(this.options.scope,t,n):null;!1===e?(this.error(!1),this.showForm(!1)):"string"==typeof e?(this.error(e),this.showForm()):(e&&"object"==typeof e&&e.hasOwnProperty("newValue")&&(n=e.newValue),this.error(!1),this.value=n,this.$div.triggerHandler("save",{newValue:n,submitValue:i,response:t}))},this)).fail(o.proxy(function(t){this.isSaving=!1,t="function"==typeof this.options.error?this.options.error.call(this.options.scope,t,n):"string"==typeof t?t:t.responseText||t.statusText||"Unknown error!",this.error(t),this.showForm()},this))):this.$div.triggerHandler("nochange")},save:function(t){this.options.pk=o.fn.editableutils.tryParseJson(this.options.pk,!0);var e="function"==typeof this.options.pk?this.options.pk.call(this.options.scope):this.options.pk;if(!!("function"==typeof this.options.url||this.options.url&&("always"===this.options.send||"auto"===this.options.send&&null!=e)))return this.showLoading(),t={name:this.options.name||"",value:t,pk:e},"function"==typeof this.options.params?t=this.options.params.call(this.options.scope,t):(this.options.params=o.fn.editableutils.tryParseJson(this.options.params,!0),o.extend(t,this.options.params)),"function"==typeof this.options.url?this.options.url.call(this.options.scope,t):o.ajax(o.extend({url:this.options.url,data:t,type:"POST"},this.options.ajaxOptions))},validate:function(t){if(void 0===t&&(t=this.value),"function"==typeof this.options.validate)return this.options.validate.call(this.options.scope,t)},option:function(t,e){t in this.options&&(this.options[t]=e),"value"===t&&this.setValue(e)},setValue:function(t,e){this.value=e?this.input.str2value(t):t,this.$form&&this.$form.is(":visible")&&this.input.value2input(this.value)}},o.fn.editableform=function(i){var n=arguments;return this.each(function(){var t=o(this),e=t.data("editableform");e||t.data("editableform",e=new s(this,"object"==typeof i&&i)),"string"==typeof i&&e[i].apply(e,Array.prototype.slice.call(n,1))})},o.fn.editableform.Constructor=s,o.fn.editableform.defaults={type:"text",url:null,params:null,name:null,pk:null,value:null,defaultValue:null,send:"auto",validate:null,success:null,error:null,ajaxOptions:null,showbuttons:!0,scope:null,savenochange:!1},o.fn.editableform.template='<form class="form-inline editableform"><div class="control-group"><div><div class="editable-input"></div><div class="editable-buttons"></div></div><div class="editable-error-block"></div></div></form>',o.fn.editableform.loading='<div class="editableform-loading"></div>',o.fn.editableform.buttons='<button type="submit" class="editable-submit">ok</button><button type="button" class="editable-cancel">cancel</button>',o.fn.editableform.errorGroupClass=null,o.fn.editableform.errorBlockClass="editable-error",o.fn.editableform.engine="jquery"})(window.jQuery),(l=>{l.fn.editableutils={inherit:function(t,e){function i(){}i.prototype=e.prototype,t.prototype=new i,(t.prototype.constructor=t).superclass=e.prototype},setCursorPosition:function(t,e){t.setSelectionRange?t.setSelectionRange(e,e):t.createTextRange&&((t=t.createTextRange()).collapse(!0),t.moveEnd("character",e),t.moveStart("character",e),t.select())},tryParseJson:function(t,e){if("string"==typeof t&&t.length&&t.match(/^[\{\[].*[\}\]]$/))if(e)try{t=new Function("return "+t)()}catch(t){}finally{return t}else t=new Function("return "+t)();return t},sliceObj:function(t,e,i){var n,s,o={};if(Array.isArray(e)&&e.length)for(var a=0;a<e.length;a++)t.hasOwnProperty(n=e[a])&&(o[n]=t[n]),!0!==i&&(s=n.toLowerCase(),t.hasOwnProperty(s))&&(o[n]=t[s]);return o},getConfigData:function(t){var i={};return l.each(t.data(),function(t,e){"object"==typeof e&&(!e||"object"!=typeof e||e.constructor!==Object&&e.constructor!==Array)||(i[t]=e)}),i},objectKeys:function(t){if(Object.keys)return Object.keys(t);if(t!==Object(t))throw new TypeError("Object.keys called on a non-object");var e,i=[];for(e in t)Object.prototype.hasOwnProperty.call(t,e)&&i.push(e);return i},escape:function(t){return l("<div>").text(t).html()},itemsByValue:function(n,t,s){var e,o,a,r;return t&&null!==n?("function"!=typeof s&&(e=s||"value",s=function(t){return t[e]}),o=Array.isArray(n),a=[],r=this,l.each(t,function(t,e){var i;e.children?a=a.concat(r.itemsByValue(n,e.children,s)):o?l.grep(n,function(t){return t==(e&&"object"==typeof e?s(e):e)}).length&&a.push(e):(i=e&&"object"==typeof e?s(e):e,n==i&&a.push(e))}),a):[]},createInput:function(t){var e,i=t.type;return"date"===i&&("inline"===t.mode?l.fn.editabletypes.datefield?i="datefield":l.fn.editabletypes.dateuifield&&(i="dateuifield"):l.fn.editabletypes.date?i="date":l.fn.editabletypes.dateui&&(i="dateui"),"date"!==i||l.fn.editabletypes.date||(i="combodate")),"wysihtml5"!==(i="datetime"===i&&"inline"===t.mode?"datetimefield":i)||l.fn.editabletypes[i]||(i="textarea"),"function"==typeof l.fn.editabletypes[i]?new(e=l.fn.editabletypes[i])(this.sliceObj(t,this.objectKeys(e.defaults))):(l.error("Unknown type: "+i),!1)},supportsTransitions:function(){var t=(document.body||document.documentElement).style,e=["Moz","Webkit","Khtml","O","ms"];if("string"==typeof t[i="transition"])return!0;for(var i=i.charAt(0).toUpperCase()+i.substr(1),n=0;n<e.length;n++)if("string"==typeof t[e[n]+i])return!0;return!1}}})(window.jQuery),(r=>{function l(t,e){this.init(t,e)}function u(t,e){this.init(t,e)}l.prototype={containerName:null,containerDataName:null,innerCss:null,containerClass:"editable-container editable-popup",defaults:{},init:function(t,e){this.$element=r(t),this.options=r.extend({},r.fn.editableContainer.defaults,e),this.splitOptions(),this.formOptions.scope=this.$element[0],this.initContainer(),this.delayedHide=!1,this.$element.on("destroyed",r.proxy(function(){this.destroy()},this)),r(document).data("editable-handlers-attached")||(r(document).on("keyup.editable",function(t){27===t.which&&r(".editable-open").editableContainer("hide")}),r(document).on("click.editable",function(t){var e,i=r(t.target),n=[".editable-container",".ui-datepicker-header",".datepicker",".modal-backdrop",".bootstrap-wysihtml5-insert-image-modal",".bootstrap-wysihtml5-insert-link-modal"];if(r.contains(document.documentElement,t.target)&&!i.is(document)){for(e=0;e<n.length;e++)if(i.is(n[e])||i.parents(n[e]).length)return;l.prototype.closeOthers(t.target)}}),r(document).data("editable-handlers-attached",!0))},splitOptions:function(){if(this.containerOptions={},this.formOptions={},!r.fn[this.containerName])throw new Error(this.containerName+" not found. Have you included corresponding js file?");for(var t in this.options)t in this.defaults?this.containerOptions[t]=this.options[t]:this.formOptions[t]=this.options[t]},tip:function(){return this.container()?this.container().$tip:null},container:function(){var t;return t=this.containerDataName&&(t=this.$element.data(this.containerDataName))?t:this.$element.data(this.containerName)},call:function(){this.$element[this.containerName].apply(this.$element,arguments)},initContainer:function(){this.call(this.containerOptions)},renderForm:function(){this.$form.editableform(this.formOptions).on({save:r.proxy(this.save,this),nochange:r.proxy(function(){this.hide("nochange")},this),cancel:r.proxy(function(){this.hide("cancel")},this),show:r.proxy(function(){this.delayedHide?(this.hide(this.delayedHide.reason),this.delayedHide=!1):this.setPosition()},this),rendering:r.proxy(this.setPosition,this),resize:r.proxy(this.setPosition,this),rendered:r.proxy(function(){this.$element.triggerHandler("shown",r(this.options.scope).data("editable"))},this)}).editableform("render")},show:function(t){this.$element.addClass("editable-open"),!1!==t&&this.closeOthers(this.$element[0]),this.innerShow(),this.tip().addClass(this.containerClass),this.$form,this.$form=r("<div>"),(this.tip().is(this.innerCss)?this.tip():this.tip().find(this.innerCss)).append(this.$form),this.renderForm()},hide:function(t){this.tip()&&this.tip().is(":visible")&&this.$element.hasClass("editable-open")&&(this.$form.data("editableform").isSaving?this.delayedHide={reason:t}:(this.delayedHide=!1,this.$element.removeClass("editable-open"),this.innerHide(),this.$element.triggerHandler("hidden",t||"manual")))},innerShow:function(){},innerHide:function(){},toggle:function(t){this.container()&&this.tip()&&this.tip().is(":visible")?this.hide():this.show(t)},setPosition:function(){},save:function(t,e){this.$element.triggerHandler("save",e),this.hide("save")},option:function(t,e){this.options[t]=e,t in this.containerOptions?(this.containerOptions[t]=e,this.setContainerOption(t,e)):(this.formOptions[t]=e,this.$form&&this.$form.editableform("option",t,e))},setContainerOption:function(t,e){this.call("option",t,e)},destroy:function(){this.hide(),this.innerDestroy(),this.$element.off("destroyed"),this.$element.removeData("editableContainer")},innerDestroy:function(){},closeOthers:function(n){r(".editable-open").each(function(t,e){var i;e===n||r(e).find(n).length||(i=(e=r(e)).data("editableContainer"))&&("cancel"===i.options.onblur?e.data("editableContainer").hide("onblur"):"submit"===i.options.onblur&&e.data("editableContainer").tip().find("form").submit())})},activate:function(){this.tip&&this.tip().is(":visible")&&this.$form&&this.$form.data("editableform").input.activate()}},r.fn.editableContainer=function(o){var a=arguments;return this.each(function(){var t=r(this),e="editableContainer",i=t.data(e),n="object"==typeof o&&o,s="inline"===n.mode?u:l;i||t.data(e,i=new s(this,n)),"string"==typeof o&&i[o].apply(i,Array.prototype.slice.call(a,1))})},r.fn.editableContainer.Popup=l,r.fn.editableContainer.Inline=u,r.fn.editableContainer.defaults={value:null,placement:"top",autohide:!0,onblur:"cancel",anim:!1,mode:"popup"},jQuery.event.special.destroyed={remove:function(t){t.handler&&t.handler()}}})(window.jQuery),(t=>{t.extend(t.fn.editableContainer.Inline.prototype,t.fn.editableContainer.Popup.prototype,{containerName:"editableform",innerCss:".editable-inline",containerClass:"editable-container editable-inline",initContainer:function(){this.$tip=t("<span></span>"),this.options.anim||(this.options.anim=0)},splitOptions:function(){this.containerOptions={},this.formOptions=this.options},tip:function(){return this.$tip},innerShow:function(){this.$element.hide(),this.tip().insertAfter(this.$element).show()},innerHide:function(){this.$tip.hide(this.options.anim,t.proxy(function(){this.$element.show(),this.innerDestroy()},this))},innerDestroy:function(){this.tip()&&this.tip().empty().remove()}})})(window.jQuery),(h=>{function p(t,e){this.$element=h(t),this.options=h.extend({},h.fn.editable.defaults,e,h.fn.editableutils.getConfigData(this.$element)),this.options.selector?this.initLive():this.init(),this.options.highlight&&!h.fn.editableutils.supportsTransitions()&&(this.options.highlight=!1)}p.prototype={constructor:p,init:function(){var t,e=!1;if(this.options.name=this.options.name||this.$element.attr("id"),this.options.scope=this.$element[0],this.input=h.fn.editableutils.createInput(this.options),this.input){switch(null==this.options.value?(this.value=this.input.html2value(h.trim(this.$element.html())),e=!0):(this.options.value=h.fn.editableutils.tryParseJson(this.options.value,!0),"string"==typeof this.options.value?this.value=this.input.str2value(this.options.value):this.value=this.options.value),this.$element.addClass("editable"),"textarea"===this.input.type&&this.$element.addClass("editable-pre-wrapped"),"manual"!==this.options.toggle?(this.$element.addClass("editable-click"),this.$element.on(this.options.toggle+".editable",h.proxy(function(t){this.options.disabled||t.preventDefault(),"mouseenter"===this.options.toggle?this.show():(t="click"!==this.options.toggle,this.toggle(t))},this))):this.$element.attr("tabindex",-1),"function"==typeof this.options.display&&(this.options.autotext="always"),this.options.autotext){case"always":t=!0;break;case"auto":t=!h.trim(this.$element.text()).length&&null!=this.value&&!e;break;default:t=!1}h.when(!t||this.render()).then(h.proxy(function(){this.options.disabled?this.disable():this.enable(),this.$element.triggerHandler("init",this)},this))}},initLive:function(){var t=this.options.selector;this.options.selector=!1,this.options.autotext="never",this.$element.on(this.options.toggle+".editable",t,h.proxy(function(t){var e=h(t.target);e.data("editable")||(e.hasClass(this.options.emptyclass)&&e.empty(),e.editable(this.options).trigger(t))},this))},render:function(t){if(!1!==this.options.display)return this.input.value2htmlFinal?this.input.value2html(this.value,this.$element[0],this.options.display,t):"function"==typeof this.options.display?this.options.display.call(this.$element[0],this.value,t):this.input.value2html(this.value,this.$element[0])},enable:function(){this.options.disabled=!1,this.$element.removeClass("editable-disabled"),this.handleEmpty(this.isEmpty),"manual"!==this.options.toggle&&"-1"===this.$element.attr("tabindex")&&this.$element.removeAttr("tabindex")},disable:function(){this.options.disabled=!0,this.hide(),this.$element.addClass("editable-disabled"),this.handleEmpty(this.isEmpty),this.$element.attr("tabindex",-1)},toggleDisabled:function(){this.options.disabled?this.enable():this.disable()},option:function(t,e){if(t&&"object"==typeof t)h.each(t,h.proxy(function(t,e){this.option(h.trim(t),e)},this));else{if(this.options[t]=e,"disabled"===t)return e?this.disable():this.enable();"value"===t&&this.setValue(e),this.container&&this.container.option(t,e),this.input.option&&this.input.option(t,e)}},handleEmpty:function(t){!1!==this.options.display&&(void 0!==t?this.isEmpty=t:"function"==typeof this.input.isEmpty?this.isEmpty=this.input.isEmpty(this.$element):this.isEmpty=""===h.trim(this.$element.html()),this.options.disabled?this.isEmpty&&(this.$element.empty(),this.options.emptyclass)&&this.$element.removeClass(this.options.emptyclass):this.isEmpty?(this.$element.html(this.options.emptytext),this.options.emptyclass&&this.$element.addClass(this.options.emptyclass)):this.options.emptyclass&&this.$element.removeClass(this.options.emptyclass))},show:function(t){if(!this.options.disabled){if(this.container){if(this.container.tip().is(":visible"))return}else{var e=h.extend({},this.options,{value:this.value,input:this.input});this.$element.editableContainer(e),this.$element.on("save.internal",h.proxy(this.save,this)),this.container=this.$element.data("editableContainer")}this.container.show(t)}},hide:function(){this.container&&this.container.hide()},toggle:function(t){this.container&&this.container.tip().is(":visible")?this.hide():this.show(t)},save:function(t,e){var i,n;this.options.unsavedclass&&("function"==typeof this.options.url||!1===this.options.display||void 0!==e.response||this.options.savenochange&&this.input.value2str(this.value)!==this.input.value2str(e.newValue)?this.$element.removeClass(this.options.unsavedclass):this.$element.addClass(this.options.unsavedclass)),this.options.highlight&&(i=this.$element,n=i.css("background-color"),i.css("background-color",this.options.highlight),setTimeout(function(){"transparent"===n&&(n=""),i.css("background-color",n),i.addClass("editable-bg-transition"),setTimeout(function(){i.removeClass("editable-bg-transition")},1700)},10)),this.setValue(e.newValue,!1,e.response)},validate:function(){if("function"==typeof this.options.validate)return this.options.validate.call(this,this.value)},setValue:function(t,e,i){this.value=e?this.input.str2value(t):t,this.container&&this.container.option("value",this.value),h.when(this.render(i)).then(h.proxy(function(){this.handleEmpty()},this))},activate:function(){this.container&&this.container.activate()},destroy:function(){this.disable(),this.container&&this.container.destroy(),this.input.destroy(),"manual"!==this.options.toggle&&(this.$element.removeClass("editable-click"),this.$element.off(this.options.toggle+".editable")),this.$element.off("save.internal"),this.$element.removeClass("editable editable-open editable-disabled"),this.$element.removeData("editable")}},h.fn.editable=function(n){var i={},s=arguments,o="editable";switch(n){case"validate":return this.each(function(){var t,e=h(this).data(o);e&&(t=e.validate())&&(i[e.options.name]=t)}),i;case"getValue":return 2===arguments.length&&!0===arguments[1]?i=this.eq(0).data(o).value:this.each(function(){var t=h(this).data(o);t&&null!=t.value&&(i[t.options.name]=t.input.value2submit(t.value))}),i;case"submit":var t,e,a,r=arguments[1]||{},l=this,u=this.editable("validate");return h.isEmptyObject(u)?(a={},1===l.length?(e={name:(t=l.data("editable")).options.name||"",value:t.input.value2submit(t.value),pk:"function"==typeof t.options.pk?t.options.pk.call(t.options.scope):t.options.pk},"function"==typeof t.options.params?e=t.options.params.call(t.options.scope,e):(t.options.params=h.fn.editableutils.tryParseJson(t.options.params,!0),h.extend(e,t.options.params)),a={url:t.options.url,data:e,type:"POST"},r.success=r.success||t.options.success,r.error=r.error||t.options.error):(e=this.editable("getValue"),a={url:r.url,data:e,type:"POST"}),a.success="function"==typeof r.success?function(t){r.success.call(l,t,r)}:h.noop,a.error="function"==typeof r.error?function(){r.error.apply(l,arguments)}:h.noop,r.ajaxOptions&&h.extend(a,r.ajaxOptions),r.data&&h.extend(a.data,r.data),h.ajax(a)):"function"==typeof r.error&&r.error.call(l,u),this}return this.each(function(){var t=h(this),e=t.data(o),i="object"==typeof n&&n;i&&i.selector?e=new p(this,i):(e||t.data(o,e=new p(this,i)),"string"==typeof n&&e[n].apply(e,Array.prototype.slice.call(s,1)))})},h.fn.editable.defaults={type:"text",disabled:!1,toggle:"click",emptytext:"Empty",autotext:"auto",value:null,display:null,emptyclass:"editable-empty",unsavedclass:"editable-unsaved",selector:null,highlight:"#FFFF80"}})(window.jQuery),(n=>{function t(){}n.fn.editabletypes={},t.prototype={init:function(t,e,i){this.type=t,this.options=n.extend({},i,e)},prerender:function(){this.$tpl=n(this.options.tpl),this.$input=this.$tpl,this.$clear=null,this.error=null},render:function(){},value2html:function(t,e){n(e)[this.options.escape?"text":"html"](n.trim(t))},html2value:function(t){return n("<div>").html(t).text()},value2str:function(t){return t},str2value:function(t){return t},value2submit:function(t){return t},value2input:function(t){this.$input.val(t)},input2value:function(){return this.$input.val()},activate:function(){this.$input.is(":visible")&&this.$input.focus()},clear:function(){this.$input.val(null)},escape:function(t){return n("<div>").text(t).html()},autosubmit:function(){},destroy:function(){},setClass:function(){this.options.inputclass&&this.$input.addClass(this.options.inputclass)},setAttr:function(t){null!=this.options[t]&&this.$input.attr(t,this.options[t])},option:function(t,e){this.options[t]=e}},t.defaults={tpl:"",inputclass:null,escape:!0,scope:null,showbuttons:!0},n.extend(n.fn.editabletypes,{abstractinput:t})})(window.jQuery),(r=>{function t(t){}r.fn.editableutils.inherit(t,r.fn.editabletypes.abstractinput),r.extend(t.prototype,{render:function(){var t=r.Deferred();return this.error=null,this.onSourceReady(function(){this.renderList(),t.resolve()},function(){this.error=this.options.sourceError,t.resolve()}),t.promise()},html2value:function(t){return null},value2html:function(t,e,i,n){function s(){"function"==typeof i?i.call(e,t,this.sourceData,n):this.value2htmlFinal(t,e),o.resolve()}var o=r.Deferred();return null===t?s.call(this):this.onSourceReady(s,function(){o.resolve()}),o.promise()},onSourceReady:function(e,i){var t;if("function"==typeof this.options.source?(t=this.options.source.call(this.options.scope),this.sourceData=null):t=this.options.source,this.options.sourceCache&&Array.isArray(this.sourceData))e.call(this);else{try{t=r.fn.editableutils.tryParseJson(t,!1)}catch(t){return void i.call(this)}if("string"==typeof t){if(this.options.sourceCache){var n,s=t;if(r(document).data(s)||r(document).data(s,{}),!1===(n=r(document).data(s)).loading&&n.sourceData)return this.sourceData=n.sourceData,this.doPrepend(),void e.call(this);if(!0===n.loading)return n.callbacks.push(r.proxy(function(){this.sourceData=n.sourceData,this.doPrepend(),e.call(this)},this)),void n.err_callbacks.push(r.proxy(i,this));n.loading=!0,n.callbacks=[],n.err_callbacks=[]}s=r.extend({url:t,type:"get",cache:!1,dataType:"json",success:r.proxy(function(t){n&&(n.loading=!1),this.sourceData=this.makeArray(t),Array.isArray(this.sourceData)?(n&&(n.sourceData=this.sourceData,r.each(n.callbacks,function(){this.call()})),this.doPrepend(),e.call(this)):(i.call(this),n&&r.each(n.err_callbacks,function(){this.call()}))},this),error:r.proxy(function(){i.call(this),n&&(n.loading=!1,r.each(n.err_callbacks,function(){this.call()}))},this)},this.options.sourceOptions);r.ajax(s)}else this.sourceData=this.makeArray(t),(Array.isArray(this.sourceData)?(this.doPrepend(),e):i).call(this)}},doPrepend:function(){null!=this.options.prepend&&(Array.isArray(this.prependData)||("function"==typeof this.options.prepend&&(this.options.prepend=this.options.prepend.call(this.options.scope)),this.options.prepend=r.fn.editableutils.tryParseJson(this.options.prepend,!0),"string"==typeof this.options.prepend&&(this.options.prepend={"":this.options.prepend}),this.prependData=this.makeArray(this.options.prepend)),Array.isArray(this.prependData))&&Array.isArray(this.sourceData)&&(this.sourceData=this.prependData.concat(this.sourceData))},renderList:function(){},value2htmlFinal:function(t,e){},makeArray:function(t){var i,n,e,s=[];if(!t||"string"==typeof t)return null;if(Array.isArray(t))for(var o=function(t,e){if(n={value:t,text:e},2<=i++)return!1},a=0;a<t.length;a++)"object"==typeof(e=t[a])?(i=0,r.each(e,o),1===i?s.push(n):1<i&&(e.children&&(e.children=this.makeArray(e.children)),s.push(e))):s.push({value:e,text:e});else r.each(t,function(t,e){s.push({value:t,text:e})});return s},option:function(t,e){this.options[t]=e,"source"===t&&(this.sourceData=null),"prepend"===t&&(this.prependData=null)}}),t.defaults=r.extend({},r.fn.editabletypes.abstractinput.defaults,{source:null,prepend:!1,sourceError:"Error when loading list",sourceCache:!0,sourceOptions:null}),r.fn.editabletypes.list=t})(window.jQuery),(i=>{function e(t){this.init("text",t,e.defaults)}i.fn.editableutils.inherit(e,i.fn.editabletypes.abstractinput),i.extend(e.prototype,{render:function(){this.renderClear(),this.setClass(),this.setAttr("placeholder")},activate:function(){this.$input.is(":visible")&&(this.$input.focus(),i.fn.editableutils.setCursorPosition(this.$input.get(0),this.$input.val().length),this.toggleClear)&&this.toggleClear()},renderClear:function(){this.options.clear&&(this.$clear=i('<span class="editable-clear-x"></span>'),this.$input.after(this.$clear).css("padding-right",24).keyup(i.proxy(function(t){var e;~i.inArray(t.keyCode,[40,38,9,13,27])||(clearTimeout(this.t),(e=this).t=setTimeout(function(){e.toggleClear(t)},100))},this)).parent().css("position","relative"),this.$clear.click(i.proxy(this.clear,this)))},postrender:function(){},toggleClear:function(t){var e,i;this.$clear&&(e=this.$input.val().length,i=this.$clear.is(":visible"),e&&!i&&this.$clear.show(),!e)&&i&&this.$clear.hide()},clear:function(){this.$clear.hide(),this.$input.val("").focus()}}),e.defaults=i.extend({},i.fn.editabletypes.abstractinput.defaults,{tpl:'<input type="text">',placeholder:null,clear:!0}),i.fn.editabletypes.text=e})(window.jQuery),(e=>{function i(t){this.init("textarea",t,i.defaults)}e.fn.editableutils.inherit(i,e.fn.editabletypes.abstractinput),e.extend(i.prototype,{render:function(){this.setClass(),this.setAttr("placeholder"),this.setAttr("rows"),this.$input.keydown(function(t){t.ctrlKey&&13===t.which&&e(this).closest("form").submit()})},activate:function(){e.fn.editabletypes.text.prototype.activate.call(this)}}),i.defaults=e.extend({},e.fn.editabletypes.abstractinput.defaults,{tpl:"<textarea></textarea>",inputclass:"input-large",placeholder:null,rows:7}),e.fn.editabletypes.textarea=i})(window.jQuery),(o=>{function e(t){this.init("select",t,e.defaults)}o.fn.editableutils.inherit(e,o.fn.editabletypes.list),o.extend(e.prototype,{renderList:function(){this.$input.empty();var s=function(t,e){var i;if(Array.isArray(e))for(var n=0;n<e.length;n++)i={},e[n].children?(i.label=e[n].text,t.append(s(o("<optgroup>",i),e[n].children))):(i.value=e[n].value,e[n].disabled&&(i.disabled=!0),t.append(o("<option>",i).text(e[n].text)));return t};s(this.$input,this.sourceData),this.setClass(),this.$input.on("keydown.editable",function(t){13===t.which&&o(this).closest("form").submit()})},value2htmlFinal:function(t,e){var i="",t=o.fn.editableutils.itemsByValue(t,this.sourceData);t.length&&(i=t[0].text),o.fn.editabletypes.abstractinput.prototype.value2html.call(this,i,e)},autosubmit:function(){this.$input.off("keydown.editable").on("change.editable",function(){o(this).closest("form").submit()})}}),e.defaults=o.extend({},o.fn.editabletypes.list.defaults,{tpl:"<select></select>"}),o.fn.editabletypes.select=e})(window.jQuery),(s=>{function e(t){this.init("checklist",t,e.defaults)}s.fn.editableutils.inherit(e,s.fn.editabletypes.list),s.extend(e.prototype,{renderList:function(){var t;if(this.$tpl.empty(),Array.isArray(this.sourceData)){for(var e=0;e<this.sourceData.length;e++)t=s("<label>").append(s("<input>",{type:"checkbox",value:this.sourceData[e].value})).append(s("<span>").text(" "+this.sourceData[e].text)),s("<div>").append(t).appendTo(this.$tpl);this.$input=this.$tpl.find('input[type="checkbox"]'),this.setClass()}},value2str:function(t){return Array.isArray(t)?t.sort().join(this.options.separator.trim()):""},str2value:function(t){var e;return"string"==typeof t&&t.length?(e=new RegExp("\\s*"+s.trim(this.options.separator)+"\\s*"),t.split(e)):Array.isArray(t)?t:[t]},value2input:function(n){this.$input.prop("checked",!1),Array.isArray(n)&&n.length&&this.$input.each(function(t,e){var i=s(e);s.each(n,function(t,e){i.val()==e&&i.prop("checked",!0)})})},input2value:function(){var i=[];return this.$input.filter(":checked").each(function(t,e){i.push(s(e).val())}),i},value2htmlFinal:function(t,e){var i=[],t=s.fn.editableutils.itemsByValue(t,this.sourceData),n=this.options.escape;t.length?(s.each(t,function(t,e){e=n?s.fn.editableutils.escape(e.text):e.text;i.push(e)}),s(e).html(i.join("<br>"))):s(e).empty()},activate:function(){this.$input.first().focus()},autosubmit:function(){this.$input.on("keydown",function(t){13===t.which&&s(this).closest("form").submit()})}}),e.defaults=s.extend({},s.fn.editabletypes.list.defaults,{tpl:'<div class="editable-checklist"></div>',inputclass:null,separator:","}),s.fn.editabletypes.checklist=e})(window.jQuery),(i=>{function e(t){this.init("password",t,e.defaults)}i.fn.editableutils.inherit(e,i.fn.editabletypes.text),i.extend(e.prototype,{value2html:function(t,e){t?i(e).text("[hidden]"):i(e).empty()},html2value:function(t){return null}}),e.defaults=i.extend({},i.fn.editabletypes.text.defaults,{tpl:'<input type="password">'}),i.fn.editabletypes.password=e})(window.jQuery),(t=>{function e(t){this.init("email",t,e.defaults)}t.fn.editableutils.inherit(e,t.fn.editabletypes.text),e.defaults=t.extend({},t.fn.editabletypes.text.defaults,{tpl:'<input type="email">'}),t.fn.editabletypes.email=e})(window.jQuery),(t=>{function e(t){this.init("url",t,e.defaults)}t.fn.editableutils.inherit(e,t.fn.editabletypes.text),e.defaults=t.extend({},t.fn.editabletypes.text.defaults,{tpl:'<input type="url">'}),t.fn.editabletypes.url=e})(window.jQuery),(t=>{function e(t){this.init("tel",t,e.defaults)}t.fn.editableutils.inherit(e,t.fn.editabletypes.text),e.defaults=t.extend({},t.fn.editabletypes.text.defaults,{tpl:'<input type="tel">'}),t.fn.editabletypes.tel=e})(window.jQuery),(t=>{function e(t){this.init("number",t,e.defaults)}t.fn.editableutils.inherit(e,t.fn.editabletypes.text),t.extend(e.prototype,{render:function(){e.superclass.render.call(this),this.setAttr("min"),this.setAttr("max"),this.setAttr("step")},postrender:function(){this.$clear&&this.$clear.css({right:24})}}),e.defaults=t.extend({},t.fn.editabletypes.text.defaults,{tpl:'<input type="number">',inputclass:"input-mini",min:null,max:null,step:null}),t.fn.editabletypes.number=e})(window.jQuery),(t=>{function e(t){this.init("range",t,e.defaults)}t.fn.editableutils.inherit(e,t.fn.editabletypes.number),t.extend(e.prototype,{render:function(){this.$input=this.$tpl.filter("input"),this.setClass(),this.setAttr("min"),this.setAttr("max"),this.setAttr("step"),this.$input.on("input",function(){t(this).siblings("output").text(t(this).val())})},activate:function(){this.$input.focus()}}),e.defaults=t.extend({},t.fn.editabletypes.number.defaults,{tpl:'<input type="range"><output style="width: 30px; display: inline-block"></output>',inputclass:"input-medium"}),t.fn.editabletypes.range=e})(window.jQuery),(t=>{function e(t){this.init("time",t,e.defaults)}t.fn.editableutils.inherit(e,t.fn.editabletypes.abstractinput),t.extend(e.prototype,{render:function(){this.setClass()}}),e.defaults=t.extend({},t.fn.editabletypes.abstractinput.defaults,{tpl:'<input type="time">'}),t.fn.editabletypes.time=e})(window.jQuery),(o=>{function a(t){var e,i;this.init("select2",t,a.defaults),t.select2=t.select2||{},this.sourceData=null,t.placeholder&&(t.select2.placeholder=t.placeholder),!t.select2.tags&&t.source&&(e=t.source,"string"==typeof(e="function"==typeof t.source?t.source.call(t.scope):e)?(t.select2.ajax=t.select2.ajax||{},t.select2.ajax.data||(t.select2.ajax.data=function(t){return{query:t}}),t.select2.ajax.results||(t.select2.ajax.results=function(t){return{results:t}}),t.select2.ajax.url=e):(this.sourceData=this.convertSource(e),t.select2.data=this.sourceData)),this.options.select2=o.extend({},a.defaults.select2,t.select2),this.isMultiple=this.options.select2.tags||this.options.select2.multiple,this.isRemote="ajax"in this.options.select2,this.idFunc=this.options.select2.id,"function"!=typeof this.idFunc&&(i=this.idFunc||"id",this.idFunc=function(t){return t[i]}),this.formatSelection=this.options.select2.formatSelection,"function"!=typeof this.formatSelection&&(this.formatSelection=function(t){return t.text})}o.fn.editableutils.inherit(a,o.fn.editabletypes.abstractinput),o.extend(a.prototype,{render:function(){this.setClass(),this.isRemote&&this.$input.on("select2-loaded",o.proxy(function(t){this.sourceData=t.items.results},this)),this.isMultiple&&this.$input.on("change",function(){o(this).closest("form").parent().triggerHandler("resize")})},value2html:function(t,e){var i,n="",s=this;this.options.select2.tags?i=t:this.sourceData&&(i=o.fn.editableutils.itemsByValue(t,this.sourceData,this.idFunc)),Array.isArray(i)?(n=[],o.each(i,function(t,e){n.push(e&&"object"==typeof e?s.formatSelection(e):e)})):i&&(n=s.formatSelection(i)),n=Array.isArray(n)?n.join(this.options.viewseparator):n,a.superclass.value2html.call(this,n,e)},html2value:function(t){return this.options.select2.tags?this.str2value(t,this.options.viewseparator):null},value2input:function(t){var e,i;Array.isArray(t)&&(t=t.join(this.getSeparator())),this.$input.data("select2")?this.$input.val(t).trigger("change",!0):(this.$input.val(t),this.$input.select2(this.options.select2)),!this.isRemote||this.isMultiple||this.options.select2.initSelection||(e=this.options.select2.id,i=this.options.select2.formatSelection,e)||i||(e=o(this.options.scope)).data("editable").isEmpty||(i={id:t,text:e.text()},this.$input.select2("data",i))},input2value:function(){return this.$input.select2("val")},str2value:function(t,e){if("string"!=typeof t||!this.isMultiple)return t;var i,n,s;if(e=e||this.getSeparator(),null===t||t.length<1)return null;for(n=0,s=(i=t.split(e)).length;n<s;n+=1)i[n]=o.trim(i[n]);return i},autosubmit:function(){this.$input.on("change",function(t,e){e||o(this).closest("form").submit()})},getSeparator:function(){return this.options.select2.separator||o.fn.select2.defaults.separator},convertSource:function(t){if(Array.isArray(t)&&t.length&&void 0!==t[0].value)for(var e=0;e<t.length;e++)void 0!==t[e].value&&(t[e].id=t[e].value,delete t[e].value);return t},destroy:function(){this.$input&&this.$input.data("select2")&&this.$input.select2("destroy")}}),a.defaults=o.extend({},o.fn.editabletypes.abstractinput.defaults,{tpl:'<input type="hidden">',select2:null,placeholder:null,source:null,viewseparator:", "}),o.fn.editabletypes.select2=a})(window.jQuery),(a=>{function s(t,e){this.$element=a(t),this.$element.is("input")?(this.options=a.extend({},a.fn.combodate.defaults,e,this.$element.data()),this.init()):a.error("Combodate should be applied to INPUT element")}s.prototype={constructor:s,init:function(){this.map={day:["D","date"],month:["M","month"],year:["Y","year"],hour:["[Hh]","hours"],minute:["m","minutes"],second:["s","seconds"],ampm:["[Aa]",""]},this.$widget=a('<span class="combodate"></span>').html(this.getTemplate()),this.initCombos(),this.$widget.on("change","select",a.proxy(function(t){this.$element.val(this.getValue()).change(),this.options.smartDays&&(a(t.target).is(".month")||a(t.target).is(".year"))&&this.fillCombo("day")},this)),this.$widget.find("select").css("width","auto"),this.$element.hide().after(this.$widget),this.setValue(this.$element.val()||this.options.value)},getTemplate:function(){var n=this.options.template;return a.each(this.map,function(t,e){e=e[0];var i=new RegExp(e+"+"),e=1<e.length?e.substring(1,2):e;n=n.replace(i,"{"+e+"}")}),n=n.replace(/ /g,"&nbsp;"),a.each(this.map,function(t,e){e=1<(e=e[0]).length?e.substring(1,2):e;n=n.replace("{"+e+"}",'<select class="'+t+'"></select>')}),n},initCombos:function(){for(var t in this.map){var e=this.$widget.find("."+t);this["$"+t]=e.length?e:null,this.fillCombo(t)}},fillCombo:function(t){var e=this["$"+t];if(e){var i=this["fill"+t.charAt(0).toUpperCase()+t.slice(1)](),t=e.val();e.empty();for(var n=0;n<i.length;n++)e.append('<option value="'+i[n][0]+'">'+i[n][1]+"</option>");e.val(t)}},fillCommon:function(t){var e,i=[];return"name"===this.options.firstItem?(e=(e="function"==typeof(e=moment.relativeTime||moment.langData()._relativeTime)[t]?e[t](1,!0,t,!1):e[t]).split(" ").reverse()[0],i.push(["",e])):"empty"===this.options.firstItem&&i.push(["",""]),i},fillDay:function(){var t,e,i,n,s=this.fillCommon("d"),o=-1!==this.options.template.indexOf("DD"),a=31;for(this.options.smartDays&&this.$month&&this.$year&&(i=parseInt(this.$month.val(),10),n=parseInt(this.$year.val(),10),isNaN(i)||isNaN(n)||(a=moment([n,i]).daysInMonth())),e=1;e<=a;e++)t=o?this.leadZero(e):e,s.push([e,t]);return s},fillMonth:function(){for(var t,e=this.fillCommon("M"),i=-1!==this.options.template.indexOf("MMMM"),n=-1!==this.options.template.indexOf("MMM"),s=-1!==this.options.template.indexOf("MM"),o=0;o<=11;o++)t=i?moment().date(1).month(o).format("MMMM"):n?moment().date(1).month(o).format("MMM"):s?this.leadZero(o+1):o+1,e.push([o,t]);return e},fillYear:function(){for(var t,e=[],i=-1!==this.options.template.indexOf("YYYY"),n=this.options.maxYear;n>=this.options.minYear;n--)t=i?n:(n+"").substring(2),e[this.options.yearDescending?"push":"unshift"]([n,t]);return e=this.fillCommon("y").concat(e)},fillHour:function(){for(var t,e=this.fillCommon("h"),i=-1!==this.options.template.indexOf("h"),n=(this.options.template.indexOf("H"),-1!==this.options.template.toLowerCase().indexOf("hh")),s=i?12:23,o=i?1:0;o<=s;o++)t=n?this.leadZero(o):o,e.push([o,t]);return e},fillMinute:function(){for(var t,e=this.fillCommon("m"),i=-1!==this.options.template.indexOf("mm"),n=0;n<=59;n+=this.options.minuteStep)t=i?this.leadZero(n):n,e.push([n,t]);return e},fillSecond:function(){for(var t,e=this.fillCommon("s"),i=-1!==this.options.template.indexOf("ss"),n=0;n<=59;n+=this.options.secondStep)t=i?this.leadZero(n):n,e.push([n,t]);return e},fillAmpm:function(){var t=-1!==this.options.template.indexOf("a");this.options.template.indexOf("A");return[["am",t?"am":"AM"],["pm",t?"pm":"PM"]]},getValue:function(t){var e,n={},s=this,o=!1;return a.each(this.map,function(t,e){var i;if("ampm"!==t)return i="day"===t?1:0,n[t]=s["$"+t]?parseInt(s["$"+t].val(),10):i,isNaN(n[t])?!(o=!0):void 0}),o?"":(this.$ampm&&(n.hour=12===n.hour?"am"===this.$ampm.val()?0:12:"am"===this.$ampm.val()?n.hour:n.hour+12),e=moment([n.year,n.month,n.day,n.hour,n.minute,n.second]),this.highlight(e),null===(t=void 0===t?this.options.format:t)?e.isValid()?e:null:e.isValid()?e.format(t):"")},setValue:function(t){var i,n,s;function o(t,n){var s={};return t.children("option").each(function(t,e){var i,e=a(e).attr("value");""!==e&&(i=Math.abs(e-n),void 0===s.distance||i<s.distance)&&(s={value:e,distance:i})}),s.value}t&&(i="string"==typeof t?moment(t,this.options.format):moment(t),n=this,s={},i.isValid())&&(a.each(this.map,function(t,e){"ampm"!==t&&(s[t]=i[e[1]]())}),this.$ampm&&(12<=s.hour?(s.ampm="pm",12<s.hour&&(s.hour-=12)):(s.ampm="am",0===s.hour&&(s.hour=12))),a.each(s,function(t,e){n["$"+t]&&("minute"===t&&1<n.options.minuteStep&&n.options.roundTime&&(e=o(n["$"+t],e)),"second"===t&&1<n.options.secondStep&&n.options.roundTime&&(e=o(n["$"+t],e)),n["$"+t].val(e))}),this.options.smartDays&&this.fillCombo("day"),this.$element.val(i.format(this.options.format)).change())},highlight:function(t){t.isValid()?this.options.errorClass?this.$widget.removeClass(this.options.errorClass):this.$widget.find("select").css("border-color",this.borderColor):this.options.errorClass?this.$widget.addClass(this.options.errorClass):(this.borderColor||(this.borderColor=this.$widget.find("select").css("border-color")),this.$widget.find("select").css("border-color","red"))},leadZero:function(t){return t<=9?"0"+t:t},destroy:function(){this.$widget.remove(),this.$element.removeData("combodate").show()}},a.fn.combodate=function(i){var t,n=Array.apply(null,arguments);return n.shift(),"getValue"===i&&this.length&&(t=this.eq(0).data("combodate"))?t.getValue.apply(t,n):this.each(function(){var t=a(this),e=t.data("combodate");e||t.data("combodate",e=new s(this,"object"==typeof i&&i)),"string"==typeof i&&"function"==typeof e[i]&&e[i].apply(e,n)})},a.fn.combodate.defaults={format:"DD-MM-YYYY HH:mm",template:"D / MMM / YYYY   H : mm",value:null,minYear:1970,maxYear:(new Date).getFullYear(),yearDescending:!0,minuteStep:5,secondStep:1,firstItem:"empty",errorClass:null,roundTime:!0,smartDays:!1}})(window.jQuery),(e=>{function i(t){this.init("combodate",t,i.defaults),this.options.viewformat||(this.options.viewformat=this.options.format),t.combodate=e.fn.editableutils.tryParseJson(t.combodate,!0),this.options.combodate=e.extend({},i.defaults.combodate,t.combodate,{format:this.options.format,template:this.options.template})}e.fn.editableutils.inherit(i,e.fn.editabletypes.abstractinput),e.extend(i.prototype,{render:function(){this.$input.combodate(this.options.combodate),"bs3"===e.fn.editableform.engine&&this.$input.siblings().find("select").addClass("form-control"),this.options.inputclass&&this.$input.siblings().find("select").addClass(this.options.inputclass)},value2html:function(t,e){t=t?t.format(this.options.viewformat):"";i.superclass.value2html.call(this,t,e)},html2value:function(t){return t?moment(t,this.options.viewformat):null},value2str:function(t){return t?t.format(this.options.format):""},str2value:function(t){return t?moment(t,this.options.format):null},value2submit:function(t){return this.value2str(t)},value2input:function(t){this.$input.combodate("setValue",t)},input2value:function(){return this.$input.combodate("getValue",null)},activate:function(){this.$input.siblings(".combodate").find("select").eq(0).focus()},autosubmit:function(){}}),i.defaults=e.extend({},e.fn.editabletypes.abstractinput.defaults,{tpl:'<input type="text">',inputclass:null,format:"YYYY-MM-DD",viewformat:null,template:"D / MMM / YYYY",combodate:null}),e.fn.editabletypes.combodate=i})(window.jQuery),(e=>{e.extend(e.fn.editableform.Constructor.prototype,{initButtons:function(){var t=this.$form.find(".editable-buttons");t.append(e.fn.editableform.buttons),"bottom"===this.options.showbuttons&&t.addClass("editable-buttons-bottom"),this.$form.find(".editable-submit").button({icons:{primary:"ui-icon-check"},text:!1}).removeAttr("title"),this.$form.find(".editable-cancel").button({icons:{primary:"ui-icon-closethick"},text:!1}).removeAttr("title")}}),e.fn.editableform.errorGroupClass=null,e.fn.editableform.errorBlockClass="ui-state-error",e.fn.editableform.engine="jquery-ui"})(window.jQuery),(e=>{e.extend(e.fn.editableContainer.Popup.prototype,{containerName:"tooltip",containerDataName:"ui-tooltip",innerCss:".ui-tooltip-content",defaults:e.ui.tooltip.prototype.options,splitOptions:function(){if(this.containerOptions={},this.formOptions={},e.ui[this.containerName])for(var t in this.options)t in this.defaults?this.containerOptions[t]=this.options[t]:this.formOptions[t]=this.options[t];else e.error('Please use jQueryUI with "tooltip" widget! http://jqueryui.com/download')},initContainer:function(){this.handlePlacement(),e.extend(this.containerOptions,{items:"*",content:" ",track:!1,open:e.proxy(function(){this.container()._on(this.container().element,{mouseleave:function(t){t.stopImmediatePropagation()},focusout:function(t){t.stopImmediatePropagation()}})},this)}),this.call(this.containerOptions),this.container()._off(this.container().element,"mouseover focusin")},tip:function(){return this.container()?this.container()._find(this.container().element):null},innerShow:function(){this.call("open");var t=this.options.title||this.$element.data("ui-tooltip-title")||this.$element.data("originalTitle");this.tip().find(this.innerCss).empty().append(e("<label>").text(t))},innerHide:function(){this.call("close")},innerDestroy:function(){},setPosition:function(){this.tip().position(e.extend({of:this.$element},this.containerOptions.position))},handlePlacement:function(){var t;switch(this.options.placement){case"top":t={my:"center bottom-5",at:"center top",collision:"flipfit"};break;case"right":t={my:"left+5 center",at:"right center",collision:"flipfit"};break;case"bottom":t={my:"center top+5",at:"center bottom",collision:"flipfit"};break;case"left":t={my:"right-5 center",at:"left center",collision:"flipfit"}}this.containerOptions.position=t}})})(window.jQuery),(i=>{function n(t){this.init("dateui",t,n.defaults),this.initPicker(t,n.defaults)}i.fn.editableutils.inherit(n,i.fn.editabletypes.abstractinput),i.extend(n.prototype,{initPicker:function(t,e){this.options.viewformat||(this.options.viewformat=this.options.format),this.options.viewformat=this.options.viewformat.replace("yyyy","yy"),this.options.format=this.options.format.replace("yyyy","yy"),this.options.datepicker=i.extend({},e.datepicker,t.datepicker,{dateFormat:this.options.viewformat})},render:function(){this.$input.datepicker(this.options.datepicker),this.options.clear&&(this.$clear=i('<a href="#"></a>').html(this.options.clear).click(i.proxy(function(t){t.preventDefault(),t.stopPropagation(),this.clear()},this)),this.$tpl.parent().append(i('<div class="editable-clear">').append(this.$clear)))},value2html:function(t,e){t=i.datepicker.formatDate(this.options.viewformat,t);n.superclass.value2html.call(this,t,e)},html2value:function(t){if("string"!=typeof t)return t;var e;try{e=i.datepicker.parseDate(this.options.viewformat,t)}catch(t){}return e},value2str:function(t){return i.datepicker.formatDate(this.options.format,t)},str2value:function(t){if("string"!=typeof t)return t;var e;try{e=i.datepicker.parseDate(this.options.format,t)}catch(t){}return e},value2submit:function(t){return this.value2str(t)},value2input:function(t){this.$input.datepicker("setDate",t)},input2value:function(){return this.$input.datepicker("getDate")},activate:function(){},clear:function(){this.$input.datepicker("setDate",null),this.isAutosubmit&&this.submit()},autosubmit:function(){this.isAutosubmit=!0,this.$input.on("mouseup","table.ui-datepicker-calendar a.ui-state-default",i.proxy(this.submit,this))},submit:function(){var t=this.$input.closest("form");setTimeout(function(){t.submit()},200)}}),n.defaults=i.extend({},i.fn.editabletypes.abstractinput.defaults,{tpl:'<div class="editable-date"></div>',inputclass:null,format:"yyyy-mm-dd",viewformat:null,datepicker:{firstDay:0,changeYear:!0,changeMonth:!0,showOtherMonths:!0},clear:"&times; clear"}),i.fn.editabletypes.dateui=n})(window.jQuery),(e=>{function i(t){this.init("dateuifield",t,i.defaults),this.initPicker(t,i.defaults)}e.fn.editableutils.inherit(i,e.fn.editabletypes.dateui),e.extend(i.prototype,{render:function(){this.$input.datepicker(this.options.datepicker),e.fn.editabletypes.text.prototype.renderClear.call(this)},value2input:function(t){this.$input.val(e.datepicker.formatDate(this.options.viewformat,t))},input2value:function(){return this.html2value(this.$input.val())},activate:function(){e.fn.editabletypes.text.prototype.activate.call(this)},toggleClear:function(){e.fn.editabletypes.text.prototype.toggleClear.call(this)},autosubmit:function(){}}),i.defaults=e.extend({},e.fn.editabletypes.dateui.defaults,{tpl:'<input type="text"/>',inputclass:null,datepicker:{showOn:"button",buttonImage:"http://jqueryui.com/resources/demos/datepicker/images/calendar.gif",buttonImageOnly:!0,firstDay:0,changeYear:!0,changeMonth:!0,showOtherMonths:!0},clear:!1}),e.fn.editabletypes.dateuifield=i})(window.jQuery);
\ No newline at end of file
diff --git a/src/inputs-ext/typeaheadjs/lib/typeahead.js b/src/inputs-ext/typeaheadjs/lib/typeahead.js
index d0db973..ac03190 100644
--- a/src/inputs-ext/typeaheadjs/lib/typeahead.js
+++ b/src/inputs-ext/typeaheadjs/lib/typeahead.js
@@ -24,7 +24,7 @@
             return typeof obj === "number";
         },
         isArray: Array.isArray,
-        isFunction: $.isFunction,
+        isFunction: (object) => typeof object === "function" && typeof object.call === "function",
         isObject: $.isPlainObject,
         isUndefined: function(obj) {
             return typeof obj === "undefined";
@@ -33,7 +33,7 @@
         bindAll: function(obj) {
             var val;
             for (var key in obj) {
-                $.isFunction(val = obj[key]) && (obj[key] = $.proxy(val, obj));
+                typeof(val = obj[key]) === 'function' && (obj[key] = $.proxy(val, obj));
             }
         },
         indexOf: function(haystack, needle) {
diff --git a/src/inputs/list.js b/src/inputs/list.js
index 5786844..c30149c 100644
--- a/src/inputs/list.js
+++ b/src/inputs/list.js
@@ -61,7 +61,7 @@ List - abstract class for inputs that have source option loaded from js array or
         onSourceReady: function (success, error) {
             //run source if it function
             var source;
-            if ($.isFunction(this.options.source)) {
+            if (typeof(this.options.source) === 'function') {
                 source = this.options.source.call(this.options.scope);
                 this.sourceData = null;
                 //note: if function returns the same source as URL - sourceData will be taken from cahce and no extra request performed
@@ -178,7 +178,7 @@ List - abstract class for inputs that have source option loaded from js array or
             
             if(!Array.isArray(this.prependData)) {
                 //run prepend if it is function (once)
-                if ($.isFunction(this.options.prepend)) {
+                if (typeof (this.options.prepend) === 'function') {
                     this.options.prepend = this.options.prepend.call(this.options.scope);
                 }
               
diff --git a/src/inputs/select2/lib/select2.js b/src/inputs/select2/lib/select2.js
index a97d3fc..69c4a3c 100644
--- a/src/inputs/select2/lib/select2.js
+++ b/src/inputs/select2/lib/select2.js
@@ -434,7 +434,7 @@ the specific language governing permissions and limitations under the Apache Lic
                 if (handler) { handler.abort(); }
 
                 if (options.params) {
-                    if ($.isFunction(options.params)) {
+                    if (typeof (options.params) === 'function') {
                         $.extend(params, options.params.call(self));
                     } else {
                         $.extend(params, options.params);
@@ -481,7 +481,7 @@ the specific language governing permissions and limitations under the Apache Lic
             data = { results: tmp };
         }
 
-         if ($.isFunction(data) === false) {
+         if (typeof (data) !== 'function') {
             tmp = data;
             data = function() { return tmp; };
         }
@@ -490,7 +490,7 @@ the specific language governing permissions and limitations under the Apache Lic
         if (dataItem.text) {
             text = dataItem.text;
             // if text is not a function we assume it to be a key name
-            if (!$.isFunction(text)) {
+            if (!typeof(text) === 'function') {
                 dataText = dataItem.text; // we need to store this in a separate variable because in the next step data gets reset and data.text is no longer available
                 text = function (item) { return item[dataText]; };
             }
@@ -530,7 +530,7 @@ the specific language governing permissions and limitations under the Apache Lic
 
     // TODO javadoc
     function tags(data) {
-        var isFunc = $.isFunction(data);
+        var isFunc = typeof (data) === 'function';
         return function (query) {
             var t = query.term, filtered = {results: []};
             $(isFunc ? data() : data).each(function () {
@@ -553,13 +553,13 @@ the specific language governing permissions and limitations under the Apache Lic
      * @param formatter
      */
     function checkFormatter(formatter, formatterName) {
-        if ($.isFunction(formatter)) return true;
+        if (typeof (formatter) === 'function') return true;
         if (!formatter) return false;
         throw new Error(formatterName +" must be a function or a falsy value");
     }
 
     function evaluate(val) {
-        return $.isFunction(val) ? val() : val;
+        return typeof (val) === 'function' ? val() : val;
     }
 
     function countResults(results) {
@@ -754,7 +754,7 @@ the specific language governing permissions and limitations under the Apache Lic
             // dom it will trigger the popup close, which is not what we want
             this.dropdown.on("click mouseup mousedown", function (e) { e.stopPropagation(); });
 
-            if ($.isFunction(this.opts.initSelection)) {
+            if (typeof (this.opts.initSelection) === 'function') {
                 // initialize selection based on the current value of the source element
                 this.initSelection();
 
@@ -976,7 +976,7 @@ the specific language governing permissions and limitations under the Apache Lic
                                 $(splitVal(element.val(), opts.separator)).each(function () {
                                     var obj = { id: this, text: this },
                                         tags = opts.tags;
-                                    if ($.isFunction(tags)) tags=tags();
+                                    if (typeof (tags) === 'function') tags=tags();
                                     $(tags).each(function() { if (equal(this.id, obj.id)) { obj = this; return false; } });
                                     data.push(obj);
                                 });
@@ -1785,7 +1785,7 @@ the specific language governing permissions and limitations under the Apache Lic
                     }
 
                     return null;
-                } else if ($.isFunction(this.opts.width)) {
+                } else if (typeof(this.opts.width) === 'function') {
                     return this.opts.width();
                 } else {
                     return this.opts.width;
@@ -2151,7 +2151,7 @@ the specific language governing permissions and limitations under the Apache Lic
                             }
                             return is_match;
                         },
-                        callback: !$.isFunction(callback) ? $.noop : function() {
+                        callback: !typeof(callback) === 'function' ? $.noop : function() {
                             callback(match);
                         }
                     });
@@ -2419,7 +2419,7 @@ the specific language governing permissions and limitations under the Apache Lic
                             }
                             return is_match;
                         },
-                        callback: !$.isFunction(callback) ? $.noop : function() {
+                        callback: !typeof(callback) === 'function' ? $.noop : function() {
                             // reorder matches based on the order they appear in the ids array because right now
                             // they are in the order in which they appear in data array
                             var ordered = [];
diff --git a/src/inputs/select2/select2.js b/src/inputs/select2/select2.js
index 6939397..2bfa40f 100644
--- a/src/inputs/select2/select2.js
+++ b/src/inputs/select2/select2.js
@@ -98,7 +98,7 @@ $(function(){
         if(!options.select2.tags && options.source) {
             var source = options.source;
             //if source is function, call it (once!)
-            if ($.isFunction(options.source)) {
+            if (typeof (options.source) === 'function') {
                 source = options.source.call(options.scope);
             }