/* Minification failed. Returning unminified contents.
(18857,45-46): run-time error JS1195: Expected expression: >
(18867,35-36): run-time error JS1014: Invalid character: `
(18867,37-38): run-time error JS1193: Expected ',' or ')': {
(18867,55-58): run-time error JS1004: Expected ';': not
(18867,64-65): run-time error JS1014: Invalid character: `
(18869,13-14): run-time error JS1193: Expected ',' or ')': }
(18869,14-15): run-time error JS1006: Expected ')': ;
(18874,9-10): run-time error JS1002: Syntax error: }
(18886,23-24): run-time error JS1004: Expected ';': {
(18926,2-3): run-time error JS1195: Expected expression: )
(18928,23-24): run-time error JS1004: Expected ';': {
(19105,2-3): run-time error JS1195: Expected expression: )
(19107,22-23): run-time error JS1004: Expected ';': {
(19134,2-3): run-time error JS1195: Expected expression: )
(19136,23-24): run-time error JS1004: Expected ';': {
(19163,2-3): run-time error JS1195: Expected expression: )
(19165,23-24): run-time error JS1004: Expected ';': {
(19181,2-3): run-time error JS1195: Expected expression: )
(19181,10-11): run-time error JS1197: Too many errors. The file might not be a JavaScript file: ,
 */
(function (global, factory) {
  typeof exports === 'object' && typeof module !== 'undefined' ? factory() :
  typeof define === 'function' && define.amd ? define(factory) :
  (factory());
}(this, (function () { 'use strict';

  function shave(target, maxHeight) {
    var opts = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};

    if (!maxHeight) throw Error('maxHeight is required');
    var els = typeof target === 'string' ? document.querySelectorAll(target) : target;
    if (!els) return;

    var character = opts.character || '…';
    var classname = opts.classname || 'js-shave';
    var spaces = opts.spaces || true;
    var charHtml = '<span class="js-shave-char">' + character + '</span>';

    if (!('length' in els)) els = [els];
    for (var i = 0; i < els.length; i += 1) {
      var el = els[i];
      var styles = el.style;
      var span = el.querySelector('.' + classname);
      var textProp = el.textContent === undefined ? 'innerText' : 'textContent';

      // If element text has already been shaved
      if (span) {
        // Remove the ellipsis to recapture the original text
        el.removeChild(el.querySelector('.js-shave-char'));
        el[textProp] = el[textProp]; // eslint-disable-line
        // nuke span, recombine text
      }

      var fullText = el[textProp];
      var words = spaces ? fullText : fullText.split(' ');

      // If 0 or 1 words, we're done
      if (words.length < 2) continue;

      // Temporarily remove any CSS height for text height calculation
      var heightStyle = styles.height;
      styles.height = 'auto';
      var maxHeightStyle = styles.maxHeight;
      styles.maxHeight = 'none';

      // If already short enough, we're done
      if (el.offsetHeight <= maxHeight) {
        styles.height = heightStyle;
        styles.maxHeight = maxHeightStyle;
        continue;
      }

      // Binary search for number of words which can fit in allotted height
      var max = words.length - 1;
      var min = 0;
      var pivot = void 0;
      while (min < max) {
        pivot = min + max + 1 >> 1; // eslint-disable-line no-bitwise
        el[textProp] = spaces ? words.slice(0, pivot) : words.slice(0, pivot).join(' ');
        el.insertAdjacentHTML('beforeend', charHtml);
		
        if (el.offsetHeight > maxHeight) {
			max = spaces ? pivot - 2 : pivot - 1;
			if (max == 0) {
				// a return of zero is substr(0,0) = ''
				max = -1;
			}
		} else { 
			min = pivot;
		}
		
      }

      el[textProp] = spaces ? words.slice(0, max) : words.slice(0, max).join(' ');
      el.insertAdjacentHTML('beforeend', charHtml);
      var diff = spaces ? words.slice(max) : words.slice(max).join(' ');

      el.insertAdjacentHTML('beforeend', '<span class="' + classname + '" style="display:none;">' + diff + '</span>');

      styles.height = heightStyle;
      styles.maxHeight = maxHeightStyle;
    }
  }

  /* global window */

  if (typeof window !== 'undefined') {
    var plugin = window.$ || window.jQuery || window.Zepto;
    if (plugin) {
      plugin.fn.shave = function shavePlugin(maxHeight, opts) {
        shave(this, maxHeight, opts);
        return this;
      };
    }
  }

})));

(function(root,factory){if(root===null){throw new Error("Google-maps package can be used only in browser")}if(typeof define==="function"&&define.amd){define(factory)}else if(typeof exports==="object"){module.exports=factory()}else{root.GoogleMapsLoader=factory()}})(typeof window!=="undefined"?window:null,function(){"use strict";var googleVersion="3.31";var script=null;var google=null;var loading=false;var callbacks=[];var onLoadEvents=[];var originalCreateLoaderMethod=null;var GoogleMapsLoader={};GoogleMapsLoader.URL="https://maps.googleapis.com/maps/api/js";GoogleMapsLoader.KEY=null;GoogleMapsLoader.LIBRARIES=[];GoogleMapsLoader.CLIENT=null;GoogleMapsLoader.CHANNEL=null;GoogleMapsLoader.LANGUAGE=null;GoogleMapsLoader.REGION=null;GoogleMapsLoader.VERSION=googleVersion;GoogleMapsLoader.WINDOW_CALLBACK_NAME="__google_maps_api_provider_initializator__";GoogleMapsLoader._googleMockApiObject={};GoogleMapsLoader.load=function(fn){if(google===null){if(loading===true){if(fn){callbacks.push(fn)}}else{loading=true;window[GoogleMapsLoader.WINDOW_CALLBACK_NAME]=function(){ready(fn)};GoogleMapsLoader.createLoader()}}else if(fn){fn(google)}};GoogleMapsLoader.createLoader=function(){script=document.createElement("script");script.type="text/javascript";script.src=GoogleMapsLoader.createUrl();document.body.appendChild(script)};GoogleMapsLoader.isLoaded=function(){return google!==null};GoogleMapsLoader.createUrl=function(){var url=GoogleMapsLoader.URL;url+="?callback="+GoogleMapsLoader.WINDOW_CALLBACK_NAME;if(GoogleMapsLoader.KEY){url+="&key="+GoogleMapsLoader.KEY}if(GoogleMapsLoader.LIBRARIES.length>0){url+="&libraries="+GoogleMapsLoader.LIBRARIES.join(",")}if(GoogleMapsLoader.CLIENT){url+="&client="+GoogleMapsLoader.CLIENT}if(GoogleMapsLoader.CHANNEL){url+="&channel="+GoogleMapsLoader.CHANNEL}if(GoogleMapsLoader.LANGUAGE){url+="&language="+GoogleMapsLoader.LANGUAGE}if(GoogleMapsLoader.REGION){url+="&region="+GoogleMapsLoader.REGION}if(GoogleMapsLoader.VERSION){url+="&v="+GoogleMapsLoader.VERSION}return url};GoogleMapsLoader.release=function(fn){var release=function(){GoogleMapsLoader.KEY=null;GoogleMapsLoader.LIBRARIES=[];GoogleMapsLoader.CLIENT=null;GoogleMapsLoader.CHANNEL=null;GoogleMapsLoader.LANGUAGE=null;GoogleMapsLoader.REGION=null;GoogleMapsLoader.VERSION=googleVersion;google=null;loading=false;callbacks=[];onLoadEvents=[];if(typeof window.google!=="undefined"){delete window.google}if(typeof window[GoogleMapsLoader.WINDOW_CALLBACK_NAME]!=="undefined"){delete window[GoogleMapsLoader.WINDOW_CALLBACK_NAME]}if(originalCreateLoaderMethod!==null){GoogleMapsLoader.createLoader=originalCreateLoaderMethod;originalCreateLoaderMethod=null}if(script!==null){script.parentElement.removeChild(script);script=null}if(fn){fn()}};if(loading){GoogleMapsLoader.load(function(){release()})}else{release()}};GoogleMapsLoader.onLoad=function(fn){onLoadEvents.push(fn)};GoogleMapsLoader.makeMock=function(){originalCreateLoaderMethod=GoogleMapsLoader.createLoader;GoogleMapsLoader.createLoader=function(){window.google=GoogleMapsLoader._googleMockApiObject;window[GoogleMapsLoader.WINDOW_CALLBACK_NAME]()}};var ready=function(fn){var i;loading=false;if(google===null){google=window.google}for(i=0;i<onLoadEvents.length;i++){onLoadEvents[i](google)}if(fn){fn(google)}for(i=0;i<callbacks.length;i++){callbacks[i](google)}callbacks=[]};return GoogleMapsLoader});
!function(e,a){"object"==typeof exports&&"undefined"!=typeof module?module.exports=a():"function"==typeof define&&define.amd?define(a):e.moment=a()}(this,function(){"use strict";var e,n;function l(){return e.apply(null,arguments)}function _(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function i(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function o(e){return void 0===e}function m(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function u(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function M(e,a){var t,s=[];for(t=0;t<e.length;++t)s.push(a(e[t],t));return s}function h(e,a){return Object.prototype.hasOwnProperty.call(e,a)}function L(e,a){for(var t in a)h(a,t)&&(e[t]=a[t]);return h(a,"toString")&&(e.toString=a.toString),h(a,"valueOf")&&(e.valueOf=a.valueOf),e}function c(e,a,t,s){return Sa(e,a,t,s,!0).utc()}function Y(e){return null==e._pf&&(e._pf={empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],meridiem:null,rfc2822:!1,weekdayMismatch:!1}),e._pf}function y(e){if(null==e._isValid){var a=Y(e),t=n.call(a.parsedDateParts,function(e){return null!=e}),s=!isNaN(e._d.getTime())&&a.overflow<0&&!a.empty&&!a.invalidMonth&&!a.invalidWeekday&&!a.weekdayMismatch&&!a.nullInput&&!a.invalidFormat&&!a.userInvalidated&&(!a.meridiem||a.meridiem&&t);if(e._strict&&(s=s&&0===a.charsLeftOver&&0===a.unusedTokens.length&&void 0===a.bigHour),null!=Object.isFrozen&&Object.isFrozen(e))return s;e._isValid=s}return e._isValid}function f(e){var a=c(NaN);return null!=e?L(Y(a),e):Y(a).userInvalidated=!0,a}n=Array.prototype.some?Array.prototype.some:function(e){for(var a=Object(this),t=a.length>>>0,s=0;s<t;s++)if(s in a&&e.call(this,a[s],s,a))return!0;return!1};var d=l.momentProperties=[];function k(e,a){var t,s,n;if(o(a._isAMomentObject)||(e._isAMomentObject=a._isAMomentObject),o(a._i)||(e._i=a._i),o(a._f)||(e._f=a._f),o(a._l)||(e._l=a._l),o(a._strict)||(e._strict=a._strict),o(a._tzm)||(e._tzm=a._tzm),o(a._isUTC)||(e._isUTC=a._isUTC),o(a._offset)||(e._offset=a._offset),o(a._pf)||(e._pf=Y(a)),o(a._locale)||(e._locale=a._locale),0<d.length)for(t=0;t<d.length;t++)o(n=a[s=d[t]])||(e[s]=n);return e}var a=!1;function p(e){k(this,e),this._d=new Date(null!=e._d?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===a&&(a=!0,l.updateOffset(this),a=!1)}function D(e){return e instanceof p||null!=e&&null!=e._isAMomentObject}function T(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function g(e){var a=+e,t=0;return 0!==a&&isFinite(a)&&(t=T(a)),t}function r(e,a,t){var s,n=Math.min(e.length,a.length),d=Math.abs(e.length-a.length),r=0;for(s=0;s<n;s++)(t&&e[s]!==a[s]||!t&&g(e[s])!==g(a[s]))&&r++;return r+d}function w(e){!1===l.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+e)}function t(n,d){var r=!0;return L(function(){if(null!=l.deprecationHandler&&l.deprecationHandler(null,n),r){for(var e,a=[],t=0;t<arguments.length;t++){if(e="","object"==typeof arguments[t]){for(var s in e+="\n["+t+"] ",arguments[0])e+=s+": "+arguments[0][s]+", ";e=e.slice(0,-2)}else e=arguments[t];a.push(e)}w(n+"\nArguments: "+Array.prototype.slice.call(a).join("")+"\n"+(new Error).stack),r=!1}return d.apply(this,arguments)},d)}var s,v={};function S(e,a){null!=l.deprecationHandler&&l.deprecationHandler(e,a),v[e]||(w(a),v[e]=!0)}function H(e){return e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}function b(e,a){var t,s=L({},e);for(t in a)h(a,t)&&(i(e[t])&&i(a[t])?(s[t]={},L(s[t],e[t]),L(s[t],a[t])):null!=a[t]?s[t]=a[t]:delete s[t]);for(t in e)h(e,t)&&!h(a,t)&&i(e[t])&&(s[t]=L({},s[t]));return s}function j(e){null!=e&&this.set(e)}l.suppressDeprecationWarnings=!1,l.deprecationHandler=null,s=Object.keys?Object.keys:function(e){var a,t=[];for(a in e)h(e,a)&&t.push(a);return t};var x={};function O(e,a){var t=e.toLowerCase();x[t]=x[t+"s"]=x[a]=e}function P(e){return"string"==typeof e?x[e]||x[e.toLowerCase()]:void 0}function W(e){var a,t,s={};for(t in e)h(e,t)&&(a=P(t))&&(s[a]=e[t]);return s}var A={};function E(e,a){A[e]=a}function F(e,a,t){var s=""+Math.abs(e),n=a-s.length;return(0<=e?t?"+":"":"-")+Math.pow(10,Math.max(0,n)).toString().substr(1)+s}var z=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,J=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,N={},R={};function C(e,a,t,s){var n=s;"string"==typeof s&&(n=function(){return this[s]()}),e&&(R[e]=n),a&&(R[a[0]]=function(){return F(n.apply(this,arguments),a[1],a[2])}),t&&(R[t]=function(){return this.localeData().ordinal(n.apply(this,arguments),e)})}function I(e,a){return e.isValid()?(a=U(a,e.localeData()),N[a]=N[a]||function(s){var e,n,a,d=s.match(z);for(e=0,n=d.length;e<n;e++)R[d[e]]?d[e]=R[d[e]]:d[e]=(a=d[e]).match(/\[[\s\S]/)?a.replace(/^\[|\]$/g,""):a.replace(/\\/g,"");return function(e){var a,t="";for(a=0;a<n;a++)t+=H(d[a])?d[a].call(e,s):d[a];return t}}(a),N[a](e)):e.localeData().invalidDate()}function U(e,a){var t=5;function s(e){return a.longDateFormat(e)||e}for(J.lastIndex=0;0<=t&&J.test(e);)e=e.replace(J,s),J.lastIndex=0,t-=1;return e}var G=/\d/,V=/\d\d/,K=/\d{3}/,Z=/\d{4}/,$=/[+-]?\d{6}/,B=/\d\d?/,q=/\d\d\d\d?/,Q=/\d\d\d\d\d\d?/,X=/\d{1,3}/,ee=/\d{1,4}/,ae=/[+-]?\d{1,6}/,te=/\d+/,se=/[+-]?\d+/,ne=/Z|[+-]\d\d:?\d\d/gi,de=/Z|[+-]\d\d(?::?\d\d)?/gi,re=/[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,_e={};function ie(e,t,s){_e[e]=H(t)?t:function(e,a){return e&&s?s:t}}function oe(e,a){return h(_e,e)?_e[e](a._strict,a._locale):new RegExp(me(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(e,a,t,s,n){return a||t||s||n})))}function me(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}var ue={};function le(e,t){var a,s=t;for("string"==typeof e&&(e=[e]),m(t)&&(s=function(e,a){a[t]=g(e)}),a=0;a<e.length;a++)ue[e[a]]=s}function Me(e,n){le(e,function(e,a,t,s){t._w=t._w||{},n(e,t._w,t,s)})}var he=0,Le=1,ce=2,Ye=3,ye=4,fe=5,ke=6,pe=7,De=8;function Te(e){return ge(e)?366:365}function ge(e){return e%4==0&&e%100!=0||e%400==0}C("Y",0,0,function(){var e=this.year();return e<=9999?""+e:"+"+e}),C(0,["YY",2],0,function(){return this.year()%100}),C(0,["YYYY",4],0,"year"),C(0,["YYYYY",5],0,"year"),C(0,["YYYYYY",6,!0],0,"year"),O("year","y"),E("year",1),ie("Y",se),ie("YY",B,V),ie("YYYY",ee,Z),ie("YYYYY",ae,$),ie("YYYYYY",ae,$),le(["YYYYY","YYYYYY"],he),le("YYYY",function(e,a){a[he]=2===e.length?l.parseTwoDigitYear(e):g(e)}),le("YY",function(e,a){a[he]=l.parseTwoDigitYear(e)}),le("Y",function(e,a){a[he]=parseInt(e,10)}),l.parseTwoDigitYear=function(e){return g(e)+(68<g(e)?1900:2e3)};var we,ve=Se("FullYear",!0);function Se(a,t){return function(e){return null!=e?(be(this,a,e),l.updateOffset(this,t),this):He(this,a)}}function He(e,a){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+a]():NaN}function be(e,a,t){e.isValid()&&!isNaN(t)&&("FullYear"===a&&ge(e.year())&&1===e.month()&&29===e.date()?e._d["set"+(e._isUTC?"UTC":"")+a](t,e.month(),je(t,e.month())):e._d["set"+(e._isUTC?"UTC":"")+a](t))}function je(e,a){if(isNaN(e)||isNaN(a))return NaN;var t,s=(a%(t=12)+t)%t;return e+=(a-s)/12,1===s?ge(e)?29:28:31-s%7%2}we=Array.prototype.indexOf?Array.prototype.indexOf:function(e){var a;for(a=0;a<this.length;++a)if(this[a]===e)return a;return-1},C("M",["MM",2],"Mo",function(){return this.month()+1}),C("MMM",0,0,function(e){return this.localeData().monthsShort(this,e)}),C("MMMM",0,0,function(e){return this.localeData().months(this,e)}),O("month","M"),E("month",8),ie("M",B),ie("MM",B,V),ie("MMM",function(e,a){return a.monthsShortRegex(e)}),ie("MMMM",function(e,a){return a.monthsRegex(e)}),le(["M","MM"],function(e,a){a[Le]=g(e)-1}),le(["MMM","MMMM"],function(e,a,t,s){var n=t._locale.monthsParse(e,s,t._strict);null!=n?a[Le]=n:Y(t).invalidMonth=e});var xe=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,Oe="January_February_March_April_May_June_July_August_September_October_November_December".split("_");var Pe="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_");function We(e,a){var t;if(!e.isValid())return e;if("string"==typeof a)if(/^\d+$/.test(a))a=g(a);else if(!m(a=e.localeData().monthsParse(a)))return e;return t=Math.min(e.date(),je(e.year(),a)),e._d["set"+(e._isUTC?"UTC":"")+"Month"](a,t),e}function Ae(e){return null!=e?(We(this,e),l.updateOffset(this,!0),this):He(this,"Month")}var Ee=re;var Fe=re;function ze(){function e(e,a){return a.length-e.length}var a,t,s=[],n=[],d=[];for(a=0;a<12;a++)t=c([2e3,a]),s.push(this.monthsShort(t,"")),n.push(this.months(t,"")),d.push(this.months(t,"")),d.push(this.monthsShort(t,""));for(s.sort(e),n.sort(e),d.sort(e),a=0;a<12;a++)s[a]=me(s[a]),n[a]=me(n[a]);for(a=0;a<24;a++)d[a]=me(d[a]);this._monthsRegex=new RegExp("^("+d.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+s.join("|")+")","i")}function Je(e){var a;if(e<100&&0<=e){var t=Array.prototype.slice.call(arguments);t[0]=e+400,a=new Date(Date.UTC.apply(null,t)),isFinite(a.getUTCFullYear())&&a.setUTCFullYear(e)}else a=new Date(Date.UTC.apply(null,arguments));return a}function Ne(e,a,t){var s=7+a-t;return-((7+Je(e,0,s).getUTCDay()-a)%7)+s-1}function Re(e,a,t,s,n){var d,r,_=1+7*(a-1)+(7+t-s)%7+Ne(e,s,n);return r=_<=0?Te(d=e-1)+_:_>Te(e)?(d=e+1,_-Te(e)):(d=e,_),{year:d,dayOfYear:r}}function Ce(e,a,t){var s,n,d=Ne(e.year(),a,t),r=Math.floor((e.dayOfYear()-d-1)/7)+1;return r<1?s=r+Ie(n=e.year()-1,a,t):r>Ie(e.year(),a,t)?(s=r-Ie(e.year(),a,t),n=e.year()+1):(n=e.year(),s=r),{week:s,year:n}}function Ie(e,a,t){var s=Ne(e,a,t),n=Ne(e+1,a,t);return(Te(e)-s+n)/7}C("w",["ww",2],"wo","week"),C("W",["WW",2],"Wo","isoWeek"),O("week","w"),O("isoWeek","W"),E("week",5),E("isoWeek",5),ie("w",B),ie("ww",B,V),ie("W",B),ie("WW",B,V),Me(["w","ww","W","WW"],function(e,a,t,s){a[s.substr(0,1)]=g(e)});function Ue(e,a){return e.slice(a,7).concat(e.slice(0,a))}C("d",0,"do","day"),C("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),C("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),C("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),C("e",0,0,"weekday"),C("E",0,0,"isoWeekday"),O("day","d"),O("weekday","e"),O("isoWeekday","E"),E("day",11),E("weekday",11),E("isoWeekday",11),ie("d",B),ie("e",B),ie("E",B),ie("dd",function(e,a){return a.weekdaysMinRegex(e)}),ie("ddd",function(e,a){return a.weekdaysShortRegex(e)}),ie("dddd",function(e,a){return a.weekdaysRegex(e)}),Me(["dd","ddd","dddd"],function(e,a,t,s){var n=t._locale.weekdaysParse(e,s,t._strict);null!=n?a.d=n:Y(t).invalidWeekday=e}),Me(["d","e","E"],function(e,a,t,s){a[s]=g(e)});var Ge="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_");var Ve="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_");var Ke="Su_Mo_Tu_We_Th_Fr_Sa".split("_");var Ze=re;var $e=re;var Be=re;function qe(){function e(e,a){return a.length-e.length}var a,t,s,n,d,r=[],_=[],i=[],o=[];for(a=0;a<7;a++)t=c([2e3,1]).day(a),s=this.weekdaysMin(t,""),n=this.weekdaysShort(t,""),d=this.weekdays(t,""),r.push(s),_.push(n),i.push(d),o.push(s),o.push(n),o.push(d);for(r.sort(e),_.sort(e),i.sort(e),o.sort(e),a=0;a<7;a++)_[a]=me(_[a]),i[a]=me(i[a]),o[a]=me(o[a]);this._weekdaysRegex=new RegExp("^("+o.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+i.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+_.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+r.join("|")+")","i")}function Qe(){return this.hours()%12||12}function Xe(e,a){C(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),a)})}function ea(e,a){return a._meridiemParse}C("H",["HH",2],0,"hour"),C("h",["hh",2],0,Qe),C("k",["kk",2],0,function(){return this.hours()||24}),C("hmm",0,0,function(){return""+Qe.apply(this)+F(this.minutes(),2)}),C("hmmss",0,0,function(){return""+Qe.apply(this)+F(this.minutes(),2)+F(this.seconds(),2)}),C("Hmm",0,0,function(){return""+this.hours()+F(this.minutes(),2)}),C("Hmmss",0,0,function(){return""+this.hours()+F(this.minutes(),2)+F(this.seconds(),2)}),Xe("a",!0),Xe("A",!1),O("hour","h"),E("hour",13),ie("a",ea),ie("A",ea),ie("H",B),ie("h",B),ie("k",B),ie("HH",B,V),ie("hh",B,V),ie("kk",B,V),ie("hmm",q),ie("hmmss",Q),ie("Hmm",q),ie("Hmmss",Q),le(["H","HH"],Ye),le(["k","kk"],function(e,a,t){var s=g(e);a[Ye]=24===s?0:s}),le(["a","A"],function(e,a,t){t._isPm=t._locale.isPM(e),t._meridiem=e}),le(["h","hh"],function(e,a,t){a[Ye]=g(e),Y(t).bigHour=!0}),le("hmm",function(e,a,t){var s=e.length-2;a[Ye]=g(e.substr(0,s)),a[ye]=g(e.substr(s)),Y(t).bigHour=!0}),le("hmmss",function(e,a,t){var s=e.length-4,n=e.length-2;a[Ye]=g(e.substr(0,s)),a[ye]=g(e.substr(s,2)),a[fe]=g(e.substr(n)),Y(t).bigHour=!0}),le("Hmm",function(e,a,t){var s=e.length-2;a[Ye]=g(e.substr(0,s)),a[ye]=g(e.substr(s))}),le("Hmmss",function(e,a,t){var s=e.length-4,n=e.length-2;a[Ye]=g(e.substr(0,s)),a[ye]=g(e.substr(s,2)),a[fe]=g(e.substr(n))});var aa,ta=Se("Hours",!0),sa={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",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:Oe,monthsShort:Pe,week:{dow:0,doy:6},weekdays:Ge,weekdaysMin:Ke,weekdaysShort:Ve,meridiemParse:/[ap]\.?m?\.?/i},na={},da={};function ra(e){return e?e.toLowerCase().replace("_","-"):e}function _a(e){var a=null;if(!na[e]&&"undefined"!=typeof module&&module&&module.exports)try{a=aa._abbr,require("./locale/"+e),ia(a)}catch(e){}return na[e]}function ia(e,a){var t;return e&&((t=o(a)?ma(e):oa(e,a))?aa=t:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),aa._abbr}function oa(e,a){if(null===a)return delete na[e],null;var t,s=sa;if(a.abbr=e,null!=na[e])S("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."),s=na[e]._config;else if(null!=a.parentLocale)if(null!=na[a.parentLocale])s=na[a.parentLocale]._config;else{if(null==(t=_a(a.parentLocale)))return da[a.parentLocale]||(da[a.parentLocale]=[]),da[a.parentLocale].push({name:e,config:a}),null;s=t._config}return na[e]=new j(b(s,a)),da[e]&&da[e].forEach(function(e){oa(e.name,e.config)}),ia(e),na[e]}function ma(e){var a;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return aa;if(!_(e)){if(a=_a(e))return a;e=[e]}return function(e){for(var a,t,s,n,d=0;d<e.length;){for(a=(n=ra(e[d]).split("-")).length,t=(t=ra(e[d+1]))?t.split("-"):null;0<a;){if(s=_a(n.slice(0,a).join("-")))return s;if(t&&t.length>=a&&r(n,t,!0)>=a-1)break;a--}d++}return aa}(e)}function ua(e){var a,t=e._a;return t&&-2===Y(e).overflow&&(a=t[Le]<0||11<t[Le]?Le:t[ce]<1||t[ce]>je(t[he],t[Le])?ce:t[Ye]<0||24<t[Ye]||24===t[Ye]&&(0!==t[ye]||0!==t[fe]||0!==t[ke])?Ye:t[ye]<0||59<t[ye]?ye:t[fe]<0||59<t[fe]?fe:t[ke]<0||999<t[ke]?ke:-1,Y(e)._overflowDayOfYear&&(a<he||ce<a)&&(a=ce),Y(e)._overflowWeeks&&-1===a&&(a=pe),Y(e)._overflowWeekday&&-1===a&&(a=De),Y(e).overflow=a),e}function la(e,a,t){return null!=e?e:null!=a?a:t}function Ma(e){var a,t,s,n,d,r=[];if(!e._d){var _,i;for(_=e,i=new Date(l.now()),s=_._useUTC?[i.getUTCFullYear(),i.getUTCMonth(),i.getUTCDate()]:[i.getFullYear(),i.getMonth(),i.getDate()],e._w&&null==e._a[ce]&&null==e._a[Le]&&function(e){var a,t,s,n,d,r,_,i;if(null!=(a=e._w).GG||null!=a.W||null!=a.E)d=1,r=4,t=la(a.GG,e._a[he],Ce(Ha(),1,4).year),s=la(a.W,1),((n=la(a.E,1))<1||7<n)&&(i=!0);else{d=e._locale._week.dow,r=e._locale._week.doy;var o=Ce(Ha(),d,r);t=la(a.gg,e._a[he],o.year),s=la(a.w,o.week),null!=a.d?((n=a.d)<0||6<n)&&(i=!0):null!=a.e?(n=a.e+d,(a.e<0||6<a.e)&&(i=!0)):n=d}s<1||s>Ie(t,d,r)?Y(e)._overflowWeeks=!0:null!=i?Y(e)._overflowWeekday=!0:(_=Re(t,s,n,d,r),e._a[he]=_.year,e._dayOfYear=_.dayOfYear)}(e),null!=e._dayOfYear&&(d=la(e._a[he],s[he]),(e._dayOfYear>Te(d)||0===e._dayOfYear)&&(Y(e)._overflowDayOfYear=!0),t=Je(d,0,e._dayOfYear),e._a[Le]=t.getUTCMonth(),e._a[ce]=t.getUTCDate()),a=0;a<3&&null==e._a[a];++a)e._a[a]=r[a]=s[a];for(;a<7;a++)e._a[a]=r[a]=null==e._a[a]?2===a?1:0:e._a[a];24===e._a[Ye]&&0===e._a[ye]&&0===e._a[fe]&&0===e._a[ke]&&(e._nextDay=!0,e._a[Ye]=0),e._d=(e._useUTC?Je:function(e,a,t,s,n,d,r){var _;return e<100&&0<=e?(_=new Date(e+400,a,t,s,n,d,r),isFinite(_.getFullYear())&&_.setFullYear(e)):_=new Date(e,a,t,s,n,d,r),_}).apply(null,r),n=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[Ye]=24),e._w&&void 0!==e._w.d&&e._w.d!==n&&(Y(e).weekdayMismatch=!0)}}var ha=/^\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)?)?$/,La=/^\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)?)?$/,ca=/Z|[+-]\d\d(?::?\d\d)?/,Ya=[["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}/]],ya=[["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/]],fa=/^\/?Date\((\-?\d+)/i;function ka(e){var a,t,s,n,d,r,_=e._i,i=ha.exec(_)||La.exec(_);if(i){for(Y(e).iso=!0,a=0,t=Ya.length;a<t;a++)if(Ya[a][1].exec(i[1])){n=Ya[a][0],s=!1!==Ya[a][2];break}if(null==n)return void(e._isValid=!1);if(i[3]){for(a=0,t=ya.length;a<t;a++)if(ya[a][1].exec(i[3])){d=(i[2]||" ")+ya[a][0];break}if(null==d)return void(e._isValid=!1)}if(!s&&null!=d)return void(e._isValid=!1);if(i[4]){if(!ca.exec(i[4]))return void(e._isValid=!1);r="Z"}e._f=n+(d||"")+(r||""),wa(e)}else e._isValid=!1}var pa=/^(?:(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}))$/;function Da(e,a,t,s,n,d){var r=[function(e){var a=parseInt(e,10);{if(a<=49)return 2e3+a;if(a<=999)return 1900+a}return a}(e),Pe.indexOf(a),parseInt(t,10),parseInt(s,10),parseInt(n,10)];return d&&r.push(parseInt(d,10)),r}var Ta={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function ga(e){var a,t,s,n=pa.exec(e._i.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,""));if(n){var d=Da(n[4],n[3],n[2],n[5],n[6],n[7]);if(a=n[1],t=d,s=e,a&&Ve.indexOf(a)!==new Date(t[0],t[1],t[2]).getDay()&&(Y(s).weekdayMismatch=!0,!(s._isValid=!1)))return;e._a=d,e._tzm=function(e,a,t){if(e)return Ta[e];if(a)return 0;var s=parseInt(t,10),n=s%100;return(s-n)/100*60+n}(n[8],n[9],n[10]),e._d=Je.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),Y(e).rfc2822=!0}else e._isValid=!1}function wa(e){if(e._f!==l.ISO_8601)if(e._f!==l.RFC_2822){e._a=[],Y(e).empty=!0;var a,t,s,n,d,r,_,i,o=""+e._i,m=o.length,u=0;for(s=U(e._f,e._locale).match(z)||[],a=0;a<s.length;a++)n=s[a],(t=(o.match(oe(n,e))||[])[0])&&(0<(d=o.substr(0,o.indexOf(t))).length&&Y(e).unusedInput.push(d),o=o.slice(o.indexOf(t)+t.length),u+=t.length),R[n]?(t?Y(e).empty=!1:Y(e).unusedTokens.push(n),r=n,i=e,null!=(_=t)&&h(ue,r)&&ue[r](_,i._a,i,r)):e._strict&&!t&&Y(e).unusedTokens.push(n);Y(e).charsLeftOver=m-u,0<o.length&&Y(e).unusedInput.push(o),e._a[Ye]<=12&&!0===Y(e).bigHour&&0<e._a[Ye]&&(Y(e).bigHour=void 0),Y(e).parsedDateParts=e._a.slice(0),Y(e).meridiem=e._meridiem,e._a[Ye]=function(e,a,t){var s;if(null==t)return a;return null!=e.meridiemHour?e.meridiemHour(a,t):(null!=e.isPM&&((s=e.isPM(t))&&a<12&&(a+=12),s||12!==a||(a=0)),a)}(e._locale,e._a[Ye],e._meridiem),Ma(e),ua(e)}else ga(e);else ka(e)}function va(e){var a,t,s,n,d=e._i,r=e._f;return e._locale=e._locale||ma(e._l),null===d||void 0===r&&""===d?f({nullInput:!0}):("string"==typeof d&&(e._i=d=e._locale.preparse(d)),D(d)?new p(ua(d)):(u(d)?e._d=d:_(r)?function(e){var a,t,s,n,d;if(0===e._f.length)return Y(e).invalidFormat=!0,e._d=new Date(NaN);for(n=0;n<e._f.length;n++)d=0,a=k({},e),null!=e._useUTC&&(a._useUTC=e._useUTC),a._f=e._f[n],wa(a),y(a)&&(d+=Y(a).charsLeftOver,d+=10*Y(a).unusedTokens.length,Y(a).score=d,(null==s||d<s)&&(s=d,t=a));L(e,t||a)}(e):r?wa(e):o(t=(a=e)._i)?a._d=new Date(l.now()):u(t)?a._d=new Date(t.valueOf()):"string"==typeof t?(s=a,null===(n=fa.exec(s._i))?(ka(s),!1===s._isValid&&(delete s._isValid,ga(s),!1===s._isValid&&(delete s._isValid,l.createFromInputFallback(s)))):s._d=new Date(+n[1])):_(t)?(a._a=M(t.slice(0),function(e){return parseInt(e,10)}),Ma(a)):i(t)?function(e){if(!e._d){var a=W(e._i);e._a=M([a.year,a.month,a.day||a.date,a.hour,a.minute,a.second,a.millisecond],function(e){return e&&parseInt(e,10)}),Ma(e)}}(a):m(t)?a._d=new Date(t):l.createFromInputFallback(a),y(e)||(e._d=null),e))}function Sa(e,a,t,s,n){var d,r={};return!0!==t&&!1!==t||(s=t,t=void 0),(i(e)&&function(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;var a;for(a in e)if(e.hasOwnProperty(a))return!1;return!0}(e)||_(e)&&0===e.length)&&(e=void 0),r._isAMomentObject=!0,r._useUTC=r._isUTC=n,r._l=t,r._i=e,r._f=a,r._strict=s,(d=new p(ua(va(r))))._nextDay&&(d.add(1,"d"),d._nextDay=void 0),d}function Ha(e,a,t,s){return Sa(e,a,t,s,!1)}l.createFromInputFallback=t("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 and will be removed in an upcoming major release. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))}),l.ISO_8601=function(){},l.RFC_2822=function(){};var ba=t("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=Ha.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:f()}),ja=t("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=Ha.apply(null,arguments);return this.isValid()&&e.isValid()?this<e?this:e:f()});function xa(e,a){var t,s;if(1===a.length&&_(a[0])&&(a=a[0]),!a.length)return Ha();for(t=a[0],s=1;s<a.length;++s)a[s].isValid()&&!a[s][e](t)||(t=a[s]);return t}var Oa=["year","quarter","month","week","day","hour","minute","second","millisecond"];function Pa(e){var a=W(e),t=a.year||0,s=a.quarter||0,n=a.month||0,d=a.week||a.isoWeek||0,r=a.day||0,_=a.hour||0,i=a.minute||0,o=a.second||0,m=a.millisecond||0;this._isValid=function(e){for(var a in e)if(-1===we.call(Oa,a)||null!=e[a]&&isNaN(e[a]))return!1;for(var t=!1,s=0;s<Oa.length;++s)if(e[Oa[s]]){if(t)return!1;parseFloat(e[Oa[s]])!==g(e[Oa[s]])&&(t=!0)}return!0}(a),this._milliseconds=+m+1e3*o+6e4*i+1e3*_*60*60,this._days=+r+7*d,this._months=+n+3*s+12*t,this._data={},this._locale=ma(),this._bubble()}function Wa(e){return e instanceof Pa}function Aa(e){return e<0?-1*Math.round(-1*e):Math.round(e)}function Ea(e,t){C(e,0,0,function(){var e=this.utcOffset(),a="+";return e<0&&(e=-e,a="-"),a+F(~~(e/60),2)+t+F(~~e%60,2)})}Ea("Z",":"),Ea("ZZ",""),ie("Z",de),ie("ZZ",de),le(["Z","ZZ"],function(e,a,t){t._useUTC=!0,t._tzm=za(de,e)});var Fa=/([\+\-]|\d\d)/gi;function za(e,a){var t=(a||"").match(e);if(null===t)return null;var s=((t[t.length-1]||[])+"").match(Fa)||["-",0,0],n=60*s[1]+g(s[2]);return 0===n?0:"+"===s[0]?n:-n}function Ja(e,a){var t,s;return a._isUTC?(t=a.clone(),s=(D(e)||u(e)?e.valueOf():Ha(e).valueOf())-t.valueOf(),t._d.setTime(t._d.valueOf()+s),l.updateOffset(t,!1),t):Ha(e).local()}function Na(e){return 15*-Math.round(e._d.getTimezoneOffset()/15)}function Ra(){return!!this.isValid()&&(this._isUTC&&0===this._offset)}l.updateOffset=function(){};var Ca=/^(\-|\+)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/,Ia=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Ua(e,a){var t,s,n,d=e,r=null;return Wa(e)?d={ms:e._milliseconds,d:e._days,M:e._months}:m(e)?(d={},a?d[a]=e:d.milliseconds=e):(r=Ca.exec(e))?(t="-"===r[1]?-1:1,d={y:0,d:g(r[ce])*t,h:g(r[Ye])*t,m:g(r[ye])*t,s:g(r[fe])*t,ms:g(Aa(1e3*r[ke]))*t}):(r=Ia.exec(e))?(t="-"===r[1]?-1:1,d={y:Ga(r[2],t),M:Ga(r[3],t),w:Ga(r[4],t),d:Ga(r[5],t),h:Ga(r[6],t),m:Ga(r[7],t),s:Ga(r[8],t)}):null==d?d={}:"object"==typeof d&&("from"in d||"to"in d)&&(n=function(e,a){var t;if(!e.isValid()||!a.isValid())return{milliseconds:0,months:0};a=Ja(a,e),e.isBefore(a)?t=Va(e,a):((t=Va(a,e)).milliseconds=-t.milliseconds,t.months=-t.months);return t}(Ha(d.from),Ha(d.to)),(d={}).ms=n.milliseconds,d.M=n.months),s=new Pa(d),Wa(e)&&h(e,"_locale")&&(s._locale=e._locale),s}function Ga(e,a){var t=e&&parseFloat(e.replace(",","."));return(isNaN(t)?0:t)*a}function Va(e,a){var t={};return t.months=a.month()-e.month()+12*(a.year()-e.year()),e.clone().add(t.months,"M").isAfter(a)&&--t.months,t.milliseconds=+a-+e.clone().add(t.months,"M"),t}function Ka(s,n){return function(e,a){var t;return null===a||isNaN(+a)||(S(n,"moment()."+n+"(period, number) is deprecated. Please use moment()."+n+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),t=e,e=a,a=t),Za(this,Ua(e="string"==typeof e?+e:e,a),s),this}}function Za(e,a,t,s){var n=a._milliseconds,d=Aa(a._days),r=Aa(a._months);e.isValid()&&(s=null==s||s,r&&We(e,He(e,"Month")+r*t),d&&be(e,"Date",He(e,"Date")+d*t),n&&e._d.setTime(e._d.valueOf()+n*t),s&&l.updateOffset(e,d||r))}Ua.fn=Pa.prototype,Ua.invalid=function(){return Ua(NaN)};var $a=Ka(1,"add"),Ba=Ka(-1,"subtract");function qa(e,a){var t=12*(a.year()-e.year())+(a.month()-e.month()),s=e.clone().add(t,"months");return-(t+(a-s<0?(a-s)/(s-e.clone().add(t-1,"months")):(a-s)/(e.clone().add(t+1,"months")-s)))||0}function Qa(e){var a;return void 0===e?this._locale._abbr:(null!=(a=ma(e))&&(this._locale=a),this)}l.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",l.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var Xa=t("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 et(){return this._locale}var at=126227808e5;function tt(e,a){return(e%a+a)%a}function st(e,a,t){return e<100&&0<=e?new Date(e+400,a,t)-at:new Date(e,a,t).valueOf()}function nt(e,a,t){return e<100&&0<=e?Date.UTC(e+400,a,t)-at:Date.UTC(e,a,t)}function dt(e,a){C(0,[e,e.length],0,a)}function rt(e,a,t,s,n){var d;return null==e?Ce(this,s,n).year:((d=Ie(e,s,n))<a&&(a=d),function(e,a,t,s,n){var d=Re(e,a,t,s,n),r=Je(d.year,0,d.dayOfYear);return this.year(r.getUTCFullYear()),this.month(r.getUTCMonth()),this.date(r.getUTCDate()),this}.call(this,e,a,t,s,n))}C(0,["gg",2],0,function(){return this.weekYear()%100}),C(0,["GG",2],0,function(){return this.isoWeekYear()%100}),dt("gggg","weekYear"),dt("ggggg","weekYear"),dt("GGGG","isoWeekYear"),dt("GGGGG","isoWeekYear"),O("weekYear","gg"),O("isoWeekYear","GG"),E("weekYear",1),E("isoWeekYear",1),ie("G",se),ie("g",se),ie("GG",B,V),ie("gg",B,V),ie("GGGG",ee,Z),ie("gggg",ee,Z),ie("GGGGG",ae,$),ie("ggggg",ae,$),Me(["gggg","ggggg","GGGG","GGGGG"],function(e,a,t,s){a[s.substr(0,2)]=g(e)}),Me(["gg","GG"],function(e,a,t,s){a[s]=l.parseTwoDigitYear(e)}),C("Q",0,"Qo","quarter"),O("quarter","Q"),E("quarter",7),ie("Q",G),le("Q",function(e,a){a[Le]=3*(g(e)-1)}),C("D",["DD",2],"Do","date"),O("date","D"),E("date",9),ie("D",B),ie("DD",B,V),ie("Do",function(e,a){return e?a._dayOfMonthOrdinalParse||a._ordinalParse:a._dayOfMonthOrdinalParseLenient}),le(["D","DD"],ce),le("Do",function(e,a){a[ce]=g(e.match(B)[0])});var _t=Se("Date",!0);C("DDD",["DDDD",3],"DDDo","dayOfYear"),O("dayOfYear","DDD"),E("dayOfYear",4),ie("DDD",X),ie("DDDD",K),le(["DDD","DDDD"],function(e,a,t){t._dayOfYear=g(e)}),C("m",["mm",2],0,"minute"),O("minute","m"),E("minute",14),ie("m",B),ie("mm",B,V),le(["m","mm"],ye);var it=Se("Minutes",!1);C("s",["ss",2],0,"second"),O("second","s"),E("second",15),ie("s",B),ie("ss",B,V),le(["s","ss"],fe);var ot,mt=Se("Seconds",!1);for(C("S",0,0,function(){return~~(this.millisecond()/100)}),C(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),C(0,["SSS",3],0,"millisecond"),C(0,["SSSS",4],0,function(){return 10*this.millisecond()}),C(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),C(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),C(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),C(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),C(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),O("millisecond","ms"),E("millisecond",16),ie("S",X,G),ie("SS",X,V),ie("SSS",X,K),ot="SSSS";ot.length<=9;ot+="S")ie(ot,te);function ut(e,a){a[ke]=g(1e3*("0."+e))}for(ot="S";ot.length<=9;ot+="S")le(ot,ut);var lt=Se("Milliseconds",!1);C("z",0,0,"zoneAbbr"),C("zz",0,0,"zoneName");var Mt=p.prototype;function ht(e){return e}Mt.add=$a,Mt.calendar=function(e,a){var t=e||Ha(),s=Ja(t,this).startOf("day"),n=l.calendarFormat(this,s)||"sameElse",d=a&&(H(a[n])?a[n].call(this,t):a[n]);return this.format(d||this.localeData().calendar(n,this,Ha(t)))},Mt.clone=function(){return new p(this)},Mt.diff=function(e,a,t){var s,n,d;if(!this.isValid())return NaN;if(!(s=Ja(e,this)).isValid())return NaN;switch(n=6e4*(s.utcOffset()-this.utcOffset()),a=P(a)){case"year":d=qa(this,s)/12;break;case"month":d=qa(this,s);break;case"quarter":d=qa(this,s)/3;break;case"second":d=(this-s)/1e3;break;case"minute":d=(this-s)/6e4;break;case"hour":d=(this-s)/36e5;break;case"day":d=(this-s-n)/864e5;break;case"week":d=(this-s-n)/6048e5;break;default:d=this-s}return t?d:T(d)},Mt.endOf=function(e){var a;if(void 0===(e=P(e))||"millisecond"===e||!this.isValid())return this;var t=this._isUTC?nt:st;switch(e){case"year":a=t(this.year()+1,0,1)-1;break;case"quarter":a=t(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":a=t(this.year(),this.month()+1,1)-1;break;case"week":a=t(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":a=t(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":a=t(this.year(),this.month(),this.date()+1)-1;break;case"hour":a=this._d.valueOf(),a+=36e5-tt(a+(this._isUTC?0:6e4*this.utcOffset()),36e5)-1;break;case"minute":a=this._d.valueOf(),a+=6e4-tt(a,6e4)-1;break;case"second":a=this._d.valueOf(),a+=1e3-tt(a,1e3)-1;break}return this._d.setTime(a),l.updateOffset(this,!0),this},Mt.format=function(e){e||(e=this.isUtc()?l.defaultFormatUtc:l.defaultFormat);var a=I(this,e);return this.localeData().postformat(a)},Mt.from=function(e,a){return this.isValid()&&(D(e)&&e.isValid()||Ha(e).isValid())?Ua({to:this,from:e}).locale(this.locale()).humanize(!a):this.localeData().invalidDate()},Mt.fromNow=function(e){return this.from(Ha(),e)},Mt.to=function(e,a){return this.isValid()&&(D(e)&&e.isValid()||Ha(e).isValid())?Ua({from:this,to:e}).locale(this.locale()).humanize(!a):this.localeData().invalidDate()},Mt.toNow=function(e){return this.to(Ha(),e)},Mt.get=function(e){return H(this[e=P(e)])?this[e]():this},Mt.invalidAt=function(){return Y(this).overflow},Mt.isAfter=function(e,a){var t=D(e)?e:Ha(e);return!(!this.isValid()||!t.isValid())&&("millisecond"===(a=P(a)||"millisecond")?this.valueOf()>t.valueOf():t.valueOf()<this.clone().startOf(a).valueOf())},Mt.isBefore=function(e,a){var t=D(e)?e:Ha(e);return!(!this.isValid()||!t.isValid())&&("millisecond"===(a=P(a)||"millisecond")?this.valueOf()<t.valueOf():this.clone().endOf(a).valueOf()<t.valueOf())},Mt.isBetween=function(e,a,t,s){var n=D(e)?e:Ha(e),d=D(a)?a:Ha(a);return!!(this.isValid()&&n.isValid()&&d.isValid())&&("("===(s=s||"()")[0]?this.isAfter(n,t):!this.isBefore(n,t))&&(")"===s[1]?this.isBefore(d,t):!this.isAfter(d,t))},Mt.isSame=function(e,a){var t,s=D(e)?e:Ha(e);return!(!this.isValid()||!s.isValid())&&("millisecond"===(a=P(a)||"millisecond")?this.valueOf()===s.valueOf():(t=s.valueOf(),this.clone().startOf(a).valueOf()<=t&&t<=this.clone().endOf(a).valueOf()))},Mt.isSameOrAfter=function(e,a){return this.isSame(e,a)||this.isAfter(e,a)},Mt.isSameOrBefore=function(e,a){return this.isSame(e,a)||this.isBefore(e,a)},Mt.isValid=function(){return y(this)},Mt.lang=Xa,Mt.locale=Qa,Mt.localeData=et,Mt.max=ja,Mt.min=ba,Mt.parsingFlags=function(){return L({},Y(this))},Mt.set=function(e,a){if("object"==typeof e)for(var t=function(e){var a=[];for(var t in e)a.push({unit:t,priority:A[t]});return a.sort(function(e,a){return e.priority-a.priority}),a}(e=W(e)),s=0;s<t.length;s++)this[t[s].unit](e[t[s].unit]);else if(H(this[e=P(e)]))return this[e](a);return this},Mt.startOf=function(e){var a;if(void 0===(e=P(e))||"millisecond"===e||!this.isValid())return this;var t=this._isUTC?nt:st;switch(e){case"year":a=t(this.year(),0,1);break;case"quarter":a=t(this.year(),this.month()-this.month()%3,1);break;case"month":a=t(this.year(),this.month(),1);break;case"week":a=t(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":a=t(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":a=t(this.year(),this.month(),this.date());break;case"hour":a=this._d.valueOf(),a-=tt(a+(this._isUTC?0:6e4*this.utcOffset()),36e5);break;case"minute":a=this._d.valueOf(),a-=tt(a,6e4);break;case"second":a=this._d.valueOf(),a-=tt(a,1e3);break}return this._d.setTime(a),l.updateOffset(this,!0),this},Mt.subtract=Ba,Mt.toArray=function(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]},Mt.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()}},Mt.toDate=function(){return new Date(this.valueOf())},Mt.toISOString=function(e){if(!this.isValid())return null;var a=!0!==e,t=a?this.clone().utc():this;return t.year()<0||9999<t.year()?I(t,a?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):H(Date.prototype.toISOString)?a?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",I(t,"Z")):I(t,a?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")},Mt.inspect=function(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",a="";this.isLocal()||(e=0===this.utcOffset()?"moment.utc":"moment.parseZone",a="Z");var t="["+e+'("]',s=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",n=a+'[")]';return this.format(t+s+"-MM-DD[T]HH:mm:ss.SSS"+n)},Mt.toJSON=function(){return this.isValid()?this.toISOString():null},Mt.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},Mt.unix=function(){return Math.floor(this.valueOf()/1e3)},Mt.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},Mt.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},Mt.year=ve,Mt.isLeapYear=function(){return ge(this.year())},Mt.weekYear=function(e){return rt.call(this,e,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)},Mt.isoWeekYear=function(e){return rt.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)},Mt.quarter=Mt.quarters=function(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)},Mt.month=Ae,Mt.daysInMonth=function(){return je(this.year(),this.month())},Mt.week=Mt.weeks=function(e){var a=this.localeData().week(this);return null==e?a:this.add(7*(e-a),"d")},Mt.isoWeek=Mt.isoWeeks=function(e){var a=Ce(this,1,4).week;return null==e?a:this.add(7*(e-a),"d")},Mt.weeksInYear=function(){var e=this.localeData()._week;return Ie(this.year(),e.dow,e.doy)},Mt.isoWeeksInYear=function(){return Ie(this.year(),1,4)},Mt.date=_t,Mt.day=Mt.days=function(e){if(!this.isValid())return null!=e?this:NaN;var a,t,s=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=e?(a=e,t=this.localeData(),e="string"!=typeof a?a:isNaN(a)?"number"==typeof(a=t.weekdaysParse(a))?a:null:parseInt(a,10),this.add(e-s,"d")):s},Mt.weekday=function(e){if(!this.isValid())return null!=e?this:NaN;var a=(this.day()+7-this.localeData()._week.dow)%7;return null==e?a:this.add(e-a,"d")},Mt.isoWeekday=function(e){if(!this.isValid())return null!=e?this:NaN;if(null==e)return this.day()||7;var a,t,s=(a=e,t=this.localeData(),"string"==typeof a?t.weekdaysParse(a)%7||7:isNaN(a)?null:a);return this.day(this.day()%7?s:s-7)},Mt.dayOfYear=function(e){var a=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?a:this.add(e-a,"d")},Mt.hour=Mt.hours=ta,Mt.minute=Mt.minutes=it,Mt.second=Mt.seconds=mt,Mt.millisecond=Mt.milliseconds=lt,Mt.utcOffset=function(e,a,t){var s,n=this._offset||0;if(!this.isValid())return null!=e?this:NaN;if(null==e)return this._isUTC?n:Na(this);if("string"==typeof e){if(null===(e=za(de,e)))return this}else Math.abs(e)<16&&!t&&(e*=60);return!this._isUTC&&a&&(s=Na(this)),this._offset=e,this._isUTC=!0,null!=s&&this.add(s,"m"),n!==e&&(!a||this._changeInProgress?Za(this,Ua(e-n,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,l.updateOffset(this,!0),this._changeInProgress=null)),this},Mt.utc=function(e){return this.utcOffset(0,e)},Mt.local=function(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(Na(this),"m")),this},Mt.parseZone=function(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var e=za(ne,this._i);null!=e?this.utcOffset(e):this.utcOffset(0,!0)}return this},Mt.hasAlignedHourOffset=function(e){return!!this.isValid()&&(e=e?Ha(e).utcOffset():0,(this.utcOffset()-e)%60==0)},Mt.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},Mt.isLocal=function(){return!!this.isValid()&&!this._isUTC},Mt.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},Mt.isUtc=Ra,Mt.isUTC=Ra,Mt.zoneAbbr=function(){return this._isUTC?"UTC":""},Mt.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},Mt.dates=t("dates accessor is deprecated. Use date instead.",_t),Mt.months=t("months accessor is deprecated. Use month instead",Ae),Mt.years=t("years accessor is deprecated. Use year instead",ve),Mt.zone=t("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",function(e,a){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,a),this):-this.utcOffset()}),Mt.isDSTShifted=t("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",function(){if(!o(this._isDSTShifted))return this._isDSTShifted;var e={};if(k(e,this),(e=va(e))._a){var a=e._isUTC?c(e._a):Ha(e._a);this._isDSTShifted=this.isValid()&&0<r(e._a,a.toArray())}else this._isDSTShifted=!1;return this._isDSTShifted});var Lt=j.prototype;function ct(e,a,t,s){var n=ma(),d=c().set(s,a);return n[t](d,e)}function Yt(e,a,t){if(m(e)&&(a=e,e=void 0),e=e||"",null!=a)return ct(e,a,t,"month");var s,n=[];for(s=0;s<12;s++)n[s]=ct(e,s,t,"month");return n}function yt(e,a,t,s){a=("boolean"==typeof e?m(a)&&(t=a,a=void 0):(a=e,e=!1,m(t=a)&&(t=a,a=void 0)),a||"");var n,d=ma(),r=e?d._week.dow:0;if(null!=t)return ct(a,(t+r)%7,s,"day");var _=[];for(n=0;n<7;n++)_[n]=ct(a,(n+r)%7,s,"day");return _}Lt.calendar=function(e,a,t){var s=this._calendar[e]||this._calendar.sameElse;return H(s)?s.call(a,t):s},Lt.longDateFormat=function(e){var a=this._longDateFormat[e],t=this._longDateFormat[e.toUpperCase()];return a||!t?a:(this._longDateFormat[e]=t.replace(/MMMM|MM|DD|dddd/g,function(e){return e.slice(1)}),this._longDateFormat[e])},Lt.invalidDate=function(){return this._invalidDate},Lt.ordinal=function(e){return this._ordinal.replace("%d",e)},Lt.preparse=ht,Lt.postformat=ht,Lt.relativeTime=function(e,a,t,s){var n=this._relativeTime[t];return H(n)?n(e,a,t,s):n.replace(/%d/i,e)},Lt.pastFuture=function(e,a){var t=this._relativeTime[0<e?"future":"past"];return H(t)?t(a):t.replace(/%s/i,a)},Lt.set=function(e){var a,t;for(t in e)H(a=e[t])?this[t]=a:this["_"+t]=a;this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)},Lt.months=function(e,a){return e?_(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||xe).test(a)?"format":"standalone"][e.month()]:_(this._months)?this._months:this._months.standalone},Lt.monthsShort=function(e,a){return e?_(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[xe.test(a)?"format":"standalone"][e.month()]:_(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},Lt.monthsParse=function(e,a,t){var s,n,d;if(this._monthsParseExact)return function(e,a,t){var s,n,d,r=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],s=0;s<12;++s)d=c([2e3,s]),this._shortMonthsParse[s]=this.monthsShort(d,"").toLocaleLowerCase(),this._longMonthsParse[s]=this.months(d,"").toLocaleLowerCase();return t?"MMM"===a?-1!==(n=we.call(this._shortMonthsParse,r))?n:null:-1!==(n=we.call(this._longMonthsParse,r))?n:null:"MMM"===a?-1!==(n=we.call(this._shortMonthsParse,r))?n:-1!==(n=we.call(this._longMonthsParse,r))?n:null:-1!==(n=we.call(this._longMonthsParse,r))?n:-1!==(n=we.call(this._shortMonthsParse,r))?n:null}.call(this,e,a,t);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),s=0;s<12;s++){if(n=c([2e3,s]),t&&!this._longMonthsParse[s]&&(this._longMonthsParse[s]=new RegExp("^"+this.months(n,"").replace(".","")+"$","i"),this._shortMonthsParse[s]=new RegExp("^"+this.monthsShort(n,"").replace(".","")+"$","i")),t||this._monthsParse[s]||(d="^"+this.months(n,"")+"|^"+this.monthsShort(n,""),this._monthsParse[s]=new RegExp(d.replace(".",""),"i")),t&&"MMMM"===a&&this._longMonthsParse[s].test(e))return s;if(t&&"MMM"===a&&this._shortMonthsParse[s].test(e))return s;if(!t&&this._monthsParse[s].test(e))return s}},Lt.monthsRegex=function(e){return this._monthsParseExact?(h(this,"_monthsRegex")||ze.call(this),e?this._monthsStrictRegex:this._monthsRegex):(h(this,"_monthsRegex")||(this._monthsRegex=Fe),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)},Lt.monthsShortRegex=function(e){return this._monthsParseExact?(h(this,"_monthsRegex")||ze.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(h(this,"_monthsShortRegex")||(this._monthsShortRegex=Ee),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)},Lt.week=function(e){return Ce(e,this._week.dow,this._week.doy).week},Lt.firstDayOfYear=function(){return this._week.doy},Lt.firstDayOfWeek=function(){return this._week.dow},Lt.weekdays=function(e,a){var t=_(this._weekdays)?this._weekdays:this._weekdays[e&&!0!==e&&this._weekdays.isFormat.test(a)?"format":"standalone"];return!0===e?Ue(t,this._week.dow):e?t[e.day()]:t},Lt.weekdaysMin=function(e){return!0===e?Ue(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin},Lt.weekdaysShort=function(e){return!0===e?Ue(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort},Lt.weekdaysParse=function(e,a,t){var s,n,d;if(this._weekdaysParseExact)return function(e,a,t){var s,n,d,r=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],s=0;s<7;++s)d=c([2e3,1]).day(s),this._minWeekdaysParse[s]=this.weekdaysMin(d,"").toLocaleLowerCase(),this._shortWeekdaysParse[s]=this.weekdaysShort(d,"").toLocaleLowerCase(),this._weekdaysParse[s]=this.weekdays(d,"").toLocaleLowerCase();return t?"dddd"===a?-1!==(n=we.call(this._weekdaysParse,r))?n:null:"ddd"===a?-1!==(n=we.call(this._shortWeekdaysParse,r))?n:null:-1!==(n=we.call(this._minWeekdaysParse,r))?n:null:"dddd"===a?-1!==(n=we.call(this._weekdaysParse,r))?n:-1!==(n=we.call(this._shortWeekdaysParse,r))?n:-1!==(n=we.call(this._minWeekdaysParse,r))?n:null:"ddd"===a?-1!==(n=we.call(this._shortWeekdaysParse,r))?n:-1!==(n=we.call(this._weekdaysParse,r))?n:-1!==(n=we.call(this._minWeekdaysParse,r))?n:null:-1!==(n=we.call(this._minWeekdaysParse,r))?n:-1!==(n=we.call(this._weekdaysParse,r))?n:-1!==(n=we.call(this._shortWeekdaysParse,r))?n:null}.call(this,e,a,t);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),s=0;s<7;s++){if(n=c([2e3,1]).day(s),t&&!this._fullWeekdaysParse[s]&&(this._fullWeekdaysParse[s]=new RegExp("^"+this.weekdays(n,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[s]=new RegExp("^"+this.weekdaysShort(n,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[s]=new RegExp("^"+this.weekdaysMin(n,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[s]||(d="^"+this.weekdays(n,"")+"|^"+this.weekdaysShort(n,"")+"|^"+this.weekdaysMin(n,""),this._weekdaysParse[s]=new RegExp(d.replace(".",""),"i")),t&&"dddd"===a&&this._fullWeekdaysParse[s].test(e))return s;if(t&&"ddd"===a&&this._shortWeekdaysParse[s].test(e))return s;if(t&&"dd"===a&&this._minWeekdaysParse[s].test(e))return s;if(!t&&this._weekdaysParse[s].test(e))return s}},Lt.weekdaysRegex=function(e){return this._weekdaysParseExact?(h(this,"_weekdaysRegex")||qe.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(h(this,"_weekdaysRegex")||(this._weekdaysRegex=Ze),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)},Lt.weekdaysShortRegex=function(e){return this._weekdaysParseExact?(h(this,"_weekdaysRegex")||qe.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(h(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=$e),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},Lt.weekdaysMinRegex=function(e){return this._weekdaysParseExact?(h(this,"_weekdaysRegex")||qe.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(h(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Be),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},Lt.isPM=function(e){return"p"===(e+"").toLowerCase().charAt(0)},Lt.meridiem=function(e,a,t){return 11<e?t?"pm":"PM":t?"am":"AM"},ia("en",{dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var a=e%10;return e+(1===g(e%100/10)?"th":1===a?"st":2===a?"nd":3===a?"rd":"th")}}),l.lang=t("moment.lang is deprecated. Use moment.locale instead.",ia),l.langData=t("moment.langData is deprecated. Use moment.localeData instead.",ma);var ft=Math.abs;function kt(e,a,t,s){var n=Ua(a,t);return e._milliseconds+=s*n._milliseconds,e._days+=s*n._days,e._months+=s*n._months,e._bubble()}function pt(e){return e<0?Math.floor(e):Math.ceil(e)}function Dt(e){return 4800*e/146097}function Tt(e){return 146097*e/4800}function gt(e){return function(){return this.as(e)}}var wt=gt("ms"),vt=gt("s"),St=gt("m"),Ht=gt("h"),bt=gt("d"),jt=gt("w"),xt=gt("M"),Ot=gt("Q"),Pt=gt("y");function Wt(e){return function(){return this.isValid()?this._data[e]:NaN}}var At=Wt("milliseconds"),Et=Wt("seconds"),Ft=Wt("minutes"),zt=Wt("hours"),Jt=Wt("days"),Nt=Wt("months"),Rt=Wt("years");var Ct=Math.round,It={ss:44,s:45,m:45,h:22,d:26,M:11};var Ut=Math.abs;function Gt(e){return(0<e)-(e<0)||+e}function Vt(){if(!this.isValid())return this.localeData().invalidDate();var e,a,t=Ut(this._milliseconds)/1e3,s=Ut(this._days),n=Ut(this._months);a=T((e=T(t/60))/60),t%=60,e%=60;var d=T(n/12),r=n%=12,_=s,i=a,o=e,m=t?t.toFixed(3).replace(/\.?0+$/,""):"",u=this.asSeconds();if(!u)return"P0D";var l=u<0?"-":"",M=Gt(this._months)!==Gt(u)?"-":"",h=Gt(this._days)!==Gt(u)?"-":"",L=Gt(this._milliseconds)!==Gt(u)?"-":"";return l+"P"+(d?M+d+"Y":"")+(r?M+r+"M":"")+(_?h+_+"D":"")+(i||o||m?"T":"")+(i?L+i+"H":"")+(o?L+o+"M":"")+(m?L+m+"S":"")}var Kt=Pa.prototype;Kt.isValid=function(){return this._isValid},Kt.abs=function(){var e=this._data;return this._milliseconds=ft(this._milliseconds),this._days=ft(this._days),this._months=ft(this._months),e.milliseconds=ft(e.milliseconds),e.seconds=ft(e.seconds),e.minutes=ft(e.minutes),e.hours=ft(e.hours),e.months=ft(e.months),e.years=ft(e.years),this},Kt.add=function(e,a){return kt(this,e,a,1)},Kt.subtract=function(e,a){return kt(this,e,a,-1)},Kt.as=function(e){if(!this.isValid())return NaN;var a,t,s=this._milliseconds;if("month"===(e=P(e))||"quarter"===e||"year"===e)switch(a=this._days+s/864e5,t=this._months+Dt(a),e){case"month":return t;case"quarter":return t/3;case"year":return t/12}else switch(a=this._days+Math.round(Tt(this._months)),e){case"week":return a/7+s/6048e5;case"day":return a+s/864e5;case"hour":return 24*a+s/36e5;case"minute":return 1440*a+s/6e4;case"second":return 86400*a+s/1e3;case"millisecond":return Math.floor(864e5*a)+s;default:throw new Error("Unknown unit "+e)}},Kt.asMilliseconds=wt,Kt.asSeconds=vt,Kt.asMinutes=St,Kt.asHours=Ht,Kt.asDays=bt,Kt.asWeeks=jt,Kt.asMonths=xt,Kt.asQuarters=Ot,Kt.asYears=Pt,Kt.valueOf=function(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*g(this._months/12):NaN},Kt._bubble=function(){var e,a,t,s,n,d=this._milliseconds,r=this._days,_=this._months,i=this._data;return 0<=d&&0<=r&&0<=_||d<=0&&r<=0&&_<=0||(d+=864e5*pt(Tt(_)+r),_=r=0),i.milliseconds=d%1e3,e=T(d/1e3),i.seconds=e%60,a=T(e/60),i.minutes=a%60,t=T(a/60),i.hours=t%24,_+=n=T(Dt(r+=T(t/24))),r-=pt(Tt(n)),s=T(_/12),_%=12,i.days=r,i.months=_,i.years=s,this},Kt.clone=function(){return Ua(this)},Kt.get=function(e){return e=P(e),this.isValid()?this[e+"s"]():NaN},Kt.milliseconds=At,Kt.seconds=Et,Kt.minutes=Ft,Kt.hours=zt,Kt.days=Jt,Kt.weeks=function(){return T(this.days()/7)},Kt.months=Nt,Kt.years=Rt,Kt.humanize=function(e){if(!this.isValid())return this.localeData().invalidDate();var a,t,s,n,d,r,_,i,o,m,u,l=this.localeData(),M=(t=!e,s=l,n=Ua(a=this).abs(),d=Ct(n.as("s")),r=Ct(n.as("m")),_=Ct(n.as("h")),i=Ct(n.as("d")),o=Ct(n.as("M")),m=Ct(n.as("y")),(u=d<=It.ss&&["s",d]||d<It.s&&["ss",d]||r<=1&&["m"]||r<It.m&&["mm",r]||_<=1&&["h"]||_<It.h&&["hh",_]||i<=1&&["d"]||i<It.d&&["dd",i]||o<=1&&["M"]||o<It.M&&["MM",o]||m<=1&&["y"]||["yy",m])[2]=t,u[3]=0<+a,u[4]=s,function(e,a,t,s,n){return n.relativeTime(a||1,!!t,e,s)}.apply(null,u));return e&&(M=l.pastFuture(+this,M)),l.postformat(M)},Kt.toISOString=Vt,Kt.toString=Vt,Kt.toJSON=Vt,Kt.locale=Qa,Kt.localeData=et,Kt.toIsoString=t("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Vt),Kt.lang=Xa,C("X",0,0,"unix"),C("x",0,0,"valueOf"),ie("x",se),ie("X",/[+-]?\d+(\.\d{1,3})?/),le("X",function(e,a,t){t._d=new Date(1e3*parseFloat(e,10))}),le("x",function(e,a,t){t._d=new Date(g(e))}),l.version="2.24.0",e=Ha,l.fn=Mt,l.min=function(){return xa("isBefore",[].slice.call(arguments,0))},l.max=function(){return xa("isAfter",[].slice.call(arguments,0))},l.now=function(){return Date.now?Date.now():+new Date},l.utc=c,l.unix=function(e){return Ha(1e3*e)},l.months=function(e,a){return Yt(e,a,"months")},l.isDate=u,l.locale=ia,l.invalid=f,l.duration=Ua,l.isMoment=D,l.weekdays=function(e,a,t){return yt(e,a,t,"weekdays")},l.parseZone=function(){return Ha.apply(null,arguments).parseZone()},l.localeData=ma,l.isDuration=Wa,l.monthsShort=function(e,a){return Yt(e,a,"monthsShort")},l.weekdaysMin=function(e,a,t){return yt(e,a,t,"weekdaysMin")},l.defineLocale=oa,l.updateLocale=function(e,a){if(null!=a){var t,s,n=sa;null!=(s=_a(e))&&(n=s._config),(t=new j(a=b(n,a))).parentLocale=na[e],na[e]=t,ia(e)}else null!=na[e]&&(null!=na[e].parentLocale?na[e]=na[e].parentLocale:null!=na[e]&&delete na[e]);return na[e]},l.locales=function(){return s(na)},l.weekdaysShort=function(e,a,t){return yt(e,a,t,"weekdaysShort")},l.normalizeUnits=P,l.relativeTimeRounding=function(e){return void 0===e?Ct:"function"==typeof e&&(Ct=e,!0)},l.relativeTimeThreshold=function(e,a){return void 0!==It[e]&&(void 0===a?It[e]:(It[e]=a,"s"===e&&(It.ss=a-1),!0))},l.calendarFormat=function(e,a){var t=e.diff(a,"days",!0);return t<-6?"sameElse":t<-1?"lastWeek":t<0?"lastDay":t<1?"sameDay":t<2?"nextDay":t<7?"nextWeek":"sameElse"},l.prototype=Mt,l.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"},l.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,a,t){return e<12?t?"vm":"VM":t?"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\xf4re 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||20<=e?"ste":"de")},week:{dow:1,doy:4}}),l.defineLocale("ar-dz",{months:"\u062c\u0627\u0646\u0641\u064a_\u0641\u064a\u0641\u0631\u064a_\u0645\u0627\u0631\u0633_\u0623\u0641\u0631\u064a\u0644_\u0645\u0627\u064a_\u062c\u0648\u0627\u0646_\u062c\u0648\u064a\u0644\u064a\u0629_\u0623\u0648\u062a_\u0633\u0628\u062a\u0645\u0628\u0631_\u0623\u0643\u062a\u0648\u0628\u0631_\u0646\u0648\u0641\u0645\u0628\u0631_\u062f\u064a\u0633\u0645\u0628\u0631".split("_"),monthsShort:"\u062c\u0627\u0646\u0641\u064a_\u0641\u064a\u0641\u0631\u064a_\u0645\u0627\u0631\u0633_\u0623\u0641\u0631\u064a\u0644_\u0645\u0627\u064a_\u062c\u0648\u0627\u0646_\u062c\u0648\u064a\u0644\u064a\u0629_\u0623\u0648\u062a_\u0633\u0628\u062a\u0645\u0628\u0631_\u0623\u0643\u062a\u0648\u0628\u0631_\u0646\u0648\u0641\u0645\u0628\u0631_\u062f\u064a\u0633\u0645\u0628\u0631".split("_"),weekdays:"\u0627\u0644\u0623\u062d\u062f_\u0627\u0644\u0625\u062b\u0646\u064a\u0646_\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621_\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621_\u0627\u0644\u062e\u0645\u064a\u0633_\u0627\u0644\u062c\u0645\u0639\u0629_\u0627\u0644\u0633\u0628\u062a".split("_"),weekdaysShort:"\u0627\u062d\u062f_\u0627\u062b\u0646\u064a\u0646_\u062b\u0644\u0627\u062b\u0627\u0621_\u0627\u0631\u0628\u0639\u0627\u0621_\u062e\u0645\u064a\u0633_\u062c\u0645\u0639\u0629_\u0633\u0628\u062a".split("_"),weekdaysMin:"\u0623\u062d_\u0625\u062b_\u062b\u0644\u0627_\u0623\u0631_\u062e\u0645_\u062c\u0645_\u0633\u0628".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:"[\u0627\u0644\u064a\u0648\u0645 \u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",nextDay:"[\u063a\u062f\u0627 \u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",nextWeek:"dddd [\u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",lastDay:"[\u0623\u0645\u0633 \u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",lastWeek:"dddd [\u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",sameElse:"L"},relativeTime:{future:"\u0641\u064a %s",past:"\u0645\u0646\u0630 %s",s:"\u062b\u0648\u0627\u0646",ss:"%d \u062b\u0627\u0646\u064a\u0629",m:"\u062f\u0642\u064a\u0642\u0629",mm:"%d \u062f\u0642\u0627\u0626\u0642",h:"\u0633\u0627\u0639\u0629",hh:"%d \u0633\u0627\u0639\u0627\u062a",d:"\u064a\u0648\u0645",dd:"%d \u0623\u064a\u0627\u0645",M:"\u0634\u0647\u0631",MM:"%d \u0623\u0634\u0647\u0631",y:"\u0633\u0646\u0629",yy:"%d \u0633\u0646\u0648\u0627\u062a"},week:{dow:0,doy:4}}),l.defineLocale("ar-kw",{months:"\u064a\u0646\u0627\u064a\u0631_\u0641\u0628\u0631\u0627\u064a\u0631_\u0645\u0627\u0631\u0633_\u0623\u0628\u0631\u064a\u0644_\u0645\u0627\u064a_\u064a\u0648\u0646\u064a\u0648_\u064a\u0648\u0644\u064a\u0648\u0632_\u063a\u0634\u062a_\u0634\u062a\u0646\u0628\u0631_\u0623\u0643\u062a\u0648\u0628\u0631_\u0646\u0648\u0646\u0628\u0631_\u062f\u062c\u0646\u0628\u0631".split("_"),monthsShort:"\u064a\u0646\u0627\u064a\u0631_\u0641\u0628\u0631\u0627\u064a\u0631_\u0645\u0627\u0631\u0633_\u0623\u0628\u0631\u064a\u0644_\u0645\u0627\u064a_\u064a\u0648\u0646\u064a\u0648_\u064a\u0648\u0644\u064a\u0648\u0632_\u063a\u0634\u062a_\u0634\u062a\u0646\u0628\u0631_\u0623\u0643\u062a\u0648\u0628\u0631_\u0646\u0648\u0646\u0628\u0631_\u062f\u062c\u0646\u0628\u0631".split("_"),weekdays:"\u0627\u0644\u0623\u062d\u062f_\u0627\u0644\u0625\u062a\u0646\u064a\u0646_\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621_\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621_\u0627\u0644\u062e\u0645\u064a\u0633_\u0627\u0644\u062c\u0645\u0639\u0629_\u0627\u0644\u0633\u0628\u062a".split("_"),weekdaysShort:"\u0627\u062d\u062f_\u0627\u062a\u0646\u064a\u0646_\u062b\u0644\u0627\u062b\u0627\u0621_\u0627\u0631\u0628\u0639\u0627\u0621_\u062e\u0645\u064a\u0633_\u062c\u0645\u0639\u0629_\u0633\u0628\u062a".split("_"),weekdaysMin:"\u062d_\u0646_\u062b_\u0631_\u062e_\u062c_\u0633".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:"[\u0627\u0644\u064a\u0648\u0645 \u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",nextDay:"[\u063a\u062f\u0627 \u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",nextWeek:"dddd [\u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",lastDay:"[\u0623\u0645\u0633 \u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",lastWeek:"dddd [\u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",sameElse:"L"},relativeTime:{future:"\u0641\u064a %s",past:"\u0645\u0646\u0630 %s",s:"\u062b\u0648\u0627\u0646",ss:"%d \u062b\u0627\u0646\u064a\u0629",m:"\u062f\u0642\u064a\u0642\u0629",mm:"%d \u062f\u0642\u0627\u0626\u0642",h:"\u0633\u0627\u0639\u0629",hh:"%d \u0633\u0627\u0639\u0627\u062a",d:"\u064a\u0648\u0645",dd:"%d \u0623\u064a\u0627\u0645",M:"\u0634\u0647\u0631",MM:"%d \u0623\u0634\u0647\u0631",y:"\u0633\u0646\u0629",yy:"%d \u0633\u0646\u0648\u0627\u062a"},week:{dow:0,doy:12}});var Zt={1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",0:"0"},$t=function(e){return 0===e?0:1===e?1:2===e?2:3<=e%100&&e%100<=10?3:11<=e%100?4:5},Bt={s:["\u0623\u0642\u0644 \u0645\u0646 \u062b\u0627\u0646\u064a\u0629","\u062b\u0627\u0646\u064a\u0629 \u0648\u0627\u062d\u062f\u0629",["\u062b\u0627\u0646\u064a\u062a\u0627\u0646","\u062b\u0627\u0646\u064a\u062a\u064a\u0646"],"%d \u062b\u0648\u0627\u0646","%d \u062b\u0627\u0646\u064a\u0629","%d \u062b\u0627\u0646\u064a\u0629"],m:["\u0623\u0642\u0644 \u0645\u0646 \u062f\u0642\u064a\u0642\u0629","\u062f\u0642\u064a\u0642\u0629 \u0648\u0627\u062d\u062f\u0629",["\u062f\u0642\u064a\u0642\u062a\u0627\u0646","\u062f\u0642\u064a\u0642\u062a\u064a\u0646"],"%d \u062f\u0642\u0627\u0626\u0642","%d \u062f\u0642\u064a\u0642\u0629","%d \u062f\u0642\u064a\u0642\u0629"],h:["\u0623\u0642\u0644 \u0645\u0646 \u0633\u0627\u0639\u0629","\u0633\u0627\u0639\u0629 \u0648\u0627\u062d\u062f\u0629",["\u0633\u0627\u0639\u062a\u0627\u0646","\u0633\u0627\u0639\u062a\u064a\u0646"],"%d \u0633\u0627\u0639\u0627\u062a","%d \u0633\u0627\u0639\u0629","%d \u0633\u0627\u0639\u0629"],d:["\u0623\u0642\u0644 \u0645\u0646 \u064a\u0648\u0645","\u064a\u0648\u0645 \u0648\u0627\u062d\u062f",["\u064a\u0648\u0645\u0627\u0646","\u064a\u0648\u0645\u064a\u0646"],"%d \u0623\u064a\u0627\u0645","%d \u064a\u0648\u0645\u064b\u0627","%d \u064a\u0648\u0645"],M:["\u0623\u0642\u0644 \u0645\u0646 \u0634\u0647\u0631","\u0634\u0647\u0631 \u0648\u0627\u062d\u062f",["\u0634\u0647\u0631\u0627\u0646","\u0634\u0647\u0631\u064a\u0646"],"%d \u0623\u0634\u0647\u0631","%d \u0634\u0647\u0631\u0627","%d \u0634\u0647\u0631"],y:["\u0623\u0642\u0644 \u0645\u0646 \u0639\u0627\u0645","\u0639\u0627\u0645 \u0648\u0627\u062d\u062f",["\u0639\u0627\u0645\u0627\u0646","\u0639\u0627\u0645\u064a\u0646"],"%d \u0623\u0639\u0648\u0627\u0645","%d \u0639\u0627\u0645\u064b\u0627","%d \u0639\u0627\u0645"]},qt=function(r){return function(e,a,t,s){var n=$t(e),d=Bt[r][$t(e)];return 2===n&&(d=d[a?0:1]),d.replace(/%d/i,e)}},Qt=["\u064a\u0646\u0627\u064a\u0631","\u0641\u0628\u0631\u0627\u064a\u0631","\u0645\u0627\u0631\u0633","\u0623\u0628\u0631\u064a\u0644","\u0645\u0627\u064a\u0648","\u064a\u0648\u0646\u064a\u0648","\u064a\u0648\u0644\u064a\u0648","\u0623\u063a\u0633\u0637\u0633","\u0633\u0628\u062a\u0645\u0628\u0631","\u0623\u0643\u062a\u0648\u0628\u0631","\u0646\u0648\u0641\u0645\u0628\u0631","\u062f\u064a\u0633\u0645\u0628\u0631"];l.defineLocale("ar-ly",{months:Qt,monthsShort:Qt,weekdays:"\u0627\u0644\u0623\u062d\u062f_\u0627\u0644\u0625\u062b\u0646\u064a\u0646_\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621_\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621_\u0627\u0644\u062e\u0645\u064a\u0633_\u0627\u0644\u062c\u0645\u0639\u0629_\u0627\u0644\u0633\u0628\u062a".split("_"),weekdaysShort:"\u0623\u062d\u062f_\u0625\u062b\u0646\u064a\u0646_\u062b\u0644\u0627\u062b\u0627\u0621_\u0623\u0631\u0628\u0639\u0627\u0621_\u062e\u0645\u064a\u0633_\u062c\u0645\u0639\u0629_\u0633\u0628\u062a".split("_"),weekdaysMin:"\u062d_\u0646_\u062b_\u0631_\u062e_\u062c_\u0633".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"D/\u200fM/\u200fYYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/\u0635|\u0645/,isPM:function(e){return"\u0645"===e},meridiem:function(e,a,t){return e<12?"\u0635":"\u0645"},calendar:{sameDay:"[\u0627\u0644\u064a\u0648\u0645 \u0639\u0646\u062f \u0627\u0644\u0633\u0627\u0639\u0629] LT",nextDay:"[\u063a\u062f\u064b\u0627 \u0639\u0646\u062f \u0627\u0644\u0633\u0627\u0639\u0629] LT",nextWeek:"dddd [\u0639\u0646\u062f \u0627\u0644\u0633\u0627\u0639\u0629] LT",lastDay:"[\u0623\u0645\u0633 \u0639\u0646\u062f \u0627\u0644\u0633\u0627\u0639\u0629] LT",lastWeek:"dddd [\u0639\u0646\u062f \u0627\u0644\u0633\u0627\u0639\u0629] LT",sameElse:"L"},relativeTime:{future:"\u0628\u0639\u062f %s",past:"\u0645\u0646\u0630 %s",s:qt("s"),ss:qt("s"),m:qt("m"),mm:qt("m"),h:qt("h"),hh:qt("h"),d:qt("d"),dd:qt("d"),M:qt("M"),MM:qt("M"),y:qt("y"),yy:qt("y")},preparse:function(e){return e.replace(/\u060c/g,",")},postformat:function(e){return e.replace(/\d/g,function(e){return Zt[e]}).replace(/,/g,"\u060c")},week:{dow:6,doy:12}}),l.defineLocale("ar-ma",{months:"\u064a\u0646\u0627\u064a\u0631_\u0641\u0628\u0631\u0627\u064a\u0631_\u0645\u0627\u0631\u0633_\u0623\u0628\u0631\u064a\u0644_\u0645\u0627\u064a_\u064a\u0648\u0646\u064a\u0648_\u064a\u0648\u0644\u064a\u0648\u0632_\u063a\u0634\u062a_\u0634\u062a\u0646\u0628\u0631_\u0623\u0643\u062a\u0648\u0628\u0631_\u0646\u0648\u0646\u0628\u0631_\u062f\u062c\u0646\u0628\u0631".split("_"),monthsShort:"\u064a\u0646\u0627\u064a\u0631_\u0641\u0628\u0631\u0627\u064a\u0631_\u0645\u0627\u0631\u0633_\u0623\u0628\u0631\u064a\u0644_\u0645\u0627\u064a_\u064a\u0648\u0646\u064a\u0648_\u064a\u0648\u0644\u064a\u0648\u0632_\u063a\u0634\u062a_\u0634\u062a\u0646\u0628\u0631_\u0623\u0643\u062a\u0648\u0628\u0631_\u0646\u0648\u0646\u0628\u0631_\u062f\u062c\u0646\u0628\u0631".split("_"),weekdays:"\u0627\u0644\u0623\u062d\u062f_\u0627\u0644\u0625\u062a\u0646\u064a\u0646_\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621_\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621_\u0627\u0644\u062e\u0645\u064a\u0633_\u0627\u0644\u062c\u0645\u0639\u0629_\u0627\u0644\u0633\u0628\u062a".split("_"),weekdaysShort:"\u0627\u062d\u062f_\u0627\u062a\u0646\u064a\u0646_\u062b\u0644\u0627\u062b\u0627\u0621_\u0627\u0631\u0628\u0639\u0627\u0621_\u062e\u0645\u064a\u0633_\u062c\u0645\u0639\u0629_\u0633\u0628\u062a".split("_"),weekdaysMin:"\u062d_\u0646_\u062b_\u0631_\u062e_\u062c_\u0633".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:"[\u0627\u0644\u064a\u0648\u0645 \u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",nextDay:"[\u063a\u062f\u0627 \u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",nextWeek:"dddd [\u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",lastDay:"[\u0623\u0645\u0633 \u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",lastWeek:"dddd [\u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",sameElse:"L"},relativeTime:{future:"\u0641\u064a %s",past:"\u0645\u0646\u0630 %s",s:"\u062b\u0648\u0627\u0646",ss:"%d \u062b\u0627\u0646\u064a\u0629",m:"\u062f\u0642\u064a\u0642\u0629",mm:"%d \u062f\u0642\u0627\u0626\u0642",h:"\u0633\u0627\u0639\u0629",hh:"%d \u0633\u0627\u0639\u0627\u062a",d:"\u064a\u0648\u0645",dd:"%d \u0623\u064a\u0627\u0645",M:"\u0634\u0647\u0631",MM:"%d \u0623\u0634\u0647\u0631",y:"\u0633\u0646\u0629",yy:"%d \u0633\u0646\u0648\u0627\u062a"},week:{dow:6,doy:12}});var Xt={1:"\u0661",2:"\u0662",3:"\u0663",4:"\u0664",5:"\u0665",6:"\u0666",7:"\u0667",8:"\u0668",9:"\u0669",0:"\u0660"},es={"\u0661":"1","\u0662":"2","\u0663":"3","\u0664":"4","\u0665":"5","\u0666":"6","\u0667":"7","\u0668":"8","\u0669":"9","\u0660":"0"};l.defineLocale("ar-sa",{months:"\u064a\u0646\u0627\u064a\u0631_\u0641\u0628\u0631\u0627\u064a\u0631_\u0645\u0627\u0631\u0633_\u0623\u0628\u0631\u064a\u0644_\u0645\u0627\u064a\u0648_\u064a\u0648\u0646\u064a\u0648_\u064a\u0648\u0644\u064a\u0648_\u0623\u063a\u0633\u0637\u0633_\u0633\u0628\u062a\u0645\u0628\u0631_\u0623\u0643\u062a\u0648\u0628\u0631_\u0646\u0648\u0641\u0645\u0628\u0631_\u062f\u064a\u0633\u0645\u0628\u0631".split("_"),monthsShort:"\u064a\u0646\u0627\u064a\u0631_\u0641\u0628\u0631\u0627\u064a\u0631_\u0645\u0627\u0631\u0633_\u0623\u0628\u0631\u064a\u0644_\u0645\u0627\u064a\u0648_\u064a\u0648\u0646\u064a\u0648_\u064a\u0648\u0644\u064a\u0648_\u0623\u063a\u0633\u0637\u0633_\u0633\u0628\u062a\u0645\u0628\u0631_\u0623\u0643\u062a\u0648\u0628\u0631_\u0646\u0648\u0641\u0645\u0628\u0631_\u062f\u064a\u0633\u0645\u0628\u0631".split("_"),weekdays:"\u0627\u0644\u0623\u062d\u062f_\u0627\u0644\u0625\u062b\u0646\u064a\u0646_\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621_\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621_\u0627\u0644\u062e\u0645\u064a\u0633_\u0627\u0644\u062c\u0645\u0639\u0629_\u0627\u0644\u0633\u0628\u062a".split("_"),weekdaysShort:"\u0623\u062d\u062f_\u0625\u062b\u0646\u064a\u0646_\u062b\u0644\u0627\u062b\u0627\u0621_\u0623\u0631\u0628\u0639\u0627\u0621_\u062e\u0645\u064a\u0633_\u062c\u0645\u0639\u0629_\u0633\u0628\u062a".split("_"),weekdaysMin:"\u062d_\u0646_\u062b_\u0631_\u062e_\u062c_\u0633".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:/\u0635|\u0645/,isPM:function(e){return"\u0645"===e},meridiem:function(e,a,t){return e<12?"\u0635":"\u0645"},calendar:{sameDay:"[\u0627\u0644\u064a\u0648\u0645 \u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",nextDay:"[\u063a\u062f\u0627 \u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",nextWeek:"dddd [\u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",lastDay:"[\u0623\u0645\u0633 \u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",lastWeek:"dddd [\u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",sameElse:"L"},relativeTime:{future:"\u0641\u064a %s",past:"\u0645\u0646\u0630 %s",s:"\u062b\u0648\u0627\u0646",ss:"%d \u062b\u0627\u0646\u064a\u0629",m:"\u062f\u0642\u064a\u0642\u0629",mm:"%d \u062f\u0642\u0627\u0626\u0642",h:"\u0633\u0627\u0639\u0629",hh:"%d \u0633\u0627\u0639\u0627\u062a",d:"\u064a\u0648\u0645",dd:"%d \u0623\u064a\u0627\u0645",M:"\u0634\u0647\u0631",MM:"%d \u0623\u0634\u0647\u0631",y:"\u0633\u0646\u0629",yy:"%d \u0633\u0646\u0648\u0627\u062a"},preparse:function(e){return e.replace(/[\u0661\u0662\u0663\u0664\u0665\u0666\u0667\u0668\u0669\u0660]/g,function(e){return es[e]}).replace(/\u060c/g,",")},postformat:function(e){return e.replace(/\d/g,function(e){return Xt[e]}).replace(/,/g,"\u060c")},week:{dow:0,doy:6}}),l.defineLocale("ar-tn",{months:"\u062c\u0627\u0646\u0641\u064a_\u0641\u064a\u0641\u0631\u064a_\u0645\u0627\u0631\u0633_\u0623\u0641\u0631\u064a\u0644_\u0645\u0627\u064a_\u062c\u0648\u0627\u0646_\u062c\u0648\u064a\u0644\u064a\u0629_\u0623\u0648\u062a_\u0633\u0628\u062a\u0645\u0628\u0631_\u0623\u0643\u062a\u0648\u0628\u0631_\u0646\u0648\u0641\u0645\u0628\u0631_\u062f\u064a\u0633\u0645\u0628\u0631".split("_"),monthsShort:"\u062c\u0627\u0646\u0641\u064a_\u0641\u064a\u0641\u0631\u064a_\u0645\u0627\u0631\u0633_\u0623\u0641\u0631\u064a\u0644_\u0645\u0627\u064a_\u062c\u0648\u0627\u0646_\u062c\u0648\u064a\u0644\u064a\u0629_\u0623\u0648\u062a_\u0633\u0628\u062a\u0645\u0628\u0631_\u0623\u0643\u062a\u0648\u0628\u0631_\u0646\u0648\u0641\u0645\u0628\u0631_\u062f\u064a\u0633\u0645\u0628\u0631".split("_"),weekdays:"\u0627\u0644\u0623\u062d\u062f_\u0627\u0644\u0625\u062b\u0646\u064a\u0646_\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621_\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621_\u0627\u0644\u062e\u0645\u064a\u0633_\u0627\u0644\u062c\u0645\u0639\u0629_\u0627\u0644\u0633\u0628\u062a".split("_"),weekdaysShort:"\u0623\u062d\u062f_\u0625\u062b\u0646\u064a\u0646_\u062b\u0644\u0627\u062b\u0627\u0621_\u0623\u0631\u0628\u0639\u0627\u0621_\u062e\u0645\u064a\u0633_\u062c\u0645\u0639\u0629_\u0633\u0628\u062a".split("_"),weekdaysMin:"\u062d_\u0646_\u062b_\u0631_\u062e_\u062c_\u0633".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:"[\u0627\u0644\u064a\u0648\u0645 \u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",nextDay:"[\u063a\u062f\u0627 \u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",nextWeek:"dddd [\u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",lastDay:"[\u0623\u0645\u0633 \u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",lastWeek:"dddd [\u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",sameElse:"L"},relativeTime:{future:"\u0641\u064a %s",past:"\u0645\u0646\u0630 %s",s:"\u062b\u0648\u0627\u0646",ss:"%d \u062b\u0627\u0646\u064a\u0629",m:"\u062f\u0642\u064a\u0642\u0629",mm:"%d \u062f\u0642\u0627\u0626\u0642",h:"\u0633\u0627\u0639\u0629",hh:"%d \u0633\u0627\u0639\u0627\u062a",d:"\u064a\u0648\u0645",dd:"%d \u0623\u064a\u0627\u0645",M:"\u0634\u0647\u0631",MM:"%d \u0623\u0634\u0647\u0631",y:"\u0633\u0646\u0629",yy:"%d \u0633\u0646\u0648\u0627\u062a"},week:{dow:1,doy:4}});var as={1:"\u0661",2:"\u0662",3:"\u0663",4:"\u0664",5:"\u0665",6:"\u0666",7:"\u0667",8:"\u0668",9:"\u0669",0:"\u0660"},ts={"\u0661":"1","\u0662":"2","\u0663":"3","\u0664":"4","\u0665":"5","\u0666":"6","\u0667":"7","\u0668":"8","\u0669":"9","\u0660":"0"},ss=function(e){return 0===e?0:1===e?1:2===e?2:3<=e%100&&e%100<=10?3:11<=e%100?4:5},ns={s:["\u0623\u0642\u0644 \u0645\u0646 \u062b\u0627\u0646\u064a\u0629","\u062b\u0627\u0646\u064a\u0629 \u0648\u0627\u062d\u062f\u0629",["\u062b\u0627\u0646\u064a\u062a\u0627\u0646","\u062b\u0627\u0646\u064a\u062a\u064a\u0646"],"%d \u062b\u0648\u0627\u0646","%d \u062b\u0627\u0646\u064a\u0629","%d \u062b\u0627\u0646\u064a\u0629"],m:["\u0623\u0642\u0644 \u0645\u0646 \u062f\u0642\u064a\u0642\u0629","\u062f\u0642\u064a\u0642\u0629 \u0648\u0627\u062d\u062f\u0629",["\u062f\u0642\u064a\u0642\u062a\u0627\u0646","\u062f\u0642\u064a\u0642\u062a\u064a\u0646"],"%d \u062f\u0642\u0627\u0626\u0642","%d \u062f\u0642\u064a\u0642\u0629","%d \u062f\u0642\u064a\u0642\u0629"],h:["\u0623\u0642\u0644 \u0645\u0646 \u0633\u0627\u0639\u0629","\u0633\u0627\u0639\u0629 \u0648\u0627\u062d\u062f\u0629",["\u0633\u0627\u0639\u062a\u0627\u0646","\u0633\u0627\u0639\u062a\u064a\u0646"],"%d \u0633\u0627\u0639\u0627\u062a","%d \u0633\u0627\u0639\u0629","%d \u0633\u0627\u0639\u0629"],d:["\u0623\u0642\u0644 \u0645\u0646 \u064a\u0648\u0645","\u064a\u0648\u0645 \u0648\u0627\u062d\u062f",["\u064a\u0648\u0645\u0627\u0646","\u064a\u0648\u0645\u064a\u0646"],"%d \u0623\u064a\u0627\u0645","%d \u064a\u0648\u0645\u064b\u0627","%d \u064a\u0648\u0645"],M:["\u0623\u0642\u0644 \u0645\u0646 \u0634\u0647\u0631","\u0634\u0647\u0631 \u0648\u0627\u062d\u062f",["\u0634\u0647\u0631\u0627\u0646","\u0634\u0647\u0631\u064a\u0646"],"%d \u0623\u0634\u0647\u0631","%d \u0634\u0647\u0631\u0627","%d \u0634\u0647\u0631"],y:["\u0623\u0642\u0644 \u0645\u0646 \u0639\u0627\u0645","\u0639\u0627\u0645 \u0648\u0627\u062d\u062f",["\u0639\u0627\u0645\u0627\u0646","\u0639\u0627\u0645\u064a\u0646"],"%d \u0623\u0639\u0648\u0627\u0645","%d \u0639\u0627\u0645\u064b\u0627","%d \u0639\u0627\u0645"]},ds=function(r){return function(e,a,t,s){var n=ss(e),d=ns[r][ss(e)];return 2===n&&(d=d[a?0:1]),d.replace(/%d/i,e)}},rs=["\u064a\u0646\u0627\u064a\u0631","\u0641\u0628\u0631\u0627\u064a\u0631","\u0645\u0627\u0631\u0633","\u0623\u0628\u0631\u064a\u0644","\u0645\u0627\u064a\u0648","\u064a\u0648\u0646\u064a\u0648","\u064a\u0648\u0644\u064a\u0648","\u0623\u063a\u0633\u0637\u0633","\u0633\u0628\u062a\u0645\u0628\u0631","\u0623\u0643\u062a\u0648\u0628\u0631","\u0646\u0648\u0641\u0645\u0628\u0631","\u062f\u064a\u0633\u0645\u0628\u0631"];l.defineLocale("ar",{months:rs,monthsShort:rs,weekdays:"\u0627\u0644\u0623\u062d\u062f_\u0627\u0644\u0625\u062b\u0646\u064a\u0646_\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621_\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621_\u0627\u0644\u062e\u0645\u064a\u0633_\u0627\u0644\u062c\u0645\u0639\u0629_\u0627\u0644\u0633\u0628\u062a".split("_"),weekdaysShort:"\u0623\u062d\u062f_\u0625\u062b\u0646\u064a\u0646_\u062b\u0644\u0627\u062b\u0627\u0621_\u0623\u0631\u0628\u0639\u0627\u0621_\u062e\u0645\u064a\u0633_\u062c\u0645\u0639\u0629_\u0633\u0628\u062a".split("_"),weekdaysMin:"\u062d_\u0646_\u062b_\u0631_\u062e_\u062c_\u0633".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"D/\u200fM/\u200fYYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/\u0635|\u0645/,isPM:function(e){return"\u0645"===e},meridiem:function(e,a,t){return e<12?"\u0635":"\u0645"},calendar:{sameDay:"[\u0627\u0644\u064a\u0648\u0645 \u0639\u0646\u062f \u0627\u0644\u0633\u0627\u0639\u0629] LT",nextDay:"[\u063a\u062f\u064b\u0627 \u0639\u0646\u062f \u0627\u0644\u0633\u0627\u0639\u0629] LT",nextWeek:"dddd [\u0639\u0646\u062f \u0627\u0644\u0633\u0627\u0639\u0629] LT",lastDay:"[\u0623\u0645\u0633 \u0639\u0646\u062f \u0627\u0644\u0633\u0627\u0639\u0629] LT",lastWeek:"dddd [\u0639\u0646\u062f \u0627\u0644\u0633\u0627\u0639\u0629] LT",sameElse:"L"},relativeTime:{future:"\u0628\u0639\u062f %s",past:"\u0645\u0646\u0630 %s",s:ds("s"),ss:ds("s"),m:ds("m"),mm:ds("m"),h:ds("h"),hh:ds("h"),d:ds("d"),dd:ds("d"),M:ds("M"),MM:ds("M"),y:ds("y"),yy:ds("y")},preparse:function(e){return e.replace(/[\u0661\u0662\u0663\u0664\u0665\u0666\u0667\u0668\u0669\u0660]/g,function(e){return ts[e]}).replace(/\u060c/g,",")},postformat:function(e){return e.replace(/\d/g,function(e){return as[e]}).replace(/,/g,"\u060c")},week:{dow:6,doy:12}});var _s={1:"-inci",5:"-inci",8:"-inci",70:"-inci",80:"-inci",2:"-nci",7:"-nci",20:"-nci",50:"-nci",3:"-\xfcnc\xfc",4:"-\xfcnc\xfc",100:"-\xfcnc\xfc",6:"-nc\u0131",9:"-uncu",10:"-uncu",30:"-uncu",60:"-\u0131nc\u0131",90:"-\u0131nc\u0131"};function is(e,a,t){var s,n;return"m"===t?a?"\u0445\u0432\u0456\u043b\u0456\u043d\u0430":"\u0445\u0432\u0456\u043b\u0456\u043d\u0443":"h"===t?a?"\u0433\u0430\u0434\u0437\u0456\u043d\u0430":"\u0433\u0430\u0434\u0437\u0456\u043d\u0443":e+" "+(s=+e,n={ss:a?"\u0441\u0435\u043a\u0443\u043d\u0434\u0430_\u0441\u0435\u043a\u0443\u043d\u0434\u044b_\u0441\u0435\u043a\u0443\u043d\u0434":"\u0441\u0435\u043a\u0443\u043d\u0434\u0443_\u0441\u0435\u043a\u0443\u043d\u0434\u044b_\u0441\u0435\u043a\u0443\u043d\u0434",mm:a?"\u0445\u0432\u0456\u043b\u0456\u043d\u0430_\u0445\u0432\u0456\u043b\u0456\u043d\u044b_\u0445\u0432\u0456\u043b\u0456\u043d":"\u0445\u0432\u0456\u043b\u0456\u043d\u0443_\u0445\u0432\u0456\u043b\u0456\u043d\u044b_\u0445\u0432\u0456\u043b\u0456\u043d",hh:a?"\u0433\u0430\u0434\u0437\u0456\u043d\u0430_\u0433\u0430\u0434\u0437\u0456\u043d\u044b_\u0433\u0430\u0434\u0437\u0456\u043d":"\u0433\u0430\u0434\u0437\u0456\u043d\u0443_\u0433\u0430\u0434\u0437\u0456\u043d\u044b_\u0433\u0430\u0434\u0437\u0456\u043d",dd:"\u0434\u0437\u0435\u043d\u044c_\u0434\u043d\u0456_\u0434\u0437\u0451\u043d",MM:"\u043c\u0435\u0441\u044f\u0446_\u043c\u0435\u0441\u044f\u0446\u044b_\u043c\u0435\u0441\u044f\u0446\u0430\u045e",yy:"\u0433\u043e\u0434_\u0433\u0430\u0434\u044b_\u0433\u0430\u0434\u043e\u045e"}[t].split("_"),s%10==1&&s%100!=11?n[0]:2<=s%10&&s%10<=4&&(s%100<10||20<=s%100)?n[1]:n[2])}l.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\u0259si_\xc7\u0259r\u015f\u0259nb\u0259 ax\u015fam\u0131_\xc7\u0259r\u015f\u0259nb\u0259_C\xfcm\u0259 ax\u015fam\u0131_C\xfcm\u0259_\u015e\u0259nb\u0259".split("_"),weekdaysShort:"Baz_BzE_\xc7Ax_\xc7\u0259r_CAx_C\xfcm_\u015e\u0259n".split("_"),weekdaysMin:"Bz_BE_\xc7A_\xc7\u0259_CA_C\xfc_\u015e\u0259".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\xfcn saat] LT",nextDay:"[sabah saat] LT",nextWeek:"[g\u0259l\u0259n h\u0259ft\u0259] dddd [saat] LT",lastDay:"[d\xfcn\u0259n] LT",lastWeek:"[ke\xe7\u0259n h\u0259ft\u0259] dddd [saat] LT",sameElse:"L"},relativeTime:{future:"%s sonra",past:"%s \u0259vv\u0259l",s:"birne\xe7\u0259 saniy\u0259",ss:"%d saniy\u0259",m:"bir d\u0259qiq\u0259",mm:"%d d\u0259qiq\u0259",h:"bir saat",hh:"%d saat",d:"bir g\xfcn",dd:"%d g\xfcn",M:"bir ay",MM:"%d ay",y:"bir il",yy:"%d il"},meridiemParse:/gec\u0259|s\u0259h\u0259r|g\xfcnd\xfcz|ax\u015fam/,isPM:function(e){return/^(g\xfcnd\xfcz|ax\u015fam)$/.test(e)},meridiem:function(e,a,t){return e<4?"gec\u0259":e<12?"s\u0259h\u0259r":e<17?"g\xfcnd\xfcz":"ax\u015fam"},dayOfMonthOrdinalParse:/\d{1,2}-(\u0131nc\u0131|inci|nci|\xfcnc\xfc|nc\u0131|uncu)/,ordinal:function(e){if(0===e)return e+"-\u0131nc\u0131";var a=e%10;return e+(_s[a]||_s[e%100-a]||_s[100<=e?100:null])},week:{dow:1,doy:7}}),l.defineLocale("be",{months:{format:"\u0441\u0442\u0443\u0434\u0437\u0435\u043d\u044f_\u043b\u044e\u0442\u0430\u0433\u0430_\u0441\u0430\u043a\u0430\u0432\u0456\u043a\u0430_\u043a\u0440\u0430\u0441\u0430\u0432\u0456\u043a\u0430_\u0442\u0440\u0430\u045e\u043d\u044f_\u0447\u044d\u0440\u0432\u0435\u043d\u044f_\u043b\u0456\u043f\u0435\u043d\u044f_\u0436\u043d\u0456\u045e\u043d\u044f_\u0432\u0435\u0440\u0430\u0441\u043d\u044f_\u043a\u0430\u0441\u0442\u0440\u044b\u0447\u043d\u0456\u043a\u0430_\u043b\u0456\u0441\u0442\u0430\u043f\u0430\u0434\u0430_\u0441\u043d\u0435\u0436\u043d\u044f".split("_"),standalone:"\u0441\u0442\u0443\u0434\u0437\u0435\u043d\u044c_\u043b\u044e\u0442\u044b_\u0441\u0430\u043a\u0430\u0432\u0456\u043a_\u043a\u0440\u0430\u0441\u0430\u0432\u0456\u043a_\u0442\u0440\u0430\u0432\u0435\u043d\u044c_\u0447\u044d\u0440\u0432\u0435\u043d\u044c_\u043b\u0456\u043f\u0435\u043d\u044c_\u0436\u043d\u0456\u0432\u0435\u043d\u044c_\u0432\u0435\u0440\u0430\u0441\u0435\u043d\u044c_\u043a\u0430\u0441\u0442\u0440\u044b\u0447\u043d\u0456\u043a_\u043b\u0456\u0441\u0442\u0430\u043f\u0430\u0434_\u0441\u043d\u0435\u0436\u0430\u043d\u044c".split("_")},monthsShort:"\u0441\u0442\u0443\u0434_\u043b\u044e\u0442_\u0441\u0430\u043a_\u043a\u0440\u0430\u0441_\u0442\u0440\u0430\u0432_\u0447\u044d\u0440\u0432_\u043b\u0456\u043f_\u0436\u043d\u0456\u0432_\u0432\u0435\u0440_\u043a\u0430\u0441\u0442_\u043b\u0456\u0441\u0442_\u0441\u043d\u0435\u0436".split("_"),weekdays:{format:"\u043d\u044f\u0434\u0437\u0435\u043b\u044e_\u043f\u0430\u043d\u044f\u0434\u0437\u0435\u043b\u0430\u043a_\u0430\u045e\u0442\u043e\u0440\u0430\u043a_\u0441\u0435\u0440\u0430\u0434\u0443_\u0447\u0430\u0446\u0432\u0435\u0440_\u043f\u044f\u0442\u043d\u0456\u0446\u0443_\u0441\u0443\u0431\u043e\u0442\u0443".split("_"),standalone:"\u043d\u044f\u0434\u0437\u0435\u043b\u044f_\u043f\u0430\u043d\u044f\u0434\u0437\u0435\u043b\u0430\u043a_\u0430\u045e\u0442\u043e\u0440\u0430\u043a_\u0441\u0435\u0440\u0430\u0434\u0430_\u0447\u0430\u0446\u0432\u0435\u0440_\u043f\u044f\u0442\u043d\u0456\u0446\u0430_\u0441\u0443\u0431\u043e\u0442\u0430".split("_"),isFormat:/\[ ?[\u0423\u0443\u045e] ?(?:\u043c\u0456\u043d\u0443\u043b\u0443\u044e|\u043d\u0430\u0441\u0442\u0443\u043f\u043d\u0443\u044e)? ?\] ?dddd/},weekdaysShort:"\u043d\u0434_\u043f\u043d_\u0430\u0442_\u0441\u0440_\u0447\u0446_\u043f\u0442_\u0441\u0431".split("_"),weekdaysMin:"\u043d\u0434_\u043f\u043d_\u0430\u0442_\u0441\u0440_\u0447\u0446_\u043f\u0442_\u0441\u0431".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY \u0433.",LLL:"D MMMM YYYY \u0433., HH:mm",LLLL:"dddd, D MMMM YYYY \u0433., HH:mm"},calendar:{sameDay:"[\u0421\u0451\u043d\u043d\u044f \u045e] LT",nextDay:"[\u0417\u0430\u045e\u0442\u0440\u0430 \u045e] LT",lastDay:"[\u0423\u0447\u043e\u0440\u0430 \u045e] LT",nextWeek:function(){return"[\u0423] dddd [\u045e] LT"},lastWeek:function(){switch(this.day()){case 0:case 3:case 5:case 6:return"[\u0423 \u043c\u0456\u043d\u0443\u043b\u0443\u044e] dddd [\u045e] LT";case 1:case 2:case 4:return"[\u0423 \u043c\u0456\u043d\u0443\u043b\u044b] dddd [\u045e] LT"}},sameElse:"L"},relativeTime:{future:"\u043f\u0440\u0430\u0437 %s",past:"%s \u0442\u0430\u043c\u0443",s:"\u043d\u0435\u043a\u0430\u043b\u044c\u043a\u0456 \u0441\u0435\u043a\u0443\u043d\u0434",m:is,mm:is,h:is,hh:is,d:"\u0434\u0437\u0435\u043d\u044c",dd:is,M:"\u043c\u0435\u0441\u044f\u0446",MM:is,y:"\u0433\u043e\u0434",yy:is},meridiemParse:/\u043d\u043e\u0447\u044b|\u0440\u0430\u043d\u0456\u0446\u044b|\u0434\u043d\u044f|\u0432\u0435\u0447\u0430\u0440\u0430/,isPM:function(e){return/^(\u0434\u043d\u044f|\u0432\u0435\u0447\u0430\u0440\u0430)$/.test(e)},meridiem:function(e,a,t){return e<4?"\u043d\u043e\u0447\u044b":e<12?"\u0440\u0430\u043d\u0456\u0446\u044b":e<17?"\u0434\u043d\u044f":"\u0432\u0435\u0447\u0430\u0440\u0430"},dayOfMonthOrdinalParse:/\d{1,2}-(\u0456|\u044b|\u0433\u0430)/,ordinal:function(e,a){switch(a){case"M":case"d":case"DDD":case"w":case"W":return e%10!=2&&e%10!=3||e%100==12||e%100==13?e+"-\u044b":e+"-\u0456";case"D":return e+"-\u0433\u0430";default:return e}},week:{dow:1,doy:7}}),l.defineLocale("bg",{months:"\u044f\u043d\u0443\u0430\u0440\u0438_\u0444\u0435\u0432\u0440\u0443\u0430\u0440\u0438_\u043c\u0430\u0440\u0442_\u0430\u043f\u0440\u0438\u043b_\u043c\u0430\u0439_\u044e\u043d\u0438_\u044e\u043b\u0438_\u0430\u0432\u0433\u0443\u0441\u0442_\u0441\u0435\u043f\u0442\u0435\u043c\u0432\u0440\u0438_\u043e\u043a\u0442\u043e\u043c\u0432\u0440\u0438_\u043d\u043e\u0435\u043c\u0432\u0440\u0438_\u0434\u0435\u043a\u0435\u043c\u0432\u0440\u0438".split("_"),monthsShort:"\u044f\u043d\u0440_\u0444\u0435\u0432_\u043c\u0430\u0440_\u0430\u043f\u0440_\u043c\u0430\u0439_\u044e\u043d\u0438_\u044e\u043b\u0438_\u0430\u0432\u0433_\u0441\u0435\u043f_\u043e\u043a\u0442_\u043d\u043e\u0435_\u0434\u0435\u043a".split("_"),weekdays:"\u043d\u0435\u0434\u0435\u043b\u044f_\u043f\u043e\u043d\u0435\u0434\u0435\u043b\u043d\u0438\u043a_\u0432\u0442\u043e\u0440\u043d\u0438\u043a_\u0441\u0440\u044f\u0434\u0430_\u0447\u0435\u0442\u0432\u044a\u0440\u0442\u044a\u043a_\u043f\u0435\u0442\u044a\u043a_\u0441\u044a\u0431\u043e\u0442\u0430".split("_"),weekdaysShort:"\u043d\u0435\u0434_\u043f\u043e\u043d_\u0432\u0442\u043e_\u0441\u0440\u044f_\u0447\u0435\u0442_\u043f\u0435\u0442_\u0441\u044a\u0431".split("_"),weekdaysMin:"\u043d\u0434_\u043f\u043d_\u0432\u0442_\u0441\u0440_\u0447\u0442_\u043f\u0442_\u0441\u0431".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:"[\u0414\u043d\u0435\u0441 \u0432] LT",nextDay:"[\u0423\u0442\u0440\u0435 \u0432] LT",nextWeek:"dddd [\u0432] LT",lastDay:"[\u0412\u0447\u0435\u0440\u0430 \u0432] LT",lastWeek:function(){switch(this.day()){case 0:case 3:case 6:return"[\u0412 \u0438\u0437\u043c\u0438\u043d\u0430\u043b\u0430\u0442\u0430] dddd [\u0432] LT";case 1:case 2:case 4:case 5:return"[\u0412 \u0438\u0437\u043c\u0438\u043d\u0430\u043b\u0438\u044f] dddd [\u0432] LT"}},sameElse:"L"},relativeTime:{future:"\u0441\u043b\u0435\u0434 %s",past:"\u043f\u0440\u0435\u0434\u0438 %s",s:"\u043d\u044f\u043a\u043e\u043b\u043a\u043e \u0441\u0435\u043a\u0443\u043d\u0434\u0438",ss:"%d \u0441\u0435\u043a\u0443\u043d\u0434\u0438",m:"\u043c\u0438\u043d\u0443\u0442\u0430",mm:"%d \u043c\u0438\u043d\u0443\u0442\u0438",h:"\u0447\u0430\u0441",hh:"%d \u0447\u0430\u0441\u0430",d:"\u0434\u0435\u043d",dd:"%d \u0434\u043d\u0438",M:"\u043c\u0435\u0441\u0435\u0446",MM:"%d \u043c\u0435\u0441\u0435\u0446\u0430",y:"\u0433\u043e\u0434\u0438\u043d\u0430",yy:"%d \u0433\u043e\u0434\u0438\u043d\u0438"},dayOfMonthOrdinalParse:/\d{1,2}-(\u0435\u0432|\u0435\u043d|\u0442\u0438|\u0432\u0438|\u0440\u0438|\u043c\u0438)/,ordinal:function(e){var a=e%10,t=e%100;return 0===e?e+"-\u0435\u0432":0===t?e+"-\u0435\u043d":10<t&&t<20?e+"-\u0442\u0438":1===a?e+"-\u0432\u0438":2===a?e+"-\u0440\u0438":7===a||8===a?e+"-\u043c\u0438":e+"-\u0442\u0438"},week:{dow:1,doy:7}}),l.defineLocale("bm",{months:"Zanwuyekalo_Fewuruyekalo_Marisikalo_Awirilikalo_M\u025bkalo_Zuw\u025bnkalo_Zuluyekalo_Utikalo_S\u025btanburukalo_\u0254kut\u0254burukalo_Nowanburukalo_Desanburukalo".split("_"),monthsShort:"Zan_Few_Mar_Awi_M\u025b_Zuw_Zul_Uti_S\u025bt_\u0254ku_Now_Des".split("_"),weekdays:"Kari_Nt\u025bn\u025bn_Tarata_Araba_Alamisa_Juma_Sibiri".split("_"),weekdaysShort:"Kar_Nt\u025b_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\u025br\u025b] HH:mm",LLLL:"dddd MMMM [tile] D [san] YYYY [l\u025br\u025b] HH:mm"},calendar:{sameDay:"[Bi l\u025br\u025b] LT",nextDay:"[Sini l\u025br\u025b] LT",nextWeek:"dddd [don l\u025br\u025b] LT",lastDay:"[Kunu l\u025br\u025b] LT",lastWeek:"dddd [t\u025bm\u025bnen l\u025br\u025b] LT",sameElse:"L"},relativeTime:{future:"%s k\u0254n\u0254",past:"a b\u025b %s b\u0254",s:"sanga dama dama",ss:"sekondi %d",m:"miniti kelen",mm:"miniti %d",h:"l\u025br\u025b kelen",hh:"l\u025br\u025b %d",d:"tile kelen",dd:"tile %d",M:"kalo kelen",MM:"kalo %d",y:"san kelen",yy:"san %d"},week:{dow:1,doy:4}});var os={1:"\u09e7",2:"\u09e8",3:"\u09e9",4:"\u09ea",5:"\u09eb",6:"\u09ec",7:"\u09ed",8:"\u09ee",9:"\u09ef",0:"\u09e6"},ms={"\u09e7":"1","\u09e8":"2","\u09e9":"3","\u09ea":"4","\u09eb":"5","\u09ec":"6","\u09ed":"7","\u09ee":"8","\u09ef":"9","\u09e6":"0"};l.defineLocale("bn",{months:"\u099c\u09be\u09a8\u09c1\u09df\u09be\u09b0\u09c0_\u09ab\u09c7\u09ac\u09cd\u09b0\u09c1\u09df\u09be\u09b0\u09bf_\u09ae\u09be\u09b0\u09cd\u099a_\u098f\u09aa\u09cd\u09b0\u09bf\u09b2_\u09ae\u09c7_\u099c\u09c1\u09a8_\u099c\u09c1\u09b2\u09be\u0987_\u0986\u0997\u09b8\u09cd\u099f_\u09b8\u09c7\u09aa\u09cd\u099f\u09c7\u09ae\u09cd\u09ac\u09b0_\u0985\u0995\u09cd\u099f\u09cb\u09ac\u09b0_\u09a8\u09ad\u09c7\u09ae\u09cd\u09ac\u09b0_\u09a1\u09bf\u09b8\u09c7\u09ae\u09cd\u09ac\u09b0".split("_"),monthsShort:"\u099c\u09be\u09a8\u09c1_\u09ab\u09c7\u09ac_\u09ae\u09be\u09b0\u09cd\u099a_\u098f\u09aa\u09cd\u09b0_\u09ae\u09c7_\u099c\u09c1\u09a8_\u099c\u09c1\u09b2_\u0986\u0997_\u09b8\u09c7\u09aa\u09cd\u099f_\u0985\u0995\u09cd\u099f\u09cb_\u09a8\u09ad\u09c7_\u09a1\u09bf\u09b8\u09c7".split("_"),weekdays:"\u09b0\u09ac\u09bf\u09ac\u09be\u09b0_\u09b8\u09cb\u09ae\u09ac\u09be\u09b0_\u09ae\u0999\u09cd\u0997\u09b2\u09ac\u09be\u09b0_\u09ac\u09c1\u09a7\u09ac\u09be\u09b0_\u09ac\u09c3\u09b9\u09b8\u09cd\u09aa\u09a4\u09bf\u09ac\u09be\u09b0_\u09b6\u09c1\u0995\u09cd\u09b0\u09ac\u09be\u09b0_\u09b6\u09a8\u09bf\u09ac\u09be\u09b0".split("_"),weekdaysShort:"\u09b0\u09ac\u09bf_\u09b8\u09cb\u09ae_\u09ae\u0999\u09cd\u0997\u09b2_\u09ac\u09c1\u09a7_\u09ac\u09c3\u09b9\u09b8\u09cd\u09aa\u09a4\u09bf_\u09b6\u09c1\u0995\u09cd\u09b0_\u09b6\u09a8\u09bf".split("_"),weekdaysMin:"\u09b0\u09ac\u09bf_\u09b8\u09cb\u09ae_\u09ae\u0999\u09cd\u0997_\u09ac\u09c1\u09a7_\u09ac\u09c3\u09b9\u0983_\u09b6\u09c1\u0995\u09cd\u09b0_\u09b6\u09a8\u09bf".split("_"),longDateFormat:{LT:"A h:mm \u09b8\u09ae\u09df",LTS:"A h:mm:ss \u09b8\u09ae\u09df",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm \u09b8\u09ae\u09df",LLLL:"dddd, D MMMM YYYY, A h:mm \u09b8\u09ae\u09df"},calendar:{sameDay:"[\u0986\u099c] LT",nextDay:"[\u0986\u0997\u09be\u09ae\u09c0\u0995\u09be\u09b2] LT",nextWeek:"dddd, LT",lastDay:"[\u0997\u09a4\u0995\u09be\u09b2] LT",lastWeek:"[\u0997\u09a4] dddd, LT",sameElse:"L"},relativeTime:{future:"%s \u09aa\u09b0\u09c7",past:"%s \u0986\u0997\u09c7",s:"\u0995\u09df\u09c7\u0995 \u09b8\u09c7\u0995\u09c7\u09a8\u09cd\u09a1",ss:"%d \u09b8\u09c7\u0995\u09c7\u09a8\u09cd\u09a1",m:"\u098f\u0995 \u09ae\u09bf\u09a8\u09bf\u099f",mm:"%d \u09ae\u09bf\u09a8\u09bf\u099f",h:"\u098f\u0995 \u0998\u09a8\u09cd\u099f\u09be",hh:"%d \u0998\u09a8\u09cd\u099f\u09be",d:"\u098f\u0995 \u09a6\u09bf\u09a8",dd:"%d \u09a6\u09bf\u09a8",M:"\u098f\u0995 \u09ae\u09be\u09b8",MM:"%d \u09ae\u09be\u09b8",y:"\u098f\u0995 \u09ac\u099b\u09b0",yy:"%d \u09ac\u099b\u09b0"},preparse:function(e){return e.replace(/[\u09e7\u09e8\u09e9\u09ea\u09eb\u09ec\u09ed\u09ee\u09ef\u09e6]/g,function(e){return ms[e]})},postformat:function(e){return e.replace(/\d/g,function(e){return os[e]})},meridiemParse:/\u09b0\u09be\u09a4|\u09b8\u0995\u09be\u09b2|\u09a6\u09c1\u09aa\u09c1\u09b0|\u09ac\u09bf\u0995\u09be\u09b2|\u09b0\u09be\u09a4/,meridiemHour:function(e,a){return 12===e&&(e=0),"\u09b0\u09be\u09a4"===a&&4<=e||"\u09a6\u09c1\u09aa\u09c1\u09b0"===a&&e<5||"\u09ac\u09bf\u0995\u09be\u09b2"===a?e+12:e},meridiem:function(e,a,t){return e<4?"\u09b0\u09be\u09a4":e<10?"\u09b8\u0995\u09be\u09b2":e<17?"\u09a6\u09c1\u09aa\u09c1\u09b0":e<20?"\u09ac\u09bf\u0995\u09be\u09b2":"\u09b0\u09be\u09a4"},week:{dow:0,doy:6}});var us={1:"\u0f21",2:"\u0f22",3:"\u0f23",4:"\u0f24",5:"\u0f25",6:"\u0f26",7:"\u0f27",8:"\u0f28",9:"\u0f29",0:"\u0f20"},ls={"\u0f21":"1","\u0f22":"2","\u0f23":"3","\u0f24":"4","\u0f25":"5","\u0f26":"6","\u0f27":"7","\u0f28":"8","\u0f29":"9","\u0f20":"0"};function Ms(e,a,t){var s,n,d;return e+" "+(s={mm:"munutenn",MM:"miz",dd:"devezh"}[t],2!==e?s:void 0!==(d={m:"v",b:"v",d:"z"})[(n=s).charAt(0)]?d[n.charAt(0)]+n.substring(1):n)}function hs(e,a,t){var s=e+" ";switch(t){case"ss":return s+=1===e?"sekunda":2===e||3===e||4===e?"sekunde":"sekundi";case"m":return a?"jedna minuta":"jedne minute";case"mm":return s+=1===e?"minuta":2===e||3===e||4===e?"minute":"minuta";case"h":return a?"jedan sat":"jednog sata";case"hh":return s+=1===e?"sat":2===e||3===e||4===e?"sata":"sati";case"dd":return s+=1===e?"dan":"dana";case"MM":return s+=1===e?"mjesec":2===e||3===e||4===e?"mjeseca":"mjeseci";case"yy":return s+=1===e?"godina":2===e||3===e||4===e?"godine":"godina"}}l.defineLocale("bo",{months:"\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f51\u0f44\u0f0b\u0f54\u0f7c_\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f42\u0f49\u0f72\u0f66\u0f0b\u0f54_\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f42\u0f66\u0f74\u0f58\u0f0b\u0f54_\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f56\u0f5e\u0f72\u0f0b\u0f54_\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f63\u0f94\u0f0b\u0f54_\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f51\u0fb2\u0f74\u0f42\u0f0b\u0f54_\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f56\u0f51\u0f74\u0f53\u0f0b\u0f54_\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f56\u0f62\u0f92\u0fb1\u0f51\u0f0b\u0f54_\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f51\u0f42\u0f74\u0f0b\u0f54_\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f56\u0f45\u0f74\u0f0b\u0f54_\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f56\u0f45\u0f74\u0f0b\u0f42\u0f45\u0f72\u0f42\u0f0b\u0f54_\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f56\u0f45\u0f74\u0f0b\u0f42\u0f49\u0f72\u0f66\u0f0b\u0f54".split("_"),monthsShort:"\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f51\u0f44\u0f0b\u0f54\u0f7c_\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f42\u0f49\u0f72\u0f66\u0f0b\u0f54_\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f42\u0f66\u0f74\u0f58\u0f0b\u0f54_\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f56\u0f5e\u0f72\u0f0b\u0f54_\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f63\u0f94\u0f0b\u0f54_\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f51\u0fb2\u0f74\u0f42\u0f0b\u0f54_\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f56\u0f51\u0f74\u0f53\u0f0b\u0f54_\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f56\u0f62\u0f92\u0fb1\u0f51\u0f0b\u0f54_\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f51\u0f42\u0f74\u0f0b\u0f54_\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f56\u0f45\u0f74\u0f0b\u0f54_\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f56\u0f45\u0f74\u0f0b\u0f42\u0f45\u0f72\u0f42\u0f0b\u0f54_\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f56\u0f45\u0f74\u0f0b\u0f42\u0f49\u0f72\u0f66\u0f0b\u0f54".split("_"),weekdays:"\u0f42\u0f5f\u0f60\u0f0b\u0f49\u0f72\u0f0b\u0f58\u0f0b_\u0f42\u0f5f\u0f60\u0f0b\u0f5f\u0fb3\u0f0b\u0f56\u0f0b_\u0f42\u0f5f\u0f60\u0f0b\u0f58\u0f72\u0f42\u0f0b\u0f51\u0f58\u0f62\u0f0b_\u0f42\u0f5f\u0f60\u0f0b\u0f63\u0fb7\u0f42\u0f0b\u0f54\u0f0b_\u0f42\u0f5f\u0f60\u0f0b\u0f55\u0f74\u0f62\u0f0b\u0f56\u0f74_\u0f42\u0f5f\u0f60\u0f0b\u0f54\u0f0b\u0f66\u0f44\u0f66\u0f0b_\u0f42\u0f5f\u0f60\u0f0b\u0f66\u0fa4\u0f7a\u0f53\u0f0b\u0f54\u0f0b".split("_"),weekdaysShort:"\u0f49\u0f72\u0f0b\u0f58\u0f0b_\u0f5f\u0fb3\u0f0b\u0f56\u0f0b_\u0f58\u0f72\u0f42\u0f0b\u0f51\u0f58\u0f62\u0f0b_\u0f63\u0fb7\u0f42\u0f0b\u0f54\u0f0b_\u0f55\u0f74\u0f62\u0f0b\u0f56\u0f74_\u0f54\u0f0b\u0f66\u0f44\u0f66\u0f0b_\u0f66\u0fa4\u0f7a\u0f53\u0f0b\u0f54\u0f0b".split("_"),weekdaysMin:"\u0f49\u0f72\u0f0b\u0f58\u0f0b_\u0f5f\u0fb3\u0f0b\u0f56\u0f0b_\u0f58\u0f72\u0f42\u0f0b\u0f51\u0f58\u0f62\u0f0b_\u0f63\u0fb7\u0f42\u0f0b\u0f54\u0f0b_\u0f55\u0f74\u0f62\u0f0b\u0f56\u0f74_\u0f54\u0f0b\u0f66\u0f44\u0f66\u0f0b_\u0f66\u0fa4\u0f7a\u0f53\u0f0b\u0f54\u0f0b".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:"[\u0f51\u0f72\u0f0b\u0f62\u0f72\u0f44] LT",nextDay:"[\u0f66\u0f44\u0f0b\u0f49\u0f72\u0f53] LT",nextWeek:"[\u0f56\u0f51\u0f74\u0f53\u0f0b\u0f55\u0fb2\u0f42\u0f0b\u0f62\u0f97\u0f7a\u0f66\u0f0b\u0f58], LT",lastDay:"[\u0f41\u0f0b\u0f66\u0f44] LT",lastWeek:"[\u0f56\u0f51\u0f74\u0f53\u0f0b\u0f55\u0fb2\u0f42\u0f0b\u0f58\u0f50\u0f60\u0f0b\u0f58] dddd, LT",sameElse:"L"},relativeTime:{future:"%s \u0f63\u0f0b",past:"%s \u0f66\u0f94\u0f53\u0f0b\u0f63",s:"\u0f63\u0f58\u0f0b\u0f66\u0f44",ss:"%d \u0f66\u0f90\u0f62\u0f0b\u0f46\u0f0d",m:"\u0f66\u0f90\u0f62\u0f0b\u0f58\u0f0b\u0f42\u0f45\u0f72\u0f42",mm:"%d \u0f66\u0f90\u0f62\u0f0b\u0f58",h:"\u0f46\u0f74\u0f0b\u0f5a\u0f7c\u0f51\u0f0b\u0f42\u0f45\u0f72\u0f42",hh:"%d \u0f46\u0f74\u0f0b\u0f5a\u0f7c\u0f51",d:"\u0f49\u0f72\u0f53\u0f0b\u0f42\u0f45\u0f72\u0f42",dd:"%d \u0f49\u0f72\u0f53\u0f0b",M:"\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f42\u0f45\u0f72\u0f42",MM:"%d \u0f5f\u0fb3\u0f0b\u0f56",y:"\u0f63\u0f7c\u0f0b\u0f42\u0f45\u0f72\u0f42",yy:"%d \u0f63\u0f7c"},preparse:function(e){return e.replace(/[\u0f21\u0f22\u0f23\u0f24\u0f25\u0f26\u0f27\u0f28\u0f29\u0f20]/g,function(e){return ls[e]})},postformat:function(e){return e.replace(/\d/g,function(e){return us[e]})},meridiemParse:/\u0f58\u0f5a\u0f53\u0f0b\u0f58\u0f7c|\u0f5e\u0f7c\u0f42\u0f66\u0f0b\u0f40\u0f66|\u0f49\u0f72\u0f53\u0f0b\u0f42\u0f74\u0f44|\u0f51\u0f42\u0f7c\u0f44\u0f0b\u0f51\u0f42|\u0f58\u0f5a\u0f53\u0f0b\u0f58\u0f7c/,meridiemHour:function(e,a){return 12===e&&(e=0),"\u0f58\u0f5a\u0f53\u0f0b\u0f58\u0f7c"===a&&4<=e||"\u0f49\u0f72\u0f53\u0f0b\u0f42\u0f74\u0f44"===a&&e<5||"\u0f51\u0f42\u0f7c\u0f44\u0f0b\u0f51\u0f42"===a?e+12:e},meridiem:function(e,a,t){return e<4?"\u0f58\u0f5a\u0f53\u0f0b\u0f58\u0f7c":e<10?"\u0f5e\u0f7c\u0f42\u0f66\u0f0b\u0f40\u0f66":e<17?"\u0f49\u0f72\u0f53\u0f0b\u0f42\u0f74\u0f44":e<20?"\u0f51\u0f42\u0f7c\u0f44\u0f0b\u0f51\u0f42":"\u0f58\u0f5a\u0f53\u0f0b\u0f58\u0f7c"},week:{dow:0,doy:6}}),l.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("_"),weekdaysParseExact:!0,longDateFormat:{LT:"h[e]mm A",LTS:"h[e]mm:ss A",L:"DD/MM/YYYY",LL:"D [a viz] MMMM YYYY",LLL:"D [a viz] MMMM YYYY h[e]mm A",LLLL:"dddd, D [a viz] MMMM YYYY h[e]mm A"},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\xf9",ss:"%d eilenn",m:"ur vunutenn",mm:Ms,h:"un eur",hh:"%d eur",d:"un devezh",dd:Ms,M:"ur miz",MM:Ms,y:"ur bloaz",yy:function(e){switch(function e(a){return 9<a?e(a%10):a}(e)){case 1:case 3:case 4:case 5:case 9:return e+" bloaz";default:return e+" vloaz"}}},dayOfMonthOrdinalParse:/\d{1,2}(a\xf1|vet)/,ordinal:function(e){return e+(1===e?"a\xf1":"vet")},week:{dow:1,doy:4}}),l.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_\u010detvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sri._\u010det._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_\u010de_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\u010der u] LT",lastWeek:function(){switch(this.day()){case 0:case 3:return"[pro\u0161lu] dddd [u] LT";case 6:return"[pro\u0161le] [subote] [u] LT";case 1:case 2:case 4:case 5:return"[pro\u0161li] dddd [u] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"prije %s",s:"par sekundi",ss:hs,m:hs,mm:hs,h:hs,hh:hs,d:"dan",dd:hs,M:"mjesec",MM:hs,y:"godinu",yy:hs},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}}),l.defineLocale("ca",{months:{standalone:"gener_febrer_mar\xe7_abril_maig_juny_juliol_agost_setembre_octubre_novembre_desembre".split("_"),format:"de gener_de febrer_de mar\xe7_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\xe7_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\xe0 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\xed %s",past:"fa %s",s:"uns segons",ss:"%d segons",m:"un minut",mm:"%d minuts",h:"una hora",hh:"%d 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|\xe8|a)/,ordinal:function(e,a){var t=1===e?"r":2===e?"n":3===e?"r":4===e?"t":"\xe8";return"w"!==a&&"W"!==a||(t="a"),e+t},week:{dow:1,doy:4}});var Ls="leden_\xfanor_b\u0159ezen_duben_kv\u011bten_\u010derven_\u010dervenec_srpen_z\xe1\u0159\xed_\u0159\xedjen_listopad_prosinec".split("_"),cs="led_\xfano_b\u0159e_dub_kv\u011b_\u010dvn_\u010dvc_srp_z\xe1\u0159_\u0159\xedj_lis_pro".split("_"),Ys=[/^led/i,/^\xfano/i,/^b\u0159e/i,/^dub/i,/^kv\u011b/i,/^(\u010dvn|\u010derven$|\u010dervna)/i,/^(\u010dvc|\u010dervenec|\u010dervence)/i,/^srp/i,/^z\xe1\u0159/i,/^\u0159\xedj/i,/^lis/i,/^pro/i],ys=/^(leden|\xfanor|b\u0159ezen|duben|kv\u011bten|\u010dervenec|\u010dervence|\u010derven|\u010dervna|srpen|z\xe1\u0159\xed|\u0159\xedjen|listopad|prosinec|led|\xfano|b\u0159e|dub|kv\u011b|\u010dvn|\u010dvc|srp|z\xe1\u0159|\u0159\xedj|lis|pro)/i;function fs(e){return 1<e&&e<5&&1!=~~(e/10)}function ks(e,a,t,s){var n=e+" ";switch(t){case"s":return a||s?"p\xe1r sekund":"p\xe1r sekundami";case"ss":return a||s?n+(fs(e)?"sekundy":"sekund"):n+"sekundami";break;case"m":return a?"minuta":s?"minutu":"minutou";case"mm":return a||s?n+(fs(e)?"minuty":"minut"):n+"minutami";break;case"h":return a?"hodina":s?"hodinu":"hodinou";case"hh":return a||s?n+(fs(e)?"hodiny":"hodin"):n+"hodinami";break;case"d":return a||s?"den":"dnem";case"dd":return a||s?n+(fs(e)?"dny":"dn\xed"):n+"dny";break;case"M":return a||s?"m\u011bs\xedc":"m\u011bs\xedcem";case"MM":return a||s?n+(fs(e)?"m\u011bs\xedce":"m\u011bs\xedc\u016f"):n+"m\u011bs\xedci";break;case"y":return a||s?"rok":"rokem";case"yy":return a||s?n+(fs(e)?"roky":"let"):n+"lety";break}}function ps(e,a,t,s){var n={m:["eine Minute","einer Minute"],h:["eine Stunde","einer Stunde"],d:["ein Tag","einem Tag"],dd:[e+" Tage",e+" Tagen"],M:["ein Monat","einem Monat"],MM:[e+" Monate",e+" Monaten"],y:["ein Jahr","einem Jahr"],yy:[e+" Jahre",e+" Jahren"]};return a?n[t][0]:n[t][1]}function Ds(e,a,t,s){var n={m:["eine Minute","einer Minute"],h:["eine Stunde","einer Stunde"],d:["ein Tag","einem Tag"],dd:[e+" Tage",e+" Tagen"],M:["ein Monat","einem Monat"],MM:[e+" Monate",e+" Monaten"],y:["ein Jahr","einem Jahr"],yy:[e+" Jahre",e+" Jahren"]};return a?n[t][0]:n[t][1]}function Ts(e,a,t,s){var n={m:["eine Minute","einer Minute"],h:["eine Stunde","einer Stunde"],d:["ein Tag","einem Tag"],dd:[e+" Tage",e+" Tagen"],M:["ein Monat","einem Monat"],MM:[e+" Monate",e+" Monaten"],y:["ein Jahr","einem Jahr"],yy:[e+" Jahre",e+" Jahren"]};return a?n[t][0]:n[t][1]}l.defineLocale("cs",{months:Ls,monthsShort:cs,monthsRegex:ys,monthsShortRegex:ys,monthsStrictRegex:/^(leden|ledna|\xfanora|\xfanor|b\u0159ezen|b\u0159ezna|duben|dubna|kv\u011bten|kv\u011btna|\u010dervenec|\u010dervence|\u010derven|\u010dervna|srpen|srpna|z\xe1\u0159\xed|\u0159\xedjen|\u0159\xedjna|listopadu|listopad|prosinec|prosince)/i,monthsShortStrictRegex:/^(led|\xfano|b\u0159e|dub|kv\u011b|\u010dvn|\u010dvc|srp|z\xe1\u0159|\u0159\xedj|lis|pro)/i,monthsParse:Ys,longMonthsParse:Ys,shortMonthsParse:Ys,weekdays:"ned\u011ble_pond\u011bl\xed_\xfater\xfd_st\u0159eda_\u010dtvrtek_p\xe1tek_sobota".split("_"),weekdaysShort:"ne_po_\xfat_st_\u010dt_p\xe1_so".split("_"),weekdaysMin:"ne_po_\xfat_st_\u010dt_p\xe1_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\xedtra v] LT",nextWeek:function(){switch(this.day()){case 0:return"[v ned\u011bli v] LT";case 1:case 2:return"[v] dddd [v] LT";case 3:return"[ve st\u0159edu v] LT";case 4:return"[ve \u010dtvrtek v] LT";case 5:return"[v p\xe1tek v] LT";case 6:return"[v sobotu v] LT"}},lastDay:"[v\u010dera v] LT",lastWeek:function(){switch(this.day()){case 0:return"[minulou ned\u011bli v] LT";case 1:case 2:return"[minul\xe9] dddd [v] LT";case 3:return"[minulou st\u0159edu v] LT";case 4:case 5:return"[minul\xfd] dddd [v] LT";case 6:return"[minulou sobotu v] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"p\u0159ed %s",s:ks,ss:ks,m:ks,mm:ks,h:ks,hh:ks,d:ks,dd:ks,M:ks,MM:ks,y:ks,yy:ks},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}}),l.defineLocale("cv",{months:"\u043a\u04d1\u0440\u043b\u0430\u0447_\u043d\u0430\u0440\u04d1\u0441_\u043f\u0443\u0448_\u0430\u043a\u0430_\u043c\u0430\u0439_\u04ab\u04d7\u0440\u0442\u043c\u0435_\u0443\u0442\u04d1_\u04ab\u0443\u0440\u043b\u0430_\u0430\u0432\u04d1\u043d_\u044e\u043f\u0430_\u0447\u04f3\u043a_\u0440\u0430\u0448\u0442\u0430\u0432".split("_"),monthsShort:"\u043a\u04d1\u0440_\u043d\u0430\u0440_\u043f\u0443\u0448_\u0430\u043a\u0430_\u043c\u0430\u0439_\u04ab\u04d7\u0440_\u0443\u0442\u04d1_\u04ab\u0443\u0440_\u0430\u0432\u043d_\u044e\u043f\u0430_\u0447\u04f3\u043a_\u0440\u0430\u0448".split("_"),weekdays:"\u0432\u044b\u0440\u0441\u0430\u0440\u043d\u0438\u043a\u0443\u043d_\u0442\u0443\u043d\u0442\u0438\u043a\u0443\u043d_\u044b\u0442\u043b\u0430\u0440\u0438\u043a\u0443\u043d_\u044e\u043d\u043a\u0443\u043d_\u043a\u04d7\u04ab\u043d\u0435\u0440\u043d\u0438\u043a\u0443\u043d_\u044d\u0440\u043d\u0435\u043a\u0443\u043d_\u0448\u04d1\u043c\u0430\u0442\u043a\u0443\u043d".split("_"),weekdaysShort:"\u0432\u044b\u0440_\u0442\u0443\u043d_\u044b\u0442\u043b_\u044e\u043d_\u043a\u04d7\u04ab_\u044d\u0440\u043d_\u0448\u04d1\u043c".split("_"),weekdaysMin:"\u0432\u0440_\u0442\u043d_\u044b\u0442_\u044e\u043d_\u043a\u04ab_\u044d\u0440_\u0448\u043c".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD-MM-YYYY",LL:"YYYY [\u04ab\u0443\u043b\u0445\u0438] MMMM [\u0443\u0439\u04d1\u0445\u04d7\u043d] D[-\u043c\u04d7\u0448\u04d7]",LLL:"YYYY [\u04ab\u0443\u043b\u0445\u0438] MMMM [\u0443\u0439\u04d1\u0445\u04d7\u043d] D[-\u043c\u04d7\u0448\u04d7], HH:mm",LLLL:"dddd, YYYY [\u04ab\u0443\u043b\u0445\u0438] MMMM [\u0443\u0439\u04d1\u0445\u04d7\u043d] D[-\u043c\u04d7\u0448\u04d7], HH:mm"},calendar:{sameDay:"[\u041f\u0430\u044f\u043d] LT [\u0441\u0435\u0445\u0435\u0442\u0440\u0435]",nextDay:"[\u042b\u0440\u0430\u043d] LT [\u0441\u0435\u0445\u0435\u0442\u0440\u0435]",lastDay:"[\u04d6\u043d\u0435\u0440] LT [\u0441\u0435\u0445\u0435\u0442\u0440\u0435]",nextWeek:"[\u04aa\u0438\u0442\u0435\u0441] dddd LT [\u0441\u0435\u0445\u0435\u0442\u0440\u0435]",lastWeek:"[\u0418\u0440\u0442\u043d\u04d7] dddd LT [\u0441\u0435\u0445\u0435\u0442\u0440\u0435]",sameElse:"L"},relativeTime:{future:function(e){return e+(/\u0441\u0435\u0445\u0435\u0442$/i.exec(e)?"\u0440\u0435\u043d":/\u04ab\u0443\u043b$/i.exec(e)?"\u0442\u0430\u043d":"\u0440\u0430\u043d")},past:"%s \u043a\u0430\u044f\u043b\u043b\u0430",s:"\u043f\u04d7\u0440-\u0438\u043a \u04ab\u0435\u043a\u043a\u0443\u043d\u0442",ss:"%d \u04ab\u0435\u043a\u043a\u0443\u043d\u0442",m:"\u043f\u04d7\u0440 \u043c\u0438\u043d\u0443\u0442",mm:"%d \u043c\u0438\u043d\u0443\u0442",h:"\u043f\u04d7\u0440 \u0441\u0435\u0445\u0435\u0442",hh:"%d \u0441\u0435\u0445\u0435\u0442",d:"\u043f\u04d7\u0440 \u043a\u0443\u043d",dd:"%d \u043a\u0443\u043d",M:"\u043f\u04d7\u0440 \u0443\u0439\u04d1\u0445",MM:"%d \u0443\u0439\u04d1\u0445",y:"\u043f\u04d7\u0440 \u04ab\u0443\u043b",yy:"%d \u04ab\u0443\u043b"},dayOfMonthOrdinalParse:/\d{1,2}-\u043c\u04d7\u0448/,ordinal:"%d-\u043c\u04d7\u0448",week:{dow:1,doy:7}}),l.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 \xf4l",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 a="";return 20<e?a=40===e||50===e||60===e||80===e||100===e?"fed":"ain":0<e&&(a=["","af","il","ydd","ydd","ed","ed","ed","fed","fed","fed","eg","fed","eg","eg","fed","eg","eg","fed","eg","fed"][e]),e+a},week:{dow:1,doy:4}}),l.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\xf8ndag_mandag_tirsdag_onsdag_torsdag_fredag_l\xf8rdag".split("_"),weekdaysShort:"s\xf8n_man_tir_ons_tor_fre_l\xf8r".split("_"),weekdaysMin:"s\xf8_ma_ti_on_to_fr_l\xf8".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\xe5 dddd [kl.] LT",lastDay:"[i g\xe5r kl.] LT",lastWeek:"[i] dddd[s kl.] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"%s siden",s:"f\xe5 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\xe5ned",MM:"%d m\xe5neder",y:"et \xe5r",yy:"%d \xe5r"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}}),l.defineLocale("de-at",{months:"J\xe4nner_Februar_M\xe4rz_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"J\xe4n._Feb._M\xe4rz_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:ps,mm:"%d Minuten",h:ps,hh:"%d Stunden",d:ps,dd:ps,M:ps,MM:ps,y:ps,yy:ps},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}}),l.defineLocale("de-ch",{months:"Januar_Februar_M\xe4rz_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Feb._M\xe4rz_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:Ds,mm:"%d Minuten",h:Ds,hh:"%d Stunden",d:Ds,dd:Ds,M:Ds,MM:Ds,y:Ds,yy:Ds},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}}),l.defineLocale("de",{months:"Januar_Februar_M\xe4rz_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Feb._M\xe4rz_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:Ts,mm:"%d Minuten",h:Ts,hh:"%d Stunden",d:Ts,dd:Ts,M:Ts,MM:Ts,y:Ts,yy:Ts},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});var gs=["\u0796\u07ac\u0782\u07aa\u0787\u07a6\u0783\u07a9","\u078a\u07ac\u0784\u07b0\u0783\u07aa\u0787\u07a6\u0783\u07a9","\u0789\u07a7\u0783\u07a8\u0797\u07aa","\u0787\u07ad\u0795\u07b0\u0783\u07a9\u078d\u07aa","\u0789\u07ad","\u0796\u07ab\u0782\u07b0","\u0796\u07aa\u078d\u07a6\u0787\u07a8","\u0787\u07af\u078e\u07a6\u0790\u07b0\u0793\u07aa","\u0790\u07ac\u0795\u07b0\u0793\u07ac\u0789\u07b0\u0784\u07a6\u0783\u07aa","\u0787\u07ae\u0786\u07b0\u0793\u07af\u0784\u07a6\u0783\u07aa","\u0782\u07ae\u0788\u07ac\u0789\u07b0\u0784\u07a6\u0783\u07aa","\u0791\u07a8\u0790\u07ac\u0789\u07b0\u0784\u07a6\u0783\u07aa"],ws=["\u0787\u07a7\u078b\u07a8\u0787\u07b0\u078c\u07a6","\u0780\u07af\u0789\u07a6","\u0787\u07a6\u0782\u07b0\u078e\u07a7\u0783\u07a6","\u0784\u07aa\u078b\u07a6","\u0784\u07aa\u0783\u07a7\u0790\u07b0\u078a\u07a6\u078c\u07a8","\u0780\u07aa\u0786\u07aa\u0783\u07aa","\u0780\u07ae\u0782\u07a8\u0780\u07a8\u0783\u07aa"];l.defineLocale("dv",{months:gs,monthsShort:gs,weekdays:ws,weekdaysShort:ws,weekdaysMin:"\u0787\u07a7\u078b\u07a8_\u0780\u07af\u0789\u07a6_\u0787\u07a6\u0782\u07b0_\u0784\u07aa\u078b\u07a6_\u0784\u07aa\u0783\u07a7_\u0780\u07aa\u0786\u07aa_\u0780\u07ae\u0782\u07a8".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:/\u0789\u0786|\u0789\u078a/,isPM:function(e){return"\u0789\u078a"===e},meridiem:function(e,a,t){return e<12?"\u0789\u0786":"\u0789\u078a"},calendar:{sameDay:"[\u0789\u07a8\u0787\u07a6\u078b\u07aa] LT",nextDay:"[\u0789\u07a7\u078b\u07a6\u0789\u07a7] LT",nextWeek:"dddd LT",lastDay:"[\u0787\u07a8\u0787\u07b0\u0794\u07ac] LT",lastWeek:"[\u078a\u07a7\u0787\u07a8\u078c\u07aa\u0788\u07a8] dddd LT",sameElse:"L"},relativeTime:{future:"\u078c\u07ac\u0783\u07ad\u078e\u07a6\u0787\u07a8 %s",past:"\u0786\u07aa\u0783\u07a8\u0782\u07b0 %s",s:"\u0790\u07a8\u0786\u07aa\u0782\u07b0\u078c\u07aa\u0786\u07ae\u0785\u07ac\u0787\u07b0",ss:"d% \u0790\u07a8\u0786\u07aa\u0782\u07b0\u078c\u07aa",m:"\u0789\u07a8\u0782\u07a8\u0793\u07ac\u0787\u07b0",mm:"\u0789\u07a8\u0782\u07a8\u0793\u07aa %d",h:"\u078e\u07a6\u0791\u07a8\u0787\u07a8\u0783\u07ac\u0787\u07b0",hh:"\u078e\u07a6\u0791\u07a8\u0787\u07a8\u0783\u07aa %d",d:"\u078b\u07aa\u0788\u07a6\u0780\u07ac\u0787\u07b0",dd:"\u078b\u07aa\u0788\u07a6\u0790\u07b0 %d",M:"\u0789\u07a6\u0780\u07ac\u0787\u07b0",MM:"\u0789\u07a6\u0790\u07b0 %d",y:"\u0787\u07a6\u0780\u07a6\u0783\u07ac\u0787\u07b0",yy:"\u0787\u07a6\u0780\u07a6\u0783\u07aa %d"},preparse:function(e){return e.replace(/\u060c/g,",")},postformat:function(e){return e.replace(/,/g,"\u060c")},week:{dow:7,doy:12}}),l.defineLocale("el",{monthsNominativeEl:"\u0399\u03b1\u03bd\u03bf\u03c5\u03ac\u03c1\u03b9\u03bf\u03c2_\u03a6\u03b5\u03b2\u03c1\u03bf\u03c5\u03ac\u03c1\u03b9\u03bf\u03c2_\u039c\u03ac\u03c1\u03c4\u03b9\u03bf\u03c2_\u0391\u03c0\u03c1\u03af\u03bb\u03b9\u03bf\u03c2_\u039c\u03ac\u03b9\u03bf\u03c2_\u0399\u03bf\u03cd\u03bd\u03b9\u03bf\u03c2_\u0399\u03bf\u03cd\u03bb\u03b9\u03bf\u03c2_\u0391\u03cd\u03b3\u03bf\u03c5\u03c3\u03c4\u03bf\u03c2_\u03a3\u03b5\u03c0\u03c4\u03ad\u03bc\u03b2\u03c1\u03b9\u03bf\u03c2_\u039f\u03ba\u03c4\u03ce\u03b2\u03c1\u03b9\u03bf\u03c2_\u039d\u03bf\u03ad\u03bc\u03b2\u03c1\u03b9\u03bf\u03c2_\u0394\u03b5\u03ba\u03ad\u03bc\u03b2\u03c1\u03b9\u03bf\u03c2".split("_"),monthsGenitiveEl:"\u0399\u03b1\u03bd\u03bf\u03c5\u03b1\u03c1\u03af\u03bf\u03c5_\u03a6\u03b5\u03b2\u03c1\u03bf\u03c5\u03b1\u03c1\u03af\u03bf\u03c5_\u039c\u03b1\u03c1\u03c4\u03af\u03bf\u03c5_\u0391\u03c0\u03c1\u03b9\u03bb\u03af\u03bf\u03c5_\u039c\u03b1\u0390\u03bf\u03c5_\u0399\u03bf\u03c5\u03bd\u03af\u03bf\u03c5_\u0399\u03bf\u03c5\u03bb\u03af\u03bf\u03c5_\u0391\u03c5\u03b3\u03bf\u03cd\u03c3\u03c4\u03bf\u03c5_\u03a3\u03b5\u03c0\u03c4\u03b5\u03bc\u03b2\u03c1\u03af\u03bf\u03c5_\u039f\u03ba\u03c4\u03c9\u03b2\u03c1\u03af\u03bf\u03c5_\u039d\u03bf\u03b5\u03bc\u03b2\u03c1\u03af\u03bf\u03c5_\u0394\u03b5\u03ba\u03b5\u03bc\u03b2\u03c1\u03af\u03bf\u03c5".split("_"),months:function(e,a){return e?"string"==typeof a&&/D/.test(a.substring(0,a.indexOf("MMMM")))?this._monthsGenitiveEl[e.month()]:this._monthsNominativeEl[e.month()]:this._monthsNominativeEl},monthsShort:"\u0399\u03b1\u03bd_\u03a6\u03b5\u03b2_\u039c\u03b1\u03c1_\u0391\u03c0\u03c1_\u039c\u03b1\u03ca_\u0399\u03bf\u03c5\u03bd_\u0399\u03bf\u03c5\u03bb_\u0391\u03c5\u03b3_\u03a3\u03b5\u03c0_\u039f\u03ba\u03c4_\u039d\u03bf\u03b5_\u0394\u03b5\u03ba".split("_"),weekdays:"\u039a\u03c5\u03c1\u03b9\u03b1\u03ba\u03ae_\u0394\u03b5\u03c5\u03c4\u03ad\u03c1\u03b1_\u03a4\u03c1\u03af\u03c4\u03b7_\u03a4\u03b5\u03c4\u03ac\u03c1\u03c4\u03b7_\u03a0\u03ad\u03bc\u03c0\u03c4\u03b7_\u03a0\u03b1\u03c1\u03b1\u03c3\u03ba\u03b5\u03c5\u03ae_\u03a3\u03ac\u03b2\u03b2\u03b1\u03c4\u03bf".split("_"),weekdaysShort:"\u039a\u03c5\u03c1_\u0394\u03b5\u03c5_\u03a4\u03c1\u03b9_\u03a4\u03b5\u03c4_\u03a0\u03b5\u03bc_\u03a0\u03b1\u03c1_\u03a3\u03b1\u03b2".split("_"),weekdaysMin:"\u039a\u03c5_\u0394\u03b5_\u03a4\u03c1_\u03a4\u03b5_\u03a0\u03b5_\u03a0\u03b1_\u03a3\u03b1".split("_"),meridiem:function(e,a,t){return 11<e?t?"\u03bc\u03bc":"\u039c\u039c":t?"\u03c0\u03bc":"\u03a0\u039c"},isPM:function(e){return"\u03bc"===(e+"").toLowerCase()[0]},meridiemParse:/[\u03a0\u039c]\.?\u039c?\.?/i,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"},calendarEl:{sameDay:"[\u03a3\u03ae\u03bc\u03b5\u03c1\u03b1 {}] LT",nextDay:"[\u0391\u03cd\u03c1\u03b9\u03bf {}] LT",nextWeek:"dddd [{}] LT",lastDay:"[\u03a7\u03b8\u03b5\u03c2 {}] LT",lastWeek:function(){switch(this.day()){case 6:return"[\u03c4\u03bf \u03c0\u03c1\u03bf\u03b7\u03b3\u03bf\u03cd\u03bc\u03b5\u03bd\u03bf] dddd [{}] LT";default:return"[\u03c4\u03b7\u03bd \u03c0\u03c1\u03bf\u03b7\u03b3\u03bf\u03cd\u03bc\u03b5\u03bd\u03b7] dddd [{}] LT"}},sameElse:"L"},calendar:function(e,a){var t=this._calendarEl[e],s=a&&a.hours();return H(t)&&(t=t.apply(a)),t.replace("{}",s%12==1?"\u03c3\u03c4\u03b7":"\u03c3\u03c4\u03b9\u03c2")},relativeTime:{future:"\u03c3\u03b5 %s",past:"%s \u03c0\u03c1\u03b9\u03bd",s:"\u03bb\u03af\u03b3\u03b1 \u03b4\u03b5\u03c5\u03c4\u03b5\u03c1\u03cc\u03bb\u03b5\u03c0\u03c4\u03b1",ss:"%d \u03b4\u03b5\u03c5\u03c4\u03b5\u03c1\u03cc\u03bb\u03b5\u03c0\u03c4\u03b1",m:"\u03ad\u03bd\u03b1 \u03bb\u03b5\u03c0\u03c4\u03cc",mm:"%d \u03bb\u03b5\u03c0\u03c4\u03ac",h:"\u03bc\u03af\u03b1 \u03ce\u03c1\u03b1",hh:"%d \u03ce\u03c1\u03b5\u03c2",d:"\u03bc\u03af\u03b1 \u03bc\u03ad\u03c1\u03b1",dd:"%d \u03bc\u03ad\u03c1\u03b5\u03c2",M:"\u03ad\u03bd\u03b1\u03c2 \u03bc\u03ae\u03bd\u03b1\u03c2",MM:"%d \u03bc\u03ae\u03bd\u03b5\u03c2",y:"\u03ad\u03bd\u03b1\u03c2 \u03c7\u03c1\u03cc\u03bd\u03bf\u03c2",yy:"%d \u03c7\u03c1\u03cc\u03bd\u03b9\u03b1"},dayOfMonthOrdinalParse:/\d{1,2}\u03b7/,ordinal:"%d\u03b7",week:{dow:1,doy:4}}),l.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 a=e%10;return e+(1==~~(e%100/10)?"th":1===a?"st":2===a?"nd":3===a?"rd":"th")},week:{dow:1,doy:4}}),l.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 a=e%10;return e+(1==~~(e%100/10)?"th":1===a?"st":2===a?"nd":3===a?"rd":"th")},week:{dow:1,doy:4}}),l.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 a=e%10;return e+(1==~~(e%100/10)?"th":1===a?"st":2===a?"nd":3===a?"rd":"th")}}),l.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 a=e%10;return e+(1==~~(e%100/10)?"th":1===a?"st":2===a?"nd":3===a?"rd":"th")},week:{dow:1,doy:4}}),l.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 a=e%10;return e+(1==~~(e%100/10)?"th":1===a?"st":2===a?"nd":3===a?"rd":"th")},week:{dow:1,doy:4}}),l.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",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 a=e%10;return e+(1==~~(e%100/10)?"th":1===a?"st":2===a?"nd":3===a?"rd":"th")}}),l.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 a=e%10;return e+(1==~~(e%100/10)?"th":1===a?"st":2===a?"nd":3===a?"rd":"th")},week:{dow:1,doy:4}}),l.defineLocale("eo",{months:"januaro_februaro_marto_aprilo_majo_junio_julio_a\u016dgusto_septembro_oktobro_novembro_decembro".split("_"),monthsShort:"jan_feb_mar_apr_maj_jun_jul_a\u016dg_sep_okt_nov_dec".split("_"),weekdays:"diman\u0109o_lundo_mardo_merkredo_\u0135a\u016ddo_vendredo_sabato".split("_"),weekdaysShort:"dim_lun_mard_merk_\u0135a\u016d_ven_sab".split("_"),weekdaysMin:"di_lu_ma_me_\u0135a_ve_sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"D[-a de] MMMM, YYYY",LLL:"D[-a de] MMMM, YYYY HH:mm",LLLL:"dddd, [la] D[-a de] MMMM, YYYY HH:mm"},meridiemParse:/[ap]\.t\.m/i,isPM:function(e){return"p"===e.charAt(0).toLowerCase()},meridiem:function(e,a,t){return 11<e?t?"p.t.m.":"P.T.M.":t?"a.t.m.":"A.T.M."},calendar:{sameDay:"[Hodia\u016d je] LT",nextDay:"[Morga\u016d je] LT",nextWeek:"dddd [je] LT",lastDay:"[Hiera\u016d je] LT",lastWeek:"[pasinta] dddd [je] LT",sameElse:"L"},relativeTime:{future:"post %s",past:"anta\u016d %s",s:"sekundoj",ss:"%d sekundoj",m:"minuto",mm:"%d minutoj",h:"horo",hh:"%d horoj",d:"tago",dd:"%d tagoj",M:"monato",MM:"%d monatoj",y:"jaro",yy:"%d jaroj"},dayOfMonthOrdinalParse:/\d{1,2}a/,ordinal:"%da",week:{dow:1,doy:7}});var vs="ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.".split("_"),Ss="ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),Hs=[/^ene/i,/^feb/i,/^mar/i,/^abr/i,/^may/i,/^jun/i,/^jul/i,/^ago/i,/^sep/i,/^oct/i,/^nov/i,/^dic/i],bs=/^(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;l.defineLocale("es-do",{months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),monthsShort:function(e,a){return e?/-MMM-/.test(a)?Ss[e.month()]:vs[e.month()]:vs},monthsRegex:bs,monthsShortRegex:bs,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:Hs,longMonthsParse:Hs,shortMonthsParse:Hs,weekdays:"domingo_lunes_martes_mi\xe9rcoles_jueves_viernes_s\xe1bado".split("_"),weekdaysShort:"dom._lun._mar._mi\xe9._jue._vie._s\xe1b.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_s\xe1".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\xf1ana 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\xeda",dd:"%d d\xedas",M:"un mes",MM:"%d meses",y:"un a\xf1o",yy:"%d a\xf1os"},dayOfMonthOrdinalParse:/\d{1,2}\xba/,ordinal:"%d\xba",week:{dow:1,doy:4}});var js="ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.".split("_"),xs="ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),Os=[/^ene/i,/^feb/i,/^mar/i,/^abr/i,/^may/i,/^jun/i,/^jul/i,/^ago/i,/^sep/i,/^oct/i,/^nov/i,/^dic/i],Ps=/^(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;l.defineLocale("es-us",{months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),monthsShort:function(e,a){return e?/-MMM-/.test(a)?xs[e.month()]:js[e.month()]:js},monthsRegex:Ps,monthsShortRegex:Ps,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:Os,longMonthsParse:Os,shortMonthsParse:Os,weekdays:"domingo_lunes_martes_mi\xe9rcoles_jueves_viernes_s\xe1bado".split("_"),weekdaysShort:"dom._lun._mar._mi\xe9._jue._vie._s\xe1b.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_s\xe1".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\xf1ana 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\xeda",dd:"%d d\xedas",M:"un mes",MM:"%d meses",y:"un a\xf1o",yy:"%d a\xf1os"},dayOfMonthOrdinalParse:/\d{1,2}\xba/,ordinal:"%d\xba",week:{dow:0,doy:6}});var Ws="ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.".split("_"),As="ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),Es=[/^ene/i,/^feb/i,/^mar/i,/^abr/i,/^may/i,/^jun/i,/^jul/i,/^ago/i,/^sep/i,/^oct/i,/^nov/i,/^dic/i],Fs=/^(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;function zs(e,a,t,s){var n={s:["m\xf5ne sekundi","m\xf5ni sekund","paar sekundit"],ss:[e+"sekundi",e+"sekundit"],m:["\xfche minuti","\xfcks minut"],mm:[e+" minuti",e+" minutit"],h:["\xfche tunni","tund aega","\xfcks tund"],hh:[e+" tunni",e+" tundi"],d:["\xfche p\xe4eva","\xfcks p\xe4ev"],M:["kuu aja","kuu aega","\xfcks kuu"],MM:[e+" kuu",e+" kuud"],y:["\xfche aasta","aasta","\xfcks aasta"],yy:[e+" aasta",e+" aastat"]};return a?n[t][2]?n[t][2]:n[t][1]:s?n[t][0]:n[t][1]}l.defineLocale("es",{months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),monthsShort:function(e,a){return e?/-MMM-/.test(a)?As[e.month()]:Ws[e.month()]:Ws},monthsRegex:Fs,monthsShortRegex:Fs,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:Es,longMonthsParse:Es,shortMonthsParse:Es,weekdays:"domingo_lunes_martes_mi\xe9rcoles_jueves_viernes_s\xe1bado".split("_"),weekdaysShort:"dom._lun._mar._mi\xe9._jue._vie._s\xe1b.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_s\xe1".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\xf1ana 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\xeda",dd:"%d d\xedas",M:"un mes",MM:"%d meses",y:"un a\xf1o",yy:"%d a\xf1os"},dayOfMonthOrdinalParse:/\d{1,2}\xba/,ordinal:"%d\xba",week:{dow:1,doy:4}}),l.defineLocale("et",{months:"jaanuar_veebruar_m\xe4rts_aprill_mai_juuni_juuli_august_september_oktoober_november_detsember".split("_"),monthsShort:"jaan_veebr_m\xe4rts_apr_mai_juuni_juuli_aug_sept_okt_nov_dets".split("_"),weekdays:"p\xfchap\xe4ev_esmasp\xe4ev_teisip\xe4ev_kolmap\xe4ev_neljap\xe4ev_reede_laup\xe4ev".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\xe4na,] LT",nextDay:"[Homme,] LT",nextWeek:"[J\xe4rgmine] dddd LT",lastDay:"[Eile,] LT",lastWeek:"[Eelmine] dddd LT",sameElse:"L"},relativeTime:{future:"%s p\xe4rast",past:"%s tagasi",s:zs,ss:zs,m:zs,mm:zs,h:zs,hh:zs,d:zs,dd:"%d p\xe4eva",M:zs,MM:zs,y:zs,yy:zs},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}}),l.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}});var Js={1:"\u06f1",2:"\u06f2",3:"\u06f3",4:"\u06f4",5:"\u06f5",6:"\u06f6",7:"\u06f7",8:"\u06f8",9:"\u06f9",0:"\u06f0"},Ns={"\u06f1":"1","\u06f2":"2","\u06f3":"3","\u06f4":"4","\u06f5":"5","\u06f6":"6","\u06f7":"7","\u06f8":"8","\u06f9":"9","\u06f0":"0"};l.defineLocale("fa",{months:"\u0698\u0627\u0646\u0648\u06cc\u0647_\u0641\u0648\u0631\u06cc\u0647_\u0645\u0627\u0631\u0633_\u0622\u0648\u0631\u06cc\u0644_\u0645\u0647_\u0698\u0648\u0626\u0646_\u0698\u0648\u0626\u06cc\u0647_\u0627\u0648\u062a_\u0633\u067e\u062a\u0627\u0645\u0628\u0631_\u0627\u06a9\u062a\u0628\u0631_\u0646\u0648\u0627\u0645\u0628\u0631_\u062f\u0633\u0627\u0645\u0628\u0631".split("_"),monthsShort:"\u0698\u0627\u0646\u0648\u06cc\u0647_\u0641\u0648\u0631\u06cc\u0647_\u0645\u0627\u0631\u0633_\u0622\u0648\u0631\u06cc\u0644_\u0645\u0647_\u0698\u0648\u0626\u0646_\u0698\u0648\u0626\u06cc\u0647_\u0627\u0648\u062a_\u0633\u067e\u062a\u0627\u0645\u0628\u0631_\u0627\u06a9\u062a\u0628\u0631_\u0646\u0648\u0627\u0645\u0628\u0631_\u062f\u0633\u0627\u0645\u0628\u0631".split("_"),weekdays:"\u06cc\u06a9\u200c\u0634\u0646\u0628\u0647_\u062f\u0648\u0634\u0646\u0628\u0647_\u0633\u0647\u200c\u0634\u0646\u0628\u0647_\u0686\u0647\u0627\u0631\u0634\u0646\u0628\u0647_\u067e\u0646\u062c\u200c\u0634\u0646\u0628\u0647_\u062c\u0645\u0639\u0647_\u0634\u0646\u0628\u0647".split("_"),weekdaysShort:"\u06cc\u06a9\u200c\u0634\u0646\u0628\u0647_\u062f\u0648\u0634\u0646\u0628\u0647_\u0633\u0647\u200c\u0634\u0646\u0628\u0647_\u0686\u0647\u0627\u0631\u0634\u0646\u0628\u0647_\u067e\u0646\u062c\u200c\u0634\u0646\u0628\u0647_\u062c\u0645\u0639\u0647_\u0634\u0646\u0628\u0647".split("_"),weekdaysMin:"\u06cc_\u062f_\u0633_\u0686_\u067e_\u062c_\u0634".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:/\u0642\u0628\u0644 \u0627\u0632 \u0638\u0647\u0631|\u0628\u0639\u062f \u0627\u0632 \u0638\u0647\u0631/,isPM:function(e){return/\u0628\u0639\u062f \u0627\u0632 \u0638\u0647\u0631/.test(e)},meridiem:function(e,a,t){return e<12?"\u0642\u0628\u0644 \u0627\u0632 \u0638\u0647\u0631":"\u0628\u0639\u062f \u0627\u0632 \u0638\u0647\u0631"},calendar:{sameDay:"[\u0627\u0645\u0631\u0648\u0632 \u0633\u0627\u0639\u062a] LT",nextDay:"[\u0641\u0631\u062f\u0627 \u0633\u0627\u0639\u062a] LT",nextWeek:"dddd [\u0633\u0627\u0639\u062a] LT",lastDay:"[\u062f\u06cc\u0631\u0648\u0632 \u0633\u0627\u0639\u062a] LT",lastWeek:"dddd [\u067e\u06cc\u0634] [\u0633\u0627\u0639\u062a] LT",sameElse:"L"},relativeTime:{future:"\u062f\u0631 %s",past:"%s \u067e\u06cc\u0634",s:"\u0686\u0646\u062f \u062b\u0627\u0646\u06cc\u0647",ss:"\u062b\u0627\u0646\u06cc\u0647 d%",m:"\u06cc\u06a9 \u062f\u0642\u06cc\u0642\u0647",mm:"%d \u062f\u0642\u06cc\u0642\u0647",h:"\u06cc\u06a9 \u0633\u0627\u0639\u062a",hh:"%d \u0633\u0627\u0639\u062a",d:"\u06cc\u06a9 \u0631\u0648\u0632",dd:"%d \u0631\u0648\u0632",M:"\u06cc\u06a9 \u0645\u0627\u0647",MM:"%d \u0645\u0627\u0647",y:"\u06cc\u06a9 \u0633\u0627\u0644",yy:"%d \u0633\u0627\u0644"},preparse:function(e){return e.replace(/[\u06f0-\u06f9]/g,function(e){return Ns[e]}).replace(/\u060c/g,",")},postformat:function(e){return e.replace(/\d/g,function(e){return Js[e]}).replace(/,/g,"\u060c")},dayOfMonthOrdinalParse:/\d{1,2}\u0645/,ordinal:"%d\u0645",week:{dow:6,doy:12}});var Rs="nolla yksi kaksi kolme nelj\xe4 viisi kuusi seitsem\xe4n kahdeksan yhdeks\xe4n".split(" "),Cs=["nolla","yhden","kahden","kolmen","nelj\xe4n","viiden","kuuden",Rs[7],Rs[8],Rs[9]];function Is(e,a,t,s){var n,d,r="";switch(t){case"s":return s?"muutaman sekunnin":"muutama sekunti";case"ss":return s?"sekunnin":"sekuntia";case"m":return s?"minuutin":"minuutti";case"mm":r=s?"minuutin":"minuuttia";break;case"h":return s?"tunnin":"tunti";case"hh":r=s?"tunnin":"tuntia";break;case"d":return s?"p\xe4iv\xe4n":"p\xe4iv\xe4";case"dd":r=s?"p\xe4iv\xe4n":"p\xe4iv\xe4\xe4";break;case"M":return s?"kuukauden":"kuukausi";case"MM":r=s?"kuukauden":"kuukautta";break;case"y":return s?"vuoden":"vuosi";case"yy":r=s?"vuoden":"vuotta";break}return d=s,r=((n=e)<10?d?Cs[n]:Rs[n]:n)+" "+r}l.defineLocale("fi",{months:"tammikuu_helmikuu_maaliskuu_huhtikuu_toukokuu_kes\xe4kuu_hein\xe4kuu_elokuu_syyskuu_lokakuu_marraskuu_joulukuu".split("_"),monthsShort:"tammi_helmi_maalis_huhti_touko_kes\xe4_hein\xe4_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\xe4n\xe4\xe4n] [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\xe4\xe4st\xe4",past:"%s sitten",s:Is,ss:Is,m:Is,mm:Is,h:Is,hh:Is,d:Is,dd:Is,M:Is,MM:Is,y:Is,yy:Is},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}}),l.defineLocale("fo",{months:"januar_februar_mars_apr\xedl_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\xe1nadagur_t\xfdsdagur_mikudagur_h\xf3sdagur_fr\xedggjadagur_leygardagur".split("_"),weekdaysShort:"sun_m\xe1n_t\xfds_mik_h\xf3s_fr\xed_ley".split("_"),weekdaysMin:"su_m\xe1_t\xfd_mi_h\xf3_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:"[\xcd dag kl.] LT",nextDay:"[\xcd morgin kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[\xcd gj\xe1r kl.] LT",lastWeek:"[s\xed\xf0stu] dddd [kl] LT",sameElse:"L"},relativeTime:{future:"um %s",past:"%s s\xed\xf0ani",s:"f\xe1 sekund",ss:"%d sekundir",m:"ein minuttur",mm:"%d minuttir",h:"ein t\xedmi",hh:"%d t\xedmar",d:"ein dagur",dd:"%d dagar",M:"ein m\xe1na\xf0ur",MM:"%d m\xe1na\xf0ir",y:"eitt \xe1r",yy:"%d \xe1r"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}}),l.defineLocale("fr-ca",{months:"janvier_f\xe9vrier_mars_avril_mai_juin_juillet_ao\xfbt_septembre_octobre_novembre_d\xe9cembre".split("_"),monthsShort:"janv._f\xe9vr._mars_avr._mai_juin_juil._ao\xfbt_sept._oct._nov._d\xe9c.".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\u2019hui \xe0] LT",nextDay:"[Demain \xe0] LT",nextWeek:"dddd [\xe0] LT",lastDay:"[Hier \xe0] LT",lastWeek:"dddd [dernier \xe0] 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,a){switch(a){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")}}}),l.defineLocale("fr-ch",{months:"janvier_f\xe9vrier_mars_avril_mai_juin_juillet_ao\xfbt_septembre_octobre_novembre_d\xe9cembre".split("_"),monthsShort:"janv._f\xe9vr._mars_avr._mai_juin_juil._ao\xfbt_sept._oct._nov._d\xe9c.".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\u2019hui \xe0] LT",nextDay:"[Demain \xe0] LT",nextWeek:"dddd [\xe0] LT",lastDay:"[Hier \xe0] LT",lastWeek:"dddd [dernier \xe0] 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,a){switch(a){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}}),l.defineLocale("fr",{months:"janvier_f\xe9vrier_mars_avril_mai_juin_juillet_ao\xfbt_septembre_octobre_novembre_d\xe9cembre".split("_"),monthsShort:"janv._f\xe9vr._mars_avr._mai_juin_juil._ao\xfbt_sept._oct._nov._d\xe9c.".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\u2019hui \xe0] LT",nextDay:"[Demain \xe0] LT",nextWeek:"dddd [\xe0] LT",lastDay:"[Hier \xe0] LT",lastWeek:"dddd [dernier \xe0] 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|)/,ordinal:function(e,a){switch(a){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}});var Us="jan._feb._mrt._apr._mai_jun._jul._aug._sep._okt._nov._des.".split("_"),Gs="jan_feb_mrt_apr_mai_jun_jul_aug_sep_okt_nov_des".split("_");l.defineLocale("fy",{months:"jannewaris_febrewaris_maart_april_maaie_juny_july_augustus_septimber_oktober_novimber_desimber".split("_"),monthsShort:function(e,a){return e?/-MMM-/.test(a)?Gs[e.month()]:Us[e.month()]:Us},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:"[\xf4fr\xfbne] dddd [om] LT",sameElse:"L"},relativeTime:{future:"oer %s",past:"%s lyn",s:"in pear sekonden",ss:"%d sekonden",m:"ien min\xfat",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||20<=e?"ste":"de")},week:{dow:1,doy:4}});l.defineLocale("ga",{months:["Ean\xe1ir","Feabhra","M\xe1rta","Aibre\xe1n","Bealtaine","M\xe9itheamh","I\xfail","L\xfanasa","Me\xe1n F\xf3mhair","Deaireadh F\xf3mhair","Samhain","Nollaig"],monthsShort:["Ean\xe1","Feab","M\xe1rt","Aibr","Beal","M\xe9it","I\xfail","L\xfana","Me\xe1n","Deai","Samh","Noll"],monthsParseExact:!0,weekdays:["D\xe9 Domhnaigh","D\xe9 Luain","D\xe9 M\xe1irt","D\xe9 C\xe9adaoin","D\xe9ardaoin","D\xe9 hAoine","D\xe9 Satharn"],weekdaysShort:["Dom","Lua","M\xe1i","C\xe9a","D\xe9a","hAo","Sat"],weekdaysMin:["Do","Lu","M\xe1","Ce","D\xe9","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:"[Inniu ag] LT",nextDay:"[Am\xe1rach ag] LT",nextWeek:"dddd [ag] LT",lastDay:"[Inn\xe9 aig] LT",lastWeek:"dddd [seo caite] [ag] LT",sameElse:"L"},relativeTime:{future:"i %s",past:"%s \xf3 shin",s:"c\xfapla soicind",ss:"%d soicind",m:"n\xf3im\xe9ad",mm:"%d n\xf3im\xe9ad",h:"uair an chloig",hh:"%d uair an chloig",d:"l\xe1",dd:"%d l\xe1",M:"m\xed",MM:"%d m\xed",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}});function Vs(e,a,t,s){var n={s:["thodde secondanim","thodde second"],ss:[e+" secondanim",e+" second"],m:["eka mintan","ek minute"],mm:[e+" mintanim",e+" mintam"],h:["eka voran","ek vor"],hh:[e+" voranim",e+" voram"],d:["eka disan","ek dis"],dd:[e+" disanim",e+" dis"],M:["eka mhoinean","ek mhoino"],MM:[e+" mhoineanim",e+" mhoine"],y:["eka vorsan","ek voros"],yy:[e+" vorsanim",e+" vorsam"]};return a?n[t][0]:n[t][1]}l.defineLocale("gd",{months:["Am Faoilleach","An Gearran","Am M\xe0rt","An Giblean","An C\xe8itean","An t-\xd2gmhios","An t-Iuchar","An L\xf9nastal","An t-Sultain","An D\xe0mhair","An t-Samhain","An D\xf9bhlachd"],monthsShort:["Faoi","Gear","M\xe0rt","Gibl","C\xe8it","\xd2gmh","Iuch","L\xf9n","Sult","D\xe0mh","Samh","D\xf9bh"],monthsParseExact:!0,weekdays:["Did\xf2mhnaich","Diluain","Dim\xe0irt","Diciadain","Diardaoin","Dihaoine","Disathairne"],weekdaysShort:["Did","Dil","Dim","Dic","Dia","Dih","Dis"],weekdaysMin:["D\xf2","Lu","M\xe0","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\xe0ireach aig] LT",nextWeek:"dddd [aig] LT",lastDay:"[An-d\xe8 aig] LT",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\xecos",MM:"%d m\xecosan",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}}),l.defineLocale("gl",{months:"xaneiro_febreiro_marzo_abril_maio_xu\xf1o_xullo_agosto_setembro_outubro_novembro_decembro".split("_"),monthsShort:"xan._feb._mar._abr._mai._xu\xf1._xul._ago._set._out._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"domingo_luns_martes_m\xe9rcores_xoves_venres_s\xe1bado".split("_"),weekdaysShort:"dom._lun._mar._m\xe9r._xov._ven._s\xe1b.".split("_"),weekdaysMin:"do_lu_ma_m\xe9_xo_ve_s\xe1".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()?"\xe1s":"\xe1")+"] LT"},nextDay:function(){return"[ma\xf1\xe1 "+(1!==this.hours()?"\xe1s":"\xe1")+"] LT"},nextWeek:function(){return"dddd ["+(1!==this.hours()?"\xe1s":"a")+"] LT"},lastDay:function(){return"[onte "+(1!==this.hours()?"\xe1":"a")+"] LT"},lastWeek:function(){return"[o] dddd [pasado "+(1!==this.hours()?"\xe1s":"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\xeda",dd:"%d d\xedas",M:"un mes",MM:"%d meses",y:"un ano",yy:"%d anos"},dayOfMonthOrdinalParse:/\d{1,2}\xba/,ordinal:"%d\xba",week:{dow:1,doy:4}}),l.defineLocale("gom-latn",{months:"Janer_Febrer_Mars_Abril_Mai_Jun_Julai_Agost_Setembr_Otubr_Novembr_Dezembr".split("_"),monthsShort:"Jan._Feb._Mars_Abr._Mai_Jun_Jul._Ago._Set._Otu._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Aitar_Somar_Mongllar_Budvar_Brestar_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[achea] Do, YYYY, A h:mm [vazta]",llll:"ddd, D MMM YYYY, A h:mm [vazta]"},calendar:{sameDay:"[Aiz] LT",nextDay:"[Faleam] LT",nextWeek:"[Ieta to] dddd[,] LT",lastDay:"[Kal] LT",lastWeek:"[Fatlo] dddd[,] LT",sameElse:"L"},relativeTime:{future:"%s",past:"%s adim",s:Vs,ss:Vs,m:Vs,mm:Vs,h:Vs,hh:Vs,d:Vs,dd:Vs,M:Vs,MM:Vs,y:Vs,yy:Vs},dayOfMonthOrdinalParse:/\d{1,2}(er)/,ordinal:function(e,a){switch(a){case"D":return e+"er";default:case"M":case"Q":case"DDD":case"d":case"w":case"W":return e}},week:{dow:1,doy:4},meridiemParse:/rati|sokalli|donparam|sanje/,meridiemHour:function(e,a){return 12===e&&(e=0),"rati"===a?e<4?e:e+12:"sokalli"===a?e:"donparam"===a?12<e?e:e+12:"sanje"===a?e+12:void 0},meridiem:function(e,a,t){return e<4?"rati":e<12?"sokalli":e<16?"donparam":e<20?"sanje":"rati"}});var Ks={1:"\u0ae7",2:"\u0ae8",3:"\u0ae9",4:"\u0aea",5:"\u0aeb",6:"\u0aec",7:"\u0aed",8:"\u0aee",9:"\u0aef",0:"\u0ae6"},Zs={"\u0ae7":"1","\u0ae8":"2","\u0ae9":"3","\u0aea":"4","\u0aeb":"5","\u0aec":"6","\u0aed":"7","\u0aee":"8","\u0aef":"9","\u0ae6":"0"};l.defineLocale("gu",{months:"\u0a9c\u0abe\u0aa8\u0acd\u0aaf\u0ac1\u0a86\u0ab0\u0ac0_\u0aab\u0ac7\u0aac\u0acd\u0ab0\u0ac1\u0a86\u0ab0\u0ac0_\u0aae\u0abe\u0ab0\u0acd\u0a9a_\u0a8f\u0aaa\u0acd\u0ab0\u0abf\u0ab2_\u0aae\u0ac7_\u0a9c\u0ac2\u0aa8_\u0a9c\u0ac1\u0ab2\u0abe\u0a88_\u0a91\u0a97\u0ab8\u0acd\u0a9f_\u0ab8\u0aaa\u0acd\u0a9f\u0ac7\u0aae\u0acd\u0aac\u0ab0_\u0a91\u0a95\u0acd\u0a9f\u0acd\u0aac\u0ab0_\u0aa8\u0ab5\u0ac7\u0aae\u0acd\u0aac\u0ab0_\u0aa1\u0abf\u0ab8\u0ac7\u0aae\u0acd\u0aac\u0ab0".split("_"),monthsShort:"\u0a9c\u0abe\u0aa8\u0acd\u0aaf\u0ac1._\u0aab\u0ac7\u0aac\u0acd\u0ab0\u0ac1._\u0aae\u0abe\u0ab0\u0acd\u0a9a_\u0a8f\u0aaa\u0acd\u0ab0\u0abf._\u0aae\u0ac7_\u0a9c\u0ac2\u0aa8_\u0a9c\u0ac1\u0ab2\u0abe._\u0a91\u0a97._\u0ab8\u0aaa\u0acd\u0a9f\u0ac7._\u0a91\u0a95\u0acd\u0a9f\u0acd._\u0aa8\u0ab5\u0ac7._\u0aa1\u0abf\u0ab8\u0ac7.".split("_"),monthsParseExact:!0,weekdays:"\u0ab0\u0ab5\u0abf\u0ab5\u0abe\u0ab0_\u0ab8\u0acb\u0aae\u0ab5\u0abe\u0ab0_\u0aae\u0a82\u0a97\u0ab3\u0ab5\u0abe\u0ab0_\u0aac\u0ac1\u0aa7\u0acd\u0ab5\u0abe\u0ab0_\u0a97\u0ac1\u0ab0\u0ac1\u0ab5\u0abe\u0ab0_\u0ab6\u0ac1\u0a95\u0acd\u0ab0\u0ab5\u0abe\u0ab0_\u0ab6\u0aa8\u0abf\u0ab5\u0abe\u0ab0".split("_"),weekdaysShort:"\u0ab0\u0ab5\u0abf_\u0ab8\u0acb\u0aae_\u0aae\u0a82\u0a97\u0ab3_\u0aac\u0ac1\u0aa7\u0acd_\u0a97\u0ac1\u0ab0\u0ac1_\u0ab6\u0ac1\u0a95\u0acd\u0ab0_\u0ab6\u0aa8\u0abf".split("_"),weekdaysMin:"\u0ab0_\u0ab8\u0acb_\u0aae\u0a82_\u0aac\u0ac1_\u0a97\u0ac1_\u0ab6\u0ac1_\u0ab6".split("_"),longDateFormat:{LT:"A h:mm \u0ab5\u0abe\u0a97\u0acd\u0aaf\u0ac7",LTS:"A h:mm:ss \u0ab5\u0abe\u0a97\u0acd\u0aaf\u0ac7",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm \u0ab5\u0abe\u0a97\u0acd\u0aaf\u0ac7",LLLL:"dddd, D MMMM YYYY, A h:mm \u0ab5\u0abe\u0a97\u0acd\u0aaf\u0ac7"},calendar:{sameDay:"[\u0a86\u0a9c] LT",nextDay:"[\u0a95\u0abe\u0ab2\u0ac7] LT",nextWeek:"dddd, LT",lastDay:"[\u0a97\u0a87\u0a95\u0abe\u0ab2\u0ac7] LT",lastWeek:"[\u0aaa\u0abe\u0a9b\u0ab2\u0abe] dddd, LT",sameElse:"L"},relativeTime:{future:"%s \u0aae\u0abe",past:"%s \u0aaa\u0ac7\u0ab9\u0ab2\u0abe",s:"\u0a85\u0aae\u0ac1\u0a95 \u0aaa\u0ab3\u0acb",ss:"%d \u0ab8\u0ac7\u0a95\u0a82\u0aa1",m:"\u0a8f\u0a95 \u0aae\u0abf\u0aa8\u0abf\u0a9f",mm:"%d \u0aae\u0abf\u0aa8\u0abf\u0a9f",h:"\u0a8f\u0a95 \u0a95\u0ab2\u0abe\u0a95",hh:"%d \u0a95\u0ab2\u0abe\u0a95",d:"\u0a8f\u0a95 \u0aa6\u0abf\u0ab5\u0ab8",dd:"%d \u0aa6\u0abf\u0ab5\u0ab8",M:"\u0a8f\u0a95 \u0aae\u0ab9\u0abf\u0aa8\u0acb",MM:"%d \u0aae\u0ab9\u0abf\u0aa8\u0acb",y:"\u0a8f\u0a95 \u0ab5\u0ab0\u0acd\u0ab7",yy:"%d \u0ab5\u0ab0\u0acd\u0ab7"},preparse:function(e){return e.replace(/[\u0ae7\u0ae8\u0ae9\u0aea\u0aeb\u0aec\u0aed\u0aee\u0aef\u0ae6]/g,function(e){return Zs[e]})},postformat:function(e){return e.replace(/\d/g,function(e){return Ks[e]})},meridiemParse:/\u0ab0\u0abe\u0aa4|\u0aac\u0aaa\u0acb\u0ab0|\u0ab8\u0ab5\u0abe\u0ab0|\u0ab8\u0abe\u0a82\u0a9c/,meridiemHour:function(e,a){return 12===e&&(e=0),"\u0ab0\u0abe\u0aa4"===a?e<4?e:e+12:"\u0ab8\u0ab5\u0abe\u0ab0"===a?e:"\u0aac\u0aaa\u0acb\u0ab0"===a?10<=e?e:e+12:"\u0ab8\u0abe\u0a82\u0a9c"===a?e+12:void 0},meridiem:function(e,a,t){return e<4?"\u0ab0\u0abe\u0aa4":e<10?"\u0ab8\u0ab5\u0abe\u0ab0":e<17?"\u0aac\u0aaa\u0acb\u0ab0":e<20?"\u0ab8\u0abe\u0a82\u0a9c":"\u0ab0\u0abe\u0aa4"},week:{dow:0,doy:6}}),l.defineLocale("he",{months:"\u05d9\u05e0\u05d5\u05d0\u05e8_\u05e4\u05d1\u05e8\u05d5\u05d0\u05e8_\u05de\u05e8\u05e5_\u05d0\u05e4\u05e8\u05d9\u05dc_\u05de\u05d0\u05d9_\u05d9\u05d5\u05e0\u05d9_\u05d9\u05d5\u05dc\u05d9_\u05d0\u05d5\u05d2\u05d5\u05e1\u05d8_\u05e1\u05e4\u05d8\u05de\u05d1\u05e8_\u05d0\u05d5\u05e7\u05d8\u05d5\u05d1\u05e8_\u05e0\u05d5\u05d1\u05de\u05d1\u05e8_\u05d3\u05e6\u05de\u05d1\u05e8".split("_"),monthsShort:"\u05d9\u05e0\u05d5\u05f3_\u05e4\u05d1\u05e8\u05f3_\u05de\u05e8\u05e5_\u05d0\u05e4\u05e8\u05f3_\u05de\u05d0\u05d9_\u05d9\u05d5\u05e0\u05d9_\u05d9\u05d5\u05dc\u05d9_\u05d0\u05d5\u05d2\u05f3_\u05e1\u05e4\u05d8\u05f3_\u05d0\u05d5\u05e7\u05f3_\u05e0\u05d5\u05d1\u05f3_\u05d3\u05e6\u05de\u05f3".split("_"),weekdays:"\u05e8\u05d0\u05e9\u05d5\u05df_\u05e9\u05e0\u05d9_\u05e9\u05dc\u05d9\u05e9\u05d9_\u05e8\u05d1\u05d9\u05e2\u05d9_\u05d7\u05de\u05d9\u05e9\u05d9_\u05e9\u05d9\u05e9\u05d9_\u05e9\u05d1\u05ea".split("_"),weekdaysShort:"\u05d0\u05f3_\u05d1\u05f3_\u05d2\u05f3_\u05d3\u05f3_\u05d4\u05f3_\u05d5\u05f3_\u05e9\u05f3".split("_"),weekdaysMin:"\u05d0_\u05d1_\u05d2_\u05d3_\u05d4_\u05d5_\u05e9".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [\u05d1]MMMM YYYY",LLL:"D [\u05d1]MMMM YYYY HH:mm",LLLL:"dddd, D [\u05d1]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:"[\u05d4\u05d9\u05d5\u05dd \u05d1\u05be]LT",nextDay:"[\u05de\u05d7\u05e8 \u05d1\u05be]LT",nextWeek:"dddd [\u05d1\u05e9\u05e2\u05d4] LT",lastDay:"[\u05d0\u05ea\u05de\u05d5\u05dc \u05d1\u05be]LT",lastWeek:"[\u05d1\u05d9\u05d5\u05dd] dddd [\u05d4\u05d0\u05d7\u05e8\u05d5\u05df \u05d1\u05e9\u05e2\u05d4] LT",sameElse:"L"},relativeTime:{future:"\u05d1\u05e2\u05d5\u05d3 %s",past:"\u05dc\u05e4\u05e0\u05d9 %s",s:"\u05de\u05e1\u05e4\u05e8 \u05e9\u05e0\u05d9\u05d5\u05ea",ss:"%d \u05e9\u05e0\u05d9\u05d5\u05ea",m:"\u05d3\u05e7\u05d4",mm:"%d \u05d3\u05e7\u05d5\u05ea",h:"\u05e9\u05e2\u05d4",hh:function(e){return 2===e?"\u05e9\u05e2\u05ea\u05d9\u05d9\u05dd":e+" \u05e9\u05e2\u05d5\u05ea"},d:"\u05d9\u05d5\u05dd",dd:function(e){return 2===e?"\u05d9\u05d5\u05de\u05d9\u05d9\u05dd":e+" \u05d9\u05de\u05d9\u05dd"},M:"\u05d7\u05d5\u05d3\u05e9",MM:function(e){return 2===e?"\u05d7\u05d5\u05d3\u05e9\u05d9\u05d9\u05dd":e+" \u05d7\u05d5\u05d3\u05e9\u05d9\u05dd"},y:"\u05e9\u05e0\u05d4",yy:function(e){return 2===e?"\u05e9\u05e0\u05ea\u05d9\u05d9\u05dd":e%10==0&&10!==e?e+" \u05e9\u05e0\u05d4":e+" \u05e9\u05e0\u05d9\u05dd"}},meridiemParse:/\u05d0\u05d7\u05d4"\u05e6|\u05dc\u05e4\u05e0\u05d4"\u05e6|\u05d0\u05d7\u05e8\u05d9 \u05d4\u05e6\u05d4\u05e8\u05d9\u05d9\u05dd|\u05dc\u05e4\u05e0\u05d9 \u05d4\u05e6\u05d4\u05e8\u05d9\u05d9\u05dd|\u05dc\u05e4\u05e0\u05d5\u05ea \u05d1\u05d5\u05e7\u05e8|\u05d1\u05d1\u05d5\u05e7\u05e8|\u05d1\u05e2\u05e8\u05d1/i,isPM:function(e){return/^(\u05d0\u05d7\u05d4"\u05e6|\u05d0\u05d7\u05e8\u05d9 \u05d4\u05e6\u05d4\u05e8\u05d9\u05d9\u05dd|\u05d1\u05e2\u05e8\u05d1)$/.test(e)},meridiem:function(e,a,t){return e<5?"\u05dc\u05e4\u05e0\u05d5\u05ea \u05d1\u05d5\u05e7\u05e8":e<10?"\u05d1\u05d1\u05d5\u05e7\u05e8":e<12?t?'\u05dc\u05e4\u05e0\u05d4"\u05e6':"\u05dc\u05e4\u05e0\u05d9 \u05d4\u05e6\u05d4\u05e8\u05d9\u05d9\u05dd":e<18?t?'\u05d0\u05d7\u05d4"\u05e6':"\u05d0\u05d7\u05e8\u05d9 \u05d4\u05e6\u05d4\u05e8\u05d9\u05d9\u05dd":"\u05d1\u05e2\u05e8\u05d1"}});var $s={1:"\u0967",2:"\u0968",3:"\u0969",4:"\u096a",5:"\u096b",6:"\u096c",7:"\u096d",8:"\u096e",9:"\u096f",0:"\u0966"},Bs={"\u0967":"1","\u0968":"2","\u0969":"3","\u096a":"4","\u096b":"5","\u096c":"6","\u096d":"7","\u096e":"8","\u096f":"9","\u0966":"0"};function qs(e,a,t){var s=e+" ";switch(t){case"ss":return s+=1===e?"sekunda":2===e||3===e||4===e?"sekunde":"sekundi";case"m":return a?"jedna minuta":"jedne minute";case"mm":return s+=1===e?"minuta":2===e||3===e||4===e?"minute":"minuta";case"h":return a?"jedan sat":"jednog sata";case"hh":return s+=1===e?"sat":2===e||3===e||4===e?"sata":"sati";case"dd":return s+=1===e?"dan":"dana";case"MM":return s+=1===e?"mjesec":2===e||3===e||4===e?"mjeseca":"mjeseci";case"yy":return s+=1===e?"godina":2===e||3===e||4===e?"godine":"godina"}}l.defineLocale("hi",{months:"\u091c\u0928\u0935\u0930\u0940_\u092b\u093c\u0930\u0935\u0930\u0940_\u092e\u093e\u0930\u094d\u091a_\u0905\u092a\u094d\u0930\u0948\u0932_\u092e\u0908_\u091c\u0942\u0928_\u091c\u0941\u0932\u093e\u0908_\u0905\u0917\u0938\u094d\u0924_\u0938\u093f\u0924\u092e\u094d\u092c\u0930_\u0905\u0915\u094d\u091f\u0942\u092c\u0930_\u0928\u0935\u092e\u094d\u092c\u0930_\u0926\u093f\u0938\u092e\u094d\u092c\u0930".split("_"),monthsShort:"\u091c\u0928._\u092b\u093c\u0930._\u092e\u093e\u0930\u094d\u091a_\u0905\u092a\u094d\u0930\u0948._\u092e\u0908_\u091c\u0942\u0928_\u091c\u0941\u0932._\u0905\u0917._\u0938\u093f\u0924._\u0905\u0915\u094d\u091f\u0942._\u0928\u0935._\u0926\u093f\u0938.".split("_"),monthsParseExact:!0,weekdays:"\u0930\u0935\u093f\u0935\u093e\u0930_\u0938\u094b\u092e\u0935\u093e\u0930_\u092e\u0902\u0917\u0932\u0935\u093e\u0930_\u092c\u0941\u0927\u0935\u093e\u0930_\u0917\u0941\u0930\u0942\u0935\u093e\u0930_\u0936\u0941\u0915\u094d\u0930\u0935\u093e\u0930_\u0936\u0928\u093f\u0935\u093e\u0930".split("_"),weekdaysShort:"\u0930\u0935\u093f_\u0938\u094b\u092e_\u092e\u0902\u0917\u0932_\u092c\u0941\u0927_\u0917\u0941\u0930\u0942_\u0936\u0941\u0915\u094d\u0930_\u0936\u0928\u093f".split("_"),weekdaysMin:"\u0930_\u0938\u094b_\u092e\u0902_\u092c\u0941_\u0917\u0941_\u0936\u0941_\u0936".split("_"),longDateFormat:{LT:"A h:mm \u092c\u091c\u0947",LTS:"A h:mm:ss \u092c\u091c\u0947",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm \u092c\u091c\u0947",LLLL:"dddd, D MMMM YYYY, A h:mm \u092c\u091c\u0947"},calendar:{sameDay:"[\u0906\u091c] LT",nextDay:"[\u0915\u0932] LT",nextWeek:"dddd, LT",lastDay:"[\u0915\u0932] LT",lastWeek:"[\u092a\u093f\u091b\u0932\u0947] dddd, LT",sameElse:"L"},relativeTime:{future:"%s \u092e\u0947\u0902",past:"%s \u092a\u0939\u0932\u0947",s:"\u0915\u0941\u091b \u0939\u0940 \u0915\u094d\u0937\u0923",ss:"%d \u0938\u0947\u0915\u0902\u0921",m:"\u090f\u0915 \u092e\u093f\u0928\u091f",mm:"%d \u092e\u093f\u0928\u091f",h:"\u090f\u0915 \u0918\u0902\u091f\u093e",hh:"%d \u0918\u0902\u091f\u0947",d:"\u090f\u0915 \u0926\u093f\u0928",dd:"%d \u0926\u093f\u0928",M:"\u090f\u0915 \u092e\u0939\u0940\u0928\u0947",MM:"%d \u092e\u0939\u0940\u0928\u0947",y:"\u090f\u0915 \u0935\u0930\u094d\u0937",yy:"%d \u0935\u0930\u094d\u0937"},preparse:function(e){return e.replace(/[\u0967\u0968\u0969\u096a\u096b\u096c\u096d\u096e\u096f\u0966]/g,function(e){return Bs[e]})},postformat:function(e){return e.replace(/\d/g,function(e){return $s[e]})},meridiemParse:/\u0930\u093e\u0924|\u0938\u0941\u092c\u0939|\u0926\u094b\u092a\u0939\u0930|\u0936\u093e\u092e/,meridiemHour:function(e,a){return 12===e&&(e=0),"\u0930\u093e\u0924"===a?e<4?e:e+12:"\u0938\u0941\u092c\u0939"===a?e:"\u0926\u094b\u092a\u0939\u0930"===a?10<=e?e:e+12:"\u0936\u093e\u092e"===a?e+12:void 0},meridiem:function(e,a,t){return e<4?"\u0930\u093e\u0924":e<10?"\u0938\u0941\u092c\u0939":e<17?"\u0926\u094b\u092a\u0939\u0930":e<20?"\u0936\u093e\u092e":"\u0930\u093e\u0924"},week:{dow:0,doy:6}}),l.defineLocale("hr",{months:{format:"sije\u010dnja_velja\u010de_o\u017eujka_travnja_svibnja_lipnja_srpnja_kolovoza_rujna_listopada_studenoga_prosinca".split("_"),standalone:"sije\u010danj_velja\u010da_o\u017eujak_travanj_svibanj_lipanj_srpanj_kolovoz_rujan_listopad_studeni_prosinac".split("_")},monthsShort:"sij._velj._o\u017eu._tra._svi._lip._srp._kol._ruj._lis._stu._pro.".split("_"),monthsParseExact:!0,weekdays:"nedjelja_ponedjeljak_utorak_srijeda_\u010detvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sri._\u010det._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_\u010de_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\u010der u] LT",lastWeek:function(){switch(this.day()){case 0:case 3:return"[pro\u0161lu] dddd [u] LT";case 6:return"[pro\u0161le] [subote] [u] LT";case 1:case 2:case 4:case 5:return"[pro\u0161li] dddd [u] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"prije %s",s:"par sekundi",ss:qs,m:qs,mm:qs,h:qs,hh:qs,d:"dan",dd:qs,M:"mjesec",MM:qs,y:"godinu",yy:qs},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}});var Qs="vas\xe1rnap h\xe9tf\u0151n kedden szerd\xe1n cs\xfct\xf6rt\xf6k\xf6n p\xe9nteken szombaton".split(" ");function Xs(e,a,t,s){var n=e;switch(t){case"s":return s||a?"n\xe9h\xe1ny m\xe1sodperc":"n\xe9h\xe1ny m\xe1sodperce";case"ss":return n+(s||a)?" m\xe1sodperc":" m\xe1sodperce";case"m":return"egy"+(s||a?" perc":" perce");case"mm":return n+(s||a?" perc":" perce");case"h":return"egy"+(s||a?" \xf3ra":" \xf3r\xe1ja");case"hh":return n+(s||a?" \xf3ra":" \xf3r\xe1ja");case"d":return"egy"+(s||a?" nap":" napja");case"dd":return n+(s||a?" nap":" napja");case"M":return"egy"+(s||a?" h\xf3nap":" h\xf3napja");case"MM":return n+(s||a?" h\xf3nap":" h\xf3napja");case"y":return"egy"+(s||a?" \xe9v":" \xe9ve");case"yy":return n+(s||a?" \xe9v":" \xe9ve")}return""}function en(e){return(e?"":"[m\xfalt] ")+"["+Qs[this.day()]+"] LT[-kor]"}function an(e){return e%100==11||e%10!=1}function tn(e,a,t,s){var n=e+" ";switch(t){case"s":return a||s?"nokkrar sek\xfandur":"nokkrum sek\xfandum";case"ss":return an(e)?n+(a||s?"sek\xfandur":"sek\xfandum"):n+"sek\xfanda";case"m":return a?"m\xedn\xfata":"m\xedn\xfatu";case"mm":return an(e)?n+(a||s?"m\xedn\xfatur":"m\xedn\xfatum"):a?n+"m\xedn\xfata":n+"m\xedn\xfatu";case"hh":return an(e)?n+(a||s?"klukkustundir":"klukkustundum"):n+"klukkustund";case"d":return a?"dagur":s?"dag":"degi";case"dd":return an(e)?a?n+"dagar":n+(s?"daga":"d\xf6gum"):a?n+"dagur":n+(s?"dag":"degi");case"M":return a?"m\xe1nu\xf0ur":s?"m\xe1nu\xf0":"m\xe1nu\xf0i";case"MM":return an(e)?a?n+"m\xe1nu\xf0ir":n+(s?"m\xe1nu\xf0i":"m\xe1nu\xf0um"):a?n+"m\xe1nu\xf0ur":n+(s?"m\xe1nu\xf0":"m\xe1nu\xf0i");case"y":return a||s?"\xe1r":"\xe1ri";case"yy":return an(e)?n+(a||s?"\xe1r":"\xe1rum"):n+(a||s?"\xe1r":"\xe1ri")}}l.defineLocale("hu",{months:"janu\xe1r_febru\xe1r_m\xe1rcius_\xe1prilis_m\xe1jus_j\xfanius_j\xfalius_augusztus_szeptember_okt\xf3ber_november_december".split("_"),monthsShort:"jan_feb_m\xe1rc_\xe1pr_m\xe1j_j\xfan_j\xfal_aug_szept_okt_nov_dec".split("_"),weekdays:"vas\xe1rnap_h\xe9tf\u0151_kedd_szerda_cs\xfct\xf6rt\xf6k_p\xe9ntek_szombat".split("_"),weekdaysShort:"vas_h\xe9t_kedd_sze_cs\xfct_p\xe9n_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,a,t){return e<12?!0===t?"de":"DE":!0===t?"du":"DU"},calendar:{sameDay:"[ma] LT[-kor]",nextDay:"[holnap] LT[-kor]",nextWeek:function(){return en.call(this,!0)},lastDay:"[tegnap] LT[-kor]",lastWeek:function(){return en.call(this,!1)},sameElse:"L"},relativeTime:{future:"%s m\xfalva",past:"%s",s:Xs,ss:Xs,m:Xs,mm:Xs,h:Xs,hh:Xs,d:Xs,dd:Xs,M:Xs,MM:Xs,y:Xs,yy:Xs},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}}),l.defineLocale("hy-am",{months:{format:"\u0570\u0578\u0582\u0576\u057e\u0561\u0580\u056b_\u0583\u0565\u057f\u0580\u057e\u0561\u0580\u056b_\u0574\u0561\u0580\u057f\u056b_\u0561\u057a\u0580\u056b\u056c\u056b_\u0574\u0561\u0575\u056b\u057d\u056b_\u0570\u0578\u0582\u0576\u056b\u057d\u056b_\u0570\u0578\u0582\u056c\u056b\u057d\u056b_\u0585\u0563\u0578\u057d\u057f\u0578\u057d\u056b_\u057d\u0565\u057a\u057f\u0565\u0574\u0562\u0565\u0580\u056b_\u0570\u0578\u056f\u057f\u0565\u0574\u0562\u0565\u0580\u056b_\u0576\u0578\u0575\u0565\u0574\u0562\u0565\u0580\u056b_\u0564\u0565\u056f\u057f\u0565\u0574\u0562\u0565\u0580\u056b".split("_"),standalone:"\u0570\u0578\u0582\u0576\u057e\u0561\u0580_\u0583\u0565\u057f\u0580\u057e\u0561\u0580_\u0574\u0561\u0580\u057f_\u0561\u057a\u0580\u056b\u056c_\u0574\u0561\u0575\u056b\u057d_\u0570\u0578\u0582\u0576\u056b\u057d_\u0570\u0578\u0582\u056c\u056b\u057d_\u0585\u0563\u0578\u057d\u057f\u0578\u057d_\u057d\u0565\u057a\u057f\u0565\u0574\u0562\u0565\u0580_\u0570\u0578\u056f\u057f\u0565\u0574\u0562\u0565\u0580_\u0576\u0578\u0575\u0565\u0574\u0562\u0565\u0580_\u0564\u0565\u056f\u057f\u0565\u0574\u0562\u0565\u0580".split("_")},monthsShort:"\u0570\u0576\u057e_\u0583\u057f\u0580_\u0574\u0580\u057f_\u0561\u057a\u0580_\u0574\u0575\u057d_\u0570\u0576\u057d_\u0570\u056c\u057d_\u0585\u0563\u057d_\u057d\u057a\u057f_\u0570\u056f\u057f_\u0576\u0574\u0562_\u0564\u056f\u057f".split("_"),weekdays:"\u056f\u056b\u0580\u0561\u056f\u056b_\u0565\u0580\u056f\u0578\u0582\u0577\u0561\u0562\u0569\u056b_\u0565\u0580\u0565\u0584\u0577\u0561\u0562\u0569\u056b_\u0579\u0578\u0580\u0565\u0584\u0577\u0561\u0562\u0569\u056b_\u0570\u056b\u0576\u0563\u0577\u0561\u0562\u0569\u056b_\u0578\u0582\u0580\u0562\u0561\u0569_\u0577\u0561\u0562\u0561\u0569".split("_"),weekdaysShort:"\u056f\u0580\u056f_\u0565\u0580\u056f_\u0565\u0580\u0584_\u0579\u0580\u0584_\u0570\u0576\u0563_\u0578\u0582\u0580\u0562_\u0577\u0562\u0569".split("_"),weekdaysMin:"\u056f\u0580\u056f_\u0565\u0580\u056f_\u0565\u0580\u0584_\u0579\u0580\u0584_\u0570\u0576\u0563_\u0578\u0582\u0580\u0562_\u0577\u0562\u0569".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY \u0569.",LLL:"D MMMM YYYY \u0569., HH:mm",LLLL:"dddd, D MMMM YYYY \u0569., HH:mm"},calendar:{sameDay:"[\u0561\u0575\u057d\u0585\u0580] LT",nextDay:"[\u057e\u0561\u0572\u0568] LT",lastDay:"[\u0565\u0580\u0565\u056f] LT",nextWeek:function(){return"dddd [\u0585\u0580\u0568 \u056a\u0561\u0574\u0568] LT"},lastWeek:function(){return"[\u0561\u0576\u0581\u0561\u056e] dddd [\u0585\u0580\u0568 \u056a\u0561\u0574\u0568] LT"},sameElse:"L"},relativeTime:{future:"%s \u0570\u0565\u057f\u0578",past:"%s \u0561\u057c\u0561\u057b",s:"\u0574\u056b \u0584\u0561\u0576\u056b \u057e\u0561\u0575\u0580\u056f\u0575\u0561\u0576",ss:"%d \u057e\u0561\u0575\u0580\u056f\u0575\u0561\u0576",m:"\u0580\u0578\u057a\u0565",mm:"%d \u0580\u0578\u057a\u0565",h:"\u056a\u0561\u0574",hh:"%d \u056a\u0561\u0574",d:"\u0585\u0580",dd:"%d \u0585\u0580",M:"\u0561\u0574\u056b\u057d",MM:"%d \u0561\u0574\u056b\u057d",y:"\u057f\u0561\u0580\u056b",yy:"%d \u057f\u0561\u0580\u056b"},meridiemParse:/\u0563\u056b\u0577\u0565\u0580\u057e\u0561|\u0561\u057c\u0561\u057e\u0578\u057f\u057e\u0561|\u0581\u0565\u0580\u0565\u056f\u057e\u0561|\u0565\u0580\u0565\u056f\u0578\u0575\u0561\u0576/,isPM:function(e){return/^(\u0581\u0565\u0580\u0565\u056f\u057e\u0561|\u0565\u0580\u0565\u056f\u0578\u0575\u0561\u0576)$/.test(e)},meridiem:function(e){return e<4?"\u0563\u056b\u0577\u0565\u0580\u057e\u0561":e<12?"\u0561\u057c\u0561\u057e\u0578\u057f\u057e\u0561":e<17?"\u0581\u0565\u0580\u0565\u056f\u057e\u0561":"\u0565\u0580\u0565\u056f\u0578\u0575\u0561\u0576"},dayOfMonthOrdinalParse:/\d{1,2}|\d{1,2}-(\u056b\u0576|\u0580\u0564)/,ordinal:function(e,a){switch(a){case"DDD":case"w":case"W":case"DDDo":return 1===e?e+"-\u056b\u0576":e+"-\u0580\u0564";default:return e}},week:{dow:1,doy:7}}),l.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,a){return 12===e&&(e=0),"pagi"===a?e:"siang"===a?11<=e?e:e+12:"sore"===a||"malam"===a?e+12:void 0},meridiem:function(e,a,t){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:1,doy:7}}),l.defineLocale("is",{months:"jan\xfaar_febr\xfaar_mars_apr\xedl_ma\xed_j\xfan\xed_j\xfal\xed_\xe1g\xfast_september_okt\xf3ber_n\xf3vember_desember".split("_"),monthsShort:"jan_feb_mar_apr_ma\xed_j\xfan_j\xfal_\xe1g\xfa_sep_okt_n\xf3v_des".split("_"),weekdays:"sunnudagur_m\xe1nudagur_\xferi\xf0judagur_mi\xf0vikudagur_fimmtudagur_f\xf6studagur_laugardagur".split("_"),weekdaysShort:"sun_m\xe1n_\xferi_mi\xf0_fim_f\xf6s_lau".split("_"),weekdaysMin:"Su_M\xe1_\xder_Mi_Fi_F\xf6_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:"[\xed dag kl.] LT",nextDay:"[\xe1 morgun kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[\xed g\xe6r kl.] LT",lastWeek:"[s\xed\xf0asta] dddd [kl.] LT",sameElse:"L"},relativeTime:{future:"eftir %s",past:"fyrir %s s\xed\xf0an",s:tn,ss:tn,m:tn,mm:tn,h:"klukkustund",hh:tn,d:tn,dd:tn,M:tn,MM:tn,y:tn,yy:tn},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}}),l.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\xec_marted\xec_mercoled\xec_gioved\xec_venerd\xec_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(){switch(this.day()){case 0:return"[la scorsa] dddd [alle] LT";default:return"[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}\xba/,ordinal:"%d\xba",week:{dow:1,doy:4}}),l.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\xec_marted\xec_mercoled\xec_gioved\xec_venerd\xec_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(){switch(this.day()){case 0:return"[la scorsa] dddd [alle] LT";default:return"[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}\xba/,ordinal:"%d\xba",week:{dow:1,doy:4}}),l.defineLocale("ja",{months:"\u4e00\u6708_\u4e8c\u6708_\u4e09\u6708_\u56db\u6708_\u4e94\u6708_\u516d\u6708_\u4e03\u6708_\u516b\u6708_\u4e5d\u6708_\u5341\u6708_\u5341\u4e00\u6708_\u5341\u4e8c\u6708".split("_"),monthsShort:"1\u6708_2\u6708_3\u6708_4\u6708_5\u6708_6\u6708_7\u6708_8\u6708_9\u6708_10\u6708_11\u6708_12\u6708".split("_"),weekdays:"\u65e5\u66dc\u65e5_\u6708\u66dc\u65e5_\u706b\u66dc\u65e5_\u6c34\u66dc\u65e5_\u6728\u66dc\u65e5_\u91d1\u66dc\u65e5_\u571f\u66dc\u65e5".split("_"),weekdaysShort:"\u65e5_\u6708_\u706b_\u6c34_\u6728_\u91d1_\u571f".split("_"),weekdaysMin:"\u65e5_\u6708_\u706b_\u6c34_\u6728_\u91d1_\u571f".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY\u5e74M\u6708D\u65e5",LLL:"YYYY\u5e74M\u6708D\u65e5 HH:mm",LLLL:"YYYY\u5e74M\u6708D\u65e5 dddd HH:mm",l:"YYYY/MM/DD",ll:"YYYY\u5e74M\u6708D\u65e5",lll:"YYYY\u5e74M\u6708D\u65e5 HH:mm",llll:"YYYY\u5e74M\u6708D\u65e5(ddd) HH:mm"},meridiemParse:/\u5348\u524d|\u5348\u5f8c/i,isPM:function(e){return"\u5348\u5f8c"===e},meridiem:function(e,a,t){return e<12?"\u5348\u524d":"\u5348\u5f8c"},calendar:{sameDay:"[\u4eca\u65e5] LT",nextDay:"[\u660e\u65e5] LT",nextWeek:function(e){return e.week()<this.week()?"[\u6765\u9031]dddd LT":"dddd LT"},lastDay:"[\u6628\u65e5] LT",lastWeek:function(e){return this.week()<e.week()?"[\u5148\u9031]dddd LT":"dddd LT"},sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}\u65e5/,ordinal:function(e,a){switch(a){case"d":case"D":case"DDD":return e+"\u65e5";default:return e}},relativeTime:{future:"%s\u5f8c",past:"%s\u524d",s:"\u6570\u79d2",ss:"%d\u79d2",m:"1\u5206",mm:"%d\u5206",h:"1\u6642\u9593",hh:"%d\u6642\u9593",d:"1\u65e5",dd:"%d\u65e5",M:"1\u30f6\u6708",MM:"%d\u30f6\u6708",y:"1\u5e74",yy:"%d\u5e74"}}),l.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,a){return 12===e&&(e=0),"enjing"===a?e:"siyang"===a?11<=e?e:e+12:"sonten"===a||"ndalu"===a?e+12:void 0},meridiem:function(e,a,t){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}}),l.defineLocale("ka",{months:{standalone:"\u10d8\u10d0\u10dc\u10d5\u10d0\u10e0\u10d8_\u10d7\u10d4\u10d1\u10d4\u10e0\u10d5\u10d0\u10da\u10d8_\u10db\u10d0\u10e0\u10e2\u10d8_\u10d0\u10de\u10e0\u10d8\u10da\u10d8_\u10db\u10d0\u10d8\u10e1\u10d8_\u10d8\u10d5\u10dc\u10d8\u10e1\u10d8_\u10d8\u10d5\u10da\u10d8\u10e1\u10d8_\u10d0\u10d2\u10d5\u10d8\u10e1\u10e2\u10dd_\u10e1\u10d4\u10e5\u10e2\u10d4\u10db\u10d1\u10d4\u10e0\u10d8_\u10dd\u10e5\u10e2\u10dd\u10db\u10d1\u10d4\u10e0\u10d8_\u10dc\u10dd\u10d4\u10db\u10d1\u10d4\u10e0\u10d8_\u10d3\u10d4\u10d9\u10d4\u10db\u10d1\u10d4\u10e0\u10d8".split("_"),format:"\u10d8\u10d0\u10dc\u10d5\u10d0\u10e0\u10e1_\u10d7\u10d4\u10d1\u10d4\u10e0\u10d5\u10d0\u10da\u10e1_\u10db\u10d0\u10e0\u10e2\u10e1_\u10d0\u10de\u10e0\u10d8\u10da\u10d8\u10e1_\u10db\u10d0\u10d8\u10e1\u10e1_\u10d8\u10d5\u10dc\u10d8\u10e1\u10e1_\u10d8\u10d5\u10da\u10d8\u10e1\u10e1_\u10d0\u10d2\u10d5\u10d8\u10e1\u10e2\u10e1_\u10e1\u10d4\u10e5\u10e2\u10d4\u10db\u10d1\u10d4\u10e0\u10e1_\u10dd\u10e5\u10e2\u10dd\u10db\u10d1\u10d4\u10e0\u10e1_\u10dc\u10dd\u10d4\u10db\u10d1\u10d4\u10e0\u10e1_\u10d3\u10d4\u10d9\u10d4\u10db\u10d1\u10d4\u10e0\u10e1".split("_")},monthsShort:"\u10d8\u10d0\u10dc_\u10d7\u10d4\u10d1_\u10db\u10d0\u10e0_\u10d0\u10de\u10e0_\u10db\u10d0\u10d8_\u10d8\u10d5\u10dc_\u10d8\u10d5\u10da_\u10d0\u10d2\u10d5_\u10e1\u10d4\u10e5_\u10dd\u10e5\u10e2_\u10dc\u10dd\u10d4_\u10d3\u10d4\u10d9".split("_"),weekdays:{standalone:"\u10d9\u10d5\u10d8\u10e0\u10d0_\u10dd\u10e0\u10e8\u10d0\u10d1\u10d0\u10d7\u10d8_\u10e1\u10d0\u10db\u10e8\u10d0\u10d1\u10d0\u10d7\u10d8_\u10dd\u10d7\u10ee\u10e8\u10d0\u10d1\u10d0\u10d7\u10d8_\u10ee\u10e3\u10d7\u10e8\u10d0\u10d1\u10d0\u10d7\u10d8_\u10de\u10d0\u10e0\u10d0\u10e1\u10d9\u10d4\u10d5\u10d8_\u10e8\u10d0\u10d1\u10d0\u10d7\u10d8".split("_"),format:"\u10d9\u10d5\u10d8\u10e0\u10d0\u10e1_\u10dd\u10e0\u10e8\u10d0\u10d1\u10d0\u10d7\u10e1_\u10e1\u10d0\u10db\u10e8\u10d0\u10d1\u10d0\u10d7\u10e1_\u10dd\u10d7\u10ee\u10e8\u10d0\u10d1\u10d0\u10d7\u10e1_\u10ee\u10e3\u10d7\u10e8\u10d0\u10d1\u10d0\u10d7\u10e1_\u10de\u10d0\u10e0\u10d0\u10e1\u10d9\u10d4\u10d5\u10e1_\u10e8\u10d0\u10d1\u10d0\u10d7\u10e1".split("_"),isFormat:/(\u10ec\u10d8\u10dc\u10d0|\u10e8\u10d4\u10db\u10d3\u10d4\u10d2)/},weekdaysShort:"\u10d9\u10d5\u10d8_\u10dd\u10e0\u10e8_\u10e1\u10d0\u10db_\u10dd\u10d7\u10ee_\u10ee\u10e3\u10d7_\u10de\u10d0\u10e0_\u10e8\u10d0\u10d1".split("_"),weekdaysMin:"\u10d9\u10d5_\u10dd\u10e0_\u10e1\u10d0_\u10dd\u10d7_\u10ee\u10e3_\u10de\u10d0_\u10e8\u10d0".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:"[\u10d3\u10e6\u10d4\u10e1] LT[-\u10d6\u10d4]",nextDay:"[\u10ee\u10d5\u10d0\u10da] LT[-\u10d6\u10d4]",lastDay:"[\u10d2\u10e3\u10e8\u10d8\u10dc] LT[-\u10d6\u10d4]",nextWeek:"[\u10e8\u10d4\u10db\u10d3\u10d4\u10d2] dddd LT[-\u10d6\u10d4]",lastWeek:"[\u10ec\u10d8\u10dc\u10d0] dddd LT-\u10d6\u10d4",sameElse:"L"},relativeTime:{future:function(e){return/(\u10ec\u10d0\u10db\u10d8|\u10ec\u10e3\u10d7\u10d8|\u10e1\u10d0\u10d0\u10d7\u10d8|\u10ec\u10d4\u10da\u10d8)/.test(e)?e.replace(/\u10d8$/,"\u10e8\u10d8"):e+"\u10e8\u10d8"},past:function(e){return/(\u10ec\u10d0\u10db\u10d8|\u10ec\u10e3\u10d7\u10d8|\u10e1\u10d0\u10d0\u10d7\u10d8|\u10d3\u10e6\u10d4|\u10d7\u10d5\u10d4)/.test(e)?e.replace(/(\u10d8|\u10d4)$/,"\u10d8\u10e1 \u10ec\u10d8\u10dc"):/\u10ec\u10d4\u10da\u10d8/.test(e)?e.replace(/\u10ec\u10d4\u10da\u10d8$/,"\u10ec\u10da\u10d8\u10e1 \u10ec\u10d8\u10dc"):void 0},s:"\u10e0\u10d0\u10db\u10d3\u10d4\u10dc\u10d8\u10db\u10d4 \u10ec\u10d0\u10db\u10d8",ss:"%d \u10ec\u10d0\u10db\u10d8",m:"\u10ec\u10e3\u10d7\u10d8",mm:"%d \u10ec\u10e3\u10d7\u10d8",h:"\u10e1\u10d0\u10d0\u10d7\u10d8",hh:"%d \u10e1\u10d0\u10d0\u10d7\u10d8",d:"\u10d3\u10e6\u10d4",dd:"%d \u10d3\u10e6\u10d4",M:"\u10d7\u10d5\u10d4",MM:"%d \u10d7\u10d5\u10d4",y:"\u10ec\u10d4\u10da\u10d8",yy:"%d \u10ec\u10d4\u10da\u10d8"},dayOfMonthOrdinalParse:/0|1-\u10da\u10d8|\u10db\u10d4-\d{1,2}|\d{1,2}-\u10d4/,ordinal:function(e){return 0===e?e:1===e?e+"-\u10da\u10d8":e<20||e<=100&&e%20==0||e%100==0?"\u10db\u10d4-"+e:e+"-\u10d4"},week:{dow:1,doy:7}});var sn={0:"-\u0448\u0456",1:"-\u0448\u0456",2:"-\u0448\u0456",3:"-\u0448\u0456",4:"-\u0448\u0456",5:"-\u0448\u0456",6:"-\u0448\u044b",7:"-\u0448\u0456",8:"-\u0448\u0456",9:"-\u0448\u044b",10:"-\u0448\u044b",20:"-\u0448\u044b",30:"-\u0448\u044b",40:"-\u0448\u044b",50:"-\u0448\u0456",60:"-\u0448\u044b",70:"-\u0448\u0456",80:"-\u0448\u0456",90:"-\u0448\u044b",100:"-\u0448\u0456"};l.defineLocale("kk",{months:"\u049b\u0430\u04a3\u0442\u0430\u0440_\u0430\u049b\u043f\u0430\u043d_\u043d\u0430\u0443\u0440\u044b\u0437_\u0441\u04d9\u0443\u0456\u0440_\u043c\u0430\u043c\u044b\u0440_\u043c\u0430\u0443\u0441\u044b\u043c_\u0448\u0456\u043b\u0434\u0435_\u0442\u0430\u043c\u044b\u0437_\u049b\u044b\u0440\u043a\u04af\u0439\u0435\u043a_\u049b\u0430\u0437\u0430\u043d_\u049b\u0430\u0440\u0430\u0448\u0430_\u0436\u0435\u043b\u0442\u043e\u049b\u0441\u0430\u043d".split("_"),monthsShort:"\u049b\u0430\u04a3_\u0430\u049b\u043f_\u043d\u0430\u0443_\u0441\u04d9\u0443_\u043c\u0430\u043c_\u043c\u0430\u0443_\u0448\u0456\u043b_\u0442\u0430\u043c_\u049b\u044b\u0440_\u049b\u0430\u0437_\u049b\u0430\u0440_\u0436\u0435\u043b".split("_"),weekdays:"\u0436\u0435\u043a\u0441\u0435\u043d\u0431\u0456_\u0434\u04af\u0439\u0441\u0435\u043d\u0431\u0456_\u0441\u0435\u0439\u0441\u0435\u043d\u0431\u0456_\u0441\u04d9\u0440\u0441\u0435\u043d\u0431\u0456_\u0431\u0435\u0439\u0441\u0435\u043d\u0431\u0456_\u0436\u04b1\u043c\u0430_\u0441\u0435\u043d\u0431\u0456".split("_"),weekdaysShort:"\u0436\u0435\u043a_\u0434\u04af\u0439_\u0441\u0435\u0439_\u0441\u04d9\u0440_\u0431\u0435\u0439_\u0436\u04b1\u043c_\u0441\u0435\u043d".split("_"),weekdaysMin:"\u0436\u043a_\u0434\u0439_\u0441\u0439_\u0441\u0440_\u0431\u0439_\u0436\u043c_\u0441\u043d".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:"[\u0411\u04af\u0433\u0456\u043d \u0441\u0430\u0493\u0430\u0442] LT",nextDay:"[\u0415\u0440\u0442\u0435\u04a3 \u0441\u0430\u0493\u0430\u0442] LT",nextWeek:"dddd [\u0441\u0430\u0493\u0430\u0442] LT",lastDay:"[\u041a\u0435\u0448\u0435 \u0441\u0430\u0493\u0430\u0442] LT",lastWeek:"[\u04e8\u0442\u043a\u0435\u043d \u0430\u043f\u0442\u0430\u043d\u044b\u04a3] dddd [\u0441\u0430\u0493\u0430\u0442] LT",sameElse:"L"},relativeTime:{future:"%s \u0456\u0448\u0456\u043d\u0434\u0435",past:"%s \u0431\u04b1\u0440\u044b\u043d",s:"\u0431\u0456\u0440\u043d\u0435\u0448\u0435 \u0441\u0435\u043a\u0443\u043d\u0434",ss:"%d \u0441\u0435\u043a\u0443\u043d\u0434",m:"\u0431\u0456\u0440 \u043c\u0438\u043d\u0443\u0442",mm:"%d \u043c\u0438\u043d\u0443\u0442",h:"\u0431\u0456\u0440 \u0441\u0430\u0493\u0430\u0442",hh:"%d \u0441\u0430\u0493\u0430\u0442",d:"\u0431\u0456\u0440 \u043a\u04af\u043d",dd:"%d \u043a\u04af\u043d",M:"\u0431\u0456\u0440 \u0430\u0439",MM:"%d \u0430\u0439",y:"\u0431\u0456\u0440 \u0436\u044b\u043b",yy:"%d \u0436\u044b\u043b"},dayOfMonthOrdinalParse:/\d{1,2}-(\u0448\u0456|\u0448\u044b)/,ordinal:function(e){return e+(sn[e]||sn[e%10]||sn[100<=e?100:null])},week:{dow:1,doy:7}});var nn={1:"\u17e1",2:"\u17e2",3:"\u17e3",4:"\u17e4",5:"\u17e5",6:"\u17e6",7:"\u17e7",8:"\u17e8",9:"\u17e9",0:"\u17e0"},dn={"\u17e1":"1","\u17e2":"2","\u17e3":"3","\u17e4":"4","\u17e5":"5","\u17e6":"6","\u17e7":"7","\u17e8":"8","\u17e9":"9","\u17e0":"0"};l.defineLocale("km",{months:"\u1798\u1780\u179a\u17b6_\u1780\u17bb\u1798\u17d2\u1797\u17c8_\u1798\u17b8\u1793\u17b6_\u1798\u17c1\u179f\u17b6_\u17a7\u179f\u1797\u17b6_\u1798\u17b7\u1790\u17bb\u1793\u17b6_\u1780\u1780\u17d2\u1780\u178a\u17b6_\u179f\u17b8\u17a0\u17b6_\u1780\u1789\u17d2\u1789\u17b6_\u178f\u17bb\u179b\u17b6_\u179c\u17b7\u1785\u17d2\u1786\u17b7\u1780\u17b6_\u1792\u17d2\u1793\u17bc".split("_"),monthsShort:"\u1798\u1780\u179a\u17b6_\u1780\u17bb\u1798\u17d2\u1797\u17c8_\u1798\u17b8\u1793\u17b6_\u1798\u17c1\u179f\u17b6_\u17a7\u179f\u1797\u17b6_\u1798\u17b7\u1790\u17bb\u1793\u17b6_\u1780\u1780\u17d2\u1780\u178a\u17b6_\u179f\u17b8\u17a0\u17b6_\u1780\u1789\u17d2\u1789\u17b6_\u178f\u17bb\u179b\u17b6_\u179c\u17b7\u1785\u17d2\u1786\u17b7\u1780\u17b6_\u1792\u17d2\u1793\u17bc".split("_"),weekdays:"\u17a2\u17b6\u1791\u17b7\u178f\u17d2\u1799_\u1785\u17d0\u1793\u17d2\u1791_\u17a2\u1784\u17d2\u1782\u17b6\u179a_\u1796\u17bb\u1792_\u1796\u17d2\u179a\u17a0\u179f\u17d2\u1794\u178f\u17b7\u17cd_\u179f\u17bb\u1780\u17d2\u179a_\u179f\u17c5\u179a\u17cd".split("_"),weekdaysShort:"\u17a2\u17b6_\u1785_\u17a2_\u1796_\u1796\u17d2\u179a_\u179f\u17bb_\u179f".split("_"),weekdaysMin:"\u17a2\u17b6_\u1785_\u17a2_\u1796_\u1796\u17d2\u179a_\u179f\u17bb_\u179f".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:/\u1796\u17d2\u179a\u17b9\u1780|\u179b\u17d2\u1784\u17b6\u1785/,isPM:function(e){return"\u179b\u17d2\u1784\u17b6\u1785"===e},meridiem:function(e,a,t){return e<12?"\u1796\u17d2\u179a\u17b9\u1780":"\u179b\u17d2\u1784\u17b6\u1785"},calendar:{sameDay:"[\u1790\u17d2\u1784\u17c3\u1793\u17c1\u17c7 \u1798\u17c9\u17c4\u1784] LT",nextDay:"[\u179f\u17d2\u17a2\u17c2\u1780 \u1798\u17c9\u17c4\u1784] LT",nextWeek:"dddd [\u1798\u17c9\u17c4\u1784] LT",lastDay:"[\u1798\u17d2\u179f\u17b7\u179b\u1798\u17b7\u1789 \u1798\u17c9\u17c4\u1784] LT",lastWeek:"dddd [\u179f\u1794\u17d2\u178f\u17b6\u17a0\u17cd\u1798\u17bb\u1793] [\u1798\u17c9\u17c4\u1784] LT",sameElse:"L"},relativeTime:{future:"%s\u1791\u17c0\u178f",past:"%s\u1798\u17bb\u1793",s:"\u1794\u17c9\u17bb\u1793\u17d2\u1798\u17b6\u1793\u179c\u17b7\u1793\u17b6\u1791\u17b8",ss:"%d \u179c\u17b7\u1793\u17b6\u1791\u17b8",m:"\u1798\u17bd\u1799\u1793\u17b6\u1791\u17b8",mm:"%d \u1793\u17b6\u1791\u17b8",h:"\u1798\u17bd\u1799\u1798\u17c9\u17c4\u1784",hh:"%d \u1798\u17c9\u17c4\u1784",d:"\u1798\u17bd\u1799\u1790\u17d2\u1784\u17c3",dd:"%d \u1790\u17d2\u1784\u17c3",M:"\u1798\u17bd\u1799\u1781\u17c2",MM:"%d \u1781\u17c2",y:"\u1798\u17bd\u1799\u1786\u17d2\u1793\u17b6\u17c6",yy:"%d \u1786\u17d2\u1793\u17b6\u17c6"},dayOfMonthOrdinalParse:/\u1791\u17b8\d{1,2}/,ordinal:"\u1791\u17b8%d",preparse:function(e){return e.replace(/[\u17e1\u17e2\u17e3\u17e4\u17e5\u17e6\u17e7\u17e8\u17e9\u17e0]/g,function(e){return dn[e]})},postformat:function(e){return e.replace(/\d/g,function(e){return nn[e]})},week:{dow:1,doy:4}});var rn={1:"\u0ce7",2:"\u0ce8",3:"\u0ce9",4:"\u0cea",5:"\u0ceb",6:"\u0cec",7:"\u0ced",8:"\u0cee",9:"\u0cef",0:"\u0ce6"},_n={"\u0ce7":"1","\u0ce8":"2","\u0ce9":"3","\u0cea":"4","\u0ceb":"5","\u0cec":"6","\u0ced":"7","\u0cee":"8","\u0cef":"9","\u0ce6":"0"};l.defineLocale("kn",{months:"\u0c9c\u0ca8\u0cb5\u0cb0\u0cbf_\u0cab\u0cc6\u0cac\u0ccd\u0cb0\u0cb5\u0cb0\u0cbf_\u0cae\u0cbe\u0cb0\u0ccd\u0c9a\u0ccd_\u0c8f\u0caa\u0ccd\u0cb0\u0cbf\u0cb2\u0ccd_\u0cae\u0cc6\u0cd5_\u0c9c\u0cc2\u0ca8\u0ccd_\u0c9c\u0cc1\u0cb2\u0cc6\u0cd6_\u0c86\u0c97\u0cb8\u0ccd\u0c9f\u0ccd_\u0cb8\u0cc6\u0caa\u0ccd\u0c9f\u0cc6\u0c82\u0cac\u0cb0\u0ccd_\u0c85\u0c95\u0ccd\u0c9f\u0cc6\u0cc2\u0cd5\u0cac\u0cb0\u0ccd_\u0ca8\u0cb5\u0cc6\u0c82\u0cac\u0cb0\u0ccd_\u0ca1\u0cbf\u0cb8\u0cc6\u0c82\u0cac\u0cb0\u0ccd".split("_"),monthsShort:"\u0c9c\u0ca8_\u0cab\u0cc6\u0cac\u0ccd\u0cb0_\u0cae\u0cbe\u0cb0\u0ccd\u0c9a\u0ccd_\u0c8f\u0caa\u0ccd\u0cb0\u0cbf\u0cb2\u0ccd_\u0cae\u0cc6\u0cd5_\u0c9c\u0cc2\u0ca8\u0ccd_\u0c9c\u0cc1\u0cb2\u0cc6\u0cd6_\u0c86\u0c97\u0cb8\u0ccd\u0c9f\u0ccd_\u0cb8\u0cc6\u0caa\u0ccd\u0c9f\u0cc6\u0c82_\u0c85\u0c95\u0ccd\u0c9f\u0cc6\u0cc2\u0cd5_\u0ca8\u0cb5\u0cc6\u0c82_\u0ca1\u0cbf\u0cb8\u0cc6\u0c82".split("_"),monthsParseExact:!0,weekdays:"\u0cad\u0cbe\u0ca8\u0cc1\u0cb5\u0cbe\u0cb0_\u0cb8\u0cc6\u0cc2\u0cd5\u0cae\u0cb5\u0cbe\u0cb0_\u0cae\u0c82\u0c97\u0cb3\u0cb5\u0cbe\u0cb0_\u0cac\u0cc1\u0ca7\u0cb5\u0cbe\u0cb0_\u0c97\u0cc1\u0cb0\u0cc1\u0cb5\u0cbe\u0cb0_\u0cb6\u0cc1\u0c95\u0ccd\u0cb0\u0cb5\u0cbe\u0cb0_\u0cb6\u0ca8\u0cbf\u0cb5\u0cbe\u0cb0".split("_"),weekdaysShort:"\u0cad\u0cbe\u0ca8\u0cc1_\u0cb8\u0cc6\u0cc2\u0cd5\u0cae_\u0cae\u0c82\u0c97\u0cb3_\u0cac\u0cc1\u0ca7_\u0c97\u0cc1\u0cb0\u0cc1_\u0cb6\u0cc1\u0c95\u0ccd\u0cb0_\u0cb6\u0ca8\u0cbf".split("_"),weekdaysMin:"\u0cad\u0cbe_\u0cb8\u0cc6\u0cc2\u0cd5_\u0cae\u0c82_\u0cac\u0cc1_\u0c97\u0cc1_\u0cb6\u0cc1_\u0cb6".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:"[\u0c87\u0c82\u0ca6\u0cc1] LT",nextDay:"[\u0ca8\u0cbe\u0cb3\u0cc6] LT",nextWeek:"dddd, LT",lastDay:"[\u0ca8\u0cbf\u0ca8\u0ccd\u0ca8\u0cc6] LT",lastWeek:"[\u0c95\u0cc6\u0cc2\u0ca8\u0cc6\u0caf] dddd, LT",sameElse:"L"},relativeTime:{future:"%s \u0ca8\u0c82\u0ca4\u0cb0",past:"%s \u0cb9\u0cbf\u0c82\u0ca6\u0cc6",s:"\u0c95\u0cc6\u0cb2\u0cb5\u0cc1 \u0c95\u0ccd\u0cb7\u0ca3\u0c97\u0cb3\u0cc1",ss:"%d \u0cb8\u0cc6\u0c95\u0cc6\u0c82\u0ca1\u0cc1\u0c97\u0cb3\u0cc1",m:"\u0c92\u0c82\u0ca6\u0cc1 \u0ca8\u0cbf\u0cae\u0cbf\u0cb7",mm:"%d \u0ca8\u0cbf\u0cae\u0cbf\u0cb7",h:"\u0c92\u0c82\u0ca6\u0cc1 \u0c97\u0c82\u0c9f\u0cc6",hh:"%d \u0c97\u0c82\u0c9f\u0cc6",d:"\u0c92\u0c82\u0ca6\u0cc1 \u0ca6\u0cbf\u0ca8",dd:"%d \u0ca6\u0cbf\u0ca8",M:"\u0c92\u0c82\u0ca6\u0cc1 \u0ca4\u0cbf\u0c82\u0c97\u0cb3\u0cc1",MM:"%d \u0ca4\u0cbf\u0c82\u0c97\u0cb3\u0cc1",y:"\u0c92\u0c82\u0ca6\u0cc1 \u0cb5\u0cb0\u0ccd\u0cb7",yy:"%d \u0cb5\u0cb0\u0ccd\u0cb7"},preparse:function(e){return e.replace(/[\u0ce7\u0ce8\u0ce9\u0cea\u0ceb\u0cec\u0ced\u0cee\u0cef\u0ce6]/g,function(e){return _n[e]})},postformat:function(e){return e.replace(/\d/g,function(e){return rn[e]})},meridiemParse:/\u0cb0\u0cbe\u0ca4\u0ccd\u0cb0\u0cbf|\u0cac\u0cc6\u0cb3\u0cbf\u0c97\u0ccd\u0c97\u0cc6|\u0cae\u0ca7\u0ccd\u0caf\u0cbe\u0cb9\u0ccd\u0ca8|\u0cb8\u0c82\u0c9c\u0cc6/,meridiemHour:function(e,a){return 12===e&&(e=0),"\u0cb0\u0cbe\u0ca4\u0ccd\u0cb0\u0cbf"===a?e<4?e:e+12:"\u0cac\u0cc6\u0cb3\u0cbf\u0c97\u0ccd\u0c97\u0cc6"===a?e:"\u0cae\u0ca7\u0ccd\u0caf\u0cbe\u0cb9\u0ccd\u0ca8"===a?10<=e?e:e+12:"\u0cb8\u0c82\u0c9c\u0cc6"===a?e+12:void 0},meridiem:function(e,a,t){return e<4?"\u0cb0\u0cbe\u0ca4\u0ccd\u0cb0\u0cbf":e<10?"\u0cac\u0cc6\u0cb3\u0cbf\u0c97\u0ccd\u0c97\u0cc6":e<17?"\u0cae\u0ca7\u0ccd\u0caf\u0cbe\u0cb9\u0ccd\u0ca8":e<20?"\u0cb8\u0c82\u0c9c\u0cc6":"\u0cb0\u0cbe\u0ca4\u0ccd\u0cb0\u0cbf"},dayOfMonthOrdinalParse:/\d{1,2}(\u0ca8\u0cc6\u0cd5)/,ordinal:function(e){return e+"\u0ca8\u0cc6\u0cd5"},week:{dow:0,doy:6}}),l.defineLocale("ko",{months:"1\uc6d4_2\uc6d4_3\uc6d4_4\uc6d4_5\uc6d4_6\uc6d4_7\uc6d4_8\uc6d4_9\uc6d4_10\uc6d4_11\uc6d4_12\uc6d4".split("_"),monthsShort:"1\uc6d4_2\uc6d4_3\uc6d4_4\uc6d4_5\uc6d4_6\uc6d4_7\uc6d4_8\uc6d4_9\uc6d4_10\uc6d4_11\uc6d4_12\uc6d4".split("_"),weekdays:"\uc77c\uc694\uc77c_\uc6d4\uc694\uc77c_\ud654\uc694\uc77c_\uc218\uc694\uc77c_\ubaa9\uc694\uc77c_\uae08\uc694\uc77c_\ud1a0\uc694\uc77c".split("_"),weekdaysShort:"\uc77c_\uc6d4_\ud654_\uc218_\ubaa9_\uae08_\ud1a0".split("_"),weekdaysMin:"\uc77c_\uc6d4_\ud654_\uc218_\ubaa9_\uae08_\ud1a0".split("_"),longDateFormat:{LT:"A h:mm",LTS:"A h:mm:ss",L:"YYYY.MM.DD.",LL:"YYYY\ub144 MMMM D\uc77c",LLL:"YYYY\ub144 MMMM D\uc77c A h:mm",LLLL:"YYYY\ub144 MMMM D\uc77c dddd A h:mm",l:"YYYY.MM.DD.",ll:"YYYY\ub144 MMMM D\uc77c",lll:"YYYY\ub144 MMMM D\uc77c A h:mm",llll:"YYYY\ub144 MMMM D\uc77c dddd A h:mm"},calendar:{sameDay:"\uc624\ub298 LT",nextDay:"\ub0b4\uc77c LT",nextWeek:"dddd LT",lastDay:"\uc5b4\uc81c LT",lastWeek:"\uc9c0\ub09c\uc8fc dddd LT",sameElse:"L"},relativeTime:{future:"%s \ud6c4",past:"%s \uc804",s:"\uba87 \ucd08",ss:"%d\ucd08",m:"1\ubd84",mm:"%d\ubd84",h:"\ud55c \uc2dc\uac04",hh:"%d\uc2dc\uac04",d:"\ud558\ub8e8",dd:"%d\uc77c",M:"\ud55c \ub2ec",MM:"%d\ub2ec",y:"\uc77c \ub144",yy:"%d\ub144"},dayOfMonthOrdinalParse:/\d{1,2}(\uc77c|\uc6d4|\uc8fc)/,ordinal:function(e,a){switch(a){case"d":case"D":case"DDD":return e+"\uc77c";case"M":return e+"\uc6d4";case"w":case"W":return e+"\uc8fc";default:return e}},meridiemParse:/\uc624\uc804|\uc624\ud6c4/,isPM:function(e){return"\uc624\ud6c4"===e},meridiem:function(e,a,t){return e<12?"\uc624\uc804":"\uc624\ud6c4"}});var on={1:"\u0661",2:"\u0662",3:"\u0663",4:"\u0664",5:"\u0665",6:"\u0666",7:"\u0667",8:"\u0668",9:"\u0669",0:"\u0660"},mn={"\u0661":"1","\u0662":"2","\u0663":"3","\u0664":"4","\u0665":"5","\u0666":"6","\u0667":"7","\u0668":"8","\u0669":"9","\u0660":"0"},un=["\u06a9\u0627\u0646\u0648\u0646\u06cc \u062f\u0648\u0648\u06d5\u0645","\u0634\u0648\u0628\u0627\u062a","\u0626\u0627\u0632\u0627\u0631","\u0646\u06cc\u0633\u0627\u0646","\u0626\u0627\u06cc\u0627\u0631","\u062d\u0648\u0632\u06d5\u06cc\u0631\u0627\u0646","\u062a\u06d5\u0645\u0645\u0648\u0632","\u0626\u0627\u0628","\u0626\u06d5\u06cc\u0644\u0648\u0648\u0644","\u062a\u0634\u0631\u06cc\u0646\u06cc \u06cc\u06d5\u0643\u06d5\u0645","\u062a\u0634\u0631\u06cc\u0646\u06cc \u062f\u0648\u0648\u06d5\u0645","\u0643\u0627\u0646\u0648\u0646\u06cc \u06cc\u06d5\u06a9\u06d5\u0645"];l.defineLocale("ku",{months:un,monthsShort:un,weekdays:"\u06cc\u0647\u200c\u0643\u0634\u0647\u200c\u0645\u0645\u0647\u200c_\u062f\u0648\u0648\u0634\u0647\u200c\u0645\u0645\u0647\u200c_\u0633\u06ce\u0634\u0647\u200c\u0645\u0645\u0647\u200c_\u0686\u0648\u0627\u0631\u0634\u0647\u200c\u0645\u0645\u0647\u200c_\u067e\u06ce\u0646\u062c\u0634\u0647\u200c\u0645\u0645\u0647\u200c_\u0647\u0647\u200c\u06cc\u0646\u06cc_\u0634\u0647\u200c\u0645\u0645\u0647\u200c".split("_"),weekdaysShort:"\u06cc\u0647\u200c\u0643\u0634\u0647\u200c\u0645_\u062f\u0648\u0648\u0634\u0647\u200c\u0645_\u0633\u06ce\u0634\u0647\u200c\u0645_\u0686\u0648\u0627\u0631\u0634\u0647\u200c\u0645_\u067e\u06ce\u0646\u062c\u0634\u0647\u200c\u0645_\u0647\u0647\u200c\u06cc\u0646\u06cc_\u0634\u0647\u200c\u0645\u0645\u0647\u200c".split("_"),weekdaysMin:"\u06cc_\u062f_\u0633_\u0686_\u067e_\u0647_\u0634".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:/\u0626\u06ce\u0648\u0627\u0631\u0647\u200c|\u0628\u0647\u200c\u06cc\u0627\u0646\u06cc/,isPM:function(e){return/\u0626\u06ce\u0648\u0627\u0631\u0647\u200c/.test(e)},meridiem:function(e,a,t){return e<12?"\u0628\u0647\u200c\u06cc\u0627\u0646\u06cc":"\u0626\u06ce\u0648\u0627\u0631\u0647\u200c"},calendar:{sameDay:"[\u0626\u0647\u200c\u0645\u0631\u06c6 \u0643\u0627\u062a\u0698\u0645\u06ce\u0631] LT",nextDay:"[\u0628\u0647\u200c\u06cc\u0627\u0646\u06cc \u0643\u0627\u062a\u0698\u0645\u06ce\u0631] LT",nextWeek:"dddd [\u0643\u0627\u062a\u0698\u0645\u06ce\u0631] LT",lastDay:"[\u062f\u0648\u06ce\u0646\u06ce \u0643\u0627\u062a\u0698\u0645\u06ce\u0631] LT",lastWeek:"dddd [\u0643\u0627\u062a\u0698\u0645\u06ce\u0631] LT",sameElse:"L"},relativeTime:{future:"\u0644\u0647\u200c %s",past:"%s",s:"\u0686\u0647\u200c\u0646\u062f \u0686\u0631\u0643\u0647\u200c\u06cc\u0647\u200c\u0643",ss:"\u0686\u0631\u0643\u0647\u200c %d",m:"\u06cc\u0647\u200c\u0643 \u062e\u0648\u0644\u0647\u200c\u0643",mm:"%d \u062e\u0648\u0644\u0647\u200c\u0643",h:"\u06cc\u0647\u200c\u0643 \u0643\u0627\u062a\u0698\u0645\u06ce\u0631",hh:"%d \u0643\u0627\u062a\u0698\u0645\u06ce\u0631",d:"\u06cc\u0647\u200c\u0643 \u0695\u06c6\u0698",dd:"%d \u0695\u06c6\u0698",M:"\u06cc\u0647\u200c\u0643 \u0645\u0627\u0646\u06af",MM:"%d \u0645\u0627\u0646\u06af",y:"\u06cc\u0647\u200c\u0643 \u0633\u0627\u06b5",yy:"%d \u0633\u0627\u06b5"},preparse:function(e){return e.replace(/[\u0661\u0662\u0663\u0664\u0665\u0666\u0667\u0668\u0669\u0660]/g,function(e){return mn[e]}).replace(/\u060c/g,",")},postformat:function(e){return e.replace(/\d/g,function(e){return on[e]}).replace(/,/g,"\u060c")},week:{dow:6,doy:12}});var ln={0:"-\u0447\u04af",1:"-\u0447\u0438",2:"-\u0447\u0438",3:"-\u0447\u04af",4:"-\u0447\u04af",5:"-\u0447\u0438",6:"-\u0447\u044b",7:"-\u0447\u0438",8:"-\u0447\u0438",9:"-\u0447\u0443",10:"-\u0447\u0443",20:"-\u0447\u044b",30:"-\u0447\u0443",40:"-\u0447\u044b",50:"-\u0447\u04af",60:"-\u0447\u044b",70:"-\u0447\u0438",80:"-\u0447\u0438",90:"-\u0447\u0443",100:"-\u0447\u04af"};function Mn(e,a,t,s){var n={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 a?n[t][0]:n[t][1]}function hn(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 a=e%10;return hn(0===a?e/10:a)}if(e<1e4){for(;10<=e;)e/=10;return hn(e)}return hn(e/=1e3)}l.defineLocale("ky",{months:"\u044f\u043d\u0432\u0430\u0440\u044c_\u0444\u0435\u0432\u0440\u0430\u043b\u044c_\u043c\u0430\u0440\u0442_\u0430\u043f\u0440\u0435\u043b\u044c_\u043c\u0430\u0439_\u0438\u044e\u043d\u044c_\u0438\u044e\u043b\u044c_\u0430\u0432\u0433\u0443\u0441\u0442_\u0441\u0435\u043d\u0442\u044f\u0431\u0440\u044c_\u043e\u043a\u0442\u044f\u0431\u0440\u044c_\u043d\u043e\u044f\u0431\u0440\u044c_\u0434\u0435\u043a\u0430\u0431\u0440\u044c".split("_"),monthsShort:"\u044f\u043d\u0432_\u0444\u0435\u0432_\u043c\u0430\u0440\u0442_\u0430\u043f\u0440_\u043c\u0430\u0439_\u0438\u044e\u043d\u044c_\u0438\u044e\u043b\u044c_\u0430\u0432\u0433_\u0441\u0435\u043d_\u043e\u043a\u0442_\u043d\u043e\u044f_\u0434\u0435\u043a".split("_"),weekdays:"\u0416\u0435\u043a\u0448\u0435\u043c\u0431\u0438_\u0414\u04af\u0439\u0448\u04e9\u043c\u0431\u04af_\u0428\u0435\u0439\u0448\u0435\u043c\u0431\u0438_\u0428\u0430\u0440\u0448\u0435\u043c\u0431\u0438_\u0411\u0435\u0439\u0448\u0435\u043c\u0431\u0438_\u0416\u0443\u043c\u0430_\u0418\u0448\u0435\u043c\u0431\u0438".split("_"),weekdaysShort:"\u0416\u0435\u043a_\u0414\u04af\u0439_\u0428\u0435\u0439_\u0428\u0430\u0440_\u0411\u0435\u0439_\u0416\u0443\u043c_\u0418\u0448\u0435".split("_"),weekdaysMin:"\u0416\u043a_\u0414\u0439_\u0428\u0439_\u0428\u0440_\u0411\u0439_\u0416\u043c_\u0418\u0448".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:"[\u0411\u04af\u0433\u04af\u043d \u0441\u0430\u0430\u0442] LT",nextDay:"[\u042d\u0440\u0442\u0435\u04a3 \u0441\u0430\u0430\u0442] LT",nextWeek:"dddd [\u0441\u0430\u0430\u0442] LT",lastDay:"[\u041a\u0435\u0447\u044d\u044d \u0441\u0430\u0430\u0442] LT",lastWeek:"[\u04e8\u0442\u043a\u04e9\u043d \u0430\u043f\u0442\u0430\u043d\u044b\u043d] dddd [\u043a\u04af\u043d\u04af] [\u0441\u0430\u0430\u0442] LT",sameElse:"L"},relativeTime:{future:"%s \u0438\u0447\u0438\u043d\u0434\u0435",past:"%s \u043c\u0443\u0440\u0443\u043d",s:"\u0431\u0438\u0440\u043d\u0435\u0447\u0435 \u0441\u0435\u043a\u0443\u043d\u0434",ss:"%d \u0441\u0435\u043a\u0443\u043d\u0434",m:"\u0431\u0438\u0440 \u043c\u04af\u043d\u04e9\u0442",mm:"%d \u043c\u04af\u043d\u04e9\u0442",h:"\u0431\u0438\u0440 \u0441\u0430\u0430\u0442",hh:"%d \u0441\u0430\u0430\u0442",d:"\u0431\u0438\u0440 \u043a\u04af\u043d",dd:"%d \u043a\u04af\u043d",M:"\u0431\u0438\u0440 \u0430\u0439",MM:"%d \u0430\u0439",y:"\u0431\u0438\u0440 \u0436\u044b\u043b",yy:"%d \u0436\u044b\u043b"},dayOfMonthOrdinalParse:/\d{1,2}-(\u0447\u0438|\u0447\u044b|\u0447\u04af|\u0447\u0443)/,ordinal:function(e){return e+(ln[e]||ln[e%10]||ln[100<=e?100:null])},week:{dow:1,doy:7}}),l.defineLocale("lb",{months:"Januar_Februar_M\xe4erz_Abr\xebll_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\xe9indeg_D\xebnschdeg_M\xebttwoch_Donneschdeg_Freideg_Samschdeg".split("_"),weekdaysShort:"So._M\xe9._D\xeb._M\xeb._Do._Fr._Sa.".split("_"),weekdaysMin:"So_M\xe9_D\xeb_M\xeb_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\xebschter 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 hn(e.substr(0,e.indexOf(" ")))?"a "+e:"an "+e},past:function(e){return hn(e.substr(0,e.indexOf(" ")))?"viru "+e:"virun "+e},s:"e puer Sekonnen",ss:"%d Sekonnen",m:Mn,mm:"%d Minutten",h:Mn,hh:"%d Stonnen",d:Mn,dd:"%d Deeg",M:Mn,MM:"%d M\xe9int",y:Mn,yy:"%d Joer"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}}),l.defineLocale("lo",{months:"\u0ea1\u0eb1\u0e87\u0e81\u0ead\u0e99_\u0e81\u0eb8\u0ea1\u0e9e\u0eb2_\u0ea1\u0eb5\u0e99\u0eb2_\u0ec0\u0ea1\u0eaa\u0eb2_\u0e9e\u0eb6\u0e94\u0eaa\u0eb0\u0e9e\u0eb2_\u0ea1\u0eb4\u0e96\u0eb8\u0e99\u0eb2_\u0e81\u0ecd\u0ea5\u0eb0\u0e81\u0ebb\u0e94_\u0eaa\u0eb4\u0e87\u0eab\u0eb2_\u0e81\u0eb1\u0e99\u0e8d\u0eb2_\u0e95\u0eb8\u0ea5\u0eb2_\u0e9e\u0eb0\u0e88\u0eb4\u0e81_\u0e97\u0eb1\u0e99\u0ea7\u0eb2".split("_"),monthsShort:"\u0ea1\u0eb1\u0e87\u0e81\u0ead\u0e99_\u0e81\u0eb8\u0ea1\u0e9e\u0eb2_\u0ea1\u0eb5\u0e99\u0eb2_\u0ec0\u0ea1\u0eaa\u0eb2_\u0e9e\u0eb6\u0e94\u0eaa\u0eb0\u0e9e\u0eb2_\u0ea1\u0eb4\u0e96\u0eb8\u0e99\u0eb2_\u0e81\u0ecd\u0ea5\u0eb0\u0e81\u0ebb\u0e94_\u0eaa\u0eb4\u0e87\u0eab\u0eb2_\u0e81\u0eb1\u0e99\u0e8d\u0eb2_\u0e95\u0eb8\u0ea5\u0eb2_\u0e9e\u0eb0\u0e88\u0eb4\u0e81_\u0e97\u0eb1\u0e99\u0ea7\u0eb2".split("_"),weekdays:"\u0ead\u0eb2\u0e97\u0eb4\u0e94_\u0e88\u0eb1\u0e99_\u0ead\u0eb1\u0e87\u0e84\u0eb2\u0e99_\u0e9e\u0eb8\u0e94_\u0e9e\u0eb0\u0eab\u0eb1\u0e94_\u0eaa\u0eb8\u0e81_\u0ec0\u0eaa\u0ebb\u0eb2".split("_"),weekdaysShort:"\u0e97\u0eb4\u0e94_\u0e88\u0eb1\u0e99_\u0ead\u0eb1\u0e87\u0e84\u0eb2\u0e99_\u0e9e\u0eb8\u0e94_\u0e9e\u0eb0\u0eab\u0eb1\u0e94_\u0eaa\u0eb8\u0e81_\u0ec0\u0eaa\u0ebb\u0eb2".split("_"),weekdaysMin:"\u0e97_\u0e88_\u0ead\u0e84_\u0e9e_\u0e9e\u0eab_\u0eaa\u0e81_\u0eaa".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:"\u0ea7\u0eb1\u0e99dddd D MMMM YYYY HH:mm"},meridiemParse:/\u0e95\u0ead\u0e99\u0ec0\u0e8a\u0ebb\u0ec9\u0eb2|\u0e95\u0ead\u0e99\u0ec1\u0ea5\u0e87/,isPM:function(e){return"\u0e95\u0ead\u0e99\u0ec1\u0ea5\u0e87"===e},meridiem:function(e,a,t){return e<12?"\u0e95\u0ead\u0e99\u0ec0\u0e8a\u0ebb\u0ec9\u0eb2":"\u0e95\u0ead\u0e99\u0ec1\u0ea5\u0e87"},calendar:{sameDay:"[\u0ea1\u0eb7\u0ec9\u0e99\u0eb5\u0ec9\u0ec0\u0ea7\u0ea5\u0eb2] LT",nextDay:"[\u0ea1\u0eb7\u0ec9\u0ead\u0eb7\u0ec8\u0e99\u0ec0\u0ea7\u0ea5\u0eb2] LT",nextWeek:"[\u0ea7\u0eb1\u0e99]dddd[\u0edc\u0ec9\u0eb2\u0ec0\u0ea7\u0ea5\u0eb2] LT",lastDay:"[\u0ea1\u0eb7\u0ec9\u0ea7\u0eb2\u0e99\u0e99\u0eb5\u0ec9\u0ec0\u0ea7\u0ea5\u0eb2] LT",lastWeek:"[\u0ea7\u0eb1\u0e99]dddd[\u0ec1\u0ea5\u0ec9\u0ea7\u0e99\u0eb5\u0ec9\u0ec0\u0ea7\u0ea5\u0eb2] LT",sameElse:"L"},relativeTime:{future:"\u0ead\u0eb5\u0e81 %s",past:"%s\u0e9c\u0ec8\u0eb2\u0e99\u0ea1\u0eb2",s:"\u0e9a\u0ecd\u0ec8\u0ec0\u0e97\u0ebb\u0ec8\u0eb2\u0ec3\u0e94\u0ea7\u0eb4\u0e99\u0eb2\u0e97\u0eb5",ss:"%d \u0ea7\u0eb4\u0e99\u0eb2\u0e97\u0eb5",m:"1 \u0e99\u0eb2\u0e97\u0eb5",mm:"%d \u0e99\u0eb2\u0e97\u0eb5",h:"1 \u0e8a\u0ebb\u0ec8\u0ea7\u0ec2\u0ea1\u0e87",hh:"%d \u0e8a\u0ebb\u0ec8\u0ea7\u0ec2\u0ea1\u0e87",d:"1 \u0ea1\u0eb7\u0ec9",dd:"%d \u0ea1\u0eb7\u0ec9",M:"1 \u0ec0\u0e94\u0eb7\u0ead\u0e99",MM:"%d \u0ec0\u0e94\u0eb7\u0ead\u0e99",y:"1 \u0e9b\u0eb5",yy:"%d \u0e9b\u0eb5"},dayOfMonthOrdinalParse:/(\u0e97\u0eb5\u0ec8)\d{1,2}/,ordinal:function(e){return"\u0e97\u0eb5\u0ec8"+e}});var Ln={ss:"sekund\u0117_sekund\u017ei\u0173_sekundes",m:"minut\u0117_minut\u0117s_minut\u0119",mm:"minut\u0117s_minu\u010di\u0173_minutes",h:"valanda_valandos_valand\u0105",hh:"valandos_valand\u0173_valandas",d:"diena_dienos_dien\u0105",dd:"dienos_dien\u0173_dienas",M:"m\u0117nuo_m\u0117nesio_m\u0117nes\u012f",MM:"m\u0117nesiai_m\u0117nesi\u0173_m\u0117nesius",y:"metai_met\u0173_metus",yy:"metai_met\u0173_metus"};function cn(e,a,t,s){return a?yn(t)[0]:s?yn(t)[1]:yn(t)[2]}function Yn(e){return e%10==0||10<e&&e<20}function yn(e){return Ln[e].split("_")}function fn(e,a,t,s){var n=e+" ";return 1===e?n+cn(0,a,t[0],s):a?n+(Yn(e)?yn(t)[1]:yn(t)[0]):s?n+yn(t)[1]:n+(Yn(e)?yn(t)[1]:yn(t)[2])}l.defineLocale("lt",{months:{format:"sausio_vasario_kovo_baland\u017eio_gegu\u017e\u0117s_bir\u017eelio_liepos_rugpj\u016b\u010dio_rugs\u0117jo_spalio_lapkri\u010dio_gruod\u017eio".split("_"),standalone:"sausis_vasaris_kovas_balandis_gegu\u017e\u0117_bir\u017eelis_liepa_rugpj\u016btis_rugs\u0117jis_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\u012f_pirmadien\u012f_antradien\u012f_tre\u010diadien\u012f_ketvirtadien\u012f_penktadien\u012f_\u0161e\u0161tadien\u012f".split("_"),standalone:"sekmadienis_pirmadienis_antradienis_tre\u010diadienis_ketvirtadienis_penktadienis_\u0161e\u0161tadienis".split("_"),isFormat:/dddd HH:mm/},weekdaysShort:"Sek_Pir_Ant_Tre_Ket_Pen_\u0160e\u0161".split("_"),weekdaysMin:"S_P_A_T_K_Pn_\u0160".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:"[\u0160iandien] LT",nextDay:"[Rytoj] LT",nextWeek:"dddd LT",lastDay:"[Vakar] LT",lastWeek:"[Pra\u0117jus\u012f] dddd LT",sameElse:"L"},relativeTime:{future:"po %s",past:"prie\u0161 %s",s:function(e,a,t,s){return a?"kelios sekund\u0117s":s?"keli\u0173 sekund\u017ei\u0173":"kelias sekundes"},ss:fn,m:cn,mm:fn,h:cn,hh:fn,d:cn,dd:fn,M:cn,MM:fn,y:cn,yy:fn},dayOfMonthOrdinalParse:/\d{1,2}-oji/,ordinal:function(e){return e+"-oji"},week:{dow:1,doy:4}});var kn={ss:"sekundes_sekund\u0113m_sekunde_sekundes".split("_"),m:"min\u016btes_min\u016bt\u0113m_min\u016bte_min\u016btes".split("_"),mm:"min\u016btes_min\u016bt\u0113m_min\u016bte_min\u016btes".split("_"),h:"stundas_stund\u0101m_stunda_stundas".split("_"),hh:"stundas_stund\u0101m_stunda_stundas".split("_"),d:"dienas_dien\u0101m_diena_dienas".split("_"),dd:"dienas_dien\u0101m_diena_dienas".split("_"),M:"m\u0113ne\u0161a_m\u0113ne\u0161iem_m\u0113nesis_m\u0113ne\u0161i".split("_"),MM:"m\u0113ne\u0161a_m\u0113ne\u0161iem_m\u0113nesis_m\u0113ne\u0161i".split("_"),y:"gada_gadiem_gads_gadi".split("_"),yy:"gada_gadiem_gads_gadi".split("_")};function pn(e,a,t){return t?a%10==1&&a%100!=11?e[2]:e[3]:a%10==1&&a%100!=11?e[0]:e[1]}function Dn(e,a,t){return e+" "+pn(kn[t],e,a)}function Tn(e,a,t){return pn(kn[t],e,a)}l.defineLocale("lv",{months:"janv\u0101ris_febru\u0101ris_marts_apr\u012blis_maijs_j\u016bnijs_j\u016blijs_augusts_septembris_oktobris_novembris_decembris".split("_"),monthsShort:"jan_feb_mar_apr_mai_j\u016bn_j\u016bl_aug_sep_okt_nov_dec".split("_"),weekdays:"sv\u0113tdiena_pirmdiena_otrdiena_tre\u0161diena_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:"[\u0160odien pulksten] LT",nextDay:"[R\u012bt pulksten] LT",nextWeek:"dddd [pulksten] LT",lastDay:"[Vakar pulksten] LT",lastWeek:"[Pag\u0101ju\u0161\u0101] dddd [pulksten] LT",sameElse:"L"},relativeTime:{future:"p\u0113c %s",past:"pirms %s",s:function(e,a){return a?"da\u017eas sekundes":"da\u017e\u0101m sekund\u0113m"},ss:Dn,m:Tn,mm:Dn,h:Tn,hh:Dn,d:Tn,dd:Dn,M:Tn,MM:Dn,y:Tn,yy:Dn},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});var gn={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,a){return 1===e?a[0]:2<=e&&e<=4?a[1]:a[2]},translate:function(e,a,t){var s=gn.words[t];return 1===t.length?a?s[0]:s[1]:e+" "+gn.correctGrammaticalCase(e,s)}};function wn(e,a,t,s){switch(t){case"s":return a?"\u0445\u044d\u0434\u0445\u044d\u043d \u0441\u0435\u043a\u0443\u043d\u0434":"\u0445\u044d\u0434\u0445\u044d\u043d \u0441\u0435\u043a\u0443\u043d\u0434\u044b\u043d";case"ss":return e+(a?" \u0441\u0435\u043a\u0443\u043d\u0434":" \u0441\u0435\u043a\u0443\u043d\u0434\u044b\u043d");case"m":case"mm":return e+(a?" \u043c\u0438\u043d\u0443\u0442":" \u043c\u0438\u043d\u0443\u0442\u044b\u043d");case"h":case"hh":return e+(a?" \u0446\u0430\u0433":" \u0446\u0430\u0433\u0438\u0439\u043d");case"d":case"dd":return e+(a?" \u04e9\u0434\u04e9\u0440":" \u04e9\u0434\u0440\u0438\u0439\u043d");case"M":case"MM":return e+(a?" \u0441\u0430\u0440":" \u0441\u0430\u0440\u044b\u043d");case"y":case"yy":return e+(a?" \u0436\u0438\u043b":" \u0436\u0438\u043b\u0438\u0439\u043d");default:return e}}l.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_\u010detvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sri._\u010det._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_\u010de_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\u010de u] LT",lastWeek:function(){return["[pro\u0161le] [nedjelje] [u] LT","[pro\u0161log] [ponedjeljka] [u] LT","[pro\u0161log] [utorka] [u] LT","[pro\u0161le] [srijede] [u] LT","[pro\u0161log] [\u010detvrtka] [u] LT","[pro\u0161log] [petka] [u] LT","[pro\u0161le] [subote] [u] LT"][this.day()]},sameElse:"L"},relativeTime:{future:"za %s",past:"prije %s",s:"nekoliko sekundi",ss:gn.translate,m:gn.translate,mm:gn.translate,h:gn.translate,hh:gn.translate,d:"dan",dd:gn.translate,M:"mjesec",MM:gn.translate,y:"godinu",yy:gn.translate},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}}),l.defineLocale("mi",{months:"Kohi-t\u0101te_Hui-tanguru_Pout\u016b-te-rangi_Paenga-wh\u0101wh\u0101_Haratua_Pipiri_H\u014dngoingoi_Here-turi-k\u014dk\u0101_Mahuru_Whiringa-\u0101-nuku_Whiringa-\u0101-rangi_Hakihea".split("_"),monthsShort:"Kohi_Hui_Pou_Pae_Hara_Pipi_H\u014dngoi_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\u0101tapu_Mane_T\u016brei_Wenerei_T\u0101ite_Paraire_H\u0101tarei".split("_"),weekdaysShort:"Ta_Ma_T\u016b_We_T\u0101i_Pa_H\u0101".split("_"),weekdaysMin:"Ta_Ma_T\u016b_We_T\u0101i_Pa_H\u0101".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\u0113kona ruarua",ss:"%d h\u0113kona",m:"he meneti",mm:"%d meneti",h:"te haora",hh:"%d haora",d:"he ra",dd:"%d ra",M:"he marama",MM:"%d marama",y:"he tau",yy:"%d tau"},dayOfMonthOrdinalParse:/\d{1,2}\xba/,ordinal:"%d\xba",week:{dow:1,doy:4}}),l.defineLocale("mk",{months:"\u0458\u0430\u043d\u0443\u0430\u0440\u0438_\u0444\u0435\u0432\u0440\u0443\u0430\u0440\u0438_\u043c\u0430\u0440\u0442_\u0430\u043f\u0440\u0438\u043b_\u043c\u0430\u0458_\u0458\u0443\u043d\u0438_\u0458\u0443\u043b\u0438_\u0430\u0432\u0433\u0443\u0441\u0442_\u0441\u0435\u043f\u0442\u0435\u043c\u0432\u0440\u0438_\u043e\u043a\u0442\u043e\u043c\u0432\u0440\u0438_\u043d\u043e\u0435\u043c\u0432\u0440\u0438_\u0434\u0435\u043a\u0435\u043c\u0432\u0440\u0438".split("_"),monthsShort:"\u0458\u0430\u043d_\u0444\u0435\u0432_\u043c\u0430\u0440_\u0430\u043f\u0440_\u043c\u0430\u0458_\u0458\u0443\u043d_\u0458\u0443\u043b_\u0430\u0432\u0433_\u0441\u0435\u043f_\u043e\u043a\u0442_\u043d\u043e\u0435_\u0434\u0435\u043a".split("_"),weekdays:"\u043d\u0435\u0434\u0435\u043b\u0430_\u043f\u043e\u043d\u0435\u0434\u0435\u043b\u043d\u0438\u043a_\u0432\u0442\u043e\u0440\u043d\u0438\u043a_\u0441\u0440\u0435\u0434\u0430_\u0447\u0435\u0442\u0432\u0440\u0442\u043e\u043a_\u043f\u0435\u0442\u043e\u043a_\u0441\u0430\u0431\u043e\u0442\u0430".split("_"),weekdaysShort:"\u043d\u0435\u0434_\u043f\u043e\u043d_\u0432\u0442\u043e_\u0441\u0440\u0435_\u0447\u0435\u0442_\u043f\u0435\u0442_\u0441\u0430\u0431".split("_"),weekdaysMin:"\u043de_\u043fo_\u0432\u0442_\u0441\u0440_\u0447\u0435_\u043f\u0435_\u0441a".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:"[\u0414\u0435\u043d\u0435\u0441 \u0432\u043e] LT",nextDay:"[\u0423\u0442\u0440\u0435 \u0432\u043e] LT",nextWeek:"[\u0412\u043e] dddd [\u0432\u043e] LT",lastDay:"[\u0412\u0447\u0435\u0440\u0430 \u0432\u043e] LT",lastWeek:function(){switch(this.day()){case 0:case 3:case 6:return"[\u0418\u0437\u043c\u0438\u043d\u0430\u0442\u0430\u0442\u0430] dddd [\u0432\u043e] LT";case 1:case 2:case 4:case 5:return"[\u0418\u0437\u043c\u0438\u043d\u0430\u0442\u0438\u043e\u0442] dddd [\u0432\u043e] LT"}},sameElse:"L"},relativeTime:{future:"\u043f\u043e\u0441\u043b\u0435 %s",past:"\u043f\u0440\u0435\u0434 %s",s:"\u043d\u0435\u043a\u043e\u043b\u043a\u0443 \u0441\u0435\u043a\u0443\u043d\u0434\u0438",ss:"%d \u0441\u0435\u043a\u0443\u043d\u0434\u0438",m:"\u043c\u0438\u043d\u0443\u0442\u0430",mm:"%d \u043c\u0438\u043d\u0443\u0442\u0438",h:"\u0447\u0430\u0441",hh:"%d \u0447\u0430\u0441\u0430",d:"\u0434\u0435\u043d",dd:"%d \u0434\u0435\u043d\u0430",M:"\u043c\u0435\u0441\u0435\u0446",MM:"%d \u043c\u0435\u0441\u0435\u0446\u0438",y:"\u0433\u043e\u0434\u0438\u043d\u0430",yy:"%d \u0433\u043e\u0434\u0438\u043d\u0438"},dayOfMonthOrdinalParse:/\d{1,2}-(\u0435\u0432|\u0435\u043d|\u0442\u0438|\u0432\u0438|\u0440\u0438|\u043c\u0438)/,ordinal:function(e){var a=e%10,t=e%100;return 0===e?e+"-\u0435\u0432":0===t?e+"-\u0435\u043d":10<t&&t<20?e+"-\u0442\u0438":1===a?e+"-\u0432\u0438":2===a?e+"-\u0440\u0438":7===a||8===a?e+"-\u043c\u0438":e+"-\u0442\u0438"},week:{dow:1,doy:7}}),l.defineLocale("ml",{months:"\u0d1c\u0d28\u0d41\u0d35\u0d30\u0d3f_\u0d2b\u0d46\u0d2c\u0d4d\u0d30\u0d41\u0d35\u0d30\u0d3f_\u0d2e\u0d3e\u0d7c\u0d1a\u0d4d\u0d1a\u0d4d_\u0d0f\u0d2a\u0d4d\u0d30\u0d3f\u0d7d_\u0d2e\u0d47\u0d2f\u0d4d_\u0d1c\u0d42\u0d7a_\u0d1c\u0d42\u0d32\u0d48_\u0d13\u0d17\u0d38\u0d4d\u0d31\u0d4d\u0d31\u0d4d_\u0d38\u0d46\u0d2a\u0d4d\u0d31\u0d4d\u0d31\u0d02\u0d2c\u0d7c_\u0d12\u0d15\u0d4d\u0d1f\u0d4b\u0d2c\u0d7c_\u0d28\u0d35\u0d02\u0d2c\u0d7c_\u0d21\u0d3f\u0d38\u0d02\u0d2c\u0d7c".split("_"),monthsShort:"\u0d1c\u0d28\u0d41._\u0d2b\u0d46\u0d2c\u0d4d\u0d30\u0d41._\u0d2e\u0d3e\u0d7c._\u0d0f\u0d2a\u0d4d\u0d30\u0d3f._\u0d2e\u0d47\u0d2f\u0d4d_\u0d1c\u0d42\u0d7a_\u0d1c\u0d42\u0d32\u0d48._\u0d13\u0d17._\u0d38\u0d46\u0d2a\u0d4d\u0d31\u0d4d\u0d31._\u0d12\u0d15\u0d4d\u0d1f\u0d4b._\u0d28\u0d35\u0d02._\u0d21\u0d3f\u0d38\u0d02.".split("_"),monthsParseExact:!0,weekdays:"\u0d1e\u0d3e\u0d2f\u0d31\u0d3e\u0d34\u0d4d\u0d1a_\u0d24\u0d3f\u0d19\u0d4d\u0d15\u0d33\u0d3e\u0d34\u0d4d\u0d1a_\u0d1a\u0d4a\u0d35\u0d4d\u0d35\u0d3e\u0d34\u0d4d\u0d1a_\u0d2c\u0d41\u0d27\u0d28\u0d3e\u0d34\u0d4d\u0d1a_\u0d35\u0d4d\u0d2f\u0d3e\u0d34\u0d3e\u0d34\u0d4d\u0d1a_\u0d35\u0d46\u0d33\u0d4d\u0d33\u0d3f\u0d2f\u0d3e\u0d34\u0d4d\u0d1a_\u0d36\u0d28\u0d3f\u0d2f\u0d3e\u0d34\u0d4d\u0d1a".split("_"),weekdaysShort:"\u0d1e\u0d3e\u0d2f\u0d7c_\u0d24\u0d3f\u0d19\u0d4d\u0d15\u0d7e_\u0d1a\u0d4a\u0d35\u0d4d\u0d35_\u0d2c\u0d41\u0d27\u0d7b_\u0d35\u0d4d\u0d2f\u0d3e\u0d34\u0d02_\u0d35\u0d46\u0d33\u0d4d\u0d33\u0d3f_\u0d36\u0d28\u0d3f".split("_"),weekdaysMin:"\u0d1e\u0d3e_\u0d24\u0d3f_\u0d1a\u0d4a_\u0d2c\u0d41_\u0d35\u0d4d\u0d2f\u0d3e_\u0d35\u0d46_\u0d36".split("_"),longDateFormat:{LT:"A h:mm -\u0d28\u0d41",LTS:"A h:mm:ss -\u0d28\u0d41",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm -\u0d28\u0d41",LLLL:"dddd, D MMMM YYYY, A h:mm -\u0d28\u0d41"},calendar:{sameDay:"[\u0d07\u0d28\u0d4d\u0d28\u0d4d] LT",nextDay:"[\u0d28\u0d3e\u0d33\u0d46] LT",nextWeek:"dddd, LT",lastDay:"[\u0d07\u0d28\u0d4d\u0d28\u0d32\u0d46] LT",lastWeek:"[\u0d15\u0d34\u0d3f\u0d1e\u0d4d\u0d1e] dddd, LT",sameElse:"L"},relativeTime:{future:"%s \u0d15\u0d34\u0d3f\u0d1e\u0d4d\u0d1e\u0d4d",past:"%s \u0d2e\u0d41\u0d7b\u0d2a\u0d4d",s:"\u0d05\u0d7d\u0d2a \u0d28\u0d3f\u0d2e\u0d3f\u0d37\u0d19\u0d4d\u0d19\u0d7e",ss:"%d \u0d38\u0d46\u0d15\u0d4d\u0d15\u0d7b\u0d21\u0d4d",m:"\u0d12\u0d30\u0d41 \u0d2e\u0d3f\u0d28\u0d3f\u0d31\u0d4d\u0d31\u0d4d",mm:"%d \u0d2e\u0d3f\u0d28\u0d3f\u0d31\u0d4d\u0d31\u0d4d",h:"\u0d12\u0d30\u0d41 \u0d2e\u0d23\u0d3f\u0d15\u0d4d\u0d15\u0d42\u0d7c",hh:"%d \u0d2e\u0d23\u0d3f\u0d15\u0d4d\u0d15\u0d42\u0d7c",d:"\u0d12\u0d30\u0d41 \u0d26\u0d3f\u0d35\u0d38\u0d02",dd:"%d \u0d26\u0d3f\u0d35\u0d38\u0d02",M:"\u0d12\u0d30\u0d41 \u0d2e\u0d3e\u0d38\u0d02",MM:"%d \u0d2e\u0d3e\u0d38\u0d02",y:"\u0d12\u0d30\u0d41 \u0d35\u0d7c\u0d37\u0d02",yy:"%d \u0d35\u0d7c\u0d37\u0d02"},meridiemParse:/\u0d30\u0d3e\u0d24\u0d4d\u0d30\u0d3f|\u0d30\u0d3e\u0d35\u0d3f\u0d32\u0d46|\u0d09\u0d1a\u0d4d\u0d1a \u0d15\u0d34\u0d3f\u0d1e\u0d4d\u0d1e\u0d4d|\u0d35\u0d48\u0d15\u0d41\u0d28\u0d4d\u0d28\u0d47\u0d30\u0d02|\u0d30\u0d3e\u0d24\u0d4d\u0d30\u0d3f/i,meridiemHour:function(e,a){return 12===e&&(e=0),"\u0d30\u0d3e\u0d24\u0d4d\u0d30\u0d3f"===a&&4<=e||"\u0d09\u0d1a\u0d4d\u0d1a \u0d15\u0d34\u0d3f\u0d1e\u0d4d\u0d1e\u0d4d"===a||"\u0d35\u0d48\u0d15\u0d41\u0d28\u0d4d\u0d28\u0d47\u0d30\u0d02"===a?e+12:e},meridiem:function(e,a,t){return e<4?"\u0d30\u0d3e\u0d24\u0d4d\u0d30\u0d3f":e<12?"\u0d30\u0d3e\u0d35\u0d3f\u0d32\u0d46":e<17?"\u0d09\u0d1a\u0d4d\u0d1a \u0d15\u0d34\u0d3f\u0d1e\u0d4d\u0d1e\u0d4d":e<20?"\u0d35\u0d48\u0d15\u0d41\u0d28\u0d4d\u0d28\u0d47\u0d30\u0d02":"\u0d30\u0d3e\u0d24\u0d4d\u0d30\u0d3f"}}),l.defineLocale("mn",{months:"\u041d\u044d\u0433\u0434\u04af\u0433\u044d\u044d\u0440 \u0441\u0430\u0440_\u0425\u043e\u0451\u0440\u0434\u0443\u0433\u0430\u0430\u0440 \u0441\u0430\u0440_\u0413\u0443\u0440\u0430\u0432\u0434\u0443\u0433\u0430\u0430\u0440 \u0441\u0430\u0440_\u0414\u04e9\u0440\u04e9\u0432\u0434\u04af\u0433\u044d\u044d\u0440 \u0441\u0430\u0440_\u0422\u0430\u0432\u0434\u0443\u0433\u0430\u0430\u0440 \u0441\u0430\u0440_\u0417\u0443\u0440\u0433\u0430\u0434\u0443\u0433\u0430\u0430\u0440 \u0441\u0430\u0440_\u0414\u043e\u043b\u0434\u0443\u0433\u0430\u0430\u0440 \u0441\u0430\u0440_\u041d\u0430\u0439\u043c\u0434\u0443\u0433\u0430\u0430\u0440 \u0441\u0430\u0440_\u0415\u0441\u0434\u04af\u0433\u044d\u044d\u0440 \u0441\u0430\u0440_\u0410\u0440\u0430\u0432\u0434\u0443\u0433\u0430\u0430\u0440 \u0441\u0430\u0440_\u0410\u0440\u0432\u0430\u043d \u043d\u044d\u0433\u0434\u04af\u0433\u044d\u044d\u0440 \u0441\u0430\u0440_\u0410\u0440\u0432\u0430\u043d \u0445\u043e\u0451\u0440\u0434\u0443\u0433\u0430\u0430\u0440 \u0441\u0430\u0440".split("_"),monthsShort:"1 \u0441\u0430\u0440_2 \u0441\u0430\u0440_3 \u0441\u0430\u0440_4 \u0441\u0430\u0440_5 \u0441\u0430\u0440_6 \u0441\u0430\u0440_7 \u0441\u0430\u0440_8 \u0441\u0430\u0440_9 \u0441\u0430\u0440_10 \u0441\u0430\u0440_11 \u0441\u0430\u0440_12 \u0441\u0430\u0440".split("_"),monthsParseExact:!0,weekdays:"\u041d\u044f\u043c_\u0414\u0430\u0432\u0430\u0430_\u041c\u044f\u0433\u043c\u0430\u0440_\u041b\u0445\u0430\u0433\u0432\u0430_\u041f\u04af\u0440\u044d\u0432_\u0411\u0430\u0430\u0441\u0430\u043d_\u0411\u044f\u043c\u0431\u0430".split("_"),weekdaysShort:"\u041d\u044f\u043c_\u0414\u0430\u0432_\u041c\u044f\u0433_\u041b\u0445\u0430_\u041f\u04af\u0440_\u0411\u0430\u0430_\u0411\u044f\u043c".split("_"),weekdaysMin:"\u041d\u044f_\u0414\u0430_\u041c\u044f_\u041b\u0445_\u041f\u04af_\u0411\u0430_\u0411\u044f".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"YYYY \u043e\u043d\u044b MMMM\u044b\u043d D",LLL:"YYYY \u043e\u043d\u044b MMMM\u044b\u043d D HH:mm",LLLL:"dddd, YYYY \u043e\u043d\u044b MMMM\u044b\u043d D HH:mm"},meridiemParse:/\u04ae\u04e8|\u04ae\u0425/i,isPM:function(e){return"\u04ae\u0425"===e},meridiem:function(e,a,t){return e<12?"\u04ae\u04e8":"\u04ae\u0425"},calendar:{sameDay:"[\u04e8\u043d\u04e9\u04e9\u0434\u04e9\u0440] LT",nextDay:"[\u041c\u0430\u0440\u0433\u0430\u0430\u0448] LT",nextWeek:"[\u0418\u0440\u044d\u0445] dddd LT",lastDay:"[\u04e8\u0447\u0438\u0433\u0434\u04e9\u0440] LT",lastWeek:"[\u04e8\u043d\u0433\u04e9\u0440\u0441\u04e9\u043d] dddd LT",sameElse:"L"},relativeTime:{future:"%s \u0434\u0430\u0440\u0430\u0430",past:"%s \u04e9\u043c\u043d\u04e9",s:wn,ss:wn,m:wn,mm:wn,h:wn,hh:wn,d:wn,dd:wn,M:wn,MM:wn,y:wn,yy:wn},dayOfMonthOrdinalParse:/\d{1,2} \u04e9\u0434\u04e9\u0440/,ordinal:function(e,a){switch(a){case"d":case"D":case"DDD":return e+" \u04e9\u0434\u04e9\u0440";default:return e}}});var vn={1:"\u0967",2:"\u0968",3:"\u0969",4:"\u096a",5:"\u096b",6:"\u096c",7:"\u096d",8:"\u096e",9:"\u096f",0:"\u0966"},Sn={"\u0967":"1","\u0968":"2","\u0969":"3","\u096a":"4","\u096b":"5","\u096c":"6","\u096d":"7","\u096e":"8","\u096f":"9","\u0966":"0"};function Hn(e,a,t,s){var n="";if(a)switch(t){case"s":n="\u0915\u093e\u0939\u0940 \u0938\u0947\u0915\u0902\u0926";break;case"ss":n="%d \u0938\u0947\u0915\u0902\u0926";break;case"m":n="\u090f\u0915 \u092e\u093f\u0928\u093f\u091f";break;case"mm":n="%d \u092e\u093f\u0928\u093f\u091f\u0947";break;case"h":n="\u090f\u0915 \u0924\u093e\u0938";break;case"hh":n="%d \u0924\u093e\u0938";break;case"d":n="\u090f\u0915 \u0926\u093f\u0935\u0938";break;case"dd":n="%d \u0926\u093f\u0935\u0938";break;case"M":n="\u090f\u0915 \u092e\u0939\u093f\u0928\u093e";break;case"MM":n="%d \u092e\u0939\u093f\u0928\u0947";break;case"y":n="\u090f\u0915 \u0935\u0930\u094d\u0937";break;case"yy":n="%d \u0935\u0930\u094d\u0937\u0947";break}else switch(t){case"s":n="\u0915\u093e\u0939\u0940 \u0938\u0947\u0915\u0902\u0926\u093e\u0902";break;case"ss":n="%d \u0938\u0947\u0915\u0902\u0926\u093e\u0902";break;case"m":n="\u090f\u0915\u093e \u092e\u093f\u0928\u093f\u091f\u093e";break;case"mm":n="%d \u092e\u093f\u0928\u093f\u091f\u093e\u0902";break;case"h":n="\u090f\u0915\u093e \u0924\u093e\u0938\u093e";break;case"hh":n="%d \u0924\u093e\u0938\u093e\u0902";break;case"d":n="\u090f\u0915\u093e \u0926\u093f\u0935\u0938\u093e";break;case"dd":n="%d \u0926\u093f\u0935\u0938\u093e\u0902";break;case"M":n="\u090f\u0915\u093e \u092e\u0939\u093f\u0928\u094d\u092f\u093e";break;case"MM":n="%d \u092e\u0939\u093f\u0928\u094d\u092f\u093e\u0902";break;case"y":n="\u090f\u0915\u093e \u0935\u0930\u094d\u0937\u093e";break;case"yy":n="%d \u0935\u0930\u094d\u0937\u093e\u0902";break}return n.replace(/%d/i,e)}l.defineLocale("mr",{months:"\u091c\u093e\u0928\u0947\u0935\u093e\u0930\u0940_\u092b\u0947\u092c\u094d\u0930\u0941\u0935\u093e\u0930\u0940_\u092e\u093e\u0930\u094d\u091a_\u090f\u092a\u094d\u0930\u093f\u0932_\u092e\u0947_\u091c\u0942\u0928_\u091c\u0941\u0932\u0948_\u0911\u0917\u0938\u094d\u091f_\u0938\u092a\u094d\u091f\u0947\u0902\u092c\u0930_\u0911\u0915\u094d\u091f\u094b\u092c\u0930_\u0928\u094b\u0935\u094d\u0939\u0947\u0902\u092c\u0930_\u0921\u093f\u0938\u0947\u0902\u092c\u0930".split("_"),monthsShort:"\u091c\u093e\u0928\u0947._\u092b\u0947\u092c\u094d\u0930\u0941._\u092e\u093e\u0930\u094d\u091a._\u090f\u092a\u094d\u0930\u093f._\u092e\u0947._\u091c\u0942\u0928._\u091c\u0941\u0932\u0948._\u0911\u0917._\u0938\u092a\u094d\u091f\u0947\u0902._\u0911\u0915\u094d\u091f\u094b._\u0928\u094b\u0935\u094d\u0939\u0947\u0902._\u0921\u093f\u0938\u0947\u0902.".split("_"),monthsParseExact:!0,weekdays:"\u0930\u0935\u093f\u0935\u093e\u0930_\u0938\u094b\u092e\u0935\u093e\u0930_\u092e\u0902\u0917\u0933\u0935\u093e\u0930_\u092c\u0941\u0927\u0935\u093e\u0930_\u0917\u0941\u0930\u0942\u0935\u093e\u0930_\u0936\u0941\u0915\u094d\u0930\u0935\u093e\u0930_\u0936\u0928\u093f\u0935\u093e\u0930".split("_"),weekdaysShort:"\u0930\u0935\u093f_\u0938\u094b\u092e_\u092e\u0902\u0917\u0933_\u092c\u0941\u0927_\u0917\u0941\u0930\u0942_\u0936\u0941\u0915\u094d\u0930_\u0936\u0928\u093f".split("_"),weekdaysMin:"\u0930_\u0938\u094b_\u092e\u0902_\u092c\u0941_\u0917\u0941_\u0936\u0941_\u0936".split("_"),longDateFormat:{LT:"A h:mm \u0935\u093e\u091c\u0924\u093e",LTS:"A h:mm:ss \u0935\u093e\u091c\u0924\u093e",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm \u0935\u093e\u091c\u0924\u093e",LLLL:"dddd, D MMMM YYYY, A h:mm \u0935\u093e\u091c\u0924\u093e"},calendar:{sameDay:"[\u0906\u091c] LT",nextDay:"[\u0909\u0926\u094d\u092f\u093e] LT",nextWeek:"dddd, LT",lastDay:"[\u0915\u093e\u0932] LT",lastWeek:"[\u092e\u093e\u0917\u0940\u0932] dddd, LT",sameElse:"L"},relativeTime:{future:"%s\u092e\u0927\u094d\u092f\u0947",past:"%s\u092a\u0942\u0930\u094d\u0935\u0940",s:Hn,ss:Hn,m:Hn,mm:Hn,h:Hn,hh:Hn,d:Hn,dd:Hn,M:Hn,MM:Hn,y:Hn,yy:Hn},preparse:function(e){return e.replace(/[\u0967\u0968\u0969\u096a\u096b\u096c\u096d\u096e\u096f\u0966]/g,function(e){return Sn[e]})},postformat:function(e){return e.replace(/\d/g,function(e){return vn[e]})},meridiemParse:/\u0930\u093e\u0924\u094d\u0930\u0940|\u0938\u0915\u093e\u0933\u0940|\u0926\u0941\u092a\u093e\u0930\u0940|\u0938\u093e\u092f\u0902\u0915\u093e\u0933\u0940/,meridiemHour:function(e,a){return 12===e&&(e=0),"\u0930\u093e\u0924\u094d\u0930\u0940"===a?e<4?e:e+12:"\u0938\u0915\u093e\u0933\u0940"===a?e:"\u0926\u0941\u092a\u093e\u0930\u0940"===a?10<=e?e:e+12:"\u0938\u093e\u092f\u0902\u0915\u093e\u0933\u0940"===a?e+12:void 0},meridiem:function(e,a,t){return e<4?"\u0930\u093e\u0924\u094d\u0930\u0940":e<10?"\u0938\u0915\u093e\u0933\u0940":e<17?"\u0926\u0941\u092a\u093e\u0930\u0940":e<20?"\u0938\u093e\u092f\u0902\u0915\u093e\u0933\u0940":"\u0930\u093e\u0924\u094d\u0930\u0940"},week:{dow:0,doy:6}}),l.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,a){return 12===e&&(e=0),"pagi"===a?e:"tengahari"===a?11<=e?e:e+12:"petang"===a||"malam"===a?e+12:void 0},meridiem:function(e,a,t){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}}),l.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,a){return 12===e&&(e=0),"pagi"===a?e:"tengahari"===a?11<=e?e:e+12:"petang"===a||"malam"===a?e+12:void 0},meridiem:function(e,a,t){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}}),l.defineLocale("mt",{months:"Jannar_Frar_Marzu_April_Mejju_\u0120unju_Lulju_Awwissu_Settembru_Ottubru_Novembru_Di\u010bembru".split("_"),monthsShort:"Jan_Fra_Mar_Apr_Mej_\u0120un_Lul_Aww_Set_Ott_Nov_Di\u010b".split("_"),weekdays:"Il-\u0126add_It-Tnejn_It-Tlieta_L-Erbg\u0127a_Il-\u0126amis_Il-\u0120img\u0127a_Is-Sibt".split("_"),weekdaysShort:"\u0126ad_Tne_Tli_Erb_\u0126am_\u0120im_Sib".split("_"),weekdaysMin:"\u0126a_Tn_Tl_Er_\u0126a_\u0120i_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\u0127ada fil-]LT",nextWeek:"dddd [fil-]LT",lastDay:"[Il-biera\u0127 fil-]LT",lastWeek:"dddd [li g\u0127adda] [fil-]LT",sameElse:"L"},relativeTime:{future:"f\u2019 %s",past:"%s ilu",s:"ftit sekondi",ss:"%d sekondi",m:"minuta",mm:"%d minuti",h:"sieg\u0127a",hh:"%d sieg\u0127at",d:"\u0121urnata",dd:"%d \u0121ranet",M:"xahar",MM:"%d xhur",y:"sena",yy:"%d sni"},dayOfMonthOrdinalParse:/\d{1,2}\xba/,ordinal:"%d\xba",week:{dow:1,doy:4}});var bn={1:"\u1041",2:"\u1042",3:"\u1043",4:"\u1044",5:"\u1045",6:"\u1046",7:"\u1047",8:"\u1048",9:"\u1049",0:"\u1040"},jn={"\u1041":"1","\u1042":"2","\u1043":"3","\u1044":"4","\u1045":"5","\u1046":"6","\u1047":"7","\u1048":"8","\u1049":"9","\u1040":"0"};l.defineLocale("my",{months:"\u1007\u1014\u103a\u1014\u101d\u102b\u101b\u102e_\u1016\u1031\u1016\u1031\u102c\u103a\u101d\u102b\u101b\u102e_\u1019\u1010\u103a_\u1027\u1015\u103c\u102e_\u1019\u1031_\u1007\u103d\u1014\u103a_\u1007\u1030\u101c\u102d\u102f\u1004\u103a_\u101e\u103c\u1002\u102f\u1010\u103a_\u1005\u1000\u103a\u1010\u1004\u103a\u1018\u102c_\u1021\u1031\u102c\u1000\u103a\u1010\u102d\u102f\u1018\u102c_\u1014\u102d\u102f\u101d\u1004\u103a\u1018\u102c_\u1012\u102e\u1007\u1004\u103a\u1018\u102c".split("_"),monthsShort:"\u1007\u1014\u103a_\u1016\u1031_\u1019\u1010\u103a_\u1015\u103c\u102e_\u1019\u1031_\u1007\u103d\u1014\u103a_\u101c\u102d\u102f\u1004\u103a_\u101e\u103c_\u1005\u1000\u103a_\u1021\u1031\u102c\u1000\u103a_\u1014\u102d\u102f_\u1012\u102e".split("_"),weekdays:"\u1010\u1014\u1004\u103a\u1039\u1002\u1014\u103d\u1031_\u1010\u1014\u1004\u103a\u1039\u101c\u102c_\u1021\u1004\u103a\u1039\u1002\u102b_\u1017\u102f\u1012\u1039\u1013\u101f\u1030\u1038_\u1000\u103c\u102c\u101e\u1015\u1010\u1031\u1038_\u101e\u1031\u102c\u1000\u103c\u102c_\u1005\u1014\u1031".split("_"),weekdaysShort:"\u1014\u103d\u1031_\u101c\u102c_\u1002\u102b_\u101f\u1030\u1038_\u1000\u103c\u102c_\u101e\u1031\u102c_\u1014\u1031".split("_"),weekdaysMin:"\u1014\u103d\u1031_\u101c\u102c_\u1002\u102b_\u101f\u1030\u1038_\u1000\u103c\u102c_\u101e\u1031\u102c_\u1014\u1031".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:"[\u101a\u1014\u1031.] LT [\u1019\u103e\u102c]",nextDay:"[\u1019\u1014\u1000\u103a\u1016\u103c\u1014\u103a] LT [\u1019\u103e\u102c]",nextWeek:"dddd LT [\u1019\u103e\u102c]",lastDay:"[\u1019\u1014\u1031.\u1000] LT [\u1019\u103e\u102c]",lastWeek:"[\u1015\u103c\u102e\u1038\u1001\u1032\u1037\u101e\u1031\u102c] dddd LT [\u1019\u103e\u102c]",sameElse:"L"},relativeTime:{future:"\u101c\u102c\u1019\u100a\u103a\u1037 %s \u1019\u103e\u102c",past:"\u101c\u103d\u1014\u103a\u1001\u1032\u1037\u101e\u1031\u102c %s \u1000",s:"\u1005\u1000\u1039\u1000\u1014\u103a.\u1021\u1014\u100a\u103a\u1038\u1004\u101a\u103a",ss:"%d \u1005\u1000\u1039\u1000\u1014\u1037\u103a",m:"\u1010\u1005\u103a\u1019\u102d\u1014\u1005\u103a",mm:"%d \u1019\u102d\u1014\u1005\u103a",h:"\u1010\u1005\u103a\u1014\u102c\u101b\u102e",hh:"%d \u1014\u102c\u101b\u102e",d:"\u1010\u1005\u103a\u101b\u1000\u103a",dd:"%d \u101b\u1000\u103a",M:"\u1010\u1005\u103a\u101c",MM:"%d \u101c",y:"\u1010\u1005\u103a\u1014\u103e\u1005\u103a",yy:"%d \u1014\u103e\u1005\u103a"},preparse:function(e){return e.replace(/[\u1041\u1042\u1043\u1044\u1045\u1046\u1047\u1048\u1049\u1040]/g,function(e){return jn[e]})},postformat:function(e){return e.replace(/\d/g,function(e){return bn[e]})},week:{dow:1,doy:4}}),l.defineLocale("nb",{months:"januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember".split("_"),monthsShort:"jan._feb._mars_april_mai_juni_juli_aug._sep._okt._nov._des.".split("_"),monthsParseExact:!0,weekdays:"s\xf8ndag_mandag_tirsdag_onsdag_torsdag_fredag_l\xf8rdag".split("_"),weekdaysShort:"s\xf8._ma._ti._on._to._fr._l\xf8.".split("_"),weekdaysMin:"s\xf8_ma_ti_on_to_fr_l\xf8".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\xe5r 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",M:"en m\xe5ned",MM:"%d m\xe5neder",y:"ett \xe5r",yy:"%d \xe5r"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});var xn={1:"\u0967",2:"\u0968",3:"\u0969",4:"\u096a",5:"\u096b",6:"\u096c",7:"\u096d",8:"\u096e",9:"\u096f",0:"\u0966"},On={"\u0967":"1","\u0968":"2","\u0969":"3","\u096a":"4","\u096b":"5","\u096c":"6","\u096d":"7","\u096e":"8","\u096f":"9","\u0966":"0"};l.defineLocale("ne",{months:"\u091c\u0928\u0935\u0930\u0940_\u092b\u0947\u092c\u094d\u0930\u0941\u0935\u0930\u0940_\u092e\u093e\u0930\u094d\u091a_\u0905\u092a\u094d\u0930\u093f\u0932_\u092e\u0908_\u091c\u0941\u0928_\u091c\u0941\u0932\u093e\u0908_\u0905\u0917\u0937\u094d\u091f_\u0938\u0947\u092a\u094d\u091f\u0947\u092e\u094d\u092c\u0930_\u0905\u0915\u094d\u091f\u094b\u092c\u0930_\u0928\u094b\u092d\u0947\u092e\u094d\u092c\u0930_\u0921\u093f\u0938\u0947\u092e\u094d\u092c\u0930".split("_"),monthsShort:"\u091c\u0928._\u092b\u0947\u092c\u094d\u0930\u0941._\u092e\u093e\u0930\u094d\u091a_\u0905\u092a\u094d\u0930\u093f._\u092e\u0908_\u091c\u0941\u0928_\u091c\u0941\u0932\u093e\u0908._\u0905\u0917._\u0938\u0947\u092a\u094d\u091f._\u0905\u0915\u094d\u091f\u094b._\u0928\u094b\u092d\u0947._\u0921\u093f\u0938\u0947.".split("_"),monthsParseExact:!0,weekdays:"\u0906\u0907\u0924\u092c\u093e\u0930_\u0938\u094b\u092e\u092c\u093e\u0930_\u092e\u0919\u094d\u0917\u0932\u092c\u093e\u0930_\u092c\u0941\u0927\u092c\u093e\u0930_\u092c\u093f\u0939\u093f\u092c\u093e\u0930_\u0936\u0941\u0915\u094d\u0930\u092c\u093e\u0930_\u0936\u0928\u093f\u092c\u093e\u0930".split("_"),weekdaysShort:"\u0906\u0907\u0924._\u0938\u094b\u092e._\u092e\u0919\u094d\u0917\u0932._\u092c\u0941\u0927._\u092c\u093f\u0939\u093f._\u0936\u0941\u0915\u094d\u0930._\u0936\u0928\u093f.".split("_"),weekdaysMin:"\u0906._\u0938\u094b._\u092e\u0902._\u092c\u0941._\u092c\u093f._\u0936\u0941._\u0936.".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"A\u0915\u094b h:mm \u092c\u091c\u0947",LTS:"A\u0915\u094b h:mm:ss \u092c\u091c\u0947",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A\u0915\u094b h:mm \u092c\u091c\u0947",LLLL:"dddd, D MMMM YYYY, A\u0915\u094b h:mm \u092c\u091c\u0947"},preparse:function(e){return e.replace(/[\u0967\u0968\u0969\u096a\u096b\u096c\u096d\u096e\u096f\u0966]/g,function(e){return On[e]})},postformat:function(e){return e.replace(/\d/g,function(e){return xn[e]})},meridiemParse:/\u0930\u093e\u0924\u093f|\u092c\u093f\u0939\u093e\u0928|\u0926\u093f\u0909\u0901\u0938\u094b|\u0938\u093e\u0901\u091d/,meridiemHour:function(e,a){return 12===e&&(e=0),"\u0930\u093e\u0924\u093f"===a?e<4?e:e+12:"\u092c\u093f\u0939\u093e\u0928"===a?e:"\u0926\u093f\u0909\u0901\u0938\u094b"===a?10<=e?e:e+12:"\u0938\u093e\u0901\u091d"===a?e+12:void 0},meridiem:function(e,a,t){return e<3?"\u0930\u093e\u0924\u093f":e<12?"\u092c\u093f\u0939\u093e\u0928":e<16?"\u0926\u093f\u0909\u0901\u0938\u094b":e<20?"\u0938\u093e\u0901\u091d":"\u0930\u093e\u0924\u093f"},calendar:{sameDay:"[\u0906\u091c] LT",nextDay:"[\u092d\u094b\u0932\u093f] LT",nextWeek:"[\u0906\u0909\u0901\u0926\u094b] dddd[,] LT",lastDay:"[\u0939\u093f\u091c\u094b] LT",lastWeek:"[\u0917\u090f\u0915\u094b] dddd[,] LT",sameElse:"L"},relativeTime:{future:"%s\u092e\u093e",past:"%s \u0905\u0917\u093e\u0921\u093f",s:"\u0915\u0947\u0939\u0940 \u0915\u094d\u0937\u0923",ss:"%d \u0938\u0947\u0915\u0947\u0923\u094d\u0921",m:"\u090f\u0915 \u092e\u093f\u0928\u0947\u091f",mm:"%d \u092e\u093f\u0928\u0947\u091f",h:"\u090f\u0915 \u0918\u0923\u094d\u091f\u093e",hh:"%d \u0918\u0923\u094d\u091f\u093e",d:"\u090f\u0915 \u0926\u093f\u0928",dd:"%d \u0926\u093f\u0928",M:"\u090f\u0915 \u092e\u0939\u093f\u0928\u093e",MM:"%d \u092e\u0939\u093f\u0928\u093e",y:"\u090f\u0915 \u092c\u0930\u094d\u0937",yy:"%d \u092c\u0930\u094d\u0937"},week:{dow:0,doy:6}});var Pn="jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.".split("_"),Wn="jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec".split("_"),An=[/^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],En=/^(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;l.defineLocale("nl-be",{months:"januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december".split("_"),monthsShort:function(e,a){return e?/-MMM-/.test(a)?Wn[e.month()]:Pn[e.month()]:Pn},monthsRegex:En,monthsShortRegex:En,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:An,longMonthsParse:An,shortMonthsParse:An,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:"\xe9\xe9n minuut",mm:"%d minuten",h:"\xe9\xe9n uur",hh:"%d uur",d:"\xe9\xe9n dag",dd:"%d dagen",M:"\xe9\xe9n maand",MM:"%d maanden",y:"\xe9\xe9n jaar",yy:"%d jaar"},dayOfMonthOrdinalParse:/\d{1,2}(ste|de)/,ordinal:function(e){return e+(1===e||8===e||20<=e?"ste":"de")},week:{dow:1,doy:4}});var Fn="jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.".split("_"),zn="jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec".split("_"),Jn=[/^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],Nn=/^(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;l.defineLocale("nl",{months:"januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december".split("_"),monthsShort:function(e,a){return e?/-MMM-/.test(a)?zn[e.month()]:Fn[e.month()]:Fn},monthsRegex:Nn,monthsShortRegex:Nn,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:Jn,longMonthsParse:Jn,shortMonthsParse:Jn,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:"\xe9\xe9n minuut",mm:"%d minuten",h:"\xe9\xe9n uur",hh:"%d uur",d:"\xe9\xe9n dag",dd:"%d dagen",M:"\xe9\xe9n maand",MM:"%d maanden",y:"\xe9\xe9n jaar",yy:"%d jaar"},dayOfMonthOrdinalParse:/\d{1,2}(ste|de)/,ordinal:function(e){return e+(1===e||8===e||20<=e?"ste":"de")},week:{dow:1,doy:4}}),l.defineLocale("nn",{months:"januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember".split("_"),monthsShort:"jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des".split("_"),weekdays:"sundag_m\xe5ndag_tysdag_onsdag_torsdag_fredag_laurdag".split("_"),weekdaysShort:"sun_m\xe5n_tys_ons_tor_fre_lau".split("_"),weekdaysMin:"su_m\xe5_ty_on_to_fr_l\xf8".split("_"),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\xe5r klokka] LT",lastWeek:"[F\xf8reg\xe5ande] 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",M:"ein m\xe5nad",MM:"%d m\xe5nader",y:"eit \xe5r",yy:"%d \xe5r"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});var Rn={1:"\u0a67",2:"\u0a68",3:"\u0a69",4:"\u0a6a",5:"\u0a6b",6:"\u0a6c",7:"\u0a6d",8:"\u0a6e",9:"\u0a6f",0:"\u0a66"},Cn={"\u0a67":"1","\u0a68":"2","\u0a69":"3","\u0a6a":"4","\u0a6b":"5","\u0a6c":"6","\u0a6d":"7","\u0a6e":"8","\u0a6f":"9","\u0a66":"0"};l.defineLocale("pa-in",{months:"\u0a1c\u0a28\u0a35\u0a30\u0a40_\u0a2b\u0a3c\u0a30\u0a35\u0a30\u0a40_\u0a2e\u0a3e\u0a30\u0a1a_\u0a05\u0a2a\u0a4d\u0a30\u0a48\u0a32_\u0a2e\u0a08_\u0a1c\u0a42\u0a28_\u0a1c\u0a41\u0a32\u0a3e\u0a08_\u0a05\u0a17\u0a38\u0a24_\u0a38\u0a24\u0a70\u0a2c\u0a30_\u0a05\u0a15\u0a24\u0a42\u0a2c\u0a30_\u0a28\u0a35\u0a70\u0a2c\u0a30_\u0a26\u0a38\u0a70\u0a2c\u0a30".split("_"),monthsShort:"\u0a1c\u0a28\u0a35\u0a30\u0a40_\u0a2b\u0a3c\u0a30\u0a35\u0a30\u0a40_\u0a2e\u0a3e\u0a30\u0a1a_\u0a05\u0a2a\u0a4d\u0a30\u0a48\u0a32_\u0a2e\u0a08_\u0a1c\u0a42\u0a28_\u0a1c\u0a41\u0a32\u0a3e\u0a08_\u0a05\u0a17\u0a38\u0a24_\u0a38\u0a24\u0a70\u0a2c\u0a30_\u0a05\u0a15\u0a24\u0a42\u0a2c\u0a30_\u0a28\u0a35\u0a70\u0a2c\u0a30_\u0a26\u0a38\u0a70\u0a2c\u0a30".split("_"),weekdays:"\u0a10\u0a24\u0a35\u0a3e\u0a30_\u0a38\u0a4b\u0a2e\u0a35\u0a3e\u0a30_\u0a2e\u0a70\u0a17\u0a32\u0a35\u0a3e\u0a30_\u0a2c\u0a41\u0a27\u0a35\u0a3e\u0a30_\u0a35\u0a40\u0a30\u0a35\u0a3e\u0a30_\u0a38\u0a3c\u0a41\u0a71\u0a15\u0a30\u0a35\u0a3e\u0a30_\u0a38\u0a3c\u0a28\u0a40\u0a1a\u0a30\u0a35\u0a3e\u0a30".split("_"),weekdaysShort:"\u0a10\u0a24_\u0a38\u0a4b\u0a2e_\u0a2e\u0a70\u0a17\u0a32_\u0a2c\u0a41\u0a27_\u0a35\u0a40\u0a30_\u0a38\u0a3c\u0a41\u0a15\u0a30_\u0a38\u0a3c\u0a28\u0a40".split("_"),weekdaysMin:"\u0a10\u0a24_\u0a38\u0a4b\u0a2e_\u0a2e\u0a70\u0a17\u0a32_\u0a2c\u0a41\u0a27_\u0a35\u0a40\u0a30_\u0a38\u0a3c\u0a41\u0a15\u0a30_\u0a38\u0a3c\u0a28\u0a40".split("_"),longDateFormat:{LT:"A h:mm \u0a35\u0a1c\u0a47",LTS:"A h:mm:ss \u0a35\u0a1c\u0a47",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm \u0a35\u0a1c\u0a47",LLLL:"dddd, D MMMM YYYY, A h:mm \u0a35\u0a1c\u0a47"},calendar:{sameDay:"[\u0a05\u0a1c] LT",nextDay:"[\u0a15\u0a32] LT",nextWeek:"[\u0a05\u0a17\u0a32\u0a3e] dddd, LT",lastDay:"[\u0a15\u0a32] LT",lastWeek:"[\u0a2a\u0a3f\u0a1b\u0a32\u0a47] dddd, LT",sameElse:"L"},relativeTime:{future:"%s \u0a35\u0a3f\u0a71\u0a1a",past:"%s \u0a2a\u0a3f\u0a1b\u0a32\u0a47",s:"\u0a15\u0a41\u0a1d \u0a38\u0a15\u0a3f\u0a70\u0a1f",ss:"%d \u0a38\u0a15\u0a3f\u0a70\u0a1f",m:"\u0a07\u0a15 \u0a2e\u0a3f\u0a70\u0a1f",mm:"%d \u0a2e\u0a3f\u0a70\u0a1f",h:"\u0a07\u0a71\u0a15 \u0a18\u0a70\u0a1f\u0a3e",hh:"%d \u0a18\u0a70\u0a1f\u0a47",d:"\u0a07\u0a71\u0a15 \u0a26\u0a3f\u0a28",dd:"%d \u0a26\u0a3f\u0a28",M:"\u0a07\u0a71\u0a15 \u0a2e\u0a39\u0a40\u0a28\u0a3e",MM:"%d \u0a2e\u0a39\u0a40\u0a28\u0a47",y:"\u0a07\u0a71\u0a15 \u0a38\u0a3e\u0a32",yy:"%d \u0a38\u0a3e\u0a32"},preparse:function(e){return e.replace(/[\u0a67\u0a68\u0a69\u0a6a\u0a6b\u0a6c\u0a6d\u0a6e\u0a6f\u0a66]/g,function(e){return Cn[e]})},postformat:function(e){return e.replace(/\d/g,function(e){return Rn[e]})},meridiemParse:/\u0a30\u0a3e\u0a24|\u0a38\u0a35\u0a47\u0a30|\u0a26\u0a41\u0a2a\u0a39\u0a3f\u0a30|\u0a38\u0a3c\u0a3e\u0a2e/,meridiemHour:function(e,a){return 12===e&&(e=0),"\u0a30\u0a3e\u0a24"===a?e<4?e:e+12:"\u0a38\u0a35\u0a47\u0a30"===a?e:"\u0a26\u0a41\u0a2a\u0a39\u0a3f\u0a30"===a?10<=e?e:e+12:"\u0a38\u0a3c\u0a3e\u0a2e"===a?e+12:void 0},meridiem:function(e,a,t){return e<4?"\u0a30\u0a3e\u0a24":e<10?"\u0a38\u0a35\u0a47\u0a30":e<17?"\u0a26\u0a41\u0a2a\u0a39\u0a3f\u0a30":e<20?"\u0a38\u0a3c\u0a3e\u0a2e":"\u0a30\u0a3e\u0a24"},week:{dow:0,doy:6}});var In="stycze\u0144_luty_marzec_kwiecie\u0144_maj_czerwiec_lipiec_sierpie\u0144_wrzesie\u0144_pa\u017adziernik_listopad_grudzie\u0144".split("_"),Un="stycznia_lutego_marca_kwietnia_maja_czerwca_lipca_sierpnia_wrze\u015bnia_pa\u017adziernika_listopada_grudnia".split("_");function Gn(e){return e%10<5&&1<e%10&&~~(e/10)%10!=1}function Vn(e,a,t){var s=e+" ";switch(t){case"ss":return s+(Gn(e)?"sekundy":"sekund");case"m":return a?"minuta":"minut\u0119";case"mm":return s+(Gn(e)?"minuty":"minut");case"h":return a?"godzina":"godzin\u0119";case"hh":return s+(Gn(e)?"godziny":"godzin");case"MM":return s+(Gn(e)?"miesi\u0105ce":"miesi\u0119cy");case"yy":return s+(Gn(e)?"lata":"lat")}}function Kn(e,a,t){var s=" ";return(20<=e%100||100<=e&&e%100==0)&&(s=" de "),e+s+{ss:"secunde",mm:"minute",hh:"ore",dd:"zile",MM:"luni",yy:"ani"}[t]}function Zn(e,a,t){var s,n;return"m"===t?a?"\u043c\u0438\u043d\u0443\u0442\u0430":"\u043c\u0438\u043d\u0443\u0442\u0443":e+" "+(s=+e,n={ss:a?"\u0441\u0435\u043a\u0443\u043d\u0434\u0430_\u0441\u0435\u043a\u0443\u043d\u0434\u044b_\u0441\u0435\u043a\u0443\u043d\u0434":"\u0441\u0435\u043a\u0443\u043d\u0434\u0443_\u0441\u0435\u043a\u0443\u043d\u0434\u044b_\u0441\u0435\u043a\u0443\u043d\u0434",mm:a?"\u043c\u0438\u043d\u0443\u0442\u0430_\u043c\u0438\u043d\u0443\u0442\u044b_\u043c\u0438\u043d\u0443\u0442":"\u043c\u0438\u043d\u0443\u0442\u0443_\u043c\u0438\u043d\u0443\u0442\u044b_\u043c\u0438\u043d\u0443\u0442",hh:"\u0447\u0430\u0441_\u0447\u0430\u0441\u0430_\u0447\u0430\u0441\u043e\u0432",dd:"\u0434\u0435\u043d\u044c_\u0434\u043d\u044f_\u0434\u043d\u0435\u0439",MM:"\u043c\u0435\u0441\u044f\u0446_\u043c\u0435\u0441\u044f\u0446\u0430_\u043c\u0435\u0441\u044f\u0446\u0435\u0432",yy:"\u0433\u043e\u0434_\u0433\u043e\u0434\u0430_\u043b\u0435\u0442"}[t].split("_"),s%10==1&&s%100!=11?n[0]:2<=s%10&&s%10<=4&&(s%100<10||20<=s%100)?n[1]:n[2])}l.defineLocale("pl",{months:function(e,a){return e?""===a?"("+Un[e.month()]+"|"+In[e.month()]+")":/D MMMM/.test(a)?Un[e.month()]:In[e.month()]:In},monthsShort:"sty_lut_mar_kwi_maj_cze_lip_sie_wrz_pa\u017a_lis_gru".split("_"),weekdays:"niedziela_poniedzia\u0142ek_wtorek_\u015broda_czwartek_pi\u0105tek_sobota".split("_"),weekdaysShort:"ndz_pon_wt_\u015br_czw_pt_sob".split("_"),weekdaysMin:"Nd_Pn_Wt_\u015ar_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\u015b o] LT",nextDay:"[Jutro o] LT",nextWeek:function(){switch(this.day()){case 0:return"[W niedziel\u0119 o] LT";case 2:return"[We wtorek o] LT";case 3:return"[W \u015brod\u0119 o] LT";case 6:return"[W sobot\u0119 o] LT";default:return"[W] dddd [o] LT"}},lastDay:"[Wczoraj o] LT",lastWeek:function(){switch(this.day()){case 0:return"[W zesz\u0142\u0105 niedziel\u0119 o] LT";case 3:return"[W zesz\u0142\u0105 \u015brod\u0119 o] LT";case 6:return"[W zesz\u0142\u0105 sobot\u0119 o] LT";default:return"[W zesz\u0142y] dddd [o] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"%s temu",s:"kilka sekund",ss:Vn,m:Vn,mm:Vn,h:Vn,hh:Vn,d:"1 dzie\u0144",dd:"%d dni",M:"miesi\u0105c",MM:Vn,y:"rok",yy:Vn},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}}),l.defineLocale("pt-br",{months:"Janeiro_Fevereiro_Mar\xe7o_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\xe7a-feira_Quarta-feira_Quinta-feira_Sexta-feira_S\xe1bado".split("_"),weekdaysShort:"Dom_Seg_Ter_Qua_Qui_Sex_S\xe1b".split("_"),weekdaysMin:"Do_2\xaa_3\xaa_4\xaa_5\xaa_6\xaa_S\xe1".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 [\xe0s] HH:mm",LLLL:"dddd, D [de] MMMM [de] YYYY [\xe0s] HH:mm"},calendar:{sameDay:"[Hoje \xe0s] LT",nextDay:"[Amanh\xe3 \xe0s] LT",nextWeek:"dddd [\xe0s] LT",lastDay:"[Ontem \xe0s] LT",lastWeek:function(){return 0===this.day()||6===this.day()?"[\xdaltimo] dddd [\xe0s] LT":"[\xdaltima] dddd [\xe0s] LT"},sameElse:"L"},relativeTime:{future:"em %s",past:"h\xe1 %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\xeas",MM:"%d meses",y:"um ano",yy:"%d anos"},dayOfMonthOrdinalParse:/\d{1,2}\xba/,ordinal:"%d\xba"}),l.defineLocale("pt",{months:"Janeiro_Fevereiro_Mar\xe7o_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\xe7a-feira_Quarta-feira_Quinta-feira_Sexta-feira_S\xe1bado".split("_"),weekdaysShort:"Dom_Seg_Ter_Qua_Qui_Sex_S\xe1b".split("_"),weekdaysMin:"Do_2\xaa_3\xaa_4\xaa_5\xaa_6\xaa_S\xe1".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 \xe0s] LT",nextDay:"[Amanh\xe3 \xe0s] LT",nextWeek:"dddd [\xe0s] LT",lastDay:"[Ontem \xe0s] LT",lastWeek:function(){return 0===this.day()||6===this.day()?"[\xdaltimo] dddd [\xe0s] LT":"[\xdaltima] dddd [\xe0s] LT"},sameElse:"L"},relativeTime:{future:"em %s",past:"h\xe1 %s",s:"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\xeas",MM:"%d meses",y:"um ano",yy:"%d anos"},dayOfMonthOrdinalParse:/\d{1,2}\xba/,ordinal:"%d\xba",week:{dow:1,doy:4}}),l.defineLocale("ro",{months:"ianuarie_februarie_martie_aprilie_mai_iunie_iulie_august_septembrie_octombrie_noiembrie_decembrie".split("_"),monthsShort:"ian._febr._mart._apr._mai_iun._iul._aug._sept._oct._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"duminic\u0103_luni_mar\u021bi_miercuri_joi_vineri_s\xe2mb\u0103t\u0103".split("_"),weekdaysShort:"Dum_Lun_Mar_Mie_Joi_Vin_S\xe2m".split("_"),weekdaysMin:"Du_Lu_Ma_Mi_Jo_Vi_S\xe2".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\xe2ine la] LT",nextWeek:"dddd [la] LT",lastDay:"[ieri la] LT",lastWeek:"[fosta] dddd [la] LT",sameElse:"L"},relativeTime:{future:"peste %s",past:"%s \xeen urm\u0103",s:"c\xe2teva secunde",ss:Kn,m:"un minut",mm:Kn,h:"o or\u0103",hh:Kn,d:"o zi",dd:Kn,M:"o lun\u0103",MM:Kn,y:"un an",yy:Kn},week:{dow:1,doy:7}});var $n=[/^\u044f\u043d\u0432/i,/^\u0444\u0435\u0432/i,/^\u043c\u0430\u0440/i,/^\u0430\u043f\u0440/i,/^\u043c\u0430[\u0439\u044f]/i,/^\u0438\u044e\u043d/i,/^\u0438\u044e\u043b/i,/^\u0430\u0432\u0433/i,/^\u0441\u0435\u043d/i,/^\u043e\u043a\u0442/i,/^\u043d\u043e\u044f/i,/^\u0434\u0435\u043a/i];l.defineLocale("ru",{months:{format:"\u044f\u043d\u0432\u0430\u0440\u044f_\u0444\u0435\u0432\u0440\u0430\u043b\u044f_\u043c\u0430\u0440\u0442\u0430_\u0430\u043f\u0440\u0435\u043b\u044f_\u043c\u0430\u044f_\u0438\u044e\u043d\u044f_\u0438\u044e\u043b\u044f_\u0430\u0432\u0433\u0443\u0441\u0442\u0430_\u0441\u0435\u043d\u0442\u044f\u0431\u0440\u044f_\u043e\u043a\u0442\u044f\u0431\u0440\u044f_\u043d\u043e\u044f\u0431\u0440\u044f_\u0434\u0435\u043a\u0430\u0431\u0440\u044f".split("_"),standalone:"\u044f\u043d\u0432\u0430\u0440\u044c_\u0444\u0435\u0432\u0440\u0430\u043b\u044c_\u043c\u0430\u0440\u0442_\u0430\u043f\u0440\u0435\u043b\u044c_\u043c\u0430\u0439_\u0438\u044e\u043d\u044c_\u0438\u044e\u043b\u044c_\u0430\u0432\u0433\u0443\u0441\u0442_\u0441\u0435\u043d\u0442\u044f\u0431\u0440\u044c_\u043e\u043a\u0442\u044f\u0431\u0440\u044c_\u043d\u043e\u044f\u0431\u0440\u044c_\u0434\u0435\u043a\u0430\u0431\u0440\u044c".split("_")},monthsShort:{format:"\u044f\u043d\u0432._\u0444\u0435\u0432\u0440._\u043c\u0430\u0440._\u0430\u043f\u0440._\u043c\u0430\u044f_\u0438\u044e\u043d\u044f_\u0438\u044e\u043b\u044f_\u0430\u0432\u0433._\u0441\u0435\u043d\u0442._\u043e\u043a\u0442._\u043d\u043e\u044f\u0431._\u0434\u0435\u043a.".split("_"),standalone:"\u044f\u043d\u0432._\u0444\u0435\u0432\u0440._\u043c\u0430\u0440\u0442_\u0430\u043f\u0440._\u043c\u0430\u0439_\u0438\u044e\u043d\u044c_\u0438\u044e\u043b\u044c_\u0430\u0432\u0433._\u0441\u0435\u043d\u0442._\u043e\u043a\u0442._\u043d\u043e\u044f\u0431._\u0434\u0435\u043a.".split("_")},weekdays:{standalone:"\u0432\u043e\u0441\u043a\u0440\u0435\u0441\u0435\u043d\u044c\u0435_\u043f\u043e\u043d\u0435\u0434\u0435\u043b\u044c\u043d\u0438\u043a_\u0432\u0442\u043e\u0440\u043d\u0438\u043a_\u0441\u0440\u0435\u0434\u0430_\u0447\u0435\u0442\u0432\u0435\u0440\u0433_\u043f\u044f\u0442\u043d\u0438\u0446\u0430_\u0441\u0443\u0431\u0431\u043e\u0442\u0430".split("_"),format:"\u0432\u043e\u0441\u043a\u0440\u0435\u0441\u0435\u043d\u044c\u0435_\u043f\u043e\u043d\u0435\u0434\u0435\u043b\u044c\u043d\u0438\u043a_\u0432\u0442\u043e\u0440\u043d\u0438\u043a_\u0441\u0440\u0435\u0434\u0443_\u0447\u0435\u0442\u0432\u0435\u0440\u0433_\u043f\u044f\u0442\u043d\u0438\u0446\u0443_\u0441\u0443\u0431\u0431\u043e\u0442\u0443".split("_"),isFormat:/\[ ?[\u0412\u0432] ?(?:\u043f\u0440\u043e\u0448\u043b\u0443\u044e|\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e|\u044d\u0442\u0443)? ?\] ?dddd/},weekdaysShort:"\u0432\u0441_\u043f\u043d_\u0432\u0442_\u0441\u0440_\u0447\u0442_\u043f\u0442_\u0441\u0431".split("_"),weekdaysMin:"\u0432\u0441_\u043f\u043d_\u0432\u0442_\u0441\u0440_\u0447\u0442_\u043f\u0442_\u0441\u0431".split("_"),monthsParse:$n,longMonthsParse:$n,shortMonthsParse:$n,monthsRegex:/^(\u044f\u043d\u0432\u0430\u0440[\u044c\u044f]|\u044f\u043d\u0432\.?|\u0444\u0435\u0432\u0440\u0430\u043b[\u044c\u044f]|\u0444\u0435\u0432\u0440?\.?|\u043c\u0430\u0440\u0442\u0430?|\u043c\u0430\u0440\.?|\u0430\u043f\u0440\u0435\u043b[\u044c\u044f]|\u0430\u043f\u0440\.?|\u043c\u0430[\u0439\u044f]|\u0438\u044e\u043d[\u044c\u044f]|\u0438\u044e\u043d\.?|\u0438\u044e\u043b[\u044c\u044f]|\u0438\u044e\u043b\.?|\u0430\u0432\u0433\u0443\u0441\u0442\u0430?|\u0430\u0432\u0433\.?|\u0441\u0435\u043d\u0442\u044f\u0431\u0440[\u044c\u044f]|\u0441\u0435\u043d\u0442?\.?|\u043e\u043a\u0442\u044f\u0431\u0440[\u044c\u044f]|\u043e\u043a\u0442\.?|\u043d\u043e\u044f\u0431\u0440[\u044c\u044f]|\u043d\u043e\u044f\u0431?\.?|\u0434\u0435\u043a\u0430\u0431\u0440[\u044c\u044f]|\u0434\u0435\u043a\.?)/i,monthsShortRegex:/^(\u044f\u043d\u0432\u0430\u0440[\u044c\u044f]|\u044f\u043d\u0432\.?|\u0444\u0435\u0432\u0440\u0430\u043b[\u044c\u044f]|\u0444\u0435\u0432\u0440?\.?|\u043c\u0430\u0440\u0442\u0430?|\u043c\u0430\u0440\.?|\u0430\u043f\u0440\u0435\u043b[\u044c\u044f]|\u0430\u043f\u0440\.?|\u043c\u0430[\u0439\u044f]|\u0438\u044e\u043d[\u044c\u044f]|\u0438\u044e\u043d\.?|\u0438\u044e\u043b[\u044c\u044f]|\u0438\u044e\u043b\.?|\u0430\u0432\u0433\u0443\u0441\u0442\u0430?|\u0430\u0432\u0433\.?|\u0441\u0435\u043d\u0442\u044f\u0431\u0440[\u044c\u044f]|\u0441\u0435\u043d\u0442?\.?|\u043e\u043a\u0442\u044f\u0431\u0440[\u044c\u044f]|\u043e\u043a\u0442\.?|\u043d\u043e\u044f\u0431\u0440[\u044c\u044f]|\u043d\u043e\u044f\u0431?\.?|\u0434\u0435\u043a\u0430\u0431\u0440[\u044c\u044f]|\u0434\u0435\u043a\.?)/i,monthsStrictRegex:/^(\u044f\u043d\u0432\u0430\u0440[\u044f\u044c]|\u0444\u0435\u0432\u0440\u0430\u043b[\u044f\u044c]|\u043c\u0430\u0440\u0442\u0430?|\u0430\u043f\u0440\u0435\u043b[\u044f\u044c]|\u043c\u0430[\u044f\u0439]|\u0438\u044e\u043d[\u044f\u044c]|\u0438\u044e\u043b[\u044f\u044c]|\u0430\u0432\u0433\u0443\u0441\u0442\u0430?|\u0441\u0435\u043d\u0442\u044f\u0431\u0440[\u044f\u044c]|\u043e\u043a\u0442\u044f\u0431\u0440[\u044f\u044c]|\u043d\u043e\u044f\u0431\u0440[\u044f\u044c]|\u0434\u0435\u043a\u0430\u0431\u0440[\u044f\u044c])/i,monthsShortStrictRegex:/^(\u044f\u043d\u0432\.|\u0444\u0435\u0432\u0440?\.|\u043c\u0430\u0440[\u0442.]|\u0430\u043f\u0440\.|\u043c\u0430[\u044f\u0439]|\u0438\u044e\u043d[\u044c\u044f.]|\u0438\u044e\u043b[\u044c\u044f.]|\u0430\u0432\u0433\.|\u0441\u0435\u043d\u0442?\.|\u043e\u043a\u0442\.|\u043d\u043e\u044f\u0431?\.|\u0434\u0435\u043a\.)/i,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY \u0433.",LLL:"D MMMM YYYY \u0433., H:mm",LLLL:"dddd, D MMMM YYYY \u0433., H:mm"},calendar:{sameDay:"[\u0421\u0435\u0433\u043e\u0434\u043d\u044f, \u0432] LT",nextDay:"[\u0417\u0430\u0432\u0442\u0440\u0430, \u0432] LT",lastDay:"[\u0412\u0447\u0435\u0440\u0430, \u0432] LT",nextWeek:function(e){if(e.week()===this.week())return 2===this.day()?"[\u0412\u043e] dddd, [\u0432] LT":"[\u0412] dddd, [\u0432] LT";switch(this.day()){case 0:return"[\u0412 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435] dddd, [\u0432] LT";case 1:case 2:case 4:return"[\u0412 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439] dddd, [\u0432] LT";case 3:case 5:case 6:return"[\u0412 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e] dddd, [\u0432] LT"}},lastWeek:function(e){if(e.week()===this.week())return 2===this.day()?"[\u0412\u043e] dddd, [\u0432] LT":"[\u0412] dddd, [\u0432] LT";switch(this.day()){case 0:return"[\u0412 \u043f\u0440\u043e\u0448\u043b\u043e\u0435] dddd, [\u0432] LT";case 1:case 2:case 4:return"[\u0412 \u043f\u0440\u043e\u0448\u043b\u044b\u0439] dddd, [\u0432] LT";case 3:case 5:case 6:return"[\u0412 \u043f\u0440\u043e\u0448\u043b\u0443\u044e] dddd, [\u0432] LT"}},sameElse:"L"},relativeTime:{future:"\u0447\u0435\u0440\u0435\u0437 %s",past:"%s \u043d\u0430\u0437\u0430\u0434",s:"\u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u0435\u043a\u0443\u043d\u0434",ss:Zn,m:Zn,mm:Zn,h:"\u0447\u0430\u0441",hh:Zn,d:"\u0434\u0435\u043d\u044c",dd:Zn,M:"\u043c\u0435\u0441\u044f\u0446",MM:Zn,y:"\u0433\u043e\u0434",yy:Zn},meridiemParse:/\u043d\u043e\u0447\u0438|\u0443\u0442\u0440\u0430|\u0434\u043d\u044f|\u0432\u0435\u0447\u0435\u0440\u0430/i,isPM:function(e){return/^(\u0434\u043d\u044f|\u0432\u0435\u0447\u0435\u0440\u0430)$/.test(e)},meridiem:function(e,a,t){return e<4?"\u043d\u043e\u0447\u0438":e<12?"\u0443\u0442\u0440\u0430":e<17?"\u0434\u043d\u044f":"\u0432\u0435\u0447\u0435\u0440\u0430"},dayOfMonthOrdinalParse:/\d{1,2}-(\u0439|\u0433\u043e|\u044f)/,ordinal:function(e,a){switch(a){case"M":case"d":case"DDD":return e+"-\u0439";case"D":return e+"-\u0433\u043e";case"w":case"W":return e+"-\u044f";default:return e}},week:{dow:1,doy:4}});var Bn=["\u062c\u0646\u0648\u0631\u064a","\u0641\u064a\u0628\u0631\u0648\u0631\u064a","\u0645\u0627\u0631\u0686","\u0627\u067e\u0631\u064a\u0644","\u0645\u0626\u064a","\u062c\u0648\u0646","\u062c\u0648\u0644\u0627\u0621\u0650","\u0622\u06af\u0633\u067d","\u0633\u064a\u067e\u067d\u0645\u0628\u0631","\u0622\u06aa\u067d\u0648\u0628\u0631","\u0646\u0648\u0645\u0628\u0631","\u068a\u0633\u0645\u0628\u0631"],qn=["\u0622\u0686\u0631","\u0633\u0648\u0645\u0631","\u0627\u06b1\u0627\u0631\u0648","\u0627\u0631\u0628\u0639","\u062e\u0645\u064a\u0633","\u062c\u0645\u0639","\u0687\u0646\u0687\u0631"];l.defineLocale("sd",{months:Bn,monthsShort:Bn,weekdays:qn,weekdaysShort:qn,weekdaysMin:qn,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd\u060c D MMMM YYYY HH:mm"},meridiemParse:/\u0635\u0628\u062d|\u0634\u0627\u0645/,isPM:function(e){return"\u0634\u0627\u0645"===e},meridiem:function(e,a,t){return e<12?"\u0635\u0628\u062d":"\u0634\u0627\u0645"},calendar:{sameDay:"[\u0627\u0684] LT",nextDay:"[\u0633\u0680\u0627\u06bb\u064a] LT",nextWeek:"dddd [\u0627\u06b3\u064a\u0646 \u0647\u0641\u062a\u064a \u062a\u064a] LT",lastDay:"[\u06aa\u0627\u0644\u0647\u0647] LT",lastWeek:"[\u06af\u0632\u0631\u064a\u0644 \u0647\u0641\u062a\u064a] dddd [\u062a\u064a] LT",sameElse:"L"},relativeTime:{future:"%s \u067e\u0648\u0621",past:"%s \u0627\u06b3",s:"\u0686\u0646\u062f \u0633\u064a\u06aa\u0646\u068a",ss:"%d \u0633\u064a\u06aa\u0646\u068a",m:"\u0647\u06aa \u0645\u0646\u067d",mm:"%d \u0645\u0646\u067d",h:"\u0647\u06aa \u06aa\u0644\u0627\u06aa",hh:"%d \u06aa\u0644\u0627\u06aa",d:"\u0647\u06aa \u068f\u064a\u0646\u0647\u0646",dd:"%d \u068f\u064a\u0646\u0647\u0646",M:"\u0647\u06aa \u0645\u0647\u064a\u0646\u0648",MM:"%d \u0645\u0647\u064a\u0646\u0627",y:"\u0647\u06aa \u0633\u0627\u0644",yy:"%d \u0633\u0627\u0644"},preparse:function(e){return e.replace(/\u060c/g,",")},postformat:function(e){return e.replace(/,/g,"\u060c")},week:{dow:1,doy:4}}),l.defineLocale("se",{months:"o\u0111\u0111ajagem\xe1nnu_guovvam\xe1nnu_njuk\u010dam\xe1nnu_cuo\u014bom\xe1nnu_miessem\xe1nnu_geassem\xe1nnu_suoidnem\xe1nnu_borgem\xe1nnu_\u010dak\u010dam\xe1nnu_golggotm\xe1nnu_sk\xe1bmam\xe1nnu_juovlam\xe1nnu".split("_"),monthsShort:"o\u0111\u0111j_guov_njuk_cuo_mies_geas_suoi_borg_\u010dak\u010d_golg_sk\xe1b_juov".split("_"),weekdays:"sotnabeaivi_vuoss\xe1rga_ma\u014b\u014beb\xe1rga_gaskavahkku_duorastat_bearjadat_l\xe1vvardat".split("_"),weekdaysShort:"sotn_vuos_ma\u014b_gask_duor_bear_l\xe1v".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\u017ees",past:"ma\u014bit %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\xe1nnu",MM:"%d m\xe1nut",y:"okta jahki",yy:"%d jagit"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}}),l.defineLocale("si",{months:"\u0da2\u0db1\u0dc0\u0dcf\u0dbb\u0dd2_\u0db4\u0dd9\u0db6\u0dbb\u0dc0\u0dcf\u0dbb\u0dd2_\u0db8\u0dcf\u0dbb\u0dca\u0dad\u0dd4_\u0d85\u0db4\u0dca\u200d\u0dbb\u0dda\u0dbd\u0dca_\u0db8\u0dd0\u0dba\u0dd2_\u0da2\u0dd6\u0db1\u0dd2_\u0da2\u0dd6\u0dbd\u0dd2_\u0d85\u0d9c\u0ddd\u0dc3\u0dca\u0dad\u0dd4_\u0dc3\u0dd0\u0db4\u0dca\u0dad\u0dd0\u0db8\u0dca\u0db6\u0dbb\u0dca_\u0d94\u0d9a\u0dca\u0dad\u0ddd\u0db6\u0dbb\u0dca_\u0db1\u0ddc\u0dc0\u0dd0\u0db8\u0dca\u0db6\u0dbb\u0dca_\u0daf\u0dd9\u0dc3\u0dd0\u0db8\u0dca\u0db6\u0dbb\u0dca".split("_"),monthsShort:"\u0da2\u0db1_\u0db4\u0dd9\u0db6_\u0db8\u0dcf\u0dbb\u0dca_\u0d85\u0db4\u0dca_\u0db8\u0dd0\u0dba\u0dd2_\u0da2\u0dd6\u0db1\u0dd2_\u0da2\u0dd6\u0dbd\u0dd2_\u0d85\u0d9c\u0ddd_\u0dc3\u0dd0\u0db4\u0dca_\u0d94\u0d9a\u0dca_\u0db1\u0ddc\u0dc0\u0dd0_\u0daf\u0dd9\u0dc3\u0dd0".split("_"),weekdays:"\u0d89\u0dbb\u0dd2\u0daf\u0dcf_\u0dc3\u0db3\u0dd4\u0daf\u0dcf_\u0d85\u0d9f\u0dc4\u0dbb\u0dd4\u0dc0\u0dcf\u0daf\u0dcf_\u0db6\u0daf\u0dcf\u0daf\u0dcf_\u0db6\u0dca\u200d\u0dbb\u0dc4\u0dc3\u0dca\u0db4\u0dad\u0dd2\u0db1\u0dca\u0daf\u0dcf_\u0dc3\u0dd2\u0d9a\u0dd4\u0dbb\u0dcf\u0daf\u0dcf_\u0dc3\u0dd9\u0db1\u0dc3\u0dd4\u0dbb\u0dcf\u0daf\u0dcf".split("_"),weekdaysShort:"\u0d89\u0dbb\u0dd2_\u0dc3\u0db3\u0dd4_\u0d85\u0d9f_\u0db6\u0daf\u0dcf_\u0db6\u0dca\u200d\u0dbb\u0dc4_\u0dc3\u0dd2\u0d9a\u0dd4_\u0dc3\u0dd9\u0db1".split("_"),weekdaysMin:"\u0d89_\u0dc3_\u0d85_\u0db6_\u0db6\u0dca\u200d\u0dbb_\u0dc3\u0dd2_\u0dc3\u0dd9".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 [\u0dc0\u0dd0\u0db1\u0dd2] dddd, a h:mm:ss"},calendar:{sameDay:"[\u0d85\u0daf] LT[\u0da7]",nextDay:"[\u0dc4\u0dd9\u0da7] LT[\u0da7]",nextWeek:"dddd LT[\u0da7]",lastDay:"[\u0d8a\u0dba\u0dda] LT[\u0da7]",lastWeek:"[\u0db4\u0dc3\u0dd4\u0d9c\u0dd2\u0dba] dddd LT[\u0da7]",sameElse:"L"},relativeTime:{future:"%s\u0d9a\u0dd2\u0db1\u0dca",past:"%s\u0d9a\u0da7 \u0db4\u0dd9\u0dbb",s:"\u0dad\u0dad\u0dca\u0db4\u0dbb \u0d9a\u0dd2\u0dc4\u0dd2\u0db4\u0dba",ss:"\u0dad\u0dad\u0dca\u0db4\u0dbb %d",m:"\u0db8\u0dd2\u0db1\u0dd2\u0dad\u0dca\u0dad\u0dd4\u0dc0",mm:"\u0db8\u0dd2\u0db1\u0dd2\u0dad\u0dca\u0dad\u0dd4 %d",h:"\u0db4\u0dd0\u0dba",hh:"\u0db4\u0dd0\u0dba %d",d:"\u0daf\u0dd2\u0db1\u0dba",dd:"\u0daf\u0dd2\u0db1 %d",M:"\u0db8\u0dcf\u0dc3\u0dba",MM:"\u0db8\u0dcf\u0dc3 %d",y:"\u0dc0\u0dc3\u0dbb",yy:"\u0dc0\u0dc3\u0dbb %d"},dayOfMonthOrdinalParse:/\d{1,2} \u0dc0\u0dd0\u0db1\u0dd2/,ordinal:function(e){return e+" \u0dc0\u0dd0\u0db1\u0dd2"},meridiemParse:/\u0db4\u0dd9\u0dbb \u0dc0\u0dbb\u0dd4|\u0db4\u0dc3\u0dca \u0dc0\u0dbb\u0dd4|\u0db4\u0dd9.\u0dc0|\u0db4.\u0dc0./,isPM:function(e){return"\u0db4.\u0dc0."===e||"\u0db4\u0dc3\u0dca \u0dc0\u0dbb\u0dd4"===e},meridiem:function(e,a,t){return 11<e?t?"\u0db4.\u0dc0.":"\u0db4\u0dc3\u0dca \u0dc0\u0dbb\u0dd4":t?"\u0db4\u0dd9.\u0dc0.":"\u0db4\u0dd9\u0dbb \u0dc0\u0dbb\u0dd4"}});var Qn="janu\xe1r_febru\xe1r_marec_apr\xedl_m\xe1j_j\xfan_j\xfal_august_september_okt\xf3ber_november_december".split("_"),Xn="jan_feb_mar_apr_m\xe1j_j\xfan_j\xfal_aug_sep_okt_nov_dec".split("_");function ed(e){return 1<e&&e<5}function ad(e,a,t,s){var n=e+" ";switch(t){case"s":return a||s?"p\xe1r sek\xfand":"p\xe1r sekundami";case"ss":return a||s?n+(ed(e)?"sekundy":"sek\xfand"):n+"sekundami";break;case"m":return a?"min\xfata":s?"min\xfatu":"min\xfatou";case"mm":return a||s?n+(ed(e)?"min\xfaty":"min\xfat"):n+"min\xfatami";break;case"h":return a?"hodina":s?"hodinu":"hodinou";case"hh":return a||s?n+(ed(e)?"hodiny":"hod\xedn"):n+"hodinami";break;case"d":return a||s?"de\u0148":"d\u0148om";case"dd":return a||s?n+(ed(e)?"dni":"dn\xed"):n+"d\u0148ami";break;case"M":return a||s?"mesiac":"mesiacom";case"MM":return a||s?n+(ed(e)?"mesiace":"mesiacov"):n+"mesiacmi";break;case"y":return a||s?"rok":"rokom";case"yy":return a||s?n+(ed(e)?"roky":"rokov"):n+"rokmi";break}}function td(e,a,t,s){var n=e+" ";switch(t){case"s":return a||s?"nekaj sekund":"nekaj sekundami";case"ss":return n+=1===e?a?"sekundo":"sekundi":2===e?a||s?"sekundi":"sekundah":e<5?a||s?"sekunde":"sekundah":"sekund";case"m":return a?"ena minuta":"eno minuto";case"mm":return n+=1===e?a?"minuta":"minuto":2===e?a||s?"minuti":"minutama":e<5?a||s?"minute":"minutami":a||s?"minut":"minutami";case"h":return a?"ena ura":"eno uro";case"hh":return n+=1===e?a?"ura":"uro":2===e?a||s?"uri":"urama":e<5?a||s?"ure":"urami":a||s?"ur":"urami";case"d":return a||s?"en dan":"enim dnem";case"dd":return n+=1===e?a||s?"dan":"dnem":2===e?a||s?"dni":"dnevoma":a||s?"dni":"dnevi";case"M":return a||s?"en mesec":"enim mesecem";case"MM":return n+=1===e?a||s?"mesec":"mesecem":2===e?a||s?"meseca":"mesecema":e<5?a||s?"mesece":"meseci":a||s?"mesecev":"meseci";case"y":return a||s?"eno leto":"enim letom";case"yy":return n+=1===e?a||s?"leto":"letom":2===e?a||s?"leti":"letoma":e<5?a||s?"leta":"leti":a||s?"let":"leti"}}l.defineLocale("sk",{months:Qn,monthsShort:Xn,weekdays:"nede\u013ea_pondelok_utorok_streda_\u0161tvrtok_piatok_sobota".split("_"),weekdaysShort:"ne_po_ut_st_\u0161t_pi_so".split("_"),weekdaysMin:"ne_po_ut_st_\u0161t_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\u013eu o] LT";case 1:case 2:return"[v] dddd [o] LT";case 3:return"[v stredu o] LT";case 4:return"[vo \u0161tvrtok o] LT";case 5:return"[v piatok o] LT";case 6:return"[v sobotu o] LT"}},lastDay:"[v\u010dera o] LT",lastWeek:function(){switch(this.day()){case 0:return"[minul\xfa nede\u013eu o] LT";case 1:case 2:return"[minul\xfd] dddd [o] LT";case 3:return"[minul\xfa stredu o] LT";case 4:case 5:return"[minul\xfd] dddd [o] LT";case 6:return"[minul\xfa sobotu o] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"pred %s",s:ad,ss:ad,m:ad,mm:ad,h:ad,hh:ad,d:ad,dd:ad,M:ad,MM:ad,y:ad,yy:ad},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}}),l.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_\u010detrtek_petek_sobota".split("_"),weekdaysShort:"ned._pon._tor._sre._\u010det._pet._sob.".split("_"),weekdaysMin:"ne_po_to_sr_\u010de_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\u010deraj ob] LT",lastWeek:function(){switch(this.day()){case 0:return"[prej\u0161njo] [nedeljo] [ob] LT";case 3:return"[prej\u0161njo] [sredo] [ob] LT";case 6:return"[prej\u0161njo] [soboto] [ob] LT";case 1:case 2:case 4:case 5:return"[prej\u0161nji] dddd [ob] LT"}},sameElse:"L"},relativeTime:{future:"\u010dez %s",past:"pred %s",s:td,ss:td,m:td,mm:td,h:td,hh:td,d:td,dd:td,M:td,MM:td,y:td,yy:td},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}}),l.defineLocale("sq",{months:"Janar_Shkurt_Mars_Prill_Maj_Qershor_Korrik_Gusht_Shtator_Tetor_N\xebntor_Dhjetor".split("_"),monthsShort:"Jan_Shk_Mar_Pri_Maj_Qer_Kor_Gus_Sht_Tet_N\xebn_Dhj".split("_"),weekdays:"E Diel_E H\xebn\xeb_E Mart\xeb_E M\xebrkur\xeb_E Enjte_E Premte_E Shtun\xeb".split("_"),weekdaysShort:"Die_H\xebn_Mar_M\xebr_Enj_Pre_Sht".split("_"),weekdaysMin:"D_H_Ma_M\xeb_E_P_Sh".split("_"),weekdaysParseExact:!0,meridiemParse:/PD|MD/,isPM:function(e){return"M"===e.charAt(0)},meridiem:function(e,a,t){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\xeb] LT",nextDay:"[Nes\xebr n\xeb] LT",nextWeek:"dddd [n\xeb] LT",lastDay:"[Dje n\xeb] LT",lastWeek:"dddd [e kaluar n\xeb] LT",sameElse:"L"},relativeTime:{future:"n\xeb %s",past:"%s m\xeb par\xeb",s:"disa sekonda",ss:"%d sekonda",m:"nj\xeb minut\xeb",mm:"%d minuta",h:"nj\xeb or\xeb",hh:"%d or\xeb",d:"nj\xeb dit\xeb",dd:"%d dit\xeb",M:"nj\xeb muaj",MM:"%d muaj",y:"nj\xeb vit",yy:"%d vite"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});var sd={words:{ss:["\u0441\u0435\u043a\u0443\u043d\u0434\u0430","\u0441\u0435\u043a\u0443\u043d\u0434\u0435","\u0441\u0435\u043a\u0443\u043d\u0434\u0438"],m:["\u0458\u0435\u0434\u0430\u043d \u043c\u0438\u043d\u0443\u0442","\u0458\u0435\u0434\u043d\u0435 \u043c\u0438\u043d\u0443\u0442\u0435"],mm:["\u043c\u0438\u043d\u0443\u0442","\u043c\u0438\u043d\u0443\u0442\u0435","\u043c\u0438\u043d\u0443\u0442\u0430"],h:["\u0458\u0435\u0434\u0430\u043d \u0441\u0430\u0442","\u0458\u0435\u0434\u043d\u043e\u0433 \u0441\u0430\u0442\u0430"],hh:["\u0441\u0430\u0442","\u0441\u0430\u0442\u0430","\u0441\u0430\u0442\u0438"],dd:["\u0434\u0430\u043d","\u0434\u0430\u043d\u0430","\u0434\u0430\u043d\u0430"],MM:["\u043c\u0435\u0441\u0435\u0446","\u043c\u0435\u0441\u0435\u0446\u0430","\u043c\u0435\u0441\u0435\u0446\u0438"],yy:["\u0433\u043e\u0434\u0438\u043d\u0430","\u0433\u043e\u0434\u0438\u043d\u0435","\u0433\u043e\u0434\u0438\u043d\u0430"]},correctGrammaticalCase:function(e,a){return 1===e?a[0]:2<=e&&e<=4?a[1]:a[2]},translate:function(e,a,t){var s=sd.words[t];return 1===t.length?a?s[0]:s[1]:e+" "+sd.correctGrammaticalCase(e,s)}};l.defineLocale("sr-cyrl",{months:"\u0458\u0430\u043d\u0443\u0430\u0440_\u0444\u0435\u0431\u0440\u0443\u0430\u0440_\u043c\u0430\u0440\u0442_\u0430\u043f\u0440\u0438\u043b_\u043c\u0430\u0458_\u0458\u0443\u043d_\u0458\u0443\u043b_\u0430\u0432\u0433\u0443\u0441\u0442_\u0441\u0435\u043f\u0442\u0435\u043c\u0431\u0430\u0440_\u043e\u043a\u0442\u043e\u0431\u0430\u0440_\u043d\u043e\u0432\u0435\u043c\u0431\u0430\u0440_\u0434\u0435\u0446\u0435\u043c\u0431\u0430\u0440".split("_"),monthsShort:"\u0458\u0430\u043d._\u0444\u0435\u0431._\u043c\u0430\u0440._\u0430\u043f\u0440._\u043c\u0430\u0458_\u0458\u0443\u043d_\u0458\u0443\u043b_\u0430\u0432\u0433._\u0441\u0435\u043f._\u043e\u043a\u0442._\u043d\u043e\u0432._\u0434\u0435\u0446.".split("_"),monthsParseExact:!0,weekdays:"\u043d\u0435\u0434\u0435\u0459\u0430_\u043f\u043e\u043d\u0435\u0434\u0435\u0459\u0430\u043a_\u0443\u0442\u043e\u0440\u0430\u043a_\u0441\u0440\u0435\u0434\u0430_\u0447\u0435\u0442\u0432\u0440\u0442\u0430\u043a_\u043f\u0435\u0442\u0430\u043a_\u0441\u0443\u0431\u043e\u0442\u0430".split("_"),weekdaysShort:"\u043d\u0435\u0434._\u043f\u043e\u043d._\u0443\u0442\u043e._\u0441\u0440\u0435._\u0447\u0435\u0442._\u043f\u0435\u0442._\u0441\u0443\u0431.".split("_"),weekdaysMin:"\u043d\u0435_\u043f\u043e_\u0443\u0442_\u0441\u0440_\u0447\u0435_\u043f\u0435_\u0441\u0443".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:"[\u0434\u0430\u043d\u0430\u0441 \u0443] LT",nextDay:"[\u0441\u0443\u0442\u0440\u0430 \u0443] LT",nextWeek:function(){switch(this.day()){case 0:return"[\u0443] [\u043d\u0435\u0434\u0435\u0459\u0443] [\u0443] LT";case 3:return"[\u0443] [\u0441\u0440\u0435\u0434\u0443] [\u0443] LT";case 6:return"[\u0443] [\u0441\u0443\u0431\u043e\u0442\u0443] [\u0443] LT";case 1:case 2:case 4:case 5:return"[\u0443] dddd [\u0443] LT"}},lastDay:"[\u0458\u0443\u0447\u0435 \u0443] LT",lastWeek:function(){return["[\u043f\u0440\u043e\u0448\u043b\u0435] [\u043d\u0435\u0434\u0435\u0459\u0435] [\u0443] LT","[\u043f\u0440\u043e\u0448\u043b\u043e\u0433] [\u043f\u043e\u043d\u0435\u0434\u0435\u0459\u043a\u0430] [\u0443] LT","[\u043f\u0440\u043e\u0448\u043b\u043e\u0433] [\u0443\u0442\u043e\u0440\u043a\u0430] [\u0443] LT","[\u043f\u0440\u043e\u0448\u043b\u0435] [\u0441\u0440\u0435\u0434\u0435] [\u0443] LT","[\u043f\u0440\u043e\u0448\u043b\u043e\u0433] [\u0447\u0435\u0442\u0432\u0440\u0442\u043a\u0430] [\u0443] LT","[\u043f\u0440\u043e\u0448\u043b\u043e\u0433] [\u043f\u0435\u0442\u043a\u0430] [\u0443] LT","[\u043f\u0440\u043e\u0448\u043b\u0435] [\u0441\u0443\u0431\u043e\u0442\u0435] [\u0443] LT"][this.day()]},sameElse:"L"},relativeTime:{future:"\u0437\u0430 %s",past:"\u043f\u0440\u0435 %s",s:"\u043d\u0435\u043a\u043e\u043b\u0438\u043a\u043e \u0441\u0435\u043a\u0443\u043d\u0434\u0438",ss:sd.translate,m:sd.translate,mm:sd.translate,h:sd.translate,hh:sd.translate,d:"\u0434\u0430\u043d",dd:sd.translate,M:"\u043c\u0435\u0441\u0435\u0446",MM:sd.translate,y:"\u0433\u043e\u0434\u0438\u043d\u0443",yy:sd.translate},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}});var nd={words:{ss:["sekunda","sekunde","sekundi"],m:["jedan minut","jedne minute"],mm:["minut","minute","minuta"],h:["jedan sat","jednog sata"],hh:["sat","sata","sati"],dd:["dan","dana","dana"],MM:["mesec","meseca","meseci"],yy:["godina","godine","godina"]},correctGrammaticalCase:function(e,a){return 1===e?a[0]:2<=e&&e<=4?a[1]:a[2]},translate:function(e,a,t){var s=nd.words[t];return 1===t.length?a?s[0]:s[1]:e+" "+nd.correctGrammaticalCase(e,s)}};l.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_\u010detvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sre._\u010det._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_\u010de_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] [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\u010de u] LT",lastWeek:function(){return["[pro\u0161le] [nedelje] [u] LT","[pro\u0161log] [ponedeljka] [u] LT","[pro\u0161log] [utorka] [u] LT","[pro\u0161le] [srede] [u] LT","[pro\u0161log] [\u010detvrtka] [u] LT","[pro\u0161log] [petka] [u] LT","[pro\u0161le] [subote] [u] LT"][this.day()]},sameElse:"L"},relativeTime:{future:"za %s",past:"pre %s",s:"nekoliko sekundi",ss:nd.translate,m:nd.translate,mm:nd.translate,h:nd.translate,hh:nd.translate,d:"dan",dd:nd.translate,M:"mesec",MM:nd.translate,y:"godinu",yy:nd.translate},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}}),l.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",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:"[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,a,t){return e<11?"ekuseni":e<15?"emini":e<19?"entsambama":"ebusuku"},meridiemHour:function(e,a){return 12===e&&(e=0),"ekuseni"===a?e:"emini"===a?11<=e?e:e+12:"entsambama"===a||"ebusuku"===a?0===e?0:e+12:void 0},dayOfMonthOrdinalParse:/\d{1,2}/,ordinal:"%d",week:{dow:1,doy:4}}),l.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\xf6ndag_m\xe5ndag_tisdag_onsdag_torsdag_fredag_l\xf6rdag".split("_"),weekdaysShort:"s\xf6n_m\xe5n_tis_ons_tor_fre_l\xf6r".split("_"),weekdaysMin:"s\xf6_m\xe5_ti_on_to_fr_l\xf6".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\xe5r] LT",nextWeek:"[P\xe5] dddd LT",lastWeek:"[I] dddd[s] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"f\xf6r %s sedan",s:"n\xe5gra 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\xe5nad",MM:"%d m\xe5nader",y:"ett \xe5r",yy:"%d \xe5r"},dayOfMonthOrdinalParse:/\d{1,2}(e|a)/,ordinal:function(e){var a=e%10;return e+(1==~~(e%100/10)?"e":1===a?"a":2===a?"a":"e")},week:{dow:1,doy:4}}),l.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",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:"masiku %d",M:"mwezi mmoja",MM:"miezi %d",y:"mwaka mmoja",yy:"miaka %d"},week:{dow:1,doy:7}});var dd={1:"\u0be7",2:"\u0be8",3:"\u0be9",4:"\u0bea",5:"\u0beb",6:"\u0bec",7:"\u0bed",8:"\u0bee",9:"\u0bef",0:"\u0be6"},rd={"\u0be7":"1","\u0be8":"2","\u0be9":"3","\u0bea":"4","\u0beb":"5","\u0bec":"6","\u0bed":"7","\u0bee":"8","\u0bef":"9","\u0be6":"0"};l.defineLocale("ta",{months:"\u0b9c\u0ba9\u0bb5\u0bb0\u0bbf_\u0baa\u0bbf\u0baa\u0bcd\u0bb0\u0bb5\u0bb0\u0bbf_\u0bae\u0bbe\u0bb0\u0bcd\u0b9a\u0bcd_\u0b8f\u0baa\u0bcd\u0bb0\u0bb2\u0bcd_\u0bae\u0bc7_\u0b9c\u0bc2\u0ba9\u0bcd_\u0b9c\u0bc2\u0bb2\u0bc8_\u0b86\u0b95\u0bb8\u0bcd\u0b9f\u0bcd_\u0b9a\u0bc6\u0baa\u0bcd\u0b9f\u0bc6\u0bae\u0bcd\u0baa\u0bb0\u0bcd_\u0b85\u0b95\u0bcd\u0b9f\u0bc7\u0bbe\u0baa\u0bb0\u0bcd_\u0ba8\u0bb5\u0bae\u0bcd\u0baa\u0bb0\u0bcd_\u0b9f\u0bbf\u0b9a\u0bae\u0bcd\u0baa\u0bb0\u0bcd".split("_"),monthsShort:"\u0b9c\u0ba9\u0bb5\u0bb0\u0bbf_\u0baa\u0bbf\u0baa\u0bcd\u0bb0\u0bb5\u0bb0\u0bbf_\u0bae\u0bbe\u0bb0\u0bcd\u0b9a\u0bcd_\u0b8f\u0baa\u0bcd\u0bb0\u0bb2\u0bcd_\u0bae\u0bc7_\u0b9c\u0bc2\u0ba9\u0bcd_\u0b9c\u0bc2\u0bb2\u0bc8_\u0b86\u0b95\u0bb8\u0bcd\u0b9f\u0bcd_\u0b9a\u0bc6\u0baa\u0bcd\u0b9f\u0bc6\u0bae\u0bcd\u0baa\u0bb0\u0bcd_\u0b85\u0b95\u0bcd\u0b9f\u0bc7\u0bbe\u0baa\u0bb0\u0bcd_\u0ba8\u0bb5\u0bae\u0bcd\u0baa\u0bb0\u0bcd_\u0b9f\u0bbf\u0b9a\u0bae\u0bcd\u0baa\u0bb0\u0bcd".split("_"),weekdays:"\u0b9e\u0bbe\u0baf\u0bbf\u0bb1\u0bcd\u0bb1\u0bc1\u0b95\u0bcd\u0b95\u0bbf\u0bb4\u0bae\u0bc8_\u0ba4\u0bbf\u0b99\u0bcd\u0b95\u0b9f\u0bcd\u0b95\u0bbf\u0bb4\u0bae\u0bc8_\u0b9a\u0bc6\u0bb5\u0bcd\u0bb5\u0bbe\u0baf\u0bcd\u0b95\u0bbf\u0bb4\u0bae\u0bc8_\u0baa\u0bc1\u0ba4\u0ba9\u0bcd\u0b95\u0bbf\u0bb4\u0bae\u0bc8_\u0bb5\u0bbf\u0baf\u0bbe\u0bb4\u0b95\u0bcd\u0b95\u0bbf\u0bb4\u0bae\u0bc8_\u0bb5\u0bc6\u0bb3\u0bcd\u0bb3\u0bbf\u0b95\u0bcd\u0b95\u0bbf\u0bb4\u0bae\u0bc8_\u0b9a\u0ba9\u0bbf\u0b95\u0bcd\u0b95\u0bbf\u0bb4\u0bae\u0bc8".split("_"),weekdaysShort:"\u0b9e\u0bbe\u0baf\u0bbf\u0bb1\u0bc1_\u0ba4\u0bbf\u0b99\u0bcd\u0b95\u0bb3\u0bcd_\u0b9a\u0bc6\u0bb5\u0bcd\u0bb5\u0bbe\u0baf\u0bcd_\u0baa\u0bc1\u0ba4\u0ba9\u0bcd_\u0bb5\u0bbf\u0baf\u0bbe\u0bb4\u0ba9\u0bcd_\u0bb5\u0bc6\u0bb3\u0bcd\u0bb3\u0bbf_\u0b9a\u0ba9\u0bbf".split("_"),weekdaysMin:"\u0b9e\u0bbe_\u0ba4\u0bbf_\u0b9a\u0bc6_\u0baa\u0bc1_\u0bb5\u0bbf_\u0bb5\u0bc6_\u0b9a".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:"[\u0b87\u0ba9\u0bcd\u0bb1\u0bc1] LT",nextDay:"[\u0ba8\u0bbe\u0bb3\u0bc8] LT",nextWeek:"dddd, LT",lastDay:"[\u0ba8\u0bc7\u0bb1\u0bcd\u0bb1\u0bc1] LT",lastWeek:"[\u0b95\u0b9f\u0ba8\u0bcd\u0ba4 \u0bb5\u0bbe\u0bb0\u0bae\u0bcd] dddd, LT",sameElse:"L"},relativeTime:{future:"%s \u0b87\u0bb2\u0bcd",past:"%s \u0bae\u0bc1\u0ba9\u0bcd",s:"\u0b92\u0bb0\u0bc1 \u0b9a\u0bbf\u0bb2 \u0bb5\u0bbf\u0ba8\u0bbe\u0b9f\u0bbf\u0b95\u0bb3\u0bcd",ss:"%d \u0bb5\u0bbf\u0ba8\u0bbe\u0b9f\u0bbf\u0b95\u0bb3\u0bcd",m:"\u0b92\u0bb0\u0bc1 \u0ba8\u0bbf\u0bae\u0bbf\u0b9f\u0bae\u0bcd",mm:"%d \u0ba8\u0bbf\u0bae\u0bbf\u0b9f\u0b99\u0bcd\u0b95\u0bb3\u0bcd",h:"\u0b92\u0bb0\u0bc1 \u0bae\u0ba3\u0bbf \u0ba8\u0bc7\u0bb0\u0bae\u0bcd",hh:"%d \u0bae\u0ba3\u0bbf \u0ba8\u0bc7\u0bb0\u0bae\u0bcd",d:"\u0b92\u0bb0\u0bc1 \u0ba8\u0bbe\u0bb3\u0bcd",dd:"%d \u0ba8\u0bbe\u0b9f\u0bcd\u0b95\u0bb3\u0bcd",M:"\u0b92\u0bb0\u0bc1 \u0bae\u0bbe\u0ba4\u0bae\u0bcd",MM:"%d \u0bae\u0bbe\u0ba4\u0b99\u0bcd\u0b95\u0bb3\u0bcd",y:"\u0b92\u0bb0\u0bc1 \u0bb5\u0bb0\u0bc1\u0b9f\u0bae\u0bcd",yy:"%d \u0b86\u0ba3\u0bcd\u0b9f\u0bc1\u0b95\u0bb3\u0bcd"},dayOfMonthOrdinalParse:/\d{1,2}\u0bb5\u0ba4\u0bc1/,ordinal:function(e){return e+"\u0bb5\u0ba4\u0bc1"},preparse:function(e){return e.replace(/[\u0be7\u0be8\u0be9\u0bea\u0beb\u0bec\u0bed\u0bee\u0bef\u0be6]/g,function(e){return rd[e]})},postformat:function(e){return e.replace(/\d/g,function(e){return dd[e]})},meridiemParse:/\u0baf\u0bbe\u0bae\u0bae\u0bcd|\u0bb5\u0bc8\u0b95\u0bb1\u0bc8|\u0b95\u0bbe\u0bb2\u0bc8|\u0ba8\u0ba3\u0bcd\u0baa\u0b95\u0bb2\u0bcd|\u0b8e\u0bb1\u0bcd\u0baa\u0bbe\u0b9f\u0bc1|\u0bae\u0bbe\u0bb2\u0bc8/,meridiem:function(e,a,t){return e<2?" \u0baf\u0bbe\u0bae\u0bae\u0bcd":e<6?" \u0bb5\u0bc8\u0b95\u0bb1\u0bc8":e<10?" \u0b95\u0bbe\u0bb2\u0bc8":e<14?" \u0ba8\u0ba3\u0bcd\u0baa\u0b95\u0bb2\u0bcd":e<18?" \u0b8e\u0bb1\u0bcd\u0baa\u0bbe\u0b9f\u0bc1":e<22?" \u0bae\u0bbe\u0bb2\u0bc8":" \u0baf\u0bbe\u0bae\u0bae\u0bcd"},meridiemHour:function(e,a){return 12===e&&(e=0),"\u0baf\u0bbe\u0bae\u0bae\u0bcd"===a?e<2?e:e+12:"\u0bb5\u0bc8\u0b95\u0bb1\u0bc8"===a||"\u0b95\u0bbe\u0bb2\u0bc8"===a?e:"\u0ba8\u0ba3\u0bcd\u0baa\u0b95\u0bb2\u0bcd"===a&&10<=e?e:e+12},week:{dow:0,doy:6}}),l.defineLocale("te",{months:"\u0c1c\u0c28\u0c35\u0c30\u0c3f_\u0c2b\u0c3f\u0c2c\u0c4d\u0c30\u0c35\u0c30\u0c3f_\u0c2e\u0c3e\u0c30\u0c4d\u0c1a\u0c3f_\u0c0f\u0c2a\u0c4d\u0c30\u0c3f\u0c32\u0c4d_\u0c2e\u0c47_\u0c1c\u0c42\u0c28\u0c4d_\u0c1c\u0c41\u0c32\u0c48_\u0c06\u0c17\u0c38\u0c4d\u0c1f\u0c41_\u0c38\u0c46\u0c2a\u0c4d\u0c1f\u0c46\u0c02\u0c2c\u0c30\u0c4d_\u0c05\u0c15\u0c4d\u0c1f\u0c4b\u0c2c\u0c30\u0c4d_\u0c28\u0c35\u0c02\u0c2c\u0c30\u0c4d_\u0c21\u0c3f\u0c38\u0c46\u0c02\u0c2c\u0c30\u0c4d".split("_"),monthsShort:"\u0c1c\u0c28._\u0c2b\u0c3f\u0c2c\u0c4d\u0c30._\u0c2e\u0c3e\u0c30\u0c4d\u0c1a\u0c3f_\u0c0f\u0c2a\u0c4d\u0c30\u0c3f._\u0c2e\u0c47_\u0c1c\u0c42\u0c28\u0c4d_\u0c1c\u0c41\u0c32\u0c48_\u0c06\u0c17._\u0c38\u0c46\u0c2a\u0c4d._\u0c05\u0c15\u0c4d\u0c1f\u0c4b._\u0c28\u0c35._\u0c21\u0c3f\u0c38\u0c46.".split("_"),monthsParseExact:!0,weekdays:"\u0c06\u0c26\u0c3f\u0c35\u0c3e\u0c30\u0c02_\u0c38\u0c4b\u0c2e\u0c35\u0c3e\u0c30\u0c02_\u0c2e\u0c02\u0c17\u0c33\u0c35\u0c3e\u0c30\u0c02_\u0c2c\u0c41\u0c27\u0c35\u0c3e\u0c30\u0c02_\u0c17\u0c41\u0c30\u0c41\u0c35\u0c3e\u0c30\u0c02_\u0c36\u0c41\u0c15\u0c4d\u0c30\u0c35\u0c3e\u0c30\u0c02_\u0c36\u0c28\u0c3f\u0c35\u0c3e\u0c30\u0c02".split("_"),weekdaysShort:"\u0c06\u0c26\u0c3f_\u0c38\u0c4b\u0c2e_\u0c2e\u0c02\u0c17\u0c33_\u0c2c\u0c41\u0c27_\u0c17\u0c41\u0c30\u0c41_\u0c36\u0c41\u0c15\u0c4d\u0c30_\u0c36\u0c28\u0c3f".split("_"),weekdaysMin:"\u0c06_\u0c38\u0c4b_\u0c2e\u0c02_\u0c2c\u0c41_\u0c17\u0c41_\u0c36\u0c41_\u0c36".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:"[\u0c28\u0c47\u0c21\u0c41] LT",nextDay:"[\u0c30\u0c47\u0c2a\u0c41] LT",nextWeek:"dddd, LT",lastDay:"[\u0c28\u0c3f\u0c28\u0c4d\u0c28] LT",lastWeek:"[\u0c17\u0c24] dddd, LT",sameElse:"L"},relativeTime:{future:"%s \u0c32\u0c4b",past:"%s \u0c15\u0c4d\u0c30\u0c3f\u0c24\u0c02",s:"\u0c15\u0c4a\u0c28\u0c4d\u0c28\u0c3f \u0c15\u0c4d\u0c37\u0c23\u0c3e\u0c32\u0c41",ss:"%d \u0c38\u0c46\u0c15\u0c28\u0c4d\u0c32\u0c41",m:"\u0c12\u0c15 \u0c28\u0c3f\u0c2e\u0c3f\u0c37\u0c02",mm:"%d \u0c28\u0c3f\u0c2e\u0c3f\u0c37\u0c3e\u0c32\u0c41",h:"\u0c12\u0c15 \u0c17\u0c02\u0c1f",hh:"%d \u0c17\u0c02\u0c1f\u0c32\u0c41",d:"\u0c12\u0c15 \u0c30\u0c4b\u0c1c\u0c41",dd:"%d \u0c30\u0c4b\u0c1c\u0c41\u0c32\u0c41",M:"\u0c12\u0c15 \u0c28\u0c46\u0c32",MM:"%d \u0c28\u0c46\u0c32\u0c32\u0c41",y:"\u0c12\u0c15 \u0c38\u0c02\u0c35\u0c24\u0c4d\u0c38\u0c30\u0c02",yy:"%d \u0c38\u0c02\u0c35\u0c24\u0c4d\u0c38\u0c30\u0c3e\u0c32\u0c41"},dayOfMonthOrdinalParse:/\d{1,2}\u0c35/,ordinal:"%d\u0c35",meridiemParse:/\u0c30\u0c3e\u0c24\u0c4d\u0c30\u0c3f|\u0c09\u0c26\u0c2f\u0c02|\u0c2e\u0c27\u0c4d\u0c2f\u0c3e\u0c39\u0c4d\u0c28\u0c02|\u0c38\u0c3e\u0c2f\u0c02\u0c24\u0c4d\u0c30\u0c02/,meridiemHour:function(e,a){return 12===e&&(e=0),"\u0c30\u0c3e\u0c24\u0c4d\u0c30\u0c3f"===a?e<4?e:e+12:"\u0c09\u0c26\u0c2f\u0c02"===a?e:"\u0c2e\u0c27\u0c4d\u0c2f\u0c3e\u0c39\u0c4d\u0c28\u0c02"===a?10<=e?e:e+12:"\u0c38\u0c3e\u0c2f\u0c02\u0c24\u0c4d\u0c30\u0c02"===a?e+12:void 0},meridiem:function(e,a,t){return e<4?"\u0c30\u0c3e\u0c24\u0c4d\u0c30\u0c3f":e<10?"\u0c09\u0c26\u0c2f\u0c02":e<17?"\u0c2e\u0c27\u0c4d\u0c2f\u0c3e\u0c39\u0c4d\u0c28\u0c02":e<20?"\u0c38\u0c3e\u0c2f\u0c02\u0c24\u0c4d\u0c30\u0c02":"\u0c30\u0c3e\u0c24\u0c4d\u0c30\u0c3f"},week:{dow:0,doy:6}}),l.defineLocale("tet",{months:"Janeiru_Fevereiru_Marsu_Abril_Maiu_Ju\xf1u_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:"minutu balun",ss:"minutu %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 a=e%10;return e+(1==~~(e%100/10)?"th":1===a?"st":2===a?"nd":3===a?"rd":"th")},week:{dow:1,doy:4}});var _d={0:"-\u0443\u043c",1:"-\u0443\u043c",2:"-\u044e\u043c",3:"-\u044e\u043c",4:"-\u0443\u043c",5:"-\u0443\u043c",6:"-\u0443\u043c",7:"-\u0443\u043c",8:"-\u0443\u043c",9:"-\u0443\u043c",10:"-\u0443\u043c",12:"-\u0443\u043c",13:"-\u0443\u043c",20:"-\u0443\u043c",30:"-\u044e\u043c",40:"-\u0443\u043c",50:"-\u0443\u043c",60:"-\u0443\u043c",70:"-\u0443\u043c",80:"-\u0443\u043c",90:"-\u0443\u043c",100:"-\u0443\u043c"};l.defineLocale("tg",{months:"\u044f\u043d\u0432\u0430\u0440_\u0444\u0435\u0432\u0440\u0430\u043b_\u043c\u0430\u0440\u0442_\u0430\u043f\u0440\u0435\u043b_\u043c\u0430\u0439_\u0438\u044e\u043d_\u0438\u044e\u043b_\u0430\u0432\u0433\u0443\u0441\u0442_\u0441\u0435\u043d\u0442\u044f\u0431\u0440_\u043e\u043a\u0442\u044f\u0431\u0440_\u043d\u043e\u044f\u0431\u0440_\u0434\u0435\u043a\u0430\u0431\u0440".split("_"),monthsShort:"\u044f\u043d\u0432_\u0444\u0435\u0432_\u043c\u0430\u0440_\u0430\u043f\u0440_\u043c\u0430\u0439_\u0438\u044e\u043d_\u0438\u044e\u043b_\u0430\u0432\u0433_\u0441\u0435\u043d_\u043e\u043a\u0442_\u043d\u043e\u044f_\u0434\u0435\u043a".split("_"),weekdays:"\u044f\u043a\u0448\u0430\u043d\u0431\u0435_\u0434\u0443\u0448\u0430\u043d\u0431\u0435_\u0441\u0435\u0448\u0430\u043d\u0431\u0435_\u0447\u043e\u0440\u0448\u0430\u043d\u0431\u0435_\u043f\u0430\u043d\u04b7\u0448\u0430\u043d\u0431\u0435_\u04b7\u0443\u043c\u044a\u0430_\u0448\u0430\u043d\u0431\u0435".split("_"),weekdaysShort:"\u044f\u0448\u0431_\u0434\u0448\u0431_\u0441\u0448\u0431_\u0447\u0448\u0431_\u043f\u0448\u0431_\u04b7\u0443\u043c_\u0448\u043d\u0431".split("_"),weekdaysMin:"\u044f\u0448_\u0434\u0448_\u0441\u0448_\u0447\u0448_\u043f\u0448_\u04b7\u043c_\u0448\u0431".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:"[\u0418\u043c\u0440\u04ef\u0437 \u0441\u043e\u0430\u0442\u0438] LT",nextDay:"[\u041f\u0430\u0433\u043e\u04b3 \u0441\u043e\u0430\u0442\u0438] LT",lastDay:"[\u0414\u0438\u0440\u04ef\u0437 \u0441\u043e\u0430\u0442\u0438] LT",nextWeek:"dddd[\u0438] [\u04b3\u0430\u0444\u0442\u0430\u0438 \u043e\u044f\u043d\u0434\u0430 \u0441\u043e\u0430\u0442\u0438] LT",lastWeek:"dddd[\u0438] [\u04b3\u0430\u0444\u0442\u0430\u0438 \u0433\u0443\u0437\u0430\u0448\u0442\u0430 \u0441\u043e\u0430\u0442\u0438] LT",sameElse:"L"},relativeTime:{future:"\u0431\u0430\u044a\u0434\u0438 %s",past:"%s \u043f\u0435\u0448",s:"\u044f\u043a\u0447\u0430\u043d\u0434 \u0441\u043e\u043d\u0438\u044f",m:"\u044f\u043a \u0434\u0430\u049b\u0438\u049b\u0430",mm:"%d \u0434\u0430\u049b\u0438\u049b\u0430",h:"\u044f\u043a \u0441\u043e\u0430\u0442",hh:"%d \u0441\u043e\u0430\u0442",d:"\u044f\u043a \u0440\u04ef\u0437",dd:"%d \u0440\u04ef\u0437",M:"\u044f\u043a \u043c\u043e\u04b3",MM:"%d \u043c\u043e\u04b3",y:"\u044f\u043a \u0441\u043e\u043b",yy:"%d \u0441\u043e\u043b"},meridiemParse:/\u0448\u0430\u0431|\u0441\u0443\u0431\u04b3|\u0440\u04ef\u0437|\u0431\u0435\u0433\u043e\u04b3/,meridiemHour:function(e,a){return 12===e&&(e=0),"\u0448\u0430\u0431"===a?e<4?e:e+12:"\u0441\u0443\u0431\u04b3"===a?e:"\u0440\u04ef\u0437"===a?11<=e?e:e+12:"\u0431\u0435\u0433\u043e\u04b3"===a?e+12:void 0},meridiem:function(e,a,t){return e<4?"\u0448\u0430\u0431":e<11?"\u0441\u0443\u0431\u04b3":e<16?"\u0440\u04ef\u0437":e<19?"\u0431\u0435\u0433\u043e\u04b3":"\u0448\u0430\u0431"},dayOfMonthOrdinalParse:/\d{1,2}-(\u0443\u043c|\u044e\u043c)/,ordinal:function(e){return e+(_d[e]||_d[e%10]||_d[100<=e?100:null])},week:{dow:1,doy:7}}),l.defineLocale("th",{months:"\u0e21\u0e01\u0e23\u0e32\u0e04\u0e21_\u0e01\u0e38\u0e21\u0e20\u0e32\u0e1e\u0e31\u0e19\u0e18\u0e4c_\u0e21\u0e35\u0e19\u0e32\u0e04\u0e21_\u0e40\u0e21\u0e29\u0e32\u0e22\u0e19_\u0e1e\u0e24\u0e29\u0e20\u0e32\u0e04\u0e21_\u0e21\u0e34\u0e16\u0e38\u0e19\u0e32\u0e22\u0e19_\u0e01\u0e23\u0e01\u0e0e\u0e32\u0e04\u0e21_\u0e2a\u0e34\u0e07\u0e2b\u0e32\u0e04\u0e21_\u0e01\u0e31\u0e19\u0e22\u0e32\u0e22\u0e19_\u0e15\u0e38\u0e25\u0e32\u0e04\u0e21_\u0e1e\u0e24\u0e28\u0e08\u0e34\u0e01\u0e32\u0e22\u0e19_\u0e18\u0e31\u0e19\u0e27\u0e32\u0e04\u0e21".split("_"),monthsShort:"\u0e21.\u0e04._\u0e01.\u0e1e._\u0e21\u0e35.\u0e04._\u0e40\u0e21.\u0e22._\u0e1e.\u0e04._\u0e21\u0e34.\u0e22._\u0e01.\u0e04._\u0e2a.\u0e04._\u0e01.\u0e22._\u0e15.\u0e04._\u0e1e.\u0e22._\u0e18.\u0e04.".split("_"),monthsParseExact:!0,weekdays:"\u0e2d\u0e32\u0e17\u0e34\u0e15\u0e22\u0e4c_\u0e08\u0e31\u0e19\u0e17\u0e23\u0e4c_\u0e2d\u0e31\u0e07\u0e04\u0e32\u0e23_\u0e1e\u0e38\u0e18_\u0e1e\u0e24\u0e2b\u0e31\u0e2a\u0e1a\u0e14\u0e35_\u0e28\u0e38\u0e01\u0e23\u0e4c_\u0e40\u0e2a\u0e32\u0e23\u0e4c".split("_"),weekdaysShort:"\u0e2d\u0e32\u0e17\u0e34\u0e15\u0e22\u0e4c_\u0e08\u0e31\u0e19\u0e17\u0e23\u0e4c_\u0e2d\u0e31\u0e07\u0e04\u0e32\u0e23_\u0e1e\u0e38\u0e18_\u0e1e\u0e24\u0e2b\u0e31\u0e2a_\u0e28\u0e38\u0e01\u0e23\u0e4c_\u0e40\u0e2a\u0e32\u0e23\u0e4c".split("_"),weekdaysMin:"\u0e2d\u0e32._\u0e08._\u0e2d._\u0e1e._\u0e1e\u0e24._\u0e28._\u0e2a.".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY \u0e40\u0e27\u0e25\u0e32 H:mm",LLLL:"\u0e27\u0e31\u0e19dddd\u0e17\u0e35\u0e48 D MMMM YYYY \u0e40\u0e27\u0e25\u0e32 H:mm"},meridiemParse:/\u0e01\u0e48\u0e2d\u0e19\u0e40\u0e17\u0e35\u0e48\u0e22\u0e07|\u0e2b\u0e25\u0e31\u0e07\u0e40\u0e17\u0e35\u0e48\u0e22\u0e07/,isPM:function(e){return"\u0e2b\u0e25\u0e31\u0e07\u0e40\u0e17\u0e35\u0e48\u0e22\u0e07"===e},meridiem:function(e,a,t){return e<12?"\u0e01\u0e48\u0e2d\u0e19\u0e40\u0e17\u0e35\u0e48\u0e22\u0e07":"\u0e2b\u0e25\u0e31\u0e07\u0e40\u0e17\u0e35\u0e48\u0e22\u0e07"},calendar:{sameDay:"[\u0e27\u0e31\u0e19\u0e19\u0e35\u0e49 \u0e40\u0e27\u0e25\u0e32] LT",nextDay:"[\u0e1e\u0e23\u0e38\u0e48\u0e07\u0e19\u0e35\u0e49 \u0e40\u0e27\u0e25\u0e32] LT",nextWeek:"dddd[\u0e2b\u0e19\u0e49\u0e32 \u0e40\u0e27\u0e25\u0e32] LT",lastDay:"[\u0e40\u0e21\u0e37\u0e48\u0e2d\u0e27\u0e32\u0e19\u0e19\u0e35\u0e49 \u0e40\u0e27\u0e25\u0e32] LT",lastWeek:"[\u0e27\u0e31\u0e19]dddd[\u0e17\u0e35\u0e48\u0e41\u0e25\u0e49\u0e27 \u0e40\u0e27\u0e25\u0e32] LT",sameElse:"L"},relativeTime:{future:"\u0e2d\u0e35\u0e01 %s",past:"%s\u0e17\u0e35\u0e48\u0e41\u0e25\u0e49\u0e27",s:"\u0e44\u0e21\u0e48\u0e01\u0e35\u0e48\u0e27\u0e34\u0e19\u0e32\u0e17\u0e35",ss:"%d \u0e27\u0e34\u0e19\u0e32\u0e17\u0e35",m:"1 \u0e19\u0e32\u0e17\u0e35",mm:"%d \u0e19\u0e32\u0e17\u0e35",h:"1 \u0e0a\u0e31\u0e48\u0e27\u0e42\u0e21\u0e07",hh:"%d \u0e0a\u0e31\u0e48\u0e27\u0e42\u0e21\u0e07",d:"1 \u0e27\u0e31\u0e19",dd:"%d \u0e27\u0e31\u0e19",M:"1 \u0e40\u0e14\u0e37\u0e2d\u0e19",MM:"%d \u0e40\u0e14\u0e37\u0e2d\u0e19",y:"1 \u0e1b\u0e35",yy:"%d \u0e1b\u0e35"}}),l.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}});var id="pagh_wa\u2019_cha\u2019_wej_loS_vagh_jav_Soch_chorgh_Hut".split("_");function od(e,a,t,s){var n=function(e){var a=Math.floor(e%1e3/100),t=Math.floor(e%100/10),s=e%10,n="";0<a&&(n+=id[a]+"vatlh");0<t&&(n+=(""!==n?" ":"")+id[t]+"maH");0<s&&(n+=(""!==n?" ":"")+id[s]);return""===n?"pagh":n}(e);switch(t){case"ss":return n+" lup";case"mm":return n+" tup";case"hh":return n+" rep";case"dd":return n+" jaj";case"MM":return n+" jar";case"yy":return n+" DIS"}}l.defineLocale("tlh",{months:"tera\u2019 jar wa\u2019_tera\u2019 jar cha\u2019_tera\u2019 jar wej_tera\u2019 jar loS_tera\u2019 jar vagh_tera\u2019 jar jav_tera\u2019 jar Soch_tera\u2019 jar chorgh_tera\u2019 jar Hut_tera\u2019 jar wa\u2019maH_tera\u2019 jar wa\u2019maH wa\u2019_tera\u2019 jar wa\u2019maH cha\u2019".split("_"),monthsShort:"jar wa\u2019_jar cha\u2019_jar wej_jar loS_jar vagh_jar jav_jar Soch_jar chorgh_jar Hut_jar wa\u2019maH_jar wa\u2019maH wa\u2019_jar wa\u2019maH cha\u2019".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\u2019leS] LT",nextWeek:"LLL",lastDay:"[wa\u2019Hu\u2019] LT",lastWeek:"LLL",sameElse:"L"},relativeTime:{future:function(e){var a=e;return a=-1!==e.indexOf("jaj")?a.slice(0,-3)+"leS":-1!==e.indexOf("jar")?a.slice(0,-3)+"waQ":-1!==e.indexOf("DIS")?a.slice(0,-3)+"nem":a+" pIq"},past:function(e){var a=e;return a=-1!==e.indexOf("jaj")?a.slice(0,-3)+"Hu\u2019":-1!==e.indexOf("jar")?a.slice(0,-3)+"wen":-1!==e.indexOf("DIS")?a.slice(0,-3)+"ben":a+" ret"},s:"puS lup",ss:od,m:"wa\u2019 tup",mm:od,h:"wa\u2019 rep",hh:od,d:"wa\u2019 jaj",dd:od,M:"wa\u2019 jar",MM:od,y:"wa\u2019 DIS",yy:od},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});var md={1:"'inci",5:"'inci",8:"'inci",70:"'inci",80:"'inci",2:"'nci",7:"'nci",20:"'nci",50:"'nci",3:"'\xfcnc\xfc",4:"'\xfcnc\xfc",100:"'\xfcnc\xfc",6:"'nc\u0131",9:"'uncu",10:"'uncu",30:"'uncu",60:"'\u0131nc\u0131",90:"'\u0131nc\u0131"};function ud(e,a,t,s){var n={s:["viensas secunds","'iensas secunds"],ss:[e+" secunds",e+" secunds"],m:["'n m\xedut","'iens m\xedut"],mm:[e+" m\xeduts",e+" m\xeduts"],h:["'n \xfeora","'iensa \xfeora"],hh:[e+" \xfeoras",e+" \xfeoras"],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 s?n[t][0]:a?n[t][0]:n[t][1]}function ld(e,a,t){var s,n;return"m"===t?a?"\u0445\u0432\u0438\u043b\u0438\u043d\u0430":"\u0445\u0432\u0438\u043b\u0438\u043d\u0443":"h"===t?a?"\u0433\u043e\u0434\u0438\u043d\u0430":"\u0433\u043e\u0434\u0438\u043d\u0443":e+" "+(s=+e,n={ss:a?"\u0441\u0435\u043a\u0443\u043d\u0434\u0430_\u0441\u0435\u043a\u0443\u043d\u0434\u0438_\u0441\u0435\u043a\u0443\u043d\u0434":"\u0441\u0435\u043a\u0443\u043d\u0434\u0443_\u0441\u0435\u043a\u0443\u043d\u0434\u0438_\u0441\u0435\u043a\u0443\u043d\u0434",mm:a?"\u0445\u0432\u0438\u043b\u0438\u043d\u0430_\u0445\u0432\u0438\u043b\u0438\u043d\u0438_\u0445\u0432\u0438\u043b\u0438\u043d":"\u0445\u0432\u0438\u043b\u0438\u043d\u0443_\u0445\u0432\u0438\u043b\u0438\u043d\u0438_\u0445\u0432\u0438\u043b\u0438\u043d",hh:a?"\u0433\u043e\u0434\u0438\u043d\u0430_\u0433\u043e\u0434\u0438\u043d\u0438_\u0433\u043e\u0434\u0438\u043d":"\u0433\u043e\u0434\u0438\u043d\u0443_\u0433\u043e\u0434\u0438\u043d\u0438_\u0433\u043e\u0434\u0438\u043d",dd:"\u0434\u0435\u043d\u044c_\u0434\u043d\u0456_\u0434\u043d\u0456\u0432",MM:"\u043c\u0456\u0441\u044f\u0446\u044c_\u043c\u0456\u0441\u044f\u0446\u0456_\u043c\u0456\u0441\u044f\u0446\u0456\u0432",yy:"\u0440\u0456\u043a_\u0440\u043e\u043a\u0438_\u0440\u043e\u043a\u0456\u0432"}[t].split("_"),s%10==1&&s%100!=11?n[0]:2<=s%10&&s%10<=4&&(s%100<10||20<=s%100)?n[1]:n[2])}function Md(e){return function(){return e+"\u043e"+(11===this.hours()?"\u0431":"")+"] LT"}}l.defineLocale("tr",{months:"Ocak_\u015eubat_Mart_Nisan_May\u0131s_Haziran_Temmuz_A\u011fustos_Eyl\xfcl_Ekim_Kas\u0131m_Aral\u0131k".split("_"),monthsShort:"Oca_\u015eub_Mar_Nis_May_Haz_Tem_A\u011fu_Eyl_Eki_Kas_Ara".split("_"),weekdays:"Pazar_Pazartesi_Sal\u0131_\xc7ar\u015famba_Per\u015fembe_Cuma_Cumartesi".split("_"),weekdaysShort:"Paz_Pts_Sal_\xc7ar_Per_Cum_Cts".split("_"),weekdaysMin:"Pz_Pt_Sa_\xc7a_Pe_Cu_Ct".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:"[bug\xfcn saat] LT",nextDay:"[yar\u0131n saat] LT",nextWeek:"[gelecek] dddd [saat] LT",lastDay:"[d\xfcn] LT",lastWeek:"[ge\xe7en] dddd [saat] LT",sameElse:"L"},relativeTime:{future:"%s sonra",past:"%s \xf6nce",s:"birka\xe7 saniye",ss:"%d saniye",m:"bir dakika",mm:"%d dakika",h:"bir saat",hh:"%d saat",d:"bir g\xfcn",dd:"%d g\xfcn",M:"bir ay",MM:"%d ay",y:"bir y\u0131l",yy:"%d y\u0131l"},ordinal:function(e,a){switch(a){case"d":case"D":case"Do":case"DD":return e;default:if(0===e)return e+"'\u0131nc\u0131";var t=e%10;return e+(md[t]||md[e%100-t]||md[100<=e?100:null])}},week:{dow:1,doy:7}}),l.defineLocale("tzl",{months:"Januar_Fevraglh_Mar\xe7_Avr\xefu_Mai_G\xfcn_Julia_Guscht_Setemvar_Listop\xe4ts_Noemvar_Zecemvar".split("_"),monthsShort:"Jan_Fev_Mar_Avr_Mai_G\xfcn_Jul_Gus_Set_Lis_Noe_Zec".split("_"),weekdays:"S\xfaladi_L\xfane\xe7i_Maitzi_M\xe1rcuri_Xh\xfaadi_Vi\xe9ner\xe7i_S\xe1turi".split("_"),weekdaysShort:"S\xfal_L\xfan_Mai_M\xe1r_Xh\xfa_Vi\xe9_S\xe1t".split("_"),weekdaysMin:"S\xfa_L\xfa_Ma_M\xe1_Xh_Vi_S\xe1".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,a,t){return 11<e?t?"d'o":"D'O":t?"d'a":"D'A"},calendar:{sameDay:"[oxhi \xe0] LT",nextDay:"[dem\xe0 \xe0] LT",nextWeek:"dddd [\xe0] LT",lastDay:"[ieiri \xe0] LT",lastWeek:"[s\xfcr el] dddd [lasteu \xe0] LT",sameElse:"L"},relativeTime:{future:"osprei %s",past:"ja%s",s:ud,ss:ud,m:ud,mm:ud,h:ud,hh:ud,d:ud,dd:ud,M:ud,MM:ud,y:ud,yy:ud},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}}),l.defineLocale("tzm-latn",{months:"innayr_br\u02e4ayr\u02e4_mar\u02e4s\u02e4_ibrir_mayyw_ywnyw_ywlywz_\u0263w\u0161t_\u0161wtanbir_kt\u02e4wbr\u02e4_nwwanbir_dwjnbir".split("_"),monthsShort:"innayr_br\u02e4ayr\u02e4_mar\u02e4s\u02e4_ibrir_mayyw_ywnyw_ywlywz_\u0263w\u0161t_\u0161wtanbir_kt\u02e4wbr\u02e4_nwwanbir_dwjnbir".split("_"),weekdays:"asamas_aynas_asinas_akras_akwas_asimwas_asi\u1e0dyas".split("_"),weekdaysShort:"asamas_aynas_asinas_akras_akwas_asimwas_asi\u1e0dyas".split("_"),weekdaysMin:"asamas_aynas_asinas_akras_akwas_asimwas_asi\u1e0dyas".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\u1e0d",mm:"%d minu\u1e0d",h:"sa\u025ba",hh:"%d tassa\u025bin",d:"ass",dd:"%d ossan",M:"ayowr",MM:"%d iyyirn",y:"asgas",yy:"%d isgasn"},week:{dow:6,doy:12}}),l.defineLocale("tzm",{months:"\u2d49\u2d4f\u2d4f\u2d30\u2d62\u2d54_\u2d31\u2d55\u2d30\u2d62\u2d55_\u2d4e\u2d30\u2d55\u2d5a_\u2d49\u2d31\u2d54\u2d49\u2d54_\u2d4e\u2d30\u2d62\u2d62\u2d53_\u2d62\u2d53\u2d4f\u2d62\u2d53_\u2d62\u2d53\u2d4d\u2d62\u2d53\u2d63_\u2d56\u2d53\u2d5b\u2d5c_\u2d5b\u2d53\u2d5c\u2d30\u2d4f\u2d31\u2d49\u2d54_\u2d3d\u2d5f\u2d53\u2d31\u2d55_\u2d4f\u2d53\u2d61\u2d30\u2d4f\u2d31\u2d49\u2d54_\u2d37\u2d53\u2d4a\u2d4f\u2d31\u2d49\u2d54".split("_"),monthsShort:"\u2d49\u2d4f\u2d4f\u2d30\u2d62\u2d54_\u2d31\u2d55\u2d30\u2d62\u2d55_\u2d4e\u2d30\u2d55\u2d5a_\u2d49\u2d31\u2d54\u2d49\u2d54_\u2d4e\u2d30\u2d62\u2d62\u2d53_\u2d62\u2d53\u2d4f\u2d62\u2d53_\u2d62\u2d53\u2d4d\u2d62\u2d53\u2d63_\u2d56\u2d53\u2d5b\u2d5c_\u2d5b\u2d53\u2d5c\u2d30\u2d4f\u2d31\u2d49\u2d54_\u2d3d\u2d5f\u2d53\u2d31\u2d55_\u2d4f\u2d53\u2d61\u2d30\u2d4f\u2d31\u2d49\u2d54_\u2d37\u2d53\u2d4a\u2d4f\u2d31\u2d49\u2d54".split("_"),weekdays:"\u2d30\u2d59\u2d30\u2d4e\u2d30\u2d59_\u2d30\u2d62\u2d4f\u2d30\u2d59_\u2d30\u2d59\u2d49\u2d4f\u2d30\u2d59_\u2d30\u2d3d\u2d54\u2d30\u2d59_\u2d30\u2d3d\u2d61\u2d30\u2d59_\u2d30\u2d59\u2d49\u2d4e\u2d61\u2d30\u2d59_\u2d30\u2d59\u2d49\u2d39\u2d62\u2d30\u2d59".split("_"),weekdaysShort:"\u2d30\u2d59\u2d30\u2d4e\u2d30\u2d59_\u2d30\u2d62\u2d4f\u2d30\u2d59_\u2d30\u2d59\u2d49\u2d4f\u2d30\u2d59_\u2d30\u2d3d\u2d54\u2d30\u2d59_\u2d30\u2d3d\u2d61\u2d30\u2d59_\u2d30\u2d59\u2d49\u2d4e\u2d61\u2d30\u2d59_\u2d30\u2d59\u2d49\u2d39\u2d62\u2d30\u2d59".split("_"),weekdaysMin:"\u2d30\u2d59\u2d30\u2d4e\u2d30\u2d59_\u2d30\u2d62\u2d4f\u2d30\u2d59_\u2d30\u2d59\u2d49\u2d4f\u2d30\u2d59_\u2d30\u2d3d\u2d54\u2d30\u2d59_\u2d30\u2d3d\u2d61\u2d30\u2d59_\u2d30\u2d59\u2d49\u2d4e\u2d61\u2d30\u2d59_\u2d30\u2d59\u2d49\u2d39\u2d62\u2d30\u2d59".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:"[\u2d30\u2d59\u2d37\u2d45 \u2d34] LT",nextDay:"[\u2d30\u2d59\u2d3d\u2d30 \u2d34] LT",nextWeek:"dddd [\u2d34] LT",lastDay:"[\u2d30\u2d5a\u2d30\u2d4f\u2d5c \u2d34] LT",lastWeek:"dddd [\u2d34] LT",sameElse:"L"},relativeTime:{future:"\u2d37\u2d30\u2d37\u2d45 \u2d59 \u2d62\u2d30\u2d4f %s",past:"\u2d62\u2d30\u2d4f %s",s:"\u2d49\u2d4e\u2d49\u2d3d",ss:"%d \u2d49\u2d4e\u2d49\u2d3d",m:"\u2d4e\u2d49\u2d4f\u2d53\u2d3a",mm:"%d \u2d4e\u2d49\u2d4f\u2d53\u2d3a",h:"\u2d59\u2d30\u2d44\u2d30",hh:"%d \u2d5c\u2d30\u2d59\u2d59\u2d30\u2d44\u2d49\u2d4f",d:"\u2d30\u2d59\u2d59",dd:"%d o\u2d59\u2d59\u2d30\u2d4f",M:"\u2d30\u2d62o\u2d53\u2d54",MM:"%d \u2d49\u2d62\u2d62\u2d49\u2d54\u2d4f",y:"\u2d30\u2d59\u2d33\u2d30\u2d59",yy:"%d \u2d49\u2d59\u2d33\u2d30\u2d59\u2d4f"},week:{dow:6,doy:12}}),l.defineLocale("ug-cn",{months:"\u064a\u0627\u0646\u06cb\u0627\u0631_\u0641\u06d0\u06cb\u0631\u0627\u0644_\u0645\u0627\u0631\u062a_\u0626\u0627\u067e\u0631\u06d0\u0644_\u0645\u0627\u064a_\u0626\u0649\u064a\u06c7\u0646_\u0626\u0649\u064a\u06c7\u0644_\u0626\u0627\u06cb\u063a\u06c7\u0633\u062a_\u0633\u06d0\u0646\u062a\u06d5\u0628\u0649\u0631_\u0626\u06c6\u0643\u062a\u06d5\u0628\u0649\u0631_\u0646\u0648\u064a\u0627\u0628\u0649\u0631_\u062f\u06d0\u0643\u0627\u0628\u0649\u0631".split("_"),monthsShort:"\u064a\u0627\u0646\u06cb\u0627\u0631_\u0641\u06d0\u06cb\u0631\u0627\u0644_\u0645\u0627\u0631\u062a_\u0626\u0627\u067e\u0631\u06d0\u0644_\u0645\u0627\u064a_\u0626\u0649\u064a\u06c7\u0646_\u0626\u0649\u064a\u06c7\u0644_\u0626\u0627\u06cb\u063a\u06c7\u0633\u062a_\u0633\u06d0\u0646\u062a\u06d5\u0628\u0649\u0631_\u0626\u06c6\u0643\u062a\u06d5\u0628\u0649\u0631_\u0646\u0648\u064a\u0627\u0628\u0649\u0631_\u062f\u06d0\u0643\u0627\u0628\u0649\u0631".split("_"),weekdays:"\u064a\u06d5\u0643\u0634\u06d5\u0646\u0628\u06d5_\u062f\u06c8\u0634\u06d5\u0646\u0628\u06d5_\u0633\u06d5\u064a\u0634\u06d5\u0646\u0628\u06d5_\u0686\u0627\u0631\u0634\u06d5\u0646\u0628\u06d5_\u067e\u06d5\u064a\u0634\u06d5\u0646\u0628\u06d5_\u062c\u06c8\u0645\u06d5_\u0634\u06d5\u0646\u0628\u06d5".split("_"),weekdaysShort:"\u064a\u06d5_\u062f\u06c8_\u0633\u06d5_\u0686\u0627_\u067e\u06d5_\u062c\u06c8_\u0634\u06d5".split("_"),weekdaysMin:"\u064a\u06d5_\u062f\u06c8_\u0633\u06d5_\u0686\u0627_\u067e\u06d5_\u062c\u06c8_\u0634\u06d5".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"YYYY-\u064a\u0649\u0644\u0649M-\u0626\u0627\u064a\u0646\u0649\u06adD-\u0643\u06c8\u0646\u0649",LLL:"YYYY-\u064a\u0649\u0644\u0649M-\u0626\u0627\u064a\u0646\u0649\u06adD-\u0643\u06c8\u0646\u0649\u060c HH:mm",LLLL:"dddd\u060c YYYY-\u064a\u0649\u0644\u0649M-\u0626\u0627\u064a\u0646\u0649\u06adD-\u0643\u06c8\u0646\u0649\u060c HH:mm"},meridiemParse:/\u064a\u06d0\u0631\u0649\u0645 \u0643\u06d0\u0686\u06d5|\u0633\u06d5\u06be\u06d5\u0631|\u0686\u06c8\u0634\u062a\u0649\u0646 \u0628\u06c7\u0631\u06c7\u0646|\u0686\u06c8\u0634|\u0686\u06c8\u0634\u062a\u0649\u0646 \u0643\u06d0\u064a\u0649\u0646|\u0643\u06d5\u0686/,meridiemHour:function(e,a){return 12===e&&(e=0),"\u064a\u06d0\u0631\u0649\u0645 \u0643\u06d0\u0686\u06d5"===a||"\u0633\u06d5\u06be\u06d5\u0631"===a||"\u0686\u06c8\u0634\u062a\u0649\u0646 \u0628\u06c7\u0631\u06c7\u0646"===a?e:"\u0686\u06c8\u0634\u062a\u0649\u0646 \u0643\u06d0\u064a\u0649\u0646"===a||"\u0643\u06d5\u0686"===a?e+12:11<=e?e:e+12},meridiem:function(e,a,t){var s=100*e+a;return s<600?"\u064a\u06d0\u0631\u0649\u0645 \u0643\u06d0\u0686\u06d5":s<900?"\u0633\u06d5\u06be\u06d5\u0631":s<1130?"\u0686\u06c8\u0634\u062a\u0649\u0646 \u0628\u06c7\u0631\u06c7\u0646":s<1230?"\u0686\u06c8\u0634":s<1800?"\u0686\u06c8\u0634\u062a\u0649\u0646 \u0643\u06d0\u064a\u0649\u0646":"\u0643\u06d5\u0686"},calendar:{sameDay:"[\u0628\u06c8\u06af\u06c8\u0646 \u0633\u0627\u0626\u06d5\u062a] LT",nextDay:"[\u0626\u06d5\u062a\u06d5 \u0633\u0627\u0626\u06d5\u062a] LT",nextWeek:"[\u0643\u06d0\u0644\u06d5\u0631\u0643\u0649] dddd [\u0633\u0627\u0626\u06d5\u062a] LT",lastDay:"[\u062a\u06c6\u0646\u06c8\u06af\u06c8\u0646] LT",lastWeek:"[\u0626\u0627\u0644\u062f\u0649\u0646\u0642\u0649] dddd [\u0633\u0627\u0626\u06d5\u062a] LT",sameElse:"L"},relativeTime:{future:"%s \u0643\u06d0\u064a\u0649\u0646",past:"%s \u0628\u06c7\u0631\u06c7\u0646",s:"\u0646\u06d5\u0686\u0686\u06d5 \u0633\u06d0\u0643\u0648\u0646\u062a",ss:"%d \u0633\u06d0\u0643\u0648\u0646\u062a",m:"\u0628\u0649\u0631 \u0645\u0649\u0646\u06c7\u062a",mm:"%d \u0645\u0649\u0646\u06c7\u062a",h:"\u0628\u0649\u0631 \u0633\u0627\u0626\u06d5\u062a",hh:"%d \u0633\u0627\u0626\u06d5\u062a",d:"\u0628\u0649\u0631 \u0643\u06c8\u0646",dd:"%d \u0643\u06c8\u0646",M:"\u0628\u0649\u0631 \u0626\u0627\u064a",MM:"%d \u0626\u0627\u064a",y:"\u0628\u0649\u0631 \u064a\u0649\u0644",yy:"%d \u064a\u0649\u0644"},dayOfMonthOrdinalParse:/\d{1,2}(-\u0643\u06c8\u0646\u0649|-\u0626\u0627\u064a|-\u06be\u06d5\u067e\u062a\u06d5)/,ordinal:function(e,a){switch(a){case"d":case"D":case"DDD":return e+"-\u0643\u06c8\u0646\u0649";case"w":case"W":return e+"-\u06be\u06d5\u067e\u062a\u06d5";default:return e}},preparse:function(e){return e.replace(/\u060c/g,",")},postformat:function(e){return e.replace(/,/g,"\u060c")},week:{dow:1,doy:7}}),l.defineLocale("uk",{months:{format:"\u0441\u0456\u0447\u043d\u044f_\u043b\u044e\u0442\u043e\u0433\u043e_\u0431\u0435\u0440\u0435\u0437\u043d\u044f_\u043a\u0432\u0456\u0442\u043d\u044f_\u0442\u0440\u0430\u0432\u043d\u044f_\u0447\u0435\u0440\u0432\u043d\u044f_\u043b\u0438\u043f\u043d\u044f_\u0441\u0435\u0440\u043f\u043d\u044f_\u0432\u0435\u0440\u0435\u0441\u043d\u044f_\u0436\u043e\u0432\u0442\u043d\u044f_\u043b\u0438\u0441\u0442\u043e\u043f\u0430\u0434\u0430_\u0433\u0440\u0443\u0434\u043d\u044f".split("_"),standalone:"\u0441\u0456\u0447\u0435\u043d\u044c_\u043b\u044e\u0442\u0438\u0439_\u0431\u0435\u0440\u0435\u0437\u0435\u043d\u044c_\u043a\u0432\u0456\u0442\u0435\u043d\u044c_\u0442\u0440\u0430\u0432\u0435\u043d\u044c_\u0447\u0435\u0440\u0432\u0435\u043d\u044c_\u043b\u0438\u043f\u0435\u043d\u044c_\u0441\u0435\u0440\u043f\u0435\u043d\u044c_\u0432\u0435\u0440\u0435\u0441\u0435\u043d\u044c_\u0436\u043e\u0432\u0442\u0435\u043d\u044c_\u043b\u0438\u0441\u0442\u043e\u043f\u0430\u0434_\u0433\u0440\u0443\u0434\u0435\u043d\u044c".split("_")},monthsShort:"\u0441\u0456\u0447_\u043b\u044e\u0442_\u0431\u0435\u0440_\u043a\u0432\u0456\u0442_\u0442\u0440\u0430\u0432_\u0447\u0435\u0440\u0432_\u043b\u0438\u043f_\u0441\u0435\u0440\u043f_\u0432\u0435\u0440_\u0436\u043e\u0432\u0442_\u043b\u0438\u0441\u0442_\u0433\u0440\u0443\u0434".split("_"),weekdays:function(e,a){var t={nominative:"\u043d\u0435\u0434\u0456\u043b\u044f_\u043f\u043e\u043d\u0435\u0434\u0456\u043b\u043e\u043a_\u0432\u0456\u0432\u0442\u043e\u0440\u043e\u043a_\u0441\u0435\u0440\u0435\u0434\u0430_\u0447\u0435\u0442\u0432\u0435\u0440_\u043f\u2019\u044f\u0442\u043d\u0438\u0446\u044f_\u0441\u0443\u0431\u043e\u0442\u0430".split("_"),accusative:"\u043d\u0435\u0434\u0456\u043b\u044e_\u043f\u043e\u043d\u0435\u0434\u0456\u043b\u043e\u043a_\u0432\u0456\u0432\u0442\u043e\u0440\u043e\u043a_\u0441\u0435\u0440\u0435\u0434\u0443_\u0447\u0435\u0442\u0432\u0435\u0440_\u043f\u2019\u044f\u0442\u043d\u0438\u0446\u044e_\u0441\u0443\u0431\u043e\u0442\u0443".split("_"),genitive:"\u043d\u0435\u0434\u0456\u043b\u0456_\u043f\u043e\u043d\u0435\u0434\u0456\u043b\u043a\u0430_\u0432\u0456\u0432\u0442\u043e\u0440\u043a\u0430_\u0441\u0435\u0440\u0435\u0434\u0438_\u0447\u0435\u0442\u0432\u0435\u0440\u0433\u0430_\u043f\u2019\u044f\u0442\u043d\u0438\u0446\u0456_\u0441\u0443\u0431\u043e\u0442\u0438".split("_")};return!0===e?t.nominative.slice(1,7).concat(t.nominative.slice(0,1)):e?t[/(\[[\u0412\u0432\u0423\u0443]\]) ?dddd/.test(a)?"accusative":/\[?(?:\u043c\u0438\u043d\u0443\u043b\u043e\u0457|\u043d\u0430\u0441\u0442\u0443\u043f\u043d\u043e\u0457)? ?\] ?dddd/.test(a)?"genitive":"nominative"][e.day()]:t.nominative},weekdaysShort:"\u043d\u0434_\u043f\u043d_\u0432\u0442_\u0441\u0440_\u0447\u0442_\u043f\u0442_\u0441\u0431".split("_"),weekdaysMin:"\u043d\u0434_\u043f\u043d_\u0432\u0442_\u0441\u0440_\u0447\u0442_\u043f\u0442_\u0441\u0431".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY \u0440.",LLL:"D MMMM YYYY \u0440., HH:mm",LLLL:"dddd, D MMMM YYYY \u0440., HH:mm"},calendar:{sameDay:Md("[\u0421\u044c\u043e\u0433\u043e\u0434\u043d\u0456 "),nextDay:Md("[\u0417\u0430\u0432\u0442\u0440\u0430 "),lastDay:Md("[\u0412\u0447\u043e\u0440\u0430 "),nextWeek:Md("[\u0423] dddd ["),lastWeek:function(){switch(this.day()){case 0:case 3:case 5:case 6:return Md("[\u041c\u0438\u043d\u0443\u043b\u043e\u0457] dddd [").call(this);case 1:case 2:case 4:return Md("[\u041c\u0438\u043d\u0443\u043b\u043e\u0433\u043e] dddd [").call(this)}},sameElse:"L"},relativeTime:{future:"\u0437\u0430 %s",past:"%s \u0442\u043e\u043c\u0443",s:"\u0434\u0435\u043a\u0456\u043b\u044c\u043a\u0430 \u0441\u0435\u043a\u0443\u043d\u0434",ss:ld,m:ld,mm:ld,h:"\u0433\u043e\u0434\u0438\u043d\u0443",hh:ld,d:"\u0434\u0435\u043d\u044c",dd:ld,M:"\u043c\u0456\u0441\u044f\u0446\u044c",MM:ld,y:"\u0440\u0456\u043a",yy:ld},meridiemParse:/\u043d\u043e\u0447\u0456|\u0440\u0430\u043d\u043a\u0443|\u0434\u043d\u044f|\u0432\u0435\u0447\u043e\u0440\u0430/,isPM:function(e){return/^(\u0434\u043d\u044f|\u0432\u0435\u0447\u043e\u0440\u0430)$/.test(e)},meridiem:function(e,a,t){return e<4?"\u043d\u043e\u0447\u0456":e<12?"\u0440\u0430\u043d\u043a\u0443":e<17?"\u0434\u043d\u044f":"\u0432\u0435\u0447\u043e\u0440\u0430"},dayOfMonthOrdinalParse:/\d{1,2}-(\u0439|\u0433\u043e)/,ordinal:function(e,a){switch(a){case"M":case"d":case"DDD":case"w":case"W":return e+"-\u0439";case"D":return e+"-\u0433\u043e";default:return e}},week:{dow:1,doy:7}});var hd=["\u062c\u0646\u0648\u0631\u06cc","\u0641\u0631\u0648\u0631\u06cc","\u0645\u0627\u0631\u0686","\u0627\u067e\u0631\u06cc\u0644","\u0645\u0626\u06cc","\u062c\u0648\u0646","\u062c\u0648\u0644\u0627\u0626\u06cc","\u0627\u06af\u0633\u062a","\u0633\u062a\u0645\u0628\u0631","\u0627\u06a9\u062a\u0648\u0628\u0631","\u0646\u0648\u0645\u0628\u0631","\u062f\u0633\u0645\u0628\u0631"],Ld=["\u0627\u062a\u0648\u0627\u0631","\u067e\u06cc\u0631","\u0645\u0646\u06af\u0644","\u0628\u062f\u06be","\u062c\u0645\u0639\u0631\u0627\u062a","\u062c\u0645\u0639\u06c1","\u06c1\u0641\u062a\u06c1"];return l.defineLocale("ur",{months:hd,monthsShort:hd,weekdays:Ld,weekdaysShort:Ld,weekdaysMin:Ld,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd\u060c D MMMM YYYY HH:mm"},meridiemParse:/\u0635\u0628\u062d|\u0634\u0627\u0645/,isPM:function(e){return"\u0634\u0627\u0645"===e},meridiem:function(e,a,t){return e<12?"\u0635\u0628\u062d":"\u0634\u0627\u0645"},calendar:{sameDay:"[\u0622\u062c \u0628\u0648\u0642\u062a] LT",nextDay:"[\u06a9\u0644 \u0628\u0648\u0642\u062a] LT",nextWeek:"dddd [\u0628\u0648\u0642\u062a] LT",lastDay:"[\u06af\u0630\u0634\u062a\u06c1 \u0631\u0648\u0632 \u0628\u0648\u0642\u062a] LT",lastWeek:"[\u06af\u0630\u0634\u062a\u06c1] dddd [\u0628\u0648\u0642\u062a] LT",sameElse:"L"},relativeTime:{future:"%s \u0628\u0639\u062f",past:"%s \u0642\u0628\u0644",s:"\u0686\u0646\u062f \u0633\u06cc\u06a9\u0646\u0688",ss:"%d \u0633\u06cc\u06a9\u0646\u0688",m:"\u0627\u06cc\u06a9 \u0645\u0646\u0679",mm:"%d \u0645\u0646\u0679",h:"\u0627\u06cc\u06a9 \u06af\u06be\u0646\u0679\u06c1",hh:"%d \u06af\u06be\u0646\u0679\u06d2",d:"\u0627\u06cc\u06a9 \u062f\u0646",dd:"%d \u062f\u0646",M:"\u0627\u06cc\u06a9 \u0645\u0627\u06c1",MM:"%d \u0645\u0627\u06c1",y:"\u0627\u06cc\u06a9 \u0633\u0627\u0644",yy:"%d \u0633\u0627\u0644"},preparse:function(e){return e.replace(/\u060c/g,",")},postformat:function(e){return e.replace(/,/g,"\u060c")},week:{dow:1,doy:4}}),l.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}}),l.defineLocale("uz",{months:"\u044f\u043d\u0432\u0430\u0440_\u0444\u0435\u0432\u0440\u0430\u043b_\u043c\u0430\u0440\u0442_\u0430\u043f\u0440\u0435\u043b_\u043c\u0430\u0439_\u0438\u044e\u043d_\u0438\u044e\u043b_\u0430\u0432\u0433\u0443\u0441\u0442_\u0441\u0435\u043d\u0442\u044f\u0431\u0440_\u043e\u043a\u0442\u044f\u0431\u0440_\u043d\u043e\u044f\u0431\u0440_\u0434\u0435\u043a\u0430\u0431\u0440".split("_"),monthsShort:"\u044f\u043d\u0432_\u0444\u0435\u0432_\u043c\u0430\u0440_\u0430\u043f\u0440_\u043c\u0430\u0439_\u0438\u044e\u043d_\u0438\u044e\u043b_\u0430\u0432\u0433_\u0441\u0435\u043d_\u043e\u043a\u0442_\u043d\u043e\u044f_\u0434\u0435\u043a".split("_"),weekdays:"\u042f\u043a\u0448\u0430\u043d\u0431\u0430_\u0414\u0443\u0448\u0430\u043d\u0431\u0430_\u0421\u0435\u0448\u0430\u043d\u0431\u0430_\u0427\u043e\u0440\u0448\u0430\u043d\u0431\u0430_\u041f\u0430\u0439\u0448\u0430\u043d\u0431\u0430_\u0416\u0443\u043c\u0430_\u0428\u0430\u043d\u0431\u0430".split("_"),weekdaysShort:"\u042f\u043a\u0448_\u0414\u0443\u0448_\u0421\u0435\u0448_\u0427\u043e\u0440_\u041f\u0430\u0439_\u0416\u0443\u043c_\u0428\u0430\u043d".split("_"),weekdaysMin:"\u042f\u043a_\u0414\u0443_\u0421\u0435_\u0427\u043e_\u041f\u0430_\u0416\u0443_\u0428\u0430".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:"[\u0411\u0443\u0433\u0443\u043d \u0441\u043e\u0430\u0442] LT [\u0434\u0430]",nextDay:"[\u042d\u0440\u0442\u0430\u0433\u0430] LT [\u0434\u0430]",nextWeek:"dddd [\u043a\u0443\u043d\u0438 \u0441\u043e\u0430\u0442] LT [\u0434\u0430]",lastDay:"[\u041a\u0435\u0447\u0430 \u0441\u043e\u0430\u0442] LT [\u0434\u0430]",lastWeek:"[\u0423\u0442\u0433\u0430\u043d] dddd [\u043a\u0443\u043d\u0438 \u0441\u043e\u0430\u0442] LT [\u0434\u0430]",sameElse:"L"},relativeTime:{future:"\u042f\u043a\u0438\u043d %s \u0438\u0447\u0438\u0434\u0430",past:"\u0411\u0438\u0440 \u043d\u0435\u0447\u0430 %s \u043e\u043b\u0434\u0438\u043d",s:"\u0444\u0443\u0440\u0441\u0430\u0442",ss:"%d \u0444\u0443\u0440\u0441\u0430\u0442",m:"\u0431\u0438\u0440 \u0434\u0430\u043a\u0438\u043a\u0430",mm:"%d \u0434\u0430\u043a\u0438\u043a\u0430",h:"\u0431\u0438\u0440 \u0441\u043e\u0430\u0442",hh:"%d \u0441\u043e\u0430\u0442",d:"\u0431\u0438\u0440 \u043a\u0443\u043d",dd:"%d \u043a\u0443\u043d",M:"\u0431\u0438\u0440 \u043e\u0439",MM:"%d \u043e\u0439",y:"\u0431\u0438\u0440 \u0439\u0438\u043b",yy:"%d \u0439\u0438\u043b"},week:{dow:1,doy:7}}),l.defineLocale("vi",{months:"th\xe1ng 1_th\xe1ng 2_th\xe1ng 3_th\xe1ng 4_th\xe1ng 5_th\xe1ng 6_th\xe1ng 7_th\xe1ng 8_th\xe1ng 9_th\xe1ng 10_th\xe1ng 11_th\xe1ng 12".split("_"),monthsShort:"Th01_Th02_Th03_Th04_Th05_Th06_Th07_Th08_Th09_Th10_Th11_Th12".split("_"),monthsParseExact:!0,weekdays:"ch\u1ee7 nh\u1eadt_th\u1ee9 hai_th\u1ee9 ba_th\u1ee9 t\u01b0_th\u1ee9 n\u0103m_th\u1ee9 s\xe1u_th\u1ee9 b\u1ea3y".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,a,t){return e<12?t?"sa":"SA":t?"ch":"CH"},longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM [n\u0103m] YYYY",LLL:"D MMMM [n\u0103m] YYYY HH:mm",LLLL:"dddd, D MMMM [n\u0103m] 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\xf4m nay l\xfac] LT",nextDay:"[Ng\xe0y mai l\xfac] LT",nextWeek:"dddd [tu\u1ea7n t\u1edbi l\xfac] LT",lastDay:"[H\xf4m qua l\xfac] LT",lastWeek:"dddd [tu\u1ea7n r\u1ed3i l\xfac] LT",sameElse:"L"},relativeTime:{future:"%s t\u1edbi",past:"%s tr\u01b0\u1edbc",s:"v\xe0i gi\xe2y",ss:"%d gi\xe2y",m:"m\u1ed9t ph\xfat",mm:"%d ph\xfat",h:"m\u1ed9t gi\u1edd",hh:"%d gi\u1edd",d:"m\u1ed9t ng\xe0y",dd:"%d ng\xe0y",M:"m\u1ed9t th\xe1ng",MM:"%d th\xe1ng",y:"m\u1ed9t n\u0103m",yy:"%d n\u0103m"},dayOfMonthOrdinalParse:/\d{1,2}/,ordinal:function(e){return e},week:{dow:1,doy:4}}),l.defineLocale("x-pseudo",{months:"J~\xe1\xf1\xfa\xe1~r\xfd_F~\xe9br\xfa~\xe1r\xfd_~M\xe1rc~h_\xc1p~r\xedl_~M\xe1\xfd_~J\xfa\xf1\xe9~_J\xfal~\xfd_\xc1\xfa~g\xfast~_S\xe9p~t\xe9mb~\xe9r_\xd3~ct\xf3b~\xe9r_\xd1~\xf3v\xe9m~b\xe9r_~D\xe9c\xe9~mb\xe9r".split("_"),monthsShort:"J~\xe1\xf1_~F\xe9b_~M\xe1r_~\xc1pr_~M\xe1\xfd_~J\xfa\xf1_~J\xfal_~\xc1\xfag_~S\xe9p_~\xd3ct_~\xd1\xf3v_~D\xe9c".split("_"),monthsParseExact:!0,weekdays:"S~\xfa\xf1d\xe1~\xfd_M\xf3~\xf1d\xe1\xfd~_T\xfa\xe9~sd\xe1\xfd~_W\xe9d~\xf1\xe9sd~\xe1\xfd_T~h\xfars~d\xe1\xfd_~Fr\xedd~\xe1\xfd_S~\xe1t\xfar~d\xe1\xfd".split("_"),weekdaysShort:"S~\xfa\xf1_~M\xf3\xf1_~T\xfa\xe9_~W\xe9d_~Th\xfa_~Fr\xed_~S\xe1t".split("_"),weekdaysMin:"S~\xfa_M\xf3~_T\xfa_~W\xe9_T~h_Fr~_S\xe1".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~\xf3d\xe1~\xfd \xe1t] LT",nextDay:"[T~\xf3m\xf3~rr\xf3~w \xe1t] LT",nextWeek:"dddd [\xe1t] LT",lastDay:"[\xdd~\xe9st~\xe9rd\xe1~\xfd \xe1t] LT",lastWeek:"[L~\xe1st] dddd [\xe1t] LT",sameElse:"L"},relativeTime:{future:"\xed~\xf1 %s",past:"%s \xe1~g\xf3",s:"\xe1 ~f\xe9w ~s\xe9c\xf3~\xf1ds",ss:"%d s~\xe9c\xf3\xf1~ds",m:"\xe1 ~m\xed\xf1~\xfat\xe9",mm:"%d m~\xed\xf1\xfa~t\xe9s",h:"\xe1~\xf1 h\xf3~\xfar",hh:"%d h~\xf3\xfars",d:"\xe1 ~d\xe1\xfd",dd:"%d d~\xe1\xfds",M:"\xe1 ~m\xf3\xf1~th",MM:"%d m~\xf3\xf1t~hs",y:"\xe1 ~\xfd\xe9\xe1r",yy:"%d \xfd~\xe9\xe1rs"},dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var a=e%10;return e+(1==~~(e%100/10)?"th":1===a?"st":2===a?"nd":3===a?"rd":"th")},week:{dow:1,doy:4}}),l.defineLocale("yo",{months:"S\u1eb9\u0301r\u1eb9\u0301_E\u0300re\u0300le\u0300_\u1eb8r\u1eb9\u0300na\u0300_I\u0300gbe\u0301_E\u0300bibi_O\u0300ku\u0300du_Ag\u1eb9mo_O\u0300gu\u0301n_Owewe_\u1ecc\u0300wa\u0300ra\u0300_Be\u0301lu\u0301_\u1ecc\u0300p\u1eb9\u0300\u0300".split("_"),monthsShort:"S\u1eb9\u0301r_E\u0300rl_\u1eb8rn_I\u0300gb_E\u0300bi_O\u0300ku\u0300_Ag\u1eb9_O\u0300gu\u0301_Owe_\u1ecc\u0300wa\u0300_Be\u0301l_\u1ecc\u0300p\u1eb9\u0300\u0300".split("_"),weekdays:"A\u0300i\u0300ku\u0301_Aje\u0301_I\u0300s\u1eb9\u0301gun_\u1eccj\u1ecd\u0301ru\u0301_\u1eccj\u1ecd\u0301b\u1ecd_\u1eb8ti\u0300_A\u0300ba\u0301m\u1eb9\u0301ta".split("_"),weekdaysShort:"A\u0300i\u0300k_Aje\u0301_I\u0300s\u1eb9\u0301_\u1eccjr_\u1eccjb_\u1eb8ti\u0300_A\u0300ba\u0301".split("_"),weekdaysMin:"A\u0300i\u0300_Aj_I\u0300s_\u1eccr_\u1eccb_\u1eb8t_A\u0300b".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:"[O\u0300ni\u0300 ni] LT",nextDay:"[\u1ecc\u0300la ni] LT",nextWeek:"dddd [\u1eccs\u1eb9\u0300 to\u0301n'b\u1ecd] [ni] LT",lastDay:"[A\u0300na ni] LT",lastWeek:"dddd [\u1eccs\u1eb9\u0300 to\u0301l\u1ecd\u0301] [ni] LT",sameElse:"L"},relativeTime:{future:"ni\u0301 %s",past:"%s k\u1ecdja\u0301",s:"i\u0300s\u1eb9ju\u0301 aaya\u0301 die",ss:"aaya\u0301 %d",m:"i\u0300s\u1eb9ju\u0301 kan",mm:"i\u0300s\u1eb9ju\u0301 %d",h:"wa\u0301kati kan",hh:"wa\u0301kati %d",d:"\u1ecdj\u1ecd\u0301 kan",dd:"\u1ecdj\u1ecd\u0301 %d",M:"osu\u0300 kan",MM:"osu\u0300 %d",y:"\u1ecddu\u0301n kan",yy:"\u1ecddu\u0301n %d"},dayOfMonthOrdinalParse:/\u1ecdj\u1ecd\u0301\s\d{1,2}/,ordinal:"\u1ecdj\u1ecd\u0301 %d",week:{dow:1,doy:4}}),l.defineLocale("zh-cn",{months:"\u4e00\u6708_\u4e8c\u6708_\u4e09\u6708_\u56db\u6708_\u4e94\u6708_\u516d\u6708_\u4e03\u6708_\u516b\u6708_\u4e5d\u6708_\u5341\u6708_\u5341\u4e00\u6708_\u5341\u4e8c\u6708".split("_"),monthsShort:"1\u6708_2\u6708_3\u6708_4\u6708_5\u6708_6\u6708_7\u6708_8\u6708_9\u6708_10\u6708_11\u6708_12\u6708".split("_"),weekdays:"\u661f\u671f\u65e5_\u661f\u671f\u4e00_\u661f\u671f\u4e8c_\u661f\u671f\u4e09_\u661f\u671f\u56db_\u661f\u671f\u4e94_\u661f\u671f\u516d".split("_"),weekdaysShort:"\u5468\u65e5_\u5468\u4e00_\u5468\u4e8c_\u5468\u4e09_\u5468\u56db_\u5468\u4e94_\u5468\u516d".split("_"),weekdaysMin:"\u65e5_\u4e00_\u4e8c_\u4e09_\u56db_\u4e94_\u516d".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY\u5e74M\u6708D\u65e5",LLL:"YYYY\u5e74M\u6708D\u65e5Ah\u70b9mm\u5206",LLLL:"YYYY\u5e74M\u6708D\u65e5ddddAh\u70b9mm\u5206",l:"YYYY/M/D",ll:"YYYY\u5e74M\u6708D\u65e5",lll:"YYYY\u5e74M\u6708D\u65e5 HH:mm",llll:"YYYY\u5e74M\u6708D\u65e5dddd HH:mm"},meridiemParse:/\u51cc\u6668|\u65e9\u4e0a|\u4e0a\u5348|\u4e2d\u5348|\u4e0b\u5348|\u665a\u4e0a/,meridiemHour:function(e,a){return 12===e&&(e=0),"\u51cc\u6668"===a||"\u65e9\u4e0a"===a||"\u4e0a\u5348"===a?e:"\u4e0b\u5348"===a||"\u665a\u4e0a"===a?e+12:11<=e?e:e+12},meridiem:function(e,a,t){var s=100*e+a;return s<600?"\u51cc\u6668":s<900?"\u65e9\u4e0a":s<1130?"\u4e0a\u5348":s<1230?"\u4e2d\u5348":s<1800?"\u4e0b\u5348":"\u665a\u4e0a"},calendar:{sameDay:"[\u4eca\u5929]LT",nextDay:"[\u660e\u5929]LT",nextWeek:"[\u4e0b]ddddLT",lastDay:"[\u6628\u5929]LT",lastWeek:"[\u4e0a]ddddLT",sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(\u65e5|\u6708|\u5468)/,ordinal:function(e,a){switch(a){case"d":case"D":case"DDD":return e+"\u65e5";case"M":return e+"\u6708";case"w":case"W":return e+"\u5468";default:return e}},relativeTime:{future:"%s\u5185",past:"%s\u524d",s:"\u51e0\u79d2",ss:"%d \u79d2",m:"1 \u5206\u949f",mm:"%d \u5206\u949f",h:"1 \u5c0f\u65f6",hh:"%d \u5c0f\u65f6",d:"1 \u5929",dd:"%d \u5929",M:"1 \u4e2a\u6708",MM:"%d \u4e2a\u6708",y:"1 \u5e74",yy:"%d \u5e74"},week:{dow:1,doy:4}}),l.defineLocale("zh-hk",{months:"\u4e00\u6708_\u4e8c\u6708_\u4e09\u6708_\u56db\u6708_\u4e94\u6708_\u516d\u6708_\u4e03\u6708_\u516b\u6708_\u4e5d\u6708_\u5341\u6708_\u5341\u4e00\u6708_\u5341\u4e8c\u6708".split("_"),monthsShort:"1\u6708_2\u6708_3\u6708_4\u6708_5\u6708_6\u6708_7\u6708_8\u6708_9\u6708_10\u6708_11\u6708_12\u6708".split("_"),weekdays:"\u661f\u671f\u65e5_\u661f\u671f\u4e00_\u661f\u671f\u4e8c_\u661f\u671f\u4e09_\u661f\u671f\u56db_\u661f\u671f\u4e94_\u661f\u671f\u516d".split("_"),weekdaysShort:"\u9031\u65e5_\u9031\u4e00_\u9031\u4e8c_\u9031\u4e09_\u9031\u56db_\u9031\u4e94_\u9031\u516d".split("_"),weekdaysMin:"\u65e5_\u4e00_\u4e8c_\u4e09_\u56db_\u4e94_\u516d".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY\u5e74M\u6708D\u65e5",LLL:"YYYY\u5e74M\u6708D\u65e5 HH:mm",LLLL:"YYYY\u5e74M\u6708D\u65e5dddd HH:mm",l:"YYYY/M/D",ll:"YYYY\u5e74M\u6708D\u65e5",lll:"YYYY\u5e74M\u6708D\u65e5 HH:mm",llll:"YYYY\u5e74M\u6708D\u65e5dddd HH:mm"},meridiemParse:/\u51cc\u6668|\u65e9\u4e0a|\u4e0a\u5348|\u4e2d\u5348|\u4e0b\u5348|\u665a\u4e0a/,meridiemHour:function(e,a){return 12===e&&(e=0),"\u51cc\u6668"===a||"\u65e9\u4e0a"===a||"\u4e0a\u5348"===a?e:"\u4e2d\u5348"===a?11<=e?e:e+12:"\u4e0b\u5348"===a||"\u665a\u4e0a"===a?e+12:void 0},meridiem:function(e,a,t){var s=100*e+a;return s<600?"\u51cc\u6668":s<900?"\u65e9\u4e0a":s<1130?"\u4e0a\u5348":s<1230?"\u4e2d\u5348":s<1800?"\u4e0b\u5348":"\u665a\u4e0a"},calendar:{sameDay:"[\u4eca\u5929]LT",nextDay:"[\u660e\u5929]LT",nextWeek:"[\u4e0b]ddddLT",lastDay:"[\u6628\u5929]LT",lastWeek:"[\u4e0a]ddddLT",sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(\u65e5|\u6708|\u9031)/,ordinal:function(e,a){switch(a){case"d":case"D":case"DDD":return e+"\u65e5";case"M":return e+"\u6708";case"w":case"W":return e+"\u9031";default:return e}},relativeTime:{future:"%s\u5167",past:"%s\u524d",s:"\u5e7e\u79d2",ss:"%d \u79d2",m:"1 \u5206\u9418",mm:"%d \u5206\u9418",h:"1 \u5c0f\u6642",hh:"%d \u5c0f\u6642",d:"1 \u5929",dd:"%d \u5929",M:"1 \u500b\u6708",MM:"%d \u500b\u6708",y:"1 \u5e74",yy:"%d \u5e74"}}),l.defineLocale("zh-tw",{months:"\u4e00\u6708_\u4e8c\u6708_\u4e09\u6708_\u56db\u6708_\u4e94\u6708_\u516d\u6708_\u4e03\u6708_\u516b\u6708_\u4e5d\u6708_\u5341\u6708_\u5341\u4e00\u6708_\u5341\u4e8c\u6708".split("_"),monthsShort:"1\u6708_2\u6708_3\u6708_4\u6708_5\u6708_6\u6708_7\u6708_8\u6708_9\u6708_10\u6708_11\u6708_12\u6708".split("_"),weekdays:"\u661f\u671f\u65e5_\u661f\u671f\u4e00_\u661f\u671f\u4e8c_\u661f\u671f\u4e09_\u661f\u671f\u56db_\u661f\u671f\u4e94_\u661f\u671f\u516d".split("_"),weekdaysShort:"\u9031\u65e5_\u9031\u4e00_\u9031\u4e8c_\u9031\u4e09_\u9031\u56db_\u9031\u4e94_\u9031\u516d".split("_"),weekdaysMin:"\u65e5_\u4e00_\u4e8c_\u4e09_\u56db_\u4e94_\u516d".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY\u5e74M\u6708D\u65e5",LLL:"YYYY\u5e74M\u6708D\u65e5 HH:mm",LLLL:"YYYY\u5e74M\u6708D\u65e5dddd HH:mm",l:"YYYY/M/D",ll:"YYYY\u5e74M\u6708D\u65e5",lll:"YYYY\u5e74M\u6708D\u65e5 HH:mm",llll:"YYYY\u5e74M\u6708D\u65e5dddd HH:mm"},meridiemParse:/\u51cc\u6668|\u65e9\u4e0a|\u4e0a\u5348|\u4e2d\u5348|\u4e0b\u5348|\u665a\u4e0a/,meridiemHour:function(e,a){return 12===e&&(e=0),"\u51cc\u6668"===a||"\u65e9\u4e0a"===a||"\u4e0a\u5348"===a?e:"\u4e2d\u5348"===a?11<=e?e:e+12:"\u4e0b\u5348"===a||"\u665a\u4e0a"===a?e+12:void 0},meridiem:function(e,a,t){var s=100*e+a;return s<600?"\u51cc\u6668":s<900?"\u65e9\u4e0a":s<1130?"\u4e0a\u5348":s<1230?"\u4e2d\u5348":s<1800?"\u4e0b\u5348":"\u665a\u4e0a"},calendar:{sameDay:"[\u4eca\u5929] LT",nextDay:"[\u660e\u5929] LT",nextWeek:"[\u4e0b]dddd LT",lastDay:"[\u6628\u5929] LT",lastWeek:"[\u4e0a]dddd LT",sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(\u65e5|\u6708|\u9031)/,ordinal:function(e,a){switch(a){case"d":case"D":case"DDD":return e+"\u65e5";case"M":return e+"\u6708";case"w":case"W":return e+"\u9031";default:return e}},relativeTime:{future:"%s\u5167",past:"%s\u524d",s:"\u5e7e\u79d2",ss:"%d \u79d2",m:"1 \u5206\u9418",mm:"%d \u5206\u9418",h:"1 \u5c0f\u6642",hh:"%d \u5c0f\u6642",d:"1 \u5929",dd:"%d \u5929",M:"1 \u500b\u6708",MM:"%d \u500b\u6708",y:"1 \u5e74",yy:"%d \u5e74"}}),l.locale("en"),l});
!function(t,e){"use strict";"object"==typeof module&&module.exports?module.exports=e(require("moment")):"function"==typeof define&&define.amd?define(["moment"],e):e(t.moment)}(this,function(i){"use strict";var e,s={},f={},u={},a={},c={};i&&"string"==typeof i.version||D("Moment Timezone requires Moment.js. See https://momentjs.com/timezone/docs/#/use-it/browser/");var t=i.version.split("."),n=+t[0],o=+t[1];function l(t){return 96<t?t-87:64<t?t-29:t-48}function r(t){var e=0,n=t.split("."),o=n[0],r=n[1]||"",i=1,s=0,f=1;for(45===t.charCodeAt(0)&&(f=-(e=1));e<o.length;e++)s=60*s+l(o.charCodeAt(e));for(e=0;e<r.length;e++)i/=60,s+=l(r.charCodeAt(e))*i;return s*f}function h(t){for(var e=0;e<t.length;e++)t[e]=r(t[e])}function p(t,e){var n,o=[];for(n=0;n<e.length;n++)o[n]=t[e[n]];return o}function m(t){var e=t.split("|"),n=e[2].split(" "),o=e[3].split(""),r=e[4].split(" ");return h(n),h(o),h(r),function(t,e){for(var n=0;n<e;n++)t[n]=Math.round((t[n-1]||0)+6e4*t[n]);t[e-1]=1/0}(r,o.length),{name:e[0],abbrs:p(e[1].split(" "),o),offsets:p(n,o),untils:r,population:0|e[5]}}function d(t){t&&this._set(m(t))}function z(t,e){this.name=t,this.zones=e}function v(t){var e=t.toTimeString(),n=e.match(/\([a-z ]+\)/i);"GMT"===(n=n&&n[0]?(n=n[0].match(/[A-Z]/g))?n.join(""):void 0:(n=e.match(/[A-Z]{3,5}/g))?n[0]:void 0)&&(n=void 0),this.at=+t,this.abbr=n,this.offset=t.getTimezoneOffset()}function b(t){this.zone=t,this.offsetScore=0,this.abbrScore=0}function g(t,e){for(var n,o;o=6e4*((e.at-t.at)/12e4|0);)(n=new v(new Date(t.at+o))).offset===t.offset?t=n:e=n;return t}function _(t,e){return t.offsetScore!==e.offsetScore?t.offsetScore-e.offsetScore:t.abbrScore!==e.abbrScore?t.abbrScore-e.abbrScore:t.zone.population!==e.zone.population?e.zone.population-t.zone.population:e.zone.name.localeCompare(t.zone.name)}function w(t,e){var n,o;for(h(e),n=0;n<e.length;n++)o=e[n],c[o]=c[o]||{},c[o][t]=!0}function y(){try{var t=Intl.DateTimeFormat().resolvedOptions().timeZone;if(t&&3<t.length){var e=a[O(t)];if(e)return e;D("Moment Timezone found "+t+" from the Intl api, but did not have that data loaded.")}}catch(t){}var n,o,r,i=function(){var t,e,n,o=(new Date).getFullYear()-2,r=new v(new Date(o,0,1)),i=[r];for(n=1;n<48;n++)(e=new v(new Date(o,n,1))).offset!==r.offset&&(t=g(r,e),i.push(t),i.push(new v(new Date(t.at+6e4)))),r=e;for(n=0;n<4;n++)i.push(new v(new Date(o+n,0,1))),i.push(new v(new Date(o+n,6,1)));return i}(),s=i.length,f=function(t){var e,n,o,r=t.length,i={},s=[];for(e=0;e<r;e++)for(n in o=c[t[e].offset]||{})o.hasOwnProperty(n)&&(i[n]=!0);for(e in i)i.hasOwnProperty(e)&&s.push(a[e]);return s}(i),u=[];for(o=0;o<f.length;o++){for(n=new b(M(f[o]),s),r=0;r<s;r++)n.scoreOffsetAt(i[r]);u.push(n)}return u.sort(_),0<u.length?u[0].zone.name:void 0}function O(t){return(t||"").toLowerCase().replace(/\//g,"_")}function S(t){var e,n,o,r;for("string"==typeof t&&(t=[t]),e=0;e<t.length;e++)r=O(n=(o=t[e].split("|"))[0]),s[r]=t[e],a[r]=n,w(r,o[2].split(" "))}function M(t,e){t=O(t);var n,o=s[t];return o instanceof d?o:"string"==typeof o?(o=new d(o),s[t]=o):f[t]&&e!==M&&(n=M(f[t],M))?((o=s[t]=new d)._set(n),o.name=a[t],o):null}function j(t){var e,n,o,r;for("string"==typeof t&&(t=[t]),e=0;e<t.length;e++)o=O((n=t[e].split("|"))[0]),r=O(n[1]),f[o]=r,a[o]=n[0],f[r]=o,a[r]=n[1]}function A(t){var e="X"===t._f||"x"===t._f;return!(!t._a||void 0!==t._tzm||e)}function D(t){"undefined"!=typeof console&&"function"==typeof console.error&&console.error(t)}function T(t){var e=Array.prototype.slice.call(arguments,0,-1),n=arguments[arguments.length-1],o=M(n),r=i.utc.apply(null,e);return o&&!i.isMoment(t)&&A(r)&&r.add(o.parse(r),"minutes"),r.tz(n),r}(n<2||2==n&&o<6)&&D("Moment Timezone requires Moment.js >= 2.6.0. You are using Moment.js "+i.version+". See momentjs.com"),d.prototype={_set:function(t){this.name=t.name,this.abbrs=t.abbrs,this.untils=t.untils,this.offsets=t.offsets,this.population=t.population},_index:function(t){var e,n=+t,o=this.untils;for(e=0;e<o.length;e++)if(n<o[e])return e},countries:function(){var e=this.name;return Object.keys(u).filter(function(t){return-1!==u[t].zones.indexOf(e)})},parse:function(t){var e,n,o,r,i=+t,s=this.offsets,f=this.untils,u=f.length-1;for(r=0;r<u;r++)if(e=s[r],n=s[r+1],o=s[r?r-1:r],e<n&&T.moveAmbiguousForward?e=n:o<e&&T.moveInvalidForward&&(e=o),i<f[r]-6e4*e)return s[r];return s[u]},abbr:function(t){return this.abbrs[this._index(t)]},offset:function(t){return D("zone.offset has been deprecated in favor of zone.utcOffset"),this.offsets[this._index(t)]},utcOffset:function(t){return this.offsets[this._index(t)]}},b.prototype.scoreOffsetAt=function(t){this.offsetScore+=Math.abs(this.zone.utcOffset(t.at)-t.offset),this.zone.abbr(t.at).replace(/[^A-Z]/g,"")!==t.abbr&&this.abbrScore++},T.version="0.5.28",T.dataVersion="",T._zones=s,T._links=f,T._names=a,T._countries=u,T.add=S,T.link=j,T.load=function(t){S(t.zones),j(t.links),function(t){var e,n,o,r;if(t&&t.length)for(e=0;e<t.length;e++)n=(r=t[e].split("|"))[0].toUpperCase(),o=r[1].split(" "),u[n]=new z(n,o)}(t.countries),T.dataVersion=t.version},T.zone=M,T.zoneExists=function t(e){return t.didShowError||(t.didShowError=!0,D("moment.tz.zoneExists('"+e+"') has been deprecated in favor of !moment.tz.zone('"+e+"')")),!!M(e)},T.guess=function(t){return e&&!t||(e=y()),e},T.names=function(){var t,e=[];for(t in a)a.hasOwnProperty(t)&&(s[t]||s[f[t]])&&a[t]&&e.push(a[t]);return e.sort()},T.Zone=d,T.unpack=m,T.unpackBase60=r,T.needsOffset=A,T.moveInvalidForward=!0,T.moveAmbiguousForward=!1,T.countries=function(){return Object.keys(u)},T.zonesForCountry=function(t,e){if(!(t=function(t){return t=t.toUpperCase(),u[t]||null}(t)))return null;var n=t.zones.sort();return e?n.map(function(t){return{name:t,offset:M(t).utcOffset(new Date)}}):n};var x,C=i.fn;function Z(t){return function(){return this._z?this._z.abbr(this):t.call(this)}}function k(t){return function(){return this._z=null,t.apply(this,arguments)}}i.tz=T,i.defaultZone=null,i.updateOffset=function(t,e){var n,o=i.defaultZone;if(void 0===t._z&&(o&&A(t)&&!t._isUTC&&(t._d=i.utc(t._a)._d,t.utc().add(o.parse(t),"minutes")),t._z=o),t._z)if(n=t._z.utcOffset(t),Math.abs(n)<16&&(n/=60),void 0!==t.utcOffset){var r=t._z;t.utcOffset(-n,e),t._z=r}else t.zone(n,e)},C.tz=function(t,e){if(t){if("string"!=typeof t)throw new Error("Time zone name must be a string, got "+t+" ["+typeof t+"]");return this._z=M(t),this._z?i.updateOffset(this,e):D("Moment Timezone has no data for "+t+". See http://momentjs.com/timezone/docs/#/data-loading/."),this}if(this._z)return this._z.name},C.zoneName=Z(C.zoneName),C.zoneAbbr=Z(C.zoneAbbr),C.utc=k(C.utc),C.local=k(C.local),C.utcOffset=(x=C.utcOffset,function(){return 0<arguments.length&&(this._z=null),x.apply(this,arguments)}),i.tz.setDefault=function(t){return(n<2||2==n&&o<9)&&D("Moment Timezone setDefault() requires Moment.js >= 2.9.0. You are using Moment.js "+i.version+"."),i.defaultZone=t?M(t):null,i};var F=i.momentProperties;return"[object Array]"===Object.prototype.toString.call(F)?(F.push("_z"),F.push("_a")):F&&(F._z=null),i});
/*
    A simple jQuery modal (http://github.com/kylefox/jquery-modal)
    Version 0.9.2
*/
!function(o){"object"==typeof module&&"object"==typeof module.exports?o(require("jquery"),window,document):o(jQuery,window,document)}(function(o,t,i,e){var s=[],l=function(){return s.length?s[s.length-1]:null},n=function(){var o,t=!1;for(o=s.length-1;o>=0;o--)s[o].$blocker&&(s[o].$blocker.toggleClass("current",!t).toggleClass("behind",t),t=!0)};o.modal=function(t,i){var e,n;if(this.$body=o("body"),this.options=o.extend({},o.modal.defaults,i),this.options.doFade=!isNaN(parseInt(this.options.fadeDuration,10)),this.$blocker=null,this.options.closeExisting)for(;o.modal.isActive();)o.modal.close();if(s.push(this),t.is("a"))if(n=t.attr("href"),this.anchor=t,/^#/.test(n)){if(this.$elm=o(n),1!==this.$elm.length)return null;this.$body.append(this.$elm),this.open()}else this.$elm=o("<div>"),this.$body.append(this.$elm),e=function(o,t){t.elm.remove()},this.showSpinner(),t.trigger(o.modal.AJAX_SEND),o.get(n).done(function(i){if(o.modal.isActive()){t.trigger(o.modal.AJAX_SUCCESS);var s=l();s.$elm.empty().append(i).on(o.modal.CLOSE,e),s.hideSpinner(),s.open(),t.trigger(o.modal.AJAX_COMPLETE)}}).fail(function(){t.trigger(o.modal.AJAX_FAIL);var i=l();i.hideSpinner(),s.pop(),t.trigger(o.modal.AJAX_COMPLETE)});else this.$elm=t,this.anchor=t,this.$body.append(this.$elm),this.open()},o.modal.prototype={constructor:o.modal,open:function(){var t=this;this.block(),this.anchor.blur(),this.options.doFade?setTimeout(function(){t.show()},this.options.fadeDuration*this.options.fadeDelay):this.show(),o(i).off("keydown.modal").on("keydown.modal",function(o){var t=l();27===o.which&&t.options.escapeClose&&t.close()}),this.options.clickClose&&this.$blocker.click(function(t){t.target===this&&o.modal.close()})},close:function(){s.pop(),this.unblock(),this.hide(),o.modal.isActive()||o(i).off("keydown.modal")},block:function(){this.$elm.trigger(o.modal.BEFORE_BLOCK,[this._ctx()]),this.$body.css("overflow","hidden"),this.$blocker=o('<div class="'+this.options.blockerClass+' blocker current"></div>').appendTo(this.$body),n(),this.options.doFade&&this.$blocker.css("opacity",0).animate({opacity:1},this.options.fadeDuration),this.$elm.trigger(o.modal.BLOCK,[this._ctx()])},unblock:function(t){!t&&this.options.doFade?this.$blocker.fadeOut(this.options.fadeDuration,this.unblock.bind(this,!0)):(this.$blocker.children().appendTo(this.$body),this.$blocker.remove(),this.$blocker=null,n(),o.modal.isActive()||this.$body.css("overflow",""))},show:function(){this.$elm.trigger(o.modal.BEFORE_OPEN,[this._ctx()]),this.options.showClose&&(this.closeButton=o('<a href="#close-modal" rel="modal:close" class="close-modal '+this.options.closeClass+'">'+this.options.closeText+"</a>"),this.$elm.append(this.closeButton)),this.$elm.addClass(this.options.modalClass).appendTo(this.$blocker),this.options.doFade?this.$elm.css({opacity:0,display:"inline-block"}).animate({opacity:1},this.options.fadeDuration):this.$elm.css("display","inline-block"),this.$elm.trigger(o.modal.OPEN,[this._ctx()])},hide:function(){this.$elm.trigger(o.modal.BEFORE_CLOSE,[this._ctx()]),this.closeButton&&this.closeButton.remove();var t=this;this.options.doFade?this.$elm.fadeOut(this.options.fadeDuration,function(){t.$elm.trigger(o.modal.AFTER_CLOSE,[t._ctx()])}):this.$elm.hide(0,function(){t.$elm.trigger(o.modal.AFTER_CLOSE,[t._ctx()])}),this.$elm.trigger(o.modal.CLOSE,[this._ctx()])},showSpinner:function(){this.options.showSpinner&&(this.spinner=this.spinner||o('<div class="'+this.options.modalClass+'-spinner"></div>').append(this.options.spinnerHtml),this.$body.append(this.spinner),this.spinner.show())},hideSpinner:function(){this.spinner&&this.spinner.remove()},_ctx:function(){return{elm:this.$elm,$elm:this.$elm,$blocker:this.$blocker,options:this.options,$anchor:this.anchor}}},o.modal.close=function(t){if(o.modal.isActive()){t&&t.preventDefault();var i=l();return i.close(),i.$elm}},o.modal.isActive=function(){return s.length>0},o.modal.getCurrent=l,o.modal.defaults={closeExisting:!0,escapeClose:!0,clickClose:!0,closeText:"Close",closeClass:"",modalClass:"modal",blockerClass:"jquery-modal",spinnerHtml:'<div class="rect1"></div><div class="rect2"></div><div class="rect3"></div><div class="rect4"></div>',showSpinner:!0,showClose:!0,fadeDuration:null,fadeDelay:1},o.modal.BEFORE_BLOCK="modal:before-block",o.modal.BLOCK="modal:block",o.modal.BEFORE_OPEN="modal:before-open",o.modal.OPEN="modal:open",o.modal.BEFORE_CLOSE="modal:before-close",o.modal.CLOSE="modal:close",o.modal.AFTER_CLOSE="modal:after-close",o.modal.AJAX_SEND="modal:ajax:send",o.modal.AJAX_SUCCESS="modal:ajax:success",o.modal.AJAX_FAIL="modal:ajax:fail",o.modal.AJAX_COMPLETE="modal:ajax:complete",o.fn.modal=function(t){return 1===this.length&&new o.modal(this,t),this},o(i).on("click.modal",'a[rel~="modal:close"]',o.modal.close),o(i).on("click.modal",'a[rel~="modal:open"]',function(t){t.preventDefault(),o(this).modal()})});

/*! nouislider - 14.6.1 - 8/17/2020 */
(function(factory) {
    if (typeof define === "function" && define.amd) {
        // AMD. Register as an anonymous module.
        define([], factory);
    } else if (typeof exports === "object") {
        // Node/CommonJS
        module.exports = factory();
    } else {
        // Browser globals
        window.noUiSlider = factory();
    }
})(function() {
    "use strict";

    var VERSION = "14.6.1";

    //region Helper Methods

    function isValidFormatter(entry) {
        return typeof entry === "object" && typeof entry.to === "function" && typeof entry.from === "function";
    }

    function removeElement(el) {
        el.parentElement.removeChild(el);
    }

    function isSet(value) {
        return value !== null && value !== undefined;
    }

    // Bindable version
    function preventDefault(e) {
        e.preventDefault();
    }

    // Removes duplicates from an array.
    function unique(array) {
        return array.filter(function(a) {
            return !this[a] ? (this[a] = true) : false;
        }, {});
    }

    // Round a value to the closest 'to'.
    function closest(value, to) {
        return Math.round(value / to) * to;
    }

    // Current position of an element relative to the document.
    function offset(elem, orientation) {
        var rect = elem.getBoundingClientRect();
        var doc = elem.ownerDocument;
        var docElem = doc.documentElement;
        var pageOffset = getPageOffset(doc);

        // getBoundingClientRect contains left scroll in Chrome on Android.
        // I haven't found a feature detection that proves this. Worst case
        // scenario on mis-match: the 'tap' feature on horizontal sliders breaks.
        if (/webkit.*Chrome.*Mobile/i.test(navigator.userAgent)) {
            pageOffset.x = 0;
        }

        return orientation
            ? rect.top + pageOffset.y - docElem.clientTop
            : rect.left + pageOffset.x - docElem.clientLeft;
    }

    // Checks whether a value is numerical.
    function isNumeric(a) {
        return typeof a === "number" && !isNaN(a) && isFinite(a);
    }

    // Sets a class and removes it after [duration] ms.
    function addClassFor(element, className, duration) {
        if (duration > 0) {
            addClass(element, className);
            setTimeout(function() {
                removeClass(element, className);
            }, duration);
        }
    }

    // Limits a value to 0 - 100
    function limit(a) {
        return Math.max(Math.min(a, 100), 0);
    }

    // Wraps a variable as an array, if it isn't one yet.
    // Note that an input array is returned by reference!
    function asArray(a) {
        return Array.isArray(a) ? a : [a];
    }

    // Counts decimals
    function countDecimals(numStr) {
        numStr = String(numStr);
        var pieces = numStr.split(".");
        return pieces.length > 1 ? pieces[1].length : 0;
    }

    // http://youmightnotneedjquery.com/#add_class
    function addClass(el, className) {
        if (el.classList && !/\s/.test(className)) {
            el.classList.add(className);
        } else {
            el.className += " " + className;
        }
    }

    // http://youmightnotneedjquery.com/#remove_class
    function removeClass(el, className) {
        if (el.classList && !/\s/.test(className)) {
            el.classList.remove(className);
        } else {
            el.className = el.className.replace(
                new RegExp("(^|\\b)" + className.split(" ").join("|") + "(\\b|$)", "gi"),
                " "
            );
        }
    }

    // https://plainjs.com/javascript/attributes/adding-removing-and-testing-for-classes-9/
    function hasClass(el, className) {
        return el.classList
            ? el.classList.contains(className)
            : new RegExp("\\b" + className + "\\b").test(el.className);
    }

    // https://developer.mozilla.org/en-US/docs/Web/API/Window/scrollY#Notes
    function getPageOffset(doc) {
        var supportPageOffset = window.pageXOffset !== undefined;
        var isCSS1Compat = (doc.compatMode || "") === "CSS1Compat";
        var x = supportPageOffset
            ? window.pageXOffset
            : isCSS1Compat
                ? doc.documentElement.scrollLeft
                : doc.body.scrollLeft;
        var y = supportPageOffset
            ? window.pageYOffset
            : isCSS1Compat
                ? doc.documentElement.scrollTop
                : doc.body.scrollTop;

        return {
            x: x,
            y: y
        };
    }

    // we provide a function to compute constants instead
    // of accessing window.* as soon as the module needs it
    // so that we do not compute anything if not needed
    function getActions() {
        // Determine the events to bind. IE11 implements pointerEvents without
        // a prefix, which breaks compatibility with the IE10 implementation.
        return window.navigator.pointerEnabled
            ? {
                  start: "pointerdown",
                  move: "pointermove",
                  end: "pointerup"
              }
            : window.navigator.msPointerEnabled
                ? {
                      start: "MSPointerDown",
                      move: "MSPointerMove",
                      end: "MSPointerUp"
                  }
                : {
                      start: "mousedown touchstart",
                      move: "mousemove touchmove",
                      end: "mouseup touchend"
                  };
    }

    // https://github.com/WICG/EventListenerOptions/blob/gh-pages/explainer.md
    // Issue #785
    function getSupportsPassive() {
        var supportsPassive = false;

        /* eslint-disable */
        try {
            var opts = Object.defineProperty({}, "passive", {
                get: function() {
                    supportsPassive = true;
                }
            });

            window.addEventListener("test", null, opts);
        } catch (e) {}
        /* eslint-enable */

        return supportsPassive;
    }

    function getSupportsTouchActionNone() {
        return window.CSS && CSS.supports && CSS.supports("touch-action", "none");
    }

    //endregion

    //region Range Calculation

    // Determine the size of a sub-range in relation to a full range.
    function subRangeRatio(pa, pb) {
        return 100 / (pb - pa);
    }

    // (percentage) How many percent is this value of this range?
    function fromPercentage(range, value, startRange) {
        return (value * 100) / (range[startRange + 1] - range[startRange]);
    }

    // (percentage) Where is this value on this range?
    function toPercentage(range, value) {
        return fromPercentage(range, range[0] < 0 ? value + Math.abs(range[0]) : value - range[0], 0);
    }

    // (value) How much is this percentage on this range?
    function isPercentage(range, value) {
        return (value * (range[1] - range[0])) / 100 + range[0];
    }

    function getJ(value, arr) {
        var j = 1;

        while (value >= arr[j]) {
            j += 1;
        }

        return j;
    }

    // (percentage) Input a value, find where, on a scale of 0-100, it applies.
    function toStepping(xVal, xPct, value) {
        if (value >= xVal.slice(-1)[0]) {
            return 100;
        }

        var j = getJ(value, xVal);
        var va = xVal[j - 1];
        var vb = xVal[j];
        var pa = xPct[j - 1];
        var pb = xPct[j];

        return pa + toPercentage([va, vb], value) / subRangeRatio(pa, pb);
    }

    // (value) Input a percentage, find where it is on the specified range.
    function fromStepping(xVal, xPct, value) {
        // There is no range group that fits 100
        if (value >= 100) {
            return xVal.slice(-1)[0];
        }

        var j = getJ(value, xPct);
        var va = xVal[j - 1];
        var vb = xVal[j];
        var pa = xPct[j - 1];
        var pb = xPct[j];

        return isPercentage([va, vb], (value - pa) * subRangeRatio(pa, pb));
    }

    // (percentage) Get the step that applies at a certain value.
    function getStep(xPct, xSteps, snap, value) {
        if (value === 100) {
            return value;
        }

        var j = getJ(value, xPct);
        var a = xPct[j - 1];
        var b = xPct[j];

        // If 'snap' is set, steps are used as fixed points on the slider.
        if (snap) {
            // Find the closest position, a or b.
            if (value - a > (b - a) / 2) {
                return b;
            }

            return a;
        }

        if (!xSteps[j - 1]) {
            return value;
        }

        return xPct[j - 1] + closest(value - xPct[j - 1], xSteps[j - 1]);
    }

    function handleEntryPoint(index, value, that) {
        var percentage;

        // Wrap numerical input in an array.
        if (typeof value === "number") {
            value = [value];
        }

        // Reject any invalid input, by testing whether value is an array.
        if (!Array.isArray(value)) {
            throw new Error("noUiSlider (" + VERSION + "): 'range' contains invalid value.");
        }

        // Covert min/max syntax to 0 and 100.
        if (index === "min") {
            percentage = 0;
        } else if (index === "max") {
            percentage = 100;
        } else {
            percentage = parseFloat(index);
        }

        // Check for correct input.
        if (!isNumeric(percentage) || !isNumeric(value[0])) {
            throw new Error("noUiSlider (" + VERSION + "): 'range' value isn't numeric.");
        }

        // Store values.
        that.xPct.push(percentage);
        that.xVal.push(value[0]);

        // NaN will evaluate to false too, but to keep
        // logging clear, set step explicitly. Make sure
        // not to override the 'step' setting with false.
        if (!percentage) {
            if (!isNaN(value[1])) {
                that.xSteps[0] = value[1];
            }
        } else {
            that.xSteps.push(isNaN(value[1]) ? false : value[1]);
        }

        that.xHighestCompleteStep.push(0);
    }

    function handleStepPoint(i, n, that) {
        // Ignore 'false' stepping.
        if (!n) {
            return;
        }

        // Step over zero-length ranges (#948);
        if (that.xVal[i] === that.xVal[i + 1]) {
            that.xSteps[i] = that.xHighestCompleteStep[i] = that.xVal[i];

            return;
        }

        // Factor to range ratio
        that.xSteps[i] =
            fromPercentage([that.xVal[i], that.xVal[i + 1]], n, 0) / subRangeRatio(that.xPct[i], that.xPct[i + 1]);

        var totalSteps = (that.xVal[i + 1] - that.xVal[i]) / that.xNumSteps[i];
        var highestStep = Math.ceil(Number(totalSteps.toFixed(3)) - 1);
        var step = that.xVal[i] + that.xNumSteps[i] * highestStep;

        that.xHighestCompleteStep[i] = step;
    }

    //endregion

    //region Spectrum

    function Spectrum(entry, snap, singleStep) {
        this.xPct = [];
        this.xVal = [];
        this.xSteps = [singleStep || false];
        this.xNumSteps = [false];
        this.xHighestCompleteStep = [];

        this.snap = snap;

        var index;
        var ordered = []; // [0, 'min'], [1, '50%'], [2, 'max']

        // Map the object keys to an array.
        for (index in entry) {
            if (entry.hasOwnProperty(index)) {
                ordered.push([entry[index], index]);
            }
        }

        // Sort all entries by value (numeric sort).
        if (ordered.length && typeof ordered[0][0] === "object") {
            ordered.sort(function(a, b) {
                return a[0][0] - b[0][0];
            });
        } else {
            ordered.sort(function(a, b) {
                return a[0] - b[0];
            });
        }

        // Convert all entries to subranges.
        for (index = 0; index < ordered.length; index++) {
            handleEntryPoint(ordered[index][1], ordered[index][0], this);
        }

        // Store the actual step values.
        // xSteps is sorted in the same order as xPct and xVal.
        this.xNumSteps = this.xSteps.slice(0);

        // Convert all numeric steps to the percentage of the subrange they represent.
        for (index = 0; index < this.xNumSteps.length; index++) {
            handleStepPoint(index, this.xNumSteps[index], this);
        }
    }

    Spectrum.prototype.getDistance = function(value) {
        var index;
        var distances = [];

        for (index = 0; index < this.xNumSteps.length - 1; index++) {
            // last "range" can't contain step size as it is purely an endpoint.
            var step = this.xNumSteps[index];

            if (step && (value / step) % 1 !== 0) {
                throw new Error(
                    "noUiSlider (" +
                        VERSION +
                        "): 'limit', 'margin' and 'padding' of " +
                        this.xPct[index] +
                        "% range must be divisible by step."
                );
            }

            // Calculate percentual distance in current range of limit, margin or padding
            distances[index] = fromPercentage(this.xVal, value, index);
        }

        return distances;
    };

    // Calculate the percentual distance over the whole scale of ranges.
    // direction: 0 = backwards / 1 = forwards
    Spectrum.prototype.getAbsoluteDistance = function(value, distances, direction) {
        var xPct_index = 0;

        // Calculate range where to start calculation
        if (value < this.xPct[this.xPct.length - 1]) {
            while (value > this.xPct[xPct_index + 1]) {
                xPct_index++;
            }
        } else if (value === this.xPct[this.xPct.length - 1]) {
            xPct_index = this.xPct.length - 2;
        }

        // If looking backwards and the value is exactly at a range separator then look one range further
        if (!direction && value === this.xPct[xPct_index + 1]) {
            xPct_index++;
        }

        var start_factor;
        var rest_factor = 1;

        var rest_rel_distance = distances[xPct_index];

        var range_pct = 0;

        var rel_range_distance = 0;
        var abs_distance_counter = 0;
        var range_counter = 0;

        // Calculate what part of the start range the value is
        if (direction) {
            start_factor = (value - this.xPct[xPct_index]) / (this.xPct[xPct_index + 1] - this.xPct[xPct_index]);
        } else {
            start_factor = (this.xPct[xPct_index + 1] - value) / (this.xPct[xPct_index + 1] - this.xPct[xPct_index]);
        }

        // Do until the complete distance across ranges is calculated
        while (rest_rel_distance > 0) {
            // Calculate the percentage of total range
            range_pct = this.xPct[xPct_index + 1 + range_counter] - this.xPct[xPct_index + range_counter];

            // Detect if the margin, padding or limit is larger then the current range and calculate
            if (distances[xPct_index + range_counter] * rest_factor + 100 - start_factor * 100 > 100) {
                // If larger then take the percentual distance of the whole range
                rel_range_distance = range_pct * start_factor;
                // Rest factor of relative percentual distance still to be calculated
                rest_factor = (rest_rel_distance - 100 * start_factor) / distances[xPct_index + range_counter];
                // Set start factor to 1 as for next range it does not apply.
                start_factor = 1;
            } else {
                // If smaller or equal then take the percentual distance of the calculate percentual part of that range
                rel_range_distance = ((distances[xPct_index + range_counter] * range_pct) / 100) * rest_factor;
                // No rest left as the rest fits in current range
                rest_factor = 0;
            }

            if (direction) {
                abs_distance_counter = abs_distance_counter - rel_range_distance;
                // Limit range to first range when distance becomes outside of minimum range
                if (this.xPct.length + range_counter >= 1) {
                    range_counter--;
                }
            } else {
                abs_distance_counter = abs_distance_counter + rel_range_distance;
                // Limit range to last range when distance becomes outside of maximum range
                if (this.xPct.length - range_counter >= 1) {
                    range_counter++;
                }
            }

            // Rest of relative percentual distance still to be calculated
            rest_rel_distance = distances[xPct_index + range_counter] * rest_factor;
        }

        return value + abs_distance_counter;
    };

    Spectrum.prototype.toStepping = function(value) {
        value = toStepping(this.xVal, this.xPct, value);

        return value;
    };

    Spectrum.prototype.fromStepping = function(value) {
        return fromStepping(this.xVal, this.xPct, value);
    };

    Spectrum.prototype.getStep = function(value) {
        value = getStep(this.xPct, this.xSteps, this.snap, value);

        return value;
    };

    Spectrum.prototype.getDefaultStep = function(value, isDown, size) {
        var j = getJ(value, this.xPct);

        // When at the top or stepping down, look at the previous sub-range
        if (value === 100 || (isDown && value === this.xPct[j - 1])) {
            j = Math.max(j - 1, 1);
        }

        return (this.xVal[j] - this.xVal[j - 1]) / size;
    };

    Spectrum.prototype.getNearbySteps = function(value) {
        var j = getJ(value, this.xPct);

        return {
            stepBefore: {
                startValue: this.xVal[j - 2],
                step: this.xNumSteps[j - 2],
                highestStep: this.xHighestCompleteStep[j - 2]
            },
            thisStep: {
                startValue: this.xVal[j - 1],
                step: this.xNumSteps[j - 1],
                highestStep: this.xHighestCompleteStep[j - 1]
            },
            stepAfter: {
                startValue: this.xVal[j],
                step: this.xNumSteps[j],
                highestStep: this.xHighestCompleteStep[j]
            }
        };
    };

    Spectrum.prototype.countStepDecimals = function() {
        var stepDecimals = this.xNumSteps.map(countDecimals);
        return Math.max.apply(null, stepDecimals);
    };

    // Outside testing
    Spectrum.prototype.convert = function(value) {
        return this.getStep(this.toStepping(value));
    };

    //endregion

    //region Options

    /*	Every input option is tested and parsed. This'll prevent
        endless validation in internal methods. These tests are
        structured with an item for every option available. An
        option can be marked as required by setting the 'r' flag.
        The testing function is provided with three arguments:
            - The provided value for the option;
            - A reference to the options object;
            - The name for the option;

        The testing function returns false when an error is detected,
        or true when everything is OK. It can also modify the option
        object, to make sure all values can be correctly looped elsewhere. */

    //region Defaults

    var defaultFormatter = {
        to: function(value) {
            return value !== undefined && value.toFixed(2);
        },
        from: Number
    };

    var cssClasses = {
        target: "target",
        base: "base",
        origin: "origin",
        handle: "handle",
        handleLower: "handle-lower",
        handleUpper: "handle-upper",
        touchArea: "touch-area",
        horizontal: "horizontal",
        vertical: "vertical",
        background: "background",
        connect: "connect",
        connects: "connects",
        ltr: "ltr",
        rtl: "rtl",
        textDirectionLtr: "txt-dir-ltr",
        textDirectionRtl: "txt-dir-rtl",
        draggable: "draggable",
        drag: "state-drag",
        tap: "state-tap",
        active: "active",
        tooltip: "tooltip",
        pips: "pips",
        pipsHorizontal: "pips-horizontal",
        pipsVertical: "pips-vertical",
        marker: "marker",
        markerHorizontal: "marker-horizontal",
        markerVertical: "marker-vertical",
        markerNormal: "marker-normal",
        markerLarge: "marker-large",
        markerSub: "marker-sub",
        value: "value",
        valueHorizontal: "value-horizontal",
        valueVertical: "value-vertical",
        valueNormal: "value-normal",
        valueLarge: "value-large",
        valueSub: "value-sub"
    };

    //endregion

    function validateFormat(entry) {
        // Any object with a to and from method is supported.
        if (isValidFormatter(entry)) {
            return true;
        }

        throw new Error("noUiSlider (" + VERSION + "): 'format' requires 'to' and 'from' methods.");
    }

    function testStep(parsed, entry) {
        if (!isNumeric(entry)) {
            throw new Error("noUiSlider (" + VERSION + "): 'step' is not numeric.");
        }

        // The step option can still be used to set stepping
        // for linear sliders. Overwritten if set in 'range'.
        parsed.singleStep = entry;
    }

    function testKeyboardPageMultiplier(parsed, entry) {
        if (!isNumeric(entry)) {
            throw new Error("noUiSlider (" + VERSION + "): 'keyboardPageMultiplier' is not numeric.");
        }

        parsed.keyboardPageMultiplier = entry;
    }

    function testKeyboardDefaultStep(parsed, entry) {
        if (!isNumeric(entry)) {
            throw new Error("noUiSlider (" + VERSION + "): 'keyboardDefaultStep' is not numeric.");
        }

        parsed.keyboardDefaultStep = entry;
    }

    function testRange(parsed, entry) {
        // Filter incorrect input.
        if (typeof entry !== "object" || Array.isArray(entry)) {
            throw new Error("noUiSlider (" + VERSION + "): 'range' is not an object.");
        }

        // Catch missing start or end.
        if (entry.min === undefined || entry.max === undefined) {
            throw new Error("noUiSlider (" + VERSION + "): Missing 'min' or 'max' in 'range'.");
        }

        // Catch equal start or end.
        if (entry.min === entry.max) {
            throw new Error("noUiSlider (" + VERSION + "): 'range' 'min' and 'max' cannot be equal.");
        }

        parsed.spectrum = new Spectrum(entry, parsed.snap, parsed.singleStep);
    }

    function testStart(parsed, entry) {
        entry = asArray(entry);

        // Validate input. Values aren't tested, as the public .val method
        // will always provide a valid location.
        if (!Array.isArray(entry) || !entry.length) {
            throw new Error("noUiSlider (" + VERSION + "): 'start' option is incorrect.");
        }

        // Store the number of handles.
        parsed.handles = entry.length;

        // When the slider is initialized, the .val method will
        // be called with the start options.
        parsed.start = entry;
    }

    function testSnap(parsed, entry) {
        // Enforce 100% stepping within subranges.
        parsed.snap = entry;

        if (typeof entry !== "boolean") {
            throw new Error("noUiSlider (" + VERSION + "): 'snap' option must be a boolean.");
        }
    }

    function testAnimate(parsed, entry) {
        // Enforce 100% stepping within subranges.
        parsed.animate = entry;

        if (typeof entry !== "boolean") {
            throw new Error("noUiSlider (" + VERSION + "): 'animate' option must be a boolean.");
        }
    }

    function testAnimationDuration(parsed, entry) {
        parsed.animationDuration = entry;

        if (typeof entry !== "number") {
            throw new Error("noUiSlider (" + VERSION + "): 'animationDuration' option must be a number.");
        }
    }

    function testConnect(parsed, entry) {
        var connect = [false];
        var i;

        // Map legacy options
        if (entry === "lower") {
            entry = [true, false];
        } else if (entry === "upper") {
            entry = [false, true];
        }

        // Handle boolean options
        if (entry === true || entry === false) {
            for (i = 1; i < parsed.handles; i++) {
                connect.push(entry);
            }

            connect.push(false);
        }

        // Reject invalid input
        else if (!Array.isArray(entry) || !entry.length || entry.length !== parsed.handles + 1) {
            throw new Error("noUiSlider (" + VERSION + "): 'connect' option doesn't match handle count.");
        } else {
            connect = entry;
        }

        parsed.connect = connect;
    }

    function testOrientation(parsed, entry) {
        // Set orientation to an a numerical value for easy
        // array selection.
        switch (entry) {
            case "horizontal":
                parsed.ort = 0;
                break;
            case "vertical":
                parsed.ort = 1;
                break;
            default:
                throw new Error("noUiSlider (" + VERSION + "): 'orientation' option is invalid.");
        }
    }

    function testMargin(parsed, entry) {
        if (!isNumeric(entry)) {
            throw new Error("noUiSlider (" + VERSION + "): 'margin' option must be numeric.");
        }

        // Issue #582
        if (entry === 0) {
            return;
        }

        parsed.margin = parsed.spectrum.getDistance(entry);
    }

    function testLimit(parsed, entry) {
        if (!isNumeric(entry)) {
            throw new Error("noUiSlider (" + VERSION + "): 'limit' option must be numeric.");
        }

        parsed.limit = parsed.spectrum.getDistance(entry);

        if (!parsed.limit || parsed.handles < 2) {
            throw new Error(
                "noUiSlider (" +
                    VERSION +
                    "): 'limit' option is only supported on linear sliders with 2 or more handles."
            );
        }
    }

    function testPadding(parsed, entry) {
        var index;

        if (!isNumeric(entry) && !Array.isArray(entry)) {
            throw new Error(
                "noUiSlider (" + VERSION + "): 'padding' option must be numeric or array of exactly 2 numbers."
            );
        }

        if (Array.isArray(entry) && !(entry.length === 2 || isNumeric(entry[0]) || isNumeric(entry[1]))) {
            throw new Error(
                "noUiSlider (" + VERSION + "): 'padding' option must be numeric or array of exactly 2 numbers."
            );
        }

        if (entry === 0) {
            return;
        }

        if (!Array.isArray(entry)) {
            entry = [entry, entry];
        }

        // 'getDistance' returns false for invalid values.
        parsed.padding = [parsed.spectrum.getDistance(entry[0]), parsed.spectrum.getDistance(entry[1])];

        for (index = 0; index < parsed.spectrum.xNumSteps.length - 1; index++) {
            // last "range" can't contain step size as it is purely an endpoint.
            if (parsed.padding[0][index] < 0 || parsed.padding[1][index] < 0) {
                throw new Error("noUiSlider (" + VERSION + "): 'padding' option must be a positive number(s).");
            }
        }

        var totalPadding = entry[0] + entry[1];
        var firstValue = parsed.spectrum.xVal[0];
        var lastValue = parsed.spectrum.xVal[parsed.spectrum.xVal.length - 1];

        if (totalPadding / (lastValue - firstValue) > 1) {
            throw new Error("noUiSlider (" + VERSION + "): 'padding' option must not exceed 100% of the range.");
        }
    }

    function testDirection(parsed, entry) {
        // Set direction as a numerical value for easy parsing.
        // Invert connection for RTL sliders, so that the proper
        // handles get the connect/background classes.
        switch (entry) {
            case "ltr":
                parsed.dir = 0;
                break;
            case "rtl":
                parsed.dir = 1;
                break;
            default:
                throw new Error("noUiSlider (" + VERSION + "): 'direction' option was not recognized.");
        }
    }

    function testBehaviour(parsed, entry) {
        // Make sure the input is a string.
        if (typeof entry !== "string") {
            throw new Error("noUiSlider (" + VERSION + "): 'behaviour' must be a string containing options.");
        }

        // Check if the string contains any keywords.
        // None are required.
        var tap = entry.indexOf("tap") >= 0;
        var drag = entry.indexOf("drag") >= 0;
        var fixed = entry.indexOf("fixed") >= 0;
        var snap = entry.indexOf("snap") >= 0;
        var hover = entry.indexOf("hover") >= 0;
        var unconstrained = entry.indexOf("unconstrained") >= 0;

        if (fixed) {
            if (parsed.handles !== 2) {
                throw new Error("noUiSlider (" + VERSION + "): 'fixed' behaviour must be used with 2 handles");
            }

            // Use margin to enforce fixed state
            testMargin(parsed, parsed.start[1] - parsed.start[0]);
        }

        if (unconstrained && (parsed.margin || parsed.limit)) {
            throw new Error(
                "noUiSlider (" + VERSION + "): 'unconstrained' behaviour cannot be used with margin or limit"
            );
        }

        parsed.events = {
            tap: tap || snap,
            drag: drag,
            fixed: fixed,
            snap: snap,
            hover: hover,
            unconstrained: unconstrained
        };
    }

    function testTooltips(parsed, entry) {
        if (entry === false) {
            return;
        }

        if (entry === true) {
            parsed.tooltips = [];

            for (var i = 0; i < parsed.handles; i++) {
                parsed.tooltips.push(true);
            }
        } else {
            parsed.tooltips = asArray(entry);

            if (parsed.tooltips.length !== parsed.handles) {
                throw new Error("noUiSlider (" + VERSION + "): must pass a formatter for all handles.");
            }

            parsed.tooltips.forEach(function(formatter) {
                if (
                    typeof formatter !== "boolean" &&
                    (typeof formatter !== "object" || typeof formatter.to !== "function")
                ) {
                    throw new Error("noUiSlider (" + VERSION + "): 'tooltips' must be passed a formatter or 'false'.");
                }
            });
        }
    }

    function testAriaFormat(parsed, entry) {
        parsed.ariaFormat = entry;
        validateFormat(entry);
    }

    function testFormat(parsed, entry) {
        parsed.format = entry;
        validateFormat(entry);
    }

    function testKeyboardSupport(parsed, entry) {
        parsed.keyboardSupport = entry;

        if (typeof entry !== "boolean") {
            throw new Error("noUiSlider (" + VERSION + "): 'keyboardSupport' option must be a boolean.");
        }
    }

    function testDocumentElement(parsed, entry) {
        // This is an advanced option. Passed values are used without validation.
        parsed.documentElement = entry;
    }

    function testCssPrefix(parsed, entry) {
        if (typeof entry !== "string" && entry !== false) {
            throw new Error("noUiSlider (" + VERSION + "): 'cssPrefix' must be a string or `false`.");
        }

        parsed.cssPrefix = entry;
    }

    function testCssClasses(parsed, entry) {
        if (typeof entry !== "object") {
            throw new Error("noUiSlider (" + VERSION + "): 'cssClasses' must be an object.");
        }

        if (typeof parsed.cssPrefix === "string") {
            parsed.cssClasses = {};

            for (var key in entry) {
                if (!entry.hasOwnProperty(key)) {
                    continue;
                }

                parsed.cssClasses[key] = parsed.cssPrefix + entry[key];
            }
        } else {
            parsed.cssClasses = entry;
        }
    }

    // Test all developer settings and parse to assumption-safe values.
    function testOptions(options) {
        // To prove a fix for #537, freeze options here.
        // If the object is modified, an error will be thrown.
        // Object.freeze(options);

        var parsed = {
            margin: 0,
            limit: 0,
            padding: 0,
            animate: true,
            animationDuration: 300,
            ariaFormat: defaultFormatter,
            format: defaultFormatter
        };

        // Tests are executed in the order they are presented here.
        var tests = {
            step: { r: false, t: testStep },
            keyboardPageMultiplier: { r: false, t: testKeyboardPageMultiplier },
            keyboardDefaultStep: { r: false, t: testKeyboardDefaultStep },
            start: { r: true, t: testStart },
            connect: { r: true, t: testConnect },
            direction: { r: true, t: testDirection },
            snap: { r: false, t: testSnap },
            animate: { r: false, t: testAnimate },
            animationDuration: { r: false, t: testAnimationDuration },
            range: { r: true, t: testRange },
            orientation: { r: false, t: testOrientation },
            margin: { r: false, t: testMargin },
            limit: { r: false, t: testLimit },
            padding: { r: false, t: testPadding },
            behaviour: { r: true, t: testBehaviour },
            ariaFormat: { r: false, t: testAriaFormat },
            format: { r: false, t: testFormat },
            tooltips: { r: false, t: testTooltips },
            keyboardSupport: { r: true, t: testKeyboardSupport },
            documentElement: { r: false, t: testDocumentElement },
            cssPrefix: { r: true, t: testCssPrefix },
            cssClasses: { r: true, t: testCssClasses }
        };

        var defaults = {
            connect: false,
            direction: "ltr",
            behaviour: "tap",
            orientation: "horizontal",
            keyboardSupport: true,
            cssPrefix: "noUi-",
            cssClasses: cssClasses,
            keyboardPageMultiplier: 5,
            keyboardDefaultStep: 10
        };

        // AriaFormat defaults to regular format, if any.
        if (options.format && !options.ariaFormat) {
            options.ariaFormat = options.format;
        }

        // Run all options through a testing mechanism to ensure correct
        // input. It should be noted that options might get modified to
        // be handled properly. E.g. wrapping integers in arrays.
        Object.keys(tests).forEach(function(name) {
            // If the option isn't set, but it is required, throw an error.
            if (!isSet(options[name]) && defaults[name] === undefined) {
                if (tests[name].r) {
                    throw new Error("noUiSlider (" + VERSION + "): '" + name + "' is required.");
                }

                return true;
            }

            tests[name].t(parsed, !isSet(options[name]) ? defaults[name] : options[name]);
        });

        // Forward pips options
        parsed.pips = options.pips;

        // All recent browsers accept unprefixed transform.
        // We need -ms- for IE9 and -webkit- for older Android;
        // Assume use of -webkit- if unprefixed and -ms- are not supported.
        // https://caniuse.com/#feat=transforms2d
        var d = document.createElement("div");
        var msPrefix = d.style.msTransform !== undefined;
        var noPrefix = d.style.transform !== undefined;

        parsed.transformRule = noPrefix ? "transform" : msPrefix ? "msTransform" : "webkitTransform";

        // Pips don't move, so we can place them using left/top.
        var styles = [["left", "top"], ["right", "bottom"]];

        parsed.style = styles[parsed.dir][parsed.ort];

        return parsed;
    }

    //endregion

    function scope(target, options, originalOptions) {
        var actions = getActions();
        var supportsTouchActionNone = getSupportsTouchActionNone();
        var supportsPassive = supportsTouchActionNone && getSupportsPassive();

        // All variables local to 'scope' are prefixed with 'scope_'

        // Slider DOM Nodes
        var scope_Target = target;
        var scope_Base;
        var scope_Handles;
        var scope_Connects;
        var scope_Pips;
        var scope_Tooltips;

        // Slider state values
        var scope_Spectrum = options.spectrum;
        var scope_Values = [];
        var scope_Locations = [];
        var scope_HandleNumbers = [];
        var scope_ActiveHandlesCount = 0;
        var scope_Events = {};

        // Exposed API
        var scope_Self;

        // Document Nodes
        var scope_Document = target.ownerDocument;
        var scope_DocumentElement = options.documentElement || scope_Document.documentElement;
        var scope_Body = scope_Document.body;

        // Pips constants
        var PIPS_NONE = -1;
        var PIPS_NO_VALUE = 0;
        var PIPS_LARGE_VALUE = 1;
        var PIPS_SMALL_VALUE = 2;

        // For horizontal sliders in standard ltr documents,
        // make .noUi-origin overflow to the left so the document doesn't scroll.
        var scope_DirOffset = scope_Document.dir === "rtl" || options.ort === 1 ? 0 : 100;

        // Creates a node, adds it to target, returns the new node.
        function addNodeTo(addTarget, className) {
            var div = scope_Document.createElement("div");

            if (className) {
                addClass(div, className);
            }

            addTarget.appendChild(div);

            return div;
        }

        // Append a origin to the base
        function addOrigin(base, handleNumber) {
            var origin = addNodeTo(base, options.cssClasses.origin);
            var handle = addNodeTo(origin, options.cssClasses.handle);

            addNodeTo(handle, options.cssClasses.touchArea);

            handle.setAttribute("data-handle", handleNumber);

            if (options.keyboardSupport) {
                // https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex
                // 0 = focusable and reachable
                handle.setAttribute("tabindex", "0");
                handle.addEventListener("keydown", function(event) {
                    return eventKeydown(event, handleNumber);
                });
            }

            handle.setAttribute("role", "slider");
            handle.setAttribute("aria-orientation", options.ort ? "vertical" : "horizontal");

            if (handleNumber === 0) {
                addClass(handle, options.cssClasses.handleLower);
            } else if (handleNumber === options.handles - 1) {
                addClass(handle, options.cssClasses.handleUpper);
            }

            return origin;
        }

        // Insert nodes for connect elements
        function addConnect(base, add) {
            if (!add) {
                return false;
            }

            return addNodeTo(base, options.cssClasses.connect);
        }

        // Add handles to the slider base.
        function addElements(connectOptions, base) {
            var connectBase = addNodeTo(base, options.cssClasses.connects);

            scope_Handles = [];
            scope_Connects = [];

            scope_Connects.push(addConnect(connectBase, connectOptions[0]));

            // [::::O====O====O====]
            // connectOptions = [0, 1, 1, 1]

            for (var i = 0; i < options.handles; i++) {
                // Keep a list of all added handles.
                scope_Handles.push(addOrigin(base, i));
                scope_HandleNumbers[i] = i;
                scope_Connects.push(addConnect(connectBase, connectOptions[i + 1]));
            }
        }

        // Initialize a single slider.
        function addSlider(addTarget) {
            // Apply classes and data to the target.
            addClass(addTarget, options.cssClasses.target);

            if (options.dir === 0) {
                addClass(addTarget, options.cssClasses.ltr);
            } else {
                addClass(addTarget, options.cssClasses.rtl);
            }

            if (options.ort === 0) {
                addClass(addTarget, options.cssClasses.horizontal);
            } else {
                addClass(addTarget, options.cssClasses.vertical);
            }

            var textDirection = getComputedStyle(addTarget).direction;

            if (textDirection === "rtl") {
                addClass(addTarget, options.cssClasses.textDirectionRtl);
            } else {
                addClass(addTarget, options.cssClasses.textDirectionLtr);
            }

            return addNodeTo(addTarget, options.cssClasses.base);
        }

        function addTooltip(handle, handleNumber) {
            if (!options.tooltips[handleNumber]) {
                return false;
            }

            return addNodeTo(handle.firstChild, options.cssClasses.tooltip);
        }

        function isSliderDisabled() {
            return scope_Target.hasAttribute("disabled");
        }

        // Disable the slider dragging if any handle is disabled
        function isHandleDisabled(handleNumber) {
            var handleOrigin = scope_Handles[handleNumber];
            return handleOrigin.hasAttribute("disabled");
        }

        function removeTooltips() {
            if (scope_Tooltips) {
                removeEvent("update.tooltips");
                scope_Tooltips.forEach(function(tooltip) {
                    if (tooltip) {
                        removeElement(tooltip);
                    }
                });
                scope_Tooltips = null;
            }
        }

        // The tooltips option is a shorthand for using the 'update' event.
        function tooltips() {
            removeTooltips();

            // Tooltips are added with options.tooltips in original order.
            scope_Tooltips = scope_Handles.map(addTooltip);

            bindEvent("update.tooltips", function(values, handleNumber, unencoded) {
                if (!scope_Tooltips[handleNumber]) {
                    return;
                }

                var formattedValue = values[handleNumber];

                if (options.tooltips[handleNumber] !== true) {
                    formattedValue = options.tooltips[handleNumber].to(unencoded[handleNumber]);
                }

                scope_Tooltips[handleNumber].innerHTML = formattedValue;
            });
        }

        function aria() {
            bindEvent("update", function(values, handleNumber, unencoded, tap, positions) {
                // Update Aria Values for all handles, as a change in one changes min and max values for the next.
                scope_HandleNumbers.forEach(function(index) {
                    var handle = scope_Handles[index];

                    var min = checkHandlePosition(scope_Locations, index, 0, true, true, true);
                    var max = checkHandlePosition(scope_Locations, index, 100, true, true, true);

                    var now = positions[index];

                    // Formatted value for display
                    var text = options.ariaFormat.to(unencoded[index]);

                    // Map to slider range values
                    min = scope_Spectrum.fromStepping(min).toFixed(1);
                    max = scope_Spectrum.fromStepping(max).toFixed(1);
                    now = scope_Spectrum.fromStepping(now).toFixed(1);

                    handle.children[0].setAttribute("aria-valuemin", min);
                    handle.children[0].setAttribute("aria-valuemax", max);
                    handle.children[0].setAttribute("aria-valuenow", now);
                    handle.children[0].setAttribute("aria-valuetext", text);
                });
            });
        }

        function getGroup(mode, values, stepped) {
            // Use the range.
            if (mode === "range" || mode === "steps") {
                return scope_Spectrum.xVal;
            }

            if (mode === "count") {
                if (values < 2) {
                    throw new Error("noUiSlider (" + VERSION + "): 'values' (>= 2) required for mode 'count'.");
                }

                // Divide 0 - 100 in 'count' parts.
                var interval = values - 1;
                var spread = 100 / interval;

                values = [];

                // List these parts and have them handled as 'positions'.
                while (interval--) {
                    values[interval] = interval * spread;
                }

                values.push(100);

                mode = "positions";
            }

            if (mode === "positions") {
                // Map all percentages to on-range values.
                return values.map(function(value) {
                    return scope_Spectrum.fromStepping(stepped ? scope_Spectrum.getStep(value) : value);
                });
            }

            if (mode === "values") {
                // If the value must be stepped, it needs to be converted to a percentage first.
                if (stepped) {
                    return values.map(function(value) {
                        // Convert to percentage, apply step, return to value.
                        return scope_Spectrum.fromStepping(scope_Spectrum.getStep(scope_Spectrum.toStepping(value)));
                    });
                }

                // Otherwise, we can simply use the values.
                return values;
            }
        }

        function generateSpread(density, mode, group) {
            function safeIncrement(value, increment) {
                // Avoid floating point variance by dropping the smallest decimal places.
                return (value + increment).toFixed(7) / 1;
            }

            var indexes = {};
            var firstInRange = scope_Spectrum.xVal[0];
            var lastInRange = scope_Spectrum.xVal[scope_Spectrum.xVal.length - 1];
            var ignoreFirst = false;
            var ignoreLast = false;
            var prevPct = 0;

            // Create a copy of the group, sort it and filter away all duplicates.
            group = unique(
                group.slice().sort(function(a, b) {
                    return a - b;
                })
            );

            // Make sure the range starts with the first element.
            if (group[0] !== firstInRange) {
                group.unshift(firstInRange);
                ignoreFirst = true;
            }

            // Likewise for the last one.
            if (group[group.length - 1] !== lastInRange) {
                group.push(lastInRange);
                ignoreLast = true;
            }

            group.forEach(function(current, index) {
                // Get the current step and the lower + upper positions.
                var step;
                var i;
                var q;
                var low = current;
                var high = group[index + 1];
                var newPct;
                var pctDifference;
                var pctPos;
                var type;
                var steps;
                var realSteps;
                var stepSize;
                var isSteps = mode === "steps";

                // When using 'steps' mode, use the provided steps.
                // Otherwise, we'll step on to the next subrange.
                if (isSteps) {
                    step = scope_Spectrum.xNumSteps[index];
                }

                // Default to a 'full' step.
                if (!step) {
                    step = high - low;
                }

                // Low can be 0, so test for false. Index 0 is already handled.
                if (low === false) {
                    return;
                }

                // If high is undefined we are at the last subrange. Make sure it iterates once (#1088)
                if (high === undefined) {
                    high = low;
                }

                // Make sure step isn't 0, which would cause an infinite loop (#654)
                step = Math.max(step, 0.0000001);

                // Find all steps in the subrange.
                for (i = low; i <= high; i = safeIncrement(i, step)) {
                    // Get the percentage value for the current step,
                    // calculate the size for the subrange.
                    newPct = scope_Spectrum.toStepping(i);
                    pctDifference = newPct - prevPct;

                    steps = pctDifference / density;
                    realSteps = Math.round(steps);

                    // This ratio represents the amount of percentage-space a point indicates.
                    // For a density 1 the points/percentage = 1. For density 2, that percentage needs to be re-divided.
                    // Round the percentage offset to an even number, then divide by two
                    // to spread the offset on both sides of the range.
                    stepSize = pctDifference / realSteps;

                    // Divide all points evenly, adding the correct number to this subrange.
                    // Run up to <= so that 100% gets a point, event if ignoreLast is set.
                    for (q = 1; q <= realSteps; q += 1) {
                        // The ratio between the rounded value and the actual size might be ~1% off.
                        // Correct the percentage offset by the number of points
                        // per subrange. density = 1 will result in 100 points on the
                        // full range, 2 for 50, 4 for 25, etc.
                        pctPos = prevPct + q * stepSize;
                        indexes[pctPos.toFixed(5)] = [scope_Spectrum.fromStepping(pctPos), 0];
                    }

                    // Determine the point type.
                    type = group.indexOf(i) > -1 ? PIPS_LARGE_VALUE : isSteps ? PIPS_SMALL_VALUE : PIPS_NO_VALUE;

                    // Enforce the 'ignoreFirst' option by overwriting the type for 0.
                    if (!index && ignoreFirst && i !== high) {
                        type = 0;
                    }

                    if (!(i === high && ignoreLast)) {
                        // Mark the 'type' of this point. 0 = plain, 1 = real value, 2 = step value.
                        indexes[newPct.toFixed(5)] = [i, type];
                    }

                    // Update the percentage count.
                    prevPct = newPct;
                }
            });

            return indexes;
        }

        function addMarking(spread, filterFunc, formatter) {
            var element = scope_Document.createElement("div");

            var valueSizeClasses = [];
            valueSizeClasses[PIPS_NO_VALUE] = options.cssClasses.valueNormal;
            valueSizeClasses[PIPS_LARGE_VALUE] = options.cssClasses.valueLarge;
            valueSizeClasses[PIPS_SMALL_VALUE] = options.cssClasses.valueSub;

            var markerSizeClasses = [];
            markerSizeClasses[PIPS_NO_VALUE] = options.cssClasses.markerNormal;
            markerSizeClasses[PIPS_LARGE_VALUE] = options.cssClasses.markerLarge;
            markerSizeClasses[PIPS_SMALL_VALUE] = options.cssClasses.markerSub;

            var valueOrientationClasses = [options.cssClasses.valueHorizontal, options.cssClasses.valueVertical];
            var markerOrientationClasses = [options.cssClasses.markerHorizontal, options.cssClasses.markerVertical];

            addClass(element, options.cssClasses.pips);
            addClass(element, options.ort === 0 ? options.cssClasses.pipsHorizontal : options.cssClasses.pipsVertical);

            function getClasses(type, source) {
                var a = source === options.cssClasses.value;
                var orientationClasses = a ? valueOrientationClasses : markerOrientationClasses;
                var sizeClasses = a ? valueSizeClasses : markerSizeClasses;

                return source + " " + orientationClasses[options.ort] + " " + sizeClasses[type];
            }

            function addSpread(offset, value, type) {
                // Apply the filter function, if it is set.
                type = filterFunc ? filterFunc(value, type) : type;

                if (type === PIPS_NONE) {
                    return;
                }

                // Add a marker for every point
                var node = addNodeTo(element, false);
                node.className = getClasses(type, options.cssClasses.marker);
                node.style[options.style] = offset + "%";

                // Values are only appended for points marked '1' or '2'.
                if (type > PIPS_NO_VALUE) {
                    node = addNodeTo(element, false);
                    node.className = getClasses(type, options.cssClasses.value);
                    node.setAttribute("data-value", value);
                    node.style[options.style] = offset + "%";
                    node.innerHTML = formatter.to(value);
                }
            }

            // Append all points.
            Object.keys(spread).forEach(function(offset) {
                addSpread(offset, spread[offset][0], spread[offset][1]);
            });

            return element;
        }

        function removePips() {
            if (scope_Pips) {
                removeElement(scope_Pips);
                scope_Pips = null;
            }
        }

        function pips(grid) {
            // Fix #669
            removePips();

            var mode = grid.mode;
            var density = grid.density || 1;
            var filter = grid.filter || false;
            var values = grid.values || false;
            var stepped = grid.stepped || false;
            var group = getGroup(mode, values, stepped);
            var spread = generateSpread(density, mode, group);
            var format = grid.format || {
                to: Math.round
            };

            scope_Pips = scope_Target.appendChild(addMarking(spread, filter, format));

            return scope_Pips;
        }

        // Shorthand for base dimensions.
        function baseSize() {
            var rect = scope_Base.getBoundingClientRect();
            var alt = "offset" + ["Width", "Height"][options.ort];
            return options.ort === 0 ? rect.width || scope_Base[alt] : rect.height || scope_Base[alt];
        }

        // Handler for attaching events trough a proxy.
        function attachEvent(events, element, callback, data) {
            // This function can be used to 'filter' events to the slider.
            // element is a node, not a nodeList

            var method = function(e) {
                e = fixEvent(e, data.pageOffset, data.target || element);

                // fixEvent returns false if this event has a different target
                // when handling (multi-) touch events;
                if (!e) {
                    return false;
                }

                // doNotReject is passed by all end events to make sure released touches
                // are not rejected, leaving the slider "stuck" to the cursor;
                if (isSliderDisabled() && !data.doNotReject) {
                    return false;
                }

                // Stop if an active 'tap' transition is taking place.
                if (hasClass(scope_Target, options.cssClasses.tap) && !data.doNotReject) {
                    return false;
                }

                // Ignore right or middle clicks on start #454
                if (events === actions.start && e.buttons !== undefined && e.buttons > 1) {
                    return false;
                }

                // Ignore right or middle clicks on start #454
                if (data.hover && e.buttons) {
                    return false;
                }

                // 'supportsPassive' is only true if a browser also supports touch-action: none in CSS.
                // iOS safari does not, so it doesn't get to benefit from passive scrolling. iOS does support
                // touch-action: manipulation, but that allows panning, which breaks
                // sliders after zooming/on non-responsive pages.
                // See: https://bugs.webkit.org/show_bug.cgi?id=133112
                if (!supportsPassive) {
                    e.preventDefault();
                }

                e.calcPoint = e.points[options.ort];

                // Call the event handler with the event [ and additional data ].
                callback(e, data);
            };

            var methods = [];

            // Bind a closure on the target for every event type.
            events.split(" ").forEach(function(eventName) {
                element.addEventListener(eventName, method, supportsPassive ? { passive: true } : false);
                methods.push([eventName, method]);
            });

            return methods;
        }

        // Provide a clean event with standardized offset values.
        function fixEvent(e, pageOffset, eventTarget) {
            // Filter the event to register the type, which can be
            // touch, mouse or pointer. Offset changes need to be
            // made on an event specific basis.
            var touch = e.type.indexOf("touch") === 0;
            var mouse = e.type.indexOf("mouse") === 0;
            var pointer = e.type.indexOf("pointer") === 0;

            var x;
            var y;

            // IE10 implemented pointer events with a prefix;
            if (e.type.indexOf("MSPointer") === 0) {
                pointer = true;
            }

            // The only thing one handle should be concerned about is the touches that originated on top of it.
            if (touch) {
                // Returns true if a touch originated on the target.
                var isTouchOnTarget = function(checkTouch) {
                    return (
                        checkTouch.target === eventTarget ||
                        eventTarget.contains(checkTouch.target) ||
                        (checkTouch.target.shadowRoot && checkTouch.target.shadowRoot.contains(eventTarget))
                    );
                };

                // In the case of touchstart events, we need to make sure there is still no more than one
                // touch on the target so we look amongst all touches.
                if (e.type === "touchstart") {
                    var targetTouches = Array.prototype.filter.call(e.touches, isTouchOnTarget);

                    // Do not support more than one touch per handle.
                    if (targetTouches.length > 1) {
                        return false;
                    }

                    x = targetTouches[0].pageX;
                    y = targetTouches[0].pageY;
                } else {
                    // In the other cases, find on changedTouches is enough.
                    var targetTouch = Array.prototype.find.call(e.changedTouches, isTouchOnTarget);

                    // Cancel if the target touch has not moved.
                    if (!targetTouch) {
                        return false;
                    }

                    x = targetTouch.pageX;
                    y = targetTouch.pageY;
                }
            }

            pageOffset = pageOffset || getPageOffset(scope_Document);

            if (mouse || pointer) {
                x = e.clientX + pageOffset.x;
                y = e.clientY + pageOffset.y;
            }

            e.pageOffset = pageOffset;
            e.points = [x, y];
            e.cursor = mouse || pointer; // Fix #435

            return e;
        }

        // Translate a coordinate in the document to a percentage on the slider
        function calcPointToPercentage(calcPoint) {
            var location = calcPoint - offset(scope_Base, options.ort);
            var proposal = (location * 100) / baseSize();

            // Clamp proposal between 0% and 100%
            // Out-of-bound coordinates may occur when .noUi-base pseudo-elements
            // are used (e.g. contained handles feature)
            proposal = limit(proposal);

            return options.dir ? 100 - proposal : proposal;
        }

        // Find handle closest to a certain percentage on the slider
        function getClosestHandle(clickedPosition) {
            var smallestDifference = 100;
            var handleNumber = false;

            scope_Handles.forEach(function(handle, index) {
                // Disabled handles are ignored
                if (isHandleDisabled(index)) {
                    return;
                }

                var handlePosition = scope_Locations[index];
                var differenceWithThisHandle = Math.abs(handlePosition - clickedPosition);

                // Initial state
                var clickAtEdge = differenceWithThisHandle === 100 && smallestDifference === 100;

                // Difference with this handle is smaller than the previously checked handle
                var isCloser = differenceWithThisHandle < smallestDifference;
                var isCloserAfter = differenceWithThisHandle <= smallestDifference && clickedPosition > handlePosition;

                if (isCloser || isCloserAfter || clickAtEdge) {
                    handleNumber = index;
                    smallestDifference = differenceWithThisHandle;
                }
            });

            return handleNumber;
        }

        // Fire 'end' when a mouse or pen leaves the document.
        function documentLeave(event, data) {
            if (event.type === "mouseout" && event.target.nodeName === "HTML" && event.relatedTarget === null) {
                eventEnd(event, data);
            }
        }

        // Handle movement on document for handle and range drag.
        function eventMove(event, data) {
            // Fix #498
            // Check value of .buttons in 'start' to work around a bug in IE10 mobile (data.buttonsProperty).
            // https://connect.microsoft.com/IE/feedback/details/927005/mobile-ie10-windows-phone-buttons-property-of-pointermove-event-always-zero
            // IE9 has .buttons and .which zero on mousemove.
            // Firefox breaks the spec MDN defines.
            if (navigator.appVersion.indexOf("MSIE 9") === -1 && event.buttons === 0 && data.buttonsProperty !== 0) {
                return eventEnd(event, data);
            }

            // Check if we are moving up or down
            var movement = (options.dir ? -1 : 1) * (event.calcPoint - data.startCalcPoint);

            // Convert the movement into a percentage of the slider width/height
            var proposal = (movement * 100) / data.baseSize;

            moveHandles(movement > 0, proposal, data.locations, data.handleNumbers);
        }

        // Unbind move events on document, call callbacks.
        function eventEnd(event, data) {
            // The handle is no longer active, so remove the class.
            if (data.handle) {
                removeClass(data.handle, options.cssClasses.active);
                scope_ActiveHandlesCount -= 1;
            }

            // Unbind the move and end events, which are added on 'start'.
            data.listeners.forEach(function(c) {
                scope_DocumentElement.removeEventListener(c[0], c[1]);
            });

            if (scope_ActiveHandlesCount === 0) {
                // Remove dragging class.
                removeClass(scope_Target, options.cssClasses.drag);
                setZindex();

                // Remove cursor styles and text-selection events bound to the body.
                if (event.cursor) {
                    scope_Body.style.cursor = "";
                    scope_Body.removeEventListener("selectstart", preventDefault);
                }
            }

            data.handleNumbers.forEach(function(handleNumber) {
                fireEvent("change", handleNumber);
                fireEvent("set", handleNumber);
                fireEvent("end", handleNumber);
            });
        }

        // Bind move events on document.
        function eventStart(event, data) {
            // Ignore event if any handle is disabled
            if (data.handleNumbers.some(isHandleDisabled)) {
                return false;
            }

            var handle;

            if (data.handleNumbers.length === 1) {
                var handleOrigin = scope_Handles[data.handleNumbers[0]];

                handle = handleOrigin.children[0];
                scope_ActiveHandlesCount += 1;

                // Mark the handle as 'active' so it can be styled.
                addClass(handle, options.cssClasses.active);
            }

            // A drag should never propagate up to the 'tap' event.
            event.stopPropagation();

            // Record the event listeners.
            var listeners = [];

            // Attach the move and end events.
            var moveEvent = attachEvent(actions.move, scope_DocumentElement, eventMove, {
                // The event target has changed so we need to propagate the original one so that we keep
                // relying on it to extract target touches.
                target: event.target,
                handle: handle,
                listeners: listeners,
                startCalcPoint: event.calcPoint,
                baseSize: baseSize(),
                pageOffset: event.pageOffset,
                handleNumbers: data.handleNumbers,
                buttonsProperty: event.buttons,
                locations: scope_Locations.slice()
            });

            var endEvent = attachEvent(actions.end, scope_DocumentElement, eventEnd, {
                target: event.target,
                handle: handle,
                listeners: listeners,
                doNotReject: true,
                handleNumbers: data.handleNumbers
            });

            var outEvent = attachEvent("mouseout", scope_DocumentElement, documentLeave, {
                target: event.target,
                handle: handle,
                listeners: listeners,
                doNotReject: true,
                handleNumbers: data.handleNumbers
            });

            // We want to make sure we pushed the listeners in the listener list rather than creating
            // a new one as it has already been passed to the event handlers.
            listeners.push.apply(listeners, moveEvent.concat(endEvent, outEvent));

            // Text selection isn't an issue on touch devices,
            // so adding cursor styles can be skipped.
            if (event.cursor) {
                // Prevent the 'I' cursor and extend the range-drag cursor.
                scope_Body.style.cursor = getComputedStyle(event.target).cursor;

                // Mark the target with a dragging state.
                if (scope_Handles.length > 1) {
                    addClass(scope_Target, options.cssClasses.drag);
                }

                // Prevent text selection when dragging the handles.
                // In noUiSlider <= 9.2.0, this was handled by calling preventDefault on mouse/touch start/move,
                // which is scroll blocking. The selectstart event is supported by FireFox starting from version 52,
                // meaning the only holdout is iOS Safari. This doesn't matter: text selection isn't triggered there.
                // The 'cursor' flag is false.
                // See: http://caniuse.com/#search=selectstart
                scope_Body.addEventListener("selectstart", preventDefault, false);
            }

            data.handleNumbers.forEach(function(handleNumber) {
                fireEvent("start", handleNumber);
            });
        }

        // Move closest handle to tapped location.
        function eventTap(event) {
            // Erroneous events seem to be passed in occasionally on iOS/iPadOS after user finishes interacting with
            // the slider. They appear to be of type MouseEvent, yet they don't have usual properties set. Ignore tap
            // events that have no touches or buttons associated with them.
            if (!event.buttons && !event.touches) {
                return false;
            }

            // The tap event shouldn't propagate up
            event.stopPropagation();

            var proposal = calcPointToPercentage(event.calcPoint);
            var handleNumber = getClosestHandle(proposal);

            // Tackle the case that all handles are 'disabled'.
            if (handleNumber === false) {
                return false;
            }

            // Flag the slider as it is now in a transitional state.
            // Transition takes a configurable amount of ms (default 300). Re-enable the slider after that.
            if (!options.events.snap) {
                addClassFor(scope_Target, options.cssClasses.tap, options.animationDuration);
            }

            setHandle(handleNumber, proposal, true, true);

            setZindex();

            fireEvent("slide", handleNumber, true);
            fireEvent("update", handleNumber, true);
            fireEvent("change", handleNumber, true);
            fireEvent("set", handleNumber, true);

            if (options.events.snap) {
                eventStart(event, { handleNumbers: [handleNumber] });
            }
        }

        // Fires a 'hover' event for a hovered mouse/pen position.
        function eventHover(event) {
            var proposal = calcPointToPercentage(event.calcPoint);

            var to = scope_Spectrum.getStep(proposal);
            var value = scope_Spectrum.fromStepping(to);

            Object.keys(scope_Events).forEach(function(targetEvent) {
                if ("hover" === targetEvent.split(".")[0]) {
                    scope_Events[targetEvent].forEach(function(callback) {
                        callback.call(scope_Self, value);
                    });
                }
            });
        }

        // Handles keydown on focused handles
        // Don't move the document when pressing arrow keys on focused handles
        function eventKeydown(event, handleNumber) {
            if (isSliderDisabled() || isHandleDisabled(handleNumber)) {
                return false;
            }

            var horizontalKeys = ["Left", "Right"];
            var verticalKeys = ["Down", "Up"];
            var largeStepKeys = ["PageDown", "PageUp"];
            var edgeKeys = ["Home", "End"];

            if (options.dir && !options.ort) {
                // On an right-to-left slider, the left and right keys act inverted
                horizontalKeys.reverse();
            } else if (options.ort && !options.dir) {
                // On a top-to-bottom slider, the up and down keys act inverted
                verticalKeys.reverse();
                largeStepKeys.reverse();
            }

            // Strip "Arrow" for IE compatibility. https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key
            var key = event.key.replace("Arrow", "");

            var isLargeDown = key === largeStepKeys[0];
            var isLargeUp = key === largeStepKeys[1];
            var isDown = key === verticalKeys[0] || key === horizontalKeys[0] || isLargeDown;
            var isUp = key === verticalKeys[1] || key === horizontalKeys[1] || isLargeUp;
            var isMin = key === edgeKeys[0];
            var isMax = key === edgeKeys[1];

            if (!isDown && !isUp && !isMin && !isMax) {
                return true;
            }

            event.preventDefault();

            var to;

            if (isUp || isDown) {
                var multiplier = options.keyboardPageMultiplier;
                var direction = isDown ? 0 : 1;
                var steps = getNextStepsForHandle(handleNumber);
                var step = steps[direction];

                // At the edge of a slider, do nothing
                if (step === null) {
                    return false;
                }

                // No step set, use the default of 10% of the sub-range
                if (step === false) {
                    step = scope_Spectrum.getDefaultStep(
                        scope_Locations[handleNumber],
                        isDown,
                        options.keyboardDefaultStep
                    );
                }

                if (isLargeUp || isLargeDown) {
                    step *= multiplier;
                }

                // Step over zero-length ranges (#948);
                step = Math.max(step, 0.0000001);

                // Decrement for down steps
                step = (isDown ? -1 : 1) * step;

                to = scope_Values[handleNumber] + step;
            } else if (isMax) {
                // End key
                to = options.spectrum.xVal[options.spectrum.xVal.length - 1];
            } else {
                // Home key
                to = options.spectrum.xVal[0];
            }

            setHandle(handleNumber, scope_Spectrum.toStepping(to), true, true);

            fireEvent("slide", handleNumber);
            fireEvent("update", handleNumber);
            fireEvent("change", handleNumber);
            fireEvent("set", handleNumber);

            return false;
        }

        // Attach events to several slider parts.
        function bindSliderEvents(behaviour) {
            // Attach the standard drag event to the handles.
            if (!behaviour.fixed) {
                scope_Handles.forEach(function(handle, index) {
                    // These events are only bound to the visual handle
                    // element, not the 'real' origin element.
                    attachEvent(actions.start, handle.children[0], eventStart, {
                        handleNumbers: [index]
                    });
                });
            }

            // Attach the tap event to the slider base.
            if (behaviour.tap) {
                attachEvent(actions.start, scope_Base, eventTap, {});
            }

            // Fire hover events
            if (behaviour.hover) {
                attachEvent(actions.move, scope_Base, eventHover, {
                    hover: true
                });
            }

            // Make the range draggable.
            if (behaviour.drag) {
                scope_Connects.forEach(function(connect, index) {
                    if (connect === false || index === 0 || index === scope_Connects.length - 1) {
                        return;
                    }

                    var handleBefore = scope_Handles[index - 1];
                    var handleAfter = scope_Handles[index];
                    var eventHolders = [connect];

                    addClass(connect, options.cssClasses.draggable);

                    // When the range is fixed, the entire range can
                    // be dragged by the handles. The handle in the first
                    // origin will propagate the start event upward,
                    // but it needs to be bound manually on the other.
                    if (behaviour.fixed) {
                        eventHolders.push(handleBefore.children[0]);
                        eventHolders.push(handleAfter.children[0]);
                    }

                    eventHolders.forEach(function(eventHolder) {
                        attachEvent(actions.start, eventHolder, eventStart, {
                            handles: [handleBefore, handleAfter],
                            handleNumbers: [index - 1, index]
                        });
                    });
                });
            }
        }

        // Attach an event to this slider, possibly including a namespace
        function bindEvent(namespacedEvent, callback) {
            scope_Events[namespacedEvent] = scope_Events[namespacedEvent] || [];
            scope_Events[namespacedEvent].push(callback);

            // If the event bound is 'update,' fire it immediately for all handles.
            if (namespacedEvent.split(".")[0] === "update") {
                scope_Handles.forEach(function(a, index) {
                    fireEvent("update", index);
                });
            }
        }

        // Undo attachment of event
        function removeEvent(namespacedEvent) {
            var event = namespacedEvent && namespacedEvent.split(".")[0];
            var namespace = event && namespacedEvent.substring(event.length);

            Object.keys(scope_Events).forEach(function(bind) {
                var tEvent = bind.split(".")[0];
                var tNamespace = bind.substring(tEvent.length);

                if ((!event || event === tEvent) && (!namespace || namespace === tNamespace)) {
                    delete scope_Events[bind];
                }
            });
        }

        // External event handling
        function fireEvent(eventName, handleNumber, tap) {
            Object.keys(scope_Events).forEach(function(targetEvent) {
                var eventType = targetEvent.split(".")[0];

                if (eventName === eventType) {
                    scope_Events[targetEvent].forEach(function(callback) {
                        callback.call(
                            // Use the slider public API as the scope ('this')
                            scope_Self,
                            // Return values as array, so arg_1[arg_2] is always valid.
                            scope_Values.map(options.format.to),
                            // Handle index, 0 or 1
                            handleNumber,
                            // Un-formatted slider values
                            scope_Values.slice(),
                            // Event is fired by tap, true or false
                            tap || false,
                            // Left offset of the handle, in relation to the slider
                            scope_Locations.slice(),
                            // add the slider public API to an accessible parameter when this is unavailable
                            scope_Self
                        );
                    });
                }
            });
        }

        // Split out the handle positioning logic so the Move event can use it, too
        function checkHandlePosition(reference, handleNumber, to, lookBackward, lookForward, getValue) {
            var distance;

            // For sliders with multiple handles, limit movement to the other handle.
            // Apply the margin option by adding it to the handle positions.
            if (scope_Handles.length > 1 && !options.events.unconstrained) {
                if (lookBackward && handleNumber > 0) {
                    distance = scope_Spectrum.getAbsoluteDistance(reference[handleNumber - 1], options.margin, 0);
                    to = Math.max(to, distance);
                }

                if (lookForward && handleNumber < scope_Handles.length - 1) {
                    distance = scope_Spectrum.getAbsoluteDistance(reference[handleNumber + 1], options.margin, 1);
                    to = Math.min(to, distance);
                }
            }

            // The limit option has the opposite effect, limiting handles to a
            // maximum distance from another. Limit must be > 0, as otherwise
            // handles would be unmovable.
            if (scope_Handles.length > 1 && options.limit) {
                if (lookBackward && handleNumber > 0) {
                    distance = scope_Spectrum.getAbsoluteDistance(reference[handleNumber - 1], options.limit, 0);
                    to = Math.min(to, distance);
                }

                if (lookForward && handleNumber < scope_Handles.length - 1) {
                    distance = scope_Spectrum.getAbsoluteDistance(reference[handleNumber + 1], options.limit, 1);
                    to = Math.max(to, distance);
                }
            }

            // The padding option keeps the handles a certain distance from the
            // edges of the slider. Padding must be > 0.
            if (options.padding) {
                if (handleNumber === 0) {
                    distance = scope_Spectrum.getAbsoluteDistance(0, options.padding[0], 0);
                    to = Math.max(to, distance);
                }

                if (handleNumber === scope_Handles.length - 1) {
                    distance = scope_Spectrum.getAbsoluteDistance(100, options.padding[1], 1);
                    to = Math.min(to, distance);
                }
            }

            to = scope_Spectrum.getStep(to);

            // Limit percentage to the 0 - 100 range
            to = limit(to);

            // Return false if handle can't move
            if (to === reference[handleNumber] && !getValue) {
                return false;
            }

            return to;
        }

        // Uses slider orientation to create CSS rules. a = base value;
        function inRuleOrder(v, a) {
            var o = options.ort;
            return (o ? a : v) + ", " + (o ? v : a);
        }

        // Moves handle(s) by a percentage
        // (bool, % to move, [% where handle started, ...], [index in scope_Handles, ...])
        function moveHandles(upward, proposal, locations, handleNumbers) {
            var proposals = locations.slice();

            var b = [!upward, upward];
            var f = [upward, !upward];

            // Copy handleNumbers so we don't change the dataset
            handleNumbers = handleNumbers.slice();

            // Check to see which handle is 'leading'.
            // If that one can't move the second can't either.
            if (upward) {
                handleNumbers.reverse();
            }

            // Step 1: get the maximum percentage that any of the handles can move
            if (handleNumbers.length > 1) {
                handleNumbers.forEach(function(handleNumber, o) {
                    var to = checkHandlePosition(
                        proposals,
                        handleNumber,
                        proposals[handleNumber] + proposal,
                        b[o],
                        f[o],
                        false
                    );

                    // Stop if one of the handles can't move.
                    if (to === false) {
                        proposal = 0;
                    } else {
                        proposal = to - proposals[handleNumber];
                        proposals[handleNumber] = to;
                    }
                });
            }

            // If using one handle, check backward AND forward
            else {
                b = f = [true];
            }

            var state = false;

            // Step 2: Try to set the handles with the found percentage
            handleNumbers.forEach(function(handleNumber, o) {
                state = setHandle(handleNumber, locations[handleNumber] + proposal, b[o], f[o]) || state;
            });

            // Step 3: If a handle moved, fire events
            if (state) {
                handleNumbers.forEach(function(handleNumber) {
                    fireEvent("update", handleNumber);
                    fireEvent("slide", handleNumber);
                });
            }
        }

        // Takes a base value and an offset. This offset is used for the connect bar size.
        // In the initial design for this feature, the origin element was 1% wide.
        // Unfortunately, a rounding bug in Chrome makes it impossible to implement this feature
        // in this manner: https://bugs.chromium.org/p/chromium/issues/detail?id=798223
        function transformDirection(a, b) {
            return options.dir ? 100 - a - b : a;
        }

        // Updates scope_Locations and scope_Values, updates visual state
        function updateHandlePosition(handleNumber, to) {
            // Update locations.
            scope_Locations[handleNumber] = to;

            // Convert the value to the slider stepping/range.
            scope_Values[handleNumber] = scope_Spectrum.fromStepping(to);

            var translation = 10 * (transformDirection(to, 0) - scope_DirOffset);
            var translateRule = "translate(" + inRuleOrder(translation + "%", "0") + ")";

            scope_Handles[handleNumber].style[options.transformRule] = translateRule;

            updateConnect(handleNumber);
            updateConnect(handleNumber + 1);
        }

        // Handles before the slider middle are stacked later = higher,
        // Handles after the middle later is lower
        // [[7] [8] .......... | .......... [5] [4]
        function setZindex() {
            scope_HandleNumbers.forEach(function(handleNumber) {
                var dir = scope_Locations[handleNumber] > 50 ? -1 : 1;
                var zIndex = 3 + (scope_Handles.length + dir * handleNumber);
                scope_Handles[handleNumber].style.zIndex = zIndex;
            });
        }

        // Test suggested values and apply margin, step.
        function setHandle(handleNumber, to, lookBackward, lookForward) {
            to = checkHandlePosition(scope_Locations, handleNumber, to, lookBackward, lookForward, false);

            if (to === false) {
                return false;
            }

            updateHandlePosition(handleNumber, to);

            return true;
        }

        // Updates style attribute for connect nodes
        function updateConnect(index) {
            // Skip connects set to false
            if (!scope_Connects[index]) {
                return;
            }

            var l = 0;
            var h = 100;

            if (index !== 0) {
                l = scope_Locations[index - 1];
            }

            if (index !== scope_Connects.length - 1) {
                h = scope_Locations[index];
            }

            // We use two rules:
            // 'translate' to change the left/top offset;
            // 'scale' to change the width of the element;
            // As the element has a width of 100%, a translation of 100% is equal to 100% of the parent (.noUi-base)
            var connectWidth = h - l;
            var translateRule = "translate(" + inRuleOrder(transformDirection(l, connectWidth) + "%", "0") + ")";
            var scaleRule = "scale(" + inRuleOrder(connectWidth / 100, "1") + ")";

            scope_Connects[index].style[options.transformRule] = translateRule + " " + scaleRule;
        }

        // Parses value passed to .set method. Returns current value if not parse-able.
        function resolveToValue(to, handleNumber) {
            // Setting with null indicates an 'ignore'.
            // Inputting 'false' is invalid.
            if (to === null || to === false || to === undefined) {
                return scope_Locations[handleNumber];
            }

            // If a formatted number was passed, attempt to decode it.
            if (typeof to === "number") {
                to = String(to);
            }

            to = options.format.from(to);
            to = scope_Spectrum.toStepping(to);

            // If parsing the number failed, use the current value.
            if (to === false || isNaN(to)) {
                return scope_Locations[handleNumber];
            }

            return to;
        }

        // Set the slider value.
        function valueSet(input, fireSetEvent) {
            var values = asArray(input);
            var isInit = scope_Locations[0] === undefined;

            // Event fires by default
            fireSetEvent = fireSetEvent === undefined ? true : !!fireSetEvent;

            // Animation is optional.
            // Make sure the initial values were set before using animated placement.
            if (options.animate && !isInit) {
                addClassFor(scope_Target, options.cssClasses.tap, options.animationDuration);
            }

            // First pass, without lookAhead but with lookBackward. Values are set from left to right.
            scope_HandleNumbers.forEach(function(handleNumber) {
                setHandle(handleNumber, resolveToValue(values[handleNumber], handleNumber), true, false);
            });

            var i = scope_HandleNumbers.length === 1 ? 0 : 1;

            // Secondary passes. Now that all base values are set, apply constraints.
            // Iterate all handles to ensure constraints are applied for the entire slider (Issue #1009)
            for (; i < scope_HandleNumbers.length; ++i) {
                scope_HandleNumbers.forEach(function(handleNumber) {
                    setHandle(handleNumber, scope_Locations[handleNumber], true, true);
                });
            }

            setZindex();

            scope_HandleNumbers.forEach(function(handleNumber) {
                fireEvent("update", handleNumber);

                // Fire the event only for handles that received a new value, as per #579
                if (values[handleNumber] !== null && fireSetEvent) {
                    fireEvent("set", handleNumber);
                }
            });
        }

        // Reset slider to initial values
        function valueReset(fireSetEvent) {
            valueSet(options.start, fireSetEvent);
        }

        // Set value for a single handle
        function valueSetHandle(handleNumber, value, fireSetEvent) {
            // Ensure numeric input
            handleNumber = Number(handleNumber);

            if (!(handleNumber >= 0 && handleNumber < scope_HandleNumbers.length)) {
                throw new Error("noUiSlider (" + VERSION + "): invalid handle number, got: " + handleNumber);
            }

            // Look both backward and forward, since we don't want this handle to "push" other handles (#960);
            setHandle(handleNumber, resolveToValue(value, handleNumber), true, true);

            fireEvent("update", handleNumber);

            if (fireSetEvent) {
                fireEvent("set", handleNumber);
            }
        }

        // Get the slider value.
        function valueGet() {
            var values = scope_Values.map(options.format.to);

            // If only one handle is used, return a single value.
            if (values.length === 1) {
                return values[0];
            }

            return values;
        }

        // Removes classes from the root and empties it.
        function destroy() {
            for (var key in options.cssClasses) {
                if (!options.cssClasses.hasOwnProperty(key)) {
                    continue;
                }
                removeClass(scope_Target, options.cssClasses[key]);
            }

            while (scope_Target.firstChild) {
                scope_Target.removeChild(scope_Target.firstChild);
            }

            delete scope_Target.noUiSlider;
        }

        function getNextStepsForHandle(handleNumber) {
            var location = scope_Locations[handleNumber];
            var nearbySteps = scope_Spectrum.getNearbySteps(location);
            var value = scope_Values[handleNumber];
            var increment = nearbySteps.thisStep.step;
            var decrement = null;

            // If snapped, directly use defined step value
            if (options.snap) {
                return [
                    value - nearbySteps.stepBefore.startValue || null,
                    nearbySteps.stepAfter.startValue - value || null
                ];
            }

            // If the next value in this step moves into the next step,
            // the increment is the start of the next step - the current value
            if (increment !== false) {
                if (value + increment > nearbySteps.stepAfter.startValue) {
                    increment = nearbySteps.stepAfter.startValue - value;
                }
            }

            // If the value is beyond the starting point
            if (value > nearbySteps.thisStep.startValue) {
                decrement = nearbySteps.thisStep.step;
            } else if (nearbySteps.stepBefore.step === false) {
                decrement = false;
            }

            // If a handle is at the start of a step, it always steps back into the previous step first
            else {
                decrement = value - nearbySteps.stepBefore.highestStep;
            }

            // Now, if at the slider edges, there is no in/decrement
            if (location === 100) {
                increment = null;
            } else if (location === 0) {
                decrement = null;
            }

            // As per #391, the comparison for the decrement step can have some rounding issues.
            var stepDecimals = scope_Spectrum.countStepDecimals();

            // Round per #391
            if (increment !== null && increment !== false) {
                increment = Number(increment.toFixed(stepDecimals));
            }

            if (decrement !== null && decrement !== false) {
                decrement = Number(decrement.toFixed(stepDecimals));
            }

            return [decrement, increment];
        }

        // Get the current step size for the slider.
        function getNextSteps() {
            return scope_HandleNumbers.map(getNextStepsForHandle);
        }

        // Updateable: margin, limit, padding, step, range, animate, snap
        function updateOptions(optionsToUpdate, fireSetEvent) {
            // Spectrum is created using the range, snap, direction and step options.
            // 'snap' and 'step' can be updated.
            // If 'snap' and 'step' are not passed, they should remain unchanged.
            var v = valueGet();

            var updateAble = [
                "margin",
                "limit",
                "padding",
                "range",
                "animate",
                "snap",
                "step",
                "format",
                "pips",
                "tooltips"
            ];

            // Only change options that we're actually passed to update.
            updateAble.forEach(function(name) {
                // Check for undefined. null removes the value.
                if (optionsToUpdate[name] !== undefined) {
                    originalOptions[name] = optionsToUpdate[name];
                }
            });

            var newOptions = testOptions(originalOptions);

            // Load new options into the slider state
            updateAble.forEach(function(name) {
                if (optionsToUpdate[name] !== undefined) {
                    options[name] = newOptions[name];
                }
            });

            scope_Spectrum = newOptions.spectrum;

            // Limit, margin and padding depend on the spectrum but are stored outside of it. (#677)
            options.margin = newOptions.margin;
            options.limit = newOptions.limit;
            options.padding = newOptions.padding;

            // Update pips, removes existing.
            if (options.pips) {
                pips(options.pips);
            } else {
                removePips();
            }

            // Update tooltips, removes existing.
            if (options.tooltips) {
                tooltips();
            } else {
                removeTooltips();
            }

            // Invalidate the current positioning so valueSet forces an update.
            scope_Locations = [];
            valueSet(optionsToUpdate.start || v, fireSetEvent);
        }

        // Initialization steps
        function setupSlider() {
            // Create the base element, initialize HTML and set classes.
            // Add handles and connect elements.
            scope_Base = addSlider(scope_Target);

            addElements(options.connect, scope_Base);

            // Attach user events.
            bindSliderEvents(options.events);

            // Use the public value method to set the start values.
            valueSet(options.start);

            if (options.pips) {
                pips(options.pips);
            }

            if (options.tooltips) {
                tooltips();
            }

            aria();
        }

        setupSlider();

        // noinspection JSUnusedGlobalSymbols
        scope_Self = {
            destroy: destroy,
            steps: getNextSteps,
            on: bindEvent,
            off: removeEvent,
            get: valueGet,
            set: valueSet,
            setHandle: valueSetHandle,
            reset: valueReset,
            // Exposed for unit testing, don't use this in your application.
            __moveHandles: function(a, b, c) {
                moveHandles(a, b, scope_Locations, c);
            },
            options: originalOptions, // Issue #600, #678
            updateOptions: updateOptions,
            target: scope_Target, // Issue #597
            removePips: removePips,
            removeTooltips: removeTooltips,
            getTooltips: function() {
                return scope_Tooltips;
            },
            getOrigins: function() {
                return scope_Handles;
            },
            pips: pips // Issue #594
        };

        return scope_Self;
    }

    // Run the standard initializer
    function initialize(target, originalOptions) {
        if (!target || !target.nodeName) {
            throw new Error("noUiSlider (" + VERSION + "): create requires a single element, got: " + target);
        }

        // Throw an error if the slider was already initialized.
        if (target.noUiSlider) {
            throw new Error("noUiSlider (" + VERSION + "): Slider was already initialized.");
        }

        // Test the options and create the slider environment;
        var options = testOptions(originalOptions, target);
        var api = scope(target, options, originalOptions);

        target.noUiSlider = api;

        return api;
    }

    // Use an object instead of a function for future expandability;
    return {
        // Exposed for unit testing, don't use this in your application.
        __spectrum: Spectrum,
        version: VERSION,
        // A reference to the default classes, allows global changes.
        // Use the cssClasses option for changes to one slider.
        cssClasses: cssClasses,
        create: initialize
    };
});

/*
     _ _      _       _
 ___| (_) ___| | __  (_)___
/ __| | |/ __| |/ /  | / __|
\__ \ | | (__|   < _ | \__ \
|___/_|_|\___|_|\_(_)/ |___/
                   |__/

 Version: 1.8.1
  Author: Ken Wheeler
 Website: http://kenwheeler.github.io
    Docs: http://kenwheeler.github.io/slick
    Repo: http://github.com/kenwheeler/slick
  Issues: http://github.com/kenwheeler/slick/issues

 */
/* global window, document, define, jQuery, setInterval, clearInterval */
;(function(factory) {
    'use strict';
    if (typeof define === 'function' && define.amd) {
        define(['jquery'], factory);
    } else if (typeof exports !== 'undefined') {
        module.exports = factory(require('jquery'));
    } else {
        factory(jQuery);
    }

}(function($) {
    'use strict';
    var Slick = window.Slick || {};

    Slick = (function() {

        var instanceUid = 0;

        function Slick(element, settings) {

            var _ = this, dataSettings;

            _.defaults = {
                accessibility: true,
                adaptiveHeight: false,
                appendArrows: $(element),
                appendDots: $(element),
                arrows: true,
                asNavFor: null,
                prevArrow: '<button class="slick-prev" aria-label="Previous" type="button">Previous</button>',
                nextArrow: '<button class="slick-next" aria-label="Next" type="button">Next</button>',
                autoplay: false,
                autoplaySpeed: 3000,
                centerMode: false,
                centerPadding: '50px',
                cssEase: 'ease',
                customPaging: function(slider, i) {
                    return $('<button type="button" />').text(i + 1);
                },
                dots: false,
                dotsClass: 'slick-dots',
                draggable: true,
                easing: 'linear',
                edgeFriction: 0.35,
                fade: false,
                focusOnSelect: false,
                focusOnChange: false,
                infinite: true,
                initialSlide: 0,
                lazyLoad: 'ondemand',
                mobileFirst: false,
                pauseOnHover: true,
                pauseOnFocus: true,
                pauseOnDotsHover: false,
                respondTo: 'window',
                responsive: null,
                rows: 1,
                rtl: false,
                slide: '',
                slidesPerRow: 1,
                slidesToShow: 1,
                slidesToScroll: 1,
                speed: 500,
                swipe: true,
                swipeToSlide: false,
                touchMove: true,
                touchThreshold: 5,
                useCSS: true,
                useTransform: true,
                variableWidth: false,
                vertical: false,
                verticalSwiping: false,
                waitForAnimate: true,
                zIndex: 1000
            };

            _.initials = {
                animating: false,
                dragging: false,
                autoPlayTimer: null,
                currentDirection: 0,
                currentLeft: null,
                currentSlide: 0,
                direction: 1,
                $dots: null,
                listWidth: null,
                listHeight: null,
                loadIndex: 0,
                $nextArrow: null,
                $prevArrow: null,
                scrolling: false,
                slideCount: null,
                slideWidth: null,
                $slideTrack: null,
                $slides: null,
                sliding: false,
                slideOffset: 0,
                swipeLeft: null,
                swiping: false,
                $list: null,
                touchObject: {},
                transformsEnabled: false,
                unslicked: false
            };

            $.extend(_, _.initials);

            _.activeBreakpoint = null;
            _.animType = null;
            _.animProp = null;
            _.breakpoints = [];
            _.breakpointSettings = [];
            _.cssTransitions = false;
            _.focussed = false;
            _.interrupted = false;
            _.hidden = 'hidden';
            _.paused = true;
            _.positionProp = null;
            _.respondTo = null;
            _.rowCount = 1;
            _.shouldClick = true;
            _.$slider = $(element);
            _.$slidesCache = null;
            _.transformType = null;
            _.transitionType = null;
            _.visibilityChange = 'visibilitychange';
            _.windowWidth = 0;
            _.windowTimer = null;

            dataSettings = $(element).data('slick') || {};

            _.options = $.extend({}, _.defaults, settings, dataSettings);

            _.currentSlide = _.options.initialSlide;

            _.originalSettings = _.options;

            if (typeof document.mozHidden !== 'undefined') {
                _.hidden = 'mozHidden';
                _.visibilityChange = 'mozvisibilitychange';
            } else if (typeof document.webkitHidden !== 'undefined') {
                _.hidden = 'webkitHidden';
                _.visibilityChange = 'webkitvisibilitychange';
            }

            _.autoPlay = $.proxy(_.autoPlay, _);
            _.autoPlayClear = $.proxy(_.autoPlayClear, _);
            _.autoPlayIterator = $.proxy(_.autoPlayIterator, _);
            _.changeSlide = $.proxy(_.changeSlide, _);
            _.clickHandler = $.proxy(_.clickHandler, _);
            _.selectHandler = $.proxy(_.selectHandler, _);
            _.setPosition = $.proxy(_.setPosition, _);
            _.swipeHandler = $.proxy(_.swipeHandler, _);
            _.dragHandler = $.proxy(_.dragHandler, _);
            _.keyHandler = $.proxy(_.keyHandler, _);

            _.instanceUid = instanceUid++;

            // A simple way to check for HTML strings
            // Strict HTML recognition (must start with <)
            // Extracted from jQuery v1.11 source
            _.htmlExpr = /^(?:\s*(<[\w\W]+>)[^>]*)$/;


            _.registerBreakpoints();
            _.init(true);

        }

        return Slick;

    }());

    Slick.prototype.activateADA = function() {
        var _ = this;

        _.$slideTrack.find('.slick-active').attr({
            'aria-hidden': 'false'
        }).find('a, input, button, select').attr({
            'tabindex': '0'
        });

    };

    Slick.prototype.addSlide = Slick.prototype.slickAdd = function(markup, index, addBefore) {

        var _ = this;

        if (typeof(index) === 'boolean') {
            addBefore = index;
            index = null;
        } else if (index < 0 || (index >= _.slideCount)) {
            return false;
        }

        _.unload();

        if (typeof(index) === 'number') {
            if (index === 0 && _.$slides.length === 0) {
                $(markup).appendTo(_.$slideTrack);
            } else if (addBefore) {
                $(markup).insertBefore(_.$slides.eq(index));
            } else {
                $(markup).insertAfter(_.$slides.eq(index));
            }
        } else {
            if (addBefore === true) {
                $(markup).prependTo(_.$slideTrack);
            } else {
                $(markup).appendTo(_.$slideTrack);
            }
        }

        _.$slides = _.$slideTrack.children(this.options.slide);

        _.$slideTrack.children(this.options.slide).detach();

        _.$slideTrack.append(_.$slides);

        _.$slides.each(function(index, element) {
            $(element).attr('data-slick-index', index);
        });

        _.$slidesCache = _.$slides;

        _.reinit();

    };

    Slick.prototype.animateHeight = function() {
        var _ = this;
        if (_.options.slidesToShow === 1 && _.options.adaptiveHeight === true && _.options.vertical === false) {
            var targetHeight = _.$slides.eq(_.currentSlide).outerHeight(true);
            _.$list.animate({
                height: targetHeight
            }, _.options.speed);
        }
    };

    Slick.prototype.animateSlide = function(targetLeft, callback) {

        var animProps = {},
            _ = this;

        _.animateHeight();

        if (_.options.rtl === true && _.options.vertical === false) {
            targetLeft = -targetLeft;
        }
        if (_.transformsEnabled === false) {
            if (_.options.vertical === false) {
                _.$slideTrack.animate({
                    left: targetLeft
                }, _.options.speed, _.options.easing, callback);
            } else {
                _.$slideTrack.animate({
                    top: targetLeft
                }, _.options.speed, _.options.easing, callback);
            }

        } else {

            if (_.cssTransitions === false) {
                if (_.options.rtl === true) {
                    _.currentLeft = -(_.currentLeft);
                }
                $({
                    animStart: _.currentLeft
                }).animate({
                    animStart: targetLeft
                }, {
                    duration: _.options.speed,
                    easing: _.options.easing,
                    step: function(now) {
                        now = Math.ceil(now);
                        if (_.options.vertical === false) {
                            animProps[_.animType] = 'translate(' +
                                now + 'px, 0px)';
                            _.$slideTrack.css(animProps);
                        } else {
                            animProps[_.animType] = 'translate(0px,' +
                                now + 'px)';
                            _.$slideTrack.css(animProps);
                        }
                    },
                    complete: function() {
                        if (callback) {
                            callback.call();
                        }
                    }
                });

            } else {

                _.applyTransition();
                targetLeft = Math.ceil(targetLeft);

                if (_.options.vertical === false) {
                    animProps[_.animType] = 'translate3d(' + targetLeft + 'px, 0px, 0px)';
                } else {
                    animProps[_.animType] = 'translate3d(0px,' + targetLeft + 'px, 0px)';
                }
                _.$slideTrack.css(animProps);

                if (callback) {
                    setTimeout(function() {

                        _.disableTransition();

                        callback.call();
                    }, _.options.speed);
                }

            }

        }

    };

    Slick.prototype.getNavTarget = function() {

        var _ = this,
            asNavFor = _.options.asNavFor;

        if ( asNavFor && asNavFor !== null ) {
            asNavFor = $(asNavFor).not(_.$slider);
        }

        return asNavFor;

    };

    Slick.prototype.asNavFor = function(index) {

        var _ = this,
            asNavFor = _.getNavTarget();

        if ( asNavFor !== null && typeof asNavFor === 'object' ) {
            asNavFor.each(function() {
                var target = $(this).slick('getSlick');
                if(!target.unslicked) {
                    target.slideHandler(index, true);
                }
            });
        }

    };

    Slick.prototype.applyTransition = function(slide) {

        var _ = this,
            transition = {};

        if (_.options.fade === false) {
            transition[_.transitionType] = _.transformType + ' ' + _.options.speed + 'ms ' + _.options.cssEase;
        } else {
            transition[_.transitionType] = 'opacity ' + _.options.speed + 'ms ' + _.options.cssEase;
        }

        if (_.options.fade === false) {
            _.$slideTrack.css(transition);
        } else {
            _.$slides.eq(slide).css(transition);
        }

    };

    Slick.prototype.autoPlay = function() {

        var _ = this;

        _.autoPlayClear();

        if ( _.slideCount > _.options.slidesToShow ) {
            _.autoPlayTimer = setInterval( _.autoPlayIterator, _.options.autoplaySpeed );
        }

    };

    Slick.prototype.autoPlayClear = function() {

        var _ = this;

        if (_.autoPlayTimer) {
            clearInterval(_.autoPlayTimer);
        }

    };

    Slick.prototype.autoPlayIterator = function() {

        var _ = this,
            slideTo = _.currentSlide + _.options.slidesToScroll;

        if ( !_.paused && !_.interrupted && !_.focussed ) {

            if ( _.options.infinite === false ) {

                if ( _.direction === 1 && ( _.currentSlide + 1 ) === ( _.slideCount - 1 )) {
                    _.direction = 0;
                }

                else if ( _.direction === 0 ) {

                    slideTo = _.currentSlide - _.options.slidesToScroll;

                    if ( _.currentSlide - 1 === 0 ) {
                        _.direction = 1;
                    }

                }

            }

            _.slideHandler( slideTo );

        }

    };

    Slick.prototype.buildArrows = function() {

        var _ = this;

        if (_.options.arrows === true ) {

            _.$prevArrow = $(_.options.prevArrow).addClass('slick-arrow');
            _.$nextArrow = $(_.options.nextArrow).addClass('slick-arrow');

            if( _.slideCount > _.options.slidesToShow ) {

                _.$prevArrow.removeClass('slick-hidden').removeAttr('aria-hidden tabindex');
                _.$nextArrow.removeClass('slick-hidden').removeAttr('aria-hidden tabindex');

                if (_.htmlExpr.test(_.options.prevArrow)) {
                    _.$prevArrow.prependTo(_.options.appendArrows);
                }

                if (_.htmlExpr.test(_.options.nextArrow)) {
                    _.$nextArrow.appendTo(_.options.appendArrows);
                }

                if (_.options.infinite !== true) {
                    _.$prevArrow
                        .addClass('slick-disabled')
                        .attr('aria-disabled', 'true');
                }

            } else {

                _.$prevArrow.add( _.$nextArrow )

                    .addClass('slick-hidden')
                    .attr({
                        'aria-disabled': 'true',
                        'tabindex': '-1'
                    });

            }

        }

    };

    Slick.prototype.buildDots = function() {

        var _ = this,
            i, dot;

        if (_.options.dots === true && _.slideCount > _.options.slidesToShow) {

            _.$slider.addClass('slick-dotted');

            dot = $('<ul />').addClass(_.options.dotsClass);

            for (i = 0; i <= _.getDotCount(); i += 1) {
                dot.append($('<li />').append(_.options.customPaging.call(this, _, i)));
            }

            _.$dots = dot.appendTo(_.options.appendDots);

            _.$dots.find('li').first().addClass('slick-active');

        }

    };

    Slick.prototype.buildOut = function() {

        var _ = this;

        _.$slides =
            _.$slider
                .children( _.options.slide + ':not(.slick-cloned)')
                .addClass('slick-slide');

        _.slideCount = _.$slides.length;

        _.$slides.each(function(index, element) {
            $(element)
                .attr('data-slick-index', index)
                .data('originalStyling', $(element).attr('style') || '');
        });

        _.$slider.addClass('slick-slider');

        _.$slideTrack = (_.slideCount === 0) ?
            $('<div class="slick-track"/>').appendTo(_.$slider) :
            _.$slides.wrapAll('<div class="slick-track"/>').parent();

        _.$list = _.$slideTrack.wrap(
            '<div class="slick-list"/>').parent();
        _.$slideTrack.css('opacity', 0);

        if (_.options.centerMode === true || _.options.swipeToSlide === true) {
            _.options.slidesToScroll = 1;
        }

        $('img[data-lazy]', _.$slider).not('[src]').addClass('slick-loading');

        _.setupInfinite();

        _.buildArrows();

        _.buildDots();

        _.updateDots();


        _.setSlideClasses(typeof _.currentSlide === 'number' ? _.currentSlide : 0);

        if (_.options.draggable === true) {
            _.$list.addClass('draggable');
        }

    };

    Slick.prototype.buildRows = function() {

        var _ = this, a, b, c, newSlides, numOfSlides, originalSlides,slidesPerSection;

        newSlides = document.createDocumentFragment();
        originalSlides = _.$slider.children();

        if(_.options.rows > 0) {

            slidesPerSection = _.options.slidesPerRow * _.options.rows;
            numOfSlides = Math.ceil(
                originalSlides.length / slidesPerSection
            );

            for(a = 0; a < numOfSlides; a++){
                var slide = document.createElement('div');
                for(b = 0; b < _.options.rows; b++) {
                    var row = document.createElement('div');
                    for(c = 0; c < _.options.slidesPerRow; c++) {
                        var target = (a * slidesPerSection + ((b * _.options.slidesPerRow) + c));
                        if (originalSlides.get(target)) {
                            row.appendChild(originalSlides.get(target));
                        }
                    }
                    slide.appendChild(row);
                }
                newSlides.appendChild(slide);
            }

            _.$slider.empty().append(newSlides);
            _.$slider.children().children().children()
                .css({
                    'width':(100 / _.options.slidesPerRow) + '%',
                    'display': 'inline-block'
                });

        }

    };

    Slick.prototype.checkResponsive = function(initial, forceUpdate) {

        var _ = this,
            breakpoint, targetBreakpoint, respondToWidth, triggerBreakpoint = false;
        var sliderWidth = _.$slider.width();
        var windowWidth = window.innerWidth || $(window).width();

        if (_.respondTo === 'window') {
            respondToWidth = windowWidth;
        } else if (_.respondTo === 'slider') {
            respondToWidth = sliderWidth;
        } else if (_.respondTo === 'min') {
            respondToWidth = Math.min(windowWidth, sliderWidth);
        }

        if ( _.options.responsive &&
            _.options.responsive.length &&
            _.options.responsive !== null) {

            targetBreakpoint = null;

            for (breakpoint in _.breakpoints) {
                if (_.breakpoints.hasOwnProperty(breakpoint)) {
                    if (_.originalSettings.mobileFirst === false) {
                        if (respondToWidth < _.breakpoints[breakpoint]) {
                            targetBreakpoint = _.breakpoints[breakpoint];
                        }
                    } else {
                        if (respondToWidth > _.breakpoints[breakpoint]) {
                            targetBreakpoint = _.breakpoints[breakpoint];
                        }
                    }
                }
            }

            if (targetBreakpoint !== null) {
                if (_.activeBreakpoint !== null) {
                    if (targetBreakpoint !== _.activeBreakpoint || forceUpdate) {
                        _.activeBreakpoint =
                            targetBreakpoint;
                        if (_.breakpointSettings[targetBreakpoint] === 'unslick') {
                            _.unslick(targetBreakpoint);
                        } else {
                            _.options = $.extend({}, _.originalSettings,
                                _.breakpointSettings[
                                    targetBreakpoint]);
                            if (initial === true) {
                                _.currentSlide = _.options.initialSlide;
                            }
                            _.refresh(initial);
                        }
                        triggerBreakpoint = targetBreakpoint;
                    }
                } else {
                    _.activeBreakpoint = targetBreakpoint;
                    if (_.breakpointSettings[targetBreakpoint] === 'unslick') {
                        _.unslick(targetBreakpoint);
                    } else {
                        _.options = $.extend({}, _.originalSettings,
                            _.breakpointSettings[
                                targetBreakpoint]);
                        if (initial === true) {
                            _.currentSlide = _.options.initialSlide;
                        }
                        _.refresh(initial);
                    }
                    triggerBreakpoint = targetBreakpoint;
                }
            } else {
                if (_.activeBreakpoint !== null) {
                    _.activeBreakpoint = null;
                    _.options = _.originalSettings;
                    if (initial === true) {
                        _.currentSlide = _.options.initialSlide;
                    }
                    _.refresh(initial);
                    triggerBreakpoint = targetBreakpoint;
                }
            }

            // only trigger breakpoints during an actual break. not on initialize.
            if( !initial && triggerBreakpoint !== false ) {
                _.$slider.trigger('breakpoint', [_, triggerBreakpoint]);
            }
        }

    };

    Slick.prototype.changeSlide = function(event, dontAnimate) {

        var _ = this,
            $target = $(event.currentTarget),
            indexOffset, slideOffset, unevenOffset;

        // If target is a link, prevent default action.
        if($target.is('a')) {
            event.preventDefault();
        }

        // If target is not the <li> element (ie: a child), find the <li>.
        if(!$target.is('li')) {
            $target = $target.closest('li');
        }

        unevenOffset = (_.slideCount % _.options.slidesToScroll !== 0);
        indexOffset = unevenOffset ? 0 : (_.slideCount - _.currentSlide) % _.options.slidesToScroll;

        switch (event.data.message) {

            case 'previous':
                slideOffset = indexOffset === 0 ? _.options.slidesToScroll : _.options.slidesToShow - indexOffset;
                if (_.slideCount > _.options.slidesToShow) {
                    _.slideHandler(_.currentSlide - slideOffset, false, dontAnimate);
                }
                break;

            case 'next':
                slideOffset = indexOffset === 0 ? _.options.slidesToScroll : indexOffset;
                if (_.slideCount > _.options.slidesToShow) {
                    _.slideHandler(_.currentSlide + slideOffset, false, dontAnimate);
                }
                break;

            case 'index':
                var index = event.data.index === 0 ? 0 :
                    event.data.index || $target.index() * _.options.slidesToScroll;

                _.slideHandler(_.checkNavigable(index), false, dontAnimate);
                $target.children().trigger('focus');
                break;

            default:
                return;
        }

    };

    Slick.prototype.checkNavigable = function(index) {

        var _ = this,
            navigables, prevNavigable;

        navigables = _.getNavigableIndexes();
        prevNavigable = 0;
        if (index > navigables[navigables.length - 1]) {
            index = navigables[navigables.length - 1];
        } else {
            for (var n in navigables) {
                if (index < navigables[n]) {
                    index = prevNavigable;
                    break;
                }
                prevNavigable = navigables[n];
            }
        }

        return index;
    };

    Slick.prototype.cleanUpEvents = function() {

        var _ = this;

        if (_.options.dots && _.$dots !== null) {

            $('li', _.$dots)
                .off('click.slick', _.changeSlide)
                .off('mouseenter.slick', $.proxy(_.interrupt, _, true))
                .off('mouseleave.slick', $.proxy(_.interrupt, _, false));

            if (_.options.accessibility === true) {
                _.$dots.off('keydown.slick', _.keyHandler);
            }
        }

        _.$slider.off('focus.slick blur.slick');

        if (_.options.arrows === true && _.slideCount > _.options.slidesToShow) {
            _.$prevArrow && _.$prevArrow.off('click.slick', _.changeSlide);
            _.$nextArrow && _.$nextArrow.off('click.slick', _.changeSlide);

            if (_.options.accessibility === true) {
                _.$prevArrow && _.$prevArrow.off('keydown.slick', _.keyHandler);
                _.$nextArrow && _.$nextArrow.off('keydown.slick', _.keyHandler);
            }
        }

        _.$list.off('touchstart.slick mousedown.slick', _.swipeHandler);
        _.$list.off('touchmove.slick mousemove.slick', _.swipeHandler);
        _.$list.off('touchend.slick mouseup.slick', _.swipeHandler);
        _.$list.off('touchcancel.slick mouseleave.slick', _.swipeHandler);

        _.$list.off('click.slick', _.clickHandler);

        $(document).off(_.visibilityChange, _.visibility);

        _.cleanUpSlideEvents();

        if (_.options.accessibility === true) {
            _.$list.off('keydown.slick', _.keyHandler);
        }

        if (_.options.focusOnSelect === true) {
            $(_.$slideTrack).children().off('click.slick', _.selectHandler);
        }

        $(window).off('orientationchange.slick.slick-' + _.instanceUid, _.orientationChange);

        $(window).off('resize.slick.slick-' + _.instanceUid, _.resize);

        $('[draggable!=true]', _.$slideTrack).off('dragstart', _.preventDefault);

        $(window).off('load.slick.slick-' + _.instanceUid, _.setPosition);

    };

    Slick.prototype.cleanUpSlideEvents = function() {

        var _ = this;

        _.$list.off('mouseenter.slick', $.proxy(_.interrupt, _, true));
        _.$list.off('mouseleave.slick', $.proxy(_.interrupt, _, false));

    };

    Slick.prototype.cleanUpRows = function() {

        var _ = this, originalSlides;

        if(_.options.rows > 0) {
            originalSlides = _.$slides.children().children();
            originalSlides.removeAttr('style');
            _.$slider.empty().append(originalSlides);
        }

    };

    Slick.prototype.clickHandler = function(event) {

        var _ = this;

        if (_.shouldClick === false) {
            event.stopImmediatePropagation();
            event.stopPropagation();
            event.preventDefault();
        }

    };

    Slick.prototype.destroy = function(refresh) {

        var _ = this;

        _.autoPlayClear();

        _.touchObject = {};

        _.cleanUpEvents();

        $('.slick-cloned', _.$slider).detach();

        if (_.$dots) {
            _.$dots.remove();
        }

        if ( _.$prevArrow && _.$prevArrow.length ) {

            _.$prevArrow
                .removeClass('slick-disabled slick-arrow slick-hidden')
                .removeAttr('aria-hidden aria-disabled tabindex')
                .css('display','');

            if ( _.htmlExpr.test( _.options.prevArrow )) {
                _.$prevArrow.remove();
            }
        }

        if ( _.$nextArrow && _.$nextArrow.length ) {

            _.$nextArrow
                .removeClass('slick-disabled slick-arrow slick-hidden')
                .removeAttr('aria-hidden aria-disabled tabindex')
                .css('display','');

            if ( _.htmlExpr.test( _.options.nextArrow )) {
                _.$nextArrow.remove();
            }
        }


        if (_.$slides) {

            _.$slides
                .removeClass('slick-slide slick-active slick-center slick-visible slick-current')
                .removeAttr('aria-hidden')
                .removeAttr('data-slick-index')
                .each(function(){
                    $(this).attr('style', $(this).data('originalStyling'));
                });

            _.$slideTrack.children(this.options.slide).detach();

            _.$slideTrack.detach();

            _.$list.detach();

            _.$slider.append(_.$slides);
        }

        _.cleanUpRows();

        _.$slider.removeClass('slick-slider');
        _.$slider.removeClass('slick-initialized');
        _.$slider.removeClass('slick-dotted');

        _.unslicked = true;

        if(!refresh) {
            _.$slider.trigger('destroy', [_]);
        }

    };

    Slick.prototype.disableTransition = function(slide) {

        var _ = this,
            transition = {};

        transition[_.transitionType] = '';

        if (_.options.fade === false) {
            _.$slideTrack.css(transition);
        } else {
            _.$slides.eq(slide).css(transition);
        }

    };

    Slick.prototype.fadeSlide = function(slideIndex, callback) {

        var _ = this;

        if (_.cssTransitions === false) {

            _.$slides.eq(slideIndex).css({
                zIndex: _.options.zIndex
            });

            _.$slides.eq(slideIndex).animate({
                opacity: 1
            }, _.options.speed, _.options.easing, callback);

        } else {

            _.applyTransition(slideIndex);

            _.$slides.eq(slideIndex).css({
                opacity: 1,
                zIndex: _.options.zIndex
            });

            if (callback) {
                setTimeout(function() {

                    _.disableTransition(slideIndex);

                    callback.call();
                }, _.options.speed);
            }

        }

    };

    Slick.prototype.fadeSlideOut = function(slideIndex) {

        var _ = this;

        if (_.cssTransitions === false) {

            _.$slides.eq(slideIndex).animate({
                opacity: 0,
                zIndex: _.options.zIndex - 2
            }, _.options.speed, _.options.easing);

        } else {

            _.applyTransition(slideIndex);

            _.$slides.eq(slideIndex).css({
                opacity: 0,
                zIndex: _.options.zIndex - 2
            });

        }

    };

    Slick.prototype.filterSlides = Slick.prototype.slickFilter = function(filter) {

        var _ = this;

        if (filter !== null) {

            _.$slidesCache = _.$slides;

            _.unload();

            _.$slideTrack.children(this.options.slide).detach();

            _.$slidesCache.filter(filter).appendTo(_.$slideTrack);

            _.reinit();

        }

    };

    Slick.prototype.focusHandler = function() {

        var _ = this;

        _.$slider
            .off('focus.slick blur.slick')
            .on('focus.slick blur.slick', '*', function(event) {

            event.stopImmediatePropagation();
            var $sf = $(this);

            setTimeout(function() {

                if( _.options.pauseOnFocus ) {
                    _.focussed = $sf.is(':focus');
                    _.autoPlay();
                }

            }, 0);

        });
    };

    Slick.prototype.getCurrent = Slick.prototype.slickCurrentSlide = function() {

        var _ = this;
        return _.currentSlide;

    };

    Slick.prototype.getDotCount = function() {

        var _ = this;

        var breakPoint = 0;
        var counter = 0;
        var pagerQty = 0;

        if (_.options.infinite === true) {
            if (_.slideCount <= _.options.slidesToShow) {
                 ++pagerQty;
            } else {
                while (breakPoint < _.slideCount) {
                    ++pagerQty;
                    breakPoint = counter + _.options.slidesToScroll;
                    counter += _.options.slidesToScroll <= _.options.slidesToShow ? _.options.slidesToScroll : _.options.slidesToShow;
                }
            }
        } else if (_.options.centerMode === true) {
            pagerQty = _.slideCount;
        } else if(!_.options.asNavFor) {
            pagerQty = 1 + Math.ceil((_.slideCount - _.options.slidesToShow) / _.options.slidesToScroll);
        }else {
            while (breakPoint < _.slideCount) {
                ++pagerQty;
                breakPoint = counter + _.options.slidesToScroll;
                counter += _.options.slidesToScroll <= _.options.slidesToShow ? _.options.slidesToScroll : _.options.slidesToShow;
            }
        }

        return pagerQty - 1;

    };

    Slick.prototype.getLeft = function(slideIndex) {

        var _ = this,
            targetLeft,
            verticalHeight,
            verticalOffset = 0,
            targetSlide,
            coef;

        _.slideOffset = 0;
        verticalHeight = _.$slides.first().outerHeight(true);

        if (_.options.infinite === true) {
            if (_.slideCount > _.options.slidesToShow) {
                _.slideOffset = (_.slideWidth * _.options.slidesToShow) * -1;
                coef = -1

                if (_.options.vertical === true && _.options.centerMode === true) {
                    if (_.options.slidesToShow === 2) {
                        coef = -1.5;
                    } else if (_.options.slidesToShow === 1) {
                        coef = -2
                    }
                }
                verticalOffset = (verticalHeight * _.options.slidesToShow) * coef;
            }
            if (_.slideCount % _.options.slidesToScroll !== 0) {
                if (slideIndex + _.options.slidesToScroll > _.slideCount && _.slideCount > _.options.slidesToShow) {
                    if (slideIndex > _.slideCount) {
                        _.slideOffset = ((_.options.slidesToShow - (slideIndex - _.slideCount)) * _.slideWidth) * -1;
                        verticalOffset = ((_.options.slidesToShow - (slideIndex - _.slideCount)) * verticalHeight) * -1;
                    } else {
                        _.slideOffset = ((_.slideCount % _.options.slidesToScroll) * _.slideWidth) * -1;
                        verticalOffset = ((_.slideCount % _.options.slidesToScroll) * verticalHeight) * -1;
                    }
                }
            }
        } else {
            if (slideIndex + _.options.slidesToShow > _.slideCount) {
                _.slideOffset = ((slideIndex + _.options.slidesToShow) - _.slideCount) * _.slideWidth;
                verticalOffset = ((slideIndex + _.options.slidesToShow) - _.slideCount) * verticalHeight;
            }
        }

        if (_.slideCount <= _.options.slidesToShow) {
            _.slideOffset = 0;
            verticalOffset = 0;
        }

        if (_.options.centerMode === true && _.slideCount <= _.options.slidesToShow) {
            _.slideOffset = ((_.slideWidth * Math.floor(_.options.slidesToShow)) / 2) - ((_.slideWidth * _.slideCount) / 2);
        } else if (_.options.centerMode === true && _.options.infinite === true) {
            _.slideOffset += _.slideWidth * Math.floor(_.options.slidesToShow / 2) - _.slideWidth;
        } else if (_.options.centerMode === true) {
            _.slideOffset = 0;
            _.slideOffset += _.slideWidth * Math.floor(_.options.slidesToShow / 2);
        }

        if (_.options.vertical === false) {
            targetLeft = ((slideIndex * _.slideWidth) * -1) + _.slideOffset;
        } else {
            targetLeft = ((slideIndex * verticalHeight) * -1) + verticalOffset;
        }

        if (_.options.variableWidth === true) {

            if (_.slideCount <= _.options.slidesToShow || _.options.infinite === false) {
                targetSlide = _.$slideTrack.children('.slick-slide').eq(slideIndex);
            } else {
                targetSlide = _.$slideTrack.children('.slick-slide').eq(slideIndex + _.options.slidesToShow);
            }

            if (_.options.rtl === true) {
                if (targetSlide[0]) {
                    targetLeft = (_.$slideTrack.width() - targetSlide[0].offsetLeft - targetSlide.width()) * -1;
                } else {
                    targetLeft =  0;
                }
            } else {
                targetLeft = targetSlide[0] ? targetSlide[0].offsetLeft * -1 : 0;
            }

            if (_.options.centerMode === true) {
                if (_.slideCount <= _.options.slidesToShow || _.options.infinite === false) {
                    targetSlide = _.$slideTrack.children('.slick-slide').eq(slideIndex);
                } else {
                    targetSlide = _.$slideTrack.children('.slick-slide').eq(slideIndex + _.options.slidesToShow + 1);
                }

                if (_.options.rtl === true) {
                    if (targetSlide[0]) {
                        targetLeft = (_.$slideTrack.width() - targetSlide[0].offsetLeft - targetSlide.width()) * -1;
                    } else {
                        targetLeft =  0;
                    }
                } else {
                    targetLeft = targetSlide[0] ? targetSlide[0].offsetLeft * -1 : 0;
                }

                targetLeft += (_.$list.width() - targetSlide.outerWidth()) / 2;
            }
        }

        return targetLeft;

    };

    Slick.prototype.getOption = Slick.prototype.slickGetOption = function(option) {

        var _ = this;

        return _.options[option];

    };

    Slick.prototype.getNavigableIndexes = function() {

        var _ = this,
            breakPoint = 0,
            counter = 0,
            indexes = [],
            max;

        if (_.options.infinite === false) {
            max = _.slideCount;
        } else {
            breakPoint = _.options.slidesToScroll * -1;
            counter = _.options.slidesToScroll * -1;
            max = _.slideCount * 2;
        }

        while (breakPoint < max) {
            indexes.push(breakPoint);
            breakPoint = counter + _.options.slidesToScroll;
            counter += _.options.slidesToScroll <= _.options.slidesToShow ? _.options.slidesToScroll : _.options.slidesToShow;
        }

        return indexes;

    };

    Slick.prototype.getSlick = function() {

        return this;

    };

    Slick.prototype.getSlideCount = function() {

        var _ = this,
            slidesTraversed, swipedSlide, centerOffset;

        centerOffset = _.options.centerMode === true ? _.slideWidth * Math.floor(_.options.slidesToShow / 2) : 0;

        if (_.options.swipeToSlide === true) {
            _.$slideTrack.find('.slick-slide').each(function(index, slide) {
                if (slide.offsetLeft - centerOffset + ($(slide).outerWidth() / 2) > (_.swipeLeft * -1)) {
                    swipedSlide = slide;
                    return false;
                }
            });

            slidesTraversed = Math.abs($(swipedSlide).attr('data-slick-index') - _.currentSlide) || 1;

            return slidesTraversed;

        } else {
            return _.options.slidesToScroll;
        }

    };

    Slick.prototype.goTo = Slick.prototype.slickGoTo = function(slide, dontAnimate) {

        var _ = this;

        _.changeSlide({
            data: {
                message: 'index',
                index: parseInt(slide)
            }
        }, dontAnimate);

    };

    Slick.prototype.init = function(creation) {

        var _ = this;

        if (!$(_.$slider).hasClass('slick-initialized')) {

            $(_.$slider).addClass('slick-initialized');

            _.buildRows();
            _.buildOut();
            _.setProps();
            _.startLoad();
            _.loadSlider();
            _.initializeEvents();
            _.updateArrows();
            _.updateDots();
            _.checkResponsive(true);
            _.focusHandler();

        }

        if (creation) {
            _.$slider.trigger('init', [_]);
        }

        if (_.options.accessibility === true) {
            _.initADA();
        }

        if ( _.options.autoplay ) {

            _.paused = false;
            _.autoPlay();

        }

    };

    Slick.prototype.initADA = function() {
        var _ = this,
                numDotGroups = Math.ceil(_.slideCount / _.options.slidesToShow),
                tabControlIndexes = _.getNavigableIndexes().filter(function(val) {
                    return (val >= 0) && (val < _.slideCount);
                });

        _.$slides.add(_.$slideTrack.find('.slick-cloned')).attr({
            'aria-hidden': 'true',
            'tabindex': '-1'
        }).find('a, input, button, select').attr({
            'tabindex': '-1'
        });

        if (_.$dots !== null) {
            _.$slides.not(_.$slideTrack.find('.slick-cloned')).each(function(i) {
                var slideControlIndex = tabControlIndexes.indexOf(i);

                $(this).attr({
                    'role': 'tabpanel',
                    'id': 'slick-slide' + _.instanceUid + i,
                    'tabindex': -1
                });

                if (slideControlIndex !== -1) {
                   var ariaButtonControl = 'slick-slide-control' + _.instanceUid + slideControlIndex
                   if ($('#' + ariaButtonControl).length) {
                     $(this).attr({
                         'aria-describedby': ariaButtonControl
                     });
                   }
                }
            });

            _.$dots.attr('role', 'tablist').find('li').each(function(i) {
                var mappedSlideIndex = tabControlIndexes[i];

                $(this).attr({
                    'role': 'presentation'
                });

                $(this).find('button').first().attr({
                    'role': 'tab',
                    'id': 'slick-slide-control' + _.instanceUid + i,
                    'aria-controls': 'slick-slide' + _.instanceUid + mappedSlideIndex,
                    'aria-label': (i + 1) + ' of ' + numDotGroups,
                    'aria-selected': null,
                    'tabindex': '-1'
                });

            }).eq(_.currentSlide).find('button').attr({
                'aria-selected': 'true',
                'tabindex': '0'
            }).end();
        }

        for (var i=_.currentSlide, max=i+_.options.slidesToShow; i < max; i++) {
          if (_.options.focusOnChange) {
            _.$slides.eq(i).attr({'tabindex': '0'});
          } else {
            _.$slides.eq(i).removeAttr('tabindex');
          }
        }

        _.activateADA();

    };

    Slick.prototype.initArrowEvents = function() {

        var _ = this;

        if (_.options.arrows === true && _.slideCount > _.options.slidesToShow) {
            _.$prevArrow
               .off('click.slick')
               .on('click.slick', {
                    message: 'previous'
               }, _.changeSlide);
            _.$nextArrow
               .off('click.slick')
               .on('click.slick', {
                    message: 'next'
               }, _.changeSlide);

            if (_.options.accessibility === true) {
                _.$prevArrow.on('keydown.slick', _.keyHandler);
                _.$nextArrow.on('keydown.slick', _.keyHandler);
            }
        }

    };

    Slick.prototype.initDotEvents = function() {

        var _ = this;

        if (_.options.dots === true && _.slideCount > _.options.slidesToShow) {
            $('li', _.$dots).on('click.slick', {
                message: 'index'
            }, _.changeSlide);

            if (_.options.accessibility === true) {
                _.$dots.on('keydown.slick', _.keyHandler);
            }
        }

        if (_.options.dots === true && _.options.pauseOnDotsHover === true && _.slideCount > _.options.slidesToShow) {

            $('li', _.$dots)
                .on('mouseenter.slick', $.proxy(_.interrupt, _, true))
                .on('mouseleave.slick', $.proxy(_.interrupt, _, false));

        }

    };

    Slick.prototype.initSlideEvents = function() {

        var _ = this;

        if ( _.options.pauseOnHover ) {

            _.$list.on('mouseenter.slick', $.proxy(_.interrupt, _, true));
            _.$list.on('mouseleave.slick', $.proxy(_.interrupt, _, false));

        }

    };

    Slick.prototype.initializeEvents = function() {

        var _ = this;

        _.initArrowEvents();

        _.initDotEvents();
        _.initSlideEvents();

        _.$list.on('touchstart.slick mousedown.slick', {
            action: 'start'
        }, _.swipeHandler);
        _.$list.on('touchmove.slick mousemove.slick', {
            action: 'move'
        }, _.swipeHandler);
        _.$list.on('touchend.slick mouseup.slick', {
            action: 'end'
        }, _.swipeHandler);
        _.$list.on('touchcancel.slick mouseleave.slick', {
            action: 'end'
        }, _.swipeHandler);

        _.$list.on('click.slick', _.clickHandler);

        $(document).on(_.visibilityChange, $.proxy(_.visibility, _));

        if (_.options.accessibility === true) {
            _.$list.on('keydown.slick', _.keyHandler);
        }

        if (_.options.focusOnSelect === true) {
            $(_.$slideTrack).children().on('click.slick', _.selectHandler);
        }

        $(window).on('orientationchange.slick.slick-' + _.instanceUid, $.proxy(_.orientationChange, _));

        $(window).on('resize.slick.slick-' + _.instanceUid, $.proxy(_.resize, _));

        $('[draggable!=true]', _.$slideTrack).on('dragstart', _.preventDefault);

        $(window).on('load.slick.slick-' + _.instanceUid, _.setPosition);
        $(_.setPosition);

    };

    Slick.prototype.initUI = function() {

        var _ = this;

        if (_.options.arrows === true && _.slideCount > _.options.slidesToShow) {

            _.$prevArrow.show();
            _.$nextArrow.show();

        }

        if (_.options.dots === true && _.slideCount > _.options.slidesToShow) {

            _.$dots.show();

        }

    };

    Slick.prototype.keyHandler = function(event) {

        var _ = this;
         //Dont slide if the cursor is inside the form fields and arrow keys are pressed
        if(!event.target.tagName.match('TEXTAREA|INPUT|SELECT')) {
            if (event.keyCode === 37 && _.options.accessibility === true) {
                _.changeSlide({
                    data: {
                        message: _.options.rtl === true ? 'next' :  'previous'
                    }
                });
            } else if (event.keyCode === 39 && _.options.accessibility === true) {
                _.changeSlide({
                    data: {
                        message: _.options.rtl === true ? 'previous' : 'next'
                    }
                });
            }
        }

    };

    Slick.prototype.lazyLoad = function() {

        var _ = this,
            loadRange, cloneRange, rangeStart, rangeEnd;

        function loadImages(imagesScope) {

            $('img[data-lazy]', imagesScope).each(function() {

                var image = $(this),
                    imageSource = $(this).attr('data-lazy'),
                    imageSrcSet = $(this).attr('data-srcset'),
                    imageSizes  = $(this).attr('data-sizes') || _.$slider.attr('data-sizes'),
                    imageToLoad = document.createElement('img');

                imageToLoad.onload = function() {

                    image
                        .animate({ opacity: 0 }, 100, function() {

                            if (imageSrcSet) {
                                image
                                    .attr('srcset', imageSrcSet );

                                if (imageSizes) {
                                    image
                                        .attr('sizes', imageSizes );
                                }
                            }

                            image
                                .attr('src', imageSource)
                                .animate({ opacity: 1 }, 200, function() {
                                    image
                                        .removeAttr('data-lazy data-srcset data-sizes')
                                        .removeClass('slick-loading');
                                });
                            _.$slider.trigger('lazyLoaded', [_, image, imageSource]);
                        });

                };

                imageToLoad.onerror = function() {

                    image
                        .removeAttr( 'data-lazy' )
                        .removeClass( 'slick-loading' )
                        .addClass( 'slick-lazyload-error' );

                    _.$slider.trigger('lazyLoadError', [ _, image, imageSource ]);

                };

                imageToLoad.src = imageSource;

            });

        }

        if (_.options.centerMode === true) {
            if (_.options.infinite === true) {
                rangeStart = _.currentSlide + (_.options.slidesToShow / 2 + 1);
                rangeEnd = rangeStart + _.options.slidesToShow + 2;
            } else {
                rangeStart = Math.max(0, _.currentSlide - (_.options.slidesToShow / 2 + 1));
                rangeEnd = 2 + (_.options.slidesToShow / 2 + 1) + _.currentSlide;
            }
        } else {
            rangeStart = _.options.infinite ? _.options.slidesToShow + _.currentSlide : _.currentSlide;
            rangeEnd = Math.ceil(rangeStart + _.options.slidesToShow);
            if (_.options.fade === true) {
                if (rangeStart > 0) rangeStart--;
                if (rangeEnd <= _.slideCount) rangeEnd++;
            }
        }

        loadRange = _.$slider.find('.slick-slide').slice(rangeStart, rangeEnd);

        if (_.options.lazyLoad === 'anticipated') {
            var prevSlide = rangeStart - 1,
                nextSlide = rangeEnd,
                $slides = _.$slider.find('.slick-slide');

            for (var i = 0; i < _.options.slidesToScroll; i++) {
                if (prevSlide < 0) prevSlide = _.slideCount - 1;
                loadRange = loadRange.add($slides.eq(prevSlide));
                loadRange = loadRange.add($slides.eq(nextSlide));
                prevSlide--;
                nextSlide++;
            }
        }

        loadImages(loadRange);

        if (_.slideCount <= _.options.slidesToShow) {
            cloneRange = _.$slider.find('.slick-slide');
            loadImages(cloneRange);
        } else
        if (_.currentSlide >= _.slideCount - _.options.slidesToShow) {
            cloneRange = _.$slider.find('.slick-cloned').slice(0, _.options.slidesToShow);
            loadImages(cloneRange);
        } else if (_.currentSlide === 0) {
            cloneRange = _.$slider.find('.slick-cloned').slice(_.options.slidesToShow * -1);
            loadImages(cloneRange);
        }

    };

    Slick.prototype.loadSlider = function() {

        var _ = this;

        _.setPosition();

        _.$slideTrack.css({
            opacity: 1
        });

        _.$slider.removeClass('slick-loading');

        _.initUI();

        if (_.options.lazyLoad === 'progressive') {
            _.progressiveLazyLoad();
        }

    };

    Slick.prototype.next = Slick.prototype.slickNext = function() {

        var _ = this;

        _.changeSlide({
            data: {
                message: 'next'
            }
        });

    };

    Slick.prototype.orientationChange = function() {

        var _ = this;

        _.checkResponsive();
        _.setPosition();

    };

    Slick.prototype.pause = Slick.prototype.slickPause = function() {

        var _ = this;

        _.autoPlayClear();
        _.paused = true;

    };

    Slick.prototype.play = Slick.prototype.slickPlay = function() {

        var _ = this;

        _.autoPlay();
        _.options.autoplay = true;
        _.paused = false;
        _.focussed = false;
        _.interrupted = false;

    };

    Slick.prototype.postSlide = function(index) {

        var _ = this;

        if( !_.unslicked ) {

            _.$slider.trigger('afterChange', [_, index]);

            _.animating = false;

            if (_.slideCount > _.options.slidesToShow) {
                _.setPosition();
            }

            _.swipeLeft = null;

            if ( _.options.autoplay ) {
                _.autoPlay();
            }

            if (_.options.accessibility === true) {
                _.initADA();

                if (_.options.focusOnChange) {
                    var $currentSlide = $(_.$slides.get(_.currentSlide));
                    $currentSlide.attr('tabindex', 0).focus();
                }
            }

        }

    };

    Slick.prototype.prev = Slick.prototype.slickPrev = function() {

        var _ = this;

        _.changeSlide({
            data: {
                message: 'previous'
            }
        });

    };

    Slick.prototype.preventDefault = function(event) {

        event.preventDefault();

    };

    Slick.prototype.progressiveLazyLoad = function( tryCount ) {

        tryCount = tryCount || 1;

        var _ = this,
            $imgsToLoad = $( 'img[data-lazy]', _.$slider ),
            image,
            imageSource,
            imageSrcSet,
            imageSizes,
            imageToLoad;

        if ( $imgsToLoad.length ) {

            image = $imgsToLoad.first();
            imageSource = image.attr('data-lazy');
            imageSrcSet = image.attr('data-srcset');
            imageSizes  = image.attr('data-sizes') || _.$slider.attr('data-sizes');
            imageToLoad = document.createElement('img');

            imageToLoad.onload = function() {

                if (imageSrcSet) {
                    image
                        .attr('srcset', imageSrcSet );

                    if (imageSizes) {
                        image
                            .attr('sizes', imageSizes );
                    }
                }

                image
                    .attr( 'src', imageSource )
                    .removeAttr('data-lazy data-srcset data-sizes')
                    .removeClass('slick-loading');

                if ( _.options.adaptiveHeight === true ) {
                    _.setPosition();
                }

                _.$slider.trigger('lazyLoaded', [ _, image, imageSource ]);
                _.progressiveLazyLoad();

            };

            imageToLoad.onerror = function() {

                if ( tryCount < 3 ) {

                    /**
                     * try to load the image 3 times,
                     * leave a slight delay so we don't get
                     * servers blocking the request.
                     */
                    setTimeout( function() {
                        _.progressiveLazyLoad( tryCount + 1 );
                    }, 500 );

                } else {

                    image
                        .removeAttr( 'data-lazy' )
                        .removeClass( 'slick-loading' )
                        .addClass( 'slick-lazyload-error' );

                    _.$slider.trigger('lazyLoadError', [ _, image, imageSource ]);

                    _.progressiveLazyLoad();

                }

            };

            imageToLoad.src = imageSource;

        } else {

            _.$slider.trigger('allImagesLoaded', [ _ ]);

        }

    };

    Slick.prototype.refresh = function( initializing ) {

        var _ = this, currentSlide, lastVisibleIndex;

        lastVisibleIndex = _.slideCount - _.options.slidesToShow;

        // in non-infinite sliders, we don't want to go past the
        // last visible index.
        if( !_.options.infinite && ( _.currentSlide > lastVisibleIndex )) {
            _.currentSlide = lastVisibleIndex;
        }

        // if less slides than to show, go to start.
        if ( _.slideCount <= _.options.slidesToShow ) {
            _.currentSlide = 0;

        }

        currentSlide = _.currentSlide;

        _.destroy(true);

        $.extend(_, _.initials, { currentSlide: currentSlide });

        _.init();

        if( !initializing ) {

            _.changeSlide({
                data: {
                    message: 'index',
                    index: currentSlide
                }
            }, false);

        }

    };

    Slick.prototype.registerBreakpoints = function() {

        var _ = this, breakpoint, currentBreakpoint, l,
            responsiveSettings = _.options.responsive || null;

        if ( $.type(responsiveSettings) === 'array' && responsiveSettings.length ) {

            _.respondTo = _.options.respondTo || 'window';

            for ( breakpoint in responsiveSettings ) {

                l = _.breakpoints.length-1;

                if (responsiveSettings.hasOwnProperty(breakpoint)) {
                    currentBreakpoint = responsiveSettings[breakpoint].breakpoint;

                    // loop through the breakpoints and cut out any existing
                    // ones with the same breakpoint number, we don't want dupes.
                    while( l >= 0 ) {
                        if( _.breakpoints[l] && _.breakpoints[l] === currentBreakpoint ) {
                            _.breakpoints.splice(l,1);
                        }
                        l--;
                    }

                    _.breakpoints.push(currentBreakpoint);
                    _.breakpointSettings[currentBreakpoint] = responsiveSettings[breakpoint].settings;

                }

            }

            _.breakpoints.sort(function(a, b) {
                return ( _.options.mobileFirst ) ? a-b : b-a;
            });

        }

    };

    Slick.prototype.reinit = function() {

        var _ = this;

        _.$slides =
            _.$slideTrack
                .children(_.options.slide)
                .addClass('slick-slide');

        _.slideCount = _.$slides.length;

        if (_.currentSlide >= _.slideCount && _.currentSlide !== 0) {
            _.currentSlide = _.currentSlide - _.options.slidesToScroll;
        }

        if (_.slideCount <= _.options.slidesToShow) {
            _.currentSlide = 0;
        }

        _.registerBreakpoints();

        _.setProps();
        _.setupInfinite();
        _.buildArrows();
        _.updateArrows();
        _.initArrowEvents();
        _.buildDots();
        _.updateDots();
        _.initDotEvents();
        _.cleanUpSlideEvents();
        _.initSlideEvents();

        _.checkResponsive(false, true);

        if (_.options.focusOnSelect === true) {
            $(_.$slideTrack).children().on('click.slick', _.selectHandler);
        }

        _.setSlideClasses(typeof _.currentSlide === 'number' ? _.currentSlide : 0);

        _.setPosition();
        _.focusHandler();

        _.paused = !_.options.autoplay;
        _.autoPlay();

        _.$slider.trigger('reInit', [_]);

    };

    Slick.prototype.resize = function() {

        var _ = this;

        if ($(window).width() !== _.windowWidth) {
            clearTimeout(_.windowDelay);
            _.windowDelay = window.setTimeout(function() {
                _.windowWidth = $(window).width();
                _.checkResponsive();
                if( !_.unslicked ) { _.setPosition(); }
            }, 50);
        }
    };

    Slick.prototype.removeSlide = Slick.prototype.slickRemove = function(index, removeBefore, removeAll) {

        var _ = this;

        if (typeof(index) === 'boolean') {
            removeBefore = index;
            index = removeBefore === true ? 0 : _.slideCount - 1;
        } else {
            index = removeBefore === true ? --index : index;
        }

        if (_.slideCount < 1 || index < 0 || index > _.slideCount - 1) {
            return false;
        }

        _.unload();

        if (removeAll === true) {
            _.$slideTrack.children().remove();
        } else {
            _.$slideTrack.children(this.options.slide).eq(index).remove();
        }

        _.$slides = _.$slideTrack.children(this.options.slide);

        _.$slideTrack.children(this.options.slide).detach();

        _.$slideTrack.append(_.$slides);

        _.$slidesCache = _.$slides;

        _.reinit();

    };

    Slick.prototype.setCSS = function(position) {

        var _ = this,
            positionProps = {},
            x, y;

        if (_.options.rtl === true) {
            position = -position;
        }
        x = _.positionProp == 'left' ? Math.ceil(position) + 'px' : '0px';
        y = _.positionProp == 'top' ? Math.ceil(position) + 'px' : '0px';

        positionProps[_.positionProp] = position;

        if (_.transformsEnabled === false) {
            _.$slideTrack.css(positionProps);
        } else {
            positionProps = {};
            if (_.cssTransitions === false) {
                positionProps[_.animType] = 'translate(' + x + ', ' + y + ')';
                _.$slideTrack.css(positionProps);
            } else {
                positionProps[_.animType] = 'translate3d(' + x + ', ' + y + ', 0px)';
                _.$slideTrack.css(positionProps);
            }
        }

    };

    Slick.prototype.setDimensions = function() {

        var _ = this;

        if (_.options.vertical === false) {
            if (_.options.centerMode === true) {
                _.$list.css({
                    padding: ('0px ' + _.options.centerPadding)
                });
            }
        } else {
            _.$list.height(_.$slides.first().outerHeight(true) * _.options.slidesToShow);
            if (_.options.centerMode === true) {
                _.$list.css({
                    padding: (_.options.centerPadding + ' 0px')
                });
            }
        }

        _.listWidth = _.$list.width();
        _.listHeight = _.$list.height();


        if (_.options.vertical === false && _.options.variableWidth === false) {
            _.slideWidth = Math.ceil(_.listWidth / _.options.slidesToShow);
            _.$slideTrack.width(Math.ceil((_.slideWidth * _.$slideTrack.children('.slick-slide').length)));

        } else if (_.options.variableWidth === true) {
            _.$slideTrack.width(5000 * _.slideCount);
        } else {
            _.slideWidth = Math.ceil(_.listWidth);
            _.$slideTrack.height(Math.ceil((_.$slides.first().outerHeight(true) * _.$slideTrack.children('.slick-slide').length)));
        }

        var offset = _.$slides.first().outerWidth(true) - _.$slides.first().width();
        if (_.options.variableWidth === false) _.$slideTrack.children('.slick-slide').width(_.slideWidth - offset);

    };

    Slick.prototype.setFade = function() {

        var _ = this,
            targetLeft;

        _.$slides.each(function(index, element) {
            targetLeft = (_.slideWidth * index) * -1;
            if (_.options.rtl === true) {
                $(element).css({
                    position: 'relative',
                    right: targetLeft,
                    top: 0,
                    zIndex: _.options.zIndex - 2,
                    opacity: 0
                });
            } else {
                $(element).css({
                    position: 'relative',
                    left: targetLeft,
                    top: 0,
                    zIndex: _.options.zIndex - 2,
                    opacity: 0
                });
            }
        });

        _.$slides.eq(_.currentSlide).css({
            zIndex: _.options.zIndex - 1,
            opacity: 1
        });

    };

    Slick.prototype.setHeight = function() {

        var _ = this;

        if (_.options.slidesToShow === 1 && _.options.adaptiveHeight === true && _.options.vertical === false) {
            var targetHeight = _.$slides.eq(_.currentSlide).outerHeight(true);
            _.$list.css('height', targetHeight);
        }

    };

    Slick.prototype.setOption =
    Slick.prototype.slickSetOption = function() {

        /**
         * accepts arguments in format of:
         *
         *  - for changing a single option's value:
         *     .slick("setOption", option, value, refresh )
         *
         *  - for changing a set of responsive options:
         *     .slick("setOption", 'responsive', [{}, ...], refresh )
         *
         *  - for updating multiple values at once (not responsive)
         *     .slick("setOption", { 'option': value, ... }, refresh )
         */

        var _ = this, l, item, option, value, refresh = false, type;

        if( $.type( arguments[0] ) === 'object' ) {

            option =  arguments[0];
            refresh = arguments[1];
            type = 'multiple';

        } else if ( $.type( arguments[0] ) === 'string' ) {

            option =  arguments[0];
            value = arguments[1];
            refresh = arguments[2];

            if ( arguments[0] === 'responsive' && $.type( arguments[1] ) === 'array' ) {

                type = 'responsive';

            } else if ( typeof arguments[1] !== 'undefined' ) {

                type = 'single';

            }

        }

        if ( type === 'single' ) {

            _.options[option] = value;


        } else if ( type === 'multiple' ) {

            $.each( option , function( opt, val ) {

                _.options[opt] = val;

            });


        } else if ( type === 'responsive' ) {

            for ( item in value ) {

                if( $.type( _.options.responsive ) !== 'array' ) {

                    _.options.responsive = [ value[item] ];

                } else {

                    l = _.options.responsive.length-1;

                    // loop through the responsive object and splice out duplicates.
                    while( l >= 0 ) {

                        if( _.options.responsive[l].breakpoint === value[item].breakpoint ) {

                            _.options.responsive.splice(l,1);

                        }

                        l--;

                    }

                    _.options.responsive.push( value[item] );

                }

            }

        }

        if ( refresh ) {

            _.unload();
            _.reinit();

        }

    };

    Slick.prototype.setPosition = function() {

        var _ = this;

        _.setDimensions();

        _.setHeight();

        if (_.options.fade === false) {
            _.setCSS(_.getLeft(_.currentSlide));
        } else {
            _.setFade();
        }

        _.$slider.trigger('setPosition', [_]);

    };

    Slick.prototype.setProps = function() {

        var _ = this,
            bodyStyle = document.body.style;

        _.positionProp = _.options.vertical === true ? 'top' : 'left';

        if (_.positionProp === 'top') {
            _.$slider.addClass('slick-vertical');
        } else {
            _.$slider.removeClass('slick-vertical');
        }

        if (bodyStyle.WebkitTransition !== undefined ||
            bodyStyle.MozTransition !== undefined ||
            bodyStyle.msTransition !== undefined) {
            if (_.options.useCSS === true) {
                _.cssTransitions = true;
            }
        }

        if ( _.options.fade ) {
            if ( typeof _.options.zIndex === 'number' ) {
                if( _.options.zIndex < 3 ) {
                    _.options.zIndex = 3;
                }
            } else {
                _.options.zIndex = _.defaults.zIndex;
            }
        }

        if (bodyStyle.OTransform !== undefined) {
            _.animType = 'OTransform';
            _.transformType = '-o-transform';
            _.transitionType = 'OTransition';
            if (bodyStyle.perspectiveProperty === undefined && bodyStyle.webkitPerspective === undefined) _.animType = false;
        }
        if (bodyStyle.MozTransform !== undefined) {
            _.animType = 'MozTransform';
            _.transformType = '-moz-transform';
            _.transitionType = 'MozTransition';
            if (bodyStyle.perspectiveProperty === undefined && bodyStyle.MozPerspective === undefined) _.animType = false;
        }
        if (bodyStyle.webkitTransform !== undefined) {
            _.animType = 'webkitTransform';
            _.transformType = '-webkit-transform';
            _.transitionType = 'webkitTransition';
            if (bodyStyle.perspectiveProperty === undefined && bodyStyle.webkitPerspective === undefined) _.animType = false;
        }
        if (bodyStyle.msTransform !== undefined) {
            _.animType = 'msTransform';
            _.transformType = '-ms-transform';
            _.transitionType = 'msTransition';
            if (bodyStyle.msTransform === undefined) _.animType = false;
        }
        if (bodyStyle.transform !== undefined && _.animType !== false) {
            _.animType = 'transform';
            _.transformType = 'transform';
            _.transitionType = 'transition';
        }
        _.transformsEnabled = _.options.useTransform && (_.animType !== null && _.animType !== false);
    };


    Slick.prototype.setSlideClasses = function(index) {

        var _ = this,
            centerOffset, allSlides, indexOffset, remainder;

        allSlides = _.$slider
            .find('.slick-slide')
            .removeClass('slick-active slick-center slick-current')
            .attr('aria-hidden', 'true');

        _.$slides
            .eq(index)
            .addClass('slick-current');

        if (_.options.centerMode === true) {

            var evenCoef = _.options.slidesToShow % 2 === 0 ? 1 : 0;

            centerOffset = Math.floor(_.options.slidesToShow / 2);

            if (_.options.infinite === true) {

                if (index >= centerOffset && index <= (_.slideCount - 1) - centerOffset) {
                    _.$slides
                        .slice(index - centerOffset + evenCoef, index + centerOffset + 1)
                        .addClass('slick-active')
                        .attr('aria-hidden', 'false');

                } else {

                    indexOffset = _.options.slidesToShow + index;
                    allSlides
                        .slice(indexOffset - centerOffset + 1 + evenCoef, indexOffset + centerOffset + 2)
                        .addClass('slick-active')
                        .attr('aria-hidden', 'false');

                }

                if (index === 0) {

                    allSlides
                        .eq(allSlides.length - 1 - _.options.slidesToShow)
                        .addClass('slick-center');

                } else if (index === _.slideCount - 1) {

                    allSlides
                        .eq(_.options.slidesToShow)
                        .addClass('slick-center');

                }

            }

            _.$slides
                .eq(index)
                .addClass('slick-center');

        } else {

            if (index >= 0 && index <= (_.slideCount - _.options.slidesToShow)) {

                _.$slides
                    .slice(index, index + _.options.slidesToShow)
                    .addClass('slick-active')
                    .attr('aria-hidden', 'false');

            } else if (allSlides.length <= _.options.slidesToShow) {

                allSlides
                    .addClass('slick-active')
                    .attr('aria-hidden', 'false');

            } else {

                remainder = _.slideCount % _.options.slidesToShow;
                indexOffset = _.options.infinite === true ? _.options.slidesToShow + index : index;

                if (_.options.slidesToShow == _.options.slidesToScroll && (_.slideCount - index) < _.options.slidesToShow) {

                    allSlides
                        .slice(indexOffset - (_.options.slidesToShow - remainder), indexOffset + remainder)
                        .addClass('slick-active')
                        .attr('aria-hidden', 'false');

                } else {

                    allSlides
                        .slice(indexOffset, indexOffset + _.options.slidesToShow)
                        .addClass('slick-active')
                        .attr('aria-hidden', 'false');

                }

            }

        }

        if (_.options.lazyLoad === 'ondemand' || _.options.lazyLoad === 'anticipated') {
            _.lazyLoad();
        }
    };

    Slick.prototype.setupInfinite = function() {

        var _ = this,
            i, slideIndex, infiniteCount;

        if (_.options.fade === true) {
            _.options.centerMode = false;
        }

        if (_.options.infinite === true && _.options.fade === false) {

            slideIndex = null;

            if (_.slideCount > _.options.slidesToShow) {

                if (_.options.centerMode === true) {
                    infiniteCount = _.options.slidesToShow + 1;
                } else {
                    infiniteCount = _.options.slidesToShow;
                }

                for (i = _.slideCount; i > (_.slideCount -
                        infiniteCount); i -= 1) {
                    slideIndex = i - 1;
                    $(_.$slides[slideIndex]).clone(true).attr('id', '')
                        .attr('data-slick-index', slideIndex - _.slideCount)
                        .prependTo(_.$slideTrack).addClass('slick-cloned');
                }
                for (i = 0; i < infiniteCount  + _.slideCount; i += 1) {
                    slideIndex = i;
                    $(_.$slides[slideIndex]).clone(true).attr('id', '')
                        .attr('data-slick-index', slideIndex + _.slideCount)
                        .appendTo(_.$slideTrack).addClass('slick-cloned');
                }
                _.$slideTrack.find('.slick-cloned').find('[id]').each(function() {
                    $(this).attr('id', '');
                });

            }

        }

    };

    Slick.prototype.interrupt = function( toggle ) {

        var _ = this;

        if( !toggle ) {
            _.autoPlay();
        }
        _.interrupted = toggle;

    };

    Slick.prototype.selectHandler = function(event) {

        var _ = this;

        var targetElement =
            $(event.target).is('.slick-slide') ?
                $(event.target) :
                $(event.target).parents('.slick-slide');

        var index = parseInt(targetElement.attr('data-slick-index'));

        if (!index) index = 0;

        if (_.slideCount <= _.options.slidesToShow) {

            _.slideHandler(index, false, true);
            return;

        }

        _.slideHandler(index);

    };

    Slick.prototype.slideHandler = function(index, sync, dontAnimate) {

        var targetSlide, animSlide, oldSlide, slideLeft, targetLeft = null,
            _ = this, navTarget;

        sync = sync || false;

        if (_.animating === true && _.options.waitForAnimate === true) {
            return;
        }

        if (_.options.fade === true && _.currentSlide === index) {
            return;
        }

        if (sync === false) {
            _.asNavFor(index);
        }

        targetSlide = index;
        targetLeft = _.getLeft(targetSlide);
        slideLeft = _.getLeft(_.currentSlide);

        _.currentLeft = _.swipeLeft === null ? slideLeft : _.swipeLeft;

        if (_.options.infinite === false && _.options.centerMode === false && (index < 0 || index > _.getDotCount() * _.options.slidesToScroll)) {
            if (_.options.fade === false) {
                targetSlide = _.currentSlide;
                if (dontAnimate !== true && _.slideCount > _.options.slidesToShow) {
                    _.animateSlide(slideLeft, function() {
                        _.postSlide(targetSlide);
                    });
                } else {
                    _.postSlide(targetSlide);
                }
            }
            return;
        } else if (_.options.infinite === false && _.options.centerMode === true && (index < 0 || index > (_.slideCount - _.options.slidesToScroll))) {
            if (_.options.fade === false) {
                targetSlide = _.currentSlide;
                if (dontAnimate !== true && _.slideCount > _.options.slidesToShow) {
                    _.animateSlide(slideLeft, function() {
                        _.postSlide(targetSlide);
                    });
                } else {
                    _.postSlide(targetSlide);
                }
            }
            return;
        }

        if ( _.options.autoplay ) {
            clearInterval(_.autoPlayTimer);
        }

        if (targetSlide < 0) {
            if (_.slideCount % _.options.slidesToScroll !== 0) {
                animSlide = _.slideCount - (_.slideCount % _.options.slidesToScroll);
            } else {
                animSlide = _.slideCount + targetSlide;
            }
        } else if (targetSlide >= _.slideCount) {
            if (_.slideCount % _.options.slidesToScroll !== 0) {
                animSlide = 0;
            } else {
                animSlide = targetSlide - _.slideCount;
            }
        } else {
            animSlide = targetSlide;
        }

        _.animating = true;

        _.$slider.trigger('beforeChange', [_, _.currentSlide, animSlide]);

        oldSlide = _.currentSlide;
        _.currentSlide = animSlide;

        _.setSlideClasses(_.currentSlide);

        if ( _.options.asNavFor ) {

            navTarget = _.getNavTarget();
            navTarget = navTarget.slick('getSlick');

            if ( navTarget.slideCount <= navTarget.options.slidesToShow ) {
                navTarget.setSlideClasses(_.currentSlide);
            }

        }

        _.updateDots();
        _.updateArrows();

        if (_.options.fade === true) {
            if (dontAnimate !== true) {

                _.fadeSlideOut(oldSlide);

                _.fadeSlide(animSlide, function() {
                    _.postSlide(animSlide);
                });

            } else {
                _.postSlide(animSlide);
            }
            _.animateHeight();
            return;
        }

        if (dontAnimate !== true && _.slideCount > _.options.slidesToShow) {
            _.animateSlide(targetLeft, function() {
                _.postSlide(animSlide);
            });
        } else {
            _.postSlide(animSlide);
        }

    };

    Slick.prototype.startLoad = function() {

        var _ = this;

        if (_.options.arrows === true && _.slideCount > _.options.slidesToShow) {

            _.$prevArrow.hide();
            _.$nextArrow.hide();

        }

        if (_.options.dots === true && _.slideCount > _.options.slidesToShow) {

            _.$dots.hide();

        }

        _.$slider.addClass('slick-loading');

    };

    Slick.prototype.swipeDirection = function() {

        var xDist, yDist, r, swipeAngle, _ = this;

        xDist = _.touchObject.startX - _.touchObject.curX;
        yDist = _.touchObject.startY - _.touchObject.curY;
        r = Math.atan2(yDist, xDist);

        swipeAngle = Math.round(r * 180 / Math.PI);
        if (swipeAngle < 0) {
            swipeAngle = 360 - Math.abs(swipeAngle);
        }

        if ((swipeAngle <= 45) && (swipeAngle >= 0)) {
            return (_.options.rtl === false ? 'left' : 'right');
        }
        if ((swipeAngle <= 360) && (swipeAngle >= 315)) {
            return (_.options.rtl === false ? 'left' : 'right');
        }
        if ((swipeAngle >= 135) && (swipeAngle <= 225)) {
            return (_.options.rtl === false ? 'right' : 'left');
        }
        if (_.options.verticalSwiping === true) {
            if ((swipeAngle >= 35) && (swipeAngle <= 135)) {
                return 'down';
            } else {
                return 'up';
            }
        }

        return 'vertical';

    };

    Slick.prototype.swipeEnd = function(event) {

        var _ = this,
            slideCount,
            direction;

        _.dragging = false;
        _.swiping = false;

        if (_.scrolling) {
            _.scrolling = false;
            return false;
        }

        _.interrupted = false;
        _.shouldClick = ( _.touchObject.swipeLength > 10 ) ? false : true;

        if ( _.touchObject.curX === undefined ) {
            return false;
        }

        if ( _.touchObject.edgeHit === true ) {
            _.$slider.trigger('edge', [_, _.swipeDirection() ]);
        }

        if ( _.touchObject.swipeLength >= _.touchObject.minSwipe ) {

            direction = _.swipeDirection();

            switch ( direction ) {

                case 'left':
                case 'down':

                    slideCount =
                        _.options.swipeToSlide ?
                            _.checkNavigable( _.currentSlide + _.getSlideCount() ) :
                            _.currentSlide + _.getSlideCount();

                    _.currentDirection = 0;

                    break;

                case 'right':
                case 'up':

                    slideCount =
                        _.options.swipeToSlide ?
                            _.checkNavigable( _.currentSlide - _.getSlideCount() ) :
                            _.currentSlide - _.getSlideCount();

                    _.currentDirection = 1;

                    break;

                default:


            }

            if( direction != 'vertical' ) {

                _.slideHandler( slideCount );
                _.touchObject = {};
                _.$slider.trigger('swipe', [_, direction ]);

            }

        } else {

            if ( _.touchObject.startX !== _.touchObject.curX ) {

                _.slideHandler( _.currentSlide );
                _.touchObject = {};

            }

        }

    };

    Slick.prototype.swipeHandler = function(event) {

        var _ = this;

        if ((_.options.swipe === false) || ('ontouchend' in document && _.options.swipe === false)) {
            return;
        } else if (_.options.draggable === false && event.type.indexOf('mouse') !== -1) {
            return;
        }

        _.touchObject.fingerCount = event.originalEvent && event.originalEvent.touches !== undefined ?
            event.originalEvent.touches.length : 1;

        _.touchObject.minSwipe = _.listWidth / _.options
            .touchThreshold;

        if (_.options.verticalSwiping === true) {
            _.touchObject.minSwipe = _.listHeight / _.options
                .touchThreshold;
        }

        switch (event.data.action) {

            case 'start':
                _.swipeStart(event);
                break;

            case 'move':
                _.swipeMove(event);
                break;

            case 'end':
                _.swipeEnd(event);
                break;

        }

    };

    Slick.prototype.swipeMove = function(event) {

        var _ = this,
            edgeWasHit = false,
            curLeft, swipeDirection, swipeLength, positionOffset, touches, verticalSwipeLength;

        touches = event.originalEvent !== undefined ? event.originalEvent.touches : null;

        if (!_.dragging || _.scrolling || touches && touches.length !== 1) {
            return false;
        }

        curLeft = _.getLeft(_.currentSlide);

        _.touchObject.curX = touches !== undefined ? touches[0].pageX : event.clientX;
        _.touchObject.curY = touches !== undefined ? touches[0].pageY : event.clientY;

        _.touchObject.swipeLength = Math.round(Math.sqrt(
            Math.pow(_.touchObject.curX - _.touchObject.startX, 2)));

        verticalSwipeLength = Math.round(Math.sqrt(
            Math.pow(_.touchObject.curY - _.touchObject.startY, 2)));

        if (!_.options.verticalSwiping && !_.swiping && verticalSwipeLength > 4) {
            _.scrolling = true;
            return false;
        }

        if (_.options.verticalSwiping === true) {
            _.touchObject.swipeLength = verticalSwipeLength;
        }

        swipeDirection = _.swipeDirection();

        if (event.originalEvent !== undefined && _.touchObject.swipeLength > 4) {
            _.swiping = true;
            event.preventDefault();
        }

        positionOffset = (_.options.rtl === false ? 1 : -1) * (_.touchObject.curX > _.touchObject.startX ? 1 : -1);
        if (_.options.verticalSwiping === true) {
            positionOffset = _.touchObject.curY > _.touchObject.startY ? 1 : -1;
        }


        swipeLength = _.touchObject.swipeLength;

        _.touchObject.edgeHit = false;

        if (_.options.infinite === false) {
            if ((_.currentSlide === 0 && swipeDirection === 'right') || (_.currentSlide >= _.getDotCount() && swipeDirection === 'left')) {
                swipeLength = _.touchObject.swipeLength * _.options.edgeFriction;
                _.touchObject.edgeHit = true;
            }
        }

        if (_.options.vertical === false) {
            _.swipeLeft = curLeft + swipeLength * positionOffset;
        } else {
            _.swipeLeft = curLeft + (swipeLength * (_.$list.height() / _.listWidth)) * positionOffset;
        }
        if (_.options.verticalSwiping === true) {
            _.swipeLeft = curLeft + swipeLength * positionOffset;
        }

        if (_.options.fade === true || _.options.touchMove === false) {
            return false;
        }

        if (_.animating === true) {
            _.swipeLeft = null;
            return false;
        }

        _.setCSS(_.swipeLeft);

    };

    Slick.prototype.swipeStart = function(event) {

        var _ = this,
            touches;

        _.interrupted = true;

        if (_.touchObject.fingerCount !== 1 || _.slideCount <= _.options.slidesToShow) {
            _.touchObject = {};
            return false;
        }

        if (event.originalEvent !== undefined && event.originalEvent.touches !== undefined) {
            touches = event.originalEvent.touches[0];
        }

        _.touchObject.startX = _.touchObject.curX = touches !== undefined ? touches.pageX : event.clientX;
        _.touchObject.startY = _.touchObject.curY = touches !== undefined ? touches.pageY : event.clientY;

        _.dragging = true;

    };

    Slick.prototype.unfilterSlides = Slick.prototype.slickUnfilter = function() {

        var _ = this;

        if (_.$slidesCache !== null) {

            _.unload();

            _.$slideTrack.children(this.options.slide).detach();

            _.$slidesCache.appendTo(_.$slideTrack);

            _.reinit();

        }

    };

    Slick.prototype.unload = function() {

        var _ = this;

        $('.slick-cloned', _.$slider).remove();

        if (_.$dots) {
            _.$dots.remove();
        }

        if (_.$prevArrow && _.htmlExpr.test(_.options.prevArrow)) {
            _.$prevArrow.remove();
        }

        if (_.$nextArrow && _.htmlExpr.test(_.options.nextArrow)) {
            _.$nextArrow.remove();
        }

        _.$slides
            .removeClass('slick-slide slick-active slick-visible slick-current')
            .attr('aria-hidden', 'true')
            .css('width', '');

    };

    Slick.prototype.unslick = function(fromBreakpoint) {

        var _ = this;
        _.$slider.trigger('unslick', [_, fromBreakpoint]);
        _.destroy();

    };

    Slick.prototype.updateArrows = function() {

        var _ = this,
            centerOffset;

        centerOffset = Math.floor(_.options.slidesToShow / 2);

        if ( _.options.arrows === true &&
            _.slideCount > _.options.slidesToShow &&
            !_.options.infinite ) {

            _.$prevArrow.removeClass('slick-disabled').attr('aria-disabled', 'false');
            _.$nextArrow.removeClass('slick-disabled').attr('aria-disabled', 'false');

            if (_.currentSlide === 0) {

                _.$prevArrow.addClass('slick-disabled').attr('aria-disabled', 'true');
                _.$nextArrow.removeClass('slick-disabled').attr('aria-disabled', 'false');

            } else if (_.currentSlide >= _.slideCount - _.options.slidesToShow && _.options.centerMode === false) {

                _.$nextArrow.addClass('slick-disabled').attr('aria-disabled', 'true');
                _.$prevArrow.removeClass('slick-disabled').attr('aria-disabled', 'false');

            } else if (_.currentSlide >= _.slideCount - 1 && _.options.centerMode === true) {

                _.$nextArrow.addClass('slick-disabled').attr('aria-disabled', 'true');
                _.$prevArrow.removeClass('slick-disabled').attr('aria-disabled', 'false');

            }

        }

    };

    Slick.prototype.updateDots = function() {

        var _ = this;

        if (_.$dots !== null) {

            _.$dots
                .find('li')
                    .removeClass('slick-active')
                    .end();

            _.$dots
                .find('li')
                .eq(Math.floor(_.currentSlide / _.options.slidesToScroll))
                .addClass('slick-active');

        }

    };

    Slick.prototype.visibility = function() {

        var _ = this;

        if ( _.options.autoplay ) {

            if ( document[_.hidden] ) {

                _.interrupted = true;

            } else {

                _.interrupted = false;

            }

        }

    };

    $.fn.slick = function() {
        var _ = this,
            opt = arguments[0],
            args = Array.prototype.slice.call(arguments, 1),
            l = _.length,
            i,
            ret;
        for (i = 0; i < l; i++) {
            if (typeof opt == 'object' || typeof opt == 'undefined')
                _[i].slick = new Slick(_[i], opt);
            else
                ret = _[i].slick[opt].apply(_[i].slick, args);
            if (typeof ret != 'undefined') return ret;
        }
        return _;
    };

}));

//     Underscore.js 1.9.1
//     http://underscorejs.org
//     (c) 2009-2018 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
//     Underscore may be freely distributed under the MIT license.
!function(){var n="object"==typeof self&&self.self===self&&self||"object"==typeof global&&global.global===global&&global||this||{},r=n._,e=Array.prototype,o=Object.prototype,s="undefined"!=typeof Symbol?Symbol.prototype:null,u=e.push,c=e.slice,p=o.toString,i=o.hasOwnProperty,t=Array.isArray,a=Object.keys,l=Object.create,f=function(){},h=function(n){return n instanceof h?n:this instanceof h?void(this._wrapped=n):new h(n)};"undefined"==typeof exports||exports.nodeType?n._=h:("undefined"!=typeof module&&!module.nodeType&&module.exports&&(exports=module.exports=h),exports._=h),h.VERSION="1.9.1";var v,y=function(u,i,n){if(void 0===i)return u;switch(null==n?3:n){case 1:return function(n){return u.call(i,n)};case 3:return function(n,r,t){return u.call(i,n,r,t)};case 4:return function(n,r,t,e){return u.call(i,n,r,t,e)}}return function(){return u.apply(i,arguments)}},d=function(n,r,t){return h.iteratee!==v?h.iteratee(n,r):null==n?h.identity:h.isFunction(n)?y(n,r,t):h.isObject(n)&&!h.isArray(n)?h.matcher(n):h.property(n)};h.iteratee=v=function(n,r){return d(n,r,1/0)};var g=function(u,i){return i=null==i?u.length-1:+i,function(){for(var n=Math.max(arguments.length-i,0),r=Array(n),t=0;t<n;t++)r[t]=arguments[t+i];switch(i){case 0:return u.call(this,r);case 1:return u.call(this,arguments[0],r);case 2:return u.call(this,arguments[0],arguments[1],r)}var e=Array(i+1);for(t=0;t<i;t++)e[t]=arguments[t];return e[i]=r,u.apply(this,e)}},m=function(n){if(!h.isObject(n))return{};if(l)return l(n);f.prototype=n;var r=new f;return f.prototype=null,r},b=function(r){return function(n){return null==n?void 0:n[r]}},j=function(n,r){return null!=n&&i.call(n,r)},x=function(n,r){for(var t=r.length,e=0;e<t;e++){if(null==n)return;n=n[r[e]]}return t?n:void 0},_=Math.pow(2,53)-1,A=b("length"),w=function(n){var r=A(n);return"number"==typeof r&&0<=r&&r<=_};h.each=h.forEach=function(n,r,t){var e,u;if(r=y(r,t),w(n))for(e=0,u=n.length;e<u;e++)r(n[e],e,n);else{var i=h.keys(n);for(e=0,u=i.length;e<u;e++)r(n[i[e]],i[e],n)}return n},h.map=h.collect=function(n,r,t){r=d(r,t);for(var e=!w(n)&&h.keys(n),u=(e||n).length,i=Array(u),o=0;o<u;o++){var a=e?e[o]:o;i[o]=r(n[a],a,n)}return i};var O=function(c){return function(n,r,t,e){var u=3<=arguments.length;return function(n,r,t,e){var u=!w(n)&&h.keys(n),i=(u||n).length,o=0<c?0:i-1;for(e||(t=n[u?u[o]:o],o+=c);0<=o&&o<i;o+=c){var a=u?u[o]:o;t=r(t,n[a],a,n)}return t}(n,y(r,e,4),t,u)}};h.reduce=h.foldl=h.inject=O(1),h.reduceRight=h.foldr=O(-1),h.find=h.detect=function(n,r,t){var e=(w(n)?h.findIndex:h.findKey)(n,r,t);if(void 0!==e&&-1!==e)return n[e]},h.filter=h.select=function(n,e,r){var u=[];return e=d(e,r),h.each(n,function(n,r,t){e(n,r,t)&&u.push(n)}),u},h.reject=function(n,r,t){return h.filter(n,h.negate(d(r)),t)},h.every=h.all=function(n,r,t){r=d(r,t);for(var e=!w(n)&&h.keys(n),u=(e||n).length,i=0;i<u;i++){var o=e?e[i]:i;if(!r(n[o],o,n))return!1}return!0},h.some=h.any=function(n,r,t){r=d(r,t);for(var e=!w(n)&&h.keys(n),u=(e||n).length,i=0;i<u;i++){var o=e?e[i]:i;if(r(n[o],o,n))return!0}return!1},h.contains=h.includes=h.include=function(n,r,t,e){return w(n)||(n=h.values(n)),("number"!=typeof t||e)&&(t=0),0<=h.indexOf(n,r,t)},h.invoke=g(function(n,t,e){var u,i;return h.isFunction(t)?i=t:h.isArray(t)&&(u=t.slice(0,-1),t=t[t.length-1]),h.map(n,function(n){var r=i;if(!r){if(u&&u.length&&(n=x(n,u)),null==n)return;r=n[t]}return null==r?r:r.apply(n,e)})}),h.pluck=function(n,r){return h.map(n,h.property(r))},h.where=function(n,r){return h.filter(n,h.matcher(r))},h.findWhere=function(n,r){return h.find(n,h.matcher(r))},h.max=function(n,e,r){var t,u,i=-1/0,o=-1/0;if(null==e||"number"==typeof e&&"object"!=typeof n[0]&&null!=n)for(var a=0,c=(n=w(n)?n:h.values(n)).length;a<c;a++)null!=(t=n[a])&&i<t&&(i=t);else e=d(e,r),h.each(n,function(n,r,t){u=e(n,r,t),(o<u||u===-1/0&&i===-1/0)&&(i=n,o=u)});return i},h.min=function(n,e,r){var t,u,i=1/0,o=1/0;if(null==e||"number"==typeof e&&"object"!=typeof n[0]&&null!=n)for(var a=0,c=(n=w(n)?n:h.values(n)).length;a<c;a++)null!=(t=n[a])&&t<i&&(i=t);else e=d(e,r),h.each(n,function(n,r,t){((u=e(n,r,t))<o||u===1/0&&i===1/0)&&(i=n,o=u)});return i},h.shuffle=function(n){return h.sample(n,1/0)},h.sample=function(n,r,t){if(null==r||t)return w(n)||(n=h.values(n)),n[h.random(n.length-1)];var e=w(n)?h.clone(n):h.values(n),u=A(e);r=Math.max(Math.min(r,u),0);for(var i=u-1,o=0;o<r;o++){var a=h.random(o,i),c=e[o];e[o]=e[a],e[a]=c}return e.slice(0,r)},h.sortBy=function(n,e,r){var u=0;return e=d(e,r),h.pluck(h.map(n,function(n,r,t){return{value:n,index:u++,criteria:e(n,r,t)}}).sort(function(n,r){var t=n.criteria,e=r.criteria;if(t!==e){if(e<t||void 0===t)return 1;if(t<e||void 0===e)return-1}return n.index-r.index}),"value")};var k=function(o,r){return function(e,u,n){var i=r?[[],[]]:{};return u=d(u,n),h.each(e,function(n,r){var t=u(n,r,e);o(i,n,t)}),i}};h.groupBy=k(function(n,r,t){j(n,t)?n[t].push(r):n[t]=[r]}),h.indexBy=k(function(n,r,t){n[t]=r}),h.countBy=k(function(n,r,t){j(n,t)?n[t]++:n[t]=1});var S=/[^\ud800-\udfff]|[\ud800-\udbff][\udc00-\udfff]|[\ud800-\udfff]/g;h.toArray=function(n){return n?h.isArray(n)?c.call(n):h.isString(n)?n.match(S):w(n)?h.map(n,h.identity):h.values(n):[]},h.size=function(n){return null==n?0:w(n)?n.length:h.keys(n).length},h.partition=k(function(n,r,t){n[t?0:1].push(r)},!0),h.first=h.head=h.take=function(n,r,t){return null==n||n.length<1?null==r?void 0:[]:null==r||t?n[0]:h.initial(n,n.length-r)},h.initial=function(n,r,t){return c.call(n,0,Math.max(0,n.length-(null==r||t?1:r)))},h.last=function(n,r,t){return null==n||n.length<1?null==r?void 0:[]:null==r||t?n[n.length-1]:h.rest(n,Math.max(0,n.length-r))},h.rest=h.tail=h.drop=function(n,r,t){return c.call(n,null==r||t?1:r)},h.compact=function(n){return h.filter(n,Boolean)};var M=function(n,r,t,e){for(var u=(e=e||[]).length,i=0,o=A(n);i<o;i++){var a=n[i];if(w(a)&&(h.isArray(a)||h.isArguments(a)))if(r)for(var c=0,l=a.length;c<l;)e[u++]=a[c++];else M(a,r,t,e),u=e.length;else t||(e[u++]=a)}return e};h.flatten=function(n,r){return M(n,r,!1)},h.without=g(function(n,r){return h.difference(n,r)}),h.uniq=h.unique=function(n,r,t,e){h.isBoolean(r)||(e=t,t=r,r=!1),null!=t&&(t=d(t,e));for(var u=[],i=[],o=0,a=A(n);o<a;o++){var c=n[o],l=t?t(c,o,n):c;r&&!t?(o&&i===l||u.push(c),i=l):t?h.contains(i,l)||(i.push(l),u.push(c)):h.contains(u,c)||u.push(c)}return u},h.union=g(function(n){return h.uniq(M(n,!0,!0))}),h.intersection=function(n){for(var r=[],t=arguments.length,e=0,u=A(n);e<u;e++){var i=n[e];if(!h.contains(r,i)){var o;for(o=1;o<t&&h.contains(arguments[o],i);o++);o===t&&r.push(i)}}return r},h.difference=g(function(n,r){return r=M(r,!0,!0),h.filter(n,function(n){return!h.contains(r,n)})}),h.unzip=function(n){for(var r=n&&h.max(n,A).length||0,t=Array(r),e=0;e<r;e++)t[e]=h.pluck(n,e);return t},h.zip=g(h.unzip),h.object=function(n,r){for(var t={},e=0,u=A(n);e<u;e++)r?t[n[e]]=r[e]:t[n[e][0]]=n[e][1];return t};var F=function(i){return function(n,r,t){r=d(r,t);for(var e=A(n),u=0<i?0:e-1;0<=u&&u<e;u+=i)if(r(n[u],u,n))return u;return-1}};h.findIndex=F(1),h.findLastIndex=F(-1),h.sortedIndex=function(n,r,t,e){for(var u=(t=d(t,e,1))(r),i=0,o=A(n);i<o;){var a=Math.floor((i+o)/2);t(n[a])<u?i=a+1:o=a}return i};var E=function(i,o,a){return function(n,r,t){var e=0,u=A(n);if("number"==typeof t)0<i?e=0<=t?t:Math.max(t+u,e):u=0<=t?Math.min(t+1,u):t+u+1;else if(a&&t&&u)return n[t=a(n,r)]===r?t:-1;if(r!=r)return 0<=(t=o(c.call(n,e,u),h.isNaN))?t+e:-1;for(t=0<i?e:u-1;0<=t&&t<u;t+=i)if(n[t]===r)return t;return-1}};h.indexOf=E(1,h.findIndex,h.sortedIndex),h.lastIndexOf=E(-1,h.findLastIndex),h.range=function(n,r,t){null==r&&(r=n||0,n=0),t||(t=r<n?-1:1);for(var e=Math.max(Math.ceil((r-n)/t),0),u=Array(e),i=0;i<e;i++,n+=t)u[i]=n;return u},h.chunk=function(n,r){if(null==r||r<1)return[];for(var t=[],e=0,u=n.length;e<u;)t.push(c.call(n,e,e+=r));return t};var N=function(n,r,t,e,u){if(!(e instanceof r))return n.apply(t,u);var i=m(n.prototype),o=n.apply(i,u);return h.isObject(o)?o:i};h.bind=g(function(r,t,e){if(!h.isFunction(r))throw new TypeError("Bind must be called on a function");var u=g(function(n){return N(r,u,t,this,e.concat(n))});return u}),h.partial=g(function(u,i){var o=h.partial.placeholder,a=function(){for(var n=0,r=i.length,t=Array(r),e=0;e<r;e++)t[e]=i[e]===o?arguments[n++]:i[e];for(;n<arguments.length;)t.push(arguments[n++]);return N(u,a,this,this,t)};return a}),(h.partial.placeholder=h).bindAll=g(function(n,r){var t=(r=M(r,!1,!1)).length;if(t<1)throw new Error("bindAll must be passed function names");for(;t--;){var e=r[t];n[e]=h.bind(n[e],n)}}),h.memoize=function(e,u){var i=function(n){var r=i.cache,t=""+(u?u.apply(this,arguments):n);return j(r,t)||(r[t]=e.apply(this,arguments)),r[t]};return i.cache={},i},h.delay=g(function(n,r,t){return setTimeout(function(){return n.apply(null,t)},r)}),h.defer=h.partial(h.delay,h,1),h.throttle=function(t,e,u){var i,o,a,c,l=0;u||(u={});var f=function(){l=!1===u.leading?0:h.now(),i=null,c=t.apply(o,a),i||(o=a=null)},n=function(){var n=h.now();l||!1!==u.leading||(l=n);var r=e-(n-l);return o=this,a=arguments,r<=0||e<r?(i&&(clearTimeout(i),i=null),l=n,c=t.apply(o,a),i||(o=a=null)):i||!1===u.trailing||(i=setTimeout(f,r)),c};return n.cancel=function(){clearTimeout(i),l=0,i=o=a=null},n},h.debounce=function(t,e,u){var i,o,a=function(n,r){i=null,r&&(o=t.apply(n,r))},n=g(function(n){if(i&&clearTimeout(i),u){var r=!i;i=setTimeout(a,e),r&&(o=t.apply(this,n))}else i=h.delay(a,e,this,n);return o});return n.cancel=function(){clearTimeout(i),i=null},n},h.wrap=function(n,r){return h.partial(r,n)},h.negate=function(n){return function(){return!n.apply(this,arguments)}},h.compose=function(){var t=arguments,e=t.length-1;return function(){for(var n=e,r=t[e].apply(this,arguments);n--;)r=t[n].call(this,r);return r}},h.after=function(n,r){return function(){if(--n<1)return r.apply(this,arguments)}},h.before=function(n,r){var t;return function(){return 0<--n&&(t=r.apply(this,arguments)),n<=1&&(r=null),t}},h.once=h.partial(h.before,2),h.restArguments=g;var I=!{toString:null}.propertyIsEnumerable("toString"),T=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],B=function(n,r){var t=T.length,e=n.constructor,u=h.isFunction(e)&&e.prototype||o,i="constructor";for(j(n,i)&&!h.contains(r,i)&&r.push(i);t--;)(i=T[t])in n&&n[i]!==u[i]&&!h.contains(r,i)&&r.push(i)};h.keys=function(n){if(!h.isObject(n))return[];if(a)return a(n);var r=[];for(var t in n)j(n,t)&&r.push(t);return I&&B(n,r),r},h.allKeys=function(n){if(!h.isObject(n))return[];var r=[];for(var t in n)r.push(t);return I&&B(n,r),r},h.values=function(n){for(var r=h.keys(n),t=r.length,e=Array(t),u=0;u<t;u++)e[u]=n[r[u]];return e},h.mapObject=function(n,r,t){r=d(r,t);for(var e=h.keys(n),u=e.length,i={},o=0;o<u;o++){var a=e[o];i[a]=r(n[a],a,n)}return i},h.pairs=function(n){for(var r=h.keys(n),t=r.length,e=Array(t),u=0;u<t;u++)e[u]=[r[u],n[r[u]]];return e},h.invert=function(n){for(var r={},t=h.keys(n),e=0,u=t.length;e<u;e++)r[n[t[e]]]=t[e];return r},h.functions=h.methods=function(n){var r=[];for(var t in n)h.isFunction(n[t])&&r.push(t);return r.sort()};var R=function(c,l){return function(n){var r=arguments.length;if(l&&(n=Object(n)),r<2||null==n)return n;for(var t=1;t<r;t++)for(var e=arguments[t],u=c(e),i=u.length,o=0;o<i;o++){var a=u[o];l&&void 0!==n[a]||(n[a]=e[a])}return n}};h.extend=R(h.allKeys),h.extendOwn=h.assign=R(h.keys),h.findKey=function(n,r,t){r=d(r,t);for(var e,u=h.keys(n),i=0,o=u.length;i<o;i++)if(r(n[e=u[i]],e,n))return e};var q,K,z=function(n,r,t){return r in t};h.pick=g(function(n,r){var t={},e=r[0];if(null==n)return t;h.isFunction(e)?(1<r.length&&(e=y(e,r[1])),r=h.allKeys(n)):(e=z,r=M(r,!1,!1),n=Object(n));for(var u=0,i=r.length;u<i;u++){var o=r[u],a=n[o];e(a,o,n)&&(t[o]=a)}return t}),h.omit=g(function(n,t){var r,e=t[0];return h.isFunction(e)?(e=h.negate(e),1<t.length&&(r=t[1])):(t=h.map(M(t,!1,!1),String),e=function(n,r){return!h.contains(t,r)}),h.pick(n,e,r)}),h.defaults=R(h.allKeys,!0),h.create=function(n,r){var t=m(n);return r&&h.extendOwn(t,r),t},h.clone=function(n){return h.isObject(n)?h.isArray(n)?n.slice():h.extend({},n):n},h.tap=function(n,r){return r(n),n},h.isMatch=function(n,r){var t=h.keys(r),e=t.length;if(null==n)return!e;for(var u=Object(n),i=0;i<e;i++){var o=t[i];if(r[o]!==u[o]||!(o in u))return!1}return!0},q=function(n,r,t,e){if(n===r)return 0!==n||1/n==1/r;if(null==n||null==r)return!1;if(n!=n)return r!=r;var u=typeof n;return("function"===u||"object"===u||"object"==typeof r)&&K(n,r,t,e)},K=function(n,r,t,e){n instanceof h&&(n=n._wrapped),r instanceof h&&(r=r._wrapped);var u=p.call(n);if(u!==p.call(r))return!1;switch(u){case"[object RegExp]":case"[object String]":return""+n==""+r;case"[object Number]":return+n!=+n?+r!=+r:0==+n?1/+n==1/r:+n==+r;case"[object Date]":case"[object Boolean]":return+n==+r;case"[object Symbol]":return s.valueOf.call(n)===s.valueOf.call(r)}var i="[object Array]"===u;if(!i){if("object"!=typeof n||"object"!=typeof r)return!1;var o=n.constructor,a=r.constructor;if(o!==a&&!(h.isFunction(o)&&o instanceof o&&h.isFunction(a)&&a instanceof a)&&"constructor"in n&&"constructor"in r)return!1}e=e||[];for(var c=(t=t||[]).length;c--;)if(t[c]===n)return e[c]===r;if(t.push(n),e.push(r),i){if((c=n.length)!==r.length)return!1;for(;c--;)if(!q(n[c],r[c],t,e))return!1}else{var l,f=h.keys(n);if(c=f.length,h.keys(r).length!==c)return!1;for(;c--;)if(l=f[c],!j(r,l)||!q(n[l],r[l],t,e))return!1}return t.pop(),e.pop(),!0},h.isEqual=function(n,r){return q(n,r)},h.isEmpty=function(n){return null==n||(w(n)&&(h.isArray(n)||h.isString(n)||h.isArguments(n))?0===n.length:0===h.keys(n).length)},h.isElement=function(n){return!(!n||1!==n.nodeType)},h.isArray=t||function(n){return"[object Array]"===p.call(n)},h.isObject=function(n){var r=typeof n;return"function"===r||"object"===r&&!!n},h.each(["Arguments","Function","String","Number","Date","RegExp","Error","Symbol","Map","WeakMap","Set","WeakSet"],function(r){h["is"+r]=function(n){return p.call(n)==="[object "+r+"]"}}),h.isArguments(arguments)||(h.isArguments=function(n){return j(n,"callee")});var D=n.document&&n.document.childNodes;"function"!=typeof/./&&"object"!=typeof Int8Array&&"function"!=typeof D&&(h.isFunction=function(n){return"function"==typeof n||!1}),h.isFinite=function(n){return!h.isSymbol(n)&&isFinite(n)&&!isNaN(parseFloat(n))},h.isNaN=function(n){return h.isNumber(n)&&isNaN(n)},h.isBoolean=function(n){return!0===n||!1===n||"[object Boolean]"===p.call(n)},h.isNull=function(n){return null===n},h.isUndefined=function(n){return void 0===n},h.has=function(n,r){if(!h.isArray(r))return j(n,r);for(var t=r.length,e=0;e<t;e++){var u=r[e];if(null==n||!i.call(n,u))return!1;n=n[u]}return!!t},h.noConflict=function(){return n._=r,this},h.identity=function(n){return n},h.constant=function(n){return function(){return n}},h.noop=function(){},h.property=function(r){return h.isArray(r)?function(n){return x(n,r)}:b(r)},h.propertyOf=function(r){return null==r?function(){}:function(n){return h.isArray(n)?x(r,n):r[n]}},h.matcher=h.matches=function(r){return r=h.extendOwn({},r),function(n){return h.isMatch(n,r)}},h.times=function(n,r,t){var e=Array(Math.max(0,n));r=y(r,t,1);for(var u=0;u<n;u++)e[u]=r(u);return e},h.random=function(n,r){return null==r&&(r=n,n=0),n+Math.floor(Math.random()*(r-n+1))},h.now=Date.now||function(){return(new Date).getTime()};var L={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},P=h.invert(L),W=function(r){var t=function(n){return r[n]},n="(?:"+h.keys(r).join("|")+")",e=RegExp(n),u=RegExp(n,"g");return function(n){return n=null==n?"":""+n,e.test(n)?n.replace(u,t):n}};h.escape=W(L),h.unescape=W(P),h.result=function(n,r,t){h.isArray(r)||(r=[r]);var e=r.length;if(!e)return h.isFunction(t)?t.call(n):t;for(var u=0;u<e;u++){var i=null==n?void 0:n[r[u]];void 0===i&&(i=t,u=e),n=h.isFunction(i)?i.call(n):i}return n};var C=0;h.uniqueId=function(n){var r=++C+"";return n?n+r:r},h.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var J=/(.)^/,U={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},V=/\\|'|\r|\n|\u2028|\u2029/g,$=function(n){return"\\"+U[n]};h.template=function(i,n,r){!n&&r&&(n=r),n=h.defaults({},n,h.templateSettings);var t,e=RegExp([(n.escape||J).source,(n.interpolate||J).source,(n.evaluate||J).source].join("|")+"|$","g"),o=0,a="__p+='";i.replace(e,function(n,r,t,e,u){return a+=i.slice(o,u).replace(V,$),o=u+n.length,r?a+="'+\n((__t=("+r+"))==null?'':_.escape(__t))+\n'":t?a+="'+\n((__t=("+t+"))==null?'':__t)+\n'":e&&(a+="';\n"+e+"\n__p+='"),n}),a+="';\n",n.variable||(a="with(obj||{}){\n"+a+"}\n"),a="var __t,__p='',__j=Array.prototype.join,"+"print=function(){__p+=__j.call(arguments,'');};\n"+a+"return __p;\n";try{t=new Function(n.variable||"obj","_",a)}catch(n){throw n.source=a,n}var u=function(n){return t.call(this,n,h)},c=n.variable||"obj";return u.source="function("+c+"){\n"+a+"}",u},h.chain=function(n){var r=h(n);return r._chain=!0,r};var G=function(n,r){return n._chain?h(r).chain():r};h.mixin=function(t){return h.each(h.functions(t),function(n){var r=h[n]=t[n];h.prototype[n]=function(){var n=[this._wrapped];return u.apply(n,arguments),G(this,r.apply(h,n))}}),h},h.mixin(h),h.each(["pop","push","reverse","shift","sort","splice","unshift"],function(r){var t=e[r];h.prototype[r]=function(){var n=this._wrapped;return t.apply(n,arguments),"shift"!==r&&"splice"!==r||0!==n.length||delete n[0],G(this,n)}}),h.each(["concat","join","slice"],function(n){var r=e[n];h.prototype[n]=function(){return G(this,r.apply(this._wrapped,arguments))}}),h.prototype.value=function(){return this._wrapped},h.prototype.valueOf=h.prototype.toJSON=h.prototype.value,h.prototype.toString=function(){return String(this._wrapped)},"function"==typeof define&&define.amd&&define("underscore",[],function(){return h})}();
/*!
 * JavaScript Cookie v2.2.1
 * https://github.com/js-cookie/js-cookie
 *
 * Copyright 2006, 2015 Klaus Hartl & Fagner Brack
 * Released under the MIT license
 */
;(function (factory) {
	var registeredInModuleLoader;
	if (typeof define === 'function' && define.amd) {
		define(factory);
		registeredInModuleLoader = true;
	}
	if (typeof exports === 'object') {
		module.exports = factory();
		registeredInModuleLoader = true;
	}
	if (!registeredInModuleLoader) {
		var OldCookies = window.Cookies;
		var api = window.Cookies = factory();
		api.noConflict = function () {
			window.Cookies = OldCookies;
			return api;
		};
	}
}(function () {
	function extend () {
		var i = 0;
		var result = {};
		for (; i < arguments.length; i++) {
			var attributes = arguments[ i ];
			for (var key in attributes) {
				result[key] = attributes[key];
			}
		}
		return result;
	}

	function decode (s) {
		return s.replace(/(%[0-9A-Z]{2})+/g, decodeURIComponent);
	}

	function init (converter) {
		function api() {}

		function set (key, value, attributes) {
			if (typeof document === 'undefined') {
				return;
			}

			attributes = extend({
				path: '/'
			}, api.defaults, attributes);

			if (typeof attributes.expires === 'number') {
				attributes.expires = new Date(new Date() * 1 + attributes.expires * 864e+5);
			}

			// We're using "expires" because "max-age" is not supported by IE
			attributes.expires = attributes.expires ? attributes.expires.toUTCString() : '';

			try {
				var result = JSON.stringify(value);
				if (/^[\{\[]/.test(result)) {
					value = result;
				}
			} catch (e) {}

			value = converter.write ?
				converter.write(value, key) :
				encodeURIComponent(String(value))
					.replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g, decodeURIComponent);

			key = encodeURIComponent(String(key))
				.replace(/%(23|24|26|2B|5E|60|7C)/g, decodeURIComponent)
				.replace(/[\(\)]/g, escape);

			var stringifiedAttributes = '';
			for (var attributeName in attributes) {
				if (!attributes[attributeName]) {
					continue;
				}
				stringifiedAttributes += '; ' + attributeName;
				if (attributes[attributeName] === true) {
					continue;
				}

				// Considers RFC 6265 section 5.2:
				// ...
				// 3.  If the remaining unparsed-attributes contains a %x3B (";")
				//     character:
				// Consume the characters of the unparsed-attributes up to,
				// not including, the first %x3B (";") character.
				// ...
				stringifiedAttributes += '=' + attributes[attributeName].split(';')[0];
			}

			return (document.cookie = key + '=' + value + stringifiedAttributes);
		}

		function get (key, json) {
			if (typeof document === 'undefined') {
				return;
			}

			var jar = {};
			// To prevent the for loop in the first place assign an empty array
			// in case there are no cookies at all.
			var cookies = document.cookie ? document.cookie.split('; ') : [];
			var i = 0;

			for (; i < cookies.length; i++) {
				var parts = cookies[i].split('=');
				var cookie = parts.slice(1).join('=');

				if (!json && cookie.charAt(0) === '"') {
					cookie = cookie.slice(1, -1);
				}

				try {
					var name = decode(parts[0]);
					cookie = (converter.read || converter)(cookie, name) ||
						decode(cookie);

					if (json) {
						try {
							cookie = JSON.parse(cookie);
						} catch (e) {}
					}

					jar[name] = cookie;

					if (key === name) {
						break;
					}
				} catch (e) {}
			}

			return key ? jar[key] : jar;
		}

		api.set = set;
		api.get = function (key) {
			return get(key, false /* read as raw */);
		};
		api.getJSON = function (key) {
			return get(key, true /* read as json */);
		};
		api.remove = function (key, attributes) {
			set(key, '', extend(attributes, {
				expires: -1
			}));
		};

		api.defaults = {};

		api.withConverter = init;

		return api;
	}

	return init(function () {});
}));

/*!
Waypoints - 4.0.1
Copyright © 2011-2016 Caleb Troughton
Licensed under the MIT license.
https://github.com/imakewebthings/waypoints/blob/master/licenses.txt
*/
(function() {
  'use strict'

  var keyCounter = 0
  var allWaypoints = {}

  /* http://imakewebthings.com/waypoints/api/waypoint */
  function Waypoint(options) {
    if (!options) {
      throw new Error('No options passed to Waypoint constructor')
    }
    if (!options.element) {
      throw new Error('No element option passed to Waypoint constructor')
    }
    if (!options.handler) {
      throw new Error('No handler option passed to Waypoint constructor')
    }

    this.key = 'waypoint-' + keyCounter
    this.options = Waypoint.Adapter.extend({}, Waypoint.defaults, options)
    this.element = this.options.element
    this.adapter = new Waypoint.Adapter(this.element)
    this.callback = options.handler
    this.axis = this.options.horizontal ? 'horizontal' : 'vertical'
    this.enabled = this.options.enabled
    this.triggerPoint = null
    this.group = Waypoint.Group.findOrCreate({
      name: this.options.group,
      axis: this.axis
    })
    this.context = Waypoint.Context.findOrCreateByElement(this.options.context)

    if (Waypoint.offsetAliases[this.options.offset]) {
      this.options.offset = Waypoint.offsetAliases[this.options.offset]
    }
    this.group.add(this)
    this.context.add(this)
    allWaypoints[this.key] = this
    keyCounter += 1
  }

  /* Private */
  Waypoint.prototype.queueTrigger = function(direction) {
    this.group.queueTrigger(this, direction)
  }

  /* Private */
  Waypoint.prototype.trigger = function(args) {
    if (!this.enabled) {
      return
    }
    if (this.callback) {
      this.callback.apply(this, args)
    }
  }

  /* Public */
  /* http://imakewebthings.com/waypoints/api/destroy */
  Waypoint.prototype.destroy = function() {
    this.context.remove(this)
    this.group.remove(this)
    delete allWaypoints[this.key]
  }

  /* Public */
  /* http://imakewebthings.com/waypoints/api/disable */
  Waypoint.prototype.disable = function() {
    this.enabled = false
    return this
  }

  /* Public */
  /* http://imakewebthings.com/waypoints/api/enable */
  Waypoint.prototype.enable = function() {
    this.context.refresh()
    this.enabled = true
    return this
  }

  /* Public */
  /* http://imakewebthings.com/waypoints/api/next */
  Waypoint.prototype.next = function() {
    return this.group.next(this)
  }

  /* Public */
  /* http://imakewebthings.com/waypoints/api/previous */
  Waypoint.prototype.previous = function() {
    return this.group.previous(this)
  }

  /* Private */
  Waypoint.invokeAll = function(method) {
    var allWaypointsArray = []
    for (var waypointKey in allWaypoints) {
      allWaypointsArray.push(allWaypoints[waypointKey])
    }
    for (var i = 0, end = allWaypointsArray.length; i < end; i++) {
      allWaypointsArray[i][method]()
    }
  }

  /* Public */
  /* http://imakewebthings.com/waypoints/api/destroy-all */
  Waypoint.destroyAll = function() {
    Waypoint.invokeAll('destroy')
  }

  /* Public */
  /* http://imakewebthings.com/waypoints/api/disable-all */
  Waypoint.disableAll = function() {
    Waypoint.invokeAll('disable')
  }

  /* Public */
  /* http://imakewebthings.com/waypoints/api/enable-all */
  Waypoint.enableAll = function() {
    Waypoint.Context.refreshAll()
    for (var waypointKey in allWaypoints) {
      allWaypoints[waypointKey].enabled = true
    }
    return this
  }

  /* Public */
  /* http://imakewebthings.com/waypoints/api/refresh-all */
  Waypoint.refreshAll = function() {
    Waypoint.Context.refreshAll()
  }

  /* Public */
  /* http://imakewebthings.com/waypoints/api/viewport-height */
  Waypoint.viewportHeight = function() {
    return window.innerHeight || document.documentElement.clientHeight
  }

  /* Public */
  /* http://imakewebthings.com/waypoints/api/viewport-width */
  Waypoint.viewportWidth = function() {
    return document.documentElement.clientWidth
  }

  Waypoint.adapters = []

  Waypoint.defaults = {
    context: window,
    continuous: true,
    enabled: true,
    group: 'default',
    horizontal: false,
    offset: 0
  }

  Waypoint.offsetAliases = {
    'bottom-in-view': function() {
      return this.context.innerHeight() - this.adapter.outerHeight()
    },
    'right-in-view': function() {
      return this.context.innerWidth() - this.adapter.outerWidth()
    }
  }

  window.Waypoint = Waypoint
}())
;(function() {
  'use strict'

  function requestAnimationFrameShim(callback) {
    window.setTimeout(callback, 1000 / 60)
  }

  var keyCounter = 0
  var contexts = {}
  var Waypoint = window.Waypoint
  var oldWindowLoad = window.onload

  /* http://imakewebthings.com/waypoints/api/context */
  function Context(element) {
    this.element = element
    this.Adapter = Waypoint.Adapter
    this.adapter = new this.Adapter(element)
    this.key = 'waypoint-context-' + keyCounter
    this.didScroll = false
    this.didResize = false
    this.oldScroll = {
      x: this.adapter.scrollLeft(),
      y: this.adapter.scrollTop()
    }
    this.waypoints = {
      vertical: {},
      horizontal: {}
    }

    element.waypointContextKey = this.key
    contexts[element.waypointContextKey] = this
    keyCounter += 1
    if (!Waypoint.windowContext) {
      Waypoint.windowContext = true
      Waypoint.windowContext = new Context(window)
    }

    this.createThrottledScrollHandler()
    this.createThrottledResizeHandler()
  }

  /* Private */
  Context.prototype.add = function(waypoint) {
    var axis = waypoint.options.horizontal ? 'horizontal' : 'vertical'
    this.waypoints[axis][waypoint.key] = waypoint
    this.refresh()
  }

  /* Private */
  Context.prototype.checkEmpty = function() {
    var horizontalEmpty = this.Adapter.isEmptyObject(this.waypoints.horizontal)
    var verticalEmpty = this.Adapter.isEmptyObject(this.waypoints.vertical)
    var isWindow = this.element == this.element.window
    if (horizontalEmpty && verticalEmpty && !isWindow) {
      this.adapter.off('.waypoints')
      delete contexts[this.key]
    }
  }

  /* Private */
  Context.prototype.createThrottledResizeHandler = function() {
    var self = this

    function resizeHandler() {
      self.handleResize()
      self.didResize = false
    }

    this.adapter.on('resize.waypoints', function() {
      if (!self.didResize) {
        self.didResize = true
        Waypoint.requestAnimationFrame(resizeHandler)
      }
    })
  }

  /* Private */
  Context.prototype.createThrottledScrollHandler = function() {
    var self = this
    function scrollHandler() {
      self.handleScroll()
      self.didScroll = false
    }

    this.adapter.on('scroll.waypoints', function() {
      if (!self.didScroll || Waypoint.isTouch) {
        self.didScroll = true
        Waypoint.requestAnimationFrame(scrollHandler)
      }
    })
  }

  /* Private */
  Context.prototype.handleResize = function() {
    Waypoint.Context.refreshAll()
  }

  /* Private */
  Context.prototype.handleScroll = function() {
    var triggeredGroups = {}
    var axes = {
      horizontal: {
        newScroll: this.adapter.scrollLeft(),
        oldScroll: this.oldScroll.x,
        forward: 'right',
        backward: 'left'
      },
      vertical: {
        newScroll: this.adapter.scrollTop(),
        oldScroll: this.oldScroll.y,
        forward: 'down',
        backward: 'up'
      }
    }

    for (var axisKey in axes) {
      var axis = axes[axisKey]
      var isForward = axis.newScroll > axis.oldScroll
      var direction = isForward ? axis.forward : axis.backward

      for (var waypointKey in this.waypoints[axisKey]) {
        var waypoint = this.waypoints[axisKey][waypointKey]
        if (waypoint.triggerPoint === null) {
          continue
        }
        var wasBeforeTriggerPoint = axis.oldScroll < waypoint.triggerPoint
        var nowAfterTriggerPoint = axis.newScroll >= waypoint.triggerPoint
        var crossedForward = wasBeforeTriggerPoint && nowAfterTriggerPoint
        var crossedBackward = !wasBeforeTriggerPoint && !nowAfterTriggerPoint
        if (crossedForward || crossedBackward) {
          waypoint.queueTrigger(direction)
          triggeredGroups[waypoint.group.id] = waypoint.group
        }
      }
    }

    for (var groupKey in triggeredGroups) {
      triggeredGroups[groupKey].flushTriggers()
    }

    this.oldScroll = {
      x: axes.horizontal.newScroll,
      y: axes.vertical.newScroll
    }
  }

  /* Private */
  Context.prototype.innerHeight = function() {
    /*eslint-disable eqeqeq */
    if (this.element == this.element.window) {
      return Waypoint.viewportHeight()
    }
    /*eslint-enable eqeqeq */
    return this.adapter.innerHeight()
  }

  /* Private */
  Context.prototype.remove = function(waypoint) {
    delete this.waypoints[waypoint.axis][waypoint.key]
    this.checkEmpty()
  }

  /* Private */
  Context.prototype.innerWidth = function() {
    /*eslint-disable eqeqeq */
    if (this.element == this.element.window) {
      return Waypoint.viewportWidth()
    }
    /*eslint-enable eqeqeq */
    return this.adapter.innerWidth()
  }

  /* Public */
  /* http://imakewebthings.com/waypoints/api/context-destroy */
  Context.prototype.destroy = function() {
    var allWaypoints = []
    for (var axis in this.waypoints) {
      for (var waypointKey in this.waypoints[axis]) {
        allWaypoints.push(this.waypoints[axis][waypointKey])
      }
    }
    for (var i = 0, end = allWaypoints.length; i < end; i++) {
      allWaypoints[i].destroy()
    }
  }

  /* Public */
  /* http://imakewebthings.com/waypoints/api/context-refresh */
  Context.prototype.refresh = function() {
    /*eslint-disable eqeqeq */
    var isWindow = this.element == this.element.window
    /*eslint-enable eqeqeq */
    var contextOffset = isWindow ? undefined : this.adapter.offset()
    var triggeredGroups = {}
    var axes

    this.handleScroll()
    axes = {
      horizontal: {
        contextOffset: isWindow ? 0 : contextOffset.left,
        contextScroll: isWindow ? 0 : this.oldScroll.x,
        contextDimension: this.innerWidth(),
        oldScroll: this.oldScroll.x,
        forward: 'right',
        backward: 'left',
        offsetProp: 'left'
      },
      vertical: {
        contextOffset: isWindow ? 0 : contextOffset.top,
        contextScroll: isWindow ? 0 : this.oldScroll.y,
        contextDimension: this.innerHeight(),
        oldScroll: this.oldScroll.y,
        forward: 'down',
        backward: 'up',
        offsetProp: 'top'
      }
    }

    for (var axisKey in axes) {
      var axis = axes[axisKey]
      for (var waypointKey in this.waypoints[axisKey]) {
        var waypoint = this.waypoints[axisKey][waypointKey]
        var adjustment = waypoint.options.offset
        var oldTriggerPoint = waypoint.triggerPoint
        var elementOffset = 0
        var freshWaypoint = oldTriggerPoint == null
        var contextModifier, wasBeforeScroll, nowAfterScroll
        var triggeredBackward, triggeredForward

        if (waypoint.element !== waypoint.element.window) {
          elementOffset = waypoint.adapter.offset()[axis.offsetProp]
        }

        if (typeof adjustment === 'function') {
          adjustment = adjustment.apply(waypoint)
        }
        else if (typeof adjustment === 'string') {
          adjustment = parseFloat(adjustment)
          if (waypoint.options.offset.indexOf('%') > - 1) {
            adjustment = Math.ceil(axis.contextDimension * adjustment / 100)
          }
        }

        contextModifier = axis.contextScroll - axis.contextOffset
        waypoint.triggerPoint = Math.floor(elementOffset + contextModifier - adjustment)
        wasBeforeScroll = oldTriggerPoint < axis.oldScroll
        nowAfterScroll = waypoint.triggerPoint >= axis.oldScroll
        triggeredBackward = wasBeforeScroll && nowAfterScroll
        triggeredForward = !wasBeforeScroll && !nowAfterScroll

        if (!freshWaypoint && triggeredBackward) {
          waypoint.queueTrigger(axis.backward)
          triggeredGroups[waypoint.group.id] = waypoint.group
        }
        else if (!freshWaypoint && triggeredForward) {
          waypoint.queueTrigger(axis.forward)
          triggeredGroups[waypoint.group.id] = waypoint.group
        }
        else if (freshWaypoint && axis.oldScroll >= waypoint.triggerPoint) {
          waypoint.queueTrigger(axis.forward)
          triggeredGroups[waypoint.group.id] = waypoint.group
        }
      }
    }

    Waypoint.requestAnimationFrame(function() {
      for (var groupKey in triggeredGroups) {
        triggeredGroups[groupKey].flushTriggers()
      }
    })

    return this
  }

  /* Private */
  Context.findOrCreateByElement = function(element) {
    return Context.findByElement(element) || new Context(element)
  }

  /* Private */
  Context.refreshAll = function() {
    for (var contextId in contexts) {
      contexts[contextId].refresh()
    }
  }

  /* Public */
  /* http://imakewebthings.com/waypoints/api/context-find-by-element */
  Context.findByElement = function(element) {
    return contexts[element.waypointContextKey]
  }

  window.onload = function() {
    if (oldWindowLoad) {
      oldWindowLoad()
    }
    Context.refreshAll()
  }


  Waypoint.requestAnimationFrame = function(callback) {
    var requestFn = window.requestAnimationFrame ||
      window.mozRequestAnimationFrame ||
      window.webkitRequestAnimationFrame ||
      requestAnimationFrameShim
    requestFn.call(window, callback)
  }
  Waypoint.Context = Context
}())
;(function() {
  'use strict'

  function byTriggerPoint(a, b) {
    return a.triggerPoint - b.triggerPoint
  }

  function byReverseTriggerPoint(a, b) {
    return b.triggerPoint - a.triggerPoint
  }

  var groups = {
    vertical: {},
    horizontal: {}
  }
  var Waypoint = window.Waypoint

  /* http://imakewebthings.com/waypoints/api/group */
  function Group(options) {
    this.name = options.name
    this.axis = options.axis
    this.id = this.name + '-' + this.axis
    this.waypoints = []
    this.clearTriggerQueues()
    groups[this.axis][this.name] = this
  }

  /* Private */
  Group.prototype.add = function(waypoint) {
    this.waypoints.push(waypoint)
  }

  /* Private */
  Group.prototype.clearTriggerQueues = function() {
    this.triggerQueues = {
      up: [],
      down: [],
      left: [],
      right: []
    }
  }

  /* Private */
  Group.prototype.flushTriggers = function() {
    for (var direction in this.triggerQueues) {
      var waypoints = this.triggerQueues[direction]
      var reverse = direction === 'up' || direction === 'left'
      waypoints.sort(reverse ? byReverseTriggerPoint : byTriggerPoint)
      for (var i = 0, end = waypoints.length; i < end; i += 1) {
        var waypoint = waypoints[i]
        if (waypoint.options.continuous || i === waypoints.length - 1) {
          waypoint.trigger([direction])
        }
      }
    }
    this.clearTriggerQueues()
  }

  /* Private */
  Group.prototype.next = function(waypoint) {
    this.waypoints.sort(byTriggerPoint)
    var index = Waypoint.Adapter.inArray(waypoint, this.waypoints)
    var isLast = index === this.waypoints.length - 1
    return isLast ? null : this.waypoints[index + 1]
  }

  /* Private */
  Group.prototype.previous = function(waypoint) {
    this.waypoints.sort(byTriggerPoint)
    var index = Waypoint.Adapter.inArray(waypoint, this.waypoints)
    return index ? this.waypoints[index - 1] : null
  }

  /* Private */
  Group.prototype.queueTrigger = function(waypoint, direction) {
    this.triggerQueues[direction].push(waypoint)
  }

  /* Private */
  Group.prototype.remove = function(waypoint) {
    var index = Waypoint.Adapter.inArray(waypoint, this.waypoints)
    if (index > -1) {
      this.waypoints.splice(index, 1)
    }
  }

  /* Public */
  /* http://imakewebthings.com/waypoints/api/first */
  Group.prototype.first = function() {
    return this.waypoints[0]
  }

  /* Public */
  /* http://imakewebthings.com/waypoints/api/last */
  Group.prototype.last = function() {
    return this.waypoints[this.waypoints.length - 1]
  }

  /* Private */
  Group.findOrCreate = function(options) {
    return groups[options.axis][options.name] || new Group(options)
  }

  Waypoint.Group = Group
}())
;(function() {
  'use strict'

  var $ = window.jQuery
  var Waypoint = window.Waypoint

  function JQueryAdapter(element) {
    this.$element = $(element)
  }

  $.each([
    'innerHeight',
    'innerWidth',
    'off',
    'offset',
    'on',
    'outerHeight',
    'outerWidth',
    'scrollLeft',
    'scrollTop'
  ], function(i, method) {
    JQueryAdapter.prototype[method] = function() {
      var args = Array.prototype.slice.call(arguments)
      return this.$element[method].apply(this.$element, args)
    }
  })

  $.each([
    'extend',
    'inArray',
    'isEmptyObject'
  ], function(i, method) {
    JQueryAdapter[method] = $[method]
  })

  Waypoint.adapters.push({
    name: 'jquery',
    Adapter: JQueryAdapter
  })
  Waypoint.Adapter = JQueryAdapter
}())
;(function() {
  'use strict'

  var Waypoint = window.Waypoint

  function createExtension(framework) {
    return function() {
      var waypoints = []
      var overrides = arguments[0]

      if (framework.isFunction(arguments[0])) {
        overrides = framework.extend({}, arguments[1])
        overrides.handler = arguments[0]
      }

      this.each(function() {
        var options = framework.extend({}, overrides, {
          element: this
        })
        if (typeof options.context === 'string') {
          options.context = framework(this).closest(options.context)[0]
        }
        waypoints.push(new Waypoint(options))
      })

      return waypoints
    }
  }

  if (window.jQuery) {
    window.jQuery.fn.waypoint = createExtension(window.jQuery)
  }
  if (window.Zepto) {
    window.Zepto.fn.waypoint = createExtension(window.Zepto)
  }
}())
;
/*!
Waypoints Sticky Element Shortcut - 4.0.1
Copyright © 2011-2016 Caleb Troughton
Licensed under the MIT license.
https://github.com/imakewebthings/waypoints/blob/master/licenses.txt
*/
(function() {
  'use strict'

  var $ = window.jQuery
  var Waypoint = window.Waypoint

  /* http://imakewebthings.com/waypoints/shortcuts/sticky-elements */
  function Sticky(options) {
    this.options = $.extend({}, Waypoint.defaults, Sticky.defaults, options)
    this.element = this.options.element
    this.$element = $(this.element)
    this.createWrapper()
    this.createWaypoint()
  }

  /* Private */
  Sticky.prototype.createWaypoint = function() {
    var originalHandler = this.options.handler

    this.waypoint = new Waypoint($.extend({}, this.options, {
      element: this.wrapper,
      handler: $.proxy(function(direction) {
        var shouldBeStuck = this.options.direction.indexOf(direction) > -1
        var wrapperHeight = shouldBeStuck ? this.$element.outerHeight(true) : ''

        this.$wrapper.height(wrapperHeight)
        this.$element.toggleClass(this.options.stuckClass, shouldBeStuck)

        if (originalHandler) {
          originalHandler.call(this, direction)
        }
      }, this)
    }))
  }

  /* Private */
  Sticky.prototype.createWrapper = function() {
    if (this.options.wrapper) {
      this.$element.wrap(this.options.wrapper)
    }
    this.$wrapper = this.$element.parent()
    this.wrapper = this.$wrapper[0]
  }

  /* Public */
  Sticky.prototype.destroy = function() {
    if (this.$element.parent()[0] === this.wrapper) {
      this.waypoint.destroy()
      this.$element.removeClass(this.options.stuckClass)
      if (this.options.wrapper) {
        this.$element.unwrap()
      }
    }
  }

  Sticky.defaults = {
    wrapper: '<div class="sticky-wrapper" />',
    stuckClass: 'stuck',
    direction: 'down right'
  }

  Waypoint.Sticky = Sticky
}())
;
/*! tooltipster v4.2.8 */!function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof exports?module.exports=b(require("jquery")):b(jQuery)}(this,function(a){function b(a){this.$container,this.constraints=null,this.__$tooltip,this.__init(a)}function c(b,c){var d=!0;return a.each(b,function(a,e){return void 0===c[a]||b[a]!==c[a]?(d=!1,!1):void 0}),d}function d(b){var c=b.attr("id"),d=c?h.window.document.getElementById(c):null;return d?d===b[0]:a.contains(h.window.document.body,b[0])}function e(){if(!g)return!1;var a=g.document.body||g.document.documentElement,b=a.style,c="transition",d=["Moz","Webkit","Khtml","O","ms"];if("string"==typeof b[c])return!0;c=c.charAt(0).toUpperCase()+c.substr(1);for(var e=0;e<d.length;e++)if("string"==typeof b[d[e]+c])return!0;return!1}var f={animation:"fade",animationDuration:350,content:null,contentAsHTML:!1,contentCloning:!1,debug:!0,delay:300,delayTouch:[300,500],functionInit:null,functionBefore:null,functionReady:null,functionAfter:null,functionFormat:null,IEmin:6,interactive:!1,multiple:!1,parent:null,plugins:["sideTip"],repositionOnScroll:!1,restoration:"none",selfDestruction:!0,theme:[],timer:0,trackerInterval:500,trackOrigin:!1,trackTooltip:!1,trigger:"hover",triggerClose:{click:!1,mouseleave:!1,originClick:!1,scroll:!1,tap:!1,touchleave:!1},triggerOpen:{click:!1,mouseenter:!1,tap:!1,touchstart:!1},updateAnimation:"rotate",zIndex:9999999},g="undefined"!=typeof window?window:null,h={hasTouchCapability:!(!g||!("ontouchstart"in g||g.DocumentTouch&&g.document instanceof g.DocumentTouch||g.navigator.maxTouchPoints)),hasTransitions:e(),IE:!1,semVer:"4.2.8",window:g},i=function(){this.__$emitterPrivate=a({}),this.__$emitterPublic=a({}),this.__instancesLatestArr=[],this.__plugins={},this._env=h};i.prototype={__bridge:function(b,c,d){if(!c[d]){var e=function(){};e.prototype=b;var g=new e;g.__init&&g.__init(c),a.each(b,function(a,b){0!=a.indexOf("__")&&(c[a]?f.debug&&console.log("The "+a+" method of the "+d+" plugin conflicts with another plugin or native methods"):(c[a]=function(){return g[a].apply(g,Array.prototype.slice.apply(arguments))},c[a].bridged=g))}),c[d]=g}return this},__setWindow:function(a){return h.window=a,this},_getRuler:function(a){return new b(a)},_off:function(){return this.__$emitterPrivate.off.apply(this.__$emitterPrivate,Array.prototype.slice.apply(arguments)),this},_on:function(){return this.__$emitterPrivate.on.apply(this.__$emitterPrivate,Array.prototype.slice.apply(arguments)),this},_one:function(){return this.__$emitterPrivate.one.apply(this.__$emitterPrivate,Array.prototype.slice.apply(arguments)),this},_plugin:function(b){var c=this;if("string"==typeof b){var d=b,e=null;return d.indexOf(".")>0?e=c.__plugins[d]:a.each(c.__plugins,function(a,b){return b.name.substring(b.name.length-d.length-1)=="."+d?(e=b,!1):void 0}),e}if(b.name.indexOf(".")<0)throw new Error("Plugins must be namespaced");return c.__plugins[b.name]=b,b.core&&c.__bridge(b.core,c,b.name),this},_trigger:function(){var a=Array.prototype.slice.apply(arguments);return"string"==typeof a[0]&&(a[0]={type:a[0]}),this.__$emitterPrivate.trigger.apply(this.__$emitterPrivate,a),this.__$emitterPublic.trigger.apply(this.__$emitterPublic,a),this},instances:function(b){var c=[],d=b||".tooltipstered";return a(d).each(function(){var b=a(this),d=b.data("tooltipster-ns");d&&a.each(d,function(a,d){c.push(b.data(d))})}),c},instancesLatest:function(){return this.__instancesLatestArr},off:function(){return this.__$emitterPublic.off.apply(this.__$emitterPublic,Array.prototype.slice.apply(arguments)),this},on:function(){return this.__$emitterPublic.on.apply(this.__$emitterPublic,Array.prototype.slice.apply(arguments)),this},one:function(){return this.__$emitterPublic.one.apply(this.__$emitterPublic,Array.prototype.slice.apply(arguments)),this},origins:function(b){var c=b?b+" ":"";return a(c+".tooltipstered").toArray()},setDefaults:function(b){return a.extend(f,b),this},triggerHandler:function(){return this.__$emitterPublic.triggerHandler.apply(this.__$emitterPublic,Array.prototype.slice.apply(arguments)),this}},a.tooltipster=new i,a.Tooltipster=function(b,c){this.__callbacks={close:[],open:[]},this.__closingTime,this.__Content,this.__contentBcr,this.__destroyed=!1,this.__$emitterPrivate=a({}),this.__$emitterPublic=a({}),this.__enabled=!0,this.__garbageCollector,this.__Geometry,this.__lastPosition,this.__namespace="tooltipster-"+Math.round(1e6*Math.random()),this.__options,this.__$originParents,this.__pointerIsOverOrigin=!1,this.__previousThemes=[],this.__state="closed",this.__timeouts={close:[],open:null},this.__touchEvents=[],this.__tracker=null,this._$origin,this._$tooltip,this.__init(b,c)},a.Tooltipster.prototype={__init:function(b,c){var d=this;if(d._$origin=a(b),d.__options=a.extend(!0,{},f,c),d.__optionsFormat(),!h.IE||h.IE>=d.__options.IEmin){var e=null;if(void 0===d._$origin.data("tooltipster-initialTitle")&&(e=d._$origin.attr("title"),void 0===e&&(e=null),d._$origin.data("tooltipster-initialTitle",e)),null!==d.__options.content)d.__contentSet(d.__options.content);else{var g,i=d._$origin.attr("data-tooltip-content");i&&(g=a(i)),g&&g[0]?d.__contentSet(g.first()):d.__contentSet(e)}d._$origin.removeAttr("title").addClass("tooltipstered"),d.__prepareOrigin(),d.__prepareGC(),a.each(d.__options.plugins,function(a,b){d._plug(b)}),h.hasTouchCapability&&a(h.window.document.body).on("touchmove."+d.__namespace+"-triggerOpen",function(a){d._touchRecordEvent(a)}),d._on("created",function(){d.__prepareTooltip()})._on("repositioned",function(a){d.__lastPosition=a.position})}else d.__options.disabled=!0},__contentInsert:function(){var a=this,b=a._$tooltip.find(".tooltipster-content"),c=a.__Content,d=function(a){c=a};return a._trigger({type:"format",content:a.__Content,format:d}),a.__options.functionFormat&&(c=a.__options.functionFormat.call(a,a,{origin:a._$origin[0]},a.__Content)),"string"!=typeof c||a.__options.contentAsHTML?b.empty().append(c):b.text(c),a},__contentSet:function(b){return b instanceof a&&this.__options.contentCloning&&(b=b.clone(!0)),this.__Content=b,this._trigger({type:"updated",content:b}),this},__destroyError:function(){throw new Error("This tooltip has been destroyed and cannot execute your method call.")},__geometry:function(){var b=this,c=b._$origin,d=b._$origin.is("area");if(d){var e=b._$origin.parent().attr("name");c=a('img[usemap="#'+e+'"]')}var f=c[0].getBoundingClientRect(),g=a(h.window.document),i=a(h.window),j=c,k={available:{document:null,window:null},document:{size:{height:g.height(),width:g.width()}},window:{scroll:{left:h.window.scrollX||h.window.document.documentElement.scrollLeft,top:h.window.scrollY||h.window.document.documentElement.scrollTop},size:{height:i.height(),width:i.width()}},origin:{fixedLineage:!1,offset:{},size:{height:f.bottom-f.top,width:f.right-f.left},usemapImage:d?c[0]:null,windowOffset:{bottom:f.bottom,left:f.left,right:f.right,top:f.top}}};if(d){var l=b._$origin.attr("shape"),m=b._$origin.attr("coords");if(m&&(m=m.split(","),a.map(m,function(a,b){m[b]=parseInt(a)})),"default"!=l)switch(l){case"circle":var n=m[0],o=m[1],p=m[2],q=o-p,r=n-p;k.origin.size.height=2*p,k.origin.size.width=k.origin.size.height,k.origin.windowOffset.left+=r,k.origin.windowOffset.top+=q;break;case"rect":var s=m[0],t=m[1],u=m[2],v=m[3];k.origin.size.height=v-t,k.origin.size.width=u-s,k.origin.windowOffset.left+=s,k.origin.windowOffset.top+=t;break;case"poly":for(var w=0,x=0,y=0,z=0,A="even",B=0;B<m.length;B++){var C=m[B];"even"==A?(C>y&&(y=C,0===B&&(w=y)),w>C&&(w=C),A="odd"):(C>z&&(z=C,1==B&&(x=z)),x>C&&(x=C),A="even")}k.origin.size.height=z-x,k.origin.size.width=y-w,k.origin.windowOffset.left+=w,k.origin.windowOffset.top+=x}}var D=function(a){k.origin.size.height=a.height,k.origin.windowOffset.left=a.left,k.origin.windowOffset.top=a.top,k.origin.size.width=a.width};for(b._trigger({type:"geometry",edit:D,geometry:{height:k.origin.size.height,left:k.origin.windowOffset.left,top:k.origin.windowOffset.top,width:k.origin.size.width}}),k.origin.windowOffset.right=k.origin.windowOffset.left+k.origin.size.width,k.origin.windowOffset.bottom=k.origin.windowOffset.top+k.origin.size.height,k.origin.offset.left=k.origin.windowOffset.left+k.window.scroll.left,k.origin.offset.top=k.origin.windowOffset.top+k.window.scroll.top,k.origin.offset.bottom=k.origin.offset.top+k.origin.size.height,k.origin.offset.right=k.origin.offset.left+k.origin.size.width,k.available.document={bottom:{height:k.document.size.height-k.origin.offset.bottom,width:k.document.size.width},left:{height:k.document.size.height,width:k.origin.offset.left},right:{height:k.document.size.height,width:k.document.size.width-k.origin.offset.right},top:{height:k.origin.offset.top,width:k.document.size.width}},k.available.window={bottom:{height:Math.max(k.window.size.height-Math.max(k.origin.windowOffset.bottom,0),0),width:k.window.size.width},left:{height:k.window.size.height,width:Math.max(k.origin.windowOffset.left,0)},right:{height:k.window.size.height,width:Math.max(k.window.size.width-Math.max(k.origin.windowOffset.right,0),0)},top:{height:Math.max(k.origin.windowOffset.top,0),width:k.window.size.width}};"html"!=j[0].tagName.toLowerCase();){if("fixed"==j.css("position")){k.origin.fixedLineage=!0;break}j=j.parent()}return k},__optionsFormat:function(){return"number"==typeof this.__options.animationDuration&&(this.__options.animationDuration=[this.__options.animationDuration,this.__options.animationDuration]),"number"==typeof this.__options.delay&&(this.__options.delay=[this.__options.delay,this.__options.delay]),"number"==typeof this.__options.delayTouch&&(this.__options.delayTouch=[this.__options.delayTouch,this.__options.delayTouch]),"string"==typeof this.__options.theme&&(this.__options.theme=[this.__options.theme]),null===this.__options.parent?this.__options.parent=a(h.window.document.body):"string"==typeof this.__options.parent&&(this.__options.parent=a(this.__options.parent)),"hover"==this.__options.trigger?(this.__options.triggerOpen={mouseenter:!0,touchstart:!0},this.__options.triggerClose={mouseleave:!0,originClick:!0,touchleave:!0}):"click"==this.__options.trigger&&(this.__options.triggerOpen={click:!0,tap:!0},this.__options.triggerClose={click:!0,tap:!0}),this._trigger("options"),this},__prepareGC:function(){var b=this;return b.__options.selfDestruction?b.__garbageCollector=setInterval(function(){var c=(new Date).getTime();b.__touchEvents=a.grep(b.__touchEvents,function(a,b){return c-a.time>6e4}),d(b._$origin)||b.close(function(){b.destroy()})},2e4):clearInterval(b.__garbageCollector),b},__prepareOrigin:function(){var a=this;if(a._$origin.off("."+a.__namespace+"-triggerOpen"),h.hasTouchCapability&&a._$origin.on("touchstart."+a.__namespace+"-triggerOpen touchend."+a.__namespace+"-triggerOpen touchcancel."+a.__namespace+"-triggerOpen",function(b){a._touchRecordEvent(b)}),a.__options.triggerOpen.click||a.__options.triggerOpen.tap&&h.hasTouchCapability){var b="";a.__options.triggerOpen.click&&(b+="click."+a.__namespace+"-triggerOpen "),a.__options.triggerOpen.tap&&h.hasTouchCapability&&(b+="touchend."+a.__namespace+"-triggerOpen"),a._$origin.on(b,function(b){a._touchIsMeaningfulEvent(b)&&a._open(b)})}if(a.__options.triggerOpen.mouseenter||a.__options.triggerOpen.touchstart&&h.hasTouchCapability){var b="";a.__options.triggerOpen.mouseenter&&(b+="mouseenter."+a.__namespace+"-triggerOpen "),a.__options.triggerOpen.touchstart&&h.hasTouchCapability&&(b+="touchstart."+a.__namespace+"-triggerOpen"),a._$origin.on(b,function(b){!a._touchIsTouchEvent(b)&&a._touchIsEmulatedEvent(b)||(a.__pointerIsOverOrigin=!0,a._openShortly(b))})}if(a.__options.triggerClose.mouseleave||a.__options.triggerClose.touchleave&&h.hasTouchCapability){var b="";a.__options.triggerClose.mouseleave&&(b+="mouseleave."+a.__namespace+"-triggerOpen "),a.__options.triggerClose.touchleave&&h.hasTouchCapability&&(b+="touchend."+a.__namespace+"-triggerOpen touchcancel."+a.__namespace+"-triggerOpen"),a._$origin.on(b,function(b){a._touchIsMeaningfulEvent(b)&&(a.__pointerIsOverOrigin=!1)})}return a},__prepareTooltip:function(){var b=this,c=b.__options.interactive?"auto":"";return b._$tooltip.attr("id",b.__namespace).css({"pointer-events":c,zIndex:b.__options.zIndex}),a.each(b.__previousThemes,function(a,c){b._$tooltip.removeClass(c)}),a.each(b.__options.theme,function(a,c){b._$tooltip.addClass(c)}),b.__previousThemes=a.merge([],b.__options.theme),b},__scrollHandler:function(b){var c=this;if(c.__options.triggerClose.scroll)c._close(b);else if(d(c._$origin)&&d(c._$tooltip)){var e=null;if(b.target===h.window.document)c.__Geometry.origin.fixedLineage||c.__options.repositionOnScroll&&c.reposition(b);else{e=c.__geometry();var f=!1;if("fixed"!=c._$origin.css("position")&&c.__$originParents.each(function(b,c){var d=a(c),g=d.css("overflow-x"),h=d.css("overflow-y");if("visible"!=g||"visible"!=h){var i=c.getBoundingClientRect();if("visible"!=g&&(e.origin.windowOffset.left<i.left||e.origin.windowOffset.right>i.right))return f=!0,!1;if("visible"!=h&&(e.origin.windowOffset.top<i.top||e.origin.windowOffset.bottom>i.bottom))return f=!0,!1}return"fixed"==d.css("position")?!1:void 0}),f)c._$tooltip.css("visibility","hidden");else if(c._$tooltip.css("visibility","visible"),c.__options.repositionOnScroll)c.reposition(b);else{var g=e.origin.offset.left-c.__Geometry.origin.offset.left,i=e.origin.offset.top-c.__Geometry.origin.offset.top;c._$tooltip.css({left:c.__lastPosition.coord.left+g,top:c.__lastPosition.coord.top+i})}}c._trigger({type:"scroll",event:b,geo:e})}return c},__stateSet:function(a){return this.__state=a,this._trigger({type:"state",state:a}),this},__timeoutsClear:function(){return clearTimeout(this.__timeouts.open),this.__timeouts.open=null,a.each(this.__timeouts.close,function(a,b){clearTimeout(b)}),this.__timeouts.close=[],this},__trackerStart:function(){var a=this,b=a._$tooltip.find(".tooltipster-content");return a.__options.trackTooltip&&(a.__contentBcr=b[0].getBoundingClientRect()),a.__tracker=setInterval(function(){if(d(a._$origin)&&d(a._$tooltip)){if(a.__options.trackOrigin){var e=a.__geometry(),f=!1;c(e.origin.size,a.__Geometry.origin.size)&&(a.__Geometry.origin.fixedLineage?c(e.origin.windowOffset,a.__Geometry.origin.windowOffset)&&(f=!0):c(e.origin.offset,a.__Geometry.origin.offset)&&(f=!0)),f||(a.__options.triggerClose.mouseleave?a._close():a.reposition())}if(a.__options.trackTooltip){var g=b[0].getBoundingClientRect();g.height===a.__contentBcr.height&&g.width===a.__contentBcr.width||(a.reposition(),a.__contentBcr=g)}}else a._close()},a.__options.trackerInterval),a},_close:function(b,c,d){var e=this,f=!0;if(e._trigger({type:"close",event:b,stop:function(){f=!1}}),f||d){c&&e.__callbacks.close.push(c),e.__callbacks.open=[],e.__timeoutsClear();var g=function(){a.each(e.__callbacks.close,function(a,c){c.call(e,e,{event:b,origin:e._$origin[0]})}),e.__callbacks.close=[]};if("closed"!=e.__state){var i=!0,j=new Date,k=j.getTime(),l=k+e.__options.animationDuration[1];if("disappearing"==e.__state&&l>e.__closingTime&&e.__options.animationDuration[1]>0&&(i=!1),i){e.__closingTime=l,"disappearing"!=e.__state&&e.__stateSet("disappearing");var m=function(){clearInterval(e.__tracker),e._trigger({type:"closing",event:b}),e._$tooltip.off("."+e.__namespace+"-triggerClose").removeClass("tooltipster-dying"),a(h.window).off("."+e.__namespace+"-triggerClose"),e.__$originParents.each(function(b,c){a(c).off("scroll."+e.__namespace+"-triggerClose")}),e.__$originParents=null,a(h.window.document.body).off("."+e.__namespace+"-triggerClose"),e._$origin.off("."+e.__namespace+"-triggerClose"),e._off("dismissable"),e.__stateSet("closed"),e._trigger({type:"after",event:b}),e.__options.functionAfter&&e.__options.functionAfter.call(e,e,{event:b,origin:e._$origin[0]}),g()};h.hasTransitions?(e._$tooltip.css({"-moz-animation-duration":e.__options.animationDuration[1]+"ms","-ms-animation-duration":e.__options.animationDuration[1]+"ms","-o-animation-duration":e.__options.animationDuration[1]+"ms","-webkit-animation-duration":e.__options.animationDuration[1]+"ms","animation-duration":e.__options.animationDuration[1]+"ms","transition-duration":e.__options.animationDuration[1]+"ms"}),e._$tooltip.clearQueue().removeClass("tooltipster-show").addClass("tooltipster-dying"),e.__options.animationDuration[1]>0&&e._$tooltip.delay(e.__options.animationDuration[1]),e._$tooltip.queue(m)):e._$tooltip.stop().fadeOut(e.__options.animationDuration[1],m)}}else g()}return e},_off:function(){return this.__$emitterPrivate.off.apply(this.__$emitterPrivate,Array.prototype.slice.apply(arguments)),this},_on:function(){return this.__$emitterPrivate.on.apply(this.__$emitterPrivate,Array.prototype.slice.apply(arguments)),this},_one:function(){return this.__$emitterPrivate.one.apply(this.__$emitterPrivate,Array.prototype.slice.apply(arguments)),this},_open:function(b,c){var e=this;if(!e.__destroying&&d(e._$origin)&&e.__enabled){var f=!0;if("closed"==e.__state&&(e._trigger({type:"before",event:b,stop:function(){f=!1}}),f&&e.__options.functionBefore&&(f=e.__options.functionBefore.call(e,e,{event:b,origin:e._$origin[0]}))),f!==!1&&null!==e.__Content){c&&e.__callbacks.open.push(c),e.__callbacks.close=[],e.__timeoutsClear();var g,i=function(){"stable"!=e.__state&&e.__stateSet("stable"),a.each(e.__callbacks.open,function(a,b){b.call(e,e,{origin:e._$origin[0],tooltip:e._$tooltip[0]})}),e.__callbacks.open=[]};if("closed"!==e.__state)g=0,"disappearing"===e.__state?(e.__stateSet("appearing"),h.hasTransitions?(e._$tooltip.clearQueue().removeClass("tooltipster-dying").addClass("tooltipster-show"),e.__options.animationDuration[0]>0&&e._$tooltip.delay(e.__options.animationDuration[0]),e._$tooltip.queue(i)):e._$tooltip.stop().fadeIn(i)):"stable"==e.__state&&i();else{if(e.__stateSet("appearing"),g=e.__options.animationDuration[0],e.__contentInsert(),e.reposition(b,!0),h.hasTransitions?(e._$tooltip.addClass("tooltipster-"+e.__options.animation).addClass("tooltipster-initial").css({"-moz-animation-duration":e.__options.animationDuration[0]+"ms","-ms-animation-duration":e.__options.animationDuration[0]+"ms","-o-animation-duration":e.__options.animationDuration[0]+"ms","-webkit-animation-duration":e.__options.animationDuration[0]+"ms","animation-duration":e.__options.animationDuration[0]+"ms","transition-duration":e.__options.animationDuration[0]+"ms"}),setTimeout(function(){"closed"!=e.__state&&(e._$tooltip.addClass("tooltipster-show").removeClass("tooltipster-initial"),e.__options.animationDuration[0]>0&&e._$tooltip.delay(e.__options.animationDuration[0]),e._$tooltip.queue(i))},0)):e._$tooltip.css("display","none").fadeIn(e.__options.animationDuration[0],i),e.__trackerStart(),a(h.window).on("resize."+e.__namespace+"-triggerClose",function(b){var c=a(document.activeElement);(c.is("input")||c.is("textarea"))&&a.contains(e._$tooltip[0],c[0])||e.reposition(b)}).on("scroll."+e.__namespace+"-triggerClose",function(a){e.__scrollHandler(a)}),e.__$originParents=e._$origin.parents(),e.__$originParents.each(function(b,c){a(c).on("scroll."+e.__namespace+"-triggerClose",function(a){e.__scrollHandler(a)})}),e.__options.triggerClose.mouseleave||e.__options.triggerClose.touchleave&&h.hasTouchCapability){e._on("dismissable",function(a){a.dismissable?a.delay?(m=setTimeout(function(){e._close(a.event)},a.delay),e.__timeouts.close.push(m)):e._close(a):clearTimeout(m)});var j=e._$origin,k="",l="",m=null;e.__options.interactive&&(j=j.add(e._$tooltip)),e.__options.triggerClose.mouseleave&&(k+="mouseenter."+e.__namespace+"-triggerClose ",l+="mouseleave."+e.__namespace+"-triggerClose "),e.__options.triggerClose.touchleave&&h.hasTouchCapability&&(k+="touchstart."+e.__namespace+"-triggerClose",l+="touchend."+e.__namespace+"-triggerClose touchcancel."+e.__namespace+"-triggerClose"),j.on(l,function(a){if(e._touchIsTouchEvent(a)||!e._touchIsEmulatedEvent(a)){var b="mouseleave"==a.type?e.__options.delay:e.__options.delayTouch;e._trigger({delay:b[1],dismissable:!0,event:a,type:"dismissable"})}}).on(k,function(a){!e._touchIsTouchEvent(a)&&e._touchIsEmulatedEvent(a)||e._trigger({dismissable:!1,event:a,type:"dismissable"})})}e.__options.triggerClose.originClick&&e._$origin.on("click."+e.__namespace+"-triggerClose",function(a){e._touchIsTouchEvent(a)||e._touchIsEmulatedEvent(a)||e._close(a)}),(e.__options.triggerClose.click||e.__options.triggerClose.tap&&h.hasTouchCapability)&&setTimeout(function(){if("closed"!=e.__state){var b="",c=a(h.window.document.body);e.__options.triggerClose.click&&(b+="click."+e.__namespace+"-triggerClose "),e.__options.triggerClose.tap&&h.hasTouchCapability&&(b+="touchend."+e.__namespace+"-triggerClose"),c.on(b,function(b){e._touchIsMeaningfulEvent(b)&&(e._touchRecordEvent(b),e.__options.interactive&&a.contains(e._$tooltip[0],b.target)||e._close(b))}),e.__options.triggerClose.tap&&h.hasTouchCapability&&c.on("touchstart."+e.__namespace+"-triggerClose",function(a){e._touchRecordEvent(a)})}},0),e._trigger("ready"),e.__options.functionReady&&e.__options.functionReady.call(e,e,{origin:e._$origin[0],tooltip:e._$tooltip[0]})}if(e.__options.timer>0){var m=setTimeout(function(){e._close()},e.__options.timer+g);e.__timeouts.close.push(m)}}}return e},_openShortly:function(a){var b=this,c=!0;if("stable"!=b.__state&&"appearing"!=b.__state&&!b.__timeouts.open&&(b._trigger({type:"start",event:a,stop:function(){c=!1}}),c)){var d=0==a.type.indexOf("touch")?b.__options.delayTouch:b.__options.delay;d[0]?b.__timeouts.open=setTimeout(function(){b.__timeouts.open=null,b.__pointerIsOverOrigin&&b._touchIsMeaningfulEvent(a)?(b._trigger("startend"),b._open(a)):b._trigger("startcancel")},d[0]):(b._trigger("startend"),b._open(a))}return b},_optionsExtract:function(b,c){var d=this,e=a.extend(!0,{},c),f=d.__options[b];return f||(f={},a.each(c,function(a,b){var c=d.__options[a];void 0!==c&&(f[a]=c)})),a.each(e,function(b,c){void 0!==f[b]&&("object"!=typeof c||c instanceof Array||null==c||"object"!=typeof f[b]||f[b]instanceof Array||null==f[b]?e[b]=f[b]:a.extend(e[b],f[b]))}),e},_plug:function(b){var c=a.tooltipster._plugin(b);if(!c)throw new Error('The "'+b+'" plugin is not defined');return c.instance&&a.tooltipster.__bridge(c.instance,this,c.name),this},_touchIsEmulatedEvent:function(a){for(var b=!1,c=(new Date).getTime(),d=this.__touchEvents.length-1;d>=0;d--){var e=this.__touchEvents[d];if(!(c-e.time<500))break;e.target===a.target&&(b=!0)}return b},_touchIsMeaningfulEvent:function(a){return this._touchIsTouchEvent(a)&&!this._touchSwiped(a.target)||!this._touchIsTouchEvent(a)&&!this._touchIsEmulatedEvent(a)},_touchIsTouchEvent:function(a){return 0==a.type.indexOf("touch")},_touchRecordEvent:function(a){return this._touchIsTouchEvent(a)&&(a.time=(new Date).getTime(),this.__touchEvents.push(a)),this},_touchSwiped:function(a){for(var b=!1,c=this.__touchEvents.length-1;c>=0;c--){var d=this.__touchEvents[c];if("touchmove"==d.type){b=!0;break}if("touchstart"==d.type&&a===d.target)break}return b},_trigger:function(){var b=Array.prototype.slice.apply(arguments);return"string"==typeof b[0]&&(b[0]={type:b[0]}),b[0].instance=this,b[0].origin=this._$origin?this._$origin[0]:null,b[0].tooltip=this._$tooltip?this._$tooltip[0]:null,this.__$emitterPrivate.trigger.apply(this.__$emitterPrivate,b),a.tooltipster._trigger.apply(a.tooltipster,b),this.__$emitterPublic.trigger.apply(this.__$emitterPublic,b),this},_unplug:function(b){var c=this;if(c[b]){var d=a.tooltipster._plugin(b);d.instance&&a.each(d.instance,function(a,d){c[a]&&c[a].bridged===c[b]&&delete c[a]}),c[b].__destroy&&c[b].__destroy(),delete c[b]}return c},close:function(a){return this.__destroyed?this.__destroyError():this._close(null,a),this},content:function(a){var b=this;if(void 0===a)return b.__Content;if(b.__destroyed)b.__destroyError();else if(b.__contentSet(a),null!==b.__Content){if("closed"!==b.__state&&(b.__contentInsert(),b.reposition(),b.__options.updateAnimation))if(h.hasTransitions){var c=b.__options.updateAnimation;b._$tooltip.addClass("tooltipster-update-"+c),setTimeout(function(){"closed"!=b.__state&&b._$tooltip.removeClass("tooltipster-update-"+c)},1e3)}else b._$tooltip.fadeTo(200,.5,function(){"closed"!=b.__state&&b._$tooltip.fadeTo(200,1)})}else b._close();return b},destroy:function(){var b=this;if(b.__destroyed)b.__destroyError();else{"closed"!=b.__state?b.option("animationDuration",0)._close(null,null,!0):b.__timeoutsClear(),b._trigger("destroy"),b.__destroyed=!0,b._$origin.removeData(b.__namespace).off("."+b.__namespace+"-triggerOpen"),a(h.window.document.body).off("."+b.__namespace+"-triggerOpen");var c=b._$origin.data("tooltipster-ns");if(c)if(1===c.length){var d=null;"previous"==b.__options.restoration?d=b._$origin.data("tooltipster-initialTitle"):"current"==b.__options.restoration&&(d="string"==typeof b.__Content?b.__Content:a("<div></div>").append(b.__Content).html()),d&&b._$origin.attr("title",d),b._$origin.removeClass("tooltipstered"),b._$origin.removeData("tooltipster-ns").removeData("tooltipster-initialTitle")}else c=a.grep(c,function(a,c){return a!==b.__namespace}),b._$origin.data("tooltipster-ns",c);b._trigger("destroyed"),b._off(),b.off(),b.__Content=null,b.__$emitterPrivate=null,b.__$emitterPublic=null,b.__options.parent=null,b._$origin=null,b._$tooltip=null,a.tooltipster.__instancesLatestArr=a.grep(a.tooltipster.__instancesLatestArr,function(a,c){return b!==a}),clearInterval(b.__garbageCollector)}return b},disable:function(){return this.__destroyed?(this.__destroyError(),this):(this._close(),this.__enabled=!1,this)},elementOrigin:function(){return this.__destroyed?void this.__destroyError():this._$origin[0]},elementTooltip:function(){return this._$tooltip?this._$tooltip[0]:null},enable:function(){return this.__enabled=!0,this},hide:function(a){return this.close(a)},instance:function(){return this},off:function(){return this.__destroyed||this.__$emitterPublic.off.apply(this.__$emitterPublic,Array.prototype.slice.apply(arguments)),this},on:function(){return this.__destroyed?this.__destroyError():this.__$emitterPublic.on.apply(this.__$emitterPublic,Array.prototype.slice.apply(arguments)),this},one:function(){return this.__destroyed?this.__destroyError():this.__$emitterPublic.one.apply(this.__$emitterPublic,Array.prototype.slice.apply(arguments)),this},open:function(a){return this.__destroyed?this.__destroyError():this._open(null,a),this},option:function(b,c){return void 0===c?this.__options[b]:(this.__destroyed?this.__destroyError():(this.__options[b]=c,this.__optionsFormat(),a.inArray(b,["trigger","triggerClose","triggerOpen"])>=0&&this.__prepareOrigin(),"selfDestruction"===b&&this.__prepareGC()),this)},reposition:function(a,b){var c=this;return c.__destroyed?c.__destroyError():"closed"!=c.__state&&d(c._$origin)&&(b||d(c._$tooltip))&&(b||c._$tooltip.detach(),c.__Geometry=c.__geometry(),c._trigger({type:"reposition",event:a,helper:{geo:c.__Geometry}})),c},show:function(a){return this.open(a)},status:function(){return{destroyed:this.__destroyed,enabled:this.__enabled,open:"closed"!==this.__state,state:this.__state}},triggerHandler:function(){return this.__destroyed?this.__destroyError():this.__$emitterPublic.triggerHandler.apply(this.__$emitterPublic,Array.prototype.slice.apply(arguments)),this}},a.fn.tooltipster=function(){var b=Array.prototype.slice.apply(arguments),c="You are using a single HTML element as content for several tooltips. You probably want to set the contentCloning option to TRUE.";if(0===this.length)return this;if("string"==typeof b[0]){var d="#*$~&";return this.each(function(){var e=a(this).data("tooltipster-ns"),f=e?a(this).data(e[0]):null;if(!f)throw new Error("You called Tooltipster's \""+b[0]+'" method on an uninitialized element');if("function"!=typeof f[b[0]])throw new Error('Unknown method "'+b[0]+'"');this.length>1&&"content"==b[0]&&(b[1]instanceof a||"object"==typeof b[1]&&null!=b[1]&&b[1].tagName)&&!f.__options.contentCloning&&f.__options.debug&&console.log(c);var g=f[b[0]](b[1],b[2]);return g!==f||"instance"===b[0]?(d=g,!1):void 0}),"#*$~&"!==d?d:this}a.tooltipster.__instancesLatestArr=[];var e=b[0]&&void 0!==b[0].multiple,g=e&&b[0].multiple||!e&&f.multiple,h=b[0]&&void 0!==b[0].content,i=h&&b[0].content||!h&&f.content,j=b[0]&&void 0!==b[0].contentCloning,k=j&&b[0].contentCloning||!j&&f.contentCloning,l=b[0]&&void 0!==b[0].debug,m=l&&b[0].debug||!l&&f.debug;return this.length>1&&(i instanceof a||"object"==typeof i&&null!=i&&i.tagName)&&!k&&m&&console.log(c),this.each(function(){var c=!1,d=a(this),e=d.data("tooltipster-ns"),f=null;e?g?c=!0:m&&(console.log("Tooltipster: one or more tooltips are already attached to the element below. Ignoring."),console.log(this)):c=!0,c&&(f=new a.Tooltipster(this,b[0]),e||(e=[]),e.push(f.__namespace),d.data("tooltipster-ns",e),d.data(f.__namespace,f),f.__options.functionInit&&f.__options.functionInit.call(f,f,{origin:this}),f._trigger("init")),a.tooltipster.__instancesLatestArr.push(f)}),this},b.prototype={__init:function(b){this.__$tooltip=b,this.__$tooltip.css({left:0,overflow:"hidden",position:"absolute",top:0}).find(".tooltipster-content").css("overflow","auto"),this.$container=a('<div class="tooltipster-ruler"></div>').append(this.__$tooltip).appendTo(h.window.document.body)},__forceRedraw:function(){var a=this.__$tooltip.parent();this.__$tooltip.detach(),this.__$tooltip.appendTo(a)},constrain:function(a,b){return this.constraints={width:a,height:b},this.__$tooltip.css({display:"block",height:"",overflow:"auto",width:a}),this},destroy:function(){this.__$tooltip.detach().find(".tooltipster-content").css({display:"",overflow:""}),this.$container.remove()},free:function(){return this.constraints=null,this.__$tooltip.css({display:"",height:"",overflow:"visible",width:""}),this},measure:function(){this.__forceRedraw();var a=this.__$tooltip[0].getBoundingClientRect(),b={size:{height:a.height||a.bottom-a.top,width:a.width||a.right-a.left}};if(this.constraints){var c=this.__$tooltip.find(".tooltipster-content"),d=this.__$tooltip.outerHeight(),e=c[0].getBoundingClientRect(),f={height:d<=this.constraints.height,width:a.width<=this.constraints.width&&e.width>=c[0].scrollWidth-1};b.fits=f.height&&f.width}return h.IE&&h.IE<=11&&b.size.width!==h.window.document.documentElement.clientWidth&&(b.size.width=Math.ceil(b.size.width)+1),b}};var j=navigator.userAgent.toLowerCase();-1!=j.indexOf("msie")?h.IE=parseInt(j.split("msie")[1]):-1!==j.toLowerCase().indexOf("trident")&&-1!==j.indexOf(" rv:11")?h.IE=11:-1!=j.toLowerCase().indexOf("edge/")&&(h.IE=parseInt(j.toLowerCase().split("edge/")[1]));var k="tooltipster.sideTip";return a.tooltipster._plugin({name:k,instance:{__defaults:function(){return{arrow:!0,distance:6,functionPosition:null,maxWidth:null,minIntersection:16,minWidth:0,position:null,side:"top",viewportAware:!0}},__init:function(a){var b=this;b.__instance=a,b.__namespace="tooltipster-sideTip-"+Math.round(1e6*Math.random()),b.__previousState="closed",b.__options,b.__optionsFormat(),b.__instance._on("state."+b.__namespace,function(a){"closed"==a.state?b.__close():"appearing"==a.state&&"closed"==b.__previousState&&b.__create(),b.__previousState=a.state}),b.__instance._on("options."+b.__namespace,function(){b.__optionsFormat()}),b.__instance._on("reposition."+b.__namespace,function(a){b.__reposition(a.event,a.helper)})},__close:function(){this.__instance.content()instanceof a&&this.__instance.content().detach(),this.__instance._$tooltip.remove(),this.__instance._$tooltip=null},__create:function(){var b=a('<div class="tooltipster-base tooltipster-sidetip"><div class="tooltipster-box"><div class="tooltipster-content"></div></div><div class="tooltipster-arrow"><div class="tooltipster-arrow-uncropped"><div class="tooltipster-arrow-border"></div><div class="tooltipster-arrow-background"></div></div></div></div>');this.__options.arrow||b.find(".tooltipster-box").css("margin",0).end().find(".tooltipster-arrow").hide(),this.__options.minWidth&&b.css("min-width",this.__options.minWidth+"px"),this.__options.maxWidth&&b.css("max-width",this.__options.maxWidth+"px"),
this.__instance._$tooltip=b,this.__instance._trigger("created")},__destroy:function(){this.__instance._off("."+self.__namespace)},__optionsFormat:function(){var b=this;if(b.__options=b.__instance._optionsExtract(k,b.__defaults()),b.__options.position&&(b.__options.side=b.__options.position),"object"!=typeof b.__options.distance&&(b.__options.distance=[b.__options.distance]),b.__options.distance.length<4&&(void 0===b.__options.distance[1]&&(b.__options.distance[1]=b.__options.distance[0]),void 0===b.__options.distance[2]&&(b.__options.distance[2]=b.__options.distance[0]),void 0===b.__options.distance[3]&&(b.__options.distance[3]=b.__options.distance[1])),b.__options.distance={top:b.__options.distance[0],right:b.__options.distance[1],bottom:b.__options.distance[2],left:b.__options.distance[3]},"string"==typeof b.__options.side){var c={top:"bottom",right:"left",bottom:"top",left:"right"};b.__options.side=[b.__options.side,c[b.__options.side]],"left"==b.__options.side[0]||"right"==b.__options.side[0]?b.__options.side.push("top","bottom"):b.__options.side.push("right","left")}6===a.tooltipster._env.IE&&b.__options.arrow!==!0&&(b.__options.arrow=!1)},__reposition:function(b,c){var d,e=this,f=e.__targetFind(c),g=[];e.__instance._$tooltip.detach();var h=e.__instance._$tooltip.clone(),i=a.tooltipster._getRuler(h),j=!1,k=e.__instance.option("animation");switch(k&&h.removeClass("tooltipster-"+k),a.each(["window","document"],function(d,k){var l=null;if(e.__instance._trigger({container:k,helper:c,satisfied:j,takeTest:function(a){l=a},results:g,type:"positionTest"}),1==l||0!=l&&0==j&&("window"!=k||e.__options.viewportAware))for(var d=0;d<e.__options.side.length;d++){var m={horizontal:0,vertical:0},n=e.__options.side[d];"top"==n||"bottom"==n?m.vertical=e.__options.distance[n]:m.horizontal=e.__options.distance[n],e.__sideChange(h,n),a.each(["natural","constrained"],function(a,d){if(l=null,e.__instance._trigger({container:k,event:b,helper:c,mode:d,results:g,satisfied:j,side:n,takeTest:function(a){l=a},type:"positionTest"}),1==l||0!=l&&0==j){var h={container:k,distance:m,fits:null,mode:d,outerSize:null,side:n,size:null,target:f[n],whole:null},o="natural"==d?i.free():i.constrain(c.geo.available[k][n].width-m.horizontal,c.geo.available[k][n].height-m.vertical),p=o.measure();if(h.size=p.size,h.outerSize={height:p.size.height+m.vertical,width:p.size.width+m.horizontal},"natural"==d?c.geo.available[k][n].width>=h.outerSize.width&&c.geo.available[k][n].height>=h.outerSize.height?h.fits=!0:h.fits=!1:h.fits=p.fits,"window"==k&&(h.fits?"top"==n||"bottom"==n?h.whole=c.geo.origin.windowOffset.right>=e.__options.minIntersection&&c.geo.window.size.width-c.geo.origin.windowOffset.left>=e.__options.minIntersection:h.whole=c.geo.origin.windowOffset.bottom>=e.__options.minIntersection&&c.geo.window.size.height-c.geo.origin.windowOffset.top>=e.__options.minIntersection:h.whole=!1),g.push(h),h.whole)j=!0;else if("natural"==h.mode&&(h.fits||h.size.width<=c.geo.available[k][n].width))return!1}})}}),e.__instance._trigger({edit:function(a){g=a},event:b,helper:c,results:g,type:"positionTested"}),g.sort(function(a,b){if(a.whole&&!b.whole)return-1;if(!a.whole&&b.whole)return 1;if(a.whole&&b.whole){var c=e.__options.side.indexOf(a.side),d=e.__options.side.indexOf(b.side);return d>c?-1:c>d?1:"natural"==a.mode?-1:1}if(a.fits&&!b.fits)return-1;if(!a.fits&&b.fits)return 1;if(a.fits&&b.fits){var c=e.__options.side.indexOf(a.side),d=e.__options.side.indexOf(b.side);return d>c?-1:c>d?1:"natural"==a.mode?-1:1}return"document"==a.container&&"bottom"==a.side&&"natural"==a.mode?-1:1}),d=g[0],d.coord={},d.side){case"left":case"right":d.coord.top=Math.floor(d.target-d.size.height/2);break;case"bottom":case"top":d.coord.left=Math.floor(d.target-d.size.width/2)}switch(d.side){case"left":d.coord.left=c.geo.origin.windowOffset.left-d.outerSize.width;break;case"right":d.coord.left=c.geo.origin.windowOffset.right+d.distance.horizontal;break;case"top":d.coord.top=c.geo.origin.windowOffset.top-d.outerSize.height;break;case"bottom":d.coord.top=c.geo.origin.windowOffset.bottom+d.distance.vertical}"window"==d.container?"top"==d.side||"bottom"==d.side?d.coord.left<0?c.geo.origin.windowOffset.right-this.__options.minIntersection>=0?d.coord.left=0:d.coord.left=c.geo.origin.windowOffset.right-this.__options.minIntersection-1:d.coord.left>c.geo.window.size.width-d.size.width&&(c.geo.origin.windowOffset.left+this.__options.minIntersection<=c.geo.window.size.width?d.coord.left=c.geo.window.size.width-d.size.width:d.coord.left=c.geo.origin.windowOffset.left+this.__options.minIntersection+1-d.size.width):d.coord.top<0?c.geo.origin.windowOffset.bottom-this.__options.minIntersection>=0?d.coord.top=0:d.coord.top=c.geo.origin.windowOffset.bottom-this.__options.minIntersection-1:d.coord.top>c.geo.window.size.height-d.size.height&&(c.geo.origin.windowOffset.top+this.__options.minIntersection<=c.geo.window.size.height?d.coord.top=c.geo.window.size.height-d.size.height:d.coord.top=c.geo.origin.windowOffset.top+this.__options.minIntersection+1-d.size.height):(d.coord.left>c.geo.window.size.width-d.size.width&&(d.coord.left=c.geo.window.size.width-d.size.width),d.coord.left<0&&(d.coord.left=0)),e.__sideChange(h,d.side),c.tooltipClone=h[0],c.tooltipParent=e.__instance.option("parent").parent[0],c.mode=d.mode,c.whole=d.whole,c.origin=e.__instance._$origin[0],c.tooltip=e.__instance._$tooltip[0],delete d.container,delete d.fits,delete d.mode,delete d.outerSize,delete d.whole,d.distance=d.distance.horizontal||d.distance.vertical;var l=a.extend(!0,{},d);if(e.__instance._trigger({edit:function(a){d=a},event:b,helper:c,position:l,type:"position"}),e.__options.functionPosition){var m=e.__options.functionPosition.call(e,e.__instance,c,l);m&&(d=m)}i.destroy();var n,o;"top"==d.side||"bottom"==d.side?(n={prop:"left",val:d.target-d.coord.left},o=d.size.width-this.__options.minIntersection):(n={prop:"top",val:d.target-d.coord.top},o=d.size.height-this.__options.minIntersection),n.val<this.__options.minIntersection?n.val=this.__options.minIntersection:n.val>o&&(n.val=o);var p;p=c.geo.origin.fixedLineage?c.geo.origin.windowOffset:{left:c.geo.origin.windowOffset.left+c.geo.window.scroll.left,top:c.geo.origin.windowOffset.top+c.geo.window.scroll.top},d.coord={left:p.left+(d.coord.left-c.geo.origin.windowOffset.left),top:p.top+(d.coord.top-c.geo.origin.windowOffset.top)},e.__sideChange(e.__instance._$tooltip,d.side),c.geo.origin.fixedLineage?e.__instance._$tooltip.css("position","fixed"):e.__instance._$tooltip.css("position",""),e.__instance._$tooltip.css({left:d.coord.left,top:d.coord.top,height:d.size.height,width:d.size.width}).find(".tooltipster-arrow").css({left:"",top:""}).css(n.prop,n.val),e.__instance._$tooltip.appendTo(e.__instance.option("parent")),e.__instance._trigger({type:"repositioned",event:b,position:d})},__sideChange:function(a,b){a.removeClass("tooltipster-bottom").removeClass("tooltipster-left").removeClass("tooltipster-right").removeClass("tooltipster-top").addClass("tooltipster-"+b)},__targetFind:function(a){var b={},c=this.__instance._$origin[0].getClientRects();if(c.length>1){var d=this.__instance._$origin.css("opacity");1==d&&(this.__instance._$origin.css("opacity",.99),c=this.__instance._$origin[0].getClientRects(),this.__instance._$origin.css("opacity",1))}if(c.length<2)b.top=Math.floor(a.geo.origin.windowOffset.left+a.geo.origin.size.width/2),b.bottom=b.top,b.left=Math.floor(a.geo.origin.windowOffset.top+a.geo.origin.size.height/2),b.right=b.left;else{var e=c[0];b.top=Math.floor(e.left+(e.right-e.left)/2),e=c.length>2?c[Math.ceil(c.length/2)-1]:c[0],b.right=Math.floor(e.top+(e.bottom-e.top)/2),e=c[c.length-1],b.bottom=Math.floor(e.left+(e.right-e.left)/2),e=c.length>2?c[Math.ceil((c.length+1)/2)-1]:c[c.length-1],b.left=Math.floor(e.top+(e.bottom-e.top)/2)}return b}}}),a});
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.datepicker=t():e.datepicker=t()}(window,(function(){return function(e){var t={};function n(a){if(t[a])return t[a].exports;var r=t[a]={i:a,l:!1,exports:{}};return e[a].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,a){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:a})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var a=Object.create(null);if(n.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(a,r,function(t){return e[t]}.bind(null,r));return a},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=0)}([function(e,t,n){"use strict";n.r(t);var a=[],r=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],i=["January","February","March","April","May","June","July","August","September","October","November","December"],o={t:"top",r:"right",b:"bottom",l:"left",c:"centered"};function s(){}var l=["click","focusin","keydown","input"];function d(e){l.forEach((function(t){e.addEventListener(t,e===document?L:Y)}))}function c(e){return Array.isArray(e)?e.map(c):"[object Object]"===x(e)?Object.keys(e).reduce((function(t,n){return t[n]=c(e[n]),t}),{}):e}function u(e,t){var n=e.calendar.querySelector(".qs-overlay"),a=n&&!n.classList.contains("qs-hidden");t=t||new Date(e.currentYear,e.currentMonth),e.calendar.innerHTML=[h(t,e,a),f(t,e,a),v(e,a)].join(""),a&&window.requestAnimationFrame((function(){M(!0,e)}))}function h(e,t,n){return['<div class="qs-controls'+(n?" qs-blur":"")+'">','<div class="qs-arrow qs-left"></div>','<div class="qs-month-year">','<span class="qs-month">'+t.months[e.getMonth()]+"</span>",'<span class="qs-year">'+e.getFullYear()+"</span>","</div>",'<div class="qs-arrow qs-right"></div>',"</div>"].join("")}function f(e,t,n){var a=t.currentMonth,r=t.currentYear,i=t.dateSelected,o=t.maxDate,s=t.minDate,l=t.showAllDates,d=t.days,c=t.disabledDates,u=t.startDay,h=t.weekendIndices,f=t.events,v=t.getRange?t.getRange():{},m=+v.start,y=+v.end,p=g(new Date(e).setDate(1)),w=p.getDay()-u,D=w<0?7:0;p.setMonth(p.getMonth()+1),p.setDate(0);var b=p.getDate(),q=[],S=D+7*((w+b)/7|0);S+=(w+b)%7?7:0;for(var M=1;M<=S;M++){var E=(M-1)%7,x=d[E],C=M-(w>=0?w:7+w),L=new Date(r,a,C),Y=f[+L],j=C<1||C>b,P=j?C<1?-1:1:0,k=j&&!l,O=k?"":L.getDate(),N=+L==+i,_=E===h[0]||E===h[1],I=m!==y,A="qs-square "+x;Y&&!k&&(A+=" qs-event"),j&&(A+=" qs-outside-current-month"),!l&&j||(A+=" qs-num"),N&&(A+=" qs-active"),(c[+L]||t.disabler(L)||_&&t.noWeekends||s&&+L<+s||o&&+L>+o)&&!k&&(A+=" qs-disabled"),+g(new Date)==+L&&(A+=" qs-current"),+L===m&&y&&I&&(A+=" qs-range-start"),+L>m&&+L<y&&(A+=" qs-range-middle"),+L===y&&m&&I&&(A+=" qs-range-end"),k&&(A+=" qs-empty",O=""),q.push('<div class="'+A+'" data-direction="'+P+'">'+O+"</div>")}var R=d.map((function(e){return'<div class="qs-square qs-day">'+e+"</div>"})).concat(q);return R.unshift('<div class="qs-squares'+(n?" qs-blur":"")+'">'),R.push("</div>"),R.join("")}function v(e,t){var n=e.overlayPlaceholder,a=e.overlayButton;return['<div class="qs-overlay'+(t?"":" qs-hidden")+'">',"<div>",'<input class="qs-overlay-year" placeholder="'+n+'" inputmode="numeric" />','<div class="qs-close">&#10005;</div>',"</div>",'<div class="qs-overlay-month-container">'+e.overlayMonths.map((function(e,t){return'<div class="qs-overlay-month" data-month-num="'+t+'">'+e+"</div>"})).join("")+"</div>",'<div class="qs-submit qs-disabled">'+a+"</div>","</div>"].join("")}function m(e,t,n){var a=t.el,r=t.calendar.querySelector(".qs-active"),i=e.textContent,o=t.sibling;(a.disabled||a.readOnly)&&t.respectDisabledReadOnly||(t.dateSelected=n?void 0:new Date(t.currentYear,t.currentMonth,i),r&&r.classList.remove("qs-active"),n||e.classList.add("qs-active"),p(a,t,n),n||q(t),o&&(y({instance:t,deselect:n}),t.first&&!o.dateSelected&&(o.currentYear=t.currentYear,o.currentMonth=t.currentMonth,o.currentMonthName=t.currentMonthName),u(t),u(o)),t.onSelect(t,n?void 0:new Date(t.dateSelected)))}function y(e){var t=e.instance.first?e.instance:e.instance.sibling,n=t.sibling;t===e.instance?e.deselect?(t.minDate=t.originalMinDate,n.minDate=n.originalMinDate):n.minDate=t.dateSelected:e.deselect?(n.maxDate=n.originalMaxDate,t.maxDate=t.originalMaxDate):t.maxDate=n.dateSelected}function p(e,t,n){if(!t.nonInput)return n?e.value="":t.formatter!==s?t.formatter(e,t.dateSelected,t):void(e.value=t.dateSelected.toDateString())}function w(e,t,n,a){n||a?(n&&(t.currentYear=+n),a&&(t.currentMonth=+a)):(t.currentMonth+=e.contains("qs-right")?1:-1,12===t.currentMonth?(t.currentMonth=0,t.currentYear++):-1===t.currentMonth&&(t.currentMonth=11,t.currentYear--)),t.currentMonthName=t.months[t.currentMonth],u(t),t.onMonthChange(t)}function D(e){if(!e.noPosition){var t=e.position.top,n=e.position.right;if(e.position.centered)return e.calendarContainer.classList.add("qs-centered");var a=e.positionedEl.getBoundingClientRect(),r=e.el.getBoundingClientRect(),i=e.calendarContainer.getBoundingClientRect(),o=r.top-a.top+(t?-1*i.height:r.height)+"px",s=r.left-a.left+(n?r.width-i.width:0)+"px";e.calendarContainer.style.setProperty("top",o),e.calendarContainer.style.setProperty("left",s)}}function b(e){return"[object Date]"===x(e)&&"Invalid Date"!==e.toString()}function g(e){if(b(e)||"number"==typeof e&&!isNaN(e)){var t=new Date(+e);return new Date(t.getFullYear(),t.getMonth(),t.getDate())}}function q(e){e.disabled||!e.calendarContainer.classList.contains("qs-hidden")&&!e.alwaysShow&&("overlay"!==e.defaultView&&M(!0,e),e.calendarContainer.classList.add("qs-hidden"),e.onHide(e))}function S(e){e.disabled||(e.calendarContainer.classList.remove("qs-hidden"),"overlay"===e.defaultView&&M(!1,e),D(e),e.onShow(e))}function M(e,t){var n=t.calendar,a=n.querySelector(".qs-overlay"),r=a.querySelector(".qs-overlay-year"),i=n.querySelector(".qs-controls"),o=n.querySelector(".qs-squares");e?(a.classList.add("qs-hidden"),i.classList.remove("qs-blur"),o.classList.remove("qs-blur"),r.value=""):(a.classList.remove("qs-hidden"),i.classList.add("qs-blur"),o.classList.add("qs-blur"),r.focus())}function E(e,t,n,a){var r=isNaN(+(new Date).setFullYear(t.value||void 0)),i=r?null:t.value;if(13===e.which||13===e.keyCode||"click"===e.type)a?w(null,n,i,a):r||t.classList.contains("qs-disabled")||w(null,n,i);else if(n.calendar.contains(t)){n.calendar.querySelector(".qs-submit").classList[r?"add":"remove"]("qs-disabled")}}function x(e){return{}.toString.call(e)}function C(e){a.forEach((function(t){t!==e&&q(t)}))}function L(e){if(!e.__qs_shadow_dom){var t=e.which||e.keyCode,n=e.type,r=e.target,o=r.classList,s=a.filter((function(e){return e.calendar.contains(r)||e.el===r}))[0],l=s&&s.calendar.contains(r);if(!(s&&s.isMobile&&s.disableMobile))if("click"===n){if(!s)return a.forEach(q);if(s.disabled)return;var d=s.calendar,c=s.calendarContainer,h=s.disableYearOverlay,f=s.nonInput,v=d.querySelector(".qs-overlay-year"),y=!!d.querySelector(".qs-hidden"),p=d.querySelector(".qs-month-year").contains(r),D=r.dataset.monthNum;if(s.noPosition&&!l)(c.classList.contains("qs-hidden")?S:q)(s);else if(o.contains("qs-arrow"))w(o,s);else if(p||o.contains("qs-close"))h||M(!y,s);else if(D)E(e,v,s,D);else{if(o.contains("qs-disabled"))return;if(o.contains("qs-num")){var b=r.textContent,g=+r.dataset.direction,x=new Date(s.currentYear,s.currentMonth+g,b);if(g){s.currentYear=x.getFullYear(),s.currentMonth=x.getMonth(),s.currentMonthName=i[s.currentMonth],u(s);for(var L,Y=s.calendar.querySelectorAll('[data-direction="0"]'),j=0;!L;){var P=Y[j];P.textContent===b&&(L=P),j++}r=L}return void(+x==+s.dateSelected?m(r,s,!0):r.classList.contains("qs-disabled")||m(r,s))}o.contains("qs-submit")?E(e,v,s):f&&r===s.el&&(S(s),C(s))}}else if("focusin"===n&&s)S(s),C(s);else if("keydown"===n&&9===t&&s)q(s);else if("keydown"===n&&s&&!s.disabled){var k=!s.calendar.querySelector(".qs-overlay").classList.contains("qs-hidden");13===t&&k&&l?E(e,r,s):27===t&&k&&l&&M(!0,s)}else if("input"===n){if(!s||!s.calendar.contains(r))return;var O=s.calendar.querySelector(".qs-submit"),N=r.value.split("").reduce((function(e,t){return e||"0"!==t?e+(t.match(/[0-9]/)?t:""):""}),"").slice(0,4);r.value=N,O.classList[4===N.length?"remove":"add"]("qs-disabled")}}}function Y(e){L(e),e.__qs_shadow_dom=!0}function j(e,t){l.forEach((function(n){e.removeEventListener(n,t)}))}function P(){S(this)}function k(){q(this)}function O(e,t){var n=g(e),a=this.currentYear,r=this.currentMonth,i=this.sibling;if(null==e)return this.dateSelected=void 0,p(this.el,this,!0),i&&(y({instance:this,deselect:!0}),u(i)),u(this),this;if(!b(e))throw new Error("`setDate` needs a JavaScript Date object.");if(this.disabledDates[+n]||n<this.minDate||n>this.maxDate)throw new Error("You can't manually set a date that's disabled.");this.dateSelected=n,t&&(this.currentYear=n.getFullYear(),this.currentMonth=n.getMonth(),this.currentMonthName=this.months[n.getMonth()]),p(this.el,this),i&&(y({instance:this}),u(i));var o=a===n.getFullYear()&&r===n.getMonth();return o||t?u(this,n):o||u(this,new Date(a,r,1)),this}function N(e){return I(this,e,!0)}function _(e){return I(this,e)}function I(e,t,n){var a=e.dateSelected,r=e.first,i=e.sibling,o=e.minDate,s=e.maxDate,l=g(t),d=n?"Min":"Max";function c(){return"original"+d+"Date"}function h(){return d.toLowerCase()+"Date"}function f(){return"set"+d}function v(){throw new Error("Out-of-range date passed to "+f())}if(null==t)e[c()]=void 0,i?(i[c()]=void 0,n?(r&&!a||!r&&!i.dateSelected)&&(e.minDate=void 0,i.minDate=void 0):(r&&!i.dateSelected||!r&&!a)&&(e.maxDate=void 0,i.maxDate=void 0)):e[h()]=void 0;else{if(!b(t))throw new Error("Invalid date passed to "+f());i?((r&&n&&l>(a||s)||r&&!n&&l<(i.dateSelected||o)||!r&&n&&l>(i.dateSelected||s)||!r&&!n&&l<(a||o))&&v(),e[c()]=l,i[c()]=l,(n&&(r&&!a||!r&&!i.dateSelected)||!n&&(r&&!i.dateSelected||!r&&!a))&&(e[h()]=l,i[h()]=l)):((n&&l>(a||s)||!n&&l<(a||o))&&v(),e[h()]=l)}return i&&u(i),u(e),e}function A(){var e=this.first?this:this.sibling,t=e.sibling;return{start:e.dateSelected,end:t.dateSelected}}function R(){var e=this.shadowDom,t=this.positionedEl,n=this.calendarContainer,r=this.sibling,i=this;this.inlinePosition&&(a.some((function(e){return e!==i&&e.positionedEl===t}))||t.style.setProperty("position",null));n.remove(),a=a.filter((function(e){return e!==i})),r&&delete r.sibling,a.length||j(document,L);var o=a.some((function(t){return t.shadowDom===e}));for(var s in e&&!o&&j(e,Y),this)delete this[s];a.length||l.forEach((function(e){document.removeEventListener(e,L)}))}function F(e,t){var n=new Date(e);if(!b(n))throw new Error("Invalid date passed to `navigate`");this.currentYear=n.getFullYear(),this.currentMonth=n.getMonth(),u(this),t&&this.onMonthChange(this)}function B(){var e=!this.calendarContainer.classList.contains("qs-hidden"),t=!this.calendarContainer.querySelector(".qs-overlay").classList.contains("qs-hidden");e&&M(t,this)}t.default=function(e,t){var n=function(e,t){var n,l,d=function(e){var t=c(e);t.events&&(t.events=t.events.reduce((function(e,t){if(!b(t))throw new Error('"options.events" must only contain valid JavaScript Date objects.');return e[+g(t)]=!0,e}),{}));["startDate","dateSelected","minDate","maxDate"].forEach((function(e){var n=t[e];if(n&&!b(n))throw new Error('"options.'+e+'" needs to be a valid JavaScript Date object.');t[e]=g(n)}));var n=t.position,i=t.maxDate,l=t.minDate,d=t.dateSelected,u=t.overlayPlaceholder,h=t.overlayButton,f=t.startDay,v=t.id;if(t.startDate=g(t.startDate||d||new Date),t.disabledDates=(t.disabledDates||[]).reduce((function(e,t){var n=+g(t);if(!b(t))throw new Error('You supplied an invalid date to "options.disabledDates".');if(n===+g(d))throw new Error('"disabledDates" cannot contain the same date as "dateSelected".');return e[n]=1,e}),{}),t.hasOwnProperty("id")&&null==v)throw new Error("`id` cannot be `null` or `undefined`");if(null!=v){var m=a.filter((function(e){return e.id===v}));if(m.length>1)throw new Error("Only two datepickers can share an id.");m.length?(t.second=!0,t.sibling=m[0]):t.first=!0}var y=["tr","tl","br","bl","c"].some((function(e){return n===e}));if(n&&!y)throw new Error('"options.position" must be one of the following: tl, tr, bl, br, or c.');function p(e){throw new Error('"dateSelected" in options is '+(e?"less":"greater")+' than "'+(e||"max")+'Date".')}if(t.position=function(e){var t=e[0],n=e[1],a={};a[o[t]]=1,n&&(a[o[n]]=1);return a}(n||"bl"),i<l)throw new Error('"maxDate" in options is less than "minDate".');d&&(l>d&&p("min"),i<d&&p());if(["onSelect","onShow","onHide","onMonthChange","formatter","disabler"].forEach((function(e){"function"!=typeof t[e]&&(t[e]=s)})),["customDays","customMonths","customOverlayMonths"].forEach((function(e,n){var a=t[e],r=n?12:7;if(a){if(!Array.isArray(a)||a.length!==r||a.some((function(e){return"string"!=typeof e})))throw new Error('"'+e+'" must be an array with '+r+" strings.");t[n?n<2?"months":"overlayMonths":"days"]=a}})),f&&f>0&&f<7){var w=(t.customDays||r).slice(),D=w.splice(0,f);t.customDays=w.concat(D),t.startDay=+f,t.weekendIndices=[w.length-1,w.length]}else t.startDay=0,t.weekendIndices=[6,0];"string"!=typeof u&&delete t.overlayPlaceholder;"string"!=typeof h&&delete t.overlayButton;var q=t.defaultView;if(q&&"calendar"!==q&&"overlay"!==q)throw new Error('options.defaultView must either be "calendar" or "overlay".');return t.defaultView=q||"calendar",t}(t||{startDate:g(new Date),position:"bl",defaultView:"calendar"}),u=e;if("string"==typeof u)u="#"===u[0]?document.getElementById(u.slice(1)):document.querySelector(u);else{if("[object ShadowRoot]"===x(u))throw new Error("Using a shadow DOM as your selector is not supported.");for(var h,f=u.parentNode;!h;){var v=x(f);"[object HTMLDocument]"===v?h=!0:"[object ShadowRoot]"===v?(h=!0,n=f,l=f.host):f=f.parentNode}}if(!u)throw new Error("No selector / element found.");if(a.some((function(e){return e.el===u})))throw new Error("A datepicker already exists on that element.");var m=u===document.body,y=n?u.parentElement||n:m?document.body:u.parentElement,w=n?u.parentElement||l:y,D=document.createElement("div"),q=document.createElement("div");D.className="qs-datepicker-container qs-hidden",q.className="qs-datepicker";var M={shadowDom:n,customElement:l,positionedEl:w,el:u,parent:y,nonInput:"INPUT"!==u.nodeName,noPosition:m,position:!m&&d.position,startDate:d.startDate,dateSelected:d.dateSelected,disabledDates:d.disabledDates,minDate:d.minDate,maxDate:d.maxDate,noWeekends:!!d.noWeekends,weekendIndices:d.weekendIndices,calendarContainer:D,calendar:q,currentMonth:(d.startDate||d.dateSelected).getMonth(),currentMonthName:(d.months||i)[(d.startDate||d.dateSelected).getMonth()],currentYear:(d.startDate||d.dateSelected).getFullYear(),events:d.events||{},defaultView:d.defaultView,setDate:O,remove:R,setMin:N,setMax:_,show:P,hide:k,navigate:F,toggleOverlay:B,onSelect:d.onSelect,onShow:d.onShow,onHide:d.onHide,onMonthChange:d.onMonthChange,formatter:d.formatter,disabler:d.disabler,months:d.months||i,days:d.customDays||r,startDay:d.startDay,overlayMonths:d.overlayMonths||(d.months||i).map((function(e){return e.slice(0,3)})),overlayPlaceholder:d.overlayPlaceholder||"4-digit year",overlayButton:d.overlayButton||"Submit",disableYearOverlay:!!d.disableYearOverlay,disableMobile:!!d.disableMobile,isMobile:"ontouchstart"in window,alwaysShow:!!d.alwaysShow,id:d.id,showAllDates:!!d.showAllDates,respectDisabledReadOnly:!!d.respectDisabledReadOnly,first:d.first,second:d.second};if(d.sibling){var E=d.sibling,C=M,L=E.minDate||C.minDate,Y=E.maxDate||C.maxDate;C.sibling=E,E.sibling=C,E.minDate=L,E.maxDate=Y,C.minDate=L,C.maxDate=Y,E.originalMinDate=L,E.originalMaxDate=Y,C.originalMinDate=L,C.originalMaxDate=Y,E.getRange=A,C.getRange=A}d.dateSelected&&p(u,M);var j=getComputedStyle(w).position;m||j&&"static"!==j||(M.inlinePosition=!0,w.style.setProperty("position","relative"));var I=a.filter((function(e){return e.positionedEl===M.positionedEl}));I.some((function(e){return e.inlinePosition}))&&(M.inlinePosition=!0,I.forEach((function(e){e.inlinePosition=!0})));D.appendChild(q),y.appendChild(D),M.alwaysShow&&S(M);return M}(e,t);if(a.length||d(document),n.shadowDom&&(a.some((function(e){return e.shadowDom===n.shadowDom}))||d(n.shadowDom)),a.push(n),n.second){var l=n.sibling;y({instance:n,deselect:!n.dateSelected}),y({instance:l,deselect:!l.dateSelected}),u(l)}return u(n,n.startDate||n.dateSelected),n.alwaysShow&&D(n),n}}]).default}));
//
// https://github.com/sukhoi1, 25 Jan 2016
// bicubic-img-interpolation v0.1.1 jQuery plugin
(function ($) {
    $.fn.bicubicImgInterpolation = function(settings) {
	    var self = this;
	    $(self).each(function() {
		    if(this.tagName === "IMG") {
			    var src = $(this).attr('src');
			    var imgW = this.width;
			    var imgH = this.height;
			    $(this).after("<canvas style='display: none' width='" + imgW +  "' height='" + imgH + "'></canvas>");
			    var can = $(this).next()[0];
			    var callback = drawHighResolutionImgThumbnail;
			    drawCanvas(can, imgW*6, imgH*6, src, callback, this, settings.crossOrigin);
		    }
	    });
        
	    function drawCanvas(can, imgW, imgH, src, callback, imgEl, crossOrigin) {
	    
		    var ctx = can.getContext('2d');
		    var img = new Image();
		    if(crossOrigin) {
		        img.setAttribute('crossOrigin', 'anonymous'); //tainted canvases may not be exported chrome, ie will also throw security error
		    }
		    
		    var w = imgW;
		    var h = imgH;

		    img.onload = function() {
			    
			    // Step it down several times
			    var can2 = document.createElement('canvas');
			    can2.width = w;
			    can2.height = h;
			    var ctx2 = can2.getContext('2d');
			    
			    // Draw it at 1/2 size 3 times (step down three times)
			    ctx2.drawImage(img, 0, 0, w/2, h/2);
			    ctx2.drawImage(can2, 0, 0, w/2, h/2, 0, 0, w/4, h/4);
			    ctx2.drawImage(can2, 0, 0, w/4, h/4, 0, 0, w/6, h/6);
			    ctx.drawImage(can2, 0, 0, w/6, h/6, 0, 0, w/6, h/6);
			    if(callback) {
				    callback(can, this.src, imgEl);
			    }
		    };
	    
		    img.src = src;
	    };
	    
	    function drawHighResolutionImgThumbnail(can, attrSrc, imgEl) {
		    $(imgEl).attr('src', can.toDataURL("image/png"));
		    $(imgEl).attr('data-src', attrSrc);
	    };
    };
})(jQuery);

/*
  jQuery deparam is an extraction of the deparam method from Ben Alman's jQuery BBQ
  http://benalman.com/projects/jquery-bbq-plugin/
*/
(function ($) {
  $.deparam = function (params, coerce) {
    var obj = {},
        coerce_types = { 'true': !0, 'false': !1, 'null': null };
      
    // Iterate over all name=value pairs.
    $.each(params.replace(/\+/g, ' ').split('&'), function (j,v) {
      var param = v.split('='),
          key = decodeURIComponent(param[0]),
          val,
          cur = obj,
          i = 0,
            
          // If key is more complex than 'foo', like 'a[]' or 'a[b][c]', split it
          // into its component parts.
          keys = key.split(']['),
          keys_last = keys.length - 1;
        
      // If the first keys part contains [ and the last ends with ], then []
      // are correctly balanced.
      if (/\[/.test(keys[0]) && /\]$/.test(keys[keys_last])) {
        // Remove the trailing ] from the last keys part.
        keys[keys_last] = keys[keys_last].replace(/\]$/, '');
          
        // Split first keys part into two parts on the [ and add them back onto
        // the beginning of the keys array.
        keys = keys.shift().split('[').concat(keys);
          
        keys_last = keys.length - 1;
      } else {
        // Basic 'foo' style key.
        keys_last = 0;
      }
        
      // Are we dealing with a name=value pair, or just a name?
      if (param.length === 2) {
        val = decodeURIComponent(param[1]);
          
        // Coerce values.
        if (coerce) {
          val = val && !isNaN(val)              ? +val              // number
              : val === 'undefined'             ? undefined         // undefined
              : coerce_types[val] !== undefined ? coerce_types[val] // true, false, null
              : val;                                                // string
        }
          
        if ( keys_last ) {
          // Complex key, build deep object structure based on a few rules:
          // * The 'cur' pointer starts at the object top-level.
          // * [] = array push (n is set to array length), [n] = array if n is 
          //   numeric, otherwise object.
          // * If at the last keys part, set the value.
          // * For each keys part, if the current level is undefined create an
          //   object or array based on the type of the next keys part.
          // * Move the 'cur' pointer to the next level.
          // * Rinse & repeat.
          for (; i <= keys_last; i++) {
            key = keys[i] === '' ? cur.length : keys[i];
            cur = cur[key] = i < keys_last
              ? cur[key] || (keys[i+1] && isNaN(keys[i+1]) ? {} : [])
              : val;
          }
            
        } else {
          // Simple key, even simpler rules, since only scalars and shallow
          // arrays are allowed.
            
          if ($.isArray(obj[key])) {
            // val is already an array, so push on the next value.
            obj[key].push( val );
              
          } else if (obj[key] !== undefined) {
            // val isn't an array, but since a second value has been specified,
            // convert val into an array.
            obj[key] = [obj[key], val];
              
          } else {
            // val is a scalar.
            obj[key] = val;
          }
        }
          
      } else if (key) {
        // No value was defined, so set something meaningful.
        obj[key] = coerce
          ? undefined
          : '';
      }
    });
      
    return obj;
  };
})(jQuery);

/*!
 * jQuery Cookie Plugin v1.4.0
 * https://github.com/carhartl/jquery-cookie
 *
 * Copyright 2013 Klaus Hartl
 * Released under the MIT license
 */
(function (factory) {
	if (typeof define === 'function' && define.amd) {
		// AMD. Register as anonymous module.
		define(['jquery'], factory);
	} else {
		// Browser globals.
		factory(jQuery);
	}
}(function ($) {

	var pluses = /\+/g;

	function encode(s) {
		return config.raw ? s : encodeURIComponent(s);
	}

	function decode(s) {
		return config.raw ? s : decodeURIComponent(s);
	}

	function stringifyCookieValue(value) {
		return encode(config.json ? JSON.stringify(value) : String(value));
	}

	function parseCookieValue(s) {
		if (s.indexOf('"') === 0) {
			// This is a quoted cookie as according to RFC2068, unescape...
			s = s.slice(1, -1).replace(/\\"/g, '"').replace(/\\\\/g, '\\');
		}

		try {
			// Replace server-side written pluses with spaces.
			// If we can't decode the cookie, ignore it, it's unusable.
			s = decodeURIComponent(s.replace(pluses, ' '));
		} catch (e) {
			return;
		}

		try {
			// If we can't parse the cookie, ignore it, it's unusable.
			return config.json ? JSON.parse(s) : s;
		} catch (e) { }
	}

	function read(s, converter) {
		var value = config.raw ? s : parseCookieValue(s);
		return $.isFunction(converter) ? converter(value) : value;
	}

	var config = $.cookie = function (key, value, options) {

		// Write
		if (value !== undefined && !$.isFunction(value)) {
			options = $.extend({}, config.defaults, options);

			if (typeof options.expires === 'number') {
				var days = options.expires, t = options.expires = new Date();
				t.setDate(t.getDate() + days);
			}

			return (document.cookie = [
				encode(key), '=', stringifyCookieValue(value),
				options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE
				options.path ? '; path=' + options.path : '',
				options.domain ? '; domain=' + options.domain : '',
				options.secure ? '; secure' : ''
			].join(''));
		}

		// Read

		var result = key ? undefined : {};

		// To prevent the for loop in the first place assign an empty array
		// in case there are no cookies at all. Also prevents odd result when
		// calling $.cookie().
		var cookies = document.cookie ? document.cookie.split('; ') : [];

		for (var i = 0, l = cookies.length; i < l; i++) {
			var parts = cookies[i].split('=');
			var name = decode(parts.shift());
			var cookie = parts.join('=');

			if (key && key === name) {
				// If second argument (value) is a function it's a converter...
				result = read(cookie, value);
				break;
			}

			// Prevent storing a cookie that we couldn't decode.
			if (!key && (cookie = read(cookie)) !== undefined) {
				result[name] = cookie;
			}
		}

		return result;
	};

	config.defaults = {};

	$.removeCookie = function (key, options) {
		if ($.cookie(key) !== undefined) {
			// Must not alter options, thus extending a fresh object...
			$.cookie(key, '', $.extend({}, options, { expires: -1 }));
			return true;
		}
		return false;
	};

}));

// jquery.daterangepicker.js
// author : Chunlong Liu
// license : MIT
// www.jszen.com
// https://github.com/longbill/jquery-date-range-picker
// https://longbill.github.io/jquery-date-range-picker/

(function(factory) {
    if (typeof define === 'function' && define.amd) {
        // AMD. Register as an anonymous module.
        define(['jquery', 'moment'], factory);
    } else if (typeof exports === 'object' && typeof module !== 'undefined') {
        // CommonJS. Register as a module
        module.exports = factory(require('jquery'), require('moment'));
    } else {
        // Browser globals
        factory(jQuery, moment);
    }
}(function($, moment) {
    'use strict';
    $.dateRangePickerLanguages = {
        "default": //default language: English
        {
            "selected": "Selected:",
            "day": "Night",
            "days": "Nights",
            "apply": "Close",
            "week-1": "mo",
            "week-2": "tu",
            "week-3": "we",
            "week-4": "th",
            "week-5": "fr",
            "week-6": "sa",
            "week-7": "su",
            "week-number": "W",
            "month-name": ["january", "february", "march", "april", "may", "june", "july", "august", "september", "october", "november", "december"],
            "shortcuts": "Shortcuts",
            "custom-values": "Custom Values",
            "past": "Past",
            "following": "Following",
            "previous": "Previous",
            "prev-week": "Week",
            "prev-month": "Month",
            "prev-year": "Year",
            "next": "Next",
            "next-week": "Week",
            "next-month": "Month",
            "next-year": "Year",
            "less-than": "Date range should not be more than %d nights",
            "more-than": "Date range should not be less than %d nights",
            "default-more": "Please select a date range longer than %d nights",
            "default-single": "Please select a date",
            "default-less": "Please select a date range less than %d nights",
            "default-range": "Please select a date range between %d and %d nights",
            "default-default": "Please select a date range",
            "time": "Time",
            "hour": "Hour",
            "minute": "Minute"
        },
        "id": {
            "selected": "Terpilih:",
            "day": "Hari",
            "days": "Hari",
            "apply": "Tutup",
            "week-1": "sen",
            "week-2": "sel",
            "week-3": "rab",
            "week-4": "kam",
            "week-5": "jum",
            "week-6": "sab",
            "week-7": "min",
            "week-number": "W",
            "month-name": ["januari", "februari", "maret", "april", "mei", "juni", "juli", "agustus", "september", "oktober", "november", "desember"],
            "shortcuts": "Pintas",
            "custom-values": "Nilai yang ditentukan",
            "past": "Yang Lalu",
            "following": "Mengikuti",
            "previous": "Sebelumnya",
            "prev-week": "Minggu",
            "prev-month": "Bulan",
            "prev-year": "Tahun",
            "next": "Selanjutnya",
            "next-week": "Minggu",
            "next-month": "Bulan",
            "next-year": "Tahun",
            "less-than": "Tanggal harus lebih dari %d hari",
            "more-than": "Tanggal harus kurang dari %d hari",
            "default-more": "Jarak tanggal harus lebih lama dari %d hari",
            "default-single": "Silakan pilih tanggal",
            "default-less": "Jarak rentang tanggal tidak boleh lebih lama dari %d hari",
            "default-range": "Rentang tanggal harus antara %d dan %d hari",
            "default-default": "Silakan pilih rentang tanggal",
            "time": "Waktu",
            "hour": "Jam",
            "minute": "Menit"
        },
        "az": {
            "selected": "Seçildi:",
            "day": " gün",
            "days": " gün",
            "apply": "tətbiq",
            "week-1": "1",
            "week-2": "2",
            "week-3": "3",
            "week-4": "4",
            "week-5": "5",
            "week-6": "6",
            "week-7": "7",
            "month-name": ["yanvar", "fevral", "mart", "aprel", "may", "iyun", "iyul", "avqust", "sentyabr", "oktyabr", "noyabr", "dekabr"],
            "shortcuts": "Qısayollar",
            "past": "Keçmiş",
            "following": "Növbəti",
            "previous": "&nbsp;&nbsp;&nbsp;",
            "prev-week": "Öncəki həftə",
            "prev-month": "Öncəki ay",
            "prev-year": "Öncəki il",
            "next": "&nbsp;&nbsp;&nbsp;",
            "next-week": "Növbəti həftə",
            "next-month": "Növbəti ay",
            "next-year": "Növbəti il",
            "less-than": "Tarix aralığı %d gündən çox olmamalıdır",
            "more-than": "Tarix aralığı %d gündən az olmamalıdır",
            "default-more": "%d gündən çox bir tarix seçin",
            "default-single": "Tarix seçin",
            "default-less": "%d gündən az bir tarix seçin",
            "default-range": "%d və %d gün aralığında tarixlər seçin",
            "default-default": "Tarix aralığı seçin"
        },
        "bg": {
            "selected": "Избрано:",
            "day": "Ден",
            "days": "Дни",
            "apply": "Затвори",
            "week-1": "пн",
            "week-2": "вт",
            "week-3": "ср",
            "week-4": "чт",
            "week-5": "пт",
            "week-6": "сб",
            "week-7": "нд",
            "week-number": "С",
            "month-name": ["януари", "февруари", "март", "април", "май", "юни", "юли", "август", "септември", "октомври", "ноември", "декември"],
            "shortcuts": "Преки пътища",
            "custom-values": "Персонализирани стойности",
            "past": "Минал",
            "following": "Следващ",
            "previous": "Предишен",
            "prev-week": "Седмица",
            "prev-month": "Месец",
            "prev-year": "Година",
            "next": "Следващ",
            "next-week": "Седмица",
            "next-month": "Месец",
            "next-year": "Година",
            "less-than": "Периодът от време не трябва да е повече от %d дни",
            "more-than": "Периодът от време не трябва да е по-малко от %d дни",
            "default-more": "Моля изберете период по-дълъг от %d дни",
            "default-single": "Моля изберете дата",
            "default-less": "Моля изберете период по-къс от %d дни",
            "default-range": "Моля изберете период между %d и %d дни",
            "default-default": "Моля изберете период",
            "time": "Време",
            "hour": "Час",
            "minute": "Минута"
        },
        "cn": //simplified chinese
        {
            "selected": "已选择:",
            "day": "天",
            "days": "天",
            "apply": "确定",
            "week-1": "一",
            "week-2": "二",
            "week-3": "三",
            "week-4": "四",
            "week-5": "五",
            "week-6": "六",
            "week-7": "日",
            "week-number": "周",
            "month-name": ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"],
            "shortcuts": "快捷选择",
            "past": "过去",
            "following": "将来",
            "previous": "&nbsp;&nbsp;&nbsp;",
            "prev-week": "上周",
            "prev-month": "上个月",
            "prev-year": "去年",
            "next": "&nbsp;&nbsp;&nbsp;",
            "next-week": "下周",
            "next-month": "下个月",
            "next-year": "明年",
            "less-than": "所选日期范围不能大于%d天",
            "more-than": "所选日期范围不能小于%d天",
            "default-more": "请选择大于%d天的日期范围",
            "default-less": "请选择小于%d天的日期范围",
            "default-range": "请选择%d天到%d天的日期范围",
            "default-single": "请选择一个日期",
            "default-default": "请选择一个日期范围",
            "time": "时间",
            "hour": "小时",
            "minute": "分钟"
        },
        "cz": {
            "selected": "Vybráno:",
            "day": "Den",
            "days": "Dny",
            "apply": "Zavřít",
            "week-1": "po",
            "week-2": "út",
            "week-3": "st",
            "week-4": "čt",
            "week-5": "pá",
            "week-6": "so",
            "week-7": "ne",
            "month-name": ["leden", "únor", "březen", "duben", "květen", "červen", "červenec", "srpen", "září", "říjen", "listopad", "prosinec"],
            "shortcuts": "Zkratky",
            "past": "po",
            "following": "následující",
            "previous": "předchozí",
            "prev-week": "týden",
            "prev-month": "měsíc",
            "prev-year": "rok",
            "next": "další",
            "next-week": "týden",
            "next-month": "měsíc",
            "next-year": "rok",
            "less-than": "Rozsah data by neměl být větší než %d dnů",
            "more-than": "Rozsah data by neměl být menší než %d dnů",
            "default-more": "Prosím zvolte rozsah data větší než %d dnů",
            "default-single": "Prosím zvolte datum",
            "default-less": "Prosím zvolte rozsah data menší než %d dnů",
            "default-range": "Prosím zvolte rozsah data mezi %d a %d dny",
            "default-default": "Prosím zvolte rozsah data"
        },
        "de": {
            "selected": "Auswahl:",
            "day": "Tag",
            "days": "Tage",
            "apply": "Schließen",
            "week-1": "mo",
            "week-2": "di",
            "week-3": "mi",
            "week-4": "do",
            "week-5": "fr",
            "week-6": "sa",
            "week-7": "so",
            "month-name": ["januar", "februar", "märz", "april", "mai", "juni", "juli", "august", "september", "oktober", "november", "dezember"],
            "shortcuts": "Schnellwahl",
            "past": "Vorherige",
            "following": "Folgende",
            "previous": "Vorherige",
            "prev-week": "Woche",
            "prev-month": "Monat",
            "prev-year": "Jahr",
            "next": "Nächste",
            "next-week": "Woche",
            "next-month": "Monat",
            "next-year": "Jahr",
            "less-than": "Datumsbereich darf nicht größer sein als %d Tage",
            "more-than": "Datumsbereich darf nicht kleiner sein als %d Tage",
            "default-more": "Bitte mindestens %d Tage auswählen",
            "default-single": "Bitte ein Datum auswählen",
            "default-less": "Bitte weniger als %d Tage auswählen",
            "default-range": "Bitte einen Datumsbereich zwischen %d und %d Tagen auswählen",
            "default-default": "Bitte ein Start- und Enddatum auswählen",
            "Time": "Zeit",
            "hour": "Stunde",
            "minute": "Minute"
        },
        "es": {
            "selected": "Seleccionado:",
            "day": "Día",
            "days": "Días",
            "apply": "Cerrar",
            "week-1": "lu",
            "week-2": "ma",
            "week-3": "mi",
            "week-4": "ju",
            "week-5": "vi",
            "week-6": "sa",
            "week-7": "do",
            "month-name": ["enero", "febrero", "marzo", "abril", "mayo", "junio", "julio", "agosto", "septiembre", "octubre", "noviembre", "diciembre"],
            "shortcuts": "Accesos directos",
            "past": "Pasado",
            "following": "Siguiente",
            "previous": "Anterior",
            "prev-week": "Semana",
            "prev-month": "Mes",
            "prev-year": "Año",
            "next": "Siguiente",
            "next-week": "Semana",
            "next-month": "Mes",
            "next-year": "Año",
            "less-than": "El rango no debería ser mayor de %d días",
            "more-than": "El rango no debería ser menor de %d días",
            "default-more": "Por favor selecciona un rango mayor a %d días",
            "default-single": "Por favor selecciona un día",
            "default-less": "Por favor selecciona un rango menor a %d días",
            "default-range": "Por favor selecciona un rango entre %d y %d días",
            "default-default": "Por favor selecciona un rango de fechas."
        },
        "fr": {
            "selected": "Sélection:",
            "day": "Nuit",
            "days": "Nuits",
            "apply": "Fermer",
            "week-1": "lu",
            "week-2": "ma",
            "week-3": "me",
            "week-4": "je",
            "week-5": "ve",
            "week-6": "sa",
            "week-7": "di",
            "month-name": ["janvier", "février", "mars", "avril", "mai", "juin", "juillet", "août", "septembre", "octobre", "novembre", "décembre"],
            "shortcuts": "Raccourcis",
            "past": "Passé",
            "following": "Suivant",
            "previous": "Précédent",
            "prev-week": "Semaine",
            "prev-month": "Mois",
            "prev-year": "Année",
            "next": "Suivant",
            "next-week": "Semaine",
            "next-month": "Mois",
            "next-year": "Année",
            "less-than": "L'intervalle ne doit pas être supérieure à %d nuits",
            "more-than": "L'intervalle ne doit pas être inférieure à %d nuits",
            "default-more": "Merci de choisir une intervalle supérieure à %d nuits",
            "default-single": "Merci de choisir une date",
            "default-less": "Merci de choisir une intervalle inférieure %d nuits",
            "default-range": "Merci de choisir une intervalle comprise entre %d et %d nuits",
            "default-default": "Merci de choisir une date"
        },
        "hu": {
            "selected": "Kiválasztva:",
            "day": "Nap",
            "days": "Nap",
            "apply": "Ok",
            "week-1": "h",
            "week-2": "k",
            "week-3": "sz",
            "week-4": "cs",
            "week-5": "p",
            "week-6": "sz",
            "week-7": "v",
            "month-name": ["január", "február", "március", "április", "május", "június", "július", "augusztus", "szeptember", "október", "november", "december"],
            "shortcuts": "Gyorsválasztó",
            "past": "Múlt",
            "following": "Következő",
            "previous": "Előző",
            "prev-week": "Hét",
            "prev-month": "Hónap",
            "prev-year": "Év",
            "next": "Következő",
            "next-week": "Hét",
            "next-month": "Hónap",
            "next-year": "Év",
            "less-than": "A kiválasztás nem lehet több %d napnál",
            "more-than": "A kiválasztás nem lehet több %d napnál",
            "default-more": "Válassz ki egy időszakot ami hosszabb mint %d nap",
            "default-single": "Válassz egy napot",
            "default-less": "Válassz ki egy időszakot ami rövidebb mint %d nap",
            "default-range": "Válassz ki egy %d - %d nap hosszú időszakot",
            "default-default": "Válassz ki egy időszakot"
        },
        "it": {
            "selected": "Selezionati:",
            "day": "Giorno",
            "days": "Giorni",
            "apply": "Chiudi",
            "week-1": "lu",
            "week-2": "ma",
            "week-3": "me",
            "week-4": "gi",
            "week-5": "ve",
            "week-6": "sa",
            "week-7": "do",
            "month-name": ["gennaio", "febbraio", "marzo", "aprile", "maggio", "giugno", "luglio", "agosto", "settembre", "ottobre", "novembre", "dicembre"],
            "shortcuts": "Scorciatoie",
            "past": "Scorso",
            "following": "Successivo",
            "previous": "Precedente",
            "prev-week": "Settimana",
            "prev-month": "Mese",
            "prev-year": "Anno",
            "next": "Prossimo",
            "next-week": "Settimana",
            "next-month": "Mese",
            "next-year": "Anno",
            "less-than": "L'intervallo non dev'essere maggiore di %d giorni",
            "more-than": "L'intervallo non dev'essere minore di %d giorni",
            "default-more": "Seleziona un intervallo maggiore di %d giorni",
            "default-single": "Seleziona una data",
            "default-less": "Seleziona un intervallo minore di %d giorni",
            "default-range": "Seleziona un intervallo compreso tra i %d e i %d giorni",
            "default-default": "Seleziona un intervallo di date"
        },
        "ko": {
            "selected": "기간:",
            "day": "일",
            "days": "일간",
            "apply": "닫기",
            "week-1": "월",
            "week-2": "화",
            "week-3": "수",
            "week-4": "목",
            "week-5": "금",
            "week-6": "토",
            "week-7": "일",
            "week-number": "주",
            "month-name": ["1월", "2월", "3월", "4월", "5월", "6월", "7월", "8월", "9월", "10월", "11월", "12월"],
            "shortcuts": "단축키들",
            "past": "지난(오늘기준)",
            "following": "이후(오늘기준)",
            "previous": "이전",
            "prev-week": "1주",
            "prev-month": "1달",
            "prev-year": "1년",
            "next": "다음",
            "next-week": "1주",
            "next-month": "1달",
            "next-year": "1년",
            "less-than": "날짜 범위는 %d 일보다 많을 수 없습니다",
            "more-than": "날짜 범위는 %d 일보다 작을 수 없습니다",
            "default-more": "날짜 범위를 %d 일보다 길게 선택해 주세요",
            "default-single": "날짜를 선택해 주세요",
            "default-less": "%d 일보다 작은 날짜를 선택해 주세요",
            "default-range": "%d와 %d 일 사이의 날짜 범위를 선택해 주세요",
            "default-default": "날짜 범위를 선택해 주세요",
            "time": "시각",
            "hour": "시",
            "minute": "분"
        },
        "no": {
            "selected": "Valgt:",
            "day": "Dag",
            "days": "Dager",
            "apply": "Lukk",
            "week-1": "ma",
            "week-2": "ti",
            "week-3": "on",
            "week-4": "to",
            "week-5": "fr",
            "week-6": "lø",
            "week-7": "sø",
            "month-name": ["januar", "februar", "mars", "april", "mai", "juni", "juli", "august", "september", "oktober", "november", "desember"],
            "shortcuts": "Snarveier",
            "custom-values": "Egendefinerte Verdier",
            "past": "Over", // Not quite sure about the context of this one
            "following": "Følger",
            "previous": "Forrige",
            "prev-week": "Uke",
            "prev-month": "Måned",
            "prev-year": "År",
            "next": "Neste",
            "next-week": "Uke",
            "next-month": "Måned",
            "next-year": "År",
            "less-than": "Datoperioden skal ikkje være lengre enn %d dager",
            "more-than": "Datoperioden skal ikkje være kortere enn %d dager",
            "default-more": "Vennligst velg ein datoperiode lengre enn %d dager",
            "default-single": "Vennligst velg ein dato",
            "default-less": "Vennligst velg ein datoperiode mindre enn %d dager",
            "default-range": "Vennligst velg ein datoperiode mellom %d og %d dager",
            "default-default": "Vennligst velg ein datoperiode",
            "time": "Tid",
            "hour": "Time",
            "minute": "Minutter"
        },
        "nl": {
            "selected": "Geselecteerd:",
            "day": "Dag",
            "days": "Dagen",
            "apply": "Ok",
            "week-1": "ma",
            "week-2": "di",
            "week-3": "wo",
            "week-4": "do",
            "week-5": "vr",
            "week-6": "za",
            "week-7": "zo",
            "month-name": ["januari", "februari", "maart", "april", "mei", "juni", "juli", "augustus", "september", "oktober", "november", "december"],
            "shortcuts": "Snelkoppelingen",
            "custom-values": "Aangepaste waarden",
            "past": "Verleden",
            "following": "Komend",
            "previous": "Vorige",
            "prev-week": "Week",
            "prev-month": "Maand",
            "prev-year": "Jaar",
            "next": "Volgende",
            "next-week": "Week",
            "next-month": "Maand",
            "next-year": "Jaar",
            "less-than": "Interval moet langer dan %d dagen zijn",
            "more-than": "Interval mag niet minder dan %d dagen zijn",
            "default-more": "Selecteer een interval langer dan %dagen",
            "default-single": "Selecteer een datum",
            "default-less": "Selecteer een interval minder dan %d dagen",
            "default-range": "Selecteer een interval tussen %d en %d dagen",
            "default-default": "Selecteer een interval",
            "time": "Tijd",
            "hour": "Uur",
            "minute": "Minuut"
        },
        "ru": {
            "selected": "Выбрано:",
            "day": "День",
            "days": "Дней",
            "apply": "Применить",
            "week-1": "пн",
            "week-2": "вт",
            "week-3": "ср",
            "week-4": "чт",
            "week-5": "пт",
            "week-6": "сб",
            "week-7": "вс",
            "month-name": ["январь", "февраль", "март", "апрель", "май", "июнь", "июль", "август", "сентябрь", "октябрь", "ноябрь", "декабрь"],
            "shortcuts": "Быстрый выбор",
            "custom-values": "Пользовательские значения",
            "past": "Прошедшие",
            "following": "Следующие",
            "previous": "&nbsp;&nbsp;&nbsp;",
            "prev-week": "Неделя",
            "prev-month": "Месяц",
            "prev-year": "Год",
            "next": "&nbsp;&nbsp;&nbsp;",
            "next-week": "Неделя",
            "next-month": "Месяц",
            "next-year": "Год",
            "less-than": "Диапазон не может быть больше %d дней",
            "more-than": "Диапазон не может быть меньше %d дней",
            "default-more": "Пожалуйста выберите диапазон больше %d дней",
            "default-single": "Пожалуйста выберите дату",
            "default-less": "Пожалуйста выберите диапазон меньше %d дней",
            "default-range": "Пожалуйста выберите диапазон между %d и %d днями",
            "default-default": "Пожалуйста выберите диапазон",
            "time": "Время",
            "hour": "Часы",
            "minute": "Минуты"
        },
        "uk": {
            "selected": "Вибрано:",
            "day": "День",
            "days": "Днів",
            "apply": "Застосувати",
            "week-1": "пн",
            "week-2": "вт",
            "week-3": "ср",
            "week-4": "чт",
            "week-5": "пт",
            "week-6": "сб",
            "week-7": "нд",
            "month-name": ["січень", "лютий", "березень", "квітень", "травень", "червень", "липень", "серпень", "вересень", "жовтень", "листопад", "грудень"],
            "shortcuts": "Швидкий вибір",
            "custom-values": "Значення користувача",
            "past": "Минулі",
            "following": "Наступні",
            "previous": "&nbsp;&nbsp;&nbsp;",
            "prev-week": "Тиждень",
            "prev-month": "Місяць",
            "prev-year": "Рік",
            "next": "&nbsp;&nbsp;&nbsp;",
            "next-week": "Тиждень",
            "next-month": "Місяць",
            "next-year": "Рік",
            "less-than": "Діапазон не може бути більш ніж %d днів",
            "more-than": "Діапазон не може бути меньш ніж %d днів",
            "default-more": "Будь ласка виберіть діапазон більше %d днів",
            "default-single": "Будь ласка виберіть дату",
            "default-less": "Будь ласка виберіть діапазон менше %d днів",
            "default-range": "Будь ласка виберіть діапазон між %d та %d днями",
            "default-default": "Будь ласка виберіть діапазон",
            "time": "Час",
            "hour": "Години",
            "minute": "Хвилини"
        },
        "pl": {
            "selected": "Wybrany:",
            "day": "Dzień",
            "days": "Dni",
            "apply": "Zamknij",
            "week-1": "pon",
            "week-2": "wt",
            "week-3": "śr",
            "week-4": "czw",
            "week-5": "pt",
            "week-6": "so",
            "week-7": "nd",
            "month-name": ["styczeń", "luty", "marzec", "kwiecień", "maj", "czerwiec", "lipiec", "sierpień", "wrzesień", "październik", "listopad", "grudzień"],
            "shortcuts": "Skróty",
            "custom-values": "Niestandardowe wartości",
            "past": "Przeszłe",
            "following": "Następne",
            "previous": "Poprzednie",
            "prev-week": "tydzień",
            "prev-month": "miesiąc",
            "prev-year": "rok",
            "next": "Następny",
            "next-week": "tydzień",
            "next-month": "miesiąc",
            "next-year": "rok",
            "less-than": "Okres nie powinien być dłuższy niż %d dni",
            "more-than": "Okres nie powinien być krótszy niż  %d ni",
            "default-more": "Wybierz okres dłuższy niż %d dni",
            "default-single": "Wybierz datę",
            "default-less": "Wybierz okres krótszy niż %d dni",
            "default-range": "Wybierz okres trwający od %d do %d dni",
            "default-default": "Wybierz okres",
            "time": "Czas",
            "hour": "Godzina",
            "minute": "Minuta"
        },
        "se": {
            "selected": "Vald:",
            "day": "dag",
            "days": "dagar",
            "apply": "godkänn",
            "week-1": "ma",
            "week-2": "ti",
            "week-3": "on",
            "week-4": "to",
            "week-5": "fr",
            "week-6": "lö",
            "week-7": "sö",
            "month-name": ["januari", "februari", "mars", "april", "maj", "juni", "juli", "augusti", "september", "oktober", "november", "december"],
            "shortcuts": "genvägar",
            "custom-values": "Anpassade värden",
            "past": "över",
            "following": "följande",
            "previous": "förra",
            "prev-week": "vecka",
            "prev-month": "månad",
            "prev-year": "år",
            "next": "nästa",
            "next-week": "vecka",
            "next-month": "måned",
            "next-year": "år",
            "less-than": "Datumintervall bör inte vara mindre än %d dagar",
            "more-than": "Datumintervall bör inte vara mer än %d dagar",
            "default-more": "Välj ett datumintervall längre än %d dagar",
            "default-single": "Välj ett datum",
            "default-less": "Välj ett datumintervall mindre än %d dagar",
            "default-range": "Välj ett datumintervall mellan %d och %d dagar",
            "default-default": "Välj ett datumintervall",
            "time": "tid",
            "hour": "timme",
            "minute": "minut"
        },
        "pt": //Portuguese (European)
        {
            "selected": "Selecionado:",
            "day": "Dia",
            "days": "Dias",
            "apply": "Fechar",
            "week-1": "seg",
            "week-2": "ter",
            "week-3": "qua",
            "week-4": "qui",
            "week-5": "sex",
            "week-6": "sab",
            "week-7": "dom",
            "week-number": "N",
            "month-name": ["janeiro", "fevereiro", "março", "abril", "maio", "junho", "julho", "agosto", "setembro", "outubro", "novembro", "dezembro"],
            "shortcuts": "Atalhos",
            "custom-values": "Valores Personalizados",
            "past": "Passado",
            "following": "Seguinte",
            "previous": "Anterior",
            "prev-week": "Semana",
            "prev-month": "Mês",
            "prev-year": "Ano",
            "next": "Próximo",
            "next-week": "Próxima Semana",
            "next-month": "Próximo Mês",
            "next-year": "Próximo Ano",
            "less-than": "O período selecionado não deve ser maior que %d dias",
            "more-than": "O período selecionado não deve ser menor que %d dias",
            "default-more": "Selecione um período superior a %d dias",
            "default-single": "Selecione uma data",
            "default-less": "Selecione um período inferior a %d dias",
            "default-range": "Selecione um período de %d a %d dias",
            "default-default": "Selecione um período",
            "time": "Tempo",
            "hour": "Hora",
            "minute": "Minuto"
        },
        "tc": // traditional chinese
        {
            "selected": "已選擇:",
            "day": "天",
            "days": "天",
            "apply": "確定",
            "week-1": "一",
            "week-2": "二",
            "week-3": "三",
            "week-4": "四",
            "week-5": "五",
            "week-6": "六",
            "week-7": "日",
            "week-number": "周",
            "month-name": ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"],
            "shortcuts": "快速選擇",
            "past": "過去",
            "following": "將來",
            "previous": "&nbsp;&nbsp;&nbsp;",
            "prev-week": "上週",
            "prev-month": "上個月",
            "prev-year": "去年",
            "next": "&nbsp;&nbsp;&nbsp;",
            "next-week": "下周",
            "next-month": "下個月",
            "next-year": "明年",
            "less-than": "所選日期範圍不能大於%d天",
            "more-than": "所選日期範圍不能小於%d天",
            "default-more": "請選擇大於%d天的日期範圍",
            "default-less": "請選擇小於%d天的日期範圍",
            "default-range": "請選擇%d天到%d天的日期範圍",
            "default-single": "請選擇一個日期",
            "default-default": "請選擇一個日期範圍",
            "time": "日期",
            "hour": "小時",
            "minute": "分鐘"
        },
        "ja": {
            "selected": "選択しました:",
            "day": "日",
            "days": "日々",
            "apply": "閉じる",
            "week-1": "月",
            "week-2": "火",
            "week-3": "水",
            "week-4": "木",
            "week-5": "金",
            "week-6": "土",
            "week-7": "日",
            "month-name": ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"],
            "shortcuts": "クイック選択",
            "past": "過去",
            "following": "将来",
            "previous": "&nbsp;&nbsp;&nbsp;",
            "prev-week": "先週、",
            "prev-month": "先月",
            "prev-year": "昨年",
            "next": "&nbsp;&nbsp;&nbsp;",
            "next-week": "来週",
            "next-month": "来月",
            "next-year": "来年",
            "less-than": "日付の範囲は ％d 日以上にすべきではありません",
            "more-than": "日付の範囲は ％d 日を下回ってはいけません",
            "default-more": "％d 日よりも長い期間を選択してください",
            "default-less": "％d 日未満の期間を選択してください",
            "default-range": "％d と％ d日の間の日付範囲を選択してください",
            "default-single": "日付を選択してください",
            "default-default": "日付範囲を選択してください",
            "time": "時間",
            "hour": "時間",
            "minute": "分"
        },
        "da": {
            "selected": "Valgt:",
            "day": "Dag",
            "days": "Dage",
            "apply": "Luk",
            "week-1": "ma",
            "week-2": "ti",
            "week-3": "on",
            "week-4": "to",
            "week-5": "fr",
            "week-6": "lö",
            "week-7": "sö",
            "month-name": ["januar", "februar", "marts", "april", "maj", "juni", "juli", "august", "september", "oktober", "november", "december"],
            "shortcuts": "genveje",
            "custom-values": "Brugerdefinerede værdier",
            "past": "Forbi",
            "following": "Følgende",
            "previous": "Forrige",
            "prev-week": "uge",
            "prev-month": "månad",
            "prev-year": "år",
            "next": "Næste",
            "next-week": "Næste uge",
            "next-month": "Næste måned",
            "next-year": "Næste år",
            "less-than": "Dato interval bør ikke være med end %d dage",
            "more-than": "Dato interval bør ikke være mindre end %d dage",
            "default-more": "Vælg datointerval længere end %d dage",
            "default-single": "Vælg dato",
            "default-less": "Vælg datointerval mindre end %d dage",
            "default-range": "Vælg datointerval mellem %d og %d dage",
            "default-default": "Vælg datointerval",
            "time": "tid",
            "hour": "time",
            "minute": "minut"
        },
        "fi": // Finnish
        {
            "selected": "Valittu:",
            "day": "Päivä",
            "days": "Päivää",
            "apply": "Sulje",
            "week-1": "ma",
            "week-2": "ti",
            "week-3": "ke",
            "week-4": "to",
            "week-5": "pe",
            "week-6": "la",
            "week-7": "su",
            "week-number": "V",
            "month-name": ["tammikuu", "helmikuu", "maaliskuu", "huhtikuu", "toukokuu", "kesäkuu", "heinäkuu", "elokuu", "syyskuu", "lokakuu", "marraskuu", "joulukuu"],
            "shortcuts": "Pikavalinnat",
            "custom-values": "Mukautetut Arvot",
            "past": "Menneet",
            "following": "Tulevat",
            "previous": "Edellinen",
            "prev-week": "Viikko",
            "prev-month": "Kuukausi",
            "prev-year": "Vuosi",
            "next": "Seuraava",
            "next-week": "Viikko",
            "next-month": "Kuukausi",
            "next-year": "Vuosi",
            "less-than": "Aikajakson tulisi olla vähemmän kuin %d päivää",
            "more-than": "Aikajakson ei tulisi olla vähempää kuin %d päivää",
            "default-more": "Valitse pidempi aikajakso kuin %d päivää",
            "default-single": "Valitse päivä",
            "default-less": "Valitse lyhyempi aikajakso kuin %d päivää",
            "default-range": "Valitse aikajakso %d ja %d päivän väliltä",
            "default-default": "Valitse aikajakso",
            "time": "Aika",
            "hour": "Tunti",
            "minute": "Minuutti"
        },
        "cat": // Catala
        {
            "selected": "Seleccionats:",
            "day": "Dia",
            "days": "Dies",
            "apply": "Tanca",
            "week-1": "Dl",
            "week-2": "Dm",
            "week-3": "Dc",
            "week-4": "Dj",
            "week-5": "Dv",
            "week-6": "Ds",
            "week-7": "Dg",
            "week-number": "S",
            "month-name": ["gener", "febrer", "març", "abril", "maig", "juny", "juliol", "agost", "setembre", "octubre", "novembre", "desembre"],
            "shortcuts": "Dreçeres",
            "custom-values": "Valors personalitzats",
            "past": "Passat",
            "following": "Futur",
            "previous": "Anterior",
            "prev-week": "Setmana",
            "prev-month": "Mes",
            "prev-year": "Any",
            "next": "Següent",
            "next-week": "Setmana",
            "next-month": "Mes",
            "next-year": "Any",
            "less-than": "El període no hauria de ser de més de %d dies",
            "more-than": "El període no hauria de ser de menys de %d dies",
            "default-more": "Perfavor selecciona un període més gran de %d dies",
            "default-single": "Perfavor selecciona una data",
            "default-less": "Perfavor selecciona un període de menys de %d dies",
            "default-range": "Perfavor selecciona un període d'entre %d i %d dies",
            "default-default": "Perfavor selecciona un període",
            "time": "Temps",
            "hour": "Hora",
            "minute": "Minut"
        }
    };

    $.fn.dateRangePicker = function(opt) {
        if (!opt) opt = {};
        opt = $.extend(true, {
            autoClose: false,
            format: 'YYYY-MM-DD',
            separator: ' to ',
            language: 'auto',
            startOfWeek: 'sunday', // or monday
            getValue: function() {
                return $(this).val();
            },
            setValue: function(s) {
                if (!$(this).attr('readonly') && !$(this).is(':disabled') && s != $(this).val()) {
                    $(this).val(s);
                }
            },
            startDate: false,
            endDate: false,
            time: {
                enabled: false
            },
            minDays: 0,
            maxDays: 0,
            showShortcuts: false,
            shortcuts: {
                //'prev-days': [1,3,5,7],
                // 'next-days': [3,5,7],
                //'prev' : ['week','month','year'],
                // 'next' : ['week','month','year']
            },
            customShortcuts: [],
            inline: false,
            container: 'body',
            alwaysOpen: false,
            singleDate: false,
            lookBehind: false,
            batchMode: false,
            duration: 200,
            stickyMonths: false,
            dayDivAttrs: [],
            dayTdAttrs: [],
            selectForward: false,
            selectBackward: false,
            applyBtnClass: '',
            singleMonth: 'auto',
            hoveringTooltip: function(days, startTime, hoveringTime) {
                days = days - 1;
                if (days >= 1)
                {
                    return days > 1 ? days + ' ' + translate('days') : days + ' ' + translate('day');
                }
                else
                {
                    return '';
                }
            },
            showTopbar: true,
            swapTime: false,
            showWeekNumbers: false,
            getWeekNumber: function(date) //date will be the first day of a week
            {
                return moment(date).format('w');
            },
            customOpenAnimation: null,
            customCloseAnimation: null,
            customArrowPrevSymbol: null,
            customArrowNextSymbol: null,
            monthSelect: false,
            yearSelect: false
        }, opt);

        opt.start = false;
        opt.end = false;

        opt.startWeek = false;

        //detect a touch device
        opt.isTouchDevice = 'ontouchstart' in window || navigator.msMaxTouchPoints;

        //if it is a touch device, hide hovering tooltip
        if (opt.isTouchDevice) opt.hoveringTooltip = false;

        //show one month on mobile devices
        if (opt.singleMonth == 'auto') opt.singleMonth = $(window).width() < 480;
        if (opt.singleMonth) opt.stickyMonths = false;

        if (!opt.showTopbar) opt.autoClose = true;

        if (opt.startDate && typeof opt.startDate == 'string') opt.startDate = moment(opt.startDate, opt.format).toDate();
        if (opt.endDate && typeof opt.endDate == 'string') opt.endDate = moment(opt.endDate, opt.format).toDate();

        if (opt.yearSelect && typeof opt.yearSelect === 'boolean') {
            opt.yearSelect = function(current) { return [current - 5, current + 5]; }
        }

        var languages = getLanguages();
        var box;
        var initiated = false;
        var self = this;
        var selfDom = $(self).get(0);
        var domChangeTimer;

        $(this).off('.datepicker').on('click.datepicker', function(evt) {
            var isOpen = box.is(':visible');
            if (!isOpen) open(opt.duration);
        }).on('change.datepicker', function(evt) {
            checkAndSetDefaultValue();
        }).on('keyup.datepicker', function() {
            try {
                clearTimeout(domChangeTimer);
            } catch (e) {}
            domChangeTimer = setTimeout(function() {
                checkAndSetDefaultValue();
            }, 2000);
        });

        init_datepicker.call(this);

        if (opt.alwaysOpen) {
            open(0);
        }

        // expose some api
        $(this).data('dateRangePicker', {
            setStart: function(d1) {
                if (typeof d1 == 'string') {
                    d1 = moment(d1, opt.format).toDate();
                }

                opt.end = false;
                setSingleDate(d1);

                return this;
            },
            setEnd: function(d2, silent) {
                var start = new Date();
                start.setTime(opt.start);
                if (typeof d2 == 'string') {
                    d2 = moment(d2, opt.format).toDate();
                }
                setDateRange(start, d2, silent);
                return this;
            },
            setDateRange: function(d1, d2, silent) {
                if (typeof d1 == 'string' && typeof d2 == 'string') {
                    d1 = moment(d1, opt.format).toDate();
                    d2 = moment(d2, opt.format).toDate();
                }
                setDateRange(d1, d2, silent);
            },
            clear: clearSelection,
            close: closeDatePicker,
            open: open,
            redraw: redrawDatePicker,
            getDatePicker: getDatePicker,
            resetMonthsView: resetMonthsView,
            destroy: function() {
                $(self).off('.datepicker');
                $(self).data('dateRangePicker', '');
                $(self).data('date-picker-opened', null);
                box.remove();
                $(window).off('resize.datepicker', calcPosition);
                $(document).off('click.datepicker', outsideClickClose);
            }
        });

        $(window).on('resize.datepicker', calcPosition);

        return this;

        function IsOwnDatePickerClicked(evt, selfObj) {
            return (selfObj.contains(evt.target) || evt.target == selfObj || (selfObj.childNodes != undefined && $.inArray(evt.target, selfObj.childNodes) >= 0));
        }

        function init_datepicker() {
            var self = this;

            if ($(this).data('date-picker-opened')) {
                closeDatePicker();
                return;
            }
            $(this).data('date-picker-opened', true);


            box = createDom().hide();
            box.append('<div class="date-range-length-tip"></div>');

            $(opt.container).append(box);

            if (!opt.inline) {
                calcPosition();
            } else {
                box.addClass('inline-wrapper');
            }

            if (opt.alwaysOpen) {
                box.find('.apply-btn').hide();
            }

            var defaultTime = getDefaultTime();
            resetMonthsView(defaultTime);

            if (opt.time.enabled) {
                if ((opt.startDate && opt.endDate) || (opt.start && opt.end)) {
                    showTime(moment(opt.start || opt.startDate).toDate(), 'time1');
                    showTime(moment(opt.end || opt.endDate).toDate(), 'time2');
                } else {
                    var defaultEndTime = opt.defaultEndTime ? opt.defaultEndTime : defaultTime;
                    showTime(defaultTime, 'time1');
                    showTime(defaultEndTime, 'time2');
                }
            }

            //showSelectedInfo();


            var defaultTopText = '';
            if (opt.singleDate)
                defaultTopText = translate('default-single');
            else if (opt.minDays && opt.maxDays)
                defaultTopText = translate('default-range');
            else if (opt.minDays)
                defaultTopText = translate('default-more');
            else if (opt.maxDays)
                defaultTopText = translate('default-less');
            else
                defaultTopText = translate('default-default');

            box.find('.default-top').html(defaultTopText.replace(/\%d/, opt.minDays).replace(/\%d/, opt.maxDays));
            if (opt.singleMonth) {
                box.addClass('single-month');
            } else {
                box.addClass('two-months');
            }


            setTimeout(function() {
                updateCalendarWidth();
                initiated = true;
            }, 0);

            box.click(function(evt) {
                evt.stopPropagation();
            });

            //if user click other place of the webpage, close date range picker window
            $(document).on('click.datepicker', outsideClickClose);

            box.find('.next').click(function() {
                if (!opt.stickyMonths)
                    gotoNextMonth(this);
                else
                    gotoNextMonth_stickily(this);
            });

            function gotoNextMonth(self) {
                var isMonth2 = $(self).parents('table').hasClass('month2');
                var month = isMonth2 ? opt.month2 : opt.month1;
                month = nextMonth(month);
                if (!opt.singleMonth && !opt.singleDate && !isMonth2 && compare_month(month, opt.month2) >= 0 || isMonthOutOfBounds(month)) return;
                showMonth(month, isMonth2 ? 'month2' : 'month1');
                showGap();
            }

            function gotoNextMonth_stickily(self) {
                var nextMonth1 = nextMonth(opt.month1);
                var nextMonth2 = nextMonth(opt.month2);
                if (isMonthOutOfBounds(nextMonth2)) return;
                if (!opt.singleDate && compare_month(nextMonth1, nextMonth2) >= 0) return;
                showMonth(nextMonth1, 'month1');
                showMonth(nextMonth2, 'month2');
                showSelectedDays();
            }


            box.find('.prev').click(function() {
                if (!opt.stickyMonths)
                    gotoPrevMonth(this);
                else
                    gotoPrevMonth_stickily(this);
            });

            function gotoPrevMonth(self) {
                var isMonth2 = $(self).parents('table').hasClass('month2');
                var month = isMonth2 ? opt.month2 : opt.month1;
                month = prevMonth(month);
                if (isMonth2 && compare_month(month, opt.month1) <= 0 || isMonthOutOfBounds(month)) return;
                showMonth(month, isMonth2 ? 'month2' : 'month1');
                showGap();
            }

            function gotoPrevMonth_stickily(self) {
                var prevMonth1 = prevMonth(opt.month1);
                var prevMonth2 = prevMonth(opt.month2);
                if (isMonthOutOfBounds(prevMonth1)) return;
                if (!opt.singleDate && compare_month(prevMonth2, prevMonth1) <= 0) return;
                showMonth(prevMonth2, 'month2');
                showMonth(prevMonth1, 'month1');
                showSelectedDays();
            }

            box.attr('unselectable', 'on')
                .css('user-select', 'none')
                .on('selectstart', function(e) {
                    e.preventDefault();
                    return false;
                });

            box.find('.apply-btn').click(function() {
                closeDatePicker();
                var dateRange = getDateString(new Date(opt.start)) + opt.separator + getDateString(new Date(opt.end));
                $(self).trigger('datepicker-apply', {
                    'value': dateRange,
                    'date1': new Date(opt.start),
                    'date2': new Date(opt.end)
                });
            });

            box.find('[custom]').click(function() {
                var valueName = $(this).attr('custom');
                opt.start = false;
                opt.end = false;
                box.find('.day.checked').removeClass('checked');
                opt.setValue.call(selfDom, valueName);
                checkSelectionValid();
                showSelectedInfo(true);
                showSelectedDays();
                if (opt.autoClose) closeDatePicker();
            });

            box.find('[shortcut]').click(function() {
                var shortcut = $(this).attr('shortcut');
                var end = new Date(),
                    start = false;
                var dir;
                if (shortcut.indexOf('day') != -1) {
                    var day = parseInt(shortcut.split(',', 2)[1], 10);
                    start = new Date(new Date().getTime() + 86400000 * day);
                    end = new Date(end.getTime() + 86400000 * (day > 0 ? 1 : -1));
                } else if (shortcut.indexOf('week') != -1) {
                    dir = shortcut.indexOf('prev,') != -1 ? -1 : 1;
                    var stopDay;
                    if (dir == 1)
                        stopDay = opt.startOfWeek == 'monday' ? 1 : 0;
                    else
                        stopDay = opt.startOfWeek == 'monday' ? 0 : 6;

                    end = new Date(end.getTime() - 86400000);
                    while (end.getDay() != stopDay) end = new Date(end.getTime() + dir * 86400000);
                    start = new Date(end.getTime() + dir * 86400000 * 6);
                } else if (shortcut.indexOf('month') != -1) {
                    dir = shortcut.indexOf('prev,') != -1 ? -1 : 1;
                    if (dir == 1)
                        start = nextMonth(end);
                    else
                        start = prevMonth(end);
                    start.setDate(1);
                    end = nextMonth(start);
                    end.setDate(1);
                    end = new Date(end.getTime() - 86400000);
                } else if (shortcut.indexOf('year') != -1) {
                    dir = shortcut.indexOf('prev,') != -1 ? -1 : 1;
                    start = new Date();
                    start.setFullYear(end.getFullYear() + dir);
                    start.setMonth(0);
                    start.setDate(1);
                    end.setFullYear(end.getFullYear() + dir);
                    end.setMonth(11);
                    end.setDate(31);
                } else if (shortcut == 'custom') {
                    var name = $(this).html();
                    if (opt.customShortcuts && opt.customShortcuts.length > 0) {
                        for (var i = 0; i < opt.customShortcuts.length; i++) {
                            var sh = opt.customShortcuts[i];
                            if (sh.name == name) {
                                var data = [];
                                // try
                                // {
                                data = sh['dates'].call();
                                //}catch(e){}
                                if (data && data.length == 2) {
                                    start = data[0];
                                    end = data[1];
                                }

                                // if only one date is specified then just move calendars there
                                // move calendars to show this date's month and next months
                                if (data && data.length == 1) {
                                    var movetodate = data[0];
                                    showMonth(movetodate, 'month1');
                                    showMonth(nextMonth(movetodate), 'month2');
                                    showGap();
                                }

                                break;
                            }
                        }
                    }
                }
                if (start && end) {
                    setDateRange(start, end);
                    checkSelectionValid();
                }
            });

            box.find('.time1 input[type=range]').on('change touchmove', function(e) {
                var target = e.target,
                    hour = target.name == 'hour' ? $(target).val().replace(/^(\d{1})$/, '0$1') : undefined,
                    min = target.name == 'minute' ? $(target).val().replace(/^(\d{1})$/, '0$1') : undefined;
                setTime('time1', hour, min);
            });

            box.find('.time2 input[type=range]').on('change touchmove', function(e) {
                var target = e.target,
                    hour = target.name == 'hour' ? $(target).val().replace(/^(\d{1})$/, '0$1') : undefined,
                    min = target.name == 'minute' ? $(target).val().replace(/^(\d{1})$/, '0$1') : undefined;
                setTime('time2', hour, min);
            });

        }


        function calcPosition() {
            if (!opt.inline) {
                var offset = $(self).offset();
                if ($(opt.container).css('position') == 'relative') {
                    var containerOffset = $(opt.container).offset();
                    var leftIndent = Math.max(0, offset.left + box.outerWidth() - $('body').width() + 16);
                    box.css({
                        top: offset.top - containerOffset.top + $(self).outerHeight() + 4,
                        left: offset.left - containerOffset.left - leftIndent
                    });
                } else {
                    if (offset.left < 460) //left to right
                    {
                        box.css({
                            top: offset.top + $(self).outerHeight() + parseInt($('body').css('border-top') || 0, 10),
                            left: offset.left
                        });
                    } else {
                        box.css({
                            top: offset.top + $(self).outerHeight() + parseInt($('body').css('border-top') || 0, 10),
                            left: offset.left + $(self).width() - box.width() - 16
                        });
                    }
                }
            }
        }

        // Return the date picker wrapper element
        function getDatePicker() {
            return box;
        }

        function open(animationTime) {
            redrawDatePicker();
            checkAndSetDefaultValue();
            if (opt.customOpenAnimation) {
                opt.customOpenAnimation.call(box.get(0), function() {
                    $(self).trigger('datepicker-opened', {
                        relatedTarget: box
                    });
                });
            } else {
                box.slideDown(animationTime, function() {
                    $(self).trigger('datepicker-opened', {
                        relatedTarget: box
                    });
                });
            }
            $(self).trigger('datepicker-open', {
                relatedTarget: box
            });
            showGap();
            updateCalendarWidth();
            calcPosition();
        }

        function checkAndSetDefaultValue() {
            var __default_string = opt.getValue.call(selfDom);
            var defaults = __default_string ? __default_string.split(opt.separator) : '';

            if (defaults && ((defaults.length == 1 && opt.singleDate) || defaults.length >= 2)) {
                var ___format = opt.format;
                if (___format.match(/Do/)) {

                    ___format = ___format.replace(/Do/, 'D');
                    defaults[0] = defaults[0].replace(/(\d+)(th|nd|st)/, '$1');
                    if (defaults.length >= 2) {
                        defaults[1] = defaults[1].replace(/(\d+)(th|nd|st)/, '$1');
                    }
                }
                // set initiated  to avoid triggerring datepicker-change event
                initiated = false;
                if (defaults.length >= 2) {
                    setDateRange(getValidValue(defaults[0], ___format, moment.locale(opt.language)), getValidValue(defaults[1], ___format, moment.locale(opt.language)));
                } else if (defaults.length == 1 && opt.singleDate) {
                    setSingleDate(getValidValue(defaults[0], ___format, moment.locale(opt.language)));
                }

                initiated = true;
            }
        }

        function getValidValue(date, format, locale) {
            if (moment(date, format, locale).isValid()) {
                return moment(date, format, locale).toDate();
            } else {
                return moment().toDate();
            }
        }

        function updateCalendarWidth() {
            var gapMargin = box.find('.gap').css('margin-left');
            if (gapMargin) gapMargin = parseInt(gapMargin);
            var w1 = box.find('.month1').width();
            var w2 = box.find('.gap').width() + (gapMargin ? gapMargin * 2 : 0);
            var w3 = box.find('.month2').width();
            box.find('.month-wrapper').width(w1 + w2 + w3);
        }

        function renderTime(name, date) {
            box.find('.' + name + ' input[type=range].hour-range').val(moment(date).hours());
            box.find('.' + name + ' input[type=range].minute-range').val(moment(date).minutes());
            setTime(name, moment(date).format('HH'), moment(date).format('mm'));
        }

        function changeTime(name, date) {
            opt[name] = parseInt(
                moment(parseInt(date))
                .startOf('day')
                .add(moment(opt[name + 'Time']).format('HH'), 'h')
                .add(moment(opt[name + 'Time']).format('mm'), 'm').valueOf()
            );
        }

        function swapTime() {
            renderTime('time1', opt.start);
            renderTime('time2', opt.end);
        }

        function setTime(name, hour, minute) {
            hour && (box.find('.' + name + ' .hour-val').text(hour));
            minute && (box.find('.' + name + ' .minute-val').text(minute));
            switch (name) {
                case 'time1':
                    if (opt.start) {
                        setRange('start', moment(opt.start));
                    }
                    setRange('startTime', moment(opt.startTime || moment().valueOf()));
                    break;
                case 'time2':
                    if (opt.end) {
                        setRange('end', moment(opt.end));
                    }
                    setRange('endTime', moment(opt.endTime || moment().valueOf()));
                    break;
            }

            function setRange(name, timePoint) {
                var h = timePoint.format('HH'),
                    m = timePoint.format('mm');
                opt[name] = timePoint
                    .startOf('day')
                    .add(hour || h, 'h')
                    .add(minute || m, 'm')
                    .valueOf();
            }
            checkSelectionValid();
            showSelectedInfo();
            showSelectedDays();
        }

        function clearSelection() {
            opt.start = false;
            opt.end = false;
            box.find('.day.checked').removeClass('checked');
            box.find('.day.last-date-selected').removeClass('last-date-selected');
            box.find('.day.first-date-selected').removeClass('first-date-selected');
            opt.setValue.call(selfDom, '');
            checkSelectionValid();
            showSelectedInfo();
            showSelectedDays();
        }

        function handleStart(time) {
            var r = time;
            if (opt.batchMode === 'week-range') {
                if (opt.startOfWeek === 'monday') {
                    r = moment(parseInt(time)).startOf('isoweek').valueOf();
                } else {
                    r = moment(parseInt(time)).startOf('week').valueOf();
                }
            } else if (opt.batchMode === 'month-range') {
                r = moment(parseInt(time)).startOf('month').valueOf();
            }
            return r;
        }

        function handleEnd(time) {
            var r = time;
            if (opt.batchMode === 'week-range') {
                if (opt.startOfWeek === 'monday') {
                    r = moment(parseInt(time)).endOf('isoweek').valueOf();
                } else {
                    r = moment(parseInt(time)).endOf('week').valueOf();
                }
            } else if (opt.batchMode === 'month-range') {
                r = moment(parseInt(time)).endOf('month').valueOf();
            }
            return r;
        }


        function dayClicked(day) {
            if (day.hasClass('invalid')) return;
            var time = day.attr('time');
            day.addClass('checked');
            if (opt.singleDate) {
                opt.start = time;
                opt.end = false;
            } else if (opt.batchMode === 'week') {
                if (opt.startOfWeek === 'monday') {
                    opt.start = moment(parseInt(time)).startOf('isoweek').valueOf();
                    opt.end = moment(parseInt(time)).endOf('isoweek').valueOf();
                } else {
                    opt.end = moment(parseInt(time)).endOf('week').valueOf();
                    opt.start = moment(parseInt(time)).startOf('week').valueOf();
                }
            } else if (opt.batchMode === 'workweek') {
                opt.start = moment(parseInt(time)).day(1).valueOf();
                opt.end = moment(parseInt(time)).day(5).valueOf();
            } else if (opt.batchMode === 'weekend') {
                opt.start = moment(parseInt(time)).day(6).valueOf();
                opt.end = moment(parseInt(time)).day(7).valueOf();
            } else if (opt.batchMode === 'month') {
                opt.start = moment(parseInt(time)).startOf('month').valueOf();
                opt.end = moment(parseInt(time)).endOf('month').valueOf();
            } else if ((opt.start && opt.end) || (!opt.start && !opt.end)) {
                opt.start = handleStart(time);
                opt.end = false;
            } else if (opt.start) {
                opt.end = handleEnd(time);
                if (opt.time.enabled) {
                    changeTime('end', opt.end);
                }
            }

            //Update time in case it is enabled and timestamps are available
            if (opt.time.enabled) {
                if (opt.start) {
                    changeTime('start', opt.start);
                }
                if (opt.end) {
                    changeTime('end', opt.end);
                }
            }

            //In case the start is after the end, swap the timestamps
            if (!opt.singleDate && opt.start && opt.end && opt.start > opt.end) {
                var tmp = opt.end;
                opt.end = handleEnd(opt.start);
                opt.start = handleStart(tmp);
                if (opt.time.enabled && opt.swapTime) {
                    swapTime();
                }
            }

            opt.start = parseInt(opt.start);
            opt.end = parseInt(opt.end);

            clearHovering();
            if (opt.start && !opt.end) {
                $(self).trigger('datepicker-first-date-selected', {
                    'date1': new Date(opt.start)
                });
                dayHovering(day);
            }
            updateSelectableRange(time);

            checkSelectionValid();
            showSelectedInfo();
            showSelectedDays();
            autoclose();
        }


        function weekNumberClicked(weekNumberDom) {
            var thisTime = parseInt(weekNumberDom.attr('data-start-time'), 10);
            var date1, date2;
            if (!opt.startWeek) {
                opt.startWeek = thisTime;
                weekNumberDom.addClass('week-number-selected');
                date1 = new Date(thisTime);
                opt.start = moment(date1).day(opt.startOfWeek == 'monday' ? 1 : 0).valueOf();
                opt.end = moment(date1).day(opt.startOfWeek == 'monday' ? 7 : 6).valueOf();
            } else {
                box.find('.week-number-selected').removeClass('week-number-selected');
                date1 = new Date(thisTime < opt.startWeek ? thisTime : opt.startWeek);
                date2 = new Date(thisTime < opt.startWeek ? opt.startWeek : thisTime);
                opt.startWeek = false;
                opt.start = moment(date1).day(opt.startOfWeek == 'monday' ? 1 : 0).valueOf();
                opt.end = moment(date2).day(opt.startOfWeek == 'monday' ? 7 : 6).valueOf();
            }
            updateSelectableRange();
            checkSelectionValid();
            showSelectedInfo();
            showSelectedDays();
            autoclose();
        }

        function isValidTime(time) {
            time = parseInt(time, 10);
            if (opt.startDate && compare_day(time, opt.startDate) < 0) return false;
            if (opt.endDate && compare_day(time, opt.endDate) > 0) return false;

            if (opt.start && !opt.end && !opt.singleDate) {
                //check maxDays and minDays setting
                if (opt.maxDays > 0 && countDays(time, opt.start) > opt.maxDays) return false;
                if (opt.minDays > 0 && countDays(time, opt.start) < opt.minDays) return false;

                //check selectForward and selectBackward
                if (opt.selectForward && time < opt.start) return false;
                if (opt.selectBackward && time > opt.start) return false;

                //check disabled days
                if (opt.beforeShowDay && typeof opt.beforeShowDay == 'function') {
                    var valid = true;
                    var timeTmp = time;
                    while (countDays(timeTmp, opt.start) > 1) {
                        var arr = opt.beforeShowDay(new Date(timeTmp));
                        if (!arr[0]) {
                            valid = false;
                            break;
                        }
                        if (Math.abs(timeTmp - opt.start) < 86400000) break;
                        if (timeTmp > opt.start) timeTmp -= 86400000;
                        if (timeTmp < opt.start) timeTmp += 86400000;
                    }
                    if (!valid) return false;
                }
            }
            return true;
        }


        function updateSelectableRange() {
            box.find('.day.invalid.tmp').removeClass('tmp invalid').addClass('valid');
            if (opt.start && !opt.end) {
                box.find('.day.toMonth.valid').each(function() {
                    var time = parseInt($(this).attr('time'), 10);
                    if (!isValidTime(time))
                        $(this).addClass('invalid tmp').removeClass('valid');
                    else
                        $(this).addClass('valid tmp').removeClass('invalid');
                });
            }

            return true;
        }


        function dayHovering(day) {
            var hoverTime = parseInt(day.attr('time'));
            var tooltip = '';

            if (day.hasClass('has-tooltip') && day.attr('data-tooltip')) {
                tooltip = '<span class="tooltip-content">' + day.attr('data-tooltip') + '</span>';
            } else if (!day.hasClass('invalid')) {
                if (opt.singleDate) {
                    box.find('.day.hovering').removeClass('hovering');
                    day.addClass('hovering');
                } else {
                    box.find('.day').each(function() {
                        var time = parseInt($(this).attr('time')),
                            start = opt.start,
                            end = opt.end;

                        if (time == hoverTime) {
                            $(this).addClass('hovering');
                        } else {
                            $(this).removeClass('hovering');
                        }

                        if (
                            (opt.start && !opt.end) &&
                            (
                                (opt.start < time && hoverTime >= time) ||
                                (opt.start > time && hoverTime <= time)
                            )
                        ) {
                            $(this).addClass('hovering');
                        } else {
                            $(this).removeClass('hovering');
                        }
                    });

                    if (opt.start && !opt.end) {
                        var days = countDays(hoverTime, opt.start);
                        if (opt.hoveringTooltip) {
                            if (typeof opt.hoveringTooltip == 'function') {
                                tooltip = opt.hoveringTooltip(days, opt.start, hoverTime);
                            } else if (opt.hoveringTooltip === true && days > 1) {
                                tooltip = days + ' ' + translate('days');
                            }
                        }
                    }
                }
            }

            if (tooltip) {
                var posDay = day.offset();
                var posBox = box.offset();

                var _left = posDay.left - posBox.left;
                var _top = posDay.top - posBox.top;
                _left += day.width() / 2;


                var $tip = box.find('.date-range-length-tip');
                var w = $tip.css({
                    'visibility': 'hidden',
                    'display': 'none'
                }).html(tooltip).width();
                var h = $tip.height();
                _left -= w / 2;
                _top -= h;
                setTimeout(function() {
                    $tip.css({
                        left: _left,
                        top: _top,
                        display: 'block',
                        'visibility': 'visible'
                    });
                }, 10);
            } else {
                box.find('.date-range-length-tip').hide();
            }
        }

        function clearHovering() {
            box.find('.day.hovering').removeClass('hovering');
            box.find('.date-range-length-tip').hide();
        }

        function dateChanged(date) {
            var value = date.val();
            var name = date.attr('name');
            var type = date.parents('table').hasClass('month1') ? 'month1' : 'month2';
            var oppositeType = type === 'month1' ? 'month2' : 'month1';
            var startDate = opt.startDate ? moment(opt.startDate) : false;
            var endDate = opt.endDate ? moment(opt.endDate) : false;
            var newDate = moment(opt[type])[name](value);


            if (startDate && newDate.isSameOrBefore(startDate)) {
                newDate = startDate.add(type === 'month2' ? 1 : 0, 'month');
            }

            if (endDate && newDate.isSameOrAfter(endDate)) {
                newDate = endDate.add(!opt.singleMonth && type === 'month1' ? -1 : 0, 'month');
            }

            showMonth(newDate, type);

            if (type === 'month1') {
                if (opt.stickyMonths || moment(newDate).isSameOrAfter(opt[oppositeType], 'month')) {
                    showMonth(moment(newDate).add(1, 'month'), oppositeType);
                }
            } else {
                if (opt.stickyMonths || moment(newDate).isSameOrBefore(opt[oppositeType], 'month')) {
                    showMonth(moment(newDate).add(-1, 'month'), oppositeType);
                }
            }

            showGap();
        }

        function autoclose() {
            if (opt.singleDate === true) {
                if (initiated && opt.start) {
                    if (opt.autoClose) closeDatePicker();
                }
            } else {
                if (initiated && opt.start && opt.end) {
                    if (opt.autoClose) closeDatePicker();
                }
            }
        }

        function checkSelectionValid() {
            var days = Math.ceil((opt.end - opt.start) / 86400000) + 1;
            if (opt.singleDate) { // Validate if only start is there
                if (opt.start && !opt.end)
                    box.find('.drp_top-bar').removeClass('error').addClass('normal');
                else
                    box.find('.drp_top-bar').removeClass('error').removeClass('normal');
            } else if (opt.maxDays && days > opt.maxDays) {
                opt.start = false;
                opt.end = false;
                box.find('.day').removeClass('checked');
                box.find('.drp_top-bar').removeClass('normal').addClass('error').find('.error-top').html(translate('less-than').replace('%d', opt.maxDays));
            } else if (opt.minDays && days < opt.minDays) {
                opt.start = false;
                opt.end = false;
                box.find('.day').removeClass('checked');
                box.find('.drp_top-bar').removeClass('normal').addClass('error').find('.error-top').html(translate('more-than').replace('%d', opt.minDays));
            } else {
                if (opt.start || opt.end)
                    box.find('.drp_top-bar').removeClass('error').addClass('normal');
                else
                    box.find('.drp_top-bar').removeClass('error').removeClass('normal');
            }

            if ((opt.singleDate && opt.start && !opt.end) || (!opt.singleDate && opt.start && opt.end)) {
                box.find('.apply-btn').removeClass('disabled');
            } else {
                box.find('.apply-btn').addClass('disabled');
            }

            if (opt.batchMode) {
                if (
                    (opt.start && opt.startDate && compare_day(opt.start, opt.startDate) < 0) ||
                    (opt.end && opt.endDate && compare_day(opt.end, opt.endDate) > 0)
                ) {
                    opt.start = false;
                    opt.end = false;
                    box.find('.day').removeClass('checked');
                }
            }
        }

        function showSelectedInfo(forceValid, silent) {
            box.find('.start-day').html('...');
            box.find('.end-day').html('...');
            box.find('.selected-days').hide();
            if (opt.start) {
                box.find('.start-day').html(getDateString(new Date(parseInt(opt.start))));
            }
            if (opt.end) {
                box.find('.end-day').html(getDateString(new Date(parseInt(opt.end))));
            }
            var dateRange;
            if (opt.start && opt.singleDate) {
                box.find('.apply-btn').removeClass('disabled');
                dateRange = getDateString(new Date(opt.start));
                opt.setValue.call(selfDom, dateRange, getDateString(new Date(opt.start)), getDateString(new Date(opt.end)));

                if (initiated && !silent) {
                    $(self).trigger('datepicker-change', {
                        'value': dateRange,
                        'date1': new Date(opt.start)
                    });
                }
            } else if (opt.start && opt.end) {
                box.find('.selected-days').show().find('.selected-days-num').html(countDays(opt.end, opt.start));
                box.find('.apply-btn').removeClass('disabled');
                dateRange = getDateString(new Date(opt.start)) + opt.separator + getDateString(new Date(opt.end));
                opt.setValue.call(selfDom, dateRange, getDateString(new Date(opt.start)), getDateString(new Date(opt.end)));
                if (initiated && !silent) {
                    $(self).trigger('datepicker-change', {
                        'value': dateRange,
                        'date1': new Date(opt.start),
                        'date2': new Date(opt.end)
                    });
                }
            } else if (forceValid) {
                box.find('.apply-btn').removeClass('disabled');
            } else {
                box.find('.apply-btn').addClass('disabled');
            }
        }

        function countDays(start, end) {
            return Math.abs(moment(start).diff(moment(end), 'd')) + 1;
        }

        function setDateRange(date1, date2, silent) {
            if (date1.getTime() > date2.getTime()) {
                var tmp = date2;
                date2 = date1;
                date1 = tmp;
                tmp = null;
            }
            var valid = true;
            if (opt.startDate && compare_day(date1, opt.startDate) < 0) valid = false;
            if (opt.endDate && compare_day(date2, opt.endDate) > 0) valid = false;
            if (!valid) {
                showMonth(opt.startDate, 'month1');
                showMonth(nextMonth(opt.startDate), 'month2');
                showGap();
                return;
            }

            opt.start = date1.getTime();
            opt.end = date2.getTime();

            if (opt.time.enabled) {
                renderTime('time1', date1);
                renderTime('time2', date2);
            }

            if (opt.stickyMonths || (compare_day(date1, date2) > 0 && compare_month(date1, date2) === 0)) {
                if (opt.lookBehind) {
                    date1 = prevMonth(date2);
                } else {
                    date2 = nextMonth(date1);
                }
            }

            if (opt.stickyMonths && opt.endDate !== false && compare_month(date2, opt.endDate) > 0) {
                date1 = prevMonth(date1);
                date2 = prevMonth(date2);
            }

            if (!opt.stickyMonths) {
                if (compare_month(date1, date2) === 0) {
                    if (opt.lookBehind) {
                        date1 = prevMonth(date2);
                    } else {
                        date2 = nextMonth(date1);
                    }
                }
            }

            showMonth(date1, 'month1');
            showMonth(date2, 'month2');
            showGap();
            checkSelectionValid();
            showSelectedInfo(false, silent);
            autoclose();
        }

        function setSingleDate(date1) {

            var valid = true;
            if (opt.startDate && compare_day(date1, opt.startDate) < 0) valid = false;
            if (opt.endDate && compare_day(date1, opt.endDate) > 0) valid = false;
            if (!valid) {
                showMonth(opt.startDate, 'month1');
                return;
            }

            opt.start = date1.getTime();


            if (opt.time.enabled) {
                renderTime('time1', date1);

            }
            showMonth(date1, 'month1');
            if (opt.singleMonth !== true) {
                var date2 = nextMonth(date1);
                showMonth(date2, 'month2');
            }
            showGap();
            showSelectedInfo();
            autoclose();
        }

        function showSelectedDays() {
            if (!opt.start && !opt.end) return;
            box.find('.day').each(function() {
                var time = parseInt($(this).attr('time')),
                    start = opt.start,
                    end = opt.end;
                if (opt.time.enabled) {
                    time = moment(time).startOf('day').valueOf();
                    start = moment(start || moment().valueOf()).startOf('day').valueOf();
                    end = moment(end || moment().valueOf()).startOf('day').valueOf();
                }
                if (
                    (opt.start && opt.end && end >= time && start <= time) ||
                    (opt.start && !opt.end && moment(start).format('YYYY-MM-DD') == moment(time).format('YYYY-MM-DD'))
                ) {
                    $(this).addClass('checked');
                } else {
                    $(this).removeClass('checked');
                }

                //add first-date-selected class name to the first date selected
                if (opt.start && moment(start).format('YYYY-MM-DD') == moment(time).format('YYYY-MM-DD')) {
                    $(this).addClass('first-date-selected');
                } else {
                    $(this).removeClass('first-date-selected');
                }
                //add last-date-selected
                if (opt.end && moment(end).format('YYYY-MM-DD') == moment(time).format('YYYY-MM-DD')) {
                    $(this).addClass('last-date-selected');
                } else {
                    $(this).removeClass('last-date-selected');
                }
            });

            box.find('.week-number').each(function() {
                if ($(this).attr('data-start-time') == opt.startWeek) {
                    $(this).addClass('week-number-selected');
                }
            });
        }

        function showMonth(date, month) {
            date = moment(date).toDate();
            var monthElement = generateMonthElement(date, month);
            var yearElement = generateYearElement(date, month);

            box.find('.' + month + ' .month-name').html(monthElement + ' ' + yearElement);
            box.find('.' + month + ' tbody').html(createMonthHTML(date));
            opt[month] = date;
            updateSelectableRange();
            bindEvents();
        }

        function generateMonthElement(date, month) {
            date = moment(date);
            var currentMonth = date.get('month');
            var currentMonthName = nameMonth(currentMonth);
            var nonSelectableMonth = '<div class="month-element">' + currentMonthName + '</div>';

            if (!opt.monthSelect) { return nonSelectableMonth; }

            var startDate = opt.startDate ? moment(opt.startDate).add(!opt.singleMonth && month === 'month2' ? 1 : 0, 'month') : false;
            var endDate = opt.endDate ? moment(opt.endDate).add(!opt.singleMonth && month === 'month1' ? -1 : 0, 'month') : false;

            var minSelectableMonth = startDate && date.isSame(startDate, 'year') ? startDate.get('month') : 0;
            var maxSelectableMonth = endDate && date.isSame(endDate, 'year') ? endDate.get('month') : 11;
            var minVisibleMonth = Math.min(minSelectableMonth, currentMonth);
            var maxVisibleMonth = Math.max(maxSelectableMonth, currentMonth);

            if (minVisibleMonth === maxVisibleMonth) { return nonSelectableMonth; }

            var selectData = generateSelectData(
                {
                    minSelectable: minSelectableMonth,
                    maxSelectable: maxSelectableMonth,
                    minVisible: minVisibleMonth,
                    maxVisible: maxVisibleMonth,
                },
                currentMonth,
                function (value) { return nameMonth(value); }
            )
            return generateSelect('month', selectData);
        }

        function generateYearElement(date, month) {
            date = moment(date);
            var currentYear = date.get('year');
            var nonSelectableMonth = '<div class="month-element">' + currentYear + '</div>';

            if (!opt.yearSelect) { return nonSelectableMonth; }

            var isYearFunction = opt.yearSelect && typeof opt.yearSelect === 'function';
            var startDate = opt.startDate ? moment(opt.startDate).add(!opt.singleMonth && month === 'month2' ? 1 : 0, 'month') : false;
            var endDate = opt.endDate ? moment(opt.endDate).add(!opt.singleMonth && month === 'month1' ? -1 : 0, 'month') : false;
            var range = isYearFunction ? opt.yearSelect(currentYear) : opt.yearSelect.slice();

            var minSelectableYear = startDate ? Math.max(range[0], startDate.get('year')) : Math.min(range[0], currentYear);
            var maxSelectableYear = endDate ? Math.min(range[1], endDate.get('year')) : Math.max(range[1], currentYear);
            var minVisibleYear = Math.min(minSelectableYear, currentYear);
            var maxVisibleYear = Math.max(maxSelectableYear, currentYear);

            if (minVisibleYear === maxVisibleYear) { return nonSelectableMonth; }

            var selectData = generateSelectData(
                {
                    minSelectable: minSelectableYear,
                    maxSelectable: maxSelectableYear,
                    minVisible: minVisibleYear,
                    maxVisible: maxVisibleYear,
                },
                currentYear
            )
            return generateSelect('year', selectData);
        }


        function generateSelectData(range, current, valueBeautifier) {
            var data = [];
            valueBeautifier = valueBeautifier || function(value) { return value; };

            for (var i = range.minVisible; i <= range.maxVisible; i++) {
                data.push({
                    value: i,
                    text: valueBeautifier(i),
                    selected: i === current,
                    disabled: ((i < range.minSelectable) || (i > range.maxSelectable)),
                });
            }

            return data;
        }

        function generateSelect(name, data) {
            var select = '<div class="select-wrapper"><select class="' + name + '" name="' + name + '">';
            var current;

            for (var i = 0, l = data.length; i < l; i++) {
                var item = data[i];
                select += '<option value="' + item.value + '"' +
                    (item.selected ? ' selected' : '') +
                    (item.disabled ? ' disabled' : '') + '>' +
                    item.text + '</option>';

                if (item.selected) {
                    current = item.text;
                }
            }

            select += '</select>' + current + '</div>';

            return select;
        }

        function bindEvents() {
            box.find('.day').off("click").click(function(evt) {
                dayClicked($(this));
            });

            box.find('.day').off("mouseenter").mouseenter(function(evt) {
                dayHovering($(this));
            });

            box.find('.day').off("mouseleave").mouseleave(function(evt) {
                box.find('.date-range-length-tip').hide();
                if (opt.singleDate) {
                    clearHovering();
                }
            });

            box.find('.week-number').off("click").click(function(evt) {
                weekNumberClicked($(this));
            });

            box.find('.month').off("change").change(function(evt) {
                dateChanged($(this));
            });

            box.find('.year').off("change").change(function(evt) {
                dateChanged($(this));
            });
        }

        function showTime(date, name) {
            box.find('.' + name).append(getTimeHTML());
            renderTime(name, date);
        }

        function nameMonth(m) {
            return translate('month-name')[m];
        }

        function getDateString(d) {
            return moment(d).format(opt.format);
        }

        function showGap() {
            showSelectedDays();
            var m1 = parseInt(moment(opt.month1).format('YYYYMM'));
            var m2 = parseInt(moment(opt.month2).format('YYYYMM'));
            var p = Math.abs(m1 - m2);
            var shouldShow = (p > 1 && p != 89);
            if (shouldShow) {
                box.addClass('has-gap').removeClass('no-gap').find('.gap').css('visibility', 'visible');
            } else {
                box.removeClass('has-gap').addClass('no-gap').find('.gap').css('visibility', 'hidden');
            }
            var h1 = box.find('table.month1').height();
            var h2 = box.find('table.month2').height();
            box.find('.gap').height(Math.max(h1, h2) + 10);
        }

        function closeDatePicker() {
            if (opt.alwaysOpen) return;

            var afterAnim = function() {
                $(self).data('date-picker-opened', false);
                $(self).trigger('datepicker-closed', {
                    relatedTarget: box
                });
            };
            if (opt.customCloseAnimation) {
                opt.customCloseAnimation.call(box.get(0), afterAnim);
            } else {
                $(box).slideUp(opt.duration, afterAnim);
            }
            $(self).trigger('datepicker-close', {
                relatedTarget: box
            });
        }

        function redrawDatePicker() {
            showMonth(opt.month1, 'month1');
            showMonth(opt.month2, 'month2');
        }

        function compare_month(m1, m2) {
            var p = parseInt(moment(m1).format('YYYYMM')) - parseInt(moment(m2).format('YYYYMM'));
            if (p > 0) return 1;
            if (p === 0) return 0;
            return -1;
        }

        function compare_day(m1, m2) {
            var p = parseInt(moment(m1).format('YYYYMMDD')) - parseInt(moment(m2).format('YYYYMMDD'));
            if (p > 0) return 1;
            if (p === 0) return 0;
            return -1;
        }

        function nextMonth(month) {
            return moment(month).add(1, 'months').toDate();
        }

        function prevMonth(month) {
            return moment(month).add(-1, 'months').toDate();
        }

        function getTimeHTML() {
            return '<div>' +
                '<span>' + translate('Time') + ': <span class="hour-val">00</span>:<span class="minute-val">00</span></span>' +
                '</div>' +
                '<div class="hour">' +
                '<label>' + translate('Hour') + ': <input type="range" class="hour-range" name="hour" min="0" max="23"></label>' +
                '</div>' +
                '<div class="minute">' +
                '<label>' + translate('Minute') + ': <input type="range" class="minute-range" name="minute" min="0" max="59"></label>' +
                '</div>';
        }

        function createDom() {
            var html = '<div class="date-picker-wrapper';
            if (opt.extraClass) html += ' ' + opt.extraClass + ' ';
            if (opt.singleDate) html += ' single-date ';
            if (!opt.showShortcuts) html += ' no-shortcuts ';
            if (!opt.showTopbar) html += ' no-topbar ';
            if (opt.customTopBar) html += ' custom-topbar ';
            html += '">';

            if (opt.showTopbar) {
                html += '<div class="drp_top-bar">';

                if (opt.customTopBar) {
                    if (typeof opt.customTopBar == 'function') opt.customTopBar = opt.customTopBar();
                    html += '<div class="custom-top">' + opt.customTopBar + '</div>';
                } else {
                    html += '<div class="normal-top">' +
                        '<span class="selection-top">' + translate('selected') + ' </span> <b class="start-day">...</b>';
                    if (!opt.singleDate) {
                        html += ' <span class="separator-day">' + opt.separator + '</span> <b class="end-day">...</b> <i class="selected-days">(<span class="selected-days-num">3</span> ' + translate('days') + ')</i>';
                    }
                    html += '</div>';
                    html += '<div class="error-top">error</div>' +
                        '<div class="default-top">default</div>';
                }

                html += '<input type="button" class="apply-btn disabled' + getApplyBtnClass() + '" value="' + translate('apply') + '" />';
                html += '</div>';
            }

            var _colspan = opt.showWeekNumbers ? 6 : 5;

            var arrowPrev = '&lt;';
            if (opt.customArrowPrevSymbol) arrowPrev = opt.customArrowPrevSymbol;

            var arrowNext = '&gt;';
            if (opt.customArrowNextSymbol) arrowNext = opt.customArrowNextSymbol;

            html += '<div class="month-wrapper">' +
                '   <table class="month1" cellspacing="0" border="0" cellpadding="0">' +
                '       <thead>' +
                '           <tr class="caption">' +
                '               <th>' +
                '                   <span class="prev">' +
                arrowPrev +
                '                   </span>' +
                '               </th>' +
                '               <th colspan="' + _colspan + '" class="month-name">' +
                '               </th>' +
                '               <th>' +
                (opt.singleDate || !opt.stickyMonths ? '<span class="next">' + arrowNext + '</span>' : '') +
                '               </th>' +
                '           </tr>' +
                '           <tr class="week-name">' + getWeekHead() +
                '       </thead>' +
                '       <tbody></tbody>' +
                '   </table>';

            if (hasMonth2()) {
                html += '<div class="gap">' + getGapHTML() + '</div>' +
                    '<table class="month2" cellspacing="0" border="0" cellpadding="0">' +
                    '   <thead>' +
                    '   <tr class="caption">' +
                    '       <th>' +
                    (!opt.stickyMonths ? '<span class="prev">' + arrowPrev + '</span>' : '') +
                    '       </th>' +
                    '       <th colspan="' + _colspan + '" class="month-name">' +
                    '       </th>' +
                    '       <th>' +
                    '           <span class="next">' + arrowNext + '</span>' +
                    '       </th>' +
                    '   </tr>' +
                    '   <tr class="week-name">' + getWeekHead() +
                    '   </thead>' +
                    '   <tbody></tbody>' +
                    '</table>';

            }
            //+'</div>'
            html += '<div class="dp-clearfix"></div>' +
                '<div class="time">' +
                '<div class="time1"></div>';
            if (!opt.singleDate) {
                html += '<div class="time2"></div>';
            }
            html += '</div>' +
                '<div class="dp-clearfix"></div>' +
                '</div>';

            html += '<div class="footer">';
            if (opt.showShortcuts) {
                html += '<div class="shortcuts"><b>' + translate('shortcuts') + '</b>';

                var data = opt.shortcuts;
                if (data) {
                    var name;
                    if (data['prev-days'] && data['prev-days'].length > 0) {
                        html += '&nbsp;<span class="prev-days">' + translate('past');
                        for (var i = 0; i < data['prev-days'].length; i++) {
                            name = data['prev-days'][i];
                            name += (data['prev-days'][i] > 1) ? translate('days') : translate('day');
                            html += ' <a href="javascript:;" shortcut="day,-' + data['prev-days'][i] + '">' + name + '</a>';
                        }
                        html += '</span>';
                    }

                    if (data['next-days'] && data['next-days'].length > 0) {
                        html += '&nbsp;<span class="next-days">' + translate('following');
                        for (var i = 0; i < data['next-days'].length; i++) {
                            name = data['next-days'][i];
                            name += (data['next-days'][i] > 1) ? translate('days') : translate('day');
                            html += ' <a href="javascript:;" shortcut="day,' + data['next-days'][i] + '">' + name + '</a>';
                        }
                        html += '</span>';
                    }

                    if (data.prev && data.prev.length > 0) {
                        html += '&nbsp;<span class="prev-buttons">' + translate('previous');
                        for (var i = 0; i < data.prev.length; i++) {
                            name = translate('prev-' + data.prev[i]);
                            html += ' <a href="javascript:;" shortcut="prev,' + data.prev[i] + '">' + name + '</a>';
                        }
                        html += '</span>';
                    }

                    if (data.next && data.next.length > 0) {
                        html += '&nbsp;<span class="next-buttons">' + translate('next');
                        for (var i = 0; i < data.next.length; i++) {
                            name = translate('next-' + data.next[i]);
                            html += ' <a href="javascript:;" shortcut="next,' + data.next[i] + '">' + name + '</a>';
                        }
                        html += '</span>';
                    }
                }

                if (opt.customShortcuts) {
                    for (var i = 0; i < opt.customShortcuts.length; i++) {
                        var sh = opt.customShortcuts[i];
                        html += '&nbsp;<span class="custom-shortcut"><a href="javascript:;" shortcut="custom">' + sh.name + '</a></span>';
                    }
                }
                html += '</div>';
            }

            // Add Custom Values Dom
            if (opt.showCustomValues) {
                html += '<div class="customValues"><b>' + (opt.customValueLabel || translate('custom-values')) + '</b>';

                if (opt.customValues) {
                    for (var i = 0; i < opt.customValues.length; i++) {
                        var val = opt.customValues[i];
                        html += '&nbsp;<span class="custom-value"><a href="javascript:;" custom="' + val.value + '">' + val.name + '</a></span>';
                    }
                }
            }

            html += '</div></div>';


            return $(html);
        }

        function getApplyBtnClass() {
            var klass = '';
            if (opt.autoClose === true) {
                klass += ' hide';
            }
            if (opt.applyBtnClass !== '') {
                klass += ' ' + opt.applyBtnClass;
            }
            return klass;
        }

        function getWeekHead() {
            var prepend = opt.showWeekNumbers ? '<th>' + translate('week-number') + '</th>' : '';
            if (opt.startOfWeek == 'monday') {
                return prepend + '<th scope="col">' + translate('week-1') + '</th>' +
                    '<th scope="col">' + translate('week-2') + '</th>' +
                    '<th scope="col">' + translate('week-3') + '</th>' +
                    '<th scope="col">' + translate('week-4') + '</th>' +
                    '<th scope="col">' + translate('week-5') + '</th>' +
                    '<th scope="col">' + translate('week-6') + '</th>' +
                    '<th scope="col">' + translate('week-7') + '</th>';
            } else {
                return prepend + '<th scope="col">' + translate('week-7') + '</th>' +
                    '<th scope="col">' + translate('week-1') + '</th>' +
                    '<th scope="col">' + translate('week-2') + '</th>' +
                    '<th scope="col">' + translate('week-3') + '</th>' +
                    '<th scope="col">' + translate('week-4') + '</th>' +
                    '<th scope="col">' + translate('week-5') + '</th>' +
                    '<th scope="col">' + translate('week-6') + '</th>';
            }
        }

        function isMonthOutOfBounds(month) {
            month = moment(month);
            if (opt.startDate && month.endOf('month').isBefore(opt.startDate)) {
                return true;
            }
            if (opt.endDate && month.startOf('month').isAfter(opt.endDate)) {
                return true;
            }
            return false;
        }

        function getGapHTML() {
            var html = ['<div class="gap-top-mask"></div><div class="gap-bottom-mask"></div><div class="gap-lines">'];
            for (var i = 0; i < 20; i++) {
                html.push('<div class="gap-line">' +
                    '<div class="gap-1"></div>' +
                    '<div class="gap-2"></div>' +
                    '<div class="gap-3"></div>' +
                    '</div>');
            }
            html.push('</div>');
            return html.join('');
        }

        function hasMonth2() {
            return (!opt.singleMonth);
        }

        function attributesCallbacks(initialObject, callbacksArray, today) {
            var resultObject = $.extend(true, {}, initialObject);

            $.each(callbacksArray, function(cbAttrIndex, cbAttr) {
                var addAttributes = cbAttr(today);
                for (var attr in addAttributes) {
                    if (resultObject.hasOwnProperty(attr)) {
                        resultObject[attr] += addAttributes[attr];
                    } else {
                        resultObject[attr] = addAttributes[attr];
                    }
                }
            });

            var attrString = '';

            for (var attr in resultObject) {
                if (resultObject.hasOwnProperty(attr)) {
                    attrString += attr + '="' + resultObject[attr] + '" ';
                }
            }

            return attrString;
        }

        function createMonthHTML(d) {
            var days = [];
            d.setDate(1);
            var lastMonth = new Date(d.getTime() - 86400000);
            var now = new Date();

            var dayOfWeek = d.getDay();
            if ((dayOfWeek === 0) && (opt.startOfWeek === 'monday')) {
                // add one week
                dayOfWeek = 7;
            }
            var today, valid;

            if (dayOfWeek > 0) {
                for (var i = dayOfWeek; i > 0; i--) {
                    var day = new Date(d.getTime() - 86400000 * i);
                    valid = isValidTime(day.getTime());
                    if (opt.startDate && compare_day(day, opt.startDate) < 0) valid = false;
                    if (opt.endDate && compare_day(day, opt.endDate) > 0) valid = false;
                    days.push({
                        date: day,
                        type: 'lastMonth',
                        day: day.getDate(),
                        time: day.getTime(),
                        valid: valid
                    });
                }
            }
            var toMonth = d.getMonth();
            for (var i = 0; i < 40; i++) {
                today = moment(d).add(i, 'days').toDate();
                valid = isValidTime(today.getTime());
                if (opt.startDate && compare_day(today, opt.startDate) < 0) valid = false;
                if (opt.endDate && compare_day(today, opt.endDate) > 0) valid = false;
                days.push({
                    date: today,
                    type: today.getMonth() == toMonth ? 'toMonth' : 'nextMonth',
                    day: today.getDate(),
                    time: today.getTime(),
                    valid: valid
                });
            }
            var html = [];
            for (var week = 0; week < 6; week++) {
                if (days[week * 7].type == 'nextMonth') break;
                html.push('<tr>');

                for (var day = 0; day < 7; day++) {
                    var _day = (opt.startOfWeek == 'monday') ? day + 1 : day;
                    today = days[week * 7 + _day];
                    var highlightToday = moment(today.time).format('L') == moment(now).format('L');
                    today.extraClass = '';
                    today.tooltip = '';
                    if (today.valid && opt.beforeShowDay && typeof opt.beforeShowDay == 'function') {
                        var _r = opt.beforeShowDay(moment(today.time).toDate());
                        today.valid = _r[0];
                        today.extraClass = _r[1] || '';
                        today.tooltip = _r[2] || '';
                        if (today.tooltip !== '') today.extraClass += ' has-tooltip ';
                    }

                    var todayDivAttr = {
                        time: today.time,
                        'data-tooltip': today.tooltip,
                        'class': 'day ' + today.type + ' ' + today.extraClass + ' ' + (today.valid ? 'valid' : 'invalid') + ' ' + (highlightToday ? 'real-today' : '')
                    };

                    if (day === 0 && opt.showWeekNumbers) {
                        html.push('<td><div class="week-number" data-start-time="' + today.time + '">' + opt.getWeekNumber(today.date) + '</div></td>');
                    }

                    html.push('<td ' + attributesCallbacks({}, opt.dayTdAttrs, today) + '><div ' + attributesCallbacks(todayDivAttr, opt.dayDivAttrs, today) + ' role="button" >' + showDayHTML(today.time, today.day) + '</div></td>');
                }
                html.push('</tr>');
            }
            return html.join('');
        }

        function showDayHTML(time, date) {
            if (opt.showDateFilter && typeof opt.showDateFilter == 'function') return opt.showDateFilter(time, date);
            return date;
        }

        function getLanguages() {
            if (opt.language == 'auto') {
                var language = navigator.language ? navigator.language : navigator.browserLanguage;
                if (!language) {
                    return $.dateRangePickerLanguages['default'];
                }
                language = language.toLowerCase();
                if(language in $.dateRangePickerLanguages){
                    return $.dateRangePickerLanguages[language];
                }

                return $.dateRangePickerLanguages['default'];
            } else if (opt.language && opt.language in $.dateRangePickerLanguages) {
                return $.dateRangePickerLanguages[opt.language];
            } else {
                return $.dateRangePickerLanguages['default'];
            }
        }

        /**
         * Translate language string, try both the provided translation key, as the lower case version
         */
        function translate(translationKey) {
            var translationKeyLowerCase = translationKey.toLowerCase();
            var result = (translationKey in languages) ? languages[translationKey] : (translationKeyLowerCase in languages) ? languages[translationKeyLowerCase] : null;
            var defaultLanguage = $.dateRangePickerLanguages['default'];
            if (result == null) result = (translationKey in defaultLanguage) ? defaultLanguage[translationKey] : (translationKeyLowerCase in defaultLanguage) ? defaultLanguage[translationKeyLowerCase] : '';

            return result;
        }

        function getDefaultTime() {
            var defaultTime = opt.defaultTime ? opt.defaultTime : new Date();

            if (opt.lookBehind) {
                if (opt.startDate && compare_month(defaultTime, opt.startDate) < 0) defaultTime = nextMonth(moment(opt.startDate).toDate());
                if (opt.endDate && compare_month(defaultTime, opt.endDate) > 0) defaultTime = moment(opt.endDate).toDate();
            } else {
                if (opt.startDate && compare_month(defaultTime, opt.startDate) < 0) defaultTime = moment(opt.startDate).toDate();
                if (opt.endDate && compare_month(nextMonth(defaultTime), opt.endDate) > 0) defaultTime = prevMonth(moment(opt.endDate).toDate());
            }

            if (opt.singleDate) {
                if (opt.startDate && compare_month(defaultTime, opt.startDate) < 0) defaultTime = moment(opt.startDate).toDate();
                if (opt.endDate && compare_month(defaultTime, opt.endDate) > 0) defaultTime = moment(opt.endDate).toDate();
            }

            return defaultTime;
        }

        function resetMonthsView(time) {
            if (!time) {
                time = getDefaultTime();
            }

            if (opt.lookBehind) {
                showMonth(prevMonth(time), 'month1');
                showMonth(time, 'month2');
            } else {
                showMonth(time, 'month1');
                showMonth(nextMonth(time), 'month2');
            }

            if (opt.singleDate) {
                showMonth(time, 'month1');
            }

            showSelectedDays();
            showGap();
        }

        function outsideClickClose(evt) {
            if (!IsOwnDatePickerClicked(evt, self[0])) {
                if (box.is(':visible')) closeDatePicker();
            }
        }

    };
}));

(function (global, factory) {
  typeof exports === 'object' && typeof module !== 'undefined' ? factory() :
  typeof define === 'function' && define.amd ? define(factory) :
  (factory());
}(this, (function () { 'use strict';

  function shave(target, maxHeight) {
    var opts = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};

    if (!maxHeight) throw Error('maxHeight is required');
    var els = typeof target === 'string' ? document.querySelectorAll(target) : target;
    if (!els) return;

    var character = opts.character || '…';
    var classname = opts.classname || 'js-shave';
    var spaces = opts.spaces || true;
    var charHtml = '<span class="js-shave-char">' + character + '</span>';

    if (!('length' in els)) els = [els];
    for (var i = 0; i < els.length; i += 1) {
      var el = els[i];
      var styles = el.style;
      var span = el.querySelector('.' + classname);
      var textProp = el.textContent === undefined ? 'innerText' : 'textContent';

      // If element text has already been shaved
      if (span) {
        // Remove the ellipsis to recapture the original text
        el.removeChild(el.querySelector('.js-shave-char'));
        el[textProp] = el[textProp]; // eslint-disable-line
        // nuke span, recombine text
      }

      var fullText = el[textProp];
      var words = spaces ? fullText : fullText.split(' ');

      // If 0 or 1 words, we're done
      if (words.length < 2) continue;

      // Temporarily remove any CSS height for text height calculation
      var heightStyle = styles.height;
      styles.height = 'auto';
      var maxHeightStyle = styles.maxHeight;
      styles.maxHeight = 'none';

      // If already short enough, we're done
      if (el.offsetHeight <= maxHeight) {
        styles.height = heightStyle;
        styles.maxHeight = maxHeightStyle;
        continue;
      }

      // Binary search for number of words which can fit in allotted height
      var max = words.length - 1;
      var min = 0;
      var pivot = void 0;
      while (min < max) {
        pivot = min + max + 1 >> 1; // eslint-disable-line no-bitwise
        el[textProp] = spaces ? words.slice(0, pivot) : words.slice(0, pivot).join(' ');
        el.insertAdjacentHTML('beforeend', charHtml);
		
        if (el.offsetHeight > maxHeight) {
			max = spaces ? pivot - 2 : pivot - 1;
			if (max == 0) {
				// a return of zero is substr(0,0) = ''
				max = -1;
			}
		} else { 
			min = pivot;
		}
		
      }

      el[textProp] = spaces ? words.slice(0, max) : words.slice(0, max).join(' ');
      el.insertAdjacentHTML('beforeend', charHtml);
      var diff = spaces ? words.slice(max) : words.slice(max).join(' ');

      el.insertAdjacentHTML('beforeend', '<span class="' + classname + '" style="display:none;">' + diff + '</span>');

      styles.height = heightStyle;
      styles.maxHeight = maxHeightStyle;
    }
  }

  /* global window */

  if (typeof window !== 'undefined') {
    var plugin = window.$ || window.jQuery || window.Zepto;
    if (plugin) {
      plugin.fn.shave = function shavePlugin(maxHeight, opts) {
        shave(this, maxHeight, opts);
        return this;
      };
    }
  }

})));
;
(function ($) {

    $j = $;

    $j(function () {


        var $document = $(document);
        var $window = $(window);
        var $body = $('body');

        if ($j('.plp-page-edit-mode').length > 0) {
            // do nothing if page is in edit mode, otherwise any DOM manipulations, or the slick plugin will break the experience editor.
            return;
        }

       

        $j('[data-component="digex-photogallery"]').each(function () {

            var component = $(this);
            component.show();

            

            var lazyLoadImages = function (sl, count) {
                //var slides = [];
                var slides = sl.find('.slick-slide');

                //slides.push(activeSlide.nextAll().slice(0, count));
                //slides.push(activeSlide.prevAll().slice(0, count));

                $j.each(slides,
                    function (index, sl) {
                        var slide = $j(sl);
                        slide.find('img').each(function(index, img) {
                        var $img = $j(img);
                        var srcset = $img.attr('data-srcset');

                        if (srcset) {
                            $img.attr('srcset', srcset);
                        }
                        $img.attr('src', $img.attr('data-src'));
                        $img.addClass('img-processed');
                    });
                });
            };

            var initSlider = function (sl) {

                var txtPreviousSlide = sl.attr('data-text-previous-slide');
                var txtNextSlide = sl.attr('data-text-next-slide');


                var slidesCount= sl.find('.digex-photogallery-content-imgset').length;
                sl.slick({

                    useCSS: false,
                    //lazyLoad: 'ondemand',
                    asNavFor: '.digex-photogallery-content-nav',
                    centerMode: true,
                    slidesToShow: 1,
                    slidesToScroll: 1,
                    infinite: true,
                    swipe: true,
                    swipeToSlide: true,
                    variableWidth: true,
                    arrows: true,
                    prevArrow:
                        "<button type='button' class='slick-prev digex-photogallery-prev' aria-label='" + txtPreviousSlide + "'></button>",
                    nextArrow:
                        "<button type='button' class='slick-next digex-photogallery-next' aria-label='" + txtNextSlide + "'></button>",
                    focusOnSelect: true,
                    adaptiveHeight: true,
                    responsive: [
                        {
                            breakpoint: 768,
                            settings: {
                                arrows: true,
                                adaptiveHeight: false
                            }
                        }
                    ]
                });
            };

            var initNavSlider = function (sl) {
                var count = sl.find('button').length;
                if (count < 12) {
                    sl.addClass('digex-slick-centered');
                } else {
                    sl.removeClass('digex-slick-centered');
                }

                sl.slick({
                    useCSS: false,
                    //lazyLoad: 'ondemand',
                    asNavFor: '.digex-photogallery-content-slider',
                    slidesToShow: 14,
                    slidesToScroll: 1,
                    //slidesToShow: 14,
                    //slidesToScroll: 5,
                    arrows: false,
                    dots: false,
                    swipe: false,
                    swipeToSlide: false,
                    infinite: true,
                    variableWidth: true,
                    focusOnSelect: true,
                    centerMode: false
                });
                sl.find('.slick-current').attr('aria-current', true);

                sl.find('.slick-track').attr('role', 'list');
                sl.find('.slick-track .slick-slide').attr('role', 'listitem');
            };

            var photoGallery = $j(this);

            var slider = photoGallery.find('.digex-photogallery-content-slider');
            var sliderNav = photoGallery.find('.digex-photogallery-content-nav');

            var clonedSlides = [];
            
            slider.find('figure').each(function (index, item) {
                clonedSlides.push($j(item).clone());
            });

            var clonedNavSlides = [];
            sliderNav.find('button').each(function (index, item) {
                clonedNavSlides.push($j(item).clone());
            });

            initSlider(slider);

            slider.on('beforeChange', function (event, slick, currentSlide, nextSlide) {
                var nextText ='';
                var previousText = '';
                if(nextSlide == slick.$slides.length-1){
                    nextText = 'image 1 of '+slick.$slides.length;
                    previousText = 'image '+nextSlide+' of '+slick.$slides.length;
                }
                else if(nextSlide == 0){
                    nextText = 'image '+(nextSlide+2)+' of '+slick.$slides.length;
                    previousText = 'image '+slick.$slides.length+' of '+slick.$slides.length;
                }
                else{
                    nextText = 'image '+(nextSlide+2)+' of '+slick.$slides.length;
                    previousText = 'image '+nextSlide+' of '+slick.$slides.length;
                }
                slick.$nextArrow.attr('aria-label',nextText);
                slick.$prevArrow.attr('aria-label',previousText);
            });

            slider.on('afterChange', function (event, slick, currentSlide, nextSlide) {
                lazyLoadImages(slider, 3);
            });

            lazyLoadImages(slider, 3);

            initNavSlider(sliderNav);
            sliderNav.on('afterChange', function (event, slick, currentSlide, nextSlide) {
                lazyLoadImages(sliderNav, 14);
                slick.$slides.removeAttr('aria-current')
                $(slick.$slides[slick.currentSlide]).attr('aria-current',true)
            });

            lazyLoadImages(sliderNav, 14);

            var showSlidesByCategoryName = function (categoryName) {

                // slickUnfilter / slickFilter doesn't work as expected, so let's recreate slider every time when user selects the category.
                slider.slick('unslick');
                slider.find('figure').remove();
                sliderNav.slick('unslick');
                sliderNav.find('button').remove();

                $j.each(clonedSlides,
                    function (index, clonedSlide) {
                        if (categoryName) {
                            if (clonedSlide.attr('data-category') === categoryName) {
                                slider.append(clonedSlide.clone());
                            }
                        } else {
                            slider.append(clonedSlide.clone());
                        }
                        
                    });

                $j.each(clonedNavSlides,
                    function (index, clonedSlide) {
                        if (categoryName) {
                            if (clonedSlide.attr('data-category') === categoryName) {
                                sliderNav.append(clonedSlide.clone());
                            }
                        } else {
                            sliderNav.append(clonedSlide.clone());
                        }
                        
                    });

                initSlider(slider);
                initNavSlider(sliderNav);

                lazyLoadImages(slider, 3);
                lazyLoadImages(sliderNav, 14);
            };

            // Default dropdown action to show/hide dropdown content

            photoGallery.find('.js-dropp-action').on('focus', function(){
                $j(this).trigger('click');
            });

            photoGallery.find('.js-dropp-action').click(function (e) {
                e.preventDefault();
                e.stopPropagation();
                var $this = $j(this);

                $this.toggleClass('js-open');
                $this.parents('.dropp').toggleClass('js-open');
                $this.parent().siblings('.dropp-body').toggleClass('js-open');

                $this.attr('aria-expanded', $this.hasClass('js-open'));
            });

            // Using as fake input select dropdown
            photoGallery.find('label').click(function () {
                var $this = $j(this);
                var radio = $this.find('input');

                radio.prop('checked', true);
                radio.change();

                $this.addClass('js-open').siblings().removeClass('js-open');
                photoGallery.find('.dropp,.dropp-body,.js-dropp-action').removeClass('js-open');
                photoGallery.find('.js-dropp-action').attr('aria-expanded', 'false');
            });

            // get the value of checked input radio and display as dropp title
            photoGallery.find('input[name="dropp"]').change(function () {
                var value = photoGallery.find("input[name='dropp']:checked").val();
                var selectedItem = photoGallery.find('.js-value');
                selectedItem.data('prev-value', selectedItem.text());

                showSlidesByCategoryName(value);

                if (!value) {
                    value = selectedItem.data('select');
                }
                selectedItem.attr('aria-label', 'Photo Gallery Selected Filter: '  + value);
                selectedItem.text(value);
            });

            function setSelectedListItem() {
                let selectedValue = $("#hidden-field").val();
                if (selectedValue == 'ALL PHOTOS') {
                    selectedValue = "";
                }
                if (selectedValue == 'VIRTUAL TOUR' || selectedValue == 'Virtual Tour') {
                    selectedValue = "";
                }

                showSlidesByCategoryName(selectedValue);
            }

            setTimeout(function() {
                var defaultCategoryName = component.attr('data-default-category-name');
                if (defaultCategoryName) {
                    var item = component.find('.filter-dropdown__list-item[data-value="' + defaultCategoryName + '"]');
                    if (item.length > 0) {
                        setTimeout(function () {
                            // RARE JKG 230531
                            //item.trigger('click');
                            const jsElement = document.querySelector('#' + item.attr('id'));
                            unselectAllOptions();
                            selectOption(jsElement);
                            collapseOptions();
                            setSelectedListItem();
                        }, 250);
                    }
                }
            }, 500);


            // Custom Select/Filter
            var filterWrapper;
            var container;
            var trigger;
            var selectedText;
            var labelText;
            var optionsList;
            var options;
            var hiddenField;
            var isExpanded = false;
            var fancyStylingButton;
            
            // window.addEventListener("DOMContentLoaded", function (e) {
                filterWrapper = document.querySelector(".custom-filter-wrapper");
                container = document.querySelector(".custom-filter");
                trigger = document.querySelector(".custom-filter .trigger");
                selectedText = document.getElementById("selected-text");
                labelText = document.getElementById("label-text");
                optionsList = document.querySelector(".custom-filter .options");
                options = document.querySelectorAll(".custom-filter .options li");
                fancyStylingButton = document.getElementById("styling-toggle");
                hiddenField = document.getElementById("hidden-field");
            
                // Handle keyboard and mouse interactions on the trigger bar
                trigger.addEventListener("keydown", handleTriggerKeypresses);
                trigger.addEventListener("click", handleTriggerClick);
            
				// Select options when they are clicked
				// jkg-ie options.forEach(function (option) {
				for(let index=0; index < options.length; ++index )	{
					if (options[index]) {
						options[index].addEventListener("click", function (e) {
							unselectAllOptions();
							selectOption(e.target);
							collapseOptions();
							trigger.focus();
							setSelectedListItem();
						});
					}
				}
            
                // Collapse the dropdown when the user clicks off
                document.addEventListener("click", handleBodyClick);
            // });
            
            /**
            Event handlers
            */
            function handleTriggerKeypresses(e) {
                switch (e.key) {
                    case "ArrowUp":
                        e.preventDefault();
            
                        if (isExpanded) {
                            selectPreviousOption();
                        } else {
                            expandOptions();
                        }
            
                        break;
            
                    case "ArrowDown":
                        e.preventDefault();
            
                        if (isExpanded) {
                            selectNextOption();
                        } else {
                            expandOptions();
                            selectFirstOption();
                        }
            
                        break;
            
                    case "Home":
                        e.preventDefault();

                        if (isExpanded) {
                            selectFirstOption();
                        }
            
                        break;
            
                    case "End":
                        e.preventDefault();

                        if (isExpanded) {
                            selectLastOption();
                        }
            
                        break;
            
                    case "Tab":
                        collapseOptions();
                        break;
            
                    case "Escape":
                    case "Enter":
                        if (isExpanded) {
                            e.preventDefault();
                            collapseOptions();
                            setSelectedListItem(e);
                        }
            
                        break;
                }
            }
            
            function handleBodyClick(e) {
                if (!container.contains(e.target) && isExpanded) {
                    collapseOptions();
                }
            }
            
            function handleTriggerClick() {
                if (isExpanded) {
                    collapseOptions();
                    trigger.focus();
                } else {
                    expandOptions();
                }
            }
            
            /**
            Show/hide option list
            */
            function collapseOptions() {
                trigger.setAttribute("aria-expanded", false);
                optionsList.classList.remove("is-visible");
                isExpanded = false;
            }
            
            function expandOptions() {
                trigger.setAttribute("aria-expanded", true);
                optionsList.classList.add("is-visible");
                isExpanded = true;
            }

            /**
            Option selection
            */
            function selectFirstOption() {
                var firstOption = options[0];
                selectOption(firstOption);
            }
            
            function selectLastOption() {
                var lastOption = options[options.length - 1];
                selectOption(lastOption);
            }
            
            function selectNextOption() {
                var currentOption = document.getElementById(trigger.getAttribute("aria-activedescendant"));
            
                if (currentOption !== undefined) {
                    var currentOptionIndex = Array.prototype.slice.call(options).indexOf(currentOption);
            
                    if (currentOptionIndex + 1 < options.length) {
                        var nextOption = options[currentOptionIndex + 1];
                        selectOption(nextOption);
                    }
                }
            }
            
            function selectPreviousOption() {
                var currentOption = document.getElementById(trigger.getAttribute("aria-activedescendant"));
            
                if (currentOption !== undefined) {
                    var currentOptionIndex = Array.prototype.slice.call(options).indexOf(currentOption);
            
                    if (currentOptionIndex - 1 >= 0) {
                        var previousOption = options[currentOptionIndex - 1];
                        selectOption(previousOption);
                    }
                }
            }
            
            function selectOption(option) {
                unselectAllOptions();
                option.setAttribute("aria-selected", true);
                trigger.setAttribute("aria-activedescendant", option.getAttribute("id"));
                selectedText.innerHTML = option.innerHTML;
                if (option.innerHTML === "ALL PHOTOS") {
                    labelText.innerHTML = option.innerHTML;
                } else {
                    labelText.innerHTML = option.innerHTML + " Photos";
                }
                        
                // Update the hidden field
                hiddenField.value = option.innerHTML;
            }
            
            function unselectAllOptions() {
				// jkg-ie 
				for(let index=0; index < options.length; ++index )	{
					if (options[index]) {
						options[index].removeAttribute("aria-selected");
					}
				}
            }            


            $document.on("click", '[data-component="digex-photogallery"] .slick-slide', function () {
                if ($window.width() > 1366) {
                    var $this = $(this);

                    var container = $this.parents('.digex-photogallery-container');

                    if (!container.hasClass('modal-gallery')) {

                        var wrapper = $this.parents('.digex-photogallery-wrapper');
                            wrapper.height(container.height());

                            container.addClass('modal-gallery');
                            $body.addClass('photo-gallery-open');

                            setTimeout(function() {
                                    slider.slick('refresh');
                                },
                                50);

                    }
                }
            });

             var closeModalPhotoGallery = function() {
                $body.removeClass('photo-gallery-open');
                    var gallery = $('.modal-gallery');

                    if (gallery.length > 0) {

                        $('.digex-photogallery-wrapper').removeAttr('style');
                        gallery.removeClass('modal-gallery');

                        setTimeout(function() {
                           slider.slick('refresh');
                        },
                        50);
                    }
            }
         
            $document.on('keydown',
                function(e) {
                    if (e.keyCode === 27) {
                        closeModalPhotoGallery();
                    }
                });

            component.find('.close-dropdown, .close-modal-button-wrapper button').click(function() {
                closeModalPhotoGallery();
            });

        });
});

})(jQuery);

(function($) {
    $j = $;

    var mobile = false;
    if (navigator.userAgent.match(/iPhone/i) ||
        navigator.userAgent.match(/iPad/i) ||
        navigator.userAgent.match(/iPod/i)
    ) {
        mobile = true;
    }

    // JS for the PLP

    var $document = $(document);
    var $body = $('body');

    // Close the main nav (menu) by clicking outside of the menu
    $document.click(function(event) {
        $target = $(event.target);
        if ($target.parents('.nav-toggle').length) { return; }
        if (!$target.closest('.main-nav').length &&
            $('.main-nav').is(':visible')) {
            $('.close-main-nav').trigger('click');
        }
    });

    // returns TRUE on click or if the space bar or enter key have been pressed
    // use-case for elements that mimic buttons for accessibility
    function a11yClick(event){
        if(event.type === 'click'){
            return true;
        }
        else if(event.type === 'keypress'){
            var code = event.charCode || event.keyCode;
            if((code === 32) || (code === 13)){
                return true;
            }
        }
        else{
            return false;
        }
    }

    $(function () {

        var refreshSlickDots = function() {
            $('.slick-dots').each(function () {
                var dots = $(this);

                var numberOfActiveSlides = dots.parents('.slick-slider').find('.slick-list .slick-active').length;
                var numberOfSlides = dots.parents('.slick-slider').find('.slick-list .slick-slide:not(.slick-cloned)').length;

                var items = dots.find('li');
                var count = items.length;
                var slideIndex = 0;

                items.each(function(index, value) {
                    var button = $(this).find('button');

                    if (numberOfActiveSlides === 1) {
                        button.attr('aria-label', 'Slide ' + (index + 1).toString() + ' of ' + count);
                    } else {

                        var caption = '';
                        

                        for (var i = 0; i < numberOfActiveSlides; i++) {

                            slideIndex += 1;

                            if (slideIndex <= numberOfSlides) {

                                if (i !== 0) {
                                    caption += ', ';
                                }

                                caption += slideIndex;
                            }
                        }

                        button.attr('aria-label', 'View slide ' + caption);
                    }
                    
                });
                
            });
        }

        //$('.digex-reservation-body > .digex-checkin-forms > .checkin-form > .digex-primary-cta.find-reservation').click(function(e) {
        //    e.preventDefault();
        //    window.location.href = 'https://ssl.omnihotels.com/Omni?Phoenix_state=clear&pagesrc=RR2&pagedst=RR1_5&lastName=' +
        //     $j('#lastnameReservation').val() + '&room1_cro_resno=' + $j('#confirmationReservation').val();
        //});
        
        // wrap the first letter of each word in a span, add kerning for specific letters and trim any white space
        $('.plp-resort-title-container h1, .plp-hero-slider__slide-content-title').html(function () {
            var rx = /([^ \t\-\&]+)/gi;
            return $(this)
            .text()
            .trim()
                .replace(rx, function (_, word) {

                var upperCaseWord = word.toUpperCase();
                    // (Spanish) de = of and en = in 
                    const lowerArray = ['A', 'AT', 'AN', 'AND', 'OR', 'OF', 'DE', 'EN'];

                    if (lowerArray.indexOf(upperCaseWord) != -1) {
                        // return '<span style="text-transform: lowercase;font-size: 150%;">' + word + '</span>';
						return word;
                    }

                    const upperArray = ['20%','PGA','CNN','ASU'];
                    if (upperArray.indexOf(upperCaseWord) != -1) {
                        // return '<span class="first-letter-large">' + word + '</span>';
                        return word;

                    }

                /*
                var firstChar = upperCaseWord.charAt(0);
                var secondChar = upperCaseWord.charAt(1);
                if (firstChar === 'P') {
                    if (secondChar === 'A') {
                        return word.replace(/^(.)/gi, '<span class="first-letter-large kern-large">$1</span>');
                    }
                }
                if (firstChar === 'W') {
                    if (secondChar !== 'A') {
                        return word.replace(/^(.)/gi, '<span class="first-letter-large kern-medium">$1</span>');
                    }
                    return word.replace(/^(.)/gi, '<span class="first-letter-large kern-large">$1</span>');
                }
                if (firstChar === 'T' || firstChar === 'V' || firstChar === 'Y') {
                    if (secondChar === 'A') {
                        return word.replace(/^(.)/gi, '<span class="first-letter-large kern-large">$1</span>');
                    }
                    return word.replace(/^(.)/gi, '<span class="first-letter-large kern-medium">$1</span>');
                }*/
                // return word.replace(/^(.)/gi, '<span class="first-letter-large">$1</span>');
                return word;

            });
        });

        $j('.digex-nav-component .nav-dropdown-link, .digex-subnav-component .nav-dropdown-link, .plp-nav-component .nav-dropdown-link, .plp-subnav-component .nav-dropdown-link').click(function (e) {
            var $target = $(e.target);
            if ($target.hasClass('nav-dropdown') || $target.parents('.nav-dropdown').length > 0) {
                e.stopPropagation();
                return true;
            }
            
            handleLinkEvent(e, $j(this));
        });

        $j('.digex-nav-component .nav-dropdown-link, .digex-subnav-component .nav-dropdown-link, .plp-nav-component .nav-dropdown-link, .plp-subnav-component .nav-dropdown-link').keydown(function (e) {
            var $target = $(e.target);

            if ($target.hasClass('nav-dropdown') || $target.parents('.nav-dropdown').length > 0) {
                e.stopPropagation();
                return true;
            }

            if (e.keyCode === 32) {
                handleLinkEvent(e, $j(this));
            }

            return true;
        });

        $('.digex-nav-component .nav-dropdown-link, .plp-nav-component .nav-dropdown-link').on('keypress keydown keyup',
            function(e) {
                if (e.keyCode === 27) {
                    e.stopPropagation();
                    e.preventDefault();

                    var lnk = $(e.target).parents('.nav-dropdown-link').find('a:first');
                    
                    lnk.click();
                    setTimeout(function() { lnk.focus() }, 250);
                }
            });

        function handleLinkEvent(e, link) {
            e.preventDefault();
            e.stopPropagation();

            var a = link.find('a').first();

            if (link.hasClass('rotate')) {
                link.removeClass('rotate');
                link.children('.nav-dropdown').removeClass('open');
                a.attr('aria-expanded', 'false');
            } else {
                link.addClass('rotate');
                link.parent().addClass('open');
                link.children('.nav-dropdown').addClass('open');
                a.attr('aria-expanded', 'true');
            }

            if (link.siblings().children('.nav-dropdown').hasClass('open')) {
                link.siblings().children('.nav-dropdown').removeClass('open');
                link.siblings().removeClass('rotate').find('a').first().attr('aria-expanded', 'false');
            }
        };

        var mainNav = $('.main-nav');

        $document.keyup(function(e) {
            if (e.keyCode === 27) {
                $('.close-main-nav').trigger('click');
            } else if (e.shiftKey && e.keyCode === 9 || e.keyCode === 9) {
                if (mainNav.hasClass('opened')) {
                    var $focused = $(':focus');
                    if ($focused.parents('.main-nav').length === 0) {
                        mainNav.find('.plp-main-nav-header a').focus();
                    }
                }
            }
        });

        if ($('.plp-page-edit-mode').length > 0) {
            // do nothing if page is in edit mode, otherwise any DOM manipulations, or the slick plugin will break the experience editor.
            return;
        }

        var html = $('html');
        var lang = html.attr('lang');

        if (!lang) {
            lang = 'en';
        }

        lang = lang.split('-')[0];
        moment.locale(lang);

        var addQueryStringParam = function(url, param, value) {
            param = encodeURIComponent(param);
            var a = document.createElement('a');
            param += (value ? '=' + encodeURIComponent(value) : '');
            a.href = url;
            a.search += (a.search ? '&' : '') + param;
            return a.href;
        };

        var getQueryStringParam = function(key) {
            key = key.replace(/[*+?^$.\[\]{}()|\\\/]/g, "\\$&"); // escape RegEx meta chars
            var match = location.search.match(new RegExp("[?&]" + key + "=([^&]+)(&|$)"));
            return match && decodeURIComponent(match[1].replace(/\+/g, " "));
        };

        var loadRoomsRequest = null;
        var loadRoomsRetryCount = 0;


        var $roomSelectorWrapper = $('.plp-room-selector-wrapper');


        function loadRooms() {

            //console.log('loading rooms...');

            var $wrapper = $('.plp-room-selector-wrapper');

            if ($wrapper.length > 0) {
                var roomSelectorId = $('#RoomSelectorId').val();
                var hotelId = $('#HotelId').val();

                var startDate = moment($j('#date-start-input').val(), 'MMM DD, YYYY').format('MM-DD-YYYY');
                var endDate = moment($j('#date-end-input').val(), 'MMM DD, YYYY').format('MM-DD-YYYY');

                var adults = $('#plp-adult-input-1').val();
                var rooms = $('#plp-room-input').val();

				var currLang = window.location.href.indexOf('fr-ca') != -1 ? 'fr-ca' : '';

                if (!hotelId || !roomSelectorId) {
                    return;
                }
				
				var prefix = currLang === 'fr-ca' ? '/fr-ca' : '';

                var url = prefix + '/api/sitecore/RoomSelector/GetRoomSelectorPartialViewAsync'.toLowerCase();

                if (loadRoomsRequest) {
                    loadRoomsRequest.abort();
                }

                $wrapper.find('.plp-room-selector-content-wrapper').html('<div class="digex-busy-indicator"></div>');

                loadRoomsRequest = $.get(url, {
                    'startDate': startDate,
                    'endDate': endDate,
                    'hotelId': hotelId,
                    'roomSelectorId': roomSelectorId,
                    'guests': adults,
                    'rooms': rooms,
					'currLang': currLang
                }, function(data) {

                    loadRoomsRequest = null;

                    if (!data || data.length === 0 || $(data).find('body').length > 0) {
                        if (loadRoomsRetryCount === 0) {
                            loadRoomsRetryCount += 1;
                            loadRooms();
                        }
                        return;
                    }

                    loadRoomsRetryCount = 0;

                    $wrapper.replaceWith(data);
                    $roomSelectorWrapper = $('.plp-room-selector-wrapper');
                    $roomSelectorWrapper.off('loadRooms');
                    $roomSelectorWrapper.on('loadRooms',
                        function() {

                            loadRooms();
                        });


                    
                    
                    // Slick slider carousel
                    $('.plp-slick').not('.slick-initialized').on('afterChange', function (event, slick, currentSlide, nextSlide) {
                        $($(this).attr('data-modal') + '.plp-slick').slick('slickGoTo', currentSlide, false);
                        
                        $('.slick-dots li button').removeAttr('aria-current');
                        $('.slick-dots li.slick-active button').attr('aria-current', 'true');

                        setTimeout(function() {
                            refreshSlickDots();
                        }, 250);


                    }).slick({
                        accessibility: false,
                        centerMode: false,
                        mobileFirst: true,
                        slidesToShow: 1,
                        variableWidth: false,
                        responsive: [{
                        breakpoint: 768,
                        settings: {
                            centerMode: false,
                            variableWidth: false
                        }

                    }]
                    });

                    $('.slick-dots li.slick-active button').attr('aria-current', 'true');

                    refreshSlickDots();

                    $('.plp-slick[data-modal]').on('click keypress', function(event){
                        if(a11yClick(event) === true){
                            event.preventDefault();
                            if ($(document).width() > 767) {
                                var $el = $(this).closest('[data-modal]');
                                $($el.attr('data-modal')).modal();
                            }
                        }
                    });
                    
                    $('div[id^="room-carousel"]').on($.modal.OPEN, function() {
                        $(this).find('.plp-slick')
                            .slick('unslick')
                            .slick();
                        $(this).find('.plp-slick').slick('slickGoTo', $('[data-modal="#' + this.id + '"]').slick('slickCurrentSlide'), false);
                    });

                    //load rooms
                    $('.load-rooms').click(function(e) {
                        e.preventDefault();
                        e.stopPropagation();

                        var currentScrollTop = $(window).scrollTop();

                        var $target = $(this).data('target');
                        $('.' + $target + ' > .hidden-room').removeClass('hidden-room').show().find('.plp-slick').slick('unslick').slick();
                        $(this).hide();
                        $(window).scrollTop(currentScrollTop);

                        setTimeout(function() {
                            var $el = $(this).closest('[data-modal]');
                            $el.find('.plp-slick').slick('refresh');
                            $('.slick-dots li.slick-active button').attr('aria-current', 'true');
                            refreshSlickDots();
                        }, 500);
                    });

                    var checkIfViewMoreContentExists = setInterval(function () {
                        var $viewMoreContent = $('.plp-room-hilite-container .plp-room-hilites').find('ul');
                        if ($viewMoreContent.length) {
                            clearInterval(checkIfViewMoreContentExists);
            
                            // hide this content after it loads
                            setTimeout(function() {
                                $viewMoreContent.hide();
                            }, 500);
                                    
                        }
                    }, 100);

                    var expandViewRoom = function (e, $this) {
                        e.preventDefault();
                        e.stopPropagation();
                        var $el = $this.closest('.expand-wrapper');

                        $el.toggleClass('open');
                        if ($el.hasClass('open')) {
                            var windowWidth = $(window).width();
                            var $cit = $this.closest('.plp-room-hilites');
                            var $thisViewMoreContent = $this.closest('.plp-room-hilites').find('ul');
                            $cit.css('height', 'auto');
                            $thisViewMoreContent.slideDown();
                            $this.attr("aria-expanded", "true");
                            $('.expand-view-room-more-mobile').attr("aria-expanded", "true");
                            $('.expand-view-room-less').attr("aria-expanded", "true");
                            $('.expand-view-room-less-mobile').attr("aria-expanded", "true");
                        } else {
                            // check current width
                            var windowWidth = $(window).width();
                            var $cit = $this.closest('.plp-room-hilites');
                            var $thisViewMoreContent = $this.closest('.plp-room-hilites').find('ul');
                                $('.expand-view-room-more').attr("aria-expanded", "false");
                                $('.expand-view-room-more-mobile').attr("aria-expanded", "false");
                                $('.expand-view-room-less').removeAttr("aria-expanded");
                                $('.expand-view-room-less-mobile').removeAttr("aria-expanded");
                                $thisViewMoreContent.slideUp();

                            if (windowWidth > 767) {
                                $cit.css('height', '123px');
                            } else {
                                $cit.css('height', '25px');
                            }
                        };
                    }

                    //Used by the Room Section expander on the Hotel page
                    $('.expand-view-room').click(function(e) {
                        expandViewRoom(e, $(this));
                    });

                    $('.expand-view-room').keypress(function (e) {
                        if (e.keyCode === 32 || e.keyCode === 13) {
                            var $this = $(this);
                            
                            expandViewRoom(e, $this);

                            setTimeout(function () {
                                if ($this.hasClass('expand-view-room-more')) {
                                    $this.parents('.plp-tertiary-link-arrow').find('.expand-view-room-less').focus();
                                }
                                else {
                                    $this.parents('.plp-tertiary-link-arrow').find('.expand-view-room-more').focus();
                                }
                            }, 100);

                            
                        }
                    });

                    if (window.location.hash === '#rooms') {
                        $(document).scrollTop($('a[name="rooms"]').offset().top - 50);
                    }

                }).fail(function() {
                    loadRoomsRequest = null;

                    if (loadRoomsRetryCount === 0) {
                        loadRoomsRetryCount += 1;
                        loadRooms();
                    }

                });
            }
        }

        $roomSelectorWrapper.on('loadRooms',
            function() {
                loadRooms();
            });

        // Add the blur when the menu is open
        if ($('form .main-nav').length > 0) {
            // $('form').after($('.main-nav')); // 2023-RD
        };


        //$('.nav-toggle').attr('aria-expanded', 'false').click(function (e) {

        //    e.preventDefault();

        //    var $this = $(this);
        //    var pressed = 'false';
        //    if ($this.attr('aria-expanded') === 'false') {
        //        pressed = 'true';
        //    }

        //    $this.attr('aria-expanded', pressed);

        //    $('body').addClass('blurred');
        //    setTimeout(function() {
        //        $('.main-nav').addClass('opened').find('.plp-main-nav-header .close-main-nav').focus();
        //    }, 100);

        //});

        //// Close the main nav (menu)
        //$('.close-main-nav, .main-nav-close-outside').click(function() {
        //    $('.nav-toggle').attr('aria-expanded', 'false');
        //    $('body').removeClass('blurred');
        //    $(this).closest('[data-component="main-nav-dropdown"]').removeClass('opened');
        //    $("button.nav-toggle ").focus();
        //});

        // TODO script edits 2023 rebrand
        $(".nav-toggle")
            .attr("aria-expanded", "false")
            .on("click", function (e) {
                e.preventDefault();

                var $this = $(this);
                var pressed = "false";
                if ($this.attr("aria-expanded") === "false") {
                    pressed = "true";
                    $("body").addClass("prevent-scrolling");
                    setTimeout(function () {
                        $(".main-nav").addClass("opened").find(".plp-main-nav-header .close-main-nav").focus();
                    }, 100);

                    // we set the height of the main nav to the height of the window
                    // minus the height of navbar so we can animate the height
                    // as well as allow scrolling if the content overflows the container
                    var windowHeight = $(window).height();
                    var navbarHeight = $(".js-getNavbarHeight").height();
                    setTimeout(function () {
                        $(".main-nav.opened").height(windowHeight - navbarHeight);
                    }, 100);
                } else if ($this.attr("aria-expanded") === "true") {
                    pressed = "false";
                    $("body").removeClass("prevent-scrolling");
                    setTimeout(function () {
                        $(".main-nav").removeClass("opened");
                    }, 100);
                    setTimeout(function () {
                        $(".main-nav").height("auto");
                    }, 500);
                }

                $this.attr("aria-expanded", pressed);

            });

        // Add the blur when the menu is open
        $('.nav-booker-toggle').click(function() {
            $('body').addClass('blurred');
            $('.contact-nav').addClass('opened');
        });

        var openSubnav = function () {

            var $this = $(this);
            var parent = $this.parent();

            parent
                .toggleClass('open')
                .off('mouseleave')
                .on('mouseleave',
                    function(e) {
                        $(this).removeClass('open');
                    });

            $this.attr('aria-expanded', parent.hasClass('open'));
        }

        // Subnav dropdowns

        var subNavIndex = 0;

        $('.has-children > a').each(function() {
            var $this = $(this);
            $this.attr('role', 'button');
            $this.attr('aria-expanded', false);

            var ariaControlsId = 'digex-subnav-children-' + subNavIndex;

            $this.attr('aria-controls', ariaControlsId);
            subNavIndex += 1;

            $this.parents('.has-children').find('.digex-subnav-children, .plp-subnav-children')
                .attr('id', ariaControlsId);
        });

        $('.has-children > a').click(function(e) {
            e.preventDefault();
            e.stopPropagation();


            var boundOpenSubnav = openSubnav.bind(this);
            boundOpenSubnav();
        });

        $('.has-children > a').keypress(function (e) {
            if (e.keyCode === 32 || e.keyCode === 13) {

                e.preventDefault();
                e.stopPropagation();


                var boundOpenSubnav = openSubnav.bind(this);
                boundOpenSubnav();
            }
        });

        $('*').mousedown(function(e) {
            if ((!$(e.target).hasClass('.filter-head')) && ($(e.target).parents('.filter-dropdown').length === 0)) {
                $('.filter-head, .filter-body').removeClass('filter-open');
                $('.filter-head').attr('aria-expanded', false);
            }
        });

        // Open the main nav menu subnav on click
        var closePanels = $('.plp-main-nav-subnav').hide();
        $('.plp-nav-link-toggle').click(function () {

            var $this = $(this);

            closePanels.slideUp();
            if ($this.siblings().hasClass('open')) {
                $this.siblings().removeClass('open');
                $this.siblings().find('a[role="button"]').attr('aria-expanded', 'false');
            }
            if ($this.hasClass('open')) {
                $this.find('> ul').slideUp();
                $this.removeClass('open');
                $this.find('a[role="button"]').attr('aria-expanded', 'false');
            } else {
                $this.find('> ul').slideDown();
                $this.addClass('open');
                $this.find('a[role="button"]').attr('aria-expanded', 'true');
            }
        }).on('keydown', function(e) {
            if (event.which === 13 || event.keyCode === 13) {
                var $this = $(this);
                $this.trigger('click');

                if ($this.find('a[role="button"]').attr('aria-expanded') === 'false') {
                    $this.trigger('click');
                }

            }
        });

        // Click functionality for contact, account, and language selector
        var d_navDisplay = $('.digex-nav-component').css('display');
        var d_subnavDisplay = $('.digex-subnav-component').css('display');
        var p_navDisplay = $('.plp-nav-component').css('display');
        var p_subnavDisplay = $('.plp-subnav-component').css('display');

        $('.digex-account-dropdown .digex-signin-form input[type="text"], .digex-account-dropdown .digex-signin-form input[type="password"]').click(function(e) {

            e.stopPropagation();
        });


        $('.close-dropdown-mobile').click(function(e) {
            if ($document.width() <= 768) {
                $('.digex-nav-component').css('display', d_navDisplay);
                $('.digex-subnav-component').css('display', d_subnavDisplay);
                $('.plp-nav-component').css('display', p_navDisplay);
                $('.plp-subnav-component').css('display', p_subnavDisplay);
            }
        });

        // TODO: new function 2023 rebrand
        // a Waypoint convenience method for retrieving the width of the window
        function checkViewportWidth() {
            if (Waypoint.viewportWidth() < 1024) {
                return 66;
            } else {
                return 142;
            }
        }

        if ($(".occasions-property-page").length === 0) {
            let elemPosOriginal=$(".plp-subnav-component.observe, .digex-subnav-component.observe").offset().top
          
            var stickyNav = new Waypoint.Sticky({
                stuckClass: "fixed-subnav",
                element: $(".plp-check-availability")[0],
                handler: function (direction) {
                    // var $headerWrapper = $('.alert-module-wrap');
                    // var headerHeight = $headerWrapper.length ? $headerWrapper.outerHeight(true) : 0;

                    // // Calculate the heights of the sub-nav and digex-subnav-links-wrapper

                    // if (!headerHeight) {
                    //     var $subNav = $(".js-nav-scroll-effect");  // Replace with the correct sub-nav selector
                    //     var subNavHeight = $subNav.length ? $subNav.outerHeight(true) : 0;
                        

                    //     var $plpSubNavLinks = $(".plp-subnav-component-links");
                    //     var $digexSubNavLinks = $(".digex-subnav-component-links");
                        
                    //     var plpSubNavLinksHeight = $plpSubNavLinks.length ? $plpSubNavLinks.outerHeight(true) : 0;
                    //     var digexSubNavLinksHeight = $digexSubNavLinks.length ? $digexSubNavLinks.outerHeight(true) : 0;


                        
                    //     var headerHeight;
                        
                    //     if ($plpSubNavLinks.length) {
                    //         headerHeight = subNavHeight + plpSubNavLinksHeight;
                    //     } else {
                    //         headerHeight = subNavHeight + digexSubNavLinksHeight;
                    //     }
                        
                    //     // Use headerHeight as needed
                        
                    // }

                    if (direction === "down") {
                        $body.addClass("fixed-plp-check-availability");
                        $(".floating-promo-special-wrapper").addClass("show");

                        setTimeout(function () {
                            $(".floating-promo-special-wrapper .floating-promo-trigger-title").hide();
                        }, 2000);

                        $(".plp-subnav-component.observe, .digex-subnav-component.observe").addClass("fixed-subnav");
                        // $(".plp-check-availability.observe").css({ top: headerHeight + 'px' });
                    } else {
                        $body.removeClass("fixed-plp-check-availability");
                        $(".floating-promo-special-wrapper").removeClass("show");
                        $(".plp-subnav-component.observe, .digex-subnav-component.observe").removeClass("fixed-subnav");
                        // if($headerWrapper.length != 0) {
                        //     $(".plp-check-availability.observe").css({ top: 'auto' });

                        // }
                    }
                },
                offset: checkViewportWidth()
            });
        } else if ($(".occasions-navbar-wrapper").length > 0) {
            var isOccasionsPageBarSticky = false;

            var stickyNav = new Waypoint.Sticky({
                stuckClass: "fixed-subnav",
                element: $(".occasions-navbar-wrapper")[0],
                handler: function (direction) {
                    // var $headerWrapper = $('.alert-module-wrap');
                    // var headerHeight = $headerWrapper.length ? $headerWrapper.outerHeight(true) : 0;

                    // // Calculate the heights of the sub-nav and digex-subnav-links-wrapper
                    // if (!headerHeight) {
                    //     var $subNav = $(".js-nav-scroll-effect");  // Replace with the correct sub-nav selector
                    //     var subNavHeight = $subNav.length ? $subNav.outerHeight(true) : 0;

                    //     var $plpSubNavLinks = $(".plp-subnav-component-links");
                    //     var $digexSubNavLinks = $(".digex-subnav-component-links");
                        
                    //     var plpSubNavLinksHeight = $plpSubNavLinks.length ? $plpSubNavLinks.outerHeight(true) : 0;
                    //     var digexSubNavLinksHeight = $digexSubNavLinks.length ? $digexSubNavLinks.outerHeight(true) : 0;
                        
                    //     var headerHeight;
                        
                    //     if ($plpSubNavLinks.length) {
                    //         headerHeight = subNavHeight + plpSubNavLinksHeight;
                    //     } else {
                    //         headerHeight = subNavHeight + digexSubNavLinksHeight;

                    //     }
                        
                    
                        
                    // }

                    if (direction === "down") {
                        $(".plp-subnav-component").addClass("fixed-subnav");
                        $(".plp-subnav-links-wrapper").addClass("fixed");
                        $(".occasions-navbar-container").addClass("occasions-dropdown-active");
                        // $(".plp-check-availability").css({ top: headerHeight + 'px' });
                        isOccasionsPageBarSticky = true;
                    } else {
                        $body.removeClass("fixed-occasions-navbar-wrappers");
                        $(".plp-subnav-component").removeClass("fixed-subnav");
                        $(".plp-subnav-links-wrapper").removeClass("fixed");

                        if ($(window).width() > 1780) {
                            $(".occasions-navbar-container").removeClass("occasions-dropdown-active");
                        }
                        // if($headerWrapper.length != 0) {
                        //     $(".plp-check-availability.observe").css({ top: 'auto' });

                        // }                       
                         isOccasionsPageBarSticky = false;
                    }
                },
                offset: checkViewportWidth()
            });

            var occasionsPageProcessingResize = function () {
                if ($(window).width() < 1780) {
                    $(".occasions-navbar-container").addClass("occasions-dropdown-active");
                } else if (!isOccasionsPageBarSticky) {
                    $(".occasions-navbar-container").removeClass("occasions-dropdown-active");
                }
            };

            var isOccasionPageProcessingResize = false;

            $(window).on("resize", function () {
                if (!isOccasionPageProcessingResize) {
                    isOccasionPageProcessingResize = true;
                    setTimeout(function () {
                        occasionsPageProcessingResize();
                        isOccasionPageProcessingResize = false;
                    }, 500);
                }
            });

            occasionsPageProcessingResize();
        }



        //Helper function to determine if something an element is in the viewport
        var isInViewport = function(elem) {
            var bounding = elem.getBoundingClientRect();
            return (
                bounding.top >= 0 &&
                bounding.left >= 40 &&
                bounding.bottom <= (window.innerHeight || document.documentElement.clientHeight) &&
                (bounding.right <= (window.innerWidth || document.documentElement.clientWidth) - 40)
            );
        };

        // Add the classes for first and last subnav items
        $('.digex-subnav-component-links li, .plp-subnav-component-links li').first().addClass('first-subnav-link');
        $('.digex-subnav-component-links li:last, .plp-subnav-component-links li:last').last().addClass('last-subnav-link');



        // Mobile subnav button functionality
        $('.digex-subnav-arrow .prev, .plp-subnav-arrow .prev').click(function(event) {
            var firstLink = document.querySelector('.first-subnav-link');
            // Stop anything from happening if the first link is in the viewport
            // Else do the animation
            if (isInViewport(firstLink)) {
                event.stopPropagation();
                $('.digex-subnav-arrow .prev, .plp-subnav-arrow .prev').fadeOut();
            } else {
                $('.digex-subnav-component-links li, .plp-subnav-component-links li').animate({ left: '+=100' }, 250, function() {
                    if (isInViewport(firstLink)) {
                        $('.digex-subnav-arrow .prev, .plp-subnav-arrow .prev').fadeOut();
                    }
                });
            }
            $('.digex-subnav-arrow .next, .plp-subnav-arrow .next').fadeIn();
        });
        $('.digex-subnav-arrow .next, .plp-subnav-arrow .next').click(function(event) {
            var lastLink = document.querySelector('.last-subnav-link');
            // Stop anything from happening if the first link is in the viewport
            // Else do the animation
            if (isInViewport(lastLink)) {
                event.stopPropagation();
                $('.digex-subnav-arrow .next, .plp-subnav-arrow .next').fadeOut();
            } else {
                $('.digex-subnav-component-links li, .plp-subnav-component-links li').animate({ left: '-=100' }, 250, function() {
                    if (isInViewport(lastLink)) {
                        $('.digex-subnav-arrow .next, .plp-subnav-arrow .next').fadeOut();
                    }
                });
            }
            $('.digex-subnav-arrow .prev, .plp-subnav-arrow .prev').fadeIn();
        });

        $('.digex-subnav-component-links, .plp-subnav-component-links').on('touchstart', function(e) {
            var swipe = e.originalEvent.touches,
                start = swipe[0].pageX;

            var oPos = $(this).find('.first-subnav-link').position().left;
            var firstLink = document.querySelector('.first-subnav-link');
            var lastLink = document.querySelector('.last-subnav-link');

            $(this).on('touchmove', function(e) {

                    var contact = e.originalEvent.touches,
                        end = contact[0].pageX,
                        distance = end - start;

                    if ((distance < -5) && (!isInViewport(lastLink))) {
                        $('.digex-subnav-component-links li, .plp-subnav-component-links li').css('left', oPos + distance);
                    } // left

                    if ((distance > 5) && (!isInViewport(firstLink))) {
                        $('.digex-subnav-component-links li, .plp-subnav-component-links li').css('left', oPos + distance);
                    } // right
                })
                .on('touchend', function() {
                    $(this).off('touchmove touchend');
                    if (isInViewport(firstLink)) {
                        $('.digex-subnav-arrow .prev, .plp-subnav-arrow .prev').fadeOut();
                    } else {
                        $('.digex-subnav-arrow .prev, .plp-subnav-arrow .prev').fadeIn();
                    }
                    if (isInViewport(lastLink)) {
                        $('.digex-subnav-arrow .next, .plp-subnav-arrow .next').fadeOut();
                    } else {
                        $('.digex-subnav-arrow .next, .plp-subnav-arrow .next').fadeIn();
                    }
                });
        });

        
        // Slick slider carousel
        $('.plp-slick').slick({
            accessibility: false,
            centerMode: false,
            mobileFirst: true,
            slidesToShow: 1,
            variableWidth: false,
            responsive: [{
                breakpoint: 768,
                settings: {
                    centerMode: false,
                    variableWidth: false
                }

            }]
        });

        $('.digex-slick').slick({
            accessibility: false,
            dots: true,
            mobileFirst: true,
            slidesToShow: 1,
            slidesToScroll: 1,
            responsive: [{
                    breakpoint: 1023,
                    settings: {
                        slidesToShow: 3,
                        slidesToScroll: 3,
                    }
                },
                {
                    breakpoint: 767,
                    settings: {
                        slidesToShow: 2,
                        slidesToScroll: 2,
                    }
                }
            ]
        });

        $('.digex-slick, .plp-click, .slick-slider').on('afterChange', function(event, slick, currentSlide, nextSlide){

            

            $(this).find('.slick-dots li button').removeAttr('aria-current');
            $(this).find('.slick-dots li.slick-active button').attr('aria-current', 'true');

            setTimeout(function() {
                    refreshSlickDots();
                },
                250);

        });
         refreshSlickDots();
        $('.slick-dots li.slick-active button').attr('aria-current', 'true');
        $('a[data-modal-no-close]').click(function(e) {

            e.preventDefault();

            var lnk = $(this);
            lnk.modal({ showClose: false });

            return false;
        });

        $(".plp-slick[data-modal]").on("click keypress", function (event) {
            if (a11yClick(event) === true) {
                event.preventDefault();
                if ($(document).width() > 767) {
                    var $el = $(this).closest("[data-modal]");
                    $($el.attr("data-modal")).modal();
                }
            }
        });

        $('div[id^="room-carousel"]').on($.modal.OPEN, function() {
            $(this).find('.plp-slick')
                .slick('unslick')
                .slick();
            $(this).find('.plp-slick').slick('slickGoTo', $('[data-modal="#' + this.id + '"]').slick('slickCurrentSlide'), false);
        });

        // expanding content sections
        // original code
        $(document).on('click', '.expand-view', function(e) {
            e.preventDefault();
            var $el = $(this).closest('.expand-wrapper');

            $el.toggleClass('open');

            if ($el.hasClass('open')) {
                $(this).attr('aria-expanded', 'true');
                $el.find('.expand-content').slideDown();
                $(this).addClass('rotate').text('View Less');
            } else {
                $(this).attr('aria-expanded', 'false');
                $el.find('.expand-content').slideUp();
                $(this).removeClass('rotate').text('View More');
            }
        });

        //this part is needed only for the ASP.NET Web Forms version of the footer.
        var initJoinSelectGuestTodayForm = function() {
            var div = $('#joinSelectGuestToday');

            var submitForm = function(e) {
                if (e != undefined) {
                    e.preventDefault();
                }

                var form = $('<form />');

                form.css('display', 'none');

                form.html(div.html());
                form.attr('action', div.data('action'));

                $('body').append(form);

                form.find('.plp-select-guest-input').val(div.find('.plp-select-guest-input').val());
                form.find('.plp-select-guest-submit').attr('type', 'submit').click();
            };

            div.find('.plp-select-guest-input').keypress(function(e) {
                if (e.which === 13 || e.keyCode === 13) {
                    submitForm(e);
                }
            });

            div.find('.plp-select-guest-submit').click(function (e) {
                submitForm();
            });
        };

        var addBlur = function() {
            $('.plp-header, .digex-header').each(function() {
                var header = $(this);
                var picture = header.find('.plp-hero-image-wrapper').html();
                header.find('.plp-subnav-component .plp-subnav-blur, .digex-subnav-component .digex-subnav-blur').html(picture);
            });
        };

        if ($('.plg-page-edit-mode').length === 0) {
            addBlur();
            initJoinSelectGuestTodayForm();
        }

        var userAgent, ieReg, ie;
        userAgent = window.navigator.userAgent;
        ieReg = /msie|Trident.*rv[ :]*11\./gi;
        ie = ieReg.test(userAgent);

        if (ie) {
            $(".plp-hero-image-wrapper picture").each(function() {
                var $container = $(this),
                    imgUrl = $container.find("img").prop("src");

                if (imgUrl) {
                    $('.plp-image-overlay').css("backgroundImage", 'linear-gradient(rgba(0,0,0,0) 25%, rgba(0,0,0,0.5) 50%, rgba(0,0,0,0) 75%), url(' + imgUrl + ')').addClass("custom-object-fit");
                }
            });

            $(".plp-subnav-blur").each(function() {
                var $container = $(this),
                    imgUrl = $container.find("img").prop("src");

                if (imgUrl) {
                    $container.css("backgroundImage", 'linear-gradient(rgba(0,0,0,0) 25%, rgba(0,0,0,0.5) 50%, rgba(0,0,0,0) 75%), url(' + imgUrl + ')').addClass("custom-object-fit");
                }
            });
        }

        //Destination page filter functions
        $('.filter-head').click(function (e) {

            if ($(this).parents('#filterStayDates').length === 0) {
                e.preventDefault();
                e.stopPropagation();
            }

            if ($(window).width() < 768) {
                if (!$(this).hasClass('filter-open')) {
                    //only one filter drop-down can be expanded in mobile at the same time.
                    closeFilter();
                }
            }

            // are we in mobile view?
            if ($('.plp-room-filters').hasClass('filter-open')) {
                $(this).toggleClass('filter-open').attr('aria-expanded', $(this).hasClass('filter-open'));
                var $filter = $(this).next();
                $filter.toggleClass('filter-open');
            } else {
                if ($(this).hasClass('filter-open')) {
                    closeFilter();
                } else {
                    closeFilter();
                    $(this).addClass('filter-open').attr('aria-expanded', 'true');
                    var $filter = $(this).next();
                    $filter.addClass('filter-open');
                }
            }
        });

        $('.close-filter').click(function() {
            closeFilter();
        });

        $('.apply-filter').on('click', function (e, doNotLoad) {

            if ($('.occasions-property-page').length > 0) {
                closeFilter();
                return;
            }

            var divSelectedFilters = $('.plp-selected-filters');

            $(this).parent().find('.filter-item [type="checkbox"]').each(function() {
                var chk = $(this);

                $('.plp-selected-filters').find('div[data-value="' + chk.val() + '"]').remove();
                var type = chk.data('type');

                if (chk.is(':checked')) {
                    var displayName = chk.data('displayname');
                    if (!displayName) {
                        displayName = chk.val();
                    }
                    var $filterTag = $('<div />').addClass('filter-tag').attr('rel-filter', chk.attr('id')).attr('data-type', type).attr('data-value', chk.val()).attr('data-displayname', displayName).text(displayName);

                    if (type === 'Location') {
                        $filterTag.attr('data-input', true);
                        divSelectedFilters.find('.filter-tag[data-type="Hotel"],.filter-tag[data-type="Airport"]').remove();
                        digex.destinations.resetBookingBar();
                    }

                    $filterTag.click(function() {
                        $('input#' + $(this).attr('rel-filter')).prop('checked', false);
                        $(this).remove();
                        digex.destinations.load();
                        digex.offers.load();

                        if (type === 'Location') {
                            var bookingBar = $('div[data-component="plp-check-availability"]');
                            bookingBar.trigger('resetPlaceholder', ['']);
                        }
                    });

                    divSelectedFilters.append($filterTag);

                } else {
                    $('[rel-filter="' + $(this).attr('id') + '"]').remove();
                }
            });

            closeFilter();

            if (!doNotLoad) {
                digex.destinations.load();
                digex.offers.load();
            }
        });



        function bodyDisableScrolling(disable) {
            if (disable) {
                $body.addClass('digex-disable-scrolling');
            } else {
                $body.removeClass('digex-disable-scrolling');
            }
        }

        function closeFilter() {
            $('.filter-head, .filter-body').removeClass('filter-open');
            $('.filter-head').attr('aria-expanded', 'false');
        }

        $('.close-filter-mobile').click(function() {
            $('.plp-room-filters, .filter-head').removeClass('filter-open');
            bodyDisableScrolling(false);
        });

        $('.apply-all-filters').click(function() {
            $('.plp-room-filters, .filter-head').removeClass('filter-open');
            bodyDisableScrolling(false);

            if ($('.occasions-property-page').length > 0) {
                return;
            }
            digex.destinations.load();
            digex.offers.load();
        });

        // view destination filters
        $('.mobile-view-filters').click(function(e) {
            e.preventDefault();
            $(this).parent().addClass('filter-open');
            setTimeout(function() {
                //$('#filterPropertyTypes .filter-head:not(.filter-open)').trigger('click');

                if ($('#filterDestinations').is(':visible')) {
                    $('#filterDestinations .filter-head:not(.filter-open)').trigger('click');
                } else {
                    $('#filterStayDates .filter-head:not(.filter-open)').trigger('click');
                }

            }, 250);

            bodyDisableScrolling(true);
        });

        var accItem = document.getElementsByClassName('accordionItem');
        var accHD = document.getElementsByClassName('accordionItemHeading');

        for (var i = 0; i < accHD.length; i++) {
            accHD[i].addEventListener('click', toggleItem, false);
        }

        

        function toggleItem() {
            var $this = $(this);
            var itemClass = this.parentNode.className;
            for (var i = 0; i < accItem.length; i++) {
                accItem[i].className = 'accordionItem close';
                $this.attr('aria-expanded', false);
            }
            if (itemClass === 'accordionItem close') {
                this.parentNode.className = 'accordionItem open';
                $this.attr('aria-expanded', true);
            } 
        }

        var initAccordion = function () {
            var accordionIndex = 0;
            $('.accordianWrapper').each(function() {
                var wrapper = $(this);
                var accordionItemIndex = 0;
                wrapper.find('.accordionItem').each(function () {
                    var item = $(this);
                    var itemHeading = item.find('.accordionItemHeading');
                    var itemContent = item.find('.accordionItemContent');
                    var ariaId = 'accordionItemContent-' + accordionIndex + '-' + accordionItemIndex;

                    itemHeading.attr('aria-controls', ariaId);
                    itemHeading.attr('aria-expanded', false);
                    itemContent.attr('id', ariaId);
                    itemContent.removeAttr('aria-expanded');
                    accordionItemIndex += 1;
                    itemHeading.keypress(function (e) {
                        if(e.keyCode === 32){
                            e.preventDefault();
                            e.stopPropagation();

                            var ti = toggleItem.bind(this);
                            ti();
                        };
                    });
                });
                accordionIndex += 1;
            });
        };

        initAccordion();

        //ADA Trap focus for modals
        function trapFocus(element, namespace) {
            var focusableEls = element.find('button:visible, a:visible, object:visible, :input:visible, iframe:visible, [tabindex]'),
                firstFocusableEl = focusableEls.first()[0],
                lastFocusableEl = focusableEls.last()[0],
                TABKEYCODE = 9;

            

            if (firstFocusableEl) {
                firstFocusableEl.focus();
               
                element.on('keydown', function(e) {
                    var isTabPressed = (e.key === 'Tab' || e.keyCode === TABKEYCODE);

                    if (!isTabPressed) {
                        return;
                    }

                    if (e.shiftKey) /* shift tab keypress */ {
                        if (document.activeElement === firstFocusableEl) {
                            lastFocusableEl.focus();
                            e.preventDefault();
                        }
                    } else /* tab keypress */ {
                        if (document.activeElement === lastFocusableEl) {
                            firstFocusableEl.focus();
                            e.preventDefault();
                        }
                    }
                });
            }
            
        }

        $(document).on($.modal.OPEN, function (e, modal) {
            
            modal.$elm.find('.close-modal').addClass('hide');

            var $closeBtn = $('<button />').addClass('close-modal-btn').attr('rel', 'modal:close').attr('aria-label', 'Close');
            $closeBtn.off('click')
                .on('click', function() {
                    $.modal.close();
                });

            modal.$elm.prepend($closeBtn);

            trapFocus(modal.$elm);

            setTimeout(function() {
                modal.$elm.find('.close-modal-btn').not('[aria-label]').remove();
            }, 50);
        });

        $(document).on($.modal.AFTER_CLOSE, function(e, modal) {
            modal.$elm.find('.close-modal-btn').remove();
            modal.$anchor.focus();

            setTimeout(function() {
                var id = modal.$elm.attr('id');
                $('div[data-modal="#' + id + '"]').focus();
            }, 100);
        });

        //$('.plp-select-guest-imput').each(function() {
        //    $(this).data('oldVal', $(this));

        //    $(this).bind("propertychange keyup input paste", function(event) {
        //        if ($(this).data('oldVal') != $(this).val()) {
        //            $(this).data('oldVal', $(this).val());

        //            $('.plp-select-guest-container').addClass('active');
        //        }
        //    });
        //});

        $(document).on('click', '.plp-room-hilite-container > .plp-room-hilites > .plp-room-hilite > a.plp-room-action', function(e) {
            $(this).addClass("plp-show-spinner");
        });

        $('.promo-banner-wrapper .promo-banner-text').shave(14);
        $('.clp-events-carousel-item .description').shave(56);

        digex.bgimage.processImages();

        setTimeout(function() {
            loadRooms();
        }, 250);


        setTimeout(function() {
            //delete language cookie
            //Bug 5793: English Offers automatically redirect to French | MONDTN
            Cookies.remove('omni#lang', {path: '/'});
            },
        1000);
    });
})(jQuery);

(function ($) {

    $j = $;

    //Cities - interests map
    $j(function () {

        var bounds, infowindow, Popup;
        var iconThingsToDo ,
            iconThingsToDoSelected ,
            iconHotelSelected ,
            iconHotel;
        var markers = [];
        var bookingBar = $j('div[data-component="plp-check-availability"]');


        var resetIconForAllMarkers = function() {
            $j.each(markers,
                function(index, arr) {

                    var marker = arr[1];

                    if (marker.isHotel) {
                        marker.setIcon(iconHotel);
                    } else {
                        marker.setIcon(iconThingsToDo);
                    }

                });
        };


        var initMapInterests = function (propertiesList) {

            var component = $j('.digex-interests-map');
            var zoomLevel = parseFloat(component.data('map-zoom'));

            var googleMap = $j('#googleMap-interests');

            googleMap.on('click',
                function (e) {
                    var target = $j(e.target);
                    
                    if (target.parents('.popup-container').length === 0 && !target.attr('src')) {
                        googleMap.find('.popup-container').css('visibility', 'hidden');
                        resetIconForAllMarkers();
                    }
                });

            if (googleMap.length === 0) {
                return;
            }

            var interestModals = document.getElementById('interests-popups');

            if (googleMap.length === 0) {
                return;
            }

            GoogleMapsLoader.KEY = googleMap.data('key');
            GoogleMapsLoader.VERSION = 'quarterly';
            GoogleMapsLoader.load(function (google) {

               iconThingsToDo = {
                url: '/assets/css/img/map-icon-interest.png',
                anchor: new google.maps.Point(28, 28),
                scaledSize: new google.maps.Size(56, 56)
            },
            iconThingsToDoSelected = {
                url: '/assets/css/img/map-icon-interest-selected.png',
                anchor: new google.maps.Point(28, 28),
                scaledSize: new google.maps.Size(56, 56)
            },
            iconHotelSelected = {
                url: '/assets/css/img/map-icon-selected.png',
                anchor: new google.maps.Point(28, 28),
                scaledSize: new google.maps.Size(56, 56)
            },
            iconHotel = {
                url: '/assets/css/img/map-icon-marker.png',
                anchor: new google.maps.Point(28, 28),
                scaledSize: new google.maps.Size(56, 56)
            };

                //var geocoder = new google.maps.Geocoder();
                Popup = createPopupClass();
                bounds = new google.maps.LatLngBounds();
                infowindow = new google.maps.InfoWindow();

                window.map = new google.maps.Map(document.getElementById('googleMap-interests'), {
                    zoom: 6,
                    mapTypeId: google.maps.MapTypeId.ROADMAP
                });

                var map = window.map;

                var adjustZoom = function () {
                    setTimeout(function() {
                        var zoom = map.getZoom();
                        if (zoomLevel) {
                            zoom = zoomLevel;
                        } else {
                            zoom = zoom > 10 && markers.length < 3 ? 10 : zoom + 0.5;
                        }
                        map.setZoom(zoom);
                    }, 3000);
                };
                

                $j.each(propertiesList, function (index, location) {

                    addInterestMarker(location);

                    /*if (location.isHotel) {
                        addInterestMarker(location);
                    } else {
                        geocoder.geocode({ 'address': location.address }, function (results, status) {
                            if (status === google.maps.GeocoderStatus.OK) {
                                var geoLocation = results[0].geometry.location;
                                location.lat = geoLocation.lat();
                                location.lng = geoLocation.lng();
                                addInterestMarker(location);

                                map.initialZoom = true;
                                console.log('map.fitBounds(bounds)');
                                map.fitBounds(bounds);
                            }
                        });
                    }*/
                });

                map.initialZoom = true;
                map.fitBounds(bounds);

                adjustZoom();
            });
        };


        function getPropertyList() {

            if ($j('#ThingsToDoItems').length === 0) {
                return;
            }

            var propertiesItem = document.querySelector("#ThingsToDoItems").innerText;

            var  propertiesJson = JSON.parse(propertiesItem);
            var ItemList = _.map(propertiesJson, function (item) {
              return {
                  id: item.Id,
                  address: item.FullAddress,
                  city: item.City ? item.City : "",
                  state: item.State,
                  zip: item.ZipCode,
                  name: item.Name,
                  description: item.Description,
                  url: item.ItemUrl,
                  lat: item.Latitude,
                  lng: item.Longitude,
                  phone: item.PhoneNumber,
                  img: item.ImageSrc,
                  alt: item.Alt,
                  tripadvisor: item.TripAdvisorScript,
                  link: item.Link,
                  isHotel: item.IsHotel
              };
            });

            initMapInterests(ItemList);
        }

        getPropertyList();

        var addInterestMarker = function (markerInfo) {
            var icon,
                hideReadMoreButton = false,
                available = null,
                popupTemplate, popupHtml, popupContent;



            if (markerInfo.isHotel) {
                icon = iconHotel;
                available = markerInfo.available;
                popupTemplate = document.getElementById('resort-content-template');
                popupHtml = popupTemplate.innerHTML;
                popupContent = popupHtml
                    .replace(/{{img}}/g, markerInfo.img)
                    .replace(/{{alt}}/g, markerInfo.alt)
                    .replace(/{{name}}/g, markerInfo.name)
                    .replace(/{{phone}}/g, markerInfo.phone)
                    .replace(/{{detailsUrl}}/g, markerInfo.url)
                    .replace(/{{hotelId}}/g, markerInfo.id)
                    .replace(/{{tripadvisor}}/g,decodeURIComponent( markerInfo.tripadvisor));

            } else {
                icon = iconThingsToDo;
                //var  readmoreUrl = markerInfo.link?markerInfo.link  :markerInfo.ItemUrl;
                var  readmoreUrl = markerInfo.link;
                var encodedDirections = encodeURI(markerInfo.name + ', ' + markerInfo.address + ', ' + markerInfo.city + ', ' + markerInfo.state + ', ' + markerInfo.zip);
                popupTemplate = document.getElementById('interest-content-template');
                popupHtml = popupTemplate.innerHTML;
                popupContent = popupHtml.replace(/{{name}}/g, markerInfo.name)
                    .replace(/{{description}}/g, markerInfo.description)
                    .replace(/{{detailsUrl}}/g, readmoreUrl)
                    .replace(/{{encodedDirections}}/g, encodedDirections);

                if (!readmoreUrl) {
                    hideReadMoreButton = true;
                }
            }

            var marker = new google.maps.Marker({
                icon: icon,
                map: window.map,
                position: new google.maps.LatLng(markerInfo.lat, markerInfo.lng),
                title: markerInfo.name,
                resortid: markerInfo.id,
                available: available,
                isHotel: markerInfo.isHotel,
                zIndex: markerInfo.isHotel ? 999 : 1
            });

            markers.push([markerInfo.id, marker]);

            bounds.extend(marker.position);

            var $popupWrapper = $j('<div />').addClass('popupContent').html(popupContent);

            if (hideReadMoreButton) {
                $popupWrapper.find('.digex-secondary-cta[href=""]').css('visibility', 'hidden');
            }

            $j('#interests-popups').append($popupWrapper);

            var popup = new Popup(
                new google.maps.LatLng(markerInfo.lat, markerInfo.lng),
                $popupWrapper.get(0),
                markerInfo.id
            );

            popup.setMap(window.map);

            google.maps.event.addListener(marker, 'click', (function (marker , ev) {
                return function () {

                    resetIconForAllMarkers();
                    

                    var propertyItem= $j('[data-interest="' + marker.resortid + '"]');
                    //var isHotel = propertyItem.find('[data-hotel-id]').length > 0;
                    var isHotel = marker.isHotel;

                    if (propertyItem.css('visibility') === 'hidden') {

                        window.map.setCenter(marker.getPosition());

                        setTimeout(function() {
                            $j('.popup-container').css('visibility', 'hidden');
                            propertyItem.css('visibility', 'visible');

                            if (isHotel) {
                                marker.setIcon(iconHotelSelected);
                            } else {
                                marker.setIcon(iconThingsToDoSelected);
                            }

                        }, 200);

                        

                        
                    } else {
                        if (isHotel) {
                            marker.setIcon(iconHotel);
                        } else {
                            marker.setIcon(iconThingsToDo);
                        }
                        propertyItem.css('visibility', 'hidden');
                    }
                };
            })(marker));
        };

        $j('[data-component="interests-map"]').on('click', function (e) {
            if (!e.target.classList.contains('close-dropdown')) {
                return;
            }

            $j(e.target).parents('.popup-container').css('visibility', 'hidden');
            resetIconForAllMarkers();
        });


        $j('[data-component="interests-map"]').on('click', function (e) {
            if (!e.target.classList.contains("digex-primary-cta")) {
                return;
            }

            e.preventDefault();
            e.stopPropagation();

            $j(e.target).text('').addClass('booking');

            var hotelId = e.target.getAttribute("data-hotel-id");
            bookingBar.trigger('search', [hotelId]);
        });

        function createPopupClass() {
            /**
             * A customized popup on the map.
             * @param {!google.maps.LatLng} position
             * @param {!Element} content The bubble div.
             * @constructor
             * @extends {google.maps.OverlayView}
             */
            function Popup(position, content, id) {
                this.position = position;

                content.classList.add('popup-bubble');

                // This zero-height div is positioned at the bottom of the bubble.
                var bubbleAnchor = document.createElement('div');
                bubbleAnchor.classList.add('popup-bubble-anchor');
                bubbleAnchor.appendChild(content);

                // This zero-height div is positioned at the bottom of the tip.
                this.containerDiv = document.createElement('div');
                this.containerDiv.classList.add('popup-container');
                this.containerDiv.setAttribute('data-interest', id);
                this.containerDiv.appendChild(bubbleAnchor);

                // Optionally stop clicks, etc., from bubbling up to the map.
                google.maps.OverlayView.preventMapHitsAndGesturesFrom(this.containerDiv);
            }

            // ES5 magic to extend google.maps.OverlayView.
            Popup.prototype = Object.create(google.maps.OverlayView.prototype);

            /** Called when the popup is added to the map. */
            Popup.prototype.onAdd = function () {
                this.getPanes().floatPane.appendChild(this.containerDiv);
            };

            /** Called when the popup is removed from the map. */
            Popup.prototype.onRemove = function () {
                if (this.containerDiv.parentElement) {
                    this.containerDiv.parentElement.removeChild(this.containerDiv);
                }
            };

            /** Called each frame when the popup needs to draw itself. */
            Popup.prototype.draw = function () {
                var divPosition = this.getProjection().fromLatLngToDivPixel(this.position);

                // Hide the popup when it is far out of view.
                var display =
                    Math.abs(divPosition.x) < 4000 && Math.abs(divPosition.y) < 4000 ?
                        'block' :
                        'none';

                if (display === 'block') {
                    this.containerDiv.style.left = divPosition.x + 'px';
                    this.containerDiv.style.top = (divPosition.y + 30) + 'px';
                }

                this.containerDiv.style.visibility = 'hidden';

                resetIconForAllMarkers();
            };

            return Popup;
        }
    });

})(jQuery);



(function (window, $) {
    $(function () {
        $('#leftNavigation').attr('aria-label', $('#leftNavigation').find('.sectionTitle').text());


        //Product Backlog Item 5621: #19: This is marked up as a list, but it is not semantically a list.
        var liTags = $('#leftNavigation .boxBorder > ul > li');
        if (liTags.length === 1) {
            $('#leftNavigation .boxBorder').html(liTags.html());
        }

        // Handle duplicate ID
        var idToHandle = $('#mainContent');
        if (idToHandle) {
            idToHandle.each(function (i) {
                $('[id="' + this.id + '"]').slice(1).attr("id", "mainContent-duplicate");
            });
        }

    });
})(window, jQuery);

(function (window, $) {
    $(function () {

        var pressSpace = $.Event("keypress");
        pressSpace.ctrlKey = false;
        pressSpace.which = 32;


        $('[role="radiogroup"]').each(function () {
            var $this = $(this);
            var $radios = $this.find('[role="radio"]');

            $radios.click(function() {
                $this.find('[role="radio"]').attr('aria-checked', 'false');
                var $current = $(this);
                $current.attr('aria-checked', 'true');
                $current.parents('p, div').find('.form-floating input').attr('tabindex', 0);
            });

            $radios.keydown(function (e) {
                var $current = $(this);

                var index = $radios.index($current);
                var $radio;
                
                if (e.keyCode === 39 || e.keyCode === 40) // right & down keys
                {
                    e.preventDefault();
                    e.stopPropagation();

                    if (index + 1 < $radios.length) {
                        $radio = $($radios.get(index + 1));
                    } else {
                        $radio = $radios.first();
                    }
                    
                    $radio.click();
                    $radio.focus();
                }
                else if (e.keyCode === 38 || e.keyCode === 37) // up and left keys
                {
                    e.preventDefault();
                    e.stopPropagation();

                    if (index - 1 >= 0) {
                        $radio = $($radios.get(index - 1));
                    } else {
                        $radio = $radios.last();
                    }

                    $radio.click();
                    $radio.focus();
                }
            });
        });
    });
})(window, jQuery);

(function (window, $) {
    $(function () {
        $('.alert-module-container').each(function() {
            var container = $(this);
            container.insertBefore($('.digex-nav-component,.plp-nav-component'));

            $('.alert-module-container, .digex-nav-component,.plp-nav-component, .digex-subnav-component, .plp-subnav-component')
                .wrapAll($('<div class="alert-module-wrap" />'));

            var btn = container.find('.alert-module-more');
            btn.click(function () {
                container.toggleClass('open');
            });
        });
    });
})(window, jQuery);

/************************************************************************
ALERT MODULE - HIDE ON CLICK - USE SESSIONSTORAGE TO KEEP MODULE HIDDEN
************************************************************************/
(function (window, $) {
    $(function () {
        var alertModule = $("#alert-module-container");

        // adjust the top position of the .floating-promo-wrapper when it's present on pages
        var alertModuleHeight = alertModule.outerHeight();
        var floatingPromoTrigger = $(".floating-promo-wrapper");
        
        if (floatingPromoTrigger.length) {
            var floatingPromoTriggerTopPosition = floatingPromoTrigger.offset().top;
            var floatingPromoNewTriggerTopPosition = (floatingPromoTriggerTopPosition + alertModuleHeight) + 'px';
            var isFloatingPromoTriggerPresent = floatingPromoTrigger.length;
        }

        if (alertModule.length) {
            var isAlertDismissed = sessionStorage.getItem("isAlertDismissed");
            isAlertDismissed = JSON.parse(isAlertDismissed); // null on first load

            // slide component down after a set time
            setTimeout(function () {
                if (!isAlertDismissed) {
                    if (isFloatingPromoTriggerPresent) {
                        floatingPromoTrigger.css({
                            "top" : floatingPromoNewTriggerTopPosition
                        })
                    }
                    alertModule.slideDown(300);
                }
            }, 500);

            // slide component out of view and store the users choice to sessionStorage
            $(".alert-module-container-wrap__close").on("click", function () {
                if (isFloatingPromoTriggerPresent) {
                    floatingPromoTrigger.css({
                        "top" : floatingPromoTriggerTopPosition
                    })
                }
                alertModule.slideUp(300);
                sessionStorage.setItem("isAlertDismissed", true);
            });
        }
    });
})(window, jQuery);
var digex = digex || {};
digex.bgimage = (function (window, $) {

    function internalProcessImages() {
        $('.digex-bg-image:not(.processed)').each(function () {
            var $this = $(this);
            if ($this.hasClass('featured-offers-image-wrapper') || $this.hasClass('featured-offers-card-image')) {
                return; // Skip the current iteration
            }

            var img = $this.find('img');

            if (img.length > 0) {
                var currentSrc = img[0].currentSrc ? img[0].currentSrc : img[0].src;
                $this.css('background-image', 'url("' + currentSrc + '")');
                $this.addClass('processed');
            }
        });
    }

    return {
        processImages: function() {
            internalProcessImages();
        }
    };

})(window, jQuery);


var digex = digex || {};
digex.booking = (function (window, $) {
    $j = $;
    console.log('booking-bar loading..');

    var internalGetModel = null;

    var removeQueryStringParam = function(url, param) {
        var urlParts = url.split('?');
        if (urlParts.length >= 2) {
            var prefix = encodeURIComponent(param) + '=';
            var pars = urlParts[1].split(/[&;]/g);
            for (var i = pars.length; i-- > 0;) {
                if (pars[i].lastIndexOf(prefix, 0) !== -1) {
                    pars.splice(i, 1);
                }
            }
            return urlParts[0] + (pars.length > 0 ? '?' + pars.join('&') : '');
        }
        return url;
    };

    var getQueryStringParams = function(url) {

        var queryParams = [];
        var anchor = document.createElement('a');
        anchor.href = url;
      
        var queryStrings = anchor.search.substring(1);
        var params = queryStrings.split('&');

        for (var i = 0; i < params.length; i++) {
            var pair = params[i].split('=');

            if (pair.length > 1) {
                if (pair[0] && pair[1]) {
                    queryParams.push({
                        key: pair[0],
                        value: decodeURIComponent(pair[1])
                    });
                }
            }
        }
        return queryParams;
    };




    var addQueryStringParam = function(url, param, value) {
        param = encodeURIComponent(param);
        var a = document.createElement('a');
        param += (value ? '=' + encodeURIComponent(value) : '');
        a.href = url;
        a.search += (a.search ? '&' : '') + param;
        return a.href;
    };

    var getQueryStringParam = function(key) {
        key = key.replace(/[*+?^$.\[\]{}()|\\\/]/g, "\\$&"); // escape RegEx meta chars
        var match = location.search.match(new RegExp("[?&]" + key + "=([^&]+)(&|$)"));
        return match && decodeURIComponent(match[1].replace(/\+/g, " "));
    };

    var getQueryStringParamFromUrl = function (url, key) {

        var search = '';    
        var urlParts = url.split('?');
        if (urlParts.length >= 2) {
            search = '?' + urlParts[1];
        }

        key = key.replace(/[*+?^$.\[\]{}()|\\\/]/g, "\\$&"); // escape RegEx meta chars
        var match = search.match(new RegExp("[?&]" + key + "=([^&]+)(&|$)"));
        return match && decodeURIComponent(match[1].replace(/\+/g, " "));
    };

    var savedStartDate = null;
    var savedEndDate = null;

    var setBookingDates = function (bookingStartDate, bookingEndDate) {
        var txtStartDate = $j('#date-start-input');
        var txtEndDate = $j('#date-end-input');

        bookingStartDate = bookingStartDate.startOf('day');
        bookingEndDate = bookingEndDate.startOf('day');

        if (savedStartDate === null && savedEndDate === null) {
            savedStartDate = moment(bookingStartDate);
            savedEndDate = moment(bookingEndDate);
        } else {
            if (bookingStartDate.isSame(savedStartDate) && bookingEndDate.isSame(savedEndDate)) {
                return;
            }
            savedStartDate = moment(bookingStartDate);
            savedEndDate = moment(bookingEndDate);
        }
        $j('#date-start-input').val(bookingStartDate.format('MMM DD, YYYY')).data('date',bookingStartDate.format('MM/DD/YYYY'));
        $j('#date-end-input').val(bookingEndDate.format('MMM DD, YYYY')).data('date', bookingEndDate.format('MM/DD/YYYY'));

        //digex.calendar.init();

        var bookDates = bookingStartDate.format('MMM DD') + ' - ' + bookingEndDate.format('MMM DD');
        $j('.set-dates').text(bookDates);

        var numberOfNights = bookingEndDate.diff(bookingStartDate, 'days');

        $('.digex-calendar-container .calendar-day-container').removeClass('selected').removeClass('start').removeClass('end');

        for (var i = 0; i <= numberOfNights; i++) {
            var sd;
            var cssClass;

            if (i === 0) {
                sd = bookingStartDate.unix();
                cssClass = 'selected start';
            }
            else if (numberOfNights === i) {
                sd = bookingEndDate.unix();
                cssClass = 'selected end';
            } else {
                sd = moment(bookingStartDate).add(i, 'days').unix();
                cssClass = 'selected';
            }

            $j('button[data-utc="' + sd + '"]').parent().addClass(cssClass);
        }

        var dateDayCount = $('.date-day-count');
        var nightText = dateDayCount.attr('data-text-night');
        if(numberOfNights > 1) {
            nightText = dateDayCount.attr('data-text-nights');
        }
        dateDayCount.text('(' + numberOfNights + ' ' + nightText + ')');


        if ($('.template-group-landing-page').length > 0) {
            digex.glp.setDates(bookingStartDate, bookingEndDate);
        }


        if ($('.template-brand-offer-page').length === 0 && $('.digex-external-page').length === 0) {
             //digex.destinations.refreshPrices();
        }
    };

    $(function () {
        var $window = $(window);
        var $document = $(document);

        $document.on('keypress keydown keyup',
            '.plp-check-availability .nav-dropdown',
            function (e) {
                //ESC
                if (e.keyCode === 27) {
                    e.preventDefault();
                    e.stopPropagation();

                    $(e.target).parents('.nav-dropdown-link').find('button:first').click();
                }
            });

        $('#plpSpecialRates .plp-input-wrapper label').attr('tabindex', 0).keypress(function (e) {

            if (e.keyCode === 32 || e.keyCode === 13) {
                e.preventDefault();
                e.stopPropagation();

                $(this).click();
            }

        });

        $document.on($.modal.OPEN, function (e, modal) {
            modal.$elm.find('.close-modal').addClass('hide');
            var $closeBtn = $j('<button />').addClass('close-modal-btn').attr('rel', 'modal:close');
            $closeBtn.off('click')
                .on('click', function () {
                    $.modal.close();
                });
            modal.$elm.append($closeBtn);
        });

        $document.on($.modal.AFTER_CLOSE, function (e, modal) {
            modal.$elm.find('.close-modal-btn').remove();
            modal.$anchor.focus();
        });

        var mobile = false;

        var DisplayDateFormat = 'MMM DD, YYYY';

        if( navigator.userAgent.match(/iPhone/i)
            || navigator.userAgent.match(/iPad/i)
            || navigator.userAgent.match(/iPod/i)
            //|| navigator.userAgent.match(/webOS/i)
            //|| navigator.userAgent.match(/Android/i)
            //|| navigator.userAgent.match(/BlackBerry/i)
            //|| navigator.userAgent.match(/Windows Phone/i)
            ){
                mobile = true;
            }


        var html = $j('html');
        var lang = html.attr('lang');

        if (!lang) {
            lang = 'en';
        }

        lang = lang.split('-')[0];
        moment.locale(lang);

        var omniBookingBarSettings = window.omniBookingBarSettings || {
            omniSiteUrl: '',
            bookingBarDiv: ''
        };

        var digexReload = function() {
            if (typeof digex !== 'undefined' && typeof digex.destinations !== 'undefined') {

                if ($j('.template-brand-offer-page').length === 0) {
                    //digex.destinations.load();
                }

            }
        };

        $('.plp-date-input-wrapper input').focus(function () {
            var $this = $(this);
            $this.one("keyup click", function(e){
                $this.select();
                $this.unbind('keyup');
                $this.unbind('click');
            });

        });

        $j('.dates-section .dates-section-content, .dates-section').on('click',
            function () {
                var content = $j('#plpCalendar').find('.nav-dropdown-content');
                if (content.find('#omniCalendar').length === 0) {
                    $j('#omniCalendar').appendTo(content);
                }
            });

        // new script 2023 rebrand 
        // will scroll the booker into view if the page has been scrolled less than "amountToScrollUp" pixels from the top unless the booker is already fixed
        $(".plp-check-availability .check-availability-section").click(function () {
            setTimeout(function () {
                var isBookerFixed = $(".fixed-plp-check-availability").length;
                if (!isBookerFixed) {
                    // $(".plp-check-availability .check-availability-section").click(function () {
                        var amountToScrollUp = 400;
                        var scrollByThisMuch = amountToScrollUp - window.pageYOffset;
                        if (window.pageYOffset < amountToScrollUp) {
                            window.scrollBy(0, scrollByThisMuch);
                        }
                    // });
                } else {
                    // do something else
                }
            }, 500);
        });

        function updateTotals($el) {

            var roomText, $target = $j('.' + $el.attr('rel'));

            var currentTotal = 0,
                fieldSearch = '[name^="' + $el.attr('name').substring(0, 15) + '"]';

            $j(fieldSearch).each(function () {
                currentTotal += parseFloat($j(this).val());
            });

            if (currentTotal === 1) {
                roomText = currentTotal + ' ' + $el.data('singular');
            } else {
                roomText = currentTotal + ' ' + $el.data('plural');
            }

            $target.text(roomText);

            if ($el[0].hasAttribute('data-total')) {
                var sum = 0,
                    elTotal = $el.data('total');

                $j('[data-total="' + elTotal + '"]').each(function () {
                    sum += parseFloat($j(this).val());
                });

                var result = sum;

                if (result == 1) {
                    result += ' ' + $el.data('total-singular');
                } else {
                    result += ' ' + $el.data('total-plural');
                }

                $j('.' + $el.data('total')).html(result);
                $j('[data-component="plp-check-availability"]').trigger('model-updated', [elTotal, sum]);
            }
        }

        function initCheckAvailabilityComponent() {

            var searchResults = [];

            var currentOffer = null;
            var doNotAnimateMainSearchButton = false;

            var $body = $j('body');
            var isCityPage = $body.hasClass('template-destination-details');

            $j('[data-component="plp-check-availability"]').each(function() {
                var component = $j(this);

                var agentNumberCookieLifetime = component.data('agent-number-cookie-lifetime');
                var isInternalBookingBar = typeof (window.omniBookingBarSettings) === 'undefined' ||
                    !window.omniBookingBarSettings;

                component.on('change',
                    '.age-value',
                    function(e) {
                        var txt = $(e.target);
                        var container = txt.parents('.child-ages');
                        var error = container.find('.error');

                        var isAllValid = true;

                        container.find('.age-value').each(function() {
                            var current = $(this);

                            if (current.val() === '-' || current.val() === '') {
                                isAllValid = false;
                            } else if (current.val().indexOf('-') !== -1) {
                                $(this).val(current.val().replace('-', ''));
                            }
                        });

                        if (isAllValid === false) {
                            error.fadeIn();
                        } else {
                            error.fadeOut();
                        }
                    });


                var saveAgentNumberToCookie = function(number) {
                    if (isInternalBookingBar) {
                         Cookies.set('omni-availability-bar-iata-num',
                                        number,
                             { path: '/', domain: 'omnihotels.com', expires: agentNumberCookieLifetime });
                    }
                }

                if (!agentNumberCookieLifetime) {
                    agentNumberCookieLifetime = 1;
                } else {
                    agentNumberCookieLifetime = parseInt(agentNumberCookieLifetime);
                }

                var ratesSectionCaption = component.find('.rates-section-content p');
                ratesSectionCaption.attr('data-text', ratesSectionCaption.text());

                component.find('#plp-flexible-dates').change(function() {
                    component.find('label[for="plp-flexible-dates"]').attr('aria-checked', this.checked);
                });


                component.find('#plp-rooms-detail').css('cursor', 'pointer');

                var searchInput = component.find('#plp-search-input');

                var currentHotelName = component.find('.search-section .search-section-content p').text();

                if (currentHotelName) {
                    searchInput.attr('data-original-placeholder', searchInput.attr('placeholder'));

                    searchInput.attr('placeholder', currentHotelName);
                    searchInput.attr('data-original-text', currentHotelName);
                }


                var inputRateGroup = component.find('input[type=radio][id="plp-rate-group"]');
                var inputRatePromo = component.find('input[type=radio][id="plp-rate-promo"]');
                var inputRate = component.find('input[type=radio][name="plp-rate"]');
                var rates = inputRate.val();

                var inputAgentCode = component.find('input[name="plp-rate-agent-code"]');
                var inputGroupCode = component.find('input[name="plp-rate-group-code"]');
                var inputPromoCode = component.find('input[name="plp-rate-promo-code"]');
                var inputCorpCode = component.find('input[name="plp-rate-corp-code"]');

                inputGroupCode.addClass('disabled');
                inputPromoCode.addClass('disabled');
                if (inputCorpCode) { inputCorpCode.addClass('disabled'); }

                var radioFlexibleDates = component.find('input[name="plp-flexible-dates"]');

                radioFlexibleDates.change(function() {
                    if (this.checked) {
                        if (rates !== 'promotional_code' && rates !== 'rpc_NONE') {
                            inputRate.filter('[value="rpc_NONE"]').prop('checked', true);
                            inputRate.change();
                        }
                        component.find('[data-hide-if-flexible-dates="true"]').hide();
                    } else {
                        component.find('[data-hide-if-flexible-dates="true"]').show();
                    }
                });

                var itemId = component.data('hotel-id');

                var isPropertyOrPropertyChildPage = itemId !== '' ? true : false;
                var isCityOrInterestPage = $j('.template-destination-details, .template-interest-page').length > 0;

                var isVillas = false;

                component.find('.nav-dropdown *').click(function (e) {
                    e.stopPropagation();
                });

                inputRate.click(function(e) {
                    var previousValue = $j(e.target).attr('previousValue');
                    var name = $j(e.target).attr('name');
                    var inputID = $j(e.target).attr('id');

                    if (previousValue === 'checked') {
                        $j(e.target).removeAttr('checked');
                        $j(e.target).attr('previousValue', false);
                        if (inputID == "plp-rate-group" || inputID == "plp-rate-promo" ) {
                            $j(e.target).attr('aria-expanded', false);
                        }
                    } else {
                        inputRate.attr('previousValue', false);
                        $j(e.target).attr('previousValue', 'checked');
                        inputRateGroup.attr('aria-expanded', false);
                        inputRatePromo.attr('aria-expanded', false);
                        if (inputID == "plp-rate-group" || inputID == "plp-rate-promo" ) {
                            $j(e.target).attr('aria-expanded', true);
                        }
                    }
                });

                var divSearchResults = component.find('.search-section .search-content').not('.offers-list');
                //divSearchResults.replaceWith('<ul class="search-content" />');
                divSearchResults.html('');

                var getModel = internalGetModel = function() {
                    var roomQuantity = component.find('input[name="plp-room-input"]').val();

                    var startDate = moment($j('#date-start-input').val(), 'MMM DD, YYYY');
                    var endDate = moment($j('#date-end-input').val(), 'MMM DD, YYYY');

                    var availableStartDate = null;
                    var availableEndDate = null;
                    var bookByDate = null;

                    var rawAvailableStartDate = inputPromoCode.attr('data-available-start-date');
                    var rawAvailableEndDate = inputPromoCode.attr('data-available-end-date');
                    var rawBookByDate = inputPromoCode.attr('data-book-by-date');

                    var offerTitle = inputPromoCode.attr('data-offer-title');

                    if (rawAvailableStartDate && rawAvailableEndDate) {

                        if (rawAvailableStartDate !== '0001-01-01') {
                            availableStartDate = moment(rawAvailableStartDate);
                        }

                        if (rawAvailableEndDate !== '0001-01-01') {
                            availableEndDate = moment(rawAvailableEndDate);
                        }
                    }

                    if (rawBookByDate) {
                        if (rawBookByDate !== '0001-01-01') {
                            bookByDate = moment(rawBookByDate);
                        }
                    }

                    var room1AdultQuantity = component.find('[name="plp-adult-input-1"]').val();
                    var room1ChildQuantity = component.find('[name="plp-children-input-1"]').val();

                    var room2AdultQuantity = component.find('[name="plp-adult-input-2"]').val();
                    var room2ChildQuantity = component.find('[name="plp-children-input-2"]').val();

                    var room3AdultQuantity = component.find('[name="plp-adult-input-3"]').val();
                    var room3ChildQuantity = component.find('[name="plp-children-input-3"]').val();

                    if (!room2AdultQuantity) {
                        room2AdultQuantity = '';
                    }

                    if (!room2ChildQuantity) {
                        room2ChildQuantity = '';
                    }

                    if (!room3AdultQuantity) {
                        room3AdultQuantity = '';
                    }

                    if (!room3ChildQuantity) {
                        room3ChildQuantity = '';
                    }

                    var travelAgentNumber = inputAgentCode.val();
                    var accountCode = $('input[name="plp-rate"]:checked').attr("id") === "plp-rate-promo" ? inputPromoCode.val() : "";
                    var corpCode = $('input[name="plp-rate"]:checked').attr("id") === "plp-rate-corp" ? inputCorpCode.val() : "";
                    var groupCode = $('input[name="plp-rate"]:checked').attr("id")=== "plp-rate-group" ? inputGroupCode.val():"";
                    var flexibleDates = $j('#plp-flexible-dates').prop('checked');
                    var getRoomChildAge = function(roomIndex, childIndex) {

                        var rooms = component.find('.plp-room-detail');

                        if (rooms.length >= roomIndex + 1) {
                            var room = rooms.eq(roomIndex);

                            var childAges = room.find('.child-ages-dropdowns input');

                            if (childAges.length >= childIndex + 1) {
                                var childInput = childAges.eq(childIndex);
                                return childInput.val();
                            }
                        }

                        return '';
                    };


                    $(document).ready(function () {
                        var component = $(document); // Assuming component is the entire document for simplicity

                        // Initial room quantity
                        var roomQuantity = parseInt(component.find('input[name="plp-room-input"]').val(), 10) || 1;

                        // Function to update and log values
                        function updateModel() {
                            // Get the current room quantity and checkbox state
                            roomQuantity = parseInt(component.find('input[name="plp-room-input"]').val(), 10) || 1;
                            var checkbox = component.find('input[name="interconnect-rooms-checkbox"]');
                            var isChecked = checkbox.is(':checked'); // Use .is(':checked') to get the checked status

                            // Update the model with the current room quantity and checkbox state
                            model.IsInterConnectRooms = roomQuantity > 1 && isChecked;

                        }

                        // Event listener for checkbox
                        component.find('input[name="interconnect-rooms-checkbox"]').on('change', function () {
                            updateModel(); // Update and log values when checkbox state changes
                        });

                        // Event listener for room input
                        component.find('input[name="plp-room-input"]').on('change', function () {
                            updateModel(); // Update and log values when room quantity changes
                        });

                        // Initial call to updateModel to set initial state
                        updateModel();
                    });

                    var checkbox = component.find('input[name="interconnect-rooms-checkbox"]');



                    var model = {
                        AdaAccessible: 'false',
                        BookingStartDate: startDate.format('MM-DD-YYYY'),
                        BookingEndDate: endDate.format('MM-DD-YYYY'),
                        HotelId: itemId,
                        Rates: rates,
                        Room1AdultQuantity: room1AdultQuantity,
                        Room1ChildAge1: getRoomChildAge(0, 0),
                        Room1ChildAge2: getRoomChildAge(0, 1),
                        Room1ChildAge3: getRoomChildAge(0, 2),
                        Room1ChildAge4: getRoomChildAge(0, 3),
                        Room1ChildQuantity: room1ChildQuantity,
                        Room2AdultQuantity: room2AdultQuantity,
                        Room2ChildAge1: getRoomChildAge(1, 0),
                        Room2ChildAge2: getRoomChildAge(1, 1),
                        Room2ChildAge3: getRoomChildAge(1, 2),
                        Room2ChildAge4: getRoomChildAge(1, 3),
                        Room2ChildQuantity: room2ChildQuantity,
                        Room3AdultQuantity: room3AdultQuantity,
                        Room3ChildAge1: getRoomChildAge(2, 0),
                        Room3ChildAge2: getRoomChildAge(2, 1),
                        Room3ChildAge3: getRoomChildAge(2, 2),
                        Room3ChildAge4: getRoomChildAge(2, 3),
                        Room3ChildQuantity: room3ChildQuantity,
                        RoomQuantity: roomQuantity,
                        VillasBedRoomQuantity: isVillas ? '0' : '',
                        VillasView: '',
                        TravelAgentNumber: travelAgentNumber,
                        AccountCode: accountCode,
                        CorpCode: corpCode,
                        GroupCode: groupCode,
                        FlexibleDates: flexibleDates,
                        IsInterConnectRooms: checkbox.is(':checked'),
                        Language: 'en-us',
                        Internal: {
                            StartDate: startDate,
                            EndDate: endDate,
                            AvailableStartDate: availableStartDate,
                            AvailableEndDate: availableEndDate,
                            OfferTitle: offerTitle,
                            BookByDate: bookByDate
                        }
                    };

                    return model;
                };


                  // jQuery
                  $(document).ready(function () {
                    // Hide the subText initially
                    $('#infoText').hide();

                    // Show the subText when the info icon is clicked
                    $('#infoIcon').on('click', function () {
                        $('#infoText').show();
                    });

                    // Hide the subText when the close button is clicked
                    $('#infoText img#infoIcon').on('click', function () {
                        $('#infoText').hide();
                    });

                });

                var currentParticipatingLocations = [];

                var refreshSearchResults = function (results, divSearchResults, value) {
                    var isExternalPage = $('.digex-external-page').length > 0;

                    var sortedResults = [];
                    var participatingLocations = [];
                    var otherLocations = [];
                    var other = [];
                    var offerCategoryOtherLocations;

                    var cityStateText = '';

                    if (isCityPage) {
                        $.each(results,
                            function(i, v) {
                                if (isCityPage &&
                                    v.category === 'City' &&
                                    v.CityLink &&
                                    v.CityLink.toLowerCase() === location.pathname &&
                                    v.RegionCity === v.MappedCity) {
                                    itemId = v.ItemIdGuid;
                                    cityStateText = v.MappedCity + ', ' + v.MappedStateOrCountry;
                                    searchInput.attr('placeholder', cityStateText);
                                    component.find('.search-section .search-section-content p').text(cityStateText)
                                        .removeClass('selected');
                                }
                            });
                    }

                    currentParticipatingLocations = [];

                    if ($('.template-destination-details, .template-interest-page').length > 0) {

                        var participationLocations = $('.plp-room-selector-items .plp-resort-item .digex-primary-cta[data-hotel-id]');
                        var participationLocationsText = component.attr('data-text-participating-locations')
                            .replace(/\{0\}/g, participationLocations.length);

                        if (cityStateText) {
                            participationLocationsText += ' - ' + cityStateText;
                        }

                        participationLocationsText = participationLocationsText.toUpperCase();

                        var currentLocations = [];

                        $.each(participationLocations, function() {
                            currentLocations.push($(this).attr('data-hotel-id'));
                        });

                        $.each(results,
                            function(i, v) {

                                if (v.category === 'Hotel') {
                                    if ($.inArray(v.ItemIdGuid, currentLocations) >= 0) {
                                        v.offerCategory = participationLocationsText;
                                        v.displayOrder = 1;
                                        participatingLocations.push(v);
                                        currentParticipatingLocations.push(v);
                                    } else {
                                        v.displayOrder = 2;
                                        otherLocations.push(v);
                                    }

                                } else {
                                    other.push(v);
                                }
                            });

                        

                        offerCategoryOtherLocations = component.attr('data-text-other-locations').replace(/\{0\}/g, otherLocations.length).toUpperCase();

                        $.each(otherLocations,
                            function(i, v) {
                                v.offerCategory = offerCategoryOtherLocations;
                            });

                        sortedResults = $.merge(participatingLocations, otherLocations);
                        sortedResults = $.merge(sortedResults, other);
                    }
                    else if (currentOffer && currentOffer.properties.length > 0) {

                        var offerCategoryParticipationLocations = currentOffer.participatingLocationsText
                            .replace(/\{0\}/g, currentOffer.properties.length)
                            .replace(/\{1\}/g, currentOffer.offerTitle).trim().replace(/-$/,'');

                        $.each(results,
                            function(i, v) {

                                if (v.category === 'Hotel') {
                                    if ($.inArray(v.ItemIdGuid, currentOffer.properties) >= 0) {
                                        v.offerCategory = offerCategoryParticipationLocations.toUpperCase();
                                        v.displayOrder = 1;
                                        participatingLocations.push(v);
                                        currentParticipatingLocations.push(v);
                                    } else {
                                        v.displayOrder = 2;
                                        otherLocations.push(v);

                                    }
                                } else {
                                    other.push(v);
                                }
                            });

                        offerCategoryOtherLocations =
                            currentOffer.otherLocationsText.replace(/\{0\}/g, otherLocations.length);

                        $.each(otherLocations,
                            function(i, v) {
                                v.offerCategory = offerCategoryOtherLocations.toUpperCase();
                            });

                        sortedResults = $.merge(participatingLocations, otherLocations);
                        sortedResults = $.merge(sortedResults, other);

                    } else {
                        sortedResults = results;
                    }

                    var categoryTitle = '';
                    var isPartnerModalVisible = false;

                    var modalPartnerProperty = $('#modalPartnerProperty');
                    var modalPartnerPropertyContent = modalPartnerProperty.find('.modal-content p');
                    var modalPartnerPropertyCancel = modalPartnerProperty.find('.digex-secondary-cta');
                    var modalPartnerPropertyProceed = modalPartnerProperty.find('.digex-primary-cta');
                    modalPartnerPropertyProceed.attr('target', '_blank');

                    modalPartnerProperty.on($.modal.AFTER_CLOSE, function (event, modal) {
                        setTimeout(function () {
                            $('body.digex-page').removeClass('blurred');
                            $('#plpSearch').addClass('open');
                        }, 50);
                    });

                    modalPartnerProperty.on($.modal.OPEN, function (event, modal) {
                        $('body.digex-page').addClass('blurred');
                    });

                    modalPartnerProperty.on('click', '.close-modal-btn, .digex-secondary-cta, .close-modal', function(e) {
                        e.stopPropagation();
                        e.preventDefault();
                        $.modal.close();
                        $('#plpSearch').addClass('open');
                        isPartnerModalVisible = false;
                    });

                    

                    var getLink = function (v) {

                        var link = $j('<a href="javascript:void(0);" tabindex="0"/>');

                        link.attr('data-item-id', v.ItemIdGuid);
                        link.data('itemId', v.ItemIdGuid);
                        link.data('category', v.category);
                        link.data('state', v.state);
                        link.data('city', v.city);

                        link.on('click keydown',

                            
                            function(e) {
                                var roomQuantity = parseInt(
                                    jQuery('input[name="plp-room-input"]').val(),
                                    10,
                                  );
                                 var checkbox = component.find('input[name="interconnect-rooms-checkbox"]');
                                 checkbox.prop('checked',false)

                                 if (excludedHotels.includes(v.ItemIdGuid) && roomQuantity == 2) {

                                   jQuery("#connectedRoomsWrapper").hide();
                                  } else if (roomQuantity == 2) {

                                    jQuery("#connectedRoomsWrapper").show();
                                  } else {
                                    jQuery("#connectedRoomsWrapper").hide();
                                  }
                                    


                                    

                                
                                    

                                    
                                    

                                if ((e.type === 'click') ||
                                    (e.type === 'keydown' && (e.keyCode === 13 || e.keyCode === 32))) {

                                    e.preventDefault();

                                    if (v.IsPartnerProperty) {

                                        modalPartnerPropertyContent.html(v.PartnerPropertyModalMessage);
                                        modalPartnerPropertyCancel.html(v.PartnerPropertyModalCancel);
                                        modalPartnerPropertyProceed.html(v.PartnerPropertyModalProceed);
                                        modalPartnerPropertyProceed.attr('href', v.HotelLink);

                                        modalPartnerProperty.modal({ showClose: true });
                                        isPartnerModalVisible = true;
                                        
                                        modalPartnerProperty.find('.close-modal-btn').click(function(e) {
                                            e.stopPropagation();
                                            e.preventDefault();
                                            $.modal.close();
                                            $('#plpSearch').addClass('open');
                                            isPartnerModalVisible = false;
                                        });

                                        return;
                                    }

                                    $j('.search-section-error').fadeOut();
                                    searchInput.removeAttr('aria-invalid');

                                    itemId = $j(this).data('itemId');
                                    isVillas = v.IsVillasProperty;

                                    var ddl = divSearchResults.parents('.nav-dropdown-link');
                                    ddl.removeClass('rotate');
                                    ddl.find('.nav-dropdown').removeClass('open');
                                    ddl.find('.search-section-content p').addClass('selected').text(v.ResultLabel);
                                    ddl.find('.search-section-content p').addClass('selected').text(v.state);
                                    ddl.find('.search-section-content p').addClass('selected').data("id",v.ItemIdGuid);

                                    $j('#plp-search-input').val('');

                                    // if (v.category === 'Hotel' && isPropertyOrPropertyChildPage) {
								    if (v.category === 'Hotel' && isPropertyOrPropertyChildPage && window.location.href.indexOf('/hotels') != -1) {
                                        /* This section determines redirect from one hotel to another when the user changes the hotel in the drop down */
										/* Added in check for /hotels as redirect is not necessary for ssl and caused loop */
                                        var url = v.HotelLink;
                                        var model = getModel();

                                        if ($('.template-group-landing-page').length === 0
                                            && $('.template-property-offers-landing-page').length === 0
                                            && $('.template-property-offer-page').length === 0
                                            && $('.template-brand-offer-page').length === 0
                                        ) {
                                            model.Rates = 'rpc_NONE';
                                            model.AccountCode = '';
                                            model.GroupCode = '';
                                            Cookies.remove('omni-availability-bar');
                                            Cookies.set('omni-availability-bar', model, { path: '/', domain: 'omnihotels.com' });
                                            console.log('pres\src\js\modules\booking-bar.js set model');
                                        } else {
                                            console.log('pres\src\js\modules\booking-bar.js NOT set model');
                                        }

                                        window.location.href = url;
                                    } else if (v.category === 'City' &&
                                        !$j('body').hasClass('template-property-listing-page')) {
                                        var params = {
                                            locations: [v.CityState.toLowerCase()]
                                        };
                                        var encoded = $j.param(params);
                                        window.location.href =
                                            omniBookingBarSettings.omniSiteUrl + '/destinations#' + encoded;
                                    } else {
                                        itemId = v.ItemIdGuid;

                                        component.data('item-id', itemId);
                                        component.data('item-type', v.category);
                                        component.data('item-title', v.ResultLabel);
                                        component.data('item-title', v.state);

                                        if (v.category === 'City') {
                                            component.data('item-title', v.CityState);
                                        }

                                        if ($j('body').hasClass('destinations-page')) {
                                            digexReload();
                                        }
                                    }

                                    $j('#plp-search-input').attr('placeholder', v.ResultLabel);

                                } else if (e.type == 'keydown' && ( e.keyCode === 40)) {
                                    e.preventDefault();
                                    $(this).parent().next('li').find('a').focus();
                                } else if (e.type === 'keydown' && e.keyCode === 38) {
                                    e.preventDefault();
                                    $(this).parent().prev('li').find('a').focus();
                                }
                            });

                        var text = v.ResultLabel;
                        if (value) {
                            text = text.replace(new RegExp('(' + value + ')', 'gi'), '<b>$1</b>');
                        }
                        link.html(text);

                        return link;
                    };

                    var hotelsOnly = _.filter(sortedResults, function (result) {
                        return result.category === 'Hotel' || result.category === 'PartnerProperty';
                    });

                    var mappedHotels;
                    var groupedHotels;

                    var isParticipatingLocations = participatingLocations.length > 0 && otherLocations.length > 0;

                    if (isParticipatingLocations) {
                        groupedHotels = _.groupBy(hotelsOnly, 'displayOrder');
                        mappedHotels = _.map(groupedHotels,
                            function (value, key)  {
                                return value;
                            });
                    } else {
                        groupedHotels = _.groupBy(hotelsOnly, 'category');
                        mappedHotels = _.map(groupedHotels,
                            function  (value, key)  {
                                return value;
                            });
                    }

                    $.each(mappedHotels,
                            function (i, v) {

                                var category = isParticipatingLocations ? v[0].offerCategory : 'All Hotels & Resorts';

                                var iconUrl = '';
                                if (v[0].category === 'PartnerProperty') {
                                    category = v[0].PartnerPropertyHeaderText;
                                    iconUrl = v[0].PartnerPropertyHeaderImageUrl;
                                }

                                var el = $j('<h2 />');

                                if (iconUrl) {
                                    var img = $('<img/>');
                                    img.attr('src', iconUrl);
                                    img.css('width', '16px');
                                    img.css('margin-right', '4px');
                                    el.append(img);
                                }
                                
                                el.append(category);
                                el.addClass('nav-dropdown-title');

                                if (v[0].category === 'PartnerProperty') {
                                    el.addClass('nav-dropdown-title-partner-property');
                                }
                                else if (isParticipatingLocations) {
                                    el.addClass('nav-dropdown-title-participating-locations');
                                }

                                divSearchResults.append(el);

                                var sortedGroups = _(v).chain().sortBy(function(p) {
                                    return p.MappedStateOrCountry;
                                }).sortBy(function(p) {
                                    return p.City;
                                }).value();

                                var grouped = _.map(_.groupBy(sortedGroups, 'MappedStateOrCountry'), function (value, key)  {
                                    return {
                                        'property': value[0],
                                        'properties': _.map(_.groupBy(value, 'MappedCity'), function (valueByCity, keyByCity)  {
                                            return {
                                                'property': valueByCity[0],
                                                'properties': valueByCity
                                            };
                                        })
                                    };
                                });

                                var tag = $j('<ul />');
                                tag.addClass('nav-dropdown-state-container');

                                grouped = _.sortBy(grouped,
                                    function(g) {
                                        return g.property.MappedStateOrCountry;
                                    });

                                var canadaLi = '';
                                var mexicoLi = '';

                                $.each(grouped,
                                    function(index, stateOrCountry) {
                                        var li = $('<li />');

                                        if (stateOrCountry.property.MappedStateOrCountry === 'Canada') {
                                            canadaLi = li;
                                        }
                                        else if (stateOrCountry.property.MappedStateOrCountry === 'Mexico') {
                                            mexicoLi = li;
                                        } else {
                                            tag.append(li);
                                        }

                                        var labelStateOrCountry = $('<span tabindex="0" />');
                                        // if (stateOrCountry.property.IsPartnerProperty) {
                                        //     lnkStateOrCountry.attr('href', 'javascript:void(0)');
                                        //     lnkStateOrCountry.css('cursor', 'default');
                                        // } else {
                                        //        lnkStateOrCountry.attr('href',
                                        //     omniBookingBarSettings.omniSiteUrl + '/destinations#state=' + encodeURIComponent(stateOrCountry.property.MappedStateOrCountry));
                                        // }

                                        labelStateOrCountry.addClass('nav-dropdown-state');
                                        labelStateOrCountry.append($('<h3 />').html(stateOrCountry.property.MappedStateOrCountry));

                                        li.append(labelStateOrCountry);

                                        var ulCity = $('<ul />');
                                        ulCity.addClass('nav-dropdown-city-container');
                                        li.append(ulCity);

                                        var sortedCities = _.sortBy(stateOrCountry.properties,
                                            function(c) {
                                                return c.property.MappedCity;
                                            });

                                        $.each(sortedCities, function(iCity, city) {

                                            var liCity = $('<li />');
                                            ulCity.append(liCity);

                                            var lnkCity = $('<a tabindex="0"/>');

                                            if (city.property.IsPartnerProperty) {
                                                lnkCity.attr('href', 'javascript:void(0)');
                                                lnkStateOrCountry.css('cursor', 'default');
                                            } else {
                                                lnkCity.attr('href', omniBookingBarSettings.omniSiteUrl + city.property.CityLink);
                                            }

                                            lnkCity.addClass('nav-dropdown-city');
                                            lnkCity.append($('<h4/>').html(city.property.MappedCity));

                                            liCity.append(lnkCity);

                                            var ulProperties = $('<ul />');
                                            ulProperties.addClass('nav-dropdown-hotel-container');
                                            liCity.append(ulProperties);

                                            var sortedProperties = _.sortBy(city.properties,
                                                function(p) {
                                                    return p.ResultLabel;
                                                });

                                            $.each(sortedProperties,
                                                function(iProperty, vProperty) {

                                                    var liProperty = $('<li />');
                                                    liProperty.addClass('nav-dropdown-hotel');

                                                    var lnk = getLink(vProperty);
                                                    liProperty.append(lnk);

                                                    ulProperties.append(liProperty);
                                                });
                                        });
                                    });

                                tag.append(canadaLi);
                                tag.append(mexicoLi);

                                divSearchResults.append(tag);
                            });

                    var searchContent = $j('.search-section .search-content');
                    searchContent.addClass('offers-list');

                    if (searchContent.find('.nav-dropdown-title-partner-property').length === 0 &&
                        searchContent.find('.nav-dropdown-title-participating-locations').length === 0) {
                        $j('#plpSearch').addClass('hide-title');
                    } else {
                        $j('#plpSearch').removeClass('hide-title');
                    }
                    
                    stickyHeadersLoad($j('.offers-list'));
                };

                component.on('disableSearch',
                    function() {
                        component.attr('data-changing-reservation', true).find('.search-section').addClass('changing-reservation').attr('tabindex', -1);
                    });

                component.on('updateTotals',
                    function(event, el) {
                        updateTotals(el);
                    });

                component.on('reset',
                    function() {
                        itemId = '';
                        searchInput.attr('placeholder', currentHotelName);
                        component.find('.search-section .search-section-content p').text(currentHotelName)
                            .removeClass('selected');
                        searchInput.val('');
                        divSearchResults.html('');
                        refreshSearchResults(searchResults, divSearchResults, '');
                    });

                component.on('resetPlaceholder',
                    function(event, placeholder) {

                        if (placeholder === '') {
                            placeholder = currentHotelName;
                        }

                        searchInput.attr('placeholder', placeholder);
                        component.find('.search-section .search-section-content p').text(placeholder)
                            .removeClass('selected');

                        divSearchResults.html('');
                        refreshSearchResults(searchResults, divSearchResults, '');
                    });

                component.on('resetSearchResults',
                    function() {
                        divSearchResults.html('');
                        refreshSearchResults(searchResults, divSearchResults, '');
                    });

                component.on('search',
                    function(event, hotelId) {
                        doNotAnimateMainSearchButton = true;
                        itemId = hotelId;
                        component.find('.book-section a').trigger('click');
                    });

                var selectProperty = function (id) {
					if (id === itemId) {
						console.debug('skipping click ' + id);
					} else {
						setTimeout(function() {
							var lnk = divSearchResults.find('a[data-item-id="' + id + '"]');
							lnk.click();
                        },
                        500);
					}
                };

                var openCalendar = function () {

                            setTimeout(function () {

                                    var windowWidth = $(window).width();
                                    if (windowWidth < 768) {
                                        //$('.dates-section .nav-mobile-link').click();
                                        $('.dates-section .dates-section-content').click();
                                        $('.dates-section').addClass('rotate');
                                        $('.dates-section .nav-dropdown').addClass('open');

                                    } else {
                                        // this click doesn't work here, so let's add styles
                                        //$('.dates-section .dates-section-content').click();
                                        $('.dates-section').addClass('rotate');
                                        $('.dates-section .nav-dropdown').addClass('open');

                                        setTimeout(function() {
                                            $('#date-start-input').focus();
                                        }, 25);
                                    }
                                },
                                25);
                };

                var openRooms = function() {
                    setTimeout(function () {

                                    var windowWidth = $(window).width();
                                    if (windowWidth < 768) {
                                        //$('.dates-section .nav-mobile-link').click();
                                        component.find('.rooms-section .nav-mobile-link').click();
                                        //component.find('.rooms-section').addClass('rotate');
                                        //component.find('.rooms-section .nav-dropdown').addClass('open');

                                    } else {
                                        // this click doesn't work here, so let's add styles
                                        //$('.dates-section .dates-section-content').click();
                                        $('.rooms-section').addClass('rotate');
                                        $('.rooms-section .nav-dropdown').addClass('open');
                                    }
                                },
                                25);
                }


                var displayOfferApplied = function(offerAppliedText) {
                        
                    var c = component.find('.plp-check-availability-container');
                    c.find('.offer-applied').remove();

                    var div = $j('<div />');
                    div.addClass('offer-applied');
                    div.html(offerAppliedText);
                    c.append(div);

                    div.show();
                    div.css('display', 'flex');
                    setTimeout(function () {
                        div.remove();
                    }, 5000);
                    
                }

                component.on('openRooms',
                    function() {
                        openRooms();
                    });

                component.on('book',
                    function(event, itemId) {
                        selectProperty(itemId);
                        openCalendar();
                    });

                component.on('bookOnly',
                    function(event) {
                        component.find('.book-section .plp-primary-cta').click();
                    });

                component.on('disableBook',
                    function(event) {
                        component.find('.book-section .plp-primary-cta').addClass('disabled');
                    });

                component.on('enableBook',
                    function(event) {
                        component.find('.book-section .plp-primary-cta').removeClass('disabled');
                    });

                component.on('applyGroupCode',
                    function (event, lnk, disableSpecialRates, showOfferApplied) {

                        if (showOfferApplied) {
                            var offerAppliedText = lnk.attr('data-offer-applied-text');
                            displayOfferApplied(offerAppliedText);
                        }
                        
                        setTimeout(function() {
                            $j('#plp-rate-group').click();
                            inputGroupCode.val(lnk.attr('data-code'));
                            ratesSectionCaption.html(lnk.attr('data-event-title'));

                            if (disableSpecialRates) {
                                component.find('.rates-section').addClass('rates-section-disabled').addClass('section-disabled');
                            }
                        }, 50);
                    });

                component.on('applyOffer',
                    function (event, offerData) {
                        var sItemId = itemId;
                        component.trigger('reset');
                        itemId = sItemId;

                        var isPreApplied = offerData.preApplied ? true : false;

                        var windowWidth = $(window).width();

                        var hotelId = offerData.hotelId,
                            packageCode = offerData.packageCode,
                            offerAppliedText = offerData.text,
                            selectedLocations = offerData.selectedLocations;

                        currentOffer = offerData;
                        component.trigger('resetSearchResults');

                        if (selectedLocations && selectedLocations.length === 1 && currentParticipatingLocations && currentParticipatingLocations.length > 0) {
                            var selectedLocation = selectedLocations[0];
                            var selectedHotels = [];

                            $.each(currentParticipatingLocations,
                                function(i, v) {
                                    if (selectedLocation === v.CityState) {
                                        selectedHotels.push(v.ItemIdGuid);
                                    }
                                });

                            if (selectedHotels.length === 1) {
                                hotelId = selectedHotels[0];
                            }
                        }

                        var openSearch = function() {
                            setTimeout(function() {
                                    $('.search-section .search-section-content').click();
                                    setTimeout(function() {
                                        searchInput.focus();
                                    }, 25);

                                },
                                25);
                        };

                        var shouldOpenSearch = false;

                        if (itemId !== hotelId) {
                            itemId = hotelId;
                            if (itemId) {
                                selectProperty(itemId);
                            } else {
                                shouldOpenSearch = true;
                            }
                        } else if (!itemId) {
                            shouldOpenSearch = true;
                        }

                        var avRate = $j('input[name=plp-rate][value="' + packageCode + '"]');


                        if (avRate.length > 0) {
                            avRate.click();
                        } else {
                            $j('#plp-rate-promo').click();
                        }
                        

                        if (shouldOpenSearch) {
                            shouldOpenSearch = !isPreApplied;
                        }

                        inputPromoCode.val(packageCode);
                        inputPromoCode.attr('data-available-start-date', offerData.availableStartDate);
                        inputPromoCode.attr('data-available-end-date', offerData.availableEndDate);
                        inputPromoCode.attr('data-book-by-date', offerData.bookByDate);
                        inputPromoCode.attr('data-offer-title', offerData.offerTitle);
                        inputPromoCode.attr('data-query-param', offerData.queryStringParam);


                        ratesSectionCaption.html(offerData.offerTitle);

                        var c = component.find('.plp-check-availability-container');
                        c.find('.offer-applied').remove();

                        var div = $j('<div />');
                        div.addClass('offer-applied');
                        div.html(offerAppliedText);

                        if (windowWidth < 768) {
                            if (shouldOpenSearch) {
                                openSearch();
                                component.find('.rates-section-content').append(div);
                            } else {
                                if (!isPreApplied) {
                                    openCalendar();
                                    component.find('.rates-section-content').append(div);
                                } else {
                                    c.append(div);
                                }
                            }

                        } else {
                            c.append(div);
                        }

                        div.show();
                        div.css('display', 'flex');
                        setTimeout(function () {
                            div.remove();
                        }, 5000);


                        if (windowWidth > 767) {
                            if (shouldOpenSearch) {
                                openSearch();
                            } else {
                                if (!isPreApplied) {
                                    openCalendar();
                                }
                            }
                        }
                    });

                if(window.location.href.indexOf('localhost') >= 0){
                    $.getScript( "/js/feed/searchResults.js" )
                        .done(function( data, textStatus ) {
                            searchResults = JSON.parse(data);

                            $j('[data-component="plp-check-availability"]').each(function() {
                                var component = $j(this);

                                var divSearchResults = component.find('.search-section .search-content');
                                divSearchResults.html('');
                                refreshSearchResults(searchResults, divSearchResults);
                            });

                        })
                        .fail(function( jqxhr, settings, exception ) {
                            console.log(exception);
                        });
                } else {
                    $j.get({
                        url: omniBookingBarSettings.omniSiteUrl + '/find/findandbook/autocomplete',
                        dataType: 'json',
                        cache: omniBookingBarSettings.omniSiteUrl ? false : true
                    }, {'includeGha': false, 'instart_disable_injection': true},
                        function (data) {
                            searchResults = data;

                                $j('[data-component="plp-check-availability"]').each(function() {
                                    var component = $j(this);

                                    var divSearchResults = component.find('.search-section .search-content');
                                    divSearchResults.html('');
                                    refreshSearchResults(searchResults, divSearchResults);
                                });
                        }
                    );
                }

                var inputSearchQuery = component.find('input[name="plp-search-input"]');

                inputSearchQuery.on('keyup', function () {
                    var value = $j.trim(this.value);

                    if (value.length > 0) {
                        divSearchResults.html('');

                        var lcValue = value.toLowerCase();

                        var regExp = new RegExp(value, 'gi');

                        var results = _.filter(searchResults,
                            function(item) {
                                //return regExp.test(item.ResultLabel);

                                if (item.category === "City") {
                                    return item.label.toLowerCase().indexOf(lcValue) >= 0 &&
                                    item.ResultLabel.toLowerCase().indexOf(lcValue) >= 0;
                                } else {
                                    return item.label.toLowerCase().indexOf(lcValue) >= 0 ||
                                    item.ResultLabel.toLowerCase().indexOf(lcValue) >= 0;
                                }
                            });


                        if (results.length > 0) {
                            refreshSearchResults(results, divSearchResults, value);

                        } else {
                            var p = $j('<p/>');
                            p.text('No results found.');
                            divSearchResults.append(p);
                        }
                    } else {
                        refreshSearchResults(searchResults, divSearchResults, value);
                    }
                });

                inputAgentCode.focus(function(){
                    if($j(this).parent().children('[name="plp-rate"]').is(':checked')){
                        $j(this).removeAttr('disabled').removeClass('disabled');

                        //inputPromoCode.addClass('disabled');

                        //inputGroupCode.addClass('disabled');
                    } else {
                        $j(this).siblings('label').trigger('click');
                    };
                });

                inputGroupCode.focus(function(){
                    if($j(this).parent().children('[name="plp-rate"]').is(':checked')){
                        $j(this).removeAttr('disabled').removeClass('disabled');

                        inputPromoCode
                            .val('')
                            .removeAttr('value')
                            .attr('disabled', 'disabled')
                            .addClass('disabled');

                    } else {
                        $j(this).siblings('label').trigger('click');
                    };
                }).on('keydown', function(e){
                    if(e.keyCode === 38){
                        $j('.rates-section #plp-rate-promo').prop('checked', true).focus();

                        inputGroupCode
                            .val('')
                            .removeAttr('value')
                            .attr('disabled', 'disabled')
                            .addClass('disabled');
                    };
                });

                inputPromoCode.focus(function(){
                    if($j(this).parent().children('[name="plp-rate"]').is(':checked')){
                        $j(this).removeAttr('disabled').removeClass('disabled');

                        inputGroupCode
                            .val('')
                            .removeAttr('value')
                            .attr('disabled', 'disabled')
                            .addClass('disabled');
                    } else {
                        $j(this).siblings('label').trigger('click');
                    };
                }).on('keydown', function(e){
                    if(e.keyCode === 38){
                        $j('.rates-section #plp-rate-gov').prop('checked', true).focus();
                        inputPromoCode.val('')
                            .removeAttr('value').addClass('disabled').attr('disabled', 'disabled');
                    } else if(e.keyCode === 40){
                        $j('.rates-section #plp-rate-group').prop('checked', true);
                        inputPromoCode.val('')
                            .removeAttr('value').addClass('disabled').attr('disabled', 'disabled');
                        inputGroupCode.focus();
                    };
                });

                inputCorpCode.focus(function () {
                    if ($j(this).parent().children('[name="plp-rate"]').is(':checked')) {
                        $j(this).removeAttr('disabled').removeClass('disabled');

                        inputCorpCode
                            .val('')
                            .removeAttr('value')
                            .attr('disabled', 'disabled')
                            .addClass('disabled');
                    } else {
                        $j(this).siblings('label').trigger('click');
                    };
                }).on('keydown', function (e) {
                    if (e.keyCode === 38) {
                        $j('.rates-section #plp-rate-gov').prop('checked', true).focus();
                        inputCorpCode.val('')
                            .removeAttr('value').addClass('disabled').attr('disabled', 'disabled');
                    } else if (e.keyCode === 40) {
                        $j('.rates-section #plp-rate-group').prop('checked', true);
                        inputCorpCode.val('')
                            .removeAttr('value').addClass('disabled').attr('disabled', 'disabled');
                        inputCorpCode.focus();
                    };
                });


                function initPromoAndGroupCode()
                    {
                        // $('#plpSpecialRates .input-section-wrapper .form-floating').each(function() {
                        //     var divFormFloating = $(this);
                        //     var labelText = divFormFloating.find('label').html();
                        //     divFormFloating.hide();
                        //     divFormFloating.parent().find('> label').html(labelText);
                        // });
                    console.log("call initPromoAndGroupCode()");
                    }

                inputRate.change(
                    function () {
                        var value = this.value;
                        rates = value;

                        if (value !== 'promotional_code') {
                            ratesSectionCaption.text(ratesSectionCaption.attr('data-text'));
                            $('a[data-is-offer]').each(function() {
                                var lnk = $(this);
                                lnk.text(lnk.attr('data-apply-offer-text'));
                                lnk.removeClass('disabled');
                            });

                            if (currentOffer) {
                                currentOffer.properties = [];
                                component.trigger('resetPlaceholder');
                            }
                        }

                        var txt;
                        if (value === 'rpc_NONE') {
                            ratesSectionCaption.text(ratesSectionCaption.attr('data-text'));
                        }
                        else if (value !== 'promotional_code' && value !== 'group_code' && value !== 'corp_code') {
                            txt = $('input[value="' + value + '"]');
                            var lbl = $('label[for="' + txt.attr('id') + '"]');
                            ratesSectionCaption.text(lbl.attr('aria-label'));
                        } else if (value === 'promotional_code' || value === 'group_code' || value === 'corp_code') {
                            var txtName;
                            if (value === 'promotional_code') {
                                txtName = 'plp-rate-promo-code';
                            } else if ( value === 'group_code' ){
                                txtName = 'plp-rate-group-code';
                            } else if (value === 'corp_code') {
                                txtName = 'plp-rate-corp-code';
                            }
                            txt = $('input[name="' + txtName + '"]');
                            ratesSectionCaption.text(txt.attr('data-message'));
                        }

                        initPromoAndGroupCode();
                        

                        switch(value){
                            case 'promotional_code':

                                inputPromoCode.parents('.form-floating').show();
                                inputPromoCode.parents('.form-floating').parent().find('> label').html('');

                                inputGroupCode.val('').removeAttr('value').addClass('disabled').attr('disabled', 'disabled');
                                inputCorpCode.val('').removeAttr('value').addClass('disabled').attr('disabled', 'disabled');

                                inputPromoCode.removeClass('disabled').removeAttr('disabled');
                                inputPromoCode.focus();
                                break;
                            case 'group_code':

                                inputGroupCode.parents('.form-floating').show();
                                inputGroupCode.parents('.form-floating').parent().find('> label').html('');

                                inputPromoCode.val('').removeAttr('value').addClass('disabled').attr('disabled', 'disabled');
                                inputCorpCode.val('').removeAttr('value').addClass('disabled').attr('disabled', 'disabled');

                                inputGroupCode.removeClass('disabled').removeAttr('disabled');
                                inputGroupCode.focus();
                                break;
                            case 'corp_code':

                                inputCorpCode.parents('.form-floating').show();
                                inputCorpCode.parents('.form-floating').parent().find('> label').html('');

                                inputPromoCode.val('').removeAttr('value').addClass('disabled').attr('disabled', 'disabled');
                                inputGroupCode.val('').removeAttr('value').addClass('disabled').attr('disabled', 'disabled');

                                inputCorpCode.removeClass('disabled').removeAttr('disabled');
                                inputCorpCode.focus();
                                break;
                            case 'agent_code':
                                inputAgentCode.focus();
                                break;
                            default:
                                inputGroupCode.val('')
                                    .removeAttr('value').addClass('disabled').attr('disabled', 'disabled');

                                inputPromoCode.val('')
                                    .removeAttr('value').addClass('disabled').attr('disabled', 'disabled');
                        }
                    }
                );

                var bookingDatesErrorModal = $j('#booking-dates-error-modal');
                var bookingDatesErrorModalContent = bookingDatesErrorModal.find('.error-modal-content');
                var bookingDatesErrorModalContentHtml = bookingDatesErrorModalContent.html();

                bookingDatesErrorModal.find('.digex-secondary-cta').click(function () {
                    setTimeout(function() {
                        $j('.dates-section .dates-section-content').click();
                        $j.modal.close();
                    }, 25);
                });

                bookingDatesErrorModal.find('.digex-primary-cta').click(function () {
                    $j('#plp-rate-none').click();
                    $j.modal.close();
                });

                // search / book now

                var scrollTo = function (selector) {
                    selector = selector.replace('#', '');
                    var tag = $('a[name="' + selector + '"]');
                    $document.scrollTop(tag.offset().top - 135);
                };


                var isChildrenAgesValid = function() {

                    var isAllValid = true;

                    component.find('.age-value').each(function() {

                        var selectedChildAge = $(this);

                        if (selectedChildAge.val() === '-') {
                            isAllValid = false;
                            selectedChildAge.trigger('change');
                        }

                    });

                    return isAllValid;

                }

                component.find('.book-section a').on('click', function (e) {

                    e.preventDefault();
                    e.stopPropagation();

                    if (isChildrenAgesValid() === false) {

                        setTimeout(function () {
                            $('.rooms-section .rooms-section-content').click();
                        }, 100);

                        return;
                    }


                    var $this = $(this);

                    if ($this.hasClass('disabled')) {

                        if ($('.template-group-landing-page').length > 0) {
                            scrollTo('make-a-reservation');
                            setTimeout(function() {
                                $('.calendar-glp a[data-is-glp="true"]').click();
                            }, 500);
                            
                        }

                        return;
                    }

                    var queryParam = inputPromoCode.attr('data-query-param');

                    var model = getModel();

                    if ($j(window).width() < 768 && $j('body').hasClass('destinations-page') && !model.HotelId) {
                        var container = $j('.plp-check-availability-container');
                        if(container.hasClass('open'))
                        {
                            container.find('.close-dropdown-mobile').trigger('click');
                            return;
                        }
                    }

                    var hasAvailableDates = model.Internal.AvailableStartDate || model.Internal.AvailableEndDate;
                    if (hasAvailableDates === null) {
                        hasAvailableDates = false;
                    }
                    else if (hasAvailableDates) {
                        hasAvailableDates = true;
                    }
                    
                    if (model.AccountCode && (hasAvailableDates || model.Internal.BookByDate)) {

                        var hasAvailableDatesButSelectedDatesAreInvalid = hasAvailableDates === true &&
                        (model.Internal.AvailableStartDate && model.Internal.AvailableStartDate > model.Internal.StartDate ||
                                model.Internal.AvailableEndDate && model.Internal.AvailableEndDate < model.Internal.EndDate);

                        var hasBookByDateAndBookByDateIsInvalid =
                            hasAvailableDates === false && (model.Internal.BookByDate < model.Internal.StartDate);

                        if (hasAvailableDatesButSelectedDatesAreInvalid
                            || hasBookByDateAndBookByDateIsInvalid) {
                            var content =
                                bookingDatesErrorModalContentHtml.replace(/\[CurrentOfferName\]/g,
                                    model.Internal.OfferTitle);

                            if (hasAvailableDates && hasAvailableDatesButSelectedDatesAreInvalid) {

                                if (model.Internal.AvailableStartDate) {
                                    content = content.replace(/\[CurrentOfferAvailableStartDateText\]/g,
                                        model.Internal.AvailableStartDate.format(DisplayDateFormat));
                                } else {

                                    var date = model.Internal.StartDate;

                                    if (date > moment()) {
                                        date = moment();
                                    }

                                    content = content.replace(/\[CurrentOfferAvailableStartDateText\]/g,
                                    date.format(DisplayDateFormat));
                                }

                                
                                if (model.Internal.AvailableEndDate) {
                                    content = content.replace(/\[CurrentOfferAvailableEndDateText\]/g,
                                        model.Internal.AvailableEndDate.format(DisplayDateFormat));
                                } else {
                                    content = content.replace(/\[CurrentOfferAvailableEndDateText\]/g,
                                        model.Internal.EndDate.format(DisplayDateFormat));
                                }

                                
                            } else {
                                content = content.replace(/\[CurrentOfferAvailableStartDateText\]/g,
                                    moment().format(DisplayDateFormat));
                                content = content.replace(/\[CurrentOfferAvailableEndDateText\]/g,
                                    model.Internal.BookByDate.format(DisplayDateFormat));
                            }
                            
                            content = content.replace(/\[BookingSelectedStartDateText\]/g, model.Internal.StartDate.format(DisplayDateFormat));
                            content = content.replace(/\[BookingSelectedEndDateText\]/g, model.Internal.EndDate.format(DisplayDateFormat));

                            bookingDatesErrorModalContent.html(content);
                            bookingDatesErrorModal.modal({ showClose: false });
                            return;
                        }
                    }

                    delete model.Internal;

                    

                    if (model.HotelId !== '' && model.HotelId !== null && typeof model.HotelId !== 'undefined') {
                        if (!doNotAnimateMainSearchButton) {
                            $j(this).text('').addClass('booking');
                        }
						
						var currLang = window.location.href.indexOf('fr-ca') != -1 ? 'fr' : '';
						if( currLang === 'fr') {
							model.Language = currLang;
						}
						
                        $j.post(omniBookingBarSettings.omniSiteUrl + '/find/bookings/checkratesandavailability',
                            model,
                            function (data) {
                                
                                var url = data.replace(/\"/g, '');

                                var currentQueryStringParams = getQueryStringParams(window.location.href);
                                $.each(currentQueryStringParams,
                                    function (i, p) {
                                        var value = getQueryStringParamFromUrl(url, p.key);
                                        if (!value && p.key.toLowerCase() !== 'Phoenix_state'.toLowerCase()) {
                                            url = addQueryStringParam(url, p.key, p.value);
                                        }
                                    });
                               
                                if (queryParam) {
                                    url = url.replace(/rate_abbrv/g, queryParam);
                                }

                                url = url.replace(/&rates=promotional_code/g, '');

                                var resno = getQueryStringParam('room1_cro_resno');
                                if (resno) {
                                    url = url.replace(/&Phoenix_state=clear/g, '');
                                    url += '&room1_cro_resno=' + resno;
                                    url += '&Phoenix_state_room1=clear';
                                }

                                var roomTypeCode = getQueryStringParam('roomTypeCode');
                                if (roomTypeCode) {
                                    url = removeQueryStringParam(url, 'roomTypeCode');
                                    url = addQueryStringParam(url, 'roomTypeCode', roomTypeCode);
                                }

                                var rateAbbrv = getQueryStringParamFromUrl(url, 'rate_abbrv');
                                if (rateAbbrv) {
                                    url = removeQueryStringParam(url, 'rates');
                                }

                                var invBlockCode = getQueryStringParamFromUrl(url, 'invBlockCode');
                                if (invBlockCode) {
                                    url = removeQueryStringParam(url, 'rates');
                                }

                                var rates = component.find('input[type=radio][name="plp-rate"]:checked').val();
                               
                                if (rates !== 'promotional_code' && rates !== 'group_code' && rates !== 'corp_code') {
                                    url = removeQueryStringParam(url, 'rates');
                                    url = removeQueryStringParam(url, 'rate_abbrv');
                                    url = removeQueryStringParam(url, 'invBlockCode');
                                    url = addQueryStringParam(url, 'rates', rates);
                                }

                                if (window.omniBookingBarSettings) {
                                    var settings = window.omniBookingBarSettings;
                                    if (settings.hasOwnProperty('sslSiteUrl') && settings.sslSiteUrl) {
                                        url = settings.sslSiteUrl + url.replace(/^.*\/\/[^\/]+/, '');
                                    }
                                }

                                if (component.attr('data-is-group-uses-a-master-bill') === 'true') {
                                    url = addQueryStringParam(url, 'customfieldset2', '1');
                                }

                                if (model.TravelAgentNumber) {
                                    saveAgentNumberToCookie(model.TravelAgentNumber);
                                }

                                if (model.FlexibleDates === false) {
                                    url = removeQueryStringParam(url, 'flexible_dates');
                                }

                                try {
                                    onsiteSearchPerformed(url);
                                } catch (err) { console.log('error firing event.'); }

                                // 2023-02-06 :: They don't want these persisted.
                                model.Rates = '';
                                model.AccountCode = '';
                                model.GroupCode = '';
                                model.FlexibleDates = false;

                                console.log(' booking-bar : save r[' + model.Rates + '][' + model.AccountCode + '][' + model.GroupCode + ']');

                                // Cookies.removeCookie('www.omnihotels.com', '/', 'omni-availability-bar');
                                Cookies.remove('omni-availability-bar');
                                Cookies.set('omni-availability-bar', model, { path: '/', domain: 'omnihotels.com' });

                                window.location.href = url;

                                $j(this).text('Book').removeClass('booking');
                            }, 'text');
                    } else {
                        setTimeout(function () {
                            $('.search-section .search-section-content').click();

                            var searchSectionError = $('.search-section-error');
                            searchSectionError.fadeIn();
                            searchInput.attr('aria-invalid', searchSectionError.text().trim());

                            setTimeout(function() {searchInput.focus();}, 25);
                            

                        }, 100);
                    }
                });

                var modelFromQueryString = null;

                var initComponent = function () {


                    initPromoAndGroupCode();

                    var modelFromCookie;
                    if (modelFromQueryString === null) {

                        modelFromCookie = Cookies.getJSON('omni-availability-bar');

                        if ($('.template-group-landing-page').length !== 0
                            || $('.template-property-offers-landing-page').length !== 0
                            || $('.template-property-offer-page').length !== 0
                            || $('.template-brand-offer-page').length !== 0
                                ) {
                            modelFromCookie = null;
                        }

                        if (!modelFromCookie) {
                            modelFromCookie = getModel();
                        }

                        var qsHotelCode = getQueryStringParam('hotelCode');

                        if (!qsHotelCode) {
                            qsHotelCode = getQueryStringParam('prop');
                        }

                        var getPropertyByCode = function (code) {
                            var p = _.find(searchResults, function(result) {
                                    return result.HotelCode === code;
                            });
                            return p;
                        }

                        //if (typeof (window.omniBookingBarSettings) === 'undefined' || !window.omniBookingBarSettings) {
                            if (!modelFromCookie.TravelAgentNumber) {

                                var travelAgentNumber = getQueryStringParam('iata_num');

                                if (travelAgentNumber) {
                                    modelFromCookie.TravelAgentNumber = travelAgentNumber;
                                    saveAgentNumberToCookie(modelFromCookie.TravelAgentNumber);
                                } else if(isInternalBookingBar) {

                                    travelAgentNumber = Cookies.get('omni-availability-bar-iata-num');
                                    if (travelAgentNumber) {
                                        modelFromCookie.TravelAgentNumber = travelAgentNumber;
                                    }
                                }
                            }
                        //}

                        if (qsHotelCode || typeof (window.omniBookingBarSettings) !== 'undefined') {

                            var initBookingBarFromSettings = function() {
                                 if (typeof (window.omniBookingBarSettings) !== 'undefined') {
                                    var settings = window.omniBookingBarSettings;

                                    if (settings.hasOwnProperty('startDate') && settings.hasOwnProperty('endDate') && settings.startDate && settings.endDate) {
                                        var mStartDate = moment(settings.startDate, 'MM-DD-YYYY');
                                        var mEndDate = moment(settings.endDate, 'MM-DD-YYYY');

                                        if (mStartDate.isValid() && mEndDate.isValid()) {
                                            modelFromCookie.BookingStartDate = settings.startDate;
                                            modelFromCookie.BookingEndDate = settings.endDate;
                                            setBookingDates(mStartDate, mEndDate);
                                        }
                                    }

                                    if (settings.hasOwnProperty('propertyCode') && settings.propertyCode) {
                                        var property = getPropertyByCode(settings.propertyCode);
                                        if (property) {
                                            selectProperty(property.ItemIdGuid);
                                        }
                                    }

                                     if (settings.hasOwnProperty('flexibleDates') && settings.flexibleDates) {
                                         modelFromCookie.FlexibleDates = settings.flexibleDates;
                                     } else {
                                         modelFromCookie.FlexibleDates = false;
                                     }

                                     if (settings.hasOwnProperty('travelAgentNumber')) {
                                          modelFromCookie.TravelAgentNumber = settings.travelAgentNumber;
                                     }

                                     if (settings.hasOwnProperty('accountCode')) {
                                         modelFromCookie.AccountCode = settings.accountCode;
                                     }

                                     if (settings.hasOwnProperty('groupCode')) {
                                          modelFromCookie.GroupCode = settings.groupCode;
                                     }

                                     if (settings.hasOwnProperty('corpCode')) {
                                         modelFromCookie.CorpCode = settings.corpCode;
                                     }

                                     if (modelFromCookie.AccountCode) {
                                        modelFromCookie.Rates = 'promotional_code';
                                     }

                                     if (modelFromCookie.GroupCode) {
                                        modelFromCookie.Rates = 'group_code';
                                     }

                                     if (modelFromCookie.CorpCode) {
                                         modelFromCookie.Rates = 'corp_code';
                                     }

                                     if (!modelFromCookie.AccountCode && !modelFromCookie.GroupCode && !modelFromCookie.CorpCode) {
                                         if (settings.hasOwnProperty('rates') && settings.rates) {
                                             modelFromCookie.Rates = settings.rates;
                                         }
                                     }

                                     var getAdultsQuanity = function(rooms, index) {

                                         if (rooms.length - 1 >= index) {
                                             var room = rooms[index];
                                             return room.adults.toString();
                                         }

                                         return '';
                                     }

                                     var getChildQuanity = function(rooms, index) {
                                         if (rooms.length - 1 >= index) {
                                             var room = rooms[index];
                                             if (room.children) {
                                                 return room.children.length.toString();
                                             }
                                         }

                                         return '';
                                     }

                                     var getChildAge = function(rooms, index, childIndex) {
                                         if (rooms.length - 1 >= index) {
                                             var room = rooms[index];
                                             if (room.children && room.children.length - 1 >= childIndex) {
                                                 return room.children[childIndex].age.toString();
                                             }
                                         }

                                         return '';
                                     }

                                     if (settings.hasOwnProperty('rooms') && settings.rooms && settings.rooms.length > 0) {

                                         modelFromCookie.Room1AdultQuantity = getAdultsQuanity(settings.rooms, 0);
                                         modelFromCookie.Room1ChildQuantity = getChildQuanity(settings.rooms, 0);
                                         modelFromCookie.Room1ChildAge1 = getChildAge(settings.rooms, 0, 0),
                                         modelFromCookie.Room1ChildAge2 = getChildAge(settings.rooms, 0, 1),
                                         modelFromCookie.Room1ChildAge3 = getChildAge(settings.rooms, 0, 2),
                                         modelFromCookie.Room1ChildAge4 = getChildAge(settings.rooms, 0, 3),

                                         modelFromCookie.Room2AdultQuantity = getAdultsQuanity(settings.rooms, 1);
                                         modelFromCookie.Room2ChildQuantity = getChildQuanity(settings.rooms, 1);
                                         modelFromCookie.Room2ChildAge1 = getChildAge(settings.rooms, 1, 0),
                                         modelFromCookie.Room2ChildAge2 = getChildAge(settings.rooms, 1, 1),
                                         modelFromCookie.Room2ChildAge3 = getChildAge(settings.rooms, 1, 2),
                                         modelFromCookie.Room2ChildAge4 = getChildAge(settings.rooms, 1, 3),

                                         modelFromCookie.Room3AdultQuantity = getAdultsQuanity(settings.rooms, 2);
                                         modelFromCookie.Room3ChildQuantity = getChildQuanity(settings.rooms, 2);
                                         modelFromCookie.Room3ChildAge1 = getChildAge(settings.rooms, 2, 0),
                                         modelFromCookie.Room3ChildAge2 = getChildAge(settings.rooms, 2, 1),
                                         modelFromCookie.Room3ChildAge3 = getChildAge(settings.rooms, 2, 2),
                                         modelFromCookie.Room3ChildAge4 = getChildAge(settings.rooms, 2, 3),

                                         modelFromCookie.RoomQuantity = settings.rooms.length.toString();

                                         $.each(settings.rooms,
                                             function(i, room) {
                                             if (i === 0) {

                                             }
                                         });
                                    }

                                    if (!qsHotelCode) {
                                        modelFromQueryString = modelFromCookie;
                                        initComponent();
                                    }
                                }
                            }

                            var initBookingBarFromQueryString = function () {

                                initBookingBarFromSettings();

                                if (!qsHotelCode) {
                                    return;
                                }

                                var property = getPropertyByCode(qsHotelCode);

                                if (property) {

                                    modelFromCookie.HotelId = property.ItemIdGuid;

                                    var qsStartDate = getQueryStringParam('StartDate');
                                    var qsEndDate = getQueryStringParam('EndDate');

                                    if (qsStartDate && qsEndDate) {
                                        var mStartDate = moment(qsStartDate, 'MM-DD-YYYY');
                                        var mEndDate = moment(qsEndDate, 'MM-DD-YYYY');

                                        if (mStartDate.isValid() && mEndDate.isValid()) {
                                            modelFromCookie.BookingStartDate = mStartDate.format('MM-DD-YYYY');
                                            modelFromCookie.BookingEndDate = mEndDate.format('MM-DD-YYYY');

                                            setBookingDates(mStartDate, mEndDate);
                                        }
                                    }

                                    modelFromCookie.RoomQuantity = getQueryStringParam('room_qty');

                                    var room1AdultQty = getQueryStringParam('room1_adult_qty');
                                    var room1ChildQty = getQueryStringParam('room1_child_qty');

                                    modelFromCookie.Room1AdultQuantity = room1AdultQty;
                                    modelFromCookie.Room1ChildQuantity = room1ChildQty;

                                    var childAge = getQueryStringParam('room1_childage1');
                                    if (childAge) {
                                        modelFromCookie.Room1ChildAge1 = childAge;
                                    }

                                    childAge = getQueryStringParam('room1_childage2');
                                    if (childAge) {
                                        modelFromCookie.Room1ChildAge2 = childAge;
                                    }

                                    childAge = getQueryStringParam('room1_childage3');
                                    if (childAge) {
                                        modelFromCookie.Room1ChildAge3 = childAge;
                                    }

                                    childAge = getQueryStringParam('room1_childage4');
                                    if (childAge) {
                                        modelFromCookie.Room1ChildAge4 = childAge;
                                    }

                                    var room2AdultQty = getQueryStringParam('room2_adult_qty');
                                    var room2ChildQty = getQueryStringParam('room2_child_qty');

                                    if (room2AdultQty && room2ChildQty) {
                                        modelFromCookie.Room2AdultQuantity = room2AdultQty;
                                        modelFromCookie.Room2ChildQuantity = room2ChildQty;

                                        childAge = getQueryStringParam('room2_childage1');
                                        if (childAge) {
                                            modelFromCookie.Room2ChildAge1 = childAge;
                                        }

                                        childAge = getQueryStringParam('room2_childage2');
                                        if (childAge) {
                                            modelFromCookie.Room2ChildAge2 = childAge;
                                        }

                                        childAge = getQueryStringParam('room2_childage3');
                                        if (childAge) {
                                            modelFromCookie.Room2ChildAge3 = childAge;
                                        }

                                        childAge = getQueryStringParam('room2_childage4');
                                        if (childAge) {
                                            modelFromCookie.Room2ChildAge4 = childAge;
                                        }
                                    }

                                    var room3AdultQty = getQueryStringParam('room3_adult_qty');
                                    var room3ChildQty = getQueryStringParam('room3_child_qty');

                                    if (room3AdultQty && room3ChildQty) {
                                        modelFromCookie.Room3AdultQuantity = room3AdultQty;
                                        modelFromCookie.Room3ChildQuantity = room3ChildQty;

                                        childAge = getQueryStringParam('room3_childage1');
                                        if (childAge) {
                                            modelFromCookie.Room3ChildAge1 = childAge;
                                        }

                                        childAge = getQueryStringParam('room3_childage2');
                                        if (childAge) {
                                            modelFromCookie.Room3ChildAge2 = childAge;
                                        }

                                        childAge = getQueryStringParam('room3_childage3');
                                        if (childAge) {
                                            modelFromCookie.Room3ChildAge3 = childAge;
                                        }

                                        childAge = getQueryStringParam('room3_childage4');
                                        if (childAge) {
                                            modelFromCookie.Room3ChildAge4 = childAge;
                                        }
                                    }

                                    var flexibleDates = getQueryStringParam('flexible_dates');
                                    if (flexibleDates && flexibleDates.toLowerCase() === 'on') {
                                        modelFromCookie.FlexibleDates = true;
                                    } else {
                                        flexibleDates = 'off';
                                        modelFromCookie.FlexibleDates = false;
                                    }

                                    modelFromCookie.Rates = getQueryStringParam('rates');

                                    var accountCode = getQueryStringParam('rate_abbrv');
                                    if (!accountCode) {
                                        accountCode = getQueryStringParam('account_code');
                                    }
                                    if (!accountCode) {
                                        accountCode = getQueryStringParam('ratePlanCode');
                                    }
                                    if (accountCode) {
                                        modelFromCookie.Rates = 'promotional_code';
                                    }

                                    modelFromCookie.AccountCode = accountCode;
                                    modelFromCookie.GroupCode = getQueryStringParam('invBlockCode');

                                    if (!modelFromCookie.GroupCode) {
                                        modelFromCookie.GroupCode = getQueryStringParam('group_code');
                                    }

                                    if (modelFromCookie.GroupCode) {
                                        modelFromCookie.Rates = 'group_code';
                                    }

                                    modelFromCookie.CorpCode = getQueryStringParam('corpCode');

                                    if (!modelFromCookie.CorpCode) {
                                        modelFromCookie.CorpCode = getQueryStringParam('corp_code');
                                    }

                                    if (modelFromCookie.CorpCode) {
                                        modelFromCookie.Rates = 'corp_code';
                                    }

                                    modelFromCookie.TravelAgentNumber = getQueryStringParam('iata_num');

                                    modelFromQueryString = modelFromCookie;
                                    selectProperty(property.ItemIdGuid);


                                    var resno = getQueryStringParam('room1_cro_resno');
                                    if (resno) {
                                        component.trigger('disableSearch');
                                    }

                                    initComponent();
                                }
                            };

                            if (searchResults.length === 0) {
                                $j.get({
                                        url: omniBookingBarSettings.omniSiteUrl + '/find/findandbook/autocomplete',
                                        dataType: 'json',
                                        cache: omniBookingBarSettings.omniSiteUrl ? false : true
                                    },
                                    { 'includeGha': false, 'instart_disable_injection': true },
                                    function(data) {
                                        searchResults = data;
                                        initBookingBarFromQueryString();
                                    }
                                );
                            } else {
                                initBookingBarFromQueryString();
                            }

                            return;
                        }

                    } else {
                        modelFromCookie = modelFromQueryString;
                    }

                    var rawRoomQuantity = modelFromCookie.RoomQuantity;

                    var roomQuantity = parseInt(
                        jQuery('input[name="plp-room-input"]').val(),
                        10,
                      );
                    var $connectedRoomsWrapper = $('#connectedRoomsWrapper');
                    var $increaseButton = $('.increase');
                    var $decreaseButton = $('.decrease');
                    var $plpsearch = $('#labelSearch');

                    // Function to update the visibility of connectedRoomsWrapper
                    function updateRoomQuantity() {
                        roomQuantity =  parseInt(
                            jQuery('input[name="plp-room-input"]').val(),
                            10,
                          );
                          
                        // Get the hotel-id attribute value
let hotelId = $('.section-content p').attr('hotel-id');

// Check if hotelId is '00000000-0000-0000-0000-000000000000', if so, use the data-id from .selected
let hotel = (hotelId === '00000000-0000-0000-0000-000000000000') ? $('.section-content .selected').data("id") : hotelId;
console.log('hotelId: ', hotelId);
console.log('hotel: ', hotel);

if (excludedHotels.includes(hotel) && roomQuantity == 2) {
    $connectedRoomsWrapper.hide();
} else if (roomQuantity == 2) {
    $connectedRoomsWrapper.show();
} else {
    $connectedRoomsWrapper.hide();
}

                        
                      }

                    // Initialize the state based on the initial roomQuantity
                    updateRoomQuantity(roomQuantity);

                    // Event listeners for increase and decrease buttons
                    $increaseButton.on('click', function () {
                        if (roomQuantity < 3) {
                        roomQuantity++;
                        updateRoomQuantity(roomQuantity);
                        }
                    });

                    $decreaseButton.on('click', function () {
                        if (roomQuantity > 1) {
                            roomQuantity--;
                            updateRoomQuantity(roomQuantity);
                        }
                    });

                    // Event listener for changes in #labelSearch
                 
                    var link = $j('<a href="javascript:void(0);" tabindex="0"/>');
                    link.on('click keydown', function () {
                        updateRoomQuantity(roomQuantity);
                    });
                    // Event listener for changes in #plpsearch
                    $plpsearch.on('change', function () {
                        updateRoomQuantity(roomQuantity);
                    });
 
                    



                    if (rawRoomQuantity) {
                        roomQuantity = parseInt(rawRoomQuantity);
                    }

                    if (roomQuantity > 1) {
                        var lnk = component.find('.plp-room-selector .increase');
                        for (var i = 0; i < roomQuantity - 1; i++) {
                            lnk.click();
                        }
                    } else {
                         component.find('.rooms-section .plp-number-input').each(function() {
                            updateTotals($j(this));
                        });
                    }

                    var room1AdultQuantity = modelFromCookie.Room1AdultQuantity;
                    var room1ChildQuantity = modelFromCookie.Room1ChildQuantity;
                    var room2AdultQuantity = modelFromCookie.Room2AdultQuantity;
                    var room2ChildQuantity = modelFromCookie.Room2ChildQuantity;
                    var room3AdultQuantity = modelFromCookie.Room3AdultQuantity;
                    var room3ChildQuantity = modelFromCookie.Room3ChildQuantity;

                    var setChildAge = function(roomIndex, childIndex, childAge) {
                        if (childAge) {
                            var input = component.find('.plp-room-detail:eq(' +
                                roomIndex +
                                ') .child-ages-dropdowns input:eq(' +
                                childIndex +
                                ')');
                            if (input.length !== 0) {
                                input.val(childAge);
                            }
                        }
                    };

                    var initAdultQuantity = function (roomIndex, qty) {
                        if (qty) {

                            qty = parseInt(qty);

                            var inpt = component.find('[name="plp-adult-input-' + (roomIndex + 1) + '"]');
                            var max = parseInt(inpt.attr('max'));

                            if (qty > max) {
                                qty = max;
                            }

                            inpt.val(qty);
                        }
                    };

                    var initRoomChildQuantity =
                        function(roomIndex, roomQuantity, childAge1, childAge2, childAge3, childAge4) {

                            if (roomQuantity) {

                                var qty = parseInt(roomQuantity);
                                var selector = '[name="plp-children-input-' + (roomIndex + 1) + '"]';
                                var input = component.find(selector);

                                var max = parseInt(input.attr('max'));
                                if (qty > max) {
                                    qty = max;
                                }

                                if (qty > 0) {

                                    var parent = input.parent();

                                    var chkLnk = parent.find('.increase');
                                    for (var k = 0; k < qty; k++) {
                                        chkLnk.click();
                                    }
                                }

                                input.val(roomQuantity);

                                setChildAge(roomIndex, 0, childAge1);
                                setChildAge(roomIndex, 1, childAge2);
                                setChildAge(roomIndex, 2, childAge3);
                                setChildAge(roomIndex, 3, childAge4);
                            }
                        };

                    initAdultQuantity(0, room1AdultQuantity);
                    initRoomChildQuantity(0, room1ChildQuantity, modelFromCookie.Room1ChildAge1, modelFromCookie.Room1ChildAge2, modelFromCookie.Room1ChildAge3, modelFromCookie.Room1ChildAge4);

                    initAdultQuantity(1, room2AdultQuantity);
                    initRoomChildQuantity(1, room2ChildQuantity, modelFromCookie.Room2ChildAge1, modelFromCookie.Room2ChildAge2, modelFromCookie.Room2ChildAge3, modelFromCookie.Room2ChildAge4);


                    initAdultQuantity(2, room3AdultQuantity);
                    initRoomChildQuantity(2, room3ChildQuantity, modelFromCookie.Room3ChildAge1, modelFromCookie.Room3ChildAge2, modelFromCookie.Room3ChildAge3, modelFromCookie.Room3ChildAge4);

                    component.find('.rooms-section .plp-number-input').each(
                        function() {
                            updateTotals($j(this));
                        });

                    var rawFlexibleDates = modelFromCookie.FlexibleDates;
                    if (rawFlexibleDates) {
                        //radioFlexibleDates.prop('checked', true);
                        radioFlexibleDates.trigger('click');
                    }

                    rates = modelFromCookie.Rates;//getQueryStringParam('rates');

                    if (rates) {

                        if (rates === 'promotional_code') {
                            if (!modelFromCookie.AccountCode) {
                                rates = 'rpc_NONE';
                            }
                        } else if (rates === 'group_code') {
                            if (!modelFromCookie.GroupCode) {
                                rates = 'rpc_NONE';
                            }
                        } else if (rates === 'corp_code') {
                            if (!modelFromCookie.CorpCode) {
                                rates = 'rpc_NONE';
                            }
                        }

                        component.find('input[type=radio][name="plp-rate"]').removeAttr('checked');
                        component.find('input[type=radio][name="plp-rate"][value="' + rates + '"]')
                            .prop('checked', true).trigger('change');
                    }

                    //inputRate.trigger('change');

                    inputAgentCode.val(modelFromCookie.TravelAgentNumber);
                    inputGroupCode.val(modelFromCookie.GroupCode);
                    inputCorpCode.val(modelFromCookie.CorpCode);
                    inputPromoCode.val(modelFromCookie.AccountCode);

                    if (modelFromCookie.AccountCode) {
                        inputPromoCode.removeClass('disabled');
                    }

                    if (modelFromCookie.GroupCode) {
                        inputGroupCode.removeClass('disabled');
                    }

                    if (modelFromCookie.CorpCode) {
                        inputCorpCode.removeClass('disabled');
                    }


                    if ($('.template-group-landing-page').length === 0) {
                        digex.calendar.init();
                    }
                };

                initComponent();
            });
        }

        var initAll = function () {
            $('.plp-info-detail').on('click keydown', function(e) {

                if ((e.type === 'click') || (e.type === 'keydown' && (e.keyCode === 13 || e.keyCode === 32))) {
                    e.preventDefault();

                    $(this).fadeOut().parent().find('.info-show').attr('aria-expanded', 'false');
                }
            });

            $('.info-hide').on('click keydown', function(e) {
                if ((e.type === 'click') || (e.type === 'keydown' && (e.keyCode === 13 || e.keyCode === 32))) {
                    e.preventDefault();
                    $(this).parent().parent().find('.info-show').attr('aria-expanded', 'false');
                    $(this).parent().fadeOut();
                    $('.info-show').focus();
                }
            });

            $('.info-show').on('click', function (e) {
                e.preventDefault();
                $(this).attr('aria-expanded', 'true').parent().siblings('.plp-info-detail').fadeIn();
            }).on('keydown',
                function(e) {
                    if (e.keyCode === 13 || e.keyCode === 32 /*space*/) {
                        e.preventDefault();
                        e.stopPropagation();
                        var $this = $(this);

                        $this.attr('aria-expanded', 'true').parent().siblings('.plp-info-detail').fadeIn();

                        $this.blur(function() {

                            $this.attr('aria-expanded', 'false').parent().siblings('.plp-info-detail').fadeOut();
                            $this.unbind('blur');
                            $('.info-show').focus();
                        });

                        return false;
                    }
                    return true;
            });

            $(".use-free-nights").on("keydown", function(e) {

                if (e.keyCode === 13 || e.keyCode === 32) {
                    e.preventDefault();
                    $(".use-free-nights")[0].click();

                }

            });




            // Implement the date range picker



            if ($j('#date-start-input').length > 0) {

                $j('#plp-datepicker').find('.prev').attr('aria-label', 'Go to previous month').attr('role', 'button');
                $j('#plp-datepicker').find('.next').attr('aria-label', 'Go to next month').attr('role', 'button');

                $j('#plp-datepicker').find('tbody td div').attr('role', 'button');

                var bookingStartDate = moment().startOf('day');
                var bookingEndDate = moment().add(1, 'days').startOf('day');

                if(typeof(sslViewModel) !== 'undefined' && sslViewModel && sslViewModel.IsUserLoggedIn == "true")
                {
                    var startDate = moment(new Date(parseInt(sslViewModel.StartDate.substr(6))));
                    var endDate = moment(new Date(parseInt(sslViewModel.EndDate.substr(6))));

                    if (startDate >= bookingStartDate) {
                        bookingStartDate = startDate;
                        bookingEndDate = endDate;
                    }
                }

                var modelFromCookie = Cookies.getJSON('omni-availability-bar');

                if ($('.template-group-landing-page').length !== 0
                            || $('.template-property-offers-landing-page').length !== 0
                            || $('.template-property-offer-page').length !== 0
                            || $('.template-brand-offer-page').length !== 0
                                ) {
                            modelFromCookie = null;
                        }

                if (modelFromCookie) {

                    var rawBookingStartDate = modelFromCookie.BookingStartDate;
                    var rawBookingEndDate = modelFromCookie.BookingEndDate;

                    if (rawBookingStartDate && rawBookingEndDate) {
                        var cBookingStartDate = moment(rawBookingStartDate, 'MM-DD-YYYY');
                        var cBookingEndDate = moment(rawBookingEndDate, 'MM-DD-YYYY');

                        if (cBookingStartDate >= moment().startOf('day')) {
                            bookingStartDate = cBookingStartDate;
                            bookingEndDate = cBookingEndDate;
                        }
                    }

                } else {
                    bookingStartDate = moment();
                }

                //$j('#plp-date-input').data('dateRangePicker').setDateRange(bookingStartDate.format('MMMM DD, YYYY'), bookingEndDate.format('MMMM DD, YYYY'));

                setBookingDates(bookingStartDate, bookingEndDate);

                //$j('#filterStayDates .filter-head .filter-input').text(bookDates);

                $j('#plp-datepicker').find('.month-element').attr('role', 'heading');
                $j('#plp-datepicker').find('.month-element').attr('aria-level', '1');
                $j('#plp-datepicker').find(".first-date-selected").attr("aria-label", "selected arrival date");
                $j('#plp-datepicker').find(".last-date-selected").attr("aria-label", "selected departure date");
            }

            function initNumberInput($parent) {
                

                $parent.find('.plp-number-input-wrapper').each(function () {
                    var canIncrease = true;

                    $(this).find('button').on('click keydown', function(e) {
                    if(e.type === 'click' || (e.type === 'keydown' && e.keyCode === 13)){
                        e.preventDefault();
                        e.stopPropagation();
                        $('.plp-check-availability .plp-error-detail').hide();
                        var showIncreaseError = false;

                         setTimeout(function () {
                            $('.plp-check-availability .info-show').attr('aria-expanded', 'false');
                             $('.plp-check-availability .plp-info-detail').fadeOut();
                             
                            },
                             500);

                        var min = null,
                            max = null,
                            totalMin = null,
                            totalMax = null,
                            total = 0,
                            $el = $j(this).parent().find('.plp-number-input'),
                            currentVal = Number($el.val()),
                            increase = $j(this).hasClass('increase');

                        if ($j(this).closest('.group-total').length > 0) {
                            $parent = $j(this).closest('.group-total');
                            if ($parent[0].hasAttribute('data-min'))
                                totalMin = $parent.data('min')

                            if ($parent[0].hasAttribute('data-max'))
                                totalMax = $parent.data('max');

                            $parent.find('.plp-number-input').each(function() {
                                total += Number($j(this).val());
                            });
                        }

                        if ($el[0].hasAttribute('min')) {
                            min = parseFloat($el.attr('min'));
                        }

                        if ($el[0].hasAttribute('max')) {
                            max = parseFloat($el.attr('max'));
                        }

                        
                        if (!increase) {
                            if (((min === null) || (min < currentVal)) && ((totalMin === null) || (totalMin < total))) {
                                currentVal -= 1;
                                total -= 1;
                                canIncrease = true;
                            } 
                        } else {
                            if (((max === null) || (max > currentVal)) && ((totalMax === null) || (totalMax > total))) {
                                currentVal += 1;
                                total += 1;
                                canIncrease = true; // jkg
                            } else if (max === currentVal) {
                                $el.siblings('.plp-error-detail').fadeIn();
                                canIncrease = false;

                                
                            } else {
                                showIncreaseError = true;
                                canIncrease = false;
                            }
                        }

                        $el.val(currentVal);
                        

                        if ($el[0].hasAttribute('data-callback')) {
                            var callback = $el.data("callback");
                            switch (callback) {
                            case 'appendRoom':
                                var $newRoomEl = appendRoom();
                                if ($newRoomEl) {
                                    initNumberInput($newRoomEl);
                                    $j('.rooms-section .nav-dropdown-content').append($newRoomEl);
                                    $newRoomEl.find('.plp-number-input').each(
                                        function() {
                                            updateTotals($j(this));
                                        }
                                    );
                                    //digex.destinations.load();
                                    }

                                $('.plp-info').click(function () {
                                    $(this).siblings('.plp-info-detail').fadeIn();
                                });

                                $('.plp-info-detail').click( function () {
                                    $(this).fadeOut();
                                });

                                break;
                                case 'addChild':
                                    
                                if (increase && canIncrease) {
                                    var maxAge = 17;

                                    var $ageValue = $('<input type="text" />')
                                        .addClass("age-value")
                                        .val('')
                                        .on('keydown', function(e){
                                            if (event.shiftKey === true && e.keyCode !== 9) {
                                                event.preventDefault();
                                            }

                                            // Allow Only: keyboard 0-9, numpad 0-9, backspace, tab, left arrow, right arrow, delete
                                            // (event.keyCode >= 48 && event.keyCode <= 57) || (event.keyCode >= 96 && event.keyCode <= 105) || 
                                            if (event.keyCode === 8 || event.keyCode === 9 || event.keyCode === 37 || event.keyCode === 39 || event.keyCode === 46) {
                                                // Allow normal operation
                                                if(Number($(this).val()) < 0) {
                                                    $(this).val(0);
                                                } else if(Number($(this).val()) > 17) {
                                                    $(this).val(17);
                                                }
                                            } else if (event.keyCode === 13) {
                                                e.preventDefault();
                                                e.stopPropagation();
                                                if ($j(this).parent().hasClass('open')) {
                                                    $j('.age-select.open').removeClass('open');
                                                } else {
                                                    $j('.age-select.open').removeClass('open');
                                                    $j(this).parent().toggleClass('open');
                                                    $(this).next('.age-options').children().first().focus();
                                                }
                                            } else if (event.keyCode === 40 || event.keyCode === 32) {
                                                e.preventDefault();

                                                if (!$j(this).parent().hasClass('open')) {
                                                    $j(this).parent().addClass('open');
                                                }

                                                $(this).next('.age-options').children().first().focus();
                                            } else {
                                                // Prevent the rest
                                                event.preventDefault();
                                            }
                                        })
                                        .on('click', function(e) {
                                            e.preventDefault();
                                            e.stopPropagation();
                                            if (mobile) {
                                                $j(this).parent().find('.age-dropdown').trigger('focus');
                                            } else if ($j(this).parent().hasClass('open')) {
                                                $j('.age-select.open').removeClass('open');
                                            } else {
                                                $j('.age-select.open').removeClass('open');
                                                $j(this).parent().toggleClass('open');
                                            }
                                        });

                                    var $ageSelect = $j('<div />')
                                        .addClass('age-select')
                                        .attr('aria-label', 'Select the childs age')
                                        .append($ageValue);
                                        // .on('click', function(e) {
                                        //     e.preventDefault();
                                        //     e.stopPropagation();
                                        //     if (mobile) {
                                        //         $j(this).find('.age-dropdown').trigger('focus');
                                        //     } else {
                                        //         $j('.age-select.open').removeClass('open');
                                        //         $j(this).toggleClass('open');
                                        //     }
                                        // })

                                    var $ageOptions = $j('<div />').addClass('age-options');

                                    var $ageDropdown = $j('<select />')
                                        .addClass('age-dropdown')
                                        .attr('tabindex','-1')
                                        .change(function() {
                                            $j(this).parent().removeClass('open').find('.age-value').val($j(this).val());
                                        });

                                    var addChildAgeOption = function (i) {
                                        // rare/jkg removing -
                                        var optionText = i === '' ? '' : i;
                                        var ariaLabel = i === '' ? 'select an age' : i + ' years old' ;

                                        var $ageOption = $j('<a />')
                                            .attr({
                                                'href': '#',
                                                'data-value': i,
                                                'aria-label': ariaLabel
                                            })
                                            .text(optionText)
                                            .on('click keydown', function(e) {
                                                if(e.type === 'click' || (e.type === 'keydown' && e.keyCode === 13)){
                                                    e.preventDefault();
                                                    e.stopPropagation();
                                                    $j(this).closest('.age-select').removeClass('open').find('.age-value')
                                                        .val($j(this).text()).focus().trigger('change');
                                                } else if (e.type === 'keydown') {
                                                    e.preventDefault();
                                                    e.stopPropagation();
                                                    if(e.keyCode === 40){
                                                        $(this).next('a').focus();
                                                    } else if(e.keyCode === 38) {
                                                        $(this).prev('a').focus();
                                                    }
                                                }
                                            });

                                        $ageOptions.append($ageOption);

                                        $ageDropdown.append($j("<option></option>")
                                            .attr("value", i)
                                            .text(optionText));
                                    }

                                    // addChildAgeOption('-');

                                    for (var i = 0; i <= maxAge; i++) {
                                        addChildAgeOption(i.toString());
                                    }

                                    $el.closest('.plp-room-detail').find('.child-ages').fadeIn('fast');

                                    $el.closest('.plp-room-detail').find('.child-ages-dropdowns')
                                        .append($ageSelect.append($ageOptions).append($ageDropdown));
                                } else if (!increase && (min === null || min <= currentVal)) {
                                    $el.closest('.plp-room-detail').find('.child-ages-dropdowns .age-select:last-child')
                                        .remove();
                                    if ($el.closest('.plp-room-detail').find('.age-select').length === 0) {
                                        $el.closest('.plp-room-detail').find('.child-ages').fadeOut('fast');
                                    }
                                }
                                break;
                            }
                        }

                        if (showIncreaseError) {
                            $parent.find('.plp-error-detail').last().fadeIn();
                            $(document).on('keydown',
                                function(e) {
                                    if (e.keyCode === 27) {
                                        e.preventDefault();
                                        e.stopPropagation();
                                        $('.plp-error-detail').fadeOut();
                                        $(document).off('keydown');
                                    }
                                });

                            canIncrease = false;
                        }

                        updateTotals($el);

                        if ((!increase && $el.data('total') === 'set-room-detail') ||
                            $el.data('total') === 'set-guest-detail') {
                            //digex.destinations.load();
                        }
                    }
                });

                });

                

                $parent.find('.plp-error-detail').click(function() {
                    $j(this).fadeOut();
                });
            }

            // plp number input
            if ($j('.rooms-section .nav-dropdown-content').length > 0) {
                initNumberInput($j('.rooms-section .nav-dropdown-content'));
            }

            

            $j('.plp-check-availability .nav-dropdown-link').click(function (e) {
                var $target = $(e.target);

                if (
                    $target.hasClass('changing-reservation')
                    || $target.parents('.changing-reservation').length > 0
                    || $target.hasClass('section-disabled')
                    ||  $target.parents('.section-disabled').length > 0
                        ) {
                    e.stopPropagation();
                    e.preventDefault();
                    return false;
                }

                if ($target.hasClass('nav-dropdown') || $target.parents('.nav-dropdown').length > 0) {
                    e.stopPropagation();
                    return true;
                }
                checkAvailability(e, $j(this));
            });

            $j('.plp-check-availability .nav-dropdown-link').keydown(function (e) {
                var $target = $(e.target);

                if (($target.hasClass('changing-reservation')
                    || $target.parents('.changing-reservation').length > 0
                    || $target.hasClass('section-disabled')
                    || $target.parents('.section-disabled').length > 0

                        ) && (e.keyCode === 13 || e.keyCode === 32)) {
                    e.stopPropagation();
                    e.preventDefault();
                    return false;
                }

                if ($target.hasClass('nav-dropdown') || $target.parents('.nav-dropdown').length > 0) {
                    e.stopPropagation();
                    return true;
                }
                if (e.keyCode === 13) {
                    if ($target.hasClass('nav-dropdown-city') || $target.hasClass('nav-dropdown-state')) {
                        return true;
                    }
                    checkAvailability(e, $j(this));
                }
            });

            function checkAvailability(e, link) {

                var button = link.find('button').not(".calendar-day, .decrease, .increase");
                //if(e.type = 'click' || e.keyCode == 13 || e.keyCode == 32){
                    e.preventDefault();
                    e.stopPropagation();

                    //var link = $j(this);

                    var checkMobile = $j(window).width() < 768 ? true : false;

                if (checkMobile && $j('#plp-search-input').attr('placeholder') === "Where are you going?" && !link.parent().hasClass('open') && link.hasClass('check-availability-section')) {
                        link = $j('.check-availability-section.search-section');
                    }

                    link.parents('.plp-check-availability').trigger('nav-link-click', [link.attr('aria-controls')]);

                    

                    //if (link.hasClass('rotate') && (e.type = 'click' && e.keycode != 13 && keycode != 32)) {
                    if (link.hasClass('rotate')) {
                        link.removeClass('rotate');
                        link.children('.nav-dropdown').removeClass('open');
                        button.attr('aria-expanded', 'false');
                        if (checkMobile) {
                            if ($('.plp-header').find('.plp-check-availability').length === 0) {
                                $('.plp-header').css('visibility', 'visible');
                            }
                        }
                    } else {
                        if (checkMobile) {
                            if ($('.plp-header').find('.plp-check-availability').length === 0) {
                                $('.plp-header').css('visibility', 'hidden');
                            }
                        }
                        link.addClass('rotate');
                        link.parent().addClass('open');
                        link.children('.nav-dropdown').addClass('open');
                        button.attr('aria-expanded', 'true');

                        if (link.attr('aria-controls') === 'plpSearch') {
                            $j('#plpSearch input').focus();
                        }

                        if (link.hasClass('search-section') && link.find('.nav-dropdown-content').hasClass('offers-list') && $j('.followWrap').length === 0) {
                            //stickyHeaders.load($j(".nav-dropdown-title-sticky"));
                            stickyHeadersLoad($j('.offers-list'));
                        }

                        if ($document.width() <= 767 && $j(e.currentTarget).hasClass('check-availability-section')) {
                            $j('.digex-nav-component, .plp-nav-component, .digex-subnav-component, .plp-subnav-component')
                                .css('display', 'none');
                        }
                    }

                    if (link.siblings().children('.nav-dropdown').hasClass('open')) {
                        link.siblings().children('.nav-dropdown').removeClass('open');
                        link.siblings().removeClass('rotate').find('button').attr('aria-expanded', 'false');
                    }
                //}
            };

            $j('#plpSearch input').focusin(function() {
                if ($j(window).width() < 768) {
                    var $this = $j(this);
                    var link = $this.parents('.nav-dropdown-link');
                    if (!link.hasClass('rotate')) {
                        link.trigger('click');
                    }
                }
            });

            $j('.plp-check-availability .nav-dropdown-link > a').on('keydown',
                function(e) {
                    if (e.which === 13 || e.keyCode === 13) {
                        var $this = $j(this);
                        $this.trigger('click');
                    }
                }
            );

            $j('.rooms-section .plp-input-wrapper *').click(function(e) {
                e.stopPropagation();
                var $this = $j(this);
                $this.parents('.nav-dropdown-link').trigger('click');
            });

            $j('.dates-section .plp-input-wrapper input').each(function() {
                var $this = $j(this);
                $this.css('outline', 'none');

                $this.click(function(e) {
                    e.preventDefault();
                    $this.parents('.nav-dropdown-link').trigger('click');
                });
            });

            // Close dropdown
            $j('.close-dropdown').click(function(e) {
                $j(this).closest('.nav-dropdown').removeClass('open');
                $j(this).closest('.nav-dropdown-link').removeClass('rotate').find('button').attr('aria-expanded', 'false');
                e.stopPropagation();
            });

            // Close dropdown when Esc key pressed.
            $j(document).keyup(function(e) {
                if (e.key && e.key.toLowerCase() === 'escape') {
                    $j('.nav-dropdown').removeClass('open');
                    $j('.nav-dropdown-link').removeClass('rotate').find('button').attr('aria-expanded', 'false');


                    var closeFilter = $j('.filter-body.open .close-filter');
                    if (closeFilter.length > 0) {
                        closeFilter.trigger('click');
                    }
                }
            });

            $j(document).click(function(e) {
                var $this = $j(this);
                if ($this.closest('.nav-dropdown-link').length === 0) {
                    $j('.nav-dropdown').removeClass('open');
                    $j('.nav-dropdown-link').removeClass('rotate').find('a, button').first().attr('aria-expanded', 'false');
                }

                if ($j(window).width() >= 768) {
                    var target = $j(e.target);
                    if (target.parents('.filter-body.open').length === 0) {
                        $j('.filter-body.open .close-filter').trigger('click');
                    }
                }
            });


            $j('.close-dropdown-mobile').click(function (e) {
                var checkMobile = $j(window).width() < 768 ? true : false;
                if (checkMobile) {
                    $('.plp-header').css('visibility', 'visible');
                }

                $j('.plp-check-availability-container .nav-dropdown').removeClass('open');
                $j('.plp-check-availability-container .nav-dropdown-link').removeClass('rotate');
                $j('.plp-check-availability-container').removeClass('open');
            });

            function appendRoom() {

                var component = $j('[data-component="plp-check-availability"]');
                var roomCount = component.find('.plp-room-detail').length;
                var roomInput = $j('#plp-room-input');

                var $tempWrapper = false;

                if (roomCount < roomInput.val()) {
                    roomCount += 1;

                    var roomDetail = component.find('.plp-room-detail').first().clone();

                    roomDetail.find('label[for="plp-adult-input-1"]').attr('for', 'plp-adult-input-' + roomCount);
                    roomDetail.find('.nav-dropdown-title').html(roomInput.data('singular') + ' ' + roomCount);
                    roomDetail.find('#plp-adult-input-1').attr('id', "plp-adult-input-" + roomCount)
                        .attr('name', 'plp-adult-input-' + roomCount);
                    roomDetail.find('#plp-children-input-1').attr('id', "plp-children-input-" + roomCount)
                        .attr('name', 'plp-children-input-' + roomCount);

                    roomDetail.find('[aria-controls="adults-1"]').attr('aria-controls', 'adults-' + roomCount);
                    roomDetail.find('#adults-1').attr('id', 'adults-' + roomCount);

                    roomDetail.find('[aria-controls="children-1"]').attr('aria-controls', 'children-' + roomCount);
                    roomDetail.find('#children-1').attr('id', 'children-' + roomCount);
                    roomDetail.find('[aria-controls="children-age-1"]').attr('aria-controls', 'children-age-' + roomCount);
                    roomDetail.find('#children-age-1').attr('id', 'children-age-' + roomCount);

                    roomDetail.find('.info-show').click(function () {
                        $(this).attr('aria-expanded','true').parent().siblings('.plp-info-detail').fadeIn();
                    });

                    roomDetail.find('.info-hide').click(function () {
                        $(this).parent().parent().find('.info-show').attr('aria-expanded', 'false');
                        $(this).parent().fadeOut();
                    });

                    var inputName = 'plp-adult-input-' + roomCount;
                    roomDetail.find('input[name="' + inputName + '"]').val('2');

                    var inputNameChildren = 'plp-children-input-' + roomCount;
                    roomDetail.find('input[name="' + inputNameChildren + '"]').val('0');

                    roomDetail.find('.child-ages').hide();
                    roomDetail.find('.child-ages .child-ages-dropdowns').html('');

                    $tempWrapper = roomDetail;

                } else if (roomInput.val() < roomCount) {
                    component.find('.plp-room-detail').last().remove();
                    component.find('.plp-room-detail .plp-number-input').each(function() {
                        updateTotals($j(this));
                    });
                }

                return $tempWrapper;
            }

            $j('*').click(function (e) {
                var $target = $j(e.target);
                if (!$target.hasClass('nav-dropdown') && !$target.hasClass('nav-dropdown-link') && $target.parents('.nav-dropdown-link').length === 0) {
                    $j('.nav-dropdown').removeClass('open');
                    $j('.nav-dropdown-link').removeClass('rotate');
                }
            });

            if ($j('.plg-page-edit-mode').length === 0) {
                initCheckAvailabilityComponent();
            }
        };

        if (omniBookingBarSettings.bookingBarDiv) {
            $j(omniBookingBarSettings.bookingBarDiv).load(
                omniBookingBarSettings.omniSiteUrl +
                '/External-Site-Booking-Bar'.toLowerCase() + '?propertyCode=' + omniBookingBarSettings.propertyCode + 
                ' .digex-external-page',
                function () {
                    initAll();
                    //digex.calendar.init();
                });
        } else {
            initAll();
            //digex.calendar.init();
        }

        var $container,
            loaded = false,
            prevScrollTop, waypoints = [], $title = null;

        function stickyHeadersLoad($target) {

            $target.scrollTop(0);

            $.each(waypoints,
                function(i, w) {
                    if (w && w.length > 0) {
                        w[0].destroy();
                    }
                });

            waypoints = [];

            if ($title === null) {
                $title = $j('<div />').addClass('nav-dropdown-title-stacked').addClass('nav-dropdown-title');
                $target.before($title);
                $title = $('.nav-dropdown-title-stacked');
            }

            var refreshTitle = function ($el) {
                if ($title) {
                    var p = $('<h2 />');
                    p.html($el.html());
                    p.attr('class', $el.attr('class'));
                    $title.html(p);
                    $title.find('h2').shave(43);
                }
            };

            var firstItem = $target.find('.nav-dropdown-title').first();
            refreshTitle(firstItem);
            firstItem.addClass('sr-only');

            var stickyElements = $target.find('.nav-dropdown-title');

            stickyElements.each(function (index) {

                if (index !== 0) {
                    var $this = $(this);

                    var wp = $this.waypoint({
                        context: $target,
                        handler: function (direction) {
                            var $el = $(this.element);

                            if (direction === 'up') {
                                refreshTitle($(stickyElements.get(index - 1)));
                            } else {
                                refreshTitle($el);
                            }
                        }
                    });

                    waypoints.push(wp);
                }
            });
        }

        function onsiteSearchPerformed(url) {
            var search_term = getQueryStringParamFromUrl(url, 'hotelCode');
            var StartDate = getQueryStringParamFromUrl(url, 'StartDate');
            var EndDate = getQueryStringParamFromUrl(url, 'EndDate');

            startDateDate = new Date(StartDate);
            endDateDate = new Date(EndDate);

            start_date = startDateDate.getFullYear() + '-' + ('0' + (startDateDate.getMonth() + 1)).slice(-2) + '-' + ('0' + startDateDate.getDate()).slice(-2);
            end_date = endDateDate.getFullYear() + '-' + ('0' + (endDateDate.getMonth() + 1)).slice(-2) + '-' + ('0' + endDateDate.getDate()).slice(-2);

            var one_day = 1000 * 60 * 60 * 24;

            var stay_days_time = endDateDate.getTime() - startDateDate.getTime();
            var stay_days = stay_days_time / (1000 * 3600 * 24);

            today = new Date();
            var days_to_start_date = (Math.round(startDateDate.getTime() - today.getTime()) / (one_day)).toFixed(0);
            if (days_to_start_date < 1) {
                days_to_start_date = 0;
            }

            var adults = 0;
            for (a = 1; a < 4; a++) {
                var test1 = parseInt(getQueryStringParamFromUrl(url, 'room' + a + '_adult_qty'));
                if (test1 > 0) {
                    adults += test1;
                }
            }
            var children = 0;
            for (a = 1; a < 4; a++) {
                var test2 = parseInt(getQueryStringParamFromUrl(url, 'room' + a + '_child_qty'));
                if (test2 > 0) {
                    children += test2;
                }
            }
            var people = adults + children;

            fireOnsiteSearchPerformed(search_term, days_to_start_date, start_date, end_date, adults, children, people, stay_days);
        }

        function fireOnsiteSearchPerformed(search_term, days_to_start_date, start_date, end_date, number_of_adults, number_of_children, people, onsite_search_date_count) {
            window.dataLayer = window.dataLayer || [];
            dataLayer.push({ event_data: null });  // Clear the previous event_data object.
            dataLayer.push({
                "event": "search",
                "detailed_event": "Onsite Search Performed",
                "event_data": {
                    "days_to_start_date": days_to_start_date,
                    "end_date": end_date,
                    "number_of_adults": number_of_adults,
                    "number_of_children": number_of_children,
                    "onsite_search_date_count": onsite_search_date_count,
                    "people": people,
                    "search_term": search_term,
                    "start_date": start_date
                }
            });
            console.log('Onsite Search Performed ' + search_term + '|' + days_to_start_date + '|' + start_date + '|' + end_date + '|' + number_of_adults + '|' + number_of_children + '|' + people + '|' + onsite_search_date_count)
        }

        //  glp page calendar dropdown

        $j(".calendar-glp .rooms-section").on("click", function() {
            var calendarDropdownLink = $(".calendar-glp .nav-dropdown-link");

            $j(".plp-check-availability-container").removeClass("open");
            $j(".calendar-glp .plp-search-dropdown").addClass("open");

            calendarDropdownLink.attr('aria-expanded', 'true');

            calendarDropdownLink.toggleClass("rotate");

        });


        $document.keydown(function(e) {
            var code = e.keyCode || e.which;

            if (code === 9) {
                $j('.plp-search-label').show();
                $j('#plp-search-input').attr('placeholder','');

                //$('.plp-search-dropdown .nav-dropdown-content').css('margin-top', '25px');
            }

        });


    });

    return {
        initDates: function (startDate, endDate) {
            setBookingDates(startDate, endDate);
        },

        get: function () {

            if (internalGetModel != null) {
                return internalGetModel();
            }

            return null;
        }
    };

})(window, window.jQuery);
window.onbeforeunload = function (event) {
    // jQuery('.book-section .plp-primary-cta').text('Book').removeClass('booking');
};
jQuery(window).bind("pageshow", function (event) {
    if (event.originalEvent.persisted) {
        // console.log("User clicked on back button!");
        jQuery('.book-section .plp-primary-cta').text('Book').removeClass('booking');
    }
});
//forcing commit

var digex = digex || {};
digex.calendar = {};

(function (window, $) {

    var $j = $;

    var dateFormat = 'YYYY-MM-DD';


    digex.calendar.init = function () {

        var minDate = moment().startOf('day');
        var maxDate = null, rawMinDate = null, rawMaxDate = null;

        var lnkMakeReservation = $('a[data-is-glp="true"]').first();

        if (lnkMakeReservation.length > 0) {
            rawMinDate = lnkMakeReservation.attr('data-min-date');
            rawMaxDate = lnkMakeReservation.attr('data-max-date');

            if (rawMinDate && rawMaxDate) {
                minDate = moment(rawMinDate, dateFormat);
                maxDate = moment(rawMaxDate, dateFormat);
            }
        }

        var calendarDays = [];
        var hoverRange = {
            'start': null,
            'end': null
        };

        var isFirstLoad = true;

        var hoverIndex = null;
        var hoverOffset = 0;
        var dayOffset = 0;
        var selectMode = false;
        var bgValue = 255;
        var dateLoop = 120;

        var setStartDate, setEndDate;

        if ($j('.plp-page-edit-mode').length > 0) {
            // do nothing if page is in edit mode, otherwise any DOM manipulations, or the slick plugin will break the experience editor.
            return;
        }

        var digexReload = function() {
            if (typeof digex !== 'undefined' && typeof digex.destinations !== 'undefined' ) {
                if ($('.template-brand-offer-page').length === 0) {
                    digex.destinations.refreshPrices();
                }
            }
        };

         var offersReload = function() {
             if (typeof digex !== 'undefined' && typeof digex.offers !== 'undefined') {
                 if ($('#filterStayDates').length > 0) {
                     digex.offers.load();
                 }
             }
         };


        $j('[data-component="digex-calendar"]').each(function () {
            var currentDate = new Date();
            var calendar = $j(this);

            //calendar.find('.digex-calendar-container').remove();

            var initDates = function(){
                //get default dates
                var startDate = moment( $j('#date-start-input').val(), 'MMMM DD, YYYY' );
                var endDate = moment( $j('#date-end-input').val(), 'MMMM DD, YYYY' );

                setStartDate = startDate.toDate();
                setEndDate = endDate.toDate();

                //set currentDate to midnight
                var scrollToStartDate = false;
                currentDate.setHours(0, 0, 0, 0);
                var defaultDateLoop = dateLoop;
                var momentCurrentDate = moment(currentDate);
                if (endDate > momentCurrentDate) {
                    var numberOfDays = endDate.diff(momentCurrentDate, 'days');
                    if (numberOfDays + 90 > dateLoop) {
                        defaultDateLoop = numberOfDays + 90;
                    }
                    if (numberOfDays > 30) {
                        scrollToStartDate = true;
                    }
                }

                //build date array
                addDates(currentDate, defaultDateLoop, true);

                //add calendar to DOM
                printCalendar();


                var scrollToDate = function() {
                    var unixDate = startDate.unix();
                    var button = $('.digex-calendar-container .calendar-day-container button[data-utc="' + unixDate + '"]');

                    var calendarContainer = $('.digex-calendar-container');
                    calendarContainer.scrollTop(0);

                    var offsetCorrection = calendarContainer.height() / 2;
                    var offset = button.parent().position().top - offsetCorrection;

                    calendarContainer.scrollTop(offset);
                }

                var initScrollToDate = function() {
                    var bookingBar = $('.plp-check-availability');
                    var fff = function(e, ariaControls) {
                        setTimeout(scrollToDate, 500);
                    };
                    bookingBar.on('nav-link-click', fff);
                }

                if (scrollToStartDate) {
                     setTimeout(initScrollToDate, 500);
                }
            };

            $j('#date-start-input, #date-end-input').focus(function(e){
                var dateVal = moment($j(this).data('date'), 'MM/DD/YYYY').format('MM/DD/YYYY');
                $j(this).val(dateVal);
            });

            $j('#date-start-input').on('keydown', function(e){
                if(e.keyCode === 13){
                    e.preventDefault();
                    e.stopPropagation();
                    $j('#date-end-input').focus();
                }                
            });

            $j('#date-end-input').on('keydown', function(e){
                if(e.keyCode === 13){
                    e.preventDefault();
                    e.stopPropagation();
                    $('.check-availability-section.dates-section').focus();
                }
            });

            $j('#date-start-input, #date-end-input').on('blur', function(){
                triggerDate($(this));
            });


            var triggerDate = function (elem) {
                var rawValue = elem.val();
                
                if ((rawValue.match(/\//g) || []).length === 1) {
                    rawValue += '/' + moment().year();
                    elem.val(rawValue);
                }

                var userDate = moment(rawValue, 'MM/DD/YYYY');

                if (!userDate.isValid() || !userDate.isSameOrAfter(minDate)) {
                    elem.val(minDate.format('MM/DD/YYYY'));
                }

                if (maxDate != null) {
                    if (!userDate.isSameOrBefore(maxDate)) {
                        elem.val(maxDate.format('MM/DD/YYYY'));
                    }
                }

                elem.data('date', elem.val());

                var dateVal = moment(elem.data('date'), 'MM/DD/YYYY').format('MMM DD, YYYY');
                elem.val(dateVal);

                var dateChk = moment(elem.data('date'), 'MM/DD/YYYY').unix();

                var e = jQuery.Event("keydown");
                e.which = e.keyCode = 13;

                if ($j('button[data-utc="' + dateChk + '"]').length === 0) {
                    var endDate = moment(dateVal, 'MMMM DD, YYYY');
                    var startDate = moment($j('.calendar-day').last().data('date'), 'MMMM DD, YYYY');
                    appendDates(startDate.toDate(), endDate.diff(startDate, 'days'));
                }

                var userStartDate = moment($('#date-start-input').data('date'), 'MM/DD/YYYY');
                var userEndDate = moment($('#date-end-input').data('date'), 'MM/DD/YYYY');

                var today = moment().startOf('day');

                if (userStartDate.diff(today) < 0) {
                    userStartDate = today;
                    $('#date-start-input').data('date', userStartDate.format('MM/DD/YYYY')).val(userStartDate.format('MMM DD, YYYY'));
                }

                if (userEndDate.diff(userStartDate) <= 0) {
                    userEndDate = moment(userStartDate).add(1, 'days');
                    $('#date-end-input').data('date', userEndDate.format('MM/DD/YYYY')).val(userEndDate.format('MMM DD, YYYY'));
                }

                digex.booking.initDates(userStartDate, userEndDate);
            };

            //create date array from start date add length number of days
            var addDates = function(startDate, length, offset) {
                var startDay = offset ? startDate.getDate() - startDate.getDay() : startDate.getDate();
                var endDate = new Date(startDate.getFullYear(), startDate.getMonth(), startDate.getDate() + length)

                for (var d = new Date(startDate.getFullYear(),
                        startDate.getMonth(),
                        startDay);
                    d <= endDate;
                    d.setDate(d.getDate() + 1)) {
                    calendarDays.push(new Date(d));
                }
            };

            //appends new dates to calendar on scroll
            var appendDates = function(startDate, length) {
                addDates(startDate, length, false);
                buildCalendar($j('.digex-calendar-container'));
            };

            //append weekdays to calendar header
            var appendWeekdays = function() {
                var weekdayWrapper = $j('<div />').addClass('weekday-wrapper');

                for (var i = 0; i < 7; i++) {
                    var $name = $j('<div />').addClass('weekday').text(moment().day(i).format('ddd'));
                    $name.appendTo(weekdayWrapper);
                }

                weekdayWrapper.appendTo(calendar);
            };

            var appendStatus = function() {
                var startDate = moment(setStartDate, 'MMMM DD, YYYY');
                var endDate = moment(setEndDate, 'MMMM DD, YYYY');
                var statusWrapper = $j('<div />').addClass('date-status').text(startDate.format('ddd MMM, D') +
                    ' - ' +
                    endDate.format('ddd MMM, D') +
                    ' (' +
                    endDate.diff(startDate, 'days') +
                    '-night stay)');
                statusWrapper.appendTo(calendar);
            };

            //return full month name
            var getMonthName = function(m) {
                return moment(m).format('MMMM');
            };

            //return full day name
            var getDayName = function(m) {
                return moment(m).format('dddd');
            };

            var formatDateView = function(day) {
                return getDayName(day) + ', ' + getMonthName(day) + ' ' + day.getDate() + ', ' + day.getFullYear();
            }

            //Initial add calendar to DOM
            var printCalendar = function() {
                var controlWrapper = $j('<div />').addClass('digex-calendar-container');

                controlWrapper.on('scroll',
                    function() {
                        var scrollOffset = $j(this).find('.calendar-day-container').innerHeight() * 4;
                        if ($j(this).scrollTop() + $j(this).innerHeight() >= $j(this)[0].scrollHeight - scrollOffset) {
                            //append more dates
                            var lastDate = new Date($j('.calendar-day').last().data('date'));
                            lastDate.setDate(lastDate.getDate() + 1);
                            appendDates(lastDate, 30);
                        }
                    });

                controlWrapper.appendTo(calendar);

                buildCalendar($j('.digex-calendar-container'));
                appendWeekdays();
            };

            //Build calendar DOM
            var buildCalendar = function (target) {
                for (day in calendarDays) {
                    var monthSpan = $j('<span />').addClass('month-abbr')
                        .text(getMonthName(calendarDays[day]).substr(0, 3));
                    var daySpan = $j('<span />').addClass('month-day').text(calendarDays[day].getDate());
                    var yearSpan = $j('<span />').addClass('month-day').text(calendarDays[day].getFullYear());
                    var dateContainer = $j('<div />').addClass('calendar-day-container');

                    var setStart = false;
                    var setEnd = false;
                    var setMonthStart = false;
                    var keyboard = false;

                    dateContainer.on('click keydown',
                        function(e) {
                            e.stopPropagation();
                            e.preventDefault();

                            if((e.type == 'click' && keyboard == false) || (e.type == 'keydown' && (e.keyCode == 13 || e.keyCode == 32))){

                                if(e.type == 'keydown' && (e.keyCode == 13 || e.keyCode == 32)){
                                    keyboard = true;
                                } else {
                                    keyboard = false;
                                }

                                var parent = $j(this).parent();
                                var target = $j(this).find('.calendar-day');

                                if(!target.hasClass('unavailable')){

                                    selectMode = selectMode ? false : true; // check to see if we are in selectmode, if not start

                                    var checkMobile = $j(window).width() < 769 ? true : false; // check if we are in mobile resolutions (hover doesn't work in mobile)

                                    if (selectMode) {
                                        parent.addClass('selectMode');
                                        hoverRange.start = hoverStart = $j(this).index() - $j(this).data('offset');

                                        $j('.calendar-day-container').removeClass('selected');

                                        if(!checkMobile && e.type != 'keydown'){ // remember, hover doesn't work in mobile
                                            $j('.calendar-day-container').on('hover mouseenter',
                                                function(e) {
                                                    e.stopPropagation();
                                                    if(e.type != 'KeyboardEvent'){
                                                        var hoverStart = 0;
                                                        var hoverEnd = 0;
                                                        hoverIndex = $j(this).index() - $j(this).data('offset');
                                                        if (hoverIndex < hoverRange.start) {
                                                            hoverStart = hoverIndex;
                                                            hoverEnd = hoverRange.start + 1;
                                                        } else if (hoverIndex > hoverRange.start) {
                                                            hoverStart = hoverRange.start;
                                                            hoverEnd = hoverIndex + 1;
                                                        }


                                                        $j('.calendar-day-container').each(function(){
                                                            $(this).removeClass('selected start end');
                                                            $(this).children('button').attr('aria-label', moment($(this).children('button').data('date')).format('dddd, MMMM D, YYYY'))
                                                                .data('utc', moment($(this).children('button').data('date')).unix());
                                                        });

                                                        $j('.calendar-day-container').slice(hoverStart, hoverEnd).addClass('selected');


                                                        $dateStart = $j('.calendar-day-container').slice(hoverStart, hoverEnd).first();
                                                        $dateEnd = $j('.calendar-day-container').slice(hoverStart, hoverEnd).last();

                                                        $dateStart.addClass('start');
                                                        $dateStart.children('button').attr('aria-label', 'Selected start date - ' + moment($dateStart.children('button').data('date')).format('dddd,  MMMM D, YYYY'));
                                                        $dateEnd.addClass('end');
                                                        $dateEnd.children('button').attr('aria-label', 'Selected end date - ' + moment($dateEnd.children('button').data('date')).format('dddd,  MMMM D, YYYY'));
                                                    }
                                                }
                                            );
                                        } else {
                                            $j(this).addClass('selected start-mobile');
                                            hoverRange.start = hoverStart = $j(this).index() - $j(this).data('offset');
                                        }
                                    } else {

                                        hoverIndex = $j(this).index() - $j(this).data('offset');

                                        if(hoverIndex != hoverRange.start) {
                                            parent.removeClass('selectMode');

                                            if(checkMobile || e.type == 'keydown'){
                                                if (hoverIndex < hoverRange.start) {
                                                    hoverStart = hoverIndex;
                                                    hoverEnd = hoverRange.start + 1;
                                                } else if (hoverIndex > hoverRange.start) {
                                                    hoverStart = hoverRange.start;
                                                    hoverEnd = hoverIndex + 1;
                                                }

                                                $j('.calendar-day-container').each(function(){
                                                    $(this).removeClass('selected start end start-mobile');
                                                    $(this).children('button').attr('aria-label', moment($(this).children('button').data('date')).format('dddd, MMMM D, YYYY'));
                                                });
                                                
                                                $j('.calendar-day-container').slice(hoverStart, hoverEnd).addClass('selected');


                                                $dateStart = $j('.calendar-day-container').slice(hoverStart, hoverEnd).first();
                                                $dateEnd = $j('.calendar-day-container').slice(hoverStart, hoverEnd).last();

                                                $dateStart.addClass('start');
                                                $dateStart.children('button').attr('aria-label', 'Selected start date - ' + moment($dateStart.children('button').data('date')).format('dddd,  MMMM D, YYYY'));
                                                $dateEnd.addClass('end');
                                                $dateEnd.children('button').attr('aria-label', 'Selected end date - ' + moment($dateEnd.children('button').data('date')).format('dddd,  MMMM D, YYYY'));
                                            } else {
                                                $j('.calendar-day-container').off('hover mouseenter');
                                                hoverEnd = hoverIndex;
                                            }

                                            var startDate = moment($j('.start').find('.calendar-day').data('date'), 'MMMM DD, YYYY');
                                            var endDate = moment($j('.end').find('.calendar-day').data('date'), 'MMMM DD, YYYY');
                                            var bookDates = startDate.format('MMM DD') + ' - ' + endDate.format('MMM DD');

                                            var dateDayCount = $j('.date-day-count');
                                            var nightText = dateDayCount.attr('data-text-night');
                                            if(endDate.diff(startDate, 'days') > 1) {
                                                nightText = dateDayCount.attr('data-text-nights');
                                            }

                                            $j('#date-start-input').val(startDate.format('MMM DD, YYYY')).data('date', startDate.format('MM/DD/YY'));
                                            $j('#date-end-input').val(endDate.format('MMM DD, YYYY')).data('date', endDate.format('MM/DD/YY'));
                                            dateDayCount.text('(' + endDate.diff(startDate, 'days') +' ' + nightText + ')');

                                            $j('.set-dates').text(bookDates);
                                            $j('#filterStayDates .filter-head .filter-input').text(bookDates);

                                            isFirstLoad = false;


                                            if ($(this).parents('#plpCalendar').length > 0) {
                                                offersReload();
                                            }

                                            $j('.plp-room-selector-wrapper').trigger('loadRooms');

                                            digexReload();

                                            var dateTarget = document.querySelector('.selected.start');
                                            var dateScroll = document.querySelector('.digex-calendar-container');

                                            ensureInView(dateScroll, dateTarget);

                                            if ($('.template-group-landing-page').length > 0) {
                                                digex.glp.setDates(startDate, endDate);
                                            }
                                        }
                                    }
                                }
                            } else if(e.shiftKey && e.type == 'keydown' && e.key === 'Tab' || e.type == 'keydown' && e.key === 'ArrowLeft') {
                                $(this).prevAll('.calendar-day-container:first').find('button').focus();
                            } else if( (e.type == 'keydown' && e.key === 'Tab') ||  (e.type == 'keydown' && e.key === 'ArrowRight') ) {
                                $(this).nextAll('.calendar-day-container:first').find('button').focus();
                            } else {
                                keyboard = false;
                            }
                        });

                    $j('#dates-error-modal .cancel').on('click', function() {
                        $j('#dates-error-modal').removeClass('show');
                    });

                    $j('#dates-error-modal .replace').on('click', function() {
                        $j('#dates-error-modal').removeClass('show');
                    });


                    var dateWrapper = $j('<button />').addClass('calendar-day').data('date', calendarDays[day])
                        .attr({
                            'aria-label': formatDateView(calendarDays[day]),
                            'data-utc': moment(calendarDays[day]).unix()
                        })                        
                        .append(monthSpan).append(daySpan).append(yearSpan);

                    if (calendarDays[day] < currentDate) {
                        dateWrapper.addClass('unavailable');
                        dateWrapper.attr('disabled', 'disabled');
                    }

                    if (rawMinDate && rawMaxDate) {
                        if (moment(calendarDays[day]).isBefore(minDate) || moment(calendarDays[day]).isAfter(maxDate)) {
                            dateWrapper.addClass('unavailable');
                            dateWrapper.attr('disabled', 'disabled');
                        }
                    }

                    if (currentDate.toDateString() === calendarDays[day].toDateString()) {
                        dateWrapper.addClass('today');
                    }

                    if (setStartDate.toDateString() === calendarDays[day].toDateString()) {
                        setStart = true;
                    }

                    if (setEndDate.toDateString() === calendarDays[day].toDateString()) {
                        setEnd = true;
                    }

                    if (calendarDays[day] > setStartDate && calendarDays[day] < setEndDate) {
                        dateContainer.addClass('selected');
                    }

                    if (setStart) {
                        dateContainer.addClass('selected start')
                        dateWrapper.attr('aria-selected','true');
                        //.attr('aria-label','Selected arrival date');
                    }

                    if (setEnd) {
                        dateContainer.addClass('selected end');
                        dateWrapper.attr('aria-selected','true');
                        //.attr('aria-label','Selected departure date');
                    }

                    if (calendarDays[day].getDate() == 1) {
                        dateContainer.addClass('start-month');
                        target.append('<div class="new-month break" role="heading" aria-level="2">' + getMonthName(calendarDays[day]) + ' ' + calendarDays[day].getFullYear() + '</div>');
                        hoverOffset++;
                    } else if (calendarDays[day].getDate() <= 7) {
                        dateContainer.addClass('first-week');
                    }

                    var endMonth = moment(calendarDays[day]).endOf('month');

                    if (calendarDays[day].getDate() == endMonth.format('D')) {
                        dateWrapper.addClass('end-month');
                    }

                    dateContainer.attr('data-offset', hoverOffset);
                    dateContainer.attr('data-weekday', dayOffset);

                    dateWrapper.appendTo(dateContainer);

                    dateContainer.appendTo(target);
                    dayOffset++;

                    if(dayOffset > 6){
                        dayOffset = 0;
                    }
                }

                calendarDays = []; // clear calendarDays for next set of dates
            };

            initDates();
        });
    };


    //$(function () {
    //    digex.calendar.init();
    //});

    function ensureInView(container, element) {

        //Determine container top and bottom
        let cTop = container.scrollTop;
        let cBottom = cTop + container.clientHeight;

        //Determine element top and bottom
        let eTop = element.offsetTop;
        let eBottom = eTop + element.clientHeight;

        //Check if out of view
        if (eTop < cTop) {
          container.scrollTop -= (cTop - eTop + (container.clientHeight / 2));
        }
        else if (eBottom > cBottom) {
          container.scrollTop += (eBottom - cBottom + (container.clientHeight / 2));
        }
    }


})(window, jQuery);
//forcing commit

(function (window, $) {

    $j = $;

    $j('.clp-events-carousel').slick({
        dots: true,
        prevArrow: $j('.prev-arrow'),
        nextArrow: $j('.next-arrow'),
        slidesToShow: 3,
        slidesToScroll: 3,
        responsive: [
            {
                breakpoint: 1023,
                settings: {
                    slidesToShow: 2,
                    slidesToScroll: 2,
                }
            },
            {
            breakpoint: 767,
            settings: {
                slidesToShow: 1,
                slidesToScroll: 1,
            }
          }
        ]
    });

    function featuredTopicCarousel() {
        $j('.featured-topic-carousel').slick({
            dots: true,
            prevArrow: $j('.prev-arrow'),
            nextArrow: $j('.next-arrow'),
            slidesToShow: 3,
            slidesToScroll: 3,
            responsive: [
                {
                    breakpoint: 1023,
                    settings: {
                        slidesToShow: 2,
                        slidesToScroll: 2,
                    }
                },
                {
                    breakpoint: 767,
                    settings: "unslick"
                }
            ]
        });

    }

    featuredTopicCarousel();

    $j( window ).resize(function() {
        if ($j(window).width() > 767) {
            featuredTopicCarousel();
        }
    });
    $j('.rotating-text-carousel').each(function() {
        var $this = $(this);
        $this.slick({
            // autoplay: true,
            autoplaySpeed: parseInt($this.attr('data-speed')) * 1000,
            dots: true,
            mobileFirst: true,
            prevArrow: false,
            nextArrow: false,
            slidesToShow: 1,
            slidesToScroll: 1,
            accessibility:false
        });
    
    $this.on('afterChange', function (event, slick, currentSlide, nextSlide) {
        
      var items = slick.$dots.find('li');
            var count = items.length;
            setTimeout(function() {
                items.each(function(index, value) {
                    var button = $(this).find('button');
                    button.attr('aria-label','Slide ' + (index + 1).toString() + ' of ' + count);
                });
            }, 250);
            
});
});

    $j(".rotating-text-item").on("click", function(){
        $('.rotating-text-carousel').slick('slickPause');
    });

    $j(".rotating-text-carousel .slick-dots button").on("click", function(){
        $('.rotating-text-carousel').slick('slickPause');
    });


    function promoBannerColor() {
        var textColor = $('.promo-banner-wrapper').css( "color" );
        $(".promo-banner-wrapper a").css("color", textColor);
        $(".promo-banner-wrapper .digex-secondary-cta ").css({
            "color": textColor,
            "border-color": textColor
        });
    }


    function featuredTopicColor() {
        var textColor = $('.featured-topic-wrapper').css( "color" );
        $(".featured-topic-wrapper a").css("color", textColor);
        $(".featured-topic-wrapper .heading-line").css("background-color",  textColor)
        $(".featured-topic-wrapper .heading-line").css("background-color",  textColor)

        $(".featured-topic-wrapper .digex-secondary-cta ").css({
            "color": textColor,
            "border-color": textColor
        });
    }

    promoBannerColor();
    featuredTopicColor();

    $(function () {
        var bookingBar = $('div[data-component="plp-check-availability"]');

        $('.promo-banner-wrapper .promo-banner-text').shave(14);

        $('.clp-events-carousel-item').each(function() {

            var $this = $(this);
            // $this.find('.title').shave(59);

            var hasDate = $this.find('.date').length > 0;
            var hasAddress = $this.find('.address').length > 0;

            var shaveDescriptionOneLineHeight = 28;
            var shaveDescriptionNumberOfLines = 5;

            if (hasDate) {
                shaveDescriptionNumberOfLines -= 1;
            }

            if (hasAddress) {
                shaveDescriptionNumberOfLines -= 2;
            }

            $this.find('.description').shave(shaveDescriptionOneLineHeight * shaveDescriptionNumberOfLines);
        });

        if ($(window).width() > 767) {
            
            $('.featured-topic-wrapper .featured-topic-item .description').shave(36);
            $('.featured-topic-wrapper .featured-topic-highlight-description').shave(336);
        } else {

            $('.featured-topic-wrapper .featured-topic-highlight-description').shave(336);
            $('.featured-topic-wrapper .featured-topic-item .description').shave(70);
        }

        $('.featured-topic-wrapper').on('click',
            'a[data-hotel-id]',
            function() {
                var $this = $(this);
                if ($this.attr('data-is-offer') === 'true') {

                    return;
                }

                var itemId = $this.attr('data-hotel-id');


                setTimeout(function() {
                    bookingBar.trigger('book', [itemId]);
                }, 100);
            });
    });


})(window, jQuery);

(function (window, $) {
    $(function() {

        //var txtDate = $('#dayratecontrobox input[type=date]');

        var txtDate = $('#dayratecontrobox #StartDate');

        if (txtDate.length === 0) {
            return;
        }

        txtDate.val(moment().format('MM/DD/YYYY'));

        var picker = datepicker('#StartDate',
            {
                minDate: new Date(),
                noWeekends: true,
                formatter: function (input, date, instance)  {
                    var value = moment(date).format('MM/DD/YYYY');
                    input.value = value; // => '1/1/2099'
                }
            });

        

    });
})(window, jQuery);

var digex = digex || {};

function removeHashFromUrl()
{
    var uri = window.location.toString();
    if (uri.indexOf("#") > 0) {
        var clean_uri = uri.substring(0, uri.indexOf("#"));
        window.history.replaceState({}, document.title, clean_uri);
    }
}

function addParametersToUrlHash(params) {
    var urlHash = '';
    var encoded = jQuery.param(params);
    if (encoded) {
        urlHash = '#' + encoded;
        window.location.hash = encoded;
    } else {
        removeHashFromUrl();
    }

    return urlHash;
}

function getParametersFromUrlHash() {
    var value = window.location.hash.substring(1, window.location.hash.length);
    if (value) {
        value = decodeURIComponent(value);
        return jQuery.deparam(value);
    } else {
        return null;
    }
}

function refreshSlickDots(dots) {

        var items = dots.find('li');

        items.each(function(index, value) {
            var button = $j(this).find('button');
            button.removeAttr('aria-current');
            button.attr('aria-label','Go to Slide ' + (index + 1).toString());
        });
        dots.find('li.slick-active button').attr('aria-current', 'true');
}

digex.destinations = (function(window, $) {

    var $j = $;

    var $window;
    var propertyList;
    var mapPropertyList;
    var bookingBar;
    var lnkPropertyListLoadMore;
    var pageIndex = 0;
    var pageSize = 2;
    var paginationByHotel = false;
    var isInProgress = false;
    var searchResults = [];
    var activityTypes = [];
    var propertyTypes = [];
    var divSelectedFilters;
    var markers = [];
    var destinations = [];
    var loadRoomPriceRequests = [];

    var descriptionSection;
    var descriptionSearchInProgress;
    var searchResultsCaptionFilterByCitySingular;
    var searchResultsCaptionFilterByCityPlural;
    var bounds;
    var infowindow;

    var iconMarker ,
        iconSelected ,
        iconUnavailable;

    var urlHashParams = null;

    var currentUrlHash = '';
    var isOfferPage = false;


    var clearOverlays = function() {
        for (var i = 0; i < markers.length; i++) {
            markers[i][1].setMap(null);
        }
        markers.length = 0;

        if (typeof google !== 'undefined') {
            bounds = new google.maps.LatLngBounds();
        }
    };


    function mapSelectResort(target, resortid) {
        var $listContainer = $j('.plp-room-selector-map-list');
        var $container = $j('.plp-room-selector-maps-container');

        if (!target.hasClass('selected')) {
            $j('.plp-resort-overview.selected, .plp-resort-location.selected, .plp-resort-item.selected').removeClass('selected');

            target.addClass('selected');

            target.parent().addClass("selected");

            $j.each(markers,
                function(index, value) {
                    if (value[0] == resortid) {
                        if (value[1]['available']) {
                            value[1].setIcon(iconSelected);
                        }
                        value[1].setZIndex(1);
                    } else {
                        if (value[1]['available']) {
                            value[1].setIcon(iconMarker);
                        }
                        value[1].setZIndex(0);
                    }
                });

            if ($(window).width() >= 1024) {
            //SCROLL TO SELECTED RESORT
            $listContainer.animate({
                scrollTop: (target.offset().top - $listContainer.offset().top + $listContainer.scrollTop()) - 20
                    },
                    500);
        } else {
                $listContainer.show();
                $listContainer.find('.plp-room-selector-content-wrapper').hide();
                $listContainer.find('.plp-resort-item').hide();

                target.parents('.plp-resort-item').show();
                target.parents('.plp-room-selector-content-wrapper').show();
            }


        } else {
            if ($(window).width() < 1024) {
                //$listContainer.hide();
            }
            target.removeClass('selected');
            $j.each(markers,
                function(index, value) {
                    if (value[0] === resortid) {
                        value[1].setIcon(iconMarker);
                    }
                });
        }
    }

    var addMarker = function (resort) {

        var marker = new google.maps.Marker({
            icon: resort.available ? iconMarker : iconUnavailable,
            map: window.map,
            position: new google.maps.LatLng(resort.lat, resort.lng),
            title: resort.name,
            resortid: resort.id,
            available: resort.available
        });

        markers.push([resort.id, marker]);

        bounds.extend(marker.position);

        google.maps.event.addListener(marker,
            'click',
            (function(marker) {
                return function() {
                    var $resort = $j('[data-resortid="' + marker.resortid + '"]');
                    var resortid = $resort.data('resortid');

                    if ($resort.prev().hasClass('plp-resort-location')) {
                        $resort = $resort.prev();
                    }

                    mapSelectResort($resort, resortid);
                };
            })(marker));
    };

    var resetMarkers = function() {
        _.each(markers,
            function(marker, index) {
                marker[1].setIcon(iconMarker);
                //marker.icon = iconMarker;

            });
    };

    var refreshMap = function(hotels) {
        clearOverlays();

        $.each(hotels,
            function(hotelIndex, h) {
                var hotel = $(h);
                var resort = {
                    id: hotel.data('hotel-id'),
                    lat: hotel.data('lat'),
                    lng: hotel.data('lng'),
                    city: hotel.data('city'),
                    state: hotel.data('state'),
                    name: hotel.data('hotel-name'),
                    available: true
                };
                addMarker(resort);
            });

        var map = window.map;
        map.fitBounds(bounds);

        if ($(window).width() < 1024) {
            $('#googleMap').css('width', '99%');
             setTimeout(function() {
                $('#googleMap').css('width', '100%');
            }, 3000);
        } else {
            $('#map-view .plp-room-selector-maps-container').css('height', 'calc(100vh - (205px + 37px))');
        setTimeout(function() {
            $('#map-view .plp-room-selector-maps-container').css('height', 'calc(100vh - (205px + 36px))');
        }, 3000);
        }


    };

    var removeDuplicateHeadings = function() {
        var headings = propertyList.find('.plp-section-heading');

        headings.each(function() {
            var $this = $(this);
            var state = $this.data('state');

            var list = propertyList.find('.plp-section-heading[data-state="' + state + '"]');
            if (list.length > 1) {
                // we can have only one duplicate item.
                list[1].remove();
            }
        });
    };

    var refreshTripAdvisorLogoLink = function () {

        function pad(num, size) {
            num = num.toString();
            while (num.length < size) num = "0" + num;
            return num;
        }

        var getRating = function (container) {

            for (var i = 0; i < 50; i += 5) {
                var n = pad(i, 2);

                if (container.find('.bubble_' + n).length > 0) {
                    return i / 10;
                }
            }

            return 0;
        }

        $('.plp-tripadvisor .cdsComponent.logo a').each(function () {
            var lnkLogo = $(this);
            var container = lnkLogo.parents('.cdsROWContainer');
            var propertyLink = container.find('.cdsLocName a');

            var reviews = container.find('.cdsRating span').last();

            var rating = getRating(container).toFixed(1);

            lnkLogo.attr('href', propertyLink.attr('href'));
            lnkLogo.attr('title', 'TripAdvisor rating is ' + rating + ' based on ' + reviews.html().trim() + '. Use this link to find more info on the TripAdvisor website.');
            lnkLogo.attr('aria-label', 'TripAdvisor rating is ' + rating + ' based on ' + reviews.html().trim() + '. Use this link to find more info on the TripAdvisor website.');
        });
    };

    var refreshTripAdvisorWidgets = function () {

        if (typeof(window.taValidate) !== 'undefined') {
            window.taValidate();

            setTimeout(function() {
                refreshTripAdvisorLogoLink();
            }, 500);
            

            //$.getScript("https://www.tripadvisor.com/WidgetEmbed-cdsratingsonlynarrow",
            //    function() {
            //        if (typeof(window.taValidate) !== 'undefined') {
            //            window.taValidate();
            //            setTimeout(function() {
            //                refreshTripAdvisorLogoLink();
            //            }, 500);
            //        }
            //    });
        } else {
            $.getScript("https://www.tripadvisor.com/WidgetEmbed-cdsratingsonlynarrow",
                function() {
                    if (typeof(window.taValidate) !== 'undefined') {
                        window.taValidate();
                        setTimeout(function() {
                            refreshTripAdvisorLogoLink();
                        }, 500);    
                    }
                });
        }
    };

    var cancelRoomPricesRequests = function() {
        _.each(loadRoomPriceRequests,
            function(xhr, index) {
                if (xhr) {
                    xhr.abort();
                }
            });
    };

    var currentList = null;

    var loadRoomPrices = function (list) {

        if (list === null) {

            if (currentList === null) {
                return;
            }

            cancelRoomPricesRequests();

            list = currentList;
            list.find('.plp-resort-item').attr('data-price-loaded', 'false');
            list.find('.digex-pricing').removeClass('digex-pricing-available')
                .removeClass('digex-pricing-unavailable').addClass('digex-pricing-loading');

        } else {
            currentList = list;
        }

        if (!list) {
            return;
        }

        if (list.attr('data-show-prices') === 'false' && isOfferPage) {
            return;
        }


        var startDate = moment($j('#date-start-input').val(), 'MMMM DD, YYYY').toJSON();
        var endDate = moment($j('#date-end-input').val(), 'MMMM DD, YYYY').toJSON();


        var guests = $j('#plp-adult-input-1').val();
        var rooms = $j('#plp-room-input').val();

		var currLang = window.location.href.indexOf('fr-ca') != -1 ? 'fr-ca' : '';
		var prefix = currLang === 'fr-ca' ? '/fr-ca' : '';

        list.find('.plp-resort-item[data-price-loaded="false"]').each(function() {
            var hotelDiv = $(this);
            var hotelId = hotelDiv.data('hotel-id');

            hotelDiv.removeClass('property-pricing-available').removeClass('property-pricing-unavailable').removeClass('price-loaded').attr('data-price-loaded', 'false');

            var model = {
                hotelId: hotelId,
                rooms: rooms,
                guests: guests,
                startDate: startDate,
                endDate: endDate,
				currLang: currLang
            };

            var json = JSON.stringify(model);

         var xhr = $.ajax(
                    {
                        url: prefix + '/api/sitecore/RoomSelector/GetLowestRoomPriceBySearchCriteria'.toLowerCase(),
                        type: 'POST',
                        dataType: 'json',
                        data: json,
                        contentType: 'application/json; charset=utf-8',
                        async: true
                    }
                )
             .fail(function () {
                    console.log('/api/sitecore/RoomSelector/GetLowestRoomPriceBySearchCriteria not found.');
                })
                .done(function (data) {
                    if (data.price !== '') {

                        var divRoomPrice = hotelDiv.find('.digex-room-price');
                        var prefix = divRoomPrice.data('prefix');
                        var price = data.price;
                        if (prefix) {
                            price = prefix + ' ' + data.price;
                        }
                        hotelDiv.find('.digex-room-price').text(price);
                        hotelDiv.find('.digex-pricing-loading').removeClass('digex-pricing-loading').addClass('digex-pricing-available');

                        hotelDiv.addClass('price-loaded');
                        hotelDiv.attr('data-price-loaded', 'true');

                        hotelDiv.addClass('property-pricing-available');

                    } else {

                        hotelDiv.find('.digex-pricing-loading').removeClass('digex-pricing-loading').addClass('digex-pricing-unavailable');
                        hotelDiv.addClass('property-pricing-unavailable');

                        $j.each(markers,
                        function(index, value) {
                            if (value[0] === hotelId) {
                                value[1].setIcon(iconUnavailable);
                            }
                        });
                    }
                });

            loadRoomPriceRequests.push(xhr);

        });

    };

    var internalResetBookingBar = function () {
        bookingBar.data('item-id', '');
        bookingBar.data('item-type', '');
        bookingBar.data('item-title', '');
        bookingBar.trigger('reset');
    };

    var internalLoad = function (page, isRefresh) {
        if (urlHashParams !== null) {
            return;
        }

        if (!propertyList || propertyList.length === 0) {
            return;
        }

        if (propertyList.attr('data-static') === 'true') {

            propertyList.removeAttr('data-static');
            loadRoomPrices(propertyList);

            refreshTripAdvisorWidgets();

            if (propertyList.attr('data-has-more-records') === 'true') {
                lnkPropertyListLoadMore.show();
                pageIndex += 1;
            }

            return;
        }

        pageIndex = page;

        var selectedItemId = bookingBar.data('item-id');
        var selectedItemType = bookingBar.data('item-type');
        var selectedItemTitle = bookingBar.data('item-title');

        if (isOfferPage) {
            selectedItemId = null;
        }

        if (selectedItemId) {

            if (selectedItemType === 'City') {

                //selectedItemId = null;
                //selectedItemType = null;

                divSelectedFilters.find('.filter-tag[data-type="Hotel"],.filter-tag[data-type="Airport"]').remove();
                divSelectedFilters.find('.filter-tag[data-displayname="' + selectedItemTitle + '"]').remove();
                divSelectedFilters.find('.filter-tag[data-value=' + selectedItemId + ']').remove();

                var items = $('#filterDestinations').find('.filter-item input[data-displayname="' + selectedItemTitle + '"]');
                if (items.length > 0) {
                    items.prop('checked', true);
                    $('#filterDestinations').find('.apply-filter').trigger('click');
                    return;
                }
            } else {
                divSelectedFilters.find('.filter-tag[data-input]').remove();
                $('#filterDestinations').find('.filter-item input[type=checkbox]').prop('checked', false);
            }

            var $filterTag = $('<div />').addClass('filter-tag').attr('data-input', 'true')
                .attr('data-type', selectedItemType).attr('data-value', selectedItemId).attr('data-displayname', selectedItemTitle).text(selectedItemTitle);
            $filterTag.click(function () {
                var $this = $(this);
                $('#filterDestinations').find('.filter-item input[data-displayname="' + $this.data('displayname') + '"]').prop('checked', false);
                $this.remove();
                bookingBar.data('item-id', '');
                bookingBar.data('item-type', '');
                bookingBar.data('item-title', '');
                internalLoad(0);
                bookingBar.trigger('reset');
            });
            divSelectedFilters.prepend($filterTag);
        } else {
            selectedItemId = null;
        }

        divSelectedFilters.find('.filter-tag[data-type="City"]').remove();

        var selectedActivityTypes = [];
        var selectedPropertyTypes = [];
        var selectedLocations = [];
        var selectedCities = [];
        var selectedPropertyTypeNames = [];

        var isMap = $('#map-view').length >0;

        var selectedCityNames = [];

        if ($(window).width() < 768) {
            $('#filterPropertyTypes :checked, #filterInterests :checked, #filterDestinations :checked').each(function() {
                var chk = $(this);
                if (chk.data('type') === 'Property Type') {
                    selectedPropertyTypes.push(chk.val());
                    selectedPropertyTypeNames.push(chk.data('displayname'));
                } else if (chk.data('type') === 'Activity Type') {
                    selectedActivityTypes.push(chk.val());
                }
                else if (chk.data('type') === 'Location') {
                    selectedLocations.push(chk.val());
                }
            });

            divSelectedFilters.find('.filter-tag').each(function() {
                var tag = $(this);
                if (tag.data('type') === 'City') {
                    selectedLocations.push(tag.data('displayname'));
                    //selectedCities.push(tag.data('value'));
                    selectedCityNames.push(tag.data('displayname'));
                }
            });
        } else {
            divSelectedFilters.find('.filter-tag').each(function() {
                var tag = $(this);
                if (tag.data('type') === 'Property Type') {
                    selectedPropertyTypes.push(tag.data('value'));
                    selectedPropertyTypeNames.push(tag.data('displayname'));
                }
                else if (tag.data('type') === 'Activity Type') {
                    selectedActivityTypes.push(tag.data('value'));
                }
                else if (tag.data('type') === 'Location') {
                    selectedLocations.push(tag.data('value'));
                }
                else if (tag.data('type') === 'City') {
                    selectedLocations.push(tag.data('displayname'));
                    //selectedCities.push(tag.data('value'));
                    selectedCityNames.push(tag.data('displayname'));
                }
            });
        }

        if (selectedCities.length > 0 || selectedLocations.length > 0) {
            selectedItemId = null;
        }



        var pateTemplateName = propertyList.data('template-name');

        var model = {
            page: page,
            pageSize: pageSize,
            activityTypes: selectedActivityTypes,
            propertyTypes: selectedPropertyTypes,
            selectedItemId: selectedItemId,
            selectedItemType: selectedItemType,
            paginationByHotel: paginationByHotel,
            isMap: isMap,
            selectedItemTitle: selectedItemTitle,
            pageTemplateName: pateTemplateName,
            pageId: propertyList.data('page-id'),
            selectedLocations: selectedLocations,
            selectedCities: selectedCities
        };

        if (isRefresh && $('.destinations-page').length > 0 &&  selectedPropertyTypes.length === 0 && selectedLocations.length === 0 && selectedCities.length === 0) {
            return;
        }


        //console.log(selectedLocations);
        //console.log(selectedPropertyTypeNames);

        var urlParameters = {
            types: _.map(selectedPropertyTypeNames, function (name) { return name.toLowerCase(); }),
            locations: _.map(selectedLocations, function (name) {return name.toLowerCase();})
        };

        currentUrlHash = addParametersToUrlHash(urlParameters);

        var json = JSON.stringify(model);
        var divMapViewHeader = $('.map-view-header');

        var lnkFilterProperties = $('a.mobile-view-filters');
        var filtersCount = selectedActivityTypes.length + selectedPropertyTypes.length + selectedLocations.length;
        var lnkText = lnkFilterProperties.attr('title');

        if (selectedItemId !== null) {
            filtersCount += 1;
        }

        if (filtersCount > 0 || selectedItemId !== null) {
            lnkText = lnkFilterProperties.attr('title') + ' (' + filtersCount + ')';
            divMapViewHeader.addClass('has-selected-filters');
        } else {
            divMapViewHeader.removeClass('has-selected-filters');
        }

        lnkFilterProperties.find('span').text(lnkText);

        if ($('.plp-check-availability-container.open').length === 0 || $(window).width() >= 768 ) {
            showLoader();
        }

        $.ajax({
                url: '/api/sitecore/property/GetPropertyList'.toLowerCase(),
                type: 'POST',
                dataType: 'html',
                data: json,
                contentType: 'application/json; charset=utf-8'
            })
            .fail(function() {
                console.log('/api/sitecore/property/GetPropertyList not found.');
                hideLoader();
            })
            .done(function (data) {

                if (selectedPropertyTypes.length > 0 || selectedLocations.length > 0 || selectedCities.length > 0) {
                    $('.digex-callout-carousel').hide();
                    $('.plp-triptych-wrapper').hide();
                } else {
                    $('.digex-callout-carousel').show();
                    $('.plp-triptych-wrapper').show();
                }

                bookingBar.trigger('resetSearchResults');

                var displayOnlyCity = selectedCityNames.length + selectedLocations.length > 1;

                if (selectedCityNames.length > 0 || selectedLocations.length > 0) {

                    var cities = [];

                    _.each(selectedLocations,
                        function(city, index) {
                            if (displayOnlyCity) {
                                city = city.split(',')[0];
                            }
                            cities.push(city);
                        });

                    //_.each(selectedCityNames,
                    //    function(city, index) {
                    //        if (displayOnlyCity) {
                    //            city = city.split(',')[0];
                    //        }
                    //        cities.push(city);

                    //    });

                    cities = _.sortBy(cities);
                    var placeholder = cities.join(', ');

                    //bookingBar.trigger('reset');
                    bookingBar.trigger('resetPlaceholder', [placeholder]);
                } else if(selectedItemId === null) {
                    bookingBar.trigger('resetPlaceholder', ['']);
                }

                var hasMoreRecords = false;
                var jData = $(data);

                if (page === 0) {
                    propertyList.html('');
                    mapPropertyList.html('');
                }

                if (isMap) {

                    mapPropertyList.append(jData);
                    var hotels = mapPropertyList.find('div[data-hotel-id]');
                    refreshMap(hotels);


                    if ($(window).width() >= 768) {

                        if (selectedItemType === 'City') {
                            mapPropertyList.find('.plp-room-selector-heading').hide();
                        } else {
                            mapPropertyList.find('.plp-room-selector-heading').show();
                        }
                    }

                    if (selectedItemId === null) {
                        $('.map-view-list-header p').hide();
                    }

                } else {
                    var hidden = propertyList.find('#hiddenPropertyListHasMoreRecords');
                    hidden.remove();
                    propertyList.append(jData);

                    hidden = propertyList.find('#hiddenPropertyListHasMoreRecords');

                    if (hidden.length > 0) {
                        hasMoreRecords = hidden.val().toLocaleString().toLowerCase() === 'true';
                        hidden.remove();
                    }

                    removeDuplicateHeadings();

                    propertyList.find('.plp-slick').each(function() {
                        var slider = $(this);
                        if (!slider.hasClass('slick-initialized')) {
                            slider.slick({
                                accessibility: false,
                                centerMode: false,
                                mobileFirst: true,
                                slidesToShow: 1,
                                variableWidth: false,
                                responsive: [{
                                    breakpoint: 768,
                                    settings: {
                                        centerMode: false,
                                        variableWidth: false
                                    }

                                }]
                            });
                            slider.on('afterChange', function (event, slick, currentSlide) {
                                     
                                setTimeout(function() {
                                    refreshSlickDots(slick.$dots);
                                }, 250);
        
        
                            })
                            setTimeout(function() {
                                var slides = slider.find('.slick-slide ').not('.slick-cloned');
                               slides.each(function(){
                                    $(this).attr('role','group');
                                    var slideNumber =  parseInt($(this).attr('data-slick-index'))+1
                                    $(this).attr('aria-label','Slide '+ slideNumber + ' of ' + slides.length);
                                    });

                                refreshSlickDots(slider.find('.slick-dots'));
                            }, 250);
                        }
                    });

                    if (hasMoreRecords) {
                        lnkPropertyListLoadMore.show();
                    } else {
                        lnkPropertyListLoadMore.hide();
                    }



                    pageIndex += 1;
                    if (selectedCities.length + selectedLocations.length === 1) {
                        //propertyList.find('.plp-room-selector-heading').hide();
                        propertyList.addClass('hide-selector-heading');
                    } else {
                        //propertyList.find('.plp-room-selector-heading').show();
                        propertyList.removeClass('hide-selector-heading');
                    }
                }

                if (selectedItemId !== null || selectedLocations.length > 0 || selectedPropertyTypes.length > 0 || pateTemplateName === 'Destination Details') {
                    loadRoomPrices(isMap ? mapPropertyList : propertyList);
                }

                if (selectedActivityTypes.length > 0 || selectedPropertyTypes.length > 0 || selectedItemId !== null) {

                    if (selectedItemId !== null) {
                        descriptionSection.hide();
                        descriptionSearchInProgress.show();
                        searchResultsCaptionFilterByCitySingular.hide();
                        searchResultsCaptionFilterByCityPlural.hide();
                    } else {
                        descriptionSection.show();
                        descriptionSearchInProgress.hide();
                    }

                    if (selectedItemType === 'City') {
                        var count = 0;
                        if (isMap) {
                            count = mapPropertyList.find('.plp-resort-item').length;

                        } else {
                            count = propertyList.find('.plp-resort-item').length;
                        }

                        if (count > 1 || count === 0) {
                            searchResultsCaptionFilterByCityPlural.show();

                            var c = searchResultsCaptionFilterByCityPlural.data('caption');
                            c = c.replace('{0}', count);
                            c = c.replace('{1}', selectedItemTitle);
                            searchResultsCaptionFilterByCityPlural.text(c);
                        } else {
                            searchResultsCaptionFilterByCitySingular.show();

                            var caption = searchResultsCaptionFilterByCitySingular.data('caption');
                            caption = caption.replace('{0}', count);
                            caption = caption.replace('{1}', selectedItemTitle);
                            searchResultsCaptionFilterByCitySingular.text(caption);
                        }
                    }
                } else {
                    descriptionSection.show();
                    descriptionSearchInProgress.hide();
                }

                isInProgress = false;


                refreshTripAdvisorWidgets();
                //refresh with delay, because it may fail on the first try.
                setTimeout(function() {
                    refreshTripAdvisorWidgets();
                }, 3000);

                hideLoader();
                if(!isMap && page>0){
                    $($(jData).find('a.plp-resort-location')[0]).focus();
                }
            });
    };

    var moveDestinationToTheEnd = function(state) {
        var index = _.findIndex(destinations, { id: state });
        var destination = destinations[index];
        destinations.splice(index, 1);
        destinations.push(destination);
    };



    var internalInit = function() {
        propertyList = $('#propertyList');
        bookingBar = $('div[data-component="plp-check-availability"]');

        var search = function($this) {
            $this.text('').addClass('booking');
            var hotelId = $this.data('hotel-id');
            bookingBar.trigger('search', [hotelId]);
        };

        if (propertyList.length === 0) {
            return;
        }

        cancelRoomPricesRequests();

        isOfferPage = $('.template-brand-offer-page').length > 0;

        $(document).on('click', 'a',
            function () {
                cancelRoomPricesRequests();
            });

        if ($('.template-property-listing-page').length > 0 && $('.plp-page-edit-mode').length === 0) {
            //destinations page

            $(window).on('hashchange', function (e) {
                //console.log('currentUrlHash: ' + currentUrlHash);
                //console.log('window.location.hash: ' + window.location.hash);
                if (currentUrlHash !== window.location.hash) {
                    window.location.reload();
                    //console.log('reload');
                }
            } );

            var txt = $('#backButtonState');
            if (txt.val() === '0') {
                txt.val(1);
            } else {
                var time = (new Date()).getTime().toString();
                //window.location.href = window.location.href.replace(window.location.hash, '') + '?r=' + time + window.location.hash;
                window.location.href = window.location.href;
                window.location.reload();
                return;
            }
        }


        urlHashParams = getParametersFromUrlHash();
        //console.log(urlHashParams);

        $window = $(window);
        mapPropertyList = $('#mapPropertyList');

        divSelectedFilters = $('.plp-selected-filters');

        descriptionSection = $('.plp-section-description');
        descriptionSearchInProgress = $('.plp-section-description-search-in-progress');
        searchResultsCaptionFilterByCitySingular = $('.search-results-filter-by-city-singular');
        searchResultsCaptionFilterByCitySingular.data('caption', searchResultsCaptionFilterByCitySingular.text());
        searchResultsCaptionFilterByCityPlural = $('.search-results-filter-by-city-plural');
        searchResultsCaptionFilterByCityPlural.data('caption', searchResultsCaptionFilterByCityPlural.text());

        $('.book-section .plp-primary-cta').text($('#textSearch').val());



        var applyOffer = function ($this) {
            digex.offers.applyOffer($this);
        };

        mapPropertyList.on('click',
            'a[data-hotel-id]',
            function() {
                var $this = $(this);

                if ($this.data('flexible') === 'true' || $this.data('flexible')) {
                    $('#plp-flexible-dates').prop( 'checked', true );
                }
                setTimeout(function() {
                    search($this);
                }, 100);

            });

        propertyList.on('click',
            'a[data-hotel-id]',
            function () {
                var $this = $(this);

                if ($this.attr('data-is-offer') === 'true') {
                    applyOffer($this);
                    return;
                }

                if ($this.data('flexible') === 'true' || $this.data('flexible')) {
                    $('#plp-flexible-dates').prop( 'checked', true );
                }

                setTimeout(function() {
                    search($this);
                }, 100);
            });

        lnkPropertyListLoadMore = $('#lnkPropertyListLoadMore');
        lnkPropertyListLoadMore.hide();
        pageSize = propertyList.data('pagesize');
		
		if (propertyList.data('pagination-by-hotel')) {
			paginationByHotel = propertyList.data('pagination-by-hotel').toLowerCase() === 'true';
		}

        internalLoad(pageIndex);

        lnkPropertyListLoadMore.click(function() {
            lnkPropertyListLoadMore.hide();
            if (!isInProgress) {
                isInProgress = true;
                internalLoad(pageIndex);
            }
        });

        $('.plp-destinations-selector-wrapper').each(function() {

            var filterPropertyTypes = $('#filterPropertyTypes');
            var filterPropertyTypesBody = filterPropertyTypes.find('.filter-body-items');
            var filterPropertyTypeItemTemplate = filterPropertyTypesBody.find('div[data-template]').clone();
            filterPropertyTypesBody.find('.filter-item').remove();

            var filterInterests = $('#filterInterests');
            var filterInterestsBody = filterInterests.find('.filter-body-items');
            var filterInterestItemTemplate = filterInterestsBody.find('div[data-template]').clone();
            filterInterestsBody.find('.filter-item').remove();

            var filterDestinations = $('#filterDestinations');
            var filterDestinationsBody = filterDestinations.find('.filter-body-items');
            var filterDestinationItemTemplate = filterDestinationsBody.find('div[data-template]').clone();
            filterDestinationsBody.find('.filter-item').remove();


            $.get({
                    url: '/api/sitecore/property/getproperties',
                    cache: true
                }, {},
                function(data) {
                    searchResults = data;

                    _.each(searchResults,
                        function(el, index, list) {

                            el.state = el.state.trim();

                            var destinationIndex = _.findIndex(destinations, { id: el.mappedStateOrCountry });
                            var destination;
                            if (destinationIndex > -1) {
                                destination = destinations[destinationIndex];
                                if (destination.cities.indexOf(el.mappedCity) < 0) {
                                    destination.cities.push(el.mappedCity);
                                }

                            } else {
                                destination = { id: el.mappedStateOrCountry, cities: [el.mappedCity] };
                                destinations.push(destination);
                            }

                            _.each(el.activityTypes,
                                function(el, index, list) {
                                    var elIndex = _.findIndex(activityTypes, { id: el.id });
                                    if (elIndex < 0 || activityTypes.length === 0) {
                                        activityTypes.push(el);
                                    }
                                });

                            _.each(el.propertyTypes,
                                function(el, index, list) {
                                    var elIndex = _.findIndex(propertyTypes, { id: el.id });
                                    if (elIndex < 0 || propertyTypes.length === 0) {
                                        propertyTypes.push(el);
                                    }
                                });

                        });

                    activityTypes = _.sortBy(activityTypes, 'name');
                    propertyTypes = _.sortBy(propertyTypes, 'name');

                    _.each(propertyTypes,
                        function(el, index) {
                            var item = filterPropertyTypeItemTemplate.clone();
                            var id = 'propertyType-' + el.id;
                            item.find('input[type="checkbox"]').attr('value', el.id).attr('id', id)
                                .attr('data-displayname', el.name);
                            item.find('label').attr('for', id).text(el.name);
                            item.show();
                            filterPropertyTypesBody.append(item);
                        });

                    _.each(activityTypes,
                        function(el, index) {
                            var item = filterInterestItemTemplate.clone();
                            var id = 'activityType-' + el.id;
                            item.find('input[type="checkbox"]').attr('value', el.id).attr('id', id)
                                .attr('data-displayname', el.name);
                            item.find('label').attr('for', id).text(el.name);
                            item.show();
                            filterInterestsBody.append(item);
                        });

                    destinations = _.sortBy(destinations, 'id');
                    moveDestinationToTheEnd('Canada');
                    moveDestinationToTheEnd('Mexico');

                    var index = 0;

                    _.each(destinations, function (el, elIndex) {

                        var h3 = $('<h3/>');
                        h3.html(el.id);
                        filterDestinationsBody.append(h3);

                        el.cities = _.sortBy(el.cities);

                        _.each(el.cities,
                            function (city, cityIndex) {

                                var item = filterDestinationItemTemplate.clone();

                                var id = 'destination-' + index;
                                item.find('input[type="checkbox"]').attr('value', city + ', ' + el.id).attr('id', id).attr('data-displayname', city + ', ' + el.id);
                                item.find('label').attr('for', id).text(city);
                                item.show();

                                filterDestinationsBody.append(item);

                                index += 1;

                            });
                    });


                    if (urlHashParams) {
                        if (urlHashParams.types) {
                            _.each(urlHashParams.types,
                                function (type, index) {

                                    filterPropertyTypesBody.find('input[type="checkbox"]').each(function (index, el) {

                                        var $this = $(el);
                                        var displayName = $this.data('displayname').toLowerCase();

                                        if (type === displayName) {
                                            $this.prop('checked', true);
                                        }
                                    });
                                });
                        }

                        if (urlHashParams.locations) {
                            _.each(urlHashParams.locations,
                                function (location, index) {

                                    filterDestinationsBody.find('input[type="checkbox"]').each(function (index, el) {

                                        var $this = $(el);
                                        var displayName = $this.data('displayname').toLowerCase();

                                        if (location === displayName) {
                                            $this.prop('checked', true);
                                        }
                                    });
                                });
                        }


                        if (urlHashParams.state && !urlHashParams.types && !urlHashParams.locations) {
                            var state = urlHashParams.state.toLowerCase();

                            filterDestinationsBody.find('input[type="checkbox"]').each(function (index, el) {

                                        var $this = $(el);
                                        var displayName = $this.data('displayname').toLowerCase();

                                        if (displayName.includes(state)) {
                                            $this.prop('checked', true);
                                        }
                                    });
                        }

                        urlHashParams = null;

                        if ($(window).width() >= 768) {
                            filterPropertyTypes.find('.apply-filter').trigger('click', [true]);
                            filterDestinations.find('.apply-filter').trigger('click');
                        } else {
                            $('.plp-filter-mobile-apply button').trigger('click');
                        }
                    }
                }
            );
        });
    };

    var showLoader = function() {
        // $j('[data-component="loading"]').show();
    };


    var hideLoader = function() {
        $j('body').removeClass('blurred');
        $j('[data-component="loading"]').hide();
    };

    var initMapInternal = function () {

        var googleMap = $j('#googleMap');

        if (googleMap.length === 0) {

            internalInit();
            return;
        }

        $('#map-view').on('click', '.plp-room-selector-content-container .close-dropdown', function () {

            $(this).parents('.plp-room-selector-map-list').hide();
            resetMarkers();
        });

        $('a[href="#map-view"]').click(function(e) {
            e.preventDefault();
            e.stopPropagation();
            $('#map-view').modal({ escapeClose: false });
        });

        if ($(window).width() < 1024) {
            $j('.plp-room-selector-map-list').hide();
        }

        $j('.plp-resort-overview.map-item').click(function() {
            var $resort = $j(this);
            var resortid = $resort.data('resortid');

            if ($resort.prev().hasClass('plp-resort-location')) {
                $resort = $resort.prev();
            }

            mapSelectResort($resort, resortid);
        });

        $j('#map-view').on($j.modal.BEFORE_OPEN,
            function(event, modal) {
                $j('body').attr('data-map-view', 'true').addClass('is-on-map-view');
                $j('#map-resort-filter').append($j('[data-component="resort-filter"]'));
                digex.destinations.load(0);
            });

        var locations = {
            states: [{
                    state: 'Arizona',
                    resorts: [{
                            id: 0,
                            city: 'Scottsdale',
                            name: 'OMNI Scottsdale Montelucia Resort & Spa',
                            lat: 33.531048,
                            lng: -111.97303,
                            available: true
                        },
                        {
                            id: 1,
                            city: 'Tuscon',
                            name: 'OMNI Tuscon National Resort',
                            lat: 32.3582015,
                            lng: -111.0255447,
                            available: true
                        }
                    ]
                },
                {
                    state: 'California',
                    resorts: [{
                            id: 2,
                            city: 'Los Angeles',
                            name: 'OMNI Los Angeles Hotel at California Plaza',
                            lat: 34.0525817,
                            lng: -118.2505492,
                            available: true
                        },
                        {
                            id: 3,
                            city: 'Palm Springs',
                            name: 'OMNI Rancho Las Palmos Resort & Spa',
                            lat: 33.7422693,
                            lng: -116.409223,
                            available: true
                        },
                        {
                            id: 4,
                            city: 'Carlsbad',
                            name: 'OMNI La Costa Resort & Spa',
                            lat: 33.0919488,
                            lng: -117.2687745,
                            available: false
                        },
                        {
                            id: 5,
                            city: 'San Diego',
                            name: 'OMNI San Diego Hotel',
                            lat: 32.7069318,
                            lng: -117.1586832,
                            available: true
                        },
                        {
                            id: 6,
                            city: 'San Francisco',
                            name: 'OMNI San Francisco Hotel',
                            lat: 37.7931274,
                            lng: -122.4052895,
                            available: true
                        }
                    ]
                }
            ]
        };

        GoogleMapsLoader.KEY = googleMap.data('key');
        GoogleMapsLoader.VERSION = 'quarterly';
        GoogleMapsLoader.load(function (google) {

            


            iconMarker = { url: '/assets/css/img/map-icon-marker.png',   anchor: new google.maps.Point(28, 28),
                scaledSize: new google.maps.Size(56, 56) },
                iconSelected = { url: '/assets/css/img/map-icon-selected.png',    anchor: new google.maps.Point(28, 28),
                scaledSize: new google.maps.Size(56, 56) },
                iconUnavailable = { url: '/assets/css/img/map-icon-unavailable.png',    anchor: new google.maps.Point(28, 28),
                scaledSize: new google.maps.Size(56, 56) };


            bounds = new google.maps.LatLngBounds();
            infowindow = new google.maps.InfoWindow();

            window.map = new google.maps.Map(document.getElementById('googleMap'), {
                zoom: 3,
                mapTypeId: google.maps.MapTypeId.ROADMAP
            });

            $j.each(locations.states, function(index, location) {
                $j.each(location.resorts, function(resortIndex, resort) {
                    addMarker(resort);
                });
            });

            var map = window.map;
            map.fitBounds(bounds);

            var listener = google.maps.event.addListener(map, "idle", function() {
                map.setZoom(6);
                google.maps.event.removeListener(listener);
            });


            internalInit();
        });
    };

    return {
        resetBookingBar: function() {
            internalResetBookingBar();
        },
        init: function() {
            initMapInternal();
            
        },
        load: function () {
            internalLoad(0);
        },
        getMarkers: function() {
            return markers;
        },
        refreshTripAdvisorLogoLink: function() {
            refreshTripAdvisorLogoLink();
        },
        refresh: function() {
             internalLoad(0, true);
        },
        refreshPrices: function() {
            loadRoomPrices(null);
        },
        refreshTripAdvisorWidgets: function() {
            refreshTripAdvisorWidgets();
        }
    };

})(window, jQuery);


(function(window, $) {
    $(function() {
        digex.destinations.init();
        digex.destinations.refreshTripAdvisorWidgets();

        setTimeout(function () {
            digex.destinations.refreshTripAdvisorWidgets();
        }, 5000);
    });
})(window, jQuery);

(function(window, $) {
    // Select all links with hashes
$('a[href*="#"]')
  // Remove links that don't actually link to anything
  .not('[href="#"]')
  .not('[href="#0"]')
  .click(function(event) {
    // On-page links
    if (
      location.pathname.replace(/^\//, '') == this.pathname.replace(/^\//, '') 
      && 
      location.hostname == this.hostname
    ) {
      // Figure out element to scroll to
      var target = $(this.hash);
      target = target.length ? target : $('[name=' + this.hash.slice(1) + ']');
      // Does a scroll target exist?
      if (target.length) {
        // Only prevent default if animation is actually gonna happen
        event.preventDefault();
        $('html, body').animate({
          scrollTop: target.offset().top
        }, 1000, function() {
          // Callback after animation
          // Must change focus!
          var $target = $(target);
          $target.focus();
          if ($target.is(":focus")) { // Checking if the target was focused
            return false;
          } else {
            $target.attr('tabindex','-1'); // Adding tabindex for elements not focusable
            $target.focus(); // Set focus again
          };
        });
      }
    }
  });
})(window, jQuery);

// GA4
(function (window, $) {
    $(function () {
        
        $('.digex-nav-component, .digex-subnav-links-wrapper, .plp-nav-component, .plp-subnav-component, .plp-footer-container').click(function (e) {
            var target = $(e.target);
            if (target.is("a")) {
                component_ancestry = '';
                try {
                    component_ancestry = target.closest("[id]").attr('id');
                } catch (err) {
                    console.log('no component_ancestry');
                }

                identifier = target.text();
                link_url = target.attr('href');

                region_ancestry = 'unknown';
                try {
                    region_ancestry = target.closest("[data-component]").attr('data-component');
                } catch (err) {
                    console.log('no data-component');
                }
                navLinkClicked(component_ancestry, identifier, link_url, region_ancestry);
            }
        });
         // btn - 112922 - removed .link-360, .vmlink
        $('.digex-primary-cta, .btn-add-to-rfp').click(function (e) {
            category = 'Internal Conversion Link';
            //find parent "data-component"
            component_ancestry = '';
            try {
                component_ancestry = $(this).closest("[data-component]").attr('data-component');
            } catch (err) {
                console.log('no data-component');
            }
            identifier = $(this).text();
            region_ancestry = 'unknown';
            try {
                region_ancestry = $(this).closest("[id]").attr('id');
            } catch (err) {
                console.log('no region');
            }
            offer_title = '';
            try {
                offer_title = $(this).attr('data-offer-title');
                if (jQuery.trim(offer_title).length !== 0) {
                    category = offer_title;
                    console.log('cat set to offer_title [' + category + ']');
                }
            } catch (err) {
                console.log('no offer_title');
            }
            cta(category, component_ancestry, identifier, region_ancestry);
        });
        // GTM
        $('a.tel_link').click(function () {
            var $telDesc = jQuery(this).parent().find('.tel_desc').html();
            if ($telDesc === undefined) {
                $parent = jQuery(this).parent();
                $prev = $parent.prev();
                if ($prev.hasClass('tel_desc')) {
                    $telDesc = $prev.html();
                }
            }
            if ($telDesc === undefined) {
                $telDesc = 'Phone';
            }
            dataLayer.push({
                'event': 'Phone Number Click',
                'event Category': 'Phone Call',
                'eventAction': 'Phone Call',
                'event Label': $telDesc + ' - ' + jQuery(this).attr('href').split(':')[1]
            });
            //console.log('dataLayer: ' + JSON.stringify(dataLayer));
        });
        // btn - 112922 - removed .bookTee, .icims
        /*
        $('.btn').click(function (e) {
            var href = $(this).attr('href');
            if (href === undefined) { return; }
            if (href.startsWith("http") && href.indexOf('www.omnihotels.com') === -1) {
                category = 'External Tools';
                //find parent "data-component"
                component_ancestry = 'unknown';
                try {
                    component_ancestry = $(this).closest("[data-component]").attr('data-component');
                } catch (err) {
                    console.log('no data-component');
                }

                identifier = $(this).text();
                region_ancestry = 'unknown';
                try {
                    region_ancestry = $(this).closest("[id]").attr('id');
                } catch (err) {
                    console.log('no region');
                }
                
                cta(category, component_ancestry, identifier, region_ancestry);
            } else {
                console.log('btn - ' + href);
            }
        });
        */
        $('.things-todo-link, .btn3').click(function (e) {
            // These might be links, check to see if they are docs or not
            var item_url = $j(this).attr('href');
            var file_name = item_url.substring(item_url.lastIndexOf('/') + 1);
            var file_type = file_name.substring(file_name.lastIndexOf('.') + 1);
            var re = "\.(doc|docx|pdf|xls|xlsx)$";
            if (item_url.match(re)) {
                // console.log("Valid");
            } else {
                console.log("not a doc type " + item_url);
                if (item_url.indexOf('pdfs') !== -1) {
                    file_type = 'pdf';
                } else {
                    return;
                }
            }
            var item_name = $j(this).text();
            var ident = $j(this).attr('id');
            if (ident === undefined || ident === '') {
                ident = file_name;
            }
            fileDownload(file_type, item_name, ident);
        });
        $('.icon-pdf').click(function (e) {
            var item_url = $j(this).attr('href');
            var file_name = item_url.substring(item_url.lastIndexOf('/') + 1);
            var file_type = file_name.substring(file_name.lastIndexOf('.') + 1);
            var item_name = $j(this).text();
            var ident = $j(this).attr('id');
            if (ident === undefined || ident === '') {
                ident = item_url;
            }
            fileDownload(file_type, item_name, ident);
        });
        $('.pdf-download, .print').click(function (e) {
            var item_url = $j(this).attr('href');
            var file_name = item_url.substring(item_url.lastIndexOf('/') + 1);
            var file_type = 'pdf';
            var item_name = $j(this).text();
            var ident = $j(this).attr('id');
            if (ident === undefined || ident === '') {
                ident = file_name;
            }
            fileDownload(file_type, item_name, ident);
        });
        $('.youtube-link').click(function (e) { social('youtube'); });
        $('.facebook-link').click(function (e) { social('facebook'); });
        $('.twitter-link').click(function (e) { social('twitter'); });
        $('.pinterest-link').click(function (e) { social('pinterest'); });
        $('.instagram-link').click(function (e) { social('instagram'); });
        $('.glassdoor-link').click(function (e) { social('glassdoor'); });

        $(".link-360, .vmlink").click(function (e) {
            viewInterstitial("Visiting Media 360 Tour");
        });
        $(".view-details").click(function (e) {
            viewInterstitial("View Details for Venue");
        });
        $('#select-guest-submit').one('click', function () {
            userSubscribed('Select Guest');
        });
    });
})(window, jQuery);

function fileDownload(ex, name, ident) {
    window.dataLayer = window.dataLayer || [];
    dataLayer.push({ event_data: null });  // Clear the previous event_data object.
    dataLayer.push({
        "event": "file_download",
        "detailed_event": "Download Link Clicked",
        "event_data": {
            "file_extension": ex,
            "file_name": name,
            "identifier": ident
        }
    });
    console.log('file_download ' + ex + '|' + name + '|' + ident);
}

function social(method) {
    window.dataLayer = window.dataLayer || [];
    dataLayer.push({ event_data: null });  // Clear the previous event_data object.
    dataLayer.push({
        "event": "subscribe",
        "detailed_event": "Social Brand Followed",
        "event_data": {
            "method": method
        }
    });
    console.log('social ' + method);
}

function userSubscribeStart() {
    window.dataLayer = window.dataLayer || [];
    dataLayer.push({
        "event": "subscribe_start",
    "detailed_event": "User Subscription Started"
    });
    console.log('userSubscribeStart');
}

function userSubscribed(type) {
    window.dataLayer = window.dataLayer || [];
    dataLayer.push({ event_data: null });  // Clear the previous event_data object.
    dataLayer.push({
        "event": "subscribe",
        "detailed_event": "User Subscribed",
        "event_data": {
            "type": type
        }
    });
    console.log('userSubscribed ' + type);
}

function viewInterstitial(type) {
    window.dataLayer = window.dataLayer || [];
    dataLayer.push({ event_data: null });  // Clear the previous event_data object.
    dataLayer.push({
        "event": "view_interstitial",
        "detailed_event": "Interstitial Viewed",
        "event_data": {
            "type": type
        }
    });
    console.log('view_interstitial ' + type);
}
function cta_gather(el) {
    category = 'Internal Conversion Link';
    //find parent "data-component"
    component_ancestry = '';
    try {
        component_ancestry = jQuery(el).closest("[data-component]").attr('data-component');
    } catch (err) {
        console.log('no data-component');
    }
    identifier = jQuery(el).text();
    region_ancestry = 'unknown';
    try {
        region_ancestry = jQuery(el).closest("[id]").attr('id');
    } catch (err) {
        console.log('no region');
    }
    offer_title = '';
    try {
        offer_title = jQuery(el).attr('data-offer-title');
        if (jQuery.trim(offer_title).length !== 0) {
            category = offer_title;
            console.log('cat set to offer_title [' + category + ']');
        }
    } catch (err) {
        console.log('no offer_title');
    }
    cta(category, component_ancestry, identifier, region_ancestry);
}

function cta(category, component_ancestry, identifier, region_ancestry) {
    if (component_ancestry === undefined) {
        component_ancestry = 'unknown';
    }
    if (region_ancestry === undefined) {
        region_ancestry = 'unknown';
    }
    if (identifier !== undefined) {
        identifier = identifier.replace(/[{}]/g, "");
    }
    window.dataLayer = window.dataLayer || [];
    dataLayer.push({ event_data: null });  // Clear the previous event_data object.
    dataLayer.push({
        "event": "click",
        "detailed_event": "CTA Link Clicked",
        "event_data": {
            "category": category,
            "component_ancestry": component_ancestry,
            "identifier": identifier,
            "region_ancestry": region_ancestry
        }
    });
    console.log('cta ' + category + "," + component_ancestry + "," + identifier + "," + region_ancestry);
}

function navLinkClicked(component_ancestry, identifier, link_url, region_ancestry) {
    window.dataLayer = window.dataLayer || [];
    dataLayer.push({ event_data: null });  // Clear the previous event_data object.
    dataLayer.push({
        "event": "click",
        "detailed_event": "Navigation Link Clicked",
        "event_data": {
            "component_ancestry": component_ancestry,
            "identifier": identifier,
            "link_url": link_url,
            "region_ancestry": region_ancestry
        }
    });
    console.log('navLinkClick ' + component_ancestry + "," + identifier + "," + link_url + "," + region_ancestry);
}

var digex = digex || {};
digex.glp = (function (window, $) {
    $j = $;

    var dateFormat = 'YYYY-MM-DD';
    var momentStartDate = null, momentEndDate = null;

    // these text variables will be initialized from the backend in the code below
    var textCheckIn = 'Check In';
    var textCheckOut = 'Check Out';
    var textNights = 'nights';
    var textNight = 'night';
    var textCallProperty;
    var textContactUs;
    var textChooseRoom;
    var lnkChooseRoom;
    var bookingBar;

    var initCaptions = function(calendar) {
        textCheckIn = calendar.attr('data-text-check-in');
            if (!textCheckIn) {
                textCheckIn = 'Check In';
            }
            textCheckOut = calendar.attr('data-text-check-out');
            if (!textCheckOut) {
                textCheckOut = 'Check Out';
            }

            textNights = calendar.attr('data-text-nights');
            if (!textNights) {
                textNights = 'nights';
            }

            textNight = calendar.attr('data-text-night');
            if (!textNight) {
                textNight = 'night';
            }
    }

    var getNumberOfDays = function (start, end) {
        var startDate = moment(start.data('date'), dateFormat);
        var endDate = moment(end.data('date'), dateFormat);
        var numberOfDays = endDate.diff(startDate, 'days');

        return numberOfDays;
    }

    function isTouchDevice() {

        var prefixes = ' -webkit- -moz- -o- -ms- '.split(' ');

        var mq = function (query) {
            return window.matchMedia(query).matches;
        }

        if (('ontouchstart' in window) || window.DocumentTouch && document instanceof DocumentTouch) {
            return true;
        }

        // include the 'heartz' as a way to have a non matching MQ to help terminate the join
        // https://git.io/vznFH
        var query = ['(', prefixes.join('touch-enabled),('), 'heartz', ')'].join('');
        return mq(query);
    }


    function validateSelectedDates(startDate, endDate) {

        if (!lnkChooseRoom) {
            return;
        }


        $('.calendar-glp table.calendar').each(function () {
            var calendar = $(this);
            var includesUnavailableDate = false;

            calendar.find('.calendar-date').each(function () {
                var calendarDate = $(this);
                var date = moment(calendarDate.data('date'), dateFormat);


                if (!date.isSame(startDate) && !date.isSame(endDate) && date >= startDate && date <= endDate) {
                    if (calendarDate.hasClass('not-available')) {
                        includesUnavailableDate = true;
                    }
                }
            });

            if (includesUnavailableDate) {
                lnkChooseRoom.text(textContactUs);
                lnkChooseRoom.addClass('not-available');

                bookingBar.trigger('disableBook');
            } else {
                lnkChooseRoom.text(textChooseRoom);
                lnkChooseRoom.removeClass('not-available');
                if (lnkChooseRoom.hasClass('tooltipstered')) {
                    lnkChooseRoom.tooltipster('destroy');
                }

                bookingBar.trigger('enableBook');
            }
        });
    }

    $(function () {

        var btnLessMoreDescription = $('.glp-expand-description');
        btnLessMoreDescription.hide();

        if (window.innerWidth >= 768) {
            window.setTimeout(function () {
                var rightColumnHeight = $j('.glp-hero-container .right-column').height();
                var leftColumnHeight = $j('.glp-hero-container .left-column').height();

                var descriptionHeight = $j('.glp-expandable-description').height();

                if (leftColumnHeight > rightColumnHeight && descriptionHeight > 120) {
                    btnLessMoreDescription.show();
                    $j('.glp-expandable-description').addClass('glp-hide-overflow');
                    $j('.glp-expandable-description').attr('aria-expanded', false);
                    $j('.glp-description-wrapper .glp-expand-description').on('click', function () {
                        $this = $(this);
                        if ($this.hasClass('show-all')) {
                            $this.removeClass('show-all');
                            $j('.glp-hide-overflow').removeClass('expanded');
                            $j('.glp-expandable-description').attr('aria-expanded', false);
                            $this.text($this.data('more-text'));
                        }
                        else {
                            $this.addClass('show-all');
                            $j('.glp-hide-overflow').addClass('expanded');
                            $j('.glp-expandable-description').attr('aria-expanded', true);
                            $this.text($this.data('less-text'));
                        }
                    });
                }
            }, 500);
        }

        $('.template-group-landing-page .package-details-wrapper').each(function () {
            var $this = $(this);

            if (!$this.find('.right-column').html().trim()) {
                $this.addClass('no-right-column');
            }

        });

        if ($('.template-group-landing-page').length === 0) {
            return;
        }

        $('.calendar-info-selected-days .section-with-caption[data-tooltip]').each(function () {
            var $this = $(this);
            $this.tooltipster({
                onlyOne: true,
                content: $this.attr('data-tooltip'),
                trigger: 'custom',
                triggerOpen: {
                    click: true,
                    tap: true,
                    //mouseenter:true
                },
                triggerClose: {
                    mouseleave: true,
                    originClick: true,
                    touchleave: true
                }
            });
        });

        lnkChooseRoom = $('.calendar-glp a[data-is-glp="true"]');

        textCallProperty = lnkChooseRoom.attr('data-text-call-property');
        textContactUs = lnkChooseRoom.attr('data-text-contact-us');
        textChooseRoom = lnkChooseRoom.text();

        var $document = $(document);
        bookingBar = $('[data-component="plp-check-availability"]');
        var calendar = $('.calendar-container .calendar');

        var txt = bookingBar.find('[name="plp-adult-input-1"]');

        var scrollTo = function (selector) {
            selector = selector.replace('#', '');
            var tag = $('a[name="' + selector + '"]');
            $document.scrollTop(tag.offset().top - 135);
        };

        var lnkMakeReservation = null;

        var initLnkMakeReservation = function () {
            if (lnkMakeReservation === null) {
                lnkMakeReservation = $('a[data-is-glp="true"]').first();
            }
        }

        var currentLoadRoomPricesRequest = null;

        var calendarClearSelection = function () {
            calendar.find(".calendar-date").removeClass("start-date").removeClass("end-date").removeClass("active");
        }

        var showPrices = function() {
            calendar.find('.calendar-date').each(function () {
                    var calendarDate = $(this);

                    if (!calendarDate.hasClass('calendar-last-date')) {
                        calendarDate.find('.price-container').show();
                    } 
                });
        }

        var loadRoomPrices = function (bookingModel) {

            if (currentLoadRoomPricesRequest != null) {
                currentLoadRoomPricesRequest.abort();
            }

            initLnkMakeReservation();

            if (lnkMakeReservation === null || lnkMakeReservation.length === 0) {
                return;
            }

            var startDate = moment(lnkMakeReservation.attr('data-min-date'), dateFormat);
            var endDate = moment(lnkMakeReservation.attr('data-max-date'), dateFormat);

            var groupLandingPageId = lnkMakeReservation.attr('data-page-id');
            var groupCode = lnkMakeReservation.attr('data-code');
            var chainCode = lnkMakeReservation.attr('data-chain-code');
            var propertyCode = lnkMakeReservation.attr('data-property-code');

            var textNotAvailable = lnkMakeReservation.attr('data-text-not-available');

            var guests = 0;

            if (bookingModel.Room1AdultQuantity !== '') {
                guests += parseInt(bookingModel.Room1AdultQuantity);
            }

            if (bookingModel.Room2AdultQuantity !== '') {
                guests += parseInt(bookingModel.Room2AdultQuantity);
            }

            if (bookingModel.Room3AdultQuantity !== '') {
                guests += parseInt(bookingModel.Room3AdultQuantity);
            }

            var model = {
                groupLandingPageId: groupLandingPageId,
                groupCode: groupCode,
                chainCode: chainCode,
                propertyCode: propertyCode,
                rooms: bookingModel.RoomQuantity,
                guests: guests,
                startDate: startDate.format('MM-DD-YYYY'),
                endDate: endDate.format('MM-DD-YYYY')
            };

            var shouldLoadPricesFromOpera = calendar.data('override') === 'false' || calendar.data('override') === false;

            if (shouldLoadPricesFromOpera) {
                var json = JSON.stringify(model);

                calendar.addClass('loading-prices');
                calendar.find('.calendar-date.active').removeClass('active').removeClass('start-date')
                    .removeClass('end-date');

                currentLoadRoomPricesRequest = $.ajax({
                        url: '/api/sitecore/GroupLandingPage/GetRoomPrices'.toLowerCase(),
                        type: 'POST',
                        dataType: 'json',
                        data: json,
                        contentType: 'application/json; charset=utf-8'
                    }).done(function(result) {

                        calendar.removeClass('loading-prices');

                        if (result.success) {
                            $.each(result.prices,
                                function(i, price) {
                                    if (price && price.Price) {
                                        var calendarDate =
                                            calendar.find('.calendar-date[data-date="' + price.DateAsString + '"]');

                                        // just for testing   
                                        /*if (price.DateAsString === '2020-12-30' || price.DateAsString === '2021-01-01') {
                                            price.Price = '-';
                                        }*/

                                        if (price.Price !== '-') {
                                            calendarDate.find('.price span').html(price.Price);
                                        } else {
                                            calendarDate.find('.price-container').html(textNotAvailable);
                                            calendarDate.addClass('not-available');
                                        }

                                        if (!calendarDate.hasClass('calendar-last-date')) {
                                            calendarDate.find('.price-container').show();
                                        }
                                    }
                                });

                            validateSelectedDates(startDate, endDate);

                            if (result.isLocalPrices) {

                                // do not remove this console.log below:
                                console.log('Rate Source: Fallback to Stored OWS Rates');

                            } else {
                                // do not remove this console.log below:
                                console.log('Rate Source: OWS');
                            }
                            
                        } else {
                            console.log('GetRoomPrices error: ' + result.error);
                            console.log('Room Prices API call has failed. Rate Source: Event Accommodations');
                            calendar.removeClass('loading-prices');
                            showPrices();
                        }
                    })
                    .always(function() {
                        calendar.removeClass('loading-prices');
                    });;
            } else {

                // do not remove this console.log below:
                console.log('Rate Source: Event Accommodations');
                showPrices();
            }
        }

        bookingBar.on('model-updated',
            function (e, message, value) {
                var model = digex.booking.get();

                if (message === 'set-guest-detail' || message === 'set-room-detail') {
                    loadRoomPrices(model);
                }

            });

        setTimeout(function () {
            if (window.location.href.indexOf('/meetings/') > -1) {
                txt.val('1');
                bookingBar.trigger('updateTotals', [txt]);
            } else {
                bookingBar.trigger('updateTotals', [txt]);
            }
        },
            500);



        var applyGroupCode = function () {
            initLnkMakeReservation();

            if (lnkMakeReservation === null || lnkMakeReservation.length === 0) {
                return;
            }

            bookingBar.trigger('applyGroupCode', [lnkMakeReservation, true, false]);
            bookingBar.trigger('disableSearch');

            var momentStartDate = moment(lnkMakeReservation.data('event-start-date'), dateFormat);
            var momentEndDate = moment(lnkMakeReservation.data('event-end-date'), dateFormat);

            var rawMinDate = lnkMakeReservation.data('min-date');
            var rawMaxDate = lnkMakeReservation.data('max-date');

            bookingBar.attr('data-min-date', rawMinDate);
            bookingBar.attr('data-max-date', rawMaxDate);
            bookingBar.attr('data-is-group-uses-a-master-bill', lnkMakeReservation.attr('data-is-group-uses-a-master-bill'));

            digex.booking.initDates(momentStartDate, momentEndDate);
            digex.calendar.init();
            calendarClearSelection();
        }

        applyGroupCode();

        $('a[data-is-glp="true"]').click(function (e) {
            var $this = $(this);
            if ($this.hasClass('not-available')) {
                e.preventDefault();
                $this.tooltipster({
                    content: textCallProperty,
                    contentCloning: false,
                    contentAsHTML: true,
                    interactive: true,
                    trigger: 'custom',
                    triggerOpen: {
                        click: true,
                        tap: true,
                        //mouseenter:true
                    },
                    triggerClose: {
                        mouseleave: true,
                        originClick: true,
                        touchleave: true
                    }

                });
                $this.tooltipster('open');
            } else if (!$this.attr('data-scroll-to-calendar')) {
                e.preventDefault();
                $this.addClass('busy');
                bookingBar.trigger('bookOnly');
            }
        });

        $('a[href^="#"]').click(function (e) {

            var hash = $(this).attr('href');

            if (hash !== '#') {
                e.preventDefault();
                e.stopPropagation();
                window.location.hash = hash;
                scrollTo(hash);
            }
        });

        if (window.location.hash) {
            setTimeout(function () {
                scrollTo(window.location.hash);
            }, 500);
        }

        if ($j('.glp-carousel-item').length >= 2) {

            $j(".glp-carousel-controls").addClass('active');

            $j('.glp-carousel').slick({
                dots: true,
                mobileFirst: true,
                appendDots: $(".slide-m-dots"),
                prevArrow: $j('.prev-arrow'),
                nextArrow: $j('.next-arrow'),
                slidesToShow: 1,
                slidesToScroll: 1
            });
        }

        $('.calendar-glp .rooms-section').click(function () {
            bookingBar.trigger('openRooms');
        });

        var currentSelectionStartDate = null;



        $('table.calendar').each(function () {

            calendar = $(this);

            initCaptions(calendar);

            var dates = calendar.find('.calendar-date');
            dates.last().addClass('calendar-last-date');

            var isCheckedIn = false;

            var updateTooltip = function ($currentDate) {

                dates.each(function () {
                    var $d = $(this);
                    $d.removeClass('hide-price');
                    $d.tooltipster('close');
                });

                var tooltipContent = textCheckIn;
                var numberOfDays;

                var isCheckedInValid = isCheckedIn;

                if (isCheckedInValid) {
                    numberOfDays = getNumberOfDays(currentSelectionStartDate, $currentDate);
                    if (numberOfDays < 1) {
                        isCheckedInValid = false;
                    }
                }

                if (isCheckedInValid) {
                    tooltipContent = textCheckOut;
                    numberOfDays = getNumberOfDays(currentSelectionStartDate, $currentDate);
                    var textNumberOfNights = numberOfDays + ' ' + (numberOfDays > 1 ? textNights : textNight);
                    tooltipContent = tooltipContent + ' (' + textNumberOfNights + ')';
                    $currentDate.addClass('hide-price');
                }

                $currentDate.tooltipster('content', tooltipContent).tooltipster('open');
            }

            calendar.find(".calendar-date")
                .mouseover(function () {

                    if (isTouchDevice() === true) {
                        return;
                    }

                    var $currentDate = $(this);
                    updateTooltip($currentDate);

                })
                .mouseout(function () {

                    if (isTouchDevice() === true) {
                        return;
                    }

                    var $d = $(this);
                    $d.removeClass('hide-price');
                    $d.tooltipster('close');
                })
                .tooltipster({
                    animationDuration: 0,
                    zIndex: 1,
                    trigger: 'custom'
                });

            var clearSelection = function () {
                calendar.find(".calendar-date").removeClass("start-date").removeClass("end-date").removeClass("active");
            }

            calendar.find(".calendar-date").on("click", function (e) {

                var $thisDate = $(this);

                if (isCheckedIn) {
                    var numberOfDays = getNumberOfDays(currentSelectionStartDate, $thisDate);
                    if (numberOfDays < 1) {
                        isCheckedIn = false;
                    }
                }

                if (isTouchDevice()) {
                    updateTooltip($thisDate);
                }

                if (isCheckedIn) {
                    isCheckedIn = false;
                } else {
                    clearSelection();
                    isCheckedIn = true;
                    currentSelectionStartDate = $thisDate;
                }

                dates.removeClass('calendar-date-mouseover');

                if ($thisDate.hasClass('active')) {
                    clearSelection();
                };

                $thisDate.addClass("active");

                var selectedDates = calendar.find(".calendar-date.active");
                selectedDates.removeClass('start-date').removeClass('end-date');

                var startDate;
                var endDate;

                if (selectedDates.length > 1) {
                    startDate = $(selectedDates.get(0));
                    endDate = $(selectedDates.get(selectedDates.length - 1));

                    startDate.addClass('start-date');
                    endDate.addClass('end-date');

                    var start = startDate.data("day-order");
                    var end = endDate.data("day-order");

                    calendar.find('.calendar-date').each(function () {
                        var $this = $(this);
                        var calendarDate = $this.data("day-order");
                        if ((calendarDate > start && calendarDate < end) ||
                            calendarDate < start && calendarDate > end) {
                            $this.addClass("active");
                        }
                    });

                    momentStartDate = moment(startDate.data('date'), dateFormat);
                    momentEndDate = moment(endDate.data('date'), dateFormat);
                } else {
                    startDate = $(selectedDates.get(0));
                    momentStartDate = moment(startDate.data('date'), dateFormat);
                    momentEndDate = moment(startDate.data('date'), dateFormat).add(1, 'days');
                }
               
                digex.booking.initDates(momentStartDate, momentEndDate);
                validateSelectedDates(momentStartDate, momentEndDate);
            }).on('mouseover', function () {

                if (isCheckedIn && isTouchDevice() === false) {
                    var selectedDates = calendar.find('.calendar-date.active');

                    if (selectedDates.length > 0) {
                        var firstDate = $(selectedDates.get(0));

                        dates.removeClass('calendar-date-mouseover');

                        var $this = $(this);

                        var firstDateDayOrder = firstDate.data('day-order');
                        var dayOrder = $this.data('day-order');

                        dates.each(function () {
                            var date = $(this);
                            var order = date.data('day-order');
                            if (
                                (order > firstDateDayOrder || order > dayOrder)
                                && (order <= dayOrder || order <= firstDateDayOrder)) {
                                date.addClass('calendar-date-mouseover');
                            }
                        });
                    }
                }
            });
        });
    });

    return {
        setDates: function (startDate, endDate) {

            var calendar = $('table.calendar');

            initCaptions(calendar);

            $('.calendar-glp .calendar-info-selected-start-date').html(startDate.format('MMM DD, YYYY'));
            $('.calendar-glp .calendar-info-selected-end-date').html(endDate.format('MMM DD, YYYY'));
            var numberOfDays = endDate.diff(startDate, 'days');
            var nightsCaption = numberOfDays > 1 ? textNights : textNight;
            $('.calendar-glp .calendar-info-nights').html('(' + numberOfDays + ' ' + nightsCaption + ')');

            if (momentStartDate == null || momentEndDate == null || (!startDate.isSame(momentStartDate) || !endDate.isSame(momentEndDate))) {

                momentStartDate = startDate;
                momentEndDate = endDate;

                $('table.calendar').each(function () {
                    var calendar = $(this);
                    calendar.find('.calendar-date').each(function () {
                        var calendarDate = $(this);
                        calendarDate.removeClass('active');

                        var date = moment(calendarDate.data('date'), dateFormat);

                        if (date.isSame(startDate)) {
                            calendarDate.addClass('start-date');
                        }
                        else if (date.isSame(endDate)) {
                            calendarDate.addClass('end-date');
                        }

                        if (date >= startDate && date <= endDate) {
                            calendarDate.addClass('active');
                        }
                    });
                });

                validateSelectedDates(startDate, endDate);
            }
        }
    };
})(window, jQuery);

(function (window, $) {

    $(function () {

        // The shrinkHeader variable is where you tell the scroll effect to start.

        var shrinkHeader = 70;

        $(window).on("scroll", function () {
            var scroll = getCurrentScroll();
            var $body = $("body");
            var $navScrollEffect = $(".js-nav-scroll-effect");
            var $plpCheckAvailability = $('.plp-check-availability.plp-check-availability-legacy');
            // var $headerWrapper = $('.alert-module-wrap');

            // Function to calculate the dynamic top value based on the presence of .alert-module-wrap
            // function calculateDynamicTop() {
            //     var headerHeight = $headerWrapper.length && $headerWrapper.is(":visible") ? $headerWrapper.outerHeight(true) : 0;
            //     var $subNav = $(".js-nav-scroll-effect");
            //     var subNavHeight = $subNav.length ? $subNav.outerHeight(true) : 0;
            //     var $plpSubNavLinks = $(".plp-subnav-links-container");
            //     var plpSubNavLinksHeight = $plpSubNavLinks.length ? $plpSubNavLinks.outerHeight(true) : 0;
            //     var $digexSubNavLinks = $(".digex-subnav-links-container");
            //     var digexSubNavLinksHeight = $digexSubNavLinks.length ? $digexSubNavLinks.outerHeight(true) : 0;




            //     // Include headerHeight only if .alert-module-wrap is present
            //     if ($headerWrapper.length && $headerWrapper.is(":visible")) {
            //         heightOfHeaders = headerHeight + subNavHeight + plpSubNavLinksHeight;
                    
            //     } else {
            //          heightOfHeaders= headerHeight + subNavHeight + digexSubNavLinksHeight;

            //     }
            // }

            // Function to update the top value based on scroll position
            function updateTop() {
                // var dynamicTop = calculateDynamicTop();


                if (scroll >= shrinkHeader) {
                    $body.addClass("nav-has-scrolled");
                    $navScrollEffect.addClass("scrolled");

                    // if ($plpCheckAvailability.length) {
                    //     $(".plp-check-availability.observe").css({ top: dynamicTop + 'px' });
                    // }
                } else {
                    $body.removeClass("nav-has-scrolled");
                    $navScrollEffect.removeClass("scrolled");

                    // if ($plpCheckAvailability.length) {
                    //     $(".plp-check-availability.observe").css({ top: dynamicTop + 'px' });
                    // }
                }
            }

            requestAnimationFrame(updateTop);
        });


        function getCurrentScroll() {

            return window.pageYOffset || document.documentElement.scrollTop;

        }


        // $(document).ready(() => {
        //     function adjustPosition() {
                
        //         if ($('.plp-check-availability.plp-check-availability-legacy').length != 0) {
        //             if($headerWrapper.length != 0){
        //                 var $headerWrapper = $('.alert-module-wrap');  //record the elem so you don't crawl the DOM everytime  
        //                 var headerHeight = $headerWrapper.outerHeight(true);
        //                 $(".plp-check-availability.observe").css({ top: headerHeight + 'px' });
    
        //             }
        //             else {
        //                 var $plpSubNavLinks = $(".plp-subnav-component-links");
        //                 var $digexSubNavLinks = $(".digex-subnav-component-links");
                        
        //                 var plpSubNavLinksHeight = $plpSubNavLinks.length ? $plpSubNavLinks.outerHeight(true) : 0;
        //                 var digexSubNavLinksHeight = $digexSubNavLinks.length ? $digexSubNavLinks.outerHeight(true) : 0;
    
    
                        
        //                 var headerHeight;
        //                 console.log('headerHeight: ', headerHeight);
                        
                        
        //                 if ($plpSubNavLinks.length) {
        //                     headerHeight = subNavHeight + plpSubNavLinksHeight;
        //                 } else {
        //                     headerHeight = subNavHeight + digexSubNavLinksHeight;
        //                 }
        //             }
                    
                   
                    




        //         }
                
        //     }

        //     // Adjust position on initial load
        //     $(window).on('load', () => setTimeout(adjustPosition, 600));

        //     // Adjust position on window scroll
        //     // window.addEventListener("scroll", adjustPosition);

        //     // jQuery('.digex-nav-component').bind('resize', function (e) {
        //     //     // all your magic resize mojo goes here

        //     //     adjustPosition()
        //     // });
        // })

        window.addEventListener('scroll', function () {
            const nav = document.querySelector('[data-component="standalone-nav"]');
            const navWrap = document.querySelector('.header-navigation');
            const navbarwrap = document.querySelector('.plp-navigation');
        
            const stickyPoint = 32; // Adjust this based on your needs
        
            // Check if any elements with the 'sc-list' class exist
            const hasScList = document.getElementsByClassName('sc-list').length > 0;
        
            // Function to update styles based on scroll position
            const updateStyles = (element) => {
                if (hasScList) {
                    if (window.scrollY > stickyPoint) {
                        nav.style.position = 'fixed';
                        nav.style.top = '171px';
                    } else {
                        nav.style.position = 'sticky';
                        nav.style.top = '32px';
                    }
                } else {
                    console.error(`${element} element not found`); // Debugging output
                }
            };
        
            updateStyles(nav);
            updateStyles(navWrap);
            updateStyles(navbarwrap);
        });
        
    
        });
    
    })(window, jQuery);
    

    


 
(function (window, $) {
    $(function () {
        var $window = $(window);

        $('[data-component="digex-hero-plain"]').each(function() {
            var component = $(this);

            var desktop = component.find('picture .desktop');
            var mobile = component.find('picture .mobile');

            var desktopImageUrl = desktop.attr('srcset');
            var mobileImageUrl = mobile.attr('srcset');

            if (desktopImageUrl || mobileImageUrl) {

                var refreshBackground = function () {
                    var width = $window.width();
                    var imageUrl = desktopImageUrl ? desktopImageUrl : mobileImageUrl;

                    if (width <= 414) {
                        if (mobileImageUrl) {
                            imageUrl = mobileImageUrl;
                        }
                    }

                    component.css('background-image', 'url("' + imageUrl + '")');
                };

                

                var resizeTimeout = null;
                $window.resize(function(){
                        if (resizeTimeout) { clearTimeout(resizeTimeout); }
                        resizeTimeout = setTimeout(function(){ refreshBackground(); },200);
                });

                refreshBackground();
            }
        });
    });
})(window, jQuery);

(function (window, $) {
    $(function () {
        if ($("#plp-hero-slider").length) {
            // Initialize Slick Slider only if there's more than 1 slide
            if ($(".slide.plp-hero-slider__slide").length > 1) {
                var previousButton, nextButton;
                var rotationButton, pauseContainer, resumeContainer;
                var slidesContainer, slides;
                var dots;

                previousButton = document.querySelector(".plp-hero-slider .previous-button");
                nextButton = document.querySelector(".plp-hero-slider .next-button");

                rotationButton = document.querySelector(".plp-hero-slider .rotation-button");
                pauseContainer = document.querySelector(".plp-hero-slider .rotation-button .pause-container");
                resumeContainer = document.querySelector(".plp-hero-slider .rotation-button .resume-container");

                slidesContainer = document.querySelector(".plp-hero-slider .slides");
                slides = document.querySelectorAll(".plp-hero-slider .slides .slide");

                // When Slick Slider loads, set up the slide dots correctly.
                $(".plp-hero-slider .slides").on("init", function (e, slick) {
                    // Ensure all the non-visible slides and their content are impossible to reach by keyboard
                    hideNonVisibleSlides();

                    // Retreive references to all the slide dot DOM elements
                    dots = document.querySelectorAll(".plp-hero-slider .slick-dots li button");

                    // Give the first slide dot `aria-current="true"` on load
                    dots[0].setAttribute("aria-current", true);

                    //jkg-ie dots.forEach(function (dot, index) {
					for(let index=0; index < dots.length; ++index )	{
						
                        // Indicate the action the button will invoke to make it clear that these are controls, not slides themselves
                        dots[index].innerText = "Go to slide " + (index + 1);

                        // Disable autoplay as soon as a user activates a slide dot
                        dots[index].addEventListener("click", function (e) {
                            disableAutoplay();
                        });
                    }
                });

                // Before each slide transition, make each slide visible and update the current slide dot
                $(".plp-hero-slider .slides").on("beforeChange", function (e, slick, currentSlide, nextSlide) {
                    // Make each slide visible during the transition animation
                    
					//jkg-ie slides.forEach(function (slide) {
					for(let index=0; index < slides.length; ++index )	{
                        slides[index].classList.remove("is-hidden");
                    }
					//jkg-ie - Move the active dot indicator before animation for a "snappier" feel
                    if (dots) {
						// dots.forEach(function (dot) {
						for(let index=0; index < dots.length; ++index )	{
							dots[index].removeAttribute("aria-current");
						}
					
						// Indicate which slide is active through the slide dots
						if(dots[nextSlide]) {
							dots[nextSlide].setAttribute("aria-current", true);
						}
					}
                });

                // After each slide transition, hide all newly-non-visible slides and make focusable content in the new "current" slide reachable
                $(".plp-hero-slider .slides").on("afterChange", function (e, slick, currentSlide) {
                    // showVisibleSlides();

                    // Ensure newly non-visible slides are fully hidden from all users
                    hideNonVisibleSlides();

                    // Allow interactive elements on the new current slide to receive keyboard focus
					// jkg-ie h
                    var slideButtons = slides[currentSlide].querySelectorAll("a, button");
					for(let index=0; index < slides.length; ++index )	{
						//.forEach(function (element) {
                        if (slideButtons[index]) {
							slideButtons[index].removeAttribute("tabindex");
						}
                    }
                });

                $(".plp-hero-slider .slides").slick({
                    // The default dots markup is pretty good, though we will need to tweak them in the `init` and `afterChange` event handlers.
                    dots: true,

                    // TODO: append dots rebrand 2023
                    appendDots: $('.slick-slider-dots'),

                    // This removes the inappropriate tabpanel and tab roles and disables arrow key navigation.
                    // NOTE: if you want to use arrow key navigation, you should implement that separately without enabling this option. The usability benefits of key navigation don't outweigh the accessibility impact of the tab implementation.
                    accessibility: false,

                    // Many hero banners auto-rotate, so this demo will too.
                    autoplay: true,
                    fade: true,
                    autoplaySpeed: 4000,

                    // Use highly-accessible custom elements from the DOM for prev/next buttons.
                    prevArrow: document.querySelector(".plp-hero-slider .previous-button"),
                    nextArrow: document.querySelector(".plp-hero-slider .next-button"),
                });

                // Disable autoplay as soon as the user activates either the Previous or Next button
                previousButton.addEventListener("click", function (e) {
                    disableAutoplay();
                });

                nextButton.addEventListener("click", function (e) {
                    TransitionRunning = true;
                    disableAutoplay();
                });

                // Toggle autoplay when the pause/resume button is activated
                rotationButton.addEventListener("click", function (e) {
                    toggleAutoplay();
                });

                // Fully hide non-visible slides for all users when they exit the view.
                function hideNonVisibleSlides() {
                    var hiddenSlides = document.querySelectorAll('.plp-hero-slider .slides .slide[aria-hidden="true"]');

                    // jkg-ie hiddenSlides.forEach(function (slide) {
					for(let index=0; index < slides.length; ++index )	{
                        // Hide each slide using `visibility: hidden` to be extra-sure
                        if (hiddenSlides[index]) {
							hiddenSlides[index].classList.add("is-hidden");

							// Prevent any interactive element on non-visible slides from receiving keyboard focus
							var hiddenSlideButtons = hiddenSlides[index].querySelectorAll("a, button");
							
							// .forEach(function (element) {
							for(let indexS=0; indexS < hiddenSlideButtons.length; ++indexS )	{
								hiddenSlideButtons[indexS].setAttribute("tabindex", -1);
							}
						}
                    }
                }

                // Disable or enable built-in Slick Slider autoplay
                function toggleAutoplay() {
                    var autoplayEnabled = $(".plp-hero-slider .slides").slick("slickGetOption", "autoplay");

                    if (autoplayEnabled) {
                        disableAutoplay();
                    } else {
                        enableAutoplay();
                    }
                }

                function disableAutoplay() {
                    // Disable autoplay and stop Slick from rotating
                    $(".plp-hero-slider .slides").slick("slickSetOption", "autoplay", false);
                    $(".plp-hero-slider .slides").slick("slickPause");

                    // Switch the rotation button icon to "resume"
                    pauseContainer.classList.remove("is-visible");
                    resumeContainer.classList.add("is-visible");
                }

                function enableAutoplay() {
                    // Enable autoplay and get rotation started again
                    $(".plp-hero-slider .slides").slick("slickSetOption", "autoplay", true);
                    $(".plp-hero-slider .slides").slick("slickPlay");

                    // Switch the rotation button icon to "pause"
                    pauseContainer.classList.add("is-visible");
                    resumeContainer.classList.remove("is-visible");
                }
            } else {
                // hide slider controls if there's only one image
                $(".plp-hero-slider-wrapper").addClass("plp-hero-slider-wrapper--static-hero");
            }
        }
    });
})(window, jQuery);

(function(window, $) {
    $(function () {
        var grid = $('#interestsGrid');

        var bookingBar = $('div[data-component="plp-check-availability"]');
        var search = function ($this) {
            $this.text('').addClass('booking');
            var hotelId = $this.data('hotel-id');
            bookingBar.trigger('search', [hotelId]);
        };

        if (grid.length > 0) {

            grid.on('click',
                'a[data-hotel-id]',
                function () {
                    var $this = $(this);
                    setTimeout(function () {
                        search($this);
                    }, 100);
                });

            if ($(window).width() > 1023) {
               grid.find('.plp-resort-description p').shave(110);
            }
        }
    });
})(window, jQuery);

(function (window, $) {
    $(function () {
        $('[data-component="plp-language-dropdown"] a').click(function(e) {
            e.preventDefault();

            var $this = $(this);

             var pageUrl = window.location.pathname.split(window.location.search || window.location.hash || /[?#]/)[0];

            $.ajax({
                url: "/api/sitecore/Navigation/GetPageUrlForLanguage",
                type: "GET",
                data: {
                    language: $this.data('language'),
                    id: $this.data('item-id'),
                    pageUrl: pageUrl
                },
                context: this,
                success: function(data) {
                    window.location.href = data;
                },
                error: function(data) {
                    console.log('error: ' + data);
                }
            });
        });
    });
})(window, jQuery);

(function (window, $) {
    $(function() {
        if ($('.main-nav').length === 0) {
            $('.plp-nav-links-left .plp-nav-toggle').hide();
            $('.plp-nav-links-left .plp-nav-bordered').removeClass('plp-nav-bordered');
        }

        if ($('.main-nav').length === 0) {
            $('.digex-nav-links-left .digex-nav-toggle').hide();
            $('.digex-nav-links-left .digex-nav-bordered').removeClass('digex-nav-bordered');
        }


        $('.plp-main-nav-separator').attr('aria-hidden', true);

    });  
})(window, jQuery);

(function (window, $) {
    $(function () {
        $('body').append($('.site-container .main-nav'));
    });  
})(window, jQuery);

(function (window, $) {
    var $j = $;

    var markers = [];

    var iconThingsToDo,
        iconThingsToDoSelected,
        iconHotelSelected,
        iconHotel;

    var bookingBar, bounds, infoWindow, Popup, popupHtml, itemHtml, itemPropertyHtml;

    var initIcons = function () {
        iconThingsToDo = {
            url: '/assets/css/img/map-icon-interest.png',
            anchor: new google.maps.Point(28, 28),
            scaledSize: new google.maps.Size(56, 56)
        },
            iconThingsToDoSelected = {
                url: '/assets/css/img/map-icon-interest-selected.png',
                anchor: new google.maps.Point(28, 28),
                scaledSize: new google.maps.Size(56, 56)
            },
            iconHotelSelected = {
                url: '/assets/css/img/map-icon-selected.png',
                anchor: new google.maps.Point(28, 28),
                scaledSize: new google.maps.Size(56, 56)
            },
            iconHotel = {
                url: '/assets/css/img/map-icon-marker.png',
                anchor: new google.maps.Point(28, 28),
                scaledSize: new google.maps.Size(56, 56)
            };
    }


    var resetIconForAllMarkers = function () {

        $.each(markers,
            function (index, arr) {

                var marker = arr[1];

                if (marker.isHotel) {
                    marker.setIcon(iconHotel);
                } else {
                    if (marker.inactiveIcon) {
                        marker.setIcon(marker.inactiveIcon);
                    }
                    else {
                        marker.setIcon(iconThingsToDo);
                    }
                }
            });

        $('.occasions-map-locations .occasions-map-marker-details').removeClass('selected');
        $('.occasions-map-locations .marker-icon').each(function () {
            $(this).attr('src', $(this).data("inactiveicon"));
        });
    };

    function createPopupClass() {
        /**
         * A customized popup on the map.
         * @param {!google.maps.LatLng} position
         * @param {!Element} content The bubble div.
         * @constructor
         * @extends {google.maps.OverlayView}
         */
        function Popup(position, content, id) {
            this.position = position;

            content.classList.add('popup-bubble');

            // This zero-height div is positioned at the bottom of the bubble.
            var bubbleAnchor = document.createElement('div');
            bubbleAnchor.classList.add('popup-bubble-anchor');
            bubbleAnchor.appendChild(content);

            // This zero-height div is positioned at the bottom of the tip.
            this.containerDiv = document.createElement('div');
            this.containerDiv.classList.add('popup-container');
            this.containerDiv.setAttribute('data-interest', id);
            this.containerDiv.appendChild(bubbleAnchor);

            // Optionally stop clicks, etc., from bubbling up to the map.
            google.maps.OverlayView.preventMapHitsAndGesturesFrom(this.containerDiv);
        }

        // ES5 magic to extend google.maps.OverlayView.
        Popup.prototype = Object.create(google.maps.OverlayView.prototype);

        /** Called when the popup is added to the map. */
        Popup.prototype.onAdd = function () {
            this.getPanes().floatPane.appendChild(this.containerDiv);
        };

        /** Called when the popup is removed from the map. */
        Popup.prototype.onRemove = function () {
            if (this.containerDiv.parentElement) {
                this.containerDiv.parentElement.removeChild(this.containerDiv);
            }
        };

        /** Called each frame when the popup needs to draw itself. */
        Popup.prototype.draw = function () {
            var divPosition = this.getProjection().fromLatLngToDivPixel(this.position);

            // Hide the popup when it is far out of view.
            var display =
                Math.abs(divPosition.x) < 4000 && Math.abs(divPosition.y) < 4000 ?
                    'block' :
                    'none';

            if (display === 'block') {
                this.containerDiv.style.left = divPosition.x + 'px';
                this.containerDiv.style.top = (divPosition.y + 30) + 'px';
            }

            this.containerDiv.style.visibility = 'hidden';
        };

        return Popup;
    }

    function getThingsToDoItems() {

        var item = $('#thingsToDoItems');

        if (item.length === 0) {
            return [];
        }

        var propertiesItem = item.get(0).innerText;

        var propertiesJson = JSON.parse(propertiesItem);
        var items = _.map(propertiesJson, function (item) {


            var activeIcon = item.IsHotel ? iconHotelSelected : iconThingsToDoSelected;
            var inactiveIcon = item.IsHotel ? iconHotel : iconThingsToDo;

            activeIcon = {
                url: activeIcon.url,
                anchor: activeIcon.anchor,
                scaledSize: activeIcon.scaledSize
            };

            inactiveIcon = {
                url: inactiveIcon.url,
                anchor: inactiveIcon.anchor,
                scaledSize: inactiveIcon.scaledSize
            };

            if (item.ActiveIcon) {
                activeIcon.url = item.ActiveIcon;
            }

            if (item.InactiveIcon) {
                inactiveIcon.url = item.InactiveIcon;
            }

            return {
                id: item.Id,
                address: item.FullAddress,
                city: item.City ? item.City : '',
                state: item.State,
                zip: item.ZipCode,
                name: item.Name,
                description: item.Description,
                url: item.ItemUrl,
                lat: item.Latitude,
                lng: item.Longitude,
                phone: item.PhoneNumber,
                img: item.ImageSrc,
                alt: item.Alt,
                tripadvisor: item.TripAdvisorScript,
                link: item.Link,
                isHotel: item.IsHotel,
                activeIcon: activeIcon,
                inactiveIcon: inactiveIcon
            };


        });

        return items;
    }

    var addThingsToDoMarker = function (markerInfo) {
        var icon,
            hideReadMoreButton = false,
            available = null;


        var readMoreUrl = markerInfo.link;
        var encodedDirections = encodeURI(markerInfo.name + ', ' + markerInfo.address + ', ' + markerInfo.city + ', ' + markerInfo.state + ', ' + markerInfo.zip);

        var popupContent = popupHtml.replace(/{{name}}/g, markerInfo.name)
            .replace(/{{description}}/g, markerInfo.description)
            .replace(/{{detailsUrl}}/g, readMoreUrl)
            .replace(/{{encodedDirections}}/g, encodedDirections);

        if (!readMoreUrl) {
            hideReadMoreButton = true;
        }

        var itemContent;

        if (markerInfo.isHotel) {
            icon = iconHotel;
            itemContent = itemPropertyHtml
                .replace(/{{img}}/g, markerInfo.img)
                .replace(/{{alt}}/g, markerInfo.alt)
                .replace(/{{name}}/g, markerInfo.name)
                .replace(/{{phone}}/g, markerInfo.phone)
                .replace(/{{detailsUrl}}/g, markerInfo.url)
                .replace(/{{hotelId}}/g, markerInfo.id)
                .replace(/{{tripadvisor}}/g, decodeURIComponent(markerInfo.tripadvisor));

            popupContent = itemContent;

        } else {

            itemContent = itemHtml.replace(/{{name}}/g, markerInfo.name)
                .replace(/{{iconSrc}}/g, markerInfo.inactiveIcon.url)
                .replace(/{{address}}/g, markerInfo.address)
                .replace(/{{description}}/g, markerInfo.description)
                .replace(/{{detailsUrl}}/g, readMoreUrl)
                .replace(/{{encodedDirections}}/g, encodedDirections);


            if (markerInfo.activeIcon) {
                itemContent = itemContent.replace(/{{activeIconSrc}}/g, markerInfo.activeIcon.url);
            }
            

            if (markerInfo.inactiveIcon) {
                itemContent = itemContent.replace(/{{inactiveIconSrc}}/g, markerInfo.inactiveIcon.url);
            }

            icon = markerInfo.inactiveIcon;
        }

        

        var marker = new google.maps.Marker({
            icon: icon,
            map: window.map,
            position: new google.maps.LatLng(markerInfo.lat, markerInfo.lng),
            title: markerInfo.name,
            resortid: markerInfo.id,
            available: available,
            isHotel: markerInfo.isHotel,
            activeIcon: markerInfo.activeIcon,
            inactiveIcon: markerInfo.inactiveIcon,
            zIndex: markerInfo.isHotel ? 999 : 1
        });

        markers.push([markerInfo.id, marker]);
        bounds.extend(marker.position);

        var jItemContent = $(itemContent);

        jItemContent.find('.marker-icon').keypress(function(e) {
            if (e.keyCode === 32 || e.keyCode === 13) {
                e.preventDefault();
                e.stopPropagation();

                jItemContent.trigger('click');
            }
        });

        jItemContent.click(function () {
            resetIconForAllMarkers();
            if (marker.isHotel) {
                marker.setIcon(iconHotelSelected);
                jItemContent.find('.marker-icon').attr('src', iconHotelSelected.url);
            } else {
                
                if (marker.activeIcon && marker.activeIcon.url) {
                    marker.setIcon(marker.activeIcon);
                    jItemContent.find('.marker-icon').attr('src', marker.activeIcon.url);
                } else {
                    marker.setIcon(iconThingsToDoSelected);
                    jItemContent.find('.marker-icon').attr('src', iconThingsToDoSelected.url);
                }
            }

            window.map.setCenter(marker.getPosition());
            window.map.setZoom(14);
            marker.setMap(null);
            marker.setMap(window.map);

            setTimeout(function() {
                google.maps.event.trigger( marker, 'click' );
            }, 2000);

            jItemContent.addClass('selected');
        });
        if (hideReadMoreButton) {
            jItemContent.find('.digex-secondary-cta[href=""]').css('visibility', 'hidden');
            jItemContent.find('.read-more:not(.digex-secondary-cta)[href=""]').css('display', 'none');
        }

        if (!markerInfo.isHotel) {
             $('.occasions-map-locations').append(jItemContent);
        }

        var $popupWrapper = $('<div />').addClass('occasions-map-modal').html(popupContent);

        if (hideReadMoreButton) {
            $popupWrapper.find('.digex-secondary-cta[href=""]').css('visibility', 'hidden');

        }

        $('#occasions-popups').append($popupWrapper);

        var popup = new Popup(
            new google.maps.LatLng(markerInfo.lat, markerInfo.lng),
            $popupWrapper.get(0),
            markerInfo.id
        );

        popup.setMap(window.map);

        google.maps.event.addListener(marker, 'click', (function (marker, ev) {
            return function () {
                resetIconForAllMarkers();

                var propertyItem = $j('[data-interest="' + marker.resortid + '"]');
                //var isHotel = propertyItem.find('[data-hotel-id]').length > 0;
                var isHotel = marker.isHotel;

                if (propertyItem.css('visibility') === 'hidden') {

                    window.map.setCenter(marker.getPosition());

                    setTimeout(function () {
                        $j('.popup-container').css('visibility', 'hidden');

                        propertyItem.css('visibility', 'visible');
                        propertyItem.find('.description').shave(16 * 4);

                        if (isHotel) {
                            marker.setIcon(iconHotelSelected);
                        } else {
                            if (marker.activeIcon) {
                                marker.setIcon(marker.activeIcon);
                            } else {
                                marker.setIcon(iconThingsToDoSelected);
                            }

                        }
                        setTimeout(function () {
                            var widget = $('.occasions-map-locations .plp-tripadvisor');
                            propertyItem.find('.plp-tripadvisor').html(widget.html());
                        },
                            200);


                    }, 200);

                } else {
                    if (isHotel) {
                        marker.setIcon(iconHotel);
                    } else {
                        if (marker.inactiveIcon) {
                            marker.setIcon(marker.inactiveIcon);
                        }
                        else {
                            marker.setIcon(iconThingsToDo);
                        }
                    }
                    propertyItem.css('visibility', 'hidden');
                }
            };
        })(marker));

        $j('[data-component="occasions-map"]').on('click', function (e) {
            if (!e.target.classList.contains('close-dropdown')) {
                return;
            }

            $j(e.target).parents('.popup-container').css('visibility', 'hidden');
            resetIconForAllMarkers();
        });

        $j('[data-component="occasions-map"]').on('click', function (e) {
            if (!e.target.classList.contains("digex-primary-cta")) {
                return;
            }


            var $target = $j(e.target);
            var hotelId = $target.attr('data-hotel-id');

            if (hotelId) {
                e.preventDefault();
                e.stopPropagation();
                $target.text('').addClass('booking');
                bookingBar.trigger('search', [hotelId]);
            }
        });
    };

    var initMap = function (container) {
        var component = container.find('.occasions-actual-map');

        var googleMapKey = component.attr('data-key');
        var zoomLevel = parseFloat(component.data('map-zoom'));

        GoogleMapsLoader.KEY = googleMapKey;
        GoogleMapsLoader.VERSION = 'quarterly';
        GoogleMapsLoader.load(function (google) {
           
            initIcons();

            Popup = createPopupClass();
            bounds = new google.maps.LatLngBounds();
            infoWindow = new google.maps.InfoWindow();

            window.map = new google.maps.Map(component.get(0), {
                zoom: 6,
                mapTypeId: google.maps.MapTypeId.ROADMAP
            });

            var map = window.map;

            var adjustZoom = function () {
                setTimeout(function () {
                    var zoom = map.getZoom();
                    if (zoomLevel) {
                        zoom = zoomLevel;
                    } else {
                        zoom = zoom > 10 && markers.length < 3 ? 10 : zoom + 0.5;
                    }
                    map.setZoom(zoom);
                }, 3000);
            };

            var thingsToDoItems = getThingsToDoItems();
            $.each(thingsToDoItems, function (index, location) {
                addThingsToDoMarker(location);
            });

            map.initialZoom = true;
            map.fitBounds(bounds);
            adjustZoom();
        });
    }

    $(function () {

        bookingBar = $('div[data-component="plp-check-availability"]');

        var popupTemplate = $('#nearby-attracations-popup-content-template');
        if (popupTemplate.length > 0) {
            popupHtml = popupTemplate.html();
        }

        var itemTemplate = $('#nearby-attracations-item-template');
        if (itemTemplate.length > 0) {
            itemHtml = itemTemplate.html();
        }

        var itemPropertyTemplate = $('#nearby-attracations-resort-content-template');
        if (itemPropertyTemplate.length > 0) {
            itemPropertyHtml = itemPropertyTemplate.html();
        }

        $('div[data-component="occasions-map"]').each(function () {
            var container = $(this);
            initMap(container);


            container.find('.map-slider-toggle').click(function () {
                var toggle = $(this);
                toggle.toggleClass('closed');
                //toggle.toggleClass('closed');
                toggle.attr('aria-expanded',!toggle.hasClass('closed'));
                container.find('.occasions-map-slider').toggleClass('closed');
            });
        });
    });

})(window, jQuery);

(function (window, $) {

    var $document = $(document);
    var $window = $(window);
    var $j = $;

    if ($('.occasions-property-page'.length > 0)) {

        var scrollToElement = function (el) {
            var tag = el;

            if (tag.length > 0) {

                var offsetCorrection = 135;

                if ($window.width() <= 768) {
                    offsetCorrection = 75;
                }

                $document.scrollTop(tag.offset().top - offsetCorrection);
            }
        };

        var scrollTo = function (selector) {
            selector = selector.replace('#', '');

            if (selector === 'overview') {
                selector = 'intro';
            }

            var tag = $('a[name="' + selector + '"]');

            scrollToElement(tag);
        };

        var lnkHashClick = function (e, lnk) {
            var hash = lnk.attr('href');

            if (hash !== '#' && hash) {
                if (e) {
                    e.preventDefault();
                    e.stopPropagation();
                }

                window.location.hash = hash;
                scrollTo(hash);

                $('.occasions-navbar').removeClass('open');
                $('.occasions-dropdown-active').css('display', 'flex');

                var navbar = lnk.parents('.occasions-navbar');

                if (navbar.length > 0) {
                    setTimeout(function () {
                        var overviewLnk = navbar.find('.dropdown-toggle');
                        overviewLnk.html(lnk.html());
                    },
                        500);
                }
            }
        }


        $('a[href^="#"]').click(function (e) {
            var lnk = $(this);
            lnkHashClick(e, lnk);
        });

        $(function () {
            if (window.location.hash) {
                setTimeout(function () {
                    var lnk = null;
                    $('.occasions-navbar').find('a').each(function () {
                        var $this = $(this);
                        if ($this.attr('href') === window.location.hash) {
                            lnk = $this;
                        }
                    });
                    if (lnk) {
                        lnkHashClick(false, lnk);
                    } else {
                        scrollTo(window.location.hash);
                    }
                }, 1500);
            }

            $('.occasions-navbar-wrapper').waypoint({
                handler: function (direction) {
                    if (direction === 'up') {
                        setTimeout(function () {
                            var firstLnk = $('.occasions-navbar .dropdown-toggle');
                            if (firstLnk.attr('data-overview')) {
                                firstLnk.html(firstLnk.attr('data-overview'));
                            }
                        },
                            500);
                    }
                }
            });

            var navbar = $('.occasions-navbar');
            var allLinks = navbar.find('a');
            var overviewLnk = navbar.find('.dropdown-toggle');

            if (!overviewLnk.attr('data-overview')) {
                overviewLnk.attr('data-overview', overviewLnk.html());

                var overviewSecLnk = $('<a />');

                overviewSecLnk.addClass('occassion-navbar-link').addClass('occassion-navbar-link-overview');
                overviewSecLnk.attr('href', '#overview');

                overviewSecLnk.html(overviewLnk.html());
                overviewLnk.after(overviewSecLnk);

                $( ".occassion-navbar-link:not(:first)" ).wrapAll( "<div id='occassion-navbar-links' />");

                // target 'occassion-navbar-links' after it's been created
                var checkIfUlExists = setInterval(function () {
                    if ($("#occassion-navbar-links").length) {
                        clearInterval(checkIfUlExists);
                        
                        // wrap the set of links with a ul
                        $( "#occassion-navbar-links" ).wrapInner( "<ul />");
                        // wrap each link with an li
                        $( "#occassion-navbar-links a" ).wrap( "<li></li>");
                    }
                }, 100);

                overviewSecLnk.click(function (e) {
                    lnkHashClick(e, $(this));
                });
            }

            var updateNav = function (element) {
                var name = element.attr('name');
                if (name) {
                    allLinks.each(function () {
                        var lnk = $(this);
                        var hash = '#' + name;

                        if (lnk.attr('href') === hash) {
                            overviewLnk.html(lnk.html());
                        }
                    });
                }
            }

            $('a[name]').waypoint({
                handler: function (direction) {
                    var element = $(this.element);

                    if (direction === 'down') {
                        updateNav(element);
                    } else {
                        var prev = element.prevAll('a[name]').first();
                        if (prev.length > 0) {
                            updateNav(prev);
                        }
                    }
                }
            });

            $('#spaces-grid .spaces-view-all').click(function () {
                updateNav($('a[name="spaces"]'));
            });
        });
    }

    // Handle a click
    $(".occasions-hero-wrapper .info-toggle, .spaces-wrapper .info-toggle, .room-capacities .info-toggle").on("click", function () {
        var $this = $(this);
        $this.next().toggleClass("show");
        $this.attr('aria-expanded', $this.next().hasClass("show"));
    });

    // Handle a keypress
    $(".occasions-hero-wrapper .info-toggle, .spaces-wrapper .info-toggle, .room-capacities .info-toggle").on("keypress", function (event) {
        if (event instanceof KeyboardEvent && event.key !== 'Enter' || event.key !== ' ') {
            return;
        }
        var $this = $(this);
        $this.next().toggleClass("show");
        $this.attr('aria-expanded', $this.next().hasClass("show"));
    });

    // Notice. For Spaces, this conflicts with the click event attached to the .info-toggle and prevents it from closing with a mouse click.
    $('*').on("mousedown", function (e) {
        if ( !$(".spaces-wrapper .info-toggle") && (!$(e.target).hasClass('info-toggle-container')) && ($(e.target).parents('.info-toggle-container').length === 0)) {
            $('.info-toggle-container').removeClass('show');
            $(".occasions-hero-wrapper .info-toggle, .spaces-wrapper .info-toggle, .room-capacities .info-toggle").attr('aria-expanded', false);
        }
    });

    $document.on("keyup", function (e) {
        if (e.key === "Escape") {
            $('.info-toggle-container').removeClass('show').parents('.filter-title').find('.info-toggle').attr('aria-expanded', false);;
            $(".occasions-hero-wrapper .info-toggle, .spaces-wrapper .info-toggle, .room-capacities .info-toggle").attr('aria-expanded', false);
            $('.filter-head, .filter-body').removeClass('filter-open');
            $('.filter-head').attr('aria-expanded', false);
        }
    });

    $(".social-distancing-filter .close-filter").on("click", function () {
        var $this = $(this);
        $this.parent().toggleClass("show");
        $this.parents('.filter-title').find('.info-toggle').attr('aria-expanded', false).focus();
    });

    $document.on("click", ".occasions-dropdown-active .dropdown-toggle", function (e) {
        e.preventDefault();
        var $this = $(this);

        $this.parent().toggleClass("open");
        if ($this.parent().hasClass("open")) {
            $this.attr('aria-expanded', true);
        }
        else {
            $this.attr('aria-expanded', false);
        }

        if ($(".occasions-navbar").hasClass("open")) {
            $(".occasions-dropdown-active").css("display", "block");
        }
        else {
            $(".occasions-dropdown-active").css("display", "flex");
        }
    });

    var spacesGrid = $(".spaces-grid");
    if (spacesGrid.length > 0) {
        $window.scroll(function () {
            var spacesGridTop = spacesGrid.offset().top;
            if ($window.scrollTop() > spacesGridTop - 200) {
                $(".spaces-grid-container .info-toggle-container").delay("10000").removeClass("show");
            }
        });

        var tooltips = spacesGrid.find('span[data-title]');
        spacesGrid.find('tbody').scroll(function () {
            tooltips.tooltipster('hide');
        });
    }

    var scrollPrev = $('.spaces-grid-container .scroll-prev');
    var scrollNext = $('.spaces-grid-container .scroll-next');
    var spacesHead = $('.spaces-grid thead');
    scrollPrev.hide();

    var scrollPosition = 0;

    $('.scroll-prev').on("click", function (e) {
        e.preventDefault();
        if ($(window).width() >= 769) {
            $('.spaces-grid tbody, .spaces-grid thead').animate({
                scrollLeft: "-=150px"
            }, 500, 'linear', function () {
                if (spacesHead.scrollLeft() === 0) {
                    scrollPrev.hide();
                }

            });
        }

        else {
            $('.spaces-grid tbody, .spaces-grid thead').animate({
                scrollLeft: "-=80px"
            }, 500, 'linear', function () {
                if (spacesHead.scrollLeft() === 0) {
                    scrollPrev.hide();
                }

            });
        }

        scrollNext.show();
    });

    $('.scroll-next').on("click mousedown", function (e) {
        e.preventDefault();
        if ($(window).width() >= 769) {
            $('.spaces-grid tbody, .spaces-grid thead').animate({
                scrollLeft: "+=150px"
            }, 500, 'linear', function () {
                var currentPos = spacesHead.scrollLeft();
                if (scrollPosition === currentPos) {
                    scrollNext.hide();
                }
                scrollPosition = currentPos;
            });
        }
        else {
            $('.spaces-grid tbody, .spaces-grid thead').animate({
                scrollLeft: "+=80px"
            }, 500, 'linear', function () {
                var currentPos = spacesHead.scrollLeft();
                if (scrollPosition === currentPos) {
                    scrollNext.hide();
                }
                scrollPosition = currentPos;
            });

        }

        scrollPrev.show();
    });

    $(".space-title-img").each(function () {
        if ($(this).attr('src') === '') {
            $(this).hide();

            $(this).parent().find(".add-to-rfp").css("padding", "0");
        }
    });


    function activitiesCarousel() {

        $('.activities-carousel').slick({
            dots: true,
            slidesToShow: 5,
            slidesToScroll: 5,
            accessibility: false,
            responsive: [
                {
                    breakpoint: 1800,
                    settings: {
                        slidesToShow: 4,
                        slidesToScroll: 4,
                    }
                },
                {
                    breakpoint: 1200,
                    settings: {
                        slidesToShow: 3,
                        slidesToScroll: 3,
                    }
                },
                {
                    breakpoint: 1000,
                    settings: {
                        slidesToShow: 2,
                        slidesToScroll: 2,
                    }
                },
                {
                    breakpoint: 767,
                    settings: {
                        slidesToShow: 1,
                        slidesToScroll: 1
                    }
                }
            ]
        });
    }

    $j(".activities-carousel").on("mouseup", function () {
        $j(".activities-carousel .slick-list").css("margin-left", "0");
    });

    function activitiesCarouselDescription() {
        /*
        var windowWidth = $(window).width();
        if (windowWidth > 1500) {
            $('.activities-carousel-card-container .description').shave(180);
        }
        else if ($(window).width() > 800) {
            $('.activities-carousel-card-container .description').shave(160);
        }
        else {
            $('.activities-carousel-card-container .description').shave(180);
        }
        */
        $('.activities-carousel-card-container .description').shave(280);
    }



    activitiesCarousel();
    setTimeout(function () {
        activitiesCarouselDescription();
    },
        200);


    $(window).resize(function () {
        activitiesCarouselDescription();
    });


    $(".occasions-offers-card-wrapper .view-more, .occasions-offers-card-wrapper .view-less  ").on("click", function (e) {
        e.preventDefault();

        var $this = $(this);

        $this.parent().toggleClass('expand');

        $this.parents().eq(2).toggleClass('expand');

    });

    $j('.spaces-carousel').slick({
        dots: true,
        slidesToShow: 1,
        slidesToScroll: 1,
        adaptiveHeight: true,
    });

    $(".occasions-offers-card-wrapper .plp-tertiary-link-arrow .view-less").addClass("hide");

    $(".occasions-offers-card-wrapper .plp-tertiary-link-arrow  a").on("click", function (e) {
        e.preventDefault();
        var $this = $(this);

        $this.parent().children().toggleClass("hide");

        $this.parents().eq(1).toggleClass('expand');
    });

    // $(".level-dropdown-toggle").on("click", function (e) {
    //     e.preventDefault();
    //     $('.level-dropdown-container').toggleClass('open');

    //     setTimeout(function() {
    //         $(".level-dropdown-toggle").attr('aria-expanded', $('.level-dropdown-container').hasClass('open'));
    //     }, 250);
    // });

    var initModal = function (modal) {
        setTimeout(function () {
            modal.find('.space-modal-top-bar .prev-space, .space-modal-top-bar .next-space,.space-modal-top-bar .close-btn')
                .css('background-size', '100% 100%'); // IE11 fix
        },
            500);

        modal.find(".close-btn").on("click", function (e) {
            $.modal.close();
        });

        modal.find('.space-modal-carousel-container:not(.carousel-initialized)').each(function () {
            var container = $(this);

            var showSpace = function (query) {
                $.modal.close();
                setTimeout(function () {
                    var nextContainer = $(query);
                    nextContainer.modal({ closeExisting: true });
                    setTimeout(function () {
                        initModal(nextContainer);
                    },
                        50);
                }, 50);
            };

            modal.find(".prev-space, .next-space").on("click", function (e) {
                showSpace('#' + $(this).attr('data-space-modal-id'));
            });

            container.addClass('carousel-initialized');
            var carousel = container.find('.space-modal-carousel');

            if (carousel.find('img').length > 0) {
                carousel.slick({
                    dots: true,
                    mobileFirst: true,
                    prevArrow: container.find('.prev-arrow-1'),
                    nextArrow: container.find('.next-arrow-1'),
                    slidesToShow: 1,
                    slidesToScroll: 1
                });
            } else {
                container.find('.carousel-controls').hide();
            }
            // trap focus inside the modal
            var focusableElements =
                'button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])';
                var modalItem = modal[0];

                var firstFocusableElement = modalItem.querySelectorAll(focusableElements)[0]; // get first element to be focused inside modal
                var focusableContent = modalItem.querySelectorAll(focusableElements);
                var lastFocusableElement = focusableContent[focusableContent.length - 1]; // get last element to be focused inside modal


            document.addEventListener('keydown', function (e) {
                var isTabPressed = e.key === 'Tab' || e.keyCode === 9;

                if (!isTabPressed) {
                    return;
                }

                if (e.shiftKey) { // if shift key pressed for shift + tab combination
                    if (document.activeElement === firstFocusableElement) {
                        lastFocusableElement.focus(); // add focus for the last focusable element
                        e.preventDefault();
                    }
                } else { // if tab key is pressed
                    if (document.activeElement === lastFocusableElement) { // if focused has reached to last focusable element then focus first focusable element after pressing tab
                        firstFocusableElement.focus(); // add focus for the first focusable element
                        e.preventDefault();
                    }
                }
            });

            firstFocusableElement.focus();

        });
    }
    $(".spaces-grid .view-details, .spaces-carousel .view-details").on("click", function (e) {
        e.preventDefault();
        var $this = $(this);
        var modalContainer = $($this.attr('data-modal'));
        modalContainer.modal({ closeExisting: true });
        setTimeout(function () { initModal(modalContainer); }, 50);
    });


    $(".submit-rfp-btn").on("click", function (e) {
        e.preventDefault();

        $(".rfp-added-alert").fadeIn().delay(5000).fadeOut();
    });

    $(".services-detail-wrapper .view-more,.services-detail-wrapper .view-less").on("click",
        function (e) {
            e.preventDefault();

            var btn = $(this);
            var txtViewMore = btn.data('view-more');
            var txtViewLess = btn.data('view-less');
            var isViewLess = btn.text() === txtViewLess;

            $(".services-detail-wrapper .services-list").toggle();
            $(".services-detail-wrapper .services-list:lt(3)").show();

            btn.text(isViewLess ? txtViewMore : txtViewLess);
            if (isViewLess) {
                btn.removeClass('view-less');
            } else {
                btn.addClass('view-less');
            }
        });

    var initServices = function () {
        if ($window.width() <= 768) {
            $(".services-detail-wrapper .services-list").hide();
            $(".services-detail-wrapper .services-list:lt(3)").show();
            var viewLess = $(".services-detail-wrapper .view-less");
            viewLess.removeClass('view-less').addClass('view-more').html(viewLess.attr('data-view-more'));

            if ($(".services-detail-wrapper .services-list").length > 3) {
                $(".services-detail-wrapper .view-more, .services-detail-wrapper .view-less").show();
            } else {
                $(".services-detail-wrapper .view-more, .services-detail-wrapper .view-less").hide();
            }
        } else {
            $(".services-detail-wrapper .services-list").show();
        }

    }

    var resizeInProgress = false;
    $window.resize(function () {

        if (!resizeInProgress) {
            resizeInProgress = true;
            setTimeout(function () {
                initServices();
                resizeInProgress = false;
            }, 500);
        }
    });


    $(function () {

        var squareFootageMin = 0;
        var squareFootageMax = 0;

        var txtRoomSizeMin = $('#roomSizeMin');
        var txtRoomSizeMax = $('#roomSizeMax');
        var txtEventSize = $('#eventSize');
        var slider = null;

        var roomSizeFilterHead = $('.room-size-filter .filter-head');
        var eventSizeFilterHead = $('.event-size-filter .filter-head');

        initServices();

        $('.contact-us-wrapper .digex-secondary-cta, .occasions-navbar-wrapper .digex-primary-cta, .occasions-hero-wrapper .digex-primary-cta').click(function () {
            $(this).addClass('busy');
        });

        $('.spaces-modals .room-capacities').each(function () {
            var wrapper = $(this);

            var socialDistancingCapacitiesLinks = wrapper.find('.social-distancing-filter button');

            socialDistancingCapacitiesLinks.click(function () {
                socialDistancingCapacitiesLinks.removeClass('active').attr('aria-checked', false);
                var lnk = $(this);
                lnk.addClass('active');
                lnk.attr('aria-checked', true);


                var mode = lnk.attr('data-capacities');

                wrapper.find('.room-container .number').each(function () {
                    var $this = $(this);
                    var val = $this.attr('data-' + mode);
                    $this.hide();
                    $this.html(val);
                    $this.fadeIn(1000);
                });

                //grid.find('tbody td[data-' + mode + ']').each(function() {
                //    var td = $(this);
                //    var val = td.attr('data-' + mode);
                //    var span = td.find('span');
                //    span.hide();
                //    span.html(val);
                //    span.fadeIn(2000);
                //});

                //applyFilters();
            });

        });


        $('div[data-component="spaces-grid"]').each(function () {

            var wrapper = $(this);
            var numberOfRowsToDisplay = parseInt(wrapper.attr('data-number-of-rooms-to-display'));
            if (numberOfRowsToDisplay === NaN || !numberOfRowsToDisplay) {
                numberOfRowsToDisplay = 8;
            }

            var grid = wrapper.find('.spaces-grid');
            var btnViewAll = wrapper.find('.spaces-view-all');

            var socialDistancingCapacitiesLinks = wrapper.find('.social-distancing-filter button');

            var target = grid.find(".spaces-grid-header");
            var targetBody = grid.find("tbody");

            target.scroll(function () {
                targetBody.scrollLeft(target.scrollLeft());
            });

            targetBody.scroll(function () {
                target.scrollLeft($(this).scrollLeft());
            });


            var displayRows = function (shouldDisplayAllRows) {
                if (shouldDisplayAllRows) {

                    var firstHiddenRow = $('.spaces-grid tbody tr:visible:last').next();

                    $('.spaces-grid tbody tr').show();

                    setTimeout(function() {
                            firstHiddenRow.find('a').first().focus();
                        },
                        100);
                    
                    txtRoomSizeMin.val(squareFootageMin);
                    txtRoomSizeMax.val(squareFootageMax);

                    txtEventSize.val('');

                    if (slider !== null) {
                        slider.noUiSlider.set([squareFootageMin, null]);
                        slider.noUiSlider.set([null, squareFootageMax]);
                    }

                } else {
                    var allRows = grid.find('tbody tr');
                    allRows.hide();

                    var rowIndex = 0;

                    allRows.each(function () {
                        var tr = $(this);
                        if (tr.hasClass('space-level-child')) {
                            if (rowIndex < numberOfRowsToDisplay) {
                                tr.show();
                            }
                            rowIndex += 1;
                        } else if (rowIndex < numberOfRowsToDisplay) {
                            tr.show();
                        }
                    });
                }
            }

            displayRows(false);

            var levelDropDownContainer = wrapper.find('.level-dropdown-toggle');
            var levelDropDownHeading = levelDropDownContainer;

            var applyLevelFilter = function () {
                console.log("applylevelFilter called");
                var value = levelDropDownHeading.html();
                console.log("value = ", value);

                var displayAllLevels = value === levelDropDownHeading.data('all-levels');
                console.log("displayAllLevels = ", displayAllLevels);

                if (displayAllLevels === false) {
                    var allRows = grid.find('tbody tr');
                    allRows.each(function () {
                        var tr = $(this);
                        if (tr.data('level') !== value) {
                            console.log("tr.data('level') ", tr.data('level'));
                            tr.hide();
                        }
                    });
                }
            }

            grid.find('span[data-title]').each(function () {

                var sp = $(this);

                sp.tooltipster({
                    content: sp.attr('data-title'),
                    trigger: 'custom',
                    triggerOpen: {
                        click: true,
                        tap: true,
                        mouseenter: true
                    },
                    triggerClose: {
                        mouseleave: true,
                        originClick: true,
                        touchleave: true
                    },
                    onlyOne: true,
                    contentAsHTML: false,
                    interactive: true,
                    position: 'bottom'
                });

                sp.on( 'focus', function() {
				    $(this).tooltipster('open');
			    });
			    sp.on( 'blur', function() {
				    $(this).tooltipster('close');
			    });

            });

            var initGridColumns = function () {

                if ($window.width() > 968) {
                    var listTr = grid.find('tbody .space-level-child');
                    if (listTr.length > 0) {

                        var tr = $(listTr.get(0));
                        var listTd = tr.find('th, td');

                        if (listTd.length > 2) {
                            var firstTd = $(listTd.get(0));
                            var secondTd = $(listTd.get(1));

                            var firstWidth = firstTd.outerWidth();
                            var secondWidth = secondTd.outerWidth();

                            var numberOfColumns = listTd.length - 1;
                            var gridWidth = grid.width();

                            var lastColumnWidth = gridWidth - firstWidth - (secondWidth * (numberOfColumns - 1)) - 4;
                            var lastColumnWidthLevelHeader = gridWidth - firstWidth - 4;

                            if (gridWidth > (firstWidth + (numberOfColumns * secondWidth))) {


                                grid.addClass('no-h-scroll').parent().addClass('no-h-scroll');

                                grid.find('.space-level-header').each(function () {
                                    var currentTr = $(this);
                                    currentTr.find('td').last().css('width', (lastColumnWidthLevelHeader) + 'px');
                                });

                                grid.find('.space-level-child').each(function () {
                                    var currentTr = $(this);
                                    currentTr.find('td').last().css('width', (lastColumnWidth) + 'px');
                                });

                                grid.find('.spaces-grid-header').each(function () {
                                    var currentTr = $(this);
                                    currentTr.find('th').last().css('width', (lastColumnWidth) + 'px').find('.heading').css('padding', 0).css('width', '100%');
                                });
                            }
                        }
                    }
                }
            }

            initGridColumns();

            var initGridIsInProgress = false;
            $window.resize(function () {
                if (initGridIsInProgress === false) {
                    initGridIsInProgress = true;

                    setTimeout(function () {
                        initGridColumns();
                        initGridIsInProgress = false;
                    },
                        500);
                }
            });

            var addToRfpIndex = 0;

            grid.find('.add-to-rfp').each(function () {

                addToRfpIndex += 1;
                var ariaControlsId = 'add-to-rfp-tooltip-' + addToRfpIndex;

                var lnk = $(this);

                lnk.attr('aria-controls', ariaControlsId);
                lnk.attr('aria-expanded', false);

                lnk.keypress(function(e) {
                    if (e.keyCode === 32) {
                        e.preventDefault();
                        e.stopPropagation();

                        lnk.tooltipster('open');
                    }
                });

                var btnModalAddToRfp = $('a.btn-add-to-rfp[data-space="' + lnk.attr('data-space') + '"], button.btn-add-to-rfp[data-space="' + lnk.attr('data-space') + '"]');
                var textAddToRfp = lnk.attr('data-text-add-to-rfp');
                var textAddedToRfp = lnk.attr('data-text-added-to-rfp');

                var container = $('<div />');
                container.attr('id', ariaControlsId);
                container.addClass('tooltip-container');
                //var lnkAddToRfp = $('<button />');
                // lnkAddToRfp.attr('href', 'javascript:void(0)');
                //lnkAddToRfp.attr('tabindex', '0');

                var lnkAddToRfp = $('<a/>');
                lnkAddToRfp.attr('href', 'javascript:void(0)');
                //lnkAddToRfp.attr('tabindex', '0');

                if (btnModalAddToRfp.hasClass('disabled')) {
                    lnkAddToRfp.html(textAddedToRfp);
                    lnkAddToRfp.addClass('disabled');
                } else {
                    lnkAddToRfp.html(textAddToRfp);
                }

                var addToRfp = function() {
                    var $this = $(this);
                    if (!$this.hasClass('disabled')) {
                        $this.addClass('disabled');
                        $this.attr('disabled');
                        $this.html(textAddedToRfp);
                        btnModalAddToRfp.trigger('click');
                    };
                }

                lnkAddToRfp.click(function () {
                  
                    var funAddToRfp = addToRfp.bind(this);
                    funAddToRfp();
                });

                lnk.after(container);
                container.hide();

                lnkAddToRfp.keydown(function (e) {
                  
                    if (e.keyCode === 9) {

                        console.log('tab');
                        e.preventDefault();
                        e.stopPropagation();

                        lnk.focus();
                        lnk.tooltipster('close');
                    } else if (e.keyCode === 32) {
                        e.preventDefault();
                        e.stopPropagation();
                        var funAddToRfp = addToRfp.bind(this);
                        funAddToRfp();
                    }
                });

                container.append(lnkAddToRfp);
                lnk.tooltipster({
                    content: container,
                    contentCloning: true,
                    trigger: 'custom',
                    triggerOpen: {
                        click: true,
                        tap: true
                    },
                    triggerClose: {
                        mouseleave: true,
                        originClick: true,
                        touchleave: true
                    },
                    onlyOne: true,
                    contentAsHTML: true,
                    interactive: true,
                    position: 'bottom',
                    theme: 'tooltipster-default tooltipster-spaces',

                    functionPosition: function(instance, helper, position){
                        
                        position.coord.left += 15;
                        return position;
                    },

                    functionReady: function (instance, helper) {

                        lnk.attr('aria-expanded', true);

                        $(helper.tooltip).find('.tooltip-container').css('display', 'flex').removeAttr('id');

                        if (btnModalAddToRfp.hasClass('disabled')) {
                            lnkAddToRfp.html(textAddedToRfp);
                            lnkAddToRfp.addClass('disabled');
                        }

                        $('.tooltipster-spaces').css('left', '+=' + '20px');
                        $('.tooltipster-spaces .tooltipster-arrow').css('left', '-=' + '20px');

                        setTimeout(function() {

                            lnk.tooltipster('reposition');
                            $(helper.tooltip).find('a').focus();
                        }, 25);

                        
                    },
                    functionAfter: function() {
                        lnk.attr('aria-expanded', false);
                    }
                });
            });

            var closeFilters = function () {
                wrapper.find('.spaces-filter').removeClass('filter-open');
            }

            var eventSize;
            var min;
            var max;
            var spaceFilterCaption = $('.spaces-filter .mobile-view-filters span');

            var updateMobileSpacesFilterCaption = function (number) {

                var text = spaceFilterCaption.data('text');

                if (number === 0) {
                    spaceFilterCaption.html(text);
                } else {
                    spaceFilterCaption.html(text + ' (' + number + ')');
                }
            }

            var applyRoomSizeFilter = function () {
                var isApplied = false;

                min = parseInt(txtRoomSizeMin.val());
                max = parseInt(txtRoomSizeMax.val());

                if (!min || isNaN(min)) {
                    min = squareFootageMin;
                } else if (min !== squareFootageMin) {
                    isApplied = true;
                }

                if (!max | isNaN(max)) {
                    max = squareFootageMax;
                } else if (max !== squareFootageMax) {
                    isApplied = true;
                }

                grid.find('.space-level-header').show();

                grid.find('td[data-square-footage]').each(function () {

                    var td = $(this);
                    var value = td.data('square-footage');
                    var result = parseInt(value);

                    if (result >= min && result <= max) {
                        td.parent().show();
                    } else {
                        td.parent().hide();
                    }
                });

                if (isApplied) {
                    roomSizeFilterHead.addClass('filter-applied');
                    roomSizeFilterHead.attr('aria-label', 'The room size filter has been applied');
                } else {
                    roomSizeFilterHead.removeClass('filter-applied');
                    roomSizeFilterHead.removeAttr('aria-label');
                }

                return isApplied;
            }

            var applyEventSizeFilter = function () {

                eventSize = parseInt(txtEventSize.val());
                var isApplied = false;

                if (isNaN(eventSize) || !eventSize) {
                    eventSize = 0;
                } else {
                    isApplied = true;
                }

                if (isApplied) {
                    eventSizeFilterHead.addClass('filter-applied');
                    eventSizeFilterHead.attr('aria-label', 'The event size filter has been applied');
                } else {
                    eventSizeFilterHead.removeClass('filter-applied');
                    eventSizeFilterHead.removeAttr('aria-label');
                }

                if (eventSize === 0) {
                    return isApplied;
                }

                grid.find('.space-level-child').each(function () {
                    var tr = $(this);
                    var capacities = tr.find('td[data-standard]');

                    var hideRow = true;

                    capacities.each(function () {
                        var td = $(this);
                        var value = parseInt(td.find('span').html());

                        if (isNaN(value) || value >= eventSize) {
                            hideRow = false;
                        }
                    });

                    if (hideRow) {
                        tr.hide();
                    }
                });

                return isApplied;
            }

            var applyFilters = function () {

                var isRoomSizeApplied = applyRoomSizeFilter();
                var isEventSizeApplied = applyEventSizeFilter();

                var numberOfAppliedFilters = 0;

                if (isRoomSizeApplied) {
                    numberOfAppliedFilters += 1;
                }

                if (isEventSizeApplied) {
                    numberOfAppliedFilters += 1;
                }

                updateMobileSpacesFilterCaption(numberOfAppliedFilters);
                applyLevelFilter();

                grid.find('.space-level-header').each(function () {
                    var tr = $(this);
                    var childItems = grid.find('.space-level-child[data-level="' + tr.attr('data-level') + '"]:visible');
                    if (childItems.length === 0) {
                        tr.hide();
                    }
                });


                btnViewAll.removeClass('btn-view-less');
                btnViewAll.text(btnViewAll.attr('data-text-view-all'));

                var container = $(".spaces-grid-container");

                if (min === squareFootageMin &&
                    squareFootageMax === max &&
                    eventSize === 0 &&
                    levelDropDownHeading.data('all-levels') === levelDropDownHeading.html()) {
                    displayRows(false);
                    container.removeClass("show-all-rows");
                    btnViewAll.attr("aria-expanded", false);
                    btnViewAll.removeClass('filters-applied');
                } else {
                    container.addClass("show-all-rows");
                    btnViewAll.attr("aria-expanded", true);
                    btnViewAll.addClass('filters-applied');
                }
            }

            var resetLevelDropDownHeading = function () {
                console.log("resetLevelDropDownHeading called");
                var allLevels = levelDropDownHeading.data('all-levels');
                console.log("allLevels from resetLevelDropDownHeading ", allLevels);
                levelDropDownHeading.html(allLevels);
                setTimeout(function () {
                    grid.find('#selected-text').html('testing');
                    console.log("selected text ", grid.find('#selected-text').html());
                }, 50);
            }

        // Custom level select/filter
        function levelDropdownFilter() {
            var filterWrapper;
            var container;
            var trigger;
            var selectedTextFloors;
            var selectedTextLevels;
            var optionsList;
            var options;
            var hiddenLevelField;
            var hiddenFloorField;
            var isExpanded = false;
            var fancyStylingButton;
            var levelDropdownToggle;
        
            filterWrapper = document.getElementById("level-dropdown-container");
            container = document.querySelector("#level-dropdown-container .level-custom-filter");
            trigger = document.getElementById("level-trigger");
            selectedTextFloors = document.querySelector("#level-dropdown-container #selected-text-floors");
            selectedTextLevels = document.querySelector("#level-dropdown-container #selected-text-levels");
            optionsList = document.querySelector("#level-dropdown-container .level-custom-filter .options");
            options = document.querySelectorAll("#level-dropdown-container .level-custom-filter .options li");
            fancyStylingButton = document.querySelector("#level-dropdown-container #styling-toggle");
            hiddenLevelField = document.querySelector("#level-dropdown-container #hidden-level-dropdown-field");
            hiddenFloorField = document.querySelector("#level-dropdown-container #hidden-floor-dropdown-field");
            levelDropdownToggle = document.querySelector(".level-dropdown-toggle");
        
            // Handle keyboard and mouse interactions on the level-dropdown-toggle
            levelDropdownToggle.addEventListener("keydown", handleFilterWithKeypresses);
            levelDropdownToggle.addEventListener("click", handleFilterClick);
        
            // Handle keyboard and mouse interactions on the trigger bar
            trigger.addEventListener("keydown", handleTriggerKeypresses);
            trigger.addEventListener("click", handleTriggerClick);
        
            // Select options when they are clicked
            // jkg-ie options.forEach(function (option) {
			for(let index=0; index < options.length; ++index )	{
				if (options[index]) {
					options[index].addEventListener("click", function (e) {
						unselectAllOptions();
						selectOption(e.target);
						collapseOptions();
					});
				}
            }
        
            function handleFilterClick(e) {
                e.preventDefault();
                levelDropdownToggle.classList.add("open");
        
                setTimeout(function () {
                    trigger.click();
                    trigger.focus();
                }, 25);
            }
        
            function handleFilterWithKeypresses(e) {
                e.preventDefault();

                // to overcome focus trap
                // focus next element - Tab
                if ( e.code === 'Tab') {
                    focusNextElement(false).focus();
                }

                // focus previous element - Shift + Tab
                if (e.shiftKey && e.code === 'Tab') {
                    focusNextElement(true).focus();
                }

                if (e.code === "Space" || e.code === "Enter") {
                    handleFilterClick(e);
                }
            }
        
            // Collapse the dropdown when the user clicks off
            document.addEventListener("click", handleBodyClick);
        
            // Event handlers
            function handleTriggerKeypresses(e) {
                switch (e.key) {
                    case "ArrowUp":
                        e.preventDefault();
        
                        if (isExpanded) {
                            selectPreviousOption();
                        } else {
                            expandOptions();
                        }
        
                        break;
        
                    case "ArrowDown":
                        e.preventDefault();
        
                        if (isExpanded) {
                            selectNextOption();
                        } else {
                            expandOptions();
                            selectFirstOption();
                        }
        
                        break;
        
                    case "Home":
                        e.preventDefault();
        
                        if (isExpanded) {
                            selectFirstOption();
                        }
        
                        break;
        
                    case "End":
                        e.preventDefault();
        
                        if (isExpanded) {
                            selectLastOption();
                        }
        
                        break;
        
                    case "Tab":
                        collapseOptions();
                        break;
        
                    case "Escape":
                    case "Enter":
                        if (isExpanded) {
                            e.preventDefault();
                            collapseOptions();
                        }
        
                        break;
                }
            }
        
            function handleBodyClick(e) {
                if (!container.contains(e.target) && isExpanded) {
                    collapseOptions();
                }
            }
        
            function handleTriggerClick() {
                if (isExpanded) {
                    collapseOptions();
                    trigger.focus();
                } else {
                    expandOptions();
                }
            }
        
            // Show/hide option list
            function collapseOptions() {
                trigger.setAttribute("aria-expanded", false);
                filterWrapper.classList.remove("open");
                optionsList.classList.remove("is-visible");
                isExpanded = false;
                applyFilters();
                levelDropdownToggle.focus();
            }
        
            function expandOptions() {
                trigger.setAttribute("aria-expanded", true);
                filterWrapper.classList.add("open");
                optionsList.classList.add("is-visible");
                isExpanded = true;
            }
        
            // Option selection
            function selectFirstOption() {
                var firstOption = options[0];
                selectOption(firstOption);
            }
        
            function selectLastOption() {
                var lastOption = options[options.length - 1];
                selectOption(lastOption);
            }
        
            function selectNextOption() {
                var currentOption = document.getElementById(trigger.getAttribute("aria-activedescendant"));
                console.log("currentOption ", currentOption);
        
                if (currentOption !== undefined) {
                    var currentOptionIndex = Array.prototype.slice.call(options).indexOf(currentOption);
                    console.log("currentOptionIndex ", currentOptionIndex);
        
                    if (currentOptionIndex + 1 < options.length) {
                        var nextOption = options[currentOptionIndex + 1];
                        console.log("nextOption ", nextOption);
        
                        selectOption(nextOption);
                    }
                }
            }
        
            function selectPreviousOption() {
                var currentOption = document.getElementById(trigger.getAttribute("aria-activedescendant"));
        
                if (currentOption !== undefined) {
                    var currentOptionIndex = Array.prototype.slice.call(options).indexOf(currentOption);
        
                    if (currentOptionIndex - 1 >= 0) {
                        var previousOption = options[currentOptionIndex - 1];
                        selectOption(previousOption);
                    }
                }
            }
        
            function selectOption(option) {
                unselectAllOptions();
                option.setAttribute("aria-selected", true);
                trigger.setAttribute("aria-activedescendant", option.getAttribute("id"));
                if (selectedTextFloors) {
                    selectedTextFloors.innerHTML = option.innerHTML;
                }
                if (selectedTextLevels) {
                    selectedTextLevels.innerHTML = option.innerHTML;
                }
        
                // Update the hidden field
                if (hiddenLevelField) {
                    hiddenLevelField.value = option.innerHTML;
                }
                if (hiddenFloorField) {
                    hiddenFloorField.value = option.innerHTML;
                }
        
                // Update the level dropdown toggle
                levelDropdownToggle.innerHTML = option.innerHTML;
            }
        
            function unselectAllOptions() {
				// jkg-ie
				for(let index=0; index < options.length; ++index )	{
					if (options[index]) {
						options[index].removeAttribute("aria-selected");
					}
				}
            }

            function focusNextElement( reverse, activeElem ) {
                /*check if an element is defined or use activeElement*/
                activeElem = activeElem instanceof HTMLElement ? activeElem : document.activeElement;
              
                let queryString = [
                    'a:not([disabled]):not([tabindex="-1"])',
                    'button:not([disabled]):not([tabindex="-1"])',
                    'input:not([disabled]):not([tabindex="-1"])',
                    'select:not([disabled]):not([tabindex="-1"])',
                    '[tabindex]:not([disabled]):not([tabindex="-1"])'
                    /* add custom queries here */
                  ].join(','),
                  queryResult = Array.prototype.filter.call(document.querySelectorAll(queryString), 
				  function(elem) {
                    /*check for visibility while always include the current activeElement*/
                    return elem.offsetWidth > 0 || elem.offsetHeight > 0 || elem === activeElem;
                  }),
                  indexedList = queryResult.slice().filter(function(elem) {
                    /* filter out all indexes not greater than 0 */
                    return elem.tabIndex == 0 || elem.tabIndex == -1 ? false : true;
                  }).sort( function(a, b) {
                    /* sort the array by index from smallest to largest */
                    return a.tabIndex != 0 && b.tabIndex != 0 
                      ? (a.tabIndex < b.tabIndex ? -1 : b.tabIndex < a.tabIndex ? 1 : 0) 
                      : a.tabIndex != 0 ? -1 : b.tabIndex != 0 ? 1 : 0;
                  }),
                  focusable = [].concat(indexedList, queryResult.filter(function(elem) {
                    /* filter out all indexes above 0 */
                    return elem.tabIndex == 0 || elem.tabIndex == -1 ? true : false;
                  }));
              
                /* if reverse is true return the previous focusable element
                   if reverse is false return the next focusable element */
                return reverse ? (focusable[focusable.indexOf(activeElem) - 2] || focusable[focusable.length - 2]) 
                  : (focusable[focusable.indexOf(activeElem) + 1] || focusable[0]);
            }
        }
    
        levelDropdownFilter(); 

            socialDistancingCapacitiesLinks.click(function () {
                socialDistancingCapacitiesLinks.removeClass('active');
                var lnk = $(this);
                lnk.addClass('active');

                var mode = lnk.attr('data-capacities');

                grid.find('tbody td[data-' + mode + ']').each(function () {
                    var td = $(this);
                    var val = td.attr('data-' + mode);
                    var span = td.find('span');
                    span.hide();
                    span.html(val);
                    span.fadeIn(1000);
                });

                applyFilters();
            });

            wrapper.find('.apply-all-filters').click(function () {
                closeFilters();
                applyFilters();
            });

            wrapper.find('.close-filter-mobile').click(function () {
                closeFilters();
            });

            grid.find('td[data-square-footage]').each(function () {
                var td = $(this);
                var value = td.data('square-footage');
                var result = parseInt(value);

                if (squareFootageMin === 0 || result < squareFootageMin) {
                    squareFootageMin = result;
                }
                if (squareFootageMax === 0 || result > squareFootageMax) {
                    squareFootageMax = result;
                }
            });

            txtRoomSizeMin.val(squareFootageMin);
            txtRoomSizeMax.val(squareFootageMax);

            if (squareFootageMin === squareFootageMax) {
                squareFootageMin = 0;
            }
            if (squareFootageMax === 0) {
                squareFootageMax = 100;
            }

            $('.room-size-filter .apply-filter').click(function () {
                applyFilters();
            });

            $('.event-size-filter .apply-filter').click(function () {
                applyFilters();
            });

            btnViewAll.on('click', function (e) {
                var currentScrollPosition = $window.scrollTop();
                var container = $('.spaces-grid-container');
                var btn = $(this);

                var showAllRows = btn.hasClass('filters-applied');

                if (showAllRows === false) {
                    showAllRows = btn.hasClass('btn-view-less') === false;
                }

                displayRows(showAllRows);

                if (showAllRows) {
                    resetLevelDropDownHeading();
                    btn.text(btn.data('text-view-less'));
                    btn.removeClass('filters-applied');
                    container.addClass('show-all-rows');
                    btn.attr("aria-expanded", true);
                    btn.addClass('btn-view-less');
                }
                else {
                    btn.text(btn.data('text-view-all'));
                    container.removeClass('show-all-rows');
                    btn.attr("aria-expanded", false);
                    btn.removeClass('btn-view-less');
                }

                $window.scrollTop(currentScrollPosition);

                setTimeout(function () {
                    if (Waypoint) {
                        Waypoint.refreshAll();
                    }
                },
                    50);
            });
        });

        if (noUiSlider) {
            $('.slider-wrapper').each(function () {
                var wrapper = $(this);

                var txtMinMax = wrapper.find('.slider-value');
                var txtMin = txtMinMax.get(0);
                var txtMax = txtMinMax.get(1);

                wrapper.find('.omni-nouislider').each(function () {

                    slider = this;

                    noUiSlider.create(this, {
                        start: [squareFootageMin, squareFootageMax],
                        connect: true,
                        range: {
                            'min': squareFootageMin,
                            'max': squareFootageMax
                        }
                    });

                    slider.noUiSlider.on('update',
                        function (values, handle) {
                            var value = values[handle];
                            if (handle) {
                                txtMax.value = Math.round(value);
                            } else {
                                txtMin.value = Math.round(value);
                            }
                        });

                    txtMin.addEventListener('change', function () {

                        slider.noUiSlider.set([this.value, null]);
                    });

                    txtMax.addEventListener('change', function () {

                        slider.noUiSlider.set([null, this.value]);
                    });

                });
            });
        }
    });

    $('.btn-add-to-rfp').click(function () {
        var btn = $(this);
        if (btn.hasClass('disabled')) {
            return;
        }
        var addedToRfpText = btn.attr('data-added-to-rfp-text');
        btn.html(addedToRfpText);
        btn.addClass('disabled');
        btn.attr('disabled',true);

        var space = btn.attr('data-space');
        var rawAddedSpaces = Cookies.get('omni-rfp-spaces');

        var pageUrl = window.location.href.split(window.location.search || window.location.hash || /[?#]/)[0];

        var addedSpaces = {
            url: pageUrl,
            spaces: [],
            eventSize: 0,
            roomSize: [0, 0]
        };
        if (rawAddedSpaces) {
            var parsed = JSON.parse(rawAddedSpaces);

            if (parsed.url === pageUrl) {
                addedSpaces = parsed;
            }
        }

        if (!_.contains(addedSpaces.spaces, space)) {
            addedSpaces.spaces.push(space);
        }

        addedSpaces.eventSize = $('#eventSize').val();
        addedSpaces.roomSize = [$('#roomSizeMin').val(), $('#roomSizeMax').val()];

        var inOneHour = new Date(new Date().getTime() + 60 * 60 * 1000);
        Cookies.set('omni-rfp-spaces', JSON.stringify(addedSpaces), { expires: inOneHour });

        $('.btn-add-to-rfp[data-space="' + space + '"]').addClass('disabled').html(addedToRfpText);
    });

    $(function () {
        $('#rfp-comments').each(function () {
            var comments = $(this);
            var rawAddedSpaces = Cookies.get('omni-rfp-spaces');
            if (rawAddedSpaces) {
                var parsed = JSON.parse(rawAddedSpaces);
                var pageUrl = window.location.href.split(window.location.search || window.location.hash || /[?#]/)[0];
                if (pageUrl.indexOf(parsed.url) >= 0) {

                    var data = 'Rooms: ' + parsed.spaces.join(', ');

                    var eventSize = '-';
                    if (parsed.eventSize) {
                        eventSize = parsed.eventSize;
                    }

                    if (eventSize !== '-') {
                        data += '; Event Size: ' + eventSize;
                    }

                    var roomSize = '-';
                    if (parsed.roomSize) {
                        if (parsed.roomSize[0] && parsed.roomSize[1]) {
                            roomSize = parsed.roomSize[0] + ' - ' + parsed.roomSize[1];
                        }
                    }

                    if (roomSize !== '-') {
                        data += '; Room Size: ' + roomSize;
                    }

                    comments.val(data);
                    //Cookies.remove('omni-rfp-spaces');
                }
            }
        });

        var initOffers = function () {
            var refreshOffers = function () {
                $('.occasions-offers-body .occasions-offers-card-wrapper').each(function () {
                    var wrapper = $(this);
                    var container = wrapper.find('.occasions-offers-card-container');
                    var content = container.find('.offer-content');
                    var links = wrapper.find('.plp-tertiary-link-arrow');

                    wrapper.removeClass('expand');
                    container.removeClass('expand');

                    var containerHeight = container.height() - 50;

                    links.hide();
                    wrapper.addClass('expand');
                    container.addClass('expand');

                    setTimeout(function () {
                        if (containerHeight < content.outerHeight()) {
                            wrapper.removeClass('expand');
                            container.removeClass('expand');
                            links.show();
                        }
                    }, 50);


                });
            }

            refreshOffers();

            var isOfferRefreshBusy = false;
            $window.resize(function () {
                if (!isOfferRefreshBusy) {
                    isOfferRefreshBusy = true;
                    setTimeout(function () {
                        refreshOffers();
                        isOfferRefreshBusy = false;
                    }, 1000);
                }
            });
        }

        initOffers();


        //$('.digex-photogallery-content-wrapper img').bicubicImgInterpolation({
        //    crossOrigin: 'anonymous' //otherwise browser security error is triggered
        //});
    });

    function heroContentHeight() {
        if ($("window").width() < 768) {
            var heroContentHeight = $(".occasions-hero-text-container").outerHeight() + 150;
            $(".occasions-hero-image-wrapper.digex-bg-image").css("height", heroContentHeight + "px");
        }
    };

    $(window).on('load resize', function () {
        heroContentHeight();
    });
})(window, jQuery);

var digex = digex || {};
digex.offers = (function (window, $) {
    //https://momentjs.com/timezone/
    //https://www.iana.org/time-zones
    //https://momentjs.com/timezone/docs/#/data-loading/

    var timeZone = 'America/New_York';

    moment.tz.load({
        zones : ['America/New_York|EST EDT EWT EPT|50 40 40 40|01010101010101010101010101010101010101010101010102301010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-261t0 1nX0 11B0 1nX0 11B0 1qL0 1a10 11z0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 11z0 1o10 11z0 RB0 8x40 iv0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|21e6'],
        links : [timeZone],
        version : '2019c'
    });

    moment.tz.add('America/New_York|EST EDT EWT EPT|50 40 40 40|01010101010101010101010101010101010101010101010102301010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-261t0 1nX0 11B0 1nX0 11B0 1qL0 1a10 11z0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 11z0 1o10 11z0 RB0 8x40 iv0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|21e6');
    moment.tz.link(timeZone);


    var $j = $;

    var $document = $(document);
    var $window = $(window);
    var bookingBar;
    var offerListingResults = null;
    var offerListingResultsBusy = false;
    var lnkOfferListLoadMore = $('#lnkOfferListLoadMore');
    var divSelectedFilters = null;

    var modalCallToOmni = $('#call-to-omni-modal');

    var modalReplaceOfferConfirmation = $('#dates-error-modal');
    var modalReplaceOfferConfirmationContent = modalReplaceOfferConfirmation.find('.error-modal-content');
    var modalReplaceOfferConfirmationContentHtml = modalReplaceOfferConfirmationContent.html();

    var currentOffer = null;
    var nextOffer = null;
    var nextOfferLnk = null;

    var applyOfferConfirmation = function ($this, offerData) {
        nextOfferLnk = $this;
        nextOffer = offerData;

        var content = modalReplaceOfferConfirmationContentHtml.replace(/\[CurrentOfferName\]/g, currentOffer.offerTitle);
        content = content.replace(/\[NewOfferName\]/g, offerData.offerTitle);

        modalReplaceOfferConfirmationContent.html(content);
        modalReplaceOfferConfirmation.modal({ showClose: false });
    };

    var replaceOffer = function ($this, offerData) {
        currentOffer = offerData;

        $('a[data-is-offer]').each(function() {
            var lnk = $(this);
            lnk.text(lnk.attr('data-apply-offer-text'));
            lnk.removeClass('disabled');
        });

        $this.text($this.attr('data-offer-applied-text'));
        $this.addClass('disabled');

        $('a[data-hotel-id="' + offerData.hotelId + '"][data-package-code="' + offerData.packageCode + '"]').addClass('disabled')
            .text($this.attr('data-offer-applied-text'));

        bookingBar.trigger('applyOffer', [offerData]);


        if ($window.width() > 767 && $this.parents('.offers-hero').length > 0) {
            setTimeout(function() {
                $document.scrollTop($this.offset().top - 75);
            }, 500);

        }
    };

    var getSelectedLocations = function () {

        var selectedLocations = [];


        if ($(window).width() < 768) {
            $('.filters-wrapper :checked').each(function() {
                var chk = $(this);
                if (chk.data('type') === 'Location') {
                    selectedLocations.push(chk.val());
                } 
            });
        } else {
            divSelectedFilters.find('.filter-tag').each(function() {
                var tag = $(this);
               
                if (tag.data('type') === 'Location') {
                    selectedLocations.push(tag.data('value'));
                } 
            });
        }

        return selectedLocations;
    }

    var applyOffer = function ($this) {

        var selectedLocations = getSelectedLocations();
        var packageCode = $this.attr('data-package-code');
        var disableBookNow = $this.attr('data-disable-book-now');
        var preApplied = $this.attr('data-preapplied');
        $this.attr('data-preapplied', '');

        if (!packageCode || (disableBookNow && disableBookNow === 'true')) {

            var propertyName = $this.attr('data-property-name');
            var propertyPhone = $this.attr('data-property-phone');

            modalCallToOmni.find('.modal-content').show();

            var propertyContent = modalCallToOmni.find('.modal-content-property');
            propertyContent.hide();

            if (propertyName && propertyPhone) {

                var content = propertyContent.attr('data-text');

                content = content.replace(/\{0\}/, propertyName);
                content = content.replace(/\{1\}/, propertyPhone);

                modalCallToOmni.find('.modal-content').hide();

                var p = $('<p/>');
                p.html(content);

                propertyContent.html(p);
                propertyContent.show();

                modalCallToOmni.find('.digex-primary-cta').attr('href', 'tel:' + propertyPhone);
            }

            modalCallToOmni.modal({ showClose: false });
            return;
        }

        var offerAppliedText = $this.attr('data-offer-applied-text');
        var offerTitle = $this.attr('data-offer-title');
        var startDate = $this.attr('data-available-start-date');
        var endDate = $this.attr('data-available-end-date');
        var bookByDate = $this.attr('data-book-by-date');
        var hotelId = $this.data('hotel-id');
        var properties = $this.attr('data-properties').split(',');
        var queryParam = $this.attr('data-query-param');

        var participatingLocationsText = $this.attr('data-participating-locations-text');
        var otherLocationsText = $this.attr('data-other-locations-text');

        if (!hotelId && properties && properties.length === 1) {
            hotelId = properties[0];
        }

        var offerData = {
            hotelId: hotelId,
            packageCode: packageCode,
            text: offerAppliedText,
            offerTitle: offerTitle,
            availableStartDate: startDate,
            availableEndDate: endDate,
            properties: properties,
            participatingLocationsText: participatingLocationsText,
            otherLocationsText: otherLocationsText,
            preApplied: preApplied,
            queryStringParam: queryParam,
            bookByDate: bookByDate,
            selectedLocations: selectedLocations
        };

        if (currentOffer === null) {
            currentOffer = offerData;
            replaceOffer($this, offerData);

        } else {
            if (currentOffer.packageCode !== offerData.packageCode) {
                applyOfferConfirmation($this, offerData);
            } else {
                replaceOffer($this, offerData);
            }
        }
    };

    modalReplaceOfferConfirmation.find('.replace').click(function() {
        replaceOffer(nextOfferLnk, nextOffer);
        $.modal.close();
    });

    modalReplaceOfferConfirmation.find('.cancel').click(function() {
        nextOffer = null;
        nextOfferLnk = null;
        $.modal.close();
    });

    var scrollTo = function (selector) {
        try {
            var tag = $(selector);
            $document.scrollTop(tag.offset().top - 75);
        } catch (error) {
            // selector is invalid. do nothing.
        }
    };

    var processImages = function () {
            digex.bgimage.processImages();
        };


    var shaveDescription = function() {
            $('.featured-offers-card-container .description:not(.shaved), .plp-resort-title-container .description:not(.shaved)').each(function () {
                var $this = $(this);
                var tags = $this.find('p');

                var htmlContent;

                if (tags.length > 0) {
                    htmlContent = tags.first().html();
                } else {
                    htmlContent = $this.html();
                }

                $this.replaceWith(function() {
                    return $('<p/>').addClass('description').html(htmlContent);
                });
            });

            $('.featured-offers-card-container .description:not(.shaved)').addClass('shaved').shave(84);

            $('.plp-resort-title-container .description:not(.shaved)').addClass('shaved').shave(69);

            $('.featured-offers-card-container .stay-dates span:not(.shaved)').addClass('shaved').shave(69);
        };

    var loadMore = function() {
            if (offerListingResultsBusy) {
                return;
            }

            var $this = lnkOfferListLoadMore;

            offerListingResultsBusy = true;



            var lnk = $this.find('a');
            lnk.addClass('busy');

            var nextPage = parseInt($this.attr('data-next-page'));
            var offerLandingPageId = $this.attr('data-offer-landing-page-id');
            var offerListingDataSourceId = $this.attr('data-offer-listing-datasource-id');
            var pageCount = parseInt($this.attr('data-page-count'));

            var propertyId = $this.attr('data-property-id');
            var propertyUrl = $this.attr('data-property-url');

            var selectedLocations = [];
            var selectedCategories = [];

            if ($(window).width() < 768) {
                $('.filters-wrapper :checked').each(function() {
                    var chk = $(this);
                    if (chk.data('type') === 'Location') {
                        selectedLocations.push(chk.val());
                    } else if (chk.data('type') === 'Category') {
                        selectedCategories.push(chk.val());
                    }
                });
            } else {
                divSelectedFilters.find('.filter-tag').each(function() {
                    var tag = $(this);
                    //console.log(tag.data('type'));
                    if (tag.data('type') === 'Location') {
                        selectedLocations.push(tag.data('value'));
                    } else if (tag.data('type') === 'Category') {
                        selectedCategories.push(tag.data('value'));
                    }
                });
            }

            var startDate = moment($j('#date-start-input').val(), 'MMMM DD, YYYY');
            var endDate = moment($j('#date-end-input').val(), 'MMMM DD, YYYY');

            var model = {
                page: nextPage,
                offerLandingPageId: offerLandingPageId,
                offerListingDataSourceId: offerListingDataSourceId,
                sortBy: 0,
                propertyId: propertyId,
                propertyUrl: propertyUrl,
                selectedLocations: selectedLocations,
                selectedCategories: selectedCategories,
                startDate: startDate.format('MM-DD-YYYY'),
                endDate: endDate.format('MM-DD-YYYY')
            };

            var json = JSON.stringify(model);
            var hasMorePages = pageCount - 1 > nextPage;

            var urlParameters = {
                locations: _.map(selectedLocations, function(name) { return name.toLowerCase(); })
            };

            addParametersToUrlHash(urlParameters);

            $.ajax({
                url: '/api/sitecore/offer/GetOfferList'.toLowerCase(),
                type: 'POST',
                dataType: 'html',
                data: json,
                contentType: 'application/json; charset=utf-8'
            }).done(function(data) {

                offerListingResults.append(data);

                if (hasMorePages) {
                    $this.attr('data-next-page', nextPage + 1);
                    $this.show();
                } else {
                    $this.hide();
                }

                offerListingResultsBusy = false;
                lnk.removeClass('busy');

                var hidden = offerListingResults.find('#OfferListPageCount');
                if (hidden.length > 0) {

                    pageCount = parseInt(hidden.val());
                    hasMorePages = pageCount - 1 >= nextPage + 1;

                    if (hasMorePages) {
                        $this.attr('data-page-count', hidden.val());
                    } else {
                        $this.hide();
                    }
                }

                shaveDescription();
                processImages();

            }).fail(function() {
                offerListingResultsBusy = false;
                lnk.removeClass('busy');
            });
    };

    var internalLoadOffers = function () {

        $j('#filterStayDates .filter-head .filter-input').html($('.dates-section-content .set-dates').html());

        if (offerListingResults && offerListingResults.length > 0) {
            lnkOfferListLoadMore.attr('data-next-page', 0);
            offerListingResults.html('');
            lnkOfferListLoadMore.show();
            loadMore();
        }
    };

    var applyHashParams = function() {
        var urlHashParams = getParametersFromUrlHash();
        var filterDestinations = $('#filterDestinations');
        var filterDestinationsBody = filterDestinations.find('.filter-body-items');

        if (filterDestinations.length === 0) {
            return;
        }

        if (urlHashParams) {
            if (urlHashParams.locations) {
                _.each(urlHashParams.locations,
                    function(location, index) {

                        filterDestinationsBody.find('input[type="checkbox"]').each(function(index, el) {

                            var $this = $(el);
                            var displayName = $this.attr('value').toLowerCase();

                            if (location === displayName) {
                                $this.prop('checked', true);
                            }
                        });
                    });
            }

            urlHashParams = null;

            if ($(window).width() >= 768) {
                //filterPropertyTypes.find('.apply-filter').trigger('click', [true]);
                filterDestinations.find('.apply-filter').trigger('click');
            } else {
                $('.plp-filter-mobile-apply button').trigger('click');
            }
        }
    };

    $(function () {

        var divTermsSelector = '#offer-terms-and-conditions';
        var divParticipatingLocations = '#participating-locations';

        if ($('.plp-page-edit-mode').length > 0) {
            // do nothing if page is in edit mode, otherwise any DOM manipulations, or the slick plugin will break the experience editor.
            return false;
        }

        $('.plp-offer-item').each(function() {
            var $this = $(this);
            var btn = $this.find('.plp-offer-button');

            btn.focusin(function () {
                $this.addClass('focus-in');
                $this.removeClass('focus-out');

                console.log('focus-in');
            });

            btn.focusout(function () {
                $this.removeClass('focus-in');
                $this.addClass('focus-out');

                console.log('focus-out');
            });
        });

        if ($('.offers-page').length === 0) {
            return false;
        }

        if (window.location.hash === divTermsSelector || window.location.hash === divParticipatingLocations || window.location.hash) {
            setTimeout(function () {
                scrollTo(window.location.hash);
            }, 500);
        }

        $('#filterStayDates a').click(function () {
            var lnk = $(this);
            var container = lnk.parent();
            var filterBody = container.find('.filter-body');
            setTimeout(function () {
                if (filterBody.find('#omniCalendar').length === 0) {
                    $('#omniCalendar').insertAfter(filterBody.find('.close-filter'));
                }

            }, 25);
        });

        setTimeout(function() {
                applyHashParams();
            },
            1500);

        bookingBar = $('div[data-component="plp-check-availability"]');
        offerListingResults = $('#offerListingResults');
        lnkOfferListLoadMore = $('#lnkOfferListLoadMore');
        offerListingResultsBusy = false;
        divSelectedFilters = $('.plp-selected-filters');

        shaveDescription();
        processImages();


        $('a[href="#offer-terms-and-conditions"], a[href="#participating-locations"], a[href="#special-offers"]').click(function (e) {

            var id = $(this).attr('href');

            e.preventDefault();
            e.stopPropagation();
            window.location.hash = id;
            scrollTo(id);
        });

        setTimeout(function () {
            var now = moment().tz(timeZone);
            $('.featured-offers-card-wrapper, .carousel-image-wrapper').each(function () {

                var offer = $(this);
                var bookByDateRaw = offer.attr('data-book-by-date');

                var textHrs = offer.attr('data-text-hrs');
                var textMins = offer.attr('data-text-mins');
                var textSecs = offer.attr('data-text-secs');
                var textDay = offer.attr('data-text-day');
                var textDays = offer.attr('data-text-days');

                var countdownStartDateRaw = offer.attr('data-countdown-start-date');
                if (countdownStartDateRaw === '0001-01-01') {
                    countdownStartDateRaw = null;
                }
                var isCountdownStartDate = false;
                

                if (bookByDateRaw) {

                    var bookByDate = moment.tz(bookByDateRaw, timeZone);
                    bookByDate.add(1, 'days');

                    var countdownStartDate = null;

                    if (countdownStartDateRaw) {
                        countdownStartDate = moment.tz(countdownStartDateRaw, timeZone);
                        isCountdownStartDate = now >= countdownStartDate;
                    }

                    var diff = bookByDate.diff(now, 'hours');

                    if ((diff < 24 || isCountdownStartDate) && diff >= 0) {

                        var offerContainer = offer;
                        var wrapper;

                        if (offer.hasClass('carousel-image-wrapper')) {
                            offerContainer = offer.parents('.carousel-hero-wrapper');
                            wrapper = offer;
                        } else {
                            wrapper = offerContainer.find('.featured-offers-image-wrapper');
                        }

                        offerContainer.removeClass('offers-hot');
                        offerContainer.removeAttr('data-message');
                        offerContainer.addClass('offers-countdown');

                        var diffMilliseconds = bookByDate.diff(now, 'milliseconds');
                        var interval = 1000;

                        var duration = moment.duration(diffMilliseconds, 'milliseconds');

                        var setDuration = function (){
                            duration = moment.duration(duration - interval, 'milliseconds');

                            //var text = duration.hours() + ' HRS ' + duration.minutes() + ' MINS ' + duration.seconds() + ' SECS';
                            //offer.attr('data-message', text);

                            var divCountDown = $('<div />');

                            divCountDown.addClass('offers-countdown');

                            if (diff > 24) {
                                divCountDown.append($('<span class="hour"/>').html(duration.days()));

                                if (duration.days() > 1) {
                                    divCountDown.append(' ' + textDays + ' ');
                                } else {
                                    divCountDown.append(' ' + textDay + ' ');
                                }
                            }

                            divCountDown.append($('<span class="hour"/>').html(duration.hours()));
                            divCountDown.append(' ' + textHrs + ' ');
                            divCountDown.append($('<span class="min"/>').html(duration.minutes()));
                            divCountDown.append(' ' + textMins + ' ');
                            divCountDown.append($('<span class="sec"/>').html(duration.seconds()));
                            divCountDown.append(' ' + textSecs );

                            wrapper.find('.offers-countdown').remove();
                            wrapper.append(divCountDown);
                        };

                        setInterval(function() {
                            setDuration();

                        }, interval);

                        setDuration();
                    }
                }
            });
        },
            1000);

        $(document).on('click', 'a[data-is-offer]',
            function(e) {
                e.stopPropagation();
                e.preventDefault();
                applyOffer($(this));
            }
        );

        if (lnkOfferListLoadMore.attr('data-has-more-pages') === 'false') {
            lnkOfferListLoadMore.hide();
        }

        lnkOfferListLoadMore.click(function () {

             loadMore();
        });

        $('.carousel-hero-wrapper a[data-is-offer="true"][data-disable-book-now="false"]:not([data-package-code=""])')
            .each(function () {
                var $this = $(this);
                $this.attr('data-preapplied', 'true');
                $this.click();
            });

        if ($('#filterStayDates').length > 0) {
            //setTimeout(function() { internalLoadOffers(); }, 100);
        }
    });


    $(".floating-promo-wrapper .floating-promo-trigger").on("click", function(e){
        $(".floating-promo-toggle").toggleClass("open");

    });

    if ($(document).width() >= 1024) {
        var timeoutFloatingPromo = setTimeout(function () {
            $(".floating-promo-toggle").removeClass("open");
        }, 5000);

        $(".floating-promo-wrapper .floating-promo-toggle").on("click", function(e){

            clearTimeout(timeoutFloatingPromo);

        });
    }


    $(".floating-promo-wrapper .close-dropdown").on("click", function(e){
        $('.floating-promo-toggle').toggleClass("open");
        $(".floating-promo-toggle").removeClass("clicked");
    });

    $(".floating-promo-wrapper .floating-promo-trigger-mobile").on("click", function(e){
        var $this = $(this);

        $this.next(".floating-promo-toggle").toggleClass("open");
        $this.toggleClass("open");
    });
    

    $j('.featured-offers-carousel').slick({
        dots: true,
        mobileFirst: true,
        slidesToShow: 1,
        slidesToScroll: 1,
        responsive: [
            {
                breakpoint: 1023,
                settings: {
                    slidesToShow: 3,
                    slidesToScroll: 3,
                }
            },
            {
            breakpoint: 767,
            settings: {
                slidesToShow: 2,
                slidesToScroll: 2,
            }
            }
        ]
    });

    if ($(window).width() > 767) {
        $('.carousel-hero-container').each(function () {
            var divContainer = $(this);
            var divDesc = divContainer.find('.description');

            var lnkViewMore = divContainer.find('.view-more');
            var lnkViewLess = divContainer.find('.view-less');

            if (divDesc.height() > 150) {
                divDesc.addClass("content-view-less");
                lnkViewMore.show();
            }

            lnkViewMore.click(function() {
                lnkViewLess.show();
                lnkViewMore.hide();
                divDesc.removeClass("content-view-less");
            });

            lnkViewLess.click(function() {
                lnkViewLess.hide();
                lnkViewMore.show();
                divDesc.addClass("content-view-less");
            });
        });
    }

    function floatingPromoPosition() {

        var warningBannerHeight = $j("#travel-advisory-covid-19-home").innerHeight();
        var newTopPosition = warningBannerHeight + 145 + "px";

        $j(".floating-promo-wrapper").css("top", newTopPosition);

        $j(window).on("scroll", function(){
            if ($j('.plp-subnav-links-wrapper.fixed').length > 0) {
                $j(".floating-promo-wrapper").css("top", "125px");
            }
            else {
                $j(".floating-promo-wrapper").css("top", newTopPosition);
            }
        });
    }

    if ($j("#travel-advisory-covid-19-home").length > 0) {
        floatingPromoPosition();
    }

    $j("#gha-redirection-modal .close-modal-btn").on("click", function(){
        $j("#gha-redirection-modal").removeClass("show");
    });

    return {
        applyOffer: function($this) {
            applyOffer($this);
        },
        load: function () {
            internalLoadOffers();
        }
    };

})(window, jQuery);

(function (window, $) {
    $(function () {
        $(document).on('click',
            '.plp-room-search-details .set-dates',
            function () {
                setTimeout(function() {
                    $('.dates-section .dates-section-content').click();
                }, 25);
            });
    });
})(window, jQuery);

(function (window, $) {
    $(function () {

        var scrollToMainContent = function () {
            setTimeout(function () {
                // checking about pages so we can skip over those links
                if ($('#leftNavigation').length > 0) {
                    $('main').find('#rightColumn').attr('tabindex', '0').focus();
                } else {
                    var items = $('main').find('button:visible, a[href]:visible, object:visible, :input:visible, iframe:visible, #rightColumn, [tabindex]');
                    items.first().focus();
                }
            }, 25);
        }

        var lnk = $('<a />');
        lnk.attr('href', 'javascript:void(0)');
        lnk.attr('class', 'skip-link');
        lnk.html('Skip to main content');

        lnk.click(function() {
            scrollToMainContent();
        });

        lnk.keypress(function (e) {
            if (e.keyCode === 32 || e.keyCode === 13) {
                e.preventDefault();
                e.stopPropagation();
                scrollToMainContent();
            }
            
        });

        $('body').prepend(lnk);

        

        
    });
})(window, jQuery);

(function (window, $) {
    $(function () {
        // don't run if the element doesn't exist
        if ($("#plp-offers-slider").length) {
            // Initialize Slick Slider only if there's more than 2 slides
            if ($(".slide.plp-offer-item").length > 2) {
                var slides, hiddenSlides;
                slides = document.querySelectorAll(".plp-offers-slider .slick-slide");

                //  Fully hide non-visible slides by adding tabindex="-1" when they go out of view
                function hideNonVisibleSlides() {
                    // Update our list of hidden slides so we know which to properly hide
                    var hiddenSlides = document.querySelectorAll('.plp-offers-slider .slick-slide[aria-hidden="true"]');

                    // Reset tabindex for all slide focusable elements so they are reachable for keyboard users
                    //jkg-ie 
					// slides.forEach(function (slide) {
					for(let index=0; index < slides.length; ++index )	{
                        var slideButtons = slides[index].querySelectorAll("a, button");
						//forEach(function (focusableElement) {
						for(let indexS=0; indexS < slideButtons.length; ++indexS) {
                            slideButtons[indexS].removeAttribute("tabindex");
                        }
                    }

                    //jkg-ie 
                    // Make hidden slides focusable elements impossible to reach via keyboard
                    // hiddenSlides.forEach(function (slide) {
					for(let index=0; index < hiddenSlides.length; ++index )	{
                        var hiddenSlideButtons = hiddenSlides[index].querySelectorAll("a, button");
						// .forEach(function (focusableElement) {
						for(let indexS=0; indexS < hiddenSlideButtons.length; ++indexS) {
                            hiddenSlideButtons[indexS].setAttribute("tabindex", -1);
                        }
                    }
                }

                // When Slick Slider loads, set up the slide dots correctly.
                $(".plp-offers-slider .slides").on("init", function (e, slick) {
                    // Ensure all the non-visible slide content are impossible to reach by keyboard
                    hideNonVisibleSlides();

                    // Retreive references to all the slide dot DOM elements
                    dots = document.querySelectorAll(".plp-offers-slider .slick-dots li button");

                    // Give the first slide dot `aria-current="true"` on load
                    dots[0].setAttribute("aria-current", true);

                    //jkg-ie
                    // dots.forEach(function (dot, index) {
					for(let index=0; index < dots.length; ++index )	{
                        // Indicate the action the button will invoke to make it clear that these are controls, not slides themselves
                        dots[index].innerText = "Go to slide " + (index + 1);
                    }
                });

                // Before each slide transition, update the current slide dot
                $(".plp-offers-slider .slides").on("beforeChange", function (e, slick, currentSlide, nextSlide) {
                    // Move the active dot indicator before animation for a "snappier" feel
                    //jkg-ie
					//dots.forEach(function (dot) {
					for(let index=0; index < dots.length; ++index )	{
                        dots[index].removeAttribute("aria-current");
                    }

					//jkg-ie
                    // Indicate which slide is active through the slide dots
					if (dots[nextSlide]) {
						dots[nextSlide].setAttribute("aria-current", true);
					}
                });

                // When a transition happens, ensure all the non-visible slides content are impossible to reach by keyboard
                $(".plp-offers-slider .slides").on("afterChange", function (e, slick, currentSlide, nextSlide) {
                    hideNonVisibleSlides();
                });

                $plpOffersSlider = $(".plp-offers-slider .slides");
                var settings = {
                    accessibility: false,
                    dots: true,
                    mobileFirst: true,
                    slidesToShow: 1,
                    slidesToScroll: 1,

                    // Use highly-accessible custom elements from the DOM for prev/next buttons.
                    prevArrow: document.querySelector(".plp-offers-slider .slick-prev"),
                    nextArrow: document.querySelector(".plp-offers-slider .slick-next"),

                    responsive: [
                        {
                            breakpoint: 767,
                            settings: {
                                slidesToShow: 2,
                                slidesToScroll: 1,
                            },
                        },
                    ],
                };

                // only use the carousel for the content if it's > 767px
                // < 768px content will stack
                $windowWidth = $(window).width();
                if ($windowWidth > 767) {
                    $plpOffersSlider.slick(settings);
                }

                // reslick only if it's not slick()
                $(window).on("resize", function () {
                    // give the js some time to run
                    setTimeout(function () {
                        if ($(window).width() < 768) {
                            if ($plpOffersSlider.hasClass("slick-initialized")) {
                                $plpOffersSlider.slick("unslick");
                            }
                            return;
                        }

                        if (!$plpOffersSlider.hasClass("slick-initialized")) {
                            return $plpOffersSlider.slick(settings);
                        }
                    }, 100);
                });
            } else {
                // hide slider controls if there's less than 3 slides and manage aria-labels
                $("#plp-offers-slider").addClass("plp-offers-slider--static-slider").attr('aria-label', 'Special Offers');
                $("#plp-offers-slider .sr-only").hide();
                $("#plp-offers-slider .plp-offer-item").attr('aria-label', 'Special Offer');
            }
        }
    });
})(window, jQuery);

// visiting-media
(function (window, $) {
    $(function () {
        jQuery(".link-360").click(function (e) {
            e.preventDefault;
            var vmLinkSrc = jQuery(this).attr("data-vmsrc");
            jQuery("#visitingMediaIframe").attr("src", vmLinkSrc);
            var $iframeModal = jQuery("#main-blocker");
            $iframeModal.modal("show");
            jQuery("#main-blocker").show();
            jQuery("body").addClass("overflow-hidden");
            return false;
        });
        jQuery("body").on("click", ".close-modal-btn", function () {
            jQuery("body").removeClass("overflow-hidden");
            jQuery("#visitingMediaIframe").attr("src", "");
            jQuery("#vmlink-iframe").attr("src", "");
        });

        jQuery(".vmlink").click(function (e) {
            e.preventDefault;
            console.log(e.target);
            var vmLinkSrc = jQuery(this).attr("data-vmsrc");
            jQuery("#vmlink-iframe").attr("src", vmLinkSrc);
            jQuery("#pg-gallery-360").modal({
                fadeDuration: 250,
                blockerClass: "modal-360",
            });
        });
    });
})(window, jQuery);





;
function handleSubnavDropdownMenu() {
    var bodyEl = document.body;
    var menuTriggerContainers = document.querySelectorAll(".subnav-dropdown");

    menuTriggerContainers.forEach(function (menuTriggerContainer) {
        if (bodyEl.contains(menuTriggerContainer)) {
            var menuTriggerButton = menuTriggerContainer.querySelector(".drop-down-link");
            var lastMenuItem = menuTriggerContainer.querySelector(".dropdown-list > li:last-of-type > a");
            // See notes on menuTriggerContainer.
            //var menuMouseOutTimer; // timer used to delay hiding of menu after mouse leaves
            // time (in ms) before menu is closed after mouse leaves. See notes on menuTriggerContainer.
            //var mouseOutHideDelay = 0; 
            var menuVisible = false; // current visibility state of menu

            bodyEl.classList.add("subnav-dropdown-menu-exists");

            function showMenu() {
                menuTriggerButton.setAttribute("aria-expanded", true);
                removeTabindexFromDropdownContainerAEls();
                menuVisible = true;
                bodyEl.classList.add("dropdown-open");
            }

            function hideMenu() {
                menuTriggerButton.setAttribute("aria-expanded", false);
                addTabindexToDropdownContainerAEls();
                menuVisible = false;
                bodyEl.classList.remove("dropdown-open");
            }

            function toggleMenu(e) {
                e.preventDefault();

                if (menuVisible) {
                    hideMenu();
                } else {
                    showMenu();
                }
            }

            // Event handlers
            function handleBodyClick(e) {
                if (!menuTriggerContainer.contains(e.target)) {
                    hideMenu();
                }
            }

            function menuTriggerKeydownHandler(e) {
                // Hide the menu when a keyboard user tabs out of it or presses Escape
                if ((e.key === "Tab" && !e.shiftKey && e.target === lastMenuItem) || e.key == "Escape") {
                    hideMenu();

                    // Move focus back to the menu toggle button on Escape
                    if (e.key == "Escape") {
                        menuTriggerButton.focus();
                    }
                }
            }

            // we need to handle the tabindex on the dropdown links so we don't have to use display: none; on the dropdown-container
            function getDropdownContainerAEls() {
                const dropdownContainer = menuTriggerContainer.querySelector(".dropdown-container");
                return dropdownContainer.querySelectorAll("a");
            }

            function addTabindexToDropdownContainerAEls() {
                const aElsInDropdownContainer = getDropdownContainerAEls();
                aElsInDropdownContainer.forEach((aTag) => {
                    aTag.setAttribute("tabindex", "-1");
                });
            }

            function removeTabindexFromDropdownContainerAEls() {
                const aElsInDropdownContainer = getDropdownContainerAEls();
                aElsInDropdownContainer.forEach((aTag) => {
                    aTag.removeAttribute("tabindex");
                });
            }

            // on load - remove the dropdown links from the tab order to avoid using display: none;
            addTabindexToDropdownContainerAEls();

            // Show the menu on mouse hover of the trigger
            menuTriggerContainer.addEventListener("mouseover", function (e) {
                showMenu();
                // clearTimeout(menuMouseOutTimer);
            });

            // Hide the menu when mouse hover leaves both the trigger and menu fly-out, but only after a short delay to help people with jerky mouse movements (like those using head/eye trackers)
            menuTriggerContainer.addEventListener("mouseout", function (e) {
                // removed the setTimeout to avoid the delay because it was causing issues with the menu
                // when moving the mouse back-and-forth between two side-by-side dropdowns
                // menuMouseOutTimer = setTimeout(function () {
                //     hideMenu();
                // }, mouseOutHideDelay);

                // use left and right padding on the li to provide a better user experience
                // when moving the mouse back-and-forth between two side-by-side dropdowns
                hideMenu();
            });

            // Hide the menu when the user tabs out of it
            menuTriggerContainer.addEventListener("keydown", menuTriggerKeydownHandler);

            // Toggle the menu when the trigger is activated
            menuTriggerButton.addEventListener("click", toggleMenu);

            // Close the menu when the user activates something outside the navBar.
            document.body.addEventListener("click", handleBodyClick);
        }
    });
}

if (window.innerWidth > 768) {
    handleSubnavDropdownMenu();
}

window.addEventListener("resize", function () {
    if (window.innerWidth > 768) {
        setTimeout(handleSubnavDropdownMenu, 100);
    }
});
;
