text: /*! jQuery Validation Plugin - v1.11.1 - 3/22/2013\n* https://github.com/jzaefferer/jquery-validation
  * Copyright (c) 2013 JÃ¶rn Zaefferer; Licensed MIT */
  function OpenWindow(n,t,i,r){var u=(screen.width-t)/2,f=(screen.height-i)/2,e;winprops="resizable=0, height="+i+",width="+t+",top="+f+",left="+u+"w";r&&(winprops+=",scrollbars=1");e=window.open(n,"_blank",winprops)}function setLocation(n){window.location.href=n}function displayAjaxLoading(n){n?$(".ajax-loading-block-window").show():$(".ajax-loading-block-window").hide("slow")}function displayPopupNotification(n,t,i){var f,r,u,e;if(f=t=="success"?$("#dialog-notifications-success"):t=="error"?$("#dialog-notifications-error"):t=="warning"?$("#dialog-notifications-warning"):$("#dialog-notifications-success"),r="",typeof n=="string")r="<p>"+n+"<\/p>";else for(u=0;u<n.length;u++)r=r+"<p>"+n[u]+"<\/p>";f.html(r);e=i?!0:!1;f.dialog({modal:e,width:350})}function displayPopupContentFromUrl(n,t,i,r){var u=i?!0:!1,f=r?r:550,e=$(window).height()-20;$("<div><\/div>").load(n).dialog({modal:u,position:["center",20],width:f,maxHeight:e,title:t,close:function(){$(this).dialog("destroy").remove()}})}function displayBarNotification(n,t,i){var r,u,f;if(clearTimeout(barNotificationTimeout),r="success",t=="success"?r="success":t=="error"?r="error":t=="warning"&&(r="warning"),$("#bar-notification").removeClass("success").removeClass("error").removeClass("warning"),$("#bar-notification .content").remove(),u="",typeof n=="string")u='<p class="content">'+n+"<\/p>";else for(f=0;f<n.length;f++)u=u+'<p class="content">'+n[f]+"<\/p>";$("#bar-notification").append(u).addClass(r).fadeIn("slow").mouseenter(function(){clearTimeout(barNotificationTimeout)});$("#bar-notification .close").unbind("click").click(function(){$("#bar-notification").fadeOut("slow")});i>0&&(barNotificationTimeout=setTimeout(function(){$("#bar-notification").fadeOut("slow")},i))}function htmlEncode(n){return $("<div/>").text(n).html()}function htmlDecode(n){return $("<div/>").html(n).text()}function addAntiForgeryToken(n){n||(n={});var t=$("input[name=__RequestVerificationToken]");return t.length&&(n.__RequestVerificationToken=t.val()),n}var barNotificationTimeout,AjaxCart,qq,cookieHelper;(function(n){n.extend(n.fn,{validate:function(t){if(!this.length)return t&&t.debug&&window.console&&console.warn("Nothing selected, can't validate, returning nothing."),void 0;var i=n.data(this[0],"validator");return i?i:(this.attr("novalidate","novalidate"),i=new n.validator(t,this[0]),n.data(this[0],"validator",i),i.settings.onsubmit&&(this.validateDelegate(":submit","click",function(t){i.settings.submitHandler&&(i.submitButton=t.target);n(t.target).hasClass("cancel")&&(i.cancelSubmit=!0);void 0!==n(t.target).attr("formnovalidate")&&(i.cancelSubmit=!0)}),this.submit(function(t){function r(){var r;return i.settings.submitHandler?(i.submitButton&&(r=n("<input type='hidden'/>").attr("name",i.submitButton.name).val(n(i.submitButton).val()).appendTo(i.currentForm)),i.settings.submitHandler.call(i,i.currentForm,t),i.submitButton&&r.remove(),!1):!0}return i.settings.debug&&t.preventDefault(),i.cancelSubmit?(i.cancelSubmit=!1,r()):i.form()?i.pendingRequest?(i.formSubmitted=!0,!1):r():(i.focusInvalid(),!1)})),i)},valid:function(){if(n(this[0]).is("form"))return this.validate().form();var t=!0,i=n(this[0].form).validate();return this.each(function(){t=t&&i.element(this)}),t},removeAttrs:function(t){var i={},r=this;return n.each(t.split(/\s/),function(n,t){i[t]=r.attr(t);r.removeAttr(t)}),i},rules:function(t,i){var r=this[0],o,u,h;if(t){var e=n.data(r.form,"validator").settings,s=e.rules,f=n.validator.staticRules(r);switch(t){case"add":n.extend(f,n.validator.normalizeRule(i));delete f.messages;s[r.name]=f;i.messages&&(e.messages[r.name]=n.extend(e.messages[r.name],i.messages));break;case"remove":return i?(o={},n.each(i.split(/\s/),function(n,t){o[t]=f[t];delete f[t]}),o):(delete s[r.name],f)}}return u=n.validator.normalizeRules(n.extend({},n.validator.classRules(r),n.validator.attributeRules(r),n.validator.dataRules(r),n.validator.staticRules(r)),r),u.required&&(h=u.required,delete u.required,u=n.extend({required:h},u)),u}});n.extend(n.expr[":"],{blank:function(t){return!n.trim(""+n(t).val())},filled:function(t){return!!n.trim(""+n(t).val())},unchecked:function(t){return!n(t).prop("checked")}});n.validator=function(t,i){this.settings=n.extend(!0,{},n.validator.defaults,t);this.currentForm=i;this.init()};n.validator.format=function(t,i){return 1===arguments.length?function(){var i=n.makeArray(arguments);return i.unshift(t),n.validator.format.apply(this,i)}:(arguments.length>2&&i.constructor!==Array&&(i=n.makeArray(arguments).slice(1)),i.constructor!==Array&&(i=[i]),n.each(i,function(n,i){t=t.replace(RegExp("\\{"+n+"\\}","g"),function(){return i})}),t)};n.extend(n.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",validClass:"valid",errorElement:"label",focusInvalid:!0,errorContainer:n([]),errorLabelContainer:n([]),onsubmit:!0,ignore:":hidden",ignoreTitle:!1,onfocusin:function(n){this.lastActive=n;this.settings.focusCleanup&&!this.blockFocusCleanup&&(this.settings.unhighlight&&this.settings.unhighlight.call(this,n,this.settings.errorClass,this.settings.validClass),this.addWrapper(this.errorsFor(n)).hide())},onfocusout:function(n){!this.checkable(n)&&(n.name in this.submitted||!this.optional(n))&&this.element(n)},onkeyup:function(n,t){(9!==t.which||""!==this.elementValue(n))&&(n.name in this.submitted||n===this.lastElement)&&this.element(n)},onclick:function(n){n.name in this.submitted?this.element(n):n.parentNode.name in this.submitted&&this.element(n.parentNode)},highlight:function(t,i,r){"radio"===t.type?this.findByName(t.name).addClass(i).removeClass(r):n(t).addClass(i).removeClass(r)},unhighlight:function(t,i,r){"radio"===t.type?this.findByName(t.name).removeClass(i).addClass(r):n(t).removeClass(i).addClass(r)}},setDefaults:function(t){n.extend(n.validator.defaults,t)},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date (ISO).",number:"Please enter a valid number.",digits:"Please enter only digits.",creditcard:"Please enter a valid credit card number.",equalTo:"Please enter the same value again.",maxlength:n.validator.format("Please enter no more than {0} characters."),minlength:n.validator.format("Please enter at least {0} characters."),rangelength:n.validator.format("Please enter a value between {0} and {1} characters long."),range:n.validator.format("Please enter a value between {0} and {1}."),max:n.validator.format("Please enter a value less than or equal to {0}."),min:n.validator.format("Please enter a value greater than or equal to {0}.")},autoCreateRanges:!1,prototype:{init:function(){function i(t){var i=n.data(this[0].form,"validator"),r="on"+t.type.replace(/^validate/,"");i.settings[r]&&i.settings[r].call(i,this[0],t)}var r,t;this.labelContainer=n(this.settings.errorLabelContainer);this.errorContext=this.labelContainer.length&&this.labelContainer||n(this.currentForm);this.containers=n(this.settings.errorContainer).add(this.settings.errorLabelContainer);this.submitted={};this.valueCache={};this.pendingRequest=0;this.pending={};this.invalid={};this.reset();r=this.groups={};n.each(this.settings.groups,function(t,i){"string"==typeof i&&(i=i.split(/\s/));n.each(i,function(n,i){r[i]=t})});t=this.settings.rules;n.each(t,function(i,r){t[i]=n.validator.normalizeRule(r)});n(this.currentForm).validateDelegate(":text, [type='password'], [type='file'], select, textarea, [type='number'], [type='search'] ,[type='tel'], [type='url'], [type='email'], [type='datetime'], [type='date'], [type='month'], [type='week'], [type='time'], [type='datetime-local'], [type='range'], [type='color'] ","focusin focusout keyup",i).validateDelegate("[type='radio'], [type='checkbox'], select, option","click",i);this.settings.invalidHandler&&n(this.currentForm).bind("invalid-form.validate",this.settings.invalidHandler)},form:function(){return this.checkForm(),n.extend(this.submitted,this.errorMap),this.invalid=n.extend({},this.errorMap),this.valid()||n(this.currentForm).triggerHandler("invalid-form",[this]),this.showErrors(),this.valid()},checkForm:function(){this.prepareForm();for(var n=0,t=this.currentElements=this.elements();t[n];n++)this.check(t[n]);return this.valid()},element:function(t){t=this.validationTargetFor(this.clean(t));this.lastElement=t;this.prepareElement(t);this.currentElements=n(t);var i=this.check(t)!==!1;return i?delete this.invalid[t.name]:this.invalid[t.name]=!0,this.numberOfInvalids()||(this.toHide=this.toHide.add(this.containers)),this.showErrors(),i},showErrors:function(t){if(t){n.extend(this.errorMap,t);this.errorList=[];for(var i in t)this.errorList.push({message:t[i],element:this.findByName(i)[0]});this.successList=n.grep(this.successList,function(n){return!(n.name in t)})}this.settings.showErrors?this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors()},resetForm:function(){n.fn.resetForm&&n(this.currentForm).resetForm();this.submitted={};this.lastElement=null;this.prepareForm();this.hideErrors();this.elements().removeClass(this.settings.errorClass).removeData("previousValue")},numberOfInvalids:function(){return this.objectLength(this.invalid)},objectLength:function(n){var t=0;for(var i in n)t++;return t},hideErrors:function(){this.addWrapper(this.toHide).hide()},valid:function(){return 0===this.size()},size:function(){return this.errorList.length},focusInvalid:function(){if(this.settings.focusInvalid)try{n(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").focus().trigger("focusin")}catch(t){}},findLastActive:function(){var t=this.lastActive;return t&&1===n.grep(this.errorList,function(n){return n.element.name===t.name}).length&&t},elements:function(){var t=this,i={};return n(this.currentForm).find("input, select, textarea").not(":submit, :reset, :image, [disabled]").not(this.settings.ignore).filter(function(){return!this.name&&t.settings.debug&&window.console&&console.error("%o has no name assigned",this),this.name in i||!t.objectLength(n(this).rules())?!1:(i[this.name]=!0,!0)})},clean:function(t){return n(t)[0]},errors:function(){var t=this.settings.errorClass.replace(" ",".");return n(this.settings.errorElement+"."+t,this.errorContext)},reset:function(){this.successList=[];this.errorList=[];this.errorMap={};this.toShow=n([]);this.toHide=n([]);this.currentElements=n([])},prepareForm:function(){this.reset();this.toHide=this.errors().add(this.containers)},prepareElement:function(n){this.reset();this.toHide=this.errorsFor(n)},elementValue:function(t){var r=n(t).attr("type"),i=n(t).val();return"radio"===r||"checkbox"===r?n("input[name='"+n(t).attr("name")+"']:checked").val():"string"==typeof i?i.replace(/\r/g,""):i},check:function(t){var r,u;t=this.validationTargetFor(this.clean(t));var i,f=n(t).rules(),e=!1,s=this.elementValue(t);for(r in f){u={method:r,parameters:f[r]};try{if(i=n.validator.methods[r].call(this,s,t,u.parameters),"dependency-mismatch"===i){e=!0;continue}if(e=!1,"pending"===i)return this.toHide=this.toHide.not(this.errorsFor(t)),void 0;if(!i)return this.formatAndAdd(t,u),!1}catch(o){throw this.settings.debug&&window.console&&console.log("Exception occurred when checking element "+t.id+", check the '"+u.method+"' method.",o),o;}}if(!e)return(this.objectLength(f)&&this.successList.push(t),!0)},customDataMessage:function(t,i){return n(t).data("msg-"+i.toLowerCase())||t.attributes&&n(t).attr("data-msg-"+i.toLowerCase())},customMessage:function(n,t){var i=this.settings.messages[n];return i&&(i.constructor===String?i:i[t])},findDefined:function(){for(var n=0;arguments.length>n;n++)if(void 0!==arguments[n])return arguments[n];return void 0},defaultMessage:function(t,i){return this.findDefined(this.customMessage(t.name,i),this.customDataMessage(t,i),!this.settings.ignoreTitle&&t.title||void 0,n.validator.messages[i],"<strong>Warning: No message defined for "+t.name+"<\/strong>")},formatAndAdd:function(t,i){var r=this.defaultMessage(t,i.method),u=/\$?\{(\d+)\}/g;"function"==typeof r?r=r.call(this,i.parameters,t):u.test(r)&&(r=n.validator.format(r.replace(u,"{$1}"),i.parameters));this.errorList.push({message:r,element:t});this.errorMap[t.name]=r;this.submitted[t.name]=r},addWrapper:function(n){return this.settings.wrapper&&(n=n.add(n.parent(this.settings.wrapper))),n},defaultShowErrors:function(){for(var i,t,n=0;this.errorList[n];n++)t=this.errorList[n],this.settings.highlight&&this.settings.highlight.call(this,t.element,this.settings.errorClass,this.settings.validClass),this.showLabel(t.element,t.message);if(this.errorList.length&&(this.toShow=this.toShow.add(this.containers)),this.settings.success)for(n=0;this.successList[n];n++)this.showLabel(this.successList[n]);if(this.settings.unhighlight)for(n=0,i=this.validElements();i[n];n++)this.settings.unhighlight.call(this,i[n],this.settings.errorClass,this.settings.validClass);this.toHide=this.toHide.not(this.toShow);this.hideErrors();this.addWrapper(this.toShow).show()},validElements:function(){return this.currentElements.not(this.invalidElements())},invalidElements:function(){return n(this.errorList).map(function(){return this.element})},showLabel:function(t,i){var r=this.errorsFor(t);r.length?(r.removeClass(this.settings.validClass).addClass(this.settings.errorClass),r.html(i)):(r=n("<"+this.settings.errorElement+">").attr("for",this.idOrName(t)).addClass(this.settings.errorClass).html(i||""),this.settings.wrapper&&(r=r.hide().show().wrap("<"+this.settings.wrapper+"/>").parent()),this.labelContainer.append(r).length||(this.settings.errorPlacement?this.settings.errorPlacement(r,n(t)):r.insertAfter(t)));!i&&this.settings.success&&(r.text(""),"string"==typeof this.settings.success?r.addClass(this.settings.success):this.settings.success(r,t));this.toShow=this.toShow.add(r)},errorsFor:function(t){var i=this.idOrName(t);return this.errors().filter(function(){return n(this).attr("for")===i})},idOrName:function(n){return this.groups[n.name]||(this.checkable(n)?n.name:n.id||n.name)},validationTargetFor:function(n){return this.checkable(n)&&(n=this.findByName(n.name).not(this.settings.ignore)[0]),n},checkable:function(n){return/radio|checkbox/i.test(n.type)},findByName:function(t){return n(this.currentForm).find("[name='"+t+"']")},getLength:function(t,i){switch(i.nodeName.toLowerCase()){case"select":return n("option:selected",i).length;case"input":if(this.checkable(i))return this.findByName(i.name).filter(":checked").length}return t.length},depend:function(n,t){return this.dependTypes[typeof n]?this.dependTypes[typeof n](n,t):!0},dependTypes:{boolean:function(n){return n},string:function(t,i){return!!n(t,i.form).length},"function":function(n,t){return n(t)}},optional:function(t){var i=this.elementValue(t);return!n.validator.methods.required.call(this,i,t)&&"dependency-mismatch"},startRequest:function(n){this.pending[n.name]||(this.pendingRequest++,this.pending[n.name]=!0)},stopRequest:function(t,i){this.pendingRequest--;0>this.pendingRequest&&(this.pendingRequest=0);delete this.pending[t.name];i&&0===this.pendingRequest&&this.formSubmitted&&this.form()?(n(this.currentForm).submit(),this.formSubmitted=!1):!i&&0===this.pendingRequest&&this.formSubmitted&&(n(this.currentForm).triggerHandler("invalid-form",[this]),this.formSubmitted=!1)},previousValue:function(t){return n.data(t,"previousValue")||n.data(t,"previousValue",{old:null,valid:!0,message:this.defaultMessage(t,"remote")})}},classRuleSettings:{required:{required:!0},email:{email:!0},url:{url:!0},date:{date:!0},dateISO:{dateISO:!0},number:{number:!0},digits:{digits:!0},creditcard:{creditcard:!0}},addClassRules:function(t,i){t.constructor===String?this.classRuleSettings[t]=i:n.extend(this.classRuleSettings,t)},classRules:function(t){var i={},r=n(t).attr("class");return r&&n.each(r.split(" "),function(){this in n.validator.classRuleSettings&&n.extend(i,n.validator.classRuleSettings[this])}),i},attributeRules:function(t){var u={},e=n(t),f=e[0].getAttribute("type"),r,i;for(r in n.validator.methods)"required"===r?(i=e.get(0).getAttribute(r),""===i&&(i=!0),i=!!i):i=e.attr(r),/min|max/.test(r)&&(null===f||/number|range|text/.test(f))&&(i=Number(i)),i?u[r]=i:f===r&&"range"!==f&&(u[r]=!0);return u.maxlength&&/-1|2147483647|524288/.test(u.maxlength)&&delete u.maxlength,u},dataRules:function(t){var i,r,u={},f=n(t);for(i in n.validator.methods)r=f.data("rule-"+i.toLowerCase()),void 0!==r&&(u[i]=r);return u},staticRules:function(t){var i={},r=n.data(t.form,"validator");return r.settings.rules&&(i=n.validator.normalizeRule(r.settings.rules[t.name])||{}),i},normalizeRules:function(t,i){return n.each(t,function(r,u){if(u===!1)return delete t[r],void 0;if(u.param||u.depends){var f=!0;switch(typeof u.depends){case"string":f=!!n(u.depends,i.form).length;break;case"function":f=u.depends.call(i,i)}f?t[r]=void 0!==u.param?u.param:!0:delete t[r]}}),n.each(t,function(r,u){t[r]=n.isFunction(u)?u(i):u}),n.each(["minlength","maxlength"],function(){t[this]&&(t[this]=Number(t[this]))}),n.each(["rangelength","range"],function(){var i;t[this]&&(n.isArray(t[this])?t[this]=[Number(t[this][0]),Number(t[this][1])]:"string"==typeof t[this]&&(i=t[this].split(/[\s,]+/),t[this]=[Number(i[0]),Number(i[1])]))}),n.validator.autoCreateRanges&&(t.min&&t.max&&(t.range=[t.min,t.max],delete t.min,delete t.max),t.minlength&&t.maxlength&&(t.rangelength=[t.minlength,t.maxlength],delete t.minlength,delete t.maxlength)),t},normalizeRule:function(t){if("string"==typeof t){var i={};n.each(t.split(/\s/),function(){i[this]=!0});t=i}return t},addMethod:function(t,i,r){n.validator.methods[t]=i;n.validator.messages[t]=void 0!==r?r:n.validator.messages[t];3>i.length&&n.validator.addClassRules(t,n.validator.normalizeRule(t))},methods:{required:function(t,i,r){if(!this.depend(r,i))return"dependency-mismatch";if("select"===i.nodeName.toLowerCase()){var u=n(i).val();return u&&u.length>0}return this.checkable(i)?this.getLength(t,i)>0:n.trim(t).length>0},email:function(n,t){return this.optional(t)||/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))$/i.test(n)},url:function(n,t){return this.optional(t)||/^(https?|s?ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(n)},date:function(n,t){return this.optional(t)||!/Invalid|NaN/.test(""+new Date(n))},dateISO:function(n,t){return this.optional(t)||/^\d{4}[\/\-]\d{1,2}[\/\-]\d{1,2}$/.test(n)},number:function(n,t){return this.optional(t)||/^-?(?:\d+|\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(n)},digits:function(n,t){return this.optional(t)||/^\d+$/.test(n)},creditcard:function(n,t){var r,e;if(this.optional(t))return"dependency-mismatch";if(/[^0-9 \-]+/.test(n))return!1;var f=0,i=0,u=!1;for(n=n.replace(/\D/g,""),r=n.length-1;r>=0;r--)e=n.charAt(r),i=parseInt(e,10),u&&(i*=2)>9&&(i-=9),f+=i,u=!u;return 0==f%10},minlength:function(t,i,r){var u=n.isArray(t)?t.length:this.getLength(n.trim(t),i);return this.optional(i)||u>=r},maxlength:function(t,i,r){var u=n.isArray(t)?t.length:this.getLength(n.trim(t),i);return this.optional(i)||r>=u},rangelength:function(t,i,r){var u=n.isArray(t)?t.length:this.getLength(n.trim(t),i);return this.optional(i)||u>=r[0]&&r[1]>=u},min:function(n,t,i){return this.optional(t)||n>=i},max:function(n,t,i){return this.optional(t)||i>=n},range:function(n,t,i){return this.optional(t)||n>=i[0]&&i[1]>=n},equalTo:function(t,i,r){var u=n(r);return this.settings.onfocusout&&u.unbind(".validate-equalTo").bind("blur.validate-equalTo",function(){n(i).valid()}),t===u.val()},remote:function(t,i,r){var f,u,e;return this.optional(i)?"dependency-mismatch":(f=this.previousValue(i),this.settings.messages[i.name]||(this.settings.messages[i.name]={}),f.originalMessage=this.settings.messages[i.name].remote,this.settings.messages[i.name].remote=f.message,r="string"==typeof r&&{url:r}||r,f.old===t)?f.valid:(f.old=t,u=this,this.startRequest(i),e={},e[i.name]=t,n.ajax(n.extend(!0,{url:r,mode:"abort",port:"validate"+i.name,dataType:"json",data:e,success:function(r){var e,h,s,o;u.settings.messages[i.name].remote=f.originalMessage;e=r===!0||"true"===r;e?(h=u.formSubmitted,u.prepareElement(i),u.formSubmitted=h,u.successList.push(i),delete u.invalid[i.name],u.showErrors()):(s={},o=r||u.defaultMessage(i,"remote"),s[i.name]=f.message=n.isFunction(o)?o(t):o,u.invalid[i.name]=!0,u.showErrors(s));f.valid=e;u.stopRequest(i,e)}},r)),"pending")}}});n.format=n.validator.format})(jQuery),function(n){var t={},i;n.ajaxPrefilter?n.ajaxPrefilter(function(n,i,r){var u=n.port;"abort"===n.mode&&(t[u]&&t[u].abort(),t[u]=r)}):(i=n.ajax,n.ajax=function(r){var f=("mode"in r?r:n.ajaxSettings).mode,u=("port"in r?r:n.ajaxSettings).port;return"abort"===f?(t[u]&&t[u].abort(),t[u]=i.apply(this,arguments),t[u]):i.apply(this,arguments)})}(jQuery),function(n){n.extend(n.fn,{validateDelegate:function(t,i,r){return this.bind(i,function(i){var u=n(i.target);if(u.is(t))return r.apply(u,arguments)})}})}(jQuery),function(n){function i(n,t,i){n.rules[t]=i;n.message&&(n.messages[t]=n.message)}function h(n){return n.replace(/^\s+|\s+$/g,"").split(/\s*,\s*/g)}function f(n){return n.replace(/([!"#$%&'()*+,./:;<=>?@\[\\\]^`{|}~])/g,"\\$1")}function e(n){return n.substr(0,n.lastIndexOf(".")+1)}function o(n,t){return n.indexOf("*.")===0&&(n=n.replace("*.",t)),n}function c(t,i){var r=n(this).find("[data-valmsg-for='"+f(i[0].name)+"']"),u=r.attr("data-valmsg-replace"),e=u?n.parseJSON(u)!==!1:null;r.removeClass("field-validation-valid").addClass("field-validation-error");t.data("unobtrusiveContainer",r);e?(r.empty(),t.removeClass("input-validation-error").appendTo(r)):t.hide()}function l(t,i){var u=n(this).find("[data-valmsg-summary=true]"),r=u.find("ul");r&&r.length&&i.errorList.length&&(r.empty(),u.addClass("validation-summary-errors").removeClass("validation-summary-valid"),n.each(i.errorList,function(){n("<li />").html(this.message).appendTo(r)}))}function a(t){var i=t.data("unobtrusiveContainer"),r=i.attr("data-valmsg-replace"),u=r?n.parseJSON(r):null;i&&(i.addClass("field-validation-valid").removeClass("field-validation-error"),t.removeData("unobtrusiveContainer"),u&&i.empty())}function v(){var t=n(this);t.data("validator").resetForm();t.find(".validation-summary-errors").addClass("validation-summary-valid").removeClass("validation-summary-errors");t.find(".field-validation-error").addClass("field-validation-valid").removeClass("field-validation-error").removeData("unobtrusiveContainer").find(">*").removeData("unobtrusiveContainer")}function s(t){var i=n(t),r=i.data(u),f=n.proxy(v,t);return r||(r={options:{errorClass:"input-validation-error",errorElement:"span",errorPlacement:n.proxy(c,t),invalidHandler:n.proxy(l,t),messages:{},rules:{},success:n.proxy(a,t)},attachValidation:function(){i.unbind("reset."+u,f).bind("reset."+u,f).validate(this.options)},validate:function(){return i.validate(),i.valid()}},i.data(u,r)),r}var r=n.validator,t,u="unobtrusiveValidation";r.unobtrusive={adapters:[],parseElement:function(t,i){var u=n(t),f=u.parents("form")[0],r,e,o;f&&(r=s(f),r.options.rules[t.name]=e={},r.options.messages[t.name]=o={},n.each(this.adapters,function(){var i="data-val-"+this.name,r=u.attr(i),s={};r!==undefined&&(i+="-",n.each(this.params,function(){s[this]=u.attr(i+this)}),this.adapt({element:t,form:f,message:r,params:s,rules:e,messages:o}))}),n.extend(e,{__dummy__:!0}),i||r.attachValidation())},parse:function(t){var i=n(t).parents("form").andSelf().add(n(t).find("form")).filter("form");n(t).find(":input").filter("[data-val=true]").each(function(){r.unobtrusive.parseElement(this,!0)});i.each(function(){var n=s(this);n&&n.attachValidation()})}};t=r.unobtrusive.adapters;t.add=function(n,t,i){return i||(i=t,t=[]),this.push({name:n,params:t,adapt:i}),this};t.addBool=function(n,t){return this.add(n,function(r){i(r,t||n,!0)})};t.addMinMax=function(n,t,r,u,f,e){return this.add(n,[f||"min",e||"max"],function(n){var f=n.params.min,e=n.params.max;f&&e?i(n,u,[f,e]):f?i(n,t,f):e&&i(n,r,e)})};t.addSingleVal=function(n,t,r){return this.add(n,[t||"val"],function(u){i(u,r||n,u.params[t])})};r.addMethod("__dummy__",function(){return!0});r.addMethod("regex",function(n,t,i){var r;return this.optional(t)?!0:(r=new RegExp(i).exec(n),r&&r.index===0&&r[0].length===n.length)});r.addMethod("nonalphamin",function(n,t,i){var r;return i&&(r=n.match(/\W/g),r=r&&r.length>=i),r});r.methods.extension?(t.addSingleVal("accept","mimtype"),t.addSingleVal("extension","extension")):t.addSingleVal("extension","extension","accept");t.addSingleVal("regex","pattern");t.addBool("creditcard").addBool("date").addBool("digits").addBool("email").addBool("number").addBool("url");t.addMinMax("length","minlength","maxlength","rangelength").addMinMax("range","min","max","range");t.add("equalto",["other"],function(t){var r=e(t.element.name),u=t.params.other,s=o(u,r),h=n(t.form).find(":input").filter("[name='"+f(s)+"']")[0];i(t,"equalTo",h)});t.add("required",function(n){(n.element.tagName.toUpperCase()!=="INPUT"||n.element.type.toUpperCase()!=="CHECKBOX")&&i(n,"required",!0)});t.add("remote",["url","type","additionalfields"],function(t){var r={url:t.params.url,type:t.params.type||"GET",data:{}},u=e(t.element.name);n.each(h(t.params.additionalfields||t.element.name),function(i,e){var s=o(e,u);r.data[s]=function(){return n(t.form).find(":input").filter("[name='"+f(s)+"']").val()}});i(t,"remote",r)});t.add("password",["min","nonalphamin","regex"],function(n){n.params.min&&i(n,"minlength",n.params.min);n.params.nonalphamin&&i(n,"nonalphamin",n.params.nonalphamin);n.params.regex&&i(n,"regex",n.params.regex)});n(function(){r.unobtrusive.parse(document)})}(jQuery);
  /*! jQuery UI - v1.10.3 - 2013-10-20
  * http://jqueryui.com
  * Includes: jquery.ui.core.js, jquery.ui.widget.js, jquery.ui.mouse.js, jquery.ui.position.js, jquery.ui.draggable.js, jquery.ui.droppable.js, jquery.ui.resizable.js, jquery.ui.selectable.js, jquery.ui.sortable.js, jquery.ui.accordion.js, jquery.ui.autocomplete.js, jquery.ui.button.js, jquery.ui.datepicker.js, jquery.ui.dialog.js, jquery.ui.menu.js, jquery.ui.progressbar.js, jquery.ui.slider.js, jquery.ui.spinner.js, jquery.ui.tabs.js, jquery.ui.tooltip.js, jquery.ui.effect.js, jquery.ui.effect-blind.js, jquery.ui.effect-bounce.js, jquery.ui.effect-clip.js, jquery.ui.effect-drop.js, jquery.ui.effect-explode.js, jquery.ui.effect-fade.js, jquery.ui.effect-fold.js, jquery.ui.effect-highlight.js, jquery.ui.effect-pulsate.js, jquery.ui.effect-scale.js, jquery.ui.effect-shake.js, jquery.ui.effect-slide.js, jquery.ui.effect-transfer.js
  * Copyright 2013 jQuery Foundation and other contributors; Licensed MIT */
  (function(n,t){function i(t,i){var u,f,e,o=t.nodeName.toLowerCase();return"area"===o?(u=t.parentNode,f=u.name,t.href&&f&&"map"===u.nodeName.toLowerCase()?(e=n("img[usemap=#"+f+"]")[0],!!e&&r(e)):!1):(/input|select|textarea|button|object/.test(o)?!t.disabled:"a"===o?t.href||i:i)&&r(t)}function r(t){return n.expr.filters.visible(t)&&!n(t).parents().addBack().filter(function(){return"hidden"===n.css(this,"visibility")}).length}var u=0,f=/^ui-id-\d+$/;n.ui=n.ui||{};n.extend(n.ui,{version:"1.10.3",keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}});n.fn.extend({focus:function(t){return function(i,r){return"number"==typeof i?this.each(function(){var t=this;setTimeout(function(){n(t).focus();r&&r.call(t)},i)}):t.apply(this,arguments)}}(n.fn.focus),scrollParent:function(){var t;return t=n.ui.ie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(n.css(this,"position"))&&/(auto|scroll)/.test(n.css(this,"overflow")+n.css(this,"overflow-y")+n.css(this,"overflow-x"))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(n.css(this,"overflow")+n.css(this,"overflow-y")+n.css(this,"overflow-x"))}).eq(0),/fixed/.test(this.css("position"))||!t.length?n(document):t},zIndex:function(i){if(i!==t)return this.css("zIndex",i);if(this.length)for(var u,f,r=n(this[0]);r.length&&r[0]!==document;){if(u=r.css("position"),("absolute"===u||"relative"===u||"fixed"===u)&&(f=parseInt(r.css("zIndex"),10),!isNaN(f)&&0!==f))return f;r=r.parent()}return 0},uniqueId:function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++u)})},removeUniqueId:function(){return this.each(function(){f.test(this.id)&&n(this).removeAttr("id")})}});n.extend(n.expr[":"],{data:n.expr.createPseudo?n.expr.createPseudo(function(t){return function(i){return!!n.data(i,t)}}):function(t,i,r){return!!n.data(t,r[3])},focusable:function(t){return i(t,!isNaN(n.attr(t,"tabindex")))},tabbable:function(t){var r=n.attr(t,"tabindex"),u=isNaN(r);return(u||r>=0)&&i(t,!u)}});n("<a>").outerWidth(1).jquery||n.each(["Width","Height"],function(i,r){function u(t,i,r,u){return n.each(o,function(){i-=parseFloat(n.css(t,"padding"+this))||0;r&&(i-=parseFloat(n.css(t,"border"+this+"Width"))||0);u&&(i-=parseFloat(n.css(t,"margin"+this))||0)}),i}var o="Width"===r?["Left","Right"]:["Top","Bottom"],f=r.toLowerCase(),e={innerWidth:n.fn.innerWidth,innerHeight:n.fn.innerHeight,outerWidth:n.fn.outerWidth,outerHeight:n.fn.outerHeight};n.fn["inner"+r]=function(i){return i===t?e["inner"+r].call(this):this.each(function(){n(this).css(f,u(this,i)+"px")})};n.fn["outer"+r]=function(t,i){return"number"!=typeof t?e["outer"+r].call(this,t):this.each(function(){n(this).css(f,u(this,t,!0,i)+"px")})}});n.fn.addBack||(n.fn.addBack=function(n){return this.add(null==n?this.prevObject:this.prevObject.filter(n))});n("<a>").data("a-b","a").removeData("a-b").data("a-b")&&(n.fn.removeData=function(t){return function(i){return arguments.length?t.call(this,n.camelCase(i)):t.call(this)}}(n.fn.removeData));n.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase());n.support.selectstart="onselectstart"in document.createElement("div");n.fn.extend({disableSelection:function(){return this.bind((n.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(n){n.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}});n.extend(n.ui,{plugin:{add:function(t,i,r){var u,f=n.ui[t].prototype;for(u in r)f.plugins[u]=f.plugins[u]||[],f.plugins[u].push([i,r[u]])},call:function(n,t,i){var r,u=n.plugins[t];if(u&&n.element[0].parentNode&&11!==n.element[0].parentNode.nodeType)for(r=0;u.length>r;r++)n.options[u[r][0]]&&u[r][1].apply(n.element,i)}},hasScroll:function(t,i){if("hidden"===n(t).css("overflow"))return!1;var r=i&&"left"===i?"scrollLeft":"scrollTop",u=!1;return t[r]>0?!0:(t[r]=1,u=t[r]>0,t[r]=0,u)}})})(jQuery),function(n,t){var r=0,i=Array.prototype.slice,u=n.cleanData;n.cleanData=function(t){for(var i,r=0;null!=(i=t[r]);r++)try{n(i).triggerHandler("remove")}catch(f){}u(t)};n.widget=function(i,r,u){var h,e,f,s,c={},o=i.split(".")[0];i=i.split(".")[1];h=o+"-"+i;u||(u=r,r=n.Widget);n.expr[":"][h.toLowerCase()]=function(t){return!!n.data(t,h)};n[o]=n[o]||{};e=n[o][i];f=n[o][i]=function(n,i){return this._createWidget?(arguments.length&&this._createWidget(n,i),t):new f(n,i)};n.extend(f,e,{version:u.version,_proto:n.extend({},u),_childConstructors:[]});s=new r;s.options=n.widget.extend({},s.options);n.each(u,function(i,u){return n.isFunction(u)?(c[i]=function(){var n=function(){return r.prototype[i].apply(this,arguments)},t=function(n){return r.prototype[i].apply(this,n)};return function(){var i,r=this._super,f=this._superApply;return this._super=n,this._superApply=t,i=u.apply(this,arguments),this._super=r,this._superApply=f,i}}(),t):(c[i]=u,t)});f.prototype=n.widget.extend(s,{widgetEventPrefix:e?s.widgetEventPrefix:i},c,{constructor:f,namespace:o,widgetName:i,widgetFullName:h});e?(n.each(e._childConstructors,function(t,i){var r=i.prototype;n.widget(r.namespace+"."+r.widgetName,f,i._proto)}),delete e._childConstructors):r._childConstructors.push(f);n.widget.bridge(i,f)};n.widget.extend=function(r){for(var u,f,o=i.call(arguments,1),e=0,s=o.length;s>e;e++)for(u in o[e])f=o[e][u],o[e].hasOwnProperty(u)&&f!==t&&(r[u]=n.isPlainObject(f)?n.isPlainObject(r[u])?n.widget.extend({},r[u],f):n.widget.extend({},f):f);return r};n.widget.bridge=function(r,u){var f=u.prototype.widgetFullName||r;n.fn[r]=function(e){var h="string"==typeof e,o=i.call(arguments,1),s=this;return e=!h&&o.length?n.widget.extend.apply(null,[e].concat(o)):e,h?this.each(function(){var i,u=n.data(this,f);return u?n.isFunction(u[e])&&"_"!==e.charAt(0)?(i=u[e].apply(u,o),i!==u&&i!==t?(s=i&&i.jquery?s.pushStack(i.get()):i,!1):t):n.error("no such method '"+e+"' for "+r+" widget instance"):n.error("cannot call methods on "+r+" prior to initialization; attempted to call method '"+e+"'")}):this.each(function(){var t=n.data(this,f);t?t.option(e||{})._init():n.data(this,f,new u(e,this))}),s}};n.Widget=function(){};n.Widget._childConstructors=[];n.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{disabled:!1,create:null},_createWidget:function(t,i){i=n(i||this.defaultElement||this)[0];this.element=n(i);this.uuid=r++;this.eventNamespace="."+this.widgetName+this.uuid;this.options=n.widget.extend({},this.options,this._getCreateOptions(),t);this.bindings=n();this.hoverable=n();this.focusable=n();i!==this&&(n.data(i,this.widgetFullName,this),this._on(!0,this.element,{remove:function(n){n.target===i&&this.destroy()}}),this.document=n(i.style?i.ownerDocument:i.document||i),this.window=n(this.document[0].defaultView||this.document[0].parentWindow));this._create();this._trigger("create",null,this._getCreateEventData());this._init()},_getCreateOptions:n.noop,_getCreateEventData:n.noop,_create:n.noop,_init:n.noop,destroy:function(){this._destroy();this.element.unbind(this.eventNamespace).removeData(this.widgetName).removeData(this.widgetFullName).removeData(n.camelCase(this.widgetFullName));this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled ui-state-disabled");this.bindings.unbind(this.eventNamespace);this.hoverable.removeClass("ui-state-hover");this.focusable.removeClass("ui-state-focus")},_destroy:n.noop,widget:function(){return this.element},option:function(i,r){var u,f,e,o=i;if(0===arguments.length)return n.widget.extend({},this.options);if("string"==typeof i)if(o={},u=i.split("."),i=u.shift(),u.length){for(f=o[i]=n.widget.extend({},this.options[i]),e=0;u.length-1>e;e++)f[u[e]]=f[u[e]]||{},f=f[u[e]];if(i=u.pop(),r===t)return f[i]===t?null:f[i];f[i]=r}else{if(r===t)return this.options[i]===t?null:this.options[i];o[i]=r}return this._setOptions(o),this},_setOptions:function(n){for(var t in n)this._setOption(t,n[t]);return this},_setOption:function(n,t){return this.options[n]=t,"disabled"===n&&(this.widget().toggleClass(this.widgetFullName+"-disabled ui-state-disabled",!!t).attr("aria-disabled",t),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")),this},enable:function(){return this._setOption("disabled",!1)},disable:function(){return this._setOption("disabled",!0)},_on:function(i,r,u){var e,f=this;"boolean"!=typeof i&&(u=r,r=i,i=!1);u?(r=e=n(r),this.bindings=this.bindings.add(r)):(u=r,r=this.element,e=this.widget());n.each(u,function(u,o){function s(){return i||f.options.disabled!==!0&&!n(this).hasClass("ui-state-disabled")?("string"==typeof o?f[o]:o).apply(f,arguments):t}"string"!=typeof o&&(s.guid=o.guid=o.guid||s.guid||n.guid++);var h=u.match(/^(\w+)\s*(.*)$/),c=h[1]+f.eventNamespace,l=h[2];l?e.delegate(l,c,s):r.bind(c,s)})},_off:function(n,t){t=(t||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace;n.unbind(t).undelegate(t)},_delay:function(n,t){function r(){return("string"==typeof n?i[n]:n).apply(i,arguments)}var i=this;return setTimeout(r,t||0)},_hoverable:function(t){this.hoverable=this.hoverable.add(t);this._on(t,{mouseenter:function(t){n(t.currentTarget).addClass("ui-state-hover")},mouseleave:function(t){n(t.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(t){this.focusable=this.focusable.add(t);this._on(t,{focusin:function(t){n(t.currentTarget).addClass("ui-state-focus")},focusout:function(t){n(t.currentTarget).removeClass("ui-state-focus")}})},_trigger:function(t,i,r){var u,f,e=this.options[t];if(r=r||{},i=n.Event(i),i.type=(t===this.widgetEventPrefix?t:this.widgetEventPrefix+t).toLowerCase(),i.target=this.element[0],f=i.originalEvent)for(u in f)u in i||(i[u]=f[u]);return this.element.trigger(i,r),!(n.isFunction(e)&&e.apply(this.element[0],[i].concat(r))===!1||i.isDefaultPrevented())}};n.each({show:"fadeIn",hide:"fadeOut"},function(t,i){n.Widget.prototype["_"+t]=function(r,u,f){"string"==typeof u&&(u={effect:u});var o,e=u?u===!0||"number"==typeof u?i:u.effect||i:t;u=u||{};"number"==typeof u&&(u={duration:u});o=!n.isEmptyObject(u);u.complete=f;u.delay&&r.delay(u.delay);o&&n.effects&&n.effects.effect[e]?r[t](u):e!==t&&r[e]?r[e](u.duration,u.easing,f):r.queue(function(i){n(this)[t]();f&&f.call(r[0]);i()})}})}(jQuery),function(n){var t=!1;n(document).mouseup(function(){t=!1});n.widget("ui.mouse",{version:"1.10.3",options:{cancel:"input,textarea,button,select,option",distance:1,delay:0},_mouseInit:function(){var t=this;this.element.bind("mousedown."+this.widgetName,function(n){return t._mouseDown(n)}).bind("click."+this.widgetName,function(i){return!0===n.data(i.target,t.widgetName+".preventClickEvent")?(n.removeData(i.target,t.widgetName+".preventClickEvent"),i.stopImmediatePropagation(),!1):undefined});this.started=!1},_mouseDestroy:function(){this.element.unbind("."+this.widgetName);this._mouseMoveDelegate&&n(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(i){if(!t){this._mouseStarted&&this._mouseUp(i);this._mouseDownEvent=i;var r=this,u=1===i.which,f="string"==typeof this.options.cancel&&i.target.nodeName?n(i.target).closest(this.options.cancel).length:!1;return u&&!f&&this._mouseCapture(i)?(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){r.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(i)&&this._mouseDelayMet(i)&&(this._mouseStarted=this._mouseStart(i)!==!1,!this._mouseStarted)?(i.preventDefault(),!0):(!0===n.data(i.target,this.widgetName+".preventClickEvent")&&n.removeData(i.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(n){return r._mouseMove(n)},this._mouseUpDelegate=function(n){return r._mouseUp(n)},n(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate),i.preventDefault(),t=!0,!0)):!0}},_mouseMove:function(t){return n.ui.ie&&(!document.documentMode||9>document.documentMode)&&!t.button?this._mouseUp(t):this._mouseStarted?(this._mouseDrag(t),t.preventDefault()):(this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,t)!==!1,this._mouseStarted?this._mouseDrag(t):this._mouseUp(t)),!this._mouseStarted)},_mouseUp:function(t){return n(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,t.target===this._mouseDownEvent.target&&n.data(t.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(t)),!1},_mouseDistanceMet:function(n){return Math.max(Math.abs(this._mouseDownEvent.pageX-n.pageX),Math.abs(this._mouseDownEvent.pageY-n.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}})}(jQuery),function(n,t){function e(n,t,i){return[parseFloat(n[0])*(a.test(n[0])?t/100:1),parseFloat(n[1])*(a.test(n[1])?i/100:1)]}function r(t,i){return parseInt(n.css(t,i),10)||0}function v(t){var i=t[0];return 9===i.nodeType?{width:t.width(),height:t.height(),offset:{top:0,left:0}}:n.isWindow(i)?{width:t.width(),height:t.height(),offset:{top:t.scrollTop(),left:t.scrollLeft()}}:i.preventDefault?{width:0,height:0,offset:{top:i.pageY,left:i.pageX}}:{width:t.outerWidth(),height:t.outerHeight(),offset:t.offset()}}n.ui=n.ui||{};var f,u=Math.max,i=Math.abs,o=Math.round,s=/left|center|right/,h=/top|center|bottom/,c=/[\+\-]\d+(\.[\d]+)?%?/,l=/^\w+/,a=/%$/,y=n.fn.position;n.position={scrollbarWidth:function(){if(f!==t)return f;var u,r,i=n("<div style='display:block;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'><\/div><\/div>"),e=i.children()[0];return n("body").append(i),u=e.offsetWidth,i.css("overflow","scroll"),r=e.offsetWidth,u===r&&(r=i[0].clientWidth),i.remove(),f=u-r},getScrollInfo:function(t){var i=t.isWindow?"":t.element.css("overflow-x"),r=t.isWindow?"":t.element.css("overflow-y"),u="scroll"===i||"auto"===i&&t.width<t.element[0].scrollWidth,f="scroll"===r||"auto"===r&&t.height<t.element[0].scrollHeight;return{width:f?n.position.scrollbarWidth():0,height:u?n.position.scrollbarWidth():0}},getWithinInfo:function(t){var i=n(t||window),r=n.isWindow(i[0]);return{element:i,isWindow:r,offset:i.offset()||{left:0,top:0},scrollLeft:i.scrollLeft(),scrollTop:i.scrollTop(),width:r?i.width():i.outerWidth(),height:r?i.height():i.outerHeight()}}};n.fn.position=function(t){if(!t||!t.of)return y.apply(this,arguments);t=n.extend({},t);var b,f,a,w,p,d,g=n(t.of),tt=n.position.getWithinInfo(t.within),it=n.position.getScrollInfo(tt),k=(t.collision||"flip").split(" "),nt={};return d=v(g),g[0].preventDefault&&(t.at="left top"),f=d.width,a=d.height,w=d.offset,p=n.extend({},w),n.each(["my","at"],function(){var i,r,n=(t[this]||"").split(" ");1===n.length&&(n=s.test(n[0])?n.concat(["center"]):h.test(n[0])?["center"].concat(n):["center","center"]);n[0]=s.test(n[0])?n[0]:"center";n[1]=h.test(n[1])?n[1]:"center";i=c.exec(n[0]);r=c.exec(n[1]);nt[this]=[i?i[0]:0,r?r[0]:0];t[this]=[l.exec(n[0])[0],l.exec(n[1])[0]]}),1===k.length&&(k[1]=k[0]),"right"===t.at[0]?p.left+=f:"center"===t.at[0]&&(p.left+=f/2),"bottom"===t.at[1]?p.top+=a:"center"===t.at[1]&&(p.top+=a/2),b=e(nt.at,f,a),p.left+=b[0],p.top+=b[1],this.each(function(){var y,d,h=n(this),c=h.outerWidth(),l=h.outerHeight(),rt=r(this,"marginLeft"),ut=r(this,"marginTop"),ft=c+rt+r(this,"marginRight")+it.width,et=l+ut+r(this,"marginBottom")+it.height,s=n.extend({},p),v=e(nt.my,h.outerWidth(),h.outerHeight());"right"===t.my[0]?s.left-=c:"center"===t.my[0]&&(s.left-=c/2);"bottom"===t.my[1]?s.top-=l:"center"===t.my[1]&&(s.top-=l/2);s.left+=v[0];s.top+=v[1];n.support.offsetFractions||(s.left=o(s.left),s.top=o(s.top));y={marginLeft:rt,marginTop:ut};n.each(["left","top"],function(i,r){n.ui.position[k[i]]&&n.ui.position[k[i]][r](s,{targetWidth:f,targetHeight:a,elemWidth:c,elemHeight:l,collisionPosition:y,collisionWidth:ft,collisionHeight:et,offset:[b[0]+v[0],b[1]+v[1]],my:t.my,at:t.at,within:tt,elem:h})});t.using&&(d=function(n){var r=w.left-s.left,v=r+f-c,e=w.top-s.top,y=e+a-l,o={target:{element:g,left:w.left,top:w.top,width:f,height:a},element:{element:h,left:s.left,top:s.top,width:c,height:l},horizontal:0>v?"left":r>0?"right":"center",vertical:0>y?"top":e>0?"bottom":"middle"};c>f&&f>i(r+v)&&(o.horizontal="center");l>a&&a>i(e+y)&&(o.vertical="middle");o.important=u(i(r),i(v))>u(i(e),i(y))?"horizontal":"vertical";t.using.call(this,n,o)});h.offset(n.extend(s,{using:d}))})};n.ui.position={fit:{left:function(n,t){var h,e=t.within,r=e.isWindow?e.scrollLeft:e.offset.left,o=e.width,s=n.left-t.collisionPosition.marginLeft,i=r-s,f=s+t.collisionWidth-o-r;t.collisionWidth>o?i>0&&0>=f?(h=n.left+i+t.collisionWidth-o-r,n.left+=i-h):n.left=f>0&&0>=i?r:i>f?r+o-t.collisionWidth:r:i>0?n.left+=i:f>0?n.left-=f:n.left=u(n.left-s,n.left)},top:function(n,t){var h,o=t.within,r=o.isWindow?o.scrollTop:o.offset.top,e=t.within.height,s=n.top-t.collisionPosition.marginTop,i=r-s,f=s+t.collisionHeight-e-r;t.collisionHeight>e?i>0&&0>=f?(h=n.top+i+t.collisionHeight-e-r,n.top+=i-h):n.top=f>0&&0>=i?r:i>f?r+e-t.collisionHeight:r:i>0?n.top+=i:f>0?n.top-=f:n.top=u(n.top-s,n.top)}},flip:{left:function(n,t){var o,s,r=t.within,y=r.offset.left+r.scrollLeft,c=r.width,h=r.isWindow?r.scrollLeft:r.offset.left,l=n.left-t.collisionPosition.marginLeft,a=l-h,v=l+t.collisionWidth-c-h,u="left"===t.my[0]?-t.elemWidth:"right"===t.my[0]?t.elemWidth:0,f="left"===t.at[0]?t.targetWidth:"right"===t.at[0]?-t.targetWidth:0,e=-2*t.offset[0];0>a?(o=n.left+u+f+e+t.collisionWidth-c-y,(0>o||i(a)>o)&&(n.left+=u+f+e)):v>0&&(s=n.left-t.collisionPosition.marginLeft+u+f+e-h,(s>0||v>i(s))&&(n.left+=u+f+e))},top:function(n,t){var o,s,r=t.within,y=r.offset.top+r.scrollTop,a=r.height,h=r.isWindow?r.scrollTop:r.offset.top,v=n.top-t.collisionPosition.marginTop,c=v-h,l=v+t.collisionHeight-a-h,p="top"===t.my[1],u=p?-t.elemHeight:"bottom"===t.my[1]?t.elemHeight:0,f="top"===t.at[1]?t.targetHeight:"bottom"===t.at[1]?-t.targetHeight:0,e=-2*t.offset[1];0>c?(s=n.top+u+f+e+t.collisionHeight-a-y,n.top+u+f+e>c&&(0>s||i(c)>s)&&(n.top+=u+f+e)):l>0&&(o=n.top-t.collisionPosition.marginTop+u+f+e-h,n.top+u+f+e>l&&(o>0||l>i(o))&&(n.top+=u+f+e))}},flipfit:{left:function(){n.ui.position.flip.left.apply(this,arguments);n.ui.position.fit.left.apply(this,arguments)},top:function(){n.ui.position.flip.top.apply(this,arguments);n.ui.position.fit.top.apply(this,arguments)}}},function(){var t,i,r,u,f,e=document.getElementsByTagName("body")[0],o=document.createElement("div");t=document.createElement(e?"div":"body");r={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"};e&&n.extend(r,{position:"absolute",left:"-1000px",top:"-1000px"});for(f in r)t.style[f]=r[f];t.appendChild(o);i=e||document.documentElement;i.insertBefore(t,i.firstChild);o.style.cssText="position: absolute; left: 10.7432222px;";u=n(o).offset().left;n.support.offsetFractions=u>10&&11>u;t.innerHTML="";i.removeChild(t)}()}(jQuery),function(n){n.widget("ui.draggable",n.ui.mouse,{version:"1.10.3",widgetEventPrefix:"drag",options:{addClasses:!0,appendTo:"parent",axis:!1,connectToSortable:!1,containment:!1,cursor:"auto",cursorAt:!1,grid:!1,handle:!1,helper:"original",iframeFix:!1,opacity:!1,refreshPositions:!1,revert:!1,revertDuration:500,scope:"default",scroll:!0,scrollSensitivity:20,scrollSpeed:20,snap:!1,snapMode:"both",snapTolerance:20,stack:!1,zIndex:!1,drag:null,start:null,stop:null},_create:function(){"original"!==this.options.helper||/^(?:r|a|f)/.test(this.element.css("position"))||(this.element[0].style.position="relative");this.options.addClasses&&this.element.addClass("ui-draggable");this.options.disabled&&this.element.addClass("ui-draggable-disabled");this._mouseInit()},_destroy:function(){this.element.removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled");this._mouseDestroy()},_mouseCapture:function(t){var i=this.options;return this.helper||i.disabled||n(t.target).closest(".ui-resizable-handle").length>0?!1:(this.handle=this._getHandle(t),this.handle?(n(i.iframeFix===!0?"iframe":i.iframeFix).each(function(){n("<div class='ui-draggable-iframeFix' style='background: #fff;'><\/div>").css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1e3}).css(n(this).offset()).appendTo("body")}),!0):!1)},_mouseStart:function(t){var i=this.options;return this.helper=this._createHelper(t),this.helper.addClass("ui-draggable-dragging"),this._cacheHelperProportions(),n.ui.ddmanager&&(n.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(),this.offsetParent=this.helper.offsetParent(),this.offsetParentCssPosition=this.offsetParent.css("position"),this.offset=this.positionAbs=this.element.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},this.offset.scroll=!1,n.extend(this.offset,{click:{left:t.pageX-this.offset.left,top:t.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.originalPosition=this.position=this._generatePosition(t),this.originalPageX=t.pageX,this.originalPageY=t.pageY,i.cursorAt&&this._adjustOffsetFromHelper(i.cursorAt),this._setContainment(),this._trigger("start",t)===!1?(this._clear(),!1):(this._cacheHelperProportions(),n.ui.ddmanager&&!i.dropBehaviour&&n.ui.ddmanager.prepareOffsets(this,t),this._mouseDrag(t,!0),n.ui.ddmanager&&n.ui.ddmanager.dragStart(this,t),!0)},_mouseDrag:function(t,i){if("fixed"===this.offsetParentCssPosition&&(this.offset.parent=this._getParentOffset()),this.position=this._generatePosition(t),this.positionAbs=this._convertPositionTo("absolute"),!i){var r=this._uiHash();if(this._trigger("drag",t,r)===!1)return this._mouseUp({}),!1;this.position=r.position}return this.options.axis&&"y"===this.options.axis||(this.helper[0].style.left=this.position.left+"px"),this.options.axis&&"x"===this.options.axis||(this.helper[0].style.top=this.position.top+"px"),n.ui.ddmanager&&n.ui.ddmanager.drag(this,t),!1},_mouseStop:function(t){var r=this,i=!1;return n.ui.ddmanager&&!this.options.dropBehaviour&&(i=n.ui.ddmanager.drop(this,t)),this.dropped&&(i=this.dropped,this.dropped=!1),"original"!==this.options.helper||n.contains(this.element[0].ownerDocument,this.element[0])?("invalid"===this.options.revert&&!i||"valid"===this.options.revert&&i||this.options.revert===!0||n.isFunction(this.options.revert)&&this.options.revert.call(this.element,i)?n(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){r._trigger("stop",t)!==!1&&r._clear()}):this._trigger("stop",t)!==!1&&this._clear(),!1):!1},_mouseUp:function(t){return n("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)}),n.ui.ddmanager&&n.ui.ddmanager.dragStop(this,t),n.ui.mouse.prototype._mouseUp.call(this,t)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp({}):this._clear(),this},_getHandle:function(t){return this.options.handle?!!n(t.target).closest(this.element.find(this.options.handle)).length:!0},_createHelper:function(t){var r=this.options,i=n.isFunction(r.helper)?n(r.helper.apply(this.element[0],[t])):"clone"===r.helper?this.element.clone().removeAttr("id"):this.element;return i.parents("body").length||i.appendTo("parent"===r.appendTo?this.element[0].parentNode:r.appendTo),i[0]===this.element[0]||/(fixed|absolute)/.test(i.css("position"))||i.css("position","absolute"),i},_adjustOffsetFromHelper:function(t){"string"==typeof t&&(t=t.split(" "));n.isArray(t)&&(t={left:+t[0],top:+t[1]||0});"left"in t&&(this.offset.click.left=t.left+this.margins.left);"right"in t&&(this.offset.click.left=this.helperProportions.width-t.right+this.margins.left);"top"in t&&(this.offset.click.top=t.top+this.margins.top);"bottom"in t&&(this.offset.click.top=this.helperProportions.height-t.bottom+this.margins.top)},_getParentOffset:function(){var t=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==document&&n.contains(this.scrollParent[0],this.offsetParent[0])&&(t.left+=this.scrollParent.scrollLeft(),t.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]===document.body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&n.ui.ie)&&(t={top:0,left:0}),{top:t.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:t.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"===this.cssPosition){var n=this.element.position();return{top:n.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:n.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var u,t,i,r=this.options;return r.containment?"window"===r.containment?(this.containment=[n(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,n(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,n(window).scrollLeft()+n(window).width()-this.helperProportions.width-this.margins.left,n(window).scrollTop()+(n(window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top],undefined):"document"===r.containment?(this.containment=[0,0,n(document).width()-this.helperProportions.width-this.margins.left,(n(document).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top],undefined):r.containment.constructor===Array?(this.containment=r.containment,undefined):("parent"===r.containment&&(r.containment=this.helper[0].parentNode),t=n(r.containment),i=t[0],i&&(u="hidden"!==t.css("overflow"),this.containment=[(parseInt(t.css("borderLeftWidth"),10)||0)+(parseInt(t.css("paddingLeft"),10)||0),(parseInt(t.css("borderTopWidth"),10)||0)+(parseInt(t.css("paddingTop"),10)||0),(u?Math.max(i.scrollWidth,i.offsetWidth):i.offsetWidth)-(parseInt(t.css("borderRightWidth"),10)||0)-(parseInt(t.css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(u?Math.max(i.scrollHeight,i.offsetHeight):i.offsetHeight)-(parseInt(t.css("borderBottomWidth"),10)||0)-(parseInt(t.css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relative_container=t),undefined):(this.containment=null,undefined)},_convertPositionTo:function(t,i){i||(i=this.position);var r="absolute"===t?1:-1,u="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&n.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent;return this.offset.scroll||(this.offset.scroll={top:u.scrollTop(),left:u.scrollLeft()}),{top:i.top+this.offset.relative.top*r+this.offset.parent.top*r-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():this.offset.scroll.top)*r,left:i.left+this.offset.relative.left*r+this.offset.parent.left*r-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():this.offset.scroll.left)*r}},_generatePosition:function(t){var i,e,u,f,r=this.options,h="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&n.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,o=t.pageX,s=t.pageY;return this.offset.scroll||(this.offset.scroll={top:h.scrollTop(),left:h.scrollLeft()}),this.originalPosition&&(this.containment&&(this.relative_container?(e=this.relative_container.offset(),i=[this.containment[0]+e.left,this.containment[1]+e.top,this.containment[2]+e.left,this.containment[3]+e.top]):i=this.containment,t.pageX-this.offset.click.left<i[0]&&(o=i[0]+this.offset.click.left),t.pageY-this.offset.click.top<i[1]&&(s=i[1]+this.offset.click.top),t.pageX-this.offset.click.left>i[2]&&(o=i[2]+this.offset.click.left),t.pageY-this.offset.click.top>i[3]&&(s=i[3]+this.offset.click.top)),r.grid&&(u=r.grid[1]?this.originalPageY+Math.round((s-this.originalPageY)/r.grid[1])*r.grid[1]:this.originalPageY,s=i?u-this.offset.click.top>=i[1]||u-this.offset.click.top>i[3]?u:u-this.offset.click.top>=i[1]?u-r.grid[1]:u+r.grid[1]:u,f=r.grid[0]?this.originalPageX+Math.round((o-this.originalPageX)/r.grid[0])*r.grid[0]:this.originalPageX,o=i?f-this.offset.click.left>=i[0]||f-this.offset.click.left>i[2]?f:f-this.offset.click.left>=i[0]?f-r.grid[0]:f+r.grid[0]:f)),{top:s-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():this.offset.scroll.top),left:o-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():this.offset.scroll.left)}},_clear:function(){this.helper.removeClass("ui-draggable-dragging");this.helper[0]===this.element[0]||this.cancelHelperRemoval||this.helper.remove();this.helper=null;this.cancelHelperRemoval=!1},_trigger:function(t,i,r){return r=r||this._uiHash(),n.ui.plugin.call(this,t,[i,r]),"drag"===t&&(this.positionAbs=this._convertPositionTo("absolute")),n.Widget.prototype._trigger.call(this,t,i,r)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}});n.ui.plugin.add("draggable","connectToSortable",{start:function(t,i){var r=n(this).data("ui-draggable"),u=r.options,f=n.extend({},i,{item:r.element});r.sortables=[];n(u.connectToSortable).each(function(){var i=n.data(this,"ui-sortable");i&&!i.options.disabled&&(r.sortables.push({instance:i,shouldRevert:i.options.revert}),i.refreshPositions(),i._trigger("activate",t,f))})},stop:function(t,i){var r=n(this).data("ui-draggable"),u=n.extend({},i,{item:r.element});n.each(r.sortables,function(){this.instance.isOver?(this.instance.isOver=0,r.cancelHelperRemoval=!0,this.instance.cancelHelperRemoval=!1,this.shouldRevert&&(this.instance.options.revert=this.shouldRevert),this.instance._mouseStop(t),this.instance.options.helper=this.instance.options._helper,"original"===r.options.helper&&this.instance.currentItem.css({top:"auto",left:"auto"})):(this.instance.cancelHelperRemoval=!1,this.instance._trigger("deactivate",t,u))})},drag:function(t,i){var r=n(this).data("ui-draggable"),u=this;n.each(r.sortables,function(){var f=!1,e=this;this.instance.positionAbs=r.positionAbs;this.instance.helperProportions=r.helperProportions;this.instance.offset.click=r.offset.click;this.instance._intersectsWith(this.instance.containerCache)&&(f=!0,n.each(r.sortables,function(){return this.instance.positionAbs=r.positionAbs,this.instance.helperProportions=r.helperProportions,this.instance.offset.click=r.offset.click,this!==e&&this.instance._intersectsWith(this.instance.containerCache)&&n.contains(e.instance.element[0],this.instance.element[0])&&(f=!1),f}));f?(this.instance.isOver||(this.instance.isOver=1,this.instance.currentItem=n(u).clone().removeAttr("id").appendTo(this.instance.element).data("ui-sortable-item",!0),this.instance.options._helper=this.instance.options.helper,this.instance.options.helper=function(){return i.helper[0]},t.target=this.instance.currentItem[0],this.instance._mouseCapture(t,!0),this.instance._mouseStart(t,!0,!0),this.instance.offset.click.top=r.offset.click.top,this.instance.offset.click.left=r.offset.click.left,this.instance.offset.parent.left-=r.offset.parent.left-this.instance.offset.parent.left,this.instance.offset.parent.top-=r.offset.parent.top-this.instance.offset.parent.top,r._trigger("toSortable",t),r.dropped=this.instance.element,r.currentItem=r.element,this.instance.fromOutside=r),this.instance.currentItem&&this.instance._mouseDrag(t)):this.instance.isOver&&(this.instance.isOver=0,this.instance.cancelHelperRemoval=!0,this.instance.options.revert=!1,this.instance._trigger("out",t,this.instance._uiHash(this.instance)),this.instance._mouseStop(t,!0),this.instance.options.helper=this.instance.options._helper,this.instance.currentItem.remove(),this.instance.placeholder&&this.instance.placeholder.remove(),r._trigger("fromSortable",t),r.dropped=!1)})}});n.ui.plugin.add("draggable","cursor",{start:function(){var t=n("body"),i=n(this).data("ui-draggable").options;t.css("cursor")&&(i._cursor=t.css("cursor"));t.css("cursor",i.cursor)},stop:function(){var t=n(this).data("ui-draggable").options;t._cursor&&n("body").css("cursor",t._cursor)}});n.ui.plugin.add("draggable","opacity",{start:function(t,i){var r=n(i.helper),u=n(this).data("ui-draggable").options;r.css("opacity")&&(u._opacity=r.css("opacity"));r.css("opacity",u.opacity)},stop:function(t,i){var r=n(this).data("ui-draggable").options;r._opacity&&n(i.helper).css("opacity",r._opacity)}});n.ui.plugin.add("draggable","scroll",{start:function(){var t=n(this).data("ui-draggable");t.scrollParent[0]!==document&&"HTML"!==t.scrollParent[0].tagName&&(t.overflowOffset=t.scrollParent.offset())},drag:function(t){var r=n(this).data("ui-draggable"),i=r.options,u=!1;r.scrollParent[0]!==document&&"HTML"!==r.scrollParent[0].tagName?(i.axis&&"x"===i.axis||(r.overflowOffset.top+r.scrollParent[0].offsetHeight-t.pageY<i.scrollSensitivity?r.scrollParent[0].scrollTop=u=r.scrollParent[0].scrollTop+i.scrollSpeed:t.pageY-r.overflowOffset.top<i.scrollSensitivity&&(r.scrollParent[0].scrollTop=u=r.scrollParent[0].scrollTop-i.scrollSpeed)),i.axis&&"y"===i.axis||(r.overflowOffset.left+r.scrollParent[0].offsetWidth-t.pageX<i.scrollSensitivity?r.scrollParent[0].scrollLeft=u=r.scrollParent[0].scrollLeft+i.scrollSpeed:t.pageX-r.overflowOffset.left<i.scrollSensitivity&&(r.scrollParent[0].scrollLeft=u=r.scrollParent[0].scrollLeft-i.scrollSpeed))):(i.axis&&"x"===i.axis||(t.pageY-n(document).scrollTop()<i.scrollSensitivity?u=n(document).scrollTop(n(document).scrollTop()-i.scrollSpeed):n(window).height()-(t.pageY-n(document).scrollTop())<i.scrollSensitivity&&(u=n(document).scrollTop(n(document).scrollTop()+i.scrollSpeed))),i.axis&&"y"===i.axis||(t.pageX-n(document).scrollLeft()<i.scrollSensitivity?u=n(document).scrollLeft(n(document).scrollLeft()-i.scrollSpeed):n(window).width()-(t.pageX-n(document).scrollLeft())<i.scrollSensitivity&&(u=n(document).scrollLeft(n(document).scrollLeft()+i.scrollSpeed))));u!==!1&&n.ui.ddmanager&&!i.dropBehaviour&&n.ui.ddmanager.prepareOffsets(r,t)}});n.ui.plugin.add("draggable","snap",{start:function(){var t=n(this).data("ui-draggable"),i=t.options;t.snapElements=[];n(i.snap.constructor!==String?i.snap.items||":data(ui-draggable)":i.snap).each(function(){var i=n(this),r=i.offset();this!==t.element[0]&&t.snapElements.push({item:this,width:i.outerWidth(),height:i.outerHeight(),top:r.top,left:r.left})})},drag:function(t,i){for(var e,o,s,h,c,a,l,v,w,r=n(this).data("ui-draggable"),b=r.options,f=b.snapTolerance,y=i.offset.left,k=y+r.helperProportions.width,p=i.offset.top,d=p+r.helperProportions.height,u=r.snapElements.length-1;u>=0;u--)c=r.snapElements[u].left,a=c+r.snapElements[u].width,l=r.snapElements[u].top,v=l+r.snapElements[u].height,c-f>k||y>a+f||l-f>d||p>v+f||!n.contains(r.snapElements[u].item.ownerDocument,r.snapElements[u].item)?(r.snapElements[u].snapping&&r.options.snap.release&&r.options.snap.release.call(r.element,t,n.extend(r._uiHash(),{snapItem:r.snapElements[u].item})),r.snapElements[u].snapping=!1):("inner"!==b.snapMode&&(e=f>=Math.abs(l-d),o=f>=Math.abs(v-p),s=f>=Math.abs(c-k),h=f>=Math.abs(a-y),e&&(i.position.top=r._convertPositionTo("relative",{top:l-r.helperProportions.height,left:0}).top-r.margins.top),o&&(i.position.top=r._convertPositionTo("relative",{top:v,left:0}).top-r.margins.top),s&&(i.position.left=r._convertPositionTo("relative",{top:0,left:c-r.helperProportions.width}).left-r.margins.left),h&&(i.position.left=r._convertPositionTo("relative",{top:0,left:a}).left-r.margins.left)),w=e||o||s||h,"outer"!==b.snapMode&&(e=f>=Math.abs(l-p),o=f>=Math.abs(v-d),s=f>=Math.abs(c-y),h=f>=Math.abs(a-k),e&&(i.position.top=r._convertPositionTo("relative",{top:l,left:0}).top-r.margins.top),o&&(i.position.top=r._convertPositionTo("relative",{top:v-r.helperProportions.height,left:0}).top-r.margins.top),s&&(i.position.left=r._convertPositionTo("relative",{top:0,left:c}).left-r.margins.left),h&&(i.position.left=r._convertPositionTo("relative",{top:0,left:a-r.helperProportions.width}).left-r.margins.left)),!r.snapElements[u].snapping&&(e||o||s||h||w)&&r.options.snap.snap&&r.options.snap.snap.call(r.element,t,n.extend(r._uiHash(),{snapItem:r.snapElements[u].item})),r.snapElements[u].snapping=e||o||s||h||w)}});n.ui.plugin.add("draggable","stack",{start:function(){var i,r=this.data("ui-draggable").options,t=n.makeArray(n(r.stack)).sort(function(t,i){return(parseInt(n(t).css("zIndex"),10)||0)-(parseInt(n(i).css("zIndex"),10)||0)});t.length&&(i=parseInt(n(t[0]).css("zIndex"),10)||0,n(t).each(function(t){n(this).css("zIndex",i+t)}),this.css("zIndex",i+t.length))}});n.ui.plugin.add("draggable","zIndex",{start:function(t,i){var r=n(i.helper),u=n(this).data("ui-draggable").options;r.css("zIndex")&&(u._zIndex=r.css("zIndex"));r.css("zIndex",u.zIndex)},stop:function(t,i){var r=n(this).data("ui-draggable").options;r._zIndex&&n(i.helper).css("zIndex",r._zIndex)}})}(jQuery),function(n){function t(n,t,i){return n>t&&t+i>n}n.widget("ui.droppable",{version:"1.10.3",widgetEventPrefix:"drop",options:{accept:"*",activeClass:!1,addClasses:!0,greedy:!1,hoverClass:!1,scope:"default",tolerance:"intersect",activate:null,deactivate:null,drop:null,out:null,over:null},_create:function(){var t=this.options,i=t.accept;this.isover=!1;this.isout=!0;this.accept=n.isFunction(i)?i:function(n){return n.is(i)};this.proportions={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight};n.ui.ddmanager.droppables[t.scope]=n.ui.ddmanager.droppables[t.scope]||[];n.ui.ddmanager.droppables[t.scope].push(this);t.addClasses&&this.element.addClass("ui-droppable")},_destroy:function(){for(var t=0,i=n.ui.ddmanager.droppables[this.options.scope];i.length>t;t++)i[t]===this&&i.splice(t,1);this.element.removeClass("ui-droppable ui-droppable-disabled")},_setOption:function(t,i){"accept"===t&&(this.accept=n.isFunction(i)?i:function(n){return n.is(i)});n.Widget.prototype._setOption.apply(this,arguments)},_activate:function(t){var i=n.ui.ddmanager.current;this.options.activeClass&&this.element.addClass(this.options.activeClass);i&&this._trigger("activate",t,this.ui(i))},_deactivate:function(t){var i=n.ui.ddmanager.current;this.options.activeClass&&this.element.removeClass(this.options.activeClass);i&&this._trigger("deactivate",t,this.ui(i))},_over:function(t){var i=n.ui.ddmanager.current;i&&(i.currentItem||i.element)[0]!==this.element[0]&&this.accept.call(this.element[0],i.currentItem||i.element)&&(this.options.hoverClass&&this.element.addClass(this.options.hoverClass),this._trigger("over",t,this.ui(i)))},_out:function(t){var i=n.ui.ddmanager.current;i&&(i.currentItem||i.element)[0]!==this.element[0]&&this.accept.call(this.element[0],i.currentItem||i.element)&&(this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("out",t,this.ui(i)))},_drop:function(t,i){var r=i||n.ui.ddmanager.current,u=!1;return r&&(r.currentItem||r.element)[0]!==this.element[0]?(this.element.find(":data(ui-droppable)").not(".ui-draggable-dragging").each(function(){var t=n.data(this,"ui-droppable");return t.options.greedy&&!t.options.disabled&&t.options.scope===r.options.scope&&t.accept.call(t.element[0],r.currentItem||r.element)&&n.ui.intersect(r,n.extend(t,{offset:t.element.offset()}),t.options.tolerance)?(u=!0,!1):undefined}),u?!1:this.accept.call(this.element[0],r.currentItem||r.element)?(this.options.activeClass&&this.element.removeClass(this.options.activeClass),this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("drop",t,this.ui(r)),this.element):!1):!1},ui:function(n){return{draggable:n.currentItem||n.element,helper:n.helper,position:n.position,offset:n.positionAbs}}});n.ui.intersect=function(n,i,r){if(!i.offset)return!1;var a,v,e=(n.positionAbs||n.position.absolute).left,s=e+n.helperProportions.width,o=(n.positionAbs||n.position.absolute).top,h=o+n.helperProportions.height,u=i.offset.left,c=u+i.proportions.width,f=i.offset.top,l=f+i.proportions.height;switch(r){case"fit":return e>=u&&c>=s&&o>=f&&l>=h;case"intersect":return e+n.helperProportions.width/2>u&&c>s-n.helperProportions.width/2&&o+n.helperProportions.height/2>f&&l>h-n.helperProportions.height/2;case"pointer":return a=(n.positionAbs||n.position.absolute).left+(n.clickOffset||n.offset.click).left,v=(n.positionAbs||n.position.absolute).top+(n.clickOffset||n.offset.click).top,t(v,f,i.proportions.height)&&t(a,u,i.proportions.width);case"touch":return(o>=f&&l>=o||h>=f&&l>=h||f>o&&h>l)&&(e>=u&&c>=e||s>=u&&c>=s||u>e&&s>c);default:return!1}};n.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(t,i){var r,f,u=n.ui.ddmanager.droppables[t.options.scope]||[],o=i?i.type:null,e=(t.currentItem||t.element).find(":data(ui-droppable)").addBack();n:for(r=0;u.length>r;r++)if(!(u[r].options.disabled||t&&!u[r].accept.call(u[r].element[0],t.currentItem||t.element))){for(f=0;e.length>f;f++)if(e[f]===u[r].element[0]){u[r].proportions.height=0;continue n}u[r].visible="none"!==u[r].element.css("display");u[r].visible&&("mousedown"===o&&u[r]._activate.call(u[r],i),u[r].offset=u[r].element.offset(),u[r].proportions={width:u[r].element[0].offsetWidth,height:u[r].element[0].offsetHeight})}},drop:function(t,i){var r=!1;return n.each((n.ui.ddmanager.droppables[t.options.scope]||[]).slice(),function(){this.options&&(!this.options.disabled&&this.visible&&n.ui.intersect(t,this,this.options.tolerance)&&(r=this._drop.call(this,i)||r),!this.options.disabled&&this.visible&&this.accept.call(this.element[0],t.currentItem||t.element)&&(this.isout=!0,this.isover=!1,this._deactivate.call(this,i)))}),r},dragStart:function(t,i){t.element.parentsUntil("body").bind("scroll.droppable",function(){t.options.refreshPositions||n.ui.ddmanager.prepareOffsets(t,i)})},drag:function(t,i){t.options.refreshPositions&&n.ui.ddmanager.prepareOffsets(t,i);n.each(n.ui.ddmanager.droppables[t.options.scope]||[],function(){if(!this.options.disabled&&!this.greedyChild&&this.visible){var r,e,f,o=n.ui.intersect(t,this,this.options.tolerance),u=!o&&this.isover?"isout":o&&!this.isover?"isover":null;u&&(this.options.greedy&&(e=this.options.scope,f=this.element.parents(":data(ui-droppable)").filter(function(){return n.data(this,"ui-droppable").options.scope===e}),f.length&&(r=n.data(f[0],"ui-droppable"),r.greedyChild="isover"===u)),r&&"isover"===u&&(r.isover=!1,r.isout=!0,r._out.call(r,i)),this[u]=!0,this["isout"===u?"isover":"isout"]=!1,this["isover"===u?"_over":"_out"].call(this,i),r&&"isout"===u&&(r.isout=!1,r.isover=!0,r._over.call(r,i)))}})},dragStop:function(t,i){t.element.parentsUntil("body").unbind("scroll.droppable");t.options.refreshPositions||n.ui.ddmanager.prepareOffsets(t,i)}}}(jQuery),function(n){function i(n){return parseInt(n,10)||0}function t(n){return!isNaN(parseInt(n,10))}n.widget("ui.resizable",n.ui.mouse,{version:"1.10.3",widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!1,containment:!1,ghost:!1,grid:!1,handles:"e,s,se",helper:!1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:90,resize:null,start:null,stop:null},_create:function(){var e,f,r,i,o,u=this,t=this.options;if(this.element.addClass("ui-resizable"),n.extend(this,{_aspectRatio:!!t.aspectRatio,aspectRatio:t.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:t.helper||t.ghost||t.animate?t.helper||"ui-resizable-helper":null}),this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)&&(this.element.wrap(n("<div class='ui-wrapper' style='overflow: hidden;'><\/div>").css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),this.element=this.element.parent().data("ui-resizable",this.element.data("ui-resizable")),this.elementIsWrapper=!0,this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")}),this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0}),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this.originalElement.css({margin:this.originalElement.css("margin")}),this._proportionallyResize()),this.handles=t.handles||(n(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se"),this.handles.constructor===String)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),e=this.handles.split(","),this.handles={},f=0;e.length>f;f++)r=n.trim(e[f]),o="ui-resizable-"+r,i=n("<div class='ui-resizable-handle "+o+"'><\/div>"),i.css({zIndex:t.zIndex}),"se"===r&&i.addClass("ui-icon ui-icon-gripsmall-diagonal-se"),this.handles[r]=".ui-resizable-"+r,this.element.append(i);this._renderAxis=function(t){var i,r,u,f;t=t||this.element;for(i in this.handles)this.handles[i].constructor===String&&(this.handles[i]=n(this.handles[i],this.element).show()),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)&&(r=n(this.handles[i],this.element),f=/sw|ne|nw|se|n|s/.test(i)?r.outerHeight():r.outerWidth(),u=["padding",/ne|nw|n/.test(i)?"Top":/se|sw|s/.test(i)?"Bottom":/^e$/.test(i)?"Right":"Left"].join(""),t.css(u,f),this._proportionallyResize()),n(this.handles[i]).length};this._renderAxis(this.element);this._handles=n(".ui-resizable-handle",this.element).disableSelection();this._handles.mouseover(function(){u.resizing||(this.className&&(i=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),u.axis=i&&i[1]?i[1]:"se")});t.autoHide&&(this._handles.hide(),n(this.element).addClass("ui-resizable-autohide").mouseenter(function(){t.disabled||(n(this).removeClass("ui-resizable-autohide"),u._handles.show())}).mouseleave(function(){t.disabled||u.resizing||(n(this).addClass("ui-resizable-autohide"),u._handles.hide())}));this._mouseInit()},_destroy:function(){this._mouseDestroy();var t,i=function(t){n(t).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").removeData("ui-resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};return this.elementIsWrapper&&(i(this.element),t=this.element,this.originalElement.css({position:t.css("position"),width:t.outerWidth(),height:t.outerHeight(),top:t.css("top"),left:t.css("left")}).insertAfter(t),t.remove()),this.originalElement.css("resize",this.originalResizeStyle),i(this.originalElement),this},_mouseCapture:function(t){var r,i,u=!1;for(r in this.handles)i=n(this.handles[r])[0],(i===t.target||n.contains(i,t.target))&&(u=!0);return!this.options.disabled&&u},_mouseStart:function(t){var f,e,o,u=this.options,s=this.element.position(),r=this.element;return this.resizing=!0,/absolute/.test(r.css("position"))?r.css({position:"absolute",top:r.css("top"),left:r.css("left")}):r.is(".ui-draggable")&&r.css({position:"absolute",top:s.top,left:s.left}),this._renderProxy(),f=i(this.helper.css("left")),e=i(this.helper.css("top")),u.containment&&(f+=n(u.containment).scrollLeft()||0,e+=n(u.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:f,top:e},this.size=this._helper?{width:r.outerWidth(),height:r.outerHeight()}:{width:r.width(),height:r.height()},this.originalSize=this._helper?{width:r.outerWidth(),height:r.outerHeight()}:{width:r.width(),height:r.height()},this.originalPosition={left:f,top:e},this.sizeDiff={width:r.outerWidth()-r.width(),height:r.outerHeight()-r.height()},this.originalMousePosition={left:t.pageX,top:t.pageY},this.aspectRatio="number"==typeof u.aspectRatio?u.aspectRatio:this.originalSize.width/this.originalSize.height||1,o=n(".ui-resizable-"+this.axis).css("cursor"),n("body").css("cursor","auto"===o?this.axis+"-resize":o),r.addClass("ui-resizable-resizing"),this._propagate("start",t),!0},_mouseDrag:function(t){var i,e=this.helper,r={},u=this.originalMousePosition,o=this.axis,s=this.position.top,h=this.position.left,c=this.size.width,l=this.size.height,a=t.pageX-u.left||0,v=t.pageY-u.top||0,f=this._change[o];return f?(i=f.apply(this,[t,a,v]),this._updateVirtualBoundaries(t.shiftKey),(this._aspectRatio||t.shiftKey)&&(i=this._updateRatio(i,t)),i=this._respectSize(i,t),this._updateCache(i),this._propagate("resize",t),this.position.top!==s&&(r.top=this.position.top+"px"),this.position.left!==h&&(r.left=this.position.left+"px"),this.size.width!==c&&(r.width=this.size.width+"px"),this.size.height!==l&&(r.height=this.size.height+"px"),e.css(r),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),n.isEmptyObject(r)||this._trigger("resize",t,this.ui()),!1):!1},_mouseStop:function(t){this.resizing=!1;var r,u,f,e,o,s,h,c=this.options,i=this;return this._helper&&(r=this._proportionallyResizeElements,u=r.length&&/textarea/i.test(r[0].nodeName),f=u&&n.ui.hasScroll(r[0],"left")?0:i.sizeDiff.height,e=u?0:i.sizeDiff.width,o={width:i.helper.width()-e,height:i.helper.height()-f},s=parseInt(i.element.css("left"),10)+(i.position.left-i.originalPosition.left)||null,h=parseInt(i.element.css("top"),10)+(i.position.top-i.originalPosition.top)||null,c.animate||this.element.css(n.extend(o,{top:h,left:s})),i.helper.height(i.size.height),i.helper.width(i.size.width),this._helper&&!c.animate&&this._proportionallyResize()),n("body").css("cursor","auto"),this.element.removeClass("ui-resizable-resizing"),this._propagate("stop",t),this._helper&&this.helper.remove(),!1},_updateVirtualBoundaries:function(n){var u,f,e,o,i,r=this.options;i={minWidth:t(r.minWidth)?r.minWidth:0,maxWidth:t(r.maxWidth)?r.maxWidth:1/0,minHeight:t(r.minHeight)?r.minHeight:0,maxHeight:t(r.maxHeight)?r.maxHeight:1/0};(this._aspectRatio||n)&&(u=i.minHeight*this.aspectRatio,e=i.minWidth/this.aspectRatio,f=i.maxHeight*this.aspectRatio,o=i.maxWidth/this.aspectRatio,u>i.minWidth&&(i.minWidth=u),e>i.minHeight&&(i.minHeight=e),i.maxWidth>f&&(i.maxWidth=f),i.maxHeight>o&&(i.maxHeight=o));this._vBoundaries=i},_updateCache:function(n){this.offset=this.helper.offset();t(n.left)&&(this.position.left=n.left);t(n.top)&&(this.position.top=n.top);t(n.height)&&(this.size.height=n.height);t(n.width)&&(this.size.width=n.width)},_updateRatio:function(n){var i=this.position,r=this.size,u=this.axis;return t(n.height)?n.width=n.height*this.aspectRatio:t(n.width)&&(n.height=n.width/this.aspectRatio),"sw"===u&&(n.left=i.left+(r.width-n.width),n.top=null),"nw"===u&&(n.top=i.top+(r.height-n.height),n.left=i.left+(r.width-n.width)),n},_respectSize:function(n){var i=this._vBoundaries,r=this.axis,u=t(n.width)&&i.maxWidth&&i.maxWidth<n.width,f=t(n.height)&&i.maxHeight&&i.maxHeight<n.height,e=t(n.width)&&i.minWidth&&i.minWidth>n.width,o=t(n.height)&&i.minHeight&&i.minHeight>n.height,s=this.originalPosition.left+this.originalSize.width,h=this.position.top+this.size.height,c=/sw|nw|w/.test(r),l=/nw|ne|n/.test(r);return e&&(n.width=i.minWidth),o&&(n.height=i.minHeight),u&&(n.width=i.maxWidth),f&&(n.height=i.maxHeight),e&&c&&(n.left=s-i.minWidth),u&&c&&(n.left=s-i.maxWidth),o&&l&&(n.top=h-i.minHeight),f&&l&&(n.top=h-i.maxHeight),n.width||n.height||n.left||!n.top?n.width||n.height||n.top||!n.left||(n.left=null):n.top=null,n},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var t,r,u,n,f=this.helper||this.element,i=0;this._proportionallyResizeElements.length>i;i++){if(n=this._proportionallyResizeElements[i],!this.borderDif)for(this.borderDif=[],r=[n.css("borderTopWidth"),n.css("borderRightWidth"),n.css("borderBottomWidth"),n.css("borderLeftWidth")],u=[n.css("paddingTop"),n.css("paddingRight"),n.css("paddingBottom"),n.css("paddingLeft")],t=0;r.length>t;t++)this.borderDif[t]=(parseInt(r[t],10)||0)+(parseInt(u[t],10)||0);n.css({height:f.height()-this.borderDif[0]-this.borderDif[2]||0,width:f.width()-this.borderDif[1]-this.borderDif[3]||0})}},_renderProxy:function(){var t=this.element,i=this.options;this.elementOffset=t.offset();this._helper?(this.helper=this.helper||n("<div style='overflow:hidden;'><\/div>"),this.helper.addClass(this._helper).css({width:this.element.outerWidth()-1,height:this.element.outerHeight()-1,position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++i.zIndex}),this.helper.appendTo("body").disableSelection()):this.helper=this.element},_change:{e:function(n,t){return{width:this.originalSize.width+t}},w:function(n,t){var i=this.originalSize,r=this.originalPosition;return{left:r.left+t,width:i.width-t}},n:function(n,t,i){var r=this.originalSize,u=this.originalPosition;return{top:u.top+i,height:r.height-i}},s:function(n,t,i){return{height:this.originalSize.height+i}},se:function(t,i,r){return n.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[t,i,r]))},sw:function(t,i,r){return n.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[t,i,r]))},ne:function(t,i,r){return n.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[t,i,r]))},nw:function(t,i,r){return n.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[t,i,r]))}},_propagate:function(t,i){n.ui.plugin.call(this,t,[i,this.ui()]);"resize"!==t&&this._trigger(t,i,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}});n.ui.plugin.add("resizable","animate",{stop:function(t){var i=n(this).data("ui-resizable"),u=i.options,r=i._proportionallyResizeElements,f=r.length&&/textarea/i.test(r[0].nodeName),s=f&&n.ui.hasScroll(r[0],"left")?0:i.sizeDiff.height,h=f?0:i.sizeDiff.width,c={width:i.size.width-h,height:i.size.height-s},e=parseInt(i.element.css("left"),10)+(i.position.left-i.originalPosition.left)||null,o=parseInt(i.element.css("top"),10)+(i.position.top-i.originalPosition.top)||null;i.element.animate(n.extend(c,o&&e?{top:o,left:e}:{}),{duration:u.animateDuration,easing:u.animateEasing,step:function(){var u={width:parseInt(i.element.css("width"),10),height:parseInt(i.element.css("height"),10),top:parseInt(i.element.css("top"),10),left:parseInt(i.element.css("left"),10)};r&&r.length&&n(r[0]).css({width:u.width,height:u.height});i._updateCache(u);i._propagate("resize",t)}})}});n.ui.plugin.add("resizable","containment",{start:function(){var u,e,o,s,h,c,l,t=n(this).data("ui-resizable"),a=t.options,v=t.element,f=a.containment,r=f instanceof n?f.get(0):/parent/.test(f)?v.parent().get(0):f;r&&(t.containerElement=n(r),/document/.test(f)||f===document?(t.containerOffset={left:0,top:0},t.containerPosition={left:0,top:0},t.parentData={element:n(document),left:0,top:0,width:n(document).width(),height:n(document).height()||document.body.parentNode.scrollHeight}):(u=n(r),e=[],n(["Top","Right","Left","Bottom"]).each(function(n,t){e[n]=i(u.css("padding"+t))}),t.containerOffset=u.offset(),t.containerPosition=u.position(),t.containerSize={height:u.innerHeight()-e[3],width:u.innerWidth()-e[1]},o=t.containerOffset,s=t.containerSize.height,h=t.containerSize.width,c=n.ui.hasScroll(r,"left")?r.scrollWidth:h,l=n.ui.hasScroll(r)?r.scrollHeight:s,t.parentData={element:r,left:o.left,top:o.top,width:c,height:l}))},resize:function(t){var f,o,s,h,i=n(this).data("ui-resizable"),a=i.options,r=i.containerOffset,c=i.position,e=i._aspectRatio||t.shiftKey,u={top:0,left:0},l=i.containerElement;l[0]!==document&&/static/.test(l.css("position"))&&(u=r);c.left<(i._helper?r.left:0)&&(i.size.width=i.size.width+(i._helper?i.position.left-r.left:i.position.left-u.left),e&&(i.size.height=i.size.width/i.aspectRatio),i.position.left=a.helper?r.left:0);c.top<(i._helper?r.top:0)&&(i.size.height=i.size.height+(i._helper?i.position.top-r.top:i.position.top),e&&(i.size.width=i.size.height*i.aspectRatio),i.position.top=i._helper?r.top:0);i.offset.left=i.parentData.left+i.position.left;i.offset.top=i.parentData.top+i.position.top;f=Math.abs((i._helper?i.offset.left-u.left:i.offset.left-u.left)+i.sizeDiff.width);o=Math.abs((i._helper?i.offset.top-u.top:i.offset.top-r.top)+i.sizeDiff.height);s=i.containerElement.get(0)===i.element.parent().get(0);h=/relative|absolute/.test(i.containerElement.css("position"));s&&h&&(f-=i.parentData.left);f+i.size.width>=i.parentData.width&&(i.size.width=i.parentData.width-f,e&&(i.size.height=i.size.width/i.aspectRatio));o+i.size.height>=i.parentData.height&&(i.size.height=i.parentData.height-o,e&&(i.size.width=i.size.height*i.aspectRatio))},stop:function(){var t=n(this).data("ui-resizable"),r=t.options,u=t.containerOffset,f=t.containerPosition,e=t.containerElement,i=n(t.helper),o=i.offset(),s=i.outerWidth()-t.sizeDiff.width,h=i.outerHeight()-t.sizeDiff.height;t._helper&&!r.animate&&/relative/.test(e.css("position"))&&n(this).css({left:o.left-f.left-u.left,width:s,height:h});t._helper&&!r.animate&&/static/.test(e.css("position"))&&n(this).css({left:o.left-f.left-u.left,width:s,height:h})}});n.ui.plugin.add("resizable","alsoResize",{start:function(){var r=n(this).data("ui-resizable"),t=r.options,i=function(t){n(t).each(function(){var t=n(this);t.data("ui-resizable-alsoresize",{width:parseInt(t.width(),10),height:parseInt(t.height(),10),left:parseInt(t.css("left"),10),top:parseInt(t.css("top"),10)})})};"object"!=typeof t.alsoResize||t.alsoResize.parentNode?i(t.alsoResize):t.alsoResize.length?(t.alsoResize=t.alsoResize[0],i(t.alsoResize)):n.each(t.alsoResize,function(n){i(n)})},resize:function(t,i){var r=n(this).data("ui-resizable"),u=r.options,f=r.originalSize,e=r.originalPosition,s={height:r.size.height-f.height||0,width:r.size.width-f.width||0,top:r.position.top-e.top||0,left:r.position.left-e.left||0},o=function(t,r){n(t).each(function(){var t=n(this),f=n(this).data("ui-resizable-alsoresize"),u={},e=r&&r.length?r:t.parents(i.originalElement[0]).length?["width","height"]:["width","height","top","left"];n.each(e,function(n,t){var i=(f[t]||0)+(s[t]||0);i&&i>=0&&(u[t]=i||null)});t.css(u)})};"object"!=typeof u.alsoResize||u.alsoResize.nodeType?o(u.alsoResize):n.each(u.alsoResize,function(n,t){o(n,t)})},stop:function(){n(this).removeData("resizable-alsoresize")}});n.ui.plugin.add("resizable","ghost",{start:function(){var t=n(this).data("ui-resizable"),i=t.options,r=t.size;t.ghost=t.originalElement.clone();t.ghost.css({opacity:.25,display:"block",position:"relative",height:r.height,width:r.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass("string"==typeof i.ghost?i.ghost:"");t.ghost.appendTo(t.helper)},resize:function(){var t=n(this).data("ui-resizable");t.ghost&&t.ghost.css({position:"relative",height:t.size.height,width:t.size.width})},stop:function(){var t=n(this).data("ui-resizable");t.ghost&&t.helper&&t.helper.get(0).removeChild(t.ghost.get(0))}});n.ui.plugin.add("resizable","grid",{resize:function(){var t=n(this).data("ui-resizable"),i=t.options,v=t.size,f=t.originalSize,e=t.originalPosition,h=t.axis,c="number"==typeof i.grid?[i.grid,i.grid]:i.grid,o=c[0]||1,s=c[1]||1,l=Math.round((v.width-f.width)/o)*o,a=Math.round((v.height-f.height)/s)*s,r=f.width+l,u=f.height+a,y=i.maxWidth&&r>i.maxWidth,p=i.maxHeight&&u>i.maxHeight,w=i.minWidth&&i.minWidth>r,b=i.minHeight&&i.minHeight>u;i.grid=c;w&&(r+=o);b&&(u+=s);y&&(r-=o);p&&(u-=s);/^(se|s|e)$/.test(h)?(t.size.width=r,t.size.height=u):/^(ne)$/.test(h)?(t.size.width=r,t.size.height=u,t.position.top=e.top-a):/^(sw)$/.test(h)?(t.size.width=r,t.size.height=u,t.position.left=e.left-l):(t.size.width=r,t.size.height=u,t.position.top=e.top-a,t.position.left=e.left-l)}})}(jQuery),function(n){n.widget("ui.selectable",n.ui.mouse,{version:"1.10.3",options:{appendTo:"body",autoRefresh:!0,distance:0,filter:"*",tolerance:"touch",selected:null,selecting:null,start:null,stop:null,unselected:null,unselecting:null},_create:function(){var t,i=this;this.element.addClass("ui-selectable");this.dragged=!1;this.refresh=function(){t=n(i.options.filter,i.element[0]);t.addClass("ui-selectee");t.each(function(){var t=n(this),i=t.offset();n.data(this,"selectable-item",{element:this,$element:t,left:i.left,top:i.top,right:i.left+t.outerWidth(),bottom:i.top+t.outerHeight(),startselected:!1,selected:t.hasClass("ui-selected"),selecting:t.hasClass("ui-selecting"),unselecting:t.hasClass("ui-unselecting")})})};this.refresh();this.selectees=t.addClass("ui-selectee");this._mouseInit();this.helper=n("<div class='ui-selectable-helper'><\/div>")},_destroy:function(){this.selectees.removeClass("ui-selectee").removeData("selectable-item");this.element.removeClass("ui-selectable ui-selectable-disabled");this._mouseDestroy()},_mouseStart:function(t){var i=this,r=this.options;this.opos=[t.pageX,t.pageY];this.options.disabled||(this.selectees=n(r.filter,this.element[0]),this._trigger("start",t),n(r.appendTo).append(this.helper),this.helper.css({left:t.pageX,top:t.pageY,width:0,height:0}),r.autoRefresh&&this.refresh(),this.selectees.filter(".ui-selected").each(function(){var r=n.data(this,"selectable-item");r.startselected=!0;t.metaKey||t.ctrlKey||(r.$element.removeClass("ui-selected"),r.selected=!1,r.$element.addClass("ui-unselecting"),r.unselecting=!0,i._trigger("unselecting",t,{unselecting:r.element}))}),n(t.target).parents().addBack().each(function(){var u,r=n.data(this,"selectable-item");return r?(u=!t.metaKey&&!t.ctrlKey||!r.$element.hasClass("ui-selected"),r.$element.removeClass(u?"ui-unselecting":"ui-selected").addClass(u?"ui-selecting":"ui-unselecting"),r.unselecting=!u,r.selecting=u,r.selected=u,u?i._trigger("selecting",t,{selecting:r.element}):i._trigger("unselecting",t,{unselecting:r.element}),!1):undefined}))},_mouseDrag:function(t){if(this.dragged=!0,!this.options.disabled){var e,o=this,s=this.options,i=this.opos[0],r=this.opos[1],u=t.pageX,f=t.pageY;return i>u&&(e=u,u=i,i=e),r>f&&(e=f,f=r,r=e),this.helper.css({left:i,top:r,width:u-i,height:f-r}),this.selectees.each(function(){var e=n.data(this,"selectable-item"),h=!1;e&&e.element!==o.element[0]&&("touch"===s.tolerance?h=!(e.left>u||i>e.right||e.top>f||r>e.bottom):"fit"===s.tolerance&&(h=e.left>i&&u>e.right&&e.top>r&&f>e.bottom),h?(e.selected&&(e.$element.removeClass("ui-selected"),e.selected=!1),e.unselecting&&(e.$element.removeClass("ui-unselecting"),e.unselecting=!1),e.selecting||(e.$element.addClass("ui-selecting"),e.selecting=!0,o._trigger("selecting",t,{selecting:e.element}))):(e.selecting&&((t.metaKey||t.ctrlKey)&&e.startselected?(e.$element.removeClass("ui-selecting"),e.selecting=!1,e.$element.addClass("ui-selected"),e.selected=!0):(e.$element.removeClass("ui-selecting"),e.selecting=!1,e.startselected&&(e.$element.addClass("ui-unselecting"),e.unselecting=!0),o._trigger("unselecting",t,{unselecting:e.element}))),e.selected&&(t.metaKey||t.ctrlKey||e.startselected||(e.$element.removeClass("ui-selected"),e.selected=!1,e.$element.addClass("ui-unselecting"),e.unselecting=!0,o._trigger("unselecting",t,{unselecting:e.element})))))}),!1}},_mouseStop:function(t){var i=this;return this.dragged=!1,n(".ui-unselecting",this.element[0]).each(function(){var r=n.data(this,"selectable-item");r.$element.removeClass("ui-unselecting");r.unselecting=!1;r.startselected=!1;i._trigger("unselected",t,{unselected:r.element})}),n(".ui-selecting",this.element[0]).each(function(){var r=n.data(this,"selectable-item");r.$element.removeClass("ui-selecting").addClass("ui-selected");r.selecting=!1;r.selected=!0;r.startselected=!0;i._trigger("selected",t,{selected:r.element})}),this._trigger("stop",t),this.helper.remove(),!1}})}(jQuery),function(n){function t(n,t,i){return n>t&&t+i>n}function i(n){return/left|right/.test(n.css("float"))||/inline|table-cell/.test(n.css("display"))}n.widget("ui.sortable",n.ui.mouse,{version:"1.10.3",widgetEventPrefix:"sort",ready:!1,options:{appendTo:"parent",axis:!1,connectWith:!1,containment:!1,cursor:"auto",cursorAt:!1,dropOnEmpty:!0,forcePlaceholderSize:!1,forceHelperSize:!1,grid:!1,handle:!1,helper:"original",items:"> *",opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1e3,activate:null,beforeStop:null,change:null,deactivate:null,out:null,over:null,receive:null,remove:null,sort:null,start:null,stop:null,update:null},_create:function(){var n=this.options;this.containerCache={};this.element.addClass("ui-sortable");this.refresh();this.floating=this.items.length?"x"===n.axis||i(this.items[0].item):!1;this.offset=this.element.offset();this._mouseInit();this.ready=!0},_destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled");this._mouseDestroy();for(var n=this.items.length-1;n>=0;n--)this.items[n].item.removeData(this.widgetName+"-item");return this},_setOption:function(t,i){"disabled"===t?(this.options[t]=i,this.widget().toggleClass("ui-sortable-disabled",!!i)):n.Widget.prototype._setOption.apply(this,arguments)},_mouseCapture:function(t,i){var r=null,f=!1,u=this;return this.reverting?!1:this.options.disabled||"static"===this.options.type?!1:(this._refreshItems(t),n(t.target).parents().each(function(){return n.data(this,u.widgetName+"-item")===u?(r=n(this),!1):undefined}),n.data(t.target,u.widgetName+"-item")===u&&(r=n(t.target)),r?!this.options.handle||i||(n(this.options.handle,r).find("*").addBack().each(function(){this===t.target&&(f=!0)}),f)?(this.currentItem=r,this._removeCurrentsFromItems(),!0):!1:!1)},_mouseStart:function(t,i,r){var f,e,u=this.options;if(this.currentContainer=this,this.refreshPositions(),this.helper=this._createHelper(t),this._cacheHelperProportions(),this._cacheMargins(),this.scrollParent=this.helper.scrollParent(),this.offset=this.currentItem.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},n.extend(this.offset,{click:{left:t.pageX-this.offset.left,top:t.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.helper.css("position","absolute"),this.cssPosition=this.helper.css("position"),this.originalPosition=this._generatePosition(t),this.originalPageX=t.pageX,this.originalPageY=t.pageY,u.cursorAt&&this._adjustOffsetFromHelper(u.cursorAt),this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]},this.helper[0]!==this.currentItem[0]&&this.currentItem.hide(),this._createPlaceholder(),u.containment&&this._setContainment(),u.cursor&&"auto"!==u.cursor&&(e=this.document.find("body"),this.storedCursor=e.css("cursor"),e.css("cursor",u.cursor),this.storedStylesheet=n("<style>*{ cursor: "+u.cursor+" !important; }<\/style>").appendTo(e)),u.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",u.opacity)),u.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",u.zIndex)),this.scrollParent[0]!==document&&"HTML"!==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",t,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions(),!r)for(f=this.containers.length-1;f>=0;f--)this.containers[f]._trigger("activate",t,this._uiHash(this));return n.ui.ddmanager&&(n.ui.ddmanager.current=this),n.ui.ddmanager&&!u.dropBehaviour&&n.ui.ddmanager.prepareOffsets(this,t),this.dragging=!0,this.helper.addClass("ui-sortable-helper"),this._mouseDrag(t),!0},_mouseDrag:function(t){var e,u,f,o,i=this.options,r=!1;for(this.position=this._generatePosition(t),this.positionAbs=this._convertPositionTo("absolute"),this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs),this.options.scroll&&(this.scrollParent[0]!==document&&"HTML"!==this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-t.pageY<i.scrollSensitivity?this.scrollParent[0].scrollTop=r=this.scrollParent[0].scrollTop+i.scrollSpeed:t.pageY-this.overflowOffset.top<i.scrollSensitivity&&(this.scrollParent[0].scrollTop=r=this.scrollParent[0].scrollTop-i.scrollSpeed),this.overflowOffset.left+this.scrollParent[0].offsetWidth-t.pageX<i.scrollSensitivity?this.scrollParent[0].scrollLeft=r=this.scrollParent[0].scrollLeft+i.scrollSpeed:t.pageX-this.overflowOffset.left<i.scrollSensitivity&&(this.scrollParent[0].scrollLeft=r=this.scrollParent[0].scrollLeft-i.scrollSpeed)):(t.pageY-n(document).scrollTop()<i.scrollSensitivity?r=n(document).scrollTop(n(document).scrollTop()-i.scrollSpeed):n(window).height()-(t.pageY-n(document).scrollTop())<i.scrollSensitivity&&(r=n(document).scrollTop(n(document).scrollTop()+i.scrollSpeed)),t.pageX-n(document).scrollLeft()<i.scrollSensitivity?r=n(document).scrollLeft(n(document).scrollLeft()-i.scrollSpeed):n(window).width()-(t.pageX-n(document).scrollLeft())<i.scrollSensitivity&&(r=n(document).scrollLeft(n(document).scrollLeft()+i.scrollSpeed))),r!==!1&&n.ui.ddmanager&&!i.dropBehaviour&&n.ui.ddmanager.prepareOffsets(this,t)),this.positionAbs=this._convertPositionTo("absolute"),this.options.axis&&"y"===this.options.axis||(this.helper[0].style.left=this.position.left+"px"),this.options.axis&&"x"===this.options.axis||(this.helper[0].style.top=this.position.top+"px"),e=this.items.length-1;e>=0;e--)if(u=this.items[e],f=u.item[0],o=this._intersectsWithPointer(u),o&&u.instance===this.currentContainer&&f!==this.currentItem[0]&&this.placeholder[1===o?"next":"prev"]()[0]!==f&&!n.contains(this.placeholder[0],f)&&("semi-dynamic"===this.options.type?!n.contains(this.element[0],f):!0)){if(this.direction=1===o?"down":"up","pointer"!==this.options.tolerance&&!this._intersectsWithSides(u))break;this._rearrange(t,u);this._trigger("change",t,this._uiHash());break}return this._contactContainers(t),n.ui.ddmanager&&n.ui.ddmanager.drag(this,t),this._trigger("sort",t,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(t,i){if(t){if(n.ui.ddmanager&&!this.options.dropBehaviour&&n.ui.ddmanager.drop(this,t),this.options.revert){var e=this,f=this.placeholder.offset(),r=this.options.axis,u={};r&&"x"!==r||(u.left=f.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]===document.body?0:this.offsetParent[0].scrollLeft));r&&"y"!==r||(u.top=f.top-this.offset.parent.top-this.margins.top+(this.offsetParent[0]===document.body?0:this.offsetParent[0].scrollTop));this.reverting=!0;n(this.helper).animate(u,parseInt(this.options.revert,10)||500,function(){e._clear(t)})}else this._clear(t,i);return!1}},cancel:function(){if(this.dragging){this._mouseUp({target:null});"original"===this.options.helper?this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"):this.currentItem.show();for(var t=this.containers.length-1;t>=0;t--)this.containers[t]._trigger("deactivate",null,this._uiHash(this)),this.containers[t].containerCache.over&&(this.containers[t]._trigger("out",null,this._uiHash(this)),this.containers[t].containerCache.over=0)}return this.placeholder&&(this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]),"original"!==this.options.helper&&this.helper&&this.helper[0].parentNode&&this.helper.remove(),n.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?n(this.domPosition.prev).after(this.currentItem):n(this.domPosition.parent).prepend(this.currentItem)),this},serialize:function(t){var r=this._getItemsAsjQuery(t&&t.connected),i=[];return t=t||{},n(r).each(function(){var r=(n(t.item||this).attr(t.attribute||"id")||"").match(t.expression||/(.+)[\-=_](.+)/);r&&i.push((t.key||r[1]+"[]")+"="+(t.key&&t.expression?r[1]:r[2]))}),!i.length&&t.key&&i.push(t.key+"="),i.join("&")},toArray:function(t){var r=this._getItemsAsjQuery(t&&t.connected),i=[];return t=t||{},r.each(function(){i.push(n(t.item||this).attr(t.attribute||"id")||"")}),i},_intersectsWith:function(n){var t=this.positionAbs.left,h=t+this.helperProportions.width,i=this.positionAbs.top,c=i+this.helperProportions.height,r=n.left,f=r+n.width,u=n.top,e=u+n.height,o=this.offset.click.top,s=this.offset.click.left,l="x"===this.options.axis||i+o>u&&e>i+o,a="y"===this.options.axis||t+s>r&&f>t+s,v=l&&a;return"pointer"===this.options.tolerance||this.options.forcePointerForContainers||"pointer"!==this.options.tolerance&&this.helperProportions[this.floating?"width":"height"]>n[this.floating?"width":"height"]?v:t+this.helperProportions.width/2>r&&f>h-this.helperProportions.width/2&&i+this.helperProportions.height/2>u&&e>c-this.helperProportions.height/2},_intersectsWithPointer:function(n){var u="x"===this.options.axis||t(this.positionAbs.top+this.offset.click.top,n.top,n.height),f="y"===this.options.axis||t(this.positionAbs.left+this.offset.click.left,n.left,n.width),e=u&&f,i=this._getDragVerticalDirection(),r=this._getDragHorizontalDirection();return e?this.floating?r&&"right"===r||"down"===i?2:1:i&&("down"===i?2:1):!1},_intersectsWithSides:function(n){var u=t(this.positionAbs.top+this.offset.click.top,n.top+n.height/2,n.height),f=t(this.positionAbs.left+this.offset.click.left,n.left+n.width/2,n.width),i=this._getDragVerticalDirection(),r=this._getDragHorizontalDirection();return this.floating&&r?"right"===r&&f||"left"===r&&!f:i&&("down"===i&&u||"up"===i&&!u)},_getDragVerticalDirection:function(){var n=this.positionAbs.top-this.lastPositionAbs.top;return 0!==n&&(n>0?"down":"up")},_getDragHorizontalDirection:function(){var n=this.positionAbs.left-this.lastPositionAbs.left;return 0!==n&&(n>0?"right":"left")},refresh:function(n){return this._refreshItems(n),this.refreshPositions(),this},_connectWith:function(){var n=this.options;return n.connectWith.constructor===String?[n.connectWith]:n.connectWith},_getItemsAsjQuery:function(t){var r,u,e,i,s=[],f=[],o=this._connectWith();if(o&&t)for(r=o.length-1;r>=0;r--)for(e=n(o[r]),u=e.length-1;u>=0;u--)i=n.data(e[u],this.widgetFullName),i&&i!==this&&!i.options.disabled&&f.push([n.isFunction(i.options.items)?i.options.items.call(i.element):n(i.options.items,i.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),i]);for(f.push([n.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):n(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]),r=f.length-1;r>=0;r--)f[r][0].each(function(){s.push(this)});return n(s)},_removeCurrentsFromItems:function(){var t=this.currentItem.find(":data("+this.widgetName+"-item)");this.items=n.grep(this.items,function(n){for(var i=0;t.length>i;i++)if(t[i]===n.item[0])return!1;return!0})},_refreshItems:function(t){this.items=[];this.containers=[this];var r,u,e,i,o,s,h,l,a=this.items,f=[[n.isFunction(this.options.items)?this.options.items.call(this.element[0],t,{item:this.currentItem}):n(this.options.items,this.element),this]],c=this._connectWith();if(c&&this.ready)for(r=c.length-1;r>=0;r--)for(e=n(c[r]),u=e.length-1;u>=0;u--)i=n.data(e[u],this.widgetFullName),i&&i!==this&&!i.options.disabled&&(f.push([n.isFunction(i.options.items)?i.options.items.call(i.element[0],t,{item:this.currentItem}):n(i.options.items,i.element),i]),this.containers.push(i));for(r=f.length-1;r>=0;r--)for(o=f[r][1],s=f[r][0],u=0,l=s.length;l>u;u++)h=n(s[u]),h.data(this.widgetName+"-item",o),a.push({item:h,instance:o,width:0,height:0,left:0,top:0})},refreshPositions:function(t){this.offsetParent&&this.helper&&(this.offset.parent=this._getParentOffset());for(var r,f,u,i=this.items.length-1;i>=0;i--)r=this.items[i],r.instance!==this.currentContainer&&this.currentContainer&&r.item[0]!==this.currentItem[0]||(f=this.options.toleranceElement?n(this.options.toleranceElement,r.item):r.item,t||(r.width=f.outerWidth(),r.height=f.outerHeight()),u=f.offset(),r.left=u.left,r.top=u.top);if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(i=this.containers.length-1;i>=0;i--)u=this.containers[i].element.offset(),this.containers[i].containerCache.left=u.left,this.containers[i].containerCache.top=u.top,this.containers[i].containerCache.width=this.containers[i].element.outerWidth(),this.containers[i].containerCache.height=this.containers[i].element.outerHeight();return this},_createPlaceholder:function(t){t=t||this;var r,i=t.options;i.placeholder&&i.placeholder.constructor!==String||(r=i.placeholder,i.placeholder={element:function(){var u=t.currentItem[0].nodeName.toLowerCase(),i=n("<"+u+">",t.document[0]).addClass(r||t.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper");return"tr"===u?t.currentItem.children().each(function(){n("<td>&#160;<\/td>",t.document[0]).attr("colspan",n(this).attr("colspan")||1).appendTo(i)}):"img"===u&&i.attr("src",t.currentItem.attr("src")),r||i.css("visibility","hidden"),i},update:function(n,u){(!r||i.forcePlaceholderSize)&&(u.height()||u.height(t.currentItem.innerHeight()-parseInt(t.currentItem.css("paddingTop")||0,10)-parseInt(t.currentItem.css("paddingBottom")||0,10)),u.width()||u.width(t.currentItem.innerWidth()-parseInt(t.currentItem.css("paddingLeft")||0,10)-parseInt(t.currentItem.css("paddingRight")||0,10)))}});t.placeholder=n(i.placeholder.element.call(t.element,t.currentItem));t.currentItem.after(t.placeholder);i.placeholder.update(t,t.placeholder)},_contactContainers:function(r){for(var f,v,s,l,y,h,o,p,a,c=null,e=null,u=this.containers.length-1;u>=0;u--)if(!n.contains(this.currentItem[0],this.containers[u].element[0]))if(this._intersectsWith(this.containers[u].containerCache)){if(c&&n.contains(this.containers[u].element[0],c.element[0]))continue;c=this.containers[u];e=u}else this.containers[u].containerCache.over&&(this.containers[u]._trigger("out",r,this._uiHash(this)),this.containers[u].containerCache.over=0);if(c)if(1===this.containers.length)this.containers[e].containerCache.over||(this.containers[e]._trigger("over",r,this._uiHash(this)),this.containers[e].containerCache.over=1);else{for(v=1e4,s=null,a=c.floating||i(this.currentItem),l=a?"left":"top",y=a?"width":"height",h=this.positionAbs[l]+this.offset.click[l],f=this.items.length-1;f>=0;f--)n.contains(this.containers[e].element[0],this.items[f].item[0])&&this.items[f].item[0]!==this.currentItem[0]&&(!a||t(this.positionAbs.top+this.offset.click.top,this.items[f].top,this.items[f].height))&&(o=this.items[f].item.offset()[l],p=!1,Math.abs(o-h)>Math.abs(o+this.items[f][y]-h)&&(p=!0,o+=this.items[f][y]),v>Math.abs(o-h)&&(v=Math.abs(o-h),s=this.items[f],this.direction=p?"up":"down"));if(!s&&!this.options.dropOnEmpty)return;if(this.currentContainer===this.containers[e])return;s?this._rearrange(r,s,null,!0):this._rearrange(r,null,this.containers[e].element,!0);this._trigger("change",r,this._uiHash());this.containers[e]._trigger("change",r,this._uiHash(this));this.currentContainer=this.containers[e];this.options.placeholder.update(this.currentContainer,this.placeholder);this.containers[e]._trigger("over",r,this._uiHash(this));this.containers[e].containerCache.over=1}},_createHelper:function(t){var r=this.options,i=n.isFunction(r.helper)?n(r.helper.apply(this.element[0],[t,this.currentItem])):"clone"===r.helper?this.currentItem.clone():this.currentItem;return i.parents("body").length||n("parent"!==r.appendTo?r.appendTo:this.currentItem[0].parentNode)[0].appendChild(i[0]),i[0]===this.currentItem[0]&&(this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")}),(!i[0].style.width||r.forceHelperSize)&&i.width(this.currentItem.width()),(!i[0].style.height||r.forceHelperSize)&&i.height(this.currentItem.height()),i},_adjustOffsetFromHelper:function(t){"string"==typeof t&&(t=t.split(" "));n.isArray(t)&&(t={left:+t[0],top:+t[1]||0});"left"in t&&(this.offset.click.left=t.left+this.margins.left);"right"in t&&(this.offset.click.left=this.helperProportions.width-t.right+this.margins.left);"top"in t&&(this.offset.click.top=t.top+this.margins.top);"bottom"in t&&(this.offset.click.top=this.helperProportions.height-t.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var t=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==document&&n.contains(this.scrollParent[0],this.offsetParent[0])&&(t.left+=this.scrollParent.scrollLeft(),t.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]===document.body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&n.ui.ie)&&(t={top:0,left:0}),{top:t.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:t.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"===this.cssPosition){var n=this.currentItem.position();return{top:n.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:n.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.currentItem.css("marginLeft"),10)||0,top:parseInt(this.currentItem.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var t,r,u,i=this.options;"parent"===i.containment&&(i.containment=this.helper[0].parentNode);("document"===i.containment||"window"===i.containment)&&(this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,n("document"===i.containment?document:window).width()-this.helperProportions.width-this.margins.left,(n("document"===i.containment?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]);/^(document|window|parent)$/.test(i.containment)||(t=n(i.containment)[0],r=n(i.containment).offset(),u="hidden"!==n(t).css("overflow"),this.containment=[r.left+(parseInt(n(t).css("borderLeftWidth"),10)||0)+(parseInt(n(t).css("paddingLeft"),10)||0)-this.margins.left,r.top+(parseInt(n(t).css("borderTopWidth"),10)||0)+(parseInt(n(t).css("paddingTop"),10)||0)-this.margins.top,r.left+(u?Math.max(t.scrollWidth,t.offsetWidth):t.offsetWidth)-(parseInt(n(t).css("borderLeftWidth"),10)||0)-(parseInt(n(t).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,r.top+(u?Math.max(t.scrollHeight,t.offsetHeight):t.offsetHeight)-(parseInt(n(t).css("borderTopWidth"),10)||0)-(parseInt(n(t).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top])},_convertPositionTo:function(t,i){i||(i=this.position);var r="absolute"===t?1:-1,u="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&n.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,f=/(html|body)/i.test(u[0].tagName);return{top:i.top+this.offset.relative.top*r+this.offset.parent.top*r-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():f?0:u.scrollTop())*r,left:i.left+this.offset.relative.left*r+this.offset.parent.left*r-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():f?0:u.scrollLeft())*r}},_generatePosition:function(t){var r,u,i=this.options,f=t.pageX,e=t.pageY,o="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&n.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,s=/(html|body)/i.test(o[0].tagName);return"relative"!==this.cssPosition||this.scrollParent[0]!==document&&this.scrollParent[0]!==this.offsetParent[0]||(this.offset.relative=this._getRelativeOffset()),this.originalPosition&&(this.containment&&(t.pageX-this.offset.click.left<this.containment[0]&&(f=this.containment[0]+this.offset.click.left),t.pageY-this.offset.click.top<this.containment[1]&&(e=this.containment[1]+this.offset.click.top),t.pageX-this.offset.click.left>this.containment[2]&&(f=this.containment[2]+this.offset.click.left),t.pageY-this.offset.click.top>this.containment[3]&&(e=this.containment[3]+this.offset.click.top)),i.grid&&(r=this.originalPageY+Math.round((e-this.originalPageY)/i.grid[1])*i.grid[1],e=this.containment?r-this.offset.click.top>=this.containment[1]&&r-this.offset.click.top<=this.containment[3]?r:r-this.offset.click.top>=this.containment[1]?r-i.grid[1]:r+i.grid[1]:r,u=this.originalPageX+Math.round((f-this.originalPageX)/i.grid[0])*i.grid[0],f=this.containment?u-this.offset.click.left>=this.containment[0]&&u-this.offset.click.left<=this.containment[2]?u:u-this.offset.click.left>=this.containment[0]?u-i.grid[0]:u+i.grid[0]:u)),{top:e-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():s?0:o.scrollTop()),left:f-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():s?0:o.scrollLeft())}},_rearrange:function(n,t,i,r){i?i[0].appendChild(this.placeholder[0]):t.item[0].parentNode.insertBefore(this.placeholder[0],"down"===this.direction?t.item[0]:t.item[0].nextSibling);this.counter=this.counter?++this.counter:1;var u=this.counter;this._delay(function(){u===this.counter&&this.refreshPositions(!r)})},_clear:function(n,t){this.reverting=!1;var i,r=[];if(!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem),this._noFinalSort=null,this.helper[0]===this.currentItem[0]){for(i in this._storedCSS)("auto"===this._storedCSS[i]||"static"===this._storedCSS[i])&&(this._storedCSS[i]="");this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else this.currentItem.show();for(this.fromOutside&&!t&&r.push(function(n){this._trigger("receive",n,this._uiHash(this.fromOutside))}),!this.fromOutside&&this.domPosition.prev===this.currentItem.prev().not(".ui-sortable-helper")[0]&&this.domPosition.parent===this.currentItem.parent()[0]||t||r.push(function(n){this._trigger("update",n,this._uiHash())}),this!==this.currentContainer&&(t||(r.push(function(n){this._trigger("remove",n,this._uiHash())}),r.push(function(n){return function(t){n._trigger("receive",t,this._uiHash(this))}}.call(this,this.currentContainer)),r.push(function(n){return function(t){n._trigger("update",t,this._uiHash(this))}}.call(this,this.currentContainer)))),i=this.containers.length-1;i>=0;i--)t||r.push(function(n){return function(t){n._trigger("deactivate",t,this._uiHash(this))}}.call(this,this.containers[i])),this.containers[i].containerCache.over&&(r.push(function(n){return function(t){n._trigger("out",t,this._uiHash(this))}}.call(this,this.containers[i])),this.containers[i].containerCache.over=0);if(this.storedCursor&&(this.document.find("body").css("cursor",this.storedCursor),this.storedStylesheet.remove()),this._storedOpacity&&this.helper.css("opacity",this._storedOpacity),this._storedZIndex&&this.helper.css("zIndex","auto"===this._storedZIndex?"":this._storedZIndex),this.dragging=!1,this.cancelHelperRemoval){if(!t){for(this._trigger("beforeStop",n,this._uiHash()),i=0;r.length>i;i++)r[i].call(this,n);this._trigger("stop",n,this._uiHash())}return this.fromOutside=!1,!1}if(t||this._trigger("beforeStop",n,this._uiHash()),this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.helper[0]!==this.currentItem[0]&&this.helper.remove(),this.helper=null,!t){for(i=0;r.length>i;i++)r[i].call(this,n);this._trigger("stop",n,this._uiHash())}return this.fromOutside=!1,!0},_trigger:function(){n.Widget.prototype._trigger.apply(this,arguments)===!1&&this.cancel()},_uiHash:function(t){var i=t||this;return{helper:i.helper,placeholder:i.placeholder||n([]),position:i.position,originalPosition:i.originalPosition,offset:i.positionAbs,item:i.currentItem,sender:t?t.element:null}}})}(jQuery),function(n){var r=0,t={},i={};t.height=t.paddingTop=t.paddingBottom=t.borderTopWidth=t.borderBottomWidth="hide";i.height=i.paddingTop=i.paddingBottom=i.borderTopWidth=i.borderBottomWidth="show";n.widget("ui.accordion",{version:"1.10.3",options:{active:0,animate:{},collapsible:!1,event:"click",header:"> li > :first-child,> :not(li):even",heightStyle:"auto",icons:{activeHeader:"ui-icon-triangle-1-s",header:"ui-icon-triangle-1-e"},activate:null,beforeActivate:null},_create:function(){var t=this.options;this.prevShow=this.prevHide=n();this.element.addClass("ui-accordion ui-widget ui-helper-reset").attr("role","tablist");t.collapsible||t.active!==!1&&null!=t.active||(t.active=0);this._processPanels();0>t.active&&(t.active+=this.headers.length);this._refresh()},_getCreateEventData:function(){return{header:this.active,panel:this.active.length?this.active.next():n(),content:this.active.length?this.active.next():n()}},_createIcons:function(){var t=this.options.icons;t&&(n("<span>").addClass("ui-accordion-header-icon ui-icon "+t.header).prependTo(this.headers),this.active.children(".ui-accordion-header-icon").removeClass(t.header).addClass(t.activeHeader),this.headers.addClass("ui-accordion-icons"))},_destroyIcons:function(){this.headers.removeClass("ui-accordion-icons").children(".ui-accordion-header-icon").remove()},_destroy:function(){var n;this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role");this.headers.removeClass("ui-accordion-header ui-accordion-header-active ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top").removeAttr("role").removeAttr("aria-selected").removeAttr("aria-controls").removeAttr("tabIndex").each(function(){/^ui-accordion/.test(this.id)&&this.removeAttribute("id")});this._destroyIcons();n=this.headers.next().css("display","").removeAttr("role").removeAttr("aria-expanded").removeAttr("aria-hidden").removeAttr("aria-labelledby").removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-state-disabled").each(function(){/^ui-accordion/.test(this.id)&&this.removeAttribute("id")});"content"!==this.options.heightStyle&&n.css("height","")},_setOption:function(n,t){return"active"===n?(this._activate(t),undefined):("event"===n&&(this.options.event&&this._off(this.headers,this.options.event),this._setupEvents(t)),this._super(n,t),"collapsible"!==n||t||this.options.active!==!1||this._activate(0),"icons"===n&&(this._destroyIcons(),t&&this._createIcons()),"disabled"===n&&this.headers.add(this.headers.next()).toggleClass("ui-state-disabled",!!t),undefined)},_keydown:function(t){if(!t.altKey&&!t.ctrlKey){var i=n.ui.keyCode,u=this.headers.length,f=this.headers.index(t.target),r=!1;switch(t.keyCode){case i.RIGHT:case i.DOWN:r=this.headers[(f+1)%u];break;case i.LEFT:case i.UP:r=this.headers[(f-1+u)%u];break;case i.SPACE:case i.ENTER:this._eventHandler(t);break;case i.HOME:r=this.headers[0];break;case i.END:r=this.headers[u-1]}r&&(n(t.target).attr("tabIndex",-1),n(r).attr("tabIndex",0),r.focus(),t.preventDefault())}},_panelKeyDown:function(t){t.keyCode===n.ui.keyCode.UP&&t.ctrlKey&&n(t.currentTarget).prev().focus()},refresh:function(){var t=this.options;this._processPanels();t.active===!1&&t.collapsible===!0||!this.headers.length?(t.active=!1,this.active=n()):t.active===!1?this._activate(0):this.active.length&&!n.contains(this.element[0],this.active[0])?this.headers.length===this.headers.find(".ui-state-disabled").length?(t.active=!1,this.active=n()):this._activate(Math.max(0,t.active-1)):t.active=this.headers.index(this.active);this._destroyIcons();this._refresh()},_processPanels:function(){this.headers=this.element.find(this.options.header).addClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all");this.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom").filter(":not(.ui-accordion-content-active)").hide()},_refresh:function(){var t,i=this.options,u=i.heightStyle,e=this.element.parent(),f=this.accordionId="ui-accordion-"+(this.element.attr("id")||++r);this.active=this._findActive(i.active).addClass("ui-accordion-header-active ui-state-active ui-corner-top").removeClass("ui-corner-all");this.active.next().addClass("ui-accordion-content-active").show();this.headers.attr("role","tab").each(function(t){var i=n(this),r=i.attr("id"),e=i.next(),u=e.attr("id");r||(r=f+"-header-"+t,i.attr("id",r));u||(u=f+"-panel-"+t,e.attr("id",u));i.attr("aria-controls",u);e.attr("aria-labelledby",r)}).next().attr("role","tabpanel");this.headers.not(this.active).attr({"aria-selected":"false",tabIndex:-1}).next().attr({"aria-expanded":"false","aria-hidden":"true"}).hide();this.active.length?this.active.attr({"aria-selected":"true",tabIndex:0}).next().attr({"aria-expanded":"true","aria-hidden":"false"}):this.headers.eq(0).attr("tabIndex",0);this._createIcons();this._setupEvents(i.event);"fill"===u?(t=e.height(),this.element.siblings(":visible").each(function(){var i=n(this),r=i.css("position");"absolute"!==r&&"fixed"!==r&&(t-=i.outerHeight(!0))}),this.headers.each(function(){t-=n(this).outerHeight(!0)}),this.headers.next().each(function(){n(this).height(Math.max(0,t-n(this).innerHeight()+n(this).height()))}).css("overflow","auto")):"auto"===u&&(t=0,this.headers.next().each(function(){t=Math.max(t,n(this).css("height","").height())}).height(t))},_activate:function(t){var i=this._findActive(t)[0];i!==this.active[0]&&(i=i||this.active[0],this._eventHandler({target:i,currentTarget:i,preventDefault:n.noop}))},_findActive:function(t){return"number"==typeof t?this.headers.eq(t):n()},_setupEvents:function(t){var i={keydown:"_keydown"};t&&n.each(t.split(" "),function(n,t){i[t]="_eventHandler"});this._off(this.headers.add(this.headers.next()));this._on(this.headers,i);this._on(this.headers.next(),{keydown:"_panelKeyDown"});this._hoverable(this.headers);this._focusable(this.headers)},_eventHandler:function(t){var i=this.options,u=this.active,r=n(t.currentTarget),f=r[0]===u[0],e=f&&i.collapsible,s=e?n():r.next(),h=u.next(),o={oldHeader:u,oldPanel:h,newHeader:e?n():r,newPanel:s};t.preventDefault();f&&!i.collapsible||this._trigger("beforeActivate",t,o)===!1||(i.active=e?!1:this.headers.index(r),this.active=f?n():r,this._toggle(o),u.removeClass("ui-accordion-header-active ui-state-active"),i.icons&&u.children(".ui-accordion-header-icon").removeClass(i.icons.activeHeader).addClass(i.icons.header),f||(r.removeClass("ui-corner-all").addClass("ui-accordion-header-active ui-state-active ui-corner-top"),i.icons&&r.children(".ui-accordion-header-icon").removeClass(i.icons.header).addClass(i.icons.activeHeader),r.next().addClass("ui-accordion-content-active")))},_toggle:function(t){var r=t.newPanel,i=this.prevShow.length?this.prevShow:t.oldPanel;this.prevShow.add(this.prevHide).stop(!0,!0);this.prevShow=r;this.prevHide=i;this.options.animate?this._animate(r,i,t):(i.hide(),r.show(),this._toggleComplete(t));i.attr({"aria-expanded":"false","aria-hidden":"true"});i.prev().attr("aria-selected","false");r.length&&i.length?i.prev().attr("tabIndex",-1):r.length&&this.headers.filter(function(){return 0===n(this).attr("tabIndex")}).attr("tabIndex",-1);r.attr({"aria-expanded":"true","aria-hidden":"false"}).prev().attr({"aria-selected":"true",tabIndex:0})},_animate:function(n,r,u){var l,f,e,a=this,h=0,v=n.length&&(!r.length||n.index()<r.index()),s=this.options.animate||{},o=v&&s.down||s,c=function(){a._toggleComplete(u)};return"number"==typeof o&&(e=o),"string"==typeof o&&(f=o),f=f||o.easing||s.easing,e=e||o.duration||s.duration,r.length?n.length?(l=n.show().outerHeight(),r.animate(t,{duration:e,easing:f,step:function(n,t){t.now=Math.round(n)}}),n.hide().animate(i,{duration:e,easing:f,complete:c,step:function(n,t){t.now=Math.round(n);"height"!==t.prop?h+=t.now:"content"!==a.options.heightStyle&&(t.now=Math.round(l-r.outerHeight()-h),h=0)}}),undefined):r.animate(t,e,f,c):n.animate(i,e,f,c)},_toggleComplete:function(n){var t=n.oldPanel;t.removeClass("ui-accordion-content-active").prev().removeClass("ui-corner-top").addClass("ui-corner-all");t.length&&(t.parent()[0].className=t.parent()[0].className);this._trigger("activate",null,n)}})}(jQuery),function(n){var t=0;n.widget("ui.autocomplete",{version:"1.10.3",defaultElement:"<input>",options:{appendTo:null,autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},pending:0,_create:function(){var t,i,r,u=this.element[0].nodeName.toLowerCase(),f="textarea"===u,e="input"===u;this.isMultiLine=f?!0:e?!1:this.element.prop("isContentEditable");this.valueMethod=this.element[f||e?"val":"text"];this.isNewMenu=!0;this.element.addClass("ui-autocomplete-input").attr("autocomplete","off");this._on(this.element,{keydown:function(u){if(this.element.prop("readOnly"))return t=!0,r=!0,i=!0,undefined;t=!1;r=!1;i=!1;var f=n.ui.keyCode;switch(u.keyCode){case f.PAGE_UP:t=!0;this._move("previousPage",u);break;case f.PAGE_DOWN:t=!0;this._move("nextPage",u);break;case f.UP:t=!0;this._keyEvent("previous",u);break;case f.DOWN:t=!0;this._keyEvent("next",u);break;case f.ENTER:case f.NUMPAD_ENTER:this.menu.active&&(t=!0,u.preventDefault(),this.menu.select(u));break;case f.TAB:this.menu.active&&this.menu.select(u);break;case f.ESCAPE:this.menu.element.is(":visible")&&(this._value(this.term),this.close(u),u.preventDefault());break;default:i=!0;this._searchTimeout(u)}},keypress:function(r){if(t)return t=!1,(!this.isMultiLine||this.menu.element.is(":visible"))&&r.preventDefault(),undefined;if(!i){var u=n.ui.keyCode;switch(r.keyCode){case u.PAGE_UP:this._move("previousPage",r);break;case u.PAGE_DOWN:this._move("nextPage",r);break;case u.UP:this._keyEvent("previous",r);break;case u.DOWN:this._keyEvent("next",r)}}},input:function(n){return r?(r=!1,n.preventDefault(),undefined):(this._searchTimeout(n),undefined)},focus:function(){this.selectedItem=null;this.previous=this._value()},blur:function(n){return this.cancelBlur?(delete this.cancelBlur,undefined):(clearTimeout(this.searching),this.close(n),this._change(n),undefined)}});this._initSource();this.menu=n("<ul>").addClass("ui-autocomplete ui-front").appendTo(this._appendTo()).menu({role:null}).hide().data("ui-menu");this._on(this.menu.element,{mousedown:function(t){t.preventDefault();this.cancelBlur=!0;this._delay(function(){delete this.cancelBlur});var i=this.menu.element[0];n(t.target).closest(".ui-menu-item").length||this._delay(function(){var t=this;this.document.one("mousedown",function(r){r.target===t.element[0]||r.target===i||n.contains(i,r.target)||t.close()})})},menufocus:function(t,i){if(this.isNewMenu&&(this.isNewMenu=!1,t.originalEvent&&/^mouse/.test(t.originalEvent.type)))return this.menu.blur(),this.document.one("mousemove",function(){n(t.target).trigger(t.originalEvent)}),undefined;var r=i.item.data("ui-autocomplete-item");!1!==this._trigger("focus",t,{item:r})?t.originalEvent&&/^key/.test(t.originalEvent.type)&&this._value(r.value):this.liveRegion.text(r.value)},menuselect:function(n,t){var i=t.item.data("ui-autocomplete-item"),r=this.previous;this.element[0]!==this.document[0].activeElement&&(this.element.focus(),this.previous=r,this._delay(function(){this.previous=r;this.selectedItem=i}));!1!==this._trigger("select",n,{item:i})&&this._value(i.value);this.term=this._value();this.close(n);this.selectedItem=i}});this.liveRegion=n("<span>",{role:"status","aria-live":"polite"}).addClass("ui-helper-hidden-accessible").insertBefore(this.element);this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_destroy:function(){clearTimeout(this.searching);this.element.removeClass("ui-autocomplete-input").removeAttr("autocomplete");this.menu.element.remove();this.liveRegion.remove()},_setOption:function(n,t){this._super(n,t);"source"===n&&this._initSource();"appendTo"===n&&this.menu.element.appendTo(this._appendTo());"disabled"===n&&t&&this.xhr&&this.xhr.abort()},_appendTo:function(){var t=this.options.appendTo;return t&&(t=t.jquery||t.nodeType?n(t):this.document.find(t).eq(0)),t||(t=this.element.closest(".ui-front")),t.length||(t=this.document[0].body),t},_initSource:function(){var i,r,t=this;n.isArray(this.options.source)?(i=this.options.source,this.source=function(t,r){r(n.ui.autocomplete.filter(i,t.term))}):"string"==typeof this.options.source?(r=this.options.source,this.source=function(i,u){t.xhr&&t.xhr.abort();t.xhr=n.ajax({url:r,data:i,dataType:"json",success:function(n){u(n)},error:function(){u([])}})}):this.source=this.options.source},_searchTimeout:function(n){clearTimeout(this.searching);this.searching=this._delay(function(){this.term!==this._value()&&(this.selectedItem=null,this.search(null,n))},this.options.delay)},search:function(n,t){return n=null!=n?n:this._value(),this.term=this._value(),n.length<this.options.minLength?this.close(t):this._trigger("search",t)!==!1?this._search(n):undefined},_search:function(n){this.pending++;this.element.addClass("ui-autocomplete-loading");this.cancelSearch=!1;this.source({term:n},this._response())},_response:function(){var n=this,i=++t;return function(r){i===t&&n.__response(r);n.pending--;n.pending||n.element.removeClass("ui-autocomplete-loading")}},__response:function(n){n&&(n=this._normalize(n));this._trigger("response",null,{content:n});!this.options.disabled&&n&&n.length&&!this.cancelSearch?(this._suggest(n),this._trigger("open")):this._close()},close:function(n){this.cancelSearch=!0;this._close(n)},_close:function(n){this.menu.element.is(":visible")&&(this.menu.element.hide(),this.menu.blur(),this.isNewMenu=!0,this._trigger("close",n))},_change:function(n){this.previous!==this._value()&&this._trigger("change",n,{item:this.selectedItem})},_normalize:function(t){return t.length&&t[0].label&&t[0].value?t:n.map(t,function(t){return"string"==typeof t?{label:t,value:t}:n.extend({label:t.label||t.value,value:t.value||t.label},t)})},_suggest:function(t){var i=this.menu.element.empty();this._renderMenu(i,t);this.isNewMenu=!0;this.menu.refresh();i.show();this._resizeMenu();i.position(n.extend({of:this.element},this.options.position));this.options.autoFocus&&this.menu.next()},_resizeMenu:function(){var n=this.menu.element;n.outerWidth(Math.max(n.width("").outerWidth()+1,this.element.outerWidth()))},_renderMenu:function(t,i){var r=this;n.each(i,function(n,i){r._renderItemData(t,i)})},_renderItemData:function(n,t){return this._renderItem(n,t).data("ui-autocomplete-item",t)},_renderItem:function(t,i){return n("<li>").append(n("<a>").text(i.label)).appendTo(t)},_move:function(n,t){return this.menu.element.is(":visible")?this.menu.isFirstItem()&&/^previous/.test(n)||this.menu.isLastItem()&&/^next/.test(n)?(this._value(this.term),this.menu.blur(),undefined):(this.menu[n](t),undefined):(this.search(null,t),undefined)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(n,t){(!this.isMultiLine||this.menu.element.is(":visible"))&&(this._move(n,t),t.preventDefault())}});n.extend(n.ui.autocomplete,{escapeRegex:function(n){return n.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(t,i){var r=RegExp(n.ui.autocomplete.escapeRegex(i),"i");return n.grep(t,function(n){return r.test(n.label||n.value||n)})}});n.widget("ui.autocomplete",n.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(n){return n+(n>1?" results are":" result is")+" available, use up and down arrow keys to navigate."}}},__response:function(n){var t;this._superApply(arguments);this.options.disabled||this.cancelSearch||(t=n&&n.length?this.options.messages.results(n.length):this.options.messages.noResults,this.liveRegion.text(t))}})}(jQuery),function(n){var i,r,u,t,f="ui-button ui-widget ui-state-default ui-corner-all",s="ui-state-hover ui-state-active ",e="ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only",h=function(){var t=n(this);setTimeout(function(){t.find(":ui-button").button("refresh")},1)},o=function(t){var i=t.name,r=t.form,u=n([]);return i&&(i=i.replace(/'/g,"\\'"),u=r?n(r).find("[name='"+i+"']"):n("[name='"+i+"']",t.ownerDocument).filter(function(){return!this.form})),u};n.widget("ui.button",{version:"1.10.3",defaultElement:"<button>",options:{disabled:null,text:!0,label:null,icons:{primary:null,secondary:null}},_create:function(){this.element.closest("form").unbind("reset"+this.eventNamespace).bind("reset"+this.eventNamespace,h);"boolean"!=typeof this.options.disabled?this.options.disabled=!!this.element.prop("disabled"):this.element.prop("disabled",this.options.disabled);this._determineButtonType();this.hasTitle=!!this.buttonElement.attr("title");var s=this,e=this.options,c="checkbox"===this.type||"radio"===this.type,a=c?"":"ui-state-active",l="ui-state-focus";null===e.label&&(e.label="input"===this.type?this.buttonElement.val():this.buttonElement.html());this._hoverable(this.buttonElement);this.buttonElement.addClass(f).attr("role","button").bind("mouseenter"+this.eventNamespace,function(){e.disabled||this===i&&n(this).addClass("ui-state-active")}).bind("mouseleave"+this.eventNamespace,function(){e.disabled||n(this).removeClass(a)}).bind("click"+this.eventNamespace,function(n){e.disabled&&(n.preventDefault(),n.stopImmediatePropagation())});this.element.bind("focus"+this.eventNamespace,function(){s.buttonElement.addClass(l)}).bind("blur"+this.eventNamespace,function(){s.buttonElement.removeClass(l)});c&&(this.element.bind("change"+this.eventNamespace,function(){t||s.refresh()}),this.buttonElement.bind("mousedown"+this.eventNamespace,function(n){e.disabled||(t=!1,r=n.pageX,u=n.pageY)}).bind("mouseup"+this.eventNamespace,function(n){e.disabled||(r!==n.pageX||u!==n.pageY)&&(t=!0)}));"checkbox"===this.type?this.buttonElement.bind("click"+this.eventNamespace,function(){return e.disabled||t?!1:undefined}):"radio"===this.type?this.buttonElement.bind("click"+this.eventNamespace,function(){if(e.disabled||t)return!1;n(this).addClass("ui-state-active");s.buttonElement.attr("aria-pressed","true");var i=s.element[0];o(i).not(i).map(function(){return n(this).button("widget")[0]}).removeClass("ui-state-active").attr("aria-pressed","false")}):(this.buttonElement.bind("mousedown"+this.eventNamespace,function(){return e.disabled?!1:(n(this).addClass("ui-state-active"),i=this,s.document.one("mouseup",function(){i=null}),undefined)}).bind("mouseup"+this.eventNamespace,function(){return e.disabled?!1:(n(this).removeClass("ui-state-active"),undefined)}).bind("keydown"+this.eventNamespace,function(t){return e.disabled?!1:((t.keyCode===n.ui.keyCode.SPACE||t.keyCode===n.ui.keyCode.ENTER)&&n(this).addClass("ui-state-active"),undefined)}).bind("keyup"+this.eventNamespace+" blur"+this.eventNamespace,function(){n(this).removeClass("ui-state-active")}),this.buttonElement.is("a")&&this.buttonElement.keyup(function(t){t.keyCode===n.ui.keyCode.SPACE&&n(this).click()}));this._setOption("disabled",e.disabled);this._resetButton()},_determineButtonType:function(){var n,t,i;this.type=this.element.is("[type=checkbox]")?"checkbox":this.element.is("[type=radio]")?"radio":this.element.is("input")?"input":"button";"checkbox"===this.type||"radio"===this.type?(n=this.element.parents().last(),t="label[for='"+this.element.attr("id")+"']",this.buttonElement=n.find(t),this.buttonElement.length||(n=n.length?n.siblings():this.element.siblings(),this.buttonElement=n.filter(t),this.buttonElement.length||(this.buttonElement=n.find(t))),this.element.addClass("ui-helper-hidden-accessible"),i=this.element.is(":checked"),i&&this.buttonElement.addClass("ui-state-active"),this.buttonElement.prop("aria-pressed",i)):this.buttonElement=this.element},widget:function(){return this.buttonElement},_destroy:function(){this.element.removeClass("ui-helper-hidden-accessible");this.buttonElement.removeClass(f+" "+s+" "+e).removeAttr("role").removeAttr("aria-pressed").html(this.buttonElement.find(".ui-button-text").html());this.hasTitle||this.buttonElement.removeAttr("title")},_setOption:function(n,t){return this._super(n,t),"disabled"===n?(t?this.element.prop("disabled",!0):this.element.prop("disabled",!1),undefined):(this._resetButton(),undefined)},refresh:function(){var t=this.element.is("input, button")?this.element.is(":disabled"):this.element.hasClass("ui-button-disabled");t!==this.options.disabled&&this._setOption("disabled",t);"radio"===this.type?o(this.element[0]).each(function(){n(this).is(":checked")?n(this).button("widget").addClass("ui-state-active").attr("aria-pressed","true"):n(this).button("widget").removeClass("ui-state-active").attr("aria-pressed","false")}):"checkbox"===this.type&&(this.element.is(":checked")?this.buttonElement.addClass("ui-state-active").attr("aria-pressed","true"):this.buttonElement.removeClass("ui-state-active").attr("aria-pressed","false"))},_resetButton:function(){if("input"===this.type)return this.options.label&&this.element.val(this.options.label),undefined;var i=this.buttonElement.removeClass(e),f=n("<span><\/span>",this.document[0]).addClass("ui-button-text").html(this.options.label).appendTo(i.empty()).text(),t=this.options.icons,u=t.primary&&t.secondary,r=[];t.primary||t.secondary?(this.options.text&&r.push("ui-button-text-icon"+(u?"s":t.primary?"-primary":"-secondary")),t.primary&&i.prepend("<span class='ui-button-icon-primary ui-icon "+t.primary+"'><\/span>"),t.secondary&&i.append("<span class='ui-button-icon-secondary ui-icon "+t.secondary+"'><\/span>"),this.options.text||(r.push(u?"ui-button-icons-only":"ui-button-icon-only"),this.hasTitle||i.attr("title",n.trim(f)))):r.push("ui-button-text-only");i.addClass(r.join(" "))}});n.widget("ui.buttonset",{version:"1.10.3",options:{items:"button, input[type=button], input[type=submit], input[type=reset], input[type=checkbox], input[type=radio], a, :data(ui-button)"},_create:function(){this.element.addClass("ui-buttonset")},_init:function(){this.refresh()},_setOption:function(n,t){"disabled"===n&&this.buttons.button("option",n,t);this._super(n,t)},refresh:function(){var t="rtl"===this.element.css("direction");this.buttons=this.element.find(this.options.items).filter(":ui-button").button("refresh").end().not(":ui-button").button().end().map(function(){return n(this).button("widget")[0]}).removeClass("ui-corner-all ui-corner-left ui-corner-right").filter(":first").addClass(t?"ui-corner-right":"ui-corner-left").end().filter(":last").addClass(t?"ui-corner-left":"ui-corner-right").end().end()},_destroy:function(){this.element.removeClass("ui-buttonset");this.buttons.map(function(){return n(this).button("widget")[0]}).removeClass("ui-corner-left ui-corner-right").end().button("destroy")}})}(jQuery),function(n,t){function f(){this._curInst=null;this._keyEvent=!1;this._disabledInputs=[];this._datepickerShowing=!1;this._inDialog=!1;this._mainDivId="ui-datepicker-div";this._inlineClass="ui-datepicker-inline";this._appendClass="ui-datepicker-append";this._triggerClass="ui-datepicker-trigger";this._dialogClass="ui-datepicker-dialog";this._disableClass="ui-datepicker-disabled";this._unselectableClass="ui-datepicker-unselectable";this._currentClass="ui-datepicker-current-day";this._dayOverClass="ui-datepicker-days-cell-over";this.regional=[];this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""};this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:!1,hideIfNoPrevNext:!1,navigationAsDateFormat:!1,gotoCurrent:!1,changeMonth:!1,changeYear:!1,yearRange:"c-10:c+10",showOtherMonths:!1,selectOtherMonths:!1,showWeek:!1,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:!0,showButtonPanel:!1,autoSize:!1,disabled:!1};n.extend(this._defaults,this.regional[""]);this.dpDiv=e(n("<div id='"+this._mainDivId+"' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'><\/div>"))}function e(t){var i="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return t.delegate(i,"mouseout",function(){n(this).removeClass("ui-state-hover");-1!==this.className.indexOf("ui-datepicker-prev")&&n(this).removeClass("ui-datepicker-prev-hover");-1!==this.className.indexOf("ui-datepicker-next")&&n(this).removeClass("ui-datepicker-next-hover")}).delegate(i,"mouseover",function(){n.datepicker._isDisabledDatepicker(u.inline?t.parent()[0]:u.input[0])||(n(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),n(this).addClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&n(this).addClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&n(this).addClass("ui-datepicker-next-hover"))})}function r(t,i){n.extend(t,i);for(var r in i)null==i[r]&&(t[r]=i[r]);return t}n.extend(n.ui,{datepicker:{version:"1.10.3"}});var u,i="datepicker";n.extend(f.prototype,{markerClassName:"hasDatepicker",maxRows:4,_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(n){return r(this._defaults,n||{}),this},_attachDatepicker:function(t,i){var r,f,u;r=t.nodeName.toLowerCase();f="div"===r||"span"===r;t.id||(this.uuid+=1,t.id="dp"+this.uuid);u=this._newInst(n(t),f);u.settings=n.extend({},i||{});"input"===r?this._connectDatepicker(t,u):f&&this._inlineDatepicker(t,u)},_newInst:function(t,i){var r=t[0].id.replace(/([^A-Za-z0-9_\-])/g,"\\\\$1");return{id:r,input:t,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:i,dpDiv:i?e(n("<div class='"+this._inlineClass+" ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'><\/div>")):this.dpDiv}},_connectDatepicker:function(t,r){var u=n(t);r.append=n([]);r.trigger=n([]);u.hasClass(this.markerClassName)||(this._attachments(u,r),u.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp),this._autoSize(r),n.data(t,i,r),r.settings.disabled&&this._disableDatepicker(t))},_attachments:function(t,i){var u,r,f,e=this._get(i,"appendText"),o=this._get(i,"isRTL");i.append&&i.append.remove();e&&(i.append=n("<span class='"+this._appendClass+"'>"+e+"<\/span>"),t[o?"before":"after"](i.append));t.unbind("focus",this._showDatepicker);i.trigger&&i.trigger.remove();u=this._get(i,"showOn");("focus"===u||"both"===u)&&t.focus(this._showDatepicker);("button"===u||"both"===u)&&(r=this._get(i,"buttonText"),f=this._get(i,"buttonImage"),i.trigger=n(this._get(i,"buttonImageOnly")?n("<img/>").addClass(this._triggerClass).attr({src:f,alt:r,title:r}):n("<button type='button'><\/button>").addClass(this._triggerClass).html(f?n("<img/>").attr({src:f,alt:r,title:r}):r)),t[o?"before":"after"](i.trigger),i.trigger.click(function(){return n.datepicker._datepickerShowing&&n.datepicker._lastInput===t[0]?n.datepicker._hideDatepicker():n.datepicker._datepickerShowing&&n.datepicker._lastInput!==t[0]?(n.datepicker._hideDatepicker(),n.datepicker._showDatepicker(t[0])):n.datepicker._showDatepicker(t[0]),!1}))},_autoSize:function(n){if(this._get(n,"autoSize")&&!n.inline){var r,u,f,t,i=new Date(2009,11,20),e=this._get(n,"dateFormat");e.match(/[DM]/)&&(r=function(n){for(u=0,f=0,t=0;n.length>t;t++)n[t].length>u&&(u=n[t].length,f=t);return f},i.setMonth(r(this._get(n,e.match(/MM/)?"monthNames":"monthNamesShort"))),i.setDate(r(this._get(n,e.match(/DD/)?"dayNames":"dayNamesShort"))+20-i.getDay()));n.input.attr("size",this._formatDate(n,i).length)}},_inlineDatepicker:function(t,r){var u=n(t);u.hasClass(this.markerClassName)||(u.addClass(this.markerClassName).append(r.dpDiv),n.data(t,i,r),this._setDate(r,this._getDefaultDate(r),!0),this._updateDatepicker(r),this._updateAlternate(r),r.settings.disabled&&this._disableDatepicker(t),r.dpDiv.css("display","block"))},_dialogDatepicker:function(t,u,f,e,o){var h,c,l,a,v,s=this._dialogInst;return s||(this.uuid+=1,h="dp"+this.uuid,this._dialogInput=n("<input type='text' id='"+h+"' style='position: absolute; top: -100px; width: 0px;'/>"),this._dialogInput.keydown(this._doKeyDown),n("body").append(this._dialogInput),s=this._dialogInst=this._newInst(this._dialogInput,!1),s.settings={},n.data(this._dialogInput[0],i,s)),r(s.settings,e||{}),u=u&&u.constructor===Date?this._formatDate(s,u):u,this._dialogInput.val(u),this._pos=o?o.length?o:[o.pageX,o.pageY]:null,this._pos||(c=document.documentElement.clientWidth,l=document.documentElement.clientHeight,a=document.documentElement.scrollLeft||document.body.scrollLeft,v=document.documentElement.scrollTop||document.body.scrollTop,this._pos=[c/2-100+a,l/2-150+v]),this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),s.settings.onSelect=f,this._inDialog=!0,this.dpDiv.addClass(this._dialogClass),this._showDatepicker(this._dialogInput[0]),n.blockUI&&n.blockUI(this.dpDiv),n.data(this._dialogInput[0],i,s),this},_destroyDatepicker:function(t){var r,u=n(t),f=n.data(t,i);u.hasClass(this.markerClassName)&&(r=t.nodeName.toLowerCase(),n.removeData(t,i),"input"===r?(f.append.remove(),f.trigger.remove(),u.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup",this._doKeyUp)):("div"===r||"span"===r)&&u.removeClass(this.markerClassName).empty())},_enableDatepicker:function(t){var r,u,f=n(t),e=n.data(t,i);f.hasClass(this.markerClassName)&&(r=t.nodeName.toLowerCase(),"input"===r?(t.disabled=!1,e.trigger.filter("button").each(function(){this.disabled=!1}).end().filter("img").css({opacity:"1.0",cursor:""})):("div"===r||"span"===r)&&(u=f.children("."+this._inlineClass),u.children().removeClass("ui-state-disabled"),u.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!1)),this._disabledInputs=n.map(this._disabledInputs,function(n){return n===t?null:n}))},_disableDatepicker:function(t){var r,u,f=n(t),e=n.data(t,i);f.hasClass(this.markerClassName)&&(r=t.nodeName.toLowerCase(),"input"===r?(t.disabled=!0,e.trigger.filter("button").each(function(){this.disabled=!0}).end().filter("img").css({opacity:"0.5",cursor:"default"})):("div"===r||"span"===r)&&(u=f.children("."+this._inlineClass),u.children().addClass("ui-state-disabled"),u.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!0)),this._disabledInputs=n.map(this._disabledInputs,function(n){return n===t?null:n}),this._disabledInputs[this._disabledInputs.length]=t)},_isDisabledDatepicker:function(n){if(!n)return!1;for(var t=0;this._disabledInputs.length>t;t++)if(this._disabledInputs[t]===n)return!0;return!1},_getInst:function(t){try{return n.data(t,i)}catch(r){throw"Missing instance data for this datepicker";}},_optionDatepicker:function(i,u,f){var o,c,s,h,e=this._getInst(i);return 2===arguments.length&&"string"==typeof u?"defaults"===u?n.extend({},n.datepicker._defaults):e?"all"===u?n.extend({},e.settings):this._get(e,u):null:(o=u||{},"string"==typeof u&&(o={},o[u]=f),e&&(this._curInst===e&&this._hideDatepicker(),c=this._getDateDatepicker(i,!0),s=this._getMinMaxDate(e,"min"),h=this._getMinMaxDate(e,"max"),r(e.settings,o),null!==s&&o.dateFormat!==t&&o.minDate===t&&(e.settings.minDate=this._formatDate(e,s)),null!==h&&o.dateFormat!==t&&o.maxDate===t&&(e.settings.maxDate=this._formatDate(e,h)),"disabled"in o&&(o.disabled?this._disableDatepicker(i):this._enableDatepicker(i)),this._attachments(n(i),e),this._autoSize(e),this._setDate(e,c),this._updateAlternate(e),this._updateDatepicker(e)),t)},_changeDatepicker:function(n,t,i){this._optionDatepicker(n,t,i)},_refreshDatepicker:function(n){var t=this._getInst(n);t&&this._updateDatepicker(t)},_setDateDatepicker:function(n,t){var i=this._getInst(n);i&&(this._setDate(i,t),this._updateDatepicker(i),this._updateAlternate(i))},_getDateDatepicker:function(n,t){var i=this._getInst(n);return i&&!i.inline&&this._setDateFromField(i,t),i?this._getDate(i):null},_doKeyDown:function(t){var u,e,f,i=n.datepicker._getInst(t.target),r=!0,o=i.dpDiv.is(".ui-datepicker-rtl");if(i._keyEvent=!0,n.datepicker._datepickerShowing)switch(t.keyCode){case 9:n.datepicker._hideDatepicker();r=!1;break;case 13:return f=n("td."+n.datepicker._dayOverClass+":not(."+n.datepicker._currentClass+")",i.dpDiv),f[0]&&n.datepicker._selectDay(t.target,i.selectedMonth,i.selectedYear,f[0]),u=n.datepicker._get(i,"onSelect"),u?(e=n.datepicker._formatDate(i),u.apply(i.input?i.input[0]:null,[e,i])):n.datepicker._hideDatepicker(),!1;case 27:n.datepicker._hideDatepicker();break;case 33:n.datepicker._adjustDate(t.target,t.ctrlKey?-n.datepicker._get(i,"stepBigMonths"):-n.datepicker._get(i,"stepMonths"),"M");break;case 34:n.datepicker._adjustDate(t.target,t.ctrlKey?+n.datepicker._get(i,"stepBigMonths"):+n.datepicker._get(i,"stepMonths"),"M");break;case 35:(t.ctrlKey||t.metaKey)&&n.datepicker._clearDate(t.target);r=t.ctrlKey||t.metaKey;break;case 36:(t.ctrlKey||t.metaKey)&&n.datepicker._gotoToday(t.target);r=t.ctrlKey||t.metaKey;break;case 37:(t.ctrlKey||t.metaKey)&&n.datepicker._adjustDate(t.target,o?1:-1,"D");r=t.ctrlKey||t.metaKey;t.originalEvent.altKey&&n.datepicker._adjustDate(t.target,t.ctrlKey?-n.datepicker._get(i,"stepBigMonths"):-n.datepicker._get(i,"stepMonths"),"M");break;case 38:(t.ctrlKey||t.metaKey)&&n.datepicker._adjustDate(t.target,-7,"D");r=t.ctrlKey||t.metaKey;break;case 39:(t.ctrlKey||t.metaKey)&&n.datepicker._adjustDate(t.target,o?-1:1,"D");r=t.ctrlKey||t.metaKey;t.originalEvent.altKey&&n.datepicker._adjustDate(t.target,t.ctrlKey?+n.datepicker._get(i,"stepBigMonths"):+n.datepicker._get(i,"stepMonths"),"M");break;case 40:(t.ctrlKey||t.metaKey)&&n.datepicker._adjustDate(t.target,7,"D");r=t.ctrlKey||t.metaKey;break;default:r=!1}else 36===t.keyCode&&t.ctrlKey?n.datepicker._showDatepicker(this):r=!1;r&&(t.preventDefault(),t.stopPropagation())},_doKeyPress:function(i){var r,u,f=n.datepicker._getInst(i.target);return n.datepicker._get(f,"constrainInput")?(r=n.datepicker._possibleChars(n.datepicker._get(f,"dateFormat")),u=String.fromCharCode(null==i.charCode?i.keyCode:i.charCode),i.ctrlKey||i.metaKey||" ">u||!r||r.indexOf(u)>-1):t},_doKeyUp:function(t){var r,i=n.datepicker._getInst(t.target);if(i.input.val()!==i.lastVal)try{r=n.datepicker.parseDate(n.datepicker._get(i,"dateFormat"),i.input?i.input.val():null,n.datepicker._getFormatConfig(i));r&&(n.datepicker._setDateFromField(i),n.datepicker._updateAlternate(i),n.datepicker._updateDatepicker(i))}catch(u){}return!0},_showDatepicker:function(t){if(t=t.target||t,"input"!==t.nodeName.toLowerCase()&&(t=n("input",t.parentNode)[0]),!n.datepicker._isDisabledDatepicker(t)&&n.datepicker._lastInput!==t){var i,o,s,u,f,e,h;i=n.datepicker._getInst(t);n.datepicker._curInst&&n.datepicker._curInst!==i&&(n.datepicker._curInst.dpDiv.stop(!0,!0),i&&n.datepicker._datepickerShowing&&n.datepicker._hideDatepicker(n.datepicker._curInst.input[0]));o=n.datepicker._get(i,"beforeShow");s=o?o.apply(t,[t,i]):{};s!==!1&&(r(i.settings,s),i.lastVal=null,n.datepicker._lastInput=t,n.datepicker._setDateFromField(i),n.datepicker._inDialog&&(t.value=""),n.datepicker._pos||(n.datepicker._pos=n.datepicker._findPos(t),n.datepicker._pos[1]+=t.offsetHeight),u=!1,n(t).parents().each(function(){return u|="fixed"===n(this).css("position"),!u}),f={left:n.datepicker._pos[0],top:n.datepicker._pos[1]},n.datepicker._pos=null,i.dpDiv.empty(),i.dpDiv.css({position:"absolute",display:"block",top:"-1000px"}),n.datepicker._updateDatepicker(i),f=n.datepicker._checkOffset(i,f,u),i.dpDiv.css({position:n.datepicker._inDialog&&n.blockUI?"static":u?"fixed":"absolute",display:"none",left:f.left+"px",top:f.top+"px"}),i.inline||(e=n.datepicker._get(i,"showAnim"),h=n.datepicker._get(i,"duration"),i.dpDiv.zIndex(n(t).zIndex()+1),n.datepicker._datepickerShowing=!0,n.effects&&n.effects.effect[e]?i.dpDiv.show(e,n.datepicker._get(i,"showOptions"),h):i.dpDiv[e||"show"](e?h:null),n.datepicker._shouldFocusInput(i)&&i.input.focus(),n.datepicker._curInst=i))}},_updateDatepicker:function(t){this.maxRows=4;u=t;t.dpDiv.empty().append(this._generateHTML(t));this._attachHandlers(t);t.dpDiv.find("."+this._dayOverClass+" a").mouseover();var i,r=this._getNumberOfMonths(t),f=r[1];t.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width("");f>1&&t.dpDiv.addClass("ui-datepicker-multi-"+f).css("width",17*f+"em");t.dpDiv[(1!==r[0]||1!==r[1]?"add":"remove")+"Class"]("ui-datepicker-multi");t.dpDiv[(this._get(t,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl");t===n.datepicker._curInst&&n.datepicker._datepickerShowing&&n.datepicker._shouldFocusInput(t)&&t.input.focus();t.yearshtml&&(i=t.yearshtml,setTimeout(function(){i===t.yearshtml&&t.yearshtml&&t.dpDiv.find("select.ui-datepicker-year:first").replaceWith(t.yearshtml);i=t.yearshtml=null},0))},_shouldFocusInput:function(n){return n.input&&n.input.is(":visible")&&!n.input.is(":disabled")&&!n.input.is(":focus")},_checkOffset:function(t,i,r){var u=t.dpDiv.outerWidth(),f=t.dpDiv.outerHeight(),h=t.input?t.input.outerWidth():0,o=t.input?t.input.outerHeight():0,e=document.documentElement.clientWidth+(r?0:n(document).scrollLeft()),s=document.documentElement.clientHeight+(r?0:n(document).scrollTop());return i.left-=this._get(t,"isRTL")?u-h:0,i.left-=r&&i.left===t.input.offset().left?n(document).scrollLeft():0,i.top-=r&&i.top===t.input.offset().top+o?n(document).scrollTop():0,i.left-=Math.min(i.left,i.left+u>e&&e>u?Math.abs(i.left+u-e):0),i.top-=Math.min(i.top,i.top+f>s&&s>f?Math.abs(f+o):0),i},_findPos:function(t){for(var i,r=this._getInst(t),u=this._get(r,"isRTL");t&&("hidden"===t.type||1!==t.nodeType||n.expr.filters.hidden(t));)t=t[u?"previousSibling":"nextSibling"];return i=n(t).offset(),[i.left,i.top]},_hideDatepicker:function(t){var u,e,f,o,r=this._curInst;!r||t&&r!==n.data(t,i)||this._datepickerShowing&&(u=this._get(r,"showAnim"),e=this._get(r,"duration"),f=function(){n.datepicker._tidyDialog(r)},n.effects&&(n.effects.effect[u]||n.effects[u])?r.dpDiv.hide(u,n.datepicker._get(r,"showOptions"),e,f):r.dpDiv["slideDown"===u?"slideUp":"fadeIn"===u?"fadeOut":"hide"](u?e:null,f),u||f(),this._datepickerShowing=!1,o=this._get(r,"onClose"),o&&o.apply(r.input?r.input[0]:null,[r.input?r.input.val():"",r]),this._lastInput=null,this._inDialog&&(this._dialogInput.css({position:"absolute",left:"0",top:"-100px"}),n.blockUI&&(n.unblockUI(),n("body").append(this.dpDiv))),this._inDialog=!1)},_tidyDialog:function(n){n.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},_checkExternalClick:function(t){if(n.datepicker._curInst){var i=n(t.target),r=n.datepicker._getInst(i[0]);(i[0].id===n.datepicker._mainDivId||0!==i.parents("#"+n.datepicker._mainDivId).length||i.hasClass(n.datepicker.markerClassName)||i.closest("."+n.datepicker._triggerClass).length||!n.datepicker._datepickerShowing||n.datepicker._inDialog&&n.blockUI)&&(!i.hasClass(n.datepicker.markerClassName)||n.datepicker._curInst===r)||n.datepicker._hideDatepicker()}},_adjustDate:function(t,i,r){var f=n(t),u=this._getInst(f[0]);this._isDisabledDatepicker(f[0])||(this._adjustInstDate(u,i+("M"===r?this._get(u,"showCurrentAtPos"):0),r),this._updateDatepicker(u))},_gotoToday:function(t){var r,u=n(t),i=this._getInst(u[0]);this._get(i,"gotoCurrent")&&i.currentDay?(i.selectedDay=i.currentDay,i.drawMonth=i.selectedMonth=i.currentMonth,i.drawYear=i.selectedYear=i.currentYear):(r=new Date,i.selectedDay=r.getDate(),i.drawMonth=i.selectedMonth=r.getMonth(),i.drawYear=i.selectedYear=r.getFullYear());this._notifyChange(i);this._adjustDate(u)},_selectMonthYear:function(t,i,r){var f=n(t),u=this._getInst(f[0]);u["selected"+("M"===r?"Month":"Year")]=u["draw"+("M"===r?"Month":"Year")]=parseInt(i.options[i.selectedIndex].value,10);this._notifyChange(u);this._adjustDate(f)},_selectDay:function(t,i,r,u){var f,e=n(t);n(u).hasClass(this._unselectableClass)||this._isDisabledDatepicker(e[0])||(f=this._getInst(e[0]),f.selectedDay=f.currentDay=n("a",u).html(),f.selectedMonth=f.currentMonth=i,f.selectedYear=f.currentYear=r,this._selectDate(t,this._formatDate(f,f.currentDay,f.currentMonth,f.currentYear)))},_clearDate:function(t){var i=n(t);this._selectDate(i,"")},_selectDate:function(t,i){var u,f=n(t),r=this._getInst(f[0]);i=null!=i?i:this._formatDate(r);r.input&&r.input.val(i);this._updateAlternate(r);u=this._get(r,"onSelect");u?u.apply(r.input?r.input[0]:null,[i,r]):r.input&&r.input.trigger("change");r.inline?this._updateDatepicker(r):(this._hideDatepicker(),this._lastInput=r.input[0],"object"!=typeof r.input[0]&&r.input.focus(),this._lastInput=null)},_updateAlternate:function(t){var i,r,u,f=this._get(t,"altField");f&&(i=this._get(t,"altFormat")||this._get(t,"dateFormat"),r=this._getDate(t),u=this.formatDate(i,r,this._getFormatConfig(t)),n(f).each(function(){n(this).val(u)}))},noWeekends:function(n){var t=n.getDay();return[t>0&&6>t,""]},iso8601Week:function(n){var i,t=new Date(n.getTime());return t.setDate(t.getDate()+4-(t.getDay()||7)),i=t.getTime(),t.setMonth(0),t.setDate(1),Math.floor(Math.round((i-t)/864e5)/7)+1},parseDate:function(i,r,u){if(null==i||null==r)throw"Invalid arguments";if(r="object"==typeof r?""+r:r+"",""===r)return null;for(var v,y,f,e=0,p=(u?u.shortYearCutoff:null)||this._defaults.shortYearCutoff,g="string"!=typeof p?p:(new Date).getFullYear()%100+parseInt(p,10),nt=(u?u.dayNamesShort:null)||this._defaults.dayNamesShort,tt=(u?u.dayNames:null)||this._defaults.dayNames,it=(u?u.monthNamesShort:null)||this._defaults.monthNamesShort,rt=(u?u.monthNames:null)||this._defaults.monthNames,o=-1,h=-1,c=-1,w=-1,b=!1,a=function(n){var t=i.length>s+1&&i.charAt(s+1)===n;return t&&s++,t},l=function(n){var i=a(n),u="@"===n?14:"!"===n?20:"y"===n&&i?4:"o"===n?3:2,f=RegExp("^\\d{1,"+u+"}"),t=r.substring(e).match(f);if(!t)throw"Missing number at position "+e;return e+=t[0].length,parseInt(t[0],10)},d=function(i,u,f){var o=-1,s=n.map(a(i)?f:u,function(n,t){return[[t,n]]}).sort(function(n,t){return-(n[1].length-t[1].length)});if(n.each(s,function(n,i){var u=i[1];return r.substr(e,u.length).toLowerCase()===u.toLowerCase()?(o=i[0],e+=u.length,!1):t}),-1!==o)return o+1;throw"Unknown name at position "+e;},k=function(){if(r.charAt(e)!==i.charAt(s))throw"Unexpected literal at position "+e;e++},s=0;i.length>s;s++)if(b)"'"!==i.charAt(s)||a("'")?k():b=!1;else switch(i.charAt(s)){case"d":c=l("d");break;case"D":d("D",nt,tt);break;case"o":w=l("o");break;case"m":h=l("m");break;case"M":h=d("M",it,rt);break;case"y":o=l("y");break;case"@":f=new Date(l("@"));o=f.getFullYear();h=f.getMonth()+1;c=f.getDate();break;case"!":f=new Date((l("!")-this._ticksTo1970)/1e4);o=f.getFullYear();h=f.getMonth()+1;c=f.getDate();break;case"'":a("'")?k():b=!0;break;default:k()}if(r.length>e&&(y=r.substr(e),!/^\s+/.test(y)))throw"Extra/unparsed characters found in date: "+y;if(-1===o?o=(new Date).getFullYear():100>o&&(o+=(new Date).getFullYear()-(new Date).getFullYear()%100+(g>=o?0:-100)),w>-1)for(h=1,c=w;;){if(v=this._getDaysInMonth(o,h-1),v>=c)break;h++;c-=v}if(f=this._daylightSavingAdjust(new Date(o,h-1,c)),f.getFullYear()!==o||f.getMonth()+1!==h||f.getDate()!==c)throw"Invalid date";return f},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:864e9*(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925)),formatDate:function(n,t,i){if(!t)return"";var u,h=(i?i.dayNamesShort:null)||this._defaults.dayNamesShort,c=(i?i.dayNames:null)||this._defaults.dayNames,l=(i?i.monthNamesShort:null)||this._defaults.monthNamesShort,a=(i?i.monthNames:null)||this._defaults.monthNames,f=function(t){var i=n.length>u+1&&n.charAt(u+1)===t;return i&&u++,i},e=function(n,t,i){var r=""+t;if(f(n))for(;i>r.length;)r="0"+r;return r},s=function(n,t,i,r){return f(n)?r[t]:i[t]},r="",o=!1;if(t)for(u=0;n.length>u;u++)if(o)"'"!==n.charAt(u)||f("'")?r+=n.charAt(u):o=!1;else switch(n.charAt(u)){case"d":r+=e("d",t.getDate(),2);break;case"D":r+=s("D",t.getDay(),h,c);break;case"o":r+=e("o",Math.round((new Date(t.getFullYear(),t.getMonth(),t.getDate()).getTime()-new Date(t.getFullYear(),0,0).getTime())/864e5),3);break;case"m":r+=e("m",t.getMonth()+1,2);break;case"M":r+=s("M",t.getMonth(),l,a);break;case"y":r+=f("y")?t.getFullYear():(10>t.getYear()%100?"0":"")+t.getYear()%100;break;case"@":r+=t.getTime();break;case"!":r+=1e4*t.getTime()+this._ticksTo1970;break;case"'":f("'")?r+="'":o=!0;break;default:r+=n.charAt(u)}return r},_possibleChars:function(n){for(var i="",r=!1,u=function(i){var r=n.length>t+1&&n.charAt(t+1)===i;return r&&t++,r},t=0;n.length>t;t++)if(r)"'"!==n.charAt(t)||u("'")?i+=n.charAt(t):r=!1;else switch(n.charAt(t)){case"d":case"m":case"y":case"@":i+="0123456789";break;case"D":case"M":return null;case"'":u("'")?i+="'":r=!0;break;default:i+=n.charAt(t)}return i},_get:function(n,i){return n.settings[i]!==t?n.settings[i]:this._defaults[i]},_setDateFromField:function(n,t){if(n.input.val()!==n.lastVal){var f=this._get(n,"dateFormat"),r=n.lastVal=n.input?n.input.val():null,u=this._getDefaultDate(n),i=u,e=this._getFormatConfig(n);try{i=this.parseDate(f,r,e)||u}catch(o){r=t?"":r}n.selectedDay=i.getDate();n.drawMonth=n.selectedMonth=i.getMonth();n.drawYear=n.selectedYear=i.getFullYear();n.currentDay=r?i.getDate():0;n.currentMonth=r?i.getMonth():0;n.currentYear=r?i.getFullYear():0;this._adjustInstDate(n)}},_getDefaultDate:function(n){return this._restrictMinMax(n,this._determineDate(n,this._get(n,"defaultDate"),new Date))},_determineDate:function(t,i,r){var f=function(n){var t=new Date;return t.setDate(t.getDate()+n),t},e=function(i){try{return n.datepicker.parseDate(n.datepicker._get(t,"dateFormat"),i,n.datepicker._getFormatConfig(t))}catch(h){}for(var o=(i.toLowerCase().match(/^c/)?n.datepicker._getDate(t):null)||new Date,f=o.getFullYear(),e=o.getMonth(),r=o.getDate(),s=/([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,u=s.exec(i);u;){switch(u[2]||"d"){case"d":case"D":r+=parseInt(u[1],10);break;case"w":case"W":r+=7*parseInt(u[1],10);break;case"m":case"M":e+=parseInt(u[1],10);r=Math.min(r,n.datepicker._getDaysInMonth(f,e));break;case"y":case"Y":f+=parseInt(u[1],10);r=Math.min(r,n.datepicker._getDaysInMonth(f,e))}u=s.exec(i)}return new Date(f,e,r)},u=null==i||""===i?r:"string"==typeof i?e(i):"number"==typeof i?isNaN(i)?r:f(i):new Date(i.getTime());return u=u&&"Invalid Date"==""+u?r:u,u&&(u.setHours(0),u.setMinutes(0),u.setSeconds(0),u.setMilliseconds(0)),this._daylightSavingAdjust(u)},_daylightSavingAdjust:function(n){return n?(n.setHours(n.getHours()>12?n.getHours()+2:0),n):null},_setDate:function(n,t,i){var u=!t,f=n.selectedMonth,e=n.selectedYear,r=this._restrictMinMax(n,this._determineDate(n,t,new Date));n.selectedDay=n.currentDay=r.getDate();n.drawMonth=n.selectedMonth=n.currentMonth=r.getMonth();n.drawYear=n.selectedYear=n.currentYear=r.getFullYear();f===n.selectedMonth&&e===n.selectedYear||i||this._notifyChange(n);this._adjustInstDate(n);n.input&&n.input.val(u?"":this._formatDate(n))},_getDate:function(n){return!n.currentYear||n.input&&""===n.input.val()?null:this._daylightSavingAdjust(new Date(n.currentYear,n.currentMonth,n.currentDay))},_attachHandlers:function(t){var r=this._get(t,"stepMonths"),i="#"+t.id.replace(/\\\\/g,"\\");t.dpDiv.find("[data-handler]").map(function(){var t={prev:function(){n.datepicker._adjustDate(i,-r,"M")},next:function(){n.datepicker._adjustDate(i,+r,"M")},hide:function(){n.datepicker._hideDatepicker()},today:function(){n.datepicker._gotoToday(i)},selectDay:function(){return n.datepicker._selectDay(i,+this.getAttribute("data-month"),+this.getAttribute("data-year"),this),!1},selectMonth:function(){return n.datepicker._selectMonthYear(i,this,"M"),!1},selectYear:function(){return n.datepicker._selectMonthYear(i,this,"Y"),!1}};n(this).bind(this.getAttribute("data-event"),t[this.getAttribute("data-handler")])})},_generateHTML:function(n){var b,s,rt,h,ut,k,ft,et,ri,c,ot,ui,fi,ei,oi,st,g,si,ht,nt,o,y,ct,p,lt,l,u,at,vt,yt,pt,tt,wt,i,bt,kt,d,a,it,dt=new Date,gt=this._daylightSavingAdjust(new Date(dt.getFullYear(),dt.getMonth(),dt.getDate())),f=this._get(n,"isRTL"),li=this._get(n,"showButtonPanel"),hi=this._get(n,"hideIfNoPrevNext"),ni=this._get(n,"navigationAsDateFormat"),e=this._getNumberOfMonths(n),ai=this._get(n,"showCurrentAtPos"),ci=this._get(n,"stepMonths"),ti=1!==e[0]||1!==e[1],ii=this._daylightSavingAdjust(n.currentDay?new Date(n.currentYear,n.currentMonth,n.currentDay):new Date(9999,9,9)),w=this._getMinMaxDate(n,"min"),v=this._getMinMaxDate(n,"max"),t=n.drawMonth-ai,r=n.drawYear;if(0>t&&(t+=12,r--),v)for(b=this._daylightSavingAdjust(new Date(v.getFullYear(),v.getMonth()-e[0]*e[1]+1,v.getDate())),b=w&&w>b?w:b;this._daylightSavingAdjust(new Date(r,t,1))>b;)t--,0>t&&(t=11,r--);for(n.drawMonth=t,n.drawYear=r,s=this._get(n,"prevText"),s=ni?this.formatDate(s,this._daylightSavingAdjust(new Date(r,t-ci,1)),this._getFormatConfig(n)):s,rt=this._canAdjustMonth(n,-1,r,t)?"<a class='ui-datepicker-prev ui-corner-all' data-handler='prev' data-event='click' title='"+s+"'><span class='ui-icon ui-icon-circle-triangle-"+(f?"e":"w")+"'>"+s+"<\/span><\/a>":hi?"":"<a class='ui-datepicker-prev ui-corner-all ui-state-disabled' title='"+s+"'><span class='ui-icon ui-icon-circle-triangle-"+(f?"e":"w")+"'>"+s+"<\/span><\/a>",h=this._get(n,"nextText"),h=ni?this.formatDate(h,this._daylightSavingAdjust(new Date(r,t+ci,1)),this._getFormatConfig(n)):h,ut=this._canAdjustMonth(n,1,r,t)?"<a class='ui-datepicker-next ui-corner-all' data-handler='next' data-event='click' title='"+h+"'><span class='ui-icon ui-icon-circle-triangle-"+(f?"w":"e")+"'>"+h+"<\/span><\/a>":hi?"":"<a class='ui-datepicker-next ui-corner-all ui-state-disabled' title='"+h+"'><span class='ui-icon ui-icon-circle-triangle-"+(f?"w":"e")+"'>"+h+"<\/span><\/a>",k=this._get(n,"currentText"),ft=this._get(n,"gotoCurrent")&&n.currentDay?ii:gt,k=ni?this.formatDate(k,ft,this._getFormatConfig(n)):k,et=n.inline?"":"<button type='button' class='ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all' data-handler='hide' data-event='click'>"+this._get(n,"closeText")+"<\/button>",ri=li?"<div class='ui-datepicker-buttonpane ui-widget-content'>"+(f?et:"")+(this._isInRange(n,ft)?"<button type='button' class='ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all' data-handler='today' data-event='click'>"+k+"<\/button>":"")+(f?"":et)+"<\/div>":"",c=parseInt(this._get(n,"firstDay"),10),c=isNaN(c)?0:c,ot=this._get(n,"showWeek"),ui=this._get(n,"dayNames"),fi=this._get(n,"dayNamesMin"),ei=this._get(n,"monthNames"),oi=this._get(n,"monthNamesShort"),st=this._get(n,"beforeShowDay"),g=this._get(n,"showOtherMonths"),si=this._get(n,"selectOtherMonths"),ht=this._getDefaultDate(n),nt="",y=0;e[0]>y;y++){for(ct="",this.maxRows=4,p=0;e[1]>p;p++){if(lt=this._daylightSavingAdjust(new Date(r,t,n.selectedDay)),l=" ui-corner-all",u="",ti){if(u+="<div class='ui-datepicker-group",e[1]>1)switch(p){case 0:u+=" ui-datepicker-group-first";l=" ui-corner-"+(f?"right":"left");break;case e[1]-1:u+=" ui-datepicker-group-last";l=" ui-corner-"+(f?"left":"right");break;default:u+=" ui-datepicker-group-middle";l=""}u+="'>"}for(u+="<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix"+l+"'>"+(/all|left/.test(l)&&0===y?f?ut:rt:"")+(/all|right/.test(l)&&0===y?f?rt:ut:"")+this._generateMonthYearHeader(n,t,r,w,v,y>0||p>0,ei,oi)+"<\/div><table class='ui-datepicker-calendar'><thead><tr>",at=ot?"<th class='ui-datepicker-week-col'>"+this._get(n,"weekHeader")+"<\/th>":"",o=0;7>o;o++)vt=(o+c)%7,at+="<th"+((o+c+6)%7>=5?" class='ui-datepicker-week-end'":"")+"><span title='"+ui[vt]+"'>"+fi[vt]+"<\/span><\/th>";for(u+=at+"<\/tr><\/thead><tbody>",yt=this._getDaysInMonth(r,t),r===n.selectedYear&&t===n.selectedMonth&&(n.selectedDay=Math.min(n.selectedDay,yt)),pt=(this._getFirstDayOfMonth(r,t)-c+7)%7,tt=Math.ceil((pt+yt)/7),wt=ti?this.maxRows>tt?this.maxRows:tt:tt,this.maxRows=wt,i=this._daylightSavingAdjust(new Date(r,t,1-pt)),bt=0;wt>bt;bt++){for(u+="<tr>",kt=ot?"<td class='ui-datepicker-week-col'>"+this._get(n,"calculateWeek")(i)+"<\/td>":"",o=0;7>o;o++)d=st?st.apply(n.input?n.input[0]:null,[i]):[!0,""],a=i.getMonth()!==t,it=a&&!si||!d[0]||w&&w>i||v&&i>v,kt+="<td class='"+((o+c+6)%7>=5?" ui-datepicker-week-end":"")+(a?" ui-datepicker-other-month":"")+(i.getTime()===lt.getTime()&&t===n.selectedMonth&&n._keyEvent||ht.getTime()===i.getTime()&&ht.getTime()===lt.getTime()?" "+this._dayOverClass:"")+(it?" "+this._unselectableClass+" ui-state-disabled":"")+(a&&!g?"":" "+d[1]+(i.getTime()===ii.getTime()?" "+this._currentClass:"")+(i.getTime()===gt.getTime()?" ui-datepicker-today":""))+"'"+(a&&!g||!d[2]?"":" title='"+d[2].replace(/'/g,"&#39;")+"'")+(it?"":" data-handler='selectDay' data-event='click' data-month='"+i.getMonth()+"' data-year='"+i.getFullYear()+"'")+">"+(a&&!g?"&#xa0;":it?"<span class='ui-state-default'>"+i.getDate()+"<\/span>":"<a class='ui-state-default"+(i.getTime()===gt.getTime()?" ui-state-highlight":"")+(i.getTime()===ii.getTime()?" ui-state-active":"")+(a?" ui-priority-secondary":"")+"' href='#'>"+i.getDate()+"<\/a>")+"<\/td>",i.setDate(i.getDate()+1),i=this._daylightSavingAdjust(i);u+=kt+"<\/tr>"}t++;t>11&&(t=0,r++);u+="<\/tbody><\/table>"+(ti?"<\/div>"+(e[0]>0&&p===e[1]-1?"<div class='ui-datepicker-row-break'><\/div>":""):"");ct+=u}nt+=ct}return nt+=ri,n._keyEvent=!1,nt},_generateMonthYearHeader:function(n,t,i,r,u,f,e,o){var k,d,h,v,y,p,s,a,w=this._get(n,"changeMonth"),b=this._get(n,"changeYear"),g=this._get(n,"showMonthAfterYear"),c="<div class='ui-datepicker-title'>",l="";if(f||!w)l+="<span class='ui-datepicker-month'>"+e[t]+"<\/span>";else{for(k=r&&r.getFullYear()===i,d=u&&u.getFullYear()===i,l+="<select class='ui-datepicker-month' data-handler='selectMonth' data-event='change'>",h=0;12>h;h++)(!k||h>=r.getMonth())&&(!d||u.getMonth()>=h)&&(l+="<option value='"+h+"'"+(h===t?" selected='selected'":"")+">"+o[h]+"<\/option>");l+="<\/select>"}if(g||(c+=l+(!f&&w&&b?"":"&#xa0;")),!n.yearshtml)if(n.yearshtml="",f||!b)c+="<span class='ui-datepicker-year'>"+i+"<\/span>";else{for(v=this._get(n,"yearRange").split(":"),y=(new Date).getFullYear(),p=function(n){var t=n.match(/c[+\-].*/)?i+parseInt(n.substring(1),10):n.match(/[+\-].*/)?y+parseInt(n,10):parseInt(n,10);return isNaN(t)?y:t},s=p(v[0]),a=Math.max(s,p(v[1]||"")),s=r?Math.max(s,r.getFullYear()):s,a=u?Math.min(a,u.getFullYear()):a,n.yearshtml+="<select class='ui-datepicker-year' data-handler='selectYear' data-event='change'>";a>=s;s++)n.yearshtml+="<option value='"+s+"'"+(s===i?" selected='selected'":"")+">"+s+"<\/option>";n.yearshtml+="<\/select>";c+=n.yearshtml;n.yearshtml=null}return c+=this._get(n,"yearSuffix"),g&&(c+=(!f&&w&&b?"":"&#xa0;")+l),c+"<\/div>"},_adjustInstDate:function(n,t,i){var u=n.drawYear+("Y"===i?t:0),f=n.drawMonth+("M"===i?t:0),e=Math.min(n.selectedDay,this._getDaysInMonth(u,f))+("D"===i?t:0),r=this._restrictMinMax(n,this._daylightSavingAdjust(new Date(u,f,e)));n.selectedDay=r.getDate();n.drawMonth=n.selectedMonth=r.getMonth();n.drawYear=n.selectedYear=r.getFullYear();("M"===i||"Y"===i)&&this._notifyChange(n)},_restrictMinMax:function(n,t){var i=this._getMinMaxDate(n,"min"),r=this._getMinMaxDate(n,"max"),u=i&&i>t?i:t;return r&&u>r?r:u},_notifyChange:function(n){var t=this._get(n,"onChangeMonthYear");t&&t.apply(n.input?n.input[0]:null,[n.selectedYear,n.selectedMonth+1,n])},_getNumberOfMonths:function(n){var t=this._get(n,"numberOfMonths");return null==t?[1,1]:"number"==typeof t?[1,t]:t},_getMinMaxDate:function(n,t){return this._determineDate(n,this._get(n,t+"Date"),null)},_getDaysInMonth:function(n,t){return 32-this._daylightSavingAdjust(new Date(n,t,32)).getDate()},_getFirstDayOfMonth:function(n,t){return new Date(n,t,1).getDay()},_canAdjustMonth:function(n,t,i,r){var f=this._getNumberOfMonths(n),u=this._daylightSavingAdjust(new Date(i,r+(0>t?t:f[0]*f[1]),1));return 0>t&&u.setDate(this._getDaysInMonth(u.getFullYear(),u.getMonth())),this._isInRange(n,u)},_isInRange:function(n,t){var i,f,e=this._getMinMaxDate(n,"min"),o=this._getMinMaxDate(n,"max"),r=null,u=null,s=this._get(n,"yearRange");return s&&(i=s.split(":"),f=(new Date).getFullYear(),r=parseInt(i[0],10),u=parseInt(i[1],10),i[0].match(/[+\-].*/)&&(r+=f),i[1].match(/[+\-].*/)&&(u+=f)),(!e||t.getTime()>=e.getTime())&&(!o||t.getTime()<=o.getTime())&&(!r||t.getFullYear()>=r)&&(!u||u>=t.getFullYear())},_getFormatConfig:function(n){var t=this._get(n,"shortYearCutoff");return t="string"!=typeof t?t:(new Date).getFullYear()%100+parseInt(t,10),{shortYearCutoff:t,dayNamesShort:this._get(n,"dayNamesShort"),dayNames:this._get(n,"dayNames"),monthNamesShort:this._get(n,"monthNamesShort"),monthNames:this._get(n,"monthNames")}},_formatDate:function(n,t,i,r){t||(n.currentDay=n.selectedDay,n.currentMonth=n.selectedMonth,n.currentYear=n.selectedYear);var u=t?"object"==typeof t?t:this._daylightSavingAdjust(new Date(r,i,t)):this._daylightSavingAdjust(new Date(n.currentYear,n.currentMonth,n.currentDay));return this.formatDate(this._get(n,"dateFormat"),u,this._getFormatConfig(n))}});n.fn.datepicker=function(t){if(!this.length)return this;n.datepicker.initialized||(n(document).mousedown(n.datepicker._checkExternalClick),n.datepicker.initialized=!0);0===n("#"+n.datepicker._mainDivId).length&&n("body").append(n.datepicker.dpDiv);var i=Array.prototype.slice.call(arguments,1);return"string"!=typeof t||"isDisabled"!==t&&"getDate"!==t&&"widget"!==t?"option"===t&&2===arguments.length&&"string"==typeof arguments[1]?n.datepicker["_"+t+"Datepicker"].apply(n.datepicker,[this[0]].concat(i)):this.each(function(){"string"==typeof t?n.datepicker["_"+t+"Datepicker"].apply(n.datepicker,[this].concat(i)):n.datepicker._attachDatepicker(this,t)}):n.datepicker["_"+t+"Datepicker"].apply(n.datepicker,[this[0]].concat(i))};n.datepicker=new f;n.datepicker.initialized=!1;n.datepicker.uuid=(new Date).getTime();n.datepicker.version="1.10.3"}(jQuery),function(n){var t={buttons:!0,height:!0,maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0,width:!0},i={maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0};n.widget("ui.dialog",{version:"1.10.3",options:{appendTo:"body",autoOpen:!0,buttons:[],closeOnEscape:!0,closeText:"close",dialogClass:"",draggable:!0,hide:null,height:"auto",maxHeight:null,maxWidth:null,minHeight:150,minWidth:150,modal:!1,position:{my:"center",at:"center",of:window,collision:"fit",using:function(t){var i=n(this).css(t).offset().top;0>i&&n(this).css("top",t.top-i)}},resizable:!0,show:null,title:null,width:300,beforeClose:null,close:null,drag:null,dragStart:null,dragStop:null,focus:null,open:null,resize:null,resizeStart:null,resizeStop:null},_create:function(){this.originalCss={display:this.element[0].style.display,width:this.element[0].style.width,minHeight:this.element[0].style.minHeight,maxHeight:this.element[0].style.maxHeight,height:this.element[0].style.height};this.originalPosition={parent:this.element.parent(),index:this.element.parent().children().index(this.element)};this.originalTitle=this.element.attr("title");this.options.title=this.options.title||this.originalTitle;this._createWrapper();this.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(this.uiDialog);this._createTitlebar();this._createButtonPane();this.options.draggable&&n.fn.draggable&&this._makeDraggable();this.options.resizable&&n.fn.resizable&&this._makeResizable();this._isOpen=!1},_init:function(){this.options.autoOpen&&this.open()},_appendTo:function(){var t=this.options.appendTo;return t&&(t.jquery||t.nodeType)?n(t):this.document.find(t||"body").eq(0)},_destroy:function(){var n,t=this.originalPosition;this._destroyOverlay();this.element.removeUniqueId().removeClass("ui-dialog-content ui-widget-content").css(this.originalCss).detach();this.uiDialog.stop(!0,!0).remove();this.originalTitle&&this.element.attr("title",this.originalTitle);n=t.parent.children().eq(t.index);n.length&&n[0]!==this.element[0]?n.before(this.element):t.parent.append(this.element)},widget:function(){return this.uiDialog},disable:n.noop,enable:n.noop,close:function(t){var i=this;this._isOpen&&this._trigger("beforeClose",t)!==!1&&(this._isOpen=!1,this._destroyOverlay(),this.opener.filter(":focusable").focus().length||n(this.document[0].activeElement).blur(),this._hide(this.uiDialog,this.options.hide,function(){i._trigger("close",t)}))},isOpen:function(){return this._isOpen},moveToTop:function(){this._moveToTop()},_moveToTop:function(n,t){var i=!!this.uiDialog.nextAll(":visible").insertBefore(this.uiDialog).length;return i&&!t&&this._trigger("focus",n),i},open:function(){var t=this;return this._isOpen?(this._moveToTop()&&this._focusTabbable(),undefined):(this._isOpen=!0,this.opener=n(this.document[0].activeElement),this._size(),this._position(),this._createOverlay(),this._moveToTop(null,!0),this._show(this.uiDialog,this.options.show,function(){t._focusTabbable();t._trigger("focus")}),this._trigger("open"),undefined)},_focusTabbable:function(){var n=this.element.find("[autofocus]");n.length||(n=this.element.find(":tabbable"));n.length||(n=this.uiDialogButtonPane.find(":tabbable"));n.length||(n=this.uiDialogTitlebarClose.filter(":tabbable"));n.length||(n=this.uiDialog);n.eq(0).focus()},_keepFocus:function(t){function i(){var t=this.document[0].activeElement,i=this.uiDialog[0]===t||n.contains(this.uiDialog[0],t);i||this._focusTabbable()}t.preventDefault();i.call(this);this._delay(i)},_createWrapper:function(){this.uiDialog=n("<div>").addClass("ui-dialog ui-widget ui-widget-content ui-corner-all ui-front "+this.options.dialogClass).hide().attr({tabIndex:-1,role:"dialog"}).appendTo(this._appendTo());this._on(this.uiDialog,{keydown:function(t){if(this.options.closeOnEscape&&!t.isDefaultPrevented()&&t.keyCode&&t.keyCode===n.ui.keyCode.ESCAPE)return t.preventDefault(),this.close(t),undefined;if(t.keyCode===n.ui.keyCode.TAB){var i=this.uiDialog.find(":tabbable"),r=i.filter(":first"),u=i.filter(":last");t.target!==u[0]&&t.target!==this.uiDialog[0]||t.shiftKey?t.target!==r[0]&&t.target!==this.uiDialog[0]||!t.shiftKey||(u.focus(1),t.preventDefault()):(r.focus(1),t.preventDefault())}},mousedown:function(n){this._moveToTop(n)&&this._focusTabbable()}});this.element.find("[aria-describedby]").length||this.uiDialog.attr({"aria-describedby":this.element.uniqueId().attr("id")})},_createTitlebar:function(){var t;this.uiDialogTitlebar=n("<div>").addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(this.uiDialog);this._on(this.uiDialogTitlebar,{mousedown:function(t){n(t.target).closest(".ui-dialog-titlebar-close")||this.uiDialog.focus()}});this.uiDialogTitlebarClose=n("<button><\/button>").button({label:this.options.closeText,icons:{primary:"ui-icon-closethick"},text:!1}).addClass("ui-dialog-titlebar-close").appendTo(this.uiDialogTitlebar);this._on(this.uiDialogTitlebarClose,{click:function(n){n.preventDefault();this.close(n)}});t=n("<span>").uniqueId().addClass("ui-dialog-title").prependTo(this.uiDialogTitlebar);this._title(t);this.uiDialog.attr({"aria-labelledby":t.attr("id")})},_title:function(n){this.options.title||n.html("&#160;");n.text(this.options.title)},_createButtonPane:function(){this.uiDialogButtonPane=n("<div>").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix");this.uiButtonSet=n("<div>").addClass("ui-dialog-buttonset").appendTo(this.uiDialogButtonPane);this._createButtons()},_createButtons:function(){var i=this,t=this.options.buttons;return this.uiDialogButtonPane.remove(),this.uiButtonSet.empty(),n.isEmptyObject(t)||n.isArray(t)&&!t.length?(this.uiDialog.removeClass("ui-dialog-buttons"),undefined):(n.each(t,function(t,r){var u,f;r=n.isFunction(r)?{click:r,text:t}:r;r=n.extend({type:"button"},r);u=r.click;r.click=function(){u.apply(i.element[0],arguments)};f={icons:r.icons,text:r.showText};delete r.icons;delete r.showText;n("<button><\/button>",r).button(f).appendTo(i.uiButtonSet)}),this.uiDialog.addClass("ui-dialog-buttons"),this.uiDialogButtonPane.appendTo(this.uiDialog),undefined)},_makeDraggable:function(){function i(n){return{position:n.position,offset:n.offset}}var t=this,r=this.options;this.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(r,u){n(this).addClass("ui-dialog-dragging");t._blockFrames();t._trigger("dragStart",r,i(u))},drag:function(n,r){t._trigger("drag",n,i(r))},stop:function(u,f){r.position=[f.position.left-t.document.scrollLeft(),f.position.top-t.document.scrollTop()];n(this).removeClass("ui-dialog-dragging");t._unblockFrames();t._trigger("dragStop",u,i(f))}})},_makeResizable:function(){function r(n){return{originalPosition:n.originalPosition,originalSize:n.originalSize,position:n.position,size:n.size}}var i=this,t=this.options,u=t.resizable,f=this.uiDialog.css("position"),e="string"==typeof u?u:"n,e,s,w,se,sw,ne,nw";this.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:this.element,maxWidth:t.maxWidth,maxHeight:t.maxHeight,minWidth:t.minWidth,minHeight:this._minHeight(),handles:e,start:function(t,u){n(this).addClass("ui-dialog-resizing");i._blockFrames();i._trigger("resizeStart",t,r(u))},resize:function(n,t){i._trigger("resize",n,r(t))},stop:function(u,f){t.height=n(this).height();t.width=n(this).width();n(this).removeClass("ui-dialog-resizing");i._unblockFrames();i._trigger("resizeStop",u,r(f))}}).css("position",f)},_minHeight:function(){var n=this.options;return"auto"===n.height?n.minHeight:Math.min(n.minHeight,n.height)},_position:function(){var n=this.uiDialog.is(":visible");n||this.uiDialog.show();this.uiDialog.position(this.options.position);n||this.uiDialog.hide()},_setOptions:function(r){var e=this,u=!1,f={};n.each(r,function(n,r){e._setOption(n,r);n in t&&(u=!0);n in i&&(f[n]=r)});u&&(this._size(),this._position());this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option",f)},_setOption:function(n,t){var u,r,i=this.uiDialog;"dialogClass"===n&&i.removeClass(this.options.dialogClass).addClass(t);"disabled"!==n&&(this._super(n,t),"appendTo"===n&&this.uiDialog.appendTo(this._appendTo()),"buttons"===n&&this._createButtons(),"closeText"===n&&this.uiDialogTitlebarClose.button({label:""+t}),"draggable"===n&&(u=i.is(":data(ui-draggable)"),u&&!t&&i.draggable("destroy"),!u&&t&&this._makeDraggable()),"position"===n&&this._position(),"resizable"===n&&(r=i.is(":data(ui-resizable)"),r&&!t&&i.resizable("destroy"),r&&"string"==typeof t&&i.resizable("option","handles",t),r||t===!1||this._makeResizable()),"title"===n&&this._title(this.uiDialogTitlebar.find(".ui-dialog-title")))},_size:function(){var t,i,r,n=this.options;this.element.show().css({width:"auto",minHeight:0,maxHeight:"none",height:0});n.minWidth>n.width&&(n.width=n.minWidth);t=this.uiDialog.css({height:"auto",width:n.width}).outerHeight();i=Math.max(0,n.minHeight-t);r="number"==typeof n.maxHeight?Math.max(0,n.maxHeight-t):"none";"auto"===n.height?this.element.css({minHeight:i,maxHeight:r,height:"auto"}):this.element.height(Math.max(0,n.height-t));this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())},_blockFrames:function(){this.iframeBlocks=this.document.find("iframe").map(function(){var t=n(this);return n("<div>").css({position:"absolute",width:t.outerWidth(),height:t.outerHeight()}).appendTo(t.parent()).offset(t.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_allowInteraction:function(t){return n(t.target).closest(".ui-dialog").length?!0:!!n(t.target).closest(".ui-datepicker").length},_createOverlay:function(){if(this.options.modal){var t=this,i=this.widgetFullName;n.ui.dialog.overlayInstances||this._delay(function(){n.ui.dialog.overlayInstances&&this.document.bind("focusin.dialog",function(r){t._allowInteraction(r)||(r.preventDefault(),n(".ui-dialog:visible:last .ui-dialog-content").data(i)._focusTabbable())})});this.overlay=n("<div>").addClass("ui-widget-overlay ui-front").appendTo(this._appendTo());this._on(this.overlay,{mousedown:"_keepFocus"});n.ui.dialog.overlayInstances++}},_destroyOverlay:function(){this.options.modal&&this.overlay&&(n.ui.dialog.overlayInstances--,n.ui.dialog.overlayInstances||this.document.unbind("focusin.dialog"),this.overlay.remove(),this.overlay=null)}});n.ui.dialog.overlayInstances=0;n.uiBackCompat!==!1&&n.widget("ui.dialog",n.ui.dialog,{_position:function(){var u,t=this.options.position,i=[],r=[0,0];t?(("string"==typeof t||"object"==typeof t&&"0"in t)&&(i=t.split?t.split(" "):[t[0],t[1]],1===i.length&&(i[1]=i[0]),n.each(["left","top"],function(n,t){+i[n]===i[n]&&(r[n]=i[n],i[n]=t)}),t={my:i[0]+(0>r[0]?r[0]:"+"+r[0])+" "+i[1]+(0>r[1]?r[1]:"+"+r[1]),at:i.join(" ")}),t=n.extend({},n.ui.dialog.prototype.options.position,t)):t=n.ui.dialog.prototype.options.position;u=this.uiDialog.is(":visible");u||this.uiDialog.show();this.uiDialog.position(t);u||this.uiDialog.hide()}})}(jQuery),function(n){n.widget("ui.menu",{version:"1.10.3",defaultElement:"<ul>",delay:300,options:{icons:{submenu:"ui-icon-carat-1-e"},menus:"ul",position:{my:"left top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element;this.mouseHandled=!1;this.element.uniqueId().addClass("ui-menu ui-widget ui-widget-content ui-corner-all").toggleClass("ui-menu-icons",!!this.element.find(".ui-icon").length).attr({role:this.options.role,tabIndex:0}).bind("click"+this.eventNamespace,n.proxy(function(n){this.options.disabled&&n.preventDefault()},this));this.options.disabled&&this.element.addClass("ui-state-disabled").attr("aria-disabled","true");this._on({"mousedown .ui-menu-item > a":function(n){n.preventDefault()},"click .ui-state-disabled > a":function(n){n.preventDefault()},"click .ui-menu-item:has(a)":function(t){var i=n(t.target).closest(".ui-menu-item");!this.mouseHandled&&i.not(".ui-state-disabled").length&&(this.mouseHandled=!0,this.select(t),i.has(".ui-menu").length?this.expand(t):this.element.is(":focus")||(this.element.trigger("focus",[!0]),this.active&&1===this.active.parents(".ui-menu").length&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":function(t){var i=n(t.currentTarget);i.siblings().children(".ui-state-active").removeClass("ui-state-active");this.focus(t,i)},mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(n,t){var i=this.active||this.element.children(".ui-menu-item").eq(0);t||this.focus(n,i)},blur:function(t){this._delay(function(){n.contains(this.element[0],this.document[0].activeElement)||this.collapseAll(t)})},keydown:"_keydown"});this.refresh();this._on(this.document,{click:function(t){n(t.target).closest(".ui-menu").length||this.collapseAll(t);this.mouseHandled=!1}})},_destroy:function(){this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeClass("ui-menu ui-widget ui-widget-content ui-corner-all ui-menu-icons").removeAttr("role").removeAttr("tabIndex").removeAttr("aria-labelledby").removeAttr("aria-expanded").removeAttr("aria-hidden").removeAttr("aria-disabled").removeUniqueId().show();this.element.find(".ui-menu-item").removeClass("ui-menu-item").removeAttr("role").removeAttr("aria-disabled").children("a").removeUniqueId().removeClass("ui-corner-all ui-state-hover").removeAttr("tabIndex").removeAttr("role").removeAttr("aria-haspopup").children().each(function(){var t=n(this);t.data("ui-menu-submenu-carat")&&t.remove()});this.element.find(".ui-menu-divider").removeClass("ui-menu-divider ui-widget-content")},_keydown:function(t){function o(n){return n.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}var i,f,r,e,u,s=!0;switch(t.keyCode){case n.ui.keyCode.PAGE_UP:this.previousPage(t);break;case n.ui.keyCode.PAGE_DOWN:this.nextPage(t);break;case n.ui.keyCode.HOME:this._move("first","first",t);break;case n.ui.keyCode.END:this._move("last","last",t);break;case n.ui.keyCode.UP:this.previous(t);break;case n.ui.keyCode.DOWN:this.next(t);break;case n.ui.keyCode.LEFT:this.collapse(t);break;case n.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(t);break;case n.ui.keyCode.ENTER:case n.ui.keyCode.SPACE:this._activate(t);break;case n.ui.keyCode.ESCAPE:this.collapse(t);break;default:s=!1;f=this.previousFilter||"";r=String.fromCharCode(t.keyCode);e=!1;clearTimeout(this.filterTimer);r===f?e=!0:r=f+r;u=RegExp("^"+o(r),"i");i=this.activeMenu.children(".ui-menu-item").filter(function(){return u.test(n(this).children("a").text())});i=e&&-1!==i.index(this.active.next())?this.active.nextAll(".ui-menu-item"):i;i.length||(r=String.fromCharCode(t.keyCode),u=RegExp("^"+o(r),"i"),i=this.activeMenu.children(".ui-menu-item").filter(function(){return u.test(n(this).children("a").text())}));i.length?(this.focus(t,i),i.length>1?(this.previousFilter=r,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter):delete this.previousFilter}s&&t.preventDefault()},_activate:function(n){this.active.is(".ui-state-disabled")||(this.active.children("a[aria-haspopup='true']").length?this.expand(n):this.select(n))},refresh:function(){var t,r=this.options.icons.submenu,i=this.element.find(this.options.menus);i.filter(":not(.ui-menu)").addClass("ui-menu ui-widget ui-widget-content ui-corner-all").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var t=n(this),i=t.prev("a"),u=n("<span>").addClass("ui-menu-icon ui-icon "+r).data("ui-menu-submenu-carat",!0);i.attr("aria-haspopup","true").prepend(u);t.attr("aria-labelledby",i.attr("id"))});t=i.add(this.element);t.children(":not(.ui-menu-item):has(a)").addClass("ui-menu-item").attr("role","presentation").children("a").uniqueId().addClass("ui-corner-all").attr({tabIndex:-1,role:this._itemRole()});t.children(":not(.ui-menu-item)").each(function(){var t=n(this);/[^\-\u2014\u2013\s]/.test(t.text())||t.addClass("ui-widget-content ui-menu-divider")});t.children(".ui-state-disabled").attr("aria-disabled","true");this.active&&!n.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},_setOption:function(n,t){"icons"===n&&this.element.find(".ui-menu-icon").removeClass(this.options.icons.submenu).addClass(t.submenu);this._super(n,t)},focus:function(n,t){var i,r;this.blur(n,n&&"focus"===n.type);this._scrollIntoView(t);this.active=t.first();r=this.active.children("a").addClass("ui-state-focus");this.options.role&&this.element.attr("aria-activedescendant",r.attr("id"));this.active.parent().closest(".ui-menu-item").children("a:first").addClass("ui-state-active");n&&"keydown"===n.type?this._close():this.timer=this._delay(function(){this._close()},this.delay);i=t.children(".ui-menu");i.length&&/^mouse/.test(n.type)&&this._startOpening(i);this.activeMenu=t.parent();this._trigger("focus",n,{item:t})},_scrollIntoView:function(t){var e,o,i,r,u,f;this._hasScroll()&&(e=parseFloat(n.css(this.activeMenu[0],"borderTopWidth"))||0,o=parseFloat(n.css(this.activeMenu[0],"paddingTop"))||0,i=t.offset().top-this.activeMenu.offset().top-e-o,r=this.activeMenu.scrollTop(),u=this.activeMenu.height(),f=t.height(),0>i?this.activeMenu.scrollTop(r+i):i+f>u&&this.activeMenu.scrollTop(r+i-u+f))},blur:function(n,t){t||clearTimeout(this.timer);this.active&&(this.active.children("a").removeClass("ui-state-focus"),this.active=null,this._trigger("blur",n,{item:this.active}))},_startOpening:function(n){clearTimeout(this.timer);"true"===n.attr("aria-hidden")&&(this.timer=this._delay(function(){this._close();this._open(n)},this.delay))},_open:function(t){var i=n.extend({of:this.active},this.options.position);clearTimeout(this.timer);this.element.find(".ui-menu").not(t.parents(".ui-menu")).hide().attr("aria-hidden","true");t.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(i)},collapseAll:function(t,i){clearTimeout(this.timer);this.timer=this._delay(function(){var r=i?this.element:n(t&&t.target).closest(this.element.find(".ui-menu"));r.length||(r=this.element);this._close(r);this.blur(t);this.activeMenu=r},this.delay)},_close:function(n){n||(n=this.active?this.active.parent():this.element);n.find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","false").end().find("a.ui-state-active").removeClass("ui-state-active")},collapse:function(n){var t=this.active&&this.active.parent().closest(".ui-menu-item",this.element);t&&t.length&&(this._close(),this.focus(n,t))},expand:function(n){var t=this.active&&this.active.children(".ui-menu ").children(".ui-menu-item").first();t&&t.length&&(this._open(t.parent()),this._delay(function(){this.focus(n,t)}))},next:function(n){this._move("next","first",n)},previous:function(n){this._move("prev","last",n)},isFirstItem:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},isLastItem:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},_move:function(n,t,i){var r;this.active&&(r="first"===n||"last"===n?this.active["first"===n?"prevAll":"nextAll"](".ui-menu-item").eq(-1):this.active[n+"All"](".ui-menu-item").eq(0));r&&r.length&&this.active||(r=this.activeMenu.children(".ui-menu-item")[t]());this.focus(i,r)},nextPage:function(t){var i,r,u;return this.active?(this.isLastItem()||(this._hasScroll()?(r=this.active.offset().top,u=this.element.height(),this.active.nextAll(".ui-menu-item").each(function(){return i=n(this),0>i.offset().top-r-u}),this.focus(t,i)):this.focus(t,this.activeMenu.children(".ui-menu-item")[this.active?"last":"first"]())),undefined):(this.next(t),undefined)},previousPage:function(t){var i,r,u;return this.active?(this.isFirstItem()||(this._hasScroll()?(r=this.active.offset().top,u=this.element.height(),this.active.prevAll(".ui-menu-item").each(function(){return i=n(this),i.offset().top-r+u>0}),this.focus(t,i)):this.focus(t,this.activeMenu.children(".ui-menu-item").first())),undefined):(this.next(t),undefined)},_hasScroll:function(){return this.element.outerHeight()<this.element.prop("scrollHeight")},select:function(t){this.active=this.active||n(t.target).closest(".ui-menu-item");var i={item:this.active};this.active.has(".ui-menu").length||this.collapseAll(t,!0);this._trigger("select",t,i)}})}(jQuery),function(n,t){n.widget("ui.progressbar",{version:"1.10.3",options:{max:100,value:0,change:null,complete:null},min:0,_create:function(){this.oldValue=this.options.value=this._constrainedValue();this.element.addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").attr({role:"progressbar","aria-valuemin":this.min});this.valueDiv=n("<div class='ui-progressbar-value ui-widget-header ui-corner-left'><\/div>").appendTo(this.element);this._refreshValue()},_destroy:function(){this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow");this.valueDiv.remove()},value:function(n){return n===t?this.options.value:(this.options.value=this._constrainedValue(n),this._refreshValue(),t)},_constrainedValue:function(n){return n===t&&(n=this.options.value),this.indeterminate=n===!1,"number"!=typeof n&&(n=0),this.indeterminate?!1:Math.min(this.options.max,Math.max(this.min,n))},_setOptions:function(n){var t=n.value;delete n.value;this._super(n);this.options.value=this._constrainedValue(t);this._refreshValue()},_setOption:function(n,t){"max"===n&&(t=Math.max(this.min,t));this._super(n,t)},_percentage:function(){return this.indeterminate?100:100*(this.options.value-this.min)/(this.options.max-this.min)},_refreshValue:function(){var t=this.options.value,i=this._percentage();this.valueDiv.toggle(this.indeterminate||t>this.min).toggleClass("ui-corner-right",t===this.options.max).width(i.toFixed(0)+"%");this.element.toggleClass("ui-progressbar-indeterminate",this.indeterminate);this.indeterminate?(this.element.removeAttr("aria-valuenow"),this.overlayDiv||(this.overlayDiv=n("<div class='ui-progressbar-overlay'><\/div>").appendTo(this.valueDiv))):(this.element.attr({"aria-valuemax":this.options.max,"aria-valuenow":t}),this.overlayDiv&&(this.overlayDiv.remove(),this.overlayDiv=null));this.oldValue!==t&&(this.oldValue=t,this._trigger("change"));t===this.options.max&&this._trigger("complete")}})}(jQuery),function(n){var t=5;n.widget("ui.slider",n.ui.mouse,{version:"1.10.3",widgetEventPrefix:"slide",options:{animate:!1,distance:0,max:100,min:0,orientation:"horizontal",range:!1,step:1,value:0,values:null,change:null,slide:null,start:null,stop:null},_create:function(){this._keySliding=!1;this._mouseSliding=!1;this._animateOff=!0;this._handleIndex=null;this._detectOrientation();this._mouseInit();this.element.addClass("ui-slider ui-slider-"+this.orientation+" ui-widget ui-widget-content ui-corner-all");this._refresh();this._setOption("disabled",this.options.disabled);this._animateOff=!1},_refresh:function(){this._createRange();this._createHandles();this._setupEvents();this._refreshValue()},_createHandles:function(){var r,i,u=this.options,t=this.element.find(".ui-slider-handle").addClass("ui-state-default ui-corner-all"),f=[];for(i=u.values&&u.values.length||1,t.length>i&&(t.slice(i).remove(),t=t.slice(0,i)),r=t.length;i>r;r++)f.push("<a class='ui-slider-handle ui-state-default ui-corner-all' href='#'><\/a>");this.handles=t.add(n(f.join("")).appendTo(this.element));this.handle=this.handles.eq(0);this.handles.each(function(t){n(this).data("ui-slider-handle-index",t)})},_createRange:function(){var t=this.options,i="";t.range?(t.range===!0&&(t.values?t.values.length&&2!==t.values.length?t.values=[t.values[0],t.values[0]]:n.isArray(t.values)&&(t.values=t.values.slice(0)):t.values=[this._valueMin(),this._valueMin()]),this.range&&this.range.length?this.range.removeClass("ui-slider-range-min ui-slider-range-max").css({left:"",bottom:""}):(this.range=n("<div><\/div>").appendTo(this.element),i="ui-slider-range ui-widget-header ui-corner-all"),this.range.addClass(i+("min"===t.range||"max"===t.range?" ui-slider-range-"+t.range:""))):this.range=n([])},_setupEvents:function(){var n=this.handles.add(this.range).filter("a");this._off(n);this._on(n,this._handleEvents);this._hoverable(n);this._focusable(n)},_destroy:function(){this.handles.remove();this.range.remove();this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-widget ui-widget-content ui-corner-all");this._mouseDestroy()},_mouseCapture:function(t){var s,f,r,i,u,h,e,c,o=this,l=this.options;return l.disabled?!1:(this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),s={x:t.pageX,y:t.pageY},f=this._normValueFromMouse(s),r=this._valueMax()-this._valueMin()+1,this.handles.each(function(t){var e=Math.abs(f-o.values(t));(r>e||r===e&&(t===o._lastChangedValue||o.values(t)===l.min))&&(r=e,i=n(this),u=t)}),h=this._start(t,u),h===!1?!1:(this._mouseSliding=!0,this._handleIndex=u,i.addClass("ui-state-active").focus(),e=i.offset(),c=!n(t.target).parents().addBack().is(".ui-slider-handle"),this._clickOffset=c?{left:0,top:0}:{left:t.pageX-e.left-i.width()/2,top:t.pageY-e.top-i.height()/2-(parseInt(i.css("borderTopWidth"),10)||0)-(parseInt(i.css("borderBottomWidth"),10)||0)+(parseInt(i.css("marginTop"),10)||0)},this.handles.hasClass("ui-state-hover")||this._slide(t,u,f),this._animateOff=!0,!0))},_mouseStart:function(){return!0},_mouseDrag:function(n){var t={x:n.pageX,y:n.pageY},i=this._normValueFromMouse(t);return this._slide(n,this._handleIndex,i),!1},_mouseStop:function(n){return this.handles.removeClass("ui-state-active"),this._mouseSliding=!1,this._stop(n,this._handleIndex),this._change(n,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=!1,!1},_detectOrientation:function(){this.orientation="vertical"===this.options.orientation?"vertical":"horizontal"},_normValueFromMouse:function(n){var i,r,t,u,f;return"horizontal"===this.orientation?(i=this.elementSize.width,r=n.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(i=this.elementSize.height,r=n.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)),t=r/i,t>1&&(t=1),0>t&&(t=0),"vertical"===this.orientation&&(t=1-t),u=this._valueMax()-this._valueMin(),f=this._valueMin()+t*u,this._trimAlignValue(f)},_start:function(n,t){var i={handle:this.handles[t],value:this.value()};return this.options.values&&this.options.values.length&&(i.value=this.values(t),i.values=this.values()),this._trigger("start",n,i)},_slide:function(n,t,i){var r,f,u;this.options.values&&this.options.values.length?(r=this.values(t?0:1),2===this.options.values.length&&this.options.range===!0&&(0===t&&i>r||1===t&&r>i)&&(i=r),i!==this.values(t)&&(f=this.values(),f[t]=i,u=this._trigger("slide",n,{handle:this.handles[t],value:i,values:f}),r=this.values(t?0:1),u!==!1&&this.values(t,i,!0))):i!==this.value()&&(u=this._trigger("slide",n,{handle:this.handles[t],value:i}),u!==!1&&this.value(i))},_stop:function(n,t){var i={handle:this.handles[t],value:this.value()};this.options.values&&this.options.values.length&&(i.value=this.values(t),i.values=this.values());this._trigger("stop",n,i)},_change:function(n,t){if(!this._keySliding&&!this._mouseSliding){var i={handle:this.handles[t],value:this.value()};this.options.values&&this.options.values.length&&(i.value=this.values(t),i.values=this.values());this._lastChangedValue=t;this._trigger("change",n,i)}},value:function(n){return arguments.length?(this.options.value=this._trimAlignValue(n),this._refreshValue(),this._change(null,0),undefined):this._value()},values:function(t,i){var u,f,r;if(arguments.length>1)return this.options.values[t]=this._trimAlignValue(i),this._refreshValue(),this._change(null,t),undefined;if(!arguments.length)return this._values();if(!n.isArray(arguments[0]))return this.options.values&&this.options.values.length?this._values(t):this.value();for(u=this.options.values,f=arguments[0],r=0;u.length>r;r+=1)u[r]=this._trimAlignValue(f[r]),this._change(null,r);this._refreshValue()},_setOption:function(t,i){var r,u=0;switch("range"===t&&this.options.range===!0&&("min"===i?(this.options.value=this._values(0),this.options.values=null):"max"===i&&(this.options.value=this._values(this.options.values.length-1),this.options.values=null)),n.isArray(this.options.values)&&(u=this.options.values.length),n.Widget.prototype._setOption.apply(this,arguments),t){case"orientation":this._detectOrientation();this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+this.orientation);this._refreshValue();break;case"value":this._animateOff=!0;this._refreshValue();this._change(null,0);this._animateOff=!1;break;case"values":for(this._animateOff=!0,this._refreshValue(),r=0;u>r;r+=1)this._change(null,r);this._animateOff=!1;break;case"min":case"max":this._animateOff=!0;this._refreshValue();this._animateOff=!1;break;case"range":this._animateOff=!0;this._refresh();this._animateOff=!1}},_value:function(){var n=this.options.value;return this._trimAlignValue(n)},_values:function(n){var r,t,i;if(arguments.length)return r=this.options.values[n],r=this._trimAlignValue(r);if(this.options.values&&this.options.values.length){for(t=this.options.values.slice(),i=0;t.length>i;i+=1)t[i]=this._trimAlignValue(t[i]);return t}return[]},_trimAlignValue:function(n){if(this._valueMin()>=n)return this._valueMin();if(n>=this._valueMax())return this._valueMax();var t=this.options.step>0?this.options.step:1,i=(n-this._valueMin())%t,r=n-i;return 2*Math.abs(i)>=t&&(r+=i>0?t:-t),parseFloat(r.toFixed(5))},_valueMin:function(){return this.options.min},_valueMax:function(){return this.options.max},_refreshValue:function(){var s,t,c,f,h,e=this.options.range,i=this.options,r=this,u=this._animateOff?!1:i.animate,o={};this.options.values&&this.options.values.length?this.handles.each(function(f){t=100*((r.values(f)-r._valueMin())/(r._valueMax()-r._valueMin()));o["horizontal"===r.orientation?"left":"bottom"]=t+"%";n(this).stop(1,1)[u?"animate":"css"](o,i.animate);r.options.range===!0&&("horizontal"===r.orientation?(0===f&&r.range.stop(1,1)[u?"animate":"css"]({left:t+"%"},i.animate),1===f&&r.range[u?"animate":"css"]({width:t-s+"%"},{queue:!1,duration:i.animate})):(0===f&&r.range.stop(1,1)[u?"animate":"css"]({bottom:t+"%"},i.animate),1===f&&r.range[u?"animate":"css"]({height:t-s+"%"},{queue:!1,duration:i.animate})));s=t}):(c=this.value(),f=this._valueMin(),h=this._valueMax(),t=h!==f?100*((c-f)/(h-f)):0,o["horizontal"===this.orientation?"left":"bottom"]=t+"%",this.handle.stop(1,1)[u?"animate":"css"](o,i.animate),"min"===e&&"horizontal"===this.orientation&&this.range.stop(1,1)[u?"animate":"css"]({width:t+"%"},i.animate),"max"===e&&"horizontal"===this.orientation&&this.range[u?"animate":"css"]({width:100-t+"%"},{queue:!1,duration:i.animate}),"min"===e&&"vertical"===this.orientation&&this.range.stop(1,1)[u?"animate":"css"]({height:t+"%"},i.animate),"max"===e&&"vertical"===this.orientation&&this.range[u?"animate":"css"]({height:100-t+"%"},{queue:!1,duration:i.animate}))},_handleEvents:{keydown:function(i){var o,u,r,f,e=n(i.target).data("ui-slider-handle-index");switch(i.keyCode){case n.ui.keyCode.HOME:case n.ui.keyCode.END:case n.ui.keyCode.PAGE_UP:case n.ui.keyCode.PAGE_DOWN:case n.ui.keyCode.UP:case n.ui.keyCode.RIGHT:case n.ui.keyCode.DOWN:case n.ui.keyCode.LEFT:if(i.preventDefault(),!this._keySliding&&(this._keySliding=!0,n(i.target).addClass("ui-state-active"),o=this._start(i,e),o===!1))return}switch(f=this.options.step,u=r=this.options.values&&this.options.values.length?this.values(e):this.value(),i.keyCode){case n.ui.keyCode.HOME:r=this._valueMin();break;case n.ui.keyCode.END:r=this._valueMax();break;case n.ui.keyCode.PAGE_UP:r=this._trimAlignValue(u+(this._valueMax()-this._valueMin())/t);break;case n.ui.keyCode.PAGE_DOWN:r=this._trimAlignValue(u-(this._valueMax()-this._valueMin())/t);break;case n.ui.keyCode.UP:case n.ui.keyCode.RIGHT:if(u===this._valueMax())return;r=this._trimAlignValue(u+f);break;case n.ui.keyCode.DOWN:case n.ui.keyCode.LEFT:if(u===this._valueMin())return;r=this._trimAlignValue(u-f)}this._slide(i,e,r)},click:function(n){n.preventDefault()},keyup:function(t){var i=n(t.target).data("ui-slider-handle-index");this._keySliding&&(this._keySliding=!1,this._stop(t,i),this._change(t,i),n(t.target).removeClass("ui-state-active"))}}})}(jQuery),function(n){function t(n){return function(){var t=this.element.val();n.apply(this,arguments);this._refresh();t!==this.element.val()&&this._trigger("change")}}n.widget("ui.spinner",{version:"1.10.3",defaultElement:"<input>",widgetEventPrefix:"spin",options:{culture:null,icons:{down:"ui-icon-triangle-1-s",up:"ui-icon-triangle-1-n"},incremental:!0,max:null,min:null,numberFormat:null,page:10,step:1,change:null,spin:null,start:null,stop:null},_create:function(){this._setOption("max",this.options.max);this._setOption("min",this.options.min);this._setOption("step",this.options.step);this._value(this.element.val(),!0);this._draw();this._on(this._events);this._refresh();this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_getCreateOptions:function(){var t={},i=this.element;return n.each(["min","max","step"],function(n,r){var u=i.attr(r);void 0!==u&&u.length&&(t[r]=u)}),t},_events:{keydown:function(n){this._start(n)&&this._keydown(n)&&n.preventDefault()},keyup:"_stop",focus:function(){this.previous=this.element.val()},blur:function(n){return this.cancelBlur?(delete this.cancelBlur,void 0):(this._stop(),this._refresh(),this.previous!==this.element.val()&&this._trigger("change",n),void 0)},mousewheel:function(n,t){if(t){if(!this.spinning&&!this._start(n))return!1;this._spin((t>0?1:-1)*this.options.step,n);clearTimeout(this.mousewheelTimer);this.mousewheelTimer=this._delay(function(){this.spinning&&this._stop(n)},100);n.preventDefault()}},"mousedown .ui-spinner-button":function(t){function r(){var n=this.element[0]===this.document[0].activeElement;n||(this.element.focus(),this.previous=i,this._delay(function(){this.previous=i}))}var i;i=this.element[0]===this.document[0].activeElement?this.previous:this.element.val();t.preventDefault();r.call(this);this.cancelBlur=!0;this._delay(function(){delete this.cancelBlur;r.call(this)});this._start(t)!==!1&&this._repeat(null,n(t.currentTarget).hasClass("ui-spinner-up")?1:-1,t)},"mouseup .ui-spinner-button":"_stop","mouseenter .ui-spinner-button":function(t){if(n(t.currentTarget).hasClass("ui-state-active"))return this._start(t)===!1?!1:(this._repeat(null,n(t.currentTarget).hasClass("ui-spinner-up")?1:-1,t),void 0)},"mouseleave .ui-spinner-button":"_stop"},_draw:function(){var n=this.uiSpinner=this.element.addClass("ui-spinner-input").attr("autocomplete","off").wrap(this._uiSpinnerHtml()).parent().append(this._buttonHtml());this.element.attr("role","spinbutton");this.buttons=n.find(".ui-spinner-button").attr("tabIndex",-1).button().removeClass("ui-corner-all");this.buttons.height()>Math.ceil(.5*n.height())&&n.height()>0&&n.height(n.height());this.options.disabled&&this.disable()},_keydown:function(t){var r=this.options,i=n.ui.keyCode;switch(t.keyCode){case i.UP:return this._repeat(null,1,t),!0;case i.DOWN:return this._repeat(null,-1,t),!0;case i.PAGE_UP:return this._repeat(null,r.page,t),!0;case i.PAGE_DOWN:return this._repeat(null,-r.page,t),!0}return!1},_uiSpinnerHtml:function(){return"<span class='ui-spinner ui-widget ui-widget-content ui-corner-all'><\/span>"},_buttonHtml:function(){return"<a class='ui-spinner-button ui-spinner-up ui-corner-tr'><span class='ui-icon "+this.options.icons.up+"'>&#9650;<\/span><\/a><a class='ui-spinner-button ui-spinner-down ui-corner-br'><span class='ui-icon "+this.options.icons.down+"'>&#9660;<\/span><\/a>"},_start:function(n){return this.spinning||this._trigger("start",n)!==!1?(this.counter||(this.counter=1),this.spinning=!0,!0):!1},_repeat:function(n,t,i){n=n||500;clearTimeout(this.timer);this.timer=this._delay(function(){this._repeat(40,t,i)},n);this._spin(t*this.options.step,i)},_spin:function(n,t){var i=this.value()||0;this.counter||(this.counter=1);i=this._adjustValue(i+n*this._increment(this.counter));this.spinning&&this._trigger("spin",t,{value:i})===!1||(this._value(i),this.counter++)},_increment:function(t){var i=this.options.incremental;return i?n.isFunction(i)?i(t):Math.floor(t*t*t/5e4-t*t/500+17*t/200+1):1},_precision:function(){var n=this._precisionOf(this.options.step);return null!==this.options.min&&(n=Math.max(n,this._precisionOf(this.options.min))),n},_precisionOf:function(n){var t=""+n,i=t.indexOf(".");return-1===i?0:t.length-i-1},_adjustValue:function(n){var r,i,t=this.options;return r=null!==t.min?t.min:0,i=n-r,i=Math.round(i/t.step)*t.step,n=r+i,n=parseFloat(n.toFixed(this._precision())),null!==t.max&&n>t.max?t.max:null!==t.min&&t.min>n?t.min:n},_stop:function(n){this.spinning&&(clearTimeout(this.timer),clearTimeout(this.mousewheelTimer),this.counter=0,this.spinning=!1,this._trigger("stop",n))},_setOption:function(n,t){if("culture"===n||"numberFormat"===n){var i=this._parse(this.element.val());return this.options[n]=t,this.element.val(this._format(i)),void 0}("max"===n||"min"===n||"step"===n)&&"string"==typeof t&&(t=this._parse(t));"icons"===n&&(this.buttons.first().find(".ui-icon").removeClass(this.options.icons.up).addClass(t.up),this.buttons.last().find(".ui-icon").removeClass(this.options.icons.down).addClass(t.down));this._super(n,t);"disabled"===n&&(t?(this.element.prop("disabled",!0),this.buttons.button("disable")):(this.element.prop("disabled",!1),this.buttons.button("enable")))},_setOptions:t(function(n){this._super(n);this._value(this.element.val())}),_parse:function(n){return"string"==typeof n&&""!==n&&(n=window.Globalize&&this.options.numberFormat?Globalize.parseFloat(n,10,this.options.culture):+n),""===n||isNaN(n)?null:n},_format:function(n){return""===n?"":window.Globalize&&this.options.numberFormat?Globalize.format(n,this.options.numberFormat,this.options.culture):n},_refresh:function(){this.element.attr({"aria-valuemin":this.options.min,"aria-valuemax":this.options.max,"aria-valuenow":this._parse(this.element.val())})},_value:function(n,t){var i;""!==n&&(i=this._parse(n),null!==i&&(t||(i=this._adjustValue(i)),n=this._format(i)));this.element.val(n);this._refresh()},_destroy:function(){this.element.removeClass("ui-spinner-input").prop("disabled",!1).removeAttr("autocomplete").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow");this.uiSpinner.replaceWith(this.element)},stepUp:t(function(n){this._stepUp(n)}),_stepUp:function(n){this._start()&&(this._spin((n||1)*this.options.step),this._stop())},stepDown:t(function(n){this._stepDown(n)}),_stepDown:function(n){this._start()&&(this._spin((n||1)*-this.options.step),this._stop())},pageUp:t(function(n){this._stepUp((n||1)*this.options.page)}),pageDown:t(function(n){this._stepDown((n||1)*this.options.page)}),value:function(n){return arguments.length?(t(this._value).call(this,n),void 0):this._parse(this.element.val())},widget:function(){return this.uiSpinner}})}(jQuery),function(n,t){function u(){return++f}function i(n){return n.hash.length>1&&decodeURIComponent(n.href.replace(r,""))===decodeURIComponent(location.href.replace(r,""))}var f=0,r=/#.*$/;n.widget("ui.tabs",{version:"1.10.3",delay:300,options:{active:null,collapsible:!1,event:"click",heightStyle:"content",hide:null,show:null,activate:null,beforeActivate:null,beforeLoad:null,load:null},_create:function(){var i=this,t=this.options;this.running=!1;this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all").toggleClass("ui-tabs-collapsible",t.collapsible).delegate(".ui-tabs-nav > li","mousedown"+this.eventNamespace,function(t){n(this).is(".ui-state-disabled")&&t.preventDefault()}).delegate(".ui-tabs-anchor","focus"+this.eventNamespace,function(){n(this).closest("li").is(".ui-state-disabled")&&this.blur()});this._processTabs();t.active=this._initialActive();n.isArray(t.disabled)&&(t.disabled=n.unique(t.disabled.concat(n.map(this.tabs.filter(".ui-state-disabled"),function(n){return i.tabs.index(n)}))).sort());this.active=this.options.active!==!1&&this.anchors.length?this._findActive(t.active):n();this._refresh();this.active.length&&this.load(t.active)},_initialActive:function(){var i=this.options.active,r=this.options.collapsible,u=location.hash.substring(1);return null===i&&(u&&this.tabs.each(function(r,f){return n(f).attr("aria-controls")===u?(i=r,!1):t}),null===i&&(i=this.tabs.index(this.tabs.filter(".ui-tabs-active"))),(null===i||-1===i)&&(i=this.tabs.length?0:!1)),i!==!1&&(i=this.tabs.index(this.tabs.eq(i)),-1===i&&(i=r?!1:0)),!r&&i===!1&&this.anchors.length&&(i=0),i},_getCreateEventData:function(){return{tab:this.active,panel:this.active.length?this._getPanelForTab(this.active):n()}},_tabKeydown:function(i){var u=n(this.document[0].activeElement).closest("li"),r=this.tabs.index(u),f=!0;if(!this._handlePageNav(i)){switch(i.keyCode){case n.ui.keyCode.RIGHT:case n.ui.keyCode.DOWN:r++;break;case n.ui.keyCode.UP:case n.ui.keyCode.LEFT:f=!1;r--;break;case n.ui.keyCode.END:r=this.anchors.length-1;break;case n.ui.keyCode.HOME:r=0;break;case n.ui.keyCode.SPACE:return i.preventDefault(),clearTimeout(this.activating),this._activate(r),t;case n.ui.keyCode.ENTER:return i.preventDefault(),clearTimeout(this.activating),this._activate(r===this.options.active?!1:r),t;default:return}i.preventDefault();clearTimeout(this.activating);r=this._focusNextTab(r,f);i.ctrlKey||(u.attr("aria-selected","false"),this.tabs.eq(r).attr("aria-selected","true"),this.activating=this._delay(function(){this.option("active",r)},this.delay))}},_panelKeydown:function(t){this._handlePageNav(t)||t.ctrlKey&&t.keyCode===n.ui.keyCode.UP&&(t.preventDefault(),this.active.focus())},_handlePageNav:function(i){return i.altKey&&i.keyCode===n.ui.keyCode.PAGE_UP?(this._activate(this._focusNextTab(this.options.active-1,!1)),!0):i.altKey&&i.keyCode===n.ui.keyCode.PAGE_DOWN?(this._activate(this._focusNextTab(this.options.active+1,!0)),!0):t},_findNextTab:function(t,i){function u(){return t>r&&(t=0),0>t&&(t=r),t}for(var r=this.tabs.length-1;-1!==n.inArray(u(),this.options.disabled);)t=i?t+1:t-1;return t},_focusNextTab:function(n,t){return n=this._findNextTab(n,t),this.tabs.eq(n).focus(),n},_setOption:function(n,i){return"active"===n?(this._activate(i),t):"disabled"===n?(this._setupDisabled(i),t):(this._super(n,i),"collapsible"===n&&(this.element.toggleClass("ui-tabs-collapsible",i),i||this.options.active!==!1||this._activate(0)),"event"===n&&this._setupEvents(i),"heightStyle"===n&&this._setupHeightStyle(i),t)},_tabId:function(n){return n.attr("aria-controls")||"ui-tabs-"+u()},_sanitizeSelector:function(n){return n?n.replace(/[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g,"\\$&"):""},refresh:function(){var t=this.options,i=this.tablist.children(":has(a[href])");t.disabled=n.map(i.filter(".ui-state-disabled"),function(n){return i.index(n)});this._processTabs();t.active!==!1&&this.anchors.length?this.active.length&&!n.contains(this.tablist[0],this.active[0])?this.tabs.length===t.disabled.length?(t.active=!1,this.active=n()):this._activate(this._findNextTab(Math.max(0,t.active-1),!1)):t.active=this.tabs.index(this.active):(t.active=!1,this.active=n());this._refresh()},_refresh:function(){this._setupDisabled(this.options.disabled);this._setupEvents(this.options.event);this._setupHeightStyle(this.options.heightStyle);this.tabs.not(this.active).attr({"aria-selected":"false",tabIndex:-1});this.panels.not(this._getPanelForTab(this.active)).hide().attr({"aria-expanded":"false","aria-hidden":"true"});this.active.length?(this.active.addClass("ui-tabs-active ui-state-active").attr({"aria-selected":"true",tabIndex:0}),this._getPanelForTab(this.active).show().attr({"aria-expanded":"true","aria-hidden":"false"})):this.tabs.eq(0).attr("tabIndex",0)},_processTabs:function(){var t=this;this.tablist=this._getList().addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").attr("role","tablist");this.tabs=this.tablist.find("> li:has(a[href])").addClass("ui-state-default ui-corner-top").attr({role:"tab",tabIndex:-1});this.anchors=this.tabs.map(function(){return n("a",this)[0]}).addClass("ui-tabs-anchor").attr({role:"presentation",tabIndex:-1});this.panels=n();this.anchors.each(function(r,u){var e,f,s,h=n(u).uniqueId().attr("id"),o=n(u).closest("li"),c=o.attr("aria-controls");i(u)?(e=u.hash,f=t.element.find(t._sanitizeSelector(e))):(s=t._tabId(o),e="#"+s,f=t.element.find(e),f.length||(f=t._createPanel(s),f.insertAfter(t.panels[r-1]||t.tablist)),f.attr("aria-live","polite"));f.length&&(t.panels=t.panels.add(f));c&&o.data("ui-tabs-aria-controls",c);o.attr({"aria-controls":e.substring(1),"aria-labelledby":h});f.attr("aria-labelledby",h)});this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").attr("role","tabpanel")},_getList:function(){return this.element.find("ol,ul").eq(0)},_createPanel:function(t){return n("<div>").attr("id",t).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").data("ui-tabs-destroy",!0)},_setupDisabled:function(t){n.isArray(t)&&(t.length?t.length===this.anchors.length&&(t=!0):t=!1);for(var i,r=0;i=this.tabs[r];r++)t===!0||-1!==n.inArray(r,t)?n(i).addClass("ui-state-disabled").attr("aria-disabled","true"):n(i).removeClass("ui-state-disabled").removeAttr("aria-disabled");this.options.disabled=t},_setupEvents:function(t){var i={click:function(n){n.preventDefault()}};t&&n.each(t.split(" "),function(n,t){i[t]="_eventHandler"});this._off(this.anchors.add(this.tabs).add(this.panels));this._on(this.anchors,i);this._on(this.tabs,{keydown:"_tabKeydown"});this._on(this.panels,{keydown:"_panelKeydown"});this._focusable(this.tabs);this._hoverable(this.tabs)},_setupHeightStyle:function(t){var i,r=this.element.parent();"fill"===t?(i=r.height(),i-=this.element.outerHeight()-this.element.height(),this.element.siblings(":visible").each(function(){var t=n(this),r=t.css("position");"absolute"!==r&&"fixed"!==r&&(i-=t.outerHeight(!0))}),this.element.children().not(this.panels).each(function(){i-=n(this).outerHeight(!0)}),this.panels.each(function(){n(this).height(Math.max(0,i-n(this).innerHeight()+n(this).height()))}).css("overflow","auto")):"auto"===t&&(i=0,this.panels.each(function(){i=Math.max(i,n(this).height("").height())}).height(i))},_eventHandler:function(t){var u=this.options,r=this.active,c=n(t.currentTarget),i=c.closest("li"),f=i[0]===r[0],e=f&&u.collapsible,o=e?n():this._getPanelForTab(i),s=r.length?this._getPanelForTab(r):n(),h={oldTab:r,oldPanel:s,newTab:e?n():i,newPanel:o};t.preventDefault();i.hasClass("ui-state-disabled")||i.hasClass("ui-tabs-loading")||this.running||f&&!u.collapsible||this._trigger("beforeActivate",t,h)===!1||(u.active=e?!1:this.tabs.index(i),this.active=f?n():i,this.xhr&&this.xhr.abort(),s.length||o.length||n.error("jQuery UI Tabs: Mismatching fragment identifier."),o.length&&this.load(this.tabs.index(i),t),this._toggle(t,h))},_toggle:function(t,i){function e(){u.running=!1;u._trigger("activate",t,i)}function o(){i.newTab.closest("li").addClass("ui-tabs-active ui-state-active");r.length&&u.options.show?u._show(r,u.options.show,e):(r.show(),e())}var u=this,r=i.newPanel,f=i.oldPanel;this.running=!0;f.length&&this.options.hide?this._hide(f,this.options.hide,function(){i.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active");o()}):(i.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),f.hide(),o());f.attr({"aria-expanded":"false","aria-hidden":"true"});i.oldTab.attr("aria-selected","false");r.length&&f.length?i.oldTab.attr("tabIndex",-1):r.length&&this.tabs.filter(function(){return 0===n(this).attr("tabIndex")}).attr("tabIndex",-1);r.attr({"aria-expanded":"true","aria-hidden":"false"});i.newTab.attr({"aria-selected":"true",tabIndex:0})},_activate:function(t){var r,i=this._findActive(t);i[0]!==this.active[0]&&(i.length||(i=this.active),r=i.find(".ui-tabs-anchor")[0],this._eventHandler({target:r,currentTarget:r,preventDefault:n.noop}))},_findActive:function(t){return t===!1?n():this.tabs.eq(t)},_getIndex:function(n){return"string"==typeof n&&(n=this.anchors.index(this.anchors.filter("[href$='"+n+"']"))),n},_destroy:function(){this.xhr&&this.xhr.abort();this.element.removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible");this.tablist.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").removeAttr("role");this.anchors.removeClass("ui-tabs-anchor").removeAttr("role").removeAttr("tabIndex").removeUniqueId();this.tabs.add(this.panels).each(function(){n.data(this,"ui-tabs-destroy")?n(this).remove():n(this).removeClass("ui-state-default ui-state-active ui-state-disabled ui-corner-top ui-corner-bottom ui-widget-content ui-tabs-active ui-tabs-panel").removeAttr("tabIndex").removeAttr("aria-live").removeAttr("aria-busy").removeAttr("aria-selected").removeAttr("aria-labelledby").removeAttr("aria-hidden").removeAttr("aria-expanded").removeAttr("role")});this.tabs.each(function(){var t=n(this),i=t.data("ui-tabs-aria-controls");i?t.attr("aria-controls",i).removeData("ui-tabs-aria-controls"):t.removeAttr("aria-controls")});this.panels.show();"content"!==this.options.heightStyle&&this.panels.css("height","")},enable:function(i){var r=this.options.disabled;r!==!1&&(i===t?r=!1:(i=this._getIndex(i),r=n.isArray(r)?n.map(r,function(n){return n!==i?n:null}):n.map(this.tabs,function(n,t){return t!==i?t:null})),this._setupDisabled(r))},disable:function(i){var r=this.options.disabled;if(r!==!0){if(i===t)r=!0;else{if(i=this._getIndex(i),-1!==n.inArray(i,r))return;r=n.isArray(r)?n.merge([i],r).sort():[i]}this._setupDisabled(r)}},load:function(t,r){t=this._getIndex(t);var f=this,u=this.tabs.eq(t),o=u.find(".ui-tabs-anchor"),e=this._getPanelForTab(u),s={tab:u,panel:e};i(o[0])||(this.xhr=n.ajax(this._ajaxSettings(o,r,s)),this.xhr&&"canceled"!==this.xhr.statusText&&(u.addClass("ui-tabs-loading"),e.attr("aria-busy","true"),this.xhr.success(function(n){setTimeout(function(){e.html(n);f._trigger("load",r,s)},1)}).complete(function(n,t){setTimeout(function(){"abort"===t&&f.panels.stop(!1,!0);u.removeClass("ui-tabs-loading");e.removeAttr("aria-busy");n===f.xhr&&delete f.xhr},1)})))},_ajaxSettings:function(t,i,r){var u=this;return{url:t.attr("href"),beforeSend:function(t,f){return u._trigger("beforeLoad",i,n.extend({jqXHR:t,ajaxSettings:f},r))}}},_getPanelForTab:function(t){var i=n(t).attr("aria-controls");return this.element.find(this._sanitizeSelector("#"+i))}})}(jQuery),function(n){function t(t,i){var r=(t.attr("aria-describedby")||"").split(/\s+/);r.push(i);t.data("ui-tooltip-id",i).attr("aria-describedby",n.trim(r.join(" ")))}function i(t){var u=t.data("ui-tooltip-id"),i=(t.attr("aria-describedby")||"").split(/\s+/),r=n.inArray(u,i);-1!==r&&i.splice(r,1);t.removeData("ui-tooltip-id");i=n.trim(i.join(" "));i?t.attr("aria-describedby",i):t.removeAttr("aria-describedby")}var r=0;n.widget("ui.tooltip",{version:"1.10.3",options:{content:function(){var t=n(this).attr("title")||"";return n("<a>").text(t).html()},hide:!0,items:"[title]:not([disabled])",position:{my:"left top+15",at:"left bottom",collision:"flipfit flip"},show:!0,tooltipClass:null,track:!1,close:null,open:null},_create:function(){this._on({mouseover:"open",focusin:"open"});this.tooltips={};this.parents={};this.options.disabled&&this._disable()},_setOption:function(t,i){var r=this;return"disabled"===t?(this[i?"_disable":"_enable"](),this.options[t]=i,void 0):(this._super(t,i),"content"===t&&n.each(this.tooltips,function(n,t){r._updateContent(t)}),void 0)},_disable:function(){var t=this;n.each(this.tooltips,function(i,r){var u=n.Event("blur");u.target=u.currentTarget=r[0];t.close(u,!0)});this.element.find(this.options.items).addBack().each(function(){var t=n(this);t.is("[title]")&&t.data("ui-tooltip-title",t.attr("title")).attr("title","")})},_enable:function(){this.element.find(this.options.items).addBack().each(function(){var t=n(this);t.data("ui-tooltip-title")&&t.attr("title",t.data("ui-tooltip-title"))})},open:function(t){var r=this,i=n(t?t.target:this.element).closest(this.options.items);i.length&&!i.data("ui-tooltip-id")&&(i.attr("title")&&i.data("ui-tooltip-title",i.attr("title")),i.data("ui-tooltip-open",!0),t&&"mouseover"===t.type&&i.parents().each(function(){var i,t=n(this);t.data("ui-tooltip-open")&&(i=n.Event("blur"),i.target=i.currentTarget=this,r.close(i,!0));t.attr("title")&&(t.uniqueId(),r.parents[this.id]={element:this,title:t.attr("title")},t.attr("title",""))}),this._updateContent(i,t))},_updateContent:function(n,t){var i,r=this.options.content,u=this,f=t?t.type:null;return"string"==typeof r?this._open(t,n,r):(i=r.call(n[0],function(i){n.data("ui-tooltip-open")&&u._delay(function(){t&&(t.type=f);this._open(t,n,i)})}),i&&this._open(t,n,i),void 0)},_open:function(i,r,u){function o(n){s.of=n;f.is(":hidden")||f.position(s)}var f,e,h,s=n.extend({},this.options.position);if(u){if(f=this._find(r),f.length)return f.find(".ui-tooltip-content").html(u),void 0;r.is("[title]")&&(i&&"mouseover"===i.type?r.attr("title",""):r.removeAttr("title"));f=this._tooltip(r);t(r,f.attr("id"));f.find(".ui-tooltip-content").html(u);this.options.track&&i&&/^mouse/.test(i.type)?(this._on(this.document,{mousemove:o}),o(i)):f.position(n.extend({of:r},this.options.position));f.hide();this._show(f,this.options.show);this.options.show&&this.options.show.delay&&(h=this.delayedShow=setInterval(function(){f.is(":visible")&&(o(s.of),clearInterval(h))},n.fx.interval));this._trigger("open",i,{tooltip:f});e={keyup:function(t){if(t.keyCode===n.ui.keyCode.ESCAPE){var i=n.Event(t);i.currentTarget=r[0];this.close(i,!0)}},remove:function(){this._removeTooltip(f)}};i&&"mouseover"!==i.type||(e.mouseleave="close");i&&"focusin"!==i.type||(e.focusout="close");this._on(!0,r,e)}},close:function(t){var f=this,r=n(t?t.currentTarget:this.element),u=this._find(r);this.closing||(clearInterval(this.delayedShow),r.data("ui-tooltip-title")&&r.attr("title",r.data("ui-tooltip-title")),i(r),u.stop(!0),this._hide(u,this.options.hide,function(){f._removeTooltip(n(this))}),r.removeData("ui-tooltip-open"),this._off(r,"mouseleave focusout keyup"),r[0]!==this.element[0]&&this._off(r,"remove"),this._off(this.document,"mousemove"),t&&"mouseleave"===t.type&&n.each(this.parents,function(t,i){n(i.element).attr("title",i.title);delete f.parents[t]}),this.closing=!0,this._trigger("close",t,{tooltip:u}),this.closing=!1)},_tooltip:function(t){var u="ui-tooltip-"+r++,i=n("<div>").attr({id:u,role:"tooltip"}).addClass("ui-tooltip ui-widget ui-corner-all ui-widget-content "+(this.options.tooltipClass||""));return n("<div>").addClass("ui-tooltip-content").appendTo(i),i.appendTo(this.document[0].body),this.tooltips[u]=t,i},_find:function(t){var i=t.data("ui-tooltip-id");return i?n("#"+i):n()},_removeTooltip:function(n){n.remove();delete this.tooltips[n.attr("id")]},_destroy:function(){var t=this;n.each(this.tooltips,function(i,r){var u=n.Event("blur");u.target=u.currentTarget=r[0];t.close(u,!0);n("#"+i).remove();r.data("ui-tooltip-title")&&(r.attr("title",r.data("ui-tooltip-title")),r.removeData("ui-tooltip-title"))})}})}(jQuery),function(n,t){var i="ui-effects-";n.effects={effect:{}},function(n,t){function f(n,t,i){var r=h[t.type]||{};return null==n?i||!t.def?null:t.def:(n=r.floor?~~n:parseFloat(n),isNaN(n)?t.def:r.mod?(n+r.mod)%r.mod:0>n?0:n>r.max?r.max:n)}function s(f){var o=i(),s=o._rgba=[];return f=f.toLowerCase(),r(v,function(n,i){var r,h=i.re.exec(f),c=h&&i.parse(h),e=i.space||"rgba";return c?(r=o[e](c),o[u[e].cache]=r[u[e].cache],s=o._rgba=r._rgba,!1):t}),s.length?("0,0,0,0"===s.join()&&n.extend(s,e.transparent),o):e[f]}function o(n,t,i){return i=(i+1)%1,1>6*i?n+6*(t-n)*i:1>2*i?t:2>3*i?n+6*(t-n)*(2/3-i):n}var e,a=/^([\-+])=\s*(\d+\.?\d*)/,v=[{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(n){return[n[1],n[2],n[3],n[4]]}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(n){return[2.55*n[1],2.55*n[2],2.55*n[3],n[4]]}},{re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,parse:function(n){return[parseInt(n[1],16),parseInt(n[2],16),parseInt(n[3],16)]}},{re:/#([a-f0-9])([a-f0-9])([a-f0-9])/,parse:function(n){return[parseInt(n[1]+n[1],16),parseInt(n[2]+n[2],16),parseInt(n[3]+n[3],16)]}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(n){return[n[1],n[2]/100,n[3]/100,n[4]]}}],i=n.Color=function(t,i,r,u){return new n.Color.fn.parse(t,i,r,u)},u={rgba:{props:{red:{idx:0,type:"byte"},green:{idx:1,type:"byte"},blue:{idx:2,type:"byte"}}},hsla:{props:{hue:{idx:0,type:"degrees"},saturation:{idx:1,type:"percent"},lightness:{idx:2,type:"percent"}}}},h={byte:{floor:!0,max:255},percent:{max:1},degrees:{mod:360,floor:!0}},c=i.support={},l=n("<p>")[0],r=n.each;l.style.cssText="background-color:rgba(1,1,1,.5)";c.rgba=l.style.backgroundColor.indexOf("rgba")>-1;r(u,function(n,t){t.cache="_"+n;t.props.alpha={idx:3,type:"percent",def:1}});i.fn=n.extend(i.prototype,{parse:function(o,h,c,l){if(o===t)return this._rgba=[null,null,null,null],this;(o.jquery||o.nodeType)&&(o=n(o).css(h),h=t);var a=this,v=n.type(o),y=this._rgba=[];return h!==t&&(o=[o,h,c,l],v="array"),"string"===v?this.parse(s(o)||e._default):"array"===v?(r(u.rgba.props,function(n,t){y[t.idx]=f(o[t.idx],t)}),this):"object"===v?(o instanceof i?r(u,function(n,t){o[t.cache]&&(a[t.cache]=o[t.cache].slice())}):r(u,function(t,i){var u=i.cache;r(i.props,function(n,t){if(!a[u]&&i.to){if("alpha"===n||null==o[n])return;a[u]=i.to(a._rgba)}a[u][t.idx]=f(o[n],t,!0)});a[u]&&0>n.inArray(null,a[u].slice(0,3))&&(a[u][3]=1,i.from&&(a._rgba=i.from(a[u])))}),this):t},is:function(n){var o=i(n),f=!0,e=this;return r(u,function(n,i){var s,u=o[i.cache];return u&&(s=e[i.cache]||i.to&&i.to(e._rgba)||[],r(i.props,function(n,i){return null!=u[i.idx]?f=u[i.idx]===s[i.idx]:t})),f}),f},_space:function(){var n=[],t=this;return r(u,function(i,r){t[r.cache]&&n.push(i)}),n.pop()},transition:function(n,t){var e=i(n),c=e._space(),o=u[c],l=0===this.alpha()?i("transparent"):this,a=l[o.cache]||o.to(l._rgba),s=a.slice();return e=e[o.cache],r(o.props,function(n,i){var c=i.idx,r=a[c],u=e[c],o=h[i.type]||{};null!==u&&(null===r?s[c]=u:(o.mod&&(u-r>o.mod/2?r+=o.mod:r-u>o.mod/2&&(r-=o.mod)),s[c]=f((u-r)*t+r,i)))}),this[c](s)},blend:function(t){if(1===this._rgba[3])return this;var r=this._rgba.slice(),u=r.pop(),f=i(t)._rgba;return i(n.map(r,function(n,t){return(1-u)*f[t]+u*n}))},toRgbaString:function(){var i="rgba(",t=n.map(this._rgba,function(n,t){return null==n?t>2?1:0:n});return 1===t[3]&&(t.pop(),i="rgb("),i+t.join()+")"},toHslaString:function(){var i="hsla(",t=n.map(this.hsla(),function(n,t){return null==n&&(n=t>2?1:0),t&&3>t&&(n=Math.round(100*n)+"%"),n});return 1===t[3]&&(t.pop(),i="hsl("),i+t.join()+")"},toHexString:function(t){var i=this._rgba.slice(),r=i.pop();return t&&i.push(~~(255*r)),"#"+n.map(i,function(n){return n=(n||0).toString(16),1===n.length?"0"+n:n}).join("")},toString:function(){return 0===this._rgba[3]?"transparent":this.toRgbaString()}});i.fn.parse.prototype=i.fn;u.hsla.to=function(n){if(null==n[0]||null==n[1]||null==n[2])return[null,null,null,n[3]];var s,h,i=n[0]/255,r=n[1]/255,f=n[2]/255,c=n[3],u=Math.max(i,r,f),e=Math.min(i,r,f),t=u-e,o=u+e,l=.5*o;return s=e===u?0:i===u?60*(r-f)/t+360:r===u?60*(f-i)/t+120:60*(i-r)/t+240,h=0===t?0:.5>=l?t/o:t/(2-o),[Math.round(s)%360,h,l,null==c?1:c]};u.hsla.from=function(n){if(null==n[0]||null==n[1]||null==n[2])return[null,null,null,n[3]];var r=n[0]/360,u=n[1],t=n[2],e=n[3],i=.5>=t?t*(1+u):t+u-t*u,f=2*t-i;return[Math.round(255*o(f,i,r+1/3)),Math.round(255*o(f,i,r)),Math.round(255*o(f,i,r-1/3)),e]};r(u,function(u,e){var s=e.props,o=e.cache,h=e.to,c=e.from;i.fn[u]=function(u){if(h&&!this[o]&&(this[o]=h(this._rgba)),u===t)return this[o].slice();var l,a=n.type(u),v="array"===a||"object"===a?u:arguments,e=this[o].slice();return r(s,function(n,t){var i=v["object"===a?n:t.idx];null==i&&(i=e[t.idx]);e[t.idx]=f(i,t)}),c?(l=i(c(e)),l[o]=e,l):i(e)};r(s,function(t,r){i.fn[t]||(i.fn[t]=function(i){var f,e=n.type(i),h="alpha"===t?this._hsla?"hsla":"rgba":u,o=this[h](),s=o[r.idx];return"undefined"===e?s:("function"===e&&(i=i.call(this,s),e=n.type(i)),null==i&&r.empty?this:("string"===e&&(f=a.exec(i),f&&(i=s+parseFloat(f[2])*("+"===f[1]?1:-1))),o[r.idx]=i,this[h](o)))})})});i.hook=function(t){var u=t.split(" ");r(u,function(t,r){n.cssHooks[r]={set:function(t,u){var o,f,e="";if("transparent"!==u&&("string"!==n.type(u)||(o=s(u)))){if(u=i(o||u),!c.rgba&&1!==u._rgba[3]){for(f="backgroundColor"===r?t.parentNode:t;(""===e||"transparent"===e)&&f&&f.style;)try{e=n.css(f,"backgroundColor");f=f.parentNode}catch(h){}u=u.blend(e&&"transparent"!==e?e:"_default")}u=u.toRgbaString()}try{t.style[r]=u}catch(h){}}};n.fx.step[r]=function(t){t.colorInit||(t.start=i(t.elem,r),t.end=i(t.end),t.colorInit=!0);n.cssHooks[r].set(t.elem,t.start.transition(t.end,t.pos))}})};i.hook("backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor");n.cssHooks.borderColor={expand:function(n){var t={};return r(["Top","Right","Bottom","Left"],function(i,r){t["border"+r+"Color"]=n}),t}};e=n.Color.names={aqua:"#00ffff",black:"#000000",blue:"#0000ff",fuchsia:"#ff00ff",gray:"#808080",green:"#008000",lime:"#00ff00",maroon:"#800000",navy:"#000080",olive:"#808000",purple:"#800080",red:"#ff0000",silver:"#c0c0c0",teal:"#008080",white:"#ffffff",yellow:"#ffff00",transparent:[null,null,null,0],_default:"#ffffff"}}(jQuery),function(){function i(t){var r,u,i=t.ownerDocument.defaultView?t.ownerDocument.defaultView.getComputedStyle(t,null):t.currentStyle,f={};if(i&&i.length&&i[0]&&i[i[0]])for(u=i.length;u--;)r=i[u],"string"==typeof i[r]&&(f[n.camelCase(r)]=i[r]);else for(r in i)"string"==typeof i[r]&&(f[r]=i[r]);return f}function r(t,i){var r,u,e={};for(r in i)u=i[r],t[r]!==u&&(f[r]||(n.fx.step[r]||!isNaN(parseFloat(u)))&&(e[r]=u));return e}var u=["add","remove","toggle"],f={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};n.each(["borderLeftStyle","borderRightStyle","borderBottomStyle","borderTopStyle"],function(t,i){n.fx.step[i]=function(n){("none"===n.end||n.setAttr)&&(1!==n.pos||n.setAttr)||(jQuery.style(n.elem,i,n.end),n.setAttr=!0)}});n.fn.addBack||(n.fn.addBack=function(n){return this.add(null==n?this.prevObject:this.prevObject.filter(n))});n.effects.animateClass=function(t,f,e,o){var s=n.speed(f,e,o);return this.queue(function(){var o,e=n(this),h=e.attr("class")||"",f=s.children?e.find("*").addBack():e;f=f.map(function(){var t=n(this);return{el:t,start:i(this)}});o=function(){n.each(u,function(n,i){t[i]&&e[i+"Class"](t[i])})};o();f=f.map(function(){return this.end=i(this.el[0]),this.diff=r(this.start,this.end),this});e.attr("class",h);f=f.map(function(){var i=this,t=n.Deferred(),r=n.extend({},s,{queue:!1,complete:function(){t.resolve(i)}});return this.el.animate(this.diff,r),t.promise()});n.when.apply(n,f.get()).done(function(){o();n.each(arguments,function(){var t=this.el;n.each(this.diff,function(n){t.css(n,"")})});s.complete.call(e[0])})})};n.fn.extend({addClass:function(t){return function(i,r,u,f){return r?n.effects.animateClass.call(this,{add:i},r,u,f):t.apply(this,arguments)}}(n.fn.addClass),removeClass:function(t){return function(i,r,u,f){return arguments.length>1?n.effects.animateClass.call(this,{remove:i},r,u,f):t.apply(this,arguments)}}(n.fn.removeClass),toggleClass:function(i){return function(r,u,f,e,o){return"boolean"==typeof u||u===t?f?n.effects.animateClass.call(this,u?{add:r}:{remove:r},f,e,o):i.apply(this,arguments):n.effects.animateClass.call(this,{toggle:r},u,f,e)}}(n.fn.toggleClass),switchClass:function(t,i,r,u,f){return n.effects.animateClass.call(this,{add:i,remove:t},r,u,f)}})}(),function(){function r(t,i,r,u){return n.isPlainObject(t)&&(i=t,t=t.effect),t={effect:t},null==i&&(i={}),n.isFunction(i)&&(u=i,r=null,i={}),("number"==typeof i||n.fx.speeds[i])&&(u=r,r=i,i={}),n.isFunction(r)&&(u=r,r=null),i&&n.extend(t,i),r=r||i.duration,t.duration=n.fx.off?0:"number"==typeof r?r:r in n.fx.speeds?n.fx.speeds[r]:n.fx.speeds._default,t.complete=u||i.complete,t}function u(t){return!t||"number"==typeof t||n.fx.speeds[t]?!0:"string"!=typeof t||n.effects.effect[t]?n.isFunction(t)?!0:"object"!=typeof t||t.effect?!1:!0:!0}n.extend(n.effects,{version:"1.10.3",save:function(n,t){for(var r=0;t.length>r;r++)null!==t[r]&&n.data(i+t[r],n[0].style[t[r]])},restore:function(n,r){for(var f,u=0;r.length>u;u++)null!==r[u]&&(f=n.data(i+r[u]),f===t&&(f=""),n.css(r[u],f))},setMode:function(n,t){return"toggle"===t&&(t=n.is(":hidden")?"show":"hide"),t},getBaseline:function(n,t){var i,r;switch(n[0]){case"top":i=0;break;case"middle":i=.5;break;case"bottom":i=1;break;default:i=n[0]/t.height}switch(n[1]){case"left":r=0;break;case"center":r=.5;break;case"right":r=1;break;default:r=n[1]/t.width}return{x:r,y:i}},createWrapper:function(t){if(t.parent().is(".ui-effects-wrapper"))return t.parent();var i={width:t.outerWidth(!0),height:t.outerHeight(!0),float:t.css("float")},u=n("<div><\/div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),f={width:t.width(),height:t.height()},r=document.activeElement;try{r.id}catch(e){r=document.body}return t.wrap(u),(t[0]===r||n.contains(t[0],r))&&n(r).focus(),u=t.parent(),"static"===t.css("position")?(u.css({position:"relative"}),t.css({position:"relative"})):(n.extend(i,{position:t.css("position"),zIndex:t.css("z-index")}),n.each(["top","left","bottom","right"],function(n,r){i[r]=t.css(r);isNaN(parseInt(i[r],10))&&(i[r]="auto")}),t.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),t.css(f),u.css(i).show()},removeWrapper:function(t){var i=document.activeElement;return t.parent().is(".ui-effects-wrapper")&&(t.parent().replaceWith(t),(t[0]===i||n.contains(t[0],i))&&n(i).focus()),t},setTransition:function(t,i,r,u){return u=u||{},n.each(i,function(n,i){var f=t.cssUnit(i);f[0]>0&&(u[i]=f[0]*r+f[1])}),u}});n.fn.extend({effect:function(){function i(i){function f(){n.isFunction(o)&&o.call(r[0]);n.isFunction(i)&&i()}var r=n(this),o=t.complete,u=t.mode;(r.is(":hidden")?"hide"===u:"show"===u)?(r[u](),f()):e.call(r[0],t,f)}var t=r.apply(this,arguments),u=t.mode,f=t.queue,e=n.effects.effect[t.effect];return n.fx.off||!e?u?this[u](t.duration,t.complete):this.each(function(){t.complete&&t.complete.call(this)}):f===!1?this.each(i):this.queue(f||"fx",i)},show:function(n){return function(t){if(u(t))return n.apply(this,arguments);var i=r.apply(this,arguments);return i.mode="show",this.effect.call(this,i)}}(n.fn.show),hide:function(n){return function(t){if(u(t))return n.apply(this,arguments);var i=r.apply(this,arguments);return i.mode="hide",this.effect.call(this,i)}}(n.fn.hide),toggle:function(n){return function(t){if(u(t)||"boolean"==typeof t)return n.apply(this,arguments);var i=r.apply(this,arguments);return i.mode="toggle",this.effect.call(this,i)}}(n.fn.toggle),cssUnit:function(t){var i=this.css(t),r=[];return n.each(["em","px","%","pt"],function(n,t){i.indexOf(t)>0&&(r=[parseFloat(i),t])}),r}})}(),function(){var t={};n.each(["Quad","Cubic","Quart","Quint","Expo"],function(n,i){t[i]=function(t){return Math.pow(t,n+2)}});n.extend(t,{Sine:function(n){return 1-Math.cos(n*Math.PI/2)},Circ:function(n){return 1-Math.sqrt(1-n*n)},Elastic:function(n){return 0===n||1===n?n:-Math.pow(2,8*(n-1))*Math.sin((80*(n-1)-7.5)*Math.PI/15)},Back:function(n){return n*n*(3*n-2)},Bounce:function(n){for(var t,i=4;((t=Math.pow(2,--i))-1)/11>n;);return 1/Math.pow(4,3-i)-7.5625*Math.pow((3*t-2)/22-n,2)}});n.each(t,function(t,i){n.easing["easeIn"+t]=i;n.easing["easeOut"+t]=function(n){return 1-i(1-n)};n.easing["easeInOut"+t]=function(n){return.5>n?i(2*n)/2:1-i(-2*n+2)/2}})}()}(jQuery),function(n){var t=/up|down|vertical/,i=/up|left|vertical|horizontal/;n.effects.effect.blind=function(r,u){var e,o,s,f=n(this),c=["position","top","bottom","left","right","height","width"],p=n.effects.setMode(f,r.mode||"hide"),w=r.direction||"up",h=t.test(w),l=h?"height":"width",a=h?"top":"left",b=i.test(w),v={},y="show"===p;f.parent().is(".ui-effects-wrapper")?n.effects.save(f.parent(),c):n.effects.save(f,c);f.show();e=n.effects.createWrapper(f).css({overflow:"hidden"});o=e[l]();s=parseFloat(e.css(a))||0;v[l]=y?o:0;b||(f.css(h?"bottom":"right",0).css(h?"top":"left","auto").css({position:"absolute"}),v[a]=y?s:o+s);y&&(e.css(l,0),b||e.css(a,s+o));e.animate(v,{duration:r.duration,easing:r.easing,queue:!1,complete:function(){"hide"===p&&f.hide();n.effects.restore(f,c);n.effects.removeWrapper(f);u()}})}}(jQuery),function(n){n.effects.effect.bounce=function(t,i){var v,f,e,r=n(this),y=["position","top","bottom","left","right","height","width"],k=n.effects.setMode(r,t.mode||"effect"),o="hide"===k,p="show"===k,h=t.direction||"up",u=t.distance,w=t.times||5,d=2*w+(p||o?1:0),c=t.duration/d,l=t.easing,s="up"===h||"down"===h?"top":"left",b="up"===h||"left"===h,a=r.queue(),g=a.length;for((p||o)&&y.push("opacity"),n.effects.save(r,y),r.show(),n.effects.createWrapper(r),u||(u=r["top"===s?"outerHeight":"outerWidth"]()/3),p&&(e={opacity:1},e[s]=0,r.css("opacity",0).css(s,b?2*-u:2*u).animate(e,c,l)),o&&(u/=Math.pow(2,w-1)),e={},e[s]=0,v=0;w>v;v++)f={},f[s]=(b?"-=":"+=")+u,r.animate(f,c,l).animate(e,c,l),u=o?2*u:u/2;o&&(f={opacity:0},f[s]=(b?"-=":"+=")+u,r.animate(f,c,l));r.queue(function(){o&&r.hide();n.effects.restore(r,y);n.effects.removeWrapper(r);i()});g>1&&a.splice.apply(a,[1,0].concat(a.splice(g,d+1)));r.dequeue()}}(jQuery),function(n){n.effects.effect.clip=function(t,i){var h,u,f,r=n(this),c=["position","top","bottom","left","right","height","width"],v=n.effects.setMode(r,t.mode||"hide"),e="show"===v,y=t.direction||"vertical",l="vertical"===y,o=l?"height":"width",a=l?"top":"left",s={};n.effects.save(r,c);r.show();h=n.effects.createWrapper(r).css({overflow:"hidden"});u="IMG"===r[0].tagName?h:r;f=u[o]();e&&(u.css(o,0),u.css(a,f/2));s[o]=e?f:0;s[a]=e?0:f/2;u.animate(s,{queue:!1,duration:t.duration,easing:t.easing,complete:function(){e||r.hide();n.effects.restore(r,c);n.effects.removeWrapper(r);i()}})}}(jQuery),function(n){n.effects.effect.drop=function(t,i){var u,r=n(this),h=["position","top","bottom","left","right","opacity","height","width"],c=n.effects.setMode(r,t.mode||"hide"),e="show"===c,f=t.direction||"left",o="up"===f||"down"===f?"top":"left",s="up"===f||"left"===f?"pos":"neg",l={opacity:e?1:0};n.effects.save(r,h);r.show();n.effects.createWrapper(r);u=t.distance||r["top"===o?"outerHeight":"outerWidth"](!0)/2;e&&r.css("opacity",0).css(o,"pos"===s?-u:u);l[o]=(e?"pos"===s?"+=":"-=":"pos"===s?"-=":"+=")+u;r.animate(l,{queue:!1,duration:t.duration,easing:t.easing,complete:function(){"hide"===c&&r.hide();n.effects.restore(r,h);n.effects.removeWrapper(r);i()}})}}(jQuery),function(n){n.effects.effect.explode=function(t,i){function b(){p.push(this);p.length===o*c&&k()}function k(){r.css({visibility:"visible"});n(p).remove();u||r.hide();i()}for(var e,l,a,v,y,o=t.pieces?Math.round(Math.sqrt(t.pieces)):3,c=o,r=n(this),d=n.effects.setMode(r,t.mode||"hide"),u="show"===d,w=r.show().css("visibility","hidden").offset(),s=Math.ceil(r.outerWidth()/c),h=Math.ceil(r.outerHeight()/o),p=[],f=0;o>f;f++)for(a=w.top+f*h,y=f-(o-1)/2,e=0;c>e;e++)l=w.left+e*s,v=e-(c-1)/2,r.clone().appendTo("body").wrap("<div><\/div>").css({position:"absolute",visibility:"visible",left:-e*s,top:-f*h}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:s,height:h,left:l+(u?v*s:0),top:a+(u?y*h:0),opacity:u?0:1}).animate({left:l+(u?0:v*s),top:a+(u?0:y*h),opacity:u?1:0},t.duration||500,t.easing,b)}}(jQuery),function(n){n.effects.effect.fade=function(t,i){var r=n(this),u=n.effects.setMode(r,t.mode||"toggle");r.animate({opacity:u},{queue:!1,duration:t.duration,easing:t.easing,complete:i})}}(jQuery),function(n){n.effects.effect.fold=function(t,i){var r,e,u=n(this),s=["position","top","bottom","left","right","height","width"],h=n.effects.setMode(u,t.mode||"hide"),o="show"===h,c="hide"===h,f=t.size||15,l=/([0-9]+)%/.exec(f),a=!!t.horizFirst,v=o!==a,y=v?["width","height"]:["height","width"],p=t.duration/2,w={},b={};n.effects.save(u,s);u.show();r=n.effects.createWrapper(u).css({overflow:"hidden"});e=v?[r.width(),r.height()]:[r.height(),r.width()];l&&(f=parseInt(l[1],10)/100*e[c?0:1]);o&&r.css(a?{height:0,width:f}:{height:f,width:0});w[y[0]]=o?e[0]:f;b[y[1]]=o?e[1]:0;r.animate(w,p,t.easing).animate(b,p,t.easing,function(){c&&u.hide();n.effects.restore(u,s);n.effects.removeWrapper(u);i()})}}(jQuery),function(n){n.effects.effect.highlight=function(t,i){var r=n(this),u=["backgroundImage","backgroundColor","opacity"],f=n.effects.setMode(r,t.mode||"show"),e={backgroundColor:r.css("backgroundColor")};"hide"===f&&(e.opacity=0);n.effects.save(r,u);r.show().css({backgroundImage:"none",backgroundColor:t.color||"#ffff99"}).animate(e,{queue:!1,duration:t.duration,easing:t.easing,complete:function(){"hide"===f&&r.hide();n.effects.restore(r,u);i()}})}}(jQuery),function(n){n.effects.effect.pulsate=function(t,i){var e,r=n(this),o=n.effects.setMode(r,t.mode||"show"),h="show"===o,a="hide"===o,v=h||"hide"===o,s=2*(t.times||5)+(v?1:0),c=t.duration/s,u=0,f=r.queue(),l=f.length;for((h||!r.is(":visible"))&&(r.css("opacity",0).show(),u=1),e=1;s>e;e++)r.animate({opacity:u},c,t.easing),u=1-u;r.animate({opacity:u},c,t.easing);r.queue(function(){a&&r.hide();i()});l>1&&f.splice.apply(f,[1,0].concat(f.splice(l,s+1)));r.dequeue()}}(jQuery),function(n){n.effects.effect.puff=function(t,i){var r=n(this),e=n.effects.setMode(r,t.mode||"hide"),o="hide"===e,s=parseInt(t.percent,10)||150,f=s/100,u={height:r.height(),width:r.width(),outerHeight:r.outerHeight(),outerWidth:r.outerWidth()};n.extend(t,{effect:"scale",queue:!1,fade:!0,mode:e,complete:i,percent:o?s:100,from:o?u:{height:u.height*f,width:u.width*f,outerHeight:u.outerHeight*f,outerWidth:u.outerWidth*f}});r.effect(t)};n.effects.effect.scale=function(t,i){var u=n(this),r=n.extend(!0,{},t),f=n.effects.setMode(u,t.mode||"effect"),s=parseInt(t.percent,10)||(0===parseInt(t.percent,10)?0:"hide"===f?0:100),h=t.direction||"both",c=t.origin,e={height:u.height(),width:u.width(),outerHeight:u.outerHeight(),outerWidth:u.outerWidth()},o={y:"horizontal"!==h?s/100:1,x:"vertical"!==h?s/100:1};r.effect="size";r.queue=!1;r.complete=i;"effect"!==f&&(r.origin=c||["middle","center"],r.restore=!0);r.from=t.from||("show"===f?{height:0,width:0,outerHeight:0,outerWidth:0}:e);r.to={height:e.height*o.y,width:e.width*o.x,outerHeight:e.outerHeight*o.y,outerWidth:e.outerWidth*o.x};r.fade&&("show"===f&&(r.from.opacity=0,r.to.opacity=1),"hide"===f&&(r.from.opacity=1,r.to.opacity=0));u.effect(r)};n.effects.effect.size=function(t,i){var f,l,u,r=n(this),w=["position","top","bottom","left","right","width","height","overflow","opacity"],a=["width","height","overflow"],v=["fontSize"],e=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],o=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],h=n.effects.setMode(r,t.mode||"effect"),y=t.restore||"effect"!==h,c=t.scale||"both",b=t.origin||["middle","center"],k=r.css("position"),s=y?w:["position","top","bottom","left","right","overflow","opacity"],p={height:0,width:0,outerHeight:0,outerWidth:0};"show"===h&&r.show();f={height:r.height(),width:r.width(),outerHeight:r.outerHeight(),outerWidth:r.outerWidth()};"toggle"===t.mode&&"show"===h?(r.from=t.to||p,r.to=t.from||f):(r.from=t.from||("show"===h?p:f),r.to=t.to||("hide"===h?p:f));u={from:{y:r.from.height/f.height,x:r.from.width/f.width},to:{y:r.to.height/f.height,x:r.to.width/f.width}};("box"===c||"both"===c)&&(u.from.y!==u.to.y&&(s=s.concat(e),r.from=n.effects.setTransition(r,e,u.from.y,r.from),r.to=n.effects.setTransition(r,e,u.to.y,r.to)),u.from.x!==u.to.x&&(s=s.concat(o),r.from=n.effects.setTransition(r,o,u.from.x,r.from),r.to=n.effects.setTransition(r,o,u.to.x,r.to)));("content"===c||"both"===c)&&u.from.y!==u.to.y&&(s=s.concat(v).concat(a),r.from=n.effects.setTransition(r,v,u.from.y,r.from),r.to=n.effects.setTransition(r,v,u.to.y,r.to));n.effects.save(r,s);r.show();n.effects.createWrapper(r);r.css("overflow","hidden").css(r.from);b&&(l=n.effects.getBaseline(b,f),r.from.top=(f.outerHeight-r.outerHeight())*l.y,r.from.left=(f.outerWidth-r.outerWidth())*l.x,r.to.top=(f.outerHeight-r.to.outerHeight)*l.y,r.to.left=(f.outerWidth-r.to.outerWidth)*l.x);r.css(r.from);("content"===c||"both"===c)&&(e=e.concat(["marginTop","marginBottom"]).concat(v),o=o.concat(["marginLeft","marginRight"]),a=w.concat(e).concat(o),r.find("*[width]").each(function(){var i=n(this),r={height:i.height(),width:i.width(),outerHeight:i.outerHeight(),outerWidth:i.outerWidth()};y&&n.effects.save(i,a);i.from={height:r.height*u.from.y,width:r.width*u.from.x,outerHeight:r.outerHeight*u.from.y,outerWidth:r.outerWidth*u.from.x};i.to={height:r.height*u.to.y,width:r.width*u.to.x,outerHeight:r.height*u.to.y,outerWidth:r.width*u.to.x};u.from.y!==u.to.y&&(i.from=n.effects.setTransition(i,e,u.from.y,i.from),i.to=n.effects.setTransition(i,e,u.to.y,i.to));u.from.x!==u.to.x&&(i.from=n.effects.setTransition(i,o,u.from.x,i.from),i.to=n.effects.setTransition(i,o,u.to.x,i.to));i.css(i.from);i.animate(i.to,t.duration,t.easing,function(){y&&n.effects.restore(i,a)})}));r.animate(r.to,{queue:!1,duration:t.duration,easing:t.easing,complete:function(){0===r.to.opacity&&r.css("opacity",r.from.opacity);"hide"===h&&r.hide();n.effects.restore(r,s);y||("static"===k?r.css({position:"relative",top:r.to.top,left:r.to.left}):n.each(["top","left"],function(n,t){r.css(t,function(t,i){var f=parseInt(i,10),u=n?r.to.left:r.to.top;return"auto"===i?u+"px":f+u+"px"})}));n.effects.removeWrapper(r);i()}})}}(jQuery),function(n){n.effects.effect.shake=function(t,i){var o,r=n(this),v=["position","top","bottom","left","right","height","width"],k=n.effects.setMode(r,t.mode||"effect"),f=t.direction||"left",s=t.distance||20,y=t.times||3,p=2*y+1,u=Math.round(t.duration/p),h="up"===f||"down"===f?"top":"left",c="up"===f||"left"===f,l={},a={},w={},e=r.queue(),b=e.length;for(n.effects.save(r,v),r.show(),n.effects.createWrapper(r),l[h]=(c?"-=":"+=")+s,a[h]=(c?"+=":"-=")+2*s,w[h]=(c?"-=":"+=")+2*s,r.animate(l,u,t.easing),o=1;y>o;o++)r.animate(a,u,t.easing).animate(w,u,t.easing);r.animate(a,u,t.easing).animate(l,u/2,t.easing).queue(function(){"hide"===k&&r.hide();n.effects.restore(r,v);n.effects.removeWrapper(r);i()});b>1&&e.splice.apply(e,[1,0].concat(e.splice(b,p+1)));r.dequeue()}}(jQuery),function(n){n.effects.effect.slide=function(t,i){var u,r=n(this),s=["position","top","bottom","left","right","width","height"],h=n.effects.setMode(r,t.mode||"show"),c="show"===h,f=t.direction||"left",e="up"===f||"down"===f?"top":"left",o="up"===f||"left"===f,l={};n.effects.save(r,s);r.show();u=t.distance||r["top"===e?"outerHeight":"outerWidth"](!0);n.effects.createWrapper(r).css({overflow:"hidden"});c&&r.css(e,o?isNaN(u)?"-"+u:-u:u);l[e]=(c?o?"+=":"-=":o?"-=":"+=")+u;r.animate(l,{queue:!1,duration:t.duration,easing:t.easing,complete:function(){"hide"===h&&r.hide();n.effects.restore(r,s);n.effects.removeWrapper(r);i()}})}}(jQuery),function(n){n.effects.effect.transfer=function(t,i){var u=n(this),r=n(t.to),f="fixed"===r.css("position"),e=n("body"),o=f?e.scrollTop():0,s=f?e.scrollLeft():0,h=r.offset(),l={top:h.top-o,left:h.left-s,height:r.innerHeight(),width:r.innerWidth()},c=u.offset(),a=n("<div class='ui-effects-transfer'><\/div>").appendTo(document.body).addClass(t.className).css({top:c.top-o,left:c.left-s,height:u.innerHeight(),width:u.innerWidth(),position:f?"fixed":"absolute"}).animate(l,t.duration,t.easing,function(){a.remove();i()})}}(jQuery);
  /*! jQuery Migrate v1.2.1 | (c) 2005, 2013 jQuery Foundation, Inc. and other contributors | jquery.org/license */
  jQuery.migrateMute===void 0&&(jQuery.migrateMute=!0),function(n,t,i){function r(i){var r=t.console;o[i]||(o[i]=!0,n.migrateWarnings.push(i),r&&r.warn&&!n.migrateMute&&(r.warn("JQMIGRATE: "+i),n.migrateTrace&&r.trace&&r.trace()))}function e(t,u,f,e){if(Object.defineProperty)try{return Object.defineProperty(t,u,{configurable:!0,enumerable:!0,get:function(){return r(e),f},set:function(n){r(e);f=n}}),i}catch(o){}n._definePropertyBroken=!0;t[u]=f}var o={},l,a,v;n.migrateWarnings=[];!n.migrateMute&&t.console&&t.console.log&&t.console.log("JQMIGRATE: Logging is active");n.migrateTrace===i&&(n.migrateTrace=!0);n.migrateReset=function(){o={};n.migrateWarnings.length=0};"BackCompat"===document.compatMode&&r("jQuery is not compatible with Quirks Mode");var s=n("<input/>",{size:1}).attr("size")&&n.attrFn,h=n.attr,g=n.attrHooks.value&&n.attrHooks.value.get||function(){return null},nt=n.attrHooks.value&&n.attrHooks.value.set||function(){return i},tt=/^(?:input|button)$/i,it=/^[238]$/,rt=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,ut=/^(?:checked|selected)$/i;e(n,"attrFn",s||{},"jQuery.attrFn is deprecated");n.attr=function(t,u,f,e){var o=u.toLowerCase(),c=t&&t.nodeType;return e&&(4>h.length&&r("jQuery.fn.attr( props, pass ) is deprecated"),t&&!it.test(c)&&(s?u in s:n.isFunction(n.fn[u])))?n(t)[u](f):("type"===u&&f!==i&&tt.test(t.nodeName)&&t.parentNode&&r("Can't change the 'type' of an input or button in IE 6/7/8"),!n.attrHooks[o]&&rt.test(o)&&(n.attrHooks[o]={get:function(t,r){var u,f=n.prop(t,r);return f===!0||"boolean"!=typeof f&&(u=t.getAttributeNode(r))&&u.nodeValue!==!1?r.toLowerCase():i},set:function(t,i,r){var u;return i===!1?n.removeAttr(t,r):(u=n.propFix[r]||r,u in t&&(t[u]=!0),t.setAttribute(r,r.toLowerCase())),r}},ut.test(o)&&r("jQuery.fn.attr('"+o+"') may use property instead of attribute")),h.call(n,t,u,f))};n.attrHooks.value={get:function(n,t){var i=(n.nodeName||"").toLowerCase();return"button"===i?g.apply(this,arguments):("input"!==i&&"option"!==i&&r("jQuery.fn.attr('value') no longer gets properties"),t in n?n.value:null)},set:function(n,t){var u=(n.nodeName||"").toLowerCase();return"button"===u?nt.apply(this,arguments):("input"!==u&&"option"!==u&&r("jQuery.fn.attr('value', val) no longer sets properties"),n.value=t,i)}};var f,u,c=n.fn.init,ft=n.parseJSON,et=/^([^<]*)(<[\w\W]+>)([^>]*)$/;n.fn.init=function(t,i,u){var f;return t&&"string"==typeof t&&!n.isPlainObject(i)&&(f=et.exec(n.trim(t)))&&f[0]&&("<"!==t.charAt(0)&&r("$(html) HTML strings must start with '<' character"),f[3]&&r("$(html) HTML text after last tag is ignored"),"#"===f[0].charAt(0)&&(r("HTML string cannot start with a '#' character"),n.error("JQMIGRATE: Invalid selector string (XSS)")),i&&i.context&&(i=i.context),n.parseHTML)?c.call(this,n.parseHTML(f[2],i,!0),i,u):c.apply(this,arguments)};n.fn.init.prototype=n.fn;n.parseJSON=function(n){return n||null===n?ft.apply(this,arguments):(r("jQuery.parseJSON requires a valid JSON string"),null)};n.uaMatch=function(n){n=n.toLowerCase();var t=/(chrome)[ \/]([\w.]+)/.exec(n)||/(webkit)[ \/]([\w.]+)/.exec(n)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(n)||/(msie) ([\w.]+)/.exec(n)||0>n.indexOf("compatible")&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(n)||[];return{browser:t[1]||"",version:t[2]||"0"}};n.browser||(f=n.uaMatch(navigator.userAgent),u={},f.browser&&(u[f.browser]=!0,u.version=f.version),u.chrome?u.webkit=!0:u.webkit&&(u.safari=!0),n.browser=u);e(n,"browser",n.browser,"jQuery.browser is deprecated");n.sub=function(){function t(n,i){return new t.fn.init(n,i)}n.extend(!0,t,this);t.superclass=this;t.fn=t.prototype=this();t.fn.constructor=t;t.sub=this.sub;t.fn.init=function(r,u){return u&&u instanceof n&&!(u instanceof t)&&(u=t(u)),n.fn.init.call(this,r,u,i)};t.fn.init.prototype=t.fn;var i=t(document);return r("jQuery.sub() is deprecated"),t};n.ajaxSetup({converters:{"text json":n.parseJSON}});l=n.fn.data;n.fn.data=function(t){var f,u,e=this[0];return!e||"events"!==t||1!==arguments.length||(f=n.data(e,t),u=n._data(e,t),f!==i&&f!==u||u===i)?l.apply(this,arguments):(r("Use of jQuery.fn.data('events') is deprecated"),u)};a=/\/(java|ecma)script/i;v=n.fn.andSelf||n.fn.addBack;n.fn.andSelf=function(){return r("jQuery.fn.andSelf() replaced by jQuery.fn.addBack()"),v.apply(this,arguments)};n.clean||(n.clean=function(t,u,f,e){u=u||document;u=!u.nodeType&&u[0]||u;u=u.ownerDocument||u;r("jQuery.clean() is deprecated");var s,o,c,l,h=[];if(n.merge(h,n.buildFragment(t,u).childNodes),f)for(c=function(n){return!n.type||a.test(n.type)?e?e.push(n.parentNode?n.parentNode.removeChild(n):n):f.appendChild(n):i},s=0;null!=(o=h[s]);s++)n.nodeName(o,"script")&&c(o)||(f.appendChild(o),o.getElementsByTagName!==i&&(l=n.grep(n.merge([],o.getElementsByTagName("script")),c),h.splice.apply(h,[s+1,0].concat(l)),s+=l.length));return h});var ot=n.event.add,st=n.event.remove,ht=n.event.trigger,ct=n.fn.toggle,y=n.fn.live,p=n.fn.die,w="ajaxStart|ajaxStop|ajaxSend|ajaxComplete|ajaxError|ajaxSuccess",b=RegExp("\\b(?:"+w+")\\b"),k=/(?:^|\s)hover(\.\S+|)\b/,d=function(t){return"string"!=typeof t||n.event.special.hover?t:(k.test(t)&&r("'hover' pseudo-event is deprecated, use 'mouseenter mouseleave'"),t&&t.replace(k,"mouseenter$1 mouseleave$1"))};n.event.props&&"attrChange"!==n.event.props[0]&&n.event.props.unshift("attrChange","attrName","relatedNode","srcElement");n.event.dispatch&&e(n.event,"handle",n.event.dispatch,"jQuery.event.handle is undocumented and deprecated");n.event.add=function(n,t,i,u,f){n!==document&&b.test(t)&&r("AJAX events should be attached to document: "+t);ot.call(this,n,d(t||""),i,u,f)};n.event.remove=function(n,t,i,r,u){st.call(this,n,d(t)||"",i,r,u)};n.fn.error=function(){var n=Array.prototype.slice.call(arguments,0);return r("jQuery.fn.error() is deprecated"),n.splice(0,0,"error"),arguments.length?this.bind.apply(this,n):(this.triggerHandler.apply(this,n),this)};n.fn.toggle=function(t,i){if(!n.isFunction(t)||!n.isFunction(i))return ct.apply(this,arguments);r("jQuery.fn.toggle(handler, handler...) is deprecated");var u=arguments,e=t.guid||n.guid++,f=0,o=function(i){var r=(n._data(this,"lastToggle"+t.guid)||0)%f;return n._data(this,"lastToggle"+t.guid,r+1),i.preventDefault(),u[r].apply(this,arguments)||!1};for(o.guid=e;u.length>f;)u[f++].guid=e;return this.click(o)};n.fn.live=function(t,i,u){return r("jQuery.fn.live() is deprecated"),y?y.apply(this,arguments):(n(this.context).on(t,this.selector,i,u),this)};n.fn.die=function(t,i){return r("jQuery.fn.die() is deprecated"),p?p.apply(this,arguments):(n(this.context).off(t,this.selector||"**",i),this)};n.event.trigger=function(n,t,i,u){return i||b.test(n)||r("Global events are undocumented and deprecated"),ht.call(this,n,t,i||document,u)};n.each(w.split("|"),function(t,i){n.event.special[i]={setup:function(){var t=this;return t!==document&&(n.event.add(document,i+"."+n.guid,function(){n.event.trigger(i,null,t,!0)}),n._data(this,i,n.guid++)),!1},teardown:function(){return this!==document&&n.event.remove(document,i+"."+n._data(this,i)),!1}}})}(jQuery,window);AjaxCart={loadWaiting:!1,usepopupnotifications:!1,topcartselector:"",topwishlistselector:"",flyoutcartselector:"",init:function(n,t,i,r){this.loadWaiting=!1;this.usepopupnotifications=n;this.topcartselector=t;this.topwishlistselector=i;this.flyoutcartselector=r},setLoadWaiting:function(n){displayAjaxLoading(n);this.loadWaiting=n},addproducttocart_catalog:function(n){this.loadWaiting==!1&&(this.setLoadWaiting(!0),$.ajax({cache:!1,url:n,type:"post",success:this.success_process,complete:this.resetLoadWaiting,error:this.ajaxFailure}))},addproducttocart_details:function(n,t){this.loadWaiting==!1&&(this.setLoadWaiting(!0),$.ajax({cache:!1,url:n,data:$(t).serialize(),type:"post",success:this.success_process,complete:this.resetLoadWaiting,error:this.ajaxFailure}))},addproducttocomparelist:function(n){this.loadWaiting==!1&&(this.setLoadWaiting(!0),$.ajax({cache:!1,url:n,type:"post",success:this.success_process,complete:this.resetLoadWaiting,error:this.ajaxFailure}))},success_process:function(n){return(n.updatetopcartsectionhtml&&$(AjaxCart.topcartselector).html(n.updatetopcartsectionhtml),n.updatetopwishlistsectionhtml&&$(AjaxCart.topwishlistselector).html(n.updatetopwishlistsectionhtml),n.updateflyoutcartsectionhtml&&$(AjaxCart.flyoutcartselector).replaceWith(n.updateflyoutcartsectionhtml),n.message)?(n.success==!0?AjaxCart.usepopupnotifications==!0?displayPopupNotification(n.message,"success",!0):displayBarNotification(n.message,"success",3500):AjaxCart.usepopupnotifications==!0?displayPopupNotification(n.message,"error",!0):displayBarNotification(n.message,"error",0),!1):n.redirect?(location.href=n.redirect,!0):!1},resetLoadWaiting:function(){AjaxCart.setLoadWaiting(!1)},ajaxFailure:function(){alert("Failed to add the product. Please refresh the page and try one more time.")}};!function(n){n(document).ready(function(){function r(){var r=n("#small-searchterms_listbox").children().slice(0,i),u=0,t;if(r.length===i)for(t=0;t<r.length;t++)u+=n(r[t]).outerHeight();u>0&&n("#small-searchterms-list").css("height",u)}var t=n(".instantSearchResourceElement"),i;0!==t.length&&((n("#instant-search-categories").length>0||n("#instant-search-manufacturers").length>0||n("#instant-search-vendors").length>0)&&(n(".search-box-text").addClass("narrow"),n(".store-search-box").addClass("with-caregory-search-enabled")),i=parseInt(t.attr("data-numberOfVisibleProducts")),n("#small-searchterms").kendoAutoComplete({highlightFirst:"true"===t.attr("data-highlightFirstFoundElement"),minLength:parseInt(t.attr("data-minKeywordLength"))||0,dataTextField:"ProductName",filter:"contains",popup:{appendTo:n("#small-search-box-form")},template:kendo.template(n("#instantSearchItemTemplate").html()),height:"auto",dataSource:new kendo.data.DataSource({serverFiltering:!0,requestStart:function(){n("#small-searchterms").addClass("instant-search-busy")},change:function(){n("#small-searchterms").removeClass("instant-search-busy")},transport:{read:t.attr("data-instantSearchUrl"),parameterMap:function(){return{q:n("#small-searchterms").val(),categoryId:n("#instant-search-categories").val(),manufacturerId:n("#instant-search-manufacturers").val(),vendorId:n("#instant-search-vendors").val()}}}}),change:function(){var i=n(".k-list").find(".k-state-selected"),t=i.find(".instant-search-item").attr("data-url");"undefined"==typeof t||setLocation(t)},dataBound:function(){n("#small-searchterms").data("kendoAutoComplete").list.parent(".k-animation-container").addClass("instantSearch");(n("#instant-search-categories").length>0||n("#instant-search-manufacturers").length>0||n("#instant-search-vendors").length>0)&&n(".k-animation-container").addClass("resize");r()}}),"false"===t.attr("data-highlightFirstFoundElement")&&n("#small-search-box-form").on("keydown",function(t){13===t.keyCode&&n(this).submit()}),n("#small-search-box-form").submit(function(i){var r=n("#instant-search-categories").val()||0,u=n("#instant-search-manufacturers").val()||0,f=n("#instant-search-vendors").val()||0,e=n("#small-searchterms").val();if(e){var o=t.attr("data-searchInProductDescriptions"),s=r>0,h=u>0,c=f>0,l=s||h||c||o;window.location.href=t.attr("data-searchPageUrl")+"?adv="+l+"&cid="+r+"&mid="+u+"&vid="+f+"&q="+encodeURIComponent(e)+"&sid="+t.attr("data-searchInProductDescriptions")+"&isc=true"}i.preventDefault()}))})}(jQuery);!function(n,t){t([],n)}(function(){return function(n,t){function g(){}function ar(n,t){if(t)return"'"+n.split("'").join("\\'").split('\\"').join('\\\\\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t")+"'";var i=n.charAt(0),r=n.substring(1);return"="===i?"+("+r+")+":":"===i?"+e("+r+")+":";"+n+";o+="}function e(n,t,i){return n+="",t=t||2,i=t-n.length,i?hi[t].substring(0,i)+n:n}function wt(n){var u=n.css(i.support.transitions.css+"box-shadow")||n.css("box-shadow"),t=u?u.match(su)||[0,0,0,0,0]:[0,0,0,0,0],r=d.max(+t[3],+(t[4]||0));return{left:-t[1]+r,right:+t[1]+r,bottom:+t[2]+r}}function vr(t,i){var s,u,f,e,h,c,o,l,a=r.browser,v="rtl"==t.css("direction");return t.parent().hasClass("k-animation-container")?(o=t.parent(".k-animation-container"),l=o[0].style,o.is(":hidden")&&o.show(),s=et.test(l.width)||et.test(l.height),s||o.css({width:t.outerWidth(),height:t.outerHeight(),boxSizing:"content-box",mozBoxSizing:"content-box",webkitBoxSizing:"content-box"})):(u=wt(t),f=t[0].style.width,e=t[0].style.height,h=et.test(f),c=et.test(e),a.opera&&(u.left=u.right=u.bottom=5),s=h||c,!h&&(!i||i&&f)&&(f=t.outerWidth()),!c&&(!i||i&&e)&&(e=t.outerHeight()),t.wrap(n("<div/>").addClass("k-animation-container").css({width:f,height:e,marginLeft:u.left*(v?1:-1),paddingLeft:u.left,paddingRight:u.right,paddingBottom:u.bottom})),s&&t.css({width:"100%",height:"100%",boxSizing:"border-box",mozBoxSizing:"border-box",webkitBoxSizing:"border-box"})),a.msie&&d.floor(a.version)<=7&&(t.css({zoom:1}),t.children(".k-menu").width(t.width())),t.parent()}function bt(n){for(var t=1,i=arguments.length,t=1;i>t;t++)kt(n,arguments[t]);return n}function kt(n,t){var u,r,f,e,o=i.data.ObservableArray,s=i.data.DataSource,h=i.data.HierarchicalDataSource;for(u in t)r=t[u],f=typeof r,f===p&&null!==r&&r.constructor!==Array&&r.constructor!==o&&r.constructor!==s&&r.constructor!==h?r instanceof Date?n[u]=new Date(r.getTime()):b(r.clone)?n[u]=r.clone():(e=n[u],n[u]=typeof e===p?e||{}:{},kt(n[u],r)):f!==st&&(n[u]=r);return n}function ht(n,i,r){for(var u in i)if(i.hasOwnProperty(u)&&i[u].test(n))return u;return r!==t?r:n}function yr(n){return n.replace(/([a-z][A-Z])/g,function(n){return n.charAt(0)+"-"+n.charAt(1).toLowerCase()})}function dt(n){return n.replace(/\-(\w)/g,function(n,t){return t.toUpperCase()})}function pr(t,r){var u,f={};return document.defaultView&&document.defaultView.getComputedStyle?(u=document.defaultView.getComputedStyle(t,""),r&&n.each(r,function(n,t){f[t]=u.getPropertyValue(t)})):(u=t.currentStyle,r&&n.each(r,function(n,t){f[t]=u[dt(t)]})),i.size(f)||(f=u),f}function wr(n){var t,i=0;for(t in n)n.hasOwnProperty(t)&&"toJSON"!=t&&i++;return i}function br(n,t,i){t||(t="offset");var u=n[t]();return r.browser.msie&&(r.pointers||r.msPointers)&&!i&&(u.top-=window.pageYOffset-document.documentElement.scrollTop,u.left-=window.pageXOffset-document.documentElement.scrollLeft),u}function kr(n){var t={};return rt("string"==typeof n?n.split(" "):n,function(n){t[n]=this}),t}function dr(n){return new i.effects.Element(n)}function gr(n,t,i,r){return typeof n===f&&(b(t)&&(r=t,t=400,i=!1),b(i)&&(r=i,i=!1),typeof t===hr&&(i=t,t=400),n={effects:n,duration:t,reverse:i,complete:r}),s({effects:{},duration:400,reverse:!1,init:ut,teardown:ut,hide:!1},n,{completeCallback:n.complete,complete:ut})}function gt(t,i,r,u,f){for(var e,o=0,s=t.length;s>o;o++)e=n(t[o]),e.queue(function(){v.promise(e,gr(i,r,u,f))});return t}function nu(n,t,i,r){return t&&(t=t.split(" "),rt(t,function(t,i){n.toggleClass(i,r)})),n}function tu(n){return(""+n).replace(li,"&amp;").replace(ai,"&lt;").replace(pi,"&gt;").replace(vi,"&quot;").replace(yi,"&#39;")}function ct(n,r){var u;return 0===r.indexOf("data")&&(r=r.substring(4),r=r.charAt(0).toLowerCase()+r.substring(1)),r=r.replace(nr,"-$1"),u=n.getAttribute("data-"+i.ns+r),null===u?u=t:"null"===u?u=null:"true"===u?u=!0:"false"===u?u=!1:hu.test(u)?u=parseFloat(u):di.test(u)&&!gi.test(u)&&(u=Function("return ("+u+")")()),u}function ni(r,u){var e,f,o={};for(e in u)f=ct(r,e),f!==t&&(ki.test(e)&&(f=i.template(n("#"+f).html())),o[e]=f);return o}function iu(t,i){return n.contains(t,i)?-1:1}function ru(){var t=n(this);return n.inArray(t.attr("data-role"),["slider","rangeslider"])>0||t.is(":visible")}function uu(n,t){var i=n.nodeName.toLowerCase();return(/input|select|textarea|button|object/.test(i)?!n.disabled:"a"===i?n.href||t:t)&&fu(n)}function fu(t){return!n(t).parents().addBack().filter(function(){return"hidden"===n.css(this,"visibility")||n.expr.filters.hidden(this)}).length}function o(n,t){return new o.fn.init(n,t)}var a,b,ti,ii,nt,ri,ui,fi,ei,oi,si,hi,ci,v,li,ai,vi,yi,pi,lt,wi,bi,k,ki,di,gi,nr,tr,ir,at,rr,u,y,ur,vt,tt,fr,er,c,it,or,sr,i=window.kendo=window.kendo||{cultures:{}},s=n.extend,rt=n.each,eu=n.isArray,yt=n.proxy,ut=n.noop,d=Math,ft=window.JSON||{},r={},et=/%/,ou=/\{(\d+)(:[^\}]+)?\}/g,su=/(\d+(?:\.?)\d*)px\s*(\d+(?:\.?)\d*)px\s*(\d+(?:\.?)\d*)px\s*(\d+)?/i,hu=/^(\+|-?)\d+(\.?)\d*$/,h="function",f="string",l="number",p="object",ot="null",hr="boolean",st="undefined",cr={},lr={},pt=[].slice,w=window.Globalize;i.version="2014.1.318";g.extend=function(n){var t,r,u=function(){},f=this,i=n&&n.init?n.init:function(){f.apply(this,arguments)};u.prototype=f.prototype;r=i.fn=i.prototype=new u;for(t in n)r[t]=null!=n[t]&&n[t].constructor===Object?s(!0,{},u.prototype[t],n[t]):n[t];return r.constructor=i,i.extend=f.extend,i};g.prototype._initOptions=function(n){this.options=bt({},this.options,n)};b=i.isFunction=function(n){return"function"==typeof n};ti=function(){this._defaultPrevented=!0};ii=function(){return this._defaultPrevented===!0};nt=g.extend({init:function(){this._events={}},bind:function(n,i,r){var u,s,c,o,l,e=this,a=typeof n===f?[n]:n,v=typeof i===h;if(i===t){for(u in n)e.bind(u,n[u]);return e}for(u=0,s=a.length;s>u;u++)n=a[u],o=v?i:i[n],o&&(r&&(c=o,o=function(){e.unbind(n,o);c.apply(e,arguments)}),l=e._events[n]=e._events[n]||[],l.push(o));return e},one:function(n,t){return this.bind(n,t,!0)},first:function(n,t){for(var r,o,u=this,s=typeof n===f?[n]:n,c=typeof t===h,i=0,e=s.length;e>i;i++)n=s[i],r=c?t:t[n],r&&(o=u._events[n]=u._events[n]||[],o.unshift(r));return u},trigger:function(n,t){var r,f,u=this,i=u._events[n];if(i){for(t=t||{},t.sender=u,t._defaultPrevented=!1,t.preventDefault=ti,t.isDefaultPrevented=ii,i=i.slice(),r=0,f=i.length;f>r;r++)i[r].call(u,t);return t._defaultPrevented===!0}return!1},unbind:function(n,i){var r,u=this,f=u._events[n];if(n===t)u._events={};else if(f)if(i)for(r=f.length-1;r>=0;r--)f[r]===i&&f.splice(r,1);else u._events[n]=[];return u}});ri=/^\w+/;ui=/\$\{([^}]*)\}/g;fi=/\\\}/g;ei=/__CURLY__/g;oi=/\\#/g;si=/__SHARP__/g;hi=["","0","00","000","0000"];a={paramName:"data",useWithBlock:!0,render:function(n,t){for(var u="",i=0,r=t.length;r>i;i++)u+=n(t[i]);return u},compile:function(t,r){var o,e,f,h=s({},this,r),c=h.paramName,a=c.match(ri)[0],l=h.useWithBlock,u="var o,e=kendo.htmlEncode;";if(b(t))return 2===t.length?function(i){return t(n,{data:i}).join("")}:t;for(u+=l?"with("+c+"){":"",u+="o=",e=t.replace(fi,"__CURLY__").replace(ui,"#=e($1)#").replace(ei,"}").replace(oi,"__SHARP__").split("#"),f=0;e.length>f;f++)u+=ar(e[f],f%2==0);u+=l?";}":";";u+="return o;";u=u.replace(si,"#");try{return o=Function(a,u),o._slotCount=Math.floor(e.length/2),o}catch(v){throw Error(i.format("Invalid template:'{0}' Generated code:'{1}'",t,u));}}},function(){function u(n){return o.lastIndex=0,o.test(n)?'"'+n.replace(o,function(n){var t=s[n];return typeof t===f?t:"\\u"+("0000"+n.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+n+'"'}function i(e,o){var a,w,v,k,y,b,d=n,s=o[e];if(s&&typeof s===p&&typeof s.toJSON===h&&(s=s.toJSON(e)),typeof t===h&&(s=t.call(o,e,s)),b=typeof s,b===f)return u(s);if(b===l)return isFinite(s)?s+"":ot;if(b===hr||b===ot)return s+"";if(b===p){if(!s)return ot;if(n+=r,y=[],"[object Array]"===c.apply(s)){for(k=s.length,a=0;k>a;a++)y[a]=i(a,s)||ot;return v=0===y.length?"[]":n?"[\n"+n+y.join(",\n"+n)+"\n"+d+"]":"["+y.join(",")+"]",n=d,v}if(t&&typeof t===p)for(k=t.length,a=0;k>a;a++)typeof t[a]===f&&(w=t[a],v=i(w,s),v&&y.push(u(w)+(n?": ":":")+v));else for(w in s)Object.hasOwnProperty.call(s,w)&&(v=i(w,s),v&&y.push(u(w)+(n?": ":":")+v));return v=0===y.length?"{}":n?"{\n"+n+y.join(",\n"+n)+"\n"+d+"}":"{"+y.join(",")+"}",n=d,v}}var n,r,t,o=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,s={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},c={}.toString;typeof Date.prototype.toJSON!==h&&(Date.prototype.toJSON=function(){var n=this;return isFinite(n.valueOf())?e(n.getUTCFullYear(),4)+"-"+e(n.getUTCMonth()+1)+"-"+e(n.getUTCDate())+"T"+e(n.getUTCHours())+":"+e(n.getUTCMinutes())+":"+e(n.getUTCSeconds())+"Z":null},String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(){return this.valueOf()});typeof ft.stringify!==h&&(ft.stringify=function(u,e,o){var s;if(n="",r="",typeof o===l)for(s=0;o>s;s+=1)r+=" ";else typeof o===f&&(r=o);if(t=e,e&&typeof e!==h&&(typeof e!==p||typeof e.length!==l))throw Error("JSON.stringify");return i("",{"":u})})}(),function(){function v(n){if(n){if(n.numberFormat)return n;if(typeof n===f){var t=i.cultures;return t[n]||t[n.split("-")[0]]||null}return null}return null}function y(n){return n&&(n=v(n)),n||i.cultures.current}function k(n){n.groupSizes=n.groupSize;n.percent.groupSizes=n.percent.groupSize;n.currency.groupSizes=n.currency.groupSize}function g(n,i,r){r=y(r);var u=r.calendars.standard,f=u.days,o=u.months;return i=u.patterns[i]||i,i.replace(tt,function(i){var r;return"d"===i?r=n.getDate():"dd"===i?r=e(n.getDate()):"ddd"===i?r=f.namesAbbr[n.getDay()]:"dddd"===i?r=f.names[n.getDay()]:"M"===i?r=n.getMonth()+1:"MM"===i?r=e(n.getMonth()+1):"MMM"===i?r=o.namesAbbr[n.getMonth()]:"MMMM"===i?r=o.names[n.getMonth()]:"yy"===i?r=e(n.getFullYear()%100):"yyyy"===i?r=e(n.getFullYear(),4):"h"===i?r=n.getHours()%12||12:"hh"===i?r=e(n.getHours()%12||12):"H"===i?r=n.getHours():"HH"===i?r=e(n.getHours()):"m"===i?r=n.getMinutes():"mm"===i?r=e(n.getMinutes()):"s"===i?r=n.getSeconds():"ss"===i?r=e(n.getSeconds()):"f"===i?r=d.floor(n.getMilliseconds()/100):"ff"===i?r=d.floor(n.getMilliseconds()/10):"fff"===i?r=n.getMilliseconds():"tt"===i&&(r=n.getHours()<12?u.AM[0]:u.PM[0]),r!==t?r:i.slice(1,i.length-1)})}function nt(n,i,f){f=y(f);var vt,ft,ot,yt,bt,k,w,nt,ei,e,tt,d,kt,ri,g,v,l,pt,dt,ui,gt,fi,ct,c=f.numberFormat,st=c.groupSize[0],lt=c[a],wt=c[u],at=c.decimals,ni=c.pattern[0],ti=[],et=0>n,ii=r,p=r,ht=-1;if(n===t)return r;if(!isFinite(n))return n;if(!i)return f.name.length?n.toLocaleString():""+n;if(bt=it.exec(i)){if(i=bt[1].toLowerCase(),ft="c"===i,ot="p"===i,(ft||ot)&&(c=ft?c.currency:c.percent,st=c.groupSize[0],lt=c[a],wt=c[u],at=c.decimals,vt=c.symbol,ni=c.pattern[et?0:1]),yt=bt[2],yt&&(at=+yt),"e"===i)return yt?n.toExponential(at):n.toExponential();if(ot&&(n*=100),n=o(n,at),et=0>n,n=n.split(u),k=n[0],w=n[1],et&&(k=k.substring(1)),p=k,nt=k.length,nt>=st)for(p=r,e=0;nt>e;e++)e>0&&(nt-e)%st==0&&(p+=lt),p+=k.charAt(e);if(w&&(p+=wt+w),"n"===i&&!et)return p;for(n=r,e=0,tt=ni.length;tt>e;e++)d=ni.charAt(e),n+="n"===d?p:"$"===d||"%"===d?vt:d;return n}if(et&&(n=-n),(i.indexOf("'")>-1||i.indexOf('"')>-1||i.indexOf("\\")>-1)&&(i=i.replace(rt,function(n){var t=n.charAt(0).replace("\\",""),i=n.slice(1).replace(t,"");return ti.push(i),b})),i=i.split(";"),et&&i[1])i=i[1],ri=!0;else if(0===n){if(i=i[2]||i[0],-1==i.indexOf(s)&&-1==i.indexOf(h))return i}else i=i[0];if(ui=i.indexOf("%"),gt=i.indexOf("$"),ot=-1!=ui,ft=-1!=gt,ot&&(n*=100),ft&&"\\"===i[gt-1]&&(i=i.split("\\").join(""),ft=!1),(ft||ot)&&(c=ft?c.currency:c.percent,st=c.groupSize[0],lt=c[a],wt=c[u],at=c.decimals,vt=c.symbol),kt=i.indexOf(a)>-1,kt&&(i=i.replace(ut,r)),g=i.indexOf(u),tt=i.length,-1!=g?(w=(""+n).split("e"),w=w[1]?o(n,Math.abs(w[1])):w[0],w=w.split(u)[1]||r,l=i.lastIndexOf(h)-g,v=i.lastIndexOf(s)-g,pt=l>-1,dt=v>-1,e=w.length,pt||dt||(i=i.substring(0,g)+i.substring(g+1),tt=i.length,g=-1,e=0),pt&&l>v?e=l:v>l&&(dt&&e>v?e=v:pt&&l>e&&(e=l)),e>-1&&(n=o(n,e))):n=o(n),v=i.indexOf(s),fi=l=i.indexOf(h),ht=-1==v&&-1!=l?l:-1!=v&&-1==l?v:v>l?l:v,v=i.lastIndexOf(s),l=i.lastIndexOf(h),ct=-1==v&&-1!=l?l:-1!=v&&-1==l?v:v>l?v:l,ht==tt&&(ct=ht),-1!=ht){if(p=(""+n).split(u),k=p[0],w=p[1]||r,nt=k.length,ei=w.length,et&&-1*n>=0&&(et=!1),kt)if(nt===st&&g-fi>nt)k=lt+k;else if(nt>st){for(p=r,e=0;nt>e;e++)e>0&&(nt-e)%st==0&&(p+=lt),p+=k.charAt(e);k=p}for(n=i.substring(0,ht),et&&!ri&&(n+="-"),e=ht;tt>e;e++){if(d=i.charAt(e),-1==g){if(nt>ct-e){n+=k;break}}else if(-1!=l&&e>l&&(ii=r),nt>=g-e&&g-e>-1&&(n+=k,e=g),g===e){n+=(w?wt:r)+w;e+=ct-g+1;continue}d===h?(n+=d,ii=d):d===s&&(n+=ii)}if(ct>=ht&&(n+=i.substring(ct+1)),ft||ot){for(p=r,e=0,tt=n.length;tt>e;e++)d=n.charAt(e),p+="$"===d||"%"===d?vt:d;n=p}if(tt=ti.length)for(e=0;tt>e;e++)n=n.replace(b,ti[e])}return n}var o,c,tt=/dddd|ddd|dd|d|MMMM|MMM|MM|M|yyyy|yy|HH|H|hh|h|mm|m|fff|ff|f|tt|ss|s|"[^"]*"|'[^']*'/g,it=/^(n|c|p|e)(\d*)$/i,rt=/(\\.)|(['][^']*[']?)|(["][^"]*["]?)/g,ut=/\,/g,r="",u=".",a=",",s="#",h="0",b="??",p="en-US",ft={}.toString;i.cultures["en-US"]={name:p,numberFormat:{pattern:["-n"],decimals:2,",":",",".":".",groupSize:[3],percent:{pattern:["-n %","n %"],decimals:2,",":",",".":".",groupSize:[3],symbol:"%"},currency:{pattern:["($n)","$n"],decimals:2,",":",",".":".",groupSize:[3],symbol:"$"}},calendars:{standard:{days:{names:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],namesAbbr:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],namesShort:["Su","Mo","Tu","We","Th","Fr","Sa"]},months:{names:["January","February","March","April","May","June","July","August","September","October","November","December"],namesAbbr:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]},AM:["AM","am","AM"],PM:["PM","pm","PM"],patterns:{d:"M/d/yyyy",D:"dddd, MMMM dd, yyyy",F:"dddd, MMMM dd, yyyy h:mm:ss tt",g:"M/d/yyyy h:mm tt",G:"M/d/yyyy h:mm:ss tt",m:"MMMM dd",M:"MMMM dd",s:"yyyy'-'MM'-'ddTHH':'mm':'ss",t:"h:mm tt",T:"h:mm:ss tt",u:"yyyy'-'MM'-'dd HH':'mm':'ss'Z'",y:"MMMM, yyyy",Y:"MMMM, yyyy"},"/":"/",":":":",firstDay:0,twoDigitYearMax:2029}}};i.culture=function(n){var r,u=i.cultures;return n===t?u.current:(r=v(n)||u[p],r.calendar=r.calendars.standard,u.current=r,w&&k(r.numberFormat),t)};i.findCulture=v;i.getCulture=y;i.culture(p);o=function(n,t){return t=t||0,n=(""+n).split("e"),n=Math.round(+(n[0]+"e"+(n[1]?+n[1]+t:t))),n=(""+n).split("e"),n=+(n[0]+"e"+(n[1]?+n[1]-t:-t)),n.toFixed(t)};c=function(n,i,r){if(i){if("[object Date]"===ft.call(n))return g(n,i,r);if(typeof n===l)return nt(n,i,r)}return n!==t?n:""};w&&(c=function(t,i,r){return n.isPlainObject(r)&&(r=r.name),w.format(t,i,r)});i.format=function(n){var t=arguments;return n.replace(ou,function(n,i,r){var u=t[parseInt(i,10)+1];return c(u,r?r.substring(1):"")})};i._extractFormat=function(n){return"{0:"===n.slice(0,3)&&(n=n.slice(3,n.length-1)),n};i._activeElement=function(){try{return document.activeElement}catch(n){return document.documentElement.activeElement}};i._round=o;i.toString=c}(),function(){function r(n,t,i){return!(n>=t&&i>=n)}function c(n){return n.charAt(0)}function u(t){return n.map(t,c)}function a(n,t){t||23!==n.getHours()||n.setHours(n.getHours()+2)}function v(n){for(var t=0,r=n.length,i=[];r>t;t++)i[t]=(n[t]+"").toLowerCase();return i}function f(n){var t,i={};for(t in n)i[t]=v(n[t]);return i}function y(n,i,e){if(!n)return null;var c,o,dt,yt,pt,wt,gt,d,ht,ct,lt,ft,ni,et,y=function(n){for(var t=0;i[rt]===n;)t++,rt++;return t>0&&(rt-=1),t},nt=function(t){var r=s[t]||RegExp("^\\d{1,"+t+"}"),i=n.substr(w,t).match(r);return i?(i=i[0],w+=i.length,parseInt(i,10)):null},at=function(t,i){for(var f,e,r,u=0,o=t.length;o>u;u++)if(f=t[u],e=f.length,r=n.substr(w,e),i&&(r=r.toLowerCase()),r==f)return w+=e,u+1;return null},ot=function(){var t=!1;return n.charAt(w)===i[rt]&&(w++,t=!0),t},v=e.calendars.standard,l=null,tt=null,p=null,h=null,it=null,ut=null,g=null,rt=0,w=0,bt=!1,kt=new Date,vt=v.twoDigitYearMax||2029,st=kt.getFullYear();for(i||(i="d"),yt=v.patterns[i],yt&&(i=yt),i=i.split(""),dt=i.length;dt>rt;rt++)if(c=i[rt],bt)"'"===c?bt=!1:ot();else if("d"===c){if(o=y("d"),v._lowerDays||(v._lowerDays=f(v.days)),p=3>o?nt(2):at(v._lowerDays[3==o?"namesAbbr":"names"],!0),null===p||r(p,1,31))return null}else if("M"===c){if(o=y("M"),v._lowerMonths||(v._lowerMonths=f(v.months)),tt=3>o?nt(2):at(v._lowerMonths[3==o?"namesAbbr":"names"],!0),null===tt||r(tt,1,12))return null;tt-=1}else if("y"===c){if(o=y("y"),l=nt(o),null===l)return null;2==o&&("string"==typeof vt&&(vt=st+parseInt(vt,10)),l=st-st%100+l,l>vt&&(l-=100))}else if("h"===c){if(y("h"),h=nt(2),12==h&&(h=0),null===h||r(h,0,11))return null}else if("H"===c){if(y("H"),h=nt(2),null===h||r(h,0,23))return null}else if("m"===c){if(y("m"),it=nt(2),null===it||r(it,0,59))return null}else if("s"===c){if(y("s"),ut=nt(2),null===ut||r(ut,0,59))return null}else if("f"===c){if(o=y("f"),et=n.substr(w,o).match(s[3]),g=nt(o),null!==g&&(et=et[0].length,3>et&&(g*=Math.pow(10,3-et)),o>3&&(g=parseInt((""+g).substring(0,3),10))),null===g||r(g,0,999))return null}else if("t"===c){if(o=y("t"),ht=v.AM,ct=v.PM,1===o&&(ht=u(ht),ct=u(ct)),pt=at(ct),!pt&&!at(ht))return null}else if("z"===c){if(wt=!0,o=y("z"),"Z"===n.substr(w,1)){if(!gt)return null;ot();continue}if((d=n.substr(w,6).match(o>2?k:b),!d)||(d=d[0],w=d.length,d=d.split(":"),lt=parseInt(d[0],10),r(lt,-12,13))||o>2&&(ft=parseInt(d[1],10),isNaN(ft)||r(ft,0,59)))return null}else if("T"===c)gt=ot();else if("'"===c)bt=!0,ot();else if(!ot())return null;return ni=null!==h||null!==it||ut||null,null===l&&null===tt&&null===p&&ni?(l=st,tt=kt.getMonth(),p=kt.getDate()):(null===l&&(l=st),null===p&&(p=1)),pt&&12>h&&(h+=12),wt?(lt&&(h+=-lt),ft&&(it+=-ft),n=new Date(Date.UTC(l,tt,p,h,it,ut,g))):(n=new Date(l,tt,p,h,it,ut,g),a(n,h)),100>l&&n.setFullYear(l),n.getDate()!==p&&wt===t?null:n}var e=/\u00A0/g,p=/[eE][\-+]?[0-9]+/,b=/[+|\-]\d{1,2}/,k=/[+|\-]\d{1,2}:\d{2}/,d=/^\/Date\((.*?)\)\/$/,g=/[+-]/,o=["G","g","d","F","D","y","m","T","t"],s={2:/^\d{1,2}/,3:/^\d{1,3}/,4:/^\d{4}/},h={}.toString;i.parseDate=function(n,t,r){var f,u,s,c,e;if("[object Date]"===h.call(n))return n;if(f=0,u=null,n&&0===n.indexOf("/D")&&(u=d.exec(n)))return e=u=u[1],u=parseInt(u,10),e=e.substring(1).split(g)[1],e&&(u-=parseInt(e,10)*i.date.MS_PER_MINUTE),new Date(u);if(r=i.getCulture(r),!t){for(t=[],c=r.calendar.patterns,s=o.length;s>f;f++)t[f]=c[o[f]];f=0;t=["yyyy/MM/dd HH:mm:ss","yyyy/MM/dd HH:mm","yyyy/MM/dd","ddd MMM dd yyyy HH:mm:ss","yyyy-MM-ddTHH:mm:ss.fffffffzzz","yyyy-MM-ddTHH:mm:ss.fffzzz","yyyy-MM-ddTHH:mm:sszzz","yyyy-MM-ddTHH:mmzzz","yyyy-MM-ddTHH:mmzz","yyyy-MM-ddTHH:mm:ss","yyyy-MM-ddTHH:mm","yyyy-MM-dd HH:mm:ss","yyyy-MM-dd HH:mm","yyyy-MM-dd","HH:mm:ss","HH:mm"].concat(t)}for(t=eu(t)?t:[t],s=t.length;s>f;f++)if(u=y(n,t[f],r))return u;return u};i.parseInt=function(n,t){var r=i.parseFloat(n,t);return r&&(r=0|r),r};i.parseFloat=function(n,t,r){if(!n&&0!==n)return null;if(typeof n===l)return n;n=""+n;t=i.getCulture(t);var f,h,u=t.numberFormat,c=u.percent,a=u.currency,s=a.symbol,v=c.symbol,o=n.indexOf("-");return p.test(n)?(n=parseFloat(n.replace(u["."],".")),isNaN(n)&&(n=null),n):o>0?null:(o=o>-1,n.indexOf(s)>-1||r&&r.toLowerCase().indexOf("c")>-1?(u=a,f=u.pattern[0].replace("$",s).split("n"),n.indexOf(f[0])>-1&&n.indexOf(f[1])>-1&&(n=n.replace(f[0],"").replace(f[1],""),o=!0)):n.indexOf(v)>-1&&(h=!0,u=c,s=v),n=n.replace("-","").replace(s,"").replace(e," ").split(u[","].replace(e," ")).join("").replace(u["."],"."),n=parseFloat(n),isNaN(n)?n=null:o&&(n*=-1),n&&h&&(n/=100),n)};w&&(i.parseDate=function(n,t,i){return"[object Date]"===h.call(n)?n:w.parseDate(n,t,i)},i.parseFloat=function(i,r){return typeof i===l?i:i===t||null===i?null:(n.isPlainObject(r)&&(r=r.name),i=w.parseFloat(i,r),isNaN(i)?null:i)})}(),function(){var s,e,h,o,u,i,c;r.scrollbar=function(){var t,n=document.createElement("div");return n.style.cssText="overflow:scroll;overflow-x:hidden;zoom:1;clear:both",n.innerHTML="&nbsp;",document.body.appendChild(n),t=n.offsetWidth-n.scrollWidth,document.body.removeChild(n),t};r.isRtl=function(t){return n(t).closest(".k-rtl").length>0};s=document.createElement("table");try{s.innerHTML="<tr><td><\/td><\/tr>";r.tbodyInnerHtml=!0}catch(l){r.tbodyInnerHtml=!1}r.touch="ontouchstart"in window;r.msPointers=window.MSPointerEvent;r.pointers=window.PointerEvent;e=r.transitions=!1;h=r.transforms=!1;o="HTMLElement"in window?HTMLElement.prototype:[];r.hasHW3D="WebKitCSSMatrix"in window&&"m11"in new window.WebKitCSSMatrix||"MozPerspective"in document.documentElement.style||"msPerspective"in document.documentElement.style;rt(["Moz","webkit","O","ms"],function(){var n,i=""+this,r=typeof s.style[i+"Transition"]===f;return r||typeof s.style[i+"Transform"]===f?(n=i.toLowerCase(),h={css:"ms"!=n?"-"+n+"-":"",prefix:i,event:"o"===n||"webkit"===n?n:""},r&&(e=h,e.event=e.event?e.event+"TransitionEnd":"transitionend"),!1):t});s=null;r.transforms=h;r.transitions=e;r.devicePixelRatio=window.devicePixelRatio===t?1:window.devicePixelRatio;try{r.screenWidth=window.outerWidth||window.screen?window.screen.availWidth:window.innerWidth;r.screenHeight=window.outerHeight||window.screen?window.screen.availHeight:window.innerHeight}catch(l){r.screenWidth=window.screen.availWidth;r.screenHeight=window.screen.availHeight}r.detectOS=function(n){var u,i,t=!1,f=[],o=!/mobile safari/i.test(n),e={fire:/(Silk)\/(\d+)\.(\d+(\.\d+)?)/,android:/(Android|Android.*(?:Opera|Firefox).*?\/)\s*(\d+)\.(\d+(\.\d+)?)/,iphone:/(iPhone|iPod).*OS\s+(\d+)[\._]([\d\._]+)/,ipad:/(iPad).*OS\s+(\d+)[\._]([\d_]+)/,meego:/(MeeGo).+NokiaBrowser\/(\d+)\.([\d\._]+)/,webos:/(webOS)\/(\d+)\.(\d+(\.\d+)?)/,blackberry:/(BlackBerry|BB10).*?Version\/(\d+)\.(\d+(\.\d+)?)/,playbook:/(PlayBook).*?Tablet\s*OS\s*(\d+)\.(\d+(\.\d+)?)/,wp:/(Windows Phone(?: OS)?)\s(\d+)\.(\d+(\.\d+)?)/,windows:/(MSIE)\s+(\d+)\.(\d+(\.\d+)?)/,tizen:/(tizen).*?Version\/(\d+)\.(\d+(\.\d+)?)/i,sailfish:/(sailfish).*rv:(\d+)\.(\d+(\.\d+)?).*firefox/i,ffos:/(Mobile).*rv:(\d+)\.(\d+(\.\d+)?).*Firefox/},s={ios:/^i(phone|pad|pod)$/i,android:/^android|fire$/i,blackberry:/^blackberry|playbook/i,windows:/windows/,wp:/wp/,flat:/sailfish|ffos|tizen/i,meego:/meego/},h={tablet:/playbook|ipad|fire/i},c={omini:/Opera\sMini/i,omobile:/Opera\sMobi/i,firefox:/Firefox|Fennec/i,mobilesafari:/version\/.*safari/i,chrome:/chrome|crios/i,webkit:/webkit/i,ie:/MSIE|Windows\sPhone/i};for(i in e)if(e.hasOwnProperty(i)&&(f=n.match(e[i]))){if("windows"==i&&"plugins"in navigator)return!1;t={};t.device=i;t.tablet=ht(i,h,!1);t.browser=ht(n,c,"default");t.name=ht(i,s);t[t.name]=!0;t.majorVersion=f[2];t.minorVersion=f[3].replace("_",".");u=t.minorVersion.replace(".","").substr(0,2);t.flatVersion=t.majorVersion+u+Array(3-(3>u.length?u.length:2)).join("0");t.cordova=typeof PhoneGap!==st||typeof cordova!==st;t.appMode=window.navigator.standalone||/file|local|wmapp/.test(window.location.protocol)||t.cordova;t.android&&(1.5>r.devicePixelRatio&&400>t.flatVersion||o)&&(r.screenWidth>800||r.screenHeight>800)&&(t.tablet=i);break}return t};u=r.mobileOS=r.detectOS(navigator.userAgent);r.wpDevicePixelRatio=u.wp?screen.width/320:0;r.kineticScrollNeeded=u&&(r.touch||r.msPointers||r.pointers);r.hasNativeScrolling=!1;(u.ios||u.android&&u.majorVersion>2||u.wp)&&(r.hasNativeScrolling=u);r.mouseAndTouchPresent=r.touch&&!(r.mobileOS.ios||r.mobileOS.android);r.detectBrowser=function(n){var i,t=!1,r=[],u={webkit:/(chrome)[ \/]([\w.]+)/i,safari:/(webkit)[ \/]([\w.]+)/i,opera:/(opera)(?:.*version|)[ \/]([\w.]+)/i,msie:/(msie\s|trident.*? rv:)([\w.]+)/i,mozilla:/(mozilla)(?:.*? rv:([\w.]+)|)/i};for(i in u)if(u.hasOwnProperty(i)&&(r=n.match(u[i]))){t={};t[i]=!0;t[r[1].toLowerCase()]=!0;t.version=parseInt(document.documentMode||r[2],10);break}return t};r.browser=r.detectBrowser(navigator.userAgent);r.zoomLevel=function(){try{return r.touch?document.documentElement.clientWidth/window.innerWidth:r.browser.msie&&r.browser.version>=10?(top||window).document.documentElement.offsetWidth/(top||window).innerWidth:1}catch(n){return 1}};r.cssBorderSpacing=t!==document.documentElement.style.borderSpacing&&!(r.browser.msie&&8>r.browser.version),function(t){var i,r=parseInt(t.version,10);t.msie?i="ie":t.mozilla?i="ff":t.safari?i="safari":t.webkit?i="webkit":t.opera&&(i="opera");i&&n(document.documentElement).addClass("k-"+i+" k-"+i+r)}(r.browser);r.eventCapture=document.documentElement.addEventListener;i=document.createElement("input");r.placeholder="placeholder"in i;r.propertyChangeEvent="onpropertychange"in i;r.input=function(){for(var n,r=["number","date","time","month","week","datetime","datetime-local"],e=r.length,u="test",f={},t=0;e>t;t++)n=r[t],i.setAttribute("type",n),i.value=u,f[n.replace("-","")]="text"!==i.type&&i.value!==u;return f}();i.style.cssText="float:left;";r.cssFloat=!!i.style.cssFloat;i=null;r.stableSort=function(){for(var t=[{index:0,field:"b"}],n=1;513>n;n++)t.push({index:n,field:"a"});return t.sort(function(n,t){return n.field>t.field?1:t.field>n.field?-1:0}),1===t[0].index}();r.matchesSelector=o.webkitMatchesSelector||o.mozMatchesSelector||o.msMatchesSelector||o.oMatchesSelector||o.matchesSelector||function(t){for(var i=document.querySelectorAll?(this.parentNode||document).querySelectorAll(t)||[]:n(t),r=i.length;r--;)if(i[r]==this)return!0;return!1};r.pushState=window.history&&window.history.pushState;c=document.documentMode;r.hashChange="onhashchange"in window&&!(r.browser.msie&&(!c||8>=c))}();ci={left:{reverse:"right"},right:{reverse:"left"},down:{reverse:"up"},up:{reverse:"down"},top:{reverse:"bottom"},bottom:{reverse:"top"},"in":{reverse:"out"},out:{reverse:"in"}};v={};n.extend(v,{enabled:!0,Element:function(t){this.element=n(t)},promise:function(n,t){n.is(":visible")||n.css({display:n.data("olddisplay")||"block"}).css("display");t.hide&&n.data("olddisplay",n.css("display")).hide();t.init&&t.init();t.completeCallback&&t.completeCallback(n);n.dequeue()},disable:function(){this.enabled=!1;this.promise=this.promiseShim},enable:function(){this.enabled=!0;this.promise=this.animatedPromise}});v.promiseShim=v.promise;"kendoAnimate"in n.fn||s(n.fn,{kendoStop:function(n,t){return this.stop(n,t)},kendoAnimate:function(n,t,i,r){return gt(this,n,t,i,r)},kendoAddClass:function(n,t){return i.toggleClass(this,n,t,!0)},kendoRemoveClass:function(n,t){return i.toggleClass(this,n,t,!1)},kendoToggleClass:function(n,t,r){return i.toggleClass(this,n,t,r)}});li=/&/g;ai=/</g;vi=/"/g;yi=/'/g;pi=/>/g;lt=function(n){return n.target};r.touch&&(lt=function(n){var t="originalEvent"in n?n.originalEvent.changedTouches:"changedTouches"in n?n.changedTouches:null;return t?document.elementFromPoint(t[0].clientX,t[0].clientY):n.target},rt(["swipe","swipeLeft","swipeRight","swipeUp","swipeDown","doubleTap","tap"],function(t,i){n.fn[i]=function(n){return this.bind(i,n)}}));r.touch?r.mobileOS?(r.mousedown="touchstart",r.mouseup="touchend",r.mousemove="touchmove",r.mousecancel="touchcancel",r.click="touchend",r.resize="orientationchange"):(r.mousedown="mousedown touchstart",r.mouseup="mouseup touchend",r.mousemove="mousemove touchmove",r.mousecancel="mouseleave touchcancel",r.click="click",r.resize="resize"):r.pointers?(r.mousemove="pointermove",r.mousedown="pointerdown",r.mouseup="pointerup",r.mousecancel="pointercancel",r.click="pointerup",r.resize="orientationchange resize"):r.msPointers?(r.mousemove="MSPointerMove",r.mousedown="MSPointerDown",r.mouseup="MSPointerUp",r.mousecancel="MSPointerCancel",r.click="MSPointerUp",r.resize="orientationchange resize"):(r.mousemove="mousemove",r.mousedown="mousedown",r.mouseup="mouseup",r.mousecancel="mouseleave",r.click="click",r.resize="resize");wi=function(n,t){for(var r,i,o=t||"d",e=1,u=0,f=n.length;f>u;u++)i=n[u],""!==i&&(r=i.indexOf("["),0!==r&&(-1==r?i="."+i:(e++,i="."+i.substring(0,r)+" || {})"+i.substring(r))),e++,o+=i+(f-1>u?" || {})":")"));return Array(e).join("(")+o};bi=/^([a-z]+:)?\/\//i;s(i,{ui:i.ui||{},fx:i.fx||dr,effects:i.effects||v,mobile:i.mobile||{},data:i.data||{},dataviz:i.dataviz||{ui:{roles:{}}},keys:{INSERT:45,DELETE:46,BACKSPACE:8,TAB:9,ENTER:13,ESC:27,LEFT:37,UP:38,RIGHT:39,DOWN:40,END:35,HOME:36,SPACEBAR:32,PAGEUP:33,PAGEDOWN:34,F2:113,F10:121,F12:123,NUMPAD_PLUS:107,NUMPAD_MINUS:109,NUMPAD_DOT:110},support:i.support||r,animate:i.animate||gt,ns:"",attr:function(n){return"data-"+i.ns+n},getShadows:wt,wrap:vr,deepExtend:bt,getComputedStyles:pr,size:wr,toCamelCase:dt,toHyphens:yr,getOffset:i.getOffset||br,parseEffects:i.parseEffects||kr,toggleClass:i.toggleClass||nu,directions:i.directions||ci,Observable:nt,Class:g,Template:a,template:yt(a.compile,a),render:yt(a.render,a),stringify:yt(ft.stringify,ft),eventTarget:lt,htmlEncode:tu,isLocalUrl:function(n){return n&&!bi.test(n)},expr:function(n,t,i){return n=n||"",typeof t==f&&(i=t,t=!1),i=i||"d",n&&"["!==n.charAt(0)&&(n="."+n),n=t?wi(n.split("."),i):i+n},getter:function(n,t){return cr[n]=cr[n]||Function("d","return "+i.expr(n,t))},setter:function(n){return lr[n]=lr[n]||Function("d,value",i.expr(n)+"=value")},accessor:function(n){return{get:i.getter(n),set:i.setter(n)}},guid:function(){for(var t,i="",n=0;32>n;n++)t=16*d.random()|0,(8==n||12==n||16==n||20==n)&&(i+="-"),i+=(12==n?4:16==n?3&t|8:t).toString(16);return i},roleSelector:function(n){return n.replace(/(\S+)/g,"["+i.attr("role")+"=$1],").slice(0,-1)},triggeredByInput:function(n){return/^(label|input|textarea|select)$/i.test(n.target.tagName)},logToConsole:function(n){var i=window.console;t!==i&&i.log&&i.log(n)}});k=nt.extend({init:function(n,t){var r=this;r.element=i.jQuery(n).handler(r);nt.fn.init.call(r);t=r.options=s(!0,{},r.options,t);r.element.attr(i.attr("role"))||r.element.attr(i.attr("role"),(t.name||"").toLowerCase());r.element.data("kendo"+t.prefix+t.name,r);r.bind(r.events,t)},events:[],options:{prefix:""},_hasBindingTarget:function(){return!!this.element[0].kendoBindingTarget},_tabindex:function(n){n=n||this.wrapper;var i=this.element,t="tabindex",r=n.attr(t)||i.attr(t);i.removeAttr(t);n.attr(t,isNaN(r)?0:r)},setOptions:function(t){this._setEvents(t);n.extend(this.options,t)},_setEvents:function(n){for(var i,t=this,r=0,u=t.events.length;u>r;r++)i=t.events[r],t.options[i]&&n[i]&&t.unbind(i,t.options[i]);t.bind(t.events,n)},resize:function(n){var t=this.getSize(),i=this._size;(n||!i||t.width!==i.width||t.height!==i.height)&&(this._resize(t),this.trigger("resize",t),this._size=t)},getSize:function(){return i.dimensions(this.element)},size:function(n){return n?(this.setSize(n),t):this.getSize()},setSize:n.noop,_resize:n.noop,destroy:function(){var n=this;n.element.removeData("kendo"+n.options.prefix+n.options.name);n.element.removeData("handler");n.unbind()}});i.dimensions=function(n,t){var i=n[0];return t&&n.css(t),{width:i.offsetWidth,height:i.offsetHeight}};i.notify=ut;ki=/template$/i;di=/^\s*(?:\{(?:.|\r\n|\n)*\}|\[(?:.|\r\n|\n)*\])\s*$/;gi=/^\{(\d+)(:[^\}]+)?\}|^\[[A-Za-z_]*\]$/;nr=/([A-Z])/g;i.initWidget=function(r,u,e){var s,a,o,l,y,h,v,c;if(e?e.roles&&(e=e.roles):e=i.ui.roles,r=r.nodeType?r:r[0],h=r.getAttribute("data-"+i.ns+"role"),h&&(o=-1===h.indexOf(".")?e[h]:i.getter(h)(window))){for(c=ct(r,"dataSource"),u=n.extend({},ni(r,o.fn.options),u),c&&(u.dataSource=typeof c===f?i.getter(c)(window):c),l=0,y=o.fn.events.length;y>l;l++)a=o.fn.events[l],v=ct(r,a),v!==t&&(u[a]=i.getter(v)(window));return s=n(r).data("kendo"+o.fn.options.prefix+o.fn.options.name),s?s.setOptions(u):s=new o(r,u),s}};i.rolesFromNamespaces=function(n){var t,r,u=[];for(n[0]||(n=[i.ui,i.dataviz.ui]),t=0,r=n.length;r>t;t++)u[t]=n[t].roles;return s.apply(null,[{}].concat(u.reverse()))};i.init=function(t){var r=i.rolesFromNamespaces(pt.call(arguments,1));n(t).find("[data-"+i.ns+"role]").addBack().each(function(){i.initWidget(this,{},r)})};i.destroy=function(t){n(t).find("[data-"+i.ns+"role]").addBack().each(function(){var t=i.widgetInstance(n(this));t&&t.destroy()})};i.resize=function(t){var r,u=n(t).find("[data-"+i.ns+"role]").addBack().filter(ru);u.length&&(r=n.makeArray(u),r.sort(iu),n.each(r,function(){var t=i.widgetInstance(n(this));t&&t.resize()}))};i.parseOptions=ni;s(i.ui,{Widget:k,roles:{},progress:function(t,r){var f,o,s,e,u=t.find(".k-loading-mask"),h=i.support,c=h.browser;r?u.length||(f=h.isRtl(t),o=f?"right":"left",e=t.scrollLeft(),s=c.webkit?f?t[0].scrollWidth-t.width()-2*e:0:0,u=n("<div class='k-loading-mask'><span class='k-loading-text'>Loading...<\/span><div class='k-loading-image'/><div class='k-loading-color'/><\/div>").width("100%").height("100%").css("top",t.scrollTop()).css(o,Math.abs(e)+s).prependTo(t)):u&&u.remove()},plugin:function(r,u,e){var s,o=r.fn.options.name;u=u||i.ui;e=e||"";u[o]=r;u.roles[o.toLowerCase()]=r;s="getKendo"+e+o;o="kendo"+e+o;n.fn[o]=function(u){var e,s=this;return typeof u===f?(e=pt.call(arguments,1),this.each(function(){var r,f,c=n.data(this,o);if(!c)throw Error(i.format("Cannot call method '{0}' of {1} before it is initialized",u,o));if(r=c[u],typeof r!==h)throw Error(i.format("Cannot find method '{0}' of {1}",u,o));return f=r.apply(c,e),f!==t?(s=f,!1):t})):this.each(function(){new r(this,u)}),s};n.fn[s]=function(){return this.data(o)}}});tr={bind:function(){return this},nullObject:!0};ir=k.extend({init:function(n,t){k.fn.init.call(this,n,t);this.element.autoApplyNS();this.wrapper=this.element;this.element.addClass("km-widget")},destroy:function(){k.fn.destroy.call(this);this.element.kendoDestroy()},options:{prefix:"Mobile"},events:[],view:function(){var n=this.element.closest(i.roleSelector("view splitview modalview drawer"));return i.widgetInstance(n,i.mobile.ui)},viewHasNativeScrolling:function(){var n=this.view();return n&&n.options.useNativeScrolling},container:function(){var n=this.element.closest(i.roleSelector("view layout modalview drawer"));return i.widgetInstance(n,i.mobile.ui)||tr}});s(i.mobile,{init:function(n){i.init(n,i.mobile.ui,i.ui,i.dataviz.ui)},appLevelNativeScrolling:function(){return i.mobile.application&&i.mobile.application.options&&i.mobile.application.options.useNativeScrolling},ui:{Widget:ir,roles:{},plugin:function(n){i.ui.plugin(n,i.mobile.ui,"Mobile")}}});i.touchScroller=function(t,u){return n(t).map(function(t,f){return f=n(f),r.kineticScrollNeeded&&i.mobile.ui.Scroller&&!f.data("kendoMobileScroller")?(f.kendoMobileScroller(u),f.data("kendoMobileScroller")):!1})[0]};i.preventDefault=function(n){n.preventDefault()};i.widgetInstance=function(n,t){var u,e,o,s,r=n.data(i.ns+"role"),f=[];if(r){if("content"===r&&(r="scroller"),t)if(t[0])for(u=0,e=t.length;e>u;u++)f.push(t[u].roles[r]);else f.push(t.roles[r]);else f=[i.ui.roles[r],i.dataviz.ui.roles[r],i.mobile.ui.roles[r]];for(r.indexOf(".")>=0&&(f=[i.getter(r)(window)]),u=0,e=f.length;e>u;u++)if(o=f[u],o&&(s=n.data("kendo"+o.fn.options.prefix+o.fn.options.name)))return s}};i.onResize=function(t){var i=t;return r.mobileOS.android&&(i=function(){setTimeout(t,600)}),n(window).on(r.resize,i),i};i.unbindResize=function(t){n(window).off(r.resize,t)};i.attrValue=function(n,t){return n.data(i.ns+t)};i.days={Sunday:0,Monday:1,Tuesday:2,Wednesday:3,Thursday:4,Friday:5,Saturday:6};n.extend(n.expr[":"],{kendoFocusable:function(t){var i=n.attr(t,"tabindex");return uu(t,!isNaN(i)&&i>-1)}});at=["mousedown","mousemove","mouseenter","mouseleave","mouseover","mouseout","mouseup","click"];rr="label, input, [data-rel=external]";u={setupMouseMute:function(){var i,t=0,f=at.length,e=document.documentElement;if(!u.mouseTrap&&r.eventCapture)for(u.mouseTrap=!0,u.bustClick=!1,u.captureMouse=!1,i=function(t){u.captureMouse&&("click"===t.type?u.bustClick&&!n(t.target).is(rr)&&(t.preventDefault(),t.stopPropagation()):t.stopPropagation())};f>t;t++)e.addEventListener(at[t],i,!0)},muteMouse:function(n){u.captureMouse=!0;n.data.bustClick&&(u.bustClick=!0);clearTimeout(u.mouseTrapTimeoutID)},unMuteMouse:function(){clearTimeout(u.mouseTrapTimeoutID);u.mouseTrapTimeoutID=setTimeout(function(){u.captureMouse=!1;u.bustClick=!1},400)}};y={down:"touchstart mousedown",move:"mousemove touchmove",up:"mouseup touchend touchcancel",cancel:"mouseleave touchcancel"};r.touch&&(r.mobileOS.ios||r.mobileOS.android)?y={down:"touchstart",move:"touchmove",up:"touchend touchcancel",cancel:"touchcancel"}:r.pointers?y={down:"pointerdown",move:"pointermove",up:"pointerup",cancel:"pointercancel pointerleave"}:r.msPointers&&(y={down:"MSPointerDown",move:"MSPointerMove",up:"MSPointerUp",cancel:"MSPointerCancel MSPointerLeave"});!r.msPointers||"onmspointerenter"in window||n.each({MSPointerEnter:"MSPointerOver",MSPointerLeave:"MSPointerOut"},function(t,i){n.event.special[t]={delegateType:i,bindType:i,handle:function(t){var u,f=this,r=t.relatedTarget,e=t.handleObj;return(!r||r!==f&&!n.contains(f,r))&&(t.type=e.origType,u=e.handler.apply(this,arguments),t.type=i),u}}});ur=function(n){return y[n]||n};vt=/([^ ]+)/g;i.applyEventMap=function(n,t){return n=n.replace(vt,ur),t&&(n=n.replace(vt,"$1."+t)),n};tt=n.fn.on;s(!0,o,n);o.fn=o.prototype=new n;o.fn.constructor=o;o.fn.init=function(t,i){return i&&i instanceof n&&!(i instanceof o)&&(i=o(i)),n.fn.init.call(this,t,i,fr)};o.fn.init.prototype=o.fn;fr=o(document);s(o.fn,{handler:function(n){return this.data("handler",n),this},autoApplyNS:function(n){return this.data("kendoNS",n||i.guid()),this},on:function(){var s,n,e,o,h,c,t=this,l=t.data("kendoNS");return 1===arguments.length?tt.call(t,arguments[0]):(s=t,n=pt.call(arguments),typeof n[n.length-1]===st&&n.pop(),e=n[n.length-1],o=i.applyEventMap(n[0],l),r.mouseAndTouchPresent&&o.search(/mouse|click/)>-1&&this[0]!==document.documentElement&&(u.setupMouseMute(),h=2===n.length?null:n[1],c=o.indexOf("click")>-1&&o.indexOf("touchend")>-1,tt.call(this,{touchstart:u.muteMouse,touchend:u.unMuteMouse},h,{bustClick:c})),typeof e===f&&(s=t.data("handler"),e=s[e],n[n.length-1]=function(n){e.call(s,n)}),n[0]=o,tt.apply(t,n),t)},kendoDestroy:function(n){return n=n||this.data("kendoNS"),n&&this.off("."+n),this}});i.jQuery=o;i.eventMap=y;i.timezone=function(){function t(t,i){var u,o,s,c=i[3],e=i[4],f=i[5],h=i[8];return h||(i[8]=h={}),h[t]?h[t]:(isNaN(e)?0===e.indexOf("last")?(u=new Date(Date.UTC(t,n[c]+1,1,f[0]-24,f[1],f[2],0)),o=r[e.substr(4,3)],s=u.getUTCDay(),u.setUTCDate(u.getUTCDate()+o-s-(o>s?7:0))):e.indexOf(">=")>=0&&(u=new Date(Date.UTC(t,n[c],e.substr(5),f[0],f[1],f[2],0)),o=r[e.substr(0,3)],s=u.getUTCDay(),u.setUTCDate(u.getUTCDate()+o-s+(s>o?7:0))):u=new Date(Date.UTC(t,n[c],e,f[0],f[1],f[2],0)),h[t]=u)}function u(n,i,r){var f,e,u,o;return(i=i[r])?(u=new Date(n).getUTCFullYear(),i=jQuery.grep(i,function(n){var i=n[0],t=n[1];return u>=i&&(t>=u||i==u&&"only"==t||"max"==t)}),i.push(n),i.sort(function(n,i){return"number"!=typeof n&&(n=+t(u,n)),"number"!=typeof i&&(i=+t(u,i)),n-i}),o=i[jQuery.inArray(n,i)-1]||i[i.length-1],isNaN(o)?o:null):(f=r.split(":"),e=0,f.length>1&&(e=60*f[0]+ +f[1]),[-1e6,"max","-","Jan",1,[0,0,0],e,"-"])}function e(n,t,i){var u,f,e,r=t[i];if("string"==typeof r&&(r=t[r]),!r)throw Error('Timezone "'+i+'" is either incorrect, or kendo.timezones.min.js is not included.');for(u=r.length-1;u>=0&&(f=r[u][3],!(f&&n>f));u--);if(e=r[u+1],!e)throw Error('Timezone "'+i+'" not found on '+n+".");return e}function i(n,t,i,r){typeof n!=l&&(n=Date.UTC(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds()));var f=e(n,t,r);return{zone:f,rule:u(n,i,f[1])}}function o(n,t){var r,u,f;return"Etc/UTC"==t||"Etc/GMT"==t?0:(r=i(n,this.zones,this.rules,t),u=r.zone,f=r.rule,f?u[0]-f[6]:u[0])}function s(n,t){var f=i(n,this.zones,this.rules,t),e=f.zone,r=f.rule,u=e[2];return u.indexOf("/")>=0?u.split("/")[r&&+r[6]?1:0]:u.indexOf("%s")>=0?u.replace("%s",r&&"-"!=r[7]?r[7]:""):u}function h(n,t,i){var r,u;return typeof t==f&&(t=this.offset(n,t)),typeof i==f&&(i=this.offset(n,i)),r=n.getTimezoneOffset(),n=new Date(n.getTime()+6e4*(t-i)),u=n.getTimezoneOffset(),new Date(n.getTime()+6e4*(u-r))}function c(n,t){return this.convert(n,n.getTimezoneOffset(),t)}function a(n,t){return this.convert(n,t,n.getTimezoneOffset())}function v(n){return this.apply(new Date(n),"Etc/UTC")}var n={Jan:0,Feb:1,Mar:2,Apr:3,May:4,Jun:5,Jul:6,Aug:7,Sep:8,Oct:9,Nov:10,Dec:11},r={Sun:0,Mon:1,Tue:2,Wed:3,Thu:4,Fri:5,Sat:6};return{zones:{},rules:{},offset:o,convert:h,apply:c,remove:a,abbr:s,toLocalDate:v}}();i.date=function(){function t(n,t){return 0===t&&23===n.getHours()?(n.setHours(n.getHours()+2),!0):!1}function e(n,i,r){var u=n.getHours();r=r||1;i=(i-n.getDay()+7*r)%7;n.setDate(n.getDate()+i);t(n,u)}function c(n,t,i){return n=new Date(n),e(n,t,i),n}function o(n){return new Date(n.getFullYear(),n.getMonth(),1)}function l(n){var t=new Date(n.getFullYear(),n.getMonth()+1,0),i=o(n),r=Math.abs(t.getTimezoneOffset()-i.getTimezoneOffset());return r&&t.setHours(i.getHours()+r/60),t}function i(n){return n=new Date(n.getFullYear(),n.getMonth(),n.getDate(),0,0,0),t(n,0),n}function a(n){return Date.UTC(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds())}function r(n){return n.getTime()-i(n)}function v(t,i,u){var f,e=r(i),o=r(u);return t&&e!=o?(i>=u&&(u+=n),f=r(t),e>f&&(f+=n),e>o&&(o+=n),f>=e&&o>=f):!0}function y(t,i,r){var u,e=i.getTime(),f=r.getTime();return e>=f&&(f+=n),u=t.getTime(),u>=e&&f>=u}function u(i,r){var u=i.getHours();return i=new Date(i),s(i,r*n),t(i,u),i}function s(n,t,i){var r,u=n.getTimezoneOffset();n.setTime(n.getTime()+t);i||(r=n.getTimezoneOffset()-u,n.setTime(n.getTime()+r*f))}function h(){return i(new Date)}function p(n){return i(n).getTime()==h().getTime()}function w(n){var t=new Date(1980,1,1,0,0,0);return n&&t.setHours(n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds()),t}var f=6e4,n=864e5;return{adjustDST:t,dayOfWeek:c,setDayOfWeek:e,getDate:i,isInDateRange:y,isInTimeRange:v,isToday:p,nextDay:function(n){return u(n,1)},previousDay:function(n){return u(n,-1)},toUtcTime:a,MS_PER_DAY:n,MS_PER_HOUR:60*f,MS_PER_MINUTE:f,setTime:s,addDays:u,today:h,toInvariantTime:w,firstDayOfMonth:o,lastDayOfMonth:l,getMilliseconds:r}}();i.stripWhitespace=function(n){for(var t=document.createNodeIterator(n,NodeFilter.SHOW_TEXT,function(t){return t.parentNode==n?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT},!1);t.nextNode();)t.referenceNode&&!t.referenceNode.textContent.trim()&&t.referenceNode.parentNode.removeChild(t.referenceNode)};er=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(n){setTimeout(n,1e3/60)};i.animationFrame=function(n){er.call(window,n)};c=[];i.queueAnimation=function(n){c[c.length]=n;1===c.length&&i.runNextAnimation()};i.runNextAnimation=function(){i.animationFrame(function(){c[0]&&(c.shift()(),c[0]&&i.runNextAnimation())})};i.parseQueryStringParams=function(n){for(var u=n.split("?")[1]||"",r={},i=u.split(/&|=/),f=i.length,t=0;f>t;t+=2)""!==i[t]&&(r[decodeURIComponent(i[t])]=decodeURIComponent(i[t+1]));return r};it=i.support.mobileOS;or=it&&it.android;sr=or&&"chrome"==it.browser;i.elementUnderCursor=function(n){return sr?document.elementFromPoint(n.x.screen,n.y.screen):document.elementFromPoint(n.x.client,n.y.client)};i.wheelDeltaY=function(n){var r,i=n.originalEvent,u=i.wheelDeltaY;return i.wheelDelta?(u===t||u)&&(r=i.wheelDelta):i.detail&&i.axis===i.VERTICAL_AXIS&&(r=10*-i.detail),r};i.caret=function(i,r,u){var f,e,o,h,s=r!==t;if(u===t&&(u=r),i[0]&&(i=i[0]),!s||!i.disabled){try{i.selectionStart!==t?s?(i.focus(),i.setSelectionRange(r,u)):r=[i.selectionStart,i.selectionEnd]:document.selection&&(n(i).is(":visible")&&i.focus(),f=i.createTextRange(),s?(f.collapse(!0),f.moveStart("character",r),f.moveEnd("character",u-r),f.select()):(e=f.duplicate(),f.moveToBookmark(document.selection.createRange().getBookmark()),e.setEndPoint("EndToStart",f),o=e.text.length,h=o+f.text.length,r=[o,h]))}catch(c){r=[]}return r}}}(jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(n,t){t()});!function(n,t){t(["./kendo.core.min","./kendo.data.odata.min","./kendo.data.xml.min"],n)}(function(){return function(n,t){function vt(n,t,i,u){return function(f){var o,e={};for(o in f)e[o]=f[o];e.field=u?i+"."+f.field:i;t==r&&n._notifyChange&&n._notifyChange(e);n.trigger(t,e)}}function ci(t,i){if(t===i)return!0;var u,r=n.type(t),f=n.type(i);if(r!==f)return!1;if("date"===r)return t.getTime()===i.getTime();if("object"!==r&&"array"!==r)return!1;for(u in t)if(!ci(t[u],i[u]))return!1;return!0}function wr(n,t){var i;for(var r in n)if((i=n[r],k(i)&&i.field&&i.field===t)||i===t)return i;return null}function u(n){this.data=n||[]}function rt(n,i){if(n){var r=typeof n===o?{field:n,dir:i}:n,u=l(r)?r:r!==t?[r]:[];return ru(u,function(n){return!!n.dir})}}function li(n){var i,f,r,t,u=n.filters;if(u)for(i=0,f=u.length;f>i;i++)r=u[i],t=r.operator,t&&typeof t===o&&(r.operator=or[t.toLowerCase()]||t),li(r)}function ot(n){return n&&!nt(n)?((l(n)||!n.filters)&&(n={logic:"and",filters:l(n)?n:[n]}),li(n),n):t}function br(n){return l(n)?n:[n]}function ut(n,i){var r=typeof n===o?{field:n,dir:i}:n,u=l(r)?r:r!==t?[r]:[];return bt(u,function(n){return{field:n.field,dir:n.dir||"asc",aggregates:n.aggregates}})}function kr(n,t){return n&&n.getTime&&t&&t.getTime?n.getTime()===t.getTime():n===t}function dr(n,t,r,u,f){var o,h,s,c,e;for(t=t||[],c=t.length,o=0;c>o;o++)h=t[o],s=h.aggregate,e=h.field,n[e]=n[e]||{},n[e][s]=sr[s.toLowerCase()](n[e][s],r,i.accessor(e),u,f)}function y(n){return"number"==typeof n&&!isNaN(n)}function gr(n){for(var i=n.length,r=Array(i),t=0;i>t;t++)r[t]=n[t].toJSON();return r}function ai(n,t){t=t||{};var i=new u(n),f=t.aggregate,r=t.filter;return r&&(i=i.filter(r)),i.aggregate(f)}function nu(n,t,i,r,u){for(var e,f,o,s=0,h=n.length;h>s;s++){e=n[s];for(f in t)o=u[f],o&&o!==f&&(e[o]=t[f](e),delete e[f])}}function vi(n,t,i,r,u){for(var e,f,o,s=0,h=n.length;h>s;s++){e=n[s];for(f in t)e[f]=i._parse(f,t[f](e)),o=u[f],o&&o!==f&&delete e[o]}}function yi(n,t,i,r,u){for(var f,o,e=0,s=n.length;s>e;e++)f=n[e],o=r[f.field],o&&o!=f.field&&(f.field=o),f.value=i._parse(f.field,f.value),f.hasSubgroups?yi(f.items,t,i,r,u):vi(f.items,t,i,r,u)}function yt(n,t,i,r,u,f){return function(e){return e=n(e),e&&!nt(r)&&("[object Array]"===at.call(e)||e instanceof w||(e=[e]),i(e,r,new t,u,f)),e||[]}}function pt(n,t,i,r){for(var f,u,o,e=0;t.length&&r&&(f=t[e],u=f.items,o=u.length,n&&n.field===f.field&&n.value===f.value?(n.hasSubgroups&&n.items.length?pt(n.items[n.items.length-1],f.items,i,r):(u=u.slice(i,i+r),n.items=n.items.concat(u)),t.splice(e--,1)):f.hasSubgroups&&u.length?pt(f,u,i,r):(u=u.slice(i,i+r),f.items=u,f.items.length||t.splice(e--,1)),0===u.length?i-=o:(i=0,r-=u.length),!(++e>=t.length)););t.length>e&&t.splice(e,t.length-e)}function pi(n){for(var i=[],t=0,r=n.length;r>t;t++)i=n[t].hasSubgroups?i.concat(pi(n[t].items)):i.concat(n[t].items.slice());return i}function wi(n,t){var r,f,u,i;if(t)for(r=0,f=n.length;f>r;r++)u=n[r],i=u.items,u.hasSubgroups?wi(i,t):!i.length||i[0]instanceof t||(i.type=t,i.wrapAll(i,i))}function bi(n,t){for(var i=0,r=n.length;r>i;i++)if(n[i].hasSubgroups){if(bi(n[i].items,t))return!0}else if(t(n[i].items,n[i]))return!0}function ki(n,t){for(var i=0,r=n.length;r>i;i++)if(n[i].uid==t.uid)return t=n[i],n.splice(i,1),t}function wt(n,t){for(var i,u,r=n.length-1,f=0;r>=f;r--)u=n[r],i={value:t.get(u.field),field:u.field,items:i?[i]:[t],hasSubgroups:!!i,aggregates:{}};return i}function di(n,t){return t?nr(n,function(n){return n[t.idField]===t.id}):-1}function gi(n,t){return t?nr(n,function(n){return n.uid==t.uid}):-1}function nr(n,t){for(var i=0,r=n.length;r>i;i++)if(t(n[i]))return i;return-1}function tr(n,t){var i,r;return n&&!nt(n)?(i=n[t],r=k(i)?i.from||i.field||t:n[t]||t,a(r)?t:r):t}function ir(n,t){var r,f,u,i={};for(u in n)"filters"!==u&&(i[u]=n[u]);if(n.filters)for(i.filters=[],r=0,f=n.filters.length;f>r;r++)i.filters[r]=ir(n.filters[r],t);else i.field=tr(t.fields,i.field);return i}function st(n,t){for(var i,u,f,o=[],r=0,e=n.length;e>r;r++){i={};u=n[r];for(f in u)i[f]=u[f];i.field=tr(t.fields,i.field);i.aggregates&&l(i.aggregates)&&(i.aggregates=st(i.aggregates,t));o.push(i)}return o}function tu(t,i){for(var e,u,r,s=n(t)[0].children,h=[],c=i[0],l=i[1],f=0,o=s.length;o>f;f++)e={},r=s[f],r.disabled||(e[c.field]=r.text,u=r.attributes.value,u=u&&u.specified?r.value:r.text,e[l.field]=u,h.push(e));return h}function iu(t,i){for(var r,h,f,e,o,c=n(t)[0].tBodies[0],l=c?c.rows:[],v=i.length,a=[],u=0,s=l.length;s>u;u++){for(f={},o=!0,h=l[u].cells,r=0;v>r;r++)e=h[r],"th"!==e.nodeName.toLowerCase()&&(o=!1,f[i[r].field]=e.innerHTML);o||a.push(f)}return a}function rr(n){return function(){var t=this._data,i=h.fn[n].apply(this,hi.call(arguments));return this._data!=t&&this._attachBubbleHandlers(),i}}function ur(t,i){function s(n,t){return n.filter(t).add(n.find(t))}for(var r,f,h,o,c,u,a=n(t).children(),v=[],b=i[0].field,y=i[1]&&i[1].field,p=i[2]&&i[2].field,w=i[3]&&i[3].field,e=0,l=a.length;l>e;e++)r={_loaded:!0},f=a.eq(e),o=f[0].firstChild,u=f.children(),t=u.filter("ul"),u=u.filter(":not(ul)"),h=f.attr("data-id"),h&&(r.id=h),o&&(r[b]=3==o.nodeType?o.nodeValue:u.text()),y&&(r[y]=s(u,"a").attr("href")),w&&(r[w]=s(u,"img").attr("src")),p&&(c=s(u,".k-sprite").prop("className"),r[p]=c&&n.trim(c.replace("k-sprite",""))),t.length&&(r.items=ur(t.eq(0),i)),"true"==f.attr("data-hasChildren")&&(r.hasChildren=!0),v.push(r);return v}var bt,ht,fr,er,or,sr,kt,dt,g,gt,h,ni,ti,b,ii,hr,e=n.extend,c=n.proxy,k=n.isPlainObject,nt=n.isEmptyObject,l=n.isArray,ru=n.grep,ri=n.ajax,ui=n.each,d=n.noop,i=window.kendo,a=i.isFunction,tt=i.Observable,ct=i.Class,o="string",fi="function",cr="create",lr="read",ar="update",vr="destroy",r="change",yr="sync",ei="get",p="error",ft="requestStart",oi="progress",it="requestEnd",uu=[cr,lr,ar,vr],et=function(n){return n},lt=i.getter,si=i.stringify,f=Math,fu=[].push,eu=[].join,ou=[].pop,su=[].splice,hu=[].shift,hi=[].slice,cu=[].unshift,at={}.toString,lu=i.support.stableSort,au=/^\/Date\((.*?)\)\/$/,vu=/(\r+|\n+)/g,yu=/(?=['\\])/g,w=tt.extend({init:function(n,t){var i=this;i.type=t||s;tt.fn.init.call(i);i.length=n.length;i.wrapAll(n,i)},toJSON:function(){for(var t,i=this.length,r=Array(i),n=0;i>n;n++)t=this[n],t instanceof s&&(t=t.toJSON()),r[n]=t;return r},parent:d,wrapAll:function(n,t){var i,r,u=this,f=function(){return u};for(t=t||[],i=0,r=n.length;r>i;i++)t[i]=u.wrap(n[i],f);return t},wrap:function(n,t){var u,i=this;return null!==n&&"[object Object]"===at.call(n)&&(u=n instanceof i.type||n instanceof v,u||(n=n instanceof s?n.toJSON():n,n=new i.type(n)),n.parent=t,n.bind(r,function(n){i.trigger(r,{field:n.field,node:n.node,index:n.index,items:n.items||[this],action:n.node?n.action||"itemchange":"itemchange"})})),n},push:function(){var n,i=this.length,t=this.wrapAll(arguments);return n=fu.apply(this,t),this.trigger(r,{action:"add",index:i,items:t}),n},slice:hi,join:eu,pop:function(){var n=this.length,t=ou.apply(this);return n&&this.trigger(r,{action:"remove",index:n-1,items:[t]}),t},splice:function(n,t,i){var u,f,e,o=this.wrapAll(hi.call(arguments,2));if(u=su.apply(this,[n,t].concat(o)),u.length)for(this.trigger(r,{action:"remove",index:n,items:u}),f=0,e=u.length;e>f;f++)u[f].children&&u[f].unbind(r);return i&&this.trigger(r,{action:"add",index:n,items:o}),u},shift:function(){var t=this.length,n=hu.apply(this);return t&&this.trigger(r,{action:"remove",index:0,items:[n]}),n},unshift:function(){var n,t=this.wrapAll(arguments);return n=cu.apply(this,t),this.trigger(r,{action:"add",index:0,items:t}),n},indexOf:function(n){for(var r=this,t=0,i=r.length;i>t;t++)if(r[t]===n)return t;return-1},forEach:function(n){for(var t=0,i=this.length;i>t;t++)n(this[t],t,this)},map:function(n){for(var t=0,i=[],r=this.length;r>t;t++)i[t]=n(this[t],t,this);return i},filter:function(n){for(var i,t=0,r=[],u=this.length;u>t;t++)i=this[t],n(i,t,this)&&(r[r.length]=i);return r},find:function(n){for(var i,t=0,r=this.length;r>t;t++)if(i=this[t],n(i,t,this))return i},every:function(n){for(var i,t=0,r=this.length;r>t;t++)if(i=this[t],!n(i,t,this))return!1;return!0},some:function(n){for(var i,t=0,r=this.length;r>t;t++)if(i=this[t],n(i,t,this))return!0;return!1},remove:function(n){this.splice(this.indexOf(n),1)},empty:function(){this.splice(0,this.length)}}),s=tt.extend({init:function(n){var r,t,u=this,f=function(){return u};tt.fn.init.call(this);for(t in n)r=n[t],"_"!=t.charAt(0)&&(r=u.wrap(r,t,f)),u[t]=r;u.uid=i.guid()},shouldSerialize:function(n){return this.hasOwnProperty(n)&&"_events"!==n&&typeof this[n]!==fi&&"uid"!==n},forEach:function(n){for(var t in this)this.shouldSerialize(t)&&n(this[t],t)},toJSON:function(){var n,t,i={};for(t in this)this.shouldSerialize(t)&&(n=this[t],(n instanceof s||n instanceof w)&&(n=n.toJSON()),i[t]=n);return i},get:function(n){var r,t=this;return t.trigger(ei,{field:n}),r="this"===n?t:i.getter(n,!0)(t)},_set:function(n,t){var r,u,f,o=this,e=n.indexOf(".")>=0;if(e)for(r=n.split("."),u="";r.length>1;){if(u+=r.shift(),f=i.getter(u,!0)(o),f instanceof s)return f.set(r.join("."),t),e;u+="."}return i.setter(n)(o,t),e},set:function(n,t){var u=this,f=i.getter(n,!0)(u);f!==t&&(u.trigger("set",{field:n,value:t})||(!u._set(n,u.wrap(t,n,function(){return u}))||n.indexOf("(")>=0||n.indexOf("[")>=0)&&u.trigger(r,{field:n}))},parent:d,wrap:function(n,t,i){var u,f,o=this,e=at.call(n);return null==n||"[object Object]"!==e&&"[object Array]"!==e||(u=n instanceof w,f=n instanceof h,"[object Object]"!==e||f||u?("[object Array]"===e||u||f)&&(u||f||(n=new w(n)),n.parent()!=i()&&n.bind(r,vt(o,r,t,!1))):(n instanceof s||(n=new s(n)),n.parent()!=i()&&(n.bind(ei,vt(o,ei,t,!0)),n.bind(r,vt(o,r,t,!0)))),n.parent=i),n}}),pr={number:function(n){return i.parseFloat(n)},date:function(n){return i.parseDate(n)},boolean:function(n){return typeof n===o?"true"===n.toLowerCase():null!=n?!!n:n},string:function(n){return null!=n?n+"":n},"default":function(n){return n}},pu={string:"",number:0,date:new Date,boolean:!1,"default":""},v=s.extend({init:function(i){var r=this;(!i||n.isEmptyObject(i))&&(i=n.extend({},r.defaults,i));s.fn.init.call(r,i);r.dirty=!1;r.idField&&(r.id=r.get(r.idField),r.id===t&&(r.id=r._defaultId))},shouldSerialize:function(n){return s.fn.shouldSerialize.call(this,n)&&"uid"!==n&&!("id"!==this.idField&&"id"===n)&&"dirty"!==n&&"_accessors"!==n},_parse:function(n,t){var i,u=this,f=n,r=u.fields||{};return n=r[n],n||(n=wr(r,f)),n&&(i=n.parse,!i&&n.type&&(i=pr[n.type.toLowerCase()])),i?i(t):t},_notifyChange:function(n){var t=n.action;("add"==t||"remove"==t)&&(this.dirty=!0)},editable:function(n){return n=(this.fields||{})[n],n?n.editable!==!1:!0},set:function(n,t,i){var r=this;r.editable(n)&&(t=r._parse(n,t),ci(t,r.get(n))||(r.dirty=!0,s.fn.set.call(r,n,t,i)))},accept:function(n){var i,r,t=this,u=function(){return t};for(i in n)r=n[i],"_"!=i.charAt(0)&&(r=t.wrap(n[i],i,u)),t._set(i,r);t.idField&&(t.id=t.get(t.idField));t.dirty=!1},isNew:function(){return this.id===this._defaultId}});v.define=function(n,i){i===t&&(i=n,n=v);var s,f,u,y,c,l,w,h,r=e({defaults:{}},i),p={},a=r.id;if(a&&(r.idField=a),r.id&&delete r.id,a&&(r.defaults[a]=r._defaultId=""),"[object Array]"===at.call(r.fields)){for(l=0,w=r.fields.length;w>l;l++)u=r.fields[l],typeof u===o?p[u]={}:u.field&&(p[u.field]=u);r.fields=p}for(f in r.fields)u=r.fields[f],y=u.type||"default",c=null,h=f,f=typeof u.field===o?u.field:f,u.nullable||(c=r.defaults[h!==f?h:f]=u.defaultValue!==t?u.defaultValue:pu[y.toLowerCase()]),i.id===f&&(r._defaultId=c),r.defaults[h!==f?h:f]=c,u.parse=u.parse||pr[y];return s=n.extend(r),s.define=function(n){return v.define(s,n)},r.fields&&(s.fields=r.fields,s.idField=r.idField),s};ht={selector:function(n){return a(n)?n:lt(n)},compare:function(n){var t=this.selector(n);return function(n,i){return n=t(n),i=t(i),null==n&&null==i?0:null==n?-1:null==i?1:n.localeCompare?n.localeCompare(i):n>i?1:i>n?-1:0}},create:function(n){var t=n.compare||this.compare(n.field);return"desc"==n.dir?function(n,i){return t(i,n,!0)}:t},combine:function(n){return function(t,i){for(var u=n[0](t,i),r=1,f=n.length;f>r;r++)u=u||n[r](t,i);return u}}};fr=e({},ht,{asc:function(n){var t=this.selector(n);return function(n,i){var r=t(n),u=t(i);return r&&r.getTime&&u&&u.getTime&&(r=r.getTime(),u=u.getTime()),r===u?n.__position-i.__position:null==r?-1:null==u?1:r.localeCompare?r.localeCompare(u):r>u?1:-1}},desc:function(n){var t=this.selector(n);return function(n,i){var u=t(n),r=t(i);return u&&u.getTime&&r&&r.getTime&&(u=u.getTime(),r=r.getTime()),u===r?n.__position-i.__position:null==u?1:null==r?-1:r.localeCompare?r.localeCompare(u):r>u?1:-1}},create:function(n){return this[n.dir](n.field)}});bt=function(n,t){for(var r=n.length,u=Array(r),i=0;r>i;i++)u[i]=t(n[i],i,n);return u};er=function(){function t(n){return n.replace(yu,"\\").replace(vu,"")}function n(n,i,r,u){var f;return null!=r&&(typeof r===o&&(r=t(r),f=au.exec(r),f?r=new Date(+f[1]):u?(r="'"+r.toLowerCase()+"'",i="("+i+" || '').toLowerCase()"):r="'"+r+"'"),r.getTime&&(i="("+i+"?"+i+".getTime():"+i+")",r=r.getTime())),i+" "+n+" "+r}return{eq:function(t,i,r){return n("==",t,i,r)},neq:function(t,i,r){return n("!=",t,i,r)},gt:function(t,i,r){return n(">",t,i,r)},gte:function(t,i,r){return n(">=",t,i,r)},lt:function(t,i,r){return n("<",t,i,r)},lte:function(t,i,r){return n("<=",t,i,r)},startswith:function(n,i,r){return r&&(n="("+n+" || '').toLowerCase()",i&&(i=i.toLowerCase())),i&&(i=t(i)),n+".lastIndexOf('"+i+"', 0) == 0"},endswith:function(n,i,r){return r&&(n="("+n+" || '').toLowerCase()",i&&(i=i.toLowerCase())),i&&(i=t(i)),n+".indexOf('"+i+"', "+n+".length - "+(i||"").length+") >= 0"},contains:function(n,i,r){return r&&(n="("+n+" || '').toLowerCase()",i&&(i=i.toLowerCase())),i&&(i=t(i)),n+".indexOf('"+i+"') >= 0"},doesnotcontain:function(n,i,r){return r&&(n="("+n+" || '').toLowerCase()",i&&(i=i.toLowerCase())),i&&(i=t(i)),n+".indexOf('"+i+"') == -1"}}}();u.filterExpr=function(n){for(var r,f,h,c,a=[],e=[],o=[],v=n.filters,s=0,l=v.length;l>s;s++)r=v[s],h=r.field,c=r.operator,r.filters?(f=u.filterExpr(r),r=f.expression.replace(/__o\[(\d+)\]/g,function(n,t){return t=+t,"__o["+(o.length+t)+"]"}).replace(/__f\[(\d+)\]/g,function(n,t){return t=+t,"__f["+(e.length+t)+"]"}),o.push.apply(o,f.operators),e.push.apply(e,f.fields)):(typeof h===fi?(f="__f["+e.length+"](d)",e.push(h)):f=i.expr(h),typeof c===fi?(r="__o["+o.length+"]("+f+", "+r.value+")",o.push(c)):r=er[(c||"eq").toLowerCase()](f,r.value,r.ignoreCase!==t?r.ignoreCase:!0)),a.push(r);return{expression:"("+a.join({and:" && ",or:" || "}[n.logic])+")",fields:e,operators:o}};or={"==":"eq",equals:"eq",isequalto:"eq",equalto:"eq",equal:"eq","!=":"neq",ne:"neq",notequals:"neq",isnotequalto:"neq",notequalto:"neq",notequal:"neq","<":"lt",islessthan:"lt",lessthan:"lt",less:"lt","<=":"lte",le:"lte",islessthanorequalto:"lte",lessthanequal:"lte",">":"gt",isgreaterthan:"gt",greaterthan:"gt",greater:"gt",">=":"gte",isgreaterthanorequalto:"gte",greaterthanequal:"gte",ge:"gte",notsubstringof:"doesnotcontain"};u.normalizeFilter=ot;u.prototype={toArray:function(){return this.data},range:function(n,t){return new u(this.data.slice(n,n+t))},skip:function(n){return new u(this.data.slice(n))},take:function(n){return new u(this.data.slice(0,n))},select:function(n){return new u(bt(this.data,n))},order:function(n,t){var i={dir:t};return n&&(n.compare?i.compare=n.compare:i.field=n),new u(this.data.slice(0).sort(ht.create(i)))},orderBy:function(n){return this.order(n,"asc")},orderByDescending:function(n){return this.order(n,"desc")},sort:function(n,t,i){var r,f,u=rt(n,t),e=[];if(i=i||ht,u.length){for(r=0,f=u.length;f>r;r++)e.push(i.create(u[r]));return this.orderBy({compare:i.combine(e)})}return this},filter:function(n){var t,r,s,i,h,f,e,o,c=this.data,l=[];if(n=ot(n),!n||0===n.filters.length)return this;for(i=u.filterExpr(n),f=i.fields,e=i.operators,h=o=Function("d, __f, __o","return "+i.expression),(f.length||e.length)&&(o=function(n){return h(n,f,e)}),t=0,s=c.length;s>t;t++)r=c[t],o(r)&&l.push(r);return new u(l)},group:function(n,t){n=ut(n||[]);t=t||this.data;var i,f=this,r=new u(f.data);return n.length>0&&(i=n[0],r=r.groupBy(i).select(function(r){var f=new u(t).filter([{field:r.field,operator:"eq",value:r.value,ignoreCase:!1}]);return{field:r.field,value:r.value,items:n.length>1?new u(r.items).group(n.slice(1),f.toArray()).toArray():r.items,hasSubgroups:n.length>1,aggregates:f.aggregate(i.aggregates)}})),r},groupBy:function(n){if(nt(n)||!this.data.length)return new u([]);for(var o,s,t=n.field,h=this._sortForGrouping(t,n.dir||"asc"),l=i.accessor(t),f=l.get(h[0],t),e={field:t,value:f,items:[]},a=[e],r=0,c=h.length;c>r;r++)o=h[r],s=l.get(o,t),kr(f,s)||(f=s,e={field:t,value:f,items:[]},a.push(e)),e.items.push(o);return new u(a)},_sortForGrouping:function(n,t){var i,f,r=this.data;if(!lu){for(i=0,f=r.length;f>i;i++)r[i].__position=i;for(r=new u(r).sort(n,t,fr).toArray(),i=0,f=r.length;f>i;i++)delete r[i].__position;return r}return this.sort(n,t).toArray()},aggregate:function(n){var t,i,r={};if(n&&n.length)for(t=0,i=this.data.length;i>t;t++)dr(r,n,this.data[t],t,i);return r}};sr={sum:function(n,t,i){var r=i.get(t);return y(n)?y(r)&&(n+=r):n=r,n},count:function(n){return(n||0)+1},average:function(n,t,i,r,u){var f=i.get(t);return y(n)?y(f)&&(n+=f):n=f,r==u-1&&y(n)&&(n/=u),n},max:function(n,t,i){var r=i.get(t);return y(n)||(n=r),r>n&&y(r)&&(n=r),n},min:function(n,t,i){var r=i.get(t);return y(n)||(n=r),n>r&&y(r)&&(n=r),n}};u.process=function(n,i){i=i||{};var e,r=new u(n),f=i.group,o=ut(f||[]).concat(rt(i.sort||[])),s=i.filter,h=i.skip,c=i.take;return s&&(r=r.filter(s),e=r.toArray().length),o&&(r=r.sort(o),f&&(n=r.toArray())),h!==t&&c!==t&&(r=r.range(h,c)),f&&(r=r.group(f,n)),{total:e,data:r.toArray()}};kt=ct.extend({init:function(n){this.data=n.data},read:function(n){n.success(this.data)},update:function(n){n.success(n.data)},create:function(n){n.success(n.data)},destroy:function(n){n.success(n.data)}});dt=ct.extend({init:function(n){var i,t=this;n=t.options=e({},t.options,n);ui(uu,function(t,i){typeof n[i]===o&&(n[i]={url:n[i]})});t.cache=n.cache?g.create(n.cache):{find:d,add:d};i=n.parameterMap;a(n.push)&&(t.push=n.push);t.push||(t.push=et);t.parameterMap=a(i)?i:function(n){var t={};return ui(n,function(n,r){n in i&&(n=i[n],k(n)&&(r=n.value(r),n=n.key));t[n]=r}),t}},options:{parameterMap:et},create:function(n){return ri(this.setup(n,cr))},read:function(i){var r,o,u,f=this,e=f.cache;i=f.setup(i,lr);r=i.success||d;o=i.error||d;u=e.find(i.data);u!==t?r(u):(i.success=function(n){e.add(i.data,n);r(n)},n.ajax(i))},update:function(n){return ri(this.setup(n,ar))},destroy:function(n){return ri(this.setup(n,vr))},setup:function(n,t){n=n||{};var r,u=this,i=u.options[t],f=a(i.data)?i.data(n.data):i.data;return n=e(!0,{},i,n),r=e(!0,{},f,n.data),n.data=u.parameterMap(r,t),a(n.url)&&(n.url=n.url(r)),n}});g=ct.extend({init:function(){this._store={}},add:function(n,i){n!==t&&(this._store[si(n)]=i)},find:function(n){return this._store[si(n)]},clear:function(){this._store={}},remove:function(n){delete this._store[si(n)]}});g.create=function(n){var t={inmemory:function(){return new g}};return k(n)&&a(n.find)?n:n===!0?new g:t[n]()};gt=ct.extend({init:function(n){var l,e,i,y,p,w,b,u,s,a,f,h,r,t=this;n=n||{};for(l in n)e=n[l],t[l]=typeof e===o?lt(e):e;y=n.modelBase||v;k(t.model)&&(t.model=i=y.define(t.model));t.model&&(p=c(t.data,t),w=c(t.groups,t),b=c(t.serialize,t),u={},s={},a={},f={},h=!1,i=t.model,i.fields&&(ui(i.fields,function(n,t){var i;r=n;k(t)&&t.field?r=t.field:typeof t===o&&(r=t);k(t)&&t.from&&(i=t.from);h=h||i&&i!==n||r!==n;s[n]=lt(i||r);a[n]=lt(n);u[i||r]=n;f[n]=i||r}),!n.serialize&&h&&(t.serialize=yt(b,i,nu,a,u,f))),t.data=yt(p,i,vi,s,u,f),t.groups=yt(w,i,yi,s,u,f))},errors:function(n){return n?n.errors:null},parse:et,data:et,total:function(n){return n.length},groups:et,aggregates:function(){return{}},serialize:function(n){return n}});h=tt.extend({init:function(n){var o,f,u=this;n&&(f=n.data);n=u.options=e({},u.options,n);u._map={};u._prefetch={};u._data=[];u._pristineData=[];u._ranges=[];u._view=[];u._pristineTotal=0;u._destroyed=[];u._pageSize=n.pageSize;u._page=n.page||(n.pageSize?1:t);u._sort=rt(n.sort);u._filter=ot(n.filter);u._group=ut(n.group);u._aggregate=n.aggregate;u._total=n.total;tt.fn.init.call(u);u.transport=ni.create(n,f);a(u.transport.push)&&u.transport.push({pushCreate:c(u._pushCreate,u),pushUpdate:c(u._pushUpdate,u),pushDestroy:c(u._pushDestroy,u)});u.reader=new i.data.readers[n.schema.type||"json"](n.schema);o=u.reader.model||{};u._data=u._observe(u._data);u.bind(["push",p,r,ft,yr,it,oi],n)},options:{data:[],schema:{modelBase:v},serverSorting:!1,serverPaging:!1,serverFiltering:!1,serverGrouping:!1,serverAggregates:!1,batch:!1},_isServerGrouped:function(){var n=this.group()||[];return this.options.serverGrouping&&n.length},_pushCreate:function(n){this._push(n,"pushCreate")},_pushUpdate:function(n){this._push(n,"pushUpdate")},_pushDestroy:function(n){this._push(n,"pushDestroy")},_push:function(n,t){var i=this._readData(n);i||(i=n);this[t](i)},_flatData:function(n){return this._isServerGrouped()?pi(n):n},parent:d,get:function(n){for(var i=this._flatData(this._data),t=0,r=i.length;r>t;t++)if(i[t].id==n)return i[t]},getByUid:function(n){var t,r,i=this._flatData(this._data);if(i)for(t=0,r=i.length;r>t;t++)if(i[t].uid==n)return i[t]},indexOf:function(n){return gi(this._data,n)},at:function(n){return this._data[n]},data:function(n){var i=this;return n===t?i._data:(i._data=this._observe(n),i._pristineData=n.slice(0),i._ranges=[],i._addRange(i._data),i._total=i._data.length,i._pristineTotal=i._total,i._process(i._data),t)},view:function(){return this._view},add:function(n){return this.insert(this._data.length,n)},_createNewModel:function(n){return this.reader.model?new this.reader.model(n):new s(n)},insert:function(n,t){return t||(t=n,n=0),t instanceof v||(t=this._createNewModel(t)),this._isServerGrouped()?this._data.splice(n,0,wt(this.group(),t)):this._data.splice(n,0,t),t},pushCreate:function(n){var t,i,f,u,r;for(l(n)||(n=[n]),t=[],i=0;n.length>i;i++)f=n[i],u=this.add(f),t.push(u),r=u.toJSON(),this._isServerGrouped()&&(r=wt(this.group(),r)),this._pristineData.push(r);t.length&&this.trigger("push",{type:"create",items:t})},pushUpdate:function(n){var r,u,i,f,t;for(l(n)||(n=[n]),r=[],u=0;n.length>u;u++)i=n[u],f=this._createNewModel(i),t=this.get(f.id),t?(r.push(t),t.accept(i),t.trigger("change"),this._updatePristineForModel(t,i)):this.pushCreate(i);r.length&&this.trigger("push",{type:"update",items:r})},pushDestroy:function(n){var t,f,i,e,r,u;l(n)||(n=[n]);t=[];f=this.options.autoSync;this.options.autoSync=!1;try{for(i=0;n.length>i;i++)e=n[i],r=this._createNewModel(e),u=!1,this._eachItem(this._data,function(n){for(var i=0;n.length>i;i++)if(n[i].id===r.id){t.push(n[i]);n.splice(i,1);u=!0;break}}),u&&(this._removePristineForModel(r),this._destroyed.pop())}finally{this.options.autoSync=f}t.length&&this.trigger("push",{type:"destroy",items:t})},remove:function(n){var i,r=this,u=r._isServerGrouped();return this._eachItem(r._data,function(f){return i=ki(f,n),i&&u?(i.isNew&&i.isNew()||r._destroyed.push(i),!0):t}),this._removeModelFromRanges(n),this._updateRangesLength(),n},sync:function(){var i,f,r,t=this,e=[],o=[],s=t._destroyed,u=t._flatData(t._data);if(t.reader.model){for(i=0,f=u.length;f>i;i++)u[i].isNew()?e.push(u[i]):u[i].dirty&&o.push(u[i]);r=t._send("create",e);r.push.apply(r,t._send("update",o));r.push.apply(r,t._send("destroy",s));n.when.apply(null,r).then(function(){for(var n=0,i=arguments.length;i>n;n++)t._accept(arguments[n]);t._change({action:"sync"});t.trigger(yr)})}},cancelChanges:function(n){var t=this;n instanceof i.data.Model?t._cancelModel(n):(t._destroyed=[],t._data=t._observe(t._pristineData),t.options.serverPaging&&(t._total=t._pristineTotal),t._change())},hasChanges:function(){var n,i,t=this._data;if(this._destroyed.length)return!0;for(n=0,i=t.length;i>n;n++)if(t[n].isNew()||t[n].dirty)return!0;return!1},_accept:function(t){var o,r=this,f=t.models,i=t.response,u=0,s=r._isServerGrouped(),h=r._pristineData,e=t.type;if(r.trigger(it,{response:i,type:e}),i&&!nt(i)){if(i=r.reader.parse(i),r._handleCustomErrors(i))return;i=r.reader.data(i);l(i)||(i=[i])}else i=n.map(f,function(n){return n.toJSON()});for("destroy"===e&&(r._destroyed=[]),u=0,o=f.length;o>u;u++)"destroy"!==e?(f[u].accept(i[u]),"create"===e?h.push(s?wt(r.group(),f[u]):i[u]):"update"===e&&r._updatePristineForModel(f[u],i[u])):r._removePristineForModel(f[u])},_updatePristineForModel:function(n,t){this._executeOnPristineForModel(n,function(n,r){i.deepExtend(r[n],t)})},_executeOnPristineForModel:function(n,i){this._eachPristineItem(function(r){var u=di(r,n);return u>-1?(i(u,r),!0):t})},_removePristineForModel:function(n){this._executeOnPristineForModel(n,function(n,t){t.splice(n,1)})},_readData:function(n){var t=this._isServerGrouped()?this.reader.groups:this.reader.data;return t(n)},_eachPristineItem:function(n){this._eachItem(this._pristineData,n)},_eachItem:function(n,t){n&&n.length&&(this._isServerGrouped()?bi(n,t):t(n))},_pristineForModel:function(n){var r,i,u=function(u){return i=di(u,n),i>-1?(r=u[i],!0):t};return this._eachPristineItem(u),r},_cancelModel:function(n){var t,i=this._pristineForModel(n);this._eachItem(this._data,function(r){t=gi(r,n);-1!=t&&(!n.isNew()&&i?r[t].accept(i):r.splice(t,1))})},_promise:function(t,i,r){var u=this,f=u.transport;return n.Deferred(function(n){u.trigger(ft,{type:r});f[r].call(f,e({success:function(t){n.resolve({response:t,models:i,type:r})},error:function(t,i,r){n.reject(t);u.error(t,i,r)}},t))}).promise()},_send:function(n,t){var i,f,r=this,u=[],e=r.reader.serialize(gr(t));if(r.options.batch)t.length&&u.push(r._promise({data:{models:e}},t,n));else for(i=0,f=t.length;f>i;i++)u.push(r._promise({data:e[i]},[t[i]],n));return u},read:function(n){var t=this,i=t._params(n);t._queueRequest(i,function(){t.trigger(ft,{type:"read"})?t._dequeueRequest():(t.trigger(oi),t._ranges=[],t.transport.read({data:i,success:c(t.success,t),error:c(t.error,t)}))})},success:function(n){var i=this,r=i.options;return i.trigger(it,{response:n,type:"read"}),n=i.reader.parse(n),i._handleCustomErrors(n)?(i._dequeueRequest(),t):(i._total=i.reader.total(n),i._pristineTotal=i._total,i._aggregate&&r.serverAggregates&&(i._aggregateResult=i.reader.aggregates(n)),n=i._readData(n),i._pristineData=n.slice(0),i._data=i._observe(n),i._addRange(i._data),i._process(i._data),i._dequeueRequest(),t)},_addRange:function(n){var t=this,i=t._skip||0,r=i+t._flatData(n).length;t._ranges.push({start:i,end:r,data:n});t._ranges.sort(function(n,t){return n.start-t.start})},error:function(n,t,i){this._dequeueRequest();this.trigger(it,{});this.trigger(p,{xhr:n,status:t,errorThrown:i})},_params:function(n){var t=this,i=e({take:t.take(),skip:t.skip(),page:t.page(),pageSize:t.pageSize(),sort:t._sort,filter:t._filter,group:t._group,aggregate:t._aggregate},n);return t.options.serverPaging||(delete i.take,delete i.skip,delete i.page,delete i.pageSize),t.options.serverGrouping?t.reader.model&&i.group&&(i.group=st(i.group,t.reader.model)):delete i.group,t.options.serverFiltering?t.reader.model&&i.filter&&(i.filter=ir(i.filter,t.reader.model)):delete i.filter,t.options.serverSorting?t.reader.model&&i.sort&&(i.sort=st(i.sort,t.reader.model)):delete i.sort,t.options.serverAggregates?t.reader.model&&i.aggregate&&(i.aggregate=st(i.aggregate,t.reader.model)):delete i.aggregate,i},_queueRequest:function(n,i){var r=this;r._requestInProgress?r._pending={callback:c(i,r),options:n}:(r._requestInProgress=!0,r._pending=t,i())},_dequeueRequest:function(){var n=this;n._requestInProgress=!1;n._pending&&n._queueRequest(n._pending.options,n._pending.callback)},_handleCustomErrors:function(n){if(this.reader.errors){var t=this.reader.errors(n);if(t)return this.trigger(p,{xhr:null,status:"customerror",errorThrown:"custom error",errors:t}),!0}return!1},_observe:function(n){var t=this,i=t.reader.model,u=!1;return i&&n.length&&(u=!(n[0]instanceof i)),n instanceof w?u&&(n.type=t.reader.model,n.wrapAll(n,n)):(n=new w(n,t.reader.model),n.parent=function(){return t.parent()}),t._isServerGrouped()&&wi(n,i),t._changeHandler&&t._data&&t._data instanceof w?t._data.unbind(r,t._changeHandler):t._changeHandler=c(t._change,t),n.bind(r,t._changeHandler)},_change:function(n){var r,f,u,t=this,i=n?n.action:"";if("remove"===i)for(r=0,f=n.items.length;f>r;r++)n.items[r].isNew&&n.items[r].isNew()||t._destroyed.push(n.items[r]);!t.options.autoSync||"add"!==i&&"remove"!==i&&"itemchange"!==i?(u=parseInt(t._total||t._pristineTotal,10),"add"===i?u+=n.items.length:"remove"===i?u-=n.items.length:"itemchange"===i||"sync"===i||t.options.serverPaging?"sync"===i&&(u=t._pristineTotal=parseInt(t._total,10)):u=t._pristineTotal,t._total=u,t._process(t._data,n)):t.sync()},_process:function(n,i){var o,f=this,e={};f.options.serverPaging!==!0&&(e.skip=f._skip,e.take=f._take||f._pageSize,e.skip===t&&f._page!==t&&f._pageSize!==t&&(e.skip=(f._page-1)*f._pageSize));f.options.serverSorting!==!0&&(e.sort=f._sort);f.options.serverFiltering!==!0&&(e.filter=f._filter);f.options.serverGrouping!==!0&&(e.group=f._group);f.options.serverAggregates!==!0&&(e.aggregate=f._aggregate,f._aggregateResult=ai(n,e));o=u.process(n,e);f._view=o.data;o.total===t||f.options.serverFiltering||(f._total=o.total);i=i||{};i.items=i.items||f._view;f.trigger(r,i)},_mergeState:function(n){var i=this;return n!==t&&(i._pageSize=n.pageSize,i._page=n.page,i._sort=n.sort,i._filter=n.filter,i._group=n.group,i._aggregate=n.aggregate,i._skip=n.skip,i._take=n.take,i._skip===t&&(i._skip=i.skip(),n.skip=i.skip()),i._take===t&&i._pageSize!==t&&(i._take=i._pageSize,n.take=i._take),n.sort&&(i._sort=n.sort=rt(n.sort)),n.filter&&(i._filter=n.filter=ot(n.filter)),n.group&&(i._group=n.group=ut(n.group)),n.aggregate&&(i._aggregate=n.aggregate=br(n.aggregate))),n},query:function(n){var f,i=this,e=i.options.serverSorting||i.options.serverPaging||i.options.serverFiltering||i.options.serverGrouping||i.options.serverAggregates;e||(i._data===t||0===i._data.length)&&!i._destroyed.length?i.read(i._mergeState(n)):i.trigger(ft,{type:"read"})||(i.trigger(oi),f=u.process(i._data,i._mergeState(n)),i.options.serverFiltering||(i._total=f.total!==t?f.total:i._data.length),i._view=f.data,i._aggregateResult=ai(i._data,n),i.trigger(it,{}),i.trigger(r,{items:f.data}))},fetch:function(t){var i=this;return n.Deferred(function(n){var f=function(r){i.unbind(p,u);n.resolve();t&&t.call(i,r)},u=function(t){n.reject(t)};i.one(r,f);i.one(p,u);i._query()}).promise()},_query:function(n){var t=this;t.query(e({},{page:t.page(),pageSize:t.pageSize(),sort:t.sort(),filter:t.filter(),group:t.group(),aggregate:t.aggregate()},n))},next:function(n){var i=this,r=i.page(),u=i.total();return n=n||{},!r||u&&r+1>i.totalPages()?t:(i._skip=r*i.take(),r+=1,n.page=r,i._query(n),r)},prev:function(n){var i=this,r=i.page();return n=n||{},r&&1!==r?(i._skip=i._skip-i.take(),r-=1,n.page=r,i._query(n),r):t},page:function(n){var r,i=this;return n!==t?(n=f.max(f.min(f.max(n,1),i.totalPages()),1),i._query({page:n}),t):(r=i.skip(),r!==t?f.round((r||0)/(i.take()||1))+1:t)},pageSize:function(n){var i=this;return n!==t?(i._query({pageSize:n,page:1}),t):i.take()},sort:function(n){var i=this;return n!==t?(i._query({sort:n}),t):i._sort},filter:function(n){var i=this;return n===t?i._filter:(i._query({filter:n,page:1}),t)},group:function(n){var i=this;return n!==t?(i._query({group:n}),t):i._group},total:function(){return parseInt(this._total||0,10)},aggregate:function(n){var i=this;return n!==t?(i._query({aggregate:n}),t):i._aggregate},aggregates:function(){return this._aggregateResult},totalPages:function(){var n=this,t=n.pageSize()||n.total();return f.ceil((n.total()||0)/t)},inRange:function(n,t){var i=this,r=f.min(n+t,i.total());return!i.options.serverPaging&&i.data.length>0?!0:i._findRange(n,r).length>0},lastRange:function(){var n=this._ranges;return n[n.length-1]||{start:0,end:0,data:[]}},firstItemUid:function(){var n=this._ranges;return n.length&&n[0].data.length&&n[0].data[0].uid},range:function(n,i){var r,e,u,o,s,h,c;if(n=f.min(n||0,this.total()),r=this,e=f.max(f.floor(n/i),0)*i,u=f.min(e+i,r.total()),o=r._findRange(n,f.min(n+i,r.total())),o.length){r._skip=n>r.skip()?f.min(u,(r.totalPages()-1)*r.take()):e;r._take=i;s=r.options.serverPaging;h=r.options.serverSorting;c=r.options.serverFiltering;try{r.options.serverPaging=!0;r._isServerGrouped()||r.group()&&r.group().length||(r.options.serverSorting=!0);r.options.serverFiltering=!0;s&&(r._data=o=r._observe(o));r._process(o)}finally{r.options.serverPaging=s;r.options.serverSorting=h;r.options.serverFiltering=c}}else i!==t&&(r._rangeExists(e,u)?n>e&&r.prefetch(u,i,function(){r.range(n,i)}):r.prefetch(e,i,function(){n>e&&u<r.total()&&!r._rangeExists(u,f.min(u+i,r.total()))?r.prefetch(u,i,function(){r.range(n,i)}):r.range(n,i)}))},_findRange:function(n,i){for(var r,h,c,l,p,a,v,y,e,d,f=this,b=f._ranges,k=[],s=f.options,g=s.serverSorting||s.serverPaging||s.serverFiltering||s.serverGrouping||s.serverAggregates,o=0,w=b.length;w>o;o++)if(r=b[o],n>=r.start&&r.end>=n){for(e=0,h=o;w>h;h++)if(r=b[h],y=f._flatData(r.data),y.length&&n+e>=r.start&&(p=r.data,a=r.end,g||(d=ut(f.group()||[]).concat(rt(f.sort()||[])),v=u.process(r.data,{sort:d,filter:f.filter()}),y=p=v.data,v.total!==t&&(a=v.total)),c=0,n+e>r.start&&(c=n+e-r.start),l=y.length,a>i&&(l-=a-i),e+=l-c,k=f._mergeGroups(k,p,c,l),r.end>=i&&e==i-n))return k;break}return[]},_mergeGroups:function(n,t,i,r){if(this._isServerGrouped()){var u,f=t.toJSON();return n.length&&(u=n[n.length-1]),pt(u,f,i,r),n.concat(f)}return n.concat(t.slice(i,r))},skip:function(){var n=this;return n._skip===t?n._page!==t?(n._page-1)*(n.take()||1):t:n._skip},take:function(){return this._take||this._pageSize},_prefetchSuccessHandler:function(n,t,i){var u=this;return function(f){var o,h,s,c=!1,e={start:n,end:t,data:[]};if(u._dequeueRequest(),u.trigger(it,{response:f,type:"read"}),f=u.reader.parse(f),s=u._readData(f),s.length){for(o=0,h=u._ranges.length;h>o;o++)if(u._ranges[o].start===n){c=!0;e=u._ranges[o];break}c||u._ranges.push(e)}e.data=u._observe(s);e.end=e.start+u._flatData(e.data).length;u._ranges.sort(function(n,t){return n.start-t.start});u._total=u.reader.total(f);i&&s.length?i():u.trigger(r,{})}},prefetch:function(n,t,i){var r=this,u=f.min(n+t,r.total()),e={take:t,skip:n,page:n/t+1,pageSize:t,sort:r._sort,filter:r._filter,group:r._group,aggregate:r._aggregate};r._rangeExists(n,u)?i&&i():(clearTimeout(r._timeout),r._timeout=setTimeout(function(){r._queueRequest(e,function(){r.trigger(ft,{type:"read"})?r._dequeueRequest():r.transport.read({data:r._params(e),success:r._prefetchSuccessHandler(n,u,i)})})},100))},_rangeExists:function(n,t){for(var f=this,r=f._ranges,i=0,u=r.length;u>i;i++)if(n>=r[i].start&&r[i].end>=t)return!0;return!1},_removeModelFromRanges:function(n){for(var i,r,u,t=0,f=this._ranges.length;f>t&&(u=this._ranges[t],this._eachItem(u.data,function(t){i=ki(t,n);i&&(r=!0)}),!r);t++);},_updateRangesLength:function(){for(var n,i,u=0,t=0,r=this._ranges.length;r>t;t++)n=this._ranges[t],n.start=n.start-u,i=this._flatData(n.data).length,u=n.end-i,n.end=n.start+i}});ni={};ni.create=function(n,t){var u,r=n.transport;return r?(r.read=typeof r.read===o?{url:r.read}:r.read,n.type&&(i.data.transports[n.type]&&!k(i.data.transports[n.type])?u=new i.data.transports[n.type](e(r,{data:t})):r=e(!0,{},i.data.transports[n.type],r),n.schema=e(!0,{},i.data.schemas[n.type],n.schema)),u||(u=a(r.read)?r:new dt(r))):u=new kt({data:n.data}),u};h.create=function(n){(l(n)||n instanceof w)&&(n={data:n});var u,a,f,t=n||{},o=t.data,r=t.fields,s=t.table,v=t.select,c={};if(o||!r||t.transport||(s?o=iu(s,r):v&&(o=tu(v,r))),i.data.Model&&r&&(!t.schema||!t.schema.model)){for(u=0,a=r.length;a>u;u++)f=r[u],f.type&&(c[f.field]=f);nt(c)||(t.schema=e(!0,t.schema,{model:{fields:c}}))}return t.data=o,s=null,t.table=null,t instanceof h?t:new h(t)};ti=v.define({init:function(n){var t=this,r=t.hasChildren||n&&n.hasChildren,f="items",u={};i.data.Model.fn.init.call(t,n);typeof t.children===o&&(f=t.children);u={schema:{data:f,model:{hasChildren:r,id:t.idField}}};typeof t.children!==o&&e(u,t.children);u.data=n;r||(r=u.schema.data);typeof r===o&&(r=i.getter(r));a(r)&&(t.hasChildren=!!r.call(t,t));t._childrenOptions=u;t.hasChildren&&t._initChildren();t._loaded=!(!n||!n[f]&&!n._loaded)},_initChildren:function(){var t,i,u,n=this;n.children instanceof b||(t=n.children=new b(n._childrenOptions),i=t.transport,u=i.parameterMap,i.parameterMap=function(t){return t[n.idField||"id"]=n.id,u&&(t=u(t)),t},t.parent=function(){return n},t.bind(r,function(t){t.node=t.node||n;n.trigger(r,t)}),t.bind(p,function(t){var i=n.parent();i&&(t.node=t.node||n,i.trigger(p,t))}),n._updateChildrenField())},append:function(n){this._initChildren();this.loaded(!0);this.children.add(n)},hasChildren:!1,level:function(){for(var n=this.parentNode(),t=0;n&&n.parentNode;)t++,n=n.parentNode?n.parentNode():null;return t},_updateChildrenField:function(){var n=this._childrenOptions.schema.data;this[n||"items"]=this.children.data()},_childrenLoaded:function(){this._loaded=!0;this._updateChildrenField()},load:function(){var n,i={},u="_query";this.hasChildren?(this._initChildren(),n=this.children,i[this.idField||"id"]=this.id,this._loaded||(n._data=t,u="read"),n.one(r,c(this._childrenLoaded,this)),n[u](i)):this.loaded(!0)},parentNode:function(){var n=this.parent();return n.parent()},loaded:function(n){return n===t?this._loaded:(this._loaded=n,t)},shouldSerialize:function(n){return v.fn.shouldSerialize.call(this,n)&&"children"!==n&&"_loaded"!==n&&"hasChildren"!==n&&"_childrenOptions"!==n}});b=h.extend({init:function(n){var t=ti.define({children:n});h.fn.init.call(this,e(!0,{},{schema:{modelBase:t,model:t}},n));this._attachBubbleHandlers()},_attachBubbleHandlers:function(){var n=this;n._data.bind(p,function(t){n.trigger(p,t)})},remove:function(n){var r,t=n.parentNode(),i=this;return t&&t._initChildren&&(i=t.children),r=h.fn.remove.call(i,n),t&&!i.data().length&&(t.hasChildren=!1),r},success:rr("success"),data:rr("data"),insert:function(n,t){var i=this.parent();return i&&i._initChildren&&(i.hasChildren=!0,i._initChildren()),h.fn.insert.call(this,n,t)},_find:function(n,t){var i,e,r,u,f;if(r=h.fn[n].call(this,t))return r;if(u=this._flatData(this.data()))for(i=0,e=u.length;e>i;i++)if(f=u[i].children,f instanceof b&&(r=f[n](t)))return r},get:function(n){return this._find("get",n)},getByUid:function(n){return this._find("getByUid",n)}});b.create=function(n){n=n&&n.push?{data:n}:n;var t=n||{},i=t.data,r=t.fields,u=t.list;return i&&i._dataSource?i._dataSource:(i||!r||t.transport||u&&(i=ur(u,r)),t.data=i,t instanceof b?t:new b(t))};ii=i.Observable.extend({init:function(n,t,r){i.Observable.fn.init.call(this);this._prefetching=!1;this.dataSource=n;this.prefetch=!r;var u=this;n.bind("change",function(){u._change()});this._syncWithDataSource();this.setViewSize(t)},setViewSize:function(n){this.viewSize=n;this._recalculate()},at:function(n){var i,u,r=this.pageSize;return n>=this.total()?(this.trigger("endreached",{index:n}),t):this.useRanges?(this.useRanges&&((this.dataOffset>n||n>this.skip+r)&&(u=Math.floor(n/r)*r,this.range(u)),n===this.prefetchThreshold&&this._prefetch(),n===this.midPageThreshold?this.range(this.nextMidRange):n===this.nextPageThreshold?this.range(this.nextFullRange):n===this.pullBackThreshold&&(this.offset===this.skip?this.range(this.previousMidRange):this.range(this.previousFullRange)),i=this.dataSource.at(n-this.dataOffset)),i===t&&this.trigger("endreached",{index:n}),i):this.dataSource.view()[n]},indexOf:function(n){return this.dataSource.data().indexOf(n)+this.dataOffset},total:function(){return parseInt(this.dataSource.total(),10)},next:function(){var n=this,t=n.pageSize,i=n.skip-n.viewSize,r=f.max(f.floor(i/t),0)*t+t;this.offset=i;this.dataSource.prefetch(r,t,function(){n._goToRange(i,!0)})},range:function(n){if(this.offset!==n){var r=this,t=this.pageSize,u=f.max(f.floor(n/t),0)*t+t,i=this.dataSource;this.offset=n;this._recalculate();i.inRange(n,t)?this._goToRange(n):this.prefetch&&i.prefetch(u,t,function(){r._goToRange(n,!0)})}},syncDataSource:function(){var n=this.offset;this.offset=null;this.range(n)},destroy:function(){this.unbind()},_prefetch:function(){var i=this,n=this.pageSize,t=this.skip+n,r=this.dataSource;r.inRange(t,n)||this._prefetching||!this.prefetch||(this._prefetching=!0,this.trigger("prefetching",{skip:t,take:n}),r.prefetch(t,n,function(){i._prefetching=!1;i.trigger("prefetched",{skip:t,take:n})}))},_goToRange:function(n,t){this.offset===n&&(this.dataOffset=n,this._expanding=t,this.dataSource.range(n,this.pageSize))},_change:function(){var n=this.dataSource,t=n.firstItemUid();this.length=this.useRanges?n.lastRange().end:n.view().length;this._firstItemUid===t&&this.useRanges||(this._syncWithDataSource(),this._recalculate(),this.trigger("reset",{offset:this.offset}));this.trigger("resize");this._expanding&&this.trigger("expand");delete this._expanding},_syncWithDataSource:function(){var n=this.dataSource;this._firstItemUid=n.firstItemUid();this.dataOffset=this.offset=n.skip()||0;this.pageSize=n.pageSize();this.useRanges=n.options.serverPaging},_recalculate:function(){var t=this.pageSize,r=this.offset,i=this.viewSize,n=Math.ceil(r/t)*t;this.skip=n;this.midPageThreshold=n+t-1;this.nextPageThreshold=n+i-1;this.prefetchThreshold=n+Math.floor(t/3*2);this.pullBackThreshold=this.offset-1;this.nextMidRange=n+t-i;this.nextFullRange=n;this.previousMidRange=r-i;this.previousFullRange=n-t}});hr=i.Observable.extend({init:function(n,t){var r=this;i.Observable.fn.init.call(r);this.dataSource=n;this.batchSize=t;this._total=0;this.buffer=new ii(n,3*t);this.buffer.bind({endreached:function(n){r.trigger("endreached",{index:n.index})},prefetching:function(n){r.trigger("prefetching",{skip:n.skip,take:n.take})},prefetched:function(n){r.trigger("prefetched",{skip:n.skip,take:n.take})},reset:function(){r._total=0;r.trigger("reset")},resize:function(){r._total=Math.ceil(this.length/r.batchSize);r.trigger("resize",{total:r.total(),offset:this.offset})}})},syncDataSource:function(){this.buffer.syncDataSource()},at:function(n){var u,i,r=this.buffer,f=n*this.batchSize,o=this.batchSize,e=[];for(r.offset>f&&r.at(r.offset-1),i=0;o>i&&(u=r.at(f+i),u!==t);i++)e.push(u);return e},total:function(){return this._total},destroy:function(){this.buffer.destroy();this.unbind()}});e(!0,i.data,{readers:{json:gt},Query:u,DataSource:h,HierarchicalDataSource:b,Node:ti,ObservableObject:s,ObservableArray:w,LocalTransport:kt,RemoteTransport:dt,Cache:g,DataReader:gt,Model:v,Buffer:ii,BatchBuffer:hr})}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(n,t){t()});!function(n,t){t(["./kendo.core.min"],n)}(function(){return function(n){function s(t,i){return t===i||n.contains(t,i)}var t=window.kendo,rt=t.ui,p=rt.Widget,f=t.support,r=t.getOffset,at=t._activeElement,w="open",b="close",ut="deactivate",ft="activate",u="center",et="left",h="right",k="top",c="bottom",d="absolute",ot="hidden",l="body",g="location",e="position",st="visible",ht="effects",ct="k-state-active",a="k-state-border",vt=/k-state-border-(\w+)/,lt=".k-picker-wrap, .k-dropdown-wrap, .k-link",v="down",nt=n(window),tt=n(document.documentElement),y="resize scroll",yt=f.transitions.css,pt=yt+"transform",i=n.extend,o=".kendoPopup",it=["font-size","font-family","font-stretch","font-style","font-weight","line-height"],wt=p.extend({init:function(r,u){var e,f=this;u=u||{};u.isRtl&&(u.origin=u.origin||c+" "+h,u.position=u.position||k+" "+h);p.fn.init.call(f,r,u);r=f.element;u=f.options;f.collisions=u.collision?u.collision.split(" "):[];1===f.collisions.length&&f.collisions.push(f.collisions[0]);e=n(f.options.anchor).closest(".k-popup,.k-group").filter(":not([class^=km-])");u.appendTo=n(n(u.appendTo)[0]||e[0]||l);f.element.hide().addClass("k-popup k-group k-reset").toggleClass("k-rtl",!!u.isRtl).css({position:d}).appendTo(u.appendTo).on("mouseenter"+o,function(){f._hovered=!0}).on("mouseleave"+o,function(){f._hovered=!1});f.wrapper=n();u.animation===!1&&(u.animation={open:{effects:{}},close:{hide:!0,effects:{}}});i(u.animation.open,{complete:function(){f.wrapper.css({overflow:st});f.trigger(ft)}});i(u.animation.close,{complete:function(){f.wrapper.hide();var i,e,o=f.wrapper.data(g),s=n(u.anchor);o&&f.wrapper.css(o);u.anchor!=l&&(i=(s[0].className.match(vt)||["","down"])[1],e=a+"-"+i,s.removeClass(e).children(lt).removeClass(ct).removeClass(e),r.removeClass(a+"-"+t.directions[i].reverse));f._closing=!1;f.trigger(ut)}});f._mousedownProxy=function(n){f._mousedown(n)};f._resizeProxy=function(n){f._resize(n)};u.toggleTarget&&n(u.toggleTarget).on(u.toggleEvent+o,n.proxy(f.toggle,f))},events:[w,ft,b,ut],options:{name:"Popup",toggleEvent:"click",origin:c+" "+et,position:k+" "+et,anchor:l,collision:"flip fit",viewport:window,copyAnchorStyles:!0,autosize:!1,modal:!1,animation:{open:{effects:"slideIn:down",transition:!0,duration:200},close:{duration:100,hide:!0}}},destroy:function(){var u,i=this,r=i.options,f=i.element.off(o);p.fn.destroy.call(i);r.toggleTarget&&n(r.toggleTarget).off(o);r.modal||(tt.unbind(v,i._mousedownProxy),nt.unbind(y,i._resizeProxy));t.destroy(i.element.children());f.removeData();r.appendTo[0]===document.body&&(u=f.parent(".k-animation-container"),u[0]?u.remove():f.remove())},open:function(r,u){var s,p,g,o=this,ut={isFixed:!isNaN(parseInt(u,10)),x:r,y:u},h=o.element,c=o.options,b="down",rt=n(c.anchor),ft=h[0]&&h.hasClass("km-widget");if(!o.visible()){if(c.copyAnchorStyles&&(ft&&"font-size"==it[0]&&it.shift(),h.css(t.getComputedStyles(rt[0],it))),h.data("animating")||o.trigger(w))return;c.modal||(tt.unbind(v,o._mousedownProxy).bind(v,o._mousedownProxy),f.mobileOS.ios||f.mobileOS.android||nt.unbind(y,o._resizeProxy).bind(y,o._resizeProxy));o.wrapper=p=t.wrap(h,c.autosize).css({overflow:ot,display:"block",position:d});f.mobileOS.android&&p.add(rt).css(pt,"translatez(0)");p.css(e);n(c.appendTo)[0]==document.body&&p.css(k,"-10000px");s=i(!0,{},c.animation.open);o.flipped=o._position(ut);s.effects=t.parseEffects(s.effects,o.flipped);b=s.effects.slideIn?s.effects.slideIn.direction:b;c.anchor!=l&&(g=a+"-"+b,h.addClass(a+"-"+t.directions[b].reverse),rt.addClass(g).children(lt).addClass(ct).addClass(g));h.data(ht,s.effects).kendoStop(!0).kendoAnimate(s)}},toggle:function(){var n=this;n[n.visible()?b:w]()},visible:function(){return this.element.is(":"+st)},close:function(){var o,u,f,e,r=this,s=r.options;if(r.visible()){if(o=r.wrapper[0]?r.wrapper:t.wrap(r.element).hide(),r._closing||r.trigger(b))return;r.element.find(".k-popup").each(function(){var i=n(this),t=i.data("kendoPopup");t&&t.close()});tt.unbind(v,r._mousedownProxy);nt.unbind(y,r._resizeProxy);u=i(!0,{},s.animation.close);f=r.element.data(ht);e=u.effects;!e&&!t.size(e)&&f&&t.size(f)&&(u.effects=f,u.reverse=!0);r._closing=!0;r.element.kendoStop(!0);o.css({overflow:ot});r.element.kendoAnimate(u)}},_resize:function(n){var t=this;"resize"===n.type?(clearTimeout(t._resizeTimeout),t._resizeTimeout=setTimeout(function(){t._position();t._resizeTimeout=null},50)):t._hovered||s(t.element[0],at())||t.close()},_mousedown:function(i){var u=this,h=u.element[0],e=u.options,c=n(e.anchor)[0],o=e.toggleTarget,f=t.eventTarget(i),r=n(f).closest(".k-popup"),l=r.parent().parent(".km-shim").length;r=r[0];(l||!r||r===u.element[0])&&"popover"!==n(i.target).closest("a").data("rel")&&(s(h,f)||s(c,f)||o&&s(n(o)[0],f)||u.close())},_fit:function(n,t,i){var r=0;return n+t>i&&(r=i-(n+t)),0>n&&(r=-n),r},_flip:function(n,t,i,r,f,e,o){var s=0;return o=o||t,e!==f&&e!==u&&f!==u&&(n+o>r&&(s+=-(i+t)),0>n+s&&(s+=i+t)),s},_position:function(t){var v,tt,c,ht,it,rt,y,h,ct,a,s,ut,o=this,lt=n(document.documentElement),ft=o.element.css(e,""),u=o.wrapper,p=o.options,w=n(p.viewport),at=w.offset(),l=n(p.anchor),et=p.origin.toLowerCase().split(" "),ot=p.position.toLowerCase().split(" "),b=o.collisions,k=f.zoomLevel(),nt=10002,st=0;if(lt.css({overflowX:"hidden",overflowY:"hidden"}),it=w.width(),rt=w.height(),lt.css({overflowX:"",overflowY:""}),v=l.parents().filter(u.siblings()),v[0])if(c=+n(v).css("zIndex"))nt=c+1;else for(tt=l.parentsUntil(v),ht=tt.length;ht>st;st++)c=+n(tt[st]).css("zIndex"),c&&c>nt&&(nt=c+1);return u.css("zIndex",nt),t&&t.isFixed?u.css({left:t.x,top:t.y}):u.css(o._align(et,ot)),y=r(u,e,l[0]===u.offsetParent()[0]),h=r(u),ct=l.offsetParent().parent(".k-animation-container,.k-popup,.k-group"),ct.length&&(y=r(u,e,!0),h=r(u)),w[0]===window?(h.top-=window.pageYOffset||document.documentElement.scrollTop||0,h.left-=window.pageXOffset||document.documentElement.scrollLeft||0):(h.top-=at.top,h.left-=at.left),o.wrapper.data(g)||u.data(g,i({},y)),a=i({},h),s=i({},y),"fit"===b[0]&&(s.top+=o._fit(a.top,u.outerHeight(),rt/k)),"fit"===b[1]&&(s.left+=o._fit(a.left,u.outerWidth(),it/k)),ut=i({},s),"flip"===b[0]&&(s.top+=o._flip(a.top,ft.outerHeight(),l.outerHeight(),rt/k,et[0],ot[0],u.outerHeight())),"flip"===b[1]&&(s.left+=o._flip(a.left,ft.outerWidth(),l.outerWidth(),it/k,et[1],ot[1],u.outerWidth())),ft.css(e,d),u.css(s),s.left!=ut.left||s.top!=ut.top},_align:function(t,i){var s,l=this,v=l.wrapper,a=n(l.options.anchor),y=t[0],p=t[1],w=i[0],b=i[1],k=r(a),d=n(l.options.appendTo),g=v.outerWidth(),nt=v.outerHeight(),tt=a.outerWidth(),it=a.outerHeight(),f=k.top,e=k.left,o=Math.round;return d[0]!=document.body&&(s=r(d),f-=s.top,e-=s.left),y===c&&(f+=it),y===u&&(f+=o(it/2)),w===c&&(f-=nt),w===u&&(f-=o(nt/2)),p===h&&(e+=tt),p===u&&(e+=o(tt/2)),b===h&&(e-=g),b===u&&(e-=o(g/2)),{top:f,left:e}}});rt.plugin(wt)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(n,t){t()});!function(n,t){t(["./kendo.data.min","./kendo.popup.min"],n)}(function(){return function(n,t){function l(t,i){t.filters&&(t.filters=n.grep(t.filters,function(n){return l(n,i),n.filters?n.filters.length:n.field!=i}))}var i=window.kendo,a=i.ui,o=a.Widget,f=i.keys,u=i.support,ut=i.htmlEncode,ft=i._activeElement,s="id",v="li",r="change",b="k-state-focused",y="k-state-hover",k="k-loading",p="open",d="close",g="select",w="selected",nt="progress",tt="requestEnd",it="width",rt=n.extend,e=n.proxy,h=u.browser,et=h.msie&&9>h.version,ot=/"/g,st={ComboBox:"DropDownList",DropDownList:"ComboBox"},c=o.extend({init:function(t,i){var f,r=this,h=r.ns;o.fn.init.call(r,t,i);t=r.element;r._isSelect=t.is(g);r._template();r.ul=n('<ul unselectable="on" class="k-list k-reset"/>').css({overflow:u.kineticScrollNeeded?"":"auto"}).on("mouseenter"+h,v,function(){n(this).addClass(y)}).on("mouseleave"+h,v,function(){n(this).removeClass(y)}).on("click"+h,v,e(r._click,r)).attr({tabIndex:-1,role:"listbox","aria-hidden":!0});r.list=n("<div class='k-list-container'/>").append(r.ul).on("mousedown"+h,function(n){n.preventDefault()});f=t.attr(s);f&&(r.list.attr(s,f+"-list"),r.ul.attr(s,f+"_listbox"),r._optionID=f+"_option_selected");r._header();r._accessors();r._initValue()},options:{valuePrimitive:!1,headerTemplate:""},setOptions:function(n){o.fn.setOptions.call(this,n);n&&n.enable!==t&&(n.enabled=n.enable)},focus:function(){this._focused.focus()},readonly:function(n){this._editable({readonly:n===t?!0:n,disable:!1})},enable:function(n){this._editable({readonly:!1,disable:!(n=n===t?!0:n)})},_filterSource:function(n){var i=this,u=i.options,r=i.dataSource,t=r.filter()||{};l(t,u.dataTextField);n&&(t=t.filters||[],t.push(n));r.filter(t)},_header:function(){var i,t=this.options.headerTemplate;n.isFunction(t)&&(t=t({}));t&&(this.list.prepend(t),i=this.ul.prev(),this.header=i[0]?i:null)},_initValue:function(){var n=this,t=n.options.value;null!==t?n.element.val(t):(t=n._accessor(),n.options.value=t);n._old=t},_ignoreCase:function(){var n,t=this,i=t.dataSource.reader.model;i&&i.fields&&(n=i.fields[t.options.dataTextField],n&&n.type&&"string"!==n.type&&(t.options.ignoreCase=!1))},items:function(){return this.ul[0].children},current:function(n){var i=this,r=i._optionID;return n===t?i._current:(i._current&&(i._current.removeClass(b).removeAttr("aria-selected").removeAttr(s),i._focused.removeAttr("aria-activedescendant")),n&&(n.addClass(b),i._scroll(n),r&&(n.attr("id",r),i._focused.attr("aria-activedescendant",r))),i._current=n,t)},destroy:function(){var n=this,t=n.ns;o.fn.destroy.call(n);n._unbindDataSource();n.ul.off(t);n.list.off(t);n._touchScroller&&n._touchScroller.destroy();n.popup.destroy();n._form&&n._form.off("reset",n._resetHandler)},dataItem:function(n){var i=this;return n===t&&(n=i.selectedIndex),i._data()[n]},_accessors:function(){var n=this,r=n.element,t=n.options,u=i.getter,f=r.attr(i.attr("text-field")),e=r.attr(i.attr("value-field"));f&&(t.dataTextField=f);e&&(t.dataValueField=e);n._text=u(t.dataTextField);n._value=u(t.dataValueField)},_aria:function(n){var i=this,r=i.options,u=i._focused;r.suggest!==t&&u.attr("aria-autocomplete",r.suggest?"both":"list");n=n?n+" "+i.ul[0].id:i.ul[0].id;u.attr("aria-owns",n);i.ul.attr("aria-live",r.filter&&"none"!==r.filter?"polite":"off")},_blur:function(){var n=this;n._change();n.close()},_change:function(){var i,n=this,u=n.selectedIndex,e=n.options.value,f=n.value();n._isSelect&&!n._bound&&e&&(f=e);f!==n._old?i=!0:u!==t&&u!==n._oldIndex&&(i=!0);i&&(n._old=f,n._oldIndex=u,n.trigger(r),n.element.trigger(r))},_click:function(t){t.isDefaultPrevented()||this._accept(n(t.currentTarget))},_data:function(){return this.dataSource.view()},_enable:function(){var n=this,i=n.options,r=n.element.is("[disabled]");i.enable!==t&&(i.enabled=i.enable);!i.enabled||r?n.enable(!1):n.readonly(n.element.is("[readonly]"))},_focus:function(n){var i=this;return i.popup.visible()&&n&&i.trigger(g,{item:n})?(i.close(),t):(i._select(n),i._triggerCascade(!0),i._blur(),t)},_index:function(n){for(var r=this,u=r._data(),t=0,i=u.length;i>t;t++)if(r._dataValue(u[t])==n)return t;return-1},_dataValue:function(n){var i=this._value(n);return i===t&&(i=this._text(n)),i},_height:function(n){if(n){var r,t=this,u=t.list,e=t.popup.visible(),i=t.options.height,f=t.header;r=u.add(u.parent(".k-animation-container")).show();i=t.ul[0].scrollHeight>i?i:"auto";r.height(i);f&&t.ul.height("auto"==i?i:u.height()-f.height());e||r.hide()}},_adjustListWidth:function(){var n,i,t=this.list,r=t[0].style.width,u=this.wrapper;if(t.data(it)||!r)return n=window.getComputedStyle?window.getComputedStyle(u[0],null):0,i=n?parseFloat(n.width):u.outerWidth(),n&&(h.mozilla||h.msie)&&(i+=parseFloat(n.paddingLeft)+parseFloat(n.paddingRight)+parseFloat(n.borderLeftWidth)+parseFloat(n.borderRightWidth)),r="border-box"!==t.css("box-sizing")?i-(t.outerWidth()-t.width()):i,t.css({fontFamily:u.css("font-family"),width:r}).data(it,r),!0},_popup:function(){var n=this,e=n.list,t=n._focused,r=n.options,f=n.wrapper;n.popup=new a.Popup(e,rt({},r.popup,{anchor:f,open:function(i){n._adjustListWidth();n.trigger(p)?i.preventDefault():(t.attr("aria-expanded",!0),n.ul.attr("aria-hidden",!1))},close:function(i){n.trigger(d)?i.preventDefault():(t.attr("aria-expanded",!1),n.ul.attr("aria-hidden",!0))},animation:r.animation,isRtl:u.isRtl(f)}));n.popup.one(p,function(){n._height(n._data().length)});n._touchScroller=i.touchScroller(n.popup.element)},_makeUnselectable:function(){et&&this.list.find("*").attr("unselectable","on")},_toggleHover:function(t){n(t.currentTarget).toggleClass(y,"mouseenter"===t.type)},_toggle:function(n){var i=this,r=u.touch&&u.MSPointers&&u.pointers;n=n!==t?n:!i.popup.visible();r||i._focused[0]===ft()||i._focused.focus();i[n?p:d]()},_scroll:function(n){if(n){n[0]&&(n=n[0]);var i,r,u=this.ul[0],t=n.offsetTop,o=n.offsetHeight,f=u.scrollTop,s=u.clientHeight,h=t+o,e=this._touchScroller;e?(i=e.dimensions.y,i.enabled&&t>i.size&&(t=t-i.size+o+4,e.scrollTo(0,-t))):(r=this.header?this.header.outerHeight():0,u.scrollTop=f>t?t-r:h>f+s?h-s-r:f)}},_template:function(){var t=this,n=t.options,r=n.template,u=n.dataSource;t._isSelect&&t.element[0].length&&(u||(n.dataTextField=n.dataTextField||"text",n.dataValueField=n.dataValueField||"value"));r?(r=i.template(r),t.template=function(n){return'<li tabindex="-1" role="option" unselectable="on" class="k-item">'+r(n)+"<\/li>"}):t.template=i.template('<li tabindex="-1" role="option" unselectable="on" class="k-item">${'+i.expr(n.dataTextField,"data")+"}<\/li>",{useWithBlock:!1})},_triggerCascade:function(n){var t=this,i=t.value();(!t._bound&&i||t._old!==i)&&t.trigger("cascade",{userTriggered:n})},_unbindDataSource:function(){var n=this;n.dataSource.unbind(r,n._refreshHandler).unbind(nt,n._progressHandler).unbind(tt,n._requestEndHandler).unbind("error",n._errorHandler)}});rt(c,{inArray:function(n,t){var i,r,u=t.children;if(!n||n.parentNode!==t)return-1;for(i=0,r=u.length;r>i;i++)if(n===u[i])return i;return-1}});i.ui.List=c;a.Select=c.extend({init:function(n,t){c.fn.init.call(this,n,t);this._initial=this.element.val()},setDataSource:function(n){this.options.dataSource=n;this._dataSource();this._bound=!1;this.options.autoBind&&this.dataSource.fetch()},close:function(){this.popup.close()},select:function(n){var i=this;return n===t?i.selectedIndex:(i._select(n),i._triggerCascade(),i._old=i._accessor(),i._oldIndex=i.selectedIndex,t)},_accessor:function(n,i){var u,r=this.element[0],e=this._isSelect,f=r.selectedIndex;return n===t?(e?f>-1&&(u=r.options[f],u&&(n=u.value)):n=r.value,n):(e?(f>-1&&r.options[f].removeAttribute(w),r.selectedIndex=i,u=r.options[i],u&&u.setAttribute(w,w)):r.value=n,t)},_hideBusy:function(){var n=this;clearTimeout(n._busy);n._arrow.removeClass(k);n._focused.attr("aria-busy",!1);n._busy=null},_showBusy:function(){var n=this;n._request=!0;n._busy||(n._busy=setTimeout(function(){n._focused.attr("aria-busy",!0);n._arrow.addClass(k)},100))},_requestEnd:function(){this._request=!1},_dataSource:function(){var o,t=this,s=t.element,f=t.options,u=f.dataSource||{};u=n.isArray(u)?{data:u}:u;t._isSelect&&(o=s[0].selectedIndex,o>-1&&(f.index=o),u.select=s,u.fields=[{field:f.dataTextField},{field:f.dataValueField}]);t.dataSource&&t._refreshHandler?t._unbindDataSource():(t._refreshHandler=e(t.refresh,t),t._progressHandler=e(t._showBusy,t),t._requestEndHandler=e(t._requestEnd,t),t._errorHandler=e(t._hideBusy,t));t.dataSource=i.data.DataSource.create(u).bind(r,t._refreshHandler).bind(nt,t._progressHandler).bind(tt,t._requestEndHandler).bind("error",t._errorHandler)},_get:function(t){var i,r,u=this,f=u._data();if("function"==typeof t)for(i=0,r=f.length;r>i;i++)if(t(f[i])){t=i;break}if("number"==typeof t){if(0>t)return n();t=n(u.ul[0].children[t])}return t&&t.nodeType&&(t=n(t)),t},_move:function(n){var u,o,t=this,e=n.keyCode,s=t.ul[0],c=t.popup.visible()?"_select":"_accept",i=t._current,h=e===f.DOWN;if(e===f.UP||h){if(n.altKey)t.toggle(h);else{if(u=s.firstChild,!u&&!t._accessor()&&"filter"!==t._state)return t._fetch||(t.dataSource.one(r,function(){t._move(n);t._fetch=!1}),t._fetch=!0,t._filterSource()),n.preventDefault(),!0;h?(!i||-1===t.selectedIndex&&!t.value()&&i[0]===u?i=u:(i=i[0].nextSibling,i||u!==s.lastChild||(i=u)),t[c](i)):(i=i?i[0].previousSibling:s.lastChild,i||u!==s.lastChild||(i=u),t[c](i))}n.preventDefault();o=!0}else e===f.ENTER||e===f.TAB?(t.popup.visible()&&n.preventDefault(),!t._typing&&(t.popup.visible()||i&&i.hasClass("k-state-selected"))||(i=null),t._accept(i),o=!0):e===f.ESC&&(t.popup.visible()&&n.preventDefault(),t.close(),o=!0);return o},_selectItem:function(){var u,r,n=this,f=n._bound===t,i=n.options;u=n._isSelect&&!n._initial&&!i.value&&i.index&&!n._bound;u||(r=n._selectedValue||f&&i.value||n._accessor());r?n.value(r):f&&n.select(i.index)},_fetchItems:function(n){var i=this,u=i.ul[0].firstChild;return i._request?!0:i._fetch||u?t:i.options.cascadeFrom?!u:(i.dataSource.one(r,function(){i._old=t;i.value(n);i._fetch=!1}),i._fetch=!0,i.dataSource.fetch(),!0)},_options:function(n,i){var u,e,o,r,s=this,c=s.element,l=n.length,h="",f=0;for(i&&(f=1,h=i);l>f;f++)u="<option",e=n[f],o=s._text(e),r=s._value(e),r!==t&&(r+="",-1!==r.indexOf('"')&&(r=r.replace(ot,"&quot;")),u+=' value="'+r+'"'),u+=">",o!==t&&(u+=ut(o)),u+="<\/option>",h+=u;c.html(h)},_reset:function(){var t=this,i=t.element,r=i.attr("form"),u=r?n("#"+r):i.closest("form");u[0]&&(t._resetHandler=function(){setTimeout(function(){t.value(t._initial)})},t._form=u.on("reset",t._resetHandler))},_cascade:function(){var i,f,e,o,s,t=this,u=t.options,h=u.cascadeFrom;if(h){if(t._selectedValue=u.value||t._accessor(),f=n("#"+h),i=f.data("kendo"+u.name),i||(i=f.data("kendo"+st[u.name])),!i)return;u.autoBind=!1;o=u.cascadeFromField||i.options.dataValueField;s=function(){t.dataSource.unbind(r,s);var n=t._selectedValue||t.value();t._userTriggered?t._clearSelection(i,!0):n?(t.value(n),t.dataSource.view()[0]&&-1!==t.selectedIndex||t._clearSelection(i,!0)):t.select(u.index);t.enable();t._triggerCascade(t._userTriggered);t._userTriggered=!1};e=function(){var n,u,f,h=i.dataItem(),e=h?i._value(h):null;e||0===e?(n=t.dataSource.filter()||{},l(n,o),u=n.filters||[],u.push({field:o,operator:"eq",value:e}),f=function(){t.dataSource.unbind(r,f);s.apply(t,arguments)},t.first("dataBound",f),t.dataSource.filter(u)):(t.enable(!1),t._clearSelection(i),t._triggerCascade(t._userTriggered),t._userTriggered=!1)};i.first("cascade",function(n){t._userTriggered=n.userTriggered;e()});i._bound?e():i.value()||t.enable(!1)}}})}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(n,t){t()});!function(n,t){t(["./kendo.list.min","./kendo.mobile.scroller.min"],n)}(function(){return function(n,t){function s(n,t,i){return i?t.substring(0,n).split(i).length-1:0}function g(n,t,i){return t.split(i)[s(n,t,i)]}function nt(n,t,i,r){var u=t.split(r);return u.splice(s(n,t,r),1,i),r&&""!==u[u.length-1]&&u.push(""),u.join(r)}var r=window.kendo,tt=r.support,f=r.caret,a=r._activeElement,v=tt.placeholder,y=r.ui,e=y.List,u=r.keys,it=r.data.DataSource,p="aria-disabled",w="aria-readonly",h="k-state-default",b="disabled",k="readonly",d="k-state-focused",c="k-state-selected",l="k-state-disabled",rt="k-state-hover",i=".kendoAutoComplete",ut="mouseenter"+i+" mouseleave"+i,o=n.proxy,ft=e.extend({init:function(t,u){var s,f=this;f.ns=i;u=n.isArray(u)?{dataSource:u}:u;e.fn.init.call(f,t,u);t=f.element;u=f.options;u.placeholder=u.placeholder||t.attr("placeholder");v&&t.attr("placeholder",u.placeholder);f._wrapper();f._loader();f._dataSource();f._ignoreCase();t[0].type="text";s=f.wrapper;f._popup();t.addClass("k-input").on("keydown"+i,o(f._keydown,f)).on("paste"+i,o(f._search,f)).on("focus"+i,function(){f._prev=f._accessor();f._placeholder(!1);s.addClass(d)}).on("blur"+i,function(){f._change();f._placeholder();s.removeClass(d)}).attr({autocomplete:"off",role:"textbox","aria-haspopup":!0});f._enable();f._old=f._accessor();t[0].id&&t.attr("aria-owns",f.ul[0].id);f._aria();f._placeholder();r.notify(f)},options:{name:"AutoComplete",enabled:!0,suggest:!1,template:"",dataTextField:"",minLength:1,delay:200,height:200,filter:"startswith",ignoreCase:!0,highlightFirst:!1,separator:null,placeholder:"",animation:{},value:null},_dataSource:function(){var n=this;n.dataSource&&n._refreshHandler?n._unbindDataSource():(n._refreshHandler=o(n.refresh,n),n._progressHandler=o(n._showBusy,n));n.dataSource=it.create(n.options.dataSource).bind("change",n._refreshHandler).bind("progress",n._progressHandler)},setDataSource:function(n){this.options.dataSource=n;this._dataSource()},events:["open","close","change","select","dataBinding","dataBound"],setOptions:function(n){e.fn.setOptions.call(this,n);this._template();this._accessors();this._aria()},_editable:function(n){var r=this,f=r.element,e=r.wrapper.off(i),u=n.readonly,t=n.disable;u||t?(e.addClass(t?l:h).removeClass(t?h:l),f.attr(b,t).attr(k,u).attr(p,t).attr(w,u)):(e.addClass(h).removeClass(l).on(ut,r._toggleHover),f.removeAttr(b).removeAttr(k).attr(p,!1).attr(w,!1))},close:function(){var n=this,t=n._current;t&&t.removeClass(c);n.current(null);n.popup.close()},destroy:function(){var n=this;n.element.off(i);n.wrapper.off(i);e.fn.destroy.call(n)},refresh:function(){var u,i=this,f=i.ul[0],e=i.popup,s=i.options,h=i._data(),o=h.length;i.trigger("dataBinding");f.innerHTML=r.render(i.template,h);i._height(o);e.visible()&&e._position();o&&(s.highlightFirst&&i.current(n(f.firstChild)),s.suggest&&i.suggest(n(f.firstChild)));i._open&&(i._open=!1,u=o?"open":"close",i._typing&&i.element[0]!==a()&&(u="close"),e[u](),i._typing=t);i._touchScroller&&i._touchScroller.reset();i._makeUnselectable();i._hideBusy();i.trigger("dataBound")},select:function(n){this._select(n)},search:function(n){var r,t=this,i=t.options,u=i.ignoreCase,e=i.separator;n=n||t._accessor();t._current=null;clearTimeout(t._typing);e&&(n=g(f(t.element)[0],n,e));r=n.length;r?r>=t.options.minLength&&(t._open=!0,t._filterSource({value:u?n.toLowerCase():n,operator:i.filter,field:i.dataTextField,ignoreCase:u})):t.popup.close()},suggest:function(n){var i,r=this,y=r._last,o=r._accessor(),v=r.element[0],h=f(v)[0],c=r.options.separator,l=o.split(c),p=s(h,o,c),w=h;return y==u.BACKSPACE||y==u.DELETE?(r._last=t,t):(n=n||"","string"!=typeof n&&(i=e.inArray(n[0],r.ul[0]),n=i>-1?r._text(r._data()[i]):""),0>=h&&(h=o.toLowerCase().indexOf(n.toLowerCase())+1),i=o.substring(0,h).lastIndexOf(c),i=i>-1?h-(i+c.length):h,o=l[p].substring(0,i),n&&(i=n.toLowerCase().indexOf(o.toLowerCase()),i>-1&&(n=n.substring(i+o.length),w=h+n.length,o+=n),c&&""!==l[l.length-1]&&l.push("")),l[p]=o,r._accessor(l.join(c||"")),v===a()&&f(v,h,w),t)},value:function(n){return n===t?this._accessor():(this._accessor(n),this._old=n,t)},_accessor:function(n){var i=this,r=i.element[0];return n===t?(n=r.value,r.className.indexOf("k-readonly")>-1?n===i.options.placeholder?"":n:n):(r.value=null===n?"":n,i._placeholder(),t)},_accept:function(n){var t=this.element;this._focus(n);f(t,t.val().length)},_keydown:function(t){var i=this,e=i.ul[0],r=t.keyCode,f=i._current,o=i.popup.visible();i._last=r;r===u.DOWN?(o&&i._move(f?f.next():n(e.firstChild)),t.preventDefault()):r===u.UP?(o&&i._move(f?f.prev():n(e.lastChild)),t.preventDefault()):r===u.ENTER||r===u.TAB?(r===u.ENTER&&i.popup.visible()&&t.preventDefault(),i._accept(f)):r===u.ESC?(i.popup.visible()&&t.preventDefault(),i.close()):i._search()},_move:function(n){var t=this;n=n[0]?n:null;t.current(n);t.options.suggest&&t.suggest(n)},_hideBusy:function(){var n=this;clearTimeout(n._busy);n._loading.hide();n.element.attr("aria-busy",!1);n._busy=null},_showBusy:function(){var n=this;n._busy||(n._busy=setTimeout(function(){n.element.attr("aria-busy",!0);n._loading.show()},100))},_placeholder:function(n){if(!v){var i,e=this,u=e.element,r=e.options.placeholder;if(r){if(i=u.val(),n===t&&(n=!i),n||(r=i!==r?i:""),i===e._old&&!n)return;u.toggleClass("k-readonly",n).val(r);r||u[0]!==document.activeElement||f(u[0],0,0)}}},_search:function(){var n=this;clearTimeout(n._typing);n._typing=setTimeout(function(){n._prev!==n._accessor()&&(n._prev=n._accessor(),n.search())},n.options.delay)},_select:function(t){var r,u,i=this,s=i.options.separator,o=i._data();t=n(t);t[0]&&!t.hasClass(c)&&(u=e.inArray(t[0],i.ul[0]),u>-1&&(o=o[u],r=i._text(o),s&&(r=nt(f(i.element)[0],i._accessor(),r,s)),i._accessor(r),i._prev=i._accessor(),i.current(t.addClass(c))))},_loader:function(){this._loading=n('<span class="k-icon k-loading" style="display:none"><\/span>').insertAfter(this.element)},_toggleHover:function(t){n(t.currentTarget).toggleClass(rt,"mouseenter"===t.type)},_wrapper:function(){var n,t=this,i=t.element,r=i[0];n=i.parent();n.is("span.k-widget")||(n=i.wrap("<span />").parent());n.attr("tabindex",-1);n.attr("role","presentation");n[0].style.cssText=r.style.cssText;i.css({width:"100%",height:r.style.height});t._focused=t.element;t.wrapper=n.addClass("k-widget k-autocomplete k-header").addClass(r.className)}});y.plugin(ft)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(n,t){t()});!function(n,t){function i(){return{Android:function(){return navigator.userAgent.match(/Android/i)},BlackBerry:function(){return navigator.userAgent.match(/BlackBerry/i)},iOS:function(){return navigator.userAgent.match(/iPhone|iPad|iPod/i)},Opera:function(){return navigator.userAgent.match(/Opera Mini/i)},Windows:function(){return navigator.userAgent.match(/IEMobile/i)},any:function(){return!!(this.Android()||this.BlackBerry()||this.iOS()||this.Opera()||this.Windows())}}.any()}var r=!1;"function"!=typeof String.prototype.trim&&(String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"")});"function"!=typeof String.prototype.startsWith&&(String.prototype.startsWith=function(n){return 0===this.indexOf(n)});n.fn.extend({simpleSelect:function(){return this.each(function(){var t=n(this);t.parent().hasClass("select-wrap")||(t.wrap('<div class="select-wrap"><\/div>').after('<span class="select-box"><span class="select-inner">'+t.find(":selected").text()+"<\/span><\/span>"),t.change(function(){t.next().children(".select-inner").text(t.find(":selected").text())}))})}});t.isRtl="true"===n("#isRtlEnabled").val();t.isMobileDevice=i();t.isMobile=i;t.AntiSpam=function(n,t){window.location.href="mailto:"+n+"@"+t};t.getAttrValFromDom=function(t,i,r){var u=n(t).attr(i);return void 0!=u&&""!==u||(u=void 0!=r?r:""),u};t.getHiddenValFromDom=function(t,i){var r=n(t).val();return void 0!=r&&""!==r||(r=void 0!=i?i:""),r};t.getUrlVar=function(n){for(var t,i=[],u=window.location.href.slice(window.location.href.indexOf("?")+1).split("&"),r=0;r<u.length;r++)if(t=u[r].split("="),i.push(t[0]),i[t[0]]=t[1],null!=n&&t[0]===n)return t[1];return null!=n?null:i};t.getViewPort=function(){var n=window,t="inner";return"innerWidth"in window||(t="client",n=document.documentElement||document.body),{width:n[t+"Width"],height:n[t+"Height"]}};t.prepareTopMenu=function(){var i=".mega-menu li, .top-menu li";r&&(n(".menu-title").off("click.ssCore"),n(".plus-button").off("click.ssCore"),n(i).off("mouseenter.ssCore mouseleave.ssCore"),n(".top-menu").removeAttr("style"),n(".sublist-wrap.active").removeClass("active"),n(".plus-button.close").removeClass("close"),n(".menu-title.close").removeClass("close"));r=!0;var f=window.themeSettings&&window.themeSettings.themeBreakpoint||980,u=window.themeSettings&&window.themeSettings.isAccordionMenu||!1,e=t.getViewPort().width;n(".menu-title").on("click.ssCore",function(){n(this).toggleClass("close",!n(this).hasClass("close"));n(this).siblings(".top-menu, .mega-menu-responsive").slideToggle("fast",function(){n(this).css("overflow","")});u||n(".header-menu, .sublist-wrap").perfectScrollbar({swipePropagation:!1,wheelSpeed:1,suppressScrollX:!0})});n(".plus-button").on("click.ssCore",function(t){var i,r;t.stopPropagation();i=n(this);i.toggleClass("close",!i.hasClass("close"));r=i.siblings(".sublist-wrap");r.hasClass("active")?r.removeClass("active"):u?r.addClass("active"):i.parents().eq(2).animate({scrollTop:0},180,function(){r.addClass("active")});u||i.parents().eq(2).perfectScrollbar("destroy")});e>f?(n(".sublist-wrap.active").removeClass("active"),n(".plus-button.close").removeClass("close"),n(i).each(function(){if(!("true"===n(this).parents("ul").last().attr("data-enableClickForDropDown"))){var t,i;n(this).on("mouseenter.ssCore",function(){var r=n(this);clearTimeout(i);t=setTimeout(function(){n("a",r).first().addClass("hover");n(".sublist-wrap, .dropdown",r).first().addClass("active")},180)}).on("mouseleave.ssCore",function(){var r=n(this);clearTimeout(t);i=setTimeout(function(){n("a",r).first().removeClass("hover");n(".sublist-wrap, .dropdown",r).first().removeClass("active")},180)})}})):(n(i).off("mouseenter.ssCore mouseleave.ssCore"),n(".sublist-wrap.active").removeClass("active"),n(".plus-button.close").removeClass("close"))}}(jQuery,window.sevenSpikesCore=window.sevenSpikesCore||{});!function(n,t){function i(t){if(t.one("mouseover",function(){t.find("img.lazy").each(function(){var t=n(this);t.attr("src",t.attr("data-original"))})}),"true"===t.attr("data-enableClickForDropDown")){var i=t.children("li").children(".dropdown, .sublist-wrap");i.siblings("a").on("click",function(n){n.preventDefault()});i.click(function(n){n.stopPropagation()});t.children("li").off("click.megaMenuEvent").on("click.megaMenuEvent",function(t){t.stopPropagation();var r=n(this).children(".dropdown, .sublist-wrap");i.not(r).filter(":visible").slideToggle("fast");i.not(r).filter(":visible").removeClass("active");r.slideToggle("fast",function(){n(this).is(":visible")&&n(this).css("overflow","")});r.addClass("active")});n(document).off("click.megaMenuDocumentEvent").on("click.megaMenuDocumentEvent",function(){i.filter(":visible").slideToggle("fast");i.filter(":visible").removeClass("active")})}}n(document).ready(function(){n(".mega-menu").each(function(){i(n(this))});t.prepareTopMenu()});n(document).on("themeBreakpointPassed7Spikes",function(n){n.isInitialLoad||t.prepareTopMenu()})}(jQuery,sevenSpikesCore);
  /*! jQuery JSON plugin 2.4.0 | code.google.com/p/jquery-json */
  (function(n){"use strict";var t=/["\\\x00-\x1f\x7f-\x9f]/g,i={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},r=Object.prototype.hasOwnProperty;n.toJSON=typeof JSON=="object"&&JSON.stringify?JSON.stringify:function(t){var e,u,a,v,i;if(t===null)return"null";if(i=n.type(t),i==="undefined")return undefined;if(i==="number"||i==="boolean")return String(t);if(i==="string")return n.quoteString(t);if(typeof t.toJSON=="function")return n.toJSON(t.toJSON());if(i==="date"){var o=t.getUTCMonth()+1,s=t.getUTCDate(),y=t.getUTCFullYear(),h=t.getUTCHours(),c=t.getUTCMinutes(),l=t.getUTCSeconds(),f=t.getUTCMilliseconds();return o<10&&(o="0"+o),s<10&&(s="0"+s),h<10&&(h="0"+h),c<10&&(c="0"+c),l<10&&(l="0"+l),f<100&&(f="0"+f),f<10&&(f="0"+f),'"'+y+"-"+o+"-"+s+"T"+h+":"+c+":"+l+"."+f+'Z"'}if(e=[],n.isArray(t)){for(u=0;u<t.length;u++)e.push(n.toJSON(t[u])||"null");return"["+e.join(",")+"]"}if(typeof t=="object"){for(u in t)if(r.call(t,u)){if(i=typeof u,i==="number")a='"'+u+'"';else if(i==="string")a=n.quoteString(u);else continue;i=typeof t[u];i!=="function"&&i!=="undefined"&&(v=n.toJSON(t[u]),e.push(a+":"+v))}return"{"+e.join(",")+"}"}};n.evalJSON=typeof JSON=="object"&&JSON.parse?JSON.parse:function(n){return eval("("+n+")")};n.secureEvalJSON=typeof JSON=="object"&&JSON.parse?JSON.parse:function(n){var t=n.replace(/\\["\\\/bfnrtu]/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"");if(/^[\],:{}\s]*$/.test(t))return eval("("+n+")");throw new SyntaxError("Error parsing JSON, source is not valid.");};n.quoteString=function(n){return n.match(t)?'"'+n.replace(t,function(n){var t=i[n];return typeof t=="string"?t:(t=n.charCodeAt(),"\\u00"+Math.floor(t/16).toString(16)+(t%16).toString(16))})+'"':'"'+n+'"'}})(jQuery);!function(n,t,i){function o(){var n=i.getAttrValFromDom(r,"data-productPagePicturesParentContainerSelector"),s=[],u={},e=i.getAttrValFromDom(r,"data-productId"),o;return e&&e>0&&n&&(o=t(n).find(".product-ribbon"),o&&0!==o.length||(u.productId=e,u.productElement=t(n))),t(f).each(function(){var i=t(this).find(".product-ribbon"),n,r;i&&0!==i.length||(n=t(this).attr("data-productid"),n&&n>0&&(r={productId:n,productElement:t(this)},s.push(r)))}),{productPage:u,categoryPageProducts:s}}function u(n,u,f){var s,o,h,c;if(u.productElement){if(f){if(!(s=i.getAttrValFromDom(r,"data-productPageBugPictureContainerSelector")))return}else if(!(s=i.getAttrValFromDom(r,"data-productBoxPictureContainerSelector")))return;if(o=u.productElement.find(s),o.parent().hasClass(e))return;o&&u.productId&&u.productId>0&&(c=u.productId,(h=f?t(n).filter("div[data-productId='"+c+"']"):t(n).filter("a[data-productId='"+c+"']"))&&h.length>0&&(o.wrap('<div class="'+e+'"><\/div>'),o.after(h)))}}function s(n,t){if(t&&t.productPage&&t.productPage.productId&&u(n,t.productPage,!0),t&&t.categoryPageProducts&&t.categoryPageProducts.length>0)for(var i=0;i<t.categoryPageProducts.length;i++)u(n,t.categoryPageProducts[i])}function h(){return i.getAttrValFromDom("#product-ribbon-info","data-retrieveproductribbonsurl")}var f,e="ribbon-wrapper",r="#product-ribbon-info";n.showRibbons=function(){var i=0,u=[],n=o(),r,f,e,c;if(n&&n.productPage&&n.productPage.productId&&(i=n.productPage.productId),n&&n.categoryPageProducts&&n.categoryPageProducts.length>0)for(r=0;r<n.categoryPageProducts.length;r++)f=n.categoryPageProducts[r],f.hasOwnProperty("productId")&&u.push(f.productId);(i||0!==u.length)&&(t.isNumeric(i)||(i=0),e={productPageId:i,categoryPageIds:u},c=h(),t.ajax({type:"POST",data:t.toJSON(e),contentType:"application/json; charset=utf-8",url:c}).done(function(i){i&&(s(i,n),t.event.trigger({type:"nopProductRibbonsLoadingCompleteEvent"}))}))};t(document).ready(function(){(f=i.getAttrValFromDom(r,"data-productBoxSelector"))&&n.showRibbons()});t(document).on("nopAjaxFiltersFiltrationCompleteEvent newProductsAddedToPageEvent",nopProductRibbons.showRibbons)}(window.nopProductRibbons=window.nopProductRibbons||{},jQuery,sevenSpikesCore);!function(n,t){t(["./kendo.core.min"],n)}(function(){return function(n){function c(n,t){var i=n.x.location,r=n.y.location,u=t.x.location,f=t.y.location,e=i-u,o=r-f;return{center:{x:(i+u)/2,y:(r+f)/2},distance:Math.sqrt(e*e+o*o)}}function f(n){var s,f,r,t=[],u=n.originalEvent,e=n.currentTarget,o=0;if(n.api)t.push({id:2,event:n,target:n.target,currentTarget:n.target,location:n});else if(n.type.match(/touch/))for(f=u?u.changedTouches:[],s=f.length;s>o;o++)r=f[o],t.push({location:r,event:n,target:r.target,currentTarget:e,id:r.identifier});else i.pointers||i.msPointers?t.push({location:u,event:n,target:n.target,currentTarget:e,id:u.pointerId}):t.push({id:1,event:n,target:n.target,currentTarget:e,location:n});return t}function ft(t){var i,r,u;t.preventDefault();i=n(t.data.root);r=i.closest(".k-widget").parent();r[0]||(r=i.parent());u=n.extend(!0,{},t,{target:i[0]});r.trigger(n.Event(t.type,u))}function l(n){for(var r=t.eventMap.up.split(" "),i=0,u=r.length;u>i;i++)n(r[i])}var t=window.kendo,i=t.support,et=window.document,a=t.Class,v=t.Observable,u=n.now,e=n.extend,y=i.mobileOS,ot=y&&y.android,p=800,st=i.browser.msie?5:0,w="press",b="hold",k="select",d="start",o="move",s="end",g="cancel",h="tap",nt="release",ht="gesturestart",tt="gesturechange",it="gestureend",rt="gesturetap",ut=a.extend({init:function(n,t){var i=this;i.axis=n;i._updateLocationData(t);i.startLocation=i.location;i.velocity=i.delta=0;i.timeStamp=u()},move:function(n){var t=this,i=n["page"+t.axis],r=u(),f=r-t.timeStamp||1;(i||!ot)&&(t.delta=i-t.location,t._updateLocationData(n),t.initialDelta=i-t.startLocation,t.velocity=t.delta/f,t.timeStamp=r)},_updateLocationData:function(n){var t=this,i=t.axis;t.location=n["page"+i];t.client=n["client"+i];t.screen=n["screen"+i]}}),ct=a.extend({init:function(n,t,i){e(this,{x:new ut("X",i.location),y:new ut("Y",i.location),userEvents:n,target:t,currentTarget:i.currentTarget,initialTouch:i.target,id:i.id,pressEvent:i,_moved:!1,_finished:!1})},press:function(){this._holdTimeout=setTimeout(n.proxy(this,"_hold"),this.userEvents.minHold);this._trigger(w,this.pressEvent)},_hold:function(){this._trigger(b,this.pressEvent)},move:function(n){var t=this;if(!t._finished){if(t.x.move(n.location),t.y.move(n.location),!t._moved){if(t._withinIgnoreThreshold())return;if(r.current&&r.current!==t.userEvents)return t.dispose();t._start(n)}t._finished||t._trigger(o,n)}},end:function(n){var t=this;t.endTime=u();t._finished||(t._finished=!0,t._moved?t._trigger(s,n):t._trigger(h,n),clearTimeout(t._holdTimeout),t._trigger(nt,n),t.dispose())},dispose:function(){var i=this.userEvents,t=i.touches;this._finished=!0;this.pressEvent=null;clearTimeout(this._holdTimeout);t.splice(n.inArray(this,t),1)},skip:function(){this.dispose()},cancel:function(){this.dispose()},isMoved:function(){return this._moved},_start:function(n){clearTimeout(this._holdTimeout);this.startTime=u();this._moved=!0;this._trigger(d,n)},_trigger:function(n,t){var i=this,r=t.event,u={touch:i,x:i.x,y:i.y,target:i.target,event:r};i.userEvents.notify(n,u)&&r.preventDefault()},_withinIgnoreThreshold:function(){var n=this.x.initialDelta,t=this.y.initialDelta;return Math.sqrt(n*n+t*t)<=this.userEvents.threshold}}),r=v.extend({init:function(r,u){var a,y,ut,f=this,c=t.guid();u=u||{};a=f.filter=u.filter;f.threshold=u.threshold||st;f.minHold=u.minHold||p;f.touches=[];f._maxTouches=u.multiTouch?2:1;f.allowSelection=u.allowSelection;f.captureUpIfMoved=u.captureUpIfMoved;f.eventNS=c;r=n(r).handler(f);v.fn.init.call(f);e(f,{element:r,surface:u.global?n(et.documentElement):n(u.surface||r),stopPropagation:u.stopPropagation,pressed:!1});f.surface.handler(f).on(t.applyEventMap("move",c),"_move").on(t.applyEventMap("up cancel",c),"_end");r.on(t.applyEventMap("down",c),a,"_start");(i.pointers||i.msPointers)&&r.css("-ms-touch-action","pinch-zoom double-tap-zoom");u.preventDragEvent&&r.on(t.applyEventMap("dragstart",c),t.preventDefault);r.on(t.applyEventMap("mousedown selectstart",c),a,{root:r},"_select");f.captureUpIfMoved&&i.eventCapture&&(y=f.surface[0],ut=n.proxy(f.preventIfMoving,f),l(function(n){y.addEventListener(n,ut,!0)}));f.bind([w,b,h,d,o,s,nt,g,ht,tt,it,rt,k],u)},preventIfMoving:function(n){this._isMoved()&&n.preventDefault()},destroy:function(){var t,n=this;n._destroyed||(n._destroyed=!0,n.captureUpIfMoved&&i.eventCapture&&(t=n.surface[0],l(function(i){t.removeEventListener(i,n.preventIfMoving)})),n.element.kendoDestroy(n.eventNS),n.surface.kendoDestroy(n.eventNS),n.element.removeData("handler"),n.surface.removeData("handler"),n._disposeAll(),n.unbind(),delete n.surface,delete n.element,delete n.currentTarget)},capture:function(){r.current=this},cancel:function(){this._disposeAll();this.trigger(g)},notify:function(n,t){var r=this,i=r.touches;if(this._isMultiTouch()){switch(n){case o:n=tt;break;case s:n=it;break;case h:n=rt}e(t,{touches:i},c(i[0],i[1]))}return this.trigger(n,t)},press:function(n,t,i){this._apiCall("_start",n,t,i)},move:function(n,t){this._apiCall("_move",n,t)},end:function(n,t){this._apiCall("_end",n,t)},_isMultiTouch:function(){return this.touches.length>1},_maxTouchesReached:function(){return this.touches.length>=this._maxTouches},_disposeAll:function(){for(var n=this.touches;n.length>0;)n.pop().dispose()},_isMoved:function(){return n.grep(this.touches,function(n){return n.isMoved()}).length},_select:function(n){(!this.allowSelection||this.trigger(k,{event:n}))&&ft(n)},_start:function(t){var e,u,i=this,o=0,c=i.filter,s=f(t),l=s.length,h=t.which;if(!(h&&h>1||i._maxTouchesReached()))for(r.current=null,i.currentTarget=t.currentTarget,i.stopPropagation&&t.stopPropagation();l>o&&!i._maxTouchesReached();o++)u=s[o],e=c?n(u.currentTarget):i.element,e.length&&(u=new ct(i,e,u),i.touches.push(u),u.press(),i._isMultiTouch()&&i.notify("gesturestart",{}))},_move:function(n){this._eachTouch("move",n)},_end:function(n){this._eachTouch("end",n)},_eachTouch:function(n,t){for(var r,u,e,c=this,o={},s=f(t),h=c.touches,i=0;h.length>i;i++)r=h[i],o[r.id]=r;for(i=0;s.length>i;i++)u=s[i],e=o[u.id],e&&e[n](u)},_apiCall:function(t,i,r,u){this[t]({api:!0,pageX:i,pageY:r,clientX:i,clientY:r,target:n(u||this.element)[0],stopPropagation:n.noop,preventDefault:n.noop})}});r.minHold=function(n){p=n};t.getTouches=f;t.touchDelta=c;t.UserEvents=r}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(n,t){t()});!function(n,t){t(["./kendo.core.min","./kendo.userevents.min"],n)}(function(){return function(n,t){function yt(t,i){try{return n.contains(t,i)||t==i}catch(r){return!1}}function a(n,t){return parseInt(n.css(t),10)||0}function nt(n,t){return Math.min(Math.max(n,t.min),t.max)}function tt(n,t){var i=k(n),r=i.left+a(n,"borderLeftWidth")+a(n,"paddingLeft"),u=i.top+a(n,"borderTopWidth")+a(n,"paddingTop"),f=r+n.width()-t.outerWidth(!0),e=u+n.height()-t.outerHeight(!0);return{x:{min:r,max:f},y:{min:u,max:e}}}function pt(n,i,r){for(var f,e,u=0,o=i&&i.length,s=r&&r.length;n&&n.parentNode;){for(u=0;o>u;u++)if(f=i[u],f.element[0]===n)return{target:f,targetElement:n};for(u=0;s>u;u++)if(e=r[u],w.matchesSelector.call(n,e.options.filter))return{target:e,targetElement:n};n=n.parentNode}return t}var u,p,it,c,rt,ut,i=window.kendo,w=i.support,b=window.document,wt=i.Class,o=i.ui.Widget,f=i.Observable,bt=i.UserEvents,e=n.proxy,r=n.extend,k=i.getOffset,v={},s={},h={},d=i.elementUnderCursor,ft="keyup",l="change",et="dragstart",ot="hold",st="drag",ht="dragend",ct="dragcancel",g="dragenter",y="dragleave",lt="drop",kt=f.extend({init:function(t,r){var u=this,o=t[0];u.capture=!1;o.addEventListener?(n.each(i.eventMap.down.split(" "),function(){o.addEventListener(this,e(u._press,u),!0)}),n.each(i.eventMap.up.split(" "),function(){o.addEventListener(this,e(u._release,u),!0)})):(n.each(i.eventMap.down.split(" "),function(){o.attachEvent(this,e(u._press,u))}),n.each(i.eventMap.up.split(" "),function(){o.attachEvent(this,e(u._release,u))}));f.fn.init.call(u);u.bind(["press","release"],r||{})},captureNext:function(){this.capture=!0},cancelCapture:function(){this.capture=!1},_press:function(n){var t=this;t.trigger("press");t.capture&&n.preventDefault()},_release:function(n){var t=this;t.trigger("release");t.capture&&(n.preventDefault(),t.cancelCapture())}}),at=f.extend({init:function(t){var i=this;f.fn.init.call(i);i.forcedEnabled=!1;n.extend(i,t);i.scale=1;i.horizontal?(i.measure="offsetWidth",i.scrollSize="scrollWidth",i.axis="x"):(i.measure="offsetHeight",i.scrollSize="scrollHeight",i.axis="y")},makeVirtual:function(){n.extend(this,{virtual:!0,forcedEnabled:!0,_virtualMin:0,_virtualMax:0})},virtualSize:function(n,t){(this._virtualMin!==n||this._virtualMax!==t)&&(this._virtualMin=n,this._virtualMax=t,this.update())},outOfBounds:function(n){return n>this.max||this.min>n},forceEnabled:function(){this.forcedEnabled=!0},getSize:function(){return this.container[0][this.measure]},getTotal:function(){return this.element[0][this.scrollSize]},rescale:function(n){this.scale=n},update:function(n){var t=this,u=t.virtual?t._virtualMax:t.getTotal(),r=u*t.scale,i=t.getSize();t.max=t.virtual?-t._virtualMin:0;t.size=i;t.total=r;t.min=Math.min(t.max,i-r);t.minScale=i/u;t.centerOffset=(r-i)/2;t.enabled=t.forcedEnabled||r>i;n||t.trigger(l,t)}}),dt=f.extend({init:function(n){var t=this;f.fn.init.call(t);t.x=new at(r({horizontal:!0},n));t.y=new at(r({horizontal:!1},n));t.container=n.container;t.forcedMinScale=n.minScale;t.maxScale=n.maxScale||100;t.bind(l,n)},rescale:function(n){this.x.rescale(n);this.y.rescale(n);this.refresh()},centerCoordinates:function(){return{x:Math.min(0,-this.x.centerOffset),y:Math.min(0,-this.y.centerOffset)}},refresh:function(){var n=this;n.x.update();n.y.update();n.enabled=n.x.enabled||n.y.enabled;n.minScale=n.forcedMinScale||Math.min(n.x.minScale,n.y.minScale);n.fitScale=Math.max(n.x.minScale,n.y.minScale);n.trigger(l)}}),vt=f.extend({init:function(n){var t=this;r(t,n);f.fn.init.call(t)},dragMove:function(n){var t=this,i=t.dimension,r=t.axis,u=t.movable,f=u[r]+n;i.enabled&&((i.min>f&&0>n||f>i.max&&n>0)&&(n*=t.resistance),u.translateAxis(r,n),t.trigger(l,t))}}),gt=wt.extend({init:function(n){var u,f,e,i,t=this;r(t,{elastic:!0},n);e=t.elastic?.5:0;i=t.movable;t.x=u=new vt({axis:"x",dimension:t.dimensions.x,resistance:e,movable:i});t.y=f=new vt({axis:"y",dimension:t.dimensions.y,resistance:e,movable:i});t.userEvents.bind(["move","end","gesturestart","gesturechange"],{gesturestart:function(n){t.gesture=n;t.offset=t.dimensions.container.offset()},gesturechange:function(n){var e,o,s,h=t.gesture,c=h.center,l=n.center,r=n.distance/h.distance,v=t.dimensions.minScale,a=t.dimensions.maxScale;v>=i.scale&&1>r&&(r+=.8*(1-r));i.scale*r>=a&&(r=a/i.scale);o=i.x+t.offset.left;s=i.y+t.offset.top;e={x:(o-c.x)*r+l.x-o,y:(s-c.y)*r+l.y-s};i.scaleWith(r);u.dragMove(e.x);f.dragMove(e.y);t.dimensions.rescale(i.scale);t.gesture=n;n.preventDefault()},move:function(n){n.event.target.tagName.match(/textarea|input/i)||(u.dimension.enabled||f.dimension.enabled?(u.dragMove(n.x.delta),f.dragMove(n.y.delta),n.preventDefault()):n.touch.skip())},end:function(n){n.preventDefault()}})}}),ni=w.transitions.prefix+"Transform";p=w.hasHW3D?function(n,t,i){return"translate3d("+n+"px,"+t+"px,0) scale("+i+")"}:function(n,t,i){return"translate("+n+"px,"+t+"px) scale("+i+")"};it=f.extend({init:function(t){var i=this;f.fn.init.call(i);i.element=n(t);i.element[0].style.webkitTransformOrigin="left top";i.x=0;i.y=0;i.scale=1;i._saveCoordinates(p(i.x,i.y,i.scale))},translateAxis:function(n,t){this[n]+=t;this.refresh()},scaleTo:function(n){this.scale=n;this.refresh()},scaleWith:function(n){this.scale*=n;this.refresh()},translate:function(n){this.x+=n.x;this.y+=n.y;this.refresh()},moveAxis:function(n,t){this[n]=t;this.refresh()},moveTo:function(n){r(this,n);this.refresh()},refresh:function(){var t,n=this,r=n.x,u=n.y;n.round&&(r=Math.round(r),u=Math.round(u));t=p(r,u,n.scale);t!=n.coordinates&&(i.support.browser.msie&&10>i.support.browser.version?(n.element[0].style.position="absolute",n.element[0].style.left=n.x+"px",n.element[0].style.top=n.y+"px"):n.element[0].style[ni]=t,n._saveCoordinates(t),n.trigger(l))},_saveCoordinates:function(n){this.coordinates=n}});c=o.extend({init:function(n,t){var i,r=this;o.fn.init.call(r,n,t);i=r.options.group;i in s?s[i].push(r):s[i]=[r]},events:[g,y,lt],options:{name:"DropTarget",group:"default"},destroy:function(){var n,i=this.options.group,t=s[i]||h[i];if(t.length>1){for(o.fn.destroy.call(this),n=0;t.length>n;n++)if(t[n]==this){t.splice(n,1);break}}else c.destroyGroup(i)},_trigger:function(n,i){var u=this,f=v[u.options.group];return f?u.trigger(n,r({},i.event,{draggable:f,dropTarget:i.dropTarget})):t},_over:function(n){this._trigger(g,n)},_out:function(n){this._trigger(y,n)},_drop:function(n){var t=this,i=v[t.options.group];i&&(i.dropped=!t._trigger(lt,n))}});c.destroyGroup=function(n){var t,i=s[n]||h[n];if(i){for(t=0;i.length>t;t++)o.fn.destroy.call(i[t]);i.length=0;delete s[n];delete h[n]}};c._cache=s;rt=c.extend({init:function(n,t){var i,r=this;o.fn.init.call(r,n,t);i=r.options.group;i in h?h[i].push(r):h[i]=[r]},options:{name:"DropTargetArea",group:"default",filter:null}});ut=o.extend({init:function(n,t){var r=this;o.fn.init.call(r,n,t);r._activated=!1;r.userEvents=new bt(r.element,{global:!0,stopPropagation:!0,filter:r.options.filter,threshold:r.options.distance,start:e(r._start,r),hold:e(r._hold,r),move:e(r._drag,r),end:e(r._end,r),cancel:e(r._cancel,r)});r._afterEndHandler=e(r._afterEnd,r);r.captureEscape=function(n){n.keyCode===i.keys.ESC&&(r._trigger(ct,{event:n}),r.userEvents.cancel())}},events:[ot,et,st,ht,ct],options:{name:"Draggable",distance:5,group:"default",cursorOffset:null,axis:null,container:null,filter:null,ignore:null,holdToDrag:!1,dropped:!1},cancelHold:function(){this._activated=!1},_updateHint:function(t){var i,r=this,o=r.options,u=r.boundaries,e=o.axis,f=r.options.cursorOffset;f?i={left:t.x.location+f.left,top:t.y.location+f.top}:(r.hintOffset.left+=t.x.delta,r.hintOffset.top+=t.y.delta,i=n.extend({},r.hintOffset));u&&(i.top=nt(i.top,u.y),i.left=nt(i.left,u.x));"x"===e?delete i.top:"y"===e&&delete i.left;r.hint.css(i)},_start:function(r){var e,u=this,f=u.options,s=f.ignore,c=s&&n(r.touch.initialTouch).is(s),h=f.container,o=f.hint;return c||f.holdToDrag&&!u._activated?(u.userEvents.cancel(),t):(u.currentTarget=r.target,u.currentTargetOffset=k(u.currentTarget),o&&(u.hint&&u.hint.stop(!0,!0).remove(),u.hint=i.isFunction(o)?n(o.call(u,u.currentTarget)):o,e=k(u.currentTarget),u.hintOffset=e,u.hint.css({position:"absolute",zIndex:2e4,left:e.left,top:e.top}).appendTo(b.body)),v[f.group]=u,u.dropped=!1,h&&(u.boundaries=tt(h,u.hint)),u._trigger(et,r)&&(u.userEvents.cancel(),u._afterEnd()),n(b).on(ft,u.captureEscape),t)},_hold:function(n){this.currentTarget=n.target;this._trigger(ot,n)?this.userEvents.cancel():this._activated=!0},_drag:function(i){var f=this;i.preventDefault();f._withDropTarget(i,function(f,e){if(!f)return u&&(u._trigger(y,r(i,{dropTarget:n(u.targetElement)})),u=null),t;if(u){if(e===u.targetElement)return;u._trigger(y,r(i,{dropTarget:n(u.targetElement)}))}f._trigger(g,r(i,{dropTarget:n(e)}));u=r(f,{targetElement:e})});f._trigger(st,i);f.hint&&f._updateHint(i)},_end:function(t){var i=this;i._withDropTarget(t,function(i,f){i&&(i._drop(r({},t,{dropTarget:n(f)})),u=null)});i._trigger(ht,t);i._cancel(t.event)},_cancel:function(){var n=this;n._activated=!1;n.hint&&!n.dropped?setTimeout(function(){n.hint.stop(!0,!0).animate(n.currentTargetOffset,"fast",n._afterEndHandler)},0):n._afterEnd()},_trigger:function(n,t){var i=this;return i.trigger(n,r({},t.event,{x:t.x,y:t.y,currentTarget:i.currentTarget,dropTarget:t.dropTarget}))},_withDropTarget:function(n,t){var i,u,r=this,o=r.options,f=s[o.group],e=h[o.group];(f&&f.length||e&&e.length)&&(i=d(n),r.hint&&yt(r.hint[0],i)&&(r.hint.hide(),i=d(n),i||(i=d(n)),r.hint.show()),u=pt(i,f,e),u?t(u.target,u.targetElement):t())},destroy:function(){var n=this;o.fn.destroy.call(n);n._afterEnd();n.userEvents.destroy();n.currentTarget=null},_afterEnd:function(){var t=this;t.hint&&t.hint.remove();delete v[t.options.group];t.trigger("destroy");n(b).off(ft,t.captureEscape)}});i.ui.plugin(c);i.ui.plugin(rt);i.ui.plugin(ut);i.TapCapture=kt;i.containerBoundaries=tt;r(i.ui,{Pane:gt,PaneDimensions:dt,Movable:it})}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(n,t){t()});!function(n,t){t(["./kendo.draganddrop.min"],n)}(function(){return function(n,t){function d(n){return t!==n}function o(n,t,i){return Math.max(Math.min(parseInt(n,10),1/0===i?i:parseInt(i,10)),parseInt(t,10))}function st(n,t){return function(){var i=this,r=i.wrapper,u=r[0].style,o=i.options;if(!o.isMaximized&&!o.isMinimized)return i.restoreOptions={width:u.width,height:u.height},r.children(c).hide().end().children(e).find(ti).parent().hide().eq(0).before(f.action({name:"Restore"})),t.call(i),"maximize"==n?i.wrapper.children(e).find(ot).parent().hide():i.wrapper.children(e).find(ot).parent().show(),i}}function fi(){return!this.type||this.type.toLowerCase().indexOf("script")>=0}function ht(n){this.owner=n;this._draggable=new lt(n.wrapper,{filter:c,group:n.wrapper.id+"-resizing",dragstart:i(this.dragstart,this),drag:i(this.drag,this),dragend:i(this.dragend,this)})}function ct(n,t){this.owner=n;this._draggable=new lt(n.wrapper,{filter:t,group:n.wrapper.id+"-moving",dragstart:i(this.dragstart,this),drag:i(this.drag,this),dragend:i(this.dragend,this),dragcancel:i(this.dragcancel,this)});this._draggable.userEvents.stopPropagation=!1}var r=window.kendo,g=r.ui.Widget,lt=r.ui.Draggable,at=n.isPlainObject,ei=r._activeElement,i=n.proxy,l=n.extend,oi=n.each,h=r.template,nt="body",u=".kendoWindow",a=".k-window",ut=".k-window-title",e=ut+"bar",s=".k-window-content",c=".k-resize-handle",tt=".k-overlay",w="k-content-frame",vt="k-loading",yt="k-state-hover",pt="k-state-focused",wt="k-window-maximized",v=":visible",it="hidden",y="cursor",ft="open",et="activate",bt="deactivate",kt="close",rt="refresh",dt="dragstart",gt="dragend",ni="error",p="overflow",b="zIndex",ti=".k-window-actions .k-i-minimize,.k-window-actions .k-i-maximize",ii=".k-i-pin",ri=".k-i-unpin",ot=ii+","+ri,k=".k-window-titlebar .k-window-action",ui=".k-window-titlebar .k-i-refresh",si=r.isLocalUrl,hi=g.extend({init:function(f,o){var c,nt,tt,l,y,w,p,h=this,b={},rt=!1,ot=o&&o.actions&&!o.actions.length;g.fn.init.call(h,f,o);o=h.options;l=o.position;f=h.element;y=o.content;ot&&(o.actions=[]);h.appendTo=n(o.appendTo);h._animations();y&&!at(y)&&(y=o.content={url:y});f.find("script").filter(fi).remove();f.parent().is(h.appendTo)||l.top!==t&&l.left!==t||(f.is(v)?(b=f.offset(),rt=!0):(nt=f.css("visibility"),tt=f.css("display"),f.css({visibility:it,display:""}),b=f.offset(),f.css({visibility:nt,display:tt})),l.top===t&&(l.top=b.top),l.left===t&&(l.left=b.left));d(o.visible)&&null!==o.visible||(o.visible=f.is(v));c=h.wrapper=f.closest(a);f.is(".k-content")&&c[0]||(f.addClass("k-window-content k-content"),h._createWindow(f,o),c=h.wrapper=f.closest(a),h._dimensions());h._position();o.pinned&&h.pin(!0);y&&h.refresh(y);o.visible&&h.toFront();w=c.children(s);h._tabindex(w);o.visible&&o.modal&&h._overlay(c.is(v)).css({opacity:.5});c.on("mouseenter"+u,k,i(h._buttonEnter,h)).on("mouseleave"+u,k,i(h._buttonLeave,h)).on("click"+u,"> "+k,i(h._windowActionHandler,h));w.on("keydown"+u,i(h._keydown,h)).on("focus"+u,i(h._focus,h)).on("blur"+u,i(h._blur,h));this._resizable();this._draggable();p=f.attr("id");p&&(p+="_wnd_title",c.children(e).children(ut).attr("id",p),w.attr({role:"dialog","aria-labelledby":p}));c.add(c.children(".k-resize-handle,"+e)).on("mousedown"+u,i(h.toFront,h));h.touchScroller=r.touchScroller(f);h._resizeHandler=i(h._onDocumentResize,h);n(window).on("resize",h._resizeHandler);o.visible&&(h.trigger(ft),h.trigger(et));r.notify(h)},_buttonEnter:function(){n(this).addClass(yt)},_buttonLeave:function(){n(this).removeClass(yt)},_focus:function(){this.wrapper.addClass(pt)},_blur:function(){this.wrapper.removeClass(pt)},_dimensions:function(){var i,r,t=this.wrapper,n=this.options,u=n.width,f=n.height,e=n.maxHeight,s=["minWidth","minHeight","maxWidth","maxHeight"];for(this.title(n.title),i=0;s.length>i;i++)r=n[s[i]],r&&1/0!=r&&t.css(s[i],r);e&&1/0!=e&&this.element.css("maxHeight",e);u&&((""+u).indexOf("%")>0?t.width(u):t.width(o(u,n.minWidth,n.maxWidth)));f&&((""+f).indexOf("%")>0?t.height(f):t.height(o(f,n.minHeight,n.maxHeight)));n.visible||t.hide()},_position:function(){var t=this.wrapper,n=this.options.position;0===n.top&&(n.top=""+n.top);0===n.left&&(n.left=""+n.left);t.css({top:n.top||"",left:n.left||""})},_animations:function(){var n=this.options;n.animation===!1&&(n.animation={open:{effects:{}},close:{hide:!0,effects:{}}})},_resize:function(){r.resize(this.element.children())},_resizable:function(){var r=this.options.resizable,t=this.wrapper;this.resizing&&(t.off("dblclick"+u).children(c).remove(),this.resizing.destroy(),this.resizing=null);r&&(t.on("dblclick"+u,e,i(function(t){n(t.target).closest(".k-window-action").length||this.toggleMaximization()},this)),oi("n e s w se sw ne nw".split(" "),function(n,i){t.append(f.resizeHandle(i))}),this.resizing=new ht(this));t=null},_draggable:function(){var n=this.options.draggable;this.dragging&&(this.dragging.destroy(),this.dragging=null);n&&(this.dragging=new ct(this,n.dragHandle||e))},setOptions:function(n){g.fn.setOptions.call(this,n);this._animations();this._dimensions();this._position();this._resizable();this._draggable()},events:[ft,et,bt,kt,rt,"resize",dt,gt,ni],options:{name:"Window",animation:{open:{effects:{zoom:{direction:"in"},fade:{direction:"in"}},duration:350},close:{effects:{zoom:{direction:"out",properties:{scale:.7}},fade:{direction:"out"}},duration:350,hide:!0}},title:"",actions:["Close"],autoFocus:!0,modal:!1,resizable:!0,draggable:!0,minWidth:90,minHeight:50,maxWidth:1/0,maxHeight:1/0,pinned:!1,position:{},content:null,visible:null,height:null,width:null,appendTo:"body"},_closable:function(){return n.inArray("close",n.map(this.options.actions,function(n){return n.toLowerCase()}))>-1},_keydown:function(n){var c,i,v,y,l,a,u=this,h=u.options,f=r.keys,e=n.keyCode,t=u.wrapper,s=10,p=u.options.isMaximized;n.target!=n.currentTarget||u._closing||(e==f.ESC&&u._closable()&&u._close(!1),!h.draggable||n.ctrlKey||p||(c=r.getOffset(t),e==f.UP?i=t.css("top",c.top-s):e==f.DOWN?i=t.css("top",c.top+s):e==f.LEFT?i=t.css("left",c.left-s):e==f.RIGHT&&(i=t.css("left",c.left+s))),h.resizable&&n.ctrlKey&&!p&&(e==f.UP?(i=!0,y=t.height()-s):e==f.DOWN&&(i=!0,y=t.height()+s),e==f.LEFT?(i=!0,v=t.width()-s):e==f.RIGHT&&(i=!0,v=t.width()+s),i&&(l=o(v,h.minWidth,h.maxWidth),a=o(y,h.minHeight,h.maxHeight),isNaN(l)||(t.width(l),u.options.width=l+"px"),isNaN(a)||(t.height(a),u.options.height=a+"px"),u.resize())),i&&n.preventDefault())},_overlay:function(t){var i=this.appendTo.children(tt),r=this.wrapper;return i.length||(i=n("<div class='k-overlay' />")),i.insertBefore(r[0]).toggle(t).css(b,parseInt(r.css(b),10)-1),i},_actionForIcon:function(n){var t=/\bk-i-\w+\b/.exec(n[0].className)[0];return{"k-i-close":"_close","k-i-maximize":"maximize","k-i-minimize":"minimize","k-i-restore":"restore","k-i-refresh":"refresh","k-i-pin":"pin","k-i-unpin":"unpin"}[t]},_windowActionHandler:function(i){var u,r;if(!this._closing)return u=n(i.target).closest(".k-window-action").find(".k-icon"),r=this._actionForIcon(u),r?(i.preventDefault(),this[r](),!1):t},_modals:function(){var t=this,i=n(a).filter(function(){var r=n(this),u=t._object(r),i=u&&u.options;return i&&i.modal&&i.visible&&r.is(v)}).sort(function(t,i){return+n(t).css("zIndex")-+n(i).css("zIndex")});return t=null,i},_object:function(n){var t=n.children(s);return t.data("kendoWindow")||t.data("kendo"+this.options.name)},center:function(){var r,u,t=this,e=t.options.position,f=t.wrapper,i=n(window),o=0,s=0;return t.options.isMaximized?t:(t.options.pinned||(o=i.scrollTop(),s=i.scrollLeft()),u=s+Math.max(0,(i.width()-f.width())/2),r=o+Math.max(0,(i.height()-f.height())/2),f.css({left:u,top:r}),e.top=r,e.left=u,t)},title:function(n){var i=this,r=i.wrapper,s=i.options,t=r.children(e),u=t.children(ut),o=t.outerHeight();return arguments.length?(n===!1?(r.addClass("k-window-titleless"),t.remove()):(t.length||r.prepend(f.titlebar(l(f,s))),r.css("padding-top",o),t.css("margin-top",-o)),u.text(n),i.options.title=n,i):u.text()},content:function(n){var t=this.wrapper.children(s),i=t.children(".km-scroll-container");return t=i[0]?i:t,d(n)?(r.destroy(this.element.children()),t.empty().html(n),this):t.html()},open:function(){var u,e,t=this,o=t.wrapper,f=t.options,h=f.animation.open,c=o.children(s);return t.trigger(ft)||(t._closing&&o.kendoStop(!0,!0),t._closing=!1,t.toFront(),f.autoFocus&&t.element.focus(),f.visible=!0,f.modal&&(u=t._overlay(!1),u.kendoStop(!0,!0),h.duration&&r.effects.Fade?(e=r.fx(u).fadeIn(),e.duration(h.duration||0),e.endValue(.5),e.play()):u.css("opacity",.5),u.show()),o.is(v)||(c.css(p,it),o.show().kendoStop().kendoAnimate({effects:h.effects,duration:h.duration,complete:i(this._activate,this)}))),f.isMaximized&&(t._documentScrollTop=n(document).scrollTop(),n("html, body").css(p,it)),t},_activate:function(){this.options.autoFocus&&this.element.focus();this.trigger(et);this.wrapper.children(s).css(p,"")},_removeOverlay:function(i){var u,f=this._modals(),e=this.options,s=e.modal&&!f.length,h=e.modal?this._overlay(!0):n(t),o=e.animation.close;s?!i&&o.duration&&r.effects.Fade?(u=r.fx(h).fadeOut(),u.duration(o.duration||0),u.startValue(.5),u.play()):this._overlay(!1).remove():f.length&&this._object(f.last())._overlay(!0)},_close:function(t){var r=this,u=r.wrapper,f=r.options,o=f.animation.open,e=f.animation.close;u.is(v)&&!r.trigger(kt,{userTriggered:!t})&&(r._closing=!0,f.visible=!1,n(a).each(function(t,i){var r=n(i).children(s);i!=u&&r.find("> ."+w).length>0&&r.children(tt).remove()}),this._removeOverlay(),u.kendoStop().kendoAnimate({effects:e.effects||o.effects,reverse:e.reverse===!0,duration:e.duration,complete:i(this._deactivate,this)}));r.options.isMaximized&&(n("html, body").css(p,""),r._documentScrollTop&&r._documentScrollTop>0&&n(document).scrollTop(r._documentScrollTop))},_deactivate:function(){this.wrapper.hide().css("opacity","");this.trigger(bt);var n=this._object(this._modals().last());n&&n.toFront()},close:function(){return this._close(!0),this},_actionable:function(t){return n(t).is(k+","+k+" .k-icon,:input,a")},_shouldFocus:function(t){var r=ei(),i=this.element;return!(!this.options.autoFocus||n(r).is(i)||this._actionable(t)||i.find(r).length&&i.find(t).length)},toFront:function(t){var e,o,r=this,i=r.wrapper,h=i[0],u=+i.css(b),c=u,l=t&&t.target||null;return n(a).each(function(t,i){var r=n(i),e=r.css(b),o=r.children(s);isNaN(e)||(u=Math.max(+e,u));i!=h&&o.find("> ."+w).length>0&&o.append(f.overlay)}),(!i[0].style.zIndex||u>c)&&i.css(b,u+2),r.element.find("> .k-overlay").remove(),r._shouldFocus(l)&&(r.element.focus(),e=n(window).scrollTop(),o=parseInt(i.position().top,10),o>0&&e>o&&(e>0?n(window).scrollTop(o):i.css("top",e))),i=null,r},toggleMaximization:function(){return this._closing?this:this[this.options.isMaximized?"restore":"maximize"]()},restore:function(){var t=this,i=t.options,u=i.minHeight,r=t.restoreOptions;return i.isMaximized||i.isMinimized?(u&&1/0!=u&&t.wrapper.css("min-height",u),t.wrapper.css({position:i.pinned?"fixed":"absolute",left:r.left,top:r.top,width:r.width,height:r.height}).removeClass(wt).find(".k-window-content,.k-resize-handle").show().end().find(".k-window-titlebar .k-i-restore").parent().remove().end().end().find(ti).parent().show().end().end().find(ot).parent().show(),t.options.width=r.width,t.options.height=r.height,n("html, body").css(p,""),this._documentScrollTop&&this._documentScrollTop>0&&n(document).scrollTop(this._documentScrollTop),i.isMaximized=i.isMinimized=!1,t.resize(),t):t},maximize:st("maximize",function(){var t=this,i=t.wrapper,r=i.position();l(t.restoreOptions,{left:r.left,top:r.top});i.css({left:0,top:0,position:"fixed"}).addClass(wt);this._documentScrollTop=n(document).scrollTop();n("html, body").css(p,it);t.options.isMaximized=!0;t._onDocumentResize()}),minimize:st("minimize",function(){var n=this;n.wrapper.css({height:"",minHeight:""});n.element.hide();n.options.isMinimized=!0}),pin:function(t){var i=this,u=n(window),r=i.wrapper,f=parseInt(r.css("top"),10),o=parseInt(r.css("left"),10);!t&&(i.options.pinned||i.options.isMaximized)||(r.css({position:"fixed",top:f-u.scrollTop(),left:o-u.scrollLeft()}),r.children(e).find(ii).addClass("k-i-unpin").removeClass("k-i-pin"),i.options.pinned=!0)},unpin:function(){var t=this,r=n(window),i=t.wrapper,u=parseInt(i.css("top"),10),f=parseInt(i.css("left"),10);t.options.pinned&&!t.options.isMaximized&&(i.css({position:"",top:u+r.scrollTop(),left:f+r.scrollLeft()}),i.children(e).find(ri).addClass("k-i-pin").removeClass("k-i-unpin"),t.options.pinned=!1)},_onDocumentResize:function(){var i,r,t=this,u=t.wrapper,f=n(window);t.options.isMaximized&&(i=f.width(),r=f.height()-parseInt(u.css("padding-top"),10),u.css({width:i,height:r}),t.options.width=i,t.options.height=r,t.resize())},refresh:function(t){var o,e,s,r=this,c=r.options,a=n(r.element);return at(t)||(t={url:t}),t=l({},c.content,t),e=d(c.iframe)?c.iframe:t.iframe,s=t.url,s?(d(e)||(e=!si(s)),e?(o=a.find("."+w)[0],o?o.src=s||o.src:a.html(f.contentFrame(l({},c,{content:t}))),a.find("."+w).unbind("load"+u).on("load"+u,i(this._triggerRefresh,this))):r._ajaxRequest(t)):(t.template&&r.content(h(t.template)({})),r.trigger(rt)),a.toggleClass("k-window-iframecontent",e),r},_triggerRefresh:function(){this.trigger(rt)},_ajaxComplete:function(){clearTimeout(this._loadingIconTimeout);this.wrapper.find(ui).removeClass(vt)},_ajaxError:function(n,t){this.trigger(ni,{status:t,xhr:n})},_ajaxSuccess:function(n){return function(t){n&&(t=h(n)(t||{}));this.content(t);this.element.prop("scrollTop",0);this.trigger(rt)}},_showLoading:function(){this.wrapper.find(ui).addClass(vt)},_ajaxRequest:function(t){this._loadingIconTimeout=setTimeout(i(this._showLoading,this),100);n.ajax(l({type:"GET",dataType:"html",cache:!1,error:i(this._ajaxError,this),complete:i(this._ajaxComplete,this),success:i(this._ajaxSuccess(t.template),this)},t))},destroy:function(){this.resizing&&this.resizing.destroy();this.dragging&&this.dragging.destroy();this.wrapper.off(u).children(s).off(u).end().find(".k-resize-handle,.k-window-titlebar").off(u);n(window).off("resize",this._resizeHandler);clearTimeout(this._loadingIconTimeout);g.fn.destroy.call(this);this.unbind(t);r.destroy(this.wrapper);this._removeOverlay(!0);this.wrapper.empty().remove();this.wrapper=this.appendTo=this.element=n()},_createWindow:function(){var e,i,t=this.element,u=this.options,o=r.support.isRtl(t);u.scrollable===!1&&t.attr("style","overflow:hidden;");i=n(f.wrapper(u));u.title!==!1&&i.append(f.titlebar(l(f,u)));e=t.find("iframe:not(.k-content)").map(function(){var n=this.getAttribute("src");return this.src="",n});i.toggleClass("k-rtl",o).appendTo(this.appendTo).append(t).find("iframe:not(.k-content)").each(function(n){this.src=e[n]});i.find(".k-window-title").css(o?"left":"right",i.find(".k-window-actions").outerWidth()+10);t.show();t.find("[data-role=editor]").each(function(){var t=n(this).data("kendoEditor");t&&t.refresh()});i=t=null}}),f={wrapper:h("<div class='k-widget k-window' />"),action:h("<a role='button' href='\\#' class='k-window-action k-link'><span role='presentation' class='k-icon k-i-#= name.toLowerCase() #'>#= name #<\/span><\/a>"),titlebar:h("<div class='k-window-titlebar k-header'>&nbsp;<span class='k-window-title'>#= title #<\/span><div class='k-window-actions'># for (var i = 0; i < actions.length; i++) { ##= action({ name: actions[i] }) ## } #<\/div><\/div>"),overlay:"<div class='k-overlay' />",contentFrame:h("<iframe frameborder='0' title='#= title #' class='"+w+"' src='#= content.url #'>This page requires frames in order to show content<\/iframe>"),resizeHandle:h("<div class='k-resize-handle k-resize-#= data #'><\/div>")};ht.prototype={dragstart:function(t){var u=this.owner,i=u.wrapper;this.elementPadding=parseInt(u.wrapper.css("padding-top"),10);this.initialCursorPosition=r.getOffset(i,"position");this.resizeDirection=t.currentTarget.prop("className").replace("k-resize-handle k-resize-","");this.initialSize={width:i.width(),height:i.height()};this.containerOffset=r.getOffset(u.appendTo);i.append(f.overlay).children(c).not(t.currentTarget).hide();n(nt).css(y,t.currentTarget.css(y))},drag:function(n){var i,r,l,a,u=this,f=u.owner,e=f.wrapper,t=f.options,s=u.resizeDirection,h=u.containerOffset,c=u.initialCursorPosition,v=u.initialSize,y=Math.max(n.x.location,h.left),p=Math.max(n.y.location,h.top);s.indexOf("e")>=0?(i=y-c.left,e.width(o(i,t.minWidth,t.maxWidth))):s.indexOf("w")>=0&&(a=c.left+v.width,i=o(a-y,t.minWidth,t.maxWidth),e.css({left:a-i-h.left,width:i}));s.indexOf("s")>=0?(r=p-c.top-u.elementPadding,e.height(o(r,t.minHeight,t.maxHeight))):s.indexOf("n")>=0&&(l=c.top+v.height,r=o(l-p,t.minHeight,t.maxHeight),e.css({top:l-r-h.top,height:r}));i&&(f.options.width=i+"px");r&&(f.options.height=r+"px");f.resize()},dragend:function(t){var i=this,r=i.owner,u=r.wrapper;return u.find(tt).remove().end().children(c).not(t.currentTarget).show(),n(nt).css(y,""),r.touchScroller&&r.touchScroller.reset(),27==t.keyCode&&u.css(i.initialCursorPosition).css(i.initialSize),!1},destroy:function(){this._draggable&&this._draggable.destroy();this._draggable=this.owner=null}};ct.prototype={dragstart:function(t){var i=this.owner,u=i.element,e=u.find(".k-window-actions"),o=r.getOffset(i.appendTo);i.trigger(dt);i.initialWindowPosition=r.getOffset(i.wrapper,"position");i.startPosition={left:t.x.client-i.initialWindowPosition.left,top:t.y.client-i.initialWindowPosition.top};i.minLeftPosition=e.length>0?e.outerWidth()+parseInt(e.css("right"),10)-u.outerWidth():20-u.outerWidth();i.minLeftPosition-=o.left;i.minTopPosition=-o.top;i.wrapper.append(f.overlay).children(c).hide();n(nt).css(y,t.currentTarget.css(y))},drag:function(t){var i=this.owner,r=i.options.position,u=Math.max(t.y.client-i.startPosition.top,i.minTopPosition),f=Math.max(t.x.client-i.startPosition.left,i.minLeftPosition),e={left:f,top:u};n(i.wrapper).css(e);r.top=u;r.left=f},_finishDrag:function(){var t=this.owner;t.wrapper.children(c).toggle(!t.options.isMinimized).end().find(tt).remove();n(nt).css(y,"")},dragcancel:function(n){this._finishDrag();n.currentTarget.closest(a).css(this.owner.initialWindowPosition)},dragend:function(){return this._finishDrag(),this.owner.trigger(gt),!1},destroy:function(){this._draggable&&this._draggable.destroy();this._draggable=this.owner=null}};r.ui.plugin(hi)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(n,t){t()});
  /*!
  * Fine Uploader
  *
  * Copyright 2013, Widen Enterprises, Inc. info@fineuploader.com
  *
  * Version: 4.2.2
  *
  * Homepage: http://fineuploader.com
  *
  * Repository: git://github.com/Widen/fine-uploader.git
  *
  * Licensed under GNU GPL v3, see LICENSE
  */
  qq=function(n){"use strict";return{hide:function(){return n.style.display="none",this},attach:function(t,i){return n.addEventListener?n.addEventListener(t,i,!1):n.attachEvent&&n.attachEvent("on"+t,i),function(){qq(n).detach(t,i)}},detach:function(t,i){return n.removeEventListener?n.removeEventListener(t,i,!1):n.attachEvent&&n.detachEvent("on"+t,i),this},contains:function(t){return t?n===t?!0:n.contains?n.contains(t):!!(8&t.compareDocumentPosition(n)):!1},insertBefore:function(t){return t.parentNode.insertBefore(n,t),this},remove:function(){return n.parentNode.removeChild(n),this},css:function(t){if(null==n.style)throw new qq.Error("Can't apply style to node as it is not on the HTMLElement prototype chain!");return null!=t.opacity&&"string"!=typeof n.style.opacity&&"undefined"!=typeof n.filters&&(t.filter="alpha(opacity="+Math.round(100*t.opacity)+")"),qq.extend(n.style,t),this},hasClass:function(t){var i=new RegExp("(^| )"+t+"( |$)");return i.test(n.className)},addClass:function(t){return qq(n).hasClass(t)||(n.className+=" "+t),this},removeClass:function(t){var i=new RegExp("(^| )"+t+"( |$)");return n.className=n.className.replace(i," ").replace(/^\s+|\s+$/g,""),this},getByClass:function(t){var i,r=[];return n.querySelectorAll?n.querySelectorAll("."+t):(i=n.getElementsByTagName("*"),qq.each(i,function(n,i){qq(i).hasClass(t)&&r.push(i)}),r)},children:function(){for(var i=[],t=n.firstChild;t;)1===t.nodeType&&i.push(t),t=t.nextSibling;return i},setText:function(t){return n.innerText=t,n.textContent=t,this},clearText:function(){return qq(n).setText("")},hasAttribute:function(t){var i;return n.hasAttribute?n.hasAttribute(t)?null==/^false$/i.exec(n.getAttribute(t)):!1:(i=n[t],void 0===i?!1:null==/^false$/i.exec(i))}}};!function(){"use strict";qq.log=function(n,t){window.console&&(t&&"info"!==t?window.console[t]?window.console[t](n):window.console.log("<"+t+"> "+n):window.console.log(n))};qq.isObject=function(n){return n&&!n.nodeType&&"[object Object]"===Object.prototype.toString.call(n)};qq.isFunction=function(n){return"function"==typeof n};qq.isArray=function(n){return"[object Array]"===Object.prototype.toString.call(n)||n&&window.ArrayBuffer&&n.buffer&&n.buffer.constructor===ArrayBuffer};qq.isItemList=function(n){return"[object DataTransferItemList]"===Object.prototype.toString.call(n)};qq.isNodeList=function(n){return"[object NodeList]"===Object.prototype.toString.call(n)||n.item&&n.namedItem};qq.isString=function(n){return"[object String]"===Object.prototype.toString.call(n)};qq.trimStr=function(n){return String.prototype.trim?n.trim():n.replace(/^\s+|\s+$/g,"")};qq.format=function(n){var r=Array.prototype.slice.call(arguments,1),t=n,i=t.indexOf("{}");return qq.each(r,function(n,r){var u=t.substring(0,i),f=t.substring(i+2);return t=u+r+f,i=t.indexOf("{}",i+r.length),0>i?!1:void 0}),t};qq.isFile=function(n){return window.File&&"[object File]"===Object.prototype.toString.call(n)};qq.isFileList=function(n){return window.FileList&&"[object FileList]"===Object.prototype.toString.call(n)};qq.isFileOrInput=function(n){return qq.isFile(n)||qq.isInput(n)};qq.isInput=function(n){return window.HTMLInputElement&&"[object HTMLInputElement]"===Object.prototype.toString.call(n)&&n.type&&"file"===n.type.toLowerCase()?!0:n.tagName&&"input"===n.tagName.toLowerCase()&&n.type&&"file"===n.type.toLowerCase()?!0:!1};qq.isBlob=function(n){return window.Blob&&"[object Blob]"===Object.prototype.toString.call(n)};qq.isXhrUploadSupported=function(){var n=document.createElement("input");return n.type="file",void 0!==n.multiple&&"undefined"!=typeof File&&"undefined"!=typeof FormData&&"undefined"!=typeof qq.createXhrInstance().upload};qq.createXhrInstance=function(){if(window.XMLHttpRequest)return new XMLHttpRequest;try{return new ActiveXObject("MSXML2.XMLHTTP.3.0")}catch(n){return qq.log("Neither XHR or ActiveX are supported!","error"),null}};qq.isFolderDropSupported=function(n){return n.items&&n.items[0].webkitGetAsEntry};qq.isFileChunkingSupported=function(){return!qq.android()&&qq.isXhrUploadSupported()&&(void 0!==File.prototype.slice||void 0!==File.prototype.webkitSlice||void 0!==File.prototype.mozSlice)};qq.sliceBlob=function(n,t,i){var r=n.slice||n.mozSlice||n.webkitSlice;return r.call(n,t,i)};qq.arrayBufferToHex=function(n){var t="",i=new Uint8Array(n);return qq.each(i,function(n,i){var r=i.toString(16);r.length<2&&(r="0"+r);t+=r}),t};qq.readBlobToHex=function(n,t,i){var f=qq.sliceBlob(n,t,t+i),r=new FileReader,u=new qq.Promise;return r.onload=function(){u.success(qq.arrayBufferToHex(r.result))},r.readAsArrayBuffer(f),u};qq.extend=function(n,t,i){return qq.each(t,function(t,r){i&&qq.isObject(r)?(void 0===n[t]&&(n[t]={}),qq.extend(n[t],r,!0)):n[t]=r}),n};qq.override=function(n,t){var i={},r=t(i);return qq.each(r,function(t,r){void 0!==n[t]&&(i[t]=n[t]);n[t]=r}),n};qq.indexOf=function(n,t,i){if(n.indexOf)return n.indexOf(t,i);i=i||0;var r=n.length;for(0>i&&(i+=r);r>i;i+=1)if(n.hasOwnProperty(i)&&n[i]===t)return i;return-1};qq.getUniqueId=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(n){var t=16*Math.random()|0,i="x"==n?t:3&t|8;return i.toString(16)})};qq.ie=function(){return-1!==navigator.userAgent.indexOf("MSIE")};qq.ie7=function(){return-1!==navigator.userAgent.indexOf("MSIE 7")};qq.ie10=function(){return-1!==navigator.userAgent.indexOf("MSIE 10")};qq.ie11=function(){return-1!==navigator.userAgent.indexOf("Trident")&&-1!==navigator.userAgent.indexOf("rv:11")};qq.safari=function(){return void 0!==navigator.vendor&&-1!==navigator.vendor.indexOf("Apple")};qq.chrome=function(){return void 0!==navigator.vendor&&-1!==navigator.vendor.indexOf("Google")};qq.opera=function(){return void 0!==navigator.vendor&&-1!==navigator.vendor.indexOf("Opera")};qq.firefox=function(){return!qq.ie11()&&-1!==navigator.userAgent.indexOf("Mozilla")&&void 0!==navigator.vendor&&""===navigator.vendor};qq.windows=function(){return"Win32"===navigator.platform};qq.android=function(){return-1!==navigator.userAgent.toLowerCase().indexOf("android")};qq.ios7=function(){return qq.ios()&&-1!==navigator.userAgent.indexOf(" OS 7_")};qq.ios=function(){return-1!==navigator.userAgent.indexOf("iPad")||-1!==navigator.userAgent.indexOf("iPod")||-1!==navigator.userAgent.indexOf("iPhone")};qq.preventDefault=function(n){n.preventDefault?n.preventDefault():n.returnValue=!1};qq.toElement=function(){var n=document.createElement("div");return function(t){n.innerHTML=t;var i=n.firstChild;return n.removeChild(i),i}}();qq.each=function(n,t){var i,r;if(n)if(window.Storage&&n.constructor===window.Storage)for(i=0;i<n.length&&(r=t(n.key(i),n.getItem(n.key(i))),r!==!1);i++);else if(qq.isArray(n)||qq.isItemList(n)||qq.isNodeList(n))for(i=0;i<n.length&&(r=t(i,n[i]),r!==!1);i++);else if(qq.isString(n))for(i=0;i<n.length&&(r=t(i,n.charAt(i)),r!==!1);i++);else for(i in n)if(Object.prototype.hasOwnProperty.call(n,i)&&(r=t(i,n[i]),r===!1))break};qq.bind=function(n,t){if(qq.isFunction(n)){var i=Array.prototype.slice.call(arguments,2);return function(){var r=qq.extend([],i);return arguments.length&&(r=r.concat(Array.prototype.slice.call(arguments))),n.apply(t,r)}}throw new Error("first parameter must be a function!");};qq.obj2url=function(n,t,i){var r=[],u="&",f=function(n,i){var u=t?/\[\]$/.test(t)?t:t+"["+i+"]":i;"undefined"!==u&&"undefined"!==i&&r.push("object"==typeof n?qq.obj2url(n,u,!0):"[object Function]"===Object.prototype.toString.call(n)?encodeURIComponent(u)+"="+encodeURIComponent(n()):encodeURIComponent(u)+"="+encodeURIComponent(n))};return!i&&t?(u=/\?/.test(t)?/\?$/.test(t)?"":"&":"?",r.push(t),r.push(qq.obj2url(n))):"[object Array]"===Object.prototype.toString.call(n)&&"undefined"!=typeof n?qq.each(n,function(n,t){f(t,n)}):"undefined"!=typeof n&&null!==n&&"object"==typeof n?qq.each(n,function(n,t){f(t,n)}):r.push(encodeURIComponent(t)+"="+encodeURIComponent(n)),t?r.join(u):r.join(u).replace(/^&/,"").replace(/%20/g,"+")};qq.obj2FormData=function(n,t,i){return t||(t=new FormData),qq.each(n,function(n,r){n=i?i+"["+n+"]":n;qq.isObject(r)?qq.obj2FormData(r,t,n):qq.isFunction(r)?t.append(n,r()):t.append(n,r)}),t};qq.obj2Inputs=function(n,t){var i;return t||(t=document.createElement("form")),qq.obj2FormData(n,{append:function(n,r){i=document.createElement("input");i.setAttribute("name",n);i.setAttribute("value",r);t.appendChild(i)}}),t};qq.setCookie=function(n,t,i){var r=new Date,u="";i&&(r.setTime(r.getTime()+864e5*i),u="; expires="+r.toGMTString());document.cookie=n+"="+t+u+"; path=/"};qq.getCookie=function(n){var t,i=n+"=",r=document.cookie.split(";");return qq.each(r,function(n,r){for(var u=r;" "==u.charAt(0);)u=u.substring(1,u.length);if(0===u.indexOf(i))return(t=u.substring(i.length,u.length),!1)}),t};qq.getCookieNames=function(n){var i=document.cookie.split(";"),t=[];return qq.each(i,function(i,r){r=qq.trimStr(r);var u=r.indexOf("=");r.match(n)&&t.push(r.substr(0,u))}),t};qq.deleteCookie=function(n){qq.setCookie(n,"",-1)};qq.areCookiesEnabled=function(){var t=1e5*Math.random(),n="qqCookieTest:"+t;return qq.setCookie(n,1),qq.getCookie(n)?(qq.deleteCookie(n),!0):!1};qq.parseJson=function(n){return window.JSON&&qq.isFunction(JSON.parse)?JSON.parse(n):eval("("+n+")")};qq.getExtension=function(n){var t=n.lastIndexOf(".")+1;if(t>0)return n.substr(t,n.length-t)};qq.getFilename=function(n){return qq.isInput(n)?n.value.replace(/.*(\/|\\)/,""):qq.isFile(n)&&null!==n.fileName&&void 0!==n.fileName?n.fileName:n.name};qq.DisposeSupport=function(){var n=[];return{dispose:function(){var t;do t=n.shift(),t&&t();while(t)},attach:function(){var n=arguments;this.addDisposer(qq(n[0]).attach.apply(this,Array.prototype.slice.call(arguments,1)))},addDisposer:function(t){n.push(t)}}}}(),function(){"use strict";qq.Error=function(n){this.message=n};qq.Error.prototype=new Error}();qq.version="4.2.2";qq.supportedFeatures=function(){"use strict";function y(){var n,t=!0;try{n=document.createElement("input");n.type="file";qq(n).hide();n.disabled&&(t=!1)}catch(i){t=!1}return t}function p(){return(qq.chrome()||qq.opera())&&void 0!==navigator.userAgent.match(/Chrome\/[2][1-9]|Chrome\/[3-9][0-9]/)}function w(){return(qq.chrome()||qq.opera())&&void 0!==navigator.userAgent.match(/Chrome\/[1][4-9]|Chrome\/[2-9][0-9]/)}function u(){if(window.XMLHttpRequest){var n=qq.createXhrInstance();return void 0!==n.withCredentials}return!1}function f(){return void 0!==window.XDomainRequest}function b(){return u()?!0:f()}function k(){return void 0!==document.createElement("input").webkitdirectory}var t,n,e,i,o,s,h,c,l,a,v,r;return t=y(),n=t&&qq.isXhrUploadSupported(),e=n&&p(),i=n&&qq.isFileChunkingSupported(),o=n&&i&&qq.areCookiesEnabled(),s=n&&w(),h=t&&(void 0!==window.postMessage||n),l=u(),c=f(),a=b(),v=k(),r=n&&void 0!==window.FileReader,{uploading:t,ajaxUploading:n,fileDrop:n,folderDrop:e,chunking:i,resume:o,uploadCustomHeaders:n,uploadNonMultipart:n,itemSizeValidation:n,uploadViaPaste:s,progressBar:n,uploadCors:h,deleteFileCorsXhr:l,deleteFileCorsXdr:c,deleteFileCors:a,canDetermineSize:n,folderSelection:v,imagePreviews:r,imageValidation:r,pause:i}}();qq.Promise=function(){"use strict";var t,n,u=[],f=[],i=[],r=0;qq.extend(this,{then:function(i,e){return 0===r?(i&&u.push(i),e&&f.push(e)):-1===r?e&&e.apply(null,n):i&&i.apply(null,t),this},done:function(u){return 0===r?i.push(u):u.apply(null,void 0===n?t:n),this},success:function(){return r=1,t=arguments,u.length&&qq.each(u,function(n,i){i.apply(null,t)}),i.length&&qq.each(i,function(n,i){i.apply(null,t)}),this},failure:function(){return r=-1,n=arguments,f.length&&qq.each(f,function(t,i){i.apply(null,n)}),i.length&&qq.each(i,function(t,i){i.apply(null,n)}),this}})};qq.UploadButton=function(n){"use strict";function f(){var n=document.createElement("input");return n.setAttribute(qq.UploadButton.BUTTON_ID_ATTR_NAME,u),t.multiple&&n.setAttribute("multiple",""),t.folders&&qq.supportedFeatures.folderSelection&&n.setAttribute("webkitdirectory",""),t.acceptFiles&&n.setAttribute("accept",t.acceptFiles),n.setAttribute("type","file"),n.setAttribute("name",t.name),qq(n).css({position:"absolute",right:0,top:0,fontFamily:"Arial",fontSize:"118px",margin:0,padding:0,cursor:"pointer",opacity:0}),t.element.appendChild(n),r.attach(n,"change",function(){t.onChange(n)}),r.attach(n,"mouseover",function(){qq(t.element).addClass(t.hoverClass)}),r.attach(n,"mouseout",function(){qq(t.element).removeClass(t.hoverClass)}),r.attach(n,"focus",function(){qq(t.element).addClass(t.focusClass)}),r.attach(n,"blur",function(){qq(t.element).removeClass(t.focusClass)}),window.attachEvent&&n.setAttribute("tabIndex","-1"),n}var i,u,r=new qq.DisposeSupport,t={element:null,multiple:!1,acceptFiles:null,folders:!1,name:"qqfile",onChange:function(){},hoverClass:"qq-upload-button-hover",focusClass:"qq-upload-button-focus"};qq.extend(t,n);u=qq.getUniqueId();qq(t.element).css({position:"relative",overflow:"hidden",direction:"ltr"});i=f();qq.extend(this,{getInput:function(){return i},getButtonId:function(){return u},setMultiple:function(n){n!==t.multiple&&(n?i.setAttribute("multiple",""):i.removeAttribute("multiple"))},setAcceptFiles:function(n){n!==t.acceptFiles&&i.setAttribute("accept",n)},reset:function(){i.parentNode&&qq(i).remove();qq(t.element).removeClass(t.focusClass);i=f()}})};qq.UploadButton.BUTTON_ID_ATTR_NAME="qq-button-id";qq.UploadData=function(n){"use strict";function u(n){if(qq.isArray(n)){var i=[];return qq.each(n,function(n,r){i.push(t[r])}),i}return t[n]}function f(n){if(qq.isArray(n)){var i=[];return qq.each(n,function(n,u){i.push(t[r[u]])}),i}return t[r[n]]}function e(n){var r=[],u=[].concat(n);return qq.each(u,function(n,u){var f=i[u];void 0!==f&&qq.each(f,function(n,i){r.push(t[i])})}),r}var t=[],r={},i={};qq.extend(this,{addFile:function(u,f,e,o){o=o||qq.status.SUBMITTING;var s=t.push({name:f,originalName:f,uuid:u,size:e,status:o})-1;return t[s].id=s,r[u]=s,void 0===i[o]&&(i[o]=[]),i[o].push(s),n.onStatusChange(s,null,o),s},retrieve:function(n){return qq.isObject(n)&&t.length?void 0!==n.id?u(n.id):void 0!==n.uuid?f(n.uuid):n.status?e(n.status):void 0:qq.extend([],t,!0)},reset:function(){t=[];r={};i={}},setStatus:function(r,u){var f=t[r].status,e=qq.indexOf(i[f],r);i[f].splice(e,1);t[r].status=u;void 0===i[u]&&(i[u]=[]);i[u].push(r);n.onStatusChange(r,f,u)},uuidChanged:function(n,i){var u=t[n].uuid;t[n].uuid=i;r[i]=n;delete r[u]},updateName:function(n,i){t[n].name=i}})};qq.status={SUBMITTING:"submitting",SUBMITTED:"submitted",REJECTED:"rejected",QUEUED:"queued",CANCELED:"canceled",PAUSED:"paused",UPLOADING:"uploading",UPLOAD_RETRYING:"retrying upload",UPLOAD_SUCCESSFUL:"upload successful",UPLOAD_FAILED:"upload failed",DELETE_FAILED:"delete failed",DELETING:"deleting",DELETED:"deleted"},function(){"use strict";qq.basePublicApi={log:function(n,t){!this._options.debug||t&&"info"!==t?t&&"info"!==t&&qq.log("[FineUploader "+qq.version+"] "+n,t):qq.log("[FineUploader "+qq.version+"] "+n)},setParams:function(n,t){null==t?this._options.request.params=n:this._paramsStore.setParams(n,t)},setDeleteFileParams:function(n,t){null==t?this._options.deleteFile.params=n:this._deleteFileParamsStore.setParams(n,t)},setEndpoint:function(n,t){null==t?this._options.request.endpoint=n:this._endpointStore.setEndpoint(n,t)},getInProgress:function(){return this._uploadData.retrieve({status:[qq.status.UPLOADING,qq.status.UPLOAD_RETRYING,qq.status.QUEUED]}).length},getNetUploads:function(){return this._netUploaded},uploadStoredFiles:function(){var n;if(0===this._storedIds.length)this._itemError("noFilesError");else for(;this._storedIds.length;)n=this._storedIds.shift(),this._uploadFile(n)},clearStoredFiles:function(){this._storedIds=[]},retry:function(n){return this._manualRetry(n)},cancel:function(n){this._handler.cancel(n)},cancelAll:function(){var n=[],t=this;qq.extend(n,this._storedIds);qq.each(n,function(n,i){t.cancel(i)});this._handler.cancelAll()},reset:function(){this.log("Resetting uploader...");this._handler.reset();this._storedIds=[];this._autoRetries=[];this._retryTimeouts=[];this._preventRetries=[];this._thumbnailUrls=[];qq.each(this._buttons,function(n,t){t.reset()});this._paramsStore.reset();this._endpointStore.reset();this._netUploadedOrQueued=0;this._netUploaded=0;this._uploadData.reset();this._buttonIdsForFileIds=[];this._pasteHandler&&this._pasteHandler.reset();this._options.session.refreshOnReset&&this._refreshSessionData()},addFiles:function(n,t,i){var u,r,f,e=[];if(n){for(qq.isFileList(n)||(n=[].concat(n)),u=0;u<n.length;u+=1)if(r=n[u],qq.isFileOrInput(r))if(qq.isInput(r)&&qq.supportedFeatures.ajaxUploading)for(f=0;f<r.files.length;f++)this._handleNewFile(r.files[f],e);else this._handleNewFile(r,e);else this.log(r+" is not a File or INPUT element!  Ignoring!","warn");this.log("Received "+e.length+" files or inputs.");this._prepareItemsForUpload(e,t,i)}},addBlobs:function(n,t,i){if(n){var f=[].concat(n),u=[],r=this;qq.each(f,function(n,t){var i;qq.isBlob(t)&&!qq.isFileOrInput(t)?i={blob:t,name:r._options.blobs.defaultName}:qq.isObject(t)&&t.blob&&t.name?i=t:r.log("addBlobs: entry at index "+n+" is not a Blob or a BlobData object","error");i&&r._handleNewFile(i,u)});this._prepareItemsForUpload(u,t,i)}else this.log("undefined or non-array parameter passed into addBlobs","error")},getUuid:function(n){return this._uploadData.retrieve({id:n}).uuid},setUuid:function(n,t){return this._uploadData.uuidChanged(n,t)},getResumableFilesData:function(){return this._handler.getResumableFilesData()},getSize:function(n){return this._uploadData.retrieve({id:n}).size},getName:function(n){return this._uploadData.retrieve({id:n}).name},setName:function(n,t){this._uploadData.updateName(n,t)},getFile:function(n){return this._handler.getFile(n)},deleteFile:function(n){this._onSubmitDelete(n)},setDeleteFileEndpoint:function(n,t){null==t?this._options.deleteFile.endpoint=n:this._deleteFileEndpointStore.setEndpoint(n,t)},doesExist:function(n){return this._handler.isValid(n)},getUploads:function(n){return this._uploadData.retrieve(n)},getButton:function(n){return this._getButton(this._buttonIdsForFileIds[n])},drawThumbnail:function(n,t,i,r){if(this._imageGenerator){var u=this._thumbnailUrls[n],f={scale:i>0,maxSize:i>0?i:null};return!r&&qq.supportedFeatures.imagePreviews&&(u=this.getFile(n)),null==u?(new qq.Promise).failure(t,"File or URL not found."):this._imageGenerator.generate(u,t,f)}},pauseUpload:function(n){var t=this._uploadData.retrieve({id:n});if(!qq.supportedFeatures.pause||!this._options.chunking.enabled)return!1;if(qq.indexOf([qq.status.UPLOADING,qq.status.UPLOAD_RETRYING],t.status)>=0){if(this._handler.pause(n))return this._uploadData.setStatus(n,qq.status.PAUSED),!0;qq.log(qq.format("Unable to pause file ID {} ({}).",n,this.getName(n)),"error")}else qq.log(qq.format("Ignoring pause for file ID {} ({}).  Not in progress.",n,this.getName(n)),"error");return!1},continueUpload:function(n){var t=this._uploadData.retrieve({id:n});return qq.supportedFeatures.pause&&this._options.chunking.enabled?t.status===qq.status.PAUSED?(qq.log(qq.format("Paused file ID {} ({}) will be continued.  Not paused.",n,this.getName(n))),this._uploadFile(n),!0):(qq.log(qq.format("Ignoring continue for file ID {} ({}).  Not paused.",n,this.getName(n)),"error"),!1):!1},getRemainingAllowedItems:function(){var n=this._options.validation.itemLimit;return n>0?this._options.validation.itemLimit-this._netUploadedOrQueued:null}};qq.basePrivateApi={_uploadFile:function(n){this._handler.upload(n)||this._uploadData.setStatus(n,qq.status.QUEUED)},_refreshSessionData:function(){var t=this,n=this._options.session;qq.Session&&null!=this._options.session.endpoint&&(this._session||(qq.extend(n,this._options.cors),n.log=qq.bind(this.log,this),n.addFileRecord=qq.bind(this._addCannedFile,this),this._session=new qq.Session(n)),setTimeout(function(){t._session.refresh().then(function(n,i){t._options.callbacks.onSessionRequestComplete(n,!0,i)},function(n,i){t._options.callbacks.onSessionRequestComplete(n,!1,i)})},0))},_addCannedFile:function(n){var t=this._uploadData.addFile(n.uuid,n.name,n.size,qq.status.UPLOAD_SUCCESSFUL);return n.deleteFileEndpoint&&this.setDeleteFileEndpoint(n.deleteFileEndpoint,t),n.deleteFileParams&&this.setDeleteFileParams(n.deleteFileParams,t),n.thumbnailUrl&&(this._thumbnailUrls[t]=n.thumbnailUrl),this._netUploaded++,this._netUploadedOrQueued++,t},_handleNewFile:function(n,t){var i,r=-1,u=qq.getUniqueId(),f=qq.getFilename(n);n.size>=0?r=n.size:n.blob&&(r=n.blob.size);i=this._uploadData.addFile(u,f,r);this._handler.add(i,n);this._netUploadedOrQueued++;t.push({id:i,file:n})},_generateExtraButtonSpecs:function(){var n=this;this._extraButtonSpecs={};qq.each(this._options.extraButtons,function(t,i){var r=i.multiple,f=qq.extend({},n._options.validation,!0),u=qq.extend({},i);void 0===r&&(r=n._options.multiple);u.validation&&qq.extend(f,i.validation,!0);qq.extend(u,{multiple:r,validation:f},!0);n._initExtraButton(u)})},_initExtraButton:function(n){var t=this._createUploadButton({element:n.element,multiple:n.multiple,accept:n.validation.acceptFiles,folders:n.folders,allowedExtensions:n.validation.allowedExtensions});this._extraButtonSpecs[t.getButtonId()]=n},_getButtonId:function(n){var i,t;if(n&&!n.blob&&!qq.isBlob(n)){if(qq.isFile(n))return n.qqButtonId;if("input"===n.tagName.toLowerCase()&&"file"===n.type.toLowerCase())return n.getAttribute(qq.UploadButton.BUTTON_ID_ATTR_NAME);if(i=n.getElementsByTagName("input"),qq.each(i,function(n,i){if("file"===i.getAttribute("type"))return(t=i,!1)}),t)return t.getAttribute(qq.UploadButton.BUTTON_ID_ATTR_NAME)}},_annotateWithButtonId:function(n,t){qq.isFile(n)&&(n.qqButtonId=this._getButtonId(t))},_getButton:function(n){var t=this._extraButtonSpecs[n];return t?t.element:n===this._defaultButtonId?this._options.button:void 0},_handleCheckedCallback:function(n){var i=this,t=n.callback();return t instanceof qq.Promise?(this.log(n.name+" - waiting for "+n.name+" promise to be fulfilled for "+n.identifier),t.then(function(t){i.log(n.name+" promise success for "+n.identifier);n.onSuccess(t)},function(){n.onFailure?(i.log(n.name+" promise failure for "+n.identifier),n.onFailure()):i.log(n.name+" promise failure for "+n.identifier)})):(t!==!1?n.onSuccess(t):n.onFailure?(this.log(n.name+" - return value was 'false' for "+n.identifier+".  Invoking failure callback."),n.onFailure()):this.log(n.name+" - return value was 'false' for "+n.identifier+".  Will not proceed."),t)},_createUploadButton:function(n){function r(){return qq.supportedFeatures.ajaxUploading?qq.ios7()&&t._isAllowedExtension(f,".mov")?!1:void 0===n.multiple?t._options.multiple:n.multiple:!1}var t=this,u=n.accept||this._options.validation.acceptFiles,f=n.allowedExtensions||this._options.validation.allowedExtensions,i=new qq.UploadButton({element:n.element,folders:n.folders,name:this._options.request.inputName,multiple:r(),acceptFiles:u,onChange:function(n){t._onInputChange(n)},hoverClass:this._options.classes.buttonHover,focusClass:this._options.classes.buttonFocus});return this._disposeSupport.addDisposer(function(){i.dispose()}),t._buttons.push(i),i},_createUploadHandler:function(n,t){var i=this,r={debug:this._options.debug,maxConnections:this._options.maxConnections,cors:this._options.cors,demoMode:this._options.demoMode,paramsStore:this._paramsStore,endpointStore:this._endpointStore,chunking:this._options.chunking,resume:this._options.resume,blobs:this._options.blobs,log:qq.bind(i.log,i),onProgress:function(n,t,r,u){i._onProgress(n,t,r,u);i._options.callbacks.onProgress(n,t,r,u)},onComplete:function(n,t,r,u){var f=i._onComplete(n,t,r,u);f instanceof qq.Promise?f.done(function(){i._options.callbacks.onComplete(n,t,r,u)}):i._options.callbacks.onComplete(n,t,r,u)},onCancel:function(n,t){return i._handleCheckedCallback({name:"onCancel",callback:qq.bind(i._options.callbacks.onCancel,i,n,t),onSuccess:qq.bind(i._onCancel,i,n,t),identifier:n})},onUpload:function(n,t){i._onUpload(n,t);i._options.callbacks.onUpload(n,t)},onUploadChunk:function(n,t,r){i._onUploadChunk(n,r);i._options.callbacks.onUploadChunk(n,t,r)},onUploadChunkSuccess:function(){i._options.callbacks.onUploadChunkSuccess.apply(i,arguments)},onResume:function(n,t,r){return i._options.callbacks.onResume(n,t,r)},onAutoRetry:function(){return i._onAutoRetry.apply(i,arguments)},onUuidChanged:function(n,t){i.log("Server requested UUID change from '"+i.getUuid(n)+"' to '"+t+"'");i.setUuid(n,t)},getName:qq.bind(i.getName,i),getUuid:qq.bind(i.getUuid,i),getSize:qq.bind(i.getSize,i)};return qq.each(this._options.request,function(n,t){r[n]=t}),n&&qq.each(n,function(n,t){r[n]=t}),new qq.UploadHandler(r,t)},_createDeleteHandler:function(){var n=this;return new qq.DeleteFileAjaxRequester({method:this._options.deleteFile.method.toUpperCase(),maxConnections:this._options.maxConnections,uuidParamName:this._options.request.uuidName,customHeaders:this._options.deleteFile.customHeaders,paramsStore:this._deleteFileParamsStore,endpointStore:this._deleteFileEndpointStore,demoMode:this._options.demoMode,cors:this._options.cors,log:qq.bind(n.log,n),onDelete:function(t){n._onDelete(t);n._options.callbacks.onDelete(t)},onDeleteComplete:function(t,i,r){n._onDeleteComplete(t,i,r);n._options.callbacks.onDeleteComplete(t,i,r)}})},_createPasteHandler:function(){var n=this;return new qq.PasteSupport({targetElement:this._options.paste.targetElement,callbacks:{log:qq.bind(n.log,n),pasteReceived:function(t){n._handleCheckedCallback({name:"onPasteReceived",callback:qq.bind(n._options.callbacks.onPasteReceived,n,t),onSuccess:qq.bind(n._handlePasteSuccess,n,t),identifier:"pasted image"})}}})},_createUploadDataTracker:function(){var n=this;return new qq.UploadData({getName:function(t){return n.getName(t)},getUuid:function(t){return n.getUuid(t)},getSize:function(t){return n.getSize(t)},onStatusChange:function(t,i,r){n._onUploadStatusChange(t,i,r);n._options.callbacks.onStatusChange(t,i,r)}})},_onUploadStatusChange:function(n,t,i){i===qq.status.PAUSED&&clearTimeout(this._retryTimeouts[n])},_handlePasteSuccess:function(n,t){var r=n.type.split("/")[1],i=t;null==i&&(i=this._options.paste.defaultName);i+="."+r;this.addBlobs({name:i,blob:n})},_preventLeaveInProgress:function(){var n=this;this._disposeSupport.attach(window,"beforeunload",function(t){if(n.getInProgress())return(t=t||window.event,t.returnValue=n._options.messages.onLeave,n._options.messages.onLeave)})},_onSubmit:function(){},_onProgress:function(){},_onComplete:function(n,t,i,r){return i.success?(i.thumbnailUrl&&(this._thumbnailUrls[n]=i.thumbnailUrl),this._netUploaded++,this._uploadData.setStatus(n,qq.status.UPLOAD_SUCCESSFUL)):(this._netUploadedOrQueued--,this._uploadData.setStatus(n,qq.status.UPLOAD_FAILED)),this._maybeParseAndSendUploadError(n,t,i,r),i.success?!0:!1},_onCancel:function(n){this._netUploadedOrQueued--;clearTimeout(this._retryTimeouts[n]);var t=qq.indexOf(this._storedIds,n);!this._options.autoUpload&&t>=0&&this._storedIds.splice(t,1);this._uploadData.setStatus(n,qq.status.CANCELED)},_isDeletePossible:function(){return qq.DeleteFileAjaxRequester&&this._options.deleteFile.enabled?this._options.cors.expected?qq.supportedFeatures.deleteFileCorsXhr?!0:qq.supportedFeatures.deleteFileCorsXdr&&this._options.cors.allowXdr?!0:!1:!0:!1},_onSubmitDelete:function(n,t,i){var r,u=this.getUuid(n);return t&&(r=qq.bind(t,this,n,u,i)),this._isDeletePossible()?this._handleCheckedCallback({name:"onSubmitDelete",callback:qq.bind(this._options.callbacks.onSubmitDelete,this,n),onSuccess:r||qq.bind(this._deleteHandler.sendDelete,this,n,u,i),identifier:n}):(this.log("Delete request ignored for ID "+n+", delete feature is disabled or request not possible due to CORS on a user agent that does not support pre-flighting.","warn"),!1)},_onDelete:function(n){this._uploadData.setStatus(n,qq.status.DELETING)},_onDeleteComplete:function(n,t,i){var r=this.getName(n);i?(this._uploadData.setStatus(n,qq.status.DELETE_FAILED),this.log("Delete request for '"+r+"' has failed.","error"),void 0===t.withCredentials?this._options.callbacks.onError(n,r,"Delete request failed",t):this._options.callbacks.onError(n,r,"Delete request failed with response code "+t.status,t)):(this._netUploadedOrQueued--,this._netUploaded--,this._handler.expunge(n),this._uploadData.setStatus(n,qq.status.DELETED),this.log("Delete request for '"+r+"' has succeeded."))},_onUpload:function(n){this._uploadData.setStatus(n,qq.status.UPLOADING)},_onUploadChunk:function(){},_onInputChange:function(n){var t;if(qq.supportedFeatures.ajaxUploading){for(t=0;t<n.files.length;t++)this._annotateWithButtonId(n.files[t],n);this.addFiles(n.files)}else n.value.length>0&&this.addFiles(n);qq.each(this._buttons,function(n,t){t.reset()})},_onBeforeAutoRetry:function(n,t){this.log("Waiting "+this._options.retry.autoAttemptDelay+" seconds before retrying "+t+"...")},_onAutoRetry:function(n,t,i,r,u){var f=this;return f._preventRetries[n]=i[f._options.retry.preventRetryResponseProperty],f._shouldAutoRetry(n,t,i)?(f._maybeParseAndSendUploadError.apply(f,arguments),f._options.callbacks.onAutoRetry(n,t,f._autoRetries[n]+1),f._onBeforeAutoRetry(n,t),f._retryTimeouts[n]=setTimeout(function(){f.log("Retrying "+t+"...");f._autoRetries[n]++;f._uploadData.setStatus(n,qq.status.UPLOAD_RETRYING);u?u(n):f._handler.retry(n)},1e3*f._options.retry.autoAttemptDelay),!0):void 0},_shouldAutoRetry:function(n){var t=this._uploadData.retrieve({id:n});return!this._preventRetries[n]&&this._options.retry.enableAuto&&t.status!==qq.status.PAUSED?(void 0===this._autoRetries[n]&&(this._autoRetries[n]=0),this._autoRetries[n]<this._options.retry.maxAutoAttempts):!1},_onBeforeManualRetry:function(n){var i=this._options.validation.itemLimit,t;return this._preventRetries[n]?(this.log("Retries are forbidden for id "+n,"warn"),!1):this._handler.isValid(n)?(t=this.getName(n),this._options.callbacks.onManualRetry(n,t)===!1?!1:i>0&&this._netUploadedOrQueued+1>i?(this._itemError("retryFailTooManyItems"),!1):(this.log("Retrying upload for '"+t+"' (id: "+n+")..."),!0)):(this.log("'"+n+"' is not a valid file ID","error"),!1)},_manualRetry:function(n,t){if(this._onBeforeManualRetry(n))return(this._netUploadedOrQueued++,this._uploadData.setStatus(n,qq.status.UPLOAD_RETRYING),t?t(n):this._handler.retry(n),!0)},_maybeParseAndSendUploadError:function(n,t,i,r){if(!i.success)if(r&&200!==r.status&&!i.error)this._options.callbacks.onError(n,t,"XHR returned response code "+r.status,r);else{var u=i.error?i.error:this._options.text.defaultResponseError;this._options.callbacks.onError(n,t,u,r)}},_prepareItemsForUpload:function(n,t,i){var r=this._getValidationDescriptors(n),f=this._getButtonId(n[0].file),u=this._getButton(f);this._handleCheckedCallback({name:"onValidateBatch",callback:qq.bind(this._options.callbacks.onValidateBatch,this,r,u),onSuccess:qq.bind(this._onValidateBatchCallbackSuccess,this,r,n,t,i,u),onFailure:qq.bind(this._onValidateBatchCallbackFailure,this,n),identifier:"batch validation"})},_upload:function(n,t,i){var r=this.getName(n);t&&this.setParams(t,n);i&&this.setEndpoint(i,n);this._handleCheckedCallback({name:"onSubmit",callback:qq.bind(this._options.callbacks.onSubmit,this,n,r),onSuccess:qq.bind(this._onSubmitCallbackSuccess,this,n,r),onFailure:qq.bind(this._fileOrBlobRejected,this,n,r),identifier:n})},_onSubmitCallbackSuccess:function(n){var t;t=qq.supportedFeatures.ajaxUploading?this._handler.getFile(n).qqButtonId:this._getButtonId(this._handler.getInput(n));t&&(this._buttonIdsForFileIds[n]=t);this._onSubmit.apply(this,arguments);this._uploadData.setStatus(n,qq.status.SUBMITTED);this._onSubmitted.apply(this,arguments);this._options.callbacks.onSubmitted.apply(this,arguments);this._options.autoUpload?this._uploadFile(n):this._storeForLater(n)},_onSubmitted:function(){},_storeForLater:function(n){this._storedIds.push(n)},_onValidateBatchCallbackSuccess:function(n,t,i,r,u){var e,f=this._options.validation.itemLimit,o=this._netUploadedOrQueued;0===f||f>=o?t.length>0?this._handleCheckedCallback({name:"onValidate",callback:qq.bind(this._options.callbacks.onValidate,this,n[0],u),onSuccess:qq.bind(this._onValidateCallbackSuccess,this,t,0,i,r),onFailure:qq.bind(this._onValidateCallbackFailure,this,t,0,i,r),identifier:"Item '"+t[0].file.name+"', size: "+t[0].file.size}):this._itemError("noFilesError"):(this._onValidateBatchCallbackFailure(t),e=this._options.messages.tooManyItemsError.replace(/\{netItems\}/g,o).replace(/\{itemLimit\}/g,f),this._batchError(e))},_onValidateBatchCallbackFailure:function(n){var t=this;qq.each(n,function(n,i){t._fileOrBlobRejected(i.id)})},_onValidateCallbackSuccess:function(n,t,i,r){var u=this,f=t+1,e=this._getValidationDescriptor(n[t].file);this._validateFileOrBlobData(n[t],e).then(function(){u._upload(n[t].id,i,r);u._maybeProcessNextItemAfterOnValidateCallback(!0,n,f,i,r)},function(){u._maybeProcessNextItemAfterOnValidateCallback(!1,n,f,i,r)})},_onValidateCallbackFailure:function(n,t,i,r){var u=t+1;this._fileOrBlobRejected(n[0].id,n[0].file.name);this._maybeProcessNextItemAfterOnValidateCallback(!1,n,u,i,r)},_maybeProcessNextItemAfterOnValidateCallback:function(n,t,i,r,u){var f=this;if(t.length>i)if(n||!this._options.validation.stopOnFirstInvalidFile)setTimeout(function(){var n=f._getValidationDescriptor(t[i].file);f._handleCheckedCallback({name:"onValidate",callback:qq.bind(f._options.callbacks.onValidate,f,t[i].file),onSuccess:qq.bind(f._onValidateCallbackSuccess,f,t,i,r,u),onFailure:qq.bind(f._onValidateCallbackFailure,f,t,i,r,u),identifier:"Item '"+n.name+"', size: "+n.size})},0);else if(!n)for(;i<t.length;i++)f._fileOrBlobRejected(t[i].id)},_validateFileOrBlobData:function(n,t){var o=this,i=n.file,u=t.name,f=t.size,s=this._getButtonId(i),e=this._getValidationBase(s),r=new qq.Promise;return r.then(function(){},function(){o._fileOrBlobRejected(n.id,u)}),qq.isFileOrInput(i)&&!this._isAllowedExtension(e.allowedExtensions,u)?(this._itemError("typeError",u,i),r.failure()):0===f?(this._itemError("emptyError",u,i),r.failure()):f&&e.sizeLimit&&f>e.sizeLimit?(this._itemError("sizeError",u,i),r.failure()):f&&f<e.minSizeLimit?(this._itemError("minSizeError",u,i),r.failure()):(qq.ImageValidation&&qq.supportedFeatures.imagePreviews&&qq.isFile(i)?new qq.ImageValidation(i,qq.bind(o.log,o)).validate(e.image).then(r.success,function(n){o._itemError(n+"ImageError",u,i);r.failure()}):r.success(),r)},_fileOrBlobRejected:function(n){this._netUploadedOrQueued--;this._uploadData.setStatus(n,qq.status.REJECTED)},_itemError:function(n,t,i){function r(n,t){u=u.replace(n,t)}var o,f,u=this._options.messages[n],s=[],h=[].concat(t),c=h[0],l=this._getButtonId(i),e=this._getValidationBase(l);return qq.each(e.allowedExtensions,function(n,t){qq.isString(t)&&s.push(t)}),o=s.join(", ").toLowerCase(),r("{file}",this._options.formatFileName(c)),r("{extensions}",o),r("{sizeLimit}",this._formatSize(e.sizeLimit)),r("{minSizeLimit}",this._formatSize(e.minSizeLimit)),f=u.match(/(\{\w+\})/g),null!==f&&qq.each(f,function(n,t){r(t,h[n])}),this._options.callbacks.onError(null,c,u,void 0),u},_batchError:function(n){this._options.callbacks.onError(null,null,n,void 0)},_isAllowedExtension:function(n,t){var i=!1;return n.length?(qq.each(n,function(n,r){if(qq.isString(r)){var u=new RegExp("\\."+r+"$","i");if(null!=t.match(u))return i=!0,!1}}),i):!0},_formatSize:function(n){var t=-1;do n/=1e3,t++;while(n>999);return Math.max(n,.1).toFixed(1)+this._options.text.sizeSymbols[t]},_wrapCallbacks:function(){var n,t,i;n=this;t=function(t,i,r){var u;try{return i.apply(n,r)}catch(f){u=f.message||f.toString();n.log("Caught exception in '"+t+"' callback - "+u,"error")}};for(i in this._options.callbacks)!function(){var r,u;r=i;u=n._options.callbacks[r];n._options.callbacks[r]=function(){return t(r,u,arguments)}}()},_parseFileOrBlobDataName:function(n){return qq.isFileOrInput(n)?n.value?n.value.replace(/.*(\/|\\)/,""):null!==n.fileName&&void 0!==n.fileName?n.fileName:n.name:n.name},_parseFileOrBlobDataSize:function(n){var t;return qq.isFileOrInput(n)?void 0===n.value&&(t=null!==n.fileSize&&void 0!==n.fileSize?n.fileSize:n.size):t=n.blob.size,t},_getValidationDescriptor:function(n){var t={},r=this._parseFileOrBlobDataName(n),i=this._parseFileOrBlobDataSize(n);return t.name=r,void 0!==i&&(t.size=i),t},_getValidationDescriptors:function(n){var i=this,t=[];return qq.each(n,function(n,r){t.push(i._getValidationDescriptor(r.file))}),t},_createParamsStore:function(n){var t={},i=this;return{setParams:function(n,i){var r={};qq.extend(r,n);t[i]=r},getParams:function(r){var u={};return null!=r&&t[r]?qq.extend(u,t[r]):qq.extend(u,i._options[n].params),u},remove:function(n){return delete t[n]},reset:function(){t={}}}},_createEndpointStore:function(n){var t={},i=this;return{setEndpoint:function(n,i){t[i]=n},getEndpoint:function(r){return null!=r&&t[r]?t[r]:i._options[n].endpoint},remove:function(n){return delete t[n]},reset:function(){t={}}}},_handleCameraAccess:function(){if(this._options.camera.ios&&qq.ios()){var i="image/*;capture=camera",r=this._options.camera.button,t=r?this._getButtonId(r):this._defaultButtonId,n=this._options;t&&t!==this._defaultButtonId&&(n=this._extraButtonSpecs[t]);n.multiple=!1;null===n.validation.acceptFiles?n.validation.acceptFiles=i:n.validation.acceptFiles+=","+i;qq.each(this._buttons,function(i,r){if(r.getButtonId()===t)return(r.setMultiple(n.multiple),r.setAcceptFiles(n.acceptFiles),!1)})}},_getValidationBase:function(n){var t=this._extraButtonSpecs[n];return t?t.validation:this._options.validation}}}(),function(){"use strict";qq.FineUploaderBasic=function(n){this._options={debug:!1,button:null,multiple:!0,maxConnections:3,disableCancelForFormUploads:!1,autoUpload:!0,request:{endpoint:"/server/upload",params:{},paramsInBody:!0,customHeaders:{},forceMultipart:!0,inputName:"qqfile",uuidName:"qquuid",totalFileSizeName:"qqtotalfilesize",filenameParam:"qqfilename"},validation:{allowedExtensions:[],sizeLimit:0,minSizeLimit:0,itemLimit:0,stopOnFirstInvalidFile:!0,acceptFiles:null,image:{maxHeight:0,maxWidth:0,minHeight:0,minWidth:0}},callbacks:{onSubmit:function(){},onSubmitted:function(){},onComplete:function(){},onCancel:function(){},onUpload:function(){},onUploadChunk:function(){},onUploadChunkSuccess:function(){},onResume:function(){},onProgress:function(){},onError:function(){},onAutoRetry:function(){},onManualRetry:function(){},onValidateBatch:function(){},onValidate:function(){},onSubmitDelete:function(){},onDelete:function(){},onDeleteComplete:function(){},onPasteReceived:function(){},onStatusChange:function(){},onSessionRequestComplete:function(){}},messages:{typeError:"{file} has an invalid extension. Valid extension(s): {extensions}.",sizeError:"{file} is too large, maximum file size is {sizeLimit}.",minSizeError:"{file} is too small, minimum file size is {minSizeLimit}.",emptyError:"{file} is empty, please select files again without it.",noFilesError:"No files to upload.",tooManyItemsError:"Too many items ({netItems}) would be uploaded.  Item limit is {itemLimit}.",maxHeightImageError:"Image is too tall.",maxWidthImageError:"Image is too wide.",minHeightImageError:"Image is not tall enough.",minWidthImageError:"Image is not wide enough.",retryFailTooManyItems:"Retry failed - you have reached your file limit.",onLeave:"The files are being uploaded, if you leave now the upload will be canceled."},retry:{enableAuto:!1,maxAutoAttempts:3,autoAttemptDelay:5,preventRetryResponseProperty:"preventRetry"},classes:{buttonHover:"qq-upload-button-hover",buttonFocus:"qq-upload-button-focus"},chunking:{enabled:!1,partSize:2e6,paramNames:{partIndex:"qqpartindex",partByteOffset:"qqpartbyteoffset",chunkSize:"qqchunksize",totalFileSize:"qqtotalfilesize",totalParts:"qqtotalparts"}},resume:{enabled:!1,id:null,cookiesExpireIn:7,paramNames:{resuming:"qqresume"}},formatFileName:function(n){return void 0!==n&&n.length>33&&(n=n.slice(0,19)+"..."+n.slice(-14)),n},text:{defaultResponseError:"Upload failure reason unknown",sizeSymbols:["kB","MB","GB","TB","PB","EB"]},deleteFile:{enabled:!1,method:"DELETE",endpoint:"/server/upload",customHeaders:{},params:{}},cors:{expected:!1,sendCredentials:!1,allowXdr:!1},blobs:{defaultName:"misc_data"},paste:{targetElement:null,defaultName:"pasted_image"},camera:{ios:!1,button:null},extraButtons:[],session:{endpoint:null,params:{},customHeaders:{},refreshOnReset:!0}};qq.extend(this._options,n,!0);this._buttons=[];this._extraButtonSpecs={};this._buttonIdsForFileIds=[];this._wrapCallbacks();this._disposeSupport=new qq.DisposeSupport;this._storedIds=[];this._autoRetries=[];this._retryTimeouts=[];this._preventRetries=[];this._thumbnailUrls=[];this._netUploadedOrQueued=0;this._netUploaded=0;this._uploadData=this._createUploadDataTracker();this._paramsStore=this._createParamsStore("request");this._deleteFileParamsStore=this._createParamsStore("deleteFile");this._endpointStore=this._createEndpointStore("request");this._deleteFileEndpointStore=this._createEndpointStore("deleteFile");this._handler=this._createUploadHandler();this._deleteHandler=qq.DeleteFileAjaxRequester&&this._createDeleteHandler();this._options.button&&(this._defaultButtonId=this._createUploadButton({element:this._options.button}).getButtonId());this._generateExtraButtonSpecs();this._handleCameraAccess();this._options.paste.targetElement&&(qq.PasteSupport?this._pasteHandler=this._createPasteHandler():qq.log("Paste support module not found","info"));this._preventLeaveInProgress();this._imageGenerator=qq.ImageGenerator&&new qq.ImageGenerator(qq.bind(this.log,this));this._refreshSessionData()};qq.FineUploaderBasic.prototype=qq.basePublicApi;qq.extend(qq.FineUploaderBasic.prototype,qq.basePrivateApi)}();qq.AjaxRequester=function(n){"use strict";function c(){return qq.indexOf(["GET","POST","HEAD"],t.method)>=0}function l(){var n=!1;return qq.each(n,function(t,i){if(qq.indexOf(["Accept","Accept-Language","Content-Language","Content-Type"],i)<0)return(n=!0,!1)}),n}function u(n){return t.cors.expected&&void 0===n.withCredentials}function a(){var n;return(window.XMLHttpRequest||window.ActiveXObject)&&(n=qq.createXhrInstance(),void 0===n.withCredentials&&(n=new XDomainRequest)),n}function f(n,r){var u=i[n].xhr;return u||r||(u=t.cors.expected?a():qq.createXhrInstance(),i[n].xhr=u),u}function v(n){var f,e=qq.indexOf(r,n),u=t.maxConnections;delete i[n];r.splice(e,1);r.length>=u&&u>e&&(f=r[u-1],h(f))}function o(n,i){var r=f(n),s=t.method,o=i===!0;v(n);o?e(s+" request for "+n+" has failed","error"):u(r)||g(r.status)||(o=!0,e(s+" request for "+n+" has failed - response code "+r.status,"error"));t.onComplete(n,r,o)}function y(n){var r,u=i[n].additionalParams,f=t.mandatedParams;return t.paramsStore.getParams&&(r=t.paramsStore.getParams(n)),u&&qq.each(u,function(n,t){r=r||{};r[n]=t}),f&&qq.each(f,function(n,t){r=r||{};r[n]=t}),r}function h(n){var h,r=f(n),c=t.method,o=y(n),l=i[n].payload;t.onSend(n);h=p(n,o);u(r)?(r.onload=b(n),r.onerror=k(n)):r.onreadystatechange=w(n);r.open(c,h,!0);t.cors.expected&&t.cors.sendCredentials&&!u(r)&&(r.withCredentials=!0);d(n);e("Sending "+c+" request for "+n);l?r.send(l):s||!o?r.send():r.send(o&&t.contentType.toLowerCase().indexOf("application/x-www-form-urlencoded")>=0?qq.obj2url(o,""):o&&t.contentType.toLowerCase().indexOf("application/json")>=0?JSON.stringify(o):o)}function p(n,r){var u=t.endpointStore.getEndpoint(n),f=i[n].addToPath;return void 0!=f&&(u+="/"+f),s&&r?qq.obj2url(r,u):u}function w(n){return function(){4===f(n).readyState&&o(n)}}function b(n){return function(){o(n)}}function k(n){return function(){o(n,!0)}}function d(n){var r=f(n),o=t.customHeaders,h=i[n].additionalHeaders||{},s=t.method,e={};u(r)||(t.allowXRequestedWithAndCacheControl&&(t.cors.expected&&c()&&!l(o)||(r.setRequestHeader("X-Requested-With","XMLHttpRequest"),r.setRequestHeader("Cache-Control","no-cache"))),!t.contentType||"POST"!==s&&"PUT"!==s||r.setRequestHeader("Content-Type",t.contentType),qq.extend(e,o),qq.extend(e,h),qq.each(e,function(n,t){r.setRequestHeader(n,t)}))}function g(n){return qq.indexOf(t.successfulResponseCodes[t.method],n)>=0}function nt(n,u,f,e,o){i[n]={addToPath:u,additionalParams:f,additionalHeaders:e,payload:o};var s=r.push(n);s<=t.maxConnections&&h(n)}var e,s,r=[],i=[],t={validMethods:["POST"],method:"POST",contentType:"application/x-www-form-urlencoded",maxConnections:3,customHeaders:{},endpointStore:{},paramsStore:{},mandatedParams:{},allowXRequestedWithAndCacheControl:!0,successfulResponseCodes:{DELETE:[200,202,204],POST:[200,204],GET:[200]},cors:{expected:!1,sendCredentials:!1},log:function(){},onSend:function(){},onComplete:function(){}};if(qq.extend(t,n),e=t.log,qq.indexOf(t.validMethods,t.method)<0)throw new Error("'"+t.method+"' is not a supported method for this type of request!");s="GET"===t.method||"DELETE"===t.method;qq.extend(this,{initTransport:function(n){var t,i,r,u;return{withPath:function(n){return t=n,this},withParams:function(n){return i=n,this},withHeaders:function(n){return r=n,this},withPayload:function(n){return u=n,this},send:function(){nt(n,t,i,r,u)}}}})};qq.UploadHandler=function(n,t){"use strict";function e(n){var e,t=qq.indexOf(u,n),f=r.maxConnections;t>=0&&(u.splice(t,1),u.length>=f&&f>t&&(e=u[f-1],i.upload(e)))}function o(n){f("Cancelling "+n);r.paramsStore.remove(n);e(n)}function s(){var n=t?qq[t]:qq,u=qq.supportedFeatures.ajaxUploading?"Xhr":"Form";i=new n["UploadHandler"+u](r,{onUploadComplete:e,onUuidChanged:r.onUuidChanged,getName:r.getName,getUuid:r.getUuid,getSize:r.getSize,log:f})}var r,f,i,u=[];r={debug:!1,forceMultipart:!0,paramsInBody:!1,paramsStore:{},endpointStore:{},filenameParam:"qqfilename",cors:{expected:!1,sendCredentials:!1},maxConnections:3,uuidName:"qquuid",totalFileSizeName:"qqtotalfilesize",chunking:{enabled:!1,partSize:2e6,paramNames:{partIndex:"qqpartindex",partByteOffset:"qqpartbyteoffset",chunkSize:"qqchunksize",totalParts:"qqtotalparts",filename:"qqfilename"}},resume:{enabled:!1,id:null,cookiesExpireIn:7,paramNames:{resuming:"qqresume"}},log:function(){},onProgress:function(){},onComplete:function(){},onCancel:function(){},onUpload:function(){},onUploadChunk:function(){},onUploadChunkSuccess:function(){},onAutoRetry:function(){},onResume:function(){},onUuidChanged:function(){},getName:function(){}};qq.extend(r,n);f=r.log;qq.extend(this,{add:function(){return i.add.apply(this,arguments)},upload:function(n){var t=u.push(n);return t<=r.maxConnections?(i.upload(n),!0):!1},retry:function(n){var t=qq.indexOf(u,n);return t>=0?i.upload(n,!0):this.upload(n)},cancel:function(n){var t=i.cancel(n);t instanceof qq.Promise?t.then(function(){o(n)}):t!==!1&&o(n)},cancelAll:function(){var t=this,n=[];qq.extend(n,u);qq.each(n,function(n,i){t.cancel(i)});u=[]},getFile:function(n){if(i.getFile)return i.getFile(n)},getInput:function(n){if(i.getInput)return i.getInput(n)},reset:function(){f("Resetting upload handler");this.cancelAll();u=[];i.reset()},expunge:function(n){if(this.isValid(n))return i.expunge(n)},isValid:function(n){return i.isValid(n)},getResumableFilesData:function(){return i.getResumableFilesData?i.getResumableFilesData():[]},getThirdPartyFileId:function(n){if(i.getThirdPartyFileId&&this.isValid(n))return i.getThirdPartyFileId(n)},pause:function(n){if(i.pause&&this.isValid(n)&&i.pause(n))return(e(n),!0)}});s()};qq.UploadHandlerFormApi=function(n,t,i){"use strict";function l(t){delete f[t];delete u[t];c&&(clearTimeout(e[t]),delete e[t],s.stopReceivingMessages(t));var i=document.getElementById(n.getIframeName(t));i&&(i.setAttribute("src","java"+String.fromCharCode(115)+"cript:false;"),qq(i).remove())}function a(t,i){var c=t.id,l=h(c),a=d(l);o[a]=i;f[l]=qq(t).attach("load",function(){u[l].input&&(r("Received iframe load event for CORS upload request (iframe name "+c+")"),e[c]=setTimeout(function(){var n="No valid message received from loaded iframe for iframe name "+c;r(n,"error");i({error:n})},1e3))});s.receiveMessage(c,function(t){r("Received the following window message: '"+t+"'");var u,l=h(c),f=n.parseJsonResponse(l,t),i=f.uuid;i&&o[i]?(r("Handling response for iframe name "+c),clearTimeout(e[c]),delete e[c],n.detachLoadEvent(c),u=o[i],delete o[i],s.stopReceivingMessages(c),u(f)):i||r("'"+t+"' does not contain a UUID - ignoring.")})}function v(n){var t=qq.toElement("<iframe src='javascript:false;' name='"+n+"' />");return t.setAttribute("id",n),t.style.display="none",document.body.appendChild(t),t}function h(n){return n.split("_")[0]}var y=qq.getUniqueId(),o={},f={},e={},c=t.isCors,u=t.fileState,p=t.inputName,w=i.onCancel,b=i.onUuidChanged,k=i.getName,d=i.getUuid,r=i.log,s=new qq.WindowReceiveMessage({log:r});qq.extend(n,{getIframeName:function(n){return n+"_"+y},createIframe:function(t){var i=n.getIframeName(t);return v(i)},parseJsonResponse:function(n,t){var i;try{i=qq.parseJson(t);void 0!==i.newUuid&&b(n,i.newUuid)}catch(u){r("Error when attempting to parse iframe upload response ("+u.message+")","error");i={}}return i},initFormForUpload:function(n){var f=n.method,i=n.endpoint,r=n.params,e=n.paramsInBody,o=n.targetName,t=qq.toElement("<form method='"+f+"' enctype='multipart/form-data'><\/form>"),u=i;return e?qq.obj2Inputs(r,t):u=qq.obj2url(r,i),t.setAttribute("action",u),t.setAttribute("target",o),t.style.display="none",document.body.appendChild(t),t},attachLoadEvent:function(n,t){var i;c?a(n,t):f[n.id]=qq(n).attach("load",function(){if(r("Received response for "+n.id),n.parentNode){try{if(n.contentDocument&&n.contentDocument.body&&"false"==n.contentDocument.body.innerHTML)return}catch(u){r("Error when attempting to access iframe during handling of upload response ("+u.message+")","error");i={success:!1}}t(i)}})},detachLoadEvent:function(n){void 0!==f[n]&&(f[n](),delete f[n])}});qq.extend(this,{add:function(n,t){u[n]={input:t};t.setAttribute("name",p);t.parentNode&&qq(t).remove()},getInput:function(n){return u[n].input},isValid:function(n){return void 0!==u[n]&&void 0!==u[n].input},reset:function(){u.length=0},expunge:function(n){return l(n)},cancel:function(n){var t=w(n,k(n));return t instanceof qq.Promise?t.then(function(){this.expunge(n)}):t!==!1?(this.expunge(n),!0):!1},upload:function(){}})};qq.UploadHandlerXhrApi=function(n,t,i){"use strict";function o(n,t,i){return n.slice?n.slice(t,i):n.mozSlice?n.mozSlice(t,i):n.webkitSlice?n.webkitSlice(t,i):void 0}var s=this,r=t.fileState,u=t.chunking,h=i.onUpload,c=i.onCancel,f=(i.onUuidChanged,i.getName),e=i.getSize,l=i.log;qq.extend(n,{createXhr:function(n){var t=qq.createXhrInstance();return r[n].xhr=t,t},getTotalChunks:function(n){if(u){var t=e(n),i=u.partSize;return Math.ceil(t/i)}},getChunkData:function(t,i){var f=u.partSize,c=e(t),l=s.getFile(t),r=f*i,h=r+f>=c?c:r+f,a=n.getTotalChunks(t);return{part:i,start:r,end:h,count:a,blob:o(l,r,h),size:h-r}},getChunkDataForCallback:function(n){return{partIndex:n.part,startByte:n.start+1,endByte:n.end,totalParts:n.count}}});qq.extend(this,{add:function(n,t){if(qq.isFile(t))r[n]={file:t};else{if(!qq.isBlob(t.blob))throw new Error("Passed obj is not a File or BlobData (in qq.UploadHandlerXhr)");r[n]={blobData:t}}},getFile:function(n){if(r[n])return r[n].file||r[n].blobData.blob},isValid:function(n){return void 0!==r[n]},reset:function(){r.length=0},expunge:function(n){var t=r[n].xhr;t&&(t.onreadystatechange=null,t.abort());delete r[n]},upload:function(n,t){return r[n]&&delete r[n].paused,h(n,t)},cancel:function(n){var t=c(n,f(n));return t instanceof qq.Promise?t.then(function(){this.expunge(n)}):t!==!1?(this.expunge(n),!0):!1},pause:function(n){var t=r[n].xhr;if(t)return(l(qq.format("Aborting XHR upload for {} '{}' due to pause instruction.",n,f(n))),r[n].paused=!0,t.abort(),!0)}})};qq.WindowReceiveMessage=function(n){"use strict";var i={log:function(){}},t={};qq.extend(i,n);qq.extend(this,{receiveMessage:function(n,i){var r=function(n){i(n.data)};window.postMessage?t[n]=qq(window).attach("message",r):log("iframe message passing not supported in this browser!","error")},stopReceivingMessages:function(n){if(window.postMessage){var i=t[n];i&&i()}}})},function(){"use strict";qq.uiPublicApi={clearStoredFiles:function(){this._parent.prototype.clearStoredFiles.apply(this,arguments);this._templating.clearFiles()},addExtraDropzone:function(n){this._dnd&&this._dnd.setupExtraDropzone(n)},removeExtraDropzone:function(n){if(this._dnd)return this._dnd.removeDropzone(n)},getItemByFileId:function(n){return this._templating.getFileContainer(n)},reset:function(){this._parent.prototype.reset.apply(this,arguments);this._templating.reset();!this._options.button&&this._templating.getButton()&&(this._defaultButtonId=this._createUploadButton({element:this._templating.getButton()}).getButtonId());this._dnd&&(this._dnd.dispose(),this._dnd=this._setupDragAndDrop());this._totalFilesInBatch=0;this._filesInBatchAddedToUi=0;this._setupClickAndEditEventHandlers()},pauseUpload:function(n){var t=this._parent.prototype.pauseUpload.apply(this,arguments);return t&&this._templating.uploadPaused(n),t},continueUpload:function(n){var t=this._parent.prototype.continueUpload.apply(this,arguments);return t&&this._templating.uploadContinued(n),t},getId:function(n){return this._templating.getFileId(n)},getDropTarget:function(n){var t=this.getFile(n);return t.qqDropTarget}};qq.uiPrivateApi={_getButton:function(n){var t=this._parent.prototype._getButton.apply(this,arguments);return t||n===this._defaultButtonId&&(t=this._templating.getButton()),t},_removeFileItem:function(n){this._templating.removeFile(n)},_setupClickAndEditEventHandlers:function(){this._fileButtonsClickHandler=qq.FileButtonsClickHandler&&this._bindFileButtonsClickEvent();this._focusinEventSupported=!qq.firefox();this._isEditFilenameEnabled()&&(this._filenameClickHandler=this._bindFilenameClickEvent(),this._filenameInputFocusInHandler=this._bindFilenameInputFocusInEvent(),this._filenameInputFocusHandler=this._bindFilenameInputFocusEvent())},_setupDragAndDrop:function(){var n=this,i=this._options.dragAndDrop.extraDropzones,t=this._templating,r=t.getDropZone();return r&&i.push(r),new qq.DragAndDrop({dropZoneElements:i,allowMultipleItems:this._options.multiple,classes:{dropActive:this._options.classes.dropActive},callbacks:{processingDroppedFiles:function(){t.showDropProcessing()},processingDroppedFilesComplete:function(i,r){t.hideDropProcessing();qq.each(i,function(n,t){t.qqDropTarget=r});i&&n.addFiles(i,null,null)},dropError:function(t,i){n._itemError(t,i)},dropLog:function(t,i){n.log(t,i)}}})},_bindFileButtonsClickEvent:function(){var n=this;return new qq.FileButtonsClickHandler({templating:this._templating,log:function(t,i){n.log(t,i)},onDeleteFile:function(t){n.deleteFile(t)},onCancel:function(t){n.cancel(t)},onRetry:function(t){qq(n._templating.getFileContainer(t)).removeClass(n._classes.retryable);n.retry(t)},onPause:function(t){n.pauseUpload(t)},onContinue:function(t){n.continueUpload(t)},onGetName:function(t){return n.getName(t)}})},_isEditFilenameEnabled:function(){return this._templating.isEditFilenamePossible()&&!this._options.autoUpload&&qq.FilenameClickHandler&&qq.FilenameInputFocusHandler&&qq.FilenameInputFocusHandler},_filenameEditHandler:function(){var t=this,n=this._templating;return{templating:n,log:function(n,i){t.log(n,i)},onGetUploadStatus:function(n){return t.getUploads({id:n}).status},onGetName:function(n){return t.getName(n)},onSetName:function(i,r){var u=t._options.formatFileName(r);n.updateFilename(i,u);t.setName(i,r)},onEditingStatusChange:function(t,i){var r=qq(n.getEditInput(t)),u=qq(n.getFileContainer(t));i?(r.addClass("qq-editing"),n.hideFilename(t),n.hideEditIcon(t)):(r.removeClass("qq-editing"),n.showFilename(t),n.showEditIcon(t));u.addClass("qq-temp").removeClass("qq-temp")}}},_onUploadStatusChange:function(n,t,i){this._parent.prototype._onUploadStatusChange.apply(this,arguments);this._isEditFilenameEnabled()&&this._templating.getFileContainer(n)&&i!==qq.status.SUBMITTED&&(this._templating.markFilenameEditable(n),this._templating.hideEditIcon(n))},_bindFilenameInputFocusInEvent:function(){var n=qq.extend({},this._filenameEditHandler());return new qq.FilenameInputFocusInHandler(n)},_bindFilenameInputFocusEvent:function(){var n=qq.extend({},this._filenameEditHandler());return new qq.FilenameInputFocusHandler(n)},_bindFilenameClickEvent:function(){var n=qq.extend({},this._filenameEditHandler());return new qq.FilenameClickHandler(n)},_storeForLater:function(n){this._parent.prototype._storeForLater.apply(this,arguments);this._templating.hideSpinner(n)},_onSubmit:function(n,t){this._parent.prototype._onSubmit.apply(this,arguments);this._addToList(n,t)},_onSubmitted:function(n){this._isEditFilenameEnabled()&&(this._templating.markFilenameEditable(n),this._templating.showEditIcon(n),this._focusinEventSupported||this._filenameInputFocusHandler.addHandler(this._templating.getEditInput(n)))},_onProgress:function(n,t,i,r){this._parent.prototype._onProgress.apply(this,arguments);this._templating.updateProgress(n,i,r);i===r?(this._templating.hideCancel(n),this._templating.hidePause(n),this._templating.setStatusText(n,this._options.text.waitingForResponse),this._displayFileSize(n)):this._displayFileSize(n,i,r)},_onComplete:function(n,t,i){function e(t){u.setStatusText(n);qq(u.getFileContainer(n)).removeClass(r._classes.retrying);u.hideProgress(n);(!r._options.disableCancelForFormUploads||qq.supportedFeatures.ajaxUploading)&&u.hideCancel(n);u.hideSpinner(n);t.success?r._markFileAsSuccessful(n):(qq(u.getFileContainer(n)).addClass(r._classes.fail),r._templating.isRetryPossible()&&!r._preventRetries[n]&&qq(u.getFileContainer(n)).addClass(r._classes.retryable),r._controlFailureTextDisplay(n,t))}var f=this._parent.prototype._onComplete.apply(this,arguments),u=this._templating,r=this;return f instanceof qq.Promise?f.done(function(n){e(n)}):e(i),f},_markFileAsSuccessful:function(n){var t=this._templating;this._isDeletePossible()&&t.showDeleteButton(n);qq(t.getFileContainer(n)).addClass(this._classes.success);this._maybeUpdateThumbnail(n)},_onUpload:function(n){var t=this._parent.prototype._onUpload.apply(this,arguments);return this._templating.showSpinner(n),t},_onUploadChunk:function(n,t){this._parent.prototype._onUploadChunk.apply(this,arguments);t.partIndex>0&&this._templating.allowPause(n)},_onCancel:function(n){this._parent.prototype._onCancel.apply(this,arguments);this._removeFileItem(n)},_onBeforeAutoRetry:function(n){var i,r,t;this._parent.prototype._onBeforeAutoRetry.apply(this,arguments);this._showCancelLink(n);this._options.retry.showAutoRetryNote&&(i=this._autoRetries[n]+1,r=this._options.retry.maxAutoAttempts,t=this._options.retry.autoRetryNote.replace(/\{retryNum\}/g,i),t=t.replace(/\{maxAuto\}/g,r),this._templating.setStatusText(n,t),qq(this._templating.getFileContainer(n)).addClass(this._classes.retrying))},_onBeforeManualRetry:function(n){return this._parent.prototype._onBeforeManualRetry.apply(this,arguments)?(this._templating.resetProgress(n),qq(this._templating.getFileContainer(n)).removeClass(this._classes.fail),this._templating.setStatusText(n),this._templating.showSpinner(n),this._showCancelLink(n),!0):(qq(this._templating.getFileContainer(n)).addClass(this._classes.retryable),!1)},_onSubmitDelete:function(n){var t=qq.bind(this._onSubmitDeleteSuccess,this);this._parent.prototype._onSubmitDelete.call(this,n,t)},_onSubmitDeleteSuccess:function(){this._options.deleteFile.forceConfirm?this._showDeleteConfirm.apply(this,arguments):this._sendDeleteRequest.apply(this,arguments)},_onDeleteComplete:function(n,t,i){this._parent.prototype._onDeleteComplete.apply(this,arguments);this._templating.hideSpinner(n);i?(this._templating.setStatusText(n,this._options.deleteFile.deletingFailedText),this._templating.showDeleteButton(n)):this._removeFileItem(n)},_sendDeleteRequest:function(n){this._templating.hideDeleteButton(n);this._templating.showSpinner(n);this._templating.setStatusText(n,this._options.deleteFile.deletingStatusText);this._deleteHandler.sendDelete.apply(this,arguments)},_showDeleteConfirm:function(n){var t,u=this.getName(n),f=this._options.deleteFile.confirmMessage.replace(/\{filename\}/g,u),r=(this.getUuid(n),arguments),i=this;t=this._options.showConfirm(f);t instanceof qq.Promise?t.then(function(){i._sendDeleteRequest.apply(i,r)}):t!==!1&&i._sendDeleteRequest.apply(i,r)},_addToList:function(n,t,i){var r,u=0;this._options.display.prependFiles&&(this._totalFilesInBatch>1&&this._filesInBatchAddedToUi>0&&(u=this._filesInBatchAddedToUi-1),r={index:u});i||(this._options.disableCancelForFormUploads&&!qq.supportedFeatures.ajaxUploading&&this._templating.disableCancel(),this._options.multiple||(this._handler.cancelAll(),this._clearList()));this._templating.addFile(n,this._options.formatFileName(t),r);i?this._thumbnailUrls[n]&&this._templating.updateThumbnail(n,this._thumbnailUrls[n],!0):this._templating.generatePreview(n,this.getFile(n));this._filesInBatchAddedToUi+=1;this._options.display.fileSizeOnSubmit&&qq.supportedFeatures.ajaxUploading&&this._displayFileSize(n)},_clearList:function(){this._templating.clearFiles();this.clearStoredFiles()},_displayFileSize:function(n,t,i){var r=this.getSize(n),u=this._formatSize(r);r>=0&&(void 0!==t&&void 0!==i&&(u=this._formatProgress(t,i)),this._templating.updateSize(n,u))},_formatProgress:function(n,t){function r(n,t){i=i.replace(n,t)}var i=this._options.text.formatProgress;return r("{percent}",Math.round(n/t*100)),r("{total_size}",this._formatSize(t)),i},_controlFailureTextDisplay:function(n,t){var r,u,f,i,e;r=this._options.failedUploadTextDisplay.mode;u=this._options.failedUploadTextDisplay.maxChars;f=this._options.failedUploadTextDisplay.responseProperty;"custom"===r?(i=t[f],i?i.length>u&&(e=i.substring(0,u)+"..."):(i=this._options.text.failUpload,this.log("'"+f+"' is not a valid property on the server response.","warn")),this._templating.setStatusText(n,e||i),this._options.failedUploadTextDisplay.enableTooltip&&this._showTooltip(n,i)):"default"===r?this._templating.setStatusText(n,this._options.text.failUpload):"none"!==r&&this.log("failedUploadTextDisplay.mode value of '"+r+"' is not valid","warn")},_showTooltip:function(n,t){this._templating.getFileContainer(n).title=t},_showCancelLink:function(n){(!this._options.disableCancelForFormUploads||qq.supportedFeatures.ajaxUploading)&&this._templating.showCancel(n)},_itemError:function(){var n=this._parent.prototype._itemError.apply(this,arguments);this._options.showMessage(n)},_batchError:function(n){this._parent.prototype._batchError.apply(this,arguments);this._options.showMessage(n)},_setupPastePrompt:function(){var n=this;this._options.callbacks.onPasteReceived=function(){var t=n._options.paste.namePromptMessage,i=n._options.paste.defaultName;return n._options.showPrompt(t,i)}},_fileOrBlobRejected:function(){this._totalFilesInBatch-=1;this._parent.prototype._fileOrBlobRejected.apply(this,arguments)},_prepareItemsForUpload:function(n){this._totalFilesInBatch=n.length;this._filesInBatchAddedToUi=0;this._parent.prototype._prepareItemsForUpload.apply(this,arguments)},_maybeUpdateThumbnail:function(n){var t=this._thumbnailUrls[n];this._templating.updateThumbnail(n,t)},_addCannedFile:function(){var n=this._parent.prototype._addCannedFile.apply(this,arguments);return this._addToList(n,this.getName(n),!0),this._templating.hideSpinner(n),this._templating.hideCancel(n),this._markFileAsSuccessful(n),n}}}();qq.FineUploader=function(n,t){"use strict";this._parent=t?qq[t].FineUploaderBasic:qq.FineUploaderBasic;this._parent.apply(this,arguments);qq.extend(this._options,{element:null,button:null,listElement:null,dragAndDrop:{extraDropzones:[]},text:{formatProgress:"{percent}% of {total_size}",failUpload:"Upload failed",waitingForResponse:"Processing...",paused:"Paused"},template:"qq-template",classes:{retrying:"qq-upload-retrying",retryable:"qq-upload-retryable",success:"qq-upload-success",fail:"qq-upload-fail",editable:"qq-editable",hide:"qq-hide",dropActive:"qq-upload-drop-area-active"},failedUploadTextDisplay:{mode:"default",maxChars:50,responseProperty:"error",enableTooltip:!0},messages:{tooManyFilesError:"You may only drop one file",unsupportedBrowser:"Unrecoverable error - this browser does not permit file uploading of any kind."},retry:{showAutoRetryNote:!0,autoRetryNote:"Retrying {retryNum}/{maxAuto}..."},deleteFile:{forceConfirm:!1,confirmMessage:"Are you sure you want to delete {filename}?",deletingStatusText:"Deleting...",deletingFailedText:"Delete failed"},display:{fileSizeOnSubmit:!1,prependFiles:!1},paste:{promptForName:!1,namePromptMessage:"Please name this image"},thumbnails:{placeholders:{waitUntilResponse:!1,notAvailablePath:null,waitingPath:null}},showMessage:function(n){setTimeout(function(){window.alert(n)},0)},showConfirm:function(n){return window.confirm(n)},showPrompt:function(n,t){return window.prompt(n,t)}},!0);qq.extend(this._options,n,!0);this._templating=new qq.Templating({log:qq.bind(this.log,this),templateIdOrEl:this._options.template,containerEl:this._options.element,fileContainerEl:this._options.listElement,button:this._options.button,imageGenerator:this._imageGenerator,classes:{hide:this._options.classes.hide,editable:this._options.classes.editable},placeholders:{waitUntilUpdate:this._options.thumbnails.placeholders.waitUntilResponse,thumbnailNotAvailable:this._options.thumbnails.placeholders.notAvailablePath,waitingForThumbnail:this._options.thumbnails.placeholders.waitingPath},text:this._options.text});!qq.supportedFeatures.uploading||this._options.cors.expected&&!qq.supportedFeatures.uploadCors?this._templating.renderFailure(this._options.messages.unsupportedBrowser):(this._wrapCallbacks(),this._templating.render(),this._classes=this._options.classes,!this._options.button&&this._templating.getButton()&&(this._defaultButtonId=this._createUploadButton({element:this._templating.getButton()}).getButtonId()),this._setupClickAndEditEventHandlers(),qq.DragAndDrop&&qq.supportedFeatures.fileDrop&&(this._dnd=this._setupDragAndDrop()),this._options.paste.targetElement&&this._options.paste.promptForName&&(qq.PasteSupport?this._setupPastePrompt():qq.log("Paste support module not found.","info")),this._totalFilesInBatch=0,this._filesInBatchAddedToUi=0)};qq.extend(qq.FineUploader.prototype,qq.basePublicApi);qq.extend(qq.FineUploader.prototype,qq.basePrivateApi);qq.extend(qq.FineUploader.prototype,qq.uiPublicApi);qq.extend(qq.FineUploader.prototype,qq.uiPrivateApi);qq.Templating=function(n){"use strict";function wt(){var o,f,e,n,v,c,u,r,a;if(s("Parsing template"),null==i.templateIdOrEl)throw new Error("You MUST specify either a template element or ID!");if(qq.isString(i.templateIdOrEl)){if(o=document.getElementById(i.templateIdOrEl),null===o)throw new Error(qq.format("Cannot find template script at ID '{}'!",i.templateIdOrEl));f=o.innerHTML}else{if(void 0===i.templateIdOrEl.innerHTML)throw new Error("You have specified an invalid value for the template option!  It must be an ID or an Element.");f=i.templateIdOrEl.innerHTML}if(f=qq.trimStr(f),n=document.createElement("div"),n.appendChild(qq.toElement(f)),i.button&&(c=qq(n).getByClass(t.button)[0],c&&qq(c).remove()),qq.DragAndDrop&&qq.supportedFeatures.fileDrop||(a=qq(n).getByClass(t.dropProcessing)[0],a&&qq(a).remove()),u=qq(n).getByClass(t.drop)[0],u&&!qq.DragAndDrop&&(qq.log("DnD module unavailable.","info"),qq(u).remove()),u&&!qq.supportedFeatures.fileDrop&&qq(u).hasAttribute(ti)&&qq(u).css({display:"none"}),r=qq(n).getByClass(t.thumbnail)[0],l?r&&(h=parseInt(r.getAttribute(gt)),h=h>0?h:null,ut=qq(r).hasAttribute(ni)):r&&qq(r).remove(),l=l&&r,vt=qq(n).getByClass(t.editFilenameInput).length>0,yt=qq(n).getByClass(t.retry).length>0,e=qq(n).getByClass(t.list)[0],null==e)throw new Error("Could not find the file list container in the template!");return v=e.innerHTML,e.innerHTML="",s("Template parsing complete"),{template:qq.trimStr(n.innerHTML),fileTemplate:qq.trimStr(v)}}function f(n){return qq(c).getByClass(pt+n)[0]}function r(n,t){return qq(n).getByClass(t)[0]}function bt(n,t){var i=c,r=i.firstChild;t>0&&(r=qq(i).children()[t].nextSibling);i.insertBefore(n,r)}function ot(n){return r(f(n),t.cancel)}function v(n){return r(f(n),t.pause)}function d(n){return r(f(n),t.continueButton)}function y(n){return r(f(n),t.progressBarContainer)||r(f(n),t.progressBar)}function p(n){return r(f(n),t.spinner)}function st(n){return r(f(n),t.editNameIcon)}function ht(n){return r(f(n),t.size)}function g(n){return r(f(n),t.deleteButton)}function kt(n){return r(f(n),t.retry)}function w(n){return r(f(n),t.file)}function nt(){return r(o,t.dropProcessing)}function ct(n){return l&&r(f(n),t.thumbnail)}function u(n){n&&qq(n).addClass(i.classes.hide)}function e(n){n&&qq(n).removeClass(i.classes.hide)}function lt(n,i){var r=y(n);r&&!qq(r).hasClass(t.progressBar)&&(r=qq(r).getByClass(t.progressBar)[0]);r&&qq(r).css({width:i+"%"})}function dt(){var n=i.placeholders.thumbnailNotAvailable,t=i.placeholders.waitingForThumbnail,r={maxSize:h,scale:ut};l&&(n?i.imageGenerator.generate(n,new Image,r).then(function(n){b.success(n)},function(){b.failure();s("Problem loading 'not available' placeholder image at "+n,"error")}):b.failure(),t?i.imageGenerator.generate(t,new Image,r).then(function(n){k.success(n)},function(){k.failure();s("Problem loading 'waiting for thumbnail' placeholder image at "+t,"error")}):k.failure())}function tt(n){k.then(function(t){at(t,n);null==n.getAttribute("src")&&(n.src=t.src,e(n))},function(){u(n)})}function it(n,t){var i=a[n]||(new qq.Promise).failure();b.then(function(r){i.then(function(){delete a[n]},function(){at(r,t);t.src=r.src;e(t);delete a[n]})})}function at(n,t){var i=n.style.maxWidth,r=n.style.maxHeight;r&&i&&!t.style.maxWidth&&!t.style.maxHeight&&qq(t).css({maxWidth:i,maxHeight:r})}var s,vt,yt,rt,o,c,l,ut,ft="qq-file-id",pt="qq-file-id-",gt="qq-max-size",ni="qq-server-scale",ti="qq-hide-dropzone",et=!1,h=-1,i={log:null,templateIdOrEl:"qq-template",containerEl:null,fileContainerEl:null,button:null,imageGenerator:null,classes:{hide:"qq-hide",editable:"qq-editable"},placeholders:{waitUntilUpdate:!1,thumbnailNotAvailable:null,waitingForThumbnail:null},text:{paused:"Paused"}},t={button:"qq-upload-button-selector",drop:"qq-upload-drop-area-selector",list:"qq-upload-list-selector",progressBarContainer:"qq-progress-bar-container-selector",progressBar:"qq-progress-bar-selector",file:"qq-upload-file-selector",spinner:"qq-upload-spinner-selector",size:"qq-upload-size-selector",cancel:"qq-upload-cancel-selector",pause:"qq-upload-pause-selector",continueButton:"qq-upload-continue-selector",deleteButton:"qq-upload-delete-selector",retry:"qq-upload-retry-selector",statusText:"qq-upload-status-text-selector",editFilenameInput:"qq-edit-filename-selector",editNameIcon:"qq-edit-filename-icon-selector",dropProcessing:"qq-drop-processing-selector",dropProcessingSpinner:"qq-drop-processing-spinner-selector",thumbnail:"qq-thumbnail-selector"},a={},b=new qq.Promise,k=new qq.Promise;qq.extend(i,n);s=i.log;o=i.containerEl;l=void 0!==i.imageGenerator;rt=wt();dt();qq.extend(this,{render:function(){s("Rendering template in DOM.");o.innerHTML=rt.template;u(nt());c=i.fileContainerEl||r(o,t.list);s("Template rendering complete")},renderFailure:function(n){var t=qq.toElement(n);o.innerHTML="";o.appendChild(t)},reset:function(){this.render()},clearFiles:function(){c.innerHTML=""},disableCancel:function(){et=!0},addFile:function(n,i,f){var e=qq.toElement(rt.fileTemplate),o=r(e,t.file);qq(e).addClass(pt+n);o&&qq(o).setText(i);e.setAttribute(ft,n);f?bt(e,f.index):c.appendChild(e);u(y(n));u(ht(n));u(g(n));u(kt(n));u(v(n));u(d(n));et&&this.hideCancel(n)},removeFile:function(n){qq(f(n)).remove()},getFileId:function(n){var t=n;if(t){for(;null==t.getAttribute(ft);)t=t.parentNode;return parseInt(t.getAttribute(ft))}},getFileList:function(){return c},markFilenameEditable:function(n){var t=w(n);t&&qq(t).addClass(i.classes.editable)},updateFilename:function(n,t){var i=w(n);i&&qq(i).setText(t)},hideFilename:function(n){u(w(n))},showFilename:function(n){e(w(n))},isFileName:function(n){return qq(n).hasClass(t.file)},getButton:function(){return i.button||r(o,t.button)},hideDropProcessing:function(){u(nt())},showDropProcessing:function(){e(nt())},getDropZone:function(){return r(o,t.drop)},isEditFilenamePossible:function(){return vt},isRetryPossible:function(){return yt},getFileContainer:function(n){return f(n)},showEditIcon:function(n){var t=st(n);t&&qq(t).addClass(i.classes.editable)},hideEditIcon:function(n){var t=st(n);t&&qq(t).removeClass(i.classes.editable)},isEditIcon:function(n){return qq(n).hasClass(t.editNameIcon)},getEditInput:function(n){return r(f(n),t.editFilenameInput)},isEditInput:function(n){return qq(n).hasClass(t.editFilenameInput)},updateProgress:function(n,t,i){var f,r=y(n);r&&(f=Math.round(t/i*100),t===i?u(r):e(r),lt(n,f))},hideProgress:function(n){var t=y(n);t&&u(t)},resetProgress:function(n){lt(n,0)},showCancel:function(n){if(!et){var t=ot(n);t&&qq(t).removeClass(i.classes.hide)}},hideCancel:function(n){u(ot(n))},isCancel:function(n){return qq(n).hasClass(t.cancel)},allowPause:function(n){e(v(n));u(d(n))},uploadPaused:function(n){this.setStatusText(n,i.text.paused);this.allowContinueButton(n);u(p(n))},hidePause:function(n){u(v(n))},isPause:function(n){return qq(n).hasClass(t.pause)},isContinueButton:function(n){return qq(n).hasClass(t.continueButton)},allowContinueButton:function(n){e(d(n));u(v(n))},uploadContinued:function(n){this.setStatusText(n,"");this.allowPause(n);e(p(n))},showDeleteButton:function(n){e(g(n))},hideDeleteButton:function(n){u(g(n))},isDeleteButton:function(n){return qq(n).hasClass(t.deleteButton)},isRetry:function(n){return qq(n).hasClass(t.retry)},updateSize:function(n,t){var i=ht(n);i&&(e(i),qq(i).setText(t))},setStatusText:function(n,i){var u=r(f(n),t.statusText);u&&(null==i?qq(u).clearText():qq(u).setText(i))},hideSpinner:function(n){u(p(n))},showSpinner:function(n){e(p(n))},generatePreview:function(n,t){var r=ct(n),u={maxSize:h,scale:!0,orient:!0};if(qq.supportedFeatures.imagePreviews){if(a[n]=new qq.Promise,r)return tt(r),i.imageGenerator.generate(t,r,u).then(function(){e(r);a[n].success()},function(){a[n].failure();i.placeholders.waitUntilUpdate||it(n,r)})}else r&&tt(r)},updateThumbnail:function(n,t,r){var u=ct(n),f={maxSize:h,scale:ut};if(u){if(t)return r&&tt(u),i.imageGenerator.generate(t,u,f).then(function(){e(u)},function(){it(n,u)});it(n,u)}}})};qq.UploadHandlerForm=function(n,t){"use strict";function o(n,t){var f,e,u;try{e=t.contentDocument||t.contentWindow.document;u=e.body.innerHTML;i("converting iframe's innerHTML to JSON");i("innerHTML = "+u);u&&u.match(/^<pre/i)&&(u=e.body.firstChild.firstChild.nodeValue);f=r.parseJsonResponse(n,u)}catch(o){i("Error when attempting to parse form upload response ("+o.message+")","error");f={success:!1}}return f}function s(t,i){var f=n.paramsStore.getParams(t),o=n.demoMode?"GET":"POST",s=n.endpointStore.getEndpoint(t),h=u(t);return f[n.uuidName]=e(t),f[n.filenameParam]=h,r.initFormForUpload({method:o,endpoint:s,params:f,paramsInBody:n.paramsInBody,targetName:i.name})}var f=[],h=t.onUploadComplete,c=t.onUuidChanged,u=t.getName,e=t.getUuid,l=h,i=t.log,r={};qq.extend(this,new qq.UploadHandlerFormApi(r,{fileState:f,isCors:n.cors.expected,inputName:n.inputName},{onCancel:n.onCancel,onUuidChanged:c,getName:u,getUuid:e,log:i}));qq.extend(this,{upload:function(t){var e,c=f[t].input,a=u(t),h=r.createIframe(t);if(!c)throw new Error("file with passed id was not added, or already uploaded or canceled");n.onUpload(t,u(t));e=s(t,h);e.appendChild(c);r.attachLoadEvent(h,function(u){i("iframe loaded");var f=u?u:o(t,h);r.detachLoadEvent(t);n.cors.expected||qq(h).remove();(f.success||!n.onAutoRetry(t,a,f))&&(n.onComplete(t,a,f),l(t))});i("Sending upload request for "+t);e.submit();qq(e).remove()}})};qq.UploadHandlerXhr=function(n,t){"use strict";function ft(){if(null!==n.resume.id&&void 0!==n.resume.id&&!qq.isFunction(n.resume.id)&&!qq.isObject(n.resume.id))return n.resume.id}function et(t,i,r){var u=o(t),e=f(t);i[n.chunking.paramNames.partIndex]=r.part;i[n.chunking.paramNames.partByteOffset]=r.start;i[n.chunking.paramNames.chunkSize]=r.size;i[n.chunking.paramNames.totalParts]=r.count;i[n.totalFileSizeName]=u;h&&(i[n.filenameParam]=e)}function ot(t){t[n.resume.paramNames.resuming]=!0}function d(t,i,r,u){var e=new FormData,a=n.demoMode?"GET":"POST",s=n.endpointStore.getEndpoint(u),c=s,l=f(u),v=o(u);return t[n.uuidName]=k(u),t[n.filenameParam]=l,h&&(t[n.totalFileSizeName]=v),n.paramsInBody||(h||(t[n.inputName]=l),c=qq.obj2url(t,s)),i.open(a,c,!0),n.cors.expected&&n.cors.sendCredentials&&(i.withCredentials=!0),h?(n.paramsInBody&&qq.obj2FormData(t,e),e.append(n.inputName,r),e):r}function g(t,r){var u=n.customHeaders,f=i[t].file||i[t].blobData.blob;r.setRequestHeader("X-Requested-With","XMLHttpRequest");r.setRequestHeader("Cache-Control","no-cache");h||(r.setRequestHeader("Content-Type","application/octet-stream"),r.setRequestHeader("X-Mime-Type",f.type));qq.each(u,function(n,t){r.setRequestHeader(n,t)})}function v(t,r,u){var e=f(t),s=o(t);i[t].attemptingResume=!1;n.onProgress(t,e,s,s);n.onComplete(t,e,r,u);i[t]&&delete i[t].xhr;ni(t)}function y(t){var l,c,a=i[t].remainingChunkIdxs[0],r=e.getChunkData(t,a),h=e.createXhr(t),y=o(t),v=f(t);void 0===i[t].loaded&&(i[t].loaded=0);s&&i[t].file&&wt(t,r);h.onreadystatechange=tt(t,h);h.upload.onprogress=function(r){if(r.lengthComputable){var u=r.loaded+i[t].loaded,f=st(t,a,r.total);n.onProgress(t,v,u,f)}};n.onUploadChunk(t,v,e.getChunkDataForCallback(r));c=n.paramsStore.getParams(t);et(t,c,r);i[t].attemptingResume&&ot(c);l=d(c,h,r.blob,t);g(t,h);u("Sending chunked upload request for item "+t+": bytes "+(r.start+1)+"-"+r.end+" of "+y);h.send(l)}function st(n,t,r){var f=e.getChunkData(n,t),s=f.size,u=r-s,h=o(n),c=f.count,l=i[n].initialRequestOverhead,a=u-l;return i[n].lastRequestOverhead=u,0===t?(i[n].lastChunkIdxProgress=0,i[n].initialRequestOverhead=u,i[n].estTotalRequestsSize=h+c*u):i[n].lastChunkIdxProgress!==t&&(i[n].lastChunkIdxProgress=t,i[n].estTotalRequestsSize+=a),i[n].estTotalRequestsSize}function ht(n){return h?i[n].lastRequestOverhead:0}function ct(t,r,u){var o=i[t].remainingChunkIdxs.shift(),f=e.getChunkData(t,o);i[t].attemptingResume=!1;i[t].loaded+=f.size+ht(t);n.onUploadChunkSuccess(t,e.getChunkDataForCallback(f),r,u);i[t].remainingChunkIdxs.length>0?y(t):(s&&p(t),v(t,r,u))}function lt(n,t){return 200!==n.status||!t.success||t.reset}function at(n,t){var i;try{u(qq.format("Received response status {} with body: {}",t.status,t.responseText));i=qq.parseJson(t.responseText);void 0!==i.newUuid&&b(n,i.newUuid)}catch(r){u("Error when attempting to parse xhr response text ("+r.message+")","error");i={}}return i}function nt(n){u("Server has ordered chunking effort to be restarted on next attempt for item ID "+n,"error");s&&(p(n),i[n].attemptingResume=!1);i[n].remainingChunkIdxs=[];delete i[n].loaded;delete i[n].estTotalRequestsSize;delete i[n].initialRequestOverhead}function vt(n){i[n].attemptingResume=!1;u("Server has declared that it cannot handle resume for item ID "+n+" - starting from the first chunk","error");nt(n);ut.upload(n,!0)}function yt(t,i,r){var u=f(t);n.onAutoRetry(t,u,i,r)||v(t,i,r)}function pt(n,t){var r,f=i[n],e=f&&f.attemptingResume,o=f&&f.paused;f&&!o&&(u("xhr - server response received for "+n),u("responseText = "+t.responseText),r=at(n,t),lt(t,r)?(r.reset&&nt(n),e&&r.reset?vt(n):yt(n,r,t)):a?ct(n,r,t):v(n,r,t))}function tt(n,t){return function(){4===t.readyState&&pt(n,t)}}function wt(t,u){var f=k(t),e=i[t].loaded,o=i[t].initialRequestOverhead,s=i[t].estTotalRequestsSize,h=w(t),c=f+r+u.part+r+e+r+o+r+s,l=n.resume.cookiesExpireIn;qq.setCookie(h,c,l)}function p(n){if(i[n].file){var t=w(n);qq.deleteCookie(t)}}function it(n){var t,i,e,o,s,h,c=qq.getCookie(w(n)),l=f(n);if(c){if(t=c.split(r),5===t.length)return i=t[0],e=parseInt(t[1],10),o=parseInt(t[2],10),s=parseInt(t[3],10),h=parseInt(t[4],10),{uuid:i,part:e,lastByteSent:o,initialRequestOverhead:s,estTotalRequestsSize:h};u("Ignoring previously stored resume/chunk cookie for "+l+" - old cookie format","warn")}}function w(t){var i,u=f(t),e=o(t),s=n.chunking.partSize;return i="qqfilechunk"+r+encodeURIComponent(u)+r+e+r+s,void 0!==l&&(i+=r+l),i}function c(n,t){for(var r=e.getTotalChunks(n)-1;r>=t;r-=1)i[n].remainingChunkIdxs.unshift(r);y(n)}function rt(n,t,r,f){r=f.part;i[n].loaded=f.lastByteSent;i[n].estTotalRequestsSize=f.estTotalRequestsSize;i[n].initialRequestOverhead=f.initialRequestOverhead;i[n].attemptingResume=!0;u("Resuming "+t+" at partition index "+r);c(n,r)}function bt(t,i,r){var o,s=f(t),h=e.getChunkData(t,i.part);o=n.onResume(t,s,e.getChunkDataForCallback(h));o instanceof qq.Promise?(u("Waiting for onResume promise to be fulfilled for "+t),o.then(function(){rt(t,s,r,i)},function(){u("onResume promise fulfilled - failure indicated.  Will not resume.");c(t,r)})):o!==!1?rt(t,s,r,i):(u("onResume callback returned false.  Will not resume."),c(t,r))}function kt(n,t){var r,u=0;i[n].remainingChunkIdxs&&0!==i[n].remainingChunkIdxs.length?y(n):(i[n].remainingChunkIdxs=[],s&&!t&&i[n].file?(r=it(n),r?bt(n,r,u):c(n,u)):c(n,u))}function dt(t){var r,o,s,h=i[t].file||i[t].blobData.blob,c=f(t);i[t].loaded=0;r=e.createXhr(t);r.upload.onprogress=function(r){r.lengthComputable&&(i[t].loaded=r.loaded,n.onProgress(t,c,r.loaded,r.total))};r.onreadystatechange=tt(t,r);o=n.paramsStore.getParams(t);s=d(o,r,h,t);g(t,r);u("Sending upload request for "+t);r.send(s)}function gt(t,i){var r=f(t);ut.isValid(t)&&(n.onUpload(t,r),a?kt(t,i):dt(t))}var l,ni=t.onUploadComplete,b=t.onUuidChanged,f=t.getName,k=t.getUuid,o=t.getSize,u=t.log,i=[],r="|",a=n.chunking.enabled&&qq.supportedFeatures.chunking,s=n.resume.enabled&&a&&qq.supportedFeatures.resume,h=n.forceMultipart||n.paramsInBody,e={},ut=this;l=ft();qq.extend(this,new qq.UploadHandlerXhrApi(e,{fileState:i,chunking:a?n.chunking:null},{onUpload:gt,onCancel:n.onCancel,onUuidChanged:b,getName:f,getSize:o,getUuid:k,log:u}));qq.override(this,function(t){return{add:function(n){var i;return t.add.apply(this,arguments),s&&(i=it(n),i&&b(n,i.uuid)),n},getResumableFilesData:function(){var t=[],i=[];return a&&s?(t=qq.getCookieNames(void 0===l?new RegExp("^qqfilechunk\\"+r+".+\\"+r+"\\d+\\"+r+n.chunking.partSize+"="):new RegExp("^qqfilechunk\\"+r+".+\\"+r+"\\d+\\"+r+n.chunking.partSize+"\\"+r+l+"=")),qq.each(t,function(n,t){var u=t.split(r),f=qq.getCookie(t).split(r);i.push({name:decodeURIComponent(u[1]),size:u[2],uuid:f[0],partIdx:f[1]})}),i):[]},expunge:function(n){s&&p(n);t.expunge(n)}}})};qq.PasteSupport=function(n){"use strict";function r(n){return n.type&&0===n.type.indexOf("image/")}function u(){qq(t.targetElement).attach("paste",function(n){var i=n.clipboardData;i&&qq.each(i.items,function(n,i){if(r(i)){var u=i.getAsFile();t.callbacks.pasteReceived(u)}})})}function f(){i&&i()}var t,i;t={targetElement:null,callbacks:{log:function(){},pasteReceived:function(){}}};qq.extend(t,n);u();qq.extend(this,{reset:function(){f()}})};qq.DragAndDrop=function(n){"use strict";function h(n,i){var r=Array.prototype.slice.call(n);t.callbacks.dropLog("Grabbed "+n.length+" dropped files.");i.dropDisabled(!1);t.callbacks.processingDroppedFilesComplete(r,i.getElement())}function f(n){var u,i=new qq.Promise;return n.isFile?n.file(function(n){r.push(n);i.success()},function(r){t.callbacks.dropLog("Problem parsing '"+n.fullPath+"'.  FileError code "+r.code+".","error");i.failure()}):n.isDirectory&&(u=n.createReader(),u.readEntries(function(n){var t=n.length;qq.each(n,function(n,r){f(r).done(function(){t-=1;0===t&&i.success()})});n.length||i.success()},function(r){t.callbacks.dropLog("Problem parsing '"+n.fullPath+"'.  FileError code "+r.code+".","error");i.failure()})),i}function c(n,i){var u=[],e=new qq.Promise;return t.callbacks.processingDroppedFiles(),i.dropDisabled(!0),n.files.length>1&&!t.allowMultipleItems?(t.callbacks.processingDroppedFilesComplete([]),t.callbacks.dropError("tooManyFilesError",""),i.dropDisabled(!1),e.failure()):(r=[],qq.isFolderDropSupported(n)?qq.each(n.items,function(n,t){var i=t.webkitGetAsEntry();i&&(i.isFile?r.push(t.getAsFile()):u.push(f(i).done(function(){u.pop();0===u.length&&e.success()})))}):r=n.files,0===u.length&&e.success()),e}function e(n){var f=new qq.UploadDropZone({HIDE_ZONES_EVENT_NAME:o,element:n,onEnter:function(i){qq(n).addClass(t.classes.dropActive);i.stopPropagation()},onLeaveNotDescendants:function(){qq(n).removeClass(t.classes.dropActive)},onDrop:function(n){c(n.dataTransfer,f).done(function(){h(r,f)})}});return i.addDisposer(function(){f.dispose()}),qq(n).hasAttribute(u)&&qq(n).hide(),s.push(f),f}function l(n){var t;return qq.each(n.dataTransfer.types,function(n,i){if("Files"===i)return(t=!0,!1)}),t}function a(n){return(qq.chrome()||qq.safari()&&qq.windows())&&0==n.clientX&&0==n.clientY||qq.firefox()&&!n.relatedTarget}function v(){var n=t.dropZoneElements;qq.each(n,function(t,r){var u=e(r);n.length&&(!qq.ie()||qq.ie10())&&i.attach(document,"dragenter",function(t){!u.dropDisabled()&&l(t)&&qq.each(n,function(n,t){t instanceof HTMLElement&&qq(t).css({display:"block"})})})});i.attach(document,"dragleave",function(t){a(t)&&qq.each(n,function(n,t){qq(t).hasAttribute(u)&&qq(t).hide()})});i.attach(document,"drop",function(t){qq.each(n,function(n,t){qq(t).hasAttribute(u)&&qq(t).hide()});t.preventDefault()});i.attach(document,o,function(){qq.each(t.dropZoneElements,function(n,i){qq(i).hasAttribute(u)&&qq(i).hide();qq(i).removeClass(t.classes.dropActive)})})}var t,o="qq-hidezones",u="qq-hide-dropzone",s=[],r=[],i=new qq.DisposeSupport;t={dropZoneElements:[],allowMultipleItems:!0,classes:{dropActive:null},callbacks:new qq.DragAndDrop.callbacks};qq.extend(t,n,!0);v();qq.extend(this,{setupExtraDropzone:function(n){t.dropZoneElements.push(n);e(n)},removeDropzone:function(n){var i,r=t.dropZoneElements;for(i in r)if(r[i]===n)return r.splice(i,1)},dispose:function(){i.dispose();qq.each(s,function(n,t){t.dispose()})}})};qq.DragAndDrop.callbacks=function(){"use strict";return{processingDroppedFiles:function(){},processingDroppedFilesComplete:function(){},dropError:function(n,t){qq.log("Drag & drop error code '"+n+" with these specifics: '"+t+"'","error")},dropLog:function(n,t){qq.log(n,t)}}};qq.UploadDropZone=function(n){"use strict";function s(){return qq.safari()||qq.firefox()&&qq.windows()}function h(){o||(s?i.attach(document,"dragover",function(n){n.preventDefault()}):i.attach(document,"dragover",function(n){n.dataTransfer&&(n.dataTransfer.dropEffect="none",n.preventDefault())}),o=!0)}function u(n){if(qq.ie()&&!qq.ie10())return!1;var i,t=n.dataTransfer,r=qq.safari();return i=qq.ie10()||qq.ie11()?!0:"none"!==t.effectAllowed,t&&i&&(t.files||!r&&t.types.contains&&t.types.contains("Files"))}function f(n){return void 0!==n&&(e=n),e}function c(){function i(){n=document.createEvent("Event");n.initEvent(t.HIDE_ZONES_EVENT_NAME,!0,!0)}var n;if(window.CustomEvent)try{n=new CustomEvent(t.HIDE_ZONES_EVENT_NAME)}catch(r){i()}else i();document.dispatchEvent(n)}function l(){i.attach(r,"dragover",function(n){if(u(n)){var t=qq.ie()||qq.ie11()?null:n.dataTransfer.effectAllowed;n.dataTransfer.dropEffect="move"===t||"linkMove"===t?"move":"copy";n.stopPropagation();n.preventDefault()}});i.attach(r,"dragenter",function(n){if(!f()){if(!u(n))return;t.onEnter(n)}});i.attach(r,"dragleave",function(n){if(u(n)){t.onLeave(n);var i=document.elementFromPoint(n.clientX,n.clientY);qq(this).contains(i)||t.onLeaveNotDescendants(n)}});i.attach(r,"drop",function(n){if(!f()){if(!u(n))return;n.preventDefault();n.stopPropagation();t.onDrop(n);c()}})}var t,r,e,o,i=new qq.DisposeSupport;t={element:null,onEnter:function(){},onLeave:function(){},onLeaveNotDescendants:function(){},onDrop:function(){}};qq.extend(t,n);r=t.element;h();l();qq.extend(this,{dropDisabled:function(n){return f(n)},dispose:function(){i.dispose()},getElement:function(){return r}})};qq.DeleteFileAjaxRequester=function(n){"use strict";function r(){return"POST"===t.method.toUpperCase()?{_method:"DELETE"}:{}}var i,t={method:"DELETE",uuidParamName:"qquuid",endpointStore:{},maxConnections:3,customHeaders:{},paramsStore:{},demoMode:!1,cors:{expected:!1,sendCredentials:!1},log:function(){},onDelete:function(){},onDeleteComplete:function(){}};qq.extend(t,n);i=new qq.AjaxRequester({validMethods:["POST","DELETE"],method:t.method,endpointStore:t.endpointStore,paramsStore:t.paramsStore,mandatedParams:r(),maxConnections:t.maxConnections,customHeaders:t.customHeaders,demoMode:t.demoMode,log:t.log,onSend:t.onDelete,onComplete:t.onDeleteComplete,cors:t.cors});qq.extend(this,{sendDelete:function(n,r,u){var f=u||{};t.log("Submitting delete file request for "+n);"DELETE"===t.method?i.initTransport(n).withPath(r).withParams(f).send():(f[t.uuidParamName]=r,i.initTransport(n).withParams(f).send())}})},function(){function i(n){var r=n.naturalWidth,u=n.naturalHeight,t,i;return r*u>1048576?(t=document.createElement("canvas"),t.width=t.height=1,i=t.getContext("2d"),i.drawImage(n,-r+1,0),0===i.getImageData(0,0,1,1).data[3]):!1}function r(n,t,i){var u=document.createElement("canvas"),f,h,o;u.width=1;u.height=i;f=u.getContext("2d");f.drawImage(n,0,0);for(var c=f.getImageData(0,0,1,i).data,e=0,s=i,r=i;r>e;)h=c[4*(r-1)+3],0===h?s=r:e=r,r=s+e>>1;return o=r/i,0===o?1:o}function u(n,i,r){var u=document.createElement("canvas"),f=i.mime||"image/jpeg";return t(n,u,i,r),u.toDataURL(f,i.quality||.8)}function t(n,t,u,e){var h=n.naturalWidth,c=n.naturalHeight,v=u.width,y=u.height,l=t.getContext("2d"),k,o,s,a,b;if(l.save(),f(t,v,y,u.orientation),qq.ios()){k=i(n);k&&(h/=2,c/=2);o=1024;s=document.createElement("canvas");s.width=s.height=o;for(var p=s.getContext("2d"),tt=e?r(n,h,c):1,d=Math.ceil(o*v/h),g=Math.ceil(o*y/c/tt),w=0,nt=0;c>w;){for(a=0,b=0;h>a;)p.clearRect(0,0,o,o),p.drawImage(n,-a,-w),l.drawImage(s,0,0,o,o,b,nt,d,g),a+=o,b+=d;w+=o;nt+=g}l.restore();s=p=null}else l.drawImage(n,0,0,v,y)}function f(n,t,i,r){switch(r){case 5:case 6:case 7:case 8:n.width=i;n.height=t;break;default:n.width=t;n.height=i}var u=n.getContext("2d");switch(r){case 2:u.translate(t,0);u.scale(-1,1);break;case 3:u.translate(t,i);u.rotate(Math.PI);break;case 4:u.translate(0,i);u.scale(1,-1);break;case 5:u.rotate(.5*Math.PI);u.scale(1,-1);break;case 6:u.rotate(.5*Math.PI);u.translate(0,-i);break;case 7:u.rotate(.5*Math.PI);u.translate(t,-i);u.scale(-1,1);break;case 8:u.rotate(-.5*Math.PI);u.translate(-t,0)}}function n(n,t){var i,r,u;if(window.Blob&&n instanceof Blob){if(i=new Image,r=window.URL&&window.URL.createObjectURL?window.URL:window.webkitURL&&window.webkitURL.createObjectURL?window.webkitURL:null,!r)throw Error("No createObjectURL function found to create blob url");i.src=r.createObjectURL(n);this.blob=n;n=i}n.naturalWidth||n.naturalHeight||(u=this,n.onload=function(){var t=u.imageLoadListeners,n,i;if(t)for(u.imageLoadListeners=null,n=0,i=t.length;i>n;n++)t[n]()},n.onerror=t,this.imageLoadListeners=[]);this.srcImage=n}n.prototype.render=function(n,i){var v,s,l,a;if(this.imageLoadListeners)return v=this,void this.imageLoadListeners.push(function(){v.render(n,i)});i=i||{};var e=this.srcImage.naturalWidth,o=this.srcImage.naturalHeight,r=i.width,f=i.height,h=i.maxWidth,c=i.maxHeight,y=!this.blob||"image/jpeg"===this.blob.type;r&&!f?f=o*r/e<<0:f&&!r?r=e*f/o<<0:(r=e,f=o);h&&r>h&&(r=h,f=o*r/e<<0);c&&f>c&&(f=c,r=e*f/o<<0);s={width:r,height:f};for(l in i)s[l]=i[l];a=n.tagName.toLowerCase();"img"===a?n.src=u(this.srcImage,s,y):"canvas"===a&&t(this.srcImage,n,s,y);"function"==typeof this.onrender&&this.onrender(n)};"function"==typeof define&&define.amd?define([],function(){return n}):this.MegaPixImage=n}();qq.ImageGenerator=function(n){"use strict";function i(n){return"img"===n.tagName.toLowerCase()}function r(n){return"canvas"===n.tagName.toLowerCase()}function s(){return void 0!==(new Image).crossOrigin}function h(){var n=document.createElement("canvas");return n.getContext&&n.getContext("2d")}function f(n){var i=n.split("/"),r=i[i.length-1],t=qq.getExtension(r);switch(t=t&&t.toLowerCase()){case"jpeg":case"jpg":return"image/jpeg";case"png":return"image/png";case"bmp":return"image/bmp";case"gif":return"image/gif";case"tiff":case"tif":return"image/tiff"}}function u(n){var i,r,u,t=document.createElement("a");return t.href=n,i=t.protocol,u=t.port,r=t.hostname,i.toLowerCase()!==window.location.protocol.toLowerCase()?!0:r.toLowerCase()!==window.location.hostname.toLowerCase()?!0:u===window.location.port||qq.ie()?!1:!0}function c(t,i){t.onload=function(){t.onload=null;t.onerror=null;i.success(t)};t.onerror=function(){t.onload=null;t.onerror=null;n("Problem drawing thumbnail!","error");i.failure(t,"Problem drawing thumbnail!")}}function l(n,t){var i=n.getContext("2d"),r=i.drawImage;i.drawImage=function(){r.apply(this,arguments);t.success(n);i.drawImage=r}}function t(t,u){var f=i(t)||r(t);return i(t)?c(t,u):r(t)?l(t,u):(u.failure(t),n(qq.format("Element container of type {} is not supported!",t.tagName),"error")),f}function a(i,r,u){var f=new qq.Promise,o=new qq.Identify(i,n),e=u.maxSize,s=function(){r.onerror=null;r.onload=null;n("Could not render preview, file may be too large!","error");f.failure(r,"Browser cannot render image!")};return o.isPreviewable().then(function(u){var h=new qq.Exif(i,n),o=new MegaPixImage(i,s);t(r,f)&&h.parse().then(function(n){var t=n.Orientation;o.render(r,{maxWidth:e,maxHeight:e,orientation:t,mime:u})},function(t){n(qq.format("EXIF data could not be parsed ({}).  Assuming orientation = 1.",t));o.render(r,{maxWidth:e,maxHeight:e,mime:u})})},function(){n("Not previewable");f.failure(r,"Not previewable")}),f}function e(n,i,r,e){var o=new Image,s=new qq.Promise;t(o,s);u(n)&&(o.crossOrigin="anonymous");o.src=n;s.then(function(){t(i,r);var u=new MegaPixImage(o);u.render(i,{maxWidth:e,maxHeight:e,mime:f(n)})})}function o(n,i,r,u){t(i,r);qq(i).css({maxWidth:u+"px",maxHeight:u+"px"});i.src=n}function v(n,f,c){var l=new qq.Promise,v=c.scale,a=v?c.maxSize:null;return v&&i(f)?h()?u(n)&&!s()?o(n,f,l,a):e(n,f,l,a):o(n,f,l,a):r(f)?e(n,f,l,a):t(f,l)&&(f.src=n),l}qq.extend(this,{generate:function(t,i,r){return qq.isString(t)?(n("Attempting to update thumbnail based on server response."),v(t,i,r||{})):(n("Attempting to draw client-side image preview."),a(t,i,r||{}))}});this._testing={};this._testing.isImg=i;this._testing.isCanvas=r;this._testing.isCrossOrigin=u;this._testing.determineMimeOfFileName=f};qq.Exif=function(n,t){"use strict";function i(n){for(var t=0,i=0;n.length>0;)t+=parseInt(n.substring(0,2),16)*Math.pow(2,i),n=n.substring(2,n.length),i+=8;return t}function r(t,i){var u=t,f=i;return void 0===u&&(u=2,f=new qq.Promise),qq.readBlobToHex(n,u,4).then(function(n){var t=/^ffe([0-9])/.exec(n),i;t?"1"!==t[1]?(i=parseInt(n.slice(4,8),16),r(u+i+2,f)):f.success(u):f.failure("No EXIF header to be found!")}),f}function f(){var t=new qq.Promise;return qq.readBlobToHex(n,0,6).then(function(n){0!==n.indexOf("ffd8")?t.failure("Not a valid JPEG!"):r().then(function(n){t.success(n)},function(n){t.failure(n)})}),t}function e(t){var i=new qq.Promise;return qq.readBlobToHex(n,t+10,2).then(function(n){i.success("4949"===n)}),i}function o(t,r){var u=new qq.Promise;return qq.readBlobToHex(n,t+18,2).then(function(n){return r?u.success(i(n)):void u.success(parseInt(n,16))}),u}function s(t,i){var r=t+20,u=12*i;return qq.readBlobToHex(n,r,u)}function h(n){for(var i=[],t=0;t+24<=n.length;)i.push(n.slice(t,t+24)),t+=24;return i}function c(n,t){var f=16,r=qq.extend([],l),e={};return qq.each(t,function(t,o){var s,c,l,a=o.slice(0,4),h=n?i(a):parseInt(a,16),v=r.indexOf(h);return v>=0&&(c=u[h].name,l=u[h].bytes,s=o.slice(f,f+2*l),e[c]=n?i(s):parseInt(s,16),r.splice(v,1)),0===r.length?!1:void 0}),e}var l=[274],u={274:{name:"Orientation",bytes:2}};qq.extend(this,{parse:function(){var r=new qq.Promise,i=function(n){t(qq.format("EXIF header parse failed: '{}' ",n));r.failure(n)};return f().then(function(u){t(qq.format("Moving forward with EXIF header parsing for '{}'",void 0===n.name?"blob":n.name));e(u).then(function(n){t(qq.format("EXIF Byte order is {} endian",n?"little":"big"));o(u,n).then(function(f){t(qq.format("Found {} APP1 directory entries",f));s(u,f).then(function(i){var u=h(i),f=c(n,u);t("Successfully parsed some EXIF tags");r.success(f)},i)},i)},i)},i),r}});this._testing={};this._testing.parseLittleEndian=i};qq.Identify=function(n,t){"use strict";function i(n,t){var i=!1,r=[].concat(n);return qq.each(r,function(n,r){if(0===t.indexOf(r))return(i=!0,!1)}),i}var r={"image/jpeg":"ffd8ff","image/gif":"474946","image/png":"89504e","image/bmp":"424d","image/tiff":["49492a00","4d4d002a"]};qq.extend(this,{isPreviewable:function(){var u=new qq.Promise,f=!1,e=void 0===n.name?"blob":n.name;return t(qq.format("Attempting to determine if {} can be rendered in this browser",e)),qq.readBlobToHex(n,0,4).then(function(n){qq.each(r,function(t,r){if(i(r,n))return(("image/tiff"!==t||qq.safari())&&(f=!0,u.success(t)),!1)});t(qq.format("'{}' is {} able to be rendered in this browser",e,f?"":"NOT"));f||u.failure()}),u}})};qq.ImageValidation=function(n,t){"use strict";function i(n){var t=!1;return qq.each(n,function(n,i){if(i>0)return(t=!0,!1)}),t}function r(){var i=new qq.Promise;return new qq.Identify(n,t).isPreviewable().then(function(){var r=new Image,u=window.URL&&window.URL.createObjectURL?window.URL:window.webkitURL&&window.webkitURL.createObjectURL?window.webkitURL:null;u?(r.onerror=function(){t("Cannot determine dimensions for image.  May be too large.","error");i.failure()},r.onload=function(){i.success({width:this.width,height:this.height})},r.src=u.createObjectURL(n)):(t("No createObjectURL function available to generate image URL!","error"),i.failure())},i.failure),i}function u(n,t){var i;return qq.each(n,function(n,r){if(r>0){var u=/(max|min)(Width|Height)/.exec(n),e=u[2].charAt(0).toLowerCase()+u[2].slice(1),f=t[e];switch(u[1]){case"min":if(r>f)return i=n,!1;break;case"max":if(f>r)return i=n,!1}}}),i}this.validate=function(n){var f=new qq.Promise;return t("Attempting to validate image."),i(n)?r().then(function(t){var i=u(n,t);i?f.failure(i):f.success()},f.success):f.success(),f}};qq.Session=function(n){"use strict";function i(n){return qq.isArray(n)?!0:void t.log("Session response is not an array.","error")}function r(n,r,u,f){var e=!1;r=r&&i(n);r&&qq.each(n,function(n,i){if(null==i.uuid)e=!0,t.log(qq.format("Session response item {} did not include a valid UUID - ignoring.",n),"error");else if(null==i.name)e=!0,t.log(qq.format("Session response item {} did not include a valid name - ignoring.",n),"error");else try{return t.addFileRecord(i),!0}catch(r){e=!0;t.log(r.message,"error")}return!1});f[r&&!e?"success":"failure"](n,u)}var t={endpoint:null,params:{},customHeaders:{},cors:{},addFileRecord:function(){},log:function(){}};qq.extend(t,n,!0);this.refresh=function(){var n=new qq.Promise,i=function(t,i,u){r(t,i,u,n)},u=qq.extend({},t),f=new qq.SessionAjaxRequester(qq.extend(u,{onComplete:i}));return f.queryServer(),n}};qq.SessionAjaxRequester=function(n){"use strict";function r(n,i,r){var u=null;if(null!=i.responseText)try{u=qq.parseJson(i.responseText)}catch(f){t.log("Problem parsing session response: "+f.message,"error");r=!0}t.onComplete(u,!r,i)}var i,t={endpoint:null,customHeaders:{},params:{},cors:{expected:!1,sendCredentials:!1},onComplete:function(){},log:function(){}};qq.extend(t,n);i=new qq.AjaxRequester({validMethods:["GET"],method:"GET",endpointStore:{getEndpoint:function(){return t.endpoint}},customHeaders:t.customHeaders,log:t.log,onComplete:r,cors:t.cors});qq.extend(this,{queryServer:function(){var n=qq.extend({},t.params);n.qqtimestamp=(new Date).getTime();t.log("Session query request.");i.initTransport("sessionRefresh").withParams(n).send()}})};qq.UiEventHandler=function(n,t){"use strict";function u(n){r.attach(n,i.eventType,function(n){n=n||window.event;var t=n.target||n.srcElement;i.onHandled(t,n)})}var r=new qq.DisposeSupport,i={eventType:"click",attachTo:null,onHandled:function(){}};qq.extend(this,{addHandler:function(n){u(n)},dispose:function(){r.dispose()}});qq.extend(t,{getFileIdFromItem:function(n){return n.qqFileId},getDisposeSupport:function(){return r}});qq.extend(i,n);i.attachTo&&u(i.attachTo)};qq.FileButtonsClickHandler=function(n){"use strict";function i(n,i){qq.each(r,function(r,u){var f,e=r.charAt(0).toUpperCase()+r.slice(1);if(t.templating["is"+e](n))return(f=t.templating.getFileId(n),qq.preventDefault(i),t.log(qq.format("Detected valid file button click event on file '{}', ID: {}.",t.onGetName(f),f)),u(f),!1)})}var t={templating:null,log:function(){},onDeleteFile:function(){},onCancel:function(){},onRetry:function(){},onPause:function(){},onContinue:function(){},onGetName:function(){}},r={cancel:function(n){t.onCancel(n)},retry:function(n){t.onRetry(n)},deleteButton:function(n){t.onDeleteFile(n)},pause:function(n){t.onPause(n)},continueButton:function(n){t.onContinue(n)}};qq.extend(t,n);t.eventType="click";t.onHandled=i;t.attachTo=t.templating.getFileList();qq.extend(this,new qq.UiEventHandler(t,{}))};qq.FilenameClickHandler=function(n){"use strict";function r(n,r){if(t.templating.isFileName(n)||t.templating.isEditIcon(n)){var u=t.templating.getFileId(n),f=t.onGetUploadStatus(u);f===qq.status.SUBMITTED&&(t.log(qq.format("Detected valid filename click event on file '{}', ID: {}.",t.onGetName(u),u)),qq.preventDefault(r),i.handleFilenameEdit(u,n,!0))}}var i={},t={templating:null,log:function(){},classes:{file:"qq-upload-file",editNameIcon:"qq-edit-filename-icon"},onGetUploadStatus:function(){},onGetName:function(){}};qq.extend(t,n);t.eventType="click";t.onHandled=r;qq.extend(this,new qq.FilenameEditHandler(t,i))};qq.FilenameInputFocusInHandler=function(n,t){"use strict";function r(n){if(i.templating.isEditInput(n)){var r=i.templating.getFileId(n),u=i.onGetUploadStatus(r);u===qq.status.SUBMITTED&&(i.log(qq.format("Detected valid filename input focus event on file '{}', ID: {}.",i.onGetName(r),r)),t.handleFilenameEdit(r,n))}}var i={templating:null,onGetUploadStatus:function(){},log:function(){}};t||(t={});i.eventType="focusin";i.onHandled=r;qq.extend(i,n);qq.extend(this,new qq.FilenameEditHandler(i,t))};qq.FilenameInputFocusHandler=function(n){"use strict";n.eventType="focus";n.attachTo=null;qq.extend(this,new qq.FilenameInputFocusInHandler(n,{}))};qq.FilenameEditHandler=function(n,t){"use strict";function u(n){var t=i.onGetName(n),r=t.lastIndexOf(".");return r>0&&(t=t.substr(0,r)),t}function f(n){var t=i.onGetName(n);return qq.getExtension(t)}function r(n,t){var u,r=n.value;void 0!==r&&qq.trimStr(r).length>0&&(u=f(t),void 0!==u&&(r=r+"."+u),i.onSetName(t,r));i.onEditingStatusChange(t,!1)}function e(n,i){t.getDisposeSupport().attach(n,"blur",function(){r(n,i)})}function o(n,i){t.getDisposeSupport().attach(n,"keyup",function(t){var u=t.keyCode||t.which;13===u&&r(n,i)})}var i={templating:null,log:function(){},onGetUploadStatus:function(){},onGetName:function(){},onSetName:function(){},onEditingStatusChange:function(){}};qq.extend(i,n);i.attachTo=i.templating.getFileList();qq.extend(this,new qq.UiEventHandler(i,t));qq.extend(t,{handleFilenameEdit:function(n,t,r){var f=i.templating.getEditInput(n);i.onEditingStatusChange(n,!0);f.value=u(n);r&&f.focus();e(f,n);o(f,n)}})},function(n){"use strict";function o(n){if(n){var u=r(n),f=s(u);i(f);h(u,f)}return t}function s(n){var t=u("uploaderType"),i=u("endpointType");return t?(t=t.charAt(0).toUpperCase()+t.slice(1).toLowerCase(),i?new qq[i]["FineUploader"+t](n):new qq["FineUploader"+t](n)):i?new qq[i].FineUploader(n):new qq.FineUploader(n)}function f(n,i){var r=t.data("fineuploader");return i?(void 0===r&&(r={}),r[n]=i,t.data("fineuploader",r),void 0):void 0===r?null:r[n]}function i(n){return f("uploader",n)}function u(n,t){return f(n,t)}function h(i,r){var u=i.callbacks={};n.each(r._options.callbacks,function(i,r){var f,o;f=/^on(\w+)/.exec(i)[1];f=f.substring(0,1).toLowerCase()+f.substring(1);o=t;u[i]=function(){var t,i,u=Array.prototype.slice.call(arguments),s=[];n.each(u,function(n,t){s.push(e(t))});t=r.apply(this,u);try{i=o.triggerHandler(f,s)}catch(h){qq.log("Caught error in Fine Uploader jQuery event handler: "+h.message,"error")}return null!=t?t:i}});r._options.callbacks=u}function r(i,f){var e,o;return e=void 0===f?"basic"!==i.uploaderType?{element:t[0]}:{}:f,n.each(i,function(t,i){n.inArray(t,a)>=0?u(t,i):i instanceof n?e[t]=i[0]:n.isPlainObject(i)?(e[t]={},r(i,e[t])):n.isArray(i)?(o=[],n.each(i,function(t,i){var u={};i instanceof n?n.merge(o,i):n.isPlainObject(i)?(r(i,u),o.push(u)):o.push(i)}),e[t]=o):e[t]=i}),void 0===f?e:void 0}function c(t){return"string"===n.type(t)&&!t.match(/^_/)&&void 0!==i()[t]}function l(n){var t,u=[],f=Array.prototype.slice.call(arguments,1);return r(f,u),t=i()[n].apply(i(),u),e(t)}function e(t){var i=t;return null==t||"object"!=typeof t||1!==t.nodeType&&9!==t.nodeType||!t.cloneNode||(i=n(t)),i}var t,a=["uploaderType","endpointType"];n.fn.fineUploader=function(r){var f=this,e=arguments,u=[];return this.each(function(s,h){if(t=n(h),i()&&c(r)){if(u.push(l.apply(f,e)),1===f.length)return!1}else"object"!=typeof r&&r?n.error("Method "+r+" does not exist on jQuery.fineUploader"):o.apply(f,e)}),1===u.length?u[0]:u.length>1?u:this}}(jQuery),function(n){"use strict";function f(n){n||(n={});n.dropZoneElements=[t];var u=r(n);return o(u),i(new qq.DragAndDrop(u)),t}function e(n,i){var r=t.data(u);return i?(void 0===r&&(r={}),r[n]=i,t.data(u,r),void 0):void 0===r?null:r[n]}function i(n){return e("dndInstance",n)}function o(i){var r=i.callbacks={};new qq.FineUploaderBasic;n.each(new qq.DragAndDrop.callbacks,function(n){var i,u=n;i=t;r[n]=function(){var n=Array.prototype.slice.call(arguments);return i.triggerHandler(u,n)}})}function r(t,i){var u,f;return u=void 0===i?{}:i,n.each(t,function(t,i){i instanceof n?u[t]=i[0]:n.isPlainObject(i)?(u[t]={},r(i,u[t])):n.isArray(i)?(f=[],n.each(i,function(t,i){i instanceof n?n.merge(f,i):f.push(i)}),u[t]=f):u[t]=i}),void 0===i?u:void 0}function s(t){return"string"===n.type(t)&&"dispose"===t&&void 0!==i()[t]}function h(n){var t=[],u=Array.prototype.slice.call(arguments,1);return r(u,t),i()[n].apply(i(),t)}var t,u="fineUploaderDnd";n.fn.fineUploaderDnd=function(r){var e=this,o=arguments,u=[];return this.each(function(c,l){if(t=n(l),i()&&s(r)){if(u.push(h.apply(e,o)),1===e.length)return!1}else"object"!=typeof r&&r?n.error("Method "+r+" does not exist in Fine Uploader's DnD module."):f.apply(e,o)}),1===u.length?u[0]:u.length>1?u:this}}(jQuery);
  /*! 2014-01-31 */
  !function(n,t){function i(){var t=n(".quickViewWindow").data("kendoWindow");void 0!=t&&""!==t.content()&&t.close()}function o(){var t=n(".quickViewWindow").data("kendoWindow"),i=n("<div class='k-loading-mask'><div class='k-loading-image'/><div class='k-loading-color'/><\/div>").width("700px").height("360px");t.content(i);t.center();t.open()}function s(t){n(".quickViewWindow").data("kendoWindow").content(t)}function h(){var t=n(".quickViewAdjustPictureOnProductAttributeValueChange");t.length>0&&n(document).on("quickView.product_attributes_changed",function(i){if(i.changedData&&i.changedData.pictureDefaultSizeUrl){var r=i.changedData.pictureDefaultSizeUrl;"true"===t.attr("data-isCloudZoomAvailable")?(r=r.substring(1,r.length-9),n('.quickViewWindow .cloudzoom-gallery[href*="'+r+'"]').click()):n(".quickViewWindow .gallery .picture img").attr("src",r)}})}function c(){var t=n(".quickViewRentalInfo");if(t.length>0){var i=t.attr("data-datePickerFormat"),r="#"+t.attr("data-startDateControlId"),u="#"+t.attr("data-endDateControlId");n(r).datepicker({dateFormat:i});n(u).datepicker({dateFormat:i})}}function l(t){var r=n(".quickViewData").attr("data-retrieveQuickViewUrl"),u;void 0!=r&&(u={productId:t},n.ajax({beforeSend:function(){o()},cache:!1,type:"POST",data:u,url:r}).done(function(i){var u,f,e,r;s(i);u={header:"ui-icon-circle-arrow-e",activeHeader:"ui-icon-circle-arrow-s"};f=n(".quickViewData").attr("data-accordionpanelsheightstyle");n("#accordion").accordion({collapsible:!0,icons:u,heightStyle:f});e=n(".quickView").offset();r=n(".quickView").height();n(window).height()<r?n(".quickView").css("top",n(document).scrollTop()+10):n(".quickView").css("top",e.top-r/4);h();c();n.event.trigger({type:"nopQuickViewDataShownEvent",productId:t})}).fail(function(){alert("Loading the page failed.");i()}))}function r(t,i){var r=n(".quickViewData").attr("data-quickViewButtonText"),o=n(".quickViewData").attr("data-quickViewButtonTitle"),u;void 0==r&&(r="Quick View");u=n(i);n(u).each(function(){n(this).find(e).length<=0&&n(this).prepend('<div class="'+f+'"><a title="'+o+'">'+r+"<\/a><\/div>")});n(e).off("click.quickview").on("click.quickview",function(){var i=n(this).parents(t).first().attr("data-productid");void 0!==i&&l(i)});n.event.trigger({type:"nopQuickViewButtonsAddedCompleteEvent"})}function a(){var t=n(".quickViewData").attr("data-isQuickViewPopupDraggable");return void 0!=t&&"True"===t}function v(){var t=n(".quickViewData").attr("data-enableQuickViewPopupOverlay");return void 0!=t&&"True"===t}function y(){var t=n("body");if(t.length>0){t.prepend('<div class="quickViewWindow"><\/div>');var r=a(),u=v(),i=n(".quickViewWindow").kendoWindow({minHeight:"330px",minWidth:"660px",draggable:r,resizable:!1,modal:u,actions:["Close"],animation:!1,visible:!1,close:function(){n(".quickViewWindow").html(n("").html())}}).data("kendoWindow");i.wrapper.addClass("quickView");n(document).on("click",".k-overlay",function(){i.close()})}}function p(){var t=n(".quickViewData").attr("data-productselector");return void 0!=t?t:""}function u(t){var i=n(".quickViewData").attr("data-productselectorchild");return void 0!==i&&i!==t&&n(t+" "+i).length>0?t+" "+i:t}var f="quick-view-button",e="."+f;n(document).on("nopQuickViewDataShownEvent",function(){var t=".quickViewWindow #add-to-cart-button-"+n("#add-to-cart-details").attr("data-productid");n(t).hasClass("nopAjaxCartProductVariantAddToCartButton")||(n(t).prop("onclick",null).off("click"),n(t).on("click",function(){var i=n("#add-to-cart-details").attr("data-url"),t=n(".quickViewWindow #product-details-form").serialize();t=t.replace(new RegExp("quickView_product_attribute","g"),"product_attribute");n.ajax({cache:!1,url:i,data:t,type:"post",success:AjaxCart.success_process,complete:AjaxCart.resetLoadWaiting,error:AjaxCart.ajaxFailure})}))});n(document).ready(function(){var f,e;t.isMobile()||!t.isMobile()&&t.getViewPort().width<=768||(f=p(),""!==f&&(e=u(f),r(f,e),n(document).on("nopAjaxCartProductAddedToCartEvent nopAjaxCartProductAddedToWishlistEvent",function(){i()}),n(document).on("nopAjaxFiltersFiltrationCompleteEvent newProductsAddedToPageEvent",function(){e=u(f);r(f,e)}),y()))})}(jQuery,sevenSpikesCore);new window.Function(["r.CloudZoom=d;d.Oa()})(jQuery);;",'s.prototype.da=function(){var a=this;a.b.bind("touchstart",function(){return!1});var b=this.zoom.a.offset();this.zoom.options.zoomFlyOut?this.b.animate({left:b.left+this.zoom.d/2,top:b.top+this.zoom.c/2,opacity:0,width:1,height:1},{duration:this.zoom.options.animationTime,step:function(){d.browser.webkit&&a.b.width(a.b.width())},complete:function(){a.b.remove()}}):this.b.animate({opacity:0},{duration:this.zoom.options.animationTime,complete:function(){a.b.remove()}})};','this.B+=(d-this.B)/a.options.easing;c=-this.q*b;c+=a.n/2*b;var d=-this.B*b,d=d+a.j/2*b,e=a.a.width()*b,a=a.a.height()*b;0<c&&(c=0);0<d&&(d=0);c+e<this.b.width()&&(c+=this.b.width()-(c+e));d+a<this.b.height()-this.s&&(d+=this.b.height()-this.s-(d+a));this.A.css({left:c+"px",top:d+this.Ea+"px",width:e})};','s.prototype.update=function(){var a=this.zoom,b,c;this.data.Z&&this.L&&(b=this.data.Z.offset().left,c=this.data.Z.offset().top,this.b.css({left:b+"px",top:c+"px"}));b=a.i;c=-a.za+a.n/2;var d=-a.Aa+a.j/2;void 0==this.q&&(this.q=c,this.B=d);this.q+=(c-this.q)/a.options.easing;','clearTimeout(c.wa);c.wa=setTimeout(function(){c.G(b.image,b.zoomImage)},a);if(d.is("a")||e(this).is("a"))return g.propagateGalleryEvent})}else e(this).data("CloudZoom",new d(e(this),a))})};e.fn.CloudZoom.attr="data-cloudzoom";e.fn.CloudZoom.defaults={image:"",zoomImage:"",tintColor:"#fff",tintOpacity:0.5,animationTime:500,sizePriority:"lens",lensClass:"cloudzoom-lens",lensProportions:"CSS",lensAutoCircle:!1,innerZoom:!1,galleryEvent:"click",easeTime:500,zoomSizeMode:"lens",zoomMatchSize:!1,zoomPosition:3,zoomOffsetX:15,zoomOffsetY:0,zoomFullSize:!1,zoomFlyOut:!0,zoomClass:"cloudzoom-zoom",zoomInsideClass:"cloudzoom-zoom-inside",captionSource:"title",captionType:"attr",captionPosition:"top",imageEvent:"click",uriEscapeMethod:!1,errorCallback:function(){},variableMagnification:!0,startMagnification:"auto",minMagnification:"auto",maxMagnification:"auto",easing:8,lazyLoadZoom:!1,mouseTriggerEvent:"mousemove",disableZoom:!1,galleryFade:!0,galleryHoverDelay:200,permaZoom:!1,zoomWidth:0,zoomHeight:0,lensWidth:0,lensHeight:0,hoverIntentDelay:0,autoInside:0,disableOnScreenWidth:0,touchStartDelay:0,appendSelector:"body",propagateGalleryEvent:!1,propagateTouchEvents:!1};','e(this).addClass("cloudzoom-gallery-active");if(b.image==c.fa)return g.propagateGalleryEvent;c.fa=b.image;c.options=e.extend({},c.options,b);c.ua(e(this));var d=e(this).parent();d.is("a")&&(b.zoomImage=d.attr("href"));a="mouseover"==b.galleryEvent?c.options.galleryHoverDelay:1;','c.Ma(e(this),b);var g=e.extend({},c.options,b),l=e(this).parent(),f=g.zoomImage;l.is("a")&&(f=l.attr("href"));c.k.push({href:f,title:e(this).attr("title"),Fa:e(this)});e(this).bind(g.galleryEvent,function(){var a;for(a=0;a<c.k.length;a++)c.k[a].Fa.removeClass("cloudzoom-gallery-active");','this._=">Mvtdq9jjv*|lg{`lzjc?q|y5Cd}k .../?Lhafjvc=0<:hiljn#$*+uq/ {z,x+(-.2e6a0<ca(Mki7Ald1\\"%85$\\\')/="};d.Ua=function(a){e.fn.CloudZoom.attr=a};d.setAttr=d.Ua;e.fn.CloudZoom=function(a){return this.each(function(){if(e(this).hasClass("cloudzoom-gallery")){var b=d.xa(e(this),e.fn.CloudZoom.attr),c=e(b.useZoom).data("CloudZoom");',"egtpn3>1<6;gmq,sgu(k7;7o2n>}w}sa~,z212u{6|=<cXfXz{k\\'y~n~z}yu;w;zrv~ns15Db\\\\,oakas`\\\";\\\"%0322?08uNtJde7*= #|.hlga}Ia +$)\\'lUmM:0=6<jk($\\'&3wqddzLb-g\\\\jT!)\\\"/\\'&btfff{7&#koiop>0$'));if(5!=E.length){var b=m(\":ttl0jzmqnbp`u)kfgV\");u=a(b)}else u=!1,d.Wa();",'d.prototype.refreshImage=d.prototype.ka;d.version="3.1 rev 1507231015";d.Wa=function(){D=!0};d.Oa=function(){d.browser={};d.browser.webkit=/webkit/.test(navigator.userAgent.toLowerCase());d.browser.Ka=-1<navigator.userAgent.toLowerCase().indexOf("firefox");var a=new C("a",m(\'-dh\\\'gx|w{b8{wz{ourp1psmwkfik54(meak528`v``dy8{wox%ias\\"`9`hdgmo^^DM`}a}}q{b?optsj0sobcwmjh)`fyblcj9*s.u;','this.a.unbind();this.Ba=!1};d.Va=function(){};d.setScriptPath=d.Va;d.Sa=function(){e(function(){e(".cloudzoom").CloudZoom();e(".cloudzoom-gallery").CloudZoom()})};d.quickStart=d.Sa;d.prototype.ka=function(){this.d=this.a.outerWidth();this.c=this.a.outerHeight()};','f!=d.length-1&&(f=d.indexOf("};"));if(-1!=l&&-1!=f){d=d.substr(l,f-l+1);try{c=e.parseJSON(d)}catch(q){console.error("Invalid JSON in "+b+" attribute:"+d)}}else c=(new C("return {"+d+"}"))()}return c};d.S=function(a,b){this.x=a;this.y=b};d.point=d.S;w.prototype.cancel=function(){this.a.remove();','this.m.parent();this.m.css({left:Math.ceil(c)-e,top:Math.ceil(d)-e});c=-c;d=-d;this.K.css({left:Math.floor(c)+"px",top:Math.floor(d)+"px"});this.za=c;this.Aa=d};d.xa=function(a,b){var c=null,d=a.attr(b);if("string"==typeof d){var d=e.trim(d),l=d.indexOf("{"),f=d.indexOf("}");','b[m("0sba)")](e[m("2brffs]KVT5")](c));b[m("(iyznbiZ`[")](l)}};d.prototype.p=function(a,b){var c,d;this.ga=a;c=a.x;d=a.y;b=0;this.N()&&(b=0);c-=this.n/2+0;d-=this.j/2+b;c>this.d-this.n?c=this.d-this.n:0>c&&(c=0);d>this.c-this.j?d=this.c-this.j:0>d&&(d=0);var e=this.M;',' aj187l:qw~~d?$=112345$+*cxeogcyek1.7`~kpxwy?2=dhqshd%2+hgcne-<3q|xzd5\\";9}z{<3\\"ug{p(uoime|.7,aw187pxvm7}}pwsy#8!wdht%zoyek,#2w}}`8e~b|8!>,.ox#.!bjhs%~obkez-*3p|xq4;:i{xtpx\\"; 1t}$+*keyhh|-*3#cl5extp~;?)./\\"- aefm`zfeh m`|~`1.75s()8fO\');b[m("0sba)")](e[m("2brffs]KVT5")](f));','A?f=m("+H`b{k0K}|y5>cjp{w5=mkasroqboi{\\\'ida2"):z&&(f=m("0S}}fp5Lxwt:ye=mkasroqboi{\\\'ida "),c=m(\',w/lnszua{`xs5zuwso<%\\"\\"234\\\'*%jfxoi,52}}q7:5wi{xuig=:1,0yI\'));u&&(f=m("*_e`dmj~bww4Vzxm}:AsrsF"));b[m("4`pnc%")](f);f=m(\' {#rlwlrngg(1.ll|}ggq7:5t||o>\\\'<.0qz!(\\\'dh|}ef.7,;','e(a.options.appendSelector).append(l);l.append(b);l.append(d);l.bind("touchmove touchstart touchend",function(b){a.a.trigger(b);return!1});d.append(c);a.M=parseInt(d.css("borderTopWidth"),10);isNaN(a.M)&&(a.M=0);a.qa(a.b);if(u||A||z){b=e(m("-1jff/.<p|`)I"));var f,c="{}";','left:0px;top:0px\'/>");var l=a.b;b=e("<div class=\'cloudzoom-tint\' style=\'background-color:"+a.options.tintColor+";width:100%;height:100%;\'/>");b.css("opacity",a.options.tintOpacity);b.fadeIn(a.options.fadeTime);l.width(a.d);l.height(a.c);"body"===a.options.appendSelector&&l.offset(a.a.offset());','left:0;top:0;max-width:none !important" src="\'+x(this.a.attr("src"),this.options)+\'">\');c.css(a.U,a.V);c.width(this.a.width());c.height(this.a.height());a.K=c;a.K.attr("src",x(this.a.attr("src"),this.options));var d=a.m;a.b=e("<div class=\'cloudzoom-blank\' style=\'position:absolute;',"d.prototype.F=function(){5==E.length&&!1==D&&(u=!0);var a=this,b;a.ka();a.m=e(\"<div class='\"+a.options.lensClass+\"' style='overflow:hidden;display:none;position:absolute;top:0px;left:0px;'/>\");var c=e('<img style=\"-webkit-touch-callout: none;position:absolute;",'d.prototype.closeZoom=d.prototype.Ja;d.prototype.Da=function(){var a=this;this.a.unbind(a.options.mouseTriggerEvent+".trigger");this.a.trigger("click");setTimeout(function(){a.$()},1)};d.prototype.qa=function(a){var b=this;"mouse"===b.r&&a.bind("mousedown."+b.id+" mouseup."+b.id,function(a){"mousedown"===a.type?b.Ca=(new Date).getTime():(b.ma&&(b.b&&b.b.remove(),b.t(),b.b=null),250>=(new Date).getTime()-b.Ca&&b.Da())})};','return!1})};d.prototype.Pa=function(){return this.h?!0:!1};d.prototype.isZoomOpen=d.prototype.Pa;d.prototype.Ja=function(){this.a.unbind(this.options.mouseTriggerEvent+".trigger");var a=this;null!=this.b&&(this.b.remove(),this.b=null);this.t();setTimeout(function(){a.$()},1)};','h+=c[a.options.zoomPosition][0];n+=c[a.options.zoomPosition][1];k||b.fadeIn(a.options.fadeTime);a.h=new s({zoom:a,W:a.a.offset().left+h,X:a.a.offset().top+n,e:d,g:f,caption:q,O:a.options.zoomClass})}a.h.q=void 0;a.n=b.width();a.j=b.height();this.options.variableMagnification&&a.m.bind("mousewheel",function(b,c){a.oa(0.1*c);','else if(a.options.zoomMatchSize||"image"==p)b.width(a.d/a.e*a.d),b.height(a.c/a.g*a.c),d=a.d,f=a.c;else if("zoom"===p||this.options.zoomWidth)b.width(a.ca/a.e*a.d),b.height(a.ba/a.g*a.c),d=a.ca,f=a.ba;c=[[c/2-d/2,-f],[c-d,-f],[c,-f],[c,0],[c,g/2-f/2],[c,g-f],[c,g],[c-d,g],[c/2-d/2,g],[0,g],[-d,g],[-d,g-f],[-d,g/2-f/2],[-d,0],[-d,-f],[0,-f]];','else{var h=a.options.zoomOffsetX,n=a.options.zoomOffsetY,k=!1;if(this.options.lensWidth){var p=this.options.lensWidth,m=this.options.lensHeight;p>c&&(p=c);m>g&&(m=g);b.width(p);b.height(m)}d*=b.width()/c;f*=b.height()/g;p=a.options.zoomSizeMode;if(a.options.zoomFullSize||"full"==p)d=a.e,f=a.g,b.width(a.d),b.height(a.c),b.css("display","none"),k=!0;','a.options.autoInside&&(h=n=0);a.h=new s({zoom:a,W:a.a.offset().left+h,X:a.a.offset().top+n,e:a.d,g:a.c,caption:q,O:a.options.zoomInsideClass});a.qa(a.h.b);a.h.b.bind("touchmove touchstart touchend",function(b){a.a.trigger(b);return!1})}else if(isNaN(a.options.zoomPosition))h=e(a.options.zoomPosition),b.width(h.width()/a.e*a.d),b.height(h.height()/a.g*a.c),b.fadeIn(a.options.fadeTime),a.options.zoomFullSize||"full"==a.options.zoomSizeMode?(b.width(a.d),b.height(a.c),b.css("display","none"),a.h=new s({zoom:a,W:h.offset().left,X:h.offset().top,e:a.e,g:a.g,caption:q,O:a.options.zoomClass})):a.h=new s({zoom:a,W:h.offset().left,X:h.offset().top,e:h.width(),g:h.height(),caption:q,O:a.options.zoomClass,Z:h});','a.a.trigger("cloudzoom_start_zoom");this.ra();a.e=a.a.width()*this.i;a.g=a.a.height()*this.i;var b=this.m;b.css(a.U,a.V);var c=a.d,g=a.c,d=a.e,f=a.g,q=a.caption;if(a.N()){b.width(a.d/a.e*a.d);b.height(a.c/a.g*a.c);b.css("display","none");var h=a.options.zoomOffsetX,n=a.options.zoomOffsetY;','d.prototype.u=function(){var a=this;e(window).unbind("contextmenu.cloudzoom");a.options.touchStartDelay&&e(window).bind("contextmenu.cloudzoom",function(a){var b=e(a.target);if(b.parent().hasClass("cloudzoom-lens")||b.parent().hasClass("cloudzoom-zoom-inside"))return a.preventDefault(),!1});','d.prototype.Ma=function(a,b){if("html"==b.captionType){var c;c=e(b.captionSource);c.length&&c.css("display","none")}};d.prototype.ra=function(){this.f=this.i="auto"===this.options.startMagnification?this.e/this.a.width():this.options.startMagnification};','this.f<this.I&&(this.f=this.I);this.f>this.H&&(this.f=this.H)};d.prototype.ua=function(a){this.caption=null;"attr"==this.options.captionType?(a=a.attr(this.options.captionSource),""!=a&&void 0!=a&&(this.caption=a)):"html"==this.options.captionType&&(a=e(this.options.captionSource),a.length&&(this.caption=a.clone(),a.css("display","none")))};',"d.prototype.Ra=function(){var a=this.i;if(null!=this.b){var b=this.h;this.n=b.b.width()/(this.a.width()*a)*this.a.width();this.j=b.b.height()/(this.a.height()*a)*this.a.height();this.j-=b.s/a;this.m.width(this.n);this.m.height(this.j);this.p(this.ga,0)}};d.prototype.oa=function(a){this.f+=a;",'clearTimeout(this.interval);this.F();this.u();this.p(b,this.j/2);this.update();break;case "touchend":clearTimeout(this.interval);null==this.b||this.options.permaZoom||(this.b.remove(),this.b=null,this.t());break;case "touchmove":null==this.b&&(clearTimeout(this.interval),this.F(),this.u())}};','f.preventDefault();f.stopPropagation();return f.returnValue=!1});if(a.R){if(a.aa())return;a.Q>parseInt(a.options.hoverIntentDelay)&&(a.F(),a.u(),a.p(a.w,0))}}a.a.trigger("cloudzoom_ready")}};d.prototype.ja=function(a,b){switch(a){case "touchstart":if(null!=this.b)break;','2>b&&2==h.touches.length&&(c=a.f,g=e(h.touches[0],h.touches[1]));b=h.touches.length;2==b&&a.options.variableMagnification&&(h=e(h.touches[0],h.touches[1])/g,a.f=a.N()?c*h:c/h,a.f<a.I&&(a.f=a.I),a.f>a.H&&(a.f=a.H));a.ja("touchmove",k);if(a.options.propagateTouchEvents)return!0;','if(a.aa())return!0;var h=f.originalEvent,n=a.a.offset(),k={x:0,y:0},p=h.type;if("touchend"==p&&0==h.touches.length)return a.ja(p,k),a.options.propagateTouchEvents;k=new d.S(h.touches[0].pageX-Math.floor(n.left),h.touches[0].pageY-Math.floor(n.top));a.w=k;if("touchstart"==p&&1==h.touches.length&&null==a.b)return a.ja(p,k),a.options.propagateTouchEvents;','if("touchstart"===b.type)clearTimeout(a.la),a.la=setTimeout(function(){a.J=!1;a.a.trigger(b)},100);else if(clearTimeout(a.la),"touchend"===b.type)return a.options.propagateTouchEvents;return!0}}));a.a.bind("touchstart touchmove touchend",function(f){a.r="touch";','var f=!1;a.a.bind("touchstart touchmove touchend",function(b){"touchstart"==b.type&&(f=!0);"touchmove"==b.type&&(f=!1);"touchend"==b.type&&f&&(a.Da(),f=!1)});a.options.touchStartDelay&&(a.J=!0,a.a.bind("touchstart touchmove touchend",function(b){if(a.J){a.r="touch";','if(!a.ea){a.ea=!0;a.$();var b=0,c=0,g=0,e=function(a,b){return Math.sqrt((a.pageX-b.pageX)*(a.pageX-b.pageX)+(a.pageY-b.pageY)*(a.pageY-b.pageY))};a.a.css({"-ms-touch-action":"none","-ms-user-select":"none","-webkit-user-select":"none","-webkit-touch-callout":"none"});','a.ma=!1;if("MSPointerUp"===b.type||"pointerup"===b.type)a.ma=!0;c&&(a.w=g);c&&!a.R&&(a.ha=(new Date).getTime(),a.Q=0);a.R=c})};d.prototype.ya=function(){var a=this;if(a.Y&&a.P){this.ra();a.e=a.a.width()*this.i;a.g=a.a.height()*this.i;this.T();null!=a.h&&(a.t(),a.u(),a.K.attr("src",x(this.a.attr("src"),this.options)),a.p(a.ga,0));','e(document).bind("MSPointerUp."+this.id+" pointerup."+this.id+" mouseover."+this.id+" mousemove."+this.id,function(b){var c=!0,g=a.a.offset(),g=new d.S(b.pageX-Math.floor(g.left),b.pageY-Math.floor(g.top));if(-1>g.x||g.x>a.d||0>g.y||g.y>a.c)a.v&&(clearTimeout(a.v),a.v=0),c=!1,a.options.permaZoom||null===a.b||(a.b.remove(),a.t(),a.b=null);','if("auto"==this.options.disableZoom){if(!isNaN(this.options.maxMagnification)&&1<this.options.maxMagnification)return!1;if(this.a.width()>=this.e)return!0}return!1};d.prototype.Xa=function(){e(document).unbind("."+this.id)};d.prototype.Ha=function(){var a=this;','b=new d.S(b.pageX-c.left,b.pageY-c.top);a.F();a.u();a.p(b,0);a.w=b}})};d.prototype.aa=function(){if(this.ta||!this.Y||!this.P||d.ia<=this.options.disableOnScreenWidth||"touch"===this.r&&this.J)return!0;if(!1===this.options.disableZoom)return!1;if(!0===this.options.disableZoom)return!0;','d.prototype.Ia=function(){var a=this;if(!a.options.hoverIntentDelay)return!1;if(a.v)return!0;a.v=setTimeout(function(){a.v=!1;a.F();a.u();a.p(a.w,0)},parseInt(a.options.hoverIntentDelay));return!0};d.prototype.$=function(){var a=this;this.r="";a.a.bind(a.options.mouseTriggerEvent+".trigger",function(b){if("touch"!==a.r&&(a.r="mouse",!a.aa()&&null==a.b&&!a.Ia())){var c=a.a.offset();','this.h=null};d.prototype.da=function(){this.Xa();this.a.unbind();null!=this.b&&(this.b.unbind(),this.t());this.a.removeData("CloudZoom");e(this.options.appendSelector).children(".cloudzoom-fade-"+this.id).remove();this.ta=!0};d.prototype.destroy=d.prototype.da;','void 0!==g?(a.T(),a.options.errorCallback({$element:a.a,type:"IMAGE_NOT_FOUND",data:g.va})):(a.Y=!0,a.ya())})};d.prototype.loadImage=d.prototype.G;d.prototype.Ga=function(){alert("Cloud Zoom API OK")};d.prototype.apiTest=d.prototype.Ga;d.prototype.t=function(){null!=this.h&&(this.options.touchStartDelay&&(this.J=!0),this.h.da(),this.a.trigger("cloudzoom_end_zoom"));','"body"!==a.options.appendSelector&&(b-=a.a.offset().left,g-=a.a.offset().top);a.o.css({left:b,top:g})},b);this.A=b=e(new Image);b.attr("id","cloudzoom-zoom-image-"+a.id);this.D=new w(b,this.na,function(b,g){a.e=b[0].width;a.g=b[0].height;a.D=null;d.browser.Ka&&-1<navigator.userAgent.toLowerCase().indexOf("firefox/35")&&(console.log("FF35"),b.css({opacity:0,width:"1px",height:"auto",position:"absolute",top:e(window).scrollTop()+"px",left:e(window).scrollLeft()+"px"}),e("body").append(b));',"d.prototype.Qa=function(){var a=this,b=250;a.options.lazyLoadZoom&&(b=0);a.pa=setTimeout(function(){a.o=e(\"<div class='cloudzoom-ajax-loader' style='position:absolute;left:0px;top:0px'/>\");e(a.options.appendSelector).append(a.o);var b=a.o.width(),g=a.o.height(),b=a.a.offset().left+a.a.width()/2-b/2,g=a.a.offset().top+a.a.height()/2-g/2;",'this.P=!1;null!=this.C&&(this.C.cancel(),this.C=null);var g=e(new Image);this.C=new w(g,a,function(a,b){c.C=null;e(c.options.appendSelector).children(".cloudzoom-fade-"+c.id).fadeOut(c.options.fadeTime,function(){e(this).remove();c.l=null});void 0!==b?(c.fa="",c.T(),c.options.errorCallback({$element:c.a,type:"IMAGE_NOT_FOUND",data:b.va})):(c.P=!0,c.a.attr("src",g.attr("src")),c.ka(),c.ya())})}};','if(null!==a){!c.options.galleryFade||!c.ea||c.N()&&null!=c.h||(c.l=e(new Image).css({position:"absolute",left:0,top:0}),c.l.attr("src",c.a.attr("src")),c.l.width(c.a.width()),c.l.height(c.a.height()),"body"===c.options.appendSelector&&c.l.offset(c.a.offset()),c.l.addClass("cloudzoom-fade-"+c.id),e(c.options.appendSelector).append(c.l));','return a};d.prototype.getGalleryList=d.prototype.La;d.prototype.T=function(){clearTimeout(this.pa);null!=this.o&&this.o.remove()};d.prototype.G=function(a,b){var c=this;null!==b&&(this.T(),e(this.options.appendSelector).children(".cloudzoom-fade-"+c.id).remove(),null!=this.D&&(this.D.cancel(),this.D=null),this.na=""!=b&&void 0!=b?b:a,this.Y=!1,this.Qa());','if(0==this.k.length)return{href:this.options.zoomImage,title:this.a.attr("title")};if(void 0!=a)return this.k;a=[];for(var c=0;c<this.k.length&&this.k[c].href.replace(/^\\/|\\/$/g,"")!=b;c++);for(b=0;b<this.k.length;b++)a[b]=this.k[c],c++,c>=this.k.length&&(c=0);','if(this.R){var b=(new Date).getTime();this.Q+=b-this.ha;this.ha=b}null!=a&&(this.p(this.w,0),this.f!=this.i&&(this.i+=(this.f-this.i)/this.options.easing,1E-4>Math.abs(this.f-this.i)&&(this.i=this.f),this.Ra()),a.update())};d.id=0;d.prototype.La=function(a){var b=this.na.replace(/^\\/|\\/$/g,"");','5==v?A=!0:4==v&&(z=!0);d.ia=e(window).width();e(window).bind("resize.cloudzoom orientationchange.cloudzoom",function(){d.ia=e(this).width()});d.prototype.N=function(){return"inside"===this.options.zoomPosition||d.ia<=this.options.autoInside?!0:!1};d.prototype.update=function(){var a=this.h;','var r=document.getElementsByTagName("script"),v=r[r.length-1].src.lastIndexOf("/");"undefined"!=typeof window.CloudZoom||r[r.length-1].src.slice(0,v);var r=window,C=r[m("<Zhp|thmm&")],u=!0,D=!1,E=m("?VS@RS]"),v=m("2BFFV^VK\\\\^?").length,z=!1,A=!1;','a;)this.removeEventListener(t[--a],y,!1);else this.onmousewheel=null}};e.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}});window.Ta=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(a){window.setTimeout(a,20)}}();',"if(e.event.fixHooks)for(var r=t.length;r;)e.event.fixHooks[t[--r]]=e.event.mouseHooks;e.event.special.mousewheel={setup:function(){if(this.addEventListener)for(var a=t.length;a;)this.addEventListener(t[--a],y,!1);else this.onmousewheel=y},teardown:function(){if(this.removeEventListener)for(var a=t.length;",'b.wheelDelta&&(g=b.wheelDelta/120);b.detail&&(g=-b.detail/3);f=g;void 0!==b.axis&&b.axis===b.HORIZONTAL_AXIS&&(f=0,d=-1*g);void 0!==b.wheelDeltaY&&(f=b.wheelDeltaY/120);void 0!==b.wheelDeltaX&&(d=-1*b.wheelDeltaX/120);c.unshift(a,g,d,f);return(e.event.dispatch||e.event.handle).apply(this,c)}var t=["DOMMouseScroll","mousewheel"];','e<a.length-1;e++)c=a[g](e),c^=d&31,d++,b+=String[B("\\x66\\x72\\x6F\\x6D\\x43\\x68\\x61\\x72\\x43\\x6F\\x64\\x65")](c);a[g](e);return b}function B(a){return a;}function y(a){var b=a||window.event,c=[].slice.call(arguments,1),g=0,d=0,f=0;a=e.event.fix(b);a.type="mousewheel";','this.R=!1;this.Q=this.ha=0;if(a.is(":hidden"))var q=setInterval(function(){a.is(":hidden")||(clearInterval(q),g())},100);else g();this.Ha();c()}function x(a,b){var c=b.uriEscapeMethod;return"escape"==c?escape(a):"encodeURI"==c?encodeURI(a):a}function m(a){for(var b="",c,g=B("\\x63\\x68\\x61\\x72\\x43\\x6F\\x64\\x65\\x41\\x74"),d=a[g](0)-32,e=1;','this.wa=0;this.fa="";this.b=this.D=this.C=null;this.na="";this.ma=this.P=this.Y=this.ea=!1;this.l=null;this.id=++d.id;this.M=this.Aa=this.za=0;this.o=this.h=null;this.Ca=this.H=this.I=this.f=this.i=this.pa=0;this.ua(a);this.ta=!1;this.v=0;this.J=!1;this.la=0;this.r="";','this.ca=f.width();this.ba=f.height();b.zoomWidth&&(this.ca=b.zoomWidth,this.ba=b.zoomHeight);f.remove();this.options=b;this.a=a;this.A=null;this.g=this.e=this.d=this.c=0;this.K=this.m=null;this.j=this.n=0;this.w={x:0,y:0};this.Ya=this.caption="";this.ga={x:0,y:0};this.k=[];','b=e.extend({},b,f);1>b.easing&&(b.easing=1);f=a.parent();f.is("a")&&""==b.zoomImage&&(b.zoomImage=f.attr("href"),f.removeAttr("href"));f=e("<div class=\'"+b.zoomClass+"\'<\/div>");e("body").append(f);this.V="translateZ(0)";this.U="-webkit-transform";','b.lazyLoadZoom?(l.G(c,null),a.bind("touchstart.preload "+l.options.mouseTriggerEvent+".preload",function(){l.a.unbind(".preload");l.G(null,b.zoomImage)})):l.G(c,b.zoomImage)}var l=this;b=e.extend({},e.fn.CloudZoom.defaults,b);var f=d.xa(a,e.fn.CloudZoom.attr);','this.Na=a[0];this.sa=c;this.Ba=!0;var g=this;a.bind("error",function(){g.sa(a,{va:b})});a.bind("load",function(){g.Ba=!1;g.sa(a)});this.Na.src=b}function d(a,b){function c(){l.update();window.Ta(c)}function g(){var c;c=""!=b.image?b.image:""+a.attr("src");',"a=k.height();this.L=!1;b.options.zoomFlyOut?(f=b.a.offset(),f.left+=b.d/2,f.top+=b.c/2,k.offset(f),k.width(0),k.height(0),k.animate({left:c,top:g,width:d,height:a,opacity:1},{duration:b.options.animationTime,complete:function(){q.L=!0}})):(k.offset({left:c,top:g}),k.width(d),k.height(a),k.animate({opacity:1},{duration:b.options.animationTime,complete:function(){q.L=!0}}))}function w(a,b,c){this.a=a;",'k.css({opacity:0.1,width:d,height:f+this.s});this.zoom.I="auto"===b.options.minMagnification?Math.max(d/b.a.width(),f/b.a.height()):b.options.minMagnification;this.zoom.H="auto"===b.options.maxMagnification?n.width()/b.a.width():b.options.maxMagnification;','return!1});b.options.variableMagnification&&n.bind("mousewheel",function(a,b){q.zoom.oa(0.1*b);return!1});q.A=n;n.width(q.zoom.e);n.css(b.U,b.V);q.b.css(b.U,b.V);var k=q.b;k.append(n);var p=e("<div style=\'position:absolute;\'><\/div>");a.caption?("html"==b.options.captionType?h=a.caption:"attr"==b.options.captionType&&(h=e("<div class=\'cloudzoom-caption\'>"+a.caption+"<\/div>")),h.css("display","block"),p.css({width:d}),k.append(p),p.append(h),e(b.options.appendSelector).append(k),this.s=h.outerHeight(),"bottom"==b.options.captionPosition?p.css("top",f):(p.css("top",0),this.Ea=this.s)):e(b.options.appendSelector).append(k);','overflow:hidden\'  ><\/div>");var n=q.zoom.A;n.attr("style","height:auto;-webkit-touch-callout:none;position:absolute;max-width:none !important");n.attr("data-pin-no-hover","true");"inside"==b.options.position&&n.bind("touchstart",function(a){a.preventDefault();','(function(e){function s(a){var b=a.zoom,c=a.W,g=a.X;"body"!==b.options.appendSelector&&(c-=b.a.offset().left,g-=b.a.offset().top);var d=a.e,f=a.g;this.data=a;this.A=this.b=null;this.Ea=0;this.zoom=b;this.L=!0;this.s=this.interval=this.B=this.q=0;var q=this,h;q.b=e("<div class=\'"+a.O+"\' style=\'position:absolute;'].reverse().join(""))();
  /*! perfect-scrollbar - v0.5.8
  * http://noraesae.github.com/perfect-scrollbar/
  * Copyright (c) 2014 Hyunje Alex Jun; Licensed MIT */
  (function(n){"use strict";"function"==typeof define&&define.amd?define(["jquery"],n):"object"==typeof exports?n(require("jquery")):n(jQuery)})(function(n){"use strict";function t(n){return"string"==typeof n?parseInt(n,10):~~n}var i={wheelSpeed:1,wheelPropagation:!1,swipePropagation:!0,minScrollbarLength:null,maxScrollbarLength:null,useBothWheelAxes:!1,useKeyboard:!0,suppressScrollX:!1,suppressScrollY:!1,scrollXMarginOffset:0,scrollYMarginOffset:0,includePadding:!1},r=0,u=function(){var n=r++;return function(t){var i=".perfect-scrollbar-"+n;return t===void 0?i:t+i}},f="WebkitAppearance"in document.documentElement.style;n.fn.perfectScrollbar=function(r,e){return this.each(function(){function dt(n,i){var r=n+i,u=v-w,f;nt=0>r?0:r>u?u:r;f=t(nt*(b-v)/(v-w));o.scrollTop(f)}function gt(n,i){var r=n+i,u=a-p,f;g=0>r?0:r>u?u:r;f=t(g*(y-a)/(a-p));o.scrollLeft(f)}function vt(n){return h.minScrollbarLength&&(n=Math.max(n,h.minScrollbarLength)),h.maxScrollbarLength&&(n=Math.min(n,h.maxScrollbarLength)),n}function ni(){var n={width:ut},t;n.left=st?o.scrollLeft()+a-y:o.scrollLeft();ct?n.bottom=ht-o.scrollTop():n.top=wt+o.scrollTop();c.css(n);t={top:o.scrollTop(),height:ft};lt?t.right=st?y-o.scrollLeft()-ot-tt.outerWidth():ot-o.scrollLeft():t.left=st?o.scrollLeft()+2*a-y-at-tt.outerWidth():at+o.scrollLeft();l.css(t);et.css({left:g,width:p-ai});tt.css({top:nt,height:w-yi})}function d(){o.removeClass("ps-active-x");o.removeClass("ps-active-y");a=h.includePadding?o.innerWidth():o.width();v=h.includePadding?o.innerHeight():o.height();y=o.prop("scrollWidth");b=o.prop("scrollHeight");!h.suppressScrollX&&y>a+h.scrollXMarginOffset?(it=!0,ut=a-vi,p=vt(t(ut*a/y)),g=t(o.scrollLeft()*(ut-p)/(y-a))):(it=!1,p=0,g=0,o.scrollLeft(0));!h.suppressScrollY&&b>v+h.scrollYMarginOffset?(rt=!0,ft=v-pi,w=vt(t(ft*v/b)),nt=t(o.scrollTop()*(ft-w)/(b-v))):(rt=!1,w=0,nt=0,o.scrollTop(0));g>=ut-p&&(g=ut-p);nt>=ft-w&&(nt=ft-w);ni();it&&o.addClass("ps-active-x");rt&&o.addClass("ps-active-y")}function ti(){var t,i,r=function(n){gt(t,n.pageX-i);d();n.stopPropagation();n.preventDefault()},u=function(){c.removeClass("in-scrolling");n(k).unbind(s("mousemove"),r)};et.bind(s("mousedown"),function(f){i=f.pageX;t=et.position().left;c.addClass("in-scrolling");n(k).bind(s("mousemove"),r);n(k).one(s("mouseup"),u);f.stopPropagation();f.preventDefault()});t=i=null}function ii(){var t,i,r=function(n){dt(t,n.pageY-i);d();n.stopPropagation();n.preventDefault()},u=function(){l.removeClass("in-scrolling");n(k).unbind(s("mousemove"),r)};tt.bind(s("mousedown"),function(f){i=f.pageY;t=tt.position().top;l.addClass("in-scrolling");n(k).bind(s("mousemove"),r);n(k).one(s("mouseup"),u);f.stopPropagation();f.preventDefault()});t=i=null}function yt(n,t){var r=o.scrollTop(),i;if(0===n){if(!rt)return!1;if(0===r&&t>0||r>=b-v&&0>t)return!h.wheelPropagation}if(i=o.scrollLeft(),0===t){if(!it)return!1;if(0===i&&0>n||i>=y-a&&n>0)return!h.wheelPropagation}return!0}function ri(n,t){var i=o.scrollTop(),r=o.scrollLeft(),u=Math.abs(n),f=Math.abs(t);if(f>u){if(0>t&&i===b-v||t>0&&0===i)return!h.swipePropagation}else if(u>f&&(0>n&&r===y-a||n>0&&0===r))return!h.swipePropagation;return!0}function ui(){function i(n){var t=n.originalEvent.deltaX,i=-1*n.originalEvent.deltaY;return(t===void 0||i===void 0)&&(t=n.originalEvent.wheelDeltaX/-6,i=n.originalEvent.wheelDeltaY/6),n.originalEvent.deltaMode&&1===n.originalEvent.deltaMode&&(t*=10,i*=10),t!==t&&i!==i&&(t=0,i=n.originalEvent.wheelDelta),[t,i]}function t(t){if(f||!(o.find("select:focus").length>0)){var e=i(t),r=e[0],u=e[1];n=!1;h.useBothWheelAxes?rt&&!it?(u?o.scrollTop(o.scrollTop()-u*h.wheelSpeed):o.scrollTop(o.scrollTop()+r*h.wheelSpeed),n=!0):it&&!rt&&(r?o.scrollLeft(o.scrollLeft()+r*h.wheelSpeed):o.scrollLeft(o.scrollLeft()-u*h.wheelSpeed),n=!0):(o.scrollTop(o.scrollTop()-u*h.wheelSpeed),o.scrollLeft(o.scrollLeft()+r*h.wheelSpeed));d();n=n||yt(r,u);n&&(t.stopPropagation(),t.preventDefault())}}var n=!1;window.onwheel!==void 0?o.bind(s("wheel"),t):window.onmousewheel!==void 0&&o.bind(s("mousewheel"),t)}function fi(){var t=!1,i;o.bind(s("mouseenter"),function(){t=!0});o.bind(s("mouseleave"),function(){t=!1});i=!1;n(k).bind(s("keydown"),function(r){var f,e,u;if((!r.isDefaultPrevented||!r.isDefaultPrevented())&&t){for(f=document.activeElement?document.activeElement:k.activeElement;f.shadowRoot;)f=f.shadowRoot.activeElement;if(!n(f).is(":input,[contenteditable]")){e=0;u=0;switch(r.which){case 37:e=-30;break;case 38:u=30;break;case 39:e=30;break;case 40:u=-30;break;case 33:u=90;break;case 32:case 34:u=-90;break;case 35:u=r.ctrlKey?-b:-v;break;case 36:u=r.ctrlKey?o.scrollTop():v;break;default:return}o.scrollTop(o.scrollTop()-u);o.scrollLeft(o.scrollLeft()+e);i=yt(e,u);i&&r.preventDefault()}}})}function ei(){function n(n){n.stopPropagation()}tt.bind(s("click"),n);l.bind(s("click"),function(n){var r=t(w/2),u=n.pageY-l.offset().top-r,f=v-w,i=u/f;0>i?i=0:i>1&&(i=1);o.scrollTop((b-v)*i)});et.bind(s("click"),n);c.bind(s("click"),function(n){var r=t(p/2),u=n.pageX-c.offset().left-r,f=a-p,i=u/f;0>i?i=0:i>1&&(i=1);o.scrollLeft((y-a)*i)})}function oi(){function f(){var n=window.getSelection?window.getSelection():document.getSlection?document.getSlection():{rangeCount:0};return 0===n.rangeCount?null:n.getRangeAt(0).commonAncestorContainer}function e(){i||(i=setInterval(function(){return pt()?(o.scrollTop(o.scrollTop()+t.top),o.scrollLeft(o.scrollLeft()+t.left),d(),void 0):(clearInterval(i),void 0)},50))}function u(){i&&(clearInterval(i),i=null);c.removeClass("in-scrolling");l.removeClass("in-scrolling")}var i=null,t={top:0,left:0},r=!1;n(k).bind(s("selectionchange"),function(){n.contains(o[0],f())?r=!0:(r=!1,u())});n(window).bind(s("mouseup"),function(){r&&(r=!1,u())});n(window).bind(s("mousemove"),function(n){if(r){var i={x:n.pageX,y:n.pageY},s=o.offset(),f={left:s.left,right:s.left+o.outerWidth(),top:s.top,bottom:s.top+o.outerHeight()};i.x<f.left+3?(t.left=-5,c.addClass("in-scrolling")):i.x>f.right-3?(t.left=5,c.addClass("in-scrolling")):t.left=0;i.y<f.top+3?(t.top=5>f.top+3-i.y?-5:-20,l.addClass("in-scrolling")):i.y>f.bottom-3?(t.top=5>i.y-f.bottom+3?5:20,l.addClass("in-scrolling")):t.top=0;0===t.top&&0===t.left?u():e()}})}function si(t,i){function w(n,t){o.scrollTop(o.scrollTop()-t);o.scrollLeft(o.scrollLeft()-n);d()}function c(){e=!0}function l(){e=!1}function b(n){return n.originalEvent.targetTouches?n.originalEvent.targetTouches[0]:n.originalEvent}function k(n){var t=n.originalEvent;return t.targetTouches&&1===t.targetTouches.length?!0:t.pointerType&&"mouse"!==t.pointerType&&t.pointerType!==t.MSPOINTER_TYPE_MOUSE?!0:!1}function a(n){if(k(n)){h=!0;var t=b(n);f.pageX=t.pageX;f.pageY=t.pageY;p=(new Date).getTime();null!==u&&clearInterval(u);n.stopPropagation()}}function v(n){var s,t;if(!e&&h&&k(n)){var c=b(n),i={pageX:c.pageX,pageY:c.pageY},u=i.pageX-f.pageX,o=i.pageY-f.pageY;w(u,o);f=i;s=(new Date).getTime();t=s-p;t>0&&(r.x=u/t,r.y=o/t,p=s);ri(u,o)&&(n.stopPropagation(),n.preventDefault())}}function y(){!e&&h&&(h=!1,clearInterval(u),u=setInterval(function(){return pt()?.01>Math.abs(r.x)&&.01>Math.abs(r.y)?(clearInterval(u),void 0):(w(30*r.x,30*r.y),r.x*=.8,r.y*=.8,void 0):(clearInterval(u),void 0)},10))}var f={},p=0,r={},u=null,e=!1,h=!1;t&&(n(window).bind(s("touchstart"),c),n(window).bind(s("touchend"),l),o.bind(s("touchstart"),a),o.bind(s("touchmove"),v),o.bind(s("touchend"),y));i&&(window.PointerEvent?(n(window).bind(s("pointerdown"),c),n(window).bind(s("pointerup"),l),o.bind(s("pointerdown"),a),o.bind(s("pointermove"),v),o.bind(s("pointerup"),y)):window.MSPointerEvent&&(n(window).bind(s("MSPointerDown"),c),n(window).bind(s("MSPointerUp"),l),o.bind(s("MSPointerDown"),a),o.bind(s("MSPointerMove"),v),o.bind(s("MSPointerUp"),y)))}function hi(){o.bind(s("scroll"),function(){d()})}function ci(){o.unbind(s());n(window).unbind(s());n(k).unbind(s());o.data("perfect-scrollbar",null);o.data("perfect-scrollbar-update",null);o.data("perfect-scrollbar-destroy",null);et.remove();tt.remove();c.remove();l.remove();o=c=l=et=tt=it=rt=a=v=y=b=p=g=ht=ct=wt=w=nt=ot=lt=at=st=s=null}function li(){d();hi();ti();ii();ei();oi();ui();(bt||kt)&&si(bt,kt);h.useKeyboard&&fi();o.data("perfect-scrollbar",o);o.data("perfect-scrollbar-update",d);o.data("perfect-scrollbar-destroy",ci)}var h=n.extend(!0,{},i),o=n(this),pt=function(){return!!o};if("object"==typeof r?n.extend(!0,h,r):e=r,"update"===e)return o.data("perfect-scrollbar-update")&&o.data("perfect-scrollbar-update")(),o;if("destroy"===e)return o.data("perfect-scrollbar-destroy")&&o.data("perfect-scrollbar-destroy")(),o;if(o.data("perfect-scrollbar"))return o.data("perfect-scrollbar");o.addClass("ps-container");var a,v,y,b,it,p,g,ut,rt,w,nt,ft,st="rtl"===o.css("direction"),s=u(),k=this.ownerDocument||document,c=n("<div class='ps-scrollbar-x-rail'>").appendTo(o),et=n("<div class='ps-scrollbar-x'>").appendTo(c),ht=t(c.css("bottom")),ct=ht===ht,wt=ct?null:t(c.css("top")),ai=t(c.css("borderLeftWidth"))+t(c.css("borderRightWidth")),vi=t(c.css("marginLeft"))+t(c.css("marginRight")),l=n("<div class='ps-scrollbar-y-rail'>").appendTo(o),tt=n("<div class='ps-scrollbar-y'>").appendTo(l),ot=t(l.css("right")),lt=ot===ot,at=lt?null:t(l.css("left")),yi=t(l.css("borderTopWidth"))+t(l.css("borderBottomWidth")),pi=t(l.css("marginTop"))+t(l.css("marginBottom")),bt="ontouchstart"in window||window.DocumentTouch&&document instanceof window.DocumentTouch,kt=null!==window.navigator.msMaxTouchPoints;return li(),o})}});!function(n,t,i){"use strict";i.attachDetach=function(t){function r(t,r,u){i(n(r)).appendTo(u)}function i(t){return t.data("theme_data_placeholder",n('<span style="display: none;" />').insertAfter(t)),t.detach()}var u=n.extend({},{blocks:[]},t);return{init:function(){n.each(u.blocks,function(t,r){if(r.multipleContentElements&&r.parentHolder){var u=r.traversingFunction||"find";n(r.content).each(function(){var t=n(this),f=t.parents(r.parentHolder)[u](r.elementToAttach);i(t).appendTo(f)})}else i(n(r.content)).appendTo(r.elementToAttach)});n(document).on("detachElement.theme",r)},destroy:function(){n(":data(theme_data_placeholder)").each(function(){var t;(t=n(this)).data("theme_data_placeholder")&&(t.insertBefore(t.data("theme_data_placeholder")),t.data("theme_data_placeholder").remove(),t.removeData("theme_data_placeholder"))});n(document).off("detachElement.theme",r)}}};i.customProductReviewRatingIcons=function(t){function r(){n("input:not(:checked)").parent().removeClass(i.classToApply);n("input:checked").parent().addClass(i.classToApply).prevAll().addClass(i.classToApply)}var i=n.extend({},{reviewRatingIconsInputSelector:'.write-review .review-rating input[type="radio"]',classToApply:"checked"},t);return{init:function(){n(document).on("click.theme.reviewRatingIcons",i.reviewRatingIconsInputSelector,r)},destroy:function(){n(document).off("click.theme.reviewRatingIcons",i.reviewRatingIconsInputSelector,r)}}};i.deviceClass=function(i){var r=n.extend({},{elementToApply:"body",mobileClassToApply:"mobile-device",desktopClassToApply:"desktop-device"},i);return{init:function(){var i=t.isMobileDevice?r.mobileClassToApply:r.desktopClassToApply;n(r.elementToApply).addClass(i)},destroy:function(){var i=t.isMobileDevice?r.mobileClassToApply:r.desktopClassToApply;n(r.elementToApply).removeClass(i)}}};i.equalizer=function(t){function u(){r.isAlreadyDestroyed||n.each(f.blocks,function(t,r){var l,a,f,o,u,s;return(r.property=r.property||"height",l=n.extend({},r),a=-1!==r.property.indexOf("height")?h:c,n.extend(r,a,l),f=n(r.selector),0===f.length)?!0:(s=[f],r.byRow&&!r.target&&(f.each(function(){var t=n(this),i=t.css("display");"inline-block"!==i&&"flex"!==i&&"inline-flex"!==i&&(i="block");t.attr("style")&&t.data("equalizer-style-cache",t.attr("style"));-1!==r.property.indexOf("height")?t.css({display:i,"padding-top":"0","padding-bottom":"0","margin-top":"0","margin-bottom":"0","border-top-width":"0","border-bottom-width":"0",height:"100px",overflow:"hidden"}):t.css({display:i,"padding-left":"0","padding-right":"0","margin-left":"0","margin-right":"0","border-left-width":"0","border-right-width":"0",width:"100px",overflow:"hidden"})}),o=null,u=[],n(f).each(function(){var t=n(this),r=t.offset().top-i(t.css("margin-top")),f=u.length>0?u[u.length-1]:null;null==f?u.push(t):Math.floor(Math.abs(o-r))<=1?u[u.length-1]=f.add(t):u.push(t);o=r}),s=u,f.each(function(){var t=n(this);t.data("equalizer-style-cache")?(t.attr("style",t.data("equalizer-style-cache")),t.removeData("equalizer-style-cache")):t.removeAttr("style")})),n.each(s,function(t,u){var f=n(u),o=0;if(r.target)o=e(r.target,r);else{if(r.byRow&&f.length<=1)return void f.css(r.property,"");f.each(function(){var t=n(this),s=t.attr("style"),i=t.css("display"),u,f;"inline-block"!==i&&"flex"!==i&&"inline-flex"!==i&&(i="block");u={display:i};u[r.property]="";t.css(u);f=e(t,r);f>o&&(o=f);s?t.attr("style",s):t.css("display","")})}f.each(function(){var t=n(this),u=0;r.target&&t.is(r.target)||("border-box"!==t.css("box-sizing")&&(-1!==r.property.indexOf("height")?(u+=i(t.css("border-top-width"))+i(t.css("border-bottom-width")),u+=i(t.css("padding-top"))+i(t.css("padding-bottom"))):(u+=i(t.css("border-left-width"))+i(t.css("border-right-width")),u+=i(t.css("padding-left"))+i(t.css("padding-right")))),t.css(r.property,o-u+"px"))})}),!0)})}function e(n,t){var i=[];return-1!==t.measurementFunction.indexOf("outer")&&i.push(t.includeMargin),n[t.measurementFunction].apply(n,i)}function i(n){return parseFloat(n)||0}function o(){n(window).width()!==r.windowWidth&&(clearTimeout(r.windowDelay),r.windowDelay=window.setTimeout(function(){u()},r.windowTimeout))}function s(){u()}var r={isAlreadyDestroyed:!1,windowDelay:null,windowWidth:0,windowTimeout:50},h={target:null,byRow:!0,property:"height",measurementFunction:"outerHeight",includeMargin:!1},c={target:null,byRow:!1,property:"width",measurementFunction:"outerWidth",includeMargin:!1},f=n.extend({},{blocks:[]},t);return{init:function(){n(window).on("resize.theme.equalizer",o);n(window).on("orientationchange.theme.equalizer",s);u()},destroy:function(){n(window).off("resize.theme.equalizer",o);n(window).off("orientationchange.theme.equalizer",s);n.each(f.blocks,function(t,i){var r=n(i.selector);n.each(r,function(t,r){n(r).css(i.property,"")})});r.isAlreadyDestroyed=!0}}};i.filters=function(t){function r(){n(i.overlayElementSelector).trigger("click.theme.overlay")}var i=n.extend({},{overlayElementSelector:".overlayOffCanvas",ajaxFiltersElement:".nopAjaxFilters7Spikes",closePanelAfterFiltrationDataAttribute:"closefilterspanelafterfiltrationinmobile"},t);return{init:function(){"true"===n(i.ajaxFiltersElement).attr("data-"+i.closePanelAfterFiltrationDataAttribute)&&n(document).on("nopAjaxFiltersFiltrationCompleteEvent.theme.filters",r)},destroy:function(){n(document).off("nopAjaxFiltersFiltrationCompleteEvent.theme.filters",r)}}};i.flyoutCart=function(t){function u(){e()}function f(t){var u,r,f;t.preventDefault();u=n(this).closest(".item");r=parseInt(u.attr("data-shoppingCartId"));isNaN(r)||0===r||(f={shoppingCartId:r},n.ajax({cache:!1,type:"POST",url:i.removeItemFromCartUrl,data:f,dataType:"json"}).done(function(n){n.success&&e(r)}))}function e(t){n.ajax({cache:!1,type:"GET",url:i.flyoutCartUrl}).done(function(i){var u=n(r.flyoutCartSelector).children();n(i).filter(r.flyoutCartSelector).children().each(function(t,i){var r=n(i);n(u[t]).replaceWith(r)});t&&n(document).trigger("removeItemFlyoutCart",[t]);n(document).trigger("initializePerfectScrollbar.theme",[n(r.flyoutCartScrollbarSelector)])})}var i={flyoutCartUrl:"",removeItemFromCartUrl:"",ajaxCartSuccessProcessFunction:function(){}},r=n.extend({},{flyoutCartSelector:"#flyout-cart",flyoutCartScrollbarSelector:"#flyout-cart .items",removeItemSelector:"#flyout-cart .remove-item"},t);return{init:function(){i.flyoutCartUrl=n(r.flyoutCartSelector).attr("data-flyoutCartUrl");i.removeItemFromCartUrl=n(r.flyoutCartSelector).attr("data-removeItemFromCartUrl");n(document).on("click.theme.flyoutCartRemoveItem",r.removeItemSelector,f);n(document).on("nopAjaxCartProductAddedToCartEvent nopcommerceAjaxCartProductAddedToCartEvent",u);"object"==typeof nopAjaxCart&&(window.nopAjaxCart.shouldRefreshFlyoutCart=!1);"object"==typeof AjaxCart&&(i.ajaxCartSuccessProcessFunction=window.AjaxCart.success_process,window.AjaxCart.success_process=function(t){i.ajaxCartSuccessProcessFunction(t);t.success&&n(document).trigger("nopcommerceAjaxCartProductAddedToCartEvent")})},destroy:function(){n(document).off("click.theme.flyoutCartRemoveItem",r.removeItemSelector,f);n(document).off("nopAjaxCartProductAddedToCartEvent nopcommerceAjaxCartProductAddedToCartEvent",u);"object"==typeof nopAjaxCart&&(window.nopAjaxCart.shouldRefreshFlyoutCart=!0);"object"==typeof AjaxCart&&(window.AjaxCart.success_process=i.ajaxCartSuccessProcessFunction)}}};i.goToTop=function(t){function r(){n("html, body").animate({scrollTop:0},i.scrollSpeed)}function u(){n(window).scrollTop()>i.scrollBarrier?n(i.scrollElementSelector)[i.animation.in](i.animation.speed):n(i.scrollElementSelector)[i.animation.out](i.animation.speed)}var i=n.extend({},{scrollElementSelector:"#goToTop",scrollBarrier:100,scrollSpeed:400,animation:{type:"none",speed:0}},t);return n.extend(i.animation,function(n){var t={};switch(n.type){case"fade":t.in="fadeIn";t.out="fadeOut";break;case"slide":t.in="slideDown";t.out="slideUp";break;default:t.in="show";t.out="hide";t.speed=0}return t}(i.animation)),{init:function(){n(i.scrollElementSelector).on("click.theme.goToTop",r);n(window).on("scroll.theme.goToTop",u)},destroy:function(){n(i.scrollElementSelector).off("click.theme.goToTop",r);n(window).off("scroll.theme.goToTop",u)}}};i.header=function(t){function u(){r()}function r(t){n.each(i.modules,function(r,u){n(u.content).hasClass(i.activeClass)&&n(u.content).not(t).length>0&&(u.hasCloser?n(u.closer).triggerHandler("click.theme.header.moduleClosers-"+u.id):u.hasOpener&&n(u.opener).triggerHandler("click.theme.header.moduleOpeners-"+u.id))})}var f={animation:{type:"none"}},i=n.extend({},{modules:[],activeClass:"active"},t);return{init:function(){n.each(i.modules,function(t,u){var o,e,s;o=t;e=u;s=n.extend({},e);n.extend(e,f,s);n.extend(e.animation,function(n){var t={};switch(n.type){case"fade":t.in="fadeIn";t.out="fadeOut";t.toggleParameter=n.toggleParameter||"slow";break;case"slide":t.in="slideDown";t.out="slideUp";t.toggleParameter=n.toggleParameter||"slow";break;default:t.in="addClass";t.out="removeClass";t.toggleParameter=n.toggleParameter||"opened"}return t}(e.animation));e.id=o;e.hasOpener=e.hasOwnProperty("opener")&&n(e.opener).length>0;e.hasCloser=e.hasOwnProperty("closer")&&n(e.closer).length>0;e.hasContent=e.hasOwnProperty("content")&&n(e.content).length>0;e.hasElementToAttach=e.hasOwnProperty("elementToAttach")&&n(e.elementToAttach).length>0;e.hasPreventClicking=e.hasOwnProperty("preventClicking")&&e.preventClicking;e.hasOverlay=e.hasOwnProperty("overlay")&&e.overlay;e.hasInitialStyle=e.hasOwnProperty("initialStyle");e.hasDisablePageScroll=e.hasOwnProperty("disablePageScroll")&&e.disablePageScroll;e.hasScrollbar=!1;e.scrollbarElement=!1;e.hasOwnProperty("scrollbar")&&("boolean"==typeof e.scrollbar&&e.scrollbar&&e.hasContent?(e.hasScrollbar=!0,e.scrollbarElement=e.content):"string"==typeof e.scrollbar&&n(e.scrollbar).length>0&&(e.hasScrollbar=!0,e.scrollbarElement=e.scrollbar));u.hasOpener&&u.hasContent?(u.hasElementToAttach&&n(document).trigger("detachElement.theme",[u.content,u.elementToAttach]),n(u.opener).on("click.theme.header.moduleOpeners-"+u.id,function(t){var f,e,o,s;u.hasPreventClicking&&t.preventDefault();r(n(u.content));n(u.content).toggleClass(i.activeClass);e=[];o=!1;s=!1;(f=u).hasOverlay&&f.hasContent&&(o=n(f.content).hasClass(i.activeClass),f.hasDisablePageScroll&&f.hasContent&&o&&(s=n(f.content).hasClass(i.activeClass)));e.push(o,s);"none"!==f.animation.type&&e.push(f.animation.toggleParameter);n(document).trigger("toggleOverlay.theme",e);n(u.content).hasClass(i.activeClass)?n(u.content)[u.animation.in](u.animation.toggleParameter):n(u.content)[u.animation.out](u.animation.toggleParameter)}),u.hasCloser&&n(u.closer).on("click.theme.header.moduleClosers-"+u.id,function(){n(u.opener).triggerHandler("click.theme.header.moduleOpeners-"+u.id);n(this).trigger("headerModuleClosed.theme")})):!u.hasOpener&&u.hasContent&&u.hasElementToAttach&&n(document).trigger("detachElement.theme",[u.content,u.elementToAttach]);u.hasInitialStyle&&u.hasContent&&(n(u.content).data("header-style-cache",n(u.content).attr("style")),n(u.content).css(u.initialStyle));u.hasScrollbar&&n(document).trigger("initializePerfectScrollbar.theme",[n(u.scrollbarElement)])});n(document).on("removeOverlay.theme",u)},destroy:function(){r();n.each(i.modules,function(t,i){i.hasInitialStyle&&i.hasContent&&(n(i.content).attr("style",n(i.content).data("header-style-cache")||""),n(i.content).removeData("header-style-cache"));i.hasOpener&&i.hasContent&&(n(i.opener).off("click.theme.header.moduleOpeners-"+i.id),i.hasCloser&&n(i.closer).off("click.theme.header.moduleClosers-"+i.id))});n(document).off("removeOverlay.theme",u)}}};i.lazyLoadProductBoxImages=function(t){function i(){var t=n(window).scrollTop()+n(window).outerHeight()+r.scrollBarrier;n(r.selector).not("[loadedimage]").each(function(){var i=n(this);i.offset().top<t&&(i.attr("src",i.attr("data-lazyloadsrc")),i.attr("loadedimage","true"))})}var r=n.extend({},{selector:".item-box .picture a img[data-lazyloadsrc]",scrollBarrier:100},t);return{init:function(){i();n(window).on("scroll.theme.lazyLoadProductBoxImages",i);n(document).on("nopAjaxFiltersFiltrationCompleteEvent nopAjaxCartProductAddedToCartEvent nopQuickViewDataShownEvent newProductsAddedToPageEvent",i)},destroy:function(){n(window).off("scroll.theme.lazyLoadProductBoxImages",i);n(document).off("nopAjaxFiltersFiltrationCompleteEvent nopAjaxCartProductAddedToCartEvent nopQuickViewDataShownEvent newProductsAddedToPageEvent",i)}}};i.menu=function(t){function f(){var t=n(this).siblings(i.sublistWrapSelector);t.addClass(i.activeClass);n(document).trigger("initializePerfectScrollbar.theme",[t])}function e(){n(this).closest(i.sublistWrapSelector).removeClass(i.activeClass)}function o(){var t=u();n(t+" "+i.sublistWrapSelector+"."+i.activeClass).removeClass(i.activeClass)}function s(){var t=u();return n(t+" > li").get().reverse()}function u(){var t=i.sublistIndent.ulSelectorHeaderMenu;return n(i.sublistIndent.ulSelectorMegaMenu).length>0&&(t=i.sublistIndent.ulSelectorMegaMenu),t}var r={sublistIndentSelectors:[]},i=n.extend(!0,{},{activeClass:"active",sublistWrapSelector:".sublist-wrap",plusButtonSelector:".plus-button",backButtonSelector:".back-button",closeMenuSelector:".close-menu > span",reverseTopLevelMenuItemsZIndex:!1,sublistIndent:{enabled:!1,ulSelectorMegaMenu:".mega-menu-responsive",ulSelectorHeaderMenu:".header-menu > ul",withSubcategoriesSelector:".with-subcategories",topLevelMenuWidth:320,sublistIndent:7,initialZIndex:1}},t);return{init:function(){var t;n(i.plusButtonSelector).on("click.theme.menu.plusButton",f);n(i.backButtonSelector).on("click.theme.menu.backButton",e);n(i.closeMenuSelector).on("headerModuleClosed.theme",o);i.reverseTopLevelMenuItemsZIndex&&(t=s(),n(t).css("z-index",function(n){return n+1}));i.sublistIndent.enabled&&function t(u,f,e,o){n(u).each(function(){n(this).attr("style")&&n(this).data("menu-style-cache",n(this).attr("style"));n(this).css({width:e-i.sublistIndent.sublistIndent,"z-index":n(this).css("z-index")+o})});r.sublistIndentSelectors.push(u);var s=u+" > .sublist > li > "+i.sublistWrapSelector;n(s).length>0&&t(s,f,e-i.sublistIndent.sublistIndent,o+1)}(u()+" > li > "+i.sublistWrapSelector,i.sublistIndent.withSubcategoriesSelector,i.sublistIndent.topLevelMenuWidth,i.sublistIndent.initialZIndex)},destroy:function(){var t;n(i.plusButtonSelector).off("click.theme.menu.plusButton",f);n(i.backButtonSelector).off("click.theme.menu.backButton",e);n(i.closeMenuSelector).off("headerModuleClosed.theme",o);i.reverseTopLevelMenuItemsZIndex&&(t=s(),n(t).css("z-index",""));i.sublistIndent.enabled&&function(){for(;r.sublistIndentSelectors.length;){var t=r.sublistIndentSelectors.pop();n(t).each(function(){n(this).data("menu-style-cache")?(n(this).attr("style",n(this).data("menu-style-cache")),n(this).removeData("menu-style-cache")):n(this).removeAttr("style")})}}()}}};i.overlay=function(t){function r(t,r,u,f){var e=f||400;r?n(i.overlayElementSelector).addClass(i.overlayClass).fadeIn(e):n(i.overlayElementSelector).removeClass(i.overlayClass).fadeOut(e);n("html, body").toggleClass(i.noPageScrollClass,u)}function u(){n(this).removeClass(i.overlayClass).fadeOut();n(document).trigger("removeOverlay.theme")}var i=n.extend({},{overlayElementSelector:".overlayOffCanvas",overlayClass:"active",noPageScrollClass:"noYScroll"},t);return{init:function(){n(document).on("toggleOverlay.theme",r);n(i.overlayElementSelector).on("click.theme.overlay",u)},destroy:function(){n(i.overlayElementSelector).removeClass(i.overlayClass).fadeOut();n("html, body").removeClass(i.noPageScrollClass);n(document).off("toggleOverlay.theme",r);n(i.overlayElementSelector).off("click.theme.overlay",u)}}};i.perfectScrollbar=function(){function i(n,i){i&&i.length&&!i.data("perfect-scrollbar")&&(i.perfectScrollbar({swipePropagation:!1,wheelSpeed:1,suppressScrollX:!0}),t.scrollbarElements.push(i))}function r(n,t){t&&t.length&&t.data("perfect-scrollbar")&&t.perfectScrollbar("update")}var t={scrollbarElements:[]};return{init:function(){n(document).on("initializePerfectScrollbar.theme",i);n(document).on("updatePerfectScrollbar.theme",r)},destroy:function(){for(n(document).off("initializePerfectScrollbar.theme",i),n(document).off("updatePerfectScrollbar.theme",r);t.scrollbarElements.length;)t.scrollbarElements.pop().perfectScrollbar("destroy")}}};i.productPageThumbs=function(t){function u(){var u=n(i.thumbItemSelector).filter(function(){return!n(this).parent().hasClass("slick-cloned")}),f=u.filter("."+i.thumbActiveClass),t=f.prev(i.thumbItemSelector);r.isInCarousel&&(t=f.parent(i.thumbItemInCarouselSelector).prev(i.thumbItemInCarouselSelector+":not(.slick-cloned)").find(i.thumbItemSelector));0===t.length&&(t=u.last());t.length>0&&(o(),u.removeClass(i.thumbActiveClass),t.addClass(i.thumbActiveClass),t.click());r.isInCarousel&&e("Prev")}function f(){var u=n(i.thumbItemSelector).filter(function(){return!n(this).parent().hasClass("slick-cloned")}),f=u.filter("."+i.thumbActiveClass),t=f.next(i.thumbItemSelector);r.isInCarousel&&(t=f.parent(i.thumbItemInCarouselSelector).next(i.thumbItemInCarouselSelector+":not(.slick-cloned)").find(i.thumbItemSelector));0===t.length&&(t=u.first());t.length>0&&(o(),u.removeClass(i.thumbActiveClass),t.addClass(i.thumbActiveClass),t.click());r.isInCarousel&&e("Next")}function e(t){n(i.thumbGalleryInCarouselSelector).slick("slickSetOption","waitForAnimate",!1,!1);n(i.thumbGalleryInCarouselSelector).slick("slick"+t);n(i.thumbGalleryInCarouselSelector).slick("slickSetOption","waitForAnimate",!0,!1)}function o(){var t=n("#cloudZoomImage").data("CloudZoom");t&&t.closeZoom()}var r={isInCarousel:""},i=n.extend({},{thumbGallerySelector:".gallery",thumbGalleryInCarouselSelector:".picture-thumbs-list",thumbItemSelector:".cloudzoom-gallery",thumbItemInCarouselSelector:".picture-thumbs-item",thumbActiveClass:"active",prevArrowSelector:".picture-thumbs-prev-arrow",nextArrowSelector:".picture-thumbs-next-arrow"},t);return{init:function(){r.isInCarousel=n(i.thumbGalleryInCarouselSelector).length;n(i.thumbGallerySelector).each(function(){n(this).find(i.thumbItemSelector).filter(function(){return!n(this).parent().hasClass("slick-cloned")}).first().addClass(i.thumbActiveClass)});n(i.thumbGallerySelector+" "+i.prevArrowSelector).on("click.thumbs.theme",u);n(i.thumbGallerySelector+" "+i.nextArrowSelector).on("click.thumbs.theme",f)},destroy:function(){n(i.thumbGallerySelector).each(function(){n(this).find(i.thumbItemSelector).filter(function(){return!n(this).parent().hasClass("slick-cloned")}).removeClass(i.thumbActiveClass)});n(i.thumbGallerySelector+" "+i.prevArrowSelector).off("click.thumbs.theme",u);n(i.thumbGallerySelector+" "+i.nextArrowSelector).off("click.thumbs.theme",f)}}};i.productQuantity=function(t){function r(t){t.preventDefault();t.stopPropagation();var r=n(t.currentTarget).siblings(i.quantityInputSelector),u=parseInt(r.val());if(isNaN(u))return r.val(1),r.trigger("input"),void r.trigger("change");u++;r.val(u);r.trigger("input");r.trigger("change")}function u(t){t.preventDefault();t.stopPropagation();var r=n(t.currentTarget).siblings(i.quantityInputSelector),u=parseInt(r.val());if(isNaN(u))return r.val(1),r.trigger("input"),void r.trigger("change");u<=1||(u--,r.val(u),r.trigger("input"),r.trigger("change"))}var i=n.extend({},{quantityInputSelector:".qty-input",incrementSelectors:".increase",decrementSelectors:".decrease"},t);return{init:function(){n(document).on("click.theme.incrementQuantityValue",i.incrementSelectors,r);n(document).on("click.theme.decrementQuantityValue",i.decrementSelectors,u)},destroy:function(){n(document).off("click.theme.incrementQuantityValue",i.incrementSelectors,r);n(document).off("click.theme.decrementQuantityValue",i.decrementSelectors,u)}}};i.stickyNavigation=function(t){function r(){var t=n(i.stickyElement),r=n(i.stickyElementParent),u=n(window).scrollTop();u>0&&u>=r.offset().top?(t.addClass("stick"),r.css("height",t.height()+"px"),n(document).trigger("navigationHasSticked",[!0])):(t.removeClass("stick"),r.css("height",""),n(document).trigger("navigationHasSticked",[!1]))}function u(){r();i.showStickyOnFirstReverseScroll&&function(){var t=n(i.stickyElement),u=n(i.stickyElementParent),r;0!==t.length&&0!==u.length?(r=n(window).scrollTop(),r<=n(u).offset().top?t.removeClass("nav-up"):(r>i.lastScrollTop?t.addClass("nav-up"):t.removeClass("nav-up"),i.lastScrollTop=r)):t.removeClass("nav-up")}()}var i=n.extend({},{stickyElement:".desktop-nav-wrapper",stickyElementParent:".master-header-wrapper",showStickyOnFirstReverseScroll:!1,lastScrollTop:0},t);return{init:function(){r();n(window).on("scroll.theme.stickyNav",u)},destroy:function(){n(window).off("scroll.theme.stickyNav",u)}}};i.toggle=function(t){var r={traversingFunction:"siblings",activeClassOpener:"open",activeClassContent:"active",beforeToggle:null,afterToggle:null,animation:{type:"none",speed:0}},i=n.extend({},{blocks:[]},t);return{init:function(){n.each(i.blocks,function(t,i){var u=n.extend({},i);n.extend(i,r,u);n.extend(i.animation,function(n){var t={};switch(n.type){case"fade":t.toggleFunction="fadeToggle";break;case"slide":t.toggleFunction="slideToggle";break;case"toggle":t.toggleFunction="toggle";t.speed=0;break;default:t.toggleFunction="toggleClass"}return t}(i.animation));n(i.content).attr("style")&&n(i.content).data("toggle-style-cache",n(i.content).attr("style"));n(document).on("click.theme.toggle.toggleOpeners-"+t,i.opener,function(){i.beforeToggle&&i.beforeToggle(n(this),i);n(this).toggleClass(i.activeClassOpener);"none"!==i.animation.type?n(this)[i.traversingFunction](i.content)[i.animation.toggleFunction](i.animation.speed).toggleClass(i.activeClassContent):n(this)[i.traversingFunction](i.content)[i.animation.toggleFunction](i.activeClassContent);i.afterToggle&&i.afterToggle(n(this),i)})})},destroy:function(){n.each(i.blocks,function(t,i){n(i.content).data("toggle-style-cache")?(n(i.content).attr("style",n(i.content).data("toggle-style-cache")),n(i.content).removeData("toggle-style-cache")):n(i.content).removeAttr("style");n(i.opener).hasClass(i.activeClassOpener)&&n(i.opener).removeClass(i.activeClassOpener);n(i.content).hasClass(i.activeClassContent)&&n(i.content).removeClass(i.activeClassContent);n(document).off("click.theme.toggle.toggleOpeners-"+t,i.opener)})}}}}(jQuery,sevenSpikesCore,window.sevenSpikesThemeModules=window.sevenSpikesThemeModules||{}),function(n,t){"use strict";var i=function(){return function(t,i,r){var u=this;u.mobileFirst=r||!1;u.activeModules=[];u.activeBreakpoint=null;u.breakpoints=[];u.breakpointSettings=[];u.windowDelay=null;u.windowWidth=0;u.settings=n.extend({},u.settings,t);u.originalSettings=n.extend({},u.settings);u.dependencies=n.extend({},u.dependencies,i)}}();i.prototype.init=function(){this.registerBreakpoints();this.initializeEvents();this.initializeModules();this.checkResponsive(!0)};i.prototype.registerBreakpoints=function(){var u,f,i,t=this,r=t.settings.responsive||[];if("array"===n.type(r)&&r.length){for(u in r)if(r.hasOwnProperty(u)){for(i=t.breakpoints.length-1,f=r[u].breakpoint;i>=0;)t.breakpoints[i]&&t.breakpoints[i]===f&&t.breakpoints.splice(i,1),i--;t.breakpoints.push(f);t.breakpointSettings[f]=r[u].settings}t.breakpoints.sort(function(n,t){return t-n})}};i.prototype.initializeEvents=function(){n(window).on("orientationchange.theme",n.proxy(this.orientationChangeHandler,this));n(window).on("resize.theme",n.proxy(this.resizeHandler,this))};i.prototype.checkResponsive=function(t,i){var f,u,r=this,e=!1,o=window.innerWidth||n(window).width();if(r.settings.responsive&&r.settings.responsive.length&&null!==r.settings.responsive){for(f in u=null,r.breakpoints)r.breakpoints.hasOwnProperty(f)&&(!1===r.mobileFirst?o<r.breakpoints[f]&&(u=r.breakpoints[f]):o>r.breakpoints[f]&&(u=r.breakpoints[f]));null!==u?null!==r.activeBreakpoint?(u!==r.activeBreakpoint||i)&&(r.activeBreakpoint=u,r.settings=n.extend({},r.originalSettings,r.breakpointSettings[u]),r.refresh(t),e=u):(r.activeBreakpoint=u,r.settings=n.extend({},r.originalSettings,r.breakpointSettings[u]),r.refresh(t),e=u):null!==r.activeBreakpoint&&(r.activeBreakpoint=null,r.settings=n.extend({},r.originalSettings),r.refresh(t),e=null);t||!1===e||n(document).trigger("themeBreakpoint",[r.settings,e])}};i.prototype.destroyModules=function(){for(var t,n=0;n<this.activeModules.length;n++)t=this.activeModules[n].instance,"function"==typeof t.destroy&&t.destroy();this.activeModules=[]};i.prototype.initializeModules=function(){var n=this,t,e,r;for(t in n.dependencies)if(n.dependencies.hasOwnProperty(t)){for(var u=n.dependencies[t],o=u.module,f=u.dependencies,i=0;i<f.length;i++)e=f[i],n.initializeModule(e);n.initializeModule(o)}for(r in n.settings)n.settings.hasOwnProperty(r)&&n.initializeModule(r)};i.prototype.initializeModule=function(n){var i=this,u,r;i.isModuleAlreadyInitialized(n)||"string"==typeof i.settings[n]&&"disabled"===i.settings[n]||(u=t[n],"function"==typeof u&&(r=u(i.settings[n]),"function"==typeof r.init&&(r.init(),i.activeModules.push({name:n,instance:r}))))};i.prototype.isModuleAlreadyInitialized=function(n){for(var t=0;t<this.activeModules.length;t++)if(this.activeModules[t].name===n)return!0;return!1};i.prototype.refresh=function(){this.destroyModules();this.initializeModules()};i.prototype.orientationChangeHandler=function(){this.checkResponsive()};i.prototype.resizeHandler=function(){var t=this;n(window).width()!==t.windowWidth&&(clearTimeout(t.windowDelay),t.windowDelay=window.setTimeout(function(){t.windowWidth=n(window).width();t.checkResponsive()},50))};window.sevenSpikesTheme=i}(jQuery,sevenSpikesThemeModules);cookieHelper=function(){var n={};return n.setCookie=function(n,t,i,r){if(void 0!=t&&""!=t){var u=r?"; domain="+r:"";document.cookie=n+"="+encodeURIComponent(t)+"; max-age="+86400*i+"; path=/"+u}},n.getCookie=function(n){for(var r,u,i=document.cookie.split(";"),t=0;t<i.length;t++)if(r=i[t].substr(0,i[t].indexOf("=")),u=i[t].substr(i[t].indexOf("=")+1),r=r.replace(/^\s+|\s+$/g,""),r==n)return unescape(u);return""},n.deleteCookie=function(n,t){var i=t?"; domain="+t:"";document.cookie=n+"=; max-age=0; path=/"+i},n}(jQuery),function(n,t){function r(){var t=n(".sublist-toggle-button");t.each(function(){n(this).siblings(".sublist").css("display")!=="none"&&n(this).addClass("open")})}function u(){n(".order-summary-content .clear-cart-button").on("click",function(t){t.preventDefault();n('.cart [name="removefromcart"]').attr("checked","checked");n(".order-summary-content .update-cart-button").click()})}function f(){n(".address-section-collapse .field-validation-error").length>0&&(n(".address-section-collapse").slideDown("slow",function(){n("html, body").animate({scrollTop:n(".address-section-collapse").offset().top},0)}),n(".checkout-page .enter-new-address").addClass("open"));n(".checkout-page .enter-new-address").click(function(){n(".address-section-collapse").slideToggle("slow");n(".checkout-page .enter-new-address").toggleClass("open")})}function e(){n(".new-comment .field-validation-error").length>0&&(n(".new-comment form").slideDown("slow",function(){n("html, body").animate({scrollTop:n(".new-comment").offset().top},0)}),n(".new-comment title").addClass("open"))}function i(){n(".write-review .field-validation-error").length>0&&(n(".write-review-collapse").slideDown("slow",function(){n("html, body").animate({scrollTop:n(".write-review-collapse").offset().top},0)}),n(".write-review title").addClass("open"))}function o(){var i=n(".product-viewmode .grid").not(".hidden"),r=n(".product-viewmode .list").not(".hidden"),u=n(".product-viewmode .grid.hidden"),f;if(!(i.length<2)){u.hasClass("selected")||i.hasClass("selected")?(f=t.getCookie("venture_catalog_grid_viewmode_items")||3,i.removeClass("selected").filter(".items-"+f).addClass("selected")):r.hasClass("selected")||i.first().addClass("selected");i.on("click.venture",function(){if(n(this).hasClass("selected"))return!1;i.hasClass("selected")||u[0].click();var r=parseInt(n(this).attr("data-items"));t.setCookie("venture_catalog_grid_viewmode_items",r);n(".center-2").removeClass("items-3 items-4").addClass("items-"+r);i.removeClass("selected").filter(".items-"+r).addClass("selected")});r.on("click.venture",function(){i.removeClass("selected")})}}function s(){function i(t,i){var r=i.text();t.html(n("<span/>").html(r))}function r(t){var r=t?n(".currentMaxPrice"):n(".currentMinPrice"),u=t?n(".currentMinPrice"):n(".currentMaxPrice");i(n(".ui-slider-handle").eq(0),r);i(n(".ui-slider-handle").eq(1),u);r.hide();u.hide()}if(n("#slider").length>0){var t=n(".nopAjaxFilters7Spikes").attr("data-isRTL")==="true",u;if(n(".ui-slider-handle").length===2){r(t);n(document).on("nopAjaxFiltersFiltrationCompleteEvent",function(){r(t)});n("#slider").on("slide",function(r,f){clearTimeout(u);u=window.setTimeout(function(){var r=t?n(".currentMaxPrice"):n(".currentMinPrice"),u=t?n(".currentMinPrice"):n(".currentMaxPrice"),e=n("#slider").find(f.handle).index()===1?r:u;i(n(f.handle),e)},10)})}}}function h(){function o(){r=new YT.Player("video-iframe",{events:{onStateChange:function(n){n.data===0&&(u=!1,r.destroy())}}})}function s(){r=new Vimeo.Player("video-iframe");r.setVolume(0);r.on("ended",function(){u=!1;f.remove()})}var t=n("#video-player");if(t.length!==0){var i=t.attr("data-platform-url"),h=t.attr("data-id"),u=!1,r,f,e;i.indexOf("youtube")!==-1?e={autoplay:1,controls:0,rel:0,showinfo:0,iv_load_policy:3,mute:1,enablejsapi:1}:i.indexOf("vimeo")!==-1&&(e={autoplay:1,byline:0,portrait:0,title:0,background:1});t.on("click",function(){u||(u=!0,f=n("<iframe>",{src:i+h+"?"+n.param(e),id:"video-iframe",frameborder:0,allowfullscreen:1}),f.appendTo(t).show("slow"),i.indexOf("youtube")!==-1?o():i.indexOf("vimeo")!==-1&&s())})}}n(document).ready(function(){var c={lazyLoadProductBoxImages:{selector:".item-box .picture a img[data-lazyloadsrc]"},goToTop:{scrollElementSelector:"#goToTop"},overlay:{overlayElementSelector:".overlayOffCanvas",overlayClass:"show",noPageScrollClass:"scrollYRemove"},productQuantity:{quantityInputSelector:".qty-input, .productQuantityTextBox",incrementSelectors:".plus",decrementSelectors:".minus"},toggle:{blocks:[{opener:".search-opener",content:".store-search-box form",activeClassOpener:"open",activeClassContent:"open",animation:{type:"none"},afterToggle:function(){n(".header-lower").toggleClass("search-overlay-open")}},{opener:".footer-map-holder .title",content:".footer-map-wrapper",activeClassOpener:"open",animation:{type:"slide",speed:"slow"},afterToggle:function(){window.google.maps.event.trigger(window.footerMap,"resize")}},{opener:".sublist-toggle-button",content:".sublist",activeClassOpener:"open",animation:{type:"slide",speed:"slow"}},{opener:".new-comment .title",content:".new-comment form",activeClassOpener:"open",animation:{type:"slide",speed:"slow"}},{opener:".write-review .title",content:".write-review-collapse",activeClassOpener:"open",animation:{type:"slide",speed:"slow"}}]},flyoutCart:{flyoutCartSelector:"#flyout-cart",removeItemSelector:".mini-shopping-cart-item-close"},equalizer:{blocks:[{selector:".checkout-page .address-item"},{selector:".rich-blog-homepage .blog-post"}]},responsive:[{breakpoint:1201,settings:{menu:{sublistIndent:{enabled:!0,topLevelMenuWidth:360}},header:{activeClass:"open",modules:[{content:".header-selectors-wrapper",elementToAttach:".mobile-menu-items"},{content:"#CartQuantityBox",elementToAttach:".responsive-nav-wrapper .shopping-cart-link a"},{opener:".search-wrap > span",content:".store-search-box",elementToAttach:".master-wrapper-page",overlay:!0},{opener:".responsive-nav-wrapper .menu-title > span",closer:".close-menu > span",content:".header-menu",overlay:!0,scrollbar:!0},{elementToAttach:".master-wrapper-page",opener:".filters-button-wrapper .filters-button",closer:".nopAjaxFilters7Spikes .close-btn",content:".nopAjaxFilters7Spikes",overlay:!0,scrollbar:!0}]},toggle:{blocks:[{opener:".block .title",content:".listbox",activeClassOpener:"open",animation:{type:"slide",speed:"slow"}},{opener:".mobile-selector .selector-title",content:".mobile-collapse",activeClassOpener:"open",animation:{type:"slide",speed:"slow"}},{opener:".footer-map-holder .title",content:".footer-map-wrapper",activeClassOpener:"open",animation:{type:"slide",speed:"slow"},afterToggle:function(){window.google.maps.event.trigger(window.footerMap,"resize")}},{opener:".new-comment .title",content:".new-comment form",activeClassOpener:"open",animation:{type:"slide",speed:"slow"}},{opener:".write-review .title",content:".write-review-collapse",activeClassOpener:"open",animation:{type:"slide",speed:"slow"}}]},equalizer:{blocks:[{selector:".cart tr"},{selector:".checkout-page .address-item"}]}}},{breakpoint:769,settings:{menu:{sublistIndent:{enabled:!0,topLevelMenuWidth:360}},header:{activeClass:"open",modules:[{content:".header-selectors-wrapper",elementToAttach:".mobile-menu-items"},{content:"#CartQuantityBox",elementToAttach:".responsive-nav-wrapper .shopping-cart-link a"},{opener:".search-wrap > span",content:".store-search-box",elementToAttach:".master-wrapper-page",overlay:!0},{opener:".responsive-nav-wrapper .menu-title > span",closer:".close-menu > span",content:".header-menu",overlay:!0,scrollbar:!0},{elementToAttach:".master-wrapper-page",opener:".filters-button-wrapper .filters-button",closer:".nopAjaxFilters7Spikes .close-btn",content:".nopAjaxFilters7Spikes",overlay:!0,scrollbar:!0}]},toggle:{blocks:[{opener:".block .title",content:".listbox",activeClassOpener:"open",animation:{type:"slide",speed:"slow"}},{opener:".mobile-selector .selector-title",content:".mobile-collapse",activeClassOpener:"open",animation:{type:"slide",speed:"slow"}},{opener:".footer-block .title",content:".footer-collapse",activeClassOpener:"open",animation:{type:"slide",speed:"slow"}},{opener:".footer-map-holder .title",content:".footer-map-wrapper",activeClassOpener:"open",animation:{type:"slide",speed:"slow"},afterToggle:function(){window.google.maps.event.trigger(window.footerMap,"resize")}},{opener:".sub-category-toggle-select",content:".sub-categories-wrapper",activeClassOpener:"open",animation:{type:"slide",speed:"slow"}},{opener:".cart-collaterals .title",content:"",activeClassOpener:"open",animation:{type:"slide",speed:"slow"}},{opener:".new-comment .title",content:".new-comment form",activeClassOpener:"open",animation:{type:"slide",speed:"slow"}},{opener:".write-review .title",content:".write-review-collapse",activeClassOpener:"open",animation:{type:"slide",speed:"slow"}}]},equalizer:{blocks:[{selector:".checkout-page .address-item"}]}}},{breakpoint:481,settings:{menu:{sublistIndent:{enabled:!0,topLevelMenuWidth:320}},header:{activeClass:"open",modules:[{content:".header-selectors-wrapper",elementToAttach:".mobile-menu-items"},{content:"#CartQuantityBox",elementToAttach:".responsive-nav-wrapper .shopping-cart-link a"},{opener:".search-wrap > span",content:".store-search-box",elementToAttach:".master-wrapper-page",overlay:!0},{opener:".responsive-nav-wrapper .menu-title > span",closer:".close-menu > span",content:".header-menu",overlay:!0,scrollbar:!0},{elementToAttach:".master-wrapper-page",opener:".filters-button-wrapper .filters-button",closer:".nopAjaxFilters7Spikes .close-btn",content:".nopAjaxFilters7Spikes",overlay:!0,scrollbar:!0}]},toggle:{blocks:[{opener:".block .title",content:".listbox",activeClassOpener:"open",animation:{type:"slide",speed:"slow"}},{opener:".mobile-selector .selector-title",content:".mobile-collapse",activeClassOpener:"open",animation:{type:"slide",speed:"slow"}},{opener:".footer-block .title",content:".footer-collapse",activeClassOpener:"open",animation:{type:"slide",speed:"slow"}},{opener:".footer-map-holder .title",content:".footer-map-wrapper",activeClassOpener:"open",animation:{type:"slide",speed:"slow"},afterToggle:function(){window.google.maps.event.trigger(window.footerMap,"resize")}},{opener:".sub-category-toggle-select",content:".sub-categories-wrapper",activeClassOpener:"open",animation:{type:"slide",speed:"slow"}},{opener:".cart-collaterals .title",content:"",activeClassOpener:"open",animation:{type:"slide",speed:"slow"}},{opener:".new-comment .title",content:".new-comment form",activeClassOpener:"open",animation:{type:"slide",speed:"slow"}},{opener:".write-review .title",content:".write-review-collapse",activeClassOpener:"open",animation:{type:"slide",speed:"slow"}}]},equalizer:{blocks:[{selector:".checkout-page .address-item"}]}}}]},l=new window.sevenSpikesTheme(c,[{module:"header",dependencies:["attachDetach","overlay","perfectScrollbar"]},{module:"menu",dependencies:["perfectScrollbar"]}],!1),t;l.init();r();u();f();e();i();o();s();h();n(document).on("ventureMapLoaded",function(){n(".footer-map-holder .footer-map-wrapper").hide()});n(document).on("quickTabsRefreshedTab",function(){i()});n(window).load(function(){n(".page-loader").fadeOut("slow")});t=n(window).width();t>1201&&(n(".header-links-box-bottom").hide(),n(".header-right #flyout-cart #topcartlink").hide(),n(".mobile-menu-items .wish_headerlink").clone().appendTo(".c-cart-buttons"),n(".ico-cart").clone().appendTo(".c-cart-buttons"));t<1201&&(n(".distributorMenu").hide(),n(".distributor-ecatalouge-menu").clone().appendTo(".c-distributor"));n(".cross-sells").hide();n(".cross-sell-list").clone().appendTo("#where-to-use");jQuery(document).ready(function(){var n=jQuery(".header").offset();console.log(n.top);jQuery(window).bind("scroll",function(){jQuery(window).scrollTop()>n.top?jQuery(".header").addClass("fixed"):jQuery(".header").removeClass("fixed")})})})}(jQuery,cookieHelper);
  