PageSourceSearch

https://www.rvf.de/typo3temp/assets/compressed/merged-b865037e57c140af8d958bf4b562863c.js?1790762338

js rvf.de collected 2026-10-02 05:37:42 UTC 1,303,988 bytes, 12,692 lines download raw bytes

1
2/*! jQuery Validation Plugin - v1.15.0 - 2/24/2016
3 * http://jqueryvalidation.org/
4 * Copyright (c) 2016 Jörn Zaefferer; Licensed MIT */
5!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof module&&module.exports?module.exports=a(require("jquery")):a(jQuery)}(function(a){a.extend(a.fn,{validate:function(b){if(!this.length)return void(b&&b.debug&&window.console&&console.warn("Nothing selected, can't validate, returning nothing."));var c=a.data(this[0],"validator");return c?c:(this.attr("novalidate","novalidate"),c=new a.validator(b,this[0]),a.data(this[0],"validator",c),c.settings.onsubmit&&(this.on("click.validate",":submit",function(b){c.settings.submitHandler&&(c.submitButton=b.target),a(this).hasClass("cancel")&&(c.cancelSubmit=!0),void 0!==a(this).attr("formnovalidate")&&(c.cancelSubmit=!0)}),this.on("submit.validate",function(b){function d(){var d,e;return c.settings.submitHandler?(c.submitButton&&(d=a("<input type='hidden'/>").attr("name",c.submitButton.name).val(a(c.submitButton).val()).appendTo(c.currentForm)),e=c.settings.submitHandler.call(c,c.currentForm,b),c.submitButton&&d.remove(),void 0!==e?e:!1):!0}return c.settings.debug&&b.preventDefault(),c.cancelSubmit?(c.cancelSubmit=!1,d()):c.form()?c.pendingRequest?(c.formSubmitted=!0,!1):d():(c.focusInvalid(),!1)})),c)},valid:function(){var b,c,d;return a(this[0]).is("form")?b=this.validate().form():(d=[],b=!0,c=a(this[0].form).validate(),this.each(function(){b=c.element(this)&&b,b||(d=d.concat(c.errorList))}),c.errorList=d),b},rules:function(b,c){if(this.length){var d,e,f,g,h,i,j=this[0];if(b)switch(d=a.data(j.form,"validator").settings,e=d.rules,f=a.validator.staticRules(j),b){case"add":a.extend(f,a.validator.normalizeRule(c)),delete f.messages,e[j.name]=f,c.messages&&(d.messages[j.name]=a.extend(d.messages[j.name],c.messages));break;case"remove":return c?(i={},a.each(c.split(/\s/),function(b,c){i[c]=f[c],delete f[c],"required"===c&&a(j).removeAttr("aria-required")}),i):(delete e[j.name],f)}return g=a.validator.normalizeRules(a.extend({},a.validator.classRules(j),a.validator.attributeRules(j),a.validator.dataRules(j),a.validator.staticRules(j)),j),g.required&&(h=g.required,delete g.required,g=a.extend({required:h},g),a(j).attr("aria-required","true")),g.remote&&(h=g.remote,delete g.remote,g=a.extend(g,{remote:h})),g}}}),a.extend(a.expr[":"],{blank:function(b){return!a.trim(""+a(b).val())},filled:function(b){var c=a(b).val();return null!==c&&!!a.trim(""+c)},unchecked:function(b){return!a(b).prop("checked")}}),a.validator=function(b,c){this.settings=a.extend(!0,{},a.validator.defaults,b),this.currentForm=c,this.init()},a.validator.format=function(b,c){return 1===arguments.length?function(){var c=a.makeArray(arguments);return c.unshift(b),a.validator.format.apply(this,c)}:void 0===c?b:(arguments.length>2&&c.constructor!==Array&&(c=a.makeArray(arguments).slice(1)),c.constructor!==Array&&(c=[c]),a.each(c,function(a,c){b=b.replace(new RegExp("\\{"+a+"\\}","g"),function(){return c})}),b)},a.extend(a.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",pendingClass:"pending",validClass:"valid",errorElement:"label",focusCleanup:!1,focusInvalid:!0,errorContainer:a([]),errorLabelContainer:a([]),onsubmit:!0,ignore:":hidden",ignoreTitle:!1,onfocusin:function(a){this.lastActive=a,this.settings.focusCleanup&&(this.settings.unhighlight&&this.settings.unhighlight.call(this,a,this.settings.errorClass,this.settings.validClass),this.hideThese(this.errorsFor(a)))},onfocusout:function(a){this.checkable(a)||!(a.name in this.submitted)&&this.optional(a)||this.element(a)},onkeyup:function(b,c){var d=[16,17,18,20,35,36,37,38,39,40,45,144,225];9===c.which&&""===this.elementValue(b)||-1!==a.inArray(c.keyCode,d)||(b.name in this.submitted||b.name in this.invalid)&&this.element(b)},onclick:function(a){a.name in this.submitted?this.element(a):a.parentNode.name in this.submitted&&this.element(a.parentNode)},highlight:function(b,c,d){"radio"===b.type?this.findByName(b.name).addClass(c).removeClass(d):a(b).addClass(c).removeClass(d)},unhighlight:function(b,c,d){"radio"===b.type?this.findByName(b.name).removeClass(c).addClass(d):a(b).removeClass(c).addClass(d)}}
5,setDefaults:function(b){a.extend(a.validator.defaults,b)},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.",equalTo:"Please enter the same value again.",maxlength:a.validator.format("Please enter no more than {0} characters."),minlength:a.validator.format("Please enter at least {0} characters."),rangelength:a.validator.format("Please enter a value between {0} and {1} characters long."),range:a.validator.format("Please enter a value between {0} and {1}."),max:a.validator.format("Please enter a value less than or equal to {0}."),min:a.validator.format("Please enter a value greater than or equal to {0}."),step:a.validator.format("Please enter a multiple of {0}.")},autoCreateRanges:!1,prototype:{init:function(){function b(b){var c=a.data(this.form,"validator"),d="on"+b.type.replace(/^validate/,""),e=c.settings;e[d]&&!a(this).is(e.ignore)&&e[d].call(c,this,b)}this.labelContainer=a(this.settings.errorLabelContainer),this.errorContext=this.labelContainer.length&&this.labelContainer||a(this.currentForm),this.containers=a(this.settings.errorContainer).add(this.settings.errorLabelContainer),this.submitted={},this.valueCache={},this.pendingRequest=0,this.pending={},this.invalid={},this.reset();var c,d=this.groups={};a.each(this.settings.groups,function(b,c){"string"==typeof c&&(c=c.split(/\s/)),a.each(c,function(a,c){d[c]=b})}),c=this.settings.rules,a.each(c,function(b,d){c[b]=a.validator.normalizeRule(d)}),a(this.currentForm).on("focusin.validate focusout.validate keyup.validate",":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'], [type='radio'], [type='checkbox'], [contenteditable]",b).on("click.validate","select, option, [type='radio'], [type='checkbox']",b),this.settings.invalidHandler&&a(this.currentForm).on("invalid-form.validate",this.settings.invalidHandler),a(this.currentForm).find("[required], [data-rule-required], .required").attr("aria-required","true")},form:function(){return this.checkForm(),a.extend(this.submitted,this.errorMap),this.invalid=a.extend({},this.errorMap),this.valid()||a(this.currentForm).triggerHandler("invalid-form",[this]),this.showErrors(),this.valid()},checkForm:function(){this.prepareForm();for(var a=0,b=this.currentElements=this.elements();b[a];a++)this.check(b[a]);return this.valid()},element:function(b){var c,d,e=this.clean(b),f=this.validationTargetFor(e),g=this,h=!0;return void 0===f?delete this.invalid[e.name]:(this.prepareElement(f),this.currentElements=a(f),d=this.groups[f.name],d&&a.each(this.groups,function(a,b){b===d&&a!==f.name&&(e=g.validationTargetFor(g.clean(g.findByName(a))),e&&e.name in g.invalid&&(g.currentElements.push(e),h=h&&g.check(e)))}),c=this.check(f)!==!1,h=h&&c,c?this.invalid[f.name]=!1:this.invalid[f.name]=!0,this.numberOfInvalids()||(this.toHide=this.toHide.add(this.containers)),this.showErrors(),a(b).attr("aria-invalid",!c)),h},showErrors:function(b){if(b){var c=this;a.extend(this.errorMap,b),this.errorList=a.map(this.errorMap,function(a,b){return{message:a,element:c.findByName(b)[0]}}),this.successList=a.grep(this.successList,function(a){return!(a.name in b)})}this.settings.showErrors?this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors()},resetForm:function(){a.fn.resetForm&&a(this.currentForm).resetForm(),this.invalid={},this.submitted={},this.prepareForm(),this.hideErrors();var b=this.elements().removeData("previousValue").removeAttr("aria-invalid");this.resetElements(b)},resetElements:function(a){var b;if(this.settings.unhighlight)for(b=0;a[b];b++)this.settings.unhighlight.call(this,a[b],this.settings.errorClass,""),this.findByName(a[b].name).removeClass(this.settings.val
5idClass);else a.removeClass(this.settings.errorClass).removeClass(this.settings.validClass)},numberOfInvalids:function(){return this.objectLength(this.invalid)},objectLength:function(a){var b,c=0;for(b in a)a[b]&&c++;return c},hideErrors:function(){this.hideThese(this.toHide)},hideThese:function(a){a.not(this.containers).text(""),this.addWrapper(a).hide()},valid:function(){return 0===this.size()},size:function(){return this.errorList.length},focusInvalid:function(){if(this.settings.focusInvalid)try{a(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").focus().trigger("focusin")}catch(b){}},findLastActive:function(){var b=this.lastActive;return b&&1===a.grep(this.errorList,function(a){return a.element.name===b.name}).length&&b},elements:function(){var b=this,c={};return a(this.currentForm).find("input, select, textarea, [contenteditable]").not(":submit, :reset, :image, :disabled").not(this.settings.ignore).filter(function(){var d=this.name||a(this).attr("name");return!d&&b.settings.debug&&window.console&&console.error("%o has no name assigned",this),this.hasAttribute("contenteditable")&&(this.form=a(this).closest("form")[0]),d in c||!b.objectLength(a(this).rules())?!1:(c[d]=!0,!0)})},clean:function(b){return a(b)[0]},errors:function(){var b=this.settings.errorClass.split(" ").join(".");return a(this.settings.errorElement+"."+b,this.errorContext)},resetInternals:function(){this.successList=[],this.errorList=[],this.errorMap={},this.toShow=a([]),this.toHide=a([])},reset:function(){this.resetInternals(),this.currentElements=a([])},prepareForm:function(){this.reset(),this.toHide=this.errors().add(this.containers)},prepareElement:function(a){this.reset(),this.toHide=this.errorsFor(a)},elementValue:function(b){var c,d,e=a(b),f=b.type;return"radio"===f||"checkbox"===f?this.findByName(b.name).filter(":checked").val():"number"===f&&"undefined"!=typeof b.validity?b.validity.badInput?"NaN":e.val():(c=b.hasAttribute("contenteditable")?e.text():e.val(),"file"===f?"C:\\fakepath\\"===c.substr(0,12)?c.substr(12):(d=c.lastIndexOf("/"),d>=0?c.substr(d+1):(d=c.lastIndexOf("\\"),d>=0?c.substr(d+1):c)):"string"==typeof c?c.replace(/\r/g,""):c)},check:function(b){b=this.validationTargetFor(this.clean(b));var c,d,e,f=a(b).rules(),g=a.map(f,function(a,b){return b}).length,h=!1,i=this.elementValue(b);if("function"==typeof f.normalizer){if(i=f.normalizer.call(b,i),"string"!=typeof i)throw new TypeError("The normalizer should return a string value.");delete f.normalizer}for(d in f){e={method:d,parameters:f[d]};try{if(c=a.validator.methods[d].call(this,i,b,e.parameters),"dependency-mismatch"===c&&1===g){h=!0;continue}if(h=!1,"pending"===c)return void(this.toHide=this.toHide.not(this.errorsFor(b)));if(!c)return this.formatAndAdd(b,e),!1}catch(j){throw this.settings.debug&&window.console&&console.log("Exception occurred when checking element "+b.id+", check the '"+e.method+"' method.",j),j instanceof TypeError&&(j.message+=".  Exception occurred when checking element "+b.id+", check the '"+e.method+"' method."),j}}if(!h)return this.objectLength(f)&&this.successList.push(b),!0},customDataMessage:function(b,c){return a(b).data("msg"+c.charAt(0).toUpperCase()+c.substring(1).toLowerCase())||a(b).data("msg")},customMessage:function(a,b){var c=this.settings.messages[a];return c&&(c.constructor===String?c:c[b])},findDefined:function(){for(var a=0;a<arguments.length;a++)if(void 0!==arguments[a])return arguments[a]},defaultMessage:function(b,c){var d=this.findDefined(this.customMessage(b.name,c.method),this.customDataMessage(b,c.method),!this.settings.ignoreTitle&&b.title||void 0,a.validator.messages[c.method],"<strong>Warning: No message defined for "+b.name+"</strong>"),e=/\$?\{(\d+)\}/g;return"function"==typeof d?d=d.call(this,c.parameters,b):e.test(d)&&(d=a.validator.format(d.replace(e,"{$1}"),c.parameters)),d},formatAndAdd:function(a,b){var c=this.defaultMessage(a,b);this.errorList.push({message:c,element:a,method:b.method}),this.errorMap[a.name]=c,this.submitted[a.name]=c},addWrapper:function(a){return this.settings.wrapper&&(a=a.add(a.parent(this.settings.wrapper))),a},defaultShowErrors:function(){var a,b,c;for(a=0;this.errorList[a];a++)c=this.errorList[a],this.settings.highlight&&this.settings.highlight.call(this,c.element,this.settings.errorClass,this.settings.val
5idClass),this.showLabel(c.element,c.message);if(this.errorList.length&&(this.toShow=this.toShow.add(this.containers)),this.settings.success)for(a=0;this.successList[a];a++)this.showLabel(this.successList[a]);if(this.settings.unhighlight)for(a=0,b=this.validElements();b[a];a++)this.settings.unhighlight.call(this,b[a],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 a(this.errorList).map(function(){return this.element})},showLabel:function(b,c){var d,e,f,g,h=this.errorsFor(b),i=this.idOrName(b),j=a(b).attr("aria-describedby");h.length?(h.removeClass(this.settings.validClass).addClass(this.settings.errorClass),h.html(c)):(h=a("<"+this.settings.errorElement+">").attr("id",i+"-error").addClass(this.settings.errorClass).html(c||""),d=h,this.settings.wrapper&&(d=h.hide().show().wrap("<"+this.settings.wrapper+"/>").parent()),this.labelContainer.length?this.labelContainer.append(d):this.settings.errorPlacement?this.settings.errorPlacement(d,a(b)):d.insertAfter(b),h.is("label")?h.attr("for",i):0===h.parents("label[for='"+this.escapeCssMeta(i)+"']").length&&(f=h.attr("id"),j?j.match(new RegExp("\\b"+this.escapeCssMeta(f)+"\\b"))||(j+=" "+f):j=f,a(b).attr("aria-describedby",j),e=this.groups[b.n
5ame],e&&(g=this,a.each(g.groups,function(b,c){c===e&&a("[name='"+g.escapeCssMeta(b)+"']",g.currentForm).attr("aria-describedby",h.attr("id"))})))),!c&&this.settings.success&&(h.text(""),"string"==typeof this.settings.success?h.addClass(this.settings.success):this.settings.success(h,b)),this.toShow=this.toShow.add(h)},errorsFor:function(b){var c=this.escapeCssMeta(this.idOrName(b)),d=a(b).attr("aria-describedby"),e="label[for='"+c+"'], label[for='"+c+"'] *";return d&&(e=e+", #"+this.escapeCssMeta(d).replace(/\s+/g,", #")),this.errors().filter(e)},escapeCssMeta:function(a){return a.replace(/([\\!"#$%&'()*+,./:;<=>?@\[\]^`{|}~])/g,"\\$1")},idOrName:function(a){return this.groups[a.name]||(this.checkable(a)?a.name:a.id||a.name)},validationTargetFor:function(b){return this.checkable(b)&&(b=this.findByName(b.name)),a(b).not(this.settings.ignore)[0]},checkable:function(a){return/radio|checkbox/i.test(a.type)},findByName:function(b){return a(this.currentForm).find("[name='"+this.escapeCssMeta(b)+"']")},getLength:function(b,c){switch(c.nodeName.toLowerCase()){case"select":return a("option:selected",c).length;case"input":if(this.checkable(c))return this.findByName(c.name).filter(":checked").length}return b.length},depend:function(a,b){return this.dependTypes[typeof a]?this.dependTypes[typeof a](a,b):!0},dependTypes:{"boolean":function(a){return a},string:function(b,c){return!!a(b,c.form).length},"function":function(a,b){return a(b)}},optional:function(b){var c=this.elementValue(b);
5return!a.validator.methods.required.call(this,c,b)&&"dependency-mismatch"},startRequest:function(b){this.pending[b.name]||(this.pendingRequest++,a(b).addClass(this.settings.pendingClass),this.pending[b.name]=!0)},stopRequest:function(b,c){this.pendingRequest--,this.pendingRequest<0&&(this.pendingRequest=0),delete this.pending[b.name],a(b).removeClass(this.settings.pendingClass),c&&0===this.pendingRequest&&this.formSubmitted&&this.form()?(a(this.currentForm).submit(),this.formSubmitted=!1):!c&&0===this.pendingRequest&&this.formSubmitted&&(a(this.currentForm).triggerHandler("invalid-form",[this]),this.formSubmitted=!1)},previousValue:function(b,c){return a.data(b,"previousValue")||a.data(b,"previousValue",{old:null,valid:!0,message:this.defaultMessage(b,{method:c})})},destroy:function(){this.resetForm(),a(this.currentForm).off(".validate").removeData("validator").find(".validate-equalTo-blur").off(".validate-equalTo").removeClass("validate-equalTo-blur")}},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(b,c){b.constructor===String?this.classRuleSettings[b]=c:a.extend(this.classRuleSettings,b)},classRules:function(b){var c={},d=a(b).attr("class");return d&&a.each(d.split(" "),function(){this in a.validator.classRuleSettings&&a.extend(c,a.validator.classRuleSettings[this])}),c},normalizeAttributeRule:function(a,b,c,d){/min|max|step/.test(c)&&(null===b||/number|range|text/.test(b))&&(d=Number(d),isNaN(d)&&(d=void 0)),d||0===d?a[c]=d:b===c&&"range"!==b&&(a[c]=!0)},attributeRules:function(b){var c,d,e={},f=a(b),g=b.getAttribute("type");for(c in a.validator.methods)"required"===c?(d=b.getAttribute(c),""===d&&(d=!0),d=!!d):d=f.attr(c),this.normalizeAttributeRule(e,g,c,d);return e.maxlength&&/-1|2147483647|524288/.test(e.maxlength)&&delete e.maxlength,e},dataRules:function(b){var c,d,e={},f=a(b),g=b.getAttribute("type");for(c in a.validator.methods)d=f.data("rule"+c.charAt(0).toUpperCase()+c.substring(1).toLowerCase()),this.normalizeAttributeRule(e,g,c,d);return e},staticRules:function(b){var c={},d=a.data(b.form,"validator");return d.settings.rules&&(c=a.validator.normalizeRule(d.settings.rules[b.name])||{}),c},normalizeRules:function(b,c){return a.each(b,function(d,e){if(e===!1)return void delete b[d];if(e.param||e.depends){var f=!0;switch(typeof e.depends){case"string":f=!!a(e.depends,c.form).length;break;case"function":f=e.depends.call(c,c)}f?b[d]=void 0!==e.param?e.param:!0:(a.data(c.form,"validator").resetElements(a(c)),delete b[d])}}),a.each(b,function(d,e){b[d]=a.isFunction(e)&&"normalizer"!==d?e(c):e}),a.each(["minlength","maxlength"],function(){b[this]&&(b[this]=Number(b[this]))}),a.each(["rangelength","range"],function(){var c;b[this]&&(a.isArray(b[this])?b[this]=[Number(b[this][0]),Number(b[this][1])]:"string"==typeof b[this]&&(c=b[this].replace(/[\[\]]/g,"").split(/[\s,]+/),b[this]=[Number(c[0]),Number(c[1])]))}),a.validator.autoCreateRanges&&(null!=b.min&&null!=b.max&&(b.range=[b.min,b.max],delete b.min,delete b.max),null!=b.minlength&&null!=b.maxlength&&(b.rangelength=[b.minlength,b.maxlength],delete b.minlength,delete b.maxlength)),b},normalizeRule:function(b){if("string"==typeof b){var c={};a.each(b.split(/\s/),function(){c[this]=!0}),b=c}return b},addMethod:function(b,c,d){a.validator.methods[b]=c,a.validator.messages[b]=void 0!==d?d:a.validator.messages[b],c.length<3&&a.validator.addClassRules(b,a.validator.normalizeRule(b))},methods:{required:function(b,c,d){if(!this.depend(d,c))return"dependency-mismatch";if("select"===c.nodeName.toLowerCase()){var e=a(c).val();return e&&e.length>0}return this.checkable(c)?this.getLength(b,c)>0:b.length>0},email:function(a,b){return this.optional(b)||/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test(a)},url:function(a,b){return this.optional(b)||/^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,})).?)(?::\d{2,5})?(?:[/?#]\S*)?$/i.test(a)},date:function(a,b){return this.optional(b)||!/Invalid|NaN/.test(new Date(a).toString())},dateISO:function(a,b){return this.optional(b)||/^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test(a)},number:function(a,b){return this.optional(b)||/^(?:-?\d+|-?\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(a)},digits:function(a,b){return this.optional(b)||/^\d+$/.test(a)},minlength:function(b,c,d){var e=a.isArray(b)?b.length:this.getLength(b,c);return this.optional(c)||e>=d},maxlength:function(b,c,d){var e=a.isArray(b)?b.length:this.getLength(b,c);return this.optional(c)||d>=e},rangelength:function(b,c,d){var e=a.isArray(b)?b.length:this.getLength(b,c);return this.optional(c)||e>=d[0]&&e<=d[1]},min:function(a,b,c){return this.optional(b)||a>=c},max:function(a,b,c){return this.optional(b)||c>=a},range:function(a,b,c){return this.optional(b)||a>=c[0]&&a<=c[1]},step:function(b,c,d){var e=a(c).attr("type"),f="Step attribute on input type "+e+" is not supported.",g=["text","number","range"],h=new RegExp("\\b"+e+"\\b"),i=e&&!h.test(g.join());if(i)throw new Error(f);return this.optional(c)||b%d===0},equalTo:function(b,c,d){var e=a(d);return this.settings.onfocusout&&e.not(".validate-equalTo-blur").length&&e.addClass("val
vendor: 11,064 bytes, lines 5-7
5idate-equalTo-blur").on("blur.validate-equalTo",function(){a(c).valid()}),b===e.val()},remote:function(b,c,d,e){if(this.optional(c))return"dependency-mismatch";e="string"==typeof e&&e||"remote";var f,g,h,i=this.previousValue(c,e);return this.settings.messages[c.name]||(this.settings.messages[c.name]={}),i.originalMessage=i.originalMessage||this.settings.messages[c.name][e],this.settings.messages[c.name][e]=i.message,d="string"==typeof d&&{url:d}||d,h=a.param(a.extend({data:b},d.data)),i.old===h?i.valid:(i.old=h,f=this,this.startRequest(c),g={},g[c.name]=b,a.ajax(a.extend(!0,{mode:"abort",port:"validate"+c.name,dataType:"json",data:g,context:f.currentForm,success:function(a){var d,g,h,j=a===!0||"true"===a;f.settings.messages[c.name][e]=i.originalMessage,j?(h=f.formSubmitted,f.resetInternals(),f.toHide=f.errorsFor(c),f.formSubmitted=h,f.successList.push(c),f.invalid[c.name]=!1,f.showErrors()):(d={},g=a||f.defaultMessage(c,{method:e,parameters:b}),d[c.name]=i.message=g,f.invalid[c.name]=!0,f.showErrors(d)),i.valid=j,f.stopRequest(c,j)}},d)),"pending")}}});var b,c={};a.ajaxPrefilter?a.ajaxPrefilter(function(a,b,d){var e=a.port;"abort"===a.mode&&(c[e]&&c[e].abort(),c[e]=d)}):(b=a.ajax,a.ajax=function(d){var e=("mode"in d?d:a.ajaxSettings).mode,f=("port"in d?d:a.ajaxSettings).port;return"abort"===e?(c[f]&&c[f].abort(),c[f]=b.apply(this,arguments),c[f]):b.apply(this,arguments)})});
6/* Chosen v1.5.1 | (c) 2011-2016 by Harvest | MIT License, https://github.com/harvesthq/chosen/blob/master/LICENSE.md */
7(function(){var a,AbstractChosen,Chosen,SelectParser,b,c={}.hasOwnProperty,d=function(a,b){function d(){this.constructor=a}for(var e in b)c.call(b,e)&&(a[e]=b[e]);return d.prototype=b.prototype,a.prototype=new d,a.__super__=b.prototype,a};SelectParser=function(){function SelectParser(){this.options_index=0,this.parsed=[]}return SelectParser.prototype.add_node=function(a){return"OPTGROUP"===a.nodeName.toUpperCase()?this.add_group(a):this.add_option(a)},SelectParser.prototype.add_group=function(a){var b,c,d,e,f,g;for(b=this.parsed.length,this.parsed.push({array_index:b,group:!0,label:this.escapeExpression(a.label),title:a.title?a.title:void 0,children:0,disabled:a.disabled,classes:a.className}),f=a.childNodes,g=[],d=0,e=f.length;e>d;d++)c=f[d],g.push(this.add_option(c,b,a.disabled));return g},SelectParser.prototype.add_option=function(a,b,c){return"OPTION"===a.nodeName.toUpperCase()?(""!==a.text?(null!=b&&(this.parsed[b].children+=1),this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,value:a.value,text:a.text,html:a.innerHTML,title:a.title?a.title:void 0,selected:a.selected,disabled:c===!0?c:a.disabled,group_array_index:b,group_label:null!=b?this.parsed[b].label:null,classes:a.className,style:a.style.cssText})):this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,empty:!0}),this.options_index+=1):void 0},SelectParser.prototype.escapeExpression=function(a){var b,c;return null==a||a===!1?"":/[\&\<\>\"\'\`]/.test(a)?(b={"<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},c=/&(?!\w+;)|[\<\>\"\'\`]/g,a.replace(c,function(a){return b[a]||"&amp;"})):a},SelectParser}(),SelectParser.select_to_array=function(a){var b,c,d,e,f;for(c=new SelectParser,f=a.childNodes,d=0,e=f.length;e>d;d++)b=f[d],c.add_node(b);return c.parsed},AbstractChosen=function(){function AbstractChosen(a,b){this.form_field=a,this.options=null!=b?b:{},AbstractChosen.browser_is_supported()&&(this.is_multiple=this.form_field.multiple,this.set_default_text(),this.set_default_values(),this.setup(),this.set_up_html(),this.register_observers(),this.on_ready())}return AbstractChosen.prototype.set_default_values=function(){var a=this;return this.click_test_action=function(b){return a.test_active_click(b)},this.activate_action=function(b){return a.activate_field(b)},this.active_field=!1,this.mouse_on_container=!1,this.results_showing=!1,this.result_highlighted=null,this.allow_single_deselect=null!=this.options.allow_single_deselect&&null!=this.form_field.options[0]&&""===this.form_field.options[0].text?this.options.allow_single_deselect:!1,this.disable_search_threshold=this.options.disable_search_threshold||0,this.disable_search=this.options.disable_search||!1,this.enable_split_word_search=null!=this.options.enable_split_word_search?this.options.enable_split_word_search:!0,this.group_search=null!=this.options.group_search?this.options.group_search:!0,this.search_contains=this.options.search_contains||!1,this.single_backstroke_delete=null!=this.options.single_backstroke_delete?this.options.single_backstroke_delete:!0,this.max_selected_options=this.options.max_selected_options||1/0,this.inherit_select_classes=this.options.inherit_select_classes||!1,this.display_selected_options=null!=this.options.display_selected_options?this.options.display_selected_options:!0,this.display_disabled_options=null!=this.options.display_disabled_options?this.options.display_disabled_options:!0,this.include_group_label_in_selected=this.options.include_group_label_in_selected||!1,this.max_shown_results=this.options.max_shown_results||Number.POSITIVE_INFINITY},AbstractChosen.prototype.set_default_text=function(){return this.form_field.getAttribute("data-placeholder")?this.default_text=this.form_field.getAttribute("data-placeholder"):this.is_multiple?this.default_text=this.options.placeholder_text_multiple||this.options.placeholder_text||AbstractChosen.default_multiple_text:this.default_text=this.options.placeholder_text_single||this.options.placeholder_text||AbstractChosen.default_single_text,this.results_none_found=this.form_field.getAttribute("data-no_results_text")||this.options.no_results_text||AbstractChosen.default_no_result_text},AbstractChosen.prototype.choice_label=function(a){return this.include_group_label_in_selected&&null!=a.group_label?"<b class='group-name'>"+a.group_label+"</b>"+a.html:a.html},AbstractChosen.prototype.mouse_enter=function(){return this.mouse_on_container=!0},AbstractChosen.prototype.mouse_leave=function(){return this.mouse_on_container=!1},AbstractChosen.prototype.input_focus=function(a){var b=this;if(this.is_multiple){if(!this.active_field)return setTimeout(function(){return b.container_mousedown()},50)}else if(!this.active_field)return this.activate_field()},AbstractChosen.prototype.input_blur=function(a){var b=this;return this.mouse_on_container?void 0:(this.active_field=!1,setTimeout(function(){return b.blur_test()},100))},AbstractChosen.prototype.results_option_build=function(a){var b,c,d,e,f,g,h;for(b="",e=0,h=this.results_data,f=0,g=h.length;g>f&&(c=h[f],d="",d=c.group?this.result_add_group(c):this.result_add_option(c),""!==d&&(e++,b+=d),(null!=a?a.first:void 0)&&(c.selected&&this.is_multiple?this.choice_build(c):c.selected&&!this.is_multiple&&this.single_set_selected_text(this.choice_label(c))),!(e>=this.max_shown_results));f++);return b},AbstractChosen.prototype.result_add_option=function(a){var b,c;return a.search_match&&this.include_option_in_results(a)?(b=[],a.disabled||a.selected&&this.is_multiple||b.push("active-result"),!a.disabled||a.selected&&this.is_multiple||b.push("disabled-result"),a.selected&&b.push("result-selected"),null!=a.group_array_index&&b.push("group-option"),""!==a.classes&&b.push(a.classes),c=document.createElement("li"),c.className=b.join(" "),c.style.cssText=a.style,c.setAttribute("data-option-array-index",a.array_index),c.innerHTML=a.search_text,a.title&&(c.title=a.title),this.outerHTML(c)):""},AbstractChosen.prototype.result_add_group=function(a){var b,c;return(a.search_match||a.group_match)&&a.active_options>0?(b=[],b.push("group-result"),a.classes&&b.push(a.classes),c=document.createElement("li"),c.className=b.join(" "),c.innerHTML=a.search_text,a.title&&(c.title=a.title),this.outerHTML(c)):""},AbstractChosen.prototype.results_update_field=function(){return this.set_default_text(),this.is_multiple||this.results_reset_cleanup(),this.result_clear_highlight(),this.results_build(),this.results_showing?this.winnow_results():void 0},AbstractChosen.prototype.reset_single_select_options=function(){var a,b,c,d,e;for(d=this.results_data,e=[],b=0,c=d.length;c>b;b++)a=d[b],a.selected?e.push(a.selected=!1):e.push(void 0);return e},AbstractChosen.prototype.results_toggle=function(){return this.results_showing?this.results_hide():this.results_show()},AbstractChosen.prototype.results_search=function(a){return this.results_showing?this.winnow_results():this.results_show()},AbstractChosen.prototype.winnow_results=function(){var a,b,c,d,e,f,g,h,i,j,k,l;for(this.no_results_clear(),d=0,f=this.get_search_text(),a=f.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),i=new RegExp(a,"i"),c=this.get_search_regex(a),l=this.results_data,j=0,k=l.length;k>j;j++)b=l[j],b.search_match=!1,e=null,this.include_option_in_results(b)&&(b.group&&(b.group_match=!1,b.active_options=0),null!=b.group_array_index&&this.results_data[b.group_array_index]&&(e=this.results_data[b.group_array_index],0===e.active_options&&e.search_match&&(d+=1),e.active_options+=1),b.search_text=b.group?b.label:b.html,(!b.group||this.group_search)&&(b.search_match=this.search_string_match(b.search_text,c),b.search_match&&!b.group&&(d+=1),b.search_match?(f.length&&(g=b.search_text.search(i),h=b.search_text.substr(0,g+f.length)+"</em>"+b.search_text.substr(g+f.length),b.search_text=h.substr(0,g)+"<em>"+h.substr(g)),null!=e&&(e.group_match=!0)):null!=b.group_array_index&&this.results_data[b.group_array_index].search_match&&(b.search_match=!0)));return this.result_clear_highlight(),1>d&&f.length?(this.update_results_content(""),this.no_results(f)):(this.update_results_content(this.results_option_build()),this.winnow_results_set_highlight())},AbstractChosen.prototype.get_search_regex=function(a){var b;return b=this.search_contains?"":"^",new RegExp(b+a,"i")},AbstractChosen.prototype.search_string_match=function(a,b){var c,d,e,f;if(b.test(a))return!0;if(this.enable_split_word_search&&(a.indexOf(" ")>=0||0===a.indexOf("["))&&(d=a.replace(/\[|\]/g,"").split(" "),d.length))for(e=0,f=d.length;f>e;e++)if(c=d[e],b.test(c))return!0},AbstractChosen.prototype.choices_count=function(){var a,b,c,d;if(null!=this.selected_option_count)return this.selected_option_count;for(this.selected_option_count=0,d=this.form_field.options,b=0,c=d.length;c>b;b++)a=d[b],a.selected&&(this.selected_option_count+=1);return this.selected_option_count},AbstractChosen.prototype.choices_click=function(a){return a.preventDefault(),this.results_showing||this.is_disabled?void 0:this.results_show()},AbstractChosen.prototype.keyup_checker=function(a){var b,c;switch(b=null!=(c=a.which)?c:a.keyCode,this.search_field_scale(),b){case 8:if(this.is_multiple&&this.backstroke_length<1&&this.choices_count()>0)return this.keydown_backstroke();if(!this.pending_backstroke)return this.result_clear_highlight(),this.results_search();break;case 13:if(a.preventDefault(),this.results_showing)return this.result_select(a);break;case 27:return this.results_showing&&this.results_hide(),!0;case 9:case 38:case 40:case 16:case 91:case 17:case 18
vendor: 18,734 bytes, line 7
7:break;default:return this.results_search()}},AbstractChosen.prototype.clipboard_event_checker=function(a){var b=this;return setTimeout(function(){return b.results_search()},50)},AbstractChosen.prototype.container_width=function(){return null!=this.options.width?this.options.width:""+this.form_field.offsetWidth+"px"},AbstractChosen.prototype.include_option_in_results=function(a){return this.is_multiple&&!this.display_selected_options&&a.selected?!1:!this.display_disabled_options&&a.disabled?!1:a.empty?!1:!0},AbstractChosen.prototype.search_results_touchstart=function(a){return this.touch_started=!0,this.search_results_mouseover(a)},AbstractChosen.prototype.search_results_touchmove=function(a){return this.touch_started=!1,this.search_results_mouseout(a)},AbstractChosen.prototype.search_results_touchend=function(a){return this.touch_started?this.search_results_mouseup(a):void 0},AbstractChosen.prototype.outerHTML=function(a){var b;return a.outerHTML?a.outerHTML:(b=document.createElement("div"),b.appendChild(a),b.innerHTML)},AbstractChosen.browser_is_supported=function(){return/iP(od|hone)/i.test(window.navigator.userAgent)?!1:/Android/i.test(window.navigator.userAgent)&&/Mobile/i.test(window.navigator.userAgent)?!1:/IEMobile/i.test(window.navigator.userAgent)?!1:/Windows Phone/i.test(window.navigator.userAgent)?!1:/BlackBerry/i.test(window.navigator.userAgent)?!1:/BB10/i.test(window.navigator.userAgent)?!1:"Microsoft Internet Explorer"===window.navigator.appName?document.documentMode>=8:!0},AbstractChosen.default_multiple_text="Select Some Options",AbstractChosen.default_single_text="Select an Option",AbstractChosen.default_no_result_text="No results match",AbstractChosen}(),a=jQuery,a.fn.extend({chosen:function(b){return AbstractChosen.browser_is_supported()?this.each(function(c){var d,e;return d=a(this),e=d.data("chosen"),"destroy"===b?void(e instanceof Chosen&&e.destroy()):void(e instanceof Chosen||d.data("chosen",new Chosen(this,b)))}):this}}),Chosen=function(c){function Chosen(){return b=Chosen.__super__.constructor.apply(this,arguments)}return d(Chosen,c),Chosen.prototype.setup=function(){return this.form_field_jq=a(this.form_field),this.current_selectedIndex=this.form_field.selectedIndex,this.is_rtl=this.form_field_jq.hasClass("chosen-rtl")},Chosen.prototype.set_up_html=function(){var b,c;return b=["chosen-container"],b.push("chosen-container-"+(this.is_multiple?"multi":"single")),this.inherit_select_classes&&this.form_field.className&&b.push(this.form_field.className),this.is_rtl&&b.push("chosen-rtl"),c={"class":b.join(" "),style:"width: "+this.container_width()+";",title:this.form_field.title},this.form_field.id.length&&(c.id=this.form_field.id.replace(/[^\w]/g,"_")+"_chosen"),this.container=a("<div />",c),this.is_multiple?this.container.html('<ul class="chosen-choices"><li class="search-field"><input type="text" value="'+this.default_text+'" class="default" autocomplete="off" style="width:25px;" /></li></ul><div class="chosen-drop"><ul class="chosen-results"></ul></div>'):this.container.html('<a class="chosen-single chosen-default"><span>'+this.default_text+'</span><div><b></b></div></a><div class="chosen-drop"><div class="chosen-search"><input type="text" autocomplete="off" /></div><ul class="chosen-results"></ul></div>'),this.form_field_jq.hide().after(this.container),this.dropdown=this.container.find("div.chosen-drop").first(),this.search_field=this.container.find("input").first(),this.search_results=this.container.find("ul.chosen-results").first(),this.search_field_scale(),this.search_no_results=this.container.find("li.no-results").first(),this.is_multiple?(this.search_choices=this.container.find("ul.chosen-choices").first(),this.search_container=this.container.find("li.search-field").first()):(this.search_container=this.container.find("div.chosen-search").first(),this.selected_item=this.container.find(".chosen-single").first()),this.results_build(),this.set_tab_index(),this.set_label_behavior()},Chosen.prototype.on_ready=function(){return this.form_field_jq.trigger("chosen:ready",{chosen:this})},Chosen.prototype.register_observers=function(){var a=this;return this.container.bind("touchstart.chosen",function(b){return a.container_mousedown(b),b.preventDefault()}),this.container.bind("touchend.chosen",function(b){return a.container_mouseup(b),b.preventDefault()}),this.container.bind("mousedown.chosen",function(b){a.container_mousedown(b)}),this.container.bind("mouseup.chosen",function(b){a.container_mouseup(b)}),this.container.bind("mouseenter.chosen",function(b){a.mouse_enter(b)}),this.container.bind("mouseleave.chosen",function(b){a.mouse_leave(b)}),this.search_results.bind("mouseup.chosen",function(b){a.search_results_mouseup(b)}),this.search_results.bind("mouseover.chosen",function(b){a.search_results_mouseover(b)}),this.search_results.bind("mouseout.chosen",function(b){a.search_results_mouseout(b)}),this.search_results.bind("mousewheel.chosen DOMMouseScroll.chosen",function(b){a.search_results_mousewheel(b)}),this.search_results.bind("touchstart.chosen",function(b){a.search_results_touchstart(b)}),this.search_results.bind("touchmove.chosen",function(b){a.search_results_touchmove(b)}),this.search_results.bind("touchend.chosen",function(b){a.search_results_touchend(b)}),this.form_field_jq.bind("chosen:updated.chosen",function(b){a.results_update_field(b)}),this.form_field_jq.bind("chosen:activate.chosen",function(b){a.activate_field(b)}),this.form_field_jq.bind("chosen:open.chosen",function(b){a.container_mousedown(b)}),this.form_field_jq.bind("chosen:close.chosen",function(b){a.input_blur(b)}),this.search_field.bind("blur.chosen",function(b){a.input_blur(b)}),this.search_field.bind("keyup.chosen",function(b){a.keyup_checker(b)}),this.search_field.bind("keydown.chosen",function(b){a.keydown_checker(b)}),this.search_field.bind("focus.chosen",function(b){a.input_focus(b)}),this.search_field.bind("cut.chosen",function(b){a.clipboard_event_checker(b)}),this.search_field.bind("paste.chosen",function(b){a.clipboard_event_checker(b)}),this.is_multiple?this.search_choices.bind("click.chosen",function(b){a.choices_click(b)}):this.container.bind("click.chosen",function(a){a.preventDefault()})},Chosen.prototype.destroy=function(){return a(this.container[0].ownerDocument).unbind("click.chosen",this.click_test_action),this.search_field[0].tabIndex&&(this.form_field_jq[0].tabIndex=this.search_field[0].tabIndex),this.container.remove(),this.form_field_jq.removeData("chosen"),this.form_field_jq.show()},Chosen.prototype.search_field_disabled=function(){return this.is_disabled=this.form_field_jq[0].disabled,this.is_disabled?(this.container.addClass("chosen-disabled"),this.search_field[0].disabled=!0,this.is_multiple||this.selected_item.unbind("focus.chosen",this.activate_action),this.close_field()):(this.container.removeClass("chosen-disabled"),this.search_field[0].disabled=!1,this.is_multiple?void 0:this.selected_item.bind("focus.chosen",this.activate_action))},Chosen.prototype.container_mousedown=function(b){return this.is_disabled||(b&&"mousedown"===b.type&&!this.results_showing&&b.preventDefault(),null!=b&&a(b.target).hasClass("search-choice-close"))?void 0:(this.active_field?this.is_multiple||!b||a(b.target)[0]!==this.selected_item[0]&&!a(b.target).parents("a.chosen-single").length||(b.preventDefault(),this.results_toggle()):(this.is_multiple&&this.search_field.val(""),a(this.container[0].ownerDocument).bind("click.chosen",this.click_test_action),this.results_show()),this.activate_field())},Chosen.prototype.container_mouseup=function(a){return"ABBR"!==a.target.nodeName||this.is_disabled?void 0:this.results_reset(a)},Chosen.prototype.search_results_mousewheel=function(a){var b;return a.originalEvent&&(b=a.originalEvent.deltaY||-a.originalEvent.wheelDelta||a.originalEvent.detail),null!=b?(a.preventDefault(),"DOMMouseScroll"===a.type&&(b=40*b),this.search_results.scrollTop(b+this.search_results.scrollTop())):void 0},Chosen.prototype.blur_test=function(a){return!this.active_field&&this.container.hasClass("chosen-container-active")?this.close_field():void 0},Chosen.prototype.close_field=function(){return a(this.container[0].ownerDocument).unbind("click.chosen",this.click_test_action),this.active_field=!1,this.results_hide(),this.container.removeClass("chosen-container-active"),this.clear_backstroke(),this.show_search_field_default(),this.search_field_scale()},Chosen.prototype.activate_field=function(){return this.container.addClass("chosen-container-active"),this.active_field=!0,this.search_field.val(this.search_field.val()),this.search_field.focus()},Chosen.prototype.test_active_click=function(b){var c;return c=a(b.target).closest(".chosen-container"),c.length&&this.container[0]===c[0]?this.active_field=!0:this.close_field()},Chosen.prototype.results_build=function(){return this.parsing=!0,this.selected_option_count=null,this.results_data=SelectParser.select_to_array(this.form_field),this.is_multiple?this.search_choices.find("li.search-choice").remove():this.is_multiple||(this.single_set_selected_text(),this.disable_search||this.form_field.options.length<=this.disable_search_threshold?(this.search_field[0].readOnly=!0,this.container.addClass("chosen-container-single-nosearch")):(this.search_field[0].readOnly=!1,this.container.removeClass("chosen-container-single-nosearch"))),this.update_results_content(this.results_option_build({first:!0})),this.search_field_disabled(),this.show_search_field_default(),this.search_field_scale(),this.parsing=!1},Chosen.prototype.result_do_highlight=function(a){var b,c,d,e,f;if(a.length){if(this.result_clear_highlight(),this.result_highlight=a,this.result_highlight.addClass("highlighted"),d=parseInt(this.search_results.css("maxHeight"),10),f=this.search_results.scrollTop(),e=d+f,c=this.result_highlight.position().top+this.search_results.scrollTop(),b=c+this.result_highlight.outerHeight(),b>=e)return this.search_results.scrollTop(b-d>0?b-d:0);if(f>c)return this.search_results.scrollTop(c)}},Chosen.prototype.result_clear_highlight=function(){return this.result_highlight&&this.result_highlight.removeClass("highlighted"),this.result_highlight=null},Chosen.prototype.results_show=function(){return this.is_multiple&&this.max_selected_options<=this.choices_count()?(this.form_field_jq.trigger("chosen:maxselected",{chosen:this}),!1):(this.container.addClass("chosen-with-drop"),this.results_showing=!0,this.search_field.focus(),this.search_field.val(this.search_field.val()),this.winnow_results(),this.form_field_jq.trigger("chosen:showing_dropdown",{chosen:this}))},Chosen.prototype.update_results_content=function(a){return this.search_results.html(a)},Chosen.prototype.results_hide=function(){return this.results_showing&&(this.result_clear_highlight(),this.container.removeClass("chosen-with-drop"),this.form_field_jq.trigger("chosen:hiding_dropdown",{chosen:this})),this.results_showing=!1},Chosen.prototype.set_tab_index=function(a){var b;return this.form_field.tabIndex?(b=this.form_field.tabIndex,this.form_field.tabIndex=-1,this.search_field[0].tabIndex=b):void 0},Chosen.prototype.set_label_behavior=function(){var b=this;return this.form_field_label=this.form_field_jq.parents("label"),!this.form_field_label.length&&this.form_field.id.length&&(this.form_field_label=a("label[for='"+this.form_field.id+"']")),this.form_field_label.length>0?this.form_field_label.bind("click.chosen",function(a){return b.is_multiple?b.container_mousedown(a):b.activate_field()}):void 0},Chosen.prototype.show_search_field_default=function(){return this.is_multiple&&this.choices_count()<1&&!this.active_field?(this.search_field.val(this.default_text),this.search_field.addClass("default")):(this.search_field.val(""),this.search_field.removeClass("default"))},Chosen.prototype.search_results_mouseup=function(b){var c;return c=a(b.target).hasClass("active-result")?a(b.target):a(b.target).parents(".active-result").first(),c.length?(this.result_highlight=c,this.result_select(b),this.search_field.focus()):void 0},Chosen.prototype.search_results_mouseover=function(b){var c;return c=a(b.target).hasClass("active-result")?a(b.target):a(b.target).parents(".active-result").first(),c?this.result_do_highlight(c):void 0},Chosen.prototype.search_results_mouseout=function(b){return a(b.target).hasClass("active-result")?this.result_clear_highlight():void 0},Chosen.prototype.choice_build=function(b){var c,d,e=this;return c=a("<li />",{"class":"search-choice"}).html("<span>"+this.choice_label(b)+"</span>"),b.disabled?c.addClass("search-choice-disabled"):(d=a("<a />",{"class":"search-choice-close","data-option-array-index":b.array_index}),d.bind("click.chosen",function(a){return e.choice_destroy_link_click(a)}),c.append(d)),this.search_container.before(c)},Chosen.prototype.choice_destroy_link_click=function(b){return b.preventDefault(),b.stopPropagation(),this.is_disabled?void 0:this.choice_destroy(a(b.target))},Chosen.prototype.choice_destroy=function(a){return this.result_deselect(a[0].getAttribute("data-option-array-index"))?(this.show_search_field_default(),this.is_multiple&&this.choices_count()>0&&this.search_field.val().length<1&&this.results_hide(),a.parents("li").first().remove(),this.search_field_scale()):void 0},Chosen.prototype.results_reset=function(){return this.reset_single_select_options(),this.form_field.options[0].selected=!0,this.single_set_selected_text(),this.show_search_field_default(),this.results_reset_cleanup(),this.form_field_jq.trigger("change"),this.active_field?this.results_hide():void 0},Chosen.prototype.results_reset_cleanup=function(){return this.current_selectedIndex=this.form_field.selectedIndex,this.selected_item.find("abbr").remove()},Chosen.prototype.result_select=function(a){var b,c;return this.result_highlight?(b=this.result_highlight,this.result_clear_highlight(),this.is_multiple&&this.max_selected_options<=this.choices_count()?(this.form_field_jq.trigger("chosen:maxselected",{chosen:this}),!1):(this.is_multiple?b.removeClass("active-result"):this.reset_single_select_options(),b.addClass("result-selected"),c=this.results_data[b[0].getAttribute("data-option-array-index")],c.selected=!0,this.form_field.options[c.options_index].selected=!0,this.selected_option_count=null,this.is_multiple?this.choice_build(c):this.single_set_selected_text(this.choice_label(c)),(a.metaKey||a.ctrlKey)&&this.is_multiple||this.results_hide(),this.show_search_field_default(),(this.is_multiple||this.form_field.selectedIndex!==this.current_selectedIndex)&&this.form_field_jq.trigger("change",{selected:this.form_field.options[c.options_index].value}),this.current_selectedIndex=this.form_field.selectedIndex,a.preventDefault(),this.search_field_scale())):void 0},Chosen.prototype.single_set_selected_text=function(a){return null==a&&(a=this.default_text),a===this.default_text?this.selected_item.addClass("chosen-default"):(this.single_deselect_control_build(),this.selected_item.removeClass("chosen-default")),this.selected_item.find("span").html(a)},Chosen.prototype.result_deselect=function(a){var b;return b=this.results_data[a],this.form_field.options[b.options_index].disabled?!1:(b.selected=!1,this.form_field.options[b.options_index].selected=!1,this.selected_option_count=null,this.result_clear_highlight(),this.results_showing&&this.winnow_results(),this.form_field_jq.trigger("change",{deselected:this.form_field.options[b.options_index].value}),this.search_field_scale(),!0)},Chosen.prototype.single_deselect_control_build=function(){return this.allow_single_deselect?(this.selected_item.find("abbr").length||this.selected_item.find("span").first().after('<abbr class="search-choice-close"></abbr>'),this.selected_item.addClass("chosen-single-with-deselect")):void 0},Chosen.prototype.get_search_text=function(){return a("<div/>").text(a.trim(this.search_field.val())).html()},Chosen.prototype.winnow_results_set_highlight=function(){var a,b;return b=this.is_multiple?[]:this.search_results.find(".result-selected.active-result"),a=b.length?b.first():this.search_results.find(".active-result").first(),null!=a?this.result_do_highlight(a):void 0},Chosen.prototype.no_results=function(b){var c;return c=a('<li class="no-results">'+this.results_none_found+' "<span></span>"</li>'),c.find("span").first().html(b),this.search_results.append(c),this.form_field_jq.trigger("chosen:no_results",{chosen:this})},Chosen.prototype.no_results_clear=function(){return this.search_results.find(".no-results").remove()},Chosen.prototype.keydown_arrow=function(){var a;return this.results_showing&&this.result_highlight?(a=this.result_highlight.nextAll("li.active-result").first())?this.result_do_highlight(a):void 0:this.results_show()},Chosen.prototype.keyup_arrow=function(){var a;return this.results_showing||this.is_multiple?this.result_highlight?(a=this.result_highlight.prevAll("li.active-result"),a.length?this.result_do_highlight(a.first()):(this.choices_count()>0&&this.results_hide(),this.result_clear_highlight())):void 0:this.results_show()},Chosen.prototype.keydown_backstroke=function(){var a;return this.pending_backstroke?(this.choice_destroy(this.pending_backstroke.find("a").first()),this.clear_backstroke()):(a=this.search_container.siblings("li.search-choice").last(),a.length&&!a.hasClass("search-choice-disabled")?(this.pending_backstroke=a,this.single_backstroke_delete?this.keydown_backstroke():this.pending_backstroke.addClass("search-choice-focus")):void 0)},Chosen.prototype.clear_backstroke=function(){return this.pending_backstroke&&this.pending_backstroke.removeClass("search-choice-focus"),this.pending_backstroke=null},Chosen.prototype.keydown_checker=function(a){var b,c;switch(b=null!=(c=a.which)?c:a.keyCode,this.search_field_scale(),8!==b&&this.pending_backstroke&&this.clear_backstroke(),b){case 8:this.backstroke_length=this.search_field.val().length;break;case 9:this.results_showing&&!this.is_multiple&&this.result_select(a),this.mouse_on_container=!1;break;case 13:this.results_showing&&a.preventDefault();break;case 32:this.disable_search&&a.preventDefault();break;case 38:a.preventDefault(),this.keyup_arrow();break;case 40:a.preventDefault(),this.keydown_arrow()}},Chosen.prototype.search_field_scale=function(){var b,c,d,e,f,g,h,i,j;if(this.is_multiple){for(d=0,h=0,f="position:absolute; left: -1000px; top: -1000px; display:none;",g=["font-size","font-style","font-weight","font-family","line-height","text-transform","letter-spacing"],i=0,j=g.length;j>i;i++)e=g[i],f+=e+":"+this.search_field.css(e)+";";return b=a("<div />",{style:f}),b.text(this.search_field.val()),a("body").append(b),h=b.width()+25,b.remove(),c=this.container.outerWidth(),h>c-10&&(h=c-10),this.search_field.css({width:h+"px"})}},Chosen}(AbstractChosen)}).call(this);
7
vendor: 10,105 bytes, lines 8-9
8/*! skrollr 0.6.30 (2015-08-12) | Alexander Prinzhorn - https://github.com/Prinzhorn/skrollr | Free to use under terms of MIT license */
9!function(a,b,c){"use strict";function d(c){if(e=b.documentElement,f=b.body,T(),ha=this,c=c||{},ma=c.constants||{},c.easing)for(var d in c.easing)W[d]=c.easing[d];ta=c.edgeStrategy||"set",ka={beforerender:c.beforerender,render:c.render,keyframe:c.keyframe},la=c.forceHeight!==!1,la&&(Ka=c.scale||1),na=c.mobileDeceleration||y,pa=c.smoothScrolling!==!1,qa=c.smoothScrollingDuration||A,ra={targetTop:ha.getScrollTop()},Sa=(c.mobileCheck||function(){return/Android|iPhone|iPad|iPod|BlackBerry/i.test(navigator.userAgent||navigator.vendor||a.opera)})(),Sa?(ja=b.getElementById(c.skrollrBody||z),ja&&ga(),X(),Ea(e,[s,v],[t])):Ea(e,[s,u],[t]),ha.refresh(),wa(a,"resize orientationchange",function(){var a=e.clientWidth,b=e.clientHeight;(b!==Pa||a!==Oa)&&(Pa=b,Oa=a,Qa=!0)});var g=U();return function h(){$(),va=g(h)}(),ha}var e,f,g={get:function(){return ha},init:function(a){return ha||new d(a)},VERSION:"0.6.30"},h=Object.prototype.hasOwnProperty,i=a.Math,j=a.getComputedStyle,k="touchstart",l="touchmove",m="touchcancel",n="touchend",o="skrollable",p=o+"-before",q=o+"-between",r=o+"-after",s="skrollr",t="no-"+s,u=s+"-desktop",v=s+"-mobile",w="linear",x=1e3,y=.004,z="skrollr-body",A=200,B="start",C="end",D="center",E="bottom",F="___skrollable_id",G=/^(?:input|textarea|button|select)$/i,H=/^\s+|\s+$/g,I=/^data(?:-(_\w+))?(?:-?(-?\d*\.?\d+p?))?(?:-?(start|end|top|center|bottom))?(?:-?(top|center|bottom))?$/,J=/\s*(@?[\w\-\[\]]+)\s*:\s*(.+?)\s*(?:;|$)/gi,K=/^(@?[a-z\-]+)\[(\w+)\]$/,L=/-([a-z0-9_])/g,M=function(a,b){return b.toUpperCase()},N=/[\-+]?[\d]*\.?[\d]+/g,O=/\{\?\}/g,P=/rgba?\(\s*-?\d+\s*,\s*-?\d+\s*,\s*-?\d+/g,Q=/[a-z\-]+-gradient/g,R="",S="",T=function(){var a=/^(?:O|Moz|webkit|ms)|(?:-(?:o|moz|webkit|ms)-)/;if(j){var b=j(f,null);for(var c in b)if(R=c.match(a)||+c==c&&b[c].match(a))break;if(!R)return void(R=S="");R=R[0],"-"===R.slice(0,1)?(S=R,R={"-webkit-":"webkit","-moz-":"Moz","-ms-":"ms","-o-":"O"}[R]):S="-"+R.toLowerCase()+"-"}},U=function(){var b=a.requestAnimationFrame||a[R.toLowerCase()+"RequestAnimationFrame"],c=Ha();return(Sa||!b)&&(b=function(b){var d=Ha()-c,e=i.max(0,1e3/60-d);return a.setTimeout(function(){c=Ha(),b()},e)}),b},V=function(){var b=a.cancelAnimationFrame||a[R.toLowerCase()+"CancelAnimationFrame"];return(Sa||!b)&&(b=function(b){return a.clearTimeout(b)}),b},W={begin:function(){return 0},end:function(){return 1},linear:function(a){return a},quadratic:function(a){return a*a},cubic:function(a){return a*a*a},swing:function(a){return-i.cos(a*i.PI)/2+.5},sqrt:function(a){return i.sqrt(a)},outCubic:function(a){return i.pow(a-1,3)+1},bounce:function(a){var b;if(.5083>=a)b=3;else if(.8489>=a)b=9;else if(.96208>=a)b=27;else{if(!(.99981>=a))return 1;b=91}return 1-i.abs(3*i.cos(a*b*1.028)/b)}};d.prototype.refresh=function(a){var d,e,f=!1;for(a===c?(f=!0,ia=[],Ra=0,a=b.getElementsByTagName("*")):a.length===c&&(a=[a]),d=0,e=a.length;e>d;d++){var g=a[d],h=g,i=[],j=pa,k=ta,l=!1;if(f&&F in g&&delete g[F],g.attributes){for(var m=0,n=g.attributes.length;n>m;m++){var p=g.attributes[m];if("data-anchor-target"!==p.name)if("data-smooth-scrolling"!==p.name)if("data-edge-strategy"!==p.name)if("data-emit-events"!==p.name){var q=p.name.match(I);if(null!==q){var r={props:p.value,element:g,eventType:p.name.replace(L,M)};i.push(r);var s=q[1];s&&(r.constant=s.substr(1));var t=q[2];/p$/.test(t)?(r.isPercentage=!0,r.offset=(0|t.slice(0,-1))/100):r.offset=0|t;var u=q[3],v=q[4]||u;u&&u!==B&&u!==C?(r.mode="relative",r.anchors=[u,v]):(r.mode="absolute",u===C?r.isEnd=!0:r.isPercentage||(r.offset=r.offset*Ka))}}else l=!0;else k=p.value;else j="off"!==p.value;else if(h=b.querySelector(p.value),null===h)throw'Unable to find anchor target "'+p.value+'"'}if(i.length){var w,x,y;!f&&F in g?(y=g[F],w=ia[y].styleAttr,x=ia[y].classAttr):(y=g[F]=Ra++,w=g.style.cssText,x=Da(g)),ia[y]={element:g,styleAttr:w,classAttr:x,anchorTarget:h,keyFrames:i,smoothScrolling:j,edgeStrategy:k,emitEvents:l,lastFrameIndex:-1},Ea(g,[o],[])}}}for(Aa(),d=0,e=a.length;e>d;d++){var z=ia[a[d][F]];z!==c&&(_(z),ba(z))}return ha},d.prototype.relativeToAbsolute=function(a,b,c){var d=e.clientHeight,f=a.getBoundingClientRect(),g=f.top,h=f.bottom-f.top;return b===E?g-=d:b===D&&(g-=d/2),c===E?g+=h:c===D&&(g+=h/2),g+=ha.getScrollTop(),g+.5|0},d.prototype.animateTo=function(a,b){b=b||{};var d=Ha(),e=ha.getScrollTop(),f=b.duration===c?x:b.duration;return oa={startTop:e,topDiff:a-e,targetTop:a,duration:f,startTime:d,endTime:d+f,easing:W[b.easing||w],done:b.done},oa.topDiff||(oa.done&&oa.done.call(ha,!1),oa=c),ha},d.prototype.stopAnimateTo=function(){oa&&oa.done&&oa.done.call(ha,!0),oa=c},d.prototype.isAnimatingTo=function(){return!!oa},d.prototype.isMobile=function(){return Sa},d.prototype.setScrollTop=function(b,c){return sa=c===!0,Sa?Ta=i.min(i.max(b,0),Ja):a.scrollTo(0,b),ha},d.prototype.getScrollTop=function(){return Sa?Ta:a.pageYOffset||e.scrollTop||f.scrollTop||0},d.prototype.getMaxScrollTop=function(){return Ja},d.prototype.on=function(a,b){return ka[a]=b,ha},d.prototype.off=function(a){return delete ka[a],ha},d.prototype.destroy=function(){var a=V();a(va),ya(),Ea(e,[t],[s,u,v]);for(var b=0,d=ia.length;d>b;b++)fa(ia[b].element);e.style.overflow=f.style.overflow="",e.style.height=f.style.height="",ja&&g.setStyle(ja,"transform","none"),ha=c,ja=c,ka=c,la=c,Ja=0,Ka=1,ma=c,na=c,La="down",Ma=-1,Oa=0,Pa=0,Qa=!1,oa=c,pa=c,qa=c,ra=c,sa=c,Ra=0,ta=c,Sa=!1,Ta=0,ua=c};var X=function(){var d,g,h,j,o,p,q,r,s,t,u,v;wa(e,[k,l,m,n].join(" "),function(a){var e=a.changedTouches[0];for(j=a.target;3===j.nodeType;)j=j.parentNode;switch(o=e.clientY,p=e.clientX,t=a.timeStamp,G.test(j.tagName)||a.preventDefault(),a.type){case k:d&&d.blur(),ha.stopAnimateTo(),d=j,g=q=o,h=p,s=t;break;case l:G.test(j.tagName)&&b.activeElement!==j&&a.preventDefault(),r=o-q,v=t-u,ha.setScrollTop(Ta-r,!0),q=o,u=t;break;default:case m:case n:var f=g-o,w=h-p,x=w*w+f*f;if(49>x){if(!G.test(d.tagName)){d.focus();var y=b.createEvent("MouseEvents");y.initMouseEvent("click",!0,!0,a.view,1,e.screenX,e.screenY,e.clientX,e.clientY,a.ctrlKey,a.altKey,a.shiftKey,a.metaKey,0,null),d.dispatchEvent(y)}return}d=c;var z=r/v;z=i.max(i.min(z,3),-3);var A=i.abs(z/na),B=z*A+.5*na*A*A,C=ha.getScrollTop()-B,D=0;C>Ja?(D=(Ja-C)/B,C=Ja):0>C&&(D=-C/B,C=0),A*=1-D,ha.animateTo(C+.5|0,{easing:"outCubic",duration:A})}}),a.scrollTo(0,0),e.style.overflow=f.style.overflow="hidden"},Y=function(){var a,b,c,d,f,g,h,j,k,l,m,n=e.clientHeight,o=Ba();for(j=0,k=ia.length;k>j;j++)for(a=ia[j],b=a.element,c=a.anchorTarget,d=a.keyFrames,f=0,g=d.length;g>f;f++)h=d[f],l=h.offset,m=o[h.constant]||0,h.frame=l,h.isPercentage&&(l*=n,h.frame=l),"relative"===h.mode&&(fa(b),h.frame=ha.relativeToAbsolute(c,h.anchors[0],h.anchors[1])-l,fa(b,!0)),h.frame+=m,la&&!h.isEnd&&h.frame>Ja&&(Ja=h.frame);for(Ja=i.max(Ja,Ca()),j=0,k=ia.length;k>j;j++){for(a=ia[j],d=a.keyFrames,f=0,g=d.length;g>f;f++)h=d[f],m=o[h.constant]||0,h.isEnd&&(h.frame=Ja-h.offset+m);a.keyFrames.sort(Ia)}},Z=function(a,b){for(var c=0,d=ia.length;d>c;c++){var e,f,i=ia[c],j=i.element,k=i.smoothScrolling?a:b,l=i.keyFrames,m=l.length,n=l[0],s=l[l.length-1],t=k<n.frame,u=k>s.frame,v=t?n:s,w=i.emitEvents,x=i.lastFrameIndex;if(t||u){if(t&&-1===i.edge||u&&1===i.edge)continue;switch(t?(Ea(j,[p],[r,q]),w&&x>-1&&(za(j,n.eventType,La),i.lastFrameIndex=-1)):(Ea(j,[r],[p,q]),w&&m>x&&(za(j,s.eventType,La),i.lastFrameIndex=m)),i.edge=t?-1:1,i.edgeStrategy){case"reset":fa(j);continue;case"ease":k=v.frame;break;default:case"set":var y=v.props;for(e in y)h.call(y,e)&&(f=ea(y[e].value),0===e.indexOf("@")?j.setAttribute(e.substr(1),f):g.setStyle(j,e,f));continue}}else 0!==i.edge&&(Ea(j,[o,q],[p,r]),i.edge=0);for(var z=0;m-1>z;z++)if(k>=l[z].frame&&k<=l[z+1].frame){var A=l[z],B=l[z+1];for(e in A.props)if(h.call(A.props,e)){var C=(k-A.frame)/(B.frame-A.frame);C=A.props[e].easing(C),f=da(A.props[e].value,B.props[e].value,C),f=ea(f),0===e.indexOf("@")?j.setAttribute(e.substr(1),f):g.setStyle(j,e,f)}w&&x!==z&&("down"===La?za(j,A.eventType,La):za(j,B.eventType,La),i.lastFrameIndex=z);break}}},$=function(){Qa&&(Qa=!1,Aa());var a,b,d=ha.getScrollTop(),e=Ha();if(oa)e>=oa.endTime?(d=oa.targetTop,a=oa.done,oa=c):(b=oa.easing((e-oa.startTime)/oa.duration),d=oa.startTop+b*oa.topDiff|0),ha.setScrollTop(d,!0);else if(!sa){var f=ra.targetTop-d;f&&(ra={startTop:Ma,topDiff:d-Ma,targetTop:d,startTime:Na,endTime:Na+qa}),e<=ra.endTime&&(b=W.sqrt((e-ra.startTime)/qa),d=ra.startTop+b*ra.topDiff|0)}if(sa||Ma!==d){La=d>Ma?"down":Ma>d?"up":La,sa=!1;var h={curTop:d,lastTop:Ma,maxTop:Ja,direction:La},i=ka.beforerender&&ka.beforerender.call(ha,h);i!==!1&&(Z(d,ha.getScrollTop()),Sa&&ja&&g.setStyle(ja,"transform","translate(0, "+-Ta+"px) "+ua),Ma=d,ka.render&&ka.render.call(ha,h)),a&&a.call(ha,!1)}Na=e},_=function(a){for(var b=0,c=a.keyFrames.length;c>b;b++){for(var d,e,f,g,h=a.keyFrames[b],i={};null!==(g=J.exec(h.props));)f=g[1],e=g[2],d=f.match(K),null!==d?(f=d[1],d=d[2]):d=w,e=e.indexOf("!")?aa(e):[e.slice(1)],i[f]={value:e,easing:W[d]};h.props=i}},aa=function(a){var b=[];return P.lastIndex=0,a=a.replace(P,function(a){return a.replace(N,function(a){return a/255*100+"%"})}),S&&(Q.lastIndex=0,a=a.replace(Q,function(a){return S+a})),a=a.replace(N,function(a){return b.push(+a),"{?}"}),b.unshift(a),b},ba=function(a){var b,c,d={};for(b=0,c=a.keyFrames.length;c>b;b++)ca(a.keyFrames[b],d);for(d={},b=a.keyFrames.length-1;b>=0;b--)ca(a.keyFrames[b],d)},ca=function(a,b){var c;for(c in b)h.call(a.props,c)||(a.props[c]=b[c]);for(c in a.props)b[c]=a.props[c]},da=function(a,b,c){var d,e=a.length;if(e!==b.length)throw"Can't interpolate between \""+a[0]+'" and "'+b[0]+'"';var f=[a[0]];for(d=1;e>d;d++)f[d]=a[d]+(b[d]-a[d])*c;return f},ea=function(a){var b=1;return O.lastIndex=0,a[0].replace(O,function(){return a[b++]})},fa=function(a,b){a=[].concat(a);for(var c,d,e=0,f=a.length;f>e;e++)d=a[e],c=ia[d[F]],c&&(b?(d.style.cssText=c.dirtyStyleAttr,Ea(d,c.dirtyClassAttr)):(c.dirtyStyleAttr=d.style.cssText,c.dirtyClassAttr=Da(d),d.style.cssText=c.styleAttr,E
9a(d,c.classAttr)))},ga=function(){ua="translateZ(0)",g.setStyle(ja,"transform",ua);var a=j(ja),b=a.getPropertyValue("transform"),c=a.getPropertyValue(S+"transform"),d=b&&"none"!==b||c&&"none"!==c;d||(ua="")};g.setStyle=function(a,b,c){var d=a.style;if(b=b.replace(L,M).replace("-",""),"zIndex"===b)isNaN(c)?d[b]=c:d[b]=""+(0|c);else if("float"===b)d.styleFloat=d.cssFloat=c;else try{R&&(d[R+b.slice(0,1).toUpperCase()+b.slice(1)]=c),d[b]=c}catch(e){}};var ha,ia,ja,ka,la,ma,na,oa,pa,qa,ra,sa,ta,ua,va,wa=g.addEvent=function(b,c,d){var e=function(b){return b=b||a.event,b.target||(b.target=b.srcElement),b.preventDefault||(b.preventDefault=function(){b.returnValue=!1,b.defaultPrevented=!0}),d.call(this,b)};c=c.split(" ");for(var f,g=0,h=c.length;h>g;g++)f=c[g],b.addEventListener?b.addEventListener(f,d,!1):b.attachEvent("on"+f,e),Ua.push({element:b,name:f,listener:d})},xa=g.removeEvent=function(a,b,c){b=b.split(" ");for(var d=0,e=b.length;e>d;d++)a.removeEventListener?a.removeEventListener(b[d],c,!1):a.detachEvent("on"+b[d],c)},ya=function(){for(var a,b=0,c=Ua.length;c>b;b++)a=Ua[b],xa(a.element,a.name,a.listener);Ua=[]},za=function(a,b,c){ka.keyframe&&ka.keyframe.call(ha,a,b,c)},Aa=function(){var a=ha.getScrollTop();Ja=0,la&&!Sa&&(f.style.height=""),Y(),la&&!Sa&&(f.style.height=Ja+e.clientHeight+"px"),Sa?ha.setScrollTop(i.min(ha.getScrollTop(),Ja)):ha.setScrollTop(a,!0),sa=!0},Ba=function(){var a,b,c=e.clientHeight,d={};for(a in ma)b=ma[a],"function"==typeof b?b=b.call(ha):/p$/.test(b)&&(b=b.slice(0,-1)/100*c),d[a]=b;return d},Ca=function(){var a,b=0;return ja&&(b=i.max(ja.offsetHeight,ja.scrollHeight)),a=i.max(b,f.scrollHeight,f.offsetHeight,e.scrollHeight,e.offsetHeight,e.clientHeight),a-e.clientHeight},Da=function(b){var c="className";return a.SVGElement&&b instanceof a.SVGElement&&(b=b[c],c="baseVal"),b[c]},Ea=function(b,d,e){var f="className";if(a.SVGElement&&b instanceof a.SVGElement&&(b=b[f],f="baseVal"),e===c)return void(b[f]=d);for(var g=b[f],h=0,i=e.length;i>h;h++)g=Ga(g).replace(Ga(e[h])," ");g=Fa(g);for(var j=0,k=d.length;k>j;j++)-1===Ga(g).indexOf(Ga(d[j]))&&(g+=" "+d[j]);b[f]=Fa(g)},Fa=function(a){return a.replace(H,"")},Ga=function(a){return" "+a+" "},Ha=Date.now||function(){return+new Date},Ia=function(a,b){return a.frame-b.frame},Ja=0,Ka=1,La="down",Ma=-1,Na=Ha(),Oa=0,Pa=0,Qa=!1,Ra=0,Sa=!1,Ta=0,Ua=[];"function"==typeof define&&define.amd?define([],function(){return g}):"undefined"!=typeof module&&module.exports?module.exports=g:a.skrollr=g}(window,document);
10// Awesomplete - Lea Verou - MIT license
11(function(){function h(a){a=Array.isArray(a)?{label:a[0],value:a[1]}:"object"===typeof a&&"label"in a&&"value"in a?a:{label:a,value:a};this.label=a.label||a.value;this.value=a.value}function n(a,b,d){for(var g in b){var f=b[g],c=a.input.getAttribute("data-"+g.toLowerCase());a[g]="number"===typeof f?parseInt(c):!1===f?null!==c:f instanceof Function?null:c;a[g]||0===a[g]||(a[g]=g in d?d[g]:f)}}function c(a,b){return"string"===typeof a?(b||document).querySelector(a):a||null}function k(a,b){return l.call((b||
12document).querySelectorAll(a))}function m(){k("input.awesomplete").forEach(function(a){new e(a)})}var e=function(a,b){var d=this;this.input=c(a);this.input.setAttribute("autocomplete","off");this.input.setAttribute("aria-autocomplete","list");b=b||{};n(this,{minChars:2,maxItems:10,autoFirst:!1,data:e.DATA,filter:e.FILTER_CONTAINS,sort:e.SORT_BYLENGTH,item:e.ITEM,replace:e.REPLACE},b);this.index=-1;this.container=c.create("div",{className:"awesomplete",around:a});this.ul=c.create("ul",{hidden:"hidden",
13inside:this.container});this.status=c.create("span",{className:"visually-hidden",role:"status","aria-live":"assertive","aria-relevant":"additions",inside:this.container});c.bind(this.input,{input:this.evaluate.bind(this),blur:this.close.bind(this,{reason:"blur"}),keydown:function(a){var b=a.keyCode;if(d.opened)if(13===b&&d.selected)a.preventDefault(),d.select();else if(27===b)d.close({reason:"esc"});else if(38===b||40===b)a.preventDefault(),d[38===b?"previous":"next"]()}});c.bind(this.input.form,
14{submit:this.close.bind(this,{reason:"submit"})});c.bind(this.ul,{mousedown:function(a){var b=a.target;if(b!==this){for(;b&&!/li/i.test(b.nodeName);)b=b.parentNode;b&&0===a.button&&(a.preventDefault(),d.select(b,a.target))}}});this.input.hasAttribute("list")?(this.list="#"+this.input.getAttribute("list"),this.input.removeAttribute("list")):this.list=this.input.getAttribute("data-list")||b.list||[];e.all.push(this)};e.prototype={set list(a){if(Array.isArray(a))this._list=a;else if("string"===typeof a&&
15-1<a.indexOf(","))this._list=a.split(/\s*,\s*/);else if((a=c(a))&&a.children){var b=[];l.apply(a.children).forEach(function(a){if(!a.disabled){var c=a.textContent.trim(),f=a.value||c;a=a.label||c;""!==f&&b.push({label:a,value:f})}});this._list=b}document.activeElement===this.input&&this.evaluate()},get selected(){return-1<this.index},get opened(){return!this.ul.hasAttribute("hidden")},close:function(a){this.opened&&(this.ul.setAttribute("hidden",""),this.index=-1,c.fire(this.input,"awesomplete-close",
16a||{}))},open:function(){this.ul.removeAttribute("hidden");this.autoFirst&&-1===this.index&&this["goto"](0);c.fire(this.input,"awesomplete-open")},next:function(){var a=this.ul.children.length;this["goto"](this.index<a-1?this.index+1:a?0:-1)},previous:function(){var a=this.ul.children.length,b=this.index-1;this["goto"](this.selected&&-1!==b?b:a-1)},"goto":function(a){var b=this.ul.children;this.selected&&b[this.index].setAttribute("aria-selected","false");this.index=a;-1<a&&0<b.length&&(b[a].setAttribute("aria-selected",
17"true"),this.status.textContent=b[a].textContent,c.fire(this.input,"awesomplete-highlight",{text:this.suggestions[this.index]}))},select:function(a,b){a?this.index=c.siblingIndex(a):a=this.ul.children[this.index];if(a){var d=this.suggestions[this.index];c.fire(this.input,"awesomplete-select",{text:d,origin:b||a})&&(this.replace(d),this.close({reason:"select"}),c.fire(this.input,"awesomplete-selectcomplete",{text:d}))}},evaluate:function(){var a=this,b=this.input.value;b.length>=this.minChars&&0<this._list.length?
18(this.index=-1,this.ul.innerHTML="",this.suggestions=this._list.map(function(d){return new h(a.data(d,b))}).filter(function(d){return a.filter(d,b)}).sort(this.sort).slice(0,this.maxItems),this.suggestions.forEach(function(d){a.ul.appendChild(a.item(d,b))}),0===this.ul.children.length?this.close({reason:"nomatches"}):this.open()):this.close({reason:"nomatches"})}};e.all=[];e.FILTER_CONTAINS=function(a,b){return RegExp(c.regExpEscape(b.trim()),"i").test(a)};e.FILTER_STARTSWITH=function(a,b){return RegExp("^"+
19c.regExpEscape(b.trim()),"i").test(a)};e.SORT_BYLENGTH=function(a,b){return a.length!==b.length?a.length-b.length:a<b?-1:1};e.ITEM=function(a,b){var d=""===b?a:a.replace(RegExp(c.regExpEscape(b.trim()),"gi"),"<mark>$&</mark>");return c.create("li",{innerHTML:d,"aria-selected":"false"})};e.REPLACE=function(a){this.input.value=a.value};e.DATA=function(a){return a};Object.defineProperty(h.prototype=Object.create(String.prototype),"length",{get:function(){return this.label.length}});h.prototype.toString=
20h.prototype.valueOf=function(){return""+this.label};var l=Array.prototype.slice;c.create=function(a,b){var d=document.createElement(a),g;for(g in b){var f=b[g];"inside"===g?c(f).appendChild(d):"around"===g?(f=c(f),f.parentNode.insertBefore(d,f),d.appendChild(f)):g in d?d[g]=f:d.setAttribute(g,f)}return d};c.bind=function(a,b){if(a)for(var d in b){var c=b[d];d.split(/\s+/).forEach(function(b){a.addEventListener(b,c)})}};c.fire=function(a,b,c){var e=document.createEvent("HTMLEvents");e.initEvent(b,
21!0,!0);for(var f in c)e[f]=c[f];return a.dispatchEvent(e)};c.regExpEscape=function(a){return a.replace(/[-\\^$*+?.()|[\]{}]/g,"\\$&")};c.siblingIndex=function(a){for(var b=0;a=a.previousElementSibling;b++);return b};"undefined"!==typeof Document&&("loading"!==document.readyState?m():document.addEventListener("DOMContentLoaded",m));e.$=c;e.$$=k;"undefined"!==typeof self&&(self.Awesomplete=e);"object"===typeof module&&module.exports&&(module.exports=e);return e})();
22/*!
23 * jquery-timepicker v1.11.4 - A jQuery timepicker plugin inspired by Google Calendar. It supports both mouse and keyboard navigation.
24 * Copyright (c) 2015 Jon Thornton - http://jonthornton.github.com/jquery-timepicker/
25 * License: MIT
26 */
27
28
29(function (factory) {
30    if (typeof exports === "object" && exports &&
31        typeof module === "object" && module && module.exports === exports) {
32        // Browserify. Attach to jQuery module.
33        factory(require("jquery"));
34    } else if (typeof define === 'function' && define.amd) {
35		// AMD. Register as an anonymous module.
36		define(['jquery'], factory);
37	} else {
38		// Browser globals
39		factory(jQuery);
40	}
41}(function ($) {
42	var _ONE_DAY = 86400;
43	var _lang = {
44		am: 'am',
45		pm: 'pm',
46		AM: 'AM',
47		PM: 'PM',
48		decimal: '.',
49		mins: 'mins',
50		hr: 'hr',
51		hrs: 'hrs'
52	};
53
54	var methods = {
55		init: function(options)
56		{
57			return this.each(function()
58			{
59				var self = $(this);
60
61				// pick up settings from data attributes
62				var attributeOptions = [];
63				for (var key in $.fn.timepicker.defaults) {
64					if (self.data(key))  {
65						attributeOptions[key] = self.data(key);
66					}
67				}
68
69				var settings = $.extend({}, $.fn.timepicker.defaults, attributeOptions, options);
70
71				if (settings.lang) {
72					_lang = $.extend(_lang, settings.lang);
73				}
74
75				settings = _parseSettings(settings);
76				self.data('timepicker-settings', settings);
77				self.addClass('ui-timepicker-input');
78
79				if (settings.useSelect) {
80					_render(self);
81				} else {
82					self.prop('autocomplete', 'off');
83					if (settings.showOn) {
84						for (var i in settings.showOn) {
85							self.on(settings.showOn[i]+'.timepicker', methods.show);
86						}
87					}
88					self.on('change.timepicker', _formatValue);
89					self.on('keydown.timepicker', _keydownhandler);
90					self.on('keyup.timepicker', _keyuphandler);
91					if (settings.disableTextInput) {
92						self.on('keydown.timepicker', _disableTextInputHandler);
93					}
94
95					_formatValue.call(self.get(0));
96				}
97			});
98		},
99
100		show: function(e)
101		{
102			var self = $(this);
103			var settings = self.data('timepicker-settings');
104
105			if (e) {
106				e.preventDefault();
107			}
108
109			if (settings.useSelect) {
110				self.data('timepicker-list').focus();
111				return;
112			}
113
114			if (_hideKeyboard(self)) {
115				// block the keyboard on mobile devices
116				self.blur();
117			}
118
119			var list = self.data('timepicker-list');
120
121			// check if input is readonly
122			if (self.prop('readonly')) {
123				return;
124			}
125
126			// check if list needs to be rendered
127			if (!list || list.length === 0 || typeof settings.durationTime === 'function') {
128				_render(self);
129				list = self.data('timepicker-list');
130			}
131
132			if (_isVisible(list)) {
133				return;
134			}
135
136			self.data('ui-timepicker-value', self.val());
137			_setSelected(self, list);
138
139			// make sure other pickers are hidden
140			methods.hide();
141
142			// position the dropdown relative to the input
143			list.show();
144			var listOffset = {};
145
146			if (settings.orientation.match(/r/)) {
147				// right-align the dropdown
148				listOffset.left = self.offset().left + self.outerWidth() - list.outerWidth() + parseInt(list.css('marginLeft').replace('px', ''), 10);
149			} else {
150				// left-align the dropdown
151				listOffset.left = self.offset().left + parseInt(list.css('marginLeft').replace('px', ''), 10);
152			}
153
154			var verticalOrientation;
155			if (settings.orientation.match(/t/)) {
156				verticalOrientation = 't';
157			} else if (settings.orientation.match(/b/)) {
158				verticalOrientation = 'b';
159			} else if ((self.offset().top + self.outerHeight(true) + list.outerHeight()) > $(window).height() + $(window).scrollTop()) {
160				verticalOrientation = 't';
161			} else {
162				verticalOrientation = 'b';
163			}
164
165			if (verticalOrientation == 't') {
166				// position the dropdown on top
167				list.addClass('ui-timepicker-positioned-top');
168				listOffset.top = self.offset().top - list.outerHeight() + parseInt(list.css('marginTop').replace('px', ''), 10);
169			} else {
170				// put it under the input
171				list.removeClass('ui-timepicker-positioned-top');
172				listOffset.top = self.offset().top + self.outerHeight() + parseInt(list.css('marginTop').replace('px', ''), 10);
173			}
174
175			list.offset(listOffset);
176
177			// position scrolling
178			var selected = list.find('.ui-timepicker-selected');
179
180			if (!selected.length) {
181				var timeInt = _time2int(_getTimeValue(self));
182				if (timeInt !== null) {
183					selected = _findRow(self, list, timeInt);
184				} else if (settings.scrollDefault) {
185					selected = _findRow(self, list, settings.scrollDefault());
186				}
187			}
188
189			if (selected && selected.length) {
190				var topOffset = list.scrollTop() + selected.position().top - selected.outerHeight();
191				list.scrollTop(topOffset);
192			} else {
193				list.scrollTop(0);
194			}
195
196			// prevent scroll propagation
197			if(settings.stopScrollPropagation) {
198				$(document).on('wheel.ui-timepicker', '.ui-timepicker-wrapper', function(e){
199					e.preventDefault();
200					var currentScroll = $(this).scrollTop();
201					$(this).scrollTop(currentScroll + e.originalEvent.deltaY);
202				});
203			}
204
205			// attach close handlers
206			$(document).on('touchstart.ui-timepicker mousedown.ui-timepicker', _closeHandler);
207			$(window).on('resize.ui-timepicker', _closeHandler);
208			if (settings.closeOnWindowScroll) {
209				$(document).on('scroll.ui-timepicker', _closeHandler);
210			}
211
212			self.trigger('showTimepicker');
213
214			return this;
215		},
216
217		hide: function(e)
218		{
219			var self = $(this);
220			var settings = self.data('timepicker-settings');
221
222			if (settings && settings.useSelect) {
223				self.blur();
224			}
225
226			$('.ui-timepicker-wrapper').each(function() {
227				var list = $(this);
228				if (!_isVisible(list)) {
229					return;
230				}
231
232				var self = list.data('timepicker-input');
233				var settings = self.data('timepicker-settings');
234
235				if (settings && settings.selectOnBlur) {
236					_selectValue(self);
237				}
238
239				list.hide();
240				self.trigger('hideTimepicker');
241			});
242
243			return this;
244		},
245
246		option: function(key, value)
247		{
248			if (typeof key == 'string' && typeof value == 'undefined') {
249				return $(this).data('timepicker-settings')[key];
250			}
251
252			return this.each(function(){
253				var self = $(this);
254				var settings = self.data('timepicker-settings');
255				var list = self.data('timepicker-list');
256
257				if (typeof key == 'object') {
258					settings = $.extend(settings, key);
259				} else if (typeof key == 'string') {
260					settings[key] = value;
261				}
262
263				settings = _parseSettings(settings);
264
265				self.data('timepicker-settings', settings);
266
267				if (list) {
268					list.remove();
269					self.data('timepicker-list', false);
270				}
271
272				if (settings.useSelect) {
273					_render(self);
274				}
275			});
276		},
277
278		getSecondsFromMidnight: function()
279		{
280			return _time2int(_getTimeValue(this));
281		},
282
283		getTime: function(relative_date)
284		{
285			var self = this;
286
287			var time_string = _getTimeValue(self);
288			if (!time_string) {
289				return null;
290			}
291
292			var offset = _time2int(time_string);
293			if (offset === null) {
294				return null;
295			}
296
297			if (!relative_date) {
298				relative_date = new Date();
299			}
300
301			// construct a Date from relative date, and offset's time
302			var time = new Date(relative_date);
303			time.setHours(offset / 3600);
304			time.setMinutes(offset % 3600 / 60);
305			time.setSeconds(offset % 60);
306			time.setMilliseconds(0);
307
308			return time;
309		},
310
311		isVisible: function() {
312			var self = this;
313			var list = self.data('timepicker-list');
314			return !!(list && _isVisible(list));
315		},
316
317		setTime: function(value)
318		{
319			var self = this;
320			var settings = self.data('timepicker-settings');
321
322			if (settings.forceRoundTime) {
323				var prettyTime = _roundAndFormatTime(_time2int(value), settings)
324			} else {
325				var prettyTime = _int2time(_time2int(value), settings);
326			}
327
328			if (value && prettyTime === null && settings.noneOption) {
329				prettyTime = value;
330			}
331
332			_setTimeValue(self, prettyTime);
333			if (self.data('timepicker-list')) {
334				_setSelected(self, self.data('timepicker-list'));
335			}
336
337			return this;
338		},
339
340		remove: function()
341		{
342			var self = this;
343
344			// check if this element is a timepicker
345			if (!self.hasClass('ui-timepicker-input')) {
346				return;
347			}
348
349			var settings = self.data('timepicker-settings');
350			self.removeAttr('autocomplete', 'off');
351			self.removeClass('ui-timepicker-input');
352			self.removeData('timepicker-settings');
353			self.off('.timepicker');
354
355			// timepicker-list won't be present unless the user has interacted with this timepicker
356			if (self.data('timepicker-list')) {
357				self.data('timepicker-list').remove();
358			}
359
360			if (settings.useSelect) {
361				self.show();
362			}
363
364			self.removeData('timepicker-list');
365
366			return this;
367		}
368	};
369
370	// private methods
371
372	function _isVisible(elem)
373	{
374		var el = elem[0];
375		return el.offsetWidth > 0 && el.offsetHeight > 0;
376	}
377
378	function _parseSettings(settings)
379	{
380		if (settings.minTime) {
381			settings.minTime = _time2int(settings.minTime);
382		}
383
384		if (settings.maxTime) {
385			settings.maxTime = _time2int(settings.maxTime);
386		}
387
388		if (settings.durationTime && typeof settings.durationTime !== 'function') {
389			settings.durationTime = _time2int(settings.durationTime);
390		}
391
392		if (settings.scrollDefault == 'now') {
393			settings.scrollDefault = function() {
394				return settings.roundingFunction(_time2int(new Date()), settings);
395			}
396		} else if (settings.scrollDefault && typeof settings.scrollDefault != 'function') {
397			var val = settings.scrollDefault;
398			settings.scrollDefault = function() {
399				return settings.roundingFunction(_time2int(val), settings);
400			}
401		} else if (settings.minTime) {
402			settings.scrollDefault = function() {
403				return settings.roundingFunction(settings.minTime, settings);
404			}
405		}
406
407		if ($.type(settings.timeFormat) === "string" && settings.timeFormat.match(/[gh]/)) {
408			settings._twelveHourTime = true;
409		}
410
411		if (settings.showOnFocus === false && settings.showOn.indexOf('focus') != -1) {
412			settings.showOn.splice(settings.showOn.indexOf('focus'), 1);
413		}
414
415		if (settings.disableTimeRanges.length > 0) {
416			// convert string times to integers
417			for (var i in settings.disableTimeRanges) {
418				settings.disableTimeRanges[i] = [
419					_time2int(settings.disableTimeRanges[i][0]),
420					_time2int(settings.disableTimeRanges[i][1])
421				];
422			}
423
424			// sort by starting time
425			settings.disableTimeRanges = settings.disableTimeRanges.sort(function(a, b){
426				return a[0] - b[0];
427			});
428
429			// merge any overlapping ranges
430			for (var i = settings.disableTimeRanges.length-1; i > 0; i--) {
431				if (settings.disableTimeRanges[i][0] <= settings.disableTimeRanges[i-1][1]) {
432					settings.disableTimeRanges[i-1] = [
433						Math.min(settings.disableTimeRanges[i][0], settings.disableTimeRanges[i-1][0]),
434						Math.max(settings.disableTimeRanges[i][1], settings.disableTimeRanges[i-1][1])
435					];
436					settings.disableTimeRanges.splice(i, 1);
437				}
438			}
439		}
440
441		return settings;
442	}
443
444	function _render(self)
445	{
446		var settings = self.data('timepicker-settings');
447		var list = self.data('timepicker-list');
448
449		if (list && list.length) {
450			list.remove();
451			self.data('timepicker-list', false);
452		}
453
454		if (settings.useSelect) {
455			list = $('<select />', { 'class': 'ui-timepicker-select' });
456			var wrapped_list = list;
457		} else {
458			list = $('<ul />', { 'class': 'ui-timepicker-list' });
459
460			var wrapped_list = $('<div />', { 'class': 'ui-timepicker-wrapper', 'tabindex': -1 });
461			wrapped_list.css({'display':'none', 'position': 'absolute' }).append(list);
462		}
463
464		if (settings.noneOption) {
465			if (settings.noneOption === true) {
466				settings.noneOption = (settings.useSelect) ? 'Time...' : 'None';
467			}
468
469			if ($.isArray(settings.noneOption)) {
470				for (var i in settings.noneOption) {
471					if (parseInt(i, 10) == i){
472						var noneElement = _generateNoneElement(settings.noneOption[i], settings.useSelect);
473						list.append(noneElement);
474					}
475				}
476			} else {
477				var noneElement = _generateNoneElement(settings.noneOption, settings.useSelect);
478				list.append(noneElement);
479			}
480		}
481
482		if (settings.className) {
483			wrapped_list.addClass(settings.className);
484		}
485
486		if ((settings.minTime !== null || settings.durationTime !== null) && settings.showDuration) {
487			var stepval = typeof settings.step == 'function' ? 'function' : settings.step;
488			wrapped_list.addClass('ui-timepicker-with-duration');
489			wrapped_list.addClass('ui-timepicker-step-'+settings.step);
490		}
491
492		var durStart = settings.minTime;
493		if (typeof settings.durationTime === 'function') {
494			durStart = _time2int(settings.durationTime());
495		} else if (settings.durationTime !== null) {
496			durStart = settings.durationTime;
497		}
498		var start = (settings.minTime !== null) ? settings.minTime : 0;
499		var end = (settings.maxTime !== null) ? settings.maxTime : (start + _ONE_DAY - 1);
500
501		if (end < start) {
502			// make sure the end time is greater than start time, otherwise there will be no list to show
503			end += _ONE_DAY;
504		}
505
506		if (end === _ONE_DAY-1 && $.type(settings.timeFormat) === "string" && settings.show2400) {
507			// show a 24:00 option when using military time
508			end = _ONE_DAY;
509		}
510
511		var dr = settings.disableTimeRanges;
512		var drCur = 0;
513		var drLen = dr.length;
514
515		var stepFunc = settings.step;
516		if (typeof stepFunc != 'function') {
517			stepFunc = function() {
518				return settings.step;
519			}
520		}
521
522		for (var i=start, j=0; i <= end; j++, i += stepFunc(j)*60) {
523			var timeInt = i;
524			var timeString = _int2time(timeInt, settings);
525
526			if (settings.useSelect) {
527				var row = $('<option />', { 'value': timeString });
528				row.text(timeString);
529			} else {
530				var row = $('<li />');
531				row.addClass(timeInt % 86400 < 43200 ? 'ui-timepicker-am' : 'ui-timepicker-pm');
532				row.data('time', (timeInt <= 86400 ? timeInt : timeInt % 86400));
533				row.text(timeString);
534			}
535
536			if ((settings.minTime !== null || settings.durationTime !== null) && settings.showDuration) {
537				var durationString = _int2duration(i - durStart, settings.step);
538				if (settings.useSelect) {
539					row.text(row.text()+' ('+durationString+')');
540				} else {
541					var duration = $('<span />', { 'class': 'ui-timepicker-duration' });
542					duration.text(' ('+durationString+')');
543					row.append(duration);
544				}
545			}
546
547			if (drCur < drLen) {
548				if (timeInt >= dr[drCur][1]) {
549					drCur += 1;
550				}
551
552				if (dr[drCur] && timeInt >= dr[drCur][0] && timeInt < dr[drCur][1]) {
553					if (settings.useSelect) {
554						row.prop('disabled', true);
555					} else {
556						row.addClass('ui-timepicker-disabled');
557					}
558				}
559			}
560
561			list.append(row);
562		}
563
564		wrapped_list.data('timepicker-input', self);
565		self.data('timepicker-list', wrapped_list);
566
567		if (settings.useSelect) {
568			if (self.val()) {
569				list.val(_roundAndFormatTime(_time2int(self.val()), settings));
570			}
571
572			list.on('focus', function(){
573				$(this).data('timepicker-input').trigger('showTimepicker');
574			});
575			list.on('blur', function(){
576				$(this).data('timepicker-input').trigger('hideTimepicker');
577			});
578			list.on('change', function(){
579				_setTimeValue(self, $(this).val(), 'select');
580			});
581
582			_setTimeValue(self, list.val(), 'initial');
583			self.hide().after(list);
584		} else {
585			var appendTo = settings.appendTo;
586			if (typeof appendTo === 'string') {
587				appendTo = $(appendTo);
588			} else if (typeof appendTo === 'function') {
589				appendTo = appendTo(self);
590			}
591			appendTo.append(wrapped_list);
592			_setSelected(self, list);
593
594			list.on('mousedown click', 'li', function(e) {
595
596				// hack: temporarily disable the focus handler
597				// to deal with the fact that IE fires 'focus'
598				// events asynchronously
599				self.off('focus.timepicker');
600				self.on('focus.timepicker-ie-hack', function(){
601					self.off('focus.timepicker-ie-hack');
602					self.on('focus.timepicker', methods.show);
603				});
604
605				if (!_hideKeyboard(self)) {
606					self[0].focus();
607				}
608
609				// make sure only the clicked row is selected
610				list.find('li').removeClass('ui-timepicker-selected');
611				$(this).addClass('ui-timepicker-selected');
612
613				if (_selectValue(self)) {
614					self.trigger('hideTimepicker');
615
616					list.on('mouseup.timepicker click.timepicker', 'li', function(e) {
617						list.off('mouseup.timepicker click.timepicker');
618						wrapped_list.hide();
619					});
620				}
621			});
622		}
623	}
624
625	function _generateNoneElement(optionValue, useSelect)
626	{
627		var label, className, value;
628
629		if (typeof optionValue == 'object') {
630			label = optionValue.label;
631			className = optionValue.className;
632			value = optionValue.value;
633		} else if (typeof optionValue == 'string') {
634			label = optionValue;
635		} else {
636			$.error('Invalid noneOption value');
637		}
638
639		if (useSelect) {
640			return $('<option />', {
641					'value': value,
642					'class': className,
643					'text': label
644				});
645		} else {
646			return $('<li />', {
647					'class': className,
648					'text': label
649				}
649).data('time', String(value));
650		}
651	}
652
653	function _roundAndFormatTime(seconds, settings)
654	{
655		seconds = settings.roundingFunction(seconds, settings);
656		if (seconds !== null) {
657			return _int2time(seconds, settings);
658		}
659	}
660
661	// event handler to decide whether to close timepicker
662	function _closeHandler(e)
663	{
664		if (e.target == window) {
665			// mobile Chrome fires focus events against window for some reason
666			return;
667		}
668
669		var target = $(e.target);
670
671		if (target.closest('.ui-timepicker-input').length || target.closest('.ui-timepicker-wrapper').length) {
672			// active timepicker was focused. ignore
673			return;
674		}
675
676		methods.hide();
677		$(document).unbind('.ui-timepicker');
678		$(window).unbind('.ui-timepicker');
679	}
680
681	function _hideKeyboard(self)
682	{
683		var settings = self.data('timepicker-settings');
684		return ((window.navigator.msMaxTouchPoints || 'ontouchstart' in document) && settings.disableTouchKeyboard);
685	}
686
687	function _findRow(self, list, value)
688	{
689		if (!value && value !== 0) {
690			return false;
691		}
692
693		var settings = self.data('timepicker-settings');
694		var out = false;
695		var value = settings.roundingFunction(value, settings);
696
697		// loop through the menu items
698		list.find('li').each(function(i, obj) {
699			var jObj = $(obj);
700			if (typeof jObj.data('time') != 'number') {
701				return;
702			}
703
704			if (jObj.data('time') == value) {
705				out = jObj;
706				return false;
707			}
708		});
709
710		return out;
711	}
712
713	function _setSelected(self, list)
714	{
715		list.find('li').removeClass('ui-timepicker-selected');
716
717		var timeValue = _time2int(_getTimeValue(self), self.data('timepicker-settings'));
718		if (timeValue === null) {
719			return;
720		}
721
722		var selected = _findRow(self, list, timeValue);
723		if (selected) {
724
725			var topDelta = selected.offset().top - list.offset().top;
726
727			if (topDelta + selected.outerHeight() > list.outerHeight() || topDelta < 0) {
728				list.scrollTop(list.scrollTop() + selected.position().top - selected.outerHeight());
729			}
730
731			selected.addClass('ui-timepicker-selected');
732		}
733	}
734
735
736	function _formatValue(e, origin)
737	{
738		if (this.value === '' || origin == 'timepicker') {
739			return;
740		}
741
742		var self = $(this);
743
744		if (self.is(':focus') && (!e || e.type != 'change')) {
745			return;
746		}
747
748		var settings = self.data('timepicker-settings');
749		var seconds = _time2int(this.value, settings);
750
751		if (seconds === null) {
752			self.trigger('timeFormatError');
753			return;
754		}
755
756		var rangeError = false;
757		// check that the time in within bounds
758		if ((settings.minTime !== null && settings.maxTime !== null)
759			&& (seconds < settings.minTime || seconds > settings.maxTime)) {
760			rangeError = true;
761		}
762
763		// check that time isn't within disabled time ranges
764		$.each(settings.disableTimeRanges, function(){
765			if (seconds >= this[0] && seconds < this[1]) {
766				rangeError = true;
767				return false;
768			}
769		});
770
771		if (settings.forceRoundTime) {
772			seconds = settings.roundingFunction(seconds, settings);
773		}
774
775		var prettyTime = _int2time(seconds, settings);
776
777		if (rangeError) {
778			if (_setTimeValue(self, prettyTime, 'error')) {
779				self.trigger('timeRangeError');
780			}
781		} else {
782			_setTimeValue(self, prettyTime);
783		}
784	}
785
786	function _getTimeValue(self)
787	{
788		if (self.is('input')) {
789			return self.val();
790		} else {
791			// use the element's data attributes to store values
792			return self.data('ui-timepicker-value');
793		}
794	}
795
796	function _setTimeValue(self, value, source)
797	{
798		if (self.is('input')) {
799			self.val(value);
800
801			var settings = self.data('timepicker-settings');
802			if (settings.useSelect && source != 'select' && source != 'initial') {
803				self.data('timepicker-list').val(_roundAndFormatTime(_time2int(value), settings));
804			}
805		}
806
807		if (self.data('ui-timepicker-value') != value) {
808			self.data('ui-timepicker-value', value);
809			if (source == 'select') {
810				self.trigger('selectTime').trigger('changeTime').trigger('change', 'timepicker');
811			} else if (source != 'error') {
812				self.trigger('changeTime');
813			}
814
815			return true;
816		} else {
817			self.trigger('selectTime');
818			return false;
819		}
820	}
821
822	/*
823	*  Filter freeform input
824	*/
825	function _disableTextInputHandler(e)
826	{
827		switch (e.keyCode) {
828			case 13: // return
829			case 9: //tab
830				return;
831
832			default:
833				e.preventDefault();
834		}
835	}
836
837	/*
838	*  Keyboard navigation via arrow keys
839	*/
840	function _keydownhandler(e)
841	{
842		var self = $(this);
843		var list = self.data('timepicker-list');
844
845		if (!list || !_isVisible(list)) {
846			if (e.keyCode == 40) {
847				// show the list!
848				methods.show.call(self.get(0));
849				list = self.data('timepicker-list');
850				if (!_hideKeyboard(self)) {
851					self.focus();
852				}
853			} else {
854				return true;
855			}
856		}
857
858		switch (e.keyCode) {
859
860			case 13: // return
861				if (_selectValue(self)) {
862					_formatValue.call(self.get(0), {'type':'change'});
863					methods.hide.apply(this);
864				}
865
866				e.preventDefault();
867				return false;
868
869			case 38: // up
870				var selected = list.find('.ui-timepicker-selected');
871
872				if (!selected.length) {
873					list.find('li').each(function(i, obj) {
874						if ($(obj).position().top > 0) {
875							selected = $(obj);
876							return false;
877						}
878					});
879					selected.addClass('ui-timepicker-selected');
880
881				} else if (!selected.is(':first-child')) {
882					selected.removeClass('ui-timepicker-selected');
883					selected.prev().addClass('ui-timepicker-selected');
884
885					if (selected.prev().position().top < selected.outerHeight()) {
886						list.scrollTop(list.scrollTop() - selected.outerHeight());
887					}
888				}
889
890				return false;
891
892			case 40: // down
893				selected = list.find('.ui-timepicker-selected');
894
895				if (selected.length === 0) {
896					list.find('li').each(function(i, obj) {
897						if ($(obj).position().top > 0) {
898							selected = $(obj);
899							return false;
900						}
901					});
902
903					selected.addClass('ui-timepicker-selected');
904				} else if (!selected.is(':last-child')) {
905					selected.removeClass('ui-timepicker-selected');
906					selected.next().addClass('ui-timepicker-selected');
907
908					if (selected.next().position().top + 2*selected.outerHeight() > list.outerHeight()) {
909						list.scrollTop(list.scrollTop() + selected.outerHeight());
910					}
911				}
912
913				return false;
914
915			case 27: // escape
916				list.find('li').removeClass('ui-timepicker-selected');
917				methods.hide();
918				break;
919
920			case 9: //tab
921				methods.hide();
922				break;
923
924			default:
925				return true;
926		}
927	}
928
929	/*
930	*	Time typeahead
931	*/
932	function _keyuphandler(e)
933	{
934		var self = $(this);
935		var list = self.data('timepicker-list');
936		var settings = self.data('timepicker-settings');
937
938		if (!list || !_isVisible(list) || settings.disableTextInput) {
939			return true;
940		}
941
942		switch (e.keyCode) {
943
944			case 96: // numpad numerals
945			case 97:
946			case 98:
947			case 99:
948			case 100:
949			case 101:
950			case 102:
951			case 103:
952			case 104:
953			case 105:
954			case 48: // numerals
955			case 49:
956			case 50:
957			case 51:
958			case 52:
959			case 53:
960			case 54:
961			case 55:
962			case 56:
963			case 57:
964			case 65: // a
965			case 77: // m
966			case 80: // p
967			case 186: // colon
968			case 8: // backspace
969			case 46: // delete
970				if (settings.typeaheadHighlight) {
971					_setSelected(self, list);
972				} else {
973					list.hide();
974				}
975				break;
976		}
977	}
978
979	function _selectValue(self)
980	{
981		var settings = self.data('timepicker-settings');
982		var list = self.data('timepicker-list');
983		var timeValue = null;
984
985		var cursor = list.find('.ui-timepicker-selected');
986
987		if (cursor.hasClass('ui-timepicker-disabled')) {
988			return false;
989		}
990
991		if (cursor.length) {
992			// selected value found
993			timeValue = cursor.data('time');
994		}
995
996		if (timeValue !== null) {
997			if (typeof timeValue != 'string') {
998				timeValue = _int2time(timeValue, settings);
999			}
1000
1001			_setTimeValue(self, timeValue, 'select');
1002		}
1003
1004		return true;
1005	}
1006
1007	function _int2duration(seconds, step)
1008	{
1009		seconds = Math.abs(seconds);
1010		var minutes = Math.round(seconds/60),
1011			duration = [],
1012			hours, mins;
1013
1014		if (minutes < 60) {
1015			// Only show (x mins) under 1 hour
1016			duration = [minutes, _lang.mins];
1017		} else {
1018			hours = Math.floor(minutes/60);
1019			mins = minutes%60;
1020
1021			// Show decimal notation (eg: 1.5 hrs) for 30 minute steps
1022			if (step == 30 && mins == 30) {
1023				hours += _lang.decimal + 5;
1024			}
1025
1026			duration.push(hours);
1027			duration.push(hours == 1 ? _lang.hr : _lang.hrs);
1028
1029			// Show remainder minutes notation (eg: 1 hr 15 mins) for non-30 minute steps
1030			// and only if there are remainder minutes to show
1031			if (step != 30 && mins) {
1032				duration.push(mins);
1033				duration.push(_lang.mins);
1034			}
1035		}
1036
1037		return duration.join(' ');
1038	}
1039
1040	function _int2time(timeInt, settings)
1041	{
1042		if (typeof timeInt != 'number') {
1043			return null;
1044		}
1045
1046		var seconds = parseInt(timeInt%60)
1047			, minutes = parseInt((timeInt/60)%60)
1048			, hours = parseInt((timeInt/(60*60))%24);
1049
1050		var time = new Date(1970, 0, 2, hours, minutes, seconds, 0);
1051
1052		if (isNaN(time.getTime())) {
1053			return null;
1054		}
1055
1056		if ($.type(settings.timeFormat) === "function") {
1057			return settings.timeFormat(time);
1058		}
1059
1060		var output = '';
1061		var hour, code;
1062		for (var i=0; i<settings.timeFormat.length; i++) {
1063
1064			code = settings.timeFormat.charAt(i);
1065			switch (code) {
1066
1067				case 'a':
1068					output += (time.getHours() > 11) ? _lang.pm : _lang.am;
1069					break;
1070
1071				case 'A':
1072					output += (time.getHours() > 11) ? _lang.PM : _lang.AM;
1073					break;
1074
1075				case 'g':
1076					hour = time.getHours() % 12;
1077					output += (hour === 0) ? '12' : hour;
1078					break;
1079
1080				case 'G':
1081					hour = time.getHours();
1082					if (timeInt === _ONE_DAY) hour = settings.show2400 ? 24 : 0;
1083					output += hour;
1084					break;
1085
1086				case 'h':
1087					hour = time.getHours() % 12;
1088
1089					if (hour !== 0 && hour < 10) {
1090						hour = '0'+hour;
1091					}
1092
1093					output += (hour === 0) ? '12' : hour;
1094					break;
1095
1096				case 'H':
1097					hour = time.getHours();
1098					if (timeInt === _ONE_DAY) hour = settings.show2400 ? 24 : 0;
1099					output += (hour > 9) ? hour : '0'+hour;
1100					break;
1101
1102				case 'i':
1103					var minutes = time.getMinutes();
1104					output += (minutes > 9) ? minutes : '0'+minutes;
1105					break;
1106
1107				case 's':
1108					seconds = time.getSeconds();
1109					output += (seconds > 9) ? seconds : '0'+seconds;
1110					break;
1111
1112				case '\\':
1113					// escape character; add the next character and skip ahead
1114					i++;
1115					output += settings.timeFormat.charAt(i);
1116					break;
1117
1118				default:
1119					output += code;
1120			}
1121		}
1122
1123		return output;
1124	}
1125
1126	function _time2int(timeString, settings)
1127	{
1128		if (timeString === '' || timeString === null) return null;
1129		if (typeof timeString == 'object') {
1130			return timeString.getHours()*3600 + timeString.getMinutes()*60 + timeString.getSeconds();
1131		}
1132		if (typeof timeString != 'string') {
1133			return timeString;
1134		}
1135
1136		timeString = timeString.toLowerCase().replace(/[\s\.]/g, '');
1137
1138		// if the last character is an "a" or "p", add the "m"
1139		if (timeString.slice(-1) == 'a' || timeString.slice(-1) == 'p') {
1140			timeString += 'm';
1141		}
1142
1143		var ampmRegex = '(' +
1144			_lang.am.replace('.', '')+'|' +
1145			_lang.pm.replace('.', '')+'|' +
1146			_lang.AM.replace('.', '')+'|' +
1147			_lang.PM.replace('.', '')+')?';
1148
1149		// try to parse time input
1150		var pattern = new RegExp('^'+ampmRegex+'([0-9]?[0-9])\\W?([0-5][0-9])?\\W?([0-5][0-9])?'+ampmRegex+'$');
1151
1152		var time = timeString.match(pattern);
1153		if (!time) {
1154			return null;
1155		}
1156
1157		var hour = parseInt(time[2]*1, 10);
1158		if (hour > 24) {
1159			if (settings && settings.wrapHours === false) {
1160				return null;
1161			} else {
1162				hour = hour % 24;
1163			}
1164		}
1165
1166		var ampm = time[1] || time[5];
1167		var hours = hour;
1168
1169		if (hour <= 12 && ampm) {
1170			var isPm = (ampm == _lang.pm || ampm == _lang.PM);
1171
1172			if (hour == 12) {
1173				hours = isPm ? 12 : 0;
1174			} else {
1175				hours = (hour + (isPm ? 12 : 0));
1176			}
1177		}
1178
1179		var minutes = ( time[3]*1 || 0 );
1180		var seconds = ( time[4]*1 || 0 );
1181		var timeInt = hours*3600 + minutes*60 + seconds;
1182
1183		// if no am/pm provided, intelligently guess based on the scrollDefault
1184		if (hour < 12 && !ampm && settings && settings._twelveHourTime && settings.scrollDefault) {
1185			var delta = timeInt - settings.scrollDefault();
1186			if (delta < 0 && delta >= _ONE_DAY / -2) {
1187				timeInt = (timeInt + (_ONE_DAY / 2)) % _ONE_DAY;
1188			}
1189		}
1190
1191		return timeInt;
1192	}
1193
1194	function _pad2(n) {
1195		return ("0" + n).slice(-2);
1196	}
1197
1198	// Plugin entry
1199	$.fn.timepicker = function(method)
1200	{
1201		if (!this.length) return this;
1202		if (methods[method]) {
1203			// check if this element is a timepicker
1204			if (!this.hasClass('ui-timepicker-input')) {
1205				return this;
1206			}
1207			return methods[method].apply(this, Array.prototype.slice.call(arguments, 1));
1208		}
1209		else if(typeof method === "object" || !method) { return methods.init.apply(this, arguments); }
1210		else { $.error("Method "+ method + " does not exist on jQuery.timepicker"); }
1211	};
1212	// Global defaults
1213	$.fn.timepicker.defaults = {
1214		appendTo: 'body',
1215		className: null,
1216		closeOnWindowScroll: false,
1217		disableTextInput: false,
1218		disableTimeRanges: [],
1219		disableTouchKeyboard: false,
1220		durationTime: null,
1221		forceRoundTime: false,
1222		maxTime: null,
1223		minTime: null,
1224		noneOption: false,
1225		orientation: 'l',
1226		roundingFunction: function(seconds, settings) {
1227			if (seconds === null) {
1228				return null;
1229			} else if (typeof settings.step !== "number") {
1230				// TODO: nearest fit irregular steps
1231				return seconds;
1232			} else {
1233				var offset = seconds % (settings.step*60); // step is in minutes
1234
1235				if (offset >= settings.step*30) {
1236					// if offset is larger than a half step, round up
1237					seconds += (settings.step*60) - offset;
1238				} else {
1239					// round down
1240					seconds -= offset;
1241				}
1242
1243				if (seconds == _ONE_DAY && settings.show2400) {
1244					return seconds;
1245				}
1246
1247				return seconds%_ONE_DAY;
1248			}
1249		},
1250		scrollDefault: null,
1251		selectOnBlur: false,
1252		show2400: false,
1253		showDuration: false,
1254		showOn: ['click', 'focus'],
1255		showOnFocus: true,
1256		step: 30,
1257		stopScrollPropagation: false,
1258		timeFormat: 'g:ia',
1259		typeaheadHighlight: true,
1260		useSelect: false,
1261		wrapHours: true
1262	};
1263}));
1264/*              
1265 * ChartNew.js  
1266 *                                                                                                                                          
1267 * Vancoppenolle Francois - January 2014                                                                               
1268 * [email protected]                                     
1269 *                                                                        
1270 * GitHub community : https://github.com/FVANCOP/ChartNew.js
1271 *
1272 * This file is originally an adaptation of the chart.js source developped by Nick Downie (2013)
1273 * https://github.com/nnnick/Chart.js. But since june 2014, Nick puts a new version with a
1274 * refunded code. Current code of ChartNew.js is no more comparable to the code of Chart.js 
1275 *
1276 * new charts compared to Chart.js
1277 *
1278 *     horizontalBar
1279 *     horizontalStackedBar
1280 *
1281 * Added items compared to Chart.js:
1282 *
1283 *     Title, Subtitle, footnotes, axis labels, unit label
1284 *     Y Axis on the right and/or the left                                                                                     
1285 *     canvas Border
1286 *     Legend
1287 *     crossText, crossImage
1288 *     graphMin, graphMax
1289 *     logarithmic y-axis (for line and bar)
1290 *     rotateLabels
1291 *     and lot of others...
1292 *
1293 */
1294
1295// ctx.firstPass=0 or "undefined" : Chart has never been drawn (because dynamicDisplay = true and ctx has never been displayed in current screen)
1296// ctx.firstPass=1 : Chart has to be drawn with animation (if config.animation = true);
1297// ctx.firstPass=2 : chart has to be drawn without animation;
1298// ctx.firstPass=9 : chart is completely drawn;
1299// If chartJsResize called : increment the value of ctx.firstPass with a value of 10.
1300
1301
1302// non standard functions;
1303var annotate_shape='divCursor'
1304var chartJSLineStyle=[];
1305chartJSLineStyle["solid"]=[];
1306chartJSLineStyle["dotted"]=[1,4];
1307chartJSLineStyle["shortDash"]=[2,1];
1308chartJSLineStyle["dashed"]=[4,2];
1309chartJSLineStyle["dashSpace"]=[4,6];
1310chartJSLineStyle["longDashDot"]=[7,2,1,2];
1311chartJSLineStyle["longDashShortDash"]=[10,4,4,4];
1312chartJSLineStyle["gradient"]=[1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,9,9,8,8,7,7,6,6,5,5,4,4,3,3,2,2,1];
1313
1314function lineStyleFn(data)
1315{
1316if ((typeof chartJSLineStyle[data]) === "object")return chartJSLineStyle[data];
1317else return chartJSLineStyle["solid"];
1318};
1319
1320if (typeof String.prototype.trim !== 'function') {
1321	String.prototype.trim = function() {
1322		return this.replace(/^\s+|\s+$/g, '');
1323	}
1324};
1325if (!Array.prototype.indexOf) {
1326	Array.prototype.indexOf = function(searchElement /*, fromIndex */ ) {
1327		"use strict";
1328		if (this == null) {
1329			throw new TypeError();
1330		}
1331		var t = Object(this);
1332		var len = t.length >>> 0;
1333		if (len === 0) {
1334			return -1;
1335		}
1336		var n = 0;
1337		if (arguments.length > 0) {
1338			n = Number(arguments[1]);
1339			if (n != n) { // shortcut for verifying if it's NaN
1340				n = 0;
1341			} else if (n != 0 && n != Infinity && n != -Infinity) {
1342				n = (n > 0 || -1) * Math.floor(Math.abs(n));
1343			}
1344		}
1345		if (n >= len) {
1346			return -1;
1347		}
1348		var k = n >= 0 ? n : Math.max(len - Math.abs(n), 0);
1349		for (; k < len; k++) {
1350			if (k in t && t[k] === searchElement) {
1351				return k;
1352			}
1353		}
1354		return -1;
1355	}
1356};
1357var charJSPersonalDefaultOptions = {};
1358var charJSPersonalDefaultOptionsLine = {} ;
1359var charJSPersonalDefaultOptionsRadar = {} ;
1360var charJSPersonalDefaultOptionsPolarArea = {} ;
1361var charJSPersonalDefaultOptionsPie = {};
1362var charJSPersonalDefaultOptionsDoughnut = {};
1363var charJSPersonalDefaultOptionsBar = {};
1364var charJSPersonalDefaultOptionsStackedBar = {};
1365var charJSPersonalDefaultOptionsHorizontalBar = {};
1366var charJSPersonalDefaultOptionsHorizontalStackedBar = {};
1367	///////// FUNCTIONS THAN CAN BE USED IN THE TEMPLATES ///////////////////////////////////////////
1368
1369function roundToWithThousands(config, num, place) {
1370	var newval = 1 * unFormat(config, num);
1371	if (typeof(newval) == "number" && place != "none") {
1372		var roundVal;
1373		if (place <= 0) {
1374			roundVal = -place;
1375			newval = +(Math.round(newval + "e+" + roundVal) + "e-" + roundVal);
1376		} else {
1377			roundVal = place;
1378			var divval = "1e+" + roundVal;
1379			newval = +(Math.round(newval / divval)) * divval;
1380		}
1381	}
1382	newval = fmtChartJS(config, newval, "none");
1383	return (newval);
1384};
1385
1386function unFormat(config, num) {
1387	if ((config.decimalSeparator != "." || config.thousandSeparator != "") && typeof(num) == "string") {
1388		var v1 = "" + num;
1389		if (config.thousandSeparator != "") {
1390			while (v1.indexOf(config.thousandSeparator) >= 0) v1 = "" + v1.replace(config.thousandSeparator, "");
1391		}
1392		if (config.decimalSeparator != ".") v1 = "" + v1.replace(config.decimalSeparator, ".")
1393		return 1 * v1;
1394	} else {
1395		return num;
1396	}
1397};
1398///////// ANNOTATE PART OF THE SCRIPT ///////////////////////////////////////////
1399/********************************************************************************
1400Copyright (C) 1999 Thomas Brattli
1401This script is made by and copyrighted to Thomas Brattli
1402Visit for more great scripts. This may be used freely as long as this msg is intact!
1403I will also appriciate any links you could give me.
1404Distributed by Hypergurl
1405********************************************************************************/
1406var cachebis = {};
1407
1408function fmtChartJSPerso(config, value, fmt) {
1409	switch (fmt) {
1410		case "SampleJS_Format":
1411			if (typeof(value) == "number") return_value = "My Format : " + value.toString() + " $";
1412			else return_value = value + "XX";
1413			break;
1414		case "Change_Month":
1415			if (typeof(value) == "string") return_value = value.toString() + " 2014";
1416			else return_value = value.toString() + "YY";
1417			break;
1418		default:
1419			return_value = value;
1420			break;
1421	}
1422	return (return_value);
1423};
1424
1425function fmtChartJS(config, value, fmt) {
1426	var return_value;
1427	if (fmt == "notformatted") {
1428		return_value = value;
1429	} else if ((fmt == "none" || fmt=="money") && typeof(value) == "number") {
1430		if (config.roundNumber != "none") {
1431			var roundVal;
1432			if (config.roundNumber <= 0) {
1433				roundVal = -config.roundNumber;
1434				value = +(Math.round(value + "e+" + roundVal) + "e-" + roundVal);
1435			} else {
1436				roundVal = config.roundNumber;
1437				var divval = "1e+" + roundVal;
1438				value = +(Math.round(value / divval)) * divval;
1439			}
1440		}
1441		if (config.decimalSeparator != "." || config.thousandSeparator != "") {
1442			return_value = value.toString().replace(/\./g, config.decimalSeparator);
1443			if (config.thousandSeparator != "") {
1444				var part1 = return_value;
1445				var part2 = "";
1446				var posdec = part1.indexOf(config.decimalSeparator);
1447				if (posdec >= 0) {
1448					part2 = part1.substring(posdec + 1, part1.length);
1449					part2 = part2.split('').reverse().join(''); // reverse string
1450					part1 = part1.substring(0, posdec);
1451				}
1452				part1 = part1.toString().replace(/\B(?=(\d{3})+(?!\d))/g, config.thousandSeparator);
1453				part2 = part2.split('').reverse().join(''); // reverse string
1454				return_value = part1
1455				if (part2 != "") return_value = return_value + config.decimalSeparator + part2;
1456			}
1457		} else return_value = value;
1458		if(fmt=="money") {
1459			if(config.currencyPosition=="before")return_value=config.currency+return_value;
1460			else return_value=return_value+config.currency;
1461		}
1462	} else if (fmt != "none" && fmt != "notformatted") {
1463		return_value = fmtChartJSPerso(config, value, fmt);
1464	} else {
1465		return_value = value;
1466	}
1467	return (return_value);
1468};
1469
1470function addParameters2Function(data, fctName, fctList) {
1471	var mathFunctions = {
1472		mean: {
1473			data: data.data,
1474			datasetNr: data.v11
1475		},
1476		varianz: {
1477			data: data.data,
1478			datasetNr: data.v11
1479		},
1480		stddev: {
1481			data: data.data,
1482			datasetNr: data.v11
1483		},
1484		cv: {
1485			data: data.data,
1486			datasetNr: data.v11
1487		},
1488		median: {
1489			data: data.data,
1490			datasetNr: data.v11
1491		}
1492	};
1493	// difference to current value (v3)
1494	dif = false;
1495	if (fctName.substr(-3) == "Dif") {
1496		fctName = fctName.substr(0, fctName.length - 3);
1497		dif = true;
1498	}
1499	if (typeof eval(fctName) == "function") {
1500		var parameter = eval(fctList + "." + fctName);
1501		if (dif) {
1502			// difference between v3 (current value) and math function
1503			return data.v3 - window[fctName](parameter);
1504		}
1505		return window[fctName](parameter);
1506	}
1507	return null;
1508};
1509
1510function isNumber(n) {
1511	return !isNaN(parseFloat(n)) && isFinite(n);
1512};
1513
1514function tmplbis(str, data,config) {
1515	newstr=str;
1516	if(newstr.substr(0,config.templatesOpenTag.length)==config.templatesOpenTag)newstr="<%="+newstr.substr(config.templatesOpenTag.length,newstr.length-config.templatesOpenTag.length);
1517	if(newstr.substr(newstr.length-config.templatesCloseTag.length,config.templatesCloseTag.length)==config.templatesCloseTag)newstr=newstr.substr(0,newstr.length-config.templatesCloseTag.length)+"%>";
1518	return tmplter(newstr,data);
1519}
1520
1521function tmplter(str, data) {
1522	var mathFunctionList = ["mean", "varianz", "stddev", "cv", "median"];
1523	var regexMath = new RegExp('<%=((?:(?:.*?)\\W)??)((?:' + mathFunctionList.join('|') + ')(?:Dif)?)\\(([0-9]*?)\\)(.*?)%>', 'g');
1524	while (regexMath.test(str)) {
1525		str = str.replace(regexMath, function($0, $1, $2, $3, $4) {
1526			var rndFac;
1527			if ($3) rndFac = $3;
1528			else rndFac = 2;
1529			var value = addParameters2Function(data, $2, "mathFunctions");
1530			if (isNumber(value)) 
1531				return '<%=' + $1 + '' + Math.round(Math.pow(10, rndFac) * value) / Math.pow(10, rndFac) + '' + $4 + '%>';
1532			return '<%= %>';
1533		});
1534	}
1535	// Figure out if we're getting a template, or if we need to
1536	// load the template - and be sure to cache the result.
1537	// first check if it's can be an id
1538	var fn = /^[A-Za-z][-A-Za-z0-9_:.]*$/.test(str) ? cachebis[str] = cachebis[str] ||
1539		tmplter(document.getElementById(str).innerHTML) :
1540		// Generate a reusable function that will serve as a template
1541		// generator (and which will be cached).
1542		new Function("obj",
1543			"var p=[],print=function(){p.push.apply(p,arguments);};" +
1544			// Introduce the data as local variables using with(){}
1545			"with(obj){p.push('" +
1546			// Convert the template into pure JavaScript
1547			str
1548			.replace(/[\r\n]/g, "\\n")
1549			.replace(/[\t]/g, " ")
1550			.split("<%").join("\t")
1551			.replace(/((^|%>)[^\t]*)'/g, "$1\r")
1552			.replace(/\t=(.*?)%>/g, "',$1,'")
1553			.split("\t").join("');")
1554			.split("%>").join("p.push('")
1555			.split("\r").join("\\'") + "');}return p.join('');");
1556	// Provide some basic currying to the user
1557	return data ? fn(data) : fn;
1558};
1559if (typeof CanvasRenderingContext2D !== 'undefined') {
1560	/**
1561	 * ctx.prototype
1562	 * fillText option for canvas Multiline Support
1563	 * @param text string \n for newline
1564	 * @param x x position
1565	 * @param y y position
1566	 * @param yLevel = "bottom" => last line has this y-Pos [default], = "middle" => the middle line has this y-Pos)
1567	 * @param lineHeight lineHeight
1568	 * @param horizontal horizontal
1569	 */
1570	CanvasRenderingContext2D.prototype.fillTextMultiLine = function(text, x, y, yLevel, lineHeight,horizontal,detectMouseOnText,ctx,idText,rotate,x_decal,y_decal,posi,posj) {
1571		var lines = ("" + text).split("\n");
1572		// if its one line => in the middle 
1573		// two lines one above the mid one below etc.	
1574		if (yLevel == "middle") {
1575			if(horizontal)y -= ((lines.length - 1) / 2) * lineHeight;
1576		} else if (yLevel == "bottom") { // default
1577			if(horizontal)y -= (lines.length - 1) * lineHeight;
1578		}
1579
1580		var y_pos=y-lineHeight;
1581
1582		for (var i = 0; i < lines.length; i++) {
1583			this.fillText(lines[i], x, y);
1584			y += lineHeight;
1585		}
1586		if(detectMouseOnText) {
1587			var txtSize=ctx.measureTextMultiLine(text,lineHeight);
1588			var x_pos=[];
1589			var y_pos=[];
1590			x_pos.p1=x_decal+x;
1591			y_pos.p1=y_decal+y-lineHeight;
1592			var rotateRV=(Math.PI/2)+rotate;
1593			       if(ctx.textAlign=="left" && yLevel=="top"){
1594				x_pos.p1+=lineHeight*Math.cos(rotateRV);
1595				y_pos.p1+=lineHeight*Math.sin(rotateRV);
1596			} else if(ctx.textAlign=="left" && yLevel=="middle"){
1597				x_pos.p1+=(lineHeight/2)*Math.cos(rotateRV);
1598				y_pos.p1+=(lineHeight/2)*Math.sin(rotateRV);
1599			} else if(ctx.textAlign=="left" && yLevel=="bottom"){
1600			       // nothing to adapt;
1601			} else if(ctx.textAlign=="center" && yLevel=="top"){
1602				x_pos.p1+=lineHeight*Math.cos(rotateRV)-(txtSize.textWidth/2)*Math.cos(rotate);
1603				y_pos.p1+=lineHeight*Math.sin(rotateRV)-(txtSize.textWidth/2)*Math.sin(rotate);
1604			} else if(ctx.textAlign=="center" && yLevel=="middle"){
1605				x_pos.p1+=(lineHeight/2)*Math.cos(rotateRV)-(txtSize.textWidth/2)*Math.cos(rotate);
1606				y_pos.p1+=(lineHeight/2)*Math.sin(rotateRV)-(txtSize.textWidth/2)*Math.sin(rotate);
1607			} else if(ctx.textAlign=="center" && yLevel=="bottom"){
1608				x_pos.p1-=(txtSize.textWidth/2)*Math.cos(rotate);
1609				y_pos.p1-=(txtSize.textWidth/2)*Math.sin(rotate);
1610			} else if(ctx.textAlign=="right" && yLevel=="top"){
1611				x_pos.p1+=(lineHeight*Math.cos(rotateRV)-txtSize.textWidth*Math.cos(rotate));
1612				y_pos.p1+=(lineHeight*Math.sin(rotateRV)-txtSize.textWidth*Math.sin(rotate));
1613			} else if(ctx.textAlign=="right" && yLevel=="middle"){
1614				x_pos.p1+=(lineHeight/2)*Math.cos(rotateRV)-txtSize.textWidth*Math.cos(rotate);
1615				y_pos.p1+=(lineHeight/2)*Math.sin(rotateRV)-txtSize.textWidth*Math.sin(rotate);
1616			} else if(ctx.textAlign=="right" && yLevel=="bottom"){
1617				x_pos.p1-=txtSize.textWidth*Math.cos(rotate);
1618				y_pos.p1-=txtSize.textWidth*Math.sin(rotate);
1619			} 
1620
1621			// Other corners of the rectangle;
1622			
1623			x_pos.p2=x_pos.p1+txtSize.textWidth*Math.cos(rotate);
1624			y_pos.p2=y_pos.p1+txtSize.textWidth*Math.sin(rotate);
1625			
1626			x_pos.p3=x_pos.p1-lineHeight*Math.cos(rotateRV);
1627			y_pos.p3=y_pos.p1-lineHeight*Math.sin(rotateRV);
1628			
1629			x_pos.p4=x_pos.p3+txtSize.textWidth*Math.cos(rotate);
1630			y_pos.p4=y_pos.p3+txtSize.textWidth*Math.sin(rotate);
1631
1632			jsTextMousePos[ctx.ChartNewId][jsTextMousePos[ctx.ChartNewId].length] = [idText,text,x_pos,y_pos,rotate,txtSize.textWidth,txtSize.textHeight,posi,posj];
1633						
1634		}	
1635	};
1636	CanvasRenderingContext2D.prototype.measureTextMultiLine = function(text, lineHeight) {
1637		var textWidth = 0;
1638		var textHeight = 0;
1639		var lg;
1640		var lines = ("" + text).replace(/<BR>/ig, "\n").split("\n");
1641		if (lines.length>0)textHeight=lineHeight+1.5*(lines.length-1)*textHeight;
1642		var textHeight = lines.length * lineHeight;
1643		// if its one line => in the middle 
1644		// two lines one above the mid one below etc.	
1645		for (var i = 0; i < lines.length; i++) {
1646			lg = this.measureText(lines[i]).width;
1647			if (lg > textWidth) textWidth = lg;
1648		}
1649		return {
1650			textWidth: textWidth,
1651			textHeight: textHeight
1652		};
1653	};
1654	if (typeof CanvasRenderingContext2D.prototype.setLineDash !== 'function') {
1655		CanvasRenderingContext2D.prototype.setLineDash = function( listdash) {
1656			return 0;
1657		};
1658	};
1659	
1660	CanvasRenderingContext2D.prototype.drawRectangle = function(TheRectangle){
1661		var originalfillStyle =this.fillStyle;
1662    		if(typeof TheRectangle.x=='undefined'){TheRectangle.x=0;}
1663      		if(TheRectangle.width<0){TheRectangle.x+=TheRectangle.width;TheRectangle.width*=-1;}
1664        	if(TheRectangle.height<0){TheRectangle.y+=TheRectangle.height;TheRectangle.height*=-1;}
1665    		if(typeof TheRectangle.y=='undefined'){TheRectangle.y=0;}
1666  		if(typeof TheRectangle.y=='undefined'){TheRectangle.y=0;}
1667  		if(typeof TheRectangle.backgroundColor!='undefined'){this.fillStyle=TheRectangle.backgroundColor;}
1668  		if(typeof TheRectangle.borderRadius=='undefined'){TheRectangle.borderRadius=0;}
1669  		if(typeof TheRectangle.borderSelection=='undefined'){TheRectangle.borderSelection=15;}
1670
1671   		var rectangleRadius=parseInt(TheRectangle.borderRadius);
1672   		
1673		// The radius correction has been set to avoid problems when there is a big border and a color inside the rectangle;
1674		if(TheRectangle.borders && TheRectangle.bordersWidth > 5 && this.fillStyle != "rgba(0,0,0,0)")rectangleRadius=0;
1675
1676		if(TheRectangle.borders && TheRectangle.fill && TheRectangle.borderSelection==15 && rectangleRadius>0)return this;
1677
1678  
1679  		if(rectangleRadius==0 && TheRectangle.fill==true){this.fillRect(TheRectangle.x,TheRectangle.y,TheRectangle.width,TheRectangle.height);}
1680    		if(rectangleRadius==0 && TheRectangle.borderSelection>=15 && TheRectangle.stroke==true){this.strokeRect(TheRectangle.x,TheRectangle.y,TheRectangle.width,TheRectangle.height);}
1681    		if(rectangleRadius!=0 || (TheRectangle.borderSelection<15 && TheRectangle.stroke==true)){
1682      			if(rectangleRadius>TheRectangle.width/2 ){rectangleRadius=TheRectangle.width/2}
1683      			if(TheRectangle.height<TheRectangle.width &&rectangleRadius>TheRectangle.height/2 ){rectangleRadius=TheRectangle.height/2};
1684			if(TheRectangle.fill) {
1685	      			this.beginPath();
1686	      			this.lineWidth=0;
1687	      			this.strokeStyle="rgba(0,0,0,0)";
1688  				this.moveTo(TheRectangle.x+rectangleRadius,TheRectangle.y);
1689				this.lineTo(TheRectangle.x+TheRectangle.width-rectangleRadius,TheRectangle.y);
1690 				this.arc(TheRectangle.x+TheRectangle.width-rectangleRadius,TheRectangle.y+rectangleRadius,rectangleRadius,1.5*Math.PI,0); 
1691	      			this.lineTo(TheRectangle.x+TheRectangle.width,TheRectangle.y+TheRectangle.height-rectangleRadius);
1692  				this.arc(TheRectangle.x+TheRectangle.width-rectangleRadius,TheRectangle.y+TheRectangle.height-rectangleRadius,rectangleRadius,0,0.5*Math.PI); 
1693     				this.lineTo(TheRectangle.x+rectangleRadius,TheRectangle.y+TheRectangle.height);
1694	       			this.arc(TheRectangle.x+rectangleRadius,TheRectangle.y+TheRectangle.height-rectangleRadius,rectangleRadius,0.5*Math.PI,1*Math.PI); 
1695    				this.lineTo(TheRectangle.x,TheRectangle.y+rectangleRadius);
1696     				this.arc(TheRectangle.x+rectangleRadius,TheRectangle.y+rectangleRadius,rectangleRadius,1*Math.PI,1.5*Math.PI); 
1697		   		this.closePath();
1698    				this.fill();
1699    				this.stroke();
1700    			}
1701      			if(TheRectangle.stroke==true) {
1702      				var dleft=(isBorder(TheRectangle.borderSelection,"LEFT")==false);
1703      				var dright=(isBorder(TheRectangle.borderSelection,"RIGHT")==false);
1704      				var dtop=(isBorder(TheRectangle.borderSelection,"TOP")==false);
1705      				var dbottom=(isBorder(TheRectangle.borderSelection,"BOTTOM")==false);
1706
1707      				if(dtop==false && (dleft==true || TheRectangle.borderSelection==15)){
1708		      			dtop=true;
1709					this.beginPath();
1710					this.moveTo(TheRectangle.x+rectangleRadius,TheRectangle.y);
1711	      				this.lineTo(TheRectangle.x+TheRectangle.width-rectangleRadius,TheRectangle.y);
1712	      				if(isBorder(TheRectangle.borderSelection,"RIGHT")) this.arc(TheRectangle.x+TheRectangle.width-rectangleRadius,TheRectangle.y+rectangleRadius,rectangleRadius,1.5*Math.PI,0); 
1713					else this.stroke()
1714				}
1715      				if(dright==false && (dtop==true || TheRectangle.borderSelection==15)){
1716					dright=true;					
1717					if(isBorder(TheRectangle.borderSelection,"TOP")==false) {
1718			      			this.beginPath();
1719		     				this.moveTo(TheRectangle.x+TheRectangle.width,TheRectangle.y+rectangleRadius); 
1720			      		}
1721		      			this.lineTo(TheRectangle.x+TheRectangle.width,TheRectangle.y+TheRectangle.height-rectangleRadius);
1722	      				if(isBorder(TheRectangle.borderSelection,"BOTTOM")) this.arc(TheRectangle.x+TheRectangle.width-rectangleRadius,TheRectangle.y+TheRectangle.height-rectangleRadius,rectangleRadius,0,0.5*Math.PI); 
1723				      	else this.stroke()
1724				}
1725      				if(dbottom==false && (dright==true || TheRectangle.borderSelection==15)){
1726					dbottom=true;					
1727					if(isBorder(TheRectangle.borderSelection,"RIGHT")==false) {
1728		      				this.beginPath();
1729    						this.moveTo(TheRectangle.x+TheRectangle.width-rectangleRadius,TheRectangle.y+TheRectangle.height);
1730					}
1731		      			this.lineTo(TheRectangle.x+rectangleRadius,TheRectangle.y+TheRectangle.height);
1732					if(isBorder(TheRectangle.borderSelection,"LEFT"))this.arc(TheRectangle.x+rectangleRadius,TheRectangle.y+TheRectangle.height-rectangleRadius,rectangleRadius,0.5*Math.PI,1*Math.PI); 
1733				      	else this.stroke()
1734				}
1735      				if(dleft==false && (dbottom==true || TheRectangle.borderSelection==15)){
1736					dleft=true;
1737					if(isBorder(TheRectangle.borderSelection,"BOTTOM")==false) {
1738		      				this.beginPath();
1739	     					this.moveTo(TheRectangle.x,TheRectangle.y+TheRectangle.height-rectangleRadius);
1740	       				}
1741		      			this.lineTo(TheRectangle.x,TheRectangle.y+rectangleRadius);
1742					if(isBorder(TheRectangle.borderSelection,"TOP")){
1743			       			this.arc(TheRectangle.x+rectangleRadius,TheRectangle.y+rectangleRadius,rectangleRadius,1*Math.PI,1.5*Math.PI); 
1744				      		if(TheRectangle.borderSelection==15){
1745	   						this.closePath();
1746			   				this.stroke();
1747						}
1748					}
1749					else this.stroke()
1750				}
1751      				if(dtop==false && (dleft==true || TheRectangle.borderSelection==15)){
1752		      			dtop=true;
1753					if(isBorder(TheRectangle.borderSelection,"LEFT")==false) {
1754			      			this.beginPath();
1755						this.moveTo(TheRectangle.x+rectangleRadius,TheRectangle.y);
1756					}
1757	      				this.lineTo(TheRectangle.x+TheRectangle.width-rectangleRadius,TheRectangle.y);
1758	      				if(isBorder(TheRectangle.borderSelection,"RIGHT")) this.arc(TheRectangle.x+TheRectangle.width-rectangleRadius,TheRectangle.y+rectangleRadius,rectangleRadius,1.5*Math.PI,0); 
1759					else this.stroke()
1760				}
1761      				if(dright==false && (dtop==true || TheRectangle.borderSelection==15)){
1762					dright=true;					
1763					if(isBorder(TheRectangle.borderSelection,"TOP")==false) {
1764			      			this.beginPath();
1765		     				this.moveTo(TheRectangle.x+TheRectangle.width,TheRectangle.y+rectangleRadius); 
1766			      		}
1767		      			this.lineTo(TheRectangle.x+TheRectangle.width,TheRectangle.y+TheRectangle.height-rectangleRadius);
1768	      				if(isBorder(TheRectangle.borderSelection,"BOTTOM")) this.arc(TheRectangle.x+TheRectangle.width-rectangleRadius,TheRectangle.y+TheRectangle.height-rectangleRadius,rectangleRadius,0,0.5*Math.PI); 
1769				      	else this.stroke()
1770				}
1771				
1772				if(this.fillStyle != "rgba(0,0,0,0)" && TheRectangle.borderSelection==15)this.fill();
1773			};
1774	    	} 
1775 		this.fillStyle= originalfillStyle;
1776		return this;
1777	};
1778};
1779
1780cursorDivCreated = false;
1781
1782function createCursorDiv(config) {
1783	if (cursorDivCreated == false) {
1784		var div = document.createElement(annotate_shape);
1785		div.id = annotate_shape;
1786		div.style.position = 'absolute';
1787		document.body.appendChild(div);
1788		cursorDivCreated = true;
1789	}
1790};
1791
1792initChartJsResize = false;
1793var jsGraphResize = new Array();
1794
1795function addResponsiveChart(id,ctx,data,config) {
1796	if(initChartJsResize==false) {
1797		if (window.addEventListener) {
1798			window.addEventListener("resize", chartJsResize);
1799		} else {
1800			window.attachEvent("resize", chartJsResize);
1801		}
1802	}
1803	jsGraphResize[jsGraphResize.length]= [id,ctx.tpchart,ctx,data,config];
1804};
1805
1806
1807var container;
1808function getMaximumWidth(domNode){
1809    if(domNode.parentNode!=null)
1810        if(domNode.parentNode!=undefined)
1811            container = domNode.parentNode;
1812    return container.clientWidth;
1813};
1814
1815function getMaximumHeight(domNode){
1816	if(domNode.parentNode!=null)
1817            if(domNode.parentNode!=undefined)
1818                container = domNode.parentNode;
1819	return container.clientHeight;
1820};
1821
1822function resizeCtx(ctx,config)
1823{                                                                                                                                           
1824	if (isIE() < 9 && isIE() != false) return(true);
1825
1826	if(config.responsive) {	
1827
1828		if(typeof config.maintainAspectRatio == "undefined")config.maintainAspectRatio=true;
1829		if(typeof config.responsiveMinWidth == "undefined")config.responsiveMinWidth=0;
1830		if(typeof config.responsiveMinHeight  == "undefined")config.responsiveMinHeight=0;
1831		if(typeof config.responsiveMaxWidth  == "undefined")config.responsiveMaxWidth=9999999;
1832		if(typeof config.responsiveMaxHeight  == "undefined")config.responsiveMaxHeight=9999999;
1833		var canvas;
1834    if(typeof ctx.vctx != "undefined"){
1835      canvas=ctx.vctx.canvas;
1836    }
1837    else {
1838      canvas=ctx.canvas;
1839    }
1840		if(typeof ctx.aspectRatio == "undefined") {
1841			ctx.aspectRatio = canvas.width / canvas.height;
1842		}
1843  	var newWidth = getMaximumWidth(canvas);
1844		var newHeight = config.maintainAspectRatio ? newWidth / ctx.aspectRatio : getMaximumHeight(canvas);
1845		newWidth=Math.min(config.responsiveMaxWidth,Math.max(config.responsiveMinWidth,newWidth));
1846		newHeight=Math.min(config.responsiveMaxHeight,Math.max(config.responsiveMinHeight,newHeight));
1847
1848		if(typeof ctx.DefaultchartTextScale=="undefined")ctx.DefaultchartTextScale=config.chartTextScale;
1849		if(typeof ctx.DefaultchartLineScale=="undefined")ctx.DefaultchartLineScale=config.chartLineScale;
1850		if(typeof ctx.DefaultchartSpaceScale=="undefined")ctx.DefaultchartSpaceScale=config.chartSpaceScale;
1851		/* new ratio */
1852		if(typeof ctx.chartTextScale != "undefined" && config.responsiveScaleContent) {
1853			ctx.chartTextScale=ctx.DefaultchartTextScale*(newWidth/ctx.initialWidth);
1854			ctx.chartLineScale=ctx.DefaultchartLineScale*(newWidth/ctx.initialWidth);
1855			ctx.chartSpaceScale=ctx.DefaultchartSpaceScale*(newWidth/ctx.initialWidth);
1856		}
1857		                                                                                                            
1858		if (window.devicePixelRatio>1) {
1859			ctx.canvas.style.width = newWidth + "px";
1860			ctx.canvas.style.height = newHeight + "px";
1861		}
1862		ctx.canvas.height = newHeight * Math.max(1,window.devicePixelRatio);
1863		ctx.canvas.width = newWidth * Math.max(1,window.devicePixelRatio);
1864		ctx.scale(Math.max(1,window.devicePixelRatio), Math.max(1,window.devicePixelRatio));
1865	} else if (window.devicePixelRatio>1) {
1866		if(typeof ctx.original_width=="undefined") {
1867			ctx.original_width=ctx.canvas.width;
1868			ctx.original_height=ctx.canvas.height;
1869		}
1870		ctx.canvas.style.width = ctx.original_width + "px";
1871		ctx.canvas.style.height = ctx.original_height + "px";
1872		ctx.canvas.height = ctx.original_height * window.devicePixelRatio;
1873		ctx.canvas.width = ctx.original_width * window.devicePixelRatio;
1874		ctx.scale(window.devicePixelRatio, window.devicePixelRatio);
1875	}
1876};
1877
1878
1879
1880
1881function chartJsResize() {
1882	for (var i=0;i<jsGraphResize.length;i++)  {
1883		if(jsGraphResize[i][2].firstPass ==0)  {
1884		} else if(jsGraphResize[i][2].firstPass ==9) {
1885			jsGraphResize[i][2].firstPass=2;
1886			redrawGraph(jsGraphResize[i][2],jsGraphResize[i][3],jsGraphResize[i][4]);
1887		} else if(jsGraphResize[i][2].firstPass < 10 ) {
1888			jsGraphResize[i][2].firstPass+=10;
1889		} 
1890	}
1891};
1892
1893function testRedraw(ctx,data,config) {
1894	if (ctx.firstPass>10) {
1895		ctx.firstPass=2;
1896		redrawGraph(ctx,data,config) ;
1897		return true;
1898	} else {
1899		return false;
1900	}		
1901};
1902
1903function updateChart(ctx,data,config,animation,runanimationcompletefunction) {
1904	if (ctx.firstPass==9)
1905	{
1906
1907		ctx.runanimationcompletefunction=runanimationcompletefunction;
1908
1909		if(animation)ctx.firstPass=1;
1910		else         ctx.firstPass=2;
1911
1912		if(config.responsive) {
1913			// update jsGraphResize;
1914			for (var i=0;i<jsGraphResize.length;i++)  {
1915				if(jsGraphResize[i][2].ChartNewId== ctx.ChartNewId) {
1916					jsGraphResize[i][3]=data;
1917					jsGraphResize[i][4]=config;
1918				}
1919			}
1920		}
1921		redrawGraph(ctx,data,config);
1922	}
1923};
1924
1925
1926function redrawGraph(ctx,data,config) {
1927
1928  if((ctx.firstPass==2 || ctx.firstPass==9) && !(isIE() < 9 && isIE() != false) && (navigator.userAgent.indexOf("Safari")==-1)) {    
1929    var OSC;
1930    var tmpctx;
1931    OSC=  document.createElement("canvas");
1932    tmpctx=OSC.getContext("2d");
1933    tmpctx.vctx=ctx;
1934
1935    OSC.width=ctx.canvas.width;
1936    OSC.height=ctx.canvas.height;
1937    tmpctx.ChartNewId=ctx.ChartNewId;
1938    tmpctx.tpchart=ctx.tpchart;
1939    tmpctx.tpdata=ctx.tpdata;
1940    tmpctx.initialWidth=ctx.initialWidth;
1941    tmpctx.chartTextScale=ctx.chartTextScale;
1942    tmpctx.chartLineScale=ctx.chartLineScale;
1943    tmpctx.chartSpaceScale=ctx.chartSpaceScale;
1944    tmpctx.firstPass=ctx.firstPass;
1945    tmpctx.runanimationcompletefunction=ctx.runanimationcompletefunction;
1946    tmpctx.aspectRatio=ctx.aspectRatio;
1947    tmpctx.widthAtSetMeasures=ctx.widthAtSetMeasures;
1948    tmpctx.heightAtSetMeasures=ctx.heightAtSetMeasures;
1949    tmpctx.pieces_drawn=ctx.pieces_drawn;
1950
1951
1952
1953 	 var myGraph = new Chart(tmpctx);	
1954        eval("myGraph."+tmpctx.tpchart+"(data,config);");
1955
1956    ctx.tpchart=tmpctx.tpchart;
1957    ctx.tpdata=tmpctx.tpdata;
1958    ctx.initialWidth=tmpctx.initialWidth;
1959    ctx.chartTextScale=tmpctx.chartTextScale;
1960    ctx.chartLineScale=tmpctx.chartLineScale;
1961    ctx.chartSpaceScale=tmpctx.chartSpaceScale;
1962    ctx.firstPass=tmpctx.firstPass;
1963    ctx.runanimationcompletefunction=tmpctx.runanimationcompletefunction;
1964    ctx.ChartNewId=tmpctx.ChartNewId;
1965    ctx.aspectRatio=tmpctx.aspectRatio;
1966    ctx.widthAtSetMeasures=tmpctx.widthAtSetMeasures;
1967    ctx.heightAtSetMeasures=tmpctx.heightAtSetMeasures;
1968    ctx.canvas.width=tmpctx.canvas.width;
1969    ctx.canvas.height=tmpctx.canvas.height;
1970    ctx.pieces_drawn=tmpctx.pieces_drawn;
1971
1972
1973   ctx.clearRect(0,0,ctx.canvas.width,ctx.canvas.height);
1974   ctx.drawImage(OSC,0,0); 
1975  
1976   } else {
1977     	 var myGraph = new Chart(ctx);	
1978          eval("myGraph."+ctx.tpchart+"(data,config);");
1979   }
1980
1981};
1982
1983
1984//Default browsercheck, added to all scripts!                                   
1985function checkBrowser() {
1986	this.ver = navigator.appVersion
1987	this.dom = document.getElementById ? 1 : 0
1988	this.ie5 = (this.ver.indexOf("MSIE 5") > -1 && this.dom) ? 1 : 0;
1989	this.ie4 = (document.all && !this.dom) ? 1 : 0;
1990	this.ns5 = (this.dom && parseInt(this.ver) >= 5) ? 1 : 0;
1991	this.ns4 = (document.layers && !this.dom) ? 1 : 0;
1992	this.bw = (this.ie5 || this.ie4 || this.ns4 || this.ns5)
1993	return this
1994};
1995bw = new checkBrowser();
1996//Set these variables:
1997fromLeft = 10; // How much from the left of the cursor should the div be?
1998fromTop = 10; // How much from the top of the cursor should the div be?
1999/********************************************************************
2000Initilizes the objects
2001*********************************************************************/
2002function cursorInit() {
2003	scrolled = bw.ns4 || bw.ns5 ? "window.pageYOffset" : "document.body.scrollTop"
2004	if (bw.ns4) document.captureEvents(Event.MOUSEMOVE)
2005};
2006/********************************************************************
2007Contructs the cursorobjects
2008*********************************************************************/
2009function makeCursorObj(config,obj, nest) {
2010	createCursorDiv(config);
2011	nest = (!nest) ? '' : 'document.' + nest + '.'
2012	this.css = bw.dom ? document.getElementById(obj).style : bw.ie4 ? document.all[obj].style : bw.ns4 ? eval(nest + "document.layers." + obj) : 0;
2013	this.moveIt = b_moveIt;
2014	cursorInit();
2015	return this
2016};
2017
2018function b_moveIt(x, y) {
2019	this.x = x;
2020	this.y = y;
2021	this.css.left = this.x + "px";
2022	this.css.top = this.y + "px";
2023};
2024
2025function isIE() {
2026	var myNav = navigator.userAgent.toLowerCase();
2027	return (myNav.indexOf('msie') != -1) ? parseInt(myNav.split('msie')[1]) : false;
2028};
2029
2030function mergeChartConfig(defaults, userDefined) {
2031	var returnObj = {};
2032	for (var attrname in defaults) {
2033		returnObj[attrname] = defaults[attrname];
2034	}
2035	for (var attrnameBis in userDefined) {
2036		returnObj[attrnameBis] = userDefined[attrnameBis];
2037	}
2038	return returnObj;
2039};
2040
2041function sleep(ms) {
2042	var dt = new Date();
2043	dt.setTime(dt.getTime() + ms);
2044	while (new Date().getTime() < dt.getTime()) {};
2045};
2046
2047function saveCanvas(ctx, data, config) {
2048	cvSave = ctx.getImageData(0, 0, ctx.canvas.width, ctx.canvas.height);
2049	var saveCanvasConfig1 = {
2050		savePng: false,
2051		annotateDisplay: false,
2052		animation: false,
2053		dynamicDisplay: false
2054	};
2055	savePngConfig1 = mergeChartConfig(config, saveCanvasConfig1);
2056	savePngConfig1.clearRect = false;
2057	/* And ink them */
2058
2059	redrawGraph(ctx,data,savePngConfig1);
2060	var image;
2061	if (config.savePngOutput == "NewWindow") {
2062		image = ctx.canvas.toDataURL();
2063		ctx.putImageData(cvSave, 0, 0);
2064		window.open(image, '_blank');
2065	}
2066	if (config.savePngOutput == "CurrentWindow") {
2067		image = ctx.canvas.toDataURL();
2068		ctx.putImageData(cvSave, 0, 0);
2069		window.location.href = image;
2070	}
2071	if (config.savePngOutput == "Save") {
2072		image = ctx.canvas.toDataURL();
2073		var downloadLink = document.createElement("a");
2074		downloadLink.href = image;
2075		downloadLink.download = config.savePngName + ".png";
2076		document.body.appendChild(downloadLink);
2077		downloadLink.click();
2078		document.body.removeChild(downloadLink);
2079	}
2080};
2081if (typeof String.prototype.trim !== 'function') {
2082	String.prototype.trim = function() {
2083		return this.replace(/^\s+|\s+$/g, '');
2084	}
2085};
2086var dynamicDisplay = new Array();
2087var dynamicDisplayList = new Array();
2088
2089function dynamicFunction(data, config, ctx) {
2090	if (isIE() < 9 && isIE() != false) return(true);
2091
2092	if (config.dynamicDisplay && ctx.firstPass==0) {
2093		if (ctx.canvas.id == "") {
2094			var cvdate = new Date();
2095			var cvmillsec = cvdate.getTime();
2096			ctx.canvas.id = "Canvas_" + cvmillsec;
2097		}
2098		if (typeof(dynamicDisplay[ctx.canvas.id]) == "undefined") {
2099			dynamicDisplayList[dynamicDisplayList["length"]] = ctx.canvas.id;
2100			dynamicDisplay[ctx.canvas.id] = [ctx, data, config];
2101			window.onscroll = scrollFunction;
2102		} 
2103		if (!isScrolledIntoView(ctx.canvas,config)) return false;
2104	}
2105	return true;
2106};
2107
2108function isScrolledIntoView(element,config) {
2109	var xPosition = 0;
2110	var yPosition = 0;
2111	var eltWidth, eltHeight;
2112	if(typeof element.recomputedHeight=="undefined") {
2113		if (window.devicePixelRatio) {
2114			// 31/12/2015 - On retina display, the size of the canvas changes after the canvas is displayed.
2115			//              before it is displayd, the size on the screen is the size on non retina display;
2116                        //              If we do not divide the height & width by the devicePixelRatio, and if the
2117                        //              value of config.dynamicDisplayYPartOfChart and if there is a chart on to bottom of the
2118                        //              web page, this chart will never be displayed....
2119                        //              If the Size of the canvas was directly the real size displayed on the web page, we should not
2120                        //              divide the height/width by the devicePixelRatio.... (Bug in Brosers ?)
2121			element.recomputedHeight=element.height/window.devicePixelRatio;
2122			element.recomputedWidth=element.width/window.devicePixelRatio;
2123		} else {
2124			element.recomputedHeight=element.height;
2125			element.recomputedWidth=element.width;
2126		}
2127	}
2128	eltWidth=element.recomputedWidth;
2129	eltHeight=element.recomputedHeight;
2130	elem = element;
2131	while (elem) {
2132		xPosition += (elem.offsetLeft + elem.clientLeft);
2133		yPosition += (elem.offsetTop + elem.clientTop);
2134		elem = elem.offsetParent;
2135	}
2136
2137	if (xPosition + (eltWidth * config.dynamicDisplayXPartOfChart) >= window.pageXOffset &&
2138		xPosition + (eltWidth * config.dynamicDisplayXPartOfChart) <= window.pageXOffset + window.innerWidth &&
2139		yPosition + (eltHeight * config.dynamicDisplayYPartOfChart) >= window.pageYOffset &&
2140		yPosition + (eltHeight * config.dynamicDisplayYPartOfChart) <= window.pageYOffset + window.innerHeight
2141	) {
2142		return (true);
2143	}
2144	else {
2145		return false;
2146	}
2147};
2148
2149function scrollFunction() {
2150	for (var i = 0; i < dynamicDisplayList["length"]; i++) {
2151		if ((dynamicDisplay[dynamicDisplayList[i]][0]).firstPass==0) {
2152			redrawGraph(dynamicDisplay[dynamicDisplayList[i]][0],dynamicDisplay[dynamicDisplayList[i]][1], dynamicDisplay[dynamicDisplayList[i]][2]);
2153		}
2154	}
2155};
2156
2157var jsGraphAnnotate = new Array();
2158var jsTextMousePos = new Array();
2159var mouseActionData=new Array();
2160
2161function clearAnnotate(ctxid) {
2162	jsGraphAnnotate[ctxid] = [];
2163	jsTextMousePos[ctxid] = [];
2164};
2165
2166function getMousePos(canvas, evt) {
2167	var rect = canvas.getBoundingClientRect();
2168	return {
2169		x: evt.clientX - rect.left,
2170		y: evt.clientY - rect.top
2171	};
2172};
2173
2174function isHighLighted(reference,ctx,data,statData,posi,posj,othervars){
2175	var i;
2176	if(typeof data.special=="object") {
2177		for(i=data.special.length-1;i>=0;i--){
2178			if(data.special[i].typespecial=="highLight" && data.special[i].posi==posi && data.special[i].posj==posj) return true;
2179		}
2180	}
2181	return false;
2182};
2183
2184function isNotHighLighted(reference,ctx,data,statData,posi,posj,othervars) {
2185	return(!isHighLighted(reference,ctx,data,statData,posi,posj,othervars));
2186}
2187function deleteHighLight(ctx,data) {
2188	var i;
2189	if(typeof data.special=="object") {
2190		for(i=data.special.length-1;i>=0;i--){
2191			if(data.special[i].typespecial=="highLight") data.special.splice(i,1);
2192		}
2193	}
2194};
2195
2196
2197
2198function highLightAction(action,ctx,data,config,v1,v2) {
2199
2200	if (ctx.firstPass!=9)return;
2201
2202
2203	var currentlyDisplayed=[-1,-1];
2204	var redisplay=false;
2205	var i,j;
2206
2207
2208	if(typeof data.special=="object") {
2209		for(i=0;i<data.special.length && currentlyDisplayed[0]==-1;i++){
2210			if(data.special[i].typespecial=="highLight") currentlyDisplayed=[data.special[i].posi,data.special[i].posj];
2211		}
2212	}
2213	var deleteOld=false;
2214	var addNew=false;
2215	var property;
2216	var output;
2217  var fndoldspec=false;
2218  var fndnewspec=false;
2219
2220	if(action=="HIDE" && currentlyDisplayed[0]!=-1)deleteOld=true;
2221	else if(action!="HIDE" && config.highLightFullLine== "group" && (currentlyDisplayed[1]!=v2 )) { if(currentlyDisplayed[0]!=-1)deleteOld=true; addNew=true;}
2222	else if(action!="HIDE" && config.highLightFullLine== false && (currentlyDisplayed[0]!=v1 || currentlyDisplayed[1]!=v2)) { if(currentlyDisplayed[0]!=-1)deleteOld=true; addNew=true;}
2223	else if(action!="HIDE" && config.highLightFullLine== true && (currentlyDisplayed[0]!=v1 )) { if(currentlyDisplayed[0]!=-1)deleteOld=true; addNew=true;}
2224	
2225	if(deleteOld) {
2226		redisplay=true;
2227		for(i=data.special.length-1;i>=0;i--){
2228			if(data.special[i].typespecial=="highLight") { data.special.splice(i,1); fndoldspec=true; }
2229		}
2230	}
2231	if(addNew) {
2232		redisplay=true;
2233		if(typeof data.special == "undefined") data.special=[];
2234		if(config.highLightFullLine == "group") {
2235			for(j=0;j<data.datasets.length;j++) {
2236				if(!(data.datasets[j].mouseDetection==false)) {
2237					output="";
2238					for (property in config.highLightSet) {
2239						if (output !="") output=output+",";  
2240						if(typeof config.highLightSet[property]=="string")output += property + ': "' + config.highLightSet[property]+'"';
2241						else output += property + ': ' + config.highLightSet[property];
2242					}
2243          fndnewspec=true;
2244   				eval("data.special[data.special.length]={"+output+"};");
2245					data.special[data.special.length-1].posi=j;
2246					data.special[data.special.length-1].posj=v2;
2247					data.special[data.special.length-1].typespecial="highLight";
2248				}
2249			}
2250		} else if(config.highLightFullLine == true) {
2251			if(!(data.datasets[v1].mouseDetection==false)) {
2252				for(j=0;j<data.datasets[v1].data.length;j++) {
2253					output="";
2254					for (property in config.highLightSet) {
2255						if (output !="") output=output+",";  
2256						if(typeof config.highLightSet[property]=="string")output += property + ': "' + config.highLightSet[property]+'"';
2257						else output += property + ': ' + config.highLightSet[property];
2258					}
2259          fndnewspec=true;
2260 					eval("data.special[data.special.length]={"+output+"};");
2261					data.special[data.special.length-1].posi=v1;
2262					data.special[data.special.length-1].posj=j;
2263					data.special[data.special.length-1].typespecial="highLight";
2264				}
2265			}
2266		} else if(!(data.datasets[v1].mouseDetection==false)) {
2267			output="";
2268			for (property in config.highLightSet) {
2269				if (output !="") output=output+",";  
2270				if(typeof config.highLightSet[property]=="string")output += property + ': "' + config.highLightSet[property]+'"';
2271				else output += property + ': ' + config.highLightSet[property];
2272			}
2273      fndnewspec=true;
2274      eval("data.special[data.special.length]={"+output+"};");
2275			data.special[data.special.length-1].posi=v1;
2276			data.special[data.special.length-1].posj=v2;
2277			data.special[data.special.length-1].typespecial="highLight";
2278		}
2279	}
2280	if(redisplay==true) {
2281 		updateChart(ctx,data,config,false,config.highLightRerunEndFunction);
2282	}
2283};
2284
2285
2286var inMouseAction=new Array();
2287
2288function initAnnotateDiv(annotateDIV,config,ctx) {   
2289 			annotateDIV.className = (config.annotateClassName) ? config.annotateClassName : '';
2290  		annotateDIV.style.border = (config.annotateClassName) ? '' : config.annotateBorder;
2291			annotateDIV.style.padding = (config.annotateClassName) ? '' : config.annotatePadding;
2292			annotateDIV.style.borderRadius = (config.annotateClassName) ? '' : config.annotateBorderRadius;
2293			annotateDIV.style.backgroundColor = (config.annotateClassName) ? '' : config.annotateBackgroun
2293dColor;
2294			annotateDIV.style.color = (config.annotateClassName) ? '' : config.annotateFontColor;
2295			annotateDIV.style.fontFamily = (config.annotateClassName) ? '' : config.annotateFontFamily;
2296			annotateDIV.style.fontSize = (config.annotateClassName) ? '' : (Math.ceil(ctx.chartTextScale*config.annotateFontSize)).toString() + "pt";
2297			annotateDIV.style.fontStyle = (config.annotateClassName) ? '' : config.annotateFontStyle;
2298			annotateDIV.style.zIndex = 999;
2299};
2300
2301function displayAnnotate(ctx,data,config,rect,event,annotateDIV,jsGraphAnnotate,piece,myStatData,statData) {
2302
2303					if (jsGraphAnnotate[ctx.ChartNewId][piece.piece][0] == "ARC") dispString = tmplbis(setOptionValue(true,true,1,"ANNOTATELABEL",ctx,data,jsGraphAnnotate[ctx.ChartNewId][piece.piece][3],undefined,config.annotateLabel,"annotateLabel",jsGraphAnnotate[ctx.ChartNewId][piece.piece][1],-1,{otherVal:true}), myStatData,config);
2304					else dispString = tmplbis(setOptionValue(true,true,1,"ANNOTATELABEL",ctx,data,jsGraphAnnotate[ctx.ChartNewId][piece.piece][3],undefined,config.annotateLabel,"annotateLabel",jsGraphAnnotate[ctx.ChartNewId][piece.piece][1],jsGraphAnnotate[ctx.ChartNewId][piece.piece][2],{otherVal:true}), myStatData,config);
2305					textMsr=ctx.measureTextMultiLine(dispString,1*annotateDIV.style.fontSize.replace("pt",""));
2306					ctx.restore();
2307
2308					annotateDIV.innerHTML = dispString;
2309					x = bw.ns4 || bw.ns5 ? event.pageX : event.x;
2310					y = bw.ns4 || bw.ns5 ? event.pageY : event.y;
2311					if (bw.ie4 || bw.ie5) y = y + eval(scrolled);
2312					if(config.annotateRelocate===true) {
2313						var relocateX, relocateY;
2314						relocateX=0;relocateY=0;
2315				 		if(x+fromLeft+textMsr.textWidth > window.innerWidth-rect.left-fromLeft)relocateX=-textMsr.textWidth;
2316		 				if(y+fromTop+textMsr.textHeight > 1*window.innerHeight-1*rect.top+fromTop)relocateY-=(textMsr.textHeight+2*fromTop);
2317						oCursor.moveIt(Math.max(8-rect.left,x + fromLeft+relocateX), Math.max(8-rect.top,y + fromTop + relocateY));
2318					} else oCursor.moveIt(x + fromLeft, y + fromTop);
2319					annotateDIV.style.display = true ? '' : 'none'; 
2320};       
2321
2322
2323
2324function doMouseAction(event, ctx, action) {
2325	if (ctx.firstPass != 9)return;
2326	if(action=="mousedown") action=action+" "+event.which;
2327	if(ctx.mouseAction.indexOf(action)<0){return;}
2328	var config=mouseActionData[ctx.ChartNewId].config;
2329	var data=mouseActionData[ctx.ChartNewId].data;
2330	var i,prevShown,prevShowSaved;
2331	var inRect,P12,D12,D34,P13,D13,D24, y1,y2,y3,y4;
2332	var pieceOfChartFound=[];
2333	var textOnChartFound=[];
2334	var distance, angle,topY, bottomY,leftX, rightX;
2335	var mousewheelevt=(/Firefox/i.test(navigator.userAgent))? "DOMMouseScroll" : "mousewheel" 
2336	var canvas_pos = getMousePos(ctx.canvas, event);
2337	var realAction;
2338	var annotateDIV,showDiv;
2339
2340	     if(action=="mousedown 1")realAction="mousedown left";
2341	else if(action=="mousedown 2")realAction="mousedown middle";
2342	else if(action=="mousedown 3")realAction="mousedown right";
2343	else if(action==mousewheelevt)realAction="mousewheel";
2344	else realAction=action;
2345
2346
2347	// search if mouse over one or more pieces of chart;
2348
2349	for (i = 0; i < jsGraphAnnotate[ctx.ChartNewId]["length"]; i++) {
2350		if (jsGraphAnnotate[ctx.ChartNewId][i][0] == "ARC") {
2351			myStatData=jsGraphAnnotate[ctx.ChartNewId][i][3][jsGraphAnnotate[ctx.ChartNewId][i][1]];
2352			distance = Math.sqrt((canvas_pos.x - myStatData.midPosX) * (canvas_pos.x - myStatData.midPosX) + (canvas_pos.y - myStatData.midPosY) * (canvas_pos.y - myStatData.midPosY));
2353			if (distance > myStatData.int_radius && distance < myStatData.radiusOffset) {
2354				angle = (Math.acos((canvas_pos.x - myStatData.midPosX) / distance) % (2* Math.PI) + 2*Math.PI) % (2*Math.PI);
2355				if (canvas_pos.y < myStatData.midPosY) angle = -angle;
2356				angle = (((angle  + 2 * Math.PI) % (2 * Math.PI)) + 2* Math.PI) % (2* Math.PI) ; 
2357				myStatData.startAngle=(((myStatData.startAngle  + 2 * Math.PI) % (2 * Math.PI)) + 2* Math.PI) % (2* Math.PI);
2358				myStatData.endAngle=(((myStatData.endAngle  + 2 * Math.PI) % (2 * Math.PI)) + 2* Math.PI) % (2* Math.PI);
2359				if(myStatData.endAngle<myStatData.startAngle)myStatData.endAngle+=2 * Math.PI;
2360				if ((angle > myStatData.startAngle && angle < myStatData.endAngle) || (angle > myStatData.startAngle - 2 * Math.PI && angle < myStatData.endAngle - 2 * Math.PI) || (angle > myStatData.startAngle + 2 * Math.PI && angle < myStatData.endAngle + 2 * Math.PI)) {
2361					myStatData.graphPosX = canvas_pos.x;
2362					myStatData.graphPosY = canvas_pos.y;
2363					pieceOfChartFound[pieceOfChartFound.length]={
2364						piece : i,
2365            i : jsGraphAnnotate[ctx.ChartNewId][i][1],
2366            j : jsGraphAnnotate[ctx.ChartNewId][i][2],
2367						myStatData: myStatData
2368					};
2369				}
2370			}
2371		} else if (jsGraphAnnotate[ctx.ChartNewId][i][0] == "MARC") {
2372
2373			myStatData=jsGraphAnnotate[ctx.ChartNewId][i][3][jsGraphAnnotate[ctx.ChartNewId][i][1]][jsGraphAnnotate[ctx.ChartNewId][i][2]];
2374			distance = Math.sqrt((canvas_pos.x - myStatData.midPosX) * (canvas_pos.x - myStatData.midPosX) + (canvas_pos.y - myStatData.midPosY) * (canvas_pos.y - myStatData.midPosY));
2375
2376			if (distance > myStatData.int_radius && distance < myStatData.radiusOffset) {
2377
2378				angle = (Math.acos((canvas_pos.x - myStatData.midPosX) / distance) % (2* Math.PI) + 2*Math.PI) % (2*Math.PI);
2379				if (canvas_pos.y < myStatData.midPosY) angle = -angle;
2380				angle = (((angle  + 2 * Math.PI) % (2 * Math.PI)) + 2* Math.PI) % (2* Math.PI) ; 
2381				myStatData.startAngle=(((myStatData.startAngle  + 2 * Math.PI) % (2 * Math.PI)) + 2* Math.PI) % (2* Math.PI);
2382				myStatData.endAngle=(((myStatData.endAngle  + 2 * Math.PI) % (2 * Math.PI)) + 2* Math.PI) % (2* Math.PI);
2383				if(myStatData.endAngle<myStatData.startAngle)myStatData.endAngle+=2 * Math.PI;
2384				if ((angle > myStatData.startAngle && angle < myStatData.endAngle) || (angle > myStatData.startAngle - 2 * Math.PI && angle < myStatData.endAngle - 2 * Math.PI) || (angle > myStatData.startAngle + 2 * Math.PI && angle < myStatData.endAngle + 2 * Math.PI)) {
2385					myStatData.graphPosX = canvas_pos.x;
2386					myStatData.graphPosY = canvas_pos.y;
2387					pieceOfChartFound[pieceOfChartFound.length]={
2388						piece : i,
2389            i : jsGraphAnnotate[ctx.ChartNewId][i][1],
2390            j : jsGraphAnnotate[ctx.ChartNewId][i][2],
2391						myStatData: myStatData
2392					};
2393				}
2394			}
2395		} else if (jsGraphAnnotate[ctx.ChartNewId][i][0] == "RECT") {
2396			myStatData=jsGraphAnnotate[ctx.ChartNewId][i][3][jsGraphAnnotate[ctx.ChartNewId][i][1]][jsGraphAnnotate[ctx.ChartNewId][i][2]];
2397			topY=Math.max(myStatData.yPosBottom,myStatData.yPosTop);
2398			bottomY=Math.min(myStatData.yPosBottom,myStatData.yPosTop);
2399			if (topY-bottomY <config.annotateBarMinimumDetectionHeight) {
2400				topY=(topY+bottomY+config.annotateBarMinimumDetectionHeight)/2;
2401			        bottomY=topY-config.annotateBarMinimumDetectionHeight;
2402			}
2403			leftX=Math.min(myStatData.xPosLeft,myStatData.xPosRight);
2404			rightX=Math.max(myStatData.xPosLeft,myStatData.xPosRight);
2405			if (rightX-leftX <config.annotateBarMinimumDetectionHeight) {
2406				rightX=(rightX+leftX+config.annotateBarMinimumDetectionHeight)/2;
2407			        leftX=rightX-config.annotateBarMinimumDetectionHeight;
2408			}
2409			if (canvas_pos.x > leftX && canvas_pos.x < rightX && canvas_pos.y < topY && canvas_pos.y > bottomY) {
2410				myStatData.graphPosX = canvas_pos.x;
2411				myStatData.graphPosY = canvas_pos.y;
2412				pieceOfChartFound[pieceOfChartFound.length]={
2413					piece : i,
2414          i : jsGraphAnnotate[ctx.ChartNewId][i][1],
2415          j : jsGraphAnnotate[ctx.ChartNewId][i][2],
2416					myStatData: myStatData
2417				};
2418			}
2419		} else if (jsGraphAnnotate[ctx.ChartNewId][i][0] == "POINT") {
2420			myStatData=jsGraphAnnotate[ctx.ChartNewId][i][3][jsGraphAnnotate[ctx.ChartNewId][i][1]][jsGraphAnnotate[ctx.ChartNewId][i][2]];
2421			if(config.detectAnnotateOnFullLine) {
2422				if(canvas_pos.x < Math.min(myStatData.annotateStartPosX,myStatData.annotateEndPosX)-Math.ceil(ctx.chartSpaceScale*config.pointHitDetectionRadius) || canvas_pos.x > Math.max(myStatData.annotateStartPosX,myStatData.annotateEndPosX)+Math.ceil(ctx.chartSpaceScale*config.pointHitDetectionRadius) || canvas_pos.y < Math.min(myStatData.annotateStartPosY,myStatData.annotateEndPosY)-Math.ceil(ctx.chartSpaceScale*config.pointHitDetectionRadius) || canvas_pos.y > Math.max(myStatData.annotateStartPosY,myStatData.annotateEndPosY)+Math.ceil(ctx.chartSpaceScale*config.pointHitDetectionRadius)) {
2423					distance=Math.ceil(ctx.chartSpaceScale*config.pointHitDetectionRadius)+1;
2424				} else { 
2425					if(typeof myStatData.D1A=="undefined") {
2426						distance=Math.abs(canvas_pos.x-myStatData.posX);
2427					} else if(typeof myStatData.D2A=="undefined") {
2428						distance=Math.abs(canvas_pos.y-myStatData.posY);
2429					} else {
2430						var D2B=-myStatData.D2A*canvas_pos.x+canvas_pos.y;
2431						var g=-(myStatData.D1B-D2B)/(myStatData.D1A-myStatData.D2A);
2432						var h=myStatData.D2A*g+D2B;
2433						distance=Math.sqrt((canvas_pos.x - g) * (canvas_pos.x - g) + (canvas_pos.y - h) * (canvas_pos.y - h));
2434					}
2435				}
2436			} else {
2437				distance = Math.sqrt((canvas_pos.x - myStatData.posX) * (canvas_pos.x - myStatData.posX) + (canvas_pos.y - myStatData.posY) * (canvas_pos.y - myStatData.posY));
2438			}
2439			if (distance < Math.ceil(ctx.chartSpaceScale*config.pointHitDetectionRadius)) {
2440				myStatData.graphPosX = canvas_pos.x;
2441				myStatData.graphPosY = canvas_pos.y;
2442				pieceOfChartFound[pieceOfChartFound.length]={
2443					piece : i,
2444          i : jsGraphAnnotate[ctx.ChartNewId][i][1],
2445          j : jsGraphAnnotate[ctx.ChartNewId][i][2],
2446					myStatData: myStatData
2447				};
2448			}
2449		}
2450	}
2451
2452	// search if mouse over one or more text;
2453	if(config.detectMouseOnText) {
2454		for(i=0;i<jsTextMousePos[ctx.ChartNewId]["length"];i++){
2455		        inRect=true;
2456			if(Math.abs(jsTextMousePos[ctx.ChartNewId][i][3].p1 - jsTextMousePos[ctx.ChartNewId][i][3].p2) < config.zeroValue) {
2457				// Horizontal;
2458				if(canvas_pos.x < Math.min(jsTextMousePos[ctx.ChartNewId][i][2].p1,jsTextMousePos[ctx.ChartNewId][i][2].p2))inRect=false; 
2459				if(canvas_pos.x > Math.max(jsTextMousePos[ctx.ChartNewId][i][2].p1,jsTextMousePos[ctx.ChartNewId][i][2].p2))inRect=false; 
2460				if(canvas_pos.y < Math.min(jsTextMousePos[ctx.ChartNewId][i][3].p1,jsTextMousePos[ctx.ChartNewId][i][3].p3))inRect=false; 
2461				if(canvas_pos.y > Math.max(jsTextMousePos[ctx.ChartNewId][i][3].p1,jsTextMousePos[ctx.ChartNewId][i][3].p3))inRect=false; 
2462			} else if(Math.abs(jsTextMousePos[ctx.ChartNewId][i][2].p1 - jsTextMousePos[ctx.ChartNewId][i][2].p2)<config.zeroValue) {
2463				// Vertical;
2464				if(canvas_pos.x < Math.min(jsTextMousePos[ctx.ChartNewId][i][2].p1,jsTextMousePos[ctx.ChartNewId][i][2].p3))inRect=false; 
2465				if(canvas_pos.x > Math.max(jsTextMousePos[ctx.ChartNewId][i][2].p1,jsTextMousePos[ctx.ChartNewId][i][2].p3))inRect=false; 
2466				if(canvas_pos.y < Math.min(jsTextMousePos[ctx.ChartNewId][i][3].p1,jsTextMousePos[ctx.ChartNewId][i][3].p2))inRect=false; 
2467				if(canvas_pos.y > Math.max(jsTextMousePos[ctx.ChartNewId][i][3].p1,jsTextMousePos[ctx.ChartNewId][i][3].p2))inRect=false; 
2468			} else {
2469				// D12 & D34;
2470
2471				P12=Math.tan(jsTextMousePos[ctx.ChartNewId][i][4]);
2472				D12=jsTextMousePos[ctx.ChartNewId][i][3].p1-P12*jsTextMousePos[ctx.ChartNewId][i][2].p1;
2473				D34=jsTextMousePos[ctx.ChartNewId][i][3].p3-P12*jsTextMousePos[ctx.ChartNewId][i][2].p3;
2474				// D13 & D24;
2475				P13=-1/P12;
2476				D13=jsTextMousePos[ctx.ChartNewId][i][3].p1-P13*jsTextMousePos[ctx.ChartNewId][i][2].p1;
2477				D24=jsTextMousePos[ctx.ChartNewId][i][3].p4-P13*jsTextMousePos[ctx.ChartNewId][i][2].p4;
2478				// Check if in rectangle;
2479					
2480				y1=P12*canvas_pos.x+D12;
2481				y2=P12*canvas_pos.x+D34;
2482				y3=P13*canvas_pos.x+D13;
2483				y4=P13*canvas_pos.x+D24;
2484				
2485				if(canvas_pos.y < Math.min(y1,y2))inRect=false;
2486				if(canvas_pos.y > Math.max(y1,y2))inRect=false;
2487				if(canvas_pos.y < Math.min(y3,y4))inRect=false;
2488				if(canvas_pos.y > Math.max(y3,y4))inRect=false;
2489			}
2490			if(inRect)textOnChartFound[textOnChartFound.length]=i;
2491		}
2492	}
2493
2494	function isAction(option,action) {
2495		return(option==action || (option=="mousemove" && (action=="mousewheel" || action=="mouseout")));
2496	}
2497
2498	if(config.savePng && isAction(config.savePngFunction,realAction)) {
2499		// call savePng function;
2500		saveCanvas(ctx, data, config);
2501	}
2502	
2503	var whoToReferAnnotate=-1;
2504	var whoToReferHighLight=-1;
2505	var referAnnotateIsPoint=false;
2506	var referHighLightIsPoint=false;
2507	for(i=pieceOfChartFound.length-1;i>=0;i--) {
2508		if (jsGraphAnnotate[ctx.ChartNewId][pieceOfChartFound[i].piece][4]) {
2509			if(referAnnotateIsPoint==false) {
2510				if(whoToReferAnnotate==-1)whoToReferAnnotate=i;
2511				if(jsGraphAnnotate[ctx.ChartNewId][pieceOfChartFound[i].piece][0] == "POINT") {
2512					whoToReferAnnotate=i;
2513					referAnnotateIsPoint=true;
2514				}
2515			}
2516		}
2517		if(referHighLightIsPoint==false) {
2518			if(whoToReferHighLight==-1)whoToReferHighLight=i;
2519			if(jsGraphAnnotate[ctx.ChartNewId][pieceOfChartFound[i].piece][0] == "POINT") {
2520				whoToReferHighLight=i;
2521				referHighLightIsPoint=true;
2522			}
2523		}
2524		
2525	}
2526	
2527	if(config.annotateDisplay && isAction(config.annotateFunction,realAction)) {
2528		// annotate display functionality;
2529		annotateDIV = document.getElementById(annotate_shape);
2530		annotateDIV.style.display = false ? '' : 'none';
2531		if(pieceOfChartFound.length>0) {
2532      initAnnotateDiv(annotateDIV,config,ctx);
2533			ctx.save();
2534			ctx.font= annotateDIV.style.fontStyle+" "+ annotateDIV.style.fontSize+" "+annotateDIV.style.fontFamily;
2535			var rect = ctx.canvas.getBoundingClientRect();
2536			showDiv=false;
2537			if(whoToReferAnnotate!=-1) {
2538				if (jsGraphAnnotate[ctx.ChartNewId][pieceOfChartFound[whoToReferAnnotate].piece][4]) {
2539          displayAnnotate(ctx,data,config,rect,event,annotateDIV,jsGraphAnnotate,pieceOfChartFound[whoToReferAnnotate],pieceOfChartFound[whoToReferAnnotate].myStatData,jsGraphAnnotate[ctx.ChartNewId][pieceOfChartFound[whoToReferAnnotate].piece][3]);
2540					showDiv=true;
2541				}
2542			}
2543		}		
2544		
2545
2546	}
2547
2548	if(inMouseAction[ctx.ChartNewId]==false && mouseActionData[ctx.ChartNewId].prevShow>=0 && isAction("mousemove",realAction) && (pieceOfChartFound.length==0 || mouseActionData[ctx.ChartNewId].prevShow!=pieceOfChartFound[pieceOfChartFound.length-1].piece)) {
2549                inMouseAction[ctx.ChartNewId]=true;
2550		prevShow=mouseActionData[ctx.ChartNewId].prevShow;
2551		mouseActionData[ctx.ChartNewId].prevShow=-1;
2552
2553	       	if(config.highLight && isAction(config.highLightMouseFunction,realAction) && pieceOfChartFound.length==0) {
2554			highLightAction("HIDE",ctx,data,config,null,null);
2555		}	
2556                	
2557		if(typeof config.annotateFunctionOut=="function") {
2558			if(jsGraphAnnotate[ctx.ChartNewId][prevShow][0] == "ARC")config.annotateFunctionOut("OUTANNOTATE",ctx,data,jsGraphAnnotate[ctx.ChartNewId][prevShow][3],jsGraphAnnotate[ctx.ChartNewId][prevShow][1],-1,null);
2559			else  config.annotateFunctionOut("OUTANNOTATE",ctx,data,jsGraphAnnotate[ctx.ChartNewId][prevShow][3],jsGraphAnnotate[ctx.ChartNewId][prevShow][1],jsGraphAnnotate[ctx.ChartNewId][prevShow][2],null);
2560		}
2561		inMouseAction[ctx.ChartNewId]=false;
2562	}
2563	
2564
2565	if(pieceOfChartFound.length>0 && inMouseAction[ctx.ChartNewId]==false && mouseActionData[ctx.ChartNewId].prevShow!=pieceOfChartFound[whoToReferHighLight].piece && isAction("mousemove",realAction)) {
2566		inMouseAction[ctx.ChartNewId]=true;
2567		prevShow=mouseActionData[ctx.ChartNewId].prevShow;
2568	       	if(config.highLight && isAction(config.highLightMouseFunction,realAction)) {
2569			if(whoToReferHighLight!=-1) {
2570				if(jsGraphAnnotate[ctx.ChartNewId][pieceOfChartFound[whoToReferHighLight].piece][0] == "ARC") highLightAction("ARC",ctx,data,config,jsGraphAnnotate[ctx.ChartNewId][pieceOfChartFound[whoToReferHighLight].piece][1],-1);
2571				else highLightAction(jsGraphAnnotate[ctx.ChartNewId][pieceOfChartFound[whoToReferHighLight].piece][0],ctx,data,config,jsGraphAnnotate[ctx.ChartNewId][pieceOfChartFound[whoToReferHighLight].piece][1],jsGraphAnnotate[ctx.ChartNewId][pieceOfChartFound[whoToReferHighLight].piece][2]);
2572			}
2573		}	
2574
2575		if(typeof config.annotateFunctionIn=="function") {
2576			if(jsGraphAnnotate[ctx.ChartNewId][pieceOfChartFound[pieceOfChartFound.length-1].piece][0] == "ARC")config.annotateFunctionIn("INANNOTATE",ctx,data,jsGraphAnnotate[ctx.ChartNewId][pieceOfChartFound[pieceOfChartFound.length-1].piece][3],jsGraphAnnotate[ctx.ChartNewId][pieceOfChartFound[pieceOfChartFound.length-1].piece][1],-1,null);
2577			else  config.annotateFunctionIn("INANNOTATE",ctx,data,jsGraphAnnotate[ctx.ChartNewId][pieceOfChartFound[pieceOfChartFound.length-1].piece][3],jsGraphAnnotate[ctx.ChartNewId][pieceOfChartFound[pieceOfChartFound.length-1].piece][1],jsGraphAnnotate[ctx.ChartNewId][pieceOfChartFound[pieceOfChartFound.length-1].piece][2],null);
2578		}
2579		inMouseAction[ctx.ChartNewId]=false;
2580		mouseActionData[ctx.ChartNewId].prevShow=pieceOfChartFound[whoToReferHighLight].piece;
2581	}
2582
2583       	if (config.highLight && isAction(config.highLightMouseFunction,realAction) && isAction("mousemove",realAction)==false) {
2584		if(pieceOfChartFound.length==0)highLightAction("HIDE",ctx,data,config,null,null);
2585		else {
2586			if(whoToReferHighLight!=-1) {
2587				if(jsGraphAnnotate[ctx.ChartNewId][pieceOfChartFound[whoToReferHighLight].piece][0] == "ARC") highLightAction("ARC",ctx,data,config,jsGraphAnnotate[ctx.ChartNewId][pieceOfChartFound[whoToReferHighLight].piece][1],-1);
2588				else highLightAction(jsGraphAnnotate[ctx.ChartNewId][pieceOfChartFound[whoToReferHighLight].piece][0],ctx,data,config,jsGraphAnnotate[ctx.ChartNewId][pieceOfChartFound[whoToReferHighLight].piece][1],jsGraphAnnotate[ctx.ChartNewId][pieceOfChartFound[whoToReferHighLight].piece][2]);
2589			}
2590		}
2591	}
2592
2593
2594	function runFunction(toBeRun){
2595		var i;
2596		for(i=0;i<pieceOfChartFound.length;i++) {
2597			toBeRun(event, ctx, config, data, pieceOfChartFound[i].myStatData);
2598		}
2599		for(i=0;i<textOnChartFound.length;i++) {
2600			toBeRun(event, ctx, config, data, {type:"CLICKONTEXT",values:jsTextMousePos[ctx.ChartNewId][textOnChartFound[i]]});
2601		}
2602		if(pieceOfChartFound.length==0 && textOnChartFound.length==0) {
2603			toBeRun(event, ctx, config, data, null);
2604		}
2605	};
2606
2607	if(typeof config.mouseMove=="function" && isAction("mousemove",realAction)) runFunction(config.mouseMove);
2608	if(typeof config.mouseDownLeft=="function" && isAction("mousedown left",realAction))runFunction(config.mouseDownLeft);
2609	if(typeof config.mouseDownRight=="function" && isAction("mousedown right",realAction)) runFunction(config.mouseDownRight);
2610	if(typeof config.mouseDownMiddle=="function" && isAction("mousedown middle",realAction)) runFunction(config.mouseDownMiddle);
2611	if(typeof config.mouseWheel=="function" && isAction("mousewheel",realAction)) runFunction(config.mouseWheel);
2612	if(typeof config.mouseOut=="function" && isAction("mouseout",realAction)) runFunction(config.mouseOut);
2613	if(typeof config.mouseDblClick=="function" && isAction("dblclick",realAction)) runFunction(config.mouseDblClick);
2614};
2615                         
2616///////// GRAPHICAL PART OF THE SCRIPT ///////////////////////////////////////////
2617//Define the global Chart Variable as a class.
2618window.Chart = function(context) {
2619	var chart = this;
2620	//Easing functions adapted from Robert Penner's easing equations
2621	//http://www.robertpenner.com/easing/
2622	var animationOptions = {
2623		linear: function(t) {
2624			return t;
2625		},
2626		easeInQuad: function(t) {
2627			return t * t;
2628		},
2629		easeOutQuad: function(t) {
2630			return -1 * t * (t - 2);
2631		},
2632		easeInOutQuad: function(t) {
2633			if ((t /= 1 / 2) < 1) return 1 / 2 * t * t;
2634			return -1 / 2 * ((--t) * (t - 2) - 1);
2635		},
2636		easeInCubic: function(t) {
2637			return t * t * t;
2638		},
2639		easeOutCubic: function(t) {
2640			return 1 * ((t = t / 1 - 1) * t * t + 1);
2641		},
2642		easeInOutCubic: function(t) {
2643			if ((t /= 1 / 2) < 1) return 1 / 2 * t * t * t;
2644			return 1 / 2 * ((t -= 2) * t * t + 2);
2645		},
2646		easeInQuart: function(t) {
2647			return t * t * t * t;
2648		},
2649		easeOutQuart: function(t) {
2650			return -1 * ((t = t / 1 - 1) * t * t * t - 1);
2651		},
2652		easeInOutQuart: function(t) {
2653			if ((t /= 1 / 2) < 1) return 1 / 2 * t * t * t * t;
2654			return -1 / 2 * ((t -= 2) * t * t * t - 2);
2655		},
2656		easeInQuint: function(t) {
2657			return 1 * (t /= 1) * t * t * t * t;
2658		},
2659		easeOutQuint: function(t) {
2660			return 1 * ((t = t / 1 - 1) * t * t * t * t + 1);
2661		},
2662		easeInOutQuint: function(t) {
2663			if ((t /= 1 / 2) < 1) return 1 / 2 * t * t * t * t * t;
2664			return 1 / 2 * ((t -= 2) * t * t * t * t + 2);
2665		},
2666		easeInSine: function(t) {
2667			return -1 * Math.cos(t / 1 * (Math.PI / 2)) + 1;
2668		},
2669		easeOutSine: function(t) {
2670			return 1 * Math.sin(t / 1 * (Math.PI / 2));
2671		},
2672		easeInOutSine: function(t) {
2673			return -1 / 2 * (Math.cos(Math.PI * t / 1) - 1);
2674		},
2675		easeInExpo: function(t) {
2676			return (t == 0) ? 1 : 1 * Math.pow(2, 10 * (t / 1 - 1));
2677		},
2678		easeOutExpo: function(t) {
2679			return (t == 1) ? 1 : 1 * (-Math.pow(2, -10 * t / 1) + 1);
2680		},
2681		easeInOutExpo: function(t) {
2682			if (t == 0) return 0;
2683			if (t == 1) return 1;
2684			if ((t /= 1 / 2) < 1) return 1 / 2 * Math.pow(2, 10 * (t - 1));
2685			return 1 / 2 * (-Math.pow(2, -10 * --t) + 2);
2686		},
2687		easeInCirc: function(t) {
2688			if (t >= 1) return t;
2689			return -1 * (Math.sqrt(1 - (t /= 1) * t) - 1);
2690		},
2691		easeOutCirc: function(t) {
2692			return 1 * Math.sqrt(1 - (t = t / 1 - 1) * t);
2693		},
2694		easeInOutCirc: function(t) {
2695			if ((t /= 1 / 2) < 1) return -1 / 2 * (Math.sqrt(1 - t * t) - 1);
2696			return 1 / 2 * (Math.sqrt(1 - (t -= 2) * t) + 1);
2697		},
2698		easeInElastic: function(t) {
2699			var s = 1.70158;
2700			var p = 0;
2701			var a = 1;
2702			if (t == 0) return 0;
2703			if ((t /= 1) == 1) return 1;
2704			if (!p) p = 1 * .3;
2705			if (a < Math.abs(1)) {
2706				a = 1;
2707				s = p / 4;
2708			} else s = p / (2 * Math.PI) * Math.asin(1 / a);
2709			return -(a * Math.pow(2, 10 * (t -= 1)) * Math.sin((t * 1 - s) * (2 * Math.PI) / p));
2710		},
2711		easeOutElastic: function(t) {
2712			var s = 1.70158;
2713			var p = 0;
2714			var a = 1;
2715			if (t == 0) return 0;
2716			if ((t /= 1) == 1) return 1;
2717			if (!p) p = 1 * .3;
2718			if (a < Math.abs(1)) {
2719				a = 1;
2720				s = p / 4;
2721			} else s = p / (2 * Math.PI) * Math.asin(1 / a);
2722			return a * Math.pow(2, -10 * t) * Math.sin((t * 1 - s) * (2 * Math.PI) / p) + 1;
2723		},
2724		easeInOutElastic: function(t) {
2725			var s = 1.70158;
2726			var p = 0;
2727			var a = 1;
2728			if (t == 0) return 0;
2729			if ((t /= 1 / 2) == 2) return 1;
2730			if (!p) p = 1 * (.3 * 1.5);
2731			if (a < Math.abs(1)) {
2732				a = 1;
2733				s = p / 4;
2734			} else s = p / (2 * Math.PI) * Math.asin(1 / a);
2735			if (t < 1) return -.5 * (a * Math.pow(2, 10 * (t -= 1)) * Math.sin((t * 1 - s) * (2 * Math.PI) / p));
2736			return a * Math.pow(2, -10 * (t -= 1)) * Math.sin((t * 1 - s) * (2 * Math.PI) / p) * .5 + 1;
2737		},
2738		easeInBack: function(t) {
2739			var s = 1.70158;
2740			return 1 * (t /= 1) * t * ((s + 1) * t - s);
2741		},
2742		easeOutBack: function(t) {
2743			var s = 1.70158;
2744			return 1 * ((t = t / 1 - 1) * t * ((s + 1) * t + s) + 1);
2745		},
2746		easeInOutBack: function(t) {
2747			var s = 1.70158;
2748			if ((t /= 1 / 2) < 1) return 1 / 2 * (t * t * (((s *= (1.525)) + 1) * t - s));
2749			return 1 / 2 * ((t -= 2) * t * (((s *= (1.525)) + 1) * t + s) + 2);
2750		},
2751		easeInBounce: function(t) {
2752			return 1 - animationOptions.easeOutBounce(1 - t);
2753		},
2754		easeOutBounce: function(t) {
2755			if ((t /= 1) < (1 / 2.75)) {
2756				return 1 * (7.5625 * t * t);
2757			} else if (t < (2 / 2.75)) {
2758				return 1 * (7.5625 * (t -= (1.5 / 2.75)) * t + .75);
2759			} else if (t < (2.5 / 2.75)) {
2760				return 1 * (7.5625 * (t -= (2.25 / 2.75)) * t + .9375);
2761			} else {
2762				return 1 * (7.5625 * (t -= (2.625 / 2.75)) * t + .984375);
2763			}
2764		},
2765		easeInOutBounce: function(t) {
2766			if (t < 1 / 2) return animationOptions.easeInBounce(t * 2) * .5;
2767			return animationOptions.easeOutBounce(t * 2 - 1) * .5 + 1 * .5;
2768		}
2769	};
2770	//Variables global to the chart
2771	
2772	var width = context.canvas.width;
2773	var height = context.canvas.height;
2774
2775	this.Doughnut = function(data, options) {
2776		chart.Doughnut.defaults = chart.defaults.PieAndDoughnutV2;
2777		chart.Doughnut.defaults = mergeChartConfig(chart.defaults.PieAndDoughnut, chart.Doughnut.defaults);
2778		// merge annotate defaults
2779		if(isIE()<9 && isIE() != false)chart.Doughnut.defaults = mergeChartConfig(chart.defaults.IExplorer8, chart.Doughnut.defaults);
2780		chart.Doughnut.defaults = mergeChartConfig(chart.defaults.commonOptions, chart.Doughnut.defaults);
2781		chart.Doughnut.defaults = mergeChartConfig(chart.Doughnut.defaults, charJSPersonalDefaultOptions);
2782		chart.Doughnut.defaults = mergeChartConfig(chart.Doughnut.defaults, charJSPersonalDefaultOptionsDoughnut);
2783		var config = (options) ? mergeChartConfig(chart.Doughnut.defaults, options) : chart.Doughnut.defaults;
2784		return new Doughnut(data, config, context);
2785	};
2786
2787	this.PolarArea = function(data, options) {
2788		chart.PolarArea.defaults = chart.defaults.PolarAreaV2;
2789		chart.PolarArea.defaults = mergeChartConfig(chart.defaults.PolarArea, chart.PolarArea.defaults);
2790		if(isIE()<9 && isIE() != false)chart.PolarArea.defaults = mergeChartConfig(chart.defaults.IExplorer8, chart.PolarArea.defaults);
2791		chart.PolarArea.defaults = mergeChartConfig(chart.defaults.commonOptions, chart.PolarArea.defaults);
2792		chart.PolarArea.defaults = mergeChartConfig(chart.PolarArea.defaults, charJSPersonalDefaultOptions);
2793		chart.PolarArea.defaults = mergeChartConfig(chart.PolarArea.defaults, charJSPersonalDefaultOptionsPolarArea);
2794		var config = (options) ? mergeChartConfig(chart.PolarArea.defaults, options) : chart.PolarArea.defaults;
2795		return new PolarArea(data, config, context);
2796	};
2797    
2798	this.PolarArea = function(data, options) {
2799		chart.PolarArea.defaults = chart.defaults.PolarAreaV2;
2800		chart.PolarArea.defaults = mergeChartConfig(chart.defaults.PolarArea, chart.PolarArea.defaults);
2801		if(isIE()<9 && isIE() != false)chart.PolarArea.defaults = mergeChartConfig(chart.defaults.IExplorer8, chart.PolarArea.defaults);
2802		chart.PolarArea.defaults = mergeChartConfig(chart.defaults.commonOptions, chart.PolarArea.defaults);
2803		chart.PolarArea.defaults = mergeChartConfig(chart.PolarArea.defaults, charJSPersonalDefaultOptions);
2804		chart.PolarArea.defaults = mergeChartConfig(chart.PolarArea.defaults, charJSPersonalDefaultOptionsPolarArea);
2805		var config = (options) ? mergeChartConfig(chart.PolarArea.defaults, options) : chart.PolarArea.defaults;
2806		return new PolarArea(data, config, context);
2807	};
2808
2809	
2810	this.Radar = function(data, options) {
2811		chart.Radar.defaults = {
2812			highLightSet : { pointDotRadius: 15, pointDot : true },
2813			inGraphDataShow: false,
2814			inGraphDataPaddingRadius: 5,
2815			inGraphDataTmpl: "<%=v3%>",
2816			inGraphDataAlign: "off-center", // "right", "center", "left", "off-center" or "to-center"
2817			inGraphDataVAlign: "off-center", // "right", "center", "left", "off-center" or "to-center"
2818			inGraphDataRotate: 0, // rotateAngle value (0->360) , "inRadiusAxis" or "inRadiusAxisRotateLabels"
2819			inGraphDataFontFamily: "'Arial'",
2820			inGraphDataFontSize: 12,
2821			inGraphDataFontStyle: "normal",
2822			inGraphDataFontColor: "#666",
2823			inGraphDataRadiusPosition: 3,
2824			yAxisMinimumInterval: "none",
2825			scaleGridLinesStep : 1,
2826			scaleOverlay: false,
2827			scaleOverride: false,
2828			scaleOverride2: false,
2829			forceSecondScale : false,
2830			scaleSteps: null,
2831			scaleStepWidth: null,
2832			scaleStartValue: null,
2833			scaleShowLine: true,
2834			scaleLineColor: "rgba(0,0,0,.1)",
2835			scaleLineStyle: "solid",
2836			scaleLineWidth: 1,
2837			scaleShowLabels: false,
2838			scaleShowLabels2: true,
2839			scaleLabel: "<%=value%>",
2840			scaleFontFamily: "'Arial'",
2841			scaleFontSize: 12,
2842			scaleFontStyle: "normal",
2843			scaleFontColor: "#666",
2844			scaleShowLabelBackdrop: true,
2845			scaleBackdropColor: "rgba(255,255,255,0.75)",
2846			scaleBackdropPaddingY: 2,
2847			scaleBackdropPaddingX: 2,
2848			angleShowLineOut: true,
2849			angleLineColor: "rgba(0,0,0,.1)",
2850			angleLineStyle: "solid",
2851			angleLineWidth: 1,
2852			pointLabelFontFamily: "'Arial'",
2853			pointLabelFontStyle: "normal",
2854			pointLabelFontSize: 12,
2855			pointLabelFontColor: "#666",
2856			pointDot: true,
2857			pointDotRadius: 3,
2858			pointDotStrokeWidth: 1,
2859			pointDotStrokeStyle:"solid",
2860			datasetFill: true,
2861			datasetStrokeWidth: 2,
2862			datasetStrokeStyle:"solid",
2863			animation: true,
2864			animationSteps: 60,
2865			animationEasing: "easeOutQuart",
2866			onAnimationComplete: null,
2867      alwaysRunFunctionAtCompletion: false,
2868			annotateLabel: "<%=(v1 == '' ? '' : v1) + (v1!='' && v2 !='' ? ' - ' : '')+(v2 == '' ? '' : v2)+(v1!='' || v2 !='' ? ':' : '') + v3%>",
2869			pointHitDetectionRadius : 10,
2870			startAngle: 90
2871		};
2872		// merge annotate defaults
2873		if(isIE()<9 && isIE() != false)chart.Radar.defaults = mergeChartConfig(chart.defaults.IExplorer8, chart.Radar.defaults);
2874		chart.Radar.defaults = mergeChartConfig(chart.defaults.commonOptions, chart.Radar.defaults);
2875		chart.Radar.defaults = mergeChartConfig(chart.Radar.defaults, charJSPersonalDefaultOptions);
2876		chart.Radar.defaults = mergeChartConfig(chart.Radar.defaults, charJSPersonalDefaultOptionsRadar);
2877		var config = (options) ? mergeChartConfig(chart.Radar.defaults, options) : chart.Radar.defaults;
2878		return new Radar(data, config, context);
2879	};
2880
2881	this.Pie = function(data, options) {
2882		chart.Pie.defaults = chart.defaults.PieAndDoughnutV2;
2883		chart.Pie.defaults = mergeChartConfig(chart.defaults.PieAndDoughnut, chart.Pie.defaults);
2884		// merge annotate defaults
2885		if(isIE()<9 && isIE() != false)chart.Pie.defaults = mergeChartConfig(chart.defaults.IExplorer8, chart.Pie.defaults);
2886		chart.Pie.defaults = mergeChartConfig(chart.defaults.commonOptions, chart.Pie.defaults);
2887		chart.Pie.defaults = mergeChartConfig(chart.Pie.defaults, charJSPersonalDefaultOptions);
2888		chart.Pie.defaults = mergeChartConfig(chart.Pie.defaults, charJSPersonalDefaultOptionsPie);
2889		var config = (options) ? mergeChartConfig(chart.Pie.defaults, options) : chart.Pie.defaults;
2890		return new Pie(data, config, context);
2891	};
2892	this.Doughnut = function(data, options) {
2893		chart.Doughnut.defaults = chart.defaults.PieAndDoughnutV2;
2894		chart.Doughnut.defaults = mergeChartConfig(chart.defaults.PieAndDoughnut, chart.Doughnut.defaults);
2895		// merge annotate defaults
2896		if(isIE()<9 && isIE() != false)chart.Doughnut.defaults = mergeChartConfig(chart.defaults.IExplorer8, chart.Doughnut.defaults);
2897		chart.Doughnut.defaults = mergeChartConfig(chart.defaults.commonOptions, chart.Doughnut.defaults);
2898		chart.Doughnut.defaults = mergeChartConfig(chart.Doughnut.defaults, charJSPersonalDefaultOptions);
2899		chart.Doughnut.defaults = mergeChartConfig(chart.Doughnut.defaults, charJSPersonalDefaultOptionsDoughnut);
2900		var config = (options) ? mergeChartConfig(chart.Doughnut.defaults, options) : chart.Doughnut.defaults;
2901		return new Doughnut(data, config, context);
2902	};
2903	this.Line = function(data, options) {
2904		chart.Line.defaults = {
2905			inGraphDataShow: false,
2906			highLightSet : { pointDotRadius: 15, pointDot : true },
2907			inGraphDataPaddingX: 3,
2908			inGraphDataPaddingY: 3,
2909			inGraphDataTmpl: "<%=v3%>",
2910			inGraphDataAlign: "left",
2911			inGraphDataVAlign: "bottom",
2912			inGraphDataRotate: 0,
2913			inGraphDataFontFamily: "'Arial'",
2914			inGraphDataFontSize: 12,
2915			inGraphDataFontStyle: "normal",
2916			inGraphDataFontColor: "#666",
2917			scaleOverlay: false,
2918			scaleOverride: false,
2919			scaleOverride2: false,
2920			forceSecondScale : false,
2921			scaleSteps: null,
2922			scaleStepWidth: null,
2923			scaleStartValue: null,
2924			scaleSteps2: null,
2925			scaleStepWidth2: null,
2926			scaleStartValue2: null,
2927			scaleLabel2 : "<%=value%>",
2928			scaleLineColor: "rgba(0,0,0,.1)",
2929			scaleLineStyle: "solid",
2930			scaleLineWidth: 1,
2931			scaleShowLabels: true,
2932			scaleShowLabels2: true,
2933			scaleLabel: "<%=value%>",
2934			scaleFontFamily: "'Arial'",
2935			scaleFontSize: 12,
2936			scaleFontStyle: "normal",
2937			scaleFontColor: "#666",
2938			scaleShowGridLines: true,
2939			scaleXGridLinesStep: 1,
2940			scaleYGridLinesStep: 1,
2941			scaleGridLineColor: "rgba(0,0,0,.05)",
2942			scaleGridLineStyle: "solid",
2943			scaleGridLineWidth: 1,
2944			showYAxisMin: true, // Show the minimum value on Y axis (in original version, this minimum is not displayed - it can overlap the X labels)
2945			rotateLabels: "smart", // smart <=> 0 degre if space enough; otherwise 45 degres if space enough otherwise90 degre; 
2946			rotateTLabels: "smart", // smart <=> 0 degre if space enough; otherwise 45 degres if space enough otherwise90 degre; 
2947			// you can force an integer value between 0 and 180 degres
2948			logarithmic: false, // can be 'fuzzy',true and false ('fuzzy' => if the gap between min and maximum is big it's using a logarithmic y-Axis scale
2949			logarithmic2: false, // can be 'fuzzy',true and false ('fuzzy' => if the gap between min and maximum is big it's using a logarithmic y-Axis scale
2950			scaleTickSizeLeft: 5,
2951			scaleTickSizeRight: 5,
2952			scaleTickSizeBottom: 5,
2953			scaleTickSizeTop: 5,
2954			bezierCurve: true,
2955			linkType : 0,   //0 : direct point to point; 1 = vertical lines; 2=angular link;
2956			bezierCurveTension : 0.4,
2957			pointDot: true,
2958			pointDotRadius: 4,
2959			pointDotStrokeStyle: "solid",
2960			pointDotStrokeWidth: 2,
2961			datasetStrokeStyle: "solid",
2962			datasetStrokeWidth: 2,
2963			datasetFill: true,
2964			animation: true,
2965			animationSteps: 60,
2966			animationEasing: "easeOutQuart",
2967			extrapolateMissingData: true,
2968			onAnimationComplete: null,
2969      alwaysRunFunctionAtCompletion: false,
2970			annotateLabel: "<%=(v1 == '' ? '' : v1) + (v1!='' && v2 !='' ? ' - ' : '')+(v2 == '' ? '' : v2)+(v1!='' || v2 !='' ? ':' : '') + v3%>",
2971			pointHitDetectionRadius : 10
2972		};
2973		// merge annotate defaults
2974		if(isIE()<9 && isIE() != false)chart.Line.defaults = mergeChartConfig(chart.defaults.IExplorer8, chart.Line.defaults);
2975		chart.Line.defaults = mergeChartConfig(chart.defaults.commonOptions, chart.Line.defaults);
2976		chart.Line.defaults = mergeChartConfig(chart.defaults.xyAxisCommonOptions, chart.Line.defaults);
2977		chart.Line.defaults = mergeChartConfig(chart.Line.defaults, charJSPersonalDefaultOptions);
2978		chart.Line.defaults = mergeChartConfig(chart.Line.defaults, charJSPersonalDefaultOptionsLine);
2979		var config = (options) ? mergeChartConfig(chart.Line.defaults, options) : chart.Line.defaults;
2980		return new Line(data, config, context);
2981	};
2982	this.StackedBar = function(data, options) {
2983		chart.StackedBar.defaults = {
2984			annotateBarMinimumDetectionHeight : 0,
2985			highLightSet : { pointDotRadius: 15, barStrokeWidth : 5, pointDot : true },
2986			inGraphDataShow: false,
2987			inGraphDataPaddingX: 0,
2988			inGraphDataPaddingY: -3,
2989			inGraphDataTmpl: "<%=v3%>",
2990			inGraphDataAlign: "center",
2991			inGraphDataVAlign: "top",
2992			inGraphDataRotate: 0,
2993			inGraphDataFontFamily: "'Arial'",
2994			inGraphDataFontSize: 12,
2995			inGraphDataFontStyle: "normal",
2996			inGraphDataFontColor: "#666",
2997			inGraphDataXPosition: 2,
2998			inGraphDataYPosition: 3,
2999			scaleOverlay: false,
3000			scaleOverride: false,
3001			scaleOverride2: false,
3002			forceSecondScale : false,
3003			scaleSteps: null,
3004			scaleStepWidth: null,
3005			scaleStartValue: null,
3006			scaleSteps2: null,
3007			scaleStepWidth2: null,
3008			scaleStartValue2: null,
3009			scaleLineColor: "rgba(0,0,0,.1)",
3010			scaleLineStyle: "solid",
3011			scaleLineWidth: 1,
3012			scaleShowLabels: true,
3013			scaleShowLabels2: true,
3014			scaleLabel: "<%=value%>",
3015			scaleLabel2: "<%=value%>",
3016			scaleFontFamily: "'Arial'",
3017			scaleFontSize: 12,
3018			scaleFontStyle: "normal",
3019			scaleFontColor: "#666",
3020			scaleShowGridLines: true,
3021			scaleXGridLinesStep: 1,
3022			scaleYGridLinesStep: 1,
3023			scaleGridLineColor: "rgba(0,0,0,.05)",
3024			scaleGridLineStyle: "solid",
3025			scaleGridLineWidth: 1,
3026			showYAxisMin: true, // Show the minimum value on Y axis (in original version, this minimum is not displayed - it can overlap the X labels)
3027			rotateLabels: "smart", // smart <=> 0 degre if space enough; otherwise 45 degres if space enough otherwise90 degre; 
3028			rotateTLabels: "smart", // smart <=> 0 degre if space enough; otherwise 45 degres if space enough otherwise90 degre; 
3029			// you can force an integer value between 0 and 180 degres
3030			scaleTickSizeLeft: 5,
3031			scaleTickSizeRight: 5,
3032			scaleTickSizeBottom: 5,
3033			scaleTickSizeTop: 5,
3034			pointDot: true,
3035			pointDotRadius: 4,
3036			pointDotStrokeStyle: "solid",
3037			pointDotStrokeWidth: 2,
3038			barShowStroke: true,
3039			barValueSpacing: 5,
3040			barDatasetSpacing: 1,
3041			spaceBetweenBar : 0,
3042			animation: true,
3043			animationSteps: 60,
3044			animationEasing: "easeOutQuart",
3045			onAnimationComplete: null,
3046      alwaysRunFunctionAtCompletion: false,
3047			bezierCurve: true,
3048			linkType : 0,   //0 : direct point to point; 1 = vertical lines; 2=angular link;
3049			bezierCurveTension : 0.4,
3050			annotateLabel: "<%=(v1 == '' ? '' : v1) + (v1!='' && v2 !='' ? ' - ' : '')+(v2 == '' ? '' : v2)+(v1!='' || v2 !='' ? ':' : '') + v3 + ' (' + v6 + ' %)'%>",
3051			pointHitDetectionRadius : 10
3052		};
3053		// merge annotate defaults
3054		if(isIE()<9 && isIE() != false)chart.StackedBar.defaults = mergeChartConfig(chart.defaults.IExplorer8, chart.StackedBar.defaults);
3055		chart.StackedBar.defaults = mergeChartConfig(chart.defaults.commonOptions, chart.StackedBar.defaults);
3056		chart.StackedBar.defaults = mergeChartConfig(chart.defaults.xyAxisCommonOptions, chart.StackedBar.defaults);
3057		chart.StackedBar.defaults = mergeChartConfig(chart.StackedBar.defaults, charJSPersonalDefaultOptions);
3058		chart.StackedBar.defaults = mergeChartConfig(chart.StackedBar.defaults, charJSPersonalDefaultOptionsStackedBar);
3059		var config = (options) ? mergeChartConfig(chart.StackedBar.defaults, options) : chart.StackedBar.defaults;
3060		return new StackedBar(data, config, context);
3061	};
3062	this.HorizontalStackedBar = function(data, options) {
3063		chart.HorizontalStackedBar.defaults = {
3064			annotateBarMinimumDetectionHeight : 0,
3065			highLightSet : { pointDotRadius: 15, barStrokeWidth : 5, pointDot : true },
3066			inGraphDataShow: false,
3067			inGraphDataPaddingX: -3,
3068			inGraphDataPaddingY: 0,
3069			inGraphDataTmpl: "<%=v3%>",
3070			inGraphDataAlign: "right",
3071			inGraphDataVAlign: "middle",
3072			inGraphDataRotate: 0,
3073			inGraphDataFontFamily: "'Arial'",
3074			inGraphDataFontSize: 12,
3075			inGraphDataFontStyle: "normal",
3076			inGraphDataFontColor: "#666",
3077			inGraphDataXPosition: 3,
3078			inGraphDataYPosition: 2,
3079			scaleOverlay: false,
3080			scaleOverride: false,
3081			scaleOverride2: false,
3082			forceSecondScale : false,
3083			scaleSteps: null,
3084			scaleStepWidth: null,
3085			scaleStartValue: null,
3086			scaleLineColor: "rgba(0,0,0,.1)",
3087			scaleLineStyle: "solid",
3088			scaleLineWidth: 1,
3089			scaleShowLabels: true,
3090			scaleShowLabels2: true,
3091			scaleLabel: "<%=value%>",
3092			scaleFontFamily: "'Arial'",
3093			scaleFontSize: 12,
3094			scaleFontStyle: "normal",
3095			scaleFontColor: "#666",
3096			scaleShowGridLines: true,
3097			scaleXGridLinesStep: 1,
3098			scaleYGridLinesStep: 1,
3099			scaleGridLineColor: "rgba(0,0,0,.05)",
3100			scaleGridLineStyle: "solid",
3101			scaleGridLineWidth: 1,
3102			scaleTickSizeLeft: 5,
3103			scaleTickSizeRight: 5,
3104			scaleTickSizeBottom: 5,
3105			scaleTickSizeTop: 5,
3106			showYAxisMin: true, // Show the minimum value on Y axis (in original version, this minimum is not displayed - it can overlap the X labels)
3107			rotateLabels: "smart", // smart <=> 0 degre if space enough; otherwise 45 degres if space enough otherwise90 degre; 
3108			rotateTLabels: "smart", // smart <=> 0 degre if space enough; otherwise 45 degres if space enough otherwise90 degre; 
3109			barShowStroke: true,
3110			barValueSpacing: 5,
3111			barDatasetSpacing: 1,
3112			spaceBetweenBar : 0,
3113			animation: true,
3114			animationSteps: 60,
3115			animationEasing: "easeOutQuart",
3116			onAnimationComplete: null,
3117      alwaysRunFunctionAtCompletion: false,
3118			annotateLabel: "<%=(v1 == '' ? '' : v1) + (v1!='' && v2 !='' ? ' - ' : '')+(v2 == '' ? '' : v2)+(v1!='' || v2 !='' ? ':' : '') + v3 + ' (' + v6 + ' %)'%>",
3119			reverseOrder: false
3120		};
3121		// merge annotate defaults
3122		if(isIE()<9 && isIE() != false)chart.HorizontalStackedBar.defaults = mergeChartConfig(chart.defaults.IExplorer8, chart.HorizontalStackedBar.defaults);
3123		chart.HorizontalStackedBar.defaults = mergeChartConfig(chart.defaults.commonOptions, chart.HorizontalStackedBar.defaults);
3124		chart.HorizontalStackedBar.defaults = mergeChartConfig(chart.defaults.xyAxisCommonOptions, chart.HorizontalStackedBar.defaults);
3125		chart.HorizontalStackedBar.defaults = mergeChartConfig(chart.HorizontalStackedBar.defaults, charJSPersonalDefaultOptions);
3126		chart.HorizontalStackedBar.defaults = mergeChartConfig(chart.HorizontalStackedBar.defaults, charJSPersonalDefaultOptionsHorizontalStackedBar);
3127		var config = (options) ? mergeChartConfig(chart.HorizontalStackedBar.defaults, options) : chart.HorizontalStackedBar.defaults;
3128		return new HorizontalStackedBar(data, config, context);
3129	};
3130	this.Bar = function(data, options) {
3131		chart.Bar.defaults = {
3132			annotateBarMinimumDetectionHeight : 0,
3133			highLightSet : { pointDotRadius: 15, barStrokeWidth : 5, pointDot : true },
3134			inGraphDataShow: false,
3135			inGraphDataPaddingX: 0,
3136			inGraphDataPaddingY: 3,
3137			inGraphDataTmpl: "<%=v3%>",
3138			inGraphDataAlign: "center",
3139			inGraphDataVAlign: "bottom",
3140			inGraphDataRotate: 0,
3141			inGraphDataFontFamily: "'Arial'",
3142			inGraphDataFontSize: 12,
3143			inGraphDataFontStyle: "normal",
3144			inGraphDataFontColor: "#666",
3145			inGraphDataXPosition: 2,
3146			inGraphDataYPosition: 3,
3147			scaleOverlay: false,
3148			scaleOverride: false,
3149			scaleOverride2: false,
3150			forceSecondScale : false,
3151			scaleSteps: null,
3152			scaleStepWidth: null,
3153			scaleStartValue: null,
3154			scaleSteps2: null,
3155			scaleStepWidth2: null,
3156			scaleStartValue2: null,
3157			scaleLineColor: "rgba(0,0,0,.1)",
3158			scaleLineStyle: "solid",
3159			scaleLineWidth: 1,
3160			scaleShowLabels: true,
3161			scaleShowLabels2: true,
3162			scaleLabel: "<%=value%>",
3163			scaleLabel2: "<%=value%>",
3164			scaleFontFamily: "'Arial'",
3165			scaleFontSize: 12,
3166			scaleFontStyle: "normal",
3167			scaleFontColor: "#666",
3168			scaleShowGridLines: true,
3169			scaleXGridLinesStep: 1,
3170			scaleYGridLinesStep: 1,
3171			scaleGridLineColor: "rgba(0,0,0,.05)",
3172			scaleGridLineWidth: 1,
3173			scaleGridLineStyle: "solid",
3174			showYAxisMin: true, // Show the minimum value on Y axis (in original version, this minimum is not displayed - it can overlap the X labels)
3175			rotateLabels: "smart", // smart <=> 0 degre if space enough; otherwise 45 degres if space enough otherwise90 degre; 
3176			rotateTLabels: "smart", // smart <=> 0 degre if space enough; otherwise 45 degres if space enough otherwise90 degre; 
3177			// you can force an integer value between 0 and 180 degres
3178			logarithmic: false, // can be 'fuzzy',true and false ('fuzzy' => if the gap between min and maximum is big it's using a logarithmic y-Axis scale
3179			logarithmic2: false, // can be 'fuzzy',true and false ('fuzzy' => if the gap between min and maximum is big it's using a logarithmic y-Axis scale
3180			scaleTickSizeLeft: 5,
3181			scaleTickSizeRight: 5,
3182			scaleTickSizeBottom: 5,
3183			scaleTickSizeTop: 5,
3184			barShowStroke: true,
3185			barValueSpacing: 5,
3186			barDatasetSpacing: 1,
3187			barBorderRadius: 0,
3188			complementaryBar : false,
3189			complementaryBarFullHeight : false,
3190			complementaryColor : "rgba(100,100,100,0.3)",
3191			complementaryStrokeColor : "rgba(100,100,100,0.1)",
3192			pointDot: true,
3193			pointDotRadius: 4,
3194			pointDotStrokeStyle: "solid",
3195			pointDotStrokeWidth: 2,
3196			extrapolateMissingData: true,
3197			animation: true,
3198			animationSteps: 60,
3199			animationEasing: "easeOutQuart",
3200			onAnimationComplete: null,
3201      alwaysRunFunctionAtCompletion: false,
3202			bezierCurve: true,
3203			linkType : 0,   //0 : direct point to point; 1 = vertical lines; 2=angular link;
3204			bezierCurveTension : 0.4,
3205			annotateLabel: "<%=(v1 == '' ? '' : v1) + (v1!='' && v2 !='' ? ' - ' : '')+(v2 == '' ? '' : v2)+(v1!='' || v2 !='' ? ':' : '') + v3 + ' (' + v6 + ' %)'%>",
3206			pointHitDetectionRadius : 10
3207		};
3208		// merge annotate defaults
3209		if(isIE()<9 && isIE() != false)chart.Bar.defaults = mergeChartConfig(chart.defaults.IExplorer8, chart.Bar.defaults);
3210		chart.Bar.defaults = mergeChartConfig(chart.defaults.commonOptions, chart.Bar.defaults);
3211		chart.Bar.defaults = mergeChartConfig(chart.defaults.xyAxisCommonOptions, chart.Bar.defaults);
3212		chart.Bar.defaults = mergeChartConfig(chart.Bar.defaults, charJSPersonalDefaultOptions);
3213		chart.Bar.defaults = mergeChartConfig(chart.Bar.defaults, charJSPersonalDefaultOptionsBar);
3214		var config = (options) ? mergeChartConfig(chart.Bar.defaults, options) : chart.Bar.defaults;
3215		return new Bar(data, config, context);
3216	};
3217	this.HorizontalBar = function(data, options) {
3218		chart.HorizontalBar.defaults = {
3219			annotateBarMinimumDetectionHeight : 0,
3220			highLightSet : { pointDotRadius: 15, barStrokeWidth : 5, pointDot : true },
3221			inGraphDataShow: false,
3222			inGraphDataPaddingX: 3,
3223			inGraphDataPaddingY: 0,
3224			inGraphDataTmpl: "<%=v3%>",
3225			inGraphDataAlign: "left",
3226			inGraphDataVAlign: "middle",
3227			inGraphDataRotate: 0,
3228			inGraphDataFontFamily: "'Arial'",
3229			inGraphDataFontSize: 12,
3230			inGraphDataFontStyle: "normal",
3231			inGraphDataFontColor: "#666",
3232			inGraphDataXPosition: 3,
3233			inGraphDataYPosition: 2,
3234			scaleOverlay: false,
3235			scaleOverride: false,
3236			scaleOverride2: false,
3237			forceSecondScale : false,
3238			scaleSteps: null,
3239			scaleStepWidth: null,
3240			scaleStartValue: null,
3241			scaleLineColor: "rgba(0,0,0,.1)",
3242			scaleLineStyle: "solid",
3243			scaleLineWidth: 1,
3244			scaleShowLabels: true,
3245			scaleShowLabels2: true,
3246			scaleLabel: "<%=value%>",
3247			scaleFontFamily: "'Arial'",
3248			scaleFontSize: 12,
3249			scaleFontStyle: "normal",
3250			scaleFontColor: "#666",
3251			scaleShowGridLines: true,
3252			scaleXGridLinesStep: 1,
3253			scaleYGridLinesStep: 1,
3254			scaleGridLineColor: "rgba(0,0,0,.05)",
3255			scaleGridLineStyle: "solid",
3256			scaleGridLineWidth: 1,
3257			scaleTickSizeLeft: 5,
3258			scaleTickSizeRight: 5,
3259			scaleTickSizeBottom: 5,
3260			scaleTickSizeTop: 5,
3261			showYAxisMin: true, // Show the minimum value on Y axis (in original version, this minimum is not displayed - it can overlap the X labels)
3262			rotateLabels: "smart", // smart <=> 0 degre if space enough; otherwise 45 degres if space enough otherwise90 degre; 
3263			rotateTLabels: "smart", // smart <=> 0 degre if space enough; otherwise 45 degres if space enough otherwise90 degre; 
3264			barShowStroke: true,
3265			barValueSpacing: 5,
3266			barDatasetSpacing: 1,
3267			barBorderRadius: 0,
3268			complementaryBar : false,
3269			complementaryColor : "rgba(100,100,100,0.3)",
3270			complementaryStrokeColor : "rgba(100,100,100,0.1)",
3271			animation: true,
3272			animationSteps: 60,
3273			animationEasing: "easeOutQuart",
3274			onAnimationComplete: null,
3275      alwaysRunFunctionAtCompletion: false,
3276			annotateLabel: "<%=(v1 == '' ? '' : v1) + (v1!='' && v2 !='' ? ' - ' : '')+(v2 == '' ? '' : v2)+(v1!='' || v2 !='' ? ':' : '') + v3 + ' (' + v6 + ' %)'%>",
3277			reverseOrder: false
3278		};
3279		// merge annotate defaults
3280		if(isIE()<9 && isIE() != false)chart.HorizontalBar.defaults = mergeChartConfig(chart.defaults.IExplorer8, chart.HorizontalBar.defaults);
3281		chart.HorizontalBar.defaults = mergeChartConfig(chart.defaults.commonOptions, chart.HorizontalBar.defaults);
3282		chart.HorizontalBar.defaults = mergeChartConfig(chart.defaults.xyAxisCommonOptions, chart.HorizontalBar.defaults);
3283		chart.HorizontalBar.defaults = mergeChartConfig(chart.HorizontalBar.defaults, charJSPersonalDefaultOptions);
3284		chart.HorizontalBar.defaults = mergeChartConfig(chart.HorizontalBar.defaults, charJSPersonalDefaultOptionsHorizontalBar);
3285		var config = (options) ? mergeChartConfig(chart.HorizontalBar.defaults, options) : chart.HorizontalBar.defaults;
3286		return new HorizontalBar(data, config, context);
3287	};
3288	chart.defaults = {};
3289	
3290	chart.defaults.IExplorer8 ={
3291		annotateBackgroundColor : "black",
3292		annotateFontColor: "white"
3293	};
3294	chart.defaults.commonOptions = {
3295		generateConvertedData : false,
3296		displayData : true,
3297    showZeroValue : true,
3298		chartTextScale : 1,
3299		chartLineScale : 1,
3300		chartSpaceScale : 1,
3301		multiGraph: false,
3302		clearRect: true, // do not change clearRect options; for internal use only
3303		dynamicDisplay: false,
3304		dynamicDisplayXPartOfChart : 0.5,
3305		dynamicDisplayYPartOfChart : 0.5,
3306		animationForceSetTimeOut : false,
3307		graphSpaceBefore: 5,
3308		graphSpaceAfter: 5,
3309		canvasBorders: false,
3310		canvasBackgroundColor: "none",
3311		canvasBordersRadius : 0,
3312		canvasBordersSelection : 15,
3313		canvasBordersWidth: 3,
3314		canvasBordersStyle: "solid",
3315		canvasBordersColor: "black",
3316		zeroValue : 0.0000000001,
3317		graphTitle: "",
3318    graphTitleAlign: "center",
3319    graphTitleShift : 10,
3320		graphTitleFontFamily: "'Arial'",
3321		graphTitleFontSize: 24,
3322		graphTitleFontStyle: "bold",
3323		graphTitleFontColor: "#666",
3324		graphTitleSpaceBefore: 5,
3325		graphTitleSpaceAfter: 5,
3326		graphTitleBorders : false,
3327		graphTitleBordersRadius : 0,
3328		graphTitleBordersColor : "black",
3329		graphTitleBordersXSpace : 3,
3330		graphTitleBordersYSpace : 3,
3331		graphTitleBordersSelection : 15,
3332		graphTitleBordersWidth : 1,
3333		graphTitleBordersStyle : "solid",
3334		graphTitleBackgroundColor : "none",
3335 		graphSubTitle: "",
3336    graphSubTitleAlign: "center",
3337    graphSubTitleShift : 10,
3338		graphSubTitleFontFamily: "'Arial'",
3339		graphSubTitleFontSize: 18,
3340		graphSubTitleFontStyle: "normal",
3341		graphSubTitleFontColor: "#666",
3342		graphSubTitleSpaceBefore: 5,
3343		graphSubTitleSpaceAfter: 5,
3344		graphSubTitleBorders : false,
3345		graphSubTitleBordersColor : "black",
3346    graphSubTitleBordersRadius : 0,
3347		graphSubTitleBordersXSpace : 3,
3348		graphSubTitleBordersYSpace : 3,
3349		graphSubTitleBordersSelection : 15,
3350		graphSubTitleBordersWidth : 1,
3351		graphSubTitleBordersStyle : "solid",
3352		graphSubTitleBackgroundColor : "none",
3353		footNote: "",
3354    footNoteAlign : "center",
3355    footNoteShift : 10,
3356		footNoteFontFamily: "'Arial'",
3357		footNoteFontSize: 8,
3358		footNoteFontStyle: "bold",
3359		footNoteFontColor: "#666",
3360		footNoteSpaceBefore: 5,
3361		footNoteSpaceAfter: 5,
3362		footNoteBorders : false,
3363		footNoteBordersColor : "black",
3364                footNoteBordersRadius : 0,
3365		footNoteBordersXSpace : 3,
3366		footNoteBordersYSpace : 3,
3367		footNoteBordersSelection : 15,
3368		footNoteBordersWidth : 1,
3369		footNoteBordersStyle : "solid",
3370		footNoteBackgroundColor : "none",
3371		legend : false,
3372		legendWhenToDraw: "all",
3373		showSingleLegend: false,
3374		maxLegendCols : 999,
3375    maxLegendLines : 999,
3376		legendPosY :4,
3377		legendPosX : -2, 
3378		legendFontFamily: "'Arial'",
3379		legendFontSize: 12,
3380		legendFontStyle: "normal",
3381		legendFontColor: "#666",
3382		legendBlockSize: 15,
3383                legendBlockRadius:0,
3384		legendBorders: true,
3385		legendBordersStyle: "solid",
3386		legendBordersWidth: 1,
3387		legendBordersSelection : 15,
3388		legendBordersColors: "#666",
3389                legendBordersRadius: 0,
3390		legendBordersSpaceBefore: 5,
3391		legendBordersSpaceAfter: 5,
3392		legendBordersSpaceLeft: 5,
3393		legendBordersSpaceRight: 5,
3394		legendSpaceBeforeText: 5,
3395		legendSpaceAfterText: 5,
3396		legendSpaceLeftText: 5,
3397		legendSpaceRightText: 5,
3398		legendSpaceBetweenTextVertical: 5,
3399		legendSpaceBetweenTextHorizontal: 5,
3400		legendSpaceBetweenBoxAndText: 5,
3401		legendFillColor : "rgba(0,0,0,0)",
3402		legendXPadding : 0,
3403		legendYPadding : 0,
3404		inGraphDataBorders : false,
3405                inGraphDataBordersRadius : 0,
3406		inGraphDataBordersColor : "black",
3407		inGraphDataBordersXSpace : 3,
3408		inGraphDataBordersYSpace : 3,
3409		inGraphDataBordersSelection : 15,
3410		inGraphDataBordersWidth : 1,
3411		inGraphDataBordersStyle : "solid",
3412		inGraphDataBackgroundColor : "none",
3413		annotateDisplay: false,
3414		annotateRelocate: false,
3415		savePng: false,
3416		savePngOutput: "NewWindow", // Allowed values : "NewWindow", "CurrentWindow", "Save"
3417		savePngFunction: "mousedown right",
3418		savePngBackgroundColor: 'WHITE',
3419		annotateFunction: "mousemove",
3420		annotateFontFamily: "'Arial'",
3421		annotateBorder: 'none',
3422		annotateBorderRadius: '2px',
3423		annotateBackgroundColor: 'rgba(0,0,0,0.8)',
3424		annotateFontSize: 12,
3425		annotateFontColor: 'white',
3426		annotateFontStyle: "normal",
3427		annotatePadding: "3px",
3428		annotateClassName: "",
3429		annotateFunctionIn: null,
3430		annotateFunctionOut : null,
3431		detectMouseOnText: false,
3432		crossText: [""],
3433		crossTextIter: ["all"],
3434		crossTextOverlay: [true],
3435		crossTextFontFamily: ["'Arial'"],
3436		crossTextFontSize: [12],
3437		crossTextFontStyle: ["normal"],
3438		crossTextFontColor: ["rgba(220,220,220,1)"],
3439		crossTextRelativePosX: [2],
3440		crossTextRelativePosY: [2],
3441		crossTextBaseline: ["middle"],
3442		crossTextAlign: ["center"],
3443		crossTextPosX: [0],
3444		crossTextPosY: [0],
3445		crossTextAngle: [0],
3446		crossTextFunction: null,
3447		crossTextBorders : [false],
3448		crossTextBordersColor : ["black"],
3449                crossTextBordersRadius : [0],
3450		crossTextBordersXSpace : [3],
3451		crossTextBordersYSpace : [3],                                                         
3452		crossTextBordersSelection : [15],
3453		crossTextBordersWidth : [1],
3454		crossTextBordersStyle : ["solid"],
3455		crossTextBackgroundColor : ["none"],
3456		crossImage: [undefined],
3457		crossImageIter: ["all"],
3458		crossImageOverlay: [true],
3459		crossImageRelativePosX: [2],
3460		crossImageRelativePosY: [2],
3461		crossImageBaseline: ["middle"],
3462		crossImageAlign: ["center"],
3463		crossImagePosX: [0],
3464		crossImagePosY: [0],
3465		crossImageAngle: [0],
3466		spaceTop: 0,
3467		spaceBottom: 0,
3468		spaceRight: 0,
3469		spaceLeft: 0,
3470		decimalSeparator: ".",
3471		thousandSeparator: "",
3472		currency : "\u20AC",    // 20AC= Euro
3473		currencyPosition : "after",
3474		roundNumber: "none",
3475		roundPct: -1,
3476		templatesOpenTag : "<%=",
3477		templatesCloseTag : "%>",
3478		fmtV1: "none",
3479		fmtV2: "none",
3480		fmtV3: "none",
3481		fmtV4: "none",
3482		fmtV5: "none",
3483		fmtV6: "none",
3484		fmtV6T: "none",
3485		fmtV7: "none",
3486		fmtV8: "none",
3487		fmtV8T: "none",
3488		fmtV9: "none",
3489		fmtV10: "none",
3490		fmtV11: "none",
3491		fmtV12: "none",
3492		fmtV13: "none",
3493		fmtV14: "none",
3494		fmtV15: "none",
3495		fmtXLabel: "none",
3496		fmtTopXLabel: "none",
3497		fmtYLabel: "none",
3498		fmtYLabel2: "none",
3499		fmtLegend: "none",
3500		animationStartValue: 0,
3501		animationStopValue: 1,
3502		animationCount: 1,
3503		animationPauseTime: 5,
3504		animationBackward: false,
3505		animationStartWithDataset: 1,
3506		animationStartWithData: 1,
3507		animationLeftToRight: false,
3508		animationByDataset: false,
3509		defaultStrokeColor: "rgba(220,220,220,1)",
3510		defaultFillColor: "rgba(220,220,220,0.5)",
3511		defaultLineWidth : 2,
3512		graphMaximized: false,
3513		contextMenu: true,
3514		mouseDownRight: null,
3515		mouseDownLeft: null,
3516		mouseDownMiddle: null,
3517		mouseMove: null,
3518		mouseOut: null,
3519		mouseDblClick: null,
3520		mouseWheel : null,
3521		highLight : false,
3522		highLightMouseFunction : "mousemove",
3523		highLightFullLine : false,   // true, false or "group"
3524		highLightRerunEndFunction : false,
3525		savePngName: "canvas",
3526		responsive : false,
3527		responsiveMinWidth : 0,
3528		responsiveMinHeight : 0,
3529		responsiveMaxWidth : 9999999,
3530		responsiveMaxHeight : 9999999,
3531		maintainAspectRatio: true,
3532		responsiveScaleContent : false,
3533		responsiveWindowInitialWidth : false,
3534		markerShape : "circle",    // "circle","cross","plus","diamond","triangle","square"
3535		barStrokeWidth: 2,
3536		initFunction : null,
3537		beforeDrawFunction : null,
3538		endDrawDataFunction : null,
3539		endDrawScaleFunction : null
3540	};
3541	chart.defaults.PolarAreaV1 = {
3542		highLightSet : { color : "red" },
3543		inGraphDataTmpl: "<%=(v1 == ''? '' : v1+':')+ v2 + ' (' + v6 + ' %)'%>",
3544		annotateLabel: "<%=(v1 == ''? '' : v1+':')+ v2 + ' (' + v6 + ' %)'%>"
3545	};
3546
3547	chart.defaults.PolarAreaV2 = {
3548		highLightSet : { fillColor : "red" },
3549		inGraphDataTmpl: "<%=(data.labels.length == 1 ? (v1 == '' ? '' : v1+':') + v3 + ' (' + v6 + ' %)' : (i==0 ? v2 : '') )%>",
3550		annotateLabel: "<%=(v2 == '' ? '' : v2) + (v2!='' && v1 !='' ? ' - ' : '')+(v1 == '' ? '' : v1)+(v2!='' || v1 !='' ? ':' : '') + v3 + ' (' + v6 + ' %)'%>"
3551	};
3552
3553
3554
3555	chart.defaults.PolarArea = {
3556		inGraphDataShow: false,
3557		inGraphDataPaddingRadius: 5,
3558		inGraphDataPaddingAngle: 0,
3559		inGraphDataAlign: "off-center", // "right", "center", "left", "off-center" or "to-center"
3560		inGraphDataVAlign: "off-center", // "bottom", "center", "top", "off-center" or "to-center"
3561		inGraphDataRotate: 0, // rotateAngle value (0->360) , "inRadiusAxis" or "inRadiusAxisRotateLabels"
3562		inGraphDataFontFamily: "'Arial'",
3563		inGraphDataFontSize: 12,
3564		inGraphDataFontStyle: "normal",
3565		inGraphDataFontColor: "#666",
3566		inGraphDataRadiusPosition: 3,
3567		inGraphDataAnglePosition: 2,
3568		scaleOverlay: true,
3569		scaleOverride: false,
3570		scaleOverride2: false,
3571		forceSecondScale : false,
3572		scaleGridLinesStep : 1,
3573		scaleSteps: null,
3574		scaleStepWidth: null,
3575		scaleStartValue: null,
3576		scaleShowLine: true,
3577		scaleLineColor: "rgba(0,0,0,.1)",
3578		scaleLineWidth: 1,
3579		scaleLineStyle: "solid",
3580		scaleShowLabels: true,
3581		scaleShowLabels2: true,
3582		scaleLabel: "<%=value%>",
3583		scaleFontFamily: "'Arial'",
3584		scaleFontSize: 12,
3585		scaleFontStyle: "normal",
3586		scaleFontColor: "#666",
3587		scaleShowLabelBackdrop: true,
3588		scaleBackdropColor: "rgba(255,255,255,0.75)",
3589		scaleBackdropPaddingY: 2,
3590		scaleBackdropPaddingX: 2,
3591		segmentShowStroke: true,
3592		segmentStrokeColor: "#fff",
3593		segmentStrokeStyle: "solid",
3594		segmentStrokeWidth: 2,
3595		animation: true,
3596		animationByData : "ByArc",
3597		animationSteps: 100,
3598		animationEasing: "easeOutBounce",
3599		animateRotate: true,
3600		animateScale: false,
3601		onAnimationComplete: null,
3602    alwaysRunFunctionAtCompletion: false,
3603		startAngle: 90,
3604		totalAmplitude : 360,
3605		radiusScale : 1
3606	};
3607	chart.defaults.PieAndDoughnutV1 = {
3608			inGraphDataTmpl: "<%=(v1 == ''? '' : v1+':')+ v2 + ' (' + v6 + ' %)'%>",
3609			annotateLabel: "<%=(v1 == ''? '' : v1+':')+ v2 + ' (' + v6 + ' %)'%>"
3610	};
3611
3612	chart.defaults.PieAndDoughnutV2 = {
3613			inGraphDataTmpl: "<%=(data.labels.length == 1 ? (v1 == '' ? '' : v1+':') + v3 + ' (' + v6 + ' %)' : (i==0 ? v2 : '') )%>",
3614			annotateLabel: "<%=(v2 == '' ? '' : v2) + (v2!='' && v1 !='' ? ' - ' : '')+(v1 == '' ? '' : v1)+(v2!='' || v1 !='' ? ':' : '') + v3 + ' (' + v6 + ' %)'%>"
3615	};
3616
3617	chart.defaults.PieAndDoughnut = {
3618			highLightSet : { expandOutRadius : 0.10, expandInRadius : -0.10 },
3619			inGraphDataShow: false,
3620			inGraphDataPaddingRadius: 5,
3621			inGraphDataPaddingAngle: 0,
3622			inGraphDataAlign: "off-center", // "right", "center", "left", "off-center" or "to-center"
3623			inGraphDataVAlign: "off-center", // "bottom", "middle", "top", "off-center" or "to-center"
3624			inGraphDataRotate: 0, // rotateAngle value (0->360) , "inRadiusAxis" or "inRadiusAxisRotateLabels"
3625			inGraphDataFontFamily: "'Arial'",
3626			inGraphDataFontSize: 12,
3627			inGraphDataFontStyle: "normal",
3628			inGraphDataFontColor: "#666",
3629			inGraphDataRadiusPosition: 3,
3630			inGraphDataAnglePosition: 2,
3631		        inGraphDataMinimumAngle : 0,
3632			segmentShowStroke: true,
3633			segmentStrokeColor: "#fff",
3634			segmentStrokeStyle: "solid",
3635			segmentStrokeWidth: 2,
3636			percentageInnerCutout: 50,
3637			animation: true,
3638			animationByData : false,
3639			animationSteps: 100,
3640			animationEasing: "easeOutBounce",
3641			animateRotate: true,
3642			animateScale: false,
3643			onAnimationComplete: null,
3644      alwaysRunFunctionAtCompletion: false,
3645			startAngle: 90,
3646			totalAmplitude : 360,
3647			radiusScale: 1,
3648			radiusDataWeight : 1,
3649			radiusSpaceWeight :0.3
3650	};
3651
3652	chart.defaults.xyAxisCommonOptions = {
3653		maxBarWidth : -1,
3654  	drawXScaleLine: [{
3655				position: "bottom"
3656		}],
3657    yAxisMinimumInterval: "none",
3658		yAxisMinimumInterval2: "none",
3659		yScaleLabelsMinimumWidth: 0,
3660		xScaleLabelsMinimumWidth: 0,
3661		yAxisLeft: true,
3662		yAxisRight: false,
3663		xAxisBottom: true,
3664		xAxisTop: false,
3665		xAxisSpaceBetweenLabels: 5,
3666		fullWidthGraph: false,
3667		yAxisLabel: "",
3668		yAxisLabel2: "",
3669		yAxisFontFamily: "'Arial'",
3670		yAxisFontSize: 16,
3671		yAxisFontStyle: "normal",
3672		yAxisFontColor: "#666",
3673		yAxisLabelSpaceRight: 5,
3674		yAxisLabelSpaceLeft: 5,
3675		yAxisSpaceRight: 5,
3676		yAxisSpaceLeft: 5,
3677		yAxisLabelBorders : false,
3678		yAxisLabelBordersColor : "black",
3679                yAxisLabelBordersRadius : 0,
3680		yAxisLabelBordersXSpace : 3,
3681		yAxisLabelBordersYSpace : 3,
3682		yAxisLabelBordersSelection : 15,
3683		yAxisLabelBordersWidth : 1,
3684		yAxisLabelBordersStyle : "solid",
3685		yAxisLabelBackgroundColor : "none",
3686		xAxisLabel: "",
3687		xAxisLabel2: "",
3688		xTAxisLabel: "",      
3689		xAxisFontFamily: "'Arial'",
3690		xAxisFontSize: 16,
3691		xAxisFontStyle: "normal",
3692		xAxisFontColor: "#666",
3693		xAxisLabelSpaceBefore: 5,
3694		xAxisLabelSpaceAfter: 5,
3695		xAxisSpaceBefore: 5,
3696		xAxisSpaceAfter: 5,
3697		xAxisLabelBorders : false,
3698		xAxisLabelBordersColor : "black",
3699                xAxisLabelBordersRadius : 0,
3700		xAxisLabelBordersXSpace : 3,
3701		xAxisLabelBordersYSpace : 3,
3702		xAxisLabelBordersSelection : 15,
3703		xAxisLabelBordersWidth : 1,
3704		xAxisLabelBordersStyle : "solid",
3705		xAxisLabelBackgroundColor : "none",
3706		showXLabels : 1,
3707		firstLabelToShow : 1,
3708		showYLabels : 1,
3709		firstYLabelToShow : 1,
3710		yAxisUnit: "",
3711		yAxisUnit2: "",
3712		yAxisUnitFontFamily: "'Arial'",
3713		yAxisUnitFontSize: 8,
3714		yAxisUnitFontStyle: "normal",
3715		yAxisUnitFontColor: "#666",
3716		yAxisUnitSpaceBefore: 5,
3717		yAxisUnitSpaceAfter: 5,
3718		yAxisUnitBorders : false,
3719		yAxisUnitBordersColor : "black",
3720    yAxisUnitBordersradius : 0,
3721		yAxisUnitBordersXSpace : 3,
3722		yAxisUnitBordersYSpace : 3,
3723		yAxisUnitBordersSelection : 15,
3724		yAxisUnitBordersWidth : 1,
3725		yAxisUnitBordersStyle : "solid",
3726		yAxisUnitBackgroundColor : "none",
3727    scaleMinorTickWidth : 1,
3728    scaleMinorTickColor : "rgba(0,0,0,.05)",
3729    scaleMinorTickStyle : "solid",
3730    scaleMinorTickSizeTop : 3,
3731    scaleMinorTickSizeBottom : 3,
3732    scaleMinorTickSizeRight : 3,
3733    scaleMinorTickSizeLeft : 3,
3734    scaleMinorTickHorizontalCount : 0,
3735    scaleMinorTickVerticalCount : 0,
3736    scaleMinorTickVerticalLines : true,
3737    scaleMinorTickHorizontalLines : true,
3738    tickColor : "gridLine",
3739    minorTickColor : "gridLine",
3740    xAxisMiddle : false,
3741    yAxisMiddle : false
3742	};
3743	var clear = function(c) {
3744		c.clearRect(0, 0, width, height);
3745	};
3746	
3747
3748
3749	function init_and_start(ctx,data,config) {
3750
3751		var i;
3752
3753		if (typeof ctx.initialWidth == "undefined") ctx.initialWidth =ctx.canvas.width;
3754		if (typeof ctx.chartTextScale == "undefined") ctx.chartTextScale=config.chartTextScale;
3755		if (typeof ctx.chartLineScale == "undefined") ctx.chartLineScale=config.chartLineScale;
3756		if (typeof ctx.chartSpaceScale == "undefined") 	ctx.chartSpaceScale=config.chartSpaceScale;
3757	
3758		if(typeof ctx.firstPass=="undefined"){
3759			ctx.firstPass=0;
3760        		if(config.responsive && !config.multiGraph) {
3761				addResponsiveChart(ctx.ChartNewId,ctx,data,config);
3762			}
3763			if(typeof data.labels == "undefined")data.labels=[];
3764			if (data.labels.length==0) {
3765				var mxlgt = 0;
3766				for (i = 0; i < data.datasets.length; i++) {mxlgt = Max([mxlgt, data.datasets[i].data.length]);}
3767		                for (i=0;i<mxlgt;i++)data.labels[i]="";
3768			}
3769		} 
3770
3771		if (typeof ctx.ChartNewId == "undefined") {
3772			ctx.runanimationcompletefunction=true;
3773			var cvdate = new Date();
3774			var cvmillsec = cvdate.getTime();
3775			ctx.ChartNewId = ctx.tpchart + '_' + cvmillsec;
3776			ctx._eventListeners = {};
3777		}
3778			  
3779		resizeCtx(ctx,config);
3780
3781		if (!dynamicFunction(data, config, ctx)) return false;   // if config.dynamicDisplay=true, chart has to be displayed only if in current screen;  
3782
3783		if (!config.multiGraph && ctx.firstPass!=0) {	
3784			clearAnnotate(ctx.ChartNewId);
3785		}
3786
3787		if (typeof jsGraphAnnotate[ctx.ChartNewId] == "undefined") {
3788			jsGraphAnnotate[ctx.ChartNewId] = new Array();
3789			jsTextMousePos[ctx.ChartNewId] = new Array();
3790		};
3791		
3792		// convert label to title - for compatibility reasons with Chart.js;
3793		for(i=0;i<data.datasets.length;i++){
3794			if(typeof data.datasets[i].title == "undefined" && typeof data.datasets[i].label != "undefined") {
3795				data.datasets[i].title=data.datasets[i].label;
3796			}
3797		}
3798
3799		defMouse(ctx, data, config);
3800		
3801		if(ctx.firstPass==0) {
3802			if(config.animation)ctx.firstPass=1;
3803			else ctx.firstPass=2;
3804		}
3805
3806		setRect(ctx, config);
3807		
3808		return true;
3809	} ;
3810
3811  function init_result(ctx,data,statData) {
3812    var i,j;
3813    var total_data=0;
3814    var total_non_missing_data=0;
3815    for(i=0;i<data.datasets.length;i++) {
3816      if(typeof data.datasets[i].xPos !== "undefined" && ctx.tpchart=="Line") {
3817        total_data+=data.datasets[i].xPos.length;
3818        for(j=0;j<data.datasets[i].xPos.length;j++) {
3819          total_non_missing_data+=(!(typeof(data.datasets[i].xPos[j]) == 'undefined'));
3820        }
3821      } else {
3822        total_data+=data.labels.length;
3823        for(j=0;j<data.datasets[i].data.length;j++) {
3824          if(((ctx.tpchart=="Pie" || ctx.tpchart=="Doughnut") && 1*data.datasets[i].data[j] <=0) || ((ctx.tpchart=="StackedBar" || ctx.tpchart=="HorizontalStackedBar") && Math.abs(1*data.datasets[i].data[j]) <= 0.001) || typeof data.datasets[i].data[j] == 'undefined') continue;
3825          total_non_missing_data++;
3826        }
3827      }
3828    };
3829  
3830    ctx.pieces_drawn ={
3831      total_data : total_data,
3832      total_non_missing_data : total_non_missing_data,
3833      total_missing_data : (total_data-total_non_missing_data),
3834      all_drawn : false,
3835      completed : false,
3836      total_drawn : 0,
3837      points : 0,
3838      rectangles : 0,
3839      slices : 0
3840    };
3841  };
3842  
3843  function close_result(ctx) {
3844    ctx.pieces_drawn.completed=true;
3845    if(ctx.pieces_drawn.total_non_missing_data==ctx.pieces_drawn.total_drawn){
3846        ctx.pieces_drawn.all_drawn=true;
3847    }
3848  }
3849
3850
3851	var MPolarArea = function(data, config, ctx) {  
3852		var maxSize, scaleHop, calculatedScale, labelHeight, scaleHeight, valueBounds, labelTemplateString, msr, midPosX, midPosY;
3853
3854		ctx.tpchart="PolarArea";
3855		ctx.tpdata=0;
3856    
3857		
3858    if (!init_and_start(ctx,data,config)) return;
3859
3860		var statData=initPassVariableData_part1(data,config,ctx);
3861    init_result(ctx,data,statData);
3862
3863		var realCumulativeAngle = (((config.startAngle * (Math.PI / 180) + 2 * Math.PI) % (2 * Math.PI)) + 2* Math.PI) % (2* Math.PI) ; 
3864		config.logarithmic = false;
3865		config.logarithmic2 = false;
3866
3867		var realAmplitude = (((config.totalAmplitude * (Math.PI / 180) + 2 * Math.PI) % (2 * Math.PI)) + 2* Math.PI) % (2* Math.PI) ; 
3868		if(realAmplitude <= config.zeroValue)realAmplitude=2*Math.PI;
3869		var debAngle=((realCumulativeAngle-realAmplitude)+4*Math.PI)%(2*Math.PI);
3870		var finAngle=debAngle+realAmplitude;
3871
3872		valueBounds = getValueBounds();
3873		//Check and set the scale
3874		labelTemplateString = (config.scaleShowLabels) ? config.scaleLabel : "";
3875		if (!config.scaleOverride) {
3876			calculatedScale = calculateScale(1, config, valueBounds.maxSteps, valueBounds.minSteps, valueBounds.maxValue, valueBounds.minValue, labelTemplateString);
3877			msr = setMeasures(data, config, ctx, ctx.canvas.height, ctx.canvas.width, calculatedScale.labels, null, true, false, false, true, "PolarArea");
3878		} else {
3879			var scaleStartValue= setOptionValue(true,true,1,"SCALESTARTVALUE",ctx,data,statData,undefined,config.scaleStartValue,"scaleStartValue",-1,-1,{nullValue : true} );
3880			var scaleSteps =setOptionValue(true,true,1,"SCALESTEPS",ctx,data,statData,undefined,config.scaleSteps,"scaleSteps",-1,-1,{nullValue : true} );
3881			var scaleStepWidth = setOptionValue(true,true,1,"SCALESTEPWIDTH",ctx,data,statData,undefined,config.scaleStepWidth,"scaleStepWidth",-1,-1,{nullValue : true} );
3882
3883			calculatedScale = {
3884				steps: scaleSteps,
3885				stepValue: scaleStepWidth,
3886				graphMin: scaleStartValue,
3887				graphMax: scaleStartValue + scaleSteps * scaleStepWidth,
3888				labels: []
3889			}
3890			populateLabels(1, config, labelTemplateString, calculatedScale.labels, calculatedScale.steps, scaleStartValue, calculatedScale.graphMax, scaleStepWidth);
3891			msr = setMeasures(data, config, ctx, ctx.canvas.height, ctx.canvas.width, calculatedScale.labels, null, true, false, false, true, "PolarArea");
3892		}
3893
3894		var outerVal=calculatedScale.graphMin+calculatedScale.steps*calculatedScale.stepValue;
3895		var drwSize=calculatePieDrawingSize(ctx,msr,config,data,statData);
3896		midPosX=drwSize.midPieX;
3897		midPosY=drwSize.midPieY;
3898
3899		scaleHop = Math.floor(drwSize.radius / calculatedScale.steps);
3900
3901		//Wrap in an animation loop wrapper
3902 		if(scaleHop > 0) {
3903			initPassVariableData_part2(statData,data,config,ctx,{midPosX : midPosX,midPosY : midPosY,int_radius : 0,ext_radius : scaleHop*calculatedScale.steps, calculatedScale : calculatedScale, scaleHop : scaleHop,outerVal : outerVal});
3904			animationLoop(config,msr.legendMsr,drawScale, drawAllSegments, ctx, msr.clrx, msr.clry, msr.clrwidth, msr.clrheight, midPosX, midPosY, midPosX - ((Min([msr.availableHeight, msr.availableWidth]) / 2) - 5), midPosY + ((Min([msr.availableHeight, msr.availableWidth]) / 2) - 5), data, statData);
3905		} else {
3906			testRedraw(ctx,data,config);
3907			if (typeof config.onAnimationComplete == "function" && (config.alwaysRunFunctionAtCompletion==true || ctx.runanimationcompletefunction==true)) {
3908			   config.onAnimationComplete(ctx, config, data, 1, 0,statData);
3909				 ctx.runanimationcompletefunction=false;
3910			}
3911			ctx.firstPass=9;
3912      close_result(ctx);
3913		}
3914
3915		function drawAllSegments(animationDecimal) {
3916
3917
3918			var fixAngle=0;
3919			var firstAngle=statData[0][0].firstAngle;
3920			if(1*config.animationStartWithData>1 && 1*config.animationStartWithData-1 < data.length) {
3921				fixAngle=(statData[config.animationStartWithData-1].startAngle-statData[0][0].firstAngle);
3922				firstAngle=statData[config.animationStartWithData-1].startAngle;
3923			}
3924
3925			prevAngle=statData[0][0].firstAngle;
3926
3927
3928			for(var j=0;j < data.labels.length;j++) {
3929
3930				var	scaleAnimation = 1,
3931					rotateAnimation = 1;
3932                	
3933				if (config.animation) {
3934					if (config.animateScale) {
3935						scaleAnimation = animationDecimal;
3936					}
3937					if (config.animateRotate) {
3938						rotateAnimation = animationDecimal;
3939					}
3940				}
3941				for (var i = 0; i < data.datasets.length; i++) {
3942				correctedRotateAnimation = animationCorrection(rotateAnimation, data, config, i, -1,false).mainVal;
3943
3944				if (!(typeof(data.datasets[i].data[j]) == 'undefined')) {
3945					ctx.beginPath();
3946					if(config.animationByData == "ByArc") {
3947						endAngle=statData[i][j].startAngle+correctedRotateAnimation*statData[i][j].segmentAngle;
3948						ctx.arc(midPosX, midPosY, scaleAnimation * statData[i][j].radiusOffset, statData[i][j].startAngle, endAngle, false);
3949					} else if(config.animationByData) {
3950	
3951					  if (i<1*config.animationStartWithData-1) {
3952							ctx.arc(midPieX, midPieY, scaleAnimation * statData[i][j].radiusOffset, statData[i][j].startAngle, statData[i][j].endAngle,false);
3953						} else if(statData[i][j].startAngle <= firstAngle+correctedRotateAnimation*(2*Math.PI-fixAngle) ) {
3954							endAngle=statData[i][j].endAngle;
3955							if(statData[i][j].endAngle > firstAngle+correctedRotateAnimation*(2*Math.PI-fixAngle)) {
3956								endAngle=firstAngle+correctedRotateAnimation*(2*Math.PI-fixAngle);
3957							} 
3958							ctx.arc(midPieX, midPieY, scaleAnimation * statData[i][j].radiusOffset, statData[i][j].startAngle, endAngle,false);
3959						} else {
3960							continue; 
3961						}
3962					} else {
3963						ctx.arc(midPieX, midPieY, scaleAnimation * statData[i][j].radiusOffset, prevAngle, prevAngle+correctedRotateAnimation * (statData[i][j].endAngle-statData[i][j].startAngle),false);
3964						prevAngle=prevAngle+correctedRotateAnimation * (statData[i][j].endAngle-statData[i][j].startAngle);
3965					}
3966					ctx.lineTo(midPosX, midPosY);
3967					ctx.closePath();
3968          if (animationDecimal >
3968= config.animationStopValue){ctx.pieces_drawn.slices++;ctx.pieces_drawn.total_drawn++;}
3969      
3970					ctx.fillStyle=setOptionValue(true,true,1,"FILLCOLOR",ctx,data,statData,data.datasets[i].fillColor,config.defaultFillColor,"fillColor",i,j,{animationDecimal: animationDecimal, scaleAnimation : scaleAnimation} );
3971					ctx.fill();
3972
3973					if(config.segmentShowStroke=="merge") { /* avoid blank stripes between piece of chart */
3974						ctx.lineWidth =0;
3975						ctx.strokeStyle =setOptionValue(true,true,1,"FILLCOLOR",ctx,data,statData,data.datasets[i].fillColor,config.defaultFillColor,"fillColor",i,j,{animationDecimal: animationDecimal, scaleAnimation : scaleAnimation} );
3976						ctx.setLineDash([]);
3977						ctx.stroke();
3978					}
3979					else if (config.segmentShowStroke) {
3980						ctx.strokeStyle = config.segmentStrokeColor;
3981						ctx.lineWidth = Math.ceil(ctx.chartLineScale*config.segmentStrokeWidth);
3982						ctx.setLineDash(lineStyleFn(setOptionValue(true,true,1,"SEGMENTSTROKESTYLE",ctx,data,statData,data.datasets[i].segmentStrokeStyle,config.segmentStrokeStyle,"segmentStrokeStyle",i,j,{animationDecimal: animationDecimal, scaleAnimation : scaleAnimation} )));
3983						ctx.stroke();
3984						ctx.setLineDash([]);
3985					}
3986				}
3987				}
3988			}
3989
3990
3991			if (animationDecimal >= config.animationStopValue) {
3992				for (i = 0; i < data.datasets.length; i++) {
3993					for (j = 0; j < data.labels.length; j++) {
3994						if (typeof(data.datasets[i].data[j]) == 'undefined') continue;
3995						jsGraphAnnotate[ctx.ChartNewId][jsGraphAnnotate[ctx.ChartNewId].length] = ["MARC", i, j, statData,setOptionValue(true,true,1,"ANNOTATEDISPLAY",ctx,data,statData,data.datasets[i].annotateDisplay,config.annotateDisplay,"annotateDisplay",i,j,{nullValue : true})];
3996
3997						if (setOptionValue(true,true,1,"INGRAPHDATASHOW",ctx,data,statData,data.datasets[i].inGraphDataShow,config.inGraphDataShow,"inGraphDataShow",i,j,{nullValue : true})) {
3998							if (setOptionValue(true,true,1,"INGRAPHDATAANGLEPOSITION",ctx,data,statData,undefined,config.inGraphDataAnglePosition,"inGraphDataAnglePosition",i,j,{nullValue : true} ) == 1) posAngle = statData[i][j].realStartAngle + setOptionValue(true,true,1,"INGRAPHDATAPADDINANGLE",ctx,data,statData,undefined,config.inGraphDataPaddingAngle,"inGraphDataPaddingAngle",i,j,{nullValue: true  }) * (Math.PI / 180);
3999							else if (setOptionValue(true,true,1,"INGRAPHDATAANGLEPOSITION",ctx,data,statData,undefined,config.inGraphDataAnglePosition,"inGraphDataAnglePosition",i,j,{nullValue : true} ) == 2) posAngle = (2*statData[i][j].realStartAngle - statData[i][j].segmentAngle) / 2 + setOptionValue(true,true,1,"INGRAPHDATAPADDINANGLE",ctx,data,statData,undefined,config.inGraphDataPaddingAngle,"inGraphDataPaddingAngle",i,j,{nullValue: true  }) * (Math.PI / 180);
4000							else if (setOptionValue(true,true,1,"INGRAPHDATAANGLEPOSITION",ctx,data,statData,undefined,config.inGraphDataAnglePosition,"inGraphDataAnglePosition",i,j,{nullValue : true} ) == 3) posAngle = statData[i][j].realStartAngle - statData[i][j].segmentAngle + setOptionValue(true,true,1,"INGRAPHDATAPADDINANGLE",ctx,data,statData,undefined,config.inGraphDataPaddingAngle,"inGraphDataPaddingAngle",i,j,{nullValue: true  }) * (Math.PI / 180);
4001							if (setOptionValue(true,true,1,"INGRAPHDATARADIUSPOSITION",ctx,data,statData,undefined,config.inGraphDataRadiusPosition,"inGraphDataRadiusPosition",i,j,{nullValue : true} ) == 1) labelRadius = 0 + setOptionValue(true,true,1,"INGRAPHDATAPADDINGRADIUS",ctx,data,statData,undefined,config.inGraphDataPaddingRadius,"inGraphDataPaddingRadius",i,j,{nullValue: true} );
4002							else if (setOptionValue(true,true,1,"INGRAPHDATARADIUSPOSITION",ctx,data,statData,undefined,config.inGraphDataRadiusPosition,"inGraphDataRadiusPosition",i,j,{nullValue : true} ) == 2) labelRadius = statData[i][j].radiusOffset / 2 + setOptionValue(true,true,1,"INGRAPHDATAPADDINGRADIUS",ctx,data,statData,undefined,config.inGraphDataPaddingRadius,"inGraphDataPaddingRadius",i,j,{nullValue: true} );
4003							else if (setOptionValue(true,true,1,"INGRAPHDATARADIUSPOSITION",ctx,data,statData,undefined,config.inGraphDataRadiusPosition,"inGraphDataRadiusPosition",i,j,{nullV
4003alue : true} ) == 3) labelRadius = statData[i][j].radiusOffset + setOptionValue(true,true,1,"INGRAPHDATAPADDINGRADIUS",ctx,data,statData,undefined,config.inGraphDataPaddingRadius,"inGraphDataPaddingRadius",i,j,{nullValue: true} );
4004							else if (setOptionValue(true,true,1,"INGRAPHDATARADIUSPOSITION",ctx,data,statData,undefined,config.inGraphDataRadiusPosition,"inGraphDataRadiusPosition",i,j,{nullValue : true} ) == 4) labelRadius = scaleHop * calculatedScale.steps + setOptionValue(true,true,1,"INGRAPHDATAPADDINGRADIUS",ctx,data,statData,undefined,config.inGraphDataPaddingRadius,"inGraphDataPaddingRadius",i,j,{nullValue: true} );
4005							ctx.save()
4006							if (setOptionValue(true,true,1,"INGRAPHDATAALIGN",ctx,data,statData,undefined,config.inGraphDataAlign,"inGraphDataAlign",i,j,{nullValue: true  }) == "off-center") {
4007								if (setOptionValue(true,true,1,"INGRAPHDATAROTATE",ctx,data,statData,undefined,config.inGraphDataRotate,"inGraphDataRotate",i,j,{nullValue : true} ) == "inRadiusAxis" || (posAngle + 2 * Math.PI) % (2 * Math.PI) >= 3 * Math.PI / 2 || (posAngle + 2 * Math.PI) % (2 * Math.PI) <= Math.PI / 2) ctx.textAlign = "left";
4008					                                                                                                                                                                                                                                                   
4009								else ctx.textAlign = "right";
4010							} else if (setOptionValue(true,true,1,"INGRAPHDATAALIGN",ctx,data,statData,undefined,config.inGraphDataAlign,"inGraphDataAlign",i,j,{nullValue: true  }) == "to-center") {
4011								if (setOptionValue(true,true,1,"INGRAPHDATAROTATE",ctx,data,statData,undefined,config.inGraphDataRotate,"inGraphDataRotate",i,j,{nullValue : true} ) == "inRadiusAxis" || (posAngle + 2 * Math.PI) % (2 * Math.PI) >= 3 * Math.PI / 2 || (posAngle + 2 * Math.PI) % (2 * Math.PI) <= Math.PI / 2) ctx.textAlign = "right";
4012								else ctx.textAlign = "left";
4013							} else ctx.textAlign = setOptionValue(true,true,1,"INGRAPHDATAALIGN",ctx,data,statData,undefined,config.inGraphDataAlign,"inGraphDataAlign",i,j,{nullValue: true  });
4014							if (setOptionValue(true,true,1,"INGRAPHDATAVALIGN",ctx,data,statData,undefined,config.inGraphDataVAlign,"inGraphDataVAlign",i,j,{nullValue : true} ) == "off-center") {
4015								if ((posAngle + 2 * Math.PI) % (2 * Math.PI) > Math.PI) ctx.textBaseline = "top";
4016								else ctx.textBaseline = "bottom";
4017							} else if (setOptionValue(true,true,1,"INGRAPHDATAVALIGN",ctx,data,statData,undefined,config.inGraphDataVAlign,"inGraphDataVAlign",i,j,{nullValue : true} ) == "to-center") {
4018								if ((posAngle + 2 * Math.PI) % (2 * Math.PI) > Math.PI) ctx.textBaseline = "bottom";
4019								else ctx.textBaseline = "top";
4020							} else ctx.textBaseline = setOptionValue(true,true,1,"INGRAPHDATAVALIGN",ctx,data,statData,undefined,config.inGraphDataVAlign,"inGraphDataVAlign",i,j,{nullValue : true} );
4021							ctx.font = setOptionValue(true,true,1,"INGRAPHDATAFONTSTYLE",ctx,data,statData,undefined,config.inGraphDataFontStyle,"inGraphDataFontStyle",i,j,{nullValue : true} ) + ' ' + setOptionValue(true,true,ctx.chartTextScale,"INGRAPHDATAFONTSIZE",ctx,data,statData,undefined,config.inGraphDataFontSize,"inGraphDataFontSize",i,j,{nullValue : true} ) + 'px ' + setOptionValue(true,true,1,"INGRAPHDATAFONTFAMILY",ctx,data,statData,undefined,config.inGraphDataFontFamily,"inGraphDataFontFamily",i,j,{nullValue : true} );
4022							ctx.fillStyle = setOptionValue(true,true,1,"INGRAPHDATAFONTCOLOR",ctx,data,statData,undefined,config.inGraphDataFontColor,"inGraphDataFontColor",i,j,{nullValue : true} );
4023							var dispString = tmplbis(setOptionValue(true,true,1,"INGRAPHDATATMPL",ctx,data,statData,undefined,config.inGraphDataTmpl,"inGraphDataTmpl",i,j,{nullValue : true} ), statData[i][j],config);
4024							ctx.translate(midPosX + labelRadius * Math.cos(posAngle), midPosY - labelRadius * Math.sin(posAngle));
4025							var rotateVal=0;
4026							if (setOptionValue(true,true,1,"INGRAPHDATAROTATE",ctx,data,statData,undefined,config.inGraphDataRotate,"inGraphDataRotate",i,j,{nullV
4026alue : true} ) == "inRadiusAxis") rotateVal=2 * Math.PI - posAngle;
4027							else if (setOptionValue(true,true,1,"INGRAPHDATAROTATE",ctx,data,statData,undefined,config.inGraphDataRotate,"inGraphDataRotate",i,j,{nullValue : true} ) == "inRadiusAxisRotateLabels") {
4028								if ((posAngle + 2 * Math.PI) % (2 * Math.PI) > Math.PI / 2 && (posAngle + 2 * Math.PI) % (2 * Math.PI) < 3 * Math.PI / 2) rotateVal=3 * Math.PI - posAngle;
4029								else rotateVal=2 * Math.PI - posAngle;
4030							} else rotateVal=setOptionValue(true,true,1,"INGRAPHDATAROTATE",ctx,data,statData,undefined,config.inGraphDataRotate,"inGraphDataRotate",i,j,{nullValue : true} ) * (Math.PI / 180);
4031							ctx.rotate(rotateVal);
4032							setTextBordersAndBackground(ctx,dispString,setOptionValue(true,true,ctx.chartTextScale,"INGRAPHDATAFONTSIZE",ctx,data,statData,undefined,config.inGraphDataFontSize,"inGraphDataFontSize",i,j,{nullValue : true} ),0,0,setOptionValue(true,true,1,"INGRAPHDATABORDERS",ctx,data,statData,undefined,config.inGraphDataBorders,"inGraphDataBorders",i,j,{nullValue : true} ),setOptionValue(true,true,1,"INGRAPHDATABORDERSSELECTION",ctx,data,statData,undefined,config.inGraphDataBordersSelection,"inGraphDataBordersSelection",i,j,{nullValue : true} ),setOptionValue(true,true,1,"INGRAPHDATABORDERSCOLOR",ctx,data,statData,undefined,config.inGraphDataBordersColor,"inGraphDataBordersColor",i,j,{nullValue : true} ),setOptionValue(true,true,ctx.chartLineScale,"INGRAPHDATABORDERSWIDTH",ctx,data,statData,undefined,config.inGraphDataBordersWidth,"inGraphDataBordersWidth",i,j,{nullValue : true} ),setOptionValue(true,true,ctx.chartSpaceScale,"INGRAPHDATABORDERSXSPACE",ctx,data,statData,undefined,config.inGraphDataBordersXSpace,"inGraphDataBordersXSpace",i,j,{nullValue : true} ),setOptionValue(true,true,ctx.chartSpaceScale,"INGRAPHDATABORDERSYSPACE",ctx,data,statData,undefined,config.inGraphDataBordersYSpace,"inGraphDataBordersYSpace",i,j,{nullValue : true} ),setOptionValue(true,true,1,"INGRAPHDATABORDERSSTYLE",ctx,data,statData,undefined,config.inGraphDataBordersStyle,"inGraphDataBordersStyle",i,j,{nullValue : true} ),setOptionValue(true,true,1,"INGRAPHDATABACKGROUNDCOLOR",ctx,data,statData,undefined,config.inGraphDataBackgroundColor,"inGraphDataBackgroundColor",i,j,{nullValue : true} ),"INGRAPHDATA",config.inGraphDataBordersRadius);
4033							ctx.fillTextMultiLine(dispString, 0, 0, ctx.textBaseline, setOptionValue(true,true,ctx.chartTextScale,"INGRAPHDATAFONTSIZE",ctx,data,statData,undefined,config.inGraphDataFontSize,"inGraphDataFontSize",i,j,{nullValue : true} ), true,config.detectMouseOnText,ctx,"INGRAPHDATA_TEXTMOUSE",rotateVal,midPosX + labelRadius * Math.cos(posAngle), midPosY - labelRadius * Math.sin(posAngle),i,j);
4034							ctx.restore();
4035						}
4036					}
4037				}
4038			}
4039		};
4040
4041		function drawScale() {
4042			for (var i = 0; i < calculatedScale.steps; i++) {
4043				if (config.scaleShowLine && (i+1) % config.scaleGridLinesStep==0) {
4044					ctx.beginPath();
4045					ctx.arc(midPosX, midPosY, scaleHop * (i + 1), 4*Math.PI-debAngle, 4*Math.PI-finAngle, true);
4046					ctx.strokeStyle = config.scaleLineColor;
4047					ctx.lineWidth = Math.ceil(ctx.chartLineScale*config.scaleLineWidth);
4048					ctx.setLineDash(lineStyleFn(config.scaleLineStyle));
4049
4050					ctx.stroke();
4051					ctx.setLineDash([]);
4052				}
4053				if (config.scaleShowLabels) {
4054
4055					if(Math.abs(config.totalAmplitude-360)<config.zeroValue)scaleAngle=Math.PI/2;
4056					else scaleAngle=(debAngle+finAngle)/2;
4057
4058					ctx.textAlign = "center";
4059					ctx.font = config.scaleFontStyle + " " + (Math.ceil(ctx.chartTextScale*config.scaleFontSize)).toString() + "px " + config.scaleFontFamily;
4060					var label = calculatedScale.labels[i + 1];
4061					if (config.scaleShowLabelBackdrop) {
4062						var textWidth = ctx.measureTextMultiLine(label, Math.ceil(ctx.chartTextScale*config.scaleFontSize));
4063						ctx.fillStyle = config.scaleBackdropColor;
4064						ctx.beginPath();
4065						ctx.rect(
4066							Math.round(midPosX + Math.cos(scaleAngle)*(scaleHop*(i+1)) - textWidth / 2 - Math.ceil(ctx.chartSpaceScale*config.scaleBackdropPaddingX)), //X
4067							Math.round(midPosY - Math.sin(scaleAngle)*(scaleHop * (i + 1)) - (Math.ceil(ctx.chartTextScale*config.scaleFontSize)) * 0.5 - Math.ceil(ctx.chartSpaceScale*config.scaleBackdropPaddingY)), //Y
4068							Math.round(textWidth + (Math.ceil(ctx.chartSpaceScale*config.scaleBackdropPaddingX) * 2)), //Width
4069							Math.round((Math.ceil(ctx.chartTextScale*config.scaleFontSize)) + (Math.ceil(ctx.chartSpaceScale*config.scaleBackdropPaddingY) * 2)) //Height
4070						);
4071						ctx.fill();
4072					}
4073					ctx.textBaseline = "middle";
4074					ctx.fillStyle = config.scaleFontColor;
4075					ctx.fillTextMultiLine(label, midPosX + Math.cos(scaleAngle)*(scaleHop*(i+1)) , midPosY - Math.sin(scaleAngle)*(scaleHop * (i + 1)), ctx.textBaseline, (Math.ceil(ctx.chartTextScale*config.scaleFontSize)),true,config.detectMouseOnText,ctx,"SCALE_TEXTMOUSE",0,0,0,i,-1);
4076				}
4077			}
4078		};
4079
4080		function getValueBounds() {
4081			var upperValue = -Number.MAX_VALUE;
4082			var lowerValue = Number.MAX_VALUE;
4083			for (var i = 0; i < data.datasets.length; i++) {
4084				for(j=0;j<data.labels.length;j++) {
4085					if(typeof data.datasets[i].data[j] == "undefined") continue;
4086					if (1 * data.datasets[i].data[j] > upperValue) upperValue = 1 * data.datasets[i].data[j];
4087					if (1 * data.datasets[i].data[j] < lowerValue) lowerValue = 1 * data.datasets[i].data[j];
4088				}
4089			};
4090			if(upperValue<lowerValue){upperValue=0;lowerValue=0;}
4091			if (Math.abs(upperValue - lowerValue) < config.zeroValue) {
4092				if(Math.abs(upperValue)< config.zeroValue) upperValue = .9;
4093				if(upperValue>0) {
4094					upperValue=upperValue*1.1;
4095					lowerValue=lowerValue*0.9;
4096				} else {
4097					upperValue=upperValue*0.9;
4098					lowerValue=lowerValue*1.1;
4099				}
4100			}
4101			if(typeof config.graphMin=="function") lowerValue= setOptionValue(true,true,1,"GRAPHMIN",ctx,data,statData,undefined,config.graphMin,"graphMin",-1,-1,{nullValue : true})
4102			else if (!isNaN(config.graphMin)) lowerValue = config.graphMin;
4103			if(typeof config.graphMax=="function") upperValue= setOptionValue(true,true,1,"GRAPHMAX",ctx,data,statData,undefined,config.graphMax,"graphMax",-1,-1,{nullValue : true})
4104			else if (!isNaN(config.graphMax)) upperValue = config.graphMax;
4105			var maxSteps = Math.floor((scaleHeight / (labelHeight * 0.66)));
4106			var minSteps = Math.floor((scaleHeight / labelHeight * 0.5));
4107			if(upperValue<lowerValue){lowerValue=upperValue-1;}
4108
4109			return {
4110				maxValue: upperValue,
4111				minValue: lowerValue,
4112				maxSteps: maxSteps,
4113				minSteps: minSteps
4114			};
4115		};
4116
4117		return {
4118			data:data,
4119			config:config,
4120			ctx:ctx
4121		};
4122	};
4123
4124	var PolarArea = function(data, config, ctx) {
4125		if(typeof data.length!="undefined")	return(MPolarArea(convertData(data,config.generateConvertedData),config,ctx));
4126		else 					return (MPolarArea(data,config,ctx));
4127	};
4128
4129
4130	var Radar = function(data, config, ctx) {
4131		var maxSize, scaleHop, calculatedScale, labelHeight, scaleHeight, valueBounds, labelTemplateString, msr, midPosX, midPosY;
4132
4133		ctx.tpchart="Radar";
4134		ctx.tpdata=0;
4135
4136	  if (!init_and_start(ctx,data,config)) return;
4137
4138		var statData=initPassVariableData_part1(data,config,ctx);
4139    init_result(ctx,data,statData);
4140
4141		valueBounds = getValueBounds();
4142
4143		config.logarithmic = false;
4144		config.logarithmic2 = false;
4145		//If no labels are defined set to an empty array, so referencing length for looping doesn't blow up.
4146		if (!data.labels) data.labels = [];
4147		//Check and set the scale
4148		labelTemplateString = (config.scaleShowLabels) ? config.scaleLabel : "";
4149		if (!config.scaleOverride) {
4150			calculatedScale = calculateScale(1, config, valueBounds.maxSteps, valueBounds.minSteps, valueBounds.maxValue, valueBounds.minValue, labelTemplateString);
4151			msr = setMeasures(data, config, ctx, ctx.canvas.height, ctx.canvas.width, calculatedScale.labels, null, true, false, false,  config.datasetFill, "Radar");
4152		} else {
4153			var scaleStartValue= setOptionValue(true,true,1,"SCALESTARTVALUE",ctx,data,statData,undefined,config.scaleStartValue,"scaleStartValue",-1,-1,{nullValue : true} );
4154			var scaleSteps =setOptionValue(true,true,1,"SCALESTEPS",ctx,data,statData,undefined,config.scaleSteps,"scaleSteps",-1,-1,{nullValue : true} );
4155			var scaleStepWidth = setOptionValue(true,true,1,"SCALESTEPWIDTH",ctx,data,statData,undefined,config.scaleStepWidth,"scaleStepWidth",-1,-1,{nullValue : true} );
4156			calculatedScale = {
4157				steps: scaleSteps,
4158				stepValue: scaleStepWidth,
4159				graphMin: scaleStartValue,
4160				graphMax: scaleStartValue + scaleSteps * scaleStepWidth,
4161				labels: []
4162			}
4163			populateLabels(1, config, labelTemplateString, calculatedScale.labels, calculatedScale.steps, scaleStartValue, calculatedScale.graphMax, scaleStepWidth);
4164			msr = setMeasures(data, config, ctx, ctx.canvas.height, ctx.canvas.width, calculatedScale.labels, null, true, false, false, config.datasetFill, "Radar");
4165		}
4166
4167		calculateDrawingSizes();
4168		midPosY = msr.topNotUsableHeight + (msr.availableHeight / 2);
4169		scaleHop = maxSize / (calculatedScale.steps);
4170		//Wrap in an animation loop wrapper
4171		initPassVariableData_part2(statData,data,config,ctx,{midPosX : midPosX, midPosY : midPosY, calculatedScale: calculatedScale, scaleHop: scaleHop, maxSize:maxSize,outerVal : -1});
4172		animationLoop(config,msr.legendMsr,drawScale, drawAllDataPoints, ctx, msr.clrx, msr.clry, msr.clrwidth, msr.clrheight, midPosX, midPosY, midPosX - maxSize, midPosY + maxSize, data, statData);
4173		//Radar specific functions.
4174		function drawAllDataPoints(animationDecimal) {
4175			var rotationDegree = (2 * Math.PI) / data.datasets[0].data.length;
4176			ctx.save();
4177			//We accept multiple data sets for radar charts, so show loop through each set
4178			for (var i = 0; i < data.datasets.length; i++) {
4179				var fPt = -1;
4180				for (var j = 0; j < data.datasets[i].data.length; j++) {
4181					if(setOptionValue(true,true,1,"DISPLAYDATA",ctx,data,statData,data.datasets[i].displayData,config.displayData,"displayData",i,j,{nullvalue : null} )== false) continue;
4182					if(setOptionValue(true,true,1,"DISPLAYDATA",ctx,data,statData,data.displayData,config.displayData,"displayData",j,-1,{nullvalue : null} )== false) continue;
4183					var currentAnimPc = animationCorrection(animationDecimal, data, config, i, j, false).animVal;
4184					if (currentAnimPc > 1) currentAnimPc = currentAnimPc - 1;
4185					if (!(typeof(data.datasets[i].data[j]) == 'undefined')) {
4186						if (fPt == -1) {
4187							ctx.beginPath();
4188							ctx.moveTo(midPosX + currentAnimPc * statData[i][j].offsetX, midPosY - currentAnimPc * statData[i][j].offsetY);
4189							fPt = j;
4190						} else {
4191							ctx.lineTo(midPosX + currentAnimPc * statData[i][j].offsetX, midPosY - currentAnimPc * statData[i][j].offsetY);
4192						}
4193            if (animationDecimal >= config.animationStopValue){ctx.pieces_drawn.points++;ctx.pieces_drawn.total_drawn++;}
4194
4195					}
4196				}
4197				ctx.closePath();
4198				if (config.datasetFill) {
4199					ctx.fillStyle=setOptionValue(true,true,1,"COLOR",ctx,data,statData,data.datasets[i].fillColor,config.defaultFillColor,"fillColor",i,-1,{animationValue : currentAnimPc, midPosX : statData[i][0].midPosX, midPosY : statData[i][0].midPosY, ext_radius : (config.animationLeftToRight ? 1 : currentAnimPc) * (statData[i][0].calculated_offset_max)} );
4200				} else ctx.fillStyle = "rgba(0,0,0,0)";
4201
4202				ctx.strokeStyle=setOptionValue(true,true,1,"STROKECOLOR",ctx,data,statData,data.datasets[i].strokeColor,config.defaultStrokeColor,"strokeColor",i,-1,{nullvalue : null} );
4203				ctx.lineWidth = Math.ceil(ctx.chartLineScale*setOptionValue(true,true,1,"LINEWIDTH",ctx,data,statData,data.datasets[i].datasetStrokeWidth,config.datasetStrokeWidth,"datasetStrokeWidth",i,-1,{nullvalue : null} ));
4204				ctx.fill();
4205				ctx.setLineDash(lineStyleFn(setOptionValue(true,true,1,"LINEDASH",ctx,data,statData,data.datasets[i].datasetStrokeStyle,config.datasetStrokeStyle,"datasetStrokeStyle",i,j,{nullvalue : null} )));
4206				ctx.stroke();
4207				ctx.setLineDash([]);
4208				if (animationDecimal >= config.animationStopValue) {
4209					ctx.beginPath();
4210
4211					for (var k = 0; k < data.datasets[i].data.length; k++) {
4212						if(setOptionValue(true,true,1,"DISPLAYDATA",ctx,data,statData,data.datasets[i].displayData,config.displayData,"displayData",i,k,{nullvalue : null} )== false) continue;
4213						if(setOptionValue(true,true,1,"DISPLAYDATA",ctx,data,statData,data.displayData,config.displayData,"displayData",k,-1,{nullvalue : null} )== false) continue;
4214
4215						if (!(typeof(data.datasets[i].data[k]) == 'undefined')) {
4216							if(setOptionValue(true,true,1,"POINTDOT",ctx,data,statData,undefined,config.pointDot,"pointDot",i,k,{nullvalue : null} )) {
4217								ctx.beginPath();
4218								ctx.fillStyle=setOptionValue(true,true,1,"MARKERFILLCOLOR",ctx,data,statData,data.datasets[i].pointColor,config.defaultStrokeColor,"pointColor",i,k,{nullvalue: true} );
4219								ctx.strokeStyle=setOptionValue(true,true,1,"MARKERSTROKESTYLE",ctx,data,statData,data.datasets[i].pointStrokeColor,config.defaultStrokeColor,"pointStrokeColor",i,k,{nullvalue: true} );
4220								ctx.lineWidth=setOptionValue(true,true,ctx.chartLineScale,"MARKERLINEWIDTH",ctx,data,statData,data.datasets[i].pointDotStrokeWidth,config.pointDotStrokeWidth,"pointDotStrokeWidth",i,k,{nullvalue: true} );
4221								var markerShape=setOptionValue(true,true,1,"MARKERSHAPE",ctx,data,statData,data.datasets[i].markerShape,config.markerShape,"markerShape",i,k,{nullvalue: true} );
4222								var markerRadius=setOptionValue(true,true,ctx.chartSpaceScale,"MARKERRADIUS",ctx,data,statData,data.datasets[i].pointDotRadius,config.pointDotRadius,"pointDotRadius",i,k,{nullvalue: true} );
4223								var markerStrokeStyle=setOptionValue(true,true,1,"MARKERSTROKESTYLE",ctx,data,statData,data.datasets[i].pointDotStrokeStyle,config.pointDotStrokeStyle,"pointDotStrokeStyle",i,k,{nullvalue: true} );
4224								drawMarker(ctx,midPosX + currentAnimPc * statData[i][k].offsetX, midPosY - currentAnimPc * statData[i][k].offsetY, markerShape,markerRadius,markerStrokeStyle);							
4225							}
4226						}
4227					}
4228				}
4229			}
4230			ctx.restore();
4231			if (animationDecimal >= config.animationStopValue) {
4232				for (i = 0; i < data.datasets.length; i++) {
4233					for (j = 0; j < data.datasets[i].data.length; j++) {
4234						if(setOptionValue(true,true,1,"DISPLAYDATA",ctx,data,statData,data.datasets[i].displayData,config.displayData,"displayData",i,j,{nullvalue : null} )== false) continue;
4235						if(setOptionValue(true,true,1,"DISPLAYDATA",ctx,data,statData,data.displayData,config.displayData,"displayData",j,-1,{nullvalue : null} )== false) continue;
4236						if (typeof(data.datasets[i].data[j]) == 'undefined') continue;
4237						jsGraphAnnotate[ctx.ChartNewId][jsGraphAnnotate[ctx.ChartNewId].length] = ["POINT", i,j,statData,setOptionValue(true,true,1,"ANNOTATEDISPLAY",ctx,data,statData,data.datasets[i].annotateDisplay,config.annotateDisplay,"annotateDisplay",i,j,{nullValue : true})];
4238						if(setOptionValue(true,true,1,"INGRAPHDATASHOW",ctx,data,statData,data.datasets[i].inGraphDataShow,config.inGraphDataShow,"inGraphDataShow",i,j,{nullValue : true})) {
4239							ctx.save();
4240							ctx.beginPath();
4241							ctx.textAlign = setOptionValue(true,true,1,"INGRAPHDATAALIGN",ctx,data,statData,undefined,config.inGraphDataAlign,"inGraphDataAlign",i,j,{nullValue: true  });
4242							ctx.textBaseline = setOptionValue(true,true,1,"INGRAPHDATAVALIGN",ctx,data,statData,undefined,config.inGraphDataVAlign,"inGraphDataVAlign",i,j,{nullValue : true} );
4243							if (setOptionValue(true,true,1,"INGRAPHDATAALIGN",ctx,data,statData,undefined,config.inGraphDataAlign,"inGraphDataAlign",i,j,{nullValue: true  }) == "off-center") {
4244								if (setOptionValue(true,true,1,"INGRAPHDATAROTATE",ctx,data,statData,undefined,config.inGraphDataRotate,"inGraphDataRotate",i,j,{nullValue : true} ) == "inRadiusAxis" || (config.startAngle * Math.PI / 180 - j * rotationDegree + 4 * Math.PI) % (2 * Math.PI) > 3 * Math.PI / 2 || (config.startAngle * Math.PI / 180 - j * rotationDegree + 4 * Math.PI) % (2 * Math.PI) <= Math.PI / 2) ctx.textAlign = "left";
4245								else ctx.textAlign = "right";
4246							} else if (setOptionValue(true,true,1,"INGRAPHDATAALIGN",ctx,data,statData,undefined,config.inGraphDataAlign,"inGraphDataAlign",i,j,{nullValue: true  }) == "to-center") {
4247								if (setOptionValue(true,true,1,"INGRAPHDATAROTATE",ctx,data,statData,undefined,config.inGraphDataRotate,"inGraphDataRotate",i,j,{nullValue : true} ) == "inRadiusAxis" || (config.startAngle * Math.PI / 180 - j * rotationDegree + 4 * Math.PI) % (2 * Math.PI) > 3 * Math.PI / 2 || (config.startAngle * Math.PI / 180 - j * rotationDegree + 4 * Math.PI) % (2 * Math.PI) < Math.PI / 2) ctx.textAlign = "right";
4248								else ctx.textAlign = "left";
4249							} else ctx.textAlign = setOptionValue(true,true,1,"INGRAPHDATAALIGN",ctx,data,statData,undefined,config.inGraphDataAlign,"inGraphDataAlign",i,j,{nullValue: true  });
4250							if (setOptionValue(true,true,1,"INGRAPHDATAVALIGN",ctx,data,statData,undefined,config.inGraphDataVAlign,"inGraphDataVAlign",i,j,{nullValue : true} ) == "off-center") {
4251								if ((config.startAngle * Math.PI / 180 - j * rotationDegree + 4 * Math.PI) % (2 * Math.PI) > Math.PI) ctx.textBaseline = "bottom";
4252								else ctx.textBaseline = "top";
4253							} else if (setOptionValue(true,true,1,"INGRAPHDATAVALIGN",ctx,data,statData,undefined,config.inGraphDataVAlign,"inGraphDataVAlign",i,j,{nullValue : true} ) == "to-center") {
4254								if ((config.startAngle * Math.PI / 180 - j * rotationDegree + 4 * Math.PI) % (2 * Math.PI) > Math.PI) ctx.textBaseline = "top";
4255								else ctx.textBaseline = "bottom";
4256							} else ctx.textBaseline = setOptionValue(true,true,1,"INGRAPHDATAVALIGN",ctx,data,statData,undefined,config.inGraphDataVAlign,"inGraphDataVAlign",i,j,{nullValue : true} );
4257							ctx.font = setOptionValue(true,true,1,"INGRAPHDATAFONTSTYLE",ctx,data,statData,undefined,config.inGraphDataFontStyle,"inGraphDataFontStyle",i,j,{nullValue : true} ) + ' ' + setOptionValue(true,true,ctx.chartTextScale,"INGRAPHDATAFONTSIZE",ctx,data,statData,undefined,config.inGraphDataFontSize,"inGraphDataFontSize",i,j,{nullValue : true} ) + 'px ' + setOptionValue(true,true,1,"INGRAPHDATAFONTFAMILY",ctx,data,statData,undefined,config.inGraphDataFontFamily,"inGraphDataFontFamily",i,j,{nullV
4257alue : true} );
4258							ctx.fillStyle = setOptionValue(true,true,1,"INGRAPHDATAFONTCOLOR",ctx,data,statData,undefined,config.inGraphDataFontColor,"inGraphDataFontColor",i,j,{nullValue : true} );
4259							var radiusPrt;
4260							if (setOptionValue(true,true,1,"INGRAPHDATARADIUSPOSITION",ctx,data,statData,undefined,config.inGraphDataRadiusPosition,"inGraphDataRadiusPosition",i,j,{nullValue : true} ) == 1) radiusPrt = 0 + setOptionValue(true,true,1,"INGRAPHDATAPADDINGRADIUS",ctx,data,statData,undefined,config.inGraphDataPaddingRadius,"inGraphDataPaddingRadius",i,j,{nullValue: true} );
4261							else if (setOptionValue(true,true,1,"INGRAPHDATARADIUSPOSITION",ctx,data,statData,undefined,config.inGraphDataRadiusPosition,"inGraphDataRadiusPosition",i,j,{nullValue : true} ) == 2) radiusPrt = (statData[i][j].calculated_offset) / 2 + setOptionValue(true,true,1,"INGRAPHDATAPADDINGRADIUS",ctx,data,statData,undefined,config.inGraphDataPaddingRadius,"inGraphDataPaddingRadius",i,j,{nullValue: true} );
4262							else if (setOptionValue(true,true,1,"INGRAPHDATARADIUSPOSITION",ctx,data,statData,undefined,config.inGraphDataRadiusPosition,"inGraphDataRadiusPosition",i,j,{nullValue : true} ) == 3) radiusPrt = (statData[i][j].calculated_offset) + setOptionValue(true,true,1,"INGRAPHDATAPADDINGRADIUS",ctx,data,statData,undefined,config.inGraphDataPaddingRadius,"inGraphDataPaddingRadius",i,j,{nullValue: true} );
4263							var x_pos,y_pos;
4264							if(statData[i][j].calculated_offset>0) {
4265							        x_pos=midPosX + statData[i][j].offsetX * (radiusPrt/statData[i][j].calculated_offset);
4266							        y_pos=midPosY - statData[i][j].offsetY * (radiusPrt/statData[i][j].calculated_offset);
4267							} else {
4268								x_pos=midPosX;
4269								y_pos=midPosY;
4270							}
4271							ctx.translate(x_pos,y_pos);
4272							var rotateVal=0;
4273							if (setOptionValue(true,true,1,"INGRAPHDATAROTATE",ctx,data,statData,undefined,config.inGraphDataRotate,"inGraphDataRotate",i,j,{nullValue : true} ) == "inRadiusAxis") rotateVal= j * rotationDegree;
4274							else if (setOptionValue(true,true,1,"INGRAPHDATAROTATE",ctx,data,statData,undefined,config.inGraphDataRotate,"inGraphDataRotate",i,j,{nullValue : true} ) == "inRadiusAxisRotateLabels") {
4275								if ((j * rotationDegree + 2 * Math.PI) % (2 * Math.PI) > Math.PI / 2 && (j * rotationDegree + 2 * Math.PI) % (2 * Math.PI) < 3 * Math.PI / 2) rotateVal= 3 * Math.PI + j * rotationDegree;
4276								else rotateVal = 2 * Math.PI + j * rotationDegree;
4277							} else rotateVal=setOptionValue(true,true,1,"INGRAPHDATAROTATE",ctx,data,statData,undefined,config.inGraphDataRotate,"inGraphDataRotate",i,j,{nullValue : true} ) * (Math.PI / 180);
4278							ctx.rotate(rotateVal);
4279							var dispString = tmplbis(setOptionValue(true,true,1,"INGRAPHDATATMPL",ctx,data,statData,undefined,config.inGraphDataTmpl,"inGraphDataTmpl",i,j,{nullValue : true} ), statData[i][j],config);
4280							setTextBordersAndBackground(ctx,dispString,setOptionValue(true,true,ctx.chartTextScale,"INGRAPHDATAFONTSIZE",ctx,data,statData,undefined,config.inGraphDataFontSize,"inGraphDataFontSize",i,j,{nullValue : true} ),0,0,setOptionValue(true,true,1,"INGRAPHDATABORDERS",ctx,data,statData,undefined,config.inGraphDataBorders,"inGraphDataBorders",i,j,{nullValue : true} ),setOptionValue(true,true,1,"INGRAPHDATABORDERSSELECTION",ctx,data,statData,undefined,config.inGraphDataBordersSelection,"inGraphDataBordersSelection",i,j,{nullValue : true} ),setOptionValue(true,true,1,"INGRAPHDATABORDERSCOLOR",ctx,data,statData,undefined,config.inGraphDataBordersColor,"inGraphDataBordersColor",i,j,{nullValue : true} ),setOptionValue(true,true,ctx.chartLineScale,"INGRAPHDATABORDERSWIDTH",ctx,data,statData,undefined,config.inGraphDataBordersWidth,"inGraphDataBordersWidth",i,j,{nullValue : true} ),setOptionValue(true,true,ctx.chartSpaceScale,"INGRAPHDATABORDERSXSPACE",ctx,data,statData,undefined,config.inGraphDataBordersXSpace,"inGraphDataBordersXSpace",i,j,{nullValue : true} ),setOptionValue(true,true,ctx.chartSpaceScale,"INGRAPHDATABORDERSYSPACE",ctx,data,statData,undefined,config.inGraphDataBordersYSpace,"inGraphDataBordersYSpace",i,j,{nullV
4280alue : true} ),setOptionValue(true,true,1,"INGRAPHDATABORDERSSTYLE",ctx,data,statData,undefined,config.inGraphDataBordersStyle,"inGraphDataBordersStyle",i,j,{nullValue : true} ),setOptionValue(true,true,1,"INGRAPHDATABACKGROUNDCOLOR",ctx,data,statData,undefined,config.inGraphDataBackgroundColor,"inGraphDataBackgroundColor",i,j,{nullValue : true} ),"INGRAPHDATA",config.inGraphDataBordersRadius);
4281							ctx.fillTextMultiLine(dispString, 0, 0, ctx.textBaseline, setOptionValue(true,true,ctx.chartTextScale,"INGRAPHDATAFONTSIZE",ctx,data,statData,undefined,config.inGraphDataFontSize,"inGraphDataFontSize",i,j,{nullValue : true} ),true,config.detectMouseOnText,ctx,"INGRAPHDATA_TEXTMOUSE",rotateVal,x_pos,y_pos,i,j);
4282							ctx.restore();
4283						}
4284					}
4285				}
4286			}
4287		};
4288
4289		function drawScale() {
4290			var rotationDegree = (2 * Math.PI) / data.datasets[0].data.length;
4291			ctx.save();
4292			ctx.translate(midPosX, midPosY);
4293			ctx.rotate((90 - config.startAngle) * Math.PI / 180);
4294			if (config.angleShowLineOut) {
4295				ctx.strokeStyle = config.angleLineColor;
4296				ctx.lineWidth = Math.ceil(ctx.chartLineScale*config.angleLineWidth);
4297				for (var h = 0; h < data.datasets[0].data.length; h++) {
4298					ctx.rotate(rotationDegree);
4299					ctx.beginPath();
4300					ctx.moveTo(0, 0);
4301					ctx.lineTo(0, -maxSize);
4302					ctx.setLineDash(lineStyleFn(setOptionValue(true,true,1,"ANGLELINESTYLE",ctx,data,statData,undefined,config.angleLineStyle,"angleLineStyle",h,-1,{nullValue : true} )));
4303					ctx.stroke();
4304					ctx.setLineDash([]);
4305				}
4306			}
4307			for (var i = 0; i < calculatedScale.steps; i++) {
4308				ctx.beginPath();
4309				if (config.scaleShowLine && (i+1) % config.scaleGridLinesStep == 0 ) {
4310					ctx.strokeStyle = config.scaleLineColor;
4311					ctx.lineWidth = Math.ceil(ctx.chartLineScale*config.scaleLineWidth);
4312					ctx.moveTo(0, -scaleHop * (i + 1));
4313					for (var j = 0; j < data.datasets[0].data.length; j++) {
4314						ctx.rotate(rotationDegree);
4315						ctx.lineTo(0, -scaleHop * (i + 1));
4316					}
4317					ctx.closePath();
4318					ctx.setLineDash(lineStyleFn(config.scaleLineStyle));
4319					ctx.stroke();
4320					ctx.setLineDash([]);
4321				}
4322			}
4323			ctx.rotate(-(90 - config.startAngle) * Math.PI / 180);
4324			if (config.scaleShowLabels) {
4325				for (i = 0; i < calculatedScale.steps; i++) {
4326					ctx.textAlign = 'center';
4327					ctx.font = config.scaleFontStyle + " " + (Math.ceil(ctx.chartTextScale*config.scaleFontSize)).toString() + "px " + config.scaleFontFamily;
4328					ctx.textBaseline = "middle";
4329					if (config.scaleShowLabelBackdrop) {
4330						var textWidth = ctx.measureTextMultiLine(calculatedScale.labels[i + 1], (Math.ceil(ctx.chartTextScale*config.scaleFontSize))).textWidth;
4331						ctx.fillStyle = config.scaleBackdropColor;
4332						ctx.beginPath();
4333						ctx.rect(
4334							Math.round(Math.cos(config.startAngle * Math.PI / 180) * (scaleHop * (i + 1)) - textWidth / 2 - Math.ceil(ctx.chartSpaceScale*config.scaleBackdropPaddingX)), //X
4335							Math.round((-Math.sin(config.startAngle * Math.PI / 180) * scaleHop * (i + 1)) - (Math.ceil(ctx.chartTextScale*config.scaleFontSize)) * 0.5 - Math.ceil(ctx.chartSpaceScale*config.scaleBackdropPaddingY)), //Y
4336							Math.round(textWidth + (Math.ceil(ctx.chartSpaceScale*config.scaleBackdropPaddingX) * 2)), //Width
4337							Math.round((Math.ceil(ctx.chartTextScale*config.scaleFontSize)) + (Math.ceil(ctx.chartSpaceScale*config.scaleBackdropPaddingY) * 2)) //Height
4338						);
4339						ctx.fill();
4340					}
4341					ctx.fillStyle = config.scaleFontColor;
4342					ctx.fillTextMultiLine(calculatedScale.labels[i + 1], Math.cos(config.startAngle * Math.PI / 180) * (scaleHop * (i + 1)), -Math.sin(config.startAngle * Math.PI / 180) * scaleHop * (i + 1), ctx.textBaseline, (Math.ceil(ctx.chartTextScale*config.scaleFontSize)),true,config.detectMouseOnText,ctx,"SCALE_TEXTMOUSE",0,midPosX, midPosY,i,-1);
4343				}
4344			}
4345			for (var k = 0; k < data.labels.length; k++) {
4346				ctx.font = config.pointLabelFontStyle + " " + (Math.ceil(ctx.chartTextScale*config.pointLabelFontSize)).toString() + "px " + config.pointLabelFontFamily;
4347				ctx.fillStyle = config.pointLabelFontColor;
4348				var opposite = Math.sin((90 - config.startAngle) * Math.PI / 180 + rotationDegree * k) * (maxSize 
4348+ (Math.ceil(ctx.chartTextScale*config.pointLabelFontSize)));
4349				var adjacent = Math.cos((90 - config.startAngle) * Math.PI / 180 + rotationDegree * k) * (maxSize + (Math.ceil(ctx.chartTextScale*config.pointLabelFontSize)));
4350				var vangle = (90 - config.startAngle) * Math.PI / 180 + rotationDegree * k;
4351				while (vangle < 0) vangle = vangle + 2 * Math.PI;
4352				while (vangle > 2 * Math.PI) vangle = vangle - 2 * Math.PI;
4353				if (vangle == Math.PI || vangle == 0) {
4354					ctx.textAlign = "center";
4355				} else if (vangle > Math.PI) {
4356					ctx.textAlign = "right";
4357				} else {
4358					ctx.textAlign = "left";
4359				}
4360				ctx.textBaseline = "middle";
4361				ctx.fillTextMultiLine(data.labels[k], opposite, -adjacent, ctx.textBaseline, (Math.ceil(ctx.chartTextScale*config.pointLabelFontSize)),true,config.detectMouseOnText,ctx,"LABEL_TEXTMOUSE",0,midPosX, midPosY,k,-1);
4362			}
4363			ctx.restore();
4364		};
4365
4366		function calculateDrawingSizes() {
4367			var midX, mxlb, maxL, maxR, iter, nbiter, prevMaxSize, prevMidX,i,textMeasurement;
4368			var rotationDegree = (2 * Math.PI) / data.datasets[0].data.length;
4369			var rotateAngle = config.startAngle * Math.PI / 180;
4370			// Compute range for Mid Point of graph
4371			ctx.font = config.pointLabelFontStyle + " " + (Math.ceil(ctx.chartTextScale*config.pointLabelFontSize)).toString() + "px " + config.pointLabelFontFamily;
4372			if (!config.graphMaximized) {
4373				maxR = msr.availableWidth / 2;
4374				maxL = msr.availableWidth / 2;
4375				nbiter = 1;
4376			} else {
4377				maxR = msr.availableWidth / 2;
4378				maxL = msr.availableWidth / 2;
4379				nbiter = 40;
4380				for (i = 0; i < data.labels.length; i++) {
4381					textMeasurement = ctx.measureTextMultiLine(data.labels[i], (Math.ceil(ctx.chartTextScale*config.scaleFontSize))).textWidth + ctx.measureTextMultiLine(data.labels[i], (Math.ceil(ctx.chartTextScale*config.scaleFontSize))).textHeight;
4382					mxlb = (msr.availableWidth - textMeasurement) / (1 + Math.abs(Math.cos(rotateAngle)));
4383					if ((rotateAngle < Math.PI / 2 && rotateAngle > -Math.PI / 2) || rotateAngle > 3 * Math.PI / 2) {
4384						if (mxlb < maxR) maxR = mxlb;
4385					} else if (Math.cos(rotateAngle) != 0) {
4386						if (mxlb < maxL) maxL = mxlb;
4387					}
4388					rotateAngle -= rotationDegree;
4389				}
4390			}
4391			// compute max Radius and midPoint in that range
4392			prevMaxSize = 0;
4393			prevMidX = 0;
4394			midPosX = maxR + msr.leftNotUsableWidth;
4395			for (midX = maxR, iter = 0; iter < nbiter; ++iter, midX += (msr.availableWidth - maxL - maxR) / nbiter) {
4396				maxSize = Max([midX, msr.availableWidth - midX]);
4397				rotateAngle = config.startAngle * Math.PI / 180;
4398				mxlb = msr.available;
4399				for (i = 0; i < data.labels.length; i++) {
4400					textMeasurement = ctx.measureTextMultiLine(data.labels[i], (Math.ceil(ctx.chartTextScale*config.scaleFontSize))).textWidth + ctx.measureTextMultiLine(data.labels[i], (Math.ceil(ctx.chartTextScale*config.scaleFontSize))).textHeight;
4401					if ((rotateAngle < Math.PI / 2 && rotateAngle > -Math.PI / 2) || rotateAngle > 3 * Math.PI / 2) {
4402						mxlb = ((msr.availableWidth - midX) - textMeasurement) / Math.abs(Math.cos(rotateAngle));
4403					} else if (Math.cos(rotateAngle != 0)) {
4404						mxlb = (midX - textMeasurement) / Math.abs(Math.cos(rotateAngle));
4405					}
4406					if (mxlb < maxSize) maxSize = mxlb;
4407					if (Math.sin(rotateAngle) * msr.availableHeight / 2 > msr.availableHeight / 2 - (Math.ceil(ctx.chartTextScale*config.scaleFontSize)) * 2) {
4408						mxlb = Math.sin(rotateAngle) * msr.availableHeight / 2 - 1.5 * (Math.ceil(ctx.chartTextScale*config.scaleFontSize));
4409						if (mxlb < maxSize) maxSize = mxlb;
4410					}
4411					rotateAngle -= rotationDegree;
4412				}
4413				if (maxSize > prevMaxSize) {
4414					prevMaxSize = maxSize;
4415					midPosX = midX + msr.leftNotUsableWidth;    
4416				}
4417			}
4418			maxSize = prevMaxSize - (Math.ceil(ctx.chartTextScale*config.scaleFontSize)) / 2;
4419			//If the label height is less than 5, set it to 5 so we don't have lines on top of each other.
4420			labelHeight = Default(labelHeight, 5);
4421		};
4422
4423		function getValueBounds() {
4424			var upperValue = -Number.MAX_VALUE;
4425			var lowerValue = Number.MAX_VALUE;
4426			for (var i = 0; i < data.datasets.length; i++) {
4427				for (var j = 0; j < data.datasets[i].data.length; j++) {
4428					if(typeof data.datasets[i].data[j]=="undefined")continue;
4429					if (1 * data.datasets[i].data[j] > upperValue) {
4430						upperValue = 1 * data.datasets[i].data[j]
4431					}
4432					if (1 * data.datasets[i].data[j] < lowerValue) {
4433						lowerValue = 1 * data.datasets[i].data[j]
4434					}
4435				}
4436			}
4437			if(upperValue<lowerValue){upperValue=0;lowerValue=0;}
4438			if (Math.abs(upperValue - lowerValue) < config.zeroValue) {
4439				if(Math.abs(upperValue)< config.zeroValue){ upperValue = .9;lowerValue=-.9;}
4440				if(upperValue>0) {
4441					upperValue=upperValue*1.1;
4442					lowerValue=lowerValue*0.9;
4443				} else {
4444					upperValue=upperValue*0.9;
4445					lowerValue=lowerValue*1.1;
4446				}
4447			}
4448			if(typeof config.graphMin=="function") lowerValue= setOptionValue(true,true,1,"GRAPHMIN",ctx,data,statData,undefined,config.graphMin,"graphMin",-1,-1,{nullValue : true})
4449			else if (!isNaN(config.graphMin)) lowerValue = config.graphMin;
4450			if(typeof config.graphMax=="function") upperValue= setOptionValue(true,true,1,"GRAPHMAX",ctx,data,statData,undefined,config.graphMax,"graphMax",-1,-1,{nullValue : true})
4451			else if (!isNaN(config.graphMax)) upperValue = config.graphMax;
4452			var maxSteps = Math.floor((scaleHeight / (labelHeight * 0.66)));
4453			var minSteps = Math.floor((scaleHeight / labelHeight * 0.5));
4454			if(upperValue<lowerValue){lowerValue=upperValue-1;}
4455			return {
4456				maxValue: upperValue,
4457				minValue: lowerValue,
4458				maxSteps: maxSteps,
4459				minSteps: minSteps
4460			};
4461		};
4462
4463		return {
4464			data:data,
4465			config:config,
4466			ctx:ctx
4467		};
4468	};
4469
4470	var Pie = function(data, config, ctx) {
4471		ctx.tpchart="Pie";
4472		if(typeof data.length!="undefined")	return(PieDoughnut(convertData(data,config.generateConvertedData),config,ctx,"Pie"));
4473		else 					return (PieDoughnut(data,config,ctx,"Pie"));
4474	};
4475
4476	var Doughnut = function(data, config, ctx) {
4477		ctx.tpchart="Doughnut";
4478		if(typeof data.length!="undefined")	return(PieDoughnut(convertData(data,config.generateConvertedData),config,ctx,"Doughnut"));
4479		else 					return (PieDoughnut(data,config,ctx,"Doughnut"));
4480	};
4481
4482	var PieDoughnut = function(data, config, ctx,chartType) {
4483		var msr, midPieX, midPieY, doughnutRadius,cutoutRadius;
4484
4485		ctx.tpdata=0;
4486
4487	  if (!init_and_start(ctx,data,config)) return;
4488
4489		var statData=initPassVariableData_part1(data,config,ctx);
4490    init_result(ctx,data,statData);
4491
4492		var realCumulativeAngle = (((config.startAngle * (Math.PI / 180) + 2 * Math.PI) % (2 * Math.PI)) + 2* Math.PI) % (2* Math.PI) ; 
4493		config.logarithmic = false;
4494		config.logarithmic2 = false;
4495		msr = setMeasures(data, config, ctx, ctx.canvas.height, ctx.canvas.width, "none", "none", true, false, false, true, "Doughnut");
4496
4497		var drwSize=calculatePieDrawingSize(ctx,msr,config,data,statData);
4498
4499		midPieX=drwSize.midPieX;
4500		midPieY=drwSize.midPieY;
4501		doughnutRadius=drwSize.radius;
4502
4503		
4504    if(chartType == "Pie")cutoutRadius=0;
4505		else cutoutRadius = doughnutRadius * (config.percentageInnerCutout / 100);
4506
4507		if(doughnutRadius > 0) {
4508			initPassVariableData_part2(statData,data,config,ctx,{midPosX : midPieX,midPosY : midPieY ,int_radius : cutoutRadius ,ext_radius : doughnutRadius,outerVal : -1});
4509			animationLoop(config,msr.legendMsr, null, drawPieSegments, ctx, msr.clrx, msr.clry, msr.clrwidth, msr.clrheight, midPieX, midPieY, midPieX - doughnutRadius, midPieY + doughnutRadius, data, statData);
4510		} else {
4511			testRedraw(ctx,data,config);
4512			if (typeof config.onAnimationComplete == "function" && (config.alwaysRunFunctionAtCompletion==true || ctx.runanimationcompletefunction==true)) {
4513			   config.onAnimationComplete(ctx, config, data, 1, 0,statData);
4514				 ctx.runanimationcompletefunction=false;
4515			}
4516			ctx.firstPass=9;
4517      close_result(ctx);
4518
4519		}
4520
4521		function drawPieSegments(animationDecimal) {
4522
4523			var dataCutoutRadius, dataDoughnutRadius;
4524			var rdataCutoutRadius, rdataDoughnutRadius;
4525
4526			var prevAngle,fixAngle,firstAngle,cumulativeAngle;
4527			prevAngle=[];
4528			fixAngle=[];
4529			firstAngle=[];
4530			cumulativeAngle=[];
4531						
4532			for (var i = 0; i < data.datasets.length; i++) {
4533				var	scaleAnimation = 1,
4534					rotateAnimation = 1;
4535
4536				for(j=0;j<data.labels.length;j++) {
4537					if(typeof prevAngle[j]=="undefined" && typeof statData[i][j].firstAngle!="undefined") {
4538						prevAngle[j]=statData[i][j].firstAngle;
4539						fixAngle[j]=0;
4540						firstAngle[j]=statData[i][j].firstAngle;
4541						cumulativeAngle[j] = (((-config.startAngle * (Math.PI / 180) + 2 * Math.PI) % (2 * Math.PI)) + 2* Math.PI) % (2* Math.PI) ; 
4542						if(1*config.animationStartWithData>1 && 1*config.animationStartWithData-1 < data.datasets.length) {
4543					}
4544				}
4545
4546				if(setOptionValue(false,true,1,"DISPLAYDATA",ctx,data,statData,data.datasets[i].displayData,config.displayData,"displayData",i,j,{nullvalue : null} )== false) continue;
4547				if(setOptionValue(false,true,1,"DISPLAYDATA",ctx,data,statData,data.displayData,config.displayData,"displayData",-1,j,{nullvalue : null} )== false) continue;
4548
4549				if (typeof data.datasets[i].data[j] == 'undefined' || 1*data.datasets[i].data[j] <=0) continue;
4550
4551				if (chartType=="Pie")dataCutoutRadius=cutoutRadius;
4552				else dataCutoutRadius=cutoutRadius
4553        dataDoughnutRadius=doughnutRadius
4554
4555
4556				// correct radius for Multiple Doughnuts;
4557				rdataCutoutRadius=dataCutoutRadius+(dataDoughnutRadius-dataCutoutRadius)*statData[i][j].startRadius;
4558				rdataDoughnutRadius=dataCutoutRadius+(dataDoughnutRadius-dataCutoutRadius)*statData[i][j].stopRadius;
4559								
4560				dataCutoutRadius=rdataCutoutRadius;
4561				dataDoughnutRadius=rdataDoughnutRadius;
4562
4563				if (chartType!="Pie" || j>0)rdataCutoutRadius=dataCutoutRadius-(dataDoughnutRadius-dataCutoutRadius)*setOptionValue(false,true,1,"EXPANDINRADIUS",ctx,data,statData,data.datasets[i].expandInRadius,0,"expandInRadius",i,j,{animationDecimal: animationDecimal, scaleAnimation : scaleAnimation} );
4564        rdataDoughnutRadius=dataDoughnutRadius+(dataDoughnutRadius-dataCutoutRadius)*setOptionValue(false,true,1,"EXPANDOUTRADIUS",ctx,data,statData,data.datasets[i].expandOutRadius,0,"expandOutRadius",i,j,{animationDecimal: animationDecimal, scaleAnimation : scaleAnimation} );
4565
4566				dataCutoutRadius=rdataCutoutRadius;
4567				dataDoughnutRadius=rdataDoughnutRadius;
4568
4569				if (config.animation) {
4570					if (config.animateScale) {
4571						scaleAnimation = animationDecimal;
4572					}
4573					if (config.animateRotate) {
4574						rotateAnimation = animationDecimal;
4575					}
4576				}
4577
4578				correctedRotateAnimation = animationCorrection(rotateAnimation, data, config, i, -1, false).mainVal;
4579
4580					ctx.beginPath();
4581					ctx.lineWidth = Math.ceil(ctx.chartLineScale*config.segmentStrokeWidth);
4582					ctx.strokeStyle = "rgba(0,0,0,0)";
4583					if (config.animationByData == "ByArc") {
4584						endAngle=statData[i][j].startAngle+correctedRotateAnimation*statData[i][j].segmentAngle;
4585						ctx.arc(midPieX, midPieY, scaleAnimation * dataDoughnutRadius, statData[i][j].startAngle, endAngle,false);
4586						ctx.arc(midPieX, midPieY, scaleAnimation * dataCutoutRadius, endAngle,statData[i][j].startAngle, true);
4587					} else if(config.animationByData) {
4588// animationStartWith data not implemented      if (i<1*config.animationStartWithData-1) {
4589					        if (i<0) {
4590							ctx.arc(midPieX, midPieY, scaleAnimation * dataDoughnutRadius, statData[i][j].startAngle, statData[i].endAngle,false);
4591							ctx.arc(midPieX, midPieY, scaleAnimation * dataCutoutRadius, statData[i][j].endAngle,statData[i][j].startAngle, true);
4592						} else if(statData[i][j].startAngle <= firstAngle[j]+correctedRotateAnimation*(2*Math.PI-fixAngle[j]) ) {
4593							endAngle=statData[i][j].endAngle;
4594							if(statData[i][j].endAngle > firstAngle[j]+correctedRotateAnimation*(2*Math.PI-fixAngle[j])) {
4595								endAngle=firstAngle[j]+correctedRotateAnimation*(2*Math.PI-fixAngle[j]);
4596							} 
4597							ctx.arc(midPieX, midPieY, scaleAnimation * dataDoughnutRadius, statData[i][j].startAngle, endAngle,false);
4598							ctx.arc(midPieX, midPieY, scaleAnimation * dataCutoutRadius, endAngle,statData[i][j].startAngle, true);
4599														
4600						} else {
4601							continue; 
4602						}
4603					} else {
4604	 					ctx.arc(midPieX, midPieY, scaleAnimation * dataDoughnutRadius, prevAngle[j], prevAngle[j]+correctedRotateAnimation * (statData[i][j].endAngle-statData[i][j].startAngle),false);
4605						ctx.arc(midPieX, midPieY, scaleAnimation * dataCutoutRadius, prevAngle[j]+correctedRotateAnimation * (statData[i][j].endAngle-statData[i][j].startAngle), prevAngle[j], true);
4606						prevAngle[j]=prevAngle[j]+correctedRotateAnimation * (statData[i][j].endAngle-statData[i][j].startAngle);
4607					}
4608					ctx.closePath();  
4609					ctx.fillStyle=setOptionValue(false,true,1,"FILLCOLOR",ctx,data,statData,data.datasets[i].fillColor,config.defaultFillColor,"fillColor",i,j,{animationDecimal: animationDecimal, scaleAnimation : scaleAnimation} );
4610	
4611					ctx.fill();
4612          if (animationDecimal >
4612= config.animationStopValue){ctx.pieces_drawn.slices++;ctx.pieces_drawn.total_drawn++;}
4613
4614					if(config.segmentShowStroke=="merge") { /* avoid blank stripes between piece of chart */
4615						ctx.lineWidth =1.5;
4616						ctx.strokeStyle =setOptionValue(false,true,1,"FILLCOLOR",ctx,data,statData,data.datasets[i].fillColor,config.defaultFillColor,"fillColor",i,j,{animationDecimal: animationDecimal, scaleAnimation : scaleAnimation} );
4617						ctx.setLineDash([]);
4618						ctx.stroke();
4619					}
4620					else if (config.segmentShowStroke) {
4621						ctx.lineWidth = Math.ceil(ctx.chartLineScale*config.segmentStrokeWidth);
4622						ctx.strokeStyle = config.segmentStrokeColor;
4623						ctx.setLineDash(lineStyleFn(setOptionValue(false,true,1,"SEGMENTSTROKESTYLE",ctx,data,statData,data.datasets[i].segmentStrokeStyle,config.segmentStrokeStyle,"segmentStrokeStyle",i,-1,{animationDecimal: animationDecimal, scaleAnimation : scaleAnimation} )));
4624						ctx.stroke();					 
4625						ctx.setLineDash([]);
4626					}
4627				}
4628			}
4629			if (animationDecimal >= config.animationStopValue) {
4630				for (var i = 0; i < data.datasets.length; i++) {
4631					for(j=0;j<data.labels.length;j++) {
4632
4633						if(setOptionValue(false,true,1,"DISPLAYDATA",ctx,data,statData,data.datasets[i].displayData,config.displayData,"displayData",i,j,{nullvalue : null} )== false) continue;
4634						if(setOptionValue(false,true,1,"DISPLAYDATA",ctx,data,statData,data.displayData,config.displayData,"displayData",-1,j,{nullvalue : null} )== false) continue;
4635
4636						if (typeof data.datasets[i].data[j] == 'undefined' || 1*data.datasets[i].data[j] <=0) continue;
4637
4638						if (chartType=="Pie")dataCutoutRadius=cutoutRadius;
4639						else dataCutoutRadius=cutoutRadius-(doughnutRadius-cutoutRadius)*setOptionValue(false,true,1,"EXPANDINRADIUS",ctx,data,statData,data.datasets[i].expandInRadius,0,"expandInRadius",i,j,{animationDecimal: animationDecimal, scaleAnimation : scaleAnimation} );
4640                			        dataDoughnutRadius=doughnutRadius+(doughnutRadius-cutoutRadius)*setOptionValue(false,true,1,"EXPANDOUTRADIUS",ctx,data,statData,data.datasets[i].expandOutRadius,0,"expandOutRadius",i,j,{animationDecimal: animationDecimal, scaleAnimation : scaleAnimation} );
4641
4642						// correct radius for Multiple Doughnuts;
4643						rdataCutoutRadius=dataCutoutRadius+(dataDoughnutRadius-dataCutoutRadius)*statData[i][j].startRadius;
4644						rdataDoughnutRadius=dataCutoutRadius+(dataDoughnutRadius-dataCutoutRadius)*statData[i][j].stopRadius;
4645								
4646						dataCutoutRadius=rdataCutoutRadius;
4647						dataDoughnutRadius=rdataDoughnutRadius;
4648
4649						jsGraphAnnotate[ctx.ChartNewId][jsGraphAnnotate[ctx.ChartNewId].length] = ["MARC", i, j, statData,setOptionValue(false,true,1,"ANNOTATEDISPLAY",ctx,data,statData,data.datasets[i].annotateDisplay,config.annotateDisplay,"annotateDisplay",i,j,{nullValue : true})];
4650
4651						if (setOptionValue(false,true,1,"INGRAPHDATASHOW",ctx,data,statData,data.datasets[i].inGraphDataShow,config.inGraphDataShow,"inGraphDataShow",i,j,{nullValue : true}) && statData[i][j].segmentAngle >= (Math.PI/180) * setOptionValue(false,true,1,"INGRAPHDATAMINIMUMANGLE",ctx,data,statData,undefined,config.inGraphDataMinimumAngle,"inGraphDataMinimumAngle",i,j,{nullValue : true} )) {
4652							if (setOptionValue(false,true,1,"INGRAPHDATAANGLEPOSITION",ctx,data,statData,undefined,config.inGraphDataAnglePosition,"inGraphDataAnglePosition",i,j,{nullValue : true} ) == 1) posAngle = statData[i][j].realStartAngle + setOptionValue(false,true,1,"INGRAPHDATAPADDINANGLE",ctx,data,statData,undefined,config.inGraphDataPaddingAngle,"inGraphDataPaddingAngle",i,j,{nullValue: true  }) * (Math.PI / 180);
4653							else if (setOptionValue(false,true,1,"INGRAPHDATAANGLEPOSITION",ctx,data,statData,undefined,config.inGraphDataAnglePosition,"inGraphDataAnglePosition",i,j,{nullValue : true} ) == 2) posAngle = statData[i][j].realStartAngle- statData[i][j].segmentAngle / 2 + setOptionValue(false,true,1,"INGRAPHDATAPADDINANGLE",ctx,data,statData,undefined,config.inGraphDataPaddingAngle,"inGraphDataPaddingAngle",i,j,{nullValue: true  }) * (Math.PI / 180);
4654							else if (setOptionValue(false,true,1,"INGRAPHDATAANGLEPOSITION",ctx,data,statData,undefined,config.inGraphDataAnglePosition,"inGraphDataAnglePosition",i,j,{nullV
4654alue : true} ) == 3) posAngle = statData[i][j].realStartAngle - statData[i][j].segmentAngle + setOptionValue(false,true,1,"INGRAPHDATAPADDINANGLE",ctx,data,statData,undefined,config.inGraphDataPaddingAngle,"inGraphDataPaddingAngle",i,j,{nullValue: true  }) * (Math.PI / 180);
4655							if (setOptionValue(false,true,1,"INGRAPHDATARADIUSPOSITION",ctx,data,statData,undefined,config.inGraphDataRadiusPosition,"inGraphDataRadiusPosition",i,j,{nullValue : true} ) == 1) labelRadius = dataCutoutRadius + setOptionValue(false,true,1,"INGRAPHDATAPADDINGRADIUS",ctx,data,statData,undefined,config.inGraphDataPaddingRadius,"inGraphDataPaddingRadius",i,j,{nullValue: true} );
4656							else if (setOptionValue(false,true,1,"INGRAPHDATARADIUSPOSITION",ctx,data,statData,undefined,config.inGraphDataRadiusPosition,"inGraphDataRadiusPosition",i,j,{nullValue : true} ) == 2) labelRadius = dataCutoutRadius + (dataDoughnutRadius - dataCutoutRadius) / 2 + setOptionValue(false,true,1,"INGRAPHDATAPADDINGRADIUS",ctx,data,statData,undefined,config.inGraphDataPaddingRadius,"inGraphDataPaddingRadius",i,j,{nullValue: true} );
4657							else if (setOptionValue(false,true,1,"INGRAPHDATARADIUSPOSITION",ctx,data,statData,undefined,config.inGraphDataRadiusPosition,"inGraphDataRadiusPosition",i,j,{nullValue : true} ) == 3) labelRadius = dataDoughnutRadius + setOptionValue(false,true,1,"INGRAPHDATAPADDINGRADIUS",ctx,data,statData,undefined,config.inGraphDataPaddingRadius,"inGraphDataPaddingRadius",i,j,{nullValue: true} );
4658							ctx.save();
4659							if (setOptionValue(false,true,1,"INGRAPHDATAALIGN",ctx,data,statData,undefined,config.inGraphDataAlign,"inGraphDataAlign",i,j,{nullValue: true  }) == "off-center") {
4660								if (setOptionValue(false,true,1,"INGRAPHDATAROTATE",ctx,data,statData,undefined,config.inGraphDataRotate,"inGraphDataRotate",i,j,{nullValue : true} ) == "inRadiusAxis" || (posAngle + 2 * Math.PI) % (2 * Math.PI) >= 3 * Math.PI / 2 || (posAngle + 2 * Math.PI) % (2 * Math.PI) <= Math.PI / 2) ctx.textAlign = "left";
4661								else ctx.textAlign = "right";
4662							} else if (setOptionValue(false,true,1,"INGRAPHDATAALIGN",ctx,data,statData,undefined,config.inGraphDataAlign,"inGraphDataAlign",i,j,{nullValue: true  }) == "to-center") {
4663								if (setOptionValue(false,true,1,"INGRAPHDATAROTATE",ctx,data,statData,undefined,config.inGraphDataRotate,"inGraphDataRotate",i,j,{nullValue : true} ) == "inRadiusAxis" || (posAngle + 2 * Math.PI) % (2 * Math.PI) >= 3 * Math.PI / 2 || (posAngle + 2 * Math.PI) % (2 * Math.PI) <= Math.PI / 2) ctx.textAlign = "right";
4664								else ctx.textAlign = "left";
4665							} else ctx.textAlign = setOptionValue(false,true,1,"INGRAPHDATAALIGN",ctx,data,statData,undefined,config.inGraphDataAlign,"inGraphDataAlign",i,j,{nullValue: true  });
4666							if (setOptionValue(false,true,1,"INGRAPHDATAVALIGN",ctx,data,statData,undefined,config.inGraphDataVAlign,"inGraphDataVAlign",i,j,{nullValue : true} ) == "off-center") {
4667								if ((posAngle + 2 * Math.PI) % (2 * Math.PI) > Math.PI) ctx.textBaseline = "top";
4668								else ctx.textBaseline = "bottom";
4669							} else if (setOptionValue(false,true,1,"INGRAPHDATAVALIGN",ctx,data,statData,undefined,config.inGraphDataVAlign,"inGraphDataVAlign",i,j,{nullValue : true} ) == "to-center") {
4670								if ((posAngle + 2 * Math.PI) % (2 * Math.PI) > Math.PI) ctx.textBaseline = "bottom";
4671								else ctx.textBaseline = "top";
4672							} else ctx.textBaseline = setOptionValue(false,true,1,"INGRAPHDATAVALIGN",ctx,data,statData,undefined,config.inGraphDataVAlign,"inGraphDataVAlign",i,j,{nullValue : true} );
4673							ctx.font = setOptionValue(false,true,1,"INGRAPHDATAFONTSTYLE",ctx,data,statData,undefined,config.inGraphDataFontStyle,"inGraphDataFontStyle",i,j,{nullValue : true} ) + ' ' + setOptionValue(false,true,ctx.chartTextScale,"INGRAPHDATAFONTSIZE",ctx,data,statData,undefined,config.inGraphDataFontSize,"inGraphDataFontSize",i,j,{nullValue : true} ) + 'px ' + setOptionValue(false,true,1,"INGRAPHDATAFONTFAMILY",ctx,data,statData,undefined,config.inGraphDataFontFamily,"inGraphDataFontFamily",i,j,{nullValue : true} );
4674							ctx.fillStyle = setOptionValue(false,true,1,"INGRAPHDATAFONTCOLOR",ctx,data,statData,undefined,config.inGraphDataFontColor,"inGraphDataFontColor",i,j,{nullV
4674alue : true} );
4675							var dispString = tmplbis(setOptionValue(false,true,1,"INGRAPHDATATMPL",ctx,data,statData,undefined,config.inGraphDataTmpl,"inGraphDataTmpl",i,j,{nullValue : true} ), statData[i][j],config);
4676							ctx.translate(midPieX + labelRadius * Math.cos(posAngle), midPieY - labelRadius * Math.sin(posAngle));
4677							var rotateVal=0;
4678							if (setOptionValue(false,true,1,"INGRAPHDATAROTATE",ctx,data,statData,undefined,config.inGraphDataRotate,"inGraphDataRotate",i,j,{nullValue : true} ) == "inRadiusAxis") rotateVal=2 * Math.PI - posAngle;
4679							else if (setOptionValue(false,true,1,"INGRAPHDATAROTATE",ctx,data,statData,undefined,config.inGraphDataRotate,"inGraphDataRotate",i,j,{nullValue : true} ) == "inRadiusAxisRotateLabels") {
4680								if ((posAngle + 2 * Math.PI) % (2 * Math.PI) > Math.PI / 2 && (posAngle + 2 * Math.PI) % (2 * Math.PI) < 3 * Math.PI / 2) rotateVal=3 * Math.PI - posAngle;
4681								else rotateVal=2 * Math.PI - posAngle;
4682							} else rotateVal=setOptionValue(false,true,1,"INGRAPHDATAROTATE",ctx,data,statData,undefined,config.inGraphDataRotate,"inGraphDataRotate",i,j,{nullValue : true} ) * (Math.PI / 180);
4683							ctx.rotate(rotateVal);
4684							setTextBordersAndBackground(ctx,dispString,setOptionValue(false,true,ctx.chartTextScale,"INGRAPHDATAFONTSIZE",ctx,data,statData,undefined,config.inGraphDataFontSize,"inGraphDataFontSize",i,j,{nullValue : true} ),0,0,setOptionValue(false,true,1,"INGRAPHDATABORDERS",ctx,data,statData,undefined,config.inGraphDataBorders,"inGraphDataBorders",i,j,{nullValue : true} ),setOptionValue(true,true,1,"INGRAPHDATABORDERSSELECTION",ctx,data,statData,undefined,config.inGraphDataBordersSelection,"inGraphDataBordersSelection",i,j,{nullValue : true} ),setOptionValue(false,true,1,"INGRAPHDATABORDERSCOLOR",ctx,data,statData,undefined,config.inGraphDataBordersColor,"inGraphDataBordersColor",i,j,{nullValue : true} ),setOptionValue(false,true,ctx.chartLineScale,"INGRAPHDATABORDERSWIDTH",ctx,data,statData,undefined,config.inGraphDataBordersWidth,"inGraphDataBordersWidth",i,j,{nullValue : true} ),setOptionValue(false,true,ctx.chartSpaceScale,"INGRAPHDATABORDERSXSPACE",ctx,data,statData,undefined,config.inGraphDataBordersXSpace,"inGraphDataBordersXSpace",i,j,{nullValue : true} ),setOptionValue(false,true,ctx.chartSpaceScale,"INGRAPHDATABORDERSYSPACE",ctx,data,statData,undefined,config.inGraphDataBordersYSpace,"inGraphDataBordersYSpace",i,j,{nullValue : true} ),setOptionValue(false,true,1,"INGRAPHDATABORDERSSTYLE",ctx,data,statData,undefined,config.inGraphDataBordersStyle,"inGraphDataBordersStyle",i,j,{nullValue : true} ),setOptionValue(false,true,1,"INGRAPHDATABACKGROUNDCOLOR",ctx,data,statData,undefined,config.inGraphDataBackgroundColor,"inGraphDataBackgroundColor",i,j,{nullValue : true} ),"INGRAPHDATA",config.inGraphDataBordersRadius);
4685							ctx.fillTextMultiLine(dispString, 0, 0, ctx.textBaseline, setOptionValue(false,true,ctx.chartTextScale,"INGRAPHDATAFONTSIZE",ctx,data,statData,undefined,config.inGraphDataFontSize,"inGraphDataFontSize",i,j,{nullValue : true} ),true,config.detectMouseOnText,ctx,"INGRAPHDATA_TEXTMOUSE",rotateVal,midPieX + labelRadius * Math.cos(posAngle), midPieY - labelRadius * Math.sin(posAngle),i,j);
4686							ctx.restore();
4687						}
4688					}
4689				}
4690			}
4691		};
4692
4693		return {
4694			data:data,
4695			config:config,
4696			ctx:ctx
4697		};
4698	};
4699
4700
4701
4702	
4703	var Line = function(data, config, ctx) {
4704		var maxSize, scaleHop, scaleHop2, calculatedScale, calculatedScale2, labelHeight, scaleHeight, valueBounds, labelTemplateString, labelTemplateString2;
4705		var valueHop, xAxisLength, yAxisPosX, xAxisPosY, rotateLabels = 0,
4706			msr;
4707		var zeroY = 0;
4708		var zeroY2 = 0;
4709		ctx.tpchart="Line";
4710		ctx.tpdata=0;
4711
4712	        if (!init_and_start(ctx,data,config)) return;
4713		// adapt data when length is 1;
4714		var mxlgt = 0;
4715		for (var i = 0; i < data.datasets.length; i++) {mxlgt = Max([mxlgt, data.datasets[i].data.length]);}
4716		if (mxlgt == 1) {
4717			if (typeof(data.labels[0]) == "string") data.labels = ["", data.labels[0], ""];
4718			for (i = 0; i < data.datasets.length; i++) {
4719				if (typeof(data.datasets[i].data[0] != "undefined")) data.datasets[i].data = [undefined, data.datasets[i].data[0], undefined];
4720			}
4721			mxlgt=3;
4722		}
4723		var statData=initPassVariableData_part1(data,config,ctx);
4724    init_result(ctx,data,statData);
4725
4726		for (i = 0; i < data.datasets.length; i++) statData[i][0].tpchart="Line";
4727		msr = setMeasures(data, config, ctx, ctx.canvas.height, ctx.canvas.width, "nihil", "nihil", false, false, true, config.datasetFill, "Line");
4728		valueBounds = getValueBounds();
4729		// true or fuzzy (error for negativ values (included 0))
4730		if (config.logarithmic !== false) {
4731			if (valueBounds.minValue <= 0) {
4732				config.logarithmic = false;
4733			}
4734		}
4735		if (config.logarithmic2 !== false) {
4736			if (valueBounds.minValue2 <= 0) {
4737				config.logarithmic2 = false;
4738			}
4739		}
4740		// Check if logarithmic is meanigful
4741		var OrderOfMagnitude = calculateOrderOfMagnitude(Math.pow(10, calculateOrderOfMagnitude(valueBounds.maxValue) + 1)) - calculateOrderOfMagnitude(Math.pow(10, calculateOrderOfMagnitude(valueBounds.minValue)));
4742		if ((config.logarithmic == 'fuzzy' && OrderOfMagnitude < 4) || config.scaleOverride) {
4743			config.logarithmic = false;
4744		}
4745		// Check if logarithmic is meanigful
4746		var OrderOfMagnitude2 = calculateOrderOfMagnitude(Math.pow(10, calculateOrderOfMagnitude(valueBounds.maxValue2) + 1)) - calculateOrderOfMagnitude(Math.pow(10, calculateOrderOfMagnitude(valueBounds.minValue2)));
4747		if ((config.logarithmic2 == 'fuzzy' && OrderOfMagnitude2 < 4) || config.scaleOverride2) {
4748			config.logarithmic2 = false;
4749		}
4750		//Check and set the scale
4751		labelTemplateString = (config.scaleShowLabels) ? config.scaleLabel : "";
4752		labelTemplateString2 = (config.scaleShowLabels2) ? config.scaleLabel2 : "";
4753		if (!config.scaleOverride) {
4754			if(valueBounds.maxSteps>0 && valueBounds.minSteps>0) {
4755				calculatedScale = calculateScale(1, config, valueBounds.maxSteps, valueBounds.minSteps, valueBounds.maxValue, valueBounds.minValue, labelTemplateString);
4756			}
4757		} else {
4758			var scaleStartValue= setOptionValue(true,true,1,"SCALESTARTVALUE",ctx,data,statData,undefined,config.scaleStartValue,"scaleStartValue",-1,-1,{nullValue : true} );
4759			var scaleSteps =setOptionValue(true,true,1,"SCALESTEPS",ctx,data,statData,undefined,config.scaleSteps,"scaleSteps",-1,-1,{nullValue : true} );
4760			var scaleStepWidth = setOptionValue(true,true,1,"SCALESTEPWIDTH",ctx,data,statData,undefined,config.scaleStepWidth,"scaleStepWidth",-1,-1,{nullValue : true} );
4761			calculatedScale = {
4762				steps: scaleSteps,
4763				stepValue: scaleStepWidth,
4764				graphMin: scaleStartValue,
4765				graphMax: scaleStartValue + scaleSteps * scaleStepWidth,
4766				labels: []
4767			}
4768			populateLabels(1, config, labelTemplateString, calculatedScale.labels, calculatedScale.steps, scaleStartValue, calculatedScale.graphMax, scaleStepWidth);
4769		}
4770
4771		if (valueBounds.dbAxis || config.forceSecondScale) {
4772			if (!config.scaleOverride2) {
4773				if(valueBounds.maxSteps>0 && valueBounds.minSteps>0) {
4774					calculatedScale2 = calculateScale(2, config, valueBounds.maxSteps, valueBounds.minSteps, valueBounds.maxValue2, valueBounds.minValue2, labelTemplateString2);
4775				}
4776			} else {
4777				var scaleStartValue2= setOptionValue(true,true,1,"SCALESTARTVALUE2",ctx,data,statData,undefined,config.scaleStartValue2,"scaleStartValue2",-1,-1,{nullValue : true} );
4778				var scaleSteps2 =setOptionValue(true,true,1,"SCALESTEPS2",ctx,data,statData,undefined,config.scaleSteps2,"scaleSteps2",-1,-1,{nullValue : true} );
4779				var scaleStepWidth2 = setOptionValue(true,true,1,"SCALESTEPWIDTH2",ctx,data,statData,undefined,config.scaleStepWidth2,"scaleStepWidth2",-1,-1,{nullValue : true} );
4780
4781				calculatedScale2 = {
4782					steps: scaleSteps2,
4783					stepValue: scaleStepWidth2,
4784					graphMin: scaleStartValue2,
4785					graphMax: scaleStartValue2 + scaleSteps2 * scaleStepWidth2,
4786					labels: []
4787				}
4788				populateLabels(2, config, labelTemplateString2, calculatedScale2.labels, calculatedScale2.steps, scaleStartValue2, calculatedScale2.graphMax, scaleStepWidth2);
4789			}
4790		} else {
4791			calculatedScale2 = {
4792				steps: 0,
4793				stepValue: 0,
4794				graphMin: 0,
4795				graphMax: 0,
4796				labels: null
4797			}
4798		}
4799		if(valueBounds.maxSteps>0 && valueBounds.minSteps>0) {
4800			msr = setMeasures(data, config, ctx, ctx.canvas.height, ctx.canvas.width, calculatedScale.labels, calculatedScale2.labels, false, false, true, config.datasetFill, "Line");
4801			var prevHeight=msr.availableHeight;
4802			msr.availableHeight = msr.availableHeight - Math.ceil(ctx.chartLineScale*Math.max(config.scaleTickSizeBottom,config.scaleMinorTickSizeBottom*(config.scaleMinorTickHorizontalCount>0))) - Math.ceil(ctx.chartLineScale*Math.max(config.scaleTickSizeTop,config.scaleMinorTickSizeTop*(config.scaleMinorTickHorizontalCount>0)));
4803			msr.availableWidth = msr.availableWidth - Math.ceil(ctx.chartLineScale*Math.max(config.scaleTickSizeLeft,config.scaleMinorTickSizeLeft*(config.scaleMinorTickVerticalCount>0))) - Math.ceil(ctx.chartLineScale*Math.max(config.scaleTickSizeRight,config.scaleMinorTickSizeRight*(config.scaleMinorTickVerticalCount>0)));
4804			scaleHop = Math.floor(msr.availableHeight / calculatedScale.steps);
4805			scaleHop2 = Math.floor(msr.availableHeight / calculatedScale2.steps);
4806			valueHop = Math.floor(msr.availableWidth / (data.labels.length - 1));
4807			if (valueHop == 0 || config.fullWidthGraph) valueHop = (msr.availableWidth / (data.labels.length - 1));
4808			msr.clrwidth = msr.clrwidth - (msr.availableWidth - (data.labels.length - 1) * valueHop);
4809			msr.topNotUsableHeight+= (msr.availableHeight - (calculatedScale.steps) * scaleHop);
4810			msr.rightNotUsableWidth+= (msr.availableWidth - (data.labels.length - 1) * valueHop);
4811			msr.availableWidth = (data.labels.length - 1) * valueHop;
4812			msr.availableHeight = (calculatedScale.steps) * scaleHop;
4813 			yAxisPosX = msr.leftNotUsableWidth + Math.ceil(ctx.chartLineScale*Math.max(config.scaleTickSizeLeft,config.scaleMinorTickSizeLeft*(config.scaleMinorTickVerticalCount>0)));
4814			xAxisPosY = msr.topNotUsableHeight + msr.availableHeight + Math.ceil(ctx.chartLineScale*Math.max(config.scaleTickSizeTop,config.scaleMinorTickSizeTop*(config.scaleMinorTickHorizontalCount>0)));
4815			drawLabels();
4816			zeroY = calculateOffset(config.logarithmic, 0, calculatedScale, scaleHop);
4817			if(typeof calculatedScale2 ==="object")zeroY2 = calculateOffset(config.logarithmic2, 0, calculatedScale2, scaleHop2);
4818			initPassVariableData_part2(statData,data,config,ctx,{
4819				xAxisPosY : xAxisPosY,
4820				yAxisPosX : yAxisPosX,
4821				valueHop : valueHop,
4822				nbValueHop : data.labels.length - 1,
4823				scaleHop : scaleHop,
4824				zeroY : zeroY,
4825				calculatedScale : calculatedScale,
4826				logarithmic  : config.logarithmic,
4827				scaleHop2: scaleHop2,
4828				zeroY2: zeroY2,
4829				msr : msr,
4830				calculatedScale2: calculatedScale2,
4831				logarithmic2: config.logarithmic2} );
4832			animationLoop(config,msr.legendMsr, drawScale, drawLines, ctx, msr.clrx, msr.clry, msr.clrwidth, msr.clrheight, yAxisPosX + msr.availableWidth / 2, xAxisPosY - msr.availableHeight / 2, yAxisPosX, xAxisPosY, data, statData);
4833		} else {
4834			testRedraw(ctx,data,config);
4835			if (typeof config.onAnimationComplete == "function" && (config.alwaysRunFunctionAtCompletion==true || ctx.runanimationcompletefunction==true)) {
4836			   config.onAnimationComplete(ctx, config, data, 1, 0,statData);
4837				 ctx.runanimationcompletefunction=false;
4838			}
4839			ctx.firstPass=9;
4840      close_result(ctx);
4841
4842		}
4843
4844
4845		function drawLines(animPc) {
4846			drawLinesDataset(animPc, data, config, ctx, statData,{xAxisPosY : xAxisPosY,yAxisPosX : yAxisPosX, valueHop : valueHop, nbValueHop : data.labels.length - 1 });
4847			if (animPc >= 1) {
4848				if (typeof drawMath == "function") {
4849					drawMath(ctx, config, data, msr, {
4850						xAxisPosY: xAxisPosY,
4851						yAxisPosX: yAxisPosX,
4852						valueHop: valueHop,
4853						scaleHop: scaleHop,
4854						zeroY: zeroY,
4855						calculatedScale: calculatedScale,
4856						calculateOffset: calculateOffset,
4857						statData : statData
4858
4859					});
4860				}
4861			}
4862		};
4863    
4864    function drawScale() {
4865      drawGridScale(ctx,data,config,msr,yAxisPosX,xAxisPosY,zeroY,valueHop,scaleHop,calculatedScale.steps,data.labels.length+0);
4866    };
4867
4868
4869		function drawLabels() {
4870      var decal, subloop;
4871			ctx.font = config.scaleFontStyle + " " + (Math.ceil(ctx.chartTextScale*config.scaleFontSize)).toString() + "px " + config.scaleFontFamily;
4872			//X Labels     
4873			if (config.xAxisTop || config.xAxisBottom) {
4874				ctx.textBaseline = "top";
4875				ctx.fillStyle = config.scaleFontColor;
4876				if (config.xAxisBottom) {
4877					if (msr.rotateLabels > 90) {
4878						ctx.save();
4879						ctx.textAlign = "left";
4880//						ctx.textAlign = "right";
4881					} else if (msr.rotateLabels > 0) {
4882						ctx.save();
4883						ctx.textAlign = "right";
4884					} else {
4885						ctx.textAlign = "center";
4886					}
4887          decal=0;
4888          subloop=0;
4889          if(config.xAxisMiddle==true) {
4890            decal=valueHop/2;
4891            subloop=1;
4892          }
4893					for (var i = 0; i < data.labels.length-subloop; i++) {
4894						if(showLabels(ctx,data,config,i)){
4895							ctx.save();
4896							if (msr.rotateLabels > 0) {
4897								ctx.translate(yAxisPosX + i * valueHop - msr.highestXLabel / 2 + decal, msr.xLabelPos);
4898								ctx.rotate(-((msr.rotateLabels + 180*(msr.rotateLabels>90)) * (Math.PI / 180)));
4899								ctx.fillTextMultiLine(fmtChartJS(config, data.labels[i], config.fmtXLabel), 0, 0, ctx.textBaseline, (Math.ceil(ctx.chartTextScale*config.scaleFontSize)),true,config.detectMouseOnText,ctx,"XSCALE_TEXTMOUSE",-(msr.rotateLabels * (Math.PI / 180)),yAxisPosX + i * valueHop - msr.highestXLabel / 2 + decal, msr.xLabelPos,i,-1);
4900							} else {
4901								ctx.fillTextMultiLine(fmtChartJS(config, data.labels[i], config.fmtXLabel), yAxisPosX + i * valueHop + decal, msr.xLabelPos, ctx.textBaseline, (Math.ceil(ctx.chartTextScale*config.scaleFontSize)),true,config.detectMouseOnText,ctx,"XSCALE_TEXTMOUSE",0,0,0,i,-1);
4902							}
4903							ctx.restore();
4904						}
4905					}
4906				}
4907				if (config.xAxisTop) {
4908					if (msr.rotateTLabels > 90) {
4909						ctx.save();
4910						ctx.textAlign = "left";
4911					} else if (msr.rotateTLabels > 0) {
4912						ctx.save();
4913						ctx.textAlign = "right";
4914					} else {
4915						ctx.textAlign = "center";
4916					}
4917					var label;
4918					if(typeof data.labels2 =="object")label=data.labels2;
4919					else label=data.labels;
4920
4921          decal=0;
4922          subloop=0;
4923          if(config.xAxisMiddle==true) {
4924            decal=valueHop/2;
4925            subloop=1;
4926          }
4927					for (var i = 0; i < label.length-subloop; i++) {
4928						if(showLabels(ctx,data,config,i)){
4929							ctx.save();
4930							if (msr.rotateTLabels > 0) {
4931								ctx.translate(yAxisPosX + i * valueHop - msr.highestXLabel / 2+decal, msr.xTLabelPos);
4932								ctx.rotate(-((msr.rotateTLabels + 180*(msr.rotateTLabels>90)) * (Math.PI / 180)));
4933								ctx.fillTextMultiLine(fmtChartJS(config, label[i], config.fmtXLabel), 0, 0, ctx.textBaseline, (Math.ceil(ctx.chartTextScale*config.scaleFontSize)),true,config.detectMouseOnText,ctx,"XSCALE_TEXTMOUSE",-(msr.rotateTLabels * (Math.PI / 180)),yAxisPosX + i * valueHop - msr.highestXLabel / 2, msr.xTLabelPos,i,-1);
4934							} else {
4935								ctx.fillTextMultiLine(fmtChartJS(config, label[i], config.fmtXLabel), yAxisPosX + i * valueHop, msr.xTLabelPos, ctx.textBaseline, (Math.ceil(ctx.chartTextScale*config.scaleFontSize)),true,config.detectMouseOnText,ctx,"XSCALE_TEXTMOUSE",0,0,0,i,-1);
4936							}
4937							ctx.restore();
4938						}
4939					}
4940				}
4941			}
4942			//Y Labels
4943			ctx.textAlign = "right";
4944			ctx.textBaseline = "middle";
4945      decal=0;
4946      subloop=0;
4947      if(config.yAxisMiddle==true) {
4948        decal=scaleHop/2;
4949        subloop=1;
4950        }
4951			for (var j = ((config.showYAxisMin) ? -1 : 0); j < calculatedScale.steps-subloop; j++) {
4952				if (config.scaleShowLabels) {
4953					if(showYLabels(ctx,data,config,j+1,calculatedScale.labels[j + 1])) {				
4954						if (config.yAxisLeft) {
4955							ctx.textAlign = "right";
4956							ctx.fillTextMultiLine(calculatedScale.labels[j + 1], yAxisPosX - (Math.ceil(ctx.chartLineScale*config.scaleTickSizeLeft) + Math.ceil(ctx.chartSpaceScale*config.yAxisSpaceRight)), xAxisPosY - ((j + 1) * scaleHop)-decal, ctx.textBaseline, (Math.ceil(ctx.chartTextScale*config.scaleFontSize)),true,config.detectMouseOnText,ctx,"YLEFTAXIS_TEXTMOUSE",0,0,0,-1,j);
4957						}
4958						if (config.yAxisRight && !(valueBounds.dbAxis || config.forceSecondScale)) {
4959							ctx.textAlign = "left";
4960							ctx.fillTextMultiLine(calculatedScale.labels[j + 1], yAxisPosX + msr.availableWidth + (Math.ceil(ctx.chartLineScale*config.scaleTickSizeRight) + Math.ceil(ctx.chartSpaceScale*config.yAxisSpaceRight)), xAxisPosY - ((j + 1) * scaleHop)-decal, ctx.textBaseline, (Math.ceil(ctx.chartTextScale*config.scaleFontSize)),true,config.detectMouseOnText,ctx,"YRIGHTAXIS_TEXTMOUSE",0,0,0,-1,j);
4961						}
4962					}
4963				}
4964			}
4965			if (config.yAxisRight && (valueBounds.dbAxis || config.forceSecondScale)) {
4966				for (j = ((config.showYAxisMin) ? -1 : 0); j < calculatedScale2.steps; j++) {
4967					if (config.scaleShowLabels) {
4968						ctx.textAlign = "left";
4969						ctx.fillTextMultiLine(calculatedScale2.labels[j + 1], yAxisPosX + msr.availableWidth + (Math.ceil(ctx.chartLineScale*config.scaleTickSizeRight) + Math.ceil(ctx.chartSpaceScale*config.yAxisSpaceRight)), xAxisPosY - ((j + 1) * scaleHop2), ctx.textBaseline, (Math.ceil(ctx.chartTextScale*config.scaleFontSize)),true,config.detectMouseOnText,ctx,"YRIGHTAXIS_TEXTMOUSE",0,0,0,-1,j);
4970					}
4971				}
4972			}
4973		};
4974
4975		function getValueBounds() {
4976			var upperValue = -Number.MAX_VALUE;
4977			var lowerValue = Number.MAX_VALUE;
4978			var upperValue2 = -Number.MAX_VALUE;
4979			var lowerValue2 = Number.MAX_VALUE;
4980			var secondAxis = false;
4981			var firstAxis = false;
4982			var mathValueHeight;
4983			for (var i = 0; i < data.datasets.length; i++) {
4984				var mathFctName = data.datasets[i].drawMathDeviation;
4985				var mathValueHeight = 0;
4986				if (typeof eval(mathFctName) == "function") {
4987					var parameter = {
4988						data: data,
4989						datasetNr: i
4990					};
4991					mathValueHeightVal = window[mathFctName](parameter);
4992				} else mathValueHeightVal=0;
4993				for (var j = 0; j < data.datasets[i].data.length; j++) {
4994					if(typeof mathValueHeightVal=="object") mathValueHeight=mathValueHeightVal[Math.min(mathValueHeightVal.length,j)];
4995					else mathValueHeight=mathValueHeightVal;
4996					
4997					if(typeof data.datasets[i].data[j] == "undefined") continue;
4998					if (data.datasets[i].axis == 2) {
4999						secondAxis = true;
5000						if (1 * data.datasets[i].data[j] + mathValueHeight > upperValue2) {
5001							upperValue2 = 1 * data.datasets[i].data[j] + mathValueHeight
5002						};
5003						if (1 * data.datasets[i].data[j] - mathValueHeight < lowerValue2) {
5004							lowerValue2 = 1 * data.datasets[i].data[j] - mathValueHeight
5005						};
5006					} else {
5007						firstAxis = true;
5008						if (1 * data.datasets[i].data[j] + mathValueHeight > upperValue) {
5009							upperValue = 1 * data.datasets[i].data[j] + mathValueHeight
5010						};
5011						if (1 * data.datasets[i].data[j] - mathValueHeight < lowerValue) {
5012							lowerValue = 1 * data.datasets[i].data[j] - mathValueHeight
5013						};
5014					}
5015				}
5016			};
5017			if(upperValue<lowerValue){upperValue=0;lowerValue=0;}
5018			if (Math.abs(upperValue - lowerValue) < config.zeroValue) {
5019				if(Math.abs(upperValue)< config.zeroValue) upperValue = .9;
5020				if(upperValue>0) {
5021					upperValue=upperValue*1.1;
5022					lowerValue=lowerValue*0.9;
5023				} else {
5024					upperValue=upperValue*0.9;
5025					lowerValue=lowerValue*1.1;
5026				}
5027				
5028			}
5029			if(typeof config.graphMin=="function")lowerValue= setOptionValue(true,true,1,"GRAPHMIN",ctx,data,statData,undefined,config.graphMin,"graphMin",-1,-1,{nullValue : true})
5030			else if (!isNaN(config.graphMin)) lowerValue = config.graphMin;
5031			if(typeof config.graphMax=="function") upperValue= setOptionValue(true,true,1,"GRAPHMAX",ctx,data,statData,undefined,config.graphMax,"graphMax",-1,-1,{nullValue : true})
5032			else if (!isNaN(config.graphMax)) upperValue = config.graphMax;
5033			if (secondAxis) {
5034				if(upperValue2<lowerValue2){upperValue2=0;lowerValue2=0;}
5035				if (Math.abs(upperValue2 - lowerValue2) < config.zeroValue) {
5036					if(Math.abs(upperValue2)< config.zeroValue) upperValue2 = .9;
5037					if(upperValue2>0) {
5038						upperValue2=upperValue2*1.1;
5039						lowerValue2=lowerValue2*0.9;
5040					} else {
5041						upperValue2=upperValue2*0.9;
5042						lowerValue2=lowerValue2*1.1;
5043					}
5044				}
5045				if(typeof config.graphMin2=="function")lowerValue2= setOptionValue(true,true,1,"GRAPHMIN",ctx,data,statData,undefined,config.graphMin2,"graphMin2",-1,-1,{nullValue : true})
5046				else if (!isNaN(config.graphMin2)) lowerValue2 = config.graphMin2;
5047				if(typeof config.graphMax2=="function") upperValue2= setOptionValue(true,true,1,"GRAPHMAX",ctx,data,statData,undefined,config.graphMax2,"graphMax2",-1,-1,{nullValue : true})
5048				else if (!isNaN(config.graphMax2)) upperValue2 = config.graphMax2;
5049			}
5050			if (!firstAxis && secondAxis) {
5051				upperValue = upperValue2;
5052				lowerValue = lowerValue2;
5053			}
5054			labelHeight = (Math.ceil(ctx.chartTextScale*config.scaleFontSize));
5055			scaleHeight = msr.availableHeight;
5056			var maxSteps = Math.floor((scaleHeight / (labelHeight * 0.66)));
5057			var minSteps = Math.floor((scaleHeight / labelHeight * 0.5));
5058			if(upperValue<lowerValue){lowerValue=upperValue-1;}
5059			if(upperValue2<lowerValue2){lowerValue2=upperValue2-1;}
5060			return {
5061				maxValue: upperValue,
5062				minValue: lowerValue,
5063				maxValue2: upperValue2,
5064				minValue2: lowerValue2,
5065				dbAxis: secondAxis,
5066				maxSteps: maxSteps,
5067				minSteps: minSteps
5068			};
5069		};
5070		return {
5071			data:data,
5072			config:config,
5073			ctx:ctx
5074		};
5075	};
5076	var StackedBar = function(data, config, ctx) {
5077		var maxSize, scaleHop, scaleHop2, calculatedScale,calculatedScale2, labelHeight, scaleHeight, valueBounds, labelTemplateString, valueHop, xAxisLength, yAxisPosX, xAxisPosY, barWidth, rotateLabels = 0,
5078			msr;
5079
5080		ctx.tpchart="StackedBar";
5081		ctx.tpdata=0;
5082
5083	        if (!init_and_start(ctx,data,config)) return;
5084		var statData=initPassVariableData_part1(data,config,ctx);
5085    init_result(ctx,data,statData);
5086
5087		var nrOfBars = data.datasets.length;
5088		for (var i = 0; i < data.datasets.length; i++) {
5089			if (data.datasets[i].type == "Line") { statData[i][0].tpchart="Line";nrOfBars--;}
5090			else statData[i][0].tpchart="Bar";	
5091		}                               
5092		config.logarithmic = false;
5093		msr = setMeasures(data, config, ctx, ctx.canvas.height, ctx.canvas.width, "nihil", "nihil", true, false, true, true, "StackedBar");
5094		valueBounds = getValueBounds();
5095		if(valueBounds.maxSteps>0 && valueBounds.minSteps>0) {
5096			//Check and set the scale
5097			labelTemplateString = (config.scaleShowLabels) ? config.scaleLabel : "";
5098			labelTemplateString2 = (config.scaleShowLabels2) ? config.scaleLabel2 : "";
5099      
5100			if (!config.scaleOverride) {
5101        calculatedScale = calculateScale(1, config, valueBounds.maxSteps, valueBounds.minSteps, valueBounds.maxValue, valueBounds.minValue, labelTemplateString);
5102			} else {
5103				var scaleStartValue= setOptionValue(true,true,1,"SCALESTARTVALUE",ctx,data,statData,undefined,config.scaleStartValue,"scaleStartValue",-1,-1,{nullValue : true} );
5104				var scaleSteps =setOptionValue(true,true,1,"SCALESTEPS",ctx,data,statData,undefined,config.scaleSteps,"scaleSteps",-1,-1,{nullValue : true} );
5105				var scaleStepWidth = setOptionValue(true,true,1,"SCALESTEPWIDTH",ctx,data,statData,undefined,config.scaleStepWidth,"scaleStepWidth",-1,-1,{nullValue : true} );
5106
5107				calculatedScale = {
5108					steps: scaleSteps,
5109					stepValue: scaleStepWidth,
5110					graphMin: scaleStartValue,
5111					labels: []
5112				}
5113
5114				for (var i = 0; i <= calculatedScale.steps; i++) {
5115					if (labelTemplateString) {
5116						calculatedScale.labels.push(tmpl(labelTemplateString, {
5117							value: fmtChartJS(config, 1 * ((scaleStartValue + (scaleStepWidth * i)).toFixed(getDecimalPlaces(scaleStepWidth))), config.fmtYLabel)
5118						},config));
5119					}
5120				}
5121        
5122      }
5123	    if (valueBounds.dbAxis || config.forceSecondScale) {
5124
5125  			if (!config.scaleOverride2) {
5126          calculatedScale2 = calculateScale(1, config, valueBounds.maxSteps, valueBounds.minSteps, valueBounds.maxValue2, valueBounds.minValue2, labelTemplateString2);
5127  			} else {
5128  				var scaleStartValue2= setOptionValue(true,true,1,"SCALESTARTVALUE2",ctx,data,statData,undefined,config.scaleStartValue2,"scaleStartValue2",-1,-1,{nullValue : true} );
5129	  			var scaleSteps2 =setOptionValue(true,true,1,"SCALESTEPS2",ctx,data,statData,undefined,config.scaleSteps2,"scaleSteps2",-1,-1,{nullValue : true} );
5130				  var scaleStepWidth2 = setOptionValue(true,true,1,"SCALESTEPWIDTH2",ctx,data,statData,undefined,config.scaleStepWidth2,"scaleStepWidth2",-1,-1,{nullValue : true} );
5131
5132			  	calculatedScale2 = {
5133		  			steps: scaleSteps2,
5134	  				stepValue: scaleStepWidth2,
5135  					graphMin: scaleStartValue2,
5136					  labels: []
5137				  }
5138
5139				  for (var i = 0; i <= calculatedScale2.steps; i++) {
5140					  if (labelTemplateString2) {
5141						  calculatedScale2.labels.push(tmpl(labelTemplateString2, {
5142							  value: fmtChartJS(config, 1 * ((scaleStartValue2 + (scaleStepWidth2 * i)).toFixed(getDecimalPlaces(scaleStepWidth2))), config.fmtYLabel)
5143						  },config));
5144					  }
5145				  }
5146
5147			  }
5148      } else {
5149   				calculatedScale2 = {
5150					steps: 0,
5151					stepValue: 0,
5152					graphMin: 0,
5153					graphMax: 0,
5154					labels: null
5155				}
5156
5157      } 
5158			msr = setMeasures(data, config, ctx, ctx.canvas.height, ctx.canvas.width, calculatedScale.labels, calculatedScale2.labels, true, false, true, true, "StackedBar");
5159			var prevHeight=msr.availableHeight;
5160       	
5161			msr.availableHeight = msr.availableHeight - Math.ceil(ctx.chartLineScale*config.scaleTickSizeBottom) - Math.ceil(ctx.chartLineScale*config.scaleTickSizeTop);
5162			msr.availableWidth = msr.availableWidth - Math.ceil(ctx.chartLineScale*config.scaleTickSizeLeft) - Math.ceil(ctx.chartLineScale*config.scaleTickSizeRight);
5163			scaleHop = Math.floor(msr.availableHeight / calculatedScale.steps);
5164			scaleHop2 = Math.floor(msr.availableHeight / calculatedScale2.steps);
5165			valueHop = Math.floor(msr.availableWidth / (data.labels.length));
5166			if (valueHop == 0 || config.fullWidthGraph) valueHop = (msr.availableWidth / data.labels.length);
5167			
5168			msr.topNotUsableHeight += (msr.availableHeight - (calculatedScale.steps) * scaleHop);
5169			msr.rightNotUsableWidth += (msr.availableWidth - (data.labels.length) * valueHop);
5170			
5171			msr.clrwidth = msr.clrwidth - (msr.availableWidth - ((data.labels.length) * valueHop));
5172			msr.availableWidth = (data.labels.length) * valueHop;
5173			msr.availableHeight = (calculatedScale.steps) * scaleHop;
5174       	
5175			yAxisPosX = msr.leftNotUsableWidth + Math.ceil(ctx.chartLineScale*config.scaleTickSizeLeft);
5176			xAxisPosY = msr.topNotUsableHeight + msr.availableHeight + Math.ceil(ctx.chartLineScale*config.scaleTickSizeTop);
5177			barWidth = (valueHop - Math.ceil(ctx.chartLineScale*config.scaleGridLineWidth) * 2 - (Math.ceil(ctx.chartSpaceScale*config.barValueSpacing) * 2) - (Math.ceil(ctx.chartSpaceScale*config.barDatasetSpacing) * 1 - 1) - (Math.ceil(ctx.chartLineScale*config.barStrokeWidth) / 2) - 1);
5178			if(barWidth>=0 && barWidth<=1)barWidth=1;
5179			if(barWidth<0 && barWidth>=-1)barWidth=-1;
5180			var additionalSpaceBetweenBars;
5181			if(1*config.maxBarWidth >0 && barWidth > 1*config.maxBarWidth) {
5182				additionalSpaceBetweenBars=(barWidth-1*config.maxBarWidth)/2;
5183				barWidth=1*config.maxBarWidth;
5184			} else additionalSpaceBetweenBars=0;
5185
5186			var zeroY = 0;
5187			var zeroY2 = 0;
5188			zeroY = calculateOffset(false, 0, calculatedScale, scaleHop);
5189			if(typeof calculatedScale2 ==="object") zeroY2 = calculateOffset(config.logarithmic2, 0, calculatedScale2, scaleHop2);       	
5190			drawLabels();
5191			initPassVariableData_part2(statData,data,config,ctx,{ 
5192				msr: msr,
5193				zeroY : zeroY,
5194				zeroY2 : zeroY2,
5195				logarithmic  : false,
5196				logarithmic2 : false,
5197				calculatedScale : calculatedScale,
5198				calculatedScale2 : calculatedScale2,
5199				additionalSpaceBetweenBars : additionalSpaceBetweenBars,
5200				scaleHop : scaleHop,
5201				scaleHop2 : scaleHop2,
5202				valueHop : valueHop,
5203				yAxisPosX : yAxisPosX,
5204				xAxisPosY : xAxisPosY,
5205				barWidth : barWidth
5206			 });
5207			animationLoop(config,msr.legendMsr, drawScale, drawBars, ctx, msr.clrx, msr.clry, msr.clrwidth, msr.clrheight, yAxisPosX + msr.availableWidth / 2, xAxisPosY - msr.availableHeight / 2, yAxisPosX, xAxisPosY, data, statData);
5208		} else {
5209			testRedraw(ctx,data,config);
5210			if (typeof config.onAnimationComplete == "function" && (config.alwaysRunFunctionAtCompletion==true || ctx.runanimationcompletefunction==true)) {
5211			   config.onAnimationComplete(ctx, config, data, 1, 0,statData);
5212				 ctx.runanimationcompletefunction=false;
5213			}
5214			ctx.firstPass=9;
5215      close_result(ctx);
5216
5217		}
5218		function drawBars(animPc) {
5219			var prevTopPos = new Array();
5220			var prevTopNeg = new Array();
5221
5222			for (var i = 0; i < data.datasets.length; i++) {
5223				if(data.datasets[i].type=="Line") continue;
5224				for (var j = 0; j < data.datasets[i].data.length; j++) {
5225					if(setOptionValue(true,true,1,"DISPLAYDATA",ctx,data,statData,data.displayData,config.displayData,"displayData",j,-1,{nullvalue : null} )== false) continue;
5226					var currentAnimPc = animationCorrection(animPc, data, config, i, j, false).animVal;
5227					if (currentAnimPc > 1) currentAnimPc = currentAnimPc - 1;
5228					if ((typeof data.datasets[i].data[j] == 'undefined') || 1*data.datasets[i].data[j] == 0 ) continue;
5229			    if (Math.abs(data.datasets[i].data[j]) < config.zeroValue && config.showZeroValue==false) continue;
5230					if(typeof prevTopPos[j]=="undefined"){
5231						prevTopPos[j]=statData[statData[i][j].firstNotMissing][j].yPosBottom;
5232						prevTopNeg[j]=statData[statData[i][j].firstNotMissing][j].yPosBottom;
5233					}
5234					var botBar, topBar;
5235					if(1*data.datasets[i].data[j] > 0) botBar=prevTopPos[j];
5236					else botBar=prevTopNeg[j];
5237					topBar=botBar+currentAnimPc*(statData[i][j].yPosTop-statData[i][j].yPosBottom);
5238					if(1*data.datasets[i].data[j] > 0) prevTopPos[j]=topBar;
5239					else prevTopNeg[j]=topBar;
5240
5241					if(setOptionValue(true,true,1,"DISPLAYDATA",ctx,data,statData,data.datasets[i].displayData,config.displayData,"displayData",i,j,{nullvalue : null} )== false) continue;
5242
5243					ctx.save();
5244					ctx.lineWidth=Math.ceil(ctx.chartLineScale*setOptionValue(true,true,1,"BARSTROKEWIDTH",ctx,data,statData,data.datasets[i].barStrokeWidth,config.barStrokeWidth,"barStrokeWidth",i,j,{animationValue: currentAnimPc, xPosLeft : statData[i][j].xPosLeft, yPosBottom : botBar, xPosRight : statData[i][j].xPosRight, yPosTop : topBar} ));					
5245					ctx.fillStyle=setOptionValue(true,true,1,"COLOR",ctx,data,statData,data.datasets[i].fillColor,config.defaultFillColor,"fillColor",i,j,{animationValue: currentAnimPc, xPosLeft : statData[i][j].xPosLeft, yPosBottom : botBar, xPosRight : statData[i][j].xPosRight, yPosTop : topBar} );
5246					ctx.strokeStyle=setOptionValue(true,true,1,"STROKECOLOR",ctx,data,statData,data.datasets[i].strokeColor,config.defaultStrokeColor,"strokeColor",i,j,{nullvalue : null} );
5247
5248
5249					if(currentAnimPc !=0 && botBar!=topBar) {
5250						ctx.beginPath();
5251						ctx.moveTo(statData[i][j].xPosLeft, botBar+(topBar-botBar)/2);
5252						ctx.lineTo(statData[i][j].xPosLeft, topBar);
5253						ctx.lineTo(statData[i][j].xPosRight, topBar);
5254						ctx.lineTo(statData[i][j].xPosRight, botBar);
5255						ctx.lineTo(statData[i][j].xPosLeft, botBar);
5256						ctx.lineTo(statData[i][j].xPosLeft, botBar+(topBar-botBar)/2);
5257						if (config.barShowStroke) { 
5258							ctx.setLineDash(lineStyleFn(setOptionValue(true,true,1,"STROKESTYLE",ctx,data,statData,data.datasets[i].datasetStrokeStyle,config.datasetStrokeStyle,"datasetStrokeStyle",i,j,{nullvalue : null} )));
5259							ctx.stroke();
5260							ctx.setLineDash([]);
5261						};
5262						ctx.closePath();
5263						ctx.fill();
5264
5265					}
5266          if (animPc >= config.animationStopValue){ctx.pieces_drawn.rectangles++;ctx.pieces_drawn.total_drawn++;}
5267					ctx.restore();
5268				}
5269			}
5270			drawLinesDataset(animPc, data, config, ctx, statData,{xAxisPosY : xAxisPosY,yAxisPosX : yAxisPosX, valueHop : valueHop, nbValueHop : data.labels.length });
5271
5272			if (animPc >= config.animationStopValue) {
5273				var 	yPos = 0,
5274					xPos = 0;
5275				for (i = 0; i < data.datasets.length; i++) {
5276					for (j = 0; j < data.datasets[i].data.length; j++) {
5277						if(setOptionValue(true,true,1,"DISPLAYDATA",ctx,data,statData,data.datasets[i].displayData,config.displayData,"displayData",i,j,{nullvalue : null} )== false) continue;
5278						if(setOptionValue(true,true,1,"DISPLAYDATA",ctx,data,statData,data.displayData,config.displayData,"displayData",j,-1,{nullvalue : null} )== false) continue;
5279						if (typeof(data.datasets[i].data[j]) == 'undefined') continue;
5280						jsGraphAnnotate[ctx.ChartNewId][jsGraphAnnotate[ctx.ChartNewId].length] = ["RECT", i, j, statData,setOptionValue(true,true,1,"ANNOTATEDISPLAY",ctx,data,statData,data.datasets[i].annotateDisplay,config.annotateDisplay,"annotateDisplay",i,j,{nullV
5280alue : true})];
5281						if(setOptionValue(true,true,1,"INGRAPHDATASHOW",ctx,data,statData,data.datasets[i].inGraphDataShow,config.inGraphDataShow,"inGraphDataShow",i,j,{nullValue : true})) {
5282							ctx.save();
5283							ctx.textAlign = setOptionValue(true,true,1,"INGRAPHDATAALIGN",ctx,data,statData,undefined,config.inGraphDataAlign,"inGraphDataAlign",i,j,{nullValue: true  });
5284							ctx.textBaseline = setOptionValue(true,true,1,"INGRAPHDATAVALIGN",ctx,data,statData,undefined,config.inGraphDataVAlign,"inGraphDataVAlign",i,j,{nullValue : true} );
5285							ctx.font = setOptionValue(true,true,1,"INGRAPHDATAFONTSTYLE",ctx,data,statData,undefined,config.inGraphDataFontStyle,"inGraphDataFontStyle",i,j,{nullValue : true} ) + ' ' + setOptionValue(true,true,ctx.chartTextScale,"INGRAPHDATAFONTSIZE",ctx,data,statData,undefined,config.inGraphDataFontSize,"inGraphDataFontSize",i,j,{nullValue : true} ) + 'px ' + setOptionValue(true,true,1,"INGRAPHDATAFONTFAMILY",ctx,data,statData,undefined,config.inGraphDataFontFamily,"inGraphDataFontFamily",i,j,{nullValue : true} );
5286							ctx.fillStyle = setOptionValue(true,true,1,"INGRAPHDATAFONTCOLOR",ctx,data,statData,undefined,config.inGraphDataFontColor,"inGraphDataFontColor",i,j,{nullValue : true} );
5287							var dispString = tmplbis(setOptionValue(true,true,1,"INGRAPHDATATMPL",ctx,data,statData,undefined,config.inGraphDataTmpl,"inGraphDataTmpl",i,j,{nullValue : true} ), statData[i][j],config);
5288							ctx.beginPath();
5289							ctx.beginPath();
5290							yPos = 0;
5291							xPos = 0;
5292							if (setOptionValue(true,true,1,"INGRAPHDATAXPOSITION",ctx,data,statData,undefined,config.inGraphDataXPosition,"inGraphDataXPosition",i,j,{nullValue : true} ) == 1) {
5293								xPos = statData[i][j].xPosLeft + setOptionValue(true,true,ctx.chartSpaceScale,"INGRAPHDATAPADDINGX",ctx,data,statData,undefined,config.inGraphDataPaddingX,"inGraphDataPaddingX",i,j,{nullValue : true} );
5294							} else if (setOptionValue(true,true,1,"INGRAPHDATAXPOSITION",ctx,data,statData,undefined,config.inGraphDataXPosition,"inGraphDataXPosition",i,j,{nullValue : true} ) == 2) {
5295								xPos = statData[i][j].xPosLeft + barWidth / 2 + setOptionValue(true,true,ctx.chartSpaceScale,"INGRAPHDATAPADDINGX",ctx,data,statData,undefined,config.inGraphDataPaddingX,"inGraphDataPaddingX",i,j,{nullValue : true} );
5296							} else if (setOptionValue(true,true,1,"INGRAPHDATAXPOSITION",ctx,data,statData,undefined,config.inGraphDataXPosition,"inGraphDataXPosition",i,j,{nullValue : true} ) == 3) {
5297								xPos = statData[i][j].xPosLeft+ barWidth + setOptionValue(true,true,ctx.chartSpaceScale,"INGRAPHDATAPADDINGX",ctx,data,statData,undefined,config.inGraphDataPaddingX,"inGraphDataPaddingX",i,j,{nullValue : true} );
5298							}
5299							if (setOptionValue(true,true,1,"INGRAPHDATAYPOSITION",ctx,data,statData,undefined,config.inGraphDataYPosition,"inGraphDataYPosition",i,j,{nullValue : true} ) == 1) {
5300								yPos = statData[i][j].yPosBottom - setOptionValue(true,true,ctx.chartSpaceScale,"INGRAPHDATAPADDINGY",ctx,data,statData,undefined,config.inGraphDataPaddingY,"inGraphDataPaddingY",i,j,{nullValue : true} );
5301							} else if (setOptionValue(true,true,1,"INGRAPHDATAYPOSITION",ctx,data,statData,undefined,config.inGraphDataYPosition,"inGraphDataYPosition",i,j,{nullValue : true} ) == 2) {
5302								yPos = (statData[i][j].yPosTop + statData[i][j].yPosBottom)/2 - setOptionValue(true,true,ctx.chartSpaceScale,"INGRAPHDATAPADDINGY",ctx,data,statData,undefined,config.inGraphDataPaddingY,"inGraphDataPaddingY",i,j,{nullValue : true} );
5303							} else if (setOptionValue(true,true,1,"INGRAPHDATAYPOSITION",ctx,data,statData,undefined,config.inGraphDataYPosition,"inGraphDataYPosition",i,j,{nullValue : true} ) == 3) {
5304								yPos = statData[i][j].yPosTop - setOptionValue(true,true,ctx.chartSpaceScale,"INGRAPHDATAPADDINGY",ctx,data,statData,undefined,config.inGraphDataPaddingY,"inGraphDataPaddingY",i,j,{nullValue : true} );
5305							}
5306							if(yPos>msr.topNotUsableHeight) {
5307								ctx.translate(xPos, yPos);
5308								var rotateVal=setOptionValue(true,true,1,"INGRAPHDATAROTATE",ctx,data,statData,undefined,config.inGraphDataRotate,"inGraphDataRotate",i,j,{nullV
5308alue : true} ) * (Math.PI / 180);
5309								ctx.rotate(rotateVal);
5310								setTextBordersAndBackground(ctx,dispString,setOptionValue(true,true,ctx.chartTextScale,"INGRAPHDATAFONTSIZE",ctx,data,statData,undefined,config.inGraphDataFontSize,"inGraphDataFontSize",i,j,{nullValue : true} ),0,0,setOptionValue(true,true,1,"INGRAPHDATABORDERS",ctx,data,statData,undefined,config.inGraphDataBorders,"inGraphDataBorders",i,j,{nullValue : true} ),setOptionValue(true,true,1,"INGRAPHDATABORDERSSELECTION",ctx,data,statData,undefined,config.inGraphDataBordersSelection,"inGraphDataBordersSelection",i,j,{nullValue : true} ),setOptionValue(true,true,1,"INGRAPHDATABORDERSCOLOR",ctx,data,statData,undefined,config.inGraphDataBordersColor,"inGraphDataBordersColor",i,j,{nullValue : true} ),setOptionValue(true,true,ctx.chartLineScale,"INGRAPHDATABORDERSWIDTH",ctx,data,statData,undefined,config.inGraphDataBordersWidth,"inGraphDataBordersWidth",i,j,{nullValue : true} ),setOptionValue(true,true,ctx.chartSpaceScale,"INGRAPHDATABORDERSXSPACE",ctx,data,statData,undefined,config.inGraphDataBordersXSpace,"inGraphDataBordersXSpace",i,j,{nullValue : true} ),setOptionValue(true,true,ctx.chartSpaceScale,"INGRAPHDATABORDERSYSPACE",ctx,data,statData,undefined,config.inGraphDataBordersYSpace,"inGraphDataBordersYSpace",i,j,{nullValue : true} ),setOptionValue(true,true,1,"INGRAPHDATABORDERSSTYLE",ctx,data,statData,undefined,config.inGraphDataBordersStyle,"inGraphDataBordersStyle",i,j,{nullValue : true} ),setOptionValue(true,true,1,"INGRAPHDATABACKGROUNDCOLOR",ctx,data,statData,undefined,config.inGraphDataBackgroundColor,"inGraphDataBackgroundColor",i,j,{nullValue : true} ),"INGRAPHDATA",config.inGraphDataBordersRadius);
5311								ctx.fillTextMultiLine(dispString, 0, 0, ctx.textBaseline, setOptionValue(true,true,ctx.chartTextScale,"INGRAPHDATAFONTSIZE",ctx,data,statData,undefined,config.inGraphDataFontSize,"inGraphDataFontSize",i,j,{nullValue : true} ),true,config.detectMouseOnText,ctx,"INGRAPHDATA_TEXTMOUSE",rotateVal,xPos, yPos,i,j);
5312							}
5313							ctx.restore();
5314						}
5315					}
5316				}
5317			}
5318		};
5319    
5320    function drawScale() {
5321      drawGridScale(ctx,data,config,msr,yAxisPosX,xAxisPosY,zeroY,valueHop,scaleHop,calculatedScale.steps,data.labels.length+1);
5322    };
5323
5324		function drawLabels() {
5325			ctx.font = config.scaleFontStyle + " " + (Math.ceil(ctx.chartTextScale*config.scaleFontSize)).toString() + "px " + config.scaleFontFamily;
5326			//X axis labels                                                          
5327			if (config.xAxisTop || config.xAxisBottom) {
5328				ctx.textBaseline = "top";
5329				ctx.fillStyle = config.scaleFontColor;
5330				if (config.xAxisBottom) {
5331					if (msr.rotateLabels > 90) {
5332						ctx.save();
5333						ctx.textAlign = "left";
5334					} else if (msr.rotateLabels > 0) {
5335						ctx.save();
5336						ctx.textAlign = "right";
5337					} else {
5338						ctx.textAlign = "center";
5339					}
5340					for (var i = 0; i < data.labels.length; i++) {
5341						if(showLabels(ctx,data,config,i)){
5342							ctx.save();
5343							if (msr.rotateLabels > 0) {
5344								ctx.translate(yAxisPosX + Math.ceil(ctx.chartSpaceScale*config.barValueSpacing) + i * valueHop + additionalSpaceBetweenBars+ (barWidth / 2) - msr.highestXLabel / 2, msr.xLabelPos);
5345								ctx.rotate(-((msr.rotateLabels + 180* (msr.rotateLabels>90)) * (Math.PI / 180)));
5346								ctx.fillTextMultiLine(fmtChartJS(config, data.labels[i], config.fmtXLabel), 0, 0, ctx.textBaseline, (Math.ceil(ctx.chartTextScale*config.scaleFontSize)),true,config.detectMouseOnText,ctx,"XAXIS_TEXTMOUSE",-(msr.rotateLabels * (Math.PI / 180)),yAxisPosX + Math.ceil(ctx.chartSpaceScale*config.barValueSpacing) + i * valueHop + additionalSpaceBetweenBars+(barWidth / 2) - msr.highestXLabel / 2, msr.xLabelPos,i,-1);
5347							} else {
5348								ctx.fillTextMultiLine(fmtChartJS(config, data.labels[i], config.fmtXLabel), yAxisPosX + Math.ceil(ctx.chartSpaceScale*config.barValueSpacing) + i * valueHop + additionalSpaceBetweenBars+(barWidth / 2), msr.xLabelPos, ctx.textBaseline, (Math.ceil(ctx.chartTextScale*config.scaleFontSize)),true,config.detectMouseOnText,ctx,"XAXIS_TEXTMOUSE",0,0,0,i,-1);
5349							}
5350							ctx.restore();
5351						}
5352					}
5353				}
5354				if (config.xAxisTop) {
5355					if (msr.rotateTLabels > 90) {
5356						ctx.save();
5357						ctx.textAlign = "left";
5358					} else if (msr.rotateTLabels > 0) {
5359						ctx.save();
5360						ctx.textAlign = "right";
5361					} else {
5362						ctx.textAlign = "center";
5363					}
5364					var label;
5365					if(typeof data.labels2 =="object")label=data.labels2;
5366					else label=data.labels;
5367					
5368					for (var i = 0; i < label.length; i++) {
5369						if(showLabels(ctx,data,config,i)){
5370							ctx.save();
5371							if (msr.rotateTLabels > 0) {
5372								ctx.translate(yAxisPosX + Math.ceil(ctx.chartSpaceScale*config.barValueSpacing) + i * valueHop + additionalSpaceBetweenBars+ (barWidth / 2) - msr.highestTXLabel / 2, msr.xTLabelPos);
5373								ctx.rotate(-((msr.rotateTLabels + 180*(msr.rotateTLabels>90))* (Math.PI / 180)));
5374								ctx.fillTextMultiLine(fmtChartJS(config, label[i], config.fmtXLabel), 0, 0, ctx.textBaseline, (Math.ceil(ctx.chartTextScale*config.scaleFontSize)),true,config.detectMouseOnText,ctx,"XAXIS_TEXTMOUSE",-(msr.rotateLabels * (Math.PI / 180)),yAxisPosX + Math.ceil(ctx.chartSpaceScale*config.barValueSpacing) + i * valueHop + additionalSpaceBetweenBars+(barWidth / 2) - msr.highestXLabel / 2, msr.xLabelPos,i,-1);
5375							} else {
5376								ctx.fillTextMultiLine(fmtChartJS(config, label[i], config.fmtXLabel), yAxisPosX + Math.ceil(ctx.chartSpaceScale*config.barValueSpacing) + i * valueHop + additionalSpaceBetweenBars+(barWidth / 2), msr.xTLabelPos, ctx.textBaseline, (Math.ceil(ctx.chartTextScale*config.scaleFontSize)),true,config.detectMouseOnText,ctx,"XAXIS_TEXTMOUSE",0,0,0,i,-1);
5377							}
5378							ctx.restore();
5379						}
5380					}
5381				}
5382				
5383			}
5384			//Y axis
5385			ctx.textAlign = "right";
5386			ctx.textBaseline = "middle";
5387      subloop=0;
5388      decal=0;          
5389      if(config.yAxisMiddle==true) {
5390        decal=scaleHop/2;
5391        subloop=1;
5392      }
5393			for (var j = ((config.showYAxisMin) ? -1 : 0); j < calculatedScale.steps-subloop; j++) {
5394				if (config.scaleShowLabels) {
5395					if(showYLabels(ctx,data,config,j+1,calculatedScale.labels[j + 1])) {				
5396						if (config.yAxisLeft) {
5397							ctx.textAlign = "right";
5398							ctx.fillTextMultiLine(calculatedScale.labels[j + 1], yAxisPosX - (Math.ceil(ctx.chartLineScale*config.scaleTickSizeLeft) + Math.ceil(ctx.chartSpaceScale*config.yAxisSpaceRight)), xAxisPosY - ((j + 1) * scaleHop)-decal, ctx.textBaseline, (Math.ceil(ctx.chartTextScale*config.scaleFontSize)),true,config.detectMouseOnText,ctx,"YLEFTAXIS_TEXTMOUSE",0,0,0,-1,j);
5399						}
5400						if (config.yAxisRight && !(valueBounds.dbAxis || config.forceSecondScale) ) {
5401							ctx.textAlign = "left";
5402							ctx.fillTextMultiLine(calculatedScale.labels[j + 1], yAxisPosX + msr.availableWidth + (Math.ceil(ctx.chartLineScale*config.scaleTickSizeRight) + Math.ceil(ctx.chartSpaceScale*config.yAxisSpaceRight)), xAxisPosY - ((j + 1) * scaleHop)-decal, ctx.textBaseline, (Math.ceil(ctx.chartTextScale*config.scaleFontSize)),true,config.detectMouseOnText,ctx,"YRIGHTAXIS_TEXTMOUSE",0,0,0,-1,j);
5403						}
5404					}
5405				}
5406			}
5407
5408			if (config.yAxisRight && (valueBounds.dbAxis || config.forceSecondScale)) {
5409        subloop=0;
5410        decal=0;          
5411        if(config.yAxisMiddle==true) {
5412          decal=valueHop/2;
5413          subloop=1;
5414        }
5415				for (j = ((config.showYAxisMin) ? -1 : 0); j < calculatedScale2.steps-subloop; j++) {
5416					if (config.scaleShowLabels) {
5417						ctx.textAlign = "left";
5418						ctx.fillTextMultiLine(calculatedScale2.labels[j + 1], yAxisPosX + msr.availableWidth + (Math.ceil(ctx.chartLineScale*config.scaleTickSizeRight) + Math.ceil(ctx.chartSpaceScale*config.yAxisSpaceRight)), xAxisPosY - ((j + 1) * scaleHop2)-decal, ctx.textBaseline, (Math.ceil(ctx.chartTextScale*config.scaleFontSize)),true,config.detectMouseOnText,ctx,"YRIGHTAXIS_TEXTMOUSE",0,0,0,-1,j);
5419					}
5420				}
5421			}
5422
5423		};
5424
5425		function getValueBounds() {
5426			var maxValp = -Number.MAX_VALUE;
5427			var minValp = Number.MAX_VALUE;
5428			var maxValn = -Number.MAX_VALUE;
5429			var minValn = Number.MAX_VALUE;
5430
5431			var maxValp2 = -Number.MAX_VALUE;
5432			var minValp2 = Number.MAX_VALUE;
5433			var maxValn2 = -Number.MAX_VALUE;
5434			var minValn2 = Number.MAX_VALUE;
5435
5436			var secondAxis = false;
5437			var firstAxis = false;
5438
5439
5440			var tempp=[];
5441			var tempn=[];
5442			var tempp2=[];
5443			var tempn2=[];
5444      
5445			var inp=0;
5446			var inn=0;
5447			var inp2=0;
5448			var inn2=0;
5449
5450			for (var i = 0; i < data.datasets.length; i++) {
5451				for (var j = 0; j < data.datasets[i].data.length; j++) {
5452
5453          if (data.datasets[i].axis == 2 && statData[i][0].tpchart=="Line") {
5454           secondAxis=true;
5455					 if(1 * data.datasets[i].data[j] > 0) {
5456					 	 if(statData[i][0].tpchart=="Bar") {
5457						   if(typeof tempp[j] == "undefined") tempp2[j]=0;
5458							 tempp2[j] += 1 * data.datasets[i].data[j];
5459							 maxValp2=Math.max(maxValp2,tempp2[j]);
5460						 } else maxValp2=Math.max(maxValp2,1 * data.datasets[i].data[j]);
5461						 minValp2=Math.min(minValp2,1 * data.datasets[i].data[j]);
5462						 inp2=1;
5463					 } else if(typeof (1 * data.datasets[i].data[j])==="number" && typeof data.datasets[i].data[j]!="undefined") {
5464					   if(statData[i][0].tpchart=="Bar") {
5465							 if(typeof tempn2[j] == "undefined") tempn2[j]=0;
5466							 tempn2[j] += (1 * data.datasets[i].data[j]);
5467							 minValn2=Math.min(minValn2,tempn2[j]);
5468						 } else minValn2=Math.min(minValn2,1 * data.datasets[i].data[j]);
5469						 maxValn2=Math.max(maxValn2,1 * data.datasets[i].data[j]);
5470						 inn2=1;
5471					 }
5472
5473
5474          } else {
5475           firstAxis=true;
5476					 if(1 * data.datasets[i].data[j] > 0) {
5477					 	 if(statData[i][0].tpchart=="Bar") {
5478						   if(typeof tempp[j] == "undefined") tempp[j]=0;
5479							 tempp[j] += 1 * data.datasets[i].data[j];
5480							 maxValp=Math.max(maxValp,tempp[j]);
5481						 } else maxValp=Math.max(maxValp,1 * data.datasets[i].data[j]);
5482						 minValp=Math.min(minValp,1 * data.datasets[i].data[j]);
5483						 inp=1;
5484					 } else if(typeof (1 * data.datasets[i].data[j])==="number" && typeof data.datasets[i].data[j]!="undefined") {
5485					   if(statData[i][0].tpchart=="Bar") {
5486							 if(typeof tempn[j] == "undefined") tempn[j]=0;
5487							 tempn[j] += (1 * data.datasets[i].data[j]);
5488							 minValn=Math.min(minValn,tempn[j]);
5489						 } else minValn=Math.min(minValn,1 * data.datasets[i].data[j]);
5490						 maxValn=Math.max(maxValn,1 * data.datasets[i].data[j]);
5491						 inn=1;
5492					 }
5493         }
5494
5495				}
5496			};
5497
5498 			if (!firstAxis && secondAxis) {
5499				upperValue = upperValue2;
5500				lowerValue = lowerValue2;
5501			}
5502
5503
5504			var upperValue, lowerValue;
5505			if (inp==0){upperValue=maxValn;lowerValue=minValn;}
5506			else if(inn==0) { upperValue=maxValp;lowerValue=minValp;}
5507			else { upperValue=maxValp;lowerValue=minValn; }
5508
5509			if(typeof config.graphMin=="function")lowerValue= setOptionValue(true,true,1,"GRAPHMIN",ctx,data,statData,undefined,config.graphMin,"graphMin",-1,-1,{nullValue : true})
5510			else if (!isNaN(config.graphMin)) lowerValue = config.graphMin;
5511			if(typeof config.graphMax=="function") upperValue= setOptionValue(true,true,1,"GRAPHMAX",ctx,data,statData,undefined,config.graphMax,"graphMax",-1,-1,{nullValue : true})
5512			else if (!isNaN(config.graphMax)) upperValue = config.graphMax;
5513
5514			if(upperValue<lowerValue){upperValue=0;lowerValue=0;}
5515			if (Math.abs(upperValue - lowerValue) < config.zeroValue) {
5516				if(Math.abs(upperValue)< config.zeroValue) upperValue = .9;
5517				if(upperValue>0) {
5518					upperValue=upperValue*1.1;
5519					lowerValue=lowerValue*0.9;
5520				} else {
5521					upperValue=upperValue*0.9;
5522					lowerValue=lowerValue*1.1;
5523				}
5524			}
5525
5526			var upperValue2, lowerValue2;
5527      if(secondAxis) {
5528			  if (inp2==0){upperValue2=maxValn2;lowerValue2=minValn2;}
5529			  else if(inn2==0) { upperValue2=maxValp2;lowerValue2=minValp2;}
5530			  else { upperValue2=maxValp2;lowerValue2=minValn2; }
5531
5532			  if(typeof config.graphMin2=="function")lowerValue2= setOptionValue(true,true,1,"GRAPHMIN2",ctx,data,statData,undefined,config.graphMin2,"graphMin2",-1,-1,{nullValue : true})
5533			  else if (!isNaN(config.graphMin2)) lowerValue2 = config.graphMin2;
5534			  if(typeof config.graphMax2=="function") upperValue2= setOptionValue(true,true,1,"GRAPHMAX2",ctx,data,statData,undefined,config.graphMax2,"graphMax2",-1,-1,{nullValue : true})
5535			  else if (!isNaN(config.graphMax2)) upperValue2 = config.graphMax2;
5536
5537			  if(upperValue2<lowerValue2){upperValue2=0;lowerValue2=0;}
5538			  if (Math.abs(upperValue2 - lowerValue2) < config.zeroValue) {
5539				  if(Math.abs(upperValue2)< config.zeroValue) upperValue2 = .9;
5540				  if(upperValue2>0) {
5541					  upperValue2=upperValue2*1.1;
5542					  lowerValue2=lowerValue2*0.9;
5543				  } else {
5544					  upperValue2=upperValue2*0.9;
5545					  lowerValue2=lowerValue2*1.1;
5546				  }
5547			  }
5548      }
5549
5550			labelHeight = (Math.ceil(ctx.chartTextScale*config.scaleFontSize));
5551			scaleHeight = msr.availableHeight;
5552			var maxSteps = Math.floor((scaleHeight / (labelHeight * 0.66)));
5553			var minSteps = Math.floor((scaleHeight / labelHeight * 0.5));
5554
5555			if(upperValue<lowerValue){lowerValue=upperValue-1;}
5556			if(upperValue2<lowerValue2){lowerValue2=upperValue2-1;}
5557
5558			return {
5559				maxValue: upperValue,
5560				minValue: lowerValue,
5561				maxValue2: upperValue2,
5562				minValue2: lowerValue2,
5563				dbAxis: secondAxis,
5564				maxSteps: maxSteps,
5565				minSteps: minSteps
5566			};
5567		};
5568		return {
5569			data:data,
5570			config:config,
5571			ctx:ctx
5572		};
5573	};
5574	/**
5575	 * Reverse the data structure for horizontal charts
5576	 * - reverse labels and every array inside datasets
5577	 * @param {object} data datasets and labels for the chart
5578	 * @return return the reversed data
5579	 */
5580	function reverseData(data) {
5581		data.labels = data.labels.reverse();
5582		for (var i = 0; i < data.datasets.length; i++) {
5583			for (var key in data.datasets[i]) {
5584				if (Array.isArray(data.datasets[i][key])) {
5585					data.datasets[i][key] = data.datasets[i][key].reverse();
5586				}
5587			}
5588		}
5589		return data;
5590	};
5591	var HorizontalStackedBar = function(data, config, ctx) {
5592		var maxSize, scaleHop, calculatedScale, labelHeight, scaleHeight, valueBounds, labelTemplateString, valueHop, xAxisLength, yAxisPosX, xAxisPosY, barWidth, rotateLabels = 0,
5593			msr;
5594
5595		if (config.reverseOrder && typeof ctx.reversed == "undefined") {
5596			ctx.reversed=true;
5597			data = reverseData(data);
5598		}
5599
5600		ctx.tpchart="HorizontalStackedBar";
5601		ctx.tpdata=0;
5602	        if (!init_and_start(ctx,data,config)) return;
5603		var statData=initPassVariableData_part1(data,config,ctx);
5604    init_result(ctx,data,statData);
5605
5606		config.logarithmic = false;
5607		msr = setMeasures(data, config, ctx, ctx.canvas.height, ctx.canvas.width, "nihil", "nihil", true, true, true,  true, "HorizontalStackedBar");
5608 		valueBounds = getValueBounds();
5609		
5610		if(valueBounds.maxSteps>0 && valueBounds.minSteps>0) {
5611			//Check and set the scale
5612			labelTemplateString = (config.scaleShowLabels) ? config.scaleLabel : "";
5613			if (!config.scaleOverride) {
5614				calculatedScale = calculateScale(1, config, valueBounds.maxSteps, valueBounds.minSteps, valueBounds.maxValue, valueBounds.minValue, labelTemplateString);
5615			} else {
5616				var scaleStartValue= setOptionValue(true,true,1,"SCALESTARTVALUE",ctx,data,statData,undefined,config.scaleStartValue,"scaleStartValue",-1,-1,{nullValue : true} );
5617				var scaleSteps =setOptionValue(true,true,1,"SCALESTEPS",ctx,data,statData,undefined,config.scaleSteps,"scaleSteps",-1,-1,{nullValue : true} );
5618				var scaleStepWidth = setOptionValue(true,true,1,"SCALESTEPWIDTH",ctx,data,statData,undefined,config.scaleStepWidth,"scaleStepWidth",-1,-1,{nullValue : true} );
5619
5620				calculatedScale = {
5621					steps: scaleSteps,
5622					stepValue: scaleStepWidth,
5623					graphMin: scaleStartValue,
5624					labels: []
5625				}
5626				for (var i = 0; i <= calculatedScale.steps; i++) {
5627					if (labelTemplateString) {
5628						calculatedScale.labels.push(tmpl(labelTemplateString, {
5629							value: fmtChartJS(config, 1 * ((scaleStartValue + (scaleStepWidth * i)).toFixed(getDecimalPlaces(scaleStepWidth))), config.fmtYLabel)
5630						},config));
5631					}
5632				}
5633			}
5634      
5635  		if (!config.scaleOverride2) {
5636				calculatedScale2 = calculateScale(1, config, valueBounds.maxSteps, valueBounds.minSteps, valueBounds.maxValue, valueBounds.minValue, labelTemplateString);
5637			} else {
5638				var scaleStartValue2= setOptionValue(true,true,1,"SCALESTARTVALUE",ctx,data,statData,undefined,config.scaleStartValue2,"scaleStartValue2",-1,-1,{nullValue : true} );
5639				var scaleSteps2 =setOptionValue(true,true,1,"SCALESTEPS",ctx,data,statData,undefined,config.scaleSteps2,"scaleSteps2",-1,-1,{nullValue : true} );
5640				var scaleStepWidth2 = setOptionValue(true,true,1,"SCALESTEPWIDTH",ctx,data,statData,undefined,config.scaleStepWidth2,"scaleStepWidth2",-1,-1,{nullValue : true} );
5641
5642				calculatedScale2 = {
5643					steps: scaleSteps2,
5644					stepValue: scaleStepWidth2,
5645					graphMin: scaleStartValue2,
5646					labels: []
5647				}
5648				for (var i = 0; i <= calculatedScale2.steps; i++) {
5649					if (labelTemplateString) {
5650						calculatedScale2.labels.push(tmpl(labelTemplateString, {
5651							value: fmtChartJS(config, 1 * ((scaleStartValue2 + (scaleStepWidth2 * i)).toFixed(getDecimalPlaces(scaleStepWidth2))), config.fmtYLabel)
5652						},config));
5653					}
5654				}
5655			}
5656  		msr = setMeasures(data, config, ctx, ctx.canvas.height, ctx.canvas.width, calculatedScale.labels, calculatedScale2.labels, true, true, true, true, "HorizontalStackedBar");
5657
5658			msr.availableHeight = msr.availableHeight - Math.ceil(ctx.chartLineScale*config.scaleTickSizeBottom) - Math.ceil(ctx.chartLineScale*config.scaleTickSizeTop);
5659			msr.availableWidth = msr.availableWidth - Math.ceil(ctx.chartLineScale*config.scaleTickSizeLeft) - Math.ceil(ctx.chartLineScale*config.scaleTickSizeRight);
5660			scaleHop = Math.floor(msr.availableHeight / data.labels.length);
5661			valueHop = Math.floor(msr.availableWidth / (calculatedScale.steps));
5662			if (valueHop == 0 || config.fullWidthGraph) valueHop = (msr.availableWidth / (calculatedScale.steps));
5663
5664			msr.clrwidth = msr.clrwidth - (msr.availableWidth - (calculatedScale.steps * valueHop));
5665			msr.topNotUsableHeight+=(msr.availableHeight - data.labels.length * scaleHop);
5666			msr.rightNotUsableWidth+=(msr.availableWidth - calculatedScale.steps * valueHop);
5667			
5668			msr.availableWidth = calculatedScale.steps * valueHop;
5669			msr.availableHeight = data.labels.length * scaleHop;
5670			yAxisPosX = msr.leftNotUsableWidth + Math.ceil(ctx.chartLineScale*config.scaleTickSizeLeft);
5671			xAxisPosY = msr.topNotUsableHeight + msr.availableHeight + Math.ceil(ctx.chartLineScale*config.scaleTickSizeTop);
5672			barWidth = (scaleHop - Math.ceil(ctx.chartLineScale*config.scaleGridLineWidth) * 2 - (Math.ceil(ctx.chartSpaceScale*config.barValueSpacing) * 2) - (Math.ceil(ctx.chartSpaceScale*config.barDatasetSpacing) * 1 - 1) - (Math.ceil(ctx.chartLineScale*config.barStrokeWidth) / 2) - 1);
5673			if(barWidth>=0 && barWidth<=1)barWidth=1;
5674			if(barWidth<0 && barWidth>=-1)barWidth=-1;
5675			var additionalSpaceBetweenBars;
5676			if(1*config.maxBarWidth >0 && barWidth > 1*config.maxBarWidth) {
5677				additionalSpaceBetweenBars= (barWidth-1*config.maxBarWidth)/2;
5678				barWidth=1*config.maxBarWidth;
5679			} else additionalSpaceBetweenBars=0;
5680
5681			drawLabels();
5682			var zeroY=  HorizontalCalculateOffset(0 , calculatedScale, scaleHop);
5683			initPassVariableData_part2(statData,data,config,ctx,{ 
5684				yAxisPosX : yAxisPosX,
5685				additionalSpaceBetweenBars : additionalSpaceBetweenBars,
5686				xAxisPosY : xAxisPosY,
5687				barWidth : barWidth,
5688				zeroY : zeroY,
5689				scaleHop : scaleHop,
5690				valueHop : valueHop,
5691				calculatedScale : calculatedScale
5692			});
5693			
5694			animationLoop(config,msr.legendMsr, drawScale, drawBars, ctx, msr.clrx, msr.clry, msr.clrwidth, msr.clrheight, yAxisPosX + msr.availableWidth / 2, xAxisPosY - msr.availableHeight / 2, yAxisPosX, xAxisPosY, data, statData);
5695		} else {
5696			testRedraw(ctx,data,config);
5697			if (typeof config.onAnimationComplete == "function" && (config.alwaysRunFunctionAtCompletion==true || ctx.runanimationcompletefunction==true)) {
5698			   config.onAnimationComplete(ctx, config, data, 1, 0,statData);
5699				 ctx.runanimationcompletefunction=false;
5700			}
5701			ctx.firstPass=9;
5702      close_result(ctx);
5703
5704		}
5705		function HorizontalCalculateOffset(val, calculatedScale, scaleHop) {
5706			var outerValue = calculatedScale.steps * calculatedScale.stepValue;
5707			var adjustedValue = val - calculatedScale.graphMin;
5708			var scalingFactor = CapValue(adjustedValue / outerValue, 1, 0);
5709			return (scaleHop * calculatedScale.steps) * scalingFactor;
5710		};
5711
5712		function drawBars(animPc) {
5713			var prevLeftPos = new Array();
5714			var prevLeftNeg = new Array();
5715
5716			for (var i = 0; i < data.datasets.length; i++) {
5717				for (var j = 0; j < data.datasets[i].data.length; j++) {
5718					if(setOptionValue(true,true,1,"DISPLAYDATA",ctx,data,statData,data.displayData,config.displayData,"displayData",j,-1,{nullvalue : null}
5718 )== false) continue;
5719					ctx.lineWidth=Math.ceil(ctx.chartLineScale*setOptionValue(true,true,1,"BARSTROKEWIDTH",ctx,data,statData,data.datasets[i].barStrokeWidth,config.barStrokeWidth,"barStrokeWidth",i,j,{animationValue: currentAnimPc, xPosLeft : leftBar, yPosBottom : statData[i][j].yPosBottom, xPosRight : rightBar, yPosTop : statData[i][j].yPosBottom} ));
5720					var currentAnimPc = animationCorrection(animPc, data, config, i, j, false).animVal;
5721					if (currentAnimPc > 1) currentAnimPc = currentAnimPc - 1;
5722					if ((typeof(data.datasets[i].data[j]) == 'undefined') || 1*data.datasets[i].data[j] == 0 ) continue;
5723			    if (Math.abs(data.datasets[i].data[j]) < config.zeroValue && config.showZeroValue==false) continue;
5724
5725					if(typeof prevLeftPos[j]=="undefined"){
5726						prevLeftPos[j]=statData[statData[i][j].firstNotMissing][j].xPosLeft;
5727						prevLeftNeg[j]=statData[statData[i][j].firstNotMissing][j].xPosLeft;
5728					}
5729
5730					var leftBar, rightBar;
5731					if(1*data.datasets[i].data[j] > 0) leftBar=prevLeftPos[j];
5732					else leftBar=prevLeftNeg[j];
5733					rightBar=leftBar+currentAnimPc*(statData[i][j].xPosRight-statData[i][j].xPosLeft);
5734					if(1*data.datasets[i].data[j] > 0) prevLeftPos[j]=rightBar;
5735					else prevLeftNeg[j]=rightBar;
5736					if(setOptionValue(true,true,1,"DISPLAYDATA",ctx,data,statData,data.datasets[i].displayData,config.displayData,"displayData",i,j,{nullvalue : null} )== false) continue;
5737
5738					ctx.fillStyle=setOptionValue(true,true,1,"COLOR",ctx,data,statData,data.datasets[i].fillColor,config.defaultFillColor,"fillColor",i,j,{animationValue: currentAnimPc, xPosLeft : leftBar, yPosBottom : statData[i][j].yPosBottom, xPosRight : rightBar, yPosTop : statData[i][j].yPosBottom} );
5739
5740					ctx.strokeStyle=setOptionValue(true,true,1,"STROKECOLOR",ctx,data,statData,data.datasets[i].strokeColor,config.defaultStrokeColor,"strokeColor",i,j,{nullvalue : null} );
5741
5742					if(currentAnimPc !=0 && statData[i][j].xPosLeft!=statData[i][j].xPosRight ) {
5743						ctx.beginPath();
5744						ctx.moveTo(leftBar+(rightBar-leftBar)/2, statData[i][j].yPosTop);
5745						ctx.lineTo(rightBar, statData[i][j].yPosTop);
5746						ctx.lineTo(rightBar, statData[i][j].yPosBottom);
5747						ctx.lineTo(leftBar, statData[i][j].yPosBottom);
5748						ctx.lineTo(leftBar, statData[i][j].yPosTop);
5749						ctx.lineTo(leftBar+(rightBar-leftBar)/2, statData[i][j].yPosTop);
5750						if (config.barShowStroke){  
5751							ctx.setLineDash(lineStyleFn(setOptionValue(true,true,1,"STROKESTYLE",ctx,data,statData,data.datasets[i].datasetStrokeStyle,config.datasetStrokeStyle,"datasetStrokeStyle",i,j,{nullvalue : null} )));
5752							ctx.stroke(); 
5753							ctx.setLineDash([]);
5754						}
5755						ctx.closePath();
5756						ctx.fill();
5757					}
5758          if (animPc >= config.animationStopValue){ctx.pieces_drawn.rectangles++;ctx.pieces_drawn.total_drawn++;}
5759				}
5760			}
5761			if (animPc >= config.animationStopValue) {
5762				var yPos = 0,
5763					xPos = 0;
5764				for (i = 0; i < data.datasets.length; i++) {
5765					for (j = 0; j < data.datasets[i].data.length; j++) {
5766						if(setOptionValue(true,true,1,"DISPLAYDATA",ctx,data,statData,data.datasets[i].displayData,config.displayData,"displayData",i,j,{nullvalue : null} )== false) continue;
5767						if(setOptionValue(true,true,1,"DISPLAYDATA",ctx,data,statData,data.displayData,config.displayData,"displayData",j,-1,{nullvalue : null} )== false) continue;
5768						if ((typeof(data.datasets[i].data[j]) == 'undefined')) continue;
5769						jsGraphAnnotate[ctx.ChartNewId][jsGraphAnnotate[ctx.ChartNewId].length] = ["RECT", i ,j, statData,setOptionValue(true,true,1,"ANNOTATEDISPLAY",ctx,data,statData,data.datasets[i].annotateDisplay,config.annotateDisplay,"annotateDisplay",i,j,{nullValue : true})];
5770						if(setOptionValue(true,true,1,"INGRAPHDATASHOW",ctx,data,statData,data.datasets[i].inGraphDataShow,config.inGraphDataShow,"inGraphDataShow",i,j,{nullValue : true})) {
5771							ctx.save();
5772							ctx.textAlign = setOptionValue(true,true,1,"INGRAPHDATAALIGN",ctx,data,statData,undefined,config.inGraphDataAlign,"inGraphDataAlign",i,j,{nullValue: true  });
5773							ctx.textBaseline = setOptionValue(true,true,1,"INGRAPHDATAVALIGN",ctx,data,statData,undefined,config.inGraphDataVAlign,"inGraphDataVAlign",i,j,{nullValue : true} );
5774							ctx.font = setOptionValue(true,true,1,"INGRAPHDATAFONTSTYLE",ctx,data,statData,undefined,config.inGraphDataFontStyle,"inGraphDataFontStyle",i,j,{nullValue : true} ) + ' ' + setOptionValue(true,true,ctx.chartTextScale,"INGRAPHDATAFONTSIZE",ctx,data,statData,undefined,config.inGraphDataFontSize,"inGraphDataFontSize",i,j,{nullValue : true} ) + 'px ' + setOptionValue(true,true,1,"INGRAPHDATAFONTFAMILY",ctx,data,statData,undefined,config.inGraphDataFontFamily,"inGraphDataFontFamily",i,j,{nullValue : true} );
5775							ctx.fillStyle = setOptionValue(true,true,1,"INGRAPHDATAFONTCOLOR",ctx,data,statData,undefined,config.inGraphDataFontColor,"inGraphDataFontColor",i,j,{nullValue : true} );
5776							var dispString = tmplbis(setOptionValue(true,true,1,"INGRAPHDATATMPL",ctx,data,statData,undefined,config.inGraphDataTmpl,"inGraphDataTmpl",i,j,{nullValue : true} ),statData[i][j],config);
5777							ctx.beginPath();
5778							yPos = 0;
5779							xPos = 0;
5780							if (setOptionValue(true,true,1,"INGRAPHDATAXPOSITION",ctx,data,statData,undefined,config.inGraphDataXPosition,"inGraphDataXPosition",i,j,{nullValue : true} ) == 1) {
5781								xPos = statData[i][j].xPosLeft + setOptionValue(true,true,ctx.chartSpaceScale,"INGRAPHDATAPADDINGX",ctx,data,statData,undefined,config.inGraphDataPaddingX,"inGraphDataPaddingX",i,j,{nullValue : true} );
5782							} else if (setOptionValue(true,true,1,"INGRAPHDATAXPOSITION",ctx,data,statData,undefined,config.inGraphDataXPosition,"inGraphDataXPosition",i,j,{nullValue : true} ) == 2) {
5783								xPos = statData[i][j].xPosLeft + (statData[i][j].xPosRight-statData[i][j].xPosLeft)/2 + setOptionValue(true,true,ctx.chartSpaceScale,"INGRAPHDATAPADDINGX",ctx,data,statData,undefined,config.inGraphDataPaddingX,"inGraphDataPaddingX",i,j,{nullValue : true} );
5784							} else if (setOptionValue(true,true,1,"INGRAPHDATAXPOSITION",ctx,data,statData,undefined,config.inGraphDataXPosition,"inGraphDataXPosition",i,j,{nullValue : true} ) == 3) {
5785								xPos = statData[i][j].xPosRight + setOptionValue(true,true,ctx.chartSpaceScale,"INGRAPHDATAPADDINGX",ctx,data,statData,undefined,config.inGraphDataPaddingX,"inGraphDataPaddingX",i,j,{nullValue : true} );
5786							}
5787							if (setOptionValue(true,true,1,"INGRAPHDATAYPOSITION",ctx,data,statData,undefined,config.inGraphDataYPosition,"inGraphDataYPosition",i,j,{nullValue : true} ) == 1) {
5788								yPos = statData[i][j].yPosBottom - setOptionValue(true,true,ctx.chartSpaceScale,"INGRAPHDATAPADDINGY",ctx,data,statData,undefined,config.inGraphDataPaddingY,"inGraphDataPaddingY",i,j,{nullValue : true} );
5789							} else if (setOptionValue(true,true,1,"INGRAPHDATAYPOSITION",ctx,data,statData,undefined,config.inGraphDataYPosition,"inGraphDataYPosition",i,j,{nullV
5789alue : true} ) == 2) {
5790								yPos = statData[i][j].yPosBottom - barWidth / 2 - setOptionValue(true,true,ctx.chartSpaceScale,"INGRAPHDATAPADDINGY",ctx,data,statData,undefined,config.inGraphDataPaddingY,"inGraphDataPaddingY",i,j,{nullValue : true} );
5791							} else if (setOptionValue(true,true,1,"INGRAPHDATAYPOSITION",ctx,data,statData,undefined,config.inGraphDataYPosition,"inGraphDataYPosition",i,j,{nullValue : true} ) == 3) {
5792								yPos = statData[i][j].yPosTop - setOptionValue(true,true,ctx.chartSpaceScale,"INGRAPHDATAPADDINGY",ctx,data,statData,undefined,config.inGraphDataPaddingY,"inGraphDataPaddingY",i,j,{nullValue : true} );
5793							}
5794							ctx.translate(xPos, yPos);
5795							rotateVal=setOptionValue(true,true,1,"INGRAPHDATAROTATE",ctx,data,statData,undefined,config.inGraphDataRotate,"inGraphDataRotate",i,j,{nullValue : true} ) * (Math.PI / 180);
5796							ctx.rotate(rotateVal);
5797							setTextBordersAndBackground(ctx,dispString,setOptionValue(true,true,ctx.chartTextScale,"INGRAPHDATAFONTSIZE",ctx,data,statData,undefined,config.inGraphDataFontSize,"inGraphDataFontSize",i,j,{nullValue : true} ),0,0,setOptionValue(true,true,1,"INGRAPHDATABORDERS",ctx,data,statData,undefined,config.inGraphDataBorders,"inGraphDataBorders",i,j,{nullValue : true} ),setOptionValue(true,true,1,"INGRAPHDATABORDERSSELECTION",ctx,data,statData,undefined,config.inGraphDataBordersSelection,"inGraphDataBordersSelection",i,j,{nullValue : true} ),setOptionValue(true,true,1,"INGRAPHDATABORDERSCOLOR",ctx,data,statData,undefined,config.inGraphDataBordersColor,"inGraphDataBordersColor",i,j,{nullValue : true} ),setOptionValue(true,true,ctx.chartLineScale,"INGRAPHDATABORDERSWIDTH",ctx,data,statData,undefined,config.inGraphDataBordersWidth,"inGraphDataBordersWidth",i,j,{nullValue : true} ),setOptionValue(true,true,ctx.chartSpaceScale,"INGRAPHDATABORDERSXSPACE",ctx,data,statData,undefined,config.inGraphDataBordersXSpace,"inGraphDataBordersXSpace",i,j,{nullValue : true} ),setOptionValue(true,true,ctx.chartSpaceScale,"INGRAPHDATABORDERSYSPACE",ctx,data,statData,undefined,config.inGraphDataBordersYSpace,"inGraphDataBordersYSpace",i,j,{nullValue : true} ),setOptionValue(true,true,1,"INGRAPHDATABORDERSSTYLE",ctx,data,statData,undefined,config.inGraphDataBordersStyle,"inGraphDataBordersStyle",i,j,{nullValue : true} ),setOptionValue(true,true,1,"INGRAPHDATABACKGROUNDCOLOR",ctx,data,statData,undefined,config.inGraphDataBackgroundColor,"inGraphDataBackgroundColor",i,j,{nullValue : true} ),"INGRAPHDATA",config.inGraphDataBordersRadius);
5798							ctx.fillTextMultiLine(dispString, 0, 0, ctx.textBaseline, setOptionValue(true,true,ctx.chartTextScale,"INGRAPHDATAFONTSIZE",ctx,data,statData,undefined,config.inGraphDataFontSize,"inGraphDataFontSize",i,j,{nullValue : true} ),true,config.detectMouseOnText,ctx,"INGRAPHDATA_TEXTMOUSE",rotateVal,xPos, yPos,i,j);
5799							ctx.restore();
5800						}
5801					}
5802				}
5803			}
5804		};
5805
5806		function drawScale() {
5807      drawGridScale(ctx,data,config,msr,yAxisPosX,xAxisPosY,zeroY,valueHop,scaleHop,data.labels.length+0,calculatedScale.steps+1);
5808    };
5809
5810
5811
5812		function drawLabels() {
5813			ctx.font = config.scaleFontStyle + " " + (Math.ceil(ctx.chartTextScale*config.scaleFontSize)).toString() + "px " + config.scaleFontFamily;
5814			//X axis line                                                          
5815			if (config.scaleShowLabels && (config.xAxisTop || config.xAxisBottom)) {
5816				ctx.textBaseline = "top";
5817				ctx.fillStyle = config.scaleFontColor;
5818				if (config.xAxisBottom) {
5819					if (msr.rotateLabels > 90) {
5820						ctx.save();
5821						ctx.textAlign = "left";
5822					} else if (msr.rotateLabels > 0) {
5823						ctx.save();
5824						ctx.textAlign = "right";
5825					} else {
5826						ctx.textAlign = "center";
5827					}
5828          subloop=0;
5829          decal=0;          
5830          if(config.yAxisMiddle==true) {
5831            decal=valueHop/2;
5832            subloop=1;
5833          }
5834					for (var i = ((config.showYAxisMin) ? -1 : 0); i < calculatedScale.steps-subloop; i++) {
5835						if(showYLabels(ctx,data,config,i+1,calculatedScale.labels[i+ 1])) {				
5836							ctx.save();
5837							if (msr.rotateLabels > 0) {
5838								ctx.translate(yAxisPosX + (i + 1) * valueHop - msr.highestXLabel / 2+decal, msr.xLabelPos);
5839								ctx.rotate(-((msr.rotateLabels + 180*(msr.rotateLabels > 90)) * (Math.PI / 180)));
5840								ctx.fillTextMultiLine(calculatedScale.labels[i + 1], 0, 0, ctx.textBaseline, (Math.ceil(ctx.chartTextScale*config.scaleFontSize)),true,config.detectMouseOnText,ctx,"XAXIS_TEXTMOUSE",-(msr.rotateLabels * (Math.PI / 180)),yAxisPosX + (i + 1) * valueHop - msr.highestXLabel / 2, msr.xLabelPos,i,-1);
5841							} else {
5842								ctx.fillTextMultiLine(calculatedScale.labels[i + 1], yAxisPosX + ((i + 1) * valueHop)+decal, msr.xLabelPos, ctx.textBaseline, (Math.ceil(ctx.chartTextScale*config.scaleFontSize)),true,config.detectMouseOnText,ctx,"XAXIS_TEXTMOUSE",0,0,0,i,-1);
5843							}
5844							ctx.restore();
5845						}
5846					}
5847				}
5848				if (config.xAxisTop) {
5849					if (msr.rotateTLabels > 90) {
5850						ctx.save();
5851						ctx.textAlign = "left";
5852					} else if (msr.rotateTLabels > 0) {
5853						ctx.save();
5854						ctx.textAlign = "right";
5855					} else {
5856						ctx.textAlign = "center";
5857					}
5858          subloop=0;
5859          decal=0;          
5860          if(config.yAxisMiddle==true) {
5861            decal=valueHop/2;
5862            subloop=1;
5863          }
5864					for (var i = ((config.showYAxisMin) ? -1 : 0); i < calculatedScale.steps-subloop; i++) {
5865						if(showYLabels(ctx,data,config,i+1,calculatedScale.labels[i+ 1])) {				
5866							ctx.save();
5867							if (msr.rotateTLabels > 0) {
5868								ctx.translate(yAxisPosX + (i + 1) * valueHop - msr.highestTXLabel / 2+decal, msr.xTLabelPos);
5869								ctx.rotate(-((msr.rotateTLabels + 180* (msr.rotateTLabels >90))* (Math.PI / 180)));
5870								ctx.fillTextMultiLine(calculatedScale.labels[i + 1], 0, 0, ctx.textBaseline, (Math.ceil(ctx.chartTextScale*config.scaleFontSize)),true,config.detectMouseOnText,ctx,"XAXIS_TEXTMOUSE",-(msr.rotateLabels * (Math.PI / 180)),yAxisPosX + (i + 1) * valueHop - msr.highestXLabel / 2, msr.xLabelPos,i,-1);
5871							} else {
5872								ctx.fillTextMultiLine(calculatedScale.labels[i + 1], yAxisPosX + ((i + 1) * valueHop)+decal, msr.xTLabelPos, ctx.textBaseline, (Math.ceil(ctx.chartTextScale*config.scaleFontSize)),true,config.detectMouseOnText,ctx,"XAXIS_TEXTMOUSE",0,0,0,i,-1);
5873							}
5874							ctx.restore();
5875						}
5876					}
5877				}
5878			}
5879			//Y axis
5880
5881			for (var j = 0; j < data.labels.length; j++) {
5882				if(showLabels(ctx,data,config,j)){
5883					if (config.yAxisLeft) {
5884						ctx.textAlign = "right";
5885						ctx.fillTextMultiLine(fmtChartJS(config, data.labels[j], config.fmtXLabel), yAxisPosX - (Math.ceil(ctx.chartLineScale*config.scaleTickSizeLeft) + Math.ceil(ctx.chartSpaceScale*config.yAxisSpaceRight)), xAxisPosY - ((j + 1) * scaleHop) + Math.ceil(ctx.chartSpaceScale*config.barValueSpacing) + additionalSpaceBetweenBars + (barWidth / 2), ctx.textBaseline, (Math.ceil(ctx.chartTextScale*config.scaleFontSize)),true,config.detectMouseOnText,ctx,"YLEFTAXIS_TEXTMOUSE",0,0,0,-1,j);
5886					}
5887					if (config.yAxisRight) {
5888						ctx.textAlign = "left";
5889						ctx.fillTextMultiLine(fmtChartJS(config, data.labels[j], config.fmtXLabel), yAxisPosX + msr.availableWidth + (Math.ceil(ctx.chartLineScale*config.scaleTickSizeRight) + Math.ceil(ctx.chartSpaceScale*config.yAxisSpaceRight)), xAxisPosY - ((j + 1) * scaleHop) + additionalSpaceBetweenBars+ (barWidth / 2), ctx.textBaseline, (Math.ceil(ctx.chartTextScale*config.scaleFontSize)),true,config.detectMouseOnText,ctx,"YRIGHTAXIS_TEXTMOUSE",0,0,0,-1,j);
5890					}
5891				}
5892			}
5893		};
5894
5895		function getValueBounds() {
5896			var upperValue = -Number.MAX_VALUE;
5897			var lowerValue = Number.MAX_VALUE;
5898			var minvl = new Array(data.datasets.length);
5899			var maxvl = new Array(data.datasets.length);
5900			for (var i = 0; i < data.datasets.length; i++) {
5901				for (var j = 0; j < data.datasets[i].data.length; j++) {
5902					var k = i;
5903					var tempp = 0;
5904					var tempn = 0;
5905					if (!(typeof(data.datasets[0].data[j]) == 'undefined')) {
5906						if(1 * data.datasets[0].data[j] > 0) {
5907							tempp += 1 * data.datasets[0].data[j];
5908							if (tempp > upperValue) {
5909								upperValue = tempp;
5910							};
5911							if (tempp < lowerValue) {
5912								lowerValue = tempp;
5913							};
5914						} else {
5915							tempn += 1 * data.datasets[0].data[j];
5916							if (tempn > upperValue) {
5917								upperValue = tempn;
5918							};
5919							if (tempn < lowerValue) {
5920								lowerValue = tempn;
5921							};
5922						}
5923					}
5924					while (k > 0) { //get max of stacked data
5925						if (!(typeof(data.datasets[k].data[j]) == 'undefined')) {
5926							if(1 * data.datasets[k].data[j] > 0) {
5927								tempp += 1 * data.datasets[k].data[j];
5928								if (tempp > upperValue) {
5929									upperValue = tempp;
5930								};
5931								if (tempp < lowerValue) {
5932									lowerValue = tempp;
5933								};
5934							} else {
5935								tempn += 1 * data.datasets[k].data[j];
5936								if (tempn > upperValue) {
5937									upperValue = tempn;
5938								};
5939								if (tempn < lowerValue) {
5940									lowerValue = tempn;
5941								};
5942							}
5943						}
5944						k--;
5945					}
5946				}
5947			};
5948			if(typeof config.graphMin=="function")lowerValue= setOptionValue(true,true,1,"GRAPHMIN",ctx,data,statData,undefined,config.graphMin,"graphMin",-1,-1,{nullValue : true})
5949			else if (!isNaN(config.graphMin)) lowerValue = config.graphMin;
5950			if(typeof config.graphMax=="function") upperValue= setOptionValue(true,true,1,"GRAPHMAX",ctx,data,statData,undefined,config.graphMax,"graphMax",-1,-1,{nullValue : true})
5951			else if (!isNaN(config.graphMax)) upperValue = config.graphMax;
5952			if(upperValue<lowerValue){upperValue=0;lowerValue=0;}
5953			if (Math.abs(upperValue - lowerValue) < config.zeroValue) {
5954				if(Math.abs(upperValue)< config.zeroValue) upperValue = .9;
5955				if(upperValue>0) {
5956					upperValue=upperValue*1.1;
5957					lowerValue=lowerValue*0.9;
5958				} else {
5959					upperValue=upperValue*0.9;
5960					lowerValue=lowerValue*1.1;
5961				}
5962			}
5963			labelHeight = (Math.ceil(ctx.chartTextScale*config.scaleFontSize));
5964			scaleHeight = msr.availableHeight;
5965			var maxSteps = Math.floor((scaleHeight / (labelHeight * 0.66)));
5966			var minSteps = Math.floor((scaleHeight / labelHeight * 0.5));
5967			if(upperValue<lowerValue){lowerValue=upperValue-1;}
5968			return {
5969				maxValue: upperValue,
5970				minValue: lowerValue,
5971				maxSteps: maxSteps,
5972				minSteps: minSteps
5973			};
5974
5975
5976		};
5977		return {
5978			data:data,
5979			config:config,
5980			ctx:ctx
5981		};
5982	};
5983	var Bar = function(data, config, ctx) {
5984         
5985		var maxSize, scaleHop, scaleHop2, calculatedScale, calculatedScale2, labelHeight, scaleHeight, valueBounds, labelTemplateString, labelTemplateString2, valueHop, xAxisLength, yAxisPosX, xAxisPosY, barWidth, rotateLabels = 0,
5986			msr;
5987		ctx.tpchart="Bar";
5988		ctx.tpdata=0;
5989
5990	        if (!init_and_start(ctx,data,config)) return;
5991
5992		var statData=initPassVariableData_part1(data,config,ctx);
5993    init_result(ctx,data,statData);
5994
5995		var nrOfBars = data.datasets.length;
5996		for (var i = 0; i < data.datasets.length; i++) {
5997			if (data.datasets[i].type == "Line") { statData[i][0].tpchart="Line";nrOfBars--;}
5998			else statData[i][0].tpchart="Bar";	
5999		}                               
6000
6001
6002		// change the order (at first all bars then the lines) (form of BubbleSort)
6003		var bufferDataset, l = 0;
6004		
6005		msr = setMeasures(data, config, ctx, ctx.canvas.height, ctx.canvas.width, "nihil", "nihil", true, false, true, true, "Bar");
6006
6007		valueBounds = getValueBounds();
6008		if(valueBounds.minValue<=0)config.logarithmic=false;
6009		if(valueBounds.maxSteps>0 && valueBounds.minSteps>0) {
6010			// true or fuzzy (error for negativ values (included 0))
6011			if (config.logarithmic !== false) {
6012				if (valueBounds.minValue <= 0) {
6013					config.logarithmic = false;
6014				}
6015			}
6016			if (config.logarithmic2 !== false) {
6017				if (valueBounds.minValue2 <= 0) {
6018					config.logarithmic2 = false;
6019				}
6020			}
6021			// Check if logarithmic is meanigful
6022			var OrderOfMagnitude = calculateOrderOfMagnitude(Math.pow(10, calculateOrderOfMagnitude(valueBounds.maxValue) + 1)) - calculateOrderOfMagnitude(Math.pow(10, calculateOrderOfMagnitude(valueBounds.minValue)));
6023			if ((config.logarithmic == 'fuzzy' && OrderOfMagnitude < 4) || config.scaleOverride) {
6024				config.logarithmic = false;
6025			}
6026			// Check if logarithmic is meanigful
6027			var OrderOfMagnitude2 = calculateOrderOfMagnitude(Math.pow(10, calculateOrderOfMagnitude(valueBounds.maxValue2) + 1)) - calculateOrderOfMagnitude(Math.pow(10, calculateOrderOfMagnitude(valueBounds.minValue2)));
6028			if ((config.logarithmic2 == 'fuzzy' && OrderOfMagnitude2 < 4) || config.scaleOverride2) {
6029				config.logarithmic2 = false;
6030			}
6031
6032			//Check and set the scale
6033			labelTemplateString = (config.scaleShowLabels) ? config.scaleLabel : "";
6034			labelTemplateString2 = (config.scaleShowLabels2) ? config.scaleLabel2 : "";
6035			if (!config.scaleOverride) {
6036				calculatedScale = calculateScale(1, config, valueBounds.maxSteps, valueBounds.minSteps, valueBounds.maxValue, valueBounds.minValue, labelTemplateString);
6037			} else {
6038				var scaleStartValue= setOptionValue(true,true,1,"SCALESTARTVALUE",ctx,data,statData,undefined,config.scaleStartValue,"scaleStartValue",-1,-1,{nullValue : true} );
6039				var scaleSteps =setOptionValue(true,true,1,"SCALESTEPS",ctx,data,statData,undefined,config.scaleSteps,"scaleSteps",-1,-1,{nullValue : true} );
6040				var scaleStepWidth = setOptionValue(true,true,1,"SCALESTEPWIDTH",ctx,data,statData,undefined,config.scaleStepWidth,"scaleStepWidth",-1,-1,{nullValue : true} );
6041
6042				calculatedScale = {
6043					steps: scaleSteps,
6044					stepValue: scaleStepWidth,
6045					graphMin: scaleStartValue,
6046					graphMax: scaleStartValue + scaleSteps * scaleStepWidth,
6047					labels: []
6048				}
6049				populateLabels(1, config, labelTemplateString, calculatedScale.labels, calculatedScale.steps, scaleStartValue, calculatedScale.graphMax, scaleStepWidth);
6050			}
6051			if (valueBounds.dbAxis || config.forceSecondScale) {
6052				if (!config.scaleOverride2) {
6053					calculatedScale2 = calculateScale(2, config, valueBounds.maxSteps, valueBounds.minSteps, valueBounds.maxValue2, valueBounds.minValue2, labelTemplateString2);
6054				} else {
6055					var scaleStartValue2= setOptionValue(true,true,1,"SCALESTARTVALUE2",ctx,data,statData,undefined,config.scaleStartValue2,"scaleStartValue2",-1,-1,{nullValue : true} );
6056					var scaleSteps2 =setOptionValue(true,true,1,"SCALESTEPS2",ctx,data,statData,undefined,config.scaleSteps2,"scaleSteps2",-1,-1,{nullValue : true} );
6057					var scaleStepWidth2 = setOptionValue(true,true,1,"SCALESTEPWIDTH2",ctx,data,statData,undefined,config.scaleStepWidth2,"scaleStepWidth2",-1,-1,{nullValue : true} );
6058					calculatedScale2 = {
6059						steps: scaleSteps2,
6060						stepValue: scaleStepWidth2,
6061						graphMin: scaleStartValue2,
6062						graphMax: scaleStartValue2 + scaleSteps2 * scaleStepWidth2,
6063						labels: []
6064					}
6065					populateLabels(2, config, labelTemplateString2, calculatedScale2.labels, calculatedScale2.steps, scaleStartValue2, calculatedScale2.graphMax, scaleStepWidth2);
6066				}
6067			} else {
6068				calculatedScale2 = {
6069					steps: 0,
6070					stepValue: 0,
6071					graphMin: 0,
6072					graphMax: 0,
6073					labels: null
6074				}
6075			}
6076			msr = setMeasures(data, config, ctx, ctx.canvas.height, ctx.canvas.width, calculatedScale.labels, calculatedScale2.labels, true, false, true, true, "Bar");
6077			var prevHeight=msr.availableHeight;
6078
6079			msr.availableHeight = msr.availableHeight - Math.ceil(ctx.chartLineScale*config.scaleTickSizeBottom) - Math.ceil(ctx.chartLineScale*config.scaleTickSizeTop);
6080			msr.availableWidth = msr.availableWidth - Math.ceil(ctx.chartLineScale*config.scaleTickSizeLeft) - Math.ceil(ctx.chartLineScale*config.scaleTickSizeRight);
6081
6082			scaleHop = Math.floor(msr.availableHeight  / calculatedScale.steps);
6083			if(calculatedScale2.steps !="undefined" && calculatedScale2.steps > 0)scaleHop2 = Math.floor(msr.availableHeight  / calculatedScale2.steps);
6084			valueHop = Math.floor(msr.availableWidth  / data.labels.length);
6085			if (valueHop == 0 || config.fullWidthGraph) valueHop = (msr.availableWidth / data.labels.length);
6086			msr.topNotUsableHeight += (msr.availableHeight - (calculatedScale.steps) * scaleHop);
6087			msr.rightNotUsableWidth += (msr.availableWidth - (data.labels.length) * valueHop);
6088			msr.clrwidth = msr.clrwidth - (msr.availableWidth - ((data.labels.length) * valueHop));
6089			msr.availableWidth = (data.labels.length) * valueHop;
6090			msr.availableHeight = (calculatedScale.steps) * scaleHop;
6091
6092			yAxisPosX = msr.leftNotUsableWidth + Math.ceil(ctx.chartLineScale*config.scaleTickSizeLeft);
6093			xAxisPosY = msr.topNotUsableHeight + msr.availableHeight + Math.ceil(ctx.chartLineScale*config.scaleTickSizeTop);
6094
6095			barWidth = (valueHop - Math.ceil(ctx.chartLineScale*config.scaleGridLineWidth) * 2 - (Math.ceil(ctx.chartSpaceScale*config.barValueSpacing) * 2) - (Math.ceil(ctx.chartSpaceScale*config.barDatasetSpacing) * nrOfBars - 1) - ((Math.ceil(ctx.chartLineScale*config.barStrokeWidth) / 2) * nrOfBars - 1)) / nrOfBars;
6096			if(barWidth>=0 && barWidth<=1)barWidth=1;
6097			if(barWidth<0 && barWidth>=-1)barWidth=-1;
6098			var additionalSpaceBetweenBars;
6099			if(1*config.maxBarWidth >0 && barWidth > 1*config.maxBarWidth) {
6100				additionalSpaceBetweenBars=nrOfBars*(barWidth-1*config.maxBarWidth)/2;
6101				barWidth=1*config.maxBarWidth;
6102			} else additionalSpaceBetweenBars=0;
6103
6104			var zeroY2 = 0;
6105			var zeroY = calculateOffset(config.logarithmic, 0, calculatedScale, scaleHop);
6106			if(typeof calculatedScale2 ==="object") zeroY2 = calculateOffset(config.logarithmic2, 0, calculatedScale2, scaleHop2);
6107			initPassVariableData_part2(statData,data,config,ctx,{ 
6108				msr: msr,
6109				yAxisPosX : yAxisPosX,
6110				xAxisPosY : xAxisPosY,
6111				valueHop : valueHop,
6112				nbValueHop : data.labels.length - 1,
6113				barWidth : barWidth,
6114				additionalSpaceBetweenBars : additionalSpaceBetweenBars,
6115				zeroY : zeroY,
6116				zeroY2 : zeroY2,
6117				calculatedScale : calculatedScale,
6118				calculatedScale2 : calculatedScale2,
6119				scaleHop : scaleHop,	
6120				scaleHop2 : scaleHop2	
6121			});
6122			drawLabels();
6123
6124			animationLoop(config,msr.legendMsr, drawScale, drawBars, ctx, msr.clrx, msr.clry, msr.clrwidth, msr.clrheight, yAxisPosX + msr.availableWidth / 2, xAxisPosY - msr.availableHeight / 2, yAxisPosX, xAxisPosY, data, statData);
6125
6126		} else {
6127			testRedraw(ctx,data,config);
6128			if (typeof config.onAnimationComplete == "function" && (config.alwaysRunFunctionAtCompletion==true || ctx.runanimationcompletefunction==true)) {
6129			   config.onAnimationComplete(ctx, config, data, 1, 0,statData);
6130				 ctx.runanimationcompletefunction=false;
6131			}
6132			ctx.firstPass=9;
6133      close_result(ctx);
6134
6135		}
6136
6137		function drawBars(animPc) {
6138			var t1, t2, t3, complementaryBar,otherBarHeight,barHeight,i,j,currentAnimPc,fullHeight, sizeTop, sizeBottom,decal;
6139
6140
6141			for (i = 0; i < data.datasets.length; i++) {
6142				if(data.datasets[i].type=="Line") continue;
6143				for (j = 0; j < data.datasets[i].data.length; j++) {
6144					if(setOptionValue(true,true,1,"DISPLAYDATA",ctx,data,statData,data.datasets[i].displayData,config.displayData,"displayData",i,j,{nullvalue : null} )== false) continue;
6145					if(setOptionValue(true,true,1,"DISPLAYDATA",ctx,data,statData,data.displayData,config.displayData,"displayData",j,-1,{nullvalue : null} )== false) continue;
6146					ctx.save();
6147					ctx.lineWidth=Math.ceil(ctx.chartLineScale*setOptionValue(true,true,1,"BARSTROKEWIDTH",ctx,data,statData,data.datasets[i].barStrokeWidth,config.barStrokeWidth,"barStrokeWidth",i,j,{animationValue: currentAnimPc, xPosLeft : statData[i][j].xPosLeft, yPosBottom : statData[i][j].yPosBottom, xPosRight : statData[i][j].xPosLeft+barWidth, yPosTop : statData[i][j].yPosBottom-barHeight} ));				
6148					if (!(typeof(data.datasets[i].data[j]) == 'undefined')) {
6149					  if (Math.abs(data.datasets[i].data[j]) >= config.zeroValue || config.showZeroValue==true) {
6150						currentAnimPc = animationCorrection(animPc, data, config, i, j, false).animVal;
6151						if (currentAnimPc > 1) currentAnimPc = currentAnimPc - 1;
6152						if(1*data.datasets[i].data[j]>=0) barHeight = currentAnimPc * (statData[i][j].barHeight) - (Math.ceil(ctx.chartLineScale*ctx.lineWidth) / 2);
6153						else barHeight = currentAnimPc * (statData[i][j].barHeight) + (Math.ceil(ctx.chartLineScale*ctx.lineWidth) / 2);
6154						ctx.fillStyle=setOptionValue(true,true,1,"COLOR",ctx,data,statData,data.datasets[i].fillColor,config.defaultFillColor,"fillColor",i,j,{animationValue: currentAnimPc, xPosLeft : statData[i][j].xPosLeft, yPosBottom : statData[i][j].yPosBottom, xPosRight : statData[i][j].xPosLeft+barWidth, yPosTop : statData[i][j].yPosBottom-barHeight} );
6155						ctx.strokeStyle=setOptionValue(true,true,1,"STROKECOLOR",ctx,data,statData,data.datasets[i].strokeColor,config.defaultStrokeColor,"strokeColor",i,j,{nullvalue : null} );
6156						roundRect(ctx, statData[i][j].xPosLeft, statData[i][j].yPosBottom, barWidth, barHeight, config.barShowStroke, config.barBorderRadius,i,j,(data.datasets[i].data[j] < 0 ? -1  : 1));
6157            if (animPc >= config.animationStopValue){ctx.pieces_drawn.rectangles++;ctx.pieces_drawn.total_drawn++;}
6158            }
6159					}
6160					ctx.restore();
6161				}
6162			}
6163			
6164			// complementary bar;
6165			
6166			for (i = 0; i < data.datasets.length; i++) {
6167				if(data.datasets[i].type=="Line") continue;
6168				for (j = 0; j < data.datasets[i].data.length; j++) {
6169					if(setOptionValue(true,true,1,"DISPLAYDATA",ctx,data,statData,data.datasets[i].displayData,config.displayData,"displayData",i,j,{nullvalue : null} )== false) continue;
6170					if(setOptionValue(true,true,1,"DISPLAYDATA",ctx,data,statData,data.displayData,config.displayData,"displayData",j,-1,{nullvalue : null} )== false) continue;
6171					complementaryBar=setOptionValue(true,true,1,"COMPLEMENTARYBAR",ctx,data,statData,data.datasets[i].complementaryBar,config.complementaryBar,"complementaryBar",i,j,{nullvalue : null} );
6172					if(complementaryBar == false)continue;
6173					ctx.save();
6174					ctx.lineWidth=Math.ceil(ctx.chartLineScale*setOptionValue(true,true,1,"BARSTROKEWIDTH",ctx,data,statData,data.datasets[i].barStrokeWidth,config.barStrokeWidth,"barStrokeWidth",i,j,{animationValue: currentAnimPc, xPosLeft : statData[i][j].xPosLeft, yPosBottom : statData[i][j].yPosBottom, xPosRight : statData[i][j].xPosLeft+barWidth, yPosTop : statData[i][j].yPosBottom-barHeight} ));				
6175					currentAnimPc = animationCorrection(animPc, data, config, i, j, false).animVal;
6176					if (currentAnimPc > 1) currentAnimPc = currentAnimPc - 1;
6177					if (!(typeof(data.datasets[i].data[j]) == 'undefined')) {
6178						if(1*data.datasets[i].data[j]>=0) barHeight = currentAnimPc * (statData[i][j].barHeight) - (Math.ceil(ctx.chartLineScale*ctx.lineWidth) / 2);
6179						else barHeight = currentAnimPc * (statData[i][j].barHeight) + (Math.ceil(ctx.chartLineScale*ctx.lineWidth) / 2);
6180					} else barHeight=0;
6181					fullHeight=msr.clrheight-Math.ceil(ctx.chartLineScale*(config.scaleTickSizeTop+config.scaleTickSizeBottom));
6182					sizeTop=statData[i][j].yPosBottom-msr.clry-Math.ceil(ctx.chartLineScale*config.scaleTickSizeTop);
6183					sizeBottom=fullHeight-sizeTop;
6184					if (1 * data.datasets[i].data[j]<0) {
6185						otherBarHeight=-(sizeBottom+barHeight)+3*(ctx.lineWidth/2);
6186						otherBarHeight2=sizeTop-3*(ctx.lineWidth/2);
6187						decal=-(ctx.lineWidth/2);
6188					} else {
6189						otherBarHeight=(sizeTop-barHeight)-3*(ctx.lineWidth/2);
6190						otherBarHeight2=-(sizeBottom-3*(ctx.lineWidth/2));
6191						decal=+(ctx.lineWidth/2);
6192					}
6193					ctx.fillStyle=setOptionValue(true,true,1,"COMPLEMENTARYCOLOR",ctx,data,statData,data.datasets[i].complementaryColor,config.complementaryColor,"complementaryColor",i,j,{animationValue: currentAnimPc, xPosLeft : statData[i][j].xPosLeft, yPosBottom : statData[i][j].yPosBottom-barHeight, xPosRight : statData[i][j].xPosLeft+barWidth, yPosTop : statData[i][j].yPosBottom-barHeight-otherBarHeight});
6194					ctx.strokeStyle=setOptionValue(true,true,1,"COMPLEMENTARYSTROKECOLOR",ctx,data,statData,data.datasets[i].complementaryStrokeColor,config.complementaryStrokeColor,"strokeColor",i,j,{nullvalue : null} );
6195					roundRect(ctx, statData[i][j].xPosLeft, statData[i][j].yPosBottom-barHeight-2*decal, barWidth,otherBarHeight, config.barShowStroke, config.barBorderRadius,i,j,(data.datasets[i].data[j] < 0 ? -1  : 1));
6196					if(config.complementaryBarFullHeight) {
6197						roundRect(ctx, statData[i][j].xPosLeft, statData[i][j].yPosBottom+2*decal, barWidth,otherBarHeight2, config.barShowStroke, config.barBorderRadius,i,j,(data.datasets[i].data[j] < 0 ? -1  : 1));
6198					}
6199					ctx.restore();
6200				}
6201			}
6202			
6203			drawLinesDataset(animPc, data, config, ctx, statData,{xAxisPosY : xAxisPosY,yAxisPosX : yAxisPosX, valueHop : valueHop, nbValueHop : data.labels.length });
6204
6205			if (animPc >= config.animationStopValue) {
6206
6207				for (i = 0; i < data.datasets.length; i++) {
6208					for (j = 0; j < data.datasets[i].data.length; j++) {
6209						if(setOptionValue(true,true,1,"DISPLAYDATA",ctx,data,statData,data.datasets[i].displayData,config.displayData,"displayData",i,j,{nullvalue : null} )== false) continue;
6210						if(setOptionValue(true,true,1,"DISPLAYDATA",ctx,data,statData,data.displayData,config.displayData,"displayData",j,-1,{nullvalue : null} )== false) continue;
6211						if (typeof(data.datasets[i].data[j]) == 'undefined') continue;
6212						if (data.datasets[i].type == "Line") continue;
6213						jsGraphAnnotate[ctx.ChartNewId][jsGraphAnnotate[ctx.ChartNewId].length] = ["RECT", i , j, statData,setOptionValue(true,true,1,"ANNOTATEDISPLAY",ctx,data,statData,data.datasets[i].annotateDisplay,config.annotateDisplay,"annotateDisplay",i,j,{nullV
6213alue : true})];
6214						if(setOptionValue(true,true,1,"INGRAPHDATASHOW",ctx,data,statData,data.datasets[i].inGraphDataShow,config.inGraphDataShow,"inGraphDataShow",i,j,{nullValue : true})) {
6215							ctx.save();
6216							ctx.textAlign = setOptionValue(true,true,1,"INGRAPHDATAALIGN",ctx,data,statData,undefined,config.inGraphDataAlign,"inGraphDataAlign",i,j,{nullValue: true  });
6217							ctx.textBaseline = setOptionValue(true,true,1,"INGRAPHDATAVALIGN",ctx,data,statData,undefined,config.inGraphDataVAlign,"inGraphDataVAlign",i,j,{nullValue : true} );
6218							ctx.font = setOptionValue(true,true,1,"INGRAPHDATAFONTSTYLE",ctx,data,statData,undefined,config.inGraphDataFontStyle,"inGraphDataFontStyle",i,j,{nullValue : true} ) + ' ' + setOptionValue(true,true,ctx.chartTextScale,"INGRAPHDATAFONTSIZE",ctx,data,statData,undefined,config.inGraphDataFontSize,"inGraphDataFontSize",i,j,{nullValue : true} ) + 'px ' + setOptionValue(true,true,1,"INGRAPHDATAFONTFAMILY",ctx,data,statData,undefined,config.inGraphDataFontFamily,"inGraphDataFontFamily",i,j,{nullValue : true} );
6219							ctx.fillStyle = setOptionValue(true,true,1,"INGRAPHDATAFONTCOLOR",ctx,data,statData,undefined,config.inGraphDataFontColor,"inGraphDataFontColor",i,j,{nullValue : true} );
6220							t1 = statData[i][j].yPosBottom;
6221							t2 = statData[i][j].yPosTop;
6222							ctx.beginPath();
6223							var yPos = 0,
6224								xPos = 0;
6225							if (setOptionValue(true,true,1,"INGRAPHDATAXPOSITION",ctx,data,statData,undefined,config.inGraphDataXPosition,"inGraphDataXPosition",i,j,{nullValue : true} ) == 1) {
6226								xPos = statData[i][j].xPosLeft + setOptionValue(true,true,ctx.chartSpaceScale,"INGRAPHDATAPADDINGX",ctx,data,statData,undefined,config.inGraphDataPaddingX,"inGraphDataPaddingX",i,j,{nullValue : true} );
6227							} else if (setOptionValue(true,true,1,"INGRAPHDATAXPOSITION",ctx,data,statData,undefined,config.inGraphDataXPosition,"inGraphDataXPosition",i,j,{nullValue : true} ) == 2) {
6228								xPos = statData[i][j].xPosLeft + barWidth / 2 + setOptionValue(true,true,ctx.chartSpaceScale,"INGRAPHDATAPADDINGX",ctx,data,statData,undefined,config.inGraphDataPaddingX,"inGraphDataPaddingX",i,j,{nullValue : true} );
6229							} else if (setOptionValue(true,true,1,"INGRAPHDATAXPOSITION",ctx,data,statData,undefined,config.inGraphDataXPosition,"inGraphDataXPosition",i,j,{nullValue : true} ) == 3) {
6230								xPos = statData[i][j].xPosLeft + barWidth + setOptionValue(true,true,ctx.chartSpaceScale,"INGRAPHDATAPADDINGX",ctx,data,statData,undefined,config.inGraphDataPaddingX,"inGraphDataPaddingX",i,j,{nullValue : true} );
6231							}
6232							if (setOptionValue(true,true,1,"INGRAPHDATAYPOSITION",ctx,data,statData,undefined,config.inGraphDataYPosition,"inGraphDataYPosition",i,j,{nullValue : true} ) == 1) {
6233								yPos = statData[i][j].yPosBottom - setOptionValue(true,true,ctx.chartSpaceScale,"INGRAPHDATAPADDINGY",ctx,data,statData,undefined,config.inGraphDataPaddingY,"inGraphDataPaddingY",i,j,{nullValue : true} );
6234							} else if (setOptionValue(true,true,1,"INGRAPHDATAYPOSITION",ctx,data,statData,undefined,config.inGraphDataYPosition,"inGraphDataYPosition",i,j,{nullValue : true} ) == 2) {
6235								yPos = (statData[i][j].yPosBottom+statData[i][j].yPosTop)/2 - setOptionValue(true,true,ctx.chartSpaceScale,"INGRAPHDATAPADDINGY",ctx,data,statData,undefined,config.inGraphDataPaddingY,"inGraphDataPaddingY",i,j,{nullValue : true} );
6236							} else if (setOptionValue(true,true,1,"INGRAPHDATAYPOSITION",ctx,data,statData,undefined,config.inGraphDataYPosition,"inGraphDataYPosition",i,j,{nullValue : true} ) == 3) {
6237								yPos = statData[i][j].yPosTop - setOptionValue(true,true,ctx.chartSpaceScale,"INGRAPHDATAPADDINGY",ctx,data,statData,undefined,config.inGraphDataPaddingY,"inGraphDataPaddingY",i,j,{nullValue : true} );
6238							}
6239							ctx.translate(xPos, yPos);
6240							var dispString = tmplbis(setOptionValue(true,true,1,"INGRAPHDATATMPL",ctx,data,statData,undefined,config.inGraphDataTmpl,"inGraphDataTmpl",i,j,{nullValue : true} ), statData[i][j],config);
6241							rotateVal=setOptionValue(true,true,1,"INGRAPHDATAROTATE",ctx,data,statData,undefined,config.inGraphDataRotate,"inGraphDataRotate",i,j,{nullV
6241alue : true} ) * (Math.PI / 180);
6242							ctx.rotate(rotateVal);
6243							setTextBordersAndBackground(ctx,dispString,setOptionValue(true,true,ctx.chartTextScale,"INGRAPHDATAFONTSIZE",ctx,data,statData,undefined,config.inGraphDataFontSize,"inGraphDataFontSize",i,j,{nullValue : true} ),0,0,setOptionValue(true,true,1,"INGRAPHDATABORDERS",ctx,data,statData,undefined,config.inGraphDataBorders,"inGraphDataBorders",i,j,{nullValue : true} ),setOptionValue(true,true,1,"INGRAPHDATABORDERSSELECTION",ctx,data,statData,undefined,config.inGraphDataBordersSelection,"inGraphDataBordersSelection",i,j,{nullValue : true} ),setOptionValue(true,true,1,"INGRAPHDATABORDERSCOLOR",ctx,data,statData,undefined,config.inGraphDataBordersColor,"inGraphDataBordersColor",i,j,{nullValue : true} ),setOptionValue(true,true,ctx.chartLineScale,"INGRAPHDATABORDERSWIDTH",ctx,data,statData,undefined,config.inGraphDataBordersWidth,"inGraphDataBordersWidth",i,j,{nullValue : true} ),setOptionValue(true,true,ctx.chartSpaceScale,"INGRAPHDATABORDERSXSPACE",ctx,data,statData,undefined,config.inGraphDataBordersXSpace,"inGraphDataBordersXSpace",i,j,{nullValue : true} ),setOptionValue(true,true,ctx.chartSpaceScale,"INGRAPHDATABORDERSYSPACE",ctx,data,statData,undefined,config.inGraphDataBordersYSpace,"inGraphDataBordersYSpace",i,j,{nullValue : true} ),setOptionValue(true,true,1,"INGRAPHDATABORDERSSTYLE",ctx,data,statData,undefined,config.inGraphDataBordersStyle,"inGraphDataBordersStyle",i,j,{nullValue : true} ),setOptionValue(true,true,1,"INGRAPHDATABACKGROUNDCOLOR",ctx,data,statData,undefined,config.inGraphDataBackgroundColor,"inGraphDataBackgroundColor",i,j,{nullValue : true} ),"INGRAPHDATA",config.inGraphDataBordersRadius);
6244							ctx.fillTextMultiLine(dispString, 0, 0, ctx.textBaseline, setOptionValue(true,true,ctx.chartTextScale,"INGRAPHDATAFONTSIZE",ctx,data,statData,undefined,config.inGraphDataFontSize,"inGraphDataFontSize",i,j,{nullValue : true} ),true,config.detectMouseOnText,ctx,"INGRAPHDATA_TEXTMOUSE",rotateVal,xPos, yPos,i,j);
6245							ctx.restore();
6246						}
6247					}
6248				}
6249			}
6250			if (animPc >= 1 && typeof drawMath == "function") {
6251				drawMath(ctx, config, data, msr, {
6252					xAxisPosY: xAxisPosY,
6253					yAxisPosX: yAxisPosX,
6254					valueHop: valueHop,
6255					scaleHop: scaleHop,
6256					zeroY: zeroY,
6257					calculatedScale: calculatedScale,
6258					calculateOffset: calculateOffset,
6259					additionalSpaceBetweenBars : additionalSpaceBetweenBars,
6260					barWidth: barWidth
6261				});
6262			}
6263		};
6264
6265		function roundRect(ctx, x, y, w, h, stroke, radius,i,j,fact) {
6266			ctx.beginPath();
6267			ctx.setLineDash(lineStyleFn(setOptionValue(true,true,1,"STROKESTYLE",ctx,data,statData,data.datasets[i].datasetStrokeStyle,config.datasetStrokeStyle,"datasetStrokeStyle",i,j,{nullvalue : null} )));
6268			ctx.moveTo(x + (w/2), y);
6269			ctx.lineTo(x + w , y);
6270			ctx.lineTo(x + w, y - h + fact*radius);
6271			ctx.quadraticCurveTo(x + w, y - h, x + w - radius, y - h);
6272			ctx.lineTo(x + radius, y - h);
6273			ctx.quadraticCurveTo(x, y - h, x, y - h + fact*radius);
6274			ctx.lineTo(x, y);
6275			ctx.lineTo(x + (w/2), y);
6276			if (stroke) ctx.stroke();
6277			ctx.closePath();
6278			ctx.fill();
6279			ctx.setLineDash([]);
6280		};
6281
6282    function drawScale() {
6283
6284//drawLinesTest(ctx);
6285
6286      drawGridScale(ctx,data,config,msr,yAxisPosX,xAxisPosY,zeroY,valueHop,scaleHop,calculatedScale.steps,data.labels.length+1);
6287    };
6288
6289
6290		function drawLabels() {
6291      var decal,subloop;
6292			ctx.font = config.scaleFontStyle + " " + (Math.ceil(ctx.chartTextScale*config.scaleFontSize)).toString() + "px " + config.scaleFontFamily;
6293			//X axis line                                                          
6294			if (config.xAxisTop || config.xAxisBottom) {
6295				ctx.textBaseline = "top";
6296				ctx.fillStyle = config.scaleFontColor;
6297				if (config.xAxisBottom) {
6298					if (msr.rotateLabels > 90) {
6299						ctx.save();
6300						ctx.textAlign = "left";
6301					} else if (msr.rotateLabels > 0) {
6302						ctx.save();
6303						ctx.textAlign = "right";
6304					} else {
6305						ctx.textAlign = "center";
6306					}
6307          subloop=0;
6308          decal=0;          
6309					for (var i = 0; i < data.labels.length; i++) {
6310						if(showLabels(ctx,data,config,i)){
6311							ctx.save();
6312							if (msr.rotateLabels > 0) {
6313								ctx.translate(yAxisPosX + i * valueHop + (valueHop / 2) - msr.highestXLabel / 2 , msr.xLabelPos);
6314								ctx.rotate(-((msr.rotateLabels + 180*(msr.rotateLabels>90)) * (Math.PI / 180)));
6315								ctx.fillTextMultiLine(fmtChartJS(config, data.labels[i], config.fmtXLabel), 0, 0, ctx.textBaseline, (Math.ceil(ctx.chartTextScale*config.scaleFontSize)),true,config.detectMouseOnText,ctx,"XAXIS_TEXTMOUSE",-(msr.rotateLabels * (Math.PI / 180)),yAxisPosX + i * valueHop + (valueHop / 2) - msr.highestXLabel / 2, msr.xLabelPos,i,-1);
6316							} else {
6317								ctx.fillTextMultiLine(fmtChartJS(config, data.labels[i], config.fmtXLabel), yAxisPosX + i * valueHop + (valueHop / 2)+decal, msr.xLabelPos, ctx.textBaseline, (Math.ceil(ctx.chartTextScale*config.scaleFontSize)),true,config.detectMouseOnText,ctx,"XAXIS_TEXTMOUSE",0,0,0,i,-1);
6318							}
6319							ctx.restore();
6320						}
6321					}
6322				}
6323				if (config.xAxisTop) {
6324					if (msr.rotateTLabels > 90) {
6325						ctx.save();
6326						ctx.textAlign = "left";
6327					} else if (msr.rotateTLabels > 0) {
6328						ctx.save();
6329						ctx.textAlign = "right";
6330					} else {
6331						ctx.textAlign = "center";
6332					}
6333					var label;
6334					if(typeof data.labels2 =="object")label=data.labels2;
6335					else label=data.labels;
6336
6337					for (var i = 0; i < label.length; i++) {
6338						if(showLabels(ctx,data,config,i)){
6339							ctx.save();
6340							if (msr.rotateTLabels > 0) {
6341								ctx.translate(yAxisPosX + i * valueHop + (valueHop / 2) - msr.highestTXLabel / 2, msr.xTLabelPos);
6342								ctx.rotate(-((msr.rotateTLabels + 180*(msr.rotateTLabels>90)) * (Math.PI / 180)));
6343								ctx.fillTextMultiLine(fmtChartJS(config, label[i], config.fmtXLabel), 0, 0, ctx.textBaseline, (Math.ceil(ctx.chartTextScale*config.scaleFontSize)),true,config.detectMouseOnText,ctx,"XAXIS_TEXTMOUSE",-(msr.rotateLabels * (Math.PI / 180)),yAxisPosX + i * valueHop + (valueHop / 2) - msr.highestXLabel / 2, msr.xLabelPos,i,-1);
6344							} else {
6345								ctx.fillTextMultiLine(fmtChartJS(config, label[i], config.fmtXLabel), yAxisPosX + i * valueHop + (valueHop / 2), msr.xTLabelPos, ctx.textBaseline, (Math.ceil(ctx.chartTextScale*config.scaleFontSize)),true,config.detectMouseOnText,ctx,"XAXIS_TEXTMOUSE",0,0,0,i,-1);
6346							}
6347							ctx.restore();
6348						}
6349					}
6350				}
6351			}
6352			//Y axis
6353			ctx.textAlign = "right";
6354			ctx.textBaseline = "middle";
6355      subloop=0;
6356      decal=0;          
6357      if(config.yAxisMiddle==true) {
6358        decal=scaleHop/2;
6359        subloop=1;
6360      }
6361			for (var j = ((config.showYAxisMin) ? -1 : 0); j < calculatedScale.steps-subloop; j++) {
6362				if (config.scaleShowLabels) {
6363					if(showYLabels(ctx,data,config,j+1,calculatedScale.labels[j+ 1])) {				
6364						if (config.yAxisLeft) {
6365							ctx.textAlign = "right";
6366							ctx.fillTextMultiLine(calculatedScale.labels[j + 1], yAxisPosX - (Math.ceil(ctx.chartLineScale*config.scaleTickSizeLeft) + Math.ceil(ctx.chartSpaceScale*config.yAxisSpaceRight)), xAxisPosY - ((j + 1) * scaleHop)-decal, ctx.textBaseline, (Math.ceil(ctx.chartTextScale*config.scaleFontSize)),true,config.detectMouseOnText,ctx,"YLEFTAXIS_TEXTMOUSE",0,0,0,-1,j);
6367						}
6368						if (config.yAxisRight && !(valueBounds.dbAxis || config.forceSecondScale)) {
6369							ctx.textAlign = "left";
6370							ctx.fillTextMultiLine(calculatedScale.labels[j + 1], yAxisPosX + msr.availableWidth + (Math.ceil(ctx.chartLineScale*config.scaleTickSizeRight) + Math.ceil(ctx.chartSpaceScale*config.yAxisSpaceRight)), xAxisPosY - ((j + 1) * scaleHop)-decal, ctx.textBaseline, (Math.ceil(ctx.chartTextScale*config.scaleFontSize)),true,config.detectMouseOnText,ctx,"YRIGHTAXIS_TEXTMOUSE",0,0,0,-1,j);
6371						}
6372					}
6373				}
6374			}
6375			if (config.yAxisRight && (valueBounds.dbAxis || config.forceSecondScale)) {
6376        subloop=0;
6377        decal=0;          
6378        if(config.yAxisMiddle==true) {
6379          decal=scaleHop/2;
6380          subloop=1;
6381        }
6382
6383				for (j = ((config.showYAxisMin) ? -1 : 0); j < calculatedScale2.steps-subloop; j++) {
6384					if (config.scaleShowLabels) {
6385						ctx.textAlign = "left";
6386						ctx.fillTextMultiLine(calculatedScale2.labels[j + 1], yAxisPosX + msr.availableWidth + (Math.ceil(ctx.chartLineScale*config.scaleTickSizeRight) + Math.ceil(ctx.chartSpaceScale*config.yAxisSpaceRight))-decal, xAxisPosY - ((j + 1) * scaleHop2), ctx.textBaseline, (Math.ceil(ctx.chartTextScale*config.scaleFontSize)),true,config.detectMouseOnText,ctx,"YRIGHTAXIS_TEXTMOUSE",0,0,0,-1,j);
6387					}
6388				}
6389			}
6390		};
6391
6392		function getValueBounds() {
6393
6394			var upperValue = -Number.MAX_VALUE;
6395			var lowerValue = Number.MAX_VALUE;
6396			var upperValue2 = -Number.MAX_VALUE;
6397			var lowerValue2 = Number.MAX_VALUE;
6398			var secondAxis = false;
6399			var firstAxis = false;
6400			var mathValueHeight;			
6401			for (var i = 0; i < data.datasets.length; i++) {
6402				var mathFctName = data.datasets[i].drawMathDeviation;
6403				var mathValueHeight = 0;
6404				if (typeof eval(mathFctName) == "function") {
6405					var parameter = {
6406						data: data,
6407						datasetNr: i
6408					};
6409					mathValueHeightVal = window[mathFctName](parameter);
6410				} else mathValueHeightVal=0;
6411				for (var j = 0; j < data.datasets[i].data.length; j++) {
6412					if(typeof mathValueHeightVal=="object") mathValueHeight=mathValueHeightVal[Math.min(mathValueHeightVal.length,j)];
6413					else mathValueHeight=mathValueHeightVal;
6414					if(typeof data.datasets[i].data[j]=="undefined")continue;
6415					if (data.datasets[i].axis == 2) {
6416						secondAxis = true;
6417						if (1 * data.datasets[i].data[j] + mathValueHeight > upperValue2) {
6418							upperValue2 = 1 * data.datasets[i].data[j] + mathValueHeight;
6419						};
6420						if (1 * data.datasets[i].data[j] - mathValueHeight < lowerValue2) {
6421							lowerValue2 = 1 * data.datasets[i].data[j] - mathValueHeight;
6422						};
6423					} else {
6424						firstAxis=true;
6425						if (1 * data.datasets[i].data[j] + mathValueHeight > upperValue) {
6426							upperValue = 1 * data.datasets[i].data[j] + mathValueHeight;
6427						};
6428						if (1 * data.datasets[i].data[j] - mathValueHeight < lowerValue) {
6429							lowerValue = 1 * data.datasets[i].data[j] - mathValueHeight;
6430						};
6431					}
6432				}
6433			};
6434			if(upperValue<lowerValue){upperValue=0;lowerValue=0;}
6435			if (Math.abs(upperValue - lowerValue) < config.zeroValue) {
6436				if(Math.abs(upperValue)< config.zeroValue) upperValue = .9;
6437				if(upperValue>0) {
6438					upperValue=upperValue*1.1;
6439					lowerValue=lowerValue*0.9;
6440				} else {
6441					upperValue=upperValue*0.9;
6442					lowerValue=lowerValue*1.1;
6443				}
6444			}
6445			if(typeof config.graphMin=="function")lowerValue= setOptionValue(true,true,1,"GRAPHMIN",ctx,data,statData,undefined,config.graphMin,"graphMin",-1,-1,{nullValue : true})
6446			else if (!isNaN(config.graphMin)) lowerValue = config.graphMin;
6447			if(typeof config.graphMax=="function") upperValue= setOptionValue(true,true,1,"GRAPHMAX",ctx,data,statData,undefined,config.graphMax,"graphMax",-1,-1,{nullValue : true})
6448			else if (!isNaN(config.graphMax)) upperValue = config.graphMax;
6449			if (secondAxis) {
6450				if(upperValue2<lowerValue2){upperValue2=0;lowerValue2=0;}
6451				if (Math.abs(upperValue2 - lowerValue2) < config.zeroValue) {
6452					if(Math.abs(upperValue2)< config.zeroValue) upperValue2 = .9;
6453					if(upperValue2>0) {
6454						upperValue2=upperValue2*1.1;
6455						lowerValue2=lowerValue2*0.9;
6456					} else {
6457						upperValue2=upperValue2*0.9;
6458						lowerValue2=lowerValue2*1.1;
6459					}
6460				}
6461				if(typeof config.graphMin2=="function")lowerValue2= setOptionValue(true,true,1,"GRAPHMIN2",ctx,data,statData,undefined,config.graphMin2,"graphMin2",-1,-1,{nullValue : true})
6462				else if (!isNaN(config.graphMin2)) lowerValue2 = config.graphMin2;
6463				if(typeof config.graphMax2=="function") upperValue2= setOptionValue(true,true,1,"GRAPHMAX2",ctx,data,statData,undefined,config.graphMax2,"graphMax2",-1,-1,{nullValue : true})
6464				else if (!isNaN(config.graphMax2)) upperValue2 = config.graphMax2;
6465			}
6466			if (!firstAxis && secondAxis) {
6467				upperValue = upperValue2;
6468				lowerValue = lowerValue2;
6469			}
6470
6471			labelHeight = (Math.ceil(ctx.chartTextScale*config.scaleFontSize));
6472			scaleHeight = msr.availableHeight;
6473			var maxSteps = Math.floor((scaleHeight / (labelHeight * 0.66)));
6474			var minSteps = Math.floor((scaleHeight / labelHeight * 0.5));
6475			if(upperValue<lowerValue){lowerValue=upperValue-1;}
6476			if(upperValue2<lowerValue2){lowerValue2=upperValue2-1;}
6477			return {
6478				maxValue: upperValue,
6479				minValue: lowerValue,
6480				maxValue2: upperValue2,
6481				minValue2: lowerValue2,
6482				dbAxis: secondAxis,
6483				maxSteps: maxSteps,
6484				minSteps: minSteps
6485			};
6486		};
6487
6488		return {
6489			data:data,
6490			config:config,
6491			ctx:ctx
6492		};
6493	};
6494
6495	var HorizontalBar = function(data, config, ctx) {
6496		var maxSize, scaleHop, calculatedScale, labelHeight, scaleHeight, valueBounds, labelTemplateString, valueHop, xAxisLength, yAxisPosX, xAxisPosY, barWidth, rotateLabels = 0,
6497			msr;
6498		ctx.tpchart="HorizontalBar";
6499		ctx.tpdata=0;
6500
6501	        if (!init_and_start(ctx,data,config)) return;
6502
6503		if (config.reverseOrder && typeof ctx.reversed == "undefined") {
6504			ctx.reversed=true;
6505			data = reverseData(data);
6506		}
6507
6508		var statData=initPassVariableData_part1(data,config,ctx);
6509    init_result(ctx,data,statData);
6510
6511		msr = setMeasures(data, config, ctx, ctx.canvas.height, ctx.canvas.width, "nihil", "nihil", true, true, true,  true, "StackedBar");
6512		valueBounds = getValueBounds();
6513		if(valueBounds.minValue<=0)config.logarithmic=false;
6514		if(valueBounds.maxSteps>0 && valueBounds.minSteps>0) {
6515			if (config.logarithmic !== false) {
6516				if (valueBounds.minValue <= 0) {
6517					config.logarithmic = false;
6518				}
6519			}
6520			//Check and set the scale
6521			labelTemplateString = (config.scaleShowLabels) ? config.scaleLabel : "";
6522			if (!config.scaleOverride) {
6523				calculatedScale = calculateScale(1, config, valueBounds.maxSteps, valueBounds.minSteps, valueBounds.maxValue, valueBounds.minValue, labelTemplateString);
6524				msr = setMeasures(data, config, ctx, ctx.canvas.height, ctx.canvas.width, calculatedScale.labels, calculatedScale.labels, true, true, true,  true, "HorizontalBar");
6525			} else {
6526				var scaleStartValue= setOptionValue(true,true,1,"SCALESTARTVALUE",ctx,data,statData,undefined,config.scaleStartValue,"scaleStartValue",-1,-1,{nullValue : true} );
6527				var scaleSteps =setOptionValue(true,true,1,"SCALESTEPS",ctx,data,statData,undefined,config.scaleSteps,"scaleSteps",-1,-1,{nullValue : true} );
6528				var scaleStepWidth = setOptionValue(true,true,1,"SCALESTEPWIDTH",ctx,data,statData,undefined,config.scaleStepWidth,"scaleStepWidth",-1,-1,{nullValue : true} );
6529
6530				calculatedScale = {
6531					steps: scaleSteps,
6532					stepValue: scaleStepWidth,
6533					graphMin: scaleStartValue,
6534					graphMax: scaleStartValue + scaleSteps * scaleStepWidth,
6535					labels: []
6536				}
6537				populateLabels(1, config, labelTemplateString, calculatedScale.labels, calculatedScale.steps, scaleStartValue, calculatedScale.graphMax, scaleStepWidth);
6538				msr = setMeasures(data, config, ctx, ctx.canvas.height, ctx.canvas.width, calculatedScale.labels, null, true, true, true, true, "HorizontalBar");
6539			}
6540			msr.availableHeight = msr.availableHeight - Math.ceil(ctx.chartLineScale*config.scaleTickSizeBottom) - Math.ceil(ctx.chartLineScale*config.scaleTickSizeTop);
6541			msr.availableWidth = msr.availableWidth - Math.ceil(ctx.chartLineScale*config.scaleTickSizeLeft) - Math.ceil(ctx.chartLineScale*config.scaleTickSizeRight);
6542			scaleHop = Math.floor(msr.availableHeight / data.labels.length);
6543			valueHop = Math.floor(msr.availableWidth / (calculatedScale.steps));
6544			if (valueHop == 0 || config.fullWidthGraph) valueHop = (msr.availableWidth / calculatedScale.steps);
6545
6546			msr.clrwidth = msr.clrwidth - (msr.availableWidth - (calculatedScale.steps * valueHop));
6547			msr.topNotUsableHeight+=(msr.availableHeight - data.labels.length * scaleHop);
6548			msr.rightNotUsableWidth+=(msr.availableWidth - calculatedScale.steps * valueHop);
6549
6550			msr.availableWidth = (calculatedScale.steps) * valueHop;
6551			msr.availableHeight = (data.labels.length) * scaleHop;
6552
6553			yAxisPosX = msr.leftNotUsableWidth + Math.ceil(ctx.chartLineScale*config.scaleTickSizeLeft);
6554			xAxisPosY = msr.topNotUsableHeight + msr.availableHeight + Math.ceil(ctx.chartLineScale*config.scaleTickSizeTop);
6555			barWidth = (scaleHop - Math.ceil(ctx.chartLineScale*config.scaleGridLineWidth) * 2 - (Math.ceil(ctx.chartSpaceScale*config.barValueSpacing) * 2) - (Math.ceil(ctx.chartSpaceScale*config.barDatasetSpacing) * data.datasets.length - 1) - ((Math.ceil(ctx.chartLineScale*config.barStrokeWidth) / 2) * data.datasets.length - 1)) / data.datasets.length;
6556			if(barWidth>=0 && barWidth<=1)barWidth=1;
6557			if(barWidth<0 && barWidth>=-1)barWidth=-1;
6558			var additionalSpaceBetweenBars;
6559			if(1*config.maxBarWidth >0 && barWidth > 1*config.maxBarWidth) {
6560				additionalSpaceBetweenBars=data.datasets.length*(barWidth-1*config.maxBarWidth)/2;
6561				barWidth=1*config.maxBarWidth;
6562			} else additionalSpaceBetweenBars=0;
6563
6564			var zeroY = 0;
6565			zeroY = calculateOffset(config.logarithmic, 0, calculatedScale, valueHop);
6566			drawLabels();
6567			initPassVariableData_part2(statData,data,config,ctx,{ 
6568				yAxisPosX : yAxisPosX,
6569				xAxisPosY : xAxisPosY,
6570				barWidth : barWidth,
6571				additionalSpaceBetweenBars : additionalSpaceBetweenBars,
6572				zeroY : zeroY,
6573				scaleHop : scaleHop,
6574				valueHop : valueHop,
6575				calculatedScale : calculatedScale
6576			});
6577			animationLoop(config,msr.legendMsr, drawScale, drawBars, ctx, msr.clrx, msr.clry, msr.clrwidth, msr.clrheight, yAxisPosX + msr.availableWidth / 2, xAxisPosY - msr.availableHeight / 2, yAxisPosX, xAxisPosY, data, statData);
6578		} else {
6579			testRedraw(ctx,data,config);
6580			if (typeof config.onAnimationComplete == "function" && (config.alwaysRunFunctionAtCompletion==true || ctx.runanimationcompletefunction==true)) {
6581			   config.onAnimationComplete(ctx, config, data, 1, 0,statData);
6582				 ctx.runanimationcompletefunction=false;
6583			}
6584			ctx.firstPass=9;
6585      close_result(ctx);
6586
6587		}
6588
6589		function drawBars(animPc) {
6590			var i,j,currentAnimPc,barHeight,fullHeight,sizeTop,sizeBottom,otherBarHeight,otherBarHeight2,decal;
6591			for (i = 0; i < data.datasets.length; i++) {
6592				for (j = 0; j < data.datasets[i].data.length; j++) {
6593        
6594					if(setOptionValue(true,true,1,"DISPLAYDATA",ctx,data,statData,data.datasets[i].displayData,config.displayData,"displayData",i,j,{nullvalue : null}
6594 )== false) continue;
6595					if(setOptionValue(true,true,1,"DISPLAYDATA",ctx,data,statData,data.displayData,config.displayData,"displayData",j,-1,{nullvalue : null} )== false) continue;
6596					ctx.save();
6597					ctx.lineWidth=Math.ceil(ctx.chartLineScale*setOptionValue(true,true,1,"BARSTROKEWIDTH",ctx,data,statData,data.datasets[i].barStrokeWidth,config.barStrokeWidth,"barStrokeWidth",i,j,{animationValue: currentAnimPc, xPosLeft : statData[i][j].xPosLeft, yPosBottom : statData[i][j].yPosBottom, xPosRight : statData[i][j].xPosLeft+barWidth, yPosTop : statData[i][j].yPosBottom} ));				
6598					currentAnimPc = animationCorrection(animPc, data, config, i, j, false).animVal;
6599					if (currentAnimPc > 1) currentAnimPc = currentAnimPc - 1;
6600//					var barHeight = currentAnimPc * statData[i][j].barWidth - (Math.ceil(ctx.chartLineScale*config.barStrokeWidth) / 2);
6601					if(1*data.datasets[i].data[j]>=0)barHeight = currentAnimPc * statData[i][j].barWidth - (Math.ceil(ctx.chartLineScale*config.barStrokeWidth) / 2);
6602					else barHeight = currentAnimPc * statData[i][j].barWidth + (Math.ceil(ctx.chartLineScale*config.barStrokeWidth) / 2);
6603					ctx.fillStyle=setOptionValue(true,true,1,"COLOR",ctx,data,statData,data.datasets[i].fillColor,config.defaultFillColor,"fillColor",i,j,{animationValue: currentAnimPc, xPosLeft : statData[i][j].xPosLeft, yPosBottom : statData[i][j].yPosBottom, xPosRight : statData[i][j].xPosLeft+barHeight, yPosTop : statData[i][j].yPosBottom} );
6604					ctx.strokeStyle=setOptionValue(true,true,1,"STROKECOLOR",ctx,data,statData,data.datasets[i].strokeColor,config.defaultStrokeColor,"strokeColor",i,j,{nullvalue : null} );
6605					if (!(typeof(data.datasets[i].data[j]) == 'undefined')) {
6606					  if (Math.abs(data.datasets[i].data[j]) >= config.zeroValue || config.showZeroValue==true) {
6607  						roundRect(ctx, statData[i][j].yPosTop, statData[i][j].xPosLeft , barWidth, barHeight, config.barShowStroke, config.barBorderRadius, 0,i,j,(data.datasets[i].data[j] < 0 ? -1  : 1));
6608              if (animPc >= config.animationStopValue){ctx.pieces_drawn.rectangles++;ctx.pieces_drawn.total_drawn++;}
6609            }	
6610  				}
6611					ctx.restore();
6612				}
6613			}
6614
6615			// complementary bar;
6616			
6617			for (i = 0; i < data.datasets.length; i++) {
6618				for (j = 0; j < data.datasets[i].data.length; j++) {
6619					if(setOptionValue(true,true,1,"DISPLAYDATA",ctx,data,statData,data.datasets[i].displayData,config.displayData,"displayData",i,j,{nullvalue : null} )== false) continue;
6620					if(setOptionValue(true,true,1,"DISPLAYDATA",ctx,data,statData,data.displayData,config.displayData,"displayData",j,-1,{nullvalue : null} )== false) continue;
6621					complementaryBar=setOptionValue(true,true,1,"COMPLEMENTARYBAR",ctx,data,statData,data.datasets[i].complementaryBar,config.complementaryBar,"complementaryBar",i,j,{nullvalue : null} );
6622					if(complementaryBar == false)continue;
6623					ctx.save();
6624					ctx.lineWidth=Math.ceil(ctx.chartLineScale*setOptionValue(true,true,1,"BARSTROKEWIDTH",ctx,data,statData,data.datasets[i].barStrokeWidth,config.barStrokeWidth,"barStrokeWidth",i,j,{animationValue: currentAnimPc, xPosLeft : statData[i][j].xPosLeft, yPosBottom : statData[i][j].yPosBottom, xPosRight : statData[i][j].xPosLeft+barWidth, yPosTop : statData[i][j].yPosBottom-barHeight} ));				
6625					currentAnimPc = animationCorrection(animPc, data, config, i, j, false).animVal;
6626					if (currentAnimPc > 1) currentAnimPc = currentAnimPc - 1;
6627					if(1*data.datasets[i].data[j]>=0)barHeight = currentAnimPc * statData[i][j].barWidth - (Math.ceil(ctx.chartLineScale*config.barStrokeWidth) / 2);
6628					else barHeight = currentAnimPc * statData[i][j].barWidth + (Math.ceil(ctx.chartLineScale*config.barStrokeWidth) / 2);
6629					fullHeight=msr.clrwidth-Math.ceil(ctx.chartLineScale*(config.scaleTickSizeLeft+config.scaleTickSizeRight));
6630					sizeTop=statData[i][j].xPosLeft-msr.clrx-Math.ceil(ctx.chartLineScale*config.scaleTickSizeRight);
6631					sizeBottom=fullHeight-sizeTop;
6632					if (1 * data.datasets[i].data[j]<0) {
6633						otherBarHeight=-(msr.clrwidth - ((statData[i][j].xPosLeft-msr.clrx)-barHeight))+Math.ceil(ctx.chartLineScale*config.scaleTickSizeLeft);
6634						otherBarHeight=-(sizeBottom+barHeight)+3*(ctx.lineWidth/2);
6635						otherBarHeight2=sizeTop-3*(ctx.lineWidth/2);
6636						decal=-(ctx.lineWidth/2);
6637					} else {
6638						otherBarHeight=msr.clrwidth - ((statData[i][j].xPosLeft-msr.clrx)+barHeight+ctx.lineWidth);
6639						otherBarHeight=(sizeTop-barHeight)-3*(ctx.lineWidth/2);
6640						otherBarHeight2=-(sizeBottom-3*(ctx.lineWidth/2));
6641						decal=+(ctx.lineWidth/2);
6642					}
6643					ctx.fillStyle=setOptionValue(true,true,1,"COMPLEMENTARYCOLOR",ctx,data,statData,data.datasets[i].complementaryColor,config.complementaryColor,"complementaryColor",i,j,{animationValue: currentAnimPc, xPosLeft : statData[i][j].xPosLeft+barHeight, yPosBottom : statData[i][j].yPosBottom, xPosRight : statData[i][j].xPosLeft+barHeight+otherBarHeight, yPosTop : statData[i][j].yPosBottom});
6644					ctx.strokeStyle=setOptionValue(true,true,1,"COMPLEMENTARYSTROKECOLOR",ctx,data,statData,data.datasets[i].complementaryStrokeColor,config.complementaryStrokeColor,"strokeColor",i,j,{nullvalue : null} );
6645					roundRect(ctx, statData[i][j].yPosTop, statData[i][j].xPosLeft+barHeight+2*decal, barWidth,otherBarHeight, config.barShowStroke, config.barBorderRadius,0, i,j,(data.datasets[i].data[j] < 0 ? -1  : 1));
6646          if (animPc >= config.animationStopValue){ctx.pieces_drawn.rectangles++;ctx.pieces_drawn.total_drawn++;}
6647
6648					if(config.complementaryBarFullHeight) {
6649						roundRect(ctx, statData[i][j].yPosTop, statData[i][j].xPosLeft-2*decal, barWidth,otherBarHeight2, config.barShowStroke, config.barBorderRadius,0, i,j,(data.datasets[i].data[j] < 0 ? -1  : 1));
6650					}
6651					ctx.restore();
6652				}
6653			}
6654
6655			if (animPc >= config.animationStopValue) {
6656				for (i = 0; i < data.datasets.length; i++) {
6657					for (j = 0; j < data.datasets[i].data.length; j++) {
6658						if(setOptionValue(true,true,1,"DISPLAYDATA",ctx,data,statData,data.datasets[i].displayData,config.displayData,"displayData",i,j,{nullvalue : null} )== false) continue;
6659						if(setOptionValue(true,true,1,"DISPLAYDATA",ctx,data,statData,data.displayData,config.displayData,"displayData",j,-1,{nullvalue : null} )== false) continue;
6660						if (typeof(data.datasets[i].data[j]) == 'undefined') continue;
6661						jsGraphAnnotate[ctx.ChartNewId][jsGraphAnnotate[ctx.ChartNewId].length] = ["RECT", i ,j ,statData,setOptionValue(true,true,1,"ANNOTATEDISPLAY",ctx,data,statData,data.datasets[i].annotateDisplay,config.annotateDisplay,"annotateDisplay",i,j,{nullValue : true})];
6662                       				if(setOptionValue(true,true,1,"INGRAPHDATASHOW",ctx,data,statData,data.datasets[i].inGraphDataShow,config.inGraphDataShow,"inGraphDataShow",i,j,{nullV
6662alue : true}))  {
6663							ctx.save();
6664							ctx.textAlign = setOptionValue(true,true,1,"INGRAPHDATAALIGN",ctx,data,statData,undefined,config.inGraphDataAlign,"inGraphDataAlign",i,j,{nullValue: true  });
6665							ctx.textBaseline = setOptionValue(true,true,1,"INGRAPHDATAVALIGN",ctx,data,statData,undefined,config.inGraphDataVAlign,"inGraphDataVAlign",i,j,{nullValue : true} );
6666							ctx.font = setOptionValue(true,true,1,"INGRAPHDATAFONTSTYLE",ctx,data,statData,undefined,config.inGraphDataFontStyle,"inGraphDataFontStyle",i,j,{nullValue : true} ) + ' ' + setOptionValue(true,true,ctx.chartTextScale,"INGRAPHDATAFONTSIZE",ctx,data,statData,undefined,config.inGraphDataFontSize,"inGraphDataFontSize",i,j,{nullValue : true} ) + 'px ' + setOptionValue(true,true,1,"INGRAPHDATAFONTFAMILY",ctx,data,statData,undefined,config.inGraphDataFontFamily,"inGraphDataFontFamily",i,j,{nullValue : true} );
6667							ctx.fillStyle = setOptionValue(true,true,1,"INGRAPHDATAFONTCOLOR",ctx,data,statData,undefined,config.inGraphDataFontColor,"inGraphDataFontColor",i,j,{nullValue : true} );
6668							ctx.beginPath();
6669							var yPos = 0,
6670								xPos = 0;
6671							if (setOptionValue(true,true,1,"INGRAPHDATAYPOSITION",ctx,data,statData,undefined,config.inGraphDataYPosition,"inGraphDataYPosition",i,j,{nullValue : true} ) == 1) {
6672								yPos = statData[i][j].yPosTop - setOptionValue(true,true,ctx.chartSpaceScale,"INGRAPHDATAPADDINGY",ctx,data,statData,undefined,config.inGraphDataPaddingY,"inGraphDataPaddingY",i,j,{nullValue : true} ) + barWidth;
6673							} else if (setOptionValue(true,true,1,"INGRAPHDATAYPOSITION",ctx,data,statData,undefined,config.inGraphDataYPosition,"inGraphDataYPosition",i,j,{nullValue : true} ) == 2) {
6674								yPos = statData[i][j].yPosTop + barWidth / 2 - setOptionValue(true,true,ctx.chartSpaceScale,"INGRAPHDATAPADDINGY",ctx,data,statData,undefined,config.inGraphDataPaddingY,"inGraphDataPaddingY",i,j,{nullValue : true} );
6675							} else if (setOptionValue(true,true,1,"INGRAPHDATAYPOSITION",ctx,data,statData,undefined,config.inGraphDataYPosition,"inGraphDataYPosition",i,j,{nullValue : true} ) == 3) {
6676								yPos = statData[i][j].yPosTop - setOptionValue(true,true,ctx.chartSpaceScale,"INGRAPHDATAPADDINGY",ctx,data,statData,undefined,config.inGraphDataPaddingY,"inGraphDataPaddingY",i,j,{nullValue : true} );
6677							}
6678							if (setOptionValue(true,true,1,"INGRAPHDATAXPOSITION",ctx,data,statData,undefined,config.inGraphDataXPosition,"inGraphDataXPosition",i,j,{nullValue : true} ) == 1) {
6679								xPos = statData[i][j].xPosLeft + setOptionValue(true,true,ctx.chartSpaceScale,"INGRAPHDATAPADDINGX",ctx,data,statData,undefined,config.inGraphDataPaddingX,"inGraphDataPaddingX",i,j,{nullValue : true} );
6680							} else if (setOptionValue(true,true,1,"INGRAPHDATAXPOSITION",ctx,data,statData,undefined,config.inGraphDataXPosition,"inGraphDataXPosition",i,j,{nullValue : true} ) == 2) {
6681								xPos = (statData[i][j].xPosLeft+statData[i][j].xPosRight)/2 + setOptionValue(true,true,ctx.chartSpaceScale,"INGRAPHDATAPADDINGX",ctx,data,statData,undefined,config.inGraphDataPaddingX,"inGraphDataPaddingX",i,j,{nullValue : true} );
6682							} else if (setOptionValue(true,true,1,"INGRAPHDATAXPOSITION",ctx,data,statData,undefined,config.inGraphDataXPosition,"inGraphDataXPosition",i,j,{nullValue : true} ) == 3) {
6683								xPos = statData[i][j].xPosRight + setOptionValue(true,true,ctx.chartSpaceScale,"INGRAPHDATAPADDINGX",ctx,data,statData,undefined,config.inGraphDataPaddingX,"inGraphDataPaddingX",i,j,{nullValue : true} );
6684							}
6685							ctx.translate(xPos, yPos);
6686							var dispString = tmplbis(setOptionValue(true,true,1,"INGRAPHDATATMPL",ctx,data,statData,undefined,config.inGraphDataTmpl,"inGraphDataTmpl",i,j,{nullValue : true} ), statData[i][j],config);
6687							var rotateVal=setOptionValue(true,true,1,"INGRAPHDATAROTATE",ctx,data,statData,undefined,config.inGraphDataRotate,"inGraphDataRotate",i,j,{nullValue : true} ) * (Math.PI / 180);
6688							ctx.rotate(rotateVal);
6689							setTextBordersAndBackground(ctx,dispString,setOptionValue(true,true,ctx.chartTextScale,"INGRAPHDATAFONTSIZE",ctx,data,statData,undefined,config.inGraphDataFontSize,"inGraphDataFontSize",i,j,{nullV
6689alue : true} ),0,0,setOptionValue(true,true,1,"INGRAPHDATABORDERS",ctx,data,statData,undefined,config.inGraphDataBorders,"inGraphDataBorders",i,j,{nullValue : true} ),setOptionValue(true,true,1,"INGRAPHDATABORDERSSELECTION",ctx,data,statData,undefined,config.inGraphDataBordersSelection,"inGraphDataBordersSelection",i,j,{nullValue : true} ),setOptionValue(true,true,1,"INGRAPHDATABORDERSCOLOR",ctx,data,statData,undefined,config.inGraphDataBordersColor,"inGraphDataBordersColor",i,j,{nullValue : true} ),setOptionValue(true,true,ctx.chartLineScale,"INGRAPHDATABORDERSWIDTH",ctx,data,statData,undefined,config.inGraphDataBordersWidth,"inGraphDataBordersWidth",i,j,{nullValue : true} ),setOptionValue(true,true,ctx.chartSpaceScale,"INGRAPHDATABORDERSXSPACE",ctx,data,statData,undefined,config.inGraphDataBordersXSpace,"inGraphDataBordersXSpace",i,j,{nullValue : true} ),setOptionValue(true,true,ctx.chartSpaceScale,"INGRAPHDATABORDERSYSPACE",ctx,data,statData,undefined,config.inGraphDataBordersYSpace,"inGraphDataBordersYSpace",i,j,{nullValue : true} ),setOptionValue(true,true,1,"INGRAPHDATABORDERSSTYLE",ctx,data,statData,undefined,config.inGraphDataBordersStyle,"inGraphDataBordersStyle",i,j,{nullValue : true} ),setOptionValue(true,true,1,"INGRAPHDATABACKGROUNDCOLOR",ctx,data,statData,undefined,config.inGraphDataBackgroundColor,"inGraphDataBackgroundColor",i,j,{nullValue : true} ),"INGRAPHDATA",config.inGraphDataBordersRadius);
6690							ctx.fillTextMultiLine(dispString, 0, 0, ctx.textBaseline, setOptionValue(true,true,ctx.chartTextScale,"INGRAPHDATAFONTSIZE",ctx,data,statData,undefined,config.inGraphDataFontSize,"inGraphDataFontSize",i,j,{nullValue : true} ),true,config.detectMouseOnText,ctx,"INGRAPHDATA_TEXTMOUSE",rotateVal,xPos, yPos,i,j);
6691							ctx.restore();
6692						}
6693					}
6694				}
6695			}
6696		};
6697
6698		function roundRect(ctx, x, y, w, h, stroke, radius, zeroY,i,j,fact) {
6699			ctx.beginPath();
6700			ctx.moveTo(y + zeroY, x );
6701			ctx.lineTo(y + zeroY, x + w);
6702			ctx.lineTo(y + h - fact*radius, x + w);
6703			ctx.quadraticCurveTo(y + h, x + w, y + h, x + w - radius);
6704			ctx.lineTo(y + h, x + radius);
6705			ctx.quadraticCurveTo(y + h, x, y + h - fact*radius, x);
6706			ctx.lineTo(y + zeroY, x);
6707			ctx.quadraticCurveTo(y + zeroY, x, y + zeroY, x + w);
6708
6709			if (stroke) { 
6710				ctx.setLineDash(lineStyleFn(setOptionValue(true,true,1,"STROKESTYLE",ctx,data,statData,data.datasets[i].datasetStrokeStyle,config.datasetStrokeStyle,"datasetStrokeStyle",i,j,{nullvalue : null} )));
6711				ctx.stroke();
6712				ctx.setLineDash([]);
6713			};
6714			ctx.closePath();
6715			ctx.fill();
6716		};
6717
6718		function drawScale() {
6719      drawGridScale(ctx,data,config,msr,yAxisPosX,xAxisPosY,zeroY,valueHop,scaleHop,data.labels.length+0,calculatedScale.steps+1);
6720    };
6721    
6722
6723		function drawLabels() {
6724			ctx.font = config.scaleFontStyle + " " + (Math.ceil(ctx.chartTextScale*config.scaleFontSize)).toString() + "px " + config.scaleFontFamily;
6725			//X axis line                                                          
6726			if (config.scaleShowLabels && (config.xAxisTop || config.xAxisBottom)) {
6727				ctx.textBaseline = "top";
6728				ctx.fillStyle = config.scaleFontColor;
6729				if (config.xAxisBottom) {
6730					if (msr.rotateLabels > 90) {
6731						ctx.save();
6732						ctx.textAlign = "left";
6733					} else if (msr.rotateLabels > 0) {
6734						ctx.save();
6735						ctx.textAlign = "right";
6736					} else {
6737						ctx.textAlign = "center";
6738					}
6739          subloop=0;
6740          decal=0;          
6741          if(config.yAxisMiddle==true) {
6742            decal=valueHop/2;
6743            subloop=1;
6744          }
6745					for (var i = ((config.showYAxisMin) ? -1 : 0); i < calculatedScale.steps-subloop; i++) {
6746						if(showYLabels(ctx,data,config,i+1,calculatedScale.labels[i+ 1])) {				
6747							ctx.save();
6748							if (msr.rotateLabels > 0) {
6749								ctx.translate(yAxisPosX + (i + 1) * valueHop - msr.highestXLabel / 2+decal, msr.xLabelPos);
6750								ctx.rotate(-((msr.rotateLabels + 180*(msr.rotateLabels>90)) * (Math.PI / 180)));
6751								ctx.fillTextMultiLine(calculatedScale.labels[i + 1], 0, 0, ctx.textBaseline, (Math.ceil(ctx.chartTextScale*config.scaleFontSize)),true,config.detectMouseOnText,ctx,"XAXIS_TEXTMOUSE",-(msr.rotateLabels * (Math.PI / 180)),yAxisPosX + (i + 1) * valueHop - msr.highestXLabel / 2, msr.xLabelPos,i,-1);
6752							} else {
6753								ctx.fillTextMultiLine(calculatedScale.labels[i + 1], yAxisPosX + (i + 1) * valueHop+decal, msr.xLabelPos, ctx.textBaseline, (Math.ceil(ctx.chartTextScale*config.scaleFontSize)),true,config.detectMouseOnText,ctx,"XAXIS_TEXTMOUSE",0,0,0,i,-1);
6754							}
6755							ctx.restore();
6756						}
6757					}
6758				}
6759				if (config.xAxisTop) {
6760					if (msr.rotateTLabels > 90) {
6761						ctx.save();
6762						ctx.textAlign = "left";
6763					} else if (msr.rotateTLabels > 0) {
6764						ctx.save();
6765						ctx.textAlign = "right";
6766					} else {
6767						ctx.textAlign = "center";
6768					}
6769          subloop=0;
6770          decal=0;          
6771          if(config.yAxisMiddle==true) {
6772            decal=valueHop/2;
6773            subloop=1;
6774          }
6775					
6776					for (var i = ((config.showYAxisMin) ? -1 : 0); i < calculatedScale.steps-subloop; i++) {
6777						if(showYLabels(ctx,data,config,i+1,calculatedScale.labels[i+ 1])) {				
6778							ctx.save();
6779							if (msr.rotateTLabels > 0) {
6780								ctx.translate(yAxisPosX + (i + 1) * valueHop - msr.highestTXLabel / 2+decal, msr.xTLabelPos);
6781								ctx.rotate(-((msr.rotateTLabels + 180*(msr.rotateTLabels>90))* (Math.PI / 180)));
6782								ctx.fillTextMultiLine(calculatedScale.labels[i + 1], 0, 0, ctx.textBaseline, (Math.ceil(ctx.chartTextScale*config.scaleFontSize)),true,config.detectMouseOnText,ctx,"XAXIS_TEXTMOUSE",-(msr.rotateLabels * (Math.PI / 180)),yAxisPosX + (i + 1) * valueHop - msr.highestXLabel / 2, msr.xLabelPos,i,-1);
6783							} else {
6784								ctx.fillTextMultiLine(calculatedScale.labels[i + 1], yAxisPosX + ((i + 1) * valueHop)+decal, msr.xTLabelPos, ctx.textBaseline, (Math.ceil(ctx.chartTextScale*config.scaleFontSize)),true,config.detectMouseOnText,ctx,"XAXIS_TEXTMOUSE",0,0,0,i,-1);
6785							}
6786							ctx.restore();
6787						}
6788					}
6789				}
6790			}
6791			//Y axis
6792			ctx.textAlign = "right";
6793			ctx.textBaseline = "middle";
6794			for (var j = 0; j < data.labels.length; j++) {
6795				if(showLabels(ctx,data,config,j)){
6796					if (config.yAxisLeft) {
6797						ctx.textAlign = "right";
6798						ctx.fillTextMultiLine(fmtChartJS(config, data.labels[j], config.fmtXLabel), yAxisPosX - (Math.ceil(ctx.chartLineScale*config.scaleTickSizeLeft) + Math.ceil(ctx.chartSpaceScale*config.yAxisSpaceRight)), xAxisPosY - (j * scaleHop) - scaleHop / 2, ctx.textBaseline, (Math.ceil(ctx.chartTextScale*config.scaleFontSize)),true,config.detectMouseOnText,ctx,"YLEFTAXIS_TEXTMOUSE",0,0,0,-1,j);
6799					}
6800					if (config.yAxisRight) {
6801						ctx.textAlign = "left";
6802						ctx.fillTextMultiLine(fmtChartJS(config, data.labels[j], config.fmtXLabel), yAxisPosX + msr.availableWidth + (Math.ceil(ctx.chartLineScale*config.scaleTickSizeRight) + Math.ceil(ctx.chartSpaceScale*config.yAxisSpaceRight)), xAxisPosY - (j * scaleHop) - scaleHop / 2, ctx.textBaseline, (Math.ceil(ctx.chartTextScale*config.scaleFontSize)),true,config.detectMouseOnText,ctx,"YRIGHTAXIS_TEXTMOUSE",0,0,0,-1,j);
6803					}
6804				}
6805			}
6806		};
6807
6808		function getValueBounds() {
6809			var upperValue = -Number.MAX_VALUE;
6810			var lowerValue = Number.MAX_VALUE;
6811			for (var i = 0; i < data.datasets.length; i++) {
6812				for (var j = 0; j < data.datasets[i].data.length; j++) {
6813					if(typeof data.datasets[i].data[j]=="undefined")continue;
6814					if (1 * data.datasets[i].data[j] > upperValue) {
6815						upperValue = 1 * data.datasets[i].data[j]
6816					};
6817					if (1 * data.datasets[i].data[j] < lowerValue) {
6818						lowerValue = 1 * data.datasets[i].data[j]
6819					};
6820				}
6821			};
6822			if(upperValue<lowerValue){upperValue=0;lowerValue=0;}
6823			if (Math.abs(upperValue - lowerValue) < config.zeroValue) {
6824				if(Math.abs(upperValue)< config.zeroValue) upperValue = .9;
6825				if(upperValue>0) {
6826					upperValue=upperValue*1.1;
6827					lowerValue=lowerValue*0.9;
6828				} else {
6829					upperValue=upperValue*0.9;
6830					lowerValue=lowerValue*1.1;
6831				}
6832			}
6833			// AJOUT CHANGEMENT
6834			if(typeof config.graphMin=="function")lowerValue= setOptionValue(true,true,1,"GRAPHMIN",ctx,data,statData,undefined,config.graphMin,"graphMin",-1,-1,{nullValue : true})
6835			else if (!isNaN(config.graphMin)) lowerValue = config.graphMin;                                                            
6836			if(typeof config.graphMax=="function") upperValue= setOptionValue(true,true,1,"GRAPHMAX",ctx,data,statData,undefined,config.graphMax,"graphMax",-1,-1,{nullValue : true})
6837			else if (!isNaN(config.graphMax)) upperValue = config.graphMax;
6838
6839			labelHeight = (Math.ceil(ctx.chartTextScale*config.scaleFontSize));
6840			scaleHeight = msr.availableHeight;
6841
6842			var maxSteps = Math.floor((scaleHeight / (labelHeight * 0.66)));
6843			var minSteps = Math.floor((scaleHeight / labelHeight * 0.5));
6844			if(upperValue<lowerValue){lowerValue=upperValue-1;}
6845			return {
6846				maxValue: upperValue,
6847				minValue: lowerValue,
6848				maxSteps: maxSteps,
6849				minSteps: minSteps
6850			};
6851		};
6852
6853		return {
6854			data:data,
6855			config:config,
6856			ctx:ctx
6857		};
6858	};
6859
6860	function calculateOffset(logarithmic, val, calculatedScale, scaleHop) {
6861		if (!logarithmic) { // no logarithmic scale
6862			var outerValue = calculatedScale.steps * calculatedScale.stepValue;
6863			var adjustedValue = val - calculatedScale.graphMin;
6864			var scalingFactor = CapValue(adjustedValue / outerValue, 1, 0);
6865			return (scaleHop * calculatedScale.steps) * scalingFactor;
6866		} else { // logarithmic scale
6867			return CapValue(log10(val) * scaleHop - log10(calculatedScale.graphMin) * scaleHop, undefined, 0);
6868		}
6869	};
6870
6871	function animationLoop(config, legendMsr, drawScale, drawData, ctx, clrx, clry, clrwidth, clrheight, midPosX, midPosY, borderX, borderY, data, statData) {
6872
6873		var cntiter = 0;
6874		var animationCount = 1;
6875		var multAnim = 1;
6876		if (config.animationStartValue < 0 || config.animationStartValue > 1) config.animation.StartValue = 0;
6877		if (config.animationStopValue < 0 || config.animationStopValue > 1) config.animation.StopValue = 1;
6878		if (config.animationStopValue < config.animationStartValue) config.animationStopValue = config.animationStartValue;
6879		if (isIE() < 9 && isIE() != false) config.animation = false;
6880		var animFrameAmount = (config.animation) ? 1 / CapValue(config.animationSteps, Number.MAX_VALUE, 1) : 1,
6881			easingFunction = animationOptions[config.animationEasing],
6882			percentAnimComplete = (config.animation) ? 0 : 1;
6883		if (config.animation && config.animationStartValue > 0 && config.animationStartValue <= 1) {
6884			while (percentAnimComplete < config.animationStartValue) {
6885				cntiter++;
6886				percentAnimComplete += animFrameAmount;
6887			}
6888		}
6889		var beginAnim = cntiter;
6890		var beginAnimPct = percentAnimComplete;
6891		if (typeof drawScale !== "function") drawScale = function() {};
6892		if (config.clearRect) {
6893      if(ctx.firstPass%10!=1 || config.animation==false)animLoop();
6894      else {
6895			   if(config.animationForceSetTimeOut)requestAnimFrameSetTimeOut(animLoop);
6896			   else requestAnimFrame(animLoop);
6897      }
6898		} else animLoop();
6899
6900    
6901//				drawData(1);
6902//				drawScale();
6903
6904		function animateFrame() {
6905
6906			var easeAdjustedAnimationPercent = (config.animation) ? CapValue(easingFunction(percentAnimComplete), null, 0) : 1;
6907			if (1 * cntiter >= 1 * CapValue(config.animationSteps, Number.MAX_VALUE, 1) || config.animation == false || ctx.firstPass%10!=1) easeAdjustedAnimationPercent = 1;
6908			else if (easeAdjustedAnimationPercent >= 1) easeAdjustedAnimationPercent = 0.9999;
6909			if (config.animation && !(isIE() < 9 && isIE() != false) && config.clearRect) {
6910				ctx.clearRect(clrx, clry, clrwidth, clrheight);
6911			}
6912			dispCrossImage(ctx, config, midPosX, midPosY, borderX, borderY, false, data, easeAdjustedAnimationPercent, cntiter);
6913			dispCrossText(ctx, config, midPosX, midPosY, borderX, borderY, false, data, easeAdjustedAnimationPercent, cntiter);
6914			if(typeof config.beforeDrawFunction == "function") config.beforeDrawFunction("BEFOREDRAWFUNCTION",ctx,data,statData,-1,-1,{animationValue : easeAdjustedAnimationPercent, cntiter: cntiter, config : config, borderX : borderX, borderY : borderY, midPosX : midPosX, midPosY : midPosY});
6915			if (config.scaleOverlay) {
6916				drawData(easeAdjustedAnimationPercent);
6917				if(typeof config.endDrawDataFunction == "function")config.endDrawDataFunction("ENDDATAFUNCTION",ctx,data,statData,-1,-1,{animationValue : easeAdjustedAnimationPercent, cntiter: cntiter, config : config, borderX : borderX, borderY : borderY, midPosX : midPosX, midPosY : midPosY});
6918				drawScale();
6919				if(typeof config.endDrawScaleFunction == "function")config.endDrawScaleFunction("ENDSCALEFUNCTION",ctx,data,statData,-1,-1,{animationValue : easeAdjustedAnimationPercent, cntiter: cntiter, config : config, borderX : borderX, borderY : borderY, midPosX : midPosX, midPosY : midPosY});
6920			} else {
6921				drawScale();
6922				if(typeof config.endDrawScaleFunction == "function")config.endDrawScaleFunction("ENDSCALEFUNCTION",ctx,data,statData,-1,-1,{animationValue : easeAdjustedAnimationPercent, cntiter: cntiter, config : config, borderX : borderX, borderY : borderY, midPosX : midPosX, midPosY : midPosY});
6923				drawData(easeAdjustedAnimationPercent);
6924				if(typeof config.endDrawDataFunction == "function")config.endDrawDataFunction("ENDDATAFUNCTION",ctx,data,statData,-1,-1,{animationValue : easeAdjustedAnimationPercent, cntiter: cntiter, config : config, borderX : borderX, borderY : borderY, midPosX : midPosX, midPosY : midPosY});
6925			}
6926			dispCrossImage(ctx, config, midPosX, midPosY, borderX, borderY, true, data, easeAdjustedAnimationPercent, cntiter);
6927			dispCrossText(ctx, config, midPosX, midPosY, borderX, borderY, true, data, easeAdjustedAnimationPercent, cntiter);
6928			drawLegend(legendMsr,data,config,ctx,ctx.tpchart,cntiter);
6929		};
6930
6931		function animLoop() {
6932
6933			//We need to check if the animation is incomplete (less than 1), or complete (1).
6934			cntiter += multAnim;
6935
6936      
6937			percentAnimComplete += multAnim * animFrameAmount;
6938			if (cntiter == config.animationSteps || config.animation == false || ctx.firstPass%10!=1) percentAnimComplete = 1;
6939			else if (percentAnimComplete >= 1) percentAnimComplete = 0.999;
6940			animateFrame();
6941			//Stop the loop continuing forever
6942			if (multAnim == -1 && cntiter <= beginAnim) {
6943				if (typeof config.onAnimationComplete == "function" && (config.alwaysRunFunctionAtCompletion==true || ctx.runanimationcompletefunction==true)) config.onAnimationComplete(ctx, config, data, 0, animationCount + 1,statData);
6944				multAnim = 1;
6945				if(config.animationForceSetTimeOut)requestAnimFrameSetTimeOut(animLoop);
6946				else requestAnimFrame(animLoop);
6947			} else if (percentAnimComplete < config.animationStopValue) {
6948				if(config.animationForceSetTimeOut)requestAnimFrameSetTimeOut(animLoop);
6949				else requestAnimFrame(animLoop);
6950			} else {
6951				if ((animationCount < config.animationCount || config.animationCount == 0) && (ctx.firstPass%10==1)) {
6952					animationCount++;
6953					if (config.animationBackward && multAnim == 1) {
6954						percentAnimComplete -= animFrameAmount;
6955						multAnim = -1;
6956					} else {
6957						multAnim = 1;
6958						cntiter = beginAnim - 1;
6959						percentAnimComplete = beginAnimPct - animFrameAmount;
6960					}
6961					window.setTimeout(animLoop, config.animationPauseTime*1000);
6962				} else {
6963					if(!testRedraw(ctx,data,config)) {
6964						if (typeof config.onAnimationComplete == "function" && (config.alwaysRunFunctionAtCompletion==true || ctx.runanimationcompletefunction==true)) {
6965							config.onAnimationComplete(ctx, config, data, 1, animationCount + 1,statData);
6966							ctx.runanimationcompletefunction=false;
6967						}
6968					}
6969					ctx.firstPass=9;
6970          close_result(ctx);
6971				}
6972				
6973			}
6974		};
6975	};
6976	//Declare global functions to be called within this namespace here.
6977	// shim layer with setTimeout fallback
6978	var requestAnimFrame = (function() {
6979		return window.requestAnimationFrame ||
6980			window.webkitRequestAnimationFrame ||
6981			window.mozRequestAnimationFrame ||
6982			window.oRequestAnimationFrame ||
6983			window.msRequestAnimationFrame ||
6984			function(callback) {
6985				window.setTimeout(callback, 1000 / 60);
6986			};
6987	})();
6988	var requestAnimFrameSetTimeOut = (function() {
6989		return	function(callback) { window.setTimeout(callback, 1000 / 60); };
6990	})();
6991
6992
6993	function calculateScale(axis, config, maxSteps, minSteps, maxValue, minValue, labelTemplateString) {
6994		var graphMin, graphMax, graphRange, stepValue, numberOfSteps, valueRange, rangeOrderOfMagnitude, decimalNum;
6995		var logarithmic, yAxisMinimumInterval;
6996		if (axis == 2) {
6997			logarithmic = config.logarithmic2;
6998			yAxisMinimumInterval = config.yAxisMinimumInterval2;
6999		} else {
7000			logarithmic = config.logarithmic;
7001			yAxisMinimumInterval = config.yAxisMinimumInterval;
7002		}
7003
7004		if (!logarithmic) { // no logarithmic scale
7005			valueRange = maxValue - minValue;
7006			rangeOrderOfMagnitude = calculateOrderOfMagnitude(valueRange);
7007			if(Math.abs(minValue)>config.zeroValue)graphMin = Math.floor(minValue / (1 * Math.pow(10, rangeOrderOfMagnitude))) * Math.pow(10, rangeOrderOfMagnitude);
7008			else graphMin=0;
7009			if(Math.abs(maxValue)>config.zeroValue)graphMax = Math.ceil(maxValue / (1 * Math.pow(10, rangeOrderOfMagnitude))) * Math.pow(10, rangeOrderOfMagnitude);
7010			else graphMax=0;
7011			if (typeof yAxisMinimumInterval == "number") {
7012				if(graphMax>=0) {
7013					graphMin = graphMin - (graphMin % yAxisMinimumInterval);
7014					while (graphMin > minValue) graphMin = graphMin - yAxisMinimumInterval;
7015					if (graphMax % yAxisMinimumInterval > config.zeroValue && graphMax % yAxisMinimumInterval < yAxisMinimumInterval - config.zeroValue) {
7016						graphMax = roundScale(config, (1 + Math.floor(graphMax / yAxisMinimumInterval)) * yAxisMinimumInterval);
7017					}
7018					while (graphMax < maxValue) graphMax = graphMax + yAxisMinimumInterval;
7019				}
7020			}
7021		} else { // logarithmic scale
7022			if(minValue==maxValue)maxValue=maxValue+1;
7023			if(minValue==0)minValue=0.01;
7024			var minMag = calculateOrderOfMagnitude(minValue);
7025			var maxMag = calculateOrderOfMagnitude(maxValue) + 1;
7026			graphMin = Math.pow(10, minMag);
7027			graphMax = Math.pow(10, maxMag);
7028			rangeOrderOfMagnitude = maxMag - minMag;
7029		}
7030		graphRange = graphMax - graphMin;
7031		stepValue = Math.pow(10, rangeOrderOfMagnitude);
7032		numberOfSteps = Math.round(graphRange / stepValue);
7033		if (!logarithmic) { // no logarithmic scale
7034			//Compare number of steps to the max and min for that size graph, and add in half steps if need be.
7035			var stopLoop = false;
7036			while (!stopLoop && (numberOfSteps < minSteps || numberOfSteps > maxSteps)) {
7037				if (numberOfSteps < minSteps) {
7038					if (typeof yAxisMinimumInterval == "number") {
7039						if (stepValue / 2 < yAxisMinimumInterval) {
7040							stopLoop = true;
7041							stepValue=yAxisMinimumInterval;
7042							numberOfSteps=Math.ceil(graphRange / stepValue);
7043						}
7044					}
7045					if (!stopLoop) {
7046						stepValue /=2;
7047						numberOfSteps = Math.round(graphRange / stepValue);
7048					}
7049				} else {
7050					stepValue *= 2;
7051					numberOfSteps = Math.round(graphRange / stepValue);
7052				}
7053	
7054			}
7055
7056			if (typeof yAxisMinimumInterval == "number") {
7057				if (stepValue < yAxisMinimumInterval) {
7058					stepValue = yAxisMinimumInterval;
7059					numberOfSteps = Math.ceil(graphRange / stepValue);
7060				} 
7061				if (stepValue % yAxisMinimumInterval > config.zeroValue && stepValue % yAxisMinimumInterval < yAxisMinimumInterval - config.zeroValue) {
7062					if ((2 * stepValue) % yAxisMinimumInterval < config.zeroValue || (2 * stepValue) % yAxisMinimumInterval > yAxisMinimumInterval - config.zeroValue) {
7063						stepValue = 2 * stepValue;
7064						numberOfSteps = Math.ceil(graphRange / stepValue);
7065					} else {
7066						stepValue = roundScale(config, (1 + Math.floor(stepValue / yAxisMinimumInterval)) * yAxisMinimumInterval);
7067						numberOfSteps = Math.ceil(graphRange / stepValue);
7068					}
7069				}
7070			}
7071			if(config.graphMaximized==true || config.graphMaximized=="bottom" || typeof config.graphMin!=="undefined") {
7072				while (graphMin+stepValue < minValue && numberOfSteps>=3){graphMin+=stepValue;numberOfSteps--};
7073			}
7074			if(config.graphMaximized==true || config.graphMaximized=="top" || typeof config.graphMax!=="undefined") {
7075
7076				while (graphMin+(numberOfSteps-1)*stepValue >= maxValue && numberOfSteps>=3) numberOfSteps--;
7077			}
7078		} else { // logarithmic scale
7079			numberOfSteps = rangeOrderOfMagnitude; // so scale is 10,100,1000,...
7080		}
7081		var labels = [];
7082		populateLabels(1, config, labelTemplateString, labels, numberOfSteps, graphMin, graphMax, stepValue);
7083		return {
7084			steps: numberOfSteps,
7085			stepValue: stepValue,
7086			graphMin: graphMin,
7087			labels: labels,
7088			maxValue: maxValue
7089		}
7090	};
7091
7092	function roundScale(config, value) {
7093		var scldec = 0;
7094		var sscl = "" + config.yAxisMinimumInterval;
7095		if (sscl.indexOf(".") > 0) {
7096			scldec = sscl.substr(sscl.indexOf(".")).length;
7097		}
7098		return (Math.round(value * Math.pow(10, scldec)) / Math.pow(10, scldec));
7099	} ;
7100
7101	function calculateOrderOfMagnitude(val) {
7102		if (val==0)return 0;
7103		return Math.floor(Math.log(val) / Math.LN10);
7104	};
7105	//Populate an array of all the labels by interpolating the string.
7106	function populateLabels(axis, config, labelTemplateString, labels, numberOfSteps, graphMin, graphMax, stepValue) {
7107		var logarithmic;
7108		if (axis == 2) {
7109			logarithmic = config.logarithmic2;
7110			fmtYLabel = config.fmtYLabel2;
7111		} else {
7112			logarithmic = config.logarithmic;
7113			fmtYLabel = config.fmtYLabel;
7114		}
7115		if (labelTemplateString) {
7116			//Fix floating point errors by setting to fixed the on the same decimal as the stepValue.
7117			var i;
7118			if (!logarithmic) { // no logarithmic scale
7119				for (i = 0; i < numberOfSteps + 1; i++) {
7120					labels.push(tmpl(labelTemplateString, {
7121						value: fmtChartJS(config, 1 * ((graphMin + (stepValue * i)).toFixed(getDecimalPlaces(stepValue))), fmtYLabel)
7122					},config));
7123				}
7124			} else { // logarithmic scale 10,100,1000,...
7125				var value = graphMin;
7126				for (i = 0; i < numberOfSteps + 1; i++) {
7127					labels.push(tmpl(labelTemplateString, {
7128						value: fmtChartJS(config, 1 * value.toFixed(getDecimalPlaces(value)), fmtYLabel)
7129					},config));
7130					value *= 10;
7131				}
7132			}
7133		}
7134	};
7135	//Max value from array
7136	function Max(array) {
7137		return Math.max.apply(Math, array);
7138	};
7139	//Min value from array
7140	function Min(array) {
7141		return Math.min.apply(Math, array);
7142	};
7143	//Default if undefined
7144	function Default(userDeclared, valueIfFalse) {
7145		if (!userDeclared) {
7146			return valueIfFalse;
7147		} else {
7148			return userDeclared;
7149		}
7150	};
7151	//Apply cap a value at a high or low number
7152	function CapValue(valueToCap, maxValue, minValue) {
7153		if (isNumber(maxValue)) {
7154			if (valueToCap > maxValue) {
7155				return maxValue;
7156			}
7157		}
7158		if (isNumber(minValue)) {
7159			if (valueToCap < minValue) {
7160				return minValue;
7161			}
7162		}
7163		return valueToCap;
7164	};
7165
7166	function getDecimalPlaces(num) {
7167		var match = (''+num).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);
7168		if (!match) { 
7169			return 0;
7170		}
7171		return Math.max(
7172			0,
7173			(match[1] ? match[1].length : 0) - (match[2] ? +match[2] : 0)
7174		);
7175	};
7176
7177	function mergeChartConfig(defaults, userDefined) {
7178		var returnObj = {};
7179		for (var attrname in defaults) {
7180			returnObj[attrname] = defaults[attrname];
7181		}
7182		for (var attrnameBis in userDefined) {
7183			returnObj[attrnameBis] = userDefined[attrnameBis];
7184		}
7185		return returnObj;
7186	};
7187	//Javascript micro templating by John Resig - source at http://ejohn.org/blog/javascript-micro-templating/
7188	var cache = {};
7189	
7190	function tmpl(str, data,config) {
7191		newstr=str;
7192		if(newstr.substr(0,config.templatesOpenTag.length)==config.templatesOpenTag)newstr="<%="+newstr.substr(config.templatesOpenTag.length,newstr.length-config.templatesOpenTag.length);
7193		if(newstr.substr(newstr.length-config.templatesCloseTag.length,config.templatesCloseTag.length)==config.templatesCloseTag)newstr=newstr.substr(0,newstr.length-config.templatesCloseTag.length)+"%>";
7194		return tmplpart2(newstr,data);
7195	}
7196
7197	function tmplpart2(str, data) {
7198		// Figure out if we're getting a template, or if we need to
7199		// load the template - and be sure to cache the result.
7200		var fn = !/\W/.test(str) ?
7201			cache[str] = cache[str] ||
7202			tmplpart2(document.getElementById(str).innerHTML) :
7203			// Generate a reusable function that will serve as a template
7204			// generator (and which will be cached).
7205			new Function("obj",
7206				"var p=[],print=function(){p.push.apply(p,arguments);};" +
7207				// Introduce the data as local variables using with(){}
7208				"with(obj){p.push('" +
7209				// Convert the template into pure JavaScript
7210				str
7211				.replace(/[\r\t\n]/g, " ")
7212				.split("<%").join("\t")
7213				.replace(/((^|%>)[^\t]*)'/g, "$1\r")
7214				.replace(/\t=(.*?)%>/g, "',$1,'")
7215				.split("\t").join("');")
7216				.split("%>").join("p.push('")
7217				.split("\r").join("\\'") + "');}return p.join('');");
7218		// Provide some basic currying to the user
7219		return data ? fn(data) : fn;
7220	};
7221
7222	function dispCrossText(ctx, config, posX, posY, borderX, borderY, overlay, data, animPC, cntiter) {
7223		var i, disptxt, txtposx, txtposy, textAlign, textBaseline;
7224		for (i = 0; i < config.crossText.length; i++) {
7225			if (config.crossText[i] != "" && config.crossTextOverlay[Min([i, config.crossTextOverlay.length - 1])] == overlay && ((cntiter == 1 && config.crossTextIter[Min([i, config.crossTextIter.length - 1])] == "first") || config.crossTextIter[Min([i, config.crossTextIter.length - 1])] == cntiter || config.crossTextIter[Min([i, config.crossTextIter.length - 1])] == "all" || (animPC == 1 && config.crossTextIter[Min([i, config.crossTextIter.length - 1])] == "last"))) {
7226				ctx.save();
7227				ctx.beginPath();
7228				ctx.font = config.crossTextFontStyle[Min([i, config.crossTextFontStyle.length - 1])] + " " + (Math.ceil(ctx.chartTextScale*config.crossTextFontSize[Min([i, config.crossTextFontSize.length - 1])])).toString() + "px " + config.crossTextFontFamily[Min([i, config.crossTextFontFamily.length - 1])];
7229				ctx.fillStyle = config.crossTextFontColor[Min([i, config.crossTextFontColor.length - 1])];
7230				textAlign = config.crossTextAlign[Min([i, config.crossTextAlign.length - 1])];
7231				textBaseline = config.crossTextBaseline[Min([i, config.crossTextBaseline.length - 1])];
7232				txtposx = 1 * Math.ceil(ctx.chartSpaceScale*config.crossTextPosX[Min([i, config.crossTextPosX.length - 1])]);
7233				txtposy = 1 * Math.ceil(ctx.chartSpaceScale*config.crossTextPosY[Min([i, config.crossTextPosY.length - 1])]);
7234				switch (1 * config.crossTextRelativePosX[Min([i, config.crossTextRelativePosX.length - 1])]) {
7235					case 0:
7236						if (textAlign == "default") textAlign = "left";
7237						break;
7238					case 1:
7239						txtposx += borderX;
7240						if (textAlign == "default") textAlign = "right";
7241						break;
7242					case 2:
7243						txtposx += posX;
7244						if (textAlign == "default") textAlign = "center";
7245						break;
7246					case -2:
7247						txtposx += context.canvas.width / 2;
7248						if (textAlign == "default") textAlign = "center";
7249						break;
7250					case 3:
7251						txtposx += txtposx + 2 * posX - borderX;
7252						if (textAlign == "default") textAlign = "left";
7253						break;
7254					case 4:
7255						txtposx += context.canvas.width;
7256						if (textAlign == "default") textAlign = "right";
7257						break;
7258					default:
7259						txtposx += posX;
7260						if (textAlign == "default") textAlign = "center";
7261						break;
7262				}
7263				switch (1 * config.crossTextRelativePosY[Min([i, config.crossTextRelativePosY.length - 1])]) {
7264					case 0:
7265						if (textBaseline == "default") textBaseline = "top";
7266						break;
7267					case 3:
7268						txtposy += borderY;
7269						if (textBaseline == "default") textBaseline = "top";
7270						break;
7271					case 2:
7272						txtposy += posY;
7273						if (textBaseline == "default") textBaseline = "middle";
7274						break;
7275					case -2:
7276						txtposy += context.canvas.height / 2;
7277						if (textBaseline == "default") textBaseline = "middle";
7278						break;
7279					case 1:
7280						txtposy += txtposy + 2 * posY - borderY;
7281						if (textBaseline == "default") textBaseline = "bottom";
7282						break;
7283					case 4:
7284						txtposy += context.canvas.height;
7285						if (textBaseline == "default") textBaseline = "bottom";
7286						break;
7287					default:
7288						txtposy += posY;
7289						if (textBaseline == "default") textBaseline = "middle";
7290						break;
7291				}
7292				ctx.textAlign = textAlign;
7293				ctx.textBaseline = textBaseline;
7294				ctx.translate(1 * txtposx, 1 * txtposy);
7295				var rotateVal=Math.PI * config.crossTextAngle[Min([i, config.crossTextAngle.length - 1])] / 180;
7296				ctx.rotate(rotateVal);
7297				if (config.crossText[i].substring(0, 1) == "%") {
7298					if (typeof config.crossTextFunction == "function") disptxt = config.crossTextFunction(i, config.crossText[i], ctx, config, posX, posY, borderX, borderY, overlay, data, animPC);
7299				} else disptxt = config.crossText[i];
7300
7301				setTextBordersAndBackground(ctx,disptxt,Math.ceil(ctx.chartTextScale*config.crossTextFontSize[Min([i, config.crossTextFontSize.length - 1])]),0,0,config.crossTextBorders[Min([i, config.crossTextBorders.length - 1])],config.crossTextBordersSelection[Min([i, config.crossTextBorders.length - 1])],config.crossTextBordersColor[Min([i, config.crossTextBordersColor.length - 1])],Math.ceil(ctx.chartLineScale*config.crossTextBordersWidth[Min([i, config.crossTextBordersWidth.length - 1])]),Math.ceil(ctx.chartSpaceScale*config.crossTextBordersXSpace[Min([i, config.crossTextBordersXSpace.length - 1])]),Math.ceil(ctx.chartSpaceScale*config.crossTextBordersYSpace[Min([i, config.crossTextBordersYSpace.length - 1])]),config.crossTextBordersStyle[Min([i, config.crossTextBordersStyle.length - 1])],config.crossTextBackgroundColor[Min([i, config.crossTextBackgroundColor.length - 1])],"CROSSTEXT",config.crossTextBordersRadius);
7302				if((animPC==1 && config.crossTextIter[Min([i, config.crossTextIter.length - 1])] == "all") || config.crossTextIter[Min([i, config.crossTextIter.length - 1])] != "last") {
7303				       ctx.fillTextMultiLine(disptxt, 0, 0, ctx.textBaseline, Math.ceil(ctx.chartTextScale*config.crossTextFontSize[Min([i, config.crossTextFontSize.length - 1])]),true,config.detectMouseOnText,ctx,"CROSSTEXT_TEXTMOUSE",rotateVal,1 * txtposx, 1 * txtposy,i,-1);
7304				} else ctx.fillTextMultiLine(disptxt, 0, 0, ctx.textBaseline, Math.ceil(ctx.chartTextScale*config.crossTextFontSize[Min([i, config.crossTextFontSize.length - 1])]),true,false,ctx,"CROSSTEXT_TEXTMOUSE",rotateVal,1 * txtposx, 1 * txtposy,i,-1);
7305				ctx.restore();
7306			}
7307		}
7308	};
7309
7310	function dispCrossImage(ctx, config, posX, posY, borderX, borderY, overlay, data, animPC, cntiter) {
7311		var i, disptxt, imageposx, imageposy, imageAlign, imageBaseline;
7312		for (i = 0; i < config.crossImage.length; i++) {
7313			if (typeof config.crossImage[i] != "undefined" && config.crossImageOverlay[Min([i, config.crossImageOverlay.length - 1])] == overlay && ((cntiter == -1 && config.crossImageIter[Min([i, config.crossImageIter.length - 1])] == "background") || (cntiter == 1 && config.crossImageIter[Min([i, config.crossImageIter.length - 1])] == "first") || config.crossImageIter[Min([i, config.crossImageIter.length - 1])] == cntiter || (cntiter != -1 && config.crossImageIter[Min([i, config.crossImageIter.length - 1])] == "all") || (animPC == 1 && config.crossImageIter[Min([i, config.crossImageIter.length - 1])] == "last"))) {
7314				ctx.save();
7315				ctx.beginPath();
7316				imageAlign = config.crossImageAlign[Min([i, config.crossImageAlign.length - 1])];
7317				imageBaseline = config.crossImageBaseline[Min([i, config.crossImageBaseline.length - 1])];
7318				imageposx = 1 * Math.ceil(ctx.chartSpaceScale*config.crossImagePosX[Min([i, config.crossImagePosX.length - 1])]);
7319				imageposy = 1 * Math.ceil(ctx.chartSpaceScale*config.crossImagePosY[Min([i, config.crossImagePosY.length - 1])]);
7320				switch (1 * config.crossImageRelativePosX[Min([i, config.crossImageRelativePosX.length - 1])]) {
7321					case 0:
7322						if (imageAlign == "default") imageAlign = "left";
7323						break;
7324					case 1:
7325						imageposx += borderX;
7326						if (imageAlign == "default") imageAlign = "right";
7327						break;
7328					case 2:
7329						imageposx += posX;
7330						if (imageAlign == "default") imageAlign = "center";
7331						break;
7332					case -2:
7333						imageposx += context.canvas.width / 2;
7334						if (imageAlign == "default") imageAlign = "center";
7335						break;
7336					case 3:
7337						imageposx += imageposx + 2 * posX - borderX;
7338						if (imageAlign == "default") imageAlign = "left";
7339						break;
7340					case 4:
7341						imageposx += context.canvas.width;
7342						if (imageAlign == "default") imageAlign = "right";
7343						break;
7344					default:
7345						imageposx += posX;
7346						if (imageAlign == "default") imageAlign = "center";
7347						break;
7348				}
7349				switch (1 * config.crossImageRelativePosY[Min([i, config.crossImageRelativePosY.length - 1])]) {
7350					case 0:
7351						if (imageBaseline == "default") imageBaseline = "top";
7352						break;
7353					case 3:
7354						imageposy += borderY;
7355						if (imageBaseline == "default") imageBaseline = "top";
7356						break;
7357					case 2:
7358						imageposy += posY;
7359						if (imageBaseline == "default") imageBaseline = "middle";
7360						break;
7361					case -2:
7362						imageposy += context.canvas.height / 2;
7363						if (imageBaseline == "default") imageBaseline = "middle";
7364						break;
7365					case 1:
7366						imageposy += imageposy + 2 * posY - borderY;
7367						if (imageBaseline == "default") imageBaseline = "bottom";
7368						break;
7369					case 4:
7370						imageposy += context.canvas.height;
7371						if (imageBaseline == "default") imageBaseline = "bottom";
7372						break;
7373					default:
7374						imageposy += posY;
7375						if (imageBaseline == "default") imageBaseline = "middle";
7376						break;
7377				}
7378				var imageWidth = config.crossImage[i].width;
7379				switch (imageAlign) {
7380					case "left":
7381						break;
7382					case "right":
7383						imageposx -= imageWidth;
7384						break;
7385					case "center":
7386						imageposx -= (imageWidth / 2);
7387						break;
7388					default:
7389						break;
7390				}
7391				var imageHeight = config.crossImage[i].height;
7392				switch (imageBaseline) {
7393					case "top":
7394						break;
7395					case "bottom":
7396						imageposy -= imageHeight;
7397						break;
7398					case "middle":
7399						imageposy -= (imageHeight / 2);
7400						break;
7401					default:
7402						break;
7403				}
7404				ctx.translate(1 * imageposx, 1 * imageposy);
7405				ctx.rotate(Math.PI * config.crossImageAngle[Min([i, config.crossImageAngle.length - 1])] / 180);
7406				ctx.drawImage(config.crossImage[i], 0, 0);
7407				ctx.restore();
7408			}
7409		}
7410	};
7411	//****************************************************************************************
7412	function setMeasures(data, config, ctx, canvasheight, canvaswidth, ylabels, ylabels2, reverseLegend, reverseAxis, drawAxis, legendBox, typegraph) {
7413
7414        	var height=canvasheight;
7415        	var width=canvaswidth;
7416		if (window.devicePixelRatio>1) {
7417			height=height/window.devicePixelRatio;
7418			width=width/window.devicePixelRatio;
7419		}
7420		if (config.canvasBackgroundColor != "none") ctx.canvas.style.background = config.canvasBackgroundColor;
7421
7422		var i,j,k;
7423		
7424		var borderHeight = 0;
7425		var borderTHeight = 0;
7426		var borderBHeight = 0;
7427		var borderRHeight = 0;
7428		var borderLHeight = 0;
7429
7430		var graphTitleHeight = 0;
7431		var graphTitlePosY = 0;
7432
7433		var graphSubTitleHeight = 0;
7434		var graphSubTitlePosY = 0;
7435
7436		var footNoteHeight = 0;
7437		var footNotePosY = 0;
7438
7439		ctx.widthAtSetMeasures=width;
7440		ctx.heightAtSetMeasures=height;
7441
7442
7443		var currentPosition,topNotUsableHeight,bottomNotUsableHeight,leftNotUsableWidth,rightNotUsableWidth,availableWidth,availableHeight;
7444		availableWidth=width;
7445		availableHeight=height;
7446		
7447		//// Step 0 : border height;
7448		
7449		// Borders height (and width);
7450
7451		if (config.canvasBorders && config.canvasBordersSelection > 0) {
7452			borderHeight = Math.ceil(ctx.chartLineScale*config.canvasBordersWidth);
7453			if(isBorder(config.canvasBordersSelection,"TOP"))borderTHeight=borderHeight;
7454			if(isBorder(config.canvasBordersSelection,"BOTTOM"))borderBHeight=borderHeight;
7455			if(isBorder(config.canvasBordersSelection,"RIGHT"))borderRHeight=borderHeight;
7456			if(isBorder(config.canvasBordersSelection,"LEFT"))borderLHeight=borderHeight;
7457		}
7458
7459		//// Step 1 : compute height/width and position of top elements;
7460
7461		currentPosition=0+borderTHeight+Math.ceil(ctx.chartSpaceScale*config.spaceTop);
7462		
7463		// Title height - Title Position;
7464
7465		if (config.graphTitle.trim() != "") {
7466			graphTitleHeight = (Math.ceil(ctx.chartTextScale*config.graphTitleFontSize)) * (config.graphTitle.split("\n").length || 1) + Math.ceil(ctx.chartSpaceScale*config.graphTitleSpaceBefore) + Math.ceil(ctx.chartSpaceScale*config.graphTitleSpaceAfter);
7467
7468			graphTitlePosY = currentPosition  + Math.ceil(ctx.chartSpaceScale*config.graphTitleSpaceBefore)
7469			if(config.graphTitleBackgroundColor !="none" || config.graphTitleBorders) {
7470				graphTitleHeight+=(isBorder(config.graphTitleBordersSelection,"TOP")+isBorder(config.graphTitleBordersSelection,"BOTTOM"))*(Math.ceil(ctx.chartSpaceScale*config.graphTitleBordersYSpace));
7471				graphTitlePosY+=isBorder(config.graphTitleBordersSelection,"TOP")*Math.ceil(ctx.chartSpaceScale*config.graphTitleBordersYSpace);
7472			}
7473			if(config.graphTitleBorders) {
7474				graphTitleHeight+=(isBorder(config.graphTitleBordersSelection,"TOP")+isBorder(config.graphTitleBordersSelection,"BOTTOM"))*(Math.ceil(ctx.chartLineScale*config.graphTitleBordersWidth));
7475				graphTitlePosY+=isBorder(config.graphTitleBordersSelection,"TOP")*Math.ceil(ctx.chartLineScale*config.graphTitleBordersWidth);
7476			}
7477			currentPosition+=graphTitleHeight;
7478		}
7479
7480		// subTitle height - position;
7481		
7482		if (config.graphSubTitle.trim() != "") {
7483			graphSubTitleHeight = (Math.ceil(ctx.chartTextScale*config.graphSubTitleFontSize)) * (config.graphSubTitle.split("\n").length || 1) + Math.ceil(ctx.chartSpaceScale*config.graphSubTitleSpaceBefore) + Math.ceil(ctx.chartSpaceScale*config.graphSubTitleSpaceAfter);
7484			graphSubTitlePosY = currentPosition + Math.ceil(ctx.chartSpaceScale*config.graphSubTitleSpaceBefore);
7485			if(config.graphSubTitleBackgroundColor !="none" || config.graphSubTitleBorders) {
7486				graphSubTitleHeight+=2*(Math.ceil(ctx.chartSpaceScale*config.graphSubTitleBordersYSpace));
7487				graphSubTitlePosY+=Math.ceil(ctx.chartSpaceScale*config.graphSubTitleBordersYSpace);
7488			}
7489
7490			if(config.graphSubTitleBorders) {
7491				graphSubTitleHeight+=(isBorder(config.graphTitleBordersSelection,"TOP")+isBorder(config.graphTitleBordersSelection,"BOTTOM"))*(Math.ceil(ctx.chartLineScale*config.graphSubTitleBordersWidth));
7492				graphSubTitlePosY+=isBorder(config.graphTitleBordersSelection,"TOP")*Math.ceil(ctx.chartLineScale*config.graphSubTitleBordersWidth);
7493			}
7494			currentPosition+=graphSubTitleHeight;
7495		}
7496
7497		topNotUsableHeight=currentPosition;
7498		availableHeight -=topNotUsableHeight;
7499		//// Step 2 : compute height/width and position of bottom elements;
7500
7501		currentPosition=height - borderBHeight - Math.ceil(ctx.chartSpaceScale*config.spaceBottom);
7502		
7503		// footNote
7504		if (typeof(config.footNote) != "undefined") {
7505			if (config.footNote.trim() != "") {
7506				footNoteHeight = (Math.ceil(ctx.chartTextScale*config.footNoteFontSize)) * (config.footNote.split("\n").length || 1) + Math.ceil(ctx.chartSpaceScale*config.footNoteSpaceBefore) + Math.ceil(ctx.chartSpaceScale*config.footNoteSpaceAfter);
7507				footNotePosY = currentPosition - Math.ceil(ctx.chartSpaceScale*config.footNoteSpaceAfter);
7508				if(config.footNoteBackgroundColor !="none" || config.footNoteBorders) {
7509					footNoteHeight+=2*(Math.ceil(ctx.chartSpaceScale*config.footNoteBordersYSpace));
7510					footNotePosY-=Math.ceil(ctx.chartSpaceScale*config.footNoteBordersYSpace);
7511				}
7512				if(config.footNoteBorders) {
7513					footNoteHeight+=(isBorder(config.footNoteBordersSelection,"TOP")+isBorder(config.footNoteBordersSelection,"BOTTOM"))*(Math.ceil(ctx.chartLineScale*config.footNoteBordersWidth));
7514					footNotePosY-=isBorder(config.footNoteBordersSelection,"BOTTOM")*Math.ceil(ctx.chartLineScale*config.footNoteBordersWidth);
7515				}
7516				currentPosition-=footNoteHeight;
7517			}
7518		}
7519
7520                bottomNotUsableHeight=height-currentPosition;
7521		availableHeight -=bottomNotUsableHeight;
7522
7523		//// Step 3 : compute height/width and position of left elements;
7524
7525		currentPosition= 0 + borderLHeight + Math.ceil(ctx.chartSpaceScale*config.spaceLeft);
7526
7527		// No left element to be drawn;
7528
7529		leftNotUsableWidth = currentPosition;
7530		availableWidth -=leftNotUsableWidth;
7531
7532		//// Step 4 : compute height/width and position of right elements;
7533
7534		currentPosition= width - borderRHeight - Math.ceil(ctx.chartSpaceScale*config.spaceRight);
7535
7536		// No right element to be drawn;
7537
7538		rightNotUsableWidth = width-currentPosition;
7539		availableWidth -=rightNotUsableWidth;
7540
7541		topNotUsableHeight+=Math.ceil(ctx.chartSpaceScale*config.graphSpaceBefore);
7542		bottomNotUsableHeight+=Math.ceil(ctx.chartSpaceScale*config.graphSpaceAfter);
7543		availableHeight -=(Math.ceil(ctx.chartSpaceScale*config.graphSpaceBefore)+Math.ceil(ctx.chartSpaceScale*config.graphSpaceAfter));
7544		
7545
7546                //// Step 5  : compute widest text legend;
7547
7548		var nbeltLegend =0;
7549		var widestLegend=-99999999;
7550		var highestLegend=0;
7551		
7552		if (typeof(config.legend) != "undefined") {
7553			if (config.legend == true) {
7554				ctx.font = config.legendFontStyle + " " + (Math.ceil(ctx.chartTextScale*config.legendFontSize)).toString() + "px " + config.legendFontFamily;
7555				var textLength;
7556				for (i = 0;i < data.datasets.length; i++) {
7557					if (typeof(data.datasets[i].title) == "string") {
7558						if (data.datasets[i].title.trim() != "") {
7559							nbeltLegend++;
7560							textLength = ctx.measureTextMultiLine(fmtChartJS(config, data.datasets[i].title, config.fmtLegend),Math.ceil(ctx.chartTextScale*config.legendFontSize));
7561							widestLegend = Math.max(textLength.textWidth,widestLegend);
7562							highestLegend = Math.max(Math.ceil(ctx.chartTextScale*config.legendFontSize),highestLegend);
7563						}
7564					}
7565				}
7566				widestLegend += Math.ceil(ctx.chartTextScale*config.legendBlockSize) + Math.ceil(ctx.chartSpaceScale*config.legendSpaceBetweenBoxAndText);
7567				if (nbeltLegend == 0 || (nbeltLegend == 1 && !config.showSingleLegend)) widestLegend=0;
7568			}
7569		}
7570		
7571                //// Step 6  : compute legend heights and width if legendPosY = 0 or 4 or if legendPosX = 0 or 4; 
7572
7573		var legendBorderHeight = 0;
7574		var legendBorderWidth = 0;
7575		var spaceLegendHeight = 0;
7576		
7577		var xLegendPos = 0;
7578		var yLegendPos = 0;
7579
7580		var nbLegendLines = 0;
7581		var nbLegendCols = 0;
7582               	var legendHeight = 0;
7583		var legendWidth =0;
7584		var msrLegend;
7585		if (widestLegend > -99999998) {
7586			if (config.legendPosY==0 || config.legendPosY==4) {
7587				
7588		               	var availableLegendWidth,maxLegendOnLine;
7589				if(config.legendPosX==1 || config.legendPosX==2 || config.legendPosX==3){
7590					availableLegendWidth = availableWidth - Math.ceil(ctx.chartSpaceScale*Math.ceil(ctx.chartSpaceScale*config.legendSpaceLeftText)) - Math.ceil(ctx.chartSpaceScale*config.legendSpaceRightText);
7591				} else {
7592					availableLegendWidth = width - borderRHeight - borderLHeight - Math.ceil(ctx.chartSpaceScale*config.spaceLeft) - Math.ceil(ctx.chartSpaceScale*config.spaceRight) - Math.ceil(ctx.chartSpaceScale*Math.ceil(ctx.chartSpaceScale*config.legendSpaceLeftText)) - Math.ceil(ctx.chartSpaceScale*config.legendSpaceRightText);
7593				}
7594				if (config.legendBorders == true || config.legendFillColor!="rgba(0,0,0,0)") availableLegendWidth -= (config.legendBorders*(isBorder(config.legendBordersSelection,"RIGHT")+isBorder(config.legendBordersSelection,"LEFT")) * (Math.ceil(ctx.chartLineScale*config.legendBordersWidth)) + Math.
7594ceil(ctx.chartSpaceScale*config.legendBordersSpaceLeft) + Math.ceil(ctx.chartSpaceScale*config.legendBordersSpaceRight));
7595				maxLegendOnLine = Min([Math.floor((availableLegendWidth + Math.ceil(ctx.chartSpaceScale*config.legendSpaceBetweenTextHorizontal)) / (widestLegend + Math.ceil(ctx.chartSpaceScale*config.legendSpaceBetweenTextHorizontal))),config.maxLegendCols]);
7596				nbLegendLines = Math.ceil(nbeltLegend / maxLegendOnLine);
7597				nbLegendCols = Math.ceil(nbeltLegend / nbLegendLines);
7598				msrLegend=measureLegend(data,ctx,config,widestLegend,highestLegend,nbLegendLines,nbLegendCols,availableLegendWidth);
7599				legendHeight = msrLegend.legendHeight;
7600				if (config.legendPosY==0) {
7601					yLegendPos=topNotUsableHeight-Math.ceil(ctx.chartSpaceScale*config.graphSpaceBefore);
7602					topNotUsableHeight +=legendHeight;
7603				}
7604				else {
7605					yLegendPos=height-bottomNotUsableHeight-legendHeight;
7606					bottomNotUsableHeight +=legendHeight;
7607				}
7608				availableHeight -=legendHeight;
7609			} else if (config.legendPosX==0 || config.legendPosX==4) {
7610		               	var availableLegendHeight,maxLegendOnCols;
7611				availableLegendHeight = availableHeight - Math.ceil(ctx.chartSpaceScale*Math.ceil(ctx.chartSpaceScale*config.legendSpaceBeforeText)) - Math.ceil(ctx.chartSpaceScale*config.legendSpaceAfterText);
7612				availableLegendWidth = availableWidth - Math.ceil(ctx.chartSpaceScale*Math.ceil(ctx.chartSpaceScale*config.legendSpaceLeftText)) - Math.ceil(ctx.chartSpaceScale*config.legendSpaceRightText);
7613				if (config.legendBorders == true || config.legendFillColor!="rgba(0,0,0,0)") availableLegendHeight -= (config.legendBorders*(isBorder(config.legendBordersSelection,"BOTTOM")+isBorder(config.legendBordersSelection,"TOP")) * (Math.ceil(ctx.chartLineScale*config.legendBordersWidth)) + Math.ceil(ctx.chartSpaceScale*config.legendBordersSpaceBefore) + Math.ceil(ctx.chartSpaceScale*config.legendBordersSpaceAfter));
7614				maxLegendOnCols = Min([Math.floor((availableLegendHeight + Math.ceil(ctx.chartSpaceScale*config.legendSpaceBetweenTextVertical)) / (highestLegend + Math.ceil(ctx.chartSpaceScale*config.legendSpaceBetweenTextVertical))),config.maxLegendLines]);
7615				nbLegendCols = Math.ceil(nbeltLegend / maxLegendOnCols);
7616				nbLegendLines = Math.ceil(nbeltLegend / nbLegendCols);
7617				msrLegend=measureLegend(data,ctx,config,widestLegend,highestLegend,nbLegendLines,nbLegendCols,availableLegendWidth);
7618				legendWidth=msrLegend.legendWidth;
7619				if (config.legendPosX==0) {
7620					xLegendPos=leftNotUsableWidth;
7621					leftNotUsableWidth +=legendWidth;
7622				}
7623				else {
7624					xLegendPos=width-rightNotUsableWidth-legendWidth;
7625					rightNotUsableWidth +=legendWidth;
7626				}
7627
7628				availableWidth -=legendWidth;
7629			}
7630		}
7631		
7632
7633		//// Step 7 - Compute Y Unit height and position;
7634
7635		var yAxisUnitPosY = 0;
7636		var yAxisUnitHeight = 0;
7637		var yAxisUnitWidth = 0;
7638	
7639		if (drawAxis && config.yAxisUnit.trim() != "") {
7640		
7641			yAxisUnitHeight = (Math.ceil(ctx.chartTextScale*config.yAxisUnitFontSize)) * (config.yAxisUnit.split("\n").length || 1) + Math.ceil(ctx.chartSpaceScale*config.yAxisUnitSpaceBefore) + Math.ceil(ctx.chartSpaceScale*config.yAxisUnitSpaceAfter);
7642			ctx.font = config.yAxisUnitFontStyle + " " + (Math.ceil(ctx.chartTextScale*config.yAxisUnitFontSize)).toString() + "px " + config.yAxisUnitFontFamily;
7643			var yAxisUnitSize =ctx.measureTextMultiLine(config.yAxisUnit, (Math.ceil(ctx.chartTextScale*config.yAxisUnitFontSize)));
7644			yAxisUnitWidth = yAxisUnitSize.textWidth;
7645			yAxisUnitPosY = topNotUsableHeight +  Math.ceil(ctx.chartSpaceScale*config.yAxisUnitSpaceBefore)+yAxisUnitSize.textHeight;
7646			if(config.yAxisUnitBackgroundColor !="none" || config.yAxisUnitBorders) {
7647				yAxisUnitHeight+=2*(Math.ceil(ctx.chartSpaceScale*config.yAxisUnitBordersYSpace));
7648				yAxisUnitPosY+=Math.ceil(ctx.chartSpaceScale*config.yAxisUnitBordersYSpace);
7649			}
7650			if(config.yAxisUnitBorders) {
7651				yAxisUnitHeight+=(isBorder(config.yAxisUnitBordersSelection,"TOP")+isBorder(config.yAxisUnitBordersSelection,"BOTTOM"))*(Math.ceil(ctx.chartLineScale*config.yAxisUnitBordersWidth));
7652				yAxisUnitPosY+=isBorder(config.yAxisUnitBordersSelection,"TOP")*Math.ceil(ctx.chartLineScale*config.yAxisUnitBordersWidth);
7653			}
7654			topNotUsableHeight+=yAxisUnitHeight;
7655			availableHeight -=yAxisUnitHeight;
7656		}
7657		
7658		//// Step 8 - compute Labels width;
7659
7660		var widestXLabel = 0;
7661		var highestXLabel = 1;
7662		var widestTXLabel = 0;
7663		var highestTXLabel = 1;
7664		var xAxisLabelHeight = 0;
7665		var xTAxisLabelHeight = 0;
7666		var xAxisLabelPos = 0;
7667		var xTAxisLabelPos = 0;
7668
7669		var widestYLabel = 0;
7670		var highestYLabel = 1;
7671		var widestYLabel2 = 0;
7672		var highestYLabel2 = 1;
7673		var yAxisLabelWidth = 0;
7674		var yAxisLabelPosLeft = 0;
7675		var yAxisLabelPosRight = 0;
7676
7677
7678		if (drawAxis) {
7679			var textMsr;
7680			// compute widest X label
7681			ctx.font = config.scaleFontStyle + " " + (Math.ceil(ctx.chartTextScale*config.scaleFontSize)).toString() + "px " + config.scaleFontFamily;
7682			widestXLabel=Math.max(1,Math.ceil(ctx.chartTextScale*config.xScaleLabelsMinimumWidth));
7683			widestTXLabel=widestXLabel;
7684			
7685			for (i = 0; i < data.labels.length; i++) {
7686				if(showLabels(ctx,data,config,i) === true) {
7687					textMsr = ctx.measureTextMultiLine(fmtChartJS(config, data.labels[i], config.fmtXLabel), (Math.ceil(ctx.chartTextScale*config.scaleFontSize)));
7688					//If the text length is longer - make that equal to longest text!
7689					widestXLabel = Math.max(textMsr.textWidth,widestXLabel);
7690					highestXLabel = Math.max(textMsr.textHeight,highestXLabel);
7691				} 
7692			}
7693
7694
7695
7696			if(typeof data.Labels2 == "object" && config.xAxisBottom && config.xAxisTop){
7697				ctx.font = config.scaleFontStyle + " " + (Math.ceil(ctx.chartTextScale*config.scaleFontSize)).toString() + "px " + config.scaleFontFamily;
7698				for (i = 0; i < data.Labels2.length; i++) {
7699					if(showLabels(ctx,data,config,i) === true) {
7700						textMsr = ctx.measureTextMultiLine(fmtChartJS(config, data.Labels2[i], config.fmtTopXLabel), (Math.ceil(ctx.chartTextScale*config.scaleFontSize)));
7701						//If the text length is longer - make that equal to longest text!
7702						widestTXLabel = Math.max(textMsr.textWidth,widestTXLabel);
7703						highestTXLabel = Math.max(textMsr.textHeight,highestTXLabel);
7704					} 
7705				}
7706			} else {
7707				widestTXLabel=widestXLabel;
7708				highestTXLabel=highestXLabel;
7709			}
7710
7711			// xAxisLabel height;
7712		
7713			if (typeof(config.xAxisLabel) != "undefined" && config.xAxisBottom) {
7714				if (config.xAxisLabel.trim() != "") {
7715					xAxisLabelHeight = (Math.ceil(ctx.chartTextScale*config.xAxisFontSize)) * (config.xAxisLabel.split("\n").length || 1) + Math.ceil(ctx.chartSpaceScale*config.xAxisLabelSpaceBefore) + Math.ceil(ctx.chartSpaceScale*config.xAxisLabelSpaceAfter);
7716					xAxisLabelPos = (height - bottomNotUsableHeight) - Math.ceil(ctx.chartSpaceScale*config.xAxisLabelSpaceAfter);
7717					if(config.xAxisLabelBackgroundColor !="none" || config.footNoteBorders) {
7718						xAxisLabelHeight+=2*(Math.ceil(ctx.chartSpaceScale*config.xAxisLabelBordersYSpace));
7719						xAxisLabelPos-=Math.ceil(ctx.chartSpaceScale*config.xAxisLabelBordersYSpace);
7720					}
7721					if(config.xAxisLabelBorders) { 
7722						xAxisLabelHeight+=(isBorder(config.xAxisLabelBordersSelection,"TOP")+isBorder(config.xAxisLabelBordersSelection,"BOTTOM"))*(Math.ceil(ctx.chartLineScale*config.xAxisLabelBordersWidth));
7723						xAxisLabelPos-=isBorder(config.xAxisLabelBordersSelection,"BOTTOM")*Math.ceil(ctx.chartLineScale*config.xAxisLabelBordersWidth);
7724					}
7725				}
7726			}
7727			var tLabelT;
7728			tLabelT=config.xAxisLabel;
7729			
7730			if (typeof(config.xTAxisLabel) != "undefined" && config.xAxisTop) {
7731				if (config.xTAxisLabel.trim() != "") tLabelT=config.xTAxisLabel;
7732			}
7733			
7734			if (typeof(tLabelT) != "undefined" && config.xAxisTop) {
7735				if (tLabelT.trim() != "") {
7736					xTAxisLabelHeight = (Math.ceil(ctx.chartTextScale*config.xAxisFontSize)) * (tLabelT.split("\n").length || 1) + Math.
7736ceil(ctx.chartSpaceScale*config.xAxisLabelSpaceBefore) + Math.ceil(ctx.chartSpaceScale*config.xAxisLabelSpaceAfter);
7737					xTAxisLabelPos = topNotUsableHeight + Math.ceil(ctx.chartSpaceScale*config.xAxisLabelSpaceBefore);
7738					if(config.xAxisLabelBackgroundColor !="none") {
7739						xTAxisLabelHeight+=2*(Math.ceil(ctx.chartSpaceScale*config.xAxisLabelBordersYSpace));
7740						xTAxisLabelPos+=Math.ceil(ctx.chartSpaceScale*config.xAxisLabelBordersYSpace);
7741					}
7742					if(config.xAxisLabelBorders) { 
7743						xTAxisLabelHeight+=(isBorder(config.xAxisLabelBordersSelection,"TOP")+isBorder(config.xAxisLabelBordersSelection,"BOTTOM"))*(Math.ceil(ctx.chartLineScale*config.xAxisLabelBordersWidth));
7744						xTAxisLabelPos+=isBorder(config.xAxisLabelBordersSelection,"TOP")*Math.ceil(ctx.chartLineScale*config.xAxisLabelBordersWidth);
7745					}
7746
7747				}
7748			} 
7749			// compute widest Y Label Width
7750
7751			widestYLabel = Math.max(1,Math.ceil(ctx.chartTextScale*config.yScaleLabelsMinimumWidth));
7752			widestYLabel2=widestYLabel;
7753
7754			if (ylabels != null && ylabels != "nihil") {
7755				ctx.font = config.scaleFontStyle + " " + (Math.ceil(ctx.chartTextScale*config.scaleFontSize)).toString() + "px " + config.scaleFontFamily;
7756				for (i = ylabels.length - 1; i >= 0; i--) {
7757					if (typeof(ylabels[i]) == "string") {
7758						if(showYLabels(ctx,data,config,i,ylabels[i])) {
7759							if (ylabels[i].trim() != "") {
7760//								textMsr = ctx.measureTextMultiLine(fmtChartJS(config, ylabels[i], config.fmtYLabel), (Math.ceil(ctx.chartTextScale*config.scaleFontSize)));
7761								textMsr = ctx.measureTextMultiLine(ylabels[i], (Math.ceil(ctx.chartTextScale*config.scaleFontSize)));
7762								widestYLabel = Math.max(widestYLabel,textMsr.textWidth);
7763								highestYLabel = Math.max(highestYLabel,textMsr.textHeight);
7764
7765							}
7766						}
7767					}
7768				}
7769			}
7770			if (ylabels2 != null && config.yAxisRight) {
7771				ctx.font = config.scaleFontStyle + " " + (Math.ceil(ctx.chartTextScale*config.scaleFontSize)).toString() + "px " + config.scaleFontFamily;
7772				for (i = ylabels2.length - 1; i >= 0; i--) {
7773					if (typeof(ylabels2[i]) == "string") {
7774						if (showYLabels(ctx,data,config,i,ylabels2[i])) {
7775//							textMsr = ctx.measureTextMultiLine(fmtChartJS(config, ylabels2[i], config.fmtYLabel2), (Math.ceil(ctx.chartTextScale*config.scaleFontSize)));
7776							textMsr = ctx.measureTextMultiLine(ylabels2[i], (Math.ceil(ctx.chartTextScale*config.scaleFontSize)));
7777							widestYLabel2 = Math.max(textMsr.textWidth,widestYLabel2);
7778							highestYLabel2 = Math.max(textMsr.textHeight,highestYLabel2);
7779						}
7780					}
7781				}
7782			} else  {
7783				widestYLabel2 = widestYLabel;
7784				highestYLabel2 = highestYLabel;
7785			}
7786
7787			// yAxisLabel width;
7788
7789			if (typeof(config.yAxisLabel) != "undefined" && (config.yAxisRight || config.yAxisLeft)) {
7790				if (config.yAxisLabel.trim() != "") {
7791					yAxisLabelWidth = (Math.ceil(ctx.chartTextScale*config.yAxisFontSize)) * (config.yAxisLabel.split("\n").length || 1) + Math.ceil(ctx.chartSpaceScale*config.yAxisLabelSpaceLeft) + Math.ceil(ctx.chartSpaceScale*config.yAxisLabelSpaceRight);
7792					yAxisLabelPosLeft = leftNotUsableWidth + Math.ceil(ctx.chartSpaceScale*config.yAxisLabelSpaceLeft) + (Math.ceil(ctx.chartTextScale*config.yAxisFontSize));
7793					yAxisLabelPosRight = (width - rightNotUsableWidth) - Math.ceil(ctx.chartSpaceScale*config.yAxisLabelSpaceLeft) - (Math.ceil(ctx.chartTextScale*config.yAxisFontSize));
7794					if(config.yAxisLabelBackgroundColor !="none" || config.yAxisLabelBorders) {
7795						yAxisLabelWidth+=2*(Math.ceil(ctx.chartSpaceScale*config.yAxisLabelBordersYSpace));
7796						yAxisLabelPosLeft+=Math.ceil(ctx.chartSpaceScale*config.yAxisLabelBordersYSpace);
7797						yAxisLabelPosRight-=Math.ceil(ctx.chartSpaceScale*config.yAxisLabelBordersYSpace);
7798					}
7799					if(config.yAxisLabelBorders) {
7800						yAxisLabelWidth+=(isBorder(config.yAxisLabelBordersSelection,"TOP")+isBorder(config.yAxisLabelBordersSelection,"BOTTOM"))*(Math.ceil(ctx.chartLineScale*config.yAxisLabelBordersWidth));
7801						yAxisLabelPosLeft+=isBorder(config.yAxisLabelBordersSelection,"TOP")*Math.ceil(ctx.chartLineScale*config.yAxisLabelBordersWidth);
7802						yAxisLabelPosRight-=isBorder(config.yAxisLabelBordersSelection,"TOP")*Math.ceil(ctx.chartLineScale*config.yAxisLabelBordersWidth);
7803					}
7804				}
7805			}
7806		}
7807		
7808		//// Step 9 - Compute x Label rotation;
7809
7810
7811		var rotateLabels = 0;
7812		var rotateTLabels = 0;
7813
7814		var xLabelWidth = 0;
7815		var xTLabelWidth = 0;
7816
7817		var xLabelHeight = 0;
7818		var xTLabelHeight = 0;
7819
7820		var xLabelPos = 0;
7821		var xTLabelPos = 0;
7822
7823		var widestLabel,highestLabel,nblab,labelAvailableWidth;
7824				
7825		if (drawAxis && config.xAxisBottom) {
7826			labelAvailableWidth=availableWidth;
7827			if (reverseAxis == false) {
7828				widestLabel = widestXLabel;
7829				highestLabel = highestXLabel;
7830				nblab = data.labels.length;
7831				if(config.yAxisLeft == true)labelAvailableWidth-=(widestYLabel+Math.ceil(ctx.chartSpaceScale*config.yAxisSpaceLeft)+Math.ceil(ctx.chartSpaceScale*config.yAxisSpaceRight));
7832				if(config.yAxisRight == true)labelAvailableWidth-=(widestYLabel2+Math.ceil(ctx.chartSpaceScale*config.yAxisSpaceLeft)+Math.ceil(ctx.chartSpaceScale*config.yAxisSpaceRight));
7833			} else {
7834				widestLabel = widestYLabel;
7835				highestLabel = highestYLabel;
7836				nblab = ylabels.length;
7837				if(config.yAxisLeft == true)labelAvailableWidth-=(widestXLabel+Math.ceil(ctx.chartSpaceScale*config.yAxisSpaceLeft)+Math.ceil(ctx.chartSpaceScale*config.yAxisSpaceRight));
7838				if(config.yAxisRight == true)labelAvailableWidth-=(widestTXLabel+Math.ceil(ctx.chartSpaceScale*config.yAxisSpaceLeft)+Math.ceil(ctx.chartSpaceScale*config.yAxisSpaceRight));
7839			}
7840			if (typeof(config.yAxisLabel) != "undefined") {
7841				if (config.yAxisLabel.trim() != "") {
7842					if(config.yAxisRight) labelAvailableWidth -=yAxisLabelWidth ;
7843					if(config.yAxisLeft) labelAvailableWidth -=yAxisLabelWidth ;
7844				}
7845			}
7846			if (config.rotateLabels == "smart") {
7847				rotateLabels = 0;
7848				if ((labelAvailableWidth + Math.ceil(ctx.chartTextScale*config.xAxisSpaceBetweenLabels)) / nblab < (widestLabel + Math.ceil(ctx.chartTextScale*config.xAxisSpaceBetweenLabels))) {
7849					rotateLabels = 45;
7850					if (labelAvailableWidth / nblab < Math.abs(Math.cos(rotateLabels * Math.PI / 180) * widestLabel)) {
7851						rotateLabels = 90;
7852					}
7853				}
7854			} else {
7855				rotateLabels = config.rotateLabels;
7856				if (rotateLabels < 0) rotateLabels = 0;
7857				if (rotateLabels > 180) rotateLabels = 180;
7858			}
7859			if (rotateLabels > 90) rotateLabels += 180;
7860
7861			xLabelHeight = Math.abs(Math.sin(rotateLabels * Math.PI / 180) * widestLabel) + Math.abs(Math.sin((rotateLabels + 90) * Math.PI / 180) * highestLabel);
7862			xLabelWidth = Math.abs(Math.cos(rotateLabels * Math.PI / 180) * widestLabel) + Math.abs(Math.cos((rotateLabels + 90) * Math.PI / 180) * highestLabel);
7863			xLabelPos = height - bottomNotUsableHeight - xAxisLabelHeight - xLabelHeight - Math.ceil(ctx.chartSpaceScale*config.xAxisSpaceAfter);
7864
7865		}
7866
7867
7868
7869		if (drawAxis && config.xAxisTop) {
7870			labelAvailableWidth=availableWidth;
7871			if (reverseAxis == false) {
7872				widestLabel = widestTXLabel;
7873				highestLabel = highestTXLabel;
7874				nblab = data.labels.length;
7875				if(config.yAxisLeft == true)labelAvailableWidth-=(widestYLabel+Math.ceil(ctx.chartSpaceScale*config.yAxisSpaceLeft)+Math.ceil(ctx.chartSpaceScale*config.yAxisSpaceRight));
7876				if(config.yAxisRight == true)labelAvailableWidth-=(widestYLabel2+Math.ceil(ctx.chartSpaceScale*config.yAxisSpaceLeft)+Math.ceil(ctx.chartSpaceScale*config.yAxisSpaceRight));
7877			} else {
7878				widestLabel = widestYLabel2;
7879				highestLabel = highestYLabel2;
7880				nblab = ylabels2.length;
7881				if(config.yAxisLeft == true)labelAvailableWidth-=(widestXLabel+Math.ceil(ctx.chartSpaceScale*config.yAxisSpaceLeft)+Math.ceil(ctx.chartSpaceScale*config.yAxisSpaceRight));
7882				if(config.yAxisRight == true)labelAvailableWidth-=(widestTXLabel+Math.ceil(ctx.chartSpaceScale*config.yAxisSpaceLeft)+Math.ceil(ctx.chartSpaceScale*config.yAxisSpaceRight));
7883			}
7884			if (typeof(config.yAxisLabel) != "undefined") {
7885				if (config.yAxisLabel.trim() != "") {
7886					if(config.yAxisRight) labelAvailableWidth -=yAxisLabelWidth ;
7887					if(config.yAxisLeft) labelAvailableWidth -=yAxisLabelWidth ;
7888				}
7889			}
7890			if (config.rotateTLabels == "smart") {
7891				rotateTLabels = 0;
7892				if ((labelAvailableWidth + Math.ceil(ctx.chartTextScale*config.xAxisSpaceBetweenLabels)) / nblab < (widestLabel + Math.ceil(ctx.chartTextScale*config.xAxisSpaceBetweenLabels))) {
7893					rotateTLabels = 45;
7894					if (labelAvailableWidth / nblab < Math.abs(Math.cos(rotateTLabels * Math.PI / 180) * widestLabel)) {
7895						rotateTLabels = 90;
7896					}
7897				}
7898			} else {
7899				rotateTLabels = config.rotateTLabels;
7900				if (rotateTLabels < 0) rotateTLabels = 0;
7901				if (rotateTLabels > 180) rotateTLabels = 180;
7902			}
7903			if (rotateLabels > 90) rotateLabels += 180;
7904
7905			xTLabelHeight = Math.abs(Math.sin(rotateTLabels * Math.PI / 180) * widestLabel) + Math.abs(Math.sin((rotateTLabels + 90) * Math.PI / 180) * highestLabel);
7906			xTLabelWidth = Math.abs(Math.cos(rotateTLabels * Math.PI / 180) * widestLabel) + Math.abs(Math.cos((rotateTLabels + 90) * Math.PI / 180) * highestLabel);
7907
7908			xTLabelPos = topNotUsableHeight + xTAxisLabelHeight + Math.ceil(ctx.chartSpaceScale*config.xAxisSpaceBefore) ;
7909
7910		}
7911
7912		// recompute availableWidth/Height with axis label width/height and label width/height;
7913
7914		var prevLeftNotUsableWidth=leftNotUsableWidth;
7915		var prevRightNotUsableWidth=rightNotUsableWidth;
7916		
7917		if (drawAxis && config.yAxisLeft) {                                          	
7918			if (reverseAxis == false) leftNotUsableWidth += yAxisLabelWidth + widestYLabel + Math.ceil(ctx.chartSpaceScale*config.yAxisSpaceLeft) + Math.
7918ceil(ctx.chartSpaceScale*config.yAxisSpaceRight);
7919			else                      leftNotUsableWidth += yAxisLabelWidth + widestXLabel + Math.ceil(ctx.chartSpaceScale*config.yAxisSpaceLeft) + Math.ceil(ctx.chartSpaceScale*config.yAxisSpaceRight);
7920		}
7921		if (drawAxis && config.yAxisRight) {
7922			if (reverseAxis == false) rightNotUsableWidth += yAxisLabelWidth + widestYLabel2 + Math.ceil(ctx.chartSpaceScale*config.yAxisSpaceLeft) + Math.ceil(ctx.chartSpaceScale*config.yAxisSpaceRight);
7923			else                      rightNotUsableWidth += yAxisLabelWidth + widestTXLabel + Math.ceil(ctx.chartSpaceScale*config.yAxisSpaceLeft) + Math.ceil(ctx.chartSpaceScale*config.yAxisSpaceRight);
7924		}
7925		availableWidth = width - leftNotUsableWidth - rightNotUsableWidth;
7926
7927		if(drawAxis && config.xAxisTop) {
7928			if (reverseAxis == false) topNotUsableHeight += xTAxisLabelHeight + xTLabelHeight + Math.ceil(ctx.chartSpaceScale*config.xAxisSpaceBefore) + Math.ceil(ctx.chartSpaceScale*config.xAxisSpaceAfter);
7929			else {
7930				var yTLabelHeight = Math.abs(Math.sin(rotateTLabels * Math.PI / 180) * widestYLabel2) + Math.abs(Math.sin((rotateTLabels + 90) * Math.PI / 180) * highestYLabel2);
7931				topNotUsableHeight += xAxisLabelHeight + yTLabelHeight + Math.ceil(ctx.chartSpaceScale*config.xAxisSpaceBefore) + Math.ceil(ctx.chartSpaceScale*config.xAxisSpaceAfter);
7932			}
7933		}
7934		if(drawAxis && config.xAxisBottom) {
7935			if (reverseAxis == false) bottomNotUsableHeight += xAxisLabelHeight + xLabelHeight + Math.ceil(ctx.chartSpaceScale*config.xAxisSpaceBefore) + Math.ceil(ctx.chartSpaceScale*config.xAxisSpaceAfter);
7936			else {
7937				var yTLabelHeight = Math.abs(Math.sin(rotateLabels * Math.PI / 180) * widestYLabel) + Math.abs(Math.sin((rotateLabels + 90) * Math.PI / 180) * highestYLabel);
7938				bottomNotUsableHeight += xAxisLabelHeight + yTLabelHeight + Math.ceil(ctx.chartSpaceScale*config.xAxisSpaceBefore) + Math.ceil(ctx.chartSpaceScale*config.xAxisSpaceAfter);
7939			}
7940
7941		}
7942
7943
7944                availableHeight=height-topNotUsableHeight-bottomNotUsableHeight;	
7945		// compute space for Legend
7946
7947		if (widestLegend > -99999998 ) {
7948			if(nbLegendLines==0) {  // compute nbLegendLines/nbLegendCols if not yet done;
7949				availableLegendWidth = availableWidth - Math.ceil(ctx.chartSpaceScale*Math.ceil(ctx.chartSpaceScale*config.legendSpaceLeftText)) - Math.ceil(ctx.chartSpaceScale*config.legendSpaceRightText);
7950				maxLegendOnLine = Min([Math.floor((availableLegendWidth + Math.ceil(ctx.chartSpaceScale*config.legendSpaceBetweenTextHorizontal)) / (widestLegend + Math.ceil(ctx.chartSpaceScale*config.legendSpaceBetweenTextHorizontal))),config.maxLegendCols]);
7951				nbLegendLines = Math.ceil(nbeltLegend / maxLegendOnLine);
7952				nbLegendCols = Math.ceil(nbeltLegend / nbLegendLines);
7953				msrLegend=measureLegend(data,ctx,config,widestLegend,highestLegend,nbLegendLines,nbLegendCols,availableLegendWidth);
7954			}	
7955			legendHeight = msrLegend.legendHeight;
7956			legendWidth = msrLegend.legendWidth;
7957
7958			switch (config.legendPosY) {
7959				case 0: // already computed;
7960					break;
7961				case 1:
7962					yLegendPos=topNotUsableHeight;
7963					break;
7964				case 2:
7965					yLegendPos=topNotUsableHeight+(availableHeight/2)-legendHeight/2;
7966					break;
7967				case -2:
7968					yLegendPos=height/2-legendHeight/2;
7969					break;
7970				case 3:
7971					yLegendPos=height-bottomNotUsableHeight-legendHeight;
7972					break;
7973				case 4 : // already Computed;
7974					break;
7975				default:
7976					yLegendPos=topNotUsableHeight;
7977					break;
7978			}		
7979				
7980			switch (config.legendPosX) {
7981				case 0:
7982					if(config.legendPosY==0 || config.legendPosY==4) xLegendPos=prevLeftNotUsableWidth;
7983					break;
7984				case 1:
7985					xLegendPos=leftNotUsableWidth;
7986					break;
7987				case 2:
7988					xLegendPos=leftNotUsableWidth+(availableWidth)/2-legendWidth/2;
7989					break;
7990				case -2:
7991					xLegendPos=width/2-(legendWidth/2);
7992					break;
7993				case 3:
7994					xLegendPos=width-rightNotUsableWidth-legendWidth;
7995					break;
7996				case 4:
7997					if(config.legendPosY==0 || config.legendPosY==4) xLegendPos=width - prevRightNotUsableWidth-legendWidth;
7998					break;
7999				default : 
8000					xLegendPos=width-rightNotUsableWidth;
8001					break;
8002			}
8003			
8004		}
8005		
8006		// correct space;
8007		
8008		if(typegraph=="Line" || typegraph=="HorizontalBar" || typegraph=="HorizontalStackedBar") {
8009			if(config.inGraphDataShow){
8010				rightNotUsableWidth =Math.max(rightNotUsableWidth, Math.max(widestYLabel,widestYLabel2)+1+borderRHeight);
8011				leftNotUsableWidth =Math.max(leftNotUsableWidth, Math.max(widestYLabel,widestYLabel2)+1+borderLHeight);
8012			}
8013			if(config.xAxisTop || config.xAxisBottom) {
8014				rightNotUsableWidth =Math.max(rightNotUsableWidth, Math.max(widestXLabel/2,widestTXLabel/2)+1+borderRHeight);
8015				leftNotUsableWidth =Math.max(leftNotUsableWidth, Math.max(widestXLabel/2,widestTXLabel/2)+1+borderLHeight);
8016			}
8017			availableWidth=width-rightNotUsableWidth-leftNotUsableWidth;
8018		}
8019		if(drawAxis && config.yAxisLeft && (config.yAxisUnitBorders || config.yAxisUnitBackgroun
8019dColor !="none")) {
8020			if(config.yAxisLeft) leftNotUsableWidth=Math.max(leftNotUsableWidth,borderLHeight+config.spaceLeft+(config.yAxisUnitBorders && isBorder(config.yAxisUnitBordersSelection,"LEFT"))*(config.yAxisUnitBordersWidth)+(config.yAxisUnitBackgroundColor !="none" || config.yAxisUnitBorders)*Math.ceil(ctx.chartSpaceScale*config.yAxisUnitBordersYSpace)+1+yAxisUnitWidth/2);	
8021			if(config.yAxisRight) rightNotUsableWidth=Math.max(rightNotUsableWidth,borderRHeight+config.spaceRight+(config.yAxisUnitBorders && isBorder(config.yAxisUnitBordersSelection,"RIGHT"))*(config.yAxisUnitBordersWidth)+(config.yAxisUnitBackgroundColor !="none" || config.yAxisUnitBorders)*Math.ceil(ctx.chartSpaceScale*config.yAxisUnitBordersYSpace)+1+yAxisUnitWidth/2);	
8022			availableWidth=width-rightNotUsableWidth-leftNotUsableWidth;
8023		}
8024
8025		if(typegraph=="Line" || typegraph=="Bar" || typegraph=="StackedBar") {
8026			if(config.inGraphDataShow){
8027				topNotUsableHeight=Math.max(topNotUsableHeight,Math.max(highestYLabel,highestYLabel2)+1+borderTHeight);
8028			}
8029			availableHeight=height-topNotUsableHeight-bottomNotUsableHeight;
8030		}
8031
8032    
8033		// ----------------------- DRAW EXTERNAL ELEMENTS -------------------------------------------------
8034		dispCrossImage(ctx, config, width / 2, height / 2, width / 2, height / 2, false, data, -1, -1);
8035
8036		if(typeof config.initFunction == "function") config.initFunction("INITFUNCTION",ctx,data,null,-1,-1,{animationValue : 0, cntiter: 0, config : config, borderX : 0, borderY : 0, midPosX : 0, midPosY : 0});
8037
8038 		
8039		 if (ylabels != "nihil") {
8040			// Draw Borders
8041			if (borderHeight > 0) {
8042				ctx.save();
8043				ctx.beginPath();
8044				ctx.setLineDash(lineStyleFn(config.canvasBordersStyle));
8045				ctx.strokeStyle = config.canvasBordersColor;
8046				ctx.lineWidth = borderHeight;
8047				ctx.setLineDash(lineStyleFn(config.canvasBordersStyle));
8048				ctx.strokeStyle = config.canvasBordersColor;
8049				ctx.fillStyle= "rgba(0,0,0,0)";
8050				ctx.drawRectangle({x:0+borderLHeight/2,y:0+borderTHeight/2,width:width-borderRHeight/2-borderLHeight/2,height:height-borderTHeight/2-borderBHeight/2,borders:true,bordersWidth:borderHeight,borderSelection:config.canvasBordersSelection,borderRadius:config.canvasBordersRadius,fill:false,stroke:true});
8051				ctx.setLineDash([]);
8052				ctx.restore();
8053			}
8054
8055			// Draw Graph Title
8056			if (graphTitleHeight > 0) {
8057				ctx.save();
8058				ctx.beginPath();
8059				ctx.font = config.graphTitleFontStyle + " " + (Math.ceil(ctx.chartTextScale*config.graphTitleFontSize)).toString() + "px " + config.graphTitleFontFamily;
8060				ctx.fillStyle = config.graphTitleFontColor;
8061				ctx.textBaseline = "top";
8062        var textPos;
8063        switch (config.graphTitleAlign) {
8064          case "right" : 
8065  				  ctx.textAlign = "right";
8066            textPos=Math.ceil(ctx.chartSpaceScale*config.spaceLeft) + (width - Math.ceil(ctx.chartSpaceScale*config.spaceLeft) - Math.ceil(ctx.chartSpaceScale*config.spaceRight)) / 2;
8067            textPos=width-Math.ceil(ctx.chartSpaceScale*(config.spaceRight+config.graphTitleShift))-borderRHeight;
8068
8069            break; 
8070          case "left" :
8071            ctx.textAlign="left";
8072            textPos=borderLHeight+Math.ceil(ctx.chartSpaceScale*(config.spaceLeft+config.graphTitleShift));
8073            break;
8074          default: 
8075  				  ctx.textAlign = "center";
8076            textPos=borderLHeight+Math.ceil(ctx.chartSpaceScale*config.spaceLeft) + (width - borderRHeight - borderLHeight - Math.ceil(ctx.chartSpaceScale*config.spaceLeft) - Math.ceil(ctx.chartSpaceScale*config.spaceRight)) / 2;
8077            break;
8078        }
8079        
8080				setTextBordersAndBackground(ctx,config.graphTitle,(Math.ceil(ctx.chartTextScale*config.graphTitleFontSize)),textPos,graphTitlePosY,config.graphTitleBorders,config.graphTitleBordersSelection,config.graphTitleBordersColor,Math.ceil(ctx.chartLineScale*config.graphTitleBordersWidth),Math.ceil(ctx.chartSpaceScale*config.graphTitleBordersXSpace),Math.ceil(ctx.chartSpaceScale*config.graphTitleBordersYSpace),config.graphTitleBordersStyle,config.graphTitleBackgroundColor,"GRAPHTITLE",config.graphTitleBordersRadius);
8081				ctx.translate(textPos, graphTitlePosY);
8082				ctx.fillTextMultiLine(config.graphTitle, 0, 0, ctx.textBaseline, (Math.ceil(ctx.chartTextScale*config.graphTitleFontSize)),true,config.detectMouseOnText,ctx,"TITLE_TEXTMOUSE",0,textPos, graphTitlePosY,-1,-1);
8083				ctx.stroke();
8084				ctx.restore();
8085			}
8086			// Draw Graph Sub-Title
8087			if (graphSubTitleHeight > 0) {
8088				ctx.save();
8089				ctx.beginPath();
8090				ctx.font = config.graphSubTitleFontStyle + " " + (Math.ceil(ctx.chartTextScale*config.graphSubTitleFontSize)).toString() + "px " + config.graphSubTitleFontFamily;
8091				ctx.fillStyle = config.graphSubTitleFontColor;
8092        switch (config.graphSubTitleAlign) {
8093          case "right" : 
8094  				  ctx.textAlign = "right";
8095            textPos=width-Math.ceil(ctx.chartSpaceScale*(config.spaceRight+config.graphSubTitleShift))-borderRHeight;
8096            break; 
8097          case "left" :
8098            ctx.textAlign="left";
8099            textPos=borderLHeight+Math.ceil(ctx.chartSpaceScale*(config.spaceLeft+config.graphSubTitleShift));
8100            break;
8101          default: 
8102  				  ctx.textAlign = "center";
8103            textPos=borderLHeight+Math.ceil(ctx.chartSpaceScale*config.spaceLeft) + (width - borderRHeight - borderLHeight - Math.ceil(ctx.chartSpaceScale*config.spaceLeft) - Math.ceil(ctx.chartSpaceScale*config.spaceRight)) / 2;
8104            break;
8105        }
8106				ctx.textBaseline = "top";
8107				setTextBordersAndBackground(ctx,config.graphSubTitle,(Math.ceil(ctx.chartTextScale*config.graphSubTitleFontSize)),textPos,graphSubTitlePosY,config.graphSubTitleBorders,config.graphSubTitleBordersSelection,config.graphSubTitleBordersColor,Math.ceil(ctx.chartLineScale*config.graphSubTitleBordersWidth),Math.ceil(ctx.chartSpaceScale*config.graphSubTitleBordersXSpace),Math.ceil(ctx.chartSpaceScale*config.graphSubTitleBordersYSpace),config.graphSubTitleBordersStyle,config.graphSubTitleBackgroundColor,"GRAPHSUBTITLE",config.graphSubTitleBordersRadius);
8108				ctx.translate(textPos, graphSubTitlePosY);
8109				ctx.fillTextMultiLine(config.graphSubTitle, 0, 0, ctx.textBaseline, (Math.ceil(ctx.chartTextScale*config.graphSubTitleFontSize)),true,config.detectMouseOnText,ctx,"SUBTITLE_TEXTMOUSE",0,textPos, graphSubTitlePosY,-1,-1);
8110				ctx.stroke();
8111				ctx.restore();
8112			}
8113
8114			// Draw FootNote
8115			if (config.footNote.trim() != "") {
8116				ctx.save();
8117				ctx.font = config.footNoteFontStyle + " " + (Math.ceil(ctx.chartTextScale*config.footNoteFontSize)).toString() + "px " + config.footNoteFontFamily;
8118				ctx.fillStyle = config.footNoteFontColor;
8119        switch (config.footNoteAlign) {
8120          case "right" : 
8121  				  ctx.textAlign = "right";
8122            textPos=width-Math.ceil(ctx.chartSpaceScale*(config.spaceRight+config.footNoteShift))-borderRHeight;
8123            break; 
8124          case "left" :
8125            ctx.textAlign="left";
8126            textPos=borderLHeight+Math.ceil(ctx.chartSpaceScale*(config.spaceLeft+config.footNoteShift));
8127            break;
8128          default: 
8129  				  ctx.textAlign = "center";
8130            textPos=leftNotUsableWidth + (availableWidth / 2);
8131            break;
8132        }
8133				ctx.textBaseline = "bottom";
8134				setTextBordersAndBackground(ctx,config.footNote,(Math.ceil(ctx.chartTextScale*config.footNoteFontSize)),textPos,footNotePosY,config.footNoteBorders,config.footNoteBordersSelection,config.footNoteBordersColor,Math.ceil(ctx.chartLineScale*config.footNoteBordersWidth),Math.ceil(ctx.chartSpaceScale*config.footNoteBordersXSpace),Math.ceil(ctx.chartSpaceScale*config.footNoteBordersYSpace),config.footNoteBordersStyle,config.footNoteBackgroun
8134dColor,"FOOTNOTE",config.footNoteBordersRadius);
8135				ctx.translate(textPos, footNotePosY);
8136				ctx.fillTextMultiLine(config.footNote, 0, 0, ctx.textBaseline, (Math.ceil(ctx.chartTextScale*config.footNoteFontSize)),true,config.detectMouseOnText,ctx,"FOOTNOTE_TEXTMOUSE",0,textPos, footNotePosY,-1,-1);
8137				ctx.stroke();
8138				ctx.restore();
8139			}
8140
8141
8142			// Draw Y Axis Unit
8143			if (yAxisUnitHeight > 0) {
8144				if (config.yAxisLeft) {
8145					ctx.save();
8146					ctx.beginPath();
8147					ctx.font = config.yAxisUnitFontStyle + " " + (Math.ceil(ctx.chartTextScale*config.yAxisUnitFontSize)).toString() + "px " + config.yAxisUnitFontFamily;
8148					ctx.fillStyle = config.yAxisUnitFontColor;
8149					ctx.textAlign = "center";
8150					ctx.textBaseline = "bottom";
8151					setTextBordersAndBackground(ctx,config.yAxisUnit,(Math.ceil(ctx.chartTextScale*config.yAxisUnitFontSize)),leftNotUsableWidth, yAxisUnitPosY,config.yAxisUnitBorders,config.yAxisUnitBordersSelection,config.yAxisUnitBordersColor,Math.ceil(ctx.chartLineScale*config.yAxisUnitBordersWidth),Math.ceil(ctx.chartSpaceScale*config.yAxisUnitBordersXSpace),Math.ceil(ctx.chartSpaceScale*config.yAxisUnitBordersYSpace),config.yAxisUnitBordersStyle,config.yAxisUnitBackgroun
8151dColor,"YAXISUNIT",config.yAxisUnitBordersRadius);
8152					ctx.translate(leftNotUsableWidth, yAxisUnitPosY);
8153					ctx.fillTextMultiLine(config.yAxisUnit, 0, 0, ctx.textBaseline, (Math.ceil(ctx.chartTextScale*config.yAxisUnitFontSize)),true,config.detectMouseOnText,ctx,"YLEFTAXISUNIT_TEXTMOUSE",0,leftNotUsableWidth, yAxisUnitPosY,-1,-1);
8154					ctx.stroke();
8155					ctx.restore();
8156				}
8157				if (config.yAxisRight) {
8158					if (config.yAxisUnit2 == '') config.yAxisUnit2 = config.yAxisUnit;
8159					ctx.save();
8160					ctx.beginPath();
8161					ctx.font = config.yAxisUnitFontStyle + " " + (Math.ceil(ctx.chartTextScale*config.yAxisUnitFontSize)).toString() + "px " + config.yAxisUnitFontFamily;
8162					ctx.fillStyle = config.yAxisUnitFontColor;
8163					ctx.textAlign = "center";
8164					ctx.textBaseline = "bottom";
8165					setTextBordersAndBackground(ctx,config.yAxisUnit2,(Math.ceil(ctx.chartTextScale*config.yAxisUnitFontSize)),width - rightNotUsableWidth, yAxisUnitPosY,config.yAxisUnitBorders,config.yAxisUnitBordersSelection,config.yAxisUnitBordersColor,Math.ceil(ctx.chartLineScale*config.yAxisUnitBordersWidth),Math.ceil(ctx.chartSpaceScale*config.yAxisUnitBordersXSpace),Math.ceil(ctx.chartSpaceScale*config.yAxisUnitBordersYSpace),config.yAxisUnitBordersStyle,config.yAxisUnitBackgroun
8165dColor,"YAXISUNIT",config.yAxisUnitBordersRadius);
8166					ctx.translate(width - rightNotUsableWidth, yAxisUnitPosY);
8167					ctx.fillTextMultiLine(config.yAxisUnit2, 0, 0, ctx.textBaseline, (Math.ceil(ctx.chartTextScale*config.yAxisUnitFontSize)),true,config.detectMouseOnText,ctx,"YRIGHTAXISUNIT_TEXTMOUSE",0,width - rightNotUsableWidth, yAxisUnitPosY,-1,-1);
8168					ctx.stroke();
8169					ctx.restore();
8170				}
8171			}
8172
8173			// Draw Y Axis Label
8174			if (yAxisLabelWidth > 0) {
8175				if (config.yAxisLeft) {
8176					ctx.save();
8177					ctx.beginPath();
8178					ctx.font = config.yAxisFontStyle + " " + (Math.ceil(ctx.chartTextScale*config.yAxisFontSize)).toString() + "px " + config.yAxisFontFamily;
8179					ctx.fillStyle = config.yAxisFontColor;
8180					ctx.textAlign = "center";
8181					ctx.textBaseline = "bottom";
8182					ctx.translate(yAxisLabelPosLeft, topNotUsableHeight + (availableHeight / 2));
8183					ctx.rotate(-(90 * (Math.PI / 180)));
8184					setTextBordersAndBackground(ctx,config.yAxisLabel,(Math.ceil(ctx.chartTextScale*config.yAxisFontSize)), 0,0, config.yAxisLabelBorders,config.yAxisLabelBordersSelection,config.yAxisLabelBordersColor,Math.ceil(ctx.chartLineScale*config.yAxisLabelBordersWidth),Math.ceil(ctx.chartSpaceScale*config.yAxisLabelBordersXSpace),Math.ceil(ctx.chartSpaceScale*config.yAxisLabelBordersYSpace),config.yAxisLabelBordersStyle,config.yAxisLabelBackgroundColor,"YAXISLABELLEFT",config.yAxisLabelBordersRadius);
8185					ctx.fillTextMultiLine(config.yAxisLabel, 0, 0, ctx.textBaseline, (Math.ceil(ctx.chartTextScale*config.yAxisFontSize)),false,config.detectMouseOnText,ctx,"YLEFTAXISLABEL_TEXTMOUSE",-(90 * (Math.PI / 180)),yAxisLabelPosLeft, topNotUsableHeight + (availableHeight / 2),-1,-1);
8186					ctx.stroke();
8187					ctx.restore();
8188				}
8189				if (config.yAxisRight) {
8190					var yAxisLabel2=config.yAxisLabel2;
8191					if (yAxisLabel2 == '') yAxisLabel2 = config.yAxisLabel;
8192					ctx.save();
8193					ctx.beginPath();
8194					ctx.font = config.yAxisFontStyle + " " + (Math.ceil(ctx.chartTextScale*config.yAxisFontSize)).toString() + "px " + config.yAxisFontFamily;
8195					ctx.fillStyle = config.yAxisFontColor;
8196					ctx.textAlign = "center";
8197					ctx.textBaseline = "bottom";
8198					ctx.translate(yAxisLabelPosRight, topNotUsableHeight + (availableHeight / 2));
8199					ctx.rotate(+(90 * (Math.PI / 180)));
8200					setTextBordersAndBackground(ctx,yAxisLabel2,(Math.ceil(ctx.chartTextScale*config.yAxisFontSize)), 0,0, config.yAxisLabelBorders,config.yAxisLabelBordersSelection,config.yAxisLabelBordersColor,Math.ceil(ctx.chartLineScale*config.yAxisLabelBordersWidth),Math.ceil(ctx.chartSpaceScale*config.yAxisLabelBordersXSpace),Math.ceil(ctx.chartSpaceScale*config.yAxisLabelBordersYSpace),config.yAxisLabelBordersStyle,config.yAxisLabelBackgroundColor,"YAXISLABELLEFT",config.yAxisLabelBordersRadius);
8201					ctx.fillTextMultiLine(yAxisLabel2, 0, 0, ctx.textBaseline, (Math.ceil(ctx.chartTextScale*config.yAxisFontSize)),false,config.detectMouseOnText,ctx,"YRIGHTAXISLABEL_TEXTMOUSE",+(90 * (Math.PI / 180)),yAxisLabelPosRight, topNotUsableHeight + (availableHeight / 2),-1,-1);
8202					ctx.stroke();
8203					ctx.restore();
8204				}
8205			}
8206			// Draw bottom X Axis Label
8207			if (xAxisLabelHeight > 0) {
8208				if (config.xAxisBottom) {
8209					ctx.save();
8210					ctx.beginPath();
8211					ctx.font = config.xAxisFontStyle + " " + (Math.ceil(ctx.chartTextScale*config.xAxisFontSize)).toString() + "px " + config.xAxisFontFamily;
8212					ctx.fillStyle = config.xAxisFontColor;
8213					ctx.textAlign = "center";
8214					ctx.textBaseline = "bottom";
8215					setTextBordersAndBackground(ctx,config.xAxisLabel,(Math.ceil(ctx.chartTextScale*config.xAxisFontSize)),leftNotUsableWidth + (availableWidth / 2), xAxisLabelPos,config.xAxisLabelBorders,config.xAxisLabelBordersSelection,config.xAxisLabelBordersColor,Math.ceil(ctx.chartLineScale*config.xAxisLabelBordersWidth),Math.ceil(ctx.chartSpaceScale*config.xAxisLabelBordersXSpace),Math.ceil(ctx.chartSpaceScale*config.xAxisLabelBordersYSpace),config.xAxisLabelBordersStyle,config.xAxisLabelBackgroundColor,"XAXISLABEL",config.xAxisLabelBordersRadius);
8216					ctx.translate(leftNotUsableWidth + (availableWidth / 2), xAxisLabelPos);
8217					ctx.fillTextMultiLine(config.xAxisLabel, 0, 0, ctx.textBaseline, (Math.ceil(ctx.chartTextScale*config.xAxisFontSize)),true,config.detectMouseOnText,ctx,"XAXISLABEL_TEXTMOUSE",0,leftNotUsableWidth + (availableWidth / 2), xAxisLabelPos,-1,-1);
8218					ctx.stroke();
8219					ctx.restore();
8220				}
8221				if (config.xAxisTop) {
8222					var xAxisLabel2=config.xAxisLabel2;
8223					if (xAxisLabel2 == '') xAxisLabel2 = config.xAxisLabel;
8224					ctx.save();
8225					ctx.beginPath();
8226					ctx.font = config.xAxisFontStyle + " " + (Math.ceil(ctx.chartTextScale*config.xAxisFontSize)).toString() + "px " + config.xAxisFontFamily;
8227					ctx.fillStyle = config.xAxisFontColor;
8228					ctx.textAlign = "center";
8229					ctx.textBaseline = "top";
8230					setTextBordersAndBackground(ctx,xAxisLabel2,(Math.ceil(ctx.chartTextScale*config.xAxisFontSize)),leftNotUsableWidth + (availableWidth / 2), xTAxisLabelPos,config.xAxisLabelBorders,config.xAxisLabelBordersSelection,config.xAxisLabelBordersColor,Math.ceil(ctx.chartLineScale*config.xAxisLabelBordersWidth),Math.ceil(ctx.chartSpaceScale*config.xAxisLabelBordersXSpace),Math.ceil(ctx.chartSpaceScale*config.xAxisLabelBordersYSpace),config.xAxisLabelBordersStyle,config.xAxisLabelBackgroundColor,"XAXISLABEL",config.xAxisLabelBordersRadius);
8231					ctx.translate(leftNotUsableWidth + (availableWidth / 2), xTAxisLabelPos);
8232					ctx.fillTextMultiLine(xAxisLabel2, 0, 0, ctx.textBaseline, (Math.ceil(ctx.chartTextScale*config.xAxisFontSize)),true,config.detectMouseOnText,ctx,"XAXISLABEL_TEXTMOUSE",0,leftNotUsableWidth + (availableWidth / 2), xAxisLabelPos,-1,-1);
8233					ctx.stroke();
8234					ctx.restore();
8235				}
8236			}
8237
8238			// Draw Legend
8239      var legendMsr;
8240			if (nbeltLegend > 1 || (nbeltLegend == 1 && config.showSingleLegend)) {
8241				legendMsr={dispLegend : true, xLegendPos : xLegendPos, yLegendPos : yLegendPos,
8242						nbLegendLines: nbLegendLines, nbLegendCols: nbLegendCols, reverseLegend : reverseLegend, 
8243						legendBox : legendBox, widestLegend : widestLegend, highestLegend: highestLegend,
8244						legendWidth: msrLegend.legendWidth,
8245						legendHeight: msrLegend.legendHeight,
8246						legendBackgroundColorWidth:msrLegend.legendBackgroundColorWidth,
8247						legendBackgroundColorHeight:msrLegend.legendBackgroundColorHeight,
8248						legendBorderWidth:msrLegend.legendBorderWidth,
8249						legendBorderHeight:msrLegend.legendBorderHeight,
8250
8251						legendFirstTextXPos:msrLegend.legendFirstTextXPos,
8252						legendFirstTextYPos:msrLegend.legendFirstTextYPos,
8253						legendBackgroundColorXPos:msrLegend.legendBackgroundColorXPos,
8254						legendBackgroundColorYPos:msrLegend.legendBackgroundColorYPos,
8255						legendBorderXPos:msrLegend.legendBorderXPos,
8256						legendBorderYPos:msrLegend.legendBorderYPos,
8257						elementMsr : msrLegend.elementMsr
8258
8259					    };
8260
8261				if(config.legendPosY==0 || config.legendPosY==4 || config.legendPosX==0 || config.legendPosX==4) {
8262					drawLegend(legendMsr,data,config,ctx,typegraph,-1);
8263					legendMsr={dispLegend : false};
8264				} 
8265			} else {
8266				legendMsr={dispLegend : false };
8267			}
8268		}
8269
8270		clrx = leftNotUsableWidth;
8271		clrwidth = availableWidth;
8272		clry = topNotUsableHeight;
8273		clrheight = availableHeight;
8274
8275		return {
8276			leftNotUsableWidth: leftNotUsableWidth,
8277			rightNotUsableWidth: rightNotUsableWidth,
8278			availableWidth: availableWidth,
8279			topNotUsableHeight : topNotUsableHeight,
8280			bottomNotUsableHeight : bottomNotUsableHeight,
8281			availableHeight: availableHeight,
8282			widestXLabel: widestXLabel,
8283			widestTXLabel: widestTXLabel,
8284			highestXLabel: highestXLabel,
8285			highestTXLabel: highestTXLabel,
8286			widestYLabel: widestYLabel,
8287			widestYLabel2: widestYLabel2,
8288			highestYLabel: highestYLabel,
8289			rotateLabels: rotateLabels,
8290			rotateTLabels: rotateTLabels,
8291			xLabelPos: xLabelPos,
8292			xTLabelPos: xTLabelPos,
8293			clrx: clrx,
8294			clry: clry,
8295			clrwidth: clrwidth,
8296			clrheight: clrheight,
8297			legendMsr : legendMsr
8298		};
8299	};
8300
8301
8302	// Function for drawing lines (BarLine|Line)
8303
8304	function drawLinesDataset(animPc, data, config, ctx, statData,vars) {
8305		var y1,y2,y3,diffnb,diffnbj,fact, currentAnimPc;
8306		var prevypos;
8307		var pts=[];
8308
8309		for (var i = 0; i < data.datasets.length; i++) {
8310
8311			if(setOptionValue(true,true,1,"ANIMATION",ctx,data,statData,data.datasets[i].animation,config.animation,"animation",i,-1,{nullvalue : null} )==true || animPc >= 1) {
8312				prevypos="undefined";
8313				if(statData[i][0].tpchart!="Line")continue;
8314				if (statData[i].length == 0) continue;
8315				if (statData[i][0].firstNotMissing == -1) continue;
8316				ctx.save();
8317				ctx.beginPath();
8318
8319				prevAnimPc={ mainVal:0 , subVal : 0,animVal : 0 };
8320				var firstpt=-1;
8321				var lastxPos=-1;
8322				for (var j = statData[i][0].firstNotMissing; j <= statData[i][0].lastNotMissing; j++) {
8323
8324					todisplay=true;
8325					if(setOptionValue(true,true,1,"DISPLAYDATA",ctx,data,statData,data.datasets[i].displayData,config.displayData,"displayData",i,j,{nullvalue : null}
8325 )== false) todisplay=false;
8326					if(setOptionValue(true,true,1,"DISPLAYDATA",ctx,data,statData,data.displayData,config.displayData,"displayData",j,-1,{nullvalue : null} )== false) todisplay=false;
8327					if(typeof(data.datasets[i].data[j])=="undefined")todisplay=false;
8328					if(prevAnimPc.animVal==0 && j>statData[i][0].firstNotMissing) continue;	
8329					currentAnimPc = animationCorrection(animPc, data, config, i, j, true);
8330					if (currentAnimPc.mainVal == 0  && (prevAnimPc.mainVal > 0 && firstpt !=-1)) {
8331						ctx.setLineDash(lineStyleFn(setOptionValue(true,true,1,"LINEDASH",ctx,data,statData,data.datasets[i].datasetStrokeStyle,config.datasetStrokeStyle,"datasetStrokeStyle",i,j,{nullvalue : null} )));
8332						ctx.stroke();
8333						ctx.setLineDash([]);
8334						if(config.extrapolateMissingData) {
8335							y1=statData[i][statData[i][j].prevNotMissing].yAxisPos - prevAnimPc.mainVal*statData[i][statData[i][j].prevNotMissing].yPosOffset;					
8336							y2=statData[i][j].yAxisPos - prevAnimPc.mainVal*statData[i][statData[i][j-1].nextNotMissing].yPosOffset;
8337							diffnb=statData[i][j-1].nextNotMissing-statData[i][j].prevNotMissing;
8338							diffnbj=(j-1)-statData[i][j].prevNotMissing;
8339							fact=(diffnbj+prevAnimPc.subVal)/diffnb;
8340							y3=y1+fact*(y2-y1);					
8341							traceLine(pts,ctx,statData[i][statData[i][j].prevNotMissing].xPos + fact*(statData[i][statData[i][j-1].nextNotMissing].xPos-statData[i][statData[i][j].prevNotMissing].xPos) , y3,config,data,statData,i,setYposOrigin(i,j,data,statData));
8342							closebz(pts,ctx,config,i);
8343							ctx.setLineDash(lineStyleFn(setOptionValue(true,true,1,"LINEDASH",ctx,data,statData,data.datasets[i].datasetStrokeStyle,config.datasetStrokeStyle,"datasetStrokeStyle",i,j,{nullvalue : null} )));
8344							ctx.stroke();
8345							ctx.setLineDash([]);
8346							ctx.strokeStyle = "rgba(0,0,0,0)";
8347							if(config.datasetFill && setOptionValue(true,true,1,"LINKTYPE",ctx,data,statData,data.datasets[i].linkType,config.linkType,"linkType",i,j,{nullvalue : null} )!=1) {
8348								ctx.lineTo(statData[i][statData[i][j].prevNotMissing].xPos + fact*(statData[i][statData[i][j-1].nextNotMissing].xPos-statData[i][statData[i][j].prevNotMissing].xPos) , statData[i][j].yAxisPos );
8349								ctx.lineTo(statData[i][firstpt].xPos, statData[i][firstpt].xAxisPosY-statData[i][0].zeroY);
8350								ctx.closePath();
8351
8352								ctx.fillStyle=setOptionValue(true,true,1,"COLOR",ctx,data,statData,data.datasets[i].fillColor,config.defaultFillColor,"fillColor",i,j,{animationValue: currentAnimPc.mainVal, xPosLeft : statData[i][0].xPos, yPosBottom : Math.max(statData[i][0].yAxisPos,statData[i][0].yAxisPos- ((config.animationLeftToRight) ? 1 : 1*currentAnimPc.mainVal) * statData[i][0].lminvalue_offset), xPosRight : statData[i][data.datasets[i].data.length-1].xPos, yPosTop : Math.min(statData[i][0].yAxisPos, statData[i][0].yAxisPos - ((config.animationLeftToRight) ? 1 : 1*currentAnimPc.mainVal) * statData[i][0].lmaxvalue_offset)} );
8353								ctx.fill();
8354								firstpt=-1;
8355							}
8356						} else if (todisplay==true) {
8357							traceLine(pts,ctx,statData[i][j-1].xPos + prevAnimPc.subVal*(statData[i][j].xPos-statData[i][j-1].xPos) , statData[i][j].yAxisPos - prevAnimPc.mainVal*statData[i][statData[i][j-1].nextNotMissing].yPosOffset,config,data,statData,i,setYposOrigin(i,j,data,statData));
8358							closebz(pts,ctx,config,i);
8359							ctx.setLineDash(lineStyleFn(setOptionValue(true,true,1,"LINEDASH",ctx,data,statData,data.datasets[i].datasetStrokeStyle,config.datasetStrokeStyle,"datasetStrokeStyle",i,j,{nullvalue : null} )));
8360							ctx.stroke();
8361							ctx.setLineDash([]);
8362							ctx.strokeStyle = "rgba(0,0,0,0)";
8363							if(config.datasetFill && setOptionValue(true,true,1,"LINKTYPE",ctx,data,statData,data.datasets[i].linkType,config.linkType,"linkType",i,j,{nullvalue : null} )!=1) {
8364								ctx.lineTo(statData[i][j-1].xPos + prevAnimPc.subVal*(statData[i][j].xPos-statData[i][j-1].xPos) , statData[i][j].yAxisPos );
8365								ctx.lineTo(statData[i][firstpt].xPos, statData[i][firstpt].xAxisPosY-statData[i][0].zeroY);
8366								ctx.closePath();
8367								ctx.fillStyle=setOptionValue(true,true,1,"COLOR",ctx,data,statData,data.datasets[i].fillColor,config.defaultFillColor,"fillColor",i,j,{animationValue: currentAnimPc.mainVal, xPosLeft : statData[i][0].xPos, yPosBottom : Math.max(statData[i][0].yAxisPos,statData[i][0].yAxisPos- ((config.animationLeftToRight) ? 1 : 1*currentAnimPc.mainVal) * statData[i][0].lminvalue_offset), xPosRight : statData[i][data.datasets[i].data.length-1].xPos, yPosTop : Math.min(statData[i][0].yAxisPos, statData[i][0].yAxisPos - ((config.animationLeftToRight) ? 1 : 1*currentAnimPc.mainVal) * statData[i][0].lmaxvalue_offset)} );
8368								ctx.fill();
8369							}
8370						}
8371						prevAnimPc = currentAnimPc;
8372						continue;
8373					} else if(currentAnimPc.totVal ==0) {
8374						ctx.setLineDash(lineStyleFn(setOptionValue(true,true,1,"LINEDASH",ctx,data,statData,data.datasets[i].datasetStrokeStyle,config.datasetStrokeStyle,"datasetStrokeStyle",i,j,{nullvalue : null} )));
8375						ctx.stroke();
8376						ctx.setLineDash([]);
8377						ctx.strokeStyle = "rgba(0,0,0,0)";
8378					} else {
8379						ctx.setLineDash(lineStyleFn(setOptionValue(true,true,1,"LINEDASH",ctx,data,statData,data.datasets[i].datasetStrokeStyle,config.datasetStrokeStyle,"datasetStrokeStyle",i,j,{nullvalue : null} )));
8380						ctx.stroke();
8381						ctx.setLineDash([]);
8382						ctx.strokeStyle=setOptionValue(true,true,1,"STROKECOLOR",ctx,data,statData,data.datasets[i].strokeColor,config.defaultStrokeColor,"strokeColor",i,j,{nullvalue : null} );
8383					}
8384					prevAnimPc = currentAnimPc;
8385
8386					switch(todisplay) {
8387						case false :
8388							if (!config.extrapolateMissingData) {
8389								if(firstpt==-1) continue;
8390								closebz(pts,ctx,config,i);
8391								ctx.setLineDash(lineStyleFn(setOptionValue(true,true,1,"LINEDASH",ctx,data,statData,data.datasets[i].datasetStrokeStyle,config.datasetStrokeStyle,"datasetStrokeStyle",i,j,{nullvalue : null} )));
8392								ctx.stroke();
8393								ctx.setLineDash([]);
8394								if (config.datasetFill && firstpt != -1 && setOptionValue(true,true,1,"LINKTYPE",ctx,data,statData,data.datasets[i].linkType,config.linkType,"linkType",i,j,{nullvalue : null} )!=1) {
8395									lastxPos=-1;
8396									ctx.strokeStyle = "rgba(0,0,0,0)";
8397									ctx.lineTo(statData[i][j-1].xPos, statData[i][j-1].yAxisPos);
8398									ctx.lineTo(statData[i][firstpt].xPos, statData[i][firstpt].yAxisPos);
8399									ctx.closePath();
8400									ctx.fillStyle=setOptionValue(true,true,1,"COLOR",ctx,data,statData,data.datasets[i].fillColor,config.defaultFillColor,"fillColor",i,j,{animationValue: currentAnimPc.mainVal, xPosLeft : statData[i][0].xPos, yPosBottom : Math.max(statData[i][0].yAxisPos,statData[i][0].yAxisPos- ((config.animationLeftToRight) ? 1 : 1*currentAnimPc.mainVal) * statData[i][0].lminvalue_offset), xPosRight : statData[i][data.datasets[i].data.length-1].xPos, yPosTop : Math.min(statData[i][0].yAxisPos, statData[i][0].yAxisPos - ((config.animationLeftToRight) ? 1 : 1*currentAnimPc.mainVal) * statData[i][0].lmaxvalue_offset)} );
8401									ctx.fill();
8402								}
8403								ctx.beginPath();
8404								prevAnimPc={ mainVal:0 , subVal : 0 };
8405								firstpt=-1;
8406							} else if (currentAnimPc.subVal > 0) {
8407								lastxPos=statData[i][j].xPos + currentAnimPc.subVal*(statData[i][j+1].xPos-statData[i][j].xPos);
8408								y1=statData[i][statData[i][j+1].prevNotMissing].yAxisPos - statData[i][statData[i][j+1].prevNotMissing].yPosOffset;					
8409								y2=statData[i][statData[i][j].nextNotMissing].yAxisPos - statData[i][statData[i][j].nextNotMissing].yPosOffset;
8410								diffnb=statData[i][j].nextNotMissing-statData[i][j+1].prevNotMissing;
8411								diffnbj=(j)-statData[i][j+1].prevNotMissing;
8412								fact=(diffnbj+prevAnimPc.subVal)/diffnb;
8413								y3=y1+fact*(y2-y1);					
8414								traceLine(pts,ctx,statData[i][statData[i][j].prevNotMissing].xPos + fact*(statData[i][statData[i][j-1].nextNotMissing].xPos-statData[i][statData[i][j].prevNotMissing].xPos) , y3,config,data,statData,i,setYposOrigin(i,j,data,statData));
8415							}
8416							break;
8417						default : 
8418							ctx.lineWidth = Math.ceil(ctx.chartLineScale*setOptionValue(true,true,1,"LINEWIDTH",ctx,data,statData,data.datasets[i].datasetStrokeWidth,config.datasetStrokeWidth,"datasetStrokeWidth",i,j,{nullvalue : null} ));
8419							if (firstpt==-1) {
8420								firstpt=j;
8421								ctx.beginPath();
8422								if(setOptionValue(true,true,1,"LINKTYPE",ctx,data,statData,data.datasets[i].linkType,config.linkType,"linkType",i,j,{nullvalue : null} )==1) {
8423									if(typeof statData[i][j].yPosOffsetOrigin != "undefined")ctx.moveTo(statData[i][j].xPos, statData[i][j].yAxisPos - currentAnimPc.mainVal * statData[i][j].yPosOffsetOrigin);
8424									else ctx.moveTo(statData[i][firstpt].xPos, statData[i][firstpt].xAxisPosY-statData[i][0].zeroY);
8425									ctx.lineTo(statData[i][j].xPos, statData[i][j].yAxisPos - currentAnimPc.mainVal * statData[i][j].yPosOffset);											
8426								} else ctx.moveTo(statData[i][j].xPos, statData[i][j].yAxisPos - currentAnimPc.mainVal * statData[i][j].yPosOffset);
8427								initbz(pts,statData[i][j].xPos, statData[i][j].yAxisPos - currentAnimPc.mainVal * statData[i][j].yPosOffset,i);							
8428								lastxPos=statData[i][j].xPos;
8429							} else {
8430								lastxPos=statData[i][j].xPos;
8431								traceLine(pts,ctx,statData[i][j].xPos, statData[i][j].yAxisPos - currentAnimPc.mainVal * statData[i][j].yPosOffset,config,data,statData,i,setYposOrigin(i,j,data,statData));
8432							}	
8433							if (currentAnimPc.subVal > 0 && statData[i][j].nextNotMissing !=-1 && (config.extrapolateMissing || statData[i][j].nextNotMissing==j+1)) {
8434								lastxPos=statData[i][j].xPos + currentAnimPc.subVal*(statData[i][j+1].xPos-statData[i][j].xPos);
8435								y1=statData[i][statData[i][j+1].prevNotMissing].yAxisPos - statData[i][statData[i][j+1].prevNotMissing].yPosOffset;					
8436								y2=statData[i][statData[i][j].nextNotMissing].yAxisPos - statData[i][statData[i][j].nextNotMissing].yPosOffset;
8437								y3=y1+currentAnimPc.subVal*(y2-y1);					
8438								traceLine(pts,ctx,statData[i][j].xPos + currentAnimPc.subVal*(statData[i][statData[i][j].nextNotMissing].xPos-statData[i][j].xPos) , y3,config,data,statData,i,setYposOrigin(i,j,data,statData));
8439							}
8440							break
8441					}
8442          if (todisplay && animPc >= config.animationStopValue){ctx.pieces_drawn.points++;ctx.pieces_drawn.total_drawn++;}
8443
8444				}
8445				closebz(pts,ctx,config,i);
8446				ctx.setLineDash(lineStyleFn(setOptionValue(true,true,1,"LINEDASH",ctx,data,statData,data.datasets[i].datasetStrokeStyle,config.datasetStrokeStyle,"datasetStrokeStyle",i,j,{nullvalue : null} )));
8447				ctx.stroke();
8448				ctx.setLineDash([]);
8449				if (config.datasetFill  && setOptionValue(true,true,1,"LINKTYPE",ctx,data,statData,data.datasets[i].linkType,config.linkType,"linkType",i,j,{nullvalue : null} )!=1) {
8450					if (firstpt>=0 ) {
8451						ctx.strokeStyle = "rgba(0,0,0,0)";
8452						ctx.lineTo(lastxPos, statData[i][0].xAxisPosY-statData[i][0].zeroY);
8453						ctx.lineTo(statData[i][firstpt].xPos, statData[i][firstpt].xAxisPosY-statData[i][0].zeroY);
8454						ctx.closePath();
8455						ctx.fillStyle=setOptionValue(true,true,1,"COLOR",ctx,data,statData,data.datasets[i].fillColor,config.defaultFillColor,"fillColor",i,-1,{animationValue: currentAnimPc.mainVal, xPosLeft : statData[i][0].xPos, yPosBottom : Math.max(statData[i][0].yAxisPos,statData[i][0].yAxisPos- ((config.animationLeftToRight) ? 1 : 1*currentAnimPc.mainVal) * statData[i][0].lminvalue_offset), xPosRight : statData[i][data.datasets[i].data.length-1].xPos, yPosTop : Math.min(statData[i][0].yAxisPos, statData[i][0].yAxisPos - ((config.animationLeftToRight) ? 1 : 1*currentAnimPc.mainVal) * statData[i][0].lmaxvalue_offset)} );
8456						ctx.fill();
8457					}
8458				} 
8459				ctx.restore();
8460				if (animPc >= 1) {
8461					for (j = 0; j < data.datasets[i].data.length; j++) {
8462						if(setOptionValue(true,true,1,"DISPLAYDATA",ctx,data,statData,data.datasets[i].displayData,config.displayData,"displayData",i,j,{nullvalue : null} )== false) continue;
8463						if(setOptionValue(true,true,1,"DISPLAYDATA",ctx,data,statData,data.displayData,config.displayData,"displayData",j,-1,{nullvalue : null} )== false) continue;
8464						if (!(typeof(data.datasets[i].data[j]) == 'undefined')) {
8465							currentAnimPc = animationCorrection(animPc, data, config, i, j, true);
8466							if (currentAnimPc.mainVal > 0 || !config.animationLeftToRight) {
8467								if(setOptionValue(true,true,1,"POINTDOT",ctx,data,statData,undefined,config.pointDot,"pointDot",i,j,{nullvalue : null} )) {
8468									ctx.beginPath();
8469									ctx.fillStyle=setOptionValue(true,true,1,"MARKERFILLCOLOR",ctx,data,statData,data.datasets[i].pointColor,config.defaultStrokeColor,"pointColor",i,j,{nullvalue: true} );
8470									ctx.strokeStyle=setOptionValue(true,true,1,"MARKERSTROKESTYLE",ctx,data,statData,data.datasets[i].pointStrokeColor,config.defaultStrokeColor,"pointStrokeColor",i,j,{nullvalue: true} );
8471									ctx.lineWidth=setOptionValue(true,true,ctx.chartLineScale,"MARKERLINEWIDTH",ctx,data,statData,data.datasets[i].pointDotStrokeWidth,config.pointDotStrokeWidth,"pointDotStrokeWidth",i,j,{nullvalue: true} );
8472									var markerShape=setOptionValue(true,true,1,"MARKERSHAPE",ctx,data,statData,data.datasets[i].markerShape,config.markerShape,"markerShape",i,j,{nullvalue: true} );
8473									var markerRadius=setOptionValue(true,true,ctx.chartSpaceScale,"MARKERRADIUS",ctx,data,statData,data.datasets[i].pointDotRadius,config.pointDotRadius,"pointDotRadius",i,j,{nullvalue: true} );
8474									var markerStrokeStyle=setOptionValue(true,true,1,"MARKERSTROKESTYLE",ctx,data,statData,data.datasets[i].pointDotStrokeStyle,config.pointDotStrokeStyle,"pointDotStrokeStyle",i,j,{nullvalue: true} );
8475									drawMarker(ctx, statData[i][j].xPos , statData[i][j].yAxisPos - currentAnimPc.mainVal * statData[i][j].yPosOffset, markerShape,markerRadius,markerStrokeStyle);							
8476								}
8477        						}
8478						}
8479					}
8480				}
8481
8482				if (animPc >= config.animationStopValue) {
8483					for (j = 0; j < data.datasets[i].data.length; j++) {
8484						if(setOptionValue(true,true,1,"DISPLAYDATA",ctx,data,statData,data.datasets[i].displayData,config.displayData,"displayData",i,j,{nullvalue : null} )== false) continue;
8485						if(setOptionValue(true,true,1,"DISPLAYDATA",ctx,data,statData,data.displayData,config.displayData,"displayData",j,-1,{nullvalue : null} )== false) continue;
8486						if (typeof(data.datasets[i].data[j]) == 'undefined') continue;
8487						if(!(data.datasets[i].mouseDetection==false))jsGraphAnnotate[ctx.ChartNewId][jsGraphAnnotate[ctx.ChartNewId].length] = ["POINT", i, j, statData,setOptionValue(true,true,1,"ANNOTATEDISPLAY",ctx,data,statData,data.datasets[i].annotateDisplay,config.annotateDisplay,"annotateDisplay",i,j,{nullValue : true})];
8488						if (setOptionValue(true,true,1,"INGRAPHDATASHOW",ctx,data,statData,data.datasets[i].inGraphDataShow,config.inGraphDataShow,"inGraphDataShow",i,j,{nullValue : true})) {
8489	 						ctx.save();
8490							ctx.textAlign = setOptionValue(true,true,1,"INGRAPHDATAALIGN",ctx,data,statData,undefined,config.inGraphDataAlign,"inGraphDataAlign",i,j,{nullValue: true  });
8491							ctx.textBaseline = setOptionValue(true,true,1,"INGRAPHDATAVALIGN",ctx,data,statData,undefined,config.inGraphDataVAlign,"inGraphDataVAlign",i,j,{nullValue : true} );
8492							ctx.font = setOptionValue(true,true,1,"INGRAPHDATAFONTSTYLE",ctx,data,statData,undefined,config.inGraphDataFontStyle,"inGraphDataFontStyle",i,j,{nullValue : true} ) + ' ' + setOptionValue(true,true,ctx.chartTextScale,"INGRAPHDATAFONTSIZE",ctx,data,statData,undefined,config.inGraphDataFontSize,"inGraphDataFontSize",i,j,{nullValue : true} ) + 'px ' + setOptionValue(true,true,1,"INGRAPHDATAFONTFAMILY",ctx,data,statData,undefined,config.inGraphDataFontFamily,"inGraphDataFontFamily",i,j,{nullValue : true} );
8493							ctx.fillStyle = setOptionValue(true,true,1,"INGRAPHDATAFONTCOLOR",ctx,data,statData,undefined,config.inGraphDataFontColor,"inGraphDataFontColor",i,j,{nullV
8493alue : true} );
8494							var paddingTextX = setOptionValue(true,true,ctx.chartSpaceScale,"INGRAPHDATAPADDINGX",ctx,data,statData,undefined,config.inGraphDataPaddingX,"inGraphDataPaddingX",i,j,{nullValue : true} ),
8495							    paddingTextY = setOptionValue(true,true,ctx.chartSpaceScale,"INGRAPHDATAPADDINGY",ctx,data,statData,undefined,config.inGraphDataPaddingY,"inGraphDataPaddingY",i,j,{nullValue : true} );
8496							var dispString = tmplbis(setOptionValue(true,true,1,"INGRAPHDATATMPL",ctx,data,statData,undefined,config.inGraphDataTmpl,"inGraphDataTmpl",i,j,{nullValue : true} ), statData[i][j],config);
8497							ctx.translate(statData[i][j].xPos + paddingTextX, statData[i][j].yAxisPos - currentAnimPc.mainVal * statData[i][j].yPosOffset - paddingTextY);
8498							var rotateVal=setOptionValue(true,true,1,"INGRAPHDATAROTATE",ctx,data,statData,undefined,config.inGraphDataRotate,"inGraphDataRotate",i,j,{nullValue : true} ) * (Math.PI / 180);
8499							ctx.rotate(rotateVal);
8500							setTextBordersAndBackground(ctx,dispString,setOptionValue(true,true,ctx.chartTextScale,"INGRAPHDATAFONTSIZE",ctx,data,statData,undefined,config.inGraphDataFontSize,"inGraphDataFontSize",i,j,{nullValue : true} ),0,0,setOptionValue(true,true,1,"INGRAPHDATABORDERS",ctx,data,statData,undefined,config.inGraphDataBorders,"inGraphDataBorders",i,j,{nullValue : true} ),setOptionValue(true,true,1,"INGRAPHDATABORDERSSELECTION",ctx,data,statData,undefined,config.inGraphDataBordersSelection,"inGraphDataBordersSelection",i,j,{nullValue : true} ),setOptionValue(true,true,1,"INGRAPHDATABORDERSCOLOR",ctx,data,statData,undefined,config.inGraphDataBordersColor,"inGraphDataBordersColor",i,j,{nullValue : true} ),setOptionValue(true,true,ctx.chartLineScale,"INGRAPHDATABORDERSWIDTH",ctx,data,statData,undefined,config.inGraphDataBordersWidth,"inGraphDataBordersWidth",i,j,{nullValue : true} ),setOptionValue(true,true,ctx.chartSpaceScale,"INGRAPHDATABORDERSXSPACE",ctx,data,statData,undefined,config.inGraphDataBordersXSpace,"inGraphDataBordersXSpace",i,j,{nullValue : true} ),setOptionValue(true,true,ctx.chartSpaceScale,"INGRAPHDATABORDERSYSPACE",ctx,data,statData,undefined,config.inGraphDataBordersYSpace,"inGraphDataBordersYSpace",i,j,{nullValue : true} ),setOptionValue(true,true,1,"INGRAPHDATABORDERSSTYLE",ctx,data,statData,undefined,config.inGraphDataBordersStyle,"inGraphDataBordersStyle",i,j,{nullValue : true} ),setOptionValue(true,true,1,"INGRAPHDATABACKGROUNDCOLOR",ctx,data,statData,undefined,config.inGraphDataBackgroundColor,"inGraphDataBackgroundColor",i,j,{nullValue : true} ),"INGRAPHDATA",config.inGraphDataBordersRadius);
8501							ctx.fillTextMultiLine(dispString, 0, 0, ctx.textBaseline, setOptionValue(true,true,ctx.chartTextScale,"INGRAPHDATAFONTSIZE",ctx,data,statData,undefined,config.inGraphDataFontSize,"inGraphDataFontSize",i,j,{nullValue : true} ),true,config.detectMouseOnText,ctx,"INGRAPHDATA_TEXTMOUSE",rotateVal,statData[i][j].xPos + paddingTextX, statData[i][j].yAxisPos - currentAnimPc.mainVal * statData[i][j].yPosOffset - paddingTextY,i,j);
8502							ctx.restore();
8503						}
8504					}
8505				}
8506			}
8507		};
8508
8509		
8510		function initbz(pts,xpos,ypos,i) {
8511			if (setOptionValue(true,true,1,"LINKTYPE",ctx,data,statData,data.datasets[i].linkType,config.linkType,"linkType",i,j,{nullvalue : null} )==0 && setOptionValue(true,true,1,"BEZIERCURVE",ctx,data,statData,undefined,config.bezierCurve,"bezierCurve",i,-1,{nullValue : true})) {
8512				pts.length=0;
8513				pts.push(xpos);pts.push(ypos);
8514			}
8515			prevypos=ypos;
8516		} ;
8517		
8518		function setYposOrigin(i,j,data,statData) {
8519			yposOrigin="undefined";
8520			if(typeof statData[i][j].yPosOffsetOrigin != "undefined")yposOrigin= statData[i][j].yAxisPos - currentAnimPc.mainVal * statData[i][j].yPosOffsetOrigin;
8521			return(yposOrigin);
8522		};
8523		
8524		
8525		function traceLine(pts,ctx,xpos,ypos,config,data,statData,i,yposOrigin) {
8526			if (setOptionValue(true,true,1,"LINKTYPE",ctx,data,statData,data.datasets[i].linkType,config.linkType,"linkType",i,j,{nullvalue : null} )==0 && setOptionValue(true,true,1,"BEZIERCURVE",ctx,data,statData,undefined,config.bezierCurve,"bezierCurve",i,-1,{nullValue : true})) {
8527				pts.push(xpos);	pts.push(ypos);
8528			} else {
8529				if(setOptionValue(true,true,1,"LINKTYPE",ctx,data,statData,data.datasets[i].linkType,config.linkType,"linkType",i,j,{nullvalue : null} )==0)ctx.lineTo(xpos,ypos);
8530				else if(setOptionValue(true,true,1,"LINKTYPE",ctx,data,statData,data.datasets[i].linkType,config.linkType,"linkType",i,j,{nullvalue : null} )==1){
8531					if(yposOrigin != "undefined")ctx.moveTo(xpos, yposOrigin);
8532					else ctx.moveTo(xpos, statData[i][0].xAxisPosY-statData[i][0].zeroY);
8533					ctx.lineTo(xpos,ypos);
8534				} else if (setOptionValue(true,true,1,"LINKTYPE",ctx,data,statData,data.datasets[i].linkType,config.linkType,"linkType",i,j,{nullvalue : null} )==2 && typeof prevypos!="undefined"){
8535					ctx.lineTo(xpos,prevypos);
8536					ctx.lineTo(xpos,ypos);
8537					prevypos=ypos;
8538				}
8539			}
8540		} ;
8541		
8542		function closebz(pts,ctx,config,i){
8543		
8544			if(setOptionValue(true,true,1,"LINKTYPE",ctx,data,statData,data.datasets[i].linkType,config.linkType,"linkType",i,j,{nullvalue : null} )==0 && setOptionValue(true,true,1,"BEZIERCURVE",ctx,data,statData,undefined,config.bezierCurve,"bezierCurve",i,-1,{nullValue : true})) {
8545				minimumpos= statData[i][0].xAxisPosY;
8546				maximumpos= statData[i][0].xAxisPosY - statData[i][0].calculatedScale.steps*statData[i][0].scaleHop;
8547				drawSpline(ctx,pts,setOptionValue(true,true,1,"BEZIERCURVETENSION",ctx,data,statData,undefined,config.bezierCurveTension,"bezierCurveTension",i,-1,{nullValue : true}),minimumpos,maximumpos);
8548				pts.length=0;			
8549			}
8550			prevypos=undefined;
8551		};		
8552
8553		//Props to Rob Spencer at scaled innovation for his post on splining between points
8554		//http://scaledinnovation.com/analytics/splines/aboutSplines.html
8555
8556		function getControlPoints(x0,y0,x1,y1,x2,y2,t){
8557			//  x0,y0,x1,y1 are the coordinates of the end (knot) pts of this segment
8558			//  x2,y2 is the next knot -- not connected here but needed to calculate p2
8559			//  p1 is the control point calculated here, from x1 back toward x0.
8560			//  p2 is the next control point, calculated here and returned to become the 
8561			//  next segment's p1.
8562			//  t is the 'tension' which controls how far the control points spread.
8563        	
8564			//  Scaling factors: distances from this knot to the previous and following knots.
8565			var d01=Math.sqrt(Math.pow(x1-x0,2)+Math.pow(y1-y0,2));
8566			var d12=Math.sqrt(Math.pow(x2-x1,2)+Math.pow(y2-y1,2));
8567   
8568			var fa=t*d01/(d01+d12);
8569			var fb=t-fa;
8570  
8571			var p1x=x1+fa*(x0-x2);
8572			var p1y=y1+fa*(y0-y2);
8573
8574			var p2x=x1-fb*(x0-x2);
8575			var p2y=y1-fb*(y0-y2);  
8576    
8577			return [p1x,p1y,p2x,p2y]
8578		};
8579
8580		function drawSpline(ctx,pts,t,minimumpos,maximumpos){
8581			var cp=[];   // array of control points, as x0,y0,x1,y1,...
8582			var n=pts.length;
8583
8584			pts.push(2*pts[n-2]-pts[n-4]);
8585			pts.push(2*pts[n-1]-pts[n-3]);
8586
8587			if (n==4){
8588				ctx.moveTo(pts[0],pts[1]);
8589				ctx.lineTo(pts[2],pts[3]);
8590				return;
8591			}
8592			// Draw an open curve, not connected at the ends
8593			for(var ti=0;ti<n-2;ti+=2){
8594				cp=cp.concat(getControlPoints(pts[ti],pts[ti+1],pts[ti+2],pts[ti+3],pts[ti+4],pts[ti+5],t));
8595        		}    
8596			//  For first is a simple quadratics.
8597
8598			ctx.beginPath();
8599			ctx.strokeStyle=setOptionValue(true,true,1,"STROKECOLOR",ctx,data,statData,data.datasets[i].strokeColor,config.defaultStrokeColor,"strokeColor",i,j,{nullvalue : null} );
8600			ctx.lineWidth = Math.ceil(ctx.chartLineScale*setOptionValue(true,true,1,"LINEWIDTH",ctx,data,statData,data.datasets[i].datasetStrokeWidth,config.datasetStrokeWidth,"datasetStrokeWidth",i,j,{nullvalue : null} ));
8601			ctx.moveTo(pts[0],pts[1]);
8602			ctx.quadraticCurveTo(cp[0],Math.max(Math.min(cp[1],minimumpos),maximumpos),pts[2],pts[3]);
8603			ctx.setLineDash(lineStyleFn(setOptionValue(true,true,1,"LINEDASH",ctx,data,statData,data.datasets[i].datasetStrokeStyle,config.datasetStrokeStyle,"datasetStrokeStyle",i,j,{nullvalue : null} )));
8604			for(ti=2;ti<pts.length-4;ti+=2){
8605				y1=Math.max(Math.min(cp[2*ti-1],minimumpos),maximumpos);
8606				y2=Math.max(Math.min(cp[2*ti+1],minimumpos),maximumpos);
8607				ctx.bezierCurveTo(cp[2*ti-2],y1,cp[2*ti],y2,pts[ti+2],pts[ti+3]);
8608			}
8609			ctx.stroke();
8610		};
8611 		ctx.setLineDash([]);
8612	};
8613
8614	function log10(val) {
8615		return Math.log(val) / Math.LN10;
8616	};
8617
8618	function setRect(ctx, config) {
8619		if (config.clearRect) {
8620			if (!config.multiGraph) {
8621
8622				clear(ctx);
8623				ctx.clearRect(0, 0, width, height);
8624			}
8625		} else {
8626			clear(ctx);
8627			ctx.clearRect(0, 0, width, height);
8628	
8629			ctx.fillStyle = config.savePngBackgroundColor;
8630			ctx.strokeStyle = config.savePngBackgroundColor;
8631			ctx.beginPath();
8632			ctx.moveTo(0, 0);
8633			ctx.lineTo(0, ctx.canvas.height);
8634			ctx.lineTo(ctx.canvas.width, ctx.canvas.height);
8635			ctx.lineTo(ctx.canvas.width, 0);
8636			ctx.lineTo(0, 0);
8637			ctx.stroke();
8638			ctx.fill();
8639		}
8640	};
8641
8642
8643	function defMouse(ctx,data,config) {
8644
8645		var mousewheelevt=(/Firefox/i.test(navigator.userAgent))? "DOMMouseScroll" : "mousewheel" 
8646
8647
8648        	// reset mouseAction to check;
8649
8650        	if(typeof ctx.mouseAction=="undefined") { ctx.mouseAction=[];}
8651        	else {
8652        		for(var i=0;i<ctx.mouseAction;i++){
8653				if(ctx.mouseAction.substring(0,1)!="/")ctx.mouseAction[i]="/"+ctx.mouseAction[i];
8654			}
8655		}
8656
8657        	// liste mouse options;
8658		// ----------------------------------------------------		
8659		// - annotateDisplay : true, annotateFunction: "mousemove"
8660		// ----------------------------------------------------		
8661		// - saveScreen : savePngFunction: "mousedown right" - savePng=true
8662		// ----------------------------------------------------		
8663                // highLight : false, 	highLightMouseFunction : "mousemove",
8664		// ----------------------------------------------------		
8665		// - mouse sortir ou entrer dans une pièce => Pas d'influence sur une action de souris. C'est lié à l'action de annotateFunction
8666		//      	annotateFunctionIn : inBar,
8667      		//		annotateFunctionOut : outBar,
8668		// ----------------------------------------------------		
8669		// - mouseDownRight	mouseDownLeft: null  mouseDownMiddle: null  
8670		// - mouseMove: null 	mouseWheel : null    mouseOut: null (lorsque la souris sort du canvas) 	
8671		// ----------------------------------------------------		
8672		//  mouse sur texte : detectMouseOnText => Pas d'influence sur une action de souris. C'est lié à une autre action;
8673		// ----------------------------------------------------		
8674
8675		function setAction(ctx,action){
8676			if(ctx.mouseAction.indexOf("/"+action)>=0)ctx.mouseAction[ctx.mouseAction.indexOf("/"+action)]=action;
8677			else if(ctx.mouseAction.indexOf(action)<0)ctx.mouseAction[ctx.mouseAction.length]=action;
8678		};
8679		
8680		function add_listener(ctx,action) {
8681			if (isIE() < 9 && isIE() != false) ctx.canvas.attachEvent("on" + action.split(' ')[0], function(event) {
8682				doMouseAction(event,ctx.ChartNewId, action.split(' ')[0]);
8683			});
8684			else ctx.canvas.addEventListener(action.split(' ')[0], function(event) {
8685				doMouseAction(event,ctx, action.split(' ')[0]);
8686			}, false);
8687		};
8688
8689		// - saveScreen : savePngFunction: "mousedown right" - savePng=true
8690		if(config.savePng==true) {
8691			     if(config.savePngFunction=="mousedown left")setAction(ctx,"mousedown 1");
8692			else if(config.savePngFunction=="mousedown middle")setAction(ctx,"mousedown 2");
8693			else if(config.savePngFunction=="mousedown right")setAction(ctx,"mousedown 3");
8694		}
8695		
8696
8697		// - annotateDisplay : true, annotateFunction: "mousemove"
8698		if(config.annotateDisplay==true) {
8699			if (cursorDivCreated == false) oCursor = new makeCursorObj(config,annotate_shape);
8700			     if(config.annotateFunction=="mousedown left")setAction(ctx,"mousedown 1");
8701			else if(config.annotateFunction=="mousedown middle")setAction(ctx,"mousedown 2");
8702			else if(config.annotateFunction=="mousedown right")setAction(ctx,"mousedown 3");
8703			else if(config.annotateFunction=="mousemove")setAction(ctx,"mousemove");
8704		}
8705
8706                // highLight : false, 	highLightMouseFunction : "mousemove",
8707		if(config.highLight==true) {
8708			     if(config.highLightMouseFunction=="mousedown left")setAction(ctx,"mousedown 1");
8709			else if(config.highLightMouseFunction=="mousedown middle")setAction(ctx,"mousedown 2");
8710			else if(config.highLightMouseFunction=="mousedown right")setAction(ctx,"mousedown 3");
8711			else if(config.highLightMouseFunction=="mousemove")setAction(ctx,"mousemove");
8712		}
8713		
8714		// mouse actions;
8715		if(typeof config.mouseMove=="function") setAction(ctx,"mousemove");
8716		if(typeof config.mouseDownLeft=="function") setAction(ctx,"mousedown 1");
8717		if(typeof config.mouseDownMiddle=="function") setAction(ctx,"mousedown 2");
8718		if(typeof config.mouseDownRight=="function") setAction(ctx,"mousedown 3");
8719		if(typeof config.mouseWheel=="function") setAction(ctx,mousewheelevt);
8720		if(typeof config.mouseOut=="function") setAction(ctx,"mouseout");
8721		if(typeof config.mouseDblClick=="function") setAction(ctx,"dblclick");
8722
8723		var mouseAction=false;		
8724
8725		// add mouse event
8726		if((ctx.mouseAction.indexOf("mousemove")>=0 && ctx.mouseAction.indexOf("/mousemove")<0) || (ctx.mouseAction.indexOf("mouseout")>=0 && ctx.mouseAction.indexOf("/mouseout")<0)) {
8727			setAction(ctx,"mouseout");
8728			mouseAction=true;
8729			add_listener(ctx,"mouseout");
8730			// mouseOut action;			
8731		}
8732
8733
8734		if((ctx.mouseAction.indexOf("mousemove")>=0 && ctx.mouseAction.indexOf("/mousemove")<0) || (ctx.mouseAction.indexOf(mousewheelevt)>=0 && ctx.mouseAction.indexOf("/"+mousewheelevt)<0)) {
8735			setAction(ctx,mousewheelevt);
8736			mouseAction=true;
8737			add_listener(ctx,mousewheelevt);
8738			// mouseWheel action;			
8739		}
8740
8741		if(ctx.mouseAction.indexOf("mousemove")>=0 && ctx.mouseAction.indexOf("/mousemove")<0) {
8742			mouseAction=true;
8743			add_listener(ctx,"mousemove");
8744			// mouseMove action;			
8745		}
8746
8747		if(ctx.mouseAction.indexOf("dblclick")>=0 && ctx.mouseAction.indexOf("/dblclick")<0) {
8748			mouseAction=true;
8749			add_listener(ctx,"dblclick");
8750			// mouseMove action;			
8751		}
8752
8753		if((ctx.mouseAction.indexOf("mousedown 1")>=0 && ctx.mouseAction.indexOf("/mousedown 1")<0) || (ctx.mouseAction.indexOf("mousedown 2")>=0 && ctx.mouseAction.indexOf("/mousedown 2")<0) || (ctx.mouseAction.indexOf("mousedown 3")>=0 && ctx.mouseAction.indexOf("/mousedown 3")<0)) {
8754			mouseAction=true;
8755			add_listener(ctx,"mousedown");
8756			// mouseDown action;			
8757		}
8758
8759		// remove contextMenu if forced with option contextMenu or if mouseDownRight is defined
8760		if((config.contextMenu==false || ctx.mouseAction.indexOf("mousedown 3")>=0) && ctx.mouseAction.indexOf("/removeContextMenu")<0){
8761			ctx.mouseAction[ctx.mouseAction.length]="removeContextMenu";
8762			ctx.canvas.oncontextmenu = function (e) {
8763    				e.preventDefault();
8764			};
8765		}
8766		
8767		// initialiser les variables nécessaires pour l'action doMouseAction;
8768                inMouseAction[ctx.ChartNewId]=false;
8769		mouseActionData[ctx.ChartNewId]={ data : data, config: config, prevShow : -1 };
8770	};
8771
8772};
8773
8774function animationCorrection(animationValue, data, config, vdata, vsubdata, isline) {
8775	var animValue=animationValue;
8776	var animSubValue = 0;
8777	
8778	if(vsubdata<0) {
8779		if(vdata < 1*config.animationStartWithData-1) animValue = 1;
8780		else {
8781			switch (config.animationByDataset) {
8782				case "ByArc" :
8783					animValue = animationValue;
8784					break;
8785				case true:
8786					animValue = animationValue;
8787					break;
8788				case false:
8789				default:
8790					animValue = animationValue;
8791					break;
8792			}
8793		}
8794	} else {
8795		var startVal=Math.max(1,config.animationStartWithDataset);
8796		var startSubVal=Math.max(1,config.animationStartWithData);
8797	
8798		if(vdata < 1*config.animationStartWithDataset-1) animValue = 1;
8799		else if(vsubdata <1*config.animationStartWithData-1) animValue = 1;
8800		else {
8801		        var maxData=0;
8802			if(config.animationLeftToRight) {
8803				for(var i=0;i<data.datasets.length;i++)	maxData=Math.max(maxData,data.datasets[i].data.length)
8804			}
8805			switch (config.animationByDataset) {
8806				case true:
8807					switch(config.animationLeftToRight) {
8808						case true: 
8809							var curpos=(vdata-(startVal-1))*(maxData-(startSubVal-1))+(vsubdata-(startSubVal-1));
8810							maxData=(maxData-(startSubVal-1))*(data.datasets.length-(startVal-1));
8811							if(animationValue < (curpos/maxData)) {
8812								animValue=0;
8813								if(isline && vsubdata+1==startSubVal)animValue=1;
8814							} else if(animationValue < ((curpos+1)/maxData)) {
8815								animValue=(animationValue-(curpos/maxData))*maxData;
8816								if(isline){
8817									animSubValue=animValue;
8818									animValue=1;
8819								}
8820							} else animValue=1;
8821							break;
8822						case false:
8823						default:
8824							if(animationValue < (vdata-(startVal-1))/(data.datasets.length-(startVal-1))) {
8825								animValue=0.001;
8826							} else if(animationValue < (vdata-(startVal-1)+1)/(data.datasets.length-(startVal-1))) {
8827								animValue=(data.datasets.length-(startVal-1))*(animationValue-(vdata-(startVal-1))/(data.datasets.length-(startVal-1)));
8828							} else animValue=1;
8829							break;
8830					}
8831					break;
8832				case false:
8833				default:
8834					switch(config.animationLeftToRight) {
8835						case true: 
8836							var curpos=(vsubdata-(startSubVal-1));
8837							maxData=(maxData-(startSubVal-1));
8838							if(animationValue < (curpos/maxData)) animValue=0;
8839							else if(animationValue < ((curpos+1)/maxData)) {
8840								animValue=(animationValue-(curpos/maxData))*maxData;
8841								if(isline){
8842									animSubValue=animValue;
8843									animValue=1;
8844								}
8845							} else animValue=1;
8846							break;
8847						case false:
8848						default:
8849							animValue = animationValue;
8850							break;
8851					}
8852					break;
8853			}
8854		}
8855	}
8856	return {
8857		mainVal: animValue,
8858		subVal: animSubValue,
8859		animVal: animValue + animSubValue
8860	};
8861
8862};
8863
8864
8865function showLabels(ctx,data,config,i) {
8866	var doShowLabels=setOptionValue(true,true,1,"SHOWLABEL",ctx,data,undefined,undefined,config.showXLabels,"showXLabels",i,-1,undefined,{labelValue: fmtChartJS(config, data.labels[i], config.fmtXLabel), unformatedLabelValue:data.labels[i]});
8867	if(typeof doShowLabels=="number") {
8868		if(i>=config.firstLabelToShow-1)doShowLabels=((i+config.firstLabelToShow-1) % parseInt(doShowLabels) ==0 ? true : false);
8869		else doShowLabels=false;
8870	}
8871	return doShowLabels;
8872};
8873
8874function showYLabels(ctx,data,config,i,text) {
8875	var doShowLabels=setOptionValue(true,true,1,"SHOWYLABEL",ctx,data,undefined,undefined,config.showYLabels,"showYLabels",-1,i,undefined,{labelValue: text});
8876	if(typeof doShowLabels=="number") {
8877		if(i>=config.firstYLabelToShow-1)doShowLabels=((i+config.firstYLabelToShow-1) % parseInt(doShowLabels) ==0 ? true : false);
8878		else doShowLabels=false;
8879	}
8880	return doShowLabels;
8881};
8882
8883
8884function drawLegend(legendMsr,data,config,ctx,typegraph,cntiter) {
8885
8886
8887	if(config.legendPosY==0 || config.legendPosY==4 || config.legendPosX==0 || config.legendPosX==4){
8888		if(cntiter!=-1) return;
8889	}
8890	else {
8891		if(cntiter==-1)return;
8892		else if (config.animation==true) {
8893		
8894			if(typeof config.legendWhenToDraw=="number") {
8895				if (cntiter !=config.legendWhenToDraw)return;
8896			} else if (cntiter !=1 && config.legendWhenToDraw=="first")return;
8897			else if (cntiter != config.animationSteps && config.legendWhenToDraw=="last")return;
8898		}
8899	}
8900	ctx.save();
8901	if (config.legendFillColor != "rgba(0,0,0,0)") {
8902		// fill color;
8903		ctx.setLineDash([]);
8904		ctx.lineWidth=0;
8905		ctx.fillStyle = config.legendFillColor;
8906		ctx.drawRectangle({x:legendMsr.xLegendPos+legendMsr.legendBackgroun
8906dColorXPos,y:legendMsr.yLegendPos+legendMsr.legendBackgroundColorYPos,width:legendMsr.legendBackgroundColorWidth,height:legendMsr.legendBackgroundColorHeight,borders:config.legendBorders,bordersWidth:Math.ceil(ctx.chartLineScale*config.legendBordersWidth),borderSelection:config.legendBordersSelection,borderRadius:config.legendBordersRadius,fill:true,stroke:false});
8907	}	
8908	if(config.legendBorders) {
8909		ctx.fillStyle = config.legendFillColor;
8910		ctx.setLineDash(lineStyleFn(config.legendBordersStyle));
8911		ctx.lineWidth = Math.ceil(ctx.chartLineScale*config.legendBordersWidth);
8912		ctx.strokeStyle = config.legendBordersColors;
8913		ctx.drawRectangle({x:legendMsr.xLegendPos+legendMsr.legendBorderXPos,y:legendMsr.yLegendPos+legendMsr.legendBorderYPos,width:legendMsr.legendBorderWidth,height:legendMsr.legendBorderHeight,borders:true,bordersWidth:Math.ceil(ctx.chartLineScale*config.legendBordersWidth),borderSelection:config.legendBordersSelection,borderRadius:config.legendBordersRadius,fill:false,stroke:true});
8914	}
8915	ctx.setLineDash([]);
8916	ctx.restore();
8917
8918
8919		var xpos,ypos,fromi,orderi,i,tpof,lgtxt,nbcols;
8920		var lgdbox=legendMsr.legendBox;
8921
8922		nbcols = legendMsr.nbLegendCols - 1;
8923		var yFirstLegendTextPos=legendMsr.yLegendPos+legendMsr.legendFirstTextYPos+legendMsr.highestLegend;
8924		var xFirstLegendTextPos=legendMsr.xLegendPos+legendMsr.legendFirstTextXPos;
8925		ypos = yFirstLegendTextPos - ((Math.ceil(ctx.chartTextScale*config.legendFontSize)) + Math.ceil(ctx.chartSpaceScale*config.legendSpaceBetweenTextVertical));
8926		xpos = 0;
8927		fromi = data.datasets.length;
8928		for (i = fromi - 1; i >= 0; i--) {
8929			orderi = i;
8930			if (legendMsr.reverseLegend) {
8931				orderi = data.datasets.length - i - 1;
8932			}
8933			tpof = typeof(data.datasets[orderi].title);
8934			if (tpof == "string") {
8935				lgtxt = fmtChartJS(config, data.datasets[orderi].title, config.fmtLegend).trim();
8936				if (lgtxt != "") {
8937					nbcols++;
8938					if (nbcols == legendMsr.nbLegendCols) {
8939						nbcols = 0;
8940						xpos = xFirstLegendTextPos;
8941						ypos += (Math.ceil(ctx.chartTextScale*config.legendFontSize)) + Math.ceil(ctx.chartSpaceScale*config.legendSpaceBetweenTextVertical);
8942					} else {
8943						xpos += legendMsr.widestLegend + Math.ceil(ctx.chartSpaceScale*config.legendSpaceBetweenTextHorizontal);
8944					}
8945					ctx.save();
8946					ctx.beginPath();
8947					if(ctx.tpchart=="Bar" || ctx.tpchart=="StackedBar") if (data.datasets[orderi].type=="Line" && (!config.datasetFill || setOptionValue(true,false,1,"LINKTYPE",ctx,data,undefined,data.datasets[orderi].linkType,config.linkType,"linkType",orderi,-1,{nullvalue : null} )==1)) lgdbox=false;
8948					if (lgdbox) {
8949 						ctx.lineWidth = Math.ceil(ctx.chartLineScale*setOptionValue(true,false,1,"LINEWIDTH",ctx,data,undefined,data.datasets[orderi].datasetStrokeWidth,config.datasetStrokeWidth,"datasetStrokeWidth",orderi,-1,{nullvalue : null} ));
8950						ctx.beginPath();
8951						ctx.strokeStyle=setOptionValue(true,false,1,"LEGENDSTROKECOLOR",ctx,data,undefined,data.datasets[orderi].strokeColor,config.defaultFillColor,"strokeColor",orderi,-1,{animationValue: 1, xPosLeft : xpos, yPosBottom : ypos, xPosRight : xpos + Math.ceil(ctx.chartTextScale*config.legendBlockSize), yPosTop : ypos - (Math.ceil(ctx.chartTextScale*config.legendFontSize))} );
8952						ctx.setLineDash(lineStyleFn(setOptionValue(true,false,1,"LEGENDLINEDASH",ctx,data,undefined,data.datasets[orderi].datasetStrokeStyle,config.datasetStrokeStyle,"datasetStrokeStyle",orderi,-1,{animationValue: 1, xPosLeft : xpos, yPosBottom : ypos, xPosRight : xpos + Math.ceil(ctx.chartTextScale*config.legendBlockSize), yPosTop : ypos - (Math.ceil(ctx.chartTextScale*config.legendFontSize))} )));
8953						ctx.moveTo(xpos, ypos);
8954						ctx.lineTo(xpos + Math.ceil(ctx.chartTextScale*config.legendBlockSize), ypos);
8955						ctx.lineTo(xpos + Math.ceil(ctx.chartTextScale*config.legendBlockSize), ypos - (Math.ceil(ctx.chartTextScale*config.legendFontSize)));
8956						ctx.lineTo(xpos, ypos - (Math.ceil(ctx.chartTextScale*config.legendFontSize)));
8957						ctx.lineTo(xpos, ypos);
8958						ctx.stroke();
8959						ctx.closePath();
8960						ctx.fillStyle=setOptionValue(true,false,1,"LEGENDFILLCOLOR",ctx,data,undefined,data.datasets[orderi].fillColor,config.defaultFillColor,"fillColor",orderi,-1,{animationValue: 1, xPosLeft : xpos, yPosBottom : ypos, xPosRight : xpos + Math.ceil(ctx.chartTextScale*config.legendBlockSize), yPosTop : ypos - (Math.ceil(ctx.chartTextScale*config.legendFontSize))} );
8961						ctx.fill();
8962					} else {
8963						ctx.lineWidth = config.legendColorIndicatorStrokeWidth ?
8964							config.legendColorIndicatorStrokeWidth : Math.ceil(ctx.chartLineScale*setOptionValue(true,false,1,"LINEWIDTH",ctx,data,undefined,data.datasets[orderi].datasetStrokeWidth,config.datasetStrokeWidth,"datasetStrokeWidth",orderi,-1,{nullvalue : null} ));
8965						if (config.legendColorIndicatorStrokeWidth && config.legendColorIndicatorStrokeWidth > (Math.ceil(ctx.chartTextScale*config.legendFontSize))) {
8966							ctx.lineWidth = (Math.ceil(ctx.chartTextScale*config.legendFontSize));
8967						}
8968						ctx.strokeStyle=setOptionValue(true,false,1,"LEGENDSTROKECOLOR",ctx,data,undefined,data.datasets[orderi].strokeColor,config.defaultFillColor,"strokeColor",orderi,-1,{animationValue: 1, xPosLeft : xpos, yPosBottom : ypos, xPosRight : xpos + Math.ceil(ctx.chartTextScale*config.legendBlockSize), yPosTop : ypos - (Math.ceil(ctx.chartTextScale*config.legendFontSize))} );
8969						ctx.setLineDash(lineStyleFn(setOptionValue(true,false,1,"LEGENDLINEDASH",ctx,data,undefined,data.datasets[orderi].datasetStrokeStyle,config.datasetStrokeStyle,"datasetStrokeStyle",orderi,-1,{animationValue: 1, xPosLeft : xpos, yPosBottom : ypos, xPosRight : xpos + Math.ceil(ctx.chartTextScale*config.legendBlockSize), yPosTop : ypos - (Math.ceil(ctx.chartTextScale*config.legendFontSize))} )));
8970     						ctx.moveTo(xpos + 2, ypos - ((Math.ceil(ctx.chartTextScale*config.legendFontSize)) / 2));
8971						ctx.lineTo(xpos + 2 + Math.ceil(ctx.chartTextScale*config.legendBlockSize), ypos - ((Math.ceil(ctx.chartTextScale*config.legendFontSize)) / 2));
8972						ctx.stroke();
8973				
8974						ctx.fill();
8975
8976						if(config.pointDot) {
8977							ctx.beginPath();
8978				 			ctx.fillStyle=setOptionValue(true,false,1,"LEGENDMARKERFILLCOLOR",ctx,data,undefined,data.datasets[orderi].pointColor,config.defaultStrokeColor,"pointColor",orderi,-1,{nullvalue: true} );
8979							ctx.strokeStyle=setOptionValue(true,false,1,"LEGENDMARKERSTROKESTYLE",ctx,data,undefined,data.datasets[orderi].pointStrokeColor,config.defaultStrokeColor,"pointStrokeColor",orderi,-1,{nullvalue: true} );
8980							ctx.lineWidth=setOptionValue(true,false,ctx.chartLineScale,"LEGENDMARKERLINEWIDTH",ctx,data,undefined,data.datasets[orderi].pointDotStrokeWidth,config.pointDotStrokeWidth,"pointDotStrokeWidth",orderi,-1,{nullvalue: true} );
8981        	               	
8982							var markerShape=setOptionValue(true,false,1,"LEGENDMARKERSHAPE",ctx,data,undefined,data.datasets[orderi].markerShape,config.markerShape,"markerShape",orderi,-1,{nullvalue: true} );
8983							var markerRadius=setOptionValue(true,false,ctx.chartSpaceScale,"LEGENDMARKERRADIUS",ctx,data,undefined,data.datasets[orderi].pointDotRadius,config.pointDotRadius,"pointDotRadius",orderi,-1,{nullvalue: true} );
8984							var markerStrokeStyle=setOptionValue(true,false,1,"LEGENDMARKERSTROKESTYLE",ctx,data,undefined,data.datasets[orderi].pointDotStrokeStyle,config.pointDotStrokeStyle,"pointDotStrokeStyle",orderi,-1,{nullvalue: true} );
8985							drawMarker(ctx,xpos + 2 + Math.ceil(ctx.chartTextScale*config.legendBlockSize)/2, ypos - ((Math.ceil(ctx.chartTextScale*config.legendFontSize)) / 2), markerShape,markerRadius,markerStrokeStyle);							
8986						}
8987						ctx.fill();
8988        				}
8989					ctx.restore();
8990					ctx.save();
8991					ctx.beginPath();
8992					ctx.font = config.legendFontStyle + " " + (Math.ceil(ctx.chartTextScale*config.legendFontSize)).toString() + "px " + config.legendFontFamily;
8993					ctx.fillStyle = setOptionValue(true,false,1,"LEGENDFONTCOLOR",ctx,data,undefined,undefined,config.legendFontColor,"legendFontColor",orderi,-1,{nullvalue: true} );
8994					ctx.textAlign = "left";
8995					ctx.textBaseline = "bottom";
8996					ctx.translate(xpos + Math.ceil(ctx.chartTextScale*config.legendBlockSize) + Math.
8996ceil(ctx.chartSpaceScale*config.legendSpaceBetweenBoxAndText), ypos);
8997					ctx.fillTextMultiLine(lgtxt, 0, 0, ctx.textBaseline, Math.ceil(ctx.chartTextScale*config.legendFontSize), true,config.detectMouseOnText,ctx,"LEGEND_TEXTMOUSE",0,xpos + Math.ceil(ctx.chartTextScale*config.legendBlockSize) + Math.ceil(ctx.chartSpaceScale*config.legendSpaceBetweenBoxAndText), ypos,orderi,-1);
8998					ctx.restore();
8999				}
9000			}
9001		}
9002};
9003
9004function measureLegend(data,ctx,config,widestLegend,highestLegend,nbLegendLines,nbLegendCols,availableLegendWidth) {
9005
9006
9007	var legendWidth=0;
9008	var legendHeight=0;
9009	var legendBackgroundColorWidth=0;
9010	var legendBackgroundColorHeight=0;
9011	var legendBorderWidth=0;
9012	var legendBorderHeight=0;
9013
9014	var legendFirstTextXPos=0;
9015	var legendFirstTextYPos=0;
9016	var legendBackgroundColorXPos=0;
9017	var legendBackgroundColorYPos=0;
9018	var legendBorderXPos=0;
9019	var legendBorderYPos=0;
9020	
9021	legendBackgroundColorHeight = nbLegendLines * (highestLegend + Math.ceil(ctx.chartSpaceScale*config.legendSpaceBetweenTextVertical  )) - Math.ceil(ctx.chartSpaceScale*config.legendSpaceBetweenTextVertical)   + Math.ceil(ctx.chartSpaceScale*config.legendSpaceBeforeText) + Math.ceil(ctx.chartSpaceScale*config.legendSpaceAfterText);
9022	legendBackgroundColorWidth  = nbLegendCols  * (widestLegend  + Math.ceil(ctx.chartSpaceScale*config.legendSpaceBetweenTextHorizontal)) - Math.ceil(ctx.chartSpaceScale*config.legendSpaceBetweenTextHorizontal) + Math.ceil(ctx.chartSpaceScale*config.legendSpaceLeftText)   + Math.ceil(ctx.chartSpaceScale*config.legendSpaceRightText);
9023
9024	legendHeight=legendBackgroundColorHeight;
9025	legendWidth=legendBackgroundColorWidth;
9026
9027	legendFirstTextXPos=Math.ceil(ctx.chartSpaceScale*config.legendSpaceLeftText);
9028	legendFirstTextYPos=Math.ceil(ctx.chartSpaceScale*config.legendSpaceBeforeText);
9029
9030	if (config.legendBorders == true) {
9031	        legendBorderWidth=legendWidth;
9032		legendBorderHeight=legendHeight;
9033	        if(isBorder(config.legendBordersSelection,"LEFT")){
9034			legendBorderWidth  +=Math.ceil(ctx.chartLineScale*config.legendBordersWidth)/2;
9035			legendWidth        +=Math.ceil(ctx.chartLineScale*config.legendBordersWidth)+Math.ceil(ctx.chartSpaceScale*config.legendBordersSpaceLeft);
9036			legendFirstTextXPos+=Math.ceil(ctx.chartLineScale*config.legendBordersWidth)+Math.ceil(ctx.chartSpaceScale*config.legendBordersSpaceLeft);
9037			legendBorderXPos+=Math.ceil(ctx.chartSpaceScale*config.legendBordersSpaceLeft)+Math.ceil(ctx.chartLineScale*config.legendBordersWidth)/2;
9038			legendBackgroundColorXPos+=Math.ceil(ctx.chartLineScale*config.legendBordersWidth)+Math.ceil(ctx.chartSpaceScale*config.legendBordersSpaceLeft);
9039		} else if(config.legendFillColor != "rgba(0,0,0,0)") {
9040			legendWidth        +=Math.ceil(ctx.chartSpaceScale*config.legendBordersSpaceLeft);
9041			legendFirstTextXPos+=Math.ceil(ctx.chartSpaceScale*config.legendBordersSpaceLeft);
9042			legendBackgroundColorXPos+=Math.ceil(ctx.chartSpaceScale*config.legendBordersSpaceLeft);
9043			legendBorderXPos+=Math.ceil(ctx.chartSpaceScale*config.legendBordersSpaceLeft);
9044		}
9045	        if(isBorder(config.legendBordersSelection,"RIGHT")){
9046			legendBorderWidth+= Math.ceil(ctx.chartLineScale*config.legendBordersWidth)/2;
9047			legendWidth      += Math.ceil(ctx.chartLineScale*config.legendBordersWidth)+Math.ceil(ctx.chartSpaceScale*config.legendBordersSpaceRight);
9048		} else if(config.legendFillColor != "rgba(0,0,0,0)") {
9049			legendWidth        +=Math.ceil(ctx.chartSpaceScale*config.legendBordersSpaceRight);
9050		}
9051
9052		if(isBorder(config.legendBordersSelection,"TOP")){
9053			legendBorderHeight +=Math.ceil(ctx.chartLineScale*config.legendBordersWidth)/2;
9054			legendHeight       +=Math.ceil(ctx.chartLineScale*config.legendBordersWidth)+Math.ceil(ctx.chartSpaceScale*config.legendBordersSpaceBefore);
9055			legendFirstTextYPos+=Math.ceil(ctx.chartLineScale*config.legendBordersWidth)+Math.ceil(ctx.chartSpaceScale*config.legendBordersSpaceBefore);
9056			legendBackgroundColorYPos+=Math.ceil(ctx.chartLineScale*config.legendBordersWidth)+Math.ceil(ctx.chartSpaceScale*config.legendBordersSpaceBefore);
9057			legendBorderYPos+=Math.ceil(ctx.chartSpaceScale*config.legendBordersSpaceBefore)+Math.ceil(ctx.chartLineScale*config.legendBordersWidth)/2;
9058		} else if(config.legendFillColor != "rgba(0,0,0,0)") {
9059			legendHeight        +=Math.ceil(ctx.chartSpaceScale*config.legendBordersSpaceBefore);
9060			legendFirstTextYPos+=Math.ceil(ctx.chartSpaceScale*config.legendBordersSpaceBefore);
9061			legendBackgroundColorYPos+=Math.ceil(ctx.chartSpaceScale*config.legendBordersSpaceBefore);
9062			legendBorderYPos+=Math.ceil(ctx.chartSpaceScale*config.legendBordersSpaceBefore);
9063		}
9064	        if(isBorder(config.legendBordersSelection,"BOTTOM")){
9065			legendBorderHeight+=Math.ceil(ctx.chartLineScale*config.legendBordersWidth)/2;
9066			legendHeight      +=Math.ceil(ctx.chartLineScale*config.legendBordersWidth)+Math.ceil(ctx.chartSpaceScale*config.legendBordersSpaceAfter);
9067		} else if(config.legendFillColor != "rgba(0,0,0,0)") {
9068			legendHeight        +=Math.ceil(ctx.chartSpaceScale*config.legendBordersSpaceAfter);
9069		}
9070
9071	} else if (config.legendFillColor != "rgba(0,0,0,0)") {
9072		legendWidth +=  Math.ceil(ctx.chartSpaceScale*(config.legendBordersSpaceRight+config.legendBordersSpaceLeft));
9073		legendHeight+=  Math.ceil(ctx.chartSpaceScale*(config.legendBordersSpaceBefore+config.legendBordersSpaceAfter));
9074		legendBackgroundColorXPos+=Math.ceil(ctx.chartSpaceScale*config.legendBordersSpaceLeft);
9075		legendBackgroundColorYPos+=Math.ceil(ctx.chartSpaceScale*config.legendBordersSpaceBefore);
9076		legendFirstTextXPos +=Math.ceil(ctx.chartSpaceScale*config.legendBordersSpaceLeft);
9077		legendFirstTextYPos +=Math.ceil(ctx.chartSpaceScale*config.legendBordersSpaceBefore);
9078	}	
9079
9080	return {
9081		legendWidth: legendWidth,
9082		legendHeight: legendHeight,
9083		legendBackgroundColorWidth:legendBackgroundColorWidth,
9084		legendBackgroundColorHeight:legendBackgroundColorHeight,
9085		legendBorderWidth:legendBorderWidth,
9086		legendBorderHeight:legendBorderHeight,
9087
9088		legendFirstTextXPos:legendFirstTextXPos,
9089		legendFirstTextYPos:legendFirstTextYPos,
9090		legendBackgroundColorXPos:legendBackgroundColorXPos,
9091		legendBackgroundColorYPos:legendBackgroundColorYPos,
9092		legendBorderXPos:legendBorderXPos,
9093		legendBorderYPos:legendBorderYPos,
9094		elementMsr : null
9095	};
9096};
9097
9098function drawMarker(ctx,xpos,ypos,marker,markersize,markerStrokeStyle) {
9099	ctx.setLineDash(lineStyleFn(markerStrokeStyle));
9100	switch (marker) {
9101		case "square":
9102			ctx.rect(xpos-markersize,ypos-markersize,2*markersize,2*markersize);
9103			ctx.stroke();
9104			ctx.fill();
9105			ctx.setLineDash([]);
9106			break;
9107		case "triangle":
9108			pointA_x=0;
9109			pointA_y=2/3*markersize;
9110			ctx.moveTo(xpos,ypos-pointA_y);
9111			ctx.lineTo(xpos+pointA_y*Math.sin(4/3),ypos+pointA_y*Math.cos(4/3));
9112			ctx.lineTo(xpos-pointA_y*Math.sin(4/3),ypos+pointA_y*Math.cos(4/3));
9113			ctx.lineTo(xpos,ypos-pointA_y);
9114			ctx.stroke();
9115			ctx.fill();
9116			ctx.setLineDash([]);
9117			break;
9118		case "diamond":
9119			ctx.moveTo(xpos, ypos+markersize);
9120			ctx.lineTo(xpos+markersize, ypos);
9121			ctx.lineTo(xpos, ypos-markersize);
9122			ctx.lineTo(xpos-markersize, ypos);
9123			ctx.lineTo(xpos, ypos+markersize);
9124			ctx.stroke();
9125			ctx.fill();
9126			ctx.setLineDash([]);
9127			break;
9128		case "plus":
9129			ctx.moveTo(xpos, ypos-markersize);
9130			ctx.lineTo(xpos, ypos+markersize);
9131			ctx.moveTo(xpos-markersize, ypos);
9132			ctx.lineTo(xpos+markersize, ypos);
9133			ctx.stroke();
9134			ctx.setLineDash([]);
9135			break;
9136		case "cross":
9137			ctx.moveTo(xpos-markersize, ypos-markersize);
9138			ctx.lineTo(xpos+markersize, ypos+markersize);
9139			ctx.moveTo(xpos-markersize, ypos+markersize);
9140			ctx.lineTo(xpos+markersize, ypos-markersize);
9141			ctx.stroke();
9142			ctx.setLineDash([]);
9143			break;
9144		case "circle":
9145		default:
9146			ctx.arc(xpos, ypos, markersize, 0, 2*Math.PI * 1, true);
9147			ctx.stroke();
9148			ctx.fill();
9149			ctx.setLineDash([]);
9150			break;
9151	}
9152};
9153
9154function initPassVariableData_part1(data,config,ctx) {
9155
9156var i,j,result, mxvalue ,mnvalue, cumvalue, totvalue,lmaxvalue,lminvalue,lgtxt,lgtxt2,tp,prevpos,firstNotMissingi,lastNotMissingi,firstNotMissingj,lastNotMissingj,grandtotal;
9157var startAngle,segmentAngle,cumulativeAngle,realCumulativeAngle;
9158var MstartAngle,McumulativeAngle,MrealCumulativeAngle;
9159var startRadius,stopRadius;
9160 
9161		var axis;
9162		result=[];
9163		mxvalue=[];
9164		mxvalue[0]=[];
9165		mxvalue[1]=[];
9166		mnvalue=[];
9167		mnvalue[0]=[];
9168		mnvalue[1]=[];
9169		cumvalue=[];
9170		cumvalue[0]=[];
9171		cumvalue[1]=[];
9172		totvalue=[];
9173		totvalue[0]=[];
9174		totvalue[1]=[];
9175		lmaxvalue=[];
9176		lmaxvalue[0]=[];
9177		lmaxvalue[1]=[];
9178		lminvalue=[];
9179		lminvalue[0]=[];
9180		lminvalue[1]=[];
9181		prevpos=[];
9182		firstNotMissingi=[];
9183		lastNotMissingi=[];
9184		firstNotMissingj=[];
9185		lastNotMissingj=[];
9186		prevpos[0]=[];
9187		prevpos[1]=[];
9188		grandtotal=0;
9189		MstartAngle=[];                               
9190		McumulativeAngle=[];
9191		MrealCumulativeAngle=[];
9192		startRadius=[];
9193		stopRadius=[];
9194
9195 		switch(ctx.tpchart)  {
9196			case "PolarArea" :
9197				var notemptyval, prevnotemptyval;
9198				notemptyval=[];
9199				prevnotemptyval=[];
9200				for(i=0;i<data.datasets.length;i++) {
9201					for(j=0;j<data.labels.length;j++) {
9202						if(i==0)notemptyval[j]=0;
9203						if(typeof data.datasets[i].data[j] != "undefined")notemptyval[j]++;
9204					}
9205				}
9206				var maxnotemptyval=0;
9207				var nbnotemptyval=0;
9208				for(j=0;j<data.labels.length;j++) {
9209					prevnotemptyval[j]=nbnotemptyval
9210					maxnotemptyval=Math.max(notemptyval[j],maxnotemptyval);
9211					if(notemptyval[j]>0)nbnotemptyval++;
9212					startRadius[j]=0;					
9213					stopRadius[j]=1;
9214				}
9215				var totWeight=1;
9216				break;
9217			case "Doughnut" :
9218			case "Pie" :
9219				var totWeight=0;
9220				var debPos=0;
9221				var vl1,vl2;
9222				for(j=0;j<data.labels.length;j++) {
9223					vl1=setOptionValue(true,true,1,"RADIUSSPACEWEIGHT",ctx,data,null,data.radiusSpaceWeight,config.radiusSpaceWeight,"radiusSpaceWeight",j,-1,{nullvalue : null} );
9224					vl2=setOptionValue(true,true,1,"RADIUSDATAWEIGHT",ctx,data,null,data.radiusDataWeight,config.radiusDataWeight,"radiusDataWeight",j,-1,{nullvalue : null} );
9225					if(j!=0){debPos+=vl1;totWeight+=vl1;}
9226					startRadius[j]=debPos;
9227					totWeight+=vl2;
9228					stopRadius[j]=totWeight;
9229					debPos+=vl2;
9230				}
9231				break;
9232			default:
9233				break;
9234		}                
9235                
9236		for (i = 0; i < data.datasets.length; i++) {
9237			// BUG when all data are missing !
9238			if (typeof data.datasets[i].xPos != "undefined" && tpdraw(ctx,data.datasets[i])=="Line") {
9239				for(j=data.datasets[i].data.length;j<data.datasets[i].xPos.length;j++)data.datasets[i].data.push(undefined);
9240			} else {
9241				for(j=data.datasets[i].data.length;j<data.labels.length;j++)data.datasets[i].data.push(undefined);
9242			}
9243				
9244
9245			if(data.datasets[i].axis == 2) axis=0;else axis=1;
9246			result[i]=[];
9247			lmaxvalue[0][i]=-Number.MAX_VALUE;
9248			lmaxvalue[1][i]=-Number.MAX_VALUE;
9249			lminvalue[0][i]=Number.MAX_VALUE;
9250			lminvalue[1][i]=Number.MAX_VALUE;
9251			firstNotMissingi[i]=-1;
9252			lastNotMissingi[i]=-1;
9253			for (j = 0; j < data.datasets[i].data.length; j++) {
9254
9255				if(typeof firstNotMissingj[j]== "undefined"){
9256					firstNotMissingj[j]=-1;
9257					lastNotMissingj[j]=-1;
9258					totvalue[0][j] = 0; 
9259					mxvalue[0][j]=-Number.MAX_VALUE;
9260					mnvalue[0][j]=Number.MAX_VALUE;
9261					totvalue[1][j] = 0; 
9262					mxvalue[1][j]=-Number.MAX_VALUE;
9263					mnvalue[1][j]=Number.MAX_VALUE;
9264				}
9265				var todisplay=true;
9266				if(ctx.tpchart=="Doughnut") {
9267					if(setOptionValue(false,true,1,"DISPLAYDATA",ctx,data,null,data.datasets[i].displayData,config.displayData,"displayData",i,j,{nullvalue : null}
9267 )== false) todisplay=false;
9268					if(setOptionValue(false,true,1,"DISPLAYDATA",ctx,data,null,data.displayData,config.displayData,"displayData",-1,j,{nullvalue : null} )== false) todisplay=false;
9269				} else {
9270					if(setOptionValue(true,true,1,"DISPLAYDATA",ctx,data,null,data.datasets[i].displayData,config.displayData,"displayData",i,j,{nullvalue : null} )== false) todisplay=false;
9271					if(setOptionValue(true,true,1,"DISPLAYDATA",ctx,data,null,data.displayData,config.displayData,"displayData",j,-1,{nullvalue : null} )== false) todisplay=false;
9272				}
9273				if(typeof data.datasets[i].data[j]=="undefined")todisplay=false;
9274				if (todisplay==true) {
9275					grandtotal += 1 * data.datasets[i].data[j];
9276					if(firstNotMissingi[i]==-1)firstNotMissingi[i]=j;
9277					lastNotMissingi[i]=j;
9278					if(firstNotMissingj[j]==-1)firstNotMissingj[j]=i;
9279					lastNotMissingj[j]=i;
9280					totvalue[axis][j] += 1 * data.datasets[i].data[j]; 
9281					mxvalue[axis][j] =Math.max(mxvalue[axis][j],1 * data.datasets[i].data[j]);
9282					mnvalue[axis][j] =Math.min(mnvalue[axis][j],1 * data.datasets[i].data[j]);
9283					lmaxvalue[axis][i] =Math.max(lmaxvalue[axis][i],1 * data.datasets[i].data[j]);
9284					lminvalue[axis][i] =Math.min(lminvalue[axis][i],1 * data.datasets[i].data[j]);
9285				}
9286			}
9287		}
9288		
9289		for (i = 0; i < data.datasets.length; i++) {
9290			if(data.datasets[i].axis == 2) axis=0;else axis=1;
9291			if (typeof(data.datasets[i].title) == "string") lgtxt = data.datasets[i].title.trim();
9292			else lgtxt = "";
9293			var prevnotemptyj=-1;
9294			var prevemptyj=-1;
9295			for (j = 0; j < data.datasets[i].data.length; j++) {
9296			
9297				if(typeof cumvalue[0][j]== "undefined"){cumvalue[0][j] = 0; prevpos[0][j]=-1;cumvalue[1][j] = 0; prevpos[1][j]=-1; }
9298				lgtxt2 = "";
9299				if (typeof data.datasets[i].xPos != "undefined") {
9300					if (!(typeof data.datasets[i].xPos[j] == "undefined")) lgtxt2 = data.datasets[i].xPos[j];
9301				}
9302				if (lgtxt2 == "" && !(typeof(data.labels[j]) == "undefined")) lgtxt2 = data.labels[j];
9303				if (typeof lgtxt2 == "string") lgtxt2 = lgtxt2.trim();
9304
9305				var todisplay=true;
9306				if(tpdraw(ctx,data.datasets[i])=="Line") {
9307					if(setOptionValue(true,true,1,"DISPLAYDATA",ctx,data,null,data.datasets[i].displayData,config.displayData,"displayData",i,j,{nullvalue : null} )== false) todisplay=false;
9308					if(setOptionValue(true,true,1,"DISPLAYDATA",ctx,data,null,data.displayData,config.displayData,"displayData",j,-1,{nullvalue : null} )== false) todisplay=false;
9309				}
9310				if(typeof data.datasets[i].data[j]=="undefined")todisplay=false;
9311
9312				
9313				if (todisplay ) {
9314					cumvalue[axis][j]+=1*data.datasets[i].data[j];
9315					switch(tpdraw(ctx,data.datasets[i]))  {
9316						case "PolarArea" :
9317						case "Doughnut" :
9318						case "Pie" :
9319                					if(i==0) {
9320					 			if(j==0) {
9321									var realAmplitude = (((config.totalAmplitude * (Math.PI / 180) + 2 * Math.PI) % (2 * Math.PI)) + 2* Math.PI) % (2* Math.PI) ; 
9322									if(realAmplitude <= config.zeroValue)realAmplitude=2*Math.PI;
9323								}
9324								McumulativeAngle[j] = (((-config.startAngle * (Math.PI / 180) + 2 * Math.PI) % (2 * Math.PI)) + 2* Math.PI) % (2* Math.PI) ; 
9325								MrealCumulativeAngle[j] = (((config.startAngle * (Math.PI / 180) + 2 * Math.PI) % (2 * Math.PI)) + 2* Math.PI) % (2* Math.PI) ; 
9326								if(ctx.tpchart=="PolarArea") {
9327									McumulativeAngle[j] +=prevnotemptyval[j]*(realAmplitude/nbnotemptyval);
9328									MrealCumulativeAngle[j] -=prevnotemptyval[j]*(realAmplitude/nbnotemptyval);
9329								}
9330								MstartAngle[j]=McumulativeAngle[j];
9331							}
9332							if(ctx.tpchart=="PolarArea") { if(notemptyval[j]>0)segmentAngle= (realAmplitude/nbnotemptyval)/notemptyval[j]; else segmentAngle=0; }
9333							else segmentAngle = (1 * data.datasets[i].data[j] / totvalue[axis][j]) * realAmplitude;
9334							if (segmentAngle >= Math.PI * 2) segmentAngle = Math.PI * 2 - 0.001; // bug on Android when segmentAngle is >= 2*PI;
9335							result[i][j]= {
9336								config: config,
9337								v1: fmtChartJS(config, lgtxt, config.fmtV1),
9338								v2: fmtChartJS(config, lgtxt2, config.fmtV2),
9339								v3: fmtChartJS(config, 1 * data.datasets[i].data[j], config.fmtV3),
9340								v4: fmtChartJS(config, cumvalue[axis][j], config.fmtV4),
9341								v5: fmtChartJS(config, totvalue[axis][j], config.fmtV5),
9342								v6: roundToWithThousands(config, fmtChartJS(config, 100 * data.datasets[i].data[j] / totvalue[axis][j], config.fmtV6), config.roundPct),
9343								v6T: roundToWithThousands(config, fmtChartJS(config, 100 * data.datasets[i].data[j] / grandtotal, config.fmtV6T), config.roundPct),
9344								v7 : 0,
9345								v8 : 0,
9346								v9 : 0,
9347								v10 : 0,
9348								v11: fmtChartJS(config, i, config.fmtV11),
9349								v12: fmtChartJS(config, j, config.fmtV12),
9350								v13 : fmtChartJS(config, segmentAngle, config.fmtV13),
9351								v14 : fmtChartJS(config, McumulativeAngle[j] , config.fmtV14),
9352								v15 : fmtChartJS(config, McumulativeAngle[j] + segmentAngle, config.fmtV15),
9353								lgtxt: lgtxt,
9354								lgtxt2: lgtxt2,
9355								datavalue: 1 * data.datasets[i].data[j],
9356								cumvalue: cumvalue[axis][j],
9357								totvalue: totvalue[axis][j],
9358								pctvalue: 100 * data.datasets[i].data[j] / totvalue[axis][j],
9359								pctvalueT: 100 * data.datasets[i].data[j] / grandtotal,
9360								maxvalue : mxvalue[axis][j],
9361								minvalue : mnvalue[axis][j],
9362								lmaxvalue : lmaxvalue[axis][i],
9363								lminvalue : lminvalue[axis][i],
9364								grandtotal : grandtotal,
9365								firstNotMissing : firstNotMissingj[j],
9366								lastNotMissing : lastNotMissingj[j],
9367								prevNotMissing : prevnotemptyj,
9368								prevMissing : prevemptyj,
9369								nextNotMissing : -1,
9370								segmentAngle: segmentAngle,
9371								firstAngle : MstartAngle[j],
9372								startAngle: McumulativeAngle[j],
9373								realStartAngle : MrealCumulativeAngle[j],
9374								endAngle: McumulativeAngle[j]+segmentAngle,
9375							        radiusOffset : 0,
9376								midPosX : 0,
9377								midPosY : 0,
9378								int_radius : 0,
9379								ext_radius : 0,
9380								startRadius : startRadius[j]/totWeight,
9381								stopRadius  : stopRadius[j]/totWeight,
9382								totRadiusWeight : totWeight,	
9383								j: j,
9384								i: i,
9385								data: data
9386							};
9387							McumulativeAngle[j] =McumulativeAngle[j]+ segmentAngle;
9388							MrealCumulativeAngle[j] =MrealCumulativeAngle[j]- segmentAngle;
9389							break;
9390						case "Bar" :
9391						case "StackedBar" :
9392						case "HorizontalBar" :
9393						case "HorizontalStackedBar" :
9394							result[i][j]= {
9395								config: config,
9396								v1: fmtChartJS(config, lgtxt, config.fmtV1),
9397								v2: fmtChartJS(config, lgtxt2, config.fmtV2),
9398								v3: fmtChartJS(config, 1 * data.datasets[i].data[j], config.fmtV3),
9399								v4: fmtChartJS(config, cumvalue[axis][j], config.fmtV4),
9400								v5: fmtChartJS(config, totvalue[axis][j], config.fmtV5),
9401								v6: roundToWithThousands(config, fmtChartJS(config, 100 * data.datasets[i].data[j] / totvalue[axis][j], config.fmtV6), config.roundPct),
9402								v6T: roundToWithThousands(config, fmtChartJS(config, 100 * data.datasets[i].data[j] / grandtotal, config.fmtV6T), config.roundPct),
9403								v11: fmtChartJS(config, i, config.fmtV11),
9404								v12: fmtChartJS(config, j, config.fmtV12),
9405								lgtxt: lgtxt,
9406								lgtxt2: lgtxt2,
9407								datavalue: 1 * data.datasets[i].data[j],
9408								cumvalue: cumvalue[axis][j],
9409								totvalue: totvalue[axis][j],
9410								pctvalue: 100 * data.datasets[i].data[j] / totvalue[axis][j],
9411								pctvalueT: 100 * data.datasets[i].data[j] / grandtotal,
9412								maxvalue : mxvalue[axis][j],
9413								minvalue : mnvalue[axis][j],
9414								lmaxvalue : lmaxvalue[axis][i],
9415								lminvalue : lminvalue[axis][i],
9416								grandtotal : grandtotal,
9417								firstNotMissing : firstNotMissingj[j],
9418								lastNotMissing : lastNotMissingj[j],
9419								prevNotMissing : prevnotemptyj,
9420								prevMissing : prevemptyj,
9421								nextNotMissing : -1,
9422								j: j,
9423								i: i,
9424								data: data
9425							};
9426							if(1 * data.datasets[i].data[j]==0 && (tpdraw(ctx,data.datasets[i])=="HorizontalStackedBar" || tpdraw(ctx,data.datasets[i])=="StackedBar"))result[i][j].v3="";
9427							break;
9428						case "Line" :
9429						case "Radar" :
9430							result[i][j]= {
9431								config: config,
9432								v1: fmtChartJS(config, lgtxt, config.fmtV1),
9433								v2: fmtChartJS(config, lgtxt2, config.fmtV2),
9434								v3: fmtChartJS(config, 1 * data.datasets[i].data[j], config.fmtV3),
9435								v5: fmtChartJS(config, 1 * data.datasets[i].data[j], config.fmtV5),
9436								v6: fmtChartJS(config, mxvalue[axis][j], config.fmtV6),
9437								v7: fmtChartJS(config, totvalue[axis][j], config.fmtV7),
9438								v8: roundToWithThousands(config, fmtChartJS(config, 100 * data.datasets[i].data[j] / totvalue[axis][j], config.fmtV8), config.roundPct),
9439								v8T: roundToWithThousands(config, fmtChartJS(config, 100 * data.datasets[i].data[j] / grandtotal, config.fmtV8T), config.roundPct),
9440								v11: fmtChartJS(config, i, config.fmtV11),
9441								v12: fmtChartJS(config, j, config.fmtV12),
9442								lgtxt: lgtxt,
9443								lgtxt2: lgtxt2,
9444								datavalue: 1 * data.datasets[i].data[j],
9445								diffnext: 1 * data.datasets[i].data[j],
9446								pctvalue: 100 * data.datasets[i].data[j] / totvalue[axis][j],
9447								pctvalueT: 100 * data.datasets[i].data[j] / grandtotal,
9448								totvalue : totvalue[axis][j],
9449								cumvalue: cumvalue[axis][j],
9450								maxvalue : mxvalue[axis][j],
9451								minvalue : mnvalue[axis][j],
9452								lmaxvalue : lmaxvalue[axis][i],
9453								lminvalue : lminvalue[axis][i],
9454								grandtotal : grandtotal,
9455								firstNotMissing : firstNotMissingi[i],
9456								lastNotMissing : lastNotMissingi[i],
9457								prevNotMissing : prevnotemptyj,
9458								prevMissing : prevemptyj,
9459								nextNotMissing : -1,
9460								j: j,
9461								i: i,
9462								data: data
9463							};
9464							if(prevpos[axis][j]>=0){
9465								result[i][j].v4=fmtChartJS(config, (prevpos[axis][j] != -1 ? 1 * data.datasets[i].data[j]-result[prevpos[axis][j]][j].datavalue : 1 * data.datasets[i].data[j]), config.fmtV4);
9466								result[i][j].diffprev=(prevpos[axis][j] != -1 ? 1 * data.datasets[i].data[j]-result[prevpos[axis][j]][j].datavalue : 1 * data.datasets[i].data[j]);
9467								result[prevpos[axis][j]][j].diffnext=data.datasets[prevpos[axis][j]].data[j] - data.datasets[i].data[j];
9468								result[prevpos[axis][j]][j].v5=result[prevpos[axis][j]][j].diffnext;
9469							} else {
9470								result[i][j].v4=1 * data.datasets[i].data[j];
9471								
9472							}
9473							prevpos[axis][j]=i;
9474							break;
9475						default:
9476							break;
9477					}
9478					if(prevnotemptyj!= -1) {for(k=prevnotemptyj;k<j;k++) result[i][k].nextNotMissing=j;}	
9479					prevnotemptyj=j;
9480				} else {
9481					prevemptyj=j; 
9482					switch(tpdraw(ctx,data.datasets[i]))  {
9483						case "PolarArea" :
9484						case "Doughnut" :
9485						case "Pie" :
9486                					if(i==0) {
9487					 			if(j==0) {
9488									var realAmplitude = (((config.totalAmplitude * (Math.PI / 180) + 2 * Math.PI) % (2 * Math.PI)) + 2* Math.PI) % (2* Math.PI) ; 
9489									if(realAmplitude <= config.zeroValue)realAmplitude=2*Math.PI;
9490								}
9491								McumulativeAngle[j] = (((-config.startAngle * (Math.PI / 180) + 2 * Math.PI) % (2 * Math.PI)) + 2* Math.PI) % (2* Math.PI) ; 
9492								MrealCumulativeAngle[j] = (((config.startAngle * (Math.PI / 180) + 2 * Math.PI) % (2 * Math.PI)) + 2* Math.PI) % (2* Math.PI) ; 
9493								if(ctx.tpchart=="PolarArea") {
9494									McumulativeAngle[j] +=prevnotemptyval[j]*(realAmplitude/nbnotemptyval);
9495									MrealCumulativeAngle[j] -=prevnotemptyval[j]*(realAmplitude/nbnotemptyval);
9496								}
9497								MstartAngle[j]=McumulativeAngle[j];
9498							}
9499						case "Bar" :
9500						case "StackedBar" :
9501						case "HorizontalBar" :
9502						case "HorizontalStackedBar" :
9503							result[i][j] ={ 
9504								v1:lgtxt,
9505								lmaxvalue : lmaxvalue[axis][i],
9506								lminvalue : lminvalue[axis][i],
9507								firstNotMissing : firstNotMissingj[j],
9508								lastNotMissing : lastNotMissingj[j],
9509								prevNotMissing : prevnotemptyj,
9510								prevMissing : prevemptyj,
9511								grandtotal : grandtotal
9512								 }; 
9513							break;
9514						case "Line" :
9515						case "Radar" :
9516							result[i][j] ={ 
9517								v1:lgtxt,
9518								lmaxvalue : lmaxvalue[axis][i],
9519								lminvalue : lminvalue[axis][i],
9520								firstNotMissing : firstNotMissingi[i],
9521								lastNotMissing : lastNotMissingi[i],
9522								prevNotMissing : prevnotemptyj,
9523								prevMissing : prevemptyj,
9524								grandtotal : grandtotal
9525								 }; 
9526							break;
9527						}
9528				}
9529			}
9530		}
9531
9532	
9533return result;
9534
9535};
9536
9537function initPassVariableData_part2(statData,data,config,ctx,othervars) {
9538var realbars=0;
9539var i,j;
9540		var tempp = new Array(data.datasets.length);
9541		var tempn = new Array(data.datasets.length);
9542		for (i = 0; i < data.datasets.length; i++) {
9543			switch(tpdraw(ctx,data.datasets[i])) {
9544				case "PolarArea" :
9545				case "Pie" :
9546				case "Doughnut" :
9547					for (j = 0; j < data.datasets[i].data.length; j++) {
9548
9549
9550						statData[i][j].v7= fmtChartJS(config, othervars.midPosX, config.fmtV7);
9551						statData[i][j].v8= fmtChartJS(config, othervars.midPosY, config.fmtV8),
9552						statData[i][j].v9= fmtChartJS(config, othervars.int_radius+(othervars.ext_radius-othervars.int_radius)*statData[i][j].startRadius, config.fmtV9);
9553						statData[i][j].v10= fmtChartJS(config, othervars.int_radius+(othervars.ext_radius-othervars.int_radius)*statData[i][j].stopRadius, config.fmtV10);
9554						if(ctx.tpchart=="PolarArea") {
9555							statData[i][j].radiusOffset= calculateOffset(config.logarithmic, 1 * data.datasets[i].data[j], othervars.calculatedScale, othervars.scaleHop);
9556							statData[i][j].v10= fmtChartJS(config, statData[i].radiusOffset, config.fmtV10); 
9557						}
9558						else {
9559							statData[i][j].v10= fmtChartJS(config, othervars.ext_radius, config.fmtV10); 
9560							statData[i][j].radiusOffset=othervars.int_radius+(othervars.ext_radius-othervars.int_radius)*statData[i][j].stopRadius;
9561						}
9562						statData[i][j].outerVal= othervars.outerVal;
9563						statData[i][j].midPosX= othervars.midPosX;
9564						statData[i][j].midPosY= othervars.midPosY;
9565						statData[i][j].calculatedScale=othervars.calculatedScale;
9566						statData[i][j].scaleHop=othervars.scaleHop;
9567						statData[i][j].int_radius= othervars.int_radius+(othervars.ext_radius-othervars.int_radius)*statData[i][j].startRadius;
9568						statData[i][j].ext_radius= othervars.int_radius+(othervars.ext_radius-othervars.int_radius)*statData[i][j].stopRadius;
9569					}
9570					break;
9571				case "Line" :
9572					for (j = 0; j < data.datasets[i].data.length; j++) {
9573						statData[i][j].xAxisPosY = othervars.xAxisPosY;
9574						statData[i][j].yAxisPosX = othervars.yAxisPosX;
9575						statData[i][j].valueHop = othervars.valueHop;
9576						statData[i][j].nbValueHop = othervars.nbValueHop;
9577						if (data.datasets[i].axis == 2) {
9578							statData[i][j].scaleHop = othervars.scaleHop2;
9579							statData[i][j].zeroY = othervars.zeroY2;
9580							statData[i][j].calculatedScale = othervars.calculatedScale2;
9581							statData[i][j].logarithmic = othervars.logarithmic2;
9582						} else {
9583							statData[i][j].scaleHop = othervars.scaleHop;
9584							statData[i][j].zeroY = othervars.zeroY;
9585							statData[i][j].calculatedScale = othervars.calculatedScale;
9586							statData[i][j].logarithmic  = othervars.logarithmic;
9587						}
9588						statData[i][j].xPos=xPos(i,j,data,othervars.yAxisPosX,othervars.valueHop,othervars.nbValueHop);
9589						statData[i][j].yAxisPos=othervars.xAxisPosY - statData[i][j].zeroY;
9590						if(ctx.tpchart=="Bar" || ctx.tpchart=="StackedBar") {
9591							statData[i][j].xPos+=(othervars.valueHop/2);
9592							statData[i][j].yAxisPosX += (othervars.valueHop/2);
9593						}			
9594						if(j==0) {
9595							statData[i][j].lmaxvalue_offset=calculateOffset(statData[i][j].logarithmic, statData[i][j].lmaxvalue, statData[i][j].calculatedScale, statData[i][j].scaleHop) - statData[i][j].zeroY;
9596							statData[i][j].lminvalue_offset=calculateOffset(statData[i][j].logarithmic, statData[i][j].lminvalue, statData[i][j].calculatedScale, statData[i][j].scaleHop) - statData[i][j].zeroY;
9597						} else {
9598							statData[i][j].lmaxvalue_offset=statData[i][0].lmaxvalue_offset;
9599							statData[i][j].lminvalue_offset=statData[i][0].lminvalue_offset;
9600						}
9601						
9602						if (!(typeof(data.datasets[i].data[j]) == 'undefined')) {
9603							statData[i][j].yPosOffset= calculateOffset(statData[i][j].logarithmic, data.datasets[i].data[j], statData[i][j].calculatedScale, statData[i][j].scaleHop) - statData[i][j].zeroY;
9604							statData[i][j].posY=statData[i][j].yAxisPos - statData[i][j].yPosOffset;
9605						}
9606						if (typeof(data.datasets[i].origin) == 'object') {
9607							if (!(typeof(data.datasets[i].origin[j]) == 'undefined')) {
9608								statData[i][j].yPosOffsetOrigin= calculateOffset(statData[i][j].logarithmic, data.datasets[i].origin[j], statData[i][j].calculatedScale, statData[i][j].scaleHop) - statData[i][j].zeroY;
9609								statData[i][j].posYOrigin=statData[i][j].yAxisPos - statData[i][j].yPosOffsetOrigin;
9610							}
9611						}
9612						statData[i][j].posX=statData[i][j].xPos;
9613						
9614						statData[i][j].v9= statData[i][j].xPos;
9615						statData[i][j].v10=statData[i][j].posY;
9616
9617						statData[i][j].annotateStartPosX = statData[i][j].xPos;
9618						statData[i][j].annotateEndPosX = statData[i][j].xPos;
9619						statData[i][j].annotateStartPosY = othervars.xAxisPosY;
9620						statData[i][j].annotateEndPosY = othervars.xAxisPosY-othervars.msr.availableHeight;
9621						statData[i][j].D1A=undefined;
9622						statData[i][j].D1B=undefined;
9623					}
9624					break;
9625				case "Radar" :
9626					var rotationDegree = (2 * Math.PI) / data.datasets[0].data.length;
9627					for (j = 0; j < data.datasets[i].data.length; j++) {
9628						statData[i][j].midPosX =  othervars.midPosX;
9629						statData[i][j].midPosY =  othervars.midPosY;
9630						statData[i][j].int_radius= 0;
9631						statData[i][j].ext_radius= othervars.maxSize;
9632						statData[i][j].radiusOffset= othervars.maxSize;
9633						statData[i][j].calculatedScale= othervars.calculatedScale;
9634						statData[i][j].scaleHop= othervars.scaleHop;
9635						statData[i][j].calculated_offset= calculateOffset(config.logarithmic, data.datasets[i].data[j], othervars.calculatedScale, othervars.scaleHop);
9636						statData[i][j].offsetX=Math.cos(config.startAngle * Math.PI / 180 - j * rotationDegree) * statData[i][j].calculated_offset;
9637						statData[i][j].offsetY=Math.sin(config.startAngle * Math.PI / 180 - j * rotationDegree) * statData[i][j].calculated_offset;
9638						statData[i][j].v9=statData[i][j].midPosX + statData[i][j].offsetX;
9639						statData[i][j].v10=statData[i][j].midPosY - statData[i][j].offsetY;
9640						statData[i][j].posX=statData[i][j].midPosX + statData[i][j].offsetX;
9641						statData[i][j].posY=statData[i][j].midPosY - statData[i][j].offsetY;
9642						if(j==0)statData[i][j].calculated_offset_max=calculateOffset(config.logarithmic, statData[i][j].lmaxvalue, othervars.calculatedScale, othervars.scaleHop);
9643						else    statData[i][j].calculated_offset_max=statData[0][j].calculated_offset_max;
9644						statData[i][j].annotateStartPosX = othervars.midPosX;
9645						statData[i][j].annotateEndPosX = othervars.midPosX+Math.cos(config.startAngle * Math.PI / 180 - j * rotationDegree) * othervars.maxSize;
9646						statData[i][j].annotateStartPosY = othervars.midPosY;
9647						statData[i][j].annotateEndPosY = othervars.midPosY-Math.sin(config.startAngle * Math.PI / 180 - j * rotationDegree) * othervars.maxSize;
9648						if(Math.abs(statData[i][j].annotateStartPosX-statData[i][j].annotateEndPosX)<config.zeroValue) {
9649							statData[i][j].D1A=undefined;
9650							statData[i][j].D1B=undefined;
9651							statData[i][j].D2A=0;
9652						} else {
9653							statData[i][j].D1A=(statData[i][j].annotateStartPosY-statData[i][j].annotateEndPosY)/(statData[i][j].annotateStartPosX-statData[i][j].annotateEndPosX);
9654							statData[i][j].D1B=-statData[i][j].D1A*statData[i][j].annotateStartPosX+statData[i][j].annotateStartPosY;
9655							if(Math.abs(statData[i][j].D1A)>=config.zeroValue)statData[i][j].D2A=-(1/statData[i][j].D1A);
9656							else statData[i][j].D2A=undefined;
9657						}
9658
9659				        }
9660					break;
9661				case "Bar" :
9662					for (j = 0; j < data.datasets[i].data.length; j++) {
9663
9664						statData[i][j].xAxisPosY = othervars.xAxisPosY;
9665						statData[i][j].yAxisPosX = othervars.yAxisPosX;
9666						statData[i][j].valueHop = othervars.valueHop;
9667						statData[i][j].barWidth = othervars.barWidth;
9668						statData[i][j].additionalSpaceBetweenBars= othervars.additionalSpaceBetweenBars;
9669						statData[i][j].nbValueHop = othervars.nbValueHop;
9670						statData[i][j].calculatedScale = othervars.calculatedScale;
9671						statData[i][j].scaleHop = othervars.scaleHop;
9672			
9673						statData[i][j].xPosLeft= othervars.yAxisPosX + Math.ceil(ctx.chartSpaceScale*config.barValueSpacing) + othervars.valueHop * j + othervars.additionalSpaceBetweenBars+othervars.barWidth * realbars + Math.ceil(ctx.chartSpaceScale*config.barDatasetSpacing) * realbars + Math.ceil(ctx.chartLineScale*config.barStrokeWidth) * realbars;
9674						statData[i][j].xPosRight = statData[i][j].xPosLeft + othervars.barWidth;
9675						if (data.datasets[i].axis == 2) {
9676							statData[i][j].yPosBottom =othervars.xAxisPosY - othervars.zeroY2;
9677							statData[i][j].barHeight=calculateOffset(config.logarithmic2, 1 * data.datasets[i].data[j], othervars.calculatedScale2, othervars.scaleHop2) - othervars.zeroY2;
9678						} else {
9679							statData[i][j].yPosBottom =othervars.xAxisPosY - othervars.zeroY
9680							statData[i][j].barHeight=calculateOffset(config.logarithmic, 1 * data.datasets[i].data[j], othervars.calculatedScale, othervars.scaleHop) - othervars.zeroY;
9681						}
9682						statData[i][j].yPosTop = statData[i][j].yPosBottom - statData[i][j].barHeight + (Math.ceil(ctx.chartLineScale*config.barStrokeWidth) / 2);
9683						statData[i][j].v7=statData[i][j].xPosLeft;
9684						statData[i][j].v8=statData[i][j].yPosBottom;
9685						statData[i][j].v9=statData[i][j].xPosRight;
9686						statData[i][j].v10=statData[i][j].yPosTop;
9687
9688					}
9689					realbars++;
9690					break;			
9691				case "StackedBar" :
9692					for (j = 0; j < data.datasets[i].data.length; j++) {
9693						statData[i][j].xAxisPosY = othervars.xAxisPosY;
9694						statData[i][j].yAxisPosX = othervars.yAxisPosX;
9695						statData[i][j].valueHop = othervars.valueHop;
9696						statData[i][j].barWidth = othervars.barWidth;
9697						statData[i][j].additionalSpaceBetweenBars= othervars.additionalSpaceBetweenBars;
9698						statData[i][j].nbValueHop = othervars.nbValueHop;
9699						statData[i][j].calculatedScale = othervars.calculatedScale;
9700						statData[i][j].scaleHop = othervars.scaleHop;
9701			
9702						if (typeof tempp[j]=="undefined") {
9703							tempp[j]=0;
9704							tempn[j]=0;
9705							zeroY=  calculateOffset(config.logarithmic, 0 , othervars.calculatedScale, othervars.scaleHop);
9706						}
9707						if ((typeof data.datasets[i].data[j] == 'undefined')) continue;
9708						statData[i][j].xPosLeft= othervars.yAxisPosX + Math.ceil(ctx.chartSpaceScale*config.barValueSpacing) + othervars.valueHop * j+othervars.additionalSpaceBetweenBars;
9709						if (1*data.datasets[i].data[j]<0) {
9710							statData[i][j].botval=tempn[j];
9711							statData[i][j].topval=tempn[j]+1*data.datasets[i].data[j] ;
9712							tempn[j]=tempn[j]+1*data.datasets[i].data[j] ;
9713						} else {
9714							statData[i][j].botval=tempp[j];
9715							statData[i][j].topval=tempp[j]+1*data.datasets[i].data[j] ;
9716							tempp[j]=tempp[j]+1*data.datasets[i].data[j] ;
9717						}
9718						statData[i][j].xPosRight = statData[i][j].xPosLeft + othervars.barWidth;
9719						statData[i][j].botOffset = calculateOffset(config.logarithmic, statData[i][j].botval , othervars.calculatedScale, othervars.scaleHop);
9720						statData[i][j].topOffset = calculateOffset(config.logarithmic, statData[i][j].topval , othervars.calculatedScale, othervars.scaleHop);
9721						statData[i][j].yPosBottom =othervars.xAxisPosY - statData[i][j].botOffset;
9722						statData[i][j].yPosTop = othervars.xAxisPosY - statData[i][j].topOffset;
9723						// treat spaceBetweenBar 
9724						if(Math.ceil(ctx.chartSpaceScale*config.spaceBetweenBar) > 0)
9725						{
9726							if(1*data.datasets[i].data[j]<0) {
9727								statData[i][j].yPosBottom+=Math.ceil(ctx.chartSpaceScale*config.spaceBetweenBar);
9728								if(tempn[j]==1*data.datasets[i].data[j])statData[i][j].yPosBottom-=(Math.ceil(ctx.chartSpaceScale*config.spaceBetweenBar)/2);	
9729								if(statData[i][j].yPosTop<statData[i][j].yPosBottom)statData[i][j].yPosBottom=statData[i][j].yPosTop;
9730							} else if (1*data.datasets[i].data[j]>0) {
9731								statData[i][j].yPosBottom-=Math.ceil(ctx.chartSpaceScale*config.spaceBetweenBar);	
9732								if(tempp[j]==1*data.datasets[i].data[j])statData[i][j].yPosBottom+=(Math.ceil(ctx.chartSpaceScale*config.spaceBetweenBar)/2);	
9733								if(statData[i][j].yPosTop>statData[i][j].yPosBottom)statData[i][j].yPosBottom=statData[i][j].yPosTop;
9734							}
9735						}
9736						statData[i][j].v7=statData[i][j].xPosLeft;
9737						statData[i][j].v8=statData[i][j].yPosBottom;
9738						statData[i][j].v9=statData[i][j].xPosRight;
9739						statData[i][j].v10=statData[i][j].yPosTop;
9740					}
9741					break;			
9742				case "HorizontalBar" :
9743					for (j = 0; j < data.datasets[i].data.length; j++) {
9744
9745						statData[i][j].xAxisPosY = othervars.xAxisPosY;
9746						statData[i][j].yAxisPosX = othervars.yAxisPosX;
9747						statData[i][j].valueHop = othervars.valueHop;
9748						statData[i][j].barWidth = othervars.barWidth;
9749						statData[i][j].additionalSpaceBetweenBars= othervars.additionalSpaceBetweenBars;
9750						statData[i][j].nbValueHop = othervars.nbValueHop;
9751						statData[i][j].calculatedScale = othervars.calculatedScale;
9752						statData[i][j].scaleHop = othervars.scaleHop;
9753
9754
9755						statData[i][j].xPosLeft= othervars.yAxisPosX + othervars.zeroY;
9756						statData[i][j].yPosTop=othervars.xAxisPosY + Math.ceil(ctx.chartSpaceScale*config.barValueSpacing) - othervars.scaleHop * (j + 1) + othervars.additionalSpaceBetweenBars + othervars.barWidth * i + Math.
9756ceil(ctx.chartSpaceScale*config.barDatasetSpacing) * i + Math.ceil(ctx.chartLineScale*config.barStrokeWidth) * i;
9757						statData[i][j].yPosBottom=statData[i][j].yPosTop+othervars.barWidth;
9758						statData[i][j].barWidth = calculateOffset(config.logarithmic, 1 * data.datasets[i].data[j], othervars.calculatedScale, othervars.valueHop) - othervars.zeroY;
9759						statData[i][j].xPosRight = statData[i][j].xPosLeft + statData[i][j].barWidth;
9760
9761						statData[i][j].v7=statData[i][j].xPosLeft;
9762						statData[i][j].v8=statData[i][j].yPosBottom;
9763						statData[i][j].v9=statData[i][j].xPosRight;
9764						statData[i][j].v10=statData[i][j].yPosTop;
9765					}
9766					break;			
9767				case "HorizontalStackedBar" :
9768					for (j = 0; j < data.datasets[i].data.length; j++) {
9769						statData[i][j].xAxisPosY = othervars.xAxisPosY;
9770						statData[i][j].yAxisPosX = othervars.yAxisPosX;
9771						statData[i][j].valueHop = othervars.valueHop;
9772						statData[i][j].barWidth = othervars.barWidth;
9773						statData[i][j].additionalSpaceBetweenBars= othervars.additionalSpaceBetweenBars;
9774						statData[i][j].nbValueHop = othervars.nbValueHop;
9775						statData[i][j].calculatedScale = othervars.calculatedScale;
9776						statData[i][j].scaleHop = othervars.scaleHop;
9777
9778						if (i == 0) {
9779							tempp[j]=0;
9780							tempn[j]=0;
9781						}
9782						if (typeof(data.datasets[i].data[j]) == 'undefined')  continue;
9783
9784						statData[i][j].xPosLeft= othervars.yAxisPosX + Math.ceil(ctx.chartSpaceScale*config.barValueSpacing) + othervars.valueHop * j;
9785						if (1*data.datasets[i].data[j]<0) {
9786							statData[i][j].leftval=tempn[j];
9787							statData[i][j].rightval=tempn[j]+1*data.datasets[i].data[j] ;
9788							tempn[j]=tempn[j]+1*data.datasets[i].data[j] ;
9789						} else {
9790							statData[i][j].leftval=tempp[j];
9791							statData[i][j].rightval=tempp[j]+1*data.datasets[i].data[j] ;
9792							tempp[j]=tempp[j]+1*data.datasets[i].data[j] ;
9793						}
9794						statData[i][j].rightOffset = HorizontalCalculateOffset(statData[i][j].rightval , othervars.calculatedScale, othervars.valueHop);
9795						statData[i][j].leftOffset  = HorizontalCalculateOffset(statData[i][j].leftval , othervars.calculatedScale, othervars.valueHop);
9796						statData[i][j].xPosRight = othervars.yAxisPosX + statData[i][j].rightOffset;
9797						statData[i][j].xPosLeft  = othervars.yAxisPosX + statData[i][j].leftOffset;
9798						statData[i][j].yPosTop =othervars.xAxisPosY + Math.ceil(ctx.chartSpaceScale*config.barValueSpacing) - othervars.scaleHop * (j + 1) + othervars.additionalSpaceBetweenBars;
9799						statData[i][j].yPosBottom = statData[i][j].yPosTop+othervars.barWidth;
9800						// treat spaceBetweenBar 
9801						if(Math.ceil(ctx.chartSpaceScale*config.spaceBetweenBar) > 0)
9802						{
9803							if(1*data.datasets[i].data[j]<0) {
9804								statData[i][j].xPosLeft-=Math.ceil(ctx.chartSpaceScale*config.spaceBetweenBar);	
9805								if(tempn[j]==1*data.datasets[i].data[j])statData[i][j].xPosLeft+=(Math.ceil(ctx.chartSpaceScale*config.spaceBetweenBar)/2);	
9806								if(statData[i][j].xPosLeft<statData[i][j].xPosRight)statData[i][j].xPosLeft=statData[i][j].xPosRight;
9807							} else if (1*data.datasets[i].data[j]>0) {
9808								statData[i][j].xPosLeft+=Math.ceil(ctx.chartSpaceScale*config.spaceBetweenBar);	
9809								if(tempp[j]==1*data.datasets[i].data[j])statData[i][j].xPosLeft-=(Math.ceil(ctx.chartSpaceScale*config.spaceBetweenBar)/2);	
9810								if(statData[i][j].xPosLeft>statData[i][j].xPosRight)statData[i][j].xPosLeft=statData[i][j].xPosRight;
9811							}
9812						}
9813
9814						statData[i][j].v7=statData[i][j].xPosLeft;
9815						statData[i][j].v8=statData[i][j].yPosBottom;
9816						statData[i][j].v9=statData[i][j].xPosRight;
9817						statData[i][j].v10=statData[i][j].yPosTop;
9818					}
9819					break;
9820				default : 
9821					break;
9822			}
9823	
9824} ;
9825
9826
9827
9828	function xPos(ival, iteration, data,yAxisPosX,valueHop,nbValueHop) {
9829		if (typeof data.datasets[ival].xPos == "object") {
9830			if (!(typeof data.datasets[ival].xPos[Math.floor(iteration + config.zeroValue)] == "undefined")) {
9831				var width = valueHop * nbValueHop;
9832
9833				var deb = (typeof data.xBegin != "undefined") ? data.xBegin : (typeof (1 * data.labels[0])=="number" && !isNaN(1 * data.labels[0])? 
98331 * data.labels[0] : 0);
9834				var fin = (typeof data.xEnd != "undefined") ? data.xEnd : ((typeof (1 * data.labels[data.labels.length - 1])=="number") && !isNaN(1 * data.labels[data.labels.length - 1]) ? 1 * data.labels[data.labels.length - 1] : data.labels.length-1) ;
9835
9836				if (fin <= deb) fin = deb + 100;
9837				if (1 * data.datasets[ival].xPos[Math.floor(iteration + config.zeroValue)] >= deb && data.datasets[ival].xPos[Math.floor(iteration + config.zeroValue)] <= fin) {
9838					var p1 = yAxisPosX + width * ((1 * data.datasets[ival].xPos[Math.floor(iteration + config.zeroValue)] - deb) / (fin - deb));
9839					var p2 = p1;
9840					if (Math.abs(iteration - Math.floor(iteration + config.zeroValue)) > config.zeroValue) {
9841						p2 = xPos(ival, Math.ceil(iteration - config.zeroValue), data);
9842					}
9843					return p1 + (iteration - Math.floor(iteration + config.zeroValue)) * (p2 - p1);
9844				}
9845			}
9846		}
9847		return yAxisPosX + (valueHop * iteration);
9848	};
9849
9850
9851	function calculateOrderOfMagnitude(val) {
9852		return Math.floor(Math.log(val) / Math.LN10);
9853	};
9854
9855	function calculateOffset(logarithmic, val, calculatedScale, scaleHop) {
9856		if (!logarithmic) { // no logarithmic scale
9857			var outerValue = calculatedScale.steps * calculatedScale.stepValue;
9858			var adjustedValue = val - calculatedScale.graphMin;
9859			var scalingFactor = CapValue(adjustedValue / outerValue, 1, 0);
9860			return (scaleHop * calculatedScale.steps) * scalingFactor;
9861		} else { // logarithmic scale
9862			return CapValue(log10(val) * scaleHop - log10(calculatedScale.graphMin) * scaleHop, undefined, 0);
9863		}
9864	};
9865
9866	function HorizontalCalculateOffset(val, calculatedScale, scaleHop) {
9867		var outerValue = calculatedScale.steps * calculatedScale.stepValue;
9868		var adjustedValue = val - calculatedScale.graphMin;
9869		var scalingFactor = CapValue(adjustedValue / outerValue, 1, 0);
9870		return (scaleHop * calculatedScale.steps) * scalingFactor;
9871	};
9872
9873	//Apply cap a value at a high or low number
9874	function CapValue(valueToCap, maxValue, minValue) {
9875		if (isNumber(maxValue)) {
9876			if (valueToCap > maxValue) {
9877				return maxValue;
9878			}
9879		}
9880		if (isNumber(minValue)) {
9881			if (valueToCap < minValue) {
9882				return minValue;
9883			}
9884		}
9885		return valueToCap;
9886	};
9887	function log10(val) {
9888		return Math.log(val) / Math.LN10;
9889	};
9890};
9891
9892function isBooleanOptionTrue(optionVar,defaultvalue) {
9893	var j;
9894	if(typeof optionvar == "undefined") {
9895		if(typeof defaultvalue=="function") return true;
9896		else if(typeof defaultvalue == "object") { 
9897			for(j=0;j<defaultvalue.length;j++) if (defaultvalue[j])return true;
9898			return false;
9899		}
9900		else return defaultvalue;
9901	}
9902	if(typeof optionvar=="function") return true;
9903	else if(typeof optionvar == "object") {
9904			for(j=0;j<optionvar.length;j++) if (optionvar[j])return true;
9905			return false;
9906	} else return optionvar;
9907};
9908
9909function setOptionValue(config_on_posi,treat_special,rescale,reference,ctx,data,statData,optionvar,defaultvalue,varname,posi,posj,othervars) {
9910	var rv; 
9911	if(treat_special == true) {
9912		if(typeof (data.special)=="object") {
9913			for(var t=data.special.length-1;t>=0;t--){
9914				if(typeof data.special[t].posi == "undefined" || typeof data.special[t].posj == "undefined") continue;
9915				if(data.special[t].posi!=posi || data.special[t].posj != posj || posi==-1 || posj==-1) continue;
9916				if(typeof data.special[t][varname]!="undefined") {
9917					return data.special[t][varname];
9918				}
9919			}
9920		}
9921	}
9922	if(typeof optionvar == "undefined") {
9923		if(typeof defaultvalue=="function") return defaultvalue(reference,ctx,data,statData,posi,posj,othervars);
9924		else if(typeof defaultvalue == "object") {     
9925				if (config_on_posi)rv=defaultvalue[Math.min(defaultvalue.length-1,Math.max(0,posi))];
9926				else               rv=defaultvalue[Math.min(defaultvalue.length-1,Math.max(0,posj))];
9927		}
9928		else { 
9929			rv=defaultvalue;
9930		}
9931		if(rescale!=1)rv=Math.ceil(rv*rescale);
9932		return rv;
9933	}
9934	if(typeof optionvar=="function") rv=optionvar(reference,ctx,data,statData,posi,posj,othervars);
9935	else if(typeof optionvar == "object") {
9936		if (posj==-1) rv=optionvar[Math.min(optionvar.length-1,Math.max(0,posi))];
9937		else rv=optionvar[Math.min(optionvar.length-1,Math.max(0,posj))];
9938	}
9939	else rv=optionvar;
9940	if(rescale!=1)rv=Math.ceil(rv*rescale);
9941	return rv;
9942
9943};
9944
9945function tpdraw(ctx,dataval) {
9946	switch(ctx.tpchart)  {
9947		case "Bar" :
9948		case "StackedBar" :
9949			if (dataval.type=="Line") { tp="Line";} 	
9950			else {tp=ctx.tpchart;}
9951			break;
9952		default : 
9953			tp=ctx.tpchart;
9954			break;
9955	}
9956	return tp;
9957};
9958
9959function setTextBordersAndBackground(ctx,text,fontsize,xpos,ypos,borders,bordersselection,borderscolor,borderswidth,bordersxspace,bordersyspace,bordersstyle,backgroundcolor,optiongroup,BordersRadius) {
9960	var textHeight,textWidth;
9961	// compute text width and text height;
9962	if(typeof text != "string") {
9963		var txt=text.toString();
9964		textHeight= fontsize * (txt.split("\n").length || 1);
9965		textWidth = ctx.measureText(txt).width;
9966	} else {
9967		textHeight= fontsize * (text.split("\n").length || 1);
9968		textWidth = ctx.measureText(text).width;
9969	}
9970	
9971	
9972	// compute xright, xleft, ytop, ybot;
9973
9974        var xright, xleft, ytop, ybot;
9975	if(ctx.textAlign=="center") {
9976		xright=-textWidth/2;
9977		xleft=textWidth/2;
9978	} else if(ctx.textAlign=="left") {
9979		xright=0;
9980		xleft=textWidth;
9981	} else if(ctx.textAlign=="right") {
9982		xright=-textWidth;
9983		xleft=0;
9984	}
9985	
9986	if(ctx.textBaseline=="top") {
9987		ytop=0;
9988		ybottom=textHeight;	
9989	} else if (ctx.textBaseline=="center" || ctx.textBaseline=="middle") {
9990		ytop=-textHeight/2;
9991		ybottom=textHeight/2;	
9992	} else if (ctx.textBaseline=="bottom") {
9993		ytop=-textHeight;
9994		ybottom=0;	
9995	}
9996
9997	ctx.save();
9998	ctx.beginPath();
9999 	ctx.translate(xpos,ypos);
10000
10001	if(backgroundcolor != "none") {
10002
10003		this.lineWidth=0;
10004		ctx.strokeStyle= "rgba(0,0,0,0)";
10005		ctx.fillStyle=backgroundcolor;
10006		ctx.drawRectangle({x:xright-bordersxspace,y:ybottom+bordersyspace,width:xleft-xright+2*bordersxspace,height:ytop-ybottom-2*bordersyspace,borders:borders,bordersWidth:borderswidth,borderSelection:bordersselection,borderRadius:BordersRadius,fill:true,stroke:false})
10007	}	
10008
10009	// draw border;
10010	if (borders) {
10011		ctx.lineWidth = borderswidth;	
10012		ctx.strokeStyle= borderscolor;
10013		if(backgroundcolor!="none")ctx.fillStyle=backgroundcolor;
10014		else ctx.fillStyle= "rgba(0,0,0,0)";
10015		ctx.setLineDash(lineStyleFn(bordersstyle));
10016		ctx.drawRectangle({x:xright-bordersxspace-isBorder(bordersselection,"LEFT")*borderswidth/2,y:ybottom+bordersyspace+isBorder(bordersselection,"BOTTOM")*borderswidth/2,width:xleft-xright+2*bordersxspace+(isBorder(bordersselection,"LEFT")+isBorder(bordersselection,"RIGHT"))*borderswidth/2,height:-textHeight-2*bordersyspace-(isBorder(bordersselection,"BOTTOM")+isBorder(bordersselection,"TOP"))*borderswidth/2,borders:borders,bordersWidth:borderswidth,borderSelection:bordersselection,borderRadius:BordersRadius,fill:false,stroke:true})
10017		ctx.setLineDash([]);
10018	}
10019	ctx.beginPath();
10020	
10021	ctx.restore();
10022};
10023
10024
10025function calculatePieDrawingSize(ctx,msr,config,data,statData) {
10026
10027	var realCumulativeAngle = (((config.startAngle * (Math.PI / 180) + 2 * Math.PI) % (2 * Math.PI)) + 2* Math.PI) % (2* Math.PI) ; 
10028	var realAmplitude = (((config.totalAmplitude * (Math.PI / 180) + 2 * Math.PI) % (2 * Math.PI)) + 2* Math.PI) % (2* Math.PI) ; 
10029	if(realAmplitude <= config.zeroValue)realAmplitude=2*Math.PI;
10030			
10031	var debAngle=((realCumulativeAngle-realAmplitude)+4*Math.PI)%(2*Math.PI);
10032	var finAngle=debAngle+realAmplitude;
10033			
10034	var qposdeb=Math.floor(((debAngle+config.zeroValue)/(Math.PI/2))%4);
10035	var qposfin=Math.floor(((finAngle-config.zeroValue)/(Math.PI/2))%4);
10036	var q=[0,0,0,0];
10037	if(qposdeb<=qposfin)for(var i=qposdeb;i<=qposfin;i++)q[i]=1;
10038	else {
10039		for(var i=qposdeb;i<4;i++)q[i]=1;
10040		for(var i=0;i<=qposfin;i++)q[i]=1;
10041	}
10042
10043	if(q[0]==0 && q[1]==0) {
10044		midPieY = msr.topNotUsableHeight+5;
10045		doughnutRadius = msr.availableHeight-5;
10046	} else if(q[2]==0 && q[3]==0) {
10047		midPieY = msr.topNotUsableHeight + msr.availableHeight;
10048		doughnutRadius = msr.availableHeight-5;
10049	}else {
10050		midPieY = msr.topNotUsableHeight + (msr.availableHeight / 2);
10051		doughnutRadius = msr.availableHeight/2-5;
10052	}
10053	var realAvailableWidth;
10054	if(q[0]==0 && q[3]==0) {
10055		midPieX = msr.leftNotUsableWidth + msr.availableWidth-5 ;
10056		doughnutRadius = Math.min(doughnutRadius, msr.availableWidth -5);
10057		realAvailableWidth=msr.availableWidth -5
10058		
10059	} else if(q[1]==0 && q[2]==0) {
10060		midPieX = msr.leftNotUsableWidth+5 ;
10061		doughnutRadius = Math.min(doughnutRadius, msr.availableWidth -5);
10062		realAvailableWidth=msr.availableWidth -5
10063	} else {
10064		midPieX = msr.leftNotUsableWidth + (msr.availableWidth / 2);
10065		doughnutRadius = Math.min(doughnutRadius, (msr.availableWidth/2) -5);
10066		realAvailableWidth=(msr.availableWidth/2) -5
10067	}
10068
10069
10070	// Computerange Pie Radius
10071	var j=data.labels.length-1;
10072	if (isBooleanOptionTrue(undefined,config.inGraphDataShow) && setOptionValue(false,true,1,"INGRAPHDATARADIUSPOSITION",ctx,data,statData,undefined,config.inGraphDataRadiusPosition,"inGraphDataRadiusPosition",0,j,{nullV
10072alue : true} ) == 3 && setOptionValue(false,true,1,"INGRAPHDATAALIGN",ctx,data,statData,undefined,config.inGraphDataAlign,"inGraphDataAlign",0,j,{nullValue: true  }) == "off-center" && setOptionValue(false,true,1,"INGRAPHDATAROTATE",ctx,data,statData,undefined,config.inGraphDataRotate,"inGraphDataRotate",0,j,{nullValue : true} ) == 0) {
10073		doughnutRadius = doughnutRadius - setOptionValue(false,true,ctx.chartTextScale,"INGRAPHDATAFONTSIZE",ctx,data,statData,undefined,config.inGraphDataFontSize,"inGraphDataFontSize",0,j,{nullValue : true} ) - setOptionValue(false,true,1,"INGRAPHDATAPADDINGRADIUS",ctx,data,statData,undefined,config.inGraphDataPaddingRadius,"inGraphDataPaddingRadius",0,j,{nullValue: true} ) - 5;
10074		var posAngle;
10075		for (var i = 0; i < data.datasets.length; i++) {
10076			if (!(typeof(data.datasets[i].data[j]) == 'undefined') && 1*data.datasets[i].data[j]>=0) {
10077				ctx.font = setOptionValue(false,true,1,"INGRAPHDATAFONTSTYLE",ctx,data,statData,undefined,config.inGraphDataFontStyle,"inGraphDataFontStyle",i,j,{nullValue : true} ) + ' ' + setOptionValue(false,true,ctx.chartTextScale,"INGRAPHDATAFONTSIZE",ctx,data,statData,undefined,config.inGraphDataFontSize,"inGraphDataFontSize",i,j,{nullValue : true} ) + 'px ' + setOptionValue(false,true,1,"INGRAPHDATAFONTFAMILY",ctx,data,statData,undefined,config.inGraphDataFontFamily,"inGraphDataFontFamily",i,j,{nullValue : true} );
10078				if (setOptionValue(false,true,1,"INGRAPHDATAANGLEPOSITION",ctx,data,statData,undefined,config.inGraphDataAnglePosition,"inGraphDataAnglePosition",i,j,{nullValue : true} ) == 1) posAngle = realCumulativeAngle + setOptionValue(false,true,1,"INGRAPHDATAPADDINANGLE",ctx,data,statData,undefined,config.inGraphDataPaddingAngle,"inGraphDataPaddingAngle",i,j,{nullValue: true  }) * (Math.PI / 180);
10079				else if (setOptionValue(false,true,1,"INGRAPHDATAANGLEPOSITION",ctx,data,statData,undefined,config.inGraphDataAnglePosition,"inGraphDataAnglePosition",i,j,{nullValue : true} ) == 2) posAngle = realCumulativeAngle - statData[i][j].segmentAngle / 2 + setOptionValue(false,true,1,"INGRAPHDATAPADDINANGLE",ctx,data,statData,undefined,config.inGraphDataPaddingAngle,"inGraphDataPaddingAngle",i,j,{nullValue: true  }) * (Math.PI / 180);
10080				else if (setOptionValue(false,true,1,"INGRAPHDATAANGLEPOSITION",ctx,data,statData,undefined,config.inGraphDataAnglePosition,"inGraphDataAnglePosition",i,j,{nullValue : true} ) == 3) posAngle = realCumulativeAngle - statData[i][j].segmentAngle + setOptionValue(false,true,1,"INGRAPHDATAPADDINANGLE",ctx,data,statData,undefined,config.inGraphDataPaddingAngle,"inGraphDataPaddingAngle",i,j,{nullValue: true  }) * (Math.PI / 180);
10081				realCumulativeAngle -= statData[i][j].segmentAngle;
10082				var dispString = tmplbis(setOptionValue(false,true,1,"INGRAPHDATATMPL",ctx,data,statData,undefined,config.inGraphDataTmpl,"inGraphDataTmpl",i,j,{nullValue : true} ), statData[i][j],config);
10083				var textMeasurement = ctx.measureTextMultiLine(dispString).textWidth;
10084				var MaxRadiusX = Math.abs((realAvailableWidth - textMeasurement) / Math.cos(posAngle)) - setOptionValue(false,true,1,"INGRAPHDATAPADDINGRADIUS",ctx,data,statData,undefined,config.inGraphDataPaddingRadius,"inGraphDataPaddingRadius",i,j,{nullValue: true} ) - 5;
10085				if (MaxRadiusX < doughnutRadius) doughnutRadius = MaxRadiusX;
10086			}
10087		}
10088	}
10089
10090	doughnutRadius = doughnutRadius * config.radiusScale;
10091	return {
10092		radius : doughnutRadius,
10093		midPieX : midPieX,
10094		midPieY : midPieY
10095	};
10096};
10097
10098function drawGridScale(ctx,data,config,msr,yAxisPosX,xAxisPosY,zeroY,valueHop,scaleHop,nbxlines,nbylines) {
10099  var i,j,tickHop;
10100  var lineColor;
10101  var lineWidth;
10102
10103  // draw X Scale
10104  var bottomDrawn=false;
10105  var topDrawn=false;
10106  if (config.drawXScaleLine !== false) {
10107	  for (var s = 0; s < config.drawXScaleLine.length; s++) {
10108		  // get special lineWidth and lineColor for this xScaleLine
10109			var yPosXScale;
10110			switch (config.drawXScaleLine[s].position) {
10111				case "bottom": yPosXScale = xAxisPosY; bottomDrawn=true; break;
10112				case "top": 	 yPosXScale = xAxisPosY - (nbxlines * scaleHop); topDrawn=true; break;
10113				case "0":
10114				case 0: 
10115        	// check if zero exists
10116          yPosXScale=xAxisPosY;
10117					if (zeroY != 0) yPosXScale = xAxisPosY - zeroY;
10118          else bottomDrawn=true;
10119          if(Math.abs(yPosXScale - (xAxisPosY - (nbxlines * scaleHop)))<config.zeroValue)topDrawn=true;
10120					break;
10121			}
10122      drawScaleLine(ctx,yAxisPosX - Math.ceil(ctx.chartLineScale*config.scaleTickSizeLeft), yPosXScale,yAxisPosX + msr.availableWidth + Math.ceil(ctx.chartLineScale*config.scaleTickSizeRight), yPosXScale,config.drawXScaleLine[s].lineWidth ? config.drawXScaleLine[s].lineWidth : Math.ceil(ctx.chartLineScale*config.scaleLineWidth),config.drawXScaleLine[s].lineColor ? config.drawXScaleLine[s].lineColor : config.scaleLineColor,config.scaleGridLineStyle);
10123		}
10124	}
10125	// draw line parallel to X Scale;
10126  for (i = -1 + (bottomDrawn==true); i < nbxlines; i++) {
10127    if(i< nbxlines-(topDrawn==true)) {
10128		  if ((i==-1 && config.xAxisBottom) || (i==nbxlines-1 && config.xAxisTop) ||  config.scaleShowGridLines && (i+1) % config.scaleYGridLinesStep == 0) {
10129        drawFirst=false;
10130        if(config.scaleTickSizeLeft>0) {
10131          drawScaleLine(ctx,yAxisPosX - Math.ceil(ctx.chartLineScale*config.scaleTickSizeLeft), xAxisPosY - ((i + 1) * scaleHop),yAxisPosX, xAxisPosY - ((i + 1) * scaleHop),Math.ceil(ctx.chartLineScale*config.scaleGridLineWidth),config.tickColor != "gridLine" && config.yAxisLeft ? config.scaleLineColor : config.scaleGridLineColor,config.scaleGridLineStyle);
10132        }
10133        drawScaleLine(ctx,yAxisPosX, xAxisPosY - ((i + 1) * scaleHop),yAxisPosX + msr.availableWidth, xAxisPosY - ((i + 1) * scaleHop),Math.ceil(ctx.chartLineScale*config.scaleGridLineWidth),config.scaleGridLineColor,config.scaleGridLineStyle);
10134        if(config.scaleTickSizeRight>0) {
10135          drawScaleLine(ctx,yAxisPosX + msr.availableWidth, xAxisPosY - ((i + 1) * scaleHop),yAxisPosX + msr.availableWidth + Math.ceil(ctx.chartLineScale*config.scaleTickSizeRight), xAxisPosY - ((i + 1) * scaleHop),Math.ceil(ctx.chartLineScale*config.scaleGridLineWidth),config.tickColor != "gridLine" && config.yAxisRight ? config.scaleLineColor : config.scaleGridLineColor ,config.scaleGridLineStyle);
10136        }
10137	    } else {
10138        if(config.scaleTickSizeLeft>0) {
10139          drawScaleLine(ctx,yAxisPosX - Math.ceil(ctx.chartLineScale*config.scaleTickSizeLeft),xAxisPosY - ((i + 1) * scaleHop),yAxisPosX,xAxisPosY - ((i + 1) * scaleHop),Math.ceil(ctx.chartLineScale*config.scaleGridLineWidth),config.tickColor != "gridLine" && config.yAxisLeft ? config.scaleLineColor : config.scaleGridLineColor,config.scaleGridLineStyle);
10140        }
10141        if(config.scaleTickSizeRight>0) {
10142          drawScaleLine(ctx,yAxisPosX + msr.availableWidth,xAxisPosY - ((i + 1) * scaleHop),yAxisPosX + msr.availableWidth + Math.ceil(ctx.chartLineScale*config.scaleTickSizeRight),xAxisPosY - ((i + 1) * scaleHop),Math.ceil(ctx.chartLineScale*config.scaleGridLineWidth),config.tickColor != "gridLine" && config.yAxisRight ? config.scaleLineColor : config.scaleGridLineColor,config.scaleGridLineStyle);
10143        }
10144	    }          
10145    }
10146       
10147    // Minor ticks ;
10148    if(config.scaleMinorTickVerticalCount>0 &&  i != -1) {
10149      tickHop=scaleHop/(config.scaleMinorTickVerticalCount+1);
10150      for(j=1;j<config.scaleMinorTickVerticalCount+1;j++){
10151        if(config.scaleMinorTickHorizontalLines) {
10152          if(config.scaleMinorTickSizeLeft>0) {
10153            drawScaleLine(ctx,yAxisPosX - Math.ceil(ctx.chartLineScale*config.scaleMinorTickSizeLeft),xAxisPosY - ((i + 1) * scaleHop)+j*tickHop,yAxisPosX, xAxisPosY - ((i + 1) * scaleHop)+j*tickHop,Math.ceil(ctx.chartLineScale*config.scaleMinorTickWidth),config.minorTickColor != "gridLine" && config.yAxisLeft  ? config.scaleLineColor :  config.scaleMinorTickColor,config.scaleMinorTickStyle);
10154          }
10155          drawScaleLine(ctx,yAxisPosX,xAxisPosY - ((i + 1) * scaleHop)+j*tickHop,yAxisPosX + msr.availableWidth , xAxisPosY - ((i + 1) * scaleHop)+j*tickHop,Math.ceil(ctx.chartLineScale*config.scaleMinorTickWidth),config.scaleMinorTickColor,config.scaleMinorTickStyle);
10156          if(config.scaleMinorTickSizeRight>0) {
10157            drawScaleLine(ctx,yAxisPosX + msr.availableWidth,xAxisPosY - ((i + 1) * scaleHop)+j*tickHop,yAxisPosX + msr.availableWidth + Math.
10157ceil(ctx.chartLineScale*config.scaleMinorTickSizeRight), xAxisPosY - ((i + 1) * scaleHop)+j*tickHop,Math.ceil(ctx.chartLineScale*config.scaleMinorTickWidth),config.minorTickColor != "gridLine" && config.yAxisRight  ? config.scaleLineColor : config.scaleMinorTickColor,config.scaleMinorTickStyle);
10158          }
10159        } else {
10160          if(config.scaleMinorTickSizeLeft>0) {
10161            drawScaleLine(ctx,yAxisPosX - Math.ceil(ctx.chartLineScale*config.scaleMinorTickSizeLeft),xAxisPosY - ((i + 1) * scaleHop)+j*tickHop,yAxisPosX, xAxisPosY - ((i + 1) * scaleHop)+j*tickHop,Math.ceil(ctx.chartLineScale*config.scaleMinorTickWidth),config.minorTickColor != "gridLine" && config.yAxisLeft ? config.scaleLineColor : config.scaleMinorTickColor,config.scaleMinorTickStyle);
10162          } 
10163          if(config.scaleMinorTickSizeRight>0) {
10164            drawScaleLine(ctx,yAxisPosX + msr.availableWidth,xAxisPosY - ((i + 1) * scaleHop)+j*tickHop,yAxisPosX + msr.availableWidth + Math.ceil(ctx.chartLineScale*config.scaleMinorTickSizeRight), xAxisPosY - ((i + 1) * scaleHop)+j*tickHop,Math.ceil(ctx.chartLineScale*config.scaleMinorTickWidth),config.minorTickColor != "gridLine" && config.yAxisRight  ? config.scaleLineColor :  config.scaleMinorTickColor,config.scaleMinorTickStyle);
10165          } 
10166        }
10167      }
10168    }
10169  }
10170  var lineColor;
10171  var lineWidth;
10172	// Y Axis and lines parallel to Y axis;
10173	for (i = 0; i < nbylines; i++) {
10174		ctx.beginPath();
10175    if((i==0 && config.yAxisLeft) || (i==(nbylines-1) && config.yAxisRight)){lineColor=config.scaleLineColor;lineWidth=config.scaleLineWidth;}
10176    else {lineColor=config.scaleGridLineColor; lineWidth=config.scaleGridLineWidth }
10177		if ((i==0 && config.yAxisLeft) || (i==(nbylines-1) && config.yAxisRight) || (i==nbylines-1 && config.scaleTickSizeRight >0)  || (config.scaleShowGridLines && i % config.scaleXGridLinesStep == 0)) {
10178      if(config.scaleTickSizeBottom>0) {
10179        drawScaleLine(ctx,yAxisPosX + i * valueHop, xAxisPosY + Math.ceil(ctx.chartLineScale*config.scaleTickSizeBottom),yAxisPosX + i * valueHop, xAxisPosY ,Math.ceil(ctx.chartLineScale*lineWidth),config.tickColor != "gridLine" && bottomDrawn  ? config.scaleLineColor : lineColor,config.scaleGridLineStyle);
10180      }
10181      drawScaleLine(ctx,yAxisPosX + i * valueHop, xAxisPosY ,yAxisPosX + i * valueHop, xAxisPosY - msr.availableHeight,Math.ceil(ctx.chartLineScale*lineWidth),lineColor,config.scaleGridLineStyle);
10182      if(config.scaleTickSizeTop>0) {
10183        drawScaleLine(ctx,yAxisPosX + i * valueHop, xAxisPosY - msr.availableHeight,yAxisPosX + i * valueHop, xAxisPosY - msr.availableHeight - Math.ceil(ctx.chartLineScale*config.scaleTickSizeTop),Math.ceil(ctx.chartLineScale*lineWidth),config.tickColor != "gridLine" && topDrawn  ? config.scaleLineColor : lineColor,config.scaleGridLineStyle);
10184      }
10185		} else {
10186      if(config.scaleTickSizeBottom>0) {
10187        drawScaleLine(ctx,yAxisPosX + i * valueHop,xAxisPosY,yAxisPosX + i * valueHop,xAxisPosY + Math.ceil(ctx.chartLineScale*config.scaleTickSizeBottom),Math.ceil(ctx.chartLineScale*config.scaleGridLineWidth),config.tickColor != "gridLine" && bottomDrawn  ? config.scaleLineColor : config.scaleGridLineColor,config.scaleGridLineStyle);
10188      }
10189      if(config.scaleTickSizeTop>0) {
10190        drawScaleLine(ctx,yAxisPosX + i * valueHop,xAxisPosY - msr.availableHeight ,yAxisPosX + i * valueHop,xAxisPosY - msr.availableHeight - Math.ceil(ctx.chartLineScale*config.scaleTickSizeTop),Math.ceil(ctx.chartLineScale*config.scaleGridLineWidth),config.tickColor != "gridLine" && topDrawn ? config.scaleLineColor : config.scaleGridLineColor,config.scaleGridLineStyle);
10191      }
10192		}
10193
10194    // Minor ticks ;
10195    if(i<nbylines-1) {
10196      if(config.scaleMinorTickHorizontalCount>0) {
10197        tickHop=valueHop/(config.scaleMinorTickHorizontalCount+1);
10198        for(j=1;j<config.scaleMinorTickHorizontalCount+1;j++){
10199          if(config.scaleMinorTickVerticalLines) {
10200            if(config.scaleMinorTickSizeTop>0) {
10201              drawScaleLine(ctx,yAxisPosX + i*valueHop+j*tickHop,xAxisPosY - msr.availableHeight-Math.ceil(ctx.chartLineScale*config.scaleMinorTickSizeTop),yAxisPosX + i*valueHop+j*tickHop,xAxisPosY - msr.availableHeight,Math.ceil(ctx.chartLineScale*config.scaleMinorTickWidth),config.minorTickColor != "gridLine" && bottomDrawn ? config.scaleLineColor : config.scaleMinorTickColor,config.scaleMinorTickStyle);
10202            }
10203            drawScaleLine(ctx,yAxisPosX + i*valueHop+j*tickHop,xAxisPosY - msr.availableHeight,yAxisPosX + i*valueHop+j*tickHop,xAxisPosY,Math.
10203ceil(ctx.chartLineScale*config.scaleMinorTickWidth),config.scaleMinorTickColor,config.scaleMinorTickStyle);
10204            if(config.scaleMinorTickSizeBottom>0) {
10205              drawScaleLine(ctx,yAxisPosX + i*valueHop+j*tickHop,xAxisPosY ,yAxisPosX + i*valueHop+j*tickHop,xAxisPosY +Math.ceil(ctx.chartLineScale*config.scaleMinorTickSizeBottom),Math.ceil(ctx.chartLineScale*config.scaleMinorTickWidth),config.minorTickColor != "gridLine" && bottomDrawn ? config.scaleLineColor : config.scaleMinorTickColor,config.scaleMinorTickStyle);
10206            }
10207          } else {
10208            if(config.scaleMinorTickSizeBottom>0) {
10209              drawScaleLine(ctx,yAxisPosX + i*valueHop+j*tickHop,xAxisPosY,yAxisPosX + i*valueHop+j*tickHop,xAxisPosY +Math.ceil(ctx.chartLineScale*config.scaleMinorTickSizeBottom),Math.ceil(ctx.chartLineScale*config.scaleMinorTickWidth),config.minorTickColor != "gridLine" && bottomDrawn ? config.scaleLineColor :  config.scaleMinorTickColor,config.scaleMinorTickStyle);
10210            } 
10211            if(config.scaleMinorTickSizeTop>0) {
10212              drawScaleLine(ctx,yAxisPosX + i*valueHop+j*tickHop,xAxisPosY - msr.availableHeight-Math.ceil(ctx.chartLineScale*config.scaleMinorTickSizeTop),yAxisPosX + i*valueHop+j*tickHop,xAxisPosY - msr.availableHeight,Math.ceil(ctx.chartLineScale*config.scaleMinorTickWidth),config.minorTickColor != "gridLine" && topDrawn ? config.scaleLineColor :  config.scaleMinorTickColor,config.scaleMinorTickStyle);
10213            }                                                                                                                                                                                                                                                                                                     
10214          }
10215        }
10216      }
10217    }
10218	}
10219};
10220
10221function drawScaleLine(ctx,x_start,y_start,x_end,y_end,lineWidth,lineColor,lineStyle) {
10222	ctx.beginPath();
10223	ctx.moveTo(x_start, y_start);
10224	ctx.lineWidth = lineWidth;
10225	ctx.strokeStyle = lineColor;
10226	ctx.lineTo(x_end,y_end);
10227	ctx.setLineDash(lineStyleFn(lineStyle));
10228	ctx.stroke();
10229  ctx.setLineDash([]);
10230};
10231
10232
10233function drawTick(ctx,direction,x_start,x_end,y_start,y_end,tickCount,tickSize,tickWidth,tickColor,tickStyle) {
10234  var tickHop,i;
10235  if(direction==0) tickHop=(x_end-x_start)/(tickCount+1);
10236  else             tickHop=(y_end-y_start)/(tickCount+1);  
10237  for(i=1;i<=tickCount;i++) {
10238    ctx.beginPath();
10239	  ctx.moveTo(x_start+i*tickHop*(direction==0),y_start+i*tickHop*(direction==1));
10240	  ctx.lineWidth = Math.ceil(ctx.chartLineScale*tickWidth);
10241	  ctx.strokeStyle = tickColor;
10242	  //Check i isnt 0, so we dont go over the Y axis twice.
10243	  ctx.lineTo(x_start+i*tickHop*(direction==0)+tickSize*(direction==1),y_start+i*tickHop*(direction==1)-tickSize*(direction==0));
10244	  ctx.setLineDash(lineStyleFn(tickStyle));
10245	  ctx.stroke();
10246    ctx.setLineDash([]);
10247          
10248  }
10249        
10250        
10251};
10252
10253
10254function isBorder(option,position) {
10255	var voption=option;
10256	if(voption>=8){if(position=="RIGHT")return(true);else voption-=8;}
10257	if(voption>=4){if(position=="TOP")return(true);else voption-=4;}
10258	if(voption>=2){if(position=="LEFT")return(true);else voption-=2;}
10259	if(voption>=1){if(position=="BOTTOM")return(true);else voption-=1;}
10260	return(false);
10261};
10262
10263function convertData(data,generate) {
10264
10265console.log("GENERATE:"+generate);
10266
10267if(generate)console.log("var data = {");
10268if(generate)console.log('     labels : [""],');
10269if(generate)console.log('     datasets : [');
10270
10271	var newData = {
10272		labels : [""],
10273		datasets: []
10274	}
10275	for(var i=0;i<data.length;i++){
10276if(generate)console.log("           {")
10277		newData.datasets[i]={
10278			data : []
10279		};
10280		if(typeof data[i].value != "undefined") {
10281if(generate)console.log("      data : ["+data[i].value+"],");
10282			newData.datasets[i].data=[data[i].value];
10283		}
10284		else {
10285if(generate)console.log("      data : ["+data[i].value+"],");
10286			newData.datasets[i].data=[];
10287		}
10288		if(typeof data[i].color != "undefined") {
10289if(generate)console.log('      fillColor : "'+data[i].color+'",');
10290			newData.datasets[i].fillColor=data[i].color;
10291		}
10292		if(typeof data[i].title != "undefined") {
10293if(generate)console.log('      title : "'+data[i].title+'",');
10294			newData.datasets[i].title=data[i].title;
10295		}                                            
10296		if(typeof data[i].link != "undefined") {
10297if(generate)console.log('      link : "'+data[i].link+'",');
10298			newData.datasets[i].link=data[i].link;
10299		}
10300		if(typeof data[i].imageLoad != "undefined") {
10301if(generate)console.log('      imageLoad : <image>,');
10302			newData.datasets[i].imageLoad=data[i].imageLoad;
10303		}
10304		if(typeof data[i].imagePos != "undefined") {
10305if(generate)console.log('      imagePos : '+data[i].imagePos+',');
10306			newData.datasets[i].imagePos=data[i].imagePos;
10307		}
10308		if(typeof data[i].imageHeight != "undefined") {
10309if(generate)console.log('      imageHeight : '+data[i].imageHeight+',');
10310			newData.datasets[i].imageHeight=data[i].imageHeight;
10311		}
10312		if(typeof data[i].imageWidth != "undefined") {
10313if(generate)console.log('      imageWidth : '+data[i].imageWidth+',');
10314			newData.datasets[i].imageWidth=data[i].imageWidth;
10315		}
10316		if(typeof data[i].text != "undefined") {
10317if(generate)console.log('      text : "'+data[i].text+'",');
10318			newData.datasets[i].text=data[i].text;
10319		}
10320		if(typeof data[i].fontStyle != "undefined") {
10321if(generate)console.log('      fontStyle : "'+data[i].fontStyle+'",');
10322			newData.datasets[i].fontStyle=data[i].fontStyle;
10323		}
10324		if(typeof data[i].fontSize != "undefined") {
10325if(generate)console.log('      fontSize : '+data[i].fontSize+',');
10326			newData.datasets[i].fontSize=data[i].fontSize;
10327		}
10328		if(typeof data[i].expandOutRadius != "undefined") {
10329if(generate)console.log('      expandOutRadius : '+data[i].expandOutRadius+',');
10330			newData.datasets[i].expandOutRadius=data[i].expandOutRadius;
10331		}
10332		if(typeof data[i].expandInRadius != "undefined") {
10333if(generate)console.log('      expandInRadius : '+data[i].expandInRadius+',');
10334			newData.datasets[i].expandInRadius=data[i].expandInRadius;
10335		}
10336		if(typeof data[i].gradientColors != "undefined") {
10337if(generate)console.log('      gradientColors : < put here the gradient Colors definitions> '+data[i].gradientColors+',');
10338			newData.datasets[i].gradientColors=data[i].gradientColors;
10339		}
10340if(generate) {
10341	console.log('      nothing : true    // line added to avoid a comma after last line');
10342	if(i==data.length-1)console.log("           }");
10343	else                console.log("           },");
10344}
10345	}
10346if(generate)console.log(']');
10347	if(data.length>0){
10348		if (typeof data[0].shapesInChart !="undefined") newData.shapesInChart=data[0].shapesInChart;
10349
10350if(generate){
10351	console.log("     ,");
10352	console.log("     <   put here the shapesInChart    >");
10353}
10354	}
10355if(generate)console.log("};");
10356	return newData;
10357}
10358
10359
10360// JavaScript Document
10361
10362var drawShape_default= {
10363	position : "INCHART",
10364	shape : "CIRCLE",
10365	radius : 10, 
10366	ellipseHeight : 20,
10367	ellipseWidth : 40,
10368	sideCount : 4,
10369	lineCount : 3,
10370	x1:0,
10371	x2:0,
10372	x3:0,
10373	x4:0,
10374	x5:0,
10375	x6:0,
10376	x7:0,
10377	x8:0,
10378	x9:0,
10379	x10:0,
10380	y1:0,
10381	y2:0,
10382	y3:0,
10383	y4:0,
10384	y5:0,
10385	y6:0,
10386	y7:0,
10387	y8:0,
10388	y9:0,
10389	y10:0,
10390	posj : 0,
10391	strokeStyle: "solid",
10392	strokeSize:2, 
10393	strokeColor : "black", 
10394	fillColor: "blue",
10395	startAngle : 0, 
10396	endAngle : 360, 
10397	limitToChart : true,
10398	paddingX1: 0,
10399	paddingY1: 0,
10400	paddingX2: 0,
10401	paddingY2: 0,
10402	paddingX3: 0,
10403	paddingY3: 0,
10404	paddingX4: 0,
10405	paddingY4: 0,
10406       	paddingX5: 0,
10407	paddingY5: 0,
10408	paddingX6: 0,
10409	paddingY6: 0,
10410	paddingX7: 0,
10411	paddingY7: 0,
10412	paddingX8: 0,
10413	paddingY8: 0,
10414	paddingX9: 0,
10415	paddingY9: 0,
10416	paddingX10: 0,
10417	paddingY10: 0,
10418
10419	when : "always",    // "initFunction", "enddatafunction", "endscalefunction" or "always"
10420	iter : "all",        // "first", "last", "all" or a number
10421	animate : false,
10422	arrowWidth : 15,
10423	arrowHeight : 20,
10424	arrowTop : true,
10425	arrowBottom : false,
10426	text : "Your Text",
10427	rotate : 0,
10428	textAlign : "center",
10429	textBaseline : "middle",
10430	imagesrc : "",
10431	imageAlign : "center",
10432	imageBaseline : "middle",
10433	fontColor : "rgba(220,220,220,1)", 
10434	fontStyle : "normal",
10435	fontSize : 12,
10436	fontFamily : "'Arial'",
10437	textBorders : false,
10438	textBordersColor : "black",
10439	textBordersWidth : 1,
10440	textBordersSelection : 15,
10441	textBordersRadius : 0,
10442	textBordersXSpace : 3,
10443	textBordersYSpace : 3,
10444	textBordersStyle : "solid",
10445	textBackgroundColor : "none"
10446};
10447
10448function shapeLoadImages(data) {
10449	var shape,shapesInChart;
10450
10451
10452	if(typeof data.shapesInChart == "object") shapesInChart=data.shapesInChart;
10453	if(typeof data[0]=="object") if (typeof data[0].shapesInChart == "object") shapesInChart=data[0].shapesInChart;
10454	
10455	if(typeof shapesInChart == "object") {
10456		//      preload all images first;
10457		for(var i=0;i<shapesInChart.length;i++) {
10458			if(typeof shapesInChart[i].shape == "string")shape=shapesInChart[i].shape.toUpperCase()
10459			else shape= drawShape_default.shape.toUpperCase();
10460			if (shape=="IMAGE"){
10461				if(typeof shapesInChart[i].loadImage == "undefined") {
10462					shapesInChart[i].loadImage=new Image();
10463					var imagesrc = drawShapeSetValue(shapesInChart[i].imagesrc,drawShape_default.imagesrc);
10464					if (imagesrc=="") shapesInChart[i].loadImage.src='data:image/gif;base64,R0lGODlhCwALAIAAAAAA3pn/ZiH5BAEAAAEALAAAAAALAAsAAAIUhA+hkcuO4lmNVindo7qyrIXiGBYAOw==';
10465					else shapesInChart[i].loadImage.src=imagesrc;
10466				}
10467			}
10468
10469		}	
10470	}
10471	function drawShapeSetValue(dataval,defval) {
10472		if(typeof dataval != "undefined") return dataval;
10473		else return defval;
10474	};	
10475
10476}
10477
10478
10479function drawShapes(area, ctx, data,statData, posi,posj,othervars){
10480	var shape,whendrw,iter,realAnimation,shapesInChart;
10481	if(typeof data.shapesInChart == "object") var shapesInChart=data.shapesInChart;
10482	if(typeof data[0]=="object") if (typeof data[0].shapesInChart == "object") var shapesInChart=data[0].shapesInChart;
10483
10484	
10485	if(typeof shapesInChart == "object") {
10486
10487		//      preload all images first;
10488		shapeLoadImages(data);
10489	
10490		for(var i=0;i<shapesInChart.length;i++) {
10491
10492			if(area=="HIGHLIGHT") {
10493				if(shapesInChart[i].hightLight != true)continue;
10494			} else {		
10495				if(typeof othervars.config.dispShapesInChart == "object") {
10496					if (othervars.config.dispShapesInChart.indexOf(i)<0) continue;
10497				} else if (typeof othervars.config.dispShapesInChart != "undefined") {
10498					if (typeof othervars.config.dispShapesInChart == false)continue;
10499				}
10500				whendrw=drawShapeSetValue(shapesInChart[i].when,drawShape_default.when).toUpperCase();
10501				if (whendrw != "ALWAYS" && whendrw != area) { continue;}
10502				iter=drawShapeSetValue(shapesInChart[i].iter,drawShape_default.iter.toUpperCase());
10503				if (typeof iter=="number" && iter != othervars.cntiter && othervars.config.animation==true) {continue;}
10504				if (iter==="first" && othervars.cntiter != 1 && othervars.config.animation==true) {continue;}
10505//				if (iter==="last" && othervars.cntiter != othervars.config.animationSteps && othervars.config.animation==true) {continue;}
10506				if (iter==="last" && othervars.animationValue < 1 && othervars.config.animation==true) {continue;}
10507			}
10508
10509			if(typeof shapesInChart[i].shape == "function")shape= shapesInChart[i].shape;
10510			else if(typeof shapesInChart[i].shape != "string")shape= drawShape_default.shape.toUpperCase();
10511			else shape=shapesInChart[i].shape.toUpperCase();
10512
10513			if(othervars.config.animation && drawShapeSetValue(shapesInChart[i].animate,drawShape_default.animate)) realAnimation=othervars.animationValue;
10514			else realAnimation=1;
10515			ctx.save();
10516
10517			switch(shape) {
10518				case "LINE" :
10519					var vright, vleft, vtop, vbottom, tmp;
10520					vright= 1*drawShapeSetValue(shapesInChart[i].x2,drawShape_default.x2);
10521					vleft= 1*drawShapeSetValue(shapesInChart[i].x1,drawShape_default.x1);
10522					vtop= 1*drawShapeSetValue(shapesInChart[i].y2,drawShape_default.y2);
10523					vbottom= 1*drawShapeSetValue(shapesInChart[i].y1,drawShape_default.y1);
10524					if (vright<vleft){
10525						tmp=vright;vright=vleft;vleft=tmp;
10526						tmp=vtop;vtop=vbottom;vbottom=tmp;
10527					}
10528  
10529					ctx.beginPath();
10530					var xypos1=setXYpos(shape,shapesInChart[i],"","","",ctx,data,statData,othervars,vright,vtop,1*drawShapeSetValue(shapesInChart[i].paddingX1,drawShape_default.paddingX1),1*drawShapeSetValue(shapesInChart[i].paddingY1,drawShape_default.paddingY1),drawShapeSetValue(shapesInChart[i].limitToChart,drawShape_default.limitToChart));
10531					var xypos2=setXYpos(shape,shapesInChart[i],"","","",ctx,data,statData,othervars,vleft,vbottom,1
10531*drawShapeSetValue(shapesInChart[i].paddingX2,drawShape_default.paddingX2),1*drawShapeSetValue(shapesInChart[i].paddingY2,drawShape_default.paddingY2),drawShapeSetValue(shapesInChart[i].limitToChart,drawShape_default.limitToChart));
10532					if(Math.abs(xypos1.xpos-xypos2.xpos) < othervars.config.zeroValue) { // vertical line;
10533						vright=xypos1.xpos;
10534						vleft=xypos2.xpos;
10535						vbottom=xypos1.ypos + (1-realAnimation)*(xypos2.ypos-xypos1.ypos)/2;
10536						vtop=xypos2.ypos - (1-realAnimation)*(xypos2.ypos-xypos1.ypos)/2 ;
10537					} else { // non vertical line;
10538						// compute line function;
10539						var a=(xypos1.ypos-xypos2.ypos)/(xypos1.xpos-xypos2.xpos);
10540						var b=xypos1.ypos-a*xypos1.xpos;
10541						vright=xypos2.xpos - (1-realAnimation)*(xypos2.xpos-xypos1.xpos)/2;
10542						vleft =xypos1.xpos + (1-realAnimation)*(xypos2.xpos-xypos1.xpos)/2;
10543						vtop=a*vright+b;
10544						vbottom=a*vleft+b;
10545					}
10546					ctx.moveTo(vright, vtop);
10547					ctx.lineTo(vleft, vbottom);
10548					ctx.lineWidth = Math.ceil(ctx.chartLineScale*drawShapeSetValue(shapesInChart[i].strokeSize,drawShape_default.strokeSize));
10549					ctx.strokeStyle = drawShapeSetValue(shapesInChart[i].strokeColor,drawShape_default.strokeColor);
10550					ctx.setLineDash(lineStyleFn(drawShapeSetValue(shapesInChart[i].strokeStyle,drawShape_default.strokeStyle)));	
10551					ctx.stroke();
10552					ctx.setLineDash([]);
10553					break;
10554				case "ARROW" :
10555					var vright, vleft, vtop, vbottom, tmp;
10556					var arrowtx1,arrowtx2,arrowty1,arrowty2;
10557					var arrowbx1,arrowbx2,arrowby1,arrowby2;
10558					vright= 1*drawShapeSetValue(shapesInChart[i].x1,drawShape_default.x1);
10559					vleft= 1*drawShapeSetValue(shapesInChart[i].x2,drawShape_default.x2);
10560					vtop= 1*drawShapeSetValue(shapesInChart[i].y1,drawShape_default.y1);
10561					vbottom= 1*drawShapeSetValue(shapesInChart[i].y2,drawShape_default.y2);
10562					ctx.beginPath();
10563					var xypos1=setXYpos(shape,shapesInChart[i],"","","",ctx,data,statData,othervars,vright,vtop,1*drawShapeSetValue(shapesInChart[i].paddingX1,drawShape_default.paddingX1),1*drawShapeSetValue(shapesInChart[i].paddingY1,drawShape_default.paddingY1),drawShapeSetValue(shapesInChart[i].limitToChart,drawShape_default.limitToChart));
10564					var xypos2=setXYpos(shape,shapesInChart[i],"","","",ctx,data,statData,othervars,vleft,vbottom,1*drawShapeSetValue(shapesInChart[i].paddingX2,drawShape_default.paddingX2),1*drawShapeSetValue(shapesInChart[i].paddingY2,drawShape_default.paddingY2),drawShapeSetValue(shapesInChart[i].limitToChart,drawShape_default.limitToChart));
10565					var arrowWidth=realAnimation*1*drawShapeSetValue(shapesInChart[i].arrowWidth,drawShape_default.arrowWidth) ;
10566					var arrowHeight=realAnimation*1*drawShapeSetValue(shapesInChart[i].arrowHeight,drawShape_default.arrowHeight);
10567
10568					if(Math.abs(xypos1.xpos-xypos2.xpos) < othervars.config.zeroValue) { // vertical line;
10569						vright=xypos1.xpos;
10570						vleft=xypos2.xpos;
10571						vbottom=xypos1.ypos ;
10572						vtop=xypos2.ypos - (1-realAnimation)*(xypos2.ypos-xypos1.ypos);
10573						if(vbottom>vtop)fact=1;else fact=-1;
10574						arrowby1=vbottom-fact*arrowHeight;
10575						arrowby2=arrowby1;
10576						arrowty1=vtop+fact*arrowHeight;
10577						arrowty2=arrowty1;
10578						arrowbx1=vright-arrowWidth/2;
10579						arrowbx2=vright+arrowWidth/2;
10580						arrowtx1=arrowbx1;
10581						arrowtx2=arrowbx2;
10582					} else { // non vertical line;
10583						// compute line function;
10584						var a=(xypos1.ypos-xypos2.ypos)/(xypos1.xpos-xypos2.xpos);
10585						var b=xypos1.ypos-a*xypos1.xpos;
10586						vright=xypos2.xpos - (1-realAnimation)*(xypos2.xpos-xypos1.xpos);
10587						vleft =xypos1.xpos ;
10588						vtop=a*vright+b;
10589						vbottom=a*vleft+b;
10590						if(Math.abs(vtop-vbottom) < othervars.config.zeroValue) { // Horizontal Arrow;
10591							var fact;
10592							if(vleft<vright)fact=1;else fact=-1;
10593							arrowby1=vbottom-arrowWidth/2;
10594							arrowby2=vbottom+arrowWidth/2;
10595							arrowbx1=vleft+fact*arrowHeight;
10596							arrowbx2=arrowbx1;
10597							arrowty1=arrowby1;
10598							arrowty2=arrowby2;
10599							arrowtx1=vright-fact*arrowHeight;
10600							arrowtx2=arrowtx1;
10601						
10602						} else {
10603							var fact;
10604							if(vleft<vright)fact=1;else fact=-1;
10605							var crossptx=vleft+fact*arrowHeight*Math.cos(Math.atan(a));
10606							var crosspty=a*crossptx+b;
10607							var bprim=crosspty+(1/a)*crossptx;
10608							arrowbx1=crossptx-(arrowWidth/2)*(Math.cos(Math.atan(-1/a)));
10609							arrowbx2=crossptx+(arrowWidth/2)*(Math.cos(Math.atan(-1/a)));
10610							arrowby1=(-1/a)*arrowbx1+bprim;
10611							arrowby2=(-1/a)*arrowbx2+bprim;
10612							crossptx=vright-fact*arrowHeight*Math.cos(Math.atan(a));
10613							crosspty=a*crossptx+b;
10614							bprim=crosspty+(1/a)*crossptx;
10615							arrowtx1=crossptx-(arrowWidth/2)*(Math.cos(Math.atan(-1/a)));
10616							arrowtx2=crossptx+(arrowWidth/2)*(Math.cos(Math.atan(-1/a)));
10617							arrowty1=(-1/a)*arrowtx1+bprim;
10618							arrowty2=(-1/a)*arrowtx2+bprim;
10619							
10620						}
10621						var crossptx=vleft+arrowHeight*Math.cos(Math.atan(a));
10622						var crosspty=a*crossptx+b;
10623						var bprim=crosspty+(1/a)
10624						
10625					}
10626					ctx.moveTo(vright, vtop);
10627					ctx.lineTo(vleft, vbottom);
10628					ctx.lineWidth = Math.ceil(ctx.chartLineScale*drawShapeSetValue(shapesInChart[i].strokeSize,drawShape_default.strokeSize));
10629					ctx.strokeStyle = drawShapeSetValue(shapesInChart[i].strokeColor,drawShape_default.strokeColor);
10630					ctx.setLineDash(lineStyleFn(drawShapeSetValue(shapesInChart[i].strokeStyle,drawShape_default.strokeStyle)));	
10631					ctx.stroke();
10632					
10633					ctx.restore();
10634					ctx.strokeStyle = drawShapeSetValue(shapesInChart[i].strokeColor,drawShape_default.strokeColor);
10635					ctx.setLineDash(lineStyleFn(drawShapeSetValue(shapesInChart[i].strokeStyle,drawShape_default.strokeStyle)));	
10636					ctx.lineWidth = Math.ceil(ctx.chartLineScale*drawShapeSetValue(shapesInChart[i].strokeSize,drawShape_default.strokeSize));
10637					ctx.setLineDash([]);
10638
10639					if(drawShapeSetValue(shapesInChart[i].arrowTop,drawShape_default.arrowTop)) {
10640						ctx.moveTo(vright, vtop);
10641						ctx.lineTo(arrowtx1, arrowty1);
10642						ctx.lineTo(arrowtx2, arrowty2);
10643						ctx.lineTo(vright,vtop);
10644						ctx.stroke();
10645						ctx.closePath();
10646						ctx.fillStyle=drawShapeSetValue(shapesInChart[i].strokeColor,drawShape_default.strokeColor);
10647						ctx.fill();
10648					}
10649					if(drawShapeSetValue(shapesInChart[i].arrowBottom,drawShape_default.arrowBottom)) {
10650						ctx.moveTo(vleft, vbottom);
10651						ctx.lineTo(arrowbx1, arrowby1);
10652						ctx.lineTo(arrowbx2, arrowby2);
10653						ctx.lineTo(vleft,vbottom);
10654						ctx.stroke();
10655						ctx.closePath();
10656						ctx.fillStyle=drawShapeSetValue(shapesInChart[i].strokeColor,drawShape_default.strokeColor);
10657						ctx.fill();
10658					}
10659					ctx.setLineDash([]);
10660					break;
10661				case "TEXT" :
10662					ctx.beginPath();
10663					var vx, vy, text;
10664					vx= 1*drawShapeSetValue(shapesInChart[i].x1,drawShape_default.x1);
10665					vy= 1*drawShapeSetValue(shapesInChart[i].y1,drawShape_default.y1);
10666					text= drawShapeSetValue(shapesInChart[i].text,drawShape_default.text);
10667					if(typeof text=="function") {
10668						text=text(i, null, ctx, othervars.config, vx, vy, othervars.borderX, othervars.borderY, true, data, othervars.animationValue,othervars);
10669					}
10670					var xypos1=setXYpos(shape,shapesInChart[i],"","","",ctx,data,statData,othervars,vx,vy,1*drawShapeSetValue(shapesInChart[i].paddingX1,drawShape_default.paddingX1),1*drawShapeSetValue(shapesInChart[i].paddingY1,drawShape_default.paddingY1),drawShapeSetValue(shapesInChart[i].limitToChart,drawShape_default.limitToChart));
10671					ctx.translate(xypos1.xpos, xypos1.ypos);
10672					var fontSize=realAnimation*drawShapeSetValue(shapesInChart[i].fontSize,drawShape_default.fontSize);
10673					ctx.font = drawShapeSetValue(shapesInChart[i].fontStyle,drawShape_default.fontStyle) + " " + (Math.ceil(ctx.chartTextScale*fontSize)).toString() + "px " + drawShapeSetValue(shapesInChart[i].fontFamily,drawShape_default.fontFamily);
10674					ctx.fillStyle = drawShapeSetValue(shapesInChart[i].fontColor,drawShape_default.fontColor);
10675					ctx.textAlign = drawShapeSetValue(shapesInChart[i].textAlign,drawShape_default.textAlign);
10676					ctx.textBaseline = drawShapeSetValue(shapesInChart[i].textBaseline,drawShape_default.textBaseline);
10677					var rotateVal=Math.PI * 1*drawShapeSetValue(shapesInChart[i].rotate,drawShape_default.rotate) / 180;
10678					ctx.rotate(rotateVal);
10679					setTextBordersAndBackground(ctx,text,Math.ceil(ctx.chartTextScale*fontSize),0,0,drawShapeSetValue(shapesInChart[i].textBorders,drawShape_default.textBorders),drawShapeSetValue(shapesInChart[i].textBordersSelection,drawShape_default.textBordersSelection),drawShapeSetValue(shapesInChart[i].textBordersColor,drawShape_default.textBordersColor),Math.ceil((realAnimation)*ctx.chartLineScale*drawShapeSetValue(shapesInChart[i].textBordersWidth,drawShape_default.textBordersWidth)),Math.ceil(ctx.chartSpaceScale*drawShapeSetValue(shapesInChart[i].textBordersXSpace,drawShape_default.textBordersXSpace)),Math.ceil(ctx.chartSpaceScale*drawShapeSetValue(shapesInChart[i].textBordersYSpace,drawShape_default.textBordersYSpace)),drawShapeSetValue(shapesInChart[i].textBordersStyle,drawShape_default.textBordersStyle),drawShapeSetValue(shapesInChart[i].textBackgroundColor,drawShape_default.textBackgroundColor),"TEXTINSHAPE",drawShapeSetValue(shapesInChart[i].textBordersRadius,drawShape_default.textBordersRadius));
10680					if (iter !=="all" || (iter === "all" && othervars.cntiter != othervars.config.animationSteps) || othervars.config.animation==false) {
10681					       ctx.fillTextMultiLine(text, 0, 0, ctx.textBaseline, Math.ceil(ctx.chartTextScale*fontSize),true,othervars.config.detectMouseOnText,ctx,"SHAPESINCHART_TEXTMOUSE",rotateVal,xypos1.xpos, xypos1.ypos,-1,-1);
10682					} else ctx.fillTextMultiLine(text, 0, 0, ctx.textBaseline, Math.ceil(ctx.chartTextScale*fontSize),true,false,ctx,"SHAPESINCHART_TEXTMOUSE",rotateVal,xypos1.xpos, xypos1.ypos,-1,-1);
10683					break;
10684				case "IMAGE" :
10685					var imageAlign = drawShapeSetValue(shapesInChart[i].imageAlign,drawShape_default.imageAlign);
10686					var imageBaseline = drawShapeSetValue(shapesInChart[i].imageBaseline,drawShape_default.imageBaseline);
10687					var vx, vy, text;
10688					vx= 1*drawShapeSetValue(shapesInChart[i].x1,drawShape_default.x1);
10689					vy= 1*drawShapeSetValue(shapesInChart[i].y1,drawShape_default.y1);
10690					var xypos1=setXYpos(shape,shapesInChart[i],imageAlign,imageBaseline,shapesInChart[i].loadImage,ctx,data,statData,othervars,vx,vy,1*drawShapeSetValue(shapesInChart[i].paddingX1,drawShape_default.paddingX1),1*drawShapeSetValue(shapesInChart[i].paddingY1,drawShape_default.paddingY1),drawShapeSetValue(shapesInChart[i].limitToChart,drawShape_default.limitToChart));
10691					ctx.translate(xypos1.xpos, xypos1.ypos);
10692					var rotateVal=Math.PI * 1*drawShapeSetValue(shapesInChart[i].rotate,drawShape_default.rotate) / 180;
10693					ctx.rotate(rotateVal);
10694					var imageWidth=drawShapeSetValue(shapesInChart[i].imageWidth,shapesInChart[i].loadImage.width);
10695					var imageHeight=drawShapeSetValue(shapesInChart[i].imageHeight,shapesInChart[i].loadImage.height);
10696					ctx.drawImage(shapesInChart[i].loadImage, 0, 0,shapesInChart[i].loadImage.width,shapesInChart[i].loadImage.height,0, 0,imageWidth,imageHeight);
10697					break;
10698				case "STAR" :
10699				case "PLUS" :
10700				case "CROSS" :
10701					var vxs1,vys1,vxs2,vys2,lineCount,angle,vx,vy,vx2,vy2;
10702					var angle     = (Math.PI*(1*drawShapeSetValue(shapesInChart[i].rotate,drawShape_default.rotate)-90)/180);
10703					switch(shape) {
10704						case "PLUS" :
10705							lineCount=2;
10706							break;
10707						case "CROSS" :
10708							lineCount=2;
10709							angle+=Math.PI/4;
10710							break;
10711						default: 
10712							lineCount = 1*drawShapeSetValue(shapesInChart[i].lineCount,drawShape_default.lineCount);
10713							if (lineCount<2)lineCount=2;
10714							break;
10715					}
10716					var angleplus = Math.PI/lineCount;
10717					vx= 1*drawShapeSetValue(shapesInChart[i].x1,drawShape_default.x1);
10718					vy= 1*drawShapeSetValue(shapesInChart[i].y1,drawShape_default.y1);
10719					var radius    = realAnimation*1*drawShapeSetValue(shapesInChart[i].radius,drawShape_default.radius);
10720					if (radius < 0) {
10721						var xypos2=setXYpos(shape,shapesInChart[i],"","","",ctx,data,statData,othervars,1*drawShapeSetValue(shapesInChart[i].x2,drawShape_default.x2),1*drawShapeSetValue(shapesInChart[i].y2,drawShape_default.y2),1*drawShapeSetValue(shapesInChart[i].paddingX2,drawShape_default.paddingX2),1*drawShapeSetValue(shapesInChart[i].paddingY2,drawShape_default.paddingY2),drawShapeSetValue(shapesInChart[i].limitToChart,drawShape_default.limitToChart));
10722						radius=Math.sqrt(((xypos.xpos-xypos2.xpos)*(xypos.xpos-xypos2.xpos))+((xypos.ypos-xypos2.ypos)*(xypos.ypos-xypos2.ypos)));
10723					}
10724					var xypos1=setXYpos(shape,shapesInChart[i],"","","",ctx,data,statData,othervars,vx,vy,1*drawShapeSetValue(shapesInChart[i].paddingX1,drawShape_default.paddingX1),1*drawShapeSetValue(shapesInChart[i].paddingY1,drawShape_default.paddingY1),drawShapeSetValue(shapesInChart[i].limitToChart,drawShape_default.limitToChart));
10725					ctx.beginPath();
10726
10727					ctx.lineWidth = Math.ceil(ctx.chartLineScale*drawShapeSetValue(shapesInChart[i].strokeSize,drawShape_default.strokeSize));
10728					ctx.strokeStyle = drawShapeSetValue(shapesInChart[i].strokeColor,drawShape_default.strokeColor);
10729					ctx.setLineDash(lineStyleFn(drawShapeSetValue(shapesInChart[i].strokeStyle,drawShape_default.strokeStyle)));	
10730					for(var j=0;j<lineCount;j++) {
10731						vxs1=xypos1.xpos+radius*Math.cos(angle);
10732						vys1=xypos1.ypos+radius*Math.sin(angle);
10733						vxs2=xypos1.xpos-radius*Math.cos(angle);
10734						vys2=xypos1.ypos-radius*Math.sin(angle);
10735						angle+=angleplus;
10736						ctx.moveTo(vxs1,vys1);
10737						ctx.lineTo(vxs2,vys2);
10738						ctx.stroke();
10739					}					
10740					ctx.setLineDash([]);
10741					break;
10742				case "REGULARSHAPE" :
10743				case "TRIANGLE" :
10744				case "SQUARE" :
10745				case "DIAMOND" :
10746					var vxs,vys,sideCount,angle;
10747					var angle     = (Math.PI*(1*drawShapeSetValue(shapesInChart[i].rotate,drawShape_default.rotate)-90)/180);
10748					switch(shape) {
10749						case "TRIANGLE" :
10750							sideCount=3;
10751							break;
10752						case "SQUARE" :
10753							sideCount=4;
10754							angle+=Math.PI/4;
10755							break;
10756						case "DIAMOND" :
10757							sideCount=4;
10758							break;
10759						default: 
10760							sideCount = 1*drawShapeSetValue(shapesInChart[i].sideCount,drawShape_default.sideCount);
10761							if (sideCount<3)sideCount=3;
10762							break;
10763					}
10764					var angleplus = 2*Math.PI/sideCount;
10765					vx= 1*drawShapeSetValue(shapesInChart[i].x1,drawShape_default.x1);
10766					vy= 1*drawShapeSetValue(shapesInChart[i].y1,drawShape_default.y1);
10767					var xypos1=setXYpos(shape,shapesInChart[i],"","","",ctx,data,statData,othervars,vx,vy,1*drawShapeSetValue(shapesInChart[i].paddingX1,drawShape_default.paddingX1),1*drawShapeSetValue(shapesInChart[i].paddingY1,drawShape_default.paddingY1),drawShapeSetValue(shapesInChart[i].limitToChart,drawShape_default.limitToChart));
10768					var radius    = realAnimation*1*drawShapeSetValue(shapesInChart[i].radius,drawShape_default.radius);
10769					if (radius < 0) {
10770						var xypos2=setXYpos(shape,shapesInChart[i],"","","",ctx,data,statData,othervars,1*drawShapeSetValue(shapesInChart[i].x2,drawShape_default.x2),1*drawShapeSetValue(shapesInChart[i].y2,drawShape_default.y2),1*drawShapeSetValue(shapesInChart[i].paddingX2,drawShape_default.paddingX2),1*drawShapeSetValue(shapesInChart[i].paddingY2,drawShape_default.paddingY2),drawShapeSetValue(shapesInChart[i].limitToChart,drawShape_default.limitToChart));
10771						radius=Math.sqrt(((xypos.xpos-xypos2.xpos)*(xypos.xpos-xypos2.xpos))+((xypos.ypos-xypos2.ypos)*(xypos.ypos-xypos2.ypos)));
10772					}
10773					ctx.beginPath();
10774					ctx.lineWidth = Math.ceil(ctx.chartLineScale*drawShapeSetValue(shapesInChart[i].strokeSize,drawShape_default.strokeSize));
10775					ctx.strokeStyle = drawShapeSetValue(shapesInChart[i].strokeColor,drawShape_default.strokeColor);
10776					ctx.setLineDash(lineStyleFn(drawShapeSetValue(shapesInChart[i].strokeStyle,drawShape_default.strokeStyle)));	
10777					for(var j=0;j<sideCount;j++) {
10778						vxs=xypos1.xpos+radius*Math.cos(angle);
10779						vys=xypos1.ypos+radius*Math.sin(angle);
10780						angle+=angleplus;
10781						if(j==0) ctx.moveTo(vxs,vys);
10782						else     ctx.lineTo(vxs,vys);
10783					}					
10784					ctx.closePath();
10785					ctx.fillStyle=setOptionValue(true,true,1,"SHAPESINCHART_REGULARSHAPE",ctx,data,statData,shapesInChart[i].fillColor,drawShape_default.fillColor,"fillColor",-1,-1,{gradientColors: shapesInChart[i].gradientColors,animationValue : realAnimation, midPosX : xypos1.xpos, midPosY : xypos1.ypos, radius : radius });
10786					ctx.fill();
10787					ctx.stroke();
10788					ctx.setLineDash([]);
10789					break;					
10790				case "ELLIPSE" :
10791					ctx.beginPath();
10792					var xypos=setXYpos(shape,shapesInChart[i],"","","",ctx,data,statData,othervars,1*drawShapeSetValue(shapesInChart[i].x1,drawShape_default.x1),1*drawShapeSetValue(shapesInChart[i].y1,drawShape_default.y1),1*drawShapeSetValue(shapesInChart[i].paddingX1,drawShape_default.paddingX1),1*drawShapeSetValue(shapesInChart[i].paddingY1,drawShape_default.paddingY1),drawShapeSetValue(shapesInChart[i].limitToChart,drawShape_default.limitToChart));
10793					var height=realAnimation*1*drawShapeSetValue(shapesInChart[i].ellipseHeight,drawShape_default.ellipseHeight);
10794					var width= realAnimation*1*drawShapeSetValue(shapesInChart[i].ellipseWidth,drawShape_default.ellipseWidth);
10795					ctx.moveTo(xypos.xpos, xypos.ypos - height/2); // A1
10796					ctx.bezierCurveTo(
10797    						xypos.xpos + width/2, xypos.ypos - height/2, // C1
10798    						xypos.xpos + width/2, xypos.ypos + height/2, // C2
10799    						xypos.xpos, xypos.ypos + height/2); // A2
10800					ctx.bezierCurveTo(
10801						xypos.xpos - width/2, xypos.ypos + height/2, // C3
10802						xypos.xpos - width/2, xypos.ypos - height/2, // C4
10803						xypos.xpos, xypos.ypos - height/2); // A1
10804					ctx.closePath();
10805					ctx.fillStyle=setOptionValue(true,true,1,"SHAPESINCHART_ELLIPSE",ctx,data,statData,shapesInChart[i].fillColor,drawShape_default.fillColor,"fillColor",-1,-1,{gradientColors: shapesInChart[i].gradientColors,animationValue : realAnimation, midPosX : xypos.xpos, midPosY : xypos.ypos, radius : Math.max(width/2,height/2) });
10806					ctx.fill();
10807					ctx.lineWidth = Math.ceil(ctx.chartLineScale*drawShapeSetValue(shapesInChart[i].strokeSize,drawShape_default.strokeSize));
10808					ctx.strokeStyle = drawShapeSetValue(shapesInChart[i].strokeColor,drawShape_default.strokeColor);
10809					ctx.setLineDash(lineStyleFn(drawShapeSetValue(shapesInChart[i].strokeStyle,drawShape_default.strokeStyle)));	
10810					ctx.stroke();
10811					ctx.setLineDash([]);
10812					break;
10813				case "RECTANGLE" :
10814	
10815					var vright, vleft, vtop, vbottom, tmp;
10816					vright= 1*drawShapeSetValue(shapesInChart[i].x1,drawShape_default.x1);
10817					vleft= 1*drawShapeSetValue(shapesInChart[i].x2,drawShape_default.x2);
10818					vtop= 1*drawShapeSetValue(shapesInChart[i].y2,drawShape_default.y2);
10819					vbottom= 1*drawShapeSetValue(shapesInChart[i].y1,drawShape_default.y1);
10820					ctx.beginPath();
10821
10822					var xypos1=setXYpos(shape,shapesInChart[i],"","","",ctx,data,statData,othervars,vleft,vtop,1*drawShapeSetValue(shapesInChart[i].paddingX1,drawShape_default.paddingX1),1*drawShapeSetValue(shapesInChart[i].paddingY1,drawShape_default.paddingY1),drawShapeSetValue(shapesInChart[i].limitToChart,drawShape_default.limitToChart));
10823					var xypos2=setXYpos(shape,shapesInChart[i],"","","",ctx,data,statData,othervars,vright,vbottom,1
10823*drawShapeSetValue(shapesInChart[i].paddingX2,drawShape_default.paddingX2),1*drawShapeSetValue(shapesInChart[i].paddingY2,drawShape_default.paddingY2),drawShapeSetValue(shapesInChart[i].limitToChart,drawShape_default.limitToChart));
10824
10825					if (xypos2.xpos<xypos1.xpos){tmp=xypos2.xpos;xypos2.xpos=xypos1.xpos;xypos1.xpos=tmp;}
10826					if (xypos2.ypos<xypos1.ypos){tmp=xypos2.ypos;xypos2.ypos=xypos1.ypos;xypos1.ypos=tmp;}
10827
10828					ctx.moveTo(xypos1.xpos+(1-realAnimation)*((xypos2.xpos-xypos1.xpos)/2), xypos1.ypos+(1-realAnimation)*((xypos2.ypos-xypos1.ypos)/2));
10829					ctx.lineTo(xypos1.xpos+(1-realAnimation)*((xypos2.xpos-xypos1.xpos)/2), xypos2.ypos-(1-realAnimation)*((xypos2.ypos-xypos1.ypos)/2));
10830					ctx.lineTo(xypos2.xpos-(1-realAnimation)*((xypos2.xpos-xypos1.xpos)/2), xypos2.ypos-(1-realAnimation)*((xypos2.ypos-xypos1.ypos)/2));
10831					ctx.lineTo(xypos2.xpos-(1-realAnimation)*((xypos2.xpos-xypos1.xpos)/2), xypos1.ypos+(1-realAnimation)*((xypos2.ypos-xypos1.ypos)/2));
10832	
10833					ctx.closePath();
10834					ctx.fillStyle=setOptionValue(true,true,1,"SHAPESINCHART_RECT",ctx,data,statData,shapesInChart[i].fillColor,drawShape_default.fillColor,"fillColor",-1,-1,{gradientColors: shapesInChart[i].gradientColors,animationValue : realAnimation, xPosLeft : xypos1.xpos+(1-realAnimation)*((xypos2.xpos-xypos1.xpos)/2), yPosBottom : xypos1.ypos+(1-realAnimation)*((xypos2.ypos-xypos1.ypos)/2), yPosTop :xypos2.ypos-(1-realAnimation)*((xypos2.ypos-xypos1.ypos)/2) });
10835					ctx.fill();
10836					ctx.lineWidth = Math.ceil(ctx.chartLineScale*drawShapeSetValue(shapesInChart[i].strokeSize,drawShape_default.strokeSize));
10837					ctx.strokeStyle = drawShapeSetValue(shapesInChart[i].strokeColor,drawShape_default.strokeColor);
10838					ctx.setLineDash(lineStyleFn(drawShapeSetValue(shapesInChart[i].strokeStyle,drawShape_default.strokeStyle)));	
10839					ctx.stroke();
10840					ctx.setLineDash([]);
10841					break;
10842				case "MYSHAPE" :
10843					var xpos,ypos,xypos1,paddingX,paddingY;
10844					ctx.beginPath();
10845
10846					if(typeof shapesInChart[i].shapePoints !== "object") break;
10847					if(shapesInChart[i].shapePoints.length <3) break;
10848					
10849					for(var j=0;j<shapesInChart[i].shapePoints.length;j++) {
10850						xpos=drawShapeSetValue(shapesInChart[i].shapePoints[j][0],drawShape_default.x1);
10851						ypos=drawShapeSetValue(shapesInChart[i].shapePoints[j][1],drawShape_default.y1);
10852						paddingX=drawShapeSetValue(shapesInChart[i].shapePadding[j][0],drawShape_default.paddingX1);
10853						paddingY=drawShapeSetValue(shapesInChart[i].shapePadding[j][1],drawShape_default.paddingY1);
10854						xypos1=setXYpos(shape,shapesInChart[i],"","","",ctx,data,statData,othervars,xpos,ypos,1*paddingX,1*paddingY,drawShapeSetValue(shapesInChart[i].limitToChart,drawShape_default.limitToChart));
10855						if(j==0) ctx.moveTo(xypos1.xpos,xypos1.ypos);
10856						else ctx.lineTo(xypos1.xpos,xypos1.ypos);
10857					} 					
10858					ctx.closePath();
10859					ctx.fillStyle=drawShapeSetValue(shapesInChart[i].fillColor,drawShape_default.fillColor);
10860					ctx.fill();
10861					ctx.lineWidth = Math.ceil(ctx.chartLineScale*drawShapeSetValue(shapesInChart[i].strokeSize,drawShape_default.strokeSize));
10862					ctx.strokeStyle = drawShapeSetValue(shapesInChart[i].strokeColor,drawShape_default.strokeColor);
10863					ctx.setLineDash(lineStyleFn(drawShapeSetValue(shapesInChart[i].strokeStyle,drawShape_default.strokeStyle)));	
10864					ctx.stroke();
10865					ctx.setLineDash([]);
10866					break;
10867				case "CIRCLE" :
10868					ctx.beginPath();
10869					var xypos=setXYpos(shape,shapesInChart[i],"","","",ctx,data,statData,othervars,1*drawShapeSetValue(shapesInChart[i].x1,drawShape_default.x1),1*drawShapeSetValue(shapesInChart[i].y1,drawShape_default.y1),1*drawShapeSetValue(shapesInChart[i].paddingX1,drawShape_default.paddingX1),1*drawShapeSetValue(shapesInChart[i].paddingY1,drawShape_default.paddingY1),drawShapeSetValue(shapesInChart[i].limitToChart,drawShape_default.limitToChart));
10870					var radius    = realAnimation*1*drawShapeSetValue(shapesInChart[i].radius,drawShape_default.radius);
10871					if (radius < 0) {
10872						var xypos2=setXYpos(shape,shapesInChart[i],"","","",ctx,data,statData,othervars,1*drawShapeSetValue(shapesInChart[i].x2,drawShape_default.x2),1*drawShapeSetValue(shapesInChart[i].y2,drawShape_default.y2),1*drawShapeSetValue(shapesInChart[i].paddingX2,drawShape_default.paddingX2),1*drawShapeSetValue(shapesInChart[i].paddingY2,drawShape_default.paddingY2),drawShapeSetValue(shapesInChart[i].limitToChart,drawShape_default.limitToChart));
10873						radius=Math.sqrt(((xypos.xpos-xypos2.xpos)*(xypos.xpos-xypos2.xpos))+((xypos.ypos-xypos2.ypos)*(xypos.ypos-xypos2.ypos)));
10874					}
10875					var xypos=setXYpos(shape,shapesInChart[i],"","","",ctx,data,statData,othervars,1*drawShapeSetValue(shapesInChart[i].x1,drawShape_default.x1),1*drawShapeSetValue(shapesInChart[i].y1,drawShape_default.y1),1*drawShapeSetValue(shapesInChart[i].paddingX1,drawShape_default.paddingX1),1*drawShapeSetValue(shapesInChart[i].paddingY1,drawShape_default.paddingY1),drawShapeSetValue(shapesInChart[i].limitToChart,drawShape_default.limitToChart));
10876					if (1*drawShapeSetValue(shapesInChart[i].endAngle,drawShape_default.endAngle)-1*drawShapeSetValue(shapesInChart[i].startAngle,drawShape_default.startAngle) !=  360)
10877						ctx.arc(xypos.xpos,xypos.ypos, 0, (Math.PI/180)*1*drawShapeSetValue(shapesInChart[i].startAngle,drawShape_default.startAngle), (Math.PI/180)*1*drawShapeSetValue(shapesInChart[i].endAngle,drawShape_default.endAngle),false);
10878					ctx.arc(xypos.xpos,xypos.ypos, realAnimation*1*radius, (Math.PI/180)*1*drawShapeSetValue(shapesInChart[i].startAngle,drawShape_default.startAngle), (Math.PI/180)*1*drawShapeSetValue(shapesInChart[i].endAngle,drawShape_default.endAngle),true);
10879					ctx.closePath();
10880					ctx.fillStyle=setOptionValue(true,true,1,"SHAPESINCHART_CIRCLE",ctx,data,statData,shapesInChart[i].fillColor,drawShape_default.fillColor,"fillColor",-1,-1,{gradientColors: shapesInChart[i].gradientColors,animationValue : realAnimation, midPosX : xypos.xpos, midPosY : xypos.ypos, radius : radius  });
10881//					ctx.fillStyle=drawShapeSetValue(shapesInChart[i].fillColor,drawShape_default.fillColor);
10882					ctx.fill();
10883					ctx.lineWidth = Math.ceil(ctx.chartLineScale*drawShapeSetValue(shapesInChart[i].strokeSize,drawShape_default.strokeSize));
10884					ctx.strokeStyle = drawShapeSetValue(shapesInChart[i].strokeColor,drawShape_default.strokeColor);
10885					ctx.setLineDash(lineStyleFn(drawShapeSetValue(shapesInChart[i].strokeStyle,drawShape_default.strokeStyle)));	
10886					ctx.stroke();
10887					ctx.setLineDash([]);
10888					break;
10889				default : 
10890					if(typeof shapesInChart[i].shape == "function"){
10891						othervars.currentShape=i;
10892						othervars.shapesInChart=shapesInChart[i];
10893						othervars.xypos1=setXYpos(shape,shapesInChart[i],"","","",ctx,data,statData,othervars,1*drawShapeSetValue(shapesInChart[i].x1,drawShape_default.x1),1*drawShapeSetValue(shapesInChart[i].y1,drawShape_default.y1),1*drawShapeSetValue(shapesInChart[i].paddingX1,drawShape_default.paddingX1),1*drawShapeSetValue(shapesInChart[i].paddingY1,drawShape_default.paddingY1),drawShapeSetValue(shapesInChart[i].limitToChart,drawShape_default.limitToChart));
10894						othervars.xypos2=setXYpos(shape,shapesInChart[i],"","","",ctx,data,statData,othervars,1*drawShapeSetValue(shapesInChart[i].x2,drawShape_default.x2),1*drawShapeSetValue(shapesInChart[i].y2,drawShape_default.y2),1*drawShapeSetValue(shapesInChart[i].paddingX2,drawShape_default.paddingX2),1*drawShapeSetValue(shapesInChart[i].paddingY2,drawShape_default.paddingY2),drawShapeSetValue(shapesInChart[i].limitToChart,drawShape_default.limitToChart));
10895						othervars.xypos3=setXYpos(shape,shapesInChart[i],"","","",ctx,data,statData,othervars,1*drawShapeSetValue(shapesInChart[i].x3,drawShape_default.x3),1*drawShapeSetValue(shapesInChart[i].y3,drawShape_default.y3),1*drawShapeSetValue(shapesInChart[i].paddingX3,drawShape_default.paddingX3),1*drawShapeSetValue(shapesInChart[i].paddingY3,drawShape_default.paddingY3),drawShapeSetValue(shapesInChart[i].limitToChart,drawShape_default.limitToChart));
10896						othervars.xypos4=setXYpos(shape,shapesInChart[i],"","","",ctx,data,statData,othervars,1*drawShapeSetValue(shapesInChart[i].x4,drawShape_default.x4),1*drawShapeSetValue(shapesInChart[i].y4,drawShape_default.y4),1*drawShapeSetValue(shapesInChart[i].paddingX4,drawShape_default.paddingX4),1*drawShapeSetValue(shapesInChart[i].paddingY4,drawShape_default.paddingY4),drawShapeSetValue(shapesInChart[i].limitToChart,drawShape_default.limitToChart));
10897						othervars.xypos5=setXYpos(shape,shapesInChart[i],"","","",ctx,data,statData,othervars,1*drawShapeSetValue(shapesInChart[i].x5,drawShape_default.x5
10897),1*drawShapeSetValue(shapesInChart[i].y5,drawShape_default.y5),1*drawShapeSetValue(shapesInChart[i].paddingX5,drawShape_default.paddingX5),1*drawShapeSetValue(shapesInChart[i].paddingY5,drawShape_default.paddingY5),drawShapeSetValue(shapesInChart[i].limitToChart,drawShape_default.limitToChart));
10898						othervars.xypos6=setXYpos(shape,shapesInChart[i],"","","",ctx,data,statData,othervars,1*drawShapeSetValue(shapesInChart[i].x6,drawShape_default.x6),1*drawShapeSetValue(shapesInChart[i].y6,drawShape_default.y6),1*drawShapeSetValue(shapesInChart[i].paddingX6,drawShape_default.paddingX6),1*drawShapeSetValue(shapesInChart[i].paddingY6,drawShape_default.paddingY6),drawShapeSetValue(shapesInChart[i].limitToChart,drawShape_default.limitToChart));
10899						othervars.xypos7=setXYpos(shape,shapesInChart[i],"","","",ctx,data,statData,othervars,1*drawShapeSetValue(shapesInChart[i].x7,drawShape_default.x7),1*drawShapeSetValue(shapesInChart[i].y7,drawShape_default.y7),1*drawShapeSetValue(shapesInChart[i].paddingX7,drawShape_default.paddingX7),1*drawShapeSetValue(shapesInChart[i].paddingY7,drawShape_default.paddingY7),drawShapeSetValue(shapesInChart[i].limitToChart,drawShape_default.limitToChart));
10900						othervars.xypos8=setXYpos(shape,shapesInChart[i],"","","",ctx,data,statData,othervars,1*drawShapeSetValue(shapesInChart[i].x8,drawShape_default.x8),1*drawShapeSetValue(shapesInChart[i].y8,drawShape_default.y8),1*drawShapeSetValue(shapesInChart[i].paddingX8,drawShape_default.paddingX8),1*drawShapeSetValue(shapesInChart[i].paddingY8,drawShape_default.paddingY8),drawShapeSetValue(shapesInChart[i].limitToChart,drawShape_default.limitToChart));
10901						othervars.xypos9=setXYpos(shape,shapesInChart[i],"","","",ctx,data,statData,othervars,1*drawShapeSetValue(shapesInChart[i].x9,drawShape_default.x9),1*drawShapeSetValue(shapesInChart[i].y9,drawShape_default.y9),1*drawShapeSetValue(shapesInChart[i].paddingX9,drawShape_default.paddingX9),1*drawShapeSetValue(shapesInChart[i].paddingY9,drawShape_default.paddingY9),drawShapeSetValue(shapesInChart[i].limitToChart,drawShape_default.limitToChart));
10902						othervars.xypos10=setXYpos(shape,shapesInChart[i],"","","",ctx,data,statData,othervars,1*drawShapeSetValue(shapesInChart[i].x10,drawShape_default.x10),1*drawShapeSetValue(shapesInChart[i].y10,drawShape_default.y10),1*drawShapeSetValue(shapesInChart[i].paddingX10,drawShape_default.paddingX10),1*drawShapeSetValue(shapesInChart[i].paddingY10,drawShape_default.paddingY10),drawShapeSetValue(shapesInChart[i].limitToChart,drawShape_default.limitToChart));
10903						if(typeof shapesInChart[i].posj != "undefined")othervars.posj=shapesInChart[i].posj;
10904						shapesInChart[i].shape(area, ctx, data,statData, posi,posj,othervars);
10905					}
10906					break;
10907			}
10908			ctx.restore();
10909		}
10910	}
10911	
10912	function setXYpos(shape,shapesInChart,imageAlign,imageBaseline,image,ctx,data,statData,othervars,xposval,yposval,paddingX1,paddingY1,limitToChart) {
10913		var xpos, ypos, position;
10914		if(typeof shapesInChart.position != "string")position= drawShape_default.position.toUpperCase();
10915		else position=shapesInChart.position.toUpperCase();
10916		switch(position) {
10917			case "RELATIVE" :
10918				xpos = paddingX1;
10919				ypos = paddingY1;
10920				switch (xposval) {
10921					case 0:
10922						break;
10923					case 1:
10924						xpos += othervars.borderX;
10925						break;
10926					case 2:
10927						xpos += othervars.midPosX;
10928						break;
10929					case -2:
10930						if (window.devicePixelRatio) xpos += (ctx.canvas.width/2)/window.devicePixelRatio;
10931						else xpos += ctx.canvas.width / 2;
10932						break;
10933					case 3:
10934						xpos += xpos + 2 * othervars.midPosX - othervars.borderX;
10935						break;
10936					case 4:
10937						if (window.devicePixelRatio) xpos += ctx.canvas.width/window.devicePixelRatio;
10938						else xpos += ctx.canvas.width;
10939						break;
10940					default:
10941						xpos += othervars.midPosX;
10942						break;
10943				}
10944				switch (yposval) {
10945					case 0:
10946						break;
10947					case 3:
10948						ypos += othervars.borderY;
10949						break;
10950					case 2:
10951						ypos += othervars.midPosY;
10952						break;
10953					case -2:
10954						if (window.devicePixelRatio) ypos += (ctx.canvas.height/2)/window.devicePixelRatio;
10955						else ypos += ctx.canvas.height / 2;
10956						break;
10957					case 1:
10958						ypos += ypos + 2 * othervars.midPosY - othervars.borderY;
10959						break;
10960					case 4:
10961						if (window.devicePixelRatio) ypos += ctx.canvas.height/window.devicePixelRatio;
10962						else ypos += ctx.canvas.height;
10963						break;
10964					default:
10965						ypos += othervars.midPosY;
10966						break;
10967				}
10968				break;
10969			case "INCHART" :
10970				switch(tpdraw(ctx,data.datasets[0])) {
10971							case "Radar" :
10972								var angle=((2*Math.PI)/(data.labels.length))*xposval;
10973								ypos=calculateOffset(othervars.config.logarithmic, yposval, statData[0][0].calculatedScale, statData[0][0].scaleHop,limitToChart);
10974								xpos=Math.cos(othervars.config.startAngle * Math.PI / 180 - angle) * ypos;
10975								ypos=Math.sin(othervars.config.startAngle * Math.PI / 180 - angle) * ypos;
10976								xpos=statData[0][0].midPosX + xpos+paddingX1;
10977								ypos=statData[0][0].midPosY - ypos+paddingY1;
10978								break;
10979							case "Line" :
10980								ypos= calculateOffset(statData[0][0].logarithmic, yposval, statData[0][0].calculatedScale, statData[0][0].scaleHop,limitToChart) - statData[0][0].zeroY;
10981								ypos=statData[0][0].yAxisPos - ypos+paddingY1;
10982								var xposval_wk=xposval;
10983								if(limitToChart){
10984									if (xposval_wk<0)xposval_wk=0;
10985									if (xposval_wk>statData[0][0].nbValueHop)xposval_wk=statData[0][0].nbValueHop;
10986								}
10987								xpos=statData[0][0].yAxisPosX + (statData[0][0].valueHop * xposval_wk)+paddingX1;
10988								break;
10989							case "Bar" :
10990							case "StackedBar" :
10991								ypos = statData[0][0].xAxisPosY - calculateOffset(othervars.config.logarithmic, yposval , statData[0][0].calculatedScale, statData[0][0].scaleHop,limitToChart)+paddingY1;
10992								var xposval_wk=xposval;
10993								if(limitToChart){
10994									if (xposval_wk<-0.5)xposval_wk=-0.5;
10995									if (xposval_wk>data.labels.length-0.5)xposval_wk=data.labels.length-0.5;
10996								}
10997								xpos = statData[0][0].yAxisPosX + statData[0][0].valueHop * (xposval_wk+0.5)+paddingX1;
10998								break;
10999							case "HorizontalStackedBar" :
11000							case "HorizontalBar" :
11001								xpos = statData[0][0].yAxisPosX + calculateOffset(othervars.config.logarithmic, xposval , statData[0][0].calculatedScale, statData[0][0].valueHop,limitToChart)+paddingX1;
11002								var xposval_wk=yposval;
11003								if(limitToChart){
11004									if (xposval_wk<-0.5)xposval_wk=-0.5;
11005									if (xposval_wk>data.labels.length-0.5)xposval_wk=data.labels.length-0.5;
11006								}
11007								ypos = statData[0][0].xAxisPosY - statData[0][0].scaleHop * (xposval_wk+0.5)+paddingY1;
11008								break;
11009							case "Pie" :
11010							case "Doughnut" :
11011							case "PolarArea" :
11012								if(typeof shapesInChart.posj=="undefined")shapesInChart.posj=0;
11013								if(xposval < -0.499)xpos=-0.499;
11014								else if(xposval > data.datasets.length-0.501) xpos=data.datasets.length-0.501;
11015								else xpos=xposval;
11016								var curdata=Math.round(xpos);
11017								var startAngle=statData[curdata][shapesInChart.posj].startAngle;
11018								var segmentAngle=statData[curdata][shapesInChart.posj].segmentAngle;
11019								var firstAngle=statData[curdata][shapesInChart.posj].firstAngle;
11020								var realStartAngle=statData[curdata][shapesInChart.posj].realStartAngle;
11021								var endAngle=statData[curdata][shapesInChart.posj].endAngle;
11022								var angle=2*Math.PI-(startAngle+(xpos-curdata+0.5)*segmentAngle);
11023								if(ctx.tpchart=="PolarArea") {
11024									ypos= calculateOffset(othervars.config.logarithmic, yposval, statData[0][0].calculatedScale, statData[0][0].scaleHop);
11025								} else {
11026									ypos=statData[0][shapesInChart.posj].int_radius+yposval*(statData[0][shapesInChart.posj].ext_radius-statData[0][shapesInChart.posj].int_radius);
11027								}
11028								if(limitToChart){
11029									if (ypos<-statData[0][shapesInChart.posj].ext_radius)ypos=-statData[0][shapesInChart.posj].ext_radius;
11030									if (ypos>statData[0][shapesInChart.posj].ext_radius)ypos=statData[0][shapesInChart.posj].ext_radius;
11031								} 
11032								xpos=Math.cos(angle) * ypos;
11033								ypos=Math.sin(angle) * ypos;
11034								xpos=statData[0][shapesInChart.posj].midPosX + xpos+paddingX1;
11035								ypos=statData[0][shapesInChart.posj].midPosY - ypos+paddingY1;
11036								if(yposval==-999){
11037									xpos=statData[0][shapesInChart.posj].midPosX +paddingX1;
11038									ypos=statData[0][shapesInChart.posj].midPosY +paddingY1;
11039								}
11040								break;
11041		        				default :
11042								xpos=xposval+paddingX1;
11043								ypos=yposval+paddingY1;
11044								break;
11045				}
11046				break;
11047			case "ABSOLUTE" :
11048			default:
11049				xpos=xposval+paddingX1;
11050				ypos=yposval+paddingY1;
11051				break;
11052
11053		}
11054		if(shape=="IMAGE") {
11055			var imageWidth=drawShapeSetValue(shapesInChart.imageWidth,image.width);
11056			var imageHeight=drawShapeSetValue(shapesInChart.imageHeight,image.height);
11057			switch (imageAlign) {
11058				case "left":
11059					break;
11060				case "right":
11061					xpos -= imageWidth;
11062					break;
11063				case "center":
11064					xpos -= (imageWidth / 2);
11065					break;
11066				default:
11067					break;
11068			}
11069			switch (imageBaseline) {
11070				case "top":
11071					break;
11072				case "bottom":
11073					ypos -= imageHeight;
11074					break;
11075				case "middle":
11076					ypos -= (imageHeight / 2);
11077					break;
11078				default:
11079					break;
11080			}
11081		}
11082
11083		
11084		return {xpos:xpos,ypos:ypos};
11085	};
11086	
11087	function calculateOffset(logarithmic, val, calculatedScale, scaleHop,limitToChart) {
11088		if (!logarithmic) { // no logarithmic scale
11089			var outerValue = calculatedScale.steps * calculatedScale.stepValue;
11090			var adjustedValue = val - calculatedScale.graphMin;
11091			if(limitToChart) {
11092				var scalingFactor = CapValue(adjustedValue / outerValue, 1, 0);
11093				return (scaleHop * calculatedScale.steps) * scalingFactor;
11094			} else 	return (scaleHop * calculatedScale.steps) * (adjustedValue/outerValue);
11095		} else { // logarithmic scale
11096			return CapValue(log10(val) * scaleHop - log10(calculatedScale.graphMin) * scaleHop, undefined, 0);
11097		}
11098	};
11099	function CapValue(valueToCap, maxValue, minValue) {
11100		if (isNumber(maxValue)) {
11101			if (valueToCap > maxValue) {
11102				return maxValue;
11103			}
11104		}
11105		if (isNumber(minValue)) {
11106			if (valueToCap < minValue) {
11107				return minValue;
11108			}
11109		}
11110		return valueToCap;
11111	};
11112
11113	function drawShapeSetValue(dataval,defval) {
11114		if(typeof dataval != "undefined") return dataval;
11115		else return defval;
11116	};	
11117	
11118	function xPos(iteration, data,yAxisPosX,valueHop,nbValueHop) {
11119		return yAxisPosX + (valueHop * iteration);
11120	};
11121
11122};
11123
11124function addIns_HighLight_endDraw(when,ctx,data,statData,i,j,other) {
11125  addIns_highLight(ctx, other.config, data, 1, other.animationValue,statData);
11126}
11127
11128function addIns_highLight(ctx, config, data, movement, animationCount,statData){
11129	var special;
11130	var shapesVar,shapeAddins;
11131	var i,decalRadius,property;
11132	var addHighLight=false,totreat;
11133	var rectHeight, rectWidth, ratio;
11134	if(typeof data.special=="object") special=data.special;
11135	if(typeof data.shapesInChart == "object") shapesVar=data.shapesInChart;
11136	else {
11137		data.shapesInChart=[];
11138		shapesVar=data.shapesInChart;
11139	}
11140	addHighLight=false;	
11141	if(typeof special=="object") {
11142		for(i=0;i<special.length;i++) {
11143			totreat=false;
11144			if(typeof special[i].addIns_shape== "undefined")shapeAddins="ARROW" ;
11145			else shapeAddins=special[i].addIns_shape.toUpperCase();
11146			switch(shapeAddins) {
11147				case "RECTANGLE" :
11148					switch(tpdraw(ctx,(typeof data.datasets == "object") ? data.datasets[special[i].posi] : undefined)) {
11149						case "Line" :
11150						case "Bar" :
11151						case "StackedBar" :
11152							totreat=true;
11153							addHighLight=true;
11154							shapesVar[shapesVar.length]={hightLight : true };
11155							shapesVar[shapesVar.length-1].shape= special[i].addIns_shape;
11156							shapesVar[shapesVar.length-1].position= "inchart";
11157							shapesVar[shapesVar.length-1].x1= special[i].posj-0.5;
11158							shapesVar[shapesVar.length-1].y1= data.datasets[special[i].posi].data[special[i].posj];
11159							shapesVar[shapesVar.length-1].y1= -Number.MAX_VALUE;
11160							shapesVar[shapesVar.length-1].x2= special[i].posj+0.5;
11161							shapesVar[shapesVar.length-1].y2= data.datasets[special[i].posi].data[special[i].posj];
11162							shapesVar[shapesVar.length-1].y2= Number.MAX_VALUE;
11163
11164							break;
11165						case "HorizontalBar" :
11166						case "HorizontalStackedBar" :
11167							totreat=true;
11168							addHighLight=true;
11169							shapesVar[shapesVar.length]={hightLight : true };
11170							shapesVar[shapesVar.length-1].shape= special[i].addIns_shape;
11171							shapesVar[shapesVar.length-1].position= "inchart";
11172							shapesVar[shapesVar.length-1].y1= special[i].posj-0.5;
11173							shapesVar[shapesVar.length-1].x1= -Number.MAX_VALUE;
11174							shapesVar[shapesVar.length-1].y2= special[i].posj+0.5;
11175							shapesVar[shapesVar.length-1].x2= Number.MAX_VALUE;
11176							break;
11177						case "Radar" :
11178						case "Pie" :
11179						case "Doughnut" :
11180						case "PolarArea" :
11181						default:
11182							break;
11183					}				
11184					shapesVar[shapesVar.length-1].strokeColor= "black";
11185					shapesVar[shapesVar.length-1].fillColor= "black";    
11186					break;
11187
11188				case "ELLIPSE" :
11189					switch(tpdraw(ctx,(typeof data.datasets == "object") ? data.datasets[special[i].posi] : undefined)) {
11190						case "Line" :
11191						case "Radar" :
11192							totreat=true;
11193							addHighLight=true;
11194							shapesVar[shapesVar.length]={hightLight : true };
11195							shapesVar[shapesVar.length-1].shape= special[i].addIns_shape;
11196							shapesVar[shapesVar.length-1].position= "inchart";
11197							shapesVar[shapesVar.length-1].x1= special[i].posj;
11198							shapesVar[shapesVar.length-1].y1= data.datasets[special[i].posi].data[special[i].posj];
11199							shapesVar[shapesVar.length-1].ellipseHeight=30;
11200							shapesVar[shapesVar.length-1].ellipseWidth=40;
11201
11202							break;
11203						case "Bar" :
11204						case "StackedBar" :
11205						case "HorizontalBar" :
11206						case "HorizontalStackedBar" :
11207							totreat=true;
11208							addHighLight=true;
11209							shapesVar[shapesVar.length]={hightLight : true };
11210							shapesVar[shapesVar.length-1].shape= special[i].addIns_shape;
11211							shapesVar[shapesVar.length-1].position= "absolute";
11212							shapesVar[shapesVar.length-1].x1= (statData[special[i].posi][special[i].posj].xPosRight+statData[special[i].posi][special[i].posj].xPosLeft)/2;
11213							shapesVar[shapesVar.length-1].y1= (statData[special[i].posi][special[i].posj].yPosTop+statData[special[i].posi][special[i].posj].yPosBottom)/2;
11214							rectHeight=1.25*Math.abs(statData[special[i].posi][special[i].posj].yPosTop-statData[special[i].posi][special[i].posj].yPosBottom);
11215							rectWidth=1.25*Math.abs(statData[special[i].posi][special[i].posj].xPosRight-statData[special[i].posi][special[i].posj].xPosLeft);
11216							ratio=rectWidth/rectHeight;
11217							shapesVar[shapesVar.length-1].ellipseWidth=Math.sqrt((rectWidth*rectWidth) + (ratio*ratio) * (rectHeight*rectHeight));
11218							shapesVar[shapesVar.length-1].ellipseHeight=shapesVar[shapesVar.length-1].ellipseWidth/ratio;
11219							break;
11220						case "Pie" :
11221						case "Doughnut" :
11222						case "PolarArea" :
11223						default:
11224							break;
11225					}				
11226					shapesVar[shapesVar.length-1].strokeColor= "black";
11227					shapesVar[shapesVar.length-1].fillColor= "black";    
11228					break;
11229				case "ARROW" :
11230				default:
11231					totreat=true;
11232					addHighLight=true;
11233					shapesVar[shapesVar.length]={hightLight : true };
11234					shapesVar[shapesVar.length-1].shape= "arrow";
11235					switch(tpdraw(ctx,(typeof data.datasets == "object") ? data.datasets[special[i].posi] : undefined)) {
11236						case "Line" :
11237						case "Radar" :
11238							shapesVar[shapesVar.length-1].position= "inchart";
11239							shapesVar[shapesVar.length-1].x1= special[i].posj;
11240							shapesVar[shapesVar.length-1].y1= data.datasets[special[i].posi].data[special[i].posj];
11241							shapesVar[shapesVar.length-1].paddingX1= 30;
11242							shapesVar[shapesVar.length-1].paddingY1= -30;
11243							shapesVar[shapesVar.length-1].x2= special[i].posj;
11244							shapesVar[shapesVar.length-1].y2= data.datasets[special[i].posi].data[special[i].posj];
11245							break;
11246						case "Bar" :
11247						case "StackedBar" :
11248						case "HorizontalBar" :
11249						case "HorizontalStackedBar" :
11250							shapesVar[shapesVar.length-1].position= "absolute";
11251							shapesVar[shapesVar.length-1].x2= statData[special[i].posi][special[i].posj].xPosRight;
11252							shapesVar[shapesVar.length-1].y2= statData[special[i].posi][special[i].posj].yPosTop;
11253							shapesVar[shapesVar.length-1].x1= shapesVar[shapesVar.length-1].x2;
11254							shapesVar[shapesVar.length-1].y1= shapesVar[shapesVar.length-1].y2;
11255							if(ctx.tpchart=="Bar" || ctx.tpchart=="StackedBar") {
11256								shapesVar[shapesVar.length-1].x1=shapesVar[shapesVar.length-1].x1+30;
11257								if(data.datasets[special[i].posi].data[special[i].posj]>=0) {
11258									shapesVar[shapesVar.length-1].y1= shapesVar[shapesVar.length-1].y1-30;
11259								} else {
11260									shapesVar[shapesVar.length-1].y1= shapesVar[shapesVar.length-1].y1+30;
11261								}
11262							} else {
11263								shapesVar[shapesVar.length-1].y1=shapesVar[shapesVar.length-1].y1-30;
11264								if(data.datasets[special[i].posi].data[special[i].posj]>=0) {
11265									shapesVar[shapesVar.length-1].x1= shapesVar[shapesVar.length-1].x1+30;
11266								} else {
11267									shapesVar[shapesVar.length-1].x1= shapesVar[shapesVar.length-1].x1-30;
11268								}
11269							}
11270							break;
11271						case "Pie" :
11272						case "Doughnut" :
11273							shapesVar[shapesVar.length-1].posj=special[i].posj;
11274							if(typeof config.highLightSet.expandOutRadius=="number")decalRadius=config.highLightSet.expandOutRadius;
11275							else decalRadius=0;	
11276							shapesVar[shapesVar.length-1].position= "inchart";
11277							shapesVar[shapesVar.length-1].limitToChart= false;
11278							shapesVar[shapesVar.length-1].x1= special[i].posi;
11279							if(ctx.tpchart=="Pie")	shapesVar[shapesVar.length-1].y1= 1+data.labels.length*0.3+decalRadius;
11280							else shapesVar[shapesVar.length-1].y1= 1+data.labels.length*(100*0.3)/(100-config.percentageInnerCutout);
11281							
11282							shapesVar[shapesVar.length-1].x2= special[i].posi;
11283							shapesVar[shapesVar.length-1].y2= 1+decalRadius;
11284							break;
11285						case "PolarArea" :
11286							shapesVar[shapesVar.length-1].posj=special[i].posj;
11287							shapesVar[shapesVar.length-1].position= "inchart";
11288							shapesVar[shapesVar.length-1].limitToChart= false;
11289							shapesVar[shapesVar.length-1].x1= special[i].posi;
11290							shapesVar[shapesVar.length-1].y1= data.datasets[special[i].posi].data[special[i].posj]+0.3*(statData[0][0].outerVal-statData[0][0].calculatedScale.graphMin);
11291							shapesVar[shapesVar.length-1].x2= special[i].posi;
11292							shapesVar[shapesVar.length-1].y2= data.datasets[special[i].posi].data[special[i].posj];
11293							break;
11294					}				
11295					shapesVar[shapesVar.length-1].strokeColor= "black";
11296					shapesVar[shapesVar.length-1].fillColor= "black";    
11297					break;
11298			};
11299			// overwrite options;
11300			if(totreat) {
11301				for (property in config.highLightSet) {
11302					if(property.substring(0,7)=="addIns_") {			 
11303						eval("shapesVar[shapesVar.length-1]."+property.substring(7,50)+"=config.highLightSet[property];");
11304					}
11305				}
11306			}
11307		}
11308
11309		
11310		if(addHighLight) {
11311			// draw shapes;
11312			drawShapes("HIGHLIGHT", ctx, data,statData, 0, 0 ,{ config: config});
11313			// remove shapes;
11314			for(i=shapesVar.length-1;i>=0;i--) shapesVar.splice(i,1);
11315		}
11316	}
11317
11318};
11319
11320/*! fancyBox v2.1.5 fancyapps.com | fancyapps.com/fancybox/#license */
11321(function(r,G,f,v){var J=f("html"),n=f(r),p=f(G),b=f.fancybox=function(){b.open.apply(this,arguments)},I=navigator.userAgent.match(/msie/i),B=null,s=G.createTouch!==v,t=function(a){return a&&a.hasOwnProperty&&a instanceof f},q=function(a){return a&&"string"===f.type(a)},E=function(a){return q(a)&&0<a.indexOf("%")},l=function(a,d){var e=parseInt(a,10)||0;d&&E(a)&&(e*=b.getViewport()[d]/100);return Math.ceil(e)},w=function(a,b){return l(a,b)+"px"};f.extend(b,{version:"2.1.5",defaults:{padding:15,margin:20,
11322width:800,height:600,minWidth:100,minHeight:100,maxWidth:9999,maxHeight:9999,pixelRatio:1,autoSize:!0,autoHeight:!1,autoWidth:!1,autoResize:!0,autoCenter:!s,fitToView:!0,aspectRatio:!1,topRatio:0.5,leftRatio:0.5,scrolling:"auto",wrapCSS:"",arrows:!0,closeBtn:!0,closeClick:!1,nextClick:!1,mouseWheel:!0,autoPlay:!1,playSpeed:3E3,preload:3,modal:!1,loop:!0,ajax:{dataType:"html",headers:{"X-fancyBox":!0}},iframe:{scrolling:"auto",preload:!0},swf:{wmode:"transparent",allowfullscreen:"true",allowscriptaccess:"always"},
11323keys:{next:{13:"left",34:"up",39:"left",40:"up"},prev:{8:"right",33:"down",37:"right",38:"down"},close:[27],play:[32],toggle:[70]},direction:{next:"left",prev:"right"},scrollOutside:!0,index:0,type:null,href:null,content:null,title:null,tpl:{wrap:'<div class="fancybox-wrap" tabIndex="-1"><div class="fancybox-skin"><div class="fancybox-outer"><div class="fancybox-inner"></div></div></div></div>',image:'<img class="fancybox-image" src="{href}" alt="" />',iframe:'<iframe id="fancybox-frame{rnd}" name="fancybox-frame{rnd}" class="fancybox-iframe" frameborder="0" vspace="0" hspace="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen'+
11324(I?' allowtransparency="true"':"")+"></iframe>",error:'<p class="fancybox-error">The requested content cannot be loaded.<br/>Please try again later.</p>',closeBtn:'<a title="Close" class="fancybox-item fancybox-close" href="javascript:;"></a>',next:'<a title="Next" class="fancybox-nav fancybox-next" href="javascript:;"><span></span></a>',prev:'<a title="Previous" class="fancybox-nav fancybox-prev" href="javascript:;"><span></span></a>'},openEffect:"fade",openSpeed:250,openEasing:"swing",openOpacity:!0,
11325openMethod:"zoomIn",closeEffect:"fade",closeSpeed:250,closeEasing:"swing",closeOpacity:!0,closeMethod:"zoomOut",nextEffect:"elastic",nextSpeed:250,nextEasing:"swing",nextMethod:"changeIn",prevEffect:"elastic",prevSpeed:250,prevEasing:"swing",prevMethod:"changeOut",helpers:{overlay:!0,title:!0},onCancel:f.noop,beforeLoad:f.noop,afterLoad:f.noop,beforeShow:f.noop,afterShow:f.noop,beforeChange:f.noop,beforeClose:f.noop,afterClose:f.noop},group:{},opts:{},previous:null,coming:null,current:null,isActive:!1,
11326isOpen:!1,isOpened:!1,wrap:null,skin:null,outer:null,inner:null,player:{timer:null,isActive:!1},ajaxLoad:null,imgPreload:null,transitions:{},helpers:{},open:function(a,d){if(a&&(f.isPlainObject(d)||(d={}),!1!==b.close(!0)))return f.isArray(a)||(a=t(a)?f(a).get():[a]),f.each(a,function(e,c){var k={},g,h,j,m,l;"object"===f.type(c)&&(c.nodeType&&(c=f(c)),t(c)?(k={href:c.data("fancybox-href")||c.attr("href"),title:c.data("fancybox-title")||c.attr("title"),isDom:!0,element:c},f.metadata&&f.extend(!0,k,
11327c.metadata())):k=c);g=d.href||k.href||(q(c)?c:null);h=d.title!==v?d.title:k.title||"";m=(j=d.content||k.content)?"html":d.type||k.type;!m&&k.isDom&&(m=c.data("fancybox-type"),m||(m=(m=c.prop("class").match(/fancybox\.(\w+)/))?m[1]:null));q(g)&&(m||(b.isImage(g)?m="image":b.isSWF(g)?m="swf":"#"===g.charAt(0)?m="inline":q(c)&&(m="html",j=c)),"ajax"===m&&(l=g.split(/\s+/,2),g=l.shift(),l=l.shift()));j||("inline"===m?g?j=f(q(g)?g.replace(/.*(?=#[^\s]+$)/,""):g):k.isDom&&(j=c):"html"===m?j=g:!m&&(!g&&
11328k.isDom)&&(m="inline",j=c));f.extend(k,{href:g,type:m,content:j,title:h,selector:l});a[e]=k}),b.opts=f.extend(!0,{},b.defaults,d),d.keys!==v&&(b.opts.keys=d.keys?f.extend({},b.defaults.keys,d.keys):!1),b.group=a,b._start(b.opts.index)},cancel:function(){var a=b.coming;a&&!1!==b.trigger("onCancel")&&(b.hideLoading(),b.ajaxLoad&&b.ajaxLoad.abort(),b.ajaxLoad=null,b.imgPreload&&(b.imgPreload.onload=b.imgPreload.onerror=null),a.wrap&&a.wrap.stop(!0,!0).trigger("onReset").remove(),b.coming=null,b.current||
11329b._afterZoomOut(a))},close:function(a){b.cancel();!1!==b.trigger("beforeClose")&&(b.unbindEvents(),b.isActive&&(!b.isOpen||!0===a?(f(".fancybox-wrap").stop(!0).trigger("onReset").remove(),b._afterZoomOut()):(b.isOpen=b.isOpened=!1,b.isClosing=!0,f(".fancybox-item, .fancybox-nav").remove(),b.wrap.stop(!0,!0).removeClass("fancybox-opened"),b.transitions[b.current.closeMethod]())))},play:function(a){var d=function(){clearTimeout(b.player.timer)},e=function(){d();b.current&&b.player.isActive&&(b.player.timer=
11330setTimeout(b.next,b.current.playSpeed))},c=function(){d();p.unbind(".player");b.player.isActive=!1;b.trigger("onPlayEnd")};if(!0===a||!b.player.isActive&&!1!==a){if(b.current&&(b.current.loop||b.current.index<b.group.length-1))b.player.isActive=!0,p.bind({"onCancel.player beforeClose.player":c,"onUpdate.player":e,"beforeLoad.player":d}),e(),b.trigger("onPlayStart")}else c()},next:function(a){var d=b.current;d&&(q(a)||(a=d.direction.next),b.jumpto(d.index+1,a,"next"))},prev:function(a){var d=b.current;
11331d&&(q(a)||(a=d.direction.prev),b.jumpto(d.index-1,a,"prev"))},jumpto:function(a,d,e){var c=b.current;c&&(a=l(a),b.direction=d||c.direction[a>=c.index?"next":"prev"],b.router=e||"jumpto",c.loop&&(0>a&&(a=c.group.length+a%c.group.length),a%=c.group.length),c.group[a]!==v&&(b.cancel(),b._start(a)))},reposition:function(a,d){var e=b.current,c=e?e.wrap:null,k;c&&(k=b._getPosition(d),a&&"scroll"===a.type?(delete k.position,c.stop(!0,!0).animate(k,200)):(c.css(k),e.pos=f.extend({},e.dim,k)))},update:function(a){var d=
11332a&&a.type,e=!d||"orientationchange"===d;e&&(clearTimeout(B),B=null);b.isOpen&&!B&&(B=setTimeout(function(){var c=b.current;c&&!b.isClosing&&(b.wrap.removeClass("fancybox-tmp"),(e||"load"===d||"resize"===d&&c.autoResize)&&b._setDimension(),"scroll"===d&&c.canShrink||b.reposition(a),b.trigger("onUpdate"),B=null)},e&&!s?0:300))},toggle:function(a){b.isOpen&&(b.current.fitToView="boolean"===f.type(a)?a:!b.current.fitToView,s&&(b.wrap.removeAttr("style").addClass("fancybox-tmp"),b.trigger("onUpdate")),
11333b.update())},hideLoading:function(){p.unbind(".loading");f("#fancybox-loading").remove()},showLoading:function(){var a,d;b.hideLoading();a=f('<div id="fancybox-loading"><div></div></div>').click(b.cancel).appendTo("body");p.bind("keydown.loading",function(a){if(27===(a.which||a.keyCode))a.preventDefault(),b.cancel()});b.defaults.fixed||(d=b.getViewport(),a.css({position:"absolute",top:0.5*d.h+d.y,left:0.5*d.w+d.x}))},getViewport:function(){var a=b.current&&b.current.locked||!1,d={x:n.scrollLeft(),
11334y:n.scrollTop()};a?(d.w=a[0].clientWidth,d.h=a[0].clientHeight):(d.w=s&&r.innerWidth?r.innerWidth:n.width(),d.h=s&&r.innerHe
vendor: 5,044 bytes, lines 11334-11343
11334ight?r.innerHeight:n.height());return d},unbindEvents:function(){b.wrap&&t(b.wrap)&&b.wrap.unbind(".fb");p.unbind(".fb");n.unbind(".fb")},bindEvents:function(){var a=b.current,d;a&&(n.bind("orientationchange.fb"+(s?"":" resize.fb")+(a.autoCenter&&!a.locked?" scroll.fb":""),b.update),(d=a.keys)&&p.bind("keydown.fb",function(e){var c=e.which||e.keyCode,k=e.target||e.srcElement;
11335if(27===c&&b.coming)return!1;!e.ctrlKey&&(!e.altKey&&!e.shiftKey&&!e.metaKey&&(!k||!k.type&&!f(k).is("[contenteditable]")))&&f.each(d,function(d,k){if(1<a.group.length&&k[c]!==v)return b[d](k[c]),e.preventDefault(),!1;if(-1<f.inArray(c,k))return b[d](),e.preventDefault(),!1})}),f.fn.mousewheel&&a.mouseWheel&&b.wrap.bind("mousewheel.fb",function(d,c,k,g){for(var h=f(d.target||null),j=!1;h.length&&!j&&!h.is(".fancybox-skin")&&!h.is(".fancybox-wrap");)j=h[0]&&!(h[0].style.overflow&&"hidden"===h[0].style.overflow)&&
11336(h[0].clientWidth&&h[0].scrollWidth>h[0].clientWidth||h[0].clientHeight&&h[0].scrollHeight>h[0].clientHeight),h=f(h).parent();if(0!==c&&!j&&1<b.group.length&&!a.canShrink){if(0<g||0<k)b.prev(0<g?"down":"left");else if(0>g||0>k)b.next(0>g?"up":"right");d.preventDefault()}}))},trigger:function(a,d){var e,c=d||b.coming||b.current;if(c){f.isFunction(c[a])&&(e=c[a].apply(c,Array.prototype.slice.call(arguments,1)));if(!1===e)return!1;c.helpers&&f.each(c.helpers,function(d,e){if(e&&b.helpers[d]&&f.isFunction(b.helpers[d][a]))b.helpers[d][a](f.extend(!0,
11337{},b.helpers[d].defaults,e),c)});p.trigger(a)}},isImage:function(a){return q(a)&&a.match(/(^data:image\/.*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp|svg)((\?|#).*)?$)/i)},isSWF:function(a){return q(a)&&a.match(/\.(swf)((\?|#).*)?$/i)},_start:function(a){var d={},e,c;a=l(a);e=b.group[a]||null;if(!e)return!1;d=f.extend(!0,{},b.opts,e);e=d.margin;c=d.padding;"number"===f.type(e)&&(d.margin=[e,e,e,e]);"number"===f.type(c)&&(d.padding=[c,c,c,c]);d.modal&&f.extend(!0,d,{closeBtn:!1,closeClick:!1,nextClick:!1,arrows:!1,
11338mouseWheel:!1,keys:null,helpers:{overlay:{closeClick:!1}}});d.autoSize&&(d.autoWidth=d.autoHeight=!0);"auto"===d.width&&(d.autoWidth=!0);"auto"===d.height&&(d.autoHeight=!0);d.group=b.group;d.index=a;b.coming=d;if(!1===b.trigger("beforeLoad"))b.coming=null;else{c=d.type;e=d.href;if(!c)return b.coming=null,b.current&&b.router&&"jumpto"!==b.router?(b.current.index=a,b[b.router](b.direction)):!1;b.isActive=!0;if("image"===c||"swf"===c)d.autoHeight=d.autoWidth=!1,d.scrolling="visible";"image"===c&&(d.aspectRatio=
11339!0);"iframe"===c&&s&&(d.scrolling="scroll");d.wrap=f(d.tpl.wrap).addClass("fancybox-"+(s?"mobile":"desktop")+" fancybox-type-"+c+" fancybox-tmp "+d.wrapCSS).appendTo(d.parent||"body");f.extend(d,{skin:f(".fancybox-skin",d.wrap),outer:f(".fancybox-outer",d.wrap),inner:f(".fancybox-inner",d.wrap)});f.each(["Top","Right","Bottom","Left"],function(a,b){d.skin.css("padding"+b,w(d.padding[a]))});b.trigger("onReady");if("inline"===c||"html"===c){if(!d.content||!d.content.length)return b._error("content")}else if(!e)return b._error("href");
11340"image"===c?b._loadImage():"ajax"===c?b._loadAjax():"iframe"===c?b._loadIframe():b._afterLoad()}},_error:function(a){f.extend(b.coming,{type:"html",autoWidth:!0,autoHeight:!0,minWidth:0,minHeight:0,scrolling:"no",hasError:a,content:b.coming.tpl.error});b._afterLoad()},_loadImage:function(){var a=b.imgPreload=new Image;a.onload=function(){this.onload=this.onerror=null;b.coming.width=this.width/b.opts.pixelRatio;b.coming.height=this.height/b.opts.pixelRatio;b._afterLoad()};a.onerror=function(){this.onload=
11341this.onerror=null;b._error("image")};a.src=b.coming.href;!0!==a.complete&&b.showLoading()},_loadAjax:function(){var a=b.coming;b.showLoading();b.ajaxLoad=f.ajax(f.extend({},a.ajax,{url:a.href,error:function(a,e){b.coming&&"abort"!==e?b._error("ajax",a):b.hideLoading()},success:function(d,e){"success"===e&&(a.content=d,b._afterLoad())}}))},_loadIframe:function(){var a=b.coming,d=f(a.tpl.iframe.replace(/\{rnd\}/g,(new Date).getTime())).attr("scrolling",s?"auto":a.iframe.scrolling).attr("src",a.href);
11342f(a.wrap).bind("onReset",function(){try{f(this).find("iframe").hide().attr("src","//about:blank").end().empty()}catch(a){}});a.iframe.preload&&(b.showLoading(),d.one("load",function(){f(this).data("ready",1);s||f(this).bind("load.fb",b.update);f(this).parents(".fancybox-wrap").width("100%").removeClass("fancybox-tmp").show();b._afterLoad()}));a.content=d.appendTo(a.inner);a.iframe.preload||b._afterLoad()},_preloadImages:function(){var a=b.group,d=b.current,e=a.length,c=d.preload?Math.min(d.preload,
11343e-1):0,f,g;for(g=1;g<=c;g+=1)f=a[(d.index+g)%e],"image"===f.type&&f.href&&((new Image).src=f.href)},_afterLoad:function(){var a=b.coming,d=b.current,e,c,k,g,h;b.hideLoading();if(a&&!1!==b.isActive)if(!1===b.trigger("afterLoad",a,d))a.wrap.stop(!0).trigger("onReset").remove(),b.coming=null;else{d&&(b.trigger("beforeChange",d),d.wrap.stop(!0).removeClass("fancybox-opened").find(".fancybox-item, .fancybox-nav").remove());b.unbindEvents();e=a.content;c=a.type;k=a.scrolling;f.extend(b,{wrap:a.wrap,skin:a.skin,
11344outer:a.outer,inner:a.inner,current:a,previous:d});g=a.href;switch(c){case "inline":case "ajax":case "html":a.selector?e=f("<div>").html(e).find(a.selector):t(e)&&(e.data("fancybox-placeholder")||e.data("fancybox-placeholder",f('<div class="fancybox-placeholder"></div>').insertAfter(e).hide()),e=e.show().detach(),a.wrap.bind("onReset",function(){f(this).find(e).length&&e.hide().replaceAll(e.data("fancybox-placeholder")).data("fancybox-placeholder",!1)}));break;case "image":e=a.tpl.image.replace("{href}",
11345g);break;case "swf":e='<object id="fancybox-swf" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="100%" height="100%"><param name="movie" value="'+g+'"></param>',h="",f.each(a.swf,function(a,b){e+='<param name="'+a+'" value="'+b+'"></param>';h+=" "+a+'="'+b+'"'}),e+='<embed src="'+g+'" type="application/x-shockwave-flash" width="100%" height="100%"'+h+"></embed></object>"}(!t(e)||!e.parent().is(a.inner))&&a.inner.append(e);b.trigger("beforeShow");a.inner.css("overflow","yes"===k?"scroll":
11346"no"===k?"hidden":k);b._setDimension();b.reposition();b.isOpen=!1;b.coming=null;b.bindEvents();if(b.isOpened){if(d.prevMethod)b.transitions[d.prevMethod]()}else f(".fancybox-wrap").not(a.wrap).stop(!0).trigger("onReset").remove();b.transitions[b.isOpened?a.nextMethod:a.openMethod]();b._preloadImages()}},_setDimension:function(){var a=b.getViewport(),d=0,e=!1,c=!1,e=b.wrap,k=b.skin,g=b.inner,h=b.current,c=h.width,j=h.height,m=h.minWidth,u=h.minHeight,n=h.maxWidth,p=h.maxHeight,s=h.scrolling,q=h.scrollOutside?
11347h.scrollbarWidth:0,x=h.margin,y=l(x[1]+x[3]),r=l(x[0]+x[2]),v,z,t,C,A,F,B,D,H;e.add(k).add(g).width("auto").height("auto").removeClass("fancybox-tmp");x=l(k.outerWidth(!0)-k.width());v=l(k.outerHeight(!0)-k.height());z=y+x;t=r+v;C=E(c)?(a.w-z)*l(c)/100:c;A=E(j)?(a.h-t)*l(j)/100:j;if("iframe"===h.type){if(H=h.content,h.autoHeight&&1===H.data("ready"))try{H[0].contentWindow.document.location&&(g.width(C).height(9999),F=H.contents().find("body"),q&&F.css("overflow-x","hidden"),A=F.outerHeight(!0))}catch(G){}}else if(h.autoWidth||
11348h.autoHeight)g.addClass("fancybox-tmp"),h.autoWidth||g.width(C),h.autoHeight||g.height(A),h.autoWidth&&(C=g.width()),h.autoHeight&&(A=g.height()),g.removeClass("fancybox-tmp");c=l(C);j=l(A);D=C/A;m=l(E(m)?l(m,"w")-z:m);n=l(E(n)?l(n,"w")-z:n);u=l(E(u)?l(u,"h")-t:u);p=l(E(p)?l(p,"h")-t:p);F=n;B=p;
11348h.fitToView&&(n=Math.min(a.w-z,n),p=Math.min(a.h-t,p));z=a.w-y;r=a.h-r;h.aspectRatio?(c>n&&(c=n,j=l(c/D)),j>p&&(j=p,c=l(j*D)),c<m&&(c=m,j=l(c/D)),j<u&&(j=u,c=l(j*D))):(c=Math.max(m,Math.min(c,n)),h.autoHeight&&
11349"iframe"!==h.type&&(g.width(c),j=g.height()),j=Math.max(u,Math.min(j,p)));if(h.fitToView)if(g.width(c).height(j),e.width(c+x),a=e.width(),y=e.height(),h.aspectRatio)for(;(a>z||y>r)&&(c>m&&j>u)&&!(19<d++);)j=Math.max(u,Math.min(p,j-10)),c=l(j*D),c<m&&(c=m,j=l(c/D)),c>n&&(c=n,j=l(c/D)),g.width(c).height(j),e.width(c+x),a=e.width(),y=e.height();else c=Math.max(m,Math.min(c,c-(a-z))),j=Math.max(u,Math.min(j,j-(y-r)));q&&("auto"===s&&j<A&&c+x+q<z)&&(c+=q);g.width(c).height(j);e.width(c+x);a=e.width();
11350y=e.height();e=(a>z||y>r)&&c>m&&j>u;c=h.aspectRatio?c<F&&j<B&&c<C&&j<A:(c<F||j<B)&&(c<C||j<A);f.extend(h,{dim:{width:w(a),height:w(y)},origWidth:C,origHeight:A,canShrink:e,canExpand:c,wPadding:x,hPadding:v,wrapSpace:y-k.outerHeight(!0),skinSpace:k.height()-j});!H&&(h.autoHeight&&j>u&&j<p&&!c)&&g.height("auto")},_getPosition:function(a){var d=b.current,e=b.getViewport(),c=d.margin,f=b.wrap.width()+c[1]+c[3],g=b.wrap.height()+c[0]+c[2],c={position:"absolute",top:c[0],left:c[3]};d.autoCenter&&d.fixed&&
11351!a&&g<=e.h&&f<=e.w?c.position="fixed":d.locked||(c.top+=e.y,c.left+=e.x);c.top=w(Math.max(c.top,c.top+(e.h-g)*d.topRatio));c.left=w(Math.max(c.left,c.left+(e.w-f)*d.leftRatio));return c},_afterZoomIn:function(){var a=b.current;a&&(b.isOpen=b.isOpened=!0,b.wrap.css("overflow","visible").addClass("fancybox-opened"),b.update(),(a.closeClick||a.nextClick&&1<b.group.length)&&b.inner.css("cursor","pointer").bind("click.fb",function(d){!f(d.target).is("a")&&!f(d.target).parent().is("a")&&(d.preventDefault(),
11352b[a.closeClick?"close":"next"]())}),a.closeBtn&&f(a.tpl.closeBtn).appendTo(b.skin).bind("click.fb",function(a){a.preventDefault();b.close()}),a.arrows&&1<b.group.length&&((a.loop||0<a.index)&&f(a.tpl.prev).appendTo(b.outer).bind("click.fb",b.prev),(a.loop||a.index<b.group.length-1)&&f(a.tpl.next).appendTo(b.outer).bind("click.fb",b.next)),b.trigger("afterShow"),!a.loop&&a.index===a.group.length-1?b.play(!1):b.opts.autoPlay&&!b.player.isActive&&(b.opts.autoPlay=!1,b.play()))},_afterZoomOut:function(a){a=
11353a||b.current;f(".fancybox-wrap").trigger("onReset").remove();f.extend(b,{group:{},opts:{},router:!1,current:null,isActive:!1,isOpened:!1,isOpen:!1,isClosing:!1,wrap:null,skin:null,outer:null,inner:null});b.trigger("afterClose",a)}});b.transitions={getOrigPosition:function(){var a=b.current,d=a.element,e=a.orig,c={},f=50,g=50,h=a.hPadding,j=a.wPadding,m=b.getViewport();!e&&(a.isDom&&d.is(":visible"))&&(e=d.find("img:first"),e.length||(e=d));t(e)?(c=e.offset(),e.is("img")&&(f=e.outerWidth(),g=e.outerHeight())):
11354(c.top=m.y+(m.h-g)*a.topRatio,c.left=m.x+(m.w-f)*a.leftRatio);if("fixed"===b.wrap.css("position")||a.locked)c.top-=m.y,c.left-=m.x;return c={top:w(c.top-h*a.topRatio),left:w(c.left-j*a.leftRatio),width:w(f+j),height:w(g+h)}},step:function(a,d){var e,c,f=d.prop;c=b.current;var g=c.wrapSpace,h=c.skinSpace;if("width"===f||"height"===f)e=d.end===d.start?1:(a-d.start)/(d.end-d.start),b.isClosing&&(e=1-e),c="width"===f?c.wPadding:c.hPadding,c=a-c,b.skin[f](l("width"===f?c:c-g*e)),b.inner[f](l("width"===
11355f?c:c-g*e-h*e))},zoomIn:function(){var a=b.current,d=a.pos,e=a.openEffect,c="elastic"===e,k=f.extend({opacity:1},d);delete k.position;c?(d=this.getOrigPosition(),a.openOpacity&&(d.opacity=0.1)):"fade"===e&&(d.opacity=0.1);b.wrap.css(d).animate(k,{duration:"none"===e?0:a.openSpeed,easing:a.openEasing,step:c?this.step:null,complete:b._afterZoomIn})},zoomOut:function(){var a=b.current,d=a.closeEffect,e="elastic"===d,c={opacity:0.1};e&&(c=this.getOrigPosition(),a.closeOpacity&&(c.opacity=0.1));b.wrap.animate(c,
11356{duration:"none"===d?0:a.closeSpeed,easing:a.closeEasing,step:e?this.step:null,complete:b._afterZoomOut})},changeIn:function(){var a=b.current,d=a.nextEffect,e=a.pos,c={opacity:1},f=b.direction,g;e.opacity=0.1;"elastic"===d&&(g="down"===f||"up"===f?"top":"left","down"===f||"right"===f?(e[g]=w(l(e[g])-200),c[g]="+=200px"):(e[g]=w(l(e[g])+200),c[g]="-=200px"));"none"===d?b._afterZoomIn():b.wrap.css(e).animate(c,{duration:a.nextSpeed,easing:a.nextEasing,complete:b._afterZoomIn})},changeOut:function(){var a=
11357b.previous,d=a.prevEffect,e={opacity:0.1},c=b.direction;"elastic"===d&&(e["down"===c||"up"===c?"top":"left"]=("up"===c||"left"===c?"-":"+")+"=200px");a.wrap.animate(e,{duration:"none"===d?0:a.prevSpeed,easing:a.prevEasing,complete:function(){f(this).trigger("onReset").remove()}})}};b.helpers.overlay={defaults:{closeClick:!0,speedOut:200,showEarly:!0,css:{},locked:!s,fixed:!0},overlay:null,fixed:!1,el:f("html"),create:function(a){a=f.extend({},this.defaults,a);this.overlay&&this.close();this.overlay=
11358f('<div class="fancybox-overlay"></div>').appendTo(b.coming?b.coming.parent:a.parent);this.fixed=!1;a.fixed&&b.defaults.fixed&&(this.overlay.addClass("fancybox-overlay-fixed"),this.fixed=!0)},open:function(a){var d=this;a=f.extend({},this.defaults,a);this.overlay?this.overlay.unbind(".overlay").width("auto").height("auto"):this.create(a);this.fixed||(n.bind("resize.overlay",f.proxy(this.update,this)),this.update());
11358a.closeClick&&this.overlay.bind("click.overlay",function(a){if(f(a.target).hasClass("fancybox-overlay"))return b.isActive?
11359b.close():d.close(),!1});this.overlay.css(a.css).show()},close:function(){var a,b;n.unbind("resize.overlay");this.el.hasClass("fancybox-lock")&&(f(".fancybox-margin").removeClass("fancybox-margin"),a=n.scrollTop(),b=n.scrollLeft(),this.el.removeClass("fancybox-lock"),n.scrollTop(a).scrollLeft(b));f(".fancybox-overlay").remove().hide();f.extend(this,{overlay:null,fixed:!1})},update:function(){var a="100%",b;this.overlay.width(a).height("100%");I?(b=Math.max(G.documentElement.offsetWidth,G.body.offsetWidth),
11360p.width()>b&&(a=p.width())):p.width()>n.width()&&(a=p.width());this.overlay.width(a).height(p.height())},onReady:function(a,b){var e=this.overlay;f(".fancybox-overlay").stop(!0,!0);e||this.create(a);a.locked&&(this.fixed&&b.fixed)&&(e||(this.margin=p.height()>n.height()?f("html").css("margin-right").replace("px",""):!1),b.locked=this.overlay.append(b.wrap),b.fixed=!1);!0===a.showEarly&&this.beforeShow.apply(this,arguments)},beforeShow:function(a,b){var e,c;b.locked&&(!1!==this.margin&&(f("*").filter(function(){return"fixed"===
11361f(this).css("position")&&!f(this).hasClass("fancybox-overlay")&&!f(this).hasClass("fancybox-wrap")}).addClass("fancybox-margin"),this.el.addClass("fancybox-margin")),e=n.scrollTop(),c=n.scrollLeft(),this.el.addClass("fancybox-lock"),n.scrollTop(e).scrollLeft(c));this.open(a)},onUpdate:function(){this.fixed||this.update()},afterClose:function(a){this.overlay&&!b.coming&&this.overlay.fadeOut(a.speedOut,f.proxy(this.close,this))}};b.helpers.title={defaults:{type:"float",position:"bottom"},beforeShow:function(a){var d=
11362b.current,e=d.title,c=a.type;f.isFunction(e)&&(e=e.call(d.element,d));if(q(e)&&""!==f.trim(e)){d=f('<div class="fancybox-title fancybox-title-'+c+'-wrap">'+e+"</div>");switch(c){case "inside":c=b.skin;break;case "outside":c=b.wrap;break;case "over":c=b.inner;break;default:c=b.skin,d.appendTo("body"),I&&d.width(d.width()),d.wrapInner('<span class="child"></span>'),b.current.margin[2]+=Math.abs(l(d.css("margin-bottom")))}d["top"===a.position?"prependTo":"appendTo"](c)}}};f.fn.fancybox=function(a){var d,
11363e=f(this),c=this.selector||"",k=function(g){var h=f(this).blur(),j=d,k,l;!g.ctrlKey&&(!g.altKey&&!g.shiftKey&&!g.metaKey)&&!h.is(".fancybox-wrap")&&(k=a.groupAttr||"data-fancybox-group",l=h.attr(k),l||(k="rel",l=h.get(0)[k]),l&&(""!==l&&"nofollow"!==l)&&(h=c.length?f(c):e,h=h.filter("["+k+'="'+l+'"]'),j=h.index(this)),a.index=j,!1!==b.o
11363pen(h,a)&&g.preventDefault())};a=a||{};d=a.index||0;!c||!1===a.live?e.unbind("click.fb-start").bind("click.fb-start",k):p.undelegate(c,"click.fb-start").delegate(c+
11364":not('.fancybox-item, .fancybox-nav')","click.fb-start",k);this.filter("[data-fancybox-start=1]").trigger("click");return this};p.ready(function(){var a,d;f.scrollbarWidth===v&&(f.scrollbarWidth=function(){var a=f('<div style="width:50px;height:50px;overflow:auto"><div/></div>').appendTo("body"),b=a.children(),b=b.innerWidth()-b.height(99).innerWidth();a.remove();return b});if(f.support.fixedPosition===v){a=f.support;d=f('<div style="position:fixed;top:20px;"></div>').appendTo("body");var e=20===
11365d[0].offsetTop||15===d[0].offsetTop;d.remove();a.fixedPosition=e}f.extend(b.defaults,{scrollbarWidth:f.scrollbarWidth(),fixed:f.support.fixedPosition,parent:f("body")});a=f(r).width();J.addClass("fancybox-lock-test");d=f(r).width();J.removeClass("fancybox-lock-test");f("<style type='text/css'>.fancybox-margin{margin-right:"+(d-a)+"px;}</style>").appendTo("head")})})(window,document,jQuery);
11366$(document).ready(function () {
11367
11368    $.validator.methods.date = function (value, element) {
11369        window.Globalize.culture("de-DE");
11370        // you can alternatively pass the culture to parseDate instead of
11371        // setting the culture above, like so:
11372        // parseDate(value, null, "en-AU")
11373        return this.optional(element) || Globalize.parseDate(value) !== null;
11374    };
11375
11376    /* Variables */
11377    var windowsWidth = $(window).width();
11378    var windowsHeight = $(window).height();
11379
11380    var tabId = $('.tab-list>li>.tab-link.active-tab').attr('data-id');
11381    var tabContent = $('.tab-content[data-id=' + tabId + ']');
11382    tabContent.show();
11383
11384    /* Toggle mobile nav */
11385    $('.menu-icon-container').click(function () {
11386        $('.mobile-nav').toggleClass('mobile-nav-active');
11387        $('.mobile-nav').trigger('MobileNavClassChanged');
11388        if ($('.mobile-nav').hasClass('mobile-nav-active') && windowsWidth <= 1065) {
11389            $('html, body').css('overflow-y', 'hidden');
11390        } else {
11391            $('html, body').css('overflow-y', 'auto');
11392        }
11393
11394        // @aria
11395        if ($('.menu-icon').attr('aria-expanded') == 'false') {
11396            $('.menu-icon').attr('aria-expanded', 'true');
11397        }
11398    });
11399    $('.mobile-nav>.x-icon').click(function () {
11400        $(this).parent('.mobile-nav').removeClass('mobile-nav-active');
11401        $(this).parent('.mobile-nav').trigger('MobileNavClassChanged');
11402        $('html, body').css('overflow-y', 'auto');
11403
11404        // @aria
11405        if ($('.menu-icon').attr('aria-expanded') == 'true') {
11406            $('.menu-icon').attr('aria-expanded', 'false');
11407        }
11408    });
11409
11410    /* Toggle mobile sub nav */
11411    $('.mobile-list .more').click(function () {
11412        var button = $(this);
11413        var li = button.closest('li');
11414        var arrow = button.siblings('span.more');
11415
11416        // Add classes
11417        button.toggleClass('rotate');
11418        li.toggleClass('active-menu');
11419        arrow.toggleClass('rotate');
11420
11421        if(button.hasClass('rotate')){
11422            button.attr('aria-expanded', true);
11423        }else{
11424            button.attr('aria-expanded', false);
11425        }
11426
11427        // Remove classes
11428        $('.mobile-list li').not(li).removeClass('active-menu');
11429        $('.mobile-list .more').not(button).attr('aria-expanded', false);
11430
11431        var toggledList = $(this).siblings('.mobile-sub-list');
11432        toggledList.slideToggle();
11433
11434        if (toggledList.hasClass('3rd-level-list')) {
11435            $('.3rd-level-list').not(toggledList).slideUp();
11436            $('.3rd-level-list').not(toggledList).siblings('.more').removeClass('rotate');
11437        } else {
11438            $('.mobile-sub-list').not(toggledList).slideUp();
11439            $('.mobile-sub-list').not(toggledList).siblings('.more').removeClass('rotate');
11440        }
11441    });
11442
11443    /* Check if Mobile sub menu a.link has class active to open his parent */
11444    $(function () {
11445        var activeMenuLink = $('.mobile-sub-list:not(.3rd-level-list)>li>a.active');
11446        activeMenuLink.parent('li').parent('.mobile-sub-list').slideDown();
11447        activeMenuLink.parent('li').parent('.mobile-sub-list').siblings('span.more').toggleClass('rotate');
11448        activeMenuLink.parent('li').parent('.mobile-sub-list').siblings('a.more').attr('aria-expanded', true);
11449        activeMenuLink.closest('li.full-left').addClass('active-menu');
11450    });
11451
11452    /* Show search and timetable on header form */
11453    $('.header-popup-toggle').click(function () {
11454        var popUpContainer = $(this).siblings('.header-pop-up-box');
11455        $('.header-pop-up-box').not(popUpContainer).fadeOut();
11456        popUpContainer.fadeToggle();
11457    });
11458
11459    /* Show language list */
11460    $('.language-arrow').click(function () {
11461        $(this).siblings('a:not(.active-lang)').slideToggle(100);
11462        $(this).toggleClass('arrow-up');
11463        $(this).siblings('.active-lang').toggleClass('active-lang-menu');
11464    });
11465    /* Show popup of language  */
11466    $('.lang-link').click(function () {
11467        var tabList = $(this);
11468        var tabId = $(this).attr('id');
11469        $('.language-description').removeClass('active-language');
11470        var tabContent = $('.language-description[data-id=' + tabId + ']');
11471        tabContent.addClass('active-language');
11472
11473        $('.language-description').not('.active-language').hide();
11474        tabContent.toggle();
11475        $('.language-arrow').toggleClass('arrow-up');
11476        $('.language-arrow').siblings('.active-lang').toggleClass('active-lang-menu');
11477        $('.language-arrow').siblings('a:not(.active-lang)').slideToggle(100);
11478        equalheightList('.button-holder>ul>li>a');
11479    });
11480
11481    /* Toggle sitemap on footer */
11482    $('.sitemap-link').click(function () {
11483        $('.sitemap').slideToggle();
11484        $('.sitemap').toggleClass('active');
11485        $('.sitemap').trigger('SitemapClassChanged');
11486        $('html, body').animate({scrollTop: $(document).height()}, 700);
11487    });
11488
11489    /* Toggle pre footer list */
11490    $('.pre-footer-section .section-description').click(function () {
11491        $(this).siblings('.js-toggle-container').toggle('slide', {direction: 'down'}, 500);
11492        $(this).find('span.arrow').toggleClass('arrow-up');
11493        $(this).attr('aria-expanded', function(index, attr) {
11494            return attr == 'true' ? 'false' : 'true';
11495        });
11496    });
11497
11498
11499    /* Equal news list height */
11500    equalheightList('.bike-not-allowed-content .borderd-box, \n\
11501                    .boxlist-downloads .pdf-link, \n\
11502                    .tab-list>li>a');
11503
11504    /* Rich text half boxes equal height */
11505    equalheightList('.col-6-box, .col-6-box .borderd-box');
11506
11507    /* Toggle accordeons */
11508    $(document).on('click', '.js-toggle-link', function () {
11509        $(this).toggleClass('expanded');
11510        if($(this).hasClass('expanded')){
11511            $(this).attr('aria-expanded', true);
11512        }else{
11513            $(this).attr('aria-expanded', false);
11514        }
11515        $(this).find('.arrow').toggleClass('arrow-up');
11516        $(this).siblings('.yellow-arrow').toggleClass('arrow-up');
11517        $(this).siblings('.js-toggle-container').slideToggle();
11518        $(this).find('.js-toggle-container').slideToggle();
11519        $(this).closest('li').find('.stats-in-chart .nr').each(function () {
11520            var number = $(this).attr('data-nr');
11521            var speed = 2000 / number;
11522            animation_loop($(this), 0, number, speed);
11523        });
11524        //Count number animation
11525    });
11526    $(document).on('click', '.js-toggle-button', function () {
11527        $(this).find('.arrow').toggleClass('arrow-up');
11528        $(this).siblings('.yellow-arrow').toggleClass('arrow-up');
11529        $(this).siblings('.js-toggle-container').slideToggle();
11530        $(this).find('.js-toggle-container').slideToggle();
11531        $('.hidden-map').toggleClass('show-map', 500);
11532        $('.toggle-arrow').toggleClass('opened');
11533        /* Incrementing animation for numbers */
11534        $(this).closest('li').find('.stats-in-chart .nr').each(function () {
11535            var number = $(this).attr('data-nr');
11536            var speed = 2000 / number;
11537            animation_loop($(this), 0, number, speed);
11538        });
11539        //Count number animation
11540    });
11541
11542        $(".map-toggle").click(function(){
11543            $('.toggle-content').text($('.toggle-content').text() == 'Karte zeigen' ? 'Karte ausblenden' : 'Karte zeigen');
11544        });
11545
11546        //showing reset filter
11547        $(document).on("click",".active-result",function(){
11548            $('.reset-filter').removeClass('hidden-reset');
11549         });
11550
11551         $('.chosen').on('change', function() {
11552            $('.reset-filter').removeClass('hidden-reset');
11553          })
11554          $(".default-btn.filter-btn").on('click', function(){
11555            $('.reset-filter').removeClass('hidden-reset');
11556         });
11557
11558    /* Toggle Point of sales accordeons */
11559    $(document).on('click', '.sales-data-row', function () {
11560        $(this).find('.yellow-arrow').toggleClass('arrow-up');
11561        $(this).parent('.sales-data-row').toggleClass('active-bg');
11562    });
11563
11564    /* Chosen */
11565    $('.chosen').chosen({
11566        no_results_text: "Kein Ergebnis gefunden"
11567    });
11568    $('.chosen-no-search').chosen({
11569        disable_search_threshold: 200,
11570        no_results_text: "Kein Ergebnis gefunden"
11571    });
11572    $('.typing-dropdown-chosen').chosen({
11573        max_selected_options: 1,
11574        no_results_text: "Kein Ergebnis gefunden"
11575    });
11576
11577    if(isMobile.any()) {
11578        $('input.datepicker-more-month').attr('type', 'date');
11579    }else{
11580        $('input.datepicker-more-month').attr('type', 'text');
11581    }
11582
11583    /* Date Picker */
11584    if(!isMobile.any()) {
11585        $('.datepicker').datepicker();
11586    }
11587
11588    /* Datepicker navigation */
11589    $('.datepicker').keydown(function (evt) {
11590        if (evt.ctrlKey && evt.keyCode >= 37 && evt.keyCode <= 40) {
11591            var message = "" + $(".ui-state-hover").html() +
11592                    " " + $(".ui-datepicker-month").html() +
11593                    " " + $(".ui-datepicker-year").html();
11594        }
11595    });
11596
11597    /* Date Picker more than 1 month */
11598    var numberOfMonth = 0;
11599    var leftPosition = 0;
11600    if (windowsWidth >= 800) {
11601        numberOfMonth = 2;
11602        leftPosition = 250;
11603    } else {
11604        numberOfMonth = 1;
11605        leftPosition = 80;
11606    }
11607    if(!isMobile.any()) {
11608        $('.datepicker-more-month').datepicker({
11609            numberOfMonths: numberOfMonth,
11610            beforeShow: function (input, inst) {
11611                var calendar = inst.dpDiv;
11612
11613                if (windowsWidth <= 380) {
11614                    setTimeout(function () {
11615                        calendar.position({
11616                            my: 'center+40 top+15',
11617                            at: 'center bottom',
11618                            collision: 'none',
11619                            of: input
11620                        });
11621                    }, 1);
11622                } else {
11623                    setTimeout(function () {
11624                        calendar.position({
11625                            my: 'center top+15',
11626                            at: 'center bottom',
11627                            collision: 'none',
11628                            of: input
11629                        });
11630                    }, 1);
11631                }
11632            }
11633        });
11634    }
11635    var date = new Date();
11636    if(!isMobile.any()) {
11637        $('.datepicker-more-month-formular').datepicker({
11638            numberOfMonths: numberOfMonth,
11639            beforeShow: function (input, inst) {
11640                var calendar = inst.dpDiv;
11641
11642                if (windowsWidth <= 380) {
11643                    setTimeout(function () {
11644                        calendar.position({
11645                            my: 'left top+15',
11646                            at: 'left-15 bottom',
11647                            collision: 'none',
11648                            of: input
11649                        });
11650                    }, 1);
11651                } else {
11652                    setTimeout(function () {
11653                        calendar.position({
11654                            my: 'center top+15',
11655                            at: 'center bottom',
11656                            collision: 'none',
11657                            of: input
11658                        });
11659                    }, 1);
11660                }
11661            }
11662        });
11663    }
11664
11665    /* Custom datepicker for game form */
11666    /*
11667     * Not youunger than 16 years not older than 65 years
11668     */
11669    var yearYoung = date.getFullYear() - 16;
11670    var yearOld = date.getFullYear() - 77;
11671    if(!isMobile.any()) {
11672        $('.custom-g-datepicker').datepicker({
11673            changeMonth: true,
11674            changeYear: true,
11675            defaultDate: todayBefore16Years(),
11676            yearRange: yearOld + ':' + yearYoung
11677        });
11678    }
11679
11680    function todayBefore16Years()
11681    {
11682        var date = new Date();
11683
11684        date.setYear(date.getFullYear() - 16);
11685        return date;
11686    }
11687
11688    /* Calculate label height on sale points table */
11689    equalheightList('.sales-form-container .form-control>label');
11690    equalheightList('.main-products-list li, .sales-filter-form .form-control>label');
11691
11692    /* Tab section on product open page (toggle tabs) */
11693    $('.tab-link').click(function (e) {
11694        var tabList = $(this).closest('ul');
11695        var tabId = $(this).attr('data-id');
11696        var tabContent = $('.tab-content[data-id=' + tabId + ']');
11697
11698        $(this).addClass('active-tab');
11699        $('.tab-list>li>.tab-link').not(this).removeClass('active-tab');
11700
11701        if (tabList.hasClass('responsive-tab-filter')) {
11702            tabContent.slideDown();
11703        }
11704        tabContent.show();
11705        equalheightList($('.full-left .col-6 .box-content'));
11706        $('.tab-content').not(tabContent).hide();
11707        window.history.pushState('', '', $(this).attr('href'));
11708    });
11709
11710    /* Radiobuttons formular template */
11711    $('.js-checkbox').click(function () {
11712        if ($(this).hasClass('active')) {
11713            $(this).removeClass('active');
11714        }
11715        else {
11716            $(this).addClass('active');
11717            $(this).siblings('.js-checkbox').removeClass('active');
11718        }
11719    });
11720    /*Show messages on mose hover and leave*/
11721
11722    /* Hide filter form on sale points page */
11723    $(document).on('click', '.leaflet-marker-icon', function () {
11724        $('.filter-holder').fadeOut();
11725    });
11726
11727    $(document).on("mouseenter", ".error", function () {
11728        //stuff to do on mouseover
11729        var ErrorID = $(this).attr('id') + '-error';
11730        $('#' + ErrorID).css({'opacity': '1'});
11731    });
11732    $(document).on("mouseleave", ".error", function () {
11733        //stuff to do on mouseleave
11734        var ErrorID = $(this).attr('id') + '-error';
11735        $('#' + ErrorID).css({'opacity': '0'});
11736    });
11737
11738    /*Validate form*/
11739    $.validator.setDefaults({ignore: ':hidden:not(.chosen-validate)'});
11740    $('.js-validate-form').validate({
11741        rules: {
11742            "items": {
11743                required: true
11744            },
11745            name: "required",
11746            'tx_rvfformular_rvfformular[iban][]': {
11747                required: true,
11748                maxlength: 4
11749            },
11750            'tx_rvfformular_rvfformular[zip]': {
11751                maxlength: 5,
11752                number: true
11753            },
11754            email: {
11755                required: true,
11756                email: true
11757            }
11758        },
11759        errorPlacement: function (error, element) {
11760            if (element.hasClass('chosen-validate')) {
11761                element.siblings('.chosen-container').find('.chosen-single').addClass('chosen-error');
11762            } else if (element.hasClass('validate-checkbox')) {
11763                error.insertBefore(element);
11764            } else if (element.hasClass('search-input-required')) {
11765                error.hide();
11766            }
11767            else if (element.hasClass('js-iban')) {
11768                error.insertAfter($('.js-iban-last'));
11769            }
11770            else {
11771                error.insertAfter(element);
11772            }
11773        }
11774    });
11775    /* Validate search form */
11776    $('.js-validate-search-form').validate({
11777        errorPlacement: function (error, element) {
11778            if (element.hasClass('search-input-required')) {
11779                error.hide();
11780            }
11781            else {
11782                error.insertAfter(element);
11783            }
11784        }
11785    });
11786
11787    $('.feedback-validate').validate();
11788
11789    equalheightList($('.full-left .col-6 .box-content'));
11790
11791    /* Toggle map scrollblocker */
11792    $('.scroll-block').click(function () {
11793        $(this).hide();
11794    });
11795    $('.map-section').mouseleave(function () {
11796        $('.scroll-block').show();
11797    });
11798
11799    /* Formular accordeons */
11800    checkFormHiddenContainer();
11801    $('.parts>h2.pointer').click(function () {
11802        $(this).addClass('rotate-icon');
11803        $(this).siblings('.js-toggle-container').slideDown();
11804        checkFormHiddenContainer();
11805    });
11806    $('.form-application .parts .submit-button').click(function (e) {
11807        if ($(this).hasClass('none-active-btn')) {
11808            e.preventDefault();
11809            $('.warning-p').show();
11810        } else {
11811            $('.warning-p').hide();
11812        }
11813    });
11814
11815    /* Awesomplete dropdown */
11816    if ($('.awesomplete-dropdown').length) {
11817        var comboplete = new Awesomplete('input.awesomplete-dropdown', {
11818            minChars: 0,
11819        });
11820        $('.awesomplete-dropdown').on('focus', function () {
11821            if (comboplete.ul.childNodes.length === 0) {
11822                comboplete.minChars = 0;
11823                comboplete.evaluate();
11824            }
11825            else if (comboplete.ul.hasAttribute('hidden')) {
11826                comboplete.open();
11827            }
11828            else {
11829                comboplete.close();
11830            }
11831        });
11832    }
11833
11834    /* Banner height */
11835    bannerHeight('.default-banner-section, .banner-height-holder');
11836
11837    /* Timepicker */
11838    var date = new Date();
11839    $('input.timepicker').timepicker({
11840        'timeFormat': 'H:i',
11841        'step': 15,
11842        'scrollDefault': 'now'
11843    });
11844
11845    /* Timepicker dropdown Now position */
11846    $('.timepicker').click(function () {
11847        /* Round the time */
11848        var mins = date.getMinutes();
11849        var quarterHours = Math.round(mins / 15);
11850        if (quarterHours == 4) {
11851            date.setHours(date.getHours() + 1);
11852        }
11853        var rounded = (quarterHours * 15) % 60;
11854        date.setMinutes(rounded);
11855
11856        var roundHoursMinutes = date.getHours() + ":" + date.getMinutes();
11857        var closesTime = $('.ui-timepicker-list').find('li:contains("' + roundHoursMinutes + '")');
11858        closesTime.text('Jetzt');
11859
11860        $('.ui-timepicker-list').animate({
11861            scrollTop: closesTime.position().top
11862        }, 10);
11863    });
11864
11865    /* Fancy box */
11866    $('a.fancybox').fancybox({
11867        'transitionIn': 'elastic',
11868        'transitionOut': 'elastic',
11869        'speedIn': 600,
11870        'speedOut': 200
11871    });
11872
11873    var tabUrl = decodeURIComponent(window.location.href.split('#')[1]);
11874    var pageUrl = window.location.href.split('#')[0];
11875    pageUrl = pageUrl.replace(window.location.origin + '/', '');
11876    var currentTab = $('.tab-link[href="' + pageUrl + '#' + tabUrl + '"]');
11877    if (currentTab.length) {
11878        var tabId = currentTab.attr('data-id');
11879        var tabContent = $('.tab-content[data-id=' + tabId + ']');
11880
11881        currentTab.addClass('active-tab');
11882        $('.tab-list>li>a').not(currentTab).removeClass('active-tab');
11883
11884        tabContent.show();
11885        equalheightList($('.full-left .col-6 .box-content'));
11886        $('.tab-content').not(tabContent).hide();
11887    }
11888
11889    /* Jquery autocomplete */
11890    var availableTags = [
11891    ];
11892
11893    $(function () {
11894        $('.autocomplete').each(function () {
11895            var autocompleteContainer = $(this).siblings('.autocomplete-container');
11896            $(this).autocomplete({
11897                source: availableTags,
11898                open: function(event, ui) {
11899                    $('.ui-autocomplete').off('menufocus hover mouseover mouseenter');
11900                },
11901                appendTo: autocompleteContainer,
11902                _renderMenu: function (ul, items) {
11903                    var self = this,
11904                            currentCategory = "";
11905                    $.each(items, function (index, item) {
11906                        if (item.category != currentCategory) {
11907                            ul.append("<li class='ui-autocomplete-category'>" + item.category + "</li>");
11908                            currentCategory = item.category;
11909                        }
11910                        self._renderItem(ul, item);
11911                    });
11912                }
11913            });
11914
11915            $(this).bind('autocompleteopen', function (event, ui) {
11916                autocompleteContainer.css({'opacity': 1});
11917            });
11918
11919            $(this).bind('autocompleteclose', function (event, ui) {
11920                autocompleteContainer.css({'opacity': 0});
11921            });
11922        });
11923    });
11924
11925    equalheightList('.questions-list .img-item');
11926
11927    /* Adding class to form section */
11928    $('.ans-yes').on('click', function() {
11929        $("#feedbackIsPositive").val(1);
11930        $('.feedback-form').addClass('open-textarea');
11931        $('.feedback-form').find('.js-yes-ans').show();
11932        $('.feedback-form').find('.js-no-ans').hide();
11933        $(".feedback-textarea").removeAttr("required");
11934    });
11935    $('.ans-no').on('click', function() {
11936        $("#feedbackIsPositive").val(0);
11937        $('.feedback-form').addClass('open-textarea');
11938        $('.feedback-form').find('.js-yes-ans').hide();
11939        $('.feedback-form').find('.js-no-ans').show();
11940        $(".feedback-textarea").attr("required","required");
11941    });
11942    $('.submit').on('click', function() {
11943        $('.feedback-form').addClass('thankyou-msg');
11944    });
11945
11946
11947
11948    /* comparison f
11948orm button click */
11949
11950    $('.button-holder .submit-button').on('click', function(){
11951        var results = $('.result-part');
11952        results.addClass('show');
11953    });
11954
11955    /* end of comparison form button click */
11956});
11957
11958$(window).on('load', function () {
11959    /* Inser arrow for autocomplette dropdown list */
11960    // $('<div class="awesomplete-arrow"></div>').insertBefore('.visually-hidden');
11961
11962    /* Incrementing animation for numbers */
11963    $('.stats .nr').each(function () {
11964        var number = $(this).attr('data-nr');
11965        var speed = 2000 / number;
11966
11967        animation_loop($(this), 0, number, speed);
11968    });
11969    //Count number animation
11970
11971    /* Change the zindex for each parallax section */
11972    zIndexReOrder();
11973});
11974
11975$(window).resize(function () {
11976    /* Banner height */
11977    bannerHeight('.default-banner-section, .banner-height-holder');
11978
11979    /* Check hidden container on application form */
11980    checkFormHiddenContainer();
11981});
11982
11983///* When clicking outside the box hide the box */
11984$(document).mouseup(function (e) {
11985    var popUpContainer = $('.header-pop-up-box');
11986    if ($('.header-popup-toggle').is(e.target)) {
11987        e.preventDefault();
11988    } else {
11989        if (!popUpContainer.is(e.target) && popUpContainer.has(e.target).length === 0) {
11990            popUpContainer.hide();
11991        }
11992    }
11993
11994    var langPopUpContainer = $('.language-description');
11995    var langLinkActive = $('.lang-link');
11996    if (!langLinkActive.is(e.target) && !langPopUpContainer.is(e.target) && langPopUpContainer.has(e.target).length === 0 && langLinkActive.has(e.target).length === 0) {
11997        langPopUpContainer.hide();
11998        langPopUpContainer.removeClass('active-language');
11999    }
12000    var langArrow = $('.language-arrow');
12001    var langlink = $('.lang-link');
12002    if (!langlink.is(e.target) && langlink.has(e.target).length === 0 && !langArrow.is(e.target) && langArrow.has(e.target).length === 0) {
12003
12004        $('.language-arrow').removeClass('arrow-up');
12005        $('.language-arrow').siblings('.active-lang').removeClass('active-lang-menu');
12006        $('.language-arrow').siblings('a:not(.active-lang)').slideUp(100);
12007    }
12008});
12009
12010function zIndexReOrder(){
12011    var zindex = 0;
12012    $('.parallax-section').each(function(){
12013        $(this).css('z-index', zindex);
12014        zindex += 1;
12015    });
12016}
12017
12018function animation_loop(ele, actualNumber, maxNumber, speed) {
12019    var isInt = Number.isInteger(parseFloat(maxNumber));
12020    var isSmaller = countNumber(ele, actualNumber, maxNumber);
12021    var diff = (isInt) ? 2 : 1.12;
12022    actualNumber += diff;
12023    setTimeout(function () {
12024        if (isSmaller) {
12025            animation_loop(ele, actualNumber, maxNumber, speed);
12026        }
12027        else {
12028            if ($(ele).hasClass('not-comma')) {
12029                $(ele).text(maxNumber);
12030            } else {
12031                $(ele).text(numberWithCommas(maxNumber));
12032            }
12033        }
12034    }, speed);
12035}
12036
12037/* Incrementing numbers */
12038function countNumber(ele, actualNumber, maxNumber) {
12039    var _this = $(ele);
12040    var isInt = Number.isInteger(parseFloat(maxNumber));
12041    var newNumber = (isInt) ? parseInt(actualNumber) : parseFloat(actualNumber).toFixed(2);
12042    if (actualNumber < maxNumber) {
12043        _this.text(numberWithCommas(newNumber));
12044        return true;
12045    } else {
12046        _this.text(numberWithCommas(maxNumber));
12047        return false;
12048    }
12049}
12050
12051function numberWithCommas(x) {
12052    return x.toString().replace(".", ",");
12053}
12054
12055function animateMe(container) {
12056    var _this = $(container);
12057    var currentNumber = _this.text();
12058
12059    $({numberValue: 0}).animate({numberValue: currentNumber}, {
12060        duration: 2500,
12061        easing: 'linear',
12062        step: function (now) {
12063            _this.text(Math.ceil(now));
12064        }
12065    });
12066}
12067
12068/* Calculate banner height */
12069bannerHeight = function (container) {
12070    var windowsWidth = $(window).width();
12071    var calHeight = windowsWidth * 0.6;
12072    if (windowsWidth <= 1024) {
12073        $(container).css('height', calHeight);
12074    } else {
12075        $(container).css('height', '425px');
12076    }
12077}
12078
12079/* Check Applications containers if they are showen */
12080checkFormHiddenContainer = function () {
12081    var firstToggleContainer = $('.parts>.js-toggle-container-first');
12082    var secondToggleContainer = $('.parts>.js-toggle-container-second');
12083    var thirdToggleContainer = $('.parts>.js-toggle-container-third');
12084    if (firstToggleContainer.is(':visible') && secondToggleContainer.is(':visible') && thirdToggleContainer.is(':visible')) {
12085        $('.form-application .parts .submit-button').removeClass('none-active-btn');
12086        $('.warning-p').hide();
12087    } else {
12088        $('.form-application .parts .submit-button').addClass('none-active-btn');
12089    }
12090}
12091
12092/* Equal height */
12093equalheightList = function (container) {
12094
12095    var currentTallest = 0,
12096            currentRowStart = 0,
12097            rowDivs = new Array(),
12098            $el,
12099            topPosition = 0;
12100    $(container).each(function () {
12101
12102        $el = $(this);
12103        $($el).height('auto')
12104        topPostion = $el.position().top;
12105        if (currentRowStart != topPostion) {
12106            for (currentDiv = 0; currentDiv < rowDivs.length; currentDiv++) {
12107                rowDivs[currentDiv].height(currentTallest);
12108            }
12109            rowDivs.length = 0; // empty the array
12110            currentRowStart = topPostion;
12111            currentTallest = $el.height();
12112            rowDivs.push($el);
12113        } else {
12114            rowDivs.push($el);
12115            currentTallest = (currentTallest < $el.height()) ? ($el.height()) : (currentTallest);
12116        }
12117        for (currentDiv = 0; currentDiv < rowDivs.length; currentDiv++) {
12118            rowDivs[currentDiv].height(currentTallest);
12119        }
12120    });
12121};
12122
12123/* German initialisation for the jQuery UI date picker plugin. */
12124(function (factory) {
12125    if (typeof define === "function" && define.amd) {
12126        // AMD. Register as an anonymous module.
12127        define(["../widgets/datepicker"], factory);
12128    } else {
12129        // Browser globals
12130        factory(jQuery.datepicker);
12131    }
12132}(function (datepicker) {
12133    datepicker.regional.de = {
12134        closeText: "Schließen",
12135        prevText: "&#x3C;Zurück",
12136        nextText: "Vor&#x3E;",
12137        currentText: "Heute",
12138        monthNames: ["Januar", "Februar", "März", "April", "Mai", "Juni",
12139            "Juli", "August", "September", "Oktober", "November", "Dezember"],
12140        monthNamesShort: ["Jan", "Feb", "Mär", "Apr", "Mai", "Jun",
12141            "Jul", "Aug", "Sep", "Okt", "Nov", "Dez"],
12142        dayNames: ["Sonntag", "Montag", "Dienstag", "Mittwoch", "Donnerstag", "Freitag", "Samstag"],
12143        dayNamesShort: ["So", "Mo", "Di", "Mi", "Do", "Fr", "Sa"],
12144        dayNamesMin: ["So", "Mo", "Di", "Mi", "Do", "Fr", "Sa"],
12145        weekHeader: "KW",
12146        dateFormat: "dd.mm.yy",
12147        firstDay: 1,
12148        isRTL: false,
12149        showMonthAfterYear: false,
12150        yearSuffix: ""};
12151    datepicker.setDefaults(datepicker.regional.de);
12152    return datepicker.regional.de;
12153}));
12154
12155(function (window, undefined) {
12156
12157    var Globalize;
12158
12159    if (typeof require !== "undefined" &&
12160            typeof exports !== "undefined" &&
12161            typeof module !== "undefined") {
12162        // Assume CommonJS
12163        Globalize = require("globalize");
12164    } else {
12165        // Global variable
12166        Globalize = window.Globalize;
12167    }
12168
12169    //Globalize.addCultureInfo("de-DE", "default", {
12170    //    name: "de-DE",
12171    //    englishName: "German (Germany)",
12172    //    nativeName: "Deutsch (Deutschland)",
12173    //    language: "de",
12174    //    numberFormat: {
12175    //        ",": ".",
12176    //        ".": ",",
12177    //        "NaN": "n. def.",
12178    //        negativeInfinity: "-unendlich",
12179    //        positiveInfinity: "+unendlich",
12180    //        percent: {
12181    //            pattern: ["-n%", "n%"],
12182    //            ",": ".",
12183    //            ".": ","
12184    //        },
12185    //        currency: {
12186    //            pattern: ["-n $", "n $"],
12187    //            ",": ".",
12188    //            ".": ",",
12189    //            symbol: "€"
12190    //        }
12191    //    },
12192    //    calendars: {
12193    //        standard: {
12194    //            "/": ".",
12195    //            firstDay: 1,
12196    //            days: {
12197    //                names: ["Sonntag", "Montag", "Dienstag", "Mittwoch", "Donnerstag", "Freitag", "Samstag"],
12198    //                namesAbbr: ["So", "Mo", "Di", "Mi", "Do", "Fr", "Sa"],
12199    //                namesShort: ["So", "Mo", "Di", "Mi", "Do", "Fr", "Sa"]
12200    //            },
12201    //            months: {
12202    //                names: ["Januar", "Februar", "März", "April", "Mai", "Juni", "Juli", "August", "September", "Oktober", "November", "Dezember", ""],
12203    //                namesAbbr: ["Jan", "Feb", "Mrz", "Apr", "Mai", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Dez", ""]
12204    //            },
12205    //            AM: null,
12206    //            PM: null,
12207    //            eras: [{"name": "n. Chr.", "start": null, "offset": 0}],
12208    //            patterns: {
12209    //                d: "dd.MM.yyyy",
12210    //                D: "dddd, d. MMMM yyyy",
12211    //                t: "HH:mm",
12212    //                T: "HH:mm:ss",
12213    //                f: "dddd, d. MMMM yyyy HH:mm",
12214    //                F: "dddd, d. MMMM yyyy HH:mm:ss",
12215    //                M: "dd MMMM",
12216    //                Y: "MMMM yyyy"
12217    //            }
12218    //        }
12219    //    }
12220    //});
12221
12222}(this));
12223
12224
12225var isMobile = {
12226    Android: function() {
12227        return navigator.userAgent.match(/Android/i);
12228    },
12229    BlackBerry: function() {
12230        return navigator.userAgent.match(/BlackBerry/i);
12231    },
12232    iOS: function() {
12233        return navigator.userAgent.match(/iPhone|iPad|iPod/i);
12234    },
12235    Opera: function() {
12236        return navigator.userAgent.match(/Opera Mini/i);
12237    },
12238    Windows: function() {
12239        return navigator.userAgent.match(/IEMobile/i);
12240    },
12241    any: function() {
12242        return (isMobile.Android() || isMobile.BlackBerry() || isMobile.iOS() || isMobile.Opera() || isMobile.Windows());
12243    }
12244};
12245/*! For license information please see rvf-web-bundle.main.js.LICENSE.txt */
12246!function(){var e={6486:function(e,t,n){var r;e=n.nmd(e),function(){var a,i="Expected a function",s="__lodash_hash_undefined__",o="__lodash_placeholder__",l=32,u=128,d=1/0,c=9007199254740991,_=NaN,m=4294967295,f=[["ary",u],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",l],["partialRight",64],["rearg",256]],h="[object Arguments]",p="[object Array]",y="[object Boolean]",v="[object Date]",g="[object Error]",M="[object Function]",L="[object GeneratorFunction]",b="[object Map]",Y="[object Number]",k="[object Object]",w="[object Promise]",D="[object RegExp]",T="[object Set]",S="[object String]",j="[object Symbol]",x="[object WeakMap]",H="[object ArrayBuffer]",O="[object DataView]",E="[object Float32Array]",P="[object Float64Array
vendor: 4,115 bytes, line 12246
12246]",A="[object Int8Array]",F="[object Int16Array]",C="[object Int32Array]",I="[object Uint8Array]",W="[object Uint8ClampedArray]",R="[object Uint16Array]",z="[object Uint32Array]",N=/\b__p \+= '';/g,q=/\b(__p \+=) '' \+/g,U=/(__e\(.*?\)|\b__t\)) \+\n'';/g,B=/&(?:amp|lt|gt|quot|#39);/g,J=/[&<>"']/g,V=RegExp(B.source),$=RegExp(J.source),G=/<%-([\s\S]+?)%>/g,K=/<%([\s\S]+?)%>/g,Z=/<%=([\s\S]+?)%>/g,Q=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,X=/^\w*$/,ee=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,te=/[\\^$.*+?()[\]{}|]/g,ne=RegExp(te.source),re=/^\s+/,ae=/\s/,ie=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,se=/\{\n\/\* \[wrapped with (.+)\] \*/,oe=/,? & /,le=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ue=/[()=,{}\[\]\/\s]/,de=/\\(\\)?/g,ce=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,_e=/\w*$/,me=/^[-+]0x[0-9a-f]+$/i,fe=/^0b[01]+$/i,he=/^\[object .+?Constructor\]$/,pe=/^0o[0-7]+$/i,ye=/^(?:0|[1-9]\d*)$/,ve=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ge=/($^)/,Me=/['\n\r\u2028\u2029\\]/g,Le="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",be="a-z\\xdf-\\xf6\\xf8-\\xff",Ye="A-Z\\xc0-\\xd6\\xd8-\\xde",ke="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",we="["+ke+"]",De="["+Le+"]",Te="\\d+",Se="["+be+"]",je="[^\\ud800-\\udfff"+ke+Te+"\\u2700-\\u27bf"+be+Ye+"]",xe="\\ud83c[\\udffb-\\udfff]",He="[^\\ud800-\\udfff]",Oe="(?:\\ud83c[\\udde6-\\uddff]){2}",Ee="[\\ud800-\\udbff][\\udc00-\\udfff]",Pe="["+Ye+"]",Ae="(?:"+Se+"|"+je+")",Fe="(?:"+Pe+"|"+je+")",Ce="(?:['’](?:d|ll|m|re|s|t|ve))?",Ie="(?:['’](?:D|LL|M|RE|S|T|VE))?",We="(?:"+De+"|"+xe+")?",Re="[\\ufe0e\\ufe0f]?",ze=Re+We+"(?:\\u200d(?:"+[He,Oe,Ee].join("|")+")"+Re+We+")*",Ne="(?:"+["[\\u2700-\\u27bf]",Oe,Ee].join("|")+")"+ze,qe="(?:"+[He+De+"?",De,Oe,Ee,"[\\ud800-\\udfff]"].join("|")+")",Ue=RegExp("['’]","g"),Be=RegExp(De,"g"),Je=RegExp(xe+"(?="+xe+")|"+qe+ze,"g"),Ve=RegExp([Pe+"?"+Se+"+"+Ce+"(?="+[we,Pe,"$"].join("|")+")",Fe+"+"+Ie+"(?="+[we,Pe+Ae,"$"].join("|")+")",Pe+"?"+Ae+"+"+Ce,Pe+"+"+Ie,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Te,Ne].join("|"),"g"),$e=RegExp("[\\u200d\\ud800-\\udfff"+Le+"\\ufe0e\\ufe0f]"),Ge=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Ke=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Ze=-1,Qe={};Qe[E]=Qe[P]=Qe[A]=Qe[F]=Qe[C]=Qe[I]=Qe[W]=Qe[R]=Qe[z]=!0,Qe[h]=Qe[p]=Qe[H]=Qe[y]=Qe[O]=Qe[v]=Qe[g]=Qe[M]=Qe[b]=Qe[Y]=Qe[k]=Qe[D]=Qe[T]=Qe[S]=Qe[x]=!1;var Xe={};Xe[h]=Xe[p]=Xe[H]=Xe[O]=Xe[y]=Xe[v]=Xe[E]=Xe[P]=Xe[A]=Xe[F]=Xe[C]=Xe[b]=Xe[Y]=Xe[k]=Xe[D]=Xe[T]=Xe[S]=Xe[j]=Xe[I]=Xe[W]=Xe[R]=Xe[z]=!0,Xe[g]=Xe[M]=Xe[x]=!1;var et={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},tt=parseFloat,nt=parseInt,rt="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,at="object"==typeof self&&self&&self.Object===Object&&self,it=rt||at||Function("return this")(),st=t&&!t.nodeType&&t,ot=st&&e&&!e.nodeType&&e,lt=ot&&ot.exports===st,ut=lt&&rt.process,dt=function(){try{return ot&&ot.require&&ot.require("util").types||ut&&ut.binding&&ut.binding("util")}catch(e){}}(),ct=dt&&dt.isArrayBuffer,_t=dt&&dt.isDate,mt=dt&&dt.isMap,ft=dt&&dt.isRegExp,ht=dt&&dt.isSet,pt=dt&&dt.isTypedArray;function yt(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function vt(e,t,n,r){for(var a=-1,i=null==e?0:e.length;++a<i;){var s=e[a];t(r,s,n(s),e)}return r}function gt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}function Mt(e,t){for(var n=null==e?0:e.length;
vendor: 14,932 bytes, line 12246
12246n--&&!1!==t(e[n],n,e););return e}function Lt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}function bt(e,t){for(var n=-1,r=null==e?0:e.length,a=0,i=[];++n<r;){var s=e[n];t(s,n,e)&&(i[a++]=s)}return i}function Yt(e,t){return!(null==e||!e.length)&&Et(e,t,0)>-1}function kt(e,t,n){for(var r=-1,a=null==e?0:e.length;++r<a;)if(n(t,e[r]))return!0;return!1}function wt(e,t){for(var n=-1,r=null==e?0:e.length,a=Array(r);++n<r;)a[n]=t(e[n],n,e);return a}function Dt(e,t){for(var n=-1,r=t.length,a=e.length;++n<r;)e[a+n]=t[n];return e}function Tt(e,t,n,r){var a=-1,i=null==e?0:e.length;for(r&&i&&(n=e[++a]);++a<i;)n=t(n,e[a],a,e);return n}function St(e,t,n,r){var a=null==e?0:e.length;for(r&&a&&(n=e[--a]);a--;)n=t(n,e[a],a,e);return n}function jt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var xt=Ct("length");function Ht(e,t,n){var r;return n(e,(function(e,n,a){if(t(e,n,a))return r=n,!1})),r}function Ot(e,t,n,r){for(var a=e.length,i=n+(r?1:-1);r?i--:++i<a;)if(t(e[i],i,e))return i;return-1}function Et(e,t,n){return t==t?function(e,t,n){for(var r=n-1,a=e.length;++r<a;)if(e[r]===t)return r;return-1}(e,t,n):Ot(e,At,n)}function Pt(e,t,n,r){for(var a=n-1,i=e.length;++a<i;)if(r(e[a],t))return a;return-1}function At(e){return e!=e}function Ft(e,t){var n=null==e?0:e.length;return n?Rt(e,t)/n:_}function Ct(e){return function(t){return null==t?a:t[e]}}function It(e){return function(t){return null==e?a:e[t]}}function Wt(e,t,n,r,a){return a(e,(function(e,a,i){n=r?(r=!1,e):t(n,e,a,i)})),n}function Rt(e,t){for(var n,r=-1,i=e.length;++r<i;){var s=t(e[r]);s!==a&&(n=n===a?s:n+s)}return n}function zt(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function Nt(e){return e?e.slice(0,on(e)+1).replace(re,""):e}function qt(e){return function(t){return e(t)}}function Ut(e,t){return wt(t,(function(t){return e[t]}))}function Bt(e,t){return e.has(t)}function Jt(e,t){for(var n=-1,r=e.length;++n<r&&Et(t,e[n],0)>-1;);return n}function Vt(e,t){for(var n=e.length;n--&&Et(t,e[n],0)>-1;);return n}function $t(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}var Gt=It({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),Kt=It({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});function Zt(e){return"\\"+et[e]}function Qt(e){return $e.test(e)}function Xt(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function en(e,t){return function(n){return e(t(n))}}function tn(e,t){for(var n=-1,r=e.length,a=0,i=[];++n<r;){var s=e[n];s!==t&&s!==o||(e[n]=o,i[a++]=n)}return i}function nn(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}function rn(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=[e,e]})),n}function an(e){return Qt(e)?function(e){for(var t=Je.lastIndex=0;Je.test(e);)++t;return t}(e):xt(e)}function sn(e){return Qt(e)?function(e){return e.match(Je)||[]}(e):function(e){return e.split("")}(e)}function on(e){for(var t=e.length;t--&&ae.test(e.charAt(t)););return t}var ln=It({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"}),un=function e(t){var n,r=(t=null==t?it:un.defaults(it.Object(),t,un.pick(it,Ke))).Array,ae=t.Date,Le=t.Error,be=t.Function,Ye=t.Math,ke=t.Object,we=t.RegExp,De=t.String,Te=t.TypeError,Se=r.prototype,je=be.prototype,xe=ke.prototype,He=t["__core-js_shared__"],Oe=je.toString,Ee=xe.hasOwnProperty,Pe=0,Ae=(n=/[^.]+$/.exec(He&&He.keys&&He.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",Fe=xe.toString,Ce=Oe.call(ke),Ie=it._,We=we("^"+Oe.call(Ee).replace(te,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Re=lt?t.Buffer:a,ze=t.Symbol,Ne=t.Uint8Array,qe=Re?Re.allocUnsafe:a,Je=en(ke.getPrototypeOf,ke),$e=ke.create,et=xe.propertyIsEnumerable,rt=Se.splice,at=ze?ze.isConcatSpreadable:a,st=ze?ze.iterator:a,ot=ze?ze.toStringTag:a,ut=function(){try{var e=ui(ke,"defineProperty");return e({},"",{}),e}catch(e){}}(),dt=t.clearTimeout!==it.clearTimeout&&t.clearTimeout,xt=ae&&ae.now!==it.Date.now&&ae.now,It=t.setTimeout!==it.setTimeout&&t.setTimeout,dn=Ye.ceil,cn=Ye.floor,_n=ke.getOwnPropertySymbols,mn=Re?Re.isBuffer:a,fn=t.isFinite,hn=Se.join,pn=en(ke.keys,ke),yn=Ye.max,vn=Ye.min,gn=ae.now,Mn=t.parseInt,Ln=Ye.random,bn=Se.reverse,Yn=ui(t,"DataView"),kn=ui(t,"Map"),wn=ui(t,"Promise"),Dn=ui(t,"Set"),Tn=ui(t,"WeakMap"),Sn=ui(ke,"create"),jn=Tn&&new Tn,xn={},Hn=Ii(Yn),On=Ii(kn),En=Ii(wn),Pn=Ii(Dn),An=Ii(Tn),Fn=ze?ze.prototype:a,Cn=Fn?Fn.valueOf:a,In=Fn?Fn.toString:a;function Wn(e){if(to(e)&&!Us(e)&&!(e instanceof qn)){if(e instanceof Nn)return e;if(Ee.call(e,"__wrapped__"))return Wi(e)}return new Nn(e)}var Rn=function(){function e(){}return function(t){if(!eo(t))return{};if($e)return $e(t);e.prototype=t;var n=new e;return e.prototype=a,n}}();function zn(){}function Nn(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=a}function qn(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=m,this.__views__=[]}function Un(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Bn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Jn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Vn(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Jn;++t<n;)this.add(e[t])}function $n(e){var t=this.__data__=new Bn(e);this.size=t.size}function Gn(e,t){var n=Us(e),r=!n&&qs(e),a=!n&&!r&&$s(e),i=!n&&!r&&!a&&uo(e),s=n||r||a||i,o=s?zt(e.length,De):[],l=o.length;for(var u in e)!t&&!Ee.call(e,u)||s&&("length"==u||a&&("offset"==u||"parent"==u)||i&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||pi(u,l))||o.push(u);return o}function Kn(e){var t=e.length;return t?e[Jr(0,t-1)]:a}function Zn(e,t){return Ei(Ta(e),sr(t,0,e.length))}function Qn(e){return Ei(Ta(e))}function Xn(e,t,n){(n!==a&&!Rs(e[t],n)||n===a&&!(t in e))&&ar(e,t,n)}function er(e,t,n){var r=e[t];Ee.call(e,t)&&Rs(r,n)&&(n!==a||t in e)||ar(e,t,n)}function tr(e,t){for(var n=e.length;n--;)if(Rs(e[n][0],t))return n;return-1}function nr(e,t,n,r){return cr(e,(function(e,a,i){t(r,e,n(e),i)})),r}function rr(e,t){return e&&Sa(t,Oo(t),e)}function ar(e,t,n){"__proto__"==t&&ut?ut(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function ir(e,t){for(var n=-1,i=t.length,s=r(i),o=null==e;++n<i;)s[n]=o?a:To(e,t[n]);return s}function sr(e,t,n){return e==e&&(n!==a&&(e=e<=n?e:n),t!==a&&(e=e>=t?e:t)),e}function or(e,t,n,r,i,s){var o,l=1&t,u=2&t,d=4&t;if(n&&(o=i?n(e,r,i,s):n(e)),o!==a)return o;if(!eo(e))return e;var c=Us(e);if(c){if(o=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&Ee.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(e),!l)return Ta(e,o)}else{var _=_i(e),m=_==M||_==L;if($s(e))return La(e,l);if(_==k||_==h||m&&!i){if(o=u||m?{}:fi(e),!l)return u?function(e,t){return Sa(e,ci(e),t)}(e,function(e,t){return e&&Sa(t,Eo(t),e)}(o,e)):function(e,t){return Sa(e,di(e),t)}(e,rr(o,e))}else{if(!Xe[_])return i?e:{};o=function(e,t,n){var r,a=e.constructor;switch(t){case H:return ba(e);case y:case v:return new a(+e);case O:return function(e,t){var n=t?ba(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case E:case P:case A:case F:case C:case I:case W:case R:case z:return Ya(e,n);case b:return new a;case Y:case S:return new a(e);case D:return function(e){var t=new e.constructor(e.source,_e.exec(e));return t.lastIndex=e.lastIndex,t}(e);case T:return new a;case j:return r=e,Cn?ke(Cn.call(r)):{}}}(e,_,l)}}s||(s=new $n);var f=s.get(e);if(f)return f;s.set(e,o),so(e)?e.forEach((function(r){o.add(or(r,t,n,r,e,s))})):no(e)&&e.forEach((function(r,a){o.set(a,or(r,t,n,a,e,s))}));var p=c?a:(d?u?ni:ti:u?Eo:Oo)(e);return gt(p||e,(function(r,a){p&&(r=e[a=r]),er(o,a,or(r,t,n,a,e,s))})),o}function lr(e,t,n){var r=n.length;if(null==e)return!r;for(e=ke(e);r--;){var i=n[r],s=t[i],o=e[i];if(o===a&&!(i in e)||!s(o))return!1}return!0}function ur(e,t,n){if("function"!=typeof e)throw new Te(i);return ji((function(){e.apply(a,n)}),t)}function dr(e,t,n,r){var a=-1,i=Yt,s=!0,o=e.length,l=[],u=t.length;if(!o)return l;n&&(t=wt(t,qt(n))),r?(i=kt,s=!1):t.length>=200&&(i=Bt,s=!1,t=new Vn(t));e:for(;++a<o;){var d=e[a],c=null==n?d:n(d);if(d=r||0!==d?d:0,s&&c==c){for(var _=u;_--;)if(t[_]===c)continue e;l.push(d)}else i(t,c,r)||l.push(d)}return l}Wn.templateSettings={escape:G,evaluate:K,interpolate:Z,variable:"",imports:{_:Wn}},Wn.prototype=zn.prototype,Wn.prototype.constructor=Wn,Nn.prototype=Rn(zn.prototype),Nn.prototype.constructor=Nn,qn.prototype=Rn(zn.prototype),qn.prototype.constructor=qn,Un.prototype.clear=function(){this.__data__=Sn?Sn(null):{},this.size=0},Un.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Un.prototype.get=function(e){var t=this.__data__;if(Sn){var n=t[e];return n===s?a:n}return Ee.call(t,e)?t[e]:a},Un.prototype.has=function(e){var t=this.__data__;return Sn?t[e]!==a:Ee.call(t,e)},Un.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Sn&&t===a?s:t,this},Bn.prototype.clear=function(){this.__data__=[],this.size=0},Bn.prototype.delete=function(e){var t=this.__data__,n=tr(t,e);return!(n<0||(n==t.length-1?t.pop():rt.call(t,n,1),--this.size,0))},Bn.prototype.get=function(e){var t=this.__data__,n=tr(t,e);return n<0?a:t[n][1]},Bn.prototype.has=function(e){return tr(this.__data__,e)>-1},Bn.prototype.set=function(e,t){var n=this.__data__,r=tr(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},Jn.prototype.clear=function(){this.size=0,this.__data__={hash:new Un,map:new(kn||Bn),string:new Un}},Jn.prototype.delete=function(e){var t=oi(this,e).delete(e);return this.size-=t?1:0,t},Jn.prototype.get=function(e){return oi(this,e).get(e)},Jn.prototype.has=function(e){return oi(this,e).has(e)},Jn.prototype.set=function(e,t){var n=oi(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},Vn.prototype.add=Vn.prototype.push=function(e){return this.__data__.set(e,s),this},Vn.prototype.has=function(e){return this.__data__.has(e)},$n.prototype.clear=function(){this.__data__=new Bn,this.size=0},$n.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},$n.prototype.get=function(e){return this.__data__.get(e)},$n.prototype.has=function(e){return this.__data__.has(e)},$n.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Bn){var r=n.__data__;if(!kn||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Jn(r)}return n.set(e,t),this.size=n.size,this};var cr=Ha(gr),_r=Ha(Mr,!0);function mr(e,t){var n=!0;return cr(e,(function(e,r,a){return n=!!t(e,r,a)})),n}function fr(e,t,n){for(var r=-1,i=e.length;++r<i;){var s=e[r],o=t(s);if(null!=o&&(l===a?o==o&&!lo(o):n(o,l)))var l=o,u=s}return u}function hr(e,t){var n=[];return cr(e,(function(e,r,a){t(e,r,a)&&n.push(e)})),n}function pr(e,t,n,r,a){var i=-1,s=e.length;for(n||(n=hi),a||(a=[]);++i<s;){var o=e[i];t>0&&n(o)?t>1?pr(o,t-1,n,r,a):Dt(a,o):r||(a[a.length]=o)}return a}var yr=Oa(),vr=Oa(!0);function gr(e,t){return e&&yr(e,t,Oo)}function Mr(e,t){return e&&vr(e,t,Oo)}function Lr(e,t){return bt(t,(function(t){return Zs(e[t])}))}function br(e,t){for(var n=0,r=(t=ya(t,e)).length;null!=e&&n<r;)e=e[Ci(t[n++])];return n&&n==r?e:a}function Yr(e,t,n){var r=t(e);return Us(e)?r:Dt(r,n(e))}function kr(e){return null==e?e===a?"[object Undefined]":"[object Null]":ot&&ot in ke(e)?function(e){var t=Ee.call(e,ot),n=e[ot];try{e[ot]=a;var r=!0}catch(e){}var i=Fe.call(e);return r&&(t?e[ot]=n:delete e[ot]),i}(e):function(e){return Fe.call(e)}(e)}function wr(e,t){return e>t}function Dr(e,t){return null!=e&&Ee.call(e,t)}function Tr(e,t){return null!=e&&t in ke(e)}function Sr(e,t,n){for(var i=n?kt:Yt,s=e[0].length,o=e.length,l=o,u=r(o),d=1/0,c=[];l--;){var _=e[l];l&&t&&(_=wt(_,qt(t))),d=vn(_.length,d),u[l]=!n&&(t||s>=120&&_.length>=120)?new Vn(l&&_):a}_=e[0];var m=-1,f=u[0];e:for(;++m<s&&c.length<d;){var h=_[m],p=t?t(h):h;if(h=n||0!==h?h:0,!(f?Bt(f,p):i(c,p,n))){for(l=o;--l;){var y=u[l];if(!(y?Bt(y,p):i(e[l],p,n)))continue e}f&&f.push(p),c.push(h)}}return c}function jr(e,t,n){var r=null==(e=wi(e,t=ya(t,e)))?e:e[Ci(Ki(t))];return null==r?a:yt(r,e,n)}function xr(e){return to(e)&&kr(e)==h}function Hr(e,t,n,r,i){return e===t||(null==e||null==t||!to(e)&&!to(t)?e!=e&&t!=t:function(e,t,n,r,i,s){var o=Us(e),l=Us(t),u=o?p:_i(e),d=l?p:_i(t),c=(u=u==h?k:u)==k,_=(d=d==h?k:d)==k,m=u==d;if(m&&$s(e)){if(!$s(t))return!1;o=!0,c=!1}if(m&&!c)return s||(s=new $n),o||uo(e)?Xa(e,t,n,r,i,s):function(e,t,n,r,a,i,s){switch(n){case O:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case H:return!(e.byteLength!=t.byteLength||!i(new Ne(e),new Ne(t)));case y:case v:case Y:return Rs(+e,+t);case g:return e.name==t.name&&e.message==t.message;case D:case S:return e==t+"";case b:var o=Xt;case T:var l=1&r;if(o||(o=nn),e.size!=t.size&&!l)return!1;var u=s.get(e);if(u)return u==t;r|=2,s.set(e,t);var d=Xa(o(e),o(t),r,a,i,s);return s.delete(e),d;case j:if(Cn)return Cn.call(e)==Cn.call(t)}return!1}(e,t,u,n,r,i,s);if(!(1&n)){var f=c&&Ee.call(e,"__wrapped__"),M=_&&Ee.call(t,"__wrapped__");
vendor: 4,826 bytes, line 12246
12246if(f||M){var L=f?e.value():e,w=M?t.value():t;return s||(s=new $n),i(L,w,n,r,s)}}return!!m&&(s||(s=new $n),function(e,t,n,r,i,s){var o=1&n,l=ti(e),u=l.length;if(u!=ti(t).length&&!o)return!1;for(var d=u;d--;){var c=l[d];if(!(o?c in t:Ee.call(t,c)))return!1}var _=s.get(e),m=s.get(t);if(_&&m)return _==t&&m==e;var f=!0;s.set(e,t),s.set(t,e);for(var h=o;++d<u;){var p=e[c=l[d]],y=t[c];if(r)var v=o?r(y,p,c,t,e,s):r(p,y,c,e,t,s);if(!(v===a?p===y||i(p,y,n,r,s):v)){f=!1;break}h||(h="constructor"==c)}if(f&&!h){var g=e.constructor,M=t.constructor;g==M||!("constructor"in e)||!("constructor"in t)||"function"==typeof g&&g instanceof g&&"function"==typeof M&&M instanceof M||(f=!1)}return s.delete(e),s.delete(t),f}(e,t,n,r,i,s))}(e,t,n,r,Hr,i))}function Or(e,t,n,r){var i=n.length,s=i,o=!r;if(null==e)return!s;for(e=ke(e);i--;){var l=n[i];if(o&&l[2]?l[1]!==e[l[0]]:!(l[0]in e))return!1}for(;++i<s;){var u=(l=n[i])[0],d=e[u],c=l[1];if(o&&l[2]){if(d===a&&!(u in e))return!1}else{var _=new $n;if(r)var m=r(d,c,u,e,t,_);if(!(m===a?Hr(c,d,3,r,_):m))return!1}}return!0}function Er(e){return!(!eo(e)||(t=e,Ae&&Ae in t))&&(Zs(e)?We:he).test(Ii(e));var t}function Pr(e){return"function"==typeof e?e:null==e?al:"object"==typeof e?Us(e)?Wr(e[0],e[1]):Ir(e):ml(e)}function Ar(e){if(!Li(e))return pn(e);var t=[];for(var n in ke(e))Ee.call(e,n)&&"constructor"!=n&&t.push(n);return t}function Fr(e,t){return e<t}function Cr(e,t){var n=-1,a=Js(e)?r(e.length):[];return cr(e,(function(e,r,i){a[++n]=t(e,r,i)})),a}function Ir(e){var t=li(e);return 1==t.length&&t[0][2]?Yi(t[0][0],t[0][1]):function(n){return n===e||Or(n,e,t)}}function Wr(e,t){return vi(e)&&bi(t)?Yi(Ci(e),t):function(n){var r=To(n,e);return r===a&&r===t?So(n,e):Hr(t,r,3)}}function Rr(e,t,n,r,i){e!==t&&yr(t,(function(s,o){if(i||(i=new $n),eo(s))!function(e,t,n,r,i,s,o){var l=Ti(e,n),u=Ti(t,n),d=o.get(u);if(d)Xn(e,n,d);else{var c=s?s(l,u,n+"",e,t,o):a,_=c===a;if(_){var m=Us(u),f=!m&&$s(u),h=!m&&!f&&uo(u);c=u,m||f||h?Us(l)?c=l:Vs(l)?c=Ta(l):f?(_=!1,c=La(u,!0)):h?(_=!1,c=Ya(u,!0)):c=[]:ao(u)||qs(u)?(c=l,qs(l)?c=vo(l):eo(l)&&!Zs(l)||(c=fi(u))):_=!1}_&&(o.set(u,c),i(c,u,r,s,o),o.delete(u)),Xn(e,n,c)}}(e,t,o,n,Rr,r,i);else{var l=r?r(Ti(e,o),s,o+"",e,t,i):a;l===a&&(l=s),Xn(e,o,l)}}),Eo)}function zr(e,t){var n=e.length;if(n)return pi(t+=t<0?n:0,n)?e[t]:a}function Nr(e,t,n){t=t.length?wt(t,(function(e){return Us(e)?function(t){return br(t,1===e.length?e[0]:e)}:e})):[al];var r=-1;t=wt(t,qt(si()));var a=Cr(e,(function(e,n,a){var i=wt(t,(function(t){return t(e)}));return{criteria:i,index:++r,value:e}}));return function(e,t){var r=e.length;for(e.sort((function(e,t){return function(e,t,n){for(var r=-1,a=e.criteria,i=t.criteria,s=a.length,o=n.length;++r<s;){var l=ka(a[r],i[r]);if(l)return r>=o?l:l*("desc"==n[r]?-1:1)}return e.index-t.index}(e,t,n)}));r--;)e[r]=e[r].value;return e}(a)}function qr(e,t,n){for(var r=-1,a=t.length,i={};++r<a;){var s=t[r],o=br(e,s);n(o,s)&&Zr(i,ya(s,e),o)}return i}function Ur(e,t,n,r){var a=r?Pt:Et,i=-1,s=t.length,o=e;for(e===t&&(t=Ta(t)),n&&(o=wt(e,qt(n)));++i<s;)for(var l=0,u=t[i],d=n?n(u):u;(l=a(o,d,l,r))>-1;)o!==e&&rt.call(o,l,1),rt.call(e,l,1);return e}function Br(e,t){for(var n=e?t.length:0,r=n-1;n--;){var a=t[n];if(n==r||a!==i){var i=a;pi(a)?rt.call(e,a,1):ua(e,a)}}return e}function Jr(e,t){return e+cn(Ln()*(t-e+1))}function Vr(e,t){var n="";if(!e||t<1||t>c)return n;do{t%2&&(n+=e),(t=cn(t/2))&&(e+=e)}while(t);return n}function $r(e,t){return xi(ki(e,t,al),e+"")}function Gr(e){return Kn(zo(e))}function Kr(e,t){var n=zo(e);return Ei(n,sr(t,0,n.length))}function Zr(e,t,n,r){if(!eo(e))return e;for(var i=-1,s=(t=ya(t,e)).length,o=s-1,l=e;null!=l&&++i<s;){var u=Ci(t[i]),d=n;if("__proto__"===u||"constructor"===u||"prototype"===u)return e;if(i!=o){var c=l[u];(d=r?r(c,u,l):a)===a&&(d=eo(c)?c:pi(t[i+1])?[]:{})}er(l,u,d),l=l[u]}return e}var Qr=jn?function(e,t){return jn.set(e,t),e}:al,Xr=ut?function(e,t){return ut(e,"toString",{configurable:!0,enumerable:!1,value:tl(t),writable:!0})}:al;function ea(e){return Ei(zo(e))}function ta(e,t,n){var a=-1,i=e.length;t<0&&(t=-t>i?0:i+t),(n=n>i?i:n)<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var s=r(i);++a<i;)s[a]=e[a+t];return s}function na(e,t){var n;return cr(e,(function(e,r,a){return!(n=t(e,r,a))})),!!n}function ra(e,t,n){var r=0,a=null==e?r:e.length;if("number"==typeof t&&t==t&&a<=2147483647){for(;r<a;){var i=r+a>>>1,s=e[i];null!==s&&!lo(s)&&(n?s<=t:s<t)?r=i+1:a=i}return a}return aa(e,t,al,n)}function aa(e,t,n,r){var i=0,s=null==e?0:e.length;if(0===s)return 0;for(var o=(t=n(t))!=t,l=null===t,u=lo(t),d=t===a;i<s;){var c=cn((i+s)/2),_=n(e[c]),m=_!==a,f=null===_,h=_==_,p=lo(_);if(o)var y=r||h;else y=d?h&&(r||m):l?h&&m&&(r||!f):u?h&&m&&!f&&(r||!p):!f&&!p&&(r?_<=t:_<t);y?i=c+1:s=c}return vn(s,4294967294)}function ia(e,t){for(var n=-1,r=e.length,a=0,i=[];++n<r;){var s=e[n],o=t?t(s):s;
vendor: 4,343 bytes, line 12246
12246if(!n||!Rs(o,l)){var l=o;i[a++]=0===s?0:s}}return i}function sa(e){return"number"==typeof e?e:lo(e)?_:+e}function oa(e){if("string"==typeof e)return e;if(Us(e))return wt(e,oa)+"";if(lo(e))return In?In.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function la(e,t,n){var r=-1,a=Yt,i=e.length,s=!0,o=[],l=o;if(n)s=!1,a=kt;else if(i>=200){var u=t?null:Va(e);if(u)return nn(u);s=!1,a=Bt,l=new Vn}else l=t?[]:o;e:for(;++r<i;){var d=e[r],c=t?t(d):d;if(d=n||0!==d?d:0,s&&c==c){for(var _=l.length;_--;)if(l[_]===c)continue e;t&&l.push(c),o.push(d)}else a(l,c,n)||(l!==o&&l.push(c),o.push(d))}return o}function ua(e,t){return null==(e=wi(e,t=ya(t,e)))||delete e[Ci(Ki(t))]}function da(e,t,n,r){return Zr(e,t,n(br(e,t)),r)}function ca(e,t,n,r){for(var a=e.length,i=r?a:-1;(r?i--:++i<a)&&t(e[i],i,e););return n?ta(e,r?0:i,r?i+1:a):ta(e,r?i+1:0,r?a:i)}function _a(e,t){var n=e;return n instanceof qn&&(n=n.value()),Tt(t,(function(e,t){return t.func.apply(t.thisArg,Dt([e],t.args))}),n)}function ma(e,t,n){var a=e.length;if(a<2)return a?la(e[0]):[];for(var i=-1,s=r(a);++i<a;)for(var o=e[i],l=-1;++l<a;)l!=i&&(s[i]=dr(s[i]||o,e[l],t,n));return la(pr(s,1),t,n)}function fa(e,t,n){for(var r=-1,i=e.length,s=t.length,o={};++r<i;){var l=r<s?t[r]:a;n(o,e[r],l)}return o}function ha(e){return Vs(e)?e:[]}function pa(e){return"function"==typeof e?e:al}function ya(e,t){return Us(e)?e:vi(e,t)?[e]:Fi(go(e))}var va=$r;function ga(e,t,n){var r=e.length;return n=n===a?r:n,!t&&n>=r?e:ta(e,t,n)}var Ma=dt||function(e){return it.clearTimeout(e)};function La(e,t){if(t)return e.slice();var n=e.length,r=qe?qe(n):new e.constructor(n);return e.copy(r),r}function ba(e){var t=new e.constructor(e.byteLength);return new Ne(t).set(new Ne(e)),t}function Ya(e,t){var n=t?ba(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function ka(e,t){if(e!==t){var n=e!==a,r=null===e,i=e==e,s=lo(e),o=t!==a,l=null===t,u=t==t,d=lo(t);if(!l&&!d&&!s&&e>t||s&&o&&u&&!l&&!d||r&&o&&u||!n&&u||!i)return 1;if(!r&&!s&&!d&&e<t||d&&n&&i&&!r&&!s||l&&n&&i||!o&&i||!u)return-1}return 0}function wa(e,t,n,a){for(var i=-1,s=e.length,o=n.length,l=-1,u=t.length,d=yn(s-o,0),c=r(u+d),_=!a;++l<u;)c[l]=t[l];for(;++i<o;)(_||i<s)&&(c[n[i]]=e[i]);for(;d--;)c[l++]=e[i++];return c}function Da(e,t,n,a){for(var i=-1,s=e.length,o=-1,l=n.length,u=-1,d=t.length,c=yn(s-l,0),_=r(c+d),m=!a;++i<c;)_[i]=e[i];for(var f=i;++u<d;)_[f+u]=t[u];for(;++o<l;)(m||i<s)&&(_[f+n[o]]=e[i++]);return _}function Ta(e,t){var n=-1,a=e.length;for(t||(t=r(a));++n<a;)t[n]=e[n];return t}function Sa(e,t,n,r){var i=!n;n||(n={});for(var s=-1,o=t.length;++s<o;){var l=t[s],u=r?r(n[l],e[l],l,n,e):a;u===a&&(u=e[l]),i?ar(n,l,u):er(n,l,u)}return n}function ja(e,t){return function(n,r){var a=Us(n)?vt:nr,i=t?t():{};return a(n,e,si(r,2),i)}}function xa(e){return $r((function(t,n){var r=-1,i=n.length,s=i>1?n[i-1]:a,o=i>2?n[2]:a;for(s=e.length>3&&"function"==typeof s?(i--,s):a,o&&yi(n[0],n[1],o)&&(s=i<3?a:s,i=1),t=ke(t);++r<i;){var l=n[r];l&&e(t,l,r,s)}return t}))}function Ha(e,t){return function(n,r){if(null==n)return n;if(!Js(n))return e(n,r);for(var a=n.length,i=t?a:-1,s=ke(n);(t?i--:++i<a)&&!1!==r(s[i],i,s););return n}}function Oa(e){return function(t,n,r){for(var a=-1,i=ke(t),s=r(t),o=s.length;o--;){var l=s[e?o:++a];if(!1===n(i[l],l,i))break}return t}}function Ea(e){return function(t){var n=Qt(t=go(t))?sn(t):a,r=n?n[0]:t.charAt(0),i=n?ga(n,1).join(""):t.slice(1);return r[e]()+i}}function Pa(e){return function(t){return Tt(Qo(Uo(t).replace(Ue,"")),e,"")}}function Aa(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=Rn(e.prototype),r=e.apply(n,t);return eo(r)?r:n}}function Fa(e){return function(t,n,r){var i=ke(t);if(!Js(t)){var s=si(n,3);t=Oo(t),n=function(e){return s(i[e],e,i)}}var o=e(t,n,r);return o>-1?i[s?t[o]:o]:a}}function Ca(e){return ei((function(t){var n=t.length,r=n,s=Nn.prototype.thru;for(e&&t.reverse();r--;){var o=t[r];if("function"!=typeof o)throw new Te(i);if(s&&!l&&"wrapper"==ai(o))var l=new Nn([],!0)}for(r=l?r:n;++r<n;){var u=ai(o=t[r]),d="wrapper"==u?ri(o):a;
vendor: 4,740 bytes, line 12246
12246l=d&&gi(d[0])&&424==d[1]&&!d[4].length&&1==d[9]?l[ai(d[0])].apply(l,d[3]):1==o.length&&gi(o)?l[u]():l.thru(o)}return function(){var e=arguments,r=e[0];if(l&&1==e.length&&Us(r))return l.plant(r).value();for(var a=0,i=n?t[a].apply(this,e):r;++a<n;)i=t[a].call(this,i);return i}}))}function Ia(e,t,n,i,s,o,l,d,c,_){var m=t&u,f=1&t,h=2&t,p=24&t,y=512&t,v=h?a:Aa(e);return function a(){for(var u=arguments.length,g=r(u),M=u;M--;)g[M]=arguments[M];if(p)var L=ii(a),b=$t(g,L);if(i&&(g=wa(g,i,s,p)),o&&(g=Da(g,o,l,p)),u-=b,p&&u<_){var Y=tn(g,L);return Ba(e,t,Ia,a.placeholder,n,g,Y,d,c,_-u)}var k=f?n:this,w=h?k[e]:e;return u=g.length,d?g=Di(g,d):y&&u>1&&g.reverse(),m&&c<u&&(g.length=c),this&&this!==it&&this instanceof a&&(w=v||Aa(w)),w.apply(k,g)}}function Wa(e,t){return function(n,r){return function(e,t,n,r){return gr(e,(function(e,a,i){t(r,n(e),a,i)})),r}(n,e,t(r),{})}}function Ra(e,t){return function(n,r){var i;if(n===a&&r===a)return t;if(n!==a&&(i=n),r!==a){if(i===a)return r;"string"==typeof n||"string"==typeof r?(n=oa(n),r=oa(r)):(n=sa(n),r=sa(r)),i=e(n,r)}return i}}function za(e){return ei((function(t){return t=wt(t,qt(si())),$r((function(n){var r=this;return e(t,(function(e){return yt(e,r,n)}))}))}))}function Na(e,t){var n=(t=t===a?" ":oa(t)).length;if(n<2)return n?Vr(t,e):t;var r=Vr(t,dn(e/an(t)));return Qt(t)?ga(sn(r),0,e).join(""):r.slice(0,e)}function qa(e){return function(t,n,i){return i&&"number"!=typeof i&&yi(t,n,i)&&(n=i=a),t=fo(t),n===a?(n=t,t=0):n=fo(n),function(e,t,n,a){for(var i=-1,s=yn(dn((t-e)/(n||1)),0),o=r(s);s--;)o[a?s:++i]=e,e+=n;return o}(t,n,i=i===a?t<n?1:-1:fo(i),e)}}function Ua(e){return function(t,n){return"string"==typeof t&&"string"==typeof n||(t=yo(t),n=yo(n)),e(t,n)}}function Ba(e,t,n,r,i,s,o,u,d,c){var _=8&t;t|=_?l:64,4&(t&=~(_?64:l))||(t&=-4);var m=[e,t,i,_?s:a,_?o:a,_?a:s,_?a:o,u,d,c],f=n.apply(a,m);return gi(e)&&Si(f,m),f.placeholder=r,Hi(f,e,t)}function Ja(e){var t=Ye[e];return function(e,n){if(e=yo(e),(n=null==n?0:vn(ho(n),292))&&fn(e)){var r=(go(e)+"e").split("e");return+((r=(go(t(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return t(e)}}var Va=Dn&&1/nn(new Dn([,-0]))[1]==d?function(e){return new Dn(e)}:ul;function $a(e){return function(t){var n=_i(t);return n==b?Xt(t):n==T?rn(t):function(e,t){return wt(t,(function(t){return[t,e[t]]}))}(t,e(t))}}function Ga(e,t,n,s,d,c,_,m){var f=2&t;if(!f&&"function"!=typeof e)throw new Te(i);var h=s?s.length:0;if(h||(t&=-97,s=d=a),_=_===a?_:yn(ho(_),0),m=m===a?m:ho(m),h-=d?d.length:0,64&t){var p=s,y=d;s=d=a}var v=f?a:ri(e),g=[e,t,n,s,d,p,y,c,_,m];if(v&&function(e,t){var n=e[1],r=t[1],a=n|r,i=a<131,s=r==u&&8==n||r==u&&256==n&&e[7].length<=t[8]||384==r&&t[7].length<=t[8]&&8==n;if(!i&&!s)return e;1&r&&(e[2]=t[2],a|=1&n?0:4);var l=t[3];if(l){var d=e[3];e[3]=d?wa(d,l,t[4]):l,e[4]=d?tn(e[3],o):t[4]}(l=t[5])&&(d=e[5],e[5]=d?Da(d,l,t[6]):l,e[6]=d?tn(e[5],o):t[6]),(l=t[7])&&(e[7]=l),r&u&&(e[8]=null==e[8]?t[8]:vn(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=a}(g,v),e=g[0],t=g[1],n=g[2],s=g[3],d=g[4],!(m=g[9]=g[9]===a?f?0:e.length:yn(g[9]-h,0))&&24&t&&(t&=-25),t&&1!=t)M=8==t||16==t?function(e,t,n){var i=Aa(e);return function s(){for(var o=arguments.length,l=r(o),u=o,d=ii(s);u--;)l[u]=arguments[u];var c=o<3&&l[0]!==d&&l[o-1]!==d?[]:tn(l,d);return(o-=c.length)<n?Ba(e,t,Ia,s.placeholder,a,l,c,a,a,n-o):yt(this&&this!==it&&this instanceof s?i:e,this,l)}}(e,t,m):t!=l&&33!=t||d.length?Ia.apply(a,g):function(e,t,n,a){var i=1&t,s=Aa(e);return function t(){for(var o=-1,l=arguments.length,u=-1,d=a.length,c=r(d+l),_=this&&this!==it&&this instanceof t?s:e;++u<d;)c[u]=a[u];for(;l--;)c[u++]=arguments[++o];return yt(_,i?n:this,c)}}(e,t,n,s);else var M=function(e,t,n){var r=1&t,a=Aa(e);return function t(){return(this&&this!==it&&this instanceof t?a:e).apply(r?n:this,arguments)}}(e,t,n);return Hi((v?Qr:Si)(M,g),e,t)}function Ka(e,t,n,r){return e===a||Rs(e,xe[n])&&!Ee.call(r,n)?t:e}function Za(e,t,n,r,i,s){return eo(e)&&eo(t)&&(s.set(t,e),Rr(e,t,a,Za,s),s.delete(t)),e}function Qa(e){return ao(e)?a:e}function Xa(e,t,n,r,i,s){var o=1&n,l=e.length,u=t.length;if(l!=u&&!(o&&u>l))return!1;var d=s.get(e),c=s.get(t);if(d&&c)return d==t&&c==e;var _=-1,m=!0,f=2&n?new Vn:a;for(s.set(e,t),s.set(t,e);++_<l;){var h=e[_],p=t[_];if(r)var y=o?r(p,h,_,t,e,s):r(h,p,_,e,t,s);if(y!==a){if(y)continue;m=!1;break}if(f){if(!jt(t,(function(e,t){if(!Bt(f,t)&&(h===e||i(h,e,n,r,s)))return f.push(t)}))){m=!1;break}}else if(h!==p&&!i(h,p,n,r,s)){m=!1;break}}return s.delete(e),s.delete(t),m}function ei(e){return xi(ki(e,a,Bi),e+"")}function ti(e){return Yr(e,Oo,di)}function ni(e){return Yr(e,Eo,ci)}var ri=jn?function(e){return jn.get(e)}:ul;function ai(e){for(var t=e.name+"",n=xn[t],r=Ee.call(xn,t)?n.length:0;r--;){var a=n[r],i=a.func;
vendor: 6,103 bytes, line 12246
12246if(null==i||i==e)return a.name}return t}function ii(e){return(Ee.call(Wn,"placeholder")?Wn:e).placeholder}function si(){var e=Wn.iteratee||il;return e=e===il?Pr:e,arguments.length?e(arguments[0],arguments[1]):e}function oi(e,t){var n,r,a=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?a["string"==typeof t?"string":"hash"]:a.map}function li(e){for(var t=Oo(e),n=t.length;n--;){var r=t[n],a=e[r];t[n]=[r,a,bi(a)]}return t}function ui(e,t){var n=function(e,t){return null==e?a:e[t]}(e,t);return Er(n)?n:a}var di=_n?function(e){return null==e?[]:(e=ke(e),bt(_n(e),(function(t){return et.call(e,t)})))}:pl,ci=_n?function(e){for(var t=[];e;)Dt(t,di(e)),e=Je(e);return t}:pl,_i=kr;function mi(e,t,n){for(var r=-1,a=(t=ya(t,e)).length,i=!1;++r<a;){var s=Ci(t[r]);if(!(i=null!=e&&n(e,s)))break;e=e[s]}return i||++r!=a?i:!!(a=null==e?0:e.length)&&Xs(a)&&pi(s,a)&&(Us(e)||qs(e))}function fi(e){return"function"!=typeof e.constructor||Li(e)?{}:Rn(Je(e))}function hi(e){return Us(e)||qs(e)||!!(at&&e&&e[at])}function pi(e,t){var n=typeof e;return!!(t=null==t?c:t)&&("number"==n||"symbol"!=n&&ye.test(e))&&e>-1&&e%1==0&&e<t}function yi(e,t,n){if(!eo(n))return!1;var r=typeof t;return!!("number"==r?Js(n)&&pi(t,n.length):"string"==r&&t in n)&&Rs(n[t],e)}function vi(e,t){if(Us(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!lo(e))||X.test(e)||!Q.test(e)||null!=t&&e in ke(t)}function gi(e){var t=ai(e),n=Wn[t];if("function"!=typeof n||!(t in qn.prototype))return!1;if(e===n)return!0;var r=ri(n);return!!r&&e===r[0]}(Yn&&_i(new Yn(new ArrayBuffer(1)))!=O||kn&&_i(new kn)!=b||wn&&_i(wn.resolve())!=w||Dn&&_i(new Dn)!=T||Tn&&_i(new Tn)!=x)&&(_i=function(e){var t=kr(e),n=t==k?e.constructor:a,r=n?Ii(n):"";if(r)switch(r){case Hn:return O;case On:return b;case En:return w;case Pn:return T;case An:return x}return t});var Mi=He?Zs:yl;function Li(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||xe)}function bi(e){return e==e&&!eo(e)}function Yi(e,t){return function(n){return null!=n&&n[e]===t&&(t!==a||e in ke(n))}}function ki(e,t,n){return t=yn(t===a?e.length-1:t,0),function(){for(var a=arguments,i=-1,s=yn(a.length-t,0),o=r(s);++i<s;)o[i]=a[t+i];i=-1;for(var l=r(t+1);++i<t;)l[i]=a[i];return l[t]=n(o),yt(e,this,l)}}function wi(e,t){return t.length<2?e:br(e,ta(t,0,-1))}function Di(e,t){for(var n=e.length,r=vn(t.length,n),i=Ta(e);r--;){var s=t[r];e[r]=pi(s,n)?i[s]:a}return e}function Ti(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var Si=Oi(Qr),ji=It||function(e,t){return it.setTimeout(e,t)},xi=Oi(Xr);function Hi(e,t,n){var r=t+"";return xi(e,function(e,t){var n=t.length;if(!n)return e;var r=n-1;return t[r]=(n>1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(ie,"{\n/* [wrapped with "+t+"] */\n")}(r,function(e,t){return gt(f,(function(n){var r="_."+n[0];t&n[1]&&!Yt(e,r)&&e.push(r)})),e.sort()}(function(e){var t=e.match(se);return t?t[1].split(oe):[]}(r),n)))}function Oi(e){var t=0,n=0;return function(){var r=gn(),i=16-(r-n);if(n=r,i>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(a,arguments)}}function Ei(e,t){var n=-1,r=e.length,i=r-1;for(t=t===a?r:t;++n<t;){var s=Jr(n,i),o=e[s];e[s]=e[n],e[n]=o}return e.length=t,e}var Pi,Ai,Fi=(Pi=Ps((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(ee,(function(e,n,r,a){t.push(r?a.replace(de,"$1"):n||e)})),t}),(function(e){return 500===Ai.size&&Ai.clear(),e})),Ai=Pi.cache,Pi);function Ci(e){if("string"==typeof e||lo(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Ii(e){if(null!=e){try{return Oe.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function Wi(e){if(e instanceof qn)return e.clone();var t=new Nn(e.__wrapped__,e.__chain__);return t.__actions__=Ta(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var Ri=$r((function(e,t){return Vs(e)?dr(e,pr(t,1,Vs,!0)):[]})),zi=$r((function(e,t){var n=Ki(t);return Vs(n)&&(n=a),Vs(e)?dr(e,pr(t,1,Vs,!0),si(n,2)):[]})),Ni=$r((function(e,t){var n=Ki(t);return Vs(n)&&(n=a),Vs(e)?dr(e,pr(t,1,Vs,!0),a,n):[]}));function qi(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var a=null==n?0:ho(n);return a<0&&(a=yn(r+a,0)),Ot(e,si(t,3),a)}function Ui(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=r-1;return n!==a&&(i=ho(n),i=n<0?yn(r+i,0):vn(i,r-1)),Ot(e,si(t,3),i,!0)}function Bi(e){return null!=e&&e.length?pr(e,1):[]}function Ji(e){return e&&e.length?e[0]:a}var Vi=$r((function(e){var t=wt(e,ha);return t.length&&t[0]===e[0]?Sr(t):[]})),$i=$r((function(e){var t=Ki(e),n=wt(e,ha);return t===Ki(n)?t=a:n.pop(),n.length&&n[0]===e[0]?Sr(n,si(t,2)):[]})),Gi=$r((function(e){var t=Ki(e),n=wt(e,ha);return(t="function"==typeof t?t:a)&&n.pop(),n.length&&n[0]===e[0]?Sr(n,a,t):[]}));function Ki(e){var t=null==e?0:e.length;return t?e[t-1]:a}var Zi=$r(Qi);function Qi(e,t){return e&&e.length&&t&&t.length?Ur(e,t):e}var Xi=ei((function(e,t){var n=null==e?0:e.length,r=ir(e,t);return Br(e,wt(t,(function(e){return pi(e,n)?+e:e})).sort(ka)),r}));function es(e){return null==e?e:bn.call(e)}var ts=$r((function(e){return la(pr(e,1,Vs,!0))})),ns=$r((function(e){var t=Ki(e);return Vs(t)&&(t=a),la(pr(e,1,Vs,!0),si(t,2))})),rs=$r((function(e){var t=Ki(e);return t="function"==typeof t?t:a,la(pr(e,1,Vs,!0),a,t)}));function as(e){if(!e||!e.length)return[];var t=0;return e=bt(e,(function(e){if(Vs(e))return t=yn(e.length,t),!0})),zt(t,(function(t){return wt(e,Ct(t))}))}function is(e,t){if(!e||!e.length)return[];var n=as(e);return null==t?n:wt(n,(function(e){return yt(t,a,e)}))}var ss=$r((function(e,t){return Vs(e)?dr(e,t):[]})),os=$r((function(e){return ma(bt(e,Vs))})),ls=$r((function(e){var t=Ki(e);return Vs(t)&&(t=a),ma(bt(e,Vs),si(t,2))})),us=$r((function(e){var t=Ki(e);return t="function"==typeof t?t:a,ma(bt(e,Vs),a,t)})),ds=$r(as),cs=$r((function(e){var t=e.length,n=t>1?e[t-1]:a;return n="function"==typeof n?(e.pop(),n):a,is(e,n)}));function _s(e){var t=Wn(e);return t.__chain__=!0,t}function ms(e,t){return t(e)}var fs=ei((function(e){var t=e.length,n=t?e[0]:0,r=this.__wrapped__,
vendor: 3,751 bytes, line 12246
12246i=function(t){return ir(t,e)};return!(t>1||this.__actions__.length)&&r instanceof qn&&pi(n)?((r=r.slice(n,+n+(t?1:0))).__actions__.push({func:ms,args:[i],thisArg:a}),new Nn(r,this.__chain__).thru((function(e){return t&&!e.length&&e.push(a),e}))):this.thru(i)})),hs=ja((function(e,t,n){Ee.call(e,n)?++e[n]:ar(e,n,1)})),ps=Fa(qi),ys=Fa(Ui);function vs(e,t){return(Us(e)?gt:cr)(e,si(t,3))}function gs(e,t){return(Us(e)?Mt:_r)(e,si(t,3))}var Ms=ja((function(e,t,n){Ee.call(e,n)?e[n].push(t):ar(e,n,[t])})),Ls=$r((function(e,t,n){var a=-1,i="function"==typeof t,s=Js(e)?r(e.length):[];return cr(e,(function(e){s[++a]=i?yt(t,e,n):jr(e,t,n)})),s})),bs=ja((function(e,t,n){ar(e,n,t)}));function Ys(e,t){return(Us(e)?wt:Cr)(e,si(t,3))}var ks=ja((function(e,t,n){e[n?0:1].push(t)}),(function(){return[[],[]]})),ws=$r((function(e,t){if(null==e)return[];var n=t.length;return n>1&&yi(e,t[0],t[1])?t=[]:n>2&&yi(t[0],t[1],t[2])&&(t=[t[0]]),Nr(e,pr(t,1),[])})),Ds=xt||function(){return it.Date.now()};function Ts(e,t,n){return t=n?a:t,t=e&&null==t?e.length:t,Ga(e,u,a,a,a,a,t)}function Ss(e,t){var n;if("function"!=typeof t)throw new Te(i);return e=ho(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=a),n}}var js=$r((function(e,t,n){var r=1;if(n.length){var a=tn(n,ii(js));r|=l}return Ga(e,r,t,n,a)})),xs=$r((function(e,t,n){var r=3;if(n.length){var a=tn(n,ii(xs));r|=l}return Ga(t,r,e,n,a)}));function Hs(e,t,n){var r,s,o,l,u,d,c=0,_=!1,m=!1,f=!0;if("function"!=typeof e)throw new Te(i);function h(t){var n=r,i=s;return r=s=a,c=t,l=e.apply(i,n)}function p(e){return c=e,u=ji(v,t),_?h(e):l}function y(e){var n=e-d;return d===a||n>=t||n<0||m&&e-c>=o}function v(){var e=Ds();if(y(e))return g(e);u=ji(v,function(e){var n=t-(e-d);return m?vn(n,o-(e-c)):n}(e))}function g(e){return u=a,f&&r?h(e):(r=s=a,l)}function M(){var e=Ds(),n=y(e);if(r=arguments,s=this,d=e,n){if(u===a)return p(d);if(m)return Ma(u),u=ji(v,t),h(d)}return u===a&&(u=ji(v,t)),l}return t=yo(t)||0,eo(n)&&(_=!!n.leading,o=(m="maxWait"in n)?yn(yo(n.maxWait)||0,t):o,f="trailing"in n?!!n.trailing:f),M.cancel=function(){u!==a&&Ma(u),c=0,r=d=s=u=a},M.flush=function(){return u===a?l:g(Ds())},M}var Os=$r((function(e,t){return ur(e,1,t)})),Es=$r((function(e,t,n){return ur(e,yo(t)||0,n)}));function Ps(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new Te(i);var n=function(){var r=arguments,a=t?t.apply(this,r):r[0],i=n.cache;if(i.has(a))return i.get(a);var s=e.apply(this,r);return n.cache=i.set(a,s)||i,s};return n.cache=new(Ps.Cache||Jn),n}function As(e){if("function"!=typeof e)throw new Te(i);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}Ps.Cache=Jn;var Fs=va((function(e,t){var n=(t=1==t.length&&Us(t[0])?wt(t[0],qt(si())):wt(pr(t,1),qt(si()))).length;return $r((function(r){for(var a=-1,i=vn(r.length,n);++a<i;)r[a]=t[a].call(this,r[a]);return yt(e,this,r)}))})),Cs=$r((function(e,t){var n=tn(t,ii(Cs));return Ga(e,l,a,t,n)})),Is=$r((function(e,t){var n=tn(t,ii(Is));return Ga(e,64,a,t,n)})),Ws=ei((function(e,t){return Ga(e,256,a,a,a,t)}));function Rs(e,t){return e===t||e!=e&&t!=t}var zs=Ua(wr),Ns=Ua((function(e,t){return e>=t})),qs=xr(function(){return arguments}())?xr:function(e){return to(e)&&Ee.call(e,"callee")&&!et.call(e,"callee")},Us=r.isArray,Bs=ct?qt(ct):function(e){return to(e)&&kr(e)==H};function Js(e){return null!=e&&Xs(e.length)&&!Zs(e)}function Vs(e){return to(e)&&Js(e)}var $s=mn||yl,Gs=_t?qt(_t):function(e){return to(e)&&kr(e)==v};function Ks(e){if(!to(e))return!1;var t=kr(e);return t==g||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!
vendor: 20,436 bytes, line 12246
12246ao(e)}function Zs(e){if(!eo(e))return!1;var t=kr(e);return t==M||t==L||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Qs(e){return"number"==typeof e&&e==ho(e)}function Xs(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=c}function eo(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function to(e){return null!=e&&"object"==typeof e}var no=mt?qt(mt):function(e){return to(e)&&_i(e)==b};function ro(e){return"number"==typeof e||to(e)&&kr(e)==Y}function ao(e){if(!to(e)||kr(e)!=k)return!1;var t=Je(e);if(null===t)return!0;var n=Ee.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&Oe.call(n)==Ce}var io=ft?qt(ft):function(e){return to(e)&&kr(e)==D},so=ht?qt(ht):function(e){return to(e)&&_i(e)==T};function oo(e){return"string"==typeof e||!Us(e)&&to(e)&&kr(e)==S}function lo(e){return"symbol"==typeof e||to(e)&&kr(e)==j}var uo=pt?qt(pt):function(e){return to(e)&&Xs(e.length)&&!!Qe[kr(e)]},co=Ua(Fr),_o=Ua((function(e,t){return e<=t}));function mo(e){if(!e)return[];if(Js(e))return oo(e)?sn(e):Ta(e);if(st&&e[st])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[st]());var t=_i(e);return(t==b?Xt:t==T?nn:zo)(e)}function fo(e){return e?(e=yo(e))===d||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function ho(e){var t=fo(e),n=t%1;return t==t?n?t-n:t:0}function po(e){return e?sr(ho(e),0,m):0}function yo(e){if("number"==typeof e)return e;if(lo(e))return _;if(eo(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=eo(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Nt(e);var n=fe.test(e);return n||pe.test(e)?nt(e.slice(2),n?2:8):me.test(e)?_:+e}function vo(e){return Sa(e,Eo(e))}function go(e){return null==e?"":oa(e)}var Mo=xa((function(e,t){if(Li(t)||Js(t))Sa(t,Oo(t),e);else for(var n in t)Ee.call(t,n)&&er(e,n,t[n])})),Lo=xa((function(e,t){Sa(t,Eo(t),e)})),bo=xa((function(e,t,n,r){Sa(t,Eo(t),e,r)})),Yo=xa((function(e,t,n,r){Sa(t,Oo(t),e,r)})),ko=ei(ir),wo=$r((function(e,t){e=ke(e);var n=-1,r=t.length,i=r>2?t[2]:a;for(i&&yi(t[0],t[1],i)&&(r=1);++n<r;)for(var s=t[n],o=Eo(s),l=-1,u=o.length;++l<u;){var d=o[l],c=e[d];(c===a||Rs(c,xe[d])&&!Ee.call(e,d))&&(e[d]=s[d])}return e})),Do=$r((function(e){return e.push(a,Za),yt(Ao,a,e)}));function To(e,t,n){var r=null==e?a:br(e,t);return r===a?n:r}function So(e,t){return null!=e&&mi(e,t,Tr)}var jo=Wa((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Fe.call(t)),e[t]=n}),tl(al)),xo=Wa((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Fe.call(t)),Ee.call(e,t)?e[t].push(n):e[t]=[n]}),si),Ho=$r(jr);function Oo(e){return Js(e)?Gn(e):Ar(e)}function Eo(e){return Js(e)?Gn(e,!0):function(e){if(!eo(e))return function(e){var t=[];if(null!=e)for(var n in ke(e))t.push(n);return t}(e);var t=Li(e),n=[];for(var r in e)("constructor"!=r||!t&&Ee.call(e,r))&&n.push(r);return n}(e)}var Po=xa((function(e,t,n){Rr(e,t,n)})),Ao=xa((function(e,t,n,r){Rr(e,t,n,r)})),Fo=ei((function(e,t){var n={};if(null==e)return n;var r=!1;t=wt(t,(function(t){return t=ya(t,e),r||(r=t.length>1),t})),Sa(e,ni(e),n),r&&(n=or(n,7,Qa));for(var a=t.length;a--;)ua(n,t[a]);return n})),Co=ei((function(e,t){return null==e?{}:function(e,t){return qr(e,t,(function(t,n){return So(e,n)}))}(e,t)}));function Io(e,t){if(null==e)return{};var n=wt(ni(e),(function(e){return[e]}));return t=si(t),qr(e,n,(function(e,n){return t(e,n[0])}))}var Wo=$a(Oo),Ro=$a(Eo);function zo(e){return null==e?[]:Ut(e,Oo(e))}var No=Pa((function(e,t,n){return t=t.toLowerCase(),e+(n?qo(t):t)}));function qo(e){return Zo(go(e).toLowerCase())}function Uo(e){return(e=go(e))&&e.replace(ve,Gt).replace(Be,"")}var Bo=Pa((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()})),Jo=Pa((function(e,t,n){return e+(n?" ":"")+t.toLowerCase()})),Vo=Ea("toLowerCase"),$o=Pa((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()})),Go=Pa((function(e,t,n){return e+(n?" ":"")+Zo(t)})),Ko=Pa((function(e,t,n){return e+(n?" ":"")+t.toUpperCase()})),Zo=Ea("toUpperCase");function Qo(e,t,n){return e=go(e),(t=n?a:t)===a?function(e){return Ge.test(e)}(e)?function(e){return e.match(Ve)||[]}(e):function(e){return e.match(le)||[]}(e):e.match(t)||[]}var Xo=$r((function(e,t){try{return yt(e,a,t)}catch(e){return Ks(e)?e:new Le(e)}})),el=ei((function(e,t){return gt(t,(function(t){t=Ci(t),ar(e,t,js(e[t],e))})),e}));function tl(e){return function(){return e}}var nl=Ca(),rl=Ca(!0);function al(e){return e}function il(e){return Pr("function"==typeof e?e:or(e,1))}var sl=$r((function(e,t){return function(n){return jr(n,e,t)}})),ol=$r((function(e,t){return function(n){return jr(e,n,t)}}));function ll(e,t,n){var r=Oo(t),a=Lr(t,r);null!=n||eo(t)&&(a.length||!r.length)||(n=t,t=e,e=this,a=Lr(t,Oo(t)));var i=!(eo(n)&&"chain"in n&&!n.chain),s=Zs(e);return gt(a,(function(n){var r=t[n];e[n]=r,s&&(e.prototype[n]=function(){var t=this.__chain__;if(i||t){var n=e(this.__wrapped__),a=n.__actions__=Ta(this.__actions__);return a.push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,Dt([this.value()],arguments))})})),e}function ul(){}var dl=za(wt),cl=za(Lt),_l=za(jt);function ml(e){return vi(e)?Ct(Ci(e)):function(e){return function(t){return br(t,e)}}(e)}var fl=qa(),hl=qa(!0);function pl(){return[]}function yl(){return!1}var vl,gl=Ra((function(e,t){return e+t}),0),Ml=Ja("ceil"),Ll=Ra((function(e,t){return e/t}),1),bl=Ja("floor"),Yl=Ra((function(e,t){return e*t}),1),kl=Ja("round"),wl=Ra((function(e,t){return e-t}),0);return Wn.after=function(e,t){if("function"!=typeof t)throw new Te(i);return e=ho(e),function(){if(--e<1)return t.apply(this,arguments)}},Wn.ary=Ts,Wn.assign=Mo,Wn.assignIn=Lo,Wn.assignInWith=bo,Wn.assignWith=Yo,Wn.at=ko,Wn.before=Ss,Wn.bind=js,Wn.bindAll=el,Wn.bindKey=xs,Wn.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Us(e)?e:[e]},Wn.chain=_s,Wn.chunk=function(e,t,n){t=(n?yi(e,t,n):t===a)?1:yn(ho(t),0);var i=null==e?0:e.length;if(!i||t<1)return[];for(var s=0,o=0,l=r(dn(i/t));s<i;)l[o++]=ta(e,s,s+=t);return l},Wn.compact=function(e){for(var t=-1,n=null==e?0:e.length,r=0,a=[];++t<n;){var i=e[t];i&&(a[r++]=i)}return a},Wn.concat=function(){var e=arguments.length;if(!e)return[];for(var t=r(e-1),n=arguments[0],a=e;a--;)t[a-1]=arguments[a];return Dt(Us(n)?Ta(n):[n],pr(t,1))},Wn.cond=function(e){var t=null==e?0:e.length,n=si();return e=t?wt(e,(function(e){if("function"!=typeof e[1])throw new Te(i);return[n(e[0]),e[1]]})):[],$r((function(n){for(var r=-1;++r<t;){var a=e[r];if(yt(a[0],this,n))return yt(a[1],this,n)}}))},Wn.conforms=function(e){return function(e){var t=Oo(e);return function(n){return lr(n,e,t)}}(or(e,1))},Wn.constant=tl,Wn.countBy=hs,Wn.create=function(e,t){var n=Rn(e);return null==t?n:rr(n,t)},Wn.curry=function e(t,n,r){var i=Ga(t,8,a,a,a,a,a,n=r?a:n);return i.placeholder=e.placeholder,i},Wn.curryRight=function e(t,n,r){var i=Ga(t,16,a,a,a,a,a,n=r?a:n);return i.placeholder=e.placeholder,i},Wn.debounce=Hs,Wn.defaults=wo,Wn.defaultsDeep=Do,Wn.defer=Os,Wn.delay=Es,Wn.difference=Ri,Wn.differenceBy=zi,Wn.differenceWith=Ni,Wn.drop=function(e,t,n){var r=null==e?0:e.length;return r?ta(e,(t=n||t===a?1:ho(t))<0?0:t,r):[]},Wn.dropRight=function(e,t,n){var r=null==e?0:e.length;return r?ta(e,0,(t=r-(t=n||t===a?1:ho(t)))<0?0:t):[]},Wn.dropRightWhile=function(e,t){return e&&e.length?ca(e,si(t,3),!0,!0):[]},Wn.dropWhile=function(e,t){return e&&e.length?ca(e,si(t,3),!0):[]},Wn.fill=function(e,t,n,r){var i=null==e?0:e.length;return i?(n&&"number"!=typeof n&&yi(e,t,n)&&(n=0,r=i),function(e,t,n,r){var i=e.length;for((n=ho(n))<0&&(n=-n>i?0:i+n),(r=r===a||r>i?i:ho(r))<0&&(r+=i),r=n>r?0:po(r);n<r;)e[n++]=t;return e}(e,t,n,r)):[]},Wn.filter=function(e,t){return(Us(e)?bt:hr)(e,si(t,3))},Wn.flatMap=function(e,t){return pr(Ys(e,t),1)},Wn.flatMapDeep=function(e,t){return pr(Ys(e,t),d)},Wn.flatMapDepth=function(e,t,n){return n=n===a?1:ho(n),pr(Ys(e,t),n)},Wn.flatten=Bi,Wn.flattenDeep=function(e){return null!=e&&e.length?pr(e,d):[]},Wn.flattenDepth=function(e,t){return null!=e&&e.length?pr(e,t=t===a?1:ho(t)):[]},Wn.flip=function(e){return Ga(e,512)},Wn.flow=nl,Wn.flowRight=rl,Wn.fromPairs=function(e){for(var t=-1,n=null==e?0:e.length,r={};++t<n;){var a=e[t];r[a[0]]=a[1]}return r},Wn.functions=function(e){return null==e?[]:Lr(e,Oo(e))},Wn.functionsIn=function(e){return null==e?[]:Lr(e,Eo(e))},Wn.groupBy=Ms,Wn.initial=function(e){return null!=e&&e.length?ta(e,0,-1):[]},Wn.intersection=Vi,Wn.intersectionBy=$i,Wn.intersectionWith=Gi,Wn.invert=jo,Wn.invertBy=xo,Wn.invokeMap=Ls,Wn.iteratee=il,Wn.keyBy=bs,Wn.keys=Oo,Wn.keysIn=Eo,Wn.map=Ys,Wn.mapKeys=function(e,t){var n={};return t=si(t,3),gr(e,(function(e,r,a){ar(n,t(e,r,a),e)})),n},Wn.mapValues=function(e,t){var n={};return t=si(t,3),gr(e,(function(e,r,a){ar(n,r,t(e,r,a))})),n},Wn.matches=function(e){return Ir(or(e,1))},Wn.matchesProperty=function(e,t){return Wr(e,or(t,1))},Wn.memoize=Ps,Wn.merge=Po,Wn.mergeWith=Ao,Wn.method=sl,Wn.methodOf=ol,Wn.mixin=ll,Wn.negate=As,Wn.nthArg=function(e){return e=ho(e),$r((function(t){return zr(t,e)}))},Wn.omit=Fo,Wn.omitBy=function(e,t){return Io(e,As(si(t)))},Wn.once=function(e){return Ss(2,e)},Wn.orderBy=function(e,t,n,r){return null==e?[]:(Us(t)||(t=null==t?[]:[t]),Us(n=r?a:n)||(n=null==n?[]:[n]),Nr(e,t,n))},Wn.over=dl,Wn.overArgs=Fs,Wn.overEvery=cl,Wn.overSome=_l,Wn.partial=Cs,Wn.partialRight=Is,Wn.partition=ks,Wn.pick=Co,Wn.pickBy=Io,Wn.property=ml,Wn.propertyOf=function(e){return function(t){return null==e?a:br(e,t)}},Wn.pull=Zi,Wn.pullAll=Qi,Wn.pullAllBy=function(e,t,n){return e&&e.length&&t&&t.length?Ur(e,t,si(n,2)):e},Wn.pullAllWith=function(e,t,n){return e&&e.length&&t&&t.length?Ur(e,t,a,n):e},Wn.pullAt=Xi,Wn.range=fl,Wn.rangeRight=hl,Wn.rearg=Ws,Wn.reject=function(e,t){return(Us(e)?bt:hr)(e,As(si(t,3)))},Wn.remove=function(e,t){var n=[];if(!e||!e.length)return n;var r=-1,a=[],i=e.length;for(t=si(t,3);++r<i;){var s=e[r];t(s,r,e)&&(n.push(s),a.push(r))}return Br(e,a),n},Wn.rest=function(e,t){if("function"!=typeof e)throw new Te(i);return $r(e,t=t===a?t:ho(t))},Wn.reverse=es,Wn.sampleSize=function(e,t,n){return t=(n?yi(e,t,n):t===a)?1:ho(t),(Us(e)?Zn:Kr)(e,t)},Wn.set=function(e,t,n){return null==e?e:Zr(e,t,n)},Wn.setWith=function(e,t,n,r){return r="function"==typeof r?r:a,null==e?e:Zr(e,t,n,r)},Wn.shuffle=function(e){return(Us(e)?Qn:ea)(e)},Wn.slice=function(e,t,n){var r=null==e?0:e.length;return r?(n&&"number"!=typeof n&&yi(e,t,n)?(t=0,n=r):(t=null==t?0:ho(t),n=n===a?r:ho(n)),ta(e,t,n)):[]},Wn.sortBy=ws,Wn.sortedUniq=function(e){return e&&e.length?ia(e):[]},Wn.sortedUniqBy=function(e,t){return e&&e.length?ia(e,si(t,2)):[]},Wn.split=function(e,t,n){return n&&"number"!=typeof n&&yi(e,t,n)&&(t=n=a),(n=n===a?m:n>>>0)?(e=go(e))&&("string"==typeof t||null!=t&&!io(t))&&!(t=oa(t))&&Qt(e)?ga(sn(e),0,n):e.split(t,n):[]},Wn.spread=function(e,t){if("function"!=typeof e)throw new Te(i);return t=null==t?0:yn(ho(t),0),$r((function(n){var r=n[t],a=ga(n,0,t);return r&&Dt(a,r),yt(e,this,a)}))},Wn.tail=function(e){var t=null==e?0:e.length;return t?ta(e,1,t):[]},Wn.take=function(e,t,n){return e&&e.length?ta(e,0,(t=n||t===a?1:ho(t))<0?0:t):[]},Wn.takeRight=function(e,t,n){var r=null==e?0:e.length;return r?ta(e,(t=r-(t=n||t===a?1:ho(t)))<0?0:t,r):[]},Wn.takeRightWhile=function(e,t){return e&&e.length?ca(e,si(t,3),!1,!0):[]},Wn.takeWhile=function(e,t){return e&&e.length?ca(e,si(t,3)):[]},Wn.tap=function(e,t){return t(e),e},Wn.throttle=function(e,t,n){var r=!0,a=!0;if("function"!=typeof e)throw new Te(i);return eo(n)&&(r="leading"in n?!!n.leading:r,a="trailing"in n?!!n.trailing:a),Hs(e,t,{leading:r,maxWait:t,trailing:a})},Wn.thru=ms,Wn.toArray=mo,Wn.toPairs=Wo,Wn.toPairsIn=Ro,Wn.toPath=function(e){return Us(e)?wt(e,Ci):lo(e)?[e]:Ta(Fi(go(e)))},Wn.toPlainObject=vo,Wn.transform=function(e,t,n){var r=Us(e),a=r||$s(e)||uo(e);if(t=si(t,4),null==n){var i=e&&e.constructor;n=a?r?new i:[]:eo(e)&&Zs(i)?Rn(Je(e)):{}}return(a?gt:gr)(e,(function(e,r,a){return t(n,e,r,a)})),n},Wn.unary=function(e){return Ts(e,1)},Wn.union=ts,Wn.unionBy=ns,Wn.unionWith=rs,Wn.uniq=function(e){return e&&e.length?la(e):[]},Wn.uniqBy=function(e,t){return e&&e.length?la(e,si(t,2)):[]},Wn.uniqWith=function(e,t){return t="function"==typeof t?t:a,e&&e.length?la(e,a,t):[]},Wn.unset=function(e,t){return null==e||ua(e,t)},Wn.unzip=as,Wn.unzipWith=is,Wn.update=function(e,t,n){return null==e?e:da(e,t,pa(n))},Wn.updateWith=function(e,t,n,r){return r="function"==typeof r?r:a,null==e?e:da(e,t,pa(n),r)},Wn.values=zo,Wn.valuesIn=function(e){return null==e?[]:Ut(e,Eo(e))},Wn.without=ss,Wn.words=Qo,Wn.wrap=function(e,t){return Cs(pa(t),e)},Wn.xor=os,Wn.xorBy=ls,Wn.xorWith=us,Wn.zip=ds,Wn.zipObject=function(e,t){return fa(e||[],t||[],er)},Wn.zipObjectDeep=function(e,t){return fa(e||[],t||[],Zr)},Wn.zipWith=cs,Wn.entries=Wo,Wn.entriesIn=Ro,Wn.extend=Lo,Wn.extendWith=bo,ll(Wn,Wn),Wn.add=gl,Wn.attempt=Xo,Wn.camelCase=No,Wn.capitalize=qo,Wn.ceil=Ml,Wn.clamp=function(e,t,n){return n===a&&(n=t,t=a),n!==a&&(n=(n=yo(n))==n?n:0),t!==a&&(t=(t=yo(t))==t?t:0),sr(yo(e),t,n)},Wn.clone=function(e){return or(e,4)},Wn.cloneDeep=function(e){return or(e,5)},Wn.cloneDeepWith=function(e,t){return or(e,5,t="function"==typeof t?t:a)},Wn.cloneWith=function(e,t){return or(e,4,t="function"==typeof t?t:a)},Wn.conformsTo=function(e,t){return null==t||lr(e,t,Oo(t))},Wn.deburr=Uo,Wn.defaultTo=function(e,t){return null==e||e!=e?t:e},Wn.divide=Ll,Wn.endsWith=function(e,t,n){e=go(e),t=oa(t);var r=e.length,i=n=n===a?r:sr(ho(n),0,r);return(n-=t.length)>=0&&e.slice(n,i)==t},Wn.eq=Rs,Wn.escape=function(e){return(e=go(e))&&$.test(e)?e.replace(J,Kt):e},Wn.escapeRegExp=function(e){return(e=go(e))&&ne.test(e)?e.replace(te,"\\$&"):e},Wn.every=function(e,t,n){var r=Us(e)?Lt:mr;return n&&yi(e,t,n)&&(t=a),r(e,si(t,3))},Wn.find=ps,Wn.findIndex=qi,Wn.findKey=function(e,t){return Ht(e,si(t,3),gr)},Wn.findLast=ys,Wn.findLastIndex=Ui,Wn.findLastKey=function(e,t){return Ht(e,si(t,3),Mr)},Wn.floor=bl,Wn.forEach=vs,Wn.forEachRight=gs,Wn.forIn=function(e,t){return null==e?e:yr(e,si(t,3),Eo)},Wn.forInRight=function(e,t){return null==e?e:vr(e,si(t,3),Eo)},Wn.forOwn=function(e,t){return e&&gr(e,si(t,3))},Wn.forOwnRight=function(e,t){return e&&Mr(e,si(t,3))},Wn.get=To,Wn.gt=zs,Wn.gte=Ns,Wn.has=function(e,t){return null!=e&&mi(e,t,Dr)},Wn.hasIn=So,Wn.head=Ji,Wn.identity=al,Wn.includes=function(e,t,n,r){e=Js(e)?e:zo(e),n=n&&!r?ho(n):0;var a=e.length;return n<0&&(n=yn(a+n,0)),oo(e)?n<=a&&e.indexOf(t,n)>-1:!!a&&Et(e,t,n)>-1},Wn.indexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var a=null==n?0:ho(n);return a<0&&(a=yn(r+a,0)),Et(e,t,a)},Wn.inRange=function(e,t,n){return t=fo(t),n===a?(n=t,t=0):n=fo(n),function(e,t,n){return e>=vn(t,n)&&e<yn(t,n)}(e=yo(e),t,n)},Wn.invoke=Ho,Wn.isArguments=qs,Wn.isArray=Us,Wn.isArrayBuffer=Bs,Wn.isArrayLike=Js,Wn.isArrayLikeObject=Vs,Wn.isBoolean=function(e){return!0===e||!1===e||to(e)&&kr(e)==y},Wn.isBuffer=$s,Wn.isDate=Gs,Wn.isElement=function(e){return to(e)&&1===e.nodeType&&!ao(e)},Wn.isEmpty=function(e){if(null==e)return!0;if(Js(e)&&(Us(e)||"string"==typeof e||"function"==typeof e.splice||$s(e)||uo(e)||qs(e)))return!e.length;var t=_i(e);if(t==b||t==T)return!e.size;if(Li(e))return!Ar(e).length;for(var n in e)if(Ee.call(e,n))return!1;return!0},Wn.isEqual=function(e,t){return Hr(e,t)},Wn.isEqualWith=function(e,t,n){var r=(n="function"==typeof n?n:a)?n(e,t):a;return r===a?Hr(e,t,a,n):!!r},Wn.isError=Ks,Wn.isFinite=function(e){return"number"==typeof e&&fn(e)},Wn.isFunction=Zs,Wn.isInteger=Qs,Wn.isLength=Xs,Wn.isMap=no,Wn.isMatch=function(e,t){return e===t||Or(e,t,li(t))},Wn.isMatchWith=function(e,t,n){return n="function"==typeof n?n:a,Or(e,t,li(t),n)},Wn.isNaN=function(e){return ro(e)&&e!=+e},Wn.isNative=function(e){if(Mi(e))throw new Le("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Er(e)},Wn.isNil=function(e){return null==e},Wn.isNull=function(e){return null===e},Wn.isNumber=ro,Wn.isObject=eo,Wn.isObjectLike=to,Wn.isPlainObject=ao,Wn.isRegExp=io,Wn.isSafeInteger=function(e){return Qs(e)&&e>=-9007199254740991&&e<=c},Wn.isSet=so,Wn.isString=oo,Wn.isSymbol=lo,Wn.isTypedArray=uo,Wn.isUndefined=function(e){return e===a},Wn.isWeakMap=function(e){return to(e)&&_i(e)==x},Wn.isWeakSet=function(e){return to(e)&&"[object WeakSet]"==kr(e)},Wn.join=function(e,t){return null==e?"":hn.call(e,t)},Wn.kebabCase=Bo,Wn.last=Ki,Wn.lastIndexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=r;return n!==a&&(i=(i=ho(n))<0?yn(r+i,0):vn(i,r-1)),t==t?function(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r}(e,t,i):Ot(e,At,i,!0)},Wn.lowerCase=Jo,Wn.lowerFirst=Vo,Wn.lt=co,Wn.lte=_o,Wn.max=function(e){return e&&e.length?fr(e,al,wr):a},Wn.maxBy=function(e,t){return e&&e.length?fr(e,si(t,2),wr):a},Wn.mean=function(e){return Ft(e,al)},Wn.meanBy=function(e,t){return Ft(e,si(t,2))},Wn.min=function(e){return e&&e.length?fr(e,al,Fr):a},Wn.minBy=function(e,t){return e&&e.length?fr(e,si(t,2),Fr):a},Wn.stubArray=pl,Wn.stubFalse=yl,Wn.stubObject=function(){return{}},Wn.stubString=function(){return""},Wn.stubTrue=function(){return!0},Wn.multiply=Yl,Wn.nth=function(e,t){return e&&e.length?zr(e,ho(t)):a},Wn.noConflict=function(){return it._===this&&(it._=Ie),this},Wn.noop=ul,Wn.now=Ds,Wn.pad=function(e,t,n){e=go(e);var r=(t=ho(t))?an(e):0;if(!t||r>=t)return e;var a=(t-r)/2;return Na(cn(a),n)+e+Na(dn(a),n)},Wn.padEnd=function(e,t,n){e=go(e);var r=(t=ho(t))?an(e):0;return t&&r<t?e+Na(t-r,n):e},Wn.padStart=function(e,t,n){e=go(e);var r=(t=ho(t))?an(e):0;return t&&r<t?Na(t-r,n)+e:e},Wn.parseInt=function(e,t,n){return n||null==t?t=0:t&&(t=+t),Mn(go(e).replace(re,""),t||0)},Wn.random=function(e,t,n){if(n&&"boolean"!=typeof n&&yi(e,t,n)&&(t=n=a),n===a&&("boolean"==typeof t?(n=t,t=a):"boolean"==typeof e&&(n=e,e=a)),e===a&&t===a?(e=0,t=1):(e=fo(e),t===a?(t=e,e=0):t=fo(t)),e>t){var r=e;e=t,t=r}if(n||e%1||t%1){var i=Ln();return vn(e+i*(t-e+tt("1e-"+((i+"").length-1))),t)}return Jr(e,t)},Wn.reduce=function(e,t,n){var r=Us(e)?Tt:Wt,a=arguments.length<3;return r(e,si(t,4),n,a,cr)},Wn.reduceRight=function(e,t,n){var r=Us(e)?St:Wt,a=arguments.length<3;return r(e,si(t,4),n,a,_r)},Wn.repeat=function(e,t,n){return t=(n?yi(e,t,n):t===a)?1:ho(t),Vr(go(e),t)},Wn.replace=function(){var e=arguments,t=go(e[0]);return e.length<3?t:t.replace(e[1],e[2])},Wn.result=function(e,t,n){var r=-1,i=(t=ya(t,e)).length;for(i||(i=1,e=a);++r<i;){var s=null==e?a:e[Ci(t[r])];s===a&&(r=i,s=n),e=Zs(s)?s.call(e):s}return e},Wn.round=kl,Wn.runInContext=e,Wn.sample=function(e){return(Us(e)?Kn:Gr)(e)},Wn.size=function(e){if(null==e)return 0;if(Js(e))return oo(e)?an(e):e.length;var t=_i(e);return t==b||t==T?e.size:Ar(e).length},Wn.snakeCase=$o,Wn.some=function(e,t,n){var r=Us(e)?jt:na;return n&&yi(e,t,n)&&(t=a),r(e,si(t,3))},Wn.sortedIndex=function(e,t){return ra(e,t)},Wn.sortedIndexBy=function(e,t,n){return aa(e,t,si(n,2))},Wn.sortedIndexOf=function(e,t){var n=null==e?0:e.length;if(n){var r=ra(e,t);if(r<n&&Rs(e[r],t))return r}return-1},Wn.sortedLastIndex=function(e,t){return ra(e,t,!0)},Wn.sortedLastIndexBy=function(e,t,n){return aa(e,t,si(n,2),!0)},Wn.sortedLastIndexOf=function(e,t){if(null!=e&&e.length){var n=ra(e,t,!0)-1;if(Rs(e[n],t))return n}return-1},Wn.startCase=Go,Wn.startsWith=function(e,t,n){return e=go(e),n=null==n?0:sr(ho(n),0,e.length),t=oa(t),e.slice(n,n+t.length)==t},Wn.subtract=wl,Wn.sum=function(e){return e&&e.length?Rt(e,al):0},Wn.sumBy=function(e,t){return e&&e.length?Rt(e,si(t,2)):0},Wn.template=function(e,t,n){var r=Wn.templateSettings;n&&yi(e,t,n)&&(t=a),e=go(e),t=bo({},t,r,Ka);var i,s,o=bo({},t.imports,r.imports,Ka),l=Oo(o),u=Ut(o,l),d=0,c=t.interpolate||ge,_="__p += '",m=we((t.escape||ge).source+"|"+c.source+"|"+(c===Z?ce:ge).source+"|"+(t.evaluate||ge).source+"|$","g"),f="//# sourceURL="+(Ee.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Ze+"]")+"\n";e.replace(m,(function(t,n,r,a,o,l){return r||(r=a),_+=e.slice(d,l).replace(Me,Zt),n&&(i=!0,_+="' +\n__e("+n+") +\n'"),o&&(s=!0,_+="';\n"+o+";\n__p += '"),r&&(_+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),d=l+t.length,t})),_+="';\n";var h=Ee.call(t,"variable")&&t.variable;if(h){if(ue.test(h))throw new Le("Invalid `variable` option passed into `_.template`")}else _="with (obj) {\n"+_+"\n}\n";_=(s?_.replace(N,""):_).replace(q,"$1").replace(U,"$1;"),_="function("+(h||"obj")+") {\n"+(h?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(i?", __e = _.escape":"")+(s?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";
12246\n")+_+"return __p\n}";var p=Xo((function(){return be(l,f+"return "+_).apply(a,u)}));if(p.source=_,Ks(p))throw p;return p},Wn.times=function(e,t){if((e=ho(e))<1||e>c)return[];var n=m,r=vn(e,m);t=si(t),e-=m;for(var a=zt(r,t);++n<e;)t(n);return a},Wn.toFinite=fo,Wn.toInteger=ho,Wn.toLength=po,Wn.toLower=function(e){return go(e).toLowerCase()},Wn.toNumber=yo,Wn.toSafeInteger=function(e){return e?sr(ho(e),-9007199254740991,c):0===e?e:0},Wn.toString=go,Wn.toUpper=function(e){return go(e).toUpperCase()},Wn.trim=function(e,t,n){if((e=go(e))&&(n||t===a))return Nt(e);if(!e||!(t=oa(t)))return e;var r=sn(e),i=sn(t);return ga(r,Jt(r,i),Vt(r,i)+1).join("")},Wn.trimEnd=function(e,t,n){if((e=go(e))&&(n||t===a))return e.slice(0,on(e)+1);if(!e||!(t=oa(t)))return e;var r=sn(e);return ga(r,0,Vt(r,sn(t))+1).join("")},Wn.trimStart=function(e,t,n){if((e=go(e))&&(n||t===a))return e.replace(re,"");if(!e||!(t=oa(t)))return e;var r=sn(e);return ga(r,Jt(r,sn(t))).join("")},Wn.truncate=function(e,t){var n=30,r="...";if(eo(t)){var i="separator"in t?t.separator:i;n="length"in t?ho(t.length):n,r="omission"in t?oa(t.omission):r}var s=(e=go(e)).length;if(Qt(e)){var o=sn(e);s=o.length}if(n>=s)return e;var l=n-an(r);if(l<1)return r;var u=o?ga(o,0,l).join(""):e.slice(0,l);if(i===a)return u+r;if(o&&(l+=u.length-l),io(i)){if(e.slice(l).search(i)){var d,c=u;for(i.global||(i=we(i.source,go(_e.exec(i))+"g")),i.lastIndex=0;d=i.exec(c);)var _=d.index;u=u.slice(0,_===a?l:_)}}else if(e.indexOf(oa(i),l)!=l){var m=u.lastIndexOf(i);m>-1&&(u=u.slice(0,m))}return u+r},Wn.unescape=function(e){return(e=go(e))&&V.test(e)?e.replace(B,ln):e},Wn.uniqueId=function(e){var t=++Pe;return go(e)+t},Wn.upperCase=Ko,Wn.upperFirst=Zo,Wn.each=vs,Wn.eachRight=gs,Wn.first=Ji,ll(Wn,(vl={},gr(Wn,(function(e,t){Ee.call(Wn.prototype,t)||(vl[t]=e)})),vl),{chain:!1}),Wn.VERSION="4.17.21",gt(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){Wn[e].placeholder=Wn})),gt(["drop","take"],(function(e,t){qn.prototype[e]=function(n){n=n===a?1:yn(ho(n),0);var r=this.__filtered__&&!t?new qn(this):this.clone();return r.__filtered__?r.__takeCount__=vn(n,r.__takeCount__):r.__views__.push({size:vn(n,m),type:e+(r.__dir__<0?"Right":"")}),r},qn.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),gt(["filter","map","takeWhile"],(function(e,t){var n=t+1,r=1==n||3==n;qn.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:si(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}})),gt(["head","last"],(function(e,t){var n="take"+(t?"Right":"");qn.prototype[e]=function(){return this[n](1).value()[0]}})),gt(["initial","tail"],(function(e,t){var n="drop"+(t?"":"Right");qn.prototype[e]=function(){return this.__filtered__?new qn(this):this[n](1)}})),qn.prototype.compact=function(){return this.filter(al)},qn.prototype.find=function(e){return this.filter(e).head()},qn.prototype.findLast=function(e){return this.reverse().find(e)},qn.prototype.invokeMap=$r((function(e,t){return"function"==typeof e?new qn(this):this.map((function(n){return jr(n,e,t)}))})),qn.prototype.reject=function(e){return this.filter(As(si(e)))},qn.prototype.slice=function(e,t){e=ho(e);var n=this;return n.__filtered__&&(e>0||t<0)?new qn(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==a&&(n=(t=ho(t))<0?n.dropRight(-t):n.take(t-e)),n)},qn.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},qn.prototype.toArray=function(){return this.take(m)},gr(qn.prototype,(function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),r=/^(?:head|last)$/.test(t),i=Wn[r?"take"+("last"==t?"Right":""):t],s=r||/^find/.test(t);i&&(Wn.prototype[t]=function(){var t=this.__wrapped__,o=r?[1]:arguments,l=t instanceof qn,u=o[0],d=l||Us(t),c=function(e){var t=i.apply(Wn,Dt([e],o));return r&&_?t[0]:t};d&&n&&"function"==typeof u&&1!=u.length&&(l=d=!1);var _=this.__chain__,m=!!this.__actions__.length,f=s&&!_,h=l&&!m;if(!s&&d){t=h?t:new qn(this);var p=e.apply(t,o);return p.__actions__.push({func:ms,args:[c],thisArg:a}),new Nn(p,_)}return f&&h?e.apply(this,o):(p=this.thru(c),f?r?p.value()[0]:p.value(
vendor: 2,311 bytes, line 12246
12246):p)})})),gt(["pop","push","shift","sort","splice","unshift"],(function(e){var t=Se[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);Wn.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var a=this.value();return t.apply(Us(a)?a:[],e)}return this[n]((function(n){return t.apply(Us(n)?n:[],e)}))}})),gr(qn.prototype,(function(e,t){var n=Wn[t];if(n){var r=n.name+"";Ee.call(xn,r)||(xn[r]=[]),xn[r].push({name:t,func:n})}})),xn[Ia(a,2).name]=[{name:"wrapper",func:a}],qn.prototype.clone=function(){var e=new qn(this.__wrapped__);return e.__actions__=Ta(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Ta(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Ta(this.__views__),e},qn.prototype.reverse=function(){if(this.__filtered__){var e=new qn(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},qn.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=Us(e),r=t<0,a=n?e.length:0,i=function(e,t,n){for(var r=-1,a=n.length;++r<a;){var i=n[r],s=i.size;switch(i.type){case"drop":e+=s;break;case"dropRight":t-=s;break;case"take":t=vn(t,e+s);break;case"takeRight":e=yn(e,t-s)}}return{start:e,end:t}}(0,a,this.__views__),s=i.start,o=i.end,l=o-s,u=r?o:s-1,d=this.__iteratees__,c=d.length,_=0,m=vn(l,this.__takeCount__);if(!n||!r&&a==l&&m==l)return _a(e,this.__actions__);var f=[];e:for(;l--&&_<m;){for(var h=-1,p=e[u+=t];++h<c;){var y=d[h],v=y.iteratee,g=y.type,M=v(p);if(2==g)p=M;else if(!M){if(1==g)continue e;break e}}f[_++]=p}return f},Wn.prototype.at=fs,Wn.prototype.chain=function(){return _s(this)},Wn.prototype.commit=function(){return new Nn(this.value(),this.__chain__)},Wn.prototype.next=function(){this.__values__===a&&(this.__values__=mo(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?a:this.__values__[this.__index__++]}},Wn.prototype.plant=function(e){for(var t,n=this;n instanceof zn;){var r=Wi(n);r.__index__=0,r.__values__=a,t?i.__wrapped__=r:t=r;var i=r;n=n.__wrapped__}return i.__wrapped__=e,t},Wn.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof qn){var t=e;return this.__actions__.length&&(t=new qn(this)),(t=t.reverse()).__actions__.push({func:ms,args:[es],thisArg:a}),new Nn(t,this.__chain__)}
vendor: 16,384 bytes, line 12246
12246return this.thru(es)},Wn.prototype.toJSON=Wn.prototype.valueOf=Wn.prototype.value=function(){return _a(this.__wrapped__,this.__actions__)},Wn.prototype.first=Wn.prototype.head,st&&(Wn.prototype[st]=function(){return this}),Wn}();it._=un,(r=function(){return un}.call(t,n,t,e))===a||(e.exports=r)}.call(this)},2786:function(e,t,n){!function(e){"use strict";e.defineLocale("af",{months:"Januarie_Februarie_Maart_April_Mei_Junie_Julie_Augustus_September_Oktober_November_Desember".split("_"),monthsShort:"Jan_Feb_Mrt_Apr_Mei_Jun_Jul_Aug_Sep_Okt_Nov_Des".split("_"),weekdays:"Sondag_Maandag_Dinsdag_Woensdag_Donderdag_Vrydag_Saterdag".split("_"),weekdaysShort:"Son_Maa_Din_Woe_Don_Vry_Sat".split("_"),weekdaysMin:"So_Ma_Di_Wo_Do_Vr_Sa".split("_"),meridiemParse:/vm|nm/i,isPM:function(e){return/^nm$/i.test(e)},meridiem:function(e,t,n){return e<12?n?"vm":"VM":n?"nm":"NM"},longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Vandag om] LT",nextDay:"[Môre om] LT",nextWeek:"dddd [om] LT",lastDay:"[Gister om] LT",lastWeek:"[Laas] dddd [om] LT",sameElse:"L"},relativeTime:{future:"oor %s",past:"%s gelede",s:"'n paar sekondes",ss:"%d sekondes",m:"'n minuut",mm:"%d minute",h:"'n uur",hh:"%d ure",d:"'n dag",dd:"%d dae",M:"'n maand",MM:"%d maande",y:"'n jaar",yy:"%d jaar"},dayOfMonthOrdinalParse:/\d{1,2}(ste|de)/,ordinal:function(e){return e+(1===e||8===e||e>=20?"ste":"de")},week:{dow:1,doy:4}})}(n(381))},4130:function(e,t,n){!function(e){"use strict";var t=function(e){return 0===e?0:1===e?1:2===e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5},n={s:["أقل من ثانية","ثانية واحدة",["ثانيتان","ثانيتين"],"%d ثوان","%d ثانية","%d ثانية"],m:["أقل من دقيقة","دقيقة واحدة",["دقيقتان","دقيقتين"],"%d دقائق","%d دقيقة","%d دقيقة"],h:["أقل من ساعة","ساعة واحدة",["ساعتان","ساعتين"],"%d ساعات","%d ساعة","%d ساعة"],d:["أقل من يوم","يوم واحد",["يومان","يومين"],"%d أيام","%d يومًا","%d يوم"],M:["أقل من شهر","شهر واحد",["شهران","شهرين"],"%d أشهر","%d شهرا","%d شهر"],y:["أقل من عام","عام واحد",["عامان","عامين"],"%d أعوام","%d عامًا","%d عام"]},r=function(e){return function(r,a,i,s){var o=t(r),l=n[e][t(r)];return 2===o&&(l=l[a?0:1]),l.replace(/%d/i,r)}},a=["جانفي","فيفري","مارس","أفريل","ماي","جوان","جويلية","أوت","سبتمبر","أكتوبر","نوفمبر","ديسمبر"];e.defineLocale("ar-dz",{months:a,monthsShort:a,weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"D/‏M/‏YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/ص|م/,isPM:function(e){return"م"===e},meridiem:function(e,t,n){return e<12?"ص":"م"},calendar:{sameDay:"[اليوم عند الساعة] LT",nextDay:"[غدًا عند الساعة] LT",nextWeek:"dddd [عند الساعة] LT",lastDay:"[أمس عند الساعة] LT",lastWeek:"dddd [عند الساعة] LT",sameElse:"L"},relativeTime:{future:"بعد %s",past:"منذ %s",s:r("s"),ss:r("s"),m:r("m"),mm:r("m"),h:r("h"),hh:r("h"),d:r("d"),dd:r("d"),M:r("M"),MM:r("M"),y:r("y"),yy:r("y")},postformat:function(e){return e.replace(/,/g,"،")},week:{dow:0,doy:4}})}(n(381))},6135:function(e,t,n){!function(e){"use strict";e.defineLocale("ar-kw",{months:"يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر".split("_"),monthsShort:"يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر".split("_"),weekdays:"الأحد_الإتنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"احد_اتنين_ثلاثاء_اربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[اليوم على الساعة] LT",nextDay:"[غدا على الساعة] LT",nextWeek:"dddd [على الساعة] LT",lastDay:"[أمس على الساعة] LT",lastWeek:"dddd [على الساعة] LT",sameElse:"L"},relativeTime:{future:"في %s",past:"منذ %s",s:"ثوان",ss:"%d ثانية",m:"دقيقة",mm:"%d دقائق",h:"ساعة",hh:"%d ساعات",d:"يوم",dd:"%d أيام",M:"شهر",MM:"%d أشهر",y:"سنة",yy:"%d سنوات"},week:{dow:0,doy:12}})}(n(381))},6440:function(e,t,n){!function(e){"use strict";var t={1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",0:"0"},n=function(e){return 0===e?0:1===e?1:2===e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5},r={s:["أقل من ثانية","ثانية واحدة",["ثانيتان","ثانيتين"],"%d ثوان","%d ثانية","%d ثانية"],m:["أقل من دقيقة","دقيقة واحدة",["دقيقتان","دقيقتين"],"%d دقائق","%d دقيقة","%d دقيقة"],h:["أقل من ساعة","ساعة واحدة",["ساعتان","ساعتين"],"%d ساعات","%d ساعة","%d ساعة"],d:["أقل من يوم","يوم واحد",["يومان","يومين"],"%d أيام","%d يومًا","%d يوم"],M:["أقل من شهر","شهر واحد",["شهران","شهرين"],"%d أشهر","%d شهرا","%d شهر"],y:["أقل من عام","عام واحد",["عامان","عامين"],"%d أعوام","%d عامًا","%d عام"]},a=function(e){return function(t,a,i,s){var o=n(t),l=r[e][n(t)];return 2===o&&(l=l[a?0:1]),l.replace(/%d/i,t)}},i=["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر"];e.defineLocale("ar-ly",{months:i,monthsShort:i,weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"D/‏M/‏YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/ص|م/,isPM:function(e){return"م"===e},meridiem:function(e,t,n){return e<12?"ص":"م"},calendar:{sameDay:"[اليوم عند الساعة] LT",nextDay:"[غدًا عند الساعة] LT",nextWeek:"dddd [عند الساعة] LT",lastDay:"[أمس عند الساعة] LT",lastWeek:"dddd [عند الساعة] LT",sameElse:"L"},relativeTime:{future:"بعد %s",past:"منذ %s",s:a("s"),ss:a("s"),m:a("m"),mm:a("m"),h:a("h"),hh:a("h"),d:a("d"),dd:a("d"),M:a("M"),MM:a("M"),y:a("y"),yy:a("y")},preparse:function(e){return e.replace(/،/g,",")},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]})).replace(/,/g,"،")},week:{dow:6,doy:12}})}(n(381))},7702:function(e,t,n){!function(e){"use strict";e.defineLocale("ar-ma",{months:"يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر".split("_"),monthsShort:"يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر".split("_"),weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"احد_اثنين_ثلاثاء_اربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[اليوم على الساعة] LT",nextDay:"[غدا على الساعة] LT",nextWeek:"dddd [على الساعة] LT",lastDay:"[أمس على الساعة] LT",lastWeek:"dddd [على الساعة] LT",sameElse:"L"},relativeTime:{future:"في %s",past:"منذ %s",s:"ثوان",ss:"%d ثانية",m:"دقيقة",mm:"%d دقائق",h:"ساعة",hh:"%d ساعات",d:"يوم",dd:"%d أيام",M:"شهر",MM:"%d أشهر",y:"سنة",yy:"%d سنوات"},week:{dow:1,doy:4}})}(n(381))},6040:function(e,t,n){!function(e){"use strict";var t={1:"١",2:"٢",3:"٣",4:"٤",5:"٥",6:"٦",7:"٧",8:"٨",9:"٩",0:"٠"},n={"١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","٠":"0"};e.defineLocale("ar-sa",{months:"يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),monthsShort:"يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/ص|م/,isPM:function(e){return"م"===e},meridiem:function(e,t,n){return e<12?"ص":"م"},calendar:{sameDay:"[اليوم على الساعة] LT",nextDay:"[غدا على الساعة] LT",nextWeek:"dddd [على الساعة] LT",lastDay:"[أمس على الساعة] LT",lastWeek:"dddd [على الساعة] LT",sameElse:"L"},relativeTime:{future:"في %s",past:"منذ %s",s:"ثوان",ss:"%d ثانية",m:"دقيقة",mm:"%d دقائق",h:"ساعة",hh:"%d ساعات",d:"يوم",dd:"%d أيام",M:"شهر",MM:"%d أشهر",y:"سنة",yy:"%d سنوات"},preparse:function(e){return e.replace(/[١٢٣٤٥٦٧٨٩٠]/g,(function(e){return n[e]})).replace(/،/g,",")},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]})).replace(/,/g,"،")},week:{dow:0,doy:6}})}(n(381))},7100:function(e,t,n){!function(e){"use strict";e.defineLocale("ar-tn",{months:"جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),monthsShort:"جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[اليوم على الساعة] LT",nextDay:"[غدا على الساعة] LT",nextWeek:"dddd [على الساعة] LT",lastDay:"[أمس على الساعة] LT",lastWeek:"dddd [على الساعة] LT",sameElse:"L"},relativeTime:{future:"في %s",past:"منذ %s",s:"ثوان",ss:"%d ثانية",m:"دقيقة",mm:"%d دقائق",h:"ساعة",hh:"%d ساعات",d:"يوم",dd:"%d أيام",M:"شهر",MM:"%d أشهر",y:"سنة",yy:"%d سنوات"},week:{dow:1,doy:4}})}(n(381))},867:function(e,t,n){!function(e){"use strict";var t={1:"١",2:"٢",3:"٣",4:"٤",5:"٥",6:"٦",7:"٧",8:"٨",9:"٩",0:"٠"},n={"١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","٠":"0"},r=function(e){return 0===e?0:1===e?1:2===e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5},a={s:["أقل من ثانية","ثانية واحدة",["ثانيتان","ثانيتين"],"%d ثوان","%d ثانية","%d ثانية"],m:["أقل من دقيقة","دقيقة واحدة",["دقيقتان","دقيقتين"],"%d دقائق","%d دقيقة","%d دقيقة"],h:["أقل من ساعة","ساعة واحدة",["ساعتان","ساعتين"],"%d ساعات","%d ساعة","%d ساعة"],d:["أقل من يوم","يوم واحد",["يومان","يومين"],"%d أيام","%d يومًا","%d يوم"],M:["أقل من شهر","شهر واحد",["شهران","شهرين"],"%d أشهر","%d شهرا","%d شهر"],y:["أقل من عام","عام واحد",["عامان","عامين"],"%d أعوام","%d عامًا","%d عام"]},i=function(e){return function(t,n,i,s){var o=r(t),l=a[e][r(t)];return 2===o&&(l=l[n?0:1]),l.replace(/%d/i,t)}},s=["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر"];e.defineLocale("ar",{months:s,monthsShort:s,weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"D/‏M/‏YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/ص|م/,isPM:function(e){return"م"===e},meridiem:function(e,t,n){return e<12?"ص":"م"},calendar:{sameDay:"[اليوم عند الساعة] LT",nextDay:"[غدًا عند الساعة] LT",nextWeek:"dddd [عند الساعة] LT",lastDay:"[أمس عند الساعة] LT",lastWeek:"dddd [عند الساعة] LT",sameElse:"L"},relativeTime:{future:"بعد %s",past:"منذ %s",s:i("s"),ss:i("s"),m:i("m"),mm:i("m"),h:i("h"),hh:i("h"),d:i("d"),dd:i("d"),M:i("M"),MM:i("M"),y:i("y"),yy:i("y")},preparse:function(e){return e.replace(/[١٢٣٤٥٦٧٨٩٠]/g,(function(e){return n[e]})).replace(/،/g,",")},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]})).replace(/,/g,"،")},week:{dow:6,doy:12}})}(n(381))},1083:function(e,t,n){!function(e){"use strict";var t={1:"-inci",5:"-inci",8:"-inci",70:"-inci",80:"-inci",2:"-nci",7:"-nci",20:"-nci",50:"-nci",3:"-üncü",4:"-üncü",100:"-üncü",6:"-ncı",9:"-uncu",10:"-uncu",30:"-uncu",60:"-ıncı",90:"-ıncı"};e.defineLocale("az",{months:"yanvar_fevral_mart_aprel_may_iyun_iyul_avqust_sentyabr_oktyabr_noyabr_dekabr".split("_"),monthsShort:"yan_fev_mar_apr_may_iyn_iyl_avq_sen_okt_noy_dek".split("_"),weekdays:"Bazar_Bazar ertəsi_Çərşənbə axşamı_Çərşənbə_Cümə axşamı_Cümə_Şənbə".split("_"),weekdaysShort:"Baz_BzE_ÇAx_Çər_CAx_Cüm_Şən".split("_"),weekdaysMin:"Bz_BE_ÇA_Çə_CA_Cü_Şə".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[bugün saat] LT",nextDay:"[sabah saat] LT",nextWeek:"[gələn həftə] dddd [saat] LT",lastDay:"[dünən] LT",lastWeek:"[keçən həftə] dddd [saat] LT",sameElse:"L"},relativeTime:{future:"%s sonra",past:"%s əvvəl",s:"bir neçə saniyə",ss:"%d saniyə",m:"bir dəqiqə",mm:"%d dəqiqə",h:"bir saat",hh:"%d saat",d:"bir gün",dd:"%d gün",M:"bir ay",MM:"%d ay",y:"bir il",yy:"%d il"},meridiemParse:/gecə|səhər|gündüz|axşam/,isPM:function(e){return/^(gündüz|axşam)$/.test(e)},meridiem:function(e,t,n){return e<4?"gecə":e<12?"səhər":e<17?"gündüz":"axşam"},dayOfMonthOrdinalParse:/\d{1,2}-(ıncı|inci|nci|üncü|ncı|uncu)/,ordinal:function(e){if(0===e)return e+"-ıncı";var n=e%10;return e+(t[n]||t[e%100-n]||t[e>=100?100:null])},week:{dow:1,doy:7}})}(n(381))},9808:function(e,t,n){!function(e){"use strict";function t(e,t,n){return"m"===n?t?"хвіліна":"хвіліну":"h"===n?t?"гадзіна":"гадзіну":e+" "+(r=+e,a={ss:t?"секунда_секунды_секунд":"секунду_секунды_секунд",mm:t?"хвіліна_хвіліны_хвілін":"хвіліну_хвіліны_хвілін",hh:t?"гадзіна_гадзіны_гадзін":"гадзіну_гадзіны_гадзін",dd:"дзень_дні_дзён",MM:"месяц_месяцы_месяцаў",yy:"год_га
12246ды_гадоў"}[n].split("_"),r%10==1&&r%100!=11?a[0]:r%10>=2&&r%10<=4&&(r%100<10||r%100>=20)?a[1]:a[2]);var r,a}e.defineLocale("be",{months:{format:"студзеня_лютага_сакавіка_красавіка_траўня_чэрвеня_ліпеня_жніўня_верасня_кастрычніка_лістапада_снежня".split("_"),standalone:"студзень_люты_сакавік_красавік_травень_чэрвень_ліпень_жнівень_верасень_кастрычнік_лістапад_снежань".split("_")},monthsShort:"студ_лют_сак_крас_трав_чэрв_ліп_жнів_вер_каст_ліст_снеж".split("_"),weekdays:{format:"нядзелю_панядзелак_аўторак_сераду_чацвер_пятніцу_суботу".split("_"),standalone:"нядзеля_панядзелак_аўторак_серада_чацвер_пятніца_субота".split("_"),isFormat:/\[ ?[Ууў] ?(?:мінулую|наступную)? ?\] ?dddd/},weekdaysShort:"нд_пн_ат_ср_чц_пт_сб".split("_"),weekdaysMin:"нд_пн_ат_ср_чц_пт_сб".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY г.",LLL:"D MMMM YYYY г., HH:mm",LLLL:"dddd, D MMMM YYYY г., HH:mm"},calendar:{sameDay:"[Сёння ў] LT",nextDay:"[Заўтра ў] LT",lastDay:"[Учора ў] LT",nextWeek:function(){return"[У] dddd [ў] LT"},lastWeek:function(){switch(this.day()){case 0:case 3:case 5:case 6:return"[У мінулую] dddd [ў] LT";case 1:case 2:case 4:return"[У мінулы] dddd [ў] LT"}},sameElse:"L"},relativeTime:{future:"праз %s",past:"%s таму",s:"некалькі секунд",m:t,mm:t,h:t,hh:t,d:"дзень",dd:t,M:"месяц",MM:t,y:"год",yy:t},meridiemParse:/ночы|раніцы|дня|вечара/,isPM:function(e){return/^(дня|вечара)$/.test(e)},meridiem:function(e,t,n){return e<4?"ночы":e<12?"раніцы":e<17?"дня":"вечара"},dayOfMonthOrdinalParse:/\d{1,2}-(і|ы|га)/,ordinal:function(e,t){switch(t){case"M":case"d":case"DDD":case"w":case"W":return e%10!=2&&e%10!=3||e%100==12||e%100==13?e+"-ы":e+"-і";case"D":return e+"-га";default:return e}},week:{dow:1,doy:7}})}(n(381))},8338:function(e,t,n){!function(e){"use strict";e.defineLocale("bg",{months:"януари_февруари_март_април_май_юни_юли_август_септември_октомври_ноември_декември".split("_"),monthsShort:"яну_фев_мар_апр_май_юни_юли_авг_сеп_окт_ное_дек".split("_"),weekdays:"неделя_понеделник_вторник_сряда_четвъртък_петък_събота".split("_"),weekdaysShort:"нед_пон_вто_сря_чет_пет_съб".split("_"),weekdaysMin:"нд_пн_вт_ср_чт_пт_сб".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"D.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY H:mm",LLLL:"dddd, D MMMM YYYY H:mm"},calendar:{sameDay:"[Днес в] LT",nextDay:"[Утре в] LT",nextWeek:"dddd [в] LT",lastDay:"[Вчера в] LT",lastWeek:function(){switch(this.day()){case 0:case 3:case 6:return"[Миналата] dddd [в] LT";case 1:case 2:case 4:case 5:return"[Миналия] dddd [в] LT"}},sameElse:"L"},relativeTime:{future:"след %s",past:"преди %s",s:"няколко секунди",ss:"%d секунди",m:"минута",mm:"%d минути",h:"час",hh:"%d часа",d:"ден",dd:"%d дена",w:"седмица",ww:"%d седмици",M:"месец",MM:"%d месеца",y:"година",yy:"%d години"},dayOfMonthOrdinalParse:/\d{1,2}-(ев|ен|ти|ви|ри|ми)/,ordinal:function(e){var t=e%10,n=e%100;return 0===e?e+"-ев":0===n?e+"-ен":n>10&&n<20?e+"-ти":1===t?e+"-ви":2===t?e+"-ри":7===t||8===t?e+"-ми":e+"-ти"},week:{dow:1,doy:7}})}(n(381))},7438:function(e,t,n){!function(e){"use strict";e.defineLocale("bm",{months:"Zanwuyekalo_Fewuruyekalo_Marisikalo_Awirilikalo_Mɛkalo_Zuwɛnkalo_Zuluyekalo_Utikalo_Sɛtanburukalo_ɔkutɔburukalo_Nowanburukalo_Desanburukalo".split("_"),monthsShort:"Zan_Few_Mar_Awi_Mɛ_Zuw_Zul_Uti_Sɛt_ɔku_Now_Des".split("_"),weekdays:"Kari_Ntɛnɛn_Tarata_Araba_Alamisa_Juma_Sibiri".split("_"),weekdaysShort:"Kar_Ntɛ_Tar_Ara_Ala_Jum_Sib".split("_"),weekdaysMin:"Ka_Nt_Ta_Ar_Al_Ju_Si".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"MMMM [tile] D [san] YYYY",LLL:"MMMM [tile] D [san] YYYY [lɛrɛ] HH:mm",LLLL:"dddd MMMM [tile] D [san] YYYY [lɛrɛ] HH:mm"},calendar:{sameDay:"[Bi lɛrɛ] LT",nextDay:"[Sini lɛrɛ] LT",nextWeek:"dddd [don lɛrɛ] LT",lastDay:"[Kunu lɛrɛ] LT",lastWeek:"dddd [tɛmɛnen lɛrɛ] LT",sameElse:"L"},relativeTime:{future:"%s kɔnɔ",past:"a bɛ %s bɔ",s:"sanga dama dama",ss:"sekondi %d",m:"miniti kelen",mm:"miniti %d",h:"lɛrɛ kelen",hh:"lɛrɛ %d",d:"tile kelen",dd:"tile %d",M:"kalo kelen",MM:"kalo %d",y:"san kelen",yy:"san %d"},week:{dow:1,doy:4}})}(n(381))},6225:function(e,t,n){!function(e){"use strict";var t={1:"১",2:"২",3:"৩",4:"৪",5:"৫",6:"৬",7:"৭",8:"৮",9:"৯",0:"০"},n={"১":"1","২":"2","৩":"3","৪":"4","৫":"5","৬":"6","৭":"7","৮":"8","৯":"9","০":"0"};e.defineLocale("bn-bd",{months:"জানুয়ারি_ফেব্রুয়ারি_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্টেম্বর_অক্টোবর_নভেম্বর_ডিসেম্বর".split("_"),monthsShort:"জানু_ফেব্রু_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্ট_অক্টো_নভে_ডিসে".split("_"),weekdays:"রবিবার_সোমবার_মঙ্গলবার_বুধবার_বৃহস্পতিবার_শুক্রবার_শনিবার".split("_"),weekdaysShort:"রবি_সোম_মঙ্গল_বুধ_বৃহস্পতি_শুক্র_শনি".split("_"),weekdaysMin:"রবি_সোম_মঙ্গল_বুধ_বৃহ_শুক্র_শনি".split("_"),longDateFormat:{LT:"A h:mm সময়",LTS:"A h:mm:ss সময়",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm সময়",LLLL:"dddd, D MMMM YYYY, A h:mm সময়"},calendar:{sameDay:"[আজ] LT",nextDay:"[আগামীকাল] LT",nextWeek:"dddd, LT",lastDay:"[গতকাল] LT",lastWeek:"[গত] dddd, LT",sameElse:"L"},relativeTime:{future:"%s পরে",past:"%s আগে",s:"কয়েক সেকেন্ড",ss:"%d সেকেন্ড",m:"এক মিনিট",mm:"%d মিনিট",h:"এক ঘন্টা",hh:"%d ঘন্টা",d:"এক দিন",dd:"%d দিন",M:"এক মাস",MM:"%d মাস",y:"এক বছর",yy:"%d বছর"},preparse:function(e){return e.replace(/[১২৩৪৫৬৭৮৯০]/g,(function(e){return n[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},meridiemParse:/রাত|ভোর|সকাল|দুপুর|বিকাল|সন্ধ্যা|রাত/,meridiemHour:function(e,t){return 12===e&&(e=0),"রাত"===t?e<4?e:e+12:"ভোর"===t||"সকাল"===t?e:"দুপুর"
vendor: 4,651 bytes, line 12246
12246===t?e>=3?e:e+12:"বিকাল"===t||"সন্ধ্যা"===t?e+12:void 0},meridiem:function(e,t,n){return e<4?"রাত":e<6?"ভোর":e<12?"সকাল":e<15?"দুপুর":e<18?"বিকাল":e<20?"সন্ধ্যা":"রাত"},week:{dow:0,doy:6}})}(n(381))},8905:function(e,t,n){!function(e){"use strict";var t={1:"১",2:"২",3:"৩",4:"৪",5:"৫",6:"৬",7:"৭",8:"৮",9:"৯",0:"০"},n={"১":"1","২":"2","৩":"3","৪":"4","৫":"5","৬":"6","৭":"7","৮":"8","৯":"9","০":"0"};e.defineLocale("bn",{months:"জানুয়ারি_ফেব্রুয়ারি_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্টেম্বর_অক্টোবর_নভেম্বর_ডিসেম্বর".split("_"),monthsShort:"জানু_ফেব্রু_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্ট_অক্টো_নভে_ডিসে".split("_"),weekdays:"রবিবার_সোমবার_মঙ্গলবার_বুধবার_বৃহস্পতিবার_শুক্রবার_শনিবার".split("_"),weekdaysShort:"রবি_সোম_মঙ্গল_বুধ_বৃহস্পতি_শুক্র_শনি".split("_"),weekdaysMin:"রবি_সোম_মঙ্গল_বুধ_বৃহ_শুক্র_শনি".split("_"),longDateFormat:{LT:"A h:mm সময়",LTS:"A h:mm:ss সময়",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm সময়",LLLL:"dddd, D MMMM YYYY, A h:mm সময়"},calendar:{sameDay:"[আজ] LT",nextDay:"[আগামীকাল] LT",nextWeek:"dddd, LT",lastDay:"[গতকাল] LT",lastWeek:"[গত] dddd, LT",sameElse:"L"},relativeTime:{future:"%s পরে",past:"%s আগে",s:"কয়েক সেকেন্ড",ss:"%d সেকেন্ড",m:"এক মিনিট",mm:"%d মিনিট",h:"এক ঘন্টা",hh:"%d ঘন্টা",d:"এক দিন",dd:"%d দিন",M:"এক মাস",MM:"%d মাস",y:"এক বছর",yy:"%d বছর"},preparse:function(e){return e.replace(/[১২৩৪৫৬৭৮৯০]/g,(function(e){return n[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},meridiemParse:/রাত|সকাল|দুপুর|বিকাল|রাত/,meridiemHour:function(e,t){return 12===e&&(e=0),"রাত"===t&&e>=4||"দুপুর"===t&&e<5||"বিকাল"===t?e+12:e},meridiem:function(e,t,n){return e<4?"রাত":e<10?"সকাল":e<17?"দুপুর":e<20?"বিকাল":"রাত"},week:{dow:0,doy:6}})}(n(381))},1560:function(e,t,n){!function(e){"use strict";var t={1:"༡",2:"༢",3:"༣",4:"༤",5:"༥",6:"༦",7:"༧",8:"༨",9:"༩",0:"༠"},n={"༡":"1","༢":"2","༣":"3","༤":"4","༥":"5","༦":"6","༧":"7","༨":"8","༩":"9","༠":"0"};e.defineLocale("bo",{months:"ཟླ་བ་དང་པོ_ཟླ་བ་གཉིས་པ_ཟླ་བ་གསུམ་པ_ཟླ་བ་བཞི་པ_ཟླ་བ་ལྔ་པ_ཟླ་བ་དྲུག་པ_ཟླ་བ་བདུན་པ_ཟླ་བ་བརྒྱད་པ_ཟླ་བ་དགུ་པ_ཟླ་བ་བཅུ་པ_ཟླ་བ་བཅུ་གཅིག་པ_ཟླ་བ་བཅུ་གཉིས་པ".split("_"),monthsShort:"ཟླ་1_ཟླ་2_ཟླ་3_ཟླ་4_ཟླ་5_ཟླ་6_ཟླ་7_ཟླ་8_ཟླ་9_ཟླ་10_ཟླ་11_ཟླ་12".split("_"),monthsShortRegex:/^(ཟླ་\d{1,2})/,monthsParseExact:!0,weekdays:"གཟའ་ཉི་མ་_གཟའ་ཟླ་བ་_གཟའ་མིག་དམར་_གཟའ་ལྷག་པ་_གཟའ་ཕུར་བུ_གཟའ་པ་སངས་_གཟའ་སྤེན་པ་".split("_"),weekdaysShort:"ཉི་མ་_ཟླ་བ་_མིག་དམར་_ལྷག་པ་_ཕུར་བུ_པ་སངས་_སྤེན་པ་".split("_"),weekdaysMin:"ཉི_ཟླ_མིག_ལྷག_ཕུར_སངས_སྤེན".split("_"),longDateFormat:{LT:"A h:mm",LTS:"A h:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm",LLLL:"dddd, D MMMM YYYY, A h:mm"},calendar:{sameDay:"[དི་རིང] LT",nextDay:"[སང་ཉིན] LT",nextWeek:"[བདུན་ཕྲག་རྗེས་མ], LT",lastDay:"[ཁ་སང] LT",lastWeek:"[བདུན་ཕྲག་མཐའ་མ] dddd, LT",sameElse:"L"},relativeTime:{future:"%s ལ་",past:"%s སྔན་ལ",s:"ལམ་སང",ss:"%d སྐར་ཆ།",m:"སྐར་མ་གཅིག",mm:"%d སྐར་མ",h:"ཆུ་ཚོད་གཅིག",hh:"%
12246d ཆུ་ཚོད",d:"ཉིན་གཅིག",dd:"%d ཉིན་",M:"ཟླ་བ་གཅིག",MM:"%d ཟླ་བ",y:"ལོ་གཅིག",yy:"%d ལོ"},preparse:function(e){return e.replace(/[༡༢༣༤༥༦༧༨༩༠]/g,(function(e){return n[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},meridiemParse:/མཚན་མོ|ཞོགས་ཀས|ཉིན་གུང|དགོང་དག|མཚན་མོ/,meridiemHour:function(e,t){return 12===e&&(e=0),"མཚན་མོ"===t&&e>=4||"ཉིན་གུང"===t&&e<5||"དགོང་དག"===t?e+12:e},meridiem:function(e,t,n){return e<4?"མཚན་མོ":e<10?"ཞོགས་ཀས":e<17?"ཉིན་གུང":e<20?"དགོང་དག":"མཚན་མོ"},week:{dow:0,doy:6}})}(n(381))},1278:function(e,t,n){!function(e){"use strict";function t(e,t,n){return e+" "+function(e,t){return 2===t?function(e){var t={m:"v",b:"v",d:"z"};return void 0===t[e.charAt(0)]?e:t[e.charAt(0)]+e.substring(1)}(e):e}({mm:"munutenn",MM:"miz",dd:"devezh"}[n],e)}function n(e){return e>9?n(e%10):e}var r=[/^gen/i,/^c[ʼ\']hwe/i,/^meu/i,/^ebr/i,/^mae/i,/^(mez|eve)/i,/^gou/i,/^eos/i,/^gwe/i,/^her/i,/^du/i,/^ker/i],a=/^(genver|c[ʼ\']hwevrer|meurzh|ebrel|mae|mezheven|gouere|eost|gwengolo|here|du|kerzu|gen|c[ʼ\']hwe|meu|ebr|mae|eve|gou|eos|gwe|her|du|ker)/i,i=[/^Su/i,/^Lu/i,/^Me([^r]|$)/i,/^Mer/i,/^Ya/i,/^Gw/i,/^Sa/i];e.defineLocale("br",{months:"Genver_Cʼhwevrer_Meurzh_Ebrel_Mae_Mezheven_Gouere_Eost_Gwengolo_Here_Du_Kerzu".split("_"),monthsShort:"Gen_Cʼhwe_Meu_Ebr_Mae_Eve_Gou_Eos_Gwe_Her_Du_Ker".split("_"),weekdays:"Sul_Lun_Meurzh_Mercʼher_Yaou_Gwener_Sadorn".split("_"),weekdaysShort:"Sul_Lun_Meu_Mer_Yao_Gwe_Sad".split("_"),weekdaysMin:"Su_Lu_Me_Mer_Ya_Gw_Sa".split("_"),weekdaysParse:i,fullWeekdaysParse:[/^sul/i,/^lun/i,/^meurzh/i,/^merc[ʼ\']her/i,/^yaou/i,/^gwener/i,/^sadorn/i],shortWeekdaysParse:[/^Sul/i,/^Lun/i,/^Meu/i,/^Mer/i,/^Yao/i,/^Gwe/i,/^Sad/i],minWeekdaysParse:i,monthsRegex:a,monthsShortRegex:a,monthsStrictRegex:/^(genver|c[ʼ\']hwevrer|meurzh|ebrel|mae|mezheven|gouere|eost|gwengolo|here|du|kerzu)/i,monthsShortStrictRegex:/^(gen|c[ʼ\']hwe|meu|ebr|mae|eve|gou|eos|gwe|her|du|ker)/i,monthsParse:r,longMonthsParse:r,shortMonthsParse:r,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [a viz] MMMM YYYY",LLL:"D [a viz] MMMM YYYY HH:mm",LLLL:"dddd, D [a viz] MMMM YYYY HH:mm"},calendar:{sameDay:"[Hiziv da] LT",nextDay:"[Warcʼhoazh da] LT",nextWeek:"dddd [da] LT",lastDay:"[Decʼh da] LT",lastWeek:"dddd [paset da] LT",sameElse:"L"},relativeTime:{future:"a-benn %s",past:"%s ʼzo",s:"un nebeud segondennoù",ss:"%d eilenn",m:"ur vunutenn",mm:t,h:"un eur",hh:"%d eur",d:"un devezh",dd:t,M:"ur miz",MM:t,y:"ur bloaz",yy:function(e){switch(n(e)){case 1:case 3:case 4:case 5:case 9:return e+" bloaz";default:return e+" vloaz"}}},dayOfMonthOrdinalParse:/\d{1,2}(añ|vet)/,ordinal:function(e){return e+(1===e?"añ":"vet")},week:{dow:1,doy:4},meridiemParse:/a.m.|g.m./,isPM:function(e){return"g.m."===e},meridiem:function(e,t,n){return e<12?"a.m.":"g.m."}})}(n(381))},622:function(e,t,n){!function(e){"use strict";function t(e,t,n){var r=e+" ";switch(n){case"ss":return r+(1===e?"sekunda":2===e||3===e||4===e?"sekunde":"sekundi");case"m":return t?"jedna minuta":"jedne minute";case"mm":return r+(1===e?"minuta":2===e||3===e||4===e?"minute":"minuta");case"h":return t?"jedan sat":"jednog sata";case"hh":return r+(1===e?"sat":2===e||3===e||4===e?"sata":"sati");case"dd":return r+(1===e?"dan":"dana");case"MM":return r+(1===e?"mjesec":2===e||3===e||4===e?"mjeseca":"mjeseci");case"yy":return r+(1===e?"godina":2===e||3===e||4===e?"godine":"godina")}}e.defineLocale("bs",{months:"januar_februar_mart_april_maj_juni_juli_august_septembar_oktobar_novembar_decembar".split("_"),monthsShort:"jan._feb._mar._apr._maj._jun._jul._aug._sep._okt._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sri._čet._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_če_pe_su".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[danas u] LT",nextDay:"[sutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedjelju] [u] LT";case 3:return"[u] [srijedu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[jučer u] LT",lastWeek:function(){switch(this.day()){case 0:case 3:return"[prošlu] dddd [u] LT";case 6:return"[prošle] [subote] [u] LT";case 1:case 2:case 4:case 5:return"[prošli] dddd [u] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"prije %s",s:"par sekundi",ss:t,m:t,mm:t,h:t,hh:t,d:"dan",dd:t,M:"mjesec",MM:t,y:"godinu",yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}})}(n(381))},2468:function(e,t,n){!function(e){"use strict";e.defineLocale("ca",{months:{standalone:"gener_febrer_març_abril_maig_juny_juliol_agost_setembre_octubre_novembre_desembre".split("_"),format:"de gener_de febrer_de març_d'abril_de maig_de juny_de juliol_d'agost_de setembre_d'octubre_de novembre_de desembre".split("_"),isFormat:/D[oD]?(\s)+MMMM/},monthsShort:"gen._febr._març_abr._maig_juny_jul._ag._set._oct._nov._des.".split("_"),monthsParseExact:!0,weekdays:"diumenge_dilluns_dimarts_dimecres_dijous_divendres_dissabte".split("_"),weekdaysShort:"dg._dl._dt._dc._dj._dv._ds.".split("_"),weekdaysMin:"dg_dl_dt_dc_dj_dv_ds".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM [de] YYYY",ll:"D MMM YYYY",LLL:"D MMMM [de] YYYY [a les] H:mm",lll:"D MMM YYYY, H:mm",LLLL:"dddd D MMMM [de] YYYY [a les] H:mm",llll:"ddd D MMM YYYY, H:mm"},calendar:{sameDay:function(){return"[avui a "+(1!==this.hours()?"les":"la")+"] LT"},nextDay:function(){return"[demà a "+(1!==this.hours()?"les":"la")+"] LT"},nextWeek:function(){return"dddd [a "+(1!==this.hours()?"les":"la")+"] LT"},lastDay:function(){return"[ahir a "+(1!==this.hours()?"les":"la")+"] LT"},lastWeek:function(){return"[el] dddd [passat a "+(1!==this.hours()?"les":"la")+"] LT"},sameElse:"L"},relativeTime:{future:"d'aquí %s",past:"fa %s",s:"uns segons",ss:"%d segons",m:"un minut",mm:"%d minuts",h:"una hora",hh:"%
12246d hores",d:"un dia",dd:"%d dies",M:"un mes",MM:"%d mesos",y:"un any",yy:"%d anys"},dayOfMonthOrdinalParse:/\d{1,2}(r|n|t|è|a)/,ordinal:function(e,t){var n=1===e?"r":2===e?"n":3===e?"r":4===e?"t":"è";return"w"!==t&&"W"!==t||(n="a"),e+n},week:{dow:1,doy:4}})}(n(381))},5822:function(e,t,n){!function(e){"use strict";var t={format:"leden_únor_březen_duben_květen_červen_červenec_srpen_září_říjen_listopad_prosinec".split("_"),standalone:"ledna_února_března_dubna_května_června_července_srpna_září_října_listopadu_prosince".split("_")},n="led_úno_bře_dub_kvě_čvn_čvc_srp_zář_říj_lis_pro".split("_"),r=[/^led/i,/^úno/i,/^bře/i,/^dub/i,/^kvě/i,/^(čvn|červen$|června)/i,/^(čvc|červenec|července)/i,/^srp/i,/^zář/i,/^říj/i,/^lis/i,/^pro/i],a=/^(leden|únor|březen|duben|květen|červenec|července|červen|června|srpen|září|říjen|listopad|prosinec|led|úno|bře|dub|kvě|čvn|čvc|srp|zář|říj|lis|pro)/i;function i(e){return e>1&&e<5&&1!=~~(e/10)}function s(e,t,n,r){var a=e+" ";switch(n){case"s":return t||r?"pár sekund":"pár sekundami";case"ss":return t||r?a+(i(e)?"sekundy":"sekund"):a+"sekundami";case"m":return t?"minuta":r?"minutu":"minutou";case"mm":return t||r?a+(i(e)?"minuty":"minut"):a+"minutami";case"h":return t?"hodina":r?"hodinu":"hodinou";case"hh":return t||r?a+(i(e)?"hodiny":"hodin"):a+"hodinami";case"d":return t||r?"den":"dnem";case"dd":return t||r?a+(i(e)?"dny":"dní"):a+"dny";case"M":return t||r?"měsíc":"měsícem";case"MM":return t||r?a+(i(e)?"měsíce":"měsíců"):a+"měsíci";case"y":return t||r?"rok":"rokem";case"yy":return t||r?a+(i(e)?"roky":"let"):a+"lety"}}e.defineLocale("cs",{months:t,monthsShort:n,monthsRegex:a,monthsShortRegex:a,monthsStrictRegex:/^(leden|ledna|února|únor|březen|března|duben|dubna|květen|května|červenec|července|červen|června|srpen|srpna|září|říjen|října|listopadu|listopad|prosinec|prosince)/i,monthsShortStrictRegex:/^(led|úno|bře|dub|kvě|čvn|čvc|srp|zář|říj|lis|pro)/i,monthsParse:r,longMonthsParse:r,shortMonthsParse:r,weekdays:"neděle_pondělí_úterý_středa_čtvrtek_pátek_sobota".split("_"),weekdaysShort:"ne_po_út_st_čt_pá_so".split("_"),weekdaysMin:"ne_po_út_st_čt_pá_so".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd D. MMMM YYYY H:mm",l:"D. M. YYYY"},calendar:{sameDay:"[dnes v] LT",nextDay:"[zítra v] LT",nextWeek:function(){switch(this.day()){case 0:return"[v neděli v] LT";case 1:case 2:return"[v] dddd [v] LT";case 3:return"[ve středu v] LT";case 4:return"[ve čtvrtek v] LT";case 5:return"[v pátek v] LT";case 6:return"[v sobotu v] LT"}},lastDay:"[včera v] LT",lastWeek:function(){switch(this.day()){case 0:return"[minulou neděli v] LT";case 1:case 2:return"[minulé] dddd [v] LT";case 3:return"[minulou středu v] LT";case 4:case 5:return"[minulý] dddd [v] LT";case 6:return"[minulou sobotu v] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"před %s",s:s,ss:s,m:s,mm:s,h:s,hh:s,d:s,dd:s,M:s,MM:s,y:s,yy:s},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(381))},877:function(e,t,n){!function(e){"use strict";e.defineLocale("cv",{months:"кӑрлач_нарӑс_пуш_ака_май_ҫӗртме_утӑ_ҫурла_авӑн_юпа_чӳк_раштав".split("_"),monthsShort:"кӑр_нар_пуш_ака_май_ҫӗр_утӑ_ҫур_авн_юпа_чӳк_раш".split("_"),weekdays:"вырсарникун_тунтикун_ытларикун_юнкун_кӗҫнерникун_эрнекун_шӑматкун".split("_"),weekdaysShort:"выр_тун_ытл_юн_кӗҫ_эрн_шӑм".split("_"),weekdaysMin:"вр_тн_ыт_юн_кҫ_эр_шм".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD-MM-YYYY",LL:"YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ]",LLL:"YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm",LLLL:"dddd, YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm"},calendar:{sameDay:"[Паян] LT [сехетре]",nextDay:"[Ыран] LT [сехетре]",lastDay:"[Ӗнер] LT [сехетре]",nextWeek:"[Ҫитес] dddd LT [сехетре]",lastWeek:"[Иртнӗ] dddd LT [сехетре]",sameElse:"L"},relativeTime:{future:function(e){return e+(/сехет$/i.exec(e)?"рен":/ҫул$/i.exec(e)?"тан":"ран")},past:"%s каялла",s:"пӗр-ик ҫеккунт",ss:"%d ҫеккунт",m:"пӗр минут",mm:"%d минут",h:"пӗр сехет",hh:"%
12246d сехет",d:"пӗр кун",dd:"%d кун",M:"пӗр уйӑх",MM:"%d уйӑх",y:"пӗр ҫул",yy:"%d ҫул"},dayOfMonthOrdinalParse:/\d{1,2}-мӗш/,ordinal:"%d-мӗш",week:{dow:1,doy:7}})}(n(381))},7373:function(e,t,n){!function(e){"use strict";e.defineLocale("cy",{months:"Ionawr_Chwefror_Mawrth_Ebrill_Mai_Mehefin_Gorffennaf_Awst_Medi_Hydref_Tachwedd_Rhagfyr".split("_"),monthsShort:"Ion_Chwe_Maw_Ebr_Mai_Meh_Gor_Aws_Med_Hyd_Tach_Rhag".split("_"),weekdays:"Dydd Sul_Dydd Llun_Dydd Mawrth_Dydd Mercher_Dydd Iau_Dydd Gwener_Dydd Sadwrn".split("_"),weekdaysShort:"Sul_Llun_Maw_Mer_Iau_Gwe_Sad".split("_"),weekdaysMin:"Su_Ll_Ma_Me_Ia_Gw_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Heddiw am] LT",nextDay:"[Yfory am] LT",nextWeek:"dddd [am] LT",lastDay:"[Ddoe am] LT",lastWeek:"dddd [diwethaf am] LT",sameElse:"L"},relativeTime:{future:"mewn %s",past:"%s yn ôl",s:"ychydig eiliadau",ss:"%d eiliad",m:"munud",mm:"%d munud",h:"awr",hh:"%d awr",d:"diwrnod",dd:"%d diwrnod",M:"mis",MM:"%d mis",y:"blwyddyn",yy:"%d flynedd"},dayOfMonthOrdinalParse:/\d{1,2}(fed|ain|af|il|ydd|ed|eg)/,ordinal:function(e){var t="";return e>20?t=40===e||50===e||60===e||80===e||100===e?"fed":"ain":e>0&&(t=["","af","il","ydd","ydd","ed","ed","ed","fed","fed","fed","eg","fed","eg","eg","fed","eg","eg","fed","eg","fed"][e]),e+t},week:{dow:1,doy:4}})}(n(381))},4780:function(e,t,n){!function(e){"use strict";e.defineLocale("da",{months:"januar_februar_marts_april_maj_juni_juli_august_september_oktober_november_december".split("_"),monthsShort:"jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec".split("_"),weekdays:"søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag".split("_"),weekdaysShort:"søn_man_tir_ons_tor_fre_lør".split("_"),weekdaysMin:"sø_ma_ti_on_to_fr_lø".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd [d.] D. MMMM YYYY [kl.] HH:mm"},calendar:{sameDay:"[i dag kl.] LT",nextDay:"[i morgen kl.] LT",nextWeek:"på dddd [kl.] LT",lastDay:"[i går kl.] LT",lastWeek:"[i] dddd[s kl.] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"%s siden",s:"få sekunder",ss:"%d sekunder",m:"et minut",mm:"%d minutter",h:"en time",hh:"%d timer",d:"en dag",dd:"%d dage",M:"en måned",MM:"%d måneder",y:"et år",yy:"%d år"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(381))},217:function(e,t,n){!function(e){"use strict";function t(e,t,n,r){var a={m:["eine Minute","einer Minute"],h:["eine Stunde","einer Stunde"],d:["ein Tag","einem Tag"],dd:[e+" Tage",e+" Tagen"],w:["eine Woche","einer Woche"],M:["ein Monat","einem Monat"],MM:[e+" Monate",e+" Monaten"],y:["ein Jahr","einem Jahr"],yy:[e+" Jahre",e+" Jahren"]};return t?a[n][0]:a[n][1]}e.defineLocale("de-at",{months:"Jänner_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jän._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So._Mo._Di._Mi._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd, D. MMMM YYYY HH:mm"},calendar:{sameDay:"[heute um] LT [Uhr]",sameElse:"L",nextDay:"[morgen um] LT [Uhr]",nextWeek:"dddd [um] LT [Uhr]",lastDay:"[gestern um] LT [Uhr]",lastWeek:"[letzten] dddd [um] LT [Uhr]"},relativeTime:{future:"in %s",past:"vor %s",s:"ein paar Sekunden",ss:"%d Sekunden",m:t,mm:"%d Minuten",h:t,hh:"%d Stunden",d:t,dd:t,w:t,ww:"%d Wochen",M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(381))},894:function(e,t,n){!function(e){"use strict";function t(e,t,n,r){var a={m:["eine Minute","einer Minute"],h:["eine Stunde","einer Stunde"],d:["ein Tag","einem Tag"],dd:[e+" Tage",e+" Tagen"],w:["eine Woche","einer Woche"],M:["ein Monat","einem Monat"],MM:[e+" Monate",e+" Monaten"],y:["ein Jahr","einem Jahr"],yy:[e+" Jahre",e+" Jahren"]};return t?a[n][0]:a[n][1]}e.defineLocale("de-ch",{months:"Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd, D. MMMM YYYY HH:mm"},calendar:{sameDay:"[heute um] LT [Uhr]",sameElse:"L",nextDay:"[morgen um] LT [Uhr]",nextWeek:"dddd [um] LT [Uhr]",lastDay:"[gestern um] LT [Uhr]",lastWeek:"[letzten] dddd [um] LT [Uhr]"},relativeTime:{future:"in %s",past:"vor %s",s:"ein paar Sekunden",ss:"%d Sekunden",m:t,mm:"%d Minuten",h:t,hh:"%
12246d Stunden",d:t,dd:t,w:t,ww:"%d Wochen",M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(381))},9740:function(e,t,n){!function(e){"use strict";function t(e,t,n,r){var a={m:["eine Minute","einer Minute"],h:["eine Stunde","einer Stunde"],d:["ein Tag","einem Tag"],dd:[e+" Tage",e+" Tagen"],w:["eine Woche","einer Woche"],M:["ein Monat","einem Monat"],MM:[e+" Monate",e+" Monaten"],y:["ein Jahr","einem Jahr"],yy:[e+" Jahre",e+" Jahren"]};return t?a[n][0]:a[n][1]}e.defineLocale("de",{months:"Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So._Mo._Di._Mi._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd, D. MMMM YYYY HH:mm"},calendar:{sameDay:"[heute um] LT [Uhr]",sameElse:"L",nextDay:"[morgen um] LT [Uhr]",nextWeek:"dddd [um] LT [Uhr]",lastDay:"[gestern um] LT [Uhr]",lastWeek:"[letzten] dddd [um] LT [Uhr]"},relativeTime:{future:"in %s",past:"vor %s",s:"ein paar Sekunden",ss:"%d Sekunden",m:t,mm:"%d Minuten",h:t,hh:"%d Stunden",d:t,dd:t,w:t,ww:"%d Wochen",M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(381))},5300:function(e,t,n){!function(e){"use strict";var t=["ޖެނުއަރީ","ފެބްރުއަރީ","މާރިޗު","އޭޕްރީލު","މޭ","ޖޫން","ޖުލައި","އޯގަސްޓު","ސެޕްޓެމްބަރު","އޮކްޓޯބަރު","ނޮވެމްބަރު","ޑިސެމްބަރު"],n=["އާދިއްތަ","ހޯމަ","އަންގާރަ","ބުދަ","ބުރާސްފަތި","ހުކުރު","ހޮނިހިރު"];e.defineLocale("dv",{months:t,monthsShort:t,weekdays:n,weekdaysShort:n,weekdaysMin:"އާދި_ހޯމަ_އަން_ބުދަ_ބުރާ_ހުކު_ހޮނި".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"D/M/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/މކ|މފ/,isPM:function(e){return"މފ"===e},meridiem:function(e,t,n){return e<12?"މކ":"މފ"},calendar:{sameDay:"[މިއަދު] LT",nextDay:"[މާދަމާ] LT",nextWeek:"dddd LT",lastDay:"[އިއްޔެ] LT",lastWeek:"[ފާއިތުވި] dddd LT",sameElse:"L"},relativeTime:{future:"ތެރޭގައި %s",past:"ކުރިން %s",s:"ސިކުންތުކޮޅެއް",ss:"d% ސިކުންތު",m:"މިނިޓެއް",mm:"މިނިޓު %d",h:"ގަޑިއިރެއް",hh:"ގަޑިއިރު %d",d:"ދުވަހެއް",dd:"ދުވަސް %d",M:"މަހެއް",MM:"މަސް %d",y:"އަހަރެއް",yy:"އަހަރު %d"},preparse:function(e){return e.replace(/،/g,",")},postformat:function(e){return e.replace(/,/g,"،")},week:{dow:7,doy:12}})}(n(381))},837:function(e,t,n){!function(e){"use strict";e.defineLocale("el",{monthsNominativeEl:"Ιανουάριος_Φεβρουάριος_Μάρτιος_Απρίλιος_Μάιος_Ιούνιος_Ιούλιος_Αύγουστος_Σεπτέμβριος_Οκτώβριος_Νοέμβριος_Δεκέμβριος".split("_"),monthsGenitiveEl:"Ιανουαρίου_Φεβρουαρίου_Μαρτίου_Απριλίου_Μαΐου_Ιουνίου_Ιουλίου_Αυγούστου_Σεπτεμβρίου_Οκτωβρίου_Νοεμβρίου_Δεκεμβρίου".split("_"),months:function(e,t){return e?"string"==typeof t&&/D/.test(t.substring(0,t.indexOf("MMMM")))?this._monthsGenitiveEl[e.month()]:this._monthsNominativeEl[e.month()]:this._monthsNominativeEl},monthsShort:"Ιαν_Φεβ_Μαρ_Απρ_Μαϊ_Ιουν_Ιουλ_Αυγ_Σεπ_Οκτ_Νοε_Δεκ".split("_"),weekdays:"Κυριακή_Δευτέρα_Τρίτη_Τετάρτη_Πέμπτη_Παρασκευή_Σάββατο".split("_"),weekdaysShort:"Κυρ_Δευ_Τρι_Τετ_Πεμ_Παρ_Σαβ".split("_"),weekdaysMin:"Κυ_Δε_Τρ_Τε_Πε_Πα_Σα".split("_"),meridiem:function(e,t,n){return e>11?n?"μμ":"ΜΜ":n?"πμ":"ΠΜ"},isPM:function(e){return"μ"===(e+"").toLowerCase()[0]},meridiemParse:/[ΠΜ]\.?Μ?\.?/i,longDateFormat:{LT:"h:mm A",LT
vendor: 6,990 bytes, line 12246
12246S:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendarEl:{sameDay:"[Σήμερα {}] LT",nextDay:"[Αύριο {}] LT",nextWeek:"dddd [{}] LT",lastDay:"[Χθες {}] LT",lastWeek:function(){return 6===this.day()?"[το προηγούμενο] dddd [{}] LT":"[την προηγούμενη] dddd [{}] LT"},sameElse:"L"},calendar:function(e,t){var n,r=this._calendarEl[e],a=t&&t.hours();return n=r,("undefined"!=typeof Function&&n instanceof Function||"[object Function]"===Object.prototype.toString.call(n))&&(r=r.apply(t)),r.replace("{}",a%12==1?"στη":"στις")},relativeTime:{future:"σε %s",past:"%s πριν",s:"λίγα δευτερόλεπτα",ss:"%d δευτερόλεπτα",m:"ένα λεπτό",mm:"%d λεπτά",h:"μία ώρα",hh:"%d ώρες",d:"μία μέρα",dd:"%d μέρες",M:"ένας μήνας",MM:"%d μήνες",y:"ένας χρόνος",yy:"%d χρόνια"},dayOfMonthOrdinalParse:/\d{1,2}η/,ordinal:"%dη",week:{dow:1,doy:4}})}(n(381))},8348:function(e,t,n){!function(e){"use strict";e.defineLocale("en-au",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")},week:{dow:0,doy:4}})}(n(381))},7925:function(e,t,n){!function(e){"use strict";e.defineLocale("en-ca",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"YYYY-MM-DD",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}})}(n(381))},2243:function(e,t,n){!function(e){"use strict";e.defineLocale("en-gb",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")},week:{dow:1,doy:4}})}(n(381))},6436:function(e,t,n){!function(e){"use strict";e.defineLocale("en-ie",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")},week:{dow:1,doy:4}})}(n(381))},7207:function(e,t,n){!function(e){"use strict";e.defineLocale("en-il",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}})}(n(381))},4175:function(e,t,n){!function(e){"use strict";e.defineLocale("en-in",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",LT
vendor: 16,676 bytes, line 12246
12246S:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")},week:{dow:0,doy:6}})}(n(381))},6319:function(e,t,n){!function(e){"use strict";e.defineLocale("en-nz",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")},week:{dow:1,doy:4}})}(n(381))},1662:function(e,t,n){!function(e){"use strict";e.defineLocale("en-sg",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")},week:{dow:1,doy:4}})}(n(381))},2915:function(e,t,n){!function(e){"use strict";e.defineLocale("eo",{months:"januaro_februaro_marto_aprilo_majo_junio_julio_aŭgusto_septembro_oktobro_novembro_decembro".split("_"),monthsShort:"jan_feb_mart_apr_maj_jun_jul_aŭg_sept_okt_nov_dec".split("_"),weekdays:"dimanĉo_lundo_mardo_merkredo_ĵaŭdo_vendredo_sabato".split("_"),weekdaysShort:"dim_lun_mard_merk_ĵaŭ_ven_sab".split("_"),weekdaysMin:"di_lu_ma_me_ĵa_ve_sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"[la] D[-an de] MMMM, YYYY",LLL:"[la] D[-an de] MMMM, YYYY HH:mm",LLLL:"dddd[n], [la] D[-an de] MMMM, YYYY HH:mm",llll:"ddd, [la] D[-an de] MMM, YYYY HH:mm"},meridiemParse:/[ap]\.t\.m/i,isPM:function(e){return"p"===e.charAt(0).toLowerCase()},meridiem:function(e,t,n){return e>11?n?"p.t.m.":"P.T.M.":n?"a.t.m.":"A.T.M."},calendar:{sameDay:"[Hodiaŭ je] LT",nextDay:"[Morgaŭ je] LT",nextWeek:"dddd[n je] LT",lastDay:"[Hieraŭ je] LT",lastWeek:"[pasintan] dddd[n je] LT",sameElse:"L"},relativeTime:{future:"post %s",past:"antaŭ %s",s:"kelkaj sekundoj",ss:"%d sekundoj",m:"unu minuto",mm:"%d minutoj",h:"unu horo",hh:"%d horoj",d:"unu tago",dd:"%d tagoj",M:"unu monato",MM:"%d monatoj",y:"unu jaro",yy:"%d jaroj"},dayOfMonthOrdinalParse:/\d{1,2}a/,ordinal:"%da",week:{dow:1,doy:7}})}(n(381))},5251:function(e,t,n){!function(e){"use strict";var t="ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.".split("_"),n="ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),r=[/^ene/i,/^feb/i,/^mar/i,/^abr/i,/^may/i,/^jun/i,/^jul/i,/^ago/i,/^sep/i,/^oct/i,/^nov/i,/^dic/i],a=/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i;e.defineLocale("es-do",{months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),monthsShort:function(e,r){return e?/-MMM-/.test(r)?n[e.month()]:t[e.month()]:t},monthsRegex:a,monthsShortRegex:a,monthsStrictRegex:/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,monthsShortStrictRegex:/^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,monthsParse:r,longMonthsParse:r,shortMonthsParse:r,weekdays:"domingo_lunes_martes_miércoles_jueves_viernes_sábado".split("_"),weekdaysShort:"dom._lun._mar._mié._jue._vie._sáb.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY h:mm A",LLLL:"dddd, D [de] MMMM [de] YYYY h:mm A"},calendar:{sameDay:function(){return"[hoy a la"+(1!==this.hours()?"s":"")+"] LT"},nextDay:function(){return"[mañana a la"+(1!==this.hours()?"s":"")+"] LT"},nextWeek:function(){return"dddd [a la"+(1!==this.hours()?"s":"")+"] LT"},lastDay:function(){return"[ayer a la"+(1!==this.hours()?"s":"")+"] LT"},lastWeek:function(){return"[el] dddd [pasado a la"+(1!==this.hours()?"s":"")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",ss:"%d segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un día",dd:"%d días",w:"una semana",ww:"%d semanas",M:"un mes",MM:"%d meses",y:"un año",yy:"%d años"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}})}(n(381))},6112:function(e,t,n){!function(e){"use strict";var t="ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.".split("_"),n="ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),r=[/^ene/i,/^feb/i,/^mar/i,/^abr/i,/^may/i,/^jun/i,/^jul/i,/^ago/i,/^sep/i,/^oct/i,/^nov/i,/^dic/i],a=/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i;e.defineLocale("es-mx",{months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),monthsShort:function(e,r){return e?/-MMM-/.test(r)?n[e.month()]:t[e.month()]:t},monthsRegex:a,monthsShortRegex:a,monthsStrictRegex:/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,monthsShortStrictRegex:/^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,monthsParse:r,longMonthsParse:r,shortMonthsParse:r,weekdays:"domingo_lunes_martes_miércoles_jueves_viernes_sábado".split("_"),weekdaysShort:"dom._lun._mar._mié._jue._vie._sáb.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY H:mm",LLLL:"dddd, D [de] MMMM [de] YYYY H:mm"},calendar:{sameDay:function(){return"[hoy a la"+(1!==this.hours()?"s":"")+"] LT"},nextDay:function(){return"[mañana a la"+(1!==this.hours()?"s":"")+"] LT"},nextWeek:function(){return"dddd [a la"+(1!==this.hours()?"s":"")+"] LT"},lastDay:function(){return"[ayer a la"+(1!==this.hours()?"s":"")+"] LT"},lastWeek:function(){return"[el] dddd [pasado a la"+(1!==this.hours()?"s":"")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",ss:"%d segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un día",dd:"%d días",w:"una semana",ww:"%d semanas",M:"un mes",MM:"%d meses",y:"un año",yy:"%d años"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:0,doy:4},invalidDate:"Fecha inválida"})}(n(381))},1146:function(e,t,n){!function(e){"use strict";var t="ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.".split("_"),n="ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),r=[/^ene/i,/^feb/i,/^mar/i,/^abr/i,/^may/i,/^jun/i,/^jul/i,/^ago/i,/^sep/i,/^oct/i,/^nov/i,/^dic/i],a=/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i;e.defineLocale("es-us",{months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),monthsShort:function(e,r){return e?/-MMM-/.test(r)?n[e.month()]:t[e.month()]:t},monthsRegex:a,monthsShortRegex:a,monthsStrictRegex:/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,monthsShortStrictRegex:/^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,monthsParse:r,longMonthsParse:r,shortMonthsParse:r,weekdays:"domingo_lunes_martes_miércoles_jueves_viernes_sábado".split("_"),weekdaysShort:"dom._lun._mar._mié._jue._vie._sáb.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"MM/DD/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY h:mm A",LLLL:"dddd, D [de] MMMM [de] YYYY h:mm A"},calendar:{sameDay:function(){return"[hoy a la"+(1!==this.hours()?"s":"")+"] LT"},nextDay:function(){return"[mañana a la"+(1!==this.hours()?"s":"")+"] LT"},nextWeek:function(){return"dddd [a la"+(1!==this.hours()?"s":"")+"] LT"},lastDay:function(){return"[ayer a la"+(1!==this.hours()?"s":"")+"] LT"},lastWeek:function(){return"[el] dddd [pasado a la"+(1!==this.hours()?"s":"")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",ss:"%d segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un día",dd:"%d días",w:"una semana",ww:"%d semanas",M:"un mes",MM:"%d meses",y:"un año",yy:"%d años"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:0,doy:6}})}(n(381))},5655:function(e,t,n){!function(e){"use strict";var t="ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.".split("_"),n="ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),r=[/^ene/i,/^feb/i,/^mar/i,/^abr/i,/^may/i,/^jun/i,/^jul/i,/^ago/i,/^sep/i,/^oct/i,/^nov/i,/^dic/i],a=/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i;e.defineLocale("es",{months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),monthsShort:function(e,r){return e?/-MMM-/.test(r)?n[e.month()]:t[e.month()]:t},monthsRegex:a,monthsShortRegex:a,monthsStrictRegex:/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,monthsShortStrictRegex:/^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,monthsParse:r,longMonthsParse:r,shortMonthsParse:r,weekdays:"domingo_lunes_martes_miércoles_jueves_viernes_sábado".split("_"),weekdaysShort:"dom._lun._mar._mié._jue._vie._sáb.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY H:mm",LLLL:"dddd, D [de] MMMM [de] YYYY H:mm"},calendar:{sameDay:function(){return"[hoy a la"+(1!==this.hours()?"s":"")+"] LT"},nextDay:function(){return"[mañana a la"+(1!==this.hours()?"s":"")+"] LT"},nextWeek:function(){return"dddd [a la"+(1!==this.hours()?"s":"")+"] LT"},lastDay:function(){return"[ayer a la"+(1!==this.hours()?"s":"")+"] LT"},lastWeek:function(){return"[el] dddd [pasado a la"+(1!==this.hours()?"s":"")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",ss:"%d segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un día",dd:"%d días",w:"una semana",ww:"%d semanas",M:"un mes",MM:"%d meses",y:"un año",yy:"%d años"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4},invalidDate:"Fecha inválida"})}(n(381))},5603:function(e,t,n){!function(e){"use strict";function t(e,t,n,r){var a={s:["mõne sekundi","mõni sekund","paar sekundit"],ss:[e+"sekundi",e+"sekundit"],m:["ühe minuti","üks minut"],mm:[e+" minuti",e+" minutit"],h:["ühe tunni","tund aega","üks tund"],hh:[e+" tunni",e+" tundi"],d:["ühe päeva","üks päev"],M:["kuu aja","kuu aega","üks kuu"],MM:[e+" kuu",e+" kuud"],y:["ühe aasta","aasta","üks aasta"],yy:[e+" aasta",e+" aastat"]};return t?a[n][2]?a[n][2]:a[n][1]:r?a[n][0]:a[n][1]}e.defineLocale("et",{months:"jaanuar_veebruar_märts_aprill_mai_juuni_juuli_august_september_oktoober_november_detsember".split("_"),monthsShort:"jaan_veebr_märts_apr_mai_juuni_juuli_aug_sept_okt_nov_dets".split("_"),weekdays:"pühapäev_esmaspäev_teisipäev_kolmapäev_neljapäev_reede_laupäev".split("_"),weekdaysShort:"P_E_T_K_N_R_L".split("_"),weekdaysMin:"P_E_T_K_N_R_L".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[Täna,] LT",nextDay:"[Homme,] LT",nextWeek:"[Järgmine] dddd LT",lastDay:"[Eile,] LT",lastWeek:"[Eelmine] dddd LT",sameElse:"L"},relativeTime:{future:"%s pärast",past:"%s tagasi",s:t,ss:t,m:t,mm:t,h:t,hh:t,d:t,dd:"%d päeva",M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(381))},7763:function(e,t,n){!function(e){"use strict";e.defineLocale("eu",{months:"urtarrila_otsaila_martxoa_apirila_maiatza_ekaina_uztaila_abuztua_iraila_urria_azaroa_abendua".split("_"),monthsShort:"urt._ots._mar._api._mai._eka._uzt._abu._ira._urr._aza._abe.".split("_"),monthsParseExact:!0,weekdays:"igandea_astelehena_asteartea_asteazkena_osteguna_ostirala_larunbata".split("_"),weekdaysShort:"ig._al._ar._az._og._ol._lr.".split("_"),weekdaysMin:"ig_al_ar_az_og_ol_lr".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"YYYY[ko] MMMM[ren] D[a]",LLL:"YYYY[ko] MMMM[ren] D[a] HH:mm",LLLL:"dddd, YYYY[ko] MMMM[ren] D[a] HH:mm",l:"YYYY-M-D",ll:"YYYY[ko] MMM D[a]",lll:"YYYY[ko] MMM D[a] HH:mm",llll:"ddd, YYYY[ko] MMM D[a] HH:mm"},calendar:{sameDay:"[gaur] LT[etan]",nextDay:"[bihar] LT[etan]",nextWeek:"dddd LT[etan]",lastDay:"[atzo] LT[etan]",lastWeek:"[aurreko] dddd LT[etan]",sameElse:"L"},relativeTime:{future:"%s barru",past:"duela %s",s:"segundo batzuk",ss:"%d segundo",m:"minutu bat",mm:"%d minutu",h:"ordu bat",hh:"%d ordu",d:"egun bat",dd:"%d egun",M:"hilabete bat",MM:"%d hilabete",y:"urte bat",yy:"%d urte"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}})}(n(381))},6959:function(e,t,n){!function(e){"use strict";var t={1:"۱",2:"۲",3:"۳",4:"۴",5:"۵",6:"۶",7:"۷",8:"۸",9:"۹",0:"۰"},n={"۱":"1","۲":"2","۳":"3","۴":"4","۵":"5","۶":"6","۷":"7","۸":"8","۹":"9","۰":"0"};e.defineLocale("fa",{months:"ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر".split("_"),monthsShort:"ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر".split("_"),weekdays:"یک‌شنبه_دوشنبه_سه‌شنبه_چهارشنبه_پنج‌شنبه_جمعه_شنبه".split("_"),weekdaysShort:"یک‌شنبه_دوشنبه_سه‌شنبه_چهارشنبه_پنج‌شنبه_جمعه_شنبه".split("_"),weekdaysMin:"ی_د_س_چ_پ_ج_ش".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},meridiemParse:/قبل از ظهر|بعد از ظهر/,isPM:function(e){return/بعد از ظهر/.test(e)},meridiem:function(e,t,n){return e<12?"قبل از ظهر":"بعد از ظهر"},calendar:{sameDay:"[امروز ساعت] LT",nextDay:"[فردا ساعت] LT",nextWeek:"dddd [ساعت] LT",lastDay:"[دیروز ساعت] LT",lastWeek:"dddd [پیش] [ساعت] LT",sameElse:"L"},relativeTime:{future:"در %s",past:"%s پیش",s:"چند ثانیه",ss:"%d ثانیه",m:"یک دقیقه",mm:"%d دقیقه",h:"یک ساعت",hh:"%
12246d ساعت",d:"یک روز",dd:"%d روز",M:"یک ماه",MM:"%d ماه",y:"یک سال",yy:"%d سال"},preparse:function(e){return e.replace(/[۰-۹]/g,(function(e){return n[e]})).replace(/،/g,",")},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]})).replace(/,/g,"،")},dayOfMonthOrdinalParse:/\d{1,2}م/,ordinal:"%dم",week:{dow:6,doy:12}})}(n(381))},1897:function(e,t,n){!function(e){"use strict";var t="nolla yksi kaksi kolme neljä viisi kuusi seitsemän kahdeksan yhdeksän".split(" "),n=["nolla","yhden","kahden","kolmen","neljän","viiden","kuuden",t[7],t[8],t[9]];function r(e,r,a,i){var s="";switch(a){case"s":return i?"muutaman sekunnin":"muutama sekunti";case"ss":s=i?"sekunnin":"sekuntia";break;case"m":return i?"minuutin":"minuutti";case"mm":s=i?"minuutin":"minuuttia";break;case"h":return i?"tunnin":"tunti";case"hh":s=i?"tunnin":"tuntia";break;case"d":return i?"päivän":"päivä";case"dd":s=i?"päivän":"päivää";break;case"M":return i?"kuukauden":"kuukausi";case"MM":s=i?"kuukauden":"kuukautta";break;case"y":return i?"vuoden":"vuosi";case"yy":s=i?"vuoden":"vuotta"}return function(e,r){return e<10?r?n[e]:t[e]:e}(e,i)+" "+s}e.defineLocale("fi",{months:"tammikuu_helmikuu_maaliskuu_huhtikuu_toukokuu_kesäkuu_heinäkuu_elokuu_syyskuu_lokakuu_marraskuu_joulukuu".split("_"),monthsShort:"tammi_helmi_maalis_huhti_touko_kesä_heinä_elo_syys_loka_marras_joulu".split("_"),weekdays:"sunnuntai_maanantai_tiistai_keskiviikko_torstai_perjantai_lauantai".split("_"),weekdaysShort:"su_ma_ti_ke_to_pe_la".split("_"),weekdaysMin:"su_ma_ti_ke_to_pe_la".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD.MM.YYYY",LL:"Do MMMM[ta] YYYY",LLL:"Do MMMM[ta] YYYY, [klo] HH.mm",LLLL:"dddd, Do MMMM[ta] YYYY, [klo] HH.mm",l:"D.M.YYYY",ll:"Do MMM YYYY",lll:"Do MMM YYYY, [klo] HH.mm",llll:"ddd, Do MMM YYYY, [klo] HH.mm"},calendar:{sameDay:"[tänään] [klo] LT",nextDay:"[huomenna] [klo] LT",nextWeek:"dddd [klo] LT",lastDay:"[eilen] [klo] LT",lastWeek:"[viime] dddd[na] [klo] LT",sameElse:"L"},relativeTime:{future:"%s päästä",past:"%s sitten",s:r,ss:r,m:r,mm:r,h:r,hh:r,d:r,dd:r,M:r,MM:r,y:r,yy:r},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(381))},2549:function(e,t,n){!function(e){"use strict";e.defineLocale("fil",{months:"Enero_Pebrero_Marso_Abril_Mayo_Hunyo_Hulyo_Agosto_Setyembre_Oktubre_Nobyembre_Disyembre".split("_"),monthsShort:"Ene_Peb_Mar_Abr_May_Hun_Hul_Ago_Set_Okt_Nob_Dis".split("_"),weekdays:"Linggo_Lunes_Martes_Miyerkules_Huwebes_Biyernes_Sabado".split("_"),weekdaysShort:"Lin_Lun_Mar_Miy_Huw_Biy_Sab".split("_"),weekdaysMin:"Li_Lu_Ma_Mi_Hu_Bi_Sab".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"MM/D/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY HH:mm",LLLL:"dddd, MMMM DD, YYYY HH:mm"},calendar:{sameDay:"LT [ngayong araw]",nextDay:"[Bukas ng] LT",nextWeek:"LT [sa susunod na] dddd",lastDay:"LT [kahapon]",lastWeek:"LT [noong nakaraang] dddd",sameElse:"L"},relativeTime:{future:"sa loob ng %s",past:"%s ang nakalipas",s:"ilang segundo",ss:"%d segundo",m:"isang minuto",mm:"%d minuto",h:"isang oras",hh:"%d oras",d:"isang araw",dd:"%d araw",M:"isang buwan",MM:"%d buwan",y:"isang taon",yy:"%d taon"},dayOfMonthOrdinalParse:/\d{1,2}/,ordinal:function(e){return e},week:{dow:1,doy:4}})}(n(381))},4694:function(e,t,n){!function(e){"use strict";e.defineLocale("fo",{months:"januar_februar_mars_apríl_mai_juni_juli_august_september_oktober_november_desember".split("_"),monthsShort:"jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des".split("_"),weekdays:"sunnudagur_mánadagur_týsdagur_mikudagur_hósdagur_fríggjadagur_leygardagur".split("_"),weekdaysShort:"sun_mán_týs_mik_hós_frí_ley".split("_"),weekdaysMin:"su_má_tý_mi_hó_fr_le".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D. MMMM, YYYY HH:mm"},calendar:{sameDay:"[Í dag kl.] LT",nextDay:"[Í morgin kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[Í gjár kl.] LT",lastWeek:"[síðstu] dddd [kl] LT",sameElse:"L"},relativeTime:{future:"um %s",past:"%s síðani",s:"fá sekund",ss:"%d sekundir",m:"ein minuttur",mm:"%d minuttir",h:"ein tími",hh:"%d tímar",d:"ein dagur",dd:"%d dagar",M:"ein mánaður",MM:"%d mánaðir",y:"eitt ár",yy:"%d ár"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(381))},3049:function(e,t,n){!function(e){"use strict";e.defineLocale("fr-ca",{months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),monthsParseExact:!0,weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"di_lu_ma_me_je_ve_sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Aujourd’hui à] LT",nextDay:"[Demain à] LT",nextWeek:"dddd [à] LT",lastDay:"[Hier à] LT",lastWeek:"dddd [dernier à] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",ss:"%d secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},dayOfMonthOrdinalParse:/\d{1,2}(er|e)/,ordinal:function(e,t){switch(t){default:case"M":case"Q":case"D":case"DDD":case"d":return e+(1===e?"er":"e");case"w":case"W":return e+(1===e?"re":"e")}}})}(n(381))},2330:function(e,t,n){!function(e){"use strict";e.defineLocale("fr-ch",{months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),monthsParseExact:!0,weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"di_lu_ma_me_je_ve_sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Aujourd’hui à] LT",nextDay:"[Demain à] LT",nextWeek:"dddd [à] LT",lastDay:"[Hier à] LT",lastWeek:"dddd [dernier à] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",ss:"%d secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},dayOfMonthOrdinalParse:/\d{1,2}(er|e)/,ordinal:function(e,t){switch(t){default:case"M":case"Q":case"D":case"DDD":case"d":return e+(1===e?"er":"e");case"w":case"W":return e+(1===e?"re":"e")}},week:{dow:1,doy:4}})}(n(381))},4470:function(e,t,n){!function(e){"use strict";var t=/(janv\.?|févr\.?|mars|avr\.?|mai|juin|juil\.?|août|sept\.?|oct\.?|nov\.?|déc\.?|janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i,n=[/^janv/i,/^févr/i,/^mars/i,/^avr/i,/^mai/i,/^juin/i,/^juil/i,/^août/i,/^sept/i,/^oct/i,/^nov/i,/^déc/i];e.defineLocale("fr",{months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),monthsRegex:t,monthsShortRegex:t,monthsStrictRegex:/^(janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i,monthsShortStrictRegex:/(janv\.?|févr\.?|mars|avr\.?|mai|juin|juil\.?|août|sept\.?|oct\.?|nov\.?|déc\.?)/i,monthsParse:n,longMonthsParse:n,shortMonthsParse:n,weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"di_lu_ma_me_je_ve_sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Aujourd’hui à] LT",nextDay:"[Demain à] LT",nextWeek:"dddd [à] LT",lastDay:"[Hier à] LT",lastWeek:"dddd [dernier à] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",ss:"%d secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",w:"une semaine",ww:"%d semaines",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},dayOfMonthOrdinalParse:/\d{1,2}(er|)/,ordinal:function(e,t){switch(t){case"D":return e+(1===e?"er":"");default:case"M":case"Q":case"DDD":case"d":return e+(1===e?"er":"e");case"w":case"W":return e+(1===e?"re":"e")}},week:{dow:1,doy:4}})}(n(381))},5044:function(e,t,n){!function(e){"use strict";var t="jan._feb._mrt._apr._mai_jun._jul._aug._sep._okt._nov._des.".split("_"),n="jan_feb_mrt_apr_mai_jun_jul_aug_sep_okt_nov_des".split("_");e.defineLocale("fy",{months:"jannewaris_febrewaris_maart_april_maaie_juny_july_augustus_septimber_oktober_novimber_desimber".split("_"),monthsShort:function(e,r){return e?/-MMM-/.test(r)?n[e.month()]:t[e.month()]:t},monthsParseExact:!0,weekdays:"snein_moandei_tiisdei_woansdei_tongersdei_freed_sneon".split("_"),weekdaysShort:"si._mo._ti._wo._to._fr._so.".split("_"),weekdaysMin:"Si_Mo_Ti_Wo_To_Fr_So".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[hjoed om] LT",nextDay:"[moarn om] LT",nextWeek:"dddd [om] LT",lastDay:"[juster om] LT",lastWeek:"[ôfrûne] dddd [om] LT",sameElse:"L"},relativeTime:{future:"oer %s",past:"%s lyn",s:"in pear sekonden",ss:"%d sekonden",m:"ien minút",mm:"%d minuten",h:"ien oere",hh:"%d oeren",d:"ien dei",dd:"%d dagen",M:"ien moanne",MM:"%d moannen",y:"ien jier",yy:"%d jierren"},dayOfMonthOrdinalParse:/\d{1,2}(ste|de)/,ordinal:function(e){return e+(1===e||8===e||e>=20?"ste":"de")},week:{dow:1,doy:4}})}(n(381))},9295:function(e,t,n){!function(e){"use strict";e.defineLocale("ga",{months:["Eanáir","Feabhra","Márta","Aibreán","Bealtaine","Meitheamh","Iúil","Lúnasa","Meán Fómhair","Deireadh Fómhair","Samhain","Nollaig"],monthsShort:["Ean","Feabh","Márt","Aib","Beal","Meith","Iúil","Lún","M.F.","D.F.","Samh","Noll"],monthsParseExact:!0,weekdays:["Dé Domhnaigh","Dé Luain","Dé Máirt","Dé Céadaoin","Déardaoin","Dé hAoine","Dé Sathairn"],weekdaysShort:["Domh","Luan","Máirt","Céad","Déar","Aoine","Sath"],weekdaysMin:["Do","Lu","Má","Cé","Dé","A","Sa"],longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Inniu ag] LT",nextDay:"[Amárach ag] LT",nextWeek:"dddd [ag] LT",lastDay:"[Inné ag] LT",lastWeek:"dddd [seo caite] [ag] LT",sameElse:"L"},relativeTime:{future:"i %s",past:"%s ó shin",s:"cúpla soicind",ss:"%d soicind",m:"nóiméad",mm:"%d nóiméad",h:"uair an chloig",hh:"%d uair an chloig",d:"lá",dd:"%d lá",M:"mí",MM:"%d míonna",y:"bliain",yy:"%d bliain"},dayOfMonthOrdinalParse:/\d{1,2}(d|na|mh)/,ordinal:function(e){return e+(1===e?"d":e%10==2?"na":"mh")},week:{dow:1,doy:4}})}(n(381))},2101:function(e,t,n){!function(e){"use strict";e.defineLocale("gd",{months:["Am Faoilleach","An Gearran","Am Màrt","An Giblean","An Cèitean","An t-Ògmhios","An t-Iuchar","An Lùnastal","An t-Sultain","An Dàmhair","An t-Samhain","An Dùbhlachd"],monthsShort:["Faoi","Gear","Màrt","Gibl","Cèit","Ògmh","Iuch","Lùn","Sult","Dàmh","Samh","Dùbh"],monthsParseExact:!0,weekdays:["Didòmhnaich","Diluain","Dimàirt","Diciadain","Diardaoin","Dihaoine","Disathairne"],weekdaysShort:["Did","Dil","Dim","Dic","Dia","Dih","Dis"],weekdaysMin:["Dò","Lu","Mà","Ci","Ar","Ha","Sa"],longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[An-diugh aig] LT",nextDay:"[A-màireach aig] LT",nextWeek:"dddd [aig] LT",lastDay:"[An-dè aig] 
12246LT",lastWeek:"dddd [seo chaidh] [aig] LT",sameElse:"L"},relativeTime:{future:"ann an %s",past:"bho chionn %s",s:"beagan diogan",ss:"%d diogan",m:"mionaid",mm:"%d mionaidean",h:"uair",hh:"%d uairean",d:"latha",dd:"%d latha",M:"mìos",MM:"%d mìosan",y:"bliadhna",yy:"%d bliadhna"},dayOfMonthOrdinalParse:/\d{1,2}(d|na|mh)/,ordinal:function(e){return e+(1===e?"d":e%10==2?"na":"mh")},week:{dow:1,doy:4}})}(n(381))},8794:function(e,t,n){!function(e){"use strict";e.defineLocale("gl",{months:"xaneiro_febreiro_marzo_abril_maio_xuño_xullo_agosto_setembro_outubro_novembro_decembro".split("_"),monthsShort:"xan._feb._mar._abr._mai._xuñ._xul._ago._set._out._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"domingo_luns_martes_mércores_xoves_venres_sábado".split("_"),weekdaysShort:"dom._lun._mar._mér._xov._ven._sáb.".split("_"),weekdaysMin:"do_lu_ma_mé_xo_ve_sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY H:mm",LLLL:"dddd, D [de] MMMM [de] YYYY H:mm"},calendar:{sameDay:function(){return"[hoxe "+(1!==this.hours()?"ás":"á")+"] LT"},nextDay:function(){return"[mañá "+(1!==this.hours()?"ás":"á")+"] LT"},nextWeek:function(){return"dddd ["+(1!==this.hours()?"ás":"a")+"] LT"},lastDay:function(){return"[onte "+(1!==this.hours()?"á":"a")+"] LT"},lastWeek:function(){return"[o] dddd [pasado "+(1!==this.hours()?"ás":"a")+"] LT"},sameElse:"L"},relativeTime:{future:function(e){return 0===e.indexOf("un")?"n"+e:"en "+e},past:"hai %s",s:"uns segundos",ss:"%d segundos",m:"un minuto",mm:"%d minutos",h:"unha hora",hh:"%d horas",d:"un día",dd:"%d días",M:"un mes",MM:"%d meses",y:"un ano",yy:"%d anos"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}})}(n(381))},7884:function(e,t,n){!function(e){"use strict";function t(e,t,n,r){var a={s:["थोडया सॅकंडांनी","थोडे सॅकंड"],ss:[e+" सॅकंडांनी",e+" सॅकंड"],m:["एका मिणटान","एक मिनूट"],mm:[e+" मिणटांनी",e+" मिणटां"],h:["एका वरान","एक वर"],hh:[e+" वरांनी",e+" वरां"],d:["एका दिसान","एक दीस"],dd:[e+" दिसांनी",e+" दीस"],M:["एका म्हयन्यान","एक म्हयनो"],MM:[e+" म्हयन्यानी",e+" म्हयने"],y:["एका वर्सान","एक वर्स"],yy:[e+" वर्सांनी",e+" वर्सां"]};return r?a[n][0]:a[n][1]}e.defineLocale("gom-deva",{months:{standalone:"जानेवारी_फेब्रुवारी_मार्च_एप्रील_मे_जून_जुलय_ऑगस्ट_सप्टेंबर_ऑक्टोबर_नोव्हेंबर_डिसेंबर".split("_"),format:"जानेवारीच्या_फेब्रुवारीच्या_मार्चाच्या_एप्रीलाच्या_मेयाच्या_जूनाच्या_जुलयाच्या_ऑगस्टाच्या_सप्टेंबराच्या_ऑक्टोबराच्या_नोव्हेंबराच्या_डिसेंबराच्या".split("_"),isFormat:/MMMM(\s)+D[oD]?/},monthsShort:"जाने._फेब्रु._मार्च_एप्री._मे_जून_जुल._ऑग._सप्टें._ऑक्टो._नोव्हें._डिसें.".split("_"),monthsParseExact:!0,weekdays:"आयतार_सोमार_मंगळार_बुधवार_बिरेस्तार_सुक्रार_शेनवार".split("_"),weekdaysShort:"आयत._सोम._मंगळ._बुध._ब्रेस्त._सुक्र._शेन.".split("_"),weekdaysMin:"आ_सो_मं_बु_ब्रे_सु_शे".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"A h:mm [वाजतां]",LTS:"A h:mm:ss [वाजतां]",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY A h:mm [वाजतां]",LLLL:"dddd, MMMM Do, YYYY, A h:mm [वाजतां]",llll:"ddd, D MMM YYYY, A h:mm [वाजतां]"}
vendor: 10,911 bytes, line 12246
12246,calendar:{sameDay:"[आयज] LT",nextDay:"[फाल्यां] LT",nextWeek:"[फुडलो] dddd[,] LT",lastDay:"[काल] LT",lastWeek:"[फाटलो] dddd[,] LT",sameElse:"L"},relativeTime:{future:"%s",past:"%s आदीं",s:t,ss:t,m:t,mm:t,h:t,hh:t,d:t,dd:t,M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}(वेर)/,ordinal:function(e,t){return"D"===t?e+"वेर":e},week:{dow:0,doy:3},meridiemParse:/राती|सकाळीं|दनपारां|सांजे/,meridiemHour:function(e,t){return 12===e&&(e=0),"राती"===t?e<4?e:e+12:"सकाळीं"===t?e:"दनपारां"===t?e>12?e:e+12:"सांजे"===t?e+12:void 0},meridiem:function(e,t,n){return e<4?"राती":e<12?"सकाळीं":e<16?"दनपारां":e<20?"सांजे":"राती"}})}(n(381))},3168:function(e,t,n){!function(e){"use strict";function t(e,t,n,r){var a={s:["thoddea sekondamni","thodde sekond"],ss:[e+" sekondamni",e+" sekond"],m:["eka mintan","ek minut"],mm:[e+" mintamni",e+" mintam"],h:["eka voran","ek vor"],hh:[e+" voramni",e+" voram"],d:["eka disan","ek dis"],dd:[e+" disamni",e+" dis"],M:["eka mhoinean","ek mhoino"],MM:[e+" mhoineamni",e+" mhoine"],y:["eka vorsan","ek voros"],yy:[e+" vorsamni",e+" vorsam"]};return r?a[n][0]:a[n][1]}e.defineLocale("gom-latn",{months:{standalone:"Janer_Febrer_Mars_Abril_Mai_Jun_Julai_Agost_Setembr_Otubr_Novembr_Dezembr".split("_"),format:"Janerachea_Febrerachea_Marsachea_Abrilachea_Maiachea_Junachea_Julaiachea_Agostachea_Setembrachea_Otubrachea_Novembrachea_Dezembrachea".split("_"),isFormat:/MMMM(\s)+D[oD]?/},monthsShort:"Jan._Feb._Mars_Abr._Mai_Jun_Jul._Ago._Set._Otu._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Aitar_Somar_Mongllar_Budhvar_Birestar_Sukrar_Son'var".split("_"),weekdaysShort:"Ait._Som._Mon._Bud._Bre._Suk._Son.".split("_"),weekdaysMin:"Ai_Sm_Mo_Bu_Br_Su_Sn".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"A h:mm [vazta]",LTS:"A h:mm:ss [vazta]",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY A h:mm [vazta]",LLLL:"dddd, MMMM Do, YYYY, A h:mm [vazta]",llll:"ddd, D MMM YYYY, A h:mm [vazta]"},calendar:{sameDay:"[Aiz] LT",nextDay:"[Faleam] LT",nextWeek:"[Fuddlo] dddd[,] LT",lastDay:"[Kal] LT",lastWeek:"[Fattlo] dddd[,] LT",sameElse:"L"},relativeTime:{future:"%s",past:"%s adim",s:t,ss:t,m:t,mm:t,h:t,hh:t,d:t,dd:t,M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}(er)/,ordinal:function(e,t){return"D"===t?e+"er":e},week:{dow:0,doy:3},meridiemParse:/rati|sokallim|donparam|sanje/,meridiemHour:function(e,t){return 12===e&&(e=0),"rati"===t?e<4?e:e+12:"sokallim"===t?e:"donparam"===t?e>12?e:e+12:"sanje"===t?e+12:void 0},meridiem:function(e,t,n){return e<4?"rati":e<12?"sokallim":e<16?"donparam":e<20?"sanje":"rati"}})}(n(381))},5349:function(e,t,n){!function(e){"use strict";var t={1:"à«§",2:"૨",3:"à«©",4:"૪",5:"à««",6:"૬",7:"à«­",8:"à«®",9:"૯",0:"૦"},n={"à«§":"1","૨":"2","à«©":"3","૪":"4","à««":"5","૬":"6","à«­":"7","à«®":"8","૯":"9","૦":"0"};e.defineLocale("gu",{months:"જાન્યુઆરી_ફેબ્રુઆરી_માર્ચ_એપ્રિલ_મે_જૂન_જુલાઈ_ઑગસ્ટ_સપ્ટેમ્બર_ઑક્ટ્બર_નવેમ્બર_ડિસેમ્બર".split("_"),monthsShort:"જાન્યુ._ફેબ્રુ._માર્ચ_એપ્રિ._મે_જૂન_જુલા._ઑગ._સપ્ટે._ઑક્ટ્._નવે._ડિસે.".split("_"),monthsParseExact:!0,weekdays:"રવિવાર_સોમવાર_મંગળવાર_બુધ્વાર_ગુરુવાર_શુક્રવાર_શનિવાર".split("_"),weekdaysShort:"રવિ_સોમ_મંગળ_બુધ્_ગુરુ_શુક્ર_શનિ".split("_"),weekdaysMin:"ર_સો_મં_બુ_ગુ_શુ_શ".split("_"),longDateFormat:{LT:"A h:mm વાગ્યે",LTS:"A h:mm:ss વાગ્યે",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm વાગ્યે",LLLL:"dddd, D MMMM YYYY, A h:mm વાગ્યે"},calendar:{sameDay:"[આજ] LT",nextDay:"[કાલે] LT",nextWeek:"dddd, LT",lastDay:"[ગઇકાલે] LT",lastWeek:"[પાછલા] dddd, LT",sameElse:"L"},relativeTime:{future:"%s મા",past:"%s પહેલા",s:"અમુક પળો",ss:"%d સેકંડ",m:"એક મિનિટ",mm:"%d મિનિટ",h:"એક કલાક",hh:"%d કલાક",d:"એક દિવસ",dd:"%d દિવસ",M:"એક મહિનો",MM:"%d મહિનો",y:"એક વર્ષ",yy:"%d વર્ષ"},preparse:function(e){return e.replace(/[૧૨૩૪૫૬૭૮૯૦]/g,(function(e){return n[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},meridiemParse:/રાત|બપોર|સવાર|સાંજ/,meridiemHour:function(e,t){return 12===e&&(e=0),"રાત"===t?e<4?e:e+12:"સવાર"===t?e:"બપોર"===t?e>=10?e:e+12:"સાંજ"===t?e+12:void 0},meridiem:function(e,t,n){return e<4?"રાત":e<10?"સવાર":e<17?"બપોર":e<20?"સાંજ":"રાત"},week:{dow:0,doy:6}})}(n(381))},4206:function(e,t,n){!function(e){"use strict";e.defineLocale("he",{months:"ינואר_פברואר_מרץ_אפריל_מאי_יוני_יולי_אוגוסט_ספטמבר_אוקטובר_נובמבר_דצמבר".split("_"),monthsShort:"ינו׳_פבר׳_מרץ_אפר׳_מאי_יוני_יולי_אוג׳_ספט׳_אוק׳_נוב׳_דצמ׳".split("_"),weekdays:"ראשון_שני_שלישי_רביעי_חמישי_שישי_שבת".split("_"),weekdaysShort:"א׳_ב׳_ג׳_ד׳_ה׳_ו׳_ש׳".split("_"),weekdaysMin:"א_ב_ג_ד_ה_ו_ש".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [ב]MMMM YYYY",LLL:"D [ב]MMMM YYYY HH:mm",LLLL:"dddd, D [ב]MMMM YYYY HH:mm",l:"D/M/YYYY",ll:"D MMM YYYY",lll:"D MMM YYYY HH:mm",llll:"ddd, D MMM YYYY HH:mm"},calendar:{sameDay:"[היום ב־]LT",nextDay:"[מחר ב־]LT",nextWeek:"dddd [בשעה] LT",lastDay:"[אתמול ב־]LT",lastWeek:"[ביום] dddd [האחרון בשעה] LT",sameElse:"L"},relativeTime:{future:"בעוד %s",past:"לפני %s",s:"מספר שניות",ss:"%d שניות",m:"דקה",mm:"%d דקות",h:"שעה",hh:function(e){return 2===e?"שעתיים":e+" שעות"},d:"יום",dd:function(e){return 2===e?"יומיים":e+" ימים"},M:"חודש",MM:function(e){return 2===e?"חודשיים":e+" חודשים"},y:"שנה",yy:function(e){return 2===e?"שנתיים":e%10==0&&10!==e?e+" שנה":e+" שנים"}},meridiemParse:/אחה"צ|לפנה"צ|אחרי הצהריים|לפני הצהריים|לפנות בוקר|בבוקר|בערב/i,isPM:function(e){return/^(אחה"צ|אחרי הצהריים|בערב)$/.test(e)},meridiem:function(e,t,n){return e<5?"לפנות בוקר":e<10?"בבוקר":e<12?n?'לפנה"צ':"לפני הצהריים":e<18?n?'אחה"צ':"אחרי הצהריים":"בערב"}})}(n(381))},94:function(e,t,n){!function(e){"use strict";var t={1:"१",2:"२",3:"३",4:"४",5:"५",6:"६",7:"७",8:"८",9:"९",0:"०"},n={"१":"1","२":"2","३":"3","४":"4","५":"5","६":"6","७":"7","८":"8","९":"9","०":"0"},r=[/^जन/i,/^फ़र|फर/i,/^मार्च/i,/^अप्रै/i,/^मई/i,/^जून/i,/^जुल/i,/^अग/i,/^सितं|सित/i,/^अक्टू/i,/^नव|नवं/i,/^दिसं|दिस/i];e.defineLocale("hi",{months:{format:"जनवरी_फ़रवरी_मार्च_अप्रैल_मई_जून_जुलाई_अगस्त_सितम्बर_अक्टूबर_नवम्बर_दिसम्बर".split("_"),standalone:"जनवरी_फरवरी_मार्च_अप्रैल_मई_जून_जुलाई_अगस्त_सितंबर_अक्टूबर_नवंबर_दिसंबर".split("_")},monthsShort:"जन._फ़र._मार्च_अप्रै._मई_जून_जुल._अग._सित._अक्टू._नव._दिस.".split("_"),weekdays:"रविवार_सोमवार_मंगलवार_बुधवार_गुरूवार_शुक्रवार_शनिवार".split("_"),weekdaysShort:"रवि_सोम_मंगल_बुध_गुरू_शुक्र_शनि".split("_"),weekdaysMin:"र_सो_मं_बु_गु_शु_श".split("_"),longDateFormat:{LT:"A h:mm बजे",LTS:"A h:mm:ss बजे",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm बजे",LLLL:"dddd, D MMMM YYYY, A h:mm बजे"},monthsParse:r,longMonthsParse:r,shortMonthsParse:[/^जन/i,/^फ़र/i,/^मार्च/i,/^अप्रै/i,/^मई/i,/^जून/i,/^जुल/i,/^अग/i,/^सित/i,/^अक्टू/i,/^नव/i,/^दिस/i],monthsRegex:/^(जनवरी|जन\.?|फ़रवरी|फरवरी|फ़र\.?|मार्च?|अप्रैल|अप्रै\.?|मई?|जून?|जुलाई|जुल\.?|अगस्त|अग\.?|सितम्बर|सितंबर|सित\.?|अक्टूबर|अक्टू\.?|नवम्बर|नवंबर|नव\.?|दिसम्बर|दिसंबर|दिस\.?)/i,monthsShortRegex:/^(जनवरी|जन\.?|फ़रवरी|फरवरी|फ़र\.?|मार्च?|अप्रैल|अप्रै\.?|मई?|जून?|जुलाई|जुल\.?|अगस्त|अग\.?|सितम्बर|सितंबर|सित\.?|अक्टूबर|अक्टू\.?|नवम्बर|नवंबर|नव\.?|दिसम्बर|दिसंबर|दिस\.?)/i,monthsStrictRegex:/^(जनवरी?|फ़रवरी|फरवरी?|मार्च?|अप्रैल?|मई?|जून?|जुलाई?|अगस्त?|सितम्बर|सितंबर|सित?\.?|अक्टूबर|अक्टू\.?|नवम्बर|नवंबर?|दिसम्बर|दिसंबर?)/i,monthsShortStrictRegex:/^(जन\.?|फ़र\.?|मार्च?|अप्रै\.?|मई?|जून?|जुल\.?|अग\.?|सित\.?|अक्टू\.?|नव\.?|दिस\.?)/i,calendar:{sameDay:"[आज] LT",nextDay:"[कल] LT",nextWeek:"dddd, LT",lastDay:"[कल] LT",lastWeek:"[पिछले] dddd, LT",sameElse:"L"},relativeTime:{future:"%s में",past:"%s पहले",s:"कुछ ही क्षण",ss:"%d सेकंड",m:"एक मिनट",mm:"%d मिनट",h:"एक घंटा",hh:"%d घंटे",d:"एक दिन",dd:"%d दिन",M:"एक महीने",MM:"%d महीने",y:"एक वर्ष",yy:"%d वर्ष"},preparse:function(e){return e.replace(/[१२३४५६७८९०]/g,(function(e){return n[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},meridiemParse:/रात|सुबह|दोपहर|शाम/,meridiemHour:function(e,t){return 12===e&&(e=0),"राà
12246¤¤"===t?e<4?e:e+12:"सुबह"===t?e:"दोपहर"===t?e>=10?e:e+12:"शाम"===t?e+12:void 0},meridiem:function(e,t,n){return e<4?"रात":e<10?"सुबह":e<17?"दोपहर":e<20?"शाम":"रात"},week:{dow:0,doy:6}})}(n(381))},316:function(e,t,n){!function(e){"use strict";function t(e,t,n){var r=e+" ";switch(n){case"ss":return r+(1===e?"sekunda":2===e||3===e||4===e?"sekunde":"sekundi");case"m":return t?"jedna minuta":"jedne minute";case"mm":return r+(1===e?"minuta":2===e||3===e||4===e?"minute":"minuta");case"h":return t?"jedan sat":"jednog sata";case"hh":return r+(1===e?"sat":2===e||3===e||4===e?"sata":"sati");case"dd":return r+(1===e?"dan":"dana");case"MM":return r+(1===e?"mjesec":2===e||3===e||4===e?"mjeseca":"mjeseci");case"yy":return r+(1===e?"godina":2===e||3===e||4===e?"godine":"godina")}}e.defineLocale("hr",{months:{format:"siječnja_veljače_ožujka_travnja_svibnja_lipnja_srpnja_kolovoza_rujna_listopada_studenoga_prosinca".split("_"),standalone:"siječanj_veljača_ožujak_travanj_svibanj_lipanj_srpanj_kolovoz_rujan_listopad_studeni_prosinac".split("_")},monthsShort:"sij._velj._ožu._tra._svi._lip._srp._kol._ruj._lis._stu._pro.".split("_"),monthsParseExact:!0,weekdays:"nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sri._čet._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_če_pe_su".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"Do MMMM YYYY",LLL:"Do MMMM YYYY H:mm",LLLL:"dddd, Do MMMM YYYY H:mm"},calendar:{sameDay:"[danas u] LT",nextDay:"[sutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedjelju] [u] LT";case 3:return"[u] [srijedu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[jučer u] LT",lastWeek:function(){switch(this.day()){case 0:return"[proÅ¡lu] [nedjelju] [u] LT";case 3:return"[proÅ¡lu] [srijedu] [u] LT";case 6:return"[proÅ¡le] [subote] [u] LT";case 1:case 2:case 4:case 5:return"[proÅ¡li] dddd [u] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"prije %s",s:"par sekundi",ss:t,m:t,mm:t,h:t,hh:t,d:"dan",dd:t,M:"mjesec",MM:t,y:"godinu",yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}})}(n(381))},2138:function(e,t,n){!function(e){"use strict";var t="vasárnap hétfőn kedden szerdán csütörtökön pénteken szombaton".split(" ");function n(e,t,n,r){var a=e;switch(n){case"s":return r||t?"néhány másodperc":"néhány másodperce";case"ss":return a+(r||t)?" másodperc":" másodperce";case"m":return"egy"+(r||t?" perc":" perce");case"mm":return a+(r||t?" perc":" perce");case"h":return"egy"+(r||t?" óra":" órája");case"hh":return a+(r||t?" óra":" órája");case"d":return"egy"+(r||t?" nap":" napja");case"dd":return a+(r||t?" nap":" napja");case"M":return"egy"+(r||t?" hónap":" hónapja");case"MM":return a+(r||t?" hónap":" hónapja");case"y":return"egy"+(r||t?" év":" éve");case"yy":return a+(r||t?" év":" éve")}return""}function r(e){return(e?"":"[múlt] ")+"["+t[this.day()]+"] LT[-kor]"}e.defineLocale("hu",{months:"január_február_március_április_május_június_július_augusztus_szeptember_október_november_december".split("_"),monthsShort:"jan._feb._márc._ápr._máj._jún._júl._aug._szept._okt._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"vasárnap_hétfő_kedd_szerda_csütörtök_péntek_szombat".split("_"),weekdaysShort:"vas_hét_kedd_sze_csüt_pén_szo".split("_"),weekdaysMin:"v_h_k_sze_cs_p_szo".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"YYYY.MM.DD.",LL:"YYYY. MMMM D.",LLL:"YYYY. MMMM D. H:mm",LLLL:"YYYY. MMMM D., dddd H:mm"},meridiemParse:/de|du/i,isPM:function(e){return"u"===e.charAt(1).toLowerCase()},meridiem:function(e,t,n){return e<12?!0===n?"de":"DE":!0===n?"du":"DU"},calendar:{sameDay:"[ma] LT[-kor]",nextDay:"[holnap] LT[-kor]",nextWeek:function(){return r.call(this,!0)},lastDay:"[tegnap] LT[-kor]",lastWeek:function(){return r.call(this,!1)},sameElse:"L"},relativeTime:{future:"%s múlva",past:"%s",s:n,ss:n,m:n,mm:n,h:n,hh:n,d:n,dd:n,M:n,MM:n,y:n,yy:n},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(381))},1423:function(e,t,n){!function(e){"use strict";e.defineLocale("hy-am",{months:{format:"հունվարի_փետրվարի_մարտի_ապրիլի_Õ´Õ¡ÕµÕ«Õ½Õ«_հունիսի_հուլիսի_օգոստոսի_սեպտեմբերի_հոկտեմբերի_նոյեմբերի_դեկտեմբերի".split("_"),standalone:"հունվար_փետրվար_մարտ_ապրիլ_Õ´Õ¡ÕµÕ«Õ½_հունիս_հուլիս_օգոստոս_սեպտեմբեր_հոկտեմբեր_նոյեմբեր_դեկտեմբեր".split("_")},monthsShort:"Õ°Õ¶Õ¾_փտր_մրտ_ապր_Õ´ÕµÕ½_Õ°Õ¶Õ½_Õ°Õ¬Õ½_օգս_Õ½ÕºÕ¿_Õ°Õ¯Õ¿_Õ¶Õ´Õ¢_Õ¤Õ¯Õ¿".split("_"),weekdays:"կիրակի_երկուշաբթի_երեքշաբթի_չորեքշաբթի_Õ°Õ«Õ¶Õ£Õ·Õ¡Õ¢Õ©Õ«_ուրբաթ_Õ·Õ¡Õ¢Õ¡Õ©".split("_"),weekdaysShort:"կրկ_երկ_երք_չրք_Õ°Õ¶Õ£_ուրբ_Õ·Õ¢Õ©".split("_"),weekdaysMin:"կրկ_երկ_երք_չրք_Õ°Õ¶Õ£_ուրբ_Õ·Õ¢Õ©".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY Õ©.",LLL:"D MMMM YYYY Õ©., HH:mm",LLLL:"dddd, D MMMM YYYY Õ©., HH:mm"},calendar:{sameDay:"[այսօր] LT",nextDay:"[Õ¾Õ¡Õ²Õ¨] LT",lastDay:"[երեկ] LT",nextWeek:function(){return"dddd [օրը ÕªÕ¡Õ´Õ¨] LT"},lastWeek:function(){return"[անցած] dddd [օրը ÕªÕ¡Õ´Õ¨] LT"},sameElse:"L"},relativeTime:{future:"%s Õ°Õ¥Õ¿Õ¸",past:"%s Õ¡Õ¼Õ¡Õ»",s:"Õ´Õ« քանի վայրկյան",ss:"%d վայրկյան",m:"րոպե",mm:"%d րոպե",h:"ÕªÕ¡Õ´",hh:"%d ÕªÕ¡Õ´",d:"օր",dd:"%d օր",M:"Õ¡Õ´Õ«Õ½",MM:"%d Õ¡Õ´Õ«Õ½",y:"տարի",yy:"%d տարի"},meridiemParse:/գիշերվա|Õ¡Õ¼Õ¡Õ¾Õ¸Õ¿Õ¾Õ¡|ցերեկվա|երեկոյան/,isPM:function(e){return/^(ցերեկվա|երեկոյան)$/.test(e)},meridiem:function(e){return e<4?"գիշերվա":e<12?"Õ¡Õ¼Õ¡Õ¾Õ¸Õ¿Õ¾Õ¡":e<17?"ցերեկվա":"երեկոյան"},dayOfMonthOrdinalParse:/\d{1,2}|\d{1,2}-(Õ«Õ¶|րդ)/,ordinal:function(e,t){switch(t){case"DDD":case"w":case"W":case"DDDo":return 1===e?e+"-Õ«Õ¶":e+"-րդ";default:return e}},week:{dow:1,doy:7}})}(n(381))},9218:function(e,t,n){!function(e){"use strict";e.defineLocale("id",{months:"Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_November_Desember".split("_"),monthsShort:"Jan_Feb_Mar_Apr_Mei_Jun_Jul_Agt_Sep_Okt_Nov_Des".split("_"),weekdays:"Minggu_Senin_Selasa_Rabu_Kamis_Jumat_Sabtu".split("_"),weekdaysShort:"Min_Sen_Sel_Rab_Kam_Jum_Sab".split("_"),weekdaysMin:"Mg_Sn_Sl_Rb_Km_Jm_Sb".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] HH.mm",LLLL:"dddd, D MMMM YYYY [pukul] HH.mm"},meridiemParse:/pagi|siang|sore|malam/,meridiemHour:function(e,t){return 12===e&&(e=0),"pagi"===t?e:"siang"===t?e>=11?e:e+12:"sore"===t||"malam"===t?e+12:void 0},meridiem:function(e,t,n){return e<11?"pagi":e<15?"siang":e<19?"sore":"malam"},calendar:{sameDay:"[Hari ini pukul] LT",nextDay:"[Besok pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kemarin pukul] LT",lastWeek:"dddd [lalu pukul] LT",sameElse:"L"},relativeTime:{future:"dalam %s",past:"%s yang lalu",s:"beberapa detik",ss:"%d detik",m:"semenit",mm:"%d menit",h:"sejam",hh:"%d jam",d:"sehari",dd:"%d hari",M:"sebulan",MM:"%d bulan",y:"setahun",yy:"%d tahun"},week:{dow:0,doy:6}})}(n(381))},135:function(e,t,n){!function(e){"use strict";function t(e){return e%100==11||e%10!=1}function n(e,n,r,a){var i=e+" ";switch(r){case"s":return n||a?"nokkrar sekúndur":"nokkrum sekúndum";
vendor: 4,772 bytes, line 12246
12246case"ss":return t(e)?i+(n||a?"sekúndur":"sekúndum"):i+"sekúnda";case"m":return n?"mínúta":"mínútu";case"mm":return t(e)?i+(n||a?"mínútur":"mínútum"):n?i+"mínúta":i+"mínútu";case"hh":return t(e)?i+(n||a?"klukkustundir":"klukkustundum"):i+"klukkustund";case"d":return n?"dagur":a?"dag":"degi";case"dd":return t(e)?n?i+"dagar":i+(a?"daga":"dögum"):n?i+"dagur":i+(a?"dag":"degi");case"M":return n?"mánuður":a?"mánuð":"mánuði";case"MM":return t(e)?n?i+"mánuðir":i+(a?"mánuði":"mánuðum"):n?i+"mánuður":i+(a?"mánuð":"mánuði");case"y":return n||a?"ár":"ári";case"yy":return t(e)?i+(n||a?"ár":"árum"):i+(n||a?"ár":"ári")}}e.defineLocale("is",{months:"janúar_febrúar_mars_apríl_maí_júní_júlí_ágúst_september_október_nóvember_desember".split("_"),monthsShort:"jan_feb_mar_apr_maí_jún_júl_ágú_sep_okt_nóv_des".split("_"),weekdays:"sunnudagur_mánudagur_þriðjudagur_miðvikudagur_fimmtudagur_föstudagur_laugardagur".split("_"),weekdaysShort:"sun_mán_þri_mið_fim_fös_lau".split("_"),weekdaysMin:"Su_Má_Þr_Mi_Fi_Fö_La".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY [kl.] H:mm",LLLL:"dddd, D. MMMM YYYY [kl.] H:mm"},calendar:{sameDay:"[í dag kl.] LT",nextDay:"[á morgun kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[í gær kl.] LT",lastWeek:"[síðasta] dddd [kl.] LT",sameElse:"L"},relativeTime:{future:"eftir %s",past:"fyrir %s síðan",s:n,ss:n,m:n,mm:n,h:"klukkustund",hh:n,d:n,dd:n,M:n,MM:n,y:n,yy:n},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(381))},150:function(e,t,n){!function(e){"use strict";e.defineLocale("it-ch",{months:"gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre".split("_"),monthsShort:"gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic".split("_"),weekdays:"domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato".split("_"),weekdaysShort:"dom_lun_mar_mer_gio_ven_sab".split("_"),weekdaysMin:"do_lu_ma_me_gi_ve_sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Oggi alle] LT",nextDay:"[Domani alle] LT",nextWeek:"dddd [alle] LT",lastDay:"[Ieri alle] LT",lastWeek:function(){return 0===this.day()?"[la scorsa] dddd [alle] LT":"[lo scorso] dddd [alle] LT"},sameElse:"L"},relativeTime:{future:function(e){return(/^[0-9].+$/.test(e)?"tra":"in")+" "+e},past:"%s fa",s:"alcuni secondi",ss:"%d secondi",m:"un minuto",mm:"%d minuti",h:"un'ora",hh:"%d ore",d:"un giorno",dd:"%d giorni",M:"un mese",MM:"%d mesi",y:"un anno",yy:"%d anni"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}})}(n(381))},626:function(e,t,n){!function(e){"use strict";e.defineLocale("it",{months:"gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre".split("_"),monthsShort:"gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic".split("_"),weekdays:"domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato".split("_"),weekdaysShort:"dom_lun_mar_mer_gio_ven_sab".split("_"),weekdaysMin:"do_lu_ma_me_gi_ve_sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:function(){return"[Oggi a"+(this.hours()>1?"lle ":0===this.hours()?" ":"ll'")+"]LT"},nextDay:function(){return"[Domani a"+(this.hours()>1?"lle ":0===this.hours()?" ":"ll'")+"]LT"},nextWeek:function(){return"dddd [a"+(this.hours()>1?"lle ":0===this.hours()?" ":"ll'")+"]LT"},lastDay:function(){return"[Ieri a"+(this.hours()>1?"lle ":0===this.hours()?" ":"ll'")+"]LT"},lastWeek:function(){return 0===this.day()?"[La scorsa] dddd [a"+(this.hours()>1?"lle ":0===this.hours()?" ":"ll'")+"]LT":"[Lo scorso] dddd [a"+(this.hours()>1?"lle ":0===this.hours()?" ":"ll'")+"]LT"},sameElse:"L"},relativeTime:{future:"tra %s",past:"%s fa",s:"alcuni secondi",ss:"%d secondi",m:"un minuto",mm:"%d minuti",h:"un'ora",hh:"%d ore",d:"un giorno",dd:"%d giorni",w:"una settimana",ww:"%d settimane",M:"un mese",MM:"%d mesi",y:"un anno",yy:"%d anni"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}})}(n(381))},9183:function(e,t,n){!function(e){"use strict";e.defineLocale("ja",{eras:[{since:"2019-05-01",offset:1,name:"令和",narrow:"㋿",abbr:"R"},{since:"1989-01-08",until:"2019-04-30",offset:1,name:"平成",narrow:"㍻",abbr:"H"},{since:"1926-12-25",until:"1989-01-07",offset:1,name:"昭和",narrow:"㍼",abbr:"S"},{since:"1912-07-30",until:"1926-12-24",offset:1,name:"大正",narrow:"㍽",abbr:"T"},{since:"1873-01-01",until:"1912-07-29",offset:6,name:"明治",narrow:"㍾",abbr:"M"},{since:"0001-01-01",until:"1873-12-31",offset:1,name:"西暦",n
vendor: 6,530 bytes, line 12246
12246arrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"紀元前",narrow:"BC",abbr:"BC"}],eraYearOrdinalRegex:/(元|\d+)年/,eraYearOrdinalParse:function(e,t){return"元"===t[1]?1:parseInt(t[1]||e,10)},months:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"日曜日_月曜日_火曜日_水曜日_木曜日_金曜日_土曜日".split("_"),weekdaysShort:"日_月_火_水_木_金_土".split("_"),weekdaysMin:"日_月_火_水_木_金_土".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日 HH:mm",LLLL:"YYYY年M月D日 dddd HH:mm",l:"YYYY/MM/DD",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日(ddd) HH:mm"},meridiemParse:/午前|午後/i,isPM:function(e){return"午後"===e},meridiem:function(e,t,n){return e<12?"午前":"午後"},calendar:{sameDay:"[今日] LT",nextDay:"[明日] LT",nextWeek:function(e){return e.week()!==this.week()?"[来週]dddd LT":"dddd LT"},lastDay:"[昨日] LT",lastWeek:function(e){return this.week()!==e.week()?"[先週]dddd LT":"dddd LT"},sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}日/,ordinal:function(e,t){switch(t){case"y":return 1===e?"元年":e+"年";case"d":case"D":case"DDD":return e+"日";default:return e}},relativeTime:{future:"%s後",past:"%s前",s:"数秒",ss:"%d秒",m:"1分",mm:"%d分",h:"1時間",hh:"%d時間",d:"1日",dd:"%d日",M:"1ヶ月",MM:"%dヶ月",y:"1年",yy:"%d年"}})}(n(381))},4286:function(e,t,n){!function(e){"use strict";e.defineLocale("jv",{months:"Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_Nopember_Desember".split("_"),monthsShort:"Jan_Feb_Mar_Apr_Mei_Jun_Jul_Ags_Sep_Okt_Nop_Des".split("_"),weekdays:"Minggu_Senen_Seloso_Rebu_Kemis_Jemuwah_Septu".split("_"),weekdaysShort:"Min_Sen_Sel_Reb_Kem_Jem_Sep".split("_"),weekdaysMin:"Mg_Sn_Sl_Rb_Km_Jm_Sp".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] HH.mm",LLLL:"dddd, D MMMM YYYY [pukul] HH.mm"},meridiemParse:/enjing|siyang|sonten|ndalu/,meridiemHour:function(e,t){return 12===e&&(e=0),"enjing"===t?e:"siyang"===t?e>=11?e:e+12:"sonten"===t||"ndalu"===t?e+12:void 0},meridiem:function(e,t,n){return e<11?"enjing":e<15?"siyang":e<19?"sonten":"ndalu"},calendar:{sameDay:"[Dinten puniko pukul] LT",nextDay:"[Mbenjang pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kala wingi pukul] LT",lastWeek:"dddd [kepengker pukul] LT",sameElse:"L"},relativeTime:{future:"wonten ing %s",past:"%s ingkang kepengker",s:"sawetawis detik",ss:"%d detik",m:"setunggal menit",mm:"%d menit",h:"setunggal jam",hh:"%d jam",d:"sedinten",dd:"%d dinten",M:"sewulan",MM:"%d wulan",y:"setaun",yy:"%d taun"},week:{dow:1,doy:7}})}(n(381))},2105:function(e,t,n){!function(e){"use strict";e.defineLocale("ka",{months:"იანვარი_თებერვალი_მარტი_აპრილი_მაისი_ივნისი_ივლისი_აგვისტო_სექტემბერი_ოქტომბერი_ნოემბერი_დეკემბერი".split("_"),monthsShort:"იან_თებ_მარ_აპრ_მაი_ივნ_ივლ_აგვ_სექ_ოქტ_ნოე_დეკ".split("_"),weekdays:{standalone:"კვირა_ორშაბათი_სამშაბათი_ოთხშაბათი_ხუთშაბათი_პარასკევი_შაბათი".split("_"),format:"კვირას_ორშაბათს_სამშაბათს_ოთხშაბათს_ხუთშაბათს_პარასკევს_შაბათს".split("_"),isFormat:/(წინა|შემდეგ)/},weekdaysShort:"კვი_ორშ_სამ_ოთხ_ხუთ_პარ_შაბ".split("_"),weekdaysMin:"კვ_ორ_სა_ოთ_ხუ_პა_შა".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[დღეს] LT[-ზე]",nextDay:"[ხვალ] LT[-ზე]",lastDay:"[გუშინ] LT[-ზე]",nextWeek:"[შემდეგ] dddd LT[-ზე]",lastWeek:"[წინა] dddd LT-ზე",sameElse:"L"},relativeTime:{future:function(e){return e.replace(/(წამ|წუთ|საათ|წელ|დღ|თვ)(ი|ე)/,(function(e,t,n){return"ი"===n?t+"ში":t+n+"ში"}))},past:function(e){return/(წამი|წუთი|საათი|დღე|თვე)/.test(e)?e.replace(/(ი|ე)$/,"ის წინ"):/წელი/.test(e)?e.replace(/წელი$/,"წლის წინ"):e},s:"რამდენიმე წამი",ss:"%d წამი",m:"წუთი",mm:"%d წუთი",h:"საათი",hh:"%d საათი",d:"დღე",dd:"%d დღე",M:"თვე",MM:"%d თვე",y:"წელი",yy:"%d წელი"},dayOfMonthOrdinalParse:/0|1-ლი|მე-\d{1,2}|\d{1,2}-ე/,ordinal:function(e){return 0===e?e:1===e?e+"-ლი":e<20||e<=100&&e%20==0||e%100==0?"მე-"+e:e+"-ე"},week:{dow:1,doy:7}})}(n(381))},7772:function(e,t,n){!function(e){"use strict";var t={0:"-ші",1:"-ші",2:"-ші",3:"-ші",4:"-ші",5:"-ші",6:"-шы",7:"-ші",8:"-ші",9:"-шы",10:"-шы",20:"-шы",30:"-шы",40:"-шы",50:"-ші",60:"-шы",70:"-ші",80:"-ші",90:"-шы",100:"-ші"};e.defineLocale("kk",{months:"қаңтар_ақпан_наурыз_сәуір_мамыр_маусым_шілде_тамыз_қыркүйек_қазан_қараша_желтоқсан".split("_"),monthsShort:"қаң_ақп_нау_сәу_мам_мау_шіл_там_қыр_қаз_қар_жел".split("_"),weekdays:"жексенбі_дүйсенбі_сейсенбі_сәрсенбі_бейсенбі_жұма_сенбі".split("_"),weekdaysShort:"жек_дүй_сей_сәр_бей_жұм_сен".split("_"),weekdaysMin:"жк_дй_сй_ср_бй_жм_сн".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Бүгін сағат] LT",nextDay:"[Ертең сағат] LT",nextWeek:"dddd [сағат] LT",lastDay:"[Кеше сағат] LT",lastWeek:"[Өткен аптаның] dddd [сағат] LT",sameElse:"L"},relativeTime:{future:"%s ішінде",past:"%s бұрын",s:"бірнеше секунд",ss:"%d секунд",m:"бір минут",mm:"%d минут",h:"бір сағат",hh:"%
12246d сағат",d:"бір күн",dd:"%d күн",M:"бір ай",MM:"%d ай",y:"бір жыл",yy:"%d жыл"},dayOfMonthOrdinalParse:/\d{1,2}-(ші|шы)/,ordinal:function(e){return e+(t[e]||t[e%10]||t[e>=100?100:null])},week:{dow:1,doy:7}})}(n(381))},8758:function(e,t,n){!function(e){"use strict";var t={1:"១",2:"២",3:"៣",4:"៤",5:"៥",6:"៦",7:"៧",8:"៨",9:"៩",0:"០"},n={"១":"1","២":"2","៣":"3","៤":"4","៥":"5","៦":"6","៧":"7","៨":"8","៩":"9","០":"0"};e.defineLocale("km",{months:"មករា_កុម្ភៈ_មីនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ".split("_"),monthsShort:"មករា_កុម្ភៈ_មីនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ".split("_"),weekdays:"អាទិត្យ_ច័ន្ទ_អង្គារ_ពុធ_ព្រហស្បតិ៍_សុក្រ_សៅរ៍".split("_"),weekdaysShort:"អា_ច_អ_ព_ព្រ_សុ_ស".split("_"),weekdaysMin:"អា_ច_អ_ព_ព្រ_សុ_ស".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},meridiemParse:/ព្រឹក|ល្ងាច/,isPM:function(e){return"ល្ងាច"===e},meridiem:function(e,t,n){return e<12?"ព្រឹក":"ល្ងាច"},calendar:{sameDay:"[ថ្ងៃនេះ ម៉ោង] LT",nextDay:"[ស្អែក ម៉ោង] LT",nextWeek:"dddd [ម៉ោង] LT",lastDay:"[ម្សិលមិញ ម៉ោង] LT",lastWeek:"dddd [សប្តាហ៍មុន] [ម៉ោង] LT",sameElse:"L"},relativeTime:{future:"%sទៀត",past:"%sមុន",s:"ប៉ុន្មានវិនាទី",ss:"%d វិនាទី",m:"មួយនាទី",mm:"%d នាទី",h:"មួយម៉ោង",hh:"%d ម៉ោង",d:"មួយថ្ងៃ",dd:"%d ថ្ងៃ",M:"មួយខែ",MM:"%d ខែ",y:"មួយឆ្នាំ",yy:"%d ឆ្នាំ"},dayOfMonthOrdinalParse:/ទី\d{1,2}/,ordinal:"ទី%d",preparse:function(e){return e.replace(/[១២៣៤៥៦៧៨៩០]/g,(function(e){return n[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},week:{dow:1,doy:4}})}(n(381))},9282:function(e,t,n){!function(e){"use strict";var t={1:"೧",2:"೨",3:"೩",4:"೪",5:"೫",6:"೬",7:"೭",8:"೮",9:"೯",0:"೦"},n={"೧":"1","೨":"2","೩":"3","೪":"4","೫":"5","೬":"6","೭":"7","೮":"8","೯":"9","೦":"0"};e.defineLocale("kn",{months:"ಜನವರಿ_ಫೆಬ್ರವರಿ_ಮಾರ್ಚ್_ಏಪ್ರಿಲ್_ಮೇ_ಜೂನ್_ಜುಲೈ_ಆಗಸ್ಟ್_ಸೆಪ್ಟೆಂಬರ್_ಅಕ್ಟೋಬರ್_ನವೆಂಬರ್_ಡಿಸೆಂಬರ್".split("_"),monthsShort:"ಜನ_ಫೆಬ್ರ_ಮಾರ್ಚ್_ಏಪ್ರಿಲ್_ಮೇ_ಜೂನ್_ಜುಲೈ_ಆಗಸ್ಟ್_ಸೆಪ್ಟೆಂ_ಅಕ್ಟೋ_ನವೆಂ_ಡಿಸೆಂ".split("_"),monthsParseExact:!0,weekdays:"ಭಾನುವಾರ_ಸೋಮವಾರ_ಮಂಗಳವಾರ_ಬುಧವಾರ_ಗುರುವಾರ_ಶುಕ್ರವಾರ_ಶನಿವಾರ".split("_"),weekdaysShort:"ಭಾನು_ಸೋಮ_ಮಂಗಳ_ಬುಧ_ಗುರು_ಶುಕ್ರ_ಶನಿ".split("_"),weekdaysMin:"ಭಾ_ಸೋ_ಮಂ_ಬು_ಗು_ಶು_ಶ".split("_"),longDateFormat:{LT:"A h:mm",LTS:"A h:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm",LLLL:"dddd, D MMMM YYYY, A h:mm"},calendar:{sameDay:"[ಇಂದು] LT",nextDay:"[ನಾಳೆ] LT",nextWeek:"dddd, LT",lastDay:"[ನಿನ್ನೆ] LT",lastWeek:"[ಕೊನೆಯ] dddd, LT",sameElse:"L"},relativeTime:{future:"%s ನಂತರ",past:"%s ಹಿಂದೆ",s:"ಕೆಲವು ಕ್ಷಣಗಳು",ss:"%d ಸೆಕೆಂಡುಗಳು",m:"ಒಂದು ನಿಮಿಷ",mm:"%d ನಿಮಿಷ",h:"ಒಂ
12246ದು ಗಂಟೆ",hh:"%d ಗಂಟೆ",d:"ಒಂದು ದಿನ",dd:"%d ದಿನ",M:"ಒಂದು ತಿಂಗಳು",MM:"%d ತಿಂಗಳು",y:"ಒಂದು ವರ್ಷ",yy:"%d ವರ್ಷ"},preparse:function(e){return e.replace(/[೧೨೩೪೫೬೭೮೯೦]/g,(function(e){return n[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},meridiemParse:/ರಾತ್ರಿ|ಬೆಳಿಗ್ಗೆ|ಮಧ್ಯಾಹ್ನ|ಸಂಜೆ/,meridiemHour:function(e,t){return 12===e&&(e=0),"ರಾತ್ರಿ"===t?e<4?e:e+12:"ಬೆಳಿಗ್ಗೆ"===t?e:"ಮಧ್ಯಾಹ್ನ"===t?e>=10?e:e+12:"ಸಂಜೆ"===t?e+12:void 0},meridiem:function(e,t,n){return e<4?"ರಾತ್ರಿ":e<10?"ಬೆಳಿಗ್ಗೆ":e<17?"ಮಧ್ಯಾಹ್ನ":e<20?"ಸಂಜೆ":"ರಾತ್ರಿ"},dayOfMonthOrdinalParse:/\d{1,2}(ನೇ)/,ordinal:function(e){return e+"ನೇ"},week:{dow:0,doy:6}})}(n(381))},3730:function(e,t,n){!function(e){"use strict";e.defineLocale("ko",{months:"1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월".split("_"),monthsShort:"1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월".split("_"),weekdays:"일요일_월요일_화요일_수요일_목요일_금요일_토요일".split("_"),weekdaysShort:"일_월_화_수_목_금_토".split("_"),weekdaysMin:"일_월_화_수_목_금_토".split("_"),longDateFormat:{LT:"A h:mm",LTS:"A h:mm:ss",L:"YYYY.MM.DD.",LL:"YYYY년 MMMM D일",LLL:"YYYY년 MMMM D일 A h:mm",LLLL:"YYYY년 MMMM D일 dddd A h:mm",l:"YYYY.MM.DD.",ll:"YYYY년 MMMM D일",lll:"YYYY년 MMMM D일 A h:mm",llll:"YYYY년 MMMM D일 dddd A h:mm"},calendar:{sameDay:"오늘 LT",nextDay:"내일 LT",nextWeek:"dddd LT",lastDay:"어제 LT",lastWeek:"지난주 dddd LT",sameElse:"L"},relativeTime:{future:"%s 후",past:"%s 전",s:"몇 초",ss:"%d초",m:"1분",mm:"%d분",h:"한 시간",hh:"%d시간",d:"하루",dd:"%d일",M:"한 달",MM:"%d달",y:"일 년",yy:"%d년"},dayOfMonthOrdinalParse:/\d{1,2}(일|월|주)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"일";case"M":return e+"월";case"w":case"W":return e+"주";default:return e}},meridiemParse:/오전|오후/,isPM:function(e){return"오후"===e},meridiem:function(e,t,n){return e<12?"오전":"오후"}})}(n(381))},1408:function(e,t,n){!function(e){"use strict";var t={1:"١",2:"٢",3:"٣",4:"٤",5:"٥",6:"٦",7:"٧",8:"٨",9:"٩",0:"٠"},n={"١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","٠":"0"},r=["کانونی دووەم","شوبات","ئازار","نیسان","ئایار","حوزەیران","تەمموز","ئاب","ئەیلوول","تشرینی یەكەم","تشرینی دووەم","كانونی یەکەم"];e.defineLocale("ku",{months:r,monthsShort:r,weekdays:"یه‌كشه‌ممه‌_دووشه‌ممه‌_سێشه‌ممه‌_چوارشه‌ممه‌_پێنجشه‌ممه‌_هه‌ینی_شه‌ممه‌".split("_"),weekdaysShort:"یه‌كشه‌م_دووشه‌م_سێشه‌م_چوارشه‌م_پێنجشه‌م_هه‌ینی_شه‌ممه‌".split("_"),weekdaysMin:"ی_د_س_چ_پ_ه_ش".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},meridiemParse:/ئێواره‌|به‌یانی/,isPM:function(e){return/ئێواره‌/.test(e)},meridiem:function(e,t,n){return e<12?"به‌یانی":"ئێواره‌"},calendar:{sameDay:"[ئه‌مرۆ كاتژمێر] LT",nextDay:"[به‌یانی كاتژمێر] LT",nextWeek:"dddd [كاتژمێر] LT",lastDay:"[دوێنێ كاتژمێر] LT",lastWeek:"dddd [كاتژمێر] LT",sameElse:"L"},relativeTime:{future:"له‌ %s",past:"%s",s:"چه‌ند چركه‌یه‌ك",ss:"چركه‌ %d",m:"یه‌ك خوله‌ك",mm:"%d خوله‌ك",h:"یه‌ك كاتژمێر",hh:"%d كاتژمێر",d:"یه‌ك ڕۆژ",dd:"%d ڕۆژ",M:"یه‌ك مانگ",MM:"%d مانگ",y:"یه‌ك ساڵ",yy:"%d ساڵ"},preparse:function(e){return e.replace(/[١٢٣٤٥٦٧٨٩٠]/g,(function(e){return n[e]})).replace(/،/g,",")},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]})).replace(/,/g,"،")},week:{dow:6,doy:12}})}(n(381))},3291:function(e,t,n){!function(e){"use strict";var t={0:"-чү",1:"-чи",2:"-чи",3:"-чү",4:"-чү",5:"-чи",6:"-чы",7:"-чи",8:"-чи",9:"-чу",10:"-чу",20:"-чы",30:"-чу",40:"-чы",50:"-чү",60:"-чы",70:"-чи",80:"-чи",90:"-чу",100:"-чү"};e.defineLocale("ky",{months:"январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь".split("_"),monthsShort:"янв_фев_март_апр_май_июнь_июль_авг_сен_окт_ноя_дек".split("_"),weekdays:"Жекшемби_Дүйшөмбү_Шейшемби_Шаршемби_Бейшемби_Жума_Ишемби".split("_"),weekdaysShort:"Жек_Дүй_Шей_Шар_Бей_Жум_Ише".split("_"),weekdaysMin:"Жк_Дй_Шй_Шр_Бй_Жм_Иш".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Бүгүн саат] LT",nextDay:"[Эртең саат] LT",nextWeek:"dddd [саат] LT",lastDay:"[Кечээ саат] LT",lastWeek:"[Өткөн аптанын] dddd [күнү] [саат] LT",sameElse:"L"},relativeTime:{future:"%s ичинде",past:"%s мурун",s:"бирнече секунд",ss:"%d секунд",m:"бир мүнөт",mm:"%d мүнөт",h:"бир саат",hh:"%
12246d саат",d:"бир күн",dd:"%d күн",M:"бир ай",MM:"%d ай",y:"бир жыл",yy:"%d жыл"},dayOfMonthOrdinalParse:/\d{1,2}-(чи|чы|чү|чу)/,ordinal:function(e){return e+(t[e]||t[e%10]||t[e>=100?100:null])},week:{dow:1,doy:7}})}(n(381))},6841:function(e,t,n){!function(e){"use strict";function t(e,t,n,r){var a={m:["eng Minutt","enger Minutt"],h:["eng Stonn","enger Stonn"],d:["een Dag","engem Dag"],M:["ee Mount","engem Mount"],y:["ee Joer","engem Joer"]};return t?a[n][0]:a[n][1]}function n(e){if(e=parseInt(e,10),isNaN(e))return!1;if(e<0)return!0;if(e<10)return 4<=e&&e<=7;if(e<100){var t=e%10;return n(0===t?e/10:t)}if(e<1e4){for(;e>=10;)e/=10;return n(e)}return n(e/=1e3)}e.defineLocale("lb",{months:"Januar_Februar_Mäerz_Abrëll_Mee_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Febr._Mrz._Abr._Mee_Jun._Jul._Aug._Sept._Okt._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Sonndeg_Méindeg_Dënschdeg_Mëttwoch_Donneschdeg_Freideg_Samschdeg".split("_"),weekdaysShort:"So._Mé._Dë._Më._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mé_Dë_Më_Do_Fr_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm [Auer]",LTS:"H:mm:ss [Auer]",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm [Auer]",LLLL:"dddd, D. MMMM YYYY H:mm [Auer]"},calendar:{sameDay:"[Haut um] LT",sameElse:"L",nextDay:"[Muer um] LT",nextWeek:"dddd [um] LT",lastDay:"[Gëschter um] LT",lastWeek:function(){switch(this.day()){case 2:case 4:return"[Leschten] dddd [um] LT";default:return"[Leschte] dddd [um] LT"}}},relativeTime:{future:function(e){return n(e.substr(0,e.indexOf(" ")))?"a "+e:"an "+e},past:function(e){return n(e.substr(0,e.indexOf(" ")))?"viru "+e:"virun "+e},s:"e puer Sekonnen",ss:"%d Sekonnen",m:t,mm:"%d Minutten",h:t,hh:"%d Stonnen",d:t,dd:"%d Deeg",M:t,MM:"%d Méint",y:t,yy:"%d Joer"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(381))},5466:function(e,t,n){!function(e){"use strict";e.defineLocale("lo",{months:"ມັງກອນ_ກຸມພາ_ມີນາ_ເມສາ_ພຶດສະພາ_ມິຖຸນາ_ກໍລະກົດ_ສິງຫາ_ກັນຍາ_ຕຸລາ_ພະຈິກ_ທັນວາ".split("_"),monthsShort:"ມັງກອນ_ກຸມພາ_ມີນາ_ເມສາ_ພຶດສະພາ_ມິຖຸນາ_ກໍລະກົດ_ສິງຫາ_ກັນຍາ_ຕຸລາ_ພະຈິກ_ທັນວາ".split("_"),weekdays:"ອາທິດ_ຈັນ_ອັງຄານ_ພຸດ_ພະຫັດ_ສຸກ_ເສົາ".split("_"),weekdaysShort:"ທິດ_ຈັນ_ອັງຄານ_ພຸດ_ພະຫັດ_ສຸກ_ເສົາ".split("_"),weekdaysMin:"ທ_ຈ_ອຄ_ພ_ພຫ_ສກ_ສ".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"ວັນdddd D MMMM YYYY HH:mm"},meridiemParse:/ຕອນເຊົ້າ|ຕອນແລງ/,isPM:function(e){return"ຕອນແລງ"===e},meridiem:function(e,t,n){return e<12?"ຕອນເຊົ້າ":"ຕອນແລງ"},calendar:{sameDay:"[ມື້ນີ້ເວລາ] LT",nextDay:"[ມື້ອື່ນເວລາ] LT",nextWeek:"[ວັນ]dddd[ໜ້າເວລາ] LT",lastDay:"[ມື້ວານນີ້ເວລາ] LT",lastWeek:"[ວັນ]dddd[ແລ້ວນີ້ເວລາ] LT",sameElse:"L"},relativeTime:{future:"ອີກ %s",past:"%sຜ່ານມາ",s:"ບໍ່ເທົ່າໃດວິນາທີ",ss:"%d ວິນາທີ",m:"1 ນາທີ",mm:"%d ນາທີ",h:"1 ຊົ່ວໂມງ",hh:"%d ຊົ່ວໂມງ",d:"1 ມື້",dd:"%d ມື້",M:"1 ເດືອນ",MM:"%d ເດືອນ",y:"1 ປີ",yy:"%d ປີ"},dayOfMonthOrdinalParse:/(ທີ່)\d{1,2}/,ordinal:function(e){return"ທີ່"+e}})}(n(381))},7010:function(e,t,n){!function(e){"use strict";var t={ss:"sekundė_sekundžių_sekundes",m:"minutė_minutės_minutę",mm:"minutės_minučių_minutes",h:"valanda_valandos_valandą",hh:"valandos_valandų_valandas",d:"diena_dienos_dieną",dd:"dienos_dienų_dienas",M:"mėnuo_mėnesio_mėnesį",MM:"mėnesiai_mėnesių_mėnesius",y:"metai_metų_metus",yy:"metai_metų_metus"};function n(e,t,n,r){return t?a(n)[0]:r?a(n)[1]:a(n)[2]}function r(e){return e%10==0||e>10&&e<20}function a(e){return t[e].split("_")}function i(e,t,i,s){var o=e+" ";return 1===e?o+n(0,t,i[0],s):t?o+(r(e)?a(i)[1]:a(i)[0]):s?o+a(i)[1]:o+(r(e)?a(i)[1]:a(i)[2])}e.defineLocale("lt",{months:{format:"sausio_vasario_kovo_balandžio_gegužės_birželio_liepos_rugpjūčio_rugsėjo_spalio_lapkričio_gruodžio".split("_"),standalone:"sausis_vasaris_kovas_balandis_gegužė_birželis_liepa_rugpjūtis_rugsėjis_spalis_lapkritis_gruodis".split("_"),isFormat:/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?|MMMM?(\[[^\[\]]*\]|\s)+D[oD]?/},monthsShort:"sau_vas_kov_bal_geg_bir_lie_rgp_rgs_spa_lap_grd".split("_"),weekdays:{format:"sekmadienį_pirmadienį_antradienį_trečiadienį_ketvirtadienį_penktadienį_šeštadienį".split("_"),standalone:"sekmadienis_pirmadienis_antradienis_trečiadienis_ketvirtadienis_penktadienis_šeštadienis".split("_"),isFormat:/dddd HH:mm/},weekdaysShort:"Sek_Pir_Ant_Tre_Ket_Pen_Šeš".split("_"),weekdaysMin:"S_P_A_T_K_Pn_Š".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"YYYY [m.] MMMM D [d.]",LLL:"YYYY [m.] MMMM D [d.], HH:mm [val.]",LLLL:"YYYY [m.] MMMM D [d.], dddd, HH:mm [val.]",l:"YYYY-MM-DD",ll:"YYYY [m.] MMMM D [d.]",lll:"YYYY [m.] MMMM D [d.], HH:mm [val.]",llll:"YYYY [m.] MMMM D [d.], ddd, HH:mm [val.]"},calendar:{sameDay:"[Šiandien] LT",nextDay:"[Rytoj] LT",nextWeek:"dddd LT",lastDay:"[Vakar] LT",lastWeek:"[Praėjusį] dddd LT",sameElse:"L"},relativeTime:{future:"po %s",past:"prieš %s",s:function(e,t,n,r){return t?"kelios sekundės":r?"kelių sekundžių":"kelias sekundes"},ss:i,m:n,mm:i,h:n,hh:i,d:n,dd:i,M:n,MM:i,y:n,yy:i},dayOfMonthOrdinalParse:/\d{1,2}-oji/,ordinal:function(e){return e+"-oji"},week:{dow:1,doy:4}})}(n(381))},7595:function(e,t,n){!function(e){"use strict";var t={ss:"sekundes_sekundēm_sekunde_sekundes".split("_"),m:"minūtes_minūtēm_minūte_minūtes".split("_"),mm:"minūtes_minūtēm_minūte_minūtes".split("_"),h:"stundas_stundām_stunda_stundas".split("_"),hh:"stundas_stundām_stunda_stundas".split("_"),d:"dienas_die
12246nām_diena_dienas".split("_"),dd:"dienas_dienām_diena_dienas".split("_"),M:"mēneša_mēnešiem_mēnesis_mēneši".split("_"),MM:"mēneša_mēnešiem_mēnesis_mēneši".split("_"),y:"gada_gadiem_gads_gadi".split("_"),yy:"gada_gadiem_gads_gadi".split("_")};function n(e,t,n){return n?t%10==1&&t%100!=11?e[2]:e[3]:t%10==1&&t%100!=11?e[0]:e[1]}function r(e,r,a){return e+" "+n(t[a],e,r)}function a(e,r,a){return n(t[a],e,r)}e.defineLocale("lv",{months:"janvāris_februāris_marts_aprīlis_maijs_jūnijs_jūlijs_augusts_septembris_oktobris_novembris_decembris".split("_"),monthsShort:"jan_feb_mar_apr_mai_jūn_jūl_aug_sep_okt_nov_dec".split("_"),weekdays:"svētdiena_pirmdiena_otrdiena_trešdiena_ceturtdiena_piektdiena_sestdiena".split("_"),weekdaysShort:"Sv_P_O_T_C_Pk_S".split("_"),weekdaysMin:"Sv_P_O_T_C_Pk_S".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY.",LL:"YYYY. [gada] D. MMMM",LLL:"YYYY. [gada] D. MMMM, HH:mm",LLLL:"YYYY. [gada] D. MMMM, dddd, HH:mm"},calendar:{sameDay:"[Šodien pulksten] LT",nextDay:"[Rīt pulksten] LT",nextWeek:"dddd [pulksten] LT",lastDay:"[Vakar pulksten] LT",lastWeek:"[Pagājušā] dddd [pulksten] LT",sameElse:"L"},relativeTime:{future:"pēc %s",past:"pirms %s",s:function(e,t){return t?"dažas sekundes":"dažām sekundēm"},ss:r,m:a,mm:r,h:a,hh:r,d:a,dd:r,M:a,MM:r,y:a,yy:r},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(381))},9861:function(e,t,n){!function(e){"use strict";var t={words:{ss:["sekund","sekunda","sekundi"],m:["jedan minut","jednog minuta"],mm:["minut","minuta","minuta"],h:["jedan sat","jednog sata"],hh:["sat","sata","sati"],dd:["dan","dana","dana"],MM:["mjesec","mjeseca","mjeseci"],yy:["godina","godine","godina"]},correctGrammaticalCase:function(e,t){return 1===e?t[0]:e>=2&&e<=4?t[1]:t[2]},translate:function(e,n,r){var a=t.words[r];return 1===r.length?n?a[0]:a[1]:e+" "+t.correctGrammaticalCase(e,a)}};e.defineLocale("me",{months:"januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar".split("_"),monthsShort:"jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sri._čet._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_če_pe_su".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[danas u] LT",nextDay:"[sjutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedjelju] [u] LT";case 3:return"[u] [srijedu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[juče u] LT",lastWeek:function(){return["[prošle] [nedjelje] [u] LT","[prošlog] [ponedjeljka] [u] LT","[prošlog] [utorka] [u] LT","[prošle] [srijede] [u] LT","[prošlog] [četvrtka] [u] LT","[prošlog] [petka] [u] LT","[prošle] [subote] [u] LT"][this.day()]},sameElse:"L"},relativeTime:{future:"za %s",past:"prije %s",s:"nekoliko sekundi",ss:t.translate,m:t.translate,mm:t.translate,h:t.translate,hh:t.translate,d:"dan",dd:t.translate,M:"mjesec",MM:t.translate,y:"godinu",yy:t.translate},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}})}(n(381))},5493:function(e,t,n){!function(e){"use strict";e.defineLocale("mi",{months:"Kohi-tāte_Hui-tanguru_Poutū-te-rangi_Paenga-whāwhā_Haratua_Pipiri_Hōngoingoi_Here-turi-kōkā_Mahuru_Whiringa-ā-nuku_Whiringa-ā-rangi_Hakihea".split("_"),monthsShort:"Kohi_Hui_Pou_Pae_Hara_Pipi_Hōngoi_Here_Mahu_Whi-nu_Whi-ra_Haki".split("_"),monthsRegex:/(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i,monthsStrictRegex:/(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i,monthsShortRegex:/(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i,monthsShortStrictRegex:/(?:['a-z\u0101\u014D\u016B]+\-?){1,2}/i,weekdays:"Rātapu_Mane_Tūrei_Wenerei_Tāite_Paraire_Hātarei".split("_"),weekdaysShort:"Ta_Ma_Tū_We_Tāi_Pa_Hā".split("_"),weekdaysMin:"Ta_Ma_Tū_We_Tāi_Pa_Hā".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [i] HH:mm",LLLL:"dddd, D MMMM YYYY [i] HH:mm"},calendar:{sameDay:"[i teie mahana, i] LT",nextDay:"[apopo i] LT",nextWeek:"dddd [i] LT",lastDay:"[inanahi i] LT",lastWeek:"dddd [whakamutunga i] LT",sameElse:"L"},relativeTime:{future:"i roto i %s",past:"%s i mua",s:"te hēkona ruarua",ss:"%d hēkona",m:"he meneti",mm:"%d meneti",h:"te haora",hh:"%
12246d haora",d:"he ra",dd:"%d ra",M:"he marama",MM:"%d marama",y:"he tau",yy:"%d tau"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}})}(n(381))},5966:function(e,t,n){!function(e){"use strict";e.defineLocale("mk",{months:"јануари_февруари_март_април_мај_јуни_јули_август_септември_октомври_ноември_декември".split("_"),monthsShort:"јан_фев_мар_апр_мај_јун_јул_авг_сеп_окт_ное_дек".split("_"),weekdays:"недела_понеделник_вторник_среда_четврток_петок_сабота".split("_"),weekdaysShort:"нед_пон_вто_сре_чет_пет_саб".split("_"),weekdaysMin:"нe_пo_вт_ср_че_пе_сa".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"D.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY H:mm",LLLL:"dddd, D MMMM YYYY H:mm"},calendar:{sameDay:"[Денес во] LT",nextDay:"[Утре во] LT",nextWeek:"[Во] dddd [во] LT",lastDay:"[Вчера во] LT",lastWeek:function(){switch(this.day()){case 0:case 3:case 6:return"[Изминатата] dddd [во] LT";case 1:case 2:case 4:case 5:return"[Изминатиот] dddd [во] LT"}},sameElse:"L"},relativeTime:{future:"за %s",past:"пред %s",s:"неколку секунди",ss:"%d секунди",m:"една минута",mm:"%d минути",h:"еден час",hh:"%d часа",d:"еден ден",dd:"%d дена",M:"еден месец",MM:"%d месеци",y:"една година",yy:"%d години"},dayOfMonthOrdinalParse:/\d{1,2}-(ев|ен|ти|ви|ри|ми)/,ordinal:function(e){var t=e%10,n=e%100;return 0===e?e+"-ев":0===n?e+"-ен":n>10&&n<20?e+"-ти":1===t?e+"-ви":2===t?e+"-ри":7===t||8===t?e+"-ми":e+"-ти"},week:{dow:1,doy:7}})}(n(381))},7341:function(e,t,n){!function(e){"use strict";e.defineLocale("ml",{months:"ജനുവരി_ഫെബ്രുവരി_മാർച്ച്_ഏപ്രിൽ_മേയ്_ജൂൺ_ജൂലൈ_ഓഗസ്റ്റ്_സെപ്റ്റംബർ_ഒക്ടോബർ_നവംബർ_ഡിസംബർ".split("_"),monthsShort:"ജനു._ഫെബ്രു._മാർ._ഏപ്രി._മേയ്_ജൂൺ_ജൂലൈ._ഓഗ._സെപ്റ്റ._ഒക്ടോ._നവം._ഡിസം.".split("_"),monthsParseExact:!0,weekdays:"ഞായറാഴ്ച_തിങ്കളാഴ്ച_ചൊവ്വാഴ്ച_ബുധനാഴ്ച_വ്യാഴാഴ്ച_വെള്ളിയാഴ്ച_ശനിയാഴ്ച".split("_"),weekdaysShort:"ഞായർ_തിങ്കൾ_ചൊവ്വ_ബുധൻ_വ്യാഴം_വെള്ളി_ശനി".split("_"),weekdaysMin:"ഞാ_തി_ചൊ_ബു_വ്യാ_വെ_ശ".split("_"),longDateFormat:{LT:"A h:mm -നു",LTS:"A h:mm:ss -നു",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm -നു",LLLL:"dddd, D MMMM YYYY, A h:mm -നു"},calendar:{sameDay:"[ഇന്ന്] LT",nextDay:"[നാളെ] LT",nextWeek:"dddd, LT",lastDay:"[ഇന്നലെ] LT",lastWeek:"[കഴിഞ്ഞ] dddd, LT",sameElse:"L"},relativeTime:{future:"%s കഴിഞ്ഞ്",past:"%s മുൻപ്",s:"അൽപ നിമിഷങ്ങൾ",ss:"%d സെക്കൻഡ്",m:"ഒരു മിനിറ്റ്",mm:"%d മിനിറ്റ്",h:"ഒരു മണിക്കൂർ",hh:"%d മണിക്കൂർ",d:"ഒരു ദിവസം",dd:"%d ദിവസം",M:"ഒരു മാസം",MM:"%d മാസം",y:"ഒരു വർഷം",yy:"%d വർഷം"},meridiemParse:/രാത്രി|രാവിലെ|ഉച്ച കഴിഞ്ഞ്|വൈകുന്നേരം|രാത്രി/i,meridiemHour:function(e,t){return 12===e&&(e=0),"രാത്രി"===t&&e>=4||"ഉച്ച കഴിഞ്ഞ്"===t||"വൈകുന്നേരം"===t?e+12:e},meridiem:function(e,t,n){return e<4?"രാത്രി":e<12?"രാവിലെ":e<17?"ഉച്ച കഴിഞ്ഞ്":e<20?"വൈകുന്നേരം":"രാത്രി"}})}(n(381))},5115:function(e,t,n){!function(e){"use strict";function t(e,t,n,r){switch(n){case"s":return t?"хэдхэн секунд":"хэдхэн секундын";case"ss":return e+(t?" секунд":" секундын");case"m":case"mm":return e+(t?" минут":" минутын");case"h":case"hh":return e+(t?" цаг":" цагийн");case"d":case"dd":return e+(t?" өдөр":" өдрийн");case"M":case"MM":return e+(t?" сар":" сарын");case"y":case"yy":return e+(t?" жил":" жилийн");default:return e}}e.defineLocale("mn",{months:"Нэгдүгээр сар_Хоёрдугаар сар_Гуравдугаар сар_Дөрөвдүгээр сар_Тавдугаар сар_Зургадугаар сар_Долдугаар сар_Наймдугаар сар_Есдүгээр сар_Аравдугаар сар_Арван нэгдүгээр сар_Арван хоёрдугаар сар".split("_"),monthsShort:"1 сар_2 сар_3 сар_4 сар_5 сар_6 сар_7 сар_8 сар_9 сар_10 сар_11 сар_12 сар".split("_"),monthsParseExact:!0,weekdays:"Ням_Даваа_Мягмар_Лхагва_Пүрэв_Баасан_Бямба".split("_"),weekdaysShort:"Ням_Дав_Мяг_Лха_Пүр_Баа_Бям".split("_"),weekdaysMin:"Ня_Да_Мя_Лх_Пү_Ба_Бя".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"YYYY оны MMMMын D",LLL:"YYYY оны MMMMын D HH:mm",LLLL:"dddd, YYYY оны MMMMын D HH:mm"},meridiemParse:/ҮӨ|ҮХ/i,isPM:function(e){return"ҮХ"===e},meridiem:function(e,t,n){return e<12?"ҮӨ":"ҮХ"},calendar:{sameDay:"[Өнөөдөр] LT",nextDay:"[Маргааш
12246] LT",nextWeek:"[Ирэх] dddd LT",lastDay:"[Өчигдөр] LT",lastWeek:"[Өнгөрсөн] dddd LT",sameElse:"L"},relativeTime:{future:"%s дараа",past:"%s өмнө",s:t,ss:t,m:t,mm:t,h:t,hh:t,d:t,dd:t,M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2} өдөр/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+" өдөр";default:return e}}})}(n(381))},370:function(e,t,n){!function(e){"use strict";var t={1:"१",2:"२",3:"३",4:"४",5:"५",6:"६",7:"७",8:"८",9:"९",0:"०"},n={"१":"1","२":"2","३":"3","४":"4","५":"5","६":"6","७":"7","८":"8","९":"9","०":"0"};function r(e,t,n,r){var a="";if(t)switch(n){case"s":a="काही सेकंद";break;case"ss":a="%d सेकंद";break;case"m":a="एक मिनिट";break;case"mm":a="%d मिनिटे";break;case"h":a="एक तास";break;case"hh":a="%d तास";break;case"d":a="एक दिवस";break;case"dd":a="%d दिवस";break;case"M":a="एक महिना";break;case"MM":a="%d महिने";break;case"y":a="एक वर्ष";break;case"yy":a="%d वर्षे"}else switch(n){case"s":a="काही सेकंदां";break;case"ss":a="%d सेकंदां";break;case"m":a="एका मिनिटा";break;case"mm":a="%d मिनिटां";break;case"h":a="एका तासा";break;case"hh":a="%d तासां";break;case"d":a="एका दिवसा";break;case"dd":a="%d दिवसां";break;case"M":a="एका महिन्या";break;case"MM":a="%d महिन्यां";break;case"y":a="एका वर्षा";break;case"yy":a="%d वर्षां"}return a.replace(/%d/i,e)}e.defineLocale("mr",{months:"जानेवारी_फेब्रुवारी_मार्च_एप्रिल_मे_जून_जुलै_ऑगस्ट_सप्टेंबर_ऑक्टोबर_नोव्हेंबर_डिसेंबर".split("_"),monthsShort:"जाने._फेब्रु._मार्च._एप्रि._मे._जून._जुलै._ऑग._सप्टें._ऑक्टो._नोव्हें._डिसें.".split("_"),monthsParseExact:!0,weekdays:"रविवार_सोमवार_मंगळवार_बुधवार_गुरूवार_शुक्रवार_शनिवार".split("_"),weekdaysShort:"रवि_सोम_मंगळ_बुध_गुरू_शुक्र_शनि".split("_"),weekdaysMin:"र_सो_मं_बु_गु_शु_श".split("_"),longDateFormat:{LT:"A h:mm वाजता",LTS:"A h:mm:ss वाजता",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm वाजता",LLLL:"dddd, D MMMM YYYY, A h:mm वाजता"},calendar:{sameDay:"[आज] LT",nextDay:"[उद्या] LT",nextWeek:"dddd, LT",lastDay:"[काल] LT",lastWeek:"[मागील] dddd, LT",sameElse:"L"},relativeTime:{future:"%sमध्ये",past:"%sपूर्वी",s:r,ss:r,m:r,mm:r,h:r,hh:r,d:r,dd:r,M:r,MM:r,y:r,yy:r},preparse:function(e){return e.replace(/[१२३४५६७८९०]/g,(function(e){return n[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},meridiemParse:/पहाटे|सकाळी|दुपारी|सायंकाळी|रात्री/,meridiemHour:function(e,t){return 12===e&&(e=0),"पहाटे"===t||"सकाळी"===t?e:"दुपारी"===t||"सायंकाळी"===t||"रात्री"===t?e>=12?e:e+12:void 0},meridiem:function(e,t,n){return e>=0&&e<6?"पहाटे":e<12?"सकाळी":e<17?"दुपारी":e<20?"सायंकाळी":"रात्री"},week:{dow:0,doy:6}})}(n(381))},1237:function(e,t,n){!function(e){"use strict";e.defineLocale("ms-my",{months:"Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember".split("_"),monthsShort:"Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis".split("_"),weekdays:"Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu".split("_"),weekdaysShort:"Ahd_Isn_Sel_Rab_Kha_Jum_Sab".split("_"),weekdaysMin:"Ah_Is_Sl_Rb_Km_Jm_Sb".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] HH.mm",LLLL:"dddd, D MMMM YYYY [pukul] HH.mm"},meridiemParse:/pagi|tengahari|petang|malam/,meridiemHour:function(e,t){return 12===e&&(e=0),"pagi"===t?e:"tengahari"===t?e>=11?e:e+12:"petang"===t||"malam"===t?e+12:void 0},meridiem:function(e,t,n){return e<11?"pagi":e<15?"tengahari":e<19?"petang":"malam"},calendar:{sameDay:"[Hari ini pukul] LT",nextDay:"[Esok pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kelmarin pukul] LT",lastWeek:"dddd [lepas pukul] LT",sameElse:"L"},relativeTime:{future:"dalam %s",past:"%s yang lepas",s:"beberapa saat",ss:"%d saat",m:"seminit",mm:"%d minit",h:"sejam",hh:"%d jam",d:"sehari",dd:"%d hari",M:"sebulan",MM:"%d bulan",y:"setahun",yy:"%d tahun"},week:{dow:1,doy:7}})}(n(381))},9847:function(e,t,n){!function(e){"use strict";e.defineLocale("ms",{months:"Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember".split("_"),monthsShort:"Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis".split("_"),weekdays:"Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu".split("_"),weekdaysShort:"Ahd_Isn_Sel_Rab_Kha_Jum_Sab".split("_"),weekdaysMin:"Ah_Is_Sl_Rb_Km_Jm_Sb".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] HH.mm",LLLL:"dddd, D MMMM YYYY [pukul] HH.mm"},meridiemParse:/pagi|tengahari|petang|malam/,meridiemHour:function(e,t){return 12===e&&(e=0),"pagi"===t?e:"tengahari"===t?e>=11?e:e+12:"petang"===t||"malam"===t?e+12:void 0},meridiem:function(e,t,n){return e<11?"pagi":e<15?"tengahari":e<19?"petang":"malam"},calendar:{sameDay:"[Hari ini pukul] LT",nextDay:"[Esok pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kelmarin pukul] LT",lastWeek:"dddd [lepas pukul] LT",sameElse:"L"},relativeTime:{future:"dalam %s",past:"%s yang lepas",s:"beberapa saat",ss:"%d saat",m:"seminit",mm:"%d minit",h:"sejam",hh:"%d jam",d:"sehari",dd:"%d hari",M:"sebulan",MM:"%d bulan",y:"setahun",yy:"%d tahun"},week:{dow:1,doy:7}})}(n(381))},2126:function(e,t,n){!function(e){"use strict";e.defineLocale("mt",{months:"Jannar_Frar_Marzu_April_Mejju_Ä unju_Lulju_Awwissu_Settembru_Ottubru_Novembru_Diċembru".split("_"),monthsShort:"Jan_Fra_Mar_Apr_Mej_Ä un_Lul_Aww_Set_Ott_Nov_Diċ".split("_"),weekdays:"Il-Ħadd_It-Tnejn_It-Tlieta_L-Erbgħa_Il-Ħamis_Il-Ä imgħa_Is-Sibt".split("_"),weekdaysShort:"Ħad_Tne_Tli_Erb_Ħam_Ä im_Sib".split("_"),weekdaysMin:"Ħa_Tn_Tl_Er_Ħa_Ä i_Si".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Illum fil-]LT",nextDay:"[Għada fil-]LT",nextWeek:"dddd [fil-]LT",lastDay:"[Il-bieraħ fil-]LT",lastWeek:"dddd [li għadda] [fil-]LT",sameElse:"L"},relativeTime:{future:"f’ %s",past:"%s ilu",s:"ftit sekondi",ss:"%d sekondi",m:"minuta",mm:"%d minuti",h:"siegħa",hh:"%d siegħat",d:"Ä¡urnata",dd:"%d Ä¡ranet",M:"xahar",MM:"%d xhur",y:"sena",yy:"%d sni"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}})}(n(381))},6165:function(e,t,n){!function(e){"use strict";var t={1:"၁",2:"၂",3:"၃",4:"၄",5:"၅",6:"၆",7:"၇",8:"၈",9:"၉",0:"၀"},n={"၁":"1","၂":"2","၃":"3","၄":"4","၅":"5","၆":"6","၇":"7","၈":"8","၉":"9","၀":"0"};e.defineLocale("my",{months:"ဇန်နဝါရီ_ဖေဖော်ဝါရီ_မတ်_ဧပြီ_မေ_ဇွန်_ဇူလိုင်_သြဂုတ်_စက်တင်ဘာ_အောက်တိုဘာ_နိုဝင်ဘာ_ဒီဇင်ဘာ".split("_"),monthsShort:"ဇန်_ဖေ_မတ်_ပြီ_မေ_ဇွန်_လိုင်_သြ_စက်_အောက်_နို_ဒီ".split("_"),weekdays:"တနင်္ဂနွေ_တနင်္လာ_အင်္ဂါ_ဗုဒ္ဓဟူး_ကြာသပတေး_သောကြာ_စနေ".split("_"),weekdaysShort:"နွေ_လာ_ဂါ_ဟူး_ကြာ_သော_နေ".split("_"),weekdaysMin:"နွေ_လာ_ဂါ_ဟူး_ကြာ_သော_နေ".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[ယနေ.] LT [မှာ]",nextDay:"[မနက်ဖြန်] LT [မှာ]",nextWeek:"dddd LT [မှာ]",lastDay:"[မနေ.က] LT [မှာ]",lastWeek:"[ပြီးခဲ့သော] dddd LT [မှာ]",sameElse:"L"},relativeTime:{future:"လာမည့် %s မှာ",past:"လွန်ခဲ့သော %s က",s:"စက္ကန်.အနညá€
12246ºá€¸á€„ယ်",ss:"%d စက္ကန့်",m:"တစ်မိနစ်",mm:"%d မိနစ်",h:"တစ်နာရီ",hh:"%d နာရီ",d:"တစ်ရက်",dd:"%d ရက်",M:"တစ်လ",MM:"%d လ",y:"တစ်နှစ်",yy:"%d နှစ်"},preparse:function(e){return e.replace(/[၁၂၃၄၅၆၇၈၉၀]/g,(function(e){return n[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},week:{dow:1,doy:4}})}(n(381))},4924:function(e,t,n){!function(e){"use strict";e.defineLocale("nb",{months:"januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember".split("_"),monthsShort:"jan._feb._mars_apr._mai_juni_juli_aug._sep._okt._nov._des.".split("_"),monthsParseExact:!0,weekdays:"søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag".split("_"),weekdaysShort:"sø._ma._ti._on._to._fr._lø.".split("_"),weekdaysMin:"sø_ma_ti_on_to_fr_lø".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY [kl.] HH:mm",LLLL:"dddd D. MMMM YYYY [kl.] HH:mm"},calendar:{sameDay:"[i dag kl.] LT",nextDay:"[i morgen kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[i gÃ¥r kl.] LT",lastWeek:"[forrige] dddd [kl.] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"%s siden",s:"noen sekunder",ss:"%d sekunder",m:"ett minutt",mm:"%d minutter",h:"en time",hh:"%d timer",d:"en dag",dd:"%d dager",w:"en uke",ww:"%d uker",M:"en mÃ¥ned",MM:"%d mÃ¥neder",y:"ett Ã¥r",yy:"%d Ã¥r"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(381))},6744:function(e,t,n){!function(e){"use strict";var t={1:"१",2:"२",3:"३",4:"४",5:"५",6:"६",7:"७",8:"८",9:"९",0:"०"},n={"१":"1","२":"2","३":"3","४":"4","५":"5","६":"6","७":"7","८":"8","९":"9","०":"0"};e.defineLocale("ne",{months:"जनवरी_फेब्रुवरी_मार्च_अप्रिल_मई_जुन_जुलाई_अगष्ट_सेप्टेम्बर_अक्टोबर_नोभेम्बर_डिसेम्बर".split("_"),monthsShort:"जन._फेब्रु._मार्च_अप्रि._मई_जुन_जुलाई._अग._सेप्ट._अक्टो._नोभे._डिसे.".split("_"),monthsParseExact:!0,weekdays:"आइतबार_सोमबार_मङ्गलबार_बुधबार_बिहिबार_शुक्रबार_शनिबार".split("_"),weekdaysShort:"आइत._सोम._मङ्गल._बुध._बिहि._शुक्र._शनि.".split("_"),weekdaysMin:"आ._सो._मं._बु._बि._शु._श.".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"Aको h:mm बजे",LTS:"Aको h:mm:ss बजे",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, Aको h:mm बजे",LLLL:"dddd, D MMMM YYYY, Aको h:mm बजे"},preparse:function(e){return e.replace(/[१२३४५६७८९०]/g,(function(e){return n[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},meridiemParse:/राति|बिहान|दिउँसो|साँझ/,meridiemHour:function(e,t){return 12===e&&(e=0),"राति"===t?e<4?e:e+12:"बिहान"===t?e:"दिउँसो"===t?e>=10?e:e+12:"साँझ"===t?e+12:void 0},meridiem:function(e,t,n){return e<3?"राति":e<12?"बिहान":e<16?"दिउँसो":e<20?"साँझ":"राति"},calendar:{sameDay:"[आज] LT",nextDay:"[भोलि] LT",nextWeek:"[आउँदो] dddd[,] LT",lastDay:"[हिजो] LT",lastWeek:"[गएको] dddd[,] LT",sameElse:"L"},relativeTime:{future:"%sमा",past:"%s अगाडि",s:"केही क्षण",ss:"%d सेकेण्ड",m:"एक मिनेट",mm:"%d मिनेट",h:"एक घण्टा",hh:"%d घण्टा",d:"एक दिन",dd:"%d दिन",M:"एक महिना",MM:"%d महिना",y:"एक बर्ष",yy:"%d बर्ष"},week:{dow:0,doy:6}})}(n(381))},9814:function(e,t,n){!function(e){"use strict";var t="jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.".split("_"),n="jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec".split("_"),r=[/^jan/i,/^feb/i,/^maart|mrt.?$/i,/^apr/i,/^mei$/i,/^jun[i.]?$/i,/^jul[i.]?$/i,/^aug/i,/^sep/i,/^okt/i,/^nov/i,/^dec/i],a=/^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december|jan\.?|feb\.?|mrt\.?|apr\.?|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i;e.defineLocale("nl-be",{months:"januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december".split("_"),monthsShort:function(e,r){return e?/-MMM-/.test(r)?n[e.month()]:t[e.month()]:t},monthsRegex:a,monthsShortRegex:a,monthsStrictRegex:/^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december)/i,monthsShortStrictRegex:/^(jan\.?|feb\.?|mrt\.?|apr\.?|mei|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i,monthsParse:r,longMonthsParse:r,shortMonthsParse:r,weekdays:"zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag".split("_"),weekdaysShort:"zo._ma._di._wo._do._vr._za.".split("_"),weekdaysMin:"zo_ma_di_wo_do_vr_za".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[vandaag om] LT",nextDay:"[morgen om] LT",nextWeek:"dddd [om] LT",lastDay:"[gisteren om] LT",lastWeek:"[afgelopen] dddd [om] LT",sameElse:"L"},relativeTime:{future:"over %s",past:"%s geleden",s:"een paar seconden",ss:"%d seconden",m:"één minuut",mm:"%d minuten",h:"één uur",hh:"%d uur",d:"één dag",dd:"%d dagen",M:"één maand",MM:"%d maanden",y:"één jaar",yy:"%d jaar"},dayOfMonthOrdinalParse:/\d{1,2}(ste|de)/,ordinal:function(e){return e+(1===e||8===e||e>=20?"ste":"de")},week:{dow:1,doy:4}})}(n(381))},3901:function(e,t,n){!function(e){"use strict";var t="jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.".split("_"),n="jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec".split("_"),r=[/^jan/i,/^feb/i,/^maart|mrt.?$/i,/^apr/i,/^mei$/i,/^jun[i.]?$/i,/^jul[i.]?$/i,/^aug/i,/^sep/i,/^okt/i,/^nov/i,/^dec/i],a=/^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december|jan\.?|feb\.?|mrt\.?|apr\.?|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i;e.defineLocale("nl",{months:"januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december".split("_"),monthsShort:function(e,r){return e?/-MMM-/.test(r)?n[e.month()]:t[e.month()]:t},monthsRegex:a,monthsShortRegex:a,monthsStrictRegex:/^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december)/i,monthsShortStrictRegex:/^(jan\.?|feb\.?|mrt\.?|apr\.?|mei|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i,monthsParse:r,longMonthsParse:r,shortMonthsParse:r,weekdays:"zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag".split("_"),weekdaysShort:"zo._ma._di._wo._do._vr._za.".split("_"),weekdaysMin:"zo_ma_di_wo_do_vr_za".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[vandaag om] LT",nextDay:"[morgen om] LT",nextWeek:"dddd [om] LT",lastDay:"[gisteren om] LT",lastWeek:"[afgelopen] dddd [om] LT",sameElse:"L"},relativeTime:{future:"over %s",past:"%s geleden",s:"een paar seconden",ss:"%d seconden",m:"één minuut",mm:"%d minuten",h:"één uur",hh:"%d uur",d:"één dag",dd:"%d dagen",w:"één week",ww:"%d weken",M:"één maand",MM:"%d maanden",y:"één jaar",yy:"%d jaar"},dayOfMonthOrdinalParse:/\d{1,2}(ste|de)/,ordinal:function(e){return e+(1===e||8===e||e>=20?"ste":"de")},week:{dow:1,doy:4}})}(n(381))},3877:function(e,t,n){!function(e){"use strict";e.defineLocale("nn",{months:"januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember".split("_"),monthsShort:"jan._feb._mars_apr._mai_juni_juli_aug._sep._okt._nov._des.".split("_"),monthsParseExact:!0,weekdays:"sundag_mÃ¥ndag_tysdag_onsdag_torsdag_fredag_laurdag".split("_"),weekdaysShort:"su._mÃ¥._t
12246y._on._to._fr._lau.".split("_"),weekdaysMin:"su_må_ty_on_to_fr_la".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY [kl.] H:mm",LLLL:"dddd D. MMMM YYYY [kl.] HH:mm"},calendar:{sameDay:"[I dag klokka] LT",nextDay:"[I morgon klokka] LT",nextWeek:"dddd [klokka] LT",lastDay:"[I går klokka] LT",lastWeek:"[Føregåande] dddd [klokka] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"%s sidan",s:"nokre sekund",ss:"%d sekund",m:"eit minutt",mm:"%d minutt",h:"ein time",hh:"%d timar",d:"ein dag",dd:"%d dagar",w:"ei veke",ww:"%d veker",M:"ein månad",MM:"%d månader",y:"eit år",yy:"%d år"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(381))},2135:function(e,t,n){!function(e){"use strict";e.defineLocale("oc-lnc",{months:{standalone:"genièr_febrièr_març_abril_mai_junh_julhet_agost_setembre_octòbre_novembre_decembre".split("_"),format:"de genièr_de febrièr_de març_d'abril_de mai_de junh_de julhet_d'agost_de setembre_d'octòbre_de novembre_de decembre".split("_"),isFormat:/D[oD]?(\s)+MMMM/},monthsShort:"gen._febr._març_abr._mai_junh_julh._ago._set._oct._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"dimenge_diluns_dimars_dimècres_dijòus_divendres_dissabte".split("_"),weekdaysShort:"dg._dl._dm._dc._dj._dv._ds.".split("_"),weekdaysMin:"dg_dl_dm_dc_dj_dv_ds".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM [de] YYYY",ll:"D MMM YYYY",LLL:"D MMMM [de] YYYY [a] H:mm",lll:"D MMM YYYY, H:mm",LLLL:"dddd D MMMM [de] YYYY [a] H:mm",llll:"ddd D MMM YYYY, H:mm"},calendar:{sameDay:"[uèi a] LT",nextDay:"[deman a] LT",nextWeek:"dddd [a] LT",lastDay:"[ièr a] LT",lastWeek:"dddd [passat a] LT",sameElse:"L"},relativeTime:{future:"d'aquí %s",past:"fa %s",s:"unas segondas",ss:"%d segondas",m:"una minuta",mm:"%d minutas",h:"una ora",hh:"%d oras",d:"un jorn",dd:"%d jorns",M:"un mes",MM:"%d meses",y:"un an",yy:"%d ans"},dayOfMonthOrdinalParse:/\d{1,2}(r|n|t|è|a)/,ordinal:function(e,t){var n=1===e?"r":2===e?"n":3===e?"r":4===e?"t":"è";return"w"!==t&&"W"!==t||(n="a"),e+n},week:{dow:1,doy:4}})}(n(381))},5858:function(e,t,n){!function(e){"use strict";var t={1:"੧",2:"੨",3:"੩",4:"੪",5:"੫",6:"੬",7:"੭",8:"੮",9:"੯",0:"੦"},n={"੧":"1","੨":"2","੩":"3","੪":"4","੫":"5","੬":"6","੭":"7","੮":"8","੯":"9","੦":"0"};e.defineLocale("pa-in",{months:"ਜਨਵਰੀ_ਫ਼ਰਵਰੀ_ਮਾਰਚ_ਅਪ੍ਰੈਲ_ਮਈ_ਜੂਨ_ਜੁਲਾਈ_ਅਗਸਤ_ਸਤੰਬਰ_ਅਕਤੂਬਰ_ਨਵੰਬਰ_ਦਸੰਬਰ".split("_"),monthsShort:"ਜਨਵਰੀ_ਫ਼ਰਵਰੀ_ਮਾਰਚ_ਅਪ੍ਰੈਲ_ਮਈ_ਜੂਨ_ਜੁਲਾਈ_ਅਗਸਤ_ਸਤੰਬਰ_ਅਕਤੂਬਰ_ਨਵੰਬਰ_ਦਸੰਬਰ".split("_"),weekdays:"ਐਤਵਾਰ_ਸੋਮਵਾਰ_ਮੰਗਲਵਾਰ_ਬੁਧਵਾਰ_ਵੀਰਵਾਰ_ਸ਼ੁੱਕਰਵਾਰ_ਸ਼ਨੀਚਰਵਾਰ".split("_"),weekdaysShort:"ਐਤ_ਸੋਮ_ਮੰਗਲ_ਬੁਧ_ਵੀਰ_ਸ਼ੁਕਰ_ਸ਼ਨੀ".split("_"),weekdaysMin:"ਐਤ_ਸੋਮ_ਮੰਗਲ_ਬੁਧ_ਵੀਰ_ਸ਼ੁਕਰ_ਸ਼ਨੀ".split("_"),longDateFormat:{LT:"A h:mm ਵਜੇ",LTS:"A h:mm:ss ਵਜੇ",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm ਵਜੇ",LLLL:"dddd, D MMMM YYYY, A h:mm ਵਜੇ"},calendar:{sameDay:"[ਅਜ] LT",nextDay:"[ਕਲ] LT",nextWeek:"[ਅਗਲਾ] dddd, LT",lastDay:"[ਕਲ] LT",lastWeek:"[ਪਿਛਲੇ] dddd, LT",sameElse:"L"},relativeTime:{future:"%s ਵਿੱਚ",past:"%s ਪਿਛਲੇ",s:"ਕੁਝ ਸਕਿੰਟ",ss:"%d ਸਕਿੰਟ",m:"ਇਕ ਮਿੰਟ",mm:"%d ਮਿੰਟ",h:"ਇੱਕ ਘੰਟਾ",hh:"%d ਘੰਟੇ",d:"ਇੱਕ ਦਿਨ",dd:"%d ਦਿਨ",M:"ਇੱਕ ਮਹੀਨਾ",MM:"%d ਮਹੀਨੇ",y:"ਇੱਕ ਸਾਲ",yy:"%d ਸਾਲ"},preparse:function(e){return e.replace(/[੧੨੩੪੫੬੭੮੯੦]/g,(function(e){return n[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},meridiemParse:/ਰਾਤ|ਸਵੇਰ|ਦੁਪਹਿਰ|ਸ਼ਾਮ/,meridiemHour:function(e,t){return 12===e&&(e=0),"ਰਾਤ"===t?e<4?e:e+12:"ਸਵੇਰ"===t?e:"ਦੁਪਹਿਰ"===t?e>=10?e:e+12:"ਸ਼ਾਮ"===t?e+12:void 0},meridiem:function(e,t,n){return e<4?"ਰਾਤ":e<10?"ਸਵੇਰ":e<17?"ਦੁਪਹਿਰ":e<20?"ਸ਼ਾਮ":"ਰਾਤ"},week:{dow:0,doy:6}})}(n(381))},4495:function(e,t,n){!function(e){"use strict";
vendor: 4,249 bytes, line 12246
12246var t="styczeń_luty_marzec_kwiecień_maj_czerwiec_lipiec_sierpień_wrzesień_październik_listopad_grudzień".split("_"),n="stycznia_lutego_marca_kwietnia_maja_czerwca_lipca_sierpnia_września_października_listopada_grudnia".split("_"),r=[/^sty/i,/^lut/i,/^mar/i,/^kwi/i,/^maj/i,/^cze/i,/^lip/i,/^sie/i,/^wrz/i,/^paź/i,/^lis/i,/^gru/i];function a(e){return e%10<5&&e%10>1&&~~(e/10)%10!=1}function i(e,t,n){var r=e+" ";switch(n){case"ss":return r+(a(e)?"sekundy":"sekund");case"m":return t?"minuta":"minutę";case"mm":return r+(a(e)?"minuty":"minut");case"h":return t?"godzina":"godzinę";case"hh":return r+(a(e)?"godziny":"godzin");case"ww":return r+(a(e)?"tygodnie":"tygodni");case"MM":return r+(a(e)?"miesiące":"miesięcy");case"yy":return r+(a(e)?"lata":"lat")}}e.defineLocale("pl",{months:function(e,r){return e?/D MMMM/.test(r)?n[e.month()]:t[e.month()]:t},monthsShort:"sty_lut_mar_kwi_maj_cze_lip_sie_wrz_paź_lis_gru".split("_"),monthsParse:r,longMonthsParse:r,shortMonthsParse:r,weekdays:"niedziela_poniedziałek_wtorek_środa_czwartek_piątek_sobota".split("_"),weekdaysShort:"ndz_pon_wt_śr_czw_pt_sob".split("_"),weekdaysMin:"Nd_Pn_Wt_Śr_Cz_Pt_So".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Dziś o] LT",nextDay:"[Jutro o] LT",nextWeek:function(){switch(this.day()){case 0:return"[W niedzielę o] LT";case 2:return"[We wtorek o] LT";case 3:return"[W środę o] LT";case 6:return"[W sobotę o] LT";default:return"[W] dddd [o] LT"}},lastDay:"[Wczoraj o] LT",lastWeek:function(){switch(this.day()){case 0:return"[W zeszłą niedzielę o] LT";case 3:return"[W zeszłą środę o] LT";case 6:return"[W zeszłą sobotę o] LT";default:return"[W zeszły] dddd [o] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"%s temu",s:"kilka sekund",ss:i,m:i,mm:i,h:i,hh:i,d:"1 dzień",dd:"%d dni",w:"tydzień",ww:i,M:"miesiąc",MM:i,y:"rok",yy:i},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(381))},7971:function(e,t,n){!function(e){"use strict";e.defineLocale("pt-br",{months:"janeiro_fevereiro_março_abril_maio_junho_julho_agosto_setembro_outubro_novembro_dezembro".split("_"),monthsShort:"jan_fev_mar_abr_mai_jun_jul_ago_set_out_nov_dez".split("_"),weekdays:"domingo_segunda-feira_terça-feira_quarta-feira_quinta-feira_sexta-feira_sábado".split("_"),weekdaysShort:"dom_seg_ter_qua_qui_sex_sáb".split("_"),weekdaysMin:"do_2ª_3ª_4ª_5ª_6ª_sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY [às] HH:mm",LLLL:"dddd, D [de] MMMM [de] YYYY [às] HH:mm"},calendar:{sameDay:"[Hoje às] LT",nextDay:"[Amanhã às] LT",nextWeek:"dddd [às] LT",lastDay:"[Ontem às] LT",lastWeek:function(){return 0===this.day()||6===this.day()?"[Último] dddd [às] LT":"[Última] dddd [às] LT"},sameElse:"L"},relativeTime:{future:"em %s",past:"há %s",s:"poucos segundos",ss:"%d segundos",m:"um minuto",mm:"%d minutos",h:"uma hora",hh:"%d horas",d:"um dia",dd:"%d dias",M:"um mês",MM:"%d meses",y:"um ano",yy:"%d anos"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",invalidDate:"Data inválida"})}(n(381))},9520:function(e,t,n){!function(e){"use strict";e.defineLocale("pt",{months:"janeiro_fevereiro_março_abril_maio_junho_julho_agosto_setembro_outubro_novembro_dezembro".split("_"),monthsShort:"jan_fev_mar_abr_mai_jun_jul_ago_set_out_nov_dez".split("_"),weekdays:"Domingo_Segunda-feira_Terça-feira_Quarta-feira_Quinta-feira_Sexta-feira_Sábado".split("_"),weekdaysShort:"Dom_Seg_Ter_Qua_Qui_Sex_Sáb".split("_"),weekdaysMin:"Do_2ª_3ª_4ª_5ª_6ª_Sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY HH:mm",LLLL:"dddd, D [de] MMMM [de] YYYY HH:mm"},calendar:{sameDay:"[Hoje às] LT",nextDay:"[Amanhã às] LT",nextWeek:"dddd [às] LT",lastDay:"[Ontem às] LT",lastWeek:function(){return 0===this.day()||6===this.day()?"[Último] dddd [às] LT":"[Última] dddd [às] LT"},sameElse:"L"},relativeTime:{future:"em %s",past:"há %s",s:"segundos",ss:"%d segundos",m:"um minuto",mm:"%d minutos",h:"uma hora",hh:"%
12246d horas",d:"um dia",dd:"%d dias",w:"uma semana",ww:"%d semanas",M:"um mês",MM:"%d meses",y:"um ano",yy:"%d anos"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}})}(n(381))},6459:function(e,t,n){!function(e){"use strict";function t(e,t,n){var r=" ";return(e%100>=20||e>=100&&e%100==0)&&(r=" de "),e+r+{ss:"secunde",mm:"minute",hh:"ore",dd:"zile",ww:"săptămâni",MM:"luni",yy:"ani"}[n]}e.defineLocale("ro",{months:"ianuarie_februarie_martie_aprilie_mai_iunie_iulie_august_septembrie_octombrie_noiembrie_decembrie".split("_"),monthsShort:"ian._feb._mart._apr._mai_iun._iul._aug._sept._oct._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"duminică_luni_marți_miercuri_joi_vineri_sâmbătă".split("_"),weekdaysShort:"Dum_Lun_Mar_Mie_Joi_Vin_Sâm".split("_"),weekdaysMin:"Du_Lu_Ma_Mi_Jo_Vi_Sâ".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY H:mm",LLLL:"dddd, D MMMM YYYY H:mm"},calendar:{sameDay:"[azi la] LT",nextDay:"[mâine la] LT",nextWeek:"dddd [la] LT",lastDay:"[ieri la] LT",lastWeek:"[fosta] dddd [la] LT",sameElse:"L"},relativeTime:{future:"peste %s",past:"%s în urmă",s:"câteva secunde",ss:t,m:"un minut",mm:t,h:"o oră",hh:t,d:"o zi",dd:t,w:"o săptămână",ww:t,M:"o lună",MM:t,y:"un an",yy:t},week:{dow:1,doy:7}})}(n(381))},1793:function(e,t,n){!function(e){"use strict";function t(e,t,n){return"m"===n?t?"минута":"минуту":e+" "+(r=+e,a={ss:t?"секунда_секунды_секунд":"секунду_секунды_секунд",mm:t?"минута_минуты_минут":"минуту_минуты_минут",hh:"час_часа_часов",dd:"день_дня_дней",ww:"неделя_недели_недель",MM:"месяц_месяца_месяцев",yy:"год_года_лет"}[n].split("_"),r%10==1&&r%100!=11?a[0]:r%10>=2&&r%10<=4&&(r%100<10||r%100>=20)?a[1]:a[2]);var r,a}var n=[/^янв/i,/^фев/i,/^мар/i,/^апр/i,/^ма[йя]/i,/^июн/i,/^июл/i,/^авг/i,/^сен/i,/^окт/i,/^ноя/i,/^дек/i];e.defineLocale("ru",{months:{format:"января_февраля_марта_апреля_мая_июня_июля_августа_сентября_октября_ноября_декабря".split("_"),standalone:"январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь".split("_")},monthsShort:{format:"янв._февр._мар._апр._мая_июня_июля_авг._сент._окт._нояб._дек.".split("_"),standalone:"янв._февр._март_апр._май_июнь_июль_авг._сент._окт._нояб._дек.".split("_")},weekdays:{standalone:"воскресенье_понедельник_вторник_среда_четверг_пятница_суббота".split("_"),format:"воскресенье_понедельник_вторник_среду_четверг_пятницу_субботу".split("_"),isFormat:/\[ ?[Вв] ?(?:прошлую|следующую|эту)? ?] ?dddd/},weekdaysShort:"вс_пн_вт_ср_чт_пт_сб".split("_"),weekdaysMin:"вс_пн_вт_ср_чт_пт_сб".split("_"),monthsParse:n,longMonthsParse:n,shortMonthsParse:n,monthsRegex:/^(январ[ья]|янв\.?|феврал[ья]|февр?\.?|марта?|мар\.?|апрел[ья]|апр\.?|ма[йя]|июн[ья]|июн\.?|июл[ья]|июл\.?|августа?|авг\.?|сентябр[ья]|сент?\.?|октябр[ья]|окт\.?|ноябр[ья]|нояб?\.?|декабр[ья]|дек\.?)/i,monthsShortRegex:/^(январ[ья]|янв\.?|феврал[ья]|февр?\.?|марта?|мар\.?|апрел[ья]|апр\.?|ма[йя]|июн[ья]|июн\.?|июл[ья]|июл\.?|августа?|авг\.?|сентябр[ья]|сент?\.?|октябр[ья]|окт\.?|ноябр[ья]|нояб?\.?|декабр[ья]|дек\.?)/i,monthsStrictRegex:/^(январ[яь]|феврал[яь]|марта?|апрел[яь]|ма[яй]|июн[яь]|июл[яь]|августа?|сентябр[яь]|октябр[яь]|ноябр[яь]|декабр[яь])/i,monthsShortStrictRegex:/^(янв\.|февр?\.|мар[т.]|апр\.|ма[яй]|июн[ья.]|июл[ья.]|авг\.|сент?\.|ок
vendor: 4,453 bytes, line 12246
12246т\.|нояб?\.|дек\.)/i,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY г.",LLL:"D MMMM YYYY г., H:mm",LLLL:"dddd, D MMMM YYYY г., H:mm"},calendar:{sameDay:"[Сегодня, в] LT",nextDay:"[Завтра, в] LT",lastDay:"[Вчера, в] LT",nextWeek:function(e){if(e.week()===this.week())return 2===this.day()?"[Во] dddd, [в] LT":"[В] dddd, [в] LT";switch(this.day()){case 0:return"[В следующее] dddd, [в] LT";case 1:case 2:case 4:return"[В следующий] dddd, [в] LT";case 3:case 5:case 6:return"[В следующую] dddd, [в] LT"}},lastWeek:function(e){if(e.week()===this.week())return 2===this.day()?"[Во] dddd, [в] LT":"[В] dddd, [в] LT";switch(this.day()){case 0:return"[В прошлое] dddd, [в] LT";case 1:case 2:case 4:return"[В прошлый] dddd, [в] LT";case 3:case 5:case 6:return"[В прошлую] dddd, [в] LT"}},sameElse:"L"},relativeTime:{future:"через %s",past:"%s назад",s:"несколько секунд",ss:t,m:t,mm:t,h:"час",hh:t,d:"день",dd:t,w:"неделя",ww:t,M:"месяц",MM:t,y:"год",yy:t},meridiemParse:/ночи|утра|дня|вечера/i,isPM:function(e){return/^(дня|вечера)$/.test(e)},meridiem:function(e,t,n){return e<4?"ночи":e<12?"утра":e<17?"дня":"вечера"},dayOfMonthOrdinalParse:/\d{1,2}-(й|го|я)/,ordinal:function(e,t){switch(t){case"M":case"d":case"DDD":return e+"-й";case"D":return e+"-го";case"w":case"W":return e+"-я";default:return e}},week:{dow:1,doy:4}})}(n(381))},950:function(e,t,n){!function(e){"use strict";var t=["جنوري","فيبروري","مارچ","اپريل","مئي","جون","جولاءِ","آگسٽ","سيپٽمبر","آڪٽوبر","نومبر","ڊسمبر"],n=["آچر","سومر","اڱارو","اربع","خميس","جمع","ڇنڇر"];e.defineLocale("sd",{months:t,monthsShort:t,weekdays:n,weekdaysShort:n,weekdaysMin:n,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd، D MMMM YYYY HH:mm"},meridiemParse:/صبح|شام/,isPM:function(e){return"شام"===e},meridiem:function(e,t,n){return e<12?"صبح":"شام"},calendar:{sameDay:"[اڄ] LT",nextDay:"[سڀاڻي] LT",nextWeek:"dddd [اڳين هفتي تي] LT",lastDay:"[ڪالهه] LT",lastWeek:"[گزريل هفتي] dddd [تي] LT",sameElse:"L"},relativeTime:{future:"%s پوء",past:"%s اڳ",s:"چند سيڪنڊ",ss:"%d سيڪنڊ",m:"هڪ منٽ",mm:"%d منٽ",h:"هڪ ڪلاڪ",hh:"%d ڪلاڪ",d:"هڪ ڏينهن",dd:"%d ڏينهن",M:"هڪ مهينو",MM:"%d مهينا",y:"هڪ سال",yy:"%d سال"},preparse:function(e){return e.replace(/،/g,",")},postformat:function(e){return e.replace(/,/g,"،")},week:{dow:1,doy:4}})}(n(381))},490:function(e,t,n){!function(e){"use strict";e.defineLocale("se",{months:"ođđajagemánnu_guovvamánnu_njukčamánnu_cuoŋománnu_miessemánnu_geassemánnu_suoidnemánnu_borgemánnu_čakčamánnu_golggotmánnu_skábmamánnu_juovlamánnu".split("_"),monthsShort:"ođđj_guov_njuk_cuo_mies_geas_suoi_borg_čakč_golg_skáb_juov".split("_"),weekdays:"sotnabeaivi_vuossárga_maŋŋebárga_gaskavahkku_duorastat_bearjadat_lávvardat".split("_"),weekdaysShort:"sotn_vuos_maŋ_gask_duor_bear_láv".split("_"),weekdaysMin:"s_v_m_g_d_b_L".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"MMMM D. [b.] YYYY",LLL:"MMMM D. [b.] YYYY [ti.] HH:mm",LLLL:"dddd, MMMM D. [b.] YYYY [ti.] HH:mm"},calendar:{sameDay:"[otne ti] LT",nextDay:"[ihttin ti] LT",nextWeek:"dddd [ti] LT",lastDay:"[ikte ti] LT",lastWeek:"[ovddit] dddd [ti] LT",sameElse:"L"},relativeTime:{future:"%s geažes",past:"maŋit %s",s:"moadde sekunddat",ss:"%d sekunddat",m:"okta minuhta",mm:"%d minuhtat",h:"okta diimmu",hh:"%d diimmut",d:"okta beaivi",dd:"%d beaivvit",M:"okta mánnu",MM:"%d mánut",y:"okta jahki",yy:"%d jagit"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(381))},124:function(e,t,n){!function(e){"use strict";e.defineLocale("si",{months:"ජනවාරි_පෙබරවාරි_මාර්තු_අප්‍රේල්_මැයි_ජූනි_ජූලි_අගෝස්තු_සැප්තැම්බර්_ඔක්තෝබර්_නොවැම්බර්_දෙසැම්බර්".split("_"),monthsShort:"ජන_පෙබ_මාර්_අප්_මැයි_ජූනි_ජූලි_අගෝ_සැප්_ඔක්_නොවැ_දෙසැ".
vendor: 7,934 bytes, line 12246
12246split("_"),weekdays:"ඉරිදා_සඳුදා_අඟහරුවාදා_බදාදා_බ්‍රහස්පතින්දා_සිකුරාදා_සෙනසුරාදා".split("_"),weekdaysShort:"ඉරි_සඳු_අඟ_බදා_බ්‍රහ_සිකු_සෙන".split("_"),weekdaysMin:"ඉ_ස_අ_බ_බ්‍ර_සි_සෙ".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"a h:mm",LTS:"a h:mm:ss",L:"YYYY/MM/DD",LL:"YYYY MMMM D",LLL:"YYYY MMMM D, a h:mm",LLLL:"YYYY MMMM D [වැනි] dddd, a h:mm:ss"},calendar:{sameDay:"[අද] LT[ට]",nextDay:"[හෙට] LT[ට]",nextWeek:"dddd LT[ට]",lastDay:"[ඊයේ] LT[ට]",lastWeek:"[පසුගිය] dddd LT[ට]",sameElse:"L"},relativeTime:{future:"%sකින්",past:"%sකට පෙර",s:"තත්පර කිහිපය",ss:"තත්පර %d",m:"මිනිත්තුව",mm:"මිනිත්තු %d",h:"පැය",hh:"පැය %d",d:"දිනය",dd:"දින %d",M:"මාසය",MM:"මාස %d",y:"වසර",yy:"වසර %d"},dayOfMonthOrdinalParse:/\d{1,2} වැනි/,ordinal:function(e){return e+" වැනි"},meridiemParse:/පෙර වරු|පස් වරු|පෙ.ව|ප.ව./,isPM:function(e){return"ප.ව."===e||"පස් වරු"===e},meridiem:function(e,t,n){return e>11?n?"ප.ව.":"පස් වරු":n?"පෙ.ව.":"පෙර වරු"}})}(n(381))},4249:function(e,t,n){!function(e){"use strict";var t="január_február_marec_apríl_máj_jún_júl_august_september_október_november_december".split("_"),n="jan_feb_mar_apr_máj_jún_júl_aug_sep_okt_nov_dec".split("_");function r(e){return e>1&&e<5}function a(e,t,n,a){var i=e+" ";switch(n){case"s":return t||a?"pár sekúnd":"pár sekundami";case"ss":return t||a?i+(r(e)?"sekundy":"sekúnd"):i+"sekundami";case"m":return t?"minúta":a?"minútu":"minútou";case"mm":return t||a?i+(r(e)?"minúty":"minút"):i+"minútami";case"h":return t?"hodina":a?"hodinu":"hodinou";case"hh":return t||a?i+(r(e)?"hodiny":"hodín"):i+"hodinami";case"d":return t||a?"deň":"dňom";case"dd":return t||a?i+(r(e)?"dni":"dní"):i+"dňami";case"M":return t||a?"mesiac":"mesiacom";case"MM":return t||a?i+(r(e)?"mesiace":"mesiacov"):i+"mesiacmi";case"y":return t||a?"rok":"rokom";case"yy":return t||a?i+(r(e)?"roky":"rokov"):i+"rokmi"}}e.defineLocale("sk",{months:t,monthsShort:n,weekdays:"nedeľa_pondelok_utorok_streda_štvrtok_piatok_sobota".split("_"),weekdaysShort:"ne_po_ut_st_št_pi_so".split("_"),weekdaysMin:"ne_po_ut_st_št_pi_so".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd D. MMMM YYYY H:mm"},calendar:{sameDay:"[dnes o] LT",nextDay:"[zajtra o] LT",nextWeek:function(){switch(this.day()){case 0:return"[v nedeľu o] LT";case 1:case 2:return"[v] dddd [o] LT";case 3:return"[v stredu o] LT";case 4:return"[vo štvrtok o] LT";case 5:return"[v piatok o] LT";case 6:return"[v sobotu o] LT"}},lastDay:"[včera o] LT",lastWeek:function(){switch(this.day()){case 0:return"[minulú nedeľu o] LT";case 1:case 2:case 4:case 5:return"[minulý] dddd [o] LT";case 3:return"[minulú stredu o] LT";case 6:return"[minulú sobotu o] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"pred %s",s:a,ss:a,m:a,mm:a,h:a,hh:a,d:a,dd:a,M:a,MM:a,y:a,yy:a},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(381))},4985:function(e,t,n){!function(e){"use strict";function t(e,t,n,r){var a=e+" ";switch(n){case"s":return t||r?"nekaj sekund":"nekaj sekundami";case"ss":return a+(1===e?t?"sekundo":"sekundi":2===e?t||r?"sekundi":"sekundah":e<5?t||r?"sekunde":"sekundah":"sekund");case"m":return t?"ena minuta":"eno minuto";case"mm":return a+(1===e?t?"minuta":"minuto":2===e?t||r?"minuti":"minutama":e<5?t||r?"minute":"minutami":t||r?"minut":"minutami");case"h":return t?"ena ura":"eno uro";case"hh":return a+(1===e?t?"ura":"uro":2===e?t||r?"uri":"urama":e<5?t||r?"ure":"urami":t||r?"ur":"urami");case"d":return t||r?"en dan":"enim dnem";case"dd":return a+(1===e?t||r?"dan":"dnem":2===e?t||r?"dni":"dnevoma":t||r?"dni":"dnevi");case"M":return t||r?"en mesec":"enim mesecem";case"MM":return a+(1===e?t||r?"mesec":"mesecem":2===e?t||r?"meseca":"mesecema":e<5?t||r?"mesece":"meseci":t||r?"mesecev":"meseci");case"y":return t||r?"eno leto":"enim letom";case"yy":return a+(1===e?t||r?"leto":"letom":2===e?t||r?"leti":"letoma":e<5?t||r?"leta":"leti":t||r?"let":"leti")}}e.defineLocale("sl",{months:"januar_februar_marec_april_maj_junij_julij_avgust_september_oktober_november_december".split("_"),monthsShort:"jan._feb._mar._apr._maj._jun._jul._avg._sep._okt._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"nedelja_ponedeljek_torek_sreda_četrtek_petek_sobota".split("_"),weekdaysShort:"ned._pon._tor._sre._čet._pet._sob.".split("_"),weekdaysMin:"ne_po_to_sr_če_pe_so".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD. MM. YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[danes ob] LT",nextDay:"[jutri ob] LT",nextWeek:function(){switch(this.day()){case 0:return"[v] [nedeljo] [ob] LT";case 3:return"[v] [sredo] [ob] LT";case 6:return"[v] [soboto] [ob] LT";case 1:case 2:case 4:case 5:return"[v] dddd [ob] LT"}},lastDay:"[včeraj ob] LT",lastWeek:function(){switch(this.day()){case 0:return"[prejšnjo] [nedeljo] [ob] LT";case 3:return"[prejšnjo] [sredo] [ob] LT";case 6:return"[prejšnjo] [soboto] [ob] LT";case 1:case 2:case 4:case 5:return"[prejšnji] dddd [ob] LT"}},sameElse:"L"},relativeTime:{future:"čez %s",past:"pred %s",s:t,ss:t,m:t,mm:t,h:t,hh:t,d:t,dd:t,M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}})}(n(381))},1104:function(e,t,n){!function(e){"use strict";e.defineLocale("sq",{months:"Janar_Shkurt_Mars_Prill_Maj_Qershor_Korrik_Gusht_Shtator_Tetor_Nëntor_Dhjetor".split("_"),monthsShort:"Jan_Shk_Mar_Pri_Maj_Qer_Kor_Gus_Sht_Tet_Nën_Dhj".split("_"),weekdays:"E Diel_E Hënë_E Martë_E Mërkurë_E Enjte_E Premte_E Shtunë".split("_"),weekdaysShort:"Die_Hën_Mar_Mër_Enj_Pre_Sht".split("_"),weekdaysMin:"D_H_Ma_Më_E_P_Sh".split("_"),weekdaysParseExact:!0,meridiemParse:/PD|MD/,isPM:function(e){return"M"===e.charAt(0)},meridiem:function(e,t,n){return e<12?"PD":"MD"},longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Sot në] LT",nextDay:"[Nesër në] LT",nextWeek:"dddd [në] LT",lastDay:"[Dje në] LT",lastWeek:"dddd [e kaluar në] LT",sameElse:"L"},relativeTime:{future:"në %s",past:"%s më parë",s:"disa sekonda",ss:"%d sekonda",m:"një minutë",mm:"%d minuta",h:"një orë",hh:"%d orë",d:"një ditë",dd:"%d ditë",M:"një muaj",MM:"%d muaj",y:"një vit",yy:"%d vite"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(381))},9915:function(e,t,n){!function(e){"use strict";var t={words:{ss:["секунда","секунде","секунди"],m:["један минут","једног минута"],mm:["минут","минута","минута"],h:["један сат","једног сата"],hh:["сат","сата","сати"],d:["један дан","једног дана"],dd:["дан","дана","дана"],M:["један месец","једног месеца"],MM:["месец","месеца","месеци"],y:["једну годину","једне године"],yy:["годину","године","година"]},correctGrammaticalCase:function(e,t){return e%10>=1&&e%10<=4&&(e%100<10||e%100>=20)?e%10==1?t[0]:t[1]:t[2]},translate:function(e,n,r,a){var i,s=t.words[r];return 1===r.length?"y"===r&&n?"једна година":a||n?s[0]:s[1]:(i=t.correctGrammaticalCase(e,s),"yy"===r&&n&&"годину"===i?e+" година":e+" "+i)}};e.defineLocale("sr-cyrl",{months:"јануар_фебруар_март_април_мај_јун_јул_август_септембар_ок
12246тобар_новембар_децембар".split("_"),monthsShort:"јан._феб._мар._апр._мај_јун_јул_авг._сеп._окт._нов._дец.".split("_"),monthsParseExact:!0,weekdays:"недеља_понедељак_уторак_среда_четвртак_петак_субота".split("_"),weekdaysShort:"нед._пон._уто._сре._чет._пет._суб.".split("_"),weekdaysMin:"не_по_ут_ср_че_пе_су".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"D. M. YYYY.",LL:"D. MMMM YYYY.",LLL:"D. MMMM YYYY. H:mm",LLLL:"dddd, D. MMMM YYYY. H:mm"},calendar:{sameDay:"[данас у] LT",nextDay:"[сутра у] LT",nextWeek:function(){switch(this.day()){case 0:return"[у] [недељу] [у] LT";case 3:return"[у] [среду] [у] LT";case 6:return"[у] [суботу] [у] LT";case 1:case 2:case 4:case 5:return"[у] dddd [у] LT"}},lastDay:"[јуче у] LT",lastWeek:function(){return["[прошле] [недеље] [у] LT","[прошлог] [понедељка] [у] LT","[прошлог] [уторка] [у] LT","[прошле] [среде] [у] LT","[прошлог] [четвртка] [у] LT","[прошлог] [петка] [у] LT","[прошле] [суботе] [у] LT"][this.day()]},sameElse:"L"},relativeTime:{future:"за %s",past:"пре %s",s:"неколико секунди",ss:t.translate,m:t.translate,mm:t.translate,h:t.translate,hh:t.translate,d:t.translate,dd:t.translate,M:t.translate,MM:t.translate,y:t.translate,yy:t.translate},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}})}(n(381))},9131:function(e,t,n){!function(e){"use strict";var t={words:{ss:["sekunda","sekunde","sekundi"],m:["jedan minut","jednog minuta"],mm:["minut","minuta","minuta"],h:["jedan sat","jednog sata"],hh:["sat","sata","sati"],d:["jedan dan","jednog dana"],dd:["dan","dana","dana"],M:["jedan mesec","jednog meseca"],MM:["mesec","meseca","meseci"],y:["jednu godinu","jedne godine"],yy:["godinu","godine","godina"]},correctGrammaticalCase:function(e,t){return e%10>=1&&e%10<=4&&(e%100<10||e%100>=20)?e%10==1?t[0]:t[1]:t[2]},translate:function(e,n,r,a){var i,s=t.words[r];return 1===r.length?"y"===r&&n?"jedna godina":a||n?s[0]:s[1]:(i=t.correctGrammaticalCase(e,s),"yy"===r&&n&&"godinu"===i?e+" godina":e+" "+i)}};e.defineLocale("sr",{months:"januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar".split("_"),monthsShort:"jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"nedelja_ponedeljak_utorak_sreda_četvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sre._čet._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_če_pe_su".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"D. M. YYYY.",LL:"D. MMMM YYYY.",LLL:"D. MMMM YYYY. H:mm",LLLL:"dddd, D. MMMM YYYY. H:mm"},calendar:{sameDay:"[danas u] LT",nextDay:"[sutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedelju] [u] LT";case 3:return"[u] [sredu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[juče u] LT",lastWeek:function(){return["[prošle] [nedelje] [u] LT","[prošlog] [ponedeljka] [u] LT","[prošlog] [utorka] [u] LT","[prošle] [srede] [u] LT","[prošlog] [četvrtka] [u] LT","[prošlog] [petka] [u] LT","[prošle] [subote] [u] LT"][this.day()]},sameElse:"L"},relativeTime:{future:"za %s",past:"pre %s",s:"nekoliko sekundi",ss:t.translate,m:t.translate,mm:t.translate,h:t.translate,hh:t.translate,d:t.translate,dd:t.translate,M:t.translate,MM:t.translate,y:t.translate,yy:t.translate},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}})}(n(381))},5893:function(e,t,n){!function(e){"use strict";e.defineLocale("ss",{months:"Bhimbidvwane_Indlovana_Indlov'lenkhulu_Mabasa_Inkhwekhweti_Inhlaba_Kholwane_Ingci_Inyoni_Imphala_Lweti_Ingongoni".split("_"),monthsShort:"Bhi_Ina_Inu_Mab_Ink_Inh_Kho_Igc_Iny_Imp_Lwe_Igo".split("_"),weekdays:"Lisontfo_Umsombuluko_Lesibili_Lesitsatfu_Lesine_Lesihlanu_Umgcibelo".split("_"),weekdaysShort:"Lis_Umb_Lsb_Les_Lsi_Lsh_Umg".split("_"),weekdaysMin:"Li_Us_Lb_Lt_Ls_Lh_Ug".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"h:mm A",LT
vendor: 5,393 bytes, line 12246
12246S:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Namuhla nga] LT",nextDay:"[Kusasa nga] LT",nextWeek:"dddd [nga] LT",lastDay:"[Itolo nga] LT",lastWeek:"dddd [leliphelile] [nga] LT",sameElse:"L"},relativeTime:{future:"nga %s",past:"wenteka nga %s",s:"emizuzwana lomcane",ss:"%d mzuzwana",m:"umzuzu",mm:"%d emizuzu",h:"lihora",hh:"%d emahora",d:"lilanga",dd:"%d emalanga",M:"inyanga",MM:"%d tinyanga",y:"umnyaka",yy:"%d iminyaka"},meridiemParse:/ekuseni|emini|entsambama|ebusuku/,meridiem:function(e,t,n){return e<11?"ekuseni":e<15?"emini":e<19?"entsambama":"ebusuku"},meridiemHour:function(e,t){return 12===e&&(e=0),"ekuseni"===t?e:"emini"===t?e>=11?e:e+12:"entsambama"===t||"ebusuku"===t?0===e?0:e+12:void 0},dayOfMonthOrdinalParse:/\d{1,2}/,ordinal:"%d",week:{dow:1,doy:4}})}(n(381))},8760:function(e,t,n){!function(e){"use strict";e.defineLocale("sv",{months:"januari_februari_mars_april_maj_juni_juli_augusti_september_oktober_november_december".split("_"),monthsShort:"jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec".split("_"),weekdays:"söndag_måndag_tisdag_onsdag_torsdag_fredag_lördag".split("_"),weekdaysShort:"sön_mån_tis_ons_tor_fre_lör".split("_"),weekdaysMin:"sö_må_ti_on_to_fr_lö".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [kl.] HH:mm",LLLL:"dddd D MMMM YYYY [kl.] HH:mm",lll:"D MMM YYYY HH:mm",llll:"ddd D MMM YYYY HH:mm"},calendar:{sameDay:"[Idag] LT",nextDay:"[Imorgon] LT",lastDay:"[Igår] LT",nextWeek:"[På] dddd LT",lastWeek:"[I] dddd[s] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"för %s sedan",s:"några sekunder",ss:"%d sekunder",m:"en minut",mm:"%d minuter",h:"en timme",hh:"%d timmar",d:"en dag",dd:"%d dagar",M:"en månad",MM:"%d månader",y:"ett år",yy:"%d år"},dayOfMonthOrdinalParse:/\d{1,2}(\:e|\:a)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?":e":1===t||2===t?":a":":e")},week:{dow:1,doy:4}})}(n(381))},1172:function(e,t,n){!function(e){"use strict";e.defineLocale("sw",{months:"Januari_Februari_Machi_Aprili_Mei_Juni_Julai_Agosti_Septemba_Oktoba_Novemba_Desemba".split("_"),monthsShort:"Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ago_Sep_Okt_Nov_Des".split("_"),weekdays:"Jumapili_Jumatatu_Jumanne_Jumatano_Alhamisi_Ijumaa_Jumamosi".split("_"),weekdaysShort:"Jpl_Jtat_Jnne_Jtan_Alh_Ijm_Jmos".split("_"),weekdaysMin:"J2_J3_J4_J5_Al_Ij_J1".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"hh:mm A",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[leo saa] LT",nextDay:"[kesho saa] LT",nextWeek:"[wiki ijayo] dddd [saat] LT",lastDay:"[jana] LT",lastWeek:"[wiki iliyopita] dddd [saat] LT",sameElse:"L"},relativeTime:{future:"%s baadaye",past:"tokea %s",s:"hivi punde",ss:"sekunde %d",m:"dakika moja",mm:"dakika %d",h:"saa limoja",hh:"masaa %d",d:"siku moja",dd:"siku %d",M:"mwezi mmoja",MM:"miezi %d",y:"mwaka mmoja",yy:"miaka %d"},week:{dow:1,doy:7}})}(n(381))},7333:function(e,t,n){!function(e){"use strict";var t={1:"௧",2:"௨",3:"௩",4:"௪",5:"௫",6:"௬",7:"௭",8:"௮",9:"௯",0:"௦"},n={"௧":"1","௨":"2","௩":"3","௪":"4","௫":"5","௬":"6","௭":"7","௮":"8","௯":"9","௦":"0"};e.defineLocale("ta",{months:"ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்".split("_"),monthsShort:"ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்".split("_"),weekdays:"ஞாயிற்றுக்கிழமை_திங்கட்கிழமை_செவ்வாய்கிழமை_புதன்கிழமை_வியாழக்கிழமை_வெள்ளிக்கிழமை_சனிக்கிழமை".split("_"),weekdaysShort:"ஞாயிறு_திங்கள்_செவ்வாய்_புதன்_வியாழன்_வெள்ளி_சனி".split("_"),weekdaysMin:"ஞா_தி_செ_பு_வி_வெ_ச".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, HH:mm",LLLL:"dddd, D MMMM YYYY, HH:mm"},calendar:{sameDay:"[இன்று] LT",nextDay:"[நாளை] LT",nextWeek:"dddd, LT",lastDay:"[நேற்று] LT",lastWeek:"[கடந்த வாரம்] dddd, LT",sameElse:"L"},relativeTime:{future:"%s இல்",past:"%s முன்",s:"ஒரு சில விநாடிகள்",ss:"%d விநாடிகள்",m:"ஒரு நிமிடம்",mm:"%d நிமிடங்கள்",h:"ஒரு மணி நேரம்",hh:"%d மணி நேரம்",d:"ஒரு நாள்",dd:"%d நாட்கள்",M:"ஒரு மாதம்",MM:"%d மாதங்கள்",y:"ஒரு வருடம்",yy:"%d ஆண்டுகள்"},dayOfMonthOrdinalParse:/\d{1,2}வது/,ordinal:function(e){return e+"வது"},preparse:function(e){return e.replace(/[௧௨௩௪௫௬௭௮௯௦]/g,(function(e){return n[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))}
vendor: 4,551 bytes, line 12246
12246,meridiemParse:/யாமம்|வைகறை|காலை|நண்பகல்|எற்பாடு|மாலை/,meridiem:function(e,t,n){return e<2?" யாமம்":e<6?" வைகறை":e<10?" காலை":e<14?" நண்பகல்":e<18?" எற்பாடு":e<22?" மாலை":" யாமம்"},meridiemHour:function(e,t){return 12===e&&(e=0),"யாமம்"===t?e<2?e:e+12:"வைகறை"===t||"காலை"===t||"நண்பகல்"===t&&e>=10?e:e+12},week:{dow:0,doy:6}})}(n(381))},3110:function(e,t,n){!function(e){"use strict";e.defineLocale("te",{months:"జనవరి_ఫిబ్రవరి_మార్చి_ఏప్రిల్_మే_జూన్_జులై_ఆగస్టు_సెప్టెంబర్_అక్టోబర్_నవంబర్_డిసెంబర్".split("_"),monthsShort:"జన._ఫిబ్ర._మార్చి_ఏప్రి._మే_జూన్_జులై_ఆగ._సెప్._అక్టో._నవ._డిసె.".split("_"),monthsParseExact:!0,weekdays:"ఆదివారం_సోమవారం_మంగళవారం_బుధవారం_గురువారం_శుక్రవారం_శనివారం".split("_"),weekdaysShort:"ఆది_సోమ_మంగళ_బుధ_గురు_శుక్ర_శని".split("_"),weekdaysMin:"ఆ_సో_మం_బు_గు_శు_à°¶".split("_"),longDateFormat:{LT:"A h:mm",LTS:"A h:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm",LLLL:"dddd, D MMMM YYYY, A h:mm"},calendar:{sameDay:"[నేడు] LT",nextDay:"[రేపు] LT",nextWeek:"dddd, LT",lastDay:"[నిన్న] LT",lastWeek:"[గత] dddd, LT",sameElse:"L"},relativeTime:{future:"%s లో",past:"%s క్రితం",s:"కొన్ని క్షణాలు",ss:"%d సెకన్లు",m:"ఒక నిమిషం",mm:"%d నిమిషాలు",h:"ఒక గంట",hh:"%d గంటలు",d:"ఒక రోజు",dd:"%d రోజులు",M:"ఒక నెల",MM:"%d నెలలు",y:"ఒక సంవత్సరం",yy:"%d సంవత్సరాలు"},dayOfMonthOrdinalParse:/\d{1,2}à°µ/,ordinal:"%dà°µ",meridiemParse:/రాత్రి|ఉదయం|మధ్యాహ్నం|సాయంత్రం/,meridiemHour:function(e,t){return 12===e&&(e=0),"రాత్రి"===t?e<4?e:e+12:"ఉదయం"===t?e:"మధ్యాహ్నం"===t?e>=10?e:e+12:"సాయంత్రం"===t?e+12:void 0},meridiem:function(e,t,n){return e<4?"రాత్రి":e<10?"ఉదయం":e<17?"మధ్యాహ్నం":e<20?"సాయంత్రం":"రాత్రి"},week:{dow:0,doy:6}})}(n(381))},2095:function(e,t,n){!function(e){"use strict";e.defineLocale("tet",{months:"Janeiru_Fevereiru_Marsu_Abril_Maiu_Juñu_Jullu_Agustu_Setembru_Outubru_Novembru_Dezembru".split("_"),monthsShort:"Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez".split("_"),weekdays:"Domingu_Segunda_Tersa_Kuarta_Kinta_Sesta_Sabadu".split("_"),weekdaysShort:"Dom_Seg_Ters_Kua_Kint_Sest_Sab".split("_"),weekdaysMin:"Do_Seg_Te_Ku_Ki_Ses_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Ohin iha] LT",nextDay:"[Aban iha] LT",nextWeek:"dddd [iha] LT",lastDay:"[Horiseik iha] LT",lastWeek:"dddd [semana kotuk] [iha] LT",sameElse:"L"},relativeTime:{future:"iha %s",past:"%s liuba",s:"segundu balun",ss:"segundu %d",m:"minutu ida",mm:"minutu %d",h:"oras ida",hh:"oras %d",d:"loron ida",dd:"loron %d",M:"fulan ida",MM:"fulan %d",y:"tinan ida",yy:"tinan %d"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")},week:{dow:1,doy:4}})}(n(381))},7321:function(e,t,n){!function(e){"use strict";var t={0:"-ум",1:"-ум",2:"-юм",3:"-юм",4:"-ум",5:"-ум",6:"-ум",7:"-ум",8:"-ум",9:"-ум",10:"-ум",12:"-ум",13:"-ум",20:"-ум",30:"-юм",40:"-ум",50:"-ум",60:"-ум",70:"-ум",80:"-ум",90:"-ум",100:"-ум"};e.defineLocale("tg",{months:{format:"январи_феврали_марти_апрели_майи_июни_июли_августи_сентябри_октябри_ноябри_декабри".split("_"),standalone:"январ_феврал_март_апрел_май_июн_июл_август_сентябр_октябр_ноябр_декабр".split("_")},monthsShort:"янв_фев_мар_апр_май_июн_июл_авг_сен_окт_ноя_дек".split("_"),weekdays:"Ñ
12246ÐºÑˆÐ°Ð½Ð±Ðµ_душанбе_сешанбе_чоршанбе_панҷшанбе_ҷумъа_шанбе".split("_"),weekdaysShort:"яшб_дшб_сшб_чшб_пшб_ҷум_шнб".split("_"),weekdaysMin:"яш_дш_сш_чш_пш_ҷм_шб".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Имрӯз соати] LT",nextDay:"[Фардо соати] LT",lastDay:"[Дирӯз соати] LT",nextWeek:"dddd[и] [ҳафтаи оянда соати] LT",lastWeek:"dddd[и] [ҳафтаи гузашта соати] LT",sameElse:"L"},relativeTime:{future:"баъди %s",past:"%s пеш",s:"якчанд сония",m:"як дақиқа",mm:"%d дақиқа",h:"як соат",hh:"%d соат",d:"як рӯз",dd:"%d рӯз",M:"як моҳ",MM:"%d моҳ",y:"як сол",yy:"%d сол"},meridiemParse:/шаб|субҳ|рӯз|бегоҳ/,meridiemHour:function(e,t){return 12===e&&(e=0),"шаб"===t?e<4?e:e+12:"субҳ"===t?e:"рӯз"===t?e>=11?e:e+12:"бегоҳ"===t?e+12:void 0},meridiem:function(e,t,n){return e<4?"шаб":e<11?"субҳ":e<16?"рӯз":e<19?"бегоҳ":"шаб"},dayOfMonthOrdinalParse:/\d{1,2}-(ум|юм)/,ordinal:function(e){return e+(t[e]||t[e%10]||t[e>=100?100:null])},week:{dow:1,doy:7}})}(n(381))},9041:function(e,t,n){!function(e){"use strict";e.defineLocale("th",{months:"มกราคม_กุมภาพันธ์_มีนาคม_เมษายน_พฤษภาคม_มิถุนายน_กรกฎาคม_สิงหาคม_กันยายน_ตุลาคม_พฤศจิกายน_ธันวาคม".split("_"),monthsShort:"ม.ค._ก.พ._มี.ค._เม.ย._พ.ค._มิ.ย._ก.ค._ส.ค._ก.ย._ต.ค._พ.ย._ธ.ค.".split("_"),monthsParseExact:!0,weekdays:"อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัสบดี_ศุกร์_เสาร์".split("_"),weekdaysShort:"อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัส_ศุกร์_เสาร์".split("_"),weekdaysMin:"อา._จ._อ._พ._พฤ._ศ._ส.".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY เวลา H:mm",LLLL:"วันddddที่ D MMMM YYYY เวลา H:mm"},meridiemParse:/ก่อนเที่ยง|หลังเที่ยง/,isPM:function(e){return"หลังเที่ยง"===e},meridiem:function(e,t,n){return e<12?"ก่อนเที่ยง":"หลังเที่ยง"},calendar:{sameDay:"[วันนี้ เวลา] LT",nextDay:"[พรุ่งนี้ เวลา] LT",nextWeek:"dddd[หน้า เวลา] LT",lastDay:"[เมื่อวานนี้ เวลา] LT",lastWeek:"[วัน]dddd[ที่แล้ว เวลา] LT",sameElse:"L"},relativeTime:{future:"อีก %s",past:"%sที่แล้ว",s:"ไม่กี่วินาที",ss:"%d วินาที",m:"1 นาที",mm:"%d นาที",h:"1 ชั่วโมง",hh:"%d ชั่วโมง",d:"1 วัน",dd:"%d วัน",w:"1 สัปดาห์",ww:"%d สัปดาห์",M:"1 เดือน",MM:"%d เดือน",y:"1 ปี",yy:"%d ปี"}})}(n(381))},9005:function(e,t,n){!function(e){"use strict";var t={1:"'inji",5:"'inji",8:"'inji",70:"'inji",80:"'inji",2:"'nji",7:"'nji",20:"'nji",50:"'nji",3:"'ünji",4:"'ünji",100:"'ünji",6:"'njy",9:"'unjy",10:"'unjy",30:"'unjy",60:"'ynjy",90:"'ynjy"};e.defineLocale("tk",{months:"Ýanwar_Fewral_Mart_Aprel_Maý_Iýun_Iýul_Awgust_Sentýabr_Oktýabr_Noýabr_Dekabr".split("_"),monthsShort:"Ýan_Few_Mar_Apr_Maý_Iýn_Iýl_Awg_Sen_Okt_Noý_Dek".split("_"),weekdays:"Ýekşenbe_Duşenbe_Sişenbe_Çarşenbe_Penşenbe_Anna_Şenbe".split("_"),weekdaysShort:"Ýek_Duş_Siş_Çar_Pen_Ann_Şen".split("_"),weekdaysMin:"Ýk_Dş_Sş_Çr_Pn_An_Şn".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"}
vendor: 6,307 bytes, line 12246
12246,calendar:{sameDay:"[bugün sagat] LT",nextDay:"[ertir sagat] LT",nextWeek:"[indiki] dddd [sagat] LT",lastDay:"[düýn] LT",lastWeek:"[geçen] dddd [sagat] LT",sameElse:"L"},relativeTime:{future:"%s soň",past:"%s öň",s:"birnäçe sekunt",m:"bir minut",mm:"%d minut",h:"bir sagat",hh:"%d sagat",d:"bir gün",dd:"%d gün",M:"bir aý",MM:"%d aý",y:"bir ýyl",yy:"%d ýyl"},ordinal:function(e,n){switch(n){case"d":case"D":case"Do":case"DD":return e;default:if(0===e)return e+"'unjy";var r=e%10;return e+(t[r]||t[e%100-r]||t[e>=100?100:null])}},week:{dow:1,doy:7}})}(n(381))},5768:function(e,t,n){!function(e){"use strict";e.defineLocale("tl-ph",{months:"Enero_Pebrero_Marso_Abril_Mayo_Hunyo_Hulyo_Agosto_Setyembre_Oktubre_Nobyembre_Disyembre".split("_"),monthsShort:"Ene_Peb_Mar_Abr_May_Hun_Hul_Ago_Set_Okt_Nob_Dis".split("_"),weekdays:"Linggo_Lunes_Martes_Miyerkules_Huwebes_Biyernes_Sabado".split("_"),weekdaysShort:"Lin_Lun_Mar_Miy_Huw_Biy_Sab".split("_"),weekdaysMin:"Li_Lu_Ma_Mi_Hu_Bi_Sab".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"MM/D/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY HH:mm",LLLL:"dddd, MMMM DD, YYYY HH:mm"},calendar:{sameDay:"LT [ngayong araw]",nextDay:"[Bukas ng] LT",nextWeek:"LT [sa susunod na] dddd",lastDay:"LT [kahapon]",lastWeek:"LT [noong nakaraang] dddd",sameElse:"L"},relativeTime:{future:"sa loob ng %s",past:"%s ang nakalipas",s:"ilang segundo",ss:"%d segundo",m:"isang minuto",mm:"%d minuto",h:"isang oras",hh:"%d oras",d:"isang araw",dd:"%d araw",M:"isang buwan",MM:"%d buwan",y:"isang taon",yy:"%d taon"},dayOfMonthOrdinalParse:/\d{1,2}/,ordinal:function(e){return e},week:{dow:1,doy:4}})}(n(381))},9444:function(e,t,n){!function(e){"use strict";var t="pagh_wa’_cha’_wej_loS_vagh_jav_Soch_chorgh_Hut".split("_");function n(e,n,r,a){var i=function(e){var n=Math.floor(e%1e3/100),r=Math.floor(e%100/10),a=e%10,i="";return n>0&&(i+=t[n]+"vatlh"),r>0&&(i+=(""!==i?" ":"")+t[r]+"maH"),a>0&&(i+=(""!==i?" ":"")+t[a]),""===i?"pagh":i}(e);switch(r){case"ss":return i+" lup";case"mm":return i+" tup";case"hh":return i+" rep";case"dd":return i+" jaj";case"MM":return i+" jar";case"yy":return i+" DIS"}}e.defineLocale("tlh",{months:"tera’ jar wa’_tera’ jar cha’_tera’ jar wej_tera’ jar loS_tera’ jar vagh_tera’ jar jav_tera’ jar Soch_tera’ jar chorgh_tera’ jar Hut_tera’ jar wa’maH_tera’ jar wa’maH wa’_tera’ jar wa’maH cha’".split("_"),monthsShort:"jar wa’_jar cha’_jar wej_jar loS_jar vagh_jar jav_jar Soch_jar chorgh_jar Hut_jar wa’maH_jar wa’maH wa’_jar wa’maH cha’".split("_"),monthsParseExact:!0,weekdays:"lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj".split("_"),weekdaysShort:"lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj".split("_"),weekdaysMin:"lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[DaHjaj] LT",nextDay:"[wa’leS] LT",nextWeek:"LLL",lastDay:"[wa’Hu’] LT",lastWeek:"LLL",sameElse:"L"},relativeTime:{future:function(e){var t=e;return-1!==e.indexOf("jaj")?t.slice(0,-3)+"leS":-1!==e.indexOf("jar")?t.slice(0,-3)+"waQ":-1!==e.indexOf("DIS")?t.slice(0,-3)+"nem":t+" pIq"},past:function(e){var t=e;return-1!==e.indexOf("jaj")?t.slice(0,-3)+"Hu’":-1!==e.indexOf("jar")?t.slice(0,-3)+"wen":-1!==e.indexOf("DIS")?t.slice(0,-3)+"ben":t+" ret"},s:"puS lup",ss:n,m:"wa’ tup",mm:n,h:"wa’ rep",hh:n,d:"wa’ jaj",dd:n,M:"wa’ jar",MM:n,y:"wa’ DIS",yy:n},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(381))},2397:function(e,t,n){!function(e){"use strict";var t={1:"'inci",5:"'inci",8:"'inci",70:"'inci",80:"'inci",2:"'nci",7:"'nci",20:"'nci",50:"'nci",3:"'üncü",4:"'üncü",100:"'üncü",6:"'ncı",9:"'uncu",10:"'uncu",30:"'uncu",60:"'ıncı",90:"'ıncı"};e.defineLocale("tr",{months:"Ocak_Şubat_Mart_Nisan_Mayıs_Haziran_Temmuz_Ağustos_Eylül_Ekim_Kasım_Aralık".split("_"),monthsShort:"Oca_Şub_Mar_Nis_May_Haz_Tem_Ağu_Eyl_Eki_Kas_Ara".split("_"),weekdays:"Pazar_Pazartesi_Salı_Çarşamba_Perşembe_Cuma_Cumartesi".split("_"),weekdaysShort:"Paz_Pzt_Sal_Çar_Per_Cum_Cmt".split("_"),weekdaysMin:"Pz_Pt_Sa_Ça_Pe_Cu_Ct".split("_"),meridiem:function(e,t,n){return e<12?n?"öö":"ÖÖ":n?"ös":"ÖS"},meridiemParse:/öö|ÖÖ|ös|ÖS/,isPM:function(e){return"ös"===e||"ÖS"===e},longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[bugün saat] LT",nextDay:"[yarın saat] LT",nextWeek:"[gelecek] dddd [saat] LT",lastDay:"[dün] LT",lastWeek:"[geçen] dddd [saat] LT",sameElse:"L"},relativeTime:{future:"%s sonra",past:"%s önce",s:"birkaç saniye",ss:"%d saniye",m:"bir dakika",mm:"%d dakika",h:"bir saat",hh:"%d saat",d:"bir gün",dd:"%d gün",w:"bir hafta",ww:"%d hafta",M:"bir ay",MM:"%d ay",y:"bir yıl",yy:"%d yıl"},ordinal:function(e,n){switch(n){case"d":case"D":case"Do":case"DD":return e;default:if(0===e)return e+"'ıncı";var r=e%10;return e+(t[r]||t[e%100-r]||t[e>=100?100:null])}},week:{dow:1,doy:7}})}(n(381))},8254:function(e,t,n){!function(e){"use strict";function t(e,t,n,r){var a={s:["viensas secunds","'iensas secunds"],ss:[e+" secunds",e+" secunds"],m:["'n míut","'iens míut"],mm:[e+" míuts",e+" míuts"],h:["'n þora","'iensa þora"],hh:[e+" þoras",e+" þoras"],d:["'n ziua","'iensa ziua"],dd:[e+" ziuas",e+" ziuas"],M:["'n mes","'iens mes"],MM:[e+" mesen",e+" mesen"],y:["'n ar","'iens ar"],yy:[e+" ars",e+" ars"]};return r||t?a[n][0]:a[n][1]}e.defineLocale("tzl",{months:"Januar_Fevraglh_Març_Avrïu_Mai_Gün_Julia_Guscht_Setemvar_Listopäts_Noemvar_Zecemvar".split("_"),monthsShort:"Jan_Fev_Mar_Avr_Mai_Gün_Jul_Gus_Set_Lis_Noe_Zec".split("_"),weekdays:"Súladi_Lúneçi_Maitzi_Márcuri_Xhúadi_Viénerçi_Sáturi".split("_"),weekdaysShort:"Súl_Lún_Mai_Már_Xhú_Vié_Sát".split("_"),weekdaysMin:"Sú_Lú_Ma_Má_Xh_Vi_Sá".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD.MM.YYYY",LL:"D. MMMM [dallas] YYYY",LLL:"D. MMMM [dallas] YYYY HH.mm",LLLL:"dddd, [li] D. MMMM [dallas] YYYY HH.mm"},meridiemParse:/d\'o|d\'a/i,isPM:function(e){return"d'o"===e.toLowerCase()},meridiem:function(e,t,n){return e>11?n?"d'o":"D'O":n?"d'a":"D'A"}
12246,calendar:{sameDay:"[oxhi à] LT",nextDay:"[demà à] LT",nextWeek:"dddd [à] LT",lastDay:"[ieiri à] LT",lastWeek:"[sür el] dddd [lasteu à] LT",sameElse:"L"},relativeTime:{future:"osprei %s",past:"ja%s",s:t,ss:t,m:t,mm:t,h:t,hh:t,d:t,dd:t,M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(381))},699:function(e,t,n){!function(e){"use strict";e.defineLocale("tzm-latn",{months:"innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_É£wÅ¡t_Å¡wtanbir_ktˤwbrˤ_nwwanbir_dwjnbir".split("_"),monthsShort:"innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_É£wÅ¡t_Å¡wtanbir_ktˤwbrˤ_nwwanbir_dwjnbir".split("_"),weekdays:"asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas".split("_"),weekdaysShort:"asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas".split("_"),weekdaysMin:"asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[asdkh g] LT",nextDay:"[aska g] LT",nextWeek:"dddd [g] LT",lastDay:"[assant g] LT",lastWeek:"dddd [g] LT",sameElse:"L"},relativeTime:{future:"dadkh s yan %s",past:"yan %s",s:"imik",ss:"%d imik",m:"minuḍ",mm:"%d minuḍ",h:"saɛa",hh:"%d tassaɛin",d:"ass",dd:"%d ossan",M:"ayowr",MM:"%d iyyirn",y:"asgas",yy:"%d isgasn"},week:{dow:6,doy:12}})}(n(381))},1106:function(e,t,n){!function(e){"use strict";e.defineLocale("tzm",{months:"ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ".split("_"),monthsShort:"ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ".split("_"),weekdays:"ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ".split("_"),weekdaysShort:"ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ".split("_"),weekdaysMin:"ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[ⴰⵙⴷⵅ â´´] LT",nextDay:"[ⴰⵙⴽⴰ â´´] LT",nextWeek:"dddd [â´´] LT",lastDay:"[ⴰⵚⴰⵏⵜ â´´] LT",lastWeek:"dddd [â´´] LT",sameElse:"L"},relativeTime:{future:"ⴷⴰⴷⵅ ⵙ ⵢⴰⵏ %s",past:"ⵢⴰⵏ %s",s:"ⵉⵎⵉⴽ",ss:"%d ⵉⵎⵉⴽ",m:"ⵎⵉⵏⵓⴺ",mm:"%d ⵎⵉⵏⵓⴺ",h:"ⵙⴰⵄⴰ",hh:"%d ⵜⴰⵙⵙⴰⵄⵉⵏ",d:"ⴰⵙⵙ",dd:"%d oⵙⵙⴰⵏ",M:"â´°âµ¢oⵓⵔ",MM:"%d ⵉⵢⵢⵉⵔⵏ",y:"ⴰⵙⴳⴰⵙ",yy:"%d ⵉⵙⴳⴰⵙⵏ"},week:{dow:6,doy:12}})}(n(381))},9288:function(e,t,n){!function(e){"use strict";e.defineLocale("ug-cn",{months:"يانۋار_فېۋرال_مارت_ئاپرېل_ماي_ئىيۇن_ئىيۇل_ئاۋغۇست_سېنتەبىر_ئۆكتەبىر_نويابىر_دېكابىر".split("_"),monthsShort:"يانۋار_فېۋرال_مارت_ئاپرېل_ماي_ئىيۇن_ئىيۇل_ئاۋغۇست_سېنتەبىر_ئۆكتەبىر_نويابىر_دېكابىر".split("_"),weekdays:"يەكشەنبە_دۈشەنبە_سەيشەنبە_چارشەنبە_پەيشەنبە_جۈمە_شەنبە".split("_"),weekdaysShort:"يە_دۈ_سە_چا_پە_جۈ_شە".split("_"),weekdaysMin:"يە_دۈ_سە_چا_پە_جۈ_شە".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"YYYY-يىلىM-ئاينىڭD-كۈنى",LLL:"YYYY-يىلىM-ئاينىڭD-كۈنى، HH:mm",LLLL:"dddd، YYYY-يىلىM-ئاينىڭD-كۈنى، HH:mm"},meridiemParse:/يېرىم كېچە|سەھەر|چۈشتىن بۇرۇن|چۈش|چۈشتىن كېيىن|كەچ/,meridiemHour:function(e,t){return 12===e&&(e=0),"يېرىم كېچە"===t||"سەھەر"===t||"چۈشتىÙ
12246† بۇرۇن"===t?e:"چۈشتىن كېيىن"===t||"كەچ"===t?e+12:e>=11?e:e+12},meridiem:function(e,t,n){var r=100*e+t;return r<600?"يېرىم كېچە":r<900?"سەھەر":r<1130?"چۈشتىن بۇرۇن":r<1230?"چۈش":r<1800?"چۈشتىن كېيىن":"كەچ"},calendar:{sameDay:"[بۈگۈن سائەت] LT",nextDay:"[ئەتە سائەت] LT",nextWeek:"[كېلەركى] dddd [سائەت] LT",lastDay:"[تۆنۈگۈن] LT",lastWeek:"[ئالدىنقى] dddd [سائەت] LT",sameElse:"L"},relativeTime:{future:"%s كېيىن",past:"%s بۇرۇن",s:"نەچچە سېكونت",ss:"%d سېكونت",m:"بىر مىنۇت",mm:"%d مىنۇت",h:"بىر سائەت",hh:"%d سائەت",d:"بىر كۈن",dd:"%d كۈن",M:"بىر ئاي",MM:"%d ئاي",y:"بىر يىل",yy:"%d يىل"},dayOfMonthOrdinalParse:/\d{1,2}(-كۈنى|-ئاي|-ھەپتە)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"-كۈنى";case"w":case"W":return e+"-ھەپتە";default:return e}},preparse:function(e){return e.replace(/،/g,",")},postformat:function(e){return e.replace(/,/g,"،")},week:{dow:1,doy:7}})}(n(381))},7691:function(e,t,n){!function(e){"use strict";function t(e,t,n){return"m"===n?t?"хвилина":"хвилину":"h"===n?t?"година":"годину":e+" "+(r=+e,a={ss:t?"секунда_секунди_секунд":"секунду_секунди_секунд",mm:t?"хвилина_хвилини_хвилин":"хвилину_хвилини_хвилин",hh:t?"година_години_годин":"годину_години_годин",dd:"день_дні_днів",MM:"місяць_місяці_місяців",yy:"рік_роки_років"}[n].split("_"),r%10==1&&r%100!=11?a[0]:r%10>=2&&r%10<=4&&(r%100<10||r%100>=20)?a[1]:a[2]);var r,a}function n(e){return function(){return e+"о"+(11===this.hours()?"б":"")+"] LT"}}e.defineLocale("uk",{months:{format:"січня_лютого_березня_квітня_травня_червня_липня_серпня_вересня_жовтня_листопада_грудня".split("_"),standalone:"січень_лютий_березень_квітень_травень_червень_липень_серпень_вересень_жовтень_листопад_грудень".split("_")},monthsShort:"січ_лют_бер_квіт_трав_черв_лип_серп_вер_жовт_лист_груд".split("_"),weekdays:function(e,t){var n={nominative:"неділя_понеділок_вівторок_середа_четвер_п’ятниця_субота".split("_"),accusative:"неділю_понеділок_вівторок_середу_четвер_п’ятницю_суботу".split("_"),genitive:"неділі_понеділка_вівторка_середи_четверга_п’ятниці_суботи".split("_")};return!0===e?n.nominative.slice(1,7).concat(n.nominative.slice(0,1)):e?n[/(\[[ВвУу]\]) ?dddd/.test(t)?"accusative":/\[?(?:минулої|наступної)? ?\] ?dddd/.test(t)?"genitive":"nominative"][e.day()]:n.nominative},weekdaysShort:"нд_пн_вт_ср_чт_пт_сб".split("_"),weekdaysMin:"нд_пн_вт_ср_чт_пт_сб".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY р.",LLL:"D MMMM YYYY р., HH:mm",LLLL:"dddd, D MMMM YYYY р., HH:mm"},calendar:{sameDay:n("[Сьогодні "),nextDay:n("[Завтра "),lastDay:n("[Вчора "),nextWeek:n("[У] dddd ["),lastWeek:function(){switch(this.day()){case 0:case 3:case 5:case 6:return n("[Минулої] dddd [").call(this);case 1:case 2:case 4:return n("[Минулого] dddd [").call(this)}},sameElse:"L"},relativeTime:{future:"за %s",past:"%s тому",s:"декілька секунд",ss:t,m:t,mm:t,h:"годину",hh:t,d:"день",dd:t,M:"місяць",MM:t,y:"рік",yy:t},meridiemParse:/ночі|ранку|дня|вечора/,isPM:function(e){return/^(дня|вечора)$/.test(e)},meridiem:function(e,t,n){return e<4?"ночі":e<12?"ранку":e<17?"дня":"вечора"},dayOfMonthOrdinalParse:/\d{1,2}-(й|го)/,ordinal:function(e,t){switch(t){case"M":case"d":case"DDD":case"w":case"W":return e+"-й";case"D":return e+"-го";default:return e}},week:{dow:1,doy:7}})}(n(381))},3795:function(e,t,n){!function(e){"use strict";var t=["جنوری","فروری","مارچ","اپریل","مئی","جون","جولائی","اگست","ستمبر","اکتوبر","نومبر","دسمبر"],n=["اتوار","پیر","منگل","بدھ","جمعرات","جمعہ","ہفتہ"];e.defineLocale("ur",{months:t,monthsShort:t,weekdays:n,weekdaysShort:n,weekdaysMin:n,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd، D MMMM YYYY HH:mm"},meridiemParse:/صبح|شام/,isPM:function(e){return"شام"===e},meridiem:function(e,t,n){return e<12?"صبح":"شام"},calendar:{sameDay:"[آج بوقت] LT",nextDay:"[کل بوقت] LT",nextWeek:"dddd [بوقت] LT",lastDay:"[گذشتہ روز بوقت] LT",lastWeek:"[گذشتہ] dddd [بوقت] LT",sameElse:"L"},relativeTime:{future:"%s بعد",past:"%s قبل",s:"چند سیکنڈ",ss:"%d سیکنڈ",m:"ایک منٹ",mm:"%d منٹ",h:"ایک گھنٹہ",hh:"%d گھنٹے",d:"ایک دن",dd:"%d دن",M:"ایک ماہ",MM:"%d ماہ",y:"ایک سال",yy:"%d سال"},preparse:function(e){return e.replace(/،/g,",")},postformat:function(e){return e.replace(/,/g,"،")},week:{dow:1,doy:4}})}(n(381))},588:function(e,t,n){!function(e){"use strict";e.defineLocale("uz-latn",{months:"Yanvar_Fevral_Mart_Aprel_May_Iyun_Iyul_Avgust_Sentabr_Oktabr_Noyabr_Dekabr".split("_"),monthsShort:"Yan_Fev_Mar_Apr_May_Iyun_Iyul_Avg_Sen_Okt_Noy_Dek".split("_"),weekdays:"Yakshanba_Dushanba_Seshanba_Chorshanba_Payshanba_Juma_Shanba".split("_"),weekdaysShort:"Yak_Dush_Sesh_Chor_Pay_Jum_Shan".split("_"),weekdaysMin:"Ya_Du_Se_Cho_Pa_Ju_Sha".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"D MMMM YYYY, dddd HH:mm"},calendar:{sameDay:"[Bugun soat] LT [da]",nextDay:"[Ertaga] LT [da]",nextWeek:"dddd [kuni soat] LT [da]",lastDay:"[Kecha soat] LT [da]",lastWeek:"[O'tgan] dddd [kuni soat] LT [da]",sameElse:"L"},relativeTime:{future:"Yaqin %s ichida",past:"Bir necha %s oldin",s:"soniya",ss:"%d soniya",m:"bir daqiqa",mm:"%d daqiqa",h:"bir soat",hh:"%d soat",d:"bir kun",dd:"%d kun",M:"bir oy",MM:"%d oy",y:"bir yil",yy:"%d yil"},week:{dow:1,doy:7}})}(n(381))},6791:function(e,t,n){!function(e){"use strict";e.defineLocale("uz",{months:"январ_феврал_март_апрел_май_июн_июл_август_сентябр_октябр_ноябр_декабр".split("_"),monthsShort:"янв_фев_мар_апр_май_июн_июл_авг_сен_окт_ноя_дек".split("_"),weekdays:"Якшанба_Душанба_Сешанба_Чоршанба_Пайшанба_Жума_Шанба".split("_"),weekdaysShort:"Якш_Душ_Сеш_Чор_Пай_Жум_Шан".split("_"),weekdaysMin:"Як_Ду_Се_Чо_Па_Жу_Ша".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"D MMMM YYYY, dddd HH:mm"},calendar:{sameDay:"[Бугун соат] LT [да]",nextDay:"[Эртага] LT [да]",nextWeek:"dddd [куни соат] LT [да]",lastDay:"[Кеча соат] LT [да]",lastWeek:"[Утган] dddd [куни соат] LT [да]",sameElse:"L"},relativeTime:{future:"Якин %s ичида",past:"Бир неча %s олдин",s:"фурсат",ss:"%d фурсат",m:"бир дакика",mm:"%d дакика",h:"бир соат",hh:"%
12246d соат",d:"бир кун",dd:"%d кун",M:"бир ой",MM:"%d ой",y:"бир йил",yy:"%d йил"},week:{dow:1,doy:7}})}(n(381))},5666:function(e,t,n){!function(e){"use strict";e.defineLocale("vi",{months:"tháng 1_tháng 2_tháng 3_tháng 4_tháng 5_tháng 6_tháng 7_tháng 8_tháng 9_tháng 10_tháng 11_tháng 12".split("_"),monthsShort:"Thg 01_Thg 02_Thg 03_Thg 04_Thg 05_Thg 06_Thg 07_Thg 08_Thg 09_Thg 10_Thg 11_Thg 12".split("_"),monthsParseExact:!0,weekdays:"chủ nhật_thứ hai_thứ ba_thứ tư_thứ năm_thứ sáu_thứ bảy".split("_"),weekdaysShort:"CN_T2_T3_T4_T5_T6_T7".split("_"),weekdaysMin:"CN_T2_T3_T4_T5_T6_T7".split("_"),weekdaysParseExact:!0,meridiemParse:/sa|ch/i,isPM:function(e){return/^ch$/i.test(e)},meridiem:function(e,t,n){return e<12?n?"sa":"SA":n?"ch":"CH"},longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM [năm] YYYY",LLL:"D MMMM [năm] YYYY HH:mm",LLLL:"dddd, D MMMM [năm] YYYY HH:mm",l:"DD/M/YYYY",ll:"D MMM YYYY",lll:"D MMM YYYY HH:mm",llll:"ddd, D MMM YYYY HH:mm"},calendar:{sameDay:"[Hôm nay lúc] LT",nextDay:"[Ngày mai lúc] LT",nextWeek:"dddd [tuần tới lúc] LT",lastDay:"[Hôm qua lúc] LT",lastWeek:"dddd [tuần trước lúc] LT",sameElse:"L"},relativeTime:{future:"%s tới",past:"%s trước",s:"vài giây",ss:"%d giây",m:"một phút",mm:"%d phút",h:"một giờ",hh:"%d giờ",d:"một ngày",dd:"%d ngày",w:"một tuần",ww:"%d tuần",M:"một tháng",MM:"%d tháng",y:"một năm",yy:"%d năm"},dayOfMonthOrdinalParse:/\d{1,2}/,ordinal:function(e){return e},week:{dow:1,doy:4}})}(n(381))},4378:function(e,t,n){!function(e){"use strict";e.defineLocale("x-pseudo",{months:"J~áñúá~rý_F~ébrú~árý_~Márc~h_Áp~ríl_~Máý_~Júñé~_Júl~ý_Áú~gúst~_Sép~témb~ér_Ó~ctób~ér_Ñ~óvém~bér_~Décé~mbér".split("_"),monthsShort:"J~áñ_~Féb_~Már_~Ápr_~Máý_~Júñ_~Júl_~Áúg_~Sép_~Óct_~Ñóv_~Déc".split("_"),monthsParseExact:!0,weekdays:"S~úñdá~ý_Mó~ñdáý~_Túé~sdáý~_Wéd~ñésd~áý_T~húrs~dáý_~Fríd~áý_S~átúr~dáý".split("_"),weekdaysShort:"S~úñ_~Móñ_~Túé_~Wéd_~Thú_~Frí_~Sát".split("_"),weekdaysMin:"S~ú_Mó~_Tú_~Wé_T~h_Fr~_Sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[T~ódá~ý át] LT",nextDay:"[T~ómó~rró~w át] LT",nextWeek:"dddd [át] LT",lastDay:"[Ý~ést~érdá~ý át] LT",lastWeek:"[L~ást] dddd [át] LT",sameElse:"L"},relativeTime:{future:"í~ñ %s",past:"%s á~gó",s:"á ~féw ~sécó~ñds",ss:"%d s~écóñ~ds",m:"á ~míñ~út
12246é",mm:"%d m~íñú~tés",h:"á~ñ hó~úr",hh:"%d h~óúrs",d:"á ~dáý",dd:"%d d~áýs",M:"á ~móñ~th",MM:"%d m~óñt~hs",y:"á ~ýéár",yy:"%d ý~éárs"},dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")},week:{dow:1,doy:4}})}(n(381))},5805:function(e,t,n){!function(e){"use strict";e.defineLocale("yo",{months:"Sẹ́rẹ́_Èrèlè_Ẹrẹ̀nà_Ìgbé_Èbibi_Òkùdu_Agẹmo_Ògún_Owewe_Ọ̀wàrà_Bélú_Ọ̀pẹ̀̀".split("_"),monthsShort:"Sẹ́r_Èrl_Ẹrn_Ìgb_Èbi_Òkù_Agẹ_Ògú_Owe_Ọ̀wà_Bél_Ọ̀pẹ̀̀".split("_"),weekdays:"Àìkú_Ajé_Ìsẹ́gun_Ọjọ́rú_Ọjọ́bọ_Ẹtì_Àbámẹ́ta".split("_"),weekdaysShort:"Àìk_Ajé_Ìsẹ́_Ọjr_Ọjb_Ẹtì_Àbá".split("_"),weekdaysMin:"Àì_Aj_Ìs_Ọr_Ọb_Ẹt_Àb".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Ònì ni] LT",nextDay:"[Ọ̀la ni] LT",nextWeek:"dddd [Ọsẹ̀ tón'bọ] [ni] LT",lastDay:"[Àna ni] LT",lastWeek:"dddd [Ọsẹ̀ tólọ́] [ni] LT",sameElse:"L"},relativeTime:{future:"ní %s",past:"%s kọjá",s:"ìsẹjú aayá die",ss:"aayá %d",m:"ìsẹjú kan",mm:"ìsẹjú %d",h:"wákati kan",hh:"wákati %d",d:"ọjọ́ kan",dd:"ọjọ́ %d",M:"osù kan",MM:"osù %d",y:"ọdún kan",yy:"ọdún %d"},dayOfMonthOrdinalParse:/ọjọ́\s\d{1,2}/,ordinal:"ọjọ́ %d",week:{dow:1,doy:4}})}(n(381))},3839:function(e,t,n){!function(e){"use strict";e.defineLocale("zh-cn",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"周日_周一_周二_周三_周四_周五_周六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日Ah点mm分",LLLL:"YYYY年M月D日ddddAh点mm分",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},meridiemParse:/凌晨|早上|上午|中午|下午|晚上/,meridiemHour:function(e,t){return 12===e&&(e=0),"凌晨"===t||"早上"===t||"上午"===t?e:"下午"===t||"晚上"===t?e+12:e>=11?e:e+12},meridiem:function(e,t,n){var r=100*e+t;return r<600?"凌晨":r<900?"早上":r<1130?"上午":r<1230?"中午":r<1800?"下午":"晚上"},calendar:{sameDay:"[今天]LT",nextDay:"[明天]LT",nextWeek:function(e){return e.week()!==this.week()?"[下]dddLT":"[本]dddLT"},lastDay:"[昨天]LT",lastWeek:function(e){return this.week()!==e.week()?"[上]dddLT":"[本]dddLT"},sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(日|月|周)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"日";case"M":return e+"月";case"w":case"W":return e+"周";default:return e}},relativeTime:{future:"%s后",past:"%s前",s:"几秒",ss:"%d 秒",m:"1 分钟",mm:"%d 分钟",h:"1 小时",hh:"%d 小时",d:"1 天",dd:"%d 天",w:"1 周",ww:"%d 周",M:"1 个月",MM:"%d 个月",y:"1 年",yy:"%d 年"},week:{dow:1,doy:4}})}(n(381))},5726:function(e,t,n){!function(e){"use strict";e.defineLocale("zh-hk",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"週日_週一_週二_週三_週四_週五_週六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日 HH:mm",LLLL:"YYYY年M月D日dddd HH:mm",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},meridiemParse:/凌晨|早上|上午|中午|下午|晚上/,meridiemHour:function(e,t){return 12===e&&(e=0),"凌晨"===t||"早上"===t||"上午"===t?e:"中午"===t?e>=11?e:e+12:"下午"===t||"晚上"===t?e+12:void 0},meridiem:function(e,t,n){var r=100*e+t;
vendor: 6,783 bytes, line 12246
12246return r<600?"凌晨":r<900?"早上":r<1200?"上午":1200===r?"中午":r<1800?"下午":"晚上"},calendar:{sameDay:"[今天]LT",nextDay:"[明天]LT",nextWeek:"[下]ddddLT",lastDay:"[昨天]LT",lastWeek:"[上]ddddLT",sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(日|月|週)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"日";case"M":return e+"月";case"w":case"W":return e+"週";default:return e}},relativeTime:{future:"%s後",past:"%s前",s:"幾秒",ss:"%d 秒",m:"1 分鐘",mm:"%d 分鐘",h:"1 小時",hh:"%d 小時",d:"1 天",dd:"%d 天",M:"1 個月",MM:"%d 個月",y:"1 年",yy:"%d 年"}})}(n(381))},9807:function(e,t,n){!function(e){"use strict";e.defineLocale("zh-mo",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"週日_週一_週二_週三_週四_週五_週六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"YYYY年M月D日",LLL:"YYYY年M月D日 HH:mm",LLLL:"YYYY年M月D日dddd HH:mm",l:"D/M/YYYY",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},meridiemParse:/凌晨|早上|上午|中午|下午|晚上/,meridiemHour:function(e,t){return 12===e&&(e=0),"凌晨"===t||"早上"===t||"上午"===t?e:"中午"===t?e>=11?e:e+12:"下午"===t||"晚上"===t?e+12:void 0},meridiem:function(e,t,n){var r=100*e+t;return r<600?"凌晨":r<900?"早上":r<1130?"上午":r<1230?"中午":r<1800?"下午":"晚上"},calendar:{sameDay:"[今天] LT",nextDay:"[明天] LT",nextWeek:"[下]dddd LT",lastDay:"[昨天] LT",lastWeek:"[上]dddd LT",sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(日|月|週)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"日";case"M":return e+"月";case"w":case"W":return e+"週";default:return e}},relativeTime:{future:"%s內",past:"%s前",s:"幾秒",ss:"%d 秒",m:"1 分鐘",mm:"%d 分鐘",h:"1 小時",hh:"%d 小時",d:"1 天",dd:"%d 天",M:"1 個月",MM:"%d 個月",y:"1 年",yy:"%d 年"}})}(n(381))},4152:function(e,t,n){!function(e){"use strict";e.defineLocale("zh-tw",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"週日_週一_週二_週三_週四_週五_週六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日 HH:mm",LLLL:"YYYY年M月D日dddd HH:mm",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},meridiemParse:/凌晨|早上|上午|中午|下午|晚上/,meridiemHour:function(e,t){return 12===e&&(e=0),"凌晨"===t||"早上"===t||"上午"===t?e:"中午"===t?e>=11?e:e+12:"下午"===t||"晚上"===t?e+12:void 0},meridiem:function(e,t,n){var r=100*e+t;return r<600?"凌晨":r<900?"早上":r<1130?"上午":r<1230?"中午":r<1800?"下午":"晚上"},calendar:{sameDay:"[今天] LT",nextDay:"[明天] LT",nextWeek:"[下]dddd LT",lastDay:"[昨天] LT",lastWeek:"[上]dddd LT",sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(日|月|週)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"日";case"M":return e+"月";case"w":case"W":return e+"週";default:return e}},relativeTime:{future:"%s後",past:"%s前",s:"幾秒",ss:"%d 秒",m:"1 分鐘",mm:"%d 分鐘",h:"1 小時",hh:"%d 小時",d:"1 天",dd:"%d 天",M:"1 個月",MM:"%d 個月",y:"1 年",yy:"%d 年"}})}(n(381))},6700:function(e,t,n){var r={"./af":2786,"./af.js":2786,"./ar":867,"./ar-dz":4130,"./ar-dz.js":4130,"./ar-kw":6135,"./ar-kw.js":6135,"./ar-ly":6440,"./ar-ly.js":6440,"./ar-ma":7702,"./ar-ma.js":7702,"./ar-sa":6040,"./ar-sa.js":6040,"./ar-tn":7100,"./ar-tn.js":7100,"./ar.js":867,"./az":1083,"./az.js":1083,"./be":9808,"./be.js":9808,"./bg":8338,"./bg.js":8338,"./bm":7438,"./bm.js":7438,"./bn":8905,"./bn-bd":6225,"./bn-bd.js":6225,"./bn.js":8905,"./bo":1560,"./bo.js":1560,"./br":1278,"./br.js":1278,"./bs":622,"./bs.js":622,"./ca":2468,"./ca.js":2468,"./cs":5822,"./cs.js":5822,"./cv":877,"./cv.js":877,"./cy":7373,"./cy.js":7373,"./da":4780,"./da.js":4780,"./de":9740,"./de-at":217,"./de-at.js":217,"./de-ch":894,"./de-ch.js":894,"./de.js":9740,"./dv":5300,"./dv.js":5300,"./el":837,"./el.js":837,"./en-au":8348,"./en-au.js":8348,"./en-ca":7925,"./en-ca.js":7925,"./en-gb":2243,"./en-gb.js":2243,"./en-ie":6436,"./en-ie.js":6436,"./en-il":7207,"./en-il.js":7207,"./en-in":4175,"./en-in.js":4175,"./en-nz":6319,"./en-nz.js":6319,"./en-sg":1662,"./en-sg.js":1662,"./eo":2915,"./eo.js":2915,"./es":5655,"./es-do":5251,"./es-do.js":5251,"./es-mx":6112,"./es-mx.js":6112,"./es-us":1146,"./es-us.js":1146,"./es.js":5655,"./et":5603,"./et.js":5603,"./eu":7763,"./eu.js":7763,"./fa":6959,"./fa.js":6959,"./fi":1897,"./fi.js":1897,"./fil":2549,"./fil.js":2549,"./fo":4694,"./fo.js":4694,"./fr":4470,"./fr-ca":3049,"./fr-ca.js":3049,"./fr-ch":2330,"./fr-ch.js":2330,"./fr.js":4470,"./fy":5044,"./fy.js":5044,"./ga":9295,"./ga.js":9295,"./gd":2101,"./gd.js":2101,"./gl":8794,"./gl.js":8794,"./gom-deva":7884,"./gom-deva.js":7884,"./gom-latn":3168,"./gom-latn.js":3168,"./gu":5349,"./gu.js":5349,"./he":4206,"./he.js":4206,"./hi":94,"./hi.js":94,"./hr":316,"./hr.js":316,"./hu":2138,"./hu.js":2138,"./hy-am":1423,"./hy-am.js":1423,"./id":9218,"./id.js":9218,"./is":135,"./is.js":135,"./it":626,"./it-ch":150,"./it-ch.js":150,"./it.js":626,"./ja":9183,"./ja.js":9183,"./jv":4286,"./jv.js":4286,"./ka":2105,"./ka.js":2105,"./kk":7772,"./kk.js":7772,"./km":8758,"./km.js":8758,"./kn":9282,"./kn.js":9282,"./ko":3730,"./ko.js":3730,"./ku":1408,"./ku.js":1408,"./ky":3291,"./ky.js":3291,"./lb":6841,"./lb.js":6841,"./lo":5466,"./lo.js":5466,"./lt":7010,"./lt.js":7010,"./lv":7595,"./lv.js":7595,"./me":9861,"./me.js":9861,"./mi":5493,"./mi.js":5493,"./mk":5966,"./mk.js":5966,"./ml":7341,"./ml.js":7341,"./mn":5115,"./mn.js":5115,"./mr":370,"./mr.js":370,"./ms":9847,"./ms-my":1237,"./ms-my.js":1237,"./ms.js":9847,"./mt":2126,"./mt.js":2126,"./my":6165,"./my.js":6165,"./nb":4924,"./nb.js":4924,"./ne":6744,"./ne.js":6744,"./nl":3901,"./nl-be":9814,"./nl-be.js":9814,"./nl.js":3901,"./nn":3877,"./nn.js":3877,"./oc-lnc":2135,"./oc-lnc.js":2135,"./pa-in":5858,"./pa-in.js":5858,"./pl":4495,"./pl.js":4495,"./pt":9520,"./pt-br":7971,"./pt-br.js":7971,"./pt.js":9520,"./ro":6459,"./ro.js":6459,"./ru":1793,"./ru.js":1793,"./sd":950,"./sd.js":950,"./se"
vendor: 4,726 bytes, line 12246
12246:490,"./se.js":490,"./si":124,"./si.js":124,"./sk":4249,"./sk.js":4249,"./sl":4985,"./sl.js":4985,"./sq":1104,"./sq.js":1104,"./sr":9131,"./sr-cyrl":9915,"./sr-cyrl.js":9915,"./sr.js":9131,"./ss":5893,"./ss.js":5893,"./sv":8760,"./sv.js":8760,"./sw":1172,"./sw.js":1172,"./ta":7333,"./ta.js":7333,"./te":3110,"./te.js":3110,"./tet":2095,"./tet.js":2095,"./tg":7321,"./tg.js":7321,"./th":9041,"./th.js":9041,"./tk":9005,"./tk.js":9005,"./tl-ph":5768,"./tl-ph.js":5768,"./tlh":9444,"./tlh.js":9444,"./tr":2397,"./tr.js":2397,"./tzl":8254,"./tzl.js":8254,"./tzm":1106,"./tzm-latn":699,"./tzm-latn.js":699,"./tzm.js":1106,"./ug-cn":9288,"./ug-cn.js":9288,"./uk":7691,"./uk.js":7691,"./ur":3795,"./ur.js":3795,"./uz":6791,"./uz-latn":588,"./uz-latn.js":588,"./uz.js":6791,"./vi":5666,"./vi.js":5666,"./x-pseudo":4378,"./x-pseudo.js":4378,"./yo":5805,"./yo.js":5805,"./zh-cn":3839,"./zh-cn.js":3839,"./zh-hk":5726,"./zh-hk.js":5726,"./zh-mo":9807,"./zh-mo.js":9807,"./zh-tw":4152,"./zh-tw.js":4152};function a(e){var t=i(e);return n(t)}function i(e){if(!n.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}a.keys=function(){return Object.keys(r)},a.resolve=i,e.exports=a,a.id=6700},381:function(e,t,n){(e=n.nmd(e)).exports=function(){"use strict";var t,r;function a(){return t.apply(null,arguments)}function i(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function s(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function o(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function l(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;var t;for(t in e)if(o(e,t))return!1;return!0}function u(e){return void 0===e}function d(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function c(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function _(e,t){var n,r=[],a=e.length;for(n=0;n<a;++n)r.push(t(e[n],n));return r}function m(e,t){for(var n in t)o(t,n)&&(e[n]=t[n]);return o(t,"toString")&&(e.toString=t.toString),o(t,"valueOf")&&(e.valueOf=t.valueOf),e}function f(e,t,n,r){return wt(e,t,n,r,!0).utc()}function h(e){return null==e._pf&&(e._pf={empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}),e._pf}function p(e){if(null==e._isValid){var t=h(e),n=r.call(t.parsedDateParts,(function(e){return null!=e})),a=!isNaN(e._d.getTime())&&t.overflow<0&&!t.empty&&!t.invalidEra&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&n);if(e._strict&&(a=a&&0===t.charsLeftOver&&0===t.unusedTokens.length&&void 0===t.bigHour),null!=Object.isFrozen&&Object.isFrozen(e))return a;e._isValid=a}return e._isValid}function y(e){var t=f(NaN);return null!=e?m(h(t),e):h(t).userInvalidated=!0,t}r=Array.prototype.some?Array.prototype.some:function(e){var t,n=Object(this),r=n.length>>>0;for(t=0;t<r;t++)if(t in n&&e.call(this,n[t],t,n))return!0;return!1};var v=a.momentProperties=[],g=!1;function M(e,t){var n,r,a,i=v.length;if(u(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),u(t._i)||(e._i=t._i),u(t._f)||(e._f=t._f),u(t._l)||(e._l=t._l),u(t._strict)||(e._strict=t._strict),u(t._tzm)||(e._tzm=t._tzm),u(t._isUTC)||(e._isUTC=t._isUTC),u(t._offset)||(e._offset=t._offset),u(t._pf)||(e._pf=h(t)),u(t._locale)||(e._locale=t._locale),i>0)for(n=0;n<i;n++)u(a=t[r=v[n]])||(e[r]=a);return e}function L(e){M(this,e),this._d=new Date(null!=e._d?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===g&&(g=!0,a.updateOffset(this),g=!1)}function b(e){return e instanceof L||null!=e&&null!=e._isAMomentObject}function Y(e){!1===a.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+e)}function k(e,t){var n=!0;return m((function(){if(null!=a.deprecationHandler&&a.deprecationHandler(null,e),n){var r,i,s,l=[],u=arguments.length;for(i=0;i<u;i++){if(r="","object"==typeof arguments[i]){for(s in r+="\n["+i+"] ",arguments[0])o(arguments[0],s)&&(r+=s+": "+arguments[0][s]+", ");r=r.slice(0,-2)}else r=arguments[i];l.push(r)}Y(e+"\nArguments: "+Array.prototype.slice.call(l).join("")+"\n"+(new Error).stack),n=!1}return t.apply(this,arguments)}),t)}var w,D={};function T(e,t){null!=a.deprecationHandler&&a.deprecationHandler(e,t),D[e]||(Y(t),D[e]=!0)}function S(e){return"undefined"!=typeof Function&&e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}function j(e,t){var n,r=m({},e);
vendor: 12,659 bytes, line 12246
12246for(n in t)o(t,n)&&(s(e[n])&&s(t[n])?(r[n]={},m(r[n],e[n]),m(r[n],t[n])):null!=t[n]?r[n]=t[n]:delete r[n]);for(n in e)o(e,n)&&!o(t,n)&&s(e[n])&&(r[n]=m({},r[n]));return r}function x(e){null!=e&&this.set(e)}a.suppressDeprecationWarnings=!1,a.deprecationHandler=null,w=Object.keys?Object.keys:function(e){var t,n=[];for(t in e)o(e,t)&&n.push(t);return n};function H(e,t,n){var r=""+Math.abs(e),a=t-r.length;return(e>=0?n?"+":"":"-")+Math.pow(10,Math.max(0,a)).toString().substr(1)+r}var O=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,E=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,P={},A={};function F(e,t,n,r){var a=r;"string"==typeof r&&(a=function(){return this[r]()}),e&&(A[e]=a),t&&(A[t[0]]=function(){return H(a.apply(this,arguments),t[1],t[2])}),n&&(A[n]=function(){return this.localeData().ordinal(a.apply(this,arguments),e)})}function C(e,t){return e.isValid()?(t=I(t,e.localeData()),P[t]=P[t]||function(e){var t,n,r,a=e.match(O);for(t=0,n=a.length;t<n;t++)A[a[t]]?a[t]=A[a[t]]:a[t]=(r=a[t]).match(/\[[\s\S]/)?r.replace(/^\[|\]$/g,""):r.replace(/\\/g,"");return function(t){var r,i="";for(r=0;r<n;r++)i+=S(a[r])?a[r].call(t,e):a[r];return i}}(t),P[t](e)):e.localeData().invalidDate()}function I(e,t){var n=5;function r(e){return t.longDateFormat(e)||e}for(E.lastIndex=0;n>=0&&E.test(e);)e=e.replace(E,r),E.lastIndex=0,n-=1;return e}var W={};function R(e,t){var n=e.toLowerCase();W[n]=W[n+"s"]=W[t]=e}function z(e){return"string"==typeof e?W[e]||W[e.toLowerCase()]:void 0}function N(e){var t,n,r={};for(n in e)o(e,n)&&(t=z(n))&&(r[t]=e[n]);return r}var q={};function U(e,t){q[e]=t}function B(e){return e%4==0&&e%100!=0||e%400==0}function J(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function V(e){var t=+e,n=0;return 0!==t&&isFinite(t)&&(n=J(t)),n}function $(e,t){return function(n){return null!=n?(K(this,e,n),a.updateOffset(this,t),this):G(this,e)}}function G(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function K(e,t,n){e.isValid()&&!isNaN(n)&&("FullYear"===t&&B(e.year())&&1===e.month()&&29===e.date()?(n=V(n),e._d["set"+(e._isUTC?"UTC":"")+t](n,e.month(),be(n,e.month()))):e._d["set"+(e._isUTC?"UTC":"")+t](n))}var Z,Q=/\d/,X=/\d\d/,ee=/\d{3}/,te=/\d{4}/,ne=/[+-]?\d{6}/,re=/\d\d?/,ae=/\d\d\d\d?/,ie=/\d\d\d\d\d\d?/,se=/\d{1,3}/,oe=/\d{1,4}/,le=/[+-]?\d{1,6}/,ue=/\d+/,de=/[+-]?\d+/,ce=/Z|[+-]\d\d:?\d\d/gi,_e=/Z|[+-]\d\d(?::?\d\d)?/gi,me=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i;function fe(e,t,n){Z[e]=S(t)?t:function(e,r){return e&&n?n:t}}function he(e,t){return o(Z,e)?Z[e](t._strict,t._locale):new RegExp(pe(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,(function(e,t,n,r,a){return t||n||r||a}))))}function pe(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}Z={};var ye={};function ve(e,t){var n,r,a=t;for("string"==typeof e&&(e=[e]),d(t)&&(a=function(e,n){n[t]=V(e)}),r=e.length,n=0;n<r;n++)ye[e[n]]=a}function ge(e,t){ve(e,(function(e,n,r,a){r._w=r._w||{},t(e,r._w,r,a)}))}function Me(e,t,n){null!=t&&o(ye,e)&&ye[e](t,n._a,n,e)}var Le;function be(e,t){if(isNaN(e)||isNaN(t))return NaN;var n,r=(t%(n=12)+n)%n;return e+=(t-r)/12,1===r?B(e)?29:28:31-r%7%2}Le=Array.prototype.indexOf?Array.prototype.indexOf:function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1},F("M",["MM",2],"Mo",(function(){return this.month()+1})),F("MMM",0,0,(function(e){return this.localeData().monthsShort(this,e)})),F("MMMM",0,0,(function(e){return this.localeData().months(this,e)})),R("month","M"),U("month",8),fe("M",re),fe("MM",re,X),fe("MMM",(function(e,t){return t.monthsShortRegex(e)})),fe("MMMM",(function(e,t){return t.monthsRegex(e)})),ve(["M","MM"],(function(e,t){t[1]=V(e)-1})),ve(["MMM","MMMM"],(function(e,t,n,r){var a=n._locale.monthsParse(e,r,n._strict);null!=a?t[1]=a:h(n).invalidMonth=e}));var Ye="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ke="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),we=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,De=me,Te=me;function Se(e,t,n){var r,a,i,s=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],r=0;r<12;++r)i=f([2e3,r]),this._shortMonthsParse[r]=this.monthsShort(i,"").toLocaleLowerCase(),this._longMonthsParse[r]=this.months(i,"").toLocaleLowerCase();return n?"MMM"===t?-1!==(a=Le.call(this._shortMonthsParse,s))?a:null:-1!==(a=Le.call(this._longMonthsParse,s))?a:null:"MMM"===t?-1!==(a=Le.call(this._shortMonthsParse,s))||-1!==(a=Le.call(this._longMonthsParse,s))?a:null:-1!==(a=Le.call(this._longMonthsParse,s))||-1!==(a=Le.call(this._shortMonthsParse,s))?a:null}function je(e,t){var n;if(!e.isValid())return e;if("string"==typeof t)if(/^\d+$/.test(t))t=V(t);else if(!d(t=e.localeData().monthsParse(t)))return e;return n=Math.min(e.date(),be(e.year(),t)),e._d["set"+(e._isUTC?"UTC":"")+"Month"](t,n),e}function xe(e){return null!=e?(je(this,e),a.updateOffset(this,!0),this):G(this,"Month")}function He(){function e(e,t){return t.length-e.length}var t,n,r=[],a=[],i=[];for(t=0;t<12;t++)n=f([2e3,t]),r.push(this.monthsShort(n,"")),a.push(this.months(n,"")),i.push(this.months(n,"")),i.push(this.monthsShort(n,""));for(r.sort(e),a.sort(e),i.sort(e),t=0;t<12;t++)r[t]=pe(r[t]),a[t]=pe(a[t]);for(t=0;t<24;t++)i[t]=pe(i[t]);this._monthsRegex=new RegExp("^("+i.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+a.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+r.join("|")+")","i")}function Oe(e){return B(e)?366:365}F("Y",0,0,(function(){var e=this.year();return e<=9999?H(e,4):"+"+e})),F(0,["YY",2],0,(function(){return this.year()%100})),F(0,["YYYY",4],0,"year"),F(0,["YYYYY",5],0,"year"),F(0,["YYYYYY",6,!0],0,"year"),R("year","y"),U("year",1),fe("Y",de),fe("YY",re,X),fe("YYYY",oe,te),fe("YYYYY",le,ne),fe("YYYYYY",le,ne),ve(["YYYYY","YYYYYY"],0),ve("YYYY",(function(e,t){t[0]=2===e.length?a.parseTwoDigitYear(e):V(e)})),ve("YY",(function(e,t){t[0]=a.parseTwoDigitYear(e)})),ve("Y",(function(e,t){t[0]=parseInt(e,10)})),a.parseTwoDigitYear=function(e){return V(e)+(V(e)>68?1900:2e3)};var Ee=$("FullYear",!0);function Pe(e,t,n,r,a,i,s){var o;return e<100&&e>=0?(o=new Date(e+400,t,n,r,a,i,s),isFinite(o.getFullYear())&&o.setFullYear(e)):o=new Date(e,t,n,r,a,i,s),o}function Ae(e){var t,n;return e<100&&e>=0?((n=Array.prototype.slice.call(arguments))[0]=e+400,t=new Date(Date.UTC.apply(null,n)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function Fe(e,t,n){var r=7+t-n;return-(7+Ae(e,0,r).getUTCDay()-t)%7+r-1}function Ce(e,t,n,r,a){var i,s,o=1+7*(t-1)+(7+n-r)%7+Fe(e,r,a);return o<=0?s=Oe(i=e-1)+o:o>Oe(e)?(i=e+1,s=o-Oe(e)):(i=e,s=o),{year:i,dayOfYear:s}}function Ie(e,t,n){var r,a,i=Fe(e.year(),t,n),s=Math.floor((e.dayOfYear()-i-1)/7)+1;return s<1?r=s+We(a=e.year()-1,t,n):s>We(e.year(),t,n)?(r=s-We(e.year(),t,n),a=e.year()+1):(a=e.year(),r=s),{week:r,year:a}}function We(e,t,n){var r=Fe(e,t,n),a=Fe(e+1,t,n);return(Oe(e)-r+a)/7}F("w",["ww",2],"wo","week"),F("W",["WW",2],"Wo","isoWeek"),R("week","w"),R("isoWeek","W"),U("week",5),U("isoWeek",5),fe("w",re),fe("ww",re,X),fe("W",re),fe("WW",re,X),ge(["w","ww","W","WW"],(function(e,t,n,r){t[r.substr(0,1)]=V(e)}));function Re(e,t){return e.slice(t,7).concat(e.slice(0,t))}F("d",0,"do","day"),F("dd",0,0,(function(e){return this.localeData().weekdaysMin(this,e)})),F("ddd",0,0,(function(e){return this.localeData().weekdaysShort(this,e)})),F("dddd",0,0,(function(e){return this.localeData().weekdays(this,e)})),F("e",0,0,"weekday"),F("E",0,0,"isoWeekday"),R("day","d"),R("weekday","e"),R("isoWeekday","E"),U("day",11),U("weekday",11),U("isoWeekday",11),fe("d",re),fe("e",re),fe("E",re),fe("dd",(function(e,t){return t.weekdaysMinRegex(e)})),fe("ddd",(function(e,t){return t.weekdaysShortRegex(e)})),fe("dddd",(function(e,t){return t.weekdaysRegex(e)})),ge(["dd","ddd","dddd"],(function(e,t,n,r){var a=n._locale.weekdaysParse(e,r,n._strict);null!=a?t.d=a:h(n).invalidWeekday=e})),ge(["d","e","E"],(function(e,t,n,r){t[r]=V(e)}));var ze="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Ne="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),qe="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Ue=me,Be=me,Je=me;function Ve(e,t,n){var r,a,i,s=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)i=f([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(i,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(i,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(i,"").toLocaleLowerCase();return n?"dddd"===t?-1!==(a=Le.call(this._weekdaysParse,s))?a:null:"ddd"===t?-1!==(a=Le.call(this._shortWeekdaysParse,s))?a:null:-1!==(a=Le.call(this._minWeekdaysParse,s))?a:null:"dddd"===t?-1!==(a=Le.call(this._weekdaysParse,s))||-1!==(a=Le.call(this._shortWeekdaysParse,s))||-1!==(a=Le.call(this._minWeekdaysParse,s))?a:null:"ddd"===t?-1!==(a=Le.call(this._shortWeekdaysParse,s))||-1!==(a=Le.call(this._weekdaysParse,s))||-1!==(a=Le.call(this._minWeekdaysParse,s))?a:null:-1!==(a=Le.call(this._minWeekdaysParse,s))||-1!==(a=Le.call(this._weekdaysParse,s))||-1!==(a=Le.call(this._shortWeekdaysParse,s))?a:null}function $e(){function e(e,t){return t.length-e.length}var t,n,r,a,i,s=[],o=[],l=[],u=[];for(t=0;t<7;t++)n=f([2e3,1]).day(t),r=pe(this.weekdaysMin(n,"")),a=pe(this.weekdaysShort(n,"")),i=pe(this.weekdays(n,"")),s.push(r),o.push(a),l.push(i),u.push(r),u.push(a),u.push(i);s.sort(e),o.sort(e),l.sort(e),u.sort(e),this._weekdaysRegex=new RegExp("^("+u.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+o.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+s.join("|")+")","i")}function Ge(){return this.hours()%12||12}function Ke(e,t){F(e,0,0,(function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)}))}function Ze(e,t){return t._meridiemParse}F("H",["HH",2],0,"hour"),F("h",["hh",2],0,Ge),F("k",["kk",2],0,(function(){return this.hours()||24})),F("hmm",0,0,(function(){return""+Ge.apply(this)+H(this.minutes(),2)})),F("hmmss",0,0,(function(){return""+Ge.apply(this)+H(this.minutes(),2)+H(this.seconds(),2)})),F("Hmm",0,0,(function(){return""+this.hours()+H(this.minutes(),2)})),F("Hmmss",0,0,(function(){return""+this.hours()+H(this.minutes(),2)+H(this.seconds(),2)})),Ke("a",!0),Ke("A",!1),R("hour","h"),U("hour",13),fe("a",Ze),fe("A",Ze),fe("H",re),fe("h",re),fe("k",re),fe("HH",re,X),fe("hh",re,X),fe("kk",re,X),fe("hmm",ae),fe("hmmss",ie),fe("Hmm",ae),fe("Hmmss",ie),ve(["H","HH"],3),ve(["k","kk"],(function(e,t,n){var r=V(e);t[3]=24===r?0:r})),ve(["a","A"],(function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e})),ve(["h","hh"],(function(e,t,n){t[3]=V(e),h(n).bigHour=!0})),ve("hmm",(function(e,t,n){var r=e.length-2;t[3]=V(e.substr(0,r)),t[4]=V(e.substr(r)),h(n).bigHour=!0})),ve("hmmss",(function(e,t,n){var r=e.length-4,a=e.length-2;t[3]=V(e.substr(0,r)),t[4]=V(e.substr(r,2)),t[5]=V(e.substr(a)),h(n).bigHour=!0})),ve("Hmm",(function(e,t,n){var r=e.length-2;t[3]=V(e.substr(0,r)),t[4]=V(e.substr(r))})),ve("Hmmss",(function(e,t,n){var r=e.length-4,a=e.length-2;t[3]=V(e.substr(0,r)),t[4]=V(e.substr(r,2)),t[5]=V(e.substr(a))}));var Qe=$("Hours",!0);var Xe,et={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:Ye,monthsShort:ke,week:{dow:0,doy:6},weekdays:ze,weekdaysMin:qe,weekdaysShort:Ne,meridiemParse:/[ap]\.?m?\.?/i},tt={},nt={};function rt(e,t){var n,r=Math.min(e.length,t.length);for(n=0;n<r;n+=1)if(e[n]!==t[n])return n;return r}function at(e){return e?e.toLowerCase().replace("_","-"):e}function it(t){var r=null;if(void 0===tt[t]&&e&&e.exports&&function(e){return null!=e.match("^[^/\\\\]*$")}
vendor: 4,992 bytes, line 12246
12246(t))try{r=Xe._abbr,n(6700)("./"+t),st(r)}catch(e){tt[t]=null}return tt[t]}function st(e,t){var n;return e&&((n=u(t)?lt(e):ot(e,t))?Xe=n:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),Xe._abbr}function ot(e,t){if(null!==t){var n,r=et;if(t.abbr=e,null!=tt[e])T("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),r=tt[e]._config;else if(null!=t.parentLocale)if(null!=tt[t.parentLocale])r=tt[t.parentLocale]._config;else{if(null==(n=it(t.parentLocale)))return nt[t.parentLocale]||(nt[t.parentLocale]=[]),nt[t.parentLocale].push({name:e,config:t}),null;r=n._config}return tt[e]=new x(j(r,t)),nt[e]&&nt[e].forEach((function(e){ot(e.name,e.config)})),st(e),tt[e]}return delete tt[e],null}function lt(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return Xe;if(!i(e)){if(t=it(e))return t;e=[e]}return function(e){for(var t,n,r,a,i=0;i<e.length;){for(t=(a=at(e[i]).split("-")).length,n=(n=at(e[i+1]))?n.split("-"):null;t>0;){if(r=it(a.slice(0,t).join("-")))return r;if(n&&n.length>=t&&rt(a,n)>=t-1)break;t--}i++}return Xe}(e)}function ut(e){var t,n=e._a;return n&&-2===h(e).overflow&&(t=n[1]<0||n[1]>11?1:n[2]<1||n[2]>be(n[0],n[1])?2:n[3]<0||n[3]>24||24===n[3]&&(0!==n[4]||0!==n[5]||0!==n[6])?3:n[4]<0||n[4]>59?4:n[5]<0||n[5]>59?5:n[6]<0||n[6]>999?6:-1,h(e)._overflowDayOfYear&&(t<0||t>2)&&(t=2),h(e)._overflowWeeks&&-1===t&&(t=7),h(e)._overflowWeekday&&-1===t&&(t=8),h(e).overflow=t),e}var dt=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,ct=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,_t=/Z|[+-]\d\d(?::?\d\d)?/,mt=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],ft=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],ht=/^\/?Date\((-?\d+)/i,pt=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,yt={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function vt(e){var t,n,r,a,i,s,o=e._i,l=dt.exec(o)||ct.exec(o),u=mt.length,d=ft.length;if(l){for(h(e).iso=!0,t=0,n=u;t<n;t++)if(mt[t][1].exec(l[1])){a=mt[t][0],r=!1!==mt[t][2];break}if(null==a)return void(e._isValid=!1);if(l[3]){for(t=0,n=d;t<n;t++)if(ft[t][1].exec(l[3])){i=(l[2]||" ")+ft[t][0];break}if(null==i)return void(e._isValid=!1)}if(!r&&null!=i)return void(e._isValid=!1);if(l[4]){if(!_t.exec(l[4]))return void(e._isValid=!1);s="Z"}e._f=a+(i||"")+(s||""),Yt(e)}else e._isValid=!1}function gt(e){var t=parseInt(e,10);return t<=49?2e3+t:t<=999?1900+t:t}function Mt(e){var t,n,r,a,i,s,o,l,u=pt.exec(e._i.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,""));if(u){if(n=u[4],r=u[3],a=u[2],i=u[5],s=u[6],o=u[7],l=[gt(n),ke.indexOf(r),parseInt(a,10),parseInt(i,10),parseInt(s,10)],o&&l.push(parseInt(o,10)),t=l,!function(e,t,n){return!e||Ne.indexOf(e)===new Date(t[0],t[1],t[2]).getDay()||(h(n).weekdayMismatch=!0,n._isValid=!1,!1)}(u[1],t,e))return;e._a=t,e._tzm=function(e,t,n){if(e)return yt[e];if(t)return 0;var r=parseInt(n,10),a=r%100;return(r-a)/100*60+a}(u[8],u[9],u[10]),e._d=Ae.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),h(e).rfc2822=!0}else e._isValid=!1}function Lt(e,t,n){return null!=e?e:null!=t?t:n}function bt(e){var t,n,r,i,s,o=[];if(!e._d){for(r=function(e){var t=new Date(a.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}(e),e._w&&null==e._a[2]&&null==e._a[1]&&function(e){var t,n,r,a,i,s,o,l,u;null!=(t=e._w).GG||null!=t.W||null!=t.E?(i=1,s=4,n=Lt(t.GG,e._a[0],Ie(Dt(),1,4).year),r=Lt(t.W,1),((a=Lt(t.E,1))<1||a>7)&&(l=!0)):(i=e._locale._week.dow,s=e._locale._week.doy,u=Ie(Dt(),i,s),n=Lt(t.gg,e._a[0],u.year),r=Lt(t.w,u.week),null!=t.d?((a=t.d)<0||a>6)&&(l=!0):null!=t.e?(a=t.e+i,(t.e<0||t.e>6)&&(l=!0)):a=i),r<1||r>We(n,i,s)?h(e)._overflowWeeks=!0:null!=l?h(e)._overflowWeekday=!0:(o=Ce(n,r,a,i,s),e._a[0]=o.year,e._dayOfYear=o.dayOfYear)}(e),null!=e._dayOfYear&&(s=Lt(e._a[0],r[0]),(e._dayOfYear>
vendor: 33,503 bytes, line 12246
12246Oe(s)||0===e._dayOfYear)&&(h(e)._overflowDayOfYear=!0),n=Ae(s,0,e._dayOfYear),e._a[1]=n.getUTCMonth(),e._a[2]=n.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=o[t]=r[t];for(;t<7;t++)e._a[t]=o[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[3]&&0===e._a[4]&&0===e._a[5]&&0===e._a[6]&&(e._nextDay=!0,e._a[3]=0),e._d=(e._useUTC?Ae:Pe).apply(null,o),i=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[3]=24),e._w&&void 0!==e._w.d&&e._w.d!==i&&(h(e).weekdayMismatch=!0)}}function Yt(e){if(e._f!==a.ISO_8601)if(e._f!==a.RFC_2822){e._a=[],h(e).empty=!0;var t,n,r,i,s,o,l,u=""+e._i,d=u.length,c=0;for(l=(r=I(e._f,e._locale).match(O)||[]).length,t=0;t<l;t++)i=r[t],(n=(u.match(he(i,e))||[])[0])&&((s=u.substr(0,u.indexOf(n))).length>0&&h(e).unusedInput.push(s),u=u.slice(u.indexOf(n)+n.length),c+=n.length),A[i]?(n?h(e).empty=!1:h(e).unusedTokens.push(i),Me(i,n,e)):e._strict&&!n&&h(e).unusedTokens.push(i);h(e).charsLeftOver=d-c,u.length>0&&h(e).unusedInput.push(u),e._a[3]<=12&&!0===h(e).bigHour&&e._a[3]>0&&(h(e).bigHour=void 0),h(e).parsedDateParts=e._a.slice(0),h(e).meridiem=e._meridiem,e._a[3]=function(e,t,n){var r;return null==n?t:null!=e.meridiemHour?e.meridiemHour(t,n):null!=e.isPM?((r=e.isPM(n))&&t<12&&(t+=12),r||12!==t||(t=0),t):t}(e._locale,e._a[3],e._meridiem),null!==(o=h(e).era)&&(e._a[0]=e._locale.erasConvertYear(o,e._a[0])),bt(e),ut(e)}else Mt(e);else vt(e)}function kt(e){var t=e._i,n=e._f;return e._locale=e._locale||lt(e._l),null===t||void 0===n&&""===t?y({nullInput:!0}):("string"==typeof t&&(e._i=t=e._locale.preparse(t)),b(t)?new L(ut(t)):(c(t)?e._d=t:i(n)?function(e){var t,n,r,a,i,s,o=!1,l=e._f.length;if(0===l)return h(e).invalidFormat=!0,void(e._d=new Date(NaN));for(a=0;a<l;a++)i=0,s=!1,t=M({},e),null!=e._useUTC&&(t._useUTC=e._useUTC),t._f=e._f[a],Yt(t),p(t)&&(s=!0),i+=h(t).charsLeftOver,i+=10*h(t).unusedTokens.length,h(t).score=i,o?i<r&&(r=i,n=t):(null==r||i<r||s)&&(r=i,n=t,s&&(o=!0));m(e,n||t)}(e):n?Yt(e):function(e){var t=e._i;u(t)?e._d=new Date(a.now()):c(t)?e._d=new Date(t.valueOf()):"string"==typeof t?function(e){var t=ht.exec(e._i);null===t?(vt(e),!1===e._isValid&&(delete e._isValid,Mt(e),!1===e._isValid&&(delete e._isValid,e._strict?e._isValid=!1:a.createFromInputFallback(e)))):e._d=new Date(+t[1])}(e):i(t)?(e._a=_(t.slice(0),(function(e){return parseInt(e,10)})),bt(e)):s(t)?function(e){if(!e._d){var t=N(e._i),n=void 0===t.day?t.date:t.day;e._a=_([t.year,t.month,n,t.hour,t.minute,t.second,t.millisecond],(function(e){return e&&parseInt(e,10)})),bt(e)}}(e):d(t)?e._d=new Date(t):a.createFromInputFallback(e)}(e),p(e)||(e._d=null),e))}function wt(e,t,n,r,a){var o,u={};return!0!==t&&!1!==t||(r=t,t=void 0),!0!==n&&!1!==n||(r=n,n=void 0),(s(e)&&l(e)||i(e)&&0===e.length)&&(e=void 0),u._isAMomentObject=!0,u._useUTC=u._isUTC=a,u._l=n,u._i=e,u._f=t,u._strict=r,(o=new L(ut(kt(u))))._nextDay&&(o.add(1,"d"),o._nextDay=void 0),o}function Dt(e,t,n,r){return wt(e,t,n,r,!1)}a.createFromInputFallback=k("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",(function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))})),a.ISO_8601=function(){},a.RFC_2822=function(){};var Tt=k("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var e=Dt.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:y()})),St=k("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var e=Dt.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:y()}));function jt(e,t){var n,r;if(1===t.length&&i(t[0])&&(t=t[0]),!t.length)return Dt();for(n=t[0],r=1;r<t.length;++r)t[r].isValid()&&!t[r][e](n)||(n=t[r]);return n}var xt=["year","quarter","month","week","day","hour","minute","second","millisecond"];function Ht(e){var t=N(e),n=t.year||0,r=t.quarter||0,a=t.month||0,i=t.week||t.isoWeek||0,s=t.day||0,l=t.hour||0,u=t.minute||0,d=t.second||0,c=t.millisecond||0;this._isValid=function(e){var t,n,r=!1,a=xt.length;for(t in e)if(o(e,t)&&(-1===Le.call(xt,t)||null!=e[t]&&isNaN(e[t])))return!1;for(n=0;n<a;++n)if(e[xt[n]]){if(r)return!1;parseFloat(e[xt[n]])!==V(e[xt[n]])&&(r=!0)}return!0}(t),this._milliseconds=+c+1e3*d+6e4*u+1e3*l*60*60,this._days=+s+7*i,this._months=+a+3*r+12*n,this._data={},this._locale=lt(),this._bubble()}function Ot(e){return e instanceof Ht}function Et(e){return e<0?-1*Math.round(-1*e):Math.round(e)}function Pt(e,t){F(e,0,0,(function(){var e=this.utcOffset(),n="+";return e<0&&(e=-e,n="-"),n+H(~~(e/60),2)+t+H(~~e%60,2)}))}Pt("Z",":"),Pt("ZZ",""),fe("Z",_e),fe("ZZ",_e),ve(["Z","ZZ"],(function(e,t,n){n._useUTC=!0,n._tzm=Ft(_e,e)}));var At=/([\+\-]|\d\d)/gi;function Ft(e,t){var n,r,a=(t||"").match(e);return null===a?null:0===(r=60*(n=((a[a.length-1]||[])+"").match(At)||["-",0,0])[1]+V(n[2]))?0:"+"===n[0]?r:-r}function Ct(e,t){var n,r;return t._isUTC?(n=t.clone(),r=(b(e)||c(e)?e.valueOf():Dt(e).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+r),a.updateOffset(n,!1),n):Dt(e).local()}function It(e){return-Math.round(e._d.getTimezoneOffset())}function Wt(){return!!this.isValid()&&this._isUTC&&0===this._offset}a.updateOffset=function(){};var Rt=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,zt=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Nt(e,t){var n,r,a,i,s,l,u=e,c=null;return Ot(e)?u={ms:e._milliseconds,d:e._days,M:e._months}:d(e)||!isNaN(+e)?(u={},t?u[t]=+e:u.milliseconds=+e):(c=Rt.exec(e))?(n="-"===c[1]?-1:1,u={y:0,d:V(c[2])*n,h:V(c[3])*n,m:V(c[4])*n,s:V(c[5])*n,ms:V(Et(1e3*c[6]))*n}):(c=zt.exec(e))?(n="-"===c[1]?-1:1,u={y:qt(c[2],n),M:qt(c[3],n),w:qt(c[4],n),d:qt(c[5],n),h:qt(c[6],n),m:qt(c[7],n),s:qt(c[8],n)}):null==u?u={}:"object"==typeof u&&("from"in u||"to"in u)&&(i=Dt(u.from),s=Dt(u.to),a=i.isValid()&&s.isValid()?(s=Ct(s,i),i.isBefore(s)?l=Ut(i,s):((l=Ut(s,i)).milliseconds=-l.milliseconds,l.months=-l.months),l):{milliseconds:0,months:0},(u={}).ms=a.milliseconds,u.M=a.months),r=new Ht(u),Ot(e)&&o(e,"_locale")&&(r._locale=e._locale),Ot(e)&&o(e,"_isValid")&&(r._isValid=e._isValid),r}function qt(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function Ut(e,t){var n={};return n.months=t.month()-e.month()+12*(t.year()-e.year()),e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function Bt(e,t){return function(n,r){var a;return null===r||isNaN(+r)||(T(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),a=n,n=r,r=a),Jt(this,Nt(n,r),e),this}}function Jt(e,t,n,r){var i=t._milliseconds,s=Et(t._days),o=Et(t._months);e.isValid()&&(r=null==r||r,o&&je(e,G(e,"Month")+o*n),s&&K(e,"Date",G(e,"Date")+s*n),i&&e._d.setTime(e._d.valueOf()+i*n),r&&a.updateOffset(e,s||o))}Nt.fn=Ht.prototype,Nt.invalid=function(){return Nt(NaN)};var Vt=Bt(1,"add"),$t=Bt(-1,"subtract");function Gt(e){return"string"==typeof e||e instanceof String}function Kt(e){return b(e)||c(e)||Gt(e)||d(e)||function(e){var t=i(e),n=!1;return t&&(n=0===e.filter((function(t){return!d(t)&&Gt(e)})).length),t&&n}(e)||function(e){var t,n,r=s(e)&&!l(e),a=!1,i=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],u=i.length;for(t=0;t<u;t+=1)n=i[t],a=a||o(e,n);return r&&a}(e)||null==e}function Zt(e){var t,n=s(e)&&!l(e),r=!1,a=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"];for(t=0;t<a.length;t+=1)r=r||o(e,a[t]);return n&&r}function Qt(e,t){if(e.date()<t.date())return-Qt(t,e);var n=12*(t.year()-e.year())+(t.month()-e.month()),r=e.clone().add(n,"months");return-(n+(t-r<0?(t-r)/(r-e.clone().add(n-1,"months")):(t-r)/(e.clone().add(n+1,"months")-r)))||0}function Xt(e){var t;return void 0===e?this._locale._abbr:(null!=(t=lt(e))&&(this._locale=t),this)}a.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",a.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var en=k("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",(function(e){return void 0===e?this.localeData():this.locale(e)}));function tn(){return this._locale}var nn=1e3,rn=6e4,an=36e5,sn=126227808e5;function on(e,t){return(e%t+t)%t}function ln(e,t,n){return e<100&&e>=0?new Date(e+400,t,n)-sn:new Date(e,t,n).valueOf()}function un(e,t,n){return e<100&&e>=0?Date.UTC(e+400,t,n)-sn:Date.UTC(e,t,n)}function dn(e,t){return t.erasAbbrRegex(e)}function cn(){var e,t,n=[],r=[],a=[],i=[],s=this.eras();for(e=0,t=s.length;e<t;++e)r.push(pe(s[e].name)),n.push(pe(s[e].abbr)),a.push(pe(s[e].narrow)),i.push(pe(s[e].name)),i.push(pe(s[e].abbr)),i.push(pe(s[e].narrow));this._erasRegex=new RegExp("^("+i.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+r.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+n.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+a.join("|")+")","i")}function _n(e,t){F(0,[e,e.length],0,t)}function mn(e,t,n,r,a){var i;return null==e?Ie(this,r,a).year:(t>(i=We(e,r,a))&&(t=i),fn.call(this,e,t,n,r,a))}function fn(e,t,n,r,a){var i=Ce(e,t,n,r,a),s=Ae(i.year,0,i.dayOfYear);return this.year(s.getUTCFullYear()),this.month(s.getUTCMonth()),this.date(s.getUTCDate()),this}F("N",0,0,"eraAbbr"),F("NN",0,0,"eraAbbr"),F("NNN",0,0,"eraAbbr"),F("NNNN",0,0,"eraName"),F("NNNNN",0,0,"eraNarrow"),F("y",["y",1],"yo","eraYear"),F("y",["yy",2],0,"eraYear"),F("y",["yyy",3],0,"eraYear"),F("y",["yyyy",4],0,"eraYear"),fe("N",dn),fe("NN",dn),fe("NNN",dn),fe("NNNN",(function(e,t){return t.erasNameRegex(e)})),fe("NNNNN",(function(e,t){return t.erasNarrowRegex(e)})),ve(["N","NN","NNN","NNNN","NNNNN"],(function(e,t,n,r){var a=n._locale.erasParse(e,r,n._strict);a?h(n).era=a:h(n).invalidEra=e})),fe("y",ue),fe("yy",ue),fe("yyy",ue),fe("yyyy",ue),fe("yo",(function(e,t){return t._eraYearOrdinalRegex||ue})),ve(["y","yy","yyy","yyyy"],0),ve(["yo"],(function(e,t,n,r){var a;n._locale._eraYearOrdinalRegex&&(a=e.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?t[0]=n._locale.eraYearOrdinalParse(e,a):t[0]=parseInt(e,10)})),F(0,["gg",2],0,(function(){return this.weekYear()%100})),F(0,["GG",2],0,(function(){return this.isoWeekYear()%100})),_n("gggg","weekYear"),_n("ggggg","weekYear"),_n("GGGG","isoWeekYear"),_n("GGGGG","isoWeekYear"),R("weekYear","gg"),R("isoWeekYear","GG"),U("weekYear",1),U("isoWeekYear",1),fe("G",de),fe("g",de),fe("GG",re,X),fe("gg",re,X),fe("GGGG",oe,te),fe("gggg",oe,te),fe("GGGGG",le,ne),fe("ggggg",le,ne),ge(["gggg","ggggg","GGGG","GGGGG"],(function(e,t,n,r){t[r.substr(0,2)]=V(e)})),ge(["gg","GG"],(function(e,t,n,r){t[r]=a.parseTwoDigitYear(e)})),F("Q",0,"Qo","quarter"),R("quarter","Q"),U("quarter",7),fe("Q",Q),ve("Q",(function(e,t){t[1]=3*(V(e)-1)})),F("D",["DD",2],"Do","date"),R("date","D"),U("date",9),fe("D",re),fe("DD",re,X),fe("Do",(function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient})),ve(["D","DD"],2),ve("Do",(function(e,t){t[2]=V(e.match(re)[0])}));var hn=$("Date",!0);F("DDD",["DDDD",3],"DDDo","dayOfYear"),R("dayOfYear","DDD"),U("dayOfYear",4),fe("DDD",se),fe("DDDD",ee),ve(["DDD","DDDD"],(function(e,t,n){n._dayOfYear=V(e)})),F("m",["mm",2],0,"minute"),R("minute","m"),U("minute",14),fe("m",re),fe("mm",re,X),ve(["m","mm"],4);var pn=$("Minutes",!1);F("s",["ss",2],0,"second"),R("second","s"),U("second",15),fe("s",re),fe("ss",re,X),ve(["s","ss"],5);var yn,vn,gn=$("Seconds",!1);for(F("S",0,0,(function(){return~~(this.millisecond()/100)})),F(0,["SS",2],0,(function(){return~~(this.millisecond()/10)})),F(0,["SSS",3],0,"millisecond"),F(0,["SSSS",4],0,(function(){return 10*this.millisecond()})),F(0,["SSSSS",5],0,(function(){return 100*this.millisecond()})),F(0,["SSSSSS",6],0,(function(){return 1e3*this.millisecond()})),F(0,["SSSSSSS",7],0,(function(){return 1e4*this.millisecond()})),F(0,["SSSSSSSS",8],0,(function(){return 1e5*this.millisecond()})),F(0,["SSSSSSSSS",9],0,(function(){return 1e6*this.millisecond()})),R("millisecond","ms"),U("millisecond",16),fe("S",se,Q),fe("SS",se,X),fe("SSS",se,ee),yn="SSSS";yn.length<=9;yn+="S")fe(yn,ue);function Mn(e,t){t[6]=V(1e3*("0."+e))}for(yn="S";yn.length<=9;yn+="S")ve(yn,Mn);vn=$("Milliseconds",!1),F("z",0,0,"zoneAbbr"),F("zz",0,0,"zoneName");var Ln=L.prototype;function bn(e){return e}Ln.add=Vt,Ln.calendar=function(e,t){1===arguments.length&&(arguments[0]?Kt(arguments[0])?(e=arguments[0],t=void 0):Zt(arguments[0])&&(t=arguments[0],e=void 0):(e=void 0,t=void 0));var n=e||Dt(),r=Ct(n,this).startOf("day"),i=a.calendarFormat(this,r)||"sameElse",s=t&&(S(t[i])?t[i].call(this,n):t[i]);return this.format(s||this.localeData().calendar(i,this,Dt(n)))},Ln.clone=function(){return new L(this)},Ln.diff=function(e,t,n){var r,a,i;if(!this.isValid())return NaN;if(!(r=Ct(e,this)).isValid())return NaN;switch(a=6e4*(r.utcOffset()-this.utcOffset()),t=z(t)){case"year":i=Qt(this,r)/12;break;case"month":i=Qt(this,r);break;case"quarter":i=Qt(this,r)/3;break;case"second":i=(this-r)/1e3;break;case"minute":i=(this-r)/6e4;break;case"hour":i=(this-r)/36e5;break;case"day":i=(this-r-a)/864e5;break;case"week":i=(this-r-a)/6048e5;break;default:i=this-r}return n?i:J(i)},Ln.endOf=function(e){var t,n;if(void 0===(e=z(e))||"millisecond"===e||!this.isValid())return this;switch(n=this._isUTC?un:ln,e){case"year":t=n(this.year()+1,0,1)-1;break;case"quarter":t=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=n(this.year(),this.month()+1,1)-1;break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=an-on(t+(this._isUTC?0:this.utcOffset()*rn),an)-1;break;case"minute":t=this._d.valueOf(),t+=rn-on(t,rn)-1;break;case"second":t=this._d.valueOf(),t+=nn-on(t,nn)-1}return this._d.setTime(t),a.updateOffset(this,!0),this},Ln.format=function(e){e||(e=this.isUtc()?a.defaultFormatUtc:a.defaultFormat);var t=C(this,e);return this.localeData().postformat(t)},Ln.from=function(e,t){return this.isValid()&&(b(e)&&e.isValid()||Dt(e).isValid())?Nt({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},Ln.fromNow=function(e){return this.from(Dt(),e)},Ln.to=function(e,t){return this.isValid()&&(b(e)&&e.isValid()||Dt(e).isValid())?Nt({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},Ln.toNow=function(e){return this.to(Dt(),e)},Ln.get=function(e){return S(this[e=z(e)])?this[e]():this},Ln.invalidAt=function(){return h(this).overflow},Ln.isAfter=function(e,t){var n=b(e)?e:Dt(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=z(t)||"millisecond")?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(t).valueOf())},Ln.isBefore=function(e,t){var n=b(e)?e:Dt(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=z(t)||"millisecond")?this.valueOf()<n.valueOf():this.clone().endOf(t).valueOf()<n.valueOf())},Ln.isBetween=function(e,t,n,r){var a=b(e)?e:Dt(e),i=b(t)?t:Dt(t);return!!(this.isValid()&&a.isValid()&&i.isValid())&&("("===(r=r||"()")[0]?this.isAfter(a,n):!this.isBefore(a,n))&&(")"===r[1]?this.isBefore(i,n):!this.isAfter(i,n))},Ln.isSame=function(e,t){var n,r=b(e)?e:Dt(e);return!(!this.isValid()||!r.isValid())&&("millisecond"===(t=z(t)||"millisecond")?this.valueOf()===r.valueOf():(n=r.valueOf(),this.clone().startOf(t).valueOf()<=n&&n<=this.clone().endOf(t).valueOf()))},Ln.isSameOrAfter=function(e,t){return this.isSame(e,t)||this.isAfter(e,t)},Ln.isSameOrBefore=function(e,t){return this.isSame(e,t)||this.isBefore(e,t)},Ln.isValid=function(){return p(this)},Ln.lang=en,Ln.locale=Xt,Ln.localeData=tn,Ln.max=St,Ln.min=Tt,Ln.parsingFlags=function(){return m({},h(this))},Ln.set=function(e,t){if("object"==typeof e){var n,r=function(e){var t,n=[];for(t in e)o(e,t)&&n.push({unit:t,priority:q[t]});return n.sort((function(e,t){return e.priority-t.priority})),n}(e=N(e)),a=r.length;for(n=0;n<a;n++)this[r[n].unit](e[r[n].unit])}else if(S(this[e=z(e)]))return this[e](t);return this},Ln.startOf=function(e){var t,n;if(void 0===(e=z(e))||"millisecond"===e||!this.isValid())return this;switch(n=this._isUTC?un:ln,e){case"year":t=n(this.year(),0,1);break;case"quarter":t=n(this.year(),this.month()-this.month()%3,1);break;case"month":t=n(this.year(),this.month(),1);break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=n(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=on(t+(this._isUTC?0:this.utcOffset()*rn),an);break;case"minute":t=this._d.valueOf(),t-=on(t,rn);break;case"second":t=this._d.valueOf(),t-=on(t,nn)}return this._d.setTime(t),a.updateOffset(this,!0),this},Ln.subtract=$t,Ln.toArray=function(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]},Ln.toObject=function(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}},Ln.toDate=function(){return new Date(this.valueOf())},Ln.toISOString=function(e){if(!this.isValid())return null;var t=!0!==e,n=t?this.clone().utc():this;return n.year()<0||n.year()>9999?C(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):S(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",C(n,"Z")):C(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")},Ln.inspect=function(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e,t,n,r="moment",a="";return this.isLocal()||(r=0===this.utcOffset()?"moment.utc":"moment.parseZone",a="Z"),e="["+r+'("]',t=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY","-MM-DD[T]HH:mm:ss.SSS",n=a+'[")]',this.format(e+t+"-MM-DD[T]HH:mm:ss.SSS"+n)},"undefined"!=typeof Symbol&&null!=Symbol.for&&(Ln[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),Ln.toJSON=function(){return this.isValid()?this.toISOString():null},Ln.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},Ln.unix=function(){return Math.floor(this.valueOf()/1e3)},Ln.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},Ln.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},Ln.eraName=function(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e){if(n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until)return r[e].name;if(r[e].until<=n&&n<=r[e].since)return r[e].name}return""},Ln.eraNarrow=function(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e){if(n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until)return r[e].narrow;if(r[e].until<=n&&n<=r[e].since)return r[e].narrow}return""},Ln.eraAbbr=function(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e){if(n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until)return r[e].abbr;if(r[e].until<=n&&n<=r[e].since)return r[e].abbr}return""},Ln.eraYear=function(){var e,t,n,r,i=this.localeData().eras();for(e=0,t=i.length;e<t;++e)if(n=i[e].since<=i[e].until?1:-1,r=this.clone().startOf("day").valueOf(),i[e].since<=r&&r<=i[e].until||i[e].until<=r&&r<=i[e].since)return(this.year()-a(i[e].since).year())*n+i[e].offset;return this.year()},Ln.year=Ee,Ln.isLeapYear=function(){return B(this.year())},Ln.weekYear=function(e){return mn.call(this,e,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)},Ln.isoWeekYear=function(e){return mn.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)},Ln.quarter=Ln.quarters=function(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)},Ln.month=xe,Ln.daysInMonth=function(){return be(this.year(),this.month())},Ln.week=Ln.weeks=function(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")},Ln.isoWeek=Ln.isoWeeks=function(e){var t=Ie(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")},Ln.weeksInYear=function(){var e=this.localeData()._week;return We(this.year(),e.dow,e.doy)},Ln.weeksInWeekYear=function(){var e=this.localeData()._week;return We(this.weekYear(),e.dow,e.doy)},Ln.isoWeeksInYear=function(){return We(this.year(),1,4)},Ln.isoWeeksInISOWeekYear=function(){return We(this.isoWeekYear(),1,4)},Ln.date=hn,Ln.day=Ln.days=function(e){if(!this.isValid())return null!=e?this:NaN;var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=e?(e=function(e,t){return"string"!=typeof e?e:isNaN(e)?"number"==typeof(e=t.weekdaysParse(e))?e:null:parseInt(e,10)}(e,this.localeData()),this.add(e-t,"d")):t},Ln.weekday=function(e){if(!this.isValid())return null!=e?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")},Ln.isoWeekday=function(e){if(!this.isValid())return null!=e?this:NaN;if(null!=e){var t=function(e,t){return"string"==typeof e?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}(e,this.localeData());return this.day(this.day()%7?t:t-7)}return this.day()||7},Ln.dayOfYear=function(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")},Ln.hour=Ln.hours=Qe,Ln.minute=Ln.minutes=pn,Ln.second=Ln.seconds=gn,Ln.millisecond=Ln.milliseconds=vn,Ln.utcOffset=function(e,t,n){var r,i=this._offset||0;if(!this.isValid())return null!=e?this:NaN;if(null!=e){if("string"==typeof e){if(null===(e=Ft(_e,e)))return this}else Math.abs(e)<16&&!n&&(e*=60);return!this._isUTC&&t&&(r=It(this)),this._offset=e,this._isUTC=!0,null!=r&&this.add(r,"m"),i!==e&&(!t||this._changeInProgress?Jt(this,Nt(e-i,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,a.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?i:It(this)},Ln.utc=function(e){return this.utcOffset(0,e)},Ln.local=function(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(It(this),"m")),this},Ln.parseZone=function(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var e=Ft(ce,this._i);null!=e?this.utcOffset(e):this.utcOffset(0,!0)}return this},Ln.hasAlignedHourOffset=function(e){return!!this.isValid()&&(e=e?Dt(e).utcOffset():0,(this.utcOffset()-e)%60==0)},Ln.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},Ln.isLocal=function(){return!!this.isValid()&&!this._isUTC},Ln.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},Ln.isUtc=Wt,Ln.isUTC=Wt,Ln.zoneAbbr=function(){return this._isUTC?"UTC":""},Ln.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},Ln.dates=k("dates accessor is deprecated. Use date instead.",hn),Ln.months=k("months accessor is deprecated. Use month instead",xe),Ln.years=k("years accessor is deprecated. Use year instead",Ee),Ln.zone=k("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",(function(e,t){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()})),Ln.isDSTShifted=k("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",(function(){if(!u(this._isDSTShifted))return this._isDSTShifted;var e,t={};return M(t,this),(t=kt(t))._a?(e=t._isUTC?f(t._a):Dt(t._a),this._isDSTShifted=this.isValid()&&function(e,t,n){var r,a=Math.min(e.length,t.length),i=Math.abs(e.length-t.length),s=0;for(r=0;r<a;r++)(n&&e[r]!==t[r]||!n&&V(e[r])!==V(t[r]))&&s++;return s+i}(t._a,e.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}));var Yn=x.prototype;function kn(e,t,n,r){var a=lt(),i=f().set(r,t);return a[n](i,e)}function wn(e,t,n){if(d(e)&&(t=e,e=void 0),e=e||"",null!=t)return kn(e,t,n,"month");var r,a=[];for(r=0;r<12;r++)a[r]=kn(e,r,n,"month");return a}function Dn(e,t,n,r){"boolean"==typeof e?(d(t)&&(n=t,t=void 0),t=t||""):(n=t=e,e=!1,d(t)&&(n=t,t=void 0),t=t||"");var a,i=lt(),s=e?i._week.dow:0,o=[];if(null!=n)return kn(t,(n+s)%7,r,"day");for(a=0;a<7;a++)o[a]=kn(t,(a+s)%7,r,"day");return o}Yn.calendar=function(e,t,n){var r=this._calendar[e]||this._calendar.sameElse;return S(r)?r.call(t,n):r},Yn.longDateFormat=function(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.match(O).map((function(e){return"MMMM"===e||"MM"===e||"DD"===e||"dddd"===e?e.slice(1):e})).join(""),this._longDateFormat[e])},Yn.invalidDate=function(){return this._invalidDate},Yn.ordinal=function(e){return this._ordinal.replace("%d",e)},Yn.preparse=bn,Yn.postformat=bn,Yn.relativeTime=function(e,t,n,r){var a=this._relativeTime[n];return S(a)?a(e,t,n,r):a.replace(/%d/i,e)},Yn.pastFuture=function(e,t){var n=this._relativeTime[e>0?"future":"past"];return S(n)?n(t):n.replace(/%s/i,t)},Yn.set=function(e){var t,n;for(n in e)o(e,n)&&(S(t=e[n])?this[n]=t:this["_"+n]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)},Yn.eras=function(e,t){var n,r,i,s=this._eras||lt("en")._eras;for(n=0,r=s.length;n<r;++n)switch("string"==typeof s[n].since&&(i=a(s[n].since).startOf("day"),s[n].since=i.valueOf()),typeof s[n].until){case"undefined":s[n].until=1/0;break;case"string":i=a(s[n].until).startOf("day").valueOf(),s[n].until=i.valueOf()}return s},Yn.erasParse=function(e,t,n){var r,a,i,s,o,l=this.eras();for(e=e.toUpperCase(),r=0,a=l.length;r<a;++r)if(i=l[r].name.toUpperCase(),s=l[r].abbr.toUpperCase(),o=l[r].narrow.toUpperCase(),n)switch(t){case"N":case"NN":case"NNN":if(s===e)return l[r];break;case"NNNN":if(i===e)return l[r];break;case"NNNNN":if(o===e)return l[r]}else if([i,s,o].indexOf(e)>=0)return l[r]},Yn.erasConvertYear=function(e,t){var n=e.since<=e.until?1:-1;return void 0===t?a(e.since).year():a(e.since).year()+(t-e.offset)*n},Yn.erasAbbrRegex=function(e){return o(this,"_erasAbbrRegex")||cn.call(this),e?this._erasAbbrRegex:this._erasRegex},Yn.erasNameRegex=function(e){return o(this,"_erasNameRegex")||cn.call(this),e?this._erasNameRegex:this._erasRegex},Yn.erasNarrowRegex=function(e){return o(this,"_erasNarrowRegex")||cn.call(this),e?this._erasNarrowRegex:this._erasRegex},Yn.months=function(e,t){return e?i(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||we).test(t)?"format":"standalone"][e.month()]:i(this._months)?this._months:this._months.standalone},Yn.monthsShort=function(e,t){return e?i(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[we.test(t)?"format":"standalone"][e.month()]:i(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},Yn.monthsParse=function(e,t,n){var r,a,i;if(this._monthsParseExact)return Se.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;r<12;r++){if(a=f([2e3,r]),n&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=new RegExp("^"+this.months(a,"").replace(".","")+"$","i"),this._shortMonthsParse[r]=new RegExp("^"+this.monthsShort(a,"").replace(".","")+"$","i")),n||this._monthsParse[r]||(i="^"+this.months(a,"")+"|^"+this.monthsShort(a,""),this._monthsParse[r]=new RegExp(i.replace(".",""),"i")),n&&"MMMM"===t&&this._longMonthsParse[r].test(e))return r;if(n&&"MMM"===t&&this._shortMonthsParse[r].test(e))return r;if(!n&&this._monthsParse[r].test(e))return r}},Yn.monthsRegex=function(e){return this._monthsParseExact?(o(this,"_monthsRegex")||He.call(this),e?this._monthsStrictRegex:this._monthsRegex):(o(this,"_monthsRegex")||(this._monthsRegex=Te),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)},Yn.monthsShortRegex=function(e){return this._monthsParseExact?(o(this,"_monthsRegex")||He.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(o(this,"_monthsShortRegex")||(this._monthsShortRegex=De),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)},Yn.week=function(e){return Ie(e,this._week.dow,this._week.doy).week},Yn.firstDayOfYear=function(){return this._week.doy},Yn.firstDayOfWeek=function(){return this._week.dow},Yn.weekdays=function(e,t){var n=i(this._weekdays)?this._weekdays:this._weekdays[e&&!0!==e&&this._weekdays.isFormat.test(t)?"format":"standalone"];return!0===e?Re(n,this._week.dow):e?n[e.day()]:n},Yn.weekdaysMin=function(e){return!0===e?Re(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin},Yn.weekdaysShort=function(e){return!0===e?Re(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort},Yn.weekdaysParse=function(e,t,n){var r,a,i;if(this._weekdaysParseExact)return Ve.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(a=f([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(a,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(a,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(a,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[r]||(i="^"+this.weekdays(a,"")+"|^"+this.weekdaysShort(a,"")+"|^"+this.weekdaysMin(a,""),this._weekdaysParse[r]=new RegExp(i.replace(".",""),"i")),n&&"dddd"===t&&this._fullWeekdaysParse[r].test(e))return r;if(n&&"ddd"===t&&this._shortWeekdaysParse[r].test(e))return r;if(n&&"dd"===t&&this._minWeekdaysParse[r].test(e))return r;if(!n&&this._weekdaysParse[r].test(e))return r}},Yn.weekdaysRegex=function(e){return this._weekdaysParseExact?(o(this,"_weekdaysRegex")||$e.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(o(this,"_weekdaysRegex")||(this._weekdaysRegex=Ue),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)},Yn.weekdaysShortRegex=function(e){return this._weekdaysParseExact?(o(this,"_weekdaysRegex")||$e.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(o(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Be),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},Yn.weekdaysMinRegex=function(e){return this._weekdaysParseExact?(o(this,"_weekdaysRegex")||$e.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(o(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Je),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},Yn.isPM=function(e){return"p"===(e+"").toLowerCase().charAt(0)},Yn.meridiem=function(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"},st("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1===V(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}}),a.lang=k("moment.lang is deprecated. Use moment.locale instead.",st),a.langData=k("moment.langData is deprecated. Use moment.localeData instead.",lt);var Tn=Math.abs;function Sn(e,t,n,r){var a=Nt(t,n);return e._milliseconds+=r*a._milliseconds,e._days+=r*a._days,e._months+=r*a._months,e._bubble()}function jn(e){return e<0?Math.floor(e):Math.ceil(e)}function xn(e){return 4800*e/146097}function Hn(e){return 146097*e/4800}function On(e){return function(){return this.as(e)}}var En=On("ms"),Pn=On("s"),An=On("m"),Fn=On("h"),Cn=On("d"),In=On("w"),Wn=On("M"),Rn=On("Q"),zn=On("y");function Nn(e){return function(){return this.isValid()?this._data[e]:NaN}}var qn=Nn("milliseconds"),Un=Nn("seconds"),Bn=Nn("minutes"),Jn=Nn("hours"),Vn=Nn("days"),$n=Nn("months"),Gn=Nn("years");var Kn=Math.round,Zn={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function Qn(e,t,n,r,a){return a.relativeTime(t||1,!!n,e,r)}var Xn=Math.abs;function er(e){return(e>0)-(e<0)||+e}function tr(){if(!this.isValid())return this.localeData().invalidDate();var e,t,n,r,a,i,s,o,l=Xn(this._milliseconds)/1e3,u=Xn(this._days),d=Xn(this._months),c=this.asSeconds();return c?(e=J(l/60),t=J(e/60),l%=60,e%=60,n=J(d/12),d%=12,r=l?l.toFixed(3).replace(/\.?0+$/,""):"",a=c<0?"-":"",i=er(this._months)!==er(c)?"-":"",s=er(this._days)!==er(c)?"-":"",o=er(this._milliseconds)!==er(c)?"-":"",a+"P"+(n?i+n+"Y":"")+(d?i+d+"M":"")+(u?s+u+"D":"")+(t||e||l?"T":"")+(t?o+t+"H":"")+(e?o+e+"M":"")+(l?o+r+"S":"")):"P0D"}var nr=Ht.prototype;return nr.isValid=function(){return this._isValid},nr.abs=function(){var e=this._data;return this._milliseconds=Tn(this._milliseconds),this._days=Tn(this._days),this._months=Tn(this._months),e.milliseconds=Tn(e.milliseconds),e.seconds=Tn(e.seconds),e.minutes=Tn(e.minutes),e.hours=Tn(e.hours),e.months=Tn(e.months),e.years=Tn(e.years),this},nr.add=function(e,t){return Sn(this,e,t,1)},nr.subtract=function(e,t){return Sn(this,e,t,-1)},nr.as=function(e){if(!this.isValid())return NaN;var t,n,r=this._milliseconds;
12246if("month"===(e=z(e))||"quarter"===e||"year"===e)switch(t=this._days+r/864e5,n=this._months+xn(t),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(t=this._days+Math.round(Hn(this._months)),e){case"week":return t/7+r/6048e5;case"day":return t+r/864e5;case"hour":return 24*t+r/36e5;case"minute":return 1440*t+r/6e4;case"second":return 86400*t+r/1e3;case"millisecond":return Math.floor(864e5*t)+r;default:throw new Error("Unknown unit "+e)}},nr.asMilliseconds=En,nr.asSeconds=Pn,nr.asMinutes=An,nr.asHours=Fn,nr.asDays=Cn,nr.asWeeks=In,nr.asMonths=Wn,nr.asQuarters=Rn,nr.asYears=zn,nr.valueOf=function(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*V(this._months/12):NaN},nr._bubble=function(){var e,t,n,r,a,i=this._milliseconds,s=this._days,o=this._months,l=this._data;return i>=0&&s>=0&&o>=0||i<=0&&s<=0&&o<=0||(i+=864e5*jn(Hn(o)+s),s=0,o=0),l.milliseconds=i%1e3,e=J(i/1e3),l.seconds=e%60,t=J(e/60),l.minutes=t%60,n=J(t/60),l.hours=n%24,s+=J(n/24),o+=a=J(xn(s)),s-=jn(Hn(a)),r=J(o/12),o%=12,l.days=s,l.months=o,l.years=r,this},nr.clone=function(){return Nt(this)},nr.get=function(e){return e=z(e),this.isValid()?this[e+"s"]():NaN},nr.milliseconds=qn,nr.seconds=Un,nr.minutes=Bn,nr.hours=Jn,nr.days=Vn,nr.weeks=function(){return J(this.days()/7)},nr.months=$n,nr.years=Gn,nr.humanize=function(e,t){if(!this.isValid())return this.localeData().invalidDate();var n,r,a=!1,i=Zn;return"object"==typeof e&&(t=e,e=!1),"boolean"==typeof e&&(a=e),"object"==typeof t&&(i=Object.assign({},Zn,t),null!=t.s&&null==t.ss&&(i.ss=t.s-1)),r=function(e,t,n,r){var a=Nt(e).abs(),i=Kn(a.as("s")),s=Kn(a.as("m")),o=Kn(a.as("h")),l=Kn(a.as("d")),u=Kn(a.as("M")),d=Kn(a.as("w")),c=Kn(a.as("y")),_=i<=n.ss&&["s",i]||i<n.s&&["ss",i]||s<=1&&["m"]||s<n.m&&["mm",s]||o<=1&&["h"]||o<n.h&&["hh",o]||l<=1&&["d"]||l<n.d&&["dd",l];return null!=n.w&&(_=_||d<=1&&["w"]||d<n.w&&["ww",d]),(_=_||u<=1&&["M"]||u<n.M&&["MM",u]||c<=1&&["y"]||["yy",c])[2]=t,_[3]=+e>0,_[4]=r,Qn.apply(null,_)}(this,!a,i,n=this.localeData()),a&&(r=n.pastFuture(+this,r)),n.postformat(r)},nr.toISOString=tr,nr.toString=tr,nr.toJSON=tr,nr.locale=Xt,nr.localeData=tn,nr.toIsoString=k("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",tr),nr.lang=en,F("X",0,0,"unix"),F("x",0,0,"valueOf"),fe("x",de),fe("X",/[+-]?\d+(\.\d{1,3})?/),ve("X",(function(e,t,n){n._d=new Date(1e3*parseFloat(e))})),ve("x",(function(e,t,n){n._d=new Date(V(e))})),a.version="2.29.4",t=Dt,a.fn=Ln,a.min=function(){return jt("isBefore",[].slice.call(arguments,0))},a.max=function(){return jt("isAfter",[].slice.call(arguments,0))},a.now=function(){return Date.now?Date.now():+new Date},a.utc=f,a.unix=function(e){return Dt(1e3*e)},a.months=function(e,t){return wn(e,t,"months")},a.isDate=c,a.locale=st,a.invalid=y,a.duration=Nt,a.isMoment=b,a.weekdays=function(e,t,n){return Dn(e,t,n,"weekdays")},a.parseZone=function(){return Dt.apply(null,arguments).parseZone()},a.localeData=lt,a.isDuration=Ot,a.monthsShort=function(e,t){return wn(e,t,"monthsShort")},a.weekdaysMin=function(e,t,n){return Dn(e,t,n,"weekdaysMin")},a.defineLocale=ot,a.updateLocale=function(e,t){if(null!=t){var n,r,a=et;null!=tt[e]&&null!=tt[e].parentLocale?tt[e].set(j(tt[e]._config,t)):(null!=(r=it(e))&&(a=r._config),t=j(a,t),null==r&&(t.abbr=e),(n=new x(t)).parentLocale=tt[e],tt[e]=n),st(e)}else null!=tt[e]&&(null!=tt[e].parentLocale?(tt[e]=tt[e].parentLocale,e===st()&&st(e)):null!=tt[e]&&delete tt[e]);return tt[e]},a.locales=function(){return w(tt)},a.weekdaysShort=function(e,t,n){return Dn(e,t,n,"weekdaysShort")},a.normalizeUnits=z,a.relativeTimeRounding=function(e){return void 0===e?Kn:"function"==typeof e&&(Kn=e,!0)},a.relativeTimeThreshold=function(e,t){return void 0!==Zn[e]&&(void 0===t?Zn[e]:(Zn[e]=t,"s"===e&&(Zn.ss=t-1),!0))},a.calendarFormat=function(e,t){var n=e.diff(t,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"},a.prototype=Ln,a.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},a}()},4319:function(e,t,n){!function(t,r){"use strict";var a;try{a=n(381)}catch(e){}e.exports=function(e){var t="function"==typeof e,n=!!window.addEventListener,r=window.document,a=window.setTimeout,i=function(e,t,r,a){n?e.addEventListener(t,r,!!a):e.attachEvent("on"+t,r)},s=function(e,t,r,a){n?e.removeEventListener(t,r,!!a):e.detachEvent("on"+t,r)},o=function(e,t){return-1!==(" "+e.className+" ").indexOf(" "+t+" ")},l=function(e,t){o(e,t)||(e.className=""===e.className?t:e.className+" "+t)},u=function(e,t){var n;e.className=(n=(" "+e.className+" ").replace(" "+t+" "," ")).trim?n.trim():n.replace(/^\s+|\s+$/g,"")},d=function(e){return/Array/.test(Object.prototype.toString.call(e))},c=function(e){return/Date/.test(Object.prototype.toString.call(e))&&!isNaN(e.getTime())},_=function(e){var t=e.getDay();return 0===t||6===t},m=function(e){return e%4==0&&e%100!=0||e%400==0},f=function(e,t){return[31,m(e)?29:28,31,30,31,30,31,31,30,31,30,31][t]},h=function(e){c(e)&&e.setHours(0,0,0,0)},p=function(e,t){return e.getTime()===t.getTime()},y=function(e,t,n){var r,a;for(r in t)(a=void 0!==e[r])&&"object"==typeof t[r]&&null!==t[r]&&void 0===t[r].nodeName?c(t[r])?n&&(e[r]=new Date(t[r].getTime())):d(t[r])?n&&(e[r]=t[r].slice(0)):e[r]=y({},t[r],n):!n&&a||(e[r]=t[r]);return e},v=function(e,t,n){var a;r.createEvent?((a=r.createEvent("HTMLEvents")).initEvent(t,!0,!1),a=y(a,n),e.dispatchEvent(a)):r.createEventObject&&(a=r.createEventObject(),a=y(a,n),e.fireEvent("on"+t,a))},g=function(e){return e.month<0&&(e.year-=Math.ceil(Math.abs(e.month)/12),e.month+=12),e.month>11&&(e.year+=Math.floor(Math.abs(e.month)/12),e.month-=12),e},M={field:null,bound:void 0,ariaLabel:"Use the arrow keys to pick a date",position:"bottom left",reposition:!0,format:"YYYY-MM-DD",toString:null,parse:null,defaultDate:null,setDefaultDate:!1,firstDay:0,firstWeekOfYearMinDays:4,formatStrict:!1,minDate:null,maxDate:null,yearRange:10,showWeekNumber:!1,pickWholeWeek:!1,minYear:0,maxYear:9999,minMonth:void 0,maxMonth:void 0,startRange:null,endRange:null,isRTL:!1,yearSuffix:"",showMonthAfterYear:!1,showDaysInNextAndPreviousMonths:!1,enableSelectionDaysInNextAndPreviousMonths:!1,numberOfMonths:1,mainCalendar:"left",container:void 0,blurFieldOnSelect:!0,i18n:{previousMonth:"Previous Month",nextMonth:"Next Month",months:["January","February","March","April","May","June","July","August","September","October","November","December"],weekdays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Frid
12246ay","Saturday"],weekdaysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},theme:null,events:[],onSelect:null,onOpen:null,onClose:null,onDraw:null,keyboardInput:!0},L=function(e,t,n){for(t+=e.firstDay;t>=7;)t-=7;return n?e.i18n.weekdaysShort[t]:e.i18n.weekdays[t]},b=function(e){var t=[],n="false";if(e.isEmpty){if(!e.showDaysInNextAndPreviousMonths)return'<td class="is-empty"></td>';t.push("is-outside-current-month"),e.enableSelectionDaysInNextAndPreviousMonths||t.push("is-selection-disabled")}return e.isDisabled&&t.push("is-disabled"),e.isToday&&t.push("is-today"),e.isSelected&&(t.push("is-selected"),n="true"),e.hasEvent&&t.push("has-event"),e.isInRange&&t.push("is-inrange"),e.isStartRange&&t.push("is-startrange"),e.isEndRange&&t.push("is-endrange"),'<td data-day="'+e.day+'" class="'+t.join(" ")+'" aria-selected="'+n+'"><button class="pika-button pika-day" type="button" data-pika-year="'+e.year+'" data-pika-month="'+e.month+'" data-pika-day="'+e.day+'">'+e.day+"</button></td>"},Y=function(n,r,a,i){var s=new Date(a,r,n);return'<td class="pika-week">'+(t?e(s).isoWeek():function(e,t){e.setHours(0,0,0,0);var n=e.getDate(),r=e.getDay(),a=t,i=a-1,s=function(e){return(e+7-1)%7};e.setDate(n+i-s(r));var o=new Date(e.getFullYear(),0,a),l=(e.getTime()-o.getTime())/864e5;return 1+Math.round((l-i+s(o.getDay()))/7)}(s,i))+"</td>"},k=function(e,t,n,r){return'<tr class="pika-row'+(n?" pick-whole-week":"")+(r?" is-selected":"")+'">'+(t?e.reverse():e).join("")+"</tr>"},w=function(e,t,n,r,a,i){var s,o,l,u,c,_=e._o,m=n===_.minYear,f=n===_.maxYear,h='<div id="'+i+'" class="pika-title" role="heading" aria-live="assertive">',p=!0,y=!0;for(l=[],s=0;s<12;s++)l.push('<option value="'+(n===a?s-t:12+s-t)+'"'+(s===r?' selected="selected"':"")+(m&&s<_.minMonth||f&&s>_.maxMonth?' disabled="disabled"':"")+">"+_.i18n.months[s]+"</option>");for(u='<div class="pika-label">'+_.i18n.months[r]+'<select class="pika-select pika-select-month" tabindex="-1">'+l.join("")+"</select></div>",d(_.yearRange)?(s=_.yearRange[0],o=_.yearRange[1]+1):(s=n-_.yearRange,o=1+n+_.yearRange),l=[];s<o&&s<=_.maxYear;s++)s>=_.minYear&&l.push('<option value="'+s+'"'+(s===n?' selected="selected"':"")+">"+s+"</option>");return c='<div class="pika-label">'+n+_.yearSuffix+'<select class="pika-select pika-select-year" tabindex="-1">'+l.join("")+"</select></div>",_.showMonthAfterYear?h+=c+u:h+=u+c,m&&(0===r||_.minMonth>=r)&&(p=!1),f&&(11===r||_.maxMonth<=r)&&(y=!1),0===t&&(h+='<button class="pika-prev'+(p?"":" is-disabled")+'" type="button">'+_.i18n.previousMonth+"</button>"),t===e._o.numberOfMonths-1&&(h+='<button class="pika-next'+(y?"":" is-disabled")+'" type="button">'+_.i18n.nextMonth+"</button>"),h+"</div>"},D=function(e,t,n){return'<table cellpadding="0" cellspacing="0" class="pika-table" role="grid" aria-labelledby="'+n+'">'+function(e){var t,n=[];for(e.showWeekNumber&&n.push("<th></th>"),t=0;t<7;t++)n.push('<th scope="col"><abbr title="'+L(e,t)+'">'+L(e,t,!0)+"</abbr></th>");return"<thead><tr>"+(e.isRTL?n.reverse():n).join("")+"</tr></thead>"}(e)+("<tbody>"+t.join("")+"</tbody></table>")},T=function(s){var l=this,u=l.config(s);l._onMouseDown=function(e){if(l._v){var t=(e=e||window.event).target||e.srcElement;if(t)if(o(t,"is-disabled")||(!o(t,"pika-button")||o(t,"is-empty")||o(t.parentNode,"is-disabled")?o(t,"pika-prev")?l.prevMonth():o(t,"pika-next")&&l.nextMonth():(l.setDate(new Date(t.getAttribute("data-pika-year"),t.getAttribute("data-pika-month"),t.getAttribute("data-pika-day"))),u.bound&&a((function(){l.hide(),u.blurFieldOnSelect&&u.field&&u.field.blur()}),100))),o(t,"pika-select"))l._c=!0;else{if(!e.preventDefault)return e.returnValue=!1,!1;e.preventDefault()}}},l._onChange=function(e){var t=(e=e||window.event).target||e.srcElement;t&&(o(t,"pika-select-month")?l.gotoMonth(t.value):o(t,"pika-select-year")&&l.gotoYear(t.value))},l._onKeyChange=function(e){if(e=e||window.event,l.isVisible())switch(e.keyCode){case 13:case 27:u.field&&u.field.blur();break;case 37:l.adjustDate("subtract",1);break;case 38:l.adjustDate("subtract",7);break;case 39:l.adjustDate("add",1);break;case 40:l.adjustDate("add",7);break;case 8:case 46:l.setDate(null)}},l._parseFieldValue=function(){if(u.parse)return u.parse(u.field.value,u.format);if(t){var n=e(u.field.value,u.format,u.formatStrict);return n&&n.isValid()?n.toDate():null}return new Date(Date.parse(u.field.value))},l._onInputChange=function(e){var t;e.firedBy!==l&&(t=l._parseFieldValue(),c(t)&&l.setDate(t),l._v||l.show())}
12246,l._onInputFocus=function(){l.show()},l._onInputClick=function(){l.show()},l._onInputBlur=function(){var e=r.activeElement;do{if(o(e,"pika-single"))return}while(e=e.parentNode);l._c||(l._b=a((function(){l.hide()}),50)),l._c=!1},l._onClick=function(e){var t=(e=e||window.event).target||e.srcElement,r=t;if(t){!n&&o(t,"pika-select")&&(t.onchange||(t.setAttribute("onchange","return;"),i(t,"change",l._onChange)));do{if(o(r,"pika-single")||r===u.trigger)return}while(r=r.parentNode);l._v&&t!==u.trigger&&r!==u.trigger&&l.hide()}},l.el=r.createElement("div"),l.el.className="pika-single"+(u.isRTL?" is-rtl":"")+(u.theme?" "+u.theme:""),i(l.el,"mousedown",l._onMouseDown,!0),i(l.el,"touchend",l._onMouseDown,!0),i(l.el,"change",l._onChange),u.keyboardInput&&i(r,"keydown",l._onKeyChange),u.field&&(u.container?u.container.appendChild(l.el):u.bound?r.body.appendChild(l.el):u.field.parentNode.insertBefore(l.el,u.field.nextSibling),i(u.field,"change",l._onInputChange),u.defaultDate||(u.defaultDate=l._parseFieldValue(),u.setDefaultDate=!0));var d=u.defaultDate;c(d)?u.setDefaultDate?l.setDate(d,!0):l.gotoDate(d):l.gotoDate(new Date),u.bound?(this.hide(),l.el.className+=" is-bound",i(u.trigger,"click",l._onInputClick),i(u.trigger,"focus",l._onInputFocus),i(u.trigger,"blur",l._onInputBlur)):this.show()};return T.prototype={config:function(e){this._o||(this._o=y({},M,!0));var t=y(this._o,e,!0);t.isRTL=!!t.isRTL,t.field=t.field&&t.field.nodeName?t.field:null,t.theme="string"==typeof t.theme&&t.theme?t.theme:null,t.bound=!!(void 0!==t.bound?t.field&&t.bound:t.field),t.trigger=t.trigger&&t.trigger.nodeName?t.trigger:t.field,t.disableWeekends=!!t.disableWeekends,t.disableDayFn="function"==typeof t.disableDayFn?t.disableDayFn:null;var n=parseInt(t.numberOfMonths,10)||1;if(t.numberOfMonths=n>4?4:n,c(t.minDate)||(t.minDate=!1),c(t.maxDate)||(t.maxDate=!1),t.minDate&&t.maxDate&&t.maxDate<t.minDate&&(t.maxDate=t.minDate=!1),t.minDate&&this.setMinDate(t.minDate),t.maxDate&&this.setMaxDate(t.maxDate),d(t.yearRange)){var r=(new Date).getFullYear()-10;t.yearRange[0]=parseInt(t.yearRange[0],10)||r,t.yearRange[1]=parseInt(t.yearRange[1],10)||r}else t.yearRange=Math.abs(parseInt(t.yearRange,10))||M.yearRange,t.yearRange>100&&(t.yearRange=100);return t},toString:function(n){return n=n||this._o.format,c(this._d)?this._o.toString?this._o.toString(this._d,n):t?e(this._d).format(n):this._d.toDateString():""},getMoment:function(){return t?e(this._d):null},setMoment:function(n,r){t&&e.isMoment(n)&&this.setDate(n.toDate(),r)},getDate:function(){return c(this._d)?new Date(this._d.getTime()):null},setDate:function(e,t){if(!e)return this._d=null,this._o.field&&(this._o.field.value="",v(this._o.field,"change",{firedBy:this})),this.draw();if("string"==typeof e&&(e=new Date(Date.parse(e))),c(e)){var n=this._o.minDate,r=this._o.maxDate;c(n)&&e<n?e=n:c(r)&&e>r&&(e=r),this._d=new Date(e.getTime()),h(this._d),this.gotoDate(this._d),this._o.field&&(this._o.field.value=this.toString(),v(this._o.field,"change",{firedBy:this})),t||"function"!=typeof this._o.onSelect||this._o.onSelect.call(this,this.getDate())}},clear:function(){this.setDate(null)},gotoDate:function(e){var t=!0;if(c(e)){if(this.calendars){var n=new Date(this.calendars[0].year,this.calendars[0].month,1),r=new Date(this.calendars[this.calendars.length-1].year,this.calendars[this.calendars.length-1].month,1),a=e.getTime();r.setMonth(r.getMonth()+1),r.setDate(r.getDate()-1),t=a<n.getTime()||r.getTime()<a}t&&(this.calendars=[{month:e.getMonth(),year:e.getFullYear()}],"right"===this._o.mainCalendar&&(this.calendars[0].month+=1-this._o.numberOfMonths)),this.adjustCalendars()}},adjustDate:function(e,t){var n,r=this.getDate()||new Date,a=24*parseInt(t)*60*60*1e3;"add"===e?n=new Date(r.valueOf()+a):"subtract"===e&&(n=new Date(r.valueOf()-a)),this.setDate(n)},adjustCalendars:function(){this.calendars[0]=g(this.calendars[0]);for(var e=1;e<this._o.numberOfMonths;e++)this.calendars[e]=g({month:this.calendars[0].month+e,year:this.calendars[0].year});this.draw()},gotoToday:function(){this.gotoDate(new Date)},gotoMonth:function(e){isNaN(e)||(this.calendars[0].month=parseInt(e,10),this.adjustCalendars())},nextMonth:function(){this.calendars[0].month++,this.adjustCalendars()},prevMonth:function(){this.calendars[0].month--,this.adjustCalendars()},gotoYear:function(e){isNaN(e)||(this.calendars[0].year=parseInt(e,10),this.adjustCalendars())},setMinDate:function(e){e instanceof Date?(h(e),this._o.minDate=e,this._o.minYear=e.getFullYear(),this._o.minMonth=e.getMonth()):(this._o.minDate=M.minDate,this._o.minYear=M.minYear,this._o.minMonth=M.minMonth,this._o.startRange=M.startRange),this.draw()}
12246,setMaxDate:function(e){e instanceof Date?(h(e),this._o.maxDate=e,this._o.maxYear=e.getFullYear(),this._o.maxMonth=e.getMonth()):(this._o.maxDate=M.maxDate,this._o.maxYear=M.maxYear,this._o.maxMonth=M.maxMonth,this._o.endRange=M.endRange),this.draw()},setStartRange:function(e){this._o.startRange=e},setEndRange:function(e){this._o.endRange=e},draw:function(e){if(this._v||e){var t,n=this._o,r=n.minYear,i=n.maxYear,s=n.minMonth,o=n.maxMonth,l="";this._y<=r&&(this._y=r,!isNaN(s)&&this._m<s&&(this._m=s)),this._y>=i&&(this._y=i,!isNaN(o)&&this._m>o&&(this._m=o));for(var u=0;u<n.numberOfMonths;u++)t="pika-title-"+Math.random().toString(36).replace(/[^a-z]+/g,"").substr(0,2),l+='<div class="pika-lendar">'+w(this,u,this.calendars[u].year,this.calendars[u].month,this.calendars[0].year,t)+this.render(this.calendars[u].year,this.calendars[u].month,t)+"</div>";this.el.innerHTML=l,n.bound&&"hidden"!==n.field.type&&a((function(){n.trigger.focus()}),1),"function"==typeof this._o.onDraw&&this._o.onDraw(this),n.bound&&n.field.setAttribute("aria-label",n.ariaLabel)}},adjustPosition:function(){var e,t,n,a,i,s,o,d,c,_,m,f;if(!this._o.container){if(this.el.style.position="absolute",t=e=this._o.trigger,n=this.el.offsetWidth,a=this.el.offsetHeight,i=window.innerWidth||r.documentElement.clientWidth,s=window.innerHeight||r.documentElement.clientHeight,o=window.pageYOffset||r.body.scrollTop||r.documentElement.scrollTop,m=!0,f=!0,"function"==typeof e.getBoundingClientRect)d=(_=e.getBoundingClientRect()).left+window.pageXOffset,c=_.bottom+window.pageYOffset;else for(d=t.offsetLeft,c=t.offsetTop+t.offsetHeight;t=t.offsetParent;)d+=t.offsetLeft,c+=t.offsetTop;(this._o.reposition&&d+n>i||this._o.position.indexOf("right")>-1&&d-n+e.offsetWidth>0)&&(d=d-n+e.offsetWidth,m=!1),(this._o.reposition&&c+a>s+o||this._o.position.indexOf("top")>-1&&c-a-e.offsetHeight>0)&&(c=c-a-e.offsetHeight,f=!1),this.el.style.left=d+"px",this.el.style.top=c+"px",l(this.el,m?"left-aligned":"right-aligned"),l(this.el,f?"bottom-aligned":"top-aligned"),u(this.el,m?"right-aligned":"left-aligned"),u(this.el,f?"top-aligned":"bottom-aligned")}},render:function(e,t,n){var r=this._o,a=new Date,i=f(e,t),s=new Date(e,t,1).getDay(),o=[],l=[];h(a),r.firstDay>0&&(s-=r.firstDay)<0&&(s+=7);for(var u=0===t?11:t-1,d=11===t?0:t+1,m=0===t?e-1:e,y=11===t?e+1:e,v=f(m,u),g=i+s,M=g;M>7;)M-=7;g+=7-M;for(var L=!1,w=0,T=0;w<g;w++){var S=new Date(e,t,w-s+1),j=!!c(this._d)&&p(S,this._d),x=p(S,a),H=-1!==r.events.indexOf(S.toDateString()),O=w<s||w>=i+s,E=w-s+1,P=t,A=e,F=r.startRange&&p(r.startRange,S),C=r.endRange&&p(r.endRange,S),I=r.startRange&&r.endRange&&r.startRange<S&&S<r.endRange;O&&(w<s?(E=v+E,P=u,A=m):(E-=i,P=d,A=y));var W={day:E,month:P,year:A,hasEvent:H,isSelected:j,isToday:x,isDisabled:r.minDate&&S<r.minDate||r.maxDate&&S>r.maxDate||r.disableWeekends&&_(S)||r.disableDayFn&&r.disableDayFn(S),isEmpty:O,isStartRange:F,isEndRange:C,isInRange:I,showDaysInNextAndPreviousMonths:r.showDaysInNextAndPreviousMonths,enableSelectionDaysInNextAndPreviousMonths:r.enableSelectionDaysInNextAndPreviousMonths};r.pickWholeWeek&&j&&(L=!0),l.push(b(W)),7==++T&&(r.showWeekNumber&&l.unshift(Y(w-s,t,e,r.firstWeekOfYearMinDays)),o.push(k(l,r.isRTL,r.pickWholeWeek,L)),l=[],T=0,L=!1)}return D(r,o,n)},isVisible:function(){return this._v},show:function(){this.isVisible()||(this._v=!0,this.draw(),u(this.el,"is-hidden"),this._o.bound&&(i(r,"click",this._onClick),this.adjustPosition()),"function"==typeof this._o.onOpen&&this._o.onOpen.call(this))},hide:function(){var e=this._v;!1!==e&&(this._o.bound&&s(r,"click",this._onClick),this._o.container||(this.el.style.position="static",this.el.style.left="auto",this.el.style.top="auto"),l(this.el,"is-hidden"),this._v=!1,void 0!==e&&"function"==typeof this._o.onClose&&this._o.onClose.call(this))},destroy:function(){var e=this._o;this.hide(),s(this.el,"mousedown",this._onMouseDown,!0),s(this.el,"touchend",this._onMouseDown,!0),s(this.el,"change",this._onChange),e.keyboardInput&&s(r,"keydown",this._onKeyChange),e.field&&(s(e.field,"change",this._onInputChange),e.bound&&(s(e.trigger,"click",this._onInputClick),s(e.trigger,"focus",this._onInputFocus),s(e.trigger,"blur",this._onInputBlur))),this.el.parentNode&&this.el.parentNode.removeChild(this.el)}},T}(a)}()},5238:function(e){e.exports=function(){"use strict";var e=function(){return e=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var a in t=arguments[n])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e},e.apply(this,arguments)},t=!("undefined"==typeof window||!window.document||!window.document.createElement),n=!!t&&window.history&&"pushState"in window.history&&"file:"!==window.location.protocol,r=function(){var e=!1;if(!t)return e;try{var n=window,r=Object.defineProperty({},"passive",{get:function(){e=!0}});n.addEventListener("test",null,r),n.removeEventListener("test",null,r)}catch(e){}return e}(),a=function(e){return"string"==typeof e},i=function(e){return"function"==typeof e},s=function(e){return Array.isArray(e)},o=function(e,t){return e&&e.hasOwnProperty(t)},l=t?window.requestAnimationFrame.bind(window):null,u=t?window.cancelAnimationFrame.bind(window):null,d=Math.cos,c=Math.sin,_=Math.pow,m=Math.sqrt,f=Math.PI,h={linear:function(e){return e},easeInQuad:function(e,t,n,r,a){return r*(t/=a)*t+n},easeOutQuad:function(e,t,n,r,a){return-r*(t/=a)*(t-2)+n},easeInOutQuad:function(e,t,n,r,a){return(t/=a/2)<1?r/2*t*t+n:-r/2*(--t*(t-2)-1)+n},easeInCubic:function(e,t,n,r,a){return r*(t/=a)*t*t+n},easeOutCubic:function(e,t,n,r,a){return r*((t=t/a-1)*t*t+1)+n},easeInOutCubic:function(e,t,n,r,a){return(t/=a/2)<1?r/2*t*t*t+n:r/2*((t-=2)*t*t+2)+n},easeInQuart:function(e,t,n,r,a){return r*(t/=a)*t*t*t+n},easeOutQuart:function(e,t,n,r,a){return-r*((t=t/a-1)*t*t*t-1)+n},easeInOutQuart:function(e,t,n,r,a){return(t/=a/2)<1?r/2*t*t*t*t+n:-r/2*((t-=2)*t*t*t-2)+n},easeInQuint:function(e,t,n,r,a){return r*(t/=a)*t*t*t*t+n},easeOutQuint:function(e,t,n,r,a){return r*((t=t/a-1)*t*t*t*t+1)+n},easeInOutQuint:function(e,t,n,r,a){return(t/=a/2)<1?r/2*t*t*t*t*t+n:r/2*((t-=2)*t*t*t*t+2)+n},easeInSine:function(e,t,n,r,a){return-r*d(t/a*(f/2))+r+n},easeOutSine:function(e,t,n,r,a){return r*c(t/a*(f/2))+n},easeInOutSine:function(e,t,n,r,a){return-r/2*(d(f*t/a)-1)+n},easeInExpo:function(e,t,n,r,a){return 0===t?n:r*_(2,10*(t/a-1))+n},easeOutExpo:function(e,t,n,r,a){return t===a?n+r:r*(1-_(2,-10*t/a))+n},easeInOutExpo:function(e,t,n,r,a){return 0===t?n:t===a?n+r:(t/=a/2)<1?r/2*_(2,10*(t-1))+n:r/2*(2-_(2,-10*--t))+n},easeInCirc:function(e,t,n,r,a){return-r*(m(1-(t/=a)*t)-1)+n},easeOutCirc:function(e,t,n,r,a){return r*m(1-(t=t/a-1)*t)+n},easeInOutCirc:function(e,t,n,r,a){return(t/=a/2)<1?-r/2*(m(1-t*t)-1)+n:r/2*(m(1-(t-=2)*t)+1)+n}},p=function(e){return Array.prototype.slice.call(e?document.querySelectorAll(e):[])},y=function(e){return p(e).shift()||null},v=function(e){return e instanceof Element},g=function(e){return e===window},M=function(e){return e===document.documentElement||e===document.body},L=function(e,t){if(v(t))return e===t;for(var n=p(t),r=n.length;--r>=0&&n[r]!==e;);return r>-1},b=function(e){return Math.max(e.scrollHeight,e.clientHeight,e.offsetHeight)},Y=function(e){return Math.max(e.scrollWidth,e.clientWidth,e.offsetWidth)},k=function(e){return{width:Y(e),height:b(e)}},w={y:"scrollTop",x:"scrollLeft"},D={y:"pageYOffset",x:"pageXOffset"},T=function(e,t){return g(e)?e[D[t]]:e[w[t]]},S=function(e,t,n){if(g(e)){var r="y"===n;e.scrollTo(r?e.pageXOffset:t,r?t:e.pageYOffset)}else e[w[n]]=t},j=function(e,t){var n=e.getBoundingClientRect();if(n.width||n.height){var r={top:0,left:0},a=void 0;if(g(t)||M(t))a=document.documentElement,r.top=window[D.y],r.left=window[D.x];else{var i=(a=t).getBoundingClientRect();r.top=-1*i.top+a[w.y],r.left=-1*i.left+a[w.x]}return{top:n.top+r.top-a.clientTop,left:n.left+r.left-a.clientLeft}}return n},x=t?"onwheel"in document?"wheel":"mousewheel":"wheel",H=function(e,t,n,a,i){n.split(" ").forEach((function(n){e[t](function(e){return"wheel"===e?x:e}(n),a,!!r&&{passive:i})}
12246))},O=function(e,t,n,r){return H(e,"addEventListener",t,n,r)},E=function(e,t,n,r){return H(e,"removeEventListener",t,n,r)},P=/^(\+|-)=(\d+(?:\.\d+)?)$/,A=function(t,n){var r,i={top:0,left:0,relative:!1};if(o(t,"top")||o(t,"left"))i=e({},i,t);else if(s(t))if(t.length>1)i.top=t[0],i.left=t[1];else{if(1!==t.length)return null;i.top=n?t[0]:0,i.left=n?0:t[0]}else if(!s(r=t)&&r-parseFloat(r)+1>=0)n?i.top=t:i.left=t;else{if(!a(t))return null;var l=t.trim().match(P);if(!l)return null;var u=l[1],d=parseInt(l[2],10);"+"===u?(i.top=n?d:0,i.left=n?0:d):(i.top=n?-d:0,i.left=n?0:-d),i.relative=!0}return i},F={trigger:"[data-scroll]",header:"[data-scroll-header]",duration:1e3,easing:"easeOutQuint",offset:0,vertical:!0,horizontal:!1,cancellable:!0,updateURL:!1,preventDefault:!0,stopPropagation:!0,before:null,after:null,cancel:null,complete:null,step:null},C="click",I="wheel touchstart touchmove",W=function(){function r(n,a){var i=this;this.$el=null,this.ctx={$trigger:null,opts:null,progress:!1,pos:null,startPos:null,easing:null,start:0,id:0,cancel:!1,hash:null},this.loop=function(e){var t=i,n=t.$el,a=t.ctx;if(a.start||(a.start=e),a.progress&&n){var s=a.opts,o=a.pos,l=a.start,u=a.startPos,d=a.easing,c=s.duration,_={top:"y",left:"x"},m=e-l,f=Math.min(1,Math.max(m/c,0));Object.keys(o).forEach((function(e){var t=o[e],r=u[e],a=t-r;if(0!==a){var i=d(f,c*f,0,1,c);S(n,Math.round(r+a*i),_[e])}})),m<=c?(i.hook(s,"step",f),a.id=r.raf(i.loop)):i.stop(!0)}else i.stop()},this.handleClick=function(t){for(var n=i.opts,r=t.target;r&&r!==document;r=r.parentNode)if(L(r,n.trigger)){var a=JSON.parse(r.getAttribute("data-scroll-options")||"{}"),s=r.getAttribute("data-scroll")||r.getAttribute("href"),o=e({},n,a),l=o.preventDefault,u=o.stopPropagation,d=o.vertical,c=o.horizontal;l&&t.preventDefault(),u&&t.stopPropagation(),i.ctx.$trigger=r,c&&d?i.to(s,o):d?i.toTop(s,o):c&&i.toLeft(s,o);break}},this.handleStop=function(e){var t=i.ctx,n=t.opts;n&&n.cancellable?(t.cancel=!0,i.stop()):e.preventDefault()},this.opts=e({},F,n||{});var s=null;t&&(s="string"==typeof a?y(a):null!=a?a:window),this.$el=s,s&&this.bind(!0,!1)}return r.create=function(e,t){return new r(e,t)},r.prototype.to=function(n,r){if(t){var i=this,s=i.$el,o=i.ctx,l=i.opts,u=o.$trigger,d=e({},l,r||{}),c=d.offset,_=d.vertical,m=d.horizontal,f=v(d.header)?d.header:y(d.header),h=a(n)&&/^#/.test(n)?n:null;if(o.opts=d,o.cancel=!1,o.hash=h,this.stop(),s){var p=A(c,_),L=A(n,_),w={top:0,left:0};if(L)if(L.relative){var D=T(s,_?"y":"x");w.top=_?D+L.top:L.top,w.left=_?L.left:D+L.left}else w=L;else if(a(n)&&"#"!==n){var S=y(n);if(!S)return;w=j(S,s)}p&&(w.top+=p.top,w.left+=p.left),f&&(w.top=Math.max(0,w.top-k(f).height));var x=function(e){var t=g(e)||M(e);return{viewport:{width:t?Math.min(window.innerWidth,document.documentElement.clientWidth):e.clientWidth,height:t?window.innerHeight:e.clientHeight},size:t?{width:Math.max(Y(document.body),Y(document.documentElement)),height:Math.max(b(document.body),b(document.documentElement))}:k(e)}}(s),H=x.viewport,O=x.size;w.top=_?Math.max(0,Math.min(O.height-H.height,w.top)):T(s,"y"),w.left=m?Math.max(0,Math.min(O.width-H.width,w.left)):T(s,"x"),!1!==this.hook(d,"before",w,u)?(o.pos=w,this.start(d),this.bind(!1,!0)):o.opts=null}}},r.prototype.toTop=function(t,n){this.to(t,e({},n||{},{vertical:!0,horizontal:!1}))},r.prototype.toLeft=function(t,n){this.to(t,e({},n||{},{vertical:!1,horizontal:!0}))},r.prototype.toElement=function(e,n){var r=this.$el;t&&r&&this.to(j(e,r),n||{})},r.prototype.stop=function(e){void 0===e&&(e=!1);var t=this.$el,n=this.ctx,a=n.pos;t&&n.progress&&(r.caf(n.id),n.progress=!1,n.start=0,n.id=0,e&&a&&(S(t,a.left,"x"),S(t,a.top,"y")),this.complete())},r.prototype.update=function(t){if(this.$el){var n=e({},this.opts,t);this.stop(),this.unbind(!0,!0),this.opts=n,this.bind(!0,!1)}},r.prototype.destroy=function(){this.$el&&(this.stop(),this.unbind(!0,!0),this.$el=null)},r.prototype.onBefore=function(e,t){return!0},r.prototype.onStep=function(e){},r.prototype.onAfter=function(e,t){},r.prototype.onCancel=function(){},r.prototype.onComplete=function(e){},r.prototype.start=function(e){var t=this.ctx;t.opts=e,t.progress=!0,t.easing=i(e.easing)?e.easing:h[e.easing];var n=this.$el,a={top:T(n,"y"),left:T(n,"x")};t.startPos=a,t.id=r.raf(this.loop)},r.prototype.complete=function(){var e=this.$el,r=this.ctx,a=r.hash,i=r.cancel,s=r.opts,o=r.pos,l=r.$trigger;if(e&&s){if(null!=a&&a!==window.location.hash){var u=s.updateURL;t&&n&&!1!==u&&window.history["replace"===u?"replaceState":"pushState"](null,"",a)}this.unbind(!1,!0),r.opts=null,r.$trigger=null,i?this.hook(s,"cancel"):this.hook(s,"after",o,l),this.hook(s,"complete",i)}},r.prototype.hook=function(e,t){for(var n,r=[],a=2;a<arguments.length;a++)r[a-2]=arguments[a];var s,o,l=e[t];
12246return i(l)&&(s=l.apply(this,r.concat([this]))),o=(n=this)["on"+(t[0].toUpperCase()+t.slice(1))].apply(n,r),void 0!==s?s:o},r.prototype.bind=function(e,t){var n=this.$el,r=this.ctx.opts;n&&(e&&O(n,C,this.handleClick,!1),t&&O(n,I,this.handleStop,!r||r.cancellable))},r.prototype.unbind=function(e,t){var n=this.$el,r=this.ctx.opts;n&&(e&&E(n,C,this.handleClick,!1),t&&E(n,I,this.handleStop,!r||r.cancellable))},r.raf=l,r.caf=u,r}();return W}()},3744:function(e,t){"use strict";t.Z=(e,t)=>{const n=e.__vccOpts||e;for(const[e,r]of t)n[e]=r;return n}},7061:function(e,t,n){var r=n(8698).default;function a(){"use strict";e.exports=a=function(){return t},e.exports.__esModule=!0,e.exports.default=e.exports;var t={},n=Object.prototype,i=n.hasOwnProperty,s="function"==typeof Symbol?Symbol:{},o=s.iterator||"@@iterator",l=s.asyncIterator||"@@asyncIterator",u=s.toStringTag||"@@toStringTag";function d(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{d({},"")}catch(e){d=function(e,t,n){return e[t]=n}}function c(e,t,n,r){var a=t&&t.prototype instanceof f?t:f,i=Object.create(a.prototype),s=new D(r||[]);return i._invoke=function(e,t,n){var r="suspendedStart";return function(a,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===a)throw i;return{value:void 0,done:!0}}for(n.method=a,n.arg=i;;){var s=n.delegate;if(s){var o=Y(s,n);if(o){if(o===m)continue;return o}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var l=_(e,t,n);if("normal"===l.type){if(r=n.done?"completed":"suspendedYield",l.arg===m)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(r="completed",n.method="throw",n.arg=l.arg)}}}(e,n,s),i}function _(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=c;var m={};function f(){}function h(){}function p(){}var y={};d(y,o,(function(){return this}));var v=Object.getPrototypeOf,g=v&&v(v(T([])));g&&g!==n&&i.call(g,o)&&(y=g);var M=p.prototype=f.prototype=Object.create(y);function L(e){["next","throw","return"].forEach((function(t){d(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){function n(a,s,o,l){var u=_(e[a],e,s);if("throw"!==u.type){var d=u.arg,c=d.value;return c&&"object"==r(c)&&i.call(c,"__await")?t.resolve(c.__await).then((function(e){n("next",e,o,l)}),(function(e){n("throw",e,o,l)})):t.resolve(c).then((function(e){d.value=e,o(d)}),(function(e){return n("throw",e,o,l)}))}l(u.arg)}var a;this._invoke=function(e,r){function i(){return new t((function(t,a){n(e,r,t,a)}))}return a=a?a.then(i,i):i()}}function Y(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,Y(e,t),"throw"===t.method))return m;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return m}var r=_(n,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,m;var a=r.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,m):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,m)}function k(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function w(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function D(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(k,this),this.reset(!0)}function T(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,r=function t(){for(;++n<e.length;)if(i.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return r.next=r}}return{next:S}}function S(){return{value:void 0,done:!0}}return h.prototype=p,d(M,"constructor",p),d(p,"constructor",h),h.displayName=d(p,u,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===h||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,p):(e.__proto__=p,d(e,u,"GeneratorFunction")),e.prototype=Object.create(M),e},t.awrap=function(e){return{__await:e}},L(b.prototype),d(b.prototype,l,(function(){return this})),t.AsyncIterator=b,t.async=function(e,n,r,a,i){void 0===i&&(i=Prom
12246ise);var s=new b(c(e,n,r,a),i);return t.isGeneratorFunction(n)?s:s.next().then((function(e){return e.done?e.value:s.next()}))},L(M),d(M,u,"Generator"),d(M,o,(function(){return this})),d(M,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=T,D.prototype={constructor:D,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!e)for(var t in this)"t"===t.charAt(0)&&i.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(n,r){return s.type="throw",s.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r],s=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var o=i.call(a,"catchLoc"),l=i.call(a,"finallyLoc");if(o&&l){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(o){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&i.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var a=r;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var s=a?a.completion:{};return s.type=e,s.arg=t,a?(this.method="next",this.next=a.finallyLoc,m):this.complete(s)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),w(n),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var a=r.arg;w(n)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:T(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),m}},t}e.exports=a,e.exports.__esModule=!0,e.exports.default=e.exports},8698:function(e){function t(n){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},4687:function(e,t,n){var r=n(7061)();e.exports=r;try{regeneratorRuntime=r}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=r:Function("r","regeneratorRuntime = r")(r)}}},t={};function n(r){var a=t[r];if(void 0!==a)return a.exports;var i=t[r]={id:r,loaded:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.loaded=!0,i.exports}n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.nmd=function(e){return e.paths=[],e.children||(e.children=[]),e},function(){"use strict";function e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function t(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function r(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var i=function(){function t(){var n=this;e(this,t),a(this,"linkObjects",[]),a(this,"location",void 0),a(this,"hostname",void 0),this.location=window.location,this.hostname=this.location.hostname,document.querySelectorAll("a").forEach((function(e){if(e.hasAttribute("href"))try{var t=new URL(e.href);if(t.hostname){var r=t.hostname!==n.hostname,a={element:e,url:t,external:r,internal:!r};n.linkObjects.push(a)}}catch(e){return!1}}
12246))}return r(t,[{key:"setExternalLinkTarget",value:function(){this.linkObjects.filter((function(e){return!0===e.external})).forEach((function(e){e.element.hasAttribute("target")||e.element.setAttribute("target","_blank")}))}}]),t}(),s={itdLPxx_contractor:"rvf",coordOutputFormat:"WGS84%5Bdd.dddd%5D",sessionID:"0",language:"de",type_origin:"any",type_destination:"any",itdLPxx_directRequest:"1",std3_suggestMacro:"std3_suggest",std3_commonMacro:"trip",useRealtime:"1"},o=function(e,t){localStorage.setItem(e,t)},l=function(e){return localStorage.getItem(e)},u=function(e){localStorage.removeItem(e)},d=function(e,t){return e+"?"+new URLSearchParams(t).toString()},c=function(e){return btoa(JSON.stringify(e))},_=function(e){return JSON.parse(atob(e))};function m(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function f(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?m(Object(n),!0).forEach((function(t){a(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):m(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var h=r((function t(n){if(e(this,t),a(this,"container",void 0),a(this,"iFrame",void 0),a(this,"baseUrl",void 0),n){this.container=n;var r=this.container.querySelector(".c-efa__frame"),i=s,o=l("mentz_efa_params");if(o){var c=_(o);i=f(f({},i),c),u("mentz_efa_params")}if(r){this.iFrame=r;var m=this.iFrame.hasAttribute("data-base-src")?this.iFrame.getAttribute("data-base-src"):null;if(m){this.baseUrl=m;var h=d(m,i);this.iFrame.src=h}}}}));function p(e,t){const n=Object.create(null),r=e.split(",");for(let e=0;e<r.length;e++)n[r[e]]=!0;return t?e=>!!n[e.toLowerCase()]:e=>!!n[e]}const y=p("itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly");function v(e){return!!e||""===e}function g(e){if(C(e)){const t={};for(let n=0;n<e.length;n++){const r=e[n],a=z(r)?b(r):g(r);if(a)for(const e in a)t[e]=a[e]}return t}return z(e)||q(e)?e:void 0}const M=/;(?![^(]*\))/g,L=/:(.+)/;function b(e){const t={};return e.split(M).forEach((e=>{if(e){const n=e.split(L);n.length>1&&(t[n[0].trim()]=n[1].trim())}})),t}function Y(e){let t="";if(z(e))t=e;else if(C(e))for(let n=0;n<e.length;n++){const r=Y(e[n]);r&&(t+=r+" ")}else if(q(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}const k=e=>z(e)?e:null==e?"":C(e)||q(e)&&(e.toString===B||!R(e.toString))?JSON.stringify(e,w,2):String(e),w=(e,t)=>t&&t.__v_isRef?w(e,t.value):I(t)?{[`Map(${t.size})`]:[...t.entries()].reduce(((e,[t,n])=>(e[`${t} =>`]=n,e)),{})}:W(t)?{[`Set(${t.size})`]:[...t.values()]}:!q(t)||C(t)||V(t)?t:String(t),D={},T=[],S=()=>{},j=()=>!1,x=/^on[^a-z]/,H=e=>x.test(e),O=e=>e.startsWith("onUpdate:"),E=Object.assign,P=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},A=Object.prototype.hasOwnProperty,F=(e,t)=>A.call(e,t),C=Array.isArray,I=e=>"[object Map]"===J(e),W=e=>"[object Set]"===J(e),R=e=>"function"==typeof e,z=e=>"string"==typeof e,N=e=>"symbol"==typeof e,q=e=>null!==e&&"object"==typeof e,U=e=>q(e)&&R(e.then)&&R(e.catch),B=Object.prototype.toString,J=e=>B.call(e),V=e=>"[object Object]"===J(e),$=e=>z(e)&&"NaN"!==e&&"-"!==e[0]&&""+parseInt(e,10)===e,G=p(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),K=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},Z=/-(\w)/g,Q=K((e=>e.replace(Z,((e,t)=>t?t.toUpperCase():"")))),X=/\B([A-Z])/g,ee=K((e=>e.replace(X,"-$1").toLowerCase())),te=K((e=>e.charAt(0).toUpperCase()+e.slice(1))),ne=K((e=>e?`on${te(e)}`:"")),re=(e,t)=>!Object.is(e,t),ae=(e,t)=>{for(let n=0;n<e.length;n++)e[n](t)},ie=(e,t,n)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:n})},se=e=>{const t=parseFloat(e);return isNaN(t)?e:t};let oe,le;class ue{constructor(e=!1){this.active=!0,this.effects=[],this.cleanups=[],!e&&le&&(this.parent=le,this.index=(le.scopes||(le.scopes=[])).push(this)-1)}run(e){if(this.active){const t=le;try{return le=this,e()}finally{le=t}}}on(){le=this}
vendor: 11,498 bytes, line 12246
12246off(){le=this.parent}stop(e){if(this.active){let t,n;for(t=0,n=this.effects.length;t<n;t++)this.effects[t].stop();for(t=0,n=this.cleanups.length;t<n;t++)this.cleanups[t]();if(this.scopes)for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].stop(!0);if(this.parent&&!e){const e=this.parent.scopes.pop();e&&e!==this&&(this.parent.scopes[this.index]=e,e.index=this.index)}this.active=!1}}}function de(e){return new ue(e)}const ce=e=>{const t=new Set(e);return t.w=0,t.n=0,t},_e=e=>(e.w&ye)>0,me=e=>(e.n&ye)>0,fe=new WeakMap;let he,pe=0,ye=1;const ve=Symbol(""),ge=Symbol("");class Me{constructor(e,t=null,n){this.fn=e,this.scheduler=t,this.active=!0,this.deps=[],this.parent=void 0,function(e,t=le){t&&t.active&&t.effects.push(e)}(this,n)}run(){if(!this.active)return this.fn();let e=he,t=be;for(;e;){if(e===this)return;e=e.parent}try{return this.parent=he,he=this,be=!0,ye=1<<++pe,pe<=30?(({deps:e})=>{if(e.length)for(let t=0;t<e.length;t++)e[t].w|=ye})(this):Le(this),this.fn()}finally{pe<=30&&(e=>{const{deps:t}=e;if(t.length){let n=0;for(let r=0;r<t.length;r++){const a=t[r];_e(a)&&!me(a)?a.delete(e):t[n++]=a,a.w&=~ye,a.n&=~ye}t.length=n}})(this),ye=1<<--pe,he=this.parent,be=t,this.parent=void 0,this.deferStop&&this.stop()}}stop(){he===this?this.deferStop=!0:this.active&&(Le(this),this.onStop&&this.onStop(),this.active=!1)}}function Le(e){const{deps:t}=e;if(t.length){for(let n=0;n<t.length;n++)t[n].delete(e);t.length=0}}let be=!0;const Ye=[];function ke(){Ye.push(be),be=!1}function we(){const e=Ye.pop();be=void 0===e||e}function De(e,t,n){if(be&&he){let t=fe.get(e);t||fe.set(e,t=new Map);let r=t.get(n);r||t.set(n,r=ce()),Te(r)}}function Te(e,t){let n=!1;pe<=30?me(e)||(e.n|=ye,n=!_e(e)):n=!e.has(he),n&&(e.add(he),he.deps.push(e))}function Se(e,t,n,r,a,i){const s=fe.get(e);if(!s)return;let o=[];if("clear"===t)o=[...s.values()];else if("length"===n&&C(e))s.forEach(((e,t)=>{("length"===t||t>=r)&&o.push(e)}));else switch(void 0!==n&&o.push(s.get(n)),t){case"add":C(e)?$(n)&&o.push(s.get("length")):(o.push(s.get(ve)),I(e)&&o.push(s.get(ge)));break;case"delete":C(e)||(o.push(s.get(ve)),I(e)&&o.push(s.get(ge)));break;case"set":I(e)&&o.push(s.get(ve))}if(1===o.length)o[0]&&je(o[0]);else{const e=[];for(const t of o)t&&e.push(...t);je(ce(e))}}function je(e,t){const n=C(e)?e:[...e];for(const e of n)e.computed&&xe(e);for(const e of n)e.computed||xe(e)}function xe(e,t){(e!==he||e.allowRecurse)&&(e.scheduler?e.scheduler():e.run())}const He=p("__proto__,__v_isRef,__isVue"),Oe=new Set(Object.getOwnPropertyNames(Symbol).filter((e=>"arguments"!==e&&"caller"!==e)).map((e=>Symbol[e])).filter(N)),Ee=Ie(),Pe=Ie(!1,!0),Ae=Ie(!0),Fe=Ce();function Ce(){const e={};return["includes","indexOf","lastIndexOf"].forEach((t=>{e[t]=function(...e){const n=Lt(this);for(let e=0,t=this.length;e<t;e++)De(n,0,e+"");const r=n[t](...e);return-1===r||!1===r?n[t](...e.map(Lt)):r}})),["push","pop","shift","unshift","splice"].forEach((t=>{e[t]=function(...e){ke();const n=Lt(this)[t].apply(this,e);return we(),n}})),e}function Ie(e=!1,t=!1){return function(n,r,a){if("__v_isReactive"===r)return!e;if("__v_isReadonly"===r)return e;if("__v_isShallow"===r)return t;if("__v_raw"===r&&a===(e?t?mt:_t:t?ct:dt).get(n))return n;const i=C(n);if(!e&&i&&F(Fe,r))return Reflect.get(Fe,r,a);const s=Reflect.get(n,r,a);return(N(r)?Oe.has(r):He(r))?s:(e||De(n,0,r),t?s:Tt(s)?i&&$(r)?s:s.value:q(s)?e?ht(s):ft(s):s)}}function We(e=!1){return function(t,n,r,a){let i=t[n];if(vt(i)&&Tt(i)&&!Tt(r))return!1;if(!e&&(gt(r)||vt(r)||(i=Lt(i),r=Lt(r)),!C(t)&&Tt(i)&&!Tt(r)))return i.value=r,!0;const s=C(t)&&$(n)?Number(n)<t.length:F(t,n),o=Reflect.set(t,n,r,a);return t===Lt(a)&&(s?re(r,i)&&Se(t,"set",n,r):Se(t,"add",n,r)),o}}const Re={get:Ee,set:We(),deleteProperty:function(e,t){const n=F(e,t),r=(e[t],Reflect.deleteProperty(e,t));return r&&n&&Se(e,"delete",t,void 0),r},has:function(e,t){const n=Reflect.has(e,t);return N(t)&&Oe.has(t)||De(e,0,t),n},ownKeys:function(e){return De(e,0,C(e)?"length":ve),Reflect.ownKeys(e)}},ze={get:Ae,set(e,t){return!0},deleteProperty(e,t){return!0}},Ne=E({},Re,{get:Pe,set:We(!0)}),qe=e=>e,Ue=e=>Reflect.getPrototypeOf(e);function Be(e,t,n=!1,r=!1){const a=Lt(e=e.__v_raw),i=Lt(t);n||(t!==i&&De(a,0,t),De(a,0,i));const{has:s}=Ue(a),o=r?qe:n?kt:Yt;return s.call(a,t)?o(e.get(t)):s.call(a,i)?o(e.get(i)):void(e!==a&&e.get(t))}function Je(e,t=!1){const n=this.__v_raw,r=Lt(n),a=Lt(e);return t||(e!==a&&De(r,0,e),De(r,0,a)),e===a?n.has(e):n.has(e)||n.has(a)}function Ve(e,t=!1){return e=e.__v_raw,!t&&De(Lt(e),0,ve),Reflect.get(e,"size",e)}function $e(e){e=Lt(e);const t=Lt(this);return Ue(t).has.call(t,e)||(t.add(e),Se(t,"add",e,e)),this}function Ge(e,t){t=Lt(t);const n=Lt(this),{has:r,get:a}=Ue(n);let i=r.call(n,e);i||(e=Lt(e),i=r.call(n,e));const s=a.call(n,e);return n.set(e,t),i?re(t,s)&&Se(n,"set",e,t):Se(n,"add",e,t),this}function Ke(e){const t=Lt(this),{has:n,get:r}=Ue(t);let a=n.call(t,e);a||(e=Lt(e),a=n.call(t,e)),r&&r.call(t,e);const i=t.delete(e);return a&&Se(t,"delete",e,void 0),i}function Ze(){const e=Lt(this),t=0!==e.size,n=e.clear();return t&&Se(e,"clear",void 0,void 0),n}function Qe(e,t){return function(n,r){const a=this,i=a.__v_raw,s=Lt(i),o=t?qe:e?kt:Yt;return!e&&De(s,0,ve),i.forEach(((e,t)=>n.call(r,o(e),o(t),a)))}}function Xe(e,t,n){return function(...r){const a=this.__v_raw,i=Lt(a),s=I(i),o="entries"===e||e===Symbol.iterator&&s,l="keys"===e&&s,u=a[e](...r),d=n?qe:t?kt:Yt;return!t&&De(i,0,l?ge:ve),{next(){const{value:e,done:t}=u.next();return t?{value:e,done:t}:{value:o?[d(e[0]),d(e[1])]:d(e),done:t}},[Symbol.iterator](){return this}}}}function et(e){return function(...t){return"delete"!==e&&this}}function tt(){const e={get(e){return Be(this,e)},get size(){return Ve(this)},has:Je,add:$e,set:Ge,delete:Ke,clear:Ze,forEach:Qe(!1,!1)},t={get(e){return Be(this,e,!1,!0)},get size(){return Ve(this)},has:Je,add:$e,set:Ge,delete:Ke,clear:Ze,forEach:Qe(!1,!0)},n={get(e){return Be(this,e,!0)},get size(){return Ve(this,!0)},has(e){return Je.call(this,e,!0)},add:et("add"),set:et("set"),delete:et("delete"),clear:et("clear"),forEach:Qe(!0,!1)},r={get(e){return Be(this,e,!0,!0)},get size(){return Ve(this,!0)},has(e){return Je.call(this,e,!0)},add:et("add"),set:et("set"),delete:et("delete"),clear:et("clear"),forEach:Qe(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach((a=>{e[a]=Xe(a,!1,!1),n[a]=Xe(a,!0,!1),t[a]=Xe(a,!1,!0),r[a]=Xe(a,!0,!0)})),[e,n,t,r]}const[nt,rt,at,it]=tt();function st(e,t){const n=t?e?it:at:e?rt:nt;return(t,r,a)=>"__v_isReactive"===r?!e:"__v_isReadonly"===r?e:"__v_raw"===r?t:Reflect.get(F(n,r)&&r in t?n:t,r,a)}const ot={get:st(!1,!1)},lt={get:st(!1,!0)},ut={get:st(!0,!1)},dt=new WeakMap,ct=new WeakMap,_t=new WeakMap,mt=new WeakMap;function ft(e){return vt(e)?e:pt(e,!1,Re,ot,dt)}function ht(e){return pt(e,!0,ze,ut,_t)}function pt(e,t,n,r,a){if(!q(e))return e;if(e.__v_raw&&(!t||!e.__v_isReactive))return e;const i=a.get(e);if(i)return i;const s=(o=e).__v_skip||!Object.isExtensible(o)?0:function(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}((e=>J(e).slice(8,-1))(o));var o;if(0===s)return e;const l=new Proxy(e,2===s?r:n);return a.set(e,l),l}function yt(e){return vt(e)?yt(e.__v_raw):!(!e||!e.__v_isReactive)}function vt(e){return!(!e||!e.__v_isReadonly)}function gt(e){return!(!e||!e.__v_isShallow)}function Mt(e){return yt(e)||vt(e)}function Lt(e){const t=e&&e.__v_raw;return t?Lt(t):e}function bt(e){return ie(e,"__v_skip",!0),e}const Yt=e=>q(e)?ft(e):e,kt=e=>q(e)?ht(e):e;function wt(e){be&&he&&Te((e=Lt(e)).dep||(e.dep=ce()))}function Dt(e,t){(e=Lt(e)).dep&&je(e.dep)}function Tt(e){return!(!e||!0!==e.__v_isRef)}function St(e){return xt(e,!1)}function jt(e){return xt(e,!0)}function xt(e,t){return Tt(e)?e:new Ht(e,t)}class Ht{constructor(e,t){this.__v_isShallow=t,this.dep=void 0,this.__v_isRef=!0,this._rawValue=t?e:Lt(e),this._value=t?e:Yt(e)}get value(){return wt(this),this._value}set value(e){const t=this.__v_isShallow||gt(e)||vt(e);e=t?e:Lt(e),re(e,this._rawValue)&&(this._rawValue=e,this._value=t?e:Yt(e),Dt(this))}}function Ot(e){return Tt(e)?e.value:e}const Et={get:(e,t,n)=>Ot(Reflect.get(e,t,n)),set:(e,t,n,r)=>{const a=e[t];return Tt(a)&&!Tt(n)?(a.value=n,!0):Reflect.set(e,t,n,r)}};function Pt(e){return yt(e)?e:new Proxy(e,Et)}class At{constructor(e){this.dep=void 0,this.__v_isRef=!0;const{get:t,set:n}=e((()=>wt(this)),(()=>Dt(this)));this._get=t,this._set=n}get value(){return this._get()}set value(e){this._set(e)}}class Ft{constructor(e,t,n){this._object=e,this._key=t,this._defaultValue=n,this.__v_isRef=!0}get value(){const e=this._object[this._key];return void 0===e?this._defaultValue:e}set value(e){this._object[this._key]=e}}function Ct(e,t,n){const r=e[t];return Tt(r)?r:new Ft(e,t,n)}var It;class Wt{constructor(e,t,n,r){this._setter=t,this.dep=void 0,this.__v_isRef=!0,this[It]=!1,this._dirty=!0,this.effect=new Me(e,(()=>{this._dirty||(this._dirty=!0,Dt(this))})),this.effect.computed=this,this.effect.active=this._cacheable=!r,this.__v_isReadonly=n}get value(){const e=Lt(this);return wt(e),!e._dirty&&e._cacheable||(e._dirty=!1,e._value=e.effect.run()),e._value}set value(e){this._setter(e)}}function Rt(e,t,n,r){let a;try{a=r?e(...r):e()}catch(e){Nt(e,t,n)}return a}function zt(e,t,n,r){if(R(e)){const a=Rt(e,t,n,r);return a&&U(a)&&a.catch((e=>{Nt(e,t,n)})),a}const a=[];for(let i=0;i<e.length;i++)a.push(zt(e[i],t,n,r));return a}function Nt(e,t,n,r=!0){if(t&&t.vnode,t){let r=t.parent;const a=t.proxy,i=n;for(;r;){const t=r.ec;if(t)for(let n=0;n<t.length;n++)if(!1===t[n](e,a,i))return;r=r.parent}const s=t.appContext.config.errorHandler;if(s)return void Rt(s,null,10,[e,a,i])}!function(e,t,n,r=!0){console.error(e)}(e,0,0,r)}It="__v_isReadonly";let qt=!1,Ut=!1;const Bt=[];let Jt=0;const Vt=[];let $t=null,Gt=0;const Kt=Promise.resolve();let Zt=null;function Qt(e){const t=Zt||Kt;return e?t.then(this?e.bind(this):e):t}function Xt(e){Bt.length&&Bt.includes(e,qt&&e.allowRecurse?Jt+1:Jt)||(null==e.id?Bt.push(e):Bt.splice(function(e){let t=Jt+1,n=Bt.length;for(;t<n;){const r=t+n>>>1;rn(Bt[r])<e?t=r+1:n=r}return t}(e.id),0,e),en())}function en(){qt||Ut||(Ut=!0,Zt=Kt.then(sn))}function tn(e,t=(qt?Jt+1:0)){for(;t<Bt.length;t++){const e=Bt[t];e&&e.pre&&(Bt.splice(t,1),t--,e())}}function nn(e){if(Vt.length){const e=[...new Set(Vt)];if(Vt.length=0,$t)return void $t.push(...e);for($t=e,$t.sort(((e,t)=>rn(e)-rn(t))),Gt=0;Gt<$t.length;Gt++)$t[Gt]();$t=null,Gt=0}}const rn=e=>null==e.id?1/0:e.id,an=(e,t)=>{const n=rn(e)-rn(t);if(0===n){if(e.pre&&!t.pre)return-1;if(t.pre&&!e.pre)return 1}return n};function sn(e){Ut=!1,qt=!0,Bt.sort(an);try{for(Jt=0;Jt<Bt.length;Jt++){const e=Bt[Jt];e&&!1!==e.active&&Rt(e,null,14)}}finally{Jt=0,Bt.length=0,nn(),qt=!1,Zt=null,(Bt.length||Vt.length)&&sn(e)}}function on(e,t,...n){if(e.isUnmounted)return;const r=e.vnode.props||D;let a=n;const i=t.startsWith("update:"),s=i&&t.slice(7);if(s&&s in r){const e=`${"modelValue"===s?"model":s}Modifiers`,{number:t,trim:i}=r[e]||D;i&&(a=n.map((e=>e.trim()))),t&&(a=n.map(se))}let o,l=r[o=ne(t)]||r[o=ne(Q(t))];!l&&i&&(l=r[o=ne(ee(t))]),l&&zt(l,e,6,a);const u=r[o+"Once"];if(u){if(e.emitted){if(e.emitted[o])return}else e.emitted={};e.emitted[o]=!0,zt(u,e,6,a)}}function ln(e,t,n=!1){const r=t.emitsCache,a=r.get(e);if(void 0!==a)return a;const i=e.emits;let s={},o=!1;if(!R(e)){const r=e=>{const n=ln(e,t,!0);n&&(o=!0,E(s,n))};!n&&t.mixins.length&&t.mixins.forEach(r),e.extends&&r(e.extends),e.mixins&&e.mixins.forEach(r)}
12246return i||o?(C(i)?i.forEach((e=>s[e]=null)):E(s,i),q(e)&&r.set(e,s),s):(q(e)&&r.set(e,null),null)}function un(e,t){return!(!e||!H(t))&&(t=t.slice(2).replace(/Once$/,""),F(e,t[0].toLowerCase()+t.slice(1))||F(e,ee(t))||F(e,t))}new Set,new Map;let dn=null,cn=null;function _n(e){const t=dn;return dn=e,cn=e&&e.type.__scopeId||null,t}function mn(e,t=dn,n){if(!t)return e;if(e._n)return e;const r=(...n)=>{r._d&&$r(-1);const a=_n(t),i=e(...n);return _n(a),r._d&&$r(1),i};return r._n=!0,r._c=!0,r._d=!0,r}function fn(e){const{type:t,vnode:n,proxy:r,withProxy:a,props:i,propsOptions:[s],slots:o,attrs:l,emit:u,render:d,renderCache:c,data:_,setupState:m,ctx:f,inheritAttrs:h}=e;let p,y;const v=_n(e);try{if(4&n.shapeFlag){const e=a||r;p=la(d.call(e,e,c,i,m,_,f)),y=l}else{const e=t;p=la(e.length>1?e(i,{attrs:l,slots:o,emit:u}):e(i,null)),y=t.props?l:hn(l)}}catch(t){Ur.length=0,Nt(t,e,1),p=aa(Nr)}let g=p;if(y&&!1!==h){const e=Object.keys(y),{shapeFlag:t}=g;e.length&&7&t&&(s&&e.some(O)&&(y=pn(y,s)),g=ia(g,y))}return n.dirs&&(g=ia(g),g.dirs=g.dirs?g.dirs.concat(n.dirs):n.dirs),n.transition&&(g.transition=n.transition),p=g,_n(v),p}const hn=e=>{let t;for(const n in e)("class"===n||"style"===n||H(n))&&((t||(t={}))[n]=e[n]);return t},pn=(e,t)=>{const n={};for(const r in e)O(r)&&r.slice(9)in t||(n[r]=e[r]);return n};function yn(e,t,n){const r=Object.keys(t);if(r.length!==Object.keys(e).length)return!0;for(let a=0;a<r.length;a++){const i=r[a];if(t[i]!==e[i]&&!un(n,i))return!0}return!1}function vn(e,t,n=!1){const r=fa||dn;if(r){const a=null==r.parent?r.vnode.appContext&&r.vnode.appContext.provides:r.parent.provides;if(a&&e in a)return a[e];if(arguments.length>1)return n&&R(t)?t.call(r.proxy):t}}const gn={};function Mn(e,t,n){return Ln(e,t,n)}function Ln(e,t,{immediate:n,deep:r,flush:a,onTrack:i,onTrigger:s}=D){const o=fa;let l,u,d=!1,c=!1;if(Tt(e)?(l=()=>e.value,d=gt(e)):yt(e)?(l=()=>e,r=!0):C(e)?(c=!0,d=e.some((e=>yt(e)||gt(e))),l=()=>e.map((e=>Tt(e)?e.value:yt(e)?kn(e):R(e)?Rt(e,o,2):void 0))):l=R(e)?t?()=>Rt(e,o,2):()=>{if(!o||!o.isUnmounted)return u&&u(),zt(e,o,3,[_])}:S,t&&r){const e=l;l=()=>kn(e())}let _=e=>{u=p.onStop=()=>{Rt(e,o,4)}};if(ga)return _=S,t?n&&zt(t,o,3,[l(),c?[]:void 0,_]):l(),S;let m=c?[]:gn;const f=()=>{if(p.active)if(t){const e=p.run();(r||d||(c?e.some(((e,t)=>re(e,m[t]))):re(e,m)))&&(u&&u(),zt(t,o,3,[e,m===gn?void 0:m,_]),m=e)}else p.run()};let h;f.allowRecurse=!!t,"sync"===a?h=f:"post"===a?h=()=>Fr(f,o&&o.suspense):(f.pre=!0,o&&(f.id=o.uid),h=()=>Xt(f));const p=new Me(l,h);return t?n?f():m=p.run():"post"===a?Fr(p.run.bind(p),o&&o.suspense):p.run(),()=>{p.stop(),o&&o.scope&&P(o.scope.effects,p)}}function bn(e,t,n){const r=this.proxy,a=z(e)?e.includes(".")?Yn(r,e):()=>r[e]:e.bind(r,r);let i;R(t)?i=t:(i=t.handler,n=t);const s=fa;pa(this);const o=Ln(a,i.bind(r),n);return s?pa(s):ya(),o}function Yn(e,t){const n=t.split(".");return()=>{let t=e;for(let e=0;e<n.length&&t;e++)t=t[n[e]];return t}}function kn(e,t){if(!q(e)||e.__v_skip)return e;if((t=t||new Set).has(e))return e;if(t.add(e),Tt(e))kn(e.value,t);else if(C(e))for(let n=0;n<e.length;n++)kn(e[n],t);else if(W(e)||I(e))e.forEach((e=>{kn(e,t)}));else if(V(e))for(const n in e)kn(e[n],t);return e}const wn=[Function,Array],Dn={name:"BaseTransition",props:{mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:wn,onEnter:wn,onAfterEnter:wn,onEnterCancelled:wn,onBeforeLeave:wn,onLeave:wn,onAfterLeave:wn,onLeaveCancelled:wn,onBeforeAppear:wn,onAppear:wn,onAfterAppear:wn,onAppearCancelled:wn},setup(e,{slots:t}){const n=ha(),r=function(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return qn((()=>{e.isMounted=!0})),Jn((()=>{e.isUnmounting=!0})),e}();let a;return()=>{const i=t.default&&On(t.default(),!0);if(!i||!i.length)return;let s=i[0];if(i.length>1){let e=!1;for(const t of i)if(t.type!==Nr){s=t,e=!0;break}}const o=Lt(e),{mode:l}=o;if(r.isLeaving)return jn(s);const u=xn(s);if(!u)return jn(s);const d=Sn(u,o,r,n);Hn(u,d);const c=n.subTree,_=c&&xn(c);let m=!1;const{getTransitionKey:f}=u.type;if(f){const e=f();void 0===a?a=e:e!==a&&(a=e,m=!0)}if(_&&_.type!==Nr&&(!Xr(u,_)||m)){const e=Sn(_,o,r,n);if(Hn(_,e),"out-in"===l)return r.isLeaving=!0,e.afterLeave=()=>{r.isLeaving=!1,n.update()},jn(s);
vendor: 26,741 bytes, line 12246
12246"in-out"===l&&u.type!==Nr&&(e.delayLeave=(e,t,n)=>{Tn(r,_)[String(_.key)]=_,e._leaveCb=()=>{t(),e._leaveCb=void 0,delete d.delayedLeave},d.delayedLeave=n})}return s}}};function Tn(e,t){const{leavingVNodes:n}=e;let r=n.get(t.type);return r||(r=Object.create(null),n.set(t.type,r)),r}function Sn(e,t,n,r){const{appear:a,mode:i,persisted:s=!1,onBeforeEnter:o,onEnter:l,onAfterEnter:u,onEnterCancelled:d,onBeforeLeave:c,onLeave:_,onAfterLeave:m,onLeaveCancelled:f,onBeforeAppear:h,onAppear:p,onAfterAppear:y,onAppearCancelled:v}=t,g=String(e.key),M=Tn(n,e),L=(e,t)=>{e&&zt(e,r,9,t)},b=(e,t)=>{const n=t[1];L(e,t),C(e)?e.every((e=>e.length<=1))&&n():e.length<=1&&n()},Y={mode:i,persisted:s,beforeEnter(t){let r=o;if(!n.isMounted){if(!a)return;r=h||o}t._leaveCb&&t._leaveCb(!0);const i=M[g];i&&Xr(e,i)&&i.el._leaveCb&&i.el._leaveCb(),L(r,[t])},enter(e){let t=l,r=u,i=d;if(!n.isMounted){if(!a)return;t=p||l,r=y||u,i=v||d}let s=!1;const o=e._enterCb=t=>{s||(s=!0,L(t?i:r,[e]),Y.delayedLeave&&Y.delayedLeave(),e._enterCb=void 0)};t?b(t,[e,o]):o()},leave(t,r){const a=String(e.key);if(t._enterCb&&t._enterCb(!0),n.isUnmounting)return r();L(c,[t]);let i=!1;const s=t._leaveCb=n=>{i||(i=!0,r(),L(n?f:m,[t]),t._leaveCb=void 0,M[a]===e&&delete M[a])};M[a]=e,_?b(_,[t,s]):s()},clone(e){return Sn(e,t,n,r)}};return Y}function jn(e){if(An(e))return(e=ia(e)).children=null,e}function xn(e){return An(e)?e.children?e.children[0]:void 0:e}function Hn(e,t){6&e.shapeFlag&&e.component?Hn(e.component.subTree,t):128&e.shapeFlag?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function On(e,t=!1,n){let r=[],a=0;for(let i=0;i<e.length;i++){let s=e[i];const o=null==n?s.key:String(n)+String(null!=s.key?s.key:i);s.type===Rr?(128&s.patchFlag&&a++,r=r.concat(On(s.children,t,o))):(t||s.type!==Nr)&&r.push(null!=o?ia(s,{key:o}):s)}if(a>1)for(let e=0;e<r.length;e++)r[e].patchFlag=-2;return r}function En(e){return R(e)?{setup:e,name:e.name}:e}const Pn=e=>!!e.type.__asyncLoader,An=e=>e.type.__isKeepAlive;function Fn(e,t){In(e,"a",t)}function Cn(e,t){In(e,"da",t)}function In(e,t,n=fa){const r=e.__wdc||(e.__wdc=()=>{let t=n;for(;t;){if(t.isDeactivated)return;t=t.parent}return e()});if(Rn(t,r,n),n){let e=n.parent;for(;e&&e.parent;)An(e.parent.vnode)&&Wn(r,t,n,e),e=e.parent}}function Wn(e,t,n,r){const a=Rn(t,e,r,!0);Vn((()=>{P(r[t],a)}),n)}function Rn(e,t,n=fa,r=!1){if(n){const a=n[e]||(n[e]=[]),i=t.__weh||(t.__weh=(...r)=>{if(n.isUnmounted)return;ke(),pa(n);const a=zt(t,n,e,r);return ya(),we(),a});return r?a.unshift(i):a.push(i),i}}RegExp,RegExp;const zn=e=>(t,n=fa)=>(!ga||"sp"===e)&&Rn(e,t,n),Nn=zn("bm"),qn=zn("m"),Un=zn("bu"),Bn=zn("u"),Jn=zn("bum"),Vn=zn("um"),$n=zn("sp"),Gn=zn("rtg"),Kn=zn("rtc");function Zn(e,t=fa){Rn("ec",e,t)}function Qn(e,t){const n=dn;if(null===n)return e;const r=ba(n)||n.proxy,a=e.dirs||(e.dirs=[]);for(let e=0;e<t.length;e++){let[n,i,s,o=D]=t[e];R(n)&&(n={mounted:n,updated:n}),n.deep&&kn(i),a.push({dir:n,instance:r,value:i,oldValue:void 0,arg:s,modifiers:o})}return e}function Xn(e,t,n,r){const a=e.dirs,i=t&&t.dirs;for(let s=0;s<a.length;s++){const o=a[s];i&&(o.oldValue=i[s].value);let l=o.dir[r];l&&(ke(),zt(l,n,8,[e.el,o,e,t]),we())}}const er="components";function tr(e,t){return function(e,t,n=!0,r=!1){const a=dn||fa;if(a){const n=a.type;if(e===er){const e=function(e,t=!0){return R(e)?e.displayName||e.name:e.name||t&&e.__name}(n,!1);if(e&&(e===t||e===Q(t)||e===te(Q(t))))return n}const i=rr(a[e]||n[e],t)||rr(a.appContext[e],t);return!i&&r?n:i}}(er,e,!0,t)||e}const nr=Symbol();function rr(e,t){return e&&(e[t]||e[Q(t)]||e[te(Q(t))])}function ar(e,t,n,r){let a;const i=n&&n[r];if(C(e)||z(e)){a=new Array(e.length);for(let n=0,r=e.length;n<r;n++)a[n]=t(e[n],n,void 0,i&&i[n])}else if("number"==typeof e){a=new Array(e);for(let n=0;n<e;n++)a[n]=t(n+1,n,void 0,i&&i[n])}else if(q(e))if(e[Symbol.iterator])a=Array.from(e,((e,n)=>t(e,n,void 0,i&&i[n])));else{const n=Object.keys(e);a=new Array(n.length);for(let r=0,s=n.length;r<s;r++){const s=n[r];a[r]=t(e[s],s,r,i&&i[r])}}else a=[];return n&&(n[r]=a),a}function ir(e,t,n={},r,a){if(dn.isCE||dn.parent&&Pn(dn.parent)&&dn.parent.isCE)return aa("slot","default"===t?null:{name:t},r&&r());let i=e[t];i&&i._c&&(i._d=!1),Jr();const s=i&&sr(i(n)),o=Zr(Rr,{key:n.key||s&&s.key||`_${t}`},s||(r?r():[]),s&&1===e._?64:-2);return!a&&o.scopeId&&(o.slotScopeIds=[o.scopeId+"-s"]),i&&i._c&&(i._d=!0),o}function sr(e){return e.some((e=>!Qr(e)||e.type!==Nr&&!(e.type===Rr&&!sr(e.children))))?e:null}const or=e=>e?va(e)?ba(e)||e.proxy:or(e.parent):null,lr=E(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>or(e.parent),$root:e=>or(e.root),$emit:e=>e.emit,$options:e=>mr(e),$forceUpdate:e=>e.f||(e.f=()=>Xt(e.update)),$nextTick:e=>e.n||(e.n=Qt.bind(e.proxy)),$watch:e=>bn.bind(e)}),ur={get({_:e},t){const{ctx:n,setupState:r,data:a,props:i,accessCache:s,type:o,appContext:l}=e;let u;if("$"!==t[0]){const o=s[t];if(void 0!==o)switch(o){case 1:return r[t];case 2:return a[t];case 4:return n[t];case 3:return i[t]}else{if(r!==D&&F(r,t))return s[t]=1,r[t];if(a!==D&&F(a,t))return s[t]=2,a[t];if((u=e.propsOptions[0])&&F(u,t))return s[t]=3,i[t];if(n!==D&&F(n,t))return s[t]=4,n[t];dr&&(s[t]=0)}}const d=lr[t];let c,_;return d?("$attrs"===t&&De(e,0,t),d(e)):(c=o.__cssModules)&&(c=c[t])?c:n!==D&&F(n,t)?(s[t]=4,n[t]):(_=l.config.globalProperties,F(_,t)?_[t]:void 0)},set({_:e},t,n){const{data:r,setupState:a,ctx:i}=e;return a!==D&&F(a,t)?(a[t]=n,!0):r!==D&&F(r,t)?(r[t]=n,!0):!(F(e.props,t)||"$"===t[0]&&t.slice(1)in e||(i[t]=n,0))},has({_:{data:e,setupState:t,accessCache:n,ctx:r,appContext:a,propsOptions:i}},s){let o;return!!n[s]||e!==D&&F(e,s)||t!==D&&F(t,s)||(o=i[0])&&F(o,s)||F(r,s)||F(lr,s)||F(a.config.globalProperties,s)},defineProperty(e,t,n){return null!=n.get?e._.accessCache[t]=0:F(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};let dr=!0;function cr(e,t,n){zt(C(e)?e.map((e=>e.bind(t.proxy))):e.bind(t.proxy),t,n)}function _r(e,t,n,r){const a=r.includes(".")?Yn(n,r):()=>n[r];if(z(e)){const n=t[e];R(n)&&Mn(a,n)}else if(R(e))Mn(a,e.bind(n));else if(q(e))if(C(e))e.forEach((e=>_r(e,t,n,r)));else{const r=R(e.handler)?e.handler.bind(n):t[e.handler];R(r)&&Mn(a,r,e)}}function mr(e){const t=e.type,{mixins:n,extends:r}=t,{mixins:a,optionsCache:i,config:{optionMergeStrategies:s}}=e.appContext,o=i.get(t);let l;return o?l=o:a.length||n||r?(l={},a.length&&a.forEach((e=>fr(l,e,s,!0))),fr(l,t,s)):l=t,q(t)&&i.set(t,l),l}function fr(e,t,n,r=!1){const{mixins:a,extends:i}=t;i&&fr(e,i,n,!0),a&&a.forEach((t=>fr(e,t,n,!0)));for(const a in t)if(r&&"expose"===a);else{const r=hr[a]||n&&n[a];e[a]=r?r(e[a],t[a]):t[a]}return e}const hr={data:pr,props:gr,emits:gr,methods:gr,computed:gr,beforeCreate:vr,created:vr,beforeMount:vr,mounted:vr,beforeUpdate:vr,updated:vr,beforeDestroy:vr,beforeUnmount:vr,destroyed:vr,unmounted:vr,activated:vr,deactivated:vr,errorCaptured:vr,serverPrefetch:vr,components:gr,directives:gr,watch:function(e,t){if(!e)return t;if(!t)return e;const n=E(Object.create(null),e);for(const r in t)n[r]=vr(e[r],t[r]);return n},provide:pr,inject:function(e,t){return gr(yr(e),yr(t))}};function pr(e,t){return t?e?function(){return E(R(e)?e.call(this,this):e,R(t)?t.call(this,this):t)}:t:e}function yr(e){if(C(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function vr(e,t){return e?[...new Set([].concat(e,t))]:t}function gr(e,t){return e?E(E(Object.create(null),e),t):t}function Mr(e,t,n,r){const[a,i]=e.propsOptions;let s,o=!1;if(t)for(let l in t){if(G(l))continue;const u=t[l];let d;a&&F(a,d=Q(l))?i&&i.includes(d)?(s||(s={}))[d]=u:n[d]=u:un(e.emitsOptions,l)||l in r&&u===r[l]||(r[l]=u,o=!0)}if(i){const t=Lt(n),r=s||D;for(let s=0;s<i.length;s++){const o=i[s];n[o]=Lr(a,t,o,r[o],e,!F(r,o))}}return o}function Lr(e,t,n,r,a,i){const s=e[n];if(null!=s){const e=F(s,"default");if(e&&void 0===r){const e=s.default;if(s.type!==Function&&R(e)){const{propsDefaults:i}=a;n in i?r=i[n]:(pa(a),r=i[n]=e.call(null,t),ya())}else r=e}s[0]&&(i&&!e?r=!1:!s[1]||""!==r&&r!==ee(n)||(r=!0))}return r}function br(e,t,n=!1){const r=t.propsCache,a=r.get(e);if(a)return a;const i=e.props,s={},o=[];let l=!1;if(!R(e)){const r=e=>{l=!0;const[n,r]=br(e,t,!0);E(s,n),r&&o.push(...r)};!n&&t.mixins.length&&t.mixins.forEach(r),e.extends&&r(e.extends),e.mixins&&e.mixins.forEach(r)}if(!i&&!l)return q(e)&&r.set(e,T),T;if(C(i))for(let e=0;e<i.length;e++){const t=Q(i[e]);Yr(t)&&(s[t]=D)}else if(i)for(const e in i){const t=Q(e);if(Yr(t)){const n=i[e],r=s[t]=C(n)||R(n)?{type:n}:n;if(r){const e=Dr(Boolean,r.type),n=Dr(String,r.type);r[0]=e>-1,r[1]=n<0||e<n,(e>-1||F(r,"default"))&&o.push(t)}}}const u=[s,o];return q(e)&&r.set(e,u),u}function Yr(e){return"$"!==e[0]}function kr(e){const t=e&&e.toString().match(/^\s*function (\w+)/);return t?t[1]:null===e?"null":""}function wr(e,t){return kr(e)===kr(t)}function Dr(e,t){return C(t)?t.findIndex((t=>wr(t,e))):R(t)&&wr(t,e)?0:-1}const Tr=e=>"_"===e[0]||"$stable"===e,Sr=e=>C(e)?e.map(la):[la(e)],jr=(e,t,n)=>{if(t._n)return t;const r=mn(((...e)=>Sr(t(...e))),n);return r._c=!1,r},xr=(e,t,n)=>{const r=e._ctx;for(const n in e){if(Tr(n))continue;const a=e[n];if(R(a))t[n]=jr(0,a,r);else if(null!=a){const e=Sr(a);t[n]=()=>e}}},Hr=(e,t)=>{const n=Sr(t);e.slots.default=()=>n};function Or(){return{app:null,config:{isNativeTag:j,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let Er=0;function Pr(e,t){return function(n,r=null){R(n)||(n=Object.assign({},n)),null==r||q(r)||(r=null);const a=Or(),i=new Set;let s=!1;const o=a.app={_uid:Er++,_component:n,_props:r,_container:null,_context:a,_instance:null,version:ka,get config(){return a.config},set config(e){},use(e,...t){return i.has(e)||(e&&R(e.install)?(i.add(e),e.install(o,...t)):R(e)&&(i.add(e),e(o,...t))),o},mixin(e){return a.mixins.includes(e)||a.mixins.push(e),o},component(e,t){return t?(a.components[e]=t,o):a.components[e]},directive(e,t){return t?(a.directives[e]=t,o):a.directives[e]},mount(i,l,u){if(!s){const d=aa(n,r);return d.appContext=a,l&&t?t(d,i):e(d,i,u),s=!0,o._container=i,i.__vue_app__=o,ba(d.component)||d.component.proxy}},unmount(){s&&(e(null,o._container),delete o._container.__vue_app__)},provide(e,t){return a.provides[e]=t,o}};return o}}function Ar(e,t,n,r,a=!1){if(C(e))return void e.forEach(((e,i)=>Ar(e,t&&(C(t)?t[i]:t),n,r,a)));if(Pn(r)&&!a)return;const i=4&r.shapeFlag?ba(r.component)||r.component.proxy:r.el,s=a?null:i,{i:o,r:l}=e,u=t&&t.r,d=o.refs===D?o.refs={}:o.refs,c=o.setupState;if(null!=u&&u!==l&&(z(u)?(d[u]=null,F(c,u)&&(c[u]=null)):Tt(u)&&(u.value=null)),R(l))Rt(l,o,12,[s,d]);else{const t=z(l),r=Tt(l);if(t||r){const o=()=>{if(e.f){const n=t?d[l]:l.value;a?C(n)&&P(n,i):C(n)?n.includes(i)||n.push(i):t?(d[l]=[i],F(c,l)&&(c[l]=d[l])):(l.value=[i],e.k&&(d[e.k]=l.value))}else t?(d[l]=s,F(c,l)&&(c[l]=s)):r&&(l.value=s,e.k&&(d[e.k]=s))};s?(o.id=-1,Fr(o,n)):o()}}}const Fr=function(e,t){var n;t&&t.pendingBranch?C(e)?t.effects.push(...e):t.effects.push(e):(C(n=e)?Vt.push(...n):$t&&$t.includes(n,n.allowRecurse?Gt+1:Gt)||Vt.push(n),en())};function Cr(e,t){(oe||(oe="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==n.g?n.g:{})).__VUE__=!0;const{insert:r,remove:a,patchProp:i,createElement:s,createText:o,createComment:l,setText:u,setElementText:d,parentNode:c,nextSibling:_,setScopeId:m=S,cloneNode:f,insertStaticContent:h}=e,p=(e,t,n,r=null,a=null,i=null,s=!1,o=null,l=!!t.dynamicChildren)=>{if(e===t)return;e&&!Xr(e,t)&&(r=$(e),N(e,a,i,!0),e=null),-2===t.patchFlag&&(l=!1,t.dynamicChildren=null);const{type:u,ref:d,shapeFlag:c}=t;switch(u){case zr:y(e,t,n,r);break;case Nr:v(e,t,n,r);break;case qr:null==e&&g(t,n,r,s);break;case Rr:x(e,t,n,r,a,i,s,o,l);break;default:1&c?M(e,t,n,r,a,i,s,o,l):6&c?H(e,t,n,r,a,i,s,o,l):(64&c||128&c)&&u.process(e,t,n,r,a,i,s,o,l,Z)}null!=d&&a&&Ar(d,e&&e.ref,i,t||e,!t)},y=(e,t,n,a)=>{if(null==e)r(t.el=o(t.children),n,a);else{const n=t.el=e.el;t.children!==e.children&&u(n,t.children)}},v=(e,t,n,a)=>{null==e?r(t.el=l(t.children||""),n,a):t.el=e.el},g=(e,t,n,r)=>{[e.el,e.anchor]=h(e.children,t,n,r,e.el,e.anchor)},M=(e,t,n,r,a,i,s,o,l)=>{s=s||"svg"===t.type,null==e?L(t,n,r,a,i,s,o,l):k(e,t,a,i,s,o,l)},L=(e,t,n,a,o,l,u,c)=>{let _,m;const{type:h,props:p,shapeFlag:y,transition:v,patchFlag:g,dirs:M}=e;if(e.el&&void 0!==f&&-1===g)_=e.el=f(e.el);else{if(_=e.el=s(e.type,l,p&&p.is,p),8&y?d(_,e.children):16&y&&Y(e.children,_,null,a,o,l&&"foreignObject"!==h,u,c),M&&Xn(e,null,a,"created"),p){for(const t in p)"value"===t||G(t)||i(_,t,null,p[t],l,e.children,a,o,V);"value"in p&&i(_,"value",null,p.value),(m=p.onVnodeBeforeMount)&&ca(m,a,e)}b(_,e,e.scopeId,u,a)}M&&Xn(e,null,a,"beforeMount");const L=(!o||o&&!o.pendingBranch)&&v&&!v.persisted;L&&v.beforeEnter(_),r(_,t,n),((m=p&&p.onVnodeMounted)||L||M)&&Fr((()=>{m&&ca(m,a,e),L&&v.enter(_),M&&Xn(e,null,a,"mounted")}),o)},b=(e,t,n,r,a)=>{if(n&&m(e,n),r)for(let t=0;t<r.length;t++)m(e,r[t]);if(a&&t===a.subTree){const t=a.vnode;b(e,t,t.scopeId,t.slotScopeIds,a.parent)}},Y=(e,t,n,r,a,i,s,o,l=0)=>{for(let u=l;u<e.length;u++){const l=e[u]=o?ua(e[u]):la(e[u]);p(null,l,t,n,r,a,i,s,o)}},k=(e,t,n,r,a,s,o)=>{const l=t.el=e.el;let{patchFlag:u,dynamicChildren:c,dirs:_}=t;u|=16&e.patchFlag;const m=e.props||D,f=t.props||D;let h;n&&Ir(n,!1),(h=f.onVnodeBeforeUpdate)&&ca(h,n,t,e),_&&Xn(t,e,n,"beforeUpdate"),n&&Ir(n,!0);const p=a&&"foreignObject"!==t.type;if(c?w(e.dynamicChildren,c,l,n,r,p,s):o||I(e,t,l,null,n,r,p,s,!1),u>0){if(16&u)j(l,t,m,f,n,r,a);else if(2&u&&m.class!==f.class&&i(l,"class",null,f.class,a),4&u&&i(l,"style",m.style,f.style,a),8&u){const s=t.dynamicProps;for(let t=0;t<s.length;t++){const o=s[t],u=m[o],d=f[o];d===u&&"value"!==o||i(l,o,u,d,a,e.children,n,r,V)}}1&u&&e.children!==t.children&&d(l,t.children)}else o||null!=c||j(l,t,m,f,n,r,a);((h=f.onVnodeUpdated)||_)&&Fr((()=>{h&&ca(h,n,t,e),_&&Xn(t,e,n,"updated")}),r)},w=(e,t,n,r,a,i,s)=>{for(let o=0;o<t.length;o++){const l=e[o],u=t[o],d=l.el&&(l.type===Rr||!Xr(l,u)||70&l.shapeFlag)?c(l.el):n;p(l,u,d,null,r,a,i,s,!0)}},j=(e,t,n,r,a,s,o)=>{if(n!==r){for(const l in r){if(G(l))continue;const u=r[l],d=n[l];u!==d&&"value"!==l&&i(e,l,d,u,o,t.children,a,s,V)}if(n!==D)for(const l in n)G(l)||l in r||i(e,l,n[l],null,o,t.children,a,s,V);"value"in r&&i(e,"value",n.value,r.value)}},x=(e,t,n,a,i,s,l,u,d)=>{const c=t.el=e?e.el:o(""),_=t.anchor=e?e.anchor:o("");let{patchFlag:m,dynamicChildren:f,slotScopeIds:h}=t;h&&(u=u?u.concat(h):h),null==e?(r(c,n,a),r(_,n,a),Y(t.children,n,_,i,s,l,u,d)):m>0&&64&m&&f&&e.dynamicChildren?(w(e.dynamicChildren,f,n,i,s,l,u),(null!=t.key||i&&t===i.subTree)&&Wr(e,t,!0)):I(e,t,n,_,i,s,l,u,d)},H=(e,t,n,r,a,i,s,o,l)=>{t.slotScopeIds=o,null==e?512&t.shapeFlag?a.ctx.activate(t,n,r,s,l):O(t,n,r,a,i,s,l):P(e,t,l)},O=(e,t,n,r,a,i,s)=>{const o=e.component=function(e,t,n){const r=e.type,a=(t?t.appContext:e.appContext)||_a,i={uid:ma++,vnode:e,type:r,parent:t,appContext:a,root:null,next:null,subTree:null,effect:null,update:null,scope:new ue(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(a.provides),accessCache:null,renderCache:[],components:null,directives:null,propsOptions:br(r,a),emitsOptions:ln(r,a),emit:null,emitted:null,propsDefaults:D,inheritAttrs:r.inheritAttrs,ctx:D,data:D,props:D,attrs:D,slots:D,refs:D,setupState:D,setupContext:null,suspense:n,suspenseId:n?n.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return i.ctx={_:i},i.root=t?t.root:i,i.emit=on.bind(null,i),e.ce&&e.ce(i),i}(e,r,a);if(An(e)&&(o.ctx.renderer=Z),function(e,t=!1){ga=t;const{props:n,children:r}=e.vnode,a=va(e);(function(e,t,n,r=!1){const a={},i={};ie(i,ea,1),e.propsDefaults=Object.create(null),Mr(e,t,a,i);for(const t in e.propsOptions[0])t in a||(a[t]=void 0);n?e.props=r?a:pt(a,!1,Ne,lt,ct):e.type.props?e.props=a:e.props=i,e.attrs=i})(e,n,a,t),((e,t)=>{if(32&e.vnode.shapeFlag){const n=t._;n?(e.slots=Lt(t),ie(t,"_",n)):xr(t,e.slots={})}else e.slots={},t&&Hr(e,t);ie(e.slots,ea,1)})(e,r);const i=a?function(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=bt(new Proxy(e.ctx,ur));const{setup:r}=n;if(r){const n=e.setupContext=r.length>1?function(e){const t=t=>{e.exposed=t||{}};let n;return{get attrs(){return n||(n=function(e){return new Proxy(e.attrs,{get(t,n){return De(e,0,"$attrs"),t[n]}})}(e))},slots:e.slots,emit:e.emit,expose:t}}(e):null;pa(e),ke();const a=Rt(r,e,0,[e.props,n]);if(we(),ya(),U(a)){if(a.then(ya,ya),t)return a.then((n=>{Ma(e,n,t)})).catch((t=>{Nt(t,e,0)}));e.asyncDep=a}else Ma(e,a,t)}else La(e,t)}(e,t):void 0;ga=!1}(o),o.asyncDep){if(a&&a.registerDep(o,A),!e.el){const e=o.subTree=aa(Nr);v(null,e,t,n)}}else A(o,e,t,n,a,i,s)},P=(e,t,n)=>{const r=t.component=e.component;if(function(e,t,n){const{props:r,children:a,component:i}=e,{props:s,children:o,patchFlag:l}=t,u=i.emitsOptions;if(t.dirs||t.transition)return!0;if(!(n&&l>=0))return!(!a&&!o||o&&o.$stable)||r!==s&&(r?!s||yn(r,s,u):!!s);if(1024&l)return!0;if(16&l)return r?yn(r,s,u):!!s;if(8&l){const e=t.dynamicProps;for(let t=0;t<e.length;t++){const n=e[t];if(s[n]!==r[n]&&!un(u,n))return!0}}return!1}(e,t,n)){if(r.asyncDep&&!r.asyncResolved)return void C(r,t,n);r.next=t,function(e){const t=Bt.indexOf(e);t>Jt&&Bt.splice(t,1)}(r.update),r.update()}else t.el=e.el,r.vnode=t},A=(e,t,n,r,a,i,s)=>{const o=e.effect=new Me((()=>{if(e.isMounted){let t,{next:n,bu:r,u:o,parent:l,vnode:u}=e,d=n;Ir(e,!1),n?(n.el=u.el,C(e,n,s)):n=u,r&&ae(r),(t=n.props&&n.props.onVnodeBeforeUpdate)&&ca(t,l,n,u),Ir(e,!0);const _=fn(e),m=e.subTree;e.subTree=_,p(m,_,c(m.el),$(m),e,a,i),n.el=_.el,null===d&&function({vnode:e,parent:t},n){for(;t&&t.subTree===e;)(e=t.vnode).el=n,t=t.parent}(e,_.el),o&&Fr(o,a),(t=n.props&&n.props.onVnodeUpdated)&&Fr((()=>ca(t,l,n,u)),a)}else{let s;const{el:o,props:l}=t,{bm:u,m:d,parent:c}=e,_=Pn(t);if(Ir(e,!1),u&&ae(u),!_&&(s=l&&l.onVnodeBeforeMount)&&ca(s,c,t),Ir(e,!0),o&&te){const n=()=>{e.subTree=fn(e),te(o,e.subTree,e,a,null)};_?t.type.__asyncLoader().then((()=>!e.isUnmounted&&n())):n()}else{const s=e.subTree=fn(e);p(null,s,n,r,e,a,i),t.el=s.el}if(d&&Fr(d,a),!_&&(s=l&&l.onVnodeMounted)){const e=t;Fr((()=>ca(s,c,e)),a)}(256&t.shapeFlag||c&&Pn(c.vnode)&&256&c.vnode.shapeFlag)&&e.a&&Fr(e.a,a),e.isMounted=!0,t=n=r=null}}),(()=>Xt(l)),e.scope),l=e.update=()=>o.run();l.id=e.uid,Ir(e,!0),l()},C=(e,t,n)=>{t.component=e;const r=e.vnode.props;e.vnode=t,e.next=null,function(e,t,n,r){const{props:a,attrs:i,vnode:{patchFlag:s}}=e,o=Lt(a),[l]=e.propsOptions;let u=!1;if(!(r||s>0)||16&s){let r;Mr(e,t,a,i)&&(u=!0);for(const i in o)t&&(F(t,i)||(r=ee(i))!==i&&F(t,r))||(l?!n||void 0===n[i]&&void 0===n[r]||(a[i]=Lr(l,o,i,void 0,e,!0)):delete a[i]);if(i!==o)for(const e in i)t&&F(t,e)||(delete i[e],u=!0)}else if(8&s){const n=e.vnode.dynamicProps;for(let r=0;r<n.length;r++){let s=n[r];if(un(e.emitsOptions,s))continue;const d=t[s];if(l)if(F(i,s))d!==i[s]&&(i[s]=d,u=!0);else{const t=Q(s);a[t]=Lr(l,o,t,d,e,!1)}else d!==i[s]&&(i[s]=d,u=!0)}}u&&Se(e,"set","$attrs")}(e,t.props,r,n),((e,t,n)=>{const{vnode:r,slots:a}=e;let i=!0,s=D;if(32&r.shapeFlag){const e=t._;e?n&&1===e?i=!1:(E(a,t),n||1!==e||delete a._):(i=!t.$stable,xr(t,a)),s=t}else t&&(Hr(e,t),s={default:1});if(i)for(const e in a)Tr(e)||e in s||delete a[e]})(e,t.children,n),ke(),tn(),we()},I=(e,t,n,r,a,i,s,o,l=!1)=>{const u=e&&e.children,c=e?e.shapeFlag:0,_=t.children,{patchFlag:m,shapeFlag:f}=t;if(m>0){if(128&m)return void R(u,_,n,r,a,i,s,o,l);if(256&m)return void W(u,_,n,r,a,i,s,o,l)}8&f?(16&c&&V(u,a,i),_!==u&&d(n,_)):16&c?16&f?R(u,_,n,r,a,i,s,o,l):V(u,a,i,!0):(8&c&&d(n,""),16&f&&Y(_,n,r,a,i,s,o,l))},W=(e,t,n,r,a,i,s,o,l)=>{t=t||T;const u=(e=e||T).length,d=t.length,c=Math.min(u,d);let _;for(_=0;_<c;_++){const r=t[_]=l?ua(t[_]):la(t[_]);p(e[_],r,n,null,a,i,s,o,l)}u>d?V(e,a,i,!0,!1,c):Y(t,n,r,a,i,s,o,l,c)},R=(e,t,n,r,a,i,s,o,l)=>{let u=0;const d=t.length;let c=e.length-1,_=d-1;for(;u<=c&&u<=_;){const r=e[u],d=t[u]=l?ua(t[u]):la(t[u]);if(!Xr(r,d))break;p(r,d,n,null,a,i,s,o,l),u++}for(;u<=c&&u<=_;){const r=e[c],u=t[_]=l?ua(t[_]):la(t[_]);if(!Xr(r,u))break;p(r,u,n,null,a,i,s,o,l),c--,_--}if(u>c){if(u<=_){const e=_+1,c=e<d?t[e].el:r;for(;u<=_;)p(null,t[u]=l?ua(t[u]):la(t[u]),n,c,a,i,s,o,l),u++}}else if(u>_)for(;u<=c;)N(e[u],a,i,!0),u++;else{const m=u,f=u,h=new Map;for(u=f;u<=_;u++){const e=t[u]=l?ua(t[u]):la(t[u]);null!=e.key&&h.set(e.key,u)}let y,v=0;const g=_-f+1;let M=!1,L=0;const b=new Array(g);for(u=0;u<g;u++)b[u]=0;for(u=m;u<=c;u++){const r=e[u];if(v>=g){N(r,a,i,!0);continue}let d;if(null!=r.key)d=h.get(r.key);else for(y=f;y<=_;y++)if(0===b[y-f]&&Xr(r,t[y])){d=y;break}void 0===d?N(r,a,i,!0):(b[d-f]=u+1,d>=L?L=d:M=!0,p(r,t[d],n,null,a,i,s,o,l),v++)}const Y=M?function(e){const t=e.slice(),n=[0];let r,a,i,s,o;const l=e.length;for(r=0;r<l;r++){const l=e[r];if(0!==l){if(a=n[n.length-1],e[a]<l){t[r]=a,n.push(r);continue}for(i=0,s=n.length-1;i<s;)o=i+s>>1,e[n[o]]<l?i=o+1:s=o;l<e[n[i]]&&(i>0&&(t[r]=n[i-1]),n[i]=r)}}for(i=n.length,s=n[i-1];i-- >0;)n[i]=s,s=t[s];return n}(b):T;for(y=Y.length-1,u=g-1;u>=0;u--){const e=f+u,c=t[e],_=e+1<d?t[e+1].el:r;0===b[u]?p(null,c,n,_,a,i,s,o,l):M&&(y<0||u!==Y[y]?z(c,n,_,2):y--)}}},z=(e,t,n,a,i=null)=>{const{el:s,type:o,transition:l,children:u,shapeFlag:d}=e;if(6&d)z(e.component.subTree,t,n,a);else if(128&d)e.suspense.move(t,n,a);else if(64&d)o.move(e,t,n,Z);else if(o!==Rr)if(o!==qr)if(2!==a&&1&d&&l)if(0===a)l.beforeEnter(s),r(s,t,n),Fr((()=>l.enter(s)),i);else{const{leave:e,delayLeave:a,afterLeave:i}=l,o=()=>r(s,t,n),u=()=>{e(s,(()=>{o(),i&&i()}))};a?a(s,o,u):u()}else r(s,t,n);else(({el:e,anchor:t},n,a)=>{let i;for(;e&&e!==t;)i=_(e),r(e,n,a),e=i;r(t,n,a)})(e,t,n);else{r(s,t,n);for(let e=0;e<u.length;e++)z(u[e],t,n,a);r(e.anchor,t,n)}},N=(e,t,n,r=!1,a=!1)=>{const{type:i,props:s,ref:o,children:l,dynamicChildren:u,shapeFlag:d,patchFlag:c,dirs:_}=e;if(null!=o&&Ar(o,null,n,e,!0),256&d)return void t.ctx.deactivate(e);const m=1&d&&_,f=!Pn(e);let h;if(f&&(h=s&&s.onVnodeBeforeUnmount)&&ca(h,t,e),6&d)J(e.component,n,r);else{if(128&d)return void e.suspense.unmount(n,r);m&&Xn(e,null,t,"beforeUnmount"),64&d?e.type.remove(e,t,n,a,Z,r):u&&(i!==Rr||c>0&&64&c)?V(u,t,n,!1,!0):(i===Rr&&384&c||!a&&16&d)&&V(l,t,n),r&&q(e)}(f&&(h=s&&s.onVnodeUnmounted)||m)&&Fr((()=>{h&&ca(h,t,e),m&&Xn(e,null,t,"unmounted")}),n)},q=e=>{const{type:t,el:n,anchor:r,transition:i}=e;if(t===Rr)return void B(n,r);if(t===qr)return void(({el:e,anchor:t})=>{let n;for(;e&&e!==t;)n=_(e),a(e),e=n;a(t)})(e);const s=()=>{a(n),i&&!i.persisted&&i.afterLeave&&i.afterLeave()};if(1&e.shapeFlag&&i&&!i.persisted){const{leave:t,delayLeave:r}=i,a=()=>t(n,s);r?r(e.el,s,a):a()}else s()},B=(e,t)=>{let n;for(;e!==t;)n=_(e),a(e),e=n;a(t)},J=(e,t,n)=>{const{bum:r,scope:a,update:i,subTree:s,um:o}=e;r&&ae(r),a.stop(),i&&(i.active=!1,N(s,e,t,n)),o&&Fr(o,t),Fr((()=>{e.isUnmounted=!0}),t),t&&t.pendingBranch&&!t.isUnmounted&&e.asyncDep&&!e.asyncResolved&&e.suspenseId===t.pendingId&&(t.deps--,0===t.deps&&t.resolve())},V=(e,t,n,r=!1,a=!1,i=0)=>{for(let s=i;s<e.length;s++)N(e[s],t,n,r,a)},$=e=>6&e.shapeFlag?$(e.component.subTree):128&e.shapeFlag?e.suspense.next():_(e.anchor||e.el),K=(e,t,n)=>{null==e?t._vnode&&N(t._vnode,null,null,!0):p(t._vnode||null,e,t,null,null,null,n),tn(),nn(),t._vnode=e},Z={p:p,um:N,m:z,r:q,mt:O,mc:Y,pc:I,pbc:w,n:$,o:e};let X,te;return t&&([X,te]=t(Z)),{render:K,hydrate:X,createApp:Pr(K,X)}}function Ir({effect:e,update:t},n){e.allowRecurse=t.allowRecurse=n}function Wr(e,t,n=!1){const r=e.children,a=t.children;if(C(r)&&C(a))for(let e=0;e<r.length;e++){const t=r[e];let i=a[e];1&i.shapeFlag&&!i.dynamicChildren&&((i.patchFlag<=0||32===i.patchFlag)&&(i=a[e]=ua(a[e]),i.el=t.el),n||Wr(t,i))}}const Rr=Symbol(void 0),zr=Symbol(void 0),Nr=Symbol(void 0),qr=Symbol(void 0),Ur=[];let Br=null;function Jr(e=!1){Ur.push(Br=e?null:[])}let Vr=1;function $r(e){Vr+=e}function Gr(e){return e.dynamicChildren=Vr>0?Br||T:null,Ur.pop(),Br=Ur[Ur.length-1]||null,Vr>0&&Br&&Br.push(e),e}function Kr(e,t,n,r,a,i){return Gr(ra(e,t,n,r,a,i,!0))}function Zr(e,t,n,r,a){return Gr(aa(e,t,n,r,a,!0))}function Qr(e){return!!e&&!0===e.__v_isVNode}function Xr(e,t){return e.type===t.type&&e.key===t.key}const ea="__vInternal",ta=({key:e})=>null!=e?e:null,na=({ref:e,ref_key:t,ref_for:n})=>null!=e?z(e)||Tt(e)||R(e)?{i:dn,r:e,k:t,f:!!n}:e:null;function ra(e,t=null,n=null,r=0,a=null,i=(e===Rr?0:1),s=!1,o=!1){const l={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&ta(t),ref:t&&na(t),scopeId:cn,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:i,patchFlag:r,dynamicProps:a,dynamicChildren:null,appContext:null};return o?(da(l,n),128&i&&e.normalize(l)):n&&(l.shapeFlag|=z(n)?8:16),Vr>0&&!s&&Br&&(l.patchFlag>0||6&i)&&32!==l.patchFlag&&Br.push(l),l}const aa=function(e,t=null,n=null,r=0,a=null,i=!1){if(e&&e!==nr||(e=Nr),Qr(e)){const r=ia(e,t,!0);return n&&da(r,n),Vr>0&&!i&&Br&&(6&r.shapeFlag?Br[Br.indexOf(e)]=r:Br.push(r)),r.patchFlag|=-2,r}if(s=e,R(s)&&"__vccOpts"in s&&(e=e.__vccOpts),t){t=function(e){return e?Mt(e)||ea in e?E({},e):e:null}(t);let{class:e,style:n}=t;e&&!z(e)&&(t.class=Y(e)),q(n)&&(Mt(n)&&!C(n)&&(n=E({},n)),t.style=g(n))}var s;return ra(e,t,n,r,a,z(e)?1:(e=>e.__isSuspense)(e)?128:(e=>e.__isTeleport)(e)?64:q(e)?4:R(e)?2:0,i,!0)};function ia(e,t,n=!1){const{props:r,ref:a,patchFlag:i,children:s}=e,o=t?function(...e){const t={};for(let n=0;n<e.length;n++){const r=e[n];for(const e in r)if("class"===e)t.class!==r.class&&(t.class=Y([t.class,r.class]));else if("style"===e)t.style=g([t.style,r.style]);else if(H(e)){const n=t[e],a=r[e];!a||n===a||C(n)&&n.includes(a)||(t[e]=n?[].concat(n,a):a)}else""!==e&&(t[e]=r[e])}return t}(r||{},t):r;return{__v_isVNode:!0,__v_skip:!0,type:e.type,props:o,key:o&&ta(o),ref:t&&t.ref?n&&a?C(a)?a.concat(na(t)):[a,na(t)]:na(t):a,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:s,target:e.target,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==Rr?-1===i?16:16|i:i,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:e.transition,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&ia(e.ssContent),ssFallback:e.ssFallback&&ia(e.ssFallback),el:e.el,anchor:e.anchor}}function sa(e=" ",t=0){return aa(zr,null,e,t)}
12246function oa(e="",t=!1){return t?(Jr(),Zr(Nr,null,e)):aa(Nr,null,e)}function la(e){return null==e||"boolean"==typeof e?aa(Nr):C(e)?aa(Rr,null,e.slice()):"object"==typeof e?ua(e):aa(zr,null,String(e))}function ua(e){return null===e.el||e.memo?e:ia(e)}function da(e,t){let n=0;const{shapeFlag:r}=e;if(null==t)t=null;else if(C(t))n=16;else if("object"==typeof t){if(65&r){const n=t.default;return void(n&&(n._c&&(n._d=!1),da(e,n()),n._c&&(n._d=!0)))}{n=32;const r=t._;r||ea in t?3===r&&dn&&(1===dn.slots._?t._=1:(t._=2,e.patchFlag|=1024)):t._ctx=dn}}else R(t)?(t={default:t,_ctx:dn},n=32):(t=String(t),64&r?(n=16,t=[sa(t)]):n=8);e.children=t,e.shapeFlag|=n}function ca(e,t,n,r=null){zt(e,t,7,[n,r])}const _a=Or();let ma=0;let fa=null;const ha=()=>fa||dn,pa=e=>{fa=e,e.scope.on()},ya=()=>{fa&&fa.scope.off(),fa=null};function va(e){return 4&e.vnode.shapeFlag}let ga=!1;function Ma(e,t,n){R(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:q(t)&&(e.setupState=Pt(t)),La(e,n)}function La(e,t,n){const r=e.type;e.render||(e.render=r.render||S),pa(e),ke(),function(e){const t=mr(e),n=e.proxy,r=e.ctx;dr=!1,t.beforeCreate&&cr(t.beforeCreate,e,"bc");const{data:a,computed:i,methods:s,watch:o,provide:l,inject:u,created:d,beforeMount:c,mounted:_,beforeUpdate:m,updated:f,activated:h,deactivated:p,beforeDestroy:y,beforeUnmount:v,destroyed:g,unmounted:M,render:L,renderTracked:b,renderTriggered:Y,errorCaptured:k,serverPrefetch:w,expose:D,inheritAttrs:T,components:j,directives:x,filters:H}=t;if(u&&function(e,t,n=S,r=!1){C(e)&&(e=yr(e));for(const n in e){const a=e[n];let i;i=q(a)?"default"in a?vn(a.from||n,a.default,!0):vn(a.from||n):vn(a),Tt(i)&&r?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>i.value,set:e=>i.value=e}):t[n]=i}}(u,r,null,e.appContext.config.unwrapInjectedRef),s)for(const e in s){const t=s[e];R(t)&&(r[e]=t.bind(n))}if(a){const t=a.call(n,n);q(t)&&(e.data=ft(t))}if(dr=!0,i)for(const e in i){const t=i[e],a=R(t)?t.bind(n,n):R(t.get)?t.get.bind(n,n):S,s=!R(t)&&R(t.set)?t.set.bind(n):S,o=Ya({get:a,set:s});Object.defineProperty(r,e,{enumerable:!0,configurable:!0,get:()=>o.value,set:e=>o.value=e})}if(o)for(const e in o)_r(o[e],r,n,e);if(l){const e=R(l)?l.call(n):l;Reflect.ownKeys(e).forEach((t=>{!function(e,t){if(fa){let n=fa.provides;const r=fa.parent&&fa.parent.provides;r===n&&(n=fa.provides=Object.create(r)),n[e]=t}}(t,e[t])}))}function O(e,t){C(t)?t.forEach((t=>e(t.bind(n)))):t&&e(t.bind(n))}if(d&&cr(d,e,"c"),O(Nn,c),O(qn,_),O(Un,m),O(Bn,f),O(Fn,h),O(Cn,p),O(Zn,k),O(Kn,b),O(Gn,Y),O(Jn,v),O(Vn,M),O($n,w),C(D))if(D.length){const t=e.exposed||(e.exposed={});D.forEach((e=>{Object.defineProperty(t,e,{get:()=>n[e],set:t=>n[e]=t})}))}else e.exposed||(e.exposed={});L&&e.render===S&&(e.render=L),null!=T&&(e.inheritAttrs=T),j&&(e.components=j),x&&(e.directives=x)}(e),we(),ya()}function ba(e){if(e.exposed)return e.exposeProxy||(e.exposeProxy=new Proxy(Pt(bt(e.exposed)),{get(t,n){return n in t?t[n]:n in lr?lr[n](e):void 0}}))}const Ya=(e,t)=>function(e,t,n=!1){let r,a;const i=R(e);return i?(r=e,a=S):(r=e.get,a=e.set),new Wt(r,a,i||!a,n)}(e,0,ga);Symbol("");const ka="3.2.39";var wa={class:"c-efa-search__filter__field c-efa-search__filter__field--location"},Da={class:"c-efa-search__filter__field c-efa-search__filter__field--location"},Ta={class:"c-efa-search__options"},Sa={class:"c-efa-search__filter__field c-efa-search__filter__field--date"},ja={class:"c-efa-search__filter__field c-efa-search__filter__field--time"},xa={class:"c-efa-search__filter__field c-efa-search__filter__field--type"},Ha={class:"c-efa-search__filter__field c-efa-search__filter__field--action"},Oa=["disabled"],Ea={class:"c-efa-search__footer"},Pa={key:0,class:"c-efa-search__disclaimer small"};function Aa(e,t,n,r,a,i,s){try{var o=e[i](s),l=o.value}catch(e){return void n(e)}o.done?t(l):Promise.resolve(l).then(r,a)}function Fa(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var i=e.apply(t,n);function s(e){Aa(i,r,a,s,o,"next",e)}function o(e){Aa(i,r,a,s,o,"throw",e)}s(void 0)}))}}var Ca=n(4687),Ia=n.n(Ca);const Wa="undefined"!=typeof document?document:null,Ra=Wa&&Wa.createElement("template"),za={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,r)=>{const a=t?Wa.createElementNS("http://www.w3.org/2000/svg",e):Wa.createElement(e,n?{is:n}:void 0);return"select"===e&&r&&null!=r.multiple&&a.setAttribute("multiple",r.multiple),a},createText:e=>Wa.createTextNode(e),createComment:e=>Wa.createComment(e),setText:(e,t)=>
12246{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Wa.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},cloneNode(e){const t=e.cloneNode(!0);return"_value"in e&&(t._value=e._value),t},insertStaticContent(e,t,n,r,a,i){const s=n?n.previousSibling:t.lastChild;if(a&&(a===i||a.nextSibling))for(;t.insertBefore(a.cloneNode(!0),n),a!==i&&(a=a.nextSibling););else{Ra.innerHTML=r?`<svg>${e}</svg>`:e;const a=Ra.content;if(r){const e=a.firstChild;for(;e.firstChild;)a.appendChild(e.firstChild);a.removeChild(e)}t.insertBefore(a,n)}return[s?s.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},Na=/\s*!important$/;function qa(e,t,n){if(C(n))n.forEach((n=>qa(e,t,n)));else if(null==n&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const r=function(e,t){const n=Ba[t];if(n)return n;let r=Q(t);if("filter"!==r&&r in e)return Ba[t]=r;r=te(r);for(let n=0;n<Ua.length;n++){const a=Ua[n]+r;if(a in e)return Ba[t]=a}return t}(e,t);Na.test(n)?e.setProperty(ee(r),n.replace(Na,""),"important"):e[r]=n}}const Ua=["Webkit","Moz","ms"],Ba={},Ja="http://www.w3.org/1999/xlink",[Va,$a]=(()=>{let e=Date.now,t=!1;if("undefined"!=typeof window){Date.now()>document.createEvent("Event").timeStamp&&(e=performance.now.bind(performance));const n=navigator.userAgent.match(/firefox\/(\d+)/i);t=!!(n&&Number(n[1])<=53)}return[e,t]})();let Ga=0;const Ka=Promise.resolve(),Za=()=>{Ga=0};function Qa(e,t,n,r){e.addEventListener(t,n,r)}const Xa=/(?:Once|Passive|Capture)$/,ei=/^on[a-z]/;"undefined"!=typeof HTMLElement&&HTMLElement;const ti="transition",ni="animation",ri=(e,{slots:t})=>function(e,t,n){const r=arguments.length;return 2===r?q(t)&&!C(t)?Qr(t)?aa(e,null,[t]):aa(e,t):aa(e,null,t):(r>3?n=Array.prototype.slice.call(arguments,2):3===r&&Qr(n)&&(n=[n]),aa(e,t,n
vendor: 4,308 bytes, line 12246
12246))}(Dn,function(e){const t={};for(const n in e)n in ai||(t[n]=e[n]);if(!1===e.css)return t;const{name:n="v",type:r,duration:a,enterFromClass:i=`${n}-enter-from`,enterActiveClass:s=`${n}-enter-active`,enterToClass:o=`${n}-enter-to`,appearFromClass:l=i,appearActiveClass:u=s,appearToClass:d=o,leaveFromClass:c=`${n}-leave-from`,leaveActiveClass:_=`${n}-leave-active`,leaveToClass:m=`${n}-leave-to`}=e,f=function(e){if(null==e)return null;if(q(e))return[oi(e.enter),oi(e.leave)];{const t=oi(e);return[t,t]}}(a),h=f&&f[0],p=f&&f[1],{onBeforeEnter:y,onEnter:v,onEnterCancelled:g,onLeave:M,onLeaveCancelled:L,onBeforeAppear:b=y,onAppear:Y=v,onAppearCancelled:k=g}=t,w=(e,t,n)=>{ui(e,t?d:o),ui(e,t?u:s),n&&n()},D=(e,t)=>{e._isLeaving=!1,ui(e,c),ui(e,m),ui(e,_),t&&t()},T=e=>(t,n)=>{const a=e?Y:v,s=()=>w(t,e,n);ii(a,[t,s]),di((()=>{ui(t,e?l:i),li(t,e?d:o),si(a)||_i(t,r,h,s)}))};return E(t,{onBeforeEnter(e){ii(y,[e]),li(e,i),li(e,s)},onBeforeAppear(e){ii(b,[e]),li(e,l),li(e,u)},onEnter:T(!1),onAppear:T(!0),onLeave(e,t){e._isLeaving=!0;const n=()=>D(e,t);li(e,c),document.body.offsetHeight,li(e,_),di((()=>{e._isLeaving&&(ui(e,c),li(e,m),si(M)||_i(e,r,p,n))})),ii(M,[e,n])},onEnterCancelled(e){w(e,!1),ii(g,[e])},onAppearCancelled(e){w(e,!0),ii(k,[e])},onLeaveCancelled(e){D(e),ii(L,[e])}})}(e),t);ri.displayName="Transition";const ai={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},ii=(ri.props=E({},Dn.props,ai),(e,t=[])=>{C(e)?e.forEach((e=>e(...t))):e&&e(...t)}),si=e=>!!e&&(C(e)?e.some((e=>e.length>1)):e.length>1);function oi(e){return se(e)}function li(e,t){t.split(/\s+/).forEach((t=>t&&e.classList.add(t))),(e._vtc||(e._vtc=new Set)).add(t)}function ui(e,t){t.split(/\s+/).forEach((t=>t&&e.classList.remove(t)));const{_vtc:n}=e;n&&(n.delete(t),n.size||(e._vtc=void 0))}function di(e){requestAnimationFrame((()=>{requestAnimationFrame(e)}))}let ci=0;function _i(e,t,n,r){const a=e._endId=++ci,i=()=>{a===e._endId&&r()};if(n)return setTimeout(i,n);const{type:s,timeout:o,propCount:l}=function(e,t){const n=window.getComputedStyle(e),r=e=>(n[e]||"").split(", "),a=r("transitionDelay"),i=r("transitionDuration"),s=mi(a,i),o=r("animationDelay"),l=r("animationDuration"),u=mi(o,l);let d=null,c=0,_=0;return t===ti?s>0&&(d=ti,c=s,_=i.length):t===ni?u>0&&(d=ni,c=u,_=l.length):(c=Math.max(s,u),d=c>0?s>u?ti:ni:null,_=d?d===ti?i.length:l.length:0),{type:d,timeout:c,propCount:_,hasTransform:d===ti&&/\b(transform|all)(,|$)/.test(n.transitionProperty)}}(e,t);if(!s)return r();const u=s+"end";let d=0;const c=()=>{e.removeEventListener(u,_),i()},_=t=>{t.target===e&&++d>=l&&c()};setTimeout((()=>{d<l&&c()}),o+1),e.addEventListener(u,_)}function mi(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map(((t,n)=>fi(t)+fi(e[n]))))}function fi(e){return 1e3*Number(e.slice(0,-1).replace(",","."))}new WeakMap,new WeakMap;const hi=e=>{const t=e.props["onUpdate:modelValue"]||!1;return C(t)?e=>ae(t,e):t};function pi(e){e.target.composing=!0}function yi(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const vi={created(e,{modifiers:{lazy:t,trim:n,number:r}},a){e._assign=hi(a);const i=r||a.props&&"number"===a.props.type;Qa(e,t?"change":"input",(t=>{if(t.target.composing)return;let r=e.value;n&&(r=r.trim()),i&&(r=se(r)),e._assign(r)})),n&&Qa(e,"change",(()=>{e.value=e.value.trim()})),t||(Qa(e,"compositionstart",pi),Qa(e,"compositionend",yi),Qa(e,"change",yi))},mounted(e,{value:t}){e.value=null==t?"":t},beforeUpdate(e,{value:t,modifiers:{lazy:n,trim:r,number:a}},i){if(e._assign=hi(i),e.composing)return;if(document.activeElement===e&&"range"!==e.type){if(n)return;if(r&&e.value.trim()===t)return;if((a||"number"===e.type)&&se(e.value)===t)return}const s=null==t?"":t;e.value!==s&&(e.value=s)}},gi=["ctrl","shift","alt","meta"],Mi={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&0!==e.button,middle:e=>"button"in e&&1!==e.button,right:e=>"button"in e&&2!==e.button,exact:(e,t)=>
12246gi.some((n=>e[`${n}Key`]&&!t.includes(n)))},Li=(e,t)=>(n,...r)=>{for(let e=0;e<t.length;e++){const r=Mi[t[e]];if(r&&r(n,t))return}return e(n,...r)},bi=E({patchProp:(e,t,n,r,a=!1,i,s,o,l)=>{"class"===t?function(e,t,n){const r=e._vtc;r&&(t=(t?[t,...r]:[...r]).join(" ")),null==t?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}(e,r,a):"style"===t?function(e,t,n){const r=e.style,a=z(n);if(n&&!a){for(const e in n)qa(r,e,n[e]);if(t&&!z(t))for(const e in t)null==n[e]&&qa(r,e,"")}else{const i=r.display;a?t!==n&&(r.cssText=n):t&&e.removeAttribute("style"),"_vod"in e&&(r.display=i)}}(e,n,r):H(t)?O(t)||function(e,t,n,r,a=null){const i=e._vei||(e._vei={}),s=i[t];if(r&&s)s.value=r;else{const[n,o]=function(e){let t;if(Xa.test(e)){let n;for(t={};n=e.match(Xa);)e=e.slice(0,e.length-n[0].length),t[n[0].toLowerCase()]=!0}return[":"===e[2]?e.slice(3):ee(e.slice(2)),t]}(t);if(r){const s=i[t]=function(e,t){const n=e=>{const r=e.timeStamp||Va();($a||r>=n.attached-1)&&zt(function(e,t){if(C(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map((e=>t=>!t._stopped&&e&&e(t)))}return t}(e,n.value),t,5,[e])};return n.value=e,n.attached=Ga||(Ka.then(Za),Ga=Va()),n}(r,a);Qa(e,n,s,o)}else s&&(function(e,t,n,r){e.removeEventListener(t,n,r)}(e,n,s,o),i[t]=void 0)}}(e,t,0,r,s):("."===t[0]?(t=t.slice(1),1):"^"===t[0]?(t=t.slice(1),0):function(e,t,n,r){return r?"innerHTML"===t||"textContent"===t||!!(t in e&&ei.test(t)&&R(n)):"spellcheck"!==t&&"draggable"!==t&&"translate"!==t&&("form"!==t&&(("list"!==t||"INPUT"!==e.tagName)&&(("type"!==t||"TEXTAREA"!==e.tagName)&&((!ei.test(t)||!z(n))&&t in e))))}(e,t,r,a))?function(e,t,n,r,a,i,s){if("innerHTML"===t||"textContent"===t)return r&&s(r,a,i),void(e[t]=null==n?"":n);if("value"===t&&"PROGRESS"!==e.tagName&&!e.tagName.includes("-")){e._value=n;const r=null==n?"":n;return e.value===r&&"OPTION"!==e.tagName||(e.value=r),void(null==n&&e.removeAttribute(t))}let o=!1;if(""===n||null==n){const r=typeof e[t];"boolean"===r?n=v(n):null==n&&"string"===r?(n="",o=!0):"number"===r&&(n=0,o=!0)}try{e[t]=n}catch(e){}o&&e.removeAttribute(t)}(e,t,r,i,s,o,l):("true-value"===t?e._trueValue=r:"false-value"===t&&(e._falseValue=r),function(e,t,n,r,a){if(r&&t.startsWith("xlink:"))null==n?e.removeAttributeNS(Ja,t.slice(6,t.length)):e.setAttributeNS(Ja,t,n);else{const r=y(t);null==n||r&&!v(n)?e.removeAttribute(t):e.setAttribute(t,r?"":n)}}(e,t,r,a))}},za);let Yi;const ki=(...e)=>{const t=(Yi||(Yi=Cr(bi))).createApp(...e),{mount:n}=t;return t.mount=e=>{const r=function(e){if(z(e))return document.querySelector(e);return e}(e);if(!r)return;const a=t._component;R(a)||a.render||a.template||(a.template=r.innerHTML),r.innerHTML="";const i=n(r,!1,r instanceof SVGElement);return r instanceof Element&&(r.removeAttribute("v-cloak"),r.setAttribute("data-v-app","")),i},t};var wi,Di={class:"o-input-selector__control"},Ti=["for"],Si=["id","placeholder","disabled","aria-label","aria-required","aria-invalid","aria-describedby","aria-expanded","aria-controls"],ji={key:0,class:"o-input-selector__control__spinner o-spinner",role:"status","aria-live":"polite","aria-label":"Suche läuft"},xi=[ra("span",null,null,-1),ra("span",null,null,-1),ra("span",null,null,-1),ra("span",null,null,-1)],Hi=[ra("img",{src:"/typo3conf/ext/sitepackage/Resources/Public/Images/ContentElements/efa-searchform/icon-close.svg",class:"o-input-selector__control__reset__img",alt:""},null,-1)],Oi={key:0,class:"o-input-selector__suggestions"},Ei={class:"o-input-selector__suggestions__container"},Pi=["id","aria-label"],Ai=["onClick"],Fi={class:"o-input-selector__suggestions__btn__icon"},Ci={class:"o-input-selector__suggestions__btn__text"},Ii=n(6486),Wi={endpoint:"https://efa.vagfr.de/rvf3/XSLT_STOPFINDER_REQUEST",uriParams:{coordOutputFormat:"WGS84%5Bdd.ddddd%5D",outputFormat:"JSON",type_sf:"any",std3_suggestMacro:"std3_suggest"},get:function(e){Wi.uriParams.name_sf=e;var t=Wi.endpoint+"?"+new URLSearchParams(Wi.uriParams).toString();return new Promise((function(e,n){fetch(t).then((function(e){return e.json()})).then((function(t){e(t)}
12246)).catch((function(e){n(e)}))}))}},Ri=Wi;Object.defineProperty,Object.defineProperties,Object.getOwnPropertyDescriptors,Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable;const zi="undefined"!=typeof window,Ni=(Object.prototype.toString,e=>"function"==typeof e),qi=()=>{};function Ui(e){return"function"==typeof e?e():Ot(e)}function Bi(e,t=!1,n="Timeout"){return new Promise(((r,a)=>{t?setTimeout((()=>a(n)),e):setTimeout(r,e)}))}function Ji(){const e=[],t=t=>{const n=e.indexOf(t);-1!==n&&e.splice(n,1)};return{on:n=>(e.push(n),{off:()=>t(n)}),off:t,trigger:t=>{e.forEach((e=>e(t)))}}}function Vi(e){return!!le&&(function(e){le&&le.cleanups.push(e)}(e),!0)}function $i(e){return"function"==typeof e?Ya(e):St(e)}function Gi(e){var t;const n=Ui(e);return null!=(t=null==n?void 0:n.$el)?t:n}zi&&(null==(wi=null==window?void 0:window.navigator)?void 0:wi.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent),Object.defineProperty,Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable,Object.defineProperty,Object.defineProperties,Object.getOwnPropertyDescriptors,Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable,Object.defineProperty,Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable,Object.defineProperty,Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable,Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable,Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable,Object.defineProperty,Object.defineProperties,Object.getOwnPropertyDescriptors,Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable,Object.defineProperty,Object.defineProperties,Object.getOwnPropertyDescriptors,Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable,Object.defineProperty,Object.defineProperties,Object.getOwnPropertyDescriptors,Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable,Object.defineProperty,Object.defineProperties,Object.getOwnPropertyDescriptors,Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable,Object.defineProperty,Object.defineProperties,Object.getOwnPropertyDescriptors,Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable;const Ki=zi?window:void 0;function Zi(...e){let t,n,r,a;if("string"==typeof e[0]?([n,r,a]=e,t=Ki):[t,n,r,a]=e,!t)return qi;let i=qi;const s=Mn((()=>Gi(t)),(e=>{i(),e&&(e.addEventListener(n,r,a),i=()=>{e.removeEventListener(n,r,a),i=qi})}),{immediate:!0,flush:"post"}),o=()=>{s(),i()};return Vi(o),o}function Qi(e,t,n={}){const{window:r=Ki,ignore:a,capture:i=!0,detectIframe:s=!1}=n;if(!r)return;const o=St(!0);let l;const u=n=>{r.clearTimeout(l);const i=Gi(e),s=n.composedPath();i&&i!==n.target&&!s.includes(i)&&o.value&&(a&&a.length>0&&a.some((e=>{const t=Gi(e);return t&&(n.target===t||s.includes(t))}))||t(n))},d=[Zi(r,"click",u,{passive:!0,capture:i}),Zi(r,"pointerdown",(t=>{const n=Gi(e);o.value=!!n&&!t.composedPath().includes(n)}),{passive:!0}),Zi(r,"pointerup",(e=>{if(0===e.button){const t=e.composedPath();e.composedPath=()=>t,l=r.setTimeout((()=>u(e)),50)}}),{passive:!0}),s&&Zi(r,"blur",(n=>{var r;const a=Gi(e);"IFRAME"!==(null==(r=document.activeElement)?void 0:r.tagName)||(null==a?void 0:a.contains(document.activeElement))||t(n)}))].filter(Boolean);return()=>d.forEach((e=>e()))}function Xi(e={}){const{window:t=Ki}=e,n=function(e,t){let n,r,a;const i=St(!0),s=()=>{i.value=!0,a()};Mn(e,s,{flush:"sync"});const o=Ni(t)?t:t.get,l=Ni(t)?void 0:t.set,u=new At(((e,t)=>(r=e,a=t,{get(){return i.value&&(n=o(),i.value=!1),r(),n},set(e){null==l||l(e)}})));return Object.isExtensible(u)&&(u.trigger=s),u}((()=>null),(()=>null==t?void 0:t.document.activeElement));return t&&(Zi(t,"blur",n.trigger,!0),Zi(t,"focus",n.trigger,!0)),n}zi&&window.document,zi&&window.navigator,zi&&window.location,Object.defineProperty,Object.defineProperties,Object.getOwnPropertyDescriptors,Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable,Object.defineProperty,Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable,Object.defineProperty,Object.defineProperties,Object.getOwnPropertyDescriptors,Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable;const es="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},ts="__vueuse_ssr_handlers__";es[ts]=es[ts]||{},es[ts],Object.defineProperty,Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable,Object.defineProperty,Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable,Object.defineProperty,Object.defineProperties,Object.getOwnPropertyDescriptors,Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable,Object.defineProperty,Object.defineProperties,Object.getOwnPropertyDescriptors,Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable,Object.defineProperty,Object.defineProperties,Object.getOwnPropertyDescriptors,Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable,Object.defineProperty,Object.defineProperties,Object.getOwnPropertyDescriptors,Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable,Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable,Object.defineProperty,Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable,new Map;var ns=Object.defineProperty,rs=Object.defineProperties,as=Object.getOwnPropertyDescriptors,is=Object.getOwnPropertySymbols,ss=Object.prototype.hasOwnProperty,os=Object.prototype.propertyIsEnumerable,ls=(e,t,n)=>t in e?ns(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,us=(e,t)=>{for(var n in t||(t={}
12246))ss.call(t,n)&&ls(e,n,t[n]);if(is)for(var n of is(t))os.call(t,n)&&ls(e,n,t[n]);return e},ds=(e,t)=>rs(e,as(t));const cs={json:"application/json",text:"text/plain",formData:"multipart/form-data"};function _s(e){return function(e,...t){return["immediate","refetch","initialData","timeout","beforeFetch","afterFetch","onFetchError","fetch"].some((t=>t in e))}(e)}function ms(e){return"undefined"!=typeof Headers&&e instanceof Headers?Object.fromEntries([...e.entries()]):e}function fs(e,...t){var n;const r="function"==typeof AbortController;let a={},i={immediate:!0,refetch:!1,timeout:0};const s={method:"GET",type:"text",payload:void 0};t.length>0&&(_s(t[0])?i=us(us({},i),t[0]):a=t[0]),t.length>1&&_s(t[1])&&(i=us(us({},i),t[1]));const{fetch:o=(null==(n=Ki)?void 0:n.fetch),initialData:l,timeout:u}=i,d=Ji(),c=Ji(),_=Ji(),m=St(!1),f=St(!1),h=St(!1),p=St(null),y=jt(null),v=jt(null),g=jt(l),M=Ya((()=>r&&f.value));let L,b;const Y=()=>{r&&L&&L.abort()},k=e=>{f.value=e,m.value=!e};u&&(b=function(e,t,n={}){const{immediate:r=!0}=n,a=St(!1);let i=null;function s(){i&&(clearTimeout(i),i=null)}function o(){a.value=!1,s()}function l(...n){s(),a.value=!0,i=setTimeout((()=>{a.value=!1,i=null,e(...n)}),Ui(t))}return r&&(a.value=!0,zi&&l()),Vi(o),{isPending:a,start:l,stop:o}}(Y,u,{immediate:!1}));const w=async(t=!1)=>{var n;k(!0),v.value=null,p.value=null,h.value=!1,L=void 0,r&&(L=new AbortController,L.signal.onabort=()=>h.value=!0,a=ds(us({},a),{signal:L.signal}));const l={method:s.method,headers:{}};if(s.payload){const e=ms(l.headers);s.payloadType&&(e["Content-Type"]=null!=(n=cs[s.payloadType])?n:s.payloadType);const t=Ui(s.payload);l.body="json"===s.payloadType?JSON.stringify(t):t}let u=!1;const m={url:Ui(e),options:us(us({},l),a),cancel:()=>{u=!0}};if(i.beforeFetch&&Object.assign(m,await i.beforeFetch(m)),u||!o)return k(!1),Promise.resolve(null);let f=null;return b&&b.start(),new Promise(((e,n)=>{var r;o(m.url,ds(us(us({},l),m.options),{headers:us(us({},ms(l.headers)),ms(null==(r=m.options)?void 0:r.headers))})).then((async t=>{if(y.value=t,p.value=t.status,f=await t[s.type](),i.afterFetch&&p.value>=200&&p.value<300&&({data:f}=await i.afterFetch({data:f,response:t})),g.value=f,!t.ok)throw new Error(t.statusText);return d.trigger(t),e(t)})).catch((async r=>{let a=r.message||r.name;return i.onFetchError&&({data:f,error:a}=await i.onFetchError({data:f,error:r,response:y.value})),g.value=f,v.value=a,c.trigger(r),t?n(r):e(null)})).finally((()=>{k(!1),b&&b.stop(),_.trigger(null)}))}))},D=$i(i.refetch);Mn([D,$i(e)],(([e])=>e&&w()),{deep:!0});const T={isFinished:m,statusCode:p,response:y,error:v,data:g,isFetching:f,canAbort:M,aborted:h,abort:Y,execute:w,onFetchResponse:d.on,onFetchError:c.on,onFetchFinally:_.on,get:S("GET"),put:S("PUT"),post:S("POST"),delete:S("DELETE"),patch:S("PATCH"),head:S("HEAD"),options:S("OPTIONS"),json:x("json"),text:x("text"),blob:x("blob"),arrayBuffer:x("arrayBuffer"),formData:x("formData")};function S(e){return(t,n)=>{if(!f.value){s.method=e,s.payload=t,s.payloadType=n,Tt(s.payload)&&Mn([D,$i(s.payload)],(([e])=>e&&w()),{deep:!0});const r=Ui(s.payload);return!n&&r&&Object.getPrototypeOf(r)===Object.prototype&&(s.payloadType="json"),ds(us({},T),{then(e,t){return j().then(e,t)}})}}}function j(){return new Promise(((e,t)=>{(function(e){let t=!1;function n(n,{flush:r="sync",deep:a=!1,timeout:i,throwOnTimeout:s}={}){let o=null;const l=new Promise((i=>{o=Mn(e,(e=>{n(e)!==t&&(null==o||o(),i(e))}),{flush:r,deep:a,immediate:!0})})),u=[l];return null!=i&&u.push(Bi(i,s).then((()=>Ui(e))).finally((()=>null==o?void 0:o()))),Promise.race(u)}function r(r,a){if(!Tt(r))return n((e=>e===r),a);const{flush:i="sync",deep:s=!1,timeout:o,throwOnTimeout:l}=null!=a?a:{};let u=null;const d=new Promise((n=>{u=Mn([e,r],(([e,r])=>{t!==(e===r)&&(null==u||u(),n(e))}),{flush:i,deep:s,immediate:!0})})),c=[d];return null!=o&&c.push(Bi(o,l).then((()=>Ui(e))).finally((()=>(null==u||u(),Ui(e))))),Promise.race(c)}function a(e){return i(1,e)}function i(e=1,t){let r=-1;return n((()=>(r+=1,r>=e)),t)}return Array.isArray(Ui(e))?{toMatch:n,toContains:function(e,t){return n((t=>{const n=Array.from(t);return n.includes(e)||n.includes(Ui(e))}),t)},changed:a,changedTimes:i,get not(){return t=!t,this}}:{toMatch:n,toBe:r,toBeTruthy:function(e){return n((e=>Boolean(e)),e)},toBeNull:function(e){return r(null,e)},toBeNaN:function(e){return n(Number.isNaN,e)},toBeUndefined:function(e){return r(void 0,e)},changed:a,changedTimes:i,get not(){return t=!t,this}}})(m).toBe(!0).then((()=>e(T))).catch((e=>t(e)))}))}function x(e){return()=>{if(!f.value)return s.type=e,ds(us({},T),{then(e,t){return j().then(e,t)}})}}return i.immediate&&setTimeout(w,0),ds(us({},T),{then(e,t){return j().then(e,t)}})}var hs,ps;Object.defineProperty,Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable,Object.defineProperty,Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable,Object.defineProperty,Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable,Object.defineProperty,Object.defineProperties,Object.getOwnPropertyDescriptors,Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable,Object.defineProperty,Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable,Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable,Object.defineProperty,Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable,Object.defineProperty,Object.defineProperties,Object.getOwnPropertyDescriptors,Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable,(ps=hs||(hs={})).UP="UP",ps.RIGHT="RIGHT",ps.DOWN="DOWN",ps.LEFT="LEFT",ps.NONE="NONE",Object.defineProperty,Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable,Object.defineProperty,Object.defineProperties,Object.getOwnPropertyDescriptors,Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable,Object.defineProperty,Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable,Object.defineProperty,Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable;var ys=Object.defineProperty,vs=Object.getOwnPropertySymbols,gs=Object.prototype.hasOwnProperty,Ms=Object.prototype.propertyIsEnumerable,Ls=(e,t,n)=>t in e?ys(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;((e,t)=>
12246{for(var n in t||(t={}))gs.call(t,n)&&Ls(e,n,t[n]);if(vs)for(var n of vs(t))Ms.call(t,n)&&Ls(e,n,t[n])})({linear:function(e){return e}},{easeInSine:[.12,0,.39,0],easeOutSine:[.61,1,.88,1],easeInOutSine:[.37,0,.63,1],easeInQuad:[.11,0,.5,0],easeOutQuad:[.5,1,.89,1],easeInOutQuad:[.45,0,.55,1],easeInCubic:[.32,0,.67,0],easeOutCubic:[.33,1,.68,1],easeInOutCubic:[.65,0,.35,1],easeInQuart:[.5,0,.75,0],easeOutQuart:[.25,1,.5,1],easeInOutQuart:[.76,0,.24,1],easeInQuint:[.64,0,.78,0],easeOutQuint:[.22,1,.36,1],easeInOutQuint:[.83,0,.17,1],easeInExpo:[.7,0,.84,0],easeOutExpo:[.16,1,.3,1],easeInOutExpo:[.87,0,.13,1],easeInCirc:[.55,0,1,.45],easeOutCirc:[0,.55,.45,1],easeInOutCirc:[.85,0,.15,1],easeInBack:[.36,0,.66,-.56],easeOutBack:[.34,1.56,.64,1],easeInOutBack:[.68,-.6,.32,1.6]});var bs=En({components:{},props:{label:{type:String,required:!1,default:""},placeholder:{type:String,required:!1,default:""},ariaLabel:{type:String,required:!1,default:""},ariaRequired:{type:Boolean,required:!1,default:!1},ariaDescribedby:{type:String,required:!1,default:""}},emits:["set","unset"],setup:function(e,t){var n=t.emit,r=St(null),a=St(!1),i=St(!1),s=St(""),o=St(null),l=St([]),u=Ya((function(){return"input-selector-".concat(Math.random().toString(36).slice(2,11))})),d=Ya((function(){return"suggestions-".concat(u.value)})),c=Ya((function(){return l.value})),_=Ya((function(){return(0,Ii.debounce)(m,300)})),m=function(e){var t=e.target.value;h(t)},f=function(){o.value=null,l.value=[],s.value="",i.value=!1,n("unset")},h=function(){var e=Fa(Ia().mark((function e(t){var n,r;return Ia().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(t.length>1)){e.next=9;break}return a.value=!0,e.next=4,Ri.get(t);case 4:(n=e.sent).stopFinder.points?(i.value=!1,r=n.stopFinder.points,Array.isArray(r)||(r=r.point?[r.point]:[]),l.value=r):(i.value=!0,l.value=[]),a.value=!1,e.next=10;break;case 9:1===t.length?(l.value=[],i.value=!1):f();case 10:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();return Qi(r,(function(){c.value.length>0&&f()})),{isPendingState:a,isErrorState:i,value:s,selectedPoint:o,handleSelect:function(e){s.value=e.name,o.value=e,l.value=[],n("set",e)},handleInputDebounced:_,handleKeyboardReset:function(e){"Space"!==e.key&&" "!==e.key&&"Enter"!==e.key||(e.preventDefault(),f())},reset:f,suggestions:c,container:r,inputId:u,suggestionsId:d}}}),Ys=n(3744);const ks=(0,Ys.Z)(bs,[["render",function(e,t,n,r,a,i){return Jr(),Kr("div",{ref:"container",class:Y(["o-input-selector",{"o-input-selector--error":e.isErrorState}])},[ra("div",Di,[ra("label",{for:e.inputId,class:"o-input-selector__label"},k(e.label),9,Ti),Qn(ra("input",{id:e.inputId,"onUpdate:modelValue":t[0]||(t[0]=function(t){return e.value=t}),type:"text",class:"o-input-selector__input",placeholder:e.placeholder,disabled:e.selectedPoint,"aria-label":e.ariaLabel||e.label,"aria-required":e.ariaRequired,"aria-invalid":e.isErrorState,"aria-describedby":e.ariaDescribedby,role:"combobox","aria-expanded":e.suggestions.length>0,"aria-autocomplete":"list","aria-controls":e.suggestionsId,onInput:t[1]||(t[1]=function(){return e.handleInputDebounced&&e.handleInputDebounced.apply(e,arguments)})},null,40,Si),[[vi,e.value]]),e.isPendingState?(Jr(),Kr("div",ji,xi)):oa("",!0),e.selectedPoint?(Jr(),Kr("button",{key:1,class:"o-input-selector__control__reset",type:"button",tabindex:"0","aria-label":"Feld löschen",onKeypress:t[2]||(t[2]=function(){return e.handleKeyboardReset&&e.handleKeyboardReset.apply(e,arguments)}),onClick:t[3]||(t[3]=function(){return e.reset&&e.reset.apply(e,arguments)})}
12246,Hi,32)):oa("",!0)]),aa(ri,{name:"o-transition-slide-top"},{default:mn((function(){return[e.suggestions.length?(Jr(),Kr("div",Oi,[ra("div",Ei,[ra("ul",{id:e.suggestionsId,class:"o-input-selector__suggestions__list",role:"listbox","aria-label":"".concat(e.suggestions.length," Vorschläge verfügbar")},[(Jr(!0),Kr(Rr,null,ar(e.suggestions,(function(t){return Jr(),Kr("li",{key:t.stateless,class:"o-input-selector__suggestions__item",role:"option"},[ra("button",{class:"o-input-selector__suggestions__btn",type:"button",onClick:function(n){return e.handleSelect(t)}},[ra("span",Fi,[ra("span",{class:Y("o-icon o-icon--reftype-"+t.anyType),"aria-hidden":"true"},null,2)]),ra("span",Ci,k(t.name),1)],8,Ai)])})),128))],8,Pi)])])):oa("",!0)]})),_:1})],2)}]]);var ws=ks,Ds=n(381),Ts=n.n(Ds),Ss={class:"o-field"},js={class:"o-field__control"},xs=["for"],Hs=["id","value","min","max"],Os=n(4319),Es=En({props:{label:{type:String,required:!1,default:"",readonly:!0}},emits:["set","unset"],setup:function(e,t){var n=t.emit,r=St(null),a=St(Ts()()),i=Ts()().startOf("day"),s=Ts()().add(6,"months"),o=Ya((function(){return"date-input-".concat(Math.random().toString(36).slice(2,11))})),l=function(e){a.value=e,a.value&&a.value.isValid()?n("set",a.value):n("unset")};return qn((function(){if(r.value instanceof HTMLElement)var e=new Os({firstDay:1,i18n:{previousMonth:"Voriger Monat",nextMonth:"Nächster Monat",months:["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"],weekdays:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"],weekdaysShort:["So","Mo","Di","Mi","Do","Fr","Sa"]},field:r.value,numberOfMonths:2,format:"DD.MM.YYYY",minDate:i.toDate(),maxDate:s.toDate(),onSelect:function(){return function(e){l(e)}(e.getMoment())}})})),{desktopInput:r,selectedDate:a,handleNativeChange:function(e){var t=e.target;if(t instanceof HTMLInputElement){var n=Ts()(t.value);n.isValid()?l(n):l(null)}},handlePickerChange:function(e){var t=e.target;t instanceof HTMLInputElement&&""===t.value&&l(null)},minDate:i,maxDate:s,inputId:o}}});const Ps=(0,Ys.Z)(Es,[["render",function(e,t,n,r,a,i){return Jr(),Kr("div",Ss,[ra("div",js,[ra("label",{for:e.inputId,class:"o-field__label"},k(e.label),9,xs),ra("input",{id:e.inputId,class:"o-field__input o-field__input--date","aria-label":"Datum eingeben oder auswählen",value:e.selectedDate?e.selectedDate.format("YYYY-MM-DD"):"",type:"date",min:e.minDate.format("YYYY-MM-DD"),max:e.maxDate.format("YYYY-MM-DD"),onChange:t[0]||(t[0]=function(){return e.handleNativeChange&&e.handleNativeChange.apply(e,arguments)})},null,40,Hs)])])}]]);var As=Ps,Fs={class:"o-field"},Cs={class:"o-field__control"},Is=["for"],Ws=["id","pattern","value"],Rs=En({props:{},emits:["set","unset"],setup:function(e,t){var n=t.emit,r=new RegExp(/[0-9]{2}:[0-9]{2}/),a=Ts()(),i=Ya((function(){return"date-input-".concat(Math.random().toString(36).slice(2,11))}));return{pattern:r,selectedTime:a,handleSelect:function(e){var t=e.target.value;r.test(t)?n("set",t):n("unset")},inputId:i}}});const zs=(0,Ys.Z)(Rs,[["render",function(e,t,n,r,a,i){return Jr(),Kr("div",Fs,[ra("div",Cs,[ra("label",{for:e.inputId,class:"o-field__label"},"Zeit",8,Is),ra("input",{id:e.inputId,class:"o-field__input o-field__input o-field__input o-field__input--force-native-ui","aria-label":"Uhrzeit eingeben oder auswählen",type:"time",pattern:e.pattern,value:e.selectedTime.format("HH:mm"),onChange:t[0]||(t[0]=function(){return e.handleSelect&&e.handleSelect.apply(e,arguments)})},null,40,Ws)])])}]]);var Ns=zs,qs={class:"o-field o-field--option-switch"},Us={class:"o-field__control"},Bs={class:"o-option-switch"},Js={class:"o-option-switch__natives visually-hidden"},Vs=["for"],$s=["id","value","checked"],Gs={class:"o-option-switch__options"},Ks=["onClick","onKeypress"],Zs=En({emits:["set"],setup:function(e,t){var n=t.emit,r=[{label:"Ab",value:"dep"},{label:"An",value:"arr"}],a=St("dep"),i=Ya((function(){return r.find((function(e){return e.value===a.value}))||null}));return{options:r,handleClick:function(e){a.value=e.value,n("set",e.value)},handleNativeChange:function(e){a.value=e.target.value},selectedOption:i,handleKeyboardSelection:function(e,t){"Space"!==t.key&&" "!==t.key&&"Enter"!==t.key||(t.preventDefault(),a.value=e.value)}}}});const Qs=(0,Ys.Z)(Zs,[["render",function(e,t,n,r,a,i){return Jr(),Kr("div",qs,[ra("div",Us,[ra("div",Bs,[ra("div",Js,[(Jr(!0),Kr(Rr,null,ar(e.options,
12246(function(n,r){return Jr(),Kr("div",{key:r},[ra("label",{for:"option-"+n.value},k(n.label),9,Vs),ra("input",{id:"option-"+n.value,type:"radio",name:"type",value:n.value,checked:e.selectedOption.value===n.value,onChange:t[0]||(t[0]=function(){return e.handleNativeChange&&e.handleNativeChange.apply(e,arguments)})},null,40,$s)])})),128))]),ra("div",Gs,[(Jr(!0),Kr(Rr,null,ar(e.options,(function(t){return Jr(),Kr("div",{key:t.value,class:Y(["o-option-switch__options__option",{"o-option-switch__options__option--active":t.value===e.selectedOption.value}]),tabindex:"0",onClick:function(n){return e.handleClick(t)},onKeypress:function(n){return e.handleKeyboardSelection(t,n)}},k(t.label),43,Ks)})),128))])])])])}]]);var Xs=Qs,eo={RECENT_SEARCH_STORAGE_IDENTIFIER:"mentz_efa_recent_search",RECENT_SEARCH_MAX_NUM:3,get:function(){var e=l(eo.RECENT_SEARCH_STORAGE_IDENTIFIER);if(e){var t=JSON.parse(e);if(t.length)return(t=Ii.orderBy(t,(function(e){return e.date}),["desc"])).length>eo.RECENT_SEARCH_MAX_NUM&&t.splice(eo.RECENT_SEARCH_MAX_NUM,t.length-eo.RECENT_SEARCH_MAX_NUM),t}return[]},add:function(e){var t=eo.get(),n=t.findIndex((function(t){return t.origin.id===e.origin.id&&t.destination.id===e.destination.id}));n>-1&&t.splice(n,1),t.push(e),(t=Ii.orderBy(t,(function(e){return e.date}),["desc"])).length>eo.RECENT_SEARCH_MAX_NUM&&t.splice(eo.RECENT_SEARCH_MAX_NUM,t.length-eo.RECENT_SEARCH_MAX_NUM),o(eo.RECENT_SEARCH_STORAGE_IDENTIFIER,JSON.stringify(t))}},to=eo,no={ref:"container",class:"c-efa-search__recent-searches c-recent-search"},ro=[ra("span",{class:"c-recent-search__toggle__icon o-icon o-icon--recent-search"},null,-1),ra("span",{class:"c-recent-search__toggle__label"},"Letzte Suchen",-1)],ao={key:0,class:"c-recent-search__layer"},io={class:"c-recent-search__layer__container"},so=["onClick"],oo={class:"c-recent-search__item__type"},lo={key:0,class:"c-recent-search__item__type__badge"},uo={key:1,class:"c-recent-search__item__type__badge"},co={class:"c-recent-search__item__route"},_o={class:"c-recent-search__item__stop"},mo={class:"c-recent-search__item__stop__label"},fo=ra("span",{class:"c-recent-search__item__stop__divider"},[ra("span",{class:"c-recent-search__item__stop__divider__icon o-icon o-icon--arrow-down"})],-1),ho={class:"c-recent-search__item__stop"},po={class:"c-recent-search__item__stop__label"},yo=ra("span",{class:"c-recent-search__item__action o-icon o-icon--chevron-right"},null,-1),vo=En({props:{recentSearchItems:{type:Array,default:function(){return[]}}},emits:["select"],setup:function(){var e=St(!1),t=St(null);return Qi(t,(function(){e.value&&(e.value=!1)})),{isOpen:e,container:t}}}),go=En({components:{RecentSearch:(0,Ys.Z)(vo,[["render",function(e,t,n,r,a,i){return Jr(),Kr("div",no,[ra("button",{class:Y(["c-recent-search__toggle",{"c-recent-search__toggle--active":e.isOpen}]),onClick:t[0]||(t[0]=function(t){return e.isOpen=!e.isOpen})}
12246,ro,2),aa(ri,{name:"o-transition-slide-top"},{default:mn((function(){return[e.isOpen?(Jr(),Kr("div",ao,[ra("div",io,[(Jr(!0),Kr(Rr,null,ar(e.recentSearchItems,(function(t,n){return Jr(),Kr("button",{key:n,class:"c-recent-search__item",onClick:function(n){return e.$emit("select",t)}},[ra("span",oo,["arr"===t.type?(Jr(),Kr("span",lo,"An")):(Jr(),Kr("span",uo,"Ab"))]),ra("span",co,[ra("span",_o,[ra("span",{class:Y(["c-recent-search__item__stop__icon","o-icon o-icon--reftype-"+t.origin.type])},null,2),ra("span",mo,k(t.origin.name),1)]),fo,ra("span",ho,[ra("span",{class:Y(["c-recent-search__item__stop__icon","o-icon o-icon--reftype-"+t.destination.type])},null,2),ra("span",po,k(t.destination.name),1)])]),yo],8,so)})),128))])])):oa("",!0)]})),_:1})],512)}]]),OptionSwitch:Xs,TimeSelector:Ns,DateSelector:As,InputSelector:ws},props:{disclaimerText:{type:String,default:""},targetPage:{type:String,default:""},enableRecentSearch:{type:Boolean,default:!0}},setup:function(e){var t="mentz_efa_params",n=St({points:{origin:null,destination:null},date:Ts()(),type:"dep"}),r=Ya((function(){return null!==n.value.points.origin&&null!==n.value.points.destination})),a=Ya((function(){return to.get()})),i=function(){var n=Fa(Ia().mark((function n(r){var a,i,s;return Ia().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return r.date=Ts()().format("x"),a=Ts()(),n.next=4,to.add(r);case 4:i={name_origin:r.origin.id,name_destination:r.destination.id,itdDateDayMonthYear:a.format("DD.MM.YYYY"),itdTimeHour:a.hours().toString(),itdTimeMinute:a.minutes().toString(),itdTripDateTimeDepArr:r.type},s=c(i),o(t,s),window.location=e.targetPage?e.targetPage:"/fahrplan-netz/fahrplanauskunft/efa";case 8:case"end":return n.stop()}}),n)})));return function(e){return n.apply(this,arguments)}}(),s=function(){var e=Fa(Ia().mark((function e(t){var n;return Ia().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!t.points.origin||!t.points.destination){e.next=4;break}return n={date:Ts()().format("x"),type:t.type,origin:{name:t.points.origin.name,id:t.points.origin.stateless.toString(),type:t.points.origin.anyType},destination:{name:t.points.destination.name,id:t.points.destination.stateless.toString(),type:t.points.destination.anyType}},e.next=4,to.add(n);case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();return{handlePointSet:function(e,t){"origin"===e?n.value.points.origin=t:n.value.points.destination=t},handlePointUnset:function(e){"origin"===e?n.value.points.origin=null:n.value.points.destination=null},handleDateSet:function(e){var t=Ts().duration(n.value.date.format("HH:mm"));n.value.date=e.startOf("day").add(t.hours(),"hours").add(t.minutes(),"minutes")},handleDateUnset:function(){var e=Ts().duration(n.value.date.format("HH:mm"));n.value.date=Ts()().startOf("day").add(e.hours(),"hours").add(e.minutes(),"minutes")},handleTimeSet:function(e){var t=Ts().duration(e);n.value.date=n.value.date.startOf("day").add(t.hours(),"hours").add(t.minutes(),"minutes")},handleTimeUnset:function(){var e=Ts()();n.value.date=n.value.date.startOf("day").add(e.hours(),"hours").add(e.minutes(),"minutes")},handleTypeChange:function(e){n.value.type=e}
12246,handleClick:function(){var r={name_origin:null!==n.value.points.origin?n.value.points.origin.stateless.toString():"",name_destination:null!==n.value.points.destination?n.value.points.destination.stateless.toString():"",itdDateDayMonthYear:n.value.date.format("DD.MM.YYYY"),itdTimeHour:n.value.date.hours().toString(),itdTimeMinute:n.value.date.minutes().toString(),itdTripDateTimeDepArr:n.value.type},a=c(r);o(t,a),e.enableRecentSearch&&s(n.value),window.location=e.targetPage?e.targetPage:"/fahrplan-netz/fahrplanauskunft/efa"},isComplete:r,navigateToRecentSearch:i,recentSearchItems:a}}});const Mo=(0,Ys.Z)(go,[["render",function(e,t,n,r,a,i){var s=tr("input-selector"),o=tr("date-selector"),l=tr("time-selector"),u=tr("option-switch"),d=tr("recent-search");return Jr(),Kr(Rr,null,[ra("div",wa,[aa(s,{label:"Von",placeholder:"Start","aria-label":"Startort oder Haltestelle eingeben","aria-required":!0,onSet:t[0]||(t[0]=function(t){return e.handlePointSet("origin",t)}),onUnset:t[1]||(t[1]=function(t){return e.handlePointUnset("origin",t)})})]),ra("div",Da,[aa(s,{label:"Nach",placeholder:"Ziel","aria-label":"Zielort oder Haltestelle eingeben","aria-required":!0,onSet:t[2]||(t[2]=function(t){return e.handlePointSet("destination",t)}),onUnset:t[3]||(t[3]=function(t){return e.handlePointUnset("destination",t)})})]),ra("div",Ta,[ra("div",Sa,[aa(o,{label:"Datum",onSet:e.handleDateSet,onUnset:e.handleDateUnset},null,8,["onSet","onUnset"])]),ra("div",ja,[aa(l,{onSet:e.handleTimeSet,onUnset:e.handleTimeUnset},null,8,["onSet","onUnset"])]),ra("div",xa,[aa(u,{onSet:e.handleTypeChange},null,8,["onSet"])])]),e.enableRecentSearch&&e.recentSearchItems.length>0?(Jr(),Zr(d,{key:0,"recent-search-items":e.recentSearchItems,onSelect:e.navigateToRecentSearch},null,8,["recent-search-items","onSelect"])):oa("",!0),ra("div",Ha,[ra("button",{disabled:!e.isComplete,class:"c-efa-search__filter__field__btn btn-right",onClick:t[4]||(t[4]=function(){return e.handleClick&&e.handleClick.apply(e,arguments)})}," Suchen ",8,Oa)]),ra("div",Ea,[e.disclaimerText?(Jr(),Kr("div",Pa,[ra("p",null,k(e.disclaimerText),
122461)])):oa("",!0)])],64)}]]);var Lo=Mo,bo={key:0,class:"c-time-tables__loader"},Yo=[ra("p",null,[ra("strong",null,"Die Fahrpläne werden geladen."),ra("br"),sa("Dies kann einen kurzen Moment dauern.")],-1),ra("span",{class:"c-time-tables__loader__spinner o-spinner"},[ra("span"),ra("span"),ra("span"),ra("span")],-1)];function ko(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function wo(e){return function(e){if(Array.isArray(e))return ko(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return ko(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ko(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}let Do;const To=e=>Do=e,So=Symbol();function jo(e){return e&&"object"==typeof e&&"[object Object]"===Object.prototype.toString.call(e)&&"function"!=typeof e.toJSON}var xo;!function(e){e.direct="direct",e.patchObject="patch object",e.patchFunction="patch function"}(xo||(xo={}));const Ho="undefined"!=typeof window,Oo=(()=>"object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof global&&global.global===global?global:"object"==typeof globalThis?globalThis:{HTMLElement:null})();function Eo(e,t,n){const r=new XMLHttpRequest;r.open("GET",e),r.responseType="blob",r.onload=function(){Io(r.response,t,n)},r.onerror=function(){console.error("could not download file")},r.send()}function Po(e){const t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch(e){}return t.status>=200&&t.status<=299}function Ao(e){try{e.dispatchEvent(new MouseEvent("click"))}catch(t){const n=document.createEvent("MouseEvents");
12246n.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(n)}}const Fo="object"==typeof navigator?navigator:{userAgent:""},Co=(()=>/Macintosh/.test(Fo.userAgent)&&/AppleWebKit/.test(Fo.userAgent)&&!/Safari/.test(Fo.userAgent))(),Io=Ho?"undefined"!=typeof HTMLAnchorElement&&"download"in HTMLAnchorElement.prototype&&!Co?function(e,t="download",n){const r=document.createElement("a");r.download=t,r.rel="noopener","string"==typeof e?(r.href=e,r.origin!==location.origin?Po(r.href)?Eo(e,t,n):(r.target="_blank",Ao(r)):Ao(r)):(r.href=URL.createObjectURL(e),setTimeout((function(){URL.revokeObjectURL(r.href)}),4e4),setTimeout((function(){Ao(r)}),0))}:"msSaveOrOpenBlob"in Fo?function(e,t="download",n){if("string"==typeof e)if(Po(e))Eo(e,t,n);else{const t=document.createElement("a");t.href=e,t.target="_blank",setTimeout((function(){Ao(t)}))}else navigator.msSaveOrOpenBlob(function(e,{autoBom:t=!1}={}){return t&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob([String.fromCharCode(65279),e],{type:e.type}):e}(e,n),t)}:function(e,t,n,r){if((r=r||open("","_blank"))&&(r.document.title=r.document.body.innerText="downloading..."),"string"==typeof e)return Eo(e,t,n);const a="application/octet-stream"===e.type,i=/constructor/i.test(String(Oo.HTMLElement))||"safari"in Oo,s=/CriOS\/[\d]+/.test(navigator.userAgent);if((s||a&&i||Co)&&"undefined"!=typeof FileReader){const t=new FileReader;t.onloadend=function(){let e=t.result;if("string"!=typeof e)throw r=null,new Error("Wrong reader.result type");e=s?e:e.replace(/^data:[^;]*;/,"data:attachment/file;"),r?r.location.href=e:location.assign(e),r=null},t.readAsDataURL(e)}else{const t=URL.createObjectURL(e);r?r.location.assign(t):location.href=t,r=null,setTimeout((function(){URL.revokeObjectURL(t)}),4e4)}}:()=>{};function Wo(){const e=de(!0),t=e.run((()=>St({})));let n=[],r=[];const a=bt({install(e){To(a),a._a=e,e.provide(So,a),e.config.globalProperties.$pinia=a,r.forEach((e=>n.push(e))),r=[]},use(e){return this._a?n.push(e):r.push(e),this},_p:n,_a:null,_e:e,_s:new Map,state:t});return a}const Ro=()=>{};function zo(e,t,n,r=Ro){e.push(t);const a=()=>{const n=e.indexOf(t);n>-1&&(e.splice(n,1),r())};return!n&&ha()&&Vn(a),a}function No(e,...t){e.slice().forEach((e=>{e(...t)}))}function qo(e,t){e instanceof Map&&t instanceof Map&&t.forEach(((t,n)=>e.set(n,t))),e instanceof Set&&t instanceof Set&&t.forEach(e.add,e);for(const n in t){if(!t.hasOwnProperty(n))continue;const r=t[n],a=e[n];jo(a)&&jo(r)&&e.hasOwnProperty(n)&&!Tt(r)&&!yt(r)?e[n]=qo(a,r):e[n]=r}return e}const Uo=Symbol(),{assign:Bo}=Object;function Jo(e,t,n={},r,a,i){let s;const o=Bo({actions:{}},n),l={deep:!0};let u,d,c,_=bt([]),m=bt([]);const f=r.state.value[e];let h;function p(t){let n;u=d=!1,"function"==typeof t?(t(r.state.value[e]),n={type:xo.patchFunction,storeId:e,events:c}):(qo(r.state.value[e],t),n={type:xo.patchObject,payload:t,storeId:e,events:c});const a=h=Symbol();Qt().then((()=>{h===a&&(u=!0)})),d=!0,No(_,n,r.state.value[e])}i||f||(r.state.value[e]={}),St({});const y=Ro;function v(t,n){return function(){To(r);const a=Array.from(arguments),i=[],s=[];function o(e){i.push(e)}function l(e){s.push(e)}let u;No(m,{args:a,name:t,store:M,after:o,onError:l});try{u=n.apply(this&&this.$id===e?this:M,a)}catch(e){throw No(s,e),e}return u instanceof Promise?u.then((e=>(No(i,e),e))).catch((e=>(No(s,e),Promise.reject(e)))):(No(i,u),u)}}const g={_p:r,$id:e,$onAction:zo.bind(null,m),$patch:p,$reset:y,$subscribe(t,n={}){const a=zo(_,t,n.detached,(()=>i())),i=s.run((()=>Mn((()=>r.state.value[e]),(r=>{("sync"===n.flush?d:u)&&t({storeId:e,type:xo.direct,events:c},r)}),Bo({},l,n))));return a},$dispose:function(){s.stop(),_=[],m=[],r._s.delete(e)}},M=ft(Bo({},g));r._s.set(e,M);const L=r._e.run((()=>(s=de(),s.run((()=>t())))));for(const t in L){const n=L[t];if(Tt(n)&&(!Tt(Y=n)||!Y.effect)||yt(n))i||(!f||jo(b=n)&&b.hasOwnProperty(Uo)||(Tt(n)?n.value=f[t]:qo(n,f[t])),r.state.value[e][t]=n);else if("function"==typeof n){const e=v(t,n);L[t]=e,o.actions[t]=n}}var b,Y;return Bo(M,L),Bo(Lt(M),L),Object.defineProperty(M,"$state",{get:()=>r.state.value[e],set:e=>{p((t=>{Bo(t,e)}))}}),r._p.forEach((e=>{Bo(M,s.run((()=>e({store:M,app:r._a,pinia:r,options:o}))))}
12246)),f&&i&&n.hydrate&&n.hydrate(M.$state,f),u=!0,d=!0,M}function Vo(e,t,n){let r,a;const i="function"==typeof t;function s(e,n){const s=ha();return(e=e||s&&vn(So))&&To(e),(e=Do)._s.has(r)||(i?Jo(r,t,a,e):function(e,t,n,r){const{state:a,actions:i,getters:s}=t,o=n.state.value[e];let l;l=Jo(e,(function(){o||(n.state.value[e]=a?a():{});const t=function(e){const t=C(e)?new Array(e.length):{};for(const n in e)t[n]=Ct(e,n);return t}(n.state.value[e]);return Bo(t,i,Object.keys(s||{}).reduce(((t,r)=>(t[r]=bt(Ya((()=>{To(n);const t=n._s.get(e);return s[r].call(t,t)}))),t)),{}))}),t,n,0,!0),l.$reset=function(){const e=a?a():{};this.$patch((t=>{Bo(t,e)}))}}(r,a,e)),e._s.get(r)}return"string"==typeof e?(r=e,a=i?n:t):(a=e,r=e.id),s.$id=r,s}function $o(e){{e=Lt(e);const t={};for(const n in e){const r=e[n];(Tt(r)||yt(r))&&(t[n]=Ct(e,n))}return t}}function Go(){function e(){return(e=Fa(Ia().mark((function e(t){var n;return Ia().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch(t);case 2:return n=e.sent,e.next=5,n.json();case 5:return e.abrupt("return",e.sent);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function t(){return(t=Fa(Ia().mark((function e(t,n){var r,a;return Ia().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=new URLSearchParams(n),e.next=3,fetch(t+"&"+r);case 3:return a=e.sent,e.next=6,a.json();case 6:return e.abrupt("return",e.sent);case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}return{read:function(t){return e.apply(this,arguments)},write:function(e,n){return t.apply(this,arguments)}}}var Ko=Vo({id:"timeTable",state:function(){return{loaded:!1,endpoints:{},timeTables:[],regions:[],meansOfTransports:[],printEditions:[],timeTableBookItems:[],activeFilters:[],downloadActionLink:null,appendixFiles:[],selectedAppendixFiles:[]}},actions:{initialize:function(e,t){var n=this;return Fa(Ia().mark((function r(){var a,i;return Ia().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return n.endpoints=e,a=Go(),i=a.read,r.next=4,i(n.endpoints.timeTables);case 4:return n.timeTables=r.sent,n.downloadActionLink=t,r.next=8,i(n.endpoints.regions);case 8:return n.regions=r.sent,r.next=11,i(n.endpoints.meansOfTransports);case 11:return n.meansOfTransports=r.sent,r.next=14,i(n.endpoints.printEditions);case 14:return n.printEditions=r.sent,n.loaded=!0,r.next=18,i(n.endpoints.appendixFiles);case 18:n.appendixFiles=r.sent;case 19:case"end":return r.stop()}}),r)})))()},addToBook:function(e){this.removeFromBook(e),this.timeTableBookItems.push(e)},removeFromBook:function(e){var t=this.timeTableBookItems.findIndex((function(t){return e.uid===t.uid}));t>-1&&this.timeTableBookItems.splice(t,1)},flushBook:function(){this.timeTableBookItems=[]},addActiveFilter:function(e){var t=this.activeFilters.findIndex((function(t){return t.type===e.type}));t>-1&&this.activeFilters.splice(t,1),this.activeFilters.push(e)},removeActiveFilter:function(e){var t=this.activeFilters.findIndex((function(t){return t.type===e}));t>-1&&this.activeFilters.splice(t,1)},removeAllFilters:function(){this.activeFilters=[]}},getters:{timeTablesFiltered:function(e){if(!e.activeFilters.length)return e.timeTables;var t=e.timeTables,n=e.activeFilters.find((function(e){return"line-location"===e.type}));n&&(t=t.filter((function(e){return e.searchPath.toLowerCase().includes(n.value.toString())||e.line.toLowerCase().startsWith(n.value.toString())})));var r=e.activeFilters.find((function(e){return"region"===e.type}));r&&"number"==typeof r.value&&(t=t.filter((function(e){return!!e.regions&&e.regions.findIndex((function(e){return e===r.value}))>-1})));var a=e.activeFilters.find((function(e){return"means-of-transport"===e.type}));a&&"number"==typeof a.value&&(t=t.filter((function(e){return e.meansOfTransport===a.value})));var i=e.activeFilters.find((function(e){return"print-edition"===e.type}));return i&&"number"==typeof i.value&&(t=t.filter((function(e){return!!e.printEditions&&e.printEditions.findIndex((function(e){return e===i.value}))>-1}))),t},additionalDocumentSelectItems:function(e){var t=[];return t.push.apply(t,wo(e.appendixFiles)),e.activeFilters.forEac
12246h((function(n){if("region"===n.type){var r=e.regions.find((function(e){return e.uid===n.value}));r&&r.additionalDocuments.length&&t.push.apply(t,wo(r.additionalDocuments))}else if("print-edition"===n.type){var a=e.printEditions.find((function(e){return e.uid===n.value}));a&&a.additionalDocuments.length&&t.push.apply(t,wo(a.additionalDocuments))}else if("means-of-transport"===n.type){var i=e.meansOfTransports.find((function(e){return e.uid===n.value}));i&&i.additionalDocuments.length&&t.push.apply(t,wo(i.additionalDocuments))}})),(0,Ii.uniqBy)(t,"originalFileUid")}}}),Zo={class:"c-time-tables__list"},Qo={class:"c-time-tables__list__controls"},Xo=[ra("span",{class:"c-time-tables__list__controls__btn__label"},"alle übernehmen",-1),ra("span",{class:"c-time-tables__list__controls__btn__icon o-icon o-icon--add"},null,-1)],el={class:"c-time-tables__list__items"},tl={key:0,class:"c-time-tables__list__no-results"},nl=[ra("p",null,"Es wurden keine passenden Fahrpläne gefunden. Bitte ändern Sie Ihre Filterkriterien.",-1)],rl={class:"o-time-table__line"},al={key:0,class:"o-time-table__line__icon"},il=["src"],sl={class:"o-time-table__line__name"},ol={key:1,class:"o-time-table__line__constructionsite"},ll=[ra("span",{class:"o-time-table__line__constructionsite__icon o-icon o-icon--construction-site"},null,-1)],ul={class:"o-time-table__info"},dl={class:"o-time-table__info__description"},cl={class:"o-time-table__validities"},_l={key:0},ml={key:1},fl=ra("span",{class:"o-time-table__validities__label"},"gültig ab",-1),hl={key:2},pl=ra("span",{class:"o-time-table__validities__label"},"gültig ab",-1),yl={key:3},vl={key:4},gl={class:"o-time-table__actions"},Ml=[ra("span",{class:"o-time-table__actions__btn__label"},"entfernen",-1),ra("span",{class:"o-time-table__actions__btn__icon o-icon o-icon--remove"},null,-1)],Ll=[ra("span",{class:"o-time-table__actions__btn__label"},"hinzufügen",-1),ra("span",{class:"o-time-table__actions__btn__icon o-icon o-icon--add"},null,-1)],bl=["href","download"],Yl=[ra("span",{class:"o-time-table__actions__btn__label"},"downloaden",-1),ra("span",{class:"o-time-table__actions__btn__icon o-icon o-icon--arrow-down"},null,-1)],kl=En({props:{timeTable:{type:Object,required:!0}},setup:function(e){var t=Ko(),n=$o(t).timeTableBookItems,r=Ya((function(){if(e.timeTable.meansOfTransport){var n=t.meansOfTransports.find((function(t){return t.uid===e.timeTable.meansOfTransport}));if(n)return n}return null})),a=St(null);if(e.timeTable.validUntil){var i=Ts()().endOf("day"),s=Ts()(e.timeTable.validUntil,"X").endOf("day");a.value=s.diff(i,"days")}var o=St(!1),l=St(!0);if(e.timeTable.validFrom){var u=Ts()().startOf("day"),d=Ts()(e.timeTable.validFrom,"X").startOf("day"),c=u.diff(d,"days");c>=0&&c<=5&&(o.value=!0),c<0&&(l.value=!1)}if(e.timeTable.validUntil){var _=Ts()().endOf("day");Ts()(e.timeTable.validUntil,"X").endOf("day").diff(_,"days")<0&&(l.value=!1)}var m=Ya((function(){return n.value.findIndex((function(t){return t.uid===e.timeTable.uid}))>-1}));return{store:t,meansOfTransport:r,formatDate:function(e){return Ts()(e,"X").format("DD.MM.YY")},expiresInDays:a,formatExpiresInDays:function(e){return 0===e?"noch heute gültig":"noch ".concat(e,1===e?" Tag":" Tage")},isInBook:m,isNew:o,isValid:l}}}),wl=En({components:{TimeTableItem:(0,Ys.Z)(kl,[["render",function(e,t,n,r,a,i){return Jr(),Kr("div",{class:Y(["c-time-tables__item o-time-table",{"c-time-tables__item--invalid":!e.isValid}])},[ra("div",rl,[e.meansOfTransport?(Jr(),Kr("span",al,[e.meansOfTransport.icon?(Jr(),Kr("img",{key:0,src:e.meansOfTransport.icon.publicUrl,class:"o-time-table__line__icon__img"},null,8,il)):oa("",!0)])):oa("",!0),ra("span",sl,k(e.timeTable.line),1),e.timeTable.isConstructionSiteVersion?(Jr(),Kr("span",ol,ll)):oa("",!0)]),ra("div",ul,[ra("h3",dl,k(e.timeTable.description),1)]),ra("div",cl,[e.timeTable.validFrom&&e.timeTable.validUntil&&e.isValid?(Jr(),Kr("p",_l,k(e.formatDate(e.timeTable.validFrom))+" – "+k(e.formatDate(e.timeTable.validUntil)),1)):e.timeTable.validFrom&&e.timeTable.validUntil&&!e.isValid?(Jr(),Kr("p",ml,[fl,sa(" "+k(e.formatDate(e.timeTable.validFrom)),1)])):e.timeTable.validFrom&&!e.timeTable.validUntil?(Jr(),Kr("p",hl,[pl,sa(" "+k(e.formatDate(e.timeTable.validFrom)),1)])):!e.timeTable.validFrom&&e.timeTable.validUntil?(Jr(),Kr("p",yl," gültig bis "+k(e.formatDate(e.timeTable.validUntil)),1)):oa("",!0),null!==e.expires
12246InDays&&e.expiresInDays>=0&&e.expiresInDays<=5?(Jr(),Kr("p",vl,k(e.formatExpiresInDays(e.expiresInDays)),1)):oa("",!0)]),ra("div",gl,[e.isInBook?(Jr(),Kr("button",{key:0,class:"o-time-table__actions__btn",onClick:t[0]||(t[0]=Li((function(t){return e.store.removeFromBook(e.timeTable)}),["prevent"]))},Ml)):(Jr(),Kr("button",{key:1,class:"o-time-table__actions__btn",onClick:t[1]||(t[1]=Li((function(t){return e.store.addToBook(e.timeTable)}),["prevent"]))},Ll)),ra("a",{href:e.timeTable.document.publicUrl,download:e.timeTable.document.name,class:"o-time-table__actions__btn"},Yl,8,bl)])],2)}]])},setup:function(){var e=Ko(),t=$o(e),n=t.timeTablesFiltered,r=t.timeTableBookItems,a=Ya((function(){return n.value.length===r.value.length&&Ii.intersection(r.value.map((function(e){return e.uid})),n.value.map((function(e){return e.uid}))).length===r.value.length}));return{timeTablesFiltered:n,addAll:function(){n.value.forEach((function(t){e.addToBook(t)}))},bookIsEqualView:a}}});const Dl=(0,Ys.Z)(wl,[["render",function(e,t,n,r,a,i){var s=tr("time-table-item");return Jr(),Kr("div",Zo,[ra("div",Qo,[e.bookIsEqualView?oa("",!0):(Jr(),Kr("button",{key:0,class:"c-time-tables__list__controls__btn",onClick:t[0]||(t[0]=Li((function(){return e.addAll&&e.addAll.apply(e,arguments)}),["prevent"]))},Xo))]),ra("div",el,[(Jr(!0),Kr(Rr,null,ar(e.timeTablesFiltered,(function(e){return Jr(),Zr(s,{key:e.uid,"time-table":e},null,8,["time-table"])})),128))]),e.timeTablesFiltered.length?oa("",!0):(Jr(),Kr("div",tl,nl))])}]]);var Tl=Dl,Sl={class:"c-time-tables__filter"},jl={class:"c-time-tables__filter__row"},xl={class:"c-time-tables__filter__row c-time-tables__filter__row--dropdowns"},Hl={class:"c-time-tables__filter__col"},Ol={class:"c-time-tables__filter__col"},El={class:"c-time-tables__filter__col"},Pl={class:"c-time-tables__filter__col c-time-tables__filter__col--reset"},Al=[ra("span",{class:"c-time-tables__filter__reset__icon"},[ra("span",{class:"c-time-tables__filter__reset__icon__sign o-icon o-icon--add"})],-1),ra("span",{class:"c-time-tables__filter__reset__label"},"alle zurücksetzen",-1)],Fl={class:"c-time-tables__filter__fulltext"},Cl=["placeholder"],Il=ra("span",{class:"c-time-tables__filter__fulltext__icon o-icon o-icon--search"},null,-1),Wl=En({props:{placeholder:{type:String,default:""}},emits:["change"],setup:function(e,t){var n=t.emit,r=St(""),a=Ya((function(){return(0,Ii.debounce)(i,200)})),i=function(){var e=Fa(Ia().mark((function e(t){return Ia().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n("change",t.target.value);case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();return{handleInputDebounced:a,inputValue:r,reset:function(){r.value=""}}}});const Rl=(0,Ys.Z)(Wl,[["render",function(e,t,n,r,a,i){return Jr(),Kr("div",Fl,[Qn(ra("input",{"onUpdate:modelValue":t[0]||(t[0]=function(t){return e.inputValue=t}),type:"text",class:"c-time-tables__filter__fulltext__input",placeholder:e.placeholder,onInput:t[1]||(t[1]=Li((function(){return e.handleInputDebounced&&e.handleInputDebounced.apply(e,arguments)}),["prevent"]))},null,40,Cl),[[vi,e.inputValue]]),Il])}]]);var zl=Rl,Nl={key:0,class:"o-dropdown__control__label"},ql=["src"],Ul={key:1,class:"o-dropdown__control__label"},Bl=[ra("span",{class:"o-dropdown__control__icon__bars"},null,-1),ra("span",{class:"o-dropdown__control__icon__bars"},null,-1)],Jl={ref:"panelContainer",class:"o-dropdown__panel__container"},Vl={class:"o-dropdown__panel__options"},$l=["onClick","onKeydown"],Gl={key:0,class:"o-dropdown__panel__options__item__icon"},Kl=["src"],Zl={class:"o-dropdown__panel__options__item__label"},Ql={class:"o-dropdown__panel__options__item__name"},Xl={key:0,class:"o-dropdown__panel__options__item__subtitle"};function eu(){return{handleKeyboardSelect:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];"Space"!==e.key&&" "!==e.key&&"Enter"!==e.key||(e.preventDefault(),t.apply(void 0,wo(n)))},handleKeyboardNavigation:function(e,t){var n,r="ArrowUp"===(n=e.key)?"up":"ArrowDown"===n?"down":"ArrowRight"===n?"right":"ArrowLeft"===n?"left":null;r?(e.preventDefault(),"down"===r&&"next"in t?t.next():"up"===r&&"prev"in t&&t.prev()):"Space"!==e.key&&" "!==e.key&&"Enter"!==e.key||"select"in t&&(e.preventDefault(),t.select())},selectNext:function(e,t){var n=document.activeElement;if(e!==n&&e.contains(n)){var r=n.nextSibling;r instanceof HTMLElement&&r.focus()}else{var a=e.querySelector(t);a instanceof HTMLElement&&a.focus()}},selectPrev:function(e){var t=document.activeElement;if(e!==t&&e.contains(t)){var n=t.previousSibling;n instanceof HTMLElement&&n.focus()}}}}var tu=En({props:{firstItemLabel:{type:String,required:!1,default:null},items:{type:Object,required:!0},label:{type:String,required:!0}},emits:["select"],setup:function(e,t){var n=t.emit,r=St(null),a=St(null),i=St(null),s=St(null),o=St(!1),l=eu(),u=l.handleKeyboardSelect,d=l.handleKeyboardNavigation,c=l.selectNext,_=l.selectPrev,m=function(){s.value&&(s.value=null,o.value=!1,n("select",s.value))};return Qi(r,(function(){o.value&&(o.value=!1)})),Mn((function(){return e.items}),(function(e){s.value&&e.findIndex((function(e){return e.uid===s.value.uid}))<0&&(s.value=null)})),{container:r,handleSelection:function(e){s.value===e?m():(s.value=e,n("select",s.value),o.value=!1)},reset:m,selectedItem:s,isOpen:o,toggleState:function(){o.value=!o.value,o.value&&s.value&&Qt((function(){if(i.value instanceof HTMLElement){var e=i.value.querySelector(".o-dropdown__panel__options__item--active");if(e){var t=e.getBoundingClientRect().y-i.value.getBoundingClientRect().y-i.value.getBoundingClientRect().height/2+e.getBoundingClientRect().height/2;i.value.scrollTop=t}}}))},handleKeyboardSelect:u,handleKeyboardNavigation:d,selectNext:c,selectPrev:_,panelElement:a,panelContainer:i}}});const nu=(0,Ys.Z)(tu,[["render",function(e,t,n,r,a,i){return Jr(),Kr("div",{ref:"container",class:Y(["o-dropdown",{"o-dropdown--open":e.isOpen,"o-dropdown--selected":e.selectedItem}])},[ra("div",{class:"o-dropdown__control",tabindex:"0",onClick:t[1]||(t[1]=Li((function(){return e.toggleState&&e.toggleState.apply(e,arguments)}),["prevent"])),onKeydown:t[2]||(t[2]=function(t){return e.handleKeyboardSelect(t,e.toggleState)})},[e.selectedItem?(Jr(),Kr("span",Nl,[e.selectedItem.icon?(Jr(),Kr("img",{key:0,src:e.selectedItem.icon.publicUrl,class:"o-dropdown__control__label__icon"},null,8,ql)):oa("",!0),sa(" "+k(e.selectedItem.name),1)])):(Jr(),Kr("span",Ul,k(e.label),1)),ra("span",{class:Y(["o-dropdown__control__icon",{"o-dropdown__control__icon--reset":e.selectedItem,"o-dropdown__control__icon--open":!e.selectedItem&&e.isOpen}]),onClick:t[0]||(t[0]=Li((function(){return e.reset&&e.reset.apply(e,arguments)}),["stop"]))}
12246,Bl,2)],32),aa(ri,{name:"o-transition-slide-top"},{default:mn((function(){return[e.isOpen?(Jr(),Kr("div",{key:0,ref:"panelElement",class:"o-dropdown__panel",tabindex:"0",onKeydown:t[4]||(t[4]=function(t){return e.handleKeyboardNavigation(t,{next:e.selectNext.bind(null,e.panelElement,".o-dropdown__panel__options__item"),prev:e.selectPrev.bind(null,e.panelElement)})})},[ra("div",Jl,[ra("ul",Vl,[e.firstItemLabel?(Jr(),Kr("li",{key:0,class:Y(["o-dropdown__panel__options__item",{"o-dropdown__panel__options__item--active":!e.selectedItem}]),onClick:t[3]||(t[3]=function(){return e.reset&&e.reset.apply(e,arguments)})},k(e.firstItemLabel),3)):oa("",!0),(Jr(!0),Kr(Rr,null,ar(e.items,(function(t){return Jr(),Kr("li",{key:t.uid,class:Y(["o-dropdown__panel__options__item",{"o-dropdown__panel__options__item--active":!!e.selectedItem&&e.selectedItem.uid===t.uid}]),tabindex:"0",onClick:Li((function(n){return e.handleSelection(t)}),["prevent"]),onKeydown:function(n){return e.handleKeyboardSelect(n,e.handleSelection,[t])}},[t.icon?(Jr(),Kr("span",Gl,[ra("img",{src:t.icon.publicUrl,class:"o-dropdown__panel__options__item__icon__img"},null,8,Kl)])):oa("",!0),ra("span",Zl,[ra("span",Ql,k(t.name),1),t.subtitle?(Jr(),Kr("span",Xl,k(t.subtitle),1)):oa("",!0)])],42,$l)})),128))])],512)],544)):oa("",!0)]})),_:1})],2)}]]);var ru=nu,au=En({components:{UiDropdown:ru,FilterTextInput:zl},setup:function(){var e=Ko(),t=$o(e),n=t.activeFilters,r=t.regions,a=t.meansOfTransports,i=t.printEditions,s=St(null),o=St(null),l=St(null),u=St(null);return{handleTextFilterChange:function(t){t?e.addActiveFilter({type:"line-location",value:t.toLowerCase()}):e.removeActiveFilter("line-location")},resetAll:function(){e.removeAllFilters(),s.value&&"reset"in s.value&&s.value.reset(),o.value&&"reset"in o.value&&o.value.reset(),u.value&&"reset"in u.value&&u.value.reset(),l.value&&"reset"in l.value&&l.value.reset()},activeFilters:n,regionSelectItems:Ya((function(){return r.value})),meansOfTransportSelectItems:Ya((function(){return a.value})),printEditionSelectItems:Ya((function(){return i.value})),lineLocationFilterComponent:s,regionSelectFilterComponent:o,meansOfTransportSelectFilterComponent:u,printEditionSelectFilterComponent:l,handleDropdownSelect:function(t,n){n?"uid"in n&&e.addActiveFilter({type:t,value:n.uid}):e.removeActiveFilter(t)}}}});const iu=(0,Ys.Z)(au,[["render",function(e,t,n,r,a,i){var s=tr("filter-text-input"),o=tr("ui-dropdown");return Jr(),Kr("div",Sl,[ra("div",jl,[aa(s,{ref:"lineLocationFilterComponent",placeholder:"Linie oder Ort",onChange:e.handleTextFilterChange},null,8,["onChange"])]),ra("div",xl,[ra("div",Hl,[e.regionSelectItems.length?(Jr(),Zr(o,{key:0,ref:"regionSelectFilterComponent",items:e.regionSelectItems,label:"Region","first-item-label":"Alle Regionen",onSelect:t[0]||(t[0]=function(t){return e.handleDropdownSelect("region",t)})},null,8,["items"])):oa("",!0)]),ra("div",Ol,[e.meansOfTransportSelectItems.length?(Jr(),Zr(o,{key:0,ref:"meansOfTransportSelectFilterComponent",items:e.meansOfTransportSelectItems,label:"Transportmittel","first-item-label":"Alle Transportmittel",onSelect:t[1]||(t[1]=function(t){return e.handleDropdownSelect("means-of-transport",t)})},null,8,["items"])):oa("",!0)]),ra("div",El,[e.printEditionSelectItems.length?(Jr(),Zr(o,{key:0,ref:"printEditionSelectFilterComponent",items:e.printEditionSelectItems,"first-item-label":"Alle Verkehrsbereiche",label:"Verkehrsbereiche",onSelect:t[2]||(t[2]=function(t){return e.handleDropdownSelect("print-edition",t)})},null,8,["items"])):oa("",!0)]),ra("div",Pl,[e.activeFilters.length?(Jr(),Kr("button",{key:0,class:"c-time-tables__filter__reset",onClick:t[3]||(t[3]=Li((function(){return e.resetAll&&e.resetAll.apply(e,arguments)}),["prevent"]))},Al)):oa("",!0)])])])}]]);var su=iu,ou={ref:"bookContainer",class:"c-time-tables__book"},lu={class:"c-time-tables__book__row"},uu={class:"c-time-tables__book__items"},du=ra("h2",{class:"c-time-tables__book__heading"}," Dein Fahrplanheft ",-1),cu={class:"c-time-tables__book__count"},_u={key:0,class:"c-time-tables__book__items__list"},mu=["onClick"],fu=ra("span",{class:"c-time-tables__book__items__item__arrow o-icon o-icon--chevron-right"},null,-1),hu={class:"c-time-tables__book__items__item__label"},pu=ra("span",{class:"c-time-tables__book__items__item__remove"},[ra("span",{class:"c-time-tables__book__items__item__remove__icon o-icon o-icon--add"})],-1),yu={key:0,class:"c-time-tables__book__actions"},vu=[ra("span",{class:"c-time-tables__book__actions__btn__label"},"alle entfernen",-1),ra("span",{class:"c-time-tables__book__actions__btn__icon o-icon o-icon--remove"},null,-1)],gu={key:0,ref:"toTopButtonContainer",class:"c-time-tables__totop"},Mu=ra("span",{class:"c-time-tables__totop__btn__icon o-icon o-icon--arrow-up"},null,-1),Lu={class:"c-time-tables__totop__btn__label"},bu=sa("Zum Fahrplanheft "),Yu={class:"c-time-tables__totop__btn__label__count"},ku=n(5238),wu=n.n(ku),Du={key:0,class:"c-time-tables__book__additional"},Tu=ra("h2",{class:"c-time-tables__book__heading"}," Zusatzseiten anhängen ",-1),Su={class:"c-time-tables__book__additional__items"},ju={class:"o-ui-select__control"},xu={key:0,class:"o-ui-select__control__check o-icon o-icon--check"},Hu={class:"o-ui-select__label"},Ou={class:"o-ui-select__label__main"},Eu={key:0,class:"o-ui-select__label__description"};function Pu(e){return Pu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Pu(e)}var Au=En({props:{label:{type:String,required:!0},description:{type:String,default:""},value:{type:[Number,String],required:!0},modelValue:{type:[Array,String,Number],required:!0},initChecked:{type:Boolean,default:!1}},emits:["update:modelValue"],setup:function(e,t){var n=t.emit,r=St(!1);e.initChecked&&(r.value=!0);var a=function(t){if("object"===Pu(e.modelValue)&&Array.isArray(e.modelValue)){var r=e.modelValue,a=r.indexOf(e.value);t&&-1===a?r.push(e.value):r.splice(a,1),n("update:modelValue",r)}};return Mn((function(){return r.value}),(function(e,t){e!==t&&a(e)}),{immediate:!0}),Jn((function(){a(!1)})),{isChecked:r,handleClick:function(){r.value=!r.value}}}});const Fu=(0,Ys.Z)(Au,[["render",function(e,t,n,r,a,i){return Jr(),Kr("div",{class:"o-ui-select",onClick:t[0]||(t[0]=Li((function(){return e.handleClick&&e.handleClick.apply(e,arguments)}),["prevent"]))},[ra("span",ju,[e.isChecked?(Jr(),Kr("span",xu)):oa("",!0)]),ra("div",Hu,[ra("span",Ou,k(e.label),1),e.description?(Jr(),Kr("span",Eu,k(e.description),1)):oa("",!0)])])}]]);var Cu=En({components:{UiSelect:Fu},setup:function(){return{store:Ko()}}}),Iu=En({components:{AdditionalDocumentsSelectionComponent:(0,Ys.Z)(Cu,[["render",function(e,t,n,r,a,i){var s=tr("ui-select");return e.store.additionalDocumentSelectItems.length?(Jr(),Kr("div",Du,[Tu,ra("div",Su,[(Jr(!0),Kr(Rr,null,ar(e.store.additionalDocumentSelectItems,(function(n){return Jr(),Zr(s,{key:n.uid,modelValue:e.store.selectedAppendixFiles,"onUpdate:modelValue":t[0]||(t[0]=function(t){return e.store.selectedAppendixFiles=t}
12246),label:n.title,description:n.description,value:n.uid,"init-checked":""},null,8,["modelValue","label","description","value"])})),128))])])):oa("",!0)}]])},setup:function(){var e=Ko(),t=St(null),n=St(null),r=St(!1),a=Ya((function(){var t=e.timeTableBookItems.length.toString()+" Fahrpläne";return 0===e.timeTableBookItems.length?t="keine Fahrpläne":1===e.timeTableBookItems.length&&(t="1 Fahrplan"),"Du hast ".concat(t," ausgewählt.")}));qn((function(){new IntersectionObserver((function(e){e.forEach((function(e){!e.isIntersecting&&e.boundingClientRect.y<0?r.value=!0:r.value=!1}))}),{threshold:.4}).observe(t.value)}));var i=new(wu());return{store:e,bookContainer:t,resetBook:function(){e.flushBook()},requestDownload:function(){var t=function(){var t=e.timeTableBookItems.map((function(e){return e.uid}));if(t.length&&e.downloadActionLink){var n=window.location,r=new URL(n.origin+e.downloadActionLink.replace("___REPLACE_WITH_UIDS___",encodeURIComponent(t.toString())));return e.selectedAppendixFiles.length&&r.searchParams.append("tx_rvftimetables_timetablesearch[additionalDocuments]",e.selectedAppendixFiles.toString()),r.toString()}return null}();t&&(window.location.href=t)},reactiveBookCountLabel:a,scrollToBook:function(){var e=n.value.getBoundingClientRect();i.toElement(t.value,{offset:-1*(e.y+e.height)})},showToTop:r,toTopButtonContainer:n}}});const Wu=(0,Ys.Z)(Iu,[["render",function(e,t,n,r,a,i){var s=tr("additional-documents-selection-component");return Jr(),Kr(Rr,null,[ra("div",ou,[ra("div",lu,[ra("div",uu,[du,ra("p",cu,k(e.reactiveBookCountLabel),1),e.store.timeTableBookItems.length?(Jr(),Kr("ul",_u,[(Jr(!0),Kr(Rr,null,ar(e.store.timeTableBookItems,(function(t){return Jr(),Kr("li",{key:t.uid,class:"c-time-tables__book__items__item",onClick:function(n){return e.store.removeFromBook(t)}},[fu,ra("span",hu,k(t.line),1),pu],8,mu)})),128))])):oa("",!0)]),e.store.timeTableBookItems.length?(Jr(),Zr(s,{key:0})):oa("",!0)]),e.store.timeTableBookItems.length?(Jr(),Kr("div",yu,[ra("button",{class:"c-time-tables__book__actions__btn c-time-tables__book__actions__btn--secondary",onClick:t[0]||(t[0]=Li((function(){return e.resetBook&&e.resetBook.apply(e,arguments)}),["prevent"]))},vu),ra("button",{class:"c-time-tables__book__actions__btn",onClick:t[1]||(t[1]=Li((function(){return e.requestDownload&&e.requestDownload.apply(e,arguments)}),["prevent"]))}
12246," Download ")])):oa("",!0)],512),aa(ri,{name:"o-transition-slide-top"},{default:mn((function(){return[e.store.timeTableBookItems.length&&e.showToTop?(Jr(),Kr("div",gu,[ra("button",{class:"c-time-tables__totop__btn",onClick:t[2]||(t[2]=Li((function(){return e.scrollToBook&&e.scrollToBook.apply(e,arguments)}),["prevent"]))},[Mu,ra("span",Lu,[bu,ra("span",Yu,k(e.store.timeTableBookItems.length),1)])])],512)):oa("",!0)]})),_:1})],64)}]]);var Ru=En({components:{TimeTableBookComponent:Wu,FilterComponent:su,ListTimeTables:Tl},props:{endpoints:{type:Object,required:!0},downloadActionLink:{type:String,required:!0}},setup:function(e){var t=Ko(),n=$o(t).loaded;return t.initialize(e.endpoints,e.downloadActionLink),{loaded:n}}}),zu=(0,Ys.Z)(Ru,[["render",function(e,t,n,r,a,i){var s=tr("filter-component"),o=tr("time-table-book-component"),l=tr("list-time-tables");return Jr(),Kr(Rr,null,[e.loaded?oa("",!0):(Jr(),Kr("div",bo,Yo)),e.loaded?(Jr(),Zr(s,{key:1})):oa("",!0),e.loaded?(Jr(),Zr(o,{key:2})):oa("",!0),e.loaded?(Jr(),Zr(l,{key:3})):oa("",!0)],64)}]]),Nu={class:"c-jtbw-calc__container"},qu={key:0,class:"c-jtbw-calc__loader"},Uu=[ra("span",{class:"c-jtbw-calc__loader__spinner o-spinner"},[ra("span"),ra("span"),ra("span"),ra("span")],-1)],Bu={key:1,class:"c-jtbw-calc__title"},Ju={key:3,class:"c-jtbw-calc__comparison"},Vu={class:"c-jtbw-calc__comparison__row"},$u={class:"c-jtbw-calc__comparison__col"},Gu={class:"c-jtbw-calc__comparison__label"},Ku={class:"c-jtbw-calc__comparison__col"},Zu={class:"c-jtbw-calc__comparison__amount c-jtbw-calc__comparison__amount--costs"},Qu={class:"c-jtbw-calc__comparison__disclaimer"},Xu={key:0,class:"c-jtbw-calc__comparison__disclaimer__text"},ed=["innerHTML"],td=Vo({id:"jtbwCalculator",state:function(){return{loaded:!1,age:0,comparison:null,fareSelection:null}},actions:{initializeFromEndpoint:function(e){var t=this;return Fa(Ia().mark((function n(){var r,a,i;return Ia().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return r=Go(),a=r.read,n.next=3,a(e);case 3:"comparison"in(i=n.sent)&&(t.comparison=i.comparison,t.age=t.comparison.hasAgeRestriction&&t.comparison.ageLimit?t.comparison.ageLimit-1:0),t.loaded=!0;case 6:case"end":return n.stop()}}),n)})))()},setAge:function(e){this.age=e},setFareSelection:function(e){this.fareSelection=e},resetComparison:function(){this.fareComparison=null,this.fareSelection=null}},getters:{}}),nd={class:"c-jtbw-calc__selection"},rd={key:0,class:"c-jtbw-calc__selection__age"},ad=["innerHTML"],id={key:2,class:"c-jtbw-calc__selection__types"},sd={key:0,class:"c-jtbw-calc__selection__subline"},od={key:1,class:"c-jtbw-calc__selection__types__sub"},ld=ra("div",{class:"o-ui-toggle__control"},[ra("span",{class:"o-ui-toggle__control__bar"})],-1),ud=["name","checked"],dd=["innerHTML"],cd=En({props:{label:{type:String,default:""},initActive:{type:Boolean,default:!1},name:{type:String,default:""}},emits:["change"],setup:function(e,t){var n=t.emit,r=St(e.initActive),a=eu().handleKeyboardSelect;return{isActive:r,handleClick:function(){r.value=!r.value,n("change",r.value)},handleKeyboardSelect:a}}});const _d=(0,Ys.Z)(cd,[["render",function(e,t,n,r,a,i){return Jr(),Kr("div",{class:Y(["o-ui-toggle",{"o-ui-toggle--active":e.isActive}]),tabindex:"0",onClick:t[0]||(t[0]=function(){return e.handleClick&&e.handleClick.apply(e,arguments)}),onKeypress:t[1]||(t[1]=function(t){return e.handleKeyboardSelect(t,e.handleClick)})},[ld,e.name?(Jr(),Kr("input",{key:0,type:"checkbox",name:e.name,value:"1",checked:e.isActive,class:"o-ui-toggle__checkbox"},null,8,ud)):oa("",!0),e.label?(Jr(),Kr("span",{key:1,class:"o-ui-toggle__control__label",innerHTML:e.label},null,8,dd)):oa("",!0)],34)}]]);var md=_d,fd=["onClick","onKeypress"],hd={class:"o-ui-card-select__item__body"},pd={key:0,class:"o-ui-card-select__item__name"},yd=En({props:{items:{type:Object,required:!0},label:{type:String,default:""},additionalClasses:{type:String,default:""}},emits:["select"],setup:function(e,t){var n=t.emit,r=St(null),a=eu().handleKeyboardSelect;return{handleSelect:function(e){r.value=e,n("select",r.value)},selectedItem:r,handleKeyboardSelect:a}}}),vd=(0,Ys.Z)(yd,[["render",function(e,t,n,r,a,i){return Jr(),Kr("div",{class:Y(["o-ui-card-select",e.additionalClasses])},[(Jr(!0),Kr(Rr,null,ar(e.items,(function(t){return Jr(),Kr("div",{key:t.uid,class:Y(["o-ui-card-select__item",{"o-ui-card-select--active":!!e.selectedItem&&e.selectedItem.uid===t.uid}]),tabindex:"0",onClick:Li((function(n){return e.handleSelect(t)}),["prevent"]),onKeypress:function(n){return e.handleKeyboardSelect(n,e.handleSelect,[t])}},[ra("div",hd,[t.name?(Jr(),Kr("span",pd,k(t.name),1)):oa("",!0)])],42,fd)})),128))],2)}]]),gd={class:"c-jtbw-calc__selection__subline"},Md=["innerHTML"],Ld={key:1,class:"c-jtbw-calc__selection__types__sub__grade"},bd={key:0,class:"c-jtbw-calc__selection__subline"},Yd=En({components:{UiDropdown:ru,UiCardSelect:vd},props:{regions:{type:Object,required:!0},selectionLabel:{type:String,default:""},disclaimer:{type:String,default:""}},setup:function(e){var t=td(),n=St([]),r=St([]),a=St(null),i=St(null);return n.value=e.regions.map((function(e){return{uid:e.uid,name:e.name}})),{regionSelectItems:n,handleRegionSelect:function(t){var n=e.regions.findIndex((function(e){return e.uid===t.uid}));n>-1&&(a.value=e.regions[n],r.value=a.value.fareSelections.map((function(e){return{uid:e.uid,name:e.disclaimer?e.name+" *":e.name}})),i.value&&"reset"in i.value&&i.value.reset())}
12246,selectedRegion:a,gradeSelectItems:r,handleGradeSelect:function(e){if(e){var n=a.value.fareSelections.find((function(t){return t.uid===e.uid}));n?t.setFareSelection(n):t.resetComparison()}else t.resetComparison()},gradeDropdown:i}}}),kd=(0,Ys.Z)(Yd,[["render",function(e,t,n,r,a,i){var s=tr("ui-card-select"),o=tr("ui-dropdown");return Jr(),Kr(Rr,null,[ra("h3",gd,k(e.selectionLabel),1),aa(s,{items:e.regionSelectItems,label:"In welcher Region ist Deine Schule?",onSelect:e.handleRegionSelect},null,8,["items","onSelect"]),e.disclaimer?(Jr(),Kr("div",{key:0,class:"c-jtbw-calc__selection__disclaimer",innerHTML:e.disclaimer},null,8,Md)):oa("",!0),e.selectedRegion&&e.gradeSelectItems.length?(Jr(),Kr("div",Ld,[e.selectedRegion.selectionLabel?(Jr(),Kr("h3",bd,k(e.selectedRegion.selectionLabel),1)):oa("",!0),aa(o,{ref:"gradeDropdown",items:e.gradeSelectItems,label:"Bitte auswählen ...",onSelect:e.handleGradeSelect},null,8,["items","onSelect"])])):oa("",!0)],64)}]]),wd={class:"c-jtbw-calc__selection__subline"},Dd=["innerHTML"],Td=En({components:{UiDropdown:ru},props:{universities:{type:Object,required:!0},selectionLabel:{type:String,default:""},disclaimer:{type:String,default:""}},setup:function(e){var t=td();return{universitySelectItems:Ya((function(){return e.universities.map((function(e){return{uid:e.uid,name:e.name}}))})),handleSelect:function(n){var r=e.universities.findIndex((function(e){return e.uid===n.uid})),a=null;r>-1&&(a=e.universities[r]),t.setFareSelection(a)}}}}),Sd=(0,Ys.Z)(Td,[["render",function(e,t,n,r,a,i){var s=tr("ui-dropdown");return Jr(),Kr(Rr,null,[ra("h3",wd,k(e.selectionLabel),1),aa(s,{items:e.universitySelectItems,label:"Hochschule",onSelect:e.handleSelect},null,8,["items","onSelect"]),e.disclaimer?(Jr(),Kr("div",{key:0,class:"c-jtbw-calc__selection__disclaimer",innerHTML:e.disclaimer},null,8,Dd)):oa("",!0)],64)}]]),jd={key:0,class:"c-jtbw-calc__selection__subline"},xd=["innerHTML"],Hd=En({components:{UiDropdown:ru},props:{comparisonItem:{type:Object,required:!0}},setup:function(e){var t=td(),n=Ya((function(){return e.comparisonItem.fareSelections.map((function(e){return{uid:e.uid,name:e.name}}))})),r=function(n){var r=e.comparisonItem.fareSelections.findIndex((function(e){return e.uid===n.uid}));if(r>-1){var a=e.comparisonItem.fareSelections[r];t.setFareSelection(a)}};return Ln((function(){1===n.value.length&&r(n.value[0])}),null,void 0),{selectItems:n,handleSelect:r}}}),Od=En({components:{UniversalSelection:(0,Ys.Z)(Hd,[["render",function(e,t,n,r,a,i){var s=tr("ui-dropdown");return Jr(),Kr(Rr,null,[e.comparisonItem.selectionLabel&&e.selectItems.length>1?(Jr(),Kr("h3",jd,k(e.comparisonItem.selectionLabel),1)):oa("",!0),e.selectItems.length>1?(Jr(),Zr(s,{key:1,label:"Bitte wählen ...",items:e.selectItems,onSelect:e.handleSelect},null,8,["items","onSelect"])):oa("",!0),e.comparisonItem.disclaimer?(Jr(),Kr("div",{key:2,class:"c-jtbw-calc__selection__disclaimer",innerHTML:e.comparisonItem.disclaimer},null,8,xd)):oa("",!0)],64)}]]),UniversitySelection:Sd,SchoolSelection:kd,UiCardSelect:vd,UiToggle:md},setup:function(){var e=td(),t=$o(e).comparison,n=Ya((function(){return e.comparison.comparisonItems.map((function(e){return{uid:e.uid,name:e.title,disclaimer:e.disclaimer}}))})),r=St(null);return{handleAgeChange:function(n){n?e.setAge(t.value.ageLimit-1):(e.setAge(t.value.ageLimit+1),e.resetComparison(),r.value=null)},store:e,comparison:t,typeSelectItems:n,handleTypeSelect:function(t){var n=e.comparison.comparisonItems.find((function(e){return e.uid===t.uid}));n&&n!==r.value&&(r.value=n,e.resetComparison())},selectedComparisonItem:r}}}),Ed=En({components:{FareSelectionUi:(0,Ys.Z)(Od,[["render",function(e,t,n,r,a,i){var s=tr("ui-toggle"),o=tr("ui-card-select"),l=tr("school-selection"),u=tr("university-selection"),d=tr("universal-selection");return Jr(),Kr("div",nd,[e.comparison.hasAgeRestriction&&e.comparison.ageLimit?(Jr(),Kr("div",rd,[aa(s,{"init-active":!0,label:"Ich bin <strong>unter</strong> "+e.comparison.ageLimit.toString()+" Jahre alt ...",onChange:e.handleAgeChange},null,8,["label","onChange"])])):oa("",!0),e.comparison.hasAgeRestriction&&e.store.age>e.comparison.ageLimit&&e.comparison.ageDeniedText?(Jr(),Kr("div",{key:1,class:"c-jtbw-calc__selection__deny",innerHTML:e.comparison.ageDeniedText},null,8,ad)):e.store.comparison.comparisonItems.length?(Jr(),Kr("div",id,[e.store.comparison.itemsLabel?(Jr(),Kr("h3",sd,k(e.store.comparison.itemsLabel),1)):oa("",!0),aa(o,{items:e.typeSelectItems,onSelect:e.handleTypeSelect},null,8,["items","onSelect"]),e.selectedComparisonItem?(Jr(),Kr("div",od,[0===e.selectedComparisonItem.type?(Jr(),Zr(l,{key:0,regions:e.selectedComparisonItem.regions,"selection-label":e.selectedComparisonItem.selectionLabel,disclaimer:e.selectedComparisonItem.disclaimer},null,8,["regions","selection-label","disclaimer"])):10===e.selectedComparisonItem.type?(Jr(),Zr(u,{key:1,universities:e.selectedComparisonItem.universities,"selection-label":e.selectedComparisonItem.selectionLabel,disclaimer:e.selectedComparisonItem.disclaimer},null,8,["universities","selection-label","disclaimer"])):20===e.selectedComparisonItem.type?(Jr(),Zr(d,{key:2,"comparison-item":e.selectedComparisonItem},null,8,["comparison-item"])):oa("",!0)])):oa("",!0)])):oa("",!0)])}]])},props:{endpoint:{type:String,required:!0}},setup:function(e){var t=td();return t.initializeFromEndpoint(e.endpoint),{store:t,formatCurrency:function(e){return new Intl.NumberFormat("de-DE",{style:"currency",currency:"EUR"}).format(e)}}}}),Pd=(0,Ys.Z)(Ed,[["render",function(e,t,n,r,a,i){var s=tr("fare-selection-ui");return Jr(),Kr("div",Nu,[e.store.loaded?oa("",!0):(Jr(),Kr("div",qu,Uu)),e.store.loaded&&e.store.comparison.title?(Jr(),Kr("h3",Bu,k(e.store.comparison.title),1)):oa("",!0),e.store.loaded&&e.store.comparison?(Jr(),Zr(s,{key:2})):oa("",!0),e.store.fareSelection?(Jr(),Kr("div",Ju,[ra("div",Vu,[ra("div",$u,[ra("p",Gu,k(e.store.comparison.comparisonCostsLabel),1)]),ra("div",Ku,[ra("p",Zu,k(e.formatCurrency(e.store.fareSelection.fareComparison.costs)),1)])]),ra("div",Qu,[e.store.fareSelection.disclaimer?(Jr(),Kr("p",Xu," * "+k(e.store.fareSelection.disclaimer),1)):oa("",!0),e.store.comparison.disclaimer?(Jr(),Kr("p",{key:1,class:"c-jtbw-calc__comparison__disclaimer__text",innerHTML:e.store.comparison.disclaimer},null,8,ed)):oa("",!0)])])):oa("",!0)])}]]),Ad={class:"c-mg-form__container"},Fd={key:0,class:"c-mg-form__success"},Cd={key:0},Id={key:1},Wd={key:2},Rd=ra("p",null,"Wir bitten Sie für die Bearbeitung um etwas Geduld.",-1),zd=["action"],Nd={key:0},qd={class:"c-vform__row"},Ud={class:"c-vform__col c-vform__col--7"},Bd={class:"c-vform__col c-vform__col--5"},Jd={class:"c-vform__row"},Vd={class:"c-vform__col c-vform__col--5"},$d={class:"c-vform__col c-vform__col--7"},Gd={class:"c-mg-form__disclaimer"},Kd={class:"c-mg-form__disclaimer"},Zd={class:"c-mg-form__actions"},Qd=["disabled"],Xd=ra("span",{class:"c-mg-form__actions__btn__icon o-icon o-icon--arrow-right"},null,-1),ec=ra("span",{class:"c-mg-form__actions__btn__text"},"Antrag absenden",-1),tc={key:0,class:"c-mg-form__actions__btn__loader"},nc=[ra("span",{class:"c-mg-form__actions__btn__loader__spinner o-spinner"},[ra("span"),ra("span"),ra("span"),ra("span")],-1)],rc={class:"c-vform__field__control"},ac={key:0,class:"c-vform__field__control__label__required"},ic=["type","name","required","disabled"],sc={key:1,class:"c-vform__field__control__prefix"};function oc(){function e(e,t){var n=!0;return t.forEach((function(t){"email"===t&&(new RegExp(/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/).test(e)||(n=!1))})),n}return{handleNativeElementChange:function(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],a=t instanceof HTMLInputElement&&"checkbox"===t.type?t.checked:""!==t.value;return a?(n.value=t.value,n.isValid=e(t.value,r)):(n.value="",t.required&&(n.isValid=!1)),n}}}var lc=En({props:{name:{type:String,required:!0},label:{type:String,default:""},additionalClasses:{type:String,default:""},additionalLabelClasses:{type:String,default:""},required:{type:Boolean,default:!1},type:{type:String,default:"text"},disabled:{type:Boolean,default:!1},fieldPrefix:{type:String,default:""}},emits:["set"],setup:function(e,t){var n=t.emit,r=St({name:e.name,value:"",isValid:!e.required}),a=[];"email"===e.type&&a.push("email");var i=oc().handleNativeElementChange;return Mn(r.value,(function(){n("set",r.value)})),{handleChange:function(e){e.target instanceof HTMLInputElement&&(r.value=i(e.target,r.value,a))}}}});const uc=(0,Ys.Z)(lc,[["render",function(e,t,n,r,a,i){return Jr(),Kr("div",{class:Y(["c-vform__field",["c-vform__field--"+e.type,e.additionalClasses,{"c-vform__field--required":e.required},{"c-vform__field--disabled":e.disabled}]])},[ra("div",rc,[e.label?(Jr(),Kr("label",{key:0,class:Y(["c-vform__field__control__label",e.additionalLabelClasses])},[sa(k(e.label)+" ",1),e.required?(Jr(),Kr("span",ac,"*")):oa("",!0)],2)):oa("",!0),ra("input",{class:"c-vform__field__control__input",type:e.type,name:e.name,required:e.required,disabled:e.disabled,onBlur:t[0]||(t[0]=function(){return e.handleChange&&e.handleChange.apply(e,arguments)})},null,40,ic),e.fieldPrefix?(Jr(),Kr("span",sc,k(e.fieldPrefix),1)):oa("",!0)])],2)}]]);var dc=uc,cc=[ra("span",{class:"c-vform__fieldset__legend__toggle__icon o-icon o-icon--chevron-down"},null,-1)],_c={key:1,class:"c-vform__fieldset__sublegend"},mc={key:2,class:"c-vform__fieldset__fields"},fc=En({props:{legend:{type:String,default:""},subLegend:{type:String,default:""},additionalClasses:{type:String,default:""},isCollapsible:{type:Boolean,default:!1},initOpened:{type:Boolean,default:!1}},setup:function(e){var t=St(!0);return e.isCollapsible&&!e.initOpened&&(t.value=!1),{isOpen:t,toggleOpenState:function(){e.isCollapsible&&(t.value=!t.value)}}}});const hc=(0,Ys.Z)(fc,[["render",function(e,t,n,r,a,i){return Jr(),Kr("fieldset",{class:Y(["c-vform__fieldset",[e.additionalClasses,{"c-vform__fieldset--collapsible":e.isCollapsible}
12246]])},[e.legend?(Jr(),Kr("legend",{key:0,class:"c-vform__fieldset__legend",onClick:t[0]||(t[0]=function(){return e.toggleOpenState&&e.toggleOpenState.apply(e,arguments)})},[sa(k(e.legend)+" ",1),e.isCollapsible?(Jr(),Kr("span",{key:0,class:Y(["c-vform__fieldset__legend__toggle",{"c-vform__fieldset__legend__toggle--open":e.isOpen}])},cc,2)):oa("",!0)])):oa("",!0),e.subLegend?(Jr(),Kr("p",_c,k(e.subLegend),1)):oa("",!0),!e.isCollapsible||e.isCollapsible&&e.isOpen?(Jr(),Kr("div",mc,[ir(e.$slots,"default")])):oa("",!0)],2)}]]);var pc=hc,yc={class:"c-vform__field c-vform__field--select"},vc={class:"c-vform__field__control"},gc={key:0,class:"c-vform__field__control__label"},Mc={key:0,class:"c-vform__field__control__label__required"},Lc=["name","required"],bc=["selected"],Yc=["value","selected"],kc=["innerHTML"],wc=[ra("span",{class:"o-field-select__control__icon__bars"},null,-1),ra("span",{class:"o-field-select__control__icon__bars"},null,-1)],Dc={ref:"panelContainer",class:"o-field-select__panel__container"},Tc={key:0,class:"o-field-select__panel__filter"},Sc=ra("span",{class:"o-field-select__panel__filter__icon o-icon o-icon--filter"},null,-1),jc=[ra("span",{class:"o-icon o-icon--close-o"},null,-1)],xc={class:"o-field-select__panel__options"},Hc=["onClick","onKeydown"],Oc=En({props:{name:{type:String,required:!0},label:{type:String,default:""},selectOptions:{type:Array,default:function(){return[]}},required:{type:Boolean,default:!1},filterable:{type:Boolean,default:!1},prompt:{type:String,default:""},additionalClasses:{type:String,default:""}},emits:["set"],setup:function(e,t){var n=t.emit,r=St(null),a=St(null),i=St(null),s=St(""),o=St(!1),l=St(null),u=St(null),d=eu(),c=d.handleKeyboardSelect,_=d.handleKeyboardNavigation,m=d.selectNext,f=d.selectPrev,h=St({name:e.name,value:"",isValid:!e.required}),p=oc().handleNativeElementChange,y=Ya((function(){return e.filterable&&s.value?e.selectOptions.filter((function(e){return e.name.toLowerCase().startsWith(s.value.toLowerCase())})):e.selectOptions}));return Qi(r,(function(){o.value&&(o.value=!1)})),Mn(h.value,(function(){n("set",h.value)})),{handleChange:function(e){e.target instanceof HTMLSelectElement&&(h.value=p(e.target,h.value))},handleSelection:function(e){a.value=e,Qt((function(){i.value instanceof HTMLSelectElement&&i.value.dispatchEvent(new Event("change"))})),o.value=!1},selectedOption:a,selectElement:i,filterPhrase:s,filteredSelectOptions:y,toggleState:function(){o.value=!o.value,o.value&&a.value&&Qt((function(){if(l.value instanceof HTMLElement){var e=l.value.querySelector(".o-field-select__panel__options__item--active");if(e){var t=e.getBoundingClientRect().y-l.value.getBoundingClientRect().y-l.value.getBoundingClientRect().height/2+e.getBoundingClientRect().height/2;l.value.scrollTop=t}}}))},isOpen:o,container:r,resetFilter:function(){s.value=""},panelContainer:l,handleKeyboardSelect:c,handleKeyboardNavigation:_,selectNext:m,selectPrev:f,panelElement:u}}});const Ec=(0,Ys.Z)(Oc,[["render",function(e,t,n,r,a,i){return Jr(),Kr("div",yc,[ra("div",vc,[e.label?(Jr(),Kr("label",gc,[sa(k(e.label)+" ",1),e.required?(Jr(),Kr("span",Mc,"*")):oa("",!0)])):oa("",!0),ra("div",{ref:"container",class:Y(["o-field-select",[{"o-field-select--open":e.isOpen,"o-field-select--selected":e.selectedOption,"o-field-select--filterable":e.filterable},e.additionalClasses]])},[ra("select",{ref:"selectElement",name:e.name,required:e.required,class:"o-field-select__select",onChange:t[0]||(t[0]=function(){return e.handleChange&&e.handleChange.apply(e,arguments)})},[e.prompt&&!e.filterPhrase?(Jr(),Kr("option",{key:0,value:"",selected:!e.selectedOption},k(e.prompt),9,bc)):oa("",!0),(Jr(!0),Kr(Rr,null,ar(e.filteredSelectOptions,(function(t,n){return Jr(),Kr("option",{key:n,value:t.value,selected:!!e.selectedOption&&e.selectedOption.value===t.value},k(t.name),9,Yc)})),128))],40,Lc),ra("div",{tabindex:"0",class:"o-field-select__control",onClick:t[1]||(t[1]=Li((function(){return e.toggleState&&e.toggleState.apply(e,arguments)}),["prevent"])),onKeydown:t[2]||(t[2]=function(t){return e.handleKeyboardSelect(t,e.toggleState)})},[ra("span",{class:"o-field-select__control__label",innerHTML:e.selectedOption?e.selectedOption.name:e.prompt?e.prompt:e.selectOptions[0].name},null,8,kc),ra("span",{class:Y(["o-field-select__control__icon",{"o-field-select__control__icon--open":e.isOpen}])}
12246,wc,2)],32),aa(ri,{name:"o-transition-slide-top"},{default:mn((function(){return[e.isOpen?(Jr(),Kr("div",{key:0,ref:"panelElement",class:"o-field-select__panel",tabindex:"0",onKeydown:t[6]||(t[6]=function(t){return e.handleKeyboardNavigation(t,{next:e.selectNext.bind(null,e.panelElement,".o-field-select__panel__options__item"),prev:e.selectPrev.bind(null,e.panelElement)})})},[ra("div",Dc,[e.filterable?(Jr(),Kr("div",Tc,[Sc,Qn(ra("input",{"onUpdate:modelValue":t[3]||(t[3]=function(t){return e.filterPhrase=t}),type:"text",class:"o-field-select__panel__filter__input",placeholder:"Auswahl filtern",tabindex:"0"},null,512),[[vi,e.filterPhrase]]),e.filterPhrase?(Jr(),Kr("button",{key:0,class:"o-field-select__panel__filter__reset",onClick:t[4]||(t[4]=Li((function(){return e.resetFilter&&e.resetFilter.apply(e,arguments)}),["prevent"]))},jc)):oa("",!0)])):oa("",!0),ra("ul",xc,[e.prompt&&!e.filterPhrase?(Jr(),Kr("li",{key:0,class:Y(["o-field-select__panel__options__item",{"o-field-select__panel__options__item--active":!e.selectedOption}]),tabindex:"0",onClick:t[5]||(t[5]=Li((function(t){return e.handleSelection(null)}),["prevent"]))},k(e.prompt),3)):oa("",!0),(Jr(!0),Kr(Rr,null,ar(e.filteredSelectOptions,(function(t,n){return Jr(),Kr("li",{key:n,class:Y(["o-field-select__panel__options__item",{"o-field-select__panel__options__item--active":!!e.selectedOption&&t.value===e.selectedOption.value}]),tabindex:"0",onClick:Li((function(n){return e.handleSelection(t)}),["prevent"]),onKeydown:function(n){return e.handleKeyboardSelect(n,e.handleSelection,[t])}},k(t.name),43,Hc)})),128))])],512)],544)):oa("",!0)]})),_:1})],2)])])}]]);var Pc=Ec,Ac={class:"c-vform__field__control"},Fc={key:0,class:"c-vform__field__control__label"},Cc={key:0,class:"c-vform__field__control__label__required"},Ic=["name","required"],Wc=En({props:{name:{type:String,required:!0},label:{type:String,default:""},required:{type:Boolean,default:!1}},emits:["set"],setup:function(e,t){var n=t.emit,r=St({name:e.name,value:"",isValid:!e.required}),a=oc().handleNativeElementChange,i=St("");return Mn(r.value,(function(){n("set",r.value)})),{formattedValue:i,handleInput:function(e){var t;i.value=function(e){for(var t=[],n=0;n<e.length;n+=4)t.push(e.slice(n,n+4));return t.join(" - ")}((t=e.currentTarget.value).length>=2&&!new RegExp(/^[a-zA-Z]+$/).test(t.substring(0,2))?"":t.replace(/[^a-zA-Z0-9]/g,"").substring(0,22).toUpperCase())},handleBlur:function(e){e.target instanceof HTMLInputElement&&(r.value=a(e.target,r.value))}}}});const Rc=(0,Ys.Z)(Wc,[["render",function(e,t,n,r,a,i){return Jr(),Kr("div",{class:Y(["c-vform__field c-vform__field--iban",{"c-vform__field--required":e.required}])},[ra("div",Ac,[e.label?(Jr(),Kr("label",Fc,[sa(k(e.label)+" ",1),e.required?(Jr(),Kr("span",Cc,"*")):oa("",!0)])):oa("",!0),Qn(ra("input",{"onUpdate:modelValue":t[0]||(t[0]=function(t){return e.formattedValue=t}),class:"c-vform__field__control__input",type:"text",name:e.name,required:e.required,onKeyup:t[1]||(t[1]=Li((function(){return e.handleInput&&e.handleInput.apply(e,arguments)}),["prevent"])),onBlur:t[2]||(t[2]=function(){return e.handleBlur&&e.handleBlur.apply(e,arguments)})},null,40,Ic),[[vi,e.formattedValue]])])],2)}]]);var zc=Rc,Nc=Vo({id:"formStore",state:function(){return{requiredFields:[],formFieldStates:[],loading:!1,submitted:!1,errors:[],submittedValues:[]}},actions:{setRequiredFields:function(e){this.requiredFields=e},setFormFieldState:function(e){var t=this.formFieldStates.findIndex((function(t){return t.name===e.name}));t>-1&&this.formFieldStates.splice(t,1),this.formFieldStates.push(e)},submit:function(e){var t=this;return Fa(Ia().mark((function n(){var r,a,i,s;return Ia().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return t.loading=!0,r=new FormData(e),n.next=4,fs(e.action).post(r).json();case 4:a=n.sent,i=a.data,(s=a.error).value?t.errors.push(s.value):!s.value&&i.value&&(!i.value.success&&i.value.errors.length?t.errors=i.value.errors:("submittedValues"in i.value&&(t.submittedValues=i.value.submittedValues),t.submitted=!0)),t.loading=!1;case 9:case"end":return n.stop()}}),n)})))()}},getters:{invalidFields:function(e){var t=e.formFieldStates.filter((function(e){return e.isValid})).map((function(e){return e.name}));return Ii.difference(e.requiredFields,t)}}}),qc={class:"c-vform__field__control"},Uc={key:0,class:"c-vform__field__control__label"},Bc={key:0,class:"c-vform__field__control__label__required"},Jc=["name","required","disabled"],Vc=En({props:{name:{type:String,required:!0},label:{type:String,default:""},required:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},emits:["set"],setup:function(e,t){var n=t.emit,r=St({name:e.name,value:"",isValid:!e.required}),a=oc().handleNativeElementChange;return Mn(r.value,(function(){n("set",r.value)})),{handleChange:function(e){e.target instanceof HTMLTextAreaElement&&(r.value=a(e.target,r.value))}}}});const $c=(0,Ys.Z)(Vc,[["render",function(e,t,n,r,a,i){return Jr(),Kr("div",{class:Y(["c-vform__field c-vform__field--textarea",[{"c-vform__field--required":e.required},{"c-vform__field--disabled":e.disabled}]])},[ra("div",qc,[e.label?(Jr(),Kr("label",Uc,[sa(k(e.label)+" ",1),e.required?(Jr(),Kr("span",Bc,"*")):oa("",!0)])):oa("",!0),ra("textarea",{class:"c-vform__field__control__textarea",
12246name:e.name,required:e.required,disabled:e.disabled,onBlur:t[0]||(t[0]=function(){return e.handleChange&&e.handleChange.apply(e,arguments)})},null,40,Jc)])],2)}]]);var Gc=$c,Kc={class:"c-vform__field c-vform__field--radio"},Zc={ref:"container",class:"c-vform__field__control o-field-radio"},Qc={class:"o-field-radio__option__label"},Xc=["name","value","required","checked"],e_=["onKeypress"],t_={key:0,class:"o-field-radio__option__label__text"},n_=En({props:{name:{type:String,required:!0},options:{type:Array,default:function(){return[]}},required:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},emits:["set"],setup:function(e,t){var n=t.emit,r=oc().handleNativeElementChange,a=eu().handleKeyboardSelect,i=St(null),s=St({name:e.name,value:"",isValid:!e.required});return Mn(s.value,(function(){n("set",s.value)})),{handleChange:function(e){e.target instanceof HTMLInputElement&&(s.value=r(e.target,s.value))},fieldState:s,handleKeyboardSelect:a,toggleState:function(e){if(e&&i.value instanceof HTMLElement){var t=Array.from(i.value.querySelectorAll('input[type="radio"]')).find((function(t){return t.value===e.value}));t instanceof HTMLInputElement&&"radio"===t.type&&(t.checked=!0,t.dispatchEvent(new Event("change")))}},container:i}}});const r_=(0,Ys.Z)(n_,[["render",function(e,t,n,r,a,i){return Jr(),Kr("div",Kc,[ra("div",Zc,[(Jr(!0),Kr(Rr,null,ar(e.options,(function(n,r){return Jr(),Kr("div",{key:r,class:Y(["o-field-radio__option",{"o-field-radio__option--selected":e.fieldState.value===n.value}])},[ra("label",Qc,[ra("input",{type:"radio",name:e.name,value:n.value,class:"o-field-radio__option__label__input",required:e.required,checked:e.fieldState.value===n.value,onChange:t[0]||(t[0]=function(){return e.handleChange&&e.handleChange.apply(e,arguments)})},null,40,Xc),ra("span",{class:"o-field-radio__option__label__ui",tabindex:"0",onKeypress:function(t){return e.handleKeyboardSelect(t,e.toggleState.bind(null,n))}},null,40,e_),n.name?(Jr(),Kr("span",t_,k(n.name),1)):oa("",!0)])],2)})),128))],512)])}]]);var a_=r_,i_={class:"c-vform__field c-vform__field--radio"},s_={class:"c-vform__field__control"},o_={class:"o-field-checkbox__label"},l_=["name","value","required"],u_=["innerHTML"],d_=En({props:{label:{type:String,required:!0},name:{type:String,required:!0},required:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},value:{type:String,default:"1"}},emits:["set"],setup:function(e,t){var n=t.emit,r=oc().handleNativeElementChange,a=eu().handleKeyboardSelect,i=St(null),s=St({name:e.name,value:"",isValid:!e.required});return Mn(s.value,(function(){n("set",s.value)})),{handleChange:function(e){e.target instanceof HTMLInputElement&&(s.value=r(e.target,s.value))},fieldState:s,toggleState:function(){i.value instanceof HTMLInputElement&&"checkbox"===i.value.type&&(i.value.checked=!i.value.checked,i.value.dispatchEvent(new Event("change")))},handleKeyboardSelect:a,nativeElement:i}}});const c_=(0,Ys.Z)(d_,[["render",function(e,t,n,r,a,i){return Jr(),Kr("div",i_,[ra("div",s_,[ra("div",{class:Y(["o-field-checkbox",{"o-field-checkbox--checked":e.fieldState.value===e.value}])},[ra("label",o_,[ra("input",{ref:"nativeElement",type:"checkbox",name:e.name,value:e.value,class:"o-field-checkbox__label__input",required:e.required,onChange:t[0]||(t[0]=function(){return e.handleChange&&e.handleChange.apply(e,arguments)})},null,40,l_),ra("span",{class:"o-field-checkbox__label__ui",tabindex:"0",onKeypress:t[1]||(t[1]=function(t){return e.handleKeyboardSelect(t,e.toggleState)})},null,32),e.label?(Jr(),Kr("span",{key:0,class:"o-field-checkbox__label__text",innerHTML:e.label},null,8,u_)):oa("",!0)])],2)])])}]]);var __=c_,m_=["name","value"],f_=En({props:{name:{type:String,required:!0},value:{type:String,required:!0}}}),h_=(0,Ys.Z)(f_,[["render",function(e,t,n,r,a,i){return Jr(),Kr("input",{type:"hidden",name:e.name,value:e.value},null,8,m_)}]]),p_={class:"c-vform__field__control"},y_={key:0,class:"c-vform__field__control__label"},v_={key:0,class:"c-vform__field__control__label__required"},g_={key:0,class:"c-mg-c-vform__field__control__filedrop__loader"},M_=[ra("span",{class:"c-vform__field__control__filedrop__loader__spinner o-spinner"},[ra("span"),ra("span"),ra("span"),ra("span")],-1)],L_=["accept"],b_={key:1,class:"c-vform__field__control__filedrop__errors"},Y_=["name","value","required"],k_=En({props:{name:{type:String,required:!0},namePrefix:{type:String,default:""},label:{type:String,default:""},accept:{type:String,default:""},required:{type:Boolean,default:!1},endpoint:{type:String,required:!0},targetDir:{type:String,default:""},maxFileSize:{type:Number,default:0}},emits:["set"],setup:function(e,t){var n=t.emit,r=St({name:e.name,value:"",isValid:!e.required}),a=St(!1),i=St([]),s=function(){var t=Fa(Ia().mark((function t(n){var s,l,u,d,c,_,m;return Ia().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(n.target instanceof HTMLInputElement)){t.next=35;break}if(!n.target.files.length){t.next=22;break}if(s=n.target.files[0],(l=o(s)).length){t.next=19;break}return i.value=[],(u=new FormData).append("".concat(e.namePrefix,"[file]"),s),u.a
12246ppend("".concat(e.namePrefix,"[targetDir]"),e.targetDir),a.value=!0,t.next=12,fetch(e.endpoint,{method:"POST",body:u});case 12:return d=t.sent,t.next=15,d.json();case 15:(c=t.sent)&&(a.value=!1,"filename"in c&&(r.value.value=c.filename,r.value.isValid=!e.required||""!==r.value.value)),t.next=20;break;case 19:i.value=l;case 20:t.next=35;break;case 22:if(i.value=[],!r.value.value){t.next=35;break}return _=new FormData,a.value=!0,_.append("".concat(e.namePrefix,"[delete]"),e.targetDir+"/"+r.value.value),t.next=29,fetch(e.endpoint,{method:"POST",body:_});case 29:return m=t.sent,t.next=32,m.json();case 32:r.value.value="",r.value.isValid=!e.required,a.value=!1;case 35:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),o=function(t){var n,r=[];if(e.maxFileSize){var a=(n=t.size,Math.round(n/1e6));a>e.maxFileSize&&r.push("Diese Datei ist größer als erlaubt: ".concat(a," MB > ").concat(e.maxFileSize," MB"))}return r};return Mn(r.value,(function(){n("set",r.value)})),{handleChange:s,loading:a,fieldState:r,errors:i}}});const w_=(0,Ys.Z)(k_,[["render",function(e,t,n,r,a,i){return Jr(),Kr("div",{class:Y(["c-vform__field c-vform__field--file",{"c-vform__field--required":e.required}])},[ra("div",p_,[e.label?(Jr(),Kr("label",y_,[sa(k(e.label)+" ",1),e.required?(Jr(),Kr("span",v_,"*")):oa("",!0)])):oa("",!0),ra("div",{class:Y(["c-vform__field__control__filedrop",{"c-vform__field__control__filedrop--loading":e.loading}])},[e.loading?(Jr(),Kr("div",g_,M_)):oa("",!0),ra("input",{class:"c-vform__field__control__filedrop__input",type:"file",accept:e.accept,onChange:t[0]||(t[0]=function(){return e.handleChange&&e.handleChange.apply(e,arguments)})},null,40,L_),e.errors.length?(Jr(),Kr("div",b_,[(Jr(!0),Kr(Rr,null,ar(e.errors,(function(e,t){return Jr(),Kr("span",{key:t,class:"c-vform__field__control__filedrop__errors__item"},k(e),1)})),128))])):oa("",!0)],2),ra("input",{name:e.name,type:"hidden",value:e.fieldState.value,required:e.required},null,8,Y_)])],2)}]]);var D_=w_,T_=[ra("p",{class:"c-mg-form__pdf__header__title"}," Keine Belege zur Hand? Sie können auch per Post beantragen! ",-1),ra("button",{type:"button",class:"c-mg-form__pdf__header__cta o-btn"}," Ja, bitte! ",-1)],S_={key:0,class:"c-mg-form__pdf__body"},j_=ra("p",null,"Für einen Postversand laden Sie bitte das vorausgefüllte PDF herunter.",-1),x_={class:"c-mg-form__pdf__action"},H_=["disabled"],O_=[ra("span",{class:"c-mfg-form__pdf__btn__icon o-icon o-icon--pdf"},null,-1),ra("span",{class:"c-mfg-form__pdf__btn__label"},"PDF erzeugen",-1)],E_=ra("span",{class:"c-mg-form__pdf__action__part"},"Belege ergänzen",-1),P_=ra("span",{class:"c-mg-form__pdf__action__part"},"Absenden / Abgeben",-1),A_=En({props:{isReady:{type:Boolean,required:!0}},emits:["submit"],setup:function(e,t){var n=t.emit;return{isOpen:St(!1),handleSubmit:function(e){n("submit",e)}}}});const F_=(0,Ys.Z)(A_,[["render",function(e,t,n,r,a,i){return Jr(),Kr("div",{class:Y(["c-mg-form__pdf",{"c-mg-form__pdf--disabled":!e.isReady}])},[ra("div",{class:"c-mg-form__pdf__header",onClick:t[0]||(t[0]=function(t){return e.isOpen=!e.isOpen})},T_),e.isOpen?(Jr(),Kr("div",S_,[j_,ra("div",x_,[ra("button",{type:"button",class:"c-mfg-form__pdf__btn",disabled:!e.isReady,onClick:t[1]||(t[1]=Li((function(){return e.handleSubmit&&e.handleSubmit.apply(e,arguments)}),["prevent"]))},O_,8,H_),E_,P_])])):oa("",!0)],2)}]]);var C_=En({components:{PdfDownload:F_,InputUpload:D_,InputHidden:h_,FieldCheckbox:__,FieldRadio:a_,FieldTextarea:Gc,InputIban:zc,FieldSelect:Pc,FieldsetContainer:pc,InputText:dc},props:{endpointSubmit:{type:String,required:!0},endpointAttachment:{type:String,required:!0},locationSelectOptions:{type:Array,default:function(){return[]}},caseId:{type:String,required:!0},functionalHiddenFields:{type:Array,required:!0},apiSend:{type:Boolean,default:!0}},setup:function(e){var t=Nc(),n=St(null),r=St(["tx_rvfmobilityguarantee_requestform[guaranteeCase][salutation]","tx_rvfmobilityguarantee_requestform[guaranteeCase][firstname]","tx_rvfmobilityguarantee_requestform[guaranteeCase][lastname]","tx_rvfmobilityguarantee_requestform[guaranteeCase][street]","tx_rvfmobilityguarantee_requestform[guaranteeCase][houseNumber]","tx_rvfmobilityguarantee_requestform[guaranteeCase][zip]","tx_rvfmobilityguarantee_requestform[guaranteeCase][city]","tx_rvfmobilityguarantee_requestform[guaranteeCase][email]","tx_rvfmobilityguarantee_requestform[guaranteeCase][accountOwner]","tx_rvfmobilityguarantee_requestform[guaranteeCase][iban]","tx_rvfmobilityguarantee_requestform[guaranteeCase][departureCity]","tx_rvfmobilityguarantee_requestform[guaranteeCase][departureStop]","tx_rvfmobilityguarantee_requestform[guaranteeCase][departureTime]","tx_rvfmobilityguarantee_requestform[guaranteeCase][arrivalCity]","tx_rvfmobilityguarantee_requestform[guaranteeCase][arrivalStop]","tx_rvfmobilityguarantee_requestform[guaranteeCase][arrivalTime]","tx_rvfmobilityguarantee_requestform[guaranteeCase][acceptTermsOfUse]"]),a=St(["tx_rvfmobilityguarantee_requestform[guaranteeCase][attachment1]","tx_rvfmobilityguarantee_requestform[guaranteeCase][attachment2]","tx_rvfmobilityguarantee_requestform[guaranteeCase][promiseOfTruth]"]),i=[].concat(wo(r.value),wo(a.value));t.setRequiredFields(i);var s=Ya((function(){return!Ii.intersection(r.value,t.invalidFields).length})),o=Ya((function(){return!!l.value&&!!s.value&&!Ii.intersection(a.value,t.invalidFields).length})),l=St(!0),u=St(!1),d=function(){var r=Fa(Ia().mark((function r(a){var i;return Ia().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(i=null,a?a.target instanceof HTMLFormElement&&(i=a.target):i=n.value,!(i instanceof HTMLFormElement)){r.next=17;break}if(!e.apiSend){r.next=14;break}if(l.value){r.next=10;break}return r.next=7,i.submit();case 7:l.value=!0,r.next=12;break;case 10:return r.next=12,t.submit(i);case 12:r.next=17;break;case 14:return r.next=16,i.submit();case 16:l.value=!0;case 17:case"end":return r.stop()}}),r)})));return function(e){return r.apply(this,arguments)}}(),c=function(){var e=Fa(Ia().mark((function e(){return Ia().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return l.value=!0,e.next=3,l.value;case 3:n.value instanceof HTMLFormElement&&d();case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),_=function(){var e=Fa(Ia().mark((function e(){return Ia().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return l.value=!1,e.next=3,l.value;case 3:n.value instanceof HTMLFormElement&&n.value.dispatchEvent(new SubmitEvent("submit"));case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),m=Ya((function(){if(t.submittedValues.length){var e="salutation"in t.submittedValues?t.submittedValues.salutation:0,n="";return 10===e?n="Sehr geehrte Frau ":20===e&&(n="Sehr geehrter Herr "),"<p>".concat(n).concat(t.submittedValues.firstname," ").concat(t.submittedValues.lastname,"</p><p>wir haben Ihren Antrag zur Mobilitätsgarantie erhalten und Ihnen eine Eingangsbestätigung an ").concat(t.submittedValues.email," gesendet. Bitte geben Sie uns etwas Zeit zur Bearbeitung. Wir melden uns bei Ihnen.</p>")}return null}));return{transmitOnline:l,handleIbanSet:function(e){t.setFormFieldState(e);var n=!1;"string"==typeof e.value&&"DE"!==e.value.substring(0,2)&&(n=!0),u.value=n;var i=r.value.findIndex((function(e){return"tx_rvfmobilityguarantee_requestform[guaranteeCase][bic]"===e}));if(n){if(i<0){var s="tx_rvfmobilityguarantee_requestform[guaranteeCase][bic]";r.value.push(s),t.setRequiredFields([].concat(wo(r.value),wo(a.value))),Qt((function(){var e=Array.from(document.querySelectorAll("input[type=text]")).find((function(e){return e.name===s}));e instanceof HTMLInputElement&&e.focus()}))}}else i>-1&&(r.value.splice(i,1),t.setRequiredFields([].concat(wo(r.value),wo(a.value))))},showBic:u,handleFieldSet:function(e){t.setFormFieldState(e)},formStore:t,canShowPdf:s,canSubmitOnline:o,salutationSelectOptions:[{name:"Bitte auswählen",value:""},{name:"Frau",value:10},{name:"Herr",value:20},{name:"Divers",value:30}],impactTypeOptions:[{name:"Fahrtausfall/Verspätung",value:"10"},{name:"Verpasster Anschluss",value:"20"}],acceptTermsOfUseLabel:'Ich bin mit der <a href="/datenschutz">Datenschutzerklärung</a> einverstanden *',handleSubmit:d,successMessage:m,handlePdfDownload:_,handleSubmitOnline:c,theForm:n}}});const I_=(0,Ys.Z)(C_,[["render",function(e,t,n,r,a,i){var s=tr("input-hidden"),o=tr("field-select"),l=tr("input-text"),u=tr("fieldset-container"),d=tr("input-iban"),c=tr("field-radio"),_=tr("field-textarea"),m=tr("field-checkbox"),f=tr("input-upload"),h=tr("pdf-download");return Jr(),Kr("div",Ad,[e.formStore.submitted?(Jr(),Kr("div",Fd,[ra("p",null,[10===e.formStore.submittedValues.salutation?(Jr(),Kr("span",Cd,"Sehr geehrte Frau ")):20===e.formStore.submittedValues.salutation?(Jr(),Kr("span",Id,"Sehr geehrter Herr ")):(Jr(),Kr("span",Wd,"Hallo ")),sa(" "+k(e.formStore.submittedValues.firstname)+" "+k(e.formStore.submittedValues.lastname)+", ",1)]),ra("p",null,"wir haben Ihren Antrag zur Mobilitätsgarantie erhalten. Zur Bestätigung haben wir Ihnen eine Mail an "+k(e.formStore.submittedValues.email)+" gesendet. Bitte prüfen Sie Ihr Postfach.",1),Rd])):(Jr(),Kr("form",{key:1,ref:"theForm",action:e.endpointSubmit,method:"post",enctype:"multipart/form-data",class:"c-vform",onSubmit:t[1]||(t[1]=Li((function(){return e.handleSubmit&&e.handleSubmit.apply(e,arguments)}),["prevent"]))},[e.functionalHiddenFields.length?(Jr(),Kr("div",Nd,[(Jr(!0),Kr(Rr,null,ar(e.functionalHiddenFields,(function(e,t){return Jr(),Zr(s,{key:t,name:e.name,value:e.value},null,8,["name","value"])})),128))])):oa("",!0),aa(u,{legend:"Antragsteller/-in"},{default:mn((function(){return[aa(o,{label:"Anrede","select-options":e.s
12246alutationSelectOptions,name:"tx_rvfmobilityguarantee_requestform[guaranteeCase][salutation]",required:"","additional-classes":"o-field-select--compact-up-lg",onSet:e.handleFieldSet},null,8,["select-options","onSet"]),aa(l,{label:"Vorname",name:"tx_rvfmobilityguarantee_requestform[guaranteeCase][firstname]",required:"",onSet:e.handleFieldSet},null,8,["onSet"]),aa(l,{label:"Nachname",name:"tx_rvfmobilityguarantee_requestform[guaranteeCase][lastname]",required:"",onSet:e.handleFieldSet},null,8,["onSet"]),ra("div",qd,[ra("div",Ud,[aa(l,{label:"Straße",name:"tx_rvfmobilityguarantee_requestform[guaranteeCase][street]",required:"",onSet:e.handleFieldSet},null,8,["onSet"])]),ra("div",Bd,[aa(l,{label:"Nummer",name:"tx_rvfmobilityguarantee_requestform[guaranteeCase][houseNumber]","additional-label-classes":"c-vform__field__control__label--right",required:"",onSet:e.handleFieldSet},null,8,["onSet"])])]),ra("div",Jd,[ra("div",Vd,[aa(l,{label:"PLZ",name:"tx_rvfmobilityguarantee_requestform[guaranteeCase][zip]",required:"",onSet:e.handleFieldSet},null,8,["onSet"])]),ra("div",$d,[aa(l,{label:"Wohnort",name:"tx_rvfmobilityguarantee_requestform[guaranteeCase][city]","additional-label-classes":"c-vform__field__control__label--right",required:"",onSet:e.handleFieldSet},null,8,["onSet"])])]),aa(l,{label:"Telefon",name:"tx_rvfmobilityguarantee_requestform[guaranteeCase][telephone]",onSet:e.handleFieldSet},null,8,["onSet"]),aa(l,{label:"E-Mail Adresse",name:"tx_rvfmobilityguarantee_requestform[guaranteeCase][email]",type:"email",required:"",onSet:e.handleFieldSet},null,8,["onSet"]),aa(l,{label:"Abonummer / Kartennummer",name:"tx_rvfmobilityguarantee_requestform[guaranteeCase][subscriptionNumber]",type:"text",onSet:e.handleFieldSet},null,8,["onSet"])]})),_:1}),aa(u,{legend:"Bankverbindung","sub-legend":"Überweisung des Erstattungsbetrags auf folgendes Konto:"},{default:mn((function(){return[aa(l,{label:"Kontoinhaber/in",name:"tx_rvfmobilityguarantee_requestform[guaranteeCase][accountOwner]",required:"",onSet:e.handleFieldSet},null,8,["onSet"]),aa(d,{label:"IBAN",name:"tx_rvfmobilityguarantee_requestform[guaranteeCase][iban]",required:"",onSet:e.handleIbanSet},null,8,["onSet"]),aa(l,{label:"BIC",name:"tx_rvfmobilityguarantee_requestform[guaranteeCase][bic]",required:"",disabled:!e.showBic,onSet:e.handleFieldSet},null,8,["disabled","onSet"])]})),_:1}),aa(u,{legend:"Vorfall","sub-legend":"Ich beanspruche Mobilitätsgarantie für folgenden Vorfall"},{default:mn((function(){return[aa(l,{label:"Datum",type:"date",name:"tx_rvfmobilityguarantee_requestform[guaranteeCase][date]",required:"",onSet:e.handleFieldSet},null,8,["onSet"]),aa(u,{legend:"Start","additional-classes":"c-vform__fieldset--sub"},{default:mn((function(){return[aa(o,{label:"Gemeinde / Stadt","select-options":e.locationSelectOptions,name:"tx_rvfmobilityguarantee_requestform[guaranteeCase][departureCity]",required:"",filterable:"",prompt:"Bitte auswählen",onSet:e.handleFieldSet},null,8,["select-options","onSet"]),aa(l,{label:"Haltestelle",name:"tx_rvfmobilityguarantee_requestform[guaranteeCase][departureStop]",required:"",onSet:e.handleFieldSet},null,8,["onSet"]),aa(l,{label:"Planmäßige Abfahrtszeit",type:"time",name:"tx_rvfmobilityguarantee_requestform[guaranteeCase][departureTime]",required:"",onSet:e.handleFieldSet},null,8,["onSet"])]})),_:1}),aa(u,{legend:"Ziel","additional-classes":"c-vform__fieldset--sub"},{default:mn((function(){return[aa(o,{label:"Gemeinde / Stadt","select-options":e.locationSelectOptions,name:"tx_rvfmobilityguarantee_requestform[guaranteeCase][arrivalCity]",required:"",filterable:"",prompt:"Bitte auswählen",onSet:e.handleFieldSet},null,8,["select-options","onSet"]),aa(l,{label:"Haltestelle",name:"tx_rvfmobilityguarantee_requestform[guaranteeCase][arrivalStop]",required:"",onSet:e.handleFieldSet},null,8,["onSet"]),aa(l,{label:"Planmäßige Ankunftszeit",type:"time",name:"tx_rvfmobilityguarantee_requestform[guaranteeCase][arrivalTime]",required:"",onSet:e.handleFieldSet},null,8,["onSet"])]})),_:1}),aa(u,{legend:"Umstieg","additional-classes":"c-vform__fieldset--sub","is-collapsible":!0},{default:mn((function(){return[aa(o,{label:"Gemeinde / Stadt","select-options":e.locationSelectOptions,name:"tx_rvfmobilityguarantee_requestform[guaranteeCase][transferCity]",filterable:"",prompt:"Bitte auswählen",onSet:e.handleFieldSet},null,8,["select-options","onSet"]),aa(l,{label:"Haltestelle",name:"tx_rvfmobilityguarantee_requestform[guaranteeCase][transferStop]",onSet:e.handleFieldSet},null,8,["onSet"]),aa(l,{label:"Planmäßige Abfahrtszeit",name:"tx_rvfmobilityguarantee_requestform[guaranteeCase][transferDepartureTime]",type:"time",onSet:e.handleFieldSet},null,8,["onSet"]),aa(l,{label:"Tatsächliche Ankunftszeit",name:"tx_rvfmobilityguarantee_requestform[guaranteeCase][transferArrivalTime]",type:"time",onSet:e.handleFieldSet},null,8,["onSet"])]})),_:1})]})),_:1}),aa(u,{legend:"Bitte schildern Sie kurz den Vorfall:"},{default:mn((function(){return[aa(c,{name:"tx_rvfmobilityguarantee_requestform[guaranteeCase][impactType]",options:e.impactTypeOptions,onSet:e.handleFieldSet},null,8,["options","onSet"]),aa(_,{label:"Schilderung des Vorfalls",name:"tx_rvfmobilityguarantee_requestform[guaranteeCase][impactDescription]",onSet:e.handleFieldSet},null,8,["onSet"]),aa(l,{label:"Taxi- oder Car-Sharing-Kosten",name:"tx_rvfmobilityguarantee_requestform[guaranteeCase][taxiCosts]",type:"text","field-prefix":"€","additional-classes":"c-vform__field--currency",onSet:e.handleFieldSet},null,8,["onSet"])]})),_:1}),aa(u,null,{default:mn((function(){return[ra("div",Gd,[aa(m,{name:"tx_rvfmobilityguarantee_requestform[guaranteeCase][acceptTermsOfUse]",label:e.acceptTermsOfUseLabel,value:"1",required:"",onSet:e.handleFieldSet},null,8,["label","onSet"])])]})),_:1}),aa(u,{legend:"Bitte reichen Sie Ihre Belege ein:","sub-legend":"Um Ihren Antrag digital bearbeiten zu können, benötigen wir einen Scan oder eine Fotografie Ihrer Belege"},{default:mn((function(){return[aa(f,{name:"tx_rvfmobilityguarantee_requestform[guaranteeCase][attachment1]","name-prefix":"tx_rvfmobilityguarantee_requestform[guaranteeCase]",label:"Beleg Taxi- oder Car-Sharing-Kosten",endpoint:e.endpointAttachment,"target-dir":e.caseId,accept:"image/*,.pdf",required:"","max-file-size":8,onSet:e.handleFieldSet},null,8,["endpoint","target-dir","onSet"]),aa(f,{name:"tx_rvfmobilityguarantee_requestform[guaranteeCase][attachment2]","name-prefix":"tx_rvfmobilityguarantee_requestform[guaranteeCase]",label:"Fahrschein",endpoint:e.endpointAttachment,"target-dir":e.caseId,accept:"image/*,.pdf",required:"","max-file-size":8,onSet:e.handleFieldSet},null,8,["endpoint","target-dir","onSet"])]})),_:1}),aa(s,{value:e.transmitOnline?"1":"0",name:"tx_rvfmobilityguarantee_requestform[guaranteeCase][transmissionType]"},null,8,["value"]),aa(h,{"is-ready":e.canShowPdf,onSubmit:e.handlePdfDownload},null,8,["is-ready","onSubmit"]),ra("div",Kd,[aa(m,{name:"tx_rvfmobilityguarantee_requestform[guaranteeCase][promiseOfTruth]",label:"Ich versichere, alle Angaben wahrheitsgemäß gemacht zu haben (Belege in der Anlage). Ich hatte keine Möglichkeit, mein Fahrziel zeitgerecht mit anderen Verkehrsmitteln des RVF zu erreichen. Die Verspätung/der Fahrtausfall war mir vor dem Kauf meines Fahrausweises nicht bekannt. *",value:"1",required:"",onSet:e.handleFieldSet},null,8,["onSet"])]),ra("div",Zd,[ra("button",{disabled:!e.canSubmitOnline,class:"c-mg-form__actions__btn",type:"submit",onClick:t[0]||(t[0]=Li((function(){return e.handleSubmitOnline&&e.handleSubmitOnline.apply(e,arguments)}),["prevent"]))},[Xd,ec,e.formStore.loading?(Jr(),Kr("span",tc,nc)):oa("",!0)],8,Qd)])],40,zd))])}]]);var W_=I_;function R_(){var e=new(wu()),t=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r={};n&&(r.offset=-1*n),e.toElement(t,r)};return{scrollToViewport:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;n?setTimeout((function(){t(e,r)}),n):t(e,r)}}}function z_(e){var t="c-accordion__item--open",n="c-accordion__item--in",r=function(){var n=[],r=1;return e.querySelectorAll(".c-accordion__item").forEach((function(e){if(e instanceof HTMLElement){var a=e.querySelector(".c-accordion__item__head"),o=e.querySelector(".c-accordion__item__panel");
12246if(a instanceof HTMLElement&&o instanceof HTMLElement){var l=e.classList.contains(t),u={id:r,container:e,trigger:a,panel:o,isOpen:l};a.addEventListener("click",(function(){return function(e){!function(e){e.isOpen?s(e):i(e)}(e)}(u)})),n.push(u)}r++}})),n}(),a=R_().scrollToViewport;function i(e){r.filter((function(t){return t.isOpen&&t.id!==e.id})).forEach((function(e){return s(e)}));var i=e.panel.scrollHeight;e.panel.style.height="".concat(i,"px"),e.container.classList.add(n);e.panel.addEventListener("transitionend",(function r(i){"height"===i.propertyName&&(e.panel.removeAttribute("style"),e.container.classList.add(t),e.container.classList.remove(n)),e.panel.removeEventListener("transitionend",r),function(e){e.container.getBoundingClientRect().top<150&&a(e.container,null,150)}(e)})),e.isOpen=!0}function s(e){var n=e.panel.scrollHeight;e.panel.style.height="".concat(n,"px"),setTimeout((function(){e.container.classList.remove(t),e.panel.removeAttribute("style")}),50),e.isOpen=!1}}var N_={key:0,class:"o-form-field__control__suggestions__panel"},q_={class:"o-form-field__control__suggestions__list"},U_=["onClick"],B_=En({props:{endpoint:{type:String,required:!0},inputElement:{type:HTMLInputElement,required:!0},countrySelect:{type:HTMLSelectElement,default:null}},setup:function(e){e.inputElement.addEventListener("input",(0,Ii.debounce)((function(e){e.target instanceof HTMLInputElement&&(r.value=e.target.value)}),500));var t=[],n=St(null);e.countrySelect instanceof HTMLSelectElement&&e.countrySelect.hasAttribute("data-countries")&&(t=JSON.parse(e.countrySelect.getAttribute("data-countries")),e.countrySelect.addEventListener("change",(function(e){if(e.target instanceof HTMLSelectElement){var r=e.target.value,a=t.find((function(e){return e.name===r}));n.value=a||null}})));var r=St(""),a=St([]),i=function(e,t={}){const n=Xi(t),r=Ya((()=>Gi(e)));return{focused:Ya((()=>!(!r.value||!n.value)&&r.value.contains(n.value)))}}(e.inputElement.closest(".o-form-field")).focused,s=St(!1),o=Ya((function(){var t=null;return e.inputElement.hasAttribute("data-zipcode-id")?t=e.inputElement.getAttribute("data-zipcode-id"):e.inputElement.hasAttribute("data-city-id")&&(t=e.inputElement.getAttribute("data-city-id")),t?document.getElementById(t):null})),l=function(){var t=Fa(Ia().mark((function t(r){var i,s,o,l,d;return Ia().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=u(e.endpoint,"tx_rvfcountrydata_api[q]",r),i=n.value&&"isoCode"in n.value?u(i,"tx_rvfcountrydata_api[isocode]",n.value.isoCode):u(i,"tx_rvfcountrydata_api[isocode]",""),t.next=4,fs(i).json();case 4:s=t.sent,(o=s.data).value&&(l=o.value.filter((function(e){return e.zipcode.startsWith("7")})),d=o.value.filter((function(e){return!e.zipcode.startsWith("7")})),a.value=[].concat(wo(l),wo(d)));case 7:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();function u(e,t,n){var r=new RegExp("("+t+"=)([^&]*)","i");if(e.match(r))return e.replace(r,"$1"+encodeURIComponent(n));var a=-1!==e.indexOf("?")?"&":"?";return e+a+t+"="+encodeURIComponent(n)}function d(e){e.dispatchEvent(new Event("input",{bubbles:!0,cancelable:!0}))}return Mn((function(){return r.value}),(function(){r.value.length>1?l(r.value):a.value=[]})),Mn((function(){return i.value}),(function(){i.value?s.value=!0:setTimeout((function(){s.value=!1}),100)})),{query:r,suggestions:a,selectSuggestion:function(t){if(t.zipcode){var r=e.inputElement;if(r instanceof HTMLInputElement&&(r.id.includes("zipcode")?(r.value=t.zipcode,d(r)):r.id.includes("city")&&(r.value=t.name,d(r))),o.value instanceof HTMLInputElement)if(o.value.id.includes("city")){var i=o.value;i.value=t.name,d(i)}else if(o.value.id.includes("zipcode")){var s=o.value;s.value=t.zipcode,d(s)}!n.value&&e.countrySelect instanceof HTMLSelectElement&&(e.countrySelect.value="Deutschland"),a.value=[]}},isFocused:s}}}),J_=(0,Ys.Z)(B_,[["render",function(e,t,n,r,a,i){return Jr(),Zr(ri,{name:"o-transition-sli
12246de-top"},{default:mn((function(){return[e.suggestions.length&&e.isFocused?(Jr(),Kr("div",N_,[ra("ul",q_,[(Jr(!0),Kr(Rr,null,ar(e.suggestions,(function(t){return Jr(),Kr("li",{key:t.uid,class:"o-form-field__control__suggestions__item"},[ra("a",{href:"#",class:"o-form-field__control__suggestions__link",onClick:Li((function(n){return e.selectSuggestion(t)}),["prevent"])},k(t.zipcode)+" "+k(t.name),9,U_)])})),128))])])):oa("",!0)]})),_:1})}]]);function V_(e){e.querySelectorAll(".o-form-field--suggestions").forEach((function(e){e instanceof HTMLElement&&function(e){var t=e.querySelector(".o-form-field__control__suggestions"),n=t.getAttribute("data-endpoint"),r=e.querySelector(".o-form-field__control__input");if(t&&n&&r){var a=null;r.hasAttribute("data-country-id")&&(a=document.getElementById(r.getAttribute("data-country-id"))),ki(J_,{inputElement:r,countrySelect:a,endpoint:n}).mount(t)}}(e)})),e.querySelectorAll("input[data-country-id]").forEach((function(e){e instanceof HTMLInputElement&&function(e){var t=document.getElementById(e.getAttribute("data-country-id")),n=[],r={minlength:e.hasAttribute("minlength")?e.getAttribute("minlength"):null,maxlength:e.hasAttribute("maxlength")?e.getAttribute("maxlength"):null,parsleyLength:e.hasAttribute("data-parsley-length")?e.getAttribute("data-parsley-length"):null,parsleyLengthMessage:e.hasAttribute("data-parsley-length-message")?e.getAttribute("data-parsley-length-message"):null},a=St(null);function i(e){var t=n.find((function(t){return t.name===e}));t&&(!a.value||"uid"in a.value&&a.value.uid!==t.uid)?a.value=t:a.value=null}t instanceof HTMLSelectElement&&t.hasAttribute("data-countries")&&(n=JSON.parse(t.getAttribute("data-countries")),Array.isArray(n)&&n.length&&t.addEventListener("change",(function(e){e.target instanceof HTMLSelectElement&&i(e.target.value)})),t.value&&(i(t.value),t.dispatchEvent(new Event("change")))),Mn((function(){return a.value}),(function(){!function(){if(a.value){if(e.hasAttribute("minlength")){var t=e.getAttribute("minlength");e.setAttribute("minlength",t.replace(/\d+/,a.value.zipcodeLength.toString()))}if(e.hasAttribute("maxlength")){var n=e.getAttribute("maxlength");e.setAttribute("maxlength",n.replace(/\d+/,a.value.zipcodeLength.toString()))}if(e.hasAttribute("data-parsley-length")){var i=e.getAttribute("data-parsley-length");e.setAttribute("data-parsley-length",i.replace(/\d+/g,a.value.zipcodeLength.toString()))}if(e.hasAttribute("data-parsley-length-message")){var s=e.getAttribute("data-parsley-length-message");e.setAttribute("data-parsley-length-message",s.replace(/\d+/g,a.value.zipcodeLength.toString()))}}else e.hasAttribute("minlength")&&r.minlength&&e.setAttribute("minlength",r.minlength),e.hasAttribute("maxlength")&&r.maxlength&&e.setAttribute("maxlength",r.maxlength),e.hasAttribute("data-parsley-length")&&r.parsleyLength&&e.setAttribute("data-parsley-length",r.parsleyLength),e.hasAttribute("data-parsley-length-message")&&r.parsleyLengthMessage&&e.setAttribute("data-parsley-length-message",r.parsleyLengthMessage)}(),e.value="",e.dispatchEvent(new Event("input",{bubbles:!0,cancelable:!0}))}))}(e)}))}var $_=Vo("trafficInfo",(function(){var e=St(null),t=St(null),n=St([]),r=St([]),a=St(null),i=St(!1),s=function(){var a=Fa(Ia().mark((function a(s){var o,l,u,d;return Ia().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,fs(s).json();case 2:o=a.sent,l=o.data,(u=o.error).value?i.value=!0:l.value&&!u.value&&("lastModified"in l.value&&(e.value=new Date(l.value.lastModified)),"version"in l.value&&(t.value=l.value.version),"infos"in l.value&&(d=function(e){return{id:e.id,content:e.content,priority:e.priority,subject:e.subject,subtitle:e.subtitle,timestamps:{availability:{from:new Date(e.timestamps.availability.from),to:new Date(e.timestamps.availability.to)},creation:new Date(e.timestamps.creation),modified:new Date(e.timestamps.modified),validity:e.timestamps.validity.map((function(e){return{from:new Date(e.from),to:new Date(e.to)}}))},affected:{lines:Array.isArray(e.affected.lines)?e.affected.lines:[],stops:Array.isArray(e.affected.stops)?e.affected.stops:[]},properties:{attachments:Array.isArray(e.properties.attachments)?e.properties.attachments:[],additionalLinks:Array.isArray(e.properties.additionalLinks)?e.properties.additionalLinks:[]}}},"current"in l.value.infos&&Array.isArray(l.value.infos.current)&&l.value.infos.current.forEach((function(e){n.value.push(d(e))})),"historic"in l.value.infos&&Array.isArray(l.value.infos.historic)&&l.value.infos.historic.forEach((function(e){r.value.push(d(e))}))));case 6:case"end":return a.stop()}}),a)})));return function(e){return a.apply(this,arguments)}}(),o=Ya((function(){if(n.value.length){var e=n.value.flatMap((function(e){return e.affected.lines}));return(0,Ii.sortBy)((0,Ii.uniqBy)(e,"number"),"name").map((function(e){return{name:e.number,value:e.number}}))}return[]})),l=Ya((function(){if(n.value.length){var e=n.value.flatMap((function(e){return e.affected.stops}));return(0,Ii.sortBy)((0,Ii.uniqBy)(e,"id"),"name").map((function(e){var t=e.name;return e.parent&&"name"in e.parent&&(t=t+", "+e.parent.name),{name:t,value:e.id}}))}return[]})),u=Ya((function(){if(n.value.length){var e=n.value.flatMap((function(e){return e.affected.stops})).map((function(e){if(e.parent&&"locality"===e.parent.type)return e.parent}));return(0,Ii.sortBy)((0,Ii.uniqBy)(e,"name"),"name").map((function(e){return{name:e.name,value:e.name}}))}return[]})),d=Ya((function(){if(a.value){if("line"===a.value.type)return n.value.filter((function(e){return(e.affected.lines.length?e.affected.lines.map((function(e){return e.number})):[]).includes(a.value.value)}));if("stop"===a.value.type)return n.value.filter((function(e){return(e.affected.stops.length?e.affected.stops.map((function(e){return e.id})):[]).includes(a.value.value)}));if("locality"===a.value.type)return n.value.filter((function(e){var t=e.affected.stops.length?e.affected.stops.map((function(e){if(e.parent&&"locality"===e.parent.type)return e.parent.name})):[];return(0,Ii.uniq)(t).includes(a.value.value)}))}return n.value})),c=Ya((function(){return a.value&&"line"===a.value.type?r.value.filter((function(e){return(e.affected.lines.length?e.affected.lines.map((function(e){return e.id})):[]).includes(a.value.value)})):r.value}));return{init:s,version:t,lastModified:e,currentItems:n,currentItemsFiltered:d,historicItems:r,historicItemsFiltered:c,affectedLinesFilter:o,affectedStopsFilter:l,affectedLocalitiesFilter:u,activeFilter:a,setActiveFilter:function(e){a.value=e},feedHasError:i}})),G_=En({__name:"CollapseTransition",setup:function(e){var t=function(e){var t=e,n=getComputedStyle(t).height;t.style.height="0",requestAnimationFrame((function(){t.style.height=n}))},n=function(e){e.removeAttribute("style")},r=function(e){var t=e,n=getComputedStyle(t).height;t.style.height=n,requestAnimationFrame((function(){t.style.height="0"}))};return function(e,a){return Jr(),Zr(ri,{name:"o-transition--collapse",onEnter:t,onAfterEnter:n,onLeave:r},{default:mn((function(){return[ir(e.$slots,"default")]})),_:3})}}}),K_=ra("div",{class:"c-ui-collapse__head__icon"},[ra("span",{class:"c-ui-collapse__head__icon__icon"},[ra("span",{class:"o-icon o-icon--arrow-right"})])],-1),Z_={class:"c-ui-collapse__head__content"},Q_=ra("div",{class:"c-ui-collapse__head__icon c-ui-collapse__head__icon--right"},[ra("span",{class:"c-ui-collapse__head__icon__rounded"},[ra("span",{class:"c-ui-collapse__head__icon__rounded__icon o-icon o-icon--chevron-down"})])],-1),X_=En({__name:"UiCollapse",props:{additionalClasses:{type:String,default:""}}
12246,setup:function(e){var t=St(!1),n=St(null),r=R_().scrollToViewport,a=document.getElementById("main-nav"),i=function(){t.value=!t.value,t.value&&setTimeout((function(){if(n.value instanceof HTMLElement){var e=a?a.getBoundingClientRect().height:80;r(n.value,0,e)}}),400)};return function(r,a){return Jr(),Kr("div",{class:Y(["c-ui-collapse",[{"c-ui-collapse--open":t.value},e.additionalClasses]])},[ra("div",{class:"c-ui-collapse__head",onClick:i},[K_,ra("div",Z_,[ir(r.$slots,"header")]),Q_]),aa(G_,null,{default:mn((function(){return[t.value?(Jr(),Kr("div",{key:0,ref_key:"panel",ref:n,class:"c-ui-collapse__panel"},[ir(r.$slots,"content")],512)):oa("",!0)]})),_:3})],2)}}}),em=["innerHTML"],tm={class:"o-traffic-info-item__content"},nm=["innerHTML"],rm={key:0,class:"o-traffic-info-item__info"},am=ra("p",{class:"o-traffic-info-item__info__heading"},[ra("strong",null,"Betroffene Linien:")],-1),im={class:"o-traffic-info-item__info__content"},sm={key:1,class:"o-traffic-info-item__info"},om=ra("p",{class:"o-traffic-info-item__info__heading"},[ra("strong",null,"Betroffene Gemeinden:")],-1),lm={class:"o-traffic-info-item__info__content"},um={key:2,class:"o-traffic-info-item__info"},dm=ra("p",{class:"o-traffic-info-item__info__heading"},[ra("strong",null,"Betroffene Haltestellen:")],-1),cm={class:"o-traffic-info-item__info__content"},_m={key:3,class:"o-traffic-info-item__info"},mm=ra("p",{class:"o-traffic-info-item__info__heading"},[ra("strong",null,"Weitere Informationen: ")],-1),fm={class:"o-traffic-info-item__info__content"},hm={class:"o-link-list o-link-list--small-down-lg"},pm=["href"],ym=["href"],vm=En({__name:"TrafficInfoItem",props:{addInfoItem:{type:Object,required:!0}},setup:function(e){var t=e,n={weekday:"short",year:"numeric",month:"numeric",day:"numeric"},r={hour:"numeric",minute:"numeric"},a=Ya((function(){var e;return null!==(e=t.addInfoItem)&&void 0!==e&&e.timestamps.validity?t.addInfoItem.timestamps.validity.map(s):null}));function i(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(e.getFullYear()>2100)return"auf weiteres";var a=e.toLocaleDateString("de-DE",n);if(t){var i=e.toLocaleTimeString("de-DE",r);return"".concat(a,", ").concat(i," Uhr")}return a}function s(e){var t=e.from,n=e.to,r=i(t),a=i(n),s=i(t,!1),o=i(n,!1);return r===a&&s===o?r:r===a&&s!==o?"".concat(r," - ").concat(o):"".concat(r," - ").concat(a)}var o=Ya((function(){var e,n;return null!==(e=t.addInfoItem)&&void 0!==e&&e.affected.lines.length?(0,Ii.sortBy)((0,Ii.uniq)(null===(n=t.addInfoItem)||void 0===n?void 0:n.affected.lines.map((function(e){return e.number})))):[]})),l=Ya((function(){var e;if(null!==(e=t.addInfoItem)&&void 0!==e&&e.affected.stops.length){var n,r=null===(n=t.addInfoItem)||void 0===n?void 0:n.affected.stops.map((function(e){return"".concat(e.name,", ").concat(e.parent.name)}));return(0,Ii.sortBy)((0,Ii.uniq)(r))}return[]})),u=Ya((function(){var e;if(null!==(e=t.addInfoItem)&&void 0!==e&&e.affected.stops.length){var n,r,a=null!==(n=t.addInfoItem)&&void 0!==n&&n.affected.stops.length?null===(r=t.addInfoItem)||void 0===r?void 0:r.affected.stops.map((function(e){if(e.parent&&"locality"===e.parent.type)return e.parent.name})):[];return(0,Ii.sortBy)((0,Ii.uniq)(a))}return[]}));return function(t,n){return Jr(),Zr(X_,{"additional-classes":"o-traffic-info-item"},{header:mn((function(){return[e.addInfoItem.subtitle?(Jr(),Kr("h3",{key:0,class:"o-traffic-info-item__title",innerHTML:e.addInfoItem.subtitle},null,8,em)):oa("",!0),(Jr(!0),Kr(Rr,null,ar(Ot(a),(function(e,t){return Jr(),Kr("p",{key:t,class:"o-traffic-info-item__subtitle"},k(e),1)})),128))]})),content:mn((function(){return[ra("div",tm,[e.addInfoItem.content?(Jr(),Kr("p",{key:0,innerHTML:e.addInfoItem.content},null,8,nm)):oa("",!0)]),Ot(o).length?(Jr(),Kr("div",rm,[am,ra("div",im,[(Jr(!0),Kr(Rr,null,ar(Ot(o),(function(e,t){return Jr(),Kr("span",{key:t,class:"o-tag"},k(e),1)})),128))])])):oa("",!0),Ot(u).length?(Jr(),Kr("div",sm,[om,ra("div",lm,[(Jr(!0),Kr(Rr,null,ar(Ot(u),(function(e,t){return Jr(),Kr("span",{key:t,class:"o-tag"},k(e),1)})),128))])])):oa("",!0),Ot(l).length?(Jr(),Kr("div",um,[dm,ra("div",cm,[(Jr(!0),Kr(Rr,null,ar(Ot(l),(function(e,t){return Jr(),Kr("span",{key:t,class:"o-tag"},k(e),1)})),128))])])):oa("",!0),e.addInfoItem.properties.attachments.length||e.addInfoItem.properties.additionalLinks.length?(Jr(),Kr("div",_m,[mm,ra("div",fm,[ra("ul",hm,[(Jr(!0),Kr(Rr,null,ar(e.addInfoItem.properties.attachments,(function(e){return Jr(),Kr("li",{key:e.id,class:"o-link-list__item"},[ra("a",{href:e.path,class:"o-link-list__link",target:"_blank"},k(e.linkText),9,pm)])}
12246)),128)),(Jr(!0),Kr(Rr,null,ar(e.addInfoItem.properties.additionalLinks,(function(e){return Jr(),Kr("li",{key:e.id,class:"o-link-list__item"},[ra("a",{href:e.url,class:"o-link-list__link",target:"_blank"},k(e.urlText),9,ym)])})),128))])])])):oa("",!0)]})),_:1})}}}),gm=vm,Mm={class:"c-traffic-info__filter"},Lm={class:"c-traffic-info__filter__head"},bm=ra("p",{class:"c-traffic-info__filter__head__label"}," Filtern nach: ",-1),Ym={class:"c-traffic-info__filter__head__buttons"},km={key:0,class:"c-traffic-info__filter__items"},wm=["onClick"],Dm={key:1,class:"c-traffic-info__filter__items"},Tm=["onClick"],Sm={key:2,class:"c-traffic-info__filter__items"},jm=["onClick"],xm=En({__name:"FilterComponent",setup:function(e){var t=$_(),n=St(""),r=function(e){n.value===e?n.value="":n.value=e,t.setActiveFilter(null)},a=function(e){t.activeFilter&&t.activeFilter.value===e.value&&"line"===t.activeFilter.type?t.setActiveFilter(null):t.setActiveFilter({type:n.value,value:e.value})};return function(e,i){return Jr(),Kr("div",Mm,[ra("div",Lm,[bm,ra("div",Ym,[ra("button",{class:Y(["c-traffic-info__filter__bt
12246n",{"c-traffic-info__filter__btn--active":"line"===n.value}]),onClick:i[0]||(i[0]=Li((function(e){return r("line")}),["prevent"]))}," Linie ",2),ra("button",{class:Y(["c-traffic-info__filter__btn",{"c-traffic-info__filter__btn--active":"locality"===n.value}]),onClick:i[1]||(i[1]=Li((function(e){return r("locality")}),["prevent"]))}," Gemeinde ",2),ra("button",{class:Y(["c-traffic-info__filter__btn",{"c-traffic-info__filter__btn--active":"stop"===n.value}]),onClick:i[2]||(i[2]=Li((function(e){return r("stop")}),["prevent"]))}," Haltestelle ",2)])]),"line"===n.value?(Jr(),Kr("div",km,[(Jr(!0),Kr(Rr,null,ar(Ot(t).affectedLinesFilter,(function(e){return Jr(),Kr("button",{key:e.value,class:Y(["c-traffic-info__filter__btn",{"c-traffic-info__filter__btn--active":Ot(t).activeFilter&&Ot(t).activeFilter.value===e.value}]),onClick:Li((function(t){return a(e)}),["prevent"])},k(e.name),11,wm)})),128))])):"locality"===n.value?(Jr(),Kr("div",Dm,[(Jr(!0),Kr(Rr,null,ar(Ot(t).affectedLocalitiesFilter,(function(e){return Jr(),Kr("button",{key:e.value,class:Y(["c-traffic-info__filter__bt
12246n",{"c-traffic-info__filter__btn--active":Ot(t).activeFilter&&Ot(t).activeFilter.value===e.value}]),onClick:Li((function(t){return a(e)}),["prevent"])},k(e.name),11,Tm)})),128))])):"stop"===n.value?(Jr(),Kr("div",Sm,[(Jr(!0),Kr(Rr,null,ar(Ot(t).affectedStopsFilter,(function(e){return Jr(),Kr("button",{key:e.value,class:Y(["c-traffic-info__filter__btn",{"c-traffic-info__filter__btn--active":Ot(t).activeFilter&&Ot(t).activeFilter.value===e.value}]),onClick:Li((function(t){return a(e)}),["prevent"])},k(e.name),11,jm)})),128))])):oa("",!0)])}}}),Hm={key:0},Om={key:1},Em=["innerHTML"],Pm={key:1,class:"c-traffic-info__items"},Am=En({__name:"TrafficInfo",props:{endpoint:{type:String,required:!0}},setup:function(e){var t=e,n=$_();n.init(t.endpoint);var r=Ya((function(){return n.currentItemsFiltered.length?1===n.currentItemsFiltered.length?"Es liegt <strong>".concat(n.currentItemsFiltered.length.toString(),"</strong> aktuelle Meldung vor."):"Es liegen <strong>".concat(n.currentItemsFiltered.length.toString(),"</strong> aktuelle Meldungen vor."):""}));return function(e,t){return Ot(n).feedHasError?(Jr(),Kr("p",Hm," Ein Fehler ist aufgetreten. Derzeit stehen leider keine Infos zur Verfügung. ")):(Jr(),Kr("div",Om,[aa(xm),Ot(r)?(Jr(),Kr("h2",{key:0,class:"c-traffic-info__heading",innerHTML:Ot(r)},null,8,Em)):oa("",!0),Ot(n).currentItemsFiltered.length?(Jr(),Kr("div",Pm,[(Jr(!0),Kr(Rr,null,ar(Ot(n).currentItemsFiltered,(function(e){return Jr(),Zr(gm,{key:e.id,"add-info-item":e},null,8,["add-info-item"])})),128))])):oa("",!0)]))}}}),Fm=["href"],Cm=[ra("span",{class:"rvf-font","aria-hidden":"true"},"",-1),ra("span",null,[ra("strong",null,"Aktuell 1 Verkehrsmeldung"),sa(" anzeigen ")],-1),ra("span",{class:"rvf-font","aria-hidden":"true"},"",-1)],Im=["href"],Wm=ra("span",{class:"rvf-font","aria-hidden":"true"},"",-1),Rm=sa(" anzeigen "),zm=ra("span",{class:"rvf-font","aria-hidden":"true"},"",-1),Nm=["href"],qm=[ra("span",{class:"rvf-font","aria-hidden":"true"},"",-1),ra("span",null,[ra("strong",null,"Aktuelle Verkehrsmeldungen"),sa(" anzeigen ")],-1),ra("span",{class:"rvf-font","aria-hidden":"true"},"",-1)],Um=En({__name:"TrafficInfoButton",props:{endpoint:{type:String,required:!0},targetUrl:{type:String,required:!0}},setup:function(e){var t=e,n=$_();return n.init(t.endpoint),function(t,r){return Ot(n).currentItems.length?(Jr(),Kr(Rr,{key:0},[1===Ot(n).currentItems.length?(Jr(),Kr("a",{key:0,href:e.targetUrl,class:"btn-info"},Cm,8,Fm)):(Jr(),Kr("a",{key:1,href:e.targetUrl,class:"btn-info"},[Wm,ra("span",null,[ra("strong",null,"Aktuell "+k(Ot(n).currentItems.length.toString())+" Verkehrsmeldungen",1),Rm]),zm],8,Im))],64)):(Jr(),Kr("a",{key:1,href:e.targetUrl,class:"btn-info"},qm,8,Nm))}}});(new(function(){function t(){e(this,t),a(this,"efaSearchApplicationWrapper",null),a(this,"efaApplicationWrapper",null),a(this,"linkParser",new i),this.efaSearchApplicationWrapper=document.querySelector(".c-efa-search"),this.efaApplicationWrapper=document.querySelector(".c-efa")}return r(t,[{key:"run",value:function(){var e;this.linkParser.setExternalLinkTarget(),this.efaSearchApplicationWrapper&&(e=this.efaSearchApplicationWrapper)&&function(){if(e instanceof HTMLElement){var t=e.hasAttribute("data-disclaimer")?e.getAttribute("data-disclaimer"):null,n=e.hasAttribute("data-target-page")?e.getAttribute("data-target-page"):null,r=e.hasAttribute("data-enable-recent-search"),a={};a.enableRecentSearch=r,t&&(a.disclaimerText=t),n&&(a.targetPage=n),ki(Lo,a).mount(e)}}(),this.efaApplicationWrapper&&new h(this.efaApplicationWrapper),document.querySelectorAll(".c-time-tables").forEach((function(e){var t,n;e instanceof HTMLElement&&(n={},(t=e).hasAttribute("data-endpoints")&&(n.endpoints=JSON.parse(t.getAttribute("data-endpoints").toString())),t.hasAttribute("data-download-action")&&(n.downloadActionLink=t.getAttribute("data-download-action")),ki(zu,n).use(Wo()).mount(t))})),document.querySelectorAll(".c-jtbw-calc").forEach((function(e){var t,n;e instanceof HTMLElement&&(n={},(t=e).hasAttribute("data-endpoint-comparison")&&(n.endpoint=t.getAttribute("data-endpoint-comparison")),ki(Pd,n).use(Wo()).mount(t))})),document.querySelectorAll(".c-mg-form").forEach((function(e){var t,n;e instanceof HTMLElement&&(n={},(t=e).hasAttribute("data-functional-fields")&&(n.functionalHiddenFields=JSON.parse(t.getAttribute("data-functional-fields")),t.hasAttribute("data-endpoint-submit")&&(n.endpointSubmit=t.getAttribute("data-endpoint-submit")),t.hasAttribute("data-case-id")&&(n.caseId=t.getAttribute("data-case-id")),t.hasAttribute("data-endpoint-attachment")&&(n.endpointAttachment=t.getAttribute("data-endpoint-attachment")),t.hasAttribute("data-no-async")&&(n.apiSend=!1),"locations"in window&&(n.locationSelectOptions=window.locations),ki(W_,n).use(Wo()).mount(t)))})),document.querySelectorAll(".c-collapse").forEach((function(e){e instanceof HTMLElement&&function(e){var t=e.querySelector(".c-collapse__header"),n=e.querySelector(".c-collapse__panel"),r="c-collapse--open",a="c-collapse--in",i=!1,s=function t(i){"height"===i.propertyName&&(n.removeAttribute("style"),e.classList.add(r),e.classList.remove(a)),n.removeEventListener("transitionend",t)};t.addEventListener("click",(function(t){var o;t.preventDefault(),i?function(){var t=n.scrollHeight;n.style.height="".concat(t,"px"),setTimeout((function(){e.classList.remove(r),n.removeAttribute("style")}),50),i=!1}():(o=n.scrollHeight,n.style.height="".concat(o,"px"),e.classList.add(a),n.addEventListener("transitionend",s),i=!0)}))}(e)})),document.querySelectorAll(".c-accordion").forEach((function(e){e instanceof HTMLElement&&z_(e)})),document.querySelectorAll(".c-form").forEach((function(e){e instanceof HTMLFormElement&&V_(e)})),function(){var e=document.querySelector(".c-traffic-info");if(e&&e.hasAttribute("data-endpoint")){var t={endpoint:e.getAttribute("data-endpoint")};ki(Am,t).use(Wo()).mount(e)}var n=document.querySelector(".o-traffic-info-teaser");if(n&&n.hasAttribute("data-endpoint")&&n.hasAttribute("data-target-page")){var r={endpoint:n.getAttribute("data-endpoint"),targetUrl:n.getAttribute("data-target-page")};ki(Um,r).use(Wo()).mount(n)}}()}}]),t}())).run()}()}();
12247document.addEventListener("DOMContentLoaded", () => {
12248  // Init für alle Suggestion-Container
12249  document.querySelectorAll('.form-field__suggestions').forEach(container => {
12250    initFieldSuggestions(container);
12251  });
12252
12253  // Schließt alle offenen Suggestion-Listen
12254  function closeAllSuggestions() {
12255    document.querySelectorAll('.form-field__suggestions').forEach(c => {
12256      c.hidden = true;
12257      c.innerHTML = '';
12258      const input = c.parentElement.querySelector('.form-field__input');
12259      if (input) input.setAttribute('aria-expanded', 'false');
12260    });
12261  }
12262
12263  // Fokus/Klick außerhalb schließt alle
12264  document.addEventListener('focusin', event => {
12265    const inSuggestions = event.target.closest('.form-field__suggestions');
12266    const inInput       = event.target.matches('.form-field__input');
12267    if (!inSuggestions && !inInput) closeAllSuggestions();
12268  });
12269  document.addEventListener('click', event => {
12270    if (!event.target.closest('.form-field')) closeAllSuggestions();
12271  });
12272
12273  function initFieldSuggestions(container) {
12274    const input    = container.parentElement.querySelector('.form-field__input');
12275    const endpoint = container.getAttribute('data-endpoint');
12276    if (!input || !endpoint) return;
12277
12278    // IDs und ARIA
12279    const listId = input.id + '-list';
12280    container.id = listId;
12281    input.setAttribute('role', 'combobox');
12282    input.setAttribute('aria-autocomplete', 'list');
12283    input.setAttribute('aria-controls', listId);
12284    input.setAttribute('aria-expanded', 'false');
12285    if (input.required) input.setAttribute('aria-required', 'true');
12286
12287    const cityId    = input.getAttribute('data-city-id');
12288    const zipId     = input.getAttribute('data-zipcode-id');
12289    const countryId = input.getAttribute('data-country-id');
12290    let debounceTimeout, currentIndex = -1;
12291
12292    input.addEventListener('input', () => {
12293      clearTimeout(debounceTimeout);
12294      debounceTimeout = setTimeout(fetchSuggestions, 500);
12295    });
12296
12297    input.addEventListener('keydown', e => {
12298      const options = container.querySelectorAll('[role="option"]');
12299      if (e.key === 'Tab' && document.activeElement === input && options.length) {
12300        e.preventDefault();
12301        options[0].focus();
12302        currentIndex = 0;
12303        updateActive(options);
12304        return;
12305      }
12306      if (!options.length) return;
12307      if (e.key === 'ArrowDown') {
12308        e.preventDefault();
12309        currentIndex = Math.min(currentIndex + 1, options.length - 1);
12310        options[currentIndex].focus();
12311        updateActive(options);
12312        return;
12313      }
12314      if (e.key === 'ArrowUp') {
12315        e.preventDefault();
12316        currentIndex = Math.max(currentIndex - 1, 0);
12317        options[currentIndex].focus();
12318        updateActive(options);
12319        return;
12320      }
12321      if (e.key === 'Enter') {
12322        e.preventDefault();
12323        if (currentIndex < 0) currentIndex = 0;
12324        if (options[currentIndex]) options[currentIndex].click();
12325        return;
12326      }
12327      if (e.key === 'Escape') {
12328        closeList();
12329      }
12330    });
12331
12332    async function fetchSuggestions() {
12333      const q = input.value.trim();
12334      if (q.length < 2) { closeList(); return; }
12335      const url = new URL(endpoint, window.location.origin);
12336      url.searchParams.set('tx_rvfcountrydata_api[q]', q);
12337      if (countryId) {
12338        const iso = document.getElementById(countryId)?.value || '';
12339        url.searchParams.set('tx_rvfcountrydata_api[isocode]', iso);
12340      }
12341      try {
12342        const res = await fetch(url);
12343        if (!res.ok) throw new Error();
12344        const items = await res.json();
12345        renderSuggestions(items);
12346      } catch {
12347        console.error('Autocomplete error');
12348      }
12349    }
12350
12351    function renderSuggestions(items) {
12352      container.innerHTML = '';
12353      if (!items?.length) { closeList(); return; }
12354
12355      // Wrapper für Scroll-Clipping
12356      const wrapper = document.createElement('div');
12357      wrapper.className = 'form-field__suggestions-container';
12358
12359      const ul = document.createElement('ul');
12360      ul.className = 'form-field__suggestions-list';
12361      ul.setAttribute('role', 'listbox');
12362
12363      items.forEach((item, idx) => {
12364        const li = document.createElement('li');
12365        li.id = `${listId}-option-${idx}`;
12366        li.setAttribute('role', 'option');
12367        li.tabIndex = 0;
12368        li.textContent = `${item.zipcode} ${item.name}`;
12369        li.addEventListener('click', () => selectOption(item));
12370        li.addEventListener('keydown', e => {
12371          const opts = container.querySelectorAll('[role="option"]');
12372          if (e.key === 'ArrowDown') {
12373            e.preventDefault();
12374            const next = Math.min(idx + 1, opts.length - 1);
12375            opts[next].focus();
12376            currentIndex = next;
12377            updateActive(opts);
12378          }
12379          if (e.key === 'ArrowUp') {
12380            e.preventDefault();
12381            const prev = Math.max(idx - 1, 0);
12382            opts[prev].focus();
12383            currentIndex = prev;
12384            updateActive(opts);
12385          }
12386          if (e.key === 'Enter') {
12387            e.preventDefault();
12388            selectOption(item);
12389          }
12390          if (e.key === 'Tab') {
12391            e.preventDefault();
12392            if (idx === opts.length - 1) {
12393              closeList();
12394              input.focus();
12395            } else {
12396              opts[idx + 1].focus();
12397              currentIndex = idx + 1;
12398              updateActive(opts);
12399            }
12400          }
12401          if (e.key === 'Escape') {
12402            e.preventDefault();
12403            closeList();
12404            input.focus();
12405          }
12406        });
12407        ul.appendChild(li);
12408      });
12409
12410      wrapper.appendChild(ul);
12411      container.appendChild(wrapper);
12412      container.hidden = false;
12413      input.setAttribute('aria-expanded', 'true');
12414      currentIndex = -1;
12415    }
12416
12417    function updateActive(opts) {
12418      opts.forEach(o => o.classList.remove('active'));
12419      const active = opts[currentIndex];
12420      if (active) {
12421        active.classList.add('active');
12422        input.setAttribute('aria-activedescendant', active.id);
12423      }
12424    }
12425
12426    function selectOption(item) {
12427      if (zipId && input.dataset.zipcodeId) {
12428        document.getElementById(zipId).value = item.zipcode;
12429        input.value = item.name;
12430      } else if (cityId && input.dataset.cityId) {
12431        document.getElementById(cityId).value = item.name;
12432        input.value = item.zipcode;
12433      } else {
12434        input.value = `${item.zipcode} ${item.name}`;
12435      }
12436      closeList();
12437      input.focus();
12438    }
12439
12440    function closeList() {
12441      container.innerHTML = '';
12442      container.hidden = true;
12443      input.setAttribute('aria-expanded', 'false');
12444      input.removeAttribute('aria-activedescendant');
12445      currentIndex = -1;
12446    }
12447  }
12448});
12449
12450document.addEventListener("DOMContentLoaded", () => {
12451
12452	/**
12453	 * <span> inside all a.internal, a.external, a.download for CSS
12454	 */
12455
12456    document.querySelectorAll("a.internal, a.external, a.download").forEach(link => {
12457        if (!link.querySelector("span")) { // Verhindert doppeltes Einfügen
12458            let span = document.createElement("span");
12459            span.innerHTML = link.innerHTML;
12460            link.innerHTML = "";
12461            link.appendChild(span);
12462        }
12463    });
12464
12465
12466
12467	/**
12468	 * Wrap TYPO3 form select fields with div for CSS styling purposes
12469	 */
12470    (function() {
12471        const selects = document.querySelectorAll('.frame-type-form_formframework form select');
12472        
12473        selects.forEach(function(select) {
12474            if (!select.parentElement.classList.contains('select-wrapper')) {
12475                const wrapper = document.createElement('div');
12476                wrapper.className = 'select-wrapper';
12477                
12478                select.parentNode.insertBefore(wrapper, select);
12479                wrapper.appendChild(select);
12480            }
12481        });
12482    })();
12483
12484
12485	/**
12486	 * Toggles menu and search overlays
12487	 */
12488
12489	function trapMenuFocus() {
12490		const firstFocusable = document.getElementById('btnMenuClose');
12491		const lastFocusable = document.querySelector('#mainMenuContent > .legalNav > ul > li:last-child > a');
12492
12493		document.getElementById('mainMenu').addEventListener('keydown', function(event) {
12494			if (event.key === 'Tab') {
12495				if (event.shiftKey) {
12496					// Shift + Tab: Rückwärtsnavigation
12497					if (document.activeElement === firstFocusable) {
12498						event.preventDefault();
12499						lastFocusable.focus();
12500					}
12501				} else {
12502					// Tab: Vorwärtsnavigation
12503					if (document.activeElement === lastFocusable) {
12504						event.preventDefault();
12505						firstFocusable.focus();
12506					}
12507				}
12508			}
12509		});
12510	}
12511
12512	function trapSearchFocus() {
12513		const firstFocusable = document.getElementById('quickSearchTerm');
12514		const lastFocusable = document.getElementById('btnSearchClose');
12515	
12516		document.getElementById('headerBarSearch').addEventListener('keydown', function(event) {
12517			if (event.key === 'Tab') {
12518				if (event.shiftKey) {
12519					// Shift + Tab: Rückwärtsnavigation
12520					if (document.activeElement === firstFocusable) {
12521						event.preventDefault();
12522						lastFocusable.focus();
12523					}
12524				} else {
12525					// Tab: Vorwärtsnavigation
12526					if (document.activeElement === lastFocusable) {
12527						event.preventDefault();
12528						firstFocusable.focus();
12529					}
12530				}
12531			}
12532		});
12533	}
12534
12535	function openMenu() {
12536		trapMenuFocus();
12537		document.getElementById('btnMenuOpen').setAttribute('aria-expanded', 'true');
12538		const html = document.documentElement;
12539		html.classList.remove('overlay-search-visible');
12540		html.classList.add('overlay-menu-visible');
12541
12542		const mainMenu = document.getElementById('mainMenu');
12543		mainMenu.addEventListener('transitionend', function setFocus() {
12544			document.getElementById('btnMenuClose').focus();
12545			mainMenu.removeEventListener('transitionend', setFocus);
12546		});
12547	}
12548
12549	function openSearch() {
12550		trapSearchFocus();
12551		document.getElementById('btnSearchOpen').setAttribute('aria-expanded', 'true');
12552		const html = document.documentElement;
12553		html.classList.remove('overlay-menu-visible');
12554		html.classList.add('overlay-search-visible');
12555		document.getElementById('quickSearchTerm').focus();
12556	}
12557
12558	function closeMenu() {
12559		document.getElementById('btnMenuOpen').setAttribute('aria-expanded', 'false');
12560		const html = document.documentElement;
12561		html.classList.remove('overlay-menu-visible', 'overlay-search-visible');
12562		document.getElementById('btnMenuOpen').focus();
12563	}
12564
12565	function closeSearch() {
12566		document.getElementById('btnSearchOpen').setAttribute('aria-expanded', 'false');
12567		const html = document.documentElement;
12568		html.classList.remove('overlay-menu-visible', 'overlay-search-visible');
12569		document.getElementById('btnSearchOpen').focus();
12570	}
12571
12572	document.querySelectorAll('.openMenu').forEach(element => {
12573		element.addEventListener('click', function(event) {
12574			event.preventDefault();
12575			openMenu();
12576		});
12577	});
12578	document.querySelectorAll('.openSearch').forEach(element => {
12579		element.addEventListener('click', function(event) {
12580			event.preventDefault();
12581			openSearch();
12582		});
12583	});
12584	document.querySelectorAll('.closeMenu').forEach(element => {
12585		element.addEventListener('click', function(event) {
12586			event.preventDefault();
12587			closeMenu();
12588		});
12589	});
12590	document.querySelectorAll('.closeSearch').forEach(element => {
12591		element.addEventListener('click', function(event) {
12592			event.preventDefault();
12593			closeSearch();
12594		});
12595	});
12596
12597
12598	/**
12599	 * Toggle #headerBar based on scroll position and direction.
12600	 */
12601
12602	let lastScrollTop = 0;
12603	const headerBar = document.querySelector("#headerBar");
12604	const headerHeight = headerBar.offsetHeight;
12605
12606	window.addEventListener("scroll", () => {
12607		const scrollTop = window.scrollY || document.documentElement.scrollTop;
12608	
12609		// Apply `header-fixed` class only after header is fully scrolled out of view
12610		if (scrollTop > headerHeight) {
12611			document.documentElement.classList.add("header-fixed");
12612	
12613			// Toggle `header-hidden` class based on scroll direction
12614			if (scrollTop > lastScrollTop) {
12615				document.documentElement.classList.add("header-hidden");
12616			} else {
12617				document.documentElement.classList.remove("header-hidden");
12618			}
12619		} else {
12620			// Reset classes if above header height
12621			document.documentElement.classList.remove("header-fixed", "header-hidden");
12622		}
12623	
12624		lastScrollTop = scrollTop;
12625	});
12626
12627
12628	/**
12629     * Scroll with offset for anchor links and on page load
12630     */
12631
12632	function scrollWithOffset(targetId) {
12633		const offset = 140; // Versatz in Pixeln
12634		const targetElement = document.querySelector(targetId);
12635
12636		if (targetElement) {
12637			const elementPosition = targetElement.getBoundingClientRect().top + window.scrollY;
12638			const offsetPosition = elementPosition - offset;
12639
12640			window.scrollTo({
12641				top: offsetPosition,
12642				behavior: 'smooth' // Smooth scrolling
12643			});
12644		}
12645	}
12646
12647	// 1. Scrollen bei Seitenaufruf mit Anker
12648	window.addEventListener('load', () => {
12649		if (window.location.hash) {
12650			// Scrollposition nachjustieren, nachdem der Browser automatisch gescrollt hat
12651			setTimeout(() => {
12652				scrollWithOffset(window.location.hash);
12653			}, 0);
12654		}
12655	});
12656
12657	// 2. Scrollen bei Klick auf Anker-Links
12658	document.querySelectorAll('a[href^="#"]').forEach(anchor => {
12659		anchor.addEventListener('click', function (e) {
12660			e.preventDefault(); // Verhindert Standardverhalten
12661			const targetId = this.getAttribute('href');
12662			scrollWithOffset(targetId);
12663		});
12664	});
12665
12666
12667	/**
12668	 * Add .ios or .android class
12669	 */
12670	(function () {
12671
12672		const isIOS = (() => {
12673			if (navigator.userAgentData?.platform) {
12674				return /iOS/.test(navigator.userAgentData.platform);
12675			}
12676			return /iPhone|iPad|iPod/.test(navigator.userAgent) || 
12677				   (navigator.userAgent.includes("Mac") && "ontouchend" in document);
12678		})();
12679	
12680		const isAndroid = (() => {
12681			if (navigator.userAgentData?.platform) {
12682				return /Android/.test(navigator.userAgentData.platform);
12683			}
12684			return /android/i.test(navigator.userAgent);
12685		})();
12686	
12687		document.documentElement.classList.toggle("ios", isIOS);
12688		document.documentElement.classList.toggle("android", isAndroid);
12689
12690    })();
12691
12692});

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.