function initAnalytics(e){function t(){}return t.tap=function(t,i){if(e){var n=e.extend({noPrefix:!1,value:null},i),s={};n.value&&(n.value instanceof Array?n.value=n.value.join(","):"function"==typeof n.value?n.value="":"object"==typeof n.value&&(n.value=JSON.stringify(n.value)),s.value=n.value),n.name&&(s.name=n.name),n.noPrefix||(t="analytics."+t),console.log(t),e(document).trigger(t,s)}},t}define("i18n/common",[],function(){return{popup_closeText:"Закрыть",nemoApp__globalError__noRoute:"Неизвестный URL.",nemoApp__globalError__uncaughtError__title:"Произошла ошибка при обработке данных",nemoApp__globalError__uncaughtError__message:"Пожалуйста, попробуйте обновить эту страницу позже.",nemoApp__globalError__uncaughtError__errorCode:"Код ошибки"}}),define("i18n/pageTitles",[],function(){return{FlightsSearch:"Поиск авиабилетов",FlightsResults:"Результаты поиска",FlightsScheduleSearch:"Поиск по расписанию",HotelsSearch:"Поиск отелей",HotelsResults:"Результаты поиска",HotelCard:"Оформление заказа"}}),define("i18n/currencyNames",[],function(){return{currency_EUR_n:"Евро",currency_EUR_s:"€",currency_EUR_c:"EUR",currency_USD_n:"Американский Доллар",currency_USD_s:"$",currency_USD_c:"USD",currency_UAH_n:"Гривна",currency_UAH_s:"₴",currency_UAH_c:"UAH",currency_RUB_n:"Российский Рубль",currency_RUB_s:"RUB",currency_RUB_c:"RUB"}}),define("i18n/dates",[],function(){return{month_1_f_n:"январь",month_2_f_n:"февраль",month_3_f_n:"март",month_4_f_n:"Апрель",month_5_f_n:"май",month_6_f_n:"июнь",month_7_f_n:"июль",month_8_f_n:"август",month_9_f_n:"сентябрь",month_10_f_n:"октябрь",month_11_f_n:"ноябрь",month_12_f_n:"декабрь",month_1_f:"января",month_2_f:"февраля",month_3_f:"марта",month_4_f:"апреля",month_5_f:"мая",month_6_f:"июня",month_7_f:"июля",month_8_f:"августа",month_9_f:"сентября",month_10_f:"октября",month_11_f:"ноября",month_12_f:"декабря",month_1_s_n:"янв",month_2_s_n:"фев",month_3_s_n:"мар",month_4_s_n:"апр",month_5_s_n:"май",month_6_s_n:"июн",month_7_s_n:"июл",month_8_s_n:"авг",month_9_s_n:"сен",month_10_s_n:"окт",month_11_s_n:"ноя",month_12_s_n:"дек",month_1_s:"янв",month_2_s:"фев",month_3_s:"мар",month_4_s:"апр",month_5_s:"мая",month_6_s:"июн",month_7_s:"июл",month_8_s:"авг",month_9_s:"сен",month_10_s:"окт",month_11_s:"ноя",month_12_s:"дек",dow_1_f:"понедельник",dow_2_f:"вторник",dow_3_f:"среда",dow_4_f:"четверг",dow_5_f:"пятница",dow_6_f:"суббота",dow_7_f:"воскресенье",dow_1_s:"пн",dow_2_s:"вт",dow_3_s:"ср",dow_4_s:"чт",dow_5_s:"пт",dow_6_s:"сб",dow_7_s:"вс",datetime_year:"года",monthNamesShort:{1:"Янв",2:"Фев",3:"Мар",4:"Апр",5:"Май",6:"Июн",7:"Июл",8:"Авг",9:"Сен",10:"Окт",11:"Ноя",12:"Дек"},monthNames:{1:"января",2:"февраля",3:"марта",4:"апреля",5:"мая",6:"июня",7:"июля",8:"августа",9:"сентября",10:"октября",11:"ноября",12:"декабря"},daysOfWeekShort:{1:"Пн",2:"Вт",3:"Ср",4:"Чт",5:"Пт",6:"Сб",7:"Вс"},daysOfWeek:{1:"Понедельник",2:"Вторник",3:"Среда",4:"Четверг",5:"Пятница",6:"Суббота",7:"Воскресенье"}}}),define("i18n/FlightsSearchForm",[],function(){return{serviceClass_All:"Любой",serviceClass_Economy:"Эконом",serviceClass_Business:"Бизнес",serviceClass_First:"Первый",triptype_OW:"В одну сторону",triptype_RT:"Туда и обратно",triptype_CR:"Сложный маршрут",triptype_CR__not:"Простой маршрут",passengers_count_0:"Ни одного",passengers_count_1:"Один",passengers_count_2:"Два",passengers_count_3:"Три",passengers_count_4:"Четыре",passengers_count_5:"Пять",passengers_count_6:"Шесть",passengers_count_7:"Семь",passengers_count_8:"Восемь",passengers_count_9:"Девять",passengers_count_10:"Десять",passengers_count_11:"Одиннадцать",passengers_count_12:"Двенадцать",passengerType_ADT_passSelectorName:"Взрослые",passengerType_CLD_passSelectorName:"Дети",passengerType_INF_passSelectorName:"Младенцы",passengerType_INS_passSelectorName:"Младенцы с местом",passengerType_YTH_passSelectorName:"Студенты",passengerType_SRC_passSelectorName:"Пенсионеры",passengerType_ADT_ageInfo:"от 12 лет",passengerType_CLD_ageInfo:"2-12 лет",passengerType_INF_ageInfo:"до 2 лет",passengerType_INS_ageInfo:"до 2 лет",passengerType_YTH_ageInfo:"12-16 лет",passengerType_SRC_ageInfo:"от 60 лет",passengerType_infant_ageInfo:"до [%-ageTo-%] лет",passengerType_adult_ageInfo:"от [%-ageFrom-%] лет",passengerType_child_ageInfo:"[%-ageFrom-%]-[%-ageTo-%] лет",passengerType_student_ageInfo:"[%-ageFrom-%]-[%-ageTo-%] лет",passengerType_retired_person_ageInfo:"от [%-ageFrom-%] лет",passSummary_numeral_noPassengers:"Нет пассажиров",passSummary_numeral_ADT_one:"взрослый",passSummary_numeral_CLD_one:"ребенок",passSummary_numeral_INF_one:"младенец",passSummary_numeral_INS_one:"младенец с местом",passSummary_numeral_YTH_one:"студент",passSummary_numeral_SRC_one:"пенсионер",passSummary_numeral_mixed_one:"пассажир",passSummary_numeral_ADT_twoToFour:"взрослых",passSummary_numeral_CLD_twoToFour:"ребенка",passSummary_numeral_INF_twoToFour:"младенца",passSummary_numeral_INS_twoToFour:"младенца с местом",passSummary_numeral_YTH_twoToFour:"студента",passSummary_numeral_SRC_twoToFour:"пенсионера",passSummary_numeral_mixed_twoToFour:"пассажира",passSummary_numeral_ADT_fourPlus:"взрослых",passSummary_numeral_CLD_fourPlus:"детей",passSummary_numeral_INF_fourPlus:"младенцев",passSummary_numeral_INS_fourPlus:"младенцев с местом",passSummary_numeral_YTH_fourPlus:"студентов",passSummary_numeral_SRC_fourPlus:"пенсионеров",passSummary_numeral_mixed_fourPlus:"пассажиров",passSummary_fastSelect_lastConjunction:"и",autocomplete_noResults:"Укажите город или аэропорт",error_departure_noInput:"Укажите пункт вылета",error_arrival_noInput:"Укажите пункт прилета",error_arrival_sameAsDeparture:"Пункты вылета и прилета не могут совпадать",error_departureDate_noInput:"Укажите дату вылета",error_departureDate_notInOrder:"Даты должны идти по порядку",error_departureDate_tooEraly:"Дата слишком рано",error_departureDate_tooLate:"Дата слишком поздно",error_passengers_noPassengers:"Нет пассажиров",error_passengers_noAdults:"Укажите хотя бы одного взрослого",error_searchBlocked:"Поменяйте что-нибудь",searchError_requestFailed:"Поиск не удался, повторите попытку позднее или обратитесь в службу технической поддержки. (Некорректный запрос)",searchError_brokenJSON:"Поиск не удался, повторите попытку позднее или обратитесь в службу технической поддержки. (Некорректный ответ)",searchError_systemError:"Поиск не удался, повторите попытку позднее или обратитесь в службу технической поддержки. (Ошибка на сервере)",searchError_emptyResult:"Перелетов не найдено",searchingError__title:"Ошибка",searchingInfo__title:"Идет поиск",searchingInfo__header:"Пожалуйста, подождите",searchingInfo__info:"Мы ищем [%-flightType-%] [%-class-%] по маршруту",searchingInfo__info_reopen:"Загружаем результаты [%-class-%] по маршруту",searchingInfo__class_All:"всех классов",searchingInfo__class_Economy:"эконом-класса",searchingInfo__class_Business:"бизнес-класса",searchingInfo__class_First:"первого класса",searchingInfo__flightType_OW:"перелеты в одну сторону",searchingInfo__flightType_RT:"перелеты туда и обратно",searchingInfo__flightType_CR:"составные перелеты",segments__departure:"Откуда",segments__arrival:"Куда",segments__departure__placeholder:"Откуда (город или аэропорт)",segments__arrival__placeholder:"Куда (город или аэропорт)",segments__switchToRT__text:"И обратно",segments__CR__continueRoute__text:"Продолжить маршрут",segments__CR__deleteRoute__text:"Убрать",segments__date__placeholder:"Когда",segments__date__placeholder_RT_leg_0:"Туда",segments__date__placeholder_RT_leg_1:"Назад",routeOptions__tripType__caption:"Маршрут",routeOptions__serviceClass__caption:"Класс",routeOptions__vicinityDates__caption:"Искать &plusmn;[%-dates-%] [%-dayName-%]",routeOptions__direct__caption:"Только прямые",day_one:"день",day_twoToFour:"дня",passengers__fullSelect__button__done:"Готово",passengers__fastSelect__fullSelectOption:"Больше пассажиров",passengers__fullSelect__title:"Пассажиры",searchButton__text:"Найти",additionalParameters__toggle:"Еще параметры",additionalParameters__header:"Дополнительные пожелания",additionalParameters__carrier__title:"Авиакомпании",additionalParameters__carrier__placeholder:"Название авиакомпании",additionalParameters__carrier__searchNotFound:"Нет авиакомпании",additionalParameters__carrier__loading:"Загружаем...",additionalParameters__newDesign:"Новый дизайн",additionalParameters__totalTimeEnRoute__title:"Общее время в пути",additionalParameters__transfers__title:"Пересадки",additionalParameters__transfers__noTransfers__caption:"Без пересадок",additionalParameters__transfers__shortTransfers__caption:"Только короткие (до 2 часов)","flightsScheduleForm-header":"Расписание авиарейсов",scheduleSearchButton__text:"Показать расписание","flightsScheduleForm-PF__name_carrier":"Авиакомпания","flightsScheduleForm-PF__name_departureAirport":"Аэропорт вылета","flightsScheduleForm-PF__name_arrivalAirport":"Аэропорт прилета","flightsScheduleForm-PF__name_transfersCount":"Пересадки","flightsScheduleForm-tickets":"Подобрать билеты","flightsForm-scheduleHeader_flight":"Перелет","flightsForm-scheduleHeader_departure":"Вылет","flightsForm-scheduleHeader_arrival":"Прилет","flightsForm-scheduleHeader_timeEnRoute":"В пути","flightsForm-scheduleHeader_select":"Выберите день отправления","flightsResults-table__header__sortType_all":"Все","flightsResults-table__header__sortType_label":"Сортировать","flightsResults-table__header__sortType_arrTime":"По прилету","flightsResults-table__header__sortType_depTime":"По вылету","flightsResults-table__header__sortType_timeEnRoute":"По времени в пути","flightsResults-table__header__sortType_transfersCount":"Количество пересадок","flightsForm-scheduleSearch_button":"Поиск по расписанию","flightsForm-scheduleInfoHeader_flight":"Перелет","flightsForm-scheduleInfoHeader_departure":"Вылет","flightsForm-scheduleInfoHeader_arrival":"Прилет","flightsForm-scheduleInfoHeader_timeEnRoute":"В пути","flightsForm-scheduleInfo__terminal":"терминал","flightsForm-scheduleInfo__details":"Детали","flightsForm-scheduleInfo__classes":"Класс:","flightsForm-scheduleInfo__calendar":"Календарь полётов"}}),define("i18n/FlightsLastSearches",[],function(){return{select__title:"Предыдущие поиски",RT__leg_0:"Туда",RT__leg_1:"Обратно"}}),define("i18n/CommonBreadCrumbs",[],function(){return{"flights-step_search":"Поиск авиабилетов","flights-step_results":"Результаты поиска","flights-step_checkout":"Оформление заказа","hotels-step_search":"Поиск отелей","hotels-step_results":"Результаты поиска","hotels-step_checkout":"Оформление заказа","hotels-step_chooseHotel":"Выберите отель",recentSearches__toggle:"Предыдущие поиски"}}),define("i18n/HotelsSearchResults",[],function(){return{hotels__loadingDummy__results__progressText:"Идет поиск",hotels__loadingDummy__results__progressText_timed:"Пожалуйста, подождите, мы ищем подходящие отели",hotels__loadingDummy__filters__title:"Загрузка",hotels__loadingDummy__filters__text:"Фильтры будут показаны вскоре после того, как будут найдены подходящие отели",hotels__sort__caption:"Сортировать",filter__caption:"Фильтрация",filter__caption__results:"результатов",sort__type__1:"по популярности",sort__type__2:"по стоимости",sort__type__3:"по звездности",hotels__PF__hint:"Найти нужный отель — быстро и просто. Пользуйтесь фильтрами!",searchBox_map:"Поиск по карте",hotels__PF__clearPF:"сбросить",hotels__PF__clearAll:"Сбросить все фильтры",PF__filter__price:"Цена за 5 ночей",PF__filter__price_part:"Цена за",PF__filter__starsCount:"Количество звезд",PF__filter__starsCount__unrated:"Без звезд",PF__filter__type:"Тип",PF__filter__noMatter:"Все равно",PF__filter__findByName:"Поиск по названию отеля",PF__filter__findByName_placeholder:"Введите название отеля...",PF__filter__specialConditions:"Особые условия",PF__filter__bookingCondition:"Условия бронирования",PF__filter__services:"Услуги и удобства",PF__filter__guestsRating:"Оценка гостей","header-flag__best_price":"Лучшая цена","header-flag__special-offer":"Специальное предложение","header-flag__corporate-rates":"Корпоративный тариф","header-flag__city-centre":"Самый центр города","header-flag__city-hotel":"Самый крутой отель","map__button-show":"Показать на карте","list__button-show":"Показать списком",PH__link_all_rooms:"Все доступные номера",PH__reviews_link_title_one:"отзыв",PH__reviews_link_title_two_to_four:"отзыва",PH__reviews_link_title_more_than_five:"отзывов",PH__map_link:"Карта",PH__recommended_accommodation:"Рекомендуемое размещение",PH__label_after_nights_one:"ночь",PH__label_after_nights_two_to_four:"ночи",PH__label_after_nights_more_than_five:"ночей",hotels__error_404_header:"Поиск не дал результатов",hotels__error_404:"К сожалению, в отелях нет мест на указанные вами даты. Воспользуйтесь формой выше или вернитесь на главную страницу.",hotels__error_404_buttonText:"На главную",hotels__error_500_header:"Ошибка",hotels__error_500:"К сожалению, произошла системная ошибка. Приносим свои извинения!",hotels__error_500_buttonText:"На главную",hotels__error_400_header:"Ошибка",hotels__error_400:"К сожалению, в отелях нет мест на указанные вами даты. Воспользуйтесь формой выше или вернитесь на главную страницу.",hotels__error_400_buttonText:"На главную",PH__averageCustomerRating_description_default:"Нет оценок",targetFromCenter:"от центра",targetFromAirport:"от аэропорта",distanceFromCenterText:"Расстояние от центра до",km:"км",from:"с",from2:"от",to:"до",registration_arrival:"Регистрация заезда",registration_leaving:"Регистрация отъезда",pets:"Домашние животные",arrival:"Прибытие",departure:"Выезд",featureWifi:"Бесплатный доступ в интернет",featureMeal:"Бесплатный завтрак",featureParking:"Парковка",featureGym:"Фитнес",featurePool:"Бассейн",featureTransfer:"Трансфер",missingVariantFilteredResults:"К сожалению, доступных вариантов нет",resetFiltersText:"Вы можете сбросить следующие фильтры:",hotels__error_systemError_header:"Поиск не удался",hotels__error_systemError:"Поиск не удался, повторите попытку позднее или обратитесь в службу технической поддержки. (Ошибка на сервере)",hotels__error_systemError_buttonText:"На главную",roomServices:"Услуги в номере",currencyDropDownCaption:"Валюта поиска и оплаты",language:"Язык",showMore:"Показать еще",variant_0:"тарифов",variant_1:"тариф",variant_2:"тарифа",easyBookingCaption:"Удобное бронирование",recentHotelsCaption:"Также вы смотрели",choiceRooms:"Выбор номеров",choiceSuitableRooms:"Выберите подходящие вам типы номеров",availability:"Наличие",bigMap:"Большая карта",tabRooms:"Номера",tabAboutHotel:"Об отеле",tabConveniences:"Удобства",tabHotelRules:"Правила отеля",tabReviews:"Отзывы (0)",distanceTo:"Расстояние до",perNight:"за ночь",back:"Назад",checkIn:"Заезд",checkIn_from:"с",checkOut:"Выезд",checkOut_until:"до",selectFromBeforeCheckoutRoom:"Выберите подходящие вам типы номеров",verifiedReviews:"Проверенные Отзывы",description:"Об отеле",location:"Расположение",hotelServicesCaption:"Услуги и удобства в отеле",hotelRulesCaption:"Правила отеля",hotelContactsCaption:"Контактная информация",for:"за",select:"Выбрать",selected:"Выбран",needRequestForAvailabilityCheck_header:"Проверка мест по запросу",needRequestForAvailabilityCheck_desc:"Отель должен будет подтвердить доступность выбранного размещения. Вы будете уведомлены о результатах проверки на этапе бронирования.",collapse:"Свернуть",change:"Изменить",showAlsoVariants:"Показать еще {value} {variants}",variants_one:"вариант",variants_twoToFour:"варианта",variants_fourPlus:"вариантов",hotels__bookingCheck__error__title:"Произошла ошибка",hotels__bookingCheck__error__header:"К сожалению, этот отель нельзя забронировать.",hotels__bookingCheck__error__error_wrongResponse:"Ошибка на сервере",hotels__bookingCheck__error__error_serverError:"Ошибка на сервере:",hotels__bookingCheck__error__error_unavailable:"В выбранном отеле нет свободных номеров",bookingCheck__link_to_searchResults:"Вернуться к результатам поиска",bookingCheck__link_to_mainPage:"Новый поиск",hotels__hotelsChain:"Сеть отелей",hotels__showcase__corporate__header:"Отели с корпоративными тарифами",hotels__showcase__showMore:"Показать еще",hotels__lateCheckOut__time:"до",hotels__earlyCheckIn__time:"после"}}),define("html/FlightsSearchForm",[],function(){
return'\x3c!-- nemo-flights-form_compact || nemo-flights-form_twoThirds --\x3e<div class="nemo-flights-form js-autofocus-form js-nemoApp__component"> \x3c!-- MODIFIERS: nemo-flights-form_compact || nemo-flights-form_twoThirds --\x3e\x3c!-- ko if: !$$loading() && !$$error() --\x3e\t\x3c!-- ko if: tripTypeDisplayFormat != \'none\' --\x3e<div class="nemo-flights-form__routeTypeSelector nemo-flights-form__routeTypeSelector_buttons" data-bind="foreach: tripTypes"><div class="nemo-ui-button nemo-ui-button_common nemo-flights-form__routeTypeSelector__button"data-bind="text: $root.i18n(\'FlightsSearchForm\',\'triptype_\'+$data),css: {\'nemo-flights-form__routeTypeSelector__button_active\': $parent.tripType() == $data},click: function () {$parent.tripType($data);}"></div></div>\x3c!-- /ko --\x3e\t\x3c!-- ko if: tripTypeDisplayFormat != \'none\' --\x3e\t\t<div class="nemo-flights-form__routeTypeSelector nemo-flights-form__routeTypeSelector_select">\t\t\t<div class="nemo-ui-select js-common-pseudoSelect nemo-flights-form__routeTypeSelector__selectWrap">\t\t\t\t<div class="nemo-ui-select__toggle js-common-pseudoSelect__toggle nemo-flights-form__routeTypeSelector__select" data-bind="pseudoSelect: null, text: $root.i18n(\'FlightsSearchForm\',\'triptype_\' + tripType())"></div>\t\t\t\t<div class="nemo-ui-select__dropdown js-common-pseudoSelect__dropdown" data-bind="foreach: tripTypes">\t\t\t\t\t<div class="nemo-ui-select__dropdown__item" data-bind="click: function () {$parent.tripType($data)}, text: $root.i18n(\'FlightsSearchForm\',\'triptype_\' + $data)"></div>\t\t\t\t</div>\t\t\t</div>\t\t</div>\t\x3c!-- /ko --\x3e\t<div class="nemo-flights-form__formContainer">\t\t\x3c!-- ko if: !searchAllowedByParamChange() --\x3e\t\t<div\t\t\tclass="nemo-ui-hint nemo-ui-hint_warn nemo-flights-form__searchBlockedError"\t\t\tdata-bind="text: $root.i18n(\'FlightsSearchForm\',\'error_searchBlocked\'), click: function (d,e) {$(e.target).hide()}"></div>\t\t\x3c!-- /ko --\x3e\t\t<div class="nemo-flights-form__formContainer__inner">\t\t\t<div data-bind="attr: {\'class\':\'nemo-flights-form__route nemo-flights-form__route_\'+tripType()}, foreach: segments(), flightsFormAutoFocus: null"><div data-bind="attr: {\'class\': \'nemo-flights-form__route__segment \' +($parent.tripType() == \'RT\' && $index() == 1 ? \'nemo-flights-form__route__segment_returnSegment \' : \'\') +\'nemo-flights-form__route__segment_\' + $parent.tripType() + \' \' +\'js-autofocus-segment\'}">\x3c!-- ko if: $parent.tripType() != \'RT\' || $index() != 1 --\x3e\x3c!-- ko if: $parent.tripType() == \'CR\' && $index() == ($parent.segments().length-1) --\x3e<div class="nemo-flights-form__route__removeCRSegment"data-bind="click: $parent.removeLastCRSegment.bind($parent),css: {\'nemo-flights-form__route__removeCRSegment_inactive\': $parent.segments().length == 1}"></div>\x3c!-- /ko --\x3e<div class="nemo-flights-form__route__segment__item nemo-flights-form__route__segment__item_from"data-bind="css: {\'nemo-flights-form__route__segment__item_hasError\': $parent.validaTERROR() && items.departure.error()}"><label class="nemo-ui-textInput nemo-ui-dummiedInput js-flightsSearchForm-autocomplete">\x3c!-- ko if: $parent.validaTERROR() && items.departure.error() && items.departure.focus() --\x3e<div class="nemo-ui-hint nemo-ui-hint_warn nemo-flights-form__route__segment__item__error"data-bind="text: $root.i18n(\'FlightsSearchForm\',\'error_departure_\'+items.departure.error());"></div>\x3c!-- /ko --\x3e<div class="nemo-flights-form__route__segment__item__inputContainer" data-bind="css: {\'nemo-flights-form__route__segment__item__inputContainer_rightPadding\': $parent.showCitySwapBtn}"><input class=" nemo-ui-textInput__input nemo-ui-dummiedInput__input nemo-flights-form__route__segment__input nemo-flights-form__route__segment__input_autocomplete js-autofocus-field js-autofocus-field_departure"type="text"data-bind="flightsFormGeoAC: items.departure.value, hasFocus: items.departure.focus,attr: {placeholder: $root.i18n(\'FlightsSearchForm\',\'segments__departure__placeholder\')}"><div class="nemo-ui-dummiedInput__dummy nemo-flights-form__route__segment__item__dummy js-flightsSearchForm-autocomplete-dummy">\x3c!-- ko if: !items.departure.value() --\x3e<span class="nemo-ui-dummiedInput__dummy__placeholder js-flightsSearchForm-autocomplete-dummy__placeholder"data-bind="text: $root.i18n(\'FlightsSearchForm\',\'segments__departure__placeholder\')"></span>\x3c!-- /ko --\x3e\x3c!-- ko if: items.departure.value() --\x3e\x3c!-- ko with: items.departure.value() --\x3e<span class="nemo-ui-dummiedInput__dummy__main js-flightsSearchForm-autocomplete-dummy__main" data-bind="text: name"></span><span class="nemo-ui-dummiedInput__dummy__aux js-flightsSearchForm-autocomplete-dummy__aux" data-bind="text: \', \' + country.name"></span><span class="nemo-ui-dummiedInput__dummy__aside js-flightsSearchForm-autocomplete-dummy__aside" data-bind="text: $data.IATA"></span>\x3c!-- /ko --\x3e\x3c!-- /ko --\x3e</div></div>\x3c!-- ko if: $parent.showCitySwapBtn --\x3e<div class="nemo-flights-form__route__segment__item__citySwap" data-bind="click: function(){$parent.citySwap($index())}"></div>\x3c!-- /ko --\x3e</label></div><div class="nemo-flights-form__route__segment__item nemo-flights-form__route__segment__item_to"data-bind="css: {\'nemo-flights-form__route__segment__item_hasError\': $parent.validaTERROR() && items.arrival.error()}"><label class="nemo-ui-textInput nemo-ui-dummiedInput js-flightsSearchForm-autocomplete">\x3c!-- ko if: $parent.validaTERROR() && items.arrival.error() && items.arrival.focus() --\x3e<div class="nemo-ui-hint nemo-ui-hint_warn nemo-flights-form__route__segment__item__error"data-bind="text: $root.i18n(\'FlightsSearchForm\',\'error_arrival_\'+items.arrival.error())"></div>\x3c!-- /ko --\x3e<div class="nemo-flights-form__route__segment__item__inputContainer"><input class=" nemo-ui-textInput__input nemo-ui-dummiedInput__input nemo-flights-form__route__segment__input nemo-flights-form__route__segment__input_autocomplete js-autofocus-field js-autofocus-field_arrival"type="text"data-bind="flightsFormGeoAC: items.arrival.value, hasFocus: items.arrival.focus,attr: {placeholder: $root.i18n(\'FlightsSearchForm\',\'segments__arrival__placeholder\')}"><div class="nemo-ui-dummiedInput__dummy nemo-flights-form__route__segment__item__dummy js-flightsSearchForm-autocomplete-dummy">\x3c!-- ko if: !items.arrival.value() --\x3e<span class="nemo-ui-dummiedInput__dummy__placeholder js-flightsSearchForm-autocomplete-dummy__placeholder"data-bind="text: $root.i18n(\'FlightsSearchForm\',\'segments__arrival__placeholder\')"></span>\x3c!-- /ko --\x3e\x3c!-- ko if: items.arrival.value() --\x3e\x3c!-- ko with: items.arrival.value() --\x3e<span class="nemo-ui-dummiedInput__dummy__main js-flightsSearchForm-autocomplete-dummy__main" data-bind="text: name"></span><span class="nemo-ui-dummiedInput__dummy__aux js-flightsSearchForm-autocomplete-dummy__aux" data-bind="text: \', \' + country.name"></span><span class="nemo-ui-dummiedInput__dummy__aside js-flightsSearchForm-autocomplete-dummy__aside" data-bind="text: $data.IATA"></span>\x3c!-- /ko --\x3e\x3c!-- /ko --\x3e</div></div></label></div>\x3c!-- /ko --\x3e<div class="nemo-flights-form__route__segment__item nemo-flights-form__route__segment__item_date"data-bind="css: {\'nemo-flights-form__route__segment__item_hasError\': $parent.validaTERROR() && items.departureDate.error()}"><label class="nemo-ui-textInput nemo-ui-dummiedInput nemo-flights-form__route__segment__item__date"><div class="nemo-flights-form__route__segment__item__date__indicator" data-bind="text: items.departureDate.value() ? items.departureDate.value().getDate() : 31"></div>\x3c!-- ko if: $parent.validaTERROR() && items.departureDate.error() && items.departureDate.focus() --\x3e<div class="nemo-ui-hint nemo-ui-hint_warn nemo-flights-form__route__segment__item__error"data-bind="text: $root.i18n(\'FlightsSearchForm\',\'error_departureDate_\'+items.departureDate.error());"></div>\x3c!-- /ko --\x3e<div class="nemo-flights-form__route__segment__item__inputContainer"><input class="nemo-ui-textInput__input nemo-ui-dummiedInput__input nemo-flights-form__route__segment__input nemo-flights-form__route__segment__input_date js-autofocus-field js-autofocus-field_date"type="text"data-bind="attr: {placeholder: $root.i18n(\'FlightsSearchForm\',\'segments__date__placeholder\' + ($parent.tripType() == \'RT\' ? ($index() == 0 ? \'_RT_leg_0\' : \'_RT_leg_1\') : \'\'))},flightsFormDatepicker: items.departureDate.value,css: $parent.tripType() == \'RT\' ? ($index() == 0 ? \'nemo-flights-form__route__segment__input_date_there\' : \'nemo-flights-form__route__segment__input_date_back\') : \'nemo-flights-form__route__segment__input_date_there\',hasFocus: items.departureDate.focus"><div class="nemo-ui-dummiedInput__dummy nemo-flights-form__route__segment__item__dummy nemo-flights-form__route__segment__item__date__dummy nemo-flights-form__route__segment__item__date__dummy_full">\x3c!-- ko if: !items.departureDate.value() --\x3e<span class="nemo-ui-dummiedInput__dummy__placeholder" data-bind="text: $root.i18n(\'FlightsSearchForm\',\'segments__date__placeholder\' + ($parent.tripType() == \'RT\' ? ($index() == 0 ? \'_RT_leg_0\' : \'_RT_leg_1\') : \'\'))"></span>\x3c!-- /ko --\x3e\x3c!-- ko if: items.departureDate.value() --\x3e<span class="nemo-ui-dummiedInput__dummy__main" data-bind="text: items.departureDate.value().getDate()+\' \'+items.departureDate.value().getMonthName()"></span><span class="nemo-ui-dummiedInput__dummy__aux" data-bind="text: \', \'+items.departureDate.value().getDOWName()"></span>\x3c!-- /ko --\x3e</div><div class="nemo-ui-dummiedInput__dummy nemo-flights-form__route__segment__item__dummy nemo-flights-form__route__segment__item__date__dummy nemo-flights-form__route__segment__item__date__dummy_short">\x3c!-- ko if: !items.departureDate.value() --\x3e<span class="nemo-ui-dummiedInput__dummy__placeholder" data-bind="text: $root.i18n(\'FlightsSearchForm\',\'segments__date__placeholder\' + ($parent.tripType() == \'RT\' ? ($index() == 0 ? \'_RT_leg_0\' : \'_RT_leg_1\') : \'\'))"></span>\x3c!-- /ko --\x3e\x3c!-- ko if: items.departureDate.value() --\x3e<span class="nemo-ui-dummiedInput__dummy__main" data-bind="text: items.departureDate.value().getDate()+\' \'+items.departureDate.value().getMonthNameShort()"></span><span class="nemo-ui-dummiedInput__dummy__aux" data-bind="text: \', \'+items.departureDate.value().getDOWNameShort()"></span>\x3c!-- /ko --\x3e</div></div></label>\x3c!-- ko if: $parent.tripType() == \'RT\' && $index() == 1 --\x3e<div class="nemo-flights-form__route__switchToOW" data-bind="click: function () {$parent.tripType(\'OW\')}"></div>\x3c!-- /ko --\x3e</div></div>\x3c!-- ko if: $parent.tripType() == \'OW\' --\x3e<div class="nemo-flights-form__route__segment nemo-flights-form__route__segment_returnSegment"><div class="nemo-flights-form__route__segment__item nemo-flights-form__route__segment__item_date"><div class="nemo-flights-form__route__switchToRT"data-bind="click: function () {$parent.tripType(\'RT\')},flightsFormRTAutoFocus:null,text: $root.i18n(\'FlightsSearchForm\',\'segments__switchToRT__text\')"></div></div></div>\x3c!-- /ko --\x3e\x3c!-- ko if: $parent.tripType() == \'CR\' && $index() == ($parent.segments().length-1) --\x3e<div class="nemo-flights-form__route__continueCR"data-bind="click: $parent.continueCR.bind($parent),css: {\'nemo-flights-form__route__continueCR_inactive\': $parent.segments().length >= $parent.options.flightSegments},text: $root.i18n(\'FlightsSearchForm\',\'segments__CR__continueRoute__text\')"></div>\x3c!-- /ko --\x3e</div>\t\t\t<div class="nemo-ui-select nemo-flights-form__passengers">\t\x3c!-- ko if: validaTERROR() && passengersError() --\x3e\t<div data-bind="text: $root.i18n(\'FlightsSearchForm\',\'error_passengers_\'+passengersError());" class="nemo-ui-hint nemo-ui-hint_warn nemo-flights-form__passengers__error"></div>\t\x3c!-- /ko --\x3e\t<div class="nemo-ui-select__toggle nemo-flights-form__passengers__container js-flights-searchForm-passSelect"\t     data-bind="\t        flightsFormPassengersSelector: null,\t        text: passengersSummary,\t        css: {\'nemo-ui-select__toggle_open\': passengersFastSelectorOpen()}    "></div>\t<div class="nemo-ui-select__toggle nemo-flights-form__passengers__containerColumn js-flights-searchForm-passSelect"\t     data-bind="\t        flightsFormPassengersSelector: null,\t        text: passengersSummary,\t        css: {\'nemo-ui-select__toggle_open\': passengersFastSelectorOpen()}    "></div>\t\x3c!-- ko if: !passengersAltSelect --\x3e\t<div class="nemo-ui-select__dropdown nemo-flights-form__passengers__fastSelect" data-bind="visible: passengersFastSelectorOpen">\t\t\x3c!-- ko foreach: passengersFastSelectOptions --\x3e\t\t<div class="nemo-ui-select__dropdown__item nemo-flights-form__passengers__fastSelect__item"\t\t     data-bind="\t\t        text: $parent.passengersTextForFastSelect($index()),\t\t        click: function () {$parent.passengersFastSelectorOpen(false); $parent.passengersSelectFast($index());}"       ></div>\t\t\x3c!-- /ko --\x3e\t\t\x3c!-- ko if: passengersUseExtendedSelect --\x3e\t\t<div class="nemo-ui-select__dropdown__item nemo-flights-form__passengers__fastSelect__item" data-bind="\t\t\tpopup: {\t\t\t\tblock: \'passengersFullSelect\',\t\t\t\ttitle: $root.i18n(\'FlightsSearchForm\',\'passengers__fullSelect__title\'),\t\t\t\tbuttons: [\t\t\t\t\t{\t\t\t\t\t\ttext: $root.i18n(\'FlightsSearchForm\',\'passengers__fullSelect__button__done\'),\t\t\t\t\t\tclick: function () {$(this).data(\'ui-popup__close\')()}\t\t\t\t\t}\t\t\t\t],\t\t\t\tdialogClass: \'ui-dialog_medium\'\t\t\t},\t\t\tclick: function () {passengersFastSelectorOpen(false);},\t\t\ttext: $root.i18n(\'FlightsSearchForm\',\'passengers__fastSelect__fullSelectOption\')\t\t"></div>\t\t\x3c!-- /ko --\x3e\t</div>\t\x3c!-- /ko --\x3e\t\x3c!-- ko if: passengersAltSelect --\x3e\t<div class="nemo-ui-select__dropdown nemo-flights-form__passengers__buttonSelect" data-bind="visible: passengersFastSelectorOpen, click: function (data, e) {e.stopPropagation()}">\t\t<div class="nemo-flights-form__passengers__buttonSelect" data-bind="foreach: {data: passengerTypesOrder, as: \'passType\'}">\t\t\t<div class="nemo-flights-form__passengers__buttonSelect__item">\t\t\t\t<div class="nemo-flights-form__passengers__buttonSelect__item__name" data-bind="text: $root.i18n(\'FlightsSearchForm\',\'passengerType_\'+passType+\'_passSelectorName\')"></div>\t\t\t\t<div class="nemo-flights-form__passengers__buttonSelect__item__count">\t\t\t\t\t<div class="nemo-flights-form__passengers__buttonSelect__item__count__minus" data-bind="\t\t\t\t\t\tcss: {\t\t\t\t\t\t\t\'nemo-flights-form__passengers__buttonSelect__item__count__minus_disabled\':\t\t\t\t\t\t\t\t$parent.passengers()[passType] &&\t\t\t\t\t\t\t\t$parent.passengers()[passType]() - 1 < $parent.passengersRestrictions()[passType].min\t\t\t\t\t\t},\t\t\t\t\t\tclick: function () {$parent.setPassengers(passType, $parent.passengers()[passType] ? $parent.passengers()[passType]() - 1 : 1);}"></div>\t\t\t\t\t<div class="nemo-flights-form__passengers__buttonSelect__item__count__count" data-bind="text: $parent.passengers()[passType] && $parent.passengers()[passType]()"></div>\t\t\t\t\t<div class="nemo-flights-form__passengers__buttonSelect__item__count__plus" data-bind="\t\t\t\t\t\tcss: {\t\t\t\t\t\t\t\'nemo-flights-form__passengers__buttonSelect__item__count__plus_disabled\':\t\t\t\t\t\t\t\t$parent.passengers()[passType] &&\t\t\t\t\t\t\t\t$parent.passengers()[passType]() + 1 > $parent.passengersRestrictions()[passType].max\t\t\t\t\t\t},\t\t\t\t\t\tclick: function () {$parent.setPassengers(passType, $parent.passengers()[passType] ? $parent.passengers()[passType]() + 1 : 1);}"></div>\t\t\t\t</div>\t\t\t\t<div\t\t\t\t\t\tclass="nemo-flights-form__passengers__buttonSelect__item__desc"\t\t\t\t\t\tdata-bind="text: $parent.getPassengerAgeRestrictionText(passType)"></div>\t\t\t</div>\t\t</div>\t</div>\t\x3c!-- /ko --\x3e</div>\t\t\t<div class="nemo-flights-form__buttonContainer"\t\t\t\t\tdata-bind="\t\t\t\t\t\tcss: {\t\t\t\t\t\t\t\'nemo-flights-form__buttonContainer_noRoutes\': $root.controller.options.carrierResultsMode\t\t\t\t\t\t}">\t\t\t\t<button class="nemo-ui-button nemo-ui-button_main nemo-ui-button nemo-ui-button_main_form nemo-flights-form__searchButton"\t\t\t\t\tdata-bind="\t\t\t\t\t\tclick: startSearch,\t\t\t\t\t\tcss: {\t\t\t\t\t\t\t\'nemo-ui-button_disabled\': !searchEnabled(),\t\t\t\t\t\t\t\'nemo-flights-form__searchButton_searching\': isSearching()\t\t\t\t\t\t},\t\t\t\t\t\ttext: $root.i18n(\'FlightsSearchForm\',\'searchButton__text\')"></button>\t\t\t</div>\t\t\t\x3c!-- ko if: !$root.controller.options.carrierResultsMode || tripTypeDisplayFormat != \'none\' --\x3e\t\t\t\t<div  data-bind="attr: {\'class\':\'nemo-flights-form__routeOptions nemo-flights-form__routeOptions_\'+tripType()}">\t<div class="nemo-flights-form__routeOptions__inner"\t\t\tdata-bind="css: { \'nemo-flights-form__routeOptions__inner__withDropdown\': tripTypeDisplayFormat === \'select\' }">\t\t\x3c!-- ko if: tripTypeDisplayFormat != \'none\' --\x3e\t\t\t<div class="nemo-flights-form__routeOptions__item nemo-flights-form__routeOptions__item_routeType"\t\t\t\t\tdata-bind="css: { \'nemo-flights-form__routeOptions__item_routeType_buttons\' : tripTypeDisplayFormat === \'buttons\' } ">\t\t\t\t<span class="nemo-flights-form__routeOptions__item__caption" data-bind="text: $root.i18n(\'FlightsSearchForm\',\'routeOptions__tripType__caption\')"></span>\t\t\t\t\x3c!-- ko if: tripTypeDisplayFormat === \'buttons\' --\x3e\t\t\t\t\t<div class="nemo-flights-form__routeOptions__item__selector" data-bind="foreach: tripTypes">\t\t\t\t\t\t<div class="nemo-flights-form__routeOptions__item__selector__button__trip nemo-ui-button nemo-ui-button_common"\t\t\t\t\t\t\t data-bind="\t\t\t\t\t\t\t\tclick: function () {$parent.tripType($data)},\t\t\t\t\t\t\t\ttext: $root.i18n(\'FlightsSearchForm\',\'triptype_\' + $data),\t\t\t\t\t\t\t\tattr: {\t\t\t\t\t\t\t\t\t\'class\': \'nemo-flights-form__routeOptions__item__selector__button__trip nemo-ui-button nemo-ui-button_common\' +\t\t\t\t\t\t\t\t\t($data == $parent.tripType() ? \' nemo-flights-form__routeOptions__item__selector__button__trip_active\' : \'\')\t\t\t\t\t\t\t\t}"></div>\t\t\t\t\t</div>\t\t\t\t\x3c!-- /ko --\x3e\t\t\t\t\x3c!-- ko if: tripTypeDisplayFormat != \'buttons\' --\x3e\t\t\t\t\t<div class="nemo-ui-select js-common-pseudoSelect nemo-flights-form__routeOptions__item__selector">\t\t\t\t\t\t<div class="nemo-ui-select__toggle js-common-pseudoSelect__toggle nemo-flights-form__routeOptions__item__selector__button" data-bind="pseudoSelect: null, text: $root.i18n(\'FlightsSearchForm\',\'triptype_\' + tripType())"></div>\t\t\t\t\t\t<div class="nemo-ui-select__dropdown js-common-pseudoSelect__dropdown" data-bind="foreach: tripTypes">\t\t\t\t\t\t\t<div class="nemo-ui-select__dropdown__item" data-bind="click: function () {$parent.tripType($data)}, text: $root.i18n(\'FlightsSearchForm\',\'triptype_\' + $data)"></div>\t\t\t\t\t\t</div>\t\t\t\t\t</div>\t\t\t\t\x3c!-- /ko --\x3e\t\t\t</div>\t\t\x3c!-- /ko --\x3e\t\t\x3c!-- ko if: !$root.controller.options.carrierResultsMode --\x3e\t\t\t<div class="nemo-flights-form__routeOptions__item nemo-flights-form__routeOptions__item_class">\t\t\t\t<span class="nemo-flights-form__routeOptions__item__caption" data-bind="text: $root.i18n(\'FlightsSearchForm\',\'routeOptions__serviceClass__caption\')"></span>\t\t\t\t\t<div class="nemo-ui-select js-common-pseudoSelect nemo-flights-form__routeOptions__item__selector">\t\t\t\t\t<div class="nemo-ui-select__toggle js-common-pseudoSelect__toggle nemo-flights-form__routeOptions__item__selector__button"\t\t\t\t\t\t data-bind="pseudoSelect: null, text: $root.i18n(\'FlightsSearchForm\',\'serviceClass_\'+serviceClass())"></div>\t\t\t\t\t<div class="nemo-ui-select__dropdown js-common-pseudoSelect__dropdown" data-bind="foreach: serviceClasses">\t\t\t\t\t\t<div class="nemo-ui-select__dropdown__item" data-bind="click: function (){$parent.serviceClass($data)}, text: $root.i18n(\'FlightsSearchForm\',\'serviceClass_\'+$data)"></div>\t\t\t\t\t</div>\t\t\t\t</div>\t\t\t</div>\t\t\t\x3c!-- ko if: tripType() != \'CR\' && options.dateOptions.aroundDatesValues.length > 0--\x3e\t\t\t\t<div class="nemo-flights-form__routeOptions__item nemo-flights-form__routeOptions__item_multiDate">\t\t\t\t\t<label class="nemo-ui-checkbox nemo-flights-form__routeOptions__item__checkbox">\t\t\t\t\t\t<input class="nemo-ui-checkbox__input" type="checkbox" data-bind="checked: vicinityDates">\t\t\t\t\t\t\t\t\t<span class="nemo-ui-checkbox__caption nemo-flights-form__routeOptions__item__checkbox__caption"\t\t\t\t\t\t\t\t\t\t  data-bind="html: vicinityDatesLabel()"></span>\t\t\t\t\t</label>\t\t\t\t</div>\t\t\t\x3c!-- /ko --\x3e\t\t\t\x3c!-- ko ifnot: options.hideDirectOnlyCheckbox --\x3e\t\t\t\t<div class="nemo-flights-form__routeOptions__item nemo-flights-form__routeOptions__item_direct">\t\t\t\t\t<label class="nemo-ui-checkbox nemo-flights-form__routeOptions__item__checkbox">\t\t\t\t\t\t<input class="nemo-ui-checkbox__input" type="checkbox" data-bind="checked: directFlights">\t\t\t\t\t\t\t\t\t<span class="nemo-ui-checkbox__caption nemo-flights-form__routeOptions__item__checkbox__caption"\t\t\t\t\t\t\t\t\t\t  data-bind="text: $root.i18n(\'FlightsSearchForm\',\'routeOptions__direct__caption\')"></span>\t\t\t\t\t</label>\t\t\t\t</div>\t\t\t\x3c!-- /ko --\x3e\t\t\x3c!-- /ko --\x3e\t</div></div>\t\t\t\x3c!-- /ko --\x3e\t\t</div>\t</div>\t\x3c!-- ko if: useAdditionalOptions --\x3e\t<div class="nemo-flights-form__additional">\x3c!-- ko if: !$root.controller.options.carrierResultsMode --\x3e<div class="nemo-ui-select js-common-pseudoSelect nemo-flights-form__additional__item nemo-flights-form__additional__parameters"><div class="nemo-ui-select__toggle js-common-pseudoSelect__toggle nemo-flights-form__additional__parameters__toggle" data-bind="text: $root.i18n(\'FlightsSearchForm\',\'additionalParameters__toggle\'),pseudoSelect: { adjustWidth: false },click: function (d, e) {$(e.target).parents(\'.js-nemoApp__component\').eq(0).find(\'.js-flights-searchForm-hiddenSelect\').trigger(\'chosen:updated\');}"></div><div class="nemo-ui-select__dropdown js-common-pseudoSelect__dropdown nemo-flights-form__additional__parameters__dropdown" data-bind="click: function (d,e) {e.stopPropagation();}"><div class="nemo-ui-subSectionHeader nemo-flights-form__additional__parameters__header" data-bind="text: $root.i18n(\'FlightsSearchForm\',\'additionalParameters__header\')"></div><div class="nemo-flights-form__additional__parameters__item nemo-flights-form__additional__parameters__item_carrier"><div class="nemo-flights-form__additional__parameters__item__title" data-bind="text: $root.i18n(\'FlightsSearchForm\',\'additionalParameters__carrier__title\')"></div><div class="nemo-flights-form__additional__parameters__item__content">\x3c!-- ko if: !carriersLoaded() --\x3e<div class="nemo-flights-form__additional__parameters__carrierLoading" data-bind="text: $root.i18n(\'FlightsSearchForm\',\'additionalParameters__carrier__loading\')"></div>\x3c!-- /ko --\x3e\x3c!-- ko if: carriersLoaded() --\x3e<select multiple class="js-flights-searchForm-hiddenSelect nemo-flights-form__additional__parameters__carrierSelect"data-bind="options: carriers,optionsValue: function(item) {return \'[\' + item.IATA + \'] \' + item.nameFallback;},optionsText: function(item) {return \'[\' + item.IATA + \'] \' + item.name;},selectedOptions: additionalParameters.carriers,flightsFormSelect: {search_in_values: true,search_contains: true,placeholder_text_multiple: $root.i18n(\'FlightsSearchForm\', \'additionalParameters__carrier__placeholder\'),no_results_text: $root.i18n(\'FlightsSearchForm\', \'additionalParameters__carrier__searchNotFound\')}"></select>\x3c!-- /ko --\x3e</div></div><div class="nemo-flights-form__additional__parameters__item nemo-flights-form__additional__parameters__item_transfers"><div class="nemo-flights-form__additional__parameters__item__title nemo-flights-form__additional__parameters__item__title_transfers" data-bind="text: $root.i18n(\'FlightsSearchForm\',\'additionalParameters__transfers__title\')"></div><div class="nemo-ui-textInput nemo-flights-form__additional__parameters__item__content"><label class="nemo-ui-checkbox nemo-flights-form__additional__parameters__checkbox nemo-flights-form__additional__parameters__checkbox_noTransfers"data-bind="click: function () {directFlights(!directFlights())}"><input class="nemo-ui-checkbox__input" type="checkbox" data-bind="checked: directFlights"><span class="nemo-ui-checkbox__caption nemo-flights-form__additional__parameters__checkbox__caption"data-bind="html: $root.i18n(\'FlightsSearchForm\',\'additionalParameters__transfers__noTransfers__caption\')"></span></label>\x3c!-- ko if: !directFlights() --\x3e<label class="nemo-ui-checkbox nemo-flights-form__additional__parameters__checkbox nemo-flights-form__additional__parameters__checkbox_shortTransfers"data-bind="click: function () {additionalParameters.maxTransfersLength(!additionalParameters.maxTransfersLength())}"><input class="nemo-ui-checkbox__input" type="checkbox" data-bind="checked: additionalParameters.maxTransfersLength"><span class="nemo-ui-checkbox__caption nemo-flights-form__additional__parameters__checkbox__caption"data-bind="html: $root.i18n(\'FlightsSearchForm\',\'additionalParameters__transfers__shortTransfers__caption\')"></span></label>\x3c!-- /ko --\x3e</div></div></div>\x3c!-- ko if: $data.options.scheduleSearchEnable --\x3e<span class="nemo-ui-button nemo-ui-button_common nemo-flights-form__additional__scheduleButton" data-bind="text: $root.i18n(\'FlightsSearchForm\', \'flightsForm-scheduleSearch_button\'),click: function () {$$controller.navigate(\'/scheduleSearch\', true, \'FlightsScheduleSearch\');}"></span>\x3c!-- /ko --\x3e\x3c!-- ko if: $root.controller.options.showNewDesignButton --\x3e<span class="nemo-ui-button nemo-ui-button_common nemo-flights-form__additional__newDesignButton" data-bind="click: $data.onNewDesignButtonClick"><i class="fa fa-magic"></i><span data-bind="text: $root.i18n(\'FlightsSearchForm\', \'additionalParameters__newDesign\')"></span></span>\x3c!-- /ko --\x3e</div>\x3c!-- /ko --\x3e<div class="nemo-flights-form__additional__item nemo-flights-form__additional__item_lastSearches"data-bind="css: {\'nemo-flights-form__additional__item_lastSearches_noRoutes\': $root.controller.options.carrierResultsMode}">\x3c!-- Last searches component --\x3e<div class="" data-bind="component: {name: \'Flights/LastSearches/Controller\', params: {}}"></div></div></div>\t\x3c!-- /ko --\x3e\t<div data-block="passengersFullSelect"     class="nemo-flights-form__passengersPopUp js-nemoApp__popupBlock"     data-bind="foreach: {data: passengerTypesOrder, as: \'passType\'}"\t\t>\t\x3c!-- ko if: $parent.options.passengerCount[passType] &&  parseInt($parent.options.passengerCount[passType]) --\x3e\t<div data-bind="attr: {\'class\': \'nemo-flights-form__passengersPopUp__item nemo-flights-form__passengersPopUp__item_\' + passType}">\t\t<div class="nemo-flights-form__passengersPopUp__item__header" data-bind="text: $root.i18n(\'FlightsSearchForm\',\'passengerType_\'+passType+\'_passSelectorName\')"></div>\t\t<div class="nemo-flights-form__passengersPopUp__item__subheader" data-bind="text: $parent.getPassengerAgeRestrictionText(passType)"></div>\t\t<div class="nemo-flights-form__passengersPopUp__item__counts" data-bind="foreach: $parent.getPassengersCounts(passType)">\t\t\t<div\t\t\t\t\tdata-bind="\t\t\t\t\t\ttext: $root.i18n(\'FlightsSearchForm\',\'passengers_count_\' + $data),\t\t\t\t\t\tattr: {\'class\':\t\t\t\t\t\t\t\t\'nemo-flights-form__passengersPopUp__item__count nemo-flights-form__passengersPopUp__item__count_\' + $data +\t\t\t\t\t\t\t\t(\t\t\t\t\t\t\t\t\t$parents[1].passengers()[passType] && $parents[1].passengers()[passType]() == $data ?\t\t\t\t\t\t\t\t\t\' nemo-flights-form__passengersPopUp__item__count_active\' :\t\t\t\t\t\t\t\t\t\'\'\t\t\t\t\t\t\t\t) +\t\t\t\t\t\t\t\t(\t\t\t\t\t\t\t\t\t$data > $parents[1].passengersRestrictions()[passType].max || $data < $parents[1].passengersRestrictions()[passType].min ?\t\t\t\t\t\t\t\t\t\' nemo-flights-form__passengersPopUp__item__count_disabled\':\t\t\t\t\t\t\t\t\t\'\'\t\t\t\t\t\t\t\t)\t\t\t\t\t\t\t},\t\t\t\t\t\tclick: function () {$parents[1].setPassengers(passType, parseInt($data));}"\t\t\t\t\t></div>\t\t</div>\t</div>\t\x3c!-- /ko --\x3e</div>\t\x3c!-- ko if: isSearching () --\x3e\t\t<div data-bind="\t\t\tautomaticPopup: {\t\t\t\ttitle: $root.i18n(\'FlightsSearchForm\',\'searchingInfo__title\'),\t\t\t\tclose: function () {abortSearch()},\t\t\t\tcloseOnOverlayClick: false,\t\t\t\tcontentClass: \'nemo-flights-form__searchingInfoPopup\',\t\t\t\theaderClass: \'ui-dialog-titlebar_progress nemo-flights-form__searchingInfoPopup__header\'\t\t\t}\t\t">\t\t\t<div class="nemo-flights-form__searchingInfo nemo-flights-form__searchingInfoPopup__content">\t<div class="nemo-flights-form__searchingInfo__header" data-bind="text: $root.i18n(\'FlightsSearchForm\',\'searchingInfo__header\')"></div>\t<div class="nemo-flights-form__searchingInfo__subHeader"\t\tdata-bind="\t\t\ttext: $root.i18n(\'FlightsSearchForm\',\'searchingInfo__info\')\t\t\t\t.replace(\'[%-flightType-%]\', $root.i18n(\'FlightsSearchForm\', \'searchingInfo__flightType_\' + tripType()))\t\t\t\t.replace(\'[%-class-%]\', $root.i18n(\'FlightsSearchForm\', \'searchingInfo__class_\' + serviceClass()))\t\t"></div>\t<div class="nemo-flights-form__searchingInfo__segments" data-bind="css: {\'nemo-flights-form__searchingInfo__segments_RTLike\': segments().length == 2}, foreach: segments"><div class="nemo-flights-form__searchingInfo__segment"><div class="nemo-flights-form__searchingInfo__segment__inner"><div class="nemo-flights-form__searchingInfo__segment__date" data-bind="text: items.departureDate.value() ? items.departureDate.value().getDate() + \' \' + items.departureDate.value().getMonthName() + \', \' + items.departureDate.value().getDOWName() : \'\'"></div><div class="nemo-flights-form__searchingInfo__segment__route"><span class="nemo-flights-form__searchingInfo__segment__route__departure" data-bind="text: items.departure.value() ? items.departure.value().city.name || items.departure.value().name : \'\'"></span><span class="nemo-flights-form__searchingInfo__segment__route__arrival" data-bind="text: items.arrival.value() ? items.arrival.value().city.name || items.arrival.value().name : \'\'"></span></div></div></div></div></div>\t\t</div>\t\x3c!-- /ko --\x3e\t\x3c!-- ko if: searchError --\x3e\t\t<div data-bind="automaticPopup: { title: $root.i18n(\'FlightsSearchForm\',\'searchingError__title\'), close: function () { searchError(false); } }">\t\t\t<div data-bind="text: searchError" style="display: none;"></div>\t\t</div>\t\x3c!-- /ko --\x3e\x3c!-- /ko --\x3e\x3c!-- ko if: $$error() --\x3e\t<div data-bind="text: $$error()"></div>\x3c!-- /ko --\x3e\x3c!-- ko if: $$loading() --\x3e\t<div class="nemo-flights-form__loader"></div>\x3c!-- /ko --\x3e</div>'}),define("html/FlightsLastSearches",[],function(){
return'\x3c!-- ko if: !$$loading() --\x3e\t<div class="nemo-ui-select nemo-flights-lastSearches js-common-pseudoSelect" data-bind="if: history().length">\t\t<div class="nemo-ui-select__toggle nemo-flights-lastSearches__toggler js-common-pseudoSelect__toggle"\t\t     data-bind="pseudoSelect: {adjustWidth: false}, text: $root.i18n(\'FlightsLastSearches\',\'select__title\')"></div>\t\t<div class="nemo-ui-select__dropdown nemo-flights-lastSearches__dropdown js-common-pseudoSelect__dropdown" data-bind="foreach: history">\t\t\t<div data-bind="\t\t\t\t\tattr:{\'class\':\'nemo-ui-select__dropdown__item nemo-flights-lastSearches__dropdown__option nemo-flights-lastSearches__dropdown__option_\' + parameters.searchType},\t\t\t\t\tclick: function () {$parent.goTo($data);}\t\t\t\t">\t\t\t\t<div class="nemo-flights-lastSearches__dropdown__option__legs" data-bind="foreach: segments">\t\t\t\t\t\x3c!-- ko if: $parent.parameters.searchType != \'RT\' || $index() == 0 --\x3e\t\t\t\t\t<div class="nemo-flights-lastSearches__dropdown__option__leg">\t\t\t\t\t\t<span class="nemo-flights-lastSearches__dropdown__option__leg__departure">\t\t\t\t\t\t\t\x3c!-- ko text: departure.name --\x3e\x3c!-- /ko --\x3e<span class="nemo-flights-lastSearches__dropdown__option__leg__country" data-bind="text: \', \' + departure.country.name"></span>\t\t\t\t\t\t</span>\t\t\t\t\t\t<span class="nemo-flights-lastSearches__dropdown__option__leg__arrival">\t\t\t\t\t\t\t\x3c!-- ko text: arrival.name --\x3e\x3c!-- /ko --\x3e<span class="nemo-flights-lastSearches__dropdown__option__leg__country" data-bind="text: \', \' + arrival.country.name"></span>\t\t\t\t\t\t</span>\t\t\t\t\t\t\x3c!-- ko if: $parent.parameters.searchType == \'CR\' --\x3e\t\t\t\t\t\t<div class="nemo-flights-lastSearches__dropdown__option__leg__date" data-bind="text: departureDate.getDate() + \' \' + departureDate.getMonthName() + \', \' + departureDate.getDOWNameShort() + \'.\'"></div>\t\t\t\t\t\t\x3c!-- /ko --\x3e\t\t\t\t\t</div>\t\t\t\t\t\x3c!-- /ko --\x3e\t\t\t\t</div>\t\t\t\t\x3c!-- ko if: parameters.searchType == \'RT\' --\x3e\t\t\t\t<div class="nemo-flights-lastSearches__dropdown__option__rtdates">\t\t\t\t\t<span class="nemo-flights-lastSearches__dropdown__option__rtdates__date" data-bind="with: segments[0].departureDate">\t\t\t\t\t\t\x3c!-- ko text: $root.i18n(\'FlightsLastSearches\',\'RT__leg_0\') --\x3e\x3c!-- /ko --\x3e\t\t\t\t\t\t<span class="nemo-flights-lastSearches__dropdown__option__rtdates__actualDate" data-bind="text: getDate() + \' \' + getMonthName() + \', \' + getDOWNameShort() + \'.\'"></span>\t\t\t\t\t</span>\t\t\t\t\t<span class="nemo-flights-lastSearches__dropdown__option__rtdates__backdate" data-bind="with: segments[1].departureDate">\t\t\t\t\t\t\x3c!-- ko text: $root.i18n(\'FlightsLastSearches\',\'RT__leg_1\') --\x3e\x3c!-- /ko --\x3e\t\t\t\t\t\t<span class="nemo-flights-lastSearches__dropdown__option__rtdates__actualDate" data-bind="text: getDate() + \' \' + getMonthName() + \', \' + getDOWNameShort() + \'.\'"></span>\t\t\t\t\t</span>\t\t\t\t</div>\t\t\t\t\x3c!-- /ko --\x3e\t\t\t\t<div class="nemo-flights-lastSearches__dropdown__option__additional">\t\t\t\t\t\x3c!-- ko if: parameters.searchType == \'OW\' --\x3e\t\t\t\t\t<span class="nemo-flights-lastSearches__dropdown__option__additional__owdate" data-bind="text: segments[0].departureDate.getDate() + \' \' + segments[0].departureDate.getMonthName() + \', \' + segments[0].departureDate.getDOWNameShort() + \'.\'"></span>\t\t\t\t\t\x3c!-- /ko --\x3e\t\t\t\t\t<span class="nemo-flights-lastSearches__dropdown__option__additional__passengers" data-bind="text: $parent.passengersSummary(passengers)"></span>\t\t\t\t\t<span class="nemo-flights-lastSearches__dropdown__option__additional__class" data-bind="text: $root.i18n(\'FlightsSearchForm\', \'serviceClass_\' + parameters.serviceClass)"></span>\t\t\t\t</div>\t\t\t</div>\t\t</div>\t</div>\x3c!-- /ko --\x3e'}),function(){!function(e){var t=this||(0,eval)("this"),i=t.document,n=t.navigator,s=t.jQuery,o=t.JSON;!function(e){"function"==typeof require&&"object"==typeof exports&&"object"==typeof module?e(module.exports||exports,require):"function"==typeof define&&define.amd?define("knockout",["exports","require"],e):e(t.ko={})}(function(r,a){function l(e,t){return(null===e||typeof e in p)&&e===t}function c(t,i){var n;return function(){n||(n=setTimeout(function(){n=e,t()},i))}}function u(e,t){var i;return function(){clearTimeout(i),i=setTimeout(e,t)}}function h(e,t,i,n){d.d[e]={init:function(e,s,o,r,a){var l,c;return d.s(function(){var o=d.a.c(s()),r=!i!=!o,u=!c;(u||t||r!==l)&&(u&&d.Y.la()&&(c=d.a.ia(d.f.childNodes(e),!0)),r?(u||d.f.T(e,d.a.ia(c)),d.Ca(n?n(a,o):a,e)):d.f.ja(e),l=r)},null,{o:e}),{controlsDescendantBindings:!0}}},d.h.ha[e]=!1,d.f.Q[e]=!0}var d=void 0!==r?r:{};d.b=function(e,t){for(var i=e.split("."),n=d,s=0;s<i.length-1;s++)n=n[i[s]];n[i[i.length-1]]=t},d.A=function(e,t,i){e[t]=i},d.version="3.2.0",d.b("version",d.version),d.a=function(){function r(e,t){for(var i in e)e.hasOwnProperty(i)&&t(i,e[i])}function a(e,t){if(t)for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i]);return e}function l(e,t){return e.__proto__=t,e}var c={__proto__:[]}instanceof Array,u={},h={};u[n&&/Firefox\/2/i.test(n.userAgent)?"KeyboardEvent":"UIEvents"]=["keyup","keydown","keypress"],u.MouseEvents="click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave".split(" "),r(u,function(e,t){if(t.length)for(var i=0,n=t.length;i<n;i++)h[t[i]]=e});var p={propertychange:!0},f=i&&function(){for(var t=3,n=i.createElement("div"),s=n.getElementsByTagName("i");n.innerHTML="\x3c!--[if gt IE "+ ++t+"]><i></i><![endif]--\x3e",s[0];);return 4<t?t:e}();return{vb:["authenticity_token",/^__RequestVerificationToken(_.*)?$/],u:function(e,t){for(var i=0,n=e.length;i<n;i++)t(e[i],i)},m:function(e,t){if("function"==typeof Array.prototype.indexOf)return Array.prototype.indexOf.call(e,t);for(var i=0,n=e.length;i<n;i++)if(e[i]===t)return i;return-1},qb:function(e,t,i){for(var n=0,s=e.length;n<s;n++)if(t.call(i,e[n],n))return e[n];return null},ua:function(e,t){var i=d.a.m(e,t);0<i?e.splice(i,1):0===i&&e.shift()},rb:function(e){e=e||[];for(var t=[],i=0,n=e.length;i<n;i++)0>d.a.m(t,e[i])&&t.push(e[i]);return t},Da:function(e,t){e=e||[];for(var i=[],n=0,s=e.length;n<s;n++)i.push(t(e[n],n));return i},ta:function(e,t){e=e||[];for(var i=[],n=0,s=e.length;n<s;n++)t(e[n],n)&&i.push(e[n]);return i},ga:function(e,t){if(t instanceof Array)e.push.apply(e,t);else for(var i=0,n=t.length;i<n;i++)e.push(t[i]);return e},ea:function(e,t,i){var n=d.a.m(d.a.Xa(e),t);0>n?i&&e.push(t):i||e.splice(n,1)},xa:c,extend:a,za:l,Aa:c?l:a,G:r,na:function(e,t){if(!e)return e;var i,n={};for(i in e)e.hasOwnProperty(i)&&(n[i]=t(e[i],i,e));return n},Ka:function(e){for(;e.firstChild;)d.removeNode(e.firstChild)},oc:function(e){e=d.a.S(e);for(var t=i.createElement("div"),n=0,s=e.length;n<s;n++)t.appendChild(d.R(e[n]));return t},ia:function(e,t){for(var i=0,n=e.length,s=[];i<n;i++){var o=e[i].cloneNode(!0);s.push(t?d.R(o):o)}return s},T:function(e,t){if(d.a.Ka(e),t)for(var i=0,n=t.length;i<n;i++)e.appendChild(t[i])},Lb:function(e,t){var i=e.nodeType?[e]:e;if(0<i.length){for(var n=i[0],s=n.parentNode,o=0,r=t.length;o<r;o++)s.insertBefore(t[o],n);for(o=0,r=i.length;o<r;o++)d.removeNode(i[o])}},ka:function(e,t){if(e.length){for(t=8===t.nodeType&&t.parentNode||t;e.length&&e[0].parentNode!==t;)e.shift();if(1<e.length){var i=e[0],n=e[e.length-1];for(e.length=0;i!==n;)if(e.push(i),!(i=i.nextSibling))return;e.push(n)}}return e},Nb:function(e,t){7>f?e.setAttribute("selected",t):e.selected=t},cb:function(t){return null===t||t===e?"":t.trim?t.trim():t.toString().replace(/^[\s\xa0]+|[\s\xa0]+$/g,"")},vc:function(e,t){return e=e||"",!(t.length>e.length)&&e.substring(0,t.length)===t},cc:function(e,t){if(e===t)return!0;if(11===e.nodeType)return!1;if(t.contains)return t.contains(3===e.nodeType?e.parentNode:e);if(t.compareDocumentPosition)return 16==(16&t.compareDocumentPosition(e));for(;e&&e!=t;)e=e.parentNode;return!!e},Ja:function(e){return d.a.cc(e,e.ownerDocument.documentElement)},ob:function(e){return!!d.a.qb(e,d.a.Ja)},t:function(e){return e&&e.tagName&&e.tagName.toLowerCase()},n:function(e,t,i){var n=f&&p[t];if(!n&&s)s(e).bind(t,i);else if(n||"function"!=typeof e.addEventListener){if(void 0===e.attachEvent)throw Error("Browser doesn't support addEventListener or attachEvent");var o=function(t){i.call(e,t)},r="on"+t;e.attachEvent(r,o),d.a.w.da(e,function(){e.detachEvent(r,o)})}else e.addEventListener(t,i,!1)},oa:function(e,n){if(!e||!e.nodeType)throw Error("element must be a DOM node when calling triggerEvent");var o;if("input"===d.a.t(e)&&e.type&&"click"==n.toLowerCase()?(o=e.type,o="checkbox"==o||"radio"==o):o=!1,s&&!o)s(e).trigger(n);else if("function"==typeof i.createEvent){if("function"!=typeof e.dispatchEvent)throw Error("The supplied element doesn't support dispatchEvent");o=i.createEvent(h[n]||"HTMLEvents"),o.initEvent(n,!0,!0,t,0,0,0,0,0,!1,!1,!1,!1,0,e),e.dispatchEvent(o)}else if(o&&e.click)e.click();else{if(void 0===e.fireEvent)throw Error("Browser doesn't support triggering events");e.fireEvent("on"+n)}},c:function(e){return d.C(e)?e():e},Xa:function(e){return d.C(e)?e.v():e},Ba:function(e,t,i){if(t){var n=/\S+/g,s=e.className.match(n)||[];d.a.u(t.match(n),function(e){d.a.ea(s,e,i)}),e.className=s.join(" ")}},bb:function(t,i){var n=d.a.c(i);null!==n&&n!==e||(n="");var s=d.f.firstChild(t);!s||3!=s.nodeType||d.f.nextSibling(s)?d.f.T(t,[t.ownerDocument.createTextNode(n)]):s.data=n,d.a.fc(t)},Mb:function(e,t){if(e.name=t,7>=f)try{e.mergeAttributes(i.createElement("<input name='"+e.name+"'/>"),!1)}catch(e){}},fc:function(e){9<=f&&(e=1==e.nodeType?e:e.parentNode,e.style&&(e.style.zoom=e.style.zoom))},dc:function(e){if(f){var t=e.style.width;e.style.width=0,e.style.width=t}},sc:function(e,t){e=d.a.c(e),t=d.a.c(t);for(var i=[],n=e;n<=t;n++)i.push(n);return i},S:function(e){for(var t=[],i=0,n=e.length;i<n;i++)t.push(e[i]);return t},yc:6===f,zc:7===f,L:f,xb:function(e,t){for(var i=d.a.S(e.getElementsByTagName("input")).concat(d.a.S(e.getElementsByTagName("textarea"))),n="string"==typeof t?function(e){return e.name===t}:function(e){return t.test(e.name)},s=[],o=i.length-1;0<=o;o--)n(i[o])&&s.push(i[o]);return s},pc:function(e){return"string"==typeof e&&(e=d.a.cb(e))?o&&o.parse?o.parse(e):new Function("return "+e)():null},eb:function(e,t,i){if(!o||!o.stringify)throw Error("Cannot find JSON.stringify(). Some browsers (e.g., IE < 8) don't support it natively, but you can overcome this by adding a script reference to json2.js, downloadable from http://www.json.org/json2.js");return o.stringify(d.a.c(e),t,i)},qc:function(e,t,n){n=n||{};var s=n.params||{},o=n.includeFields||this.vb,a=e;if("object"==typeof e&&"form"===d.a.t(e))for(var a=e.action,l=o.length-1;0<=l;l--)for(var c=d.a.xb(e,o[l]),u=c.length-1;0<=u;u--)s[c[u].name]=c[u].value;t=d.a.c(t);var h=i.createElement("form");h.style.display="none",h.action=a,h.method="post";for(var p in t)e=i.createElement("input"),e.type="hidden",e.name=p,e.value=d.a.eb(d.a.c(t[p])),h.appendChild(e);r(s,function(e,t){var n=i.createElement("input");n.type="hidden",n.name=e,n.value=t,h.appendChild(n)}),i.body.appendChild(h),n.submitter?n.submitter(h):h.submit(),setTimeout(function(){h.parentNode.removeChild(h)},0)}}}(),d.b("utils",d.a),d.b("utils.arrayForEach",d.a.u),d.b("utils.arrayFirst",d.a.qb),d.b("utils.arrayFilter",d.a.ta),d.b("utils.arrayGetDistinctValues",d.a.rb),d.b("utils.arrayIndexOf",d.a.m),d.b("utils.arrayMap",d.a.Da),d.b("utils.arrayPushAll",d.a.ga),d.b("utils.arrayRemoveItem",d.a.ua),d.b("utils.extend",d.a.extend),d.b("utils.fieldsIncludedWithJsonPost",d.a.vb),d.b("utils.getFormFields",d.a.xb),d.b("utils.peekObservable",d.a.Xa),d.b("utils.postJson",d.a.qc),d.b("utils.parseJson",d.a.pc),d.b("utils.registerEventHandler",d.a.n),d.b("utils.stringifyJson",d.a.eb),d.b("utils.range",d.a.sc),d.b("utils.toggleDomNodeCssClass",d.a.Ba),d.b("utils.triggerEvent",d.a.oa),d.b("utils.unwrapObservable",d.a.c),d.b("utils.objectForEach",d.a.G),d.b("utils.addOrRemoveItem",d.a.ea),d.b("unwrap",d.a.c),Function.prototype.bind||(Function.prototype.bind=function(e){var t=this,i=Array.prototype.slice.call(arguments);return e=i.shift(),function(){return t.apply(e,i.concat(Array.prototype.slice.call(arguments)))}}),d.a.e=new function(){function t(t,o){var r=t[n];if(!r||"null"===r||!s[r]){if(!o)return e;r=t[n]="ko"+i++,s[r]={}}return s[r]}var i=0,n="__ko__"+(new Date).getTime(),s={};return{get:function(i,n){var s=t(i,!1);return s===e?e:s[n]},set:function(i,n,s){s===e&&t(i,!1)===e||(t(i,!0)[n]=s)},clear:function(e){var t=e[n];return!!t&&(delete s[t],e[n]=null,!0)},F:function(){return i+++n}}},d.b("utils.domData",d.a.e),d.b("utils.domData.clear",d.a.e.clear),d.a.w=new function(){function t(t,i){var s=d.a.e.get(t,n);return s===e&&i&&(s=[],d.a.e.set(t,n,s)),s}function i(e){var n=t(e,!1);if(n)for(var n=n.slice(0),s=0;s<n.length;s++)n[s](e);if(d.a.e.clear(e),d.a.w.cleanExternalData(e),r[e.nodeType])for(n=e.firstChild;e=n;)n=e.nextSibling,8===e.nodeType&&i(e)}var n=d.a.e.F(),o={1:!0,8:!0,9:!0},r={1:!0,9:!0};return{da:function(e,i){if("function"!=typeof i)throw Error("Callback must be a function");t(e,!0).push(i)},Kb:function(i,s){var o=t(i,!1);o&&(d.a.ua(o,s),0==o.length&&d.a.e.set(i,n,e))},R:function(e){if(o[e.nodeType]&&(i(e),r[e.nodeType])){var t=[];d.a.ga(t,e.getElementsByTagName("*"));for(var n=0,s=t.length;n<s;n++)i(t[n])}return e},removeNode:function(e){d.R(e),e.parentNode&&e.parentNode.removeChild(e)},cleanExternalData:function(e){s&&"function"==typeof s.cleanData&&s.cleanData([e])}}},d.R=d.a.w.R,d.removeNode=d.a.w.removeNode,d.b("cleanNode",d.R),d.b("removeNode",d.removeNode),d.b("utils.domNodeDisposal",d.a.w),d.b("utils.domNodeDisposal.addDisposeCallback",d.a.w.da),d.b("utils.domNodeDisposal.removeDisposeCallback",d.a.w.Kb),function(){d.a.ba=function(e){var n;if(s){if(s.parseHTML)n=s.parseHTML(e)||[];else if((n=s.clean([e]))&&n[0]){for(e=n[0];e.parentNode&&11!==e.parentNode.nodeType;)e=e.parentNode;e.parentNode&&e.parentNode.removeChild(e)}}else{var o=d.a.cb(e).toLowerCase();for(n=i.createElement("div"),o=o.match(/^<(thead|tbody|tfoot)/)&&[1,"<table>","</table>"]||!o.indexOf("<tr")&&[2,"<table><tbody>","</tbody></table>"]||(!o.indexOf("<td")||!o.indexOf("<th"))&&[3,"<table><tbody><tr>","</tr></tbody></table>"]||[0,"",""],e="ignored<div>"+o[1]+e+o[2]+"</div>","function"==typeof t.innerShiv?n.appendChild(t.innerShiv(e)):n.innerHTML=e;o[0]--;)n=n.lastChild;n=d.a.S(n.lastChild.childNodes)}return n},d.a.$a=function(t,i){if(d.a.Ka(t),null!==(i=d.a.c(i))&&i!==e)if("string"!=typeof i&&(i=i.toString()),s)s(t).html(i);else for(var n=d.a.ba(i),o=0;o<n.length;o++)t.appendChild(n[o])}}(),d.b("utils.parseHtmlFragment",d.a.ba),d.b("utils.setHtml",d.a.$a),d.D=function(){function t(e,i){if(e)if(8==e.nodeType){var n=d.D.Gb(e.nodeValue);null!=n&&i.push({bc:e,mc:n})}else if(1==e.nodeType)for(var n=0,s=e.childNodes,o=s.length;n<o;n++)t(s[n],i)}var i={};return{Ua:function(e){if("function"!=typeof e)throw Error("You can only pass a function to ko.memoization.memoize()");var t=(4294967296*(1+Math.random())|0).toString(16).substring(1)+(4294967296*(1+Math.random())|0).toString(16).substring(1);return i[t]=e,"\x3c!--[ko_memo:"+t+"]--\x3e"},Rb:function(t,n){var s=i[t];if(s===e)throw Error("Couldn't find any memo with ID "+t+". Perhaps it's already been unmemoized.");try{return s.apply(null,n||[]),!0}finally{delete i[t]}},Sb:function(e,i){var n=[];t(e,n);for(var s=0,o=n.length;s<o;s++){var r=n[s].bc,a=[r];i&&d.a.ga(a,i),d.D.Rb(n[s].mc,a),r.nodeValue="",r.parentNode&&r.parentNode.removeChild(r)}},Gb:function(e){return(e=e.match(/^\[ko_memo\:(.*?)\]$/))?e[1]:null}}}(),d.b("memoization",d.D),d.b("memoization.memoize",d.D.Ua),d.b("memoization.unmemoize",d.D.Rb),d.b("memoization.parseMemoText",d.D.Gb),d.b("memoization.unmemoizeDomNodeAndDescendants",d.D.Sb),d.La={throttle:function(e,t){e.throttleEvaluation=t;var i=null;return d.j({read:e,write:function(n){clearTimeout(i),i=setTimeout(function(){e(n)},t)}})},rateLimit:function(e,t){var i,n,s;"number"==typeof t?i=t:(i=t.timeout,n=t.method),s="notifyWhenChangesStop"==n?u:c,e.Ta(function(e){return s(e,i)})},notify:function(e,t){e.equalityComparer="always"==t?null:l}};var p={undefined:1,boolean:1,number:1,string:1};d.b("extenders",d.La),d.Pb=function(e,t,i){this.target=e,this.wa=t,this.ac=i,this.Cb=!1,d.A(this,"dispose",this.K)},d.Pb.prototype.K=function(){this.Cb=!0,this.ac()},d.P=function(){d.a.Aa(this,d.P.fn),this.M={}};var f="change",_={U:function(e,t,i){var n=this;i=i||f;var s=new d.Pb(n,t?e.bind(t):e,function(){d.a.ua(n.M[i],s),n.nb&&n.nb()});return n.va&&n.va(i),n.M[i]||(n.M[i]=[]),n.M[i].push(s),s},notifySubscribers:function(e,t){if(t=t||f,this.Ab(t))try{d.k.Ea();for(var i,n=this.M[t].slice(0),s=0;i=n[s];++s)i.Cb||i.wa(e)}finally{d.k.end()}},Ta:function(e){var t,i,n,s=this,o=d.C(s);s.qa||(s.qa=s.notifySubscribers,s.notifySubscribers=function(e,t){t&&t!==f?"beforeChange"===t?s.kb(e):s.qa(e,t):s.lb(e)});var r=e(function(){o&&n===s&&(n=s()),t=!1,s.Pa(i,n)&&s.qa(i=n)});s.lb=function(e){t=!0,n=e,r()},s.kb=function(e){t||(i=e,s.qa(e,"beforeChange"))}},Ab:function(e){return this.M[e]&&this.M[e].length},yb:function(){var e=0;return d.a.G(this.M,function(t,i){e+=i.length}),e},Pa:function(e,t){return!this.equalityComparer||!this.equalityComparer(e,t)},extend:function(e){var t=this;return e&&d.a.G(e,function(e,i){var n=d.La[e];"function"==typeof n&&(t=n(t,i)||t)}),t}};d.A(_,"subscribe",_.U),d.A(_,"extend",_.extend),d.A(_,"getSubscriptionsCount",_.yb),d.a.xa&&d.a.za(_,Function.prototype),d.P.fn=_,d.Db=function(e){return null!=e&&"function"==typeof e.U&&"function"==typeof e.notifySubscribers},d.b("subscribable",d.P),d.b("isSubscribable",d.Db),d.Y=d.k=function(){function e(e){n.push(i),i=e}function t(){i=n.pop()}var i,n=[],s=0;return{Ea:e,end:t,Jb:function(e){if(i){if(!d.Db(e))throw Error("Only subscribable things can act as dependencies");i.wa(e,e.Vb||(e.Vb=++s))}},B:function(i,n,s){try{return e(),i.apply(n,s||[])}finally{t()}},la:function(){if(i)return i.s.la()},ma:function(){if(i)return i.ma}}}(),d.b("computedContext",d.Y),d.b("computedContext.getDependenciesCount",d.Y.la),d.b("computedContext.isInitial",d.Y.ma),d.b("computedContext.isSleeping",d.Y.Ac),d.p=function(e){function t(){return 0<arguments.length?(t.Pa(i,arguments[0])&&(t.X(),i=arguments[0],t.W()),this):(d.k.Jb(t),i)}var i=e;return d.P.call(t),d.a.Aa(t,d.p.fn),t.v=function(){return i},t.W=function(){t.notifySubscribers(i)},t.X=function(){t.notifySubscribers(i,"beforeChange")},d.A(t,"peek",t.v),d.A(t,"valueHasMutated",t.W),d.A(t,"valueWillMutate",t.X),t},d.p.fn={equalityComparer:l};var m=d.p.rc="__ko_proto__";d.p.fn[m]=d.p,d.a.xa&&d.a.za(d.p.fn,d.P.fn),d.Ma=function(t,i){return null!==t&&t!==e&&t[m]!==e&&(t[m]===i||d.Ma(t[m],i))},d.C=function(e){return d.Ma(e,d.p)},d.Ra=function(e){return!!("function"==typeof e&&e[m]===d.p||"function"==typeof e&&e[m]===d.j&&e.hc)},d.b("observable",d.p),d.b("isObservable",d.C),d.b("isWriteableObservable",d.Ra),d.b("isWritableObservable",d.Ra),d.aa=function(e){if("object"!=typeof(e=e||[])||!("length"in e))throw Error("The argument passed when initializing an observable array must be an array, or null, or undefined.");return e=d.p(e),d.a.Aa(e,d.aa.fn),e.extend({trackArrayChanges:!0})},d.aa.fn={remove:function(e){for(var t=this.v(),i=[],n="function"!=typeof e||d.C(e)?function(t){return t===e}:e,s=0;s<t.length;s++){var o=t[s];n(o)&&(0===i.length&&this.X(),i.push(o),t.splice(s,1),s--)}return i.length&&this.W(),i},removeAll:function(t){if(t===e){var i=this.v(),n=i.slice(0);return this.X(),i.splice(0,i.length),this.W(),n}return t?this.remove(function(e){return 0<=d.a.m(t,e)}):[]},destroy:function(e){var t=this.v(),i="function"!=typeof e||d.C(e)?function(t){return t===e}:e;this.X();for(var n=t.length-1;0<=n;n--)i(t[n])&&(t[n]._destroy=!0);this.W()},destroyAll:function(t){return t===e?this.destroy(function(){return!0}):t?this.destroy(function(e){return 0<=d.a.m(t,e)}):[]},indexOf:function(e){var t=this();return d.a.m(t,e)},replace:function(e,t){var i=this.indexOf(e);0<=i&&(this.X(),this.v()[i]=t,this.W())}},d.a.u("pop push reverse shift sort splice unshift".split(" "),function(e){d.aa.fn[e]=function(){var t=this.v();return this.X(),this.sb(t,e,arguments),t=t[e].apply(t,arguments),this.W(),t}}),d.a.u(["slice"],function(e){d.aa.fn[e]=function(){var t=this();return t[e].apply(t,arguments)}}),d.a.xa&&d.a.za(d.aa.fn,d.p.fn),d.b("observableArray",d.aa);var g="arrayChange";d.La.trackArrayChanges=function(e){function t(){if(!i){i=!0;var t=e.notifySubscribers;e.notifySubscribers=function(e,i){return i&&i!==f||++s,t.apply(this,arguments)};var o=[].concat(e.v()||[]);n=null,e.U(function(t){if(t=[].concat(t||[]),e.Ab(g)){var i;(!n||1<s)&&(n=d.a.Fa(o,t,{sparse:!0})),i=n,i.length&&e.notifySubscribers(i,g)}o=t,n=null,s=0})}}if(!e.sb){var i=!1,n=null,s=0,o=e.U;e.U=e.subscribe=function(e,i,n){return n===g&&t(),o.apply(this,arguments)},e.sb=function(e,t,o){function r(e,t,i){return a[a.length]={status:e,value:t,index:i}}if(i&&!s){var a=[],l=e.length,c=o.length,u=0;switch(t){case"push":u=l;case"unshift":for(t=0;t<c;t++)r("added",o[t],u+t);break;case"pop":u=l-1;case"shift":l&&r("deleted",e[u],u);break;case"splice":t=Math.min(Math.max(0,0>o[0]?l+o[0]:o[0]),l);for(var l=1===c?l:Math.min(t+(o[1]||0),l),c=t+c-2,u=Math.max(l,c),h=[],p=[],f=2;t<u;++t,++f)t<l&&p.push(r("deleted",e[t],t)),t<c&&h.push(r("added",o[f],t));d.a.wb(p,h);break;default:return}n=a}}}},d.s=d.j=function(t,i,n){function s(){d.a.G(S,function(e,t){t.K()}),S={}}function o(){s(),k=0,m=!0,p=!1}function r(){var e=l.throttleEvaluation;e&&0<=e?(clearTimeout(D),D=setTimeout(a,e)):l.ib?l.ib():a()}function a(t){if(f){if(v)throw Error("A 'pure' computed must not be called recursively")}else if(!m){if(x&&x()){if(!_)return void C()}else _=!1;if(f=!0,b)try{var n={};d.k.Ea({wa:function(e,t){n[t]||(n[t]=1,++k)},s:l,ma:e}),k=0,h=g.call(i)}finally{d.k.end(),f=!1}else try{var s=S,o=k;d.k.Ea({wa:function(e,t){m||(o&&s[t]?(S[t]=s[t],++k,delete s[t],--o):S[t]||(S[t]=e.U(r),++k))},s:l,ma:v?e:!k}),S={},k=0;try{var a=i?g.call(i):g()}finally{d.k.end(),o&&d.a.G(s,function(e,t){t.K()}),p=!1}l.Pa(h,a)&&(l.notifySubscribers(h,"beforeChange"),h=a,!0!==t&&l.notifySubscribers(h))}finally{f=!1}k||C()}}function l(){if(0<arguments.length){if("function"!=typeof y)throw Error("Cannot write a value to a ko.computed unless you specify a 'write' option. If you wish to read the current value, don't pass any parameters.");return y.apply(i,arguments),this}return d.k.Jb(l),p&&a(!0),h}function c(){return p&&!k&&a(!0),h}function u(){return p||0<k}var h,p=!0,f=!1,_=!1,m=!1,g=t,v=!1,b=!1;if(g&&"object"==typeof g?(n=g,g=n.read):(n=n||{},g||(g=n.read)),"function"!=typeof g)throw Error("Pass a function that returns the value of the ko.computed");var y=n.write,T=n.disposeWhenNodeIsRemoved||n.o||null,w=n.disposeWhen||n.Ia,x=w,C=o,S={},k=0,D=null;i||(i=n.owner),d.P.call(l),d.a.Aa(l,d.j.fn),l.v=c,l.la=function(){return k},l.hc="function"==typeof n.write,l.K=function(){C()},l.Z=u;var P=l.Ta;return l.Ta=function(e){P.call(l,e),l.ib=function(){l.kb(h),p=!0,l.lb(l)}},n.pure?(b=v=!0,l.va=function(){b&&(b=!1,a(!0))},l.nb=function(){l.yb()||(s(),b=p=!0)}):n.deferEvaluation&&(l.va=function(){c(),delete l.va}),d.A(l,"peek",l.v),d.A(l,"dispose",l.K),d.A(l,"isActive",l.Z),d.A(l,"getDependenciesCount",l.la),T&&(_=!0,T.nodeType&&(x=function(){return!d.a.Ja(T)||w&&w()})),b||n.deferEvaluation||a(),T&&u()&&T.nodeType&&(C=function(){d.a.w.Kb(T,C),o()},d.a.w.da(T,C)),l},d.jc=function(e){return d.Ma(e,d.j)},_=d.p.rc,d.j[_]=d.p,d.j.fn={equalityComparer:l},d.j.fn[_]=d.j,d.a.xa&&d.a.za(d.j.fn,d.P.fn),d.b("dependentObservable",d.j),d.b("computed",d.j),d.b("isComputed",d.jc),d.Ib=function(e,t){return"function"==typeof e?d.s(e,t,{pure:!0}):(e=d.a.extend({},e),e.pure=!0,d.s(e,t))},d.b("pureComputed",d.Ib),function(){function t(s,o,r){if(r=r||new n,"object"!=typeof(s=o(s))||null===s||s===e||s instanceof Date||s instanceof String||s instanceof Number||s instanceof Boolean)return s;var a=s instanceof Array?[]:{};return r.save(s,a),i(s,function(i){var n=o(s[i]);switch(typeof n){case"boolean":case"number":case"string":case"function":a[i]=n;break;case"object":case"undefined":var l=r.get(n);a[i]=l!==e?l:t(n,o,r)}}),a}function i(e,t){if(e instanceof Array){for(var i=0;i<e.length;i++)t(i);"function"==typeof e.toJSON&&t("toJSON")}else for(i in e)t(i)}function n(){this.keys=[],this.hb=[]}d.Qb=function(e){if(0==arguments.length)throw Error("When calling ko.toJS, pass the object you want to convert.");return t(e,function(e){for(var t=0;d.C(e)&&10>t;t++)e=e();return e})},d.toJSON=function(e,t,i){return e=d.Qb(e),d.a.eb(e,t,i)},n.prototype={save:function(e,t){var i=d.a.m(this.keys,e);0<=i?this.hb[i]=t:(this.keys.push(e),this.hb.push(t))},get:function(t){return t=d.a.m(this.keys,t),0<=t?this.hb[t]:e}}}(),d.b("toJS",d.Qb),d.b("toJSON",d.toJSON),function(){d.i={q:function(t){switch(d.a.t(t)){case"option":return!0===t.__ko__hasDomDataOptionValue__?d.a.e.get(t,d.d.options.Va):7>=d.a.L?t.getAttributeNode("value")&&t.getAttributeNode("value").specified?t.value:t.text:t.value;case"select":return 0<=t.selectedIndex?d.i.q(t.options[t.selectedIndex]):e;default:return t.value}},ca:function(t,i,n){switch(d.a.t(t)){case"option":switch(typeof i){case"string":d.a.e.set(t,d.d.options.Va,e),"__ko__hasDomDataOptionValue__"in t&&delete t.__ko__hasDomDataOptionValue__,t.value=i;break;default:d.a.e.set(t,d.d.options.Va,i),t.__ko__hasDomDataOptionValue__=!0,t.value="number"==typeof i?i:""}break;case"select":""!==i&&null!==i||(i=e);for(var s,o=-1,r=0,a=t.options.length;r<a;++r)if((s=d.i.q(t.options[r]))==i||""==s&&i===e){o=r;break}(n||0<=o||i===e&&1<t.size)&&(t.selectedIndex=o);break;default:null!==i&&i!==e||(i=""),t.value=i}}}}(),d.b("selectExtensions",d.i),d.b("selectExtensions.readValue",d.i.q),d.b("selectExtensions.writeValue",d.i.ca),d.h=function(){function e(e){e=d.a.cb(e),123===e.charCodeAt(0)&&(e=e.slice(1,-1));var t,i,r=[],a=e.match(n),l=0;if(a){a.push(",");for(var c,u=0;c=a[u];++u){var h=c.charCodeAt(0);if(44===h){if(0>=l){t&&r.push(i?{key:t,value:i.join("")}:{unknown:t}),t=i=l=0;continue}}else if(58===h){if(!i)continue}else if(47===h&&u&&1<c.length)(h=a[u-1].match(s))&&!o[h[0]]&&(e=e.substr(e.indexOf(c)+1),a=e.match(n),a.push(","),u=-1,c="/");else if(40===h||123===h||91===h)++l;else if(41===h||125===h||93===h)--l;else if(!t&&!i){t=34===h||39===h?c.slice(1,-1):c;continue}i?i.push(c):i=[c]}}return r}var t=["true","false","null","undefined"],i=/^(?:[$_a-z][$\w]*|(.+)(\.\s*[$_a-z][$\w]*|\[.+\]))$/i,n=RegExp("\"(?:[^\"\\\\]|\\\\.)*\"|'(?:[^'\\\\]|\\\\.)*'|/(?:[^/\\\\]|\\\\.)*/w*|[^\\s:,/][^,\"'{}()/:[\\]]*[^\\s,\"'{}()/:[\\]]|[^\\s]","g"),s=/[\])"'A-Za-z0-9_$]+$/,o={in:1,return:1,typeof:1},r={};return{ha:[],V:r,Wa:e,ya:function(n,s){function o(e,n){var s;if(!u){var h=d.getBindingHandler(e);if(h&&h.preprocess&&!(n=h.preprocess(n,e,o)))return;(h=r[e])&&(s=n,0<=d.a.m(t,s)?s=!1:(h=s.match(i),s=null!==h&&(h[1]?"Object("+h[1]+")"+h[2]:s)),h=s),h&&l.push("'"+e+"':function(_z){"+s+"=_z}")}c&&(n="function(){return "+n+" }"),a.push("'"+e+"':"+n)}s=s||{};var a=[],l=[],c=s.valueAccessors,u=s.bindingParams,h="string"==typeof n?e(n):n;return d.a.u(h,function(e){o(e.key||e.unknown,e.value)}),l.length&&o("_ko_property_writers","{"+l.join(",")+" }"),a.join(",")},lc:function(e,t){for(var i=0;i<e.length;i++)if(e[i].key==t)return!0;return!1},pa:function(e,t,i,n,s){e&&d.C(e)?!d.Ra(e)||s&&e.v()===n||e(n):(e=t.get("_ko_property_writers"))&&e[i]&&e[i](n)}}}(),d.b("expressionRewriting",d.h),d.b("expressionRewriting.bindingRewriteValidators",d.h.ha),d.b("expressionRewriting.parseObjectLiteral",d.h.Wa),d.b("expressionRewriting.preProcessBindings",d.h.ya),d.b("expressionRewriting._twoWayBindings",d.h.V),d.b("jsonExpressionRewriting",d.h),d.b("jsonExpressionRewriting.insertPropertyAccessorsIntoJson",d.h.ya),function(){function e(e){return 8==e.nodeType&&r.test(o?e.text:e.nodeValue)}function t(e){return 8==e.nodeType&&a.test(o?e.text:e.nodeValue)}function n(i,n){for(var s=i,o=1,r=[];s=s.nextSibling;){if(t(s)&&0===--o)return r;r.push(s),e(s)&&o++}if(!n)throw Error("Cannot find closing comment tag to match: "+i.nodeValue);return null}function s(e,t){var i=n(e,t);return i?0<i.length?i[i.length-1].nextSibling:e.nextSibling:null}var o=i&&"\x3c!--test--\x3e"===i.createComment("test").text,r=o?/^\x3c!--\s*ko(?:\s+([\s\S]+))?\s*--\x3e$/:/^\s*ko(?:\s+([\s\S]+))?\s*$/,a=o?/^\x3c!--\s*\/ko\s*--\x3e$/:/^\s*\/ko\s*$/,l={ul:!0,ol:!0};d.f={Q:{},childNodes:function(t){return e(t)?n(t):t.childNodes},ja:function(t){if(e(t)){t=d.f.childNodes(t);for(var i=0,n=t.length;i<n;i++)d.removeNode(t[i])}else d.a.Ka(t)},T:function(t,i){if(e(t)){d.f.ja(t);for(var n=t.nextSibling,s=0,o=i.length;s<o;s++)n.parentNode.insertBefore(i[s],n)}else d.a.T(t,i)},Hb:function(t,i){e(t)?t.parentNode.insertBefore(i,t.nextSibling):t.firstChild?t.insertBefore(i,t.firstChild):t.appendChild(i)},Bb:function(t,i,n){n?e(t)?t.parentNode.insertBefore(i,n.nextSibling):n.nextSibling?t.insertBefore(i,n.nextSibling):t.appendChild(i):d.f.Hb(t,i)},firstChild:function(i){return e(i)?!i.nextSibling||t(i.nextSibling)?null:i.nextSibling:i.firstChild},nextSibling:function(i){return e(i)&&(i=s(i)),i.nextSibling&&t(i.nextSibling)?null:i.nextSibling},gc:e,xc:function(e){return(e=(o?e.text:e.nodeValue).match(r))?e[1]:null},Fb:function(i){if(l[d.a.t(i)]){var n=i.firstChild;if(n)do{if(1===n.nodeType){var o;o=n.firstChild;var r=null;if(o)do{if(r)r.push(o);else if(e(o)){var a=s(o,!0);a?o=a:r=[o]}else t(o)&&(r=[o])}while(o=o.nextSibling);if(o=r)for(r=n.nextSibling,a=0;a<o.length;a++)r?i.insertBefore(o[a],r):i.appendChild(o[a])}}while(n=n.nextSibling)}}}}(),d.b("virtualElements",d.f),d.b("virtualElements.allowedBindings",d.f.Q),d.b("virtualElements.emptyNode",d.f.ja),d.b("virtualElements.insertAfter",d.f.Bb),d.b("virtualElements.prepend",d.f.Hb),d.b("virtualElements.setDomNodeChildren",d.f.T),function(){d.J=function(){this.Yb={}},d.a.extend(d.J.prototype,{nodeHasBindings:function(e){switch(e.nodeType){case 1:return null!=e.getAttribute("data-bind")||d.g.getComponentNameForNode(e);case 8:return d.f.gc(e);default:return!1}},getBindings:function(e,t){var i=this.getBindingsString(e,t),i=i?this.parseBindingsString(i,t,e):null;return d.g.mb(i,e,t,!1)},getBindingAccessors:function(e,t){var i=this.getBindingsString(e,t),i=i?this.parseBindingsString(i,t,e,{valueAccessors:!0}):null;return d.g.mb(i,e,t,!0)},getBindingsString:function(e){switch(e.nodeType){case 1:return e.getAttribute("data-bind");case 8:return d.f.xc(e);default:return null}},parseBindingsString:function(e,t,i,n){try{var s,o=this.Yb,r=e+(n&&n.valueAccessors||"");if(!(s=o[r])){var a,l="with($context){with($data||{}){return{"+d.h.ya(e,n)+"}}}";a=new Function("$context","$element",l),s=o[r]=a}return s(t,i)}catch(t){throw t.message="Unable to parse bindings.\nBindings value: "+e+"\nMessage: "+t.message,t}}}),d.J.instance=new d.J}(),d.b("bindingProvider",d.J),function(){function i(e){return function(){return e}}function n(e){return e()}function o(e){return d.a.na(d.k.B(e),function(t,i){return function(){return e()[i]}})}function r(e,t){return o(this.getBindings.bind(this,e,t))}function a(e,t,i){var n,s=d.f.firstChild(t),o=d.J.instance,r=o.preprocessNode;if(r){for(;n=s;)s=d.f.nextSibling(n),r.call(o,n);s=d.f.firstChild(t)}for(;n=s;)s=d.f.nextSibling(n),l(e,n,i)}function l(e,t,i){var n=!0,s=1===t.nodeType;s&&d.f.Fb(t),(s&&i||d.J.instance.nodeHasBindings(t))&&(n=u(t,null,e,i).shouldBindDescendants),n&&!p[d.a.t(t)]&&a(e,t,!s)}function c(e){var t=[],i={},n=[];return d.a.G(e,function s(o){if(!i[o]){var r=d.getBindingHandler(o);r&&(r.after&&(n.push(o),d.a.u(r.after,function(t){if(e[t]){if(-1!==d.a.m(n,t))throw Error("Cannot combine the following bindings, because they have a cyclic dependency: "+n.join(", "));s(t)}}),n.length--),t.push({key:o,zb:r})),i[o]=!0}}),t}function u(t,i,s,o){var a=d.a.e.get(t,f);if(!i){
if(a)throw Error("You cannot apply bindings multiple times to the same element.");d.a.e.set(t,f,!0)}!a&&o&&d.Ob(t,s);var l;if(i&&"function"!=typeof i)l=i;else{var u=d.J.instance,h=u.getBindingAccessors||r,p=d.j(function(){return(l=i?i(s,t):h.call(u,t,s))&&s.I&&s.I(),l},null,{o:t});l&&p.Z()||(p=null)}var _;if(l){var m=p?function(e){return function(){return n(p()[e])}}:function(e){return l[e]},g=function(){return d.a.na(p?p():l,n)};g.get=function(e){return l[e]&&n(m(e))},g.has=function(e){return e in l},o=c(l),d.a.u(o,function(i){var n=i.zb.init,o=i.zb.update,r=i.key;if(8===t.nodeType&&!d.f.Q[r])throw Error("The binding '"+r+"' cannot be used with virtual elements");try{"function"==typeof n&&d.k.B(function(){var i=n(t,m(r),g,s.$data,s);if(i&&i.controlsDescendantBindings){if(_!==e)throw Error("Multiple bindings ("+_+" and "+r+") are trying to control descendant bindings of the same element. You cannot use these bindings together on the same element.");_=r}}),"function"==typeof o&&d.j(function(){o(t,m(r),g,s.$data,s)},null,{o:t})}catch(e){throw e.message='Unable to process binding "'+r+": "+l[r]+'"\nMessage: '+e.message,e}})}return{shouldBindDescendants:_===e}}function h(e){return e&&e instanceof d.N?e:new d.N(e)}d.d={};var p={script:!0};d.getBindingHandler=function(e){return d.d[e]},d.N=function(t,i,n,s){var o,r=this,a="function"==typeof t&&!d.C(t),l=d.j(function(){var e=a?t():t,o=d.a.c(e);return i?(i.I&&i.I(),d.a.extend(r,i),l&&(r.I=l)):(r.$parents=[],r.$root=o,r.ko=d),r.$rawData=e,r.$data=o,n&&(r[n]=o),s&&s(r,i,o),r.$data},null,{Ia:function(){return o&&!d.a.ob(o)},o:!0});l.Z()&&(r.I=l,l.equalityComparer=null,o=[],l.Tb=function(t){o.push(t),d.a.w.da(t,function(t){d.a.ua(o,t),o.length||(l.K(),r.I=l=e)})})},d.N.prototype.createChildContext=function(e,t,i){return new d.N(e,this,t,function(e,t){e.$parentContext=t,e.$parent=t.$data,e.$parents=(t.$parents||[]).slice(0),e.$parents.unshift(e.$parent),i&&i(e)})},d.N.prototype.extend=function(e){return new d.N(this.I||this.$data,this,null,function(t,i){t.$rawData=i.$rawData,d.a.extend(t,"function"==typeof e?e():e)})};var f=d.a.e.F(),_=d.a.e.F();d.Ob=function(e,t){if(2!=arguments.length)return d.a.e.get(e,_);d.a.e.set(e,_,t),t.I&&t.I.Tb(e)},d.ra=function(e,t,i){return 1===e.nodeType&&d.f.Fb(e),u(e,t,h(i),!0)},d.Wb=function(e,t,n){return n=h(n),d.ra(e,"function"==typeof t?o(t.bind(null,n,e)):d.a.na(t,i),n)},d.Ca=function(e,t){1!==t.nodeType&&8!==t.nodeType||a(h(e),t,!0)},d.pb=function(e,i){if(!s&&t.jQuery&&(s=t.jQuery),i&&1!==i.nodeType&&8!==i.nodeType)throw Error("ko.applyBindings: first parameter should be your view model; second parameter should be a DOM node");i=i||t.document.body,l(h(e),i,!0)},d.Ha=function(t){switch(t.nodeType){case 1:case 8:var i=d.Ob(t);if(i)return i;if(t.parentNode)return d.Ha(t.parentNode)}return e},d.$b=function(t){return(t=d.Ha(t))?t.$data:e},d.b("bindingHandlers",d.d),d.b("applyBindings",d.pb),d.b("applyBindingsToDescendants",d.Ca),d.b("applyBindingAccessorsToNode",d.ra),d.b("applyBindingsToNode",d.Wb),d.b("contextFor",d.Ha),d.b("dataFor",d.$b)}(),function(e){function t(t,n){var r,a=s.hasOwnProperty(t)?s[t]:e;a||(a=s[t]=new d.P,i(t,function(e){o[t]=e,delete s[t],r?a.notifySubscribers(e):setTimeout(function(){a.notifySubscribers(e)},0)}),r=!0),a.U(n)}function i(e,t){n("getConfig",[e],function(i){i?n("loadComponent",[e,i],function(e){t(e)}):t(null)})}function n(t,i,s,o){o||(o=d.g.loaders.slice(0));var r=o.shift();if(r){var a=r[t];if(a){var l=!1;if(a.apply(r,i.concat(function(e){l?s(null):null!==e?s(e):n(t,i,s,o)}))!==e&&(l=!0,!r.suppressLoaderExceptions))throw Error("Component loaders must supply values by invoking the callback, not by returning values synchronously.")}else n(t,i,s,o)}else s(null)}var s={},o={};d.g={get:function(i,n){var s=o.hasOwnProperty(i)?o[i]:e;s?setTimeout(function(){n(s)},0):t(i,n)},tb:function(e){delete o[e]},jb:n},d.g.loaders=[],d.b("components",d.g),d.b("components.get",d.g.get),d.b("components.clearCachedDefinition",d.g.tb)}(),function(){function e(e,t,i,n){function s(){0==--a&&n(o)}var o={},a=2,l=i.template;i=i.viewModel,l?r(t,l,function(t){d.g.jb("loadTemplate",[e,t],function(e){o.template=e,s()})}):s(),i?r(t,i,function(t){d.g.jb("loadViewModel",[e,t],function(e){o[u]=e,s()})}):s()}function n(e,t,i){if("function"==typeof t)i(function(e){return new t(e)});else if("function"==typeof t[u])i(t[u]);else if("instance"in t){var s=t.instance;i(function(){return s})}else"viewModel"in t?n(e,t.viewModel,i):e("Unknown viewModel value: "+t)}function s(e){switch(d.a.t(e)){case"script":return d.a.ba(e.text);case"textarea":return d.a.ba(e.value);case"template":if(o(e.content))return d.a.ia(e.content.childNodes)}return d.a.ia(e.childNodes)}function o(e){return t.DocumentFragment?e instanceof DocumentFragment:e&&11===e.nodeType}function r(e,i,n){"string"==typeof i.require?a||t.require?(a||t.require)([i.require],n):e("Uses require, but no AMD loader is present"):n(i)}function l(e){return function(t){throw Error("Component '"+e+"': "+t)}}var c={};d.g.tc=function(e,t){if(!t)throw Error("Invalid configuration for "+e);if(d.g.Qa(e))throw Error("Component "+e+" is already registered");c[e]=t},d.g.Qa=function(e){return e in c},d.g.wc=function(e){delete c[e],d.g.tb(e)},d.g.ub={getConfig:function(e,t){t(c.hasOwnProperty(e)?c[e]:null)},loadComponent:function(t,i,n){var s=l(t);r(s,i,function(i){e(t,s,i,n)})},loadTemplate:function(e,n,r){if(e=l(e),"string"==typeof n)r(d.a.ba(n));else if(n instanceof Array)r(n);else if(o(n))r(d.a.S(n.childNodes));else if(n.element)if(n=n.element,t.HTMLElement?n instanceof HTMLElement:n&&n.tagName&&1===n.nodeType)r(s(n));else if("string"==typeof n){var a=i.getElementById(n);a?r(s(a)):e("Cannot find element with ID "+n)}else e("Unknown element type: "+n);else e("Unknown template value: "+n)},loadViewModel:function(e,t,i){n(l(e),t,i)}};var u="createViewModel";d.b("components.register",d.g.tc),d.b("components.isRegistered",d.g.Qa),d.b("components.unregister",d.g.wc),d.b("components.defaultLoader",d.g.ub),d.g.loaders.push(d.g.ub),d.g.Ub=c}(),function(){function e(e,i){var n=e.getAttribute("params");if(n){var n=t.parseBindingsString(n,i,e,{valueAccessors:!0,bindingParams:!0}),n=d.a.na(n,function(t){return d.s(t,null,{o:e})}),s=d.a.na(n,function(t){return t.Z()?d.s(function(){return d.a.c(t())},null,{o:e}):t.v()});return s.hasOwnProperty("$raw")||(s.$raw=n),s}return{$raw:{}}}d.g.getComponentNameForNode=function(e){return e=d.a.t(e),d.g.Qa(e)&&e},d.g.mb=function(t,i,n,s){if(1===i.nodeType){var o=d.g.getComponentNameForNode(i);if(o){if(t=t||{},t.component)throw Error('Cannot use the "component" binding on a custom element matching a component');var r={name:o,params:e(i,n)};t.component=s?function(){return r}:r}}return t};var t=new d.J;9>d.a.L&&(d.g.register=function(e){return function(t){return i.createElement(t),e.apply(this,arguments)}}(d.g.register),i.createDocumentFragment=function(e){return function(){var t,i=e(),n=d.g.Ub;for(t in n)n.hasOwnProperty(t)&&i.createElement(t);return i}}(i.createDocumentFragment))}(),function(){var e=0;d.d.component={init:function(t,i,n,s,o){function r(){var e=a&&a.dispose;"function"==typeof e&&e.call(a),l=null}var a,l;return d.a.w.da(t,r),d.s(function(){var n,s,c=d.a.c(i());if("string"==typeof c?n=c:(n=d.a.c(c.name),s=d.a.c(c.params)),!n)throw Error("No component name specified");var u=l=++e;d.g.get(n,function(e){if(l===u){if(r(),!e)throw Error("Unknown component '"+n+"'");var i=e.template;if(!i)throw Error("Component '"+n+"' has no template");i=d.a.ia(i),d.f.T(t,i);var i=s,c=e.createViewModel;e=c?c.call(e,i,{element:t}):i,i=o.createChildContext(e),a=e,d.Ca(i,t)}})},null,{o:t}),{controlsDescendantBindings:!0}}},d.f.Q.component=!0}();var v={class:"className",for:"htmlFor"};d.d.attr={update:function(t,i){var n=d.a.c(i())||{};d.a.G(n,function(i,n){n=d.a.c(n);var s=!1===n||null===n||n===e;s&&t.removeAttribute(i),8>=d.a.L&&i in v?(i=v[i],s?t.removeAttribute(i):t[i]=n):s||t.setAttribute(i,n.toString()),"name"===i&&d.a.Mb(t,s?"":n.toString())})}},function(){d.d.checked={after:["value","attr"],init:function(t,i,n){function s(){var e=t.checked,s=h?r():e;if(!d.Y.ma()&&(!l||e)){var o=d.k.B(i);c?u!==s?(e&&(d.a.ea(o,s,!0),d.a.ea(o,u,!1)),u=s):d.a.ea(o,s,e):d.h.pa(o,n,"checked",s,!0)}}function o(){var e=d.a.c(i());t.checked=c?0<=d.a.m(e,r()):a?e:r()===e}var r=d.Ib(function(){return n.has("checkedValue")?d.a.c(n.get("checkedValue")):n.has("value")?d.a.c(n.get("value")):t.value}),a="checkbox"==t.type,l="radio"==t.type;if(a||l){var c=a&&d.a.c(i())instanceof Array,u=c?r():e,h=l||c;l&&!t.name&&d.d.uniqueName.init(t,function(){return!0}),d.s(s,null,{o:t}),d.a.n(t,"click",s),d.s(o,null,{o:t})}}},d.h.V.checked=!0,d.d.checkedValue={update:function(e,t){e.value=d.a.c(t())}}}(),d.d.css={update:function(e,t){var i=d.a.c(t());"object"==typeof i?d.a.G(i,function(t,i){i=d.a.c(i),d.a.Ba(e,t,i)}):(i=String(i||""),d.a.Ba(e,e.__ko__cssValue,!1),e.__ko__cssValue=i,d.a.Ba(e,i,!0))}},d.d.enable={update:function(e,t){var i=d.a.c(t());i&&e.disabled?e.removeAttribute("disabled"):i||e.disabled||(e.disabled=!0)}},d.d.disable={update:function(e,t){d.d.enable.update(e,function(){return!d.a.c(t())})}},d.d.event={init:function(e,t,i,n,s){var o=t()||{};d.a.G(o,function(o){"string"==typeof o&&d.a.n(e,o,function(e){var r,a=t()[o];if(a){try{var l=d.a.S(arguments);n=s.$data,l.unshift(n),r=a.apply(n,l)}finally{!0!==r&&(e.preventDefault?e.preventDefault():e.returnValue=!1)}!1===i.get(o+"Bubble")&&(e.cancelBubble=!0,e.stopPropagation&&e.stopPropagation())}})})}},d.d.foreach={Eb:function(e){return function(){var t=e(),i=d.a.Xa(t);return i&&"number"!=typeof i.length?(d.a.c(t),{foreach:i.data,as:i.as,includeDestroyed:i.includeDestroyed,afterAdd:i.afterAdd,beforeRemove:i.beforeRemove,afterRender:i.afterRender,beforeMove:i.beforeMove,afterMove:i.afterMove,templateEngine:d.O.Oa}):{foreach:t,templateEngine:d.O.Oa}}},init:function(e,t){return d.d.template.init(e,d.d.foreach.Eb(t))},update:function(e,t,i,n,s){return d.d.template.update(e,d.d.foreach.Eb(t),i,n,s)}},d.h.ha.foreach=!1,d.f.Q.foreach=!0,d.d.hasfocus={init:function(e,t,i){function n(n){e.__ko_hasfocusUpdating=!0;var s=e.ownerDocument;if("activeElement"in s){var o;try{o=s.activeElement}catch(e){o=s.body}n=o===e}s=t(),d.h.pa(s,i,"hasfocus",n,!0),e.__ko_hasfocusLastValue=n,e.__ko_hasfocusUpdating=!1}var s=n.bind(null,!0),o=n.bind(null,!1);d.a.n(e,"focus",s),d.a.n(e,"focusin",s),d.a.n(e,"blur",o),d.a.n(e,"focusout",o)},update:function(e,t){var i=!!d.a.c(t());e.__ko_hasfocusUpdating||e.__ko_hasfocusLastValue===i||(i?e.focus():e.blur(),d.k.B(d.a.oa,null,[e,i?"focusin":"focusout"]))}},d.h.V.hasfocus=!0,d.d.hasFocus=d.d.hasfocus,d.h.V.hasFocus=!0,d.d.html={init:function(){return{controlsDescendantBindings:!0}},update:function(e,t){d.a.$a(e,t())}},h("if"),h("ifnot",!1,!0),h("with",!0,!1,function(e,t){return e.createChildContext(t)});var b={};d.d.options={init:function(e){if("select"!==d.a.t(e))throw Error("options binding applies only to SELECT elements");for(;0<e.length;)e.remove(0);return{controlsDescendantBindings:!0}},update:function(t,i,n){function s(){return d.a.ta(t.options,function(e){return e.selected})}function o(e,t,i){var n=typeof t;return"function"==n?t(e):"string"==n?e[t]:i}function r(e,i){if(h.length){var n=0<=d.a.m(h,d.i.q(i[0]));d.a.Nb(i[0],n),p&&!n&&d.k.B(d.a.oa,null,[t,"change"])}}var a=0!=t.length&&t.multiple?t.scrollTop:null,l=d.a.c(i()),c=n.get("optionsIncludeDestroyed");i={};var u,h;h=t.multiple?d.a.Da(s(),d.i.q):0<=t.selectedIndex?[d.i.q(t.options[t.selectedIndex])]:[],l&&(void 0===l.length&&(l=[l]),u=d.a.ta(l,function(t){return c||t===e||null===t||!d.a.c(t._destroy)}),n.has("optionsCaption")&&null!==(l=d.a.c(n.get("optionsCaption")))&&l!==e&&u.unshift(b));var p=!1;i.beforeRemove=function(e){t.removeChild(e)},l=r,n.has("optionsAfterRender")&&(l=function(t,i){r(0,i),d.k.B(n.get("optionsAfterRender"),null,[i[0],t!==b?t:e])}),d.a.Za(t,u,function(i,s,r){return r.length&&(h=r[0].selected?[d.i.q(r[0])]:[],p=!0),s=t.ownerDocument.createElement("option"),i===b?(d.a.bb(s,n.get("optionsCaption")),d.i.ca(s,e)):(r=o(i,n.get("optionsValue"),i),d.i.ca(s,d.a.c(r)),i=o(i,n.get("optionsText"),r),d.a.bb(s,i)),[s]},i,l),d.k.B(function(){n.get("valueAllowUnset")&&n.has("value")?d.i.ca(t,d.a.c(n.get("value")),!0):(t.multiple?h.length&&s().length<h.length:h.length&&0<=t.selectedIndex?d.i.q(t.options[t.selectedIndex])!==h[0]:h.length||0<=t.selectedIndex)&&d.a.oa(t,"change")}),d.a.dc(t),a&&20<Math.abs(a-t.scrollTop)&&(t.scrollTop=a)}},d.d.options.Va=d.a.e.F(),d.d.selectedOptions={after:["options","foreach"],init:function(e,t,i){d.a.n(e,"change",function(){var n=t(),s=[];d.a.u(e.getElementsByTagName("option"),function(e){e.selected&&s.push(d.i.q(e))}),d.h.pa(n,i,"selectedOptions",s)})},update:function(e,t){if("select"!=d.a.t(e))throw Error("values binding applies only to SELECT elements");var i=d.a.c(t());i&&"number"==typeof i.length&&d.a.u(e.getElementsByTagName("option"),function(e){var t=0<=d.a.m(i,d.i.q(e));d.a.Nb(e,t)})}},d.h.V.selectedOptions=!0,d.d.style={update:function(t,i){var n=d.a.c(i()||{});d.a.G(n,function(i,n){n=d.a.c(n),null!==n&&n!==e&&!1!==n||(n=""),t.style[i]=n})}},d.d.submit={init:function(e,t,i,n,s){if("function"!=typeof t())throw Error("The value for a submit binding must be a function");d.a.n(e,"submit",function(i){var n,o=t();try{n=o.call(s.$data,e)}finally{!0!==n&&(i.preventDefault?i.preventDefault():i.returnValue=!1)}})}},d.d.text={init:function(){return{controlsDescendantBindings:!0}},update:function(e,t){d.a.bb(e,t())}},d.f.Q.text=!0,function(){if(t&&t.navigator)var i=function(e){if(e)return parseFloat(e[1])},n=t.opera&&t.opera.version&&parseInt(t.opera.version()),s=t.navigator.userAgent,o=i(s.match(/^(?:(?!chrome).)*version\/([^ ]*) safari/i)),r=i(s.match(/Firefox\/([^ ]*)/));if(10>d.a.L)var a=d.a.e.F(),l=d.a.e.F(),c=function(e){var t=this.activeElement;(t=t&&d.a.e.get(t,l))&&t(e)},u=function(e,t){var i=e.ownerDocument;d.a.e.get(i,a)||(d.a.e.set(i,a,!0),d.a.n(i,"selectionchange",c)),d.a.e.set(e,l,t)};d.d.textInput={init:function(t,i,s){function a(e,i){d.a.n(t,e,i)}function l(){var n=d.a.c(i());null!==n&&n!==e||(n=""),f!==e&&n===f?setTimeout(l,4):t.value!==n&&(_=n,t.value=n)}function c(){p||(f=t.value,p=setTimeout(h,4))}function h(){clearTimeout(p),f=p=e;var n=t.value;_!==n&&(_=n,d.h.pa(i(),s,"textInput",n))}var p,f,_=t.value;10>d.a.L?(a("propertychange",function(e){"value"===e.propertyName&&h()}),8==d.a.L&&(a("keyup",h),a("keydown",h)),8<=d.a.L&&(u(t,h),a("dragend",c))):(a("input",h),5>o&&"textarea"===d.a.t(t)?(a("keydown",c),a("paste",c),a("cut",c)):11>n?a("keydown",c):4>r&&(a("DOMAutoComplete",h),a("dragdrop",h),a("drop",h))),a("change",h),d.s(l,null,{o:t})}},d.h.V.textInput=!0,d.d.textinput={preprocess:function(e,t,i){i("textInput",e)}}}(),d.d.uniqueName={init:function(e,t){if(t()){var i="ko_unique_"+ ++d.d.uniqueName.Zb;d.a.Mb(e,i)}}},d.d.uniqueName.Zb=0,d.d.value={after:["options","foreach"],init:function(e,t,i){if("input"!=e.tagName.toLowerCase()||"checkbox"!=e.type&&"radio"!=e.type){var n=["change"],s=i.get("valueUpdate"),o=!1,r=null;s&&("string"==typeof s&&(s=[s]),d.a.ga(n,s),n=d.a.rb(n));var a=function(){r=null,o=!1;var n=t(),s=d.i.q(e);d.h.pa(n,i,"value",s)};!d.a.L||"input"!=e.tagName.toLowerCase()||"text"!=e.type||"off"==e.autocomplete||e.form&&"off"==e.form.autocomplete||-1!=d.a.m(n,"propertychange")||(d.a.n(e,"propertychange",function(){o=!0}),d.a.n(e,"focus",function(){o=!1}),d.a.n(e,"blur",function(){o&&a()})),d.a.u(n,function(t){var i=a;d.a.vc(t,"after")&&(i=function(){r=d.i.q(e),setTimeout(a,0)},t=t.substring(5)),d.a.n(e,t,i)});var l=function(){var n=d.a.c(t()),s=d.i.q(e);if(null!==r&&n===r)setTimeout(l,0);else if(n!==s)if("select"===d.a.t(e)){var o=i.get("valueAllowUnset"),s=function(){d.i.ca(e,n,o)};s(),o||n===d.i.q(e)?setTimeout(s,0):d.k.B(d.a.oa,null,[e,"change"])}else d.i.ca(e,n)};d.s(l,null,{o:e})}else d.ra(e,{checkedValue:t})},update:function(){}},d.h.V.value=!0,d.d.visible={update:function(e,t){var i=d.a.c(t()),n="none"!=e.style.display;i&&!n?e.style.display="":!i&&n&&(e.style.display="none")}},function(e){d.d[e]={init:function(t,i,n,s,o){return d.d.event.init.call(this,t,function(){var t={};return t[e]=i(),t},n,s,o)}}}("click"),d.H=function(){},d.H.prototype.renderTemplateSource=function(){throw Error("Override renderTemplateSource")},d.H.prototype.createJavaScriptEvaluatorBlock=function(){throw Error("Override createJavaScriptEvaluatorBlock")},d.H.prototype.makeTemplateSource=function(e,t){if("string"==typeof e){t=t||i;var n=t.getElementById(e);if(!n)throw Error("Cannot find template with ID "+e);return new d.r.l(n)}if(1==e.nodeType||8==e.nodeType)return new d.r.fa(e);throw Error("Unknown template type: "+e)},d.H.prototype.renderTemplate=function(e,t,i,n){return e=this.makeTemplateSource(e,n),this.renderTemplateSource(e,t,i)},d.H.prototype.isTemplateRewritten=function(e,t){return!1===this.allowTemplateRewriting||this.makeTemplateSource(e,t).data("isRewritten")},d.H.prototype.rewriteTemplate=function(e,t,i){e=this.makeTemplateSource(e,i),t=t(e.text()),e.text(t),e.data("isRewritten",!0)},d.b("templateEngine",d.H),d.fb=function(){function e(e,t,i,n){e=d.h.Wa(e);for(var s=d.h.ha,o=0;o<e.length;o++){var r=e[o].key;if(s.hasOwnProperty(r)){var a=s[r];if("function"==typeof a){if(r=a(e[o].value))throw Error(r)}else if(!a)throw Error("This template engine does not support the '"+r+"' binding within its templates")}}return i="ko.__tr_ambtns(function($context,$element){return(function(){return{ "+d.h.ya(e,{valueAccessors:!0})+" } })()},'"+i.toLowerCase()+"')",n.createJavaScriptEvaluatorBlock(i)+t}var t=/(<([a-z]+\d*)(?:\s+(?!data-bind\s*=\s*)[a-z0-9\-]+(?:=(?:\"[^\"]*\"|\'[^\']*\'))?)*\s+)data-bind\s*=\s*(["'])([\s\S]*?)\3/gi,i=/\x3c!--\s*ko\b\s*([\s\S]*?)\s*--\x3e/g;return{ec:function(e,t,i){t.isTemplateRewritten(e,i)||t.rewriteTemplate(e,function(e){return d.fb.nc(e,t)},i)},nc:function(n,s){return n.replace(t,function(t,i,n,o,r){return e(r,i,n,s)}).replace(i,function(t,i){return e(i,"\x3c!-- ko --\x3e","#comment",s)})},Xb:function(e,t){return d.D.Ua(function(i,n){var s=i.nextSibling;s&&s.nodeName.toLowerCase()===t&&d.ra(s,e,n)})}}}(),d.b("__tr_ambtns",d.fb.Xb),function(){d.r={},d.r.l=function(e){this.l=e},d.r.l.prototype.text=function(){var e=d.a.t(this.l),e="script"===e?"text":"textarea"===e?"value":"innerHTML";if(0==arguments.length)return this.l[e];var t=arguments[0];"innerHTML"===e?d.a.$a(this.l,t):this.l[e]=t};var t=d.a.e.F()+"_";d.r.l.prototype.data=function(e){if(1===arguments.length)return d.a.e.get(this.l,t+e);d.a.e.set(this.l,t+e,arguments[1])};var i=d.a.e.F();d.r.fa=function(e){this.l=e},d.r.fa.prototype=new d.r.l,d.r.fa.prototype.text=function(){if(0==arguments.length){var t=d.a.e.get(this.l,i)||{};return t.gb===e&&t.Ga&&(t.gb=t.Ga.innerHTML),t.gb}d.a.e.set(this.l,i,{gb:arguments[0]})},d.r.l.prototype.nodes=function(){if(0==arguments.length)return(d.a.e.get(this.l,i)||{}).Ga;d.a.e.set(this.l,i,{Ga:arguments[0]})},d.b("templateSources",d.r),d.b("templateSources.domElement",d.r.l),d.b("templateSources.anonymousTemplate",d.r.fa)}(),function(){function t(e,t,i){var n;for(t=d.f.nextSibling(t);e&&(n=e)!==t;)e=d.f.nextSibling(n),i(n,e)}function i(e,i){if(e.length){var n=e[0],s=e[e.length-1],o=n.parentNode,r=d.J.instance,a=r.preprocessNode;if(a){if(t(n,s,function(e,t){var i=e.previousSibling,o=a.call(r,e);o&&(e===n&&(n=o[0]||t),e===s&&(s=o[o.length-1]||i))}),e.length=0,!n)return;n===s?e.push(n):(e.push(n,s),d.a.ka(e,o))}t(n,s,function(e){1!==e.nodeType&&8!==e.nodeType||d.pb(i,e)}),t(n,s,function(e){1!==e.nodeType&&8!==e.nodeType||d.D.Sb(e,[i])}),d.a.ka(e,o)}}function n(e){return e.nodeType?e:0<e.length?e[0]:null}function s(e,t,s,r,a){a=a||{};var l=e&&n(e),l=l&&l.ownerDocument,c=a.templateEngine||o;if(d.fb.ec(s,c,l),s=c.renderTemplate(s,r,a,l),"number"!=typeof s.length||0<s.length&&"number"!=typeof s[0].nodeType)throw Error("Template engine must return an array of DOM nodes");switch(l=!1,t){case"replaceChildren":d.f.T(e,s),l=!0;break;case"replaceNode":d.a.Lb(e,s),l=!0;break;case"ignoreTargetNode":break;default:throw Error("Unknown renderMode: "+t)}return l&&(i(s,r),a.afterRender&&d.k.B(a.afterRender,null,[s,r.$data])),s}var o;d.ab=function(t){if(t!=e&&!(t instanceof d.H))throw Error("templateEngine must inherit from ko.templateEngine");o=t},d.Ya=function(t,i,r,a,l){if(r=r||{},(r.templateEngine||o)==e)throw Error("Set a template engine before calling renderTemplate");if(l=l||"replaceChildren",a){var c=n(a);return d.j(function(){var e=i&&i instanceof d.N?i:new d.N(d.a.c(i)),o=d.C(t)?t():"function"==typeof t?t(e.$data,e):t,e=s(a,l,o,e,r);"replaceNode"==l&&(a=e,c=n(a))},null,{Ia:function(){return!c||!d.a.Ja(c)},o:c&&"replaceNode"==l?c.parentNode:c})}return d.D.Ua(function(e){d.Ya(t,i,r,e,"replaceNode")})},d.uc=function(t,n,o,r,a){function l(e,t){i(t,u),o.afterRender&&o.afterRender(t,e)}function c(e,i){return u=a.createChildContext(e,o.as,function(e){e.$index=i}),s(null,"ignoreTargetNode",d.C(t)?t():"function"==typeof t?t(e,u):t,u,o)}var u;return d.j(function(){var t=d.a.c(n)||[];void 0===t.length&&(t=[t]),t=d.a.ta(t,function(t){return o.includeDestroyed||t===e||null===t||!d.a.c(t._destroy)}),d.k.B(d.a.Za,null,[r,t,c,o,l])},null,{o:r})};var r=d.a.e.F();d.d.template={init:function(e,t){var i=d.a.c(t());return"string"==typeof i||i.name?d.f.ja(e):(i=d.f.childNodes(e),i=d.a.oc(i),new d.r.fa(e).nodes(i)),{controlsDescendantBindings:!0}},update:function(t,i,n,s,o){var a,l=i();i=d.a.c(l),n=!0,s=null,"string"==typeof i?i={}:(l=i.name,"if"in i&&(n=d.a.c(i.if)),n&&"ifnot"in i&&(n=!d.a.c(i.ifnot)),a=d.a.c(i.data)),"foreach"in i?s=d.uc(l||t,n&&i.foreach||[],i,t,o):n?(o="data"in i?o.createChildContext(a,i.as):o,s=d.Ya(l||t,o,i,t)):d.f.ja(t),o=s,(a=d.a.e.get(t,r))&&"function"==typeof a.K&&a.K(),d.a.e.set(t,r,o&&o.Z()?o:e)}},d.h.ha.template=function(e){return e=d.h.Wa(e),1==e.length&&e[0].unknown||d.h.lc(e,"name")?null:"This template engine does not support anonymous templates nested within its templates"},d.f.Q.template=!0}(),d.b("setTemplateEngine",d.ab),d.b("renderTemplate",d.Ya),d.a.wb=function(e,t,i){if(e.length&&t.length){var n,s,o,r,a;for(n=s=0;(!i||n<i)&&(r=e[s]);++s){for(o=0;a=t[o];++o)if(r.value===a.value){r.moved=a.index,a.moved=r.index,t.splice(o,1),n=o=0;break}n+=o}}},d.a.Fa=function(){function e(e,t,i,n,s){var o,r,a,l,c,u=Math.min,h=Math.max,p=[],f=e.length,_=t.length,m=_-f||1,g=f+_+1;for(o=0;o<=f;o++)for(l=a,p.push(a=[]),c=u(_,o+m),r=h(0,o-1);r<=c;r++)a[r]=r?o?e[o-1]===t[r-1]?l[r-1]:u(l[r]||g,a[r-1]||g)+1:r+1:o+1;for(u=[],h=[],m=[],o=f,r=_;o||r;)_=p[o][r]-1,r&&_===p[o][r-1]?h.push(u[u.length]={status:i,value:t[--r],index:r}):o&&_===p[o-1][r]?m.push(u[u.length]={status:n,value:e[--o],index:o}):(--r,--o,s.sparse||u.push({status:"retained",value:t[r]}));return d.a.wb(h,m,10*f),u.reverse()}return function(t,i,n){return n="boolean"==typeof n?{dontLimitMoves:n}:n||{},t=t||[],i=i||[],t.length<=i.length?e(t,i,"added","deleted",n):e(i,t,"deleted","added",n)}}(),d.b("utils.compareArrays",d.a.Fa),function(){function t(t,i,n,s,o){var r=[],a=d.j(function(){var e=i(n,o,d.a.ka(r,t))||[];0<r.length&&(d.a.Lb(r,e),s&&d.k.B(s,null,[n,e,o])),r.length=0,d.a.ga(r,e)},null,{o:t,Ia:function(){return!d.a.ob(r)}});return{$:r,j:a.Z()?a:e}}var i=d.a.e.F();d.a.Za=function(n,s,o,r,a){function l(e,t){y=h[t],g!==t&&(x[e]=y),y.Na(g++),d.a.ka(y.$,n),_.push(y),b.push(y)}function c(e,t){if(e)for(var i=0,n=t.length;i<n;i++)t[i]&&d.a.u(t[i].$,function(n){e(n,i,t[i].sa)})}s=s||[],r=r||{};var u=d.a.e.get(n,i)===e,h=d.a.e.get(n,i)||[],p=d.a.Da(h,function(e){return e.sa}),f=d.a.Fa(p,s,r.dontLimitMoves),_=[],m=0,g=0,v=[],b=[];s=[];for(var y,T,w,x=[],p=[],C=0;T=f[C];C++)switch(w=T.moved,T.status){case"deleted":w===e&&(y=h[m],y.j&&y.j.K(),v.push.apply(v,d.a.ka(y.$,n)),r.beforeRemove&&(s[C]=y,b.push(y))),m++;break;case"retained":l(C,m++);break;case"added":w!==e?l(C,w):(y={sa:T.value,Na:d.p(g++)},_.push(y),b.push(y),u||(p[C]=y))}c(r.beforeMove,x),d.a.u(v,r.beforeRemove?d.R:d.removeNode);for(var S,C=0,u=d.f.firstChild(n);y=b[C];C++){for(y.$||d.a.extend(y,t(n,o,y.sa,a,y.Na)),m=0;f=y.$[m];u=f.nextSibling,S=f,m++)f!==u&&d.f.Bb(n,f,S);!y.ic&&a&&(a(y.sa,y.$,y.Na),y.ic=!0)}c(r.beforeRemove,s),c(r.afterMove,x),c(r.afterAdd,p),d.a.e.set(n,i,_)}}(),d.b("utils.setDomNodeChildrenFromArrayMapping",d.a.Za),d.O=function(){this.allowTemplateRewriting=!1},d.O.prototype=new d.H,d.O.prototype.renderTemplateSource=function(e){var t=(9>d.a.L?0:e.nodes)?e.nodes():null;return t?d.a.S(t.cloneNode(!0).childNodes):(e=e.text(),d.a.ba(e))},d.O.Oa=new d.O,d.ab(d.O.Oa),d.b("nativeTemplateEngine",d.O),function(){d.Sa=function(){var e=this.kc=function(){if(!s||!s.tmpl)return 0;try{if(0<=s.tmpl.tag.tmpl.open.toString().indexOf("__"))return 2}catch(e){}return 1}();this.renderTemplateSource=function(t,n,o){if(o=o||{},2>e)throw Error("Your version of jQuery.tmpl is too old. Please upgrade to jQuery.tmpl 1.0.0pre or later.");var r=t.data("precompiled");return r||(r=t.text()||"",r=s.template(null,"{{ko_with $item.koBindingContext}}"+r+"{{/ko_with}}"),t.data("precompiled",r)),t=[n.$data],n=s.extend({koBindingContext:n},o.templateOptions),n=s.tmpl(r,t,n),n.appendTo(i.createElement("div")),s.fragments={},n},this.createJavaScriptEvaluatorBlock=function(e){return"{{ko_code ((function() { return "+e+" })()) }}"},this.addTemplate=function(e,t){i.write("<script type='text/html' id='"+e+"'>"+t+"<\/script>")},0<e&&(s.tmpl.tag.ko_code={open:"__.push($1 || '');"},s.tmpl.tag.ko_with={open:"with($1) {",close:"} "})},d.Sa.prototype=new d.H;var e=new d.Sa;0<e.kc&&d.ab(e),d.b("jqueryTmplTemplateEngine",d.Sa)}()})}()}(),define("js/vm/BaseDynamicModel",["knockout"],function(e){function t(t,i){if("object"==typeof t)for(var n in t)t.hasOwnProperty(n)&&!this.hasOwnProperty(n)&&(t[n]instanceof Array?this[n]=e.observableArray(t[n]):this[n]=e.observable(t[n]));if(!i)throw"Error! No controller passed!";this.$$originalData=t,this.$$controller=i}return t}),define("js/vm/BaseStaticModel",["knockout"],function(e){function t(e,t){if("object"==typeof e)for(var i in e)e.hasOwnProperty(i)&&!this.hasOwnProperty(i)&&(this[i]=e[i]);if(!t)throw"Error! No controller passed!";this.$$originalData=e,this.$$controller=t}return t}),define("js/vm/BaseI18nizedModel",["knockout"],function(e){function t(e,t){}return t.prototype.getI18nSegments=function(){return this.$$i18nSegments},t.prototype.$$i18nSegments=[],t}),define("js/vm/Models/LocalStorage",[],function(){function e(){}function t(e,t){t=void 0===t?{}:t;var i=window.localStorage.getItem(n+e)||JSON.stringify(t);try{var s=JSON.parse(i)}catch(e){s=t}return s}function i(e,t){window.localStorage.setItem(n+e,JSON.stringify(t))}var n="nemo-";return e.get=t,e.set=i,e}),define("js/vm/BaseControllerModel",["knockout","js/vm/Models/LocalStorage"],function(e,t){function i(t,i){this.$$componentParameters=t,this.$$controller=i,this.$$loading=e.observable(!0),this.$$error=e.observable(null),this.$$rawdata=null,this.$$loadingItems=0,this.name=""}return i.prototype.createCookieParamsFromResponse=function(e){var t={segments:[[null,e.cityId,e.checkInDate,e.checkOutDate]],rooms:[],datesUnknown:!1,loyaltyCard:{hotelsChain:e.loyaltyCard?e.loyaltyCard.hotelsChain:null,cardNumber:e.loyaltyCard?e.loyaltyCard.number:null}};return e.rooms.forEach(function(e){var i={};i.adults=e.ADT,i.infants=[],Array.isArray(e.childAges)&&e.childAges.forEach(function(e){i.infants.push(e)}),t.rooms.push(i)}),t},i.prototype.run=function(){var e=this;this.$$loadingItems=3,this.$$controller.loadViewModels(this.getUsedModels(),function(t){e.$$loadingItems--,e.checkInitialLoadCompletion();for(var i=e.getI18nSegments(),n=0;n<t.length;n++)if("getI18nSegments"in t[n].prototype){var s=t[n].prototype.getI18nSegments();e.$$controller.log("Additional model",t[n],"i18n segments:",s),i=i.concat(s)}e.$$controller.loadI18n(i,function(){e.$$loadingItems--,e.checkInitialLoadCompletion()},function(){e.$$error("Could not load i18n data.")})}),this.loadInitialData(),this.$$controller.loadKOBindings(this.getKOBindings(),function(){e.$$loadingItems--,e.checkInitialLoadCompletion()},function(){e.$$error("Could not load KO bindings."),e.$$controller.error(arguments)})},i.prototype.loadInitialData=function(){var e=this,i=this.dataURL();i&&(this.$$loadingItems++,this.$$controller.loadData(i,this.dataPOSTParameters(),function(i){try{e.$$rawdata=JSON.parse(i),t.get("searchFormData")||t.set("searchFormData",e.createCookieParamsFromResponse(e.$$rawdata.hotels.search.request))}catch(t){return e.$$error("Request failed: wrong response."),void e.$$loading(!1)}e.$$loadingItems--,e.checkInitialLoadCompletion()},function(t){e.$$error("Request failed: "+t.status+": "+t.statusText),e.$$loading(!1)}))},i.prototype.checkInitialLoadCompletion=function(){0===this.$$loadingItems&&(this.$$controller.log("Finished initial loading of",this," starting to build models: ",this.$$rawdata),this.buildModels(),this.$$loading(!1)),window.location.hostname.indexOf("agent.ru")>-1&&window.postMessage&&parent.postMessage(""+$("body").outerHeight(!0),"*")},i.prototype.getUsedModels=function(){return this.$$usedModels},i.prototype.getI18nSegments=function(){return this.$$i18nSegments},i.prototype.getKOBindings=function(){return this.$$KOBindings},i.prototype.buildModels=function(){},i.prototype.dataURL=function(){},i.prototype.dataPOSTParameters=function(){},i.prototype.$$usedModels=[],i.prototype.$$i18nSegments=[],i.prototype.$$KOBindings=[],i.prototype.pageTitle=null,i}),function(e,t){"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(e,t){function i(e){var t=e.length,i=Q.type(e);return"function"!==i&&!Q.isWindow(e)&&(!(1!==e.nodeType||!t)||("array"===i||0===t||"number"==typeof t&&t>0&&t-1 in e))}function n(e,t,i){if(Q.isFunction(t))return Q.grep(e,function(e,n){return!!t.call(e,n,e)!==i});if(t.nodeType)return Q.grep(e,function(e){return e===t!==i});if("string"==typeof t){if(re.test(t))return Q.filter(t,e,i);t=Q.filter(t,e)}return Q.grep(e,function(e){return V.call(t,e)>=0!==i})}function s(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}function o(e){var t=de[e]={};return Q.each(e.match(he)||[],function(e,i){t[i]=!0}),t}function r(){J.removeEventListener("DOMContentLoaded",r,!1),e.removeEventListener("load",r,!1),Q.ready()}function a(){Object.defineProperty(this.cache={},0,{get:function(){return{}}}),this.expando=Q.expando+a.uid++}function l(e,t,i){var n;if(void 0===i&&1===e.nodeType)if(n="data-"+t.replace(ve,"-$1").toLowerCase(),"string"==typeof(i=e.getAttribute(n))){try{i="true"===i||"false"!==i&&("null"===i?null:+i+""===i?+i:ge.test(i)?Q.parseJSON(i):i)}catch(e){}me.set(e,t,i)}else i=void 0;return i}function c(){return!0}function u(){return!1}function h(){try{return J.activeElement}catch(e){}}function d(e,t){return Q.nodeName(e,"table")&&Q.nodeName(11!==t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function p(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function f(e){var t=Ee.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function _(e,t){for(var i=0,n=e.length;i<n;i++)_e.set(e[i],"globalEval",!t||_e.get(t[i],"globalEval"))}function m(e,t){var i,n,s,o,r,a,l,c;if(1===t.nodeType){if(_e.hasData(e)&&(o=_e.access(e),r=_e.set(t,o),c=o.events)){delete r.handle,r.events={};for(s in c)for(i=0,n=c[s].length;i<n;i++)Q.event.add(t,s,c[s][i])}me.hasData(e)&&(a=me.access(e),l=Q.extend({},a),me.set(t,l))}}function g(e,t){var i=e.getElementsByTagName?e.getElementsByTagName(t||"*"):e.querySelectorAll?e.querySelectorAll(t||"*"):[];return void 0===t||t&&Q.nodeName(e,t)?Q.merge([e],i):i}function v(e,t){var i=t.nodeName.toLowerCase();"input"===i&&we.test(e.type)?t.checked=e.checked:"input"!==i&&"textarea"!==i||(t.defaultValue=e.defaultValue)}function b(t,i){
var n,s=Q(i.createElement(t)).appendTo(i.body),o=e.getDefaultComputedStyle&&(n=e.getDefaultComputedStyle(s[0]))?n.display:Q.css(s[0],"display");return s.detach(),o}function y(e){var t=J,i=Ne[e];return i||(i=b(e,t),"none"!==i&&i||(He=(He||Q("<iframe frameborder='0' width='0' height='0'/>")).appendTo(t.documentElement),t=He[0].contentDocument,t.write(),t.close(),i=b(e,t),He.detach()),Ne[e]=i),i}function T(e,t,i){var n,s,o,r,a=e.style;return i=i||Ge(e),i&&(r=i.getPropertyValue(t)||i[t]),i&&(""!==r||Q.contains(e.ownerDocument,e)||(r=Q.style(e,t)),Be.test(r)&&Re.test(t)&&(n=a.width,s=a.minWidth,o=a.maxWidth,a.minWidth=a.maxWidth=a.width=r,r=i.width,a.width=n,a.minWidth=s,a.maxWidth=o)),void 0!==r?r+"":r}function w(e,t){return{get:function(){return e()?void delete this.get:(this.get=t).apply(this,arguments)}}}function x(e,t){if(t in e)return t;for(var i=t[0].toUpperCase()+t.slice(1),n=t,s=Ve.length;s--;)if((t=Ve[s]+i)in e)return t;return n}function C(e,t,i){var n=je.exec(t);return n?Math.max(0,n[1]-(i||0))+(n[2]||"px"):t}function S(e,t,i,n,s){for(var o=i===(n?"border":"content")?4:"width"===t?1:0,r=0;o<4;o+=2)"margin"===i&&(r+=Q.css(e,i+ye[o],!0,s)),n?("content"===i&&(r-=Q.css(e,"padding"+ye[o],!0,s)),"margin"!==i&&(r-=Q.css(e,"border"+ye[o]+"Width",!0,s))):(r+=Q.css(e,"padding"+ye[o],!0,s),"padding"!==i&&(r+=Q.css(e,"border"+ye[o]+"Width",!0,s)));return r}function k(e,t,i){var n=!0,s="width"===t?e.offsetWidth:e.offsetHeight,o=Ge(e),r="border-box"===Q.css(e,"boxSizing",!1,o);if(s<=0||null==s){if(s=T(e,t,o),(s<0||null==s)&&(s=e.style[t]),Be.test(s))return s;n=r&&(K.boxSizingReliable()||s===e.style[t]),s=parseFloat(s)||0}return s+S(e,t,i||(r?"border":"content"),n,o)+"px"}function D(e,t){for(var i,n,s,o=[],r=0,a=e.length;r<a;r++)n=e[r],n.style&&(o[r]=_e.get(n,"olddisplay"),i=n.style.display,t?(o[r]||"none"!==i||(n.style.display=""),""===n.style.display&&Te(n)&&(o[r]=_e.access(n,"olddisplay",y(n.nodeName)))):(s=Te(n),"none"===i&&s||_e.set(n,"olddisplay",s?i:Q.css(n,"display"))));for(r=0;r<a;r++)n=e[r],n.style&&(t&&"none"!==n.style.display&&""!==n.style.display||(n.style.display=t?o[r]||"":"none"));return e}function P(e,t,i,n,s){return new P.prototype.init(e,t,i,n,s)}function A(){return setTimeout(function(){qe=void 0}),qe=Q.now()}function I(e,t){var i,n=0,s={height:e};for(t=t?1:0;n<4;n+=2-t)i=ye[n],s["margin"+i]=s["padding"+i]=e;return t&&(s.opacity=s.width=e),s}function M(e,t,i){for(var n,s=(Ze[t]||[]).concat(Ze["*"]),o=0,r=s.length;o<r;o++)if(n=s[o].call(i,t,e))return n}function F(e,t,i){var n,s,o,r,a,l,c,u=this,h={},d=e.style,p=e.nodeType&&Te(e),f=_e.get(e,"fxshow");i.queue||(a=Q._queueHooks(e,"fx"),null==a.unqueued&&(a.unqueued=0,l=a.empty.fire,a.empty.fire=function(){a.unqueued||l()}),a.unqueued++,u.always(function(){u.always(function(){a.unqueued--,Q.queue(e,"fx").length||a.empty.fire()})})),1===e.nodeType&&("height"in t||"width"in t)&&(i.overflow=[d.overflow,d.overflowX,d.overflowY],c=Q.css(e,"display"),"inline"===("none"===c?_e.get(e,"olddisplay")||y(e.nodeName):c)&&"none"===Q.css(e,"float")&&(d.display="inline-block")),i.overflow&&(d.overflow="hidden",u.always(function(){d.overflow=i.overflow[0],d.overflowX=i.overflow[1],d.overflowY=i.overflow[2]}));for(n in t)if(s=t[n],Xe.exec(s)){if(delete t[n],o=o||"toggle"===s,s===(p?"hide":"show")){if("show"!==s||!f||void 0===f[n])continue;p=!0}h[n]=f&&f[n]||Q.style(e,n)}else c=void 0;if(Q.isEmptyObject(h))"inline"===("none"===c?y(e.nodeName):c)&&(d.display=c);else{f?"hidden"in f&&(p=f.hidden):f=_e.access(e,"fxshow",{}),o&&(f.hidden=!p),p?Q(e).show():u.done(function(){Q(e).hide()}),u.done(function(){var t;_e.remove(e,"fxshow");for(t in h)Q.style(e,t,h[t])});for(n in h)r=M(p?f[n]:0,n,u),n in f||(f[n]=r.start,p&&(r.end=r.start,r.start="width"===n||"height"===n?1:0))}}function E(e,t){var i,n,s,o,r;for(i in e)if(n=Q.camelCase(i),s=t[n],o=e[i],Q.isArray(o)&&(s=o[1],o=e[i]=o[0]),i!==n&&(e[n]=o,delete e[i]),(r=Q.cssHooks[n])&&"expand"in r){o=r.expand(o),delete e[n];for(i in o)i in e||(e[i]=o[i],t[i]=s)}else t[n]=s}function O(e,t,i){var n,s,o=0,r=Qe.length,a=Q.Deferred().always(function(){delete l.elem}),l=function(){if(s)return!1;for(var t=qe||A(),i=Math.max(0,c.startTime+c.duration-t),n=i/c.duration||0,o=1-n,r=0,l=c.tweens.length;r<l;r++)c.tweens[r].run(o);return a.notifyWith(e,[c,o,i]),o<1&&l?i:(a.resolveWith(e,[c]),!1)},c=a.promise({elem:e,props:Q.extend({},t),opts:Q.extend(!0,{specialEasing:{}},i),originalProperties:t,originalOptions:i,startTime:qe||A(),duration:i.duration,tweens:[],createTween:function(t,i){var n=Q.Tween(e,c.opts,t,i,c.opts.specialEasing[t]||c.opts.easing);return c.tweens.push(n),n},stop:function(t){var i=0,n=t?c.tweens.length:0;if(s)return this;for(s=!0;i<n;i++)c.tweens[i].run(1);return t?a.resolveWith(e,[c,t]):a.rejectWith(e,[c,t]),this}}),u=c.props;for(E(u,c.opts.specialEasing);o<r;o++)if(n=Qe[o].call(c,e,u,c.opts))return n;return Q.map(u,M,c),Q.isFunction(c.opts.start)&&c.opts.start.call(e,c),Q.fx.timer(Q.extend(l,{elem:e,anim:c,queue:c.opts.queue})),c.progress(c.opts.progress).done(c.opts.done,c.opts.complete).fail(c.opts.fail).always(c.opts.always)}function $(e){return function(t,i){"string"!=typeof t&&(i=t,t="*");var n,s=0,o=t.toLowerCase().match(he)||[];if(Q.isFunction(i))for(;n=o[s++];)"+"===n[0]?(n=n.slice(1)||"*",(e[n]=e[n]||[]).unshift(i)):(e[n]=e[n]||[]).push(i)}}function H(e,t,i,n){function s(a){var l;return o[a]=!0,Q.each(e[a]||[],function(e,a){var c=a(t,i,n);return"string"!=typeof c||r||o[c]?r?!(l=c):void 0:(t.dataTypes.unshift(c),s(c),!1)}),l}var o={},r=e===_t;return s(t.dataTypes[0])||!o["*"]&&s("*")}function N(e,t){var i,n,s=Q.ajaxSettings.flatOptions||{};for(i in t)void 0!==t[i]&&((s[i]?e:n||(n={}))[i]=t[i]);return n&&Q.extend(!0,e,n),e}function R(e,t,i){for(var n,s,o,r,a=e.contents,l=e.dataTypes;"*"===l[0];)l.shift(),void 0===n&&(n=e.mimeType||t.getResponseHeader("Content-Type"));if(n)for(s in a)if(a[s]&&a[s].test(n)){l.unshift(s);break}if(l[0]in i)o=l[0];else{for(s in i){if(!l[0]||e.converters[s+" "+l[0]]){o=s;break}r||(r=s)}o=o||r}if(o)return o!==l[0]&&l.unshift(o),i[o]}function B(e,t,i,n){var s,o,r,a,l,c={},u=e.dataTypes.slice();if(u[1])for(r in e.converters)c[r.toLowerCase()]=e.converters[r];for(o=u.shift();o;)if(e.responseFields[o]&&(i[e.responseFields[o]]=t),!l&&n&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),l=o,o=u.shift())if("*"===o)o=l;else if("*"!==l&&l!==o){if(!(r=c[l+" "+o]||c["* "+o]))for(s in c)if(a=s.split(" "),a[1]===o&&(r=c[l+" "+a[0]]||c["* "+a[0]])){!0===r?r=c[s]:!0!==c[s]&&(o=a[0],u.unshift(a[1]));break}if(!0!==r)if(r&&e.throws)t=r(t);else try{t=r(t)}catch(e){return{state:"parsererror",error:r?e:"No conversion from "+l+" to "+o}}}return{state:"success",data:t}}function G(e,t,i,n){var s;if(Q.isArray(t))Q.each(t,function(t,s){i||yt.test(e)?n(e,s):G(e+"["+("object"==typeof s?t:"")+"]",s,i,n)});else if(i||"object"!==Q.type(t))n(e,t);else for(s in t)G(e+"["+s+"]",t[s],i,n)}function L(e){return Q.isWindow(e)?e:9===e.nodeType&&e.defaultView}var j=[],W=j.slice,z=j.concat,U=j.push,V=j.indexOf,q={},Y=q.toString,X=q.hasOwnProperty,K={},J=e.document,Q=function(e,t){return new Q.fn.init(e,t)},Z=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,ee=/^-ms-/,te=/-([\da-z])/gi,ie=function(e,t){return t.toUpperCase()};Q.fn=Q.prototype={jquery:"2.1.3",constructor:Q,selector:"",length:0,toArray:function(){return W.call(this)},get:function(e){return null!=e?e<0?this[e+this.length]:this[e]:W.call(this)},pushStack:function(e){var t=Q.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e,t){return Q.each(this,e,t)},map:function(e){return this.pushStack(Q.map(this,function(t,i){return e.call(t,i,t)}))},slice:function(){return this.pushStack(W.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,i=+e+(e<0?t:0);return this.pushStack(i>=0&&i<t?[this[i]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:U,sort:j.sort,splice:j.splice},Q.extend=Q.fn.extend=function(){var e,t,i,n,s,o,r=arguments[0]||{},a=1,l=arguments.length,c=!1;for("boolean"==typeof r&&(c=r,r=arguments[a]||{},a++),"object"==typeof r||Q.isFunction(r)||(r={}),a===l&&(r=this,a--);a<l;a++)if(null!=(e=arguments[a]))for(t in e)i=r[t],n=e[t],r!==n&&(c&&n&&(Q.isPlainObject(n)||(s=Q.isArray(n)))?(s?(s=!1,o=i&&Q.isArray(i)?i:[]):o=i&&Q.isPlainObject(i)?i:{},r[t]=Q.extend(c,o,n)):void 0!==n&&(r[t]=n));return r},Q.extend({expando:"jQuery"+("2.1.3"+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isFunction:function(e){return"function"===Q.type(e)},isArray:Array.isArray,isWindow:function(e){return null!=e&&e===e.window},isNumeric:function(e){return!Q.isArray(e)&&e-parseFloat(e)+1>=0},isPlainObject:function(e){return"object"===Q.type(e)&&!e.nodeType&&!Q.isWindow(e)&&!(e.constructor&&!X.call(e.constructor.prototype,"isPrototypeOf"))},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?q[Y.call(e)]||"object":typeof e},globalEval:function(e){var t,i=eval;(e=Q.trim(e))&&(1===e.indexOf("use strict")?(t=J.createElement("script"),t.text=e,J.head.appendChild(t).parentNode.removeChild(t)):i(e))},camelCase:function(e){return e.replace(ee,"ms-").replace(te,ie)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t,n){var s=0,o=e.length,r=i(e);if(n){if(r)for(;s<o&&!1!==t.apply(e[s],n);s++);else for(s in e)if(!1===t.apply(e[s],n))break}else if(r)for(;s<o&&!1!==t.call(e[s],s,e[s]);s++);else for(s in e)if(!1===t.call(e[s],s,e[s]))break;return e},trim:function(e){return null==e?"":(e+"").replace(Z,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(i(Object(e))?Q.merge(n,"string"==typeof e?[e]:e):U.call(n,e)),n},inArray:function(e,t,i){return null==t?-1:V.call(t,e,i)},merge:function(e,t){for(var i=+t.length,n=0,s=e.length;n<i;n++)e[s++]=t[n];return e.length=s,e},grep:function(e,t,i){for(var n=[],s=0,o=e.length,r=!i;s<o;s++)!t(e[s],s)!==r&&n.push(e[s]);return n},map:function(e,t,n){var s,o=0,r=e.length,a=i(e),l=[];if(a)for(;o<r;o++)null!=(s=t(e[o],o,n))&&l.push(s);else for(o in e)null!=(s=t(e[o],o,n))&&l.push(s);return z.apply([],l)},guid:1,proxy:function(e,t){var i,n,s;if("string"==typeof t&&(i=e[t],t=e,e=i),Q.isFunction(e))return n=W.call(arguments,2),s=function(){return e.apply(t||this,n.concat(W.call(arguments)))},s.guid=e.guid=e.guid||Q.guid++,s},now:Date.now,support:K}),Q.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(e,t){q["[object "+t+"]"]=t.toLowerCase()});var ne=function(e){function t(e,t,i,n){var s,o,r,a,c,h,d,p,f,_;if((t?t.ownerDocument||t:R)!==I&&A(t),t=t||I,i=i||[],a=t.nodeType,"string"!=typeof e||!e||1!==a&&9!==a&&11!==a)return i;if(!n&&F){if(11!==a&&(s=me.exec(e)))if(r=s[1]){if(9===a){if(!(o=t.getElementById(r))||!o.parentNode)return i;if(o.id===r)return i.push(o),i}else if(t.ownerDocument&&(o=t.ownerDocument.getElementById(r))&&H(t,o)&&o.id===r)return i.push(o),i}else{if(s[2])return K.apply(i,t.getElementsByTagName(e)),i;if((r=s[3])&&b.getElementsByClassName)return K.apply(i,t.getElementsByClassName(r)),i}if(b.qsa&&(!E||!E.test(e))){if(p=d=N,f=t,_=1!==a&&e,1===a&&"object"!==t.nodeName.toLowerCase()){for(h=x(e),(d=t.getAttribute("id"))?p=d.replace(ve,"\\$&"):t.setAttribute("id",p),p="[id='"+p+"'] ",c=h.length;c--;)h[c]=p+u(h[c]);f=ge.test(e)&&l(t.parentNode)||t,_=h.join(",")}if(_)try{return K.apply(i,f.querySelectorAll(_)),i}catch(e){}finally{d||t.removeAttribute("id")}}}return S(e.replace(re,"$1"),t,i,n)}function i(){function e(i,n){return t.push(i+" ")>y.cacheLength&&delete e[t.shift()],e[i+" "]=n}var t=[];return e}function n(e){return e[N]=!0,e}function s(e){var t=I.createElement("div");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function o(e,t){for(var i=e.split("|"),n=e.length;n--;)y.attrHandle[i[n]]=t}function r(e,t){var i=t&&e,n=i&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||U)-(~e.sourceIndex||U);if(n)return n;if(i)for(;i=i.nextSibling;)if(i===t)return-1;return e?1:-1}function a(e){return n(function(t){return t=+t,n(function(i,n){for(var s,o=e([],i.length,t),r=o.length;r--;)i[s=o[r]]&&(i[s]=!(n[s]=i[s]))})})}function l(e){return e&&void 0!==e.getElementsByTagName&&e}function c(){}function u(e){for(var t=0,i=e.length,n="";t<i;t++)n+=e[t].value;return n}function h(e,t,i){var n=t.dir,s=i&&"parentNode"===n,o=G++;return t.first?function(t,i,o){for(;t=t[n];)if(1===t.nodeType||s)return e(t,i,o)}:function(t,i,r){var a,l,c=[B,o];if(r){for(;t=t[n];)if((1===t.nodeType||s)&&e(t,i,r))return!0}else for(;t=t[n];)if(1===t.nodeType||s){if(l=t[N]||(t[N]={}),(a=l[n])&&a[0]===B&&a[1]===o)return c[2]=a[2];if(l[n]=c,c[2]=e(t,i,r))return!0}}}function d(e){return e.length>1?function(t,i,n){for(var s=e.length;s--;)if(!e[s](t,i,n))return!1;return!0}:e[0]}function p(e,i,n){for(var s=0,o=i.length;s<o;s++)t(e,i[s],n);return n}function f(e,t,i,n,s){for(var o,r=[],a=0,l=e.length,c=null!=t;a<l;a++)(o=e[a])&&(i&&!i(o,n,s)||(r.push(o),c&&t.push(a)));return r}function _(e,t,i,s,o,r){return s&&!s[N]&&(s=_(s)),o&&!o[N]&&(o=_(o,r)),n(function(n,r,a,l){var c,u,h,d=[],_=[],m=r.length,g=n||p(t||"*",a.nodeType?[a]:a,[]),v=!e||!n&&t?g:f(g,d,e,a,l),b=i?o||(n?e:m||s)?[]:r:v;if(i&&i(v,b,a,l),s)for(c=f(b,_),s(c,[],a,l),u=c.length;u--;)(h=c[u])&&(b[_[u]]=!(v[_[u]]=h));if(n){if(o||e){if(o){for(c=[],u=b.length;u--;)(h=b[u])&&c.push(v[u]=h);o(null,b=[],c,l)}for(u=b.length;u--;)(h=b[u])&&(c=o?Q(n,h):d[u])>-1&&(n[c]=!(r[c]=h))}}else b=f(b===r?b.splice(m,b.length):b),o?o(null,r,b,l):K.apply(r,b)})}function m(e){for(var t,i,n,s=e.length,o=y.relative[e[0].type],r=o||y.relative[" "],a=o?1:0,l=h(function(e){return e===t},r,!0),c=h(function(e){return Q(t,e)>-1},r,!0),p=[function(e,i,n){var s=!o&&(n||i!==k)||((t=i).nodeType?l(e,i,n):c(e,i,n));return t=null,s}];a<s;a++)if(i=y.relative[e[a].type])p=[h(d(p),i)];else{if(i=y.filter[e[a].type].apply(null,e[a].matches),i[N]){for(n=++a;n<s&&!y.relative[e[n].type];n++);return _(a>1&&d(p),a>1&&u(e.slice(0,a-1).concat({value:" "===e[a-2].type?"*":""})).replace(re,"$1"),i,a<n&&m(e.slice(a,n)),n<s&&m(e=e.slice(n)),n<s&&u(e))}p.push(i)}return d(p)}function g(e,i){var s=i.length>0,o=e.length>0,r=function(n,r,a,l,c){var u,h,d,p=0,_="0",m=n&&[],g=[],v=k,b=n||o&&y.find.TAG("*",c),T=B+=null==v?1:Math.random()||.1,w=b.length;for(c&&(k=r!==I&&r);_!==w&&null!=(u=b[_]);_++){if(o&&u){for(h=0;d=e[h++];)if(d(u,r,a)){l.push(u);break}c&&(B=T)}s&&((u=!d&&u)&&p--,n&&m.push(u))}if(p+=_,s&&_!==p){for(h=0;d=i[h++];)d(m,g,r,a);if(n){if(p>0)for(;_--;)m[_]||g[_]||(g[_]=Y.call(l));g=f(g)}K.apply(l,g),c&&!n&&g.length>0&&p+i.length>1&&t.uniqueSort(l)}return c&&(B=T,k=v),m};return s?n(r):r}var v,b,y,T,w,x,C,S,k,D,P,A,I,M,F,E,O,$,H,N="sizzle"+1*new Date,R=e.document,B=0,G=0,L=i(),j=i(),W=i(),z=function(e,t){return e===t&&(P=!0),0},U=1<<31,V={}.hasOwnProperty,q=[],Y=q.pop,X=q.push,K=q.push,J=q.slice,Q=function(e,t){for(var i=0,n=e.length;i<n;i++)if(e[i]===t)return i;return-1},Z="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",ee="[\\x20\\t\\r\\n\\f]",te="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",ie=te.replace("w","w#"),ne="\\["+ee+"*("+te+")(?:"+ee+"*([*^$|!~]?=)"+ee+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+ie+"))|)"+ee+"*\\]",se=":("+te+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+ne+")*)|.*)\\)|)",oe=new RegExp(ee+"+","g"),re=new RegExp("^"+ee+"+|((?:^|[^\\\\])(?:\\\\.)*)"+ee+"+$","g"),ae=new RegExp("^"+ee+"*,"+ee+"*"),le=new RegExp("^"+ee+"*([>+~]|"+ee+")"+ee+"*"),ce=new RegExp("="+ee+"*([^\\]'\"]*?)"+ee+"*\\]","g"),ue=new RegExp(se),he=new RegExp("^"+ie+"$"),de={ID:new RegExp("^#("+te+")"),CLASS:new RegExp("^\\.("+te+")"),TAG:new RegExp("^("+te.replace("w","w*")+")"),ATTR:new RegExp("^"+ne),PSEUDO:new RegExp("^"+se),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+ee+"*(even|odd|(([+-]|)(\\d*)n|)"+ee+"*(?:([+-]|)"+ee+"*(\\d+)|))"+ee+"*\\)|)","i"),bool:new RegExp("^(?:"+Z+")$","i"),needsContext:new RegExp("^"+ee+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+ee+"*((?:-\\d)?\\d*)"+ee+"*\\)|)(?=[^-]|$)","i")},pe=/^(?:input|select|textarea|button)$/i,fe=/^h\d$/i,_e=/^[^{]+\{\s*\[native \w/,me=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ge=/[+~]/,ve=/'|\\/g,be=new RegExp("\\\\([\\da-f]{1,6}"+ee+"?|("+ee+")|.)","ig"),ye=function(e,t,i){var n="0x"+t-65536;return n!==n||i?t:n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320)},Te=function(){A()};try{K.apply(q=J.call(R.childNodes),R.childNodes),q[R.childNodes.length].nodeType}catch(e){K={apply:q.length?function(e,t){X.apply(e,J.call(t))}:function(e,t){for(var i=e.length,n=0;e[i++]=t[n++];);e.length=i-1}}}b=t.support={},w=t.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},A=t.setDocument=function(e){var t,i,n=e?e.ownerDocument||e:R;return n!==I&&9===n.nodeType&&n.documentElement?(I=n,M=n.documentElement,i=n.defaultView,i&&i!==i.top&&(i.addEventListener?i.addEventListener("unload",Te,!1):i.attachEvent&&i.attachEvent("onunload",Te)),F=!w(n),b.attributes=s(function(e){return e.className="i",!e.getAttribute("className")}),b.getElementsByTagName=s(function(e){return e.appendChild(n.createComment("")),!e.getElementsByTagName("*").length}),b.getElementsByClassName=_e.test(n.getElementsByClassName),b.getById=s(function(e){return M.appendChild(e).id=N,!n.getElementsByName||!n.getElementsByName(N).length}),b.getById?(y.find.ID=function(e,t){if(void 0!==t.getElementById&&F){var i=t.getElementById(e);return i&&i.parentNode?[i]:[]}},y.filter.ID=function(e){var t=e.replace(be,ye);return function(e){return e.getAttribute("id")===t}}):(delete y.find.ID,y.filter.ID=function(e){var t=e.replace(be,ye);return function(e){var i=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return i&&i.value===t}}),y.find.TAG=b.getElementsByTagName?function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):b.qsa?t.querySelectorAll(e):void 0}:function(e,t){var i,n=[],s=0,o=t.getElementsByTagName(e);if("*"===e){for(;i=o[s++];)1===i.nodeType&&n.push(i);return n}return o},y.find.CLASS=b.getElementsByClassName&&function(e,t){if(F)return t.getElementsByClassName(e)},O=[],E=[],(b.qsa=_e.test(n.querySelectorAll))&&(s(function(e){M.appendChild(e).innerHTML="<a id='"+N+"'></a><select id='"+N+"-\f]' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&E.push("[*^$]="+ee+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||E.push("\\["+ee+"*(?:value|"+Z+")"),e.querySelectorAll("[id~="+N+"-]").length||E.push("~="),e.querySelectorAll(":checked").length||E.push(":checked"),e.querySelectorAll("a#"+N+"+*").length||E.push(".#.+[+~]")}),s(function(e){var t=n.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&E.push("name"+ee+"*[*^$|!~]?="),e.querySelectorAll(":enabled").length||E.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),E.push(",.*:")})),(b.matchesSelector=_e.test($=M.matches||M.webkitMatchesSelector||M.mozMatchesSelector||M.oMatchesSelector||M.msMatchesSelector))&&s(function(e){b.disconnectedMatch=$.call(e,"div"),$.call(e,"[s!='']:x"),O.push("!=",se)}),E=E.length&&new RegExp(E.join("|")),O=O.length&&new RegExp(O.join("|")),t=_e.test(M.compareDocumentPosition),H=t||_e.test(M.contains)?function(e,t){var i=9===e.nodeType?e.documentElement:e,n=t&&t.parentNode;return e===n||!(!n||1!==n.nodeType||!(i.contains?i.contains(n):e.compareDocumentPosition&&16&e.compareDocumentPosition(n)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},z=t?function(e,t){if(e===t)return P=!0,0;var i=!e.compareDocumentPosition-!t.compareDocumentPosition;return i||(i=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1,1&i||!b.sortDetached&&t.compareDocumentPosition(e)===i?e===n||e.ownerDocument===R&&H(R,e)?-1:t===n||t.ownerDocument===R&&H(R,t)?1:D?Q(D,e)-Q(D,t):0:4&i?-1:1)}:function(e,t){if(e===t)return P=!0,0;var i,s=0,o=e.parentNode,a=t.parentNode,l=[e],c=[t];if(!o||!a)return e===n?-1:t===n?1:o?-1:a?1:D?Q(D,e)-Q(D,t):0;if(o===a)return r(e,t);for(i=e;i=i.parentNode;)l.unshift(i);for(i=t;i=i.parentNode;)c.unshift(i);for(;l[s]===c[s];)s++;return s?r(l[s],c[s]):l[s]===R?-1:c[s]===R?1:0},n):I},t.matches=function(e,i){return t(e,null,null,i)},t.matchesSelector=function(e,i){if((e.ownerDocument||e)!==I&&A(e),i=i.replace(ce,"='$1']"),b.matchesSelector&&F&&(!O||!O.test(i))&&(!E||!E.test(i)))try{var n=$.call(e,i);if(n||b.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){}return t(i,I,null,[e]).length>0},t.contains=function(e,t){return(e.ownerDocument||e)!==I&&A(e),H(e,t)},t.attr=function(e,t){(e.ownerDocument||e)!==I&&A(e);var i=y.attrHandle[t.toLowerCase()],n=i&&V.call(y.attrHandle,t.toLowerCase())?i(e,t,!F):void 0;return void 0!==n?n:b.attributes||!F?e.getAttribute(t):(n=e.getAttributeNode(t))&&n.specified?n.value:null},t.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},t.uniqueSort=function(e){var t,i=[],n=0,s=0;if(P=!b.detectDuplicates,D=!b.sortStable&&e.slice(0),e.sort(z),P){for(;t=e[s++];)t===e[s]&&(n=i.push(s));for(;n--;)e.splice(i[n],1)}return D=null,e},T=t.getText=function(e){var t,i="",n=0,s=e.nodeType;if(s){if(1===s||9===s||11===s){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)i+=T(e)}else if(3===s||4===s)return e.nodeValue}else for(;t=e[n++];)i+=T(t);return i},y=t.selectors={cacheLength:50,createPseudo:n,match:de,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(be,ye),e[3]=(e[3]||e[4]||e[5]||"").replace(be,ye),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||t.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&t.error(e[0]),e},PSEUDO:function(e){var t,i=!e[6]&&e[2];return de.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":i&&ue.test(i)&&(t=x(i,!0))&&(t=i.indexOf(")",i.length-t)-i.length)&&(e[0]=e[0].slice(0,t),e[2]=i.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(be,ye).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=L[e+" "];return t||(t=new RegExp("(^|"+ee+")"+e+"("+ee+"|$)"))&&L(e,function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(e,i,n){return function(s){var o=t.attr(s,e);return null==o?"!="===i:!i||(o+="","="===i?o===n:"!="===i?o!==n:"^="===i?n&&0===o.indexOf(n):"*="===i?n&&o.indexOf(n)>-1:"$="===i?n&&o.slice(-n.length)===n:"~="===i?(" "+o.replace(oe," ")+" ").indexOf(n)>-1:"|="===i&&(o===n||o.slice(0,n.length+1)===n+"-"))}},CHILD:function(e,t,i,n,s){var o="nth"!==e.slice(0,3),r="last"!==e.slice(-4),a="of-type"===t;return 1===n&&0===s?function(e){return!!e.parentNode}:function(t,i,l){var c,u,h,d,p,f,_=o!==r?"nextSibling":"previousSibling",m=t.parentNode,g=a&&t.nodeName.toLowerCase(),v=!l&&!a;if(m){if(o){for(;_;){for(h=t;h=h[_];)if(a?h.nodeName.toLowerCase()===g:1===h.nodeType)return!1;f=_="only"===e&&!f&&"nextSibling"}return!0}if(f=[r?m.firstChild:m.lastChild],r&&v){for(u=m[N]||(m[N]={}),c=u[e]||[],p=c[0]===B&&c[1],d=c[0]===B&&c[2],h=p&&m.childNodes[p];h=++p&&h&&h[_]||(d=p=0)||f.pop();)if(1===h.nodeType&&++d&&h===t){u[e]=[B,p,d];break}}else if(v&&(c=(t[N]||(t[N]={}))[e])&&c[0]===B)d=c[1];else for(;(h=++p&&h&&h[_]||(d=p=0)||f.pop())&&((a?h.nodeName.toLowerCase()!==g:1!==h.nodeType)||!++d||(v&&((h[N]||(h[N]={}))[e]=[B,d]),h!==t)););return(d-=s)===n||d%n==0&&d/n>=0}}},PSEUDO:function(e,i){var s,o=y.pseudos[e]||y.setFilters[e.toLowerCase()]||t.error("unsupported pseudo: "+e);return o[N]?o(i):o.length>1?(s=[e,e,"",i],y.setFilters.hasOwnProperty(e.toLowerCase())?n(function(e,t){for(var n,s=o(e,i),r=s.length;r--;)n=Q(e,s[r]),e[n]=!(t[n]=s[r])}):function(e){return o(e,0,s)}):o}},pseudos:{not:n(function(e){var t=[],i=[],s=C(e.replace(re,"$1"));return s[N]?n(function(e,t,i,n){for(var o,r=s(e,null,n,[]),a=e.length;a--;)(o=r[a])&&(e[a]=!(t[a]=o))}):function(e,n,o){return t[0]=e,s(t,null,o,i),t[0]=null,!i.pop()}}),has:n(function(e){return function(i){return t(e,i).length>0}}),contains:n(function(e){return e=e.replace(be,ye),function(t){return(t.textContent||t.innerText||T(t)).indexOf(e)>-1}}),lang:n(function(e){return he.test(e||"")||t.error("unsupported lang: "+e),e=e.replace(be,ye).toLowerCase(),function(t){var i;do{if(i=F?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(i=i.toLowerCase())===e||0===i.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var i=e.location&&e.location.hash;return i&&i.slice(1)===t.id},root:function(e){return e===M},focus:function(e){return e===I.activeElement&&(!I.hasFocus||I.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return!1===e.disabled},disabled:function(e){return!0===e.disabled},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!y.pseudos.empty(e)},header:function(e){return fe.test(e.nodeName)},input:function(e){return pe.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:a(function(){return[0]}),last:a(function(e,t){return[t-1]}),eq:a(function(e,t,i){return[i<0?i+t:i]}),even:a(function(e,t){for(var i=0;i<t;i+=2)e.push(i);return e}),odd:a(function(e,t){for(var i=1;i<t;i+=2)e.push(i);return e}),lt:a(function(e,t,i){for(var n=i<0?i+t:i;--n>=0;)e.push(n);return e}),gt:a(function(e,t,i){for(var n=i<0?i+t:i;++n<t;)e.push(n);return e})}},y.pseudos.nth=y.pseudos.eq;for(v in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})y.pseudos[v]=function(e){return function(t){return"input"===t.nodeName.toLowerCase()&&t.type===e}}(v);for(v in{submit:!0,reset:!0})y.pseudos[v]=function(e){return function(t){var i=t.nodeName.toLowerCase();return("input"===i||"button"===i)&&t.type===e}}(v);return c.prototype=y.filters=y.pseudos,y.setFilters=new c,x=t.tokenize=function(e,i){var n,s,o,r,a,l,c,u=j[e+" "];if(u)return i?0:u.slice(0);for(a=e,l=[],c=y.preFilter;a;){n&&!(s=ae.exec(a))||(s&&(a=a.slice(s[0].length)||a),l.push(o=[])),n=!1,(s=le.exec(a))&&(n=s.shift(),o.push({value:n,type:s[0].replace(re," ")}),a=a.slice(n.length));for(r in y.filter)!(s=de[r].exec(a))||c[r]&&!(s=c[r](s))||(n=s.shift(),o.push({value:n,type:r,matches:s}),a=a.slice(n.length));if(!n)break}return i?a.length:a?t.error(e):j(e,l).slice(0)},C=t.compile=function(e,t){var i,n=[],s=[],o=W[e+" "];if(!o){for(t||(t=x(e)),i=t.length;i--;)o=m(t[i]),o[N]?n.push(o):s.push(o);o=W(e,g(s,n)),o.selector=e}return o},S=t.select=function(e,t,i,n){var s,o,r,a,c,h="function"==typeof e&&e,d=!n&&x(e=h.selector||e);if(i=i||[],1===d.length){if(o=d[0]=d[0].slice(0),o.length>2&&"ID"===(r=o[0]).type&&b.getById&&9===t.nodeType&&F&&y.relative[o[1].type]){if(!(t=(y.find.ID(r.matches[0].replace(be,ye),t)||[])[0]))return i;h&&(t=t.parentNode),e=e.slice(o.shift().value.length)}for(s=de.needsContext.test(e)?0:o.length;s--&&(r=o[s],!y.relative[a=r.type]);)if((c=y.find[a])&&(n=c(r.matches[0].replace(be,ye),ge.test(o[0].type)&&l(t.parentNode)||t))){if(o.splice(s,1),!(e=n.length&&u(o)))return K.apply(i,n),i;break}}return(h||C(e,d))(n,t,!F,i,ge.test(e)&&l(t.parentNode)||t),i},b.sortStable=N.split("").sort(z).join("")===N,b.detectDuplicates=!!P,A(),b.sortDetached=s(function(e){return 1&e.compareDocumentPosition(I.createElement("div"))}),s(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||o("type|href|height|width",function(e,t,i){if(!i)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),b.attributes&&s(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||o("value",function(e,t,i){if(!i&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),s(function(e){return null==e.getAttribute("disabled")})||o(Z,function(e,t,i){var n;if(!i)return!0===e[t]?t.toLowerCase():(n=e.getAttributeNode(t))&&n.specified?n.value:null}),t}(e);Q.find=ne,Q.expr=ne.selectors,Q.expr[":"]=Q.expr.pseudos,Q.unique=ne.uniqueSort,Q.text=ne.getText,Q.isXMLDoc=ne.isXML,Q.contains=ne.contains;var se=Q.expr.match.needsContext,oe=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,re=/^.[^:#\[\.,]*$/;Q.filter=function(e,t,i){var n=t[0];return i&&(e=":not("+e+")"),1===t.length&&1===n.nodeType?Q.find.matchesSelector(n,e)?[n]:[]:Q.find.matches(e,Q.grep(t,function(e){return 1===e.nodeType}))},Q.fn.extend({find:function(e){var t,i=this.length,n=[],s=this;if("string"!=typeof e)return this.pushStack(Q(e).filter(function(){for(t=0;t<i;t++)if(Q.contains(s[t],this))return!0}));for(t=0;t<i;t++)Q.find(e,s[t],n);return n=this.pushStack(i>1?Q.unique(n):n),n.selector=this.selector?this.selector+" "+e:e,n},filter:function(e){return this.pushStack(n(this,e||[],!1))},not:function(e){return this.pushStack(n(this,e||[],!0))},is:function(e){return!!n(this,"string"==typeof e&&se.test(e)?Q(e):e||[],!1).length}});var ae,le=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/;(Q.fn.init=function(e,t){var i,n;if(!e)return this;if("string"==typeof e){if(!(i="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:le.exec(e))||!i[1]&&t)return!t||t.jquery?(t||ae).find(e):this.constructor(t).find(e);if(i[1]){if(t=t instanceof Q?t[0]:t,Q.merge(this,Q.parseHTML(i[1],t&&t.nodeType?t.ownerDocument||t:J,!0)),oe.test(i[1])&&Q.isPlainObject(t))for(i in t)Q.isFunction(this[i])?this[i](t[i]):this.attr(i,t[i]);return this}return n=J.getElementById(i[2]),n&&n.parentNode&&(this.length=1,this[0]=n),this.context=J,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):Q.isFunction(e)?void 0!==ae.ready?ae.ready(e):e(Q):(void 0!==e.selector&&(this.selector=e.selector,this.context=e.context),Q.makeArray(e,this))}).prototype=Q.fn,ae=Q(J);var ce=/^(?:parents|prev(?:Until|All))/,ue={children:!0,contents:!0,next:!0,prev:!0};Q.extend({dir:function(e,t,i){for(var n=[],s=void 0!==i;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(s&&Q(e).is(i))break;n.push(e)}return n},sibling:function(e,t){for(var i=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&i.push(e);return i}}),Q.fn.extend({has:function(e){var t=Q(e,this),i=t.length;return this.filter(function(){for(var e=0;e<i;e++)if(Q.contains(this,t[e]))return!0})},closest:function(e,t){for(var i,n=0,s=this.length,o=[],r=se.test(e)||"string"!=typeof e?Q(e,t||this.context):0;n<s;n++)for(i=this[n];i&&i!==t;i=i.parentNode)if(i.nodeType<11&&(r?r.index(i)>-1:1===i.nodeType&&Q.find.matchesSelector(i,e))){o.push(i);break}return this.pushStack(o.length>1?Q.unique(o):o)},index:function(e){return e?"string"==typeof e?V.call(Q(e),this[0]):V.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(Q.unique(Q.merge(this.get(),Q(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),Q.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return Q.dir(e,"parentNode")},parentsUntil:function(e,t,i){return Q.dir(e,"parentNode",i)},next:function(e){return s(e,"nextSibling")},prev:function(e){return s(e,"previousSibling")},
nextAll:function(e){return Q.dir(e,"nextSibling")},prevAll:function(e){return Q.dir(e,"previousSibling")},nextUntil:function(e,t,i){return Q.dir(e,"nextSibling",i)},prevUntil:function(e,t,i){return Q.dir(e,"previousSibling",i)},siblings:function(e){return Q.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return Q.sibling(e.firstChild)},contents:function(e){return e.contentDocument||Q.merge([],e.childNodes)}},function(e,t){Q.fn[e]=function(i,n){var s=Q.map(this,t,i);return"Until"!==e.slice(-5)&&(n=i),n&&"string"==typeof n&&(s=Q.filter(n,s)),this.length>1&&(ue[e]||Q.unique(s),ce.test(e)&&s.reverse()),this.pushStack(s)}});var he=/\S+/g,de={};Q.Callbacks=function(e){e="string"==typeof e?de[e]||o(e):Q.extend({},e);var t,i,n,s,r,a,l=[],c=!e.once&&[],u=function(o){for(t=e.memory&&o,i=!0,a=s||0,s=0,r=l.length,n=!0;l&&a<r;a++)if(!1===l[a].apply(o[0],o[1])&&e.stopOnFalse){t=!1;break}n=!1,l&&(c?c.length&&u(c.shift()):t?l=[]:h.disable())},h={add:function(){if(l){var i=l.length;!function t(i){Q.each(i,function(i,n){var s=Q.type(n);"function"===s?e.unique&&h.has(n)||l.push(n):n&&n.length&&"string"!==s&&t(n)})}(arguments),n?r=l.length:t&&(s=i,u(t))}return this},remove:function(){return l&&Q.each(arguments,function(e,t){for(var i;(i=Q.inArray(t,l,i))>-1;)l.splice(i,1),n&&(i<=r&&r--,i<=a&&a--)}),this},has:function(e){return e?Q.inArray(e,l)>-1:!(!l||!l.length)},empty:function(){return l=[],r=0,this},disable:function(){return l=c=t=void 0,this},disabled:function(){return!l},lock:function(){return c=void 0,t||h.disable(),this},locked:function(){return!c},fireWith:function(e,t){return!l||i&&!c||(t=t||[],t=[e,t.slice?t.slice():t],n?c.push(t):u(t)),this},fire:function(){return h.fireWith(this,arguments),this},fired:function(){return!!i}};return h},Q.extend({Deferred:function(e){var t=[["resolve","done",Q.Callbacks("once memory"),"resolved"],["reject","fail",Q.Callbacks("once memory"),"rejected"],["notify","progress",Q.Callbacks("memory")]],i="pending",n={state:function(){return i},always:function(){return s.done(arguments).fail(arguments),this},then:function(){var e=arguments;return Q.Deferred(function(i){Q.each(t,function(t,o){var r=Q.isFunction(e[t])&&e[t];s[o[1]](function(){var e=r&&r.apply(this,arguments);e&&Q.isFunction(e.promise)?e.promise().done(i.resolve).fail(i.reject).progress(i.notify):i[o[0]+"With"](this===n?i.promise():this,r?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?Q.extend(e,n):n}},s={};return n.pipe=n.then,Q.each(t,function(e,o){var r=o[2],a=o[3];n[o[1]]=r.add,a&&r.add(function(){i=a},t[1^e][2].disable,t[2][2].lock),s[o[0]]=function(){return s[o[0]+"With"](this===s?n:this,arguments),this},s[o[0]+"With"]=r.fireWith}),n.promise(s),e&&e.call(s,s),s},when:function(e){var t,i,n,s=0,o=W.call(arguments),r=o.length,a=1!==r||e&&Q.isFunction(e.promise)?r:0,l=1===a?e:Q.Deferred(),c=function(e,i,n){return function(s){i[e]=this,n[e]=arguments.length>1?W.call(arguments):s,n===t?l.notifyWith(i,n):--a||l.resolveWith(i,n)}};if(r>1)for(t=new Array(r),i=new Array(r),n=new Array(r);s<r;s++)o[s]&&Q.isFunction(o[s].promise)?o[s].promise().done(c(s,n,o)).fail(l.reject).progress(c(s,i,t)):--a;return a||l.resolveWith(n,o),l.promise()}});var pe;Q.fn.ready=function(e){return Q.ready.promise().done(e),this},Q.extend({isReady:!1,readyWait:1,holdReady:function(e){e?Q.readyWait++:Q.ready(!0)},ready:function(e){(!0===e?--Q.readyWait:Q.isReady)||(Q.isReady=!0,!0!==e&&--Q.readyWait>0||(pe.resolveWith(J,[Q]),Q.fn.triggerHandler&&(Q(J).triggerHandler("ready"),Q(J).off("ready"))))}}),Q.ready.promise=function(t){return pe||(pe=Q.Deferred(),"complete"===J.readyState?setTimeout(Q.ready):(J.addEventListener("DOMContentLoaded",r,!1),e.addEventListener("load",r,!1))),pe.promise(t)},Q.ready.promise();var fe=Q.access=function(e,t,i,n,s,o,r){var a=0,l=e.length,c=null==i;if("object"===Q.type(i)){s=!0;for(a in i)Q.access(e,t,a,i[a],!0,o,r)}else if(void 0!==n&&(s=!0,Q.isFunction(n)||(r=!0),c&&(r?(t.call(e,n),t=null):(c=t,t=function(e,t,i){return c.call(Q(e),i)})),t))for(;a<l;a++)t(e[a],i,r?n:n.call(e[a],a,t(e[a],i)));return s?e:c?t.call(e):l?t(e[0],i):o};Q.acceptData=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType},a.uid=1,a.accepts=Q.acceptData,a.prototype={key:function(e){if(!a.accepts(e))return 0;var t={},i=e[this.expando];if(!i){i=a.uid++;try{t[this.expando]={value:i},Object.defineProperties(e,t)}catch(n){t[this.expando]=i,Q.extend(e,t)}}return this.cache[i]||(this.cache[i]={}),i},set:function(e,t,i){var n,s=this.key(e),o=this.cache[s];if("string"==typeof t)o[t]=i;else if(Q.isEmptyObject(o))Q.extend(this.cache[s],t);else for(n in t)o[n]=t[n];return o},get:function(e,t){var i=this.cache[this.key(e)];return void 0===t?i:i[t]},access:function(e,t,i){var n;return void 0===t||t&&"string"==typeof t&&void 0===i?(n=this.get(e,t),void 0!==n?n:this.get(e,Q.camelCase(t))):(this.set(e,t,i),void 0!==i?i:t)},remove:function(e,t){var i,n,s,o=this.key(e),r=this.cache[o];if(void 0===t)this.cache[o]={};else{Q.isArray(t)?n=t.concat(t.map(Q.camelCase)):(s=Q.camelCase(t),t in r?n=[t,s]:(n=s,n=n in r?[n]:n.match(he)||[])),i=n.length;for(;i--;)delete r[n[i]]}},hasData:function(e){return!Q.isEmptyObject(this.cache[e[this.expando]]||{})},discard:function(e){e[this.expando]&&delete this.cache[e[this.expando]]}};var _e=new a,me=new a,ge=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,ve=/([A-Z])/g;Q.extend({hasData:function(e){return me.hasData(e)||_e.hasData(e)},data:function(e,t,i){return me.access(e,t,i)},removeData:function(e,t){me.remove(e,t)},_data:function(e,t,i){return _e.access(e,t,i)},_removeData:function(e,t){_e.remove(e,t)}}),Q.fn.extend({data:function(e,t){var i,n,s,o=this[0],r=o&&o.attributes;if(void 0===e){if(this.length&&(s=me.get(o),1===o.nodeType&&!_e.get(o,"hasDataAttrs"))){for(i=r.length;i--;)r[i]&&(n=r[i].name,0===n.indexOf("data-")&&(n=Q.camelCase(n.slice(5)),l(o,n,s[n])));_e.set(o,"hasDataAttrs",!0)}return s}return"object"==typeof e?this.each(function(){me.set(this,e)}):fe(this,function(t){var i,n=Q.camelCase(e);if(o&&void 0===t){if(void 0!==(i=me.get(o,e)))return i;if(void 0!==(i=me.get(o,n)))return i;if(void 0!==(i=l(o,n,void 0)))return i}else this.each(function(){var i=me.get(this,n);me.set(this,n,t),-1!==e.indexOf("-")&&void 0!==i&&me.set(this,e,t)})},null,t,arguments.length>1,null,!0)},removeData:function(e){return this.each(function(){me.remove(this,e)})}}),Q.extend({queue:function(e,t,i){var n;if(e)return t=(t||"fx")+"queue",n=_e.get(e,t),i&&(!n||Q.isArray(i)?n=_e.access(e,t,Q.makeArray(i)):n.push(i)),n||[]},dequeue:function(e,t){t=t||"fx";var i=Q.queue(e,t),n=i.length,s=i.shift(),o=Q._queueHooks(e,t),r=function(){Q.dequeue(e,t)};"inprogress"===s&&(s=i.shift(),n--),s&&("fx"===t&&i.unshift("inprogress"),delete o.stop,s.call(e,r,o)),!n&&o&&o.empty.fire()},_queueHooks:function(e,t){var i=t+"queueHooks";return _e.get(e,i)||_e.access(e,i,{empty:Q.Callbacks("once memory").add(function(){_e.remove(e,[t+"queue",i])})})}}),Q.fn.extend({queue:function(e,t){var i=2;return"string"!=typeof e&&(t=e,e="fx",i--),arguments.length<i?Q.queue(this[0],e):void 0===t?this:this.each(function(){var i=Q.queue(this,e,t);Q._queueHooks(this,e),"fx"===e&&"inprogress"!==i[0]&&Q.dequeue(this,e)})},dequeue:function(e){return this.each(function(){Q.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var i,n=1,s=Q.Deferred(),o=this,r=this.length,a=function(){--n||s.resolveWith(o,[o])};for("string"!=typeof e&&(t=e,e=void 0),e=e||"fx";r--;)(i=_e.get(o[r],e+"queueHooks"))&&i.empty&&(n++,i.empty.add(a));return a(),s.promise(t)}});var be=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,ye=["Top","Right","Bottom","Left"],Te=function(e,t){return e=t||e,"none"===Q.css(e,"display")||!Q.contains(e.ownerDocument,e)},we=/^(?:checkbox|radio)$/i;!function(){var e=J.createDocumentFragment(),t=e.appendChild(J.createElement("div")),i=J.createElement("input");i.setAttribute("type","radio"),i.setAttribute("checked","checked"),i.setAttribute("name","t"),t.appendChild(i),K.checkClone=t.cloneNode(!0).cloneNode(!0).lastChild.checked,t.innerHTML="<textarea>x</textarea>",K.noCloneChecked=!!t.cloneNode(!0).lastChild.defaultValue}();K.focusinBubbles="onfocusin"in e;var xe=/^key/,Ce=/^(?:mouse|pointer|contextmenu)|click/,Se=/^(?:focusinfocus|focusoutblur)$/,ke=/^([^.]*)(?:\.(.+)|)$/;Q.event={global:{},add:function(e,t,i,n,s){var o,r,a,l,c,u,h,d,p,f,_,m=_e.get(e);if(m)for(i.handler&&(o=i,i=o.handler,s=o.selector),i.guid||(i.guid=Q.guid++),(l=m.events)||(l=m.events={}),(r=m.handle)||(r=m.handle=function(t){return void 0!==Q&&Q.event.triggered!==t.type?Q.event.dispatch.apply(e,arguments):void 0}),t=(t||"").match(he)||[""],c=t.length;c--;)a=ke.exec(t[c])||[],p=_=a[1],f=(a[2]||"").split(".").sort(),p&&(h=Q.event.special[p]||{},p=(s?h.delegateType:h.bindType)||p,h=Q.event.special[p]||{},u=Q.extend({type:p,origType:_,data:n,handler:i,guid:i.guid,selector:s,needsContext:s&&Q.expr.match.needsContext.test(s),namespace:f.join(".")},o),(d=l[p])||(d=l[p]=[],d.delegateCount=0,h.setup&&!1!==h.setup.call(e,n,f,r)||e.addEventListener&&e.addEventListener(p,r,!1)),h.add&&(h.add.call(e,u),u.handler.guid||(u.handler.guid=i.guid)),s?d.splice(d.delegateCount++,0,u):d.push(u),Q.event.global[p]=!0)},remove:function(e,t,i,n,s){var o,r,a,l,c,u,h,d,p,f,_,m=_e.hasData(e)&&_e.get(e);if(m&&(l=m.events)){for(t=(t||"").match(he)||[""],c=t.length;c--;)if(a=ke.exec(t[c])||[],p=_=a[1],f=(a[2]||"").split(".").sort(),p){for(h=Q.event.special[p]||{},p=(n?h.delegateType:h.bindType)||p,d=l[p]||[],a=a[2]&&new RegExp("(^|\\.)"+f.join("\\.(?:.*\\.|)")+"(\\.|$)"),r=o=d.length;o--;)u=d[o],!s&&_!==u.origType||i&&i.guid!==u.guid||a&&!a.test(u.namespace)||n&&n!==u.selector&&("**"!==n||!u.selector)||(d.splice(o,1),u.selector&&d.delegateCount--,h.remove&&h.remove.call(e,u));r&&!d.length&&(h.teardown&&!1!==h.teardown.call(e,f,m.handle)||Q.removeEvent(e,p,m.handle),delete l[p])}else for(p in l)Q.event.remove(e,p+t[c],i,n,!0);Q.isEmptyObject(l)&&(delete m.handle,_e.remove(e,"events"))}},trigger:function(t,i,n,s){var o,r,a,l,c,u,h,d=[n||J],p=X.call(t,"type")?t.type:t,f=X.call(t,"namespace")?t.namespace.split("."):[];if(r=a=n=n||J,3!==n.nodeType&&8!==n.nodeType&&!Se.test(p+Q.event.triggered)&&(p.indexOf(".")>=0&&(f=p.split("."),p=f.shift(),f.sort()),c=p.indexOf(":")<0&&"on"+p,t=t[Q.expando]?t:new Q.Event(p,"object"==typeof t&&t),t.isTrigger=s?2:3,t.namespace=f.join("."),t.namespace_re=t.namespace?new RegExp("(^|\\.)"+f.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=n),i=null==i?[t]:Q.makeArray(i,[t]),h=Q.event.special[p]||{},s||!h.trigger||!1!==h.trigger.apply(n,i))){if(!s&&!h.noBubble&&!Q.isWindow(n)){for(l=h.delegateType||p,Se.test(l+p)||(r=r.parentNode);r;r=r.parentNode)d.push(r),a=r;a===(n.ownerDocument||J)&&d.push(a.defaultView||a.parentWindow||e)}for(o=0;(r=d[o++])&&!t.isPropagationStopped();)t.type=o>1?l:h.bindType||p,u=(_e.get(r,"events")||{})[t.type]&&_e.get(r,"handle"),u&&u.apply(r,i),(u=c&&r[c])&&u.apply&&Q.acceptData(r)&&(t.result=u.apply(r,i),!1===t.result&&t.preventDefault());return t.type=p,s||t.isDefaultPrevented()||h._default&&!1!==h._default.apply(d.pop(),i)||!Q.acceptData(n)||c&&Q.isFunction(n[p])&&!Q.isWindow(n)&&(a=n[c],a&&(n[c]=null),Q.event.triggered=p,n[p](),Q.event.triggered=void 0,a&&(n[c]=a)),t.result}},dispatch:function(e){e=Q.event.fix(e);var t,i,n,s,o,r=[],a=W.call(arguments),l=(_e.get(this,"events")||{})[e.type]||[],c=Q.event.special[e.type]||{};if(a[0]=e,e.delegateTarget=this,!c.preDispatch||!1!==c.preDispatch.call(this,e)){for(r=Q.event.handlers.call(this,e,l),t=0;(s=r[t++])&&!e.isPropagationStopped();)for(e.currentTarget=s.elem,i=0;(o=s.handlers[i++])&&!e.isImmediatePropagationStopped();)e.namespace_re&&!e.namespace_re.test(o.namespace)||(e.handleObj=o,e.data=o.data,void 0!==(n=((Q.event.special[o.origType]||{}).handle||o.handler).apply(s.elem,a))&&!1===(e.result=n)&&(e.preventDefault(),e.stopPropagation()));return c.postDispatch&&c.postDispatch.call(this,e),e.result}},handlers:function(e,t){var i,n,s,o,r=[],a=t.delegateCount,l=e.target;if(a&&l.nodeType&&(!e.button||"click"!==e.type))for(;l!==this;l=l.parentNode||this)if(!0!==l.disabled||"click"!==e.type){for(n=[],i=0;i<a;i++)o=t[i],s=o.selector+" ",void 0===n[s]&&(n[s]=o.needsContext?Q(s,this).index(l)>=0:Q.find(s,this,null,[l]).length),n[s]&&n.push(o);n.length&&r.push({elem:l,handlers:n})}return a<t.length&&r.push({elem:this,handlers:t.slice(a)}),r},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(e,t){return null==e.which&&(e.which=null!=t.charCode?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,t){var i,n,s,o=t.button;return null==e.pageX&&null!=t.clientX&&(i=e.target.ownerDocument||J,n=i.documentElement,s=i.body,e.pageX=t.clientX+(n&&n.scrollLeft||s&&s.scrollLeft||0)-(n&&n.clientLeft||s&&s.clientLeft||0),e.pageY=t.clientY+(n&&n.scrollTop||s&&s.scrollTop||0)-(n&&n.clientTop||s&&s.clientTop||0)),e.which||void 0===o||(e.which=1&o?1:2&o?3:4&o?2:0),e}},fix:function(e){if(e[Q.expando])return e;var t,i,n,s=e.type,o=e,r=this.fixHooks[s];for(r||(this.fixHooks[s]=r=Ce.test(s)?this.mouseHooks:xe.test(s)?this.keyHooks:{}),n=r.props?this.props.concat(r.props):this.props,e=new Q.Event(o),t=n.length;t--;)i=n[t],e[i]=o[i];return e.target||(e.target=J),3===e.target.nodeType&&(e.target=e.target.parentNode),r.filter?r.filter(e,o):e},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==h()&&this.focus)return this.focus(),!1},delegateType:"focusin"},blur:{trigger:function(){if(this===h()&&this.blur)return this.blur(),!1},delegateType:"focusout"},click:{trigger:function(){if("checkbox"===this.type&&this.click&&Q.nodeName(this,"input"))return this.click(),!1},_default:function(e){return Q.nodeName(e.target,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}},simulate:function(e,t,i,n){var s=Q.extend(new Q.Event,i,{type:e,isSimulated:!0,originalEvent:{}});n?Q.event.trigger(s,null,t):Q.event.dispatch.call(t,s),s.isDefaultPrevented()&&i.preventDefault()}},Q.removeEvent=function(e,t,i){e.removeEventListener&&e.removeEventListener(t,i,!1)},Q.Event=function(e,t){if(!(this instanceof Q.Event))return new Q.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&!1===e.returnValue?c:u):this.type=e,t&&Q.extend(this,t),this.timeStamp=e&&e.timeStamp||Q.now(),this[Q.expando]=!0},Q.Event.prototype={isDefaultPrevented:u,isPropagationStopped:u,isImmediatePropagationStopped:u,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=c,e&&e.preventDefault&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=c,e&&e.stopPropagation&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=c,e&&e.stopImmediatePropagation&&e.stopImmediatePropagation(),this.stopPropagation()}},Q.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(e,t){Q.event.special[e]={delegateType:t,bindType:t,handle:function(e){var i,n=this,s=e.relatedTarget,o=e.handleObj;return s&&(s===n||Q.contains(n,s))||(e.type=o.origType,i=o.handler.apply(this,arguments),e.type=t),i}}}),K.focusinBubbles||Q.each({focus:"focusin",blur:"focusout"},function(e,t){var i=function(e){Q.event.simulate(t,e.target,Q.event.fix(e),!0)};Q.event.special[t]={setup:function(){var n=this.ownerDocument||this,s=_e.access(n,t);s||n.addEventListener(e,i,!0),_e.access(n,t,(s||0)+1)},teardown:function(){var n=this.ownerDocument||this,s=_e.access(n,t)-1;s?_e.access(n,t,s):(n.removeEventListener(e,i,!0),_e.remove(n,t))}}}),Q.fn.extend({on:function(e,t,i,n,s){var o,r;if("object"==typeof e){"string"!=typeof t&&(i=i||t,t=void 0);for(r in e)this.on(r,t,i,e[r],s);return this}if(null==i&&null==n?(n=t,i=t=void 0):null==n&&("string"==typeof t?(n=i,i=void 0):(n=i,i=t,t=void 0)),!1===n)n=u;else if(!n)return this;return 1===s&&(o=n,n=function(e){return Q().off(e),o.apply(this,arguments)},n.guid=o.guid||(o.guid=Q.guid++)),this.each(function(){Q.event.add(this,e,n,i,t)})},one:function(e,t,i,n){return this.on(e,t,i,n,1)},off:function(e,t,i){var n,s;if(e&&e.preventDefault&&e.handleObj)return n=e.handleObj,Q(e.delegateTarget).off(n.namespace?n.origType+"."+n.namespace:n.origType,n.selector,n.handler),this;if("object"==typeof e){for(s in e)this.off(s,t,e[s]);return this}return!1!==t&&"function"!=typeof t||(i=t,t=void 0),!1===i&&(i=u),this.each(function(){Q.event.remove(this,e,i,t)})},trigger:function(e,t){return this.each(function(){Q.event.trigger(e,t,this)})},triggerHandler:function(e,t){var i=this[0];if(i)return Q.event.trigger(e,t,i,!0)}});var De=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,Pe=/<([\w:]+)/,Ae=/<|&#?\w+;/,Ie=/<(?:script|style|link)/i,Me=/checked\s*(?:[^=]|=\s*.checked.)/i,Fe=/^$|\/(?:java|ecma)script/i,Ee=/^true\/(.*)/,Oe=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,$e={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};$e.optgroup=$e.option,$e.tbody=$e.tfoot=$e.colgroup=$e.caption=$e.thead,$e.th=$e.td,Q.extend({clone:function(e,t,i){var n,s,o,r,a=e.cloneNode(!0),l=Q.contains(e.ownerDocument,e);if(!(K.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||Q.isXMLDoc(e)))for(r=g(a),o=g(e),n=0,s=o.length;n<s;n++)v(o[n],r[n]);if(t)if(i)for(o=o||g(e),r=r||g(a),n=0,s=o.length;n<s;n++)m(o[n],r[n]);else m(e,a);return r=g(a,"script"),r.length>0&&_(r,!l&&g(e,"script")),a},buildFragment:function(e,t,i,n){for(var s,o,r,a,l,c,u=t.createDocumentFragment(),h=[],d=0,p=e.length;d<p;d++)if((s=e[d])||0===s)if("object"===Q.type(s))Q.merge(h,s.nodeType?[s]:s);else if(Ae.test(s)){for(o=o||u.appendChild(t.createElement("div")),r=(Pe.exec(s)||["",""])[1].toLowerCase(),a=$e[r]||$e._default,o.innerHTML=a[1]+s.replace(De,"<$1></$2>")+a[2],c=a[0];c--;)o=o.lastChild;Q.merge(h,o.childNodes),o=u.firstChild,o.textContent=""}else h.push(t.createTextNode(s));for(u.textContent="",d=0;s=h[d++];)if((!n||-1===Q.inArray(s,n))&&(l=Q.contains(s.ownerDocument,s),o=g(u.appendChild(s),"script"),l&&_(o),i))for(c=0;s=o[c++];)Fe.test(s.type||"")&&i.push(s);return u},cleanData:function(e){for(var t,i,n,s,o=Q.event.special,r=0;void 0!==(i=e[r]);r++){if(Q.acceptData(i)&&(s=i[_e.expando])&&(t=_e.cache[s])){if(t.events)for(n in t.events)o[n]?Q.event.remove(i,n):Q.removeEvent(i,n,t.handle);_e.cache[s]&&delete _e.cache[s]}delete me.cache[i[me.expando]]}}}),Q.fn.extend({text:function(e){return fe(this,function(e){return void 0===e?Q.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)})},null,e,arguments.length)},append:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){d(this,e).appendChild(e)}})},prepend:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=d(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},remove:function(e,t){for(var i,n=e?Q.filter(e,this):this,s=0;null!=(i=n[s]);s++)t||1!==i.nodeType||Q.cleanData(g(i)),i.parentNode&&(t&&Q.contains(i.ownerDocument,i)&&_(g(i,"script")),i.parentNode.removeChild(i));return this},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(Q.cleanData(g(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return Q.clone(this,e,t)})},html:function(e){return fe(this,function(e){var t=this[0]||{},i=0,n=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!Ie.test(e)&&!$e[(Pe.exec(e)||["",""])[1].toLowerCase()]){e=e.replace(De,"<$1></$2>");try{for(;i<n;i++)t=this[i]||{},1===t.nodeType&&(Q.cleanData(g(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=arguments[0];return this.domManip(arguments,function(t){e=this.parentNode,Q.cleanData(g(this)),e&&e.replaceChild(t,this)}),e&&(e.length||e.nodeType)?this:this.remove()},detach:function(e){return this.remove(e,!0)},domManip:function(e,t){e=z.apply([],e);var i,n,s,o,r,a,l=0,c=this.length,u=this,h=c-1,d=e[0],_=Q.isFunction(d);if(_||c>1&&"string"==typeof d&&!K.checkClone&&Me.test(d))return this.each(function(i){var n=u.eq(i);_&&(e[0]=d.call(this,i,n.html())),n.domManip(e,t)});if(c&&(i=Q.buildFragment(e,this[0].ownerDocument,!1,this),n=i.firstChild,1===i.childNodes.length&&(i=n),n)){for(s=Q.map(g(i,"script"),p),o=s.length;l<c;l++)r=i,l!==h&&(r=Q.clone(r,!0,!0),o&&Q.merge(s,g(r,"script"))),t.call(this[l],r,l);if(o)for(a=s[s.length-1].ownerDocument,Q.map(s,f),l=0;l<o;l++)r=s[l],Fe.test(r.type||"")&&!_e.access(r,"globalEval")&&Q.contains(a,r)&&(r.src?Q._evalUrl&&Q._evalUrl(r.src):Q.globalEval(r.textContent.replace(Oe,"")))}return this}}),Q.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){Q.fn[e]=function(e){for(var i,n=[],s=Q(e),o=s.length-1,r=0;r<=o;r++)i=r===o?this:this.clone(!0),Q(s[r])[t](i),U.apply(n,i.get());return this.pushStack(n)}});var He,Ne={},Re=/^margin/,Be=new RegExp("^("+be+")(?!px)[a-z%]+$","i"),Ge=function(t){return t.ownerDocument.defaultView.opener?t.ownerDocument.defaultView.getComputedStyle(t,null):e.getComputedStyle(t,null)};!function(){function t(){r.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:block;margin-top:1%;top:1%;border:1px;padding:1px;width:4px;position:absolute",r.innerHTML="",s.appendChild(o);var t=e.getComputedStyle(r,null);i="1%"!==t.top,n="4px"===t.width,s.removeChild(o)}var i,n,s=J.documentElement,o=J.createElement("div"),r=J.createElement("div");r.style&&(r.style.backgroundClip="content-box",r.cloneNode(!0).style.backgroundClip="",K.clearCloneStyle="content-box"===r.style.backgroundClip,o.style.cssText="border:0;width:0;height:0;top:0;left:-9999px;margin-top:1px;position:absolute",o.appendChild(r),e.getComputedStyle&&Q.extend(K,{pixelPosition:function(){return t(),i},boxSizingReliable:function(){return null==n&&t(),n},reliableMarginRight:function(){var t,i=r.appendChild(J.createElement("div"));return i.style.cssText=r.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",i.style.marginRight=i.style.width="0",r.style.width="1px",s.appendChild(o),t=!parseFloat(e.getComputedStyle(i,null).marginRight),s.removeChild(o),r.removeChild(i),t}}))}(),Q.swap=function(e,t,i,n){var s,o,r={};for(o in t)r[o]=e.style[o],e.style[o]=t[o];s=i.apply(e,n||[]);for(o in t)e.style[o]=r[o];return s};var Le=/^(none|table(?!-c[ea]).+)/,je=new RegExp("^("+be+")(.*)$","i"),We=new RegExp("^([+-])=("+be+")","i"),ze={position:"absolute",visibility:"hidden",display:"block"},Ue={letterSpacing:"0",fontWeight:"400"},Ve=["Webkit","O","Moz","ms"];Q.extend({cssHooks:{opacity:{get:function(e,t){if(t){var i=T(e,"opacity");return""===i?"1":i}}}},cssNumber:{columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{float:"cssFloat"},style:function(e,t,i,n){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var s,o,r,a=Q.camelCase(t),l=e.style;if(t=Q.cssProps[a]||(Q.cssProps[a]=x(l,a)),r=Q.cssHooks[t]||Q.cssHooks[a],void 0===i)return r&&"get"in r&&void 0!==(s=r.get(e,!1,n))?s:l[t];o=typeof i,"string"===o&&(s=We.exec(i))&&(i=(s[1]+1)*s[2]+parseFloat(Q.css(e,t)),o="number"),null!=i&&i===i&&("number"!==o||Q.cssNumber[a]||(i+="px"),K.clearCloneStyle||""!==i||0!==t.indexOf("background")||(l[t]="inherit"),r&&"set"in r&&void 0===(i=r.set(e,i,n))||(l[t]=i))}},css:function(e,t,i,n){var s,o,r,a=Q.camelCase(t);return t=Q.cssProps[a]||(Q.cssProps[a]=x(e.style,a)),r=Q.cssHooks[t]||Q.cssHooks[a],r&&"get"in r&&(s=r.get(e,!0,i)),void 0===s&&(s=T(e,t,n)),"normal"===s&&t in Ue&&(s=Ue[t]),""===i||i?(o=parseFloat(s),!0===i||Q.isNumeric(o)?o||0:s):s}}),Q.each(["height","width"],function(e,t){Q.cssHooks[t]={get:function(e,i,n){if(i)return Le.test(Q.css(e,"display"))&&0===e.offsetWidth?Q.swap(e,ze,function(){return k(e,t,n)}):k(e,t,n)},set:function(e,i,n){var s=n&&Ge(e);return C(e,i,n?S(e,t,n,"border-box"===Q.css(e,"boxSizing",!1,s),s):0)}}}),Q.cssHooks.marginRight=w(K.reliableMarginRight,function(e,t){if(t)return Q.swap(e,{display:"inline-block"},T,[e,"marginRight"])}),Q.each({margin:"",padding:"",border:"Width"},function(e,t){Q.cssHooks[e+t]={expand:function(i){for(var n=0,s={},o="string"==typeof i?i.split(" "):[i];n<4;n++)s[e+ye[n]+t]=o[n]||o[n-2]||o[0];return s}},Re.test(e)||(Q.cssHooks[e+t].set=C)}),Q.fn.extend({css:function(e,t){return fe(this,function(e,t,i){var n,s,o={},r=0;if(Q.isArray(t)){for(n=Ge(e),s=t.length;r<s;r++)o[t[r]]=Q.css(e,t[r],!1,n);return o}return void 0!==i?Q.style(e,t,i):Q.css(e,t)},e,t,arguments.length>1)},show:function(){return D(this,!0)},hide:function(){return D(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){Te(this)?Q(this).show():Q(this).hide()})}}),Q.Tween=P,P.prototype={constructor:P,init:function(e,t,i,n,s,o){this.elem=e,this.prop=i,this.easing=s||"swing",this.options=t,this.start=this.now=this.cur(),this.end=n,this.unit=o||(Q.cssNumber[i]?"":"px")},cur:function(){var e=P.propHooks[this.prop];return e&&e.get?e.get(this):P.propHooks._default.get(this)},run:function(e){var t,i=P.propHooks[this.prop];return this.options.duration?this.pos=t=Q.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),i&&i.set?i.set(this):P.propHooks._default.set(this),this}},P.prototype.init.prototype=P.prototype,P.propHooks={_default:{get:function(e){var t;return null==e.elem[e.prop]||e.elem.style&&null!=e.elem.style[e.prop]?(t=Q.css(e.elem,e.prop,""),t&&"auto"!==t?t:0):e.elem[e.prop]},set:function(e){Q.fx.step[e.prop]?Q.fx.step[e.prop](e):e.elem.style&&(null!=e.elem.style[Q.cssProps[e.prop]]||Q.cssHooks[e.prop])?Q.style(e.elem,e.prop,e.now+e.unit):e.elem[e.prop]=e.now}}},P.propHooks.scrollTop=P.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},Q.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2}},Q.fx=P.prototype.init,Q.fx.step={};var qe,Ye,Xe=/^(?:toggle|show|hide)$/,Ke=new RegExp("^(?:([+-])=|)("+be+")([a-z%]*)$","i"),Je=/queueHooks$/,Qe=[F],Ze={"*":[function(e,t){var i=this.createTween(e,t),n=i.cur(),s=Ke.exec(t),o=s&&s[3]||(Q.cssNumber[e]?"":"px"),r=(Q.cssNumber[e]||"px"!==o&&+n)&&Ke.exec(Q.css(i.elem,e)),a=1,l=20;if(r&&r[3]!==o){o=o||r[3],s=s||[],r=+n||1;do{a=a||".5",r/=a,Q.style(i.elem,e,r+o)}while(a!==(a=i.cur()/n)&&1!==a&&--l)}return s&&(r=i.start=+r||+n||0,i.unit=o,i.end=s[1]?r+(s[1]+1)*s[2]:+s[2]),i}]};Q.Animation=Q.extend(O,{tweener:function(e,t){Q.isFunction(e)?(t=e,e=["*"]):e=e.split(" ");for(var i,n=0,s=e.length;n<s;n++)i=e[n],Ze[i]=Ze[i]||[],Ze[i].unshift(t)},prefilter:function(e,t){t?Qe.unshift(e):Qe.push(e)}}),Q.speed=function(e,t,i){var n=e&&"object"==typeof e?Q.extend({},e):{complete:i||!i&&t||Q.isFunction(e)&&e,duration:e,easing:i&&t||t&&!Q.isFunction(t)&&t};return n.duration=Q.fx.off?0:"number"==typeof n.duration?n.duration:n.duration in Q.fx.speeds?Q.fx.speeds[n.duration]:Q.fx.speeds._default,null!=n.queue&&!0!==n.queue||(n.queue="fx"),n.old=n.complete,n.complete=function(){Q.isFunction(n.old)&&n.old.call(this),n.queue&&Q.dequeue(this,n.queue)},n},Q.fn.extend({fadeTo:function(e,t,i,n){return this.filter(Te).css("opacity",0).show().end().animate({opacity:t},e,i,n)},animate:function(e,t,i,n){var s=Q.isEmptyObject(e),o=Q.speed(t,i,n),r=function(){var t=O(this,Q.extend({},e),o);(s||_e.get(this,"finish"))&&t.stop(!0)};return r.finish=r,s||!1===o.queue?this.each(r):this.queue(o.queue,r)},stop:function(e,t,i){var n=function(e){var t=e.stop;delete e.stop,t(i)};return"string"!=typeof e&&(i=t,t=e,e=void 0),t&&!1!==e&&this.queue(e||"fx",[]),this.each(function(){var t=!0,s=null!=e&&e+"queueHooks",o=Q.timers,r=_e.get(this);if(s)r[s]&&r[s].stop&&n(r[s]);else for(s in r)r[s]&&r[s].stop&&Je.test(s)&&n(r[s]);for(s=o.length;s--;)o[s].elem!==this||null!=e&&o[s].queue!==e||(o[s].anim.stop(i),t=!1,o.splice(s,1));!t&&i||Q.dequeue(this,e)})},finish:function(e){return!1!==e&&(e=e||"fx"),this.each(function(){var t,i=_e.get(this),n=i[e+"queue"],s=i[e+"queueHooks"],o=Q.timers,r=n?n.length:0;for(i.finish=!0,Q.queue(this,e,[]),s&&s.stop&&s.stop.call(this,!0),t=o.length;t--;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1));for(t=0;t<r;t++)n[t]&&n[t].finish&&n[t].finish.call(this);delete i.finish})}}),Q.each(["toggle","show","hide"],function(e,t){var i=Q.fn[t];Q.fn[t]=function(e,n,s){return null==e||"boolean"==typeof e?i.apply(this,arguments):this.animate(I(t,!0),e,n,s)}}),Q.each({slideDown:I("show"),slideUp:I("hide"),slideToggle:I("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){Q.fn[e]=function(e,i,n){return this.animate(t,e,i,n)}}),Q.timers=[],Q.fx.tick=function(){var e,t=0,i=Q.timers;for(qe=Q.now();t<i.length;t++)(e=i[t])()||i[t]!==e||i.splice(t--,1);i.length||Q.fx.stop(),qe=void 0},Q.fx.timer=function(e){Q.timers.push(e),e()?Q.fx.start():Q.timers.pop()},Q.fx.interval=13,Q.fx.start=function(){Ye||(Ye=setInterval(Q.fx.tick,Q.fx.interval))},Q.fx.stop=function(){clearInterval(Ye),Ye=null},Q.fx.speeds={slow:600,fast:200,_default:400},Q.fn.delay=function(e,t){return e=Q.fx?Q.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,i){var n=setTimeout(t,e);i.stop=function(){clearTimeout(n)}})},function(){var e=J.createElement("input"),t=J.createElement("select"),i=t.appendChild(J.createElement("option"));e.type="checkbox",K.checkOn=""!==e.value,K.optSelected=i.selected,t.disabled=!0,K.optDisabled=!i.disabled,e=J.createElement("input"),e.value="t",e.type="radio",K.radioValue="t"===e.value}();var et,tt=Q.expr.attrHandle;Q.fn.extend({attr:function(e,t){return fe(this,Q.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){Q.removeAttr(this,e)})}}),Q.extend({attr:function(e,t,i){var n,s,o=e.nodeType;if(e&&3!==o&&8!==o&&2!==o)return void 0===e.getAttribute?Q.prop(e,t,i):(1===o&&Q.isXMLDoc(e)||(t=t.toLowerCase(),n=Q.attrHooks[t]||(Q.expr.match.bool.test(t)?et:void 0)),void 0===i?n&&"get"in n&&null!==(s=n.get(e,t))?s:(s=Q.find.attr(e,t),null==s?void 0:s):null!==i?n&&"set"in n&&void 0!==(s=n.set(e,i,t))?s:(e.setAttribute(t,i+""),i):void Q.removeAttr(e,t))},removeAttr:function(e,t){var i,n,s=0,o=t&&t.match(he);if(o&&1===e.nodeType)for(;i=o[s++];)n=Q.propFix[i]||i,Q.expr.match.bool.test(i)&&(e[n]=!1),e.removeAttribute(i)},attrHooks:{type:{set:function(e,t){if(!K.radioValue&&"radio"===t&&Q.nodeName(e,"input")){var i=e.value;return e.setAttribute("type",t),i&&(e.value=i),t}}}}}),et={set:function(e,t,i){return!1===t?Q.removeAttr(e,i):e.setAttribute(i,i),i}},Q.each(Q.expr.match.bool.source.match(/\w+/g),function(e,t){var i=tt[t]||Q.find.attr;tt[t]=function(e,t,n){var s,o;return n||(o=tt[t],tt[t]=s,s=null!=i(e,t,n)?t.toLowerCase():null,tt[t]=o),s}});var it=/^(?:input|select|textarea|button)$/i;Q.fn.extend({prop:function(e,t){
return fe(this,Q.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[Q.propFix[e]||e]})}}),Q.extend({propFix:{for:"htmlFor",class:"className"},prop:function(e,t,i){var n,s,o,r=e.nodeType;if(e&&3!==r&&8!==r&&2!==r)return o=1!==r||!Q.isXMLDoc(e),o&&(t=Q.propFix[t]||t,s=Q.propHooks[t]),void 0!==i?s&&"set"in s&&void 0!==(n=s.set(e,i,t))?n:e[t]=i:s&&"get"in s&&null!==(n=s.get(e,t))?n:e[t]},propHooks:{tabIndex:{get:function(e){return e.hasAttribute("tabindex")||it.test(e.nodeName)||e.href?e.tabIndex:-1}}}}),K.optSelected||(Q.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null}}),Q.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){Q.propFix[this.toLowerCase()]=this});var nt=/[\t\r\n\f]/g;Q.fn.extend({addClass:function(e){var t,i,n,s,o,r,a="string"==typeof e&&e,l=0,c=this.length;if(Q.isFunction(e))return this.each(function(t){Q(this).addClass(e.call(this,t,this.className))});if(a)for(t=(e||"").match(he)||[];l<c;l++)if(i=this[l],n=1===i.nodeType&&(i.className?(" "+i.className+" ").replace(nt," "):" ")){for(o=0;s=t[o++];)n.indexOf(" "+s+" ")<0&&(n+=s+" ");r=Q.trim(n),i.className!==r&&(i.className=r)}return this},removeClass:function(e){var t,i,n,s,o,r,a=0===arguments.length||"string"==typeof e&&e,l=0,c=this.length;if(Q.isFunction(e))return this.each(function(t){Q(this).removeClass(e.call(this,t,this.className))});if(a)for(t=(e||"").match(he)||[];l<c;l++)if(i=this[l],n=1===i.nodeType&&(i.className?(" "+i.className+" ").replace(nt," "):"")){for(o=0;s=t[o++];)for(;n.indexOf(" "+s+" ")>=0;)n=n.replace(" "+s+" "," ");r=e?Q.trim(n):"",i.className!==r&&(i.className=r)}return this},toggleClass:function(e,t){var i=typeof e;return"boolean"==typeof t&&"string"===i?t?this.addClass(e):this.removeClass(e):Q.isFunction(e)?this.each(function(i){Q(this).toggleClass(e.call(this,i,this.className,t),t)}):this.each(function(){if("string"===i)for(var t,n=0,s=Q(this),o=e.match(he)||[];t=o[n++];)s.hasClass(t)?s.removeClass(t):s.addClass(t);else"undefined"!==i&&"boolean"!==i||(this.className&&_e.set(this,"__className__",this.className),this.className=this.className||!1===e?"":_e.get(this,"__className__")||"")})},hasClass:function(e){for(var t=" "+e+" ",i=0,n=this.length;i<n;i++)if(1===this[i].nodeType&&(" "+this[i].className+" ").replace(nt," ").indexOf(t)>=0)return!0;return!1}});var st=/\r/g;Q.fn.extend({val:function(e){var t,i,n,s=this[0];{if(arguments.length)return n=Q.isFunction(e),this.each(function(i){var s;1===this.nodeType&&(s=n?e.call(this,i,Q(this).val()):e,null==s?s="":"number"==typeof s?s+="":Q.isArray(s)&&(s=Q.map(s,function(e){return null==e?"":e+""})),(t=Q.valHooks[this.type]||Q.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,s,"value")||(this.value=s))});if(s)return(t=Q.valHooks[s.type]||Q.valHooks[s.nodeName.toLowerCase()])&&"get"in t&&void 0!==(i=t.get(s,"value"))?i:(i=s.value,"string"==typeof i?i.replace(st,""):null==i?"":i)}}}),Q.extend({valHooks:{option:{get:function(e){var t=Q.find.attr(e,"value");return null!=t?t:Q.trim(Q.text(e))}},select:{get:function(e){for(var t,i,n=e.options,s=e.selectedIndex,o="select-one"===e.type||s<0,r=o?null:[],a=o?s+1:n.length,l=s<0?a:o?s:0;l<a;l++)if(i=n[l],(i.selected||l===s)&&(K.optDisabled?!i.disabled:null===i.getAttribute("disabled"))&&(!i.parentNode.disabled||!Q.nodeName(i.parentNode,"optgroup"))){if(t=Q(i).val(),o)return t;r.push(t)}return r},set:function(e,t){for(var i,n,s=e.options,o=Q.makeArray(t),r=s.length;r--;)n=s[r],(n.selected=Q.inArray(n.value,o)>=0)&&(i=!0);return i||(e.selectedIndex=-1),o}}}}),Q.each(["radio","checkbox"],function(){Q.valHooks[this]={set:function(e,t){if(Q.isArray(t))return e.checked=Q.inArray(Q(e).val(),t)>=0}},K.checkOn||(Q.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})}),Q.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(e,t){Q.fn[t]=function(e,i){return arguments.length>0?this.on(t,null,e,i):this.trigger(t)}}),Q.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)},bind:function(e,t,i){return this.on(e,null,t,i)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,i,n){return this.on(t,e,i,n)},undelegate:function(e,t,i){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",i)}});var ot=Q.now(),rt=/\?/;Q.parseJSON=function(e){return JSON.parse(e+"")},Q.parseXML=function(e){var t,i;if(!e||"string"!=typeof e)return null;try{i=new DOMParser,t=i.parseFromString(e,"text/xml")}catch(e){t=void 0}return t&&!t.getElementsByTagName("parsererror").length||Q.error("Invalid XML: "+e),t};var at=/#.*$/,lt=/([?&])_=[^&]*/,ct=/^(.*?):[ \t]*([^\r\n]*)$/gm,ut=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,ht=/^(?:GET|HEAD)$/,dt=/^\/\//,pt=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,ft={},_t={},mt="*/".concat("*"),gt=e.location.href,vt=pt.exec(gt.toLowerCase())||[];Q.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:gt,type:"GET",isLocal:ut.test(vt[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":mt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":Q.parseJSON,"text xml":Q.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?N(N(e,Q.ajaxSettings),t):N(Q.ajaxSettings,e)},ajaxPrefilter:$(ft),ajaxTransport:$(_t),ajax:function(e,t){function i(e,t,i,r){var l,u,g,v,y,w=t;2!==b&&(b=2,a&&clearTimeout(a),n=void 0,o=r||"",T.readyState=e>0?4:0,l=e>=200&&e<300||304===e,i&&(v=R(h,T,i)),v=B(h,v,T,l),l?(h.ifModified&&(y=T.getResponseHeader("Last-Modified"),y&&(Q.lastModified[s]=y),(y=T.getResponseHeader("etag"))&&(Q.etag[s]=y)),204===e||"HEAD"===h.type?w="nocontent":304===e?w="notmodified":(w=v.state,u=v.data,g=v.error,l=!g)):(g=w,!e&&w||(w="error",e<0&&(e=0))),T.status=e,T.statusText=(t||w)+"",l?f.resolveWith(d,[u,w,T]):f.rejectWith(d,[T,w,g]),T.statusCode(m),m=void 0,c&&p.trigger(l?"ajaxSuccess":"ajaxError",[T,h,l?u:g]),_.fireWith(d,[T,w]),c&&(p.trigger("ajaxComplete",[T,h]),--Q.active||Q.event.trigger("ajaxStop")))}"object"==typeof e&&(t=e,e=void 0),t=t||{};var n,s,o,r,a,l,c,u,h=Q.ajaxSetup({},t),d=h.context||h,p=h.context&&(d.nodeType||d.jquery)?Q(d):Q.event,f=Q.Deferred(),_=Q.Callbacks("once memory"),m=h.statusCode||{},g={},v={},b=0,y="canceled",T={readyState:0,getResponseHeader:function(e){var t;if(2===b){if(!r)for(r={};t=ct.exec(o);)r[t[1].toLowerCase()]=t[2];t=r[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===b?o:null},setRequestHeader:function(e,t){var i=e.toLowerCase();return b||(e=v[i]=v[i]||e,g[e]=t),this},overrideMimeType:function(e){return b||(h.mimeType=e),this},statusCode:function(e){var t;if(e)if(b<2)for(t in e)m[t]=[m[t],e[t]];else T.always(e[T.status]);return this},abort:function(e){var t=e||y;return n&&n.abort(t),i(0,t),this}};if(f.promise(T).complete=_.add,T.success=T.done,T.error=T.fail,h.url=((e||h.url||gt)+"").replace(at,"").replace(dt,vt[1]+"//"),h.type=t.method||t.type||h.method||h.type,h.dataTypes=Q.trim(h.dataType||"*").toLowerCase().match(he)||[""],null==h.crossDomain&&(l=pt.exec(h.url.toLowerCase()),h.crossDomain=!(!l||l[1]===vt[1]&&l[2]===vt[2]&&(l[3]||("http:"===l[1]?"80":"443"))===(vt[3]||("http:"===vt[1]?"80":"443")))),h.data&&h.processData&&"string"!=typeof h.data&&(h.data=Q.param(h.data,h.traditional)),H(ft,h,t,T),2===b)return T;c=Q.event&&h.global,c&&0==Q.active++&&Q.event.trigger("ajaxStart"),h.type=h.type.toUpperCase(),h.hasContent=!ht.test(h.type),s=h.url,h.hasContent||(h.data&&(s=h.url+=(rt.test(s)?"&":"?")+h.data,delete h.data),!1===h.cache&&(h.url=lt.test(s)?s.replace(lt,"$1_="+ot++):s+(rt.test(s)?"&":"?")+"_="+ot++)),h.ifModified&&(Q.lastModified[s]&&T.setRequestHeader("If-Modified-Since",Q.lastModified[s]),Q.etag[s]&&T.setRequestHeader("If-None-Match",Q.etag[s])),(h.data&&h.hasContent&&!1!==h.contentType||t.contentType)&&T.setRequestHeader("Content-Type",h.contentType),T.setRequestHeader("Accept",h.dataTypes[0]&&h.accepts[h.dataTypes[0]]?h.accepts[h.dataTypes[0]]+("*"!==h.dataTypes[0]?", "+mt+"; q=0.01":""):h.accepts["*"]);for(u in h.headers)T.setRequestHeader(u,h.headers[u]);if(h.beforeSend&&(!1===h.beforeSend.call(d,T,h)||2===b))return T.abort();y="abort";for(u in{success:1,error:1,complete:1})T[u](h[u]);if(n=H(_t,h,t,T)){T.readyState=1,c&&p.trigger("ajaxSend",[T,h]),h.async&&h.timeout>0&&(a=setTimeout(function(){T.abort("timeout")},h.timeout));try{b=1,n.send(g,i)}catch(e){if(!(b<2))throw e;i(-1,e)}}else i(-1,"No Transport");return T},getJSON:function(e,t,i){return Q.get(e,t,i,"json")},getScript:function(e,t){return Q.get(e,void 0,t,"script")}}),Q.each(["get","post"],function(e,t){Q[t]=function(e,i,n,s){return Q.isFunction(i)&&(s=s||n,n=i,i=void 0),Q.ajax({url:e,type:t,dataType:s,data:i,success:n})}}),Q._evalUrl=function(e){return Q.ajax({url:e,type:"GET",dataType:"script",async:!1,global:!1,throws:!0})},Q.fn.extend({wrapAll:function(e){var t;return Q.isFunction(e)?this.each(function(t){Q(this).wrapAll(e.call(this,t))}):(this[0]&&(t=Q(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e}).append(this)),this)},wrapInner:function(e){return Q.isFunction(e)?this.each(function(t){Q(this).wrapInner(e.call(this,t))}):this.each(function(){var t=Q(this),i=t.contents();i.length?i.wrapAll(e):t.append(e)})},wrap:function(e){var t=Q.isFunction(e);return this.each(function(i){Q(this).wrapAll(t?e.call(this,i):e)})},unwrap:function(){return this.parent().each(function(){Q.nodeName(this,"body")||Q(this).replaceWith(this.childNodes)}).end()}}),Q.expr.filters.hidden=function(e){return e.offsetWidth<=0&&e.offsetHeight<=0},Q.expr.filters.visible=function(e){return!Q.expr.filters.hidden(e)};var bt=/%20/g,yt=/\[\]$/,Tt=/\r?\n/g,wt=/^(?:submit|button|image|reset|file)$/i,xt=/^(?:input|select|textarea|keygen)/i;Q.param=function(e,t){var i,n=[],s=function(e,t){t=Q.isFunction(t)?t():null==t?"":t,n[n.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(void 0===t&&(t=Q.ajaxSettings&&Q.ajaxSettings.traditional),Q.isArray(e)||e.jquery&&!Q.isPlainObject(e))Q.each(e,function(){s(this.name,this.value)});else for(i in e)G(i,e[i],t,s);return n.join("&").replace(bt,"+")},Q.fn.extend({serialize:function(){return Q.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=Q.prop(this,"elements");return e?Q.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!Q(this).is(":disabled")&&xt.test(this.nodeName)&&!wt.test(e)&&(this.checked||!we.test(e))}).map(function(e,t){var i=Q(this).val();return null==i?null:Q.isArray(i)?Q.map(i,function(e){return{name:t.name,value:e.replace(Tt,"\r\n")}}):{name:t.name,value:i.replace(Tt,"\r\n")}}).get()}}),Q.ajaxSettings.xhr=function(){try{return new XMLHttpRequest}catch(e){}};var Ct=0,St={},kt={0:200,1223:204},Dt=Q.ajaxSettings.xhr();e.attachEvent&&e.attachEvent("onunload",function(){for(var e in St)St[e]()}),K.cors=!!Dt&&"withCredentials"in Dt,K.ajax=Dt=!!Dt,Q.ajaxTransport(function(e){var t;if(K.cors||Dt&&!e.crossDomain)return{send:function(i,n){var s,o=e.xhr(),r=++Ct;if(o.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(s in e.xhrFields)o[s]=e.xhrFields[s];e.mimeType&&o.overrideMimeType&&o.overrideMimeType(e.mimeType),e.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest");for(s in i)o.setRequestHeader(s,i[s]);t=function(e){return function(){t&&(delete St[r],t=o.onload=o.onerror=null,"abort"===e?o.abort():"error"===e?n(o.status,o.statusText):n(kt[o.status]||o.status,o.statusText,"string"==typeof o.responseText?{text:o.responseText}:void 0,o.getAllResponseHeaders()))}},o.onload=t(),o.onerror=t("error"),t=St[r]=t("abort");try{o.send(e.hasContent&&e.data||null)}catch(e){if(t)throw e}},abort:function(){t&&t()}}}),Q.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(e){return Q.globalEval(e),e}}}),Q.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),Q.ajaxTransport("script",function(e){if(e.crossDomain){var t,i;return{send:function(n,s){t=Q("<script>").prop({async:!0,charset:e.scriptCharset,src:e.url}).on("load error",i=function(e){t.remove(),i=null,e&&s("error"===e.type?404:200,e.type)}),J.head.appendChild(t[0])},abort:function(){i&&i()}}}});var Pt=[],At=/(=)\?(?=&|$)|\?\?/;Q.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Pt.pop()||Q.expando+"_"+ot++;return this[e]=!0,e}}),Q.ajaxPrefilter("json jsonp",function(t,i,n){var s,o,r,a=!1!==t.jsonp&&(At.test(t.url)?"url":"string"==typeof t.data&&!(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&At.test(t.data)&&"data");if(a||"jsonp"===t.dataTypes[0])return s=t.jsonpCallback=Q.isFunction(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,a?t[a]=t[a].replace(At,"$1"+s):!1!==t.jsonp&&(t.url+=(rt.test(t.url)?"&":"?")+t.jsonp+"="+s),t.converters["script json"]=function(){return r||Q.error(s+" was not called"),r[0]},t.dataTypes[0]="json",o=e[s],e[s]=function(){r=arguments},n.always(function(){e[s]=o,t[s]&&(t.jsonpCallback=i.jsonpCallback,Pt.push(s)),r&&Q.isFunction(o)&&o(r[0]),r=o=void 0}),"script"}),Q.parseHTML=function(e,t,i){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(i=t,t=!1),t=t||J;var n=oe.exec(e),s=!i&&[];return n?[t.createElement(n[1])]:(n=Q.buildFragment([e],t,s),s&&s.length&&Q(s).remove(),Q.merge([],n.childNodes))};var It=Q.fn.load;Q.fn.load=function(e,t,i){if("string"!=typeof e&&It)return It.apply(this,arguments);var n,s,o,r=this,a=e.indexOf(" ");return a>=0&&(n=Q.trim(e.slice(a)),e=e.slice(0,a)),Q.isFunction(t)?(i=t,t=void 0):t&&"object"==typeof t&&(s="POST"),r.length>0&&Q.ajax({url:e,type:s,dataType:"html",data:t}).done(function(e){o=arguments,r.html(n?Q("<div>").append(Q.parseHTML(e)).find(n):e)}).complete(i&&function(e,t){r.each(i,o||[e.responseText,t,e])}),this},Q.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){Q.fn[t]=function(e){return this.on(t,e)}}),Q.expr.filters.animated=function(e){return Q.grep(Q.timers,function(t){return e===t.elem}).length};var Mt=e.document.documentElement;Q.offset={setOffset:function(e,t,i){var n,s,o,r,a,l,c,u=Q.css(e,"position"),h=Q(e),d={};"static"===u&&(e.style.position="relative"),a=h.offset(),o=Q.css(e,"top"),l=Q.css(e,"left"),c=("absolute"===u||"fixed"===u)&&(o+l).indexOf("auto")>-1,c?(n=h.position(),r=n.top,s=n.left):(r=parseFloat(o)||0,s=parseFloat(l)||0),Q.isFunction(t)&&(t=t.call(e,i,a)),null!=t.top&&(d.top=t.top-a.top+r),null!=t.left&&(d.left=t.left-a.left+s),"using"in t?t.using.call(e,d):h.css(d)}},Q.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each(function(t){Q.offset.setOffset(this,e,t)});var t,i,n=this[0],s={top:0,left:0},o=n&&n.ownerDocument;if(o)return t=o.documentElement,Q.contains(t,n)?(void 0!==n.getBoundingClientRect&&(s=n.getBoundingClientRect()),i=L(o),{top:s.top+i.pageYOffset-t.clientTop,left:s.left+i.pageXOffset-t.clientLeft}):s},position:function(){if(this[0]){var e,t,i=this[0],n={top:0,left:0};return"fixed"===Q.css(i,"position")?t=i.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),Q.nodeName(e[0],"html")||(n=e.offset()),n.top+=Q.css(e[0],"borderTopWidth",!0),n.left+=Q.css(e[0],"borderLeftWidth",!0)),{top:t.top-n.top-Q.css(i,"marginTop",!0),left:t.left-n.left-Q.css(i,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent||Mt;e&&!Q.nodeName(e,"html")&&"static"===Q.css(e,"position");)e=e.offsetParent;return e||Mt})}}),Q.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var n="pageYOffset"===i;Q.fn[t]=function(s){return fe(this,function(t,s,o){var r=L(t);if(void 0===o)return r?r[i]:t[s];r?r.scrollTo(n?e.pageXOffset:o,n?o:e.pageYOffset):t[s]=o},t,s,arguments.length,null)}}),Q.each(["top","left"],function(e,t){Q.cssHooks[t]=w(K.pixelPosition,function(e,i){if(i)return i=T(e,t),Be.test(i)?Q(e).position()[t]+"px":i})}),Q.each({Height:"height",Width:"width"},function(e,t){Q.each({padding:"inner"+e,content:t,"":"outer"+e},function(i,n){Q.fn[n]=function(n,s){var o=arguments.length&&(i||"boolean"!=typeof n),r=i||(!0===n||!0===s?"margin":"border");return fe(this,function(t,i,n){var s;return Q.isWindow(t)?t.document.documentElement["client"+e]:9===t.nodeType?(s=t.documentElement,Math.max(t.body["scroll"+e],s["scroll"+e],t.body["offset"+e],s["offset"+e],s["client"+e])):void 0===n?Q.css(t,i,r):Q.style(t,i,n,r)},t,o?n:void 0,o,null)}})}),Q.fn.size=function(){return this.length},Q.fn.andSelf=Q.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return Q});var Ft=e.jQuery,Et=e.$;return Q.noConflict=function(t){return e.$===Q&&(e.$=Et),t&&e.jQuery===Q&&(e.jQuery=Ft),Q},void 0===t&&(e.jQuery=e.$=Q),Q}),define("js/vm/Common/Cache/Storage",[],function(){function e(){}return e.prototype.storage=null,e.prototype.set=function(e,t){this.storage[e]=t},e.prototype.get=function(e,t){return this.storage[e]?this.storage[e]:t},e.prototype.has=function(e){return void 0!==this.storage[e]},e.prototype.all=function(){return this.storage},e.TYPE_JS="js",e}),function(e){"undefined"!=typeof define?define("js/lib/polyfills/fetch.min",e):e()}(function(){return!function(e){"use strict";function t(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function i(e){return"string"!=typeof e&&(e=String(e)),e}function n(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return p.iterable&&(t[Symbol.iterator]=function(){return t}),t}function s(e){this.map={},e instanceof s?e.forEach(function(e,t){this.append(t,e)},this):Array.isArray(e)?e.forEach(function(e){this.append(e[0],e[1])},this):e&&Object.getOwnPropertyNames(e).forEach(function(t){this.append(t,e[t])},this)}function o(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function r(e){return new Promise(function(t,i){e.onload=function(){t(e.result)},e.onerror=function(){i(e.error)}})}function a(e){var t=new FileReader,i=r(t);return t.readAsArrayBuffer(e),i}function l(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function c(){return this.bodyUsed=!1,this._initBody=function(e){if(this._bodyInit=e)if("string"==typeof e)this._bodyText=e;else if(p.blob&&Blob.prototype.isPrototypeOf(e))this._bodyBlob=e;else if(p.formData&&FormData.prototype.isPrototypeOf(e))this._bodyFormData=e;else if(p.searchParams&&URLSearchParams.prototype.isPrototypeOf(e))this._bodyText=e.toString();else if(p.arrayBuffer&&p.blob&&_(e))this._bodyArrayBuffer=l(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer]);else{if(!p.arrayBuffer||!ArrayBuffer.prototype.isPrototypeOf(e)&&!m(e))throw new Error("unsupported BodyInit type");this._bodyArrayBuffer=l(e)}else this._bodyText="";this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):p.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},p.blob&&(this.blob=function(){var e=o(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?o(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(a)}),this.text=function(){var e,t,i,n=o(this);if(n)return n;if(this._bodyBlob)return e=this._bodyBlob,t=new FileReader,i=r(t),t.readAsText(e),i;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),i=new Array(t.length),n=0;n<t.length;n++)i[n]=String.fromCharCode(t[n]);return i.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},p.formData&&(this.formData=function(){return this.text().then(h)}),this.json=function(){return this.text().then(JSON.parse)},this}function u(e,t){var i,n,o=(t=t||{}).body;if(e instanceof u){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new s(e.headers)),this.method=e.method,this.mode=e.mode,o||null==e._bodyInit||(o=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"omit",!t.headers&&this.headers||(this.headers=new s(t.headers)),this.method=(i=t.method||this.method||"GET",n=i.toUpperCase(),-1<g.indexOf(n)?n:i),this.mode=t.mode||this.mode||null,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&o)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(o)}function h(e){var t=new FormData;return e.trim().split("&").forEach(function(e){if(e){var i=e.split("="),n=i.shift().replace(/\+/g," "),s=i.join("=").replace(/\+/g," ");t.append(decodeURIComponent(n),decodeURIComponent(s))}}),t}function d(e,t){t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=200<=this.status&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new s(t.headers),this.url=t.url||"",this._initBody(e)}if(!e.fetch){var p={searchParams:"URLSearchParams"in e,iterable:"Symbol"in e&&"iterator"in Symbol,blob:"FileReader"in e&&"Blob"in e&&function(){try{return new Blob,!0}catch(e){return!1}}(),formData:"FormData"in e,arrayBuffer:"ArrayBuffer"in e};if(p.arrayBuffer)var f=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],_=function(e){return e&&DataView.prototype.isPrototypeOf(e)},m=ArrayBuffer.isView||function(e){return e&&-1<f.indexOf(Object.prototype.toString.call(e))};s.prototype.append=function(e,n){e=t(e),n=i(n);var s=this.map[e];this.map[e]=s?s+","+n:n},s.prototype.delete=function(e){delete this.map[t(e)]},s.prototype.get=function(e){return e=t(e),this.has(e)?this.map[e]:null},s.prototype.has=function(e){return this.map.hasOwnProperty(t(e))},s.prototype.set=function(e,n){this.map[t(e)]=i(n)},s.prototype.forEach=function(e,t){for(var i in this.map)this.map.hasOwnProperty(i)&&e.call(t,this.map[i],i,this)},s.prototype.keys=function(){var e=[];return this.forEach(function(t,i){e.push(i)}),n(e)},s.prototype.values=function(){var e=[];return this.forEach(function(t){e.push(t)}),n(e)},s.prototype.entries=function(){var e=[];return this.forEach(function(t,i){e.push([i,t])}),n(e)},p.iterable&&(s.prototype[Symbol.iterator]=s.prototype.entries);var g=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];u.prototype.clone=function(){return new u(this,{body:this._bodyInit})},c.call(u.prototype),c.call(d.prototype),d.prototype.clone=function(){return new d(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new s(this.headers),url:this.url})},d.error=function(){var e=new d(null,{status:0,statusText:""});return e.type="error",e};var v=[301,302,303,307,308];d.redirect=function(e,t){if(-1===v.indexOf(t))throw new RangeError("Invalid status code");return new d(null,{status:t,headers:{location:e}})},e.Headers=s,e.Request=u,e.Response=d,e.fetch=function(e,t){return new Promise(function(i,n){var o=new u(e,t),r=new XMLHttpRequest;r.onload=function(){var e,t,n={status:r.status,statusText:r.statusText,headers:(e=r.getAllResponseHeaders()||"",t=new s,e.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach(function(e){var i=e.split(":"),n=i.shift().trim();if(n){var s=i.join(":").trim();t.append(n,s)}}),t)};n.url="responseURL"in r?r.responseURL:n.headers.get("X-Request-URL");var o="response"in r?r.response:r.responseText;i(new d(o,n))},r.onerror=function(){n(new TypeError("Network request failed"))},r.ontimeout=function(){n(new TypeError("Network request failed"))},r.open(o.method,o.url,!0),"include"===o.credentials?r.withCredentials=!0:"omit"===o.credentials&&(r.withCredentials=!1),"responseType"in r&&p.blob&&(r.responseType="blob"),o.headers.forEach(function(e,t){r.setRequestHeader(t,e)}),r.send(void 0===o._bodyInit?null:o._bodyInit)})},e.fetch.polyfill=!0}}("undefined"!=typeof self?self:this)}),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t():"function"==typeof define&&define.amd?define("js/lib/polyfills/promise.min",t):t()}(0,function(){"use strict";function e(){}function t(e){if(!(this instanceof t))throw new TypeError("Promises must be constructed via new");if("function"!=typeof e)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],r(e,this)}function i(e,i){for(;3===e._state;)e=e._value;0!==e._state?(e._handled=!0,t._immediateFn(function(){var t=1===e._state?i.onFulfilled:i.onRejected;if(null!==t){var o;try{o=t(e._value)}catch(e){return void s(i.promise,e)}n(i.promise,o)}else(1===e._state?n:s)(i.promise,e._value)})):e._deferreds.push(i)}function n(e,i){try{if(i===e)throw new TypeError("A promise cannot be resolved with itself.");if(i&&("object"==typeof i||"function"==typeof i)){var n=i.then;if(i instanceof t)return e._state=3,e._value=i,void o(e);if("function"==typeof n)return void r(function(e,t){return function(){e.apply(t,arguments)}}(n,i),e)}e._state=1,e._value=i,o(e)}catch(t){s(e,t)}}function s(e,t){e._state=2,e._value=t,o(e)}function o(e){2===e._state&&0===e._deferreds.length&&t._immediateFn(function(){e._handled||t._unhandledRejectionFn(e._value)});for(var n=0,s=e._deferreds.length;s>n;n++)i(e,e._deferreds[n]);e._deferreds=null}function r(e,t){var i=!1;try{e(function(e){i||(i=!0,n(t,e))},function(e){i||(i=!0,s(t,e))})}catch(e){if(i)return;i=!0,s(t,e)}}var a=setTimeout;t.prototype.catch=function(e){return this.then(null,e)},t.prototype.then=function(t,n){var s=new this.constructor(e);return i(this,new function(e,t,i){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof t?t:null,this.promise=i}(t,n,s)),s},t.prototype.finally=function(e){var t=this.constructor;return this.then(function(i){return t.resolve(e()).then(function(){return i})},function(i){return t.resolve(e()).then(function(){return t.reject(i)})})},t.all=function(e){return new t(function(t,i){function n(e,r){try{if(r&&("object"==typeof r||"function"==typeof r)){var a=r.then;if("function"==typeof a)return void a.call(r,function(t){n(e,t)},i)}s[e]=r,0==--o&&t(s)}catch(e){i(e)}}if(!e||void 0===e.length)throw new TypeError("Promise.all accepts an array");var s=Array.prototype.slice.call(e);if(0===s.length)return t([]);for(var o=s.length,r=0;s.length>r;r++)n(r,s[r])})},t.resolve=function(e){return e&&"object"==typeof e&&e.constructor===t?e:new t(function(t){t(e)})},t.reject=function(e){return new t(function(t,i){i(e)})},t.race=function(e){return new t(function(t,i){for(var n=0,s=e.length;s>n;n++)e[n].then(t,i)})},t._immediateFn="function"==typeof setImmediate&&function(e){setImmediate(e)}||function(e){a(e,0)},t._unhandledRejectionFn=function(e){void 0!==console&&console&&console.warn("Possible Unhandled Promise Rejection:",e)};var l=function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if("undefined"!=typeof global)return global;throw Error("unable to locate global object")}();l.Promise||(l.Promise=t)}),define("js/vm/polyfills",["js/lib/polyfills/fetch.min","js/lib/polyfills/promise.min"],function(){return function(){Array.prototype.find||(Array.prototype.find=function(e){if(null==this)throw new TypeError("Array.prototype.find called on null or undefined");if("function"!=typeof e)throw new TypeError("predicate must be a function");for(var t,i=Object(this),n=i.length>>>0,s=arguments[1],o=0;o<n;o++)if(t=i[o],e.call(s,t,o,i))return t}),"function"!=typeof Object.create&&(Object.create=function(){function e(){}var t=Object.prototype.hasOwnProperty;return function(i){if("object"!=typeof i)throw TypeError("Object prototype may only be an Object or null");e.prototype=i;var n=new e;if(e.prototype=null,arguments.length>1){var s=Object(arguments[1]);for(var o in s)t.call(s,o)&&(n[o]=s[o])}return n}}())}()}),define("js/vm/helpers",["js/vm/polyfills"],function(){return{language:"en",ageMin:0,ageMax:17,extendModel:function(e,t){for(var i=0;i<t.length;i++)for(var n in t[i].prototype)e.prototype[n]=t[i].prototype[n];e.prototype.constructor=e},cloneObject:function(e){var t,i;if("object"!=typeof e||null==e||void 0===e)return e;if(e instanceof Array)for(t=[],i=0;i<e.length;i++)t.push(this.cloneObject(e[i]));else{t={};for(i in e)e.hasOwnProperty(i)&&(t[i]=this.cloneObject(e[i]))}return t},smartJoin:function(e,t,i){var n=e.slice(0),s="";return n.length>1&&(s=i+n.pop()),n.join(t)+s},intersectArrays:function(){for(var e,t=0;t<arguments.length;t++)e=arguments[t].filter(function(t){return void 0===e||e.indexOf(t)>=0});return void 0===e&&(e=[]),e},getNumeral:function(e,t,i,n){if(0==(e=parseInt(e,10)))return n;if("ua"===this.language||"ru"===this.language){if(e%10==1&&1!==Math.floor(e/10))return t;if(e%10>0&&e%10<=4&&1!==Math.floor(e/10))return i}else{if(1===e)return t;if(e<=4)return i}return n},getFlightsRouteURLAdder:function(e,t){function i(e){return("object"==typeof e?e.getISODate():e.substr(0,10)).replace(/-/g,"")}var n,s,o="";if(!t||!t.segments)return o;if("results"===e&&2===t.segments.length&&t.segments[0].arrival.IATA===t.segments[1].departure.IATA&&t.segments[1].arrival.IATA===t.segments[0].departure.IATA&&t.segments[0].arrival.isCity===t.segments[1].departure.isCity&&t.segments[1].arrival.isCity===t.segments[0].departure.isCity)n=t.segments[0].departure,o+=(n.isCity?"c":"a")+n.IATA,n=t.segments[0].arrival,o+=(n.isCity?"c":"a")+n.IATA,o+=i(t.segments[0].departureDate),o+=i(t.segments[1].departureDate);else for(s=0;s<t.segments.length;s++)n=t.segments[s].departure,o+=("results"===e?n.isCity?"c":"a":"")+n.IATA,n=t.segments[s].arrival,o+=("results"===e?n.isCity?"c":"a":"")+n.IATA,o+=i(t.segments[s].departureDate);if(t.passengers instanceof Array)for(s=0;s<t.passengers.length;s++)t.passengers[s].count>0&&(o+=t.passengers[s].type+t.passengers[s].count);else for(s in t.passengers)t.passengers.hasOwnProperty(s)&&t.passengers[s]>0&&(o+=s.toUpperCase()+t.passengers[s]);return o+="-class="+(void 0!==t.serviceClass?t.serviceClass:t.summary.serviceClass),t.direct&&(o+="-direct"),t.vicinityDates>0&&(o+="-vicinityDates"+("results"===e?"="+t.vicinityDates:"")),o},time:function(){return Math.floor(Date.now()/1e3)},getTimeFromCommonDate:function(e){return e&&e.hasOwnProperty("dateObject")?(e.dateObject().setHours(0,0,0,0),e.dateObject().getTime()):null},highlight:function(e,t){return e.replace(new RegExp("("+t+")","i"),'<span class="nemo-ui-autocomplete__match">$1</span>')},getAges:function(){for(var e=[],t=this.ageMin;t<=this.ageMax;t++)e.push(t);return e},getAgesCount:function(){return this.ageMax-this.ageMin+1},iterateObject:function(e,t){if("object"==typeof e&&Array.isArray(e)&&e.length>0)throw new TypeError("Pass object instead of array");for(var i in e)if(e.hasOwnProperty(i)){var n=t(e[i],i);if(!0===n)break}},
objectFilter:function(e,t){var i=[];for(var n in e)e.hasOwnProperty(n)&&t(e[n],n,e)&&i.push(e[n]);return i},ISODateString:function(e){function t(e){return e<10?"0"+e:e}return e.getUTCFullYear()+"-"+t(e.getUTCMonth()+1)+"-"+t(e.getUTCDate())+"T"+t(e.getUTCHours())+":"+t(e.getUTCMinutes())+":"+t(e.getUTCSeconds())},calculateDistanceBetweenTwoCoordinates:function(e,t){var i=function(e){return e*(Math.PI/180)},n=function(e){return Math.cos(i(e))},s=i(t.lat-e.lat),o=i(t.lng-e.lng),r=Math.sin(s/2),a=Math.sin(o/2),l=r*r+n(e.lat)*n(t.lat)*a*a;return 2*Math.atan2(Math.sqrt(l),Math.sqrt(1-l))*6371},sortArrayOfObjectsByProperty:function(e,t,i){var n=this,s=e.splice(0);return i=void 0===i?"ASC":i,s.sort(function(e,s){var o=n.objectGet(e,t),r=n.objectGet(s,t),a="function"==typeof o?o():o,l="function"==typeof r?r():r;return a<l?"ASC"===i?-1:1:a>l?"ASC"===i?1:-1:0}),s},objectGet:function(e,t,i){var n=t.split("."),s=e;return n.forEach(function(e){s=s[e]}),void 0===s?i:s},toArray:function(e){var t=[];for(var i in e)e.hasOwnProperty(i)&&t.push(e[i]);return t},createArray:function(e){for(var t=[],i=0;i<e;i++)t.push(void 0);return t},toMoney:function(e){return"number"==typeof e&&(e=Math.round(e).toString()),e.replace(/(\d)(?=(\d\d\d)+([^\d]|$))/g,"$1 ")},convertMoney:function(e,t,i,n){var s,o={};if(n.forEach(function(e){o[e.currency]=e,1===e.rate&&(s=e)}),void 0===s)return 0;var r=o[t],a=o[i];if(void 0===r||void 0===a)return 0;var l=r===s?e:e/r.rate;return l*=a.rate},arrayFirst:function(e,t){return e.filter(function(e){return t(e)})[0]},findObjectInArrayByProperty:function(e,t,i){var n=JSON.parse(JSON.stringify(e)),s=n.filter(function(e){return e[t]===i});return s[0]?s[0]:null},scroll:function(e,t){t=t||200,$("html, body").stop(!0).animate({scrollTop:e},t)},stringIsDate:function(e){if(8===e.length){var t=parseInt(e.substr(0,4)),i=parseInt(e.substr(4,2)),n=parseInt(e.substr(6,2));return t>=(new Date).getFullYear()&&i>=1&&i<=12&&n>=1&&n<=31}return!1}}}),define("js/vm/Common/Cache/__cache",[],function(){var e={};return e["469c3b9015794947c710c809c7001d0b"]='<div class="mapItem" id="infoWindowContent">\n    <div class="hotel">\n\n        <div class="header">\n            <div class="title">\n                <a class="text" href="#" data-bind="text: $data.name, click: function ($data, event) { event.preventDefault(); $parent.bigMapIsVisible(false); $parent.showCardHotel($data) }"></a>\n                <div class="stars">\n                    \x3c!-- ko foreach: $data.staticDataInfo.starRating --\x3e\n                    <div class="item"></div>\n                    \x3c!-- /ko --\x3e\n                </div>\n            </div>\n            <div class="additional" data-bind="i18n: \'HotelsSearchResults.header-flag__best_price\'"></div>\n        </div>\n\n        <div class="content">\n            <div class="mainInfo">\n                <div class="photoWrap" data-bind="style: {\'backgroundImage\': $parent.getHotelMainImage($data, 1) }, click: function ($data, event) { event.preventDefault(); $parent.bigMapIsVisible(false); $parent.showCardHotel($data) }"></div>\n                \n                \x3c!-- ko if: $data.staticDataInfo.averageCustomerRating --\x3e\n                    <div class="rating">\n                        <span class="number" data-bind="text: $data.staticDataInfo.averageCustomerRating ? $data.staticDataInfo.averageCustomerRating.value : 0"></span>\n                        <span class="text" data-bind="html: $data.staticDataInfo.averageCustomerRating ? $data.staticDataInfo.averageCustomerRating.description : $root.i18n(\'Hotels\', \'hotels-info-noReviews\')"></span>\n                    </div>\n                \x3c!-- /ko --\x3e\n                \n                <div class="infoBlock">\n                    <div class="addressWrap">\n                        <div data-bind="text: $parent.currentCity().name + \', \' + $data.staticDataInfo.addresses[0]"></div>\n                        <div class="distances">\n\n                            <span data-bind="visible: $parent.getDistances($data)[0]">\n                                <span data-bind="text: $parent.getDistances($data)[0]"></span>\n                                <span class="target" data-bind="i18n: \'HotelsSearchResults.targetFromCenter\'"></span>\n                            </span>\n\n                            <span data-bind="visible: $parent.getDistances($data)[1]">\n                                <span data-bind="text: $parent.getDistances($data)[1]"></span>\n                                <span class="target" data-bind="i18n: \'HotelsSearchResults.targetFromAirport\'"></span>\n                            </span>\n\n                        </div>\n                    </div>\n                    <div class="description" data-bind="click: function ($data, event) { event.preventDefault(); $parent.bigMapIsVisible(false); $parent.showCardHotel($data) }">\n                        <p class="text" data-bind="html: $data.staticDataInfo.description"></p>\n                    </div>\n                </div>\n                \n                <ul class="services" data-bind="foreach: $data.staticDataInfo.popularFeatures">\n                    <li class="nemo-hotels-results__content__sidebar__offer__services__service nemo-hotels-services__service hotels-services__service_active">\n                        <span class="nemo-hotels-services__service__icon" data-bind="css: \'nemo-hotels-services__service__icon_\' + $data, tooltip: {\n                            content: $parents[1].popularHotelsFeatures[$data]\n                        }"></span>\n                    </li>\n                </ul>\n            </div>\n            \n            <div class="nemo-hotels-results__hotelsGroup__footer">\n                <div class="nemo-ui-button nemo-ui-button_main nemo-hotels-results__hotelsGroup__footer__orderBtn" data-bind="click: function ($data, event) { event.preventDefault(); $parent.bigMapIsVisible(false); $parent.showCardHotel($data) }">\n                    <div class="nemo-hotels-results__hotelsGroup__footer__priceWrap">\n                        <span class="nemo-hotels-results__hotelsGroup__footer__priceContainer">\n                            <span data-bind="text: $root.i18n(\'HotelsSearchResults\', \'from2\')"></span>\n\n                            <span class="nemo-hotels-results__hotelsGroup__footer__price">\n                                <money data-bind="money: $data.priceObservable"></money>\n                            </span>\n                        </span>\n                        \n                        <span class="nemo-hotels-results__hotelsGroup__footer__period">\n                            <span data-bind="text: $root.i18n(\'HotelsSearchResults\', \'for\') + \' \' + $parent.countOfNights() + \' \' + $parent.labelAfterNights()"></span>\n                        </span>\n                    </div>\n                    <div class="nemo-hotels-results__hotelsGroup__footer__arrow"></div>\n                </div>\n            </div>\n        </div>\n    </div>\n</div>\n',e.b9a16bb22d9ad118ba57fce48136c938='\x3c!-- ko if: $data.bookingCheckError && $data.bookingCheckError() --\x3e\n\t<div data-bind="automaticPopup: { title: $root.i18n(\'HotelsSearchResults\', \'hotels__bookingCheck__error__title\') }">\n\t\t<div class="nemo-hotels-results__bookingCheck nemo-hotels-results__bookingCheck_error">\n\t\t\t<div data-bind="text: $root.i18n(\'HotelsSearchResults\', \'hotels__bookingCheck__error__header\')"></div>\n\t\t\t<div class="nemo-hotels-results__bookingCheck__errorMessage" data-bind="text: $data.bookingCheckError()"></div>\n\n\t\t\t<div class="nemo-flights-results__bookingCheck__buttons">\n\t\t\t\t<a class="nemo-ui-button nemo-ui-button_common" data-bind="attr: { \'href\': $data.searchFormURL() }, text: $root.i18n(\'HotelsSearchResults\', \'bookingCheck__link_to_mainPage\')"></a>\n\t\t\t\t<div class="nemo-ui-button nemo-ui-button_medium" data-bind="\n\t\t\t\t\tclick: $data.hideHotelCheckErrorPopup,\n\t\t\t\t\ttext: $root.i18n(\'HotelsSearchResults\', \'bookingCheck__link_to_searchResults\')\n\t\t\t\t"></div>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n\x3c!-- /ko --\x3e',e["840541f6b94dd63708cb1735b97ad461"]='<div class="nemo-hotels-results__content__results__loadingDummy">\n    <div class="ui-dialog-titlebar ui-dialog-titlebar_progress nemo-hotels-form__searchingInfoPopup__header nemo-hotels-results__content__results__loadingDummy__header">\n        <div class="nemo-loader nemo-loader__2 nemo-hotels-results__content__results__loadingDummy__loader" alt="loading"></div>\n        <span class="ui-dialog-title">\n            <span data-bind="i18n: \'HotelsSearchResults.hotels__loadingDummy__results__progressText\'"></span>\n        </span>\n    </div>\n\n    <div class="nemo-hotels-results__searchingInfo">\n        <div class="nemo-hotels-results__searchingInfo__header" data-bind="i18n: \'HotelsSearchResults.hotels__loadingDummy__results__progressText_timed\'"></div>\n    </div>\n\n    <div class="nemo-hotels-results__content__results__loadingDummy__groupList" data-bind="foreach: [0, 1, 2]">\n        <div class="nemo-hotels-results__groupList__item"\n             data-bind="css: {\'has-flag\': $index() < 1}">\n            <div class="nemo-ui-subContainer\n                                nemo-hotels-results__hotelsGroup\n                                nemo-hotels-results__content__results__loadingDummy__item">\n                <div class="nemo-ui-subContainer__header\n                                    nemo-hotels-results__hotelsGroup__header\n                                    nemo-hotels-results__content__results__loadingDummy__item__header">\n                    <div class="nemo-hotels-results__hotelsGroup__header__title">\n                                <span class="nemo-hotels-results__hotelsGroup__header__title__text\n                                             nemo-hotels-results__content__results__loadingDummy__textItem\n                                             nemo-hotels-results__content__results__loadingDummy__item__header__title"></span>\n                        <div class="nemo-hotels-results__hotelsGroup__stars\n                                            nemo-hotels-results__content__results__loadingDummy__item__stars">\n                            <div class="nemo-hotels-results__hotelsGroup__stars__item\n                                                nemo-hotels-results__content__results__loadingDummy__item__stars__item">\n                                <div class="nemo-hotels-results__hotelsGroup__stars__item__inner"></div>\n                            </div>\n                            <div class="nemo-hotels-results__hotelsGroup__stars__item\n                                                nemo-hotels-results__content__results__loadingDummy__item__stars__item">\n                                <div class="nemo-hotels-results__hotelsGroup__stars__item__inner"></div>\n                            </div>\n                            <div class="nemo-hotels-results__hotelsGroup__stars__item\n                                                nemo-hotels-results__content__results__loadingDummy__item__stars__item">\n                                <div class="nemo-hotels-results__hotelsGroup__stars__item__inner"></div>\n                            </div>\n                            <div class="nemo-hotels-results__hotelsGroup__stars__item\n                                                nemo-hotels-results__content__results__loadingDummy__item__stars__item">\n                                <div class="nemo-hotels-results__hotelsGroup__stars__item__inner"></div>\n                            </div>\n                        </div>\n                    </div>\n                    <div class="nemo-hotels-results__hotelsGroup__header__additional" data-bind="visible: $index() < 1, i18n: \'HotelsSearchResults.header-flag__best_price\'"></div>\n                </div>\n                <div class="nemo-ui-subContainer\n                                    nemo-hotels-results__hotelsGroup__content">\n                    <div class="nemo-hotels-results__hotelsGroup__mainInfo">\n                        <div class="nemo-hotels-results__hotelsGroup__mainInfo__photoWrap\n                                            nemo-hotels-results__content__results__loadingDummy__item__image"></div>\n                        <div class="nemo-hotels-results__hotelsGroup__mainInfo__rating\n                                            nemo-hotels-results__content__results__loadingDummy__item__rating">\n                                    <span class="nemo-hotels-results__content__results__loadingDummy__item__rating__number\n                                                 nemo-hotels-results__content__results__loadingDummy__textItem"></span>\n                                    <span class="nemo-hotels-results__content__results__loadingDummy__item__rating__text\n                                                 nemo-hotels-results__content__results__loadingDummy__textItem"></span>\n                                    \x3c!--<span class="nemo-hotels-results__content__results__loadingDummy__item__rating__link--\x3e\n                                                 \x3c!--nemo-hotels-results__content__results__loadingDummy__textItem"></span>--\x3e\n                        </div>\n                        <div class="nemo-hotels-results__hotelsGroup__mainInfo__infoBlock">\n                            <div class="nemo-hotels-results__hotelsGroup__mainInfo__infoWrap">\n                                <div class="nemo-hotels-results__hotelsGroup__mainInfo__addressWrap">\n                                    <div class="nemo-hotels-results__hotelsGroup__mainInfo__distances\n                                                        nemo-hotels-results__content__results__loadingDummy__item__distances">\n                                                <span class="nemo-hotels-results__hotelsGroup__mainInfo__distance\n                                                             nemo-hotels-results__content__results__loadingDummy__item__address\n                                                             nemo-hotels-results__content__results__loadingDummy__textItem"></span>\n                                                <span class="nemo-hotels-results__hotelsGroup__mainInfo__distance\n                                                             nemo-hotels-results__content__results__loadingDummy__item__distance\n                                                             nemo-hotels-results__content__results__loadingDummy__textItem"></span>\n                                                <span class="nemo-hotels-results__hotelsGroup__mainInfo__mapLink\n                                                             nemo-hotels-results__content__results__loadingDummy__item__mapLink\n                                                             nemo-hotels-results__content__results__loadingDummy__textItem"></span>\n                                                <span class="nemo-hotels-results__hotelsGroup__mainInfo__district\n                                                             nemo-hotels-results__content__results__loadingDummy__item__district\n                                                             nemo-hotels-results__content__results__loadingDummy__textItem"></span>\n                                    </div>\n                                </div>\n                            </div>\n                            <div class="nemo-hotels-results__hotelsGroup__mainInfo__description\n                                                nemo-hotels-results__content__sidebar__offer__description">\n                                <div class="nemo-hotels-results__hotelsGroup__mainInfo__description__text\n                                                    nemo-hotels-results__content__results__loadingDummy__item__description\n                                                    nemo-hotels-results__content__results__loadingDummy__textItem"></div>\n                                <a href="#" class="nemo-hotels-results__hotelsGroup__mainInfo__description__link\n                                                           nemo-hotels-results__content__sidebar__offer__description__link"></a>\n                            </div>\n                        </div>\n                        <ul class="nemo-hotels-results__content__results__loadingDummy__item__services\n                                           nemo-hotels-services">\n                            <li class="nemo-hotels-results__content__results__loadingDummy__item__services__service"></li>\n                            <li class="nemo-hotels-results__content__results__loadingDummy__item__services__service"></li>\n                            <li class="nemo-hotels-results__content__results__loadingDummy__item__services__service"></li>\n                            <li class="nemo-hotels-results__content__results__loadingDummy__item__services__service"></li>\n                            <li class="nemo-hotels-results__content__results__loadingDummy__item__services__service"></li>\n                            <li class="nemo-hotels-results__content__results__loadingDummy__item__services__service"></li>\n                            <li class="nemo-hotels-results__content__results__loadingDummy__item__services__service"></li>\n                            <li class="nemo-hotels-results__content__results__loadingDummy__item__services__service"></li>\n                            <li class="nemo-hotels-results__content__results__loadingDummy__item__services__service"></li>\n                            <li class="nemo-hotels-results__content__results__loadingDummy__item__services__service"></li>\n                            <li class="nemo-hotels-results__content__results__loadingDummy__item__services__service"></li>\n                            <li class="nemo-hotels-results__content__results__loadingDummy__item__services__service"></li>\n                            <li class="nemo-hotels-results__content__results__loadingDummy__item__services__service"></li>\n                            <li class="nemo-hotels-results__content__results__loadingDummy__item__services__service"></li>\n                        </ul>\n                    </div>\n                    <div class="nemo-hotels-results__hotelsGroup__rooms\n                                        nemo-hotels-results__content__results__loadingDummy__rooms">\n                        <div class="nemo-hotels-results__hotelsGroup__rooms__title">\n                                    <span class="nemo-hotels-results__content__results__loadingDummy__item__rooms__title__text\n                                                 nemo-hotels-results__content__results__loadingDummy__textItem"></span>\n                        </div>\n                        <ul class="nemo-hotels-results__hotelsGroup__roomsList">\n                            <li class="nemo-hotels-results__hotelsGroup__room">\n                                <div class="nemo-hotels-results__hotelsGroup__room__info">\n                                    <div class="nemo-hotels-results__hotelsGroup__room__title">\n                                                    <span class="nemo-hotels-results__hotelsGroup__room__title__count\n                                                                 nemo-hotels-results__content__results__loadingDummy__item__rooms__room__count\n                                                                 nemo-hotels-results__content__results__loadingDummy__textItem"></span>\n                                                    <span class="nemo-hotels-results__hotelsGroup__room__title__iconsWrap\n                                                                 nemo-hotels-results__content__results__loadingDummy__item__rooms__room__iconWrap">\n                                                        <span class="nemo-hotels-results__hotelsGroup__room__title__icon"></span>\n                                                    </span>\n                                                    <span class="nemo-hotels-results__hotelsGroup__room__title__text\n                                                                 nemo-hotels-results__content__results__loadingDummy__item__rooms__room__text\n                                                                 nemo-hotels-results__content__results__loadingDummy__textItem"></span>\n                                    </div>\n                                    <ul class="nemo-hotels-results__hotelsGroup__room__featuresList">\n                                        <li class="nemo-hotels-results__hotelsGroup__room__feature">\n                                                    <span class="nemo-hotels-results__content__results__loadingDummy__item__rooms__room__feature1\n                                                                 nemo-hotels-results__content__results__loadingDummy__textItem"></span>\n                                        </li>\n                                        <li class="nemo-hotels-results__hotelsGroup__room__feature">\n                                                    <span class="nemo-hotels-results__content__results__loadingDummy__item__rooms__room__feature2\n                                                                 nemo-hotels-results__content__results__loadingDummy__textItem"></span>\n                                        </li>\n                                    </ul>\n                                </div>\n                                        <span class="nemo-hotels-results__hotelsGroup__room__additional\n                                                     nemo-hotels-results__content__results__loadingDummy__item__rooms__room__additional\n                                                     nemo-hotels-results__content__results__loadingDummy__textItem"></span>\n                            </li>\n                        </ul>\n                                <span class="nemo-hotels-results__hotelsGroup__rooms__allRoomsWrap">\n                                    <span class="nemo-hotels-results__hotelsGroup__rooms__allRooms">\n                                        <span class="nemo-ui-pseudoLink\n                                                     nemo-hotels-results__hotelsGroup__rooms__allRooms__link" data-bind="i18n: \'HotelsSearchResults.PH__link_all_rooms\'">\n                                        </span>\n                                    </span>\n                                </span>\n                    </div>\n                    <div class="nemo-hotels-results__hotelsGroup__footer">\n                        <div class="nemo-ui-button\n                                            nemo-ui-button_main\n                                            nemo-hotels-results__hotelsGroup__orderBtn\n                                            nemo-hotels-results__hotelsGroup__room__additional\n                                            nemo-hotels-results__content__results__loadingDummy__item__orderBtn">\n                            <div class="nemo-hotels-results__hotelsGroup__footer__priceWrap">\n                                        <span class="nemo-hotels-results__hotelsGroup__footer__price\n                                                     nemo-hotels-results__content__results__loadingDummy__item__orderBtn__price\n                                                     nemo-hotels-results__content__results__loadingDummy__textItem"></span>\n                                        <span class="nemo-hotels-results__hotelsGroup__footer__period\n                                                     nemo-hotels-results__content__results__loadingDummy__item__orderBtn__period\n                                                     nemo-hotels-results__content__results__loadingDummy__textItem"></span>\n                            </div>\n                            <div class="nemo-hotels-results__hotelsGroup__footer__arrow\n                                                nemo-hotels-results__content__results__loadingDummy__item__orderBtn__arrow"></div>\n                        </div>\n                    </div>\n                </div>\n            </div>\n        </div>\n    </div>\n</div>',e.d45b2822ed4d08f6930d4b4e349f3ce0='<span class="nemo-hotels-results__map__controlTitle">\n                <span class="nemo-hotels-results__map__controlTitle__text" data-bind="text: $root.i18n(\'HotelsSearchResults\', \'distanceFromCenterText\')">\n                </span>\n                <span class="nemo-hotels-results__map__controlTitle__distance" data-bind="text: displayRangeMin"></span>\n                <span class="nemo-hotels-results__map__controlTitle__units" data-bind="text: $root.i18n(\'HotelsSearchResults\', \'km\')"></span>\n            </span>\n<div class="nemo-hotels-results__map__control">\n    <div class="nemo-ui-slider__wrapper\n                            nemo-ui-slider__wrapper__oneHandle\n                            nemo-hotels-results__content__postfilters__inlineSlider__slider">\n        <div class="nemo-ui-slider\n                                nemo-ui-slider_range\n                                ui-slider\n                                ui-slider-horizontal\n                                ui-widget\n                                ui-widget-content\n                                ui-corner-all"\n             data-bind="slider: value">\n        </div>\n    </div>\n</div>',e.c9456f2cbe4c324093947227640055ad='<li class="nemo-hotel__content__about__location__distances__distance" data-bind="visible: distancesArray[0].value">\n            <span class="nemo-hotel__content__about__location__distances__distance__name\n    nemo-hotel__content__about__paramName" data-bind="text: typeName">\n    </span>\n\n    <span class="nemo-hotel__content__about__location__distances__distance__params">\n            <span class="nemo-hotel__content__about__location__distances__distance__param">\n\n            <span class="nemo-hotel__content__about__location__distances__distance__param__value"\n                  data-bind="text: distancesArray[0].value ? distancesArray[0].value.distance : \'\'">\n            </span>\n\n            <span class="nemo-hotel__content__about__location__distances__distance__param__units"\n                  data-bind="text: distancesArray[0].value ? distancesArray[0].value.measurement: \'\'">\n            </span>\n            </span>\n            </span>\n</li>',e["45ec3b51d8062a4471bf461875aa9091"]='\x3c!-- ko foreach: featureFilterValuesAsArray --\x3e\n<label class="nemo-common-postFilters__filterList__filter__checkboxesBlock__checkboxes__checkbox" data-bind="css: { \'nemo-common-postFilters__filterList__filter__checkboxesBlock__checkboxes__checkbox_disabled\': $data.count() === 0 }">\n\n    <input type="checkbox" class="nemo-common-postFilters__filterList__filter__checkboxesBlock__checkboxes__checkbox__input" data-bind="checked: $data.checked, enable: $data.count() > 0">\n\n    <span class="nemo-common-postFilters__filterList__filter__checkboxesBlock__checkboxes__checkbox__name nemo-common-postFilters__filterList__filter__checkboxesBlock__checkboxes__checkbox__name__stars" data-bind="text: $data.name"></span>\n\n    <span class="nemo-common-postFilters__filterList__filter__checkboxesBlock__checkboxes__checkbox__value" data-bind="text: $data.count"></span>\n\n</label>\n\x3c!-- /ko --\x3e',
e.b55365acf5a0ad570badde8e8c30f188='\x3c!-- Left-side filters --\x3e\n\n<div class="nemo-common-postFilters__inner">\n\n\t<div class="nemo-common-postFilters__notification nemo-hotels-results__content__postfilters__notification" data-bind="visible: $parent.isFilterNotificationVisible">\n\t\t<span data-bind="html: $root.i18n(\'HotelsSearchResults\', \'hotels__PF__hint\')"></span>\n\t\t<div class="nemo-common-postFilters__notification__close" data-bind="click: function () { $parent.hideFilterNotification() }"></div>\n\t</div>\n\n\t\x3c!-- Button is visible only on tablet layout --\x3e\n\t<div class="nemo-hotels-results__content__postfilters__showOnMap">\n\t\t<div class="nemo-ui-button nemo-ui-button_common nemo-hotels-results__content__postfilters__showOnMap__button"\n\t\t\t data-bind="click: function () { $parent.isListView(!$parent.isListView()); $parent.initMap() }, text: $root.i18n(\'HotelsSearchResults\', $parent.isListView() ? \'map__button-show\' : \'list__button-show\')">\n\t\t</div>\n\t</div>\n\n\t\x3c!-- Sorting --\x3e\n\t<label class="nemo-hotels-results__content__postfilters__order">\n\t\t<span class="nemo-hotels-results__content__postfilters__order__title" data-bind="text: $root.i18n(\'HotelsSearchResults\', \'hotels__sort__caption\')"></span>\n\t\t<div class="nemo-ui-select js-common-pseudoSelect nemo-hotels-form__routeOptions__item__selector">\n\t\t\t<div class="nemo-ui-select__toggle js-common-pseudoSelect__toggle nemo-hotels-form__routeOptions__item__selector__button"\n\t\t\t\t data-bind="pseudoSelect: null, text: $root.i18n(\'HotelsSearchResults\',\'sort__type__\' + sortType())"></div>\n\t\t\t<div class="nemo-ui-select__dropdown js-common-pseudoSelect__dropdown" data-bind="foreach: sortTypes">\n\t\t\t\t<div class="nemo-ui-select__dropdown__item"\n\t\t\t\t\t data-bind="click: function () { $parent.sortType($data) }, text: $root.i18n(\'HotelsSearchResults\',\'sort__type__\' + $data)"></div>\n\t\t\t</div>\n\t\t</div>\n\t</label>\n\n\t<div class="nemo-common-postFilters__filterList">\n\n\t\t\x3c!-- Clear all filters --\x3e\n\t\t<div class="nemo-common-postFilters__clearAll">\n\t\t\t<div\n\t\t\t\tclass="nemo-ui-button nemo-ui-button_common nemo-common-postFilters__clearAll__button"\n\t\t\t\tdata-bind="text: $root.i18n(\'HotelsSearchResults\', \'hotels__PF__clearAll\'), click: resetAllFilters, visible: !isFilterEmpty()">\n\t\t\t</div>\n\t\t</div>\n\n\t\t\x3c!-- Find hotel by name --\x3e\n\t\t<div class="nemo-common-postFilters__filterList__filter__valuesBlock__values">\n\t\t\t<div class="nemo-common-postFilters__filterList__filter__caption">\n\t\t\t\t<h4 class="nemo-common-postFilters__filterList__filter__caption__name"\n\t\t\t\t\tdata-bind="text: $root.i18n(\'HotelsSearchResults\',\'PF__filter__findByName\')"></h4>\n\t\t\t</div>\n\t\t\t<div class="nemo-common-postFilters__filterList__filter__valuesBlock__values">\n\t\t\t\t<input type="text" class="nemo-ui-textInput__input nemo-common-postFilters__search_input" data-bind="textInput: findByName, attr: {placeholder: $root.i18n(\'HotelsSearchResults\',\'PF__filter__findByName_placeholder\')}" autofocus/>\n\t\t\t</div>    \n\t\t</div>\n\n\t\t\x3c!-- Prices filter --\x3e\n\t\t<div class="nemo-common-postFilters__filterList__filter">\n\t\t\t<div class="nemo-common-postFilters__filterList__filter__caption">\n\t\t\t\t<h4 class="nemo-common-postFilters__filterList__filter__caption__name"\n\t\t\t\t\tdata-bind="text: $parent.displayCountOfNightsPrice"></h4>\n\t\t\t</div>\n\n\t\t\t<div class="nemo-common-postFilters__filterList__filter__valuesBlock\n\t\t\t\t\t\t\t\t\tnemo-common-postFilters__filterList__filter__valuesBlock_slider">\n\t\t\t\t<div class="nemo-common-postFilters__filterList__filter__valuesBlock__values">\n\t\t\t\t\t<div class="nemo-common-postFilters__filterList__filter__valuesBlock__values__value\n\t\t\t\t\t\t\t\t\t\t\tnemo-common-postFilters__filterList__filter__valuesBlock__values__value_noFlex">\n\n\t\t\t\t\t\t<div class="nemo-common-postFilters__filterList__filter__valuesBlock__values"\n\t\t\t\t\t\t\t data-filter-id="price-range"\n\t\t\t\t\t\t\t data-bind="template: { name: \'nemo-koTemplate-HotelsResults-PostFilters-Number\', data: nightsCountPriceFilter }">\n\t\t\t\t\t\t</div>\n\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\n\t\t\x3c!-- Stars filter --\x3e\n\t\t<div class="nemo-common-postFilters__filterList__filter">\n\t\t\t<div class="nemo-common-postFilters__filterList__filter__caption">\n\t\t\t\t<h4 class="nemo-common-postFilters__filterList__filter__caption__name" data-bind="text: $root.i18n(\'HotelsSearchResults\', \'PF__filter__starsCount\')"></h4>\n\t\t\t</div>\n\n\t\t\t<div class="nemo-common-postFilters__filterList__filter__checkboxesBlock nemo-common-postFilters__filterList__filter__checkboxesBlock_checkboxes">\n\t\t\t\t<div class="nemo-common-postFilters__filterList__filter__checkboxesBlock__checkboxes">\n\t\t\t\t\t<label class="nemo-common-postFilters__filterList__filter__valuesBlock__values__value nemo-common-postFilters__filterList__filter__valuesBlock__values__value_noMatter"\n\t\t\t\t\t\t\tdata-bind="\n\t\t\t\t\t\t\t\t\tcss: { \'nemo-common-postFilters__filterList__filter__valuesBlock__values__value_checked\' : $parent.filters.isStarFilterEmpty },\n\t\t\t\t\t\t\t\t\tclick: $parent.filters.resetStarFilter()\n\t\t\t\t\t\t\t\t\t ">\n\n\t\t\t\t\t\t\t <span class="nemo-common-postFilters__filterList__filter__valuesBlock__values__value__name nemo-common-postFilters__filterList__filter__valuesBlock__values__value__name_noMatter" data-bind="text: $root.i18n(\'HotelsSearchResults\', \'PF__filter__noMatter\')"></span>\n\t\t\t\t\t </label>\n\t\t\t\t\t\x3c!-- ko template: { name: \'nemo-koTemplate-HotelsResults-StartFilterRow\', data: {\n\t\t\t\t\t\t\'filterValues\': starRatingFilterValues,\n\t\t\t\t\t\t\'initialMinStarPrices\': $parent.initialMinStarPrices,\n\t\t\t\t\t\t\'minStarPrices\': $parent.minStarPrices,\n\t\t\t\t\t\t\'countOfNights\': $parent.countOfNights,\n\t\t\t\t\t} } --\x3e \x3c!-- /ko --\x3e\n\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\n\t\t\x3c!-- Hotels Chain --\x3e\n\t\t\x3c!-- ko if: $parent.filters.hotelsChainFilter.valuesAsArray().length > 0 --\x3e\n\t\t<div class="nemo-common-postFilters__filterList__filter">\n\t\t\t<div class="nemo-common-postFilters__filterList__filter__caption">\n\t\t\t\t<h4 class="nemo-common-postFilters__filterList__filter__caption__name"\n\t\t\t\t\tdata-bind="text: $root.i18n(\'HotelsSearchResults\', \'hotels__hotelsChain\')"></h4>\n\t\t\t</div>\n\t\t\t<div class="nemo-common-postFilters__filterList__filter__checkboxesBlock\n\t\t\t\t\t\t\t\t\tnemo-common-postFilters__filterList__filter__checkboxesBlock_checkboxes">\n\t\t\t\t<div class="nemo-common-postFilters__filterList__filter__checkboxesBlock__checkboxes">\n\t\t\t\t\t<label class="nemo-common-postFilters__filterList__filter__valuesBlock__values__value nemo-common-postFilters__filterList__filter__valuesBlock__values__value_noMatter"\n\t\t\t\t\t\t   data-bind="\n\t\t\t\t\t\t\t\t\t\tcss: { \'nemo-common-postFilters__filterList__filter__valuesBlock__values__value_checked\' : $parent.filters.hotelsChainFilter.isDefault },\n\t\t\t\t\t\t\t\t\t\tclick: $parent.filters.hotelsChainFilter.resetFilters\n\t\t\t\t\t\t\t\t\t\t ">\n\t\t\t\t\t\t<span class="nemo-common-postFilters__filterList__filter__valuesBlock__values__value__name nemo-common-postFilters__filterList__filter__valuesBlock__values__value__name_noMatter" data-bind="text: $root.i18n(\'HotelsSearchResults\', \'PF__filter__noMatter\')"></span>\n\t\t\t\t\t</label>\n\t\t\t\t\t\x3c!-- ko template: { name: \'nemo-koTemplate-HotelsResults-FeatureFilterRow\', data: $parent.filters.hotelsChainFilter.valuesAsArray(), as: \'featureFilterValuesAsArray\' } --\x3e \x3c!-- /ko --\x3e\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t\t\x3c!-- /ko --\x3e\n\n\t\t\x3c!-- Special options --\x3e\n\t\t\x3c!-- ko if: $parent.filters.specialFilter.valuesAsArray().length > 0 --\x3e\n\t\t<div class="nemo-common-postFilters__filterList__filter">\n\t\t\t<div class="nemo-common-postFilters__filterList__filter__caption">\n\t\t\t\t<h4 class="nemo-common-postFilters__filterList__filter__caption__name"\n\t\t\t\t\tdata-bind="text: $root.i18n(\'HotelsSearchResults\',\'PF__filter__specialConditions\')"></h4>\n\t\t\t</div>\n\t\t\t<div class="nemo-common-postFilters__filterList__filter__checkboxesBlock\n\t\t\t\t\t\t\t\t\tnemo-common-postFilters__filterList__filter__checkboxesBlock_checkboxes">\n\t\t\t\t<div class="nemo-common-postFilters__filterList__filter__checkboxesBlock__checkboxes">\n\t\t\t\t\t<label class="nemo-common-postFilters__filterList__filter__valuesBlock__values__value nemo-common-postFilters__filterList__filter__valuesBlock__values__value_noMatter"\n\t\t\t\t\t\t   data-bind="\n\t\t\t\t\t\t\t\t\t\tcss: { \'nemo-common-postFilters__filterList__filter__valuesBlock__values__value_checked\' : $parent.filters.specialFilter.isDefault },\n\t\t\t\t\t\t\t\t\t\tclick: $parent.filters.specialFilter.resetFilters\n\t\t\t\t\t\t\t\t\t\t ">\n\t\t\t\t\t\t<span class="nemo-common-postFilters__filterList__filter__valuesBlock__values__value__name nemo-common-postFilters__filterList__filter__valuesBlock__values__value__name_noMatter" data-bind="text: $root.i18n(\'HotelsSearchResults\', \'PF__filter__noMatter\')"></span>\n\t\t\t\t\t</label>\n\t\t\t\t\t\x3c!-- ko template: { name: \'nemo-koTemplate-HotelsResults-FeatureFilterRow\', data: $parent.filters.specialFilter.valuesAsArray(), as: \'featureFilterValuesAsArray\' } --\x3e \x3c!-- /ko --\x3e\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t\t\x3c!-- /ko --\x3e\n\n\t\t\x3c!-- Services filter --\x3e\n\t\t<div class="nemo-common-postFilters__filterList__filter" data-bind="visible: $parent.filters.featureFilter.valuesAsArray().length > 0">\n\t\t\t<div class="nemo-common-postFilters__filterList__filter__caption">\n\t\t\t\t<h4 class="nemo-common-postFilters__filterList__filter__caption__name" data-bind="text: $root.i18n(\'HotelsSearchResults\', \'PF__filter__services\')"></h4>\n\t\t\t</div>\n\n\t\t\t<div class="nemo-common-postFilters__filterList__filter__checkboxesBlock\n\t\t\t\t\t\t\t\tnemo-common-postFilters__filterList__filter__checkboxesBlock_checkboxes">\n\t\t\t\t<div class="nemo-common-postFilters__filterList__filter__checkboxesBlock__checkboxes">\n\t\t\t\t\t<label class="nemo-common-postFilters__filterList__filter__valuesBlock__values__value nemo-common-postFilters__filterList__filter__valuesBlock__values__value_noMatter"\n\t\t\t\t\t\t\tdata-bind="\n\t\t\t\t\t\t\t\t\tcss: { \'nemo-common-postFilters__filterList__filter__valuesBlock__values__value_checked\' : $parent.filters.featureFilter.isDefault },\n\t\t\t\t\t\t\t\t\tclick: $parent.filters.featureFilter.resetFilters\n\t\t\t\t\t\t\t\t\t ">\n\n\t\t\t\t\t\t\t <span class="nemo-common-postFilters__filterList__filter__valuesBlock__values__value__name nemo-common-postFilters__filterList__filter__valuesBlock__values__value__name_noMatter" data-bind="text: $root.i18n(\'HotelsSearchResults\', \'PF__filter__noMatter\')"></span>\n\t\t\t\t\t </label>\n\t\t\t\t\t\x3c!-- ko template: { name: \'nemo-koTemplate-HotelsResults-FeatureFilterRow\', data: $parent.filters.featureFilter.valuesAsArray(), as: \'featureFilterValuesAsArray\' } --\x3e \x3c!-- /ko --\x3e\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\n\t\t\x3c!-- Ratings filter --\x3e\n\t\t\x3c!-- ko if: $parent.maxAverageCustomerRating() > 0 --\x3e\n\t\t\t<div class="nemo-common-postFilters__filterList__filter">\n\t\t\t\t<div class="nemo-common-postFilters__filterList__filter__caption">\n\t\t\t\t\t<h4 class="nemo-common-postFilters__filterList__filter__caption__name"\n\t\t\t\t\t\tdata-bind="text: $root.i18n(\'HotelsSearchResults\', \'PF__filter__guestsRating\')"></h4>\n\t\t\t\t</div>\n\n\t\t\t\t<div class="nemo-common-postFilters__filterList__filter__valuesBlock\n\t\t\t\t\t\t\t\t\tnemo-common-postFilters__filterList__filter__valuesBlock_slider\n\t\t\t\t\t\t\t\t\tnemo-hotels-results__content__postfilters__inlineSlider">\n\t\t\t\t\t<div class="nemo-common-postFilters__filterList__filter__valuesBlock__values">\n\t\t\t\t\t\t<div class="nemo-common-postFilters__filterList__filter__valuesBlock__values__value\n\t\t\t\t\t\t\t\t\t\t\tnemo-hotels-results__content__postfilters__inlineSlider__value"\n\t\t\t\t\t\t\t data-bind="template: { name: \'nemo-koTemplate-HotelsResults-PostFilters-AverageRating\', data: averageCustomerRatingFilter }">\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\x3c!-- /ko --\x3e\n\t</div>\n\n</div>\n',e["49edc12b93f948cc4da0770085ad83c1"]='\x3c!-- Range money filter in "" --\x3e\n\n<div class="nemo-ui-slider__info nemo-hotels-results__content__postfilters__inlineSlider__info">\n    <span data-bind="text: $root.i18n(\'HotelsSearchResults\', \'from2\') + \'&nbsp;\'"></span>\n    <span class="nemo-ui-slider__info__block\n                 nemo-ui-slider__info__value\n                 nemo-hotels-results__content__postfilters__inlineSlider__info__value"\n          data-bind="text: displayRangeMin">\n    </span>\n</div>\n\n<div class="nemo-ui-slider__wrapper\n            nemo-ui-slider__wrapper__oneHandle\n            nemo-hotels-results__content__postfilters__inlineSlider__slider">\n\n    <div class="nemo-ui-slider\n                nemo-ui-slider_range\n                ui-slider\n                ui-slider-horizontal\n                ui-widget\n                ui-widget-content\n                ui-corner-all"\n         data-bind="slider: value">\n    </div>\n\n</div>',e["7d2971d631098f122ad3093f2a5f5d52"]='<div class="nemo-ui-slider__info\n            nemo-hotels-results__content__postfilters__inlineSlider__info">\n\n    <span data-bind="text: $root.i18n(\'HotelsSearchResults\', \'from2\') + \'&nbsp;\'"></span>\n\n        <span class="nemo-ui-slider__info__block\n                     nemo-ui-slider__info__value\n                     nemo-hotels-results__content__postfilters__inlineSlider__info__value"\n              data-bind="text: displayRangeMin">\n        </span>\n</div>\n\n<div class="nemo-ui-slider__wrapper\n            nemo-ui-slider__wrapper__oneHandle\n            nemo-hotels-results__content__postfilters__inlineSlider__slider">\n\n    <div class="nemo-ui-slider\n                nemo-ui-slider_range\n                ui-slider\n                ui-slider-horizontal\n                ui-widget\n                ui-widget-content\n                ui-corner-all"\n         data-bind="slider: value">\n    </div>\n\n</div>',e["10a260bc00a140476c8adc5d17a3fcba"]='<div class="nemo-common-postFilters__filterList__filter__valuesBlock__values__value nemo-common-postFilters__filterList__filter__valuesBlock__values__value_noFlex">\n\t<div class="nemo-ui-slider__info">\n        <span class="nemo-ui-slider__info__block nemo-ui-slider__info__block_min">\n            <span data-bind="money: { amount: displayRangeMin(), currency: $root.agency.userCurrency() }"></span>&nbsp;\n        </span>\n\n\t\t<span class="nemo-ui-slider__info__block nemo-ui-slider__info__block_divider">\n            —\n        </span>\n\n\t\t<span class="nemo-ui-slider__info__block nemo-ui-slider__info__block_max">\n            <span data-bind="money: { amount: displayRangeMax(), currency: $root.agency.userCurrency() }"></span>&nbsp;\n        </span>\n\t</div>\n\n\t<div class="nemo-ui-slider__wrapper">\n\t\t<div class="nemo-ui-slider nemo-ui-slider_range ui-slider ui-slider-horizontal ui-widget ui-widget-content ui-corner-all" data-bind="slider: value"></div>\n\t</div>\n</div>',e["284c106de626eb438f959dcb502abba8"]='<div class="nemo-ui-slider__info">\n    <span class="nemo-ui-slider__info__block nemo-ui-slider__info__block_min">\n        <span>\n\t\t\t<money data-bind="money: { amount: displayRangeMin(), currency: $root.user.settings.agencyCurrency() }"></money>\n\t\t</span>&nbsp;\n    </span>\n\n\t<span class="nemo-ui-slider__info__block nemo-ui-slider__info__block_divider">\n        —\n    </span>\n\n\t<span class="nemo-ui-slider__info__block nemo-ui-slider__info__block_max">\n        <span>\n\t\t\t<money data-bind="money: { amount: displayRangeMax(), currency: $root.user.settings.agencyCurrency() }"></money>\n\t\t</span>&nbsp;\n    </span>\n</div>\n\n<div class="nemo-ui-slider__wrapper">\n\t<div class="nemo-ui-slider" data-bind="slider: value"></div>\n</div>',e.c77860d7178afb4c66f5de45a3301cbb='<ul class="nemo-hotels-results__content__sidebar__offersList" data-bind="foreach: promotionalHotels">\n\n    <li class="nemo-hotels-results__content__sidebar__offer nemo-ui-subContainer nemo-hotels-results__hotelsGroup">\n\n        <div class="nemo-ui-subContainer__header nemo-hotels-results__hotelsGroup__header nemo-hotels-results__content__sidebar__offer__header">\n\n            <div class="nemo-hotels-results__hotelsGroup__header__title nemo-hotels-results__content__sidebar__offer__title">\n\n                <a class="nemo-hotels-results__hotelsGroup__header__title__text nemo-hotels-results__content__sidebar__offer__title__text"\n                   href="#"\n                   data-bind="text: name, click: function(hotel){ $parent.showCardHotel(hotel) }">\n                </a>\n\n                <div class="nemo-hotels-results__hotelsGroup__stars nemo-hotels-results__content__sidebar__offer__stars"\n                     data-bind="foreach: staticDataInfo.starRating">\n                    <div class="nemo-hotels-results__hotelsGroup__stars__item nemo-hotels-results__content__sidebar__offer__starItem">\n                        <div class="nemo-hotels-results__hotelsGroup__stars__item__inner nemo-hotels-results__content__sidebar__offer__starItem__inner"></div>\n                    </div>\n                </div>\n\n            </div>\n\n            <div class="nemo-hotels-results__hotelsGroup__header__additional nemo-hotels-results__content__sidebar__offer__additional"\n                 data-bind="text: $root.i18n(\'HotelsSearchResults\', \'header-flag__city-hotel\')">\n            </div>\n\n        </div>\n\n        <div class="nemo-ui-subContainer\n                                        nemo-hotels-results__hotelsGroup__content\n                                        nemo-hotels-results__content__sidebar__offer__content">\n            <div class="nemo-hotels-results__hotelsGroup__mainInfo">\n\n                <div class="nemo-hotels-results__hotelsGroup__mainInfo__photoWrap\n                                                nemo-hotels-results__content__sidebar__offer__photoWrap"\n                     data-bind="style: { click: function(hotel){ $parent.showCardHotel(hotel) }, \'backgroundImage\': $parent.getHotelMainImage($data) }">\n                </div>\n\n                <div class="nemo-hotels-results__hotelsGroup__mainInfo__rating\n                                                nemo-hotels-results__content__sidebar__offer__rating">\n                                        <span class="nemo-hotels-results__hotelsGroup__mainInfo__rating__number\n                                                     nemo-hotels-results__content__sidebar__offer__rating__number"\n                                              data-bind="text: staticDataInfo.averageCustomerRating ? staticDataInfo.averageCustomerRating.value : 0">\n                                        </span>\n                                        <span class="nemo-hotels-results__hotelsGroup__mainInfo__rating__text\n                                                     nemo-hotels-results__content__sidebar__offer__rating__text"\n                                              data-bind="text: staticDataInfo.averageCustomerRating && staticDataInfo.averageCustomerRating.description ? staticDataInfo.averageCustomerRating.description : $root.i18n(\'HotelsSearchResults\', \'PH__averageCustomerRating_description_default\')">\n                                        </span>\n                    \x3c!--<a class="nemo-ui-pseudoLink--\x3e\n                                                           \x3c!--nemo-hotels-results__hotelsGroup__mainInfo__rating__link--\x3e\n                                                           \x3c!--nemo-hotels-results__content__sidebar__offer__rating__link"--\x3e\n                       \x3c!--data-bind="text: staticDataInfo.usersOpinionInfo.opinionsCount + \' \' + $root.i18n(\'HotelsSearchResults\', \'PH__reviews_link_title_more_than_five\'), click: function(hotel, e) { e.preventDefault() }">--\x3e\n                    \x3c!--</a>--\x3e\n                </div>\n\n                <div class="nemo-hotels-results__hotelsGroup__mainInfo__infoBlock\n                                                nemo-hotels-results__content__sidebar__offer__infoBlock">\n                    <div class="nemo-hotels-results__hotelsGroup__mainInfo__infoWrap">\n                        <div class="nemo-hotels-results__hotelsGroup__mainInfo__addressWrap\n                                                        nemo-hotels-results__content__sidebar__offer__addressWrap">\n                            <div class="nemo-hotels-results__hotelsGroup__mainInfo__distances\n                                                            nemo-hotels-results__content__sidebar__offer__distances">\n                                                    <span class="nemo-hotels-results__hotelsGroup__mainInfo__distance\n                                                                 nemo-hotels-results__content__sidebar__offer__distance">\n                                                        <span class="nemo-hotels-results__hotelsGroup__mainInfo__distance__value"\n                                                              data-bind="text: $parent.getDistances($data)[0]">\n                                                        </span>\n                                                        <span class="nemo-hotels-results__hotelsGroup__mainInfo__distance__target">\n                                                            <span data-bind="text: $parent.getDistances($data)[0] ? $root.i18n(\'HotelsSearchResults\', \'targetFromCenter\') : \'\'">\n                                                            </span>\n                                                            <span class="nemo-hotels-results__hotelsGroup__mainInfo__distance__target__comma\n                                                                         nemo-hotels-results__content__sidebar__offer__distance__comma"\n                                                                  data-bind="visible: $parent.getDistances($data)[0] && $parent.getDistances($data)[1]">\n                                                            </span>\n                                                        </span>\n                                                    </span>\n                                                    <span class="nemo-hotels-results__hotelsGroup__mainInfo__distance\n                                                                 nemo-hotels-results__content__sidebar__offer__distance">\n                                                        <span class="nemo-hotels-results__hotelsGroup__mainInfo__distance__value"\n                                                              data-bind="text: $parent.getDistances($data)[1]">\n                                                        </span>\n                                                        <span class="nemo-hotels-results__hotelsGroup__mainInfo__distance__target"\n                                                              data-bind="text: $parent.getDistances($data)[1] ? $root.i18n(\'HotelsSearchResults\', \'targetFromAirport\') : \'\'">\n                                                        </span>\n                                                    </span>\n\n                                <a href="#" class="nemo-ui-pseudoLink\n                                                                       nemo-hotels-results__hotelsGroup__mainInfo__mapLink\n                                                                       nemo-hotels-results__content__sidebar__offer__mapLink"\n                                   data-bind="text: $root.i18n(\'HotelsSearchResults\', \'map__button-show\'), click: function(hotel){ $parent.showCardHotel(hotel) }, css: {\'nemo-hotels-results__hotelsGroup__mainInfo__mapLink_no-margin\': !$parent.getDistances($data)[0] && !$parent.getDistances($data)[1]}"></a>\n                            </div>\n                        </div>\n                    </div>\n                    <div class="nemo-hotels-results__hotelsGroup__mainInfo__description\n                                                    nemo-hotels-results__content__sidebar__offer__description">\n                        <p class="nemo-hotels-results__hotelsGroup__mainInfo__description__text"\n                           data-bind="click: function(hotel){ $parent.showCardHotel(hotel) }, html: staticDataInfo.description, hotelsResultsDescriptionBindings: afterHotelDescriptionRender">\n                        </p>\n                        <a href="#" class="nemo-hotels-results__hotelsGroup__mainInfo__description__link\n                                                               nemo-hotels-results__content__sidebar__offer__description__link"\n                           data-bind="click: function(hotel){ $parent.showCardHotel(hotel) }"></a>\n                    </div>\n                </div>\n            </div>\n\n            <ul class="nemo-hotels-results__content__sidebar__offer__services nemo-hotels-services" data-bind="foreach: $parent.staticDataInfo.popularFeatures">\n                <li class="nemo-hotels-results__content__sidebar__offer__services__service nemo-hotels-services__service nemo-hotels-services__service_active">\n                    <span class="nemo-hotels-services__service__icon" data-bind="css: \'nemo-hotels-services__service__icon_\' + $data, tooltip: {\n                        content: $parents[2].popularHotelsFeatures[$data]\n                    }"></span>\n                </li>\n            </ul>\n\n            <div class="nemo-hotels-results__hotelsGroup__footer nemo-hotels-results__content__sidebar__offer__footer">\n                <div class="nemo-ui-button nemo-ui-button_main nemo-hotels-results__hotelsGroup__footer__orderBtn nemo-hotels-results__content__sidebar__offer__footer__orderBtn"\n                     data-bind="click: function(hotel) { $parent.showCardHotel(hotel) }">\n\n                    <div class="nemo-hotels-results__hotelsGroup__footer__priceWrap">\n                        <span data-bind="text: $root.i18n(\'HotelsSearchResults\', \'from2\')"></span>\n\n                        <span class="nemo-hotels-results__hotelsGroup__footer__price">\n                            <money data-bind="money: priceObservable"></money>\n                        </span>\n\n                        <span class="nemo-hotels-results__hotelsGroup__footer__period" data-bind="text: $root.i18n(\'HotelsSearchResults\', \'for\') + \' \' + $parent.countOfNights() + \' \' + $parent.labelAfterNights()"></span>\n                    </div>\n\n                    <div class="nemo-hotels-results__hotelsGroup__footer__arrow"></div>\n                </div>\n            </div>\n        </div>\n    </li>\n</ul>\n',
e.f8f81cb55a6dc88141209d9faaa7c033='\x3c!-- ko foreach: hotels --\x3e\n<li class="nemo-hotels-results__content__sidebar__offer nemo-ui-subContainer nemo-hotels-results__hotelsGroup nemo-hotel__additional__viewed__item">\n\n    <div class="nemo-ui-subContainer__header\n                                    nemo-hotels-results__hotelsGroup__header\n                                    nemo-hotels-results__content__sidebar__offer__header\n                                    nemo-hotel__additional__viewed__item__header">\n\n        <div class="nemo-hotels-results__hotelsGroup__header__title\n                                        nemo-hotels-results__content__sidebar__offer__title\n                                        nemo-hotel__additional__viewed__item__title">\n\n            <a class="nemo-hotels-results__hotelsGroup__header__title__text\n                      nemo-hotels-results__content__sidebar__offer__title__text"\n               href="#"\n               data-bind="text: $data.name, click: function(hotel){ $parent.resultsController.showCardHotel(hotel) }, attr: { href: $parent.resultsController.makeHotelLink($data) }">\n            </a>\n\n            <div class="nemo-hotels-results__hotelsGroup__stars nemo-hotels-results__content__sidebar__offer__stars nemo-hotel__additional__viewed__item__stars" data-bind="foreach: $data.staticDataInfo.starRating">\n                <div class="nemo-hotels-results__hotelsGroup__stars__item nemo-hotels-results__content__sidebar__offer__starItem">\n                    <div class="nemo-hotels-results__hotelsGroup__stars__item__inner nemo-hotels-results__content__sidebar__offer__starItem__inner"></div>\n                </div>\n            </div>\n\n        </div>\n    </div>\n\n    <div class="nemo-ui-subContainer nemo-hotels-results__hotelsGroup__content nemo-hotels-results__content__sidebar__offer__content">\n\n        <div class="nemo-hotels-results__hotelsGroup__mainInfo">\n            <div class="nemo-hotels-results__hotelsGroup__mainInfo__photoWrap nemo-hotels-results__content__sidebar__offer__photoWrap"\n                 data-bind="style: {\'backgroundImage\': $parent.resultsController.getHotelMainImage($data) }, click: function(hotel){ $parent.resultsController.showCardHotel(hotel) }"></div>\n\n            \x3c!-- ko if: $data.staticDataInfo.averageCustomerRating --\x3e\n                <div class="nemo-hotels-results__hotelsGroup__mainInfo__rating nemo-hotels-results__content__sidebar__offer__rating nemo-hotel__additional__viewed__item__rating">\n                    <span class="nemo-hotels-results__hotelsGroup__mainInfo__rating__number nemo-hotels-results__content__sidebar__offer__rating__number" data-bind="text: $data.staticDataInfo.averageCustomerRating ? $data.staticDataInfo.averageCustomerRating.value : 0"></span>\n                    <span class="nemo-hotels-results__hotelsGroup__mainInfo__rating__text nemo-hotels-results__content__sidebar__offer__rating__text" data-bind="text: $data.staticDataInfo.averageCustomerRating ? $data.staticDataInfo.averageCustomerRating.description : $root.i18n(\'Hotels\', \'hotels-info-noReviews\')"></span>\n                </div>\n            \x3c!-- /ko --\x3e\n\n            <div class="nemo-hotels-results__hotelsGroup__mainInfo__infoBlock nemo-hotels-results__content__sidebar__offer__infoBlock">\n\n                <div class="nemo-hotels-results__hotelsGroup__mainInfo__infoWrap">\n                    <div class="nemo-hotels-results__hotelsGroup__mainInfo__addressWrap\n                                                    nemo-hotels-results__content__sidebar__offer__addressWrap\n                                                    nemo-hotel__additional__viewed__item__addressWrap">\n\n                        <div class="nemo-hotels-results__hotelsGroup__mainInfo__distances\n                                                        nemo-hotels-results__content__sidebar__offer__distances\n                                                        nemo-hotel__additional__viewed__item__distances"\n                             data-bind="css: {\'nemo-hotel__additional__viewed__item__distances__alone\': !$data.staticDataInfo.averageCustomerRating}">\n\n                                                <span class="nemo-hotels-results__hotelsGroup__mainInfo__distance\n                                                             nemo-hotels-results__content__sidebar__offer__distance"\n                                                            data-bind="visible: $parent.resultsController.getDistances($data)[0]"\n                                                >\n                                                    <span class="nemo-hotels-results__hotelsGroup__mainInfo__distance__value" data-bind="text: $parent.resultsController.getDistances($data)[0]"></span>\n                                                    <span class="nemo-hotels-results__hotelsGroup__mainInfo__distance__target" data-bind="i18n: \'HotelsSearchResults.targetFromCenter\'"></span>\n                                                </span>\n\n                                                <span class="nemo-hotels-results__hotelsGroup__mainInfo__distance nemo-hotels-results__content__sidebar__offer__distance"\n                                                      data-bind="visible: $parent.resultsController.getDistances($data)[1]">\n                                                    <span class="nemo-hotels-results__hotelsGroup__mainInfo__distance__value" data-bind="text: $parent.resultsController.getDistances($data)[1]"></span>\n                                                    <span class="nemo-hotels-results__hotelsGroup__mainInfo__distance__target" data-bind="i18n: \'HotelsSearchResults.targetFromAirport\'"></span>\n                                                </span>\n\n                            <a href="#" class="nemo-ui-pseudoLink nemo-hotels-results__hotelsGroup__mainInfo__mapLink nemo-hotels-results__content__sidebar__offer__mapLink"\n                               data-bind="click: function () { $parent.resultsController.showBigMap($data) }, i18n: \'HotelsSearchResults.map__button-show\'"></a>\n                        </div>\n\n                    </div>\n                </div>\n\n                <div class="nemo-hotels-results__hotelsGroup__mainInfo__description\n                                                nemo-hotels-results__content__sidebar__offer__description\n                                                nemo-hotel__additional__viewed__item__description\n                                                nemo-hotels-results__hotelsGroup__mainInfo__description-jquery-dotdotdot"\n                                                data-bind="visible: staticDataInfo.description"\n                >\n                    <p class="nemo-hotels-results__hotelsGroup__mainInfo__description__text\n                                                          nemo-hotel__additional__viewed__item__description__text" data-bind="html: staticDataInfo.description, click: function () { $parent.resultsController.showCardHotel($data) }">\n                    </p>\n                    <a href="#" data-bind="click: function () { $parent.resultsController.showCardHotel($data) }, attr: {href: $parent.resultsController.makeHotelLink($data) }" class="nemo-hotels-results__hotelsGroup__mainInfo__description__link\n                                                           nemo-hotels-results__content__sidebar__offer__description__link\n                                                           nemo-hotel__additional__viewed__item__description__link"></a>\n                </div>\n\n            </div>\n        </div>\n\n\t\t\x3c!-- ko if: $data.staticDataInfo.popularFeatures && $data.staticDataInfo.popularFeatures.length --\x3e\n\t\t\t<ul class="nemo-hotels-results__content__sidebar__offer__services nemo-hotels-services nemo-hotel__additional__viewed__item__services" data-bind="foreach: staticDataInfo.popularFeatures">\n\t\t\t\t<li class="nemo-hotels-results__content__sidebar__offer__services__service nemo-hotels-services__service hotels-services__service_active">\n\t\t\t\t\t<span class="nemo-hotels-services__service__icon" data-bind="css: \'nemo-hotels-services__service__icon_\' + $data, tooltip: { content: $parents[1].resultsController.popularHotelsFeatures[$data] }"></span>\n\t\t\t\t</li>\n\t\t\t</ul>\n\t\t\x3c!-- /ko --\x3e\n\n        <div class="nemo-hotels-results__hotelsGroup__footer nemo-hotels-results__content__sidebar__offer__footer nemo-hotel__additional__viewed__item__footer">\n            <div class="nemo-ui-button nemo-ui-button_main nemo-hotels-results__hotelsGroup__footer__orderBtn nemo-hotels-results__content__sidebar__offer__footer__orderBtn emo-hotel__additional__viewed__item__footer__button"\n                 data-bind="click: function () { $parent.resultsController.showCardHotel($data) }"\n            >\n                <div class="nemo-hotels-results__hotelsGroup__footer__priceWrap">\n                    <span class="nemo-hotels-results__hotelsGroup__footer__priceContainer nemo-hotel__additional__viewed__item__footer__button__priceContainer">\n                        <span data-bind="text: $root.i18n(\'HotelsSearchResults\', \'from2\')"></span>\n                        <span class="nemo-hotels-results__hotelsGroup__footer__priceContainer__price">\n                            <money data-bind="money: $data.priceObservable" round="up" format="0,0 $"></money>\n                        </span>\n                    </span>\n\n                    <span class="nemo-hotels-results__hotelsGroup__footer__period" data-bind="text: $root.i18n(\'HotelsSearchResults\', \'for\') + \' \' + $parent.resultsController.countOfNights() + \' \' + $parent.resultsController.labelAfterNights()"></span>\n                </div>\n                <div class="nemo-hotels-results__hotelsGroup__footer__arrow"></div>\n            </div>\n        </div>\n    </div>\n</li>\n\x3c!-- /ko --\x3e\n',e["7ef1efb1307ca823fb3b4eb3d3c506ff"]='<ul class="nemo-hotels-results__content__sidebar__offersList\n                   nemo-hotels-results__content__sidebar__loadingDummy__offersList">\n    <li class="nemo-hotels-results__content__sidebar__offer\n                       nemo-ui-subContainer nemo-hotels-results__hotelsGroup">\n        <div class="nemo-ui-subContainer__header\n                            nemo-hotels-results__hotelsGroup__header\n                            nemo-hotels-results__content__sidebar__offer__header">\n            <div class="nemo-hotels-results__hotelsGroup__header__title\n                                nemo-hotels-results__content__sidebar__offer__title">\n                        <span class="nemo-hotels-results__hotelsGroup__header__title__text\n                                     nemo-hotels-results__content__sidebar__offer__title__text\n                                     nemo-hotels-results__content__sidebar__loadingDummy__offer__title__text\n                                     nemo-hotels-results__content__results__loadingDummy__textItem"></span>\n                <div class="nemo-hotels-results__hotelsGroup__stars\n                                    nemo-hotels-results__content__sidebar__offer__stars\n                                    nemo-hotels-results__content__sidebar__loadingDummy__offer__stars">\n                    <div class="nemo-hotels-results__hotelsGroup__stars__item\n                                        nemo-hotels-results__content__sidebar__offer__starItem\n                                        nemo-hotels-results__content__sidebar__loadingDummy__offer__starItem">\n                        <div class="nemo-hotels-results__hotelsGroup__stars__item__inner\n                                            nemo-hotels-results__content__sidebar__offer__starItem__inner"></div>\n                    </div>\n                    <div class="nemo-hotels-results__hotelsGroup__stars__item\n                                        nemo-hotels-results__content__sidebar__offer__starItem\n                                        nemo-hotels-results__content__sidebar__loadingDummy__offer__starItem">\n                        <div class="nemo-hotels-results__hotelsGroup__stars__item__inner\n                                            nemo-hotels-results__content__sidebar__offer__starItem__inner"></div>\n                    </div>\n                    <div class="nemo-hotels-results__hotelsGroup__stars__item\n                                        nemo-hotels-results__content__sidebar__offer__starItem\n                                        nemo-hotels-results__content__sidebar__loadingDummy__offer__starItem">\n                        <div class="nemo-hotels-results__hotelsGroup__stars__item__inner\n                                            nemo-hotels-results__content__sidebar__offer__starItem__inner"></div>\n                    </div>\n                    <div class="nemo-hotels-results__hotelsGroup__stars__item\n                                        nemo-hotels-results__content__sidebar__offer__starItem\n                                        nemo-hotels-results__content__sidebar__loadingDummy__offer__starItem">\n                        <div class="nemo-hotels-results__hotelsGroup__stars__item__inner\n                                            nemo-hotels-results__content__sidebar__offer__starItem__inner"></div>\n                    </div>\n                </div>\n            </div>\n            <div class="nemo-hotels-results__hotelsGroup__header__additional nemo-hotels-results__content__sidebar__offer__additional" data-bind="i18n: \'HotelsSearchResults.header-flag__city-centre\'"></div>\n        </div>\n\n        <div class="nemo-ui-subContainer\n                            nemo-hotels-results__hotelsGroup__content\n                            nemo-hotels-results__content__sidebar__offer__content">\n            <div class="nemo-hotels-results__hotelsGroup__mainInfo">\n                <div class="nemo-hotels-results__hotelsGroup__mainInfo__photoWrap\n                                    nemo-hotels-results__content__sidebar__offer__photoWrap\n                                    nemo-hotels-results__content__sidebar__loadingDummy__offer__photoWrap"></div>\n                <div class="nemo-hotels-results__hotelsGroup__mainInfo__rating\n                                    nemo-hotels-results__content__sidebar__offer__rating\n                                    nemo-hotels-results__content__sidebar__loadingDummy__offer__rating">\n                            <span class="nemo-hotels-results__hotelsGroup__mainInfo__rating__number\n                                         nemo-hotels-results__content__sidebar__offer__rating__number\n                                         nemo-hotels-results__content__sidebar__loadingDummy__offer__rating__number"></span>\n                            <span class="nemo-hotels-results__hotelsGroup__mainInfo__rating__text\n                                         nemo-hotels-results__content__sidebar__offer__rating__text\n                                         nemo-hotels-results__content__sidebar__loadingDummy__offer__rating__text"></span>\n                            \x3c!--<span class="nemo-hotels-results__hotelsGroup__mainInfo__rating__link--\x3e\n                                         \x3c!--nemo-hotels-results__content__sidebar__offer__rating__link--\x3e\n                                         \x3c!--nemo-hotels-results__content__sidebar__loadingDummy__offer__rating__link"></span>--\x3e\n                </div>\n                <div class="nemo-hotels-results__hotelsGroup__mainInfo__infoBlock\n                                    nemo-hotels-results__content__sidebar__offer__infoBlock">\n                    <div class="nemo-hotels-results__hotelsGroup__mainInfo__infoWrap">\n                        <div class="nemo-hotels-results__hotelsGroup__mainInfo__addressWrap\n                                            nemo-hotels-results__content__sidebar__offer__addressWrap\n                                            nemo-hotels-results__content__sidebar__loadingDummy__offer__addressWrap">\n                            <div class="nemo-hotels-results__hotelsGroup__mainInfo__distances\n                                                nemo-hotels-results__content__sidebar__offer__distances\n                                                nemo-hotels-results__content__sidebar__loadingDummy__offer__distances">\n                                        <span class="nemo-hotels-results__hotelsGroup__mainInfo__distance\n                                                     nemo-hotels-results__content__sidebar__offer__distance\n                                                     nemo-hotels-results__content__sidebar__loadingDummy__offer__distance1"></span>\n                                        <span class="nemo-hotels-results__hotelsGroup__mainInfo__distance\n                                                     nemo-hotels-results__content__sidebar__offer__distance\n                                                     nemo-hotels-results__content__sidebar__loadingDummy__offer__distance2"></span>\n                                        <span class="nemo-ui-pseudoLink\n                                                     nemo-hotels-results__hotelsGroup__mainInfo__mapLink\n                                                     nemo-hotels-results__content__sidebar__offer__mapLink\n                                                     nemo-hotels-results__content__sidebar__loadingDummy__offer__mapLink"></span>\n                            </div>\n                        </div>\n                    </div>\n                    <div class="nemo-hotels-results__hotelsGroup__mainInfo__description\n                                        nemo-hotels-results__content__sidebar__offer__description\n                                        nemo-hotels-results__content__sidebar__loadingDummy__offer__description">\n                        <p class="nemo-hotels-results__hotelsGroup__mainInfo__description__text\n                                          nemo-hotels-results__content__sidebar__loadingDummy__offer__description__text\n                                          nemo-hotels-results__content__sidebar__loadingDummy__textItem"></p>\n                        <a href="#" class="nemo-hotels-results__hotelsGroup__mainInfo__description__link\n                                                   nemo-hotels-results__content__sidebar__offer__description__link"></a>\n                    </div>\n                </div>\n            </div>\n            <ul class="nemo-hotels-results__content__sidebar__loadingDummy__offer__services\n                               nemo-hotels-services">\n                <li class="nemo-hotels-results__content__sidebar__loadingDummy__offer__services__service"></li>\n                <li class="nemo-hotels-results__content__sidebar__loadingDummy__offer__services__service"></li>\n                <li class="nemo-hotels-results__content__sidebar__loadingDummy__offer__services__service"></li>\n                <li class="nemo-hotels-results__content__sidebar__loadingDummy__offer__services__service"></li>\n                <li class="nemo-hotels-results__content__sidebar__loadingDummy__offer__services__service"></li>\n                <li class="nemo-hotels-results__content__sidebar__loadingDummy__offer__services__service"></li>\n                <li class="nemo-hotels-results__content__sidebar__loadingDummy__offer__services__service"></li>\n                <li class="nemo-hotels-results__content__sidebar__loadingDummy__offer__services__service"></li>\n                <li class="nemo-hotels-results__content__sidebar__loadingDummy__offer__services__service"></li>\n                <li class="nemo-hotels-results__content__sidebar__loadingDummy__offer__services__service"></li>\n                <li class="nemo-hotels-results__content__sidebar__loadingDummy__offer__services__service"></li>\n                <li class="nemo-hotels-results__content__sidebar__loadingDummy__offer__services__service"></li>\n                <li class="nemo-hotels-results__content__sidebar__loadingDummy__offer__services__service"></li>\n                <li class="nemo-hotels-results__content__sidebar__loadingDummy__offer__services__service"></li>\n            </ul>\n            <div class="nemo-hotels-results__hotelsGroup__footer\n                                nemo-hotels-results__content__sidebar__offer__footer">\n                <div class="nemo-ui-button\n                                    nemo-ui-button_main\n                                    nemo-hotels-results__hotelsGroup__footer__orderBtn\n                                    nemo-hotels-results__content__sidebar__offer__footer__orderBtn\n                                    nemo-hotels-results__content__sidebar__loadingDummy__offer__footer__orderBtn">\n                    <div class="nemo-hotels-results__hotelsGroup__footer__priceWrap">\n                                <span class="nemo-hotels-results__hotelsGroup__footer__price\n                                             nemo-hotels-results__content__sidebar__loadingDummy__offer__footer__orderBtn__price"></span>\n                                <span class="nemo-hotels-results__hotelsGroup__footer__period\n                                             nemo-hotels-results__content__sidebar__loadingDummy__offer__footer__orderBtn__period"></span>\n                    </div>\n                    <div class="nemo-hotels-results__hotelsGroup__footer__arrow\n                                        nemo-hotels-results__content__sidebar__loadingDummy__offer__footer__orderBtn__arrow"></div>\n                </div>\n            </div>\n        </div>\n    </li>\n</ul>',e.f377e0fcee86d7c9ff610e468311429e='\x3c!-- ko foreach: Object.keys(filterValues).reverse() --\x3e\n<label class="nemo-common-postFilters__filterList__filter__checkboxesBlock__checkboxes__checkbox"\n       data-bind="visible: $parent.initialMinStarPrices[$data], css: {\'nemo-common-postFilters__filterList__filter__checkboxesBlock__checkboxes__checkbox_disabled\': !$parent.minStarPrices()[$data]}">\n\n    <input type="checkbox" class="nemo-common-postFilters__filterList__filter__checkboxesBlock__checkboxes__checkbox__input" data-bind="checked: $parent.filterValues[$data], enable: $parent.minStarPrices()[$data]">\n\n\t<span class="nemo-common-postFilters__filterList__filter__checkboxesBlock__checkboxes__checkbox__name nemo-common-postFilters__filterList__filter__checkboxesBlock__checkboxes__checkbox__name__stars">\n\t\t\x3c!-- ko if: parseInt($data) --\x3e\n\t\t\t\x3c!-- ko foreach: new Array(parseInt($data)) --\x3e\n\t\t\t\t<span class="nemo-common-postFilters__filterList__filter__checkboxesBlock__checkboxes__checkbox__name__stars__star"></span>\n\t\t\t\x3c!-- /ko --\x3e\n\t\t\x3c!-- /ko --\x3e\n\t\t\n\t\t\x3c!-- ko if: !parseInt($data) --\x3e\n\t\t\t<span data-bind="i18n: \'HotelsSearchResults.PF__filter__starsCount__unrated\'"></span>\n\t\t\x3c!-- /ko --\x3e\n\t</span>\n\n\t<span class="nemo-common-postFilters__filterList__filter__checkboxesBlock__checkboxes__checkbox__value">\n\t\t<span data-bind="text: ($root.i18n(\'HotelsSearchResults\', \'from2\'))"></span>\n\t\t<money data-bind="money: $parent.minStarPrices()[$data]" round="up" format="0,0 $"></money>\n\t</span>\n</label>\n\x3c!-- /ko --\x3e',e["0dd9f457f8f80b2828d06140ff39fd60"]='{\n  "FILE NOT FOUND":"FILE NOT FOUND"\n}',e["07fac3bb1ec8884dbbceceb6dffc9150"]='{\n\t"flights-step_search" : "Поиск авиабилетов",\n\t"flights-step_results" : "Результаты поиска",\n\t"flights-step_checkout" : "Оформление заказа"\n}',e["76da73d1a786d7b0983efb73c9d0ca12"]='{\n\t"leg__header" : "Перелет предоставлен авиакомпанией<br>[%-carrier-%]",\n\n\t"serviceClass_Economy" : "Эконом",\n\t"serviceClass_PremiumEconomy" : "Эконом-премиум",\n\t"serviceClass_Business" : "Бизнес",\n\t"serviceClass_First" : "Первый",\n\t"serviceClass_All" : "Неизвестно",\n\n\t"leg__transfer": "Пересадка",\n\t"leg__terminalChange": "Смена терминала",\n\n\t"leg__segment__departure__caption": "Аэропорт",\n\t"leg__segment__departure__terminal__caption": "Терминал",\n\t"leg__segment__arrival__caption": "Аэропорт",\n\t"leg__segment__arrival__terminal__caption": "Терминал",\n\t"leg__segment__carrier__caption": "Выполняет",\n\t"leg__segment__flightNumber__caption": "Рейс",\n\t"leg__segment__serviceClass__caption": "Класс",\n\t"leg__segment__aircraft__caption": "Самолет",\n\t"leg__segment__timeEnRoute__caption": "В пути",\n\t"leg__timeEnRoute__caption": "В пути"\n}',e["2614702aab9c0ae7377737fbe66bfd7b"]='{\n\t"select__title": "Предыдущие поиски",\n\t"RT__leg_0": "Туда",\n\t"RT__leg_1": "Обратно"\n}',e["604c46f7068dc679537d4850a9c1c6fc"]='{\n\t"serviceClass_All": "Любой",\n\t"serviceClass_Economy": "Эконом",\n\t"serviceClass_Business": "Бизнес",\n\t"serviceClass_First": "Первый",\n\n\t"triptype_OW": "В одну сторону",\n\t"triptype_RT": "Туда и обратно",\n\t"triptype_CR": "Сложный маршрут",\n\n\t"passengers_count_0": "Ни одного",\n\t"passengers_count_1": "Один",\n\t"passengers_count_2": "Два",\n\t"passengers_count_3": "Три",\n\t"passengers_count_4": "Четыре",\n\t"passengers_count_5": "Пять",\n\t"passengers_count_6": "Шесть",\n\t"passengers_count_7": "Семь",\n\t"passengers_count_8": "Восемь",\n\t"passengers_count_9": "Девять",\n\t"passengers_count_10": "Десять",\n\t"passengers_count_11": "Одиннадцать",\n\t"passengers_count_12": "Двенадцать",\n\n\t"passengerType_ADT_passSelectorName": "Взрослые",\n\t"passengerType_CLD_passSelectorName": "Дети",\n\t"passengerType_INF_passSelectorName": "Младенцы",\n\t"passengerType_INS_passSelectorName": "Младенцы с местом",\n\t"passengerType_YTH_passSelectorName": "Студенты",\n\t"passengerType_SRC_passSelectorName": "Пенсионеры",\n\n\t"passengerType_ADT_ageInfo": "от 12 лет",\n\t"passengerType_CLD_ageInfo": "2-12 лет",\n\t"passengerType_INF_ageInfo": "до 2 лет",\n\t"passengerType_INS_ageInfo": "до 2 лет",\n\t"passengerType_YTH_ageInfo": "12-16 лет",\n\t"passengerType_SRC_ageInfo": "от 60 лет",\n\n\t"passSummary_numeral_noPassengers": "Нет пассажиров",\n\n\t"passSummary_numeral_ADT_one": "взрослый",\n\t"passSummary_numeral_CLD_one": "ребенок",\n\t"passSummary_numeral_INF_one": "младенец",\n\t"passSummary_numeral_INS_one": "младенец с местом",\n\t"passSummary_numeral_YTH_one": "студент",\n\t"passSummary_numeral_SRC_one": "пенсионер",\n\t"passSummary_numeral_mixed_one": "пассажир",\n\n\t"passSummary_numeral_ADT_twoToFour": "взрослых",\n\t"passSummary_numeral_CLD_twoToFour": "ребенка",\n\t"passSummary_numeral_INF_twoToFour": "младенца",\n\t"passSummary_numeral_INS_twoToFour": "младенца с местом",\n\t"passSummary_numeral_YTH_twoToFour": "студента",\n\t"passSummary_numeral_SRC_twoToFour": "пенсионера",\n\t"passSummary_numeral_mixed_twoToFour": "пассажира",\n\n\t"passSummary_numeral_ADT_fourPlus": "взрослых",\n\t"passSummary_numeral_CLD_fourPlus": "детей",\n\t"passSummary_numeral_INF_fourPlus": "младенцев",\n\t"passSummary_numeral_INS_fourPlus": "младенцев с местом",\n\t"passSummary_numeral_YTH_fourPlus": "студентов",\n\t"passSummary_numeral_SRC_fourPlus": "пенсионеров",\n\t"passSummary_numeral_mixed_fourPlus": "пассажиров",\n\n\t"passSummary_fastSelect_lastConjunction": "и",\n\n\t"autocomplete_noResults": "Укажите город или аэропорт",\n\n\t"error_departure_noInput": "Укажите пункт вылета",\n\t"error_arrival_noInput": "Укажите пункт прилета",\n\t"error_arrival_sameAsDeparture": "Пункты вылета и прилета не могут совпадать",\n\t"error_departureDate_noInput": "Укажите дату вылета",\n\t"error_departureDate_notInOrder": "Даты должны идти по порядку",\n\t"error_departureDate_tooEraly": "Дата слишком рано",\n\t"error_departureDate_tooLate": "Дата слишком поздно",\n\n\t"error_passengers_noPassengers": "Нет пассажиров",\n\t"error_passengers_noAdults": "Укажите хотя бы одного взрослого",\n\n\t"error_searchBlocked": "Поменяйте что-нибудь",\n\n\t"searchError_requestFailed": "Поиск не удался, обратитесь к разработчику. (Провалился запрос)",\n\t"searchError_brokenJSON": "Поиск не удался, обратитесь к разработчику. (Некорректный ответ)",\n\t"searchError_systemError": "Поиск не удался, обратитесь к разработчику. (Ошибка на сервере)",\n\t"searchError_emptyResult": "Перелетов не найдено",\n\n\t"searchingInfo__title": "Идет поиск",\n\t"searchingInfo__header": "Пожалуйста, подождите",\n\t"searchingInfo__info": "Мы ищем [%-flightType-%] [%-class-%] по маршруту",\n\n\t"searchingInfo__class_All": "всех классов",\n\t"searchingInfo__class_Economy": "эконом-класса",\n\t"searchingInfo__class_Business": "бизнес-класса",\n\t"searchingInfo__class_First": "первого класса",\n\n\t"searchingInfo__flightType_OW": "перелеты в одну сторону",\n\t"searchingInfo__flightType_RT": "перелеты туда и обратно",\n\t"searchingInfo__flightType_CR": "составные перелеты",\n\n\t"searchingError__title": "Ошибка",\n\n\t"segments__departure__placeholder": "Откуда (город или аэропорт)",\n\t"segments__arrival__placeholder": "Куда (город или аэропорт)",\n\t"segments__switchToRT__text": "И обратно",\n\t"segments__CR__continueRoute__text": "Продолжить маршрут",\n\t"segments__date__placeholder": "Когда",\n\t"segments__date__placeholder_RT_leg_0": "Туда",\n\t"segments__date__placeholder_RT_leg_1": "Назад",\n\n\t"routeOptions__tripType__caption": "Маршрут",\n\t"routeOptions__serviceClass__caption": "Класс",\n\t"routeOptions__vicinityDates__caption": "Искать &plusmn;[%-dates-%] дня",\n\t"routeOptions__direct__caption": "Только прямые",\n\n\t"passengers__fullSelect__button__done": "Готово",\n\t"passengers__fastSelect__fullSelectOption": "Больше пассажиров",\n\t"passengers__fullSelect__title": "Пассажиры",\n\n\t"searchButton__text": "Найти",\n\n\t"additionalParameters__toggle": "Еще параметры",\n\t"additionalParameters__header": "Дополнительные пожелания",\n\t"additionalParameters__carrier__title": "Авиакомпании",\n\t"additionalParameters__carrier__loading": "Загружаем...",\n\t"additionalParameters__maxPrice__title": "Цена билетов",\n\t"additionalParameters__maxPrice__placeholder": "до",\n\t"additionalParameters__timeEnRoute__title": "Время в пути",\n\t"additionalParameters__transfers__title": "Пересадки",\n\t"additionalParameters__transfers__noTransfers__caption": "Без пересадок",\n\t"additionalParameters__transfers__shortTransfers__caption": "Только короткие (до 2 часов)"\n}',
e["0589a48ff9dd244bc1361d517555bd21"]='{\n\t"controls__count_all" : "Все билеты ([%-count-%])",\n\t"controls__count_filtered" : "Выбрано [%-count-%] из [%-total-%]",\n\n\t"sortType_price" : "Сначала дешевые",\n\t"sortType_durationOnLeg" : "По времени на плече",\n\t"sortType_rating" : "Сначала лучшие",\n\t"sortType_carrierRating" : "По рейтингу авиакомпании",\n\n\t"displayType__caption": "Показать",\n\t"displayType_tile": "Плиткой",\n\t"displayType_list": "Списком",\n\n\t"formDummy__route__rt__flight" : "Туда",\n\t"formDummy__route__rt__return" : "Обратно",\n\t"formDummy__switch" : "Изменить",\n\t"formDummy__filterSwitch": "Фильтрация",\n\n\t"compareTableSwitcher_open" : "Сравнительная таблица перелетов",\n\t"compareTableSwitcher_close" : "Скрыть",\n\n\t"flightsGroup__header_cheapest" : "Самый дешевый",\n\t"flightsGroup__header_fastest" : "Самый быстрый",\n  \t"flightsGroup__header_recommended" : "Лучший вариант",\n\n\t"flightsGroup__header_cheapest_fastest_recommended" : "Самый быстрый, дешевый и удобный",\n\t"flightsGroup__header_cheapest_fastest" : "Самый быстрый и дешевый",\n\t"flightsGroup__header_cheapest_recommended" : "Самый дешевый и удобный",\n\t"flightsGroup__header_fastest_recommended" : "Самый быстрый и удобный",\n\n\t"flightsGroup__rating__tooltip__header": "Рейтинг — [%-rating-%] из [%-maxRating-%]",\n\n\t"flightsGroup__subHeader__rating__caption": "Рейтинг авиакомпании",\n\t"flightsGroup__leg__selected__timeEnRoute": "в пути",\n\t"flightsGroup__leg__transfers__time__caption": "Пересадки",\n\t"flightsGroup__leg__transfers__noTransfers": "Прямой",\n\t"flightsGroup__leg__transfers_one": "пересадка",\n\t"flightsGroup__leg__transfers_twoToFour": "пересадки",\n\t"flightsGroup__leg__transfers_fourPlus": "пересадок",\n\t"flightsGroup__leg__info_caption": "Детали",\n\t"flightsGroup__leg__info__title": "Детали перелета",\n\t"flightsGroup__leg__arrival__nextDay": "следующий день",\n\t"flightsGroup__info__title": "Детали перелета",\n\n\t"flightsCompareTableDummy":"Загрузка данных...",\n\t"flightsCompareTable__unknownFlightTime":"Неизвестно",\n\t"flightsCompareTable__time":"Время:",\n\t"flightsCompareTable__buy":"Купить",\n\t"flightsCompareTable__checking":"Проверяем",\n\t"flightsCompareTable__disclaimerPrice":"Цена за всех пассажиров",\n\t"flightsCompareTable__disclaimerTime":"Везде указано местное время",\n\t"flightsCompareTable__goToTicket":"Перейти к билету",\n\t"flightsCompareTable__directFlights":"Прямые рейсы",\n\t"flightsCompareTable__transferFlights":"Рейсы с пересадками",\n\t"flightsCompareTable__showMore":"Еще варианты",\n\t"flightsCompareTable__showLess":"Свернуть",\n\t"flightsCompareTable__showAll":"Все варианты",\n\t"flightsCompareTable__transfers":"пересадка",\n    "flightsCompareTable__transfers__more":"пересадки",\n\t"flightsCompareTable__nextDay":"На следующий день",\n\t"flightsCompareTable__noCombinableFlight": "К сожалению, данная комбинация недоступна",\n\n\t"flightsGroup__header__carrierMismatch__header" : "Несколько перевозчиков",\n\t"flightsGroup__header__carrierMismatch__content" : "Перелет выполняется компанией [%-marketingCarrier-%], а также [%-operatingCarriers-%]",\n  \t"flightsGroup__header__carrierMismatch__carriersLastJoin" : " и ",\n\n\t"flightsGroup__selector__title" : "Вылет и прилет",\n\n\t"flightsGroup__selector__uncombinable_one" : "Не комбинируется с перелетом №[%-numbers-%]",\n\t"flightsGroup__selector__uncombinable_many" : "Не комбинируется с перелетами [%-numbers-%]",\n\t"flightsGroup__selector__uncombinable__lastConjunction" : " и ",\n\t\n\t"flightsGroup__selector__isCharter" : "Чартерный рейс",\n\n\t"flightsGroup__availSeats_one" : "место",\n\t"flightsGroup__availSeats_twoToFour" : "места",\n\t"flightsGroup__availSeats_fourPlus" : "мест",\n\n\t"flightsGroup__footer__passengersDisclaimer" : "Цена указана за всех пассажиров",\n\t"flightsGroup__footer__subagentProfit" : "Прибыль субагента:",\n\t\n\t"flightsGroup__footer__passengersDisclaimer_nonRefundable" : "Невозвратный билет",\n\t"flightsGroup__footer__passengersDisclaimer_refundable" : "Есть возможность возврата",\n\n\t"flightsGroup__couplingButton__text": "Еще",\n\t"flightsGroup__couplingButton__variants_many" : "10+ вариантов",\n\t"flightsGroup__couplingButton__variants_few" : "варианты",\n\n\t"flightsGroup__buyButton__checking": "Проверка мест",\n\n\t"couplingTable__title": "Рейсы авиакомпании",\n\n\t"couplingTable__sortHeader" : "Сортировка",\n\t"couplingTable__sortType_price" : "Цена",\n\t"couplingTable__sortType_timeEnRoute" : "Время в пути",\n\t"couplingTable__sortType_departureTime" : "Время вылета",\n\n\t"couplingTable__showAll": "Показать все варианты",\n\n\t"couplingTable__group__item__transfers_none" : "Без пересадок",\n\t"couplingTable__group__item__transfers_one" : "пересадка",\n\t"couplingTable__group__item__transfers_twoToFour" : "пересадки",\n\t"couplingTable__group__item__transfers_fourPlus" : "пересадок",\n\t"couplingTable__group__item__nextDayWarn": "Прилет на следующий день",\n\t"couplingTable__group__item__detailsText": "Детали",\n\t"couplingTable__group__item__buyButton": "Купить за",\n\t"couplingTable__group__item__buyButton__checking": "Проверка мест",\n\n\t"couplingTable__legInfo__title": "Информация о перелете",\n\n\t"couplingTable__infoColumn__priceFrom": "от",\n\t"couplingTable__infoColumn__select": "Выбрать",\n\n\t"travelPolicies__allAvailable": "Тревел политики доступны (перелет разрешен для всех)",\n\t"travelPolicies__allNotAvailable": "Тревел политики недоступны (перелет запрещен для всех)",\n\t"travelPolicies__someAvailable": "Тревел политики (есть ограничения)",\n\n\t"expirePopup__warning__title": "Поспешите",\n\t"expirePopup__warning__text": "Осталось не так много времени, пока результаты поиска не устарели.",\n\t"expirePopup__warning__button__continue": "Продолжить",\n\n\t"expirePopup__expired__title": "Результаты поиска устарели",\n\t"expirePopup__expired__text": "Попробуйте обновить результаты или начать поиск заново.",\n\t"expirePopup__expired__button__newSearch": "Начать заново",\n\t"expirePopup__expired__button__refresh": "Обновить",\n\n\t"loadingDummy__filters__title": "Загрузка",\n\t"loadingDummy__filters__text": "Фильтры будут показаны вскоре после того, как будут найдены билеты.",\n\t"loadingDummy__results__progressText": "Идет поиск",\n\t"loadingDummy__results__progressText_timed": "Пожалуйста, подождите еще немного",\n\t"loadingDummy__results__header": "Пожалуйста, подождите",\n\t"loadingDummy__results__progressText_matrix": "Идет поиск",\n\t"loadingDummy__results__progressText_matrix_timed": "Пожалуйста, подождите еще немного",\n\n\t"sort__caption": "Сортировка:",\n\n\t"groupsList__showMore": "Показать еще",\n\t"groupsList__noPFResults__header": "К сожалению, доступных вариантов нет",\n\t"groupsList__noPFResults__PFList__header": "Вы можете сбросить следующие фильтры:",\n\n\t"bestOffers__header": "Топ-[%-count-%] авиакомпаний",\n\t"bestOffers__text": "Обратите внимание на билеты от лучших авиакомпаний на рынке, это гарантия комфортного путешествия и качественного обслуживания.",\n\n\t"PF__hint": "Найти нужный билет — быстро и просто. Пользуйтесь фильтрами!",\n\t"PF__clearPF": "сбросить",\n\t"PF__clearAll": "Сбросить все фильтры",\n\t"PF__adaptive__closePF": "К билетам",\n\t"PF__adaptive__clearAll": "Сбросить",\n\n\n\t"PF__RTgroup__leg_all" : "Все",\n\t"PF__RTgroup__leg_0" :   "Туда",\n\t"PF__RTgroup__leg_1" :   "Обратно",\n\n\t"PF__name_price" :             "Цена",\n\t"PF__name_carrier" :           "Перевозчик",\n\t"PF__name_departureTime" :     "Время вылета",\n\t"PF__name_arrivalTime" :       "Время прибытия",\n\t"PF__name_departureAirport" :  "Аэропорт вылета",\n\t"PF__name_arrivalAirport" :    "Аэропорт прибытия",\n\t"PF__name_timeEnRoute" :       "Время в пути",\n\t"PF__name_transfersCount" :    "Пересадки",\n\t"PF__name_transfersDuration" : "Длительность пересадок",\n\t"PF__name_travelPolicies": "Тревел политики",\n\n\t"PF__value_clear": "Все равно",\n\n\t"PF__value_departureTime_n" : "Ночь",\n\t"PF__value_departureTime_m" : "Утро",\n\t"PF__value_departureTime_d" : "День",\n\t"PF__value_departureTime_e" : "Вечер",\n\n\t"PF__value_arrivalTime_n" : "Ночь",\n\t"PF__value_arrivalTime_m" : "Утро",\n\t"PF__value_arrivalTime_d" : "День",\n\t"PF__value_arrivalTime_e" : "Вечер",\n\n\t"PF__value_transfersCount_0" : "Прямые",\n\t"PF__value_transfersCount_1" : "1 пересадка",\n\t"PF__value_transfersCount_2" : "2 пересадки",\n\t"PF__value_transfersCount_3" : "3 пересадки",\n\t"PF__value_transfersCount_4" : "4 пересадки",\n\t"PF__value_transfersCount_5" : "5 пересадок",\n\t"PF__value_transfersCount_6" : "6 пересадок",\n\t"PF__value_transfersCount_7" : "7 пересадок",\n\n\t"error_404" : "Поиск не дал результатов",\n\t"error_410" : "Поиск не найден",\n\n\t"error_requestFailed": "Поиск не удался, обратитесь к разработчику. (Провалился запрос)",\n\t"error_brokenJSON": "Поиск не удался, обратитесь к разработчику. (Некорректный ответ)",\n\t"error_systemError": "Поиск не удался, обратитесь к разработчику. (Ошибка на сервере)",\n\t"error_emptyResult": "Поиск не дал результатов",\n\n\t"matrix__table__header_leg_0": "Туда",\n\t"matrix__table__header_leg_1": "Обратно",\n\t"matrix__table__emptyText":"",\n\t"matrix__table__impossibleText":"",\n\n\t"matrix__list__dateSelected__caption": "Выберите удобную вам дату вылета",\n\t"matrix__list__dateSelected__priceFrom": "от",\n\t"matrix__list__dateOption__priceFrom": "от",\n\t"matrix__list__dateOption__noFlights": "Нет перелетов в этот день",\n\t"matrix__list__selectableDate__noFlights": "Нет перелетов в этот день",\n\t"matrix__list__selectableDate__priceFrom": "от",\n\n\t"bookingCheck__error__title": "Произошла ошибка",\n\t"bookingCheck__error__header": "К сожалению, этот перелет нельзя забронировать",\n\t"bookingCheck__error__error_wrongResponse": "Ошибка на сервере",\n\t"bookingCheck__error__error_serverError": "Ошибка на сервере:",\n\t"bookingCheck__error__error_unavailable": "Компания не подтвердила наличия мест на этом перелете",\n\n\t"bookingCheck__priceChanged__title": "Цена изменилась",\n\t"bookingCheck__priceChanged__oldPriceMessage": "К сожалению, мы не смогли забронировать этот билет за",\n\t"bookingCheck__priceChanged__newPriceMessage": "Вы можете забронировать этот перелет по новой цене:",\n\t"bookingCheck__priceChanged__button_return": "К результатам",\n\t"bookingCheck__priceChanged__button_continue": "Забронировать"\n}',e.be7270991bdda7611c234afc0e59f0b7='{\n\t"popup_closeText" : "Закрыть",\n\n\t"nemoApp__globalError__noRoute": "Неизвестный URL."\n}',e["6906b55df75359bd33a873455288ca42"]='{\n\t"currency_EUR_n" : "Евро",\n\t"currency_EUR_s" : "€",\n\t"currency_EUR_c" : "EUR",\n\n\t"currency_USD_n" : "Американский Доллар",\n\t"currency_USD_s" : "$",\n\t"currency_USD_c" : "USD",\n\n\t"currency_UAH_n" : "Гривна",\n\t"currency_UAH_s" : "₴",\n\t"currency_UAH_c" : "UAH",\n\n\t"currency_RUB_n" : "Рубль",\n\t"currency_RUB_s" : "руб.",\n\t"currency_RUB_c" : "RUB"\n}',e["794726c91280a35ba69b1b1a3d9056af"]='{\n\t"month_1_f_n": "январь",\n\t"month_2_f_n": "февраль",\n\t"month_3_f_n": "март",\n\t"month_4_f_n": "Апрель",\n\t"month_5_f_n": "май",\n\t"month_6_f_n": "июнь",\n\t"month_7_f_n": "июль",\n\t"month_8_f_n": "август",\n\t"month_9_f_n": "сентябрь",\n\t"month_10_f_n": "октябрь",\n\t"month_11_f_n": "ноябрь",\n\t"month_12_f_n": "декабрь",\n\n\t"month_1_f": "января",\n\t"month_2_f": "февраля",\n\t"month_3_f": "марта",\n\t"month_4_f": "апреля",\n\t"month_5_f": "мая",\n\t"month_6_f": "июня",\n\t"month_7_f": "июля",\n\t"month_8_f": "августа",\n\t"month_9_f": "сентября",\n\t"month_10_f": "октября",\n\t"month_11_f": "ноября",\n\t"month_12_f": "декабря",\n\n\t"month_1_s_n": "янв",\n\t"month_2_s_n": "фев",\n\t"month_3_s_n": "мар",\n\t"month_4_s_n": "апр",\n\t"month_5_s_n": "май",\n\t"month_6_s_n": "июн",\n\t"month_7_s_n": "июл",\n\t"month_8_s_n": "авг",\n\t"month_9_s_n": "сен",\n\t"month_10_s_n": "окт",\n\t"month_11_s_n": "ноя",\n\t"month_12_s_n": "дек",\n\n\t"month_1_s": "янв",\n\t"month_2_s": "фев",\n\t"month_3_s": "мар",\n\t"month_4_s": "апр",\n\t"month_5_s": "мая",\n\t"month_6_s": "июн",\n\t"month_7_s": "июл",\n\t"month_8_s": "авг",\n\t"month_9_s": "сен",\n\t"month_10_s": "окт",\n\t"month_11_s": "ноя",\n\t"month_12_s": "дек",\n\n\t"dow_1_f": "понедельник",\n\t"dow_2_f": "вторник",\n\t"dow_3_f": "среда",\n\t"dow_4_f": "четверг",\n\t"dow_5_f": "пятница",\n\t"dow_6_f": "суббота",\n\t"dow_7_f": "воскресенье",\n\n\t"dow_1_s": "пн",\n\t"dow_2_s": "вт",\n\t"dow_3_s": "ср",\n\t"dow_4_s": "чт",\n\t"dow_5_s": "пт",\n\t"dow_6_s": "сб",\n\t"dow_7_s": "вс"\n}',e["44c6c75ccb7157fd1ef4025d64fb28b4"]='{\n\t"second_one" : "секунда",\n\t"second_twoToFour" : "секунды",\n\t"second_fourPlus" : "секунд",\n\n\t"minute_one" : "минута",\n\t"minute_twoToFour" : "минуты",\n\t"minute_fourPlus" : "минут",\n\n\t"hour_one" : "час",\n\t"hour_twoToFour" : "часа",\n\t"hour_fourPlus" : "часов",\n\n\t"day_one" : "день",\n\t"day_twoToFour" : "дня",\n\t"day_fourPlus" : "дней",\n\n\t"week_one" : "неделя",\n\t"week_twoToFour" : "недели",\n\t"week_fourPlus" : "недель",\n\n\t"month_one" : "месяц",\n\t"month_twoToFour" : "месяца",\n\t"month_fourPlus" : "месяцев",\n\n\t"year_one" : "год",\n\t"year_twoToFour" : "года",\n\t"year_fourPlus" : "лет",\n\n\t"second_short" : "сек",\n\t"minute_short" : "мин",\n\t"hour_short"   : "ч",\n\t"day_short"    : "дн",\n\t"week_short"   : "нед",\n\t"month_short"  : "мес",\n\t"year_short"   : "лет"\n\n}',e.fff7eed876317f7da271a1bd72a6ba90='{\n  "FlightsSearch": "Поиск авиабилетов",\n  "FlightsResults": "Результаты поиска"\n}',e}),define("js/vm/Common/Cache/JsVarsStorage",["js/vm/helpers","js/vm/Common/Cache/Storage","js/vm/Common/Cache/__cache"],function(e,t,i){function n(){}return e.extendModel(n,[t]),n.prototype.storage=i,n}),define("js/vm/Common/Cache/Cache",["js/vm/Common/Cache/Storage","js/vm/Common/Cache/JsVarsStorage"],function(e,t){function i(){}return i.storage=function(i){if((i=void 0===i?e.TYPE_JS:i)===e.TYPE_JS)return new t;throw new Error('Incorrect storage type "'+i+'"')},i}),function(e){"use strict";function t(e,t){var i=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(i>>16)<<16|65535&i}function i(e,t){return e<<t|e>>>32-t}function n(e,n,s,o,r,a){return t(i(t(t(n,e),t(o,a)),r),s)}function s(e,t,i,s,o,r,a){return n(t&i|~t&s,e,t,o,r,a)}function o(e,t,i,s,o,r,a){return n(t&s|i&~s,e,t,o,r,a)}function r(e,t,i,s,o,r,a){return n(t^i^s,e,t,o,r,a)}function a(e,t,i,s,o,r,a){return n(i^(t|~s),e,t,o,r,a)}function l(e,i){e[i>>5]|=128<<i%32,e[14+(i+64>>>9<<4)]=i;var n,l,c,u,h,d=1732584193,p=-271733879,f=-1732584194,_=271733878;for(n=0;n<e.length;n+=16)l=d,c=p,u=f,h=_,d=s(d,p,f,_,e[n],7,-680876936),_=s(_,d,p,f,e[n+1],12,-389564586),f=s(f,_,d,p,e[n+2],17,606105819),p=s(p,f,_,d,e[n+3],22,-1044525330),d=s(d,p,f,_,e[n+4],7,-176418897),_=s(_,d,p,f,e[n+5],12,1200080426),f=s(f,_,d,p,e[n+6],17,-1473231341),p=s(p,f,_,d,e[n+7],22,-45705983),d=s(d,p,f,_,e[n+8],7,1770035416),_=s(_,d,p,f,e[n+9],12,-1958414417),f=s(f,_,d,p,e[n+10],17,-42063),p=s(p,f,_,d,e[n+11],22,-1990404162),d=s(d,p,f,_,e[n+12],7,1804603682),_=s(_,d,p,f,e[n+13],12,-40341101),f=s(f,_,d,p,e[n+14],17,-1502002290),p=s(p,f,_,d,e[n+15],22,1236535329),d=o(d,p,f,_,e[n+1],5,-165796510),_=o(_,d,p,f,e[n+6],9,-1069501632),f=o(f,_,d,p,e[n+11],14,643717713),p=o(p,f,_,d,e[n],20,-373897302),d=o(d,p,f,_,e[n+5],5,-701558691),_=o(_,d,p,f,e[n+10],9,38016083),f=o(f,_,d,p,e[n+15],14,-660478335),p=o(p,f,_,d,e[n+4],20,-405537848),d=o(d,p,f,_,e[n+9],5,568446438),_=o(_,d,p,f,e[n+14],9,-1019803690),f=o(f,_,d,p,e[n+3],14,-187363961),p=o(p,f,_,d,e[n+8],20,1163531501),d=o(d,p,f,_,e[n+13],5,-1444681467),_=o(_,d,p,f,e[n+2],9,-51403784),f=o(f,_,d,p,e[n+7],14,1735328473),p=o(p,f,_,d,e[n+12],20,-1926607734),d=r(d,p,f,_,e[n+5],4,-378558),_=r(_,d,p,f,e[n+8],11,-2022574463),f=r(f,_,d,p,e[n+11],16,1839030562),p=r(p,f,_,d,e[n+14],23,-35309556),d=r(d,p,f,_,e[n+1],4,-1530992060),_=r(_,d,p,f,e[n+4],11,1272893353),f=r(f,_,d,p,e[n+7],16,-155497632),p=r(p,f,_,d,e[n+10],23,-1094730640),d=r(d,p,f,_,e[n+13],4,681279174),_=r(_,d,p,f,e[n],11,-358537222),f=r(f,_,d,p,e[n+3],16,-722521979),p=r(p,f,_,d,e[n+6],23,76029189),d=r(d,p,f,_,e[n+9],4,-640364487),_=r(_,d,p,f,e[n+12],11,-421815835),f=r(f,_,d,p,e[n+15],16,530742520),p=r(p,f,_,d,e[n+2],23,-995338651),d=a(d,p,f,_,e[n],6,-198630844),_=a(_,d,p,f,e[n+7],10,1126891415),f=a(f,_,d,p,e[n+14],15,-1416354905),p=a(p,f,_,d,e[n+5],21,-57434055),d=a(d,p,f,_,e[n+12],6,1700485571),_=a(_,d,p,f,e[n+3],10,-1894986606),f=a(f,_,d,p,e[n+10],15,-1051523),p=a(p,f,_,d,e[n+1],21,-2054922799),d=a(d,p,f,_,e[n+8],6,1873313359),_=a(_,d,p,f,e[n+15],10,-30611744),f=a(f,_,d,p,e[n+6],15,-1560198380),p=a(p,f,_,d,e[n+13],21,1309151649),d=a(d,p,f,_,e[n+4],6,-145523070),_=a(_,d,p,f,e[n+11],10,-1120210379),f=a(f,_,d,p,e[n+2],15,718787259),p=a(p,f,_,d,e[n+9],21,-343485551),d=t(d,l),p=t(p,c),f=t(f,u),_=t(_,h);return[d,p,f,_]}function c(e){var t,i="",n=32*e.length;for(t=0;n>t;t+=8)i+=String.fromCharCode(e[t>>5]>>>t%32&255);return i}function u(e){var t,i=[];for(i[(e.length>>2)-1]=void 0,t=0;t<i.length;t+=1)i[t]=0;var n=8*e.length;for(t=0;n>t;t+=8)i[t>>5]|=(255&e.charCodeAt(t/8))<<t%32;return i}function h(e){return c(l(u(e),8*e.length))}function d(e,t){var i,n,s=u(e),o=[],r=[];for(o[15]=r[15]=void 0,s.length>16&&(s=l(s,8*e.length)),i=0;16>i;i+=1)o[i]=909522486^s[i],r[i]=1549556828^s[i];return n=l(o.concat(u(t)),512+8*t.length),c(l(r.concat(n),640))}function p(e){var t,i,n="0123456789abcdef",s="";for(i=0;i<e.length;i+=1)t=e.charCodeAt(i),s+=n.charAt(t>>>4&15)+n.charAt(15&t);return s}function f(e){return unescape(encodeURIComponent(e))}function _(e){return h(f(e))}function m(e){return p(_(e))}function g(e,t){return d(f(e),f(t))}function v(e,t){return p(g(e,t))}function b(e,t,i){return t?i?g(t,e):v(t,e):i?_(e):m(e)}"function"==typeof define&&define.amd?define("js/lib/md5/md5",[],function(){return b}):"object"==typeof module&&module.exports?module.exports=b:e.md5=b}(this),define("js/vm/Common/Money",["knockout","js/vm/helpers","js/vm/BaseDynamicModel","js/vm/BaseI18nizedModel"],function(e,t,i,n){function s(t){i.apply(this,arguments),this.normalizedAmount=e.computed(function(){return Math.round(100*this.amount())/100},this),this.getAbs=function(){var e=this.amount()<0?-1*this.amount():this.amount();return this.$$controller.getModel("Common/Money",{amount:e,currency:this.currency()})},this.add=function(e){return e instanceof s?this.amount(this.amount()+e.amount()):this.amount(this.amount()+e),this},this.divide=function(e){return e instanceof s?this.amount(this.amount()/e.amount()):this.amount(this.amount()/e),this}}return t.extendModel(s,[i,n]),s}),function(){function e(e){this._value=e}function t(e,t,i,n){var s,o,r=Math.pow(10,t);return o=(i(t?e+"e+"+t:e*r)/r).toFixed(t),n&&(s=new RegExp("0{1,"+n+"}$"),o=o.replace(s,"")),o}function i(e,t,i){return t.indexOf("$")>-1?s(e,t,i):t.indexOf("%")>-1?o(e,t,i):t.indexOf(":")>-1?r(e):l(e._value,t,i)}function n(e,t){var i,n,s,o,r,l=t,c=["KB","MB","GB","TB","PB","EB","ZB","YB"],u=!1;if(t.indexOf(":")>-1)e._value=a(t);else if(t===_)e._value=0;else{for("."!==p[f].delimiters.decimal&&(t=t.replace(/\./g,"").replace(p[f].delimiters.decimal,".")),i=new RegExp("[^a-zA-Z]"+p[f].abbreviations.thousand+"(?:\\)|(\\"+p[f].currency.symbol+")?(?:\\))?)?$"),n=new RegExp("[^a-zA-Z]"+p[f].abbreviations.million+"(?:\\)|(\\"+p[f].currency.symbol+")?(?:\\))?)?$"),s=new RegExp("[^a-zA-Z]"+p[f].abbreviations.billion+"(?:\\)|(\\"+p[f].currency.symbol+")?(?:\\))?)?$"),o=new RegExp("[^a-zA-Z]"+p[f].abbreviations.trillion+"(?:\\)|(\\"+p[f].currency.symbol+")?(?:\\))?)?$"),r=0;r<=c.length&&!(u=t.indexOf(c[r])>-1&&Math.pow(1024,r+1));r++);e._value=(u||1)*(l.match(i)?Math.pow(10,3):1)*(l.match(n)?Math.pow(10,6):1)*(l.match(s)?Math.pow(10,9):1)*(l.match(o)?Math.pow(10,12):1)*(t.indexOf("%")>-1?.01:1)*((t.split("-").length+Math.min(t.split("(").length-1,t.split(")").length-1))%2?1:-1)*Number(t.replace(/[^0-9\.]+/g,"")),e._value=u?Math.ceil(e._value):e._value}return e._value}function s(e,t,i){var n,s,o=t.indexOf("$"),r=t.indexOf("("),a=t.indexOf("-"),c="";return t.indexOf(" $")>-1?(c=" ",t=t.replace(" $","")):t.indexOf("$ ")>-1?(c=" ",t=t.replace("$ ","")):t=t.replace("$",""),s=l(e._value,t,i),1>=o?s.indexOf("(")>-1||s.indexOf("-")>-1?(s=s.split(""),n=1,(r>o||a>o)&&(n=0),s.splice(n,0,p[f].currency.symbol+c),s=s.join("")):s=p[f].currency.symbol+c+s:s.indexOf(")")>-1?(s=s.split(""),s.splice(-1,0,c+p[f].currency.symbol),s=s.join("")):s=s+c+p[f].currency.symbol,s}function o(e,t,i){var n,s="",o=100*e._value;return t.indexOf(" %")>-1?(s=" ",t=t.replace(" %","")):t=t.replace("%",""),n=l(o,t,i),n.indexOf(")")>-1?(n=n.split(""),n.splice(-1,0,s+"%"),n=n.join("")):n=n+s+"%",n}function r(e){var t=Math.floor(e._value/60/60),i=Math.floor((e._value-60*t*60)/60),n=Math.round(e._value-60*t*60-60*i);return t+":"+(10>i?"0"+i:i)+":"+(10>n?"0"+n:n)}function a(e){var t=e.split(":"),i=0;return 3===t.length?(i+=60*Number(t[0])*60,i+=60*Number(t[1]),i+=Number(t[2])):2===t.length&&(i+=60*Number(t[0]),i+=Number(t[1])),Number(i)}function l(e,i,n){var s,o,r,a,l,c,u=!1,h=!1,d=!1,m="",g=!1,v=!1,b=!1,y=!1,T=!1,w="",x="",C=Math.abs(e),S=["B","KB","MB","GB","TB","PB","EB","ZB","YB"],k="",D=!1;if(0===e&&null!==_)return _;if(i.indexOf("(")>-1?(u=!0,i=i.slice(1,-1)):i.indexOf("+")>-1&&(h=!0,i=i.replace(/\+/g,"")),i.indexOf("a")>-1&&(g=i.indexOf("aK")>=0,v=i.indexOf("aM")>=0,b=i.indexOf("aB")>=0,y=i.indexOf("aT")>=0,T=g||v||b||y,i.indexOf(" a")>-1?(m=" ",i=i.replace(" a","")):i=i.replace("a",""),C>=Math.pow(10,12)&&!T||y?(m+=p[f].abbreviations.trillion,e/=Math.pow(10,12)):C<Math.pow(10,12)&&C>=Math.pow(10,9)&&!T||b?(m+=p[f].abbreviations.billion,e/=Math.pow(10,9)):C<Math.pow(10,9)&&C>=Math.pow(10,6)&&!T||v?(m+=p[f].abbreviations.million,e/=Math.pow(10,6)):(C<Math.pow(10,6)&&C>=Math.pow(10,3)&&!T||g)&&(m+=p[f].abbreviations.thousand,e/=Math.pow(10,3))),i.indexOf("b")>-1)for(i.indexOf(" b")>-1?(w=" ",i=i.replace(" b","")):i=i.replace("b",""),r=0;r<=S.length;r++)if(s=Math.pow(1024,r),o=Math.pow(1024,r+1),e>=s&&o>e){w+=S[r],s>0&&(e/=s);break}return i.indexOf("o")>-1&&(i.indexOf(" o")>-1?(x=" ",i=i.replace(" o","")):i=i.replace("o",""),x+=p[f].ordinal(e)),i.indexOf("[.]")>-1&&(d=!0,i=i.replace("[.]",".")),a=e.toString().split(".")[0],l=i.split(".")[1],c=i.indexOf(","),l?(l.indexOf("[")>-1?(l=l.replace("]",""),l=l.split("["),k=t(e,l[0].length+l[1].length,n,l[1].length)):k=t(e,l.length,n),a=k.split(".")[0],k=k.split(".")[1].length?p[f].delimiters.decimal+k.split(".")[1]:"",d&&0===Number(k.slice(1))&&(k="")):a=t(e,null,n),a.indexOf("-")>-1&&(a=a.slice(1),D=!0),c>-1&&(a=a.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1"+p[f].delimiters.thousands)),0===i.indexOf(".")&&(a=""),(u&&D?"(":"")+(!u&&D?"-":"")+(!D&&h?"+":"")+a+k+(x||"")+(m||"")+(w||"")+(u&&D?")":"")}function c(e,t){p[e]=t}function u(e){var t=e.toString().split(".");return t.length<2?1:Math.pow(10,t[1].length)}function h(){return Array.prototype.slice.call(arguments).reduce(function(e,t){var i=u(e),n=u(t);return i>n?i:n},-1/0)}var d,p={},f="en",_=null,m="0,0",g="undefined"!=typeof module&&module.exports;d=function(t){return d.isNumeral(t)?t=t.value():0===t||void 0===t?t=0:Number(t)||(t=d.fn.unformat(t)),new e(Number(t))},d.version="1.5.3",d.isNumeral=function(t){return t instanceof e},d.language=function(e,t){if(!e)return f;if(e&&!t){if(!p[e])throw new Error("Unknown language : "+e);f=e}return(t||!p[e])&&c(e,t),d},d.languageData=function(e){if(!e)return p[f];if(!p[e])throw new Error("Unknown language : "+e);return p[e]},d.language("en",{delimiters:{thousands:",",decimal:"."},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},ordinal:function(e){var t=e%10;return 1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th"},currency:{symbol:"$"}}),d.zeroFormat=function(e){_="string"==typeof e?e:null},d.defaultFormat=function(e){m="string"==typeof e?e:"0.0"},"function"!=typeof Array.prototype.reduce&&(Array.prototype.reduce=function(e,t){"use strict";if(null===this||void 0===this)throw new TypeError("Array.prototype.reduce called on null or undefined");if("function"!=typeof e)throw new TypeError(e+" is not a function");var i,n,s=this.length>>>0,o=!1;for(1<arguments.length&&(n=t,o=!0),i=0;s>i;++i)this.hasOwnProperty(i)&&(o?n=e(n,this[i],i,this):(n=this[i],o=!0));if(!o)throw new TypeError("Reduce of empty array with no initial value");return n}),d.fn=e.prototype={clone:function(){return d(this)},format:function(e,t){return i(this,e||m,void 0!==t?t:Math.round)},unformat:function(e){return"[object Number]"===Object.prototype.toString.call(e)?e:n(this,e||m)},value:function(){return this._value},valueOf:function(){return this._value},set:function(e){return this._value=Number(e),this},add:function(e){function t(e,t){return e+i*t}var i=h.call(null,this._value,e);return this._value=[this._value,e].reduce(t,0)/i,this},subtract:function(e){function t(e,t){return e-i*t}var i=h.call(null,this._value,e);return this._value=[e].reduce(t,this._value*i)/i,this},multiply:function(e){function t(e,t){var i=h(e,t);return e*i*t*i/(i*i)}return this._value=[this._value,e].reduce(t,1),this},divide:function(e){function t(e,t){var i=h(e,t);return e*i/(t*i)}return this._value=[this._value,e].reduce(t),this},difference:function(e){return Math.abs(d(this._value).subtract(e).value())}},g&&(module.exports=d),"undefined"==typeof ender&&(this.numeral=d),"function"==typeof define&&define.amd&&define("numeralJS",[],function(){return d})}.call(this),function(e){if("function"==typeof define&&define.amd)define("jsCookie",e);else if("object"==typeof exports)module.exports=e();else{var t=window.Cookies,i=window.Cookies=e(window.jQuery);i.noConflict=function(){return window.Cookies=t,i}}}(function(){function e(){for(var e=0,t={};e<arguments.length;e++){var i=arguments[e];for(var n in i)t[n]=i[n]}return t}function t(i){function n(t,s,o){var r;if(arguments.length>1){if(o=e({path:"/"},n.defaults,o),"number"==typeof o.expires){var a=new Date;a.setMilliseconds(a.getMilliseconds()+864e5*o.expires),o.expires=a}try{r=JSON.stringify(s),/^[\{\[]/.test(r)&&(s=r)}catch(e){}return s=encodeURIComponent(String(s)),s=s.replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),t=encodeURIComponent(String(t)),t=t.replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent),t=t.replace(/[\(\)]/g,escape),document.cookie=[t,"=",s,o.expires&&"; expires="+o.expires.toUTCString(),o.path&&"; path="+o.path,o.domain&&"; domain="+o.domain,o.secure&&"; secure"].join("")}t||(r={});for(var l=document.cookie?document.cookie.split("; "):[],c=/(%[0-9A-Z]{2})+/g,u=0;u<l.length;u++){var h=l[u].split("="),d=h[0].replace(c,decodeURIComponent),p=h.slice(1).join("=");if('"'===p.charAt(0)&&(p=p.slice(1,-1)),p=i&&i(p,d)||p.replace(c,decodeURIComponent),this.json)try{p=JSON.parse(p)}catch(e){}if(t===d){r=p;break}t||(r[d]=p)}return r}return n.get=n.set=n,n.getJSON=function(){return n.apply({json:!0},[].slice.call(arguments))},n.defaults={},n.remove=function(t,i){n(t,"",e(i,{expires:-1}))},n.withConverter=t,n}return t()}),define("js/lib/jquery.currencyConverter/jquery.currencyConverter",["jquery","jsCookie"],function(e,t){!function(e){e.fn.currencyConverter=function(i){function n(e){var t;for(l("Setting locale for numeral"),numeral.language(d.numeralLocaleName,f),numeral.language(d.numeralLocaleName),e&&(p=null),a(),t=0;t<p.length;t++)s(p.eq(t),_)}function s(t,i){var n,s=parseFloat(t.attr("amount"),10),a=t.attr("currency"),u=t.attr("force-currency"),h=t.attr("currency-class"),p=e.trim(t.attr("format"))||d.defaultFormat,f=d.roundingFunction,_=t.attr("round");if(null!=a){if(void 0!==u&&(i=u),null==i&&a in d.currencyFixedFormat&&(p=d.currencyFixedFormat[a]),i in d.currencyFixedFormat&&"$"!=p&&(p=d.currencyFixedFormat[i]),i&&a&&i!==a&&(_="normal"),a=a.toUpperCase(),l("Processing element",t,"conversion to",i),isNaN(s)&&(s=0,c("Amount of element is NaN! Setting to 0")),void 0===i||null==i?(i=a,l("No translation set! Currency is set to",i)):void 0!==d.conversionTable[a]?void 0!==d.conversionTable[i]?s=o(s,a,i):(i=a,c("WANRING!!! Can not convert currency: no conversion data on OUTPUT CURRENCY",i,t)):(i=a,c("WANRING!!! Can not convert currency: no conversion data on ORIGINAL CURRENCY",a,t)),i=i.toUpperCase(),_)switch(_.toLowerCase()){case"up":f=Math.ceil;break;case"down":f=Math.floor;break;case"normal":f=Math.round}n=r(s,i,p,f,h),t.html(n)}}function o(e,t,i){return t.toUpperCase()!=i.toUpperCase()&&(e/=d.conversionTable[t],e*=d.conversionTable[i]),e}function r(t,i,n,s,o){var r=i;return l("Formatting:",t,i,n),"name"==d.currencyType&&void 0!==d.currencyNames[i]?r=d.currencyNames[i]:"symbol"==d.currencyType&&void 0!==d.currencySymbols[i]&&(r=d.currencySymbols[i]),f.currency.symbol='<currency type="'+d.currencyType+'" currency="'+i+'"'+(o?' class="'+o+'"':"")+">"+r+"</currency>","$"==e.trim(n)?f.currency.symbol:numeral(t).format(n,s)}function a(){return null!=p&&d.useCache||(l("Repopulating cache"),p=u.find(d.selector)),p}function l(){d.debug&&"undefined"!=typeof console&&"function"==typeof console.log&&console.log.apply(console,arguments)}function c(){d.debug&&"undefined"!=typeof console&&"function"==typeof console.error&&console.error.apply(console,arguments)}var u=this,h={selector:"money",defaultCurrency:null,conversionTable:null,useCache:!0,defaultFormat:"0,0.00 $",currencyType:"code",currencySymbols:{USD:"$",UAH:"₴",EUR:"€",JPY:"¥",GBP:"£",ILS:"₪",PLN:"zł",RUB:"руб",BYR:"p.",AZN:"&#8380;"},currencyFixedFormat:{EUR:"0,0.00 $",USD:"0,0.00 $",GBP:"0,0.00 $",AZN:"0,0.00 $",GEL:"0,0.00 $",BYR:"0,0 $",KZT:"0,0 $",UZS:"0,0 $"},currencyNames:{},roundingFunction:Math.ceil,thousandsDelimiter:" ",decimalDelimiter:".",numeralLocaleName:"currencyConverter-CUSTOM",debug:!1},d=e.extend(h,i||{}),p=null,f={delimiters:{thousands:d.thousandsDelimiter,decimal:d.decimalDelimiter},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},ordinal:function(e){var t=e%10;return 1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th"},currency:{symbol:""}},_=t.get("ccCurrency");return l("Initializing on",u,"Options:",d),null==d.defaultCurrency?void c("No default currency defined! Terminating.",d):null==d.conversionTable?void c("No conversion table defined! Terminating.",d):(void 0===d.conversionTable[d.defaultCurrency]&&(d.conversionTable[d.defaultCurrency]=1),l("All looks OK",d,"Binding handlers"),u.on("cc:updated",function(t){l("Setting locale for numeral"),numeral.language(d.numeralLocaleName,f),numeral.language(d.numeralLocaleName),s(e(t.target),_)}).on("cc:changeCurrency",function(e,i){console.log(i),_=null,void 0!==i&&void 0!==i.currency&&(_=i.currency),l("Changing currency to",_),t.set("ccCurrency",_,{expires:365}),n()}).on("cc:reInit",function(e){n(!0)}),l("Handlers bound. Triggering init event"),void u.eq(0).trigger("cc:reInit"))}}(e)}),define("js/lib/jquery.tooltipster/v.3.3.0/jquery.tooltipster.min",["jquery"],function(e){!function(e,t,i){function n(t,i){this.bodyOverflowX,this.callbacks={hide:[],show:[]},this.checkInterval=null,this.Content,this.$el=e(t),this.$elProxy,this.elProxyPosition,this.enabled=!0,this.options=e.extend({},a,i),this.mouseIsOverProxy=!1,this.namespace="tooltipster-"+Math.round(1e5*Math.random()),this.Status="hidden",this.timerHide=null,this.timerShow=null,this.$tooltip,this.options.iconTheme=this.options.iconTheme.replace(".",""),this.options.theme=this.options.theme.replace(".",""),this._init()}function s(t,i){var n=!0;return e.each(t,function(e,s){if(void 0===i[e]||t[e]!==i[e])return n=!1,!1}),n}function o(){return!c&&l}function r(){var e=i.body||i.documentElement,t=e.style,n="transition";if("string"==typeof t[n])return!0;v=["Moz","Webkit","Khtml","O","ms"],n=n.charAt(0).toUpperCase()+n.substr(1);for(var s=0;s<v.length;s++)if("string"==typeof t[v[s]+n])return!0;return!1}var a={animation:"fade",arrow:!0,arrowColor:"",autoClose:!0,content:null,contentAsHTML:!1,contentCloning:!0,debug:!0,delay:200,minWidth:0,maxWidth:null,functionInit:function(e,t){},functionBefore:function(e,t){t()},functionReady:function(e,t){},functionAfter:function(e){},
hideOnClick:!1,icon:"(?)",iconCloning:!0,iconDesktop:!1,iconTouch:!1,iconTheme:"tooltipster-icon",interactive:!1,interactiveTolerance:350,multiple:!1,offsetX:0,offsetY:0,onlyOne:!1,position:"top",positionTracker:!1,positionTrackerCallback:function(e){"hover"==this.option("trigger")&&this.option("autoClose")&&this.hide()},restoration:"current",speed:350,timer:0,theme:"tooltipster-default",touchDevices:!0,trigger:"hover",updateAnimation:!0};n.prototype={_init:function(){var t=this;if(i.querySelector){var n=null;void 0===t.$el.data("tooltipster-initialTitle")&&(n=t.$el.attr("title"),void 0===n&&(n=null),t.$el.data("tooltipster-initialTitle",n)),null!==t.options.content?t._content_set(t.options.content):t._content_set(n);var s=t.options.functionInit.call(t.$el,t.$el,t.Content);void 0!==s&&t._content_set(s),t.$el.removeAttr("title").addClass("tooltipstered"),!l&&t.options.iconDesktop||l&&t.options.iconTouch?("string"==typeof t.options.icon?(t.$elProxy=e('<span class="'+t.options.iconTheme+'"></span>'),t.$elProxy.text(t.options.icon)):t.options.iconCloning?t.$elProxy=t.options.icon.clone(!0):t.$elProxy=t.options.icon,t.$elProxy.insertAfter(t.$el)):t.$elProxy=t.$el,"hover"==t.options.trigger?(t.$elProxy.on("mouseenter."+t.namespace,function(){o()&&!t.options.touchDevices||(t.mouseIsOverProxy=!0,t._show())}).on("mouseleave."+t.namespace,function(){o()&&!t.options.touchDevices||(t.mouseIsOverProxy=!1)}),l&&t.options.touchDevices&&t.$elProxy.on("touchstart."+t.namespace,function(){t._showNow()})):"click"==t.options.trigger&&t.$elProxy.on("click."+t.namespace,function(){o()&&!t.options.touchDevices||t._show()})}},_show:function(){var e=this;"shown"!=e.Status&&"appearing"!=e.Status&&(e.options.delay?e.timerShow=setTimeout(function(){("click"==e.options.trigger||"hover"==e.options.trigger&&e.mouseIsOverProxy)&&e._showNow()},e.options.delay):e._showNow())},_showNow:function(i){var n=this;n.options.functionBefore.call(n.$el,n.$el,function(){if(n.enabled&&null!==n.Content){i&&n.callbacks.show.push(i),n.callbacks.hide=[],clearTimeout(n.timerShow),n.timerShow=null,clearTimeout(n.timerHide),n.timerHide=null,n.options.onlyOne&&e(".tooltipstered").not(n.$el).each(function(t,i){var n=e(i),s=n.data("tooltipster-ns");e.each(s,function(e,t){var i=n.data(t),s=i.status(),o=i.option("autoClose");"hidden"!==s&&"disappearing"!==s&&o&&i.hide()})});var s=function(){n.Status="shown",e.each(n.callbacks.show,function(e,t){t.call(n.$el)}),n.callbacks.show=[]};if("hidden"!==n.Status){var o=0;"disappearing"===n.Status?(n.Status="appearing",r()?(n.$tooltip.clearQueue().removeClass("tooltipster-dying").addClass("tooltipster-"+n.options.animation+"-show"),n.options.speed>0&&n.$tooltip.delay(n.options.speed),n.$tooltip.queue(s)):n.$tooltip.stop().fadeIn(s)):"shown"===n.Status&&s()}else{n.Status="appearing";var o=n.options.speed;n.bodyOverflowX=e("body").css("overflow-x"),e("body").css("overflow-x","hidden");var a="tooltipster-"+n.options.animation,c="-webkit-transition-duration: "+n.options.speed+"ms; -webkit-animation-duration: "+n.options.speed+"ms; -moz-transition-duration: "+n.options.speed+"ms; -moz-animation-duration: "+n.options.speed+"ms; -o-transition-duration: "+n.options.speed+"ms; -o-animation-duration: "+n.options.speed+"ms; -ms-transition-duration: "+n.options.speed+"ms; -ms-animation-duration: "+n.options.speed+"ms; transition-duration: "+n.options.speed+"ms; animation-duration: "+n.options.speed+"ms;",u=n.options.minWidth?"min-width:"+Math.round(n.options.minWidth)+"px;":"",h=n.options.maxWidth?"max-width:"+Math.round(n.options.maxWidth)+"px;":"",d=n.options.interactive?"pointer-events: auto;":"";if(n.$tooltip=e('<div class="tooltipster-base '+n.options.theme+'" style="'+u+" "+h+" "+d+" "+c+'"><div class="tooltipster-content"></div></div>'),r()&&n.$tooltip.addClass(a),n._content_insert(),n.$tooltip.appendTo("body"),n.reposition(),n.options.functionReady.call(n.$el,n.$el,n.$tooltip),r()?(n.$tooltip.addClass(a+"-show"),n.options.speed>0&&n.$tooltip.delay(n.options.speed),n.$tooltip.queue(s)):n.$tooltip.css("display","none").fadeIn(n.options.speed,s),n._interval_set(),e(t).on("scroll."+n.namespace+" resize."+n.namespace,function(){n.reposition()}),n.options.autoClose)if(e("body").off("."+n.namespace),"hover"==n.options.trigger){if(l&&setTimeout(function(){e("body").on("touchstart."+n.namespace,function(){n.hide()})},0),n.options.interactive){l&&n.$tooltip.on("touchstart."+n.namespace,function(e){e.stopPropagation()});var p=null;n.$elProxy.add(n.$tooltip).on("mouseleave."+n.namespace+"-autoClose",function(){clearTimeout(p),p=setTimeout(function(){n.hide()},n.options.interactiveTolerance)}).on("mouseenter."+n.namespace+"-autoClose",function(){clearTimeout(p)})}else n.$elProxy.on("mouseleave."+n.namespace+"-autoClose",function(){n.hide()});n.options.hideOnClick&&n.$elProxy.on("click."+n.namespace+"-autoClose",function(){n.hide()})}else"click"==n.options.trigger&&(setTimeout(function(){e("body").on("click."+n.namespace+" touchstart."+n.namespace,function(){n.hide()})},0),n.options.interactive&&n.$tooltip.on("click."+n.namespace+" touchstart."+n.namespace,function(e){e.stopPropagation()}))}n.options.timer>0&&(n.timerHide=setTimeout(function(){n.timerHide=null,n.hide()},n.options.timer+o))}})},_interval_set:function(){var t=this;t.checkInterval=setInterval(function(){if(0===e("body").find(t.$el).length||0===e("body").find(t.$elProxy).length||"hidden"==t.Status||0===e("body").find(t.$tooltip).length)"shown"!=t.Status&&"appearing"!=t.Status||t.hide(),t._interval_cancel();else if(t.options.positionTracker){var i=t._repositionInfo(t.$elProxy),n=!1;s(i.dimension,t.elProxyPosition.dimension)&&("fixed"===t.$elProxy.css("position")?s(i.position,t.elProxyPosition.position)&&(n=!0):s(i.offset,t.elProxyPosition.offset)&&(n=!0)),n||(t.reposition(),t.options.positionTrackerCallback.call(t,t.$el))}},200)},_interval_cancel:function(){clearInterval(this.checkInterval),this.checkInterval=null},_content_set:function(e){"object"==typeof e&&null!==e&&this.options.contentCloning&&(e=e.clone(!0)),this.Content=e},_content_insert:function(){var e=this,t=this.$tooltip.find(".tooltipster-content");"string"!=typeof e.Content||e.options.contentAsHTML?t.empty().append(e.Content):t.text(e.Content)},_update:function(e){var t=this;t._content_set(e),null!==t.Content?"hidden"!==t.Status&&(t._content_insert(),t.reposition(),t.options.updateAnimation&&(r()?(t.$tooltip.css({width:"","-webkit-transition":"all "+t.options.speed+"ms, width 0ms, height 0ms, left 0ms, top 0ms","-moz-transition":"all "+t.options.speed+"ms, width 0ms, height 0ms, left 0ms, top 0ms","-o-transition":"all "+t.options.speed+"ms, width 0ms, height 0ms, left 0ms, top 0ms","-ms-transition":"all "+t.options.speed+"ms, width 0ms, height 0ms, left 0ms, top 0ms",transition:"all "+t.options.speed+"ms, width 0ms, height 0ms, left 0ms, top 0ms"}).addClass("tooltipster-content-changing"),setTimeout(function(){"hidden"!=t.Status&&(t.$tooltip.removeClass("tooltipster-content-changing"),setTimeout(function(){"hidden"!==t.Status&&t.$tooltip.css({"-webkit-transition":t.options.speed+"ms","-moz-transition":t.options.speed+"ms","-o-transition":t.options.speed+"ms","-ms-transition":t.options.speed+"ms",transition:t.options.speed+"ms"})},t.options.speed))},t.options.speed)):t.$tooltip.fadeTo(t.options.speed,.5,function(){"hidden"!=t.Status&&t.$tooltip.fadeTo(t.options.speed,1)}))):t.hide()},_repositionInfo:function(e){return{dimension:{height:e.outerHeight(!1),width:e.outerWidth(!1)},offset:e.offset(),position:{left:parseInt(e.css("left")),top:parseInt(e.css("top"))}}},hide:function(i){var n=this;i&&n.callbacks.hide.push(i),n.callbacks.show=[],clearTimeout(n.timerShow),n.timerShow=null,clearTimeout(n.timerHide),n.timerHide=null;var s=function(){e.each(n.callbacks.hide,function(e,t){t.call(n.$el)}),n.callbacks.hide=[]};if("shown"==n.Status||"appearing"==n.Status){n.Status="disappearing";var o=function(){n.Status="hidden","object"==typeof n.Content&&null!==n.Content&&n.Content.detach(),n.$tooltip.remove(),n.$tooltip=null,e(t).off("."+n.namespace),e("body").off("."+n.namespace).css("overflow-x",n.bodyOverflowX),e("body").off("."+n.namespace),n.$elProxy.off("."+n.namespace+"-autoClose"),n.options.functionAfter.call(n.$el,n.$el),s()};r()?(n.$tooltip.clearQueue().removeClass("tooltipster-"+n.options.animation+"-show").addClass("tooltipster-dying"),n.options.speed>0&&n.$tooltip.delay(n.options.speed),n.$tooltip.queue(o)):n.$tooltip.stop().fadeOut(n.options.speed,o)}else"hidden"==n.Status&&s();return n},show:function(e){return this._showNow(e),this},update:function(e){return this.content(e)},content:function(e){return void 0===e?this.Content:(this._update(e),this)},reposition:function(){function i(){var i=e(t).scrollLeft();P-i<0&&(o=P-i,P=i),P+l-i>r&&(o=P-(r+i-l),P=r+i-l)}function n(i,n){a.offset.top-e(t).scrollTop()-c-M-12<0&&n.indexOf("top")>-1&&(E=i),a.offset.top+a.dimension.height+c+12+M>e(t).scrollTop()+e(t).height()&&n.indexOf("bottom")>-1&&(E=i,I=a.offset.top-c-M-12)}var s=this;if(0!==e("body").find(s.$tooltip).length){s.$tooltip.css("width",""),s.elProxyPosition=s._repositionInfo(s.$elProxy);var o=null,r=e(t).width(),a=s.elProxyPosition,l=s.$tooltip.outerWidth(!1),c=(s.$tooltip.innerWidth(),s.$tooltip.outerHeight(!1));if(s.$elProxy.is("area")){var u=s.$elProxy.attr("shape"),h=s.$elProxy.parent().attr("name"),d=e('img[usemap="#'+h+'"]'),p=d.offset().left,f=d.offset().top,_=void 0!==s.$elProxy.attr("coords")?s.$elProxy.attr("coords").split(","):void 0;if("circle"==u){var m=parseInt(_[0]),g=parseInt(_[1]),v=parseInt(_[2]);a.dimension.height=2*v,a.dimension.width=2*v,a.offset.top=f+g-v,a.offset.left=p+m-v}else if("rect"==u){var m=parseInt(_[0]),g=parseInt(_[1]),b=parseInt(_[2]),y=parseInt(_[3]);a.dimension.height=y-g,a.dimension.width=b-m,a.offset.top=f+g,a.offset.left=p+m}else if("poly"==u){for(var T=0,w=0,x=0,C=0,S="even",k=0;k<_.length;k++){var D=parseInt(_[k]);"even"==S?(D>x&&(x=D,0===k&&(T=x)),D<T&&(T=D),S="odd"):(D>C&&(C=D,1==k&&(w=C)),D<w&&(w=D),S="even")}a.dimension.height=C-w,a.dimension.width=x-T,a.offset.top=f+w,a.offset.left=p+T}else a.dimension.height=d.outerHeight(!1),a.dimension.width=d.outerWidth(!1),a.offset.top=f,a.offset.left=p}var P=0,A=0,I=0,M=parseInt(s.options.offsetY),F=parseInt(s.options.offsetX),E=s.options.position;if("top"==E){var O=a.offset.left+l-(a.offset.left+a.dimension.width);P=a.offset.left+F-O/2,I=a.offset.top-c-M-12,i(),n("bottom","top")}if("top-left"==E&&(P=a.offset.left+F,I=a.offset.top-c-M-12,i(),n("bottom-left","top-left")),"top-right"==E&&(P=a.offset.left+a.dimension.width+F-l,I=a.offset.top-c-M-12,i(),n("bottom-right","top-right")),"bottom"==E){var O=a.offset.left+l-(a.offset.left+a.dimension.width);P=a.offset.left-O/2+F,I=a.offset.top+a.dimension.height+M+12,i(),n("top","bottom")}if("bottom-left"==E&&(P=a.offset.left+F,I=a.offset.top+a.dimension.height+M+12,i(),n("top-left","bottom-left")),"bottom-right"==E&&(P=a.offset.left+a.dimension.width+F-l,I=a.offset.top+a.dimension.height+M+12,i(),n("top-right","bottom-right")),"left"==E){P=a.offset.left-F-l-12,A=a.offset.left+F+a.dimension.width+12;var $=a.offset.top+c-(a.offset.top+a.dimension.height);if(I=a.offset.top-$/2-M,P<0&&A+l>r){var H=2*parseFloat(s.$tooltip.css("border-width")),N=l+P-H;s.$tooltip.css("width",N+"px"),c=s.$tooltip.outerHeight(!1),P=a.offset.left-F-N-12-H,$=a.offset.top+c-(a.offset.top+a.dimension.height),I=a.offset.top-$/2-M}else P<0&&(P=a.offset.left+F+a.dimension.width+12,o="left")}if("right"==E){P=a.offset.left+F+a.dimension.width+12,A=a.offset.left-F-l-12;var $=a.offset.top+c-(a.offset.top+a.dimension.height);if(I=a.offset.top-$/2-M,P+l>r&&A<0){var H=2*parseFloat(s.$tooltip.css("border-width")),N=r-P-H;s.$tooltip.css("width",N+"px"),c=s.$tooltip.outerHeight(!1),$=a.offset.top+c-(a.offset.top+a.dimension.height),I=a.offset.top-$/2-M}else P+l>r&&(P=a.offset.left-F-l-12,o="right")}if(s.options.arrow){var R="tooltipster-arrow-"+E;if(s.options.arrowColor.length<1)var B=s.$tooltip.css("background-color");else var B=s.options.arrowColor;if(o?"left"==o?(R="tooltipster-arrow-right",o=""):"right"==o?(R="tooltipster-arrow-left",o=""):o="left:"+Math.round(o)+"px;":o="","top"==E||"top-left"==E||"top-right"==E)var G=parseFloat(s.$tooltip.css("border-bottom-width")),L=s.$tooltip.css("border-bottom-color");else if("bottom"==E||"bottom-left"==E||"bottom-right"==E)var G=parseFloat(s.$tooltip.css("border-top-width")),L=s.$tooltip.css("border-top-color");else if("left"==E)var G=parseFloat(s.$tooltip.css("border-right-width")),L=s.$tooltip.css("border-right-color");else if("right"==E)var G=parseFloat(s.$tooltip.css("border-left-width")),L=s.$tooltip.css("border-left-color");else var G=parseFloat(s.$tooltip.css("border-bottom-width")),L=s.$tooltip.css("border-bottom-color");G>1&&G++;var j="";if(0!==G){var W="",z="border-color: "+L+";";-1!==R.indexOf("bottom")?W="margin-top: -"+Math.round(G)+"px;":-1!==R.indexOf("top")?W="margin-bottom: -"+Math.round(G)+"px;":-1!==R.indexOf("left")?W="margin-right: -"+Math.round(G)+"px;":-1!==R.indexOf("right")&&(W="margin-left: -"+Math.round(G)+"px;"),j='<span class="tooltipster-arrow-border" style="'+W+" "+z+';"></span>'}s.$tooltip.find(".tooltipster-arrow").remove();var U='<div class="'+R+' tooltipster-arrow" style="'+o+'">'+j+'<span style="border-color:'+B+';"></span></div>';s.$tooltip.append(U)}s.$tooltip.css({top:Math.round(I)+"px",left:Math.round(P)+"px"})}return s},enable:function(){return this.enabled=!0,this},disable:function(){return this.hide(),this.enabled=!1,this},destroy:function(){var t=this;t.hide(),t.$el[0]!==t.$elProxy[0]&&t.$elProxy.remove(),t.$el.removeData(t.namespace).off("."+t.namespace);var i=t.$el.data("tooltipster-ns");if(1===i.length){var n=null;"previous"===t.options.restoration?n=t.$el.data("tooltipster-initialTitle"):"current"===t.options.restoration&&(n="string"==typeof t.Content?t.Content:e("<div></div>").append(t.Content).html()),n&&t.$el.attr("title",n),t.$el.removeClass("tooltipstered").removeData("tooltipster-ns").removeData("tooltipster-initialTitle")}else i=e.grep(i,function(e,i){return e!==t.namespace}),t.$el.data("tooltipster-ns",i);return t},elementIcon:function(){return this.$el[0]!==this.$elProxy[0]?this.$elProxy[0]:void 0},elementTooltip:function(){return this.$tooltip?this.$tooltip[0]:void 0},option:function(e,t){return void 0===t?this.options[e]:(this.options[e]=t,this)},status:function(){return this.Status}},e.fn.tooltipster=function(){var t=arguments;if(0===this.length){if("string"==typeof t[0]){var i=!0;switch(t[0]){case"setDefaults":e.extend(a,t[1]);break;default:i=!1}return!!i||this}return this}if("string"==typeof t[0]){var s="#*$~&";return this.each(function(){var i=e(this).data("tooltipster-ns"),n=i?e(this).data(i[0]):null;if(!n)throw new Error("You called Tooltipster's \""+t[0]+'" method on an uninitialized element');if("function"!=typeof n[t[0]])throw new Error('Unknown method .tooltipster("'+t[0]+'")');var o=n[t[0]](t[1],t[2]);if(o!==n)return s=o,!1}),"#*$~&"!==s?s:this}var o=[],r=t[0]&&void 0!==t[0].multiple,l=r&&t[0].multiple||!r&&a.multiple,c=t[0]&&void 0!==t[0].debug,u=c&&t[0].debug||!c&&a.debug;return this.each(function(){var i=!1,s=e(this).data("tooltipster-ns"),r=null;s?l?i=!0:u&&console.log('Tooltipster: one or more tooltips are already attached to this element: ignoring. Use the "multiple" option to attach more tooltips.'):i=!0,i&&(r=new n(this,t[0]),s||(s=[]),s.push(r.namespace),e(this).data("tooltipster-ns",s),e(this).data(r.namespace,r)),o.push(r)}),l?o:this};var l=!!("ontouchstart"in t),c=!1;e("body").one("mousemove",function(){c=!0})}(e,window,document)}),function(e){"function"==typeof define&&define.amd?define("jqueryUI",["jquery"],e):e(jQuery)}(function(e){function t(t,n){var s,o,r,a=t.nodeName.toLowerCase();return"area"===a?(s=t.parentNode,o=s.name,!(!t.href||!o||"map"!==s.nodeName.toLowerCase())&&(!!(r=e("img[usemap='#"+o+"']")[0])&&i(r))):(/^(input|select|textarea|button|object)$/.test(a)?!t.disabled:"a"===a?t.href||n:n)&&i(t)}function i(t){return e.expr.filters.visible(t)&&!e(t).parents().addBack().filter(function(){return"hidden"===e.css(this,"visibility")}).length}function n(e){for(var t,i;e.length&&e[0]!==document;){if(("absolute"===(t=e.css("position"))||"relative"===t||"fixed"===t)&&(i=parseInt(e.css("zIndex"),10),!isNaN(i)&&0!==i))return i;e=e.parent()}return 0}function s(){this._curInst=null,this._keyEvent=!1,this._disabledInputs=[],this._datepickerShowing=!1,this._inDialog=!1,this._mainDivId="ui-datepicker-div",this._inlineClass="ui-datepicker-inline",this._appendClass="ui-datepicker-append",this._triggerClass="ui-datepicker-trigger",this._dialogClass="ui-datepicker-dialog",this._disableClass="ui-datepicker-disabled",this._unselectableClass="ui-datepicker-unselectable",this._currentClass="ui-datepicker-current-day",this._dayOverClass="ui-datepicker-days-cell-over",this.regional=[],this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:!1,hideIfNoPrevNext:!1,navigationAsDateFormat:!1,gotoCurrent:!1,changeMonth:!1,changeYear:!1,yearRange:"c-10:c+10",showOtherMonths:!1,selectOtherMonths:!1,showWeek:!1,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:!0,showButtonPanel:!1,autoSize:!1,disabled:!1},e.extend(this._defaults,this.regional[""]),this.regional.en=e.extend(!0,{},this.regional[""]),this.regional["en-US"]=e.extend(!0,{},this.regional.en),this.dpDiv=o(e("<div id='"+this._mainDivId+"' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>"))}function o(t){var i="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return t.delegate(i,"mouseout",function(){e(this).removeClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&e(this).removeClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&e(this).removeClass("ui-datepicker-next-hover")}).delegate(i,"mouseover",r)}function r(){e.datepicker._isDisabledDatepicker(g.inline?g.dpDiv.parent()[0]:g.input[0])||(e(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),e(this).addClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&e(this).addClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&e(this).addClass("ui-datepicker-next-hover"))}function a(t,i){e.extend(t,i);for(var n in i)null==i[n]&&(t[n]=i[n]);return t}function l(e){return function(){var t=this.element.val();e.apply(this,arguments),this._refresh(),t!==this.element.val()&&this._trigger("change")}}e.ui=e.ui||{},e.extend(e.ui,{version:"1.11.4",keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}}),e.fn.extend({scrollParent:function(t){var i=this.css("position"),n="absolute"===i,s=t?/(auto|scroll|hidden)/:/(auto|scroll)/,o=this.parents().filter(function(){var t=e(this);return(!n||"static"!==t.css("position"))&&s.test(t.css("overflow")+t.css("overflow-y")+t.css("overflow-x"))}).eq(0);return"fixed"!==i&&o.length?o:e(this[0].ownerDocument||document)},uniqueId:function(){var e=0;return function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++e)})}}(),removeUniqueId:function(){return this.each(function(){/^ui-id-\d+$/.test(this.id)&&e(this).removeAttr("id")})}}),e.extend(e.expr[":"],{data:e.expr.createPseudo?e.expr.createPseudo(function(t){return function(i){return!!e.data(i,t)}}):function(t,i,n){return!!e.data(t,n[3])},focusable:function(i){return t(i,!isNaN(e.attr(i,"tabindex")))},tabbable:function(i){var n=e.attr(i,"tabindex"),s=isNaN(n);return(s||n>=0)&&t(i,!s)}}),e("<a>").outerWidth(1).jquery||e.each(["Width","Height"],function(t,i){function n(t,i,n,o){return e.each(s,function(){i-=parseFloat(e.css(t,"padding"+this))||0,n&&(i-=parseFloat(e.css(t,"border"+this+"Width"))||0),o&&(i-=parseFloat(e.css(t,"margin"+this))||0)}),i}var s="Width"===i?["Left","Right"]:["Top","Bottom"],o=i.toLowerCase(),r={innerWidth:e.fn.innerWidth,innerHeight:e.fn.innerHeight,outerWidth:e.fn.outerWidth,outerHeight:e.fn.outerHeight};e.fn["inner"+i]=function(t){return void 0===t?r["inner"+i].call(this):this.each(function(){e(this).css(o,n(this,t)+"px")})},e.fn["outer"+i]=function(t,s){return"number"!=typeof t?r["outer"+i].call(this,t):this.each(function(){e(this).css(o,n(this,t,!0,s)+"px")})}}),e.fn.addBack||(e.fn.addBack=function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}),e("<a>").data("a-b","a").removeData("a-b").data("a-b")&&(e.fn.removeData=function(t){return function(i){return arguments.length?t.call(this,e.camelCase(i)):t.call(this)}}(e.fn.removeData)),e.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()),e.fn.extend({focus:function(t){return function(i,n){return"number"==typeof i?this.each(function(){var t=this;setTimeout(function(){e(t).focus(),n&&n.call(t)},i)}):t.apply(this,arguments)}}(e.fn.focus),disableSelection:function(){var e="onselectstart"in document.createElement("div")?"selectstart":"mousedown";return function(){return this.bind(e+".ui-disableSelection",function(e){e.preventDefault()})}}(),enableSelection:function(){return this.unbind(".ui-disableSelection")},zIndex:function(t){if(void 0!==t)return this.css("zIndex",t);if(this.length)for(var i,n,s=e(this[0]);s.length&&s[0]!==document;){if(("absolute"===(i=s.css("position"))||"relative"===i||"fixed"===i)&&(n=parseInt(s.css("zIndex"),10),!isNaN(n)&&0!==n))return n;s=s.parent()}return 0}}),e.ui.plugin={add:function(t,i,n){var s,o=e.ui[t].prototype;for(s in n)o.plugins[s]=o.plugins[s]||[],o.plugins[s].push([i,n[s]])},call:function(e,t,i,n){var s,o=e.plugins[t];if(o&&(n||e.element[0].parentNode&&11!==e.element[0].parentNode.nodeType))for(s=0;s<o.length;s++)e.options[o[s][0]]&&o[s][1].apply(e.element,i)}};var c=0,u=Array.prototype.slice;e.cleanData=function(t){return function(i){var n,s,o;for(o=0;null!=(s=i[o]);o++)try{n=e._data(s,"events"),n&&n.remove&&e(s).triggerHandler("remove")}catch(e){}t(i)}}(e.cleanData),e.widget=function(t,i,n){var s,o,r,a,l={},c=t.split(".")[0];return t=t.split(".")[1],s=c+"-"+t,n||(n=i,i=e.Widget),e.expr[":"][s.toLowerCase()]=function(t){return!!e.data(t,s)},e[c]=e[c]||{},o=e[c][t],r=e[c][t]=function(e,t){if(!this._createWidget)return new r(e,t);arguments.length&&this._createWidget(e,t)},e.extend(r,o,{version:n.version,_proto:e.extend({},n),_childConstructors:[]}),a=new i,a.options=e.widget.extend({},a.options),e.each(n,function(t,n){if(!e.isFunction(n))return void(l[t]=n);l[t]=function(){var e=function(){return i.prototype[t].apply(this,arguments)},s=function(e){return i.prototype[t].apply(this,e)};return function(){var t,i=this._super,o=this._superApply;return this._super=e,this._superApply=s,t=n.apply(this,arguments),this._super=i,this._superApply=o,t}}()}),r.prototype=e.widget.extend(a,{widgetEventPrefix:o?a.widgetEventPrefix||t:t},l,{constructor:r,namespace:c,widgetName:t,widgetFullName:s}),o?(e.each(o._childConstructors,function(t,i){var n=i.prototype;e.widget(n.namespace+"."+n.widgetName,r,i._proto)}),delete o._childConstructors):i._childConstructors.push(r),e.widget.bridge(t,r),r},e.widget.extend=function(t){for(var i,n,s=u.call(arguments,1),o=0,r=s.length;o<r;o++)for(i in s[o])n=s[o][i],s[o].hasOwnProperty(i)&&void 0!==n&&(e.isPlainObject(n)?t[i]=e.isPlainObject(t[i])?e.widget.extend({},t[i],n):e.widget.extend({},n):t[i]=n);return t},e.widget.bridge=function(t,i){var n=i.prototype.widgetFullName||t;e.fn[t]=function(s){var o="string"==typeof s,r=u.call(arguments,1),a=this;return o?this.each(function(){var i,o=e.data(this,n);return"instance"===s?(a=o,!1):o?e.isFunction(o[s])&&"_"!==s.charAt(0)?(i=o[s].apply(o,r),i!==o&&void 0!==i?(a=i&&i.jquery?a.pushStack(i.get()):i,!1):void 0):e.error("no such method '"+s+"' for "+t+" widget instance"):e.error("cannot call methods on "+t+" prior to initialization; attempted to call method '"+s+"'")}):(r.length&&(s=e.widget.extend.apply(null,[s].concat(r))),this.each(function(){var t=e.data(this,n);t?(t.option(s||{}),t._init&&t._init()):e.data(this,n,new i(s,this))})),a}},e.Widget=function(){},e.Widget._childConstructors=[],e.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{disabled:!1,create:null},_createWidget:function(t,i){i=e(i||this.defaultElement||this)[0],this.element=e(i),this.uuid=c++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=e(),this.hoverable=e(),this.focusable=e(),i!==this&&(e.data(i,this.widgetFullName,this),this._on(!0,this.element,{remove:function(e){e.target===i&&this.destroy()}}),this.document=e(i.style?i.ownerDocument:i.document||i),this.window=e(this.document[0].defaultView||this.document[0].parentWindow)),this.options=e.widget.extend({},this.options,this._getCreateOptions(),t),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:e.noop,_getCreateEventData:e.noop,_create:e.noop,_init:e.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetFullName).removeData(e.camelCase(this.widgetFullName)),this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled ui-state-disabled"),this.bindings.unbind(this.eventNamespace),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")},_destroy:e.noop,widget:function(){return this.element},option:function(t,i){var n,s,o,r=t;if(0===arguments.length)return e.widget.extend({},this.options);if("string"==typeof t)if(r={},n=t.split("."),t=n.shift(),n.length){for(s=r[t]=e.widget.extend({},this.options[t]),o=0;o<n.length-1;o++)s[n[o]]=s[n[o]]||{},s=s[n[o]];if(t=n.pop(),1===arguments.length)return void 0===s[t]?null:s[t];s[t]=i}else{if(1===arguments.length)return void 0===this.options[t]?null:this.options[t];r[t]=i}return this._setOptions(r),this},_setOptions:function(e){var t;for(t in e)this._setOption(t,e[t]);return this},_setOption:function(e,t){return this.options[e]=t,"disabled"===e&&(this.widget().toggleClass(this.widgetFullName+"-disabled",!!t),t&&(this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus"))),this},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_on:function(t,i,n){var s,o=this;"boolean"!=typeof t&&(n=i,i=t,t=!1),n?(i=s=e(i),this.bindings=this.bindings.add(i)):(n=i,i=this.element,s=this.widget()),e.each(n,function(n,r){function a(){if(t||!0!==o.options.disabled&&!e(this).hasClass("ui-state-disabled"))return("string"==typeof r?o[r]:r).apply(o,arguments)}"string"!=typeof r&&(a.guid=r.guid=r.guid||a.guid||e.guid++);var l=n.match(/^([\w:-]*)\s*(.*)$/),c=l[1]+o.eventNamespace,u=l[2];u?s.delegate(u,c,a):i.bind(c,a)})},_off:function(t,i){i=(i||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,t.unbind(i).undelegate(i),this.bindings=e(this.bindings.not(t).get()),this.focusable=e(this.focusable.not(t).get()),this.hoverable=e(this.hoverable.not(t).get())},_delay:function(e,t){function i(){return("string"==typeof e?n[e]:e).apply(n,arguments)}var n=this;return setTimeout(i,t||0)},_hoverable:function(t){this.hoverable=this.hoverable.add(t),this._on(t,{mouseenter:function(t){e(t.currentTarget).addClass("ui-state-hover")},mouseleave:function(t){e(t.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(t){this.focusable=this.focusable.add(t),this._on(t,{focusin:function(t){e(t.currentTarget).addClass("ui-state-focus")},focusout:function(t){e(t.currentTarget).removeClass("ui-state-focus")}})},_trigger:function(t,i,n){var s,o,r=this.options[t];if(n=n||{},i=e.Event(i),i.type=(t===this.widgetEventPrefix?t:this.widgetEventPrefix+t).toLowerCase(),i.target=this.element[0],o=i.originalEvent)for(s in o)s in i||(i[s]=o[s]);return this.element.trigger(i,n),!(e.isFunction(r)&&!1===r.apply(this.element[0],[i].concat(n))||i.isDefaultPrevented())}},e.each({show:"fadeIn",hide:"fadeOut"},function(t,i){e.Widget.prototype["_"+t]=function(n,s,o){"string"==typeof s&&(s={effect:s});var r,a=s?!0===s||"number"==typeof s?i:s.effect||i:t;s=s||{},"number"==typeof s&&(s={duration:s}),r=!e.isEmptyObject(s),s.complete=o,s.delay&&n.delay(s.delay),r&&e.effects&&e.effects.effect[a]?n[t](s):a!==t&&n[a]?n[a](s.duration,s.easing,o):n.queue(function(i){e(this)[t](),o&&o.call(n[0]),i()})}});var h=(e.widget,!1);e(document).mouseup(function(){h=!1});e.widget("ui.mouse",{version:"1.11.4",options:{cancel:"input,textarea,button,select,option",distance:1,delay:0},_mouseInit:function(){var t=this;this.element.bind("mousedown."+this.widgetName,function(e){return t._mouseDown(e)}).bind("click."+this.widgetName,function(i){if(!0===e.data(i.target,t.widgetName+".preventClickEvent"))return e.removeData(i.target,t.widgetName+".preventClickEvent"),i.stopImmediatePropagation(),!1}),this.started=!1},_mouseDestroy:function(){this.element.unbind("."+this.widgetName),this._mouseMoveDelegate&&this.document.unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(t){if(!h){this._mouseMoved=!1,this._mouseStarted&&this._mouseUp(t),this._mouseDownEvent=t;var i=this,n=1===t.which,s=!("string"!=typeof this.options.cancel||!t.target.nodeName)&&e(t.target).closest(this.options.cancel).length;return!(n&&!s&&this._mouseCapture(t))||(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){i.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=!1!==this._mouseStart(t),!this._mouseStarted)?(t.preventDefault(),!0):(!0===e.data(t.target,this.widgetName+".preventClickEvent")&&e.removeData(t.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(e){return i._mouseMove(e)},this._mouseUpDelegate=function(e){return i._mouseUp(e)},this.document.bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate),t.preventDefault(),h=!0,!0))}},_mouseMove:function(t){if(this._mouseMoved){if(e.ui.ie&&(!document.documentMode||document.documentMode<9)&&!t.button)return this._mouseUp(t);if(!t.which)return this._mouseUp(t)}return(t.which||t.button)&&(this._mouseMoved=!0),this._mouseStarted?(this._mouseDrag(t),t.preventDefault()):(this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=!1!==this._mouseStart(this._mouseDownEvent,t),this._mouseStarted?this._mouseDrag(t):this._mouseUp(t)),!this._mouseStarted)},_mouseUp:function(t){return this.document.unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,t.target===this._mouseDownEvent.target&&e.data(t.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(t)),h=!1,!1},_mouseDistanceMet:function(e){return Math.max(Math.abs(this._mouseDownEvent.pageX-e.pageX),Math.abs(this._mouseDownEvent.pageY-e.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},
_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}});!function(){function t(e,t,i){return[parseFloat(e[0])*(p.test(e[0])?t/100:1),parseFloat(e[1])*(p.test(e[1])?i/100:1)]}function i(t,i){return parseInt(e.css(t,i),10)||0}function n(t){var i=t[0];return 9===i.nodeType?{width:t.width(),height:t.height(),offset:{top:0,left:0}}:e.isWindow(i)?{width:t.width(),height:t.height(),offset:{top:t.scrollTop(),left:t.scrollLeft()}}:i.preventDefault?{width:0,height:0,offset:{top:i.pageY,left:i.pageX}}:{width:t.outerWidth(),height:t.outerHeight(),offset:t.offset()}}e.ui=e.ui||{};var s,o,r=Math.max,a=Math.abs,l=Math.round,c=/left|center|right/,u=/top|center|bottom/,h=/[\+\-]\d+(\.[\d]+)?%?/,d=/^\w+/,p=/%$/,f=e.fn.position;e.position={scrollbarWidth:function(){if(void 0!==s)return s;var t,i,n=e("<div style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"),o=n.children()[0];return e("body").append(n),t=o.offsetWidth,n.css("overflow","scroll"),i=o.offsetWidth,t===i&&(i=n[0].clientWidth),n.remove(),s=t-i},getScrollInfo:function(t){var i=t.isWindow||t.isDocument?"":t.element.css("overflow-x"),n=t.isWindow||t.isDocument?"":t.element.css("overflow-y"),s="scroll"===i||"auto"===i&&t.width<t.element[0].scrollWidth;return{width:"scroll"===n||"auto"===n&&t.height<t.element[0].scrollHeight?e.position.scrollbarWidth():0,height:s?e.position.scrollbarWidth():0}},getWithinInfo:function(t){var i=e(t||window),n=e.isWindow(i[0]),s=!!i[0]&&9===i[0].nodeType;return{element:i,isWindow:n,isDocument:s,offset:i.offset()||{left:0,top:0},scrollLeft:i.scrollLeft(),scrollTop:i.scrollTop(),width:n||s?i.width():i.outerWidth(),height:n||s?i.height():i.outerHeight()}}},e.fn.position=function(s){if(!s||!s.of)return f.apply(this,arguments);s=e.extend({},s);var p,_,m,g,v,b,y=e(s.of),T=e.position.getWithinInfo(s.within),w=e.position.getScrollInfo(T),x=(s.collision||"flip").split(" "),C={};return b=n(y),y[0].preventDefault&&(s.at="left top"),_=b.width,m=b.height,g=b.offset,v=e.extend({},g),e.each(["my","at"],function(){var e,t,i=(s[this]||"").split(" ");1===i.length&&(i=c.test(i[0])?i.concat(["center"]):u.test(i[0])?["center"].concat(i):["center","center"]),i[0]=c.test(i[0])?i[0]:"center",i[1]=u.test(i[1])?i[1]:"center",e=h.exec(i[0]),t=h.exec(i[1]),C[this]=[e?e[0]:0,t?t[0]:0],s[this]=[d.exec(i[0])[0],d.exec(i[1])[0]]}),1===x.length&&(x[1]=x[0]),"right"===s.at[0]?v.left+=_:"center"===s.at[0]&&(v.left+=_/2),"bottom"===s.at[1]?v.top+=m:"center"===s.at[1]&&(v.top+=m/2),p=t(C.at,_,m),v.left+=p[0],v.top+=p[1],this.each(function(){var n,c,u=e(this),h=u.outerWidth(),d=u.outerHeight(),f=i(this,"marginLeft"),b=i(this,"marginTop"),S=h+f+i(this,"marginRight")+w.width,k=d+b+i(this,"marginBottom")+w.height,D=e.extend({},v),P=t(C.my,u.outerWidth(),u.outerHeight());"right"===s.my[0]?D.left-=h:"center"===s.my[0]&&(D.left-=h/2),"bottom"===s.my[1]?D.top-=d:"center"===s.my[1]&&(D.top-=d/2),D.left+=P[0],D.top+=P[1],o||(D.left=l(D.left),D.top=l(D.top)),n={marginLeft:f,marginTop:b},e.each(["left","top"],function(t,i){e.ui.position[x[t]]&&e.ui.position[x[t]][i](D,{targetWidth:_,targetHeight:m,elemWidth:h,elemHeight:d,collisionPosition:n,collisionWidth:S,collisionHeight:k,offset:[p[0]+P[0],p[1]+P[1]],my:s.my,at:s.at,within:T,elem:u})}),s.using&&(c=function(e){var t=g.left-D.left,i=t+_-h,n=g.top-D.top,o=n+m-d,l={target:{element:y,left:g.left,top:g.top,width:_,height:m},element:{element:u,left:D.left,top:D.top,width:h,height:d},horizontal:i<0?"left":t>0?"right":"center",vertical:o<0?"top":n>0?"bottom":"middle"};_<h&&a(t+i)<_&&(l.horizontal="center"),m<d&&a(n+o)<m&&(l.vertical="middle"),r(a(t),a(i))>r(a(n),a(o))?l.important="horizontal":l.important="vertical",s.using.call(this,e,l)}),u.offset(e.extend(D,{using:c}))})},e.ui.position={fit:{left:function(e,t){var i,n=t.within,s=n.isWindow?n.scrollLeft:n.offset.left,o=n.width,a=e.left-t.collisionPosition.marginLeft,l=s-a,c=a+t.collisionWidth-o-s;t.collisionWidth>o?l>0&&c<=0?(i=e.left+l+t.collisionWidth-o-s,e.left+=l-i):e.left=c>0&&l<=0?s:l>c?s+o-t.collisionWidth:s:l>0?e.left+=l:c>0?e.left-=c:e.left=r(e.left-a,e.left)},top:function(e,t){var i,n=t.within,s=n.isWindow?n.scrollTop:n.offset.top,o=t.within.height,a=e.top-t.collisionPosition.marginTop,l=s-a,c=a+t.collisionHeight-o-s;t.collisionHeight>o?l>0&&c<=0?(i=e.top+l+t.collisionHeight-o-s,e.top+=l-i):e.top=c>0&&l<=0?s:l>c?s+o-t.collisionHeight:s:l>0?e.top+=l:c>0?e.top-=c:e.top=r(e.top-a,e.top)}},flip:{left:function(e,t){var i,n,s=t.within,o=s.offset.left+s.scrollLeft,r=s.width,l=s.isWindow?s.scrollLeft:s.offset.left,c=e.left-t.collisionPosition.marginLeft,u=c-l,h=c+t.collisionWidth-r-l,d="left"===t.my[0]?-t.elemWidth:"right"===t.my[0]?t.elemWidth:0,p="left"===t.at[0]?t.targetWidth:"right"===t.at[0]?-t.targetWidth:0,f=-2*t.offset[0];u<0?((i=e.left+d+p+f+t.collisionWidth-r-o)<0||i<a(u))&&(e.left+=d+p+f):h>0&&((n=e.left-t.collisionPosition.marginLeft+d+p+f-l)>0||a(n)<h)&&(e.left+=d+p+f)},top:function(e,t){var i,n,s=t.within,o=s.offset.top+s.scrollTop,r=s.height,l=s.isWindow?s.scrollTop:s.offset.top,c=e.top-t.collisionPosition.marginTop,u=c-l,h=c+t.collisionHeight-r-l,d="top"===t.my[1],p=d?-t.elemHeight:"bottom"===t.my[1]?t.elemHeight:0,f="top"===t.at[1]?t.targetHeight:"bottom"===t.at[1]?-t.targetHeight:0,_=-2*t.offset[1];u<0?((n=e.top+p+f+_+t.collisionHeight-r-o)<0||n<a(u))&&(e.top+=p+f+_):h>0&&((i=e.top-t.collisionPosition.marginTop+p+f+_-l)>0||a(i)<h)&&(e.top+=p+f+_)}},flipfit:{left:function(){e.ui.position.flip.left.apply(this,arguments),e.ui.position.fit.left.apply(this,arguments)},top:function(){e.ui.position.flip.top.apply(this,arguments),e.ui.position.fit.top.apply(this,arguments)}}},function(){var t,i,n,s,r,a=document.getElementsByTagName("body")[0],l=document.createElement("div");t=document.createElement(a?"div":"body"),n={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"},a&&e.extend(n,{position:"absolute",left:"-1000px",top:"-1000px"});for(r in n)t.style[r]=n[r];t.appendChild(l),i=a||document.documentElement,i.insertBefore(t,i.firstChild),l.style.cssText="position: absolute; left: 10.7432222px;",s=e(l).offset().left,o=s>10&&s<11,t.innerHTML="",i.removeChild(t)}()}();e.ui.position;e.widget("ui.draggable",e.ui.mouse,{version:"1.11.4",widgetEventPrefix:"drag",options:{addClasses:!0,appendTo:"parent",axis:!1,connectToSortable:!1,containment:!1,cursor:"auto",cursorAt:!1,grid:!1,handle:!1,helper:"original",iframeFix:!1,opacity:!1,refreshPositions:!1,revert:!1,revertDuration:500,scope:"default",scroll:!0,scrollSensitivity:20,scrollSpeed:20,snap:!1,snapMode:"both",snapTolerance:20,stack:!1,zIndex:!1,drag:null,start:null,stop:null},_create:function(){"original"===this.options.helper&&this._setPositionRelative(),this.options.addClasses&&this.element.addClass("ui-draggable"),this.options.disabled&&this.element.addClass("ui-draggable-disabled"),this._setHandleClassName(),this._mouseInit()},_setOption:function(e,t){this._super(e,t),"handle"===e&&(this._removeHandleClassName(),this._setHandleClassName())},_destroy:function(){if((this.helper||this.element).is(".ui-draggable-dragging"))return void(this.destroyOnClear=!0);this.element.removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled"),this._removeHandleClassName(),this._mouseDestroy()},_mouseCapture:function(t){var i=this.options;return this._blurActiveElement(t),!(this.helper||i.disabled||e(t.target).closest(".ui-resizable-handle").length>0)&&(this.handle=this._getHandle(t),!!this.handle&&(this._blockFrames(!0===i.iframeFix?"iframe":i.iframeFix),!0))},_blockFrames:function(t){this.iframeBlocks=this.document.find(t).map(function(){var t=e(this);return e("<div>").css("position","absolute").appendTo(t.parent()).outerWidth(t.outerWidth()).outerHeight(t.outerHeight()).offset(t.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_blurActiveElement:function(t){var i=this.document[0];if(this.handleElement.is(t.target))try{i.activeElement&&"body"!==i.activeElement.nodeName.toLowerCase()&&e(i.activeElement).blur()}catch(e){}},_mouseStart:function(t){var i=this.options;return this.helper=this._createHelper(t),this.helper.addClass("ui-draggable-dragging"),this._cacheHelperProportions(),e.ui.ddmanager&&(e.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(!0),this.offsetParent=this.helper.offsetParent(),this.hasFixedAncestor=this.helper.parents().filter(function(){return"fixed"===e(this).css("position")}).length>0,this.positionAbs=this.element.offset(),this._refreshOffsets(t),this.originalPosition=this.position=this._generatePosition(t,!1),this.originalPageX=t.pageX,this.originalPageY=t.pageY,i.cursorAt&&this._adjustOffsetFromHelper(i.cursorAt),this._setContainment(),!1===this._trigger("start",t)?(this._clear(),!1):(this._cacheHelperProportions(),e.ui.ddmanager&&!i.dropBehaviour&&e.ui.ddmanager.prepareOffsets(this,t),this._normalizeRightBottom(),this._mouseDrag(t,!0),e.ui.ddmanager&&e.ui.ddmanager.dragStart(this,t),!0)},_refreshOffsets:function(e){this.offset={top:this.positionAbs.top-this.margins.top,left:this.positionAbs.left-this.margins.left,scroll:!1,parent:this._getParentOffset(),relative:this._getRelativeOffset()},this.offset.click={left:e.pageX-this.offset.left,top:e.pageY-this.offset.top}},_mouseDrag:function(t,i){if(this.hasFixedAncestor&&(this.offset.parent=this._getParentOffset()),this.position=this._generatePosition(t,!0),this.positionAbs=this._convertPositionTo("absolute"),!i){var n=this._uiHash();if(!1===this._trigger("drag",t,n))return this._mouseUp({}),!1;this.position=n.position}return this.helper[0].style.left=this.position.left+"px",this.helper[0].style.top=this.position.top+"px",e.ui.ddmanager&&e.ui.ddmanager.drag(this,t),!1},_mouseStop:function(t){var i=this,n=!1;return e.ui.ddmanager&&!this.options.dropBehaviour&&(n=e.ui.ddmanager.drop(this,t)),this.dropped&&(n=this.dropped,this.dropped=!1),"invalid"===this.options.revert&&!n||"valid"===this.options.revert&&n||!0===this.options.revert||e.isFunction(this.options.revert)&&this.options.revert.call(this.element,n)?e(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){!1!==i._trigger("stop",t)&&i._clear()}):!1!==this._trigger("stop",t)&&this._clear(),!1},_mouseUp:function(t){return this._unblockFrames(),e.ui.ddmanager&&e.ui.ddmanager.dragStop(this,t),this.handleElement.is(t.target)&&this.element.focus(),e.ui.mouse.prototype._mouseUp.call(this,t)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp({}):this._clear(),this},_getHandle:function(t){return!this.options.handle||!!e(t.target).closest(this.element.find(this.options.handle)).length},_setHandleClassName:function(){this.handleElement=this.options.handle?this.element.find(this.options.handle):this.element,this.handleElement.addClass("ui-draggable-handle")},_removeHandleClassName:function(){this.handleElement.removeClass("ui-draggable-handle")},_createHelper:function(t){var i=this.options,n=e.isFunction(i.helper),s=n?e(i.helper.apply(this.element[0],[t])):"clone"===i.helper?this.element.clone().removeAttr("id"):this.element;return s.parents("body").length||s.appendTo("parent"===i.appendTo?this.element[0].parentNode:i.appendTo),n&&s[0]===this.element[0]&&this._setPositionRelative(),s[0]===this.element[0]||/(fixed|absolute)/.test(s.css("position"))||s.css("position","absolute"),s},_setPositionRelative:function(){/^(?:r|a|f)/.test(this.element.css("position"))||(this.element[0].style.position="relative")},_adjustOffsetFromHelper:function(t){"string"==typeof t&&(t=t.split(" ")),e.isArray(t)&&(t={left:+t[0],top:+t[1]||0}),"left"in t&&(this.offset.click.left=t.left+this.margins.left),"right"in t&&(this.offset.click.left=this.helperProportions.width-t.right+this.margins.left),"top"in t&&(this.offset.click.top=t.top+this.margins.top),"bottom"in t&&(this.offset.click.top=this.helperProportions.height-t.bottom+this.margins.top)},_isRootNode:function(e){return/(html|body)/i.test(e.tagName)||e===this.document[0]},_getParentOffset:function(){var t=this.offsetParent.offset(),i=this.document[0];return"absolute"===this.cssPosition&&this.scrollParent[0]!==i&&e.contains(this.scrollParent[0],this.offsetParent[0])&&(t.left+=this.scrollParent.scrollLeft(),t.top+=this.scrollParent.scrollTop()),this._isRootNode(this.offsetParent[0])&&(t={top:0,left:0}),{top:t.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:t.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"!==this.cssPosition)return{top:0,left:0};var e=this.element.position(),t=this._isRootNode(this.scrollParent[0]);return{top:e.top-(parseInt(this.helper.css("top"),10)||0)+(t?0:this.scrollParent.scrollTop()),left:e.left-(parseInt(this.helper.css("left"),10)||0)+(t?0:this.scrollParent.scrollLeft())}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var t,i,n,s=this.options,o=this.document[0];return this.relativeContainer=null,s.containment?"window"===s.containment?void(this.containment=[e(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,e(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,e(window).scrollLeft()+e(window).width()-this.helperProportions.width-this.margins.left,e(window).scrollTop()+(e(window).height()||o.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]):"document"===s.containment?void(this.containment=[0,0,e(o).width()-this.helperProportions.width-this.margins.left,(e(o).height()||o.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]):s.containment.constructor===Array?void(this.containment=s.containment):("parent"===s.containment&&(s.containment=this.helper[0].parentNode),i=e(s.containment),void((n=i[0])&&(t=/(scroll|auto)/.test(i.css("overflow")),this.containment=[(parseInt(i.css("borderLeftWidth"),10)||0)+(parseInt(i.css("paddingLeft"),10)||0),(parseInt(i.css("borderTopWidth"),10)||0)+(parseInt(i.css("paddingTop"),10)||0),(t?Math.max(n.scrollWidth,n.offsetWidth):n.offsetWidth)-(parseInt(i.css("borderRightWidth"),10)||0)-(parseInt(i.css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(t?Math.max(n.scrollHeight,n.offsetHeight):n.offsetHeight)-(parseInt(i.css("borderBottomWidth"),10)||0)-(parseInt(i.css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relativeContainer=i))):void(this.containment=null)},_convertPositionTo:function(e,t){t||(t=this.position);var i="absolute"===e?1:-1,n=this._isRootNode(this.scrollParent[0]);return{top:t.top+this.offset.relative.top*i+this.offset.parent.top*i-("fixed"===this.cssPosition?-this.offset.scroll.top:n?0:this.offset.scroll.top)*i,left:t.left+this.offset.relative.left*i+this.offset.parent.left*i-("fixed"===this.cssPosition?-this.offset.scroll.left:n?0:this.offset.scroll.left)*i}},_generatePosition:function(e,t){var i,n,s,o,r=this.options,a=this._isRootNode(this.scrollParent[0]),l=e.pageX,c=e.pageY;return a&&this.offset.scroll||(this.offset.scroll={top:this.scrollParent.scrollTop(),left:this.scrollParent.scrollLeft()}),t&&(this.containment&&(this.relativeContainer?(n=this.relativeContainer.offset(),i=[this.containment[0]+n.left,this.containment[1]+n.top,this.containment[2]+n.left,this.containment[3]+n.top]):i=this.containment,e.pageX-this.offset.click.left<i[0]&&(l=i[0]+this.offset.click.left),e.pageY-this.offset.click.top<i[1]&&(c=i[1]+this.offset.click.top),e.pageX-this.offset.click.left>i[2]&&(l=i[2]+this.offset.click.left),e.pageY-this.offset.click.top>i[3]&&(c=i[3]+this.offset.click.top)),r.grid&&(s=r.grid[1]?this.originalPageY+Math.round((c-this.originalPageY)/r.grid[1])*r.grid[1]:this.originalPageY,c=i?s-this.offset.click.top>=i[1]||s-this.offset.click.top>i[3]?s:s-this.offset.click.top>=i[1]?s-r.grid[1]:s+r.grid[1]:s,o=r.grid[0]?this.originalPageX+Math.round((l-this.originalPageX)/r.grid[0])*r.grid[0]:this.originalPageX,l=i?o-this.offset.click.left>=i[0]||o-this.offset.click.left>i[2]?o:o-this.offset.click.left>=i[0]?o-r.grid[0]:o+r.grid[0]:o),"y"===r.axis&&(l=this.originalPageX),"x"===r.axis&&(c=this.originalPageY)),{top:c-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.offset.scroll.top:a?0:this.offset.scroll.top),left:l-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.offset.scroll.left:a?0:this.offset.scroll.left)}},_clear:function(){this.helper.removeClass("ui-draggable-dragging"),this.helper[0]===this.element[0]||this.cancelHelperRemoval||this.helper.remove(),this.helper=null,this.cancelHelperRemoval=!1,this.destroyOnClear&&this.destroy()},_normalizeRightBottom:function(){"y"!==this.options.axis&&"auto"!==this.helper.css("right")&&(this.helper.width(this.helper.width()),this.helper.css("right","auto")),"x"!==this.options.axis&&"auto"!==this.helper.css("bottom")&&(this.helper.height(this.helper.height()),this.helper.css("bottom","auto"))},_trigger:function(t,i,n){return n=n||this._uiHash(),e.ui.plugin.call(this,t,[i,n,this],!0),/^(drag|start|stop)/.test(t)&&(this.positionAbs=this._convertPositionTo("absolute"),n.offset=this.positionAbs),e.Widget.prototype._trigger.call(this,t,i,n)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),e.ui.plugin.add("draggable","connectToSortable",{start:function(t,i,n){var s=e.extend({},i,{item:n.element});n.sortables=[],e(n.options.connectToSortable).each(function(){var i=e(this).sortable("instance");i&&!i.options.disabled&&(n.sortables.push(i),i.refreshPositions(),i._trigger("activate",t,s))})},stop:function(t,i,n){var s=e.extend({},i,{item:n.element});n.cancelHelperRemoval=!1,e.each(n.sortables,function(){var e=this;e.isOver?(e.isOver=0,n.cancelHelperRemoval=!0,e.cancelHelperRemoval=!1,e._storedCSS={position:e.placeholder.css("position"),top:e.placeholder.css("top"),left:e.placeholder.css("left")},e._mouseStop(t),e.options.helper=e.options._helper):(e.cancelHelperRemoval=!0,e._trigger("deactivate",t,s))})},drag:function(t,i,n){e.each(n.sortables,function(){var s=!1,o=this;o.positionAbs=n.positionAbs,o.helperProportions=n.helperProportions,o.offset.click=n.offset.click,o._intersectsWith(o.containerCache)&&(s=!0,e.each(n.sortables,function(){return this.positionAbs=n.positionAbs,this.helperProportions=n.helperProportions,this.offset.click=n.offset.click,this!==o&&this._intersectsWith(this.containerCache)&&e.contains(o.element[0],this.element[0])&&(s=!1),s})),s?(o.isOver||(o.isOver=1,n._parent=i.helper.parent(),o.currentItem=i.helper.appendTo(o.element).data("ui-sortable-item",!0),o.options._helper=o.options.helper,o.options.helper=function(){return i.helper[0]},t.target=o.currentItem[0],o._mouseCapture(t,!0),o._mouseStart(t,!0,!0),o.offset.click.top=n.offset.click.top,o.offset.click.left=n.offset.click.left,o.offset.parent.left-=n.offset.parent.left-o.offset.parent.left,o.offset.parent.top-=n.offset.parent.top-o.offset.parent.top,n._trigger("toSortable",t),n.dropped=o.element,e.each(n.sortables,function(){this.refreshPositions()}),n.currentItem=n.element,o.fromOutside=n),o.currentItem&&(o._mouseDrag(t),i.position=o.position)):o.isOver&&(o.isOver=0,o.cancelHelperRemoval=!0,o.options._revert=o.options.revert,o.options.revert=!1,o._trigger("out",t,o._uiHash(o)),o._mouseStop(t,!0),o.options.revert=o.options._revert,o.options.helper=o.options._helper,o.placeholder&&o.placeholder.remove(),i.helper.appendTo(n._parent),n._refreshOffsets(t),i.position=n._generatePosition(t,!0),n._trigger("fromSortable",t),n.dropped=!1,e.each(n.sortables,function(){this.refreshPositions()}))})}}),e.ui.plugin.add("draggable","cursor",{start:function(t,i,n){var s=e("body"),o=n.options;s.css("cursor")&&(o._cursor=s.css("cursor")),s.css("cursor",o.cursor)},stop:function(t,i,n){var s=n.options;s._cursor&&e("body").css("cursor",s._cursor)}}),e.ui.plugin.add("draggable","opacity",{start:function(t,i,n){var s=e(i.helper),o=n.options;s.css("opacity")&&(o._opacity=s.css("opacity")),s.css("opacity",o.opacity)},stop:function(t,i,n){var s=n.options;s._opacity&&e(i.helper).css("opacity",s._opacity)}}),e.ui.plugin.add("draggable","scroll",{start:function(e,t,i){i.scrollParentNotHidden||(i.scrollParentNotHidden=i.helper.scrollParent(!1)),i.scrollParentNotHidden[0]!==i.document[0]&&"HTML"!==i.scrollParentNotHidden[0].tagName&&(i.overflowOffset=i.scrollParentNotHidden.offset())},drag:function(t,i,n){var s=n.options,o=!1,r=n.scrollParentNotHidden[0],a=n.document[0];r!==a&&"HTML"!==r.tagName?(s.axis&&"x"===s.axis||(n.overflowOffset.top+r.offsetHeight-t.pageY<s.scrollSensitivity?r.scrollTop=o=r.scrollTop+s.scrollSpeed:t.pageY-n.overflowOffset.top<s.scrollSensitivity&&(r.scrollTop=o=r.scrollTop-s.scrollSpeed)),s.axis&&"y"===s.axis||(n.overflowOffset.left+r.offsetWidth-t.pageX<s.scrollSensitivity?r.scrollLeft=o=r.scrollLeft+s.scrollSpeed:t.pageX-n.overflowOffset.left<s.scrollSensitivity&&(r.scrollLeft=o=r.scrollLeft-s.scrollSpeed))):(s.axis&&"x"===s.axis||(t.pageY-e(a).scrollTop()<s.scrollSensitivity?o=e(a).scrollTop(e(a).scrollTop()-s.scrollSpeed):e(window).height()-(t.pageY-e(a).scrollTop())<s.scrollSensitivity&&(o=e(a).scrollTop(e(a).scrollTop()+s.scrollSpeed))),s.axis&&"y"===s.axis||(t.pageX-e(a).scrollLeft()<s.scrollSensitivity?o=e(a).scrollLeft(e(a).scrollLeft()-s.scrollSpeed):e(window).width()-(t.pageX-e(a).scrollLeft())<s.scrollSensitivity&&(o=e(a).scrollLeft(e(a).scrollLeft()+s.scrollSpeed)))),!1!==o&&e.ui.ddmanager&&!s.dropBehaviour&&e.ui.ddmanager.prepareOffsets(n,t)}}),e.ui.plugin.add("draggable","snap",{start:function(t,i,n){var s=n.options;n.snapElements=[],e(s.snap.constructor!==String?s.snap.items||":data(ui-draggable)":s.snap).each(function(){var t=e(this),i=t.offset();this!==n.element[0]&&n.snapElements.push({item:this,width:t.outerWidth(),height:t.outerHeight(),top:i.top,left:i.left})})},drag:function(t,i,n){var s,o,r,a,l,c,u,h,d,p,f=n.options,_=f.snapTolerance,m=i.offset.left,g=m+n.helperProportions.width,v=i.offset.top,b=v+n.helperProportions.height;for(d=n.snapElements.length-1;d>=0;d--)l=n.snapElements[d].left-n.margins.left,c=l+n.snapElements[d].width,u=n.snapElements[d].top-n.margins.top,h=u+n.snapElements[d].height,g<l-_||m>c+_||b<u-_||v>h+_||!e.contains(n.snapElements[d].item.ownerDocument,n.snapElements[d].item)?(n.snapElements[d].snapping&&n.options.snap.release&&n.options.snap.release.call(n.element,t,e.extend(n._uiHash(),{snapItem:n.snapElements[d].item})),n.snapElements[d].snapping=!1):("inner"!==f.snapMode&&(s=Math.abs(u-b)<=_,o=Math.abs(h-v)<=_,r=Math.abs(l-g)<=_,a=Math.abs(c-m)<=_,s&&(i.position.top=n._convertPositionTo("relative",{top:u-n.helperProportions.height,left:0}).top),o&&(i.position.top=n._convertPositionTo("relative",{top:h,left:0}).top),r&&(i.position.left=n._convertPositionTo("relative",{top:0,left:l-n.helperProportions.width}).left),a&&(i.position.left=n._convertPositionTo("relative",{top:0,left:c}).left)),p=s||o||r||a,"outer"!==f.snapMode&&(s=Math.abs(u-v)<=_,o=Math.abs(h-b)<=_,r=Math.abs(l-m)<=_,a=Math.abs(c-g)<=_,s&&(i.position.top=n._convertPositionTo("relative",{top:u,left:0}).top),o&&(i.position.top=n._convertPositionTo("relative",{top:h-n.helperProportions.height,left:0}).top),r&&(i.position.left=n._convertPositionTo("relative",{top:0,left:l}).left),a&&(i.position.left=n._convertPositionTo("relative",{top:0,left:c-n.helperProportions.width}).left)),!n.snapElements[d].snapping&&(s||o||r||a||p)&&n.options.snap.snap&&n.options.snap.snap.call(n.element,t,e.extend(n._uiHash(),{snapItem:n.snapElements[d].item})),n.snapElements[d].snapping=s||o||r||a||p)}}),e.ui.plugin.add("draggable","stack",{start:function(t,i,n){var s,o=n.options,r=e.makeArray(e(o.stack)).sort(function(t,i){return(parseInt(e(t).css("zIndex"),10)||0)-(parseInt(e(i).css("zIndex"),10)||0)});r.length&&(s=parseInt(e(r[0]).css("zIndex"),10)||0,e(r).each(function(t){e(this).css("zIndex",s+t)}),this.css("zIndex",s+r.length))}}),e.ui.plugin.add("draggable","zIndex",{start:function(t,i,n){var s=e(i.helper),o=n.options;s.css("zIndex")&&(o._zIndex=s.css("zIndex")),s.css("zIndex",o.zIndex)},stop:function(t,i,n){var s=n.options;s._zIndex&&e(i.helper).css("zIndex",s._zIndex)}});e.ui.draggable;e.widget("ui.droppable",{version:"1.11.4",widgetEventPrefix:"drop",options:{accept:"*",activeClass:!1,addClasses:!0,greedy:!1,hoverClass:!1,scope:"default",tolerance:"intersect",activate:null,deactivate:null,drop:null,out:null,over:null},_create:function(){var t,i=this.options,n=i.accept;this.isover=!1,this.isout=!0,this.accept=e.isFunction(n)?n:function(e){return e.is(n)},this.proportions=function(){if(!arguments.length)return t||(t={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight});t=arguments[0]},this._addToManager(i.scope),i.addClasses&&this.element.addClass("ui-droppable")},_addToManager:function(t){e.ui.ddmanager.droppables[t]=e.ui.ddmanager.droppables[t]||[],e.ui.ddmanager.droppables[t].push(this)},_splice:function(e){for(var t=0;t<e.length;t++)e[t]===this&&e.splice(t,1)},_destroy:function(){var t=e.ui.ddmanager.droppables[this.options.scope];this._splice(t),this.element.removeClass("ui-droppable ui-droppable-disabled")},_setOption:function(t,i){if("accept"===t)this.accept=e.isFunction(i)?i:function(e){return e.is(i)};else if("scope"===t){var n=e.ui.ddmanager.droppables[this.options.scope];this._splice(n),this._addToManager(i)}this._super(t,i)},_activate:function(t){var i=e.ui.ddmanager.current;this.options.activeClass&&this.element.addClass(this.options.activeClass),i&&this._trigger("activate",t,this.ui(i))},_deactivate:function(t){var i=e.ui.ddmanager.current;this.options.activeClass&&this.element.removeClass(this.options.activeClass),i&&this._trigger("deactivate",t,this.ui(i))},_over:function(t){var i=e.ui.ddmanager.current;i&&(i.currentItem||i.element)[0]!==this.element[0]&&this.accept.call(this.element[0],i.currentItem||i.element)&&(this.options.hoverClass&&this.element.addClass(this.options.hoverClass),this._trigger("over",t,this.ui(i)))},_out:function(t){var i=e.ui.ddmanager.current;i&&(i.currentItem||i.element)[0]!==this.element[0]&&this.accept.call(this.element[0],i.currentItem||i.element)&&(this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("out",t,this.ui(i)))},_drop:function(t,i){var n=i||e.ui.ddmanager.current,s=!1;return!(!n||(n.currentItem||n.element)[0]===this.element[0])&&(this.element.find(":data(ui-droppable)").not(".ui-draggable-dragging").each(function(){var i=e(this).droppable("instance");if(i.options.greedy&&!i.options.disabled&&i.options.scope===n.options.scope&&i.accept.call(i.element[0],n.currentItem||n.element)&&e.ui.intersect(n,e.extend(i,{offset:i.element.offset()}),i.options.tolerance,t))return s=!0,!1}),!s&&(!!this.accept.call(this.element[0],n.currentItem||n.element)&&(this.options.activeClass&&this.element.removeClass(this.options.activeClass),this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("drop",t,this.ui(n)),this.element)))},ui:function(e){return{draggable:e.currentItem||e.element,helper:e.helper,position:e.position,offset:e.positionAbs}}}),e.ui.intersect=function(){function e(e,t,i){return e>=t&&e<t+i}return function(t,i,n,s){if(!i.offset)return!1;var o=(t.positionAbs||t.position.absolute).left+t.margins.left,r=(t.positionAbs||t.position.absolute).top+t.margins.top,a=o+t.helperProportions.width,l=r+t.helperProportions.height,c=i.offset.left,u=i.offset.top,h=c+i.proportions().width,d=u+i.proportions().height;switch(n){case"fit":return c<=o&&a<=h&&u<=r&&l<=d;case"intersect":return c<o+t.helperProportions.width/2&&a-t.helperProportions.width/2<h&&u<r+t.helperProportions.height/2&&l-t.helperProportions.height/2<d;case"pointer":return e(s.pageY,u,i.proportions().height)&&e(s.pageX,c,i.proportions().width);case"touch":return(r>=u&&r<=d||l>=u&&l<=d||r<u&&l>d)&&(o>=c&&o<=h||a>=c&&a<=h||o<c&&a>h);default:return!1}}}(),e.ui.ddmanager={current:null,droppables:{default:[]},prepareOffsets:function(t,i){var n,s,o=e.ui.ddmanager.droppables[t.options.scope]||[],r=i?i.type:null,a=(t.currentItem||t.element).find(":data(ui-droppable)").addBack();e:for(n=0;n<o.length;n++)if(!(o[n].options.disabled||t&&!o[n].accept.call(o[n].element[0],t.currentItem||t.element))){for(s=0;s<a.length;s++)if(a[s]===o[n].element[0]){o[n].proportions().height=0;continue e}o[n].visible="none"!==o[n].element.css("display"),o[n].visible&&("mousedown"===r&&o[n]._activate.call(o[n],i),o[n].offset=o[n].element.offset(),o[n].proportions({width:o[n].element[0].offsetWidth,height:o[n].element[0].offsetHeight}))}},drop:function(t,i){var n=!1;return e.each((e.ui.ddmanager.droppables[t.options.scope]||[]).slice(),function(){this.options&&(!this.options.disabled&&this.visible&&e.ui.intersect(t,this,this.options.tolerance,i)&&(n=this._drop.call(this,i)||n),!this.options.disabled&&this.visible&&this.accept.call(this.element[0],t.currentItem||t.element)&&(this.isout=!0,this.isover=!1,this._deactivate.call(this,i)))}),n},dragStart:function(t,i){t.element.parentsUntil("body").bind("scroll.droppable",function(){t.options.refreshPositions||e.ui.ddmanager.prepareOffsets(t,i)})},drag:function(t,i){t.options.refreshPositions&&e.ui.ddmanager.prepareOffsets(t,i),e.each(e.ui.ddmanager.droppables[t.options.scope]||[],function(){if(!this.options.disabled&&!this.greedyChild&&this.visible){var n,s,o,r=e.ui.intersect(t,this,this.options.tolerance,i),a=!r&&this.isover?"isout":r&&!this.isover?"isover":null;a&&(this.options.greedy&&(s=this.options.scope,o=this.element.parents(":data(ui-droppable)").filter(function(){return e(this).droppable("instance").options.scope===s}),o.length&&(n=e(o[0]).droppable("instance"),n.greedyChild="isover"===a)),n&&"isover"===a&&(n.isover=!1,n.isout=!0,n._out.call(n,i)),this[a]=!0,this["isout"===a?"isover":"isout"]=!1,this["isover"===a?"_over":"_out"].call(this,i),n&&"isout"===a&&(n.isout=!1,n.isover=!0,n._over.call(n,i)))}})},dragStop:function(t,i){t.element.parentsUntil("body").unbind("scroll.droppable"),t.options.refreshPositions||e.ui.ddmanager.prepareOffsets(t,i)}};e.ui.droppable;e.widget("ui.resizable",e.ui.mouse,{version:"1.11.4",widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!1,containment:!1,ghost:!1,grid:!1,handles:"e,s,se",helper:!1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:90,resize:null,start:null,stop:null},_num:function(e){return parseInt(e,10)||0},_isNumber:function(e){return!isNaN(parseInt(e,10))},_hasScroll:function(t,i){if("hidden"===e(t).css("overflow"))return!1;var n=i&&"left"===i?"scrollLeft":"scrollTop",s=!1;return t[n]>0||(t[n]=1,s=t[n]>0,t[n]=0,s)},_create:function(){var t,i,n,s,o,r=this,a=this.options;if(this.element.addClass("ui-resizable"),e.extend(this,{_aspectRatio:!!a.aspectRatio,aspectRatio:a.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:a.helper||a.ghost||a.animate?a.helper||"ui-resizable-helper":null}),this.element[0].nodeName.match(/^(canvas|textarea|input|select|button|img)$/i)&&(this.element.wrap(e("<div class='ui-wrapper' style='overflow: hidden;'></div>").css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),
this.element=this.element.parent().data("ui-resizable",this.element.resizable("instance")),this.elementIsWrapper=!0,this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")}),this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0}),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this.originalElement.css({margin:this.originalElement.css("margin")}),this._proportionallyResize()),this.handles=a.handles||(e(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se"),this._handles=e(),this.handles.constructor===String)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),t=this.handles.split(","),this.handles={},i=0;i<t.length;i++)n=e.trim(t[i]),o="ui-resizable-"+n,s=e("<div class='ui-resizable-handle "+o+"'></div>"),s.css({zIndex:a.zIndex}),"se"===n&&s.addClass("ui-icon ui-icon-gripsmall-diagonal-se"),this.handles[n]=".ui-resizable-"+n,this.element.append(s);this._renderAxis=function(t){var i,n,s,o;t=t||this.element;for(i in this.handles)this.handles[i].constructor===String?this.handles[i]=this.element.children(this.handles[i]).first().show():(this.handles[i].jquery||this.handles[i].nodeType)&&(this.handles[i]=e(this.handles[i]),this._on(this.handles[i],{mousedown:r._mouseDown})),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/^(textarea|input|select|button)$/i)&&(n=e(this.handles[i],this.element),o=/sw|ne|nw|se|n|s/.test(i)?n.outerHeight():n.outerWidth(),s=["padding",/ne|nw|n/.test(i)?"Top":/se|sw|s/.test(i)?"Bottom":/^e$/.test(i)?"Right":"Left"].join(""),t.css(s,o),this._proportionallyResize()),this._handles=this._handles.add(this.handles[i])},this._renderAxis(this.element),this._handles=this._handles.add(this.element.find(".ui-resizable-handle")),this._handles.disableSelection(),this._handles.mouseover(function(){r.resizing||(this.className&&(s=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),r.axis=s&&s[1]?s[1]:"se")}),a.autoHide&&(this._handles.hide(),e(this.element).addClass("ui-resizable-autohide").mouseenter(function(){a.disabled||(e(this).removeClass("ui-resizable-autohide"),r._handles.show())}).mouseleave(function(){a.disabled||r.resizing||(e(this).addClass("ui-resizable-autohide"),r._handles.hide())})),this._mouseInit()},_destroy:function(){this._mouseDestroy();var t,i=function(t){e(t).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").removeData("ui-resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};return this.elementIsWrapper&&(i(this.element),t=this.element,this.originalElement.css({position:t.css("position"),width:t.outerWidth(),height:t.outerHeight(),top:t.css("top"),left:t.css("left")}).insertAfter(t),t.remove()),this.originalElement.css("resize",this.originalResizeStyle),i(this.originalElement),this},_mouseCapture:function(t){var i,n,s=!1;for(i in this.handles)((n=e(this.handles[i])[0])===t.target||e.contains(n,t.target))&&(s=!0);return!this.options.disabled&&s},_mouseStart:function(t){var i,n,s,o=this.options,r=this.element;return this.resizing=!0,this._renderProxy(),i=this._num(this.helper.css("left")),n=this._num(this.helper.css("top")),o.containment&&(i+=e(o.containment).scrollLeft()||0,n+=e(o.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:i,top:n},this.size=this._helper?{width:this.helper.width(),height:this.helper.height()}:{width:r.width(),height:r.height()},this.originalSize=this._helper?{width:r.outerWidth(),height:r.outerHeight()}:{width:r.width(),height:r.height()},this.sizeDiff={width:r.outerWidth()-r.width(),height:r.outerHeight()-r.height()},this.originalPosition={left:i,top:n},this.originalMousePosition={left:t.pageX,top:t.pageY},this.aspectRatio="number"==typeof o.aspectRatio?o.aspectRatio:this.originalSize.width/this.originalSize.height||1,s=e(".ui-resizable-"+this.axis).css("cursor"),e("body").css("cursor","auto"===s?this.axis+"-resize":s),r.addClass("ui-resizable-resizing"),this._propagate("start",t),!0},_mouseDrag:function(t){var i,n,s=this.originalMousePosition,o=this.axis,r=t.pageX-s.left||0,a=t.pageY-s.top||0,l=this._change[o];return this._updatePrevProperties(),!!l&&(i=l.apply(this,[t,r,a]),this._updateVirtualBoundaries(t.shiftKey),(this._aspectRatio||t.shiftKey)&&(i=this._updateRatio(i,t)),i=this._respectSize(i,t),this._updateCache(i),this._propagate("resize",t),n=this._applyChanges(),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),e.isEmptyObject(n)||(this._updatePrevProperties(),this._trigger("resize",t,this.ui()),this._applyChanges()),!1)},_mouseStop:function(t){this.resizing=!1;var i,n,s,o,r,a,l,c=this.options,u=this;return this._helper&&(i=this._proportionallyResizeElements,n=i.length&&/textarea/i.test(i[0].nodeName),s=n&&this._hasScroll(i[0],"left")?0:u.sizeDiff.height,o=n?0:u.sizeDiff.width,r={width:u.helper.width()-o,height:u.helper.height()-s},a=parseInt(u.element.css("left"),10)+(u.position.left-u.originalPosition.left)||null,l=parseInt(u.element.css("top"),10)+(u.position.top-u.originalPosition.top)||null,c.animate||this.element.css(e.extend(r,{top:l,left:a})),u.helper.height(u.size.height),u.helper.width(u.size.width),this._helper&&!c.animate&&this._proportionallyResize()),e("body").css("cursor","auto"),this.element.removeClass("ui-resizable-resizing"),this._propagate("stop",t),this._helper&&this.helper.remove(),!1},_updatePrevProperties:function(){this.prevPosition={top:this.position.top,left:this.position.left},this.prevSize={width:this.size.width,height:this.size.height}},_applyChanges:function(){var e={};return this.position.top!==this.prevPosition.top&&(e.top=this.position.top+"px"),this.position.left!==this.prevPosition.left&&(e.left=this.position.left+"px"),this.size.width!==this.prevSize.width&&(e.width=this.size.width+"px"),this.size.height!==this.prevSize.height&&(e.height=this.size.height+"px"),this.helper.css(e),e},_updateVirtualBoundaries:function(e){var t,i,n,s,o,r=this.options;o={minWidth:this._isNumber(r.minWidth)?r.minWidth:0,maxWidth:this._isNumber(r.maxWidth)?r.maxWidth:1/0,minHeight:this._isNumber(r.minHeight)?r.minHeight:0,maxHeight:this._isNumber(r.maxHeight)?r.maxHeight:1/0},(this._aspectRatio||e)&&(t=o.minHeight*this.aspectRatio,n=o.minWidth/this.aspectRatio,i=o.maxHeight*this.aspectRatio,s=o.maxWidth/this.aspectRatio,t>o.minWidth&&(o.minWidth=t),n>o.minHeight&&(o.minHeight=n),i<o.maxWidth&&(o.maxWidth=i),s<o.maxHeight&&(o.maxHeight=s)),this._vBoundaries=o},_updateCache:function(e){this.offset=this.helper.offset(),this._isNumber(e.left)&&(this.position.left=e.left),this._isNumber(e.top)&&(this.position.top=e.top),this._isNumber(e.height)&&(this.size.height=e.height),this._isNumber(e.width)&&(this.size.width=e.width)},_updateRatio:function(e){var t=this.position,i=this.size,n=this.axis;return this._isNumber(e.height)?e.width=e.height*this.aspectRatio:this._isNumber(e.width)&&(e.height=e.width/this.aspectRatio),"sw"===n&&(e.left=t.left+(i.width-e.width),e.top=null),"nw"===n&&(e.top=t.top+(i.height-e.height),e.left=t.left+(i.width-e.width)),e},_respectSize:function(e){var t=this._vBoundaries,i=this.axis,n=this._isNumber(e.width)&&t.maxWidth&&t.maxWidth<e.width,s=this._isNumber(e.height)&&t.maxHeight&&t.maxHeight<e.height,o=this._isNumber(e.width)&&t.minWidth&&t.minWidth>e.width,r=this._isNumber(e.height)&&t.minHeight&&t.minHeight>e.height,a=this.originalPosition.left+this.originalSize.width,l=this.position.top+this.size.height,c=/sw|nw|w/.test(i),u=/nw|ne|n/.test(i);return o&&(e.width=t.minWidth),r&&(e.height=t.minHeight),n&&(e.width=t.maxWidth),s&&(e.height=t.maxHeight),o&&c&&(e.left=a-t.minWidth),n&&c&&(e.left=a-t.maxWidth),r&&u&&(e.top=l-t.minHeight),s&&u&&(e.top=l-t.maxHeight),e.width||e.height||e.left||!e.top?e.width||e.height||e.top||!e.left||(e.left=null):e.top=null,e},_getPaddingPlusBorderDimensions:function(e){for(var t=0,i=[],n=[e.css("borderTopWidth"),e.css("borderRightWidth"),e.css("borderBottomWidth"),e.css("borderLeftWidth")],s=[e.css("paddingTop"),e.css("paddingRight"),e.css("paddingBottom"),e.css("paddingLeft")];t<4;t++)i[t]=parseInt(n[t],10)||0,i[t]+=parseInt(s[t],10)||0;return{height:i[0]+i[2],width:i[1]+i[3]}},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var e,t=0,i=this.helper||this.element;t<this._proportionallyResizeElements.length;t++)e=this._proportionallyResizeElements[t],this.outerDimensions||(this.outerDimensions=this._getPaddingPlusBorderDimensions(e)),e.css({height:i.height()-this.outerDimensions.height||0,width:i.width()-this.outerDimensions.width||0})},_renderProxy:function(){var t=this.element,i=this.options;this.elementOffset=t.offset(),this._helper?(this.helper=this.helper||e("<div style='overflow:hidden;'></div>"),this.helper.addClass(this._helper).css({width:this.element.outerWidth()-1,height:this.element.outerHeight()-1,position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++i.zIndex}),this.helper.appendTo("body").disableSelection()):this.helper=this.element},_change:{e:function(e,t){return{width:this.originalSize.width+t}},w:function(e,t){var i=this.originalSize;return{left:this.originalPosition.left+t,width:i.width-t}},n:function(e,t,i){var n=this.originalSize;return{top:this.originalPosition.top+i,height:n.height-i}},s:function(e,t,i){return{height:this.originalSize.height+i}},se:function(t,i,n){return e.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[t,i,n]))},sw:function(t,i,n){return e.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[t,i,n]))},ne:function(t,i,n){return e.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[t,i,n]))},nw:function(t,i,n){return e.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[t,i,n]))}},_propagate:function(t,i){e.ui.plugin.call(this,t,[i,this.ui()]),"resize"!==t&&this._trigger(t,i,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}),e.ui.plugin.add("resizable","animate",{stop:function(t){var i=e(this).resizable("instance"),n=i.options,s=i._proportionallyResizeElements,o=s.length&&/textarea/i.test(s[0].nodeName),r=o&&i._hasScroll(s[0],"left")?0:i.sizeDiff.height,a=o?0:i.sizeDiff.width,l={width:i.size.width-a,height:i.size.height-r},c=parseInt(i.element.css("left"),10)+(i.position.left-i.originalPosition.left)||null,u=parseInt(i.element.css("top"),10)+(i.position.top-i.originalPosition.top)||null;i.element.animate(e.extend(l,u&&c?{top:u,left:c}:{}),{duration:n.animateDuration,easing:n.animateEasing,step:function(){var n={width:parseInt(i.element.css("width"),10),height:parseInt(i.element.css("height"),10),top:parseInt(i.element.css("top"),10),left:parseInt(i.element.css("left"),10)};s&&s.length&&e(s[0]).css({width:n.width,height:n.height}),i._updateCache(n),i._propagate("resize",t)}})}}),e.ui.plugin.add("resizable","containment",{start:function(){var t,i,n,s,o,r,a,l=e(this).resizable("instance"),c=l.options,u=l.element,h=c.containment,d=h instanceof e?h.get(0):/parent/.test(h)?u.parent().get(0):h;d&&(l.containerElement=e(d),/document/.test(h)||h===document?(l.containerOffset={left:0,top:0},l.containerPosition={left:0,top:0},l.parentData={element:e(document),left:0,top:0,width:e(document).width(),height:e(document).height()||document.body.parentNode.scrollHeight}):(t=e(d),i=[],e(["Top","Right","Left","Bottom"]).each(function(e,n){i[e]=l._num(t.css("padding"+n))}),l.containerOffset=t.offset(),l.containerPosition=t.position(),l.containerSize={height:t.innerHeight()-i[3],width:t.innerWidth()-i[1]},n=l.containerOffset,s=l.containerSize.height,o=l.containerSize.width,r=l._hasScroll(d,"left")?d.scrollWidth:o,a=l._hasScroll(d)?d.scrollHeight:s,l.parentData={element:d,left:n.left,top:n.top,width:r,height:a}))},resize:function(t){var i,n,s,o,r=e(this).resizable("instance"),a=r.options,l=r.containerOffset,c=r.position,u=r._aspectRatio||t.shiftKey,h={top:0,left:0},d=r.containerElement,p=!0;d[0]!==document&&/static/.test(d.css("position"))&&(h=l),c.left<(r._helper?l.left:0)&&(r.size.width=r.size.width+(r._helper?r.position.left-l.left:r.position.left-h.left),u&&(r.size.height=r.size.width/r.aspectRatio,p=!1),r.position.left=a.helper?l.left:0),c.top<(r._helper?l.top:0)&&(r.size.height=r.size.height+(r._helper?r.position.top-l.top:r.position.top),u&&(r.size.width=r.size.height*r.aspectRatio,p=!1),r.position.top=r._helper?l.top:0),s=r.containerElement.get(0)===r.element.parent().get(0),o=/relative|absolute/.test(r.containerElement.css("position")),s&&o?(r.offset.left=r.parentData.left+r.position.left,r.offset.top=r.parentData.top+r.position.top):(r.offset.left=r.element.offset().left,r.offset.top=r.element.offset().top),i=Math.abs(r.sizeDiff.width+(r._helper?r.offset.left-h.left:r.offset.left-l.left)),n=Math.abs(r.sizeDiff.height+(r._helper?r.offset.top-h.top:r.offset.top-l.top)),i+r.size.width>=r.parentData.width&&(r.size.width=r.parentData.width-i,u&&(r.size.height=r.size.width/r.aspectRatio,p=!1)),n+r.size.height>=r.parentData.height&&(r.size.height=r.parentData.height-n,u&&(r.size.width=r.size.height*r.aspectRatio,p=!1)),p||(r.position.left=r.prevPosition.left,r.position.top=r.prevPosition.top,r.size.width=r.prevSize.width,r.size.height=r.prevSize.height)},stop:function(){var t=e(this).resizable("instance"),i=t.options,n=t.containerOffset,s=t.containerPosition,o=t.containerElement,r=e(t.helper),a=r.offset(),l=r.outerWidth()-t.sizeDiff.width,c=r.outerHeight()-t.sizeDiff.height;t._helper&&!i.animate&&/relative/.test(o.css("position"))&&e(this).css({left:a.left-s.left-n.left,width:l,height:c}),t._helper&&!i.animate&&/static/.test(o.css("position"))&&e(this).css({left:a.left-s.left-n.left,width:l,height:c})}}),e.ui.plugin.add("resizable","alsoResize",{start:function(){var t=e(this).resizable("instance"),i=t.options;e(i.alsoResize).each(function(){var t=e(this);t.data("ui-resizable-alsoresize",{width:parseInt(t.width(),10),height:parseInt(t.height(),10),left:parseInt(t.css("left"),10),top:parseInt(t.css("top"),10)})})},resize:function(t,i){var n=e(this).resizable("instance"),s=n.options,o=n.originalSize,r=n.originalPosition,a={height:n.size.height-o.height||0,width:n.size.width-o.width||0,top:n.position.top-r.top||0,left:n.position.left-r.left||0};e(s.alsoResize).each(function(){var t=e(this),n=e(this).data("ui-resizable-alsoresize"),s={},o=t.parents(i.originalElement[0]).length?["width","height"]:["width","height","top","left"];e.each(o,function(e,t){var i=(n[t]||0)+(a[t]||0);i&&i>=0&&(s[t]=i||null)}),t.css(s)})},stop:function(){e(this).removeData("resizable-alsoresize")}}),e.ui.plugin.add("resizable","ghost",{start:function(){var t=e(this).resizable("instance"),i=t.options,n=t.size;t.ghost=t.originalElement.clone(),t.ghost.css({opacity:.25,display:"block",position:"relative",height:n.height,width:n.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass("string"==typeof i.ghost?i.ghost:""),t.ghost.appendTo(t.helper)},resize:function(){var t=e(this).resizable("instance");t.ghost&&t.ghost.css({position:"relative",height:t.size.height,width:t.size.width})},stop:function(){var t=e(this).resizable("instance");t.ghost&&t.helper&&t.helper.get(0).removeChild(t.ghost.get(0))}}),e.ui.plugin.add("resizable","grid",{resize:function(){var t,i=e(this).resizable("instance"),n=i.options,s=i.size,o=i.originalSize,r=i.originalPosition,a=i.axis,l="number"==typeof n.grid?[n.grid,n.grid]:n.grid,c=l[0]||1,u=l[1]||1,h=Math.round((s.width-o.width)/c)*c,d=Math.round((s.height-o.height)/u)*u,p=o.width+h,f=o.height+d,_=n.maxWidth&&n.maxWidth<p,m=n.maxHeight&&n.maxHeight<f,g=n.minWidth&&n.minWidth>p,v=n.minHeight&&n.minHeight>f;n.grid=l,g&&(p+=c),v&&(f+=u),_&&(p-=c),m&&(f-=u),/^(se|s|e)$/.test(a)?(i.size.width=p,i.size.height=f):/^(ne)$/.test(a)?(i.size.width=p,i.size.height=f,i.position.top=r.top-d):/^(sw)$/.test(a)?(i.size.width=p,i.size.height=f,i.position.left=r.left-h):((f-u<=0||p-c<=0)&&(t=i._getPaddingPlusBorderDimensions(this)),f-u>0?(i.size.height=f,i.position.top=r.top-d):(f=u-t.height,i.size.height=f,i.position.top=r.top+o.height-f),p-c>0?(i.size.width=p,i.position.left=r.left-h):(p=c-t.width,i.size.width=p,i.position.left=r.left+o.width-p))}});e.ui.resizable,e.widget("ui.selectable",e.ui.mouse,{version:"1.11.4",options:{appendTo:"body",autoRefresh:!0,distance:0,filter:"*",tolerance:"touch",selected:null,selecting:null,start:null,stop:null,unselected:null,unselecting:null},_create:function(){var t,i=this;this.element.addClass("ui-selectable"),this.dragged=!1,this.refresh=function(){t=e(i.options.filter,i.element[0]),t.addClass("ui-selectee"),t.each(function(){var t=e(this),i=t.offset();e.data(this,"selectable-item",{element:this,$element:t,left:i.left,top:i.top,right:i.left+t.outerWidth(),bottom:i.top+t.outerHeight(),startselected:!1,selected:t.hasClass("ui-selected"),selecting:t.hasClass("ui-selecting"),unselecting:t.hasClass("ui-unselecting")})})},this.refresh(),this.selectees=t.addClass("ui-selectee"),this._mouseInit(),this.helper=e("<div class='ui-selectable-helper'></div>")},_destroy:function(){this.selectees.removeClass("ui-selectee").removeData("selectable-item"),this.element.removeClass("ui-selectable ui-selectable-disabled"),this._mouseDestroy()},_mouseStart:function(t){var i=this,n=this.options;this.opos=[t.pageX,t.pageY],this.options.disabled||(this.selectees=e(n.filter,this.element[0]),this._trigger("start",t),e(n.appendTo).append(this.helper),this.helper.css({left:t.pageX,top:t.pageY,width:0,height:0}),n.autoRefresh&&this.refresh(),this.selectees.filter(".ui-selected").each(function(){var n=e.data(this,"selectable-item");n.startselected=!0,t.metaKey||t.ctrlKey||(n.$element.removeClass("ui-selected"),n.selected=!1,n.$element.addClass("ui-unselecting"),n.unselecting=!0,i._trigger("unselecting",t,{unselecting:n.element}))}),e(t.target).parents().addBack().each(function(){var n,s=e.data(this,"selectable-item");if(s)return n=!t.metaKey&&!t.ctrlKey||!s.$element.hasClass("ui-selected"),s.$element.removeClass(n?"ui-unselecting":"ui-selected").addClass(n?"ui-selecting":"ui-unselecting"),s.unselecting=!n,s.selecting=n,s.selected=n,n?i._trigger("selecting",t,{selecting:s.element}):i._trigger("unselecting",t,{unselecting:s.element}),!1}))},_mouseDrag:function(t){if(this.dragged=!0,!this.options.disabled){var i,n=this,s=this.options,o=this.opos[0],r=this.opos[1],a=t.pageX,l=t.pageY;return o>a&&(i=a,a=o,o=i),r>l&&(i=l,l=r,r=i),this.helper.css({left:o,top:r,width:a-o,height:l-r}),this.selectees.each(function(){var i=e.data(this,"selectable-item"),c=!1;i&&i.element!==n.element[0]&&("touch"===s.tolerance?c=!(i.left>a||i.right<o||i.top>l||i.bottom<r):"fit"===s.tolerance&&(c=i.left>o&&i.right<a&&i.top>r&&i.bottom<l),c?(i.selected&&(i.$element.removeClass("ui-selected"),i.selected=!1),i.unselecting&&(i.$element.removeClass("ui-unselecting"),i.unselecting=!1),i.selecting||(i.$element.addClass("ui-selecting"),i.selecting=!0,n._trigger("selecting",t,{selecting:i.element}))):(i.selecting&&((t.metaKey||t.ctrlKey)&&i.startselected?(i.$element.removeClass("ui-selecting"),i.selecting=!1,i.$element.addClass("ui-selected"),i.selected=!0):(i.$element.removeClass("ui-selecting"),i.selecting=!1,i.startselected&&(i.$element.addClass("ui-unselecting"),i.unselecting=!0),n._trigger("unselecting",t,{unselecting:i.element}))),i.selected&&(t.metaKey||t.ctrlKey||i.startselected||(i.$element.removeClass("ui-selected"),i.selected=!1,i.$element.addClass("ui-unselecting"),i.unselecting=!0,n._trigger("unselecting",t,{unselecting:i.element})))))}),!1}},_mouseStop:function(t){var i=this;return this.dragged=!1,e(".ui-unselecting",this.element[0]).each(function(){var n=e.data(this,"selectable-item");n.$element.removeClass("ui-unselecting"),n.unselecting=!1,n.startselected=!1,i._trigger("unselected",t,{unselected:n.element})}),e(".ui-selecting",this.element[0]).each(function(){var n=e.data(this,"selectable-item");n.$element.removeClass("ui-selecting").addClass("ui-selected"),n.selecting=!1,n.selected=!0,n.startselected=!0,i._trigger("selected",t,{selected:n.element})}),this._trigger("stop",t),this.helper.remove(),!1}}),e.widget("ui.sortable",e.ui.mouse,{version:"1.11.4",widgetEventPrefix:"sort",ready:!1,options:{appendTo:"parent",axis:!1,connectWith:!1,containment:!1,cursor:"auto",cursorAt:!1,dropOnEmpty:!0,forcePlaceholderSize:!1,forceHelperSize:!1,grid:!1,handle:!1,helper:"original",items:"> *",opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1e3,activate:null,beforeStop:null,change:null,deactivate:null,out:null,over:null,receive:null,remove:null,sort:null,start:null,stop:null,update:null},_isOverAxis:function(e,t,i){return e>=t&&e<t+i},_isFloating:function(e){return/left|right/.test(e.css("float"))||/inline|table-cell/.test(e.css("display"))},_create:function(){this.containerCache={},this.element.addClass("ui-sortable"),this.refresh(),this.offset=this.element.offset(),this._mouseInit(),this._setHandleClassName(),this.ready=!0},_setOption:function(e,t){this._super(e,t),"handle"===e&&this._setHandleClassName()},_setHandleClassName:function(){this.element.find(".ui-sortable-handle").removeClass("ui-sortable-handle"),e.each(this.items,function(){(this.instance.options.handle?this.item.find(this.instance.options.handle):this.item).addClass("ui-sortable-handle")})},_destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled").find(".ui-sortable-handle").removeClass("ui-sortable-handle"),this._mouseDestroy();for(var e=this.items.length-1;e>=0;e--)this.items[e].item.removeData(this.widgetName+"-item");return this},_mouseCapture:function(t,i){var n=null,s=!1,o=this;return!this.reverting&&(!this.options.disabled&&"static"!==this.options.type&&(this._refreshItems(t),e(t.target).parents().each(function(){if(e.data(this,o.widgetName+"-item")===o)return n=e(this),!1}),e.data(t.target,o.widgetName+"-item")===o&&(n=e(t.target)),!!n&&(!(this.options.handle&&!i&&(e(this.options.handle,n).find("*").addBack().each(function(){this===t.target&&(s=!0)}),!s))&&(this.currentItem=n,this._removeCurrentsFromItems(),!0))))},_mouseStart:function(t,i,n){var s,o,r=this.options;if(this.currentContainer=this,this.refreshPositions(),this.helper=this._createHelper(t),this._cacheHelperProportions(),this._cacheMargins(),this.scrollParent=this.helper.scrollParent(),this.offset=this.currentItem.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},e.extend(this.offset,{click:{left:t.pageX-this.offset.left,top:t.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.helper.css("position","absolute"),this.cssPosition=this.helper.css("position"),this.originalPosition=this._generatePosition(t),this.originalPageX=t.pageX,this.originalPageY=t.pageY,r.cursorAt&&this._adjustOffsetFromHelper(r.cursorAt),this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]},this.helper[0]!==this.currentItem[0]&&this.currentItem.hide(),this._createPlaceholder(),r.containment&&this._setContainment(),r.cursor&&"auto"!==r.cursor&&(o=this.document.find("body"),this.storedCursor=o.css("cursor"),o.css("cursor",r.cursor),this.storedStylesheet=e("<style>*{ cursor: "+r.cursor+" !important; }</style>").appendTo(o)),r.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",r.opacity)),r.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",r.zIndex)),this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",t,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions(),!n)for(s=this.containers.length-1;s>=0;s--)this.containers[s]._trigger("activate",t,this._uiHash(this));return e.ui.ddmanager&&(e.ui.ddmanager.current=this),e.ui.ddmanager&&!r.dropBehaviour&&e.ui.ddmanager.prepareOffsets(this,t),this.dragging=!0,this.helper.addClass("ui-sortable-helper"),this._mouseDrag(t),!0},_mouseDrag:function(t){var i,n,s,o,r=this.options,a=!1;for(this.position=this._generatePosition(t),this.positionAbs=this._convertPositionTo("absolute"),this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs),this.options.scroll&&(this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-t.pageY<r.scrollSensitivity?this.scrollParent[0].scrollTop=a=this.scrollParent[0].scrollTop+r.scrollSpeed:t.pageY-this.overflowOffset.top<r.scrollSensitivity&&(this.scrollParent[0].scrollTop=a=this.scrollParent[0].scrollTop-r.scrollSpeed),this.overflowOffset.left+this.scrollParent[0].offsetWidth-t.pageX<r.scrollSensitivity?this.scrollParent[0].scrollLeft=a=this.scrollParent[0].scrollLeft+r.scrollSpeed:t.pageX-this.overflowOffset.left<r.scrollSensitivity&&(this.scrollParent[0].scrollLeft=a=this.scrollParent[0].scrollLeft-r.scrollSpeed)):(t.pageY-this.document.scrollTop()<r.scrollSensitivity?a=this.document.scrollTop(this.document.scrollTop()-r.scrollSpeed):this.window.height()-(t.pageY-this.document.scrollTop())<r.scrollSensitivity&&(a=this.document.scrollTop(this.document.scrollTop()+r.scrollSpeed)),t.pageX-this.document.scrollLeft()<r.scrollSensitivity?a=this.document.scrollLeft(this.document.scrollLeft()-r.scrollSpeed):this.window.width()-(t.pageX-this.document.scrollLeft())<r.scrollSensitivity&&(a=this.document.scrollLeft(this.document.scrollLeft()+r.scrollSpeed))),!1!==a&&e.ui.ddmanager&&!r.dropBehaviour&&e.ui.ddmanager.prepareOffsets(this,t)),this.positionAbs=this._convertPositionTo("absolute"),this.options.axis&&"y"===this.options.axis||(this.helper[0].style.left=this.position.left+"px"),this.options.axis&&"x"===this.options.axis||(this.helper[0].style.top=this.position.top+"px"),i=this.items.length-1;i>=0;i--)if(n=this.items[i],s=n.item[0],(o=this._intersectsWithPointer(n))&&n.instance===this.currentContainer&&!(s===this.currentItem[0]||this.placeholder[1===o?"next":"prev"]()[0]===s||e.contains(this.placeholder[0],s)||"semi-dynamic"===this.options.type&&e.contains(this.element[0],s))){if(this.direction=1===o?"down":"up","pointer"!==this.options.tolerance&&!this._intersectsWithSides(n))break;this._rearrange(t,n),this._trigger("change",t,this._uiHash());break}return this._contactContainers(t),e.ui.ddmanager&&e.ui.ddmanager.drag(this,t),this._trigger("sort",t,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(t,i){if(t){if(e.ui.ddmanager&&!this.options.dropBehaviour&&e.ui.ddmanager.drop(this,t),this.options.revert){var n=this,s=this.placeholder.offset(),o=this.options.axis,r={};o&&"x"!==o||(r.left=s.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollLeft)),o&&"y"!==o||(r.top=s.top-this.offset.parent.top-this.margins.top+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollTop)),this.reverting=!0,e(this.helper).animate(r,parseInt(this.options.revert,10)||500,function(){n._clear(t)})}else this._clear(t,i);return!1}},cancel:function(){if(this.dragging){this._mouseUp({target:null}),"original"===this.options.helper?this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"):this.currentItem.show();for(var t=this.containers.length-1;t>=0;t--)this.containers[t]._trigger("deactivate",null,this._uiHash(this)),this.containers[t].containerCache.over&&(this.containers[t]._trigger("out",null,this._uiHash(this)),this.containers[t].containerCache.over=0)}return this.placeholder&&(this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]),"original"!==this.options.helper&&this.helper&&this.helper[0].parentNode&&this.helper.remove(),e.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?e(this.domPosition.prev).after(this.currentItem):e(this.domPosition.parent).prepend(this.currentItem)),this},serialize:function(t){var i=this._getItemsAsjQuery(t&&t.connected),n=[];return t=t||{},e(i).each(function(){var i=(e(t.item||this).attr(t.attribute||"id")||"").match(t.expression||/(.+)[\-=_](.+)/);i&&n.push((t.key||i[1]+"[]")+"="+(t.key&&t.expression?i[1]:i[2]))}),!n.length&&t.key&&n.push(t.key+"="),n.join("&")},toArray:function(t){var i=this._getItemsAsjQuery(t&&t.connected),n=[];return t=t||{},i.each(function(){n.push(e(t.item||this).attr(t.attribute||"id")||"")}),n},_intersectsWith:function(e){var t=this.positionAbs.left,i=t+this.helperProportions.width,n=this.positionAbs.top,s=n+this.helperProportions.height,o=e.left,r=o+e.width,a=e.top,l=a+e.height,c=this.offset.click.top,u=this.offset.click.left,h="x"===this.options.axis||n+c>a&&n+c<l,d="y"===this.options.axis||t+u>o&&t+u<r,p=h&&d;return"pointer"===this.options.tolerance||this.options.forcePointerForContainers||"pointer"!==this.options.tolerance&&this.helperProportions[this.floating?"width":"height"]>e[this.floating?"width":"height"]?p:o<t+this.helperProportions.width/2&&i-this.helperProportions.width/2<r&&a<n+this.helperProportions.height/2&&s-this.helperProportions.height/2<l},_intersectsWithPointer:function(e){var t="x"===this.options.axis||this._isOverAxis(this.positionAbs.top+this.offset.click.top,e.top,e.height),i="y"===this.options.axis||this._isOverAxis(this.positionAbs.left+this.offset.click.left,e.left,e.width),n=t&&i,s=this._getDragVerticalDirection(),o=this._getDragHorizontalDirection();return!!n&&(this.floating?o&&"right"===o||"down"===s?2:1:s&&("down"===s?2:1))},_intersectsWithSides:function(e){var t=this._isOverAxis(this.positionAbs.top+this.offset.click.top,e.top+e.height/2,e.height),i=this._isOverAxis(this.positionAbs.left+this.offset.click.left,e.left+e.width/2,e.width),n=this._getDragVerticalDirection(),s=this._getDragHorizontalDirection();return this.floating&&s?"right"===s&&i||"left"===s&&!i:n&&("down"===n&&t||"up"===n&&!t)},_getDragVerticalDirection:function(){var e=this.positionAbs.top-this.lastPositionAbs.top;return 0!==e&&(e>0?"down":"up")},_getDragHorizontalDirection:function(){var e=this.positionAbs.left-this.lastPositionAbs.left;return 0!==e&&(e>0?"right":"left")},refresh:function(e){return this._refreshItems(e),this._setHandleClassName(),this.refreshPositions(),this},_connectWith:function(){var e=this.options;return e.connectWith.constructor===String?[e.connectWith]:e.connectWith},_getItemsAsjQuery:function(t){function i(){a.push(this)}var n,s,o,r,a=[],l=[],c=this._connectWith();if(c&&t)for(n=c.length-1;n>=0;n--)for(o=e(c[n],this.document[0]),s=o.length-1;s>=0;s--)(r=e.data(o[s],this.widgetFullName))&&r!==this&&!r.options.disabled&&l.push([e.isFunction(r.options.items)?r.options.items.call(r.element):e(r.options.items,r.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),r]);for(l.push([e.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):e(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]),n=l.length-1;n>=0;n--)l[n][0].each(i);return e(a)},_removeCurrentsFromItems:function(){var t=this.currentItem.find(":data("+this.widgetName+"-item)");this.items=e.grep(this.items,function(e){for(var i=0;i<t.length;i++)if(t[i]===e.item[0])return!1;return!0})},_refreshItems:function(t){this.items=[],
this.containers=[this];var i,n,s,o,r,a,l,c,u=this.items,h=[[e.isFunction(this.options.items)?this.options.items.call(this.element[0],t,{item:this.currentItem}):e(this.options.items,this.element),this]],d=this._connectWith();if(d&&this.ready)for(i=d.length-1;i>=0;i--)for(s=e(d[i],this.document[0]),n=s.length-1;n>=0;n--)(o=e.data(s[n],this.widgetFullName))&&o!==this&&!o.options.disabled&&(h.push([e.isFunction(o.options.items)?o.options.items.call(o.element[0],t,{item:this.currentItem}):e(o.options.items,o.element),o]),this.containers.push(o));for(i=h.length-1;i>=0;i--)for(r=h[i][1],a=h[i][0],n=0,c=a.length;n<c;n++)l=e(a[n]),l.data(this.widgetName+"-item",r),u.push({item:l,instance:r,width:0,height:0,left:0,top:0})},refreshPositions:function(t){this.floating=!!this.items.length&&("x"===this.options.axis||this._isFloating(this.items[0].item)),this.offsetParent&&this.helper&&(this.offset.parent=this._getParentOffset());var i,n,s,o;for(i=this.items.length-1;i>=0;i--)n=this.items[i],n.instance!==this.currentContainer&&this.currentContainer&&n.item[0]!==this.currentItem[0]||(s=this.options.toleranceElement?e(this.options.toleranceElement,n.item):n.item,t||(n.width=s.outerWidth(),n.height=s.outerHeight()),o=s.offset(),n.left=o.left,n.top=o.top);if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(i=this.containers.length-1;i>=0;i--)o=this.containers[i].element.offset(),this.containers[i].containerCache.left=o.left,this.containers[i].containerCache.top=o.top,this.containers[i].containerCache.width=this.containers[i].element.outerWidth(),this.containers[i].containerCache.height=this.containers[i].element.outerHeight();return this},_createPlaceholder:function(t){t=t||this;var i,n=t.options;n.placeholder&&n.placeholder.constructor!==String||(i=n.placeholder,n.placeholder={element:function(){var n=t.currentItem[0].nodeName.toLowerCase(),s=e("<"+n+">",t.document[0]).addClass(i||t.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper");return"tbody"===n?t._createTrPlaceholder(t.currentItem.find("tr").eq(0),e("<tr>",t.document[0]).appendTo(s)):"tr"===n?t._createTrPlaceholder(t.currentItem,s):"img"===n&&s.attr("src",t.currentItem.attr("src")),i||s.css("visibility","hidden"),s},update:function(e,s){i&&!n.forcePlaceholderSize||(s.height()||s.height(t.currentItem.innerHeight()-parseInt(t.currentItem.css("paddingTop")||0,10)-parseInt(t.currentItem.css("paddingBottom")||0,10)),s.width()||s.width(t.currentItem.innerWidth()-parseInt(t.currentItem.css("paddingLeft")||0,10)-parseInt(t.currentItem.css("paddingRight")||0,10)))}}),t.placeholder=e(n.placeholder.element.call(t.element,t.currentItem)),t.currentItem.after(t.placeholder),n.placeholder.update(t,t.placeholder)},_createTrPlaceholder:function(t,i){var n=this;t.children().each(function(){e("<td>&#160;</td>",n.document[0]).attr("colspan",e(this).attr("colspan")||1).appendTo(i)})},_contactContainers:function(t){var i,n,s,o,r,a,l,c,u,h,d=null,p=null;for(i=this.containers.length-1;i>=0;i--)if(!e.contains(this.currentItem[0],this.containers[i].element[0]))if(this._intersectsWith(this.containers[i].containerCache)){if(d&&e.contains(this.containers[i].element[0],d.element[0]))continue;d=this.containers[i],p=i}else this.containers[i].containerCache.over&&(this.containers[i]._trigger("out",t,this._uiHash(this)),this.containers[i].containerCache.over=0);if(d)if(1===this.containers.length)this.containers[p].containerCache.over||(this.containers[p]._trigger("over",t,this._uiHash(this)),this.containers[p].containerCache.over=1);else{for(s=1e4,o=null,u=d.floating||this._isFloating(this.currentItem),r=u?"left":"top",a=u?"width":"height",h=u?"clientX":"clientY",n=this.items.length-1;n>=0;n--)e.contains(this.containers[p].element[0],this.items[n].item[0])&&this.items[n].item[0]!==this.currentItem[0]&&(l=this.items[n].item.offset()[r],c=!1,t[h]-l>this.items[n][a]/2&&(c=!0),Math.abs(t[h]-l)<s&&(s=Math.abs(t[h]-l),o=this.items[n],this.direction=c?"up":"down"));if(!o&&!this.options.dropOnEmpty)return;if(this.currentContainer===this.containers[p])return void(this.currentContainer.containerCache.over||(this.containers[p]._trigger("over",t,this._uiHash()),this.currentContainer.containerCache.over=1));o?this._rearrange(t,o,null,!0):this._rearrange(t,null,this.containers[p].element,!0),this._trigger("change",t,this._uiHash()),this.containers[p]._trigger("change",t,this._uiHash(this)),this.currentContainer=this.containers[p],this.options.placeholder.update(this.currentContainer,this.placeholder),this.containers[p]._trigger("over",t,this._uiHash(this)),this.containers[p].containerCache.over=1}},_createHelper:function(t){var i=this.options,n=e.isFunction(i.helper)?e(i.helper.apply(this.element[0],[t,this.currentItem])):"clone"===i.helper?this.currentItem.clone():this.currentItem;return n.parents("body").length||e("parent"!==i.appendTo?i.appendTo:this.currentItem[0].parentNode)[0].appendChild(n[0]),n[0]===this.currentItem[0]&&(this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")}),n[0].style.width&&!i.forceHelperSize||n.width(this.currentItem.width()),n[0].style.height&&!i.forceHelperSize||n.height(this.currentItem.height()),n},_adjustOffsetFromHelper:function(t){"string"==typeof t&&(t=t.split(" ")),e.isArray(t)&&(t={left:+t[0],top:+t[1]||0}),"left"in t&&(this.offset.click.left=t.left+this.margins.left),"right"in t&&(this.offset.click.left=this.helperProportions.width-t.right+this.margins.left),"top"in t&&(this.offset.click.top=t.top+this.margins.top),"bottom"in t&&(this.offset.click.top=this.helperProportions.height-t.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var t=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==this.document[0]&&e.contains(this.scrollParent[0],this.offsetParent[0])&&(t.left+=this.scrollParent.scrollLeft(),t.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]===this.document[0].body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&e.ui.ie)&&(t={top:0,left:0}),{top:t.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:t.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"===this.cssPosition){var e=this.currentItem.position();return{top:e.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:e.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.currentItem.css("marginLeft"),10)||0,top:parseInt(this.currentItem.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var t,i,n,s=this.options;"parent"===s.containment&&(s.containment=this.helper[0].parentNode),"document"!==s.containment&&"window"!==s.containment||(this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,"document"===s.containment?this.document.width():this.window.width()-this.helperProportions.width-this.margins.left,("document"===s.containment?this.document.width():this.window.height()||this.document[0].body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]),/^(document|window|parent)$/.test(s.containment)||(t=e(s.containment)[0],i=e(s.containment).offset(),n="hidden"!==e(t).css("overflow"),this.containment=[i.left+(parseInt(e(t).css("borderLeftWidth"),10)||0)+(parseInt(e(t).css("paddingLeft"),10)||0)-this.margins.left,i.top+(parseInt(e(t).css("borderTopWidth"),10)||0)+(parseInt(e(t).css("paddingTop"),10)||0)-this.margins.top,i.left+(n?Math.max(t.scrollWidth,t.offsetWidth):t.offsetWidth)-(parseInt(e(t).css("borderLeftWidth"),10)||0)-(parseInt(e(t).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,i.top+(n?Math.max(t.scrollHeight,t.offsetHeight):t.offsetHeight)-(parseInt(e(t).css("borderTopWidth"),10)||0)-(parseInt(e(t).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top])},_convertPositionTo:function(t,i){i||(i=this.position);var n="absolute"===t?1:-1,s="absolute"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&e.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,o=/(html|body)/i.test(s[0].tagName);return{top:i.top+this.offset.relative.top*n+this.offset.parent.top*n-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():o?0:s.scrollTop())*n,left:i.left+this.offset.relative.left*n+this.offset.parent.left*n-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():o?0:s.scrollLeft())*n}},_generatePosition:function(t){var i,n,s=this.options,o=t.pageX,r=t.pageY,a="absolute"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&e.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,l=/(html|body)/i.test(a[0].tagName);return"relative"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&this.scrollParent[0]!==this.offsetParent[0]||(this.offset.relative=this._getRelativeOffset()),this.originalPosition&&(this.containment&&(t.pageX-this.offset.click.left<this.containment[0]&&(o=this.containment[0]+this.offset.click.left),t.pageY-this.offset.click.top<this.containment[1]&&(r=this.containment[1]+this.offset.click.top),t.pageX-this.offset.click.left>this.containment[2]&&(o=this.containment[2]+this.offset.click.left),t.pageY-this.offset.click.top>this.containment[3]&&(r=this.containment[3]+this.offset.click.top)),s.grid&&(i=this.originalPageY+Math.round((r-this.originalPageY)/s.grid[1])*s.grid[1],r=this.containment?i-this.offset.click.top>=this.containment[1]&&i-this.offset.click.top<=this.containment[3]?i:i-this.offset.click.top>=this.containment[1]?i-s.grid[1]:i+s.grid[1]:i,n=this.originalPageX+Math.round((o-this.originalPageX)/s.grid[0])*s.grid[0],o=this.containment?n-this.offset.click.left>=this.containment[0]&&n-this.offset.click.left<=this.containment[2]?n:n-this.offset.click.left>=this.containment[0]?n-s.grid[0]:n+s.grid[0]:n)),{top:r-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():l?0:a.scrollTop()),left:o-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():l?0:a.scrollLeft())}},_rearrange:function(e,t,i,n){i?i[0].appendChild(this.placeholder[0]):t.item[0].parentNode.insertBefore(this.placeholder[0],"down"===this.direction?t.item[0]:t.item[0].nextSibling),this.counter=this.counter?++this.counter:1;var s=this.counter;this._delay(function(){s===this.counter&&this.refreshPositions(!n)})},_clear:function(e,t){function i(e,t,i){return function(n){i._trigger(e,n,t._uiHash(t))}}this.reverting=!1;var n,s=[];if(!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem),this._noFinalSort=null,this.helper[0]===this.currentItem[0]){for(n in this._storedCSS)"auto"!==this._storedCSS[n]&&"static"!==this._storedCSS[n]||(this._storedCSS[n]="");this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else this.currentItem.show();for(this.fromOutside&&!t&&s.push(function(e){this._trigger("receive",e,this._uiHash(this.fromOutside))}),!this.fromOutside&&this.domPosition.prev===this.currentItem.prev().not(".ui-sortable-helper")[0]&&this.domPosition.parent===this.currentItem.parent()[0]||t||s.push(function(e){this._trigger("update",e,this._uiHash())}),this!==this.currentContainer&&(t||(s.push(function(e){this._trigger("remove",e,this._uiHash())}),s.push(function(e){return function(t){e._trigger("receive",t,this._uiHash(this))}}.call(this,this.currentContainer)),s.push(function(e){return function(t){e._trigger("update",t,this._uiHash(this))}}.call(this,this.currentContainer)))),n=this.containers.length-1;n>=0;n--)t||s.push(i("deactivate",this,this.containers[n])),this.containers[n].containerCache.over&&(s.push(i("out",this,this.containers[n])),this.containers[n].containerCache.over=0);if(this.storedCursor&&(this.document.find("body").css("cursor",this.storedCursor),this.storedStylesheet.remove()),this._storedOpacity&&this.helper.css("opacity",this._storedOpacity),this._storedZIndex&&this.helper.css("zIndex","auto"===this._storedZIndex?"":this._storedZIndex),this.dragging=!1,t||this._trigger("beforeStop",e,this._uiHash()),this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.cancelHelperRemoval||(this.helper[0]!==this.currentItem[0]&&this.helper.remove(),this.helper=null),!t){for(n=0;n<s.length;n++)s[n].call(this,e);this._trigger("stop",e,this._uiHash())}return this.fromOutside=!1,!this.cancelHelperRemoval},_trigger:function(){!1===e.Widget.prototype._trigger.apply(this,arguments)&&this.cancel()},_uiHash:function(t){var i=t||this;return{helper:i.helper,placeholder:i.placeholder||e([]),position:i.position,originalPosition:i.originalPosition,offset:i.positionAbs,item:i.currentItem,sender:t?t.element:null}}}),e.widget("ui.accordion",{version:"1.11.4",options:{active:0,animate:{},collapsible:!1,event:"click",header:"> li > :first-child,> :not(li):even",heightStyle:"auto",icons:{activeHeader:"ui-icon-triangle-1-s",header:"ui-icon-triangle-1-e"},activate:null,beforeActivate:null},hideProps:{borderTopWidth:"hide",borderBottomWidth:"hide",paddingTop:"hide",paddingBottom:"hide",height:"hide"},showProps:{borderTopWidth:"show",borderBottomWidth:"show",paddingTop:"show",paddingBottom:"show",height:"show"},_create:function(){var t=this.options;this.prevShow=this.prevHide=e(),this.element.addClass("ui-accordion ui-widget ui-helper-reset").attr("role","tablist"),t.collapsible||!1!==t.active&&null!=t.active||(t.active=0),this._processPanels(),t.active<0&&(t.active+=this.headers.length),this._refresh()},_getCreateEventData:function(){return{header:this.active,panel:this.active.length?this.active.next():e()}},_createIcons:function(){var t=this.options.icons;t&&(e("<span>").addClass("ui-accordion-header-icon ui-icon "+t.header).prependTo(this.headers),this.active.children(".ui-accordion-header-icon").removeClass(t.header).addClass(t.activeHeader),this.headers.addClass("ui-accordion-icons"))},_destroyIcons:function(){this.headers.removeClass("ui-accordion-icons").children(".ui-accordion-header-icon").remove()},_destroy:function(){var e;this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role"),this.headers.removeClass("ui-accordion-header ui-accordion-header-active ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top").removeAttr("role").removeAttr("aria-expanded").removeAttr("aria-selected").removeAttr("aria-controls").removeAttr("tabIndex").removeUniqueId(),this._destroyIcons(),e=this.headers.next().removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-state-disabled").css("display","").removeAttr("role").removeAttr("aria-hidden").removeAttr("aria-labelledby").removeUniqueId(),"content"!==this.options.heightStyle&&e.css("height","")},_setOption:function(e,t){if("active"===e)return void this._activate(t);"event"===e&&(this.options.event&&this._off(this.headers,this.options.event),this._setupEvents(t)),this._super(e,t),"collapsible"!==e||t||!1!==this.options.active||this._activate(0),"icons"===e&&(this._destroyIcons(),t&&this._createIcons()),"disabled"===e&&(this.element.toggleClass("ui-state-disabled",!!t).attr("aria-disabled",t),this.headers.add(this.headers.next()).toggleClass("ui-state-disabled",!!t))},_keydown:function(t){if(!t.altKey&&!t.ctrlKey){var i=e.ui.keyCode,n=this.headers.length,s=this.headers.index(t.target),o=!1;switch(t.keyCode){case i.RIGHT:case i.DOWN:o=this.headers[(s+1)%n];break;case i.LEFT:case i.UP:o=this.headers[(s-1+n)%n];break;case i.SPACE:case i.ENTER:this._eventHandler(t);break;case i.HOME:o=this.headers[0];break;case i.END:o=this.headers[n-1]}o&&(e(t.target).attr("tabIndex",-1),e(o).attr("tabIndex",0),o.focus(),t.preventDefault())}},_panelKeyDown:function(t){t.keyCode===e.ui.keyCode.UP&&t.ctrlKey&&e(t.currentTarget).prev().focus()},refresh:function(){var t=this.options;this._processPanels(),!1===t.active&&!0===t.collapsible||!this.headers.length?(t.active=!1,this.active=e()):!1===t.active?this._activate(0):this.active.length&&!e.contains(this.element[0],this.active[0])?this.headers.length===this.headers.find(".ui-state-disabled").length?(t.active=!1,this.active=e()):this._activate(Math.max(0,t.active-1)):t.active=this.headers.index(this.active),this._destroyIcons(),this._refresh()},_processPanels:function(){var e=this.headers,t=this.panels;this.headers=this.element.find(this.options.header).addClass("ui-accordion-header ui-state-default ui-corner-all"),this.panels=this.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom").filter(":not(.ui-accordion-content-active)").hide(),t&&(this._off(e.not(this.headers)),this._off(t.not(this.panels)))},_refresh:function(){var t,i=this.options,n=i.heightStyle,s=this.element.parent();this.active=this._findActive(i.active).addClass("ui-accordion-header-active ui-state-active ui-corner-top").removeClass("ui-corner-all"),this.active.next().addClass("ui-accordion-content-active").show(),this.headers.attr("role","tab").each(function(){var t=e(this),i=t.uniqueId().attr("id"),n=t.next(),s=n.uniqueId().attr("id");t.attr("aria-controls",s),n.attr("aria-labelledby",i)}).next().attr("role","tabpanel"),this.headers.not(this.active).attr({"aria-selected":"false","aria-expanded":"false",tabIndex:-1}).next().attr({"aria-hidden":"true"}).hide(),this.active.length?this.active.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}).next().attr({"aria-hidden":"false"}):this.headers.eq(0).attr("tabIndex",0),this._createIcons(),this._setupEvents(i.event),"fill"===n?(t=s.height(),this.element.siblings(":visible").each(function(){var i=e(this),n=i.css("position");"absolute"!==n&&"fixed"!==n&&(t-=i.outerHeight(!0))}),this.headers.each(function(){t-=e(this).outerHeight(!0)}),this.headers.next().each(function(){e(this).height(Math.max(0,t-e(this).innerHeight()+e(this).height()))}).css("overflow","auto")):"auto"===n&&(t=0,this.headers.next().each(function(){t=Math.max(t,e(this).css("height","").height())}).height(t))},_activate:function(t){var i=this._findActive(t)[0];i!==this.active[0]&&(i=i||this.active[0],this._eventHandler({target:i,currentTarget:i,preventDefault:e.noop}))},_findActive:function(t){return"number"==typeof t?this.headers.eq(t):e()},_setupEvents:function(t){var i={keydown:"_keydown"};t&&e.each(t.split(" "),function(e,t){i[t]="_eventHandler"}),this._off(this.headers.add(this.headers.next())),this._on(this.headers,i),this._on(this.headers.next(),{keydown:"_panelKeyDown"}),this._hoverable(this.headers),this._focusable(this.headers)},_eventHandler:function(t){var i=this.options,n=this.active,s=e(t.currentTarget),o=s[0]===n[0],r=o&&i.collapsible,a=r?e():s.next(),l=n.next(),c={oldHeader:n,oldPanel:l,newHeader:r?e():s,newPanel:a};t.preventDefault(),o&&!i.collapsible||!1===this._trigger("beforeActivate",t,c)||(i.active=!r&&this.headers.index(s),this.active=o?e():s,this._toggle(c),n.removeClass("ui-accordion-header-active ui-state-active"),i.icons&&n.children(".ui-accordion-header-icon").removeClass(i.icons.activeHeader).addClass(i.icons.header),o||(s.removeClass("ui-corner-all").addClass("ui-accordion-header-active ui-state-active ui-corner-top"),i.icons&&s.children(".ui-accordion-header-icon").removeClass(i.icons.header).addClass(i.icons.activeHeader),s.next().addClass("ui-accordion-content-active")))},_toggle:function(t){var i=t.newPanel,n=this.prevShow.length?this.prevShow:t.oldPanel;this.prevShow.add(this.prevHide).stop(!0,!0),this.prevShow=i,this.prevHide=n,this.options.animate?this._animate(i,n,t):(n.hide(),i.show(),this._toggleComplete(t)),n.attr({"aria-hidden":"true"}),n.prev().attr({"aria-selected":"false","aria-expanded":"false"}),i.length&&n.length?n.prev().attr({tabIndex:-1,"aria-expanded":"false"}):i.length&&this.headers.filter(function(){return 0===parseInt(e(this).attr("tabIndex"),10)}).attr("tabIndex",-1),i.attr("aria-hidden","false").prev().attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0})},_animate:function(e,t,i){var n,s,o,r=this,a=0,l=e.css("box-sizing"),c=e.length&&(!t.length||e.index()<t.index()),u=this.options.animate||{},h=c&&u.down||u,d=function(){r._toggleComplete(i)};return"number"==typeof h&&(o=h),"string"==typeof h&&(s=h),s=s||h.easing||u.easing,o=o||h.duration||u.duration,t.length?e.length?(n=e.show().outerHeight(),t.animate(this.hideProps,{duration:o,easing:s,step:function(e,t){t.now=Math.round(e)}}),void e.hide().animate(this.showProps,{duration:o,easing:s,complete:d,step:function(e,i){i.now=Math.round(e),"height"!==i.prop?"content-box"===l&&(a+=i.now):"content"!==r.options.heightStyle&&(i.now=Math.round(n-t.outerHeight()-a),a=0)}})):t.animate(this.hideProps,o,s,d):e.animate(this.showProps,o,s,d)},_toggleComplete:function(e){var t=e.oldPanel;t.removeClass("ui-accordion-content-active").prev().removeClass("ui-corner-top").addClass("ui-corner-all"),t.length&&(t.parent()[0].className=t.parent()[0].className),this._trigger("activate",null,e)}}),e.widget("ui.menu",{version:"1.11.4",defaultElement:"<ul>",delay:300,options:{icons:{submenu:"ui-icon-carat-1-e"},items:"> *",menus:"ul",position:{my:"left-1 top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element,this.mouseHandled=!1,this.element.uniqueId().addClass("ui-menu ui-widget ui-widget-content").toggleClass("ui-menu-icons",!!this.element.find(".ui-icon").length).attr({role:this.options.role,tabIndex:0}),this.options.disabled&&this.element.addClass("ui-state-disabled").attr("aria-disabled","true"),this._on({"mousedown .ui-menu-item":function(e){e.preventDefault()},"click .ui-menu-item":function(t){var i=e(t.target);!this.mouseHandled&&i.not(".ui-state-disabled").length&&(this.select(t),t.isPropagationStopped()||(this.mouseHandled=!0),i.has(".ui-menu").length?this.expand(t):!this.element.is(":focus")&&e(this.document[0].activeElement).closest(".ui-menu").length&&(this.element.trigger("focus",[!0]),this.active&&1===this.active.parents(".ui-menu").length&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":function(t){if(!this.previousFilter){var i=e(t.currentTarget);i.siblings(".ui-state-active").removeClass("ui-state-active"),this.focus(t,i)}},mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(e,t){var i=this.active||this.element.find(this.options.items).eq(0);t||this.focus(e,i)},blur:function(t){this._delay(function(){e.contains(this.element[0],this.document[0].activeElement)||this.collapseAll(t)})},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(e){this._closeOnDocumentClick(e)&&this.collapseAll(e),this.mouseHandled=!1}})},_destroy:function(){this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeClass("ui-menu ui-widget ui-widget-content ui-menu-icons ui-front").removeAttr("role").removeAttr("tabIndex").removeAttr("aria-labelledby").removeAttr("aria-expanded").removeAttr("aria-hidden").removeAttr("aria-disabled").removeUniqueId().show(),this.element.find(".ui-menu-item").removeClass("ui-menu-item").removeAttr("role").removeAttr("aria-disabled").removeUniqueId().removeClass("ui-state-hover").removeAttr("tabIndex").removeAttr("role").removeAttr("aria-haspopup").children().each(function(){var t=e(this);t.data("ui-menu-submenu-carat")&&t.remove()}),this.element.find(".ui-menu-divider").removeClass("ui-menu-divider ui-widget-content")},_keydown:function(t){var i,n,s,o,r=!0;switch(t.keyCode){case e.ui.keyCode.PAGE_UP:this.previousPage(t);break;case e.ui.keyCode.PAGE_DOWN:this.nextPage(t);break;case e.ui.keyCode.HOME:this._move("first","first",t);break;case e.ui.keyCode.END:this._move("last","last",t);break;case e.ui.keyCode.UP:this.previous(t);break;case e.ui.keyCode.DOWN:this.next(t);break;case e.ui.keyCode.LEFT:this.collapse(t);break;case e.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(t);break;case e.ui.keyCode.ENTER:case e.ui.keyCode.SPACE:this._activate(t);break;case e.ui.keyCode.ESCAPE:this.collapse(t);break;default:r=!1,n=this.previousFilter||"",s=String.fromCharCode(t.keyCode),o=!1,clearTimeout(this.filterTimer),s===n?o=!0:s=n+s,i=this._filterMenuItems(s),i=o&&-1!==i.index(this.active.next())?this.active.nextAll(".ui-menu-item"):i,i.length||(s=String.fromCharCode(t.keyCode),i=this._filterMenuItems(s)),i.length?(this.focus(t,i),this.previousFilter=s,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter}r&&t.preventDefault()},_activate:function(e){this.active.is(".ui-state-disabled")||(this.active.is("[aria-haspopup='true']")?this.expand(e):this.select(e))},refresh:function(){var t,i,n=this,s=this.options.icons.submenu,o=this.element.find(this.options.menus);this.element.toggleClass("ui-menu-icons",!!this.element.find(".ui-icon").length),o.filter(":not(.ui-menu)").addClass("ui-menu ui-widget ui-widget-content ui-front").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var t=e(this),i=t.parent(),n=e("<span>").addClass("ui-menu-icon ui-icon "+s).data("ui-menu-submenu-carat",!0);i.attr("aria-haspopup","true").prepend(n),t.attr("aria-labelledby",i.attr("id"))}),t=o.add(this.element),i=t.find(this.options.items),i.not(".ui-menu-item").each(function(){var t=e(this);n._isDivider(t)&&t.addClass("ui-widget-content ui-menu-divider")}),i.not(".ui-menu-item, .ui-menu-divider").addClass("ui-menu-item").uniqueId().attr({tabIndex:-1,role:this._itemRole()}),i.filter(".ui-state-disabled").attr("aria-disabled","true"),this.active&&!e.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},_setOption:function(e,t){"icons"===e&&this.element.find(".ui-menu-icon").removeClass(this.options.icons.submenu).addClass(t.submenu),"disabled"===e&&this.element.toggleClass("ui-state-disabled",!!t).attr("aria-disabled",t),this._super(e,t)},focus:function(e,t){var i,n;this.blur(e,e&&"focus"===e.type),this._scrollIntoView(t),this.active=t.first(),n=this.active.addClass("ui-state-focus").removeClass("ui-state-active"),this.options.role&&this.element.attr("aria-activedescendant",n.attr("id")),this.active.parent().closest(".ui-menu-item").addClass("ui-state-active"),e&&"keydown"===e.type?this._close():this.timer=this._delay(function(){this._close()},this.delay),i=t.children(".ui-menu"),i.length&&e&&/^mouse/.test(e.type)&&this._startOpening(i),this.activeMenu=t.parent(),this._trigger("focus",e,{item:t})},_scrollIntoView:function(t){var i,n,s,o,r,a;this._hasScroll()&&(i=parseFloat(e.css(this.activeMenu[0],"borderTopWidth"))||0,n=parseFloat(e.css(this.activeMenu[0],"paddingTop"))||0,s=t.offset().top-this.activeMenu.offset().top-i-n,o=this.activeMenu.scrollTop(),r=this.activeMenu.height(),a=t.outerHeight(),s<0?this.activeMenu.scrollTop(o+s):s+a>r&&this.activeMenu.scrollTop(o+s-r+a))},blur:function(e,t){t||clearTimeout(this.timer),this.active&&(this.active.removeClass("ui-state-focus"),this.active=null,this._trigger("blur",e,{item:this.active}))},_startOpening:function(e){clearTimeout(this.timer),"true"===e.attr("aria-hidden")&&(this.timer=this._delay(function(){this._close(),this._open(e)},this.delay))},_open:function(t){var i=e.extend({of:this.active},this.options.position);clearTimeout(this.timer),this.element.find(".ui-menu").not(t.parents(".ui-menu")).hide().attr("aria-hidden","true"),t.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(i)},collapseAll:function(t,i){clearTimeout(this.timer),this.timer=this._delay(function(){var n=i?this.element:e(t&&t.target).closest(this.element.find(".ui-menu"));n.length||(n=this.element),this._close(n),this.blur(t),this.activeMenu=n},this.delay)},_close:function(e){e||(e=this.active?this.active.parent():this.element),e.find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","false").end().find(".ui-state-active").not(".ui-state-focus").removeClass("ui-state-active")},_closeOnDocumentClick:function(t){return!e(t.target).closest(".ui-menu").length},_isDivider:function(e){return!/[^\-\u2014\u2013\s]/.test(e.text())},collapse:function(e){var t=this.active&&this.active.parent().closest(".ui-menu-item",this.element);t&&t.length&&(this._close(),this.focus(e,t))},expand:function(e){var t=this.active&&this.active.children(".ui-menu ").find(this.options.items).first();t&&t.length&&(this._open(t.parent()),this._delay(function(){this.focus(e,t)}))},next:function(e){this._move("next","first",e)},previous:function(e){this._move("prev","last",e)},isFirstItem:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},isLastItem:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},_move:function(e,t,i){var n;this.active&&(n="first"===e||"last"===e?this.active["first"===e?"prevAll":"nextAll"](".ui-menu-item").eq(-1):this.active[e+"All"](".ui-menu-item").eq(0)),n&&n.length&&this.active||(n=this.activeMenu.find(this.options.items)[t]()),this.focus(i,n)},nextPage:function(t){var i,n,s;if(!this.active)return void this.next(t);this.isLastItem()||(this._hasScroll()?(n=this.active.offset().top,s=this.element.height(),this.active.nextAll(".ui-menu-item").each(function(){return i=e(this),i.offset().top-n-s<0}),this.focus(t,i)):this.focus(t,this.activeMenu.find(this.options.items)[this.active?"last":"first"]()))},previousPage:function(t){var i,n,s;if(!this.active)return void this.next(t);this.isFirstItem()||(this._hasScroll()?(n=this.active.offset().top,s=this.element.height(),this.active.prevAll(".ui-menu-item").each(function(){return i=e(this),i.offset().top-n+s>0}),this.focus(t,i)):this.focus(t,this.activeMenu.find(this.options.items).first()))},_hasScroll:function(){return this.element.outerHeight()<this.element.prop("scrollHeight")},select:function(t){this.active=this.active||e(t.target).closest(".ui-menu-item");var i={item:this.active};this.active.has(".ui-menu").length||this.collapseAll(t,!0),this._trigger("select",t,i)},_filterMenuItems:function(t){var i=t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&"),n=new RegExp("^"+i,"i");return this.activeMenu.find(this.options.items).filter(".ui-menu-item").filter(function(){return n.test(e.trim(e(this).text()))})}});e.widget("ui.autocomplete",{version:"1.11.4",defaultElement:"<input>",options:{appendTo:null,autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},requestIndex:0,pending:0,_create:function(){var t,i,n,s=this.element[0].nodeName.toLowerCase(),o="textarea"===s,r="input"===s;this.isMultiLine=!!o||!r&&this.element.prop("isContentEditable"),this.valueMethod=this.element[o||r?"val":"text"],this.isNewMenu=!0,this.element.addClass("ui-autocomplete-input").attr("autocomplete","off"),this._on(this.element,{keydown:function(s){if(this.element.prop("readOnly"))return t=!0,n=!0,void(i=!0);t=!1,n=!1,i=!1;var o=e.ui.keyCode;switch(s.keyCode){case o.PAGE_UP:t=!0,this._move("previousPage",s);break;case o.PAGE_DOWN:t=!0,this._move("nextPage",s);break;case o.UP:t=!0,this._keyEvent("previous",s);break;case o.DOWN:t=!0,this._keyEvent("next",s);break;case o.ENTER:this.menu.active&&(t=!0,s.preventDefault(),this.menu.select(s));break;case o.TAB:this.menu.active&&this.menu.select(s);break;case o.ESCAPE:this.menu.element.is(":visible")&&(this.isMultiLine||this._value(this.term),this.close(s),s.preventDefault());break;default:
i=!0,this._searchTimeout(s)}},keypress:function(n){if(t)return t=!1,void(this.isMultiLine&&!this.menu.element.is(":visible")||n.preventDefault());if(!i){var s=e.ui.keyCode;switch(n.keyCode){case s.PAGE_UP:this._move("previousPage",n);break;case s.PAGE_DOWN:this._move("nextPage",n);break;case s.UP:this._keyEvent("previous",n);break;case s.DOWN:this._keyEvent("next",n)}}},input:function(e){if(n)return n=!1,void e.preventDefault();this._searchTimeout(e)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(e){if(this.cancelBlur)return void delete this.cancelBlur;clearTimeout(this.searching),this.close(e),this._change(e)}}),this._initSource(),this.menu=e("<ul>").addClass("ui-autocomplete ui-front").appendTo(this._appendTo()).menu({role:null}).hide().menu("instance"),this._on(this.menu.element,{mousedown:function(t){t.preventDefault(),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur});var i=this.menu.element[0];e(t.target).closest(".ui-menu-item").length||this._delay(function(){var t=this;this.document.one("mousedown",function(n){n.target===t.element[0]||n.target===i||e.contains(i,n.target)||t.close()})})},menufocus:function(t,i){var n,s;if(this.isNewMenu&&(this.isNewMenu=!1,t.originalEvent&&/^mouse/.test(t.originalEvent.type)))return this.menu.blur(),void this.document.one("mousemove",function(){e(t.target).trigger(t.originalEvent)});s=i.item.data("ui-autocomplete-item"),!1!==this._trigger("focus",t,{item:s})&&t.originalEvent&&/^key/.test(t.originalEvent.type)&&this._value(s.value),(n=i.item.attr("aria-label")||s.value)&&e.trim(n).length&&(this.liveRegion.children().hide(),e("<div>").text(n).appendTo(this.liveRegion))},menuselect:function(e,t){var i=t.item.data("ui-autocomplete-item"),n=this.previous;this.element[0]!==this.document[0].activeElement&&(this.element.focus(),this.previous=n,this._delay(function(){this.previous=n,this.selectedItem=i})),!1!==this._trigger("select",e,{item:i})&&this._value(i.value),this.term=this._value(),this.close(e),this.selectedItem=i}}),this.liveRegion=e("<span>",{role:"status","aria-live":"assertive","aria-relevant":"additions"}).addClass("ui-helper-hidden-accessible").appendTo(this.document[0].body),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_destroy:function(){clearTimeout(this.searching),this.element.removeClass("ui-autocomplete-input").removeAttr("autocomplete"),this.menu.element.remove(),this.liveRegion.remove()},_setOption:function(e,t){this._super(e,t),"source"===e&&this._initSource(),"appendTo"===e&&this.menu.element.appendTo(this._appendTo()),"disabled"===e&&t&&this.xhr&&this.xhr.abort()},_appendTo:function(){var t=this.options.appendTo;return t&&(t=t.jquery||t.nodeType?e(t):this.document.find(t).eq(0)),t&&t[0]||(t=this.element.closest(".ui-front")),t.length||(t=this.document[0].body),t},_initSource:function(){var t,i,n=this;e.isArray(this.options.source)?(t=this.options.source,this.source=function(i,n){n(e.ui.autocomplete.filter(t,i.term))}):"string"==typeof this.options.source?(i=this.options.source,this.source=function(t,s){n.xhr&&n.xhr.abort(),n.xhr=e.ajax({url:i,data:t,dataType:"json",success:function(e){s(e)},error:function(){s([])}})}):this.source=this.options.source},_searchTimeout:function(e){clearTimeout(this.searching),this.searching=this._delay(function(){var t=this.term===this._value(),i=this.menu.element.is(":visible"),n=e.altKey||e.ctrlKey||e.metaKey||e.shiftKey;t&&(!t||i||n)||(this.selectedItem=null,this.search(null,e))},this.options.delay)},search:function(e,t){return e=null!=e?e:this._value(),this.term=this._value(),e.length<this.options.minLength?this.close(t):!1!==this._trigger("search",t)?this._search(e):void 0},_search:function(e){this.pending++,this.element.addClass("ui-autocomplete-loading"),this.cancelSearch=!1,this.source({term:e},this._response())},_response:function(){var t=++this.requestIndex;return e.proxy(function(e){t===this.requestIndex&&this.__response(e),--this.pending||this.element.removeClass("ui-autocomplete-loading")},this)},__response:function(e){e&&(e=this._normalize(e)),this._trigger("response",null,{content:e}),!this.options.disabled&&e&&e.length&&!this.cancelSearch?(this._suggest(e),this._trigger("open")):this._close()},close:function(e){this.cancelSearch=!0,this._close(e)},_close:function(e){this.menu.element.is(":visible")&&(this.menu.element.hide(),this.menu.blur(),this.isNewMenu=!0,this._trigger("close",e))},_change:function(e){this.previous!==this._value()&&this._trigger("change",e,{item:this.selectedItem})},_normalize:function(t){return t.length&&t[0].label&&t[0].value?t:e.map(t,function(t){return"string"==typeof t?{label:t,value:t}:e.extend({},t,{label:t.label||t.value,value:t.value||t.label})})},_suggest:function(t){var i=this.menu.element.empty();this._renderMenu(i,t),this.isNewMenu=!0,this.menu.refresh(),i.show(),this._resizeMenu(),i.position(e.extend({of:this.element},this.options.position)),this.options.autoFocus&&this.menu.next()},_resizeMenu:function(){var e=this.menu.element;e.outerWidth(Math.max(e.width("").outerWidth()+1,this.element.outerWidth()))},_renderMenu:function(t,i){var n=this;e.each(i,function(e,i){n._renderItemData(t,i)})},_renderItemData:function(e,t){return this._renderItem(e,t).data("ui-autocomplete-item",t)},_renderItem:function(t,i){return e("<li>").text(i.label).appendTo(t)},_move:function(e,t){return this.menu.element.is(":visible")?this.menu.isFirstItem()&&/^previous/.test(e)||this.menu.isLastItem()&&/^next/.test(e)?(this.isMultiLine||this._value(this.term),void this.menu.blur()):void this.menu[e](t):void this.search(null,t)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(e,t){this.isMultiLine&&!this.menu.element.is(":visible")||(this._move(e,t),t.preventDefault())}}),e.extend(e.ui.autocomplete,{escapeRegex:function(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(t,i){var n=new RegExp(e.ui.autocomplete.escapeRegex(i),"i");return e.grep(t,function(e){return n.test(e.label||e.value||e)})}}),e.widget("ui.autocomplete",e.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(e){return e+(e>1?" results are":" result is")+" available, use up and down arrow keys to navigate."}}},__response:function(t){var i;this._superApply(arguments),this.options.disabled||this.cancelSearch||(i=t&&t.length?this.options.messages.results(t.length):this.options.messages.noResults,this.liveRegion.children().hide(),e("<div>").text(i).appendTo(this.liveRegion))}});var d,p=(e.ui.autocomplete,"nemo-ui-button nemo-ui-button_main"),f="ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only",_=function(){var t=e(this);setTimeout(function(){t.find(":ui-button").button("refresh")},1)},m=function(t){var i=t.name,n=t.form,s=e([]);return i&&(i=i.replace(/'/g,"\\'"),s=n?e(n).find("[name='"+i+"'][type=radio]"):e("[name='"+i+"'][type=radio]",t.ownerDocument).filter(function(){return!this.form})),s};e.widget("ui.button",{version:"1.11.4",defaultElement:"<button>",options:{disabled:null,text:!0,label:null,icons:{primary:null,secondary:null}},_create:function(){this.element.closest("form").unbind("reset"+this.eventNamespace).bind("reset"+this.eventNamespace,_),"boolean"!=typeof this.options.disabled?this.options.disabled=!!this.element.prop("disabled"):this.element.prop("disabled",this.options.disabled),this._determineButtonType(),this.hasTitle=!!this.buttonElement.attr("title");var t=this,i=this.options,n="checkbox"===this.type||"radio"===this.type,s=n?"":"ui-state-active";null===i.label&&(i.label="input"===this.type?this.buttonElement.val():this.buttonElement.html()),this._hoverable(this.buttonElement),this.buttonElement.addClass(p).attr("role","button").bind("mouseenter"+this.eventNamespace,function(){i.disabled||this===d&&e(this).addClass("ui-state-active")}).bind("mouseleave"+this.eventNamespace,function(){i.disabled||e(this).removeClass(s)}).bind("click"+this.eventNamespace,function(e){i.disabled&&(e.preventDefault(),e.stopImmediatePropagation())}),this._on({focus:function(){this.buttonElement.addClass("ui-state-focus")},blur:function(){this.buttonElement.removeClass("ui-state-focus")}}),n&&this.element.bind("change"+this.eventNamespace,function(){t.refresh()}),"checkbox"===this.type?this.buttonElement.bind("click"+this.eventNamespace,function(){if(i.disabled)return!1}):"radio"===this.type?this.buttonElement.bind("click"+this.eventNamespace,function(){if(i.disabled)return!1;e(this).addClass("ui-state-active"),t.buttonElement.attr("aria-pressed","true");var n=t.element[0];m(n).not(n).map(function(){return e(this).button("widget")[0]}).removeClass("ui-state-active").attr("aria-pressed","false")}):(this.buttonElement.bind("mousedown"+this.eventNamespace,function(){if(i.disabled)return!1;e(this).addClass("ui-state-active"),d=this,t.document.one("mouseup",function(){d=null})}).bind("mouseup"+this.eventNamespace,function(){if(i.disabled)return!1;e(this).removeClass("ui-state-active")}).bind("keydown"+this.eventNamespace,function(t){if(i.disabled)return!1;t.keyCode!==e.ui.keyCode.SPACE&&t.keyCode!==e.ui.keyCode.ENTER||e(this).addClass("ui-state-active")}).bind("keyup"+this.eventNamespace+" blur"+this.eventNamespace,function(){e(this).removeClass("ui-state-active")}),this.buttonElement.is("a")&&this.buttonElement.keyup(function(t){t.keyCode===e.ui.keyCode.SPACE&&e(this).click()})),this._setOption("disabled",i.disabled),this._resetButton()},_determineButtonType:function(){var e,t,i;this.element.is("[type=checkbox]")?this.type="checkbox":this.element.is("[type=radio]")?this.type="radio":this.element.is("input")?this.type="input":this.type="button","checkbox"===this.type||"radio"===this.type?(e=this.element.parents().last(),t="label[for='"+this.element.attr("id")+"']",this.buttonElement=e.find(t),this.buttonElement.length||(e=e.length?e.siblings():this.element.siblings(),this.buttonElement=e.filter(t),this.buttonElement.length||(this.buttonElement=e.find(t))),this.element.addClass("ui-helper-hidden-accessible"),i=this.element.is(":checked"),i&&this.buttonElement.addClass("ui-state-active"),this.buttonElement.prop("aria-pressed",i)):this.buttonElement=this.element},widget:function(){return this.buttonElement},_destroy:function(){this.element.removeClass("ui-helper-hidden-accessible"),this.buttonElement.removeClass(p+" ui-state-active "+f).removeAttr("role").removeAttr("aria-pressed").html(this.buttonElement.find(".ui-button-text").html()),this.hasTitle||this.buttonElement.removeAttr("title")},_setOption:function(e,t){if(this._super(e,t),"disabled"===e)return this.widget().toggleClass("ui-state-disabled",!!t),this.element.prop("disabled",!!t),void(t&&("checkbox"===this.type||"radio"===this.type?this.buttonElement.removeClass("ui-state-focus"):this.buttonElement.removeClass("ui-state-focus ui-state-active")));this._resetButton()},refresh:function(){var t=this.element.is("input, button")?this.element.is(":disabled"):this.element.hasClass("ui-button-disabled");t!==this.options.disabled&&this._setOption("disabled",t),"radio"===this.type?m(this.element[0]).each(function(){e(this).is(":checked")?e(this).button("widget").addClass("ui-state-active").attr("aria-pressed","true"):e(this).button("widget").removeClass("ui-state-active").attr("aria-pressed","false")}):"checkbox"===this.type&&(this.element.is(":checked")?this.buttonElement.addClass("ui-state-active").attr("aria-pressed","true"):this.buttonElement.removeClass("ui-state-active").attr("aria-pressed","false"))},_resetButton:function(){if("input"===this.type)return void(this.options.label&&this.element.val(this.options.label));var t=this.buttonElement.removeClass(f),i=e("<span></span>",this.document[0]).addClass("ui-button-text").html(this.options.label).appendTo(t.empty()).text(),n=this.options.icons,s=n.primary&&n.secondary,o=[];n.primary||n.secondary?(this.options.text&&o.push("ui-button-text-icon"+(s?"s":n.primary?"-primary":"-secondary")),n.primary&&t.prepend("<span class='ui-button-icon-primary ui-icon "+n.primary+"'></span>"),n.secondary&&t.append("<span class='ui-button-icon-secondary ui-icon "+n.secondary+"'></span>"),this.options.text||(o.push(s?"ui-button-icons-only":"ui-button-icon-only"),this.hasTitle||t.attr("title",e.trim(i)))):o.push("ui-button-text-only"),t.addClass(o.join(" "))}}),e.widget("ui.buttonset",{version:"1.11.4",options:{items:"button, input[type=button], input[type=submit], input[type=reset], input[type=checkbox], input[type=radio], a, :data(ui-button)"},_create:function(){this.element.addClass("ui-buttonset")},_init:function(){this.refresh()},_setOption:function(e,t){"disabled"===e&&this.buttons.button("option",e,t),this._super(e,t)},refresh:function(){var t="rtl"===this.element.css("direction"),i=this.element.find(this.options.items),n=i.filter(":ui-button");i.not(":ui-button").button(),n.button("refresh"),this.buttons=i.map(function(){return e(this).button("widget")[0]}).removeClass("ui-corner-all ui-corner-left ui-corner-right").filter(":first").addClass(t?"ui-corner-right":"ui-corner-left").end().filter(":last").addClass(t?"ui-corner-left":"ui-corner-right").end().end()},_destroy:function(){this.element.removeClass("ui-buttonset"),this.buttons.map(function(){return e(this).button("widget")[0]}).removeClass("ui-corner-left ui-corner-right").end().button("destroy")}});e.ui.button;e.extend(e.ui,{datepicker:{version:"1.11.4"}});var g;e.extend(s.prototype,{markerClassName:"hasDatepicker",maxRows:4,_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(e){return a(this._defaults,e||{}),this},_attachDatepicker:function(t,i){var n,s,o;n=t.nodeName.toLowerCase(),s="div"===n||"span"===n,t.id||(this.uuid+=1,t.id="dp"+this.uuid),o=this._newInst(e(t),s),o.settings=e.extend({},i||{}),"input"===n?this._connectDatepicker(t,o):s&&this._inlineDatepicker(t,o)},_newInst:function(t,i){return{id:t[0].id.replace(/([^A-Za-z0-9_\-])/g,"\\\\$1"),input:t,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:i,dpDiv:i?o(e("<div class='"+this._inlineClass+" ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>")):this.dpDiv}},_connectDatepicker:function(t,i){var n=e(t);i.append=e([]),i.trigger=e([]),n.hasClass(this.markerClassName)||(this._attachments(n,i),n.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp),this._autoSize(i),e.data(t,"datepicker",i),i.settings.disabled&&this._disableDatepicker(t))},_attachments:function(t,i){var n,s,o,r=this._get(i,"appendText"),a=this._get(i,"isRTL");i.append&&i.append.remove(),r&&(i.append=e("<span class='"+this._appendClass+"'>"+r+"</span>"),t[a?"before":"after"](i.append)),t.unbind("focus",this._showDatepicker),i.trigger&&i.trigger.remove(),n=this._get(i,"showOn"),"focus"!==n&&"both"!==n||t.focus(this._showDatepicker),"button"!==n&&"both"!==n||(s=this._get(i,"buttonText"),o=this._get(i,"buttonImage"),i.trigger=e(this._get(i,"buttonImageOnly")?e("<img/>").addClass(this._triggerClass).attr({src:o,alt:s,title:s}):e("<button type='button'></button>").addClass(this._triggerClass).html(o?e("<img/>").attr({src:o,alt:s,title:s}):s)),t[a?"before":"after"](i.trigger),i.trigger.click(function(){return e.datepicker._datepickerShowing&&e.datepicker._lastInput===t[0]?e.datepicker._hideDatepicker():e.datepicker._datepickerShowing&&e.datepicker._lastInput!==t[0]?(e.datepicker._hideDatepicker(),e.datepicker._showDatepicker(t[0])):e.datepicker._showDatepicker(t[0]),!1}))},_autoSize:function(e){if(this._get(e,"autoSize")&&!e.inline){var t,i,n,s,o=new Date(2009,11,20),r=this._get(e,"dateFormat");r.match(/[DM]/)&&(t=function(e){for(i=0,n=0,s=0;s<e.length;s++)e[s].length>i&&(i=e[s].length,n=s);return n},o.setMonth(t(this._get(e,r.match(/MM/)?"monthNames":"monthNamesShort"))),o.setDate(t(this._get(e,r.match(/DD/)?"dayNames":"dayNamesShort"))+20-o.getDay())),e.input.attr("size",this._formatDate(e,o).length)}},_inlineDatepicker:function(t,i){var n=e(t);n.hasClass(this.markerClassName)||(n.addClass(this.markerClassName).append(i.dpDiv),e.data(t,"datepicker",i),this._setDate(i,this._getDefaultDate(i),!0),this._updateDatepicker(i),this._updateAlternate(i),i.settings.disabled&&this._disableDatepicker(t),i.dpDiv.css("display","block"))},_dialogDatepicker:function(t,i,n,s,o){var r,l,c,u,h,d=this._dialogInst;return d||(this.uuid+=1,r="dp"+this.uuid,this._dialogInput=e("<input type='text' id='"+r+"' style='position: absolute; top: -100px; width: 0px;'/>"),this._dialogInput.keydown(this._doKeyDown),e("body").append(this._dialogInput),d=this._dialogInst=this._newInst(this._dialogInput,!1),d.settings={},e.data(this._dialogInput[0],"datepicker",d)),a(d.settings,s||{}),i=i&&i.constructor===Date?this._formatDate(d,i):i,this._dialogInput.val(i),this._pos=o?o.length?o:[o.pageX,o.pageY]:null,this._pos||(l=document.documentElement.clientWidth,c=document.documentElement.clientHeight,u=document.documentElement.scrollLeft||document.body.scrollLeft,h=document.documentElement.scrollTop||document.body.scrollTop,this._pos=[l/2-100+u,c/2-150+h]),this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),d.settings.onSelect=n,this._inDialog=!0,this.dpDiv.addClass(this._dialogClass),this._showDatepicker(this._dialogInput[0]),e.blockUI&&e.blockUI(this.dpDiv),e.data(this._dialogInput[0],"datepicker",d),this},_destroyDatepicker:function(t){var i,n=e(t),s=e.data(t,"datepicker");n.hasClass(this.markerClassName)&&(i=t.nodeName.toLowerCase(),e.removeData(t,"datepicker"),"input"===i?(s.append.remove(),s.trigger.remove(),n.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup",this._doKeyUp)):"div"!==i&&"span"!==i||n.removeClass(this.markerClassName).empty(),g===s&&(g=null))},_enableDatepicker:function(t){var i,n,s=e(t),o=e.data(t,"datepicker");s.hasClass(this.markerClassName)&&(i=t.nodeName.toLowerCase(),"input"===i?(t.disabled=!1,o.trigger.filter("button").each(function(){this.disabled=!1}).end().filter("img").css({opacity:"1.0",cursor:""})):"div"!==i&&"span"!==i||(n=s.children("."+this._inlineClass),n.children().removeClass("ui-state-disabled"),n.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!1)),this._disabledInputs=e.map(this._disabledInputs,function(e){return e===t?null:e}))},_disableDatepicker:function(t){var i,n,s=e(t),o=e.data(t,"datepicker");s.hasClass(this.markerClassName)&&(i=t.nodeName.toLowerCase(),"input"===i?(t.disabled=!0,o.trigger.filter("button").each(function(){this.disabled=!0}).end().filter("img").css({opacity:"0.5",cursor:"default"})):"div"!==i&&"span"!==i||(n=s.children("."+this._inlineClass),n.children().addClass("ui-state-disabled"),n.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!0)),this._disabledInputs=e.map(this._disabledInputs,function(e){return e===t?null:e}),this._disabledInputs[this._disabledInputs.length]=t)},_isDisabledDatepicker:function(e){if(!e)return!1;for(var t=0;t<this._disabledInputs.length;t++)if(this._disabledInputs[t]===e)return!0;return!1},_getInst:function(t){try{return e.data(t,"datepicker")}catch(e){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(t,i,n){var s,o,r,l,c=this._getInst(t);if(2===arguments.length&&"string"==typeof i)return"defaults"===i?e.extend({},e.datepicker._defaults):c?"all"===i?e.extend({},c.settings):this._get(c,i):null;s=i||{},"string"==typeof i&&(s={},s[i]=n),c&&(this._curInst===c&&this._hideDatepicker(),o=this._getDateDatepicker(t,!0),r=this._getMinMaxDate(c,"min"),l=this._getMinMaxDate(c,"max"),a(c.settings,s),null!==r&&void 0!==s.dateFormat&&void 0===s.minDate&&(c.settings.minDate=this._formatDate(c,r)),null!==l&&void 0!==s.dateFormat&&void 0===s.maxDate&&(c.settings.maxDate=this._formatDate(c,l)),"disabled"in s&&(s.disabled?this._disableDatepicker(t):this._enableDatepicker(t)),this._attachments(e(t),c),this._autoSize(c),this._setDate(c,o),this._updateAlternate(c),this._updateDatepicker(c))},_changeDatepicker:function(e,t,i){this._optionDatepicker(e,t,i)},_refreshDatepicker:function(e){var t=this._getInst(e);t&&this._updateDatepicker(t)},_setDateDatepicker:function(e,t){var i=this._getInst(e);i&&(this._setDate(i,t),this._updateDatepicker(i),this._updateAlternate(i))},_getDateDatepicker:function(e,t){var i=this._getInst(e);return i&&!i.inline&&this._setDateFromField(i,t),i?this._getDate(i):null},_doKeyDown:function(t){var i,n,s,o=e.datepicker._getInst(t.target),r=!0,a=o.dpDiv.is(".ui-datepicker-rtl");if(o._keyEvent=!0,e.datepicker._datepickerShowing)switch(t.keyCode){case 9:e.datepicker._hideDatepicker(),r=!1;break;case 13:return s=e("td."+e.datepicker._dayOverClass+":not(."+e.datepicker._currentClass+")",o.dpDiv),s[0]&&e.datepicker._selectDay(t.target,o.selectedMonth,o.selectedYear,s[0]),i=e.datepicker._get(o,"onSelect"),i?(n=e.datepicker._formatDate(o),i.apply(o.input?o.input[0]:null,[n,o])):e.datepicker._hideDatepicker(),!1;case 27:e.datepicker._hideDatepicker();break;case 33:e.datepicker._adjustDate(t.target,t.ctrlKey?-e.datepicker._get(o,"stepBigMonths"):-e.datepicker._get(o,"stepMonths"),"M");break;case 34:e.datepicker._adjustDate(t.target,t.ctrlKey?+e.datepicker._get(o,"stepBigMonths"):+e.datepicker._get(o,"stepMonths"),"M");break;case 35:(t.ctrlKey||t.metaKey)&&e.datepicker._clearDate(t.target),r=t.ctrlKey||t.metaKey;break;case 36:(t.ctrlKey||t.metaKey)&&e.datepicker._gotoToday(t.target),r=t.ctrlKey||t.metaKey;break;case 37:(t.ctrlKey||t.metaKey)&&e.datepicker._adjustDate(t.target,a?1:-1,"D"),r=t.ctrlKey||t.metaKey,t.originalEvent.altKey&&e.datepicker._adjustDate(t.target,t.ctrlKey?-e.datepicker._get(o,"stepBigMonths"):-e.datepicker._get(o,"stepMonths"),"M");break;case 38:(t.ctrlKey||t.metaKey)&&e.datepicker._adjustDate(t.target,-7,"D"),r=t.ctrlKey||t.metaKey;break;case 39:(t.ctrlKey||t.metaKey)&&e.datepicker._adjustDate(t.target,a?-1:1,"D"),r=t.ctrlKey||t.metaKey,t.originalEvent.altKey&&e.datepicker._adjustDate(t.target,t.ctrlKey?+e.datepicker._get(o,"stepBigMonths"):+e.datepicker._get(o,"stepMonths"),"M");break;case 40:(t.ctrlKey||t.metaKey)&&e.datepicker._adjustDate(t.target,7,"D"),r=t.ctrlKey||t.metaKey;break;default:r=!1}else 36===t.keyCode&&t.ctrlKey?e.datepicker._showDatepicker(this):r=!1;r&&(t.preventDefault(),t.stopPropagation())},_doKeyPress:function(t){var i,n,s=e.datepicker._getInst(t.target);if(e.datepicker._get(s,"constrainInput"))return i=e.datepicker._possibleChars(e.datepicker._get(s,"dateFormat")),n=String.fromCharCode(null==t.charCode?t.keyCode:t.charCode),t.ctrlKey||t.metaKey||n<" "||!i||i.indexOf(n)>-1},_doKeyUp:function(t){var i,n=e.datepicker._getInst(t.target);if(n.input.val()!==n.lastVal)try{i=e.datepicker.parseDate(e.datepicker._get(n,"dateFormat"),n.input?n.input.val():null,e.datepicker._getFormatConfig(n)),i&&(e.datepicker._setDateFromField(n),e.datepicker._updateAlternate(n),e.datepicker._updateDatepicker(n))}catch(e){}return!0},_showDatepicker:function(t){if(t=t.target||t,"input"!==t.nodeName.toLowerCase()&&(t=e("input",t.parentNode)[0]),!e.datepicker._isDisabledDatepicker(t)&&e.datepicker._lastInput!==t){var i,s,o,r,l,c,u;i=e.datepicker._getInst(t),e.datepicker._curInst&&e.datepicker._curInst!==i&&(e.datepicker._curInst.dpDiv.stop(!0,!0),i&&e.datepicker._datepickerShowing&&e.datepicker._hideDatepicker(e.datepicker._curInst.input[0])),s=e.datepicker._get(i,"beforeShow"),o=s?s.apply(t,[t,i]):{},!1!==o&&(a(i.settings,o),i.lastVal=null,e.datepicker._lastInput=t,e.datepicker._setDateFromField(i),e.datepicker._inDialog&&(t.value=""),e.datepicker._pos||(e.datepicker._pos=e.datepicker._findPos(t),e.datepicker._pos[1]+=t.offsetHeight),r=!1,e(t).parents().each(function(){return!(r|="fixed"===e(this).css("position"))}),l={left:e.datepicker._pos[0],top:e.datepicker._pos[1]},e.datepicker._pos=null,i.dpDiv.empty(),i.dpDiv.css({position:"absolute",display:"block",top:"-1000px"}),e.datepicker._updateDatepicker(i),l=e.datepicker._checkOffset(i,l,r),i.dpDiv.css({position:e.datepicker._inDialog&&e.blockUI?"static":r?"fixed":"absolute",display:"none",left:l.left+"px",top:l.top+"px"}),i.inline||(c=e.datepicker._get(i,"showAnim"),u=e.datepicker._get(i,"duration"),i.dpDiv.css("z-index",n(e(t))+1),e.datepicker._datepickerShowing=!0,e.effects&&e.effects.effect[c]?i.dpDiv.show(c,e.datepicker._get(i,"showOptions"),u):i.dpDiv[c||"show"](c?u:null),e.datepicker._shouldFocusInput(i)&&i.input.focus(),e.datepicker._curInst=i))}},_updateDatepicker:function(t){this.maxRows=4,g=t,t.dpDiv.empty().append(this._generateHTML(t)),this._attachHandlers(t);var i,n=this._getNumberOfMonths(t),s=n[1],o=t.dpDiv.find("."+this._dayOverClass+" a");o.length>0&&r.apply(o.get(0)),t.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""),s>1&&t.dpDiv.addClass("ui-datepicker-multi-"+s).css("width",17*s+"em"),t.dpDiv[(1!==n[0]||1!==n[1]?"add":"remove")+"Class"]("ui-datepicker-multi"),t.dpDiv[(this._get(t,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl"),t===e.datepicker._curInst&&e.datepicker._datepickerShowing&&e.datepicker._shouldFocusInput(t)&&t.input.focus(),t.yearshtml&&(i=t.yearshtml,setTimeout(function(){i===t.yearshtml&&t.yearshtml&&t.dpDiv.find("select.ui-datepicker-year:first").replaceWith(t.yearshtml),i=t.yearshtml=null},0))},_shouldFocusInput:function(e){return e.input&&e.input.is(":visible")&&!e.input.is(":disabled")&&!e.input.is(":focus")},_checkOffset:function(t,i,n){var s=t.dpDiv.outerWidth(),o=t.dpDiv.outerHeight(),r=t.input?t.input.outerWidth():0,a=t.input?t.input.outerHeight():0,l=document.documentElement.clientWidth+(n?0:e(document).scrollLeft()),c=document.documentElement.clientHeight+(n?0:e(document).scrollTop());return i.left-=this._get(t,"isRTL")?s-r:0,i.left-=n&&i.left===t.input.offset().left?e(document).scrollLeft():0,i.top-=n&&i.top===t.input.offset().top+a?e(document).scrollTop():0,i.left-=Math.min(i.left,i.left+s>l&&l>s?Math.abs(i.left+s-l):0),i.top-=Math.min(i.top,i.top+o>c&&c>o?Math.abs(o+a):0),i},_findPos:function(t){for(var i,n=this._getInst(t),s=this._get(n,"isRTL");t&&("hidden"===t.type||1!==t.nodeType||e.expr.filters.hidden(t));)t=t[s?"previousSibling":"nextSibling"];return i=e(t).offset(),[i.left,i.top]},_hideDatepicker:function(t){var i,n,s,o,r=this._curInst;!r||t&&r!==e.data(t,"datepicker")||this._datepickerShowing&&(i=this._get(r,"showAnim"),n=this._get(r,"duration"),s=function(){e.datepicker._tidyDialog(r)},e.effects&&(e.effects.effect[i]||e.effects[i])?r.dpDiv.hide(i,e.datepicker._get(r,"showOptions"),n,s):r.dpDiv["slideDown"===i?"slideUp":"fadeIn"===i?"fadeOut":"hide"](i?n:null,s),i||s(),this._datepickerShowing=!1,o=this._get(r,"onClose"),o&&o.apply(r.input?r.input[0]:null,[r.input?r.input.val():"",r]),this._lastInput=null,this._inDialog&&(this._dialogInput.css({position:"absolute",left:"0",top:"-100px"}),e.blockUI&&(e.unblockUI(),e("body").append(this.dpDiv))),this._inDialog=!1)},_tidyDialog:function(e){e.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},_checkExternalClick:function(t){if(e.datepicker._curInst){var i=e(t.target),n=e.datepicker._getInst(i[0]);(i[0].id===e.datepicker._mainDivId||0!==i.parents("#"+e.datepicker._mainDivId).length||i.hasClass(e.datepicker.markerClassName)||i.closest("."+e.datepicker._triggerClass).length||!e.datepicker._datepickerShowing||e.datepicker._inDialog&&e.blockUI)&&(!i.hasClass(e.datepicker.markerClassName)||e.datepicker._curInst===n)||e.datepicker._hideDatepicker()}},_adjustDate:function(t,i,n){var s=e(t),o=this._getInst(s[0]);this._isDisabledDatepicker(s[0])||(this._adjustInstDate(o,i+("M"===n?this._get(o,"showCurrentAtPos"):0),n),this._updateDatepicker(o))},_gotoToday:function(t){var i,n=e(t),s=this._getInst(n[0]);this._get(s,"gotoCurrent")&&s.currentDay?(s.selectedDay=s.currentDay,s.drawMonth=s.selectedMonth=s.currentMonth,s.drawYear=s.selectedYear=s.currentYear):(i=new Date,s.selectedDay=i.getDate(),s.drawMonth=s.selectedMonth=i.getMonth(),s.drawYear=s.selectedYear=i.getFullYear()),this._notifyChange(s),this._adjustDate(n)},_selectMonthYear:function(t,i,n){var s=e(t),o=this._getInst(s[0]);o["selected"+("M"===n?"Month":"Year")]=o["draw"+("M"===n?"Month":"Year")]=parseInt(i.options[i.selectedIndex].value,10),this._notifyChange(o),this._adjustDate(s)},_selectDay:function(t,i,n,s){var o,r=e(t);e(s).hasClass(this._unselectableClass)||this._isDisabledDatepicker(r[0])||(o=this._getInst(r[0]),o.selectedDay=o.currentDay=e("a",s).html(),o.selectedMonth=o.currentMonth=i,o.selectedYear=o.currentYear=n,this._selectDate(t,this._formatDate(o,o.currentDay,o.currentMonth,o.currentYear)))},_clearDate:function(t){var i=e(t);this._selectDate(i,"")},_selectDate:function(t,i){var n,s=e(t),o=this._getInst(s[0]);i=null!=i?i:this._formatDate(o),o.input&&o.input.val(i),this._updateAlternate(o),n=this._get(o,"onSelect"),n?n.apply(o.input?o.input[0]:null,[i,o]):o.input&&o.input.trigger("change"),o.inline?this._updateDatepicker(o):(this._hideDatepicker(),this._lastInput=o.input[0],"object"!=typeof o.input[0]&&o.input.focus(),this._lastInput=null)},_updateAlternate:function(t){var i,n,s,o=this._get(t,"altField");o&&(i=this._get(t,"altFormat")||this._get(t,"dateFormat"),n=this._getDate(t),s=this.formatDate(i,n,this._getFormatConfig(t)),e(o).each(function(){e(this).val(s)}))},noWeekends:function(e){var t=e.getDay();return[t>0&&t<6,""]},iso8601Week:function(e){var t,i=new Date(e.getTime());return i.setDate(i.getDate()+4-(i.getDay()||7)),t=i.getTime(),i.setMonth(0),i.setDate(1),Math.floor(Math.round((t-i)/864e5)/7)+1},parseDate:function(t,i,n){if(null==t||null==i)throw"Invalid arguments";if(""===(i="object"==typeof i?i.toString():i+""))return null;var s,o,r,a,l=0,c=(n?n.shortYearCutoff:null)||this._defaults.shortYearCutoff,u="string"!=typeof c?c:(new Date).getFullYear()%100+parseInt(c,10),h=(n?n.dayNamesShort:null)||this._defaults.dayNamesShort,d=(n?n.dayNames:null)||this._defaults.dayNames,p=(n?n.monthNamesShort:null)||this._defaults.monthNamesShort,f=(n?n.monthNames:null)||this._defaults.monthNames,_=-1,m=-1,g=-1,v=-1,b=!1,y=function(e){var i=s+1<t.length&&t.charAt(s+1)===e;return i&&s++,i},T=function(e){var t=y(e),n="@"===e?14:"!"===e?20:"y"===e&&t?4:"o"===e?3:2,s="y"===e?n:1,o=new RegExp("^\\d{"+s+","+n+"}"),r=i.substring(l).match(o);if(!r)throw"Missing number at position "+l;return l+=r[0].length,parseInt(r[0],10)},w=function(t,n,s){var o=-1,r=e.map(y(t)?s:n,function(e,t){return[[t,e]]}).sort(function(e,t){return-(e[1].length-t[1].length)});if(e.each(r,function(e,t){var n=t[1];if(i.substr(l,n.length).toLowerCase()===n.toLowerCase())return o=t[0],l+=n.length,!1}),-1!==o)return o+1;throw"Unknown name at position "+l},x=function(){if(i.charAt(l)!==t.charAt(s))throw"Unexpected literal at position "+l;l++};for(s=0;s<t.length;s++)if(b)"'"!==t.charAt(s)||y("'")?x():b=!1;else switch(t.charAt(s)){case"d":g=T("d");break;case"D":w("D",h,d);break;case"o":v=T("o");break;case"m":m=T("m");break;case"M":m=w("M",p,f);break;case"y":_=T("y");break;case"@":a=new Date(T("@")),_=a.getFullYear(),m=a.getMonth()+1,g=a.getDate();break;case"!":a=new Date((T("!")-this._ticksTo1970)/1e4),_=a.getFullYear(),m=a.getMonth()+1,g=a.getDate();break;case"'":y("'")?x():b=!0;break;default:x()}if(l<i.length&&(r=i.substr(l),!/^\s+/.test(r)))throw"Extra/unparsed characters found in date: "+r;if(-1===_?_=(new Date).getFullYear():_<100&&(_+=(new Date).getFullYear()-(new Date).getFullYear()%100+(_<=u?0:-100)),v>-1)for(m=1,g=v;;){if(o=this._getDaysInMonth(_,m-1),g<=o)break;m++,g-=o}if(a=this._daylightSavingAdjust(new Date(_,m-1,g)),a.getFullYear()!==_||a.getMonth()+1!==m||a.getDate()!==g)throw"Invalid date";return a},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",
TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:24*(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925))*60*60*1e7,formatDate:function(e,t,i){if(!t)return"";var n,s=(i?i.dayNamesShort:null)||this._defaults.dayNamesShort,o=(i?i.dayNames:null)||this._defaults.dayNames,r=(i?i.monthNamesShort:null)||this._defaults.monthNamesShort,a=(i?i.monthNames:null)||this._defaults.monthNames,l=function(t){var i=n+1<e.length&&e.charAt(n+1)===t;return i&&n++,i},c=function(e,t,i){var n=""+t;if(l(e))for(;n.length<i;)n="0"+n;return n},u=function(e,t,i,n){return l(e)?n[t]:i[t]},h="",d=!1;if(t)for(n=0;n<e.length;n++)if(d)"'"!==e.charAt(n)||l("'")?h+=e.charAt(n):d=!1;else switch(e.charAt(n)){case"d":h+=c("d",t.getDate(),2);break;case"D":h+=u("D",t.getDay(),s,o);break;case"o":h+=c("o",Math.round((new Date(t.getFullYear(),t.getMonth(),t.getDate()).getTime()-new Date(t.getFullYear(),0,0).getTime())/864e5),3);break;case"m":h+=c("m",t.getMonth()+1,2);break;case"M":h+=u("M",t.getMonth(),r,a);break;case"y":h+=l("y")?t.getFullYear():(t.getYear()%100<10?"0":"")+t.getYear()%100;break;case"@":h+=t.getTime();break;case"!":h+=1e4*t.getTime()+this._ticksTo1970;break;case"'":l("'")?h+="'":d=!0;break;default:h+=e.charAt(n)}return h},_possibleChars:function(e){var t,i="",n=!1,s=function(i){var n=t+1<e.length&&e.charAt(t+1)===i;return n&&t++,n};for(t=0;t<e.length;t++)if(n)"'"!==e.charAt(t)||s("'")?i+=e.charAt(t):n=!1;else switch(e.charAt(t)){case"d":case"m":case"y":case"@":i+="0123456789";break;case"D":case"M":return null;case"'":s("'")?i+="'":n=!0;break;default:i+=e.charAt(t)}return i},_get:function(e,t){return void 0!==e.settings[t]?e.settings[t]:this._defaults[t]},_setDateFromField:function(e,t){if(e.input.val()!==e.lastVal){var i=this._get(e,"dateFormat"),n=e.lastVal=e.input?e.input.val():null,s=this._getDefaultDate(e),o=s,r=this._getFormatConfig(e);try{o=this.parseDate(i,n,r)||s}catch(e){n=t?"":n}e.selectedDay=o.getDate(),e.drawMonth=e.selectedMonth=o.getMonth(),e.drawYear=e.selectedYear=o.getFullYear(),e.currentDay=n?o.getDate():0,e.currentMonth=n?o.getMonth():0,e.currentYear=n?o.getFullYear():0,this._adjustInstDate(e)}},_getDefaultDate:function(e){return this._restrictMinMax(e,this._determineDate(e,this._get(e,"defaultDate"),new Date))},_determineDate:function(t,i,n){var s=null==i||""===i?n:"string"==typeof i?function(i){try{return e.datepicker.parseDate(e.datepicker._get(t,"dateFormat"),i,e.datepicker._getFormatConfig(t))}catch(e){}for(var n=(i.toLowerCase().match(/^c/)?e.datepicker._getDate(t):null)||new Date,s=n.getFullYear(),o=n.getMonth(),r=n.getDate(),a=/([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,l=a.exec(i);l;){switch(l[2]||"d"){case"d":case"D":r+=parseInt(l[1],10);break;case"w":case"W":r+=7*parseInt(l[1],10);break;case"m":case"M":o+=parseInt(l[1],10),r=Math.min(r,e.datepicker._getDaysInMonth(s,o));break;case"y":case"Y":s+=parseInt(l[1],10),r=Math.min(r,e.datepicker._getDaysInMonth(s,o))}l=a.exec(i)}return new Date(s,o,r)}(i):"number"==typeof i?isNaN(i)?n:function(e){var t=new Date;return t.setDate(t.getDate()+e),t}(i):new Date(i.getTime());return s=s&&"Invalid Date"===s.toString()?n:s,s&&(s.setHours(0),s.setMinutes(0),s.setSeconds(0),s.setMilliseconds(0)),this._daylightSavingAdjust(s)},_daylightSavingAdjust:function(e){return e?(e.setHours(e.getHours()>12?e.getHours()+2:0),e):null},_setDate:function(e,t,i){var n=!t,s=e.selectedMonth,o=e.selectedYear,r=this._restrictMinMax(e,this._determineDate(e,t,new Date));e.selectedDay=e.currentDay=r.getDate(),e.drawMonth=e.selectedMonth=e.currentMonth=r.getMonth(),e.drawYear=e.selectedYear=e.currentYear=r.getFullYear(),s===e.selectedMonth&&o===e.selectedYear||i||this._notifyChange(e),this._adjustInstDate(e),e.input&&e.input.val(n?"":this._formatDate(e))},_getDate:function(e){return!e.currentYear||e.input&&""===e.input.val()?null:this._daylightSavingAdjust(new Date(e.currentYear,e.currentMonth,e.currentDay))},_attachHandlers:function(t){var i=this._get(t,"stepMonths"),n="#"+t.id.replace(/\\\\/g,"\\");t.dpDiv.find("[data-handler]").map(function(){var t={prev:function(){e.datepicker._adjustDate(n,-i,"M")},next:function(){e.datepicker._adjustDate(n,+i,"M")},hide:function(){e.datepicker._hideDatepicker()},today:function(){e.datepicker._gotoToday(n)},selectDay:function(){return e.datepicker._selectDay(n,+this.getAttribute("data-month"),+this.getAttribute("data-year"),this),!1},selectMonth:function(){return e.datepicker._selectMonthYear(n,this,"M"),!1},selectYear:function(){return e.datepicker._selectMonthYear(n,this,"Y"),!1}};e(this).bind(this.getAttribute("data-event"),t[this.getAttribute("data-handler")])})},_generateHTML:function(e){var t,i,n,s,o,r,a,l,c,u,h,d,p,f,_,m,g,v,b,y,T,w,x,C,S,k,D,P,A,I,M,F,E,O,$,H,N,R,B,G=new Date,L=this._daylightSavingAdjust(new Date(G.getFullYear(),G.getMonth(),G.getDate())),j=this._get(e,"isRTL"),W=this._get(e,"showButtonPanel"),z=this._get(e,"hideIfNoPrevNext"),U=this._get(e,"navigationAsDateFormat"),V=this._getNumberOfMonths(e),q=this._get(e,"showCurrentAtPos"),Y=this._get(e,"stepMonths"),X=1!==V[0]||1!==V[1],K=this._daylightSavingAdjust(e.currentDay?new Date(e.currentYear,e.currentMonth,e.currentDay):new Date(9999,9,9)),J=this._getMinMaxDate(e,"min"),Q=this._getMinMaxDate(e,"max"),Z=e.drawMonth-q,ee=e.drawYear;if(Z<0&&(Z+=12,ee--),Q)for(t=this._daylightSavingAdjust(new Date(Q.getFullYear(),Q.getMonth()-V[0]*V[1]+1,Q.getDate())),t=J&&t<J?J:t;this._daylightSavingAdjust(new Date(ee,Z,1))>t;)--Z<0&&(Z=11,ee--);for(e.drawMonth=Z,e.drawYear=ee,i=this._get(e,"prevText"),i=U?this.formatDate(i,this._daylightSavingAdjust(new Date(ee,Z-Y,1)),this._getFormatConfig(e)):i,n=this._canAdjustMonth(e,-1,ee,Z)?"<a class='ui-datepicker-prev ui-corner-all' data-handler='prev' data-event='click' title='"+i+"'><span class='ui-icon ui-icon-circle-triangle-"+(j?"e":"w")+"'>"+i+"</span></a>":z?"":"<a class='ui-datepicker-prev ui-corner-all ui-state-disabled' title='"+i+"'><span class='ui-icon ui-icon-circle-triangle-"+(j?"e":"w")+"'>"+i+"</span></a>",s=this._get(e,"nextText"),s=U?this.formatDate(s,this._daylightSavingAdjust(new Date(ee,Z+Y,1)),this._getFormatConfig(e)):s,o=this._canAdjustMonth(e,1,ee,Z)?"<a class='ui-datepicker-next ui-corner-all' data-handler='next' data-event='click' title='"+s+"'><span class='ui-icon ui-icon-circle-triangle-"+(j?"w":"e")+"'>"+s+"</span></a>":z?"":"<a class='ui-datepicker-next ui-corner-all ui-state-disabled' title='"+s+"'><span class='ui-icon ui-icon-circle-triangle-"+(j?"w":"e")+"'>"+s+"</span></a>",r=this._get(e,"currentText"),a=this._get(e,"gotoCurrent")&&e.currentDay?K:L,r=U?this.formatDate(r,a,this._getFormatConfig(e)):r,l=e.inline?"":"<button type='button' class='ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all' data-handler='hide' data-event='click'>"+this._get(e,"closeText")+"</button>",c=W?"<div class='ui-datepicker-buttonpane ui-widget-content'>"+(j?l:"")+(this._isInRange(e,a)?"<button type='button' class='ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all' data-handler='today' data-event='click'>"+r+"</button>":"")+(j?"":l)+"</div>":"",u=parseInt(this._get(e,"firstDay"),10),u=isNaN(u)?0:u,h=this._get(e,"showWeek"),d=this._get(e,"dayNames"),p=this._get(e,"dayNamesMin"),f=this._get(e,"monthNames"),_=this._get(e,"monthNamesShort"),m=this._get(e,"beforeShowDay"),g=this._get(e,"showOtherMonths"),v=this._get(e,"selectOtherMonths"),b=this._getDefaultDate(e),y="",w=0;w<V[0];w++){for(x="",this.maxRows=4,C=0;C<V[1];C++){if(S=this._daylightSavingAdjust(new Date(ee,Z,e.selectedDay)),k=" ui-corner-all",D="",X){if(D+="<div class='ui-datepicker-group",V[1]>1)switch(C){case 0:D+=" ui-datepicker-group-first",k=" ui-corner-"+(j?"right":"left");break;case V[1]-1:D+=" ui-datepicker-group-last",k=" ui-corner-"+(j?"left":"right");break;default:D+=" ui-datepicker-group-middle",k=""}D+="'>"}for(D+="<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix"+k+"'>"+(/all|left/.test(k)&&0===w?j?o:n:"")+(/all|right/.test(k)&&0===w?j?n:o:"")+this._generateMonthYearHeader(e,Z,ee,J,Q,w>0||C>0,f,_)+"</div><table class='ui-datepicker-calendar'><thead><tr>",P=h?"<th class='ui-datepicker-week-col'>"+this._get(e,"weekHeader")+"</th>":"",T=0;T<7;T++)A=(T+u)%7,P+="<th scope='col'"+((T+u+6)%7>=5?" class='ui-datepicker-week-end'":"")+"><span title='"+d[A]+"'>"+p[A]+"</span></th>";for(D+=P+"</tr></thead><tbody>",I=this._getDaysInMonth(ee,Z),ee===e.selectedYear&&Z===e.selectedMonth&&(e.selectedDay=Math.min(e.selectedDay,I)),M=(this._getFirstDayOfMonth(ee,Z)-u+7)%7,F=Math.ceil((M+I)/7),E=X&&this.maxRows>F?this.maxRows:F,this.maxRows=E,O=this._daylightSavingAdjust(new Date(ee,Z,1-M)),$=0;$<E;$++){for(D+="<tr>",H=h?"<td class='ui-datepicker-week-col'>"+this._get(e,"calculateWeek")(O)+"</td>":"",T=0;T<7;T++)N=m?m.apply(e.input?e.input[0]:null,[O]):[!0,""],R=O.getMonth()!==Z,B=R&&!v||!N[0]||J&&O<J||Q&&O>Q,H+="<td class='"+((T+u+6)%7>=5?" ui-datepicker-week-end":"")+(R?" ui-datepicker-other-month":"")+(O.getTime()===S.getTime()&&Z===e.selectedMonth&&e._keyEvent||b.getTime()===O.getTime()&&b.getTime()===S.getTime()?" "+this._dayOverClass:"")+(B?" "+this._unselectableClass+" ui-state-disabled":"")+(R&&!g?"":" "+N[1]+(O.getTime()===K.getTime()?" "+this._currentClass:"")+(O.getTime()===L.getTime()?" ui-datepicker-today":""))+"'"+(R&&!g||!N[2]?"":" title='"+N[2].replace(/'/g,"&#39;")+"'")+(B?"":" data-handler='selectDay' data-event='click' data-month='"+O.getMonth()+"' data-year='"+O.getFullYear()+"'")+">"+(R&&!g?"&#xa0;":B?"<span class='ui-state-default'>"+O.getDate()+"</span>":"<a class='ui-state-default"+(O.getTime()===L.getTime()?" ui-state-highlight":"")+(O.getTime()===K.getTime()?" ui-state-active":"")+(R?" ui-priority-secondary":"")+"' href='#'>"+O.getDate()+"</a>")+"</td>",O.setDate(O.getDate()+1),O=this._daylightSavingAdjust(O);D+=H+"</tr>"}Z++,Z>11&&(Z=0,ee++),D+="</tbody></table>"+(X?"</div>"+(V[0]>0&&C===V[1]-1?"<div class='ui-datepicker-row-break'></div>":""):""),x+=D}y+=x}return y+=c,e._keyEvent=!1,y},_generateMonthYearHeader:function(e,t,i,n,s,o,r,a){var l,c,u,h,d,p,f,_,m=this._get(e,"changeMonth"),g=this._get(e,"changeYear"),v=this._get(e,"showMonthAfterYear"),b="<div class='ui-datepicker-title'>",y="";if(o||!m)y+="<span class='ui-datepicker-month'>"+r[t]+"</span>";else{for(l=n&&n.getFullYear()===i,c=s&&s.getFullYear()===i,y+="<select class='ui-datepicker-month' data-handler='selectMonth' data-event='change'>",u=0;u<12;u++)(!l||u>=n.getMonth())&&(!c||u<=s.getMonth())&&(y+="<option value='"+u+"'"+(u===t?" selected='selected'":"")+">"+a[u]+"</option>");y+="</select>"}if(v||(b+=y+(!o&&m&&g?"":"&#xa0;")),!e.yearshtml)if(e.yearshtml="",o||!g)b+="<span class='ui-datepicker-year'>"+i+"</span>";else{for(h=this._get(e,"yearRange").split(":"),d=(new Date).getFullYear(),p=function(e){var t=e.match(/c[+\-].*/)?i+parseInt(e.substring(1),10):e.match(/[+\-].*/)?d+parseInt(e,10):parseInt(e,10);return isNaN(t)?d:t},f=p(h[0]),_=Math.max(f,p(h[1]||"")),f=n?Math.max(f,n.getFullYear()):f,_=s?Math.min(_,s.getFullYear()):_,e.yearshtml+="<select class='ui-datepicker-year' data-handler='selectYear' data-event='change'>";f<=_;f++)e.yearshtml+="<option value='"+f+"'"+(f===i?" selected='selected'":"")+">"+f+"</option>";e.yearshtml+="</select>",b+=e.yearshtml,e.yearshtml=null}return b+=this._get(e,"yearSuffix"),v&&(b+=(!o&&m&&g?"":"&#xa0;")+y),b+="</div>"},_adjustInstDate:function(e,t,i){var n=e.drawYear+("Y"===i?t:0),s=e.drawMonth+("M"===i?t:0),o=Math.min(e.selectedDay,this._getDaysInMonth(n,s))+("D"===i?t:0),r=this._restrictMinMax(e,this._daylightSavingAdjust(new Date(n,s,o)));e.selectedDay=r.getDate(),e.drawMonth=e.selectedMonth=r.getMonth(),e.drawYear=e.selectedYear=r.getFullYear(),"M"!==i&&"Y"!==i||this._notifyChange(e)},_restrictMinMax:function(e,t){var i=this._getMinMaxDate(e,"min"),n=this._getMinMaxDate(e,"max"),s=i&&t<i?i:t;return n&&s>n?n:s},_notifyChange:function(e){var t=this._get(e,"onChangeMonthYear");t&&t.apply(e.input?e.input[0]:null,[e.selectedYear,e.selectedMonth+1,e])},_getNumberOfMonths:function(e){var t=this._get(e,"numberOfMonths");return null==t?[1,1]:"number"==typeof t?[1,t]:t},_getMinMaxDate:function(e,t){return this._determineDate(e,this._get(e,t+"Date"),null)},_getDaysInMonth:function(e,t){return 32-this._daylightSavingAdjust(new Date(e,t,32)).getDate()},_getFirstDayOfMonth:function(e,t){return new Date(e,t,1).getDay()},_canAdjustMonth:function(e,t,i,n){var s=this._getNumberOfMonths(e),o=this._daylightSavingAdjust(new Date(i,n+(t<0?t:s[0]*s[1]),1));return t<0&&o.setDate(this._getDaysInMonth(o.getFullYear(),o.getMonth())),this._isInRange(e,o)},_isInRange:function(e,t){var i,n,s=this._getMinMaxDate(e,"min"),o=this._getMinMaxDate(e,"max"),r=null,a=null,l=this._get(e,"yearRange");return l&&(i=l.split(":"),n=(new Date).getFullYear(),r=parseInt(i[0],10),a=parseInt(i[1],10),i[0].match(/[+\-].*/)&&(r+=n),i[1].match(/[+\-].*/)&&(a+=n)),(!s||t.getTime()>=s.getTime())&&(!o||t.getTime()<=o.getTime())&&(!r||t.getFullYear()>=r)&&(!a||t.getFullYear()<=a)},_getFormatConfig:function(e){var t=this._get(e,"shortYearCutoff");return t="string"!=typeof t?t:(new Date).getFullYear()%100+parseInt(t,10),{shortYearCutoff:t,dayNamesShort:this._get(e,"dayNamesShort"),dayNames:this._get(e,"dayNames"),monthNamesShort:this._get(e,"monthNamesShort"),monthNames:this._get(e,"monthNames")}},_formatDate:function(e,t,i,n){t||(e.currentDay=e.selectedDay,e.currentMonth=e.selectedMonth,e.currentYear=e.selectedYear);var s=t?"object"==typeof t?t:this._daylightSavingAdjust(new Date(n,i,t)):this._daylightSavingAdjust(new Date(e.currentYear,e.currentMonth,e.currentDay));return this.formatDate(this._get(e,"dateFormat"),s,this._getFormatConfig(e))}}),e.fn.datepicker=function(t){if(!this.length)return this;e.datepicker.initialized||(e(document).mousedown(e.datepicker._checkExternalClick),e.datepicker.initialized=!0),0===e("#"+e.datepicker._mainDivId).length&&e("body").append(e.datepicker.dpDiv);var i=Array.prototype.slice.call(arguments,1);return"string"!=typeof t||"isDisabled"!==t&&"getDate"!==t&&"widget"!==t?"option"===t&&2===arguments.length&&"string"==typeof arguments[1]?e.datepicker["_"+t+"Datepicker"].apply(e.datepicker,[this[0]].concat(i)):this.each(function(){"string"==typeof t?e.datepicker["_"+t+"Datepicker"].apply(e.datepicker,[this].concat(i)):e.datepicker._attachDatepicker(this,t)}):e.datepicker["_"+t+"Datepicker"].apply(e.datepicker,[this[0]].concat(i))},e.datepicker=new s,e.datepicker.initialized=!1,e.datepicker.uuid=(new Date).getTime(),e.datepicker.version="1.11.4";var v=(e.datepicker,e.widget("ui.dialog",{version:"1.11.4",options:{appendTo:"body",autoOpen:!0,buttons:[],closeOnEscape:!0,closeText:"Close",dialogClass:"",draggable:!0,hide:null,height:"auto",maxHeight:null,maxWidth:null,minHeight:150,minWidth:150,modal:!1,position:{my:"center",at:"center",of:window,collision:"fit",using:function(t){var i=e(this).css(t).offset().top;i<0&&e(this).css("top",t.top-i)}},resizable:!0,show:null,title:null,width:300,beforeClose:null,close:null,drag:null,dragStart:null,dragStop:null,focus:null,open:null,resize:null,resizeStart:null,resizeStop:null},sizeRelatedOptions:{buttons:!0,height:!0,maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0,width:!0},resizableRelatedOptions:{maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0},_create:function(){this.originalCss={display:this.element[0].style.display,width:this.element[0].style.width,minHeight:this.element[0].style.minHeight,maxHeight:this.element[0].style.maxHeight,height:this.element[0].style.height},this.originalPosition={parent:this.element.parent(),index:this.element.parent().children().index(this.element)},this.originalTitle=this.element.attr("title"),this.options.title=this.options.title||this.originalTitle,this._createWrapper(),this.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(this.uiDialog),this._createTitlebar(),this._createButtonPane(),this.options.draggable&&e.fn.draggable&&this._makeDraggable(),this.options.resizable&&e.fn.resizable&&this._makeResizable(),this._isOpen=!1,this._trackFocus()},_init:function(){this.options.autoOpen&&this.open()},_appendTo:function(){var t=this.options.appendTo;return t&&(t.jquery||t.nodeType)?e(t):this.document.find(t||"body").eq(0)},_destroy:function(){var e,t=this.originalPosition;this._untrackInstance(),this._destroyOverlay(),this.element.removeUniqueId().removeClass("ui-dialog-content ui-widget-content").css(this.originalCss).detach(),this.uiDialog.stop(!0,!0).remove(),this.originalTitle&&this.element.attr("title",this.originalTitle),e=t.parent.children().eq(t.index),e.length&&e[0]!==this.element[0]?e.before(this.element):t.parent.append(this.element)},widget:function(){return this.uiDialog},disable:e.noop,enable:e.noop,close:function(t){var i,n=this;if(this._isOpen&&!1!==this._trigger("beforeClose",t)){if(this._isOpen=!1,this._focusedElement=null,this._destroyOverlay(),this._untrackInstance(),!this.opener.filter(":focusable").focus().length)try{i=this.document[0].activeElement,i&&"body"!==i.nodeName.toLowerCase()&&e(i).blur()}catch(e){}this._hide(this.uiDialog,this.options.hide,function(){n._trigger("close",t)})}},isOpen:function(){return this._isOpen},moveToTop:function(){this._moveToTop()},_moveToTop:function(t,i){var n=!1,s=this.uiDialog.siblings(".ui-front:visible").map(function(){return+e(this).css("z-index")}).get(),o=Math.max.apply(null,s);return o>=+this.uiDialog.css("z-index")&&(this.uiDialog.css("z-index",o+1),n=!0),n&&!i&&this._trigger("focus",t),n},open:function(){var t=this;if(this._isOpen)return void(this._moveToTop()&&this._focusTabbable());this._isOpen=!0,this.opener=e(this.document[0].activeElement),this._size(),this._position(),this._createOverlay(),this._moveToTop(null,!0),this.overlay&&this.overlay.css("z-index",this.uiDialog.css("z-index")-1),this._show(this.uiDialog,this.options.show,function(){t._focusTabbable(),t._trigger("focus")}),this._makeFocusTarget(),this._trigger("open")},_focusTabbable:function(){var e=this._focusedElement;e||(e=this.element.find("[autofocus]")),e.length||(e=this.element.find(":tabbable")),e.length||(e=this.uiDialogButtonPane.find(":tabbable")),e.length||(e=this.uiDialogTitlebarClose.filter(":tabbable")),e.length||(e=this.uiDialog),e.eq(0).focus()},_keepFocus:function(t){function i(){var t=this.document[0].activeElement;this.uiDialog[0]===t||e.contains(this.uiDialog[0],t)||this._focusTabbable()}t.preventDefault(),i.call(this),this._delay(i)},_createWrapper:function(){this.uiDialog=e("<div>").addClass("ui-dialog ui-widget ui-widget-content ui-corner-all ui-front "+this.options.dialogClass).hide().attr({tabIndex:-1,role:"dialog"}).appendTo(this._appendTo()),this._on(this.uiDialog,{keydown:function(t){if(this.options.closeOnEscape&&!t.isDefaultPrevented()&&t.keyCode&&t.keyCode===e.ui.keyCode.ESCAPE)return t.preventDefault(),void this.close(t);if(t.keyCode===e.ui.keyCode.TAB&&!t.isDefaultPrevented()){var i=this.uiDialog.find(":tabbable"),n=i.filter(":first"),s=i.filter(":last");t.target!==s[0]&&t.target!==this.uiDialog[0]||t.shiftKey?t.target!==n[0]&&t.target!==this.uiDialog[0]||!t.shiftKey||(this._delay(function(){s.focus()}),t.preventDefault()):(this._delay(function(){n.focus()}),t.preventDefault())}},mousedown:function(e){this._moveToTop(e)&&this._focusTabbable()}}),this.element.find("[aria-describedby]").length||this.uiDialog.attr({"aria-describedby":this.element.uniqueId().attr("id")})},_createTitlebar:function(){var t;this.uiDialogTitlebar=e("<div>").addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(this.uiDialog),this._on(this.uiDialogTitlebar,{mousedown:function(t){e(t.target).closest(".ui-dialog-titlebar-close")||this.uiDialog.focus()}}),this.uiDialogTitlebarClose=e("<button type='button'></button>").button({label:this.options.closeText,icons:{primary:"ui-icon-closethick"},text:!1}).addClass("ui-dialog-titlebar-close").appendTo(this.uiDialogTitlebar),this._on(this.uiDialogTitlebarClose,{click:function(e){e.preventDefault(),this.close(e)}}),t=e("<span>").uniqueId().addClass("ui-dialog-title").prependTo(this.uiDialogTitlebar),this._title(t),this.uiDialog.attr({"aria-labelledby":t.attr("id")})},_title:function(e){this.options.title||e.html("&#160;"),e.text(this.options.title)},_createButtonPane:function(){this.uiDialogButtonPane=e("<div>").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix"),this.uiButtonSet=e("<div>").addClass("ui-dialog-buttonset").appendTo(this.uiDialogButtonPane),this._createButtons()},_createButtons:function(){var t=this,i=this.options.buttons;if(this.uiDialogButtonPane.remove(),this.uiButtonSet.empty(),e.isEmptyObject(i)||e.isArray(i)&&!i.length)return void this.uiDialog.removeClass("ui-dialog-buttons");e.each(i,function(i,n){var s,o;n=e.isFunction(n)?{click:n,text:i}:n,n=e.extend({type:"button"},n),s=n.click,n.click=function(){s.apply(t.element[0],arguments)},o={icons:n.icons,text:n.showText},delete n.icons,delete n.showText,e("<button></button>",n).button(o).appendTo(t.uiButtonSet)}),this.uiDialog.addClass("ui-dialog-buttons"),this.uiDialogButtonPane.appendTo(this.uiDialog)},_makeDraggable:function(){function t(e){return{position:e.position,offset:e.offset}}var i=this,n=this.options;this.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(n,s){e(this).addClass("ui-dialog-dragging"),i._blockFrames(),i._trigger("dragStart",n,t(s))},drag:function(e,n){i._trigger("drag",e,t(n))},stop:function(s,o){var r=o.offset.left-i.document.scrollLeft(),a=o.offset.top-i.document.scrollTop();n.position={my:"left top",at:"left"+(r>=0?"+":"")+r+" top"+(a>=0?"+":"")+a,of:i.window},e(this).removeClass("ui-dialog-dragging"),i._unblockFrames(),i._trigger("dragStop",s,t(o))}})},_makeResizable:function(){function t(e){return{originalPosition:e.originalPosition,originalSize:e.originalSize,position:e.position,size:e.size}}var i=this,n=this.options,s=n.resizable,o=this.uiDialog.css("position"),r="string"==typeof s?s:"n,e,s,w,se,sw,ne,nw";this.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:this.element,maxWidth:n.maxWidth,maxHeight:n.maxHeight,minWidth:n.minWidth,minHeight:this._minHeight(),handles:r,start:function(n,s){e(this).addClass("ui-dialog-resizing"),i._blockFrames(),i._trigger("resizeStart",n,t(s))},resize:function(e,n){i._trigger("resize",e,t(n))},stop:function(s,o){var r=i.uiDialog.offset(),a=r.left-i.document.scrollLeft(),l=r.top-i.document.scrollTop();n.height=i.uiDialog.height(),n.width=i.uiDialog.width(),n.position={my:"left top",at:"left"+(a>=0?"+":"")+a+" top"+(l>=0?"+":"")+l,of:i.window},e(this).removeClass("ui-dialog-resizing"),i._unblockFrames(),i._trigger("resizeStop",s,t(o))}}).css("position",o)},_trackFocus:function(){this._on(this.widget(),{focusin:function(t){this._makeFocusTarget(),this._focusedElement=e(t.target)}})},_makeFocusTarget:function(){this._untrackInstance(),this._trackingInstances().unshift(this)},_untrackInstance:function(){var t=this._trackingInstances(),i=e.inArray(this,t);-1!==i&&t.splice(i,1)},_trackingInstances:function(){var e=this.document.data("ui-dialog-instances");return e||(e=[],this.document.data("ui-dialog-instances",e)),e},_minHeight:function(){var e=this.options;return"auto"===e.height?e.minHeight:Math.min(e.minHeight,e.height)},_position:function(){var e=this.uiDialog.is(":visible");e||this.uiDialog.show(),this.uiDialog.position(this.options.position),e||this.uiDialog.hide()},_setOptions:function(t){var i=this,n=!1,s={};e.each(t,function(e,t){i._setOption(e,t),e in i.sizeRelatedOptions&&(n=!0),e in i.resizableRelatedOptions&&(s[e]=t)}),n&&(this._size(),this._position()),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option",s)},_setOption:function(e,t){var i,n,s=this.uiDialog;"dialogClass"===e&&s.removeClass(this.options.dialogClass).addClass(t),"disabled"!==e&&(this._super(e,t),"appendTo"===e&&this.uiDialog.appendTo(this._appendTo()),"buttons"===e&&this._createButtons(),"closeText"===e&&this.uiDialogTitlebarClose.button({label:""+t}),"draggable"===e&&(i=s.is(":data(ui-draggable)"),i&&!t&&s.draggable("destroy"),!i&&t&&this._makeDraggable()),"position"===e&&this._position(),"resizable"===e&&(n=s.is(":data(ui-resizable)"),n&&!t&&s.resizable("destroy"),n&&"string"==typeof t&&s.resizable("option","handles",t),n||!1===t||this._makeResizable()),"title"===e&&this._title(this.uiDialogTitlebar.find(".ui-dialog-title")))},_size:function(){var e,t,i,n=this.options;this.element.show().css({width:"auto",minHeight:0,maxHeight:"none",height:0}),n.minWidth>n.width&&(n.width=n.minWidth),e=this.uiDialog.css({height:"auto",width:n.width}).outerHeight(),t=Math.max(0,n.minHeight-e),i="number"==typeof n.maxHeight?Math.max(0,n.maxHeight-e):"none","auto"===n.height?this.element.css({minHeight:t,maxHeight:i,height:"auto"}):this.element.height(Math.max(0,n.height-e)),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())},_blockFrames:function(){this.iframeBlocks=this.document.find("iframe").map(function(){var t=e(this);return e("<div>").css({position:"absolute",width:t.outerWidth(),height:t.outerHeight()}).appendTo(t.parent()).offset(t.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_allowInteraction:function(t){return!!e(t.target).closest(".ui-dialog").length||!!e(t.target).closest(".ui-datepicker").length},_createOverlay:function(){if(this.options.modal){var t=!0;this._delay(function(){t=!1}),this.document.data("ui-dialog-overlays")||this._on(this.document,{focusin:function(e){t||this._allowInteraction(e)||(e.preventDefault(),this._trackingInstances()[0]._focusTabbable())}}),this.overlay=e("<div>").addClass("ui-widget-overlay ui-front").appendTo(this._appendTo()),this._on(this.overlay,{mousedown:"_keepFocus"}),this.document.data("ui-dialog-overlays",(this.document.data("ui-dialog-overlays")||0)+1)}},_destroyOverlay:function(){if(this.options.modal&&this.overlay){var e=this.document.data("ui-dialog-overlays")-1;e?this.document.data("ui-dialog-overlays",e):this.document.unbind("focusin").removeData("ui-dialog-overlays"),this.overlay.remove(),this.overlay=null}}}),e.widget("ui.progressbar",{version:"1.11.4",options:{max:100,value:0,change:null,complete:null},min:0,_create:function(){this.oldValue=this.options.value=this._constrainedValue(),this.element.addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").attr({role:"progressbar","aria-valuemin":this.min}),this.valueDiv=e("<div class='ui-progressbar-value ui-widget-header ui-corner-left'></div>").appendTo(this.element),this._refreshValue()},_destroy:function(){this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"),this.valueDiv.remove()},value:function(e){if(void 0===e)return this.options.value;this.options.value=this._constrainedValue(e),this._refreshValue()},_constrainedValue:function(e){return void 0===e&&(e=this.options.value),this.indeterminate=!1===e,"number"!=typeof e&&(e=0),!this.indeterminate&&Math.min(this.options.max,Math.max(this.min,e))},_setOptions:function(e){var t=e.value;delete e.value,this._super(e),this.options.value=this._constrainedValue(t),this._refreshValue()},_setOption:function(e,t){"max"===e&&(t=Math.max(this.min,t)),"disabled"===e&&this.element.toggleClass("ui-state-disabled",!!t).attr("aria-disabled",t),this._super(e,t)},_percentage:function(){return this.indeterminate?100:100*(this.options.value-this.min)/(this.options.max-this.min)},_refreshValue:function(){var t=this.options.value,i=this._percentage();this.valueDiv.toggle(this.indeterminate||t>this.min).toggleClass("ui-corner-right",t===this.options.max).width(i.toFixed(0)+"%"),this.element.toggleClass("ui-progressbar-indeterminate",this.indeterminate),this.indeterminate?(this.element.removeAttr("aria-valuenow"),this.overlayDiv||(this.overlayDiv=e("<div class='ui-progressbar-overlay'></div>").appendTo(this.valueDiv))):(this.element.attr({"aria-valuemax":this.options.max,"aria-valuenow":t}),this.overlayDiv&&(this.overlayDiv.remove(),this.overlayDiv=null)),this.oldValue!==t&&(this.oldValue=t,this._trigger("change")),t===this.options.max&&this._trigger("complete")}}),e.widget("ui.selectmenu",{version:"1.11.4",defaultElement:"<select>",options:{appendTo:null,disabled:null,icons:{button:"ui-icon-triangle-1-s"},position:{my:"left top",at:"left bottom",collision:"none"},width:null,change:null,close:null,focus:null,open:null,select:null},_create:function(){var e=this.element.uniqueId().attr("id");this.ids={element:e,button:e+"-button",menu:e+"-menu"},this._drawButton(),this._drawMenu(),this.options.disabled&&this.disable()},_drawButton:function(){var t=this;this.label=e("label[for='"+this.ids.element+"']").attr("for",this.ids.button),this._on(this.label,{click:function(e){this.button.focus(),e.preventDefault()}}),this.element.hide(),this.button=e("<span>",{class:"ui-selectmenu-button ui-widget ui-state-default ui-corner-all",tabindex:this.options.disabled?-1:0,id:this.ids.button,role:"combobox","aria-expanded":"false","aria-autocomplete":"list","aria-owns":this.ids.menu,"aria-haspopup":"true"}).insertAfter(this.element),e("<span>",{class:"ui-icon "+this.options.icons.button}).prependTo(this.button),this.buttonText=e("<span>",{class:"ui-selectmenu-text"}).appendTo(this.button),this._setText(this.buttonText,this.element.find("option:selected").text()),this._resizeButton(),this._on(this.button,this._buttonEvents),this.button.one("focusin",function(){t.menuItems||t._refreshMenu()}),this._hoverable(this.button),this._focusable(this.button)},_drawMenu:function(){var t=this;this.menu=e("<ul>",{"aria-hidden":"true","aria-labelledby":this.ids.button,id:this.ids.menu}),this.menuWrap=e("<div>",{class:"ui-selectmenu-menu ui-front"}).append(this.menu).appendTo(this._appendTo()),this.menuInstance=this.menu.menu({role:"listbox",select:function(e,i){e.preventDefault(),t._setSelection(),t._select(i.item.data("ui-selectmenu-item"),e)},focus:function(e,i){var n=i.item.data("ui-selectmenu-item");null!=t.focusIndex&&n.index!==t.focusIndex&&(t._trigger("focus",e,{item:n}),t.isOpen||t._select(n,e)),t.focusIndex=n.index,t.button.attr("aria-activedescendant",t.menuItems.eq(n.index).attr("id"))}}).menu("instance"),this.menu.addClass("ui-corner-bottom").removeClass("ui-corner-all"),this.menuInstance._off(this.menu,"mouseleave"),this.menuInstance._closeOnDocumentClick=function(){return!1},this.menuInstance._isDivider=function(){return!1}},refresh:function(){this._refreshMenu(),this._setText(this.buttonText,this._getSelectedItem().text()),this.options.width||this._resizeButton()},_refreshMenu:function(){this.menu.empty();var e,t=this.element.find("option");t.length&&(this._parseOptions(t),this._renderMenu(this.menu,this.items),this.menuInstance.refresh(),this.menuItems=this.menu.find("li").not(".ui-selectmenu-optgroup"),e=this._getSelectedItem(),this.menuInstance.focus(null,e),this._setAria(e.data("ui-selectmenu-item")),this._setOption("disabled",this.element.prop("disabled")))},open:function(e){this.options.disabled||(this.menuItems?(this.menu.find(".ui-state-focus").removeClass("ui-state-focus"),this.menuInstance.focus(null,this._getSelectedItem())):this._refreshMenu(),this.isOpen=!0,this._toggleAttr(),this._resizeMenu(),this._position(),this._on(this.document,this._documentClick),this._trigger("open",e))},_position:function(){this.menuWrap.position(e.extend({of:this.button},this.options.position))},close:function(e){this.isOpen&&(this.isOpen=!1,this._toggleAttr(),this.range=null,this._off(this.document),this._trigger("close",e))},widget:function(){return this.button},menuWidget:function(){return this.menu},_renderMenu:function(t,i){var n=this,s="";e.each(i,function(i,o){o.optgroup!==s&&(e("<li>",{
class:"ui-selectmenu-optgroup ui-menu-divider"+(o.element.parent("optgroup").prop("disabled")?" ui-state-disabled":""),text:o.optgroup}).appendTo(t),s=o.optgroup),n._renderItemData(t,o)})},_renderItemData:function(e,t){return this._renderItem(e,t).data("ui-selectmenu-item",t)},_renderItem:function(t,i){var n=e("<li>");return i.disabled&&n.addClass("ui-state-disabled"),this._setText(n,i.label),n.appendTo(t)},_setText:function(e,t){t?e.text(t):e.html("&#160;")},_move:function(e,t){var i,n,s=".ui-menu-item";this.isOpen?i=this.menuItems.eq(this.focusIndex):(i=this.menuItems.eq(this.element[0].selectedIndex),s+=":not(.ui-state-disabled)"),n="first"===e||"last"===e?i["first"===e?"prevAll":"nextAll"](s).eq(-1):i[e+"All"](s).eq(0),n.length&&this.menuInstance.focus(t,n)},_getSelectedItem:function(){return this.menuItems.eq(this.element[0].selectedIndex)},_toggle:function(e){this[this.isOpen?"close":"open"](e)},_setSelection:function(){var e;this.range&&(window.getSelection?(e=window.getSelection(),e.removeAllRanges(),e.addRange(this.range)):this.range.select(),this.button.focus())},_documentClick:{mousedown:function(t){this.isOpen&&(e(t.target).closest(".ui-selectmenu-menu, #"+this.ids.button).length||this.close(t))}},_buttonEvents:{mousedown:function(){var e;window.getSelection?(e=window.getSelection(),e.rangeCount&&(this.range=e.getRangeAt(0))):this.range=document.selection.createRange()},click:function(e){this._setSelection(),this._toggle(e)},keydown:function(t){var i=!0;switch(t.keyCode){case e.ui.keyCode.TAB:case e.ui.keyCode.ESCAPE:this.close(t),i=!1;break;case e.ui.keyCode.ENTER:this.isOpen&&this._selectFocusedItem(t);break;case e.ui.keyCode.UP:t.altKey?this._toggle(t):this._move("prev",t);break;case e.ui.keyCode.DOWN:t.altKey?this._toggle(t):this._move("next",t);break;case e.ui.keyCode.SPACE:this.isOpen?this._selectFocusedItem(t):this._toggle(t);break;case e.ui.keyCode.LEFT:this._move("prev",t);break;case e.ui.keyCode.RIGHT:this._move("next",t);break;case e.ui.keyCode.HOME:case e.ui.keyCode.PAGE_UP:this._move("first",t);break;case e.ui.keyCode.END:case e.ui.keyCode.PAGE_DOWN:this._move("last",t);break;default:this.menu.trigger(t),i=!1}i&&t.preventDefault()}},_selectFocusedItem:function(e){var t=this.menuItems.eq(this.focusIndex);t.hasClass("ui-state-disabled")||this._select(t.data("ui-selectmenu-item"),e)},_select:function(e,t){var i=this.element[0].selectedIndex;this.element[0].selectedIndex=e.index,this._setText(this.buttonText,e.label),this._setAria(e),this._trigger("select",t,{item:e}),e.index!==i&&this._trigger("change",t,{item:e}),this.close(t)},_setAria:function(e){var t=this.menuItems.eq(e.index).attr("id");this.button.attr({"aria-labelledby":t,"aria-activedescendant":t}),this.menu.attr("aria-activedescendant",t)},_setOption:function(e,t){"icons"===e&&this.button.find("span.ui-icon").removeClass(this.options.icons.button).addClass(t.button),this._super(e,t),"appendTo"===e&&this.menuWrap.appendTo(this._appendTo()),"disabled"===e&&(this.menuInstance.option("disabled",t),this.button.toggleClass("ui-state-disabled",t).attr("aria-disabled",t),this.element.prop("disabled",t),t?(this.button.attr("tabindex",-1),this.close()):this.button.attr("tabindex",0)),"width"===e&&this._resizeButton()},_appendTo:function(){var t=this.options.appendTo;return t&&(t=t.jquery||t.nodeType?e(t):this.document.find(t).eq(0)),t&&t[0]||(t=this.element.closest(".ui-front")),t.length||(t=this.document[0].body),t},_toggleAttr:function(){this.button.toggleClass("ui-corner-top",this.isOpen).toggleClass("ui-corner-all",!this.isOpen).attr("aria-expanded",this.isOpen),this.menuWrap.toggleClass("ui-selectmenu-open",this.isOpen),this.menu.attr("aria-hidden",!this.isOpen)},_resizeButton:function(){var e=this.options.width;e||(e=this.element.show().outerWidth(),this.element.hide()),this.button.outerWidth(e)},_resizeMenu:function(){this.menu.outerWidth(Math.max(this.button.outerWidth(),this.menu.width("").outerWidth()+1))},_getCreateOptions:function(){return{disabled:this.element.prop("disabled")}},_parseOptions:function(t){var i=[];t.each(function(t,n){var s=e(n),o=s.parent("optgroup");i.push({element:s,index:t,value:s.val(),label:s.text(),optgroup:o.attr("label")||"",disabled:o.prop("disabled")||s.prop("disabled")})}),this.items=i},_destroy:function(){this.menuWrap.remove(),this.button.remove(),this.element.show(),this.element.removeUniqueId(),this.label.attr("for",this.ids.element)}}),e.widget("ui.slider",e.ui.mouse,{version:"1.11.4",widgetEventPrefix:"slide",options:{animate:!1,distance:0,max:100,min:0,orientation:"horizontal",range:!1,step:1,value:0,values:null,change:null,slide:null,start:null,stop:null},numPages:5,_create:function(){this._keySliding=!1,this._mouseSliding=!1,this._animateOff=!0,this._handleIndex=null,this._detectOrientation(),this._mouseInit(),this._calculateNewMax(),this.element.addClass("ui-slider ui-slider-"+this.orientation+" ui-widget ui-widget-content ui-corner-all"),this._refresh(),this._setOption("disabled",this.options.disabled),this._animateOff=!1},_refresh:function(){this._createRange(),this._createHandles(),this._setupEvents(),this._refreshValue()},_createHandles:function(){var t,i,n=this.options,s=this.element.find(".ui-slider-handle").addClass("ui-state-default ui-corner-all"),o=[];for(i=n.values&&n.values.length||1,s.length>i&&(s.slice(i).remove(),s=s.slice(0,i)),t=s.length;t<i;t++)o.push("<span class='ui-slider-handle ui-state-default ui-corner-all' tabindex='0'></span>");this.handles=s.add(e(o.join("")).appendTo(this.element)),this.handle=this.handles.eq(0),this.handles.each(function(t){e(this).data("ui-slider-handle-index",t)})},_createRange:function(){var t=this.options,i="";t.range?(!0===t.range&&(t.values?t.values.length&&2!==t.values.length?t.values=[t.values[0],t.values[0]]:e.isArray(t.values)&&(t.values=t.values.slice(0)):t.values=[this._valueMin(),this._valueMin()]),this.range&&this.range.length?this.range.removeClass("ui-slider-range-min ui-slider-range-max").css({left:"",bottom:""}):(this.range=e("<div></div>").appendTo(this.element),i="ui-slider-range ui-widget-header ui-corner-all"),this.range.addClass(i+("min"===t.range||"max"===t.range?" ui-slider-range-"+t.range:""))):(this.range&&this.range.remove(),this.range=null)},_setupEvents:function(){this._off(this.handles),this._on(this.handles,this._handleEvents),this._hoverable(this.handles),this._focusable(this.handles)},_destroy:function(){this.handles.remove(),this.range&&this.range.remove(),this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-widget ui-widget-content ui-corner-all"),this._mouseDestroy()},_mouseCapture:function(t){var i,n,s,o,r,a,l,c=this,u=this.options;return!u.disabled&&(this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),i={x:t.pageX,y:t.pageY},n=this._normValueFromMouse(i),s=this._valueMax()-this._valueMin()+1,this.handles.each(function(t){var i=Math.abs(n-c.values(t));(s>i||s===i&&(t===c._lastChangedValue||c.values(t)===u.min))&&(s=i,o=e(this),r=t)}),!1!==this._start(t,r)&&(this._mouseSliding=!0,this._handleIndex=r,o.addClass("ui-state-active").focus(),a=o.offset(),l=!e(t.target).parents().addBack().is(".ui-slider-handle"),this._clickOffset=l?{left:0,top:0}:{left:t.pageX-a.left-o.width()/2,top:t.pageY-a.top-o.height()/2-(parseInt(o.css("borderTopWidth"),10)||0)-(parseInt(o.css("borderBottomWidth"),10)||0)+(parseInt(o.css("marginTop"),10)||0)},this.handles.hasClass("ui-state-hover")||this._slide(t,r,n),this._animateOff=!0,!0))},_mouseStart:function(){return!0},_mouseDrag:function(e){var t={x:e.pageX,y:e.pageY},i=this._normValueFromMouse(t);return this._slide(e,this._handleIndex,i),!1},_mouseStop:function(e){return this.handles.removeClass("ui-state-active"),this._mouseSliding=!1,this._stop(e,this._handleIndex),this._change(e,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=!1,!1},_detectOrientation:function(){this.orientation="vertical"===this.options.orientation?"vertical":"horizontal"},_normValueFromMouse:function(e){var t,i,n,s,o;return"horizontal"===this.orientation?(t=this.elementSize.width,i=e.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(t=this.elementSize.height,i=e.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)),n=i/t,n>1&&(n=1),n<0&&(n=0),"vertical"===this.orientation&&(n=1-n),s=this._valueMax()-this._valueMin(),o=this._valueMin()+n*s,this._trimAlignValue(o)},_start:function(e,t){var i={handle:this.handles[t],value:this.value()};return this.options.values&&this.options.values.length&&(i.value=this.values(t),i.values=this.values()),this._trigger("start",e,i)},_slide:function(e,t,i){var n,s,o;this.options.values&&this.options.values.length?(n=this.values(t?0:1),2===this.options.values.length&&!0===this.options.range&&(0===t&&i>n||1===t&&i<n)&&(i=n),i!==this.values(t)&&(s=this.values(),s[t]=i,o=this._trigger("slide",e,{handle:this.handles[t],value:i,values:s}),n=this.values(t?0:1),!1!==o&&this.values(t,i))):i!==this.value()&&!1!==(o=this._trigger("slide",e,{handle:this.handles[t],value:i}))&&this.value(i)},_stop:function(e,t){var i={handle:this.handles[t],value:this.value()};this.options.values&&this.options.values.length&&(i.value=this.values(t),i.values=this.values()),this._trigger("stop",e,i)},_change:function(e,t){if(!this._keySliding&&!this._mouseSliding){var i={handle:this.handles[t],value:this.value()};this.options.values&&this.options.values.length&&(i.value=this.values(t),i.values=this.values()),this._lastChangedValue=t,this._trigger("change",e,i)}},value:function(e){return arguments.length?(this.options.value=this._trimAlignValue(e),this._refreshValue(),void this._change(null,0)):this._value()},values:function(t,i){var n,s,o;if(arguments.length>1)return this.options.values[t]=this._trimAlignValue(i),this._refreshValue(),void this._change(null,t);if(!arguments.length)return this._values();if(!e.isArray(arguments[0]))return this.options.values&&this.options.values.length?this._values(t):this.value();for(n=this.options.values,s=arguments[0],o=0;o<n.length;o+=1)n[o]=this._trimAlignValue(s[o]),this._change(null,o);this._refreshValue()},_setOption:function(t,i){var n,s=0;switch("range"===t&&!0===this.options.range&&("min"===i?(this.options.value=this._values(0),this.options.values=null):"max"===i&&(this.options.value=this._values(this.options.values.length-1),this.options.values=null)),e.isArray(this.options.values)&&(s=this.options.values.length),"disabled"===t&&this.element.toggleClass("ui-state-disabled",!!i),this._super(t,i),t){case"orientation":this._detectOrientation(),this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+this.orientation),this._refreshValue(),this.handles.css("horizontal"===i?"bottom":"left","");break;case"value":this._animateOff=!0,this._refreshValue(),this._change(null,0),this._animateOff=!1;break;case"values":for(this._animateOff=!0,this._refreshValue(),n=0;n<s;n+=1)this._change(null,n);this._animateOff=!1;break;case"step":case"min":case"max":this._animateOff=!0,this._calculateNewMax(),this._refreshValue(),this._animateOff=!1;break;case"range":this._animateOff=!0,this._refresh(),this._animateOff=!1}},_value:function(){var e=this.options.value;return e=this._trimAlignValue(e)},_values:function(e){var t,i,n;if(arguments.length)return t=this.options.values[e],t=this._trimAlignValue(t);if(this.options.values&&this.options.values.length){for(i=this.options.values.slice(),n=0;n<i.length;n+=1)i[n]=this._trimAlignValue(i[n]);return i}return[]},_trimAlignValue:function(e){if(e<=this._valueMin())return this._valueMin();if(e>=this._valueMax())return this._valueMax();var t=this.options.step>0?this.options.step:1,i=(e-this._valueMin())%t,n=e-i;return 2*Math.abs(i)>=t&&(n+=i>0?t:-t),parseFloat(n.toFixed(5))},_calculateNewMax:function(){var e=this.options.max,t=this._valueMin(),i=this.options.step;e=Math.floor(+(e-t).toFixed(this._precision())/i)*i+t,this.max=parseFloat(e.toFixed(this._precision()))},_precision:function(){var e=this._precisionOf(this.options.step);return null!==this.options.min&&(e=Math.max(e,this._precisionOf(this.options.min))),e},_precisionOf:function(e){var t=e.toString(),i=t.indexOf(".");return-1===i?0:t.length-i-1},_valueMin:function(){return this.options.min},_valueMax:function(){return this.max},_refreshValue:function(){var t,i,n,s,o,r=this.options.range,a=this.options,l=this,c=!this._animateOff&&a.animate,u={};this.options.values&&this.options.values.length?this.handles.each(function(n){i=(l.values(n)-l._valueMin())/(l._valueMax()-l._valueMin())*100,u["horizontal"===l.orientation?"left":"bottom"]=i+"%",e(this).stop(1,1)[c?"animate":"css"](u,a.animate),!0===l.options.range&&("horizontal"===l.orientation?(0===n&&l.range.stop(1,1)[c?"animate":"css"]({left:i+"%"},a.animate),1===n&&l.range[c?"animate":"css"]({width:i-t+"%"},{queue:!1,duration:a.animate})):(0===n&&l.range.stop(1,1)[c?"animate":"css"]({bottom:i+"%"},a.animate),1===n&&l.range[c?"animate":"css"]({height:i-t+"%"},{queue:!1,duration:a.animate}))),t=i}):(n=this.value(),s=this._valueMin(),o=this._valueMax(),i=o!==s?(n-s)/(o-s)*100:0,u["horizontal"===this.orientation?"left":"bottom"]=i+"%",this.handle.stop(1,1)[c?"animate":"css"](u,a.animate),"min"===r&&"horizontal"===this.orientation&&this.range.stop(1,1)[c?"animate":"css"]({width:i+"%"},a.animate),"max"===r&&"horizontal"===this.orientation&&this.range[c?"animate":"css"]({width:100-i+"%"},{queue:!1,duration:a.animate}),"min"===r&&"vertical"===this.orientation&&this.range.stop(1,1)[c?"animate":"css"]({height:i+"%"},a.animate),"max"===r&&"vertical"===this.orientation&&this.range[c?"animate":"css"]({height:100-i+"%"},{queue:!1,duration:a.animate}))},_handleEvents:{keydown:function(t){var i,n,s,o=e(t.target).data("ui-slider-handle-index");switch(t.keyCode){case e.ui.keyCode.HOME:case e.ui.keyCode.END:case e.ui.keyCode.PAGE_UP:case e.ui.keyCode.PAGE_DOWN:case e.ui.keyCode.UP:case e.ui.keyCode.RIGHT:case e.ui.keyCode.DOWN:case e.ui.keyCode.LEFT:if(t.preventDefault(),!this._keySliding&&(this._keySliding=!0,e(t.target).addClass("ui-state-active"),!1===this._start(t,o)))return}switch(s=this.options.step,i=n=this.options.values&&this.options.values.length?this.values(o):this.value(),t.keyCode){case e.ui.keyCode.HOME:n=this._valueMin();break;case e.ui.keyCode.END:n=this._valueMax();break;case e.ui.keyCode.PAGE_UP:n=this._trimAlignValue(i+(this._valueMax()-this._valueMin())/this.numPages);break;case e.ui.keyCode.PAGE_DOWN:n=this._trimAlignValue(i-(this._valueMax()-this._valueMin())/this.numPages);break;case e.ui.keyCode.UP:case e.ui.keyCode.RIGHT:if(i===this._valueMax())return;n=this._trimAlignValue(i+s);break;case e.ui.keyCode.DOWN:case e.ui.keyCode.LEFT:if(i===this._valueMin())return;n=this._trimAlignValue(i-s)}this._slide(t,o,n)},keyup:function(t){var i=e(t.target).data("ui-slider-handle-index");this._keySliding&&(this._keySliding=!1,this._stop(t,i),this._change(t,i),e(t.target).removeClass("ui-state-active"))}}}),e.widget("ui.spinner",{version:"1.11.4",defaultElement:"<input>",widgetEventPrefix:"spin",options:{culture:null,icons:{down:"ui-icon-triangle-1-s",up:"ui-icon-triangle-1-n"},incremental:!0,max:null,min:null,numberFormat:null,page:10,step:1,change:null,spin:null,start:null,stop:null},_create:function(){this._setOption("max",this.options.max),this._setOption("min",this.options.min),this._setOption("step",this.options.step),""!==this.value()&&this._value(this.element.val(),!0),this._draw(),this._on(this._events),this._refresh(),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_getCreateOptions:function(){var t={},i=this.element;return e.each(["min","max","step"],function(e,n){var s=i.attr(n);void 0!==s&&s.length&&(t[n]=s)}),t},_events:{keydown:function(e){this._start(e)&&this._keydown(e)&&e.preventDefault()},keyup:"_stop",focus:function(){this.previous=this.element.val()},blur:function(e){if(this.cancelBlur)return void delete this.cancelBlur;this._stop(),this._refresh(),this.previous!==this.element.val()&&this._trigger("change",e)},mousewheel:function(e,t){if(t){if(!this.spinning&&!this._start(e))return!1;this._spin((t>0?1:-1)*this.options.step,e),clearTimeout(this.mousewheelTimer),this.mousewheelTimer=this._delay(function(){this.spinning&&this._stop(e)},100),e.preventDefault()}},"mousedown .ui-spinner-button":function(t){function i(){this.element[0]===this.document[0].activeElement||(this.element.focus(),this.previous=n,this._delay(function(){this.previous=n}))}var n;n=this.element[0]===this.document[0].activeElement?this.previous:this.element.val(),t.preventDefault(),i.call(this),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur,i.call(this)}),!1!==this._start(t)&&this._repeat(null,e(t.currentTarget).hasClass("ui-spinner-up")?1:-1,t)},"mouseup .ui-spinner-button":"_stop","mouseenter .ui-spinner-button":function(t){if(e(t.currentTarget).hasClass("ui-state-active"))return!1!==this._start(t)&&void this._repeat(null,e(t.currentTarget).hasClass("ui-spinner-up")?1:-1,t)},"mouseleave .ui-spinner-button":"_stop"},_draw:function(){var e=this.uiSpinner=this.element.addClass("ui-spinner-input").attr("autocomplete","off").wrap(this._uiSpinnerHtml()).parent().append(this._buttonHtml());this.element.attr("role","spinbutton"),this.buttons=e.find(".ui-spinner-button").attr("tabIndex",-1).button().removeClass("ui-corner-all"),this.buttons.height()>Math.ceil(.5*e.height())&&e.height()>0&&e.height(e.height()),this.options.disabled&&this.disable()},_keydown:function(t){var i=this.options,n=e.ui.keyCode;switch(t.keyCode){case n.UP:return this._repeat(null,1,t),!0;case n.DOWN:return this._repeat(null,-1,t),!0;case n.PAGE_UP:return this._repeat(null,i.page,t),!0;case n.PAGE_DOWN:return this._repeat(null,-i.page,t),!0}return!1},_uiSpinnerHtml:function(){return"<span class='ui-spinner ui-widget ui-widget-content ui-corner-all'></span>"},_buttonHtml:function(){return"<a class='ui-spinner-button ui-spinner-up ui-corner-tr'><span class='ui-icon "+this.options.icons.up+"'>&#9650;</span></a><a class='ui-spinner-button ui-spinner-down ui-corner-br'><span class='ui-icon "+this.options.icons.down+"'>&#9660;</span></a>"},_start:function(e){return!(!this.spinning&&!1===this._trigger("start",e))&&(this.counter||(this.counter=1),this.spinning=!0,!0)},_repeat:function(e,t,i){e=e||500,clearTimeout(this.timer),this.timer=this._delay(function(){this._repeat(40,t,i)},e),this._spin(t*this.options.step,i)},_spin:function(e,t){var i=this.value()||0;this.counter||(this.counter=1),i=this._adjustValue(i+e*this._increment(this.counter)),this.spinning&&!1===this._trigger("spin",t,{value:i})||(this._value(i),this.counter++)},_increment:function(t){var i=this.options.incremental;return i?e.isFunction(i)?i(t):Math.floor(t*t*t/5e4-t*t/500+17*t/200+1):1},_precision:function(){var e=this._precisionOf(this.options.step);return null!==this.options.min&&(e=Math.max(e,this._precisionOf(this.options.min))),e},_precisionOf:function(e){var t=e.toString(),i=t.indexOf(".");return-1===i?0:t.length-i-1},_adjustValue:function(e){var t,i,n=this.options;return t=null!==n.min?n.min:0,i=e-t,i=Math.round(i/n.step)*n.step,e=t+i,e=parseFloat(e.toFixed(this._precision())),null!==n.max&&e>n.max?n.max:null!==n.min&&e<n.min?n.min:e},_stop:function(e){this.spinning&&(clearTimeout(this.timer),clearTimeout(this.mousewheelTimer),this.counter=0,this.spinning=!1,this._trigger("stop",e))},_setOption:function(e,t){if("culture"===e||"numberFormat"===e){var i=this._parse(this.element.val());return this.options[e]=t,void this.element.val(this._format(i))}"max"!==e&&"min"!==e&&"step"!==e||"string"==typeof t&&(t=this._parse(t)),"icons"===e&&(this.buttons.first().find(".ui-icon").removeClass(this.options.icons.up).addClass(t.up),this.buttons.last().find(".ui-icon").removeClass(this.options.icons.down).addClass(t.down)),this._super(e,t),"disabled"===e&&(this.widget().toggleClass("ui-state-disabled",!!t),this.element.prop("disabled",!!t),this.buttons.button(t?"disable":"enable"))},_setOptions:l(function(e){this._super(e)}),_parse:function(e){return"string"==typeof e&&""!==e&&(e=window.Globalize&&this.options.numberFormat?Globalize.parseFloat(e,10,this.options.culture):+e),""===e||isNaN(e)?null:e},_format:function(e){return""===e?"":window.Globalize&&this.options.numberFormat?Globalize.format(e,this.options.numberFormat,this.options.culture):e},_refresh:function(){this.element.attr({"aria-valuemin":this.options.min,"aria-valuemax":this.options.max,"aria-valuenow":this._parse(this.element.val())})},isValid:function(){var e=this.value();return null!==e&&e===this._adjustValue(e)},_value:function(e,t){var i;""!==e&&null!==(i=this._parse(e))&&(t||(i=this._adjustValue(i)),e=this._format(i)),this.element.val(e),this._refresh()},_destroy:function(){this.element.removeClass("ui-spinner-input").prop("disabled",!1).removeAttr("autocomplete").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"),this.uiSpinner.replaceWith(this.element)},stepUp:l(function(e){this._stepUp(e)}),_stepUp:function(e){this._start()&&(this._spin((e||1)*this.options.step),this._stop())},stepDown:l(function(e){this._stepDown(e)}),_stepDown:function(e){this._start()&&(this._spin((e||1)*-this.options.step),this._stop())},pageUp:l(function(e){this._stepUp((e||1)*this.options.page)}),pageDown:l(function(e){this._stepDown((e||1)*this.options.page)}),value:function(e){if(!arguments.length)return this._parse(this.element.val());l(this._value).call(this,e)},widget:function(){return this.uiSpinner}}),e.widget("ui.tabs",{version:"1.11.4",delay:300,options:{active:null,collapsible:!1,event:"click",heightStyle:"content",hide:null,show:null,activate:null,beforeActivate:null,beforeLoad:null,load:null},_isLocal:function(){var e=/#.*$/;return function(t){var i,n;t=t.cloneNode(!1),i=t.href.replace(e,""),n=location.href.replace(e,"");try{i=decodeURIComponent(i)}catch(e){}try{n=decodeURIComponent(n)}catch(e){}return t.hash.length>1&&i===n}}(),_create:function(){var t=this,i=this.options;this.running=!1,this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all").toggleClass("ui-tabs-collapsible",i.collapsible),this._processTabs(),i.active=this._initialActive(),e.isArray(i.disabled)&&(i.disabled=e.unique(i.disabled.concat(e.map(this.tabs.filter(".ui-state-disabled"),function(e){return t.tabs.index(e)}))).sort()),!1!==this.options.active&&this.anchors.length?this.active=this._findActive(i.active):this.active=e(),this._refresh(),this.active.length&&this.load(i.active)},_initialActive:function(){var t=this.options.active,i=this.options.collapsible,n=location.hash.substring(1);return null===t&&(n&&this.tabs.each(function(i,s){if(e(s).attr("aria-controls")===n)return t=i,!1}),null===t&&(t=this.tabs.index(this.tabs.filter(".ui-tabs-active"))),null!==t&&-1!==t||(t=!!this.tabs.length&&0)),!1!==t&&-1===(t=this.tabs.index(this.tabs.eq(t)))&&(t=!i&&0),!i&&!1===t&&this.anchors.length&&(t=0),t},_getCreateEventData:function(){return{tab:this.active,panel:this.active.length?this._getPanelForTab(this.active):e()}},_tabKeydown:function(t){var i=e(this.document[0].activeElement).closest("li"),n=this.tabs.index(i),s=!0;if(!this._handlePageNav(t)){switch(t.keyCode){case e.ui.keyCode.RIGHT:case e.ui.keyCode.DOWN:n++;break;case e.ui.keyCode.UP:case e.ui.keyCode.LEFT:s=!1,n--;break;case e.ui.keyCode.END:n=this.anchors.length-1;break;case e.ui.keyCode.HOME:n=0;break;case e.ui.keyCode.SPACE:return t.preventDefault(),clearTimeout(this.activating),void this._activate(n);case e.ui.keyCode.ENTER:return t.preventDefault(),clearTimeout(this.activating),void this._activate(n!==this.options.active&&n);default:return}t.preventDefault(),clearTimeout(this.activating),n=this._focusNextTab(n,s),t.ctrlKey||t.metaKey||(i.attr("aria-selected","false"),this.tabs.eq(n).attr("aria-selected","true"),this.activating=this._delay(function(){this.option("active",n)},this.delay))}},_panelKeydown:function(t){this._handlePageNav(t)||t.ctrlKey&&t.keyCode===e.ui.keyCode.UP&&(t.preventDefault(),this.active.focus())},_handlePageNav:function(t){return t.altKey&&t.keyCode===e.ui.keyCode.PAGE_UP?(this._activate(this._focusNextTab(this.options.active-1,!1)),!0):t.altKey&&t.keyCode===e.ui.keyCode.PAGE_DOWN?(this._activate(this._focusNextTab(this.options.active+1,!0)),!0):void 0},_findNextTab:function(t,i){for(var n=this.tabs.length-1;-1!==e.inArray(function(){return t>n&&(t=0),t<0&&(t=n),t}(),this.options.disabled);)t=i?t+1:t-1;return t},_focusNextTab:function(e,t){return e=this._findNextTab(e,t),this.tabs.eq(e).focus(),e},_setOption:function(e,t){return"active"===e?void this._activate(t):"disabled"===e?void this._setupDisabled(t):(this._super(e,t),"collapsible"===e&&(this.element.toggleClass("ui-tabs-collapsible",t),t||!1!==this.options.active||this._activate(0)),"event"===e&&this._setupEvents(t),void("heightStyle"===e&&this._setupHeightStyle(t)))},_sanitizeSelector:function(e){return e?e.replace(/[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g,"\\$&"):""},refresh:function(){var t=this.options,i=this.tablist.children(":has(a[href])");t.disabled=e.map(i.filter(".ui-state-disabled"),function(e){return i.index(e)}),this._processTabs(),!1!==t.active&&this.anchors.length?this.active.length&&!e.contains(this.tablist[0],this.active[0])?this.tabs.length===t.disabled.length?(t.active=!1,this.active=e()):this._activate(this._findNextTab(Math.max(0,t.active-1),!1)):t.active=this.tabs.index(this.active):(t.active=!1,this.active=e()),this._refresh()},_refresh:function(){this._setupDisabled(this.options.disabled),this._setupEvents(this.options.event),this._setupHeightStyle(this.options.heightStyle),this.tabs.not(this.active).attr({"aria-selected":"false","aria-expanded":"false",tabIndex:-1}),this.panels.not(this._getPanelForTab(this.active)).hide().attr({"aria-hidden":"true"}),this.active.length?(this.active.addClass("ui-tabs-active ui-state-active").attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}),this._getPanelForTab(this.active).show().attr({"aria-hidden":"false"})):this.tabs.eq(0).attr("tabIndex",0)},_processTabs:function(){var t=this,i=this.tabs,n=this.anchors,s=this.panels;this.tablist=this._getList().addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").attr("role","tablist").delegate("> li","mousedown"+this.eventNamespace,function(t){e(this).is(".ui-state-disabled")&&t.preventDefault()}).delegate(".ui-tabs-anchor","focus"+this.eventNamespace,function(){e(this).closest("li").is(".ui-state-disabled")&&this.blur()}),this.tabs=this.tablist.find("> li:has(a[href])").addClass("ui-state-default ui-corner-top").attr({role:"tab",tabIndex:-1}),this.anchors=this.tabs.map(function(){return e("a",this)[0]}).addClass("ui-tabs-anchor").attr({role:"presentation",tabIndex:-1}),this.panels=e(),this.anchors.each(function(i,n){var s,o,r,a=e(n).uniqueId().attr("id"),l=e(n).closest("li"),c=l.attr("aria-controls");t._isLocal(n)?(s=n.hash,r=s.substring(1),o=t.element.find(t._sanitizeSelector(s))):(r=l.attr("aria-controls")||e({}).uniqueId()[0].id,s="#"+r,o=t.element.find(s),o.length||(o=t._createPanel(r),o.insertAfter(t.panels[i-1]||t.tablist)),o.attr("aria-live","polite")),o.length&&(t.panels=t.panels.add(o)),c&&l.data("ui-tabs-aria-controls",c),l.attr({"aria-controls":r,"aria-labelledby":a}),o.attr("aria-labelledby",a)}),this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").attr("role","tabpanel"),i&&(this._off(i.not(this.tabs)),this._off(n.not(this.anchors)),this._off(s.not(this.panels)))},_getList:function(){return this.tablist||this.element.find("ol,ul").eq(0)},_createPanel:function(t){return e("<div>").attr("id",t).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").data("ui-tabs-destroy",!0)},_setupDisabled:function(t){e.isArray(t)&&(t.length?t.length===this.anchors.length&&(t=!0):t=!1);for(var i,n=0;i=this.tabs[n];n++)!0===t||-1!==e.inArray(n,t)?e(i).addClass("ui-state-disabled").attr("aria-disabled","true"):e(i).removeClass("ui-state-disabled").removeAttr("aria-disabled");this.options.disabled=t},_setupEvents:function(t){var i={};t&&e.each(t.split(" "),function(e,t){i[t]="_eventHandler"}),this._off(this.anchors.add(this.tabs).add(this.panels)),this._on(!0,this.anchors,{click:function(e){e.preventDefault()}}),this._on(this.anchors,i),this._on(this.tabs,{keydown:"_tabKeydown"}),this._on(this.panels,{keydown:"_panelKeydown"}),this._focusable(this.tabs),this._hoverable(this.tabs)},_setupHeightStyle:function(t){var i,n=this.element.parent();"fill"===t?(i=n.height(),i-=this.element.outerHeight()-this.element.height(),this.element.siblings(":visible").each(function(){var t=e(this),n=t.css("position");"absolute"!==n&&"fixed"!==n&&(i-=t.outerHeight(!0))}),this.element.children().not(this.panels).each(function(){i-=e(this).outerHeight(!0)}),this.panels.each(function(){e(this).height(Math.max(0,i-e(this).innerHeight()+e(this).height()))}).css("overflow","auto")):"auto"===t&&(i=0,this.panels.each(function(){i=Math.max(i,e(this).height("").height())}).height(i))},_eventHandler:function(t){var i=this.options,n=this.active,s=e(t.currentTarget),o=s.closest("li"),r=o[0]===n[0],a=r&&i.collapsible,l=a?e():this._getPanelForTab(o),c=n.length?this._getPanelForTab(n):e(),u={oldTab:n,oldPanel:c,newTab:a?e():o,newPanel:l};t.preventDefault(),o.hasClass("ui-state-disabled")||o.hasClass("ui-tabs-loading")||this.running||r&&!i.collapsible||!1===this._trigger("beforeActivate",t,u)||(i.active=!a&&this.tabs.index(o),this.active=r?e():o,this.xhr&&this.xhr.abort(),c.length||l.length||e.error("jQuery UI Tabs: Mismatching fragment identifier."),l.length&&this.load(this.tabs.index(o),t),this._toggle(t,u))},_toggle:function(t,i){function n(){o.running=!1,o._trigger("activate",t,i)}function s(){i.newTab.closest("li").addClass("ui-tabs-active ui-state-active"),r.length&&o.options.show?o._show(r,o.options.show,n):(r.show(),n())}var o=this,r=i.newPanel,a=i.oldPanel;this.running=!0,a.length&&this.options.hide?this._hide(a,this.options.hide,function(){i.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),s()}):(i.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),a.hide(),s()),a.attr("aria-hidden","true"),i.oldTab.attr({"aria-selected":"false","aria-expanded":"false"}),r.length&&a.length?i.oldTab.attr("tabIndex",-1):r.length&&this.tabs.filter(function(){return 0===e(this).attr("tabIndex")}).attr("tabIndex",-1),r.attr("aria-hidden","false"),i.newTab.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0})},_activate:function(t){var i,n=this._findActive(t);n[0]!==this.active[0]&&(n.length||(n=this.active),i=n.find(".ui-tabs-anchor")[0],this._eventHandler({target:i,currentTarget:i,preventDefault:e.noop}))},_findActive:function(t){return!1===t?e():this.tabs.eq(t)},_getIndex:function(e){return"string"==typeof e&&(e=this.anchors.index(this.anchors.filter("[href$='"+e+"']"))),e},_destroy:function(){this.xhr&&this.xhr.abort(),this.element.removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible"),this.tablist.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").removeAttr("role"),this.anchors.removeClass("ui-tabs-anchor").removeAttr("role").removeAttr("tabIndex").removeUniqueId(),this.tablist.unbind(this.eventNamespace),this.tabs.add(this.panels).each(function(){e.data(this,"ui-tabs-destroy")?e(this).remove():e(this).removeClass("ui-state-default ui-state-active ui-state-disabled ui-corner-top ui-corner-bottom ui-widget-content ui-tabs-active ui-tabs-panel").removeAttr("tabIndex").removeAttr("aria-live").removeAttr("aria-busy").removeAttr("aria-selected").removeAttr("aria-labelledby").removeAttr("aria-hidden").removeAttr("aria-expanded").removeAttr("role")}),this.tabs.each(function(){var t=e(this),i=t.data("ui-tabs-aria-controls")
;i?t.attr("aria-controls",i).removeData("ui-tabs-aria-controls"):t.removeAttr("aria-controls")}),this.panels.show(),"content"!==this.options.heightStyle&&this.panels.css("height","")},enable:function(t){var i=this.options.disabled;!1!==i&&(void 0===t?i=!1:(t=this._getIndex(t),i=e.isArray(i)?e.map(i,function(e){return e!==t?e:null}):e.map(this.tabs,function(e,i){return i!==t?i:null})),this._setupDisabled(i))},disable:function(t){var i=this.options.disabled;if(!0!==i){if(void 0===t)i=!0;else{if(t=this._getIndex(t),-1!==e.inArray(t,i))return;i=e.isArray(i)?e.merge([t],i).sort():[t]}this._setupDisabled(i)}},load:function(t,i){t=this._getIndex(t);var n=this,s=this.tabs.eq(t),o=s.find(".ui-tabs-anchor"),r=this._getPanelForTab(s),a={tab:s,panel:r},l=function(e,t){"abort"===t&&n.panels.stop(!1,!0),s.removeClass("ui-tabs-loading"),r.removeAttr("aria-busy"),e===n.xhr&&delete n.xhr};this._isLocal(o[0])||(this.xhr=e.ajax(this._ajaxSettings(o,i,a)),this.xhr&&"canceled"!==this.xhr.statusText&&(s.addClass("ui-tabs-loading"),r.attr("aria-busy","true"),this.xhr.done(function(e,t,s){setTimeout(function(){r.html(e),n._trigger("load",i,a),l(s,t)},1)}).fail(function(e,t){setTimeout(function(){l(e,t)},1)})))},_ajaxSettings:function(t,i,n){var s=this;return{url:t.attr("href"),beforeSend:function(t,o){return s._trigger("beforeLoad",i,e.extend({jqXHR:t,ajaxSettings:o},n))}}},_getPanelForTab:function(t){var i=e(t).attr("aria-controls");return this.element.find(this._sanitizeSelector("#"+i))}}),e.widget("ui.tooltip",{version:"1.11.4",options:{content:function(){var t=e(this).attr("title")||"";return e("<a>").text(t).html()},hide:!0,items:"[title]:not([disabled])",position:{my:"left top+15",at:"left bottom",collision:"flipfit flip"},show:!0,tooltipClass:null,track:!1,close:null,open:null},_addDescribedBy:function(t,i){var n=(t.attr("aria-describedby")||"").split(/\s+/);n.push(i),t.data("ui-tooltip-id",i).attr("aria-describedby",e.trim(n.join(" ")))},_removeDescribedBy:function(t){var i=t.data("ui-tooltip-id"),n=(t.attr("aria-describedby")||"").split(/\s+/),s=e.inArray(i,n);-1!==s&&n.splice(s,1),t.removeData("ui-tooltip-id"),n=e.trim(n.join(" ")),n?t.attr("aria-describedby",n):t.removeAttr("aria-describedby")},_create:function(){this._on({mouseover:"open",focusin:"open"}),this.tooltips={},this.parents={},this.options.disabled&&this._disable(),this.liveRegion=e("<div>").attr({role:"log","aria-live":"assertive","aria-relevant":"additions"}).addClass("ui-helper-hidden-accessible").appendTo(this.document[0].body)},_setOption:function(t,i){var n=this;if("disabled"===t)return this[i?"_disable":"_enable"](),void(this.options[t]=i);this._super(t,i),"content"===t&&e.each(this.tooltips,function(e,t){n._updateContent(t.element)})},_disable:function(){var t=this;e.each(this.tooltips,function(i,n){var s=e.Event("blur");s.target=s.currentTarget=n.element[0],t.close(s,!0)}),this.element.find(this.options.items).addBack().each(function(){var t=e(this);t.is("[title]")&&t.data("ui-tooltip-title",t.attr("title")).removeAttr("title")})},_enable:function(){this.element.find(this.options.items).addBack().each(function(){var t=e(this);t.data("ui-tooltip-title")&&t.attr("title",t.data("ui-tooltip-title"))})},open:function(t){var i=this,n=e(t?t.target:this.element).closest(this.options.items);n.length&&!n.data("ui-tooltip-id")&&(n.attr("title")&&n.data("ui-tooltip-title",n.attr("title")),n.data("ui-tooltip-open",!0),t&&"mouseover"===t.type&&n.parents().each(function(){var t,n=e(this);n.data("ui-tooltip-open")&&(t=e.Event("blur"),t.target=t.currentTarget=this,i.close(t,!0)),n.attr("title")&&(n.uniqueId(),i.parents[this.id]={element:this,title:n.attr("title")},n.attr("title",""))}),this._registerCloseHandlers(t,n),this._updateContent(n,t))},_updateContent:function(e,t){var i,n=this.options.content,s=this,o=t?t.type:null;if("string"==typeof n)return this._open(t,e,n);(i=n.call(e[0],function(i){s._delay(function(){e.data("ui-tooltip-open")&&(t&&(t.type=o),this._open(t,e,i))})}))&&this._open(t,e,i)},_open:function(t,i,n){function s(e){c.of=e,r.is(":hidden")||r.position(c)}var o,r,a,l,c=e.extend({},this.options.position);if(n){if(o=this._find(i))return void o.tooltip.find(".ui-tooltip-content").html(n);i.is("[title]")&&(t&&"mouseover"===t.type?i.attr("title",""):i.removeAttr("title")),o=this._tooltip(i),r=o.tooltip,this._addDescribedBy(i,r.attr("id")),r.find(".ui-tooltip-content").html(n),this.liveRegion.children().hide(),n.clone?(l=n.clone(),l.removeAttr("id").find("[id]").removeAttr("id")):l=n,e("<div>").html(l).appendTo(this.liveRegion),this.options.track&&t&&/^mouse/.test(t.type)?(this._on(this.document,{mousemove:s}),s(t)):r.position(e.extend({of:i},this.options.position)),r.hide(),this._show(r,this.options.show),this.options.show&&this.options.show.delay&&(a=this.delayedShow=setInterval(function(){r.is(":visible")&&(s(c.of),clearInterval(a))},e.fx.interval)),this._trigger("open",t,{tooltip:r})}},_registerCloseHandlers:function(t,i){var n={keyup:function(t){if(t.keyCode===e.ui.keyCode.ESCAPE){var n=e.Event(t);n.currentTarget=i[0],this.close(n,!0)}}};i[0]!==this.element[0]&&(n.remove=function(){this._removeTooltip(this._find(i).tooltip)}),t&&"mouseover"!==t.type||(n.mouseleave="close"),t&&"focusin"!==t.type||(n.focusout="close"),this._on(!0,i,n)},close:function(t){var i,n=this,s=e(t?t.currentTarget:this.element),o=this._find(s);if(!o)return void s.removeData("ui-tooltip-open");i=o.tooltip,o.closing||(clearInterval(this.delayedShow),s.data("ui-tooltip-title")&&!s.attr("title")&&s.attr("title",s.data("ui-tooltip-title")),this._removeDescribedBy(s),o.hiding=!0,i.stop(!0),this._hide(i,this.options.hide,function(){n._removeTooltip(e(this))}),s.removeData("ui-tooltip-open"),this._off(s,"mouseleave focusout keyup"),s[0]!==this.element[0]&&this._off(s,"remove"),this._off(this.document,"mousemove"),t&&"mouseleave"===t.type&&e.each(this.parents,function(t,i){e(i.element).attr("title",i.title),delete n.parents[t]}),o.closing=!0,this._trigger("close",t,{tooltip:i}),o.hiding||(o.closing=!1))},_tooltip:function(t){var i=e("<div>").attr("role","tooltip").addClass("ui-tooltip ui-widget ui-corner-all ui-widget-content "+(this.options.tooltipClass||"")),n=i.uniqueId().attr("id");return e("<div>").addClass("ui-tooltip-content").appendTo(i),i.appendTo(this.document[0].body),this.tooltips[n]={element:t,tooltip:i}},_find:function(e){var t=e.data("ui-tooltip-id");return t?this.tooltips[t]:null},_removeTooltip:function(e){e.remove(),delete this.tooltips[e.attr("id")]},_destroy:function(){var t=this;e.each(this.tooltips,function(i,n){var s=e.Event("blur"),o=n.element;s.target=s.currentTarget=o[0],t.close(s,!0),e("#"+i).remove(),o.data("ui-tooltip-title")&&(o.attr("title")||o.attr("title",o.data("ui-tooltip-title")),o.removeData("ui-tooltip-title"))}),this.liveRegion.remove()}}),e);e.effects={effect:{}},function(e,t){function i(e,t,i){var n=u[t.type]||{};return null==e?i||!t.def?null:t.def:(e=n.floor?~~e:parseFloat(e),isNaN(e)?t.def:n.mod?(e+n.mod)%n.mod:0>e?0:n.max<e?n.max:e)}function n(t){var i=l(),n=i._rgba=[];return t=t.toLowerCase(),p(a,function(e,s){var o,r=s.re.exec(t),a=r&&s.parse(r),l=s.space||"rgba";if(a)return o=i[l](a),i[c[l].cache]=o[c[l].cache],n=i._rgba=o._rgba,!1}),n.length?("0,0,0,0"===n.join()&&e.extend(n,o.transparent),i):o[t]}function s(e,t,i){return i=(i+1)%1,6*i<1?e+(t-e)*i*6:2*i<1?t:3*i<2?e+(t-e)*(2/3-i)*6:e}var o,r=/^([\-+])=\s*(\d+\.?\d*)/,a=[{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(e){return[e[1],e[2],e[3],e[4]]}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(e){return[2.55*e[1],2.55*e[2],2.55*e[3],e[4]]}},{re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,parse:function(e){return[parseInt(e[1],16),parseInt(e[2],16),parseInt(e[3],16)]}},{re:/#([a-f0-9])([a-f0-9])([a-f0-9])/,parse:function(e){return[parseInt(e[1]+e[1],16),parseInt(e[2]+e[2],16),parseInt(e[3]+e[3],16)]}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(e){return[e[1],e[2]/100,e[3]/100,e[4]]}}],l=e.Color=function(t,i,n,s){return new e.Color.fn.parse(t,i,n,s)},c={rgba:{props:{red:{idx:0,type:"byte"},green:{idx:1,type:"byte"},blue:{idx:2,type:"byte"}}},hsla:{props:{hue:{idx:0,type:"degrees"},saturation:{idx:1,type:"percent"},lightness:{idx:2,type:"percent"}}}},u={byte:{floor:!0,max:255},percent:{max:1},degrees:{mod:360,floor:!0}},h=l.support={},d=e("<p>")[0],p=e.each;d.style.cssText="background-color:rgba(1,1,1,.5)",h.rgba=d.style.backgroundColor.indexOf("rgba")>-1,p(c,function(e,t){t.cache="_"+e,t.props.alpha={idx:3,type:"percent",def:1}}),l.fn=e.extend(l.prototype,{parse:function(t,s,r,a){if(void 0===t)return this._rgba=[null,null,null,null],this;(t.jquery||t.nodeType)&&(t=e(t).css(s),s=void 0);var u=this,h=e.type(t),d=this._rgba=[];return void 0!==s&&(t=[t,s,r,a],h="array"),"string"===h?this.parse(n(t)||o._default):"array"===h?(p(c.rgba.props,function(e,n){d[n.idx]=i(t[n.idx],n)}),this):"object"===h?(t instanceof l?p(c,function(e,i){t[i.cache]&&(u[i.cache]=t[i.cache].slice())}):p(c,function(n,s){var o=s.cache;p(s.props,function(e,n){if(!u[o]&&s.to){if("alpha"===e||null==t[e])return;u[o]=s.to(u._rgba)}u[o][n.idx]=i(t[e],n,!0)}),u[o]&&e.inArray(null,u[o].slice(0,3))<0&&(u[o][3]=1,s.from&&(u._rgba=s.from(u[o])))}),this):void 0},is:function(e){var t=l(e),i=!0,n=this;return p(c,function(e,s){var o,r=t[s.cache];return r&&(o=n[s.cache]||s.to&&s.to(n._rgba)||[],p(s.props,function(e,t){if(null!=r[t.idx])return i=r[t.idx]===o[t.idx]})),i}),i},_space:function(){var e=[],t=this;return p(c,function(i,n){t[n.cache]&&e.push(i)}),e.pop()},transition:function(e,t){var n=l(e),s=n._space(),o=c[s],r=0===this.alpha()?l("transparent"):this,a=r[o.cache]||o.to(r._rgba),h=a.slice();return n=n[o.cache],p(o.props,function(e,s){var o=s.idx,r=a[o],l=n[o],c=u[s.type]||{};null!==l&&(null===r?h[o]=l:(c.mod&&(l-r>c.mod/2?r+=c.mod:r-l>c.mod/2&&(r-=c.mod)),h[o]=i((l-r)*t+r,s)))}),this[s](h)},blend:function(t){if(1===this._rgba[3])return this;var i=this._rgba.slice(),n=i.pop(),s=l(t)._rgba;return l(e.map(i,function(e,t){return(1-n)*s[t]+n*e}))},toRgbaString:function(){var t="rgba(",i=e.map(this._rgba,function(e,t){return null==e?t>2?1:0:e});return 1===i[3]&&(i.pop(),t="rgb("),t+i.join()+")"},toHslaString:function(){var t="hsla(",i=e.map(this.hsla(),function(e,t){return null==e&&(e=t>2?1:0),t&&t<3&&(e=Math.round(100*e)+"%"),e});return 1===i[3]&&(i.pop(),t="hsl("),t+i.join()+")"},toHexString:function(t){var i=this._rgba.slice(),n=i.pop();return t&&i.push(~~(255*n)),"#"+e.map(i,function(e){return e=(e||0).toString(16),1===e.length?"0"+e:e}).join("")},toString:function(){return 0===this._rgba[3]?"transparent":this.toRgbaString()}}),l.fn.parse.prototype=l.fn,c.hsla.to=function(e){if(null==e[0]||null==e[1]||null==e[2])return[null,null,null,e[3]];var t,i,n=e[0]/255,s=e[1]/255,o=e[2]/255,r=e[3],a=Math.max(n,s,o),l=Math.min(n,s,o),c=a-l,u=a+l,h=.5*u;return t=l===a?0:n===a?60*(s-o)/c+360:s===a?60*(o-n)/c+120:60*(n-s)/c+240,i=0===c?0:h<=.5?c/u:c/(2-u),[Math.round(t)%360,i,h,null==r?1:r]},c.hsla.from=function(e){if(null==e[0]||null==e[1]||null==e[2])return[null,null,null,e[3]];var t=e[0]/360,i=e[1],n=e[2],o=e[3],r=n<=.5?n*(1+i):n+i-n*i,a=2*n-r;return[Math.round(255*s(a,r,t+1/3)),Math.round(255*s(a,r,t)),Math.round(255*s(a,r,t-1/3)),o]},p(c,function(t,n){var s=n.props,o=n.cache,a=n.to,c=n.from;l.fn[t]=function(t){if(a&&!this[o]&&(this[o]=a(this._rgba)),void 0===t)return this[o].slice();var n,r=e.type(t),u="array"===r||"object"===r?t:arguments,h=this[o].slice();return p(s,function(e,t){var n=u["object"===r?e:t.idx];null==n&&(n=h[t.idx]),h[t.idx]=i(n,t)}),c?(n=l(c(h)),n[o]=h,n):l(h)},p(s,function(i,n){l.fn[i]||(l.fn[i]=function(s){var o,a=e.type(s),l="alpha"===i?this._hsla?"hsla":"rgba":t,c=this[l](),u=c[n.idx];return"undefined"===a?u:("function"===a&&(s=s.call(this,u),a=e.type(s)),null==s&&n.empty?this:("string"===a&&(o=r.exec(s))&&(s=u+parseFloat(o[2])*("+"===o[1]?1:-1)),c[n.idx]=s,this[l](c)))})})}),l.hook=function(t){var i=t.split(" ");p(i,function(t,i){e.cssHooks[i]={set:function(t,s){var o,r,a="";if("transparent"!==s&&("string"!==e.type(s)||(o=n(s)))){if(s=l(o||s),!h.rgba&&1!==s._rgba[3]){for(r="backgroundColor"===i?t.parentNode:t;(""===a||"transparent"===a)&&r&&r.style;)try{a=e.css(r,"backgroundColor"),r=r.parentNode}catch(e){}s=s.blend(a&&"transparent"!==a?a:"_default")}s=s.toRgbaString()}try{t.style[i]=s}catch(e){}}},e.fx.step[i]=function(t){t.colorInit||(t.start=l(t.elem,i),t.end=l(t.end),t.colorInit=!0),e.cssHooks[i].set(t.elem,t.start.transition(t.end,t.pos))}})},l.hook("backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor"),e.cssHooks.borderColor={expand:function(e){var t={};return p(["Top","Right","Bottom","Left"],function(i,n){t["border"+n+"Color"]=e}),t}},o=e.Color.names={aqua:"#00ffff",black:"#000000",blue:"#0000ff",fuchsia:"#ff00ff",gray:"#808080",green:"#008000",lime:"#00ff00",maroon:"#800000",navy:"#000080",olive:"#808000",purple:"#800080",red:"#ff0000",silver:"#c0c0c0",teal:"#008080",white:"#ffffff",yellow:"#ffff00",transparent:[null,null,null,0],_default:"#ffffff"}}(v),function(){function t(t){var i,n,s=t.ownerDocument.defaultView?t.ownerDocument.defaultView.getComputedStyle(t,null):t.currentStyle,o={};if(s&&s.length&&s[0]&&s[s[0]])for(n=s.length;n--;)i=s[n],"string"==typeof s[i]&&(o[e.camelCase(i)]=s[i]);else for(i in s)"string"==typeof s[i]&&(o[i]=s[i]);return o}function i(t,i){var n,o,r={};for(n in i)o=i[n],t[n]!==o&&(s[n]||!e.fx.step[n]&&isNaN(parseFloat(o))||(r[n]=o));return r}var n=["add","remove","toggle"],s={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};e.each(["borderLeftStyle","borderRightStyle","borderBottomStyle","borderTopStyle"],function(t,i){e.fx.step[i]=function(e){("none"!==e.end&&!e.setAttr||1===e.pos&&!e.setAttr)&&(v.style(e.elem,i,e.end),e.setAttr=!0)}}),e.fn.addBack||(e.fn.addBack=function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}),e.effects.animateClass=function(s,o,r,a){var l=e.speed(o,r,a);return this.queue(function(){var o,r=e(this),a=r.attr("class")||"",c=l.children?r.find("*").addBack():r;c=c.map(function(){return{el:e(this),start:t(this)}}),o=function(){e.each(n,function(e,t){s[t]&&r[t+"Class"](s[t])})},o(),c=c.map(function(){return this.end=t(this.el[0]),this.diff=i(this.start,this.end),this}),r.attr("class",a),c=c.map(function(){var t=this,i=e.Deferred(),n=e.extend({},l,{queue:!1,complete:function(){i.resolve(t)}});return this.el.animate(this.diff,n),i.promise()}),e.when.apply(e,c.get()).done(function(){o(),e.each(arguments,function(){var t=this.el;e.each(this.diff,function(e){t.css(e,"")})}),l.complete.call(r[0])})})},e.fn.extend({addClass:function(t){return function(i,n,s,o){return n?e.effects.animateClass.call(this,{add:i},n,s,o):t.apply(this,arguments)}}(e.fn.addClass),removeClass:function(t){return function(i,n,s,o){return arguments.length>1?e.effects.animateClass.call(this,{remove:i},n,s,o):t.apply(this,arguments)}}(e.fn.removeClass),toggleClass:function(t){return function(i,n,s,o,r){return"boolean"==typeof n||void 0===n?s?e.effects.animateClass.call(this,n?{add:i}:{remove:i},s,o,r):t.apply(this,arguments):e.effects.animateClass.call(this,{toggle:i},n,s,o)}}(e.fn.toggleClass),switchClass:function(t,i,n,s,o){return e.effects.animateClass.call(this,{add:i,remove:t},n,s,o)}})}(),function(){function t(t,i,n,s){return e.isPlainObject(t)&&(i=t,t=t.effect),t={effect:t},null==i&&(i={}),e.isFunction(i)&&(s=i,n=null,i={}),("number"==typeof i||e.fx.speeds[i])&&(s=n,n=i,i={}),e.isFunction(n)&&(s=n,n=null),i&&e.extend(t,i),n=n||i.duration,t.duration=e.fx.off?0:"number"==typeof n?n:n in e.fx.speeds?e.fx.speeds[n]:e.fx.speeds._default,t.complete=s||i.complete,t}function i(t){return!(t&&"number"!=typeof t&&!e.fx.speeds[t])||("string"==typeof t&&!e.effects.effect[t]||(!!e.isFunction(t)||"object"==typeof t&&!t.effect))}e.extend(e.effects,{version:"1.11.4",save:function(e,t){for(var i=0;i<t.length;i++)null!==t[i]&&e.data("ui-effects-"+t[i],e[0].style[t[i]])},restore:function(e,t){var i,n;for(n=0;n<t.length;n++)null!==t[n]&&(i=e.data("ui-effects-"+t[n]),void 0===i&&(i=""),e.css(t[n],i))},setMode:function(e,t){return"toggle"===t&&(t=e.is(":hidden")?"show":"hide"),t},getBaseline:function(e,t){var i,n;switch(e[0]){case"top":i=0;break;case"middle":i=.5;break;case"bottom":i=1;break;default:i=e[0]/t.height}switch(e[1]){case"left":n=0;break;case"center":n=.5;break;case"right":n=1;break;default:n=e[1]/t.width}return{x:n,y:i}},createWrapper:function(t){if(t.parent().is(".ui-effects-wrapper"))return t.parent();var i={width:t.outerWidth(!0),height:t.outerHeight(!0),float:t.css("float")},n=e("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),s={width:t.width(),height:t.height()},o=document.activeElement;try{o.id}catch(e){o=document.body}return t.wrap(n),(t[0]===o||e.contains(t[0],o))&&e(o).focus(),n=t.parent(),"static"===t.css("position")?(n.css({position:"relative"}),t.css({position:"relative"})):(e.extend(i,{position:t.css("position"),zIndex:t.css("z-index")}),e.each(["top","left","bottom","right"],function(e,n){i[n]=t.css(n),isNaN(parseInt(i[n],10))&&(i[n]="auto")}),t.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),t.css(s),n.css(i).show()},removeWrapper:function(t){var i=document.activeElement;return t.parent().is(".ui-effects-wrapper")&&(t.parent().replaceWith(t),(t[0]===i||e.contains(t[0],i))&&e(i).focus()),t},setTransition:function(t,i,n,s){return s=s||{},e.each(i,function(e,i){var o=t.cssUnit(i);o[0]>0&&(s[i]=o[0]*n+o[1])}),s}}),e.fn.extend({effect:function(){function i(t){function i(){e.isFunction(o)&&o.call(s[0]),e.isFunction(t)&&t()}var s=e(this),o=n.complete,a=n.mode;(s.is(":hidden")?"hide"===a:"show"===a)?(s[a](),i()):r.call(s[0],n,i)}var n=t.apply(this,arguments),s=n.mode,o=n.queue,r=e.effects.effect[n.effect];return e.fx.off||!r?s?this[s](n.duration,n.complete):this.each(function(){n.complete&&n.complete.call(this)}):!1===o?this.each(i):this.queue(o||"fx",i)},show:function(e){return function(n){if(i(n))return e.apply(this,arguments);var s=t.apply(this,arguments);return s.mode="show",this.effect.call(this,s)}}(e.fn.show),hide:function(e){return function(n){if(i(n))return e.apply(this,arguments);var s=t.apply(this,arguments);return s.mode="hide",this.effect.call(this,s)}}(e.fn.hide),toggle:function(e){return function(n){if(i(n)||"boolean"==typeof n)return e.apply(this,arguments);var s=t.apply(this,arguments);return s.mode="toggle",this.effect.call(this,s)}}(e.fn.toggle),cssUnit:function(t){var i=this.css(t),n=[];return e.each(["em","px","%","pt"],function(e,t){i.indexOf(t)>0&&(n=[parseFloat(i),t])}),n}})}(),function(){var t={};e.each(["Quad","Cubic","Quart","Quint","Expo"],function(e,i){t[i]=function(t){return Math.pow(t,e+2)}}),e.extend(t,{Sine:function(e){return 1-Math.cos(e*Math.PI/2)},Circ:function(e){return 1-Math.sqrt(1-e*e)},Elastic:function(e){return 0===e||1===e?e:-Math.pow(2,8*(e-1))*Math.sin((80*(e-1)-7.5)*Math.PI/15)},Back:function(e){return e*e*(3*e-2)},Bounce:function(e){for(var t,i=4;e<((t=Math.pow(2,--i))-1)/11;);return 1/Math.pow(4,3-i)-7.5625*Math.pow((3*t-2)/22-e,2)}}),e.each(t,function(t,i){e.easing["easeIn"+t]=i,e.easing["easeOut"+t]=function(e){return 1-i(1-e)},e.easing["easeInOut"+t]=function(e){return e<.5?i(2*e)/2:1-i(-2*e+2)/2}})}();e.effects,e.effects.effect.blind=function(t,i){var n,s,o,r=e(this),a=/up|down|vertical/,l=/up|left|vertical|horizontal/,c=["position","top","bottom","left","right","height","width"],u=e.effects.setMode(r,t.mode||"hide"),h=t.direction||"up",d=a.test(h),p=d?"height":"width",f=d?"top":"left",_=l.test(h),m={},g="show"===u;r.parent().is(".ui-effects-wrapper")?e.effects.save(r.parent(),c):e.effects.save(r,c),r.show(),n=e.effects.createWrapper(r).css({overflow:"hidden"}),s=n[p](),o=parseFloat(n.css(f))||0,m[p]=g?s:0,_||(r.css(d?"bottom":"right",0).css(d?"top":"left","auto").css({position:"absolute"}),m[f]=g?o:s+o),g&&(n.css(p,0),_||n.css(f,o+s)),n.animate(m,{duration:t.duration,easing:t.easing,queue:!1,complete:function(){"hide"===u&&r.hide(),e.effects.restore(r,c),e.effects.removeWrapper(r),i()}})},e.effects.effect.bounce=function(t,i){var n,s,o,r=e(this),a=["position","top","bottom","left","right","height","width"],l=e.effects.setMode(r,t.mode||"effect"),c="hide"===l,u="show"===l,h=t.direction||"up",d=t.distance,p=t.times||5,f=2*p+(u||c?1:0),_=t.duration/f,m=t.easing,g="up"===h||"down"===h?"top":"left",v="up"===h||"left"===h,b=r.queue(),y=b.length;for((u||c)&&a.push("opacity"),e.effects.save(r,a),r.show(),e.effects.createWrapper(r),d||(d=r["top"===g?"outerHeight":"outerWidth"]()/3),u&&(o={opacity:1},o[g]=0,r.css("opacity",0).css(g,v?2*-d:2*d).animate(o,_,m)),c&&(d/=Math.pow(2,p-1)),o={},o[g]=0,n=0;n<p;n++)s={},s[g]=(v?"-=":"+=")+d,r.animate(s,_,m).animate(o,_,m),d=c?2*d:d/2;c&&(s={opacity:0},s[g]=(v?"-=":"+=")+d,r.animate(s,_,m)),r.queue(function(){c&&r.hide(),e.effects.restore(r,a),e.effects.removeWrapper(r),i()}),y>1&&b.splice.apply(b,[1,0].concat(b.splice(y,f+1))),r.dequeue()},e.effects.effect.clip=function(t,i){var n,s,o,r=e(this),a=["position","top","bottom","left","right","height","width"],l=e.effects.setMode(r,t.mode||"hide"),c="show"===l,u=t.direction||"vertical",h="vertical"===u,d=h?"height":"width",p=h?"top":"left",f={};e.effects.save(r,a),r.show(),n=e.effects.createWrapper(r).css({overflow:"hidden"}),s="IMG"===r[0].tagName?n:r,o=s[d](),c&&(s.css(d,0),s.css(p,o/2)),f[d]=c?o:0,f[p]=c?0:o/2,s.animate(f,{queue:!1,duration:t.duration,easing:t.easing,complete:function(){c||r.hide(),e.effects.restore(r,a),e.effects.removeWrapper(r),i()}})},e.effects.effect.drop=function(t,i){var n,s=e(this),o=["position","top","bottom","left","right","opacity","height","width"],r=e.effects.setMode(s,t.mode||"hide"),a="show"===r,l=t.direction||"left",c="up"===l||"down"===l?"top":"left",u="up"===l||"left"===l?"pos":"neg",h={opacity:a?1:0};e.effects.save(s,o),s.show(),e.effects.createWrapper(s),n=t.distance||s["top"===c?"outerHeight":"outerWidth"](!0)/2,a&&s.css("opacity",0).css(c,"pos"===u?-n:n),h[c]=(a?"pos"===u?"+=":"-=":"pos"===u?"-=":"+=")+n,s.animate(h,{queue:!1,duration:t.duration,easing:t.easing,complete:function(){"hide"===r&&s.hide(),e.effects.restore(s,o),e.effects.removeWrapper(s),i()}})},e.effects.effect.explode=function(t,i){function n(){b.push(this),b.length===h*d&&s()}function s(){p.css({visibility:"visible"}),e(b).remove(),_||p.hide(),i()}var o,r,a,l,c,u,h=t.pieces?Math.round(Math.sqrt(t.pieces)):3,d=h,p=e(this),f=e.effects.setMode(p,t.mode||"hide"),_="show"===f,m=p.show().css("visibility","hidden").offset(),g=Math.ceil(p.outerWidth()/d),v=Math.ceil(p.outerHeight()/h),b=[];for(o=0;o<h;o++)for(l=m.top+o*v,u=o-(h-1)/2,r=0;r<d;r++)a=m.left+r*g,c=r-(d-1)/2,p.clone().appendTo("body").wrap("<div></div>").css({position:"absolute",visibility:"visible",left:-r*g,top:-o*v}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:g,height:v,left:a+(_?c*g:0),top:l+(_?u*v:0),opacity:_?0:1}).animate({left:a+(_?0:c*g),top:l+(_?0:u*v),opacity:_?1:0},t.duration||500,t.easing,n)},e.effects.effect.fade=function(t,i){var n=e(this),s=e.effects.setMode(n,t.mode||"toggle");n.animate({opacity:s},{queue:!1,duration:t.duration,easing:t.easing,complete:i})},e.effects.effect.fold=function(t,i){var n,s,o=e(this),r=["position","top","bottom","left","right","height","width"],a=e.effects.setMode(o,t.mode||"hide"),l="show"===a,c="hide"===a,u=t.size||15,h=/([0-9]+)%/.exec(u),d=!!t.horizFirst,p=l!==d,f=p?["width","height"]:["height","width"],_=t.duration/2,m={},g={};e.effects.save(o,r),o.show(),n=e.effects.createWrapper(o).css({overflow:"hidden"}),s=p?[n.width(),n.height()]:[n.height(),n.width()],h&&(u=parseInt(h[1],10)/100*s[c?0:1]),l&&n.css(d?{height:0,width:u}:{height:u,width:0}),m[f[0]]=l?s[0]:u,g[f[1]]=l?s[1]:0,n.animate(m,_,t.easing).animate(g,_,t.easing,function(){c&&o.hide(),e.effects.restore(o,r),e.effects.removeWrapper(o),i()})},e.effects.effect.highlight=function(t,i){var n=e(this),s=["backgroundImage","backgroundColor","opacity"],o=e.effects.setMode(n,t.mode||"show"),r={backgroundColor:n.css("backgroundColor")};"hide"===o&&(r.opacity=0),e.effects.save(n,s),n.show().css({backgroundImage:"none",backgroundColor:t.color||"#ffff99"}).animate(r,{queue:!1,duration:t.duration,easing:t.easing,complete:function(){"hide"===o&&n.hide(),e.effects.restore(n,s),i()}})},e.effects.effect.size=function(t,i){var n,s,o,r=e(this),a=["position","top","bottom","left","right","width","height","overflow","opacity"],l=["position","top","bottom","left","right","overflow","opacity"],c=["width","height","overflow"],u=["fontSize"],h=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],d=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],p=e.effects.setMode(r,t.mode||"effect"),f=t.restore||"effect"!==p,_=t.scale||"both",m=t.origin||["middle","center"],g=r.css("position"),v=f?a:l,b={height:0,width:0,outerHeight:0,outerWidth:0};"show"===p&&r.show(),n={height:r.height(),width:r.width(),outerHeight:r.outerHeight(),outerWidth:r.outerWidth()},"toggle"===t.mode&&"show"===p?(r.from=t.to||b,r.to=t.from||n):(r.from=t.from||("show"===p?b:n),r.to=t.to||("hide"===p?b:n)),o={from:{y:r.from.height/n.height,x:r.from.width/n.width},to:{y:r.to.height/n.height,x:r.to.width/n.width}},"box"!==_&&"both"!==_||(o.from.y!==o.to.y&&(v=v.concat(h),r.from=e.effects.setTransition(r,h,o.from.y,r.from),r.to=e.effects.setTransition(r,h,o.to.y,r.to)),o.from.x!==o.to.x&&(v=v.concat(d),r.from=e.effects.setTransition(r,d,o.from.x,r.from),r.to=e.effects.setTransition(r,d,o.to.x,r.to))),"content"!==_&&"both"!==_||o.from.y!==o.to.y&&(v=v.concat(u).concat(c),r.from=e.effects.setTransition(r,u,o.from.y,r.from),r.to=e.effects.setTransition(r,u,o.to.y,r.to)),e.effects.save(r,v),r.show(),e.effects.createWrapper(r),r.css("overflow","hidden").css(r.from),m&&(s=e.effects.getBaseline(m,n),r.from.top=(n.outerHeight-r.outerHeight())*s.y,r.from.left=(n.outerWidth-r.outerWidth())*s.x,r.to.top=(n.outerHeight-r.to.outerHeight)*s.y,r.to.left=(n.outerWidth-r.to.outerWidth)*s.x),r.css(r.from),"content"!==_&&"both"!==_||(h=h.concat(["marginTop","marginBottom"]).concat(u),d=d.concat(["marginLeft","marginRight"]),c=a.concat(h).concat(d),r.find("*[width]").each(function(){var i=e(this),n={height:i.height(),width:i.width(),outerHeight:i.outerHeight(),outerWidth:i.outerWidth()};f&&e.effects.save(i,c),i.from={height:n.height*o.from.y,width:n.width*o.from.x,outerHeight:n.outerHeight*o.from.y,outerWidth:n.outerWidth*o.from.x},i.to={height:n.height*o.to.y,width:n.width*o.to.x,outerHeight:n.height*o.to.y,outerWidth:n.width*o.to.x},o.from.y!==o.to.y&&(i.from=e.effects.setTransition(i,h,o.from.y,i.from),i.to=e.effects.setTransition(i,h,o.to.y,i.to)),o.from.x!==o.to.x&&(i.from=e.effects.setTransition(i,d,o.from.x,i.from),i.to=e.effects.setTransition(i,d,o.to.x,i.to)),i.css(i.from),i.animate(i.to,t.duration,t.easing,function(){f&&e.effects.restore(i,c)})})),r.animate(r.to,{queue:!1,duration:t.duration,easing:t.easing,complete:function(){0===r.to.opacity&&r.css("opacity",r.from.opacity),"hide"===p&&r.hide(),e.effects.restore(r,v),f||("static"===g?r.css({position:"relative",top:r.to.top,left:r.to.left}):e.each(["top","left"],function(e,t){r.css(t,function(t,i){var n=parseInt(i,10),s=e?r.to.left:r.to.top;return"auto"===i?s+"px":n+s+"px"})})),e.effects.removeWrapper(r),i()}})},e.effects.effect.scale=function(t,i){var n=e(this),s=e.extend(!0,{},t),o=e.effects.setMode(n,t.mode||"effect"),r=parseInt(t.percent,10)||(0===parseInt(t.percent,10)?0:"hide"===o?0:100),a=t.direction||"both",l=t.origin,c={height:n.height(),width:n.width(),outerHeight:n.outerHeight(),outerWidth:n.outerWidth()},u={y:"horizontal"!==a?r/100:1,x:"vertical"!==a?r/100:1};s.effect="size",s.queue=!1,s.complete=i,"effect"!==o&&(s.origin=l||["middle","center"],s.restore=!0),s.from=t.from||("show"===o?{height:0,width:0,outerHeight:0,outerWidth:0}:c),s.to={height:c.height*u.y,width:c.width*u.x,outerHeight:c.outerHeight*u.y,outerWidth:c.outerWidth*u.x},s.fade&&("show"===o&&(s.from.opacity=0,s.to.opacity=1),"hide"===o&&(s.from.opacity=1,s.to.opacity=0)),n.effect(s)},e.effects.effect.puff=function(t,i){var n=e(this),s=e.effects.setMode(n,t.mode||"hide"),o="hide"===s,r=parseInt(t.percent,10)||150,a=r/100,l={height:n.height(),width:n.width(),outerHeight:n.outerHeight(),outerWidth:n.outerWidth()};e.extend(t,{effect:"scale",queue:!1,fade:!0,mode:s,complete:i,percent:o?r:100,from:o?l:{height:l.height*a,width:l.width*a,outerHeight:l.outerHeight*a,outerWidth:l.outerWidth*a}}),n.effect(t)},e.effects.effect.pulsate=function(t,i){var n,s=e(this),o=e.effects.setMode(s,t.mode||"show"),r="show"===o,a="hide"===o,l=r||"hide"===o,c=2*(t.times||5)+(l?1:0),u=t.duration/c,h=0,d=s.queue(),p=d.length;for(!r&&s.is(":visible")||(s.css("opacity",0).show(),h=1),n=1;n<c;n++)s.animate({opacity:h},u,t.easing),h=1-h;s.animate({opacity:h},u,t.easing),s.queue(function(){a&&s.hide(),i()}),p>1&&d.splice.apply(d,[1,0].concat(d.splice(p,c+1))),s.dequeue()},e.effects.effect.shake=function(t,i){var n,s=e(this),o=["position","top","bottom","left","right","height","width"],r=e.effects.setMode(s,t.mode||"effect"),a=t.direction||"left",l=t.distance||20,c=t.times||3,u=2*c+1,h=Math.round(t.duration/u),d="up"===a||"down"===a?"top":"left",p="up"===a||"left"===a,f={},_={},m={},g=s.queue(),v=g.length;for(e.effects.save(s,o),s.show(),e.effects.createWrapper(s),f[d]=(p?"-=":"+=")+l,_[d]=(p?"+=":"-=")+2*l,m[d]=(p?"-=":"+=")+2*l,s.animate(f,h,t.easing),n=1;n<c;n++)s.animate(_,h,t.easing).animate(m,h,t.easing);s.animate(_,h,t.easing).animate(f,h/2,t.easing).queue(function(){"hide"===r&&s.hide(),e.effects.restore(s,o),e.effects.removeWrapper(s),i()}),v>1&&g.splice.apply(g,[1,0].concat(g.splice(v,u+1))),s.dequeue()},e.effects.effect.slide=function(t,i){var n,s=e(this),o=["position","top","bottom","left","right","width","height"],r=e.effects.setMode(s,t.mode||"show"),a="show"===r,l=t.direction||"left",c="up"===l||"down"===l?"top":"left",u="up"===l||"left"===l,h={};e.effects.save(s,o),s.show(),n=t.distance||s["top"===c?"outerHeight":"outerWidth"](!0),e.effects.createWrapper(s).css({overflow:"hidden"}),a&&s.css(c,u?isNaN(n)?"-"+n:-n:n),h[c]=(a?u?"+=":"-=":u?"-=":"+=")+n,s.animate(h,{queue:!1,duration:t.duration,easing:t.easing,complete:function(){"hide"===r&&s.hide(),e.effects.restore(s,o),e.effects.removeWrapper(s),i()}})},e.effects.effect.transfer=function(t,i){var n=e(this),s=e(t.to),o="fixed"===s.css("position"),r=e("body"),a=o?r.scrollTop():0,l=o?r.scrollLeft():0,c=s.offset(),u={top:c.top-a,left:c.left-l,height:s.innerHeight(),width:s.innerWidth()},h=n.offset(),d=e("<div class='ui-effects-transfer'></div>").appendTo(document.body).addClass(t.className).css({top:h.top-a,left:h.left-l,height:n.innerHeight(),width:n.innerWidth(),position:o?"fixed":"absolute"}).animate(u,t.duration,t.easing,function(){d.remove(),i()})}}),define("js/lib/jquery.ui.popup/jquery.ui.popup",["jquery","jqueryUI"],function(jQuery){!function(window,document,$,undefined){function getScrollbarWidth(){var e=document.createElement("div");e.style.visibility="hidden",e.style.width="100px",e.style.msOverflowStyle="scrollbar",document.body.appendChild(e);var t=e.offsetWidth;e.style.overflow="scroll";var i=document.createElement("div");i.style.width="100%",e.appendChild(i);var n=i.offsetWidth;return e.parentNode.removeChild(e),t-n}$.widget("ui.popup",$.ui.dialog,{options:{autoOpen:!0,resizable:!1,minHeight:"auto",minWidth:"auto",modal:!0,closeOnOverlayClick:!0,loaderText:"",closeButton:!0,loaderClass:"",dialogClass:"",contentClass:"",buttonPaneClass:"",headerClass:"",wrapperClass:"",overlayClass:"",
draggable:!1,url:"",cache:!0,contentType:"",contentData:"",ajaxMethod:"POST",ajaxDataType:"html",ajaxSendData:"",ajaxFail:function(e){console.error("Error: can't load data via AJAX:",e)},ajaxDone:function(e,t){""!=e&&this.element.html(e)},ajaxAlways:function(){this.loaderElement.remove()}},firstCreate:!0,_create:function(){var that=this,dataOption=eval("("+this.element.attr("data-popup")+")");this.options=$.widget.extend({},this.options,dataOption),this._isCreateNewContainer()&&(this.originalElement=that.element,this.element=$("<div>")),this._isDynamicContent()&&(this.options.url=this.options.url||this.originalElement.attr("href"),this.loaderElement=$('<div class="ui-dialog__loader">'+(""!=this.options.loaderText?this.options.loaderText:"Loading...")+"</div>"),this.options.loaderClass&&this.loaderElement.addClass(this.options.loaderClass)),this._super("_create"),this._createDialogWrapper(),this.uiDialogTitle=this.uiDialogTitlebar.find(".ui-dialog-title"),this.uiDialogTitlebar.unbind("mousedown"),this.uiDialog.addClass(this.options.dialogClass),this.element.addClass(this.options.contentClass),this.uiDialogButtonPane.addClass(this.options.buttonPaneClass),this.uiDialogTitlebar.addClass(this.options.headerClass),this.uiWrapper.addClass(this.options.wrapperClass),this.reposition=this.reposition.bind(this),this.options.closeButton||this.uiDialogTitlebar.find(".ui-dialog-titlebar-close").remove()},_init:function(){var e=.8*$(window).height();this.options.height>e&&(this.options.height=e),this._super("_init")},open:function(){var e=this;!this.firstCreate&&this.options.cache||(this.firstCreate=!1,this._isDynamicContent()&&(this.element.empty(),this.loaderElement.appendTo(this.element)),"iframe"==this.options.contentType&&this._loadIframeContent(),"ajax"==this.options.contentType&&this._loadAjaxContent(),"html"==this.options.contentType&&(this.element.html(this.options.contentData),this.element.data("ui-popup__close",function(){e.close()}))),this._addBodyClass(),this.uiWrapper.show(),this._super("open"),this._resizeIframe();var t=parseInt(this.uiDialog.css("z-index"));this.uiWrapper.zIndex(t),this._isDynamicContent()&&this.loaderElement.height(this.element.height()),$(window).on("resize orientationchange",this.reposition),document.body.scrollHeight>document.body.clientHeight&&$("body").css({"padding-right":getScrollbarWidth()})},close:function(){this.options.cache||this.element.html(""),this._removeBodyClass(),this.uiWrapper.hide(),this._super("close"),$(window).off("resize orientationchange",this.reposition)},reposition:function(){this._position()},_destroy:function(){this._isCreateNewContainer()&&this.originalElement.removeData(this.widgetFullName).removeData(this.widgetName),this.uiWrapper.remove(),this._removeBodyClass(),this._super("_destroy"),this._isCreateNewContainer()&&this.element.remove()},_setOptions:function(e){this._super(e),this._resizeIframe()},_createDialogWrapper:function(){var e=this;this.options.modal?(this.uiWrapper=$("<div>").addClass("ui-dialog__wrapper").hide().appendTo($("body")),this.options.closeOnOverlayClick&&this.uiWrapper.on("click",function(t){$(this).is($(t.target))&&e.close()}),this.uiDialog.appendTo(this.uiWrapper)):this.uiWrapper=$()},_createOverlay:function(){var e=this;this._super("_createOverlay"),this.overlay.addClass(this.options.overlayClass),this.options.closeOnOverlayClick&&this.overlay.on("click",function(t){$(this).is($(t.target))&&e.close()})},_addBodyClass:function(){if(!this.document.data("ui-dialog__open"))var e=this._scrollBarWidth();this.options.modal&&(/iPhone|iPod/.test(navigator.userAgent)&&($("body").attr("top-pos",$(window).scrollTop()),$("html").addClass("ui-dialog__open_iphone")),$("body").addClass("ui-dialog__open").css({"padding-right":e})),this.document.data("ui-dialog__open",(this.document.data("ui-dialog__open")>0?this.document.data("ui-dialog__open"):0)+1)},_removeBodyClass:function(){1==this.document.data("ui-dialog__open")&&($("body").removeClass("ui-dialog__open").css({"padding-right":0}),$("html").removeClass("ui-dialog__open_iphone"),$("body").attr("top-pos")&&$(window).scrollTop($("body").attr("top-pos"))),this.document.data("ui-dialog__open",(this.document.data("ui-dialog__open")>0?this.document.data("ui-dialog__open"):1)-1)},_loadAjaxContent:function(){var e=this;this.element.addClass("ui-dialog-content_ajax"),$.ajax({url:this.options.url,type:this.options.ajaxMethod,data:this.options.ajaxSendData,dataType:this.options.ajaxDataType}).done(function(){e.options.ajaxDone.apply(e,arguments)}).fail(function(){e.options.ajaxFail.apply(e,arguments)}).always(function(){e.options.ajaxAlways.apply(e,arguments)})},_loadIframeContent:function(){var e=this;this.iframeElement=$("<iframe></iframe>"),iframeCss={"margin-left":-1*parseInt(e.element.css("padding-left")),"margin-right":-1*parseInt(e.element.css("padding-right")),"margin-top":-1*parseInt(e.element.css("padding-top")),"margin-bottom":-1*parseInt(e.element.css("padding-bottom"))},this.element.addClass("ui-dialog-content_iframe"),e.options.url+="&iframePopupMode=1",this.iframeElement.addClass("ui-dialog__iframe").attr("src",e.options.url).appendTo(e.element).css(iframeCss).hide(),this.iframeElement.on("load",function(t){e.loaderElement.remove(),e.iframeElement.height(e.element.outerHeight()).width(e.element.outerWidth()).show()})},_focusTabbable:function(){},_keepFocus:function(){},_resizeIframe:function(){this.iframeElement&&this.iframeElement.height(this.element.outerHeight()).width(this.element.outerWidth())},_scrollBarWidth:function(){var e=document.createElement("div");e.className="ui-dialog__scrollbarMeasure",$(document.body).append(e);var t=e.offsetWidth-e.clientWidth;return $(document.body)[0].removeChild(e),t},_isDynamicContent:function(){return"ajax"==this.options.contentType||"iframe"==this.options.contentType},_isCreateNewContainer:function(){return"ajax"==this.options.contentType||"iframe"==this.options.contentType||"html"==this.options.contentType},_position:function(){var e=this.uiDialog.is(":visible");e||this.uiDialog.show(),this.options.position.of=this.uiWrapper,this.uiDialog.position(this.options.position);var t=this.uiWrapper.outerHeight(),i=this.uiDialog.outerHeight(),n=0;i<t&&(n=(t-i)/2),this.uiDialog.css("top",n+"px"),this.uiWrapper.scrollTop(0),e||this.uiDialog.hide()}})}(window,document,jQuery)}),define("js/lib/jquery.tablesorter/v.2.0.5/jquery.tablesorter.min",["jquery"],function(jQuery){!function($){$.extend({tablesorter:new function(){function benchmark(e,t){log(e+","+((new Date).getTime()-t.getTime())+"ms")}function log(e){"undefined"!=typeof console&&void 0!==console.debug?console.log(e):alert(e)}function buildParserCache(e,t){if(e.config.debug)var i="";if(0!=e.tBodies.length){var n=e.tBodies[0].rows;if(n[0])for(var s=[],o=n[0].cells,r=o.length,a=0;a<r;a++){var l=!1;$.metadata&&$(t[a]).metadata()&&$(t[a]).metadata().sorter?l=getParserById($(t[a]).metadata().sorter):e.config.headers[a]&&e.config.headers[a].sorter&&(l=getParserById(e.config.headers[a].sorter)),l||(l=detectParserForColumn(e,n,-1,a)),e.config.debug&&(i+="column:"+a+" parser:"+l.id+"\n"),s.push(l)}return e.config.debug&&log(i),s}}function detectParserForColumn(e,t,i,n){for(var s=parsers.length,o=!1,r=!1,a=!0;""==r&&a;)i++,t[i]?(o=getNodeFromRowAndCellIndex(t,i,n),r=trimAndGetNodeText(e.config,o),e.config.debug&&log("Checking if value was empty on row:"+i)):a=!1;for(var l=1;l<s;l++)if(parsers[l].is(r,e,o))return parsers[l];return parsers[0]}function getNodeFromRowAndCellIndex(e,t,i){return e[t].cells[i]}function trimAndGetNodeText(e,t){return $.trim(getElementText(e,t))}function getParserById(e){for(var t=parsers.length,i=0;i<t;i++)if(parsers[i].id.toLowerCase()==e.toLowerCase())return parsers[i];return!1}function buildCache(e){if(e.config.debug)var t=new Date;for(var i=e.tBodies[0]&&e.tBodies[0].rows.length||0,n=e.tBodies[0].rows[0]&&e.tBodies[0].rows[0].cells.length||0,s=e.config.parsers,o={row:[],normalized:[]},r=0;r<i;++r){var a=$(e.tBodies[0].rows[r]),l=[];if(a.hasClass(e.config.cssChildRow))o.row[o.row.length-1]=o.row[o.row.length-1].add(a);else{o.row.push(a);for(var c=0;c<n;++c)l.push(s[c].format(getElementText(e.config,a[0].cells[c]),e,a[0].cells[c]));l.push(o.normalized.length),o.normalized.push(l),l=null}}return e.config.debug&&benchmark("Building cache for "+i+" rows:",t),o}function getElementText(e,t){return t?(e.supportsTextContent||(e.supportsTextContent=t.textContent||!1),"simple"==e.textExtraction?e.supportsTextContent?t.textContent:t.childNodes[0]&&t.childNodes[0].hasChildNodes()?t.childNodes[0].innerHTML:t.innerHTML:"function"==typeof e.textExtraction?e.textExtraction(t):$(t).text()):""}function appendToTable(e,t){if(e.config.debug)var i=new Date;for(var n=t,s=n.row,o=n.normalized,r=o.length,a=o[0].length-1,l=$(e.tBodies[0]),c=[],u=0;u<r;u++){var h=o[u][a];if(c.push(s[h]),!e.config.appender)for(var d=s[h].length,p=0;p<d;p++)l[0].appendChild(s[h][p])}e.config.appender&&e.config.appender(e,c),c=null,e.config.debug&&benchmark("Rebuilt table:",i),applyWidget(e),setTimeout(function(){$(e).trigger("sortEnd")},0)}function buildHeaders(e){if(e.config.debug)var t=new Date;var i=($.metadata,computeTableHeaderCellIndexes(e));return $tableHeaders=$(e.config.selectorHeaders,e).each(function(t){if(this.column=i[this.parentNode.rowIndex+"-"+this.cellIndex],this.order=formatSortingOrder(e.config.sortInitialOrder),this.count=this.order,(checkHeaderMetadata(this)||checkHeaderOptions(e,t))&&(this.sortDisabled=!0),checkHeaderOptionsSortingLocked(e,t)&&(this.order=this.lockedOrder=checkHeaderOptionsSortingLocked(e,t)),!this.sortDisabled){var n=$(this).addClass(e.config.cssHeader);e.config.onRenderHeader&&e.config.onRenderHeader.apply(n)}e.config.headerList[t]=this}),e.config.debug&&(benchmark("Built headers:",t),log($tableHeaders)),$tableHeaders}function computeTableHeaderCellIndexes(e){for(var t=[],i={},n=e.getElementsByTagName("THEAD")[0],s=n.getElementsByTagName("TR"),o=0;o<s.length;o++)for(var r=s[o].cells,a=0;a<r.length;a++){var l,c=r[a],u=c.parentNode.rowIndex,h=u+"-"+c.cellIndex,d=c.rowSpan||1,p=c.colSpan||1;void 0===t[u]&&(t[u]=[]);for(var f=0;f<t[u].length+1;f++)if(void 0===t[u][f]){l=f;break}i[h]=l;for(var f=u;f<u+d;f++){void 0===t[f]&&(t[f]=[]);for(var _=t[f],m=l;m<l+p;m++)_[m]="x"}}return i}function checkCellColSpan(e,t,i){for(var n=[],s=e.tHead.rows,o=s[i].cells,r=0;r<o.length;r++){var a=o[r];a.colSpan>1?n=n.concat(checkCellColSpan(e,headerArr,i++)):(1==e.tHead.length||a.rowSpan>1||!s[i+1])&&n.push(a)}return n}function checkHeaderMetadata(e){return!(!$.metadata||!1!==$(e).metadata().sorter)}function checkHeaderOptions(e,t){return!(!e.config.headers[t]||!1!==e.config.headers[t].sorter)}function checkHeaderOptionsSortingLocked(e,t){return!(!e.config.headers[t]||!e.config.headers[t].lockedOrder)&&e.config.headers[t].lockedOrder}function applyWidget(e){for(var t=e.config.widgets,i=t.length,n=0;n<i;n++)getWidgetById(t[n]).format(e)}function getWidgetById(e){for(var t=widgets.length,i=0;i<t;i++)if(widgets[i].id.toLowerCase()==e.toLowerCase())return widgets[i]}function formatSortingOrder(e){return"Number"!=typeof e?"desc"==e.toLowerCase()?1:0:1==e?1:0}function isValueInArray(e,t){for(var i=t.length,n=0;n<i;n++)if(t[n][0]==e)return!0;return!1}function setHeadersCss(e,t,i,n){t.removeClass(n[0]).removeClass(n[1]);var s=[];t.each(function(e){this.sortDisabled||(s[this.column]=$(this))});for(var o=i.length,r=0;r<o;r++)s[i[r][0]].addClass(n[i[r][1]])}function fixColumnWidth(e,t){if(e.config.widthFixed){var i=$("<colgroup>");$("tr:first td",e.tBodies[0]).each(function(){i.append($("<col>").css("width",$(this).width()))}),$(e).prepend(i)}}function updateHeaderSortCount(e,t){for(var i=e.config,n=t.length,s=0;s<n;s++){var o=t[s],r=i.headerList[o[0]];r.count=o[1],r.count++}}function multisort(table,sortList,cache){if(table.config.debug)var sortTime=new Date;for(var dynamicExp="var sortWrapper = function(a,b) {",l=sortList.length,i=0;i<l;i++){var c=sortList[i][0],order=sortList[i][1],s="text"==table.config.parsers[c].type?0==order?makeSortFunction("text","asc",c):makeSortFunction("text","desc",c):0==order?makeSortFunction("numeric","asc",c):makeSortFunction("numeric","desc",c),e="e"+i;dynamicExp+="var "+e+" = "+s,dynamicExp+="if("+e+") { return "+e+"; } ",dynamicExp+="else { "}var orgOrderCol=cache.normalized[0].length-1;dynamicExp+="return a["+orgOrderCol+"]-b["+orgOrderCol+"];";for(var i=0;i<l;i++)dynamicExp+="}; ";return dynamicExp+="return 0; ",dynamicExp+="}; ",table.config.debug&&benchmark("Evaling expression:"+dynamicExp,new Date),eval(dynamicExp),cache.normalized.sort(sortWrapper),table.config.debug&&benchmark("Sorting on "+sortList.toString()+" and dir "+order+" time:",sortTime),cache}function makeSortFunction(e,t,i){var n="a["+i+"]",s="b["+i+"]";return"text"==e&&"asc"==t?"("+n+" == "+s+" ? 0 : ("+n+" === null ? Number.POSITIVE_INFINITY : ("+s+" === null ? Number.NEGATIVE_INFINITY : ("+n+" < "+s+") ? -1 : 1 )));":"text"==e&&"desc"==t?"("+n+" == "+s+" ? 0 : ("+n+" === null ? Number.POSITIVE_INFINITY : ("+s+" === null ? Number.NEGATIVE_INFINITY : ("+s+" < "+n+") ? -1 : 1 )));":"numeric"==e&&"asc"==t?"("+n+" === null && "+s+" === null) ? 0 :("+n+" === null ? Number.POSITIVE_INFINITY : ("+s+" === null ? Number.NEGATIVE_INFINITY : "+n+" - "+s+"));":"numeric"==e&&"desc"==t?"("+n+" === null && "+s+" === null) ? 0 :("+n+" === null ? Number.POSITIVE_INFINITY : ("+s+" === null ? Number.NEGATIVE_INFINITY : "+s+" - "+n+"));":void 0}function makeSortText(e){return"((a["+e+"] < b["+e+"]) ? -1 : ((a["+e+"] > b["+e+"]) ? 1 : 0));"}function makeSortTextDesc(e){return"((b["+e+"] < a["+e+"]) ? -1 : ((b["+e+"] > a["+e+"]) ? 1 : 0));"}function makeSortNumeric(e){return"a["+e+"]-b["+e+"];"}function makeSortNumericDesc(e){return"b["+e+"]-a["+e+"];"}function sortText(e,t){return table.config.sortLocaleCompare?e.localeCompare(t):e<t?-1:e>t?1:0}function sortTextDesc(e,t){return table.config.sortLocaleCompare?t.localeCompare(e):t<e?-1:t>e?1:0}function sortNumeric(e,t){return e-t}function sortNumericDesc(e,t){return t-e}function getCachedSortType(e,t){return e[t].type}var parsers=[],widgets=[];this.defaults={cssHeader:"header",cssAsc:"headerSortUp",cssDesc:"headerSortDown",cssChildRow:"expand-child",sortInitialOrder:"asc",sortMultiSortKey:"shiftKey",sortForce:null,sortAppend:null,sortLocaleCompare:!0,textExtraction:"simple",parsers:{},widgets:[],widgetZebra:{css:["even","odd"]},headers:{},widthFixed:!1,cancelSelection:!0,sortList:[],headerList:[],dateFormat:"us",decimal:"/.|,/g",onRenderHeader:null,selectorHeaders:"thead th",debug:!1},this.benchmark=benchmark,this.construct=function(e){return this.each(function(){if(this.tHead&&this.tBodies){var t,i,n,s;this.config={},s=$.extend(this.config,$.tablesorter.defaults,e),t=$(this),$.data(this,"tablesorter",s),i=buildHeaders(this),this.config.parsers=buildParserCache(this,i),n=buildCache(this);var o=[s.cssDesc,s.cssAsc];fixColumnWidth(this),i.click(function(e){var r=t[0].tBodies[0]&&t[0].tBodies[0].rows.length||0;if(!this.sortDisabled&&r>0){t.trigger("sortStart");var a=($(this),this.column);if(this.order=this.count++%2,this.lockedOrder&&(this.order=this.lockedOrder),e[s.sortMultiSortKey])if(isValueInArray(a,s.sortList))for(var l=0;l<s.sortList.length;l++){var c=s.sortList[l],u=s.headerList[c[0]];c[0]==a&&(u.count=c[1],u.count++,c[1]=u.count%2)}else s.sortList.push([a,this.order]);else{if(s.sortList=[],null!=s.sortForce)for(var h=s.sortForce,l=0;l<h.length;l++)h[l][0]!=a&&s.sortList.push(h[l]);s.sortList.push([a,this.order])}return setTimeout(function(){setHeadersCss(t[0],i,s.sortList,o),appendToTable(t[0],multisort(t[0],s.sortList,n))},1),!1}}).mousedown(function(){if(s.cancelSelection)return this.onselectstart=function(){return!1},!1}),t.bind("update",function(){var e=this;setTimeout(function(){e.config.parsers=buildParserCache(e,i),n=buildCache(e)},1)}).bind("updateCell",function(e,t){var i=this.config,s=[t.parentNode.rowIndex-1,t.cellIndex];n.normalized[s[0]][s[1]]=i.parsers[s[1]].format(getElementText(i,t),t)}).bind("sorton",function(e,t){$(this).trigger("sortStart"),s.sortList=t;var r=s.sortList;updateHeaderSortCount(this,r),setHeadersCss(this,i,r,o),appendToTable(this,multisort(this,r,n))}).bind("appendCache",function(){appendToTable(this,n)}).bind("applyWidgetId",function(e,t){getWidgetById(t).format(this)}).bind("applyWidgets",function(){applyWidget(this)}),$.metadata&&$(this).metadata()&&$(this).metadata().sortlist&&(s.sortList=$(this).metadata().sortlist),s.sortList.length>0&&t.trigger("sorton",[s.sortList]),applyWidget(this)}})},this.addParser=function(e){for(var t=parsers.length,i=!0,n=0;n<t;n++)parsers[n].id.toLowerCase()==e.id.toLowerCase()&&(i=!1);i&&parsers.push(e)},this.addWidget=function(e){widgets.push(e)},this.formatFloat=function(e){var t=parseFloat(e);return isNaN(t)?0:t},this.formatInt=function(e){var t=parseInt(e);return isNaN(t)?0:t},this.isDigit=function(e,t){return/^[-+]?\d*$/.test($.trim(e.replace(/[,.']/g,"")))},this.clearTableBody=function(e){function t(){for(;this.firstChild;)this.removeChild(this.firstChild)}$.browser.msie?t.apply(e.tBodies[0]):e.tBodies[0].innerHTML=""}}}),$.fn.extend({tablesorter:$.tablesorter.construct});var ts=$.tablesorter;ts.addParser({id:"text",is:function(e){return!0},format:function(e){return $.trim(e.toLocaleLowerCase())},type:"text"}),ts.addParser({id:"digit",is:function(e,t){var i=t.config;return $.tablesorter.isDigit(e,i)},format:function(e){return $.tablesorter.formatFloat(e)},type:"numeric"}),ts.addParser({id:"currency",is:function(e){return/^[£$€?.]/.test(e)},format:function(e){return $.tablesorter.formatFloat(e.replace(new RegExp(/[£$€]/g),""))},type:"numeric"}),ts.addParser({id:"ipAddress",is:function(e){return/^\d{2,3}[\.]\d{2,3}[\.]\d{2,3}[\.]\d{2,3}$/.test(e)},format:function(e){for(var t=e.split("."),i="",n=t.length,s=0;s<n;s++){var o=t[s];2==o.length?i+="0"+o:i+=o}return $.tablesorter.formatFloat(i)},type:"numeric"}),ts.addParser({id:"url",is:function(e){return/^(https?|ftp|file):\/\/$/.test(e)},format:function(e){return jQuery.trim(e.replace(new RegExp(/(https?|ftp|file):\/\//),""))},type:"text"}),ts.addParser({id:"isoDate",is:function(e){return/^\d{4}[\/-]\d{1,2}[\/-]\d{1,2}$/.test(e)},format:function(e){return $.tablesorter.formatFloat(""!=e?new Date(e.replace(new RegExp(/-/g),"/")).getTime():"0")},type:"numeric"}),ts.addParser({id:"percent",is:function(e){return/\%$/.test($.trim(e))},format:function(e){return $.tablesorter.formatFloat(e.replace(new RegExp(/%/g),""))},type:"numeric"}),ts.addParser({id:"usLongDate",is:function(e){return e.match(new RegExp(/^[A-Za-z]{3,10}\.? [0-9]{1,2}, ([0-9]{4}|'?[0-9]{2}) (([0-2]?[0-9]:[0-5][0-9])|([0-1]?[0-9]:[0-5][0-9]\s(AM|PM)))$/))},format:function(e){return $.tablesorter.formatFloat(new Date(e).getTime())},type:"numeric"}),ts.addParser({id:"shortDate",is:function(e){return/\d{1,2}[\/\-]\d{1,2}[\/\-]\d{2,4}/.test(e)},format:function(e,t){var i=t.config;return e=e.replace(/\-/g,"/"),"us"==i.dateFormat?e=e.replace(/(\d{1,2})[\/\-](\d{1,2})[\/\-](\d{4})/,"$3/$1/$2"):"uk"==i.dateFormat?e=e.replace(/(\d{1,2})[\/\-](\d{1,2})[\/\-](\d{4})/,"$3/$2/$1"):"dd/mm/yy"!=i.dateFormat&&"dd-mm-yy"!=i.dateFormat||(e=e.replace(/(\d{1,2})[\/\-](\d{1,2})[\/\-](\d{2})/,"$1/$2/$3")),$.tablesorter.formatFloat(new Date(e).getTime())},type:"numeric"}),ts.addParser({id:"time",is:function(e){return/^(([0-2]?[0-9]:[0-5][0-9])|([0-1]?[0-9]:[0-5][0-9]\s(am|pm)))$/.test(e)},format:function(e){return $.tablesorter.formatFloat(new Date("2000/01/01 "+e).getTime())},type:"numeric"}),ts.addParser({id:"metadata",is:function(e){return!1},format:function(e,t,i){var n=t.config,s=n.parserMetadataName?n.parserMetadataName:"sortValue";return $(i).metadata()[s]},type:"numeric"}),ts.addWidget({id:"zebra",format:function(e){if(e.config.debug)var t=new Date;var i,n,s=-1;$("tr:visible",e.tBodies[0]).each(function(t){i=$(this),i.hasClass(e.config.cssChildRow)||s++,n=s%2==0,i.removeClass(e.config.widgetZebra.css[n?0:1]).addClass(e.config.widgetZebra.css[n?1:0])}),e.config.debug&&$.tablesorter.benchmark("Applying Zebra widget",t)}})}(jQuery)}),define("touchpunch",["jquery","jqueryUI"],function(e){!function(e){function t(e,t){if(!(e.originalEvent.touches.length>1)){e.preventDefault();var i=e.originalEvent.changedTouches[0],n=document.createEvent("MouseEvents");n.initMouseEvent(t,!0,!0,window,1,i.screenX,i.screenY,i.clientX,i.clientY,!1,!1,!1,!1,0,null),e.target.dispatchEvent(n)}}if(e.support.touch="ontouchend"in document,e.support.touch){var i,n=e.ui.mouse.prototype,s=n._mouseInit,o=n._mouseDestroy;n._touchStart=function(e){var n=this;!i&&n._mouseCapture(e.originalEvent.changedTouches[0])&&(i=!0,n._touchMoved=!1,t(e,"mouseover"),t(e,"mousemove"),t(e,"mousedown"))},n._touchMove=function(e){i&&(this._touchMoved=!0,t(e,"mousemove"))},n._touchEnd=function(e){i&&(t(e,"mouseup"),t(e,"mouseout"),this._touchMoved||t(e,"click"),i=!1)},n._mouseInit=function(){var t=this;t.element.bind({touchstart:e.proxy(t,"_touchStart"),touchmove:e.proxy(t,"_touchMove"),touchend:e.proxy(t,"_touchEnd")}),s.call(t)},n._mouseDestroy=function(){var t=this;t.element.unbind({touchstart:e.proxy(t,"_touchStart"),touchmove:e.proxy(t,"_touchMove"),touchend:e.proxy(t,"_touchEnd")}),o.call(t)}}}(e)}),define("js/lib/lightslider/dist/js/lightslider.min",["jquery"],function(e){!function(e,t){"use strict";var i={item:3,autoWidth:!1,slideMove:1,slideMargin:10,addClass:"",mode:"slide",useCSS:!0,cssEasing:"ease",easing:"linear",speed:400,auto:!1,pauseOnHover:!1,loop:!1,slideEndAnimation:!0,pause:2e3,keyPress:!1,controls:!0,prevHtml:"",nextHtml:"",rtl:!1,adaptiveHeight:!1,vertical:!1,verticalHeight:500,vThumbWidth:100,thumbItem:10,pager:!0,gallery:!1,galleryMargin:5,thumbMargin:5,currentPagerPosition:"middle",enableTouch:!0,enableDrag:!0,freeMove:!0,swipeThreshold:40,responsive:[],onBeforeStart:function(e){},onSliderLoad:function(e){},onBeforeSlide:function(e,t){},onAfterSlide:function(e,t){},onBeforeNextSlide:function(e,t){},onBeforePrevSlide:function(e,t){}};e.fn.lightSlider=function(t){if(0===this.length)return this;if(this.length>1)return this.each(function(){e(this).lightSlider(t)}),this;var n={},s=e.extend(!0,{},i,t),o={},r=this;n.$el=this,"fade"===s.mode&&(s.vertical=!1);var a=r.children(),l=e(window).width(),c=null,u=null,h=0,d=0,p=!1,f=0,_="",m=0,g=!0===s.vertical?"height":"width",v=!0===s.vertical?"margin-bottom":"margin-right",b=0,y=0,T=0,w=0,x=null,C="ontouchstart"in document.documentElement,S={};return S.chbreakpoint=function(){if(l=e(window).width(),s.responsive.length){var t;if(!1===s.autoWidth&&(t=s.item),l<s.responsive[0].breakpoint)for(var i=0;i<s.responsive.length;i++)l<s.responsive[i].breakpoint&&(c=s.responsive[i].breakpoint,u=s.responsive[i]);if(void 0!==u&&null!==u)for(var n in u.settings)u.settings.hasOwnProperty(n)&&((void 0===o[n]||null===o[n])&&(o[n]=s[n]),s[n]=u.settings[n]);if(!e.isEmptyObject(o)&&l>s.responsive[0].breakpoint)for(var r in o)o.hasOwnProperty(r)&&(s[r]=o[r]);!1===s.autoWidth&&b>0&&T>0&&t!==s.item&&(m=Math.round(b/((T+s.slideMargin)*s.slideMove)))}},S.calSW=function(){!1===s.autoWidth&&(T=(f-(s.item*s.slideMargin-s.slideMargin))/s.item)},S.calWidth=function(e){var t=!0===e?_.find(".lslide").length:a.length;if(!1===s.autoWidth)d=t*(T+s.slideMargin);else{d=0;for(var i=0;t>i;i++)d+=parseInt(a.eq(i).width())+s.slideMargin}return d},n={doCss:function(){return!(!s.useCSS||!function(){for(var e=["transition","MozTransition","WebkitTransition","OTransition","msTransition","KhtmlTransition"],t=document.documentElement,i=0;i<e.length;i++)if(e[i]in t.style)return!0}())},keyPress:function(){s.keyPress&&e(document).on("keyup.lightslider",function(t){e(":focus").is("input, textarea")||(t.preventDefault?t.preventDefault():t.returnValue=!1,37===t.keyCode?r.goToPrevSlide():39===t.keyCode&&r.goToNextSlide())})},controls:function(){s.controls&&(r.after('<div class="lSAction"><a class="lSPrev">'+s.prevHtml+'</a><a class="lSNext">'+s.nextHtml+"</a></div>"),s.autoWidth?S.calWidth(!1)<f&&_.find(".lSAction").hide():h<=s.item&&_.find(".lSAction").hide(),_.find(".lSAction a").on("click",function(t){return t.preventDefault?t.preventDefault():t.returnValue=!1,"lSPrev"===e(this).attr("class")?r.goToPrevSlide():r.goToNextSlide(),!1}))},initialStyle:function(){var e=this;"fade"===s.mode&&(s.autoWidth=!1,s.slideEndAnimation=!1),s.auto&&(s.slideEndAnimation=!1),s.autoWidth&&(s.slideMove=1,s.item=1),s.loop&&(s.slideMove=1,s.freeMove=!1),s.onBeforeStart.call(this,r),S.chbreakpoint(),r.addClass("lightSlider").wrap('<div class="lSSlideOuter '+s.addClass+'"><div class="lSSlideWrapper"></div></div>'),_=r.parent(".lSSlideWrapper"),!0===s.rtl&&_.parent().addClass("lSrtl"),s.vertical?(_.parent().addClass("vertical"),f=s.verticalHeight,_.css("height",f+"px")):f=r.outerWidth(),a.addClass("lslide"),!0===s.loop&&"slide"===s.mode&&(S.calSW(),S.clone=function(){if(S.calWidth(!0)>f){for(var t=0,i=0,n=0;n<a.length&&(t+=parseInt(r.find(".lslide").eq(n).width())+s.slideMargin,i++,!(t>=f+s.slideMargin));n++);var o=!0===s.autoWidth?i:s.item;if(o<r.find(".clone.left").length)for(var l=0;l<r.find(".clone.left").length-o;l++)a.eq(l).remove();if(o<r.find(".clone.right").length)for(var c=a.length-1;c>a.length-1-r.find(".clone.right").length;c--)m--,a.eq(c).remove();for(var u=r.find(".clone.right").length;o>u;u++)r.find(".lslide").eq(u).clone().removeClass("lslide").addClass("clone right").appendTo(r),m++;for(var h=r.find(".lslide").length-r.find(".clone.left").length;h>r.find(".lslide").length-o;h--)r.find(".lslide").eq(h-1).clone().removeClass("lslide").addClass("clone left").prependTo(r);a=r.children()}else a.hasClass("clone")&&(r.find(".clone").remove(),e.move(r,0))},S.clone()),S.sSW=function(){h=a.length,!0===s.rtl&&!1===s.vertical&&(v="margin-left"),!1===s.autoWidth&&a.css(g,T+"px"),a.css(v,s.slideMargin+"px"),d=S.calWidth(!1),r.css(g,d+"px"),!0===s.loop&&"slide"===s.mode&&!1===p&&(m=r.find(".clone.left").length)},S.calL=function(){a=r.children(),h=a.length},this.doCss()&&_.addClass("usingCss"),S.calL(),"slide"===s.mode?(S.calSW(),S.sSW(),!0===s.loop&&(b=e.slideValue(),this.move(r,b)),!1===s.vertical&&this.setHeight(r,!1)):(this.setHeight(r,!0),r.addClass("lSFade"),this.doCss()||(a.fadeOut(0),a.eq(m).fadeIn(0))),!0===s.loop&&"slide"===s.mode?a.eq(m).addClass("active"):a.first().addClass("active")},pager:function(){var e=this;if(S.createPager=function(){w=(f-(s.thumbItem*s.thumbMargin-s.thumbMargin))/s.thumbItem;var t=_.find(".lslide"),i=_.find(".lslide").length,n=0,o="",a=0;for(n=0;i>n;n++){"slide"===s.mode&&(s.autoWidth?a+=(parseInt(t.eq(n).width())+s.slideMargin)*s.slideMove:a=n*(T+s.slideMargin)*s.slideMove);var l=t.eq(n*s.slideMove).attr("data-thumb");if(o+=!0===s.gallery?'<li style="width:100%;'+g+":"+w+"px;"+v+":"+s.thumbMargin+'px"><a href="#"><img src="'+l+'" /></a></li>':'<li><a href="#">'+(n+1)+"</a></li>","slide"===s.mode&&a>=d-f-s.slideMargin){n+=1;var c=2;s.autoWidth&&(o+='<li><a href="#">'+(n+1)+"</a></li>",c=1),c>n?(o=null,_.parent().addClass("noPager")):_.parent().removeClass("noPager");break}}var u=_.parent();u.find(".lSPager").html(o),!0===s.gallery&&(!0===s.vertical&&u.find(".lSPager").css("width",s.vThumbWidth+"px"),y=n*(s.thumbMargin+w)+.5,u.find(".lSPager").css({property:y+"px","transition-duration":s.speed+"ms"}),!0===s.vertical&&_.parent().css("padding-right",s.vThumbWidth+s.galleryMargin+"px"),u.find(".lSPager").css(g,y+"px"));var h=u.find(".lSPager").find("li");h.first().addClass("active"),h.on("click",function(){return!0===s.loop&&"slide"===s.mode?m+=h.index(this)-u.find(".lSPager").find("li.active").index():m=h.index(this),r.mode(!1),!0===s.gallery&&e.slideThumb(),!1})},s.pager){var t="lSpg";s.gallery&&(t="lSGallery"),_.after('<ul class="lSPager '+t+'"></ul>');var i=s.vertical?"margin-left":"margin-top";_.parent().find(".lSPager").css(i,s.galleryMargin+"px"),S.createPager()}setTimeout(function(){S.init()},0)},setHeight:function(e,t){var i=null,n=this;i=s.loop?e.children(".lslide ").first():e.children().first();var o=function(){var n=i.outerHeight(),s=0,o=n;t&&(n=0,s=100*o/f),e.css({height:n+"px","padding-bottom":s+"%"})};o(),i.find("img").length?i.find("img")[0].complete?(o(),x||n.auto()):i.find("img").on("load",function(){setTimeout(function(){o(),x||n.auto()},100)}):x||n.auto()},active:function(e,t){this.doCss()&&"fade"===s.mode&&_.addClass("on");var i=0;if(m*s.slideMove<h){e.removeClass("active"),this.doCss()||"fade"!==s.mode||!1!==t||e.fadeOut(s.speed),i=!0===t?m:m*s.slideMove;var n,o;!0===t&&(n=e.length,o=n-1,i+1>=n&&(i=o)),!0===s.loop&&"slide"===s.mode&&(i=!0===t?m-r.find(".clone.left").length:m*s.slideMove,!0===t&&(n=e.length,o=n-1,i+1===n?i=o:i+1>n&&(i=0))),this.doCss()||"fade"!==s.mode||!1!==t||e.eq(i).fadeIn(s.speed),e.eq(i).addClass("active")}else e.removeClass("active"),e.eq(e.length-1).addClass("active"),this.doCss()||"fade"!==s.mode||!1!==t||(e.fadeOut(s.speed),e.eq(i).fadeIn(s.speed))},move:function(e,t){!0===s.rtl&&(t=-t),this.doCss()?e.css(!0===s.vertical?{transform:"translate3d(0px, "+-t+"px, 0px)","-webkit-transform":"translate3d(0px, "+-t+"px, 0px)"}:{transform:"translate3d("+-t+"px, 0px, 0px)","-webkit-transform":"translate3d("+-t+"px, 0px, 0px)"}):!0===s.vertical?e.css("position","relative").animate({top:-t+"px"},s.speed,s.easing):e.css("position","relative").animate({left:-t+"px"},s.speed,s.easing);var i=_.parent().find(".lSPager").find("li");this.active(i,!0)},fade:function(){this.active(a,!1);var e=_.parent().find(".lSPager").find("li");this.active(e,!0)},slide:function(){var e=this;S.calSlide=function(){d>f&&(b=e.slideValue(),e.active(a,!1),b>d-f-s.slideMargin?b=d-f-s.slideMargin:0>b&&(b=0),e.move(r,b),!0===s.loop&&"slide"===s.mode&&(m>=h-r.find(".clone.left").length/s.slideMove&&e.resetSlide(r.find(".clone.left").length),0===m&&e.resetSlide(_.find(".lslide").length)))},S.calSlide()},resetSlide:function(e){var t=this;_.find(".lSAction a").addClass("disabled"),setTimeout(function(){m=e,_.css("transition-duration","0ms"),b=t.slideValue(),t.active(a,!1),n.move(r,b),setTimeout(function(){_.css("transition-duration",s.speed+"ms"),_.find(".lSAction a").removeClass("disabled")},50)},s.speed+100)},slideValue:function(){var e=0;if(!1===s.autoWidth)e=m*(T+s.slideMargin)*s.slideMove;else{e=0;for(var t=0;m>t;t++)e+=parseInt(a.eq(t).width())+s.slideMargin}return e},slideThumb:function(){var e;switch(s.currentPagerPosition){case"left":e=0;break;case"middle":e=f/2-w/2;break;case"right":e=f-w}var t=m-r.find(".clone.left").length,i=_.parent().find(".lSPager");"slide"===s.mode&&!0===s.loop&&(t>=i.children().length?t=0:0>t&&(t=i.children().length));var n=t*(w+s.thumbMargin)-e;n+f>y&&(n=y-f-s.thumbMargin),0>n&&(n=0),this.move(i,n)},auto:function(){s.auto&&(clearInterval(x),x=setInterval(function(){r.goToNextSlide()},s.pause))},pauseOnHover:function(){var t=this;s.auto&&s.pauseOnHover&&(_.on("mouseenter",function(){e(this).addClass("ls-hover"),r.pause(),s.auto=!0}),_.on("mouseleave",function(){e(this).removeClass("ls-hover"),_.find(".lightSlider").hasClass("lsGrabbing")||t.auto()}))},touchMove:function(e,t){if(_.css("transition-duration","0ms"),"slide"===s.mode){var i=e-t,n=b-i;if(n>=d-f-s.slideMargin)if(!1===s.freeMove)n=d-f-s.slideMargin;else{var o=d-f-s.slideMargin;n=o+(n-o)/5}else 0>n&&(!1===s.freeMove?n=0:n/=5);this.move(r,n)}},touchEnd:function(e){if(_.css("transition-duration",s.speed+"ms"),"slide"===s.mode){var t=!1,i=!0;b-=e,b>d-f-s.slideMargin?(b=d-f-s.slideMargin,!1===s.autoWidth&&(t=!0)):0>b&&(b=0);var n=function(e){var i=0;if(t||e&&(i=1),s.autoWidth)for(var n=0,o=0;o<a.length&&(n+=parseInt(a.eq(o).width())+s.slideMargin,m=o+i,!(n>=b));o++);else{var r=b/((T+s.slideMargin)*s.slideMove);m=parseInt(r)+i,b>=d-f-s.slideMargin&&r%1!=0&&m++}};e>=s.swipeThreshold?(n(!1),i=!1):e<=-s.swipeThreshold&&(n(!0),i=!1),r.mode(i),this.slideThumb()}else e>=s.swipeThreshold?r.goToPrevSlide():e<=-s.swipeThreshold&&r.goToNextSlide()},enableDrag:function(){var t=this;if(!C){var i=0,n=0,o=!1;_.find(".lightSlider").addClass("lsGrab"),
_.on("mousedown",function(t){return!(f>d&&0!==d)&&void("lSPrev"!==e(t.target).attr("class")&&"lSNext"!==e(t.target).attr("class")&&(i=!0===s.vertical?t.pageY:t.pageX,o=!0,t.preventDefault?t.preventDefault():t.returnValue=!1,_.scrollLeft+=1,_.scrollLeft-=1,_.find(".lightSlider").removeClass("lsGrab").addClass("lsGrabbing"),clearInterval(x)))}),e(window).on("mousemove",function(e){o&&(n=!0===s.vertical?e.pageY:e.pageX,t.touchMove(n,i))}),e(window).on("mouseup",function(r){if(o){_.find(".lightSlider").removeClass("lsGrabbing").addClass("lsGrab"),o=!1,n=!0===s.vertical?r.pageY:r.pageX;var a=n-i;Math.abs(a)>=s.swipeThreshold&&e(window).on("click.ls",function(t){t.preventDefault?t.preventDefault():t.returnValue=!1,t.stopImmediatePropagation(),t.stopPropagation(),e(window).off("click.ls")}),t.touchEnd(a)}})}},enableTouch:function(){var e=this;if(C){var t={},i={};_.on("touchstart",function(e){i=e.originalEvent.targetTouches[0],t.pageX=e.originalEvent.targetTouches[0].pageX,t.pageY=e.originalEvent.targetTouches[0].pageY,clearInterval(x)}),_.on("touchmove",function(n){if(f>d&&0!==d)return!1;var o=n.originalEvent;i=o.targetTouches[0];var r=Math.abs(i.pageX-t.pageX),a=Math.abs(i.pageY-t.pageY);!0===s.vertical?(3*a>r&&n.preventDefault(),e.touchMove(i.pageY,t.pageY)):(3*r>a&&n.preventDefault(),e.touchMove(i.pageX,t.pageX))}),_.on("touchend",function(){if(f>d&&0!==d)return!1;var n;n=!0===s.vertical?i.pageY-t.pageY:i.pageX-t.pageX,e.touchEnd(n)})}},build:function(){var t=this;t.initialStyle(),this.doCss()&&(!0===s.enableTouch&&t.enableTouch(),!0===s.enableDrag&&t.enableDrag()),e(window).on("focus",function(){t.auto()}),e(window).on("blur",function(){clearInterval(x)}),t.pager(),t.pauseOnHover(),t.controls(),t.keyPress()}},n.build(),S.init=function(){S.chbreakpoint(),!0===s.vertical?(f=s.item>1?s.verticalHeight:a.outerHeight(),_.css("height",f+"px")):f=_.outerWidth(),!0===s.loop&&"slide"===s.mode&&S.clone(),S.calL(),"slide"===s.mode&&r.removeClass("lSSlide"),"slide"===s.mode&&(S.calSW(),S.sSW()),setTimeout(function(){"slide"===s.mode&&r.addClass("lSSlide")},1e3),s.pager&&S.createPager(),!0===s.adaptiveHeight&&!1===s.vertical&&r.css("height",a.eq(m).outerHeight(!0)),!1===s.adaptiveHeight&&("slide"===s.mode?!1===s.vertical?n.setHeight(r,!1):n.auto():n.setHeight(r,!0)),!0===s.gallery&&n.slideThumb(),"slide"===s.mode&&n.slide(),!1===s.autoWidth?a.length<=s.item?_.find(".lSAction").hide():_.find(".lSAction").show():S.calWidth(!1)<f&&0!==d?_.find(".lSAction").hide():_.find(".lSAction").show()},r.goToPrevSlide=function(){if(m>0)s.onBeforePrevSlide.call(this,r,m),m--,r.mode(!1),!0===s.gallery&&n.slideThumb();else if(!0===s.loop){if(s.onBeforePrevSlide.call(this,r,m),"fade"===s.mode){var e=h-1;m=parseInt(e/s.slideMove)}r.mode(!1),!0===s.gallery&&n.slideThumb()}else!0===s.slideEndAnimation&&(r.addClass("leftEnd"),setTimeout(function(){r.removeClass("leftEnd")},400))},r.goToNextSlide=function(){var e=!0;if("slide"===s.mode){e=n.slideValue()<d-f-s.slideMargin}m*s.slideMove<h-s.slideMove&&e?(s.onBeforeNextSlide.call(this,r,m),m++,r.mode(!1),!0===s.gallery&&n.slideThumb()):!0===s.loop?(s.onBeforeNextSlide.call(this,r,m),m=0,r.mode(!1),!0===s.gallery&&n.slideThumb()):!0===s.slideEndAnimation&&(r.addClass("rightEnd"),setTimeout(function(){r.removeClass("rightEnd")},400))},r.mode=function(e){!0===s.adaptiveHeight&&!1===s.vertical&&r.css("height",a.eq(m).outerHeight(!0)),!1===p&&("slide"===s.mode?n.doCss()&&(r.addClass("lSSlide"),""!==s.speed&&_.css("transition-duration",s.speed+"ms"),""!==s.cssEasing&&_.css("transition-timing-function",s.cssEasing)):n.doCss()&&(""!==s.speed&&r.css("transition-duration",s.speed+"ms"),""!==s.cssEasing&&r.css("transition-timing-function",s.cssEasing))),e||s.onBeforeSlide.call(this,r,m),"slide"===s.mode?n.slide():n.fade(),_.hasClass("ls-hover")||n.auto(),setTimeout(function(){e||s.onAfterSlide.call(this,r,m)},s.speed),p=!0},r.play=function(){r.goToNextSlide(),s.auto=!0,n.auto()},r.pause=function(){s.auto=!1,clearInterval(x)},r.refresh=function(){S.init()},r.getCurrentSlideCount=function(){var e=m;if(s.loop){var t=_.find(".lslide").length,i=r.find(".clone.left").length;e=i-1>=m?t+(m-i):m>=t+i?m-t-i:m-i}return e+1},r.getTotalSlideCount=function(){return _.find(".lslide").length},r.goToSlide=function(e){m=s.loop?e+r.find(".clone.left").length-1:e,r.mode(!1),!0===s.gallery&&n.slideThumb()},r.destroy=function(){r.lightSlider&&(r.goToPrevSlide=function(){},r.goToNextSlide=function(){},r.mode=function(){},r.play=function(){},r.pause=function(){},r.refresh=function(){},r.getCurrentSlideCount=function(){},r.getTotalSlideCount=function(){},r.goToSlide=function(){},r.lightSlider=null,S={init:function(){}},r.parent().parent().find(".lSAction, .lSPager").remove(),r.removeClass("lightSlider lSFade lSSlide lsGrab lsGrabbing leftEnd right").removeAttr("style").unwrap().unwrap(),r.children().removeAttr("style"),a.removeClass("lslide active"),r.find(".clone").remove(),a=null,x=null,p=!1,m=0)},setTimeout(function(){s.onSliderLoad.call(this,r)},10),e(window).on("resize orientationchange",function(e){setTimeout(function(){e.preventDefault?e.preventDefault():e.returnValue=!1,S.init()},200)}),this}}(e)}),define("js/bindings/common",["knockout","jquery","js/vm/Common/Cache/Cache","js/lib/md5/md5","js/vm/Common/Money","numeralJS","js/lib/jquery.currencyConverter/jquery.currencyConverter","js/lib/jquery.tooltipster/v.3.3.0/jquery.tooltipster.min","js/lib/jquery.ui.popup/jquery.ui.popup","js/lib/jquery.tablesorter/v.2.0.5/jquery.tablesorter.min","touchpunch","js/lib/lightslider/dist/js/lightslider.min","jqueryUI"],function(e,t,i,n,s){e.bindingHandlers.let={init:function(t,i,n,s,o){var r=o.extend(i);return e.applyBindingsToDescendants(r,t),{controlsDescendantBindings:!0}}},e.virtualElements.allowedBindings.let=!0,e.bindingHandlers.console={init:function(e,t,i,n,s){var o=t();o instanceof Array||(o=[o]),console.log.apply(console,o)}},e.bindingHandlers.clickSelf={init:function(t,i,n,s,o){function r(e){var n=i();"function"==typeof n&&e.target==this&&n.apply(t,[s,e])}"function"==typeof t.addEventListener?t.addEventListener("click",r):"function"==typeof t.attachEvent&&(t.attachEvent("onclick",r),e.utils.domNodeDisposal.addDisposeCallback(t,function(){t.detachEvent("onclick",r)}))}},e.bindingHandlers.tooltip={init:function(i,n,s,o,r){e.utils.domNodeDisposal.addDisposeCallback(i,function(){try{t(i).tooltipster("destroy")}catch(e){}}),t(document).on("cc:changeCurrency",function(){e.bindingHandlers.tooltip.update(i,n,s,o,r)})},update:function(e,i,n,s,o){var r=t(e),a=i();if(!a.content)return!1;a.content=a.content||"",a.trigger=a.trigger||"hover",a.header&&(a.content instanceof t&&1===a.content.length&&(a.content=a.content.html()),a.content='<div class="tooltipster-header">'+a.header+"</div>"+a.content),a.theme=a.cssClass||"",a.arrow=a.arrow||!1,a.contentAsHTML=void 0===a.contentAsHTML||a.contentAsHTML,a.offsetX=a.offsetX||0,a.offsetY=a.offsetY||0,a.position=a.position||"top",a.functionBefore=function(e,t){(!a.detectOverflow||e[0].offsetWidth<e[0].scrollWidth)&&t()},delete a.cssClass,r.data("tooltipsterNs")?r.tooltipster("content",a.content):r.tooltipster(a)}},e.bindingHandlers.money={init:function(e,t,i,n,s){},update:function(e,i,n,o,r){var a,l=t(e),c=i();c&&(a="object"!=typeof c||c instanceof s||!r.$root.controller?c:r.$root.controller.getModel("Common/Money",{amount:c.amount,currency:c.currency}),l.attr("currency",a.currency()).attr("amount",a.amount()).text(Math.ceil(a.normalizedAmount())+" "+a.currency())),l.trigger("cc:updated")}},e.bindingHandlers.spinner={init:function(i,n,s,o,r){var a=s().spinnerOptions||{};t(i).spinner(a),e.utils.registerEventHandler(i,"spinstop",function(e){if(void 0===e.keyCode){var n=t(i),s=(n.attr("room"),n.attr("passengerType")),o=n.attr("idPass"),a=t(i).spinner("value");r.$parent.setPassengersCount(s,a,o)}}),e.utils.domNodeDisposal.addDisposeCallback(i,function(){t(i).spinner("destroy")})},update:function(i,n){var s=e.utils.unwrapObservable(n()),o=t(i).spinner("value");isNaN(parseInt(s))&&alert("You have entered an Invalid Quantity"),s===o||isNaN(parseInt(s))||t(i).spinner("value",s)}},e.bindingHandlers.currencyIcon={_icons:{RUB:"fa-rub",USD:"fa-usd",EUR:"fa-eur",GBP:"fa-gbp",JPY:"fa-jpy",ILS:"fa-ils",KRW:"fa-krw",TRY:"fa-try"},init:function(i,n,s,o,r){var a=t(i),l=e.unwrap(n()),c=l&&l in e.bindingHandlers.currencyIcon._icons?l:"USD";a.removeClass(),a.addClass("fa "+e.bindingHandlers.currencyIcon._icons[c]),t(document).on("cc:changeCurrency",function(t,i){var n=c;i&&i.currency&&i.currency in e.bindingHandlers.currencyIcon._icons&&(n=i.currency),a.removeClass(),a.addClass("fa "+e.bindingHandlers.currencyIcon._icons[n])})}},e.bindingHandlers.automaticPopup={init:function(i,n,s,o,r){e.utils.domNodeDisposal.addDisposeCallback(i,function(){try{t(i).popup("destroy")}catch(e){}})},update:function(i,n,s,o,r){var a={modal:!0,draggable:!1,closeText:r.$root.i18n("common","popup_closeText"),width:"auto",height:"auto",title:"",beforeOpen:null,autoOpen:!0,close:function(){}},l=e.utils.unwrapObservable(n()),c=t(i);if("object"==typeof l){var u=t.extend({},a,l),h=c.children();u.contentType="html","function"==typeof u.beforeOpen&&u.beforeOpen(),delete u.beforeOpen;try{c.popup("destroy")}catch(e){}setTimeout(function(){u.contentData=h.show(),c.popup(u)},1)}}},e.bindingHandlers.doubleFade={update:function(i,n,s,o,r){var a=e.utils.unwrapObservable(n()),l=t(i);a?l.fadeIn(150):l.fadeOut(150)}},e.bindingHandlers.popup={init:function(i,n,s,o,r){var a={block:"",contentType:"html",modal:!0,draggable:!1,closeText:r.$root.i18n("common","popup_closeText"),width:"auto",height:"auto",title:"",parentClass:"js-nemoApp__component",onlyFirstBlock:!1,beforeOpen:null,checkPopupInParentExist:!1,close:function(){}},l=e.utils.unwrapObservable(n()),c=t(i),u="";"object"==typeof l&&void 0!==l.block&&c.on("click",function(e){e.preventDefault();var i=t.extend({},a,l),n=c.parents("."+i.parentClass);if("function"==typeof i.beforeOpen&&i.beforeOpen(),0!==n.length){if(i.checkPopupInParentExist){var s=n.find(".js-popup-"+i.block);if(s.length&&s.data("ui-popup"))return void s.popup("open")}n=n.find('.js-nemoApp__popupBlock[data-block="'+i.block+'"]'),!0===l.onlyFirstBlock&&n.length>1&&(n=n.first()),!0===l.onlyFirstBlock&&n.length>1&&(n=n.first()),u=i.block,delete i.block,delete i.beforeOpen,c.data("ui-popup")?c.popup("open"):1==n.length?(i.contentData=n.show(),c.popup(i),i.checkPopupInParentExist&&c.addClass("js-popup-"+u)):o&&o.$$controller?o.$$controller.error("Error on displaying popup. Collection length = "+n.length+' (.js-nemoApp__popupBlock[data-block="'+l.block+'"])',i):console.error("Error on displaying popup. Collection length = "+n.length+' (.js-nemoApp__popupBlock[data-block="'+l.block+'"])',i)}}),e.utils.domNodeDisposal.addDisposeCallback(i,function(){try{c.popup("destroy")}catch(e){}})},update:function(e,t,i,n,s){}},e.bindingHandlers.carrierSelectedFlightsScroller={init:function(i,n,s,o,r){function a(e){var i=t(this);setTimeout(function(){var e=t(document).scrollTop(),n=i.offset().top;i.outerHeight();e>n&&t("html,body").animate({scrollTop:n+"px"},1)},10)}t(document).on("click",".js-flights-carrierResults__leg__fareSelector",a),e.utils.domNodeDisposal.addDisposeCallback(i,function(){t(document).off("click",a)})}},e.bindingHandlers.moneyInit={init:function(e,i,n,s,o){t(document).currencyConverter({defaultCurrency:"EUR",conversionTable:i(),currencyType:"symbol",roundingFunction:Math.round,useCache:!1})}},e.bindingHandlers.customScroll={init:function(e,i,n,s,o){function r(i,n){if((u=p.height()/f.height())<1)return t(e).removeClass("js-common-scrollable_off"),v=f.height()-p.height(),n=i*n*g,a=p.scrollTop()-n,a>v?(a=v,p.scrollTop(a),h=_.height()*u,c=a*u,m.css("top",c),m.css("height",h)):a<0?(a=0,p.scrollTop(a),h=_.height()*u,c=a*u,m.css("top",c),m.css("height",h)):(p.scrollTop(a),h=_.height()*u,c=a*u,m.css("top",c),m.css("height",h)),!1;t(e).addClass("js-common-scrollable_off")}t(e).addClass("nemo-common-scrollable js-common-scrollable"),t(e).children().wrapAll("<div class='nemo-common-scrollable__content js-scrollable__content'><div class='nemo-common-scrollable__content_inner js-scrollable__content_inner'>"),t(e).append("<div class='nemo-common-scrollable__scroller js-scrollable__scroller'><div class='nemo-common-scrollable__scroller__control js-scrollable__scroller__control'></div></div>");var a,l,c,u,h,d,p=t(".js-scrollable__content"),f=t(".js-scrollable__content_inner"),_=t(e).children(".js-scrollable__scroller"),m=_.children(".js-scrollable__scroller__control"),g=.5,v=f.height()-p.height();_.on("mousedown",function(e){d=!0}),t(document).on("mouseup",function(e){d=!1}),t(e).parent().on("mousemove",function(i){if(d){var n=i.pageY-_.offset().top;return u=p.height()/f.height(),h=_.height()*u,m.css("height",h),u<1?(t(e).removeClass("js-common-scrollable_off"),v=f.height()-p.height(),l=(n-m.height()/2)/u,a=l,a>v?a=v:a<0&&(a=0),p.scrollTop(a),h=_.height()*u,c=a*u,m.css("top",c),m.css("height",h)):t(e).addClass("js-common-scrollable_off"),!1}}),_.on("click",function(i){var n=i.pageY-t(this).offset().top;return u=p.height()/f.height(),h=_.height()*u,m.css("height",h),u<1?(t(e).removeClass("js-common-scrollable_off"),v=f.height()-p.height(),l=(n-m.height()/2)/u,a=l,a>v?a=v:a<0&&(a=0),p.scrollTop(a),h=_.height()*u,c=a*u,m.css("top",c),m.css("height",h)):t(e).addClass("js-common-scrollable_off"),!1}),t(e).on("click",function(){r(1,0)}),t(window).on("resize",function(){r(1,0)}),t(e).mousewheel(function(e){return r(e.deltaY,e.deltaFactor)})}},e.bindingHandlers.pseudoSelect={init:function(i,n,s,o,r){function a(e){(!t(e.target).closest(".js-common-pseudoSelect__toggle").length||u.is(":visible")&&p)&&(u.hide(),l.removeClass("nemo-ui-select__toggle_open")),p=!0}var l=t(i),c=l.parents(".js-common-pseudoSelect"),u=c.find(".js-common-pseudoSelect__dropdown"),h=c.find(".js-common-pseudoSelect__close"),d=t.extend({},{reposition:!0,adjustWidth:!0,isDisabled:e.observable(!1)},n()||{}),p=!0;h.on("click",function(e){a(e)}),d.adjustWidth&&setTimeout(function(){u.show(),l.css("min-width",u.children().eq(0).width()+(l.outerWidth()-l.width())+"px"),u.hide()},1),l.on("click",function(i){if(e.unwrap(d.isDisabled))return!1;var n,s,o=c.find(".js-common-pseudoSelect__dropdown"),r=t(window).height(),a=t(document).scrollTop(),u=c.outerHeight();if(i.preventDefault(),!o.length)return void console.log(c);l.addClass("nemo-ui-select__toggle_open"),p=o.is(":visible"),o.css({top:"",bottom:""}).show(),d.reposition&&(n=c.offset().top,s=o.outerHeight(),n+u+s>r+a&&n>s?o.css({bottom:"100%"}):o.css({top:"100%"}))}),t(document).on("click",a),e.utils.domNodeDisposal.addDisposeCallback(i,function(){t(document).off("click",a)})}},e.bindingHandlers.toggleBlock={init:function(i,n,s,o,r){var a=t(i),l=a.parents(".js-common-toggleBlock"),c=l.find(".js-common-toggleBlock__dropdown");a.on("click",function(e){var t=l.find(".js-common-toggleBlock__dropdown");e.preventDefault(),t.is(":visible")?(t.hide(),a.removeClass("toggleBlock-open")):(t.show(),a.addClass("toggleBlock-open"))}),e.utils.domNodeDisposal.addDisposeCallback(i,function(){a.removeClass("toggleBlock-open"),c.hide()})}},e.bindingHandlers.setBodyClass={update:function(i,n,s,o,r){var a=n();"object"!=typeof a&&(a={className:a,condition:!0}),a.condition?t("body").addClass(a.className):t("body").removeClass(a.className),e.utils.domNodeDisposal.addDisposeCallback(i,function(){t("body").removeClass(a.className)})}},e.bindingHandlers.timedBlockToggle={init:function(i,n,s,o,r){var a=t(i),l=setTimeout(function(){a.toggle()},1e3*n());e.utils.domNodeDisposal.addDisposeCallback(i,function(){clearTimeout(l)})}},e.bindingHandlers.tableSorter={init:function(i,n,s,o,r){var a=t(i),l=e.utils.unwrapObservable(n);a.ready(function(){setTimeout(function(){a.tablesorter(l)},200)})}},e.bindingHandlers.debugger={init:function(e,t,i,n,s){}},e.bindingHandlers.log={init:function(e,t,i,n,s){console.debug({log:t()})}},e.bindingHandlers.loadTemplate={init:function(e,s,o,r,a){var l=i.storage(),c=t(e).prop("id"),u=a.$root.controller.options.hotelsTemplateSourceURL+"/html/partials/"+c+".html",h=n(u);if(l.has(h)){var d=l.get(h);t(e).html(d)}else t.get(u).then(function(i){t(e).html(i)},function(){console.error('Template "%s" not found!',u)})}},e.bindingHandlers.fotorama={init:function(e,i,n,s,o){t(e).fotorama({nav:"thumbs",loop:!0,data:i(),fit:"none",arrows:!0,keyboard:!0,margin:0,glimpse:0})}},e.bindingHandlers.navigate={init:function(i,n,s,o,r){t(i).on("click",function(){var t=e.unwrap(n());r.$root&&r.$root.controller&&r.$root.controller.navigate(t)})}},e.bindingHandlers.lightslider={init:function(i,n,s,o,r){var a=e.unwrap(n());if(a instanceof Array&&a.length){var l=t("<ul></ul>");a.map(function(e){l.append('<li data-thumb="'+e.thumb+'"><div class="lslideUndercover" style="background-image: url('+e.img+')"></div><div class="lslideUndercoverDarken"></div><img src="'+e.img+'"></li>')}),t(i).append(l),l.lightSlider({gallery:!0,item:1,controls:!1,loop:!1,slideMargin:0,thumbItem:a.length<12?a.length:12,adaptiveHeight:!0,responsive:[{breakpoint:1e3,settings:{thumbItem:a.length<9?a.length:9}},{breakpoint:800,settings:{thumbItem:a.length<7?a.length:7}},{breakpoint:600,settings:{thumbItem:a.length<5?a.length:5}},{breakpoint:500,settings:{thumbItem:a.length<4?a.length:4}}]})}}},e.bindingHandlers.i18n={update:function(e,i,n,s,o){var r=i(),a=o.$root.i18n,l=r.split("."),c=a(l[0],l[1]);t(e).text(c)}}}),define("js/vm/Flights/Common/Airline",["knockout","js/vm/helpers","js/vm/BaseStaticModel"],function(e,t,i){function n(e,t){i.apply(this,arguments),this.rating=Math.round(100*parseFloat(this.rating))/100,this.rating=isNaN(this.rating)?0:this.rating,this.logo||(this.logo={image:this.defaultLogo,icon:this.defaultLogo}),this.monochromeLogo||(this.monochromeLogo=this.logo),this.ratingItems=[],this.buildRatingItems()}return t.extendModel(n,[i]),n.prototype.ratingItemsCount=5,n.prototype.ratingMaximumValue=10,n.prototype.defaultLogo="/static/images/logos/nologo.gif",n.prototype.buildRatingItems=function(){for(var e=this.rating/this.ratingMaximumValue*this.ratingItemsCount,t=Math.floor(e),i=e-t,n=0;n<this.ratingItemsCount;n++)this.ratingItems.push(n<t?1:n==t?i:0)},n}),function(e){function t(){for(var e=new Date(this.toString()),t=28,i=e.getMonth();e.getMonth()==i;)++t,e.setDate(t);return t-1}e.addDays=function(e){this.setDate(this.getDate()+e)},e.addMonths=function(e){var i=this.getDate();this.setDate(1),this.setMonth(this.getMonth()+e),this.setDate(Math.min(i,t.apply(this)))},e.addYears=function(e){var i=this.getDate();this.setDate(1),this.setFullYear(this.getFullYear()+e),this.setDate(Math.min(i,t.apply(this)))},e.getDayOfYear=function(){return~~((new Date(this.getFullYear(),this.getMonth(),this.getDate(),0,0,0)-new Date(this.getFullYear(),0,0,0,0,0))/24*60*60*1e3)}}(Date.prototype),function(e){"function"==typeof define&&define.amd?define("js/lib/jquery.pickmeup/jquery.pickmeup",["jquery"],e):e("object"==typeof exports?require("jquery"):$)}(function(e){function t(){var t=e(this).data("pickmeup-options");return 2==t.calendars?~~(t.calendars/2-1):~~(t.calendars/2)}function i(){var t,i,n,o,r,a,l,c=e(this).data("pickmeup-options"),u=this.pickmeup,h=c.date,d=c.current,p=c.min?new Date(c.min):null,f=c.max?new Date(c.max):null,_=((new Date).setHours(0,0,0,0).valueOf(),c.binded.currentCalendar());p&&(p.setDate(1),p.addMonths(1),p.addDays(-1)),f&&(f.setDate(1),f.addMonths(1),f.addDays(-1)),null!=c.lastState&&(c.current=c.lastState,d=c.current),u.find(".js-nemo-pmu-instance > :not(nav)").remove();for(var m=0;m<c.calendars;m++)if(t=new Date(d),o=u.find(".js-nemo-pmu-instance").eq(m),u.hasClass("js-nemo-pmu-viewYears")?(t.addYears(12*(m-_)),i=t.getFullYear()-6+" - "+(t.getFullYear()+5)):u.hasClass("js-nemo-pmu-viewMonths")?(t.addYears(m-_),i=t.getFullYear()):u.hasClass("js-nemo-pmu-viewDays")&&(t.addMonths(m-_),i=s(t,c.monthHeaderFormat,c.locale)),!a&&f&&(l=new Date(t),c.selectDay?l.addMonths(c.calendars-1):c.selectMonth?l.addYears(c.calendars-1):l.addYears(12*(c.calendars-1)),l>f))--m,d.addMonths(-1),a=void 0;else if(a=new Date(t),!r&&(r=new Date(t),r.setDate(1),r.addMonths(1),r.addDays(-1),p&&p>r))--m,d.addMonths(1),r=void 0;else{o.find(".js-nemo-pmu-month").text(i),n="";var g=function(e){return"range"==c.mode&&e>=new Date(h[0]).getFullYear()&&e<=new Date(h[1]).getFullYear()||"multiple"==c.mode&&-1!==h.reduce(function(e,t){return e.push(new Date(t).getFullYear()),e},[]).indexOf(e)||new Date(h).getFullYear()==e},v=function(e,t){var i=new Date(h[0]).getFullYear(),n=new Date(h[1]).getFullYear(),s=new Date(h[0]).getMonth(),o=new Date(h[1]).getMonth();return"range"==c.mode&&e>i&&e<n||"range"==c.mode&&e==i&&e<n&&t>=s||"range"==c.mode&&e>i&&e==n&&t<=o||"range"==c.mode&&e==i&&e==n&&t>=s&&t<=o||"multiple"==c.mode&&-1!==h.reduce(function(e,t){return t=new Date(t),e.push(t.getFullYear()+"-"+t.getMonth()),e},[]).indexOf(e+"-"+t)||new Date(h).getFullYear()==e&&new Date(h).getMonth()==t};!function(){for(var e,i=[],s=t.getFullYear()-6,r=new Date(c.min).getFullYear(),a=new Date(c.max).getFullYear(),l=0,h=0;h<12;++h)e={text:s+h,className:["nemo-pmu-years_year"]},c.min&&e.text<r||c.max&&e.text>a?(e.className.push("nemo-pmu-disabled","js-nemo-pmu-disabled"),l++):g(e.text)&&e.className.push("nemo-pmu-selected"),e.className=e.className.join(" "),i.push(e);o.index()==u.find(".js-nemo-pmu-instance:eq("+_+")").index()&&l>=11&&(c.selectYear=!1),n+=c.tpl.body(i,"nemo-pmu-years")}(),function(){for(var e,i=[],s=t.getFullYear(),r=new Date(c.min).getFullYear(),a=new Date(c.min).getMonth(),l=new Date(c.max).getFullYear(),h=new Date(c.max).getMonth(),d=0,p=0;p<12;++p)e={text:c.locale.monthsShort[p],className:["nemo-pmu-months_month"]},c.min&&(s<r||p<a&&s==r)||c.max&&(s>l||p>h&&s>=l)?(e.className.push("nemo-pmu-disabled","js-nemo-pmu-disabled"),d++):v(s,p)&&e.className.push("nemo-pmu-selected"),e.className=e.className.join(" "),i.push(e);o.index()==u.find(".js-nemo-pmu-instance:eq("+_+")").index()&&d>=11&&(c.selectMonth=!1),n+=c.tpl.body(i,"nemo-pmu-months")}(),function(){var i,s=[],o=t.getMonth();!function(){t.setDate(1);var e=(t.getDay()-c.firstDay)%7;t.addDays(-(e+(e<0?7:0)))}();for(var r=0;r<42;++r){i={text:t.getDate(),className:["nemo-pmu-days_day"],val:"",date:[]},0==t.getDay()?i.className.push("nemo-pmu-sunday"):6==t.getDay()&&i.className.push("nemo-pmu-saturday");var a=(new Date).setHours(0,0,0,0),l=c.render(new Date(t),o)||{},u=t.valueOf(),h=c.min&&c.min>t||c.max&&c.max<t;if(i.val=u,i.date.push(t.getDate()),i.date.push(new Date(u).getMonth()),i.date.push(new Date(u).getFullYear()),l.disabled||h?i.className.push("nemo-pmu-disabled","js-nemo-pmu-disabled"):(l.selected||c.date==u||-1!==e.inArray(u,c.date)||"range"==c.mode&&u>=c.date[0]&&u<=c.date[1])&&i.className.push("nemo-pmu-selected"),o!=t.getMonth()&&(i.className.push("nemo-pmu-notInMonth"),i.className.indexOf("nemo-pmu-selected")>=0))for(var d=i.className.length-1;d>=0;d--)"nemo-pmu-selected"===i.className[d]&&i.className.splice(d,1);u==a&&i.className.push("nemo-pmu-today"),l.className&&i.className.push(l.className),i.className=i.className.join(" "),s.push(i),t.addDays(1)}n+=c.tpl.body(s,"nemo-pmu-days")}(),o.append(n)}r.setDate(1),a.setDate(1),a.addMonths(1),a.addDays(-1),c.min&&c.min>=r?u.find(".js-nemo-pmu-prev").addClass("nemo-pmu-prev_hidden js-pmu-prev_hidden"):u.find(".js-nemo-pmu-prev").removeClass("nemo-pmu-prev_hidden js-pmu-prev_hidden"),c.max&&c.max<=a?u.find(".js-nemo-pmu-next").addClass("nemo-pmu-next_hidden js-pmu-next_hidden"):u.find(".js-nemo-pmu-next").removeClass("nemo-pmu-next_hidden js-pmu-next_hidden"),c.fill.apply(this)}function n(t,i,s,o){if(t.constructor==Date)return t;if(!t)return new Date;var r=t.split(s);if(r.length>1)return r.forEach(function(t,r,a){a[r]=n(e.trim(t),i,s,o)}),r;for(var a,l,c,u,h,d=o.monthsShort.join(")(")+")("+o.months.join(")("),s=new RegExp("[^0-9a-zA-Z("+d+")]+"),p=t.split(s),f=i.split(s),_=new Date,m=0;m<p.length;m++)switch(f[m]){case"b":l=o.monthsShort.indexOf(p[m]);break;case"B":l=o.months.indexOf(p[m]);break;case"d":case"e":a=parseInt(p[m],10);break;case"m":l=parseInt(p[m],10)-1;break;case"Y":case"y":c=parseInt(p[m],10),c+=c>100?0:c<29?2e3:1900;break;case"H":case"I":case"k":case"l":u=parseInt(p[m],10);break;case"P":case"p":/pm/i.test(p[m])&&u<12?u+=12:/am/i.test(p[m])&&u>=12&&(u-=12);break;case"M":h=parseInt(p[m],10)}var g=new Date(void 0===c?_.getFullYear():c,void 0===l?_.getMonth():l,void 0===a?_.getDate():a,void 0===u?_.getHours():u,void 0===h?_.getMinutes():h,0);return isNaN(1*g)&&(g=new Date),g}function s(e,t,i){var n=e.getMonth(),s=e.getDate(),o=e.getFullYear(),r=e.getDay(),a=e.getHours(),l=a>=12,c=l?a-12:a,u=e.getDayOfYear();0==c&&(c=12);for(var h,d=e.getMinutes(),p=e.getSeconds(),f=t.split(""),_=0;_<f.length;_++){switch(h=f[_]){case"a":h=i.daysShort[r];break;case"A":h=i.days[r];break;case"b":h=i.monthsShort[n];break;case"B":h=i.months[n];break;case"C":h=1+~~(o/100);break;case"d":h=s<10?"0"+s:s;break;case"e":h=s;break;case"H":h=a<10?"0"+a:a;break;case"I":h=c<10?"0"+c:c;break;case"j":h=u<100?u<10?"00"+u:"0"+u:u;break;case"k":h=a;break;case"l":h=c;break;case"m":h=n<9?"0"+(1+n):1+n;break;case"M":h=d<10?"0"+d:d;break;case"p":case"P":h=l?"PM":"AM";break;case"s":h=~~(e.getTime()/1e3);break;case"S":h=p<10?"0"+p:p;break;case"u":h=r+1;break;case"w":h=r;break;case"y":h=(""+o).substr(2,2);break;case"Y":h=o}f[_]=h}return f.join("")}function o(){var t,i=e(this),n=i.data("pickmeup-options"),s=n.current;switch(n.mode){case"multiple":t=s.setHours(0,0,0,0).valueOf(),-1!==e.inArray(t,n.date)?e.each(n.date,function(e,i){return i!=t||(n.date.splice(e,1),!1)}):n.date.push(t);break;case"range":n.lastSel||(n.date[0]=s.setHours(0,0,0,0).valueOf()),t=s.setHours(0,0,0,0).valueOf(),t<=n.date[0]?(n.date[1]=n.date[0],n.date[0]=t):n.date[1]=t,n.lastSel=!n.lastSel;break;default:n.date=s.valueOf()}var o=a(n);if(i.is("input"))if(o[0].length>0&&o[0][0]==o[0][1]&&"range"==n.mode){var r=o[0][0];i.val(r)}else i.val("single"==n.mode?o[0]:o[0].join(n.separator));if(n.change.apply(this,o),!n.flat&&n.hideOnSelect&&("range"!=n.mode||!n.lastSel))return n.binded.hide(),!1}function r(t){var i=e(t.target);if(i.hasClass("js-nemo-pmu-button")||(i=i.closest(".js-nemo-pmu-button")),i.length){if(i.hasClass("js-nemo-pmu-disabled"))return!1;var n=e(this),s=n.data("pickmeup-options"),o=i.parents(".js-nemo-pmu-instance").eq(0),r=o.parent(),a=e(".js-nemo-pmu-instance",r).index(o),l=this.pickmeup;if(i.parent().is("nav"))i.hasClass("js-nemo-pmu-month")?(s.current.addMonths(a-s.binded.currentCalendar()),r.hasClass("js-nemo-pmu-viewYears")?("single"!=s.mode?s.current=new Date(s.date[s.date.length-1]):s.current=new Date(s.date),s.selectDay?(r.removeClass("js-nemo-pmu-viewYears").addClass("js-nemo-pmu-viewDays"),r.removeClass("nemo-pmu-viewYears").addClass("nemo-pmu-viewDays")):s.selectMonth&&(r.removeClass("js-nemo-pmu-viewYears").addClass("js-nemo-pmu-viewMonths"),r.removeClass("nemo-pmu-viewYears").addClass("nemo-pmu-viewMonths"))):r.hasClass("js-nemo-pmu-viewMonths")?s.selectYear?(r.removeClass("js-nemo-pmu-viewMonths").addClass("js-nemo-pmu-viewYears"),r.removeClass("nemo-pmu-viewMonths").addClass("nemo-pmu-viewYears")):s.selectDay&&(r.removeClass("js-nemo-pmu-viewMonths").addClass("js-nemo-pmu-viewDays"),r.removeClass("nemo-pmu-viewMonths").addClass("nemo-pmu-viewDays")):r.hasClass("js-nemo-pmu-viewDays")&&(s.selectMonth?(r.removeClass("js-nemo-pmu-viewDays").addClass("js-nemo-pmu-viewMonths"),r.removeClass("nemo-pmu-viewDays").addClass("nemo-pmu-viewMonths")):s.selectYear&&(r.removeClass("js-nemo-pmu-viewDays").addClass("js-nemo-pmu-viewYears"),r.removeClass("nemo-pmu-viewDays").addClass("nemo-pmu-viewYears")))):i.hasClass("js-nemo-pmu-prev")?s.binded.prev(!1):s.binded.next(!1);else if(!i.hasClass("nemo-pmu-disabled"))if(r.hasClass("js-nemo-pmu-viewYears"))s.current.setFullYear(parseInt(i.text(),10)),s.selectMonth?(r.removeClass("js-nemo-pmu-viewYears").addClass("js-nemo-pmu-viewMonths"),r.removeClass("nemo-pmu-viewYears").addClass("nemo-pmu-viewMonths")):s.selectDay?(r.removeClass("js-nemo-pmu-viewYears").addClass("js-nemo-pmu-viewDays"),r.removeClass("nemo-pmu-viewYears").addClass("nemo-pmu-viewDays")):s.binded.update_date(),s.onSetYear();else if(r.hasClass("js-nemo-pmu-viewMonths"))s.current.setMonth(o.find(".js-nemo-pmu-months .js-nemo-pmu-button").index(i)),s.current.setFullYear(parseInt(o.find(".js-nemo-pmu-month").text(),10)),s.selectDay?(r.removeClass("js-nemo-pmu-viewMonths").addClass("js-nemo-pmu-viewDays"),r.removeClass("nemo-pmu-viewMonths").addClass("nemo-pmu-viewDays")):s.binded.update_date(),s.current.addMonths(s.binded.currentCalendar()-a),s.onSetMonth();else{var c=parseInt(i.text(),10);s.current.addMonths(a-s.binded.currentCalendar()),i.hasClass("nemo-pmu-notInMonth")&&s.current.addMonths(c>15?-1:1);var u=new Date(i.data("year"),i.data("month"),i.data("day"));"single"==s.mode?s.current=u:(s.current.setDate(c),s.binded.update_date());var h=l.find(".nemo-pmu-days_day").eq(15),d=new Date(h.data("year"),h.data("month"),h.data("day"));"single"==s.mode&&(s.lastState=d,s.current=u),s.onSetDate()}s.binded.fill()}return i}function a(t){var i;return"single"==t.mode?(i=new Date(t.date),[s(i,t.format,t.locale),i]):(i=[[],[]],e.each(t.date,function(e,n){var o=new Date(n);i[0].push(s(o,t.format,t.locale)),i[1].push(o)}),i)}function l(t){var i=this.pickmeup;if(t||!i.is(":visible")){var s,o=e(this),r=o.data("pickmeup-options"),a=o.offset(),l={l:document.documentElement.scrollLeft,t:document.documentElement.scrollTop,w:document.documentElement.clientWidth,h:document.documentElement.clientHeight},c=a.top,u=a.left;r.binded.fill();var h=o.pickmeup().format;if(h=h.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&").replace(/[dD]+/,"[0-9]{1,2}").replace(/[mM]+/,"[0-9]{1,2}").replace(/[yY]+/,"[0-9]{4}"),o.is("input")){var d,p;s=o.outerWidth();var f=new RegExp(h,"i");o.pickmeup("set_date",n(o.val()?o.val():r.defaultDate,r.format,r.separator,r.locale)).on("click",function(){d=r.current}).on("keyup",function(e){p=o.val();var t=n(o.val(),r.format,r.separator,r.locale);if(13==e.keyCode){if(t.getTime()>=r.min.getTime()&&t.getTime()<=r.max.getTime())return r.current=t,o.pickmeup("set_date",t),r.onSetDate(),!1}else if(27==e.keyCode)o.pickmeup("hide"),o.pickmeup("set_date",r.current);else if(null!=o.val().match(f)&&"range"!=r.mode&&"multiple"!=r.mode)return("null"!=r.min&&t.getTime()>=r.min.getTime()||"null"!=r.max&&t.getTime()<=r.max.getTime())&&o.pickmeup("set_date",t),!1}).on("blur",function(){o.pickmeup("hide")}),r.lastSel=!1}if(r.beforeShow(),0==r.show())return;var _=i.find(".js-nemo-pmu-instance:eq(0)").width(),m=i.outerWidth(),g=m/2-s/2;if(!r.flat){if("function"==typeof r.position)r.position.call(o,i,r,a,l);else{switch(r.position){case"top":c-=i.outerHeight();break;case"left":u-=i.outerWidth();break;case"right":u+=this.offsetWidth;break;case"bottom":c+=this.offsetHeight}c+i.offsetHeight>l.t+l.h&&(c=a.top-i.offsetHeight),c<l.t&&(c=a.top+this.offsetHeight+i.offsetHeight),u+i.offsetWidth>l.l+l.w&&(u=a.left-i.offsetWidth),u<l.l&&(u=a.left+this.offsetWidth),(m+u-g>=l.w||g>u)&&(g=0),m<l.w&&m+u-g>=l.w+20?(i.removeClass("nemo-pmu-thinView"),i.css({display:"inline-block",top:c+"px",right:"20px"})):m>=l.w&&_+u-g<=l.w?(i.addClass("nemo-pmu-thinView"),i.css({display:"inline-block",top:c+"px",right:"auto",left:u})):m>=l.w&&_+u-g>=l.w?(i.addClass("nemo-pmu-thinView"),i.css({display:"inline-block",top:c+"px",right:0})):(i.removeClass("nemo-pmu-thinView"),i.css({display:"inline-block",top:c+"px",left:u-g+"px",right:"auto"}))}e(document).on("mousedown"+r.events_namespace+"touch"+r.events_namespace+"blur"+r.events_namespace,r.binded.hide).on("resize"+r.events_namespace,[!0],r.binded.forced_show)}r.isDisplaying=!0}}function c(){l.call(this,!0)}function u(t){if(!t||!t.target||t.target!=this&&!(16&this.pickmeup.get(0).compareDocumentPosition(t.target))){var i=this.pickmeup,s=e(this).data("pickmeup-options");e(this);if(0!=s.hide()&&(i.hide(),
e(document).off("mousedown touchstart focus",s.binded.hide).off("resize",s.binded.forced_show),s.lastSel=!1),e(this).is("input")&&e(this).val().length>0){var o=n(e(this).val(),s.format,s.separator,s.locale);if(o.getTime()>=s.min.getTime()&&o.getTime()<=s.max.getTime())return e(this).pickmeup("set_date",s.current),s.onSetDate(),!1}s.isDisplaying=!1}}function h(t){var i=e(this).data("pickmeup-options");t&&Object==typeof t&&e.extend(i,t),e(document).off("mousedown",i.binded.hide).off("resize",i.binded.forced_show),i.binded.forced_show()}function d(){var t=e(this).data("pickmeup-options");"single"!=t.mode&&(t.date=[],t.lastSel=!1)}function p(t){void 0===t&&(t=!0);var i=this.pickmeup,n=e(this).data("pickmeup-options");i.hasClass("nemo-pmu-viewYears")?n.current.addYears(-12):i.hasClass("nemo-pmu-viewMonths")?n.current.addYears(-1):i.hasClass("nemo-pmu-viewDays")&&n.current.addMonths(-1),t&&n.binded.fill()}function f(t){void 0===t&&(t=!0);var i=this.pickmeup,n=e(this).data("pickmeup-options");i.hasClass("nemo-pmu-viewYears")?n.current.addYears(12):i.hasClass("nemo-pmu-viewMonths")?n.current.addYears(1):i.hasClass("nemo-pmu-viewDays")&&n.current.addMonths(1),t&&n.binded.fill()}function _(t){var i=e(this).data("pickmeup-options"),n=a(i);if("string"==typeof t&&"element"!=t){var o=n[1];return o.constructor==Date?s(o,t,i.locale):o.map(function(e){return s(e,t,i.locale)})}return n[t?0:1]}function m(t){var i=e(this),s=i.data("pickmeup-options");this.pickmeup;if(s.date=t,"string"==typeof s.date?s.date=n(s.date,s.format,s.separator,s.locale).setHours(0,0,0,0):s.date.constructor==Date&&s.date.setHours(0,0,0,0),s.date||(s.date=new Date,s.date.setHours(0,0,0,0)),"single"!=s.mode)if(s.date.constructor!=Array)s.date=[s.date.valueOf()],"range"==s.mode&&s.date.push(new Date(s.date[0]).setHours(0,0,0,0).valueOf());else{for(var o=0;o<s.date.length;o++)s.date[o]=n(s.date[o],s.format,s.separator,s.locale).setHours(0,0,0,0).valueOf();"range"==s.mode&&(s.date[1]=new Date(s.date[1]).setHours(0,0,0,0).valueOf())}else(i.val()||!1!==s.defaultDate)&&(s.date=s.date.constructor==Array?s.date[0].valueOf():s.date.valueOf());s.current=new Date("single"!=s.mode?s.date[0]:s.date),s.binded.fill()}function g(){var t=e(this),i=t.data("pickmeup-options");t.removeData("pickmeup-options"),t.off(i.events_namespace),e(document).off(i.events_namespace),e(this.pickmeup).remove()}function v(){return e(this.pickmeup).find(".nemo-pmu-days_day.nemo-pmu-selected")}function b(t){var i=e(this).data("pickmeup-options");if("number"==typeof t)return e(this.pickmeup).find('.nemo-pmu-days_day[data-date="'+t+'"]');if("string"==typeof t){var s=n(t,i.format,i.separator,i.locale).setHours(0,0,0,0);return e(this.pickmeup).find('.nemo-pmu-days_day[data-date="'+s+'"]')}if(t.constructor!=Array()){var o=[];for(var r in t)o.push(e(this.pickmeup).find('.nemo-pmu-days_day[data-date="'+t[r]+'"]'));return o}return!1}var y=0;e.pickmeup=e.extend(e.pickmeup||{},{date:new Date,defaultDate:new Date,flat:!1,firstDay:1,prev:"&#10094;",next:"&#10095;",mode:"single",selectYear:!0,selectMonth:!0,selectDay:!0,view:"days",calendars:1,format:"d-m-Y",monthHeaderFormat:"B, Y",position:"bottom",triggerEvent:"click focus",className:"",separator:" - ",hideOnSelect:!0,isDisplaying:!1,min:null,max:null,lastState:null,render:function(){},change:function(){return!0},beforeShow:function(){return!0},show:function(){return!0},hide:function(){return!0},fill:function(){return!0},onSetDate:function(){return!0},onSetMonth:function(){return!0},onSetYear:function(){return!0},locale:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],daysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sun"],daysMin:["Su","Mo","Tu","We","Th","Fr","Sa","Su"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]},views:{years:"js-nemo-pmu-viewYears nemo-pmu-viewYears",months:"js-nemo-pmu-viewMonths nemo-pmu-viewMonths",days:"js-nemo-pmu-viewDays nemo-pmu-viewDays"},tpl:{wrapper:'<div class="nemo-pmu-wrapper js-nemo-pmu" />',head:function(e){for(var t="",i=0;i<7;++i)t+='<div class="nemo-pmu-dayOfWeek nemo-pmu-dayOfWeek_'+i+'">'+e.day[i]+"</div>";return'<div class="js-nemo-pmu-instance nemo-pmu-instance"><nav class="nemo-pmu-monthHeader"><div class="js-nemo-pmu-prev nemo-pmu-prev js-nemo-pmu-button nemo-pmu-button">'+e.prev+'</div><div class="js-nemo-pmu-month nemo-pmu-month js-nemo-pmu-button nemo-pmu-button" /><div class="js-nemo-pmu-next nemo-pmu-next js-nemo-pmu-button nemo-pmu-button">'+e.next+'</div></nav><nav class="nemo-pmu-daysOfWeek">'+t+"</nav></div>"},body:function(e,t){for(var i="",n=0;n<e.length;++n)i+="<div ",void 0!==e[n].val&&(i+='data-day="'+e[n].date[0]+'"data-month="'+e[n].date[1]+'"data-year="'+e[n].date[2]+'"data-date="'+e[n].val+'" '),i+='class="'+e[n].className+' js-nemo-pmu-button nemo-pmu-button">'+e[n].text+"</div>";return'<div class="'+t+'Wrap"><div class="'+t+" js-"+t+'">'+i+"</div></div>"}}}),e.fn.pickmeup=function(s){var a={};if("string"==typeof s){var T,w=Array.prototype.slice.call(arguments,1);switch(s){case"getDateElementSelected":if(T=e(this).data("pickmeup-options"))var x=T.binded[s]();return x;case"getDateElementCustom":if(T=e(this).data("pickmeup-options"))var x=T.binded[s](w[0]);return x;case"hide":case"show":case"clear":case"update":case"prev":case"next":case"destroy":this.each(function(){(T=e(this).data("pickmeup-options"))&&T.binded[s]()});break;case"get_date":return T=this.data("pickmeup-options"),T?T.binded.get_date(w[0]):null;case"set_date":this.each(function(){(T=e(this).data("pickmeup-options"))&&T.binded[s].apply(this,w)})}return this}if("object"==typeof s)a=s;else if(void 0===s)return this.data("pickmeup-options");return this.each(function(){var T,w=e(this);T=w.data("pickmeup-options")&&"object"==typeof s?e.extend({},w.data("pickmeup-options"),a):e.extend({},e.pickmeup,a),e(this).pickmeup("destroy");var x,C;for(x in T)void 0!==(C=w.data("nemo-pmu-"+x))&&(T[x]=C);if("days"!=T.view||T.selectDay||(T.view="months"),"months"!=T.view||T.selectMonth||(T.view="years"),"years"!=T.view||T.selectYear||(T.view="days"),"days"!=T.view||T.selectDay||(T.view="months"),T.calendars=Math.max(1,parseInt(T.calendars,10)||1),T.mode=/single|multiple|range/.test(T.mode)?T.mode:"single","string"==typeof T.min?T.min=n(T.min,T.format,T.separator,T.locale).setHours(0,0,0,0):T.min&&T.min.constructor==Date&&T.min.setHours(0,0,0,0),"string"==typeof T.max?T.max=n(T.max,T.format,T.separator,T.locale).setHours(0,0,0,0):T.max&&T.max.constructor==Date&&T.max.setHours(0,0,0,0),T.selectDay||(T.min&&(T.min=new Date(T.min),T.min.setDate(1),T.min=T.min.valueOf()),T.max&&(T.max=new Date(T.max),T.max.setDate(1),T.max=T.max.valueOf())),"string"==typeof T.date?T.date=n(T.date,T.format,T.separator,T.locale).setHours(0,0,0,0):T.date.constructor==Date&&T.date.setHours(0,0,0,0),T.date||(T.date=new Date,T.date.setHours(0,0,0,0)),"single"!=T.mode){if(T.date.constructor!=Array)T.date=[T.date.valueOf()],"range"==T.mode&&T.date.push(new Date(T.date[0]).setHours(0,0,0,0).valueOf());else{for(x=0;x<T.date.length;x++)T.date[x]=n(T.date[x],T.format,T.separator,T.locale).setHours(0,0,0,0).valueOf();"range"==T.mode&&(T.date[1]=new Date(T.date[1]).setHours(0,0,0,0).valueOf())}if(T.current=new Date(T.date[0]),!T.selectDay)for(x=0;x<T.date.length;++x)T.date[x]=new Date(T.date[x]),T.date[x].setDate(1),T.date[x]=T.date[x].valueOf(),"range"!=T.mode&&T.date.indexOf(T.date[x])!==x&&(T.date.splice(x,1),--x)}else T.date=T.date.valueOf(),T.current=new Date(T.date),T.selectDay||(T.date=new Date(T.date),T.date.setDate(1),T.date=T.date.valueOf());T.current.setDate(1),T.current.setHours(0,0,0,0);var S,k=e(T.tpl.wrapper);k.addClass("nemo-pmu-wrapper_calendars_"+T.calendars),1==T.flat&&k.addClass("nemo-pmu-wrapper_flat"),this.pickmeup=k,T.className&&k.addClass(T.className);var D="";for(x=0;x<T.calendars;x++)S=T.firstDay,D+=T.tpl.head({prev:T.prev,next:T.next,day:[T.locale.daysMin[S++%7],T.locale.daysMin[S++%7],T.locale.daysMin[S++%7],T.locale.daysMin[S++%7],T.locale.daysMin[S++%7],T.locale.daysMin[S++%7],T.locale.daysMin[S++%7]]});w.data("pickmeup-options",T);for(x in T)-1!=["render","change","beforeShow","show","hide","setDate","setMonth","setYear"].indexOf(x)&&(T[x]=T[x].bind(this));if(T.binded={fill:i.bind(this),update_date:o.bind(this),click:r.bind(this),show:l.bind(this),forced_show:c.bind(this),hide:u.bind(this),update:h.bind(this),clear:d.bind(this),prev:p.bind(this),next:f.bind(this),get_date:_.bind(this),getDateElementSelected:v.bind(this),getDateElementCustom:b.bind(this),set_date:m.bind(this),destroy:g.bind(this),currentCalendar:t.bind(this)},T.events_namespace=".pickmeup-"+ ++y,k.on("click focus",T.binded.click).addClass(T.views[T.view]).append(D).on(e.support.selectstart?"selectstart":"mousedown",function(e){e.preventDefault()}),T.flat)k.appendTo(this).css({position:"relative"}),T.binded.fill(),T.binded.show();else{k.appendTo(document.body);var P=T.triggerEvent.split(" ");for(x=0;x<P.length;++x)P[x]+=T.events_namespace;P=P.join(" "),w.on(P,T.binded.show)}})}}),function(e,t){e("js/lib/mobile.detect.js/mobileDetect",[],function(){"use strict";function e(e,t){return null!=e&&null!=t&&e.toLowerCase()===t.toLowerCase()}function t(e){for(var t in e)o.call(e,t)&&(e[t]=new RegExp(e[t],"i"))}function i(e,t){this.ua=e||"",this._cache={},this.maxPhoneWidth=t||600}var n={};n.mobileDetectRules={phones:{iPhone:"\\biPhone\\b|\\biPod\\b",BlackBerry:"BlackBerry|\\bBB10\\b|rim[0-9]+",HTC:"HTC|HTC.*(Sensation|Evo|Vision|Explorer|6800|8100|8900|A7272|S510e|C110e|Legend|Desire|T8282)|APX515CKT|Qtek9090|APA9292KT|HD_mini|Sensation.*Z710e|PG86100|Z715e|Desire.*(A8181|HD)|ADR6200|ADR6400L|ADR6425|001HT|Inspire 4G|Android.*\\bEVO\\b|T-Mobile G1|Z520m",Nexus:"Nexus One|Nexus S|Galaxy.*Nexus|Android.*Nexus.*Mobile|Nexus 4|Nexus 5|Nexus 6",Dell:"Dell.*Streak|Dell.*Aero|Dell.*Venue|DELL.*Venue Pro|Dell Flash|Dell Smoke|Dell Mini 3iX|XCD28|XCD35|\\b001DL\\b|\\b101DL\\b|\\bGS01\\b",Motorola:"Motorola|DROIDX|DROID BIONIC|\\bDroid\\b.*Build|Android.*Xoom|HRI39|MOT-|A1260|A1680|A555|A853|A855|A953|A955|A956|Motorola.*ELECTRIFY|Motorola.*i1|i867|i940|MB200|MB300|MB501|MB502|MB508|MB511|MB520|MB525|MB526|MB611|MB612|MB632|MB810|MB855|MB860|MB861|MB865|MB870|ME501|ME502|ME511|ME525|ME600|ME632|ME722|ME811|ME860|ME863|ME865|MT620|MT710|MT716|MT720|MT810|MT870|MT917|Motorola.*TITANIUM|WX435|WX445|XT300|XT301|XT311|XT316|XT317|XT319|XT320|XT390|XT502|XT530|XT531|XT532|XT535|XT603|XT610|XT611|XT615|XT681|XT701|XT702|XT711|XT720|XT800|XT806|XT860|XT862|XT875|XT882|XT883|XT894|XT901|XT907|XT909|XT910|XT912|XT928|XT926|XT915|XT919|XT925",Samsung:"Samsung|SGH-I337|BGT-S5230|GT-B2100|GT-B2700|GT-B2710|GT-B3210|GT-B3310|GT-B3410|GT-B3730|GT-B3740|GT-B5510|GT-B5512|GT-B5722|GT-B6520|GT-B7300|GT-B7320|GT-B7330|GT-B7350|GT-B7510|GT-B7722|GT-B7800|GT-C3010|GT-C3011|GT-C3060|GT-C3200|GT-C3212|GT-C3212I|GT-C3262|GT-C3222|GT-C3300|GT-C3300K|GT-C3303|GT-C3303K|GT-C3310|GT-C3322|GT-C3330|GT-C3350|GT-C3500|GT-C3510|GT-C3530|GT-C3630|GT-C3780|GT-C5010|GT-C5212|GT-C6620|GT-C6625|GT-C6712|GT-E1050|GT-E1070|GT-E1075|GT-E1080|GT-E1081|GT-E1085|GT-E1087|GT-E1100|GT-E1107|GT-E1110|GT-E1120|GT-E1125|GT-E1130|GT-E1160|GT-E1170|GT-E1175|GT-E1180|GT-E1182|GT-E1200|GT-E1210|GT-E1225|GT-E1230|GT-E1390|GT-E2100|GT-E2120|GT-E2121|GT-E2152|GT-E2220|GT-E2222|GT-E2230|GT-E2232|GT-E2250|GT-E2370|GT-E2550|GT-E2652|GT-E3210|GT-E3213|GT-I5500|GT-I5503|GT-I5700|GT-I5800|GT-I5801|GT-I6410|GT-I6420|GT-I7110|GT-I7410|GT-I7500|GT-I8000|GT-I8150|GT-I8160|GT-I8190|GT-I8320|GT-I8330|GT-I8350|GT-I8530|GT-I8700|GT-I8703|GT-I8910|GT-I9000|GT-I9001|GT-I9003|GT-I9010|GT-I9020|GT-I9023|GT-I9070|GT-I9082|GT-I9100|GT-I9103|GT-I9220|GT-I9250|GT-I9300|GT-I9305|GT-I9500|GT-I9505|GT-M3510|GT-M5650|GT-M7500|GT-M7600|GT-M7603|GT-M8800|GT-M8910|GT-N7000|GT-S3110|GT-S3310|GT-S3350|GT-S3353|GT-S3370|GT-S3650|GT-S3653|GT-S3770|GT-S3850|GT-S5210|GT-S5220|GT-S5229|GT-S5230|GT-S5233|GT-S5250|GT-S5253|GT-S5260|GT-S5263|GT-S5270|GT-S5300|GT-S5330|GT-S5350|GT-S5360|GT-S5363|GT-S5369|GT-S5380|GT-S5380D|GT-S5560|GT-S5570|GT-S5600|GT-S5603|GT-S5610|GT-S5620|GT-S5660|GT-S5670|GT-S5690|GT-S5750|GT-S5780|GT-S5830|GT-S5839|GT-S6102|GT-S6500|GT-S7070|GT-S7200|GT-S7220|GT-S7230|GT-S7233|GT-S7250|GT-S7500|GT-S7530|GT-S7550|GT-S7562|GT-S7710|GT-S8000|GT-S8003|GT-S8500|GT-S8530|GT-S8600|SCH-A310|SCH-A530|SCH-A570|SCH-A610|SCH-A630|SCH-A650|SCH-A790|SCH-A795|SCH-A850|SCH-A870|SCH-A890|SCH-A930|SCH-A950|SCH-A970|SCH-A990|SCH-I100|SCH-I110|SCH-I400|SCH-I405|SCH-I500|SCH-I510|SCH-I515|SCH-I600|SCH-I730|SCH-I760|SCH-I770|SCH-I830|SCH-I910|SCH-I920|SCH-I959|SCH-LC11|SCH-N150|SCH-N300|SCH-R100|SCH-R300|SCH-R351|SCH-R400|SCH-R410|SCH-T300|SCH-U310|SCH-U320|SCH-U350|SCH-U360|SCH-U365|SCH-U370|SCH-U380|SCH-U410|SCH-U430|SCH-U450|SCH-U460|SCH-U470|SCH-U490|SCH-U540|SCH-U550|SCH-U620|SCH-U640|SCH-U650|SCH-U660|SCH-U700|SCH-U740|SCH-U750|SCH-U810|SCH-U820|SCH-U900|SCH-U940|SCH-U960|SCS-26UC|SGH-A107|SGH-A117|SGH-A127|SGH-A137|SGH-A157|SGH-A167|SGH-A177|SGH-A187|SGH-A197|SGH-A227|SGH-A237|SGH-A257|SGH-A437|SGH-A517|SGH-A597|SGH-A637|SGH-A657|SGH-A667|SGH-A687|SGH-A697|SGH-A707|SGH-A717|SGH-A727|SGH-A737|SGH-A747|SGH-A767|SGH-A777|SGH-A797|SGH-A817|SGH-A827|SGH-A837|SGH-A847|SGH-A867|SGH-A877|SGH-A887|SGH-A897|SGH-A927|SGH-B100|SGH-B130|SGH-B200|SGH-B220|SGH-C100|SGH-C110|SGH-C120|SGH-C130|SGH-C140|SGH-C160|SGH-C170|SGH-C180|SGH-C200|SGH-C207|SGH-C210|SGH-C225|SGH-C230|SGH-C417|SGH-C450|SGH-D307|SGH-D347|SGH-D357|SGH-D407|SGH-D415|SGH-D780|SGH-D807|SGH-D980|SGH-E105|SGH-E200|SGH-E315|SGH-E316|SGH-E317|SGH-E335|SGH-E590|SGH-E635|SGH-E715|SGH-E890|SGH-F300|SGH-F480|SGH-I200|SGH-I300|SGH-I320|SGH-I550|SGH-I577|SGH-I600|SGH-I607|SGH-I617|SGH-I627|SGH-I637|SGH-I677|SGH-I700|SGH-I717|SGH-I727|SGH-i747M|SGH-I777|SGH-I780|SGH-I827|SGH-I847|SGH-I857|SGH-I896|SGH-I897|SGH-I900|SGH-I907|SGH-I917|SGH-I927|SGH-I937|SGH-I997|SGH-J150|SGH-J200|SGH-L170|SGH-L700|SGH-M110|SGH-M150|SGH-M200|SGH-N105|SGH-N500|SGH-N600|SGH-N620|SGH-N625|SGH-N700|SGH-N710|SGH-P107|SGH-P207|SGH-P300|SGH-P310|SGH-P520|SGH-P735|SGH-P777|SGH-Q105|SGH-R210|SGH-R220|SGH-R225|SGH-S105|SGH-S307|SGH-T109|SGH-T119|SGH-T139|SGH-T209|SGH-T219|SGH-T229|SGH-T239|SGH-T249|SGH-T259|SGH-T309|SGH-T319|SGH-T329|SGH-T339|SGH-T349|SGH-T359|SGH-T369|SGH-T379|SGH-T409|SGH-T429|SGH-T439|SGH-T459|SGH-T469|SGH-T479|SGH-T499|SGH-T509|SGH-T519|SGH-T539|SGH-T559|SGH-T589|SGH-T609|SGH-T619|SGH-T629|SGH-T639|SGH-T659|SGH-T669|SGH-T679|SGH-T709|SGH-T719|SGH-T729|SGH-T739|SGH-T746|SGH-T749|SGH-T759|SGH-T769|SGH-T809|SGH-T819|SGH-T839|SGH-T919|SGH-T929|SGH-T939|SGH-T959|SGH-T989|SGH-U100|SGH-U200|SGH-U800|SGH-V205|SGH-V206|SGH-X100|SGH-X105|SGH-X120|SGH-X140|SGH-X426|SGH-X427|SGH-X475|SGH-X495|SGH-X497|SGH-X507|SGH-X600|SGH-X610|SGH-X620|SGH-X630|SGH-X700|SGH-X820|SGH-X890|SGH-Z130|SGH-Z150|SGH-Z170|SGH-ZX10|SGH-ZX20|SHW-M110|SPH-A120|SPH-A400|SPH-A420|SPH-A460|SPH-A500|SPH-A560|SPH-A600|SPH-A620|SPH-A660|SPH-A700|SPH-A740|SPH-A760|SPH-A790|SPH-A800|SPH-A820|SPH-A840|SPH-A880|SPH-A900|SPH-A940|SPH-A960|SPH-D600|SPH-D700|SPH-D710|SPH-D720|SPH-I300|SPH-I325|SPH-I330|SPH-I350|SPH-I500|SPH-I600|SPH-I700|SPH-L700|SPH-M100|SPH-M220|SPH-M240|SPH-M300|SPH-M305|SPH-M320|SPH-M330|SPH-M350|SPH-M360|SPH-M370|SPH-M380|SPH-M510|SPH-M540|SPH-M550|SPH-M560|SPH-M570|SPH-M580|SPH-M610|SPH-M620|SPH-M630|SPH-M800|SPH-M810|SPH-M850|SPH-M900|SPH-M910|SPH-M920|SPH-M930|SPH-N100|SPH-N200|SPH-N240|SPH-N300|SPH-N400|SPH-Z400|SWC-E100|SCH-i909|GT-N7100|GT-N7105|SCH-I535|SM-N900A|SGH-I317|SGH-T999L|GT-S5360B|GT-I8262|GT-S6802|GT-S6312|GT-S6310|GT-S5312|GT-S5310|GT-I9105|GT-I8510|GT-S6790N|SM-G7105|SM-N9005|GT-S5301|GT-I9295|GT-I9195|SM-C101|GT-S7392|GT-S7560|GT-B7610|GT-I5510|GT-S7582|GT-S7530E|GT-I8750|SM-G9006V|SM-G9008V|SM-G9009D|SM-G900A|SM-G900D|SM-G900F|SM-G900H|SM-G900I|SM-G900J|SM-G900K|SM-G900L|SM-G900M|SM-G900P|SM-G900R4|SM-G900S|SM-G900T|SM-G900V|SM-G900W8|SHV-E160K",LG:"\\bLG\\b;|LG[- ]?(C800|C900|E400|E610|E900|E-900|F160|F180K|F180L|F180S|730|855|L160|LS740|LS840|LS970|LU6200|MS690|MS695|MS770|MS840|MS870|MS910|P500|P700|P705|VM696|AS680|AS695|AX840|C729|E970|GS505|272|C395|E739BK|E960|L55C|L75C|LS696|LS860|P769BK|P350|P500|P509|P870|UN272|US730|VS840|VS950|LN272|LN510|LS670|LS855|LW690|MN270|MN510|P509|P769|P930|UN200|UN270|UN510|UN610|US670|US740|US760|UX265|UX840|VN271|VN530|VS660|VS700|VS740|VS750|VS910|VS920|VS930|VX9200|VX11000|AX840A|LW770|P506|P925|P999|E612|D955|D802)",Sony:"SonyST|SonyLT|SonyEricsson|SonyEricssonLT15iv|LT18i|E10i|LT28h|LT26w|SonyEricssonMT27i|C5303|C6902|C6903|C6906|C6943|D2533",Asus:"Asus.*Galaxy|PadFone.*Mobile",Micromax:"Micromax.*\\b(A210|A92|A88|A72|A111|A110Q|A115|A116|A110|A90S|A26|A51|A35|A54|A25|A27|A89|A68|A65|A57|A90)\\b",Palm:"PalmSource|Palm",Vertu:"Vertu|Vertu.*Ltd|Vertu.*Ascent|Vertu.*Ayxta|Vertu.*Constellation(F|Quest)?|Vertu.*Monika|Vertu.*Signature",Pantech:"PANTECH|IM-A850S|IM-A840S|IM-A830L|IM-A830K|IM-A830S|IM-A820L|IM-A810K|IM-A810S|IM-A800S|IM-T100K|IM-A725L|IM-A780L|IM-A775C|IM-A770K|IM-A760S|IM-A750K|IM-A740S|IM-A730S|IM-A720L|IM-A710K|IM-A690L|IM-A690S|IM-A650S|IM-A630K|IM-A600S|VEGA PTL21|PT003|P8010|ADR910L|P6030|P6020|P9070|P4100|P9060|P5000|CDM8992|TXT8045|ADR8995|IS11PT|P2030|P6010|P8000|PT002|IS06|CDM8999|P9050|PT001|TXT8040|P2020|P9020|P2000|P7040|P7000|C790",Fly:"IQ230|IQ444|IQ450|IQ440|IQ442|IQ441|IQ245|IQ256|IQ236|IQ255|IQ235|IQ245|IQ275|IQ240|IQ285|IQ280|IQ270|IQ260|IQ250",Wiko:"KITE 4G|HIGHWAY|GETAWAY|STAIRWAY|DARKSIDE|DARKFULL|DARKNIGHT|DARKMOON|SLIDE|WAX 4G|RAINBOW|BLOOM|SUNSET|GOA|LENNY|BARRY|IGGY|OZZY|CINK FIVE|CINK PEAX|CINK PEAX 2|CINK SLIM|CINK SLIM 2|CINK +|CINK KING|CINK PEAX|CINK SLIM|SUBLIM",iMobile:"i-mobile (IQ|i-STYLE|idea|ZAA|Hitz)",SimValley:"\\b(SP-80|XT-930|SX-340|XT-930|SX-310|SP-360|SP60|SPT-800|SP-120|SPT-800|SP-140|SPX-5|SPX-8|SP-100|SPX-8|SPX-12)\\b",Wolfgang:"AT-B24D|AT-AS50HD|AT-AS40W|AT-AS55HD|AT-AS45q2|AT-B26D|AT-AS50Q",Alcatel:"Alcatel",Nintendo:"Nintendo 3DS",Amoi:"Amoi",INQ:"INQ",GenericPhone:"Tapatalk|PDA;|SAGEM|\\bmmp\\b|pocket|\\bpsp\\b|symbian|Smartphone|smartfon|treo|up.browser|up.link|vodafone|\\bwap\\b|nokia|Series40|Series60|S60|SonyEricsson|N900|MAUI.*WAP.*Browser"},tablets:{iPad:"iPad|iPad.*Mobile",NexusTablet:"Android.*Nexus[\\s]+(7|9|10)|^.*Android.*Nexus(?:(?!Mobile).)*$",SamsungTablet:"SAMSUNG.*Tablet|Galaxy.*Tab|SC-01C|GT-P1000|GT-P1003|GT-P1010|GT-P3105|GT-P6210|GT-P6800|GT-P6810|GT-P7100|GT-P7300|GT-P7310|GT-P7500|GT-P7510|SCH-I800|SCH-I815|SCH-I905|SGH-I957|SGH-I987|SGH-T849|SGH-T859|SGH-T869|SPH-P100|GT-P3100|GT-P3108|GT-P3110|GT-P5100|GT-P5110|GT-P6200|GT-P7320|GT-P7511|GT-N8000|GT-P8510|SGH-I497|SPH-P500|SGH-T779|SCH-I705|SCH-I915|GT-N8013|GT-P3113|GT-P5113|GT-P8110|GT-N8010|GT-N8005|GT-N8020|GT-P1013|GT-P6201|GT-P7501|GT-N5100|GT-N5105|GT-N5110|SHV-E140K|SHV-E140L|SHV-E140S|SHV-E150S|SHV-E230K|SHV-E230L|SHV-E230S|SHW-M180K|SHW-M180L|SHW-M180S|SHW-M180W|SHW-M300W|SHW-M305W|SHW-M380K|SHW-M380S|SHW-M380W|SHW-M430W|SHW-M480K|SHW-M480S|SHW-M480W|SHW-M485W|SHW-M486W|SHW-M500W|GT-I9228|SCH-P739|SCH-I925|GT-I9200|GT-I9205|GT-P5200|GT-P5210|GT-P5210X|SM-T311|SM-T310|SM-T310X|SM-T210|SM-T210R|SM-T211|SM-P600|SM-P601|SM-P605|SM-P900|SM-P901|SM-T217|SM-T217A|SM-T217S|SM-P6000|SM-T3100|SGH-I467|XE500|SM-T110|GT-P5220|GT-I9200X|GT-N5110X|GT-N5120|SM-P905|SM-T111|SM-T2105|SM-T315|SM-T320|SM-T320X|SM-T321|SM-T520|SM-T525|SM-T530NU|SM-T230NU|SM-T330NU|SM-T900|XE500T1C|SM-P605V|SM-P905V|SM-T337V|SM-T537V|SM-T707V|SM-T807V|SM-P600X|SM-P900X|SM-T210X|SM-T230|SM-T230X|SM-T325|GT-P7503|SM-T531|SM-T330|SM-T530|SM-T705C|SM-T535|SM-T331|SM-T800|SM-T700|SM-T537|SM-T807|SM-P907A|SM-T337A|SM-T537A|SM-T707A|SM-T807A|SM-T237P|SM-T807P|SM-P607T|SM-T217T|SM-T337T|SM-T807T",Kindle:"Kindle|Silk.*Accelerated|Android.*\\b(KFOT|KFTT|KFJWI|KFJWA|KFOTE|KFSOWI|KFTHWI|KFTHWA|KFAPWI|KFAPWA|WFJWAE|KFSAWA|KFSAWI|KFASWI)\\b",SurfaceTablet:"Windows NT [0-9.]+; ARM;.*(Tablet|ARMBJS)",HPTablet:"HP Slate (7|8|10)|HP ElitePad 900|hp-tablet|EliteBook.*Touch|HP 8|Slate 21|HP SlateBook 10",AsusTablet:"^.*PadFone((?!Mobile).)*$|Transformer|TF101|TF101G|TF300T|TF300TG|TF300TL|TF700T|TF700KL|TF701T|TF810C|ME171|ME301T|ME302C|ME371MG|ME370T|ME372MG|ME172V|ME173X|ME400C|Slider SL101|\\bK00F\\b|\\bK00C\\b|\\bK00E\\b|\\bK00L\\b|TX201LA|ME176C|ME102A|\\bM80TA\\b|ME372CL|ME560CG|ME372CG|ME302KL",BlackBerryTablet:"PlayBook|RIM Tablet",HTCtablet:"HTC_Flyer_P512|HTC Flyer|HTC Jetstream|HTC-P715a|HTC EVO View 4G|PG41200|PG09410",MotorolaTablet:"xoom|sholest|MZ615|MZ605|MZ505|MZ601|MZ602|MZ603|MZ604|MZ606|MZ607|MZ608|MZ609|MZ615|MZ616|MZ617",NookTablet:"Android.*Nook|NookColor|nook browser|BNRV200|BNRV200A|BNTV250|BNTV250A|BNTV400|BNTV600|LogicPD Zoom2",AcerTablet:"Android.*; \\b(A100|A101|A110|A200|A210|A211|A500|A501|A510|A511|A700|A701|W500|W500P|W501|W501P|W510|W511|W700|G100|G100W|B1-A71|B1-710|B1-711|A1-810|A1-811|A1-830)\\b|W3-810|\\bA3-A10\\b|\\bA3-A11\\b",ToshibaTablet:"Android.*(AT100|AT105|AT200|AT205|AT270|AT275|AT300|AT305|AT1S5|AT500|AT570|AT700|AT830)|TOSHIBA.*FOLIO",LGTablet:"\\bL-06C|LG-V909|LG-V900|LG-V700|LG-V510|LG-V500|LG-V410|LG-V400|LG-VK810\\b",FujitsuTablet:"Android.*\\b(F-01D|F-02F|F-05E|F-10D|M532|Q572)\\b",PrestigioTablet:"PMP3170B|PMP3270B|PMP3470B|PMP7170B|PMP3370B|PMP3570C|PMP5870C|PMP3670B|PMP5570C|PMP5770D|PMP3970B|PMP3870C|PMP5580C|PMP5880D|PMP5780D|PMP5588C|PMP7280C|PMP7280C3G|PMP7280|PMP7880D|PMP5597D|PMP5597|PMP7100D|PER3464|PER3274|PER3574|PER3884|PER5274|PER5474|PMP5097CPRO|PMP5097|PMP7380D|PMP5297C|PMP5297C_QUAD",LenovoTablet:"Idea(Tab|Pad)( A1|A10| K1|)|ThinkPad([ ]+)?Tablet|Lenovo.*(S2109|S2110|S5000|S6000|K3011|A3000|A3500|A1000|A2107|A2109|A1107|A5500|A7600|B6000|B8000|B8080)(-|)(FL|F|HV|H|)",DellTablet:"Venue 11|Venue 8|Venue 7|Dell Streak 10|Dell Streak 7",YarvikTablet:"Android.*\\b(TAB210|TAB211|TAB224|TAB250|TAB260|TAB264|TAB310|TAB360|TAB364|TAB410|TAB411|TAB420|TAB424|TAB450|TAB460|TAB461|TAB464|TAB465|TAB467|TAB468|TAB07-100|TAB07-101|TAB07-150|TAB07-151|TAB07-152|TAB07-200|TAB07-201-3G|TAB07-210|TAB07-211|TAB07-212|TAB07-214|TAB07-220|TAB07-400|TAB07-485|TAB08-150|TAB08-200|TAB08-201-3G|TAB08-201-30|TAB09-100|TAB09-211|TAB09-410|TAB10-150|TAB10-201|TAB10-211|TAB10-400|TAB10-410|TAB13-201|TAB274EUK|TAB275EUK|TAB374EUK|TAB462EUK|TAB474EUK|TAB9-200)\\b",MedionTablet:"Android.*\\bOYO\\b|LIFE.*(P9212|P9514|P9516|S9512)|LIFETAB",ArnovaTablet:"AN10G2|AN7bG3|AN7fG3|AN8G3|AN8cG3|AN7G3|AN9G3|AN7dG3|AN7dG3ST|AN7dG3ChildPad|AN10bG3|AN10bG3DT|AN9G2",IntensoTablet:"INM8002KP|INM1010FP|INM805ND|Intenso Tab|TAB1004",IRUTablet:"M702pro",MegafonTablet:"MegaFon V9|\\bZTE V9\\b|Android.*\\bMT7A\\b",EbodaTablet:"E-Boda (Supreme|Impresspeed|Izzycomm|Essential)",AllViewTablet:"Allview.*(Viva|Alldro|City|Speed|All TV|Frenzy|Quasar|Shine|TX1|AX1|AX2)",ArchosTablet:"\\b(101G9|80G9|A101IT)\\b|Qilive 97R|Archos5|\\bARCHOS (70|79|80|90|97|101|FAMILYPAD|)(b|)(G10| Cobalt| TITANIUM(HD|)| Xenon| Neon|XSK| 2| XS 2| PLATINUM| CARBON|GAMEPAD)\\b",AinolTablet:"NOVO7|NOVO8|NOVO10|Novo7Aurora|Novo7Basic|NOVO7PALADIN|novo9-Spark",SonyTablet:"Sony.*Tablet|Xperia Tablet|Sony Tablet S|SO-03E|SGPT12|SGPT13|SGPT114|SGPT121|SGPT122|SGPT123|SGPT111|SGPT112|SGPT113|SGPT131|SGPT132|SGPT133|SGPT211|SGPT212|SGPT213|SGP311|SGP312|SGP321|EBRD1101|EBRD1102|EBRD1201|SGP351|SGP341|SGP511|SGP512|SGP521|SGP541|SGP551|SGP621|SGP612",PhilipsTablet:"\\b(PI2010|PI3000|PI3100|PI3105|PI3110|PI3205|PI3210|PI3900|PI4010|PI7000|PI7100)\\b",CubeTablet:"Android.*(K8GT|U9GT|U10GT|U16GT|U17GT|U18GT|U19GT|U20GT|U23GT|U30GT)|CUBE U8GT",CobyTablet:"MID1042|MID1045|MID1125|MID1126|MID7012|MID7014|MID7015|MID7034|MID7035|MID7036|MID7042|MID7048|MID7127|MID8042|MID8048|MID8127|MID9042|MID9740|MID9742|MID7022|MID7010",MIDTablet:"M9701|M9000|M9100|M806|M1052|M806|T703|MID701|MID713|MID710|MID727|MID760|MID830|MID728|MID933|MID125|MID810|MID732|MID120|MID930|MID800|MID731|MID900|MID100|MID820|MID735|MID980|MID130|MID833|MID737|MID960|MID135|MID860|MID736|MID140|MID930|MID835|MID733",MSITablet:"MSI \\b(Primo 73K|Primo 73L|Primo 81L|Primo 77|Primo 93|Primo 75|Primo 76|Primo 73|Primo 81|Primo 91|Primo 90|Enjoy 71|Enjoy 7|Enjoy 10)\\b",SMiTTablet:"Android.*(\\bMID\\b|MID-560|MTV-T1200|MTV-PND531|MTV-P1101|MTV-PND530)",RockChipTablet:"Android.*(RK2818|RK2808A|RK2918|RK3066)|RK2738|RK2808A",FlyTablet:"IQ310|Fly Vision",bqTablet:"(bq)?.*(Elcano|Curie|Edison|Maxwell|Kepler|Pascal|Tesla|Hypatia|Platon|Newton|Livingstone|Cervantes|Avant|Aquaris E10)|Maxwell.*Lite|Maxwell.*Plus",HuaweiTablet:"MediaPad|MediaPad 7 Youth|IDEOS S7|S7-201c|S7-202u|S7-101|S7-103|S7-104|S7-105|S7-106|S7-201|S7-Slim",NecTablet:"\\bN-06D|\\bN-08D",PantechTablet:"Pantech.*P4100",BronchoTablet:"Broncho.*(N701|N708|N802|a710)",VersusTablet:"TOUCHPAD.*[78910]|\\bTOUCHTAB\\b",ZyncTablet:"z1000|Z99 2G|z99|z930|z999|z990|z909|Z919|z900",PositivoTablet:"TB07STA|TB10STA|TB07FTA|TB10FTA",NabiTablet:"Android.*\\bNabi",KoboTablet:"Kobo Touch|\\bK080\\b|\\bVox\\b Build|\\bArc\\b Build",DanewTablet:"DSlide.*\\b(700|701R|702|703R|704|802|970|971|972|973|974|1010|1012)\\b",TexetTablet:"NaviPad|TB-772A|TM-7045|TM-7055|TM-9750|TM-7016|TM-7024|TM-7026|TM-7041|TM-7043|TM-7047|TM-8041|TM-9741|TM-9747|TM-9748|TM-9751|TM-7022|TM-7021|TM-7020|TM-7011|TM-7010|TM-7023|TM-7025|TM-7037W|TM-7038W|TM-7027W|TM-9720|TM-9725|TM-9737W|TM-1020|TM-9738W|TM-9740|TM-9743W|TB-807A|TB-771A|TB-727A|TB-725A|TB-719A|TB-823A|TB-805A|TB-723A|TB-715A|TB-707A|TB-705A|TB-709A|TB-711A|TB-890HD|TB-880HD|TB-790HD|TB-780HD|TB-770HD|TB-721HD|TB-710HD|TB-434HD|TB-860HD|TB-840HD|TB-760HD|TB-750HD|TB-740HD|TB-730HD|TB-722HD|TB-720HD|TB-700HD|TB-500HD|TB-470HD|TB-431HD|TB-430HD|TB-506|TB-504|TB-446|TB-436|TB-416|TB-146SE|TB-126SE",PlaystationTablet:"Playstation.*(Portable|Vita)",TrekstorTablet:"ST10416-1|VT10416-1|ST70408-1|ST702xx-1|ST702xx-2|ST80208|ST97216|ST70104-2|VT10416-2|ST10216-2A|SurfTab",PyleAudioTablet:"\\b(PTBL10CEU|PTBL10C|PTBL72BC|PTBL72BCEU|PTBL7CEU|PTBL7C|PTBL92BC|PTBL92BCEU|PTBL9CEU|PTBL9CUK|PTBL9C)\\b",AdvanTablet:"Android.* \\b(E3A|T3X|T5C|T5B|T3E|T3C|T3B|T1J|T1F|T2A|T1H|T1i|E1C|T1-E|T5-A|T4|E1-B|T2Ci|T1-B|T1-D|O1-A|E1-A|T1-A|T3A|T4i)\\b ",DanyTechTablet:"Genius Tab G3|Genius Tab S2|Genius Tab Q3|Genius Tab G4|Genius Tab Q4|Genius Tab G-II|Genius TAB GII|Genius TAB GIII|Genius Tab S1",GalapadTablet:"Android.*\\bG1\\b",MicromaxTablet:"Funbook|Micromax.*\\b(P250|P560|P360|P362|P600|P300|P350|P500|P275)\\b",KarbonnTablet:"Android.*\\b(A39|A37|A34|ST8|ST10|ST7|Smart Tab3|Smart Tab2)\\b",AllFineTablet:"Fine7 Genius|Fine7 Shine|Fine7 Air|Fine8 Style|Fine9 More|Fine10 Joy|Fine11 Wide",PROSCANTablet:"\\b(PEM63|PLT1023G|PLT1041|PLT1044|PLT1044G|PLT1091|PLT4311|PLT4311PL|PLT4315|PLT7030|PLT7033|PLT7033D|PLT7035|PLT7035D|PLT7044K|PLT7045K|PLT7045KB|PLT7071KG|PLT7072|PLT7223G|PLT7225G|PLT7777G|PLT7810K|PLT7849G|PLT7851G|PLT7852G|PLT8015|PLT8031|PLT8034|PLT8036|PLT8080K|PLT8082|PLT8088|PLT8223G|PLT8234G|PLT8235G|PLT8816K|PLT9011|PLT9045K|PLT9233G|PLT9735|PLT9760G|PLT9770G)\\b",YONESTablet:"BQ1078|BC1003|BC1077|RK9702|BC9730|BC9001|IT9001|BC7008|BC7010|BC708|BC728|BC7012|BC7030|BC7027|BC7026",ChangJiaTablet:"TPC7102|TPC7103|TPC7105|TPC7106|TPC7107|TPC7201|TPC7203|TPC7205|TPC7210|TPC7708|TPC7709|TPC7712|TPC7110|TPC8101|TPC8103|TPC8105|TPC8106|TPC8203|TPC8205|TPC8503|TPC9106|TPC9701|TPC97101|TPC97103|TPC97105|TPC97106|TPC97111|TPC97113|TPC97203|TPC97603|TPC97809|TPC97205|TPC10101|TPC10103|TPC10106|TPC10111|TPC10203|TPC10205|TPC10503",GUTablet:"TX-A1301|TX-M9002|Q702|kf026",PointOfViewTablet:"TAB-P506|TAB-navi-7-3G-M|TAB-P517|TAB-P-527|TAB-P701|TAB-P703|TAB-P721|TAB-P731N|TAB-P741|TAB-P825|TAB-P905|TAB-P925|TAB-PR945|TAB-PL1015|TAB-P1025|TAB-PI1045|TAB-P1325|TAB-PROTAB[0-9]+|TAB-PROTAB25|TAB-PROTAB26|TAB-PROTAB27|TAB-PROTAB26XL|TAB-PROTAB2-IPS9|TAB-PROTAB30-IPS9|TAB-PROTAB25XXL|TAB-PROTAB26-IPS10|TAB-PROTAB30-IPS10",OvermaxTablet:"OV-(SteelCore|NewBase|Basecore|Baseone|Exellen|Quattor|EduTab|Solution|ACTION|BasicTab|TeddyTab|MagicTab|Stream|TB-08|TB-09)",HCLTablet:"HCL.*Tablet|Connect-3G-2.0|Connect-2G-2.0|ME Tablet U1|ME Tablet U2|ME Tablet G1|ME Tablet X1|ME Tablet Y2|ME Tablet Sync",DPSTablet:"DPS Dream 9|DPS Dual 7",VistureTablet:"V97 HD|i75 3G|Visture V4( HD)?|Visture V5( HD)?|Visture V10",CrestaTablet:"CTP(-)?810|CTP(-)?818|CTP(-)?828|CTP(-)?838|CTP(-)?888|CTP(-)?978|CTP(-)?980|CTP(-)?987|CTP(-)?988|CTP(-)?989",MediatekTablet:"\\bMT8125|MT8389|MT8135|MT8377\\b",ConcordeTablet:"Concorde([ ]+)?Tab|ConCorde ReadMan",GoCleverTablet:"GOCLEVER TAB|A7GOCLEVER|M1042|M7841|M742|R1042BK|R1041|TAB A975|TAB A7842|TAB A741|TAB A741L|TAB M723G|TAB M721|TAB A1021|TAB I921|TAB R721|TAB I720|TAB T76|TAB R70|TAB R76.2|TAB R106|TAB R83.2|TAB M813G|TAB I721|GCTA722|TAB I70|TAB I71|TAB S73|TAB R73|TAB R74|TAB R93|TAB R75|TAB R76.1|TAB A73|TAB A93|TAB A93.2|TAB T72|TAB R83|TAB R974|TAB R973|TAB A101|TAB A103|TAB A104|TAB A104.2|R105BK|M713G|A972BK|TAB A971|TAB R974.2|TAB R104|TAB R83.3|TAB A1042",ModecomTablet:"FreeTAB 9000|FreeTAB 7.4|FreeTAB 7004|FreeTAB 7800|FreeTAB 2096|FreeTAB 7.5|FreeTAB 1014|FreeTAB 1001 |FreeTAB 8001|FreeTAB 9706|FreeTAB 9702|FreeTAB 7003|FreeTAB 7002|FreeTAB 1002|FreeTAB 7801|FreeTAB 1331|FreeTAB 1004|FreeTAB 8002|FreeTAB 8014|FreeTAB 9704|FreeTAB 1003",VoninoTablet:"\\b(Argus[ _]?S|Diamond[ _]?79HD|Emerald[ _]?78E|Luna[ _]?70C|Onyx[ _]?S|Onyx[ _]?Z|Orin[ _]?HD|Orin[ _]?S|Otis[ _]?S|SpeedStar[ _]?S|Magnet[ _]?M9|Primus[ _]?94[ _]?3G|Primus[ _]?94HD|Primus[ _]?QS|Android.*\\bQ8\\b|Sirius[ _]?EVO[ _]?QS|Sirius[ _]?QS|Spirit[ _]?S)\\b",ECSTablet:"V07OT2|TM105A|S10OT1|TR10CS1",StorexTablet:"eZee[_']?(Tab|Go)[0-9]+|TabLC7|Looney Tunes Tab",VodafoneTablet:"SmartTab([ ]+)?[0-9]+|SmartTabII10|SmartTabII7",EssentielBTablet:"Smart[ ']?TAB[ ]+?[0-9]+|Family[ ']?TAB2",RossMoorTablet:"RM-790|RM-997|RMD-878G|RMD-974R|RMT-705A|RMT-701|RME-601|RMT-501|RMT-711",iMobileTablet:"i-mobile i-note",TolinoTablet:"tolino tab [0-9.]+|tolino shine",AudioSonicTablet:"\\bC-22Q|T7-QC|T-17B|T-17P\\b",AMPETablet:"Android.* A78 ",SkkTablet:"Android.* (SKYPAD|PHOENIX|CYCLOPS)",TecnoTablet:"TECNO P9",JXDTablet:"Android.*\\b(F3000|A3300|JXD5000|JXD3000|JXD2000|JXD300B|JXD300|S5800|S7800|S602b|S5110b|S7300|S5300|S602|S603|S5100|S5110|S601|S7100a|P3000F|P3000s|P101|P200s|P1000m|P200m|P9100|P1000s|S6600b|S908|P1000|P300|S18|S6600|S9100)\\b",iJoyTablet:"Tablet (Spirit 7|Essentia|Galatea|Fusion|Onix 7|Landa|Titan|Scooby|Deox|Stella|Themis|Argon|Unique 7|Sygnus|Hexen|Finity 7|Cream|Cream X2|Jade|Neon 7|Neron 7|Kandy|Scape|Saphyr 7|Rebel|Biox|Rebel|Rebel 8GB|Myst|Draco 7|Myst|Tab7-004|Myst|Tadeo Jones|Tablet Boing|Arrow|Draco Dual Cam|Aurix|Mint|Amity|Revolution|Finity 9|Neon 9|T9w|Amity 4GB Dual Cam|Stone 4GB|Stone 8GB|Andromeda|Silken|X2|Andromeda II|Halley|Flame|Saphyr 9,7|Touch 8|Planet|Triton|Unique 10|Hexen 10|Memphis 4GB|Memphis 8GB|Onix 10)",FX2Tablet:"FX2 PAD7|FX2 PAD10",XoroTablet:"KidsPAD 701|PAD[ ]?712|PAD[ ]?714|PAD[ ]?716|PAD[ ]?717|PAD[ ]?718|PAD[ ]?720|PAD[ ]?721|PAD[ ]?722|PAD[ ]?790|PAD[ ]?792|PAD[ ]?900|PAD[ ]?9715D|PAD[ ]?9716DR|PAD[ ]?9718DR|PAD[ ]?9719QR|PAD[ ]?9720QR|TelePAD1030|Telepad1032|TelePAD730|TelePAD731|TelePAD732|TelePAD735Q|TelePAD830|TelePAD9730|TelePAD795|MegaPAD 1331|MegaPAD 1851|MegaPAD 2151",ViewsonicTablet:"ViewPad 10pi|ViewPad 10e|ViewPad 10s|ViewPad E72|ViewPad7|ViewPad E100|ViewPad 7e|ViewSonic VB733|VB100a",OdysTablet:"LOOX|XENO10|ODYS[ -](Space|EVO|Xpress|NOON)|\\bXELIO\\b|Xelio10Pro|XELIO7PHONETAB|XELIO10EXTREME|XELIOPT2|NEO_QUAD10",CaptivaTablet:"CAPTIVA PAD",IconbitTablet:"NetTAB|NT-3702|NT-3702S|NT-3702S|NT-3603P|NT-3603P|NT-0704S|NT-0704S|NT-3805C|NT-3805C|NT-0806C|NT-0806C|NT-0909T|NT-0909T|NT-0907S|NT-0907S|NT-0902S|NT-0902S",
TeclastTablet:"T98 4G|\\bP80\\b|\\bX90HD\\b|X98 Air|X98 Air 3G|\\bX89\\b|P80 3G|\\bX80h\\b|P98 Air|\\bX89HD\\b|P98 3G|\\bP90HD\\b|P89 3G|X98 3G|\\bP70h\\b|P79HD 3G|G18d 3G|\\bP79HD\\b|\\bP89s\\b|\\bA88\\b|\\bP10HD\\b|\\bP19HD\\b|G18 3G|\\bP78HD\\b|\\bA78\\b|\\bP75\\b|G17s 3G|G17h 3G|\\bP85t\\b|\\bP90\\b|\\bP11\\b|\\bP98t\\b|\\bP98HD\\b|\\bG18d\\b|\\bP85s\\b|\\bP11HD\\b|\\bP88s\\b|\\bA80HD\\b|\\bA80se\\b|\\bA10h\\b|\\bP89\\b|\\bP78s\\b|\\bG18\\b|\\bP85\\b|\\bA70h\\b|\\bA70\\b|\\bG17\\b|\\bP18\\b|\\bA80s\\b|\\bA11s\\b|\\bP88HD\\b|\\bA80h\\b|\\bP76s\\b|\\bP76h\\b|\\bP98\\b|\\bA10HD\\b|\\bP78\\b|\\bP88\\b|\\bA11\\b|\\bA10t\\b|\\bP76a\\b|\\bP76t\\b|\\bP76e\\b|\\bP85HD\\b|\\bP85a\\b|\\bP86\\b|\\bP75HD\\b|\\bP76v\\b|\\bA12\\b|\\bP75a\\b|\\bA15\\b|\\bP76Ti\\b|\\bP81HD\\b|\\bA10\\b|\\bT760VE\\b|\\bT720HD\\b|\\bP76\\b|\\bP73\\b|\\bP71\\b|\\bP72\\b|\\bT720SE\\b|\\bC520Ti\\b|\\bT760\\b|\\bT720VE\\b|T720-3GE|T720-WiFi",OndaTablet:"\\b(V975i|Vi30|VX530|V701|Vi60|V701s|Vi50|V801s|V719|Vx610w|VX610W|V819i|Vi10|VX580W|Vi10|V711s|V813|V811|V820w|V820|Vi20|V711|VI30W|V712|V891w|V972|V819w|V820w|Vi60|V820w|V711|V813s|V801|V819|V975s|V801|V819|V819|V818|V811|V712|V975m|V101w|V961w|V812|V818|V971|V971s|V919|V989|V116w|V102w|V973|Vi40)\\b[\\s]+",JaytechTablet:"TPC-PA762",BlaupunktTablet:"Endeavour 800NG|Endeavour 1010",DigmaTablet:"\\b(iDx10|iDx9|iDx8|iDx7|iDxD7|iDxD8|iDsQ8|iDsQ7|iDsQ8|iDsD10|iDnD7|3TS804H|iDsQ11|iDj7|iDs10)\\b",EvolioTablet:"ARIA_Mini_wifi|Aria[ _]Mini|Evolio X10|Evolio X7|Evolio X8|\\bEvotab\\b|\\bNeura\\b",LavaTablet:"QPAD E704|\\bIvoryS\\b|E-TAB IVORY",CelkonTablet:"CT695|CT888|CT[\\s]?910|CT7 Tab|CT9 Tab|CT3 Tab|CT2 Tab|CT1 Tab|C820|C720|\\bCT-1\\b",WolderTablet:"miTab \\b(DIAMOND|SPACE|BROOKLYN|NEO|FLY|MANHATTAN|FUNK|EVOLUTION|SKY|GOCAR|IRON|GENIUS|POP|MINT|EPSILON|BROADWAY|JUMP|HOP|LEGEND|NEW AGE|LINE|ADVANCE|FEEL|FOLLOW|LIKE|LINK|LIVE|THINK|FREEDOM|CHICAGO|CLEVELAND|BALTIMORE-GH|IOWA|BOSTON|SEATTLE|PHOENIX|DALLAS|IN 101|MasterChef)\\b",MiTablet:"\\bMI PAD\\b|\\bHM NOTE 1W\\b",NibiruTablet:"Nibiru M1|Nibiru Jupiter One",NexoTablet:"NEXO NOVA|NEXO 10|NEXO AVIO|NEXO FREE|NEXO GO|NEXO EVO|NEXO 3G|NEXO SMART|NEXO KIDDO|NEXO MOBI",UbislateTablet:"UbiSlate[\\s]?7C",PocketBookTablet:"Pocketbook",Hudl:"Hudl HT7S3",TelstraTablet:"T-Hub2",GenericTablet:"Android.*\\b97D\\b|Tablet(?!.*PC)|BNTV250A|MID-WCDMA|LogicPD Zoom2|\\bA7EB\\b|CatNova8|A1_07|CT704|CT1002|\\bM721\\b|rk30sdk|\\bEVOTAB\\b|M758A|ET904|ALUMIUM10|Smartfren Tab|Endeavour 1010|Tablet-PC-4|Tagi Tab|\\bM6pro\\b|CT1020W|arc 10HD|\\bJolla\\b"},oss:{AndroidOS:"Android",BlackBerryOS:"blackberry|\\bBB10\\b|rim tablet os",PalmOS:"PalmOS|avantgo|blazer|elaine|hiptop|palm|plucker|xiino",SymbianOS:"Symbian|SymbOS|Series60|Series40|SYB-[0-9]+|\\bS60\\b",WindowsMobileOS:"Windows CE.*(PPC|Smartphone|Mobile|[0-9]{3}x[0-9]{3})|Window Mobile|Windows Phone [0-9.]+|WCE;",WindowsPhoneOS:"Windows Phone 8.1|Windows Phone 8.0|Windows Phone OS|XBLWP7|ZuneWP7|Windows NT 6.[23]; ARM;",iOS:"\\biPhone.*Mobile|\\biPod|\\biPad",MeeGoOS:"MeeGo",MaemoOS:"Maemo",JavaOS:"J2ME/|\\bMIDP\\b|\\bCLDC\\b",webOS:"webOS|hpwOS",badaOS:"\\bBada\\b",BREWOS:"BREW"},uas:{Chrome:"\\bCrMo\\b|CriOS|Android.*Chrome/[.0-9]* (Mobile)?",Dolfin:"\\bDolfin\\b",Opera:"Opera.*Mini|Opera.*Mobi|Android.*Opera|Mobile.*OPR/[0-9.]+|Coast/[0-9.]+",Skyfire:"Skyfire",IE:"IEMobile|MSIEMobile",Firefox:"fennec|firefox.*maemo|(Mobile|Tablet).*Firefox|Firefox.*Mobile",Bolt:"bolt",TeaShark:"teashark",Blazer:"Blazer",Safari:"Version.*Mobile.*Safari|Safari.*Mobile|MobileSafari",Tizen:"Tizen",UCBrowser:"UC.*Browser|UCWEB",baiduboxapp:"baiduboxapp",baidubrowser:"baidubrowser",DiigoBrowser:"DiigoBrowser",Puffin:"Puffin",Mercury:"\\bMercury\\b",ObigoBrowser:"Obigo",NetFront:"NF-Browser",GenericBrowser:"NokiaBrowser|OviBrowser|OneBrowser|TwonkyBeamBrowser|SEMC.*Browser|FlyFlow|Minimo|NetFront|Novarra-Vision|MQQBrowser|MicroMessenger"},props:{Mobile:"Mobile/[VER]",Build:"Build/[VER]",Version:"Version/[VER]",VendorID:"VendorID/[VER]",iPad:"iPad.*CPU[a-z ]+[VER]",iPhone:"iPhone.*CPU[a-z ]+[VER]",iPod:"iPod.*CPU[a-z ]+[VER]",Kindle:"Kindle/[VER]",Chrome:["Chrome/[VER]","CriOS/[VER]","CrMo/[VER]"],Coast:["Coast/[VER]"],Dolfin:"Dolfin/[VER]",Firefox:"Firefox/[VER]",Fennec:"Fennec/[VER]",IE:["IEMobile/[VER];","IEMobile [VER]","MSIE [VER];","Trident/[0-9.]+;.*rv:[VER]"],NetFront:"NetFront/[VER]",NokiaBrowser:"NokiaBrowser/[VER]",Opera:[" OPR/[VER]","Opera Mini/[VER]","Version/[VER]"],"Opera Mini":"Opera Mini/[VER]","Opera Mobi":"Version/[VER]","UC Browser":"UC Browser[VER]",MQQBrowser:"MQQBrowser/[VER]",MicroMessenger:"MicroMessenger/[VER]",baiduboxapp:"baiduboxapp/[VER]",baidubrowser:"baidubrowser/[VER]",Iron:"Iron/[VER]",Safari:["Version/[VER]","Safari/[VER]"],Skyfire:"Skyfire/[VER]",Tizen:"Tizen/[VER]",Webkit:"webkit[ /][VER]",Gecko:"Gecko/[VER]",Trident:"Trident/[VER]",Presto:"Presto/[VER]",iOS:" \\bi?OS\\b [VER][ ;]{1}",Android:"Android [VER]",BlackBerry:["BlackBerry[\\w]+/[VER]","BlackBerry.*Version/[VER]","Version/[VER]"],BREW:"BREW [VER]",Java:"Java/[VER]","Windows Phone OS":["Windows Phone OS [VER]","Windows Phone [VER]"],"Windows Phone":"Windows Phone [VER]","Windows CE":"Windows CE/[VER]","Windows NT":"Windows NT [VER]",Symbian:["SymbianOS/[VER]","Symbian/[VER]"],webOS:["webOS/[VER]","hpwOS/[VER];"]},utils:{Bot:"Googlebot|facebookexternalhit|AdsBot-Google|Google Keyword Suggestion|Facebot|YandexBot|bingbot|ia_archiver|AhrefsBot|Ezooms|GSLFbot|WBSearchBot|Twitterbot|TweetmemeBot|Twikle|PaperLiBot|Wotbox|UnwindFetchor",MobileBot:"Googlebot-Mobile|AdsBot-Google-Mobile|YahooSeeker/M1A1-R2D2",DesktopMode:"WPDesktop",TV:"SonyDTV|HbbTV",WebKit:"(webkit)[ /]([\\w.]+)",Console:"\\b(Nintendo|Nintendo WiiU|Nintendo 3DS|PLAYSTATION|Xbox)\\b",Watch:"SM-V700"}},n.detectMobileBrowsers={fullPattern:/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i,shortPattern:/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i,tabletPattern:/android|ipad|playbook|silk/i};var s,o=Object.prototype.hasOwnProperty;return n.FALLBACK_PHONE="UnknownPhone",n.FALLBACK_TABLET="UnknownTablet",n.FALLBACK_MOBILE="UnknownMobile",s="isArray"in Array?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)},function(){var e,i,r,a,l,c,u=n.mobileDetectRules;for(e in u.props)if(o.call(u.props,e)){for(i=u.props[e],s(i)||(i=[i]),l=i.length,a=0;a<l;++a)r=i[a],c=r.indexOf("[VER]"),c>=0&&(r=r.substring(0,c)+"([\\w._\\+]+)"+r.substring(c+5)),i[a]=new RegExp(r,"i");u.props[e]=i}t(u.oss),t(u.phones),t(u.tablets),t(u.uas),t(u.utils),u.oss0={WindowsPhoneOS:u.oss.WindowsPhoneOS,WindowsMobileOS:u.oss.WindowsMobileOS}}(),n.findMatch=function(e,t){for(var i in e)if(o.call(e,i)&&e[i].test(t))return i;return null},n.getVersionStr=function(e,t){var i,s,r,a,l=n.mobileDetectRules.props;if(o.call(l,e))for(i=l[e],r=i.length,s=0;s<r;++s)if(null!==(a=i[s].exec(t)))return a[1];return null},n.getVersion=function(e,t){var i=n.getVersionStr(e,t);return i?n.prepareVersionNo(i):NaN},n.prepareVersionNo=function(e){var t;return t=e.split(/[a-z._ \/\-]/i),1===t.length&&(e=t[0]),t.length>1&&(e=t[0]+".",t.shift(),e+=t.join("")),Number(e)},n.isMobileFallback=function(e){return n.detectMobileBrowsers.fullPattern.test(e)||n.detectMobileBrowsers.shortPattern.test(e.substr(0,4))},n.isTabletFallback=function(e){return n.detectMobileBrowsers.tabletPattern.test(e)},n.prepareDetectionCache=function(e,t,s){if(void 0===e.mobile){var o,r,a;if(r=n.findMatch(n.mobileDetectRules.tablets,t))return e.mobile=e.tablet=r,void(e.phone=null);if(o=n.findMatch(n.mobileDetectRules.phones,t))return e.mobile=e.phone=o,void(e.tablet=null);n.isMobileFallback(t)?(a=i.isPhoneSized(s),void 0===a?(e.mobile=n.FALLBACK_MOBILE,e.tablet=e.phone=null):a?(e.mobile=e.phone=n.FALLBACK_PHONE,e.tablet=null):(e.mobile=e.tablet=n.FALLBACK_TABLET,e.phone=null)):n.isTabletFallback(t)?(e.mobile=e.tablet=n.FALLBACK_TABLET,e.phone=null):e.mobile=e.tablet=e.phone=null}},n.mobileGrade=function(e){var t=null!==e.mobile();return e.os("iOS")&&e.version("iPad")>=4.3||e.os("iOS")&&e.version("iPhone")>=3.1||e.os("iOS")&&e.version("iPod")>=3.1||e.version("Android")>2.1&&e.is("Webkit")||e.version("Windows Phone OS")>=7||e.is("BlackBerry")&&e.version("BlackBerry")>=6||e.match("Playbook.*Tablet")||e.version("webOS")>=1.4&&e.match("Palm|Pre|Pixi")||e.match("hp.*TouchPad")||e.is("Firefox")&&e.version("Firefox")>=12||e.is("Chrome")&&e.is("AndroidOS")&&e.version("Android")>=4||e.is("Skyfire")&&e.version("Skyfire")>=4.1&&e.is("AndroidOS")&&e.version("Android")>=2.3||e.is("Opera")&&e.version("Opera Mobi")>11&&e.is("AndroidOS")||e.is("MeeGoOS")||e.is("Tizen")||e.is("Dolfin")&&e.version("Bada")>=2||(e.is("UC Browser")||e.is("Dolfin"))&&e.version("Android")>=2.3||e.match("Kindle Fire")||e.is("Kindle")&&e.version("Kindle")>=3||e.is("AndroidOS")&&e.is("NookTablet")||e.version("Chrome")>=11&&!t||e.version("Safari")>=5&&!t||e.version("Firefox")>=4&&!t||e.version("MSIE")>=7&&!t||e.version("Opera")>=10&&!t?"A":e.os("iOS")&&e.version("iPad")<4.3||e.os("iOS")&&e.version("iPhone")<3.1||e.os("iOS")&&e.version("iPod")<3.1||e.is("Blackberry")&&e.version("BlackBerry")>=5&&e.version("BlackBerry")<6||e.version("Opera Mini")>=5&&e.version("Opera Mini")<=6.5&&(e.version("Android")>=2.3||e.is("iOS"))||e.match("NokiaN8|NokiaC7|N97.*Series60|Symbian/3")||e.version("Opera Mobi")>=11&&e.is("SymbianOS")?"B":(e.version("BlackBerry")<5||e.match("MSIEMobile|Windows CE.*Mobile")||e.version("Windows Mobile"),"C")},n.detectOS=function(e){return n.findMatch(n.mobileDetectRules.oss0,e)||n.findMatch(n.mobileDetectRules.oss,e)},n.getDeviceSmallerSide=function(){return window.screen.width<window.screen.height?window.screen.width:window.screen.height},i.prototype={constructor:i,mobile:function(){return n.prepareDetectionCache(this._cache,this.ua,this.maxPhoneWidth),this._cache.mobile},phone:function(){return n.prepareDetectionCache(this._cache,this.ua,this.maxPhoneWidth),this._cache.phone},tablet:function(){return n.prepareDetectionCache(this._cache,this.ua,this.maxPhoneWidth),this._cache.tablet},userAgent:function(){return void 0===this._cache.userAgent&&(this._cache.userAgent=n.findMatch(n.mobileDetectRules.uas,this.ua)),this._cache.userAgent},os:function(){return void 0===this._cache.os&&(this._cache.os=n.detectOS(this.ua)),this._cache.os},version:function(e){return n.getVersion(e,this.ua)},versionStr:function(e){return n.getVersionStr(e,this.ua)},is:function(t){return e(t,this.userAgent())||e(t,this.os())||e(t,this.phone())||e(t,this.tablet())||e(t,n.findMatch(n.mobileDetectRules.utils,this.ua))},match:function(e){return e instanceof RegExp||(e=new RegExp(e,"i")),e.test(this.ua)},isPhoneSized:function(e){return i.isPhoneSized(e||this.maxPhoneWidth)},mobileGrade:function(){return void 0===this._cache.grade&&(this._cache.grade=n.mobileGrade(this)),this._cache.grade}},"undefined"!=typeof window&&window.screen?i.isPhoneSized=function(e){return e<0?void 0:n.getDeviceSmallerSide()<=e}:i.isPhoneSized=function(){},i._impl=n,i})}(function(e){if("undefined"!=typeof module&&module.exports)return function(e){module.exports=e()};if("function"==typeof define&&define.amd)return define;if("undefined"!=typeof window)return function(e){window.MobileDetect=e()};throw new Error("unknown environment")}()),define("js/vm/mobileDetect",["js/lib/mobile.detect.js/mobileDetect"],function(e){function t(t){void 0===t&&(t=navigator.userAgent);var i=new e(t),n=window.devicePixelRatio||parseFloat(window.screen.availWidth/document.documentElement.clientWidth).toFixed(2)||1,s=window.innerWidth*n,o=window.innerHeight*n,r=s>o?"portrait":"landscape";return this.res={ratio:n,screenWidth:s,screenHeight:o,deviceType:"",deviceName:"",screenOrientation:r},null!=i.phone()?(this.res.deviceType="phone",this.res.deviceName=i.phone()):null!=i.tablet()?(this.res.deviceType="tablet",this.res.deviceName=i.tablet()):null==i.mobile()?this.res.deviceType="desktop":this.res.deviceType=s>=320&&s<=480&&n>=1||s>=320&&s<=568&&n>=1||s>=375&&s<=667&&n>=1||s>=414&&s<=736&&n>=2||s>=320&&s<=640&&n>=1||s>=360&&s<=640&&n>=1?"phone":s>=768&&s<=1024&&1==n||s>=800&&s<=1280&&1==n||s>=601&&s<=906&&n>=1||s>=800&&s<=1280&&n>=1||s>=1200&&s<=1600&&n>=1?"tablet":s>=1200&&s<=1600&&2==n?"retina":"desktop",this.res}return t}),define("js/lib/nemo.jquery.chosen/chosen.jquery",["jquery"],function(e){(function(){var t,i,n,s,o,r=function(e,t){return function(){return e.apply(t,arguments)}},a={}.hasOwnProperty,l=function(e,t){function i(){this.constructor=e}for(var n in t)a.call(t,n)&&(e[n]=t[n]);return i.prototype=t.prototype,e.prototype=new i,e.__super__=t.prototype,e};s=function(){function e(){this.options_index=0,this.parsed=[]}return e.prototype.add_node=function(e){return"OPTGROUP"===e.nodeName.toUpperCase()?this.add_group(e):this.add_option(e)},e.prototype.add_group=function(e){var t,i,n,s,o,r;for(t=this.parsed.length,this.parsed.push({array_index:t,group:!0,label:this.escapeExpression(e.label),title:e.title?e.title:void 0,children:0,disabled:e.disabled,classes:e.className}),o=e.childNodes,r=[],n=0,s=o.length;n<s;n++)i=o[n],r.push(this.add_option(i,t,e.disabled));return r},e.prototype.add_option=function(e,t,i){if("OPTION"===e.nodeName.toUpperCase())return""!==e.text?(null!=t&&(this.parsed[t].children+=1),this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,value:e.value,text:e.text,html:e.innerHTML,title:e.title?e.title:void 0,selected:e.selected,disabled:!0===i?i:e.disabled,group_array_index:t,group_label:null!=t?this.parsed[t].label:null,classes:e.className,style:e.style.cssText})):this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,empty:!0}),this.options_index+=1},e.prototype.escapeExpression=function(e){var t,i;return null==e||!1===e?"":/[\&\<\>\"\'\`]/.test(e)?(t={"<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},i=/&(?!\w+;)|[\<\>\"\'\`]/g,e.replace(i,function(e){return t[e]||"&amp;"})):e},e}(),s.select_to_array=function(e){var t,i,n,o,r;for(i=new s,r=e.childNodes,n=0,o=r.length;n<o;n++)t=r[n],i.add_node(t);return i.parsed},i=function(){function e(t,i){this.form_field=t,this.options=null!=i?i:{},this.label_click_handler=r(this.label_click_handler,this),e.browser_is_supported()&&(this.is_multiple=this.form_field.multiple,this.set_default_text(),this.set_default_values(),this.setup(),this.set_up_html(),this.register_observers(),this.on_ready())}return e.prototype.set_default_values=function(){var e=this;return this.click_test_action=function(t){return e.test_active_click(t)},this.activate_action=function(t){return e.activate_field(t)},this.active_field=!1,this.mouse_on_container=!1,this.results_showing=!1,this.result_highlighted=null,this.is_rtl=this.options.rtl||/\bchosen-rtl\b/.test(this.form_field.className),this.allow_single_deselect=null!=this.options.allow_single_deselect&&null!=this.form_field.options[0]&&""===this.form_field.options[0].text&&this.options.allow_single_deselect,this.disable_search_threshold=this.options.disable_search_threshold||0,this.disable_search=this.options.disable_search||!1,this.enable_split_word_search=null==this.options.enable_split_word_search||this.options.enable_split_word_search,this.group_search=null==this.options.group_search||this.options.group_search,this.search_in_values=this.options.search_in_values||!1,this.search_contains=this.options.search_contains||!1,this.single_backstroke_delete=null==this.options.single_backstroke_delete||this.options.single_backstroke_delete,this.max_selected_options=this.options.max_selected_options||1/0,this.inherit_select_classes=this.options.inherit_select_classes||!1,this.display_selected_options=null==this.options.display_selected_options||this.options.display_selected_options,this.display_disabled_options=null==this.options.display_disabled_options||this.options.display_disabled_options,this.include_group_label_in_selected=this.options.include_group_label_in_selected||!1,this.max_shown_results=this.options.max_shown_results||Number.POSITIVE_INFINITY,this.case_sensitive_search=this.options.case_sensitive_search||!1,this.hide_results_on_select=null==this.options.hide_results_on_select||this.options.hide_results_on_select},e.prototype.set_default_text=function(){return this.form_field.getAttribute("data-placeholder")?this.default_text=this.form_field.getAttribute("data-placeholder"):this.is_multiple?this.default_text=this.options.placeholder_text_multiple||this.options.placeholder_text||e.default_multiple_text:this.default_text=this.options.placeholder_text_single||this.options.placeholder_text||e.default_single_text,this.default_text=this.escape_html(this.default_text),this.results_none_found=this.form_field.getAttribute("data-no_results_text")||this.options.no_results_text||e.default_no_result_text},e.prototype.choice_label=function(e){return this.include_group_label_in_selected&&null!=e.group_label?"<b class='group-name'>"+e.group_label+"</b>"+e.html:e.html},e.prototype.mouse_enter=function(){return this.mouse_on_container=!0},e.prototype.mouse_leave=function(){return this.mouse_on_container=!1},e.prototype.input_focus=function(e){var t=this;if(this.is_multiple){if(!this.active_field)return setTimeout(function(){return t.container_mousedown()},50)}else if(!this.active_field)return this.activate_field()},e.prototype.input_blur=function(e){var t=this;if(!this.mouse_on_container)return this.active_field=!1,setTimeout(function(){return t.blur_test()},100)},e.prototype.label_click_handler=function(e){return this.is_multiple?this.container_mousedown(e):this.activate_field()},e.prototype.results_option_build=function(e){var t,i,n,s,o,r,a;for(t="",s=0,a=this.results_data,o=0,r=a.length;o<r&&(i=a[o],n="",n=i.group?this.result_add_group(i):this.result_add_option(i),""!==n&&(s++,t+=n),(null!=e?e.first:void 0)&&(i.selected&&this.is_multiple?this.choice_build(i):i.selected&&!this.is_multiple&&this.single_set_selected_text(this.choice_label(i))),!(s>=this.max_shown_results));o++);return t},e.prototype.result_add_option=function(e){var t,i;return e.search_match&&this.include_option_in_results(e)?(t=[],e.disabled||e.selected&&this.is_multiple||t.push("active-result"),!e.disabled||e.selected&&this.is_multiple||t.push("disabled-result"),e.selected&&t.push("result-selected"),null!=e.group_array_index&&t.push("group-option"),""!==e.classes&&t.push(e.classes),i=document.createElement("li"),i.className=t.join(" "),i.style.cssText=e.style,i.setAttribute("data-option-array-index",e.array_index),i.innerHTML=e.search_text,e.title&&(i.title=e.title),this.outerHTML(i)):""},e.prototype.result_add_group=function(e){var t,i;return(e.search_match||e.group_match)&&e.active_options>0?(t=[],t.push("group-result"),e.classes&&t.push(e.classes),i=document.createElement("li"),i.className=t.join(" "),i.innerHTML=e.search_text,e.title&&(i.title=e.title),this.outerHTML(i)):""},e.prototype.results_update_field=function(){if(this.set_default_text(),this.is_multiple||this.results_reset_cleanup(),this.result_clear_highlight(),this.results_build(),this.results_showing)return this.winnow_results()},e.prototype.reset_single_select_options=function(){var e,t,i,n,s;for(n=this.results_data,s=[],t=0,i=n.length;t<i;t++)e=n[t],e.selected?s.push(e.selected=!1):s.push(void 0);return s},e.prototype.results_toggle=function(){return this.results_showing?this.results_hide():this.results_show()},e.prototype.results_search=function(e){return this.results_showing?this.winnow_results():this.results_show()},e.prototype.winnow_results=function(){var e,t,i,n,s,o,r,a,l,c,u,h,d;for(this.no_results_clear(),s=0,a=this.get_search_text(),r=null,e=a.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),n=this.get_search_regex(e),t=this.get_highlight_regex(e),d=this.results_data,u=0,h=d.length;u<h;u++)i=d[u],i.search_match=!1,o=null,this.include_option_in_results(i)&&(i.group&&(i.group_match=!1,i.active_options=0),null!=i.group_array_index&&this.results_data[i.group_array_index]&&(o=this.results_data[i.group_array_index],0===o.active_options&&o.search_match&&(s+=1),o.active_options+=1),i.search_text=i.group?i.label:i.html,i.group&&!this.group_search||(i.search_match=this.search_string_match(i.search_text,n),!i.search_match&&this.search_in_values&&(i.search_match=this.search_string_match(i.value,n),r=!0),i.search_match&&!i.group&&(s+=1),i.search_match?(a.length&&!r&&(l=i.search_text.search(t),c=i.search_text.substr(0,l+a.length)+"</em>"+i.search_text.substr(l+a.length),i.search_text=c.substr(0,l)+"<em>"+c.substr(l)),null!=o&&(o.group_match=!0)):null!=i.group_array_index&&this.results_data[i.group_array_index].search_match&&(i.search_match=!0)));return this.result_clear_highlight(),s<1&&a.length?(this.update_results_content(""),this.no_results(a)):(this.update_results_content(this.results_option_build()),this.winnow_results_set_highlight())},e.prototype.get_search_regex=function(e){var t,i;return t=this.search_contains?"":"^",i=this.case_sensitive_search?"":"i",new RegExp(t+e,i)},e.prototype.get_highlight_regex=function(e){var t,i;return t=this.search_contains?"":"\\b",i=this.case_sensitive_search?"":"i",new RegExp(t+e,i)},e.prototype.search_string_match=function(e,t){var i,n,s,o;if(t.test(e))return!0;if(this.enable_split_word_search&&(e.indexOf(" ")>=0||0===e.indexOf("["))&&(n=e.replace(/\[|\]/g,"").split(" "),n.length))for(s=0,o=n.length;s<o;s++)if(i=n[s],t.test(i))return!0},e.prototype.choices_count=function(){var e,t,i,n;if(null!=this.selected_option_count)return this.selected_option_count;for(this.selected_option_count=0,n=this.form_field.options,t=0,i=n.length;t<i;t++)e=n[t],e.selected&&(this.selected_option_count+=1);return this.selected_option_count},e.prototype.choices_click=function(e){if(e.preventDefault(),this.activate_field(),!this.results_showing&&!this.is_disabled)return this.results_show()},e.prototype.keydown_checker=function(e){var t,i;switch(t=null!=(i=e.which)?i:e.keyCode,this.search_field_scale(),8!==t&&this.pending_backstroke&&this.clear_backstroke(),t){case 8:this.backstroke_length=this.get_search_field_value().length;break;case 9:this.results_showing&&!this.is_multiple&&this.result_select(e),this.mouse_on_container=!1;break;case 13:case 27:this.results_showing&&e.preventDefault();break;case 32:this.disable_search&&e.preventDefault();break;case 38:e.preventDefault(),this.keyup_arrow();break;case 40:e.preventDefault(),this.keydown_arrow()}},e.prototype.keyup_checker=function(e){var t,i;switch(t=null!=(i=e.which)?i:e.keyCode,this.search_field_scale(),t){case 8:this.is_multiple&&this.backstroke_length<1&&this.choices_count()>0?this.keydown_backstroke():this.pending_backstroke||(this.result_clear_highlight(),this.results_search());break;case 13:e.preventDefault(),this.results_showing&&this.result_select(e);break;case 27:this.results_showing&&this.results_hide();break;case 9:case 16:case 17:case 18:case 38:case 40:case 91:break;default:this.results_search()}},e.prototype.clipboard_event_checker=function(e){var t=this;if(!this.is_disabled)return setTimeout(function(){return t.results_search()},50)},e.prototype.container_width=function(){return null!=this.options.width?this.options.width:this.form_field.offsetWidth+"px"},e.prototype.include_option_in_results=function(e){return!(this.is_multiple&&!this.display_selected_options&&e.selected)&&(!(!this.display_disabled_options&&e.disabled)&&!e.empty)},e.prototype.search_results_touchstart=function(e){return this.touch_started=!0,this.search_results_mouseover(e)},e.prototype.search_results_touchmove=function(e){return this.touch_started=!1,this.search_results_mouseout(e)},e.prototype.search_results_touchend=function(e){if(this.touch_started)return this.search_results_mouseup(e)},e.prototype.outerHTML=function(e){var t;return e.outerHTML?e.outerHTML:(t=document.createElement("div"),t.appendChild(e),t.innerHTML)},e.prototype.get_single_html=function(){return'<a class="chosen-single chosen-default">\n  <span>'+this.default_text+'</span>\n  <div><b></b></div>\n</a>\n<div class="chosen-drop">\n  <div class="chosen-search">\n    <input class="chosen-search-input" type="text" autocomplete="off" />\n  </div>\n  <ul class="chosen-results"></ul>\n</div>'},e.prototype.get_multi_html=function(){return'<ul class="chosen-choices">\n  <li class="search-field">\n    <input class="chosen-search-input" type="text" autocomplete="off" value="'+this.default_text+'" />\n  </li>\n</ul>\n<div class="chosen-drop">\n  <ul class="chosen-results"></ul>\n</div>'},e.prototype.get_no_results_html=function(e){return'<li class="no-results">\n  '+this.results_none_found+" <span>"+e+"</span>\n</li>"},e.browser_is_supported=function(){return"Microsoft Internet Explorer"===window.navigator.appName?document.documentMode>=8:!(/iP(od|hone)/i.test(window.navigator.userAgent)||/IEMobile/i.test(window.navigator.userAgent)||/Windows Phone/i.test(window.navigator.userAgent)||/BlackBerry/i.test(window.navigator.userAgent)||/BB10/i.test(window.navigator.userAgent)||/Android.*Mobile/i.test(window.navigator.userAgent))},e.default_multiple_text="Select Some Options",e.default_single_text="Select an Option",e.default_no_result_text="No results match",e}(),t=e,t.fn.extend({chosen:function(e){return i.browser_is_supported()?this.each(function(i){var s,o;if(s=t(this),o=s.data("chosen"),"destroy"===e)return void(o instanceof n&&o.destroy());o instanceof n||s.data("chosen",new n(this,e))}):this}}),n=function(e){function i(){return o=i.__super__.constructor.apply(this,arguments)}return l(i,e),i.prototype.setup=function(){return this.form_field_jq=t(this.form_field),this.current_selectedIndex=this.form_field.selectedIndex},i.prototype.set_up_html=function(){var e,i;return e=["chosen-container"],e.push("chosen-container-"+(this.is_multiple?"multi":"single")),this.inherit_select_classes&&this.form_field.className&&e.push(this.form_field.className),this.is_rtl&&e.push("chosen-rtl"),i={class:e.join(" "),title:this.form_field.title},this.form_field.id.length&&(i.id=this.form_field.id.replace(/[^\w]/g,"_")+"_chosen"),this.container=t("<div />",i),this.container.width(this.container_width()),this.is_multiple?this.container.html(this.get_multi_html()):this.container.html(this.get_single_html()),this.form_field_jq.hide().after(this.container),this.dropdown=this.container.find("div.chosen-drop").first(),this.search_field=this.container.find("input").first(),this.search_results=this.container.find("ul.chosen-results").first(),this.search_field_scale(),this.search_no_results=this.container.find("li.no-results").first(),this.is_multiple?(this.search_choices=this.container.find("ul.chosen-choices").first(),this.search_container=this.container.find("li.search-field").first()):(this.search_container=this.container.find("div.chosen-search").first(),this.selected_item=this.container.find(".chosen-single").first()),this.results_build(),this.set_tab_index(),this.set_label_behavior()},i.prototype.on_ready=function(){return this.form_field_jq.trigger("chosen:ready",{chosen:this})},i.prototype.register_observers=function(){var e=this;return this.container.bind("touchstart.chosen",function(t){e.container_mousedown(t)}),this.container.bind("touchend.chosen",function(t){e.container_mouseup(t)}),this.container.bind("mousedown.chosen",function(t){e.container_mousedown(t)}),this.container.bind("mouseup.chosen",function(t){e.container_mouseup(t)}),this.container.bind("mouseenter.chosen",function(t){e.mouse_enter(t)}),this.container.bind("mouseleave.chosen",function(t){e.mouse_leave(t)}),this.search_results.bind("mouseup.chosen",function(t){e.search_results_mouseup(t)}),this.search_results.bind("mouseover.chosen",function(t){e.search_results_mouseover(t)}),this.search_results.bind("mouseout.chosen",function(t){e.search_results_mouseout(t)}),this.search_results.bind("mousewheel.chosen DOMMouseScroll.chosen",function(t){e.search_results_mousewheel(t)}),this.search_results.bind("touchstart.chosen",function(t){e.search_results_touchstart(t)}),this.search_results.bind("touchmove.chosen",function(t){e.search_results_touchmove(t)}),this.search_results.bind("touchend.chosen",function(t){e.search_results_touchend(t)}),this.form_field_jq.bind("chosen:updated.chosen",function(t){e.results_update_field(t)}),this.form_field_jq.bind("chosen:activate.chosen",function(t){e.activate_field(t)}),this.form_field_jq.bind("chosen:open.chosen",function(t){e.container_mousedown(t)}),this.form_field_jq.bind("chosen:close.chosen",function(t){e.close_field(t)}),this.search_field.bind("blur.chosen",function(t){e.input_blur(t)}),this.search_field.bind("keyup.chosen",function(t){e.keyup_checker(t)}),this.search_field.bind("keydown.chosen",function(t){e.keydown_checker(t)}),this.search_field.bind("focus.chosen",function(t){e.input_focus(t)}),this.search_field.bind("cut.chosen",function(t){e.clipboard_event_checker(t)}),this.search_field.bind("paste.chosen",function(t){e.clipboard_event_checker(t)}),this.is_multiple?this.search_choices.bind("click.chosen",function(t){e.choices_click(t)}):this.container.bind("click.chosen",function(e){e.preventDefault()})},i.prototype.destroy=function(){return t(this.container[0].ownerDocument).unbind("click.chosen",this.click_test_action),this.form_field_label.length>0&&this.form_field_label.unbind("click.chosen"),this.search_field[0].tabIndex&&(this.form_field_jq[0].tabIndex=this.search_field[0].tabIndex),this.container.remove(),this.form_field_jq.removeData("chosen"),this.form_field_jq.show()},i.prototype.search_field_disabled=function(){return this.is_disabled=this.form_field.disabled||this.form_field_jq.parents("fieldset").is(":disabled"),this.container.toggleClass("chosen-disabled",this.is_disabled),this.search_field[0].disabled=this.is_disabled,this.is_multiple||this.selected_item.unbind("focus.chosen",this.activate_field),this.is_disabled?this.close_field():this.is_multiple?void 0:this.selected_item.bind("focus.chosen",this.activate_field)},i.prototype.container_mousedown=function(e){var i;if(!this.is_disabled)return!e||"mousedown"!==(i=e.type)&&"touchstart"!==i||this.results_showing||e.preventDefault(),
null!=e&&t(e.target).hasClass("search-choice-close")?void 0:(this.active_field?this.is_multiple||!e||t(e.target)[0]!==this.selected_item[0]&&!t(e.target).parents("a.chosen-single").length||(e.preventDefault(),this.results_toggle()):(this.is_multiple&&this.search_field.val(""),t(this.container[0].ownerDocument).bind("click.chosen",this.click_test_action),this.results_show()),this.activate_field())},i.prototype.container_mouseup=function(e){if("ABBR"===e.target.nodeName&&!this.is_disabled)return this.results_reset(e)},i.prototype.search_results_mousewheel=function(e){var t;if(e.originalEvent&&(t=e.originalEvent.deltaY||-e.originalEvent.wheelDelta||e.originalEvent.detail),null!=t)return e.preventDefault(),"DOMMouseScroll"===e.type&&(t*=40),this.search_results.scrollTop(t+this.search_results.scrollTop())},i.prototype.blur_test=function(e){if(!this.active_field&&this.container.hasClass("chosen-container-active"))return this.close_field()},i.prototype.close_field=function(){return t(this.container[0].ownerDocument).unbind("click.chosen",this.click_test_action),this.active_field=!1,this.results_hide(),this.container.removeClass("chosen-container-active"),this.clear_backstroke(),this.show_search_field_default(),this.search_field_scale(),this.search_field.blur()},i.prototype.activate_field=function(){if(!this.is_disabled)return this.container.addClass("chosen-container-active"),this.active_field=!0,this.search_field.val(this.search_field.val()),this.search_field.focus()},i.prototype.test_active_click=function(e){var i;return i=t(e.target).closest(".chosen-container"),i.length&&this.container[0]===i[0]?this.active_field=!0:this.close_field()},i.prototype.results_build=function(){return this.parsing=!0,this.selected_option_count=null,this.results_data=s.select_to_array(this.form_field),this.is_multiple?this.search_choices.find("li.search-choice").remove():this.is_multiple||(this.single_set_selected_text(),this.disable_search||this.form_field.options.length<=this.disable_search_threshold?(this.search_field[0].readOnly=!0,this.container.addClass("chosen-container-single-nosearch")):(this.search_field[0].readOnly=!1,this.container.removeClass("chosen-container-single-nosearch"))),this.update_results_content(this.results_option_build({first:!0})),this.search_field_disabled(),this.show_search_field_default(),this.search_field_scale(),this.parsing=!1},i.prototype.result_do_highlight=function(e){var t,i,n,s,o;if(e.length){if(this.result_clear_highlight(),this.result_highlight=e,this.result_highlight.addClass("highlighted"),n=parseInt(this.search_results.css("maxHeight"),10),o=this.search_results.scrollTop(),s=n+o,i=this.result_highlight.position().top+this.search_results.scrollTop(),(t=i+this.result_highlight.outerHeight())>=s)return this.search_results.scrollTop(t-n>0?t-n:0);if(i<o)return this.search_results.scrollTop(i)}},i.prototype.result_clear_highlight=function(){return this.result_highlight&&this.result_highlight.removeClass("highlighted"),this.result_highlight=null},i.prototype.results_show=function(){return this.is_multiple&&this.max_selected_options<=this.choices_count()?(this.form_field_jq.trigger("chosen:maxselected",{chosen:this}),!1):(this.container.addClass("chosen-with-drop"),this.results_showing=!0,this.search_field.focus(),this.search_field.val(this.get_search_field_value()),this.winnow_results(),this.form_field_jq.trigger("chosen:showing_dropdown",{chosen:this}))},i.prototype.update_results_content=function(e){return this.search_results.html(e)},i.prototype.results_hide=function(){return this.results_showing&&(this.result_clear_highlight(),this.container.removeClass("chosen-with-drop"),this.form_field_jq.trigger("chosen:hiding_dropdown",{chosen:this})),this.results_showing=!1},i.prototype.set_tab_index=function(e){var t;if(this.form_field.tabIndex)return t=this.form_field.tabIndex,this.form_field.tabIndex=-1,this.search_field[0].tabIndex=t},i.prototype.set_label_behavior=function(){if(this.form_field_label=this.form_field_jq.parents("label"),!this.form_field_label.length&&this.form_field.id.length&&(this.form_field_label=t("label[for='"+this.form_field.id+"']")),this.form_field_label.length>0)return this.form_field_label.bind("click.chosen",this.label_click_handler)},i.prototype.show_search_field_default=function(){return this.is_multiple&&this.choices_count()<1&&!this.active_field?(this.search_field.val(this.default_text),this.search_field.addClass("default")):(this.search_field.val(""),this.search_field.removeClass("default"))},i.prototype.search_results_mouseup=function(e){var i;if(i=t(e.target).hasClass("active-result")?t(e.target):t(e.target).parents(".active-result").first(),i.length)return this.result_highlight=i,this.result_select(e),this.search_field.focus()},i.prototype.search_results_mouseover=function(e){var i;if(i=t(e.target).hasClass("active-result")?t(e.target):t(e.target).parents(".active-result").first())return this.result_do_highlight(i)},i.prototype.search_results_mouseout=function(e){if(t(e.target).hasClass("active-result"))return this.result_clear_highlight()},i.prototype.choice_build=function(e){var i,n,s=this;return i=t("<li />",{class:"search-choice"}).html("<span>"+this.choice_label(e)+"</span>"),e.disabled?i.addClass("search-choice-disabled"):(n=t("<a />",{class:"search-choice-close","data-option-array-index":e.array_index}),n.bind("click.chosen",function(e){return s.choice_destroy_link_click(e)}),i.append(n)),this.search_container.before(i)},i.prototype.choice_destroy_link_click=function(e){if(e.preventDefault(),e.stopPropagation(),!this.is_disabled)return this.choice_destroy(t(e.target))},i.prototype.choice_destroy=function(e){if(this.result_deselect(e[0].getAttribute("data-option-array-index")))return this.active_field?this.search_field.focus():this.show_search_field_default(),this.is_multiple&&this.choices_count()>0&&this.get_search_field_value().length<1&&this.results_hide(),e.parents("li").first().remove(),this.search_field_scale()},i.prototype.results_reset=function(){if(this.reset_single_select_options(),this.form_field.options[0].selected=!0,this.single_set_selected_text(),this.show_search_field_default(),this.results_reset_cleanup(),this.trigger_form_field_change(),this.active_field)return this.results_hide()},i.prototype.results_reset_cleanup=function(){return this.current_selectedIndex=this.form_field.selectedIndex,this.selected_item.find("abbr").remove()},i.prototype.result_select=function(e){var t,i;if(this.result_highlight)return t=this.result_highlight,this.result_clear_highlight(),this.is_multiple&&this.max_selected_options<=this.choices_count()?(this.form_field_jq.trigger("chosen:maxselected",{chosen:this}),!1):(this.is_multiple?t.removeClass("active-result"):this.reset_single_select_options(),t.addClass("result-selected"),i=this.results_data[t[0].getAttribute("data-option-array-index")],i.selected=!0,this.form_field.options[i.options_index].selected=!0,this.form_field.dispatchEvent(new Event("change")),this.selected_option_count=null,this.is_multiple?this.choice_build(i):this.single_set_selected_text(this.choice_label(i)),this.is_multiple&&(!this.hide_results_on_select||e.metaKey||e.ctrlKey)||(this.results_hide(),this.show_search_field_default()),(this.is_multiple||this.form_field.selectedIndex!==this.current_selectedIndex)&&this.trigger_form_field_change({selected:this.form_field.options[i.options_index].value}),this.current_selectedIndex=this.form_field.selectedIndex,e.preventDefault(),this.search_field_scale())},i.prototype.single_set_selected_text=function(e){return null==e&&(e=this.default_text),e===this.default_text?this.selected_item.addClass("chosen-default"):(this.single_deselect_control_build(),this.selected_item.removeClass("chosen-default")),this.selected_item.find("span").html(e)},i.prototype.result_deselect=function(e){var t;return t=this.results_data[e],!this.form_field.options[t.options_index].disabled&&(t.selected=!1,this.form_field.options[t.options_index].selected=!1,this.selected_option_count=null,this.result_clear_highlight(),this.results_showing&&this.winnow_results(),this.trigger_form_field_change({deselected:this.form_field.options[t.options_index].value}),this.search_field_scale(),!0)},i.prototype.single_deselect_control_build=function(){if(this.allow_single_deselect)return this.selected_item.find("abbr").length||this.selected_item.find("span").first().after('<abbr class="search-choice-close"></abbr>'),this.selected_item.addClass("chosen-single-with-deselect")},i.prototype.get_search_field_value=function(){return this.search_field.val()},i.prototype.get_search_text=function(){return this.escape_html(t.trim(this.get_search_field_value()))},i.prototype.escape_html=function(e){return t("<div/>").text(e).html()},i.prototype.winnow_results_set_highlight=function(){var e,t;if(t=this.is_multiple?[]:this.search_results.find(".result-selected.active-result"),null!=(e=t.length?t.first():this.search_results.find(".active-result").first()))return this.result_do_highlight(e)},i.prototype.no_results=function(e){var t;return t=this.get_no_results_html(e),this.search_results.append(t),this.form_field_jq.trigger("chosen:no_results",{chosen:this})},i.prototype.no_results_clear=function(){return this.search_results.find(".no-results").remove()},i.prototype.keydown_arrow=function(){var e;return this.results_showing&&this.result_highlight?(e=this.result_highlight.nextAll("li.active-result").first())?this.result_do_highlight(e):void 0:this.results_show()},i.prototype.keyup_arrow=function(){var e;return this.results_showing||this.is_multiple?this.result_highlight?(e=this.result_highlight.prevAll("li.active-result"),e.length?this.result_do_highlight(e.first()):(this.choices_count()>0&&this.results_hide(),this.result_clear_highlight())):void 0:this.results_show()},i.prototype.keydown_backstroke=function(){var e;return this.pending_backstroke?(this.choice_destroy(this.pending_backstroke.find("a").first()),this.clear_backstroke()):(e=this.search_container.siblings("li.search-choice").last(),e.length&&!e.hasClass("search-choice-disabled")?(this.pending_backstroke=e,this.single_backstroke_delete?this.keydown_backstroke():this.pending_backstroke.addClass("search-choice-focus")):void 0)},i.prototype.clear_backstroke=function(){return this.pending_backstroke&&this.pending_backstroke.removeClass("search-choice-focus"),this.pending_backstroke=null},i.prototype.search_field_scale=function(){var e,i,n,s,o,r,a,l;if(this.is_multiple){for(s={position:"absolute",left:"-1000px",top:"-1000px",display:"none",whiteSpace:"pre"},o=["fontSize","fontStyle","fontWeight","fontFamily","lineHeight","textTransform","letterSpacing"],a=0,l=o.length;a<l;a++)n=o[a],s[n]=this.search_field.css(n);return i=t("<div />").css(s),i.text(this.get_search_field_value()),t("body").append(i),r=i.width()+25,i.remove(),e=this.container.outerWidth(),r=Math.min(e-10,r),this.search_field.width(r)}},i.prototype.trigger_form_field_change=function(e){return this.form_field_jq.trigger("input",e),this.form_field_jq.trigger("change",e)},i}(i)}).call(this)}),define("js/bindings/FlightsSearchForm",["knockout","js/vm/mobileDetect","jquery","jqueryUI","js/lib/jquery.pickmeup/jquery.pickmeup","js/lib/nemo.jquery.chosen/chosen.jquery"],function(e,t,i){function n(e,t){return e.isCity&&t.cities.hasOwnProperty(e.cityId)&&t.cities[e.cityId].airports instanceof Array?t.cities[e.cityId].airports:[]}e.bindingHandlers.flightsFormSelect={init:function(t,n,s,o,r){if(i(t).chosen){var a=i.extend({width:"100%",display_selected_options:!1,display_disabled_options:!1,placeholder_text_multiple:"",no_results_text:"",max_selected_options:5},n());i(t).chosen(a);var l=function(){console.log(t),i(t).trigger("chosen:close")};i(document).on("click",".no-results",l),e.utils.domNodeDisposal.addDisposeCallback(t,function(){i(document).off("click",".no-results",l)})}},update:function(e,t,i,n,s){}},i.widget("nemo.FlightsFormGeoAC",i.ui.autocomplete,{_renderItem:function(e,t){var n;if(void 0===t.label){var s=t.name.replace(new RegExp("("+this.term.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"")+")","i"),'<span class="nemo-ui-autocomplete__match">$1</span>'),o=t.IATA?'<span class="nemo-flights-form__geoAC__item__code">'+t.IATA+"</span>":"";n=s+(t.country&&!t.insideAggregation?'<span class="nemo-flights-form__geoAC__item__country">'+t.country.name+"</span>":"")+o}else n=t.label;var r="nemo-flights-form__geoAC__item";return"noRoute"in t&&t.noRoute&&(r+=" nemo-flights-form__geoAC__item_noRoute"),"directFlight"in t&&t.directFlight&&(r+=" nemo-flights-form__geoAC__item_directFlight"),"aggregationRoot"in t&&!0===t.aggregationRoot&&(r+=" nemo-flights-form__geoAC__item_aggregationRoot"),"insideAggregation"in t&&!0===t.insideAggregation&&(r+=" nemo-flights-form__geoAC__item_insideAggregation"),i("<li>").addClass(r).append(n).attr("data-value",void 0===t.label).appendTo(e)},_renderMenu:function(e,t){var n=this;i.each(t,function(t,i){(i.name||i.label)&&n._renderItemData(e,i)}),i(e).addClass("nemo-ui-autocomplete nemo-flights-form__geoAC"),t.length>10?i(e).addClass("nemo-flights-form__geoAC_withScroll"):i(e).removeClass("nemo-flights-form__geoAC_withScroll")}}),e.bindingHandlers.flightsFormGeoAC={init:function(t,s,o,r,a){var l=i(t),c=[{value:"",label:r.$$controller.i18n("FlightsSearchForm","autocomplete_noResults")}];l.on("focus",function(e){i(this).val("")});var u=r.items.departure.value===s(),h=r.form.onFocusAutocomplete,d=r.form.forceAggregationAirports;l.on("focus",function(e){l.val(""),i(window).width()<=450&&i("html,body").animate({scrollTop:l.offset().top},800),h&&l.FlightsFormGeoAC({minLength:0}),l.FlightsFormGeoAC("search","")}),l.FlightsFormGeoAC({minLength:2,source:function(e,t){var i=r.$$controller.options.dataURL+"/guide/autocomplete/iata/"+encodeURIComponent(e.term);u&&r.items.arrival.value()&&r.items.arrival.value().IATA&&(i+="/arr/"+encodeURIComponent(r.items.arrival.value().IATA)),!u&&r.items.departure.value()&&r.items.departure.value().IATA&&(i+="/dep/"+encodeURIComponent(r.items.departure.value().IATA)),i+="?apilang="+r.$$controller.options.i18nLanguage,r.$$controller.makeRequest(i,"",function(e){e=JSON.parse(e);var i=[];if(e.system&&e.system.error)return void t(c);e.guide.autocomplete.iata.map(function(t){var s=r.$$controller.getModel("Flights/Common/Geo",{data:t,guide:e.guide}),o=n(t,e.guide);o.length&&(s.aggregationRoot=!0),i.push(s),o.forEach(function(n){var o=r.$$controller.getModel("Flights/Common/Geo",{data:n,guide:e.guide});o.insideAggregation=!0,o.replacement=d&&t.isCity?s:null,i.push(o)})}),0===i.length&&(i=c),t(i)},function(){t(c)})},open:function(e){var t=i(this).data("nemo-FlightsFormGeoAC").menu.element.children('[data-value="true"]');1===t.length&&i(this).data("nemo-FlightsFormGeoAC").term.length>2?h||t.eq(0).mouseenter().click():i(e.target).data("nemo-FlightsFormGeoAC").menu.activeMenu.addClass("nemo-ui-autocomplete_open")},response:function(e,t){i(e.target).data("nemo-FlightsFormGeoAC").menu.activeMenu.removeClass("nemo-ui-autocomplete_open")},select:function(e,t){var i=!1;if(l.blur(),void 0!==t.item.noRoute&&t.item.noRoute){s()(t.item),i=!0;var n=l.parents(".js-autofocus-segment");u?(r.items.arrival.value(null),setTimeout(function(){n.find(".js-autofocus-field_arrival").focus()},100)):(r.items.departure.value(null),setTimeout(function(){n.find(".js-autofocus-field_departure").focus()},100))}else if(d){var o=null;if(t.item.replacement)o=t.item.replacement;else if(t.item.aggregationIATA){var a=t.item.aggregationIATA;t.item.pool.cities&&t.item.pool.cities[t.item.cityId]&&t.item.pool.cities[t.item.cityId].IATA?o=r.$$controller.getModel("Flights/Common/Geo",{data:{IATA:t.item.pool.cities[t.item.cityId].IATA,cityId:t.item.cityId,isCity:!0},guide:t.item.pool}):t.item.pool.airports&&t.item.pool.airports[a]&&!0===t.item.pool.airports[a].isAggregation&&(o=r.$$controller.getModel("Flights/Common/Geo",{data:t.item.pool.airports[a],guide:t.item.pool}))}o&&(s()(o),i=!0)}if(!i&&void 0===t.item.label)if(s()(t.item),h){var n=l.parents(".js-autofocus-segment");u?r.items.arrival.value()?n.find(".js-autofocus-field_date").focus():setTimeout(function(){n.find(".js-autofocus-field_arrival").focus()},100):n.find(".js-autofocus-field_date").focus()}else l.trigger("nemo.fsf.segmentPropChanged");return!1},focus:function(e,t){e.preventDefault(),h||l.val(t.item.name)},close:function(){l.val("")}}),l.on("blur",function(e){l.val("")}),l.on("keyup",function(e){13==e.keyCode&&i(".ui-menu-item").each(function(){if(i(this).is(":visible"))return i(this).click(),!1})}),e.utils.domNodeDisposal.addDisposeCallback(t,function(){l.off("blur"),l.off("keyup");try{l.autocomplete("destroy")}catch(e){}})},update:function(e,t,i,n,s){}},e.bindingHandlers.flightsFormAutoFocus={init:function(t,n,s,o,r){var a=i(t);a.on("nemo.fsf.segmentPropChanged",function(t,n){var s=i(t.target),r=s.parents(".js-autofocus-segment"),a=e.dataFor(t.target),l=null;s.hasClass("js-autofocus-field_departure")?l=r.find(".js-autofocus-field_arrival"):s.hasClass("js-autofocus-field_arrival")?l=r.find(".js-autofocus-field_date"):"CR"==o.tripType()&&a.index<o.segments().length-1?l=r.next().find(".js-autofocus-field").eq(0):"RT"!=o.tripType()||0!=a.index||o.segments()[1].items.departureDate.value()||(l=r.parents(".js-autofocus-form").find(".js-autofocus-field_date").eq(1)),l&&l.focus()}),e.utils.domNodeDisposal.addDisposeCallback(t,function(){a.off("nemo.fsf.segmentPropChanged")})},update:function(e,t,i,n,s){}},e.bindingHandlers.flightsFormDatepicker={_PMULocale:null,_PHONE_MAX_WIDTH:768,_CURRENT_MONTHS_COUNT:e.observable(2),_getPMULocale:function(t){if(!e.bindingHandlers.flightsFormDatepicker._PMULocale){e.bindingHandlers.flightsFormDatepicker._PMULocale={days:[],daysShort:[],daysMin:[],months:[],monthsShort:[]};for(var i=1;i<=12;i++)e.bindingHandlers.flightsFormDatepicker._PMULocale.months.push(t.$root.i18n("dates","month_"+i+"_f_n")),e.bindingHandlers.flightsFormDatepicker._PMULocale.monthsShort.push(t.$root.i18n("dates","month_"+i+"_s_n")),1==i&&(e.bindingHandlers.flightsFormDatepicker._PMULocale.days.push(t.$root.i18n("dates","dow_7_f")),e.bindingHandlers.flightsFormDatepicker._PMULocale.daysShort.push(t.$root.i18n("dates","dow_7_s")),e.bindingHandlers.flightsFormDatepicker._PMULocale.daysMin.push(t.$root.i18n("dates","dow_7_s"))),i<=7&&(e.bindingHandlers.flightsFormDatepicker._PMULocale.days.push(t.$root.i18n("dates","dow_"+i+"_f")),e.bindingHandlers.flightsFormDatepicker._PMULocale.daysShort.push(t.$root.i18n("dates","dow_"+i+"_s")),e.bindingHandlers.flightsFormDatepicker._PMULocale.daysMin.push(t.$root.i18n("dates","dow_"+i+"_s")))}return e.bindingHandlers.flightsFormDatepicker._PMULocale},_PMUbeforeShow:function(e,t){for(var n=t.form.options.dateOptions.minDate,s=t.form.options.dateOptions.maxDate,o=i(this),r=t.form.segments(),a=0,l=r.length;a<l;a++){var c=r[a];if(c.index<t.index&&null!=c.items.departureDate.value()&&(n=c.items.departureDate.value().dateObject()),c.index>t.index&&null!=c.items.departureDate.value()){s=c.items.departureDate.value().dateObject();break}}o.data("pickmeup-options").defaultDate=t.items.departureDate.value()?t.items.departureDate.value().dateObject():n,t.form.options.dateOptions.incorrectDatesBlock&&(o.data("pickmeup-options").max=s,o.data("pickmeup-options").min=n)},_PMUonSetDate:function(e,t,i){e.blur(),t()(i.$$controller.getModel("Common/Date",this.current)),e.trigger("nemo.fsf.segmentPropChanged")},_PMUrender:function(e,t,i){var n=t.form.getSegmentDateParameters(e,t.index);if(n.className="",n.segments.length>0&&e.getMonth()==i){n.className="nemo-pmu-date_hilighted";for(var s=0;s<n.segments.length;s++)n.className+=" nemo-pmu-date_hilighted_"+n.segments[s]}return n.className+=n.period?" nemo-pmu-date_period":"",""===n.className&&t.form.datesAvailable()[t.index]&&t.form.datesAvailable()[t.index][e.getTime()]&&(n.className="nemo-pmu-date_availables"),!t.form.disableUnavailableDate||t.form.datesAvailable()[t.index]&&t.form.datesAvailable()[t.index][e.getTime()]||(n.disabled=!0),delete n.segments,delete n.period,n},_getPMUOptions:function(t,n,s,o,r){for(var a=o.form.options.dateOptions.minDate,l=o.form.segments(),c=0,u=l.length;c<u;c++){var h=l[c];h.index<o.index&&null!=h.items.departureDate.value()&&(a=h.items.departureDate.value().dateObject())}return{className:"nemo-flights-form__datePicker",locale:e.bindingHandlers.flightsFormDatepicker._getPMULocale(r),calendars:e.bindingHandlers.flightsFormDatepicker._CURRENT_MONTHS_COUNT(),min:o.form.options.dateOptions.minDate,max:o.form.options.dateOptions.maxDate,format:"d.m.Y",monthHeaderFormat:"zh"===r.$root.controller.options.i18nLanguage?"Y B":"B, Y",hideOnSelect:!0,defaultDate:a,render:function(t,i){return e.bindingHandlers.flightsFormDatepicker._PMUrender.call(this,t,o,i)},onSetDate:function(){return e.bindingHandlers.flightsFormDatepicker._PMUonSetDate.call(this,i(t),n,o)},beforeShow:function(){return e.bindingHandlers.flightsFormDatepicker._PMUbeforeShow.call(this,r,o)}}},_checkPartialDateByFormat:function(e,t){function i(e){var t=null;return""==e?0:(e.match(a)&&(t=parseInt(e,10)),t)}var n,s=new RegExp("[^0-9a-zA-Z]+"),o=e.split(s),r=t.split(s),a=/^\d+$/,l=[];if(o.length<=r.length)for(var c=0;c<o.length;c++){switch(r[c]){case"d":n=i(o[c]),n=n&&n>31?null:n;break;case"m":n=i(o[c]),n=n&&n>12?null:n;break;case"Y":n=i(o[c])}l.push(n)}for(var c=0;c<l.length;c++)if(null===l[c]||0===l[c]&&c<l.length-1)return!1;return!0},init:function(t,n,s,o,r){var a=i(t),l="_KO_flightsFormDatepicker_prevValue",c=i(window);a.on("blur",function(){a.val(""),a.data(l,"")}),a.on("keyup",function(t){var i=a.data(l)||"",n=a.val();e.bindingHandlers.flightsFormDatepicker._checkPartialDateByFormat(n,"d.m.Y")?a.data(l,n):a.val(i)}),a.on("focus",function(){i(window).width()<=450&&i("html,body").animate({scrollTop:a.offset().top},800)}),e.utils.domNodeDisposal.addDisposeCallback(t,function(){a.pickmeup("destroy"),a.off("blur"),a.off("keyup")}),c.resize(function(){e.bindingHandlers.flightsFormDatepicker._CURRENT_MONTHS_COUNT(c.width()<e.bindingHandlers.flightsFormDatepicker._PHONE_MAX_WIDTH?1:2)}),e.bindingHandlers.flightsFormDatepicker._CURRENT_MONTHS_COUNT.subscribe(function(){e.bindingHandlers.flightsFormDatepicker.update(t,n,s,o,r)},this),c.width()<e.bindingHandlers.flightsFormDatepicker._PHONE_MAX_WIDTH&&(e.bindingHandlers.flightsFormDatepicker._CURRENT_MONTHS_COUNT(1),a.attr("readonly","true")),o.form.datesAvailable.subscribe(function(){var i=!1;a.data("pickmeup-options")&&a.pickmeup().isDisplaying&&(i=!0),e.bindingHandlers.flightsFormDatepicker.update(t,n,s,o,r),i&&a.pickmeup("show")},this)},update:function(t,n,s,o,r){i(t).pickmeup(e.bindingHandlers.flightsFormDatepicker._getPMUOptions(t,n,s,o,r))}},e.bindingHandlers.flightsFormRTAutoFocus={init:function(t,n,s,o,r){var a=function(){setTimeout(function(){r.$parent.segments()[1].items.departureDate.focus(!0)},10)};i(t).on("click",a),e.utils.domNodeDisposal.addDisposeCallback(t,function(){i(t).off("click",a)})}},e.bindingHandlers.flightsFormPassengersSelector={init:function(t,n,s,o,r){var a=function(e){var t=i(e.target);t.is(".js-flights-searchForm-passSelect")||t.parents().is(".js-flights-searchForm-passSelect")||o.passengersFastSelectorOpen(!1)},l=i(document);i(t).on("click",function(){i(window).width()<=450&&i("html,body").animate({scrollTop:i(t).offset().top},800),o.openPassengersSelector()}),l.on("click",a),e.utils.domNodeDisposal.addDisposeCallback(t,function(){l.off("click",a)})}}}),define("js/lib/jquery.chosen/v.1.4.2/chosen.jquery.min",["jquery"],function(e){(function(){var t,i,n,s,o,r={}.hasOwnProperty,a=function(e,t){function i(){this.constructor=e}for(var n in t)r.call(t,n)&&(e[n]=t[n]);return i.prototype=t.prototype,e.prototype=new i,e.__super__=t.prototype,e};s=function(){function e(){this.options_index=0,this.parsed=[]}return e.prototype.add_node=function(e){return"OPTGROUP"===e.nodeName.toUpperCase()?this.add_group(e):this.add_option(e)},e.prototype.add_group=function(e){var t,i,n,s,o,r;for(t=this.parsed.length,this.parsed.push({array_index:t,group:!0,label:this.escapeExpression(e.label),title:e.title?e.title:void 0,children:0,disabled:e.disabled,classes:e.className}),o=e.childNodes,r=[],n=0,s=o.length;n<s;n++)i=o[n],r.push(this.add_option(i,t,e.disabled));return r},e.prototype.add_option=function(e,t,i){if("OPTION"===e.nodeName.toUpperCase())return""!==e.text?(null!=t&&(this.parsed[t].children+=1),this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,value:e.value,text:e.text,html:e.innerHTML,title:e.title?e.title:void 0,selected:e.selected,disabled:!0===i?i:e.disabled,group_array_index:t,group_label:null!=t?this.parsed[t].label:null,classes:e.className,style:e.style.cssText})):this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,empty:!0}),this.options_index+=1},e.prototype.escapeExpression=function(e){var t,i;return null==e||!1===e?"":/[\&\<\>\"\'\`]/.test(e)?(t={"<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},i=/&(?!\w+;)|[\<\>\"\'\`]/g,e.replace(i,function(e){return t[e]||"&amp;"})):e},e}(),s.select_to_array=function(e){var t,i,n,o,r;for(i=new s,r=e.childNodes,n=0,o=r.length;n<o;n++)t=r[n],i.add_node(t);return i.parsed},i=function(){function e(t,i){this.form_field=t,this.options=null!=i?i:{},e.browser_is_supported()&&(this.is_multiple=this.form_field.multiple,this.set_default_text(),this.set_default_values(),this.setup(),this.set_up_html(),this.register_observers(),this.on_ready())}return e.prototype.set_default_values=function(){var e=this;return this.click_test_action=function(t){return e.test_active_click(t)},this.activate_action=function(t){return e.activate_field(t)},this.active_field=!1,this.mouse_on_container=!1,this.results_showing=!1,this.result_highlighted=null,this.allow_single_deselect=null!=this.options.allow_single_deselect&&null!=this.form_field.options[0]&&""===this.form_field.options[0].text&&this.options.allow_single_deselect,this.disable_search_threshold=this.options.disable_search_threshold||0,this.disable_search=this.options.disable_search||!1,this.enable_split_word_search=null==this.options.enable_split_word_search||this.options.enable_split_word_search,this.group_search=null==this.options.group_search||this.options.group_search,this.search_contains=this.options.search_contains||!1,this.search_values=this.options.search_values||!1,this.single_backstroke_delete=null==this.options.single_backstroke_delete||this.options.single_backstroke_delete,this.max_selected_options=this.options.max_selected_options||1/0,this.inherit_select_classes=this.options.inherit_select_classes||!1,this.display_selected_options=null==this.options.display_selected_options||this.options.display_selected_options,this.display_disabled_options=null==this.options.display_disabled_options||this.options.display_disabled_options,this.include_group_label_in_selected=this.options.include_group_label_in_selected||!1},e.prototype.set_default_text=function(){return this.form_field.getAttribute("data-placeholder")?this.default_text=this.form_field.getAttribute("data-placeholder"):this.is_multiple?this.default_text=this.options.placeholder_text_multiple||this.options.placeholder_text||e.default_multiple_text:this.default_text=this.options.placeholder_text_single||this.options.placeholder_text||e.default_single_text,this.results_none_found=this.form_field.getAttribute("data-no_results_text")||this.options.no_results_text||e.default_no_result_text},e.prototype.choice_label=function(e){return this.include_group_label_in_selected&&null!=e.group_label?"<b class='group-name'>"+e.group_label+"</b>"+e.html:e.html},e.prototype.mouse_enter=function(){return this.mouse_on_container=!0},e.prototype.mouse_leave=function(){return this.mouse_on_container=!1},e.prototype.input_focus=function(e){var t=this;if(this.is_multiple){if(!this.active_field)return setTimeout(function(){return t.container_mousedown()},50)}else if(!this.active_field)return this.activate_field()},e.prototype.input_blur=function(e){var t=this;if(console.log(e),!this.mouse_on_container)return this.active_field=!1,setTimeout(function(){return t.blur_test()},100)},e.prototype.results_option_build=function(e){var t,i,n,s,o;for(t="",o=this.results_data,n=0,s=o.length;n<s;n++)i=o[n],t+=i.group?this.result_add_group(i):this.result_add_option(i),(null!=e?e.first:void 0)&&(i.selected&&this.is_multiple?this.choice_build(i):i.selected&&!this.is_multiple&&this.single_set_selected_text(this.choice_label(i)));return t},e.prototype.result_add_option=function(e){var t,i;return e.search_match&&this.include_option_in_results(e)?(t=[],e.disabled||e.selected&&this.is_multiple||t.push("active-result"),!e.disabled||e.selected&&this.is_multiple||t.push("disabled-result"),e.selected&&t.push("result-selected"),null!=e.group_array_index&&t.push("group-option"),""!==e.classes&&t.push(e.classes),i=document.createElement("li"),i.className=t.join(" "),i.style.cssText=e.style,i.setAttribute("data-option-array-index",e.array_index),i.innerHTML=e.search_text,e.title&&(i.title=e.title),this.outerHTML(i)):""},e.prototype.result_add_group=function(e){var t,i;return(e.search_match||e.group_match)&&e.active_options>0?(t=[],t.push("group-result"),e.classes&&t.push(e.classes),i=document.createElement("li"),i.className=t.join(" "),i.innerHTML=e.search_text,e.title&&(i.title=e.title),this.outerHTML(i)):""},e.prototype.results_update_field=function(){if(this.set_default_text(),this.is_multiple||this.results_reset_cleanup(),this.result_clear_highlight(),this.results_build(),this.results_showing)return this.winnow_results()},e.prototype.reset_single_select_options=function(){var e,t,i,n,s;for(n=this.results_data,s=[],t=0,i=n.length;t<i;t++)e=n[t],e.selected?s.push(e.selected=!1):s.push(void 0);return s},e.prototype.results_toggle=function(){return this.results_showing?this.results_hide():this.results_show()},e.prototype.results_search=function(e){return this.results_showing?this.winnow_results():this.results_show()},e.prototype.winnow_results=function(){var e,t,i,n,s,o,r,a,l,c,u,h,d;for(this.no_results_clear(),n=0,o=this.get_search_text(),e=o.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),l=new RegExp(e,"i"),i=this.get_search_regex(e),d=this.results_data,u=0,h=d.length;u<h;u++)t=d[u],t.search_match=!1,s=null,this.include_option_in_results(t)&&(t.group&&(t.group_match=!1,t.active_options=0),null!=t.group_array_index&&this.results_data[t.group_array_index]&&(s=this.results_data[t.group_array_index],0===s.active_options&&s.search_match&&(n+=1),s.active_options+=1),t.search_text=t.group?t.label:t.html,t.group&&!this.group_search||(t.search_match=this.search_string_match(t.search_text,i),!t.search_match&&this.search_values&&(t.search_match=this.search_string_match(t.value,i),c=!0),t.search_match&&!t.group&&(n+=1),t.search_match?(o.length&&(c||(r=t.search_text.search(l),a=t.search_text.substr(0,r+o.length)+"</em>"+t.search_text.substr(r+o.length),t.search_text=a.substr(0,r)+"<em>"+a.substr(r))),null!=s&&(s.group_match=!0)):null!=t.group_array_index&&this.results_data[t.group_array_index].search_match&&(t.search_match=!0)));return this.result_clear_highlight(),n<1&&o.length?(this.update_results_content(""),this.no_results(o)):(this.update_results_content(this.results_option_build()),this.winnow_results_set_highlight())},e.prototype.get_search_regex=function(e){var t;return t=this.search_contains?"":"^",new RegExp(t+e,"i")},e.prototype.search_string_match=function(e,t){var i,n,s,o;if(t.test(e))return!0;if(this.enable_split_word_search&&(e.indexOf(" ")>=0||0===e.indexOf("["))&&(n=e.replace(/\[|\]/g,"").split(" "),n.length))for(s=0,o=n.length;s<o;s++)if(i=n[s],t.test(i))return!0},e.prototype.choices_count=function(){var e,t,i,n;if(null!=this.selected_option_count)return this.selected_option_count;for(this.selected_option_count=0,n=this.form_field.options,t=0,i=n.length;t<i;t++)e=n[t],e.selected&&(this.selected_option_count+=1);return this.selected_option_count},e.prototype.choices_click=function(e){
if(e.preventDefault(),!this.results_showing&&!this.is_disabled)return this.results_show()},e.prototype.keyup_checker=function(e){var t,i;switch(t=null!=(i=e.which)?i:e.keyCode,this.search_field_scale(),t){case 8:if(this.is_multiple&&this.backstroke_length<1&&this.choices_count()>0)return this.keydown_backstroke();if(!this.pending_backstroke)return this.result_clear_highlight(),this.results_search();break;case 13:if(e.preventDefault(),this.results_showing)return this.result_select(e);break;case 27:return this.results_showing&&this.results_hide(),!0;case 9:case 38:case 40:case 16:case 91:case 17:break;default:return this.results_search()}},e.prototype.clipboard_event_checker=function(e){var t=this;return setTimeout(function(){return t.results_search()},50)},e.prototype.container_width=function(){return null!=this.options.width?this.options.width:this.form_field.offsetWidth+"px"},e.prototype.include_option_in_results=function(e){return!(this.is_multiple&&!this.display_selected_options&&e.selected||!this.display_disabled_options&&e.disabled||e.empty)},e.prototype.search_results_touchstart=function(e){return this.touch_started=!0,this.search_results_mouseover(e)},e.prototype.search_results_touchmove=function(e){return this.touch_started=!1,this.search_results_mouseout(e)},e.prototype.search_results_touchend=function(e){if(this.touch_started)return this.search_results_mouseup(e)},e.prototype.outerHTML=function(e){var t;return e.outerHTML?e.outerHTML:(t=document.createElement("div"),t.appendChild(e),t.innerHTML)},e.browser_is_supported=function(){return"Microsoft Internet Explorer"===window.navigator.appName?document.documentMode>=8:!(/iP(od|hone)/i.test(window.navigator.userAgent)||/Android/i.test(window.navigator.userAgent)&&/Mobile/i.test(window.navigator.userAgent))},e.default_multiple_text="Select Some Options",e.default_single_text="Select an Option",e.default_no_result_text="No results match",e}(),t=e,t.fn.extend({chosen:function(e){return i.browser_is_supported()?this.each(function(i){var s,o;s=t(this),o=s.data("chosen"),"destroy"===e&&o instanceof n?o.destroy():o instanceof n||s.data("chosen",new n(this,e))}):this}}),n=function(e){function i(){return o=i.__super__.constructor.apply(this,arguments)}return a(i,e),i.prototype.setup=function(){return this.form_field_jq=t(this.form_field),this.current_selectedIndex=this.form_field.selectedIndex,this.is_rtl=this.form_field_jq.hasClass("chosen-rtl")},i.prototype.set_up_html=function(){var e,i;return e=["chosen-container"],e.push("chosen-container-"+(this.is_multiple?"multi":"single")),this.inherit_select_classes&&this.form_field.className&&e.push(this.form_field.className),this.is_rtl&&e.push("chosen-rtl"),i={class:e.join(" "),style:"width: "+this.container_width()+";",title:this.form_field.title},this.form_field.id.length&&(i.id=this.form_field.id.replace(/[^\w]/g,"_")+"_chosen"),this.container=t("<div />",i),this.is_multiple?this.container.html('<ul class="chosen-choices"><li class="search-field"><input type="text" value="'+this.default_text+'" class="default" autocomplete="off" style="width:25px;" /></li></ul><div class="chosen-drop"><ul class="chosen-results"></ul></div>'):this.container.html('<a class="chosen-single chosen-default" tabindex="-1"><span>'+this.default_text+'</span><div><b></b></div></a><div class="chosen-drop"><div class="chosen-search"><input type="text" autocomplete="off" /></div><ul class="chosen-results"></ul></div>'),this.form_field_jq.hide().after(this.container),this.dropdown=this.container.find("div.chosen-drop").first(),this.search_field=this.container.find("input").first(),this.search_results=this.container.find("ul.chosen-results").first(),this.search_field_scale(),this.search_no_results=this.container.find("li.no-results").first(),this.is_multiple?(this.search_choices=this.container.find("ul.chosen-choices").first(),this.search_container=this.container.find("li.search-field").first()):(this.search_container=this.container.find("div.chosen-search").first(),this.selected_item=this.container.find(".chosen-single").first()),this.results_build(),this.set_tab_index(),this.set_label_behavior()},i.prototype.on_ready=function(){return this.form_field_jq.trigger("chosen:ready",{chosen:this})},i.prototype.register_observers=function(){var e=this;return this.container.bind("touchstart.chosen",function(t){return e.container_mousedown(t),t.preventDefault()}),this.container.bind("touchend.chosen",function(t){return e.container_mouseup(t),t.preventDefault()}),this.container.bind("mousedown.chosen",function(t){e.container_mousedown(t)}),this.container.bind("mouseup.chosen",function(t){e.container_mouseup(t)}),this.container.bind("mouseenter.chosen",function(t){e.mouse_enter(t)}),this.container.bind("mouseleave.chosen",function(t){e.mouse_leave(t)}),this.search_results.bind("mouseup.chosen",function(t){e.search_results_mouseup(t)}),this.search_results.bind("mouseover.chosen",function(t){e.search_results_mouseover(t)}),this.search_results.bind("mouseout.chosen",function(t){e.search_results_mouseout(t)}),this.search_results.bind("mousewheel.chosen DOMMouseScroll.chosen",function(t){e.search_results_mousewheel(t)}),this.search_results.bind("touchstart.chosen",function(t){e.search_results_touchstart(t)}),this.search_results.bind("touchmove.chosen",function(t){e.search_results_touchmove(t)}),this.search_results.bind("touchend.chosen",function(t){e.search_results_touchend(t)}),this.form_field_jq.bind("chosen:updated.chosen",function(t){e.results_update_field(t)}),this.form_field_jq.bind("chosen:activate.chosen",function(t){e.activate_field(t)}),this.form_field_jq.bind("chosen:open.chosen",function(t){e.container_mousedown(t)}),this.form_field_jq.bind("chosen:close.chosen",function(t){e.input_blur(t)}),this.search_field.bind("blur.chosen",function(t){e.input_blur(t)}),this.search_field.bind("keyup.chosen",function(t){e.keyup_checker(t)}),this.search_field.bind("keydown.chosen",function(t){e.keydown_checker(t)}),this.search_field.bind("focus.chosen",function(t){e.input_focus(t)}),this.search_field.bind("cut.chosen",function(t){e.clipboard_event_checker(t)}),this.search_field.bind("paste.chosen",function(t){e.clipboard_event_checker(t)}),this.is_multiple?this.search_choices.bind("click.chosen",function(t){e.choices_click(t)}):this.container.bind("click.chosen",function(e){e.preventDefault()})},i.prototype.destroy=function(){return t(this.container[0].ownerDocument).unbind("click.chosen",this.click_test_action),this.search_field[0].tabIndex&&(this.form_field_jq[0].tabIndex=this.search_field[0].tabIndex),this.container.remove(),this.form_field_jq.removeData("chosen"),this.form_field_jq.show()},i.prototype.search_field_disabled=function(){return this.is_disabled=this.form_field_jq[0].disabled,this.is_disabled?(this.container.addClass("chosen-disabled"),this.search_field[0].disabled=!0,this.is_multiple||this.selected_item.unbind("focus.chosen",this.activate_action),this.close_field()):(this.container.removeClass("chosen-disabled"),this.search_field[0].disabled=!1,this.is_multiple?void 0:this.selected_item.bind("focus.chosen",this.activate_action))},i.prototype.container_mousedown=function(e){if(!this.is_disabled&&(e&&"mousedown"===e.type&&!this.results_showing&&e.preventDefault(),null==e||!t(e.target).hasClass("search-choice-close")))return this.active_field?this.is_multiple||!e||t(e.target)[0]!==this.selected_item[0]&&!t(e.target).parents("a.chosen-single").length||(e.preventDefault(),this.results_toggle()):(this.is_multiple&&this.search_field.val(""),t(this.container[0].ownerDocument).bind("click.chosen",this.click_test_action),this.results_show()),this.activate_field()},i.prototype.container_mouseup=function(e){if("ABBR"===e.target.nodeName&&!this.is_disabled)return this.results_reset(e)},i.prototype.search_results_mousewheel=function(e){var t;if(e.originalEvent&&(t=e.originalEvent.deltaY||-e.originalEvent.wheelDelta||e.originalEvent.detail),null!=t)return e.preventDefault(),"DOMMouseScroll"===e.type&&(t*=40),this.search_results.scrollTop(t+this.search_results.scrollTop())},i.prototype.blur_test=function(e){if(!this.active_field&&this.container.hasClass("chosen-container-active"))return this.close_field()},i.prototype.close_field=function(){return t(this.container[0].ownerDocument).unbind("click.chosen",this.click_test_action),this.active_field=!1,this.results_hide(),this.container.removeClass("chosen-container-active"),this.clear_backstroke(),this.show_search_field_default(),this.search_field_scale()},i.prototype.activate_field=function(){return this.container.addClass("chosen-container-active"),this.active_field=!0,this.search_field.val(this.search_field.val()),this.search_field.focus()},i.prototype.test_active_click=function(e){var i;return i=t(e.target).closest(".chosen-container"),i.length&&this.container[0]===i[0]?this.active_field=!0:this.close_field()},i.prototype.results_build=function(){return this.parsing=!0,this.selected_option_count=null,this.results_data=s.select_to_array(this.form_field),this.is_multiple?this.search_choices.find("li.search-choice").remove():this.is_multiple||(this.single_set_selected_text(),this.disable_search||this.form_field.options.length<=this.disable_search_threshold?(this.search_field[0].readOnly=!0,this.container.addClass("chosen-container-single-nosearch")):(this.search_field[0].readOnly=!1,this.container.removeClass("chosen-container-single-nosearch"))),this.update_results_content(this.results_option_build({first:!0})),this.search_field_disabled(),this.show_search_field_default(),this.search_field_scale(),this.parsing=!1},i.prototype.result_do_highlight=function(e){var t,i,n,s,o;if(e.length){if(this.result_clear_highlight(),this.result_highlight=e,this.result_highlight.addClass("highlighted"),n=parseInt(this.search_results.css("maxHeight"),10),o=this.search_results.scrollTop(),s=n+o,i=this.result_highlight.position().top+this.search_results.scrollTop(),(t=i+this.result_highlight.outerHeight())>=s)return this.search_results.scrollTop(t-n>0?t-n:0);if(i<o)return this.search_results.scrollTop(i)}},i.prototype.result_clear_highlight=function(){return this.result_highlight&&this.result_highlight.removeClass("highlighted"),this.result_highlight=null},i.prototype.results_show=function(){return this.is_multiple&&this.max_selected_options<=this.choices_count()?(this.form_field_jq.trigger("chosen:maxselected",{chosen:this}),!1):(this.container.addClass("chosen-with-drop"),this.results_showing=!0,this.search_field.focus(),this.search_field.val(this.search_field.val()),this.winnow_results(),this.form_field_jq.trigger("chosen:showing_dropdown",{chosen:this}))},i.prototype.update_results_content=function(e){return this.search_results.html(e)},i.prototype.results_hide=function(){return this.results_showing&&(this.result_clear_highlight(),this.container.removeClass("chosen-with-drop"),this.form_field_jq.trigger("chosen:hiding_dropdown",{chosen:this})),this.results_showing=!1},i.prototype.set_tab_index=function(e){var t;if(this.form_field.tabIndex)return t=this.form_field.tabIndex,this.form_field.tabIndex=-1,this.search_field[0].tabIndex=t},i.prototype.set_label_behavior=function(){var e=this;if(this.form_field_label=this.form_field_jq.parents("label"),!this.form_field_label.length&&this.form_field.id.length&&(this.form_field_label=t("label[for='"+this.form_field.id+"']")),this.form_field_label.length>0)return this.form_field_label.bind("click.chosen",function(t){return e.is_multiple?e.container_mousedown(t):e.activate_field()})},i.prototype.show_search_field_default=function(){return this.is_multiple&&this.choices_count()<1&&!this.active_field?(this.search_field.val(this.default_text),this.search_field.addClass("default")):(this.search_field.val(""),this.search_field.removeClass("default"))},i.prototype.search_results_mouseup=function(e){var i;if(i=t(e.target).hasClass("active-result")?t(e.target):t(e.target).parents(".active-result").first(),i.length)return this.result_highlight=i,this.result_select(e),this.search_field.focus()},i.prototype.search_results_mouseover=function(e){var i;if(i=t(e.target).hasClass("active-result")?t(e.target):t(e.target).parents(".active-result").first())return this.result_do_highlight(i)},i.prototype.search_results_mouseout=function(e){if(t(e.target).hasClass("active-result"))return this.result_clear_highlight()},i.prototype.choice_build=function(e){var i,n,s=this;return i=t("<li />",{class:"search-choice"}).html("<span>"+this.choice_label(e)+"</span>"),e.disabled?i.addClass("search-choice-disabled"):(n=t("<a />",{class:"search-choice-close","data-option-array-index":e.array_index}),n.bind("click.chosen",function(e){return s.choice_destroy_link_click(e)}),i.append(n)),this.search_container.before(i)},i.prototype.choice_destroy_link_click=function(e){if(e.preventDefault(),e.stopPropagation(),!this.is_disabled)return this.choice_destroy(t(e.target))},i.prototype.choice_destroy=function(e){if(this.result_deselect(e[0].getAttribute("data-option-array-index")))return this.show_search_field_default(),this.is_multiple&&this.choices_count()>0&&this.search_field.val().length<1&&this.results_hide(),e.parents("li").first().remove(),this.search_field_scale()},i.prototype.results_reset=function(){if(this.reset_single_select_options(),this.form_field.options[0].selected=!0,this.single_set_selected_text(),this.show_search_field_default(),this.results_reset_cleanup(),this.form_field_jq.trigger("change"),this.active_field)return this.results_hide()},i.prototype.results_reset_cleanup=function(){return this.current_selectedIndex=this.form_field.selectedIndex,this.selected_item.find("abbr").remove()},i.prototype.result_select=function(e){var t,i;if(this.result_highlight)return t=this.result_highlight,this.result_clear_highlight(),this.is_multiple&&this.max_selected_options<=this.choices_count()?(this.form_field_jq.trigger("chosen:maxselected",{chosen:this}),!1):(this.is_multiple?t.removeClass("active-result"):this.reset_single_select_options(),t.addClass("result-selected"),i=this.results_data[t[0].getAttribute("data-option-array-index")],i.selected=!0,this.form_field.options[i.options_index].selected=!0,this.form_field.dispatchEvent(new Event("change")),this.selected_option_count=null,this.is_multiple?this.choice_build(i):this.single_set_selected_text(this.choice_label(i)),(e.metaKey||e.ctrlKey)&&this.is_multiple||this.results_hide(),this.search_field.val(""),(this.is_multiple||this.form_field.selectedIndex!==this.current_selectedIndex)&&this.form_field_jq.trigger("change",{selected:this.form_field.options[i.options_index].value}),this.current_selectedIndex=this.form_field.selectedIndex,e.preventDefault(),this.search_field_scale())},i.prototype.single_set_selected_text=function(e){return null==e&&(e=this.default_text),e===this.default_text?this.selected_item.addClass("chosen-default"):(this.single_deselect_control_build(),this.selected_item.removeClass("chosen-default")),this.selected_item.find("span").html(e)},i.prototype.result_deselect=function(e){var t;return t=this.results_data[e],!this.form_field.options[t.options_index].disabled&&(t.selected=!1,this.form_field.options[t.options_index].selected=!1,this.selected_option_count=null,this.result_clear_highlight(),this.results_showing&&this.winnow_results(),this.form_field_jq.trigger("change",{deselected:this.form_field.options[t.options_index].value}),this.search_field_scale(),!0)},i.prototype.single_deselect_control_build=function(){if(this.allow_single_deselect)return this.selected_item.find("abbr").length||this.selected_item.find("span").first().after('<abbr class="search-choice-close"></abbr>'),this.selected_item.addClass("chosen-single-with-deselect")},i.prototype.get_search_text=function(){return t("<div/>").text(t.trim(this.search_field.val())).html()},i.prototype.winnow_results_set_highlight=function(){var e,t;if(t=this.is_multiple?[]:this.search_results.find(".result-selected.active-result"),null!=(e=t.length?t.first():this.search_results.find(".active-result").first()))return this.result_do_highlight(e)},i.prototype.no_results=function(e){var i;return i=t('<li class="no-results">'+this.results_none_found+' "<span></span>"</li>'),i.find("span").first().html(e),this.search_results.append(i),this.form_field_jq.trigger("chosen:no_results",{chosen:this})},i.prototype.no_results_clear=function(){return this.search_results.find(".no-results").remove()},i.prototype.keydown_arrow=function(){var e;return this.results_showing&&this.result_highlight?(e=this.result_highlight.nextAll("li.active-result").first())?this.result_do_highlight(e):void 0:this.results_show()},i.prototype.keyup_arrow=function(){var e;return this.results_showing||this.is_multiple?this.result_highlight?(e=this.result_highlight.prevAll("li.active-result"),e.length?this.result_do_highlight(e.first()):(this.choices_count()>0&&this.results_hide(),this.result_clear_highlight())):void 0:this.results_show()},i.prototype.keydown_backstroke=function(){var e;return this.pending_backstroke?(this.choice_destroy(this.pending_backstroke.find("a").first()),this.clear_backstroke()):(e=this.search_container.siblings("li.search-choice").last(),e.length&&!e.hasClass("search-choice-disabled")?(this.pending_backstroke=e,this.single_backstroke_delete?this.keydown_backstroke():this.pending_backstroke.addClass("search-choice-focus")):void 0)},i.prototype.clear_backstroke=function(){return this.pending_backstroke&&this.pending_backstroke.removeClass("search-choice-focus"),this.pending_backstroke=null},i.prototype.keydown_checker=function(e){var t,i;switch(t=null!=(i=e.which)?i:e.keyCode,this.search_field_scale(),8!==t&&this.pending_backstroke&&this.clear_backstroke(),t){case 8:this.backstroke_length=this.search_field.val().length;break;case 9:this.results_showing&&!this.is_multiple&&this.result_select(e),this.mouse_on_container=!1;break;case 13:this.results_showing&&e.preventDefault();break;case 32:this.disable_search&&e.preventDefault();break;case 38:e.preventDefault(),this.keyup_arrow();break;case 40:e.preventDefault(),this.keydown_arrow()}},i.prototype.search_field_scale=function(){var e,i,n,s,o,r,a,l;if(this.is_multiple){for(0,r=0,s="position:absolute; left: -1000px; top: -1000px; display:none;",o=["font-size","font-style","font-weight","font-family","line-height","text-transform","letter-spacing"],a=0,l=o.length;a<l;a++)n=o[a],s+=n+":"+this.search_field.css(n)+";";return e=t("<div />",{style:s}),e.text(this.search_field.val()),t("body").append(e),r=e.width()+25,e.remove(),i=this.container.outerWidth(),r>i-10&&(r=i-10),this.search_field.css({width:r+"px"})}},i}(i)}).call(this)}),"function"==typeof define?define("js/vm/EventManager",["jquery"],function(e){return initAnalytics(e)}):window.Analytics=initAnalytics(window.jQuery||window.$),define("js/vm/Flights/SearchForm/Controller",["knockout","js/vm/helpers","js/vm/BaseControllerModel","jsCookie","js/vm/EventManager"],function(e,t,i,n,s){function o(s){i.apply(this,arguments),this.name="FlightsSearchFormController",this.delayedSearch=!0,this.serviceClasses=["Economy","Business","First"],this.tripTypes=["OW","RT","CR"],this.segments=e.observableArray([]),this.dateRestrictions=[],this.datesAvailable=e.observable({}),this.passengers=e.observable({}),this.passengersError=e.observable(!1),this.passengersUseExtendedSelect=!0,this.passengersFastSelectOptions=[],this.tripTypeDisplayFormat="select",this.options={},this.carriersLoaded=e.observable(null!==this.carriers),this.additionalParameters={carriers:e.observableArray([]),maxTransfersLength:e.observable(!1)},this.tripType=e.observable("OW"),this.directFlights=e.observable(!1),this.vicinityDates=e.observable(!1),this.serviceClass=e.observable(this.serviceClasses[0]),this.flightNumbers=e.observableArray([]),this.validaTERROR=e.observable(!1),this.setCookies=!1,this.useCookies=!0,this.forceUseCookies=!0,this.mode="normal",this.tuneSearch=0,this.preinittedData={segments:[],passengers:{},serviceClass:this.serviceClass(),direct:this.directFlights(),vicinityDates:this.vicinityDates(),immediateSearch:!1,flightNumbers:null},this.searchMode="popup",this.isSearching=e.observable(!1),this.searchRequest=e.observable(!1),this.searchError=e.observable(!1),this.passengersFastSelectorOpen=e.observable(!1),this.parametersChanged=e.observable(!1),this.initialParams="",this.useAdditionalOptions=!0,this.forceSelfHostNavigation=!1,this.addLanguageToResultsURL=!1,this.forceLocationChange=!1,this.forceChangeToSearch=!1,this.forceInitialTripType=!1,this.$$loading.subscribe(function(e){if(!e)try{document.dispatchEvent(new CustomEvent("loadSearchForm"))}catch(e){var t=document.createEvent("Event");t.initEvent("loadSearchForm",!0,!1),document.dispatchEvent(t)}},this),this.processInitParams(),this.segments.subscribe(function(e){this.recalcDateRestrictions()},this),this.tripType.subscribe(function(e){var t=this.segments();switch(this.$$controller.log("TripType set to",e),e){case"OW":this.segments.splice(1);break;case"RT":var i=null;(2!=t.length||t[0].items.departure.value()&&!t[1].items.arrival.value()||t[0].items.arrival.value()&&!t[1].items.departure.value()||t[1].items.departure.value()&&!t[0].items.arrival.value()||t[1].items.arrival.value()&&!t[0].items.departure.value()||t[0].items.departure.value()&&t[0].items.departure.value().identifier!=t[1].items.arrival.value().identifier||t[1].items.departure.value()&&t[1].items.departure.value().identifier!=t[0].items.arrival.value().identifier)&&(t.length>=2&&(i=t[1].items.departureDate.value()),t.length>1&&this.segments.splice(1),this.addSegment(this.segments()[0].items.arrival.value(),this.segments()[0].items.departure.value(),i))}},this),this.passengersSummary=e.computed(function(){var e=0,i=this.passengers(),n=[];for(var s in i)if(i.hasOwnProperty(s)){var o=i[s]();o>0&&(e+=o,n.push(s))}return 0==n.length?this.$$controller.i18n("FlightsSearchForm","passSummary_numeral_noPassengers"):1==n.length?e+" "+this.$$controller.i18n("FlightsSearchForm","passSummary_numeral_"+n.pop()+"_"+t.getNumeral(e,"one","twoToFour","fourPlus")):e+" "+this.$$controller.i18n("FlightsSearchForm","passSummary_numeral_mixed_"+t.getNumeral(e,"one","twoToFour","fourPlus"))},this),this.passengersRestrictions=e.computed(function(){var e={},t=this.passengers(),i=0,n=0,s=0,o=0;for(var r in t)t.hasOwnProperty(r)&&(e[r]={min:0,max:0},o+=t[r](),this.passengerAdultTypes.indexOf(r)>=0&&(i+=t[r]()),"INF"==r&&(n+=t[r]()),"INS"==r&&(s+=t[r]()));for(var r in e)e.hasOwnProperty(r)&&(e[r].max=Math.min(t[r]()+this.options.totalPassengers-o,parseInt(this.options.passengerCount[r])));e.hasOwnProperty("INF")&&(e.INF.max=Math.min(i,e.INF.max)),e.hasOwnProperty("INS")&&0==i&&(e.INS.max=0);for(var r=0;r<this.passengerAdultTypes.length;r++)e.hasOwnProperty(this.passengerAdultTypes[r])&&(e[this.passengerAdultTypes[r]].min=Math.max(0,t[this.passengerAdultTypes[r]]()-i+Math.max(n,s>0?1:0),e[this.passengerAdultTypes[r]].min));return e},this),this.isValid=e.computed(function(){var e,t=this.segments(),i=!0,n=this.passengers(),s=0,o=0;for(var r in n)n.hasOwnProperty(r)&&(s+=n[r](),this.passengerAdultTypes.indexOf(r)>=0&&(o+=n[r]()));if(0==s?(i=!1,this.passengersError("noPassengers")):0!=o||this.searchWithoutAdults?this.passengersError(!1):(i=!1,this.passengersError("noAdults")),t.length)for(var r=0;r<t.length;r++){t[r].items.departureDate.value()&&(e&&t[r].items.departureDate.value().dateObject()<e?(t[r].items.departureDate.error("notInOrder"),i=!1):r+1==t.length&&t[r].items.departureDate.value().dateObject()>this.options.dateOptions.maxDate?(t[r].items.departureDate.error("tooLate"),i=!1):0==r&&t[r].items.departureDate.value().dateObject()<this.options.dateOptions.minDate?(t[r].items.departureDate.error("tooEraly"),i=!1):t[r].items.departureDate.error(null),e=t[r].items.departureDate.value().dateObject());for(var a in t[r].items)t[r].items.hasOwnProperty(a)&&t[r].items[a].error()&&(i=!1)}else i=!1;return i},this),this.cookieData=e.computed(function(){for(var e={segments:[],passengers:{},serviceClass:this.serviceClass(),vicinityDates:this.vicinityDates()},t=this.segments(),i=this.passengers(),n=0;n<t.length;n++)e.segments.push([t[n].items.departure.value()?t[n].items.departure.value().IATA:null,t[n].items.arrival.value()?t[n].items.arrival.value().IATA:null,t[n].items.departureDate.value()?t[n].items.departureDate.value().getISODate():null,t[n].items.departure.value()?t[n].items.departure.value().isCity:null,t[n].items.arrival.value()?t[n].items.arrival.value().isCity:null]);for(var n in i)i.hasOwnProperty(n)&&(e.passengers[n]=i[n]());return e},this),this.searchAllowedByParamChange=e.computed(function(){return this.parametersChanged()||!this.forceChangeToSearch},this),this.searchEnabled=e.computed(function(){return(!this.validaTERROR()||this.isValid())&&this.searchAllowedByParamChange()},this),this.cookieData.subscribe(function(e){(this.useCookies||this.forceUseCookies)&&this.setCookies?(this.$$controller.log("WRITING COOKIE",this.getCookieName(),e),n.set(this.getCookieName(),e,{expires:365})):this.$$controller.log("COOKIE NOT ENABED YET",this.getCookieName(),e)},this),this.URLParams=e.computed(function(){var e,t="",i=this.segments(),n=this.passengers();if("RT"==this.tripType())t+=(i[0].items.departure.value()?(i[0].items.departure.value().isCity?"c":"a")+i[0].items.departure.value().IATA:"###")+(i[0].items.arrival.value()?(i[0].items.arrival.value().isCity?"c":"a")+i[0].items.arrival.value().IATA:"###")+(i[0].items.departureDate.value()?i[0].items.departureDate.value().dropTime().getISODate().replace(/-/g,""):"########")+(i[1]&&i[1].items.departureDate.value()?i[1].items.departureDate.value().dropTime().getISODate().replace(/-/g,""):"########");else for(var s=0;s<i.length;s++)t+=(i[s].items.departure.value()?(i[s].items.departure.value().isCity?"c":"a")+i[s].items.departure.value().IATA:"###")+(i[s].items.arrival.value()?(i[s].items.arrival.value().isCity?"c":"a")+i[s].items.arrival.value().IATA:"###")+(i[s].items.departureDate.value()?i[s].items.departureDate.value().dropTime().getISODate().replace(/-/g,""):"########");for(var s in n)n.hasOwnProperty(s)&&n[s]()>0&&(t+=s+n[s]());if(t+="-class="+this.serviceClass(),this.flightNumbers().length&&(t+="-flightNumbers="+this.flightNumbers()),this.directFlights()&&!this.options.hideDirectOnlyCheckbox&&(t+="-direct"),this.vicinityDates()&&"CR"!=this.tripType()&&(t+="-vicinityDates="+this.options.dateOptions.aroundDatesValues[this.options.dateOptions.aroundDatesValues.length-1]),!this.directFlights()&&this.additionalParameters.maxTransfersLength()&&(t+="-PMaxTransfersLength=2"),e=this.additionalParameters.carriers(),e.length){t+="-PCarriers=";for(var s=0;s<e.length;s++)t+=e[s].substr(1,2)}return this.parametersChanged(this.initialParams!=t),t},this),this.vicinityDatesLabel=e.pureComputed(function(){return this.$$controller.i18n("FlightsSearchForm","routeOptions__vicinityDates__caption").replace("[%-dates-%]",this.options.dateOptions.aroundDatesValues.length).replace("[%-dayName-%]",t.getNumeral(this.options.dateOptions.aroundDatesValues.length,this.$$controller.i18n("FlightsSearchForm","day_one"),this.$$controller.i18n("FlightsSearchForm","day_twoToFour"),this.$$controller.i18n("FlightsSearchForm","day_twoToFour")))},this),this.initAnalytics()}return t.extendModel(o,[i]),o.prototype.cookieName="FlightsSearchForm",o.prototype.passengerAdditionalTypes=["YTH","SRC"],o.prototype.passengerTypesOrder=["ADT","CLD","INF","INS"],o.prototype.passengerAdultTypes=["ADT"],o.prototype.passengerInfantTypes=["INF","INS"],o.prototype.$$i18nSegments=["FlightsSearchForm"],o.prototype.$$KOBindings=["FlightsSearchForm"],o.prototype.initAnalytics=function(){this.directFlights.subscribe(function(e){s.tap("searchForm.directFlights.active",{value:e})}),this.tripType.subscribe(function(e){s.tap("searchForm.tripType.value",{value:e})}),this.additionalParameters.maxTransfersLength.subscribe(function(e){s.tap("searchForm.additionalParameters.fastFlights.active",{value:e})}),this.additionalParameters.carriers.subscribe(function(e){s.tap("searchForm.additionalParameters.carriers.value",{value:e})}),this.serviceClass.subscribe(function(e){s.tap("searchForm.serviceClass.value",{value:e})}),this.vicinityDates.subscribe(function(e){s.tap("searchForm.vicinityDates.active",{value:e})})},o.prototype.openPassengersSelector=function(){(this.passengersUseExtendedSelect||0!=this.passengersFastSelectOptions.length)&&this.passengersFastSelectorOpen(!this.passengersFastSelectorOpen())},o.prototype.passengersTextForFastSelect=function(e){for(var i=this.passengersFastSelectOptions[e].set,n=[],s=0;s<this.passengerTypesOrder.length;s++)i.hasOwnProperty(this.passengerTypesOrder[s])&&i[this.passengerTypesOrder[s]]>0&&n.push(i[this.passengerTypesOrder[s]]+" "+this.$$controller.i18n("FlightsSearchForm","passSummary_numeral_"+this.passengerTypesOrder[s]+"_"+t.getNumeral(i[this.passengerTypesOrder[s]],"one","twoToFour","fourPlus")));return t.smartJoin(n,", ",(","==this.$$controller.i18n("FlightsSearchForm","passSummary_fastSelect_lastConjunction")[0]?"":" ")+this.$$controller.i18n("FlightsSearchForm","passSummary_fastSelect_lastConjunction")+" ")},o.prototype.passengersSelectFast=function(e){var t=this.passengers(),i=[];for(var n in t)t.hasOwnProperty(n)&&t[n](0);this.passengers(t),this.fillPreInittedPassengers(this.passengerAdultTypes,this.passengersFastSelectOptions[e].set),this.fillPreInittedPassengers(this.passengerInfantTypes,this.passengersFastSelectOptions[e].set);for(var n=0;n<this.passengerTypesOrder.length;n++)this.passengerAdultTypes.indexOf(this.passengerTypesOrder[n])<0&&this.passengerInfantTypes.indexOf(this.passengerTypesOrder[n])<0&&i.push(this.passengerTypesOrder[n]);this.fillPreInittedPassengers(i,this.passengersFastSelectOptions[e].set)},o.prototype.paramsParsers={segs:/([A-ZА-Я]{3})([A-ZА-Я]{3})(\d{8}|d\d{1,2})/g,passengers:/([A-Z]{3})(\d+)/g},o.prototype.getCookieName=function(){return this.$$controller.options.cookiesPrefix+this.cookieName},o.prototype.processInitParams=function(){if(void 0!==this.$$componentParameters.additional){if("delayed"in this.$$componentParameters.additional&&(this.delayedSearch=!!this.$$componentParameters.additional.delayed),"useAdditionalOptions"in this.$$componentParameters.additional&&(this.useAdditionalOptions=!!this.$$componentParameters.additional.useAdditionalOptions),"forceSelfHostNavigation"in this.$$componentParameters.additional&&(this.forceSelfHostNavigation=!!this.$$componentParameters.additional.forceSelfHostNavigation),"addLanguageToResultsURL"in this.$$componentParameters.additional&&(this.addLanguageToResultsURL=!!this.$$componentParameters.additional.addLanguageToResultsURL),"forceLocationChange"in this.$$componentParameters.additional&&(this.forceLocationChange=!!this.$$componentParameters.additional.forceLocationChange),"forceChangeToSearch"in this.$$componentParameters.additional&&(this.forceChangeToSearch=!!this.$$componentParameters.additional.forceChangeToSearch),"disableCookies"in this.$$componentParameters.additional&&(this.useCookies=!this.$$componentParameters.additional.disableCookies),"disableRouteTypes"in this.$$componentParameters.additional&&this.$$componentParameters.additional.disableRouteTypes instanceof Array&&this.$$componentParameters.additional.disableRouteTypes.length>0)for(var e=0;e<this.$$componentParameters.additional.disableRouteTypes.length;e++){var i=this.tripTypes.indexOf(this.$$componentParameters.additional.disableRouteTypes[e]);i>=0&&this.tripTypes.length>0&&this.tripTypes.splice(i,1)}"forceInitialTripType"in this.$$componentParameters.additional&&this.tripTypes.indexOf(this.$$componentParameters.additional.forceInitialTripType)>=0&&(this.forceInitialTripType=this.$$componentParameters.additional.forceInitialTripType)}if(this.formDataIsValidForInit())this.useCookies=!1,
this.$$rawdata=t.cloneObject(this.$$componentParameters.formData||this.$$componentParameters.additional.formData);else if(this.$$componentParameters.additional&&this.$$componentParameters.additional.init)this.$$controller.log("Initted by component additional parameters",this.$$componentParameters.additional.init),this.$$controller.log("Cookies disabled"),this.preinittedData=this.$$componentParameters.additional.init,this.mode="preinitted",this.useCookies=!1;else if(1==this.$$componentParameters.route.length&&parseInt(this.$$componentParameters.route[0])>0)this.tuneSearch=parseInt(this.$$componentParameters.route[0]),isNaN(this.tuneSearch)||(this.mode="tunesearch");else if(3==this.$$componentParameters.route.length){for(var s;s=this.paramsParsers.segs.exec(this.$$componentParameters.route[0]);){if(s.shift(),8==s[2].length)s[2]=s[2].substr(0,4)+"-"+s[2].substr(4,2)+"-"+s[2].substr(6);else{var o=new Date;o.setDate(o.getDate()+parseInt(s[2].substr(1),10)),s[2]=o.getFullYear()+"-"+("0"+(o.getMonth()+1)).substr(-2)+"-"+("0"+o.getDate()).substr(-2)}s.push(!0),s.push(!0),this.preinittedData.segments.push(s)}for(;s=this.paramsParsers.passengers.exec(this.$$componentParameters.route[1]);)this.preinittedData.passengers[s[1]]=parseInt(s[2]);if(this.mode="preinitted",this.$$componentParameters.route[2]){this.$$componentParameters.route[2]=this.$$componentParameters.route[2].split("-");for(var e=0;e<this.$$componentParameters.route[2].length;e++)"direct"==this.$$componentParameters.route[2][e]&&(this.preinittedData.direct=!0),"vicinityDates"==this.$$componentParameters.route[2][e]&&(this.preinittedData.vicinityDates=!0),"GO"==this.$$componentParameters.route[2][e]&&(this.preinittedData.immediateSearch=!0),"class="==this.$$componentParameters.route[2][e].substr(0,6)&&(s=this.$$componentParameters.route[2][e].substr(6),this.serviceClasses.indexOf(s)>=0&&(this.preinittedData.serviceClass=s)),"flightNumbers="==this.$$componentParameters.route[2][e].substr(0,14)&&(this.preinittedData.flightNumbers=this.$$componentParameters.route[2][e].substr(14).split("+"))}}else if(this.useCookies){n.get(this.getCookieName())&&n.get(this.getCookieName()).indexOf('"TSE"')&&(this.$$controller.log("WRITING COOKIE",this.getCookieName(),n.get(this.getCookieName()).replace('"TSE"','"NQZ"')),n.set(this.getCookieName(),n.get(this.getCookieName()).replace('"TSE"','"NQZ"'),{expires:365}));var r=n.getJSON(this.getCookieName());r&&r.passengers&&r.segments&&r.segments instanceof Array&&r.segments.length>0&&r.segments[0].length>2&&null!==r.segments[0][0]&&null!==r.segments[0][1]&&null!==r.segments[0][2]&&(this.$$controller.log("Initted by cookie",r),this.preinittedData=r,this.mode="preinitted")}},o.prototype.formDataIsValidForInit=function(){var e=!1;if(this.$$componentParameters.formData||this.$$componentParameters.additional.formData){var t=this.$$componentParameters.additional.formData?this.$$componentParameters.additional.formData:this.$$componentParameters.formData;if("flights"in t&&"search"in t.flights&&"request"in t.flights.search&&"segments"in t.flights.search.request&&t.flights.search.request.segments instanceof Array&&t.flights.search.request.segments.length)if(t.flights.search.request.segments.length>1)e=!0;else{var i=t.flights.search.request.segments[0];"departureDate"in i&&(e=!0)}}return e},o.prototype.recalcDateRestrictions=function(){var e,t,i=this.segments();this.dateRestrictions=[];for(var n=0;n<i.length;n++){if(e=this.options.dateOptions.minDate,t=null,this.options.dateOptions.incorrectDatesBlock)for(var s=0;s<i.length;s++)s<n&&i[s].items.departureDate.value()?(!e||e<i[s].items.departureDate.value().dateObject())&&(e=i[s].items.departureDate.value().dateObject()):s>n&&i[s].items.departureDate.value()&&!t&&(t=i[s].items.departureDate.value().dateObject());(!t||e>t)&&(t=this.options.dateOptions.maxDate),this.dateRestrictions.push([e,t])}},o.prototype.getSegmentDateParameters=function(e,t){for(var i={disabled:this.dateRestrictions[t][0]>e||this.dateRestrictions[t][1]<e,segments:[],period:!1},n=this.segments(),s=0;s<n.length;s++)n[s].items.departureDate.value()&&e.getTime()==n[s].items.departureDate.value().dateObject().getTime()&&i.segments.push(s),s>0&&n[s-1].items.departureDate.value()&&n[s].items.departureDate.value()&&e.getTime()>n[s-1].items.departureDate.value().dateObject().getTime()&&e.getTime()<n[s].items.departureDate.value().dateObject().getTime()&&(i.period=!0);return i},o.prototype.segmentGeoChanged=function(e,t){if("RT"==this.tripType()&&0==e.index){this.segments()[1].items["arrival"==t?"departure":"arrival"].value(e.items[t].value())}this.getScheduleDates(e.index)},o.prototype.getScheduleDates=function(e){var t=this,i=this.segments()[e].items.arrival.value(),n=this.segments()[e].items.departure.value();if(i&&n&&this.highlightDates&&n.IATA!==i.IATA){var s=this.$$controller.options.dataURL+"/flights/availability/schedule/"+n.IATA+"/"+i.IATA+"/withTransfers";fetch(s,{credentials:"same-origin"}).then(function(e){return e.json()}).then(function(i){var n=i,s={};if(n.flights){n.flights.availability.dates.map(function(e){var t=new Date(e.date);s[t.getTime()]={marketingIATA:e.marketingIATA,operatingIATA:e.operatingIATA}})}var o=t.datesAvailable();o[e]=s,t.datesAvailable(o)})}},o.prototype.segmentDateChanged=function(e){var t=this.segments();if(t.length-1>e.index&&e.items.departureDate.value())for(var i=e.index+1;i<t.length;i++)t[i].items.departureDate.value()&&t[i].items.departureDate.value().getTimestamp()<e.items.departureDate.value().getTimestamp()&&t[i].items.departureDate.value(null)},o.prototype.processValidation=function(){var e;if(this.validaTERROR()){e=this.segments();for(var t=0;t<e.length;t++)for(var i in e[t].items)if(e[t].items.hasOwnProperty(i)&&e[t].items[i].error())return void e[t].items[i].focus(!0)}},o.prototype.goToResults=function(e){var t=this.URLParams(),i=this.addLanguageToResultsURL;this.forceLocationChange||!this.forceSelfHostNavigation&&0!==this.$$controller.options.dataURL.indexOf("/")&&0!==this.$$controller.options.dataURL.indexOf(document.location.protocol+"//"+document.location.host)?document.location=this.$$controller.options.dataURL.split("/").splice(0,3).join("/")+"/results/"+(e?e+"/":"")+t+(i?"?changelang="+this.$$controller.options.i18nLanguage:""):this.$$controller.navigate("results/"+(e?e+"/":"")+t,!0,"FlightsResults")},o.prototype.startSearch=function(){var e=this.segments(),t=[];if(!this.searchAllowedByParamChange())return this.parametersChanged(!0),void this.parametersChanged(!1);if("CR"==this.tripType()){for(var i=0;i<e.length;i++){var n=!0;for(var o in e[i].items)if(e[i].items.hasOwnProperty(o)&&e[i].items[o].value()){n=!1;break}n&&t.push(i)}if(t.length<e.length){for(var r=[],i=0;i<e.length;i++)t.indexOf(i)<0&&(e[i].index=r.length,r.push(e[i]));this.segments(r)}}else"RT"!=this.tripType()||this.segments()[1].items.departureDate.value()||this.tripType("OW");this.searchError(!1),this.isValid()?this.delayedSearch&&this.$$controller.navigateGetPushStateSupport()?(s.tap("searchForm.search"),s.tap("analyticsStartSearch",{noPrefix:!0}),this.goToResults()):(s.tap("searchForm.search"),s.tap("analyticsStartSearch",{noPrefix:!0}),this.makeSynchronousSeach()):(this.validaTERROR(!0),this.processValidation(),s.tap("searchForm.validationError"))},o.prototype.makeSynchronousSeach=function(){for(var e=this,t=this.passengers(),i={segments:[],passengers:[],parameters:{direct:this.directFlights(),aroundDates:this.vicinityDates()?this.options.dateOptions.aroundDatesValues[this.options.dateOptions.aroundDatesValues.length-1]:0,serviceClass:this.serviceClass(),flightNumbers:this.flightNumbers(),airlines:[]}},n=this.segments(),s=0;s<n.length;s++)i.segments.push({departure:{IATA:n[s].items.departure.value().IATA,isCity:n[s].items.departure.value().isCity},arrival:{IATA:n[s].items.arrival.value().IATA,isCity:n[s].items.arrival.value().isCity},departureDate:n[s].items.departureDate.value()?n[s].items.departureDate.value().dropTime().getISODateTime():null});for(var s in t)t.hasOwnProperty(s)&&i.passengers.push({type:s,count:t[s]()});this.$$controller.log("STARTING SEARCH"),this.isSearching(!0),e.searchError(!1),this.searchRequest(this.$$controller.loadData("/flights/search/request",{request:JSON.stringify(i)},function(t,n){var s;try{s=JSON.parse(t),s.system&&s.system.error?e.onSearchErrorOccured("systemError",s.system.error):e.delayedSearch||!s.flights.search.results.info.errorCode||i.parameters.aroundDates&&i.parameters.direct?e.goToResults(s.flights.search.request.id):e.onSearchErrorOccured("emptyResult")}catch(i){e.onSearchErrorOccured("brokenJSON",t)}},function(t){e.onSearchErrorOccured("requestFailed",[t.status,t.statusText])}))},o.prototype.onSearchErrorOccured=function(e,t){void 0!==t&&0!==t[0]&&this.$$controller.error("SEARCH ERROR: "+e,t),void 0!==t&&0===t[0]||this.searchError(this.$$controller.i18n("FlightsSearchForm","searchError_"+e)),this.isSearching(!1),"emptyResult"==e&&s.tap("searchResults.noFlights"),s.tap("searchResults.resultsError")},o.prototype.abortSearch=function(){this.isSearching()&&(this.isSearching(!1),this.searchRequest().abort())},o.prototype.setPassengers=function(e,t){var i=this.passengersRestrictions();i[e]&&t>=i[e].min&&t<=i[e].max&&this.passengers()[e](t)},o.prototype.getPassengersCounts=function(e){for(var t=[],i=0;i<=this.options.passengerCount[e];i++)t.push(i);return t},o.prototype.getPassengerAgeRestrictionText=function(e){return this.options.ageRestrictions?this.$$controller.i18n("FlightsSearchForm",this.options.ageRestrictions[e].translation).replace("[%-ageFrom-%]",this.options.ageRestrictions[e].from).replace("[%-ageTo-%]",this.options.ageRestrictions[e].to):this.$$controller.i18n("FlightsSearchForm","passengerType_"+e+"_ageInfo")},o.prototype.fillPreInittedPassengers=function(e,t){for(var i,n=0;n<e.length;n++)(i=this.passengersRestrictions()[e[n]])&&t[e[n]]&&(t[e[n]]>i.max?t[e[n]]=i.max:t[e[n]]<i.min&&(t[e[n]]=i.min),this.setPassengers(e[n],t[e[n]]))},o.prototype.buildModels=function(){if(!this.$$rawdata&&this.$$componentParameters.additional&&this.$$componentParameters.additional.formData){var e=this.$$componentParameters.additional.formData.guide;this.$$rawdata={flights:this.$$componentParameters.additional.formData.flights,system:this.$$componentParameters.additional.formData.system,guide:{airports:e&&e.airports?e.airports:null,cities:e&&e.cities?e.cities:null,countries:e&&e.countries?e.countries:null}}}if(this.$$rawdata.system&&this.$$rawdata.system.error)return void this.$$error(this.$$rawdata.system.error.message);this.buildInitialOptions(),this.buildInitialSegments(),this.buildInitialPassengers(),this.setCookies=!0,this.initialParams=this.URLParams(),this.parametersChanged(!1),"preinitted"==this.mode&&this.preinittedData.immediateSearch?(this.$$loading(!1),this.startSearch()):this.loadAirlines()},o.prototype.buildInitialOptions=function(){var e=new Date;e.setHours(0,0,0,0),this.options=this.$$rawdata.flights.search.formData.maxLimits,this.options.totalPassengers=parseInt(this.options.totalPassengers),this.passengersUseExtendedSelect=this.$$rawdata.flights.search.formData.passengersSelect.extendedPassengersSelect,this.passengersFastSelectOptions=this.$$rawdata.flights.search.formData.passengersSelect.fastPassengersSelect,this.tripTypeDisplayFormat=this.$$rawdata.flights.search.formData.passengersSelect.tripType,this.passengersAltSelect=this.$$rawdata.flights.search.formData.passengersSelect.passengersSelectAlt,this.options.dateOptions=this.$$rawdata.flights.search.formData.dateOptions,this.options.dateOptions.incorrectDatesBlock=!1,this.options.dateOptions.minDate=new Date(e),this.options.dateOptions.minDate.setDate(this.options.dateOptions.minDate.getDate()+this.options.dateOptions.minOffset),this.options.dateOptions.maxDate=new Date(e),this.options.dateOptions.maxDate.setDate(this.options.dateOptions.maxDate.getDate()+this.options.dateOptions.maxOffset),this.options.hideDirectOnlyCheckbox=this.$$rawdata.flights.search.formData.hideDirectOnlyCheckbox,this.options.scheduleSearchEnable=this.$$rawdata.flights.search.formData.scheduleSearchEnable,this.showCitySwapBtn=this.$$rawdata.flights.search.formData.showCitySwapBtn,this.onFocusAutocomplete=!!this.$$rawdata.flights.search.formData.onFocusAutocomplete,this.forceAggregationAirports=!!this.$$rawdata.flights.search.formData.forceAggregationAirports,this.highlightDates=!!this.$$rawdata.flights.search.formData.highlightDates,this.disableUnavailableDate=!!this.$$rawdata.flights.search.formData.disableUnavailableDate,this.searchWithoutAdults=this.$$rawdata.flights.search.formData.searchWithoutAdults},o.prototype.buildInitialSegments=function(){if("preinitted"==this.mode){for(var e,t=0;t<this.preinittedData.segments.length;t++){var i=null,n=null,s=new Date;s.setHours(0,0,0),s=Math.floor(s.getTime()/1e3),this.preinittedData.segments[t][0]&&(i=this.$$controller.getModel("Flights/Common/Geo",{data:{IATA:this.preinittedData.segments[t][0],isCity:this.preinittedData.segments[t][3],cityID:0},guide:this.$$rawdata.guide}),i.identifier||(i=null)),this.preinittedData.segments[t][1]&&(n=this.$$controller.getModel("Flights/Common/Geo",{data:{IATA:this.preinittedData.segments[t][1],isCity:this.preinittedData.segments[t][4],cityID:0},guide:this.$$rawdata.guide}),n.identifier||(n=null)),this.preinittedData.segments[t][2]?(e=this.$$controller.getModel("Common/Date",this.preinittedData.segments[t][2]),e.getTimestamp()<s&&(e=null)):e=null,this.addSegment(i,n,e)}this.forceInitialTripType?this.tripType(this.forceInitialTripType):1==this.preinittedData.segments.length?this.tripType("OW"):2==this.preinittedData.segments.length&&this.preinittedData.segments[0][0]==this.preinittedData.segments[1][1]&&this.preinittedData.segments[0][1]==this.preinittedData.segments[1][0]&&this.preinittedData.segments[0][3]==this.preinittedData.segments[1][4]&&this.preinittedData.segments[0][4]==this.preinittedData.segments[1][3]?this.tripType("RT"):this.tripType("CR"),this.directFlights(this.preinittedData.direct),this.vicinityDates(this.preinittedData.vicinityDates),this.serviceClass(this.preinittedData.serviceClass),this.flightNumbers(this.preinittedData.flightNumbers||[])}else{for(var t=0;t<this.$$rawdata.flights.search.request.segments.length;t++){var o=this.$$rawdata.flights.search.request.segments[t];this.addSegment(o.departure?this.$$controller.getModel("Flights/Common/Geo",{data:o.departure,guide:this.$$rawdata.guide}):null,o.arrival?this.$$controller.getModel("Flights/Common/Geo",{data:o.arrival,guide:this.$$rawdata.guide}):null,o.departureDate?this.$$controller.getModel("Common/Date",o.departureDate):null)}this.vicinityDates(0!=this.$$rawdata.flights.search.request.parameters.aroundDates),!0===this.$$rawdata.flights.search.request.parameters.useCookies&&(this.forceUseCookies=!0),this.serviceClasses.indexOf(this.$$rawdata.flights.search.request.parameters.serviceClass)>=0&&this.serviceClass(this.$$rawdata.flights.search.request.parameters.serviceClass),this.forceInitialTripType?this.tripType(this.forceInitialTripType):this.tripType(this.$$rawdata.flights.search.request.parameters.searchType)}},o.prototype.buildInitialPassengers=function(){for(var t,i={},n="preinitted"==this.mode&&Object.keys(this.preinittedData.passengers).length>0,s=0;s<this.$$rawdata.flights.search.request.passengers.length;s++)i[this.$$rawdata.flights.search.request.passengers[s].type]=this.$$rawdata.flights.search.request.passengers[s].count;for(var s in this.options.passengerCount)this.options.passengerCount.hasOwnProperty(s)&&(i[s]=e.observable(i[s]&&!n?i[s]:0));if(this.passengers(i),n){this.fillPreInittedPassengers(this.passengerAdultTypes,this.preinittedData.passengers),this.fillPreInittedPassengers(this.passengerInfantTypes,this.preinittedData.passengers),t=[];for(var s=0;s<this.passengerTypesOrder.length;s++)this.passengerAdultTypes.indexOf(this.passengerTypesOrder[s])<0&&this.passengerInfantTypes.indexOf(this.passengerTypesOrder[s])<0&&t.push(this.passengerTypesOrder[s]);this.fillPreInittedPassengers(t,this.preinittedData.passengers)}},o.prototype.loadAirlines=function(){var e=this;this.carriersLoaded()||this.$$controller.loadData("/guide/airlines/all",{},function(t,i){try{var n=JSON.parse(t);if(o.prototype.carriers instanceof Array)return void e.carriersLoaded(!0);if(null===o.prototype.carriers&&(o.prototype.carriers=[]),n.guide&&n.guide.airlines){for(var s in n.guide.airlines)n.guide.airlines.hasOwnProperty(s)&&s&&o.prototype.carriers.push(e.$$controller.getModel("Flights/Common/Airline",n.guide.airlines[s]));o.prototype.carriers.sort(function(e,t){return e.name&&t.name?e.name.localeCompare(t.name):0}),e.carriersLoaded(!0)}else e.$$controller.warn("Can not load carriers list, wrong data")}catch(t){e.$$controller.warn(t)}},function(){e.$$controller.warn("Can not load carriers list")})},o.prototype.addSegment=function(e,t,i){this.segments.push(this.$$controller.getModel("Flights/SearchForm/Segment",{departure:e,arrival:t,departureDate:i,index:this.segments().length,form:this})),this.getScheduleDates(this.segments().length-1)},o.prototype.continueCR=function(){var e=this.segments().length;"CR"==this.tripType()&&e<this.options.flightSegments&&this.addSegment(this.segments()[e-1].items.arrival.value(),null,null)},o.prototype.removeLastCRSegment=function(){var e=this.segments().length;"CR"==this.tripType()&&e>1&&this.segments.pop()},o.prototype.$$usedModels=["Flights/SearchForm/Segment","Common/Date","Flights/Common/Geo","Flights/Common/Airline"],o.prototype.dataURL=function(){var e="/flights/search/formData/";return"tunesearch"==this.mode&&(e+=this.tuneSearch),this.$$rawdata?"":e},o.prototype.dataPOSTParameters=function(){var e={},t={};if("preinitted"==this.mode){for(var i=0;i<this.preinittedData.segments.length;i++)t[this.preinittedData.segments[i][0]]=this.preinittedData.segments[i][0],t[this.preinittedData.segments[i][1]]=this.preinittedData.segments[i][1];e.resources={},Object.keys(t).map(function(t){e.resources["guide/airports/"+t]={},e.resources["guide/cities/"+t]={}}),e.resources=JSON.stringify(e.resources)}return e},o.prototype.citySwap=function(e){var t=this.segments()[e].items.departure.value();this.segments()[e].items.departure.value(this.segments()[e].items.arrival.value()),this.segments()[e].items.arrival.value(t)},o.prototype.loadInitialData=function(){(!this.$$componentParameters.additional||!this.$$componentParameters.additional.formData||3===this.$$componentParameters.route.length||this.geoPresets||1===this.$$componentParameters.route.length&&parseInt(this.$$componentParameters.route[0])>0)&&i.prototype.loadInitialData.apply(this)},o.prototype.pageTitle="FlightsSearch",o.prototype.carriers=null,o.prototype.onNewDesignButtonClick=function(){n.remove("forceOldDesign"),n.set("forceNewDesign",!0,{expires:365}),this.$$controller.navigate("",!1,""),window.location.reload()},o}),define("js/vm/Flights/SearchForm/Segment",["knockout","js/vm/helpers","js/vm/BaseStaticModel"],function(e,t,i){function n(t,n){i.apply(this,[null,n]),this.index=t.index,this.form=t.form,this.items={arrival:{value:e.observable(t.arrival),focus:e.observable(!1),error:e.observable(null)},departure:{value:e.observable(t.departure),focus:e.observable(!1),error:e.observable(null)},departureDate:{value:e.observable(t.departureDate),focus:e.observable(!1),error:e.observable(null)}},this.validate(),this.items.departure.value.subscribe(function(e){this.form.segmentGeoChanged(this,"departure"),this.validate()},this),this.items.arrival.value.subscribe(function(e){this.form.segmentGeoChanged(this,"arrival"),this.validate()},this),this.items.departureDate.value.subscribe(function(e){this.form.segmentDateChanged(this),this.form.recalcDateRestrictions(),this.validate()},this)}return t.extendModel(n,[i]),n.prototype.validate=function(){for(var e in this.items)this.items.hasOwnProperty(e)&&!this.items[e].value()?this.items[e].error("noInput"):this.items[e].error(null);this.items.departure.value()&&this.items.arrival.value()&&this.items.departure.value().identifier==this.items.arrival.value().identifier&&this.items.arrival.error("sameAsDeparture"),this.form.processValidation()},n}),define("js/vm/Flights/LastSearches/Controller",["knockout","js/vm/helpers","js/vm/BaseControllerModel"],function(e,t,i){function n(t){this.name="FlightsLastSearchesController",i.apply(this,arguments),this.history=e.observableArray([])}return t.extendModel(n,[i]),n.prototype.maxCount=5,n.prototype.buildModels=function(){var e,t=[];if(this.$$rawdata.flights&&this.$$rawdata.flights.search&&this.$$rawdata.flights.search.history){for(var i=0;i<this.$$rawdata.flights.search.history.length&&!(t.length>=this.maxCount);i++){e=this.$$rawdata.flights.search.history[i].request;for(var n=0;n<e.segments.length;n++)e.segments[n].departure=this.$$controller.getModel("Flights/Common/Geo",{data:e.segments[n].departure,guide:this.$$rawdata.guide}),e.segments[n].arrival=this.$$controller.getModel("Flights/Common/Geo",{data:e.segments[n].arrival,guide:this.$$rawdata.guide}),e.segments[n].departureDate=this.$$controller.getModel("Common/Date",e.segments[n].departureDate);this.$$rawdata.flights.search.history[i].hasResults&&this.$$rawdata.flights.search.history[i].resultsCount>0&&t.push(e)}this.history(t)}},n.prototype.passengersSummary=function(e){var i=0,n=[];return e.map(function(e){i+=e.count,n.push(e.type)}),0==n.length?this.$$controller.i18n("FlightsSearchForm","passSummary_numeral_noPassengers"):1==n.length?i+" "+this.$$controller.i18n("FlightsSearchForm","passSummary_numeral_"+n.pop()+"_"+t.getNumeral(i,"one","twoToFour","fourPlus")):i+" "+this.$$controller.i18n("FlightsSearchForm","passSummary_numeral_mixed_"+t.getNumeral(i,"one","twoToFour","fourPlus"))},n.prototype.goTo=function(e){this.$$controller.navigate("results/"+e.id,!0,"FlightsResults")},n.prototype.dataURL=function(){return"/flights/search/history"},n.prototype.$$usedModels=["Common/Date","Flights/Common/Geo"],n.prototype.$$i18nSegments=["FlightsLastSearches","FlightsSearchForm"],n}),define("js/vm/Common/Date",["knockout","js/vm/helpers","js/vm/BaseDynamicModel","js/vm/BaseI18nizedModel"],function(e,t,i,n){function s(t){this.dateObject=e.observable(),this.update(t),i.apply(this,arguments),this.getDate=e.pureComputed(function(){return this.dateObject().getDate()},this),this.getZeroedDate=e.pureComputed(function(){return this.prependZero(this.dateObject().getDate())},this),this.getMonth=e.pureComputed(function(){return this.prependZero(this.dateObject().getMonth()+1)},this),this.getYear=e.pureComputed(function(){return this.dateObject().getFullYear()},this),this.getHours=e.pureComputed(function(){return this.prependZero(this.dateObject().getHours())},this),this.getMinutes=e.pureComputed(function(){return this.prependZero(this.dateObject().getMinutes())},this),this.getSeconds=e.pureComputed(function(){return this.prependZero(this.dateObject().getSeconds())},this),this.getDOW=e.pureComputed(function(){return 0==this.dateObject().getDay()?7:this.dateObject().getDay()},this),this.getMonthName=e.pureComputed(function(){return this.$$controller.i18n("dates","month_"+(this.dateObject().getMonth()+1)+"_f")},this),this.getMonthNameShort=e.pureComputed(function(){return this.$$controller.i18n("dates","month_"+(this.dateObject().getMonth()+1)+"_s")},this),this.getDOWName=e.pureComputed(function(){return this.$$controller.i18n("dates","dow_"+this.getDOW()+"_f")},this),this.getDOWNameShort=e.pureComputed(function(){return this.$$controller.i18n("dates","dow_"+this.getDOW()+"_s")},this),this.getTime=e.pureComputed(function(){return this.getHours()+":"+this.getMinutes()},this),this.getShortDate=e.pureComputed(function(){return this.getDate()+" "+this.getMonthName()},this),this.getShortDateWithDOW=e.pureComputed(function(){return this.getDate()+" "+this.getMonthName()+", "+this.getDOWNameShort()+"."},this),this.getFullDate=e.pureComputed(function(){return this.getDate()+" "+this.getMonthName()+" "+this.getYear()+", "+this.getHours()+":"+this.getMinutes()},this),this.getISODate=e.pureComputed(function(){return this.getYear()+"-"+this.getMonth()+"-"+this.getZeroedDate()},this),this.getISOTime=e.pureComputed(function(){return this.getTime()+":"+this.getSeconds()},this),this.getISODateTime=e.pureComputed(function(){return this.getISODate()+"T"+this.getISOTime()},this),this.getHumanFullDate=e.pureComputed(function(){return this.getHours()+":"+this.getMinutes()+" "+this.getDate()+" "+this.getMonthName()+" "+this.getYear()},this),this.getTimestamp=e.pureComputed(function(){return Math.floor(this.dateObject().getTime()/1e3)},this)}return t.extendModel(s,[i,n]),s.prototype.$$i18nSegments=["dates"],s.prototype.update=function(e){var t=null;if("string"==typeof e){var i=this.regexes.fulltime.test(e),n=this.regexes.date.test(e);n&&(e+="T00:00:00"),(i||n)&&(t=new Date(e),t.setFullYear(parseInt(e.substr(0,4),10),parseInt(e.substr(5,2),10)-1,parseInt(e.substr(8,2),10)),t.setHours(parseInt(e.substr(11,2),10)),t.setMinutes(parseInt(e.substr(14,2),10)),t.setSeconds(parseInt(e.substr(17,2),10)))}else"object"==typeof e&&e instanceof Date&&(t=e);t&&!isNaN(t.getDate())||(t=new Date(0)),this.dateObject(t)},s.prototype.regexes={fulltime:/^\d{4}-\d{1,2}-\d{1,2}T\d{1,2}:\d{1,2}:\d{1,2}$/i,date:/^\d{4}-\d{1,2}-\d{1,2}$/},s.prototype.prependZero=function(e){return e>=0&&e<10&&(e="0"+e.toString()),e},s.prototype.dropTime=function(e){var t=this.dateObject();return t.setHours(0,0,0,0),this.dateObject(t),this},s.prototype.offsetDate=function(e){var t=new Date(this.dateObject());return t.setDate(t.getDate()+e),this.$$controller.getModel("Common/Date",t)},s.prototype.setHours=function(e,t,i){this.dateObject().setHours(e,t,i),this.dateObject.valueHasMutated()},s.prototype.dateDiffInDays=function(e){var t=e.getTimestamp(),i=this.getTimestamp(),n=t-i;return Math.round(n/86400)},s}),define("js/vm/Flights/Common/Geo",["knockout","js/vm/helpers","js/vm/BaseStaticModel","js/vm/Models/LocalStorage"],function(e,t,i,n){function s(e,t){if(i.apply(this,[e.data,t]),this.processGuide(e.guide),this.IATA=this.IATA?this.IATA:"",this.city=this.getData("cities",this.cityId||this.IATA),this.airport=this.getData("airports",this.IATA),this.isCity&&!this.city&&this.IATA){for(var n in this.pool.cities)this.pool.cities.hasOwnProperty(n)&&this.pool.cities[n].IATA==this.IATA&&(this.city=this.pool.cities[n]);this.city||(this.isCity=!1,this.airport=this.pool.airports[this.IATA]?this.pool.airports[this.IATA]:null,this.city=this.airport&&this.pool.cities[this.airport.cityId]?this.pool.cities[this.airport.cityId]:null)}else this.isCity||this.city||!this.airport||(this.city=this.getData("cities",this.airport.cityId));this.countryCode="",this.isCity&&this.city?this.countryCode=this.city.countryCode:!this.isCity&&this.airport&&(this.countryCode=this.airport.countryCode),this.country=this.getData("countries",this.countryCode),this.name="",this.properName="",this.isCity&&this.city?this.name=this.city.name:!this.isCity&&this.airport&&(this.name=this.airport.name,this.properName=this.airport.properName||this.airport.name),this.identifier="",this.isCity&&this.city?this.identifier=this.city.id:!this.isCity&&this.airport&&(this.identifier=this.airport.IATA),this.city||(this.city={name:this.name}),this.country||(this.country={name:this.countryCode||""})}return t.extendModel(s,[i]),s.prototype.pool={countries:{},cities:{},airports:{}},s.prototype.getData=function(e,t){if(!this.pool[e][t]){var i=n.get(e+"_"+t+"_"+this.$$controller.options.i18nLanguage,null);return i&&(this.pool[e][t]=i),i}return this.pool[e][t]},s.prototype.processGuide=function(e){if("object"==typeof e)for(var t in e)if(e.hasOwnProperty(t)&&this.pool.hasOwnProperty(t))for(var i in e[t])e[t].hasOwnProperty(i)&&!this.pool[t][i]&&(this.pool[t][i]=this.$$controller.getModel("BaseStaticModel",e[t][i]),this.putToLocalStorage(i,t,e[t][i]))},s.prototype.putToLocalStorage=function(e,t,i){var s=i.IATA?i.IATA:e;n.set(t+"_"+s+"_"+this.$$controller.options.i18nLanguage,i)},s}),define("domReady",[],function(){"use strict";function e(e){var t;for(t=0;t<e.length;t+=1)e[t](c)}function t(){var t=u;l&&t.length&&(u=[],e(t))}function i(){l||(l=!0,r&&clearInterval(r),t())}function n(e){return l?e(c):u.push(e),n}var s,o,r,a="undefined"!=typeof window&&window.document,l=!a,c=a?document:null,u=[];if(a){if(document.addEventListener)document.addEventListener("DOMContentLoaded",i,!1),window.addEventListener("load",i,!1);else if(window.attachEvent){window.attachEvent("onload",i),o=document.createElement("div");try{s=null===window.frameElement}catch(e){}o.doScroll&&s&&window.external&&(r=setInterval(function(){try{o.doScroll(),i()}catch(e){}},30))}"complete"===document.readyState&&i()}return n.version="2.0.1",n.load=function(e,t,i,s){s.isBuild?i(null):n(i)},n}),function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define("js/lib/stacktrace/v.1.3.1/stacktrace.min",[],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.StackTrace=e()}}(function(){var e;return function e(t,i,n){function s(r,a){if(!i[r]){if(!t[r]){var l="function"==typeof require&&require;if(!a&&l)return l(r,!0);if(o)return o(r,!0);var c=new Error("Cannot find module '"+r+"'");throw c.code="MODULE_NOT_FOUND",c}var u=i[r]={exports:{}};t[r][0].call(u.exports,function(e){var i=t[r][1][e];return s(i||e)},u,u.exports,e,t,i,n)}return i[r].exports}for(var o="function"==typeof require&&require,r=0;r<n.length;r++)s(n[r]);return s}({1:[function(t,i,n){!function(s,o){"use strict";"function"==typeof e&&e.amd?e("error-stack-parser",["stackframe"],o):"object"==typeof n?i.exports=o(t("stackframe")):s.ErrorStackParser=o(s.StackFrame)}(this,function(e){"use strict";function t(e,t,i){if("function"==typeof Array.prototype.map)return e.map(t,i);for(var n=new Array(e.length),s=0;s<e.length;s++)n[s]=t.call(i,e[s]);return n}function i(e,t,i){if("function"==typeof Array.prototype.filter)return e.filter(t,i);for(var n=[],s=0;s<e.length;s++)t.call(i,e[s])&&n.push(e[s]);return n}function n(e,t){if("function"==typeof Array.prototype.indexOf)return e.indexOf(t);for(var i=0;i<e.length;i++)if(e[i]===t)return i;return-1}var s=/(^|@)\S+\:\d+/,o=/^\s*at .*(\S+\:\d+|\(native\))/m,r=/^(eval@)?(\[native code\])?$/;return{parse:function(e){if(void 0!==e.stacktrace||void 0!==e["opera#sourceloc"])return this.parseOpera(e);if(e.stack&&e.stack.match(o))return this.parseV8OrIE(e);if(e.stack)return this.parseFFOrSafari(e);throw new Error("Cannot parse given Error object")},extractLocation:function(e){if(-1===e.indexOf(":"))return[e];var t=/(.+?)(?:\:(\d+))?(?:\:(\d+))?$/,i=t.exec(e.replace(/[\(\)]/g,""));return[i[1],i[2]||void 0,i[3]||void 0]},parseV8OrIE:function(s){return t(i(s.stack.split("\n"),function(e){return!!e.match(o)},this),function(t){t.indexOf("(eval ")>-1&&(t=t.replace(/eval code/g,"eval").replace(/(\(eval at [^\()]*)|(\)\,.*$)/g,""));var i=t.replace(/^\s+/,"").replace(/\(eval code/g,"(").split(/\s+/).slice(1),s=this.extractLocation(i.pop()),o=i.join(" ")||void 0,r=n(["eval","<anonymous>"],s[0])>-1?void 0:s[0];return new e(o,void 0,r,s[1],s[2],t)},this)},parseFFOrSafari:function(n){return t(i(n.stack.split("\n"),function(e){return!e.match(r)},this),function(t){if(t.indexOf(" > eval")>-1&&(t=t.replace(/ line (\d+)(?: > eval line \d+)* > eval\:\d+\:\d+/g,":$1")),-1===t.indexOf("@")&&-1===t.indexOf(":"))return new e(t);var i=t.split("@"),n=this.extractLocation(i.pop()),s=i.join("@")||void 0;return new e(s,void 0,n[0],n[1],n[2],t)},this)},parseOpera:function(e){return!e.stacktrace||e.message.indexOf("\n")>-1&&e.message.split("\n").length>e.stacktrace.split("\n").length?this.parseOpera9(e):e.stack?this.parseOpera11(e):this.parseOpera10(e)},parseOpera9:function(t){for(var i=/Line (\d+).*script (?:in )?(\S+)/i,n=t.message.split("\n"),s=[],o=2,r=n.length;r>o;o+=2){var a=i.exec(n[o]);a&&s.push(new e(void 0,void 0,a[2],a[1],void 0,n[o]))}return s},
parseOpera10:function(t){for(var i=/Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i,n=t.stacktrace.split("\n"),s=[],o=0,r=n.length;r>o;o+=2){var a=i.exec(n[o]);a&&s.push(new e(a[3]||void 0,void 0,a[2],a[1],void 0,n[o]))}return s},parseOpera11:function(n){return t(i(n.stack.split("\n"),function(e){return!!e.match(s)&&!e.match(/^Error created at/)},this),function(t){var i,n=t.split("@"),s=this.extractLocation(n.pop()),o=n.shift()||"",r=o.replace(/<anonymous function(: (\w+))?>/,"$2").replace(/\([^\)]*\)/g,"")||void 0;o.match(/\(([^\)]*)\)/)&&(i=o.replace(/^[^\(]+\(([^\)]*)\)$/,"$1"));var a=void 0===i||"[arguments not available]"===i?void 0:i.split(",");return new e(r,a,s[0],s[1],s[2],t)},this)}}})},{stackframe:11}],2:[function(e,t,i){function n(){this._array=[],this._set=Object.create(null)}var s=e("./util"),o=Object.prototype.hasOwnProperty;n.fromArray=function(e,t){for(var i=new n,s=0,o=e.length;o>s;s++)i.add(e[s],t);return i},n.prototype.size=function(){return Object.getOwnPropertyNames(this._set).length},n.prototype.add=function(e,t){var i=s.toSetString(e),n=o.call(this._set,i),r=this._array.length;(!n||t)&&this._array.push(e),n||(this._set[i]=r)},n.prototype.has=function(e){var t=s.toSetString(e);return o.call(this._set,t)},n.prototype.indexOf=function(e){var t=s.toSetString(e);if(o.call(this._set,t))return this._set[t];throw new Error('"'+e+'" is not in the set.')},n.prototype.at=function(e){if(e>=0&&e<this._array.length)return this._array[e];throw new Error("No element indexed by "+e)},n.prototype.toArray=function(){return this._array.slice()},i.ArraySet=n},{"./util":8}],3:[function(e,t,i){function n(e){return 0>e?1+(-e<<1):0+(e<<1)}function s(e){var t=1==(1&e),i=e>>1;return t?-i:i}var o=e("./base64");i.encode=function(e){var t,i="",s=n(e);do{t=31&s,s>>>=5,s>0&&(t|=32),i+=o.encode(t)}while(s>0);return i},i.decode=function(e,t,i){var n,r,a=e.length,l=0,c=0;do{if(t>=a)throw new Error("Expected more digits in base 64 VLQ value.");if(-1===(r=o.decode(e.charCodeAt(t++))))throw new Error("Invalid base64 digit: "+e.charAt(t-1));n=!!(32&r),r&=31,l+=r<<c,c+=5}while(n);i.value=s(l),i.rest=t}},{"./base64":4}],4:[function(e,t,i){var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");i.encode=function(e){if(e>=0&&e<n.length)return n[e];throw new TypeError("Must be between 0 and 63: "+e)},i.decode=function(e){return e>=65&&90>=e?e-65:e>=97&&122>=e?e-97+26:e>=48&&57>=e?e-48+52:43==e?62:47==e?63:-1}},{}],5:[function(e,t,i){function n(e,t,s,o,r,a){var l=Math.floor((t-e)/2)+e,c=r(s,o[l],!0);return 0===c?l:c>0?t-l>1?n(l,t,s,o,r,a):a==i.LEAST_UPPER_BOUND?t<o.length?t:-1:l:l-e>1?n(e,l,s,o,r,a):a==i.LEAST_UPPER_BOUND?l:0>e?-1:e}i.GREATEST_LOWER_BOUND=1,i.LEAST_UPPER_BOUND=2,i.search=function(e,t,s,o){if(0===t.length)return-1;var r=n(-1,t.length,e,t,s,o||i.GREATEST_LOWER_BOUND);if(0>r)return-1;for(;r-1>=0&&0===s(t[r],t[r-1],!0);)--r;return r}},{}],6:[function(e,t,i){function n(e,t,i){var n=e[t];e[t]=e[i],e[i]=n}function s(e,t){return Math.round(e+Math.random()*(t-e))}function o(e,t,i,r){if(r>i){var a=s(i,r),l=i-1;n(e,a,r);for(var c=e[r],u=i;r>u;u++)t(e[u],c)<=0&&(l+=1,n(e,l,u));n(e,l+1,u);var h=l+1;o(e,t,i,h-1),o(e,t,h+1,r)}}i.quickSort=function(e,t){o(e,t,0,e.length-1)}},{}],7:[function(e,t,i){function n(e){var t=e;return"string"==typeof e&&(t=JSON.parse(e.replace(/^\)\]\}'/,""))),null!=t.sections?new r(t):new s(t)}function s(e){var t=e;"string"==typeof e&&(t=JSON.parse(e.replace(/^\)\]\}'/,"")));var i=a.getArg(t,"version"),n=a.getArg(t,"sources"),s=a.getArg(t,"names",[]),o=a.getArg(t,"sourceRoot",null),r=a.getArg(t,"sourcesContent",null),l=a.getArg(t,"mappings"),u=a.getArg(t,"file",null);if(i!=this._version)throw new Error("Unsupported version: "+i);n=n.map(String).map(a.normalize).map(function(e){return o&&a.isAbsolute(o)&&a.isAbsolute(e)?a.relative(o,e):e}),this._names=c.fromArray(s.map(String),!0),this._sources=c.fromArray(n,!0),this.sourceRoot=o,this.sourcesContent=r,this._mappings=l,this.file=u}function o(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}function r(e){var t=e;"string"==typeof e&&(t=JSON.parse(e.replace(/^\)\]\}'/,"")));var i=a.getArg(t,"version"),s=a.getArg(t,"sections");if(i!=this._version)throw new Error("Unsupported version: "+i);this._sources=new c,this._names=new c;var o={line:-1,column:0};this._sections=s.map(function(e){if(e.url)throw new Error("Support for url field in sections not implemented.");var t=a.getArg(e,"offset"),i=a.getArg(t,"line"),s=a.getArg(t,"column");if(i<o.line||i===o.line&&s<o.column)throw new Error("Section offsets must be ordered and non-overlapping.");return o=t,{generatedOffset:{generatedLine:i+1,generatedColumn:s+1},consumer:new n(a.getArg(e,"map"))}})}var a=e("./util"),l=e("./binary-search"),c=e("./array-set").ArraySet,u=e("./base64-vlq"),h=e("./quick-sort").quickSort;n.fromSourceMap=function(e){return s.fromSourceMap(e)},n.prototype._version=3,n.prototype.__generatedMappings=null,Object.defineProperty(n.prototype,"_generatedMappings",{get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}}),n.prototype.__originalMappings=null,Object.defineProperty(n.prototype,"_originalMappings",{get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}}),n.prototype._charIsMappingSeparator=function(e,t){var i=e.charAt(t);return";"===i||","===i},n.prototype._parseMappings=function(e,t){throw new Error("Subclasses must implement _parseMappings")},n.GENERATED_ORDER=1,n.ORIGINAL_ORDER=2,n.GREATEST_LOWER_BOUND=1,n.LEAST_UPPER_BOUND=2,n.prototype.eachMapping=function(e,t,i){var s,o=t||null;switch(i||n.GENERATED_ORDER){case n.GENERATED_ORDER:s=this._generatedMappings;break;case n.ORIGINAL_ORDER:s=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}var r=this.sourceRoot;s.map(function(e){var t=null===e.source?null:this._sources.at(e.source);return null!=t&&null!=r&&(t=a.join(r,t)),{source:t,generatedLine:e.generatedLine,generatedColumn:e.generatedColumn,originalLine:e.originalLine,originalColumn:e.originalColumn,name:null===e.name?null:this._names.at(e.name)}},this).forEach(e,o)},n.prototype.allGeneratedPositionsFor=function(e){var t=a.getArg(e,"line"),i={source:a.getArg(e,"source"),originalLine:t,originalColumn:a.getArg(e,"column",0)};if(null!=this.sourceRoot&&(i.source=a.relative(this.sourceRoot,i.source)),!this._sources.has(i.source))return[];i.source=this._sources.indexOf(i.source);var n=[],s=this._findMapping(i,this._originalMappings,"originalLine","originalColumn",a.compareByOriginalPositions,l.LEAST_UPPER_BOUND);if(s>=0){var o=this._originalMappings[s];if(void 0===e.column)for(var r=o.originalLine;o&&o.originalLine===r;)n.push({line:a.getArg(o,"generatedLine",null),column:a.getArg(o,"generatedColumn",null),lastColumn:a.getArg(o,"lastGeneratedColumn",null)}),o=this._originalMappings[++s];else for(var c=o.originalColumn;o&&o.originalLine===t&&o.originalColumn==c;)n.push({line:a.getArg(o,"generatedLine",null),column:a.getArg(o,"generatedColumn",null),lastColumn:a.getArg(o,"lastGeneratedColumn",null)}),o=this._originalMappings[++s]}return n},i.SourceMapConsumer=n,s.prototype=Object.create(n.prototype),s.prototype.consumer=n,s.fromSourceMap=function(e){var t=Object.create(s.prototype),i=t._names=c.fromArray(e._names.toArray(),!0),n=t._sources=c.fromArray(e._sources.toArray(),!0);t.sourceRoot=e._sourceRoot,t.sourcesContent=e._generateSourcesContent(t._sources.toArray(),t.sourceRoot),t.file=e._file;for(var r=e._mappings.toArray().slice(),l=t.__generatedMappings=[],u=t.__originalMappings=[],d=0,p=r.length;p>d;d++){var f=r[d],_=new o;_.generatedLine=f.generatedLine,_.generatedColumn=f.generatedColumn,f.source&&(_.source=n.indexOf(f.source),_.originalLine=f.originalLine,_.originalColumn=f.originalColumn,f.name&&(_.name=i.indexOf(f.name)),u.push(_)),l.push(_)}return h(t.__originalMappings,a.compareByOriginalPositions),t},s.prototype._version=3,Object.defineProperty(s.prototype,"sources",{get:function(){return this._sources.toArray().map(function(e){return null!=this.sourceRoot?a.join(this.sourceRoot,e):e},this)}}),s.prototype._parseMappings=function(e,t){for(var i,n,s,r,l,c=1,d=0,p=0,f=0,_=0,m=0,g=e.length,v=0,b={},y={},T=[],w=[];g>v;)if(";"===e.charAt(v))c++,v++,d=0;else if(","===e.charAt(v))v++;else{for(i=new o,i.generatedLine=c,r=v;g>r&&!this._charIsMappingSeparator(e,r);r++);if(n=e.slice(v,r),s=b[n])v+=n.length;else{for(s=[];r>v;)u.decode(e,v,y),l=y.value,v=y.rest,s.push(l);if(2===s.length)throw new Error("Found a source, but no line and column");if(3===s.length)throw new Error("Found a source and line, but no column");b[n]=s}i.generatedColumn=d+s[0],d=i.generatedColumn,s.length>1&&(i.source=_+s[1],_+=s[1],i.originalLine=p+s[2],p=i.originalLine,i.originalLine+=1,i.originalColumn=f+s[3],f=i.originalColumn,s.length>4&&(i.name=m+s[4],m+=s[4])),w.push(i),"number"==typeof i.originalLine&&T.push(i)}h(w,a.compareByGeneratedPositionsDeflated),this.__generatedMappings=w,h(T,a.compareByOriginalPositions),this.__originalMappings=T},s.prototype._findMapping=function(e,t,i,n,s,o){if(e[i]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+e[i]);if(e[n]<0)throw new TypeError("Column must be greater than or equal to 0, got "+e[n]);return l.search(e,t,s,o)},s.prototype.computeColumnSpans=function(){for(var e=0;e<this._generatedMappings.length;++e){var t=this._generatedMappings[e];if(e+1<this._generatedMappings.length){var i=this._generatedMappings[e+1];if(t.generatedLine===i.generatedLine){t.lastGeneratedColumn=i.generatedColumn-1;continue}}t.lastGeneratedColumn=1/0}},s.prototype.originalPositionFor=function(e){var t={generatedLine:a.getArg(e,"line"),generatedColumn:a.getArg(e,"column")},i=this._findMapping(t,this._generatedMappings,"generatedLine","generatedColumn",a.compareByGeneratedPositionsDeflated,a.getArg(e,"bias",n.GREATEST_LOWER_BOUND));if(i>=0){var s=this._generatedMappings[i];if(s.generatedLine===t.generatedLine){var o=a.getArg(s,"source",null);null!==o&&(o=this._sources.at(o),null!=this.sourceRoot&&(o=a.join(this.sourceRoot,o)));var r=a.getArg(s,"name",null);return null!==r&&(r=this._names.at(r)),{source:o,line:a.getArg(s,"originalLine",null),column:a.getArg(s,"originalColumn",null),name:r}}}return{source:null,line:null,column:null,name:null}},s.prototype.hasContentsOfAllSources=function(){return!!this.sourcesContent&&(this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(e){return null==e}))},s.prototype.sourceContentFor=function(e,t){if(!this.sourcesContent)return null;if(null!=this.sourceRoot&&(e=a.relative(this.sourceRoot,e)),this._sources.has(e))return this.sourcesContent[this._sources.indexOf(e)];var i;if(null!=this.sourceRoot&&(i=a.urlParse(this.sourceRoot))){var n=e.replace(/^file:\/\//,"");if("file"==i.scheme&&this._sources.has(n))return this.sourcesContent[this._sources.indexOf(n)];if((!i.path||"/"==i.path)&&this._sources.has("/"+e))return this.sourcesContent[this._sources.indexOf("/"+e)]}if(t)return null;throw new Error('"'+e+'" is not in the SourceMap.')},s.prototype.generatedPositionFor=function(e){var t=a.getArg(e,"source");if(null!=this.sourceRoot&&(t=a.relative(this.sourceRoot,t)),!this._sources.has(t))return{line:null,column:null,lastColumn:null};t=this._sources.indexOf(t);var i={source:t,originalLine:a.getArg(e,"line"),originalColumn:a.getArg(e,"column")},s=this._findMapping(i,this._originalMappings,"originalLine","originalColumn",a.compareByOriginalPositions,a.getArg(e,"bias",n.GREATEST_LOWER_BOUND));if(s>=0){var o=this._originalMappings[s];if(o.source===i.source)return{line:a.getArg(o,"generatedLine",null),column:a.getArg(o,"generatedColumn",null),lastColumn:a.getArg(o,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}},i.BasicSourceMapConsumer=s,r.prototype=Object.create(n.prototype),r.prototype.constructor=n,r.prototype._version=3,Object.defineProperty(r.prototype,"sources",{get:function(){for(var e=[],t=0;t<this._sections.length;t++)for(var i=0;i<this._sections[t].consumer.sources.length;i++)e.push(this._sections[t].consumer.sources[i]);return e}}),r.prototype.originalPositionFor=function(e){var t={generatedLine:a.getArg(e,"line"),generatedColumn:a.getArg(e,"column")},i=l.search(t,this._sections,function(e,t){var i=e.generatedLine-t.generatedOffset.generatedLine;return i||e.generatedColumn-t.generatedOffset.generatedColumn}),n=this._sections[i];return n?n.consumer.originalPositionFor({line:t.generatedLine-(n.generatedOffset.generatedLine-1),column:t.generatedColumn-(n.generatedOffset.generatedLine===t.generatedLine?n.generatedOffset.generatedColumn-1:0),bias:e.bias}):{source:null,line:null,column:null,name:null}},r.prototype.hasContentsOfAllSources=function(){return this._sections.every(function(e){return e.consumer.hasContentsOfAllSources()})},r.prototype.sourceContentFor=function(e,t){for(var i=0;i<this._sections.length;i++){var n=this._sections[i],s=n.consumer.sourceContentFor(e,!0);if(s)return s}if(t)return null;throw new Error('"'+e+'" is not in the SourceMap.')},r.prototype.generatedPositionFor=function(e){for(var t=0;t<this._sections.length;t++){var i=this._sections[t];if(-1!==i.consumer.sources.indexOf(a.getArg(e,"source"))){var n=i.consumer.generatedPositionFor(e);if(n){return{line:n.line+(i.generatedOffset.generatedLine-1),column:n.column+(i.generatedOffset.generatedLine===n.line?i.generatedOffset.generatedColumn-1:0)}}}}return{line:null,column:null}},r.prototype._parseMappings=function(e,t){this.__generatedMappings=[],this.__originalMappings=[];for(var i=0;i<this._sections.length;i++)for(var n=this._sections[i],s=n.consumer._generatedMappings,o=0;o<s.length;o++){var r=s[o],l=n.consumer._sources.at(r.source);null!==n.consumer.sourceRoot&&(l=a.join(n.consumer.sourceRoot,l)),this._sources.add(l),l=this._sources.indexOf(l);var c=n.consumer._names.at(r.name);this._names.add(c),c=this._names.indexOf(c);var u={source:l,generatedLine:r.generatedLine+(n.generatedOffset.generatedLine-1),generatedColumn:r.generatedColumn+(n.generatedOffset.generatedLine===r.generatedLine?n.generatedOffset.generatedColumn-1:0),originalLine:r.originalLine,originalColumn:r.originalColumn,name:c};this.__generatedMappings.push(u),"number"==typeof u.originalLine&&this.__originalMappings.push(u)}h(this.__generatedMappings,a.compareByGeneratedPositionsDeflated),h(this.__originalMappings,a.compareByOriginalPositions)},i.IndexedSourceMapConsumer=r},{"./array-set":2,"./base64-vlq":3,"./binary-search":5,"./quick-sort":6,"./util":8}],8:[function(e,t,i){function n(e,t,i){if(t in e)return e[t];if(3===arguments.length)return i;throw new Error('"'+t+'" is a required argument.')}function s(e){var t=e.match(g);return t?{scheme:t[1],auth:t[2],host:t[3],port:t[4],path:t[5]}:null}function o(e){var t="";return e.scheme&&(t+=e.scheme+":"),t+="//",e.auth&&(t+=e.auth+"@"),e.host&&(t+=e.host),e.port&&(t+=":"+e.port),e.path&&(t+=e.path),t}function r(e){var t=e,n=s(e);if(n){if(!n.path)return e;t=n.path}for(var r,a=i.isAbsolute(t),l=t.split(/\/+/),c=0,u=l.length-1;u>=0;u--)r=l[u],"."===r?l.splice(u,1):".."===r?c++:c>0&&(""===r?(l.splice(u+1,c),c=0):(l.splice(u,2),c--));return t=l.join("/"),""===t&&(t=a?"/":"."),n?(n.path=t,o(n)):t}function a(e,t){""===e&&(e="."),""===t&&(t=".");var i=s(t),n=s(e);if(n&&(e=n.path||"/"),i&&!i.scheme)return n&&(i.scheme=n.scheme),o(i);if(i||t.match(v))return t;if(n&&!n.host&&!n.path)return n.host=t,o(n);var a="/"===t.charAt(0)?t:r(e.replace(/\/+$/,"")+"/"+t);return n?(n.path=a,o(n)):a}function l(e,t){""===e&&(e="."),e=e.replace(/\/$/,"");for(var i=0;0!==t.indexOf(e+"/");){var n=e.lastIndexOf("/");if(0>n)return t;if(e=e.slice(0,n),e.match(/^([^\/]+:\/)?\/*$/))return t;++i}return Array(i+1).join("../")+t.substr(e.length+1)}function c(e){return e}function u(e){return d(e)?"$"+e:e}function h(e){return d(e)?e.slice(1):e}function d(e){if(!e)return!1;var t=e.length;if(9>t)return!1;if(95!==e.charCodeAt(t-1)||95!==e.charCodeAt(t-2)||111!==e.charCodeAt(t-3)||116!==e.charCodeAt(t-4)||111!==e.charCodeAt(t-5)||114!==e.charCodeAt(t-6)||112!==e.charCodeAt(t-7)||95!==e.charCodeAt(t-8)||95!==e.charCodeAt(t-9))return!1;for(var i=t-10;i>=0;i--)if(36!==e.charCodeAt(i))return!1;return!0}function p(e,t,i){var n=e.source-t.source;return 0!==n?n:(n=e.originalLine-t.originalLine,0!==n?n:(n=e.originalColumn-t.originalColumn,0!==n||i?n:(n=e.generatedColumn-t.generatedColumn,0!==n?n:(n=e.generatedLine-t.generatedLine,0!==n?n:e.name-t.name))))}function f(e,t,i){var n=e.generatedLine-t.generatedLine;return 0!==n?n:(n=e.generatedColumn-t.generatedColumn,0!==n||i?n:(n=e.source-t.source,0!==n?n:(n=e.originalLine-t.originalLine,0!==n?n:(n=e.originalColumn-t.originalColumn,0!==n?n:e.name-t.name))))}function _(e,t){return e===t?0:e>t?1:-1}function m(e,t){var i=e.generatedLine-t.generatedLine;return 0!==i?i:(i=e.generatedColumn-t.generatedColumn,0!==i?i:(i=_(e.source,t.source),0!==i?i:(i=e.originalLine-t.originalLine,0!==i?i:(i=e.originalColumn-t.originalColumn,0!==i?i:_(e.name,t.name)))))}i.getArg=n;var g=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.]*)(?::(\d+))?(\S*)$/,v=/^data:.+\,.+$/;i.urlParse=s,i.urlGenerate=o,i.normalize=r,i.join=a,i.isAbsolute=function(e){return"/"===e.charAt(0)||!!e.match(g)},i.relative=l;var b=function(){return!("__proto__"in Object.create(null))}();i.toSetString=b?c:u,i.fromSetString=b?c:h,i.compareByOriginalPositions=p,i.compareByGeneratedPositionsDeflated=f,i.compareByGeneratedPositionsInflated=m},{}],9:[function(t,i,n){!function(t,s){"use strict";"function"==typeof e&&e.amd?e("stackframe",[],s):"object"==typeof n?i.exports=s():t.StackFrame=s()}(this,function(){"use strict";function e(e){return!isNaN(parseFloat(e))&&isFinite(e)}function t(e,t,i,n,s,o){void 0!==e&&this.setFunctionName(e),void 0!==t&&this.setArgs(t),void 0!==i&&this.setFileName(i),void 0!==n&&this.setLineNumber(n),void 0!==s&&this.setColumnNumber(s),void 0!==o&&this.setSource(o)}return t.prototype={getFunctionName:function(){return this.functionName},setFunctionName:function(e){this.functionName=String(e)},getArgs:function(){return this.args},setArgs:function(e){if("[object Array]"!==Object.prototype.toString.call(e))throw new TypeError("Args must be an Array");this.args=e},getFileName:function(){return this.fileName},setFileName:function(e){this.fileName=String(e)},getLineNumber:function(){return this.lineNumber},setLineNumber:function(t){if(!e(t))throw new TypeError("Line Number must be a Number");this.lineNumber=Number(t)},getColumnNumber:function(){return this.columnNumber},setColumnNumber:function(t){if(!e(t))throw new TypeError("Column Number must be a Number");this.columnNumber=Number(t)},getSource:function(){return this.source},setSource:function(e){this.source=String(e)},toString:function(){return(this.getFunctionName()||"{anonymous}")+"("+(this.getArgs()||[]).join(",")+")"+(this.getFileName()?"@"+this.getFileName():"")+(e(this.getLineNumber())?":"+this.getLineNumber():"")+(e(this.getColumnNumber())?":"+this.getColumnNumber():"")}},t})},{}],10:[function(t,i,n){!function(s,o){"use strict";"function"==typeof e&&e.amd?e("stack-generator",["stackframe"],o):"object"==typeof n?i.exports=o(t("stackframe")):s.StackGenerator=o(s.StackFrame)}(this,function(e){return{backtrace:function(t){var i=[],n=10;"object"==typeof t&&"number"==typeof t.maxStackSize&&(n=t.maxStackSize);for(var s=arguments.callee;s&&i.length<n;){for(var o=new Array(s.arguments.length),r=0;r<o.length;++r)o[r]=s.arguments[r];/function(?:\s+([\w$]+))+\s*\(/.test(s.toString())?i.push(new e(RegExp.$1||void 0,o)):i.push(new e(void 0,o));try{s=s.caller}catch(e){break}}return i}}})},{stackframe:9}],11:[function(e,t,i){arguments[4][9][0].apply(i,arguments)},{dup:9}],12:[function(t,i,n){!function(s,o){"use strict";"function"==typeof e&&e.amd?e("stacktrace-gps",["source-map","stackframe"],o):"object"==typeof n?i.exports=o(t("source-map/lib/source-map-consumer"),t("stackframe")):s.StackTraceGPS=o(s.SourceMap||s.sourceMap,s.StackFrame)}(this,function(e,t){"use strict";function i(e){return new Promise(function(t,i){var n=new XMLHttpRequest;n.open("get",e),n.onerror=i,n.onreadystatechange=function(){4===n.readyState&&(n.status>=200&&n.status<300?t(n.responseText):i(new Error("HTTP status: "+n.status+" retrieving "+e)))},n.send()})}function n(e){if("undefined"!=typeof window&&window.atob)return window.atob(e);throw new Error("You must supply a polyfill for window.atob in this environment")}function s(e){if("undefined"!=typeof JSON&&JSON.parse)return JSON.parse(e);throw new Error("You must supply a polyfill for JSON.parse in this environment")}function o(e,t){for(var i,n=/function\s+([^(]*?)\s*\(([^)]*)\)/,s=/['"]?([$_A-Za-z][$_A-Za-z0-9]*)['"]?\s*[:=]\s*function\b/,o=/['"]?([$_A-Za-z][$_A-Za-z0-9]*)['"]?\s*[:=]\s*(?:eval|new Function)\b/,r=e.split("\n"),a="",l=Math.min(t,20),c=0;l>c;++c){var u=r[t-c-1],h=u.indexOf("//");if(h>=0&&(u=u.substr(0,h)),u){if(a=u+a,(i=s.exec(a))&&i[1])return i[1];if((i=n.exec(a))&&i[1])return i[1];if((i=o.exec(a))&&i[1])return i[1]}}}function r(){if("function"!=typeof Object.defineProperty||"function"!=typeof Object.create)throw new Error("Unable to consume source maps in older browsers")}function a(e){if("object"!=typeof e)throw new TypeError("Given StackFrame is not an object");if("string"!=typeof e.fileName)throw new TypeError("Given file name is not a String");if("number"!=typeof e.lineNumber||e.lineNumber%1!=0||e.lineNumber<1)throw new TypeError("Given line number must be a positive integer");if("number"!=typeof e.columnNumber||e.columnNumber%1!=0||e.columnNumber<0)throw new TypeError("Given column number must be a non-negative integer");return!0}function l(e){var t=/\/\/[#@] ?sourceMappingURL=([^\s'"]+)\s*$/.exec(e);if(t&&t[1])return t[1];throw new Error("sourceMappingURL not found")}function c(i,n,s,o,r){var a=new e.SourceMapConsumer(i),l=a.originalPositionFor({line:s,column:o}),c=a.sourceContentFor(l.source);return c&&(r[l.source]=c),new t(l.name,n,l.source,l.line,l.column)}return function e(u){return this instanceof e?(u=u||{},this.sourceCache=u.sourceCache||{},this.ajax=u.ajax||i,this._atob=u.atob||n,this._get=function(e){return new Promise(function(t,i){var n="data:"===e.substr(0,5);if(this.sourceCache[e])t(this.sourceCache[e]);else if(u.offline&&!n)i(new Error("Cannot make network requests in offline mode"));else if(n){var s=/^data:application\/json;([\w=:"-]+;)*base64,/,o=e.match(s);if(o){var r=o[0].length,a=e.substr(r),l=this._atob(a);this.sourceCache[e]=l,t(l)}else i(new Error("The encoding of the inline sourcemap is not supported"))}else{var c=this.ajax(e,{method:"get"});this.sourceCache[e]=c,c.then(t,i)}}.bind(this))},this.pinpoint=function(e){return new Promise(function(t,i){this.getMappedLocation(e).then(function(e){function i(){t(e)}this.findFunctionName(e).then(t,i).catch(i)}.bind(this),i)}.bind(this))},this.findFunctionName=function(e){return new Promise(function(i,n){a(e),this._get(e.fileName).then(function(n){var s=e.lineNumber,r=e.columnNumber,a=o(n,s);i(a?new t(a,e.args,e.fileName,s,r):e)},n).catch(n)}.bind(this))},void(this.getMappedLocation=function(e){return new Promise(function(t,i){r(),a(e);var n=this.sourceCache,o=e.fileName;this._get(o).then(function(r){var a=l(r),u="data:"===a.substr(0,5),h=o.substring(0,o.lastIndexOf("/")+1);"/"===a[0]||u||/^https?:\/\/|^\/\//i.test(a)||(a=h+a),this._get(a).then(function(i){var o=e.lineNumber,r=e.columnNumber;"string"==typeof i&&(i=s(i.replace(/^\)\]\}'/,""))),void 0===i.sourceRoot&&(i.sourceRoot=h),t(c(i,e.args,o,r,n))},i).catch(i)}.bind(this),i).catch(i)}.bind(this))})):new e(u)}})},{"source-map/lib/source-map-consumer":7,stackframe:11}],13:[function(t,i,n){!function(s,o){"use strict";"function"==typeof e&&e.amd?e("stacktrace",["error-stack-parser","stack-generator","stacktrace-gps"],o):"object"==typeof n?i.exports=o(t("error-stack-parser"),t("stack-generator"),t("stacktrace-gps")):s.StackTrace=o(s.ErrorStackParser,s.StackGenerator,s.StackTraceGPS)}(this,function(e,t,i){function n(e,t){var i={};return[e,t].forEach(function(e){for(var t in e)e.hasOwnProperty(t)&&(i[t]=e[t]);return i}),i}function s(e){return e.stack||e["opera#sourceloc"]}function o(e,t){return"function"==typeof t?e.filter(t):e}var r={filter:function(e){return-1===(e.functionName||"").indexOf("StackTrace$$")&&-1===(e.functionName||"").indexOf("ErrorStackParser$$")&&-1===(e.functionName||"").indexOf("StackTraceGPS$$")&&-1===(e.functionName||"").indexOf("StackGenerator$$")},sourceCache:{}},a=function(){try{throw new Error}catch(e){return e}};return{get:function(e){var t=a();return s(t)?this.fromError(t,e):this.generateArtificially(e)},getSync:function(i){i=n(r,i);var l=a();return o(s(l)?e.parse(l):t.backtrace(i),i.filter)},fromError:function(t,s){s=n(r,s);var a=new i(s);return new Promise(function(i){var n=o(e.parse(t),s.filter);i(Promise.all(n.map(function(e){return new Promise(function(t){function i(){t(e)}a.pinpoint(e).then(t,i).catch(i)})})))}.bind(this))},generateArtificially:function(e){e=n(r,e);var i=t.backtrace(e);return"function"==typeof e.filter&&(i=i.filter(e.filter)),Promise.resolve(i)},instrument:function(e,t,i,n){if("function"!=typeof e)throw new Error("Cannot instrument non-function object");if("function"==typeof e.__stacktraceOriginalFn)return e;var o=function(){try{return this.get().then(t,i).catch(i),e.apply(n||this,arguments)}catch(e){throw s(e)&&this.fromError(e).then(t,i).catch(i),e}}.bind(this);return o.__stacktraceOriginalFn=e,o},deinstrument:function(e){if("function"!=typeof e)throw new Error("Cannot de-instrument non-function object");return"function"==typeof e.__stacktraceOriginalFn?e.__stacktraceOriginalFn:e},report:function(e,t,i){return new Promise(function(n,s){var o=new XMLHttpRequest;o.onerror=s,o.onreadystatechange=function(){4===o.readyState&&(o.status>=200&&o.status<400?n(o.responseText):s(new Error("POST to "+t+" failed with status: "+o.status)))},o.open("post",t),o.setRequestHeader("Content-Type","application/json");var r={stack:e};void 0!==i&&(r.message=i),o.send(JSON.stringify(r))})}}})},{"error-stack-parser":1,"stack-generator":10,"stacktrace-gps":12}]},{},[13])(13)}),define("AppController",["knockout","js/vm/helpers","js/lib/stacktrace/v.1.3.1/stacktrace.min","js/vm/Common/Cache/Cache","js/vm/Models/LocalStorage","js/lib/md5/md5"],function(e,t,i,n,s,o){var r=function(i,n){var o=this;this.scope=i,this.options={},this.ko=e,this.initErrorHandler(),this.routes=[{re:[/^(?:search\/(\d+)(?:\/?.*)?)?$/,/^search\/((?:[A-ZА-Я]{6}(?:\d{8}|d\d{1,2}))+)((?:[A-Z]{3}\d+)+)?((?:-[a-zа-яA-ZА-Я=\d]+)+)?(?:\/?\?.*)?$/],handler:"Flights/SearchForm/Controller"},{re:[/^scheduleSearch(?:\/(\d+)(?:\/?.*)?)?(?:\/?\?.*)?$/,/^scheduleSearch\/((?:[A-ZА-Я]{6}\d{8})+)((?:[A-Z]{3}\d+)+)?((?:-[a-zа-яA-ZА-Я=\d\+]+)+)?(?:\/?\?.*)?$/],handler:"Flights/ScheduleSearch/Controller"},{re:[/^results\/(\d+)(\/.*|\?.*)?$/,/^results\/((?:[ac][A-ZА-Я]{3}[ac][A-ZА-Я]{3}\d{8,16})+)((?:[A-Z]{3}[1-9])+)((?:-[a-zа-яA-ZА-Я=\d\+]+)+)(?:\/?\?.*)?$/],handler:n.carrierResultsMode?"Flights/CarrierResults/Controller":"Flights/SearchResults/Controller"},{re:[/^hotels$/,/^hotels\/search\/(((\d)*(-)?)?(\d{8}(-)?)?(-\d{8})?(-ADT\d(CLD\d)?)*(-GO)?)$/],handler:"Hotels/SearchForm/Controller"},{re:[/^hotels\/results\/?(\d+)?\/?(\d+|\w+)?$/,/^hotels\/results\/(\d+)\/(\d+|\w+)(\?.*)?$/],handler:"Hotels/SearchResults/Controller",params:["search_id","hotel_id"]},{re:/^(\/?)\?(.*)?$/,handler:"Flights/SearchForm/Controller"},{re:/^hotels(\/?)\?(.*)?$/,handler:"Hotels/SearchForm/Controller"},{re:/^order\/(\d+)$/,handler:"Flights/Checkout/Controller"}],this.i18nStorage={},this.componentsAdditionalParameters={};for(var r in this.defaultOptions)this.defaultOptions.hasOwnProperty(r)&&("object"==typeof n&&n.hasOwnProperty(r)?this.options[r]=n[r]:this.options[r]=this.defaultOptions[r]);this.options.dataURL||(this.options.dataURL=this.options.controllerSourceURL),this.options.templateSourceURL||(this.options.templateSourceURL=this.options.controllerSourceURL+"/html/"),this.options.i18nURL||(this.options.i18nURL=this.options.controllerSourceURL+"/i18n"),"object"==typeof n&&"object"==typeof n.componentsAdditionalInfo&&(this.componentsAdditionalParameters=n.componentsAdditionalInfo),this.router={current:{route:[],set:function(e){o.router.current.route=e},getParameterValue:function(e,t){return o.router.current.route[2]&&o.router.current.route[2][e]?o.router.current.route[2][e]:t},get:function(e,t){var i=location.search.substring(1),n=i.split("&"),s={};return n.forEach(function(e){var t=e.split("=");s[t[0]]=t[1]}),void 0!==s[e]?s[e]:t}},pushStateSupport:!!history.pushState,init:function(){o.options.root="/"+this.clearSlashes(o.options.root)+"/","//"==o.options.root&&(o.options.root="/")},getFragment:function(){var e,t="/"+this.clearSlashes(decodeURI(location.pathname+(-1!==location.host.indexOf("yandex")?"":location.search)))+"/";return"//"==t&&(t="/"),"/"==o.options.root||0===t.indexOf(o.options.root.slice(0,-1))?(e="/"!=o.options.root?t.replace(o.options.root.slice(0,-1),""):t,this.clearSlashes(e)):"### NO ROUTE ###"},clearSlashes:function(e){return e.toString().replace(/\/$/,"").replace(/^\//,"")},check:function(){for(var e=this.getFragment(),t=0;t<o.routes.length;t++){var i=o.routes[t].re;i instanceof Array||(i=[i]);for(var n=0,s=i.length;n<s;n++){var r=e.match(i[n]);if(r){var a=r.slice(1),l={};return o.routes[t].params&&o.routes[t].params.forEach(function(e,t){l[e]=a[t]}),r.shift(),[o.routes[t].handler,r,l]}}}return null},navigate:function(e,t){return e=e||"",document.title=t,this.pushStateSupport?history.pushState("",t,o.options.root+this.clearSlashes(e)):window.location=o.options.root+this.clearSlashes(e),this},replaceState:function(e,t){return e=e||"",document.title=t,this.pushStateSupport?history.replaceState(null,null,o.options.root+this.clearSlashes(e)):window.location=o.options.root+this.clearSlashes(e),o.router.current.set(o.router.check()),this},listen:function(){var e=this,t=e.getFragment(),i=function(){t!==e.getFragment()&&(t=e.getFragment(),e.check(t))};return clearInterval(this.interval),this.interval=setInterval(i,50),this}},this.viewModel={component:e.observable(null),componentRoute:e.observable(null),componentAdditionalParams:e.observable(null),controller:this,globalError:e.observable(null),i18n:function(){return o.i18n.apply(o,arguments)},helpers:t,agency:{id:e.observable(0),userCurrency:e.observable(s.get("currency",null)||"RUB"),priceCurrency:e.observable(""),list:e.observableArray([]),rates:e.observableArray([]),onCurrencyChange:function(e){o.viewModel.agency.userCurrency(e),s.set("currency",e)},changeLanguage:function(e){s.set("language",e),location.reload()}},user:{id:e.observable(0),status:e.observable("guest"),isB2B:e.observable(!1),settings:{googleMapsApiKey:e.observable(""),currentCurrency:e.observable("RUB"),agencyCurrency:e.observable("RUB")}},languages:[{id:"en",title:"English",icon:"gb"},{id:"ru",title:"Русский",icon:"ru"},{id:"es",title:"Español",icon:"es"},{id:"ua",title:"Українська",icon:"ua"}],getLanguageById:function(e){var t={};return this.languages.forEach(function(i){if(i.id===e)return void(t=i)}),t}},t.language=o.options.i18nLanguage,e.components.loaders.unshift({getConfig:function(){o.compLoaderGetConfig.apply(o,arguments)},loadViewModel:function(){o.compLoaderLoadViewModel.apply(o,arguments)}}),this.router.init();var a=["common","pageTitles","currencyNames"],l=this.router.check();l&&a.push(l[0].replace(/\//g,"").replace("Controller","")),-1===a.indexOf("HotelsSearchResults")&&a.push("HotelsSearchResults"),-1===a.indexOf("CommonBreadCrumbs")&&a.push("CommonBreadCrumbs"),this.loadI18n(a,function(){require(["js/vm/BaseDynamicModel","js/vm/BaseStaticModel","js/vm/BaseI18nizedModel","js/vm/BaseControllerModel","js/bindings/common","domReady"],function(t,i,s,r){require(o.options.waitForDOMReady?["domReady!"]:[],function(){
o.processLoadedModel("BaseDynamicModel",t),o.processLoadedModel("BaseStaticModel",i),o.processLoadedModel("BaseI18nizedModel",s),o.processLoadedModel("BaseControllerModel",r),e.applyBindings(o.viewModel,o.scope),o.log("NemoFrontEndController loaded and initted. KO bound. Options",n,"Resulting options",o.options),window.addEventListener("popstate",o.processRoute.bind(o),!1),o.processRoute()})})})};return r.prototype.navigate=function(e,t,i){var n=this.i18n("pageTitles",i,null,!0);this.router.navigate(e,n||i),(void 0===t||t)&&this.processRoute()},r.prototype.navigateReplace=function(e,t,i){this.router.replaceState(e,this.i18n("pageTitles",i)),(void 0===t||t)&&this.processRoute()},r.prototype.navigateGetPushStateSupport=function(){return this.router.pushStateSupport},r.prototype.i18n=function(e,i,n,s){if(this.i18nExtensions[e]&&this.i18nExtensions[e][i])return this.i18nExtensions[e][i];if(this.i18nStorage[e]&&this.i18nStorage[e][i]){var o=this.i18nStorage[e][i];return"object"==typeof n&&t.iterateObject(n,function(e,t){o=o.replace("{"+t+"}",e)}),o}return s?null:"{i18n:"+e+":"+i+"}"},r.prototype.loadViewModels=function(e,t){for(var i=this,n=[],s=0;s<e.length;s++)n.push("js/vm/"+e[s]);require(n,function(){for(var n=0;n<e.length;n++)i.processLoadedModel(e[n],arguments[n]);t(arguments)})},r.prototype.loadKOBindings=function(e,t,i){e=e.slice(0);for(var n=0;n<e.length;n++)e[n]="js/bindings/"+e[n];require(e,t,i)},r.prototype.loadI18n=function(e,t,i){var s=this,r=[],a=[],l=n.storage();if(i=i||function(){},t=t||function(){},e.map(function(e){var t="i18n/"+e;require.specified(t)?r.push(e):s.i18nStorage[e]||a.push(e)}),0===a.length&&0===r.length)t();else{var c=a.length+r.length;r.map(function(e,n,o){var r="i18n/"+e;require([r],function(i){s.i18nStorage[e]=i,0===--c&&t()},function(){i(),c--})}),a.map(function(e,n,r){var a=s.options.i18nURL+"/"+s.options.i18nLanguage+"/"+e+".json",u=o(a);l.has(u)?(s.i18nStorage[e]=JSON.parse(l.get(u)),0===--c&&t()):s.makeRequest(a,null,function(i,n){try{s.log("Setting i18n segmeent",e),s.i18nStorage[e]=JSON.parse(i)}catch(e){s.error(e)}0===--c&&t()},function(){i(),c--})})}},r.prototype.loadData=function(e,t,i,n){return this.makeRequest(this.options.dataURL+e+(e.indexOf("?")<0?"?":"&")+"user_language_get_change="+this.options.i18nLanguage,t,i,n)},r.prototype.makeRequest=function(e,t,i,n){var s=this,o=new XMLHttpRequest,r="";"object"==typeof this.options.postParameters&&this.options.postParameters&&(r+=this.processPOSTParameters(this.options.postParameters)),"object"==typeof t&&t&&(r+=(r?"&":"")+this.processPOSTParameters(t));try{o.withCredentials=this.options.CORSWithCredentials,-1!==e.indexOf("frontendStatic")&&(o.withCredentials=!1),o.open(r?"POST":"GET",e,!0)}catch(t){console.log("Ajax call threw this:"+t),o.open(r?"POST":"GET",e,!0),o.withCredentials=this.options.CORSWithCredentials}return r&&o.setRequestHeader&&o.setRequestHeader("Content-type","application/x-www-form-urlencoded"),o.onreadystatechange=function(){4===o.readyState&&(o.status>=200&&o.status<400?(s.processServerData(o.responseText),i(o.responseText,o)):n(o))},o.send(r),o},r.prototype.processServerData=function(e){var t;try{if(t=JSON.parse(e),t.system&&t.system.info&&t.system.info.currencyRates){var i=t.system.info.currencyRates;this.viewModel.agency.list(i.backendCurrencyList),this.viewModel.agency.rates(i.rates)}t&&t.system&&t.system.info&&t.system.info.user&&(this.viewModel.user.id(t.system.info.user.userID),this.viewModel.user.status(t.system.info.user.status),this.viewModel.user.isB2B(t.system.info.user.isB2B),this.viewModel.user.settings.googleMapsApiKey(t.system.info.user.settings.googleMapsApiKey),this.viewModel.user.settings.agencyCurrency(t.system.info.user.settings.agencyCurrency),this.viewModel.user.settings.currentCurrency(t.system.info.user.settings.currentCurrency),this.viewModel.agency.id(t.system.info.user.agencyID),this.viewModel.agency.priceCurrency(t.system.info.user.settings.currentCurrency))}catch(e){this.warn(e)}},r.prototype.compLoaderGetConfig=function(e,t){var i,n=this,s=e.replace("Controller","").split("/");s.pop(),s=s.join(""),this.log("Detected component",e,t),i="html/"+s;var o=document.getElementById(s);o=o?{element:o}:{require:require.specified(i)?i:"text!"+n.options.templateSourceURL+s+".html"},t({viewModel:{require:"js/vm/"+e},template:o})},r.prototype.compLoaderLoadViewModel=function(e,t,i){var n=this;this.log("Component loaded:",e,t,i),this.processLoadedModel(e,t),i(function(t,i){n.log("Creating component instance:",t,i);var s=n.getModel(e,t);return s.run(),t.$$rootComponent&&s.pageTitle&&!document.title&&(document.title=n.i18n("pageTitles",s.pageTitle)),s})},r.prototype.processRoute=function(){var e=this.router.check(),t=this;e instanceof Array?(this.log("Route detected: ",e),t.viewModel.componentRoute(e[1]),t.viewModel.componentAdditionalParams(this.componentsAdditionalParameters[e[0]]||{}),t.viewModel.component(e[0]),t.router.current.set(e)):(this.warn("No route detected. App terminated."),t.viewModel.globalError(this.i18n("common","nemoApp__globalError__noRoute")))},r.prototype.getModel=function(e,t,i){var n;if(i&&this.processLoadedModel(e,i),void 0!==this.modelsPool[e]){if(this.log("Creating new",e,"initializing with",t),n=new this.modelsPool[e](t,this),void 0!==this.extensions[e]){this.log("Extending",e,"with",this.extensions[e]);for(var s=0;s<this.extensions[e].length;s++)this.extensions[e][s].call(n)}return n}throw"Unknown model name "+e},r.prototype.processLoadedModel=function(e,t){void 0===this.modelsPool[e]?(this.log("Loaded new model:",e,t),this.modelsPool[e]=t):this.log("Existing model:",e,t,"skipping")},r.prototype.log=function(){this.options.verbose&&"undefined"!=typeof console&&"function"==typeof console.log&&console.log.apply(console,arguments)},r.prototype.error=function(){"undefined"!=typeof console&&"function"==typeof console.error&&console.error.apply(console,arguments)},r.prototype.warn=function(){"undefined"!=typeof console&&"function"==typeof console.warn&&console.warn.apply(console,arguments)},r.prototype.extend=function(e,t){r.prototype.extensions[e]instanceof Array||(r.prototype.extensions[e]=[]),r.prototype.extensions[e].push(t)},r.prototype.i18nExtend=function(e){for(var t in e)if(e.hasOwnProperty(t)){r.prototype.i18nExtensions[t]||(r.prototype.i18nExtensions[t]={});for(var i in e[t])e[t].hasOwnProperty(i)&&(r.prototype.i18nExtensions[t][i]=e[t][i])}},r.prototype.processPOSTParameters=function(e){function t(e,i){var s;if(Array.isArray(i)){for(var o in i)if(i.hasOwnProperty(o)){var r=i[o];/\[\]$/.test(e)?n(e,r):t(e+"["+("object"==typeof r?o:"")+"]",r)}}else if("object"==typeof i)for(s in i)t(e+"["+s+"]",i[s]);else n(e,i)}var i=[],n=function(e,t){i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==t?"":t)};for(var s in e)e.hasOwnProperty(s)&&t(s,e[s]);return i.join("&").replace(/%20/g,"+")},r.prototype.initErrorHandler=function(){var e=this;window.onerror=function(t,n,s,o,r){return i.fromError(r).then(function(t){var i,n,s=[],o=document.createElement("div"),a=e.i18n("common","nemoApp__globalError__uncaughtError__title"),l=e.i18n("common","nemoApp__globalError__uncaughtError__message"),c=e.i18n("common","nemoApp__globalError__uncaughtError__errorCode");document.body.style.overflow="hidden",o.style.zIndex=99999,o.style.position="fixed",o.style.top=0,o.style.left=0,o.style.right=0,o.style.bottom=0,o.style.paddingTop="150px",o.style.paddingLeft="20px",o.style.paddingRight="20px",o.style.background="#ffffff",o.style.textAlign="center",o.innerHTML='<img style="width: 45vmin; height: auto; display: inline !important;" src="/templates/wurst/f2.0/img/404-cloud.svg"><h1 style="margin-top: 5vmin; color: #999999; font-size: 5.5vmin; font-weight: normal;">'+a+'</h1><h3 style="color: #999999; font-size: 3vmin; font-weight: normal; padding-top: 0 !important;">'+l+"</h3>",t.map(function(e){s.push({line:e.lineNumber?e.lineNumber:0,column:e.columnNumber?e.columnNumber:0,path:e.fileName?e.fileName:"",method:e.functionName?e.functionName:""})}),n=window.location.pathname.match(/\/results\/(\d+)\/.*/i),n instanceof Object&&1 in n&&(i=n[1]),e.loadData("/system/logger/error",{searchId:i,error:{name:r.name,message:r.message,stack:s}},function(e){e=JSON.parse(e),e.error.code&&(o.innerHTML+='<h3 style="color: #999999; font-size: 3vmin; font-weight: normal; padding-top: 5px !important;">'+c+": "+e.error.code+"</h3>")},function(){})}),!1}},r.prototype.defaultOptions={root:"/",controllerSourceURL:"",templateSourceURL:"",hotelsTemplateSourceURL:"",corporateHotelsShowcase:!1,showSupplierName:void 0,createOrderLinkPrefixHotels:null,dataURL:"",staticInfoURL:"",version:"",hostId:"",verbose:!1,postParameters:{},i18nLanguage:"en",i18nURL:"",CORSWithCredentials:!1,cookiesPrefix:"nemo-",waitForDOMReady:!0,carrierResultsMode:!1,showNewDesignButton:!1,clientNationalitySelect:!1,preinitedLoyaltyCardsArray:[]},r.prototype.modelsPool={},r.prototype.extensions={},r.prototype.i18nExtensions={},r}),function(e){"function"==typeof define&&define.amd?define("mousewheel",["jquery"],e):"object"==typeof exports?module.exports=e:e(jQuery)}(function(e){function t(t){var r=t||window.event,a=l.call(arguments,1),c=0,h=0,d=0,p=0,f=0,_=0;if(t=e.event.fix(r),t.type="mousewheel","detail"in r&&(d=-1*r.detail),"wheelDelta"in r&&(d=r.wheelDelta),"wheelDeltaY"in r&&(d=r.wheelDeltaY),"wheelDeltaX"in r&&(h=-1*r.wheelDeltaX),"axis"in r&&r.axis===r.HORIZONTAL_AXIS&&(h=-1*d,d=0),c=0===d?h:d,"deltaY"in r&&(d=-1*r.deltaY,c=d),"deltaX"in r&&(h=r.deltaX,0===d&&(c=-1*h)),0!==d||0!==h){if(1===r.deltaMode){var m=e.data(this,"mousewheel-line-height");c*=m,d*=m,h*=m}else if(2===r.deltaMode){var g=e.data(this,"mousewheel-page-height");c*=g,d*=g,h*=g}if(p=Math.max(Math.abs(d),Math.abs(h)),(!o||o>p)&&(o=p,n(r,p)&&(o/=40)),n(r,p)&&(c/=40,h/=40,d/=40),c=Math[c>=1?"floor":"ceil"](c/o),h=Math[h>=1?"floor":"ceil"](h/o),d=Math[d>=1?"floor":"ceil"](d/o),u.settings.normalizeOffset&&this.getBoundingClientRect){var v=this.getBoundingClientRect();f=t.clientX-v.left,_=t.clientY-v.top}return t.deltaX=h,t.deltaY=d,t.deltaFactor=o,t.offsetX=f,t.offsetY=_,t.deltaMode=0,a.unshift(t,c,h,d),s&&clearTimeout(s),s=setTimeout(i,200),(e.event.dispatch||e.event.handle).apply(this,a)}}function i(){o=null}function n(e,t){return u.settings.adjustOldDeltas&&"mousewheel"===e.type&&t%120==0}var s,o,r=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],a="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],l=Array.prototype.slice;if(e.event.fixHooks)for(var c=r.length;c;)e.event.fixHooks[r[--c]]=e.event.mouseHooks;var u=e.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var i=a.length;i;)this.addEventListener(a[--i],t,!1);else this.onmousewheel=t;e.data(this,"mousewheel-line-height",u.getLineHeight(this)),e.data(this,"mousewheel-page-height",u.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var i=a.length;i;)this.removeEventListener(a[--i],t,!1);else this.onmousewheel=null;e.removeData(this,"mousewheel-line-height"),e.removeData(this,"mousewheel-page-height")},getLineHeight:function(t){var i=e(t),n=i["offsetParent"in e.fn?"offsetParent":"parent"]();return n.length||(n=e("body")),parseInt(n.css("fontSize"),10)||parseInt(i.css("fontSize"),10)||16},getPageHeight:function(t){return e(t).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};e.fn.extend({mousewheel:function(e){return e?this.bind("mousewheel",e):this.trigger("mousewheel")},unmousewheel:function(e){return this.unbind("mousewheel",e)}})}),define("formPackage",["AppController","knockout","js/vm/helpers","jquery","jsCookie","js/vm/Flights/Common/Airline","jqueryUI","js/lib/jquery.pickmeup/jquery.pickmeup","js/bindings/FlightsSearchForm"],function(e,t,i,n,s,o){function r(){var e=this;this.passengerTypesOrder=["ADT","CLD","INF","INS"],this.loadAirlines=function(){},this.hasChildren=t.computed(function(){var e=this.passengers();for(var t in e)if(e.hasOwnProperty(t)&&this.passengerAdultTypes.indexOf(t)<0&&e[t]()>0)return!0;return!1},this),this.hasChildren.subscribe(function(t){t&&e.allPassengersOpen(!0)}),this.allPassengersOpen=t.observable(!1),this.notFoundForm=document.location.search.indexOf("info=FLIGHTS_NOT_FOUND")>0,this.notFoundDatePeriod=3,this.notFoundDateHints=[],this._old_buildModels=this.buildModels,this.buildModels=function(){var e;if(this._old_buildModels.apply(this,arguments),e=this.segments(),this.notFoundForm)for(var t=0;t<e.length;t++)this.loadNoResultsHints(t)};var i=this.goToResults.bind(this);this.goToResults=function(e){n(document).trigger("goToResults"),i()},this.loadNoResultsHints=function(e){var i=this.segments(),n=this;if(void 0===this.notFoundDateHints[e]&&(this.notFoundDateHints[e]=t.observable({hasDates:!1,dates:[]})),i[e].items.departure.value()&&i[e].items.arrival.value()&&i[e].items.departureDate.value()){var s={departure:{IATA:i[e].items.departure.value().IATA,isCity:i[e].items.departure.value().isCity},arrival:{IATA:i[e].items.arrival.value().IATA,isCity:i[e].items.arrival.value().isCity},datePeriodBegin:i[e].items.departureDate.value().offsetDate(-this.notFoundDatePeriod).getISODate(),datePeriodEnd:i[e].items.departureDate.value().offsetDate(this.notFoundDatePeriod).getISODate(),direct:!1};this.$$controller.loadData("/flights/search/scheduleRequest",{scheduleRequest:JSON.stringify(s)},function(t){try{var i={hasDates:!1,dates:[]};t=JSON.parse(t);for(var s in t.flights.search.scheduleResults.dates)t.flights.search.scheduleResults.dates.hasOwnProperty(s)&&(null!=t.flights.search.scheduleResults.dates[s]?(i.dates.push(n.$$controller.getModel("Common/Date",s)),i.hasDates=!0):i.dates.push(null));i.dates.sort(function(e,t){return n.$$controller.getModel("Common/Date",e).getTimestamp()-n.$$controller.getModel("Common/Date",t).getTimestamp()}),n.notFoundDateHints[e](i)}catch(e){}})}},this.routeBrief,this.getRouteBrief=function(){if(!this.routeBrief){var e=this.segments();this.routeBrief=[];for(var t=0;t<e.length;t++){var i="";e[t].items.departure.value()&&(i+=e[t].items.departure.value().name+" ("+e[t].items.departure.value().IATA+")"),i+=" – ",e[t].items.arrival.value()&&(i+=e[t].items.arrival.value().name+" ("+e[t].items.arrival.value().IATA+")"),e[t].items.departure.value()&&e[t].items.arrival.value()&&e[t].items.departureDate.value()&&this.routeBrief.push(i)}this.routeBrief=this.routeBrief.join(", ")}return this.routeBrief}}o.prototype.defaultLogo=!1,e.prototype.extend("Flights/SearchForm/Controller",r),e.prototype.extend("Flights/ScheduleSearch/Controller",function(){r.apply(this,arguments),this.trdScheduleRequestDate=t.observable(),this.$$i18nSegments.push("FlightsSearchForm"),this.PFOrder=["carrier","departureAirport","arrivalAirport"],this.trdFiltersHaveValue={departureAirport:t.computed(function(){for(var e=this.visiblePostFilters(),t=0;t<e.length;t++)if("departureAirport"==e[t].config.name&&e[t].hasValue())return!0;return!1},this),arrivalAirport:t.computed(function(){for(var e=this.visiblePostFilters(),t=0;t<e.length;t++)if("arrivalAirport"==e[t].config.name&&e[t].hasValue())return!0;return!1},this)},this.trdFiltersActive={departureAirport:t.computed(function(){for(var e=this.visiblePostFilters(),t=0;t<e.length;t++)if("departureAirport"==e[t].config.name&&e[t].isActive())return!0;return!1},this),arrivalAirport:t.computed(function(){for(var e=this.visiblePostFilters(),t=0;t<e.length;t++)if("arrivalAirport"==e[t].config.name&&e[t].hasValue())return!0;return!1},this)},this.sortArray=t.observable([["departure",!0]]),this.sortArray.subscribe(function(){this.doSort()},this),this.doSort=function(){var e=this.sortArray();this.schedule.flights.sort(function(t,i){for(var n,s,o=0,r=0;r<e.length;r++){switch(e[r][0]){case"departure":n=t.depTimeSeconds,s=i.depTimeSeconds;break;case"arrival":n=t.arrTimeSeconds,s=i.arrTimeSeconds;break;case"timeEnRoute":n=t.totalTimeEnRoute.length(),s=i.totalTimeEnRoute.length()}if(0!==(o=(n-s)*(e[r][1]?1:-1)))break}return o}),this.buildVisibleFlights()}}),e.prototype.extend("Flights/ScheduleSearch/Flight",function(){this.getFlightNumber=function(){return this.getMarketingCompany().IATA+" "+this.segments[0].flightNumber}}),e.prototype.extend("Flights/SearchForm/Segment",function(){this.dataChanged=t.observable(!1),this.items.departure.value.subscribe(function(e){this.dataChanged(!0)},this),this.items.arrival.value.subscribe(function(e){this.dataChanged(!0)},this),this.items.departureDate.value.subscribe(function(e){this.dataChanged(!0)},this)}),e.prototype.extend("Flights/Common/Geo",function(){this.nameIsValid=function(){return!(/[a-zA-Z]/.test(this.name)&&"ru"===s.get("nemo_lang"))}}),e.prototype.extend("Flights/SearchResults/Group",function(){this.detailsAreOpen=t.observable(!1)}),e.prototype.extend("Flights/SearchResults/Controller",function(){var e=this;e.trdBookingCheckInProgress=t.observable(!1),e.showBookCheckingCover=t.computed(function(){return e.trdBookingCheckInProgress()&&!e.bookingCheckError()&&!e.bookingCheckPriceChangeData()}),e.defaultGroupSize=10,e.groupsHaveBeenSyncedOnce=!1,this.buildVisibleGroups=function(){if(e.groupsHaveBeenSyncedOnce)e.buildChunkOfGroups([],e.groups().length),n(document).trigger("resultsTablesIsReady");else var i=[],s=e.groups().length,o=setInterval(function(){s-i.length<=0?(clearInterval(o),n(document).trigger("resultsTablesIsReady")):(e.buildChunkOfGroups(i),i=t.utils.unwrapObservable(e.visibleGroups))},0)},this.buildChunkOfGroups=function(t,i){var n=e.groups(),s=n.length,o=[],r=t.length,a=0,l=r+(i||e.defaultGroupSize);l>s&&(l=s);for(var c=r;c<l;c++)n[c]&&s&&(o.push(n[c]),a++,s++);o=t.concat(o),e.visibleGroups(o),e.totalVisibleGroups(e.visibleGroups().length)},this.postfiltersData.grouppable=[];for(var i in this.postfiltersData.configs)this.postfiltersData.configs.hasOwnProperty(i)&&"String"==this.postfiltersData.configs[i].type&&(this.postfiltersData.configs[i].options.type="multiChoice");this.PFTimeTypes=[{type:"n",seconds:21600},{type:"m",seconds:43200},{type:"d",seconds:64800},{type:"e",seconds:86400}],this.initialCurrency=t.observable(s.get("ccCurrency")),this.flightsGetGrouppingKey=function(e){return e.id},this.baseShownGroups=1/0,this.shownGroups(this.baseShownGroups),this.sortArray=t.observable([["price",!0]]),this.sortArray.subscribe(function(){this.doSort()},this),this.doSort=function(){var t=this.sortArray();this.groups.sort(function(e,i){for(var n,s,o=0,r=e.selectedFlight(),a=i.selectedFlight(),l=0;l<t.length;l++){switch(t[l][0]){case"price":n=e.getTotalPrice().normalizedAmount(),s=i.getTotalPrice().normalizedAmount();break;case"depTime":n=r.legs[0].depDateTime.getTimestamp(),s=a.legs[0].depDateTime.getTimestamp();break;case"arrTime":n=r.legs[r.legs.length-1].arrDateTime.getTimestamp(),s=a.legs[a.legs.length-1].arrDateTime.getTimestamp();break;case"transfers":n=r.totalTimeTransfers,s=a.totalTimeTransfers;break;case"timeEnRoute":n=r.totalTimeEnRoute.length(),s=a.totalTimeEnRoute.length()}if(0!==(o=(n-s)*(t[l][1]?1:-1)))break}return 0==o&&(o=a.labelsPriority[a.label]-r.labelsPriority[r.label]),o}),e.buildVisibleGroups(),e.groupsHaveBeenSyncedOnce=!0},this.trdFiltersHaveValue={departureAirport:t.computed(function(){for(var e=this.visiblePostFilters(),t=0;t<e.length;t++)if("departureAirport"==e[t].config.name&&e[t].hasValue())return!0;return!1},this),arrivalAirport:t.computed(function(){for(var e=this.visiblePostFilters(),t=0;t<e.length;t++)if("arrivalAirport"==e[t].config.name&&e[t].hasValue())return!0;return!1},this),departureTime:t.computed(function(){for(var e=this.visiblePostFilters(),t=0;t<e.length;t++)if("departureTime"==e[t].config.name&&e[t].hasValue())return!0;return!1},this),arrivalTime:t.computed(function(){for(var e=this.visiblePostFilters(),t=0;t<e.length;t++)if("arrivalTime"==e[t].config.name&&e[t].hasValue())return!0;return!1},this)},this.trdFiltersActive={departureAirport:t.computed(function(){for(var e=this.visiblePostFilters(),t=0;t<e.length;t++)if("departureAirport"==e[t].config.name&&e[t].isActive())return!0;return!1},this),arrivalAirport:t.computed(function(){for(var e=this.visiblePostFilters(),t=0;t<e.length;t++)if("arrivalAirport"==e[t].config.name&&e[t].hasValue())return!0;return!1},this),departureTime:t.computed(function(){for(var e=this.visiblePostFilters(),t=0;t<e.length;t++)if("departureTime"==e[t].config.name&&e[t].hasValue())return!0;return!1},this),arrivalTime:t.computed(function(){for(var e=this.visiblePostFilters(),t=0;t<e.length;t++)if("arrivalTime"==e[t].config.name&&e[t].hasValue())return!0;return!1},this)},this.showCaseBuilt=!1,this.setShowcase=function(){function e(e,t){if(null==t)return e;if(t.getTotalPrice().normalizedAmount()>e.getTotalPrice().normalizedAmount())return e;if(t.getTotalPrice().normalizedAmount()==e.getTotalPrice().normalizedAmount()){if(t.totalTimeEnRoute.length()>e.totalTimeEnRoute.length())return e;if(t.totalTimeEnRoute.length()==e.totalTimeEnRoute.length()&&e.legs[0].depDateTime.dateObject().getHours()>=7&&t.legs[0].depDateTime.dateObject().getHours()<7)return e}return t}if(!this.showCaseBuilt){for(var t=this.flights,i=null,n=null,s=null,o=1e3,r=[],a=0,l=this.searchInfo().segments,c=!0,u=0;u<l.length;u++)u>0&&l[u].departure.IATA!=l[u-1].arrival.IATA&&(c=!1);this.showCaseBuilt=!0;for(var u in t)if(t.hasOwnProperty(u)){var h=t[u];o=Math.min(o,h.transfersCount),r.push(parseFloat(h.getTotalPrice().normalizedAmount())),i=e(h,i),0==h.transfersCount&&(n=e(h,n))}r.sort(function(e,t){return e-t}),a=r.length%2==0&&r.length>2?(r[r.length/2-1]+r[r.length/2])/2:r[Math.floor(r.length/2)];for(var u in t)if(t.hasOwnProperty(u)){var h=t[u];h.transfersCount<=o+1&&h.isPossibleConvenient&&h.getTotalPrice().normalizedAmount()<a&&("RT"!=this.searchInfo().tripType||h.legs[1].depDateTime.getTimestamp()-h.legs[0].arrDateTime.getTimestamp()>21600)&&c&&(s=e(h,s))}i&&i.setLabel("cheapest"),n&&n.setLabel("cheapDirect"),s&&s.setLabel("convenient")}},this.error.subscribe(function(e){this.$$controller.navigate("/search/"+this.id+"/?info=FLIGHTS_NOT_FOUND")},this),this.old_processSearchResults=this.processSearchResults,this.processSearchResults=function(){if(this.old_processSearchResults.apply(this,arguments),!this.initialCurrency())for(var e in this.prices)if(this.prices.hasOwnProperty(e)){this.initialCurrency(this.prices[e].totalPrice.currency());break}this.initialCurrency()||this.initialCurrency("RUB")}}),e.prototype.extend("Flights/SearchResults/FlightPrice",function(){var e=this;e.hasFreeBaggage=function(t){return!!(e.hasOwnProperty("baggageRules")&&e.baggageRules[t.$parentContext.$index()]&&e.baggageRules[t.$parentContext.$index()][t.$index()]&&e.baggageRules[t.$parentContext.$index()][t.$index()][0]&&e.baggageRules[t.$parentContext.$index()][t.$index()][0].hasOwnProperty("measurement"))&&e.baggageRules[t.$parentContext.$index()][t.$index()][0]},e.getKGBaggage=function(t){var i=!1,n=e.hasFreeBaggage(t);return"kg"==n.measurement&&(i=n),i},e.getPCBaggage=function(t){var i=!1,n=e.hasFreeBaggage(t);return"pc"==n.measurement&&(i=n),i}}),e.prototype.extend("Flights/SearchResults/Flight",function(){this.labelsPriority={convenient:100,cheapDirect:50,cheapest:10,"":0},this.label="",this.isPossibleConvenient=!0,this.checkingInProgress=t.observable(!1);for(var e=0;e<this.legs.length;e++)this.legs[e].depDateTime.dateObject().getHours()<7&&(this.isPossibleConvenient=!1);if(this.isPossibleConvenient)for(var e=0;e<this.segments.length;e++)(this.segments[e].depDateTime.dateObject().getHours()<7||this.segments[e].depDateTime.getDate()!=this.segments[e].arrDateTime.getDate())&&(this.isPossibleConvenient=!1);if(this.isPossibleConvenient)for(var e=0;e<this.transfers.length;e++)for(var i=0;i<this.transfers[e].length;i++)(this.transfers[e][i].duration.length()>10800||this.transfers[e][i].depAirp.IATA!=this.transfers[e][i].arrAirp.IATA)&&(this.isPossibleConvenient=!1);this.getLogotypes=function(){for(var e=[],t=[],i={},n=0;n<this.segmentsByLeg.length;n++)for(var s=0;s<this.segmentsByLeg[n].length;s++){var o=this.segmentsByLeg[n][s];t[n]||(t[n]={}),t[n][o.marketingCompany.IATA]={code:o.marketingCompany.IATA,logo:o.marketingCompany.logo.image,name:o.marketingCompany.name}}for(var n=0;n<t.length;n++){var r=t[n],a=[],l=[];if(Object.keys(r).length>1){for(var c in r)r.hasOwnProperty(c)&&(a.push(c),l.push(r[c].name));e.push({type:"iata",value:a.join(", "),title:l.join(", ")})}else{var c=Object.keys(r)[0];i.hasOwnProperty(c)?e.push({type:"hidden",value:"hidden",code:c,title:r[c].name}):(e.push({type:"image",value:r[c].logo,code:c,title:r[c].name}),i[c]=c)}}return e},this.logotypes=this.getLogotypes(),this.fareRulesLoading=t.observable(!1),this.fareRulesLeg=t.observable(0),this.fareRulesSegment=t.observable(0),this.fareRules={},this.faresPassTypes={},this.fareRulesLoaded=t.observable(!1),this.faresByLeg=[],this.setLabel=function(e){e in this.labelsPriority&&this.labelsPriority[e]>this.labelsPriority[this.label]&&(this.label=e)},this.loadFareRules=function(e){var t=this;if(!this.fareRulesLoading()&&!this.fareRules.length){this.fareRulesLoading(!0);for(var i=0;i<this.price.passengerFares.length;i++)for(var n=0;n<this.price.passengerFares[i].tariffs.length;n++){var s=this.price.passengerFares[i].tariffs[n];void 0!==s["routeNumber "]&&(s.routeNumber=s["routeNumber "]),void 0===this.faresByLeg[s.routeNumber]&&(this.faresByLeg[s.routeNumber]=[]),void 0===this.faresByLeg[s.routeNumber][s.segNum]&&(this.faresByLeg[s.routeNumber][s.segNum]=[]),this.faresByLeg[s.routeNumber][s.segNum].push(s.code),this.faresPassTypes[s.code]=this.price.passengerFares[i].type}for(var i=0;i<this.faresByLeg.length;i++){for(var o=[],n=0;n<this.faresByLeg[i].length;n++)this.faresByLeg[i][n]instanceof Array&&o.push(this.faresByLeg[i][n]);this.faresByLeg[i]=o}this.$$controller.loadData("/flights/search/flightInfo/"+this.id+"/onlyRules"+(!0===e?"?translate_rules":""),{},function(e,i){if(e=JSON.parse(e),e.flights.search.flightInfo.tariffRules instanceof Array)return void t.fareRulesLoading(!1);for(var n in e.flights.search.flightInfo.tariffRules)e.flights.search.flightInfo.tariffRules.hasOwnProperty(n)&&(t.fareRules[n]={code:n,type:t.faresPassTypes[n],texts:e.flights.search.flightInfo.tariffRules[n]});t.fareRulesLoaded(!0),t.fareRulesLoading(!1)},function(e){})}}}),e.prototype.extend("Common/Duration",function(){this.readableString=t.computed(function(){var e=[];return this.years()>0&&e.push(this.years()+" "+this.$$controller.i18n("duration","year_"+i.getNumeral(this.years(),"one","twoToFour","fourPlus"))),this.months()>0&&e.push(this.months()+" "+this.$$controller.i18n("duration","month_"+i.getNumeral(this.months(),"one","twoToFour","fourPlus"))),this.days()>0&&e.push(this.days()+" "+this.$$controller.i18n("duration","day_"+i.getNumeral(this.days(),"one","twoToFour","fourPlus"))),(this.hours()>0||this.days()>0)&&e.push(this.hours()+" "+this.$$controller.i18n("duration","hour_"+i.getNumeral(this.hours(),"one","twoToFour","fourPlus"))),(this.minutes()>0||this.hours()>0||this.days()>0)&&e.push(this.prependZero(this.minutes())+" "+this.$$controller.i18n("duration","minute_"+i.getNumeral(this.minutes(),"one","twoToFour","fourPlus"))),this.seconds()>0&&e.push(this.seconds()+" "+this.$$controller.i18n("duration","second_"+i.getNumeral(this.seconds(),"one","twoToFour","fourPlus"))),e.join(" ")},this),this.readableStringShort=t.computed(function(){var e=[];return this.years()>0&&e.push(this.years()+" "+this.$$controller.i18n("duration","year_short")),this.months()>0&&e.push(this.months()+" "+this.$$controller.i18n("duration","month_short")),this.days()>0&&e.push(this.days()+" "+this.$$controller.i18n("duration","day_short")),(this.hours()>0||this.days()>0)&&e.push(this.hours()+" "+this.$$controller.i18n("duration","hour_short")),(this.minutes()>0||this.hours()>0||this.days()>0)&&e.push(this.prependZero(this.minutes())+" "+this.$$controller.i18n("duration","minute_short")),this.seconds()>0&&e.push(this.seconds()+" "+this.$$controller.i18n("duration","second_short")),e.join(" ")},this)}),t.bindingHandlers.trdAnimatedToggle={init:function(e,t,i,s,o){var r=t()(),a=n(e);r?a.slideDown("fast"):a.slideUp("fast")},update:function(e,i,n,s,o){t.bindingHandlers.trdAnimatedToggle.init(e,i,n,s,o)}},t.bindingHandlers.trdFormSetSegmentDate={init:function(e,t,i,s,o){var r=t();n(e).on("click",function(){r.segment.items.departureDate.value(r.date)})}},t.bindingHandlers.trdSearchingRandom={init:function(e,t,i,s,o){setTimeout(function(){var t=n(e).children();t.eq(Math.floor(Math.random()*t.length)).css("display","list-item")},10)}},t.bindingHandlers.trdOpenFlightInfo={init:function(e,t,i,s,o){var r=n(e),a=r.css("height","auto"),l=t();a.data("height",parseInt(a.height(),10)),a.on("click",function(e){l(!0);var t=a.find(".js-trd-item__info");e.stopPropagation(),t.fadeIn(200),a.animate({height:parseInt(t.height(),10)+1},200)})}},t.bindingHandlers.trdCloseFlightInfo={update:function(e,t,i,s,o){var r=n(e),a=r.parents(".js-trd-item"),l=a.find(".js-trd-item__info"),c=t();r.on("click",function(e){e.stopPropagation(),l.fadeOut(50),a.animate({height:parseInt(a.data("height"),10)},200,"swing",function(){c(!1)})})}},t.bindingHandlers.trdAddThis={init:function(e,t,i,s,o){var r=t();n(e).on("click",function(e){e.preventDefault(),e.stopPropagation(),r.hasOwnProperty("url")||!r.url?window.addthis_share.url=r.url:window.addthis_share.url=document.location,window.addthis_share.title=document.title,addthis_sendto(r.to)})}},t.bindingHandlers.trdScheduleSort={init:function(e,t,i,s,o){n(e).on("click",function(e){e.stopPropagation(),e.preventDefault();var i=s.sortArray();if(e.shiftKey){for(var n=!1,o=0;o<i.length;o++)i[o][0]==t()&&(i[o][1]=!i[o][1],n=!0);n||i.push([t(),!0])}else 1==i.length&&i[0][0]==t()?i[0][1]=!i[0][1]:i=[[t(),!0]];s.sortArray(i),window.getSelection?window.getSelection().empty?window.getSelection().empty():window.getSelection().removeAllRanges&&window.getSelection().removeAllRanges():document.selection&&document.selection.empty()})},update:function(e,t,i,s,o){var r=n(e).parents(".js-trd-theader"),a="trd-flights-form__schedule__table__header_sort",l=s.sortArray();r.removeClass(a+"Down").removeClass(a+"Up");for(var c=0;c<l.length;c++)l[c][0]==t()&&(a+=l[c][1]?"Down":"Up");r.addClass(a)}},t.bindingHandlers.trdMoneyInit={init:function(e,t,i,s,o){n(document).currencyConverter({defaultCurrency:"RUB",conversionTable:t(),currencyType:"name",roundingFunction:Math.round,useCache:!1,currencyNames:{RUB:"руб"}})}},t.bindingHandlers.getContext={init:function(e,i,n,s,o){console.log(t.contextFor(e))}},t.bindingHandlers.trdSort={init:function(e,t,i,s,o){n(e).on("click",function(e){e.stopPropagation(),e.preventDefault();var i=s.sortArray();if(e.shiftKey){for(var n=!1,o=0;o<i.length;o++)i[o][0]==t()&&(i[o][1]=!i[o][1],n=!0);n||i.push([t(),!0])}else 1==i.length&&i[0][0]==t()?i[0][1]=!i[0][1]:i=[[t(),!0]];s.sortArray(i),window.getSelection?window.getSelection().empty?window.getSelection().empty():window.getSelection().removeAllRanges&&window.getSelection().removeAllRanges():document.selection&&document.selection.empty()})},update:function(e,t,i,s,o){var r=n(e).parents(".js-trd-theader"),a="header",l=s.sortArray();r.removeClass("headerSortDown").removeClass("headerSortUp");for(var c=0;c<l.length;c++)l[c][0]==t()&&(a+="Sort"+(l[c][1]?"Down":"Up"));r.addClass(a)}},n.widget("nemo.trdFlightsFormGeoAC",n.ui.autocomplete,{_renderItem:function(e,t){var i;return i=void 0===t.label?(t.IATA?'<span class="nemo-flights-form__geoAC__item__IATA">'+t.IATA+"</span>":"")+t.name.replace(new RegExp("("+this.term.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"")+")",""),'<span class="nemo-ui-autocomplete__match">$1</span>'):t.label,n("<li>").addClass("nemo-flights-form__geoAC__item"+(t.isCity||!Boolean(t.cityId)?"":" nemo-flights-form__geoAC__item_airport")).append(i).attr("data-value",void 0===t.label).appendTo(e)},_renderMenu:function(e,t){var i=this;n.each(t,function(t,n){i._renderItemData(e,n)}),n(e).addClass("nemo-ui-autocomplete nemo-flights-form__geoAC")}
}),t.bindingHandlers.trdFlightsFormGeoAC={init:function(e,i,s,o,r){var a=n(e),l=[{value:"",label:o.$$controller.i18n("FlightsSearchForm","autocomplete_noResults")}];a.on("focus",function(e){n(this).val("")}),a.trdFlightsFormGeoAC({minLength:2,source:function(e,t){o.$$controller.makeRequest(o.$$controller.options.dataURL+"/guide/autocomplete/iata/"+encodeURIComponent(e.term)+"?user_language_get_change="+o.$$controller.options.i18nLanguage,"",function(e){e=JSON.parse(e);var i,n=[],s=[],r={},a={};if(e.system&&e.system.error)return void t(l);for(var c in e.guide.airports)if(e.guide.airports.hasOwnProperty(c)&&!e.guide.airports[c].isAggregation){var u=e.guide.airports[c];r.hasOwnProperty(u.cityId)||(r[u.cityId]=[]),r[u.cityId].push(o.$$controller.getModel("Flights/Common/Geo",{data:{IATA:u.IATA,isCity:!1,cityId:u.cityId},guide:e.guide}))}i=function(e,t){var i=[];for(var n in e)e.hasOwnProperty(n)&&i.push({key:n,value:e[n]});return i.sort(t),i}(e.guide.cities,function(e,t){return t.value.maxRating-e.value.maxRating});for(var h=0,d=i.length;h<d;h++){var p=i[h].value,f=[],_={};_=o.$$controller.getModel("Flights/Common/Geo",{data:{IATA:p.IATA,isCity:!0,cityId:p.id},guide:e.guide}),f.push(_),a[p.IATA]=p.IATA,r.hasOwnProperty(p.id)&&r[p.id].length>1&&(f=f.concat(r[p.id])),_.nameIsValid()?n=n.concat(f):s=s.concat(f)}if(r.hasOwnProperty("0"))for(var m=r[0],h=0,g=m.length;h<g;h++)if(!a.hasOwnProperty(m[h].IATA)){var u=m[h];u.nameIsValid()?n.push(u):s.push(u)}n=n.concat(s),0==n.length&&(n=l),t(n)},function(){t(l)})},open:function(e,t){var i=n(this).data("nemo-trdFlightsFormGeoAC").menu.element.children('[data-value="true"]');1==i.length?i.eq(0).mouseenter().click():n(e.target).data("nemo-trdFlightsFormGeoAC").menu.activeMenu.addClass("nemo-ui-autocomplete_open")},response:function(e,t){n(e.target).data("nemo-trdFlightsFormGeoAC").menu.activeMenu.removeClass("nemo-ui-autocomplete_open")},select:function(e,t){return a.blur(),void 0===t.item.label&&(i()(t.item),a.trigger("nemo.fsf.segmentPropChanged")),!1},focus:function(e,t){e.preventDefault(),a.val(t.item.name)},close:function(){a.val("")}}),a.on("blur",function(e){a.val("")}),a.on("keyup",function(e){13==e.keyCode&&n(".ui-menu-item").each(function(){if(n(this).is(":visible"))return n(this).click(),!1})}),t.utils.domNodeDisposal.addDisposeCallback(e,function(){a.off("blur"),a.off("keyup");try{a.autocomplete("destroy")}catch(e){}})},update:function(e,t,i,n,s){}},t.bindingHandlers.trdFlightsResultsAutoOpenCompareTables={update:function(e,t,i,n,s){n.compareTablesOpen(),n.compareTablesRenderFlag(),setTimeout(function(){n.compareTablesRenderFlag()||n.compareTablesRenderFlag(!0),n.compareTablesOpen()||n.compareTablesOpen(!0)},100)}},t.bindingHandlers.trdFlightScheduleCalendar={init:function(e,i,s,o,r){var a=n(e),l=i(),c=l.$$controller.getModel("Common/Date",l.segments[0].schedulePeriod.startDate).dateObject(),u=l.$$controller.getModel("Common/Date",l.segments[0].schedulePeriod.endDate).dateObject(),h=new Date;h.setHours(0,0,0),a.pickmeup({flat:!0,calendars:2,min:c,max:u,date:l.form.schedulePeriodBegin().dateObject().getTime()>h.getTime()?l.form.schedulePeriodBegin().dateObject():h,locale:t.bindingHandlers.flightsFormDatepicker._getPMULocale(r),render:function(e,t){var i={className:"",disabled:!0},n=e.getDay();return l.segments[0].schedulePeriod.daysOfWeek.indexOf(n)>=0&&(i.className="trd-flights-form__schedule__infoPopup__calendar__active"),i}}),t.utils.domNodeDisposal.addDisposeCallback(e,function(){a.pickmeup("destroy")})}},t.bindingHandlers.trdPassBlockPosition={init:function(e,t,i,s,o){var r=n(e),a=r.find(".js-trd-schedule__pasengers"),l=a.find(".js-trd-schedule__pasengers__arrow");r.on("click",".js-trd-schedule__pasengers__close",function(e){a.hide(),r.find(".js-trd-schedule__day").removeClass("trd-flights-form__schedule__flight__select__day_active"),console.log("close")}).on("click",".js-trd-schedule__day",function(e){var t=n(this),i=t,s=0,o=0,c=t.offsetParent();for(r.find(".js-trd-schedule__day").removeClass("trd-flights-form__schedule__flight__select__day_active"),t.addClass("trd-flights-form__schedule__flight__select__day_active");(i=i.offsetParent())&&!i.is(r);)s+=i.position().top;s+=t.position().top+t.outerHeight(),a.show().css("top",s+"px"),o=c.outerWidth()-t.position().left-t.outerWidth()/2,l.css("right",o+"px")}),console.log("init")},update:function(e,t,i,s,o){var r=(t()(),n(e));r.find(".js-trd-schedule__pasengers").hide(),r.find(".js-trd-schedule__day").removeClass("trd-flights-form__schedule__flight__select__day_active")}},t.bindingHandlers.flightsFormDatepicker._getPMUOptions_old=t.bindingHandlers.flightsFormDatepicker._getPMUOptions,t.bindingHandlers.flightsFormDatepicker._getPMUOptions=function(){var e=t.bindingHandlers.flightsFormDatepicker._getPMUOptions_old.apply(this,arguments);return"RT"==arguments[4].$parent.tripType()&&1==arguments[4].$data.index&&(e.className="trd-pmu_RT"),e}});