PageSourceSearch

https://www.tuli.sk/includes/js/cache/ac45564fdeb8a9e0cdac6119cf7ef34d.js?144635

js tuli.sk collected 2026-09-24 13:07:33 UTC 1,967,706 bytes, 48,268 lines download raw bytes

1/* ========================================
2 FILE: /language/_js/slovak-utf.js
3 ==================== */
4
5var cms_js_lang_2code = 'sk';
6
7var js_lang_flypage_cart_summary = 'Do košíka pridáte {quantity} za {price_with_tax} s DPH ({price_without_tax} bez DPH).';
8
9var cms_js_lang_yes = 'áno';
10var cms_js_lang_no = 'nie';
11
12var cms_js_lang_from = 'od';
13var cms_js_lang_to = 'do';
14
15var cms_js_lang_category = 'Kategória';
16
17var cms_js_lang_more = 'viac';
18var cms_js_lang_less = 'menej';
19var cms_js_lang_updated = 'Aktualizované';
20
21var cms_js_lang_subscribers_remove_one = 'Naozaj si prajete zmazať zvoleného odberatela?';
22var cms_js_lang_subscribers_remove_more = 'Naozaj si prajete zmazať zvolených odberatelov?';
23
24var cms_js_lang_print_order_firefox_alert = 'Zistili sme, že používate prehliadač Mozilla Firefox a chystáte sa vytlačiť objednávku obsahujúcu viac ako 10 položiek.<br><br>Firefox obsahuje oficiálne nahlásenú chybu, ktorá spôsobuje neštandardnú tlač.<br><br>Prosíme Vás o použitie iného prehliadača - napr. {chrome_link} alebo {opera_link}.';
25
26var cms_js_lang_weekdays = {1: 'Pondelok',2: 'Utorok',3: 'Streda',4: 'Å tvrtok',5: 'Piatok',6: 'Sobota',7: 'Nedela'};
27
28var cms_js_lang_dashboard_no_orders = 'Nemáte žiadne objednávky.';
29var cms_js_lang_dashboard_no_customers = 'Nemáte žiadnych zákazníkov.';
30
31var cms_js_lang_orders_mass_inv_text_1 = '1 alebo viac vybraných záznamov objednávok nemá vytvorenú faktúru. \n\nPrajete si vygenerovať hromadnú faktúru len pre existujúce faktúry?';
32var cms_js_lang_orders_mass_inv_text_2 = 'Maximálny počet faktúr pre hromadné generovanie je obmedzený na {count_max} (aktuálny počet: {count}).\nVyberte prosím menší počet faktúr, prípadne znížte počet zobrazených položiek na stránku.';
33
34var cms_js_lang_settings_required = 'Potrebná úprava nastavení';
35var cms_js_lang_bulk_adjustment_of_coupon_validity = 'Hromadná zmena platnosti pre %s zvolených kupónov';
36var cms_js_lang_erase_date = 'Vyčistiť dátum';
37
38var js_lang_buy_as_company_country_restriction = 'Nákup na firmu je možný iba v prípade fakturačnej a dodacej adresy na Slovensku.';
39
40var js_lang_gift_free_title = 'Darček zdarma - zostáva nakúpiť za';
41var js_lang_gift_free_enabled = 'Máte vzorku produktu zdarma.';
42var cms_js_lang_orders_sms_send_title_s = 'Zaslať SMS o zmene stavu objednávky';
43var cms_js_lang_orders_sms_send_title_m = 'Zaslať SMS o zmene stavu objednávok';
44var cms_js_lang_orders_sms_send_title = 'Zaslať SMS o zmene stavu na';
45var cms_js_lang_orders_change_status_default_comment = 'Komentár pre zákazníka';
46var cms_js_lang_orders_change_status_change_confirm = 'Potvrdiť zmenu stavu objednávky';
47var cms_js_lang_orders_customer_search = 'zadajte meno / e-mail zákazníka';
48var cms_js_lang_orders_delete_confirm = 'Skutočne chcete zmazať zvolené objednávky?';
49var cms_js_lang_orders_message = 'Nepovinná správa k zmene stavu objednávky pre zákazníka';
50var cms_js_lang_orders_change_info_s = 'Zmena stavu objednávky na nový stav:';
51var cms_js_lang_orders_change_info_m = 'Hromadná zmena stavu objednávok na nový stav:';
52var cms_js_lang_orders_change_pick_new = 'vyberte nový stav objednávky';
53var cms_js_lang_orders_confirm_1 = 'Potvrdiť zmenu stavu bez zaslania e-mailu';
54var cms_js_lang_orders_confirm_2 = 'Potvrdiť zmenu a zaslať e-mail zákazníkovi';
55var cms_js_lang_orders_confirm_3 = 'alebo';
56var cms_js_lang_orders_confirm_4 = 'Zaslať email zákazníkovi';
57var cms_js_lang_orders_confirm_5 = 'Vložiť zo šablóny';
58var cms_js_lang_orders_confirm_6 = '- vyberte šablónu správy -';
59var cms_js_lang_orders_confirm_7 = 'Správa šablón';
60var cms_js_lang_orders_confirm_8 = 'uložiť správu do účtu zákazníka';
61var cms_js_lang_orders_confirm_9 = '- pridať novú šablónu -';
62var cms_js_lang_orders_confirm_10 = 'Zmazať šablónu';
63var cms_js_lang_orders_confirm_11 = 'Názov šablóny:';
64var cms_js_lang_orders_confirm_12 = 'Text:';
65var cms_js_lang_orders_confirm_13 = 'Nahrať prílohu ku správe';
66var cms_js_lang_orders_confirm_14 = 'Správa textových šablón';
67var cms_js_lang_orders_confirm_15 = 'Naozaj si prajete zmazať zvolenú šablónu?';
68var cms_js_lang_orders_confirm_16 = 'Vyplňte údaje ku šablóne.';
69var cms_js_lang_orders_confirm_17_add = 'Šablóna bola úspešne pridaná.';
70var cms_js_lang_orders_confirm_17_save = 'Šablóna bola úspešne uložená.';
71var cms_js_lang_orders_confirm_18 = 'Počkajte na dokončenie nahrávania súborov.';
72var cms_js_lang_orders_misc_1 = 'pôvodný adresát: ';
73var cms_js_lang_invoice_next_no_err = 'Faktúra so zadaným číslom už existuje. Zadajte prosím iné.';
74var cms_js_lang_invoice_email = 'Nie je vyplnená e-mailová adresa klienta.';
75var cms_js_lang_invoice_info_1 = 'Faktúra už bola zaslaná.';
76var cms_js_lang_invoice_info_2 = 'Chcete ju napriek tomu znovu zaslať na ';
77var cms_js_lang_invoice_info_3 = 'Skutočne chcete zaslať faktúru na ';
78var cms_js_lang_proforma_invoice_info_1 = 'Predfaktúra už bola zaslaná.';
79var cms_js_lang_proforma_invoice_info_3 = 'Skutočne chcete zaslať predfaktúru na ';
80var js_lang_bulk_discount_import_completed = 'Import množstevných zliav bol úspešne dokončený.';
81
82var cms_js_lang_group_alert = 'Skupina s rovnakým menom už existuje!';
83
84var cms_js_selected_message = {
85	users: {
86		DESELECT: 'Zrušiť výber',
87		SELECTED: 'Označení zákazníci:',
88		SELECTED_ALL: 'Máte označených všetkých vyfiltrovaných zákazníkov',
89		SELECTED_ALL_NO_FILTER: 'Máte označených všetkých zákazníkov',
90		SELECTED_ALL_CUR: 'Všetci zákazníci na stránke sú označený.',
91		SELECT_ALL: 'Označiť zákazníkov na všetkých stranách',
92		SELECT_INFO: '&nbsp;&nbsp;&nbsp;<i>Info: ďalšieho %s zákazníka máte označeného na ostatných stranách.</i>',
93		SELECT_INFO_PLURAL: '&nbsp;&nbsp;&nbsp;<i>Info: ďalších %s zákazníkov máte označených na ostatných stranách.</i>',
94		SELECT_INFO_PLURAL_2: '&nbsp;&nbsp;&nbsp;<i>Info: ďalších %s zákazníkov máte označených na ostatných stranách.</i>'
95	},
96	admins: {
97		DESELECT: 'Zrušiť výber',
98		SELECTED: 'Označení administrátori:',
99		SELECTED_ALL: 'Máte označené všetkých vyfiltrovaných administrátorov',
100		SELECTED_ALL_NO_FILTER: 'Máte označené všetkých administrátorov',
101		SELECTED_ALL_CUR: 'Všetci administrátori na stránke sú označené.',
102		SELECT_ALL: 'Označiť administrátorov na všetkých stranách',
103		SELECT_INFO: '&nbsp;&nbsp;&nbsp;<i>Info: ďalšieho %s administrátora máte označeného na ostatných stranách.</i>',
104		SELECT_INFO_PLURAL: '&nbsp;&nbsp;&nbsp;<i>Info: ďalších %s administrátorov máte označených na ostatných stranách.</i>',
105		SELECT_INFO_PLURAL_2: '&nbsp;&nbsp;&nbsp;<i>Info: ďalších %s administrátorov máte označených na ostatných stranách.</i>'
106	}
107};
108
109var cms_js_lang_admin_user_form_letterman_active = ' - odber noviniek je aktivovaný';
110var cms_js_lang_admin_user_form_letterman_inactive = ' - odber noviniek je deaktivovaný';
111var cms_js_lang_admin_user_form_namedaycoupon_active = ' - odber meninových kupónov je aktivovaný';
112var cms_js_lang_admin_user_form_namedaycoupon_inactive = ' - odber meninových kupónov je deaktivovaný';
113
114var js_lang_admin_login_as_customer_vex_title = 'Zákazník bol nedávno aktívny';
115var js_lang_admin_login_as_customer_vex_last_active = 'Aktívny pred';
116var js_lang_admin_login_as_customer_vex_message = 'Prajete si pokračovať? Zákazník bude týmto odhlásený.';
117var js_lang_admin_login_as_customer_vex_cancel = 'Zrušiť';
118var js_lang_admin_login_as_customer_vex_continue = 'Nákup za zákazníka';
119
120var cms_js_lang_filter_customer_all = 'všetkých zákazníkov';
121var cms_js_lang_filter_customer_registered = 'iba registrovaných zákazníkov';
122var cms_js_lang_filter_customer_unregistered = 'iba neregistrovaných zákazníkov';
123var cms_js_lang_select_customer_group = 'Zvoľte skupinu zákazníkov';
124var cms_js_lang_enter_specific_customer = 'Zadajte konkrétneho zákazníka';
125var cms_js_lang_filter_customer_placeholder = 'meno / e-mail / ulica / mesto / PSČ / tel.';
126
127var csm_js_lang_pw_strength = 'Sila hesla';
128var cms_js_lang_pw_too_short = 'Príliš krátke (min. 6 znakov)';
129var cms_js_lang_pw_weak = 'Slabé';
130var cms_js_lang_pw_medium = 'Priemerné';
131var cms_js_lang_pw_strong = 'Silné';
132
133var cms_js_lang_pw_too_short_hint = '"Príliš krátke" heslo má dĺžku menej ako 6 znakov.';
134var cms_js_lang_pw_weak_hint = '"Slabé" heslo nemá dĺžku 8 znakov, neskladá sa z veľkých písmen, malých písmen a číslic';
135var cms_js_lang_pw_medium_hint = '"Priemerné" heslo nemá dĺžku 12 znakov, neskladá sa z veľkých písmen, malých písmen a číslic.';
136
137
138var cms_js_lang_voucher_delete_title = 'Zmazať poukaz';
139var cms_js_lang_voucher_send = 'Zaslať';
140var cms_js_lang_voucher_send_title = 'Zašle email iba s týmto poukazom.';
141var cms_js_lang_voucher_delete_confirm = 'Skutočne chcete zmazať poukážku';
142var cms_js_lang_voucher_delete_all_confirm = 'Skutočne chcete zmazať všetky poukážky objednávky';
143var cms_js_lang_voucher_send_all_confirm = 'Skutočne chcete zaslať faktúru a všetky poukážky objednávky';
144var cms_js_lang_voucher_send_confirm = 'Skutočne chcete zaslať emailom túto poukážku?';
145var cms_js_lang_voucher_edit_title = 'Upraviť poukaz';
146var cms_js_lang_voucher_enter_pin = 'Pre kontrolu zadajte 4 miestny bezpečnostný kód uvedený v spodnej časti poukazu.';
147var cms_js_lang_voucher_novalid = 'Kód poukazu alebo bezpečnostný kód nie je správny.';
148var cms_js_lang_voucher_desc_title = 'Popis poukazu';
149var cms_js_lang_voucher_pdf_click_title = 'Zobraziť vyúčtovanie PDF. Stlačením alt a kliknutím zobrazíte faktúru PDF k vyúčtovaniu';
150
151var cms_js_loader_working = 'Prebieha spracovanie...';
152
153var cms_js_lang_percent = 'Percentá';
154var cms_js_lang_total = 'Čiastka';
155var cms_js_lang_total_sub = 'Odrátanie čiastky';
156
157var cms_js_lang_credit_note_info_1 = 'Dobropis už bol zaslaný.';
158var cms_js_lang_credit_note_info_2 = 'Chcete ho napriek tomu znovu zaslať na ';
159var cms_js_lang_credit_note_info_3 = 'Skutočne chcete zaslať dobropis na ';
160
161var cms_js_lang_credit_erase_working = 'Pracujem...';
162var cms_js_lang_credit_erase_confirm = 'Skutočne chcete vynulovať kredity všetkým svojim zákazníkom ?';
163var cms_js_lang_credit_erased = 'Kredity všetkých zákazníkov boli úspešne vynulované';
164var cms_js_lang_credit_erase_run = 'Vynulovať';
165
166var cms_js_lang_advanced_credit_system_1 = 'Nemožno uplatniť trvalú zlavu. Máte dostatok volných kreditov?';
167
168var cms_js_lang_products_group_name = 'Meno skupiny produktov';
169var cms_js_lang_products_group_1 = 'Zobraziť zoznam produktov skupiny';
170var cms_js_lang_products_group_2 = 'Uložiť';
171var cms_js_lang_products_group_3 = 'Zrušiť';
172var cms_js_lang_products_group_4 = 'Upraviť';
173var cms_js_lang_products_group_5 = 'Zmazať';
174var cms_js_lang_products_group_6 = 'Pridať skupinu';
175var cms_js_lang_products_group_7 = 'Pridať';
176var cms_js_lang_products_group_8 = 'Odoslať';
177var cms_js_lang_products_group_9 = 'Zatvoriť';
178var cms_js_lang_products_group_10 = 'Objednať';
179var cms_js_lang_products_group_11 = 'Vyprázdniť';
180var cms_js_lang_products_group_12 = 'Vložiť';
181var cms_js_lang_products_group_13 = 'Preložiť';
182var cms_js_lang_products_group_14 = 'Vytvoriť kópiu šablóny';
183var cms_js_lang_products_group_15 = 'Pridať predajcu';
184var cms_js_lang_products_group_16 = 'Uložiť zmeny a zmazať modul';
185var cms_js_lang_products_group_17 = 'Odkaz text';
186var cms_js_lang_products_group_18 = 'Odkaz link';
187var cms_js_lang_products_group_delete_confirm_1 = 'Skupina produktov ';
188var cms_js_lang_products_group_delete_confirm_2 = ', ktorú chcete zmazať má priradených ';
189var cms_js_lang_products_group_delete_confirm_3 = ' produktov. Zmazať je možné iba skupinu, ktorá je prázdna.';
190var cms_js_lang_products_group_delete_confirm_4 = 'Naozaj chcete vymazať skupinu ';
191var cms_js_lang_products_group_lang_empty_input = 'Všetky polia prekladov musia byť vyplnené.';
192var cms_js_lang_payment_meaning_empty = 'Vyberte prosím hodnotu pre "Význam platby"';
193var cms_js_lang_shipping_meaning_empty = 'Vyberte prosím hodnotu pre "Význam dopravy"';
194var cms_js_lang_products_shipping_message_error_1 = ' Chyba ';
195var cms_js_lang_products_shipping_message_error_2 = 'Neznáma chyba';
196var cms_js_lang_products_stock_1 = 'Skladový pohyb bol úspešne vytvorený.';
197var cms_js_lang_products_stock_2 = 'Pri vytváraní skladového pohybu sa vyskytla chyba.';
198var cms_js_lang_products_stock_3 = 'Pridať';
199var cms_js_lang_products_availability_delete = 'Vymazať';
200var cms_js_lang_products_availability_delete_title = 'Vymazať dostupnosť';
201var cms_js_lang_products_availability_delete_message_1 = 'Po vymazaní ';
202var cms_js_lang_products_availability_delete_message_2 = ' produkt prestane';
203var cms_js_lang_products_availability_delete_message_3 = ' produkty prestanú';
204var cms_js_lang_products_availability_delete_message_4 = ' produktov prestane';
205var cms_js_lang_products_availability_delete_message_5 = ' mať uvedenú dostupnosť. Naozaj chcete vymazať vybranú dostupnosť?';
206var cms_js_lang_products_availability_delete_message_6 = 'Naozaj chcete vymazať vybranú dostupnosť?';
207var cms_js_lang_products_manufacturer_delete_message_1 = 'Po vymazaní ';
208var cms_js_lang_products_manufacturer_delete_message_2 = ' produkt prestane';
209var cms_js_lang_products_manufacturer_delete_message_3 = ' produkty prestanú';
210var cms_js_lang_products_manufacturer_delete_message_4 = ' produktov prestane';
211var cms_js_lang_products_manufacturer_delete_message_5 = ' mať uvedeného výrobcu. Naozaj chcete vymazať tohto výrobcu?';
212var cms_js_lang_products_manufacturer_delete_message_6 = 'Naozaj chcete vymazať tohto výrobcu?';
213var cms_js_lang_products_manufacturer_delete_message_7 = 'Naozaj chcete vymazať výrobcu "%s"?';
214var cms_js_lang_claims_delete_confirm = 'Skutočne chcete zmazať zvolené reklamácie?';
215var cms_js_lang_select_manufacturer = 'Zvoľte výrobcu';
216//
217var cms_js_lang_products_supplier_delete_message_1 = 'Po vymazaní ';
218var cms_js_lang_products_supplier_delete_message_2 = ' produkt prestane';
219var cms_js_lang_products_supplier_delete_message_3 = ' produkty prestanú';
220var cms_js_lang_products_supplier_delete_message_4 = ' produktov prestane';
221var cms_js_lang_products_supplier_delete_message_5 = ' mať uvedeného dodávateľa. Naozaj chcete vymazať tohto dodávateľa?';
222var cms_js_lang_products_supplier_delete_message_6 = 'Naozaj chcete vymazať tohto dodávateľa?';
223//
224var cms_js_lang_products_tax_rate = 'Sadzba DPH';
225var cms_js_lang_products_tax_delete = 'Naozaj chcete zmazať sadzbu DPH?';
226var cms_js_lang_products_duplicate_add_finish_first = 'Pred vytvorením kópie produktu je potrebné najskôr ukončiť pridanie nového produktu.';
227var cms_js_lang_products_duplicate_product_name_changed = 'Zmeňte názov produktu, aby bol iný ako názov pôvodného, prosím.';
228var cms_js_lang_customer_customer_search = 'zadajte meno / e-mail zákazníka';
229var cms_js_lang_customer_password_notmatched = 'Heslá sa nezhodujú.';
230var cms_js_lang_customer_delete_confirm = 'Naozaj chcete zmazať zvolených zákazníkov?';
231var cms_js_lang_customer_administrator_delete_confirm = 'Naozaj chcete zmazať zvolených administrátorov?';
232var cms_js_lang_content_product_added_add_another = 'Produkt bol úspešne pridaný&hellip; môžete pridať ďalší produkt';
233var cms_js_lang_content_product_added_add_another_copied = 'Produkt bol úspešne pridaný&hellip; môžete pridať ďalší produkt s podobnými údajmi';
234var cms_js_lang_content_product_add = 'Pridať produkt';
235var cms_js_lang_content_product_edited = 'Produkt "%s" bol úspešne upravený';
236var cms_js_lang_content_product_related_removed = 'Produkt bol zmazaný zo zoznamu';
237var cms_js_lang_content_products_delete_confirm = 'Skutočne chcete zmazať zvolené produkty? Počet produktov na zmazanie: %s.'; // %s = pocet
238var cms_js_lang_content_products_tax_select = '- zvolte DPH -';
239var cms_js_lang_content_products_tax_add = '- pridať novú DPH -';
240var cms_js_lang_content_panel_layout = 'Rozdelenie web stránky';
241var cms_js_lang_content_panel_layout_title_1 = 'Rozdelenie - 3 stĺpce';
242var cms_js_lang_content_panel_layout_title_2 = 'Rozdelenie - 2 stĺpce';
243var cms_js_lang_content_panel_layout_title_3 = 'Rozdelenie - 3 stĺpce';
244var cms_js_lang_content_panel_layout_title_4 = 'Rozdelenie - 2 stĺpce';
245var cms_js_lang_content_panel_bin_used = 'Použité moduly';
246var cms_js_lang_content_panel_bin_new = 'Nepoužité moduly';
247var cms_js_lang_content_panel_restart = 'Skutočne chcete vykonať návrat na pôvodné rozloženie stránky?';
248var cms_js_lang_content_panel_restart_title = 'Návrat na pôvodné rozloženie stránky.';
249var cms_js_lang_content_modules_info = 'Skrýva sa pravá časť, moduly patriace do nej boli presunute do Zásobníka použitých modulov';
250var cms_js_lang_content_modules_move = 'Presunúť do zásobníka nepoužitých modulov';
251var cms_js_lang_content_modules_move_btn = 'Presunúť';
252var cms_js_lang_content_modules_move_title = 'Presunúť modul/y';
253var cms_js_lang_content_modules_moving = 'Skrývam modul do zásobníka použitých modulov';
254var cms_js_lang_content_modules_delete = 'Zmazať modul';
255var cms_js_lang_content_modules_delete_confirm = 'Naozaj chcete zmazať tento modul?';
256var cms_js_lang_content_modules_change_name = 'Zmeniť názov';
257var cms_js_lang_content_modules_hide_name = 'Skryť názov';
258var cms_js_lang_content_modules_show_name = 'Zobraziť názov';
259var cms_js_lang_content_modules_show_where = 'Zobraziť modul na';
260var cms_js_lang_content_article_show_where = 'Zobraziť článok na';
261var cms_js_lang_content_modules_show_where_btn = 'Zobraziť na...';
262var cms_js_lang_content_modules_show_params = 'Parametre';
263var cms_js_lang_content_modules_disable_devices = 'Zobraziť na zariadeniach';
264var cms_js_lang_content_choose_one_option = 'Zvoľte aspoň 1 z možností';
265var cms_js_lang_content_modules_edit = 'Úprava modulu';
266var cms_js_lang_content_module_title_edit = 'Úprava názvu';
267var cms_js_lang_content_modules_show_image_params = 'Obrázky';
268var cms_js_lang_content_modules_hide = 'Skryť modul';
269var cms_js_lang_content_modules_save = 'Uložiť';
270var cms_js_lang_content_modules_quick_title = 'Zobraziť tento modul:';
271var cms_js_lang_content_modules_display_only_for_admin = 'iba pre administrátora';
272var cms_js_lang_content_modules_this_page = 'iba na tejto stránke *';
273var cms_js_lang_content_modules_this_category = 'iba v produktoch tejto kategórie*';
274var cms_js_lang_content_modules_all_pages = 'na všetkých stránkach';
275var cms_js_lang_content_modules_select_page = 'vybrať si stránky...';
276var cms_js_lang_content_modules_basic_setting = '* základné nastavenie';
277var cms_js_lang_content_modules_cancel = 'Zrušiť';
278var cms_js_lang_content_modules_redirect = 'Presmerovať';
279var cms_js_lang_content_modules_image_upload = 'Nahrať obrázok';
280var cms_js_lang_content_modules_image_change = 'Zmeniť obrázok';
281var cms_js_lang_content_modules_group_products_group = 'Skupina produktov';
282var cms_js_lang_content_modules_group_products_count = 'Počet produktov v skupine:';
283var cms_js_lang_content_modules_group_products_ordering = 'Zoradenie produktov:';
284var cms_js_lang_content_modules_group_products_ordering_1 = 'manuálne';
285var cms_js_lang_content_modules_group_products_ordering_2 = 'náhodné pre 1 deň';
286var cms_js_lang_content_modules_group_products_ordering_3 = 'vždy náhodné';
287var cms_js_lang_content_modules_group_products_ordering_12 = 'dátumu pridania';
288var cms_js_lang_content_modules_group_products_ordering_13 = 'dátumu pridania do skupiny';
289var cms_js_lang_content_menu_item_drag_title = 'Zmeniť poradie';
290var cms_js_lang_content_text_change = 'Zmeniť text';
291var cms_js_lang_content_structure_change = 'Zmeniť HTML';
292var cms_js_lang_content_text_change_edit = 'Úprava textu modulu ';
293var cms_js_lang_content_text_change_tooltip = 'Kliknutím môžete zmeniť obsah modulu';
294var cms_js_lang_content_footer_change_edit = 'Úprava textu pätičky';
295var cms_js_lang_content_footer_change_tooltip = 'Kliknutím môžete zmeniť obsah pätičky';
296var cms_js_lang_content_footer_1 = 'pätičky';
297var cms_js_lang_content_article_change_position = 'Zmeniť poradie článkov';
298var cms_js_lang_content_article_change_position_finish = 'Ukončiť zmenu poradia';
299var cms_js_lang_content_article_change_position_cancel = 'Zrušiť zmenu poradia';
300var cms_js_lang_content_article_edit = 'Upraviť článok';
301var cms_js_lang_content_article_delete = 'Zmazať článok';
302var cms_js_lang_content_article_delete_confirm = 'Naozaj chcete zmazať článok?';
303var cms_js_lang_content_article_move_1 = 'Zobraziť stránku "';
304var cms_js_lang_content_article_move_2 = '" po presune článku?';
305var cms_js_lang_content_article_move_title = 'Zmeniť poradie';
306var cms_js_lang_content_topmenu_delete_confirm = 'Naozaj chcete zmazať položku menu?';
307var cms_js_lang_content_topmenu_change_typ_confirm = 'Naozaj si želáte zmeniť menu položku z typu stránka na typ Odkaz (URL adresa)? \n \n Upozornenie: táto akcia vymaže vytvorený obsah stránky, jej prípadné články a jej špecifické moduly.';
308var cms_js_lang_content_topmenu_change_typ_confirm_blog = 'Naozaj si želáte zmeniť menu položku z typu Blog na typ Odkaz (URL adresa)? \n \n Upozornenie: táto akcia vymaže vytvorený obsah stránky, jej prípadné články a jej špecifické moduly.';
309var cms_js_lang_content_topmenu_change_typ_okmsg = 'Položka <strong>%n</strong> bola úspešne zmenená na typ URL <strong>%s</strong>.';
310var cms_js_lang_content_topmenu_alert_1 = 'Nie je možné pridať novú položku do menu - jeho položky už zaberajú celú jeho šírku.';
311var cms_js_lang_content_item_add = 'Pridať položku';
312var cms_js_lang_content_no_category_selectd = 'Vyberte si kategóriu zo stromu kategórií.';
313var cms_js_lang_content_category_add = 'Pridať kategóriu';
314var cms_js_lang_content_category_add_sub = 'Pridať podkategóriu';
315var cms_js_lang_content_category_add_name = 'Názov menu položky';
316var cms_js_lang_content_category_add_confirm = 'Pridať';
317var cms_js_lang_content_category_add_label = 'Pridanie kategórie:';
318var cms_js_lang_content_category_add_success = 'Kategória bola úspešne pridaná.';
319var cms_js_lang_content_category_edit_success = 'Kategória bola úspešne zmenená.';
320var cms_js_lang_content_category_move_success = 'Kategória bola úspešne presunutá.';
321var cms_js_lang_content_category_delete_success = 'Kategória bola úspešne zmazaná.';
322var cms_js_lang_category_without_category = 'bez priradenej kategórie';
323var cms_js_lang_category_without_category_title = 'odoberie všetky kategórie';
324var cms_js_lang_category_radio_set_only = 'Nastaviť iba';
325var cms_js_lang_category_radio_add_also = 'Pridať aj';
326var cms_js_lang_category_radio_del_only = 'Odobrať';
327var cms_js_lang_category_radio_label = ' kategórie zvolené nižšie:';
328var cms_js_lang_category_change = 'Zmeniť:';
329var cms_js_lang_category_radio_label_1 = 'Kategórie produktov';
330var cms_js_lang_product_param_label = 'Parametre produktov';
331var cms_js_lang_category_radio_label_2 = 'Primárnu kategóriu produktov';
332var cms_js_lang_primary_category_change = 'Zmena primárnej kategórie ';
333var cms_js_lang_primary_category_change_span_text = 'Nastaviť jednu vybranú primárnu kategóriu ';
334var cms_js_lang_category_change_1 = 'Hromadná zmena kategórií ';
335var cms_js_lang_category_change_2 = ' zvolených produktov';
336var cms_js_lang_category_change_2_1 = ' zvoleného produktu';
337var cms_js_lang_category_change_3 = ' zvoleným produktom:<br><i>(produkty budú do kategórie aj zaradené, ak ešte nie sú)</i>';
338var cms_js_lang_category_change_3_1 = ' zvolenému produktu:<br><i>(produkt bude do kategórie aj zaradený, ak ešte nie je)</i>';
339var cms_js_lang_content_edit_categories_label = 'Úprava kategórií:';
340var cms_js_lang_content_edit_category_label = 'Úprava kategórie: %s';
341var cms_js_lang_content_edit_category_show_selected = 'Zobraziť iba označené kategórie';
342var cms_js_lang_content_edit_category_vex_tooltip = 'V tejto sekcii môžete jednoducho a efektívne spravovať kategórie produktov: <br> - pridať novú kategóriu, upraviť existujúcu, zmeniť ich poradie a zaradenie v strome.';
343var cms_js_lang_content_category_save = 'Uložiť';
344var cms_js_lang_content_category_cancel = 'Zrušiť';
345var cms_js_lang_content_category_edit = 'Upraviť kategóriu';
346var cms_js_lang_content_category_delete = 'Zmazať';
347var cms_js_lang_content_category_delete_confirm = 'Naozaj chcete zmazať kategóriu?';
348var cms_js_lang_content_category_delete_confirm_cat = 'Naozaj chcete zmazať kategóriu %s?';
349var cms_js_lang_content_category_add_disabled = 'Kategóriu nie je možné pridať pretože sa presiahlo maximálne vnorenie';
350var cms_js_lang_content_category_add_disabled_for_alias = 'Kategóriu nie je možné pridať, pretože je aliasom inej kategórie';
351var cms_js_lang_content_category_delete_disabled = 'Kategóriu nie je možné zmazať pretože obsahuje podkategórie';
352var cms_js_lang_content_category_move_confirm = 'Kategória bude presunutá pod inú kategóriu. Prajete si pokračovať?';
353var cms_js_lang_content_category_show_all_products = 'Zoznam produktov v kategórii %s';  // %s - nazov kategorie
354var cms_js_lang_content_category_translate = 'Preložiť';
355var cms_js_lang_content_category_translate_all = 'Preložiť všetko';
356var cms_js_lang_content_category_alias_for = 'Odkaz na kategóriu';
357var cms_js_lang_orders_x = 'Objednávok:';
358var cms_js_lang_customers_x = 'Zákazníkov:';
359var cms_js_lang_income_x = 'Príjem:';
360var cms_js_lang_content_alert_1 = 'Neznáma chyba.';
361var cms_js_lang_content_alert_2 = 'Zadajte prosím názov kategórie.';
362var cms_js_lang_content_alert_3 = 'Zadajte prosím čitatelnú URL kategórie.';
363var cms_js_lang_content_alert_4 = 'Zadajte prosím názov položky menu.';
364var cms_js_lang_content_alert_5 = 'Zadajte prosím čitatelnú URL položky menu.';
365var cms_js_lang_content_alert_6 = 'Túto položku nie je možné presunúť do hlavného menu - jeho položky už zaberajú celú jeho šírku.';
366var cms_js_lang_content_alert_7 = 'Prosím ukončite najskôr úpravu ';
367var cms_js_lang_content_alert_8 = 'Zadajte sadzbu DPH.';
368var cms_js_lang_content_alert_9 = 'Chybne zadaná sadzba DPH.';
369var cms_js_lang_content_alert_10 = 'Vyplňte a vyberte prosím povinné položky označené hviezdičkou.';
370var cms_js_lang_content_alert_11 = '';
371var cms_js_lang_content_alert_12 = 'Žial už nie je možné vpísať viac znakov, pretože by sa menu položka nezmestila do menu.';
372var cms_js_lang_content_alert_13 = 'Žial už nie je možné vpísať viac znakov, pretože bola dosiahnutá maximálna dĺžka krátkeho popisu (#COUNT# zn
372akov).';
373var cms_js_lang_content_alert_14 = 'Túto položku nie je možné vymazať, pretože má podpoložky.';
374var cms_js_lang_content_alert_15 = 'Čitatelná url sa zmenila a môže byť použitá.';
375var cms_js_lang_content_alert_16 = 'Čitatelnú url je potrebné zmeniť pretože sa už v systéme používa.';
376var cms_js_lang_content_alert_17 = 'Overenie čitatelnej url adresy zlyhalo.';
377var cms_js_lang_content_alert_18 = 'Čitatelná url položka musí byť vyplnená a nesmie sa zhodovať so žiadnou už existujúcou.';
378var cms_js_lang_content_alert_19 = 'Systémovú položku nie je možné vymazať.';
379var cms_js_lang_content_alert_20 = 'položku nie je možné vymazať (nachádza sa v objednávkach za posledný mesiac)';
380var cms_js_lang_customer_password_strength = '<strong>Vysvetlenie pojmu "Sila hesla":</strong><br /><br /><strong>"Príliš krátke"</strong> heslo má dĺžku menej ako 6 znakov.<br /><strong>"Silné"</strong> heslo ma dĺžku najmenej 12 znakov, skladá sa z velkých písmen, malých písmen a číslic.<br /><strong>"Priemerné"</strong> heslo má dĺžku najmenej 8 znakov, skladá sa z velkých a malých písmen, alebo z velkých písmen a číslic, alebo z malých písmen a číslic.<br /><strong>"Slabé"</strong> heslo je horšie ako "Priemerné" heslo v niektorom z jeho parametrov.';
381var cms_js_lang_product_availability_name = 'Dodacia lehota';
382var cms_js_lang_product_availability_duplicity = 'Zadaná dodacia lehota už existuje.';
383var cms_js_lang_product_availability_inserted = 'Dodacia lehota bola pridaná.';
384var cms_js_lang_product_availability_update_fail = 'Nepodarilo sa upraviť danú dodaciu lehotu.';
385var cms_js_lang_product_availability_updated = 'Dodacia lehota bola upravená.';
386var cms_js_lang_product_availability_deleted = 'Dodacia lehota bola zmazaná.';
387var cms_js_lang_product_manufacturer_name = 'Názov výrobcu';
388var cms_js_lang_product_manufacturer_duplicity = 'Zadaný výrobca už existuje.';
389var cms_js_lang_product_manufacturer_edit_fail = 'Nepodarilo sa upraviť výrobcu.';
390var cms_js_lang_product_manufacturer_edit_success = 'Výrobca bol upravený.';
391var cms_js_lang_product_manufacturer_insert_fail = 'Nepodarilo sa pridať nového výrobcu.';
392var cms_js_lang_product_manufacturer_deleted = 'Výrobca bol zmazaný.';
393
394var cms_js_lang_price_history_delete_message = 'Naozaj si želáte hromadne zmazať históriu cien na <strong> %s </strong> zvolených produktoch?';
395var cms_js_lang_price_history_delete_title = 'Zmazanie histórie cien';
396var cms_js_lang_price_history_confirm_number = 'Prosím zadajte číslo <strong> %s </strong> (počet produktov, ktorým sa zmaže cenová história)'
397var cms_js_lang_price_history_success = 'Cenová história bola zmazaná pre %s produktov';
398var cms_js_lang_price_history_fail = 'Chyba, zadali ste nesprávny počet zvolených produktov. Skúste to znova.';
399
400var cms_js_lang_mass_shopper_group_change_confirm_title = 'Priradiť %count zákazníkov';
401var cms_js_lang_mass_shopper_group_change_confirm_content = 'Naozaj ste si istý, že chcete <strong>%count</strong> zákazníkov presunúť do zadanej zákazníckej skupiny? <br><br> Prosím zadajte číslo <strong> %count </strong> (počet všetkých označených zákazníkov) <br><br>';
402var cms_js_lang_mass_shopper_group_change_title = 'Zmena zákazníckej skupiny';
403var cms_js_lang_mass_shopper_group_change_success = 'Úspešne zmenené zákaznícke skupiny';
404
405var cms_js_lang_product_seller_name = 'Názov predajcu';
406var cms_js_lang_product_seller_delete = 'Naozaj chcete zmazať tohto predajcu?';
407
408//
409var cms_js_lang_product_supplier_name = 'Názov dodávateľa';
410var cms_js_lang_product_supplier_duplicity = 'Zadaný dodávateľ už existuje.';
411var cms_js_lang_product_supplier_edit_fail = 'Nepodarilo sa upraviť dodávateľa.';
412var cms_js_lang_product_supplier_edit_success = 'Dodávateľ bol upravený.';
413var cms_js_lang_product_supplier_insert_fail = 'Nepodarilo sa pridať nového dodávateľa.';
414var cms_js_lang_product_supplier_deleted = 'Dodávateľ bol zmazaný.';
415//
416var cms_js_lang_always = ' - vždy -';
417var cms_js_lang_change_sef_name = 'Zmena čitatelnej URL môže spôs
417obiť zníženie pozície (resp. PageRank-u)\nkonkrétnej stránky na GOOGLE. Naozaj pokračovať?';
418var cms_js_lang_close = 'Zavrieť';
419var cms_js_lang_order_items_changes_prod_quant_nonzero_warn = 'Zadané množstvo musí byť celé číslo väčšie ako nula.';
420var cms_js_lang_order_items_changes_chng_ord_nonzero_warn = 'Hodnotu položky nie je možné zmeniť, nakoľko celková suma objednavky by nebola väčšia ako nula.';
421var cms_js_lang_order_items_changes_other_quant_warn = 'Zadané množstvo musí byť iné ako pôvodné.';
422var cms_js_lang_order_items_changes_check_stock_limit_warn = 'Položke objednávky nie je možné zmeniť množstvo na zadanú hodnotu, z dôvodu zapnutej kontroly skladových zásob. Najvyššia možná hodnota pre množstvo je';
423var cms_js_lang_order_items_changes_equal_quant_warn = 'Položke objednávky nebolo zmenené množstvo, pretože ste zadali rovnakú hodnotu.';
424var cms_js_lang_order_items_changes_chng_ord_quest_01 = 'Chcete zmeniť objednávku aj napriek tomu, že po zmene jej celková suma v hodnote';
425var cms_js_lang_order_items_changes_chng_ord_quest_02 = 'bude nižšia ako minimálna suma objednávky v hodnote';
426var cms_js_lang_order_items_changes_only_one_ord_item = 'Položku objednávky nie je možné zmazať, pretože objednávka obsahuje iba túto jednu položku';
427var cms_js_lang_order_items_changes_del_ord_item_quest = 'Zmazať z objednávky položku číslo';
428var cms_js_lang_order_items_changes_put_or_sel_prod_sku = 'Prosím zadajte alebo vyberte';
429var cms_js_lang_order_items_changes_mass_invoice_creation = 'Prebieha hromadné vytváranie faktúr. Táto operácia môže chvílu trvať. Prosím, neobnovujte stránku.';
430var cms_js_lang_order_items_changes_lower_like_coupon_warn = 'Položku objednávky nie je možné zmazať, pretože:<br> - suma objednávky by bola následne nižšia ako hodnota kupónu.';
431var cms_js_lang_order_items_changes_lower_like_minimal_value = 'Položku objednávky nie je možné zmazať, pretože:<br> - suma objednávky by bola následne nižšia ako minimálna hodnota objednávky.';
432var cms_js_lang_order_print_sku = 'Kód produktu';
433var cms_js_lang_order_print_sku_form = 'Kód:';
434var cms_js_lang_display = 'Zobraziť';
435var cms_js_lang_hide = 'Skryť';
436var cms_js_lang_delete = 'Zmazať';
437var cms_js_lang_change = 'Zmeniť';
438var cms_js_lang_order_items_changes_dupli_ord_item = 'Novú položku objednávky nie je možné pridať, pretože objednávka už obsahuje inú položku s rovnakým kódom produktu';
439var cms_js_lang_order_items_changes_unknown_prod_sku = 'Novú položku objednávky nie je možné pridať, pretože ste zadali neexistujúci údaj pre';
440var cms_js_lang_products_filter_entry_search = 'zadajte názov alebo kód produktu';
441var cms_js_lang_products_filter_entry_search_variant = 'zadajte identifikátor variantu';
442var cms_js_lang_order_number_entry_search = 'zadajte číslo objedn.';
443var cms_js_lang_claim_number_entry_search = 'zadajte číslo rekl.';
444var cms_js_lang_dobropis_number_entry_search = 'zadajte číslo dobr.';
445var cms_js_lang_system_account_changed = 'Váš účet bol úspešne upravený';
446var cms_js_lang_content_leadimg_tooltip = 'Kliknutím môžete upraviť hlavičku';
447var cms_js_lang_content_leadimg_web_name = 'Názov e-shopu:';
448var cms_js_lang_content_leadimg_web_desc = 'Slogan e-shopu:';
449var cms_js_lang_content_leadimg_def_web_name = 'Názov e-shopu';
450var cms_js_lang_content_leadimg_def_web_desc = 'Slogan e-shopu';
451var cms_js_lang_content_leadimg_change_header_height = 'Zmeniť výšku hlavičky';
452var cms_js_lang_content_leadimg_change_header_save = 'Uložiť výšku';
453var cms_js_lang_content_leadimg_banner_upload_notice = 'Šírku nahrávaného obrázka odporúčame mať 940px, výšku 200px.';
454
455var cms_js_lang_admin_param_group_delete_title = 'Naozaj si prajete zmazať sadu parametrov <b>{group}</b>?';
456var cms_js_lang_admin_param_group_delete_input = 'Zmazaním sady parametrov, neprídete o vytvorené parametre ani o ich hodnoty pri produktoch. Paramatre aj produkty ostanú bez priradenej sady parametrov.<br><br>Aby sa parametre znova zobrazovali je potrebné ich priradiť k novej sade paremtrov a tú nastaviť produktom.<br><br>Bude ovplyvnených:<b><br>• {XYproducts}{products}<br>• {XYparams} {params}.</b>';
457var cms_js_lang_admin_param_group_delete_sortiment = 'Touto akciou prídete aj o priradenie sortimentov. Túto sadu majú ako sortiment nastavené:<br><b>• {XYsortiments} {params}.</b>';
458
459var cms_js_lang_content_mod_discount_product_start_date = 'Začiatok akcie';
460var cms_js_lang_content_mod_discount_product_end_date = 'Ukončenie akcie';
461var cms_js_lang_content_mod_discount_product_name = 'Názov akcie';
462var cms_js_lang_content_mod_discount_product_text = 'Text (napr. "Do konca zostáva")';
463
464var cms_js_lang_system_first_login_invitation = '<div><div><h3>Ďakujeme Vám za záujem o vyskúšanie e-shop riešenia Skvelý Shop.</h3> K dispozícii máte 15 dní na bezplatné nezáväzné vyskúšanie e-shop riešenia Skvelý Shop v plnej verzii - balík PREMIUM.<br /><br />V tomto období si môžete navrhnúť Váš e-shop, jeho dizajn a napĺňať ho reálnymi dátami. Pred ukončením obdobia pre vyskúšanie si môžete zvoliť balík služieb, ktorý Vám bude najviac vyhovovať spolu so subdoménou, na ktorej bude Váš e-shop prevádzkovaný.</div><br /><div>Návrh Vášho e-shopu je automaticky ukladaný a všetky dáta sú bezpečne zachované.</div><br /><div>Odporúčame Vám pozrieť si inštruktážne videá, ktoré Vám pribl
464ížia jednoduchosť práce v systéme Skvelý Shop, nájdete ich v sekcii Video manuály v administrácii vpravo hore vedla Váš účet.</div><br/><div>V prípade akýchkolvek otázok nás neváhajte kontaktovať. Váš Skvelý Shop tím.</div><div class="cleaner">&nbsp;</div></div>';
465
466var cms_js_lang_system_first_login_invitation_boom = '<div><div><h3>Ďakujeme Vám za záujem o vyskúšanie e-shop riešenia BOOM Shop.</h3> K dispozícii máte 15 dní na bezplatné nezáväzné vyskúšanie e-shop riešenia BOOM Shop v plnej verzii - balík EXCLUSIVE.<br /><br />V tomto období si môžete navrhnúť Váš e-shop, jeho dizajn a napĺňať ho reálnymi dátami. Pred ukončením obdobia pre vyskúšanie si môžete zvoliť balík služieb, ktorý Vám bude najviac vyhovovať spolu so subdoménou, na ktorej bude Váš e-shop prevádzkovaný.</div><br /><div>Návrh Vášho e-shopu je automaticky ukladaný a všetky dáta sú bezpečne zachované.</div><br /><div>Odporúčame Vám pozrieť si inštruktážne videá, ktoré Vám priblížia jednoduchosť práce v systéme BOOM Shop, nájdete ich v sekcii Video manuály v administrácii vpravo hore vedla Váš účet.</div><br/><div>V prípade akýchkolvek otázok nás neváhajte kontaktovať. Váš BOOM Shop tím.</div><div class="cleaner">&nbsp;</div></div>';
467
468// var cms_js_lang_system_first_login_invitation_free = '<div><div><h3>Ďakujeme za objednanie e-shop riešenia Skvelý Shop.</h3> K dispozícii máte 15 dní na vyskúšanie e-shop riešenia Skvelý Shop v plnej verzii - balík PREMIUM, po skončení 15-dňovej skúšobnej prevádzky sa balík PREMIUM zmení na Vami vybraný balík %s.</div><br /><div>Návrh Vášho e-shopu je automaticky ukladaný a všetky dáta sú bezpečne zachované.</div><br /><div>Odporúčame Vám pozrieť si inštruktážne videá, ktoré Vám priblížia jednoduchosť práce v systéme Skvelý Shop, nájdete ich v sekcii Video manuály v administrácii vpravo hore vedla Váš účet.</div><br/><div>V prípade akýchkolvek otázok nás neváhajte kontaktovať. Váš Skvelý Shop tím.</div><div class="cleaner">&nbsp;</div></div>';
469var cms_js_lang_system_first_login_invitation_free = '<div><div><h3>Vážený zákazník,</h3> ďakujeme Vám za prejavený záujem o Skvelý Shop FREE a veríme, že ste s ním boli spokojný.</div><div>Tento balík sme bol našej ponuke viac ako 2 roky (čo je dlhšie ako sme plánovali) a rozhodli sme sa ho už ďalej neponúkať.</div><br /><div>Od pondelka 15.04.2013 Vám bude tento balík zmenený naspäť na Skúšobnú prevádzku s možnosťou zvolenia si niektorého z platených balíkov - MINI, PROFI a PREMIUM.</div><br/><div>Naozaj pracujeme na systéme každý deň a veríme, že našu prácu výberom plateného balíka oceníte.<br/>Napr. pri balíku MINI v cene 9 EUR / mes. ide o minimálnu položku.</div><br/><div>Ďakujeme, váš Skvelý Shop team.</div><div class="cleaner">&nbsp;</div></div>';
470
471var cms_js_lang_you_have_free_shipping = 'Máte dopravu zdarma.';
472var cms_js_lang_system_cfg_delete_payment_method = 'Naozaj chcete zmazať zvolené spôsoby pre platby?';
473var cms_js_lang_system_cfg_delete_shipping_rate = 'Naozaj chcete zmazať zvolené spôsoby dopravy?';
474var cms_js_lang_shipping_rate_duplicate_title = 'Kopírovať spôsob dopravy';
475var cms_js_lang_my_account_wrong_username_format = 'Používatelské meno musí byť vo formáte e-mailovej adresy.';
476var cms_js_lang_new_account_no_product_results = 'Neboli nájdené žiadne zakúpené produkty.';
477
478var cms_js_lang_leadimg_reset_values = 'Pôvodné nastavenie hlavičky';
479var cms_js_lang_leadimg_reset_values_confirm = 'Naozaj si prajete pôvodné nastavenie textov hlavičky (ich farba, velkosť a pozícia) ako aj pôvodný obrázok hlavičky?';
480var cms_js_lang_leadimg_jpicker_new = 'nová';
481var cms_js_lang_leadimg_jpicker_current = 'aktuálna';
482var cms_js_lang_leadimg_jpicker_drag_and_pick = 'Presuňte krúžok a tým vyberiete farbu';
483var cms_js_lang_leadimg_jpicker_more_options = 'Viac možností&nbsp;&gt;';
484var cms_js_lang_leadimg_qq_upload_button = 'Nahrať nový obrázok hlavičky';
485var cms_js_lang_leadimg_move_texts_info = 'Pozíciu textov zmeníte pretiahnutím myšou na nové miesto.';
486//var cms_js_lang_leadimg_banner_notice = 'Některé designy jsou navrženy tak, že standardně nepodporují vložení jiného obrázku do záhlaví stránek.';
487//var cms_js_lang_leadimg_banner_wrong_template = 'To se týká i tohoto designu, který máte aktuálně zvolen. V případě, že si přejete v takovém designu přesto mít vlastní obrázek, prosím kontaktujte nás, pokusíme se vám pomoci.';
488var cms_js_lang_products_edit_product_title = 'Úprava produktu';
489var cms_js_lang_cart_product_is_unsaleable_msg = 'Ľutujeme, produkt je nepredajný';
490var cms_js_lang_last_product_piece_warn = 'Čoskoro sa vypredá';
491var cms_js_lang_last_product_piece_txt1 = 'Posledný kus. Čoskoro sa vypredá! Kupuj lebo nebude!';
492var cms_js_lang_last_product_piece_txt2 = 'Posledné 2 kusy. Čoskoro sa vypredá!';
493var cms_js_lang_last_product_piece_txt3 = 'Viac ako 2 kusy';
494var cms_js_lang_cart_product_is_in_stock = 'produkt je na sklade';
495var cms_js_lang_cart_product_is_not_in_stock = 'produkt nie je na sklade';
496var cms_js_lang_cart_remove_product_qestion = 'Prajete si odstrániť produkt z nákupného košíka?';
497var cms_js_lang_content_def_category_sef_1 = 'kategoria-produktov-1';
498var cms_js_lang_content_def_category_sef_2 = 'kategoria-produktov-2';
499var cms_js_lang_content_def_category_sef_3 = 'kategoria-produktov-3';
500var cms_js_lang_content_def_category_sef_4 = 'kategoria-produktov-4';
501var cms_js_lang_users_add_user_group = 'pridať novú skupinu';
502var cms_js_lang_users_add_user_group_def_text = 'Názov skupiny';
503var cms_js_lang_users_add_user_group_fill_name = 'Vyplňte prosím názov skupiny.';
504var cms_js_lang_forbbiden_sgp_change_tooltip = 'Zmena zákazníckej skupiny nie je možná, nakoľko už existuje iný účet s rovnakou e-mailovou adresou. Zmenu zákazníckej skupiny môžete vykonať pri druhom účte zákazníka.';
505var cms_js_lang_display_on_save_empty_warning = 'Zvolte aspoň jednu stránku internetového obchodu, na ktorej si prajete modul zobrazovať.';
506var cms_js_lang_sitemap_title = 'Meta nadpis';
507var cms_js_lang_sitemap_desc = 'Meta popis stránky';
508var cms_js_lang_sitemap_kyewo = 'Meta klúčové slová';
509var cms_js_lang_SEO_meta_article = 'SEO dáta článku';
510var cms_js_lang_SEO_meta_category = 'Meta dáta kategórie';
511var cms_js_lang_SEO_meta_menu = 'SEO dáta menu položky';
512var cms_js_lang_SEO_title = 'Meta Názov';
513var cms_js_lang_SEO_desc = 'Meta Popis';
514var cms_js_lang_SEO_kwrds = 'Meta Klúčové slová';
515var cms_js_lang_SEO_save_ok = 'Zmeny metadát boli uložené.';
516var cms_js_lang_canonical_url = 'Kanonická URL';
517var js_lang_ssp_cms_order_eshop_title = 'Objednávka balíka e-shop riešenia Skvelý Shop';
518var js_lang_ssp_cms_order_eshop_title_new = 'Objednávka nového balíka e-shop riešenia Skvelý Shop';
519var js_lang_ssp_cms_order_eshop_info = '<div class="ssp_tooltip_info">Po prijatí objednávky Vás budeme kontaktovať s ďalšími inštrukciami.<br />Ďakujeme Vám za prejavenú dôveru a tešíme sa na úspešnú spoluprácu.<br />Váš Skvelý Shop tím.</div>';
520var js_lang_ssp_cms_order_eshop_email = 'Zadajte Vašu e-mailovú adresu:';
521var js_lang_ssp_cms_order_eshop_email_def_text = '[email protected]';
522var js_lang_ssp_cms_order_eshop_email_error = 'Vyplňte prosím Vašu e-mailovú adresu.';
523var js_lang_ssp_cms_order_eshop_bundle = 'Zvolte si balík:';
524var js_lang_ssp_cms_order_eshop_phone = 'Zadajte Vaše telefónne číslo:';
525var js_lang_ssp_cms_order_eshop_phone_def_text = '+421 Vaše tel.č.';
526var js_lang_ssp_cms_order_eshop_phone_error = 'Vyplňte prosím Vaše telefónne číslo.';
527var js_lang_ssp_cms_order_sent = 'Vaša objednávka e-shopu Skvelý Shop bola úspešne odoslaná.';
528var js_lang_ssp_cms_order_sent_paid1 = 'Objednávka e-shopu Skvelý Shop - balík';
529var js_lang_ssp_cms_order_sent_paid2 = 'bola úspešne odoslaná. Ďalšie inštrukcie ohladom fakturácie Vám pošleme mailom.';
530//var js_lang_ssp_order_eshop_package_date_1 = 'Už len 12 dní.';
531//var js_lang_ssp_order_eshop_package_date_2 = '15 už vypršalo dní.';
532var js_lang_ssp_order_eshop_agree_to_toc = 'Súhlasím so <a href="http://www.skvelyshop.sk/SkvelyShop_VOP.pdf" target="_blank">Všeobecnými podmienkami SkvelyShop.sk</a>';
533var js_lang_ssp_cms_order_eshop_agree_to_toc_error = 'Pred objednaním je potrebné súhlasiť so Všeobecnými podmienkami SkvelyShop.sk.';
534var js_lang_ssp_cms_order_test_eshop_valid_info = 'Do skončenia Vašej skúšobnej prevádzky %s.';
535var js_lang_ssp_cms_order_test_eshop_valid_info_days = ['zostáva neznámy počet dní', 'zostáva 1 deň', 'zostávajú 2 dni', 'zostávajú 3 dni', 'zostávajú 4 dni', 'zostáva %s dní'];
536var js_lang_ssp_cms_order_test_eshop_expired_info = 'Vaša skúšobná prevádzka vypršala.';
537var js_lang_ssp_cms_order_eshop_pricelist_info = '<div class="ssp_tooltip_info">Prehlad balíkov nájdete na stránke <a href="http://www.skvelyshop.sk/cennik/" target="_blank">Cenník</a>.<br />Subdoména je adresa Vášho e-shopu, napr. http://obchod.skvelyshop.sk</div>';
538var js_lang_ssp_cms_order_eshop_subdomain = 'Zadajte Vašu subdoménu:';
539var js_lang_ssp_cms_order_eshop_subdomain_def_text = 'Vaša subdoména';
540var js_lang_ssp_cms_order_eshop_subdomain_error_1 = 'Vyplňte prosím Vašu subdoménu.';
541var js_lang_ssp_cms_order_eshop_subdomain_error_2 = 'lutujeme, zadaná subdoména je už obsadená.';
542var js_lang_ssp_cms_settings_google_analytics_error = 'Google Analytics ID bol zadaný v nesprávnom formáte. Správny formát je UA-XXXXXXXX-1.';
543var js_lang_ssp_cms_settings_google_tools_error = 'Google Webmaster Tools meta bol zadaný v nesprávnom formáte. Mal by mať 43 znakov.';
544var js_price_from_bundle_id1 = 'Suma k úhrade';
545var js_price_from_bundle_id2 = 'EUR + DPH x 12 mes.';
546var js_import_product_data = new Object();
547    js_import_product_data[''] = '- neimportovať -';
548    js_import_product_data['name'] = 'názov produktu';
549    js_import_product_data['sku'] = 'kód produktu';
550    js_import_product_data['price_with_vat'] = 'cena s DPH';
551    js_import_product_data['price_without_vat'] = 'cena bez DPH';
552    js_import_product_data['old_price_with_vat'] = 'bežná cena s DPH';
553    js_import_product_data['old_price_without_vat'] = 'bežná cena bez DPH';
554    js_import_product_data['s_desc'] = 'krátky popis';
555    js_import_product_data['desc'] = 'popis produktu';
556  //js_import_product_data['is_unsaleable'] = 'produkt je nepredajný';
557    js_import_product_data['in_stock'] = 'na sklade [ks]';
558    js_import_product_data['weight'] = 'hmotnosť [kg]';
559    js_import_product_data['publish'] = 'zverejniť (Y/N)';
560    js_import_product_data['manufacturer'] = 'výrobca';
561	js_import_product_data['supplier'] = 'dodávateľ';
562  //  js_import_product_data['plength'] = 'length';
563  //  js_import_product_data['width'] = 'width';
564  //  js_import_product_data['height'] = 'height';
565    js_import_product_data['primary_img'] = 'hlavný obrázok';
566    js_import_product_data['secondary_img'] = 'ďalšie obrázky';
567    js_import_product_data['secondary_img_desc'] = 'popisy ďalších obrázkov';
568    js_import_product_data['external_active_url'] = 'Vedlajší obrázok URL';
569    js_import_product_data['category'] = 'kategória';
570    js_import_product_data['category_id'] = 'ID kategórie';
571    js_import_product_data['product_relations'] = 'príbuzné produkty';
572
573	js_import_product_data['product_relations_1'] = 'príbuzné produkty - príslušenstvo';
574	js_import_product_data['product_relations_2'] = 'príbuzné produkty - doplnky';
575	js_import_product_data['product_relations_3'] = 'príbuzné produkty - súvisiace produkty';
576
577	js_import_product_data['seo_page_name'] = 'SEO: Názov stránky';
578	js_import_product_data['seo_meta_description_for_this_page'] = 'SEO: Meta popis';
579	//js_import_product_data['seo_h1_element'] = 'SEO: H1 element';
580	js_import_product_data['seo_meta_keywords_for_this_page'] = 'SEO: Meta klúčové slová';
581	js_import_product_data['permanently_unavailable'] = 'Trvalo nedostupný produkt (Y/N)';
582	js_import_product_data['ship_code_id'] = 'Zobraziť na doménach';
583	js_import_product_data['primary_category_id'] = 'Primárna kategória (ID)';
584	js_import_product_data['product_is_unsaleable'] = 'Nepredajný produkt';
585	js_import_product_data['shopper_group_visibility'] = 'Zobraziť pre zákaznícke skupiny';
586	js_import_product_data['bazar'] = 'Bazarová položka';
587	js_import_product_data['priceportal_productname'] = 'Názov produktu pre cenové portály';
588	js_import_product_data['priceportal_productname_cz'] = 'Názov produktu pre cenové portály[cz]';
589	//js_import_product_data['country_code'] = 'Kód krajiny';
590	js_import_product_data.heureka_category_sk = 'heureka kategória - sk';
591	js_import_product_data.heureka_category_cz = 'heureka kategória - cz';
592	js_import_product_data['pack_set'] = 'Set produktov';
593
594
595var js_import_product_data_no_vat = new Object();
596    js_import_product_data_no_vat[''] = '- neimportovať -';
597    js_import_product_data_no_vat['name'] = 'názov produktu';
598    js_import_product_data_no_vat['sku'] = 'kód produktu';
599    // js_import_product_data_no_vat['price_with_vat'] = 'cena s DPH';
600    js_import_product_data_no_vat['price_without_vat'] = 'cena';
601    // js_import_product_data_no_vat['old_price_with_vat'] = 'bežná cena s DPH';
602    js_import_product_data_no_vat['old_price_without_vat'] = 'bežná cena';
603    js_import_product_data_no_vat['s_desc'] = 'krátky popis';
604    js_import_product_data_no_vat['desc'] = 'popis produktu';
605  //  js_import_product_data_no_vat['is_unsaleable'] = 'produkt je nepredajný';
606    js_import_product_data_no_vat['in_stock'] = 'na sklade [ks]';
607    js_import_product_data_no_vat['weight'] = 'hmotnosť [kg]';
608    js_import_product_data_no_vat['publish'] = 'zverejniť (Y/N)';
609    js_import_product_data_no_vat['manufacturer'] = 'výrobca';
610  //  js_import_product_data_no_vat['plength'] = 'length';
611  //  js_import_product_data_no_vat['width'] = 'width';
612  //  js_import_product_data_no_vat['height'] = 'height';
613    js_import_product_data_no_vat['primary_img'] = 'hlavný obrázok';
614    js_import_product_data_no_vat['secondary_img'] = 'ďalšie obrázky';
615    js_import_product_data_no_vat['secondary_img_desc'] = 'popisy ďalších obrázkov';
616    js_import_product_data_no_vat['external_active_url'] = 'Vedlajší obrázok URL';
617    js_import_product_data_no_vat['category'] = 'kategória';
618    js_import_product_data_no_vat['category_id'] = 'ID kategórie';
619    js_import_product_data_no_vat['product_relations'] = 'príbuzné produkty';
620
621	js_import_product_data_no_vat['product_relations_1'] = 'príbuzné produkty - príslušenstvo';
622	js_import_product_data_no_vat['product_relations_2'] = 'príbuzné produkty - doplnky';
623	js_import_product_data_no_vat['product_relations_3'] = 'príbuzné produkty - súvisiace produkty';
624
625	js_import_product_data_no_vat['seo_page_name'] = 'SEO: Názov stránky';
626	js_import_product_data_no_vat['seo_meta_description_for_this_page'] = 'SEO: Meta popis';
627	//js_import_product_data_no_vat['seo_h1_element'] = 'SEO: H1 element';
628	js_import_product_data_no_vat['seo_meta_keywords_for_this_page'] = 'SEO: Meta klúčové slová';
629	js_import_product_data_no_vat['permanently_unavailable'] = 'Trvalo 
629nedostupný produkt (Y/N)';
630	js_import_product_data_no_vat['ship_code_id'] = 'Zobraziť na doménach';
631	js_import_product_data_no_vat['product_is_unsaleable'] = 'Nepredajný produkt';
632	js_import_product_data_no_vat['shopper_group_visibility'] = 'Zobraziť pre zákaznícke skupiny';
633	js_import_product_data_no_vat['bazar'] = 'Bazarová položka';
634	js_import_product_data_no_vat['priceportal_productname'] = 'Názov produktu pre cenové portály';
635	js_import_product_data_no_vat.heureka_category_sk = 'heureka kategória - sk';
636	js_import_product_data_no_vat.heureka_category_cz = 'heureka kategória - cz';
637
638var js_import_heureka_data_options = {};
639	js_import_heureka_data_options[''] = '- neimportovať -';
640	js_import_heureka_data_options.sku = 'kód produktu';
641	js_import_heureka_data_options.id = 'id produktu';
642	js_import_heureka_data_options.main_img = 'Heureka.sk URL - Import 1 hlavného obrázka produktu';
643	js_import_heureka_data_options.all_img = 'Heureka.sk URL - Import všetkých obrázkov produktu';
644
645var js_import_product_data_import_title = 'Štandardný import produktov do internetového obchodu';
646var js_import_heureka_data_import_title = 'Import Heureka.sk dát produktov do internetového obchodu';
647var js_import_heureka_data_import_status = 'Import súboru %s1 bol spustený. Po dokončení budete informovaný e-mailom na adresu:';
648var js_import_heureka_data_estimated_time = {};
649	js_import_heureka_data_estimated_time[0] = 'Odhadovaný čas dokončenia: ';
650	js_import_heureka_data_estimated_time[1] = 'Menej ako minúta';
651	js_import_heureka_data_estimated_time[2] = ' minúta';
652	js_import_heureka_data_estimated_time[3] = ' minúty';
653	js_import_heureka_data_estimated_time[4] = ' minút';
654	js_import_heureka_data_estimated_time[5] = 'približne ';
655
656
657var js_import_gui_login = 'Prihlasovacie meno';
658var js_import_gui_pass = 'Heslo';
659var js_import_gui_url_to_login_form = 'Link na prihlasovací formulár';
660var js_import_gui_send = 'Odoslať';
661var js_import_gui_products = 'Produkty';
662var js_import_gui_categories = 'Kategórie';
663var js_import_gui_users = 'Zákazníci';
664var js_import_gui_orders = 'Objednávky';
665var js_import_gui_found_notice = 'Vyberte ktoré údaje máte záujem importovať. (Číslo v zátvorke udáva počet nájdených položiek.)';
666var js_import_gui_welcome_notice = 'Import údajov';
667var js_import_product_main_link_text = 'Import produktov';
668var js_import_product_data_type = new Array();
669    js_import_product_data_type[1] = 'Ak je začiarknuté, naimportujú sa z CSV súboru nové produkty, t.j. ktoré v zozname produktov ešte neexistujú. Ak odčiarknete, nové produkty sa nebudú importovať.';
670    js_import_product_data_type[2] = 'Ak je začiarknuté, upravia sa z produkty, t.j. ktoré v sú aj v e-shope aj v CSV. Ak odčiarknete, nebudú sa upravovať.';
671    js_import_product_data_type[3] = 'Ak je začiarknuté, tie produkty, ktoré sú v eshope, ale nie sú v importovacom CSV sa "zneverejnia". Ak odčiarknete, budú ignorované.';
672var js_import_product_data_import_type = new Array();
673    js_import_product_data_import_type[0] = 'chcem <strong>pridať produkty</strong> (prvý import, resp. pridanie nových produktov k už existujúcim)';
674    js_import_product_data_import_type[1] = 'chcem <strong>aktualizovať existujúce</strong> produkty (upravia sa vybrané položky už existujúcich produktov, napr. ceny)';
675var js_import_by_ean_import_type = new Array();
676    js_import_by_ean_import_type[0] = 'Párovať produkty podla kódu produktu';
677    js_import_by_ean_import_type[1] = 'Párovať produkty podla EAN (pole "kód produktu" nie je dostupné)';
678var js_import_product_choose_tax = 'Vyberte DPH';
679var js_import_product_only_one_tax = 'K produktu bude pridaná DPH';
680var js_import_product_choose_category = 'Vyberte kategóriu';
681var js_import_product_choose_start_import = 'Spustiť import';
682var js_import_product_ignore_first_row = 'Neimportovať prvý riadok';
683var js_import_product_no_category_notice = 'Všetky novopridávané produkty budu naimportované tak, ze nebudú priradené do žiadnej kategórie (na stránke Produkty ich zobrazíte tak, ze si zvolíte zobraziť produkty - bez priradenie kategórie - )';
684var js_import_product_choose_csv_separator = 'Zmeniť oddelovač CSV';
685var js_import_product_choose_csv_encoding = 'Zmeniť kódovanie';
686var js_import_product_reload_csv_from_server = 'Znovu načítať csv súbor';
687var js_import_product_show_column_error = 'Skryť môžete iba stĺpec s dátami, 
687ktoré si neprajete importovať.';
688var js_import_product_show_full_file = 'Zobraziť celý súbor?';
689var js_import_product_cancel = 'Naozaj si prajete zrušit import tohto súboru?';
690var js_import_product_import_is_ok = 'Import je v poriadku';
691var js_import_product_revert_last_import = 'Zrušiť import a vrátiť dáta späť';
692var js_import_product_revert_last_import_intro = new Array();
693    js_import_product_revert_last_import_intro[0] = 'Inštrukcie';
694    js_import_product_revert_last_import_intro[1] = 'Všetky novopridávané produkty sú naimportované tak, že sú priradené do žiadnej kategórie (v záložke PRODUKTY ich zobrazíte tak, že si v hornom filtri zvolíte zobraziť produkty "- bez priradenej kategórie -", t.j. vo filtri si zmeníte "všetkých kategórií" na "bez priradenej kategórie"). Následne si novopridané produkty môžete pridať do kategórií.';
695    js_import_product_revert_last_import_intro[2] = 'Prejsť k úprave nových importovaných produktov';
696    js_import_product_revert_last_import_intro[3] = 'Následne po finálnej úprave a zaradení novopridaných produktov do kategórií si ich označte ako zverejnené kliknutím na cervený krúžok celkom vpravo pre ten, ktorý produkt.';
697    js_import_product_revert_last_import_intro[4] = 'Po kontrole či import súboru %s1 dňa %s2 prebehol v poriadku, prosím potvrďte:';
698    js_import_product_revert_last_import_intro[5] = 'Všetky aktualizované produkty sú zobrazené v záložke PRODUKTY.';
699    js_import_product_revert_last_import_intro[6] = 'tlacidlom sa dostane do zalozky produkty s filtrom nastavenym na zobrazenie vsetkych kategorii';
700    js_import_product_revert_last_import_intro[7] = 'Všetky aktualizované produkty, ktoré sú zaradené v kategóriach sú zobrazené v záložke PRODUKTY. Všetky aktualizované produkty, ktoré ešte nie sú zaradené v kategóriach sú zobrazené v záložke PRODUKTY v "- bez priradenej kategórie -".';
701    js_import_product_revert_last_import_intro[8] = 'Prejsť do záložky PRODUKTY';
702    js_import_product_revert_last_import_intro[9] = 'Prejsť do "- bez priradenej kategórie -" v záložke PRODUKTY';
703var js_import_product_revert_last_import_comment_1 = 'Pozn.: Ak potvrdíte import, dáta už nebude možné vrátiť späť. Importované produkty však stále môžete hromadne vymazať a pokračovať odznova.';
704var js_import_product_revert_last_import_comment_2 = 'Ak dáta vrátite späť, produkty budete mať v rovnakom stave, aký bol pred importom.';
705var js_import_product_revert_last_import_comment_5 = 'Naozaj ste si istý? Počet dní od importu: ';
706var js_import_product_revert_last_import_comment_6 = 'Prosím zadajte číslo ';
707var js_import_product_revert_last_import_comment_7 = ' (počet dní od importu):';
708var js_import_product_revert_last_import_comment_8 = {
709	'1':	'deň',
710	'2-4':	'dni',
711	'5':	'dní',
712	'at':	' o ',
713	'hour':	' hod.'
714};
715var js_import_product_revert_last_import_confirm = 'POZOR!!\n\nAk iní administrátori vykonávali manuálne úpravy produktov (akýchkoľvek) od posledného nepotvrdeného importu, všetky ich úpravy budú vrátením importu stratené.<br /><br />Naozaj si prajete vrátiť úplne všetky dáta produktov do pôvodného stavu pred importom z';
716var js_import_product_revert_last_import_done = 'Stav produktov a ich obrazkov bol obnovený zo zálohy %s, ktorá bola vytvorená pred vykonaním importu.'
717var js_import_product_main_import_status_report = new Array();
718    js_import_product_main_import_status_report[0] = 'Import súboru %s1 bol %s2 úspešne spracovaný';
719    js_import_product_main_import_status_report[1] = 'Počet <strong>záznamov</strong> v importovanom súbore';
720    js_import_product_main_import_status_report[2] = 'Počet produktov v e-shope <strong>po importe</strong>';
721    js_import_product_main_import_status_report[3] = 'Počet <strong>zmenených produktov</strong> v e-shope';
722    js_import_product_main_import_status_report[4] = 'Počet <strong>nezmenených produktov</strong> v e-shope';
723    js_import_product_main_import_status_report[5] = 'Počet <strong>nadbytočných zneverejnených produktov</strong> v e-shope';
724    js_import_product_main_import_status_report[6] = 'Počet <strong>duplicitných riadkov</strong> v importovanom súbore';
725    js_import_product_main_import_status_report[7] = 'Počet <strong>nových produktov</strong> pridaných do e-shopu';
726var js_import_product_help_text_main = new Array();
727    js_import_product_help_text_main[0] = 'Poznámky';
728    js_import_product_help_text_main[1] = 'Položka "krátky popis" môže obsahovať len 255 znakov, všetky znaky naviac nebudú importované.';
729    js_import_product_help_text_main[2] = 'Nevyplnený (prázdny) údaj v položke záznamu sa neimportuje, číselná hodnota "0" sa importuje ako "0".';
730    js_import_product_help_text_main[3] = 'V prípade, ak existuje rovnaký kód produktu vo viacerých záznamoch, pri prvom importe sa importuje len prvý záznam s rovnakým kódom produktu, v prípade aktualizácie existujúceho produktu sa importujú údaje vybraných položiek tak ako sú uvedené v poslednom zázname s rovnakým kódom produktu.';
731    js_import_product_help_text_main[4] = 'Ak sa súbežne importujú položky "cena/bežná cena bez DPH" a "cena/bežná cena s DPH", pre potreby importu sa vychádza len z položky "cena/bežná cena bez DPH", z ktorej sa vypočíta hodnota aj pre položku "cena/bežná cena s DPH.';
732    js_import_product_help_text_main[5] = 'Ak importujete položku kde je stav "ano-nie" (napr. zverejniť produkt), ako "áno" sa chápu tieto zadané hodnoty: "1, y, Y, ano, áno, Ano, Áno".';
733var js_import_product_help_text_intro = new Array();
734    js_import_product_help_text_intro[0] = 'Inštrukcie';
735    js_import_product_help_text_intro[1] = 'Pred nahratím CSV súboru si prosím pozrite návod, ako importovať dáta, obrázky a kategórie produktov.';
736    js_import_product_help_text_intro[2] = 'Tiež si stiahnite a pozrite vzorový CSV súbor';
737    js_import_product_help_text_intro[3] = 'Pre potreby importu sa zatial bez úprav nedá použiť CSV súbor získaný exportom produktov.';
738    js_import_product_help_text_intro[4] = 'V prípade otázok alebo nefunkčnosti importu nám napíšte e-mail, radi Vám pomôžeme.';
739    js_import_product_help_text_intro[5] = 'Návod k Importu produktov nájdete v sekcii Pomoc.';
740    js_import_product_help_text_intro[6] = 'Produkty_Import.csv';
741
742var js_import_product_eu_taxrates_group_info = 'Pre import sadzby DPH EU krajiny a kódu krajiny nie je možné importovať ostatné dáta';
743
744var cms_js_lang_shopper_group_edit_success = 'Skupina bola upravená.';
745var cms_js_lang_shopper_group_edit_fail = 'Nepodarilo sa upraviť skupinu.';
746var cms_js_lang_shopper_group_duplicity = 'Zadaná skupina už existuje.';
747var cms_js_lang_shopper_group_deleted = 'Skupina bola zmazaná.';
748var cms_js_lang_shopper_group_name = 'Názov skupiny';
749var cms_js_lang_shopper_group_insert_fail = 'Nepodarilo sa pridať novú skupinu.';
750var cms_js_lang_shopper_group_delete_message_6 = 'Naozaj chcete vymazať túto skupinu?';
751var cms_js_lang_shopper_group_delete_message_0 = 'Skupinu nie je možné zmazať pretože sa používa - v cenách produktov, v zákazníkoch, v spôsoboch platieb, alebo v spôsoboch dodania.';
752var cms_js_lang_users_add_user_group_def_text2 = 'Zlava';
753var cms_js_lang_shopper_group_input_value_margin = 'Marža';
754var cms_js_lang_users_add_user_group_fill_discount_correctly = 'Celoplošná zlava pre skupinu zákazníkov je nepovinný údaj a môže byť zadaný ako číselná hodnota, vyjadrujúca percentuálnu zlavu.';
755var cms_js_lang_shopper_group_delete_message_5 = 'Základnú zákaznícku skupinu nie je možné zmazať.';
756var cms_js_lang_shopper_group_discount_tip = 'Celoplošná zlava pre prihlásených zákazníkov patriacich do tejto zákazníckej skupiny.<br />Zlava bude aplikovaná a zobrazovaná pre všetky produkty bez výnimky.';
757var cms_js_lang_cfg_product_attrib_products_text = 'produktov';
758var cms_js_lang_cfg_product_attrib_1_product_text = 'produktu';
759var cms_js_lang_cfg_product_new_attrib_def_text = 'Názov atribútu';
760var cms_js_lang_cfg_product_new_attrib_name_error = 'Vyplňte prosím názov atribútu.';
761var cms_js_lang_cfg_product_new_attrib_name_exists = 'Atribút so zadaným názvom už existuje.';
762var cms_js_lang_cfg_product_attrib_name_delete_confirm = 'Naozaj chcete zmazať atribút %s?';
763var cms_js_lang_cfg_product_attrib_name_delete_error = 'Pred zmazaním atribútu %s je potrebné zmazať všetky jeho hodnoty.';
764var cms_js_lang_cfg_product_attrib_value_delete_confirm = 'Naozaj chcete zmazať atribútu hodnotu %s?';
765var cms_js_lang_cfg_product_attrib_value_delete_confirm_2 = 'Naozaj chcete zmazať atribútu hodnotu %s1? Táto hodnota bude odstránená z atribútov %s2.';
766var cms_js_lang_cfg_product_new_attrib_value_def_text = 'Hodnota atribútu';
767var cms_js_lang_cfg_product_new_attrib_value_error = 'Vyplňte prosím hodnotu atribútu.';
768var cms_js_lang_cfg_product_new_attrib_value_error_2 = 'Zadaná hodnota pre atribút %s už existuje.';
769var cms_js_lang_product_attrib_price_help_info = 'Úprava ceny produtku podla jednotlivých atribútov:<br/>zadané &quot;+&quot;
769 pred čiastkou znamená: Zvýšiť cenu produktu o uvedenú čiastku.<br/>zadané &quot;-&quot; pred čiastkou znamená: Znížiť cenu produktu o uvedenú čiastku.<br/>bez zadanej hodnoty znamená: Cena sa nemení.';
770var cms_js_lang_system_cfg_delete_coupons = 'Naozaj chcete archivovať zvolené kupóny?';
771var cms_js_lang_system_cfg_delete_coupons_alert = 'Tento kupón je odpočitateľný.';
772var cms_js_lang_system_cfg_delete_coupons_alert2 = 'Naozaj chcete archivovať tento kupón?';
773var cms_js_lang_system_cfg_delete_order_state = 'Naozaj chcete zmazať zvolené stavy objednávky?';
774var cms_js_lang_system_cfg_delete_order_state_delete_notif_default_status = 'Tento stav objednávky je potrebný pre funkčnosť systému, preto nemôže byť zmazaný.';
775var cms_js_lang_system_cfg_delete_order_state_delete_notif_has_orders = 'Tento stav používa niektorá z objednávok a preto ho nie je možné zmazať.';
776var cms_js_lang_system_cfg_order_state_name_max_length_alert = 'Žial už nie je možné vpísať viac znakov, pretože bola dosiahnutá max. dĺžka názvu (40 znakov).';
777var cms_js_lang_system_cfg_delete_countries = 'Naozaj chcete zmazať zvolené štáty?';
778var cms_js_lang_content_header_custom_image_info = 'Niektoré dizajny sú navrhnuté tak, že nepodporujú vloženie obrázku do hlavičky stránok.';
779var cms_js_lang_content_header_custom_image_upload_stop = 'Dizajn %s, ktorý máte aktuálne zvolený, nepodporuje vloženie obrázku do hlavičky stránok.';
780var cms_js_lang_content_header_custom_image_not_supported_info = 'To sa týka aj dizajnu %s, ktorý máte aktuálne zvolený. V prípade, že si prajete v takomto dizajne aj napriek tomu mať vlastný obrázok, prosím kontaktujte nás, pokúsime sa vám pomôcť.';
781var cms_js_lang_content_header_custom_image_is_supported_info = 'To sa však netýka dizajnu %s1, ktorý máte aktuálne zvolený (tento dizajn umožňuje obrázok v hlavičke do výšky obrázka %s2px).';
782var cms_adminlang_mod_fullmenu_swe_mediamanag = 'Správa súborov';
783
784var cms_js_lang_order_status = 'Stav objednávky';
785var cms_js_lang_delivery_date = 'Termín dodania';
786var cms_js_lang_error_found = 'Vyskytla sa chyba!';
787
788
789
790var cms_js_lang_product_availability_preffered_value_info = "Pri nastavení dodacej lehoty variantu bude ako <br />hlavná dodacia lehota produktu použitá najskoršia dodacia lehota <br />zo všetkých variantov dostupných skladom.";
791var cms_js_lang_news = 'Novinky';
792var cms_js_lang_result_for_searching = 'výsledky vyhladávania pre';
793var cms_js_lang_all_apps = 'Všetky aplikácie';
794var cms_js_lang_appstore_searching_found = 'Výsledky vyhladávania pre';
795var cms_js_lang_appstore_searching_notfound = 'Zadaným kritériam nezodpovedá žiadny záznam';
796var cms_js_lang_appstore_special_tag_add = 'Pridať štítok';
797var cms_js_lang_appstore_special_tag_edit = 'Upraviť štítok';
798var cms_js_lang_appstore_special_tag_window = 'Správa štítkov';
799var cms_js_lang_appstore_special_tag_remove_question = 'Naozaj si prajete zmazať tento štítok?';
800var cms_js_lang_appstore_special_tag_remove_success = 'Štítok bol úspešne zmazaný.';
801var cms_js_lang_appstore_special_tag_save_add = 'Štítok bol úspešne vytvorený.';
802var cms_js_lang_appstore_special_tag_save_edit = 'Štítok bol úspešne upravený.';
803
804
805var cms_js_lang_shopper_list_group = 'Skupina';
806var cms_js_lang_product_form_price_net_label = 'bez DPH';
807var cms_js_lang_product_form_price_gross_label = 's DPH';
808var cms_js_lang_product_discount_price_label = 'cena po %s% zlave:';
809var cms_js_lang_product_discount_price_label_tooltip = 'Výsledná cena pre danú zákaznícku skupinu po uplatnení celoplošnej zlavy %s%.';
810var cms_js_lang_product_form_price_agreement = 'špecifická pre e-shop';
811var cms_js_lang_product_form_price_free = 'zdarma';
812var cms_js_lang_price_form_mnu = 'Pridať ďalšiu cenu';
813var cms_js_lang_other_prices_label = 'Ďalšie ceny';
814var cms_js_lang_select_shopper_group = '- vyberte skupinu -';
815var cms_js_lang_product_attrib_select = '- vyberte atribút -';
816var cms_js_lang_product_attrib_value_select = '- vyberte položku atribútu -';
817//var cms_js_lang_product_attrib_value_error = 'Pred pridaním položky je potrebné najskôr vybrať atribút.';
818var cms_js_lang_other_prices_for_shopper_group_label = 'Cena pre:';
819var cms_js_lang_product_add_comb_name_error = 'Vyberte prosím atribút.';
820var cms_js_lang_product_add_comb_value_error = 'Vyberte prosím položku atribútu.';
821var cms_js_lang_product_attrib_comb_add = 'Pridať variant';
822var cms_js_lang_product_attrib_comb_add2 = 'Pridať kombináciu variantov';
823var cms_js_lang_product_attrib_comb_generate = 'Generuj kombinácie';
824var cms_js_lang_product_attrib_comb_generate_save = 'Ulož kombinácie';
825var cms_js_lang_product_attrib_comb_attrib_count_less = 'Pre vytváranie kombinácií atribútov je nutné mať vytvorené aspoň 2 atribúty. Prajete si preto prejsť do správy atribútov?';
826var cms_js_lang_product_attrib_price_without_vat = 'Cena bez DPH:';
827var cms_js_lang_product_attrib_price_with_vat = 'Cena s DPH:';
828var cms_js_lang_product_attrib_sku = 'Kód:';
829var cms_js_lang_product_attrib_in_stock = 'Skladom:';
830var cms_js_lang_product_attrib_in_supplier_stock = 'Dod. skladom:';
831var cms_js_lang_these_products_were_returned_to_stock = 'Nasledujúce produkty boli vrátene na sklad';
832var cms_js_lang_product_attrib_confirm = 'Naozaj si prajete odstrániť variant: \n   "%var"\n z produktu "%prod"?';
833var cms_js_lang_overview_test_package_over_2_days_info = '';
834cms_js_lang_overview_test_package_over_2_days_info += '<div id="admin_test_package_over_2_days_info">';
835//cms_js_lang_overview_test_package_over_2_days_info += '<h3>Zaujímavé informácie</h3>';
836cms_js_lang_overview_test_package_over_2_days_info += '<fieldset style="margin-bottom: 20px">';
837cms_js_lang_overview_test_package_over_2_days_info += '<legend><b>1. Snažíme sa pomôcť v začiatkoch</b></legend>';
838//cms_js_lang_overview_test_package_over_2_days_info += '<div class="admin_over_2_days_title">1. Snažíme sa pomôcť v začiatkoch</div>';
839cms_js_lang_overview_test_package_over_2_days_info += '<div>Pre začínajúcich majitelov e-shopov sme pripravili špeciálnu akciu: možnosť objednania balíka MINI alebo PROFI na obdobie 6 mes. - <a href="http://www.skvelyshop.sk/cennik/#az" target="_blank" class="admin_over_2_days_link">viac informácií</a>.</div>';
840cms_js_lang_overview_test_package_over_2_days_info += '</fieldset>';
841//cms_js_lang_overview_test_package_over_2_days_info += '<div class="admin_over_2_days_hr"><!-- --></div>';
842cms_js_lang_overview_test_package_over_2_days_info += '<fieldset style="margin-bottom: 20px">';
843cms_js_lang_overview_test_package_over_2_days_info += '<legend><b>2. Najrýchlejšie vyvíjaný systém</b></legend>';
844//cms_js_lang_overview_test_package_over_2_days_info += '<div class="admin_over_2_days_title">2. Najrýchlejšie vyvíjaný systém</div>';
845cms_js_lang_overview_test_package_over_2_days_info += '<div>Za posledný mesiac sme naprogramovali množstvo žiadaných funkcií,<br/>tento mesiac plánujeme ďalšie. Ich prehlad nájdete na stránke <a href="http://www.facebook.com/SkvelyShop.sk" class="admin_over_2_days_link" target="_blank">Novinky systému</a>.</div>';
846cms_js_lang_overview_test_package_over_2_days_info += '</fieldset>';
847//cms_js_lang_overview_test_package_over_2_days_info += '<div class="admin_over_2_days_hr"><!-- --></div>';
848cms_js_lang_overview_test_package_over_2_days_info += '<fieldset style="margin-bottom: 20px">';
849cms_js_lang_overview_test_package_over_2_days_info += '<legend><b>3. Počúvame našich klientov</b></legend>';
850//cms_js_lang_overview_test_package_over_2_days_info += '<div class="admin_over_2_days_title">3. Počúvame našich klientov</div>';
851cms_js_lang_overview_test_package_over_2_days_info += '<div class="admin_over_2_days_msg_container">Ak Vám chýba nejaká funkcia alebo máte akékolvek otázky, napíšte nám:<div class="admin_over_2_days_msg_panel"><div style="position:absolute;right:100px;bottom:14px;"><div class="save-icon-container"><a href="#" onclick="return js_admin_test_package_over_2_days_msg_send_click(this);" class="vex-dialog-button vex-dialog-button-primary">'+cms_js_lang_products_group_8+'</a></div></div><textarea name="user_message_text" cols="" rows="" class="admin_over_2_days_msg" style="width: 100%"></textarea></div></div>';
852cms_js_lang_overview_test_package_over_2_days_info += '</fieldset>';
853cms_js_lang_overview_test_package_over_2_days_info += '<div class="admin_over_2_days_input_panel"><input type="checkbox" name="do_not_show_again" value="1" id="admin_test_package_over_2_days_do_not_show"/> <label class="ssp_tooltip_info" for="admin_test_package_over_2_days_do_not_show"><b>túto správu už viac nezobrazovať</b></label></div><div class="cleaner">&nbsp;</div>';
854cms_js_lang_overview_test_package_over_2_days_info += '</div>';
855var cms_js_lang_overview_test_package_over_2_days_send_error = 'Vyplňte prosím text správy.';
856var cms_js_lang_overview_test_package_over_2_days_sent = '<em>Vaša správa bola úspešne odoslaná. Ďakujeme.</em>';
857var cms_js_lang_product_detail_in_stock_label = 'Na sklade';
858var cms_js_lang_product_price_net = 'Cena produktu';
859var cms_js_lang_cfg_vat_payer_to_non_payer_info = 'Pri zmene spoločnosti z platcu DPH na neplatcu DPH je treba určiť ako sa prepočítajú ceny produktov a ceny za dopravu.<br/><br/>Pre ceny u neplatcu DPH sa použijú:';
860var cms_js_lang_cfg_vat_payer_to_non_payer_with_vat = 'existujúce ceny s DPH ';
861var cms_js_lang_cfg_vat_payer_to_non_payer_without_vat = 'existujúce ceny bez DPH ';
862var cms_js_lang_cfg_non_vat_payer_to_payer_info = 'Pri zmene spoločnosti z neplatcu DPH na platcu DPH je treba určiť ako sa prepočítajú ceny produktov a ceny za dopravu.<br/><br/>Ceny u neplatcu DPH sa zmenia na:';
863
864var cms_js_lang_ai_generator_confirm_modal = {
865	title: 'Prepísať existujúci obsah?',
866	content: 'Pole už obsahuje text. Vygenerovaný návrh ho prepíše. Táto akcia sa nedá vrátiť späť.',
867	close: 'Zrušiť',
868	apply: 'Prepísať'
869};
870
871var cms_js_lang_cfg_non_vat_payer_to_payer_with_vat = 'ceny s DPH';
872var cms_js_lang_cfg_non_vat_payer_to_payer_without_vat = 'ceny bez DPH';
873var js_lang_admin_manage_users_switch = new Array();
874    js_lang_admin_manage_users_switch['main'] = new Array();
875    js_lang_admin_manage_users_switch['main'][0] = 'Správa administrátorov';
876    js_lang_admin_manage_users_switch['main'][1] = 'Správa zákazníkov';
877    js_lang_admin_manage_users_switch['add_new'] = new Array();
878    js_lang_admin_manage_users_switch['add_new'][0] = 'Pridať zákazníka';
879    js_lang_admin_manage_users_switch['add_new'][1] = 'Pridať administrátora';
880var cms_js_lang_content_editing_content_sef_update_info = 'Aktualizujem&hellip;';
881var cms_js_lang_content_editing_content_sef_error = 'Vyplňte prosím čitatelnú URL adresu.';
882var cms_js_lang_content_editing_content_sef_error_2 = 'Vyplnená čitatelná URL adresa sa už používa. Zadajte prosím inú.';
883var cms_js_lang_content_editing_content_sef_error_3 = 'Zadali ste duplicitné URL adresy.';
884var cms_js_lang_content_editing_content_sef_error_empty_1 = 'Chýbajúca URL adresa';
885var cms_js_lang_content_editing_content_sef_error_empty_2 = 'Nie je vyplnená čitateľná URL adresa. Prosím doplňte.';
886var cms_js_lang_content_menu_item_type_url_error = 'Zadajte prosím aktuálne existujúcu URL adresu z Vašich web stránok.';
887var cms_js_lang_product_list_manual_order_notice = 'Pre možnosť produkty v kategórii manuálne zoradiť, bude zmenené zobrazenie podla manuálneho poradia.';
888var cms_js_lang_content_menu_item_type_content_tooltip = 'Vytvorí sa nová stránka (položka menu), kde si môžete pridať články a/alebo ďalšie moduly.';
889var cms_js_lang_content_menu_item_type_url_tooltip = 'Vytvorí sa odkaz (URL odkaz) na článok alebo stránku (položku menu).';
890
891var cms_js_lang_access_restricted_order_detail = 'Nemáte oprávnenie zobraziť detail objednávky.';
892
893var cms_js_lang_add_comment_your_name_error = 'Vyplňte prosím Vaše meno.';
894var cms_js_lang_add_comment_your_email_error = 'Vyplňte prosím Váš e-mail.';
895var cms_js_lang_edit_comment_date_error = 'Zadaný dátum je v zlom formáte. Správny formát je dd.mm.yyyy hh:mm';
896var cms_js_lang_add_comment_body_error = 'Vyplňte prosím text komentáru.';
897var cms_js_lang_add_comment_captcha_error = 'Chybný overovací kód.';
898var cms_js_lang_delete_comment_confirm = 'Naozaj chcete zmazať tento komentár?';
899var cms_js_lang_delete_comment_error = 'Nemáte oprávnenie zmazať tento komentár.';
900var cms_js_lang_edit_comment_error = 'Nemáte oprávnenie upraviť tento komentár.';
901var cms_js_lang_edit_comment_time_left = 'Na úpravu komentára zostáva <span class="time_left">%s</span>';
902var cms_js_lang_edit_commnet_minute = 'minúta';
903var cms_js_lang_edit_commnet_minutes = 'minúty';
904var cms_js_lang_edit_commnet_minutes2 = 'minút';
905var cms_js_lang_reply_to_comment_opened_error = 'Pre pridanie reakcie na tento komentár je nutné ukončiť už otvorenú reakciu na iný komentár.';
906var cms_js_lang_add_comment_rating_error = 'Vyberte prosím hodnotenie';
907var cms_js_lang_add_comment_success = 'Váš komentár bol úspešne odoslaný';
908var cms_js_lang_add_review_success = 'Vaša recenzia bola úspešne pridaná';
909
910var cms_js_lang_poll_title_error = 'Vyplňte názov ankety.';
911var cms_js_lang_poll_options_error = 'Treba zadať aspoň 2 možnosti.';
912
913var cms_js_lang_request_timeout_error_title = 'Chyba vášho pripojenia';
914var cms_js_lang_request_timeout_error = 'Váš prehliadač neodoslal všetky potrebné dáta vyžadované pre túto akciu.<br>Prosím zopakujte akciu znovu.';
915
916var cms_js_lang_lm_delete_subsc_group = ' užívatel/ov má nastavenú túto skupinu. Chcete ju napriek tomu zmazať?';
917var cms_js_lang_lm_fill_all_fields = 'Prosím vyplňte všetky polia.';
918var cms_js_lang_lm_wrong_email = 'Nesprávny formát e-mail adresy.';
919var cms_js_lang_lm_invalid_dns_email = 'E-mail adresa nie je platná - nefunkčná doména:';
920var cms_js_lang_lm_wrong_smtp_connection_host = 'Nesprávny server pre SMTP.';
921var cms_js_lang_lm_wrong_smtp_connection_login = 'Nesprávne užívatelské meno alebo heslo pre SMTP.';
922var cms_js_lang_lm_wrong_smtp_connection_data = 'Nesprávne údaje pre SMTP';
923var cms_js_lang_lm_wrong_smtp_connection_title = 'Nesprávne SMTP údaje';
924var cms_js_lang_lm_wrong_smtp_connection_successful = 'SMTP údaje boli úspešne overené';
925var cms_js_lang_lm_wrong_smtp_connection_verify_progress = 'Overovanie SMTP údajov';
926var cms_js_lang_lm_wrong_smtp_connection_data_code_550 = 'E-mailová schránka neexistuje';
927var cms_js_lang_lm_wrong_smtp_connection_data_code_501 = 'E-mailová adresa je nesprávna';
928var cms_js_lang_lm_wrong_smtp_connection_username = 'Užívatelské meno';
929var cms_js_lang_lm_wrong_smtp_connection_username_2 = ' na ';
930var cms_js_lang_lm_wrong_smtp_connection_password_change = 'Heslo na SMTP účte ';
931var cms_js_lang_lm_subscribers_required = 'Je nutné zadať prijímatela/ov newslettera.';
932var cms_js_lang_lm_subscribers_group_delete = 'Naozaj chcete vymazať skupinu ';
933
934var cms_js_lang_delete_main_product_img_confirm = 'Naozaj chcete zmazať hlavný obrázok produktu?';
935var cms_js_lang_delete_category_img_confirm = 'Naozaj chcete zmazať obrázok?';
936var cms_js_lang_delete_logo_img_confirm = 'Naozaj chcete zmazať logo?';
937
938var cms_js_lang_print_order_file_prefix = 'objednavka_';
939var cms_js_lang_print_orders_file_prefix = 'hromadna_tlac_objednavok';
940
941var cms_js_lang_product_price = 'Cena produktu';
942var cms_js_lang_product_old_price = 'Bežná cena';
943
944var cms_js_lang_shipping_start_rate_vs_end_rate_notice = 'Dolná hranica ceny musí byť nižšia ako horná.';
945var cms_js_lang_shipping_no_payment_selected = 'Zadajte prosím spôsob pre platby.';
946
947var cms_js_lang_tools_reporting_bugs_url_def_text = '- vložte sem prosím úplnú URL adresu stránky, na ktorej ste chybu zistili -';
948var cms_js_lang_tools_reporting_bugs_descr_def_text = '- pokúste sa čo najpresnejšie popísať Vami zistenú chybu -';
949var cms_js_lang_tools_reporting_bugs_alert1 = 'Zadajte prosím URL adresu, kde sa chyba vyskytla.';
950var cms_js_lang_tools_reporting_bugs_alert2 = 'Zadajte prosím popis Vami zistenej chyby.';
951var cms_js_lang_tools_reporting_bugs_alert3 = 'Prajete si odoslať chybové hlásenie?';
952var cms_js_lang_tools_reporting_bugs_alert4 = '<p>Ďakujeme Vám za nahlásenie chyby, túto sa pokúsime čo najskôr analyzovať a opraviť.<br /><br />Po jej odstránení Vás budeme informovať e-mailom.</p>';
953
954var cms_js_lang_tools_request_descr_def_text = '- pokúste sa čo najpresnejšie popísať Vašu požiadavku -';
955var cms_js_lang_tools_request_alert1 = 'Zadajte prosím popis Vašej požiadavky.';
956var cms_js_lang_tools_request_alert2 = 'Prajete si odoslať požiadavku?';
957var cms_js_lang_tools_request_alert3 = '<p>Ďakujeme Vám za nahlásenie požiadavky, túto sa pokúsime čo najskôr analyzovať.<br /><br />O možnosti jej realizovania Vás budeme informovať e-mailom.</p>';
958
959var cms_js_lang_product_other_price_valid_msg_01 = 'Chyba v údajoch pre Ďalšie ceny!';
960var cms_js_lang_product_other_price_valid_msg_02 = '<i>Každá ďalšia cena musí mať vybranú <strong>nejakú</strong> Skupinu zákazníkov.</i>';
961var cms_js_lang_product_other_price_valid_msg_03 = '<i>Každá ďalšia cena musí mať vybranú <strong>inú</strong> Skupinu zákazníkov.</i>';
962var cms_js_lang_product_form_stock_in_attribs = 'Stav na sklade je nastavený pre atribút';
963
964var cms_js_lang_product_form_availability_price_portal_days_warn = 'Zadaný počet musí byť celé číslo, alebo prázdna hodnota.';
965var cms_js_lang_price_portal_activate_title = 'Aktivácia exportov pre cenové portály';
966var cms_js_lang_price_portal_activate_subtitle = 'maximálny počet aktivovaných portálov:';
967
968var cms_js_lang_nivo_slider_no_dir = 'Zadajte prosím adresár v parametroch modulu.';
969
970var cms_js_lang_product_form_unit_fill_err = 'Zadajte názov jednotky prosím.';
971var cms_js_lang_product_form_active_images_select_confirm_1 = 'Prajete si 1 práve nahraný obrázok priradiť medzi zvolené aktívne obrázky produktu {product_name}?';
972var cms_js_lang_product_form_active_images_select_confirm_2_4 = 'Prajete si {img_count} práve nahrané obrázky priradiť medzi zvolené aktívne obrázky produktu {product_name}?';
973var cms_js_lang_product_form_active_images_select_confirm_5 = 'Prajete si {img_count} práve nahraných obrázkov priradiť medzi zvolené aktívne obrázky produktu {product_name}?';
974
975var cms_js_lang_user_user_search = 'zadajte meno / e-mail používatela';
976
977js_import_product_data['ean'] = 'ean';
978js_import_product_data_no_vat['ean'] = 'ean';
979js_import_product_data['product_purchase_price'] = 'nákupná cena bez DPH';
980js_import_product_data_no_vat['product_purchase_price'] = 'nákupná cena bez DPH';
981js_import_product_data['product_availability'] = 'dostupnosť';
982js_import_product_data_no_vat['product_availability'] = 'dostupnosť';
983
984var cms_js_lang_order_details_check_order_item_quantity_validity_warn = 'Prosím zadajte platné množstvo pre tento tovar';
985var cms_js_lang_order_details_resend_email = 'Želáte si znovu odosla
985ť objednávkový e-mail zákazníkovi?';
986var cms_js_lang_order_details_resend_email_last_change = 'Informácie objednávky budú podla aktuálneho stavu po poslednej zmene ';
987var cms_js_lang_order_details_resend_email_sent = 'Objednávkový e-mail odoslaný';
988var cms_js_lang_order_details_resend_email_not_sent = 'Objednávkový e-mail sa nepodarilo odoslať';
989
990var cms_js_lang_inquiry_details_resend_email = 'Želáte si znovu odoslať cenovú ponuku zákazníkovi?';
991var cms_js_lang_inquiry_details_resend_email_sent = 'Cenová ponuka odoslaná';
992var cms_js_lang_inquiry_details_resend_email_not_sent = 'Cenovú ponuku sa nepodarilo odoslať';
993
994var cms_js_lang_reservation_mode_incorrect_format_date_error = 'Zadaný dátum je v zlom formáte. Správny formát je dd.mm.yyyy';
995var cms_js_lang_reservation_mode_predate_error = 'Neskorší dátum nemôže predchádzať skorší';
996var cms_js_lang_reservation_mode_current_date_error = 'Dátum nemôže byť starší ako ten dnešný';
997var cms_js_lang_reservation_mode_email_not_sent = 'E-mail sa nepodarilo odoslať';
998var cms_js_lang_reservation_mode_email_sent = 'E-mail bol úspešne odoslaný';
999var cms_js_lang_reservation_mode_email_sent_contact = 'Čoskoro Vás budeme kontaktovať!';
1000
1001var cms_js_lang_unchanged_order_coupon_discount_alert_msg = 'Nezmenili ste žiadnu hodnotu pre kupónovú zlavu!';
1002var cms_js_lang_empty_order_coupon_discount_alert_msg = 'Nezadali ste žiadnu hodnotu pre kupónovú zlavu!';
1003var cms_js_lang_week = 'Týždeň';
1004var cms_js_lang_cfg_curr_code_err = 'Pole musí obsahovať presne 3 velké písmená.';
1005var cms_js_lang_cfg_curr_delete_alert = 'Naozaj si prajete zmazať túto menu?';
1006
1007var cms_js_lang_cfg_order_payment_method_q = 'Naozaj si prajete zaslať požiadavku pre záujem o spôsob platby:\n%s ?\n\n(V krátkej dobe sa Vám ozveme a upresníme postup.)';
1008var cms_js_lang_cfg_order_payment_method_txt = 'Mám záujem o metódu platby';
1009var cms_js_lang_cfg_order_payment_method_sent = 'Požiadavka bola úspešne odoslaná.';
1010
1011var cms_js_lang_ga_act_confirm = 'Naozaj si prajete zaslať požiadavku pre záujem o modul Google Analytics štatistík?';
1012var cms_js_lang_ga_problem_confirm = 'Naozaj si prajete zaslať požiadavku o probléme pri aktivovaní modulu Google Analytics štatistík?';
1013var cms_js_lang_cke_jq_adapter_cms_content = 'Článok';
1014var cms_js_lang_cke_jq_adapter_cms_page = 'Stránka';
1015var cms_js_lang_cke_jq_adapter_shop_category = 'Kategória produktov';
1016var cms_js_lang_cke_jq_adapter_shop_product = 'Produkt';
1017var cms_js_lang_cke_jq_adapter_product_snapshot = 'Snapshot produktu';
1018var cms_js_lang_cke_jq_adapter_enter_product_part = 'Zadajte časť názvu produktu';
1019var cms_js_lang_cke_jq_adapter_enter_product_categ_part = 'Zadajte časť názvu kategórie produktu';
1020var cms_js_lang_cke_jq_adapter_select = 'vyberte';
1021
1022var cms_js_lang_header_edit_template_save_alert = 'V sekcii Dizajn -> PANEL S DIZAJNOM máte aktuálne zvolený dizajn:\n"{template_name}"\n\nPred úpravou hlavičky tam najskôr kliknite na tlačidlo "Použiť zvolený dizajn".';
1023var cms_js_lang_header_edit_close_finallize_poshy = 'Zmeny v dizajne hlavičky boli uložené, skontrolujte si ich prosím v sekcii Dizajn.';
1024var js_import_product_data_for_shopper_group = ' - ';
1025
1026var cms_js_lang_GA_manual_header = 'Návod pre riešenie problému s Google Analytics prehľadmi.';
1027
1028// var cms_js_lang_GA_manual_content = ['prihláste sa do svojho Google účtu (účet, na ktorom máte aktivované Google Analytics štatistiky pre Vašu doménu)', 'navštívte stránku <a href="https://www.google.com/accounts/ManageDomains" target="_blank">https://www.google.com/accounts/ManageDomains</a>', 'do sekcie "Add a New Domain" vložte názov domeny (napr. "{js_live_site}"), následne kliknite na "Add domain"', 'v zozname (Manage registration) sa objaví novopridaná doména, kliknutím vojdite do jej úpravy', 'následne choďte na záložku alternatívne spôsoby -> Použite svoj účet služby Google Analytics -> tlačidlo overiť', 'pokračovať -> kliknite na súhlasiť s podmienkami (ToS)', 'v nasledujúcom formulári zadajte pre "Target URL path prefix" URL v tvare:<br/> "http://{js_live_site}/administrator/index2.php?authsub=y"', 'SAVE - následne by vedla 
1028nadpisu v tejto sekcii malo zobraziť (Aktívne)', 'v ďalšej záložke sa prihláste do administrácie e-shopu a "Kliknite pre povolenie", pričom v predchádzajúcej záložke ste stále prihásení do Google Analytics účtu'];
1029// var cms_js_lang_GA_manual_content_finish = 'Následne je možné postupovať podla video návodu na aktiváciu Google analytics prehladov.';
1030
1031var cms_js_lang_GA_manual_content = ['overte si svoje prihlasovacie údaje ( užívatelské meno je možné zadať aj bez koncovky "@gmail.com" )', 'prihláste sa do svojho <a href="http://www.google.com/analytics/" target="_blank">Google Analytics účtu</a> a overte, či máte vytvorený aspoň 1 Google Analytics profil', 'ak sa stále nemôžete prihlásiť, otvorte si <a href="https://accounts.google.com/DisplayUnlockCaptcha" target="_blank">nasledujúcu stránku</a> a znovu sa pokúste prihlásiť', 'prípadne si treba overiť v <a href="https://myaccount.google.com/" target="_blank">nastaveniach Vášho Google účtu</a>, či máte <strong>vypnuté "Dvojstupňové overenie"</strong> a <strong>povolený prístup pre menej bezpečné aplikácie</strong>'];
1032var cms_js_lang_GA_manual_content_finish = 'Následne by malo byť možné Google Analytics prehlady aktivovať.';
1033
1034var cms_js_lang_module_copy_btn_copy = 'Kopírovať';
1035var cms_js_lang_module_copy_btn_cancel = 'Zrušiť';
1036var cms_js_lang_module_copy_title = 'Kopírovať modul';
1037var cms_js_lang_module_copy_question = 'Naozaj chcete kopírovať vybraný modul?';
1038
1039var cms_js_lang_module_multilang_dir_tip = 'Pre zobrazenie rôznych obrázkov v <strong>{langs}</strong> jazyku nahrajte obrázky do {dirs_count_title}:<ul><li>{dir_lang_list}</li></ul>';
1040var cms_js_lang_module_multilang_dir_tip_1_dir = 'adresára';
1041var cms_js_lang_module_multilang_dir_tip_more_dirs = 'adresárov';
1042var cms_js_lang_module_multilang_dir_tip_li_temp = '<strong>{dir_name}__{lang_lower}</strong> - pre {lang_upper} verziu stránok';
1043
1044var cms_js_lang_sitemap_title_as_h1 = '- rovnaký ako Názov stránky';
1045
1046var cms_js_lang_is_not_numeric = 'Nesprávny formát čísla.';
1047var cms_js_lang_user_list_no_access_section = 'Musíte povoliť aspoň 1 sekciu.';
1048var cms_js_lang_cfg_product_param_del_alert = 'Naozaj si prajete zmazať zvolené parametre?';
1049var cms_js_lang_cfg_product_param_del_assigned_title   = 'Zmazať parametre priradené k produktom';
1050var cms_js_lang_cfg_product_param_del_assigned_unit    = 'produktov';
1051var cms_js_lang_cfg_product_param_del_assigned_total   = 'Celkovo bude parameter odobraný z %s produktov.';
1052var cms_js_lang_cfg_product_param_del_assigned_confirm = 'Pre potvrdenie zadajte číslo %s:';
1053var cms_js_lang_cfg_product_param_del_assigned_error   = 'Zadané číslo sa nezhoduje s počtom produktov.';
1054
1055var cms_js_lang_cfg_product_new_attrib_value_error_3 = 'Hodnota pre atribút nesmie obsahovať úvodzovku ani apostrof!';
1056
1057var cms_js_lang_cfg_country_region_err = 'Je nutné zvoliť aspoň 1 štát.';
1058var cms_js_lang_cfg_country_region_select_all = 'kliknutím označíte všetky';
1059var cms_js_lang_cfg_country_region_deselect_all = 'kliknutím odznačíte všetky';
1060var cms_js_lang_cfg_country_region_select_def = 'kliknutím označíte pôvodné';
1061var cms_js_lang_cfg_country_region_protected_click = 'Štát "{country_name}" je už používaný systémom{country_protected_area}\nZ tohto dôvodu nie je možné tento štát odznačiť.';
1062var cms_js_lang_cfg_country_region_protected_click2 = ' pre:';
1063var cms_js_lang_cfg_country_region_protected_sections = {'order_user_info':'fakturačná alebo dodacia adresa zákazníka', 'shipping_rate':'spôsoby dodania', 'user_info':'fakturačná alebo dodacia adresa objednávky'};
1064var cms_js_lang_products_variant_fill = 'Zvýraznené polia variantov musia byť správne vyplnené';
1065var cms_js_lang_products_primary_category_out_of_range_text1 = 'Čitatelná URL adresa produktu je vytvorená podla kategórie \'';
1066var cms_js_lang_products_primary_category_out_of_range_text2 = '\', do ktorej však už produkt nie je zaradený.\nV záložke SEO teda zvolte inú kategóriu, prosím.'
1067var cms_js_lang_order_item_name_edit_err = 'Zadajte prosím správny názov produktu.';
1068
1069var cms_js_lang_phpshop_order_item_edit = 'Úprava položky objednávky';
1070var cms_js_lang_phpshop_order_item_edit_err1 = 'Novú položku objednávky nie je možné pridať, pretože objednávka už obsahuje inú položku s rovnakým kódom (príp. i atribútom) produktu!';
1071var cms_js_lang_phpshop_order_item_edit_err2 = 'Novú položku objednávky nie je možné pridať, z dôvodu zapnutej kontroly skladových zásob. Najvyššia možná hodnota pre množstvo je';
1072var cms_js_lang_phpshop_order_item_edit_err3 = 'Novú položku objednávky nie je možné pridať, pretože ste zadali prázdne (nulové) množstvo!';
1073var cms_js_lang_phpshop_product_price_old = 'pôvodne';
1074var cms_js_lang_phpshop_product_price_per_piece = 'Jednotková cena';
1075var cms_js_lang_phpshop_order_items_label_6 = 'JC bez DPH';
1076var cms_js_lang_phpshop_order_items_label_7 = 'JC s DPH';
1077var cms_js_lang_phpshop_order_items_alert_save = 'JC bez DPH má len informatívny charakter, ukladá sa JC s DPH, z ktorej sa následne dopočíta JC bez DPH.';
1078var cms_js_lang_phpshop_order_items_alert_save_wo_tax = 'JC s DPH má len informatívny charakter, ukladá sa JC bez DPH, z ktorej sa následne dopočíta JC s DPH.';
1079var cms_js_lang_phpshop_order_items_zero_title = 'Pre nastavenie ceny na 0, zadajte cenu v tvare 0.00001';
1080var cms_js_lang_phpshop_order_print_quantity = 'Množstvo';
1081var cms_js_lang_phpshop_product_list_name = 'Názov produktu';
1082var cms_js_lang_phpshop_product_variant = 'Variant produktu';
1083var cms_js_lang_phpshop_price_sum = 'Spolu';
1084var cms_js_lang_phpshop_product_variant_stock_error = 'V prípade zadania stavu na skladu pre variant, musia byť vyplnené všetky stavy na skladoch u variantov.';
1085var cms_js_lang_phpshop_product_variant_code_fill_error = 'Všetky kódy variantov musia byť vyplnené';
1086var cms_js_lang_phpshop_product_variant_code_duplicity_error = 'Kódy variantov musia byť unikátne a nesmú 
1086sa opakovať';
1087
1088var cms_js_lang_order_checkout_payment_need_admin_authorize = 'Chcete autorizovať platbu objednávky?';
1089
1090var cms_js_lang_checkout_unknown_error = '<p>Pravdepodobne z dôvodu nestabilného internetového pripojenia došlo k chybe.</p><p>Obnovte si stránku a akciu vykonajte ešte raz.</p>';
1091
1092var cms_js_lang_yes_C = 'Áno';
1093var cms_js_lang_no_C = 'Nie';
1094
1095
1096
1097var cms_js_lang_fb_logged_in = 'Prihlásenie cez Facebook prebehlo úspešne.';
1098var cms_js_lang_fb_login_link = 'Prihlásenie cez Facebook';
1099var cms_js_lang_wrong_format_http_301 = 'URL adresy webových stránok musia začínať s "http"';
1100var cms_js_lang_no_delimiter_301 = 'URL adresy webových stránok musia byť rozdelené bodkočiarkou ";"';
1101var cms_js_lang_same_url_on_one_line = 'Počiatočná a cielová adresa sa zhodujú';
1102var cms_js_lang_start_to_target_same = 'Už existuje presmerovanie na počiatočnú adresu';
1103var cms_js_lang_open_sef_error = 'Adresa %s1 na riadku %s2 je používaná na stránkach/článkoch';
1104var cms_js_lang_system_sef_error = 'Adresa %s1 na riadku %s2 je používaná v systéme';
1105var cms_js_lang_product_sef_error = 'Adresa %s1 na riadku %s2 je používaná produktom';
1106var cms_js_lang_product_sef_error2 = 'Produktová časť "%s1" v URL adrese "%s2", ktorú sa snažíte presmerovať na riadku %s3, je používaná existujúcim produktom.';
1107var cms_js_lang_product_sef_error3 = 'Riadok %s1 s URL adresou "%s2", kde sa snažíte presmerovať kategóriu, je potrebné odstrániť, pretože presmerovanie kategórií toho istého produktu funguje automaticky.';
1108var cms_js_lang_category_sef_error = 'Adresa %s1 na riadku %s2 je používaná kategóriami';
1109var cms_js_lang_error_on_line_num = 'chyba na riadku č. ';
1110var cms_js_lang_url_with_no_path = 'Adresa neobsahuje cestu';
1111var cms_js_lang_unknown_src_domain = 'Pozor, snažíte sa presmerovať cudziu doménu - kontaktujte nás';
1112
1113var cms_js_lang_price_category_free = 'Zadarmo';
1114var cms_js_lang_price_category_paid = 'Platené';
1115
1116
1117var cms_fill_message = 'Vyplňte prosím text správy.';
1118
1119js_import_product_data['product_tax_rate'] = 'sadzba DPH';
1120
1121var js_import_product_variants_help_text_intro = new Array();
1122    js_import_product_variants_help_text_intro[0] = 'Inštrukcie';
1123    js_import_product_variants_help_text_intro[1] = '';	//	'Pred nahratím CSV súboru si prosím pozrite návod ako importovať dáta variantov produktov. Návod v PDF formáte';
1124    js_import_product_variants_help_text_intro[2] = 'Formát CSV súboru je: '; 	//	'Tiež si stiahnite a pozrite vzorový CSV súbor';
1125    js_import_product_variants_help_text_intro[5] = '&nbsp;&nbsp;&nbsp;(<a href="#" style="font-size:10px" onclick="return js_dipv_toggle_display(\'#help_text_intro_21_show_more\');">zobraziť viac</a>)<br /><span id="help_text_intro_21_show_more" style="display:none;font-size:12px;color:#AAAAAA;margin-top:3px;margin-left:15px">- všetky položky v riadkoch by mali byť uzavreté v úvodzovkách, najmä "Variant",<br />- každý variant má názov a za dvojbodkou uvedenú hodnotu,<br />napr.: "Velkosť:45",<br />- zložený variant sa skladá z viacerých variantov oddelených bodkočiarkou,<br />napr.: "Velkosť:45;Farba:červeno-zelená",<br />- žiadny variant nesmie obsahovať znaky hranatých zátvoriek, ani zložených zátvoriek, ani čiarky ( t.j. znaky [ ] { } , ),<br />- žiadna položka v riadku nesmie obsahovať riadiaci znak ukončenia riadku (t.j. "enter"),<br />- nevyplnený (prázdny) údaj v položke riadku sa neimportuje, číselná hodnota "0" sa importuje ako "0",<br />- desatinnú časť číselných hodnôt je najlepšie oddelovať bodkou.</span>';
1126    js_import_product_variants_help_text_intro[3] = 'Pre potreby importu sa dá použiť CSV súbor získaný exportom variantov produktov.';
1127    js_import_product_variants_help_text_intro[4] = 'V prípade otázok alebo nefunkčnosti importu nám napíšte e-mail, radi Vám pomôžeme.';
1128
1129var js_import_product_variants_price_help_text_intro = new Array();
1130    js_import_product_variants_price_help_text_intro[0] = 'Inštrukcie';
1131    js_import_product_variants_price_help_text_intro[1] = '';	//	'Pred nahratím CSV súboru si prosím pozrite návod ako importovať dáta variantov produktov. Návod v PDF formáte';
1132    js_import_product_variants_price_help_text_intro[2] = 'Formát CSV súboru je: '; 	//	'Tiež si stiahnite a pozrite vzorový CSV súbor';
1133    js_import_product_variants_price_help_text_intro[5] = '&nbsp;&nbsp;&nbsp;(<a href="#" style="font-size:10px" onclick="return js_dipv_toggle_display(\'#help_text_intro_21_show_more\');">zobraziť viac</a>)<br /><span id="help_text_intro_21_show_more" style="display:none;font-size:12px;color:#AAAAAA;margin-top:3px;">- všetky položky v riadkoch by mali byť uzavreté v úvodzovkách,<br />- Názov atribútu a Názov položky sú identifikátorom konkrétneho variantu<br />- položky nesmú obsahovať znaky v hranatých zátvorkách, ani zložených zátvorkách, ani čiarky ( t.j. znaky [ ] { } , ),<br />- žiadna položka v riadku nesmie obsahovať riadiaci znak ukončenia riadku (t.j. "enter"),<br />- desatinnú časť číselných hodnôt je najlepšie oddelovať bodkou.</sp
1133an>';
1134    js_import_product_variants_price_help_text_intro[3] = 'Pre potreby importu sa dá použiť CSV súbor získaný exportom variantov produktov.';
1135    js_import_product_variants_price_help_text_intro[4] = 'V prípade otázok alebo nefunkčnosti importu nám napíšte e-mail, radi Vám pomôžeme.';
1136
1137var js_import_product_variants_data_import_type = new Array();
1138    js_import_product_variants_data_import_type[0] = 'chcem pridať varianty produktov (prvý import, resp. pridanie nových neexistujúcich variantov)';
1139    js_import_product_variants_data_import_type[1] = 'chcem aktualizovať existujúce varianty produktov (upravia sa vybrané vlastnosti už existujúcich variantov, napr. cena, zásoba, ...)';
1140
1141var js_import_category_info_1 = 'Zo stromu kategórií si zvolte kategóriu, ktorá bude slúžiť ako koreňová. Všetky kategórie zo súboru sa naimportujú do nej.';
1142var js_import_category_info_2 = 'Stiahnite si vzorový XML súbor:';
1143var js_import_category_info_3 = 'V súbore pre import je potrebné zachovať kódovanie "windows-1250" a názvy kategórií zabaliť do CDATA tagu.';
1144
1145var cms_js_lang_phpshop_product_img_tag_file_name_alert_01 = 'Nahraný obrázok má odlišný formát a typ (napr. pôvodný "png" alebo "bmp" obrázok má koncovkou "jpg" a pod.)';
1146
1147var js_global_valums_file_uploader_lang_01 = "Súbor {file} má neplatnú príponu. Povolené prípony sú: {extensions}.";
1148var js_global_valums_file_uploader_lang_02 = "Súbor {file} je príliš velký, maximálna velkosť súboru je {sizeLimit}.";
1149var js_global_valums_file_uploader_lang_03 = "Súbor {file} je príliš malý, minimálna velkosť súboru je {minSizeLimit}.";
1150var js_global_valums_file_uploader_lang_04 = "Súbor {file} je prázdny, vyberte súbory opäť, bez neho.";
1151var js_global_valums_file_uploader_lang_05 = "Súbory sú práve nahrávané, ak teraz odídete, tak nahrávanie bude zrušené.";
1152var js_global_valums_file_uploader_lang_06 = "Pre nahranie pustite súbory sem.";
1153var js_global_valums_file_uploader_lang_07 = "Nahrať súbor";
1154var js_global_valums_file_uploader_lang_08 = "Zrušiť";
1155var js_global_valums_file_uploader_lang_09 = "Neúspešné";
1156var js_global_valums_file_uploader_lang_10 = "element nebol nájdený";
1157var js_global_valums_file_uploader_lang_11 = "z";
1158var js_global_valums_file_uploader_lang_12 = "súbor s uvedeným id nebol pridaný, alebo je už nahraný / zrušený";
1159var js_global_valums_file_uploader_lang_13 = "Uvedený obj nie je v súbore (v qq.UploadHandlerXhr)";
1160var js_global_valums_file_uploader_lang_14 = "Nahrať hlavný obrázok";
1161var js_global_valums_file_uploader_lang_15 = "Nahrať ďalšie obrázky";
1162
1163var cms_js_lang_phpshop_book_author_name_too_short = 'Meno autora je príliš krátke.';
1164var cms_js_lang_phpshop_book_author_does_not_exist = 'Zadaný autor neexistuje.';
1165var cms_js_lang_phpshop_book_author_author = 'Autor';
1166var cms_js_lang_phpshop_book_author_was_added = 'bol pridaný.';
1167var cms_js_lang_phpshop_book_author_remove_confirm = 'Prajete si odobrať autora zo zoznamu autorov tohto titulu?';
1168var cms_js_lang_phpshop_book_author_not_found = 'Autor nenájdený. Skontrolujte zadané meno alebo vytvorte nového autora.';
1169
1170var cms_js_lang_phpshop_gift_added_info = 'Darček %gift_name% bol zdarma pridaný do Vášho košíka.';
1171
1172var cms_js_lang_phpshop_newsletter_edit_html_code 	= 'Upraviť HTML kód';
1173var cms_js_lang_phpshop_newsletter_show_preview 	= 'Zobraziť náhlad newslettera';
1174var cms_js_lang_phpshop_newsletter_save_html_file 	= 'Uložiť HTML súbor';
1175var cms_js_lang_phpshop_newsletter_lang_of_export 	= 'Jazyk exportu';
1176var cms_js_lang_phpshop_newsletter_chosen_lang 		= 'Zvolený jazyk';
1177var cms_js_lang_phpshop_newsletter_showed_prods 	= 'zobrazených %num_of_displayed_prods% z %num_of_selected_prods% produktov.';
1178var cms_js_lang_phpshop_newsletter_sk_lang 			= 'Slovenčina';
1179var cms_js_lang_phpshop_newsletter_en_lang 			= 'Angličtina';
1180var cms_js_lang_phpshop_newsletter_cz_lang 			= 'Čeština';
1181var cms_js_lang_phpshop_newsletter_pl_lang 			= 'Polština';
1182var cms_js_lang_phpshop_newsletter_hu_lang 			= 'Maďarčina';
1183var cms_js_lang_phpshop_newsletter_ro_lang 			= 'Rumunčina';
1184var cms_js_lang_phpshop_newsletter_auto_code_save	= 'Zmeny v kóde sa ukladajú automaticky.';
1185
1186var cms_js_lang_phpshop_etiquette_print_file = 'Tlačiť štítky';
1187var cms_js_lang_phpshop_etiquette_save_to_pdf = 'Uložiť ako PDF';
1188
1189var cms_js_lang_phpshop_etiquette_paper_size = 'Veľkosť papiera:';
1190var cms_js_lang_phpshop_etiquette_paper_orientation = 'Orientácia papiera';
1191var cms_js_lang_phpshop_etiquette_pdf_template = 'PDF šablóna';
1192var cms_js_lang_phpshop_etiquette_hide_price = 'Generovať bez cien';
1193
1194var cms_js_lang_phpshop_etiquette_reorder = 'Zmeniť poradie štítkov';
1195var cms_js_lang_phpshop_etiquette_reorder_title = 'Zmena poradia štítkov:';
1196var cms_js_lang_phpshop_etiquette_reorder_fail = 'Nepodarilo sa uložiť poradie štítkov';
1197var cms_js_lang_phpshop_etiquette_reorder_success = 'Uložené poradie štítkov';
1198
1199var cms_js_lang_only_gift_product = 'Produkt je samostatne nepredajný, a je určený pre funkciu darčekov.';
1200var cms_js_lang_free_gift = 'Darček_zadarmo_';
1201var cms_js_lang_free_gift_text = 'Vybrať ako darček zadarmo';
1202var cms_js_lang_free_gift_group = 'Darčeky od';
1203var cms_js_lang_free_gift_motivational_block = 'Pre odomknutie tohto darčeka je potrebné nakúpiť aspoň za ';
1204
1205var cms_js_lang_admin_purchase_price = 'Nákupná cena';
1206var cms_js_lang_admin_sell_price = 'Cena';
1207
1208var cms_js_lang_admin_wrong_time_format = 'Nesprávny formát času. Použite hh:mm';
1209
1210var cms_js_lang_supplier_order_number_entry_search = 'zadajte číslo dod. obj.';
1211var cms_js_lang_tracking_id_entry_search = 'zadajte číslo zásielky';
1212
1213var cms_js_lang_add_param_to_short_description_button_title = 'Pridať parameter do krátkeho popisu';
1214var cms_js_lang_add_param_to_short_description_button = 'Pridať do popisu';
1215
1216var js_lang_osch_confirm_order_text = 'Naozaj si prajete potvrdiť Vašu objednávku?';
1217
1218var cms_js_admin_product_bulk_discount_message_1 = 'Hodnota v tomto poli musí byť číselná';
1219var cms_js_admin_product_bulk_discount_message_2 = 'V tomto poli ste nezadali žiadnu hodnotu';
1220var cms_js_admin_product_bulk_discount_message_3 = 'Hodnota tohoto pola musí byť väčšia ako hodnota "od"';
1221var cms_js_admin_product_bulk_discount_message_4 = 'Táto hodnota musí byť väčšia ako hodnota "do" predošlej položky';
1222var cms_js_admin_product_bulk_discount_message_5 = 'Zlava nemôže prekročiť hodnotu 100%';
1223var cms_js_admin_product_bulk_discount_message_6 = 'Hodnota "od" nemôže byť nulová';
1224var cms_js_admin_product_bulk_discount_message_7 = 'Nemožno pridať dalšiu položku, ak posledná hodnota "do" je nekonečná';
1225var cms_js_admin_product_bulk_discount_message_8 = 'Táto zlava je menšia alebo rovnaká ako predošlá';
1226var cms_js_admin_product_price_level_no_group_selected_message = 'Vyberte si zákaznícku skupinu.';
1227var cms_js_lang_member_zone_cancel_subsc_dialog = 'Naozaj chcete zrušiť svoje členstvo? Peniaze Vám nebudú vrátené späť.';
1228var cms_js_lang_member_zone_change_subsc_dialog = 'Naozaj chcete požiadať o zmenu typu predplatného v členskej zóne? Ak áno, budeme Vás kontaktovať prostredníctvom e-mailu.';
1229var cms_js_lang_member_zone_cancel_subsc_message_suc = 'Požiadavka na zrušenie členstva bola úspešne odoslaná správcovi';
1230var cms_js_lang_member_zone_cancel_subsc_message_err = 'Požiadavka na zrušenie členstva nebola zaslaná!';
1231var cms_js_lang_member_zone_change_subsc_message_suc = 'Požiadavka na zmenu typu členstva bola úspešne odoslaná správcovi';
1232var cms_js_lang_member_zone_change_subsc_message_err = 'Požiadavka na zmenu typu členstva nebola zaslaná!';
1233var cms_js_lang_loyalty_system_infinity_value = 'Posledná hodnota "do" nemôže byť nekonečná';
1234var cms_js_lang_loyalty_system_resolve_errors_first = 'Pred pridaním nového intervalu vyriešte všetky chyby';
1235
1236var cms_js_lang_admin_cfg_migration_no_www_proceed = 'Ostrá doména neobsahuje "www." - prajete si pokračovať?';
1237var cms_js_duplicity = 'Zadaná hodnota je duplicitná.';
1238var cms_js_back_to_basket = 'Späť do košíka';
1239var cms_js_confirm_order = 'Potvrdiť objednávku s úhradou';
1240var cms_js_confirm_avail_notify_in_cart = 'Potvrdiť a pokračovať';
1241var cms_js_check_stock_with_return_strct_check_text1 = 'Tieto produkty sú momentálne nedostupné, preto nemôžete dokončiť nákup:';
1242var cms_js_check_stock_with_return_strct_check_text2 = 'Vráťte sa do košíka a odstráňte z neho produkty, ktoré práve nie sú skladom.';
1243var cms_js_check_stock_with_return_text1 = 'Tieto produkty sú momentálne nedostupné, preto bude odoslanie zásielky trvať o niečo dlhšie:';
1244var cms_js_check_stock_with_return_text2 = 'Pokiaľ Vám neprekáža na zásielku počkať, kým budú tieto produkty dostupné, stlačte tlačidlo <b>"' + cms_js_confirm_order + '"</b>.<br/> V opačnom prípade sa vráťte do košíka a odstráňte z neho produkty, ktoré práve nie sú skladom.';
1245var js_lang_phpshop_product_form_show_flypage = 'Náhlad stránky produktu v obchode.';
1246var js_lang_phpshop_product_unpublished = 'Produkt je skrytý';
1247var js_lang_phpshop_product_category_not_defined = 'Produkt nemá priradenú kategóriu';
1248
1249var cms_js_apps_button_activated = 'Aktivované';
1250var cms_js_apps_button_activate = 'Aktivovať';
1251var cms_js_apps_admin_detail_activation_help = 'Pomoc s aktiváciou';
1252var cms_js_apps_card_activation_help = 'Mám záujem';
1253var cms_js_apps_button_activate_free = 'Mám záujem';
1254var cms_js_apps_all_apps = 'Všetky aplikácie';
1255var cms_js_apps_more_info = 'Viac info';
1256var cms_js_apps_will_contact = 'Ozveme sa';
1257var cms_js_apps_payment_waiting = 'Čaká na aktiváciu';
1258var cms_js_apps_news_for = 'Novinky za';
1259var cms_js_apps_quarter = 'štvrťrok';
1260var cms_js_apps_help_mail_info = 'E-mail s požiadavkou nám bol zaslaný, ďakujeme za záujem. <br> Budeme Vás kontaktovať s informáciami o aktivácii.';
1261
1262var cms_js_image = "Obrázok";
1263var cms_js_txtOf = 'z';
1264var cms_js_prev = 'PRED.';
1265var cms_js_next = 'ĎALŠÍ';
1266
1267var cms_js_sort_tabs = {
1268	'new': 'Najnovšie',
1269	'old': 'Najstaršie',
1270	'cheap': 'Najlacnejšie',
1271	'expensive': 'Najdrahšie',
1272	'aToZ': 'A do Z',
1273	'zToA': 'Z do A',
1274	'bestsellers': 'Najpredávanejšie',
1275	'top': 'Top Produkty',
1276	'stock': 'Množstvo na sklade',
1277	'standard': 'Štandardné poradie',
1278	'price': 'Cena',
1279	'name': 'Názov produktu'
1280};
1281
1282var cms_js_accept_cookies_text = 'Táto webová stránka používa cookies. Kliknutím na tlačidlo "OK" súhlasíte s ich používaním.';
1283var cms_js_accept_cookies_text_accept = 'OK';
1284var cms_js_lang_phpshop_zasilkovna_alert_sel = 'V spôsoboch dopravy prosím vyberte pobočku';
1285var cms_js_lang_balik_na_postu_opening_hours = 'Otváracie hodiny';
1286var cms_js_lang_balik_na_postu_phone_number = 'Telefonický kontakt';
1287var cms_js_lang_balik_na_postu_services = 'Služby';
1288
1289var js_lang_phpshop_product_unavailable = 'Predaj skončil';
1290
1291var js_lang_phpshop_product_oos2pu = 'Produkt je vypredaný';
1292
1293var js_lang_admin_config_smtp_confirm_username = "Naozaj chcete zmeniť SMTP údaje?\nUžívatelské meno: ";
1294var js_lang_admin_config_smtp_confirm_change_to = "\nNa: ";
1295var js_lang_admin_config_smtp_confirm_password = "Naozaj chcete zmeniť heslo na SMTP účte: ";
1296var js_lang_admin_config_smtp_confirm_host = "Naozaj chcete zmeniť SMTP server?\nZ: ";
1297var js_lang_admin_config_smtp_confirm_settings = "Naozaj chcete zmeniť nastavenie SMTP servera?\n";
1298
1299var js_lang_admin_config_order_state_meaning = "Prosím, nastavte význam stavu objednávky.";
1300
1301var js_lang_da_select_attributte = 'Prosím, vyberte si z ponuky skupinu atribútov.';
1302var js_lang_da_special_only_for_nondef = 'Špeciálne zobrazenie sa nedá zvoliť pre tento typ zobrazenia.';
1303var js_lang_da_select_display_type = 'Prosím zvolte typ zobrazenia pre túto skupinu.';
1304var js_lang_da_select_family_name = 'Zadajte názov rodiny pre lahšiu identifikáciu.';
1305
1306var cms_js_open_all = 'Otvoriť položky stromu kategórií.';
1307var cms_js_close_all = 'Zavrieť položky stromu kategórií.';
1308var cms_js_show_checked = 'Zobraziť iba označené kategórie';
1309var cms_js_iterate_selected = 'Kliknutím prejdete na ďalšiu označenú kategóriu.';
1310var cms_js_iterate_found = 'Kliknutím prejdete na ďalšiu nájdenú kategóriu.';
1311var cms_js_iterate_notfound = 'Hľadanie nenašlo žiadne výsledky.';
1312var cms_js_show_all = 'Zobraziť všetky kategórie';
1313var cms_js_search_in_category = 'Vyhľadať v kategórii'; // _PHPSHOP_PARAMETER_SEARCH_IN_CATEGORY
1314var cms_js_category_filter = 'Zobraziť iba nájdené kategórie.'; // _NEW_CATEGORY_FILTER
1315var cms_js_category_chain_parent = 'Označením kategórie sa označia aj všetky jej nadradené.'; // _NEW_CATEGORY_CHAIN_PARENT
1316var cms_js_category_chain_child = 'Označením / odznačením kategórie sa rovnako zmenia aj všetky jej podradené.'; // _NEW_CATEGORY_CHAIN_CHILD
1317
1318var cms_dropzone_drop_images_here = 'Kliknite a nahrajte obrázok ';
1319var cms_dropzone_remove_file = 'Odstrániť';
1320
1321var js_lang_product_attribute_unavailable = 'Produkt vo variante "{variant}: {value}" je nedostupný. Prosím vyberte si iný dostupný variant.';
1322var js_lang_product_attribute_unavailable_2 = 'Produkt v tejto kombinácií atribútov nie je momentálne na sklade.';
1323var js_lang_product_attribute_unavailable_3 = 'Atribút {clicked} nie je dostupný v požadovanej kombinácii:\n{clicked} , {other_attribs}\n\nPrajete si vybrať {clicked} s inou kombináciou?';
1324
1325var cms_js_lang_group_of_articles = 'Skupina článkov';
1326var cms_js_lang_all = 'všetky';
1327var cms_js_lang_from = 'od';
1328var cms_js_lang_from_specific_pages = 'z konkrétnych stránok';
1329var cms_js_lang_number_of_article_in_group = 'Počet Článkov v skupine';
1330var cms_js_lang_article_sorting = 'Zoradenie článkov';
1331var cms_js_lang_from_newest = 'od najnovšieho';
1332var cms_js_lang_random_for_x_days = 'náhodné pre x dní';
1333var cms_js_lang_random_everytime = 'vždy náhodné';
1334var cms_js_lang_articles_inline = 'články vedla seba';
1335
1336var cms_js_lang_order_sum_tooltip_qty = 'Počet vybraných objednávok';
1337var cms_js_lang_order_sum_tooltip_total = 'Suma objednávok';
1338
1339var cms_js_lang_articles_block_setting_num_of_articles_at_full_width = 'Počet článkov na celú šírku (štandardne):';
1340var cms_js_lang_articles_block_setting_num_of_columns_for_articles = 'Počet stĺpcov pre ďalšie články (pod štandardnými článkami):';
1341var cms_js_lang_articles_block_setting_num_of_articles_in_columns = 'Počet ďalších článkov v stĺpcoch:';
1342var cms_js_lang_articles_block_setting_num_of_articles_as_links = 'Počet článkov ako URL odkazov (pod sĺpcovými článkami):';
1343var cms_js_lang_articles_block_setting_pages_name_with_articles = 'Názov stránky s článkami:';
1344var cms_js_lang_articles_block_setting_not_show_page_name = 'nezobrazovať';
1345var cms_js_lang_articles_block_setting_show_page_name = 'zobrazovať';
1346var cms_js_lang_articles_block_setting_disqus_allowed = 'Povoliť DISQUS (externá funkcia komentárov ku článkom)';
1347
1348// DA Backend
1349var js_lang_dynamic_attributes_datacpyok = 'Dáta boli úspešne skopírované do schránky';
1350var js_lang_dynamic_attributes_bndenaerr = 'Ohraničujúcu oblasť pre skupinu je potrebné najprv povoliť.';
1351var js_lang_dynamic_attributes_bndunaerr = 'Skupina technicky nemôže používať ohraničujúcu oblasť.';
1352var js_lang_dynamic_attributes_rngcpycol = 'Rozpätie bolo úspešne kopírované. Zmeňte prosím jeho podmienku alebo hodnoty.';
1353var js_lang_dynamic_attributes_layer_sucess = 'Úprava vrstvy prebehla v poriadku.';
1354var js_lang_dynamic_attributes_layer_error = 'Úprava vrstvy zlyhala.';
1355var js_lang_dynamic_attributes_text_align = 'Zarovnanie textu';
1356var js_lang_dynamic_attributes_text_max_chrars = 'Maximálny počet znakov';
1357var js_lang_dynamic_attributes_align_left = 'Vlavo';
1358var js_lang_dynamic_attributes_align_center = 'Centrovať';
1359var js_lang_dynamic_attributes_align_right = 'Vpravo';
1360var js_lang_dynamic_attributes_text_count = 'Počítanie znakov';
1361var js_lang_dynamic_attributes_text_size = 'Velkosť fontu';
1362var js_lang_dynamic_attributes_font_type = 'Názov fontu';
1363var js_lang_dynamic_attributes_text_color = 'Farba fontu';
1364var js_lang_dynamic_attributes_min_dpi = 'Minimálne DPI';
1365var js_lang_dynamic_attributes_min_dpi_title = 'Ak viac ako 0 a obrázok bude mať menšie DPI rozlíšenie než je táto hodnota, zákazníkovi sa zobrazí upozornenie o nekvalitnom obrázku.';
1366var js_lang_dynamic_attributes_max_image_size = 'Max. velkosť obrázka';
1367var js_lang_dynamic_attributes_max_image_size_title = 'Maximálna velkosť obrázka v MB ktorú užívatel môže nahrať na server.';
1368var js_lang_dynamic_attributes_ovr = 'Každý obrázok bude overlay';
1369var js_lang_dynamic_attributes_ovr_title = 'Nastavenim tejto volby, sa všetky obrázky v skupine vykreslia ako overlay. Overlay je vykreslený vždy ako posledný bez ohladu na poradie vrstvy. Overlay sa nedá upravovať.';
1370var js_lang_dynamic_attributes_save_to_apply = 'Pre aplikovanie zmien stlačte uložiť.';
1371var js_lang_dynamic_attributes_palett_inter = 'Interaktívny výber';
1372var js_lang_dynamic_attributes_palett_inter_title = 'Zaškrtnutím tejto volby, bude možné meniť hodnotu skupiny kliknutím na ikonu priamo v konfigurátore';
1373var js_lang_dynamic_attributes_palett_ico = 'Typ ikony v konfigurátore';
1374var js_lang_dynamic_attributes_palett_ico_title = 'Vyberte si typ ikony ktorá bude zobrazená v konfigurátore. Môžete si nahrať jednu vlastnú ikonu vo formáte .svg';
1375var js_lang_dynamic_attributes_ovr_pick = 'Nahrať obrázok ako overlay';
1376var js_lang_dynamic_attributes_src_del_error = 'Nastala chyba pri mazaní súboru.';
1377var js_lang_dynamic_attributes_src_del_sucess = 'Súbor bol úspešne zmazaný.';
1378var js_lang_dynamic_attributes_ovr_pick_title = 'Môžete nastaviť jeden obrázok ako overlay. Uistite sa že má presné rozmery ako všetky obrázky v skupine.';
1379var js_lang_dynamic_attributes_max_images = 'Max. počet obrázkov';
1380var js_lang_dynamic_attributes_max_images_title = 'Maximálny počet obrázkov v návrhu konfigurátora pre skupinu';
1381var js_lang_dynamic_attributes_edit_group_layer = 'Editovať zobrazenie vrstvy';
1382var js_lang_dynamic_attributes_edit_active = 'Prebieha editácia vrstvy';
1383var js_lang_dynamic_attributes_edit_group = 'Editovať zobrazenie skupiny';
1384var js_lang_dynamic_attributes_act_r_alert = 'Všetky aktivátori tejto skupiny budú zmazané. Pokračovať?';
1385var js_lang_dynamic_attributes_grp_r_alert = 'Skupina bude odobratá od tejto schémy, to sa prejaví aj u produktov ktoré majú priradenú túto schému. Pokračovať?';
1386var js_lang_dynamic_attributes_prod_r_alert = 'Naozaj si želáte odobrať túto položku zo skupiny? <br/> Budú odstránené aj všetky jej údaje ako obrázky, atď...';
1387var js_lang_dynamic_attributes_link_rule_r_alert = 'Naozaj si želáte odstrániť pravidlá odkazov zo skupiny? <br/>Budú zmazané aj všetky vytvorené odkazy pre túto skupinu.';
1388var js_lang_dynamic_attributes_fml_r_alert = 'Naozaj si želáte zmazať túto rodinu?';
1389var js_lang_dynamic_attributes_template_r_alert = 'Naozaj si želáte zmazať túto predlohu?';
1390var js_lang_dynamic_attributes_sch_d_alert = 'Táto schéma bude zmazaná a odobratá od produktov ktoré sú k nej priradené. Pokračovať?';
1391var js_lang_dynamic_attributes_sch_c_alert = 'Kopírovať schému';
1392var js_lang_dynamic_attributes_copy_ok = 'Dáta boli kopírované do schránky';
1393var js_lang_dynamic_attributes_paste_err = 'Nemáte žiadne dáta v schránke';
1394var js_lang_dynamic_attributes_ref_set_msg = 'Nastavenie referenčnej hodnoty';
1395var js_lang_dynamic_attributes_calc_del_alert = 'Naozaj si želáte zmazať nastavenú rovnicu kalkulácie prepočtu tejto skupiny?';
1396var js_lang_dynamic_attributes_change_display_alert = 'Zmenou typu zobrazenia budú resetované všetky už nastavené hodnoty skupiny.
1396<br/>Prajete si pokračovať?';
1397var js_lang_dynamic_attributes_reset_ordering_title = 'Resetovanie poradia hodnôt';
1398var js_lang_dynamic_attributes_reset_ordering_alert = 'Naozaj si želáte resetovať poradie hodnôt v skupine?<br/>Bude aplikované základné poradie.';
1399var js_lang_dynamic_attributes_pick_scheme_alert = 'Prosím zvoľte si schému';
1400var js_lang_dynamic_attributes_sch_c_name = 'Nový názov schémy';
1401var js_lang_dynamic_attributes_sch_c_name_place = 'Zadajte názov schémy';
1402var js_lang_dynamic_attributes_add_param = 'Pridanie parametra';
1403var js_lang_dynamic_attributes_sch_c_asign = 'Priradiť novo vytvorenú kópiu schémy k tomuto produktu';
1404var js_lang_dynamic_attributes_sch_r_alert = 'Táto schéma bude odobratá od tohto produktu. Pokračovať?';
1405var js_lang_dynamic_attributes_field_numeric = 'Hodnota pre toto pole musí byť číselná';
1406var js_lang_dynamic_attributes_save_sucess = 'Uloženie prebehlo správne.';
1407var js_lang_dynamic_attributes_action_sucess = 'Akcia prebehla úspešne.';
1408var js_lang_dynamic_attributes_changes_sucess = 'Zmeny prebehly úspešne.';
1409var js_lang_dynamic_attributes_action_error = 'Nastala neznáma chyba pri tejto akcii.';
1410var js_lang_dynamic_attributes_save_error = 'Nastala chyba pri ukladaní dát.';
1411var js_lang_dynamic_attributes_delete_sucess = 'Zmazanie dát prebehlo správne.';
1412var js_lang_dynamic_attributes_delete_confirm = 'Naozaj si želáte zmazať tento súbor?';
1413var js_lang_dynamic_attributes_delete_error = 'Nastala chyba pri mazaní dát.';
1414var js_lang_dynamic_attributes_save_warning = 'Táto skupina nemá žiadne nastavenia.';
1415var js_lang_dynamic_attributes_upload_error = 'Súbor sa nepodarilo nahrať na server.';
1416var js_lang_dynamic_attributes_upload_sucess = 'Súbor bol úspešne odoslaný na server.';
1417var js_lang_dynamic_attributes_use_fonts = 'Používať fonty';
1418var js_lang_dynamic_attributes_ds_type = 'Geometria premietania';
1419var js_lang_dynamic_attributes_ds_type_title = 'Zvolte aký typ geometrie bude použitý pri premietaní v konfigurátore.';
1420var js_lang_dynamic_attributes_ds_rectangle = 'Obdĺžnik';
1421var js_lang_dynamic_attributes_ds_square = 'Å tvorec';
1422var js_lang_dynamic_attributes_ds_circle = 'Kruh';
1423var js_lang_dynamic_attributes_ds_w = 'Referenčná šírka';
1424var js_lang_dynamic_attributes_ds_w_title = 'Zvolte skupinu, ktorej hodnota sa bude aplikovať pre šírku premietania. Táto hodnota je povinná stále.';
1425var js_lang_dynamic_attributes_ds_h = 'Referenčná výška';
1426var js_lang_dynamic_attributes_ds_h_title = 'Zvolte skupinu, ktorej hodnota sa bude aplikovať pre výšku premietania. Táto hodnota je povinná iba pre typ obdĺžnik.';
1427var js_lang_dynamic_attributes_ds_q = 'Zobraziť kótovanie';
1428var js_lang_dynamic_attributes_ds_q_title = 'Zvolte či sa má zobraziť kótovanie pre geometriu tienenia a aké kóty majú byť zobrazené.';
1429var js_lang_dynamic_attributes_layer_editable = 'Vrstva editovatelná';
1430var js_lang_dynamic_attributes_layer_editable_title = 'Zaškrtnutím tejto volby, má zákazník možnosť interaktívne editovať túto vrstvu a jej obsah.';
1431var js_lang_dynamic_attributes_pb_elems = 'Položky úprav';
1432var js_lang_dynamic_attributes_pb_elems_title = 'Vyberte položky ktoré budú dostupné pri úprave elementu pre túto skupinu.';
1433var js_lang_dynamic_attributes_pb_lay = 'Vrstva';
1434var js_lang_dynamic_attributes_pb_sca = 'Velkosť';
1435var js_lang_dynamic_attributes_pb_mov = 'Posun';
1436var js_lang_dynamic_attributes_pb_rot = 'Natočenie';
1437var js_lang_dynamic_attributes_pb_ste = 'Krokovanie';
1438var js_lang_dynamic_attributes_pb_fli = 'Zrkadlenie';
1439var js_lang_dynamic_attributes_pb_res = 'Reset';
1440var js_lang_dynamic_attributes_pb_fot = 'Výber fontu';
1441var js_lang_dynamic_attributes_pb_foa = 'Zarovnanie textu';
1442var js_lang_dynamic_attributes_pb_foh = 'Výška riadku';
1443var js_lang_dynamic_attributes_pb_col = 'Farba';
1444var js_lang_dynamic_attributes_all = 'Všetky';
1445var js_lang_dynamic_attributes_pb_up = 'Presunie objekt o vrstvu nahor';
1446var js_lang_dynamic_attributes_pb_down = 'Presunie objekt o vrstvu nadol';
1447var js_lang_dynamic_attributes_disable = 'Zakázať';
1448var js_lang_dynamic_attributes_selected = 'Vybrané';
1449var js_lang_dynamic_attributes_def_fonts = 'Predvolený font';
1450var js_lang_dynamic_attributes_def_fonts_title = 'Zadajte font, ktorý bude predvolený pri načítaní tejto skupiny. Ak prázdne, bude sa brať prvý dostupný font.';
1451var js_lang_dynamic_attributes_can_obj = 'Výber objektu';
1452var js_lang_dynamic_attributes_can_obj_title = 'Kliknite na ikonu, vyberie sa objekt ktorý budete môcť následne upraviť.';
1453var js_lang_dynamic_attributes_sel_obj_elem = 'Hlavný objekt';
1454var js_lang_dynamic_attributes_sel_obj_bound = 'Ohraničujúci objekt';
1455var js_lang_dynamic_attributes_use_fonts_title = 'Zákazník si môže zvoliť font z výberu. K dispozícií budú fonty nahrané v priečinku Fonts v správe súborov. Fonty musia mať príponu .ttf (malé písmená) a názov nesmie obsahovať medzeru. Znak _ sa automaticky konvertuje na medzeru.';
1456var js_lang_dynamic_attributes_bind_prod_title = 'Priradenie produktu k atribútu';
1457var js_lang_dynamic_attributes_no_prod_found = 'Žiadny produkt s týmto kódom sa nenašiel';
1458// DA Frontend
1459var js_lang_dynamic_attributes_version_confirm = 'Verzia schémy alebo skryptov sa zmenila! Je tu malá šanca že vaša konfigurácia bude nekompletná alebo nesprávna. Chcete pokračovať v práci na tejto konfigurácii?';
1460var js_lang_dynamic_attributes_cfg_palettdef_title = 'Ak prehlia
1460dač nezobrazuje paletu správne, môžete zmeniť typ zobrazenia';
1461var js_lang_dynamic_attributes_cfg_reset = 'Resetovať';
1462var js_lang_dynamic_attributes_cfg_reset_title = 'Resetovať návrh do pôvodneho stavu';
1463var js_lang_dynamic_attributes_save = 'Uložiť zmeny';
1464var js_lang_dynamic_attributes_copy = 'Upraviť';
1465var js_lang_dynamic_attributes_loading = 'Načítavam';
1466var js_lang_dynamic_attributes_new_item = 'Nová položka';
1467var js_lang_dynamic_attributes_modify_item = 'Upravujete položku ktorá sa už nachádza v košíku.';
1468var js_lang_dynamic_attributes_duplicate_item = 'Teraz môžete zmeniť atribúty a vložiť do košíka.';
1469var js_lang_dynamic_attributes_price_total = 'Celková cena objednávky';
1470var js_lang_dynamic_attributes_duplicate = 'Duplikovať';
1471var js_lang_dynamic_attributes_min_alert = 'Minimálna hodnota pre toto pole je';
1472var js_lang_dynamic_attributes_max_alert = 'Maximálna hodnota pre toto pole je';
1473var js_lang_dynamic_attributes_carterror = 'Nastala chyba pri spracovaní požiadavky. Obnovte stránku a opakujte akciu.';
1474var js_lang_dynamic_attributes_pb_help = 'Vyberte objekt z obrázka alebo kliknite na skupinu pri volbách.';
1475var js_lang_dynamic_attributes_pb_cancel = 'Ukončiť úpravu a zrušiť označenie';
1476var js_lang_dynamic_attributes_pb_title = 'Editácia objektov';
1477var js_lang_dynamic_attributes_delete = 'Zmazať';
1478var js_lang_dynamic_attributes_low_res = 'Obrázok má nízke rozlíšenie a produkt nemusí byť spracovaný kvalitne.';
1479var js_lang_dynamic_attributes_low_res_tip = 'Pre kvalitnú tlač používajte rozlíšenie minimálne ';
1480var js_lang_dynamic_attributes_cfg_dwn = 'Stiahnuť';
1481var js_lang_dynamic_attributes_cfg_dwn_title = 'Stiahnúť náhlad návrhu ako obrázok';
1482var js_lang_dynamic_attributes_field_required = 'Hodnota pre toto pole je povinná';
1483var js_lang_dynamic_attributes_sm_title = 'Súhrn zvolených kombinácii';
1484var js_lang_dynamic_attributes_lm_title = 'Poslať túto konfiguráciu na email';
1485var js_lang_dynamic_attributes_lm_btn = 'Poslať';
1486var js_lang_dynamic_attributes_std_feat_title = 'Štandardná výbava';
1487var js_lang_dynamic_attributes_numeric_alert = 'Hodnota v tomto poli musí byť číselná';
1488var js_lang_dynamic_attributes_misconf_warn = 'Prostredie pre túto aplikáciu nie je správne nastavené, kontaktujte správcu.';
1489var js_lang_dynamic_attributes_reqerror = 'Zvýraznené položky sú povinné.';
1490var js_lang_dynamic_attributes_experror = 'Export konfigurátora zlyhal. Prosím obnovte stránku a skúste to ešte raz.';
1491var js_lang_dynamic_attributes_maxfiles_warn = 'Maximálny počet nahraných súborov je {{maxFiles}}';
1492var js_lang_dynamic_attributes_maxfilesize_warn = 'Veľkosť tohoto súboru je {{filesize}}Mb, ktorá prekračuje maximálne povolenú hranicu {{maxFilesize}}Mb';
1493var js_lang_dynamic_attributes_drop_here = 'Kliknite a nahrajte obrázok';
1494var js_lang_dynamic_attributes_drop_remove = 'Odstrániť';
1495var js_lang_dynamic_attributes_printing_alert = 'Rozmery a umiestnenie potlače nie sú nastavené!';
1496var js_lang_dynamic_attributes_price_offer = 'Cenová ponuka';
1497
1498var js_lang_sphf_transfer_to_admin = 'Preniesť výsledky do admin filtra';
1499var js_lang_sphf_remove_all_filters = 'Odstrániť všetky filtre';
1500var js_lang_sphf_all = 'Všetko';
1501var js_lang_sphf_from = 'z';
1502var js_lang_sphf_filter_active = 'Máte aktívny filter:';
1503var js_lang_sphf_more_results = 'Viac';
1504var js_lang_sphf_less_results = 'Menej';
1505var js_lang_sphf_no_results = 'Žiadne výsledky';
1506var js_lang_sphf_show = 'Zobraziť';
1507var js_lang_sphf_found1 = 'Nájdený';
1508var js_lang_sphf_found2 = 'Nájdené';
1509var js_lang_sphf_found3 = 'Nájdených';
1510var js_lang_sphf_result_1 = 'výsledok';
1511var js_lang_sphf_result_2 = 'výsledky';
1512var js_lang_sphf_result_3 = 'výsledkov';
1513var js_lang_sphf_pag_next = 'Zobraziť ďalších {+}'; // @deprecated
1514var js_lang_sphf_pag_next1 = 'Zobraziť ďalší {+}';
1515var js_lang_sphf_pag_next2 = 'Zobraziť ďalšie {+}';
1516var js_lang_sphf_pag_next3 = 'Zobraziť ďalších {+}';
1517var js_lang_sphf_pag_last = 'Zobraziť posledných {+}'; // @deprecated
1518var js_lang_sphf_pag_last1 = 'Zobraziť posledný {+}';
1519var js_lang_sphf_pag_last2 = 'Zobraziť posledné {+}';
1520var js_lang_sphf_pag_last3 = 'Zobraziť posledných {+}';
1521var js_lang_sphf_set_group = 'Kliknutím môžete zmeniť nastavenia tejto skupiny.';
1522var js_lang_sphf_has_setting = 'Skupina filtra má vlastné špecifické nastavenie';
1523var js_lang_sphf_remove_group = 'Odstrániť všetky hodnoty tejto skupiny z filtra';
1524var js_lang_sphf_remove_value = 'Odstrániť hodnotu z filtra';
1525var js_lang_sphf_activ_no_res = 'Parameter nie je k dispozícii v zobrazených výsledkoch';
1526var js_lang_sphf_net_err = 'Nastal problém so sieťou, obnovte prosím stránku.';
1527var js_lang_sphf_total_1 = 'V tejto kategórii je {total} produkt';
1528var js_lang_sphf_total_2 = 'V tejto kategórii sú {total} produkty';
1529var js_lang_sphf_total_3 = 'V tejto kategórii je {total} produktov';
1530var js_lang_sphf_filtering = 'Filtruje sa ...';
1531var js_lang_sphf_open_filter = 'Zobraziť filter';
1532var js_lang_sphf_close_filter = 'Skryť filter';
1533var js_lang_sphf_pick_text = 'Vyberte položku';
1534var js_lang_sphf_show_results = 'Zobraziť výsledky filtra';
1535
1536var js_lang_prof_select_offer = 'Zvoľte si prosím minimálne jednu ponuku';
1537var js_lang_prof_select_variant = 'Vyberte si prosím variant zvolenej špeciálnej ponuky';
1538var js_lang_prof_select_main_variant = 'Vyberte si prosím variant produktu';
1539var js_lang_prof_show_more = 'Zobraziť viac darčekov';
1540var js_lang_prof_show_less = 'Zobraziť menej';
1541var js_lang_prof_free = 'Zdarma';
1542var js_lang_prof_discount = 'zľava';
1543var js_lang_prof_del_warn = 'Spolu s týmto produktom, sa odstránia následujúce špeciálne ponuky.';
1544var js_lang_prof_del_conf = 'Prajete si pokračovať?';
1545var js_lang_set_not_avail = 'Niektorý z produktov v sete nie je dostupný na sklade.';
1546
1547var js_lang_pacc_select_products = 'Označte prosím minimálne jeden produkt';
1548var js_lang_pacc_unselect_group = 'Odznačenie skupiny';
1549var js_lang_pacc_no_group_selected = 'Nemáte označenú žiadnu skupinu doplnkov';
1550var js_lang_pacc_wrong_action = 'Neplatná požiadavka! Oznámte to prosím na helpdesk.';
1551var js_lang_pacc_delete_confirm = 'Ste si naozaj istý že chcete zmazať túto skupinu?';
1552
1553var _JS_LNG_PROMPT_CLOSE = 'Zatvoriť okno';
1554
1555var js_lang_newcat2plus = 'Vytvoriť modul';
1556
1557var cms_js_lang_phpshop_product_change_variant = 'zmeniť variant';
1558
1559var js_lang_newcat2plus_tooltip = 'Kliknutím na tlačidlo sa automaticky z kategórie vytvorí nový modul<br>'+
1560						's podkategóriami, v ktorom sa budú zobrazovať <br>'+
1561						'iba podkategórie konkrétnej kategórie.<br>'+
1562						'Modul bude automaticky zbrazený v konkrétnej kategórii, <br>'+
1563						'všetkých jej podkategóriách a bude viditelný iba na administrátora <br>'+
1564						'(po Vašej kontrole môžete modul zverejniť).';
1565
1566var js_lang_newcat2plus_confirm = 'Prajete si vytvoriť nový modul s podkategóriami z kategórie ';
1567
1568var js_lang_gift_error_0 = 'Hodnota pre toto pole nesmie byť prázdna.';
1569var js_lang_gift_error_1 = 'Úroveň nastavenej ceny nemôže byť menšia než nula.';
1570var js_lang_gift_error_2 = 'Nastavená cena nemá správnu postupnosť. Musí byť väčšia než predošlá hodnota';
1571var js_lang_gift_error_3 = 'Zvoľte si skupinu pre darčeky z tejto cenovej skupiny.';
1572
1573var js_lang_action_estimated = 'Do konca akcie ostáva';
1574var js_lang_action_expired = 'Akcia skončila';
1575
1576var js_lang_time_estimated = 'Odhadovaný čas';
1577
1578var js_lang_time_day_1 = 'deň';
1579var js_lang_time_day_more = 'dni';
1580var js_lang_time_day_more_2 = 'dní';
1581
1582var js_lang_time_hours_1 = 'hodina';
1583var js_lang_time_hours_2_4 = 'hodiny';
1584var js_lang_time_hours_more = 'hodín';
1585
1586var js_lang_time_minutes_1 = 'minúta';
1587var js_lang_time_minutes_2_4 = 'minúty';
1588var js_lang_time_minutes_more = 'minút';
1589
1590var js_lang_time_seconds_1 = 'sekunda';
1591var js_lang_time_seconds_2_4 = 'sekundy';
1592var js_lang_time_seconds_more = 'sekúnd';
1593
1594var js_lang_read_more = 'Čítať viac';
1595var js_lang_read_less = 'Čítať menej';
1596
1597var js_lang_show_more = 'Zobraziť viac';
1598var js_lang_show_less = 'Zobraziť menej';
1599
1600var js_lang_show_filter = 'Zobraziť filter';
1601var js_lang_show_full_filter = 'Zobraziť celý filter';
1602var js_lang_hide_filter = 'Skryť filter';
1603
1604var js_lang_order_flag_set_title = 'Príznaky objednávky';
1605var js_lang_order_flag_set_question = 'Skutočne si prajete zmeniť príznak ';
1606var js_lang_order_flag_set_order = 'objednávky';
1607var js_lang_order_flag_set_comment = 'Pozn.: táto zmena sa zapíše do histórie zmien objednávky';
1608var js_lang_order_flag_set_wait = 'Prosím čakajte';
1609var js_lang_order_flag_set_success = 'Príznak objednávky bol úspešne zmenený.';
1610var js_lang_order_flag_set_error = 'Nastala chyba, prosím skúste to znova.';
1611var js_lang_order_flag_set_error_not_invoiced = 'Objednávke nie je možné nastaviť príznak, nakolko nemá vytvorenú faktúru.';
1612
1613var js_lang_browse_row_display_stock_amount_error_lbl_1 = 'iba';
1614var js_lang_browse_row_display_stock_amount_error_lbl_2 = 'ks';
1615
1616var js_lang_find_order = 'Vyhladať objednávku';
1617var js_lang_no_order_id_inserted = 'Nezadali ste číslo objednávky!';
1618var js_lang_order_not_found = 'Objednávka sa nenašla';
1619
1620var js_lang_compare_remove_all_confirm = 'Odobrať všetko?';
1621var js_lang_compare_no_prod = 'Žiadne produkty na porovnávanie.';
1622var js_lang_compare_max_product_amount_reached = 'Produkt nie je možné pridať do porovnávania.\nMaximálny počet produktov pre porovnanie je %s.';
1623var js_lang_compare_min_product_amount_needed = 'Položku nie je možné odobrať, pretože v porovnávacej tabuľke musia zostať aspoň 2 produkty!';
1624
1625var js_lang_must_fill_rating_of_product = 'Musíte vyplniť hodnotenie produktu!';
1626
1627var js_lang_admin_info_adv_change_admin_vex_title = 'Vybrať správcu objednávky';
1628var js_lang_admin_info_adv_change_admin_vex_select_label = 'Nový správca objednávky: ';
1629var js_lang_admin_info_adv_change_admin_vex_select_default = ' - vyberte správcu objednávky - ';
1630var js_lang_admin_info_adv_change_admin_vex_change_mail = 'Zaslať email o zmene zákaznikovi';
1631var js_lang_admin_info_adv_new_count_1 = ' nová';
1632var js_lang_admin_info_adv_new_count_2_4 = ' nové';
1633var js_lang_admin_info_adv_new_count_more = ' nových';
1634var js_lang_admin_info_adv_new_count_notif_1 = 'Máte {order_count} novú objednávku';
1635var js_lang_admin_info_adv_new_count_notif_2_4 = 'Máte {order_count} nové objednávky';
1636var js_lang_admin_info_adv_new_count_notif_more = 'Máte {order_count} nových objednávok';
1637var js_lang_admin_info_adv_new_count_notif_body_1 = '{order_id}: {order_items_count} položka, suma {order_total}';
1638var js_lang_admin_info_adv_new_count_notif_body_2_4 = '{order_id}: {order_items_count} položky, suma {order_total}';
1639var js_lang_admin_info_adv_new_count_notif_body_more = '{order_id}: {order_items_count} položiek, suma {order_total}';
1640
1641var js_inf_scroll_button_more = 'Načítať ďalšie';
1642
1643var js_lang_gift_free_title = 'Darček zadarmo - chýba ešte nakúpiť za';
1644var js_lang_gift_free_enabled = 'Máte darček zadarmo.';
1645
1646// com_media
1647var js_lang_admin_media_cancel = 'Zrušiť';
1648var js_lang_admin_media_resize = 'Zmeniť velkosť';
1649var js_lang_admin_media_overlay_text = '<span>Prosím čakajte...</span><img class="loader" src="/images/ajax-loader-05.gif">';
1650var js_lang_admin_media_redirect = 'Prejsť do adresára';
1651var js_lang_admin_media_clicktocreate = 'Vytvoriť';
1652
1653var js_lang_admin_media_file = 'Súbor';
1654var js_lang_admin_media_folders = 'Adresáre';
1655var js_lang_admin_media_images = 'Obrázky';
1656var js_lang_admin_media_files = 'Súbory';
1657var js_lang_admin_media_copy_url_done = 'Skopírované.';
1658
1659var js_lang_admin_media_upl_file_done = 'bol úspešne nahraný na server.';
1660var js_lang_admin_media_upl_file_error = 'sa nepodarilo nahrať na server.';
1661var js_lang_admin_media_upl_ren_file = 'Adresa položky: ';
1662var js_lang_admin_media_leg_ren_file = 'Premenovať položku: ';
1663var js_lang_admin_media_ren_file_error = 'Položka sa nedá premenovať!';
1664var js_lang_admin_media_text_unzip_ren_file = 'Odzipovať položku: ';
1665var js_lang_admin_media_leg_cre_folder = 'Vytvoriť adresár';
1666
1667var js_lang_admin_media_del_items_error = 'Zvolené položky sa nepodarilo odstrániť.';
1668
1669var js_lang_admin_media_act_edit = 'Upraviť';
1670var js_lang_admin_media_act_rename = 'Premenovať';
1671var js_lang_admin_media_act_copy = 'Kopírovať';
1672var js_lang_admin_media_act_resize = 'Zmeniť velkosť';
1673var js_lang_admin_media_act_resize_keep_ratio = 'Zachovať pomer strán';
1674var js_lang_admin_media_act_resize_keep_copy = 'Zachovať pôvodný obrázok';
1675var js_lang_admin_media_act_resize_keep_copy_org = 'Zmeniť velkosť obrázka s pôvodným názvom, <br>vytvoriť kópiu nezmeneného obrázka s názvom "-copy"';
1676var js_lang_admin_media_act_resize_keep_copy_cpy = 'Zachovať obrázok s pôvodným názvom, <br>vytvoriť kópiu zmeneného obrázka s názvom "-copy"';
1677var js_lang_admin_media_act_move = 'Presunúť';
1678var js_lang_admin_media_act_delete = 'Zmazať';
1679var js_lang_admin_media_act_prev = 'Pre náhlad obrázku kliknite na obrázok!';
1680var js_lang_admin_media_act_slimbox = 'Súbor obrázku:';
1681var js_lang_admin_media_act_unzip = 'Odzipovať';
1682
1683var js_lang_admin_media_text_width = 'šírka';
1684var js_lang_admin_media_text_height = 'výška';
1685
1686var js_lang_admin_media_num_dir = 'podadresárov';
1687var js_lang_admin_media_num_files = 'súborov';
1688
1689var js_lang_admin_media_wm_nothing_to_do = 'Všetky súbory majú aplikovaný vodoznak.';
1690var js_lang_admin_media_wm_remove_nothing_to_do = 'Žiaden súbor nemá aplikovaný vodoznak.';
1691var js_lang_admin_media_wm_remove_tip = 'Prajete si odstrániť vodoznaky pre všetky obrázky v tomto adresári?';
1692var js_lang_admin_media_wm_remove_cur_dir = 'Odstrániť v tomto adresári';
1693var js_lang_admin_media_wm_remove_deep = 'Odstrániť v tomto adresári a jeho podadresároch';
1694var js_lang_admin_media_wm_appli_quest = 'Prajete si aplikovať vodoznaky pre všetky obrázky v tomto adresári?';
1695var js_lang_admin_media_wm_appli_quest_cur = 'Aplikovať pre tento adresár';
1696var js_lang_admin_media_wm_appli_quest_deep = 'Aplikovať pre tento adresár a jeho podadresáre';
1697var js_lang_admin_media_wm_warn_1 = 'Vodoznaky sa zmažú iba z hlavných obrázkov produktov, zmazanie vodoznakov z ďalších obrázkov produktov je možné v správe súborov.';
1698
1699var js_lang_admin_media_dropzone_hint = 'Nahrajte súbory pretiahnutím sem';
1700var js_lang_admin_media_dropzone_fallback_message = 'Váš prehliadač nepodporuje nahrávanie súborov pretiahnutím';
1701var js_lang_admin_media_dropzone_invalid_filetype = 'nepovolený formát';
1702var js_lang_admin_media_dropzone_file_too_big = 'súbor je príliš velký';
1703var js_lang_admin_media_dropzone_response_error = 'chyba pri nahrávaní';
1704var js_lang_admin_media_dropzone_too_many_files = 'Nepovolený počet súborov';
1705var js_lang_admin_media_dropzone_upload_cancel = 'Nahrávanie súboru zrušené';
1706
1707var js_lang_admin_media_alert_del_files_sure_q = 'Zmazať položky';
1708var js_lang_admin_media_alert_move_files_sure_q = 'Presunúť položky';
1709var js_lang_admin_media_alert_copy_files_sure_q = 'Kopírovať položky';
1710var js_lang_admin_media_alert_resize_files_sure_q = 'Zmeniť velkosť obrázkov';
1711var js_lang_admin_media_alert_del_files_sure_q_2 = 'Potvrdiť vymazanie';
1712var js_lang_admin_media_alert_del_files_suer_q_2_text = 'Naozaj ste si istý? Počet označených položiek na vymazanie:';
1713var js_lang_admin_media_alert_del_files_suer_q_2_text_2 = 'Prosím zadajte číslo';
1714var js_lang_admin_media_alert_del_files_suer_q_2_text_3 = '(počet položiek pre vymazanie):';
1715
1716var js_lang_admin_media_move_items_error = 'Zvolené položky sa nepodarilo presunúť.';
1717var js_lang_admin_media_copy_items_error = 'Zvolené položky sa nepodarilo skopírovať.';
1718var js_lang_admin_media_backup_error_all = 'Položky nebolo možné obnoviť.';
1719
1720var js_lang_one_step_checkout_company_warning_title = 'Upozornenie';
1721var js_lang_one_step_checkout_company_warning_input = 'Máte vyplnené firemné údaje, ale nakupujete ako súkromná osoba.<br><br>Vaše firemné údaje budú týmto zmazané - prajete si pokračovať?';
1722var js_lang_one_step_checkout_company_warning_button_yes = 'Nakúpiť ako súkromná osoba';
1723var js_lang_one_step_checkout_company_warning_button_no = 'Zrušiť';
1724
1725var js_lang_admin_products_custom_mass_avail_set_vex_title = 'Hromadná zmena dostupnosti:';
1726
1727var js_lang_one_step_checkout_tos_price_offer_lbl = 'Žiadosť o cen
1727ovú ponuku';
1728
1729var js_lang_one_step_checkout_tos_price_offer_langs = {
1730	'checkout_heading': 'Zhrnutie rezervácie',
1731	'checkout_note_checkbox': 'Chcem napísať poznámku k rezervácii',
1732};
1733
1734var js_lang_one_step_checkout_company_tin_expected_format = 'Očakávaný formát';
1735
1736var js_lang_ico_error_validation = 'Minimálne 4 znaky s číslicou.';
1737
1738var js_lang_admin_panel_available_block_names = {
1739	'header': 'Hlavička',
1740	'subheader': 'Podhlavička',
1741	'left': 'lavý panel',
1742	'right': 'Pravý panel',
1743	'middle_top': 'Horná časť obsahu',
1744	'middle_bottom': 'Spodná časť obsahu',
1745	'pre_footer': 'Časť nad pätičkou',
1746	'footer_top': 'Horná časť pätičky'
1747};
1748
1749var js_lang_app_euroleasing_calc = {
1750	modalSubmit: 'Potvrdiť',
1751	modalCancel: 'Zrušiť',
1752	modalTitle: 'Euroleasing kalkulačka',
1753	creditValue: 'Hodnota úveru: ',
1754	creditCurrency: 'Mena úveru: ',
1755	creditDeposit: 'Akontácia úveru: ',
1756	creditRepaymentLength: 'Dĺžka splácania: ',
1757	months: 'mesiacov',
1758	monthlyPayAdditional: ' p.m.',
1759};
1760
1761var js_lang_email_did_you_mean = 'Mali ste na mysli: :suggestion?';
1762
1763var js_lang_manage_account = 'Správa Účtu';
1764var js_registration_url = '/obchod-registracia/';
1765
1766var js_lang_product_in_stock_1 = 'kus';
1767var js_lang_product_in_stock_2 = 'kusy';
1768var js_lang_product_in_stock_5 = 'kusov';
1769
1770var js_lang_proforma_saved_btn_label = 'Uložené';
1771var js_lang_proforma_error_btn_label = 'Chyba uloženia';
1772var js_lang_proforma_error_payment_date_title = 'Vytvorenie vyúčtovacej faktúry je možné len do 15 dní odo dňa prijatia úhrady predfaktúry.';
1773var js_lang_wishlist_item_delete = 'Odstrániť produkt z oblúbených';
1774var js_lang_wishlist_in_wishlist = 'Produkt sa už nachádza medzi oblúbenými';
1775
1776// Administracia
1777var js_lang_make_sel_from_list_for_action = 'Zvolte prosím v zozname položky pre volbu';
1778var js_lang_must_be_number = 'Zadaná hodnota musí byť číslo';
1779var js_lang_product_mass_colors_assign = 'Hromadné priradenie farieb';
1780var js_lang_mass_attribute_overpricing_lbl = 'Precenenie atribútov';
1781var js_lang_product_mass_attribute_change = 'Hromadná zmena variantov';
1782var js_lang_exception_negative_number = 'Hodnota precenenia musí byť kladné číslo';
1783var js_lang_max_low_50 = 'Ľutujeme, ale maximálne zníženie môže byť o 50%';
1784var js_lang_range_warn_1_99 = 'Ľutujeme, ale rozsah hodnôt môže byť len v rozmedzí 1 - 99';
1785var js_lang_exception_lowest_price = 'Zníženie musí byť menšie alebo rovné ako cena najlacnejšieho vybraného produktu pre precenenie.';
1786var js_lang_exception_set_price = 'Nastavenie na hodnotu musí byť väčšie alebo rovné "0" (nulovej hodnote).';
1787var js_lang_product_list_warn1 = 'Nezmenili ste žiadny atribút.';
1788var js_lang_product_list_warn3 = 'Nezmenili ste žiadnu cenu.';
1789var js_lang_regenerate_confirm_all = 'Akcia pregeneruje všetky príbuzné produkty na všetkých produktoch. V závislosti na počte produktov môže trvať dlhší čas.';
1790var js_lang_regenerate_confirm_missing = 'Akcia dodatočne vygeneruje a doplní príbuzné produkty ku produktom, ktoré nemajú dostatočný počet vygenerovaných príbuzných produktov. V závislosti na počte produktov môže trvať dlhší čas.';
1791var js_lang_generate_all = 'Pregenerovať všetky';
1792var js_lang_generate_missing = 'Dogenerovať chýbajúce';
1793var js_lang_generate_relative_product_start = 'začalo generovanie relatívnych produktov podľa kategórii';
1794var js_lang_mass_special_assign_lbl = 'Hromadne spracovať produkty v akcii';
1795
1796var js_vex_new_order_status_lbl1 = 'Zmeniť stav %s objednávky na nový stav: %s';
1797var js_vex_new_order_status_lbl2 = 'Zmeniť stav %s objednávok na nový stav: %s';
1798
1799// Orders
1800var js_lang_order_delete_mnu = 'Zmazať objednávku';
1801var js_lang_order_delete_mnu_more = 'Zmazať objednávky';
1802var js_lang_order_delete_prompt = 'Chcete zmazať označenú objednávku?';
1803var js_lang_order_delete_prompt_more = 'Chcete zmazať označené objednávky?';
1804var js_lang_order_disable_preview = 'Vypnúť zobrazenie náhladov objednávok.';
1805var js_lang_order_enable_preview = 'Zapnúť zobrazenie náhladov objednávok.';
1806var js_lang_order_change_status_prompt_more = 'Chcete zmeniť stav označených objednávok?';
1807var js_lang_order_change_status_prompt_more_content = 'Naozaj ste si istý? Počet všetkých označených objednávok na zmenu stavu:';
1808var js_lang_order_deselect = 'Zrušiť výber';
1809var js_lang_order_selected = 'Označené objednávky:';
1810var js_lang_order_product_selected = 'Označené produkty objednávky:';
1811var js_lang_order_selected_all = 'Máte označené všetky vyfiltrované objednávky';
1812var js_lang_order_selected_all_no_filter = 'Máte označené všetky objednávky';
1813var js_lang_order_selected_all_cur = 'Všetky objednávky na stránke sú označené.';
1814var js_lang_order_select_all = 'Označiť objednávky na všetkých stranách';
1815var js_lang_order_select_info = '&nbsp;&nbsp;&nbsp;<i>Info: ďalšiu %s objednávku máte označenú na ostatných stranách.</i>';
1816var js_lang_order_select_info_plural = '&nbsp;&nbsp;&nbsp;<i>Info: ďalšie %s objednávky máte označené na ostatných stranách.</i>';
1817var js_lang_order_select_info_plural_2 = '&nbsp;&nbsp;&nbsp;<i>Info: ďalších %s objednávok máte označené na ostatných stranách.</i>';
1818var js_lang_order_mass_change_status_lbl = 'Hromadná zmena stavu objednávok';
1819var js_lang_order_notify_err = 'Prosím, zmeňte najskôr stav objednávky.';
1820var js_lang_order_invoice_renumber_quest = 'Skutočne chcete vstúpiť do formulára, k
1820de budete môcť zmeniť číslo tejto objednávky?';
1821var js_lang_invoice_number = 'číslo FA';
1822var js_lang_list_of_orders_which_have_changed_status = 'Zoznam objednávok, ktorým bol zmenený status';
1823var js_lang_order_error_confirmation = 'Chyba odoslania objednávky';
1824
1825// Products
1826var js_lang_product_delete_mnu = 'Zmazať produkt';
1827var js_lang_product_delete_mnu_more = 'Zmazať produkty';
1828var js_lang_product_delete_prompt = 'Chcete zmazať označený produkt?';
1829var js_lang_product_delete_prompt_more = 'Chcete zmazať označené produkty?';
1830var js_lang_product_delete_prompt_count = 'Zadajte číslo';
1831var js_lang_product_delete_info = 'Zmazanie %s produktu prebehlo úspešne';
1832var js_lang_product_delete_info_pl = 'Zmazanie %s produktov prebehlo úspešne';
1833var js_lang_product_not_marked = 'Neboli označené žiadne produkty!';
1834var js_lang_product_manufacturer_changed = 'Výrobca bol úspešne zmenený';
1835var js_lang_product_selected = 'Naozaj ste si istý? Počet všetkých označených produktov je:';
1836var js_lang_product_mass_change_manufacturer = 'Zmeniť výrobcu pre';
1837var js_lang_product_mass_change_manufacturer_title = 'Hromadná zmena výrobcu';
1838var js_lang_product_mass_change_manufacturer_for = 'Hromadná zmena výrobcu pre';
1839
1840// Users
1841var js_lang_user_delete_mnu = 'Zmazať zákazníka';
1842var js_lang_user_delete_mnu_more = 'Zmazať zákazníkov';
1843var js_lang_user_delete_prompt = 'Chcete zmazať označeného zákazníka?';
1844var js_lang_user_delete_prompt_more = 'Chcete zmazať označených zákazníkov?';
1845
1846var js_lang_user_delete_prompt_count = 'Zadajte číslo';
1847
1848var js_lang_user_delete_info = 'Zmazanie %s zákazníka prebehlo úspešne';
1849var js_lang_user_delete_info_pl = 'Zmazanie %s zákazníkov prebehlo úspešne';
1850
1851var js_admin_admin_guide_vex_title = 'Sprievodca základným nastavením e-shopu';
1852var js_admin_admin_guide_firs_vex_msg = 'Vitajte na Vašom novom e-shope. Ako pomoc pri jeho nastavení Vám poslúži náš sprievodca.';
1853var js_admin_admin_guide_ag0 = 'Sprievodcu základným nastavením e-shopu spustíte TU';
1854var js_admin_admin_guide_btn_title = 'Nastavenie e-shopu';
1855var js_admin_admin_guide_btn_desc = 'Zostávajúci počet krokov:';
1856var js_admin_admin_guide_btn_prev = 'Predchádzajúci';
1857var js_admin_admin_guide_btn_next = 'Ďalší';
1858var js_admin_guide_vex_description = 'Pre dosiahnutie 100% je potrebné splnenie všetkých krokov, tak neváhajte a do toho!';
1859var js_admin_guide_off_msg = 'Sprievodca bol vypnutý, zapnete ho v sekcii Pomoc';
1860var js_admin_guide_on_msg = 'Sprievodca bol zapnutý';
1861
1862
1863var js_admin_guide_ag_1_1 = 'Meno odosielateľa, ktoré sa bude zobrazovať pri e-mailoch odoslaných z e-shopu.';
1864var js_admin_guide_ag_1_2 = 'E-mailová adresa, ktorá sa bude zobrazovať ako adresa odosielateľa.';
1865var js_admin_guide_ag_1_3 = 'E-mailová adresa pre príjem objednávkových notifikácií.';
1866var js_admin_guide_ag_1_4 = 'Zvoľte si SMTP metódu odosielania e-mailov<br>a nastavte potrebné údaje pre odosielanie elektronickej pošty.<br>Heslo je aktuálne heslo k danej emailovej adrese.';
1867var js_admin_guide_ag_1_4_smtp = 'Nastavte potrebné údaje pre odosielanie elektronickej pošty.<br>Heslo je aktuálne heslo k danej emailovej adrese.';
1868var js_admin_guide_ag_2_1 = 'Globálny meta názov (meta title), ktorý sa bude automaticky generovať za alebo pred meta názov stránok,<br>kategórií, produktov a článkov. Pre stránku kategórie napr.: "Názov kategórie - globálny meta title".';
1869var js_admin_guide_ag_2_2 = 'Tieto polia odporúčame nechať prázdne a meta dáta vyplniť v mape stránok pre každú kategóriu a stránku zvlášť, aby bola zachovaná unikátnosť obsahu meta dát.';
1870var js_admin_guide_ag_2_3 = 'Údaje, ktoré budú použité v hornej časti objednávkových e-mailov.';
1871var js_admin_guide_ag_3_1 = 'Názov obchodu, ktorý bude použitý v predmete objednávkových e-mailov.';
1872var js_admin_guide_ag_3_2 = 'Údaje, ktoré budú použité v hornej časti<br /> objednávkových e-mailov.';
1873var js_admin_guide_ag_4_1 = 'Zvoľte, či bude váš e-shop v režime platiteľa DPH.';
1874var js_admin_guide_ag_5_1 = 'Môžete vytvoriť nový spôsob dopravy.';
1875var js_admin_guide_ag_5_2 = 'Alebo editovať existujúci.';
1876var js_admin_guide_ag_5_2_1 = 'Zadajte názov nového spôsobu dopravy.';
1877var js_admin_guide_ag_5_2_2 = 'Vyberte štáty, pre ktoré bude daná doprava podporovaná.';
1878var js_admin_guide_ag_5_2_3 = 'Zvoľte výšku poplatku za dopravu.';
1879var js_admin_guide_ag_5_2_4 = 'Vyberte spôsob platieb, ktoré bude možné využiť pri zvolení tejto dopravy.';
1880var js_admin_guide_ag_5_2_5 = 'Definujte si rozsah sumy objednávky, pri ktorej sa bude doprava zobrazovať v pokladni.';
1881var js_admin_guide_ag_6_1 = 'Môžete vytvoriť nový spôsob platby.';
1882var js_admin_guide_ag_6_2 = 'Alebo editovať existujúci.';
1883var js_admin_guide_ag_6_2_1 = 'Zadajte názov nového spôsobu platby.';
1884var js_admin_guide_ag_6_2_2 = 'V prípade potreby nastavte zľavu alebo príplatok za danú platbu.';
1885var js_admin_guide_ag_6_2_3 = 'Označte v prípade, že ide o dobierku.';
1886var js_admin_guide_ag_7_1 = 'Vyberte štáty, ktoré sa budú zobrazovať ako možnosť voľby vo formulári pri registrácii zákazníka a ako štát doručenia v pokladni.';
1887var js_admin_guide_ag_8_1 = 'Nastavte si prvotné číslo, ktorým sa začnú číslovať objednávky.';
1888var js_admin_guide_ag_8_2 = 'Nastavte si výšku minimálnej sumy objednávky, kedy bude balné a doprava zdarma.';
1889var js_admin_guide_ag_9_1 = 'Upravte si text, ktorý sa bude zobrazovať v hornej časti objednávkových e-mailov, podľa vašich požiadaviek.';
1890var js_admin_guide_ag_9_2 = 'V prípade potreby môžete doplniť informácie, ktoré sa zákazníkom zobrazia na ďakovnej stránke po dokončení nákupu.';
1891var js_admin_guide_ag_9_3 = 'Upravte si text, ktorý sa bude zobrazovať v dolnej časti objednávkových e-mailov, podľa vašich požiadaviek.';
1892var js_admin_guide_ag_10_1 = 'Upravte si údaje, ktoré sa budú zobrazovať v hornej časti faktúr.';
1893var js_admin_guide_ag_11_1 = 'Máte možnosť upraviť zobrazenie variantov produktu v jeho detaile.';
1894var js_admin_guide_ag_11_2 = 'Zvoľte nastavenie predvoleného výberu variantov v detaile produktu.';
1895var js_admin_guide_ag_12_1 = 'Pokiaľ má produkt nastavenú cenu, ktorá je nižšia ako bežná cena tohto produktu (resp. je v akcii), tak si môžete nastaviť zobrazovanie aj bežnej ceny v detaile produktu.';
1896var js_admin_guide_ag_12_2 = 'Môžete si zvoliť v prípade, že chcete evidovať aj vašu nákupnú cenu produktu (nezobrazuje sa v dizajne).';
1897var js_admin_guide_ag_12_3 = 'Ďalšie ceny využijete, pokiaľ chcete produkty ponúkať v iných cenách pre rôzne zákaznícke skupiny (VIP, veľkoodberateľ, ...).';
1898var js_admin_guide_ag_13_1 = 'Pokiaľ je vypnutá kontrola skladu, tak bude možné produkt nakúpiť aj s nulovou skladovou zásobou.';
1899var js_admin_guide_ag_13_2 = 'Zvoľte si, kde všade je potrebné vyžadovať oboznámenia s obchodnými podmienkami.';
1900var js_admin_guide_ag_14_1 = 'Nastavte si ako budú zoradené produkty v kategórii.';
1901var js_admin_guide_ag_14_2 = 'Pri dvojstupňovom zoradení si budú môcť návštevníci zoradiť produkty vzostupne alebo zostupne.';
1902var js_admin_guide_ag_14_3 = 'Ponuka možností zoradenia pre návštevníkov.';
1903var js_admin_guide_ag_14_4 = 'V prípade, že chcete zobrazovať produkty, ktoré sú skladom ako prvé.';
1904var js_admin_guide_ag_14_5 = 'Informačný údaj, ktorý zobrazuje počet produktov v kategórii. Napr. "Názov kategórie (47)".';
1905var js_admin_guide_ag_15_1 = 'Sledovanie štatistík je už štandard. Zadajte si svoje Google Analytics ID. TIP: po uložení si zvoľte aj meranie konverzií.';
1906var js_admin_guide_ag_15_2 = 'Sitemapa je zoznam všetkých stránok a kategórií vášho e-shopu. Pomáha k indexovaniu týchto stránok a kategórií. TIP: odporúčame zvoliť "kategórie, produkty a obrázky".';
1907var js_admin_guide_ag_16_1 = 'V tejto časti si môžete nastaviť generovanie meta názvu stránok, kategórií, produktov a článkov.';
1908var js_admin_guide_ag_16_2 = 'Môžete si nastaviť oddeľovač, ktorý sa automaticky generuje do meta názvu. Príklad meta názvu kategórie: "Názov kategórie - globálny meta title".';
1909var js_admin_guide_ag_16_3 = 'Zvoľte si spôsob, akým sa overí alebo neoverí registrácia n
1909ového používateľa.';
1910var js_admin_guide_ag_16_4 = 'Nastavte si zobrazovanie cesty (breadcrumbs) prekliku po stránke (Príklad: úvod > kategória 1 > produkt 1).';
1911var js_admin_guide_ag_16_5 = 'Do týchto častí si môžete vkladať statické kódy (skripty), ktoré vykonávajú rôzne funkcie ako napríklad zobrazovanie chatovacieho okna, zbieranie údajov a pod.';
1912var js_admin_guide_ag_17_2 = 'ODKAZ NA CELY CLANOK';
1913var js_admin_guide_ag_18_1 = 'Kategórie produktov môžete spravovať TU.';
1914var js_admin_guide_ag_19_1 = 'Pridajte nový produkt.';
1915var js_admin_guide_ag_19_2 = 'Importuje produkty z externého súboru.';
1916var js_admin_guide_ag_19_3 = 'Editujte existujúci produkt.';
1917var js_admin_guide_ag_20_1 = 'Na nájdenie užitočného rozšírenia vám poslúžia naše navigačné nástroje.';
1918var js_admin_guide_ag_20_2 = 'Jednotlivé rozšírenia sa zobrazujú v zozname.';
1919
1920
1921var js_admin_written_amount = 'Pripísaných';
1922var js_admin_you_must_cancel_article_edit_first = 'Najprv musíte ukončiť úpravu článku!';
1923var js_admin_you_must_cancel_module_edit_first = 'Najprv musíte ukončiť úpravu modulu!';
1924var js_admin_you_must_save_your_text_editing_because_you_can_miss_your_editing = 'Najskôr uložte úpravu textu, aby ste neprišli o svoje zmeny!';
1925
1926
1927
1928var js_admin_invoice_with_this_number_exists_yet = 'Faktúra s týmto číslom už existuje!';
1929
1930var js_shop_product_comparing_check_same_msg = {
1931	1: 'Modrým hrubým písmom bol v tabulke porovnávania označený <strong>{count} rovnaký parameter</strong>.',
1932	2: 'Modrým hrubým písmom boli v tabulke porovnávania označené <strong>{count} rovnaké parametre</strong>.',
1933	5: 'Modrým hrubým písmom bolo v tabulke porovnávania označených <strong>{count} rovnakých parametrov</strong>.'
1934};
1935var js_shop_buy_only_registred_users_msg_reg = 'Objednávku môže dokončiť len registrovaný používatel.';
1936var js_shop_buy_only_registred_users_msg_product = 'Objednávku môže dokončiť len zákazník, ktorý má zakúpený registračný balíček.';
1937var js_shop_buy_only_registred_users_btn_reg = 'Registrovať';
1938var js_shop_buy_only_registred_users_btn_log = 'Prihlásiť';
1939var js_shop_buy_only_registred_users_btn_buy = 'Zakúpiť registračný balíček';
1940
1941var js_lang_prod_slick_show_more = 'Zobraziť všetky';
1942var js_lang_prod_slick_show_less = 'Zobraziť na riadok';
1943var js_lang_appstore_sef_conflicts_link_title = 'Otvoriť v novom okne';
1944var js_lang_appstore_sef_conflicts_conflict_1 = 'konflikt';
1945var js_lang_appstore_sef_conflicts_conflict_2 = 'konflikty';
1946var js_lang_appstore_sef_conflicts_conflict_3 = 'konfliktov';
1947var js_lang_appstore_sef_conflicts_no_conflicts = 'Žiadne konflikty nenájdené';
1948var js_lang_appstore_sef_conflicts_readable_url = 'Čitatelná URL';
1949var js_lang_appstore_sef_conflicts_category_name = 'Názov kategórie';
1950var js_lang_appstore_sef_conflicts_loading_text = 'Prebieha zisťovanie konfliktov';
1951var js_lang_appstore_sef_conflicts_vex_title = 'Kontrola konfliktov medzi URL kategórie a produktu';
1952var js_lang_variant_code2 = 'Kód variantu';
1953
1954// product Custom Export
1955var js_lang_custom_export_message = 'Nastavenia exportu produktov';
1956var js_lang_custom_export_yes = 'Exportovať do CSV';
1957var js_lang_custom_export_xlsx = 'Exportovať do XLSX';
1958var js_lang_custom_export_no = 'Zrušiť';
1959var js_lang_custom_export_remove_part_one = 'Šablóna s názvom ';
1960var js_lang_custom_export_remove_part_two = ' bola úspešne vymazaná.';
1961
1962
1963var js_lang_custom_export_alert_primary = 'Pre export je potrebné označiť aspoň jednu z možností.';
1964var js_lang_custom_export_alert_template_create = 'Pre pridanie šablóny označte aspoň jednu z možností.';
1965var js_lang_custom_export_templates = 'Dostupné šablóny:';
1966var js_lang_custom_export_template_name = 'Názov šablóny';
1967var js_lang_custom_export_template_select = '- Vyberte si šablónu -';
1968var js_lang_custom_export_add_new_templates = 'Pridať novú šablónu';
1969var js_lang_custom_export_select_all = 'Označiť všetky';
1970var js_lang_custom_export_unselect_all = 'Odznačiť všetky';
1971var js_lang_custom_export_remove_selected = 'Prajete si vymazať šablónu s názvom ';
1972var js_lang_custom_export_blank_template_name = 'Prosím zadajte názov vašej šablóny.';
1973var js_lang_custom_export_alert_already_exist = 'Šablóna s názvom ';
1974var js_lang_custom_export_alert_already_exist_two = ' už existuje.';
1975var js_lang_custom_export_helper_text_first_part = 'Šablóna exportu bude obsahovať ';
1976var js_lang_custom_export_helper_text_secound_part = ' aktuálne zvolené stĺpce (z ';
1977var js_lang_custom_export_helper_text_addition_three = ' aktuálne zvolených stĺpcov (z ';
1978var js_lang_custom_export_helper_text_addition_four = ' aktuálne zvolený stĺpec (z ';
1979var js_lang_custom_export_helper_text_saved_one = 'Šablóna s názvom ';
1980var js_lang_custom_export_helper_text_saved_two = ' bola úspešne vytvorená.';
1981var js_lang_custom_export_attributes_exists = ' s rovnakou kombináciou stĺpcov už existuje.';
1982var js_lang_custom_export_attributes_exists_part_one = 'Šablóna ';
1983
1984var js_lang_checkout_speedup_process_speed_up = 'Už ste u nás nakupovali';
1985var js_lang_checkout_speedup_process_logg_in = 'môžete sa prihlásiť';
1986var js_lang_checkout_speedup_process_speed_up_two = 'a urýchlite si vyplnenie údajov, alebo si môžete';
1987var js_lang_checkout_speedup_process_1 = 'a urýchlite si vyplnenie údajov';
1988var js_lang_checkout_speedup_process_fastcheckout = 'nakúpiť bez registrácie';
1989var js_lang_checkout_speedup_process_2 = 'alebo si môžete';
1990var js_lang_checkout_speedup_process_forgot_password = 'obnoviť zabudnuté heslo';
1991var js_lang_checkout_speedup_email_was_send = "Overovací e-mail Vám bol zaslaný na zadanú e-mailovú adresu.";
1992
1993var js_lang_additional_info_error = 'Skontrolujte prosím, či je formulár správne vyplnený';
1994
1995var js_lang_flypage_quatro_button_title = 'Quatro splátky';
1996
1997var js_lang_regenerate_prices = 'Pregenerovať ceny';
1998
1999var js_lang_virtual_variants_lbl = [
2000    {
2001        'all': 'Dostupné v'
2002    },
2003    {
2004        '0': 'variantoch',
2005        '1': 'variante',
2006        '2': 'variantoch'
2007    }
2008];
2009
2010var js_lang_phone_correct_msg = 'Prosím vylpňte správne tel. kontakt.';
2011var js_lang_back_btn_lbl = 'Späť na ';
2012var js_lang_coupon_move_from_archive = 'Vybraný kupón bol presunutý z archívu';
2013var js_lang_coupons_move_from_archive = 'Vybrané kupóny boli presunuté z archívu';
2014var js_lang_return_coupon_from_archive_confirm = 'Naozaj chcete vrátiť kupón "%d" z archívu?';
2015var js_lang_return_coupons_from_archive_confirm = 'Naozaj chcete vrátiť %d kupóny z archívu?';
2016var js_lang_return_5_or_more_coupons_from_archive_confirm = 'Naozaj chcete vrátiť %d kupónov z archívu?';
2017var js_lang_import_coupons_confirm = 'Naozaj chcete importovať kupóny zo súboru <strong>%s</strong>?';
2018var js_lang_import_coupons_updated = 'Počet upravených kupónov: <strong>%s</strong>';
2019var js_lang_import_coupons_created = 'Počet vytvorených kupónov: <strong>%s</strong>';
2020var js_lang_import_coupons_failed = 'Počet neexistujúcich Tiande ID: <strong>%s</strong>';
2021var js_lang_import_coupons_error = 'Chybný súbor.';
2022var js_lang_import_coupons_send_email = 'E-mail s nepriradenými Tiande ID bol odoslaný na <strong>%s</strong>';
2023var js_lang_import_gift_confirm = 'Naozaj chcete importovať darčeky zo 
2023súboru <strong>%s</strong>?';
2024var js_lang_import_gift_created = 'Počet naimportovaných darčekov: <strong>%s</strong>';
2025var js_lang_import_gift_sku_failed = 'Počet neexistujúcich SKU darčekov: <strong>%s</strong>';
2026var js_lang_import_tiande_gift_send_email = 'E-mail s nepriradenými Tiande ID<br>a neexistujúcimi kódmi produktov<br>bol odoslaný na <strong>%s</strong>';
2027
2028var js_lang_parimex_dwn = 'Stiahnúť súbor';
2029var js_lang_parimex_wait_please = 'počkajte prosím...';
2030var js_lang_parimex_running = 'Prebieha';
2031
2032var js_lang_content_modul_will_be_visible = 'Modul bude zobrazený';
2033var js_lang_content_modul_is_visible = 'Modul je zobrazený';
2034var js_lang_content_modul_was_visible = 'Modul bol zobrazený';
2035
2036// Coupon mess import
2037var js_lang_mess_coupon_import_more_selected_error = 'Nastala chyba, bolo zvolených viac ako 1 kupón.';
2038var js_lang_mess_coupon_import_load_file_error = 'Súbor sa nepodarilo načítať. Obnovte stránku a skúste nahrať súbor ešte raz.';
2039var js_lang_mess_coupon_import_read_file_error = 'Nastala chyba pri spracovávaní súboru. Skúste nahrať súbor ešte raz alebo skontrolujte jeho štruktúru/kódovanie.';
2040var js_lang_mess_coupon_import_count_title = 'Import prebehol úspešne';
2041var js_lang_mess_coupon_import_count = 'Počet importovaných kupónov: %text';
2042var js_lang_mess_coupon_import_count_duplicates_title = 'V súbore sú duplicity';
2043var js_lang_mess_coupon_import_count_duplicates = 'Počet duplicitných kupónov v importovanom súbore: %value';
2044var js_lang_mess_coupon_import_count_not_inserted_title = 'Zoznam duplicitných kupónov';
2045var js_lang_mess_coupon_import_count_not_inserted = 'Zoznam všetkých nájdených a nenaimportovaných duplicitných kupónov si môžete <a href="%link" target="_blank" download> stiahnuť tu. </a>';
2046var js_lang_mess_coupon_import_start_title = 'Informácia';
2047var js_lang_mess_coupon_import_start = 'Začal sa import kupónov (počet: %value). O dokončení Vás budeme informovať notifikáciou.';
2048
2049var js_lang_no_search_match_for = 'Žiadna zhoda pre slovo';
2050
2051var js_lang_luigibox_hint = 'Pre bežné vyhľadávanie slova {query}, stlačte Enter';
2052var js_lang_luigibox_min_chars = 'Zadajte prosím minimálne {char} znaky';
2053var js_lang_luigibox_min_chars_one_char = 'Zadajte prosím minimálne {char} znak';
2054var js_lang_luigibox_addtocart = 'Do košíka';
2055var js_lang_luigibox_Showall = 'Zobraziť všetko';
2056var js_lang_luigibox_top_product = 'Top produkt';
2057var js_lang_luigibox_ac_query = 'Populárne vyhľadávania';
2058var js_lang_luigibox_ac_categories = 'Kategórie';
2059var js_lang_luigibox_ac_products = 'Produkty';
2060var js_lang_luigibox_ac_manufacturers = 'Výrobcovia';
2061var js_lang_luigibox_ac_articles = 'Články';
2062
2063var js_lang_phpshop_product_incr_credit_by_purchase_text = 'Nákupom tohto produktu získate kredit vo výške <span class="credit_val">%s</span> bodov.';
2064var js_lang_phpshop_product_incr_credit_by_purchase_text_1 = 'Nákupom tohto produktu získate kredit vo výške <span class="credit_val">%s</span> bod.';
2065var js_lang_phpshop_product_incr_credit_by_purchase_text_5 = 'Nákupom tohto produktu získate kredit vo výške <span class="credit_val">%s</span> body.';
2066
2067
2068var js_lang_really_want_you_remove_this_item = 'Naozaj chcete odstrániť túto položku?';
2069
2070var js_lang_product_min_characters = 'Odporúčame použiť min. 3 znaky.';
2071
2072var js_lang_product_stock_movement_vex_title = 'Hromadné skladové pohyby produktov';
2073var js_lang_product_add_stock_movement = 'Pridať skladový pohyb';
2074var js_lang_product_sku_no_exist = 'Kód produktu neexistuje';
2075var js_lang_product_set_on_main = 'Nastaviť na hlavný produkt';
2076var js_lang_product_select_variant_sku = 'Zvoľte kód variantu';
2077var js_lang_product_use = 'Použiť';
2078var js_lang_product_movement_date = 'Dátum pohybu';
2079var js_lang_product_movement_type = 'Druh pohybu';
2080var js_lang_product_movement_type_r = 'Príjem';
2081var js_lang_product_movement_type_i = 'Výdaj';
2082var js_lang_product_movement_type_a = 'Inventúrny príjem';
2083var js_lang_product_movement_type_b = 'Inventúrny výdaj';
2084var js_lang_suppl_invoice = 'Dodávateľská faktúra';
2085var js_lang_note = 'Poznámka';
2086var js_lang_supplyer = 'Dodávateľ';
2087
2088var js_lang_shuch_club_card_text = 'Číslo karty vpíšte len vtedy, ak už ste majiteľom klubovej karty';
2089
2090var js_lang_new_form_item = 'Položka';
2091var js_lang_new_form_nesessery = 'je povinná';
2092var js_lang_new_form_nesessery_item = 'Táto položka je povinná.';
2093var js_lang_new_pickupdate_rule = 'Najskorší možný termín je o 2 pracovné dni';
2094
2095// GDPR
2096var js_vex_first_login_title = 'Ochrana osobných údajov';
2097var js_vex_first_login_info = 'Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem <br> Ipsum has been the industrys standard dummy text ever since the 1500s';
2098var js_gdpr_tooltip = "V našej spoločnosti dbáme na to, aby naši zákazníci boli spokojní<br>- chceme vám poskytovať kvalitné služby šité na mieru.<br>Preto je potrebné, aby ste nám poskytli súhlas na spracovanie vašich osobných údajov.";
2099var js_newsletter_tooltip = "Označením políčka udeľujem prevádzkovateľovi súhlas so spracovaním<br> mnou poskytnutých osobných údajov na účely zasielania newsletteru<br> a zároveň potvrdzujem, že som sa oboznámil/a s pravidlami spracovania osobných údajov,<br>
2099 ktoré sú uvedené v sekcii „Ochrana osobných údajov“ na tejto stránke.";
2100var js_newsletter_tooltip_inverse = "Neoznačením políčka udeľujem prevádzkovateľovi súhlas so spracovaním<br> mnou poskytnutých osobných údajov na účely zasielania newsletteru<br> a zároveň potvrdzujem, že som sa oboznámil/a s pravidlami spracovania osobných údajov,<br> ktoré sú uvedené v sekcii „Ochrana osobných údajov“ na tejto stránke.";
2101var js_gdpr_agree_to_gdpr = 'Je potrebný Váš súhlas so spracovaním osobných údajov.';
2102var js_gdpr_wrong_iban = 'Čislo účtu v tvare IBAN je nesprávne';
2103
2104var js_universal_contact_form_suc_alert = "Ďakujeme za Vašu správu.";
2105
2106// GDPR Zakaznik
2107var js_gdpr_copy = 'Kopírovať verziu GDPR článku do schránky';
2108var js_gdpr_version = 'Verzia GDPR článku';
2109var js_gdpr_version_title = 'Verzia GDPR článku';
2110var js_gdpr_cdate = 'Dátum súhlasu';
2111var js_gdpr_form_id = 'Miesto súhlasu';
2112var js_gdpr_version_title_head = 'Verzia GDPR článku';
2113var js_gdpr_cdate_title_head = 'Dátum súhlasu';
2114var js_gdpr_form_id_title_head = 'Miesto súhlasu';
2115
2116var js_gdpr_watch_dog = 'Strážny pes';
2117var js_gdpr_send_to_friend = 'Odporuč priateľovi';
2118var js_gdpr_product_question = 'Otázka na produkt';
2119var js_gdpr_contact_form = 'Kontaktný formulár';
2120var js_gdpr_register_form = 'Registračný formulár';
2121var js_gdpr_module_newsleatter = 'Modul Newsleatter';
2122var js_gdpr_module_short_contact_form = 'Modul s kontaktným formularom';
2123var js_gdpr_module_contest_form = 'Modul súťaž';
2124var js_gdpr_checkout = 'Pokladňa';
2125var js_gdpr_dt_form = 'Formulár na mieru';
2126var js_gdpr_unknown = "Neznáme";
2127var js_gdpr_comment = 'Komentár';
2128var js_gdpr_product_best_price = 'Našli ste lepšiu cenu?';
2129var js_gdpr_representative_contact = 'Kontakt na reprezentanta';
2130var js_gdpr_first_login = 'Prvé prihlásenie';
2131
2132var js_gdpr_empty_data = 'Neevidujeme žiadny súhlas';
2133
2134var js_gdpr_personal_data_title = 'Výpis osobných údajov';
2135var js_gdpr_personal_gdpr_approval_title = 'Súhlasy so spracovaním osobných údajov';
2136
2137var js_gdpr_article_copy = "Článok bol skopírovaný do schránky (s Ctrl + V ho vložíte na iné miesto)";
2138
2139var js_lang_town = "Mesto";
2140var js_lang_company = "Spoločnosť";
2141var js_lang_country = "Krajina";
2142var js_lang_zip = "PSČ";
2143var js_lang_name = "Meno";
2144var js_lang_gdpr_name = "Meno";
2145var js_lang_surname = "Priezvisko";
2146var js_lang_middle_name = "Stredné meno";
2147var js_lang_state = "Štát";
2148var js_lang_title = "Titul";
2149var js_lang_phone = "Tel. číslo";
2150var js_lang_phone_2 = "Tel. číslo 2";
2151var js_lang_address_type = "Typ adresy";
2152var js_lang_address_type_bt = "Fakturačná adresa";
2153var js_lang_address_type_st = "Dodacia adresa";
2154var js_lang_address = "Adresa";
2155var js_lang_address_2 = "Adresa 2";
2156
2157var js_lang_delete_customer_are_you_sure_cus = "Naozaj ste si istý? Chcete zmazať zvolených zákazníkov?";
2158var js_lang_delete_customer_are_you_sure_adm = "Naozaj ste si istý? Chcete zmazať zvolených administrátorov?";
2159
2160var js_gdpr_singed_credit_system_0 = "Svoju účasť vo vernostnom programe môžete kedykoľvek ";
2161var js_gdpr_singed_credit_system_1 = "zmeniť/ upraviť tu";
2162
2163var js_gdrp_agree_info_0 = "Bol som oboznámený s";
2164var js_gdrp_agree_info_1 = "obchodnými podmienkami";
2165var js_gdrp_agree_info_2 = "a beriem na vedomie";
2166var js_gdrp_agree_info_3 = " spracovanie osobných údajov.";
2167
2168var js_lang_shopping_cart_empty_confirm = 'Naozaj chcete vyprázdniť nákupný košík?';
2169var js_lang_product_has_been_to_cart = 'Produkt bol pridaný do nákupného košíka';
2170
2171var js_lang_availability = 'Dostupnosť';
2172
2173var js_add_product_to_parents_category = 'Pridanie produktu do nadradených kategórií';
2174var js_add_products_to_parents_category = 'Hromadné pridanie %s produktov do nadradených kategórií';
2175var js_add_product_to_parents_category_confirm = 'Naozaj si prajete zaradiť vybraný produkt do všetkých nadradených kategórií?<br><br>Znamená to, že produkt bude zaradený do všetkých kategórií, ktoré sú nadradené ku kategóriám, do ktorých produkt aktuálne patrí.';
2176var js_add_products_to_parents_category_confirm = 'Naozaj si prajete zaradiť vybrané produkty do všetkých nadradených kategórií?<br><br>Znamená to, že produkty budú zaradené do všetkých kategórií, ktoré sú nadradené ku kategóriám, do ktorých produkty aktuálne patria.';
2177
2178var js_shop_cart_quantity = 'Množ.';
2179var js_shop_flypage_lbl = 'Detail produktu';
2180var cms_js_lang_cms_lightbox_txtimage = 'Obrázok';
2181var cms_js_lang_cms_lightbox_txtof = 'z';
2182
2183var js_PHPSHOP_GDPR_CREDIT_SYSTEM_ON = "Chcete byť zaradený/á do vernostného programu?";
2184var js_PHPSHOP_GDPR_CREDIT_SYSTEM_OFF = "Chcete sa odhlásiť z vernostného programu? Prídete o %X% kreditov.";
2185
2186var js_all_categories = 'Všetky kategórie';
2187var js_close_categories = 'Zavrieť kategórie';
2188var GDPR_EMAIL_ADDED = 'Vaša e-mailová adresa bola pridaná do odberu newsletteru';
2189var GDPR_EMAIL_REMOVED = 'Váš e-mail bol odstránený z odberu newsletteru.';
2190var GDPR_NO_EMAIL = 'Nie je zadaný Váš email';
2191var ACC_VOUCHER_EMAIL_NOT_VALID = 'Neplatná emailová adresa.';
2192var GDPR_EMAIL_SEND2 = "Na Vašu e-mailovú adresu už bol zaslaný potvrdzovací e-mail.";
2193var APPROVE_REQUIRED = "Je potrebný Váš súhlas";
2194var GDPR_NO_ACCEPTED = "Je potrebný Váš súhlas so spracovaním osobných údajov.";
2195var GDPR_EMAIL_QUESTION = "Skutočne sa chcete odhlásiť z odberu noviniek?";
2196var GDPR_EMAIL_SEND = "Na Vašu e-mailovú adresu bol zaslaný potvrdzovací e-mail.";
2197var LM_SAME_EMAIL_TWICE = "Vami zadaná e-mail adresa je už do Newslettera prihlásená.";
2198var LM_FORM_NOEMAIL = "Zadajte prosím platnú e-mailovú adresu.";
2199var js_admin_settings_goto_manual = "Prejsť na manuál";
2200var cms_js_lang_category_choose = '- Vyberte si -';
2201var js_PHPSHOP_CONTEST_NEWSLETTER_TEXT_ADMIN_TOOLTIP = 'Ak je funkcia zapnutá, zákazníkom je zobrazený súhlas s odberom noviniek (newsletter-a) - prostredníctvom zaškrtávacieho tlačidla vo formulároch na e-shope.';
2202var js_lang_shopping_cart_delete_item_confirm = 'Naozaj chcete odstrániť produkt z košíka?';
2203
2204var js_lang_insufficient_quantity_inform = 'Nebolo možné pridať požadované množstvo produktu, množstvo bolo zmenené z {from} na {to}.';
2205var js_lang_insufficient_quantity_inform_max = 'V nákupnom košíku je maximálne povolené množstvo produktu k nákupu. Pridané množstvo bolo zmenené z {from} {unit} na {to} {unit}.';
2206var js_lang_insufficient_quantity_inform_max_2 = 'V nákupnom košíku je maximálne povolené množstvo produktu k nákupu. Vami zadané množstvo nebolo pridané.';
2207var js_lang_insufficient_quantity_inform_min = 'Množstvo v nákupnom košíku bolo zmenené z {from} {unit} na {to} {unit} kvôli minimálnemu povolenému množstvu k nákupu.';
2208
2209var cms_js_lang_multilang_import_enabled_alert = 'Pokiaľ importujete cudzojazyč
2209né dáta produktov, import nebude možné vrátiť naspäť.';
2210
2211var js_PHPSHOP_INVOICED_SERVICES_MSG_TOMORROW = 'zajtra.';
2212var js_admin_export_omega = 'Dáta do Omegy boli úspešne exportované.';
2213
2214var mod_quickicon_add_title = 'Priradiť ';
2215var mod_quickicon_remove_title = 'Odobrať ';
2216var mod_quickicon_keep_title = 'Ponechať ';
2217var mod_quickicon_export_error = 'Export pre cenový portál bol už spustený pred menej ako hodinou, manuálne spustenie generovania je možné max. raz za hodinu.';
2218var mod_quickicon_export_error2 = 'Váš balík neumožnuje exportovať pre cenové portály.';
2219var mod_quickicon_export_error3 = 'Pre správne nastavenie exportov a dosiahnutie čo najlepších výsledkov pozícií na cenových portáloch nastavte číselnú hodnotu (vyjadrenú v počte dní) pre Dodacie lehoty produktov.V úprave produktu upravte všetky Dodacie lehoty tak, že im nastavíte číselný počet dní.';
2220var mod_quickicon_delete_cookie_error = 'Nečakaná chyba';
2221var mod_quickicon_delete_cookie = 'Cookie boli vymazané.';
2222var mod_quickicon_change_design = 'Zmena štýlu dizajnu';
2223var mod_quickicon_export_activated_for = 'Momentálne máte aktivovaný export pre: ';
2224var mod_quickicon_activated_question = 'Prajete si aktivovať práve tieto cenové portály?';
2225var mod_quickicon_no_activated_portal = 'Nevybrali ste žiadny cenový portál pre aktiváciu.';
2226var mod_quickicon_choose_one_category = 'Zvoľte si aspoň 1 kategóriu prosím.';
2227var mod_quickicon_text1 = 'Priradiť hodnotu "žiadne portály" ku ';
2228var mod_quickicon_text2 = 'Priradiť vybrané portály ku ';
2229var mod_quickicon_text3 = ' kategóriám?';
2230var mod_quickicon_text4 = ' kategórií?';
2231var mod_quickicon_text5 = 'Počet vybraných kategórií: ';
2232var mod_quickicon_text6 = 'Pridať vybrané kategórie do ';
2233var mod_quickicon_text7 = 'Odstrániť vybrané kategórie z ';
2234var mod_quickicon_text8 = ' portálov?';
2235var mod_quickicon_text9 = ' portálu?';
2236
2237var mod_quickicon_add_portal_text1 = '<b>Uložiť nasledovné zmeny pre ';
2238var mod_quickicon_add_portal_text2_1 = ' zvolenú kategóriu?';
2239var mod_quickicon_add_portal_text2_2 = ' zvolené kategórie?';
2240var mod_quickicon_add_portal_text2_3 = ' zvolených kategórií?';
2241var mod_quickicon_add_portal_text3_1 = '<b>Priradiť ';
2242var mod_quickicon_add_portal_text3_2 = ' nový portál:</b><br/>';
2243var mod_quickicon_add_portal_text3_3 = ' nové portály:</b><br/>';
2244var mod_quickicon_add_portal_text3_4 = ' nových portálov:</b><br/>';
2245var mod_quickicon_add_portal_text4_1 = '<b>Odobrať ';
2246var mod_quickicon_add_portal_text4_2 = ' portál:</b><br/>';
2247var mod_quickicon_add_portal_text4_3 = ' portály:</b><br/>';
2248var mod_quickicon_add_portal_text4_4 = ' portálov:</b><br/>';
2249
2250var js_lang_select_orders = 'Zvoľte si prosím objednávky pre túto akciu';
2251var js_lang_neoship_no_token = 'Zlý token';
2252var js_lang_neoship_select_orders = 'Zvoľte objednávky ktoré majú príznak Export do Neoship';
2253var js_lang_neoship_not_select_orders = 'Zvoľte objednávky ktoré nemajú príznak Export do Neoship';
2254var js_lang_neoship_select_exported_orders = 'Zvolte iba objednávky, ktoré boli exportované do Neoship';
2255var js_lang_neoship_data_not_send = 'Neboli zaslané žiadne údaje';
2256var js_lang_neoship_exported_order = 'Exportované obj';
2257var js_lang_neoship_exported_order_detail = 'Tieto objednávky boli úspešne exportované: ';
2258var js_lang_neoship_not_exported_order_detail = 'Chyba v obj č. ';
2259var js_lang_neoship_vex_title = 'Export objednávok do Neoship';
2260var js_lang_neoship_vex_number_of_pack = 'Počet balíkov';
2261var js_lang_neoship_vex_number_of_pack_placeholder = 'zadajte počet balíkov';
2262var js_lang_neoship_vex_number_of_pack_placeholder_error = 'Hodnota musí byť číslo väčšie ako 0';
2263var js_lang_neoship_vex_value_of_ins = 'Výška poistenia';
2264var js_lang_neoship_vex_value_of_ins_placeholder = 'zadajte výšku poistenia';
2265var js_lang_neoship_vex_value_of_ins_placeholder_error = 'Hodnota musí byť číslo medzi 0 a 5001';
2266var js_lang_neoship_vex_sms = 'Poslať SMS';
2267var js_lang_neoship_vex_email = 'Poslať E-mail';
2268var js_lang_neoship_vex_sat_delivery = 'Sobotné doručenie';
2269var js_lang_neoship_vex_express_delivery = 'Typ doručenia';
2270var js_lang_neoship_vex_export = 'Exportovať';
2271var js_lang_neoship_vex_export_setEmail = 'Nastala chyba pri nastavení E-mailu. Kontaktuje prosím administrátora.';
2272var js_lang_neoship_tracking_not_avail = 'Sledovanie je k dispozícii iba pre odoslané objednávky.';
2273var js_lang_neoship_protocol_download_title = 'Tlač preberacích protokolov';
2274var js_lang_neoship_protocol_download_shippper = 'Vyberte dopravcu';
2275var js_lang_neoship_protocol_download_date = 'Vyberte dátum';
2276var js_lang_neoship_protocol_print = 'Tlačiť';
2277
2278var cms_js_lang_shipping_address_name_must_be_unique = 'Názov dodacej adresy musí byť unikátny.';
2279var cms_js_lang_no_shipping_address = 'Žiadne dodacie adresy.';
2280var cms_js_lang_delete_specific_shipping_address_confirm = 'Naozaj chcete odstrániť adresu s názvom <strong>%s</strong>';
2281var cms_js_lang_delete_shipping_address_confirm = 'Naozaj chcete odstrániť vybrané adresy?';
2282var cms_js_lang_phone_1_validate = 'Tel.kontakt a IČO musí byť číslo.';
2283var cms_js_lang_phone_1_validate2 = 'Tel. kontakt obsahuje nepovolený znak. Povolené znaky sú 0-9, +, medzera, /, -, –';
2284var cms_js_lang_phone_1_validate3 = 'IČO môže obsahovať len čísla a písmená.';
2285var js_lang_form_validation_sk_phone = 'Telefónne číslo musí začínať +421 alebo 0 a obsahovať 9 číslic za predvoľbou.';
2286var js_lang_form_validation_email = 'Nesprávny tvar e-mailovej adresy.';
2287
2288var cms_js_lang_order_status_change1 = 'Objednávky s číslom ';
2289var cms_js_lang_order_status_change2 = ' boli zmenené.';
2290
2291var js_lang_repurchase_mobile_min_char = 'Zadajte min. 3 znaky';
2292var js_lang_repurchase_mobile_no_match = 'Neboli nájdené žiadne výsledky';
2293var js_lang_repurchase_mobile_one_match = ' výsledok';
2294var js_lang_repurchase_mobile_two_match = ' výsledky';
2295var js_lang_repurchase_mobile_five_match = ' výsledkov';
2296
2297var js_lang_google_recaptcha_error_msg = 'Potvrďte prosím, že nie ste robot prostredníctvom reCAPTCHA.';
2298
2299var js_lang_checkout_shipping_changed = 'Spôsob dopravy bol upravený';
2300var js_lang_checkout_shipping_changed_text = 'Váš spôsob dopravy bol upravený z dôvodu, že množstvo niektorého z produktov v košíku nevyhovuje pre vami zvolený spôsob dopravy. Prosím zvoľte iný spôsob dopravy.';
2301
2302var js_admin_lang_delete = "Zmazať";
2303var js_admin_lang_delete_alert = "Pozor, chystáte sa zmazať";
2304var js_admin_lang_delete_accepted_y = "Úspešne zmazaný ";
2305var js_admin_lang_delete_accepted_i = "Úspešne zmazaní ";
2306var js_admin_lang_delete_accepted_a = "Úspešne zmazaná ";
2307var js_admin_lang_delete_accepted_e = "Úspešne zmazané ";
2308var js_admin_lang_delete_accepted_more = "Úspešne zmazaných ";
2309var js_admin_lang_delete_accepted_user = " zákazník.";
2310var js_admin_lang_delete_accepted_user_2 = " zákazníci.";
2311var js_admin_lang_delete_accepted_user_3 = " zákazníka.";
2312var js_admin_lang_delete_accepted_users = " zákazníkov.";
2313var js_admin_lang_delete_accepted_product = " produkt.";
2314var js_admin_lang_delete_accepted_product_2 = " produkty.";
2315var js_admin_lang_delete_accepted_products = " produktov.";
2316var js_admin_lang_delete_accepted_param = "parameter";
2317var js_admin_lang_delete_accepted_param_2 = "parametre";
2318var js_admin_lang_delete_accepted_params = "parametrov";
2319var js_admin_lang_delete_accepted_article = " článok.";
2320var js_admin_lang_delete_accepted_article_2 = " články.";
2321var js_admin_lang_delete_accepted_articles = " článkov.";
2322var js_admin_lang_delete_accepted_admin = " admin.";
2323var js_admin_lang_delete_accepted_admin_2 = " admini.";
2324var js_admin_lang_delete_accepted_admin_3 = " admina.";
2325var js_admin_lang_delete_accepted_admins = " adminov.";
2326var js_admin_lang_delete_accepted_order = " objednávka";
2327var js_admin_lang_delete_accepted_order_2 = " objednávky";
2328var js_admin_lang_delete_accepted_order_3 = " objednávku";
2329var js_admin_lang_delete_accepted_orders = " objednávok";
2330var js_lang_user_delete_prompt_more_content = 'Naozaj ste si istý? Počet všetkých označených zákazníkov na zmazanie:';
2331var js_lang_user_delete_prompt_count_please = 'Prosím zadajte číslo';
2332var js_lang_user_delete_prompt_count_info_cur = '(počet zákazníkov na tejto strane)';
2333var js_lang_user_delete_prompt_count_info_other = '(počet zákazníkov na ďalších stranách)';
2334var js_lang_user_delete_error = 'Zadajte správny počet zákazníkov, prosím.';
2335var js_lang_admin_delete_prompt_more_content = 'Naozaj ste si istý? Počet všetkých označených adminov na zmazanie:';
2336var js_lang_admin_delete_prompt_count_please = 'Prosím zadajte číslo';
2337var js_lang_admin_delete_prompt_count_info_cur = '(počet adminov na tejto strane)';
2338var js_lang_admin_delete_prompt_count_info_other = '(počet adminov na ďalších stranách)';
2339var js_lang_admin_delete_error = 'Zadajte správny počet adminov, prosím.';
2340var js_lang_order_delete_prompt_more_content = 'Naozaj ste si istý? Počet všetkých označených objednávok na zmazanie:';
2341var js_lang_order_delete_prompt_count = 'Prosím zadajte číslo';
2342var js_lang_order_delete_prompt_count_info_cur = '(počet objednávok na tejto strane)';
2343var js_lang_order_delete_prompt_count_info_other = '(počet objednávok na ďalších stranách)';
2344var js_lang_order_delete_error = 'Zadajte správny počet objednávok, prosím.';
2345var js_lang_product_delete_prompt_more_content = 'Naozaj ste si istý? Počet všetkých označených produktov na zmazanie:';
2346var js_lang_product_delete_prompt_count_please = 'Prosím zadajte číslo';
2347var js_lang_product_delete_prompt_count_info_cur = '(počet produktov na tejto strane)';
2348var js_lang_product_delete_prompt_count_info_other = '(počet produktov na ďalších stranách)';
2349var js_lang_product_delete_error = 'Zadajte správny počet produktov, prosím.';
2350var js_lang_article_delete_prompt_more_content = 'Naozaj ste si istý? Počet všetkých označených článkov na zmazanie:';
2351var js_lang_article_delete_prompt_count_please = 'Prosím zadajte číslo';
2352var js_lang_article_delete_prompt_count_info_cur = '(počet článkov na tejto strane)';
2353var js_lang_article_delete_prompt_count_info_other = '(počet článkov na ďalších stranách)';
2354var js_lang_article_delete_error = 'Zadajte správny počet článkov, prosím.';
2355
2356var js_lang_variant_delete_error = 'Zadajte správny počet variantov, prosím.';
2357var js_lang_variant_delete_main_text_01 = 'Naozaj si prajete zmazať varianty obsahujúce text';
2358var js_lang_variant_delete_main_text_02 = '(varianty budú reálne odstránené až po uložení úpravy produktu)';
2359var js_lang_variant_delete_main_text_03 = 'Počet nájdených variantov';
2360var js_admin_lang_delete_accepted_variant = "variant";
2361var js_admin_lang_delete_accepted_variant_2 = "varianty";
2362var js_admin_lang_delete_accepted_variant_3 = "variant";
2363var js_admin_lang_delete_accepted_variants = "variantov";
2364
2365var cms_js_lang_credit_note_next_no_err = 'Dobropis so zadaným číslom už existuje. Zadajte prosím iné.';
2366var cms_js_lang_order_chcek_stock_after_update = 'Dôjde ku zmene počtu kusov v objednávke. Skontrolujte prosím počty kusov na hlavnom/dodávateľskom sklade pri jednotlivých položkách objednávky.';
2367var cms_js_lang_order_chcek_stock_sum_error = 'Súčet hlavného a dodávateľského skladu sa musí rovnať počtu objednaných kusov.';
2368
2369var cms_js_lang_shop_coupon_total = 'Pevná čiastka';
2370var cms_js_lang_shop_coupon_percent = 'Percentá';
2371var cms_js_lang_shop_coupon_type_gift = 'Jednorazový';
2372
2373var cms_js_lang_shop_coupon_type_permanent = 'Trvalý';
2374var cms_js_lang_shop_coupon_type_automatic = 'Automatický';
2375var cms_js_lang_shop_coupon_type_deductable = 'Odpočítateľný';
2376var cms_js_lang_shop_coupon_type_gift_voucher = 'Darčeková poukážka';
2377
2378var cms_js_lang_product_img_path_change = 'Cesta k zvolenému obrázku neexistuje alebo bol zmazaný';
2379
2380
2381var cms_js_lang_modeule_hide_0 = 'Naozaj chcete skryť názov modulu?';
2382var cms_js_lang_modeule_hide_1 = 'Naozaj chcete zobraziť názov modulu?';
2383var cms_js_lang_modeule_hide_2 = 'Naozaj chcete skryť modul?';
2384var cms_js_lang_modeule_hide_3 = 'Modul nieje možné skryť';
2385
2386var cms_js_lang_external_scripts = 'Externé skripty:';
2387var cms_js_lang_external_scripts_tip = 'Zakázať vykonanie javascriptu v admin sekcii Obsah';
2388var cms_js_module_banner_editable_no_tags = 'Nie sú dostupné žiadne prvky pre úpravu bannera.';
2389
2390
2391var js_import_product_help_complication_info = new Array();
2392js_import_product_help_complication_info[0] = 'Nahlásenie komplikácii s importom produktov:';
2393js_import_product_help_complication_info[1] = 'V prípade komplikácii s importom produktov Vám odporúčame navštíviť <a href="index2.php?option=com_apps&mode=faqdetail&id=314" target="_blank"><strong>návod z admin sekcie Pomoc</strong></a>, kde sa nachádzajú odpovede na najčastejšie otázky. ';
2394js_import_product_help_complication_info[2] = 'Ak si aj naďalej nebudete vedieť s import poradiť, postupujte prosím podľa bodov nižšie. Následne budeme vedieť efektívne odpovedať na Vaše otázky a pomôcť Vám so správnou konfiguráciou nastavení pri importovaní CSV súboru: ';
2395js_import_product_help_complication_info[3] = '1) Zašlite nám screenshot v JPEG formáte, na ktorom bude viditeľná konfigurácia všetkých nastavení, ktorú ste zadali pred spustením samotného importu.';
2396js_import_product_help_complication_info[4] = '2) V prílohe e-mailu nám prepošlite CSV súbor, ktorý sa pokúšate importovať. Ak je súbor väčší ako 2 MB, zabaľte ho a zašlite nám ho ako ZIP súbor.';
2397js_import_product_help_complication_info[5] = 'Po kliknutí na tlačidlo <strong>Spustiť import</strong> sa automaticky vykoná <strong>záloha VŠETKÝCH produktov</strong> (nie iba importovaných produktov) v momente spustenia hromadného importu. Po vykonaní importu produktov budete vyzvaný potvrdiť správnosť importu kliknutím na tlačidlo <strong>Import je v poriadku</strong>. Navyše máte možnosť vrátiť všetky zmeny späť do času spred vykonania importu kliknutím na tlačidlo <strong>Zrušiť import a vrátiť dáta späť</strong>.';
2398js_import_product_help_complication_info[6] = 'Odporúčame Vám import produktov vždy potvrdiť, alebo vrátiť dáta späť do času pred importom <strong>ihneď po vykonaní importu produktov</strong>. V opačnom prípade môže nastať situácia, kedy dôjde ku vráteniu dát späť až po určitej dobe od vykonania importu - napríklad iným administrátorom, ktorý bude importovať produkty. Upozorňujeme, že dáta všetkých produktov sú vždy vrátené do pôvodného stavu pred posledným importom. Všetky zmeny, ktoré v dátach n
2398astali (odpočítanie zo skladu na základe objednávky atď...) budú teda vrátené späť do času spred posledného importu.';
2399
2400var cms_js_temporary_unavailable = 'Dočasne nedostupné';
2401var cms_js_contact_us_inform = 'informujte sa';
2402
2403var cms_js_selected_customer_no_orders = 'Pre vybraných zákaznikov neevidujeme žiadne objednávky';
2404var cms_js_orders_transfere = 'Presun objednávok';
2405var cms_js_orders_transfere_done = 'Objednávky boli presunuté';
2406var cms_js_total_order_transfered = 'Celkový počet objednávok, ktoré budú presunuté';
2407
2408var js_lang_check_stock_from_external_source = 'Overujem skladovú zásobu';
2409var js_lang_check_coupon_from_external_source = 'Overujem kupón';
2410var js_lang_check_gift_voucher_from_external_source = 'Overujem darčekovú poukážku';
2411var js_lang_my_account = 'Môj účet';
2412
2413var js_cart_select_item = 'Zvoľte si variant pre tento produkt.';
2414var js_lang_finstat_info_message = 'Vpíšte sem názov firmy alebo IČO a automaticky doplníme všetky fakturačné údaje vašej firmy.';
2415var js_lang_finstat_info_fill_message = 'Firemné údaje boli úspešne vyplnené';
2416var js_lang_google_places_info_message = 'Začnite písať, automatické dopĺňanie údajov adresy je aktívne.';
2417var js_lang_checkout_vat_valid = 'platné IČ DPH';
2418var js_lang_checkout_vat_valid_with_zero_vat = 'platné IČ DPH - nákup bez DPH pri nákupe zo zahraničia';
2419var js_lang_checkout_vat_invalid = 'neplatné IČ DPH';
2420var js_lang_checkout_vat_invalid_unable_to_check_vat_number = 'IČ DPH nebolo možné overiť automaticky';
2421var js_lang_checkout_vat_unavail = 'IČ DPH nie je možné overiť';
2422
2423var js_lang_checkout_tin_number_message = 'Ak je vaša spoločnosť platcom DPH, vyplňte nasledujúce pole vo formáte HU99999999.';
2424
2425var js_lang_checkout_delivery_might_take_longer = 'Doba dodania sa môže líšiť';
2426var js_lang_checkout_delivery_might_take_longer_button_back = 'Späť';
2427
2428var js_lang_blog_edit_vex_title = 'Nastavenia blog sekcie';
2429var js_lang_blog_edit_vex_canceled = 'Úprava nastavení blog sekcie bola zrušená';
2430var js_lang_blog_edit_vex_ok = 'Nastavenia blog sekcie boli zmenené';
2431
2432var cms_js_lang_cfg_product_param_type_change_confirm_2 = 'Naozaj chcete zmenit typ parametra %s1? Táto hodnota bude odstránená z parametrov %s2.';
2433
2434var js_lang_check_coupon = 'Overujem kupón';
2435var js_lang_recommended_button = 'Odporúčané aplikácie';
2436
2437var cms_js_lang_session_expired = 'Prihlásenie vypršalo, pre pokračovanie je potrebné sa prihlásiť.';
2438
2439var js_lang_max_product_stock_per_order = '(pri objednávke max. {stock}ks)';
2440
2441var js_lang_store_cfg_vat_payer_disabled = 'Automatické prepočítavanie cien produktov je vypnuté. Hromadne upraviÅ¥ ceny produktov môžete napríklad využitím funkcie <a href="/administrator/index2.php?option=com_apps&mode=faqdetail&id=314" target="_blank">CSV importu produktov</a>, alebo nás kontakujte na adrese <a href="mailto:[email protected]">[email protected]</a>';
2442
2443var cms_js_lang_mod_category_title_img = 'Obrázok modulu';
2444var cms_js_lang_mod_category_title_desc = 'Popis kategórie';
2445
2446// $_PHPSHOP_ORDER_WITH_0_DPH_NO_DATA_VIES
2447var js_lang_order_with_0_dph_no_data_vies = 'Zo systému VIES neboli prijaté validné dáta';
2448var js_lang_order_with_0_dph_relaclulate_question = 'IČ DPH je validné a objednávka spĺňa podmienky pre nákup s 0% DPH. Želáte si prepočítať objednávku do režimu s 0% DPH?<br><br>Pozor, prepočítanú objednávku do režimu s 0% DPH nie je možné prerátať do pôvodného stavu.';
2449
2450var js_admin_lang_delete_module_name_text = '<b>Modul: {moduleName} bol úspešne zmazaný.</b>';
2451
2452var js_admin_lang_delete_module_text0 = 'Nebola presunutá žiadna stránka.';
2453var js_admin_lang_delete_module_text1 = 'Bola presunutá 1 stránka.';
2454var js_admin_lang_delete_module_text2_4 = 'Boli presunuté {countOfChangedSites} stránky.';
2455var js_admin_lang_delete_module_text5 = 'Bolo presunutých {countOfChangedSites} stránok.';
2456
2457var js_admin_lang_mass_overpricing_error1 = 'Hromadná zmena cien nebola vykonaná.';
2458var js_admin_lang_mass_overpricing_title = 'Hromadná zmena cien pre ';
2459var js_admin_lang_mass_overpricing_title1 = ' užívateľskú skupinu';
2460var js_admin_lang_mass_overpricing_title2_4 = ' užívateľské skupiny';
2461var js_admin_lang_mass_overpricing_title_more = ' užívateľských skupín';
2462var js_admin_lang_mass_overpricing_error2 = 'Hromadná úprava ceny zlyhala pre produkt s kódom produktu: ';
2463var js_admin_lang_mass_overpricing_error3 = 'Hromadná úprava ceny zlyhala pre produkty s kódom produktu: ';
2464var js_admin_lang_mass_overpricing_error4 = 'Nakoľko by bola cena nižšia ako 0.';
2465var js_admin_lang_mass_overpricing_error5_1 = 'Nakoľko tento produkt nemá záznam v databáze.';
2466var js_admin_lang_mass_overpricing_error5_more = 'nakoľko tieto produkty nemajú záznam v databáze.';
2467var js_admin_lang_mass_overpricing_error6 = 'Kontaktujte administrátora.';
2468var js_admin_lang_mass_overpricing_done1 = 'Hromadná zmena pre ';
2469var js_admin_lang_mass_overpricing_done2 = ' produktu, prebehla v poriadku.';
2470var js_admin_lang_mass_overpricing_done3 = ' produktov, prebehla v poriadku.';
2471var js_admin_lang_mass_overpricing_error7 = 'Počas ukladania dať nastala chyba, skúste opakovať uloženie.';
2472var js_admin_lang_mass_overpricing_error8 = 'Počas odosielania dať nastala chyba, skúste opakovať uloženie.';
2473
2474
2475
2476var js_admin_lang_total_csv_orders_count = 'Celkový počet údajov v CSV súbore: ';
2477var js_admin_lang_existet_orders_in_system_count = 'Existujúcich objednávok v systéme: ';
2478var js_admin_lang_non_existet_orders_in_system1 = 'Zoznam ';
2479var js_admin_lang_non_existet_orders_in_system2 = ' neexistujúcich objednávok: ';
2480var js_admin_lang_non_existet_orders_in_system3 = ' neexistujúcej objednávky: ';
2481var js_admin_lang_paired_orders_count1 = 'Počet úspešne spárovaných objednávok (podľa sumy objednávky): ';
2482var js_admin_lang_paired_orders_count2 = 'Počet úspešne spárovanej objednávky (podľa sumy objednávky): ';
2483var js_admin_lang_paired_orders = ' úspešne spárovaných objednávok ';
2484var js_admin_lang_paired_orders2 = ' úspešne spárovanej objednávky ';
2485var js_admin_lang_paired_orders_bl = ' bez zmeny stavu <br/>(s nastaveným zákazom zmeny - blacklist): ';
2486var js_admin_lang_unpaired_orders_by_sum_count = 'Počet nespárovaných objednávok (podľa sumy objednávky): ';
2487var js_admin_lang_unpaired_orders = ' nespárovaných CSV dát: ';
2488var js_admin_lang_unpaired_orders1 = ' nespárovaného CSV záznamu: ';
2489
2490var js_admin_lang_pairing_payment_orders = 'Párovanie platieb objednávok';
2491var js_admin_lang_pairing_payment_orders_wait = 'Prebieha spracovávanie dát. Čakajte prosím.';
2492
2493// APP 865
2494var js_admin_lang_settings_app_865_ordering_update = 'Poradie spúšťačov bolo upravené';
2495var js_admin_lang_settings_app_865_trigger_confirm_delete = 'Naozaj si želáte zmazať zvolený spúšťač "%triger_name%"?';
2496var js_admin_lang_settings_app_865_triggers_confirm_delete = 'Naozaj si želáte zmazať zvolené spúšťače "%triger_name%"?';
2497var js_admin_lang_settings_app_865_trigger_delete = 'Zvolený spúšťač bol zmazaný';
2498var js_admin_lang_settings_app_865_triggers_delete = 'Zvolené spúšťače boli zmazané';
2499var js_admin_lang_settings_app_865_trigger_edit_close = 'Úprava spúšťača bola zrušená';
2500var js_admin_lang_settings_app_865_trigger_create_save = 'Spúšťač bol vytvorený';
2501var js_admin_lang_settings_app_865_trigger_edit_save = 'Spúšťač bol upravený';
2502var js_admin_lang_settings_app_865_tooltip_0 = 'Zvoľte typ spúšťača';
2503var js_admin_lang_settings_app_865_triger_activate_confirm = 'Naozaj si želáte aktivovať zvolený spúštač "%triger_name%"?';
2504var js_admin_lang_settings_app_865_triger_activate_notification = 'Spúšťač "%triger_name%" bol <b>aktivovaný</b>';
2505var js_admin_lang_settings_app_865_triger_deactivate_confirm = 'Naozaj si želáte deaktivovať zvolený spúštač "%triger_name%"?';
2506var js_admin_lang_settings_app_865_triger_deactivate_notification = 'Spúšťač "%triger_name%" bol <b>deaktivovaný</b>';
2507var js_admin_lang_settings_app_865_trial_message = 'Pre plnú verziu funkcie kontaktujte [email protected]';
2508var js_admin_lang_settings_app_865_rulle_name_empty = 'Vyplňte názov spúšťača!';
2509var js_admin_lang_settings_app_865_rulle_all_empty = 'Vyplňte aspoň jednu "AND" podmienku spúšťača!';
2510var js_admin_lang_settings_app_865_rulle_any_empty = 'Vyplňte aspoň jednu "OR" podmienku spúšťača!';
2511var js_admin_lang_settings_app_865_rulle_action_empty = 'Vyplňte typ spúšťača!';
2512// END APP 865
2513
2514var cms_js_lang_checkout_street_validation_error = 'Doplňte popisné číslo';
2515
2516var js_admin_mass_print_orders_firefox_notif_title = 'Upozornenie pre prehliadač Firefox:';
2517var js_admin_mass_print_orders_firefox_notif_body = 'Aby ste dosiahli najlepšie zobrazenie hromadnej tlače objednávok, použite radšej prehlia
2517dač Chrome / Opera.';
2518
2519var js_admin_export_order = 'Export objednávok';
2520var js_admin_export_order_error = 'Nebola exportovaná žiadna objednávka';
2521
2522var js_admin_please_select_at_least_one_order = 'Zvoľte prosím aspoň jednu objednávku.';
2523
2524var js_lang_menu_item_delete_title = 'Zmazať menu položku';
2525var js_lang_menu_item_delete_error = 'Zadajte správny počet článkov, prosím.';
2526var js_lang_menu_item_delete_prompt_more_content = 'Naozaj ste si istý? Vymazaná bude stránka s {num_of_articles}.<br>Počet všetkých článkov, ktoré sa zmazaním tejto položky takisto vymažú:';
2527var js_lang_menu_item_delete_prompt_count_please = 'Prosím zadajte číslo';
2528var js_lang_menu_item_delete_prompt_count_info = '(počet článkov pre zmazanie)';
2529var js_lang_menu_item_delete_count_articles_1 = 'článkom';
2530var js_lang_menu_item_delete_count_articles_2 = 'článkami';
2531var js_lang_menu_item_change_title = 'Zmeniť menu položku';
2532
2533// sprava uctu 2.0
2534var js_lang_account_index_datatable_orders_sSearch = 'Názov tovaru, číslo objednávky, faktúra . . .';
2535var js_lang_account_index_datatable_orders_sLengthMenu = 'Zobraziť na stranu: _MENU_';
2536var js_lang_account_index_datatable_orders_sInfo = 'Zobrazených _START_-_END_ z _TOTAL_ objednávok';
2537var js_lang_account_index_datatable_products_sInfo = 'Zobrazených _START_-_END_ z _TOTAL_ produktov';
2538var js_lang_account_index_allowed_products_export_tooltip = 'Pre export je nutné zvoliť aspoň jedného podriadeného';
2539var js_lang_account_index_allowed_products_clear_tooltip = 'Pre zmazanie je nutné zvoliť aspoň jedného podriadeného';
2540var js_lang_account_index_repeat_order = 'Opakovať objednávku';
2541var js_lang_account_index_product_no_exists = 'Produkt už nie je dostupný';
2542
2543// cssearch
2544var js_lang_cssearch_no_match = 'Žiadna zhoda';
2545var js_lang_cssearch_min_chars = 'Zadajte prosím minimálne {char} znaky';
2546
2547// strazny pes
2548var js_lang_product_watch_unfollow_confirm_msg = 'Boli ste úspešne odhlásený zo sledovania produktu.';
2549var js_lang_product_watch_unfollow_error_msg = 'Nastala chyba pri odhlasovaní!';
2550
2551var js_lang_modul_info_tooltip_vex = 'Informácia pre administrátora';
2552var js_lang_modul_info_tooltip_vex2 = 'Pridať info';
2553
2554var js_lang_modul_info_display_has_info = 'Zobraziť info pre admina';
2555var js_lang_modul_info_display_no_info = 'Pridať info pre admina';
2556
2557var js_admin_lang_invoice_successfully_deleted = 'Faktúra bola úspešne vymazaná';
2558var js_admin_lang_credit_note_successfully_deleted = 'Dobropis bol úspešne vymazaný';
2559var js_admin_lang_credit_note_date_successfully_changed = 'Dátum dobropisu bol úspešne zmenený';
2560var js_admin_lang_credit_note_items_successfully_saved = 'Zmeny položiek dobropisu boli uložené';
2561
2562// NSU
2563var js_lang_nsu_phone_valid_error = 'Povolené sú len znaky "0-9", "+", "-" a "/"';
2564var js_lang_nsu_ico_valid_error = 'Povolené sú len znaky "0-9"';
2565var js_lang_nsu_default_address_add_rly = 'Naozaj chcete nastaviť adresu %adress_name% ako predvolenú?';
2566var js_lang_nsu_default_address_checkbox_hover = 'Prvá dodacia adresa musí byť predvolená';
2567var js_lang_nsu_default_address_successfully_changed = 'Dodacia adresa %adress_name% bola nastavená ako predvolená';
2568var js_lang_nsu_default_address_remove_error = 'Predvolenú adresu nie je možné vymazať';
2569var js_lang_nsu_delete_shipping_address_rly = 'Naozaj chcete vymazať túto dodaciu adresu?';
2570var js_lang_nsu_delete_shipping_address_rly_alone_default = 'Dodacia adresa je predvolená.<br>Naozaj ju chcete vymazať?';
2571var js_lang_nsu_next_page = 'Ďalšia strana';
2572var js_lang_nsu_orders_multi_purchased_products = 'Objednávky s ';
2573var js_lang_nsu_delete_watchdog_rly = 'Skutočne zrušiť sledovanie tohto produktu?';
2574var js_lang_nsu_credits_not_allowed_amount_error = 'Najnižšia hodnota kreditu, ktorú možno presunúť je +1 bod.';
2575var js_lang_nsu_credits_low_amount_error = 'Najvyššia hodnota kreditu, ktorú možno presunúť je %s bodov.';
2576var js_lang_nsu_credits_update_rly = 'Skutočne chcete presunúť kredit vo výške %credit% bodov používateľovi %user% ?';
2577var js_lang_nsu_donate_credit_valid_error = 'Povolená je hodnota od 1 do %credit%';
2578var js_lang_nsu_no_product_results = 'Neboli nájdené žiadne zakúpené produkty.';
2579var js_lang_nsu_no_saved_cart_results = 'Neboli nájdené žiadne uložené košíky.';
2580var js_lang_nsu_saved_cart_load = 'Aktivovať uložený košík';
2581var js_lang_nsu_saved_cart_delete = 'Zmazať uložený košík';
2582var js_lang_nsu_saved_cart_load_modal_title = 'Uložený košík - %_SAVED_CART_NAME_%';
2583var js_lang_nsu_saved_cart_load_modal_msg = 'Prajete si pridať produkty do košíka a ponechať uložený košík pre prípadné opätovné použitie?';
2584var js_lang_nsu_saved_cart_load_modal_btn_1 = 'Naplniť a ponechať';
2585var js_lang_nsu_saved_cart_load_modal_btn_2 = 'Naplniť a odstrániť';
2586var js_lang_nsu_saved_cart_delete_modal_title = 'Uložený košík - %_SAVED_CART_NAME_%';
2587var js_lang_nsu_saved_cart_delete_modal_msg = 'Skutočne chcete zmazať uložený košík s názvom "%_SAVED_CART_NAME_%" ?';
2588var js_lang_nsu_saved_cart_delete_success = 'Uložený košík bol vymazaný';
2589var js_lang_nsu_saved_cart_delete_error = 'Uložený košík sa nepod
2589arilo vymazať';
2590var js_lang_nsu_saved_cart_add_error = 'Nepodarilo sa pridať všetky produkty do košíka';
2591var js_lang_nsu_datatable_orders_sSearch = 'Názov tovaru, číslo objednávky, faktúra . . .';
2592var js_lang_nsu_datatable_orders_sLengthMenu = 'Zobraziť na stranu: _MENU_';
2593var js_lang_nsu_datatable_orders_sInfo = 'Zobrazených _START_-_END_ z _TOTAL_ objednávok';
2594var js_lang_nsu_datatable_products_sInfo = 'Zobrazených _START_-_END_ z _TOTAL_ produktov';
2595var js_lang_nsu_pw_too_short = 'Príliš krátke (min. 6 znakov)';
2596var js_lang_nsu_pw_too_short_hint = '"Príliš krátke" heslo má dĺžku menej ako 6 znakov.';
2597var js_lang_nsu_pw_weak = 'Slabé';
2598var js_lang_nsu_pw_weak_hint = '"Slabé" heslo nemá dĺžku 8 znakov, neskladá sa z veľkých písmen, malých písmen a číslic';
2599var js_lang_nsu_pw_medium = 'Priemerné';
2600var js_lang_nsu_pw_medium_hint = '"Priemerné" heslo nemá dĺžku 12 znakov, neskladá sa z veľkých písmen, malých písmen a číslic.';
2601var js_lang_nsu_pw_strong = 'Silné';
2602var js_lang_nsu_customer_password_strength = '<strong>Vysvetlenie pojmu "Sila hesla":</strong><br /><br /><strong>"Príliš krátke"</strong> heslo má dĺžku menej ako 6 znakov.<br /><strong>"Silné"</strong> heslo ma dĺžku najmenej 12 znakov, skladá sa z velkých písmen, malých písmen a číslic.<br /><strong>"Priemerné"</strong> heslo má dĺžku najmenej 8 znakov, skladá sa z velkých a malých písmen, alebo z velkých písmen a číslic, alebo z malých písmen a číslic.<br /><strong>"Slabé"</strong> heslo je horšie ako "Priemerné" heslo v niektorom z jeho parametrov.';
2603var js_lang_nsu_new_form_nesessery_item = 'Táto položka je povinná.';
2604var js_lang_nsu_lm_wrong_email = 'Nesprávny formát e-mail adresy.';
2605var js_lang_nsu_customer_password_notmatched = 'Heslá sa nezhodujú.';
2606var js_lang_nsu_product_no_exists = 'Produkt už nie je dostupný';
2607var js_lang_repeat_order_config = 'Objednávku s vybranými produktami ste realizovali pred menej ako 1 dňom.<br>Skutočne si želáte objednávku zopakovať?';
2608var js_lang_nsu_datatable_wishlist_sEmptyTable = 'Váš Wishlist je aktuálne prázdny';
2609var js_lang_nsu_no_wishlist_product_results = 'Neboli nájdené žiadne produkty z Wishlistu:';
2610// NSU
2611
2612var js_admin_lang_complete_before_leave_warning = 'Prosím dokončite a uložte najskôr predchádzajúce úpravy.';
2613
2614var js_lang_product_attachment_info = 'Nahrajte súbor s dizajnom, ktorý chcete potlačiť na produkt vo formáte .pdf alebo .zip';
2615var js_lang_product_attachment_info_s = 'Produkt s nahratým súborom sa pridá do košíka a môžete pokračovať pri vyberaní ďalších produktov. Po skončení výberu pokračujte do košíka a následne do pokladne, kde kliknite na tlačidlo "Vyžiadať nezáväznú cenovú ponuku"';
2616
2617var js_lang_app_946_infobar_message_tooltip = 'Ak nebude vyplnený preklad pre jazykovú mutáciu, infowidget sa na tejto mutácii nebude zobrazovať.';
2618var js_lang_app_946_infobar_set_icon_tooltip = 'Obrázok je potrebné nahrávať vo formáte SVG.';
2619
2620var js_lank_product_attachment_price_offer = 'Vyžiadať nezáväznú cenovú ponuku';
2621
2622var js_lang_marketing_check_all_title_check = 'Vždy exportovať produkty všetkých kategórií';
2623var js_lang_marketing_check_all_title_uncheck = 'Zrušiť nastavenie exportu produktov vždy všetkých kategórií';
2624var js_lang_marketing_check_all_rly_check = 'Naozaj chcete pre portál <strong>%portal%</strong> vždy exportovať produkty všetkých kategórií?';
2625var js_lang_marketing_check_all_rly_uncheck1 = 'Naozaj pre portál <strong>%portal%</strong> zrušiť nastavenie exportu produktov vždy všetkých kategórií?';
2626var js_lang_marketing_check_all_rly_uncheck2 = 'Týmto budú nastavené pôvodné kategórie pre export do portálu <strong>%portal%</strong>';
2627var js_lang_marketing_check_all_save_btn = 'Uložiť nastavenie exportu produktov vždy všetkých kategórií';
2628var js_lang_marketing_check_all_vex1 = 'Vykonávate zmenu nastavenia exportu produktov vždy všetkých kategórií</br>a túto zmenu je potrebné uložiť / zrušiť.';
2629var js_lang_marketing_check_all_vex2 = 'Následne budete môcť robiť zmeny ďalšími spôsobmi.';
2630
2631var cms_js_lang_instagram_img_num_display = 'Počet zobrazených obrázkov';
2632
2633var js_lang_shipping_addresses_list_lbl = 'Nová predvolená dodacia adresa:';
2634var js_lang_shipping_address_is_default_title = 'Dodacia adresa je predvolená';
2635var js_lang_shipping_address_is_default_confirm = 'Naozaj ju chcete vymazať?';
2636var js_lang_shipping_address_is_default_warning = 'Pokúšate sa odstrániť predvolenú dodaciu adresu.<br><br>Pred tým, ako budete pokračovať, zvoľte zo zoznamu novú predvolenú adresu.<br><br>';
2637var js_lang_shipping_address_already_exists = 'Dodacia adresa s takýmto názvom už existuje.';
2638var js_lang_input_values_were_changed = 'Zmenili ste údaje v nasledujúcich poliach:';
2639var js_lang_do_you_want_to_continue = 'Naozaj chcete ďalej pokračovať?';
2640var js_lang_shipping_address_no_longer_exist = 'Táto dodacia adresa už neexistuje.<br><br>Naozaj ju chcete vytvoriť?';
2641
2642var js_lang_postponed_order_vex_delete = 'Naozaj chcete zmazať dátum odloženého dodania?';
2643var js_lang_postponed_order_without_date = 'Objednáva nemá nastavený dátum odloženého dodania.';
2644var js_lang_postponed_order_deleted = 'Dátum odloženého dodania bol zmazaný.';
2645var js_lang_postponed_order_delete_error = 'Dátum odloženého dodania bol zmazaný.';
2646var js_lang_postponed_order_edit_error = 'Dátum odloženého dodania nebolo možné nastav
2646iť/upraviť.';
2647var js_lang_postponed_order_delete_edited = 'Dátum odloženého dodania bol upravený.';
2648
2649
2650var js_lang_payment_status_vex_delete = 'Naozaj chcete zmazať dátum úhrady objednávky?';
2651var js_lang_payment_status_date_edited = 'Dátum úhrady objednávky bol upravený.';
2652var js_lang_payment_status_date_delete_error = 'Dátum úhrady objednávky nebolo možné zmazať';
2653var js_lang_payment_status_date_edit_error = 'Dátum úhrady objednávky nebolo možné nastaviť/upraviť.';
2654var js_lang_payment_status_value_edited = 'Celková uhradená suma objednávky bola upravená.';
2655var js_lang_payment_status_value_edited_error = 'Celková uhradená suma objednávky bola nesprávne zadaná/zmazaná a nie je definovaná.';
2656var js_lang_payment_status_delete_error = 'Dátum úhrady objednávky bol zmazaný.';
2657
2658var js_lang_export_product_watchdog = "Systém nenašiel pre žiadny zo zvolených produktov údaje o strážení.";
2659
2660var js_lang_save_article = 'Uložiť';
2661var js_lang_save_and_remain_in_edit = 'Uložiť a zostať v úprave';
2662var js_lang_edit_seo_data = 'Upraviť SEO dáta článku';
2663var js_lang_article_cancel = 'Zrušiť';
2664var js_lang_article_title_not_empty = 'Názov článku nesmie ostať prázdny!';
2665var js_lang_article_introtext_not_empty = 'Úvodný text nesmie ostať prázdny!';
2666var js_lang_article_was_successfully_created = 'Článok úspešne vytvorený';
2667
2668var js_lang_order_change_status_notify = 'Nastala zmena skladu u nasled. produktov:';
2669
2670var js_lang_app_959_please_choose = 'Prosím vyberte';
2671var js_lang_app_959_save_notification = 'Nastavenia zmeny dostupnosti produktu boli uložené.';
2672var js_lang_app_959_save_notification_error = 'Nastavenia neboli uložené, skontrolujte dostupnosti.';
2673
2674var js_lang_mod_shop_product_group_only_in_stock = 'Iba skladom';
2675var js_lang_changes_saved = 'Zmeny boli uložené';
2676
2677var js_lang_instagram_users = 'Používatelia';
2678var js_lang_instagram_no_users = 'Žiadny používateľ';
2679var js_lang_show_only_default_vv = 'Zobrazovať iba predvolené virt. varianty';
2680var js_lang_product_attribute_stock_note = 'V balení';
2681
2682var js_browse_listing_set_quantity = 'Prosím, zadajte množstvo';
2683var js_browse_listing_choose_variant = 'Prosím, vyberte variant';
2684var js_browse_listing_unavailable_quantity = 'Skladom máme len {quantity} {unit}';
2685
2686var js_watch_Stock_custom_header_msg = 'Pripomenúť, keď bude produkt k dispozícii';
2687var js_watch_stock_custom_body_msg = 'Budeme ťa informovať';
2688var js_watch_stock_custom_send_btn = 'Zatvoriť';
2689var js_watch_stock_attr_error_msg = 'Je potrebné vybrať nejakú z možností veľkostí.';
2690var js_watch_cancel_watch_btn_lbl = 'Zrušiť sledovanie';
2691
2692var js_lang_luigi_undefined_manufacturer = 'Výrobca neuvedený';
2693
2694var js_lang_product_not_in_offer = 'Zobraziť aj nedostupné produkty';
2695
2696var cms_js_lang_claim_choose_product = 'Vyberte produkt';
2697
2698var js_lang_app_970_connection_create = 'Vytvorenie novej identity';
2699var js_lang_app_970_connection_created = 'Identita bola vytvorená';
2700var js_lang_app_970_connection_already_exists = 'Identita pre tuto doménu už existuje';
2701var js_lang_app_970_connection_loaded = 'Identity boli načitané / obnovené';
2702var js_lang_app_970_group_id = 'Group (list) ID';
2703var js_lang_app_970_assign_sgp = 'preradiť do zákazníckej skupiny';
2704
2705var js_lang_order_status_max_attachment_size_warn = 'Prekročili ste maximálnu celkovú velkosť príloh: 20MB.';
2706
2707var js_lang_order_order_list_import_delivered_orders_vex_title = 'Import čísel doručených zásielok';
2708var js_lang_order_order_list_import_delivered_orders_no_orders_to_change = 'Nemáme žiadne naparovane objednávky';
2709var js_lang_order_order_list_import_delivered_orders_orders_to_change_with_errors = 'Objednávky u ktorych nastala chyba:';
2710
2711var js_lang_registration_reset_password_email_already_sent = 'Pre zadaný e-mail už bol odoslaný overovací e-mail pre zmenu hesla. Skontrolujte svoju e-mail schránku.';
2712var js_lang_registration_reset_password_email_sent = 'Na zadanú e-mail adresu bol odoslaný overovací e-mail. Pokračujte podľa pokynov v e-mail správe.';
2713var js_lang_registration_reset_password_password_changed = 'Heslo bolo úspešne zmenené. Od teraz sa môžete prihlasovať s novým heslom.';
2714var js_lang_registration_reset_password_password_changed_continue = 'Pokračujte ďalej automatickým prihlásením';
2715var js_lang_registration_reset_password_field_required = 'Položka je povinná';
2716var js_lang_registration_reset_password_passwords_dont_match = 'Heslá sa nezhodujú';
2717var js_lang_registration_reset_password_password_too_short = 'Heslo je príliš krátke';
2718
2719var js_api_dpd_export_orders_modal_title = 'Export objednávok do DPD';
2720
2721var js_api_gls_export_orders_modal_title = 'Export objednávok do GLS';
2722var js_api_gls_export_orders_modal_fss_empty_phone = 'Je potrebné vyplniť tel. číslo';
2723var js_api_gls_export_orders_modal_fds_fss_not_checked = 'Táto služba vyžaduje aktívnu službu FSS';
2724var js_api_gls_export_orders_modal_fds_empty_email = 'Je potrebné vyplniť e-mail';
2725var js_api_gls_export_orders_modal_sm2_empty_phone = 'Je potrebné vyplniť tel. číslo';
2726var js_api_gls_export_orders_modal_sm1_empty_phone_or_sms_text = 'Je potrebné vyplniť tel. číslo a obsah sms správy';
2727var js_api_gls_export_orders_modal_dds_empty_delivery_date = 'Je potrebné vybrať dátum dodania';
2728var js_api_gls_export_orders_modal_t12_fss_fds_selected = 'Kombinácia FSS, FDS a T12 nie je povolená';
2729var js_api_gls_export_orders_modal_dds_fss_fds_selected = 'Kombinácia FSS, FDS a DDS nie je povolená';
2730var js_api_gls_export_orders_modal_sat_fss_fds_selected = 'Kombinácia FSS, FDS a SAT nie je povolená';
2731var js_api_gls_export_orders_modal_xs_fss_fds_selected = 'Kombinácia FSS, FDS a XS nie je povolená';
2732var js_api_gls_export_orders_modal_dds_fds_ps_selected = 'Kombinácia FDS, PS a DDS nie je povolená';
2733var js_api_gls_export_orders_modal_t12_fds_ps_selected = 'Kombinácia FDS, PS a T12 nie je povolená';
2734var js_api_gls_export_orders_modal_sat_fds_ps_selected = 'Kombinácia FDS, PS a SAT nie je povolená';
2735var js_api_gls_export_orders_modal_dds_sm1_selected = 'Kombinácia DDS a SM1 nie je povolená';
2736var js_api_gls_export_orders_modal_aos_selected = 'Je nutné vyplniť meno príjemcu';
2737
2738var js_add_to_cart_as_inquiry = 'Pridať ako cenovú ponuku';
2739
2740var cms_js_lang_admin_google_cloud_label_1 = 'štatistika využitia prekladov';
2741var cms_js_lang_admin_google_cloud_label_2 = 'Rok';
2742var cms_js_lang_admin_google_cloud_label_3 = 'Mesiac';
2743var cms_js_lang_admin_google_cloud_label_4 = 'Počet znakov';
2744var cms_js_lang_admin_google_cloud_label_5 = 'Počty preložených znakov sú orientačné a nezahŕňajú preklady vykonané mimo administrácie e-shopu.';
2745var cms_js_lang_admin_google_cloud_label_6 = 'Prajete si preložiť text o dĺžke';
2746var cms_js_lang_admin_google_cloud_label_7 = 'znakov?';
2747var cms_js_lang_admin_google_cloud_label_8 = 'Preklad Google Translate';
2748var cms_js_lang_admin_google_cloud_label_9 = 'Preložiť';
2749
2750var js_order_edit_order_item_purchased_price_changed = 'Nákupná cena položky bola zmenená';
2751
2752var js_google_translate_api_quotes_limit_error = 'Bol prekročený limit pre preklady';
2753
2754var js_registration_company_tin_please_enter_correct_tin = 'Prosím vložte správne IČ DPH';
2755
2756var js_lang_product_currently_sold_out = 'Aktuálne vypredané u dodávateľa.';
2757var js_lang_product_variant_out_of_stock_info = 'Nie je na sklade';
2758
2759var js_lang_product_will_be_removed_from_group_after_one_day = 'Produkty budú vyradené po uplynutí %s dňa.';
2760var js_lang_product_will_be_removed_from_group_after_x_days = 'Produkty budú vyradené po uplynutí %s dní.';
2761
2762var js_lang_change_primary_section_vex_info = 'Po zmene URL adries Vám odporúčame zadať ich 301 presmerovania v admin sekcii Nastavenia.';
2763var js_lang_hold_shift_tooltip = '<div style="text-align:left">Viacnásobné označenie viac položiek:</div>- držte Shift + kliknitie myšou na ďalší checkbox <a href="%link" target="_blank">Viac info...</a>';
2764
2765var cms_js_lang_set_featureprod_group_change_confirm = 'Uložením nastavenia Skupiny produktov dôjde k zrušeniu voľby "Kategórií produktov".\nChcete nastaviť zobrazenie produktov z danej Skupiny produktov?';
2766var cms_js_lang_set_featureprod_group_cat_change_confirm = 'Uložením nastavenia kategórií dôjde k zrušeniu voľby "Skupina produktov".\nChcete pokračovať a nastaviť zobrazenie produktov z vybraných kategórií?';
2767var cms_js_lang_set_featureprod_group_params_change_confirm = 'Uložením nastavenia parametrov dôjde k zrušeniu aktuálnych volieb.\nChcete pokračovať a nastaviť zobrazenie produktov z vybraných parametrov?';
2768
2769var js_lang_product_please_select_atleast_one_product = 'Prosím zvoľte aspoň jeden produkt.';
2770
2771var js_lang_blog_sep_vex_sentence = 'Zmeniť menu položku z typu obyčajná stránka na typ:';
2772var js_lang_blog_sep_vex_type_blog = 'BLOG sekcia';
2773var js_lang_blog_sep_vex_type_url = 'URL odkaz';
2774var js_lang_blog_sep_change_type_to_blog_okmsg = 'Položka <strong>%n</strong> bola úspešne zmenená na typ BLOG sekcia.';
2775
2776var js_lang_adminlang_swe_content_comments_add_main_title = 'Pridať komentár';
2777
2778var js_lang_phpshop_registration_thank_you_vex_title = 'Registrácia je ukončená!';
2779
2780var js_lang_adminlang_product_admin_note_tooltip_modify_note = 'Poznámky k objednávke (viditeľné iba pre administrátora)';
2781
2782var js_lang_automated_triggers_create_invoice = 'Vytvoriť faktúru';
2783
2784var js_lang_adminlang_product_size_table_new_title = 'Vytvorenie novej tabuľky';
2785var js_lang_adminlang_product_size_table_update_title = 'Úprava veľkostnej tabuľky "%name%"';
2786var js_lang_adminlang_product_size_table_delete_confirm = 'Naozaj chcete vymazať veľkostnú tabuľku?';
2787var js_lang_adminlang_product_size_table_delete_row_alert = 'Nemôžete zmazať posledný riadok tabuľky';
2788var js_lang_adminlang_product_size_table_delete_column_alert = 'Nemôžete zmazať posledný stĺpec tabuľky';
2789var js_lang_adminlang_product_size_table_delete_row_new_up_title = 'Pridať nový riadok pred';
2790var js_lang_adminlang_product_size_table_delete_column_new_left_title = 'Pridať nový stĺpec pred';
2791var js_lang_adminlang_product_size_table_delete_row_new_down_title = 'Pridať nový riadok za';
2792var js_lang_adminlang_product_size_table_delete_column_new_right_title = 'Pridať nový stĺpec za';
2793var js_lang_adminlang_product_size_table_delete_row_delete_title = 'Vymazať riadok';
2794var js_lang_adminlang_product_size_table_delete_column_delete_title = 'Vymazať stĺpec';
2795var js_lang_adminlang_product_size_table_name = 'Názov veľkostnej tabuľky';
2796var js_lang_adminlang_product_size_table_created = 'Veľkostná tabuľka "%name%" bola vytvorená';
2797var js_lang_adminlang_product_size_table_updated = 'Veľkostná tabuľka "%name%" bola upravená';
2798var js_lang_adminlang_product_size_table_deleted = 'Veľkostná tabuľka "%name%" bola vymazaná';
2799var js_lang_adminlang_product_size_table_fill_from = 'náplň z';
2800var js_lang_adminlang_product_size_table_image_label = 'Obrázok tabuľky veľkosti';
2801
2802
2803var js_lang_go4_timeslot_select = 'Go 4 - Výber časového okna';
2804var js_lang_go4_delivery = 'Go 4 kuriér';
2805
2806var js_lang_adminlang_magic_margin_label_1 = 'Vygenerovať Margin feed za';
2807var js_lang_adminlang_magic_margin_label_2 = 'dní dozadu.';
2808
2809var js_lang_api_payment_confirm_button = 'Spracovať';
2810var js_lang_api_payment_cancel_button = 'Zrušiť';
2811var js_lang_api_payment_refund_system_error = 'Systémová chyba pri zaslaní!';
2812var js_lang_api_payment_refund_amount_has_to_be_positive = 'Zadaná suma musí byť kladné číslo!';
2813var js_lang_api_payment_refund_amount_has_to_be_less = 'Zadaná suma musí byt rovnaká alebo menšia ako rozdiel medzi sumou už vykonaných návratov a pôvodnou v
2813ýškou platby!';
2814
2815var js_lang_checkout_loader_initial = 'Spracováva sa...';
2816var js_lang_checkout_loader_intermediate = 'Chvíľku strpenia...';
2817var js_lang_checkout_loader_final = 'Ešte chvíľu počkajte...';
2818
2819var js_lang_payment_loader_delay_text = 'Čakajte prosím, otvára sa<br>platobná brána na úhradu...';
2820
2821var js_lang_import_done = 'Import sa dokončil';
2822
2823var js_lang_checkout_thankyou_unregistered_vex_title = 'Upozornenie pre zákazníka';
2824var js_lang_checkout_thankyou_unregistered_vex_confirm = 'Ok';
2825
2826var js_lang_link_settings = 'Nastavenia linku';
2827var js_lang_choose_link_type = 'Vyberte typ odkazu';
2828var js_lang_minimal_chars = 'Zadajte min. 3 znaky';
2829var js_lang_categories = 'Kategórie';
2830
2831var js_lang_order_print_payment_edit_label_open = 'Upraviť spôsob platby';
2832var js_lang_order_print_shipping_edit_label_open = 'Upraviť spôsob dopravy';
2833
2834var js_lang_order_dispach_not_in_dispach_state = 'Objednávka nie je v stave na expedovanie.';
2835var js_lang_order_dispach_already_dispached = 'Objednávka už bola expedovaná.';
2836var js_lang_order_dispach_retry_dispach = 'Opakovať expedíciu';
2837var js_lang_order_dispach_confirm = 'Expedovať';
2838var js_lang_order_dispach_vex_title = 'Automatická expedícia objednávky č.';
2839var js_lang_order_dispach_product_is_full = 'Produkt je už plný.';
2840var js_lang_order_dispach_product_too_many_pieces = 'Príliš veľa kusov.';
2841var js_lang_order_dispach_please_enter_quantity = 'Prosím zadajte množstvo.';
2842var js_lang_order_dispach_product_not_found = 'Produkt sa nenašiel.';
2843var js_lang_order_dispach_successful = 'Objednávka úspešne expedovaná.';
2844var js_lang_order_dispach_missing_piecies = 'Nie sú naplnené všetky produkty.';
2845var js_lang_order_dispach_vex_search_title = 'Zadajte objednávku na expedíciu';
2846var js_lang_order_dispach_begin_dispach = 'Spustiť expedíciu';
2847var js_lang_order_dispach_product_added = 'Produkt bol úspešne zadaný do expedície';
2848var js_lang_order_dispach_order_number = 'Číslo objednávky';
2849var js_lang_order_dispach_cancel_confirm_text = 'Naozaj chcete zrušiť celú expedíciu objednávky č.';
2850
2851var js_lang_payment_adyen_service_unavailable_title = 'Ospravedlňujeme sa';
2852var js_lang_payment_adyen_service_unavailable_content = 'Vyskytla sa chyba s platobnou bránou, prosím zvoľte iný spôsob platby.';
2853
2854var js_lang_articles_ordering_no_data = 'Daný blog neobsahuje žiadne články';
2855
2856var js_lang_modal_after_add_to_cart_vex_title = 'A je to v košíku!';
2857
2858var js_lang_product_available_again = 'Pravdepodobne bude k dispozícii od: ';
2859
2860var js_lang_mass_product_ordering = 'Zmena poradia produktov';
2861var js_lang_choose_only_one_category = 'Vo filtri kategórii vyberte len jednu kategóriu';
2862
2863var js_lang_coupon_free_shipping = 'Doprava zdarma';
2864
2865var js_lang_tin_number = 'DIČ';
2866
2867var js_lang_order_status_email_attachments_placeholder = 'Zvoľte prílohy';
2868
2869var js_lang_imagepin_product_sku = 'Vyhľadávanie produktu';
2870var js_lang_imagepin_abort_changes = 'Vykonané zmeny neboli uložené! Prajete si ich uložiť?';
2871var js_lang_imagepin_delete_pins = 'Vážne si prajete zmazať tieto špendlíky?';
2872var js_lang_imagepin_duplicated_title = 'Tento názov sa používa. Bolo mu priradené poradové číslo.';
2873var js_lang_imagepin_check_title = 'Nastala chyba pri kontrole názvu. Prosím zopakujte uloženie názvu.';
2874var js_lang_imagepin_help_title_rpin = 'Zmazať špendlík';
2875var js_lang_imagepin_delete_changes = 'Zahodiť zmeny';
2876var js_lang_imagepin_save_changes = 'Uložiť zmeny';
2877
2878var js_lang_app_1164_gopay_goid_tooltip = 'ID obchodníka ktoré ste obrdžali v e-maili od GoPay.';
2879var js_lang_app_1164_gopay_client_id_tooltip = 'Client ID ktoré ste obrdžali v e-maili od GoPay.';
2880var js_lang_app_1164_gopay_client_secret_tooltip = 'Client Secret ktoré ste obrdžali v SMS od GoPay.';
2881var js_lang_app_1164_gopay_environment_tooltip = 'Prostredie platobnej brány.';
2882var js_lang_app_1164_gopay_payment_mode_tooltip = 'Spôsob otvorenia platobnej brány. Redirect - Zákazník bude presmerovaný na platobnú bránu, Inline - Platobná brána sa zobrazí nad stránkou e-shopu a zákazník nebude presmerovaný.';
2883var js_lang_app_1164_gopay_refund_tooltip = 'Povoľuje refundácie ak je nastavenie aktívne v úprave objednávky v sekcii "Spôsob platby" sa zobrazí tlačídlo na vrátenie platby.';
2884var js_lang_app_1164_gopay_preauthorization_tooltip = 'Povoľuje predautorizované platby.';
2885var js_lang_app_1164_gopay_order_success_tooltip = 'Stav, na ktorý sa objednávka zmení po úspešnej platbe.';
2886var js_lang_app_1164_gopay_order_fail_tooltip = 'Stav, na ktorý sa objednávka zmení po neúspešnej platbe.';
2887
2888var js_lang_app_1452_label_tooltip = 'Pre zvolené zákaznícke skupiny bude deaktivovaná funkcia množstvových zliav pri zvýhodnenej cene produktu';
2889var js_lang_app_1452_select_placeholder = 'Zvoľte zákaznícke skupiny';
2890
2891var js_lang_vex_after_add_to_cart_login = 'Prihlásiť sa';
2892
2893var js_lang_limited_special_hide_image = 'Skryť obrázok';
2894
2895var js_lang_saving_price_label = 'Ušetríte';
2896
2897var js_lang_indexer_app_indexer_ready = 'Indexer pripravený.';
2898var js_lang_indexer_app_last_indexation = 'Posledná indexácia skončila';
2899
2900var js_lang_product_variant_required_weight = 'Hmotnosť variantu produktu je povinná';
2901
2902var js_lang_mod_shop_product_group_show_products_in_current_category = 'Produkty z aktuálnej kategórie';
2903
2904var js_lang_settings_mobile_app_delete_device = 'Odstrániť zariadenie s názvom "#_DEVICE_NAME_#"?';
2905
2906/* START priplatkove produkty */
2907var js_lang_pre_checked_surcharge_product = 'Predvolená služba';
2908var js_lang_no_surcharge_products_for_select = 'Neexistuje ďalšia doplnková služba. Vytvorte novú doplnkovú službu, aby ju bolo možné pridať.';
2909var js_lang_quantity_for_gift_surcharge_product = 'Množstvo pre získanie darčeka';
2910/* END priplatkove produkty */
2911
2912var js_lang_multiple_packages_1 = 'balenie';
2913var js_lang_multiple_packages_2 = 'balenia';
2914var js_lang_multiple_packages_3 = 'balení';
2915
2916var js_lang_pack4you_products_exported_success = 'Produkty boli úspešne exportované do Pack4You.';
2917var js_lang_pack4you_products_exported_error =  'Produkty sa nepod
2917arilo exportovať do Pack4You.';
2918
2919var js_lang_jvplusav_orders_exported_success =  'Objednávky boli úspešne exportované do jvplusav.';
2920
2921var js_lang_automatic_gifts_shipping_restricted_title = 'Darčeky boli odstránené z nákupného košíka';
2922var js_lang_automatic_gifts_shipping_restricted_message = 'Ospravedlňujeme sa, darčeky sa nevzťahujú na zvolený spôsob dopravy, ak si prajete darčeky vrátiť späť do košíka, prosím zvoľte iný spôsob dopravy.';
2923var js_lang_automatic_gifts_shipping_restricted_setting_placeholder = 'Zvoľte spôsoby dopravy';
2924
2925var js_lang_send_mass_email = 'Hromadný e-mail'
2926var js_lang_send_mass_email_text = 'Text'
2927var js_lang_send_mass_email_subject = 'Predmet'
2928
2929/* mod_package_tracking */
2930var js_lang_unable_to_identify_package = 'Zásielku nebolo možné identifikovať';
2931
2932var js_lang_measure_unit_pcs = 'ks';
2933var js_lang_product_store_availability_inline_title = 'Dostupnosť na predajniach';
2934var js_lang_product_store_availability_show_store_link_title = 'Zobraziť predajňu';
2935
2936var js_lang_save_all_changes = 'Uložiť všetky zmeny';
2937
2938var js_lang_coupon_list = 'Zoznam kupónov';
2939var js_lang_coupon_archive = 'Archív použitých kupónov';
2940
2941var js_lang_api_tmr = {
2942	childTooltip: {
2943		childNumRoom: 'Deti v %s. izbe',
2944		description: 'Na to, aby sme vám mohli nájsť ubytovanie s dostatočnou kapacitou pre celú vašu skupinu a so správnymi cenami, potrebujeme poznať vek detí v deň vášho odchodu z ubytovania',
2945		confirm: 'Potvrdiť výber',
2946		childAge: 'Vek %s. dieťaťa',
2947		defaultOption: 'Vyberte vek',
2948		selectAge: 'Zvoľte prosím vek',
2949		notConfirmed: 'Potvrďte prosím vek detí',
2950	},
2951	adultTooltip: {
2952		adultNumRoom: 'Dospelí v %s. izbe',
2953		description: '',
2954		confirm: 'Potvrdiť výber',
2955		notConfirmed: 'Potvrďte prosím počet dospelích',
2956	},
2957	date: {
2958		confirm: 'Potvrdiť',
2959		cancel: 'Zrušiť',
2960	},
2961	basketGift: {
2962		name: 'Meno',
2963		surname: 'Priezvisko',
2964		email: 'Email',
2965		phone: 'Telefón',
2966		confirm: 'Potvrdiť',
2967		cancel: 'Zrušiť',
2968		errors: {
2969			name: 'Prosím vyplňte meno',
2970			surname: 'Prosím vyplňte priezvisko',
2971			email: 'Nesprávny formát emailu',
2972			phone: 'Prosím vyplňte číslo',
2973		},
2974 	}
2975};
2976
2977var js_lang_api_ellipsecloud = {
2978	date: {
2979		confirm: 'Potvrdiť',
2980		cancel: 'Zrušiť',
2981	},
2982	errors: {
2983		selectDate: 'Prosím vyberte termín',
2984		noResults: 'Pre zvolený termín nie sú dostupné žiadne ponuky',
2985		fillRequired: 'Prosím vyplňte všetky povinné polia',
2986		bookingFailed: 'Rezervácia zlyhala, skúste to prosím znova',
2987		cancelFailed: 'Zrušenie rezervácie zlyhalo',
2988	},
2989	booking: {
2990		created: 'Rezervácia bola úspešne vytvorená',
2991		cancelled: 'Rezervácia bola zrušená',
2992	},
2993	minStay: 'Min. %s nocí',
2994};
2995
2996var js_lang_abandoned_cart = {
2997	email_sent: 'Email pre košík {cart_id} bol úspešne odoslaný',
2998	cart_archived: 'Košík {cart_id} bol archivovaný',
2999	converted_to_order: 'Košík {cart_id} bol skonvertovaný na objednávku',
3000	quick_template_label: 'Zabudnuté košíky',
3001	convert_error: 'Košík nemožno konvertovať na objednávku, pretože nie sú k dispozícii všetky požadované údaje',
3002	archive_confirm: 'Ste si istý, že chcete archivovať tento košík ({cart_id})?',
3003	archive_title: 'Potvrdenie archivácie košíka',
3004	convert_confirm: 'Ste si istý, že chcete konvertovať tento košík ({cart_id}) na objednávku?',
3005	convert_title: 'Potvrdenie vytvorenia objednávky',
3006	confirm: 'Potvrdiť',
3007	cancel: 'Zrušiť',
3008	activate: 'Naozaj si želáte aktivovať automatizáciu <b>"{name}"</b>?',
3009	deactivate: 'Naozaj si želáte deaktivovať automatizáciu <b>"{name}"</b>?',
3010	activateSuccess: 'Automatizácia "{name}" bola <b>aktivovaná</b>',
3011	deactivateSuccess: 'Automatizácia "{name}" bola <b>deaktivovaná</b>',
3012	selectTemplateError: 'Prosím, zvoľte šablónu',
3013	deleteAutomationsConfirm: 'Naozaj si želáte zmazať zvolenú automatizáciu?',
3014	deleteAutomationsConfirmMultiple: 'Naozaj si želáte zmazať zvolené automatizácie?',
3015	deleteAutomationsSuccess: 'Zvolené automatizácie boli úspešne zmazané',
3016	selectedCarts: 'Označené košíky',
3017	selectedFrom: 'z',
3018	quickTemplateReplacements: 'Automaticky vkladané premenné: <b>ADDR</b> - adresa zákazníka, <b>NAME</b> - meno zákazníka, <b>SURNAME</b> - priezvisko zákazníka, <b>TOTAL_PRICE</b> - suma košíku, <b>SHIPPING_PRICE</b> - cena za dopravu, <b>SHIPPING</b> - typ dopravy, <b>PAYMENT</b> - typ platby, <b>CART_LINK</b> - link na košík, <b>COUPON_CODE</b> - Kód kupónu',
3019};
3020
3021var js_lang_mass_category_change = {
3022	infoModal: {
3023		title: 'Hromadná zmena kategórií',
3024		selectedProducts: 'Označených produktov',
3025		updatedProducts: 'Aktualizovaných produktov',
3026		unchangedProducts: 'Nezmenených produktov',
3027		unchangedProductsList: 'Kódy nezmenených produktov',
3028		unchangedProductsInfo: 'Pokúšate sa vyradiť produkty z kategórií, ktoré sú zároveň nastavené ako ich primárne kategórie. Nezmeneným produktom odporúčame kategórie upraviť manuálne.',
3029		remainder: 'Po zatvorení okna sa stránka obnoví, prosím skopírujte si kódy nezmenených produktov a upravte ich manuálne.'
3030	}
3031};
3032
3033var js_lang_api_onix = {
3034	notifications: {
3035		exportedOrder: {
3036			title: 'Onix',
3037			msg: 'Vybrané objednávky boli exportované do Onix.'
3038		},
3039	},
3040};
3041
3042var js_lang_api_dpd = {
3043	orderExport: {
3044		parcel: {
3045			depth: 'Hĺbka',
3046			height: 'Výška',
3047			width: 'Šírka',
3048			weight: 'Váha',
3049			reference: 'Referencia'
3050		},
3051		tooltip: {
3052			codHover: 'Zmena tejto služby je možná iba zmenou typu dopravy v objednávke'
3053		}
3054	},
3055	dpdWidget: {
3056		defaultOption: 'Vybrat miesto',
3057		selectParcelShop: 'Prosím vyberte si odberné miesto',
3058	}
3059};
3060
3061var js_lang_recalculate_order_successful = 'Úspešný prepočet objednávky';
3062var js_lang_recalculate_order_failed = 'Neúspešný prepočet objednávky';
3063var js_lang_recalculate_order_alert = 'Tento úkon môže zmeniť sadzby DPH pre jednotlivé položky objednávky.<br>Želáte si napriek tomu prepočítať objednávku?';
3064
3065var js_lang_browse_images_label = 'Prehliadať obrázky';
3066
3067var js_lang_back_to_active_coupons = 'Späť na zoznam aktívnych kupónov';
3068
3069var js_lang_edit_label = 'Upraviť';
3070
3071var js_lang_not_found_orders_for_packeta_all = 'Systém nenašiel žiadne záznamy s vytvorenými objednávkami pre Packeta.';
3072var js_lang_not_found_orders_for_packeta_not_exported = 'Systém nenašiel žiadne doposiaľ nevyexportované záznamy pre Packeta.';
3073var js_lang_orders_for_packeta_check_and_export = 'Ak potrebujete exportovať konkrétne objednávky pre Packeta, označte ich a exportujte.';
3074
3075var js_lang_product_detail_delivery_date_tomorrow = 'zajtra';
3076var js_lang_product_detail_delivery_date_deliver_by_1 = 'Doručíme do';
3077var js_lang_product_detail_delivery_date_deliver_by_2 = 'Doručíme v';
3078
3079var js_lang_checkout_product_reservation = {
3080	modalTitle: 'Rezervácia produktov',
3081	modalContent: 'Opúšťate funkciu rezervácie. Prípadná zvýhodnená cena produktov bude prepočítaná späť na štandardnú cenu. Chcete pokračovať?',
3082	cancel: 'Zrušiť',
3083	confirm: 'Potvrdiť',
3084	fillModalMessage: 'Všetky produkty, ktoré boli predtým vložené do košíka budú odstránené a nahradené za produkty z rezervácie. Prajete si pokračovať?',
3085	leavingReservation: 'Úpravou množstva produktu v košíku sa zruší režim rezervácie a zvýhodnené ceny budú prepočítané na štandardné. Prajete si pokračovať?',
3086	filterDisable: 'Odstránenie filtra nie je možné, kým máte aktívnu ‘Moju predajňu’. Najskôr ju deaktivujte.',
3087	selectStore: 'Prosím, zvoľte predajňu',
3088};
3089
3090var js_lang_expected_delivery_tooltip = 'Odhadovaný dátum doručenia, ktorý sa môže zmeniť na základe aktuálnej vyťaženosti prepravcu.';
3091
3092var js_lang_checkout_vhl_map = 'Zvoľte odberné miesto';
3093var js_lang_checkout_wedo_map = 'Zvoľte odberné miesto';
3094var js_lang_checkout_balikovna_map = 'Zvoľte odberné miesto';
3095
3096var js_lang_checkout_sps_map_modal = {
3097	close: 'Zrušiť',
3098	confirm: 'Potvrdiť',
3099	name: 'Názov',
3100	address: 'Ulica',
3101	city: 'Mesto',
3102	dropoff: 'Podanie zásielky',
3103	openinghours: 'Otváracie hodiny',
3104	cod: 'Dobierka',
3105	yes: 'Áno',
3106	no: 'Nie',
3107};
3108
3109var js_lang_makro_custom_dealers = {
3110	accountIndex: {
3111		detail: {
3112			title: 'Informácie o zákazníkovi',
3113
3114			stredisko: 'Stredisko',
3115			varSymbol: 'Var. symbol',
3116			datVystavenia: 'Dátum vystavenia',
3117			datSplatnosti: 'Dátum splatnosti',
3118			hodnotaPohladavky: 'Hodnota pohľadávky',
3119			hodnotaUhrad: 'Hodnota úhrad',
3120			afterDueDate: 'Po splatnosti (v dňoch)',
3121		}
3122	}
3123};
3124
3125var js_lang_claims = {
3126	remove: {
3127		state: 'Naozaj si prajete vymazať tento stav reklamácií?',
3128		shipping: 'Naozaj si prajete vymazať tento spôsob dopravy reklamácií?',
3129		refund: 'Naozaj si prajete vymazať tento spôsob vybavenia reklamácií?',
3130		service: 'Naozaj si prajete vymazať tento typ opravy reklamácií?',
3131	}
3132};
3133
3134var js_lang_promotions = {
3135	modal: {
3136		deactivatePromotion: {
3137			title: 'Deaktivovať zľavovú akciu',
3138			msg: 'Naozaj si želáte deaktivovať zvolenu akciu "#_PROMOTION_NAME_#"?'
3139		},
3140		activePromotion: {
3141			title: 'Aktivovať zľavovú akciu',
3142			msg: 'Naozaj si želáte aktivovať zvolenu akciu "#_PROMOTION_NAME_#"?'
3143		}
3144	},
3145	notifications: {
3146		alreadySelectedProduct: {
3147			title: '',
3148			msg: 'Vami vybraný produkt už bol pridaný.'
3149		},
3150		alreadySelectedUser: {
3151			title: '',
3152			msg: 'Vami vybraný zákazník už bol pridaný.'
3153		},
3154		subscriptionNameRequired: {
3155			title: '',
3156			msg: 'Názov predplatného je povinný.'
3157		},
3158		subscriptionTypeRequired: {
3159			title: '',
3160			msg: 'Typ predplatného je povinný.'
3161		},
3162		subscriptionProductRequired: {
3163			title: '',
3164			msg: 'Vyberte produkt, ktorý bude s predplatným spojený.'
3165		},
3166		subscriptionSgpCantBeSame: {
3167			title: '',
3168			msg: 'Zákaznícka skupina nemôže byť rovnaké.'
3169		},
3170		subscriptionOrderStatusCantBeSame: {
3171			title: '',
3172			msg: 'Stav objednávky nemôže byť rovnaký.'
3173		},
3174		subscriptionValidityTooSmall: {
3175			title: '',
3176			msg: 'Minimálna platnosť predplatného je 1 deň.'
3177		},
3178	},
3179	autocomplete: {
3180		noResults: 'Žiadne výsledky'
3181	}
3182};
3183
3184var js_lang_document_system = {
3185	numbering: {
3186		options: {
3187			'': '- Vyberte možnosť -',
3188			'#_YEAR_4_#': 'Rok (4 čísla)',
3189			'#_YEAR_2_#': 'Rok (2 čísla)',
3190			'#_ORDER_ID_#': 'Číslo objednávky',
3191			'#_CONSTANT_#': 'Konstanta',
3192		}
3193	},
3194};
3195
3196var js_lang_we_are_hiring = `
3197  ______   _______   ________   ______  ________  ______  __     __  ________                  __    __
3198 /      \\ |       \\ |        \\ /      \\|        \\|      \\|  \\   |  \\|        \\                |  \\  |  \\
3199|  $$$$$$\\| $$$$$$$\\| $$$$$$$$|  $$$$$$\\\\$$$$$$$$ \\$$$$$$| $$   | $$| $$$$$$$$        _______  \\$$ _| $$_     ______    _______
3200| $$   \\$$| $$__| $$| $$__    | $$__| $$  | $$     | $$  | $$   | $$| $$__           /       \\|  \\|   $$ \\   /      \\  /       \\
3201| $$      | $$    $$| $$  \\   | $$    $$  | $$     | $$   \\$$\\ /  $$| $$  \\         |  $$$$$$$| $$ \\$$$$$$  |  $$$$$$\\|  $$$$$$$
3202| $$   __ | $$$$$$$\\| $$$$$   | $$$$$$$$  | $$     | $$    \\$$\\  $$ | $$$$$          \\$$    \\ | $$  | $$ __ | $$    $$ \\$$    \\
3203| $$__/  \\| $$  | $$| $$_____ | $$  | $$  | $$    _| $$_    \\$$ $$  | $$_____        _\\$$$$$$\\| $$  | $$|  \\| $$$$$$$$ _\\$$$$$$\\
3204 \\$$    $$| $$  | $$| $$     \\| $$  | $$  | $$   |   $$ \\    \\$$$   | $$     \\      |       $$| $$   \\$$  $$ \\$$     \\|       $$
3205  \\$$$$$$  \\$$   \\$$ \\$$$$$$$$ \\$$   \\$$   \\$$    \\$$$$$$     \\$     \\$$$$$$$$       \\$$$$$$$  \\$$    \\$$$$   \\$$$$$$$ \\$$$$$$$
3206
3207
3208Nechceš sa k nám pridať a vyvíjať lepší kód? Viac nájdeš na našej stránke https://www.creativesites.sk/kariera/
3209`;
3210
3211var js_lang_export_not_marked_orders = 'Neoznačili ste žiadne objednávky, preto sa pre export spracujú len doposiaľ nevyexportované. Pokračovať?';
3212var cms_appstore_cant_activate_prerequisite = 'Aktivácia aplikácie vyžaduje mať najskôr aktivovanú inú aplikáciu. Viac informácií nájdete v detaile aplikácie.';
3213var cms_appstore_cant_activate_relocate = 'Prejsť do aplikácie';
3214
3215var js_lang_client_credits = {
3216	standardCurrentBalance: 'Aktuálny zostatok štandardných kreditov',
3217	pnmVipCurrentBalance: 'Aktuálny zostatok PNM/VIP kreditov',
3218	guaranteedCredit: 'Garantovaný kredit',
3219	creditValidUntil: 'Platnosť kreditu do',
3220	currentBalance: 'Aktuálny zostatok kreditov',
3221};
3222
3223var js_lang_contact_form = {
3224	gdpr: "Musíte súhlasiť s podmienkami spracovania osobných údajov"
3225};
3226
3227var cms_js_lang_claim = 'Reklamácia';
3228var cms_js_lang_claim_send = 'Odoslať reklamáciu';
3229var cms_js_lang_article_faq_title = 'Správa FAQ';
3230var cms_js_lang_article_faq_add = 'Pridať otázku';
3231var cms_js_lang_article_faq_remove_title = 'Odstrániť';
3232var cms_js_lang_article_faq_save = 'Uložiť';
3233var cms_js_lang_article_faq_cancel = 'Zrušiť';
3234var cms_js_lang_article_faq_question = 'Otázka';
3235var cms_js_lang_article_faq_answer = 'Odpoveď';
3236
3237var js_lang_rotary_images_title = 'Rotačné obrázky';
3238var js_lang_rotary_images_err_1 = 'Pre typ obrázku "Filmový pás" je možné nahrať len jeden obrázok.';
3239var js_lang_rotary_images_err_2 = 'Počet nahraných obrázkov sa nezhoduje so zvoleným množstvom.';
3240
3241var js_lang_cms_app_activation_help_text = 'Priblížte nám, čo by Vás ohľadne funkcie zaujímalo.';
3242
3243var js_lang_months_names = {
3244	1: 'Január',
3245	2: 'Február',
3246	3: 'Marec',
3247	4: 'Apríl',
3248	5: 'Máj',
3249	6: 'Jún',
3250	7: 'Júl',
3251	8: 'August',
3252	9: 'September',
3253	10: 'Október',
3254	11: 'November',
3255	12: 'December'
3256};
3257
3258var js_lang_freeshipping_interval = {
3259	dates_must_be_different: 'Dátumy musia byť rozdielne',
3260	start_must_be_lower: 'Začiatok nemôže byť neskôr ako koniec',
3261};
3262
3263var js_lang_coupon_nth_percent_only_tooltip = 'Táto možnosť je dostupná iba pri type zľavy "%s".';
3264
3265var js_lang_new_taxrate_export_label = 'Export dát z faktúr';
3266var js_lang_new_taxrate_export_select = 'Zvoľte mesiac';
3267
3268var js_lang_product_settings_copy_title = 'Kopírovať vlastnosti produktu';
3269var js_lang_product_settings_copy_overwrite_title = 'Produkt už má nastavené niektoré z kopírovaných vlastností, želáte si ich prepísať?';
3270var js_lang_product_settings_copy_select_values = 'Prosím, vyberte hodnoty, ktoré chcete kopírovať.';
3271var js_lang_product_settings_copy_overwrite_button = 'Prepísať';
3272
3273var order_status_quick_templates = {
3274	'modalTitle': 'Správa textovýčh šablón',
3275	'templateSave': 'Uložiť',
3276	'templateAdd': 'Pridať',
3277	'templateCopy': 'Vytvoriť kópiu šablóny',
3278	'templateDelete': 'Zmazať šablónu',
3279	'templateCancel': 'Zrušiť',
3280	'templatePreview': 'Náhľad e-mailu',
3281	'templateSubject': 'Predmet emailu',
3282};
3283
3284var js_lang_app_1654_langs = {
3285	stores_tooltip: 'Povolené predajne na ktorých je možné rezervovať tovar.',
3286	price_tooltip: 'Zákaznícka skupina z ktorej sa použije cena pre rezerváciu produktu.',
3287	shipping_tooltip: 'Spôsob dopravy ktorý sa automaticky zvolí pri potvrdení rezervácie.',
3288	allow_tooltip: 'Povoliť alebo zakázať rezervácie produktov na e-shope.',
3289};
3290
3291const js_langs = {
3292	plugins: {
3293		chosen: {
3294			placeholder_text_multiple: 'Vyberte hodnoty',
3295			placeholder_text_single: 'Vyberte hodnotu',
3296			placeholder_text: 'Vyberte hodnotu',
3297			no_results_text: 'Žiadne výsledky pre',
3298			create_option_text: 'Vytvoriť hodnotu'
3299		},
3300	},
3301	frontend: {
3302		checkout: {
3303			errors: {
3304				subscriptionRequiredBeforeCheckout: 'Pred pokračovaním v nákupe je potrebné mať aktívné predplatné.',
3305				maximumPurchasedProductsForUserReached: 'Prekročili ste limit nákupu, ešte môžte nakúpiť v celkovom množstve #_VALID_PURCHASE_QUANTITY_#',
3306				maximumOrdersForUserReached: 'Prekročili ste limit objednávok, skúste to prosím neskôr.',
3307			}
3308		},
3309		shopBrowse: {
3310			luigi_search: {
3311				availability: {
3312					available: 'Skladom',
3313					notAvailable: 'Na objednávku',
3314				},
3315			},
3316		},
3317		nsu: {
3318			vouchers: {
3319				realization: {
3320					confirmVoucherRealizationTitle: 'Potvrdenie hromadnej realizácie',
3321					selectedVoucherCount: 'Počet označených poukazov:',
3322				}
3323			}
3324		},
3325	},
3326	admin: {
3327		orders: {
3328			coolbalik: {
3329				exportTitle: 'Export objednávok do Coolbalik',
3330				delivery_at: 'Doručiť v',
3331				address: 'Adresa',
3332				city: 'Mesto',
3333				zip: 'PSČ',
3334				country: 'Krajina',
3335				user_email: 'Email používateľa',
3336				phone_1: 'Telefón',
3337				first_name: 'Meno',
3338				last_name: 'Priezvisko',
3339			},
3340		},
3341		products: {
3342			bulkDiscount: {
3343				additionalDiscount: 'Dodatočná deliteľná zľava',
3344				every: 'každých',
3345				applyAdditionalDiscount: 'aplikovať dodatočnú zľavu',
3346				addAdditionalDiscount: 'Pridať dodatočnú deliteľnú zľavu'
3347			},
3348			productPrices: {
3349				errorList: {
3350					date: {
3351						title: "Neplatný dátum v záložke ‘Ceny od-do’.",
3352						content: 'Dátum od musí byť menší než dátum do.',
3353					},
3354					price: {
3355						title: 'Neplatná cena v záložke ‚Ceny od–do‘.',
3356						content: 'Cena nesmie byť nulová ani prázdna.',
3357					},
3358					oldPrice: {
3359						title: 'Neplatná bežná cena v záložke ‚Ceny od–do‘.',
3360						content: 'Bežná cena nesmie byť väčšia ako cena.',
3361					},
3362					sgpId: {
3363						title: 'Neplatná zákaznícka skupina v záložke ‚Ceny od–do‘.',
3364						content: 'Cena musí obsahovať priradenú zákaznícku skupinu.',
3365					},
3366					sgpPrice: {
3367						title: 'Neplatná cena pre zákaznícku skupinu v záložke ‚Ceny od–do‘.',
3368						content: 'Cena pre zákaznícku skupinu nesmie byť nulová ani prázdna.',
3369					},
3370					sgpOldPrice: {
3371						title: 'Neplatná bežná cena pre zákaznícku skupinu v záložke ‚Ceny od–do‘.',
3372						content: 'Bežná Cena pre zákaznícku skupinu nesmie byť väčšia ako cena.',
3373					},
3374				}
3375			},
3376		},
3377		users: {
3378			shopperGroupManage: {
3379				title: 'Úprava zákazníckych skupín',
3380				name: 'Názov skupiny',
3381				discount: '% zľava',
3382				credits: 'Zakázať využívanie kreditov',
3383				domain: 'Doména',
3384				emptyDomain: '- bez obmedzenia na doménu -',
3385				actions: {
3386					edit: 'Upraviť',
3387					delete: 'Zmazať',
3388					addNew: 'Pridať zak. skupinu',
3389					back: 'Späť',
3390					save: 'Uložiť',
3391				}
3392			},
3393			editPassword: {
3394				newPassword: 'Nové heslo',
3395				confirmPassword: 'Potvrdiť heslo'
3396			}
3397		},
3398		settings: {
3399			params: {
3400				import: {
3401					confirm: 'Chcete importovať parametre zo zvoleného súboru?',
3402					notification: {
3403						success: {
3404							title: 'Parametre importované',
3405							message: 'Importované parametre: #_IMPORTED_COUNT_#, aktualizované parametre: #_UPDATED_COUNT_#'
3406						}
3407					}
3408				}
3409			}
3410		}
3411	}
3412};
3413
3414var js_lang_save_product_admin_allow = {
3415	modalTitle: 'Potvrďte uloženie',
3416	missingCategory: 'Pokúšate sa produkt uložiť bez priradenej kategórie.<br>Nastavenie produktu bez priradenej kategórie, je vhodné pre špeciálne typy produktov - darčeky, doplnkové služby, zálohované obaly...<br><br>Prajete si produkt uložiť?'
3417};
3418
3419var js_lang_ssp_cms_order_eshop_unknown_error = 'Neznáma chyba';
3420
3421var js_lang_checkout_payment_avail_btn_yes = 'Súhlasím';
3422var js_lang_checkout_payment_avail_btn_no  = 'Naspäť';
3423var js_lang_checkout_payment_avail_msg = 'V krátkej dobe Vás budeme informovať o dostupnosti tovaru.';
3424var js_lang_webpay_payment_methods = 'Zvoľte platobné metódy';
3425
3426var js_lang_glossary_delete_term = 'Naozaj si prajete zmazať tento termín?';
3427
3428// Zensky rod: Objednávka,...
3429var js_lang_checker_F_deselect = 'Zrušiť výber';
3430var js_lang_checker_F_selected = 'Označené {plural1}:';
3431var js_lang_checker_F_selected_all = 'Máte označené všetky vyfiltrované {plural1}';
3432var js_lang_checker_F_selected_all_no_filter = 'Máte označené všetky {plural1}';
3433var js_lang_checker_F_selected_all_cur = 'Všetky {plural1} na stránke sú označené.';
3434var js_lang_checker_F_select_all = 'Označiť {plural1} na všetkých stranách';
3435var js_lang_checker_F_select_info = 'Info: ďalšiu %s {plural0} máte označenú na ostatných stranách.';
3436var js_lang_checker_F_select_info_plural = 'Info: ďalšie %s {plural1} máte označené na ostatných stranách.';
3437var js_lang_checker_F_select_info_plural_2 = 'Info: ďalších %s {plural2} máte označené na ostatných stranách.';
3438// Muzsky rod: Produkt, Článkok,...
3439var js_lang_checker_M_deselect = 'Zrušiť výber';
3440var js_lang_checker_M_selected = 'Označené {plural1}:';
3441var js_lang_checker_M_selected_all = 'Máte označené všetky vyfiltrované {plural1}';
3442var js_lang_checker_M_selected_all_no_filter = 'Máte označené všetky {plural1}';
3443var js_lang_checker_M_selected_all_cur = 'Všetky {plural1} na stránke sú označené.';
3444var js_lang_checker_M_select_all = 'Označiť {plural1} na všetkých stranách';
3445var js_lang_checker_M_select_info = 'Info: ďalší %s {plural0} máte označený na ostatných stranách.';
3446var js_lang_checker_M_select_info_plural = 'Info: ďalšie %s {plural1} máte označené na ostatných stranách.';
3447var js_lang_checker_M_select_info_plural_2 = 'Info: ďalších %s {plural2} máte označených na ostatných stranách.';
3448
3449var js_lang_admin_article_plurals = ['článok','články','článkov'];
3450
3451var js_lang_export_category_tree = {
3452	"title": "Export stromu kategorií",
3453	"cancel": "Zrušiť",
3454	"export": "Exportovať",
3455	"select_category": "Prosím, vyberte aspoň jednu kategóriu",
3456};
3457
3458var js_lang_redirects_301_domain_replace_modal_confirm = 'Potvrdiť';
3459var js_lang_redirects_301_domain_replace_modal_cancel = 'Zrušiť';
3460var js_lang_redirects_301_domain_replace_modal_title = 'Nahradenie domén v zdrojových URL';
3461
3462var js_lang_batch_code = 'Šarža';
3463var js_lang_batch_code_expiration = 'Expirácia';
3464
3465var js_lang_canny_vex_title = 'Váš názor tvorí budúcnosť';
3466
3467var js_lang_button_logout = 'Odhlásiť';
3468
3469var js_lang_app_1987_label_tooltip = 'Poukážka sa bude odosielať v samostatnom emaili nezávisle od emailu o zmene stavu objednávky.';
3470
3471var js_lang_helpdesk_reviews_please_rate = 'Prosím, vyplňte hodnotenie a odpoveď na otázku.';
3472
3473var js_product_reservation_system_langs = {
3474	noReservations: 'Nie sú k dispozícii žiadne rezervácie na spracovanie.',
3475	reservationManagement: 'Správa rezervácií',
3476	close: 'Zatvoriť',
3477	mandatoryFields: 'Povinné polia s hviezdičkou musia byť vyplnené.',
3478	completed: 'Rezervácia {id} bola označená ako dokončená.',
3479	cancelled: 'Rezervácia {id} bola označená ako zrušená.',
3480	deleted: 'Rezervácia {id} bola odstránená.',
3481	vexHeader: 'Ďakujeme za Vašu rezerváciu.',
3482	vexDetails: 'Detaily rezervácie boli zaslané na Váš e-mail',
3483	vexAlreadyReserved: 'Bohužial, tento produkt si v určenom dátume rezervoval niekto iný.',
3484	vexAlreadyReservedMsg: 'Poprosíme o vybratie nového termínu',
3485	vexError: 'Bohužial, pri rezervácií vznikla chyba.',
3486	vexErrorMsg: 'Vo vaších údajoch sú tieto chyby:',
3487	vexContactAdmin: 'Kontaktujte prosím administrátora stránky',
3488	changeStatusConfirm: 'Naozaj si želáte označiť rezerváciu produktu <b>{product}</b> používateľa <b>{email}</b> ako {status}?',
3489	changeStatusConfirmLang: {
3490		completed: 'dokončenú',
3491		canceled: 'zrušenú',
3492		deleted: 'Naozaj si želáte odstrániť rezerváciu produktu <b>{product}</b> používateľa <b>{email}</b>?',
3493	},
3494	changeStatus: 'Zmena stavu rezervácie',
3495	confirm: 'Potvrdiť',
3496	cancel: 'Zrušiť',
3497};
3498
3499var js_import_stock_movements_help_text_intro = [];
3500js_import_stock_movements_help_text_intro[0] = 'Inštrukcie';
3501js_import_stock_movements_help_text_intro['1a'] = '"Datum pohybu";"Druh pohybu";"Kod produktu/variantu";"Mnozstvo";"Cena";"Nazov dodavatela";"Dodavatelska faktura"';   //  "Dátum pohybu";"Druh pohybu";"Kód produktu/variantu";"Množstvo";"Cena";"Názov dodávateľa";"Dodávateľská faktúra"
3502js_import_stock_movements_help_text_intro['1_batch_code'] = ';"Sarza";"Expiracia"'; //  ;"Šarža";"Expirácia"
3503js_import_stock_movements_help_text_intro['1z'] = ';"Poznamka"';    //  ;"Poznámka"
3504js_import_stock_movements_help_text_intro['2a'] = 'Formát CSV súboru: <b>"Dátum pohybu";"Druh pohybu";"Kód produktu/variantu";"Množstvo";"Cena";"Názov dodávateľa";"Dodávateľská faktúra"</b>';
3505js_import_stock_movements_help_text_intro['2_batch_code'] = '<b>;"Šarža";"Expirácia"</b>';
3506js_import_stock_movements_help_text_intro['2z'] = '<b>;"Poznámka"</b>';
3507js_import_stock_movements_help_text_intro['3a'] = 'Popis položiek:<div style="margin-top:-8px;margin-left:15px">- Dátum pohybu (nepovinný údaj, pri prázdnej hodnote bude použitý aktuálny dátum, inak vo formátoch napr. "2030-11-23", "2030-11-23 12:30:00", "23.11.2030", "23.11.2030 12:30"),<br />- Druh pohybu (povinný údaj, hodnota "P" znamená "príjem", hodnota "IP" znamená "inventúrny príjem", hodnota "IV" znamená "inventúrny výdaj"),<br />- Kód produktu/variantu (povinný neprázdny údaj),<br />- Množstvo (povinný nenulový údaj),<br />- Cena (nepovinný údaj. Cena je s DPH pre platcu DPH, bez DPH pre neplatcu DPH),<br />- Názov dodávateľa (podľa názvu bude použitý existujúci alebo založený nový. Iba v prípade neinventúrneho príjmového pohybu),<br />- Dodávateľská faktúra (hodnota "1" znamená príznak existencie dod. fak. Iba v prípade neinventúrneho príjmového pohybu),';
3508js_import_stock_movements_help_text_intro['3_batch_code'] = '<br />- Šarža (nepovinný údaj. Funkčné len v prípade zapnutej a aktívnej evidencie šarží),<br />- Expirácia (nepovinný údaj, resp. povinný len pri zároveň vyplnenom údaji Šarža a príjmovom pohybe. Funkčné len v prípade zapnutej a aktívnej evidencie šarží),';
3509js_import_stock_movements_help_text_intro['3z'] = '<br />- Poznámka (nepovinný údaj),</div>';
3510js_import_stock_movements_help_text_intro[4] = 'V prípade otázok alebo nefunkčnosti importu nám napíšte e-mail, radi Vám pomôžeme.';
3511js_import_stock_movements_help_text_intro[5] = '<b>Vzorový súbor</b> CSV s pripravenou hlavičkou s názvami stĺpcov je možné stiahnuť kliknutím na tento <a href="SampleCsvLinkData" download="import_stock_movements.csv">odkaz</a>.<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Po stiahnutí a otvorení súboru napr. v aplikácii Excel alebo Open Office môžete do súboru naplniť riadky s údajmi.<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Údaje pre jednotlivé stĺpce vyplňte na základe popisu položiek vyššie.<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Po uložení je súbor pripravený na nahratie do e-shopu a importovanie údajov.';
3512
3513var js_lang_gun_number_label = 'Číslo zbrane:';
3514var js_lang_gun_number_saved = 'Číslo zbrane bolo uložené.';
3515var js_lang_prefilled_best_price_message = 'Vedeli by ste mi dorovnať cenu na [kód produktu] [názov produktu]?\nNa [aktuálna doména] je cena [cena s DPH] a na tomto odkaze: ... je cena: ... [CURRENCY]\n\nAlebo máte záujem o individuálnu cenovú ponuku pre [kód produktu] [názov produktu]?';
3516var js_lang_template_product_ean_title = 'EAN kód:';
3517var js_lang_product_image = "Obrázok";
3518var js_lang_product_other_images = "Ostatné obr.";
3519var js_lang_product_weight = "Hmotnosť";
3520var js_lang_product_available_from = "K dispozícii od";
3521var js_lang_product_select = "- vyberte -";
3522
3523var js_lang_shipping_rate_ranges_disabled_warning = 'Hodnota sa nedá meniť, pretože máte zapnuté viacnásobné rozsahy pre toto pole. Hodnoty nastavte v príslušných pod-rozsahoch.';
3524
3525var js_lang_api_stripe = {
3526	unexpected_error: 'Vyskytla sa neočakávaná chyba.',
3527};
3528
3529var js_lang_kikaapi_confirm = "Naozaj chcete synchronizovať produkty z e-shopu do KikaAPI?";
3530
3531var js_lang_load_capacity_calculator = {
3532	'top_content': 'Rozdiel medzi testovanými podmienkami a reálnymi podmienkami zohľadňuje bezpečnostný faktor. Hodnotu bezpečnostného faktora môže stanoviť len osoba (konštruktér), ktorá pozná pracovné podmienky koliesok ako aj príslušné STN. Poradenstvo firmy RENOST môže len odporučiť výšku faktoru podľa dostupných informácií, bez záruky.',
3533	'formula_title': 'Požadovaná nosnosť sa stanoví nasledovne',
3534	'calculation_title': 'Výpočet',
3535	'v_label': 'Vlastná hmotnosť transportného zariadenia',
3536	'o_label': 'Maximálna hmotnosť nákladu',
3537	'n_label': 'Počet použitých rolovacích koliesok a kolies',
3538	'beta_label': 'Bezpečnostný faktor',
3539	'result_label': 'Nosnosť',
3540	'safety_title': 'Bezpečnostný faktor',
3541	'safety_content': 'Stanovuje odchýlky normalizovaných podmienok (STN EN 12 527, 12 532) od reálnych, ktoré zahŕňajú povrch podlahy, rýchlosť zariadenia, výšku prahov, sklon spádov, rovnomernosť rozloženia zaťaženia, smer pohybu rolovacieho kolieska a kolesa, teplotu (+15 °C až +28 °C).',
3542	'safety_factor_list_1': 'ručná manipulácia v štandardných podmienkach, rovná liata podlaha',
3543	'safety_factor_list_2': 'zhoršené podmienky, nerovnosti, výjazdy, častá manipulácia',
3544	'safety_factor_list_3': 'ťažné stroje, nepretržitá prevádzka, náročné podmienky',
3545	'safety_factor_list_3_more': 'a viac',
3546	'modal_title': 'Výpočet požadovanej nosnosti',
3547};
3548
3549var js_lang_sudo_slider_accesibility = {
3550	'prev_label': 'Prepnúť na stránku',
3551	'next_label': 'Prepnúť na stránku',
3552	'status_label': 'Zobrazená stránka',
3553	'from': 'z',
3554	'prev_html_text': 'predchádzajúca stránka',
3555	'next_html_text': 'následujúca stránka',
3556	'button_for_switching_pages': 'Tlačidlá na prepínanie stránok',
3557};
3558
3559var js_product_detail_availability_modal = {
3560	'pieces': 'ks',
3561	'in_stock': 'Skladom',
3562	'immediately': 'ihneď',
3563	'immediately_tooltip': 'Pri objednaní do 13:00 expedujeme v ten istý deň.',
3564	'in_stock_parts': 'Skladom v dielcoch',
3565	'parts_availability': '2-3 dni',
3566	'parts_availability_tooltip': 'Potrebná montáž, expedujeme do 2 až 3 dní.',
3567	'no_stock_availability': 'Výroba 8-14 dní',
3568	'status': 'Stav',
3569	'number_of_units': 'Počet jednotiek',
3570	'expedition_date': 'Termín expedície',
3571	'modal_title': 'Dostupnosť',
3572	'contact_text_empty': 'Pre informáciu o množstve a termíne dodania, <a href="{contactLink}" target="_blank">nás prosím kontaktujte.</a>',
3573	'contact_text': 'Pre preverenie dostupnosti pre väčšie množstvo, ako máme momentálne skladom <a href="{contactLink}" target="_blank">nás prosím kontaktujte</a>.'
3574};
3575
3576var js_lang_product_detail_availability_table = {
3577	store_head: 'Predajňa',
3578	availability_head: 'Možnosť doručenia do predajne',
3579	displayed_head: 'Vystavené v predajni',
3580};
3581
3582var js_lang_unfinished_purchase_modal_title = 'Nedokončili ste svoj nákup';
3583var js_lang_unfinished_purchase_modal_text = 'Skutočne chcete opustiť košík?';
3584var js_lang_unfinished_purchase_modal_btn_continue_order = 'Pokračovať v objednávke';
3585var js_lang_unfinished_purchase_modal_btn_continue_shopping = 'Pokračovať v nakupovaní';
3586
3587var js_lang_product_add_to_wishlist_aria_label = 'Odobrať :product_name z wishlistu';
3588
3589var js_global_wcag = {
3590	'sliderPrevButton' : 'Predchádzajúca stránka',
3591	'sliderNextButton' : 'Nasledujúca stránka',
3592	'sliderStatus' : 'Zmenila sa stránka karuselu.',
3593	'sliderDotLabel' : 'Prejsť na stránku {index}',
3594	'sortButtonsGroup' : 'Tlačidlové zobrazenie pre radenie produktov',
3595};
3596
3597
3598/* ========================================
3599 FILE: /includes/js/state-management-lib/state.min.js
3600 ==================== */
3601
3602var initState=function(){function a(b){var c=Object.getOwnPropertyNames(b);return c.map(function(c){if(b.hasOwnProperty(c)){var d=b[c];d&&"object"==typeof d&&a(d)}}),Object.freeze(b)}function b(a){return"object"==typeof a?Object.assign({},a):{}}function c(b){return function(c){var d=Object.assign({},b);return"string"==typeof c?"undefined"==typeof d[c]?null:a(d[c]):a(d)}}function d(a,b){return function(c,d){"string"!=typeof c||(b("stateWillChange",{key:c,value:d}),a[c]=d,b("stateDidChange",{key:c,value:d}))}}function e(a,b){return function(c,d,e){return Array.isArray(e)||(e=[]),a[c]=a[c]||[],a[c].push({listener:d,dependencies:e,once:b}),this}}function f(a){return function(b,c){return a[b]||a[b].length?c?(a[b]=a[b].filter(function(a){return a.listener!==c}),this):(delete a[b],this):this}}function g(a){return function(b,c){return a[b]&&a[b].length?(a[b]=a[b].filter(function(a){return a.dependencies.length&&(c=c||{},-1===a.dependencies.indexOf(c.key))?this:(a.listener(c),!a.once)}),this):this}}return"function"!=typeof Object.assign&&Object.defineProperty(Object,"assign",{value:function(a){if(null==a)throw new TypeError("Cannot convert undefined or null to object");for(var b,c=Object(a),d=1;d<arguments.length;d++)if(b=arguments[d],null!=b)for(var e in b)Object.prototype.hasOwnProperty.call(b,e)&&(c[e]=b[e]);return c},writable:!0,configurable:!0}),function(a){var h=b(a),i={};return{getState:c(h),setState:d(h,g(i)),once:e(i,!0),on:e(i,!1),off:f(i),trigger:g(i)}}}();
3603
3604/* ========================================
3605 FILE: /includes/js/state-management-lib/globalState.min.js
3606 ==================== */
3607
3608var globalState=initState();
3609
3610/* ========================================
3611 FILE: /includes/js/jquery/core/jquery-3.7.1.min.js
3612 ==================== */
3613
vendor: 87,533 bytes, lines 3614-3615
3614/*! jQuery v3.7.1 | (c) OpenJS Foundation and other contributors | jquery.org/license */
3615!function(e,t){"use strict";"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(ie,e){"use strict";var oe=[],r=Object.getPrototypeOf,ae=oe.slice,g=oe.flat?function(e){return oe.flat.call(e)}:function(e){return oe.concat.apply([],e)},s=oe.push,se=oe.indexOf,n={},i=n.toString,ue=n.hasOwnProperty,o=ue.toString,a=o.call(Object),le={},v=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType&&"function"!=typeof e.item},y=function(e){return null!=e&&e===e.window},C=ie.document,u={type:!0,src:!0,nonce:!0,noModule:!0};function m(e,t,n){var r,i,o=(n=n||C).createElement("script");if(o.text=e,t)for(r in u)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function x(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[i.call(e)]||"object":typeof e}var t="3.7.1",l=/HTML$/i,ce=function(e,t){return new ce.fn.init(e,t)};function c(e){var t=!!e&&"length"in e&&e.length,n=x(e);return!v(e)&&!y(e)&&("array"===n||0===t||"number"==typeof t&&0<t&&t-1 in e)}function fe(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}ce.fn=ce.prototype={jquery:t,constructor:ce,length:0,toArray:function(){return ae.call(this)},get:function(e){return null==e?ae.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=ce.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return ce.each(this,e)},map:function(n){return this.pushStack(ce.map(this,function(e,t){return n.call(e,t,e)}))},slice:function(){return this.pushStack(ae.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(ce.grep(this,function(e,t){return(t+1)%2}))},odd:function(){return this.pushStack(ce.grep(this,function(e,t){return t%2}))},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(0<=n&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:s,sort:oe.sort,splice:oe.splice},ce.extend=ce.fn.extend=function(){var e,t,n,r,i,o,a=arguments[0]||{},s=1,u=arguments.length,l=!1;for("boolean"==typeof a&&(l=a,a=arguments[s]||{},s++),"object"==typeof a||v(a)||(a={}),s===u&&(a=this,s--);s<u;s++)if(null!=(e=arguments[s]))for(t in e)r=e[t],"__proto__"!==t&&a!==r&&(l&&r&&(ce.isPlainObject(r)||(i=Array.isArray(r)))?(n=a[t],o=i&&!Array.isArray(n)?[]:i||ce.isPlainObject(n)?n:{},i=!1,a[t]=ce.extend(l,o,r)):void 0!==r&&(a[t]=r));return a},ce.extend({expando:"jQuery"+(t+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isPlainObject:function(e){var t,n;return!(!e||"[object Object]"!==i.call(e))&&(!(t=r(e))||"function"==typeof(n=ue.call(t,"constructor")&&t.constructor)&&o.call(n)===a)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},globalEval:function(e,t,n){m(e,{nonce:t&&t.nonce},n)},each:function(e,t){var n,r=0;if(c(e)){for(n=e.length;r<n;r++)if(!1===t.call(e[r],r,e[r]))break}else for(r in e)if(!1===t.call(e[r],r,e[r]))break;return e},text:function(e){var t,n="",r=0,i=e.nodeType;if(!i)while(t=e[r++])n+=ce.text(t);return 1===i||11===i?e.textContent:9===i?e.documentElement.textContent:3===i||4===i?e.nodeValue:n},makeArray:function(e,t){var n=t||[];return null!=e&&(c(Object(e))?ce.merge(n,"string"==typeof e?[e]:e):s.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:se.call(t,e,n)},isXMLDoc:function(e){var t=e&&e.namespaceURI,n=e&&(e.ownerDocument||e).documentElement;return!l.test(t||n&&n.nodeName||"HTML")},merge:function(e,t){for(var n=+t.length,r=0,i=e.length;r<n;r++)e[i++]=t[r];return e.length=i,e},grep:function(e,t,n){for(var r=[],i=0,o=e.length,a=!n;i<o;i++)!t(e[i],i)!==a&&r.push(e[i]);return r},map:function(e,t,n){var r,i,o=0,a=[];if(c(e))for(r=e.length;o<r;o++)null!=(i=t(e[o],o,n))&&a.push(i);else for(o in e)null!=(i=t(e[o],o,n))&&a.push(i);return g(a)},guid:1,support:le}),"function"==typeof Symbol&&(ce.fn[Symbol.iterator]=oe[Symbol.iterator]),ce.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){n["[object "+t+"]"]=t.toLowerCase()});var pe=oe.pop,de=oe.sort,he=oe.splice,ge="[\\x20\\t\\r\\n\\f]",ve=new RegExp("^"+ge+"+|((?:^|[^\\\\])(?:\\\\.)*)"+ge+"+$","g");ce.contains=function(e,t){var n=t&&t.parentNode;return e===n||!(!n||1!==n.nodeType||!(e.contains?e.contains(n):e.compareDocumentPosition&&16&e.compareDocumentPosition(n)))};var f=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g;function p(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e}ce.escapeSelector=function(e){return(e+"").replace(f,p)};var ye=C,me=s;!function(){var e,b,w,o,a,T,r,C,d,i,k=me,S=ce.expando,E=0,n=0,s=W(),c=W(),u=W(),h=W(),l=function(e,t){return e===t&&(a=!0),0},f="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",t="(?:\\\\[\\da-fA-F]{1,6}"+ge+"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",p="\\["+ge+"*("+t+")(?:"+ge+"*([*^$|!~]?=)"+ge+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+t+"))|)"+ge+"*\\]",g=":("+t+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+p+")*)|.*)\\)|)",v=new RegExp(ge+"+","g"),y=new RegExp("^"+ge+"*,"+ge+"*"),m=new RegExp("^"+ge+"*([>+~]|"+ge+")"+ge+"*"),x=new RegExp(ge+"|>"),j=new RegExp(g),A=new RegExp("^"+t+"$"),D={ID:new RegExp("^#("+t+")"),CLASS:new RegExp("^\\.("+t+")"),TAG:new RegExp("^("+t+"|[*])"),ATTR:new RegExp("^"+p),PSEUDO:new RegExp("^"+g),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+ge+"*(even|odd|(([+-]|)(\\d*)n|)"+ge+"*(?:([+-]|)"+ge+"*(\\d+)|))"+ge+"*\\)|)","i"),bool:new RegExp("^(?:"+f+")$","i"),needsContext:new RegExp("^"+ge+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+ge+"*((?:-\\d)?\\d*)"+ge+"*\\)|)(?=[^-]|$)","i")},N=/^(?:input|select|textarea|button)$/i,q=/^h\d$/i,L=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,H=/[+~]/,O=new RegExp("\\\\[\\da-fA-F]{1,6}"+ge+"?|\\\\([^\\r\\n\\f])","g"),P=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},M=function(){V()},R=J(function(e){return!0===e.disabled&&fe(e,"fieldset")},{dir:"parentNode",next:"legend"});try{k.apply(oe=ae.call(ye.childNodes),ye.childNodes),oe[ye.childNodes.length].nodeType}catch(e){k={apply:function(e,t){me.apply(e,ae.call(t))},call:function(e){me.apply(e,ae.call(arguments,1))}}}function I(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&(V(e),e=e||T,C)){if(11!==p&&(u=L.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return k.call(n,a),n}else if(f&&(a=f.getElementById(i))&&I.contains(e,a)&&a.id===i)return k.call(n,a),n}else{if(u[2])return k.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&e.getElementsByClassName)return k.apply(n,e.getElementsByClassName(i)),n}if(!(h[t+" "]||d&&d.test(t))){if(c=t,f=e,1===p&&(x.test(t)||m.test(t))){(f=H.test(t)&&U(e.parentNode)||e)==e&&le.scope||((s=e.getAttribute("id"))?s=ce.escapeSelector(s):e.setAttribute("id",s=S)),o=(l=Y(t)).length;while(o--)l[o]=(s?"#"+s:":scope")+" "+Q(l[o]);c=l.join(",")}try{return k.apply(n,f.querySelectorAll(c)),n}catch(e){h(t,!0)}finally{s===S&&e.removeAttribute("id")}}}return re(t.replace(ve,"$1"),e,n,r)}function W(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function F(e){return e[S]=!0,e}function $(e){var t=T.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function B(t){return function(e){return fe(e,"input")&&e.type===t}}function _(t){return function(e){return(fe(e,"input")||fe(e,"button"))&&e.type===t}}function z(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&R(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function X(a){return F(function(o){return o=+o,F(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function U(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}function V(e){var t,n=e?e.ownerDocument||e:ye;return n!=T&&9===n.nodeType&&n.documentElement&&(r=(T=n).documentElement,C=!ce.isXMLDoc(T),i=r.matches||r.webkitMatchesSelector||r.msMatchesSelector,r.msMatchesSelector&&ye!=T&&(t=T.defaultView)&&t.top!==t&&t.addEventListener("unload",M),le.getById=$(function(e){return r.appendChild(e).id=ce.expando,!T.getElementsByName||!T.getElementsByName(ce.expando).length}),le.disconnectedMatch=$(function(e){return i.call(e,"*")}),le.scope=$(function(){return T.querySelectorAll(":scope")}),le.cssHas=$(function(){try{return T.querySelector(":has(*,:jqfake)"),!1}catch(e){return!0}}),le.getById?(b.filter.ID=function(e){var t=e.replace(O,P);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&C){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(O,P);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&C){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):t.querySelectorAll(e)},b.find.CLASS=function(e,t){if("undefined"!=typeof t.getElementsByClassName&&C)return t.getElementsByClassName(e)},d=[],$(function(e){var t;r.appendChild(e).innerHTML="<a id='"+S+"' href='' disabled='disabled'></a><select id='"+S+"-\r\\' disabled='disabled'><option selected=''></option></select>",e.querySelectorAll("[selected]").length||d.push("\\["+ge+"*(?:value|"+f+")"),e.querySelectorAll("[id~="+S+"-]").length||d.push("~="),e.querySelectorAll("a#"+S+"+*").length||d.push(".#.+[+~]"),e.querySelectorAll(":checked").length||d.push(":checked"),(t=T.createElement("input")).setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),r.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&d.push(":enabled",":disabled"),(t=T.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||d.push("\\["+ge+"*name"+ge+"*="+ge+"*(?:''|\"\")")}),le.cssHas||d.push(":has"),d=d.length&&new RegExp(d.join("|")),l=function(e,t){if(e===t)return a=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!le.sortDetached&&t.compareDocumentPosition(e)===n?e===T||e.ownerDocument==ye&&I.contains(ye,e)?-1:t===T||t.ownerDocument==ye&&I.contains(ye,t)?1:o?se.call(o,e)-se.call(o,t):0:4&n?-1:1)}),T}for(e in I.matches=function(e,t){return I(e,null,null,t)},I.matchesSelector=function(e,t){if(V(e),C&&!h[t+" "]&&(!d||!d.test(t)))try{var n=i.call(e,t);if(n||le.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){h(t,!0)}return 0<I(t,T,null,[e]).length},I.contains=function(e,t){return(e.ownerDocument||e)!=T&&V(e),ce.contains(e,t)},I.attr=function(e,t){(e.ownerDocument||e)!=T&&V(e);var n=b.attrHandle[t.toLowerCase()],r=n&&ue.call(b.attrHandle,t.toLowerCase())?n(e,t,!C):void 0;return void 0!==r?r:e.getAttribute(t)},I.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},ce.uniqueSort=function(e){var t,n=[],r=0,i=0;if(a=!le.sortStable,o=!le.sortStable&&ae.call(e,0),de.call(e,l),a){while(t=e[i++])t===e[i]&&(r=n.push(i));while(r--)he.call(e,n[r],1)}return o=null,e},ce.fn.uniqueSort=function(){return this.pushStack(ce.uniqueSort(ae.apply(this)))},(b=ce.expr={cacheLength:50,createPseudo:F,match:D,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(O,P),e[3]=(e[3]||e[4]||e[5]||"").replace(O,P),"~="===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]||I.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]&&I.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return D.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&j.test(n)&&(t=Y(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(O,P).toLowerCase();return"*"===e?function(){return!0}:function(e){return fe(e,t)}},CLASS:function(e){var t=s[e+" "];return t||(t=new RegExp("(^|"+ge+")"+e+"("+ge+"|$)"))&&s(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=I.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1<t.indexOf(i):"$="===r?i&&t.slice(-i.length)===i:"~="===r?-1<(" "+t.replace(v," ")+" ").indexOf(i):"|="===r&&(t===i||t.slice(0,i.length+1)===i+"-"))}},CHILD:function(d,e,t,h,g){var v="nth"!==d.slice(0,3),y="last"!==d.slice(-4),m="of-type"===e;return 1===h&&0===g?function(e){return!!e.parentNode}:function(e,t,n){var r,i,o,a,s,u=v!==y?"nextSibling":"previousSibling",l=e.parentNode,c=m&&e.nodeName.toLowerCase(),f=!n&&!m,p=!1;if(l){if(v){while(u){o=e;while(o=o[u])if(m?fe(o,c):1===o.nodeType)return!1;s=u="only"===d&&!s&&"nextSibling"}return!0}if(s=[y?l.firstChild:l.lastChild],y&&f){p=(a=(r=(i=l[S]||(l[S]={}))[d]||[])[0]===E&&r[1])&&r[2],o=a&&l.childNodes[a];while(o=++a&&o&&o[u]||(p=a=0)||s.pop())if(1===o.nodeType&&++p&&o===e){i[d]=[E,a,p];break}}else if(f&&(p=a=(r=(i=e[S]||(e[S]={}))[d]||[])[0]===E&&r[1]),!1===p)while(o=++a&&o&&o[u]||(p=a=0)||s.pop())if((m?fe(o,c):1===o.nodeType)&&++p&&(f&&((i=o[S]||(o[S]={}))[d]=[E,p]),o===e))break;return(p-=g)===h||p%h==0&&0<=p/h}}},PSEUDO:function(e,o){var t,a=b.pseudos[e]||b.setFilters[e.toLowerCase()]||I.error("unsupported pseudo: "+e);return a[S]?a(o):1<a.length?(t=[e,e,"",o],b.setFilters.hasOwnProperty(e.toLowerCase())?F(function(e,t){var n,r=a(e,o),i=r.length;while(i--)e[n=se.call(e,r[i])]=!(t[n]=r[i])}):function(e){return a(e,0,t)}):a}},pseudos:{not:F(function(e){var r=[],i=[],s=ne(e.replace(ve,"$1"));return s[S]?F(function(e,t,n,r){var i,o=s(e,null,r,[]),a=e.length;while(a--)(i=o[a])&&(e[a]=!(t[a]=i))}):function(e,t,n){return r[0]=e,s(r,null,n,i),r[0]=null,!i.pop()}}),has:F(function(t){return function(e){return 0<I(t,e).length}}),contains:F(function(t){return t=t.replace(O,P),function(e){return-1<(e.textContent||ce.text(e)).indexOf(t)}}),lang:F(function(n){return A.test(n||"")||I.error("unsupported lang: "+n),n=n.replace(O,P).toLowerCase(),function(e){var t;do{if(t=C?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return(t=t.toLowerCase())===n||0===t.indexOf(n+"-")}while((e=e.parentNode)&&1===e.nodeType);return!1}}),target:function(e){var t=ie.location&&ie.location.hash;return t&&t.slice(1)===e.id},root:function(e){return e===r},focus:function(e){return e===function(){try{return T.activeElement}catch(e){}}()&&T.hasFocus()&&!!(e.type||e.href||~e.tabIndex)},enabled:z(!1),disabled:z(!0),checked:function(e){return fe(e,"input")&&!!e.checked||fe(e,"option")&&!!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!b.pseudos.empty(e)},header:function(e){return q.test(e.nodeName)},input:function(e){return N.test(e.nodeName)},button:function(e){return fe(e,"input")&&"button"===e.type||fe(e,"button")},text:function(e){var t;return fe(e,"input")&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:X(function(){return[0]}),last:X(function(e,t){return[t-1]}),eq:X(function(e,t,n){return[n<0?n+t:n]}),even:X(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:X(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:X(function(e,t,n){var r;for(r=n<0?n+t:t<n?t:n;0<=--r;)e.push(r);return e}),gt:X(function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e})}}).pseudos.nth=b.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})b.pseudos[e]=B(e);for(e in{submit:!0,reset:!0})b.pseudos[e]=_(e);function G(){}function Y(e,t){var n,r,i,o,a,s,u,l=c[e+" "];if(l)return t?0:l.slice(0);a=e,s=[],u=b.preFilter;while(a){for(o in n&&!(r=y.exec(a))||(r&&(a=a.slice(r[0].length)||a),s.push(i=[])),n=!1,(r=m.exec(a))&&(n=r.shift(),i.push({value:n,type:r[0].replace(ve," ")}),a=a.slice(n.length)),b.filter)!(r=D[o].exec(a))||u[o]&&!(r=u[o](r))||(n=r.shift(),i.push({value:n,type:o,matches:r}),a=a.slice(n.length));if(!n)break}return t?a.length:a?I.error(e):c(e,s).slice(0)}function Q(e){for(var t=0,n=e.length,r="";t<n;t++)r+=e[t].value;return r}function J(a,e,t){var s=e.dir,u=e.next,l=u||s,c=t&&"parentNode"===l,f=n++;return e.first?function(e,t,n){while(e=e[s])if(1===e.nodeType||c)return a(e,t,n);return!1}:function(e,t,n){var r,i,o=[E,f];if(n){while(e=e[s])if((1===e.nodeType||c)&&a(e,t,n))return!0}else while(e=e[s])if(1===e.nodeType||c)if(i=e[S]||(e[S]={}),u&&fe(e,u))e=e[s]||e;else{if((r=i[l])&&r[0]===E&&r[1]===f)return o[2]=r[2];if((i[l]=o)[2]=a(e,t,n))return!0}return!1}}function K(i){return 1<i.length?function(e,t,n){var r=i.length;while(r--)if(!i[r](e,t,n))return!1;return!0}:i[0]}function Z(e,t,n,r,i){for(var o,a=[],s=0,u=e.length,l=null!=t;s<u;s++)(o=e[s])&&(n&&!n(o,r,i)||(a.push(o),l&&t.push(s)));return a}function ee(d,h,g,v,y,e){return v&&!v[S]&&(v=ee(v)),y&&!y[S]&&(y=ee(y,e)),F(function(e,t,n,r){var i,o,a,s,u=[],l=[],c=t.length,f=e||function(e,t,n){for(var r=0,i=t.length;r<i;r++)I(e,t[r],n);return n}(h||"*",n.nodeType?[n]:n,[]),p=!d||!e&&h?f:Z(f,u,d,n,r);if(g?g(p,s=y||(e?d:c||v)?[]:t,n,r):s=p,v){i=Z(s,l),v(i,[],n,r),o=i.length;while(o--)(a=i[o])&&(s[l[o]]=!(p[l[o]]=a))}if(e){if(y||d){if(y){i=[],o=s.length;while(o--)(a=s[o])&&i.push(p[o]=a);y(null,s=[],i,r)}o=s.length;while(o--)(a=s[o])&&-1<(i=y?se.call(e,a):u[o])&&(e[i]=!(t[i]=a))}}else s=Z(s===t?s.splice(c,s.length):s),y?y(null,t,s,r):k.apply(t,s)})}function te(e){for(var i,t,n,r=e.length,o=b.relative[e[0].type],a=o||b.relative[" "],s=o?1:0,u=J(function(e){return e===i},a,!0),l=J(function(e){return-1<se.call(i,e)},a,!0),c=[function(e,t,n){var r=!o&&(n||t!=w)||((i=t).nodeType?u(e,t,n):l(e,t,n));return i=null,r}];s<r;s++)if(t=b.relative[e[s].type])c=[J(K(c),t)];else{if((t=b.filter[e[s].type].apply(null,e[s].matches))[S]){for(n=++s;n<r;n++)if(b.relative[e[n].type])break;return ee(1<s&&K(c),1<s&&Q(e.slice(0,s-1).concat({value:" "===e[s-2].type?"*":""})).replace(ve,"$1"),t,s<n&&te(e.slice(s,n)),n<r&&te(e=e.slice(n)),n<r&&Q(e))}c.push(t)}return K(c)}function ne(e,t){var n,v,y,m,x,r,i=[],o=[],a=u[e+" "];if(!a){t||(t=Y(e)),n=t.length;while(n--)(a=te(t[n]))[S]?i.push(a):o.push(a);(a=u(e,(v=o,m=0<(y=i).length,x=0<v.length,r=function(e,t,n,r,i){var o,a,s,u=0,l="0",c=e&&[],f=[],p=w,d=e||x&&b.find.TAG("*",i),h=E+=null==p?1:Math.random()||.1,g=d.length;for(i&&(w=t==T||t||i);l!==g&&null!=(o=d[l]);l++){if(x&&o){a=0,t||o.ownerDocument==T||(V(o),n=!C);while(s=v[a++])if(s(o,t||T,n)){k.call(r,o);break}i&&(E=h)}m&&((o=!s&&o)&&u--,e&&c.push(o))}if(u+=l,m&&l!==u){a=0;while(s=y[a++])s(c,f,t,n);if(e){if(0<u)while(l--)c[l]||f[l]||(f[l]=pe.call(r));f=Z(f)}k.apply(r,f),i&&!e&&0<f.length&&1<u+y.length&&ce.uniqueSort(r)}return i&&(E=h,w=p),c},m?F(r):r))).selector=e}return a}function re(e,t,n,r){var i,o,a,s,u,l="function"==typeof e&&e,c=!r&&Y(e=l.selector||e);if(n=n||[],1===c.length){if(2<(o=c[0]=c[0].slice(0)).length&&"ID"===(a=o[0]).type&&9===t.nodeType&&C&&b.relative[o[1].type]){if(!(t=(b.find.ID(a.matches[0].replace(O,P),t)||[])[0]))return n;l&&(t=t.parentNode),e=e.slice(o.shift().value.length)}i=D.needsContext.test(e)?0:o.length;while(i--){if(a=o[i],b.relative[s=a.type])break;if((u=b.find[s])&&(r=u(a.matches[0].replace(O,P),H.test(o[0].type)&&U(t.parentNode)||t))){if(o.splice(i,1),!(e=r.length&&Q(o)))return k.apply(n,r),n;break}}}return(l||ne(e,c))(r,t,!C,n,!t||H.test(e)&&U(t.parentNode)||t),n}G.prototype=b.filters=b.pseudos,b.setFilters=new G,le.sortStable=S.split("").sort(l).join("")===S,V(),le.sortDetached=$(function(e){return 1&e.compareDocumentPosition(T.createElement("fieldset"))}),ce.find=I,ce.expr[":"]=ce.expr.pseudos,ce.unique=ce.uniqueSort,I.compile=ne,I.select=re,I.setDocument=V,I.tokenize=Y,I.escape=ce.escapeSelector,I.getText=ce.text,I.isXML=ce.isXMLDoc,I.selectors=ce.expr,I.support=ce.support,I.uniqueSort=ce.uniqueSort}();var d=function(e,t,n){var r=[],i=void 0!==n;while((e=e[t])&&9!==e.nodeType)if(1===e.nodeType){if(i&&ce(e).is(n))break;r.push(e)}return r},h=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},b=ce.expr.match.needsContext,w=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function T(e,n,r){return v(n)?ce.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?ce.grep(e,function(e){return e===n!==r}):"string"!=typeof n?ce.grep(e,function(e){return-1<se.call(n,e)!==r}):ce.filter(n,e,r)}ce.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?ce.find.matchesSelector(r,e)?[r]:[]:ce.find.matches(e,ce.grep(t,function(e){return 1===e.nodeType}))},ce.fn.extend({find:function(e){var t,n,r=this.length,i=this;if("string"!=typeof e)return this.pushStack(ce(e).filter(function(){for(t=0;t<r;t++)if(ce.contains(i[t],this))return!0}));for(n=this.pushStack([]),t=0;t<r;t++)ce.find(e,i[t],n);return 1<r?ce.uniqueSort(n):n},filter:function(e){return this.pushStack(T(this,e||[],!1))},not:function(e){return this.pushStack(T(this,e||[],!0))},is:function(e){return!!T(this,"string"==typeof e&&b.test(e)?ce(e):e||[],!1).length}});var k,S=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(ce.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||k,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:S.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof ce?t[0]:t,ce.merge(this,ce.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:C,!0)),w.test(r[1])&&ce.isPlainObject(t))for(r in t)v(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=C.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):v(e)?void 0!==n.ready?n.ready(e):e(ce):ce.makeArray(e,this)}).prototype=ce.fn,k=ce(C);var E=/^(?:parents|prev(?:Until|All))/,j={children:!0,contents:!0,next:!0,prev:!0};function A(e,t){while((e=e[t])&&1!==e.nodeType);return e}ce.fn.extend({has:function(e){var t=ce(e,this),n=t.length;return this.filter(function(){for(var e=0;e<n;e++)if(ce.contains(this,t[e]))return!0})},closest:function(e,t){var n,r=0,i=this.length,o=[],a="string"!=typeof e&&ce(e);if(!b.test(e))for(;r<i;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(a?-1<a.index(n):1===n.nodeType&&ce.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(1<o.length?ce.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?se.call(ce(e),this[0]):se.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(ce.uniqueSort(ce.merge(this.get(),ce(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),ce.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return d(e,"parentNode")},parentsUntil:function(e,t,n){return d(e,"parentNode",n)},next:function(e){return A(e,"nextSibling")},prev:function(e){return A(e,"previousSibling")},nextAll:function(e){return d(e,"nextSibling")},prevAll:function(e){return d(e,"previousSibling")},nextUntil:function(e,t,n){return d(e,"nextSibling",n)},prevUntil:function(e,t,n){return d(e,"previousSibling",n)},siblings:function(e){return h((e.parentNode||{}).firstChild,e)},children:function(e){return h(e.firstChild)},contents:function(e){return null!=e.contentDocument&&r(e.contentDocument)?e.contentDocument:(fe(e,"template")&&(e=e.content||e),ce.merge([],e.childNodes))}},function(r,i){ce.fn[r]=function(e,t){var n=ce.map(this,i,e);return"Until"!==r.slice(-5)&&(t=e),t&&"string"==typeof t&&(n=ce.filter(t,n)),1<this.length&&(j[r]||ce.uniqueSort(n),E.test(r)&&n.reverse()),this.pushStack(n)}});var D=/[^\x20\t\r\n\f]+/g;function N(e){return e}function q(e){throw e}function L(e,t,n,r){var i;try{e&&v(i=e.promise)?i.call(e).done(t).fail(n):e&&v(i=e.then)?i.call(e,t,n):t.apply(void 0,[e].slice(r))}catch(e){n.apply(void 0,[e])}}ce.Callbacks=function(r){var e,n;r="string"==typeof r?(e=r,n={},ce.each(e.match(D)||[],function(e,t){n[t]=!0}),n):ce.extend({},r);var i,t,o,a,s=[],u=[],l=-1,c=function(){for(a=a||r.once,o=i=!0;u.length;l=-1){t=u.shift();while(++l<s.length)!1===s[l].apply(t[0],t[1])&&r.stopOnFalse&&(l=s.length,t=!1)}r.memory||(t=!1),i=!1,a&&(s=t?[]:"")},f={add:function(){return s&&(t&&!i&&(l=s.length-1,u.push(t)),function n(e){ce.each(e,function(e,t){v(t)?r.unique&&f.has(t)||s.push(t):t&&t.length&&"string"!==x(t)&&n(t)})}(arguments),t&&!i&&c()),this},remove:function(){return ce.each(arguments,function(e,t){var n;while(-1<(n=ce.inArray(t,s,n)))s.splice(n,1),n<=l&&l--}),this},has:function(e){return e?-1<ce.inArray(e,s):0<s.length},empty:function(){return s&&(s=[]),this},disable:function(){return a=u=[],s=t="",this},disabled:function(){return!s},lock:function(){return a=u=[],t||i||(s=t=""),this},locked:function(){return!!a},fireWith:function(e,t){return a||(t=[e,(t=t||[]).slice?t.slice():t],u.push(t),i||c()),this},fire:function(){return f.fireWith(this,arguments),this},fired:function(){return!!o}};return f},ce.extend({Deferred:function(e){var o=[["notify","progress",ce.Callbacks("memory"),ce.Callbacks("memory"),2],["resolve","done",ce.Callbacks("once memory"),ce.Callbacks("once memory"),0,"resolved"],["reject","fail",ce.Callbacks("once memory"),ce.Callbacks("once memory"),1,"rejected"]],i="pending",a={state:function(){return i},always:function(){return s.done(arguments).fail(arguments),this},"catch":function(e){return a.then(null,e)},pipe:function(){var i=arguments;return ce.Deferred(function(r){ce.each(o,function(e,t){var n=v(i[t[4]])&&i[t[4]];s[t[1]](function(){var e=n&&n.apply(this,arguments);e&&v(e.promise)?e.promise().progress(r.notify).done(r.resolve).fail(r.reject):r[t[0]+"With"](this,n?[e]:arguments)})}),i=null}).promise()},then:function(t,n,r){var u=0;function l(i,o,a,s){return function(){var n=this,r=arguments,e=function(){var e,t;if(!(i<u)){if((e=a.apply(n,r))===o.promise())throw new TypeError("Thenable self-resolution");t=e&&("object"==typeof e||"function"==typeof e)&&e.then,v(t)?s?t.call(e,l(u,o,N,s),l(u,o,q,s)):(u++,t.call(e,l(u,o,N,s),l(u,o,q,s),l(u,o,N,o.notifyWith))):(a!==N&&(n=void 0,r=[e]),(s||o.resolveWith)(n,r))}},t=s?e:function(){try{e()}catch(e){ce.Deferred.exceptionHook&&ce.Deferred.exceptionHook(e,t.error),u<=i+1&&(a!==q&&(n=void 0,r=[e]),o.rejectWith(n,r))}};i?t():(ce.Deferred.getErrorHook?t.error=ce.Deferred.getErrorHook():ce.Deferred.getStackHook&&(t.error=ce.Deferred.getStackHook()),ie.setTimeout(t))}}return ce.Deferred(function(e){o[0][3].add(l(0,e,v(r)?r:N,e.notifyWith)),o[1][3].add(l(0,e,v(t)?t:N)),o[2][3].add(l(0,e,v(n)?n:q))}).promise()},promise:function(e){return null!=e?ce.extend(e,a):a}},s={};return ce.each(o,function(e,t){var n=t[2],r=t[5];a[t[1]]=n.add,r&&n.add(function(){i=r},o[3-e][2].disable,o[3-e][3].disable,o[0][2].lock,o[0][3].lock),n.add(t[3].fire),s[t[0]]=function(){return s[t[0]+"With"](this===s?void 0:this,arguments),this},s[t[0]+"With"]=n.fireWith}),a.promise(s),e&&e.call(s,s),s},when:function(e){var n=arguments.length,t=n,r=Array(t),i=ae.call(arguments),o=ce.Deferred(),a=function(t){return function(e){r[t]=this,i[t]=1<arguments.length?ae.call(arguments):e,--n||o.resolveWith(r,i)}};if(n<=1&&(L(e,o.done(a(t)).resolve,o.reject,!n),"pending"===o.state()||v(i[t]&&i[t].then)))return o.then();while(t--)L(i[t],a(t),o.reject);return o.promise()}});var H=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;ce.Deferred.exceptionHook=function(e,t){ie.console&&ie.console.warn&&e&&H.test(e.name)&&ie.console.warn("jQuery.Deferred exception: "+e.message,e.stack,t)},ce.readyException=function(e){ie.setTimeout(function(){throw e})};var O=ce.Deferred();function P(){C.removeEventListener("DOMContentLoaded",P),ie.removeEventListener("load",P),ce.ready()}ce.fn.ready=function(e){return O.then(e)["catch"](function(e){ce.readyException(e)}),this},ce.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--ce.readyWait:ce.isReady)||(ce.isReady=!0)!==e&&0<--ce.readyWait||O.resolveWith(C,[ce])}}),ce.ready.then=O.then,"complete"===C.readyState||"loading"!==C.readyState&&!C.documentElement.doScroll?ie.setTimeout(ce.ready):(C.addEventListener("DOMContentLoaded",P),ie.addEventListener("load",P));var M=function(e,t,n,r,i,o,a){var s=0,u=e.length,l=null==n;if("object"===x(n))for(s in i=!0,n)M(e,t,s,n[s],!0,o,a);else if(void 0!==r&&(i=!0,v(r)||(a=!0),l&&(a?(t.call(e,r),t=null):(l=t,t=function(e,t,n){return l.call(ce(e),n)})),t))for(;s<u;s++)t(e[s],n,a?r:r.call(e[s],s,t(e[s],n)));return i?e:l?t.call(e):u?t(e[0],n):o},R=/^-ms-/,I=/-([a-z])/g;function W(e,t){return t.toUpperCase()}function F(e){return e.replace(R,"ms-").replace(I,W)}var $=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType};function B(){this.expando=ce.expando+B.uid++}B.uid=1,B.prototype={cache:function(e){var t=e[this.expando];return t||(t={},$(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,n){var r,i=this.cache(e);if("string"==typeof t)i[F(t)]=n;else for(r in t)i[F(r)]=t[r];return i},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][F(t)]},access:function(e,t,n){return void 0===t||t&&"string"==typeof t&&void 0===n?this.get(e,t):(this.set(e,t,n),void 0!==n?n:t)},remove:function(e,t){var n,r=e[this.expando];if(void 0!==r){if(void 0!==t){n=(t=Array.isArray(t)?t.map(F):(t=F(t))in r?[t]:t.match(D)||[]).length;while(n--)delete r[t[n]]}(void 0===t||ce.isEmptyObject(r))&&(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){var t=e[this.expando];return void 0!==t&&!ce.isEmptyObject(t)}};var _=new B,z=new B,X=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,U=/[A-Z]/g;function V(e,t,n){var r,i;if(void 0===n&&1===e.nodeType)if(r="data-"+t.replace(U,"-$&").toLowerCase(),"string"==typeof(n=e.getAttribute(r))){try{n="true"===(i=n)||"false"!==i&&("null"===i?null:i===+i+""?+i:X.test(i)?JSON.parse(i):i)}catch(e){}z.set(e,t,n)}else n=void 0;return n}ce.extend({hasData:function(e){return z.hasData(e)||_.hasData(e)},data:function(e,t,n){return z.access(e,t,n)},removeData:function(e,t){z.remove(e,t)},_data:function(e,t,n){return _.access(e,t,n)},_removeData:function(e,t){_.remove(e,t)}}),ce.fn.extend({data:function(n,e){var t,r,i,o=this[0],a=o&&o.attributes;if(void 0===n){if(this.length&&(i=z.get(o),1===o.nodeType&&!_.get(o,"hasDataAttrs"))){t=a.length;while(t--)a[t]&&0===(r=a[t].name).indexOf("data-")&&(r=F(r.slice(5)),V(o,r,i[r]));_.set(o,"hasDataAttrs",!0)}return i}return"object"==typeof n?this.each(function(){z.set(this,n)}):M(this,function(e){var t;if(o&&void 0===e)return void 0!==(t=z.get(o,n))?t:void 0!==(t=V(o,n))?t:void 0;this.each(function(){z.set(this,n,e)})},null,e,1<arguments.length,null,!0)},removeData:function(e){return this.each(function(){z.remove(this,e)})}}),ce.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=_.get(e,t),n&&(!r||Array.isArray(n)?r=_.access(e,t,ce.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=ce.queue(e,t),r=n.length,i=n.shift(),o=ce._queueHooks(e,t);"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,function(){ce.dequeue(e,t)},o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return _.get(e,n)||_.access(e,n,{empty:ce.Callbacks("once memory").add(function(){_.remove(e,[t+"queue",n])})})}}),ce.fn.extend({queue:function(t,n){var e=2;return"string"!=typeof t&&(n=t,t="fx",e--),arguments.length<e?ce.queue(this[0],t):void 0===n?this:this.each(function(){var e=ce.queue(this,t,n);ce._queueHooks(this,t),"fx"===t&&"inprogress"!==e[0]&&ce.dequeue(this,t)})},dequeue:function(e){return this.each(function(){ce.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,r=1,i=ce.Deferred(),o=this,a=this.length,s=function(){--r||i.resolveWith(o,[o])};"string"!=typeof e&&(t=e,e=void 0),e=e||"fx";while(a--)(n=_.get(o[a],e+"queueHooks"))&&n.empty&&(r++,n.empty.add(s));return s(),i.promise(t)}});var G=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,Y=new RegExp("^(?:([+-])=|)("+G+")([a-z%]*)$","i"),Q=["Top","Right","Bottom","Left"],J=C.documentElement,K=function(e){return ce.contains(e.ownerDocument,e)},Z={composed:!0};J.getRootNode&&(K=function(e){return ce.contains(e.ownerDocument,e)||e.getRootNode(Z)===e.ownerDocument});var ee=function(e,t){return"none"===(e=t||e).style.display||""===e.style.display&&K(e)&&"none"===ce.css(e,"display")};function te(e,t,n,r){var i,o,a=20,s=r?function(){return r.cur()}:function(){return ce.css(e,t,"")},u=s(),l=n&&n[3]||(ce.cssNumber[t]?"":"px"),c=e.nodeType&&(ce.cssNumber[t]||"px"!==l&&+u)&&Y.exec(ce.css(e,t));if(c&&c[3]!==l){u/=2,l=l||c[3],c=+u||1;while(a--)ce.style(e,t,c+l),(1-o)*(1-(o=s()/u||.5))<=0&&(a=0),c/=o;c*=2,ce.style(e,t,c+l),n=n||[]}return n&&(c=+c||+u||0,i=n[1]?c+(n[1]+1)*n[2]:+n[2],r&&(r.unit=l,r.start=c,r.end=i)),i}var ne={};function re(e,t){for(var n,r,i,o,a,s,u,l=[],c=0,f=e.length;c<f;c++)(r=e[c]).style&&(n=r.style.display,t?("none"===n&&(l[c]=_.get(r,"display")||null,l[c]||(r.style.display="")),""===r.style.display&&ee(r)&&(l[c]=(u=a=o=void 0,a=(i=r).ownerDocument,s=i.nodeName,(u=ne[s])||(o=a.body.appendChild(a.createElement(s)),u=ce.css(o,"display"),o.parentNode.removeChild(o),"none"===u&&(u="block"),ne[s]=u)))):"none"!==n&&(l[c]="none",_.set(r,"display",n)));for(c=0;c<f;c++)null!=l[c]&&(e[c].style.display=l[c]);return e}ce.fn.extend({show:function(){return re(this,!0)},hide:function(){return re(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){ee(this)?ce(this).show():ce(this).hide()})}});var xe,be,we=/^(?:checkbox|radio)$/i,Te=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,Ce=/^$|^module$|\/(?:java|ecma)script/i;xe=C.createDocumentFragment().appendChild(C.createElement("div")),(be=C.createElement("input")).setAttribute("type","radio"),be.setAttribute("checked","checked"),be.setAttribute("name","t"),xe.appendChild(be),le.checkClone=xe.cloneNode(!0).cloneNode(!0).lastChild.checked,xe.innerHTML="<textarea>x</textarea>",le.noCloneChecked=!!xe.cloneNode(!0).lastChild.defaultValue,xe.innerHTML="<option></option>",le.option=!!xe.lastChild;var ke={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,"",""]};function Se(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&fe(e,t)?ce.merge([e],n):n}function Ee(e,t){for(var n=0,r=e.length;n<r;n++)_.set(e[n],"globalEval",!t||_.get(t[n],"globalEval"))}ke.tbody=ke.tfoot=ke.colgroup=ke.caption=ke.thead,ke.th=ke.td,le.option||(ke.optgroup=ke.option=[1,"<select multiple='multiple'>","</select>"]);var je=/<|&#?\w+;/;function Ae(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d<h;d++)if((o=e[d])||0===o)if("object"===x(o))ce.merge(p,o.nodeType?[o]:o);else if(je.test(o)){a=a||f.appendChild(t.createElement("div")),s=(Te.exec(o)||["",""])[1].toLowerCase(),u=ke[s]||ke._default,a.innerHTML=u[1]+ce.htmlPrefilter(o)+u[2],c=u[0];while(c--)a=a.lastChild;ce.merge(p,a.childNodes),(a=f.firstChild).textContent=""}else p.push(t.createTextNode(o));f.textContent="",d=0;while(o=p[d++])if(r&&-1<ce.inArray(o,r))i&&i.push(o);else if(l=K(o),a=Se(f.appendChild(o),"script"),l&&Ee(a),n){c=0;while(o=a[c++])Ce.test(o.type||"")&&n.push(o)}return f}var De=/^([^.]*)(?:\.(.+)|)/;function Ne(){return!0}function qe(){return!1}function Le(e,t,n,r,i,o){var a,s;if("object"==typeof t){for(s in"string"!=typeof n&&(r=r||n,n=void 0),t)Le(e,s,n,r,t[s],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=qe;else if(!i)return e;return 1===o&&(a=i,(i=function(e){return ce().off(e),a.apply(this,arguments)}).guid=a.guid||(a.guid=ce.guid++)),e.each(function(){ce.event.add(this,t,i,r,n)})}function He(e,r,t){t?(_.set(e,r,!1),ce.event.add(e,r,{namespace:!1,handler:function(e){var t,n=_.get(this,r);if(1&e.isTrigger&&this[r]){if(n)(ce.event.special[r]||{}).delegateType&&e.stopPropagation();else if(n=ae.call(arguments),_.set(this,r,n),this[r](),t=_.get(this,r),_.set(this,r,!1),n!==t)return e.stopImmediatePropagation(),e.preventDefault(),t}else n&&(_.set(this,r,ce.event.trigger(n[0],n.slice(1),this)),e.stopPropagation(),e.isImmediatePropagationStopped=Ne)}})):void 0===_.get(e,r)&&ce.event.add(e,r,Ne)}ce.event={global:{},add:function(t,e,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=_.get(t);if($(t)){n.handler&&(n=(o=n).handler,i=o.selector),i&&ce.find.matchesSelector(J,i),n.guid||(n.guid=ce.guid++),(u=v.events)||(u=v.events=Object.create(null)),(a=v.handle)||(a=v.handle=function(e){return"undefined"!=typeof ce&&ce.event.triggered!==e.type?ce.event.dispatch.apply(t,arguments):void 0}),l=(e=(e||"").match(D)||[""]).length;while(l--)d=g=(s=De.exec(e[l])||[])[1],h=(s[2]||"").split(".").sort(),d&&(f=ce.event.special[d]||{},d=(i?f.delegateType:f.bindType)||d,f=ce.event.special[d]||{},c=ce.extend({type:d,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&ce.expr.match.needsContext.test(i),namespace:h.join(".")},o),(p=u[d])||((p=u[d]=[]).delegateCount=0,f.setup&&!1!==f.setup.call(t,r,h,a)||t.addEventListener&&t.addEventListener(d,a)),f.add&&(f.add.call(t,c),c.handler.guid||(c.handler.guid=n.guid)),i?p.splice(p.delegateCount++,0,c):p.push(c),ce.event.global[d]=!0)}},remove:function(e,t,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=_.hasData(e)&&_.get(e);if(v&&(u=v.events)){l=(t=(t||"").match(D)||[""]).length;while(l--)if(d=g=(s=De.exec(t[l])||[])[1],h=(s[2]||"").split(".").sort(),d){f=ce.event.special[d]||{},p=u[d=(r?f.delegateType:f.bindType)||d]||[],s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=p.length;while(o--)c=p[o],!i&&g!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(p.splice(o,1),c.selector&&p.delegateCount--,f.remove&&f.remove.call(e,c));a&&!p.length&&(f.teardown&&!1!==f.teardown.call(e,h,v.handle)||ce.removeEvent(e,d,v.handle),delete u[d])}else for(d in u)ce.event.remove(e,d+t[l],n,r,!0);ce.isEmptyObject(u)&&_.remove(e,"handle events")}},dispatch:function(e){var t,n,r,i,o,a,s=new Array(arguments.length),u=ce.event.fix(e),l=(_.get(this,"events")||Object.create(null))[u.type]||[],c=ce.event.special[u.type]||{};for(s[0]=u,t=1;t<arguments.length;t++)s[t]=arguments[t];if(u.delegateTarget=this,!c.preDispatch||!1!==c.preDispatch.call(this,u)){a=ce.event.handlers.call(this,u,l),t=0;while((i=a[t++])&&!u.isPropagationStopped()){u.currentTarget=i.elem,n=0;while((o=i.handlers[n++])&&!u.isImmediatePropagationStopped())u.rnamespace&&!1!==o.namespace&&!u.rnamespace.test(o.namespace)||(u.handleObj=o,u.data=o.data,void 0!==(r=((ce.event.special[o.origType]||{}).handle||o.handler).apply(i.elem,s))&&!1===(u.result=r)&&(u.preventDefault(),u.stopPropagation()))}return c.postDispatch&&c.postDispatch.call(this,u),u.result}},handlers:function(e,t){var n,r,i,o,a,s=[],u=t.delegateCount,l=e.target;if(u&&l.nodeType&&!("click"===e.type&&1<=e.button))for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&("click"!==e.type||!0!==l.disabled)){for(o=[],a={},n=0;n<u;n++)void 0===a[i=(r=t[n]).selector+" "]&&(a[i]=r.needsContext?-1<ce(i,this).index(l):ce.find(i,this,null,[l]).length),a[i]&&o.push(r);o.length&&s.push({elem:l,handlers:o})}return l=this,u<t.length&&s.push({elem:l,handlers:t.slice(u)}),s},addProp:function(t,e){Object.defineProperty(ce.Event.prototype,t,{enumerable:!0,configurable:!0,get:v(e)?function(){if(this.originalEvent)return e(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[t]},set:function(e){Object.defineProperty(this,t,{enumerable:!0,configurable:!0,writable:!0,value:e})}})},fix:function(e){return e[ce.expando]?e:new ce.Event(e)},special:{load:{noBubble:!0},click:{setup:function(e){var t=this||e;return we.test(t.type)&&t.click&&fe(t,"input")&&He(t,"click",!0),!1},trigger:function(e){var t=this||e;return we.test(t.type)&&t.click&&fe(t,"input")&&He(t,"click"),!0},_default:function(e){var t=e.target;return we.test(t.type)&&t.click&&fe(t,"input")&&_.get(t,"click")||fe(t,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},ce.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)},ce.Event=function(e,t){if(!(this instanceof ce.Event))return new ce.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&!1===e.returnValue?Ne:qe,this.target=e.target&&3===e.target.nodeType?e.target.parentNode:e.target,this.currentTarget=e.currentTarget,this.relatedTarget=e.relatedTarget):this.type=e,t&&ce.extend(this,t),this.timeStamp=e&&e.timeStamp||Date.now(),this[ce.expando]=!0},ce.Event.prototype={constructor:ce.Event,isDefaultPrevented:qe,isPropagationStopped:qe,isImmediatePropagationStopped:qe,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=Ne,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=Ne,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=Ne,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},ce.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,"char":!0,code:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:!0},ce.event.addProp),ce.each({focus:"focusin",blur:"focusout"},function(r,i){function o(e){if(C.documentMode){var t=_.get(this,"handle"),n=ce.event.fix(e);n.type="focusin"===e.type?"focus":"blur",n.isSimulated=!0,t(e),n.target===n.currentTarget&&t(n)}else ce.event.simulate(i,e.target,ce.event.fix(e))}ce.event.special[r]={setup:function(){var e;if(He(this,r,!0),!C.documentMode)return!1;(e=_.get(this,i))||this.addEventListener(i,o),_.set(this,i,(e||0)+1)},trigger:function(){return He(this,r),!0},teardown:function(){var e;if(!C.documentMode)return!1;(e=_.get(this,i)-1)?_.set(this,i,e):(this.removeEventListener(i,o),_.remove(this,i))},_default:function(e){return _.get(e.target,r)},delegateType:i},ce.event.special[i]={setup:function(){var e=this.ownerDocument||this.document||this,t=C.documentMode?this:e,n=_.get(t,i);n||(C.documentMode?this.addEventListener(i,o):e.addEventListener(r,o,!0)),_.set(t,i,(n||0)+1)},teardown:function(){var e=this.ownerDocument||this.document||this,t=C.documentMode?this:e,n=_.get(t,i)-1;n?_.set(t,i,n):(C.documentMode?this.removeEventListener(i,o):e.removeEventListener(r,o,!0),_.remove(t,i))}}}),ce.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(e,i){ce.event.special[e]={delegateType:i,bindType:i,handle:function(e){var t,n=e.relatedTarget,r=e.handleObj;return n&&(n===this||ce.contains(this,n))||(e.type=r.origType,t=r.handler.apply(this,arguments),e.type=i),t}}}),ce.fn.extend({on:function(e,t,n,r){return Le(this,e,t,n,r)},one:function(e,t,n,r){return Le(this,e,t,n,r,1)},off:function(e,t,n){var r,i;if(e&&e.preventDefault&&e.handleObj)return r=e.handleObj,ce(e.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"==typeof e){for(i in e)this.off(i,t,e[i]);return this}return!1!==t&&"function"!=typeof t||(n=t,t=void 0),!1===n&&(n=qe),this.each(function(){ce.event.remove(this,e,n,t)})}});var Oe=/<script|<style|<link/i,Pe=/checked\s*(?:[^=]|=\s*.checked.)/i,Me=/^\s*<!\[CDATA\[|\]\]>\s*$/g;function Re(e,t){return fe(e,"table")&&fe(11!==t.nodeType?t:t.firstChild,"tr")&&ce(e).children("tbody")[0]||e}function Ie(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function We(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Fe(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(_.hasData(e)&&(s=_.get(e).events))for(i in _.remove(t,"handle events"),s)for(n=0,r=s[i].length;n<r;n++)ce.event.add(t,i,s[i][n]);z.hasData(e)&&(o=z.access(e),a=ce.extend({},o),z.set(t,a))}}function $e(n,r,i,o){r=g(r);var e,t,a,s,u,l,c=0,f=n.length,p=f-1,d=r[0],h=v(d);if(h||1<f&&"string"==typeof d&&!le.checkClone&&Pe.test(d))return n.each(function(e){var t=n.eq(e);h&&(r[0]=d.call(this,e,t.html())),$e(t,r,i,o)});if(f&&(t=(e=Ae(r,n[0].ownerDocument,!1,n,o)).firstChild,1===e.childNodes.length&&(e=t),t||o)){for(s=(a=ce.map(Se(e,"script"),Ie)).length;c<f;c++)u=e,c!==p&&(u=ce.clone(u,!0,!0),s&&ce.merge(a,Se(u,"script"))),i.call(n[c],u,c);if(s)for(l=a[a.length-1].ownerDocument,ce.map(a,We),c=0;c<s;c++)u=a[c],Ce.test(u.type||"")&&!_.access(u,"globalEval")&&ce.contains(l,u)&&(u.src&&"module"!==(u.type||"").toLowerCase()?ce._evalUrl&&!u.noModule&&ce._evalUrl(u.src,{nonce:u.nonce||u.getAttribute("nonce")},l):m(u.textContent.replace(Me,""),u,l))}return n}function Be(e,t,n){for(var r,i=t?ce.filter(t,e):e,o=0;null!=(r=i[o]);o++)n||1!==r.nodeType||ce.cleanData(Se(r)),r.parentNode&&(n&&K(r)&&Ee(Se(r,"script")),r.parentNode.removeChild(r));return e}ce.extend({htmlPrefilter:function(e){return e},clone:function(e,t,n){var r,i,o,a,s,u,l,c=e.cloneNode(!0),f=K(e);if(!(le.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||ce.isXMLDoc(e)))for(a=Se(c),r=0,i=(o=Se(e)).length;r<i;r++)s=o[r],u=a[r],void 0,"input"===(l=u.nodeName.toLowerCase())&&we.test(s.type)?u.checked=s.checked:"input"!==l&&"textarea"!==l||(u.defaultValue=s.defaultValue);if(t)if(n)for(o=o||Se(e),a=a||Se(c),r=0,i=o.length;r<i;r++)Fe(o[r],a[r]);else Fe(e,c);return 0<(a=Se(c,"script")).length&&Ee(a,!f&&Se(e,"script")),c},cleanData:function(e){for(var t,n,r,i=ce.event.special,o=0;void 0!==(n=e[o]);o++)if($(n)){if(t=n[_.expando]){if(t.events)for(r in t.events)i[r]?ce.event.remove(n,r):ce.removeEvent(n,r,t.handle);n[_.expando]=void 0}n[z.expando]&&(n[z.expando]=void 0)}}}),ce.fn.extend({detach:function(e){return Be(this,e,!0)},remove:function(e){return Be(this,e)},text:function(e){return M(this,function(e){return void 0===e?ce.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 $e(this,arguments,function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Re(this,e).appendChild(e)})},prepend:function(){return $e(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Re(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return $e(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return $e(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(ce.cleanData(Se(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return ce.clone(this,e,t)})},html:function(e){return M(this,function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!Oe.test(e)&&!ke[(Te.exec(e)||["",""])[1].toLowerCase()]){e=ce.htmlPrefilter(e);try{for(;n<r;n++)1===(t=this[n]||{}).nodeType&&(ce.cleanData(Se(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var n=[];return $e(this,arguments,function(e){var t=this.parentNode;ce.inArray(this,n)<0&&(ce.cleanData(Se(this)),t&&t.replaceChild(e,this))},n)}}),ce.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,a){ce.fn[e]=function(e){for(var t,n=[],r=ce(e),i=r.length-1,o=0;o<=i;o++)t=o===i?this:this.clone(!0),ce(r[o])[a](t),s.apply(n,t.get());return this.pushStack(n)}});var _e=new RegExp("^("+G+")(?!px)[a-z%]+$","i"),ze=/^--/,Xe=function(e){var t=e.ownerDocument.defaultView;return t&&t.opener||(t=ie),t.getComputedStyle(e)},Ue=function(e,t,n){var r,i,o={};for(i in t)o[i]=e.style[i],e.style[i]=t[i];for(i in r=n.call(e),t)e.style[i]=o[i];return r},Ve=new RegExp(Q.join("|"),"i");function Ge(e,t,n){var r,i,o,a,s=ze.test(t),u=e.style;return(n=n||Xe(e))&&(a=n.getPropertyValue(t)||n[t],s&&a&&(a=a.replace(ve,"$1")||void 0),""!==a||K(e)||(a=ce.style(e,t)),!le.pixelBoxStyles()&&_e.test(a)&&Ve.test(t)&&(r=u.width,i=u.minWidth,o=u.maxWidth,u.minWidth=u.maxWidth=u.width=a,a=n.width,u.width=r,u.minWidth=i,u.maxWidth=o)),void 0!==a?a+"":a}function Ye(e,t){return{get:function(){if(!e())return(this.get=t).apply(this,arguments);delete this.get}}}!function(){function e(){if(l){u.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",l.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",J.appendChild(u).appendChild(l);var e=ie.getComputedStyle(l);n="1%"!==e.top,s=12===t(e.marginLeft),l.style.right="60%",o=36===t(e.right),r=36===t(e.width),l.style.position="absolute",i=12===t(l.offsetWidth/3),J.removeChild(u),l=null}}function t(e){return Math.round(parseFloat(e))}var n,r,i,o,a,s,u=C.createElement("div"),l=C.createElement("div");l.style&&(l.style.backgroundClip="content-box",l.cloneNode(!0).style.backgroundClip="",le.clearCloneStyle="content-box"===l.style.backgroundClip,ce.extend(le,{boxSizingReliable:function(){return e(),r},pixelBoxStyles:function(){return e(),o},pixelPosition:function(){return e(),n},reliableMarginLeft:function(){return e(),s},scrollboxSize:function(){return e(),i},reliableTrDimensions:function(){var e,t,n,r;return null==a&&(e=C.createElement("table"),t=C.createElement("tr"),n=C.createElement("div"),e.style.cssText="position:absolute;left:-11111px;border-collapse:separate",t.style.cssText="box-sizing:content-box;border:1px solid",t.style.height="1px",n.style.height="9px",n.style.display="block",J.appendChild(e).appendChild(t).appendChild(n),r=ie.getComputedStyle(t),a=parseInt(r.height,10)+parseInt(r.borderTopWidth,10)+parseInt(r.borderBottomWidth,10)===t.offsetHeight,J.removeChild(e)),a}}))}();var Qe=["Webkit","Moz","ms"],Je=C.createElement("div").style,Ke={};function Ze(e){var t=ce.cssProps[e]||Ke[e];return t||(e in Je?e:Ke[e]=function(e){var t=e[0].toUpperCase()+e.slice(1),n=Qe.length;while(n--)if((e=Qe[n]+t)in Je)return e}(e)||e)}var et=/^(none|table(?!-c[ea]).+)/,tt={position:"absolute",visibility:"hidden",display:"block"},nt={letterSpacing:"0",fontWeight:"400"};function rt(e,t,n){var r=Y.exec(t);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):t}function it(e,t,n,r,i,o){var a="width"===t?1:0,s=0,u=0,l=0;if(n===(r?"border":"content"))return 0;for(;a<4;a+=2)"margin"===n&&(l+=ce.css(e,n+Q[a],!0,i)),r?("content"===n&&(u-=ce.css(e,"padding"+Q[a],!0,i)),"margin"!==n&&(u-=ce.css(e,"border"+Q[a]+"Width",!0,i))):(u+=ce.css(e,"padding"+Q[a],!0,i),"padding"!==n?u+=ce.css(e,"border"+Q[a]+"Width",!0,i):s+=ce.css(e,"border"+Q[a]+"Width",!0,i));return!r&&0<=o&&(u+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-o-u-s-.5))||0),u+l}function ot(e,t,n){var r=Xe(e),i=(!le.boxSizingReliable()||n)&&"border-box"===ce.css(e,"boxSizing",!1,r),o=i,a=Ge(e,t,r),s="offset"+t[0].toUpperCase()+t.slice(1);if(_e.test(a)){if(!n)return a;a="auto"}return(!le.boxSizingReliable()&&i||!le.reliableTrDimensions()&&fe(e,"tr")||"auto"===a||!parseFloat(a)&&"inline"===ce.css(e,"display",!1,r))&&e.getClientRects().length&&(i="border-box"===ce.css(e,"boxSizing",!1,r),(o=s in e)&&(a=e[s])),(a=parseFloat(a)||0)+it(e,t,n||(i?"border":"content"),o,r,a)+"px"}function at(e,t,n,r,i){return new at.prototype.init(e,t,n,r,i)}ce.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Ge(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,aspectRatio:!0,borderImageSlice:!0,columnCount:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,scale:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeMiterlimit:!0,strokeOpacity:!0},cssProps:{},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,a,s=F(t),u=ze.test(t),l=e.style;if(u||(t=Ze(s)),a=ce.cssHooks[t]||ce.cssHooks[s],void 0===n)return a&&"get"in a&&void 0!==(i=a.get(e,!1,r))?i:l[t];"string"===(o=typeof n)&&(i=Y.exec(n))&&i[1]&&(n=te(e,t,i),o="number"),null!=n&&n==n&&("number"!==o||u||(n+=i&&i[3]||(ce.cssNumber[s]?"":"px")),le.clearCloneStyle||""!==n||0!==t.indexOf("background")||(l[t]="inherit"),a&&"set"in a&&void 0===(n=a.set(e,n,r))||(u?l.setProperty(t,n):l[t]=n))}},css:function(e,t,n,r){var i,o,a,s=F(t);return ze.test(t)||(t=Ze(s)),(a=ce.cssHooks[t]||ce.cssHooks[s])&&"get"in a&&(i=a.get(e,!0,n)),void 0===i&&(i=Ge(e,t,r)),"normal"===i&&t in nt&&(i=nt[t]),""===n||n?(o=parseFloat(i),!0===n||isFinite(o)?o||0:i):i}}),ce.each(["height","width"],function(e,u){ce.cssHooks[u]={get:function(e,t,n){if(t)return!et.test(ce.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?ot(e,u,n):Ue(e,tt,function(){return ot(e,u,n)})},set:function(e,t,n){var r,i=Xe(e),o=!le.scrollboxSize()&&"absolute"===i.position,a=(o||n)&&"border-box"===ce.css(e,"boxSizing",!1,i),s=n?it(e,u,n,a,i):0;return a&&o&&(s-=Math.ceil(e["offset"+u[0].toUpperCase()+u.slice(1)]-parseFloat(i[u])-it(e,u,"border",!1,i)-.5)),s&&(r=Y.exec(t))&&"px"!==(r[3]||"px")&&(e.style[u]=t,t=ce.css(e,u)),rt(0,t,s)}}}),ce.cssHooks.marginLeft=Ye(le.reliableMarginLeft,function(e,t){if(t)return(parseFloat(Ge(e,"marginLeft"))||e.getBoundingClientRect().left-Ue(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}))+"px"}),ce.each({margin:"",padding:"",border:"Width"},function(i,o){ce.cssHooks[i+o]={expand:function(e){for(var t=0,n={},r="string"==typeof e?e.split(" "):[e];t<4;t++)n[i+Q[t]+o]=r[t]||r[t-2]||r[0];return n}},"margin"!==i&&(ce.cssHooks[i+o].set=rt)}),ce.fn.extend({css:function(e,t){return M(this,function(e,t,n){var r,i,o={},a=0;if(Array.isArray(t)){for(r=Xe(e),i=t.length;a<i;a++)o[t[a]]=ce.css(e,t[a],!1,r);return o}return void 0!==n?ce.style(e,t,n):ce.css(e,t)},e,t,1<arguments.length)}}),((ce.Tween=at).prototype={constructor:at,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||ce.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(ce.cssNumber[n]?"":"px")},cur:function(){var e=at.propHooks[this.prop];return e&&e.get?e.get(this):at.propHooks._default.get(this)},run:function(e){var t,n=at.propHooks[this.prop];return this.options.duration?this.pos=t=ce.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),n&&n.set?n.set(this):at.propHooks._default.set(this),this}}).init.prototype=at.prototype,(at.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=ce.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){ce.fx.step[e.prop]?ce.fx.step[e.prop](e):1!==e.elem.nodeType||!ce.cssHooks[e.prop]&&null==e.elem.style[Ze(e.prop)]?e.elem[e.prop]=e.now:ce.style(e.elem,e.prop,e.now+e.unit)}}}).scrollTop=at.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},ce.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},ce.fx=at.prototype.init,ce.fx.step={};var st,ut,lt,ct,ft=/^(?:toggle|show|hide)$/,pt=/queueHooks$/;function dt(){ut&&(!1===C.hidden&&ie.requestAnimationFrame?ie.requestAnimationFrame(dt):ie.setTimeout(dt,ce.fx.interval),ce.fx.tick())}function ht(){return ie.setTimeout(function(){st=void 0}),st=Date.now()}function gt(e,t){var n,r=0,i={height:e};for(t=t?1:0;r<4;r+=2-t)i["margin"+(n=Q[r])]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function vt(e,t,n){for(var r,i=(yt.tweeners[t]||[]).concat(yt.tweeners["*"]),o=0,a=i.length;o<a;o++)if(r=i[o].call(n,t,e))return r}function yt(o,e,t){var n,a,r=0,i=yt.prefilters.length,s=ce.Deferred().always(function(){delete u.elem}),u=function(){if(a)return!1;for(var e=st||ht(),t=Math.max(0,l.startTime+l.duration-e),n=1-(t/l.duration||0),r=0,i=l.tweens.length;r<i;r++)l.tweens[r].run(n);return s.notifyWith(o,[l,n,t]),n<1&&i?t:(i||s.notifyWith(o,[l,1,0]),s.resolveWith(o,[l]),!1)},l=s.promise({elem:o,props:ce.extend({},e),opts:ce.extend(!0,{specialEasing:{},easing:ce.easing._default},t),originalProperties:e,originalOptions:t,startTime:st||ht(),duration:t.duration,tweens:[],createTween:function(e,t){var n=ce.Tween(o,l.opts,e,t,l.opts.specialEasing[e]||l.opts.easing);return l.tweens.push(n),n},stop:function(e){var t=0,n=e?l.tweens.length:0;if(a)return this;for(a=!0;t<n;t++)l.tweens[t].run(1);return e?(s.notifyWith(o,[l,1,0]),s.resolveWith(o,[l,e])):s.rejectWith(o,[l,e]),this}}),c=l.props;for(!function(e,t){var n,r,i,o,a;for(n in e)if(i=t[r=F(n)],o=e[n],Array.isArray(o)&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),(a=ce.cssHooks[r])&&"expand"in a)for(n in o=a.expand(o),delete e[r],o)n in e||(e[n]=o[n],t[n]=i);else t[r]=i}(c,l.opts.specialEasing);r<i;r++)if(n=yt.prefilters[r].call(l,o,c,l.opts))return v(n.stop)&&(ce._queueHooks(l.elem,l.opts.queue).stop=n.stop.bind(n)),n;return ce.map(c,vt,l),v(l.opts.start)&&l.opts.start.call(o,l),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always),ce.fx.timer(ce.extend(u,{elem:o,anim:l,queue:l.opts.queue})),l}ce.Animation=ce.extend(yt,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return te(n.elem,e,Y.exec(t),n),n}]},tweener:function(e,t){v(e)?(t=e,e=["*"]):e=e.match(D);for(var n,r=0,i=e.length;r<i;r++)n=e[r],yt.tweeners[n]=yt.tweeners[n]||[],yt.tweeners[n].unshift(t)},prefilters:[function(e,t,n){var r,i,o,a,s,u,l,c,f="width"in t||"height"in t,p=this,d={},h=e.style,g=e.nodeType&&ee(e),v=_.get(e,"fxshow");for(r in n.queue||(null==(a=ce._queueHooks(e,"fx")).unqueued&&(a.unqueued=0,s=a.empty.fire,a.empty.fire=function(){a.unqueued||s()}),a.unqueued++,p.always(function(){p.always(function(){a.unqueued--,ce.queue(e,"fx").length||a.empty.fire()})})),t)if(i=t[r],ft.test(i)){if(delete t[r],o=o||"toggle"===i,i===(g?"hide":"show")){if("show"!==i||!v||void 0===v[r])continue;g=!0}d[r]=v&&v[r]||ce.style(e,r)}if((u=!ce.isEmptyObject(t))||!ce.isEmptyObject(d))for(r in f&&1===e.nodeType&&(n.overflow=[h.overflow,h.overflowX,h.overflowY],null==(l=v&&v.display)&&(l=_.get(e,"display")),"none"===(c=ce.css(e,"display"))&&(l?c=l:(re([e],!0),l=e.style.display||l,c=ce.css(e,"display"),re([e]))),("inline"===c||"inline-block"===c&&null!=l)&&"none"===ce.css(e,"float")&&(u||(p.done(function(){h.display=l}),null==l&&(c=h.display,l="none"===c?"":c)),h.display="inline-block")),n.overflow&&(h.overflow="hidden",p.always(function(){h.overflow=n.overflow[0],h.overflowX=n.overflow[1],h.overflowY=n.overflow[2]})),u=!1,d)u||(v?"hidden"in v&&(g=v.hidden):v=_.access(e,"fxshow",{display:l}),o&&(v.hidden=!g),g&&re([e],!0),p.done(function(){for(r in g||re([e]),_.remove(e,"fxshow"),d)ce.style(e,r,d[r])})),u=vt(g?v[r]:0,r,p),r in v||(v[r]=u.start,g&&(u.end=u.start,u.start=0))}],prefilter:function(e,t){t?yt.prefilters.unshift(e):yt.prefilters.push(e)}}),ce.speed=function(e,t,n){var r=e&&"object"==typeof e?ce.extend({},e):{complete:n||!n&&t||v(e)&&e,duration:e,easing:n&&t||t&&!v(t)&&t};return ce.fx.off?r.duration=0:"number"!=typeof r.duration&&(r.duration in ce.fx.speeds?r.duration=ce.fx.speeds[r.duration]:r.duration=ce.fx.speeds._default),null!=r.queue&&!0!==r.queue||(r.queue="fx"),r.old=r.complete,r.complete=function(){v(r.old)&&r.old.call(this),r.queue&&ce.dequeue(this,r.queue)},r},ce.fn.extend({fadeTo:function(e,t,n,r){return this.filter(ee).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(t,e,n,r){var i=ce.isEmptyObject(t),o=ce.speed(e,n,r),a=function(){var e=yt(this,ce.extend({},t),o);(i||_.get(this,"finish"))&&e.stop(!0)};return a.finish=a,i||!1===o.queue?this.each(a):this.queue(o.queue,a)},stop:function(i,e,o){var a=function(e){var t=e.stop;delete e.stop,t(o)};return"string"!=typeof i&&(o=e,e=i,i=void 0),e&&this.queue(i||"fx",[]),this.each(function(){var e=!0,t=null!=i&&i+"queueHooks",n=ce.timers,r=_.get(this);if(t)r[t]&&r[t].stop&&a(r[t]);else for(t in r)r[t]&&r[t].stop&&pt.test(t)&&a(r[t]);for(t=n.length;t--;)n[t].elem!==this||null!=i&&n[t].queue!==i||(n[t].anim.stop(o),e=!1,n.splice(t,1));!e&&o||ce.dequeue(this,i)})},finish:function(a){return!1!==a&&(a=a||"fx"),this.each(function(){var e,t=_.get(this),n=t[a+"queue"],r=t[a+"queueHooks"],i=ce.timers,o=n?n.length:0;for(t.finish=!0,ce.queue(this,a,[]),r&&r.stop&&r.stop.call(this,!0),e=i.length;e--;)i[e].elem===this&&i[e].queue===a&&(i[e].anim.stop(!0),i.splice(e,1));for(e=0;e<o;e++)n[e]&&n[e].finish&&n[e].finish.call(this);delete t.finish})}}),ce.each(["toggle","show","hide"],function(e,r){var i=ce.fn[r];ce.fn[r]=function(e,t,n){return null==e||"boolean"==typeof e?i.apply(this,arguments):this.animate(gt(r,!0),e,t,n)}}),ce.each({slideDown:gt("show"),slideUp:gt("hide"),slideToggle:gt("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,r){ce.fn[e]=function(e,t,n){return this.animate(r,e,t,n)}}),ce.timers=[],ce.fx.tick=function(){var e,t=0,n=ce.timers;for(st=Date.now();t<n.length;t++)(e=n[t])()||n[t]!==e||n.splice(t--,1);n.length||ce.fx.stop(),st=void 0},ce.fx.timer=function(e){ce.timers.push(e),ce.fx.start()},ce.fx.interval=13,ce.fx.start=function(){ut||(ut=!0,dt())},ce.fx.stop=function(){ut=null},ce.fx.speeds={slow:600,fast:200,_default:400},ce.fn.delay=function(r,e){return r=ce.fx&&ce.fx.speeds[r]||r,e=e||"fx",this.queue(e,function(e,t){var n=ie.setTimeout(e,r);t.stop=function(){ie.clearTimeout(n)}})},lt=C.createElement("input"),ct=C.createElement("select").appendChild(C.createElement("option")),lt.type="checkbox",le.checkOn=""!==lt.value,le.optSelected=ct.selected,(lt=C.createElement("input")).value="t",lt.type="radio",le.radioValue="t"===lt.value;var mt,xt=ce.expr.attrHandle;ce.fn.extend({attr:function(e,t){return M(this,ce.attr,e,t,1<arguments.length)},removeAttr:function(e){return this.each(function(){ce.removeAttr(this,e)})}}),ce.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return"undefined"==typeof e.getAttribute?ce.prop(e,t,n):(1===o&&ce.isXMLDoc(e)||(i=ce.attrHooks[t.toLowerCase()]||(ce.expr.match.bool.test(t)?mt:void 0)),void 0!==n?null===n?void ce.removeAttr(e,t):i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+""),n):i&&"get"in i&&null!==(r=i.get(e,t))?r:null==(r=ce.find.attr(e,t))?void 0:r)},attrHooks:{type:{set:function(e,t){if(!le.radioValue&&"radio"===t&&fe(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r=0,i=t&&t.match(D);if(i&&1===e.nodeType)while(n=i[r++])e.removeAttribute(n)}}),mt={set:function(e,t,n){return!1===t?ce.removeAttr(e,n):e.setAttribute(n,n),n}},ce.each(ce.expr.match.bool.source.match(/\w+/g),function(e,t){var a=xt[t]||ce.find.attr;xt[t]=function(e,t,n){var r,i,o=t.toLowerCase();return n||(i=xt[o],xt[o]=r,r=null!=a(e,t,n)?o:null,xt[o]=i),r}});var bt=/^(?:input|select|textarea|button)$/i,wt=/^(?:a|area)$/i;function Tt(e){return(e.match(D)||[]).join(" ")}function Ct(e){return e.getAttribute&&e.getAttribute("class")||""}function kt(e){return Array.isArray(e)?e:"string"==typeof e&&e.match(D)||[]}ce.fn.extend({prop:function(e,t){return M(this,ce.prop,e,t,1<arguments.length)},removeProp:function(e){return this.each(function(){delete this[ce.propFix[e]||e]})}}),ce.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&ce.isXMLDoc(e)||(t=ce.propFix[t]||t,i=ce.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=ce.find.attr(e,"tabindex");return t?parseInt(t,10):bt.test(e.nodeName)||wt.test(e.nodeName)&&e.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),le.optSelected||(ce.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),ce.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){ce.propFix[this.toLowerCase()]=this}),ce.fn.extend({addClass:function(t){var e,n,r,i,o,a;return v(t)?this.each(function(e){ce(this).addClass(t.call(this,e,Ct(this)))}):(e=kt(t)).length?this.each(function(){if(r=Ct(this),n=1===this.nodeType&&" "+Tt(r)+" "){for(o=0;o<e.length;o++)i=e[o],n.indexOf(" "+i+" ")<0&&(n+=i+" ");a=Tt(n),r!==a&&this.setAttribute("class",a)}}):this},removeClass:function(t){var e,n,r,i,o,a;return v(t)?this.each(function(e){ce(this).removeClass(t.call(this,e,Ct(this)))}):arguments.length?(e=kt(t)).length?this.each(function(){if(r=Ct(this),n=1===this.nodeType&&" "+Tt(r)+" "){for(o=0;o<e.length;o++){i=e[o];while(-1<n.indexOf(" "+i+" "))n=n.replace(" "+i+" "," ")}a=Tt(n),r!==a&&this.setAttribute("class",a)}}):this:this.attr("class","")},toggleClass:function(t,n){var e,r,i,o,a=typeof t,s="string"===a||Array.isArray(t);return v(t)?this.each(function(e){ce(this).toggleClass(t.call(this,e,Ct(this),n),n)}):"boolean"==typeof n&&s?n?this.addClass(t):this.removeClass(t):(e=kt(t),this.each(function(){if(s)for(o=ce(this),i=0;i<e.length;i++)r=e[i],o.hasClass(r)?o.removeClass(r):o.addClass(r);else void 0!==t&&"boolean"!==a||((r=Ct(this))&&_.set(this,"__className__",r),this.setAttribute&&this.setAttribute("class",r||!1===t?"":_.get(this,"__className__")||""))}))},hasClass:function(e){var t,n,r=0;t=" "+e+" ";while(n=this[r++])if(1===n.nodeType&&-1<(" "+Tt(Ct(n))+" ").indexOf(t))return!0;return!1}});var St=/\r/g;ce.fn.extend({val:function(n){var r,e,i,t=this[0];return arguments.length?(i=v(n),this.each(function(e){var t;1===this.nodeType&&(null==(t=i?n.call(this,e,ce(this).val()):n)?t="":"number"==typeof t?t+="":Array.isArray(t)&&(t=ce.map(t,function(e){return null==e?"":e+""})),(r=ce.valHooks[this.type]||ce.valHooks[this.nodeName.toLowerCase()])&&"set"in r&&void 0!==r.set(this,t,"value")||(this.value=t))})):t?(r=ce.valHooks[t.type]||ce.valHooks[t.nodeName.toLowerCase()])&&"get"in r&&void 0!==(e=r.get(t,"value"))?e:"string"==typeof(e=t.value)?e.replace(St,""):null==e?"":e:void 0}}),ce.extend({valHooks:{option:{get:function(e){var t=ce.find.attr(e,"value");return null!=t?t:Tt(ce.text(e))}},select:{get:function(e){var t,n,r,i=e.options,o=e.selectedIndex,a="select-one"===e.type,s=a?null:[],u=a?o+1:i.length;for(r=o<0?u:a?o:0;r<u;r++)if(((n=i[r]).selected||r===o)&&!n.disabled&&(!n.parentNode.disabled||!fe(n.parentNode,"optgroup"))){if(t=ce(n).val(),a)return t;s.push(t)}return s},set:function(e,t){var n,r,i=e.options,o=ce.makeArray(t),a=i.length;while(a--)((r=i[a]).selected=-1<ce.inArray(ce.valHooks.option.get(r),o))&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),ce.each(["radio","checkbox"],function(){ce.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=-1<ce.inArray(ce(e).val(),t)}},le.checkOn||(ce.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var Et=ie.location,jt={guid:Date.now()},At=/\?/;ce.parseXML=function(e){var t,n;if(!e||"string"!=typeof e)return null;try{t=(new ie.DOMParser).parseFromString(e,"text/xml")}catch(e){}return n=t&&t.getElementsByTagName("parsererror")[0],t&&!n||ce.error("Invalid XML: "+(n?ce.map(n.childNodes,function(e){return e.textContent}).join("\n"):e)),t};var Dt=/^(?:focusinfocus|focusoutblur)$/,Nt=function(e){e.stopPropagation()};ce.extend(ce.event,{trigger:function(e,t,n,r){var i,o,a,s,u,l,c,f,p=[n||C],d=ue.call(e,"type")?e.type:e,h=ue.call(e,"namespace")?e.namespace.split("."):[];if(o=f=a=n=n||C,3!==n.nodeType&&8!==n.nodeType&&!Dt.test(d+ce.event.triggered)&&(-1<d.indexOf(".")&&(d=(h=d.split(".")).shift(),h.sort()),u=d.indexOf(":")<0&&"on"+d,(e=e[ce.expando]?e:new ce.Event(d,"object"==typeof e&&e)).isTrigger=r?2:3,e.namespace=h.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=n),t=null==t?[e]:ce.makeArray(t,[e]),c=ce.event.special[d]||{},r||!c.trigger||!1!==c.trigger.apply(n,t))){if(!r&&!c.noBubble&&!y(n)){for(s=c.delegateType||d,Dt.test(s+d)||(o=o.parentNode);o;o=o.parentNode)p.push(o),a=o;a===(n.ownerDocument||C)&&p.push(a.defaultView||a.parentWindow||ie)}i=0;while((o=p[i++])&&!e.isPropagationStopped())f=o,e.type=1<i?s:c.bindType||d,(l=(_.get(o,"events")||Object.create(null))[e.type]&&_.get(o,"handle"))&&l.apply(o,t),(l=u&&o[u])&&l.apply&&$(o)&&(e.result=l.apply(o,t),!1===e.result&&e.preventDefault());return e.type=d,r||e.isDefaultPrevented()||c._default&&!1!==c._default.apply(p.pop(),t)||!$(n)||u&&v(n[d])&&!y(n)&&((a=n[u])&&(n[u]=null),ce.event.triggered=d,e.isPropagationStopped()&&f.addEventListener(d,Nt),n[d](),e.isPropagationStopped()&&f.removeEventListener(d,Nt),ce.event.triggered=void 0,a&&(n[u]=a)),e.result}},simulate:function(e,t,n){var r=ce.extend(new ce.Event,n,{type:e,isSimulated:!0});ce.event.trigger(r,null,t)}}),ce.fn.extend({trigger:function(e,t){return this.each(function(){ce.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return ce.event.trigger(e,t,n,!0)}});var qt=/\[\]$/,Lt=/\r?\n/g,Ht=/^(?:submit|button|image|reset|file)$/i,Ot=/^(?:input|select|textarea|keygen)/i;function Pt(n,e,r,i){var t;if(Array.isArray(e))ce.each(e,function(e,t){r||qt.test(n)?i(n,t):Pt(n+"["+("object"==typeof t&&null!=t?e:"")+"]",t,r,i)});else if(r||"object"!==x(e))i(n,e);else for(t in e)Pt(n+"["+t+"]",e[t],r,i)}ce.param=function(e,t){var n,r=[],i=function(e,t){var n=v(t)?t():t;r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(null==e)return"";if(Array.isArray(e)||e.jquery&&!ce.isPlainObject(e))ce.each(e,function(){i(this.name,this.value)});else for(n in e)Pt(n,e[n],t,i);return r.join("&")},ce.fn.extend({serialize:function(){return ce.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=ce.prop(this,"elements");return e?ce.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!ce(this).is(":disabled")&&Ot.test(this.nodeName)&&!Ht.test(e)&&(this.checked||!we.test(e))}).map(function(e,t){var n=ce(this).val();return null==n?null:Array.isArray(n)?ce.map(n,function(e){return{name:t.name,value:e.replace(Lt,"\r\n")}}):{name:t.name,value:n.replace(Lt,"\r\n")}}).get()}});var Mt=/%20/g,Rt=/#.*$/,It=/([?&])_=[^&]*/,Wt=/^(.*?):[ \t]*([^\r\n]*)$/gm,Ft=/^(?:GET|HEAD)$/,$t=/^\/\//,Bt={},_t={},zt="*/".concat("*"),Xt=C.createElement("a");function Ut(o){return function(e,t){"string"!=typeof e&&(t=e,e="*");var n,r=0,i=e.toLowerCase().match(D)||[];if(v(t))while(n=i[r++])"+"===n[0]?(n=n.slice(1)||"*",(o[n]=o[n]||[]).unshift(t)):(o[n]=o[n]||[]).push(t)}}function Vt(t,i,o,a){var s={},u=t===_t;function l(e){var r;return s[e]=!0,ce.each(t[e]||[],function(e,t){var n=t(i,o,a);return"string"!=typeof n||u||s[n]?u?!(r=n):void 0:(i.dataTypes.unshift(n),l(n),!1)}),r}return l(i.dataTypes[0])||!s["*"]&&l("*")}function Gt(e,t){var n,r,i=ce.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((i[n]?e:r||(r={}))[n]=t[n]);return r&&ce.extend(!0,e,r),e}Xt.href=Et.href,ce.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Et.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(Et.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":zt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":ce.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?Gt(Gt(e,ce.ajaxSettings),t):Gt(ce.ajaxSettings,e)},ajaxPrefilter:Ut(Bt),ajaxTransport:Ut(_t),ajax:function(e,t){"object"==typeof e&&(t=e,e=void 0),t=t||{};var c,f,p,n,d,r,h,g,i,o,v=ce.ajaxSetup({},t),y=v.context||v,m=v.context&&(y.nodeType||y.jquery)?ce(y):ce.event,x=ce.Deferred(),b=ce.Callbacks("once memory"),w=v.statusCode||{},a={},s={},u="canceled",T={readyState:0,getResponseHeader:function(e){var t;if(h){if(!n){n={};while(t=Wt.exec(p))n[t[1].toLowerCase()+" "]=(n[t[1].toLowerCase()+" "]||[]).concat(t[2])}t=n[e.toLowerCase()+" "]}return null==t?null:t.join(", ")},getAllResponseHeaders:function(){return h?p:null},setRequestHeader:function(e,t){return null==h&&(e=s[e.toLowerCase()]=s[e.toLowerCase()]||e,a[e]=t),this},overrideMimeType:function(e){return null==h&&(v.mimeType=e),this},statusCode:function(e){var t;if(e)if(h)T.always(e[T.status]);else for(t in e)w[t]=[w[t],e[t]];return this},abort:function(e){var t=e||u;return c&&c.abort(t),l(0,t),this}};if(x.promise(T),v.url=((e||v.url||Et.href)+"").replace($t,Et.protocol+"//"),v.type=t.method||t.type||v.method||v.type,v.dataTypes=(v.dataType||"*").toLowerCase().match(D)||[""],null==v.crossDomain){r=C.createElement("a");try{r.href=v.url,r.href=r.href,v.crossDomain=Xt.protocol+"//"+Xt.host!=r.protocol+"//"+r.host}catch(e){v.crossDomain=!0}}if(v.data&&v.processData&&"string"!=typeof v.data&&(v.data=ce.param(v.data,v.traditional)),Vt(Bt,v,t,T),h)return T;for(i in(g=ce.event&&v.global)&&0==ce.active++&&ce.event.trigger("ajaxStart"),v.type=v.type.toUpperCase(),v.hasContent=!Ft.test(v.type),f=v.url.replace(Rt,""),v.hasContent?v.data&&v.processData&&0===(v.contentType||"").indexOf("application/x-www-form-urlencoded")&&(v.data=v.data.replace(Mt,"+")):(o=v.url.slice(f.length),v.data&&(v.processData||"string"==typeof v.data)&&(f+=(At.test(f)?"&":"?")+v.data,delete v.data),!1===v.cache&&(f=f.replace(It,"$1"),o=(At.test(f)?"&":"?")+"_="+jt.guid+++o),v.url=f+o),v.ifModified&&(ce.lastModified[f]&&T.setRequestHeader("If-Modified-Since",ce.lastModified[f]),ce.etag[f]&&T.setRequestHeader("If-None-Match",ce.etag[f])),(v.data&&v.hasContent&&!1!==v.contentType||t.contentType)&&T.setRequestHeader("Content-Type",v.contentType),T.setRequestHeader("Accept",v.dataTypes[0]&&v.accepts[v.dataTypes[0]]?v.accepts[v.dataTypes[0]]+("*"!==v.dataTypes[0]?", "+zt+"; q=0.01":""):v.accepts["*"]),v.headers)T.setRequestHeader(i,v.headers[i]);if(v.beforeSend&&(!1===v.beforeSend.call(y,T,v)||h))return T.abort();if(u="abort",b.add(v.complete),T.done(v.success),T.fail(v.error),c=Vt(_t,v,t,T)){if(T.readyState=1,g&&m.trigger("ajaxSend",[T,v]),h)return T;v.async&&0<v.timeout&&(d=ie.setTimeout(function(){T.abort("timeout")},v.timeout));try{h=!1,c.send(a,l)}catch(e){if(h)throw e;l(-1,e)}}else l(-1,"No Transport");function l(e,t,n,r){var i,o,a,s,u,l=t;h||(h=!0,d&&ie.clearTimeout(d),c=void 0,p=r||"",T.readyState=0<e?4:0,i=200<=e&&e<300||304===e,n&&(s=function(e,t,n){var r,i,o,a,s=e.contents,u=e.dataTypes;while("*"===u[0])u.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(i in s)if(s[i]&&s[i].test(r)){u.unshift(i);break}if(u[0]in n)o=u[0];else{for(i in n){if(!u[0]||e.converters[i+" "+u[0]]){o=i;break}a||(a=i)}o=o||a}if(o)return o!==u[0]&&u.unshift(o),n[o]}(v,T,n)),!i&&-1<ce.inArray("script",v.dataTypes)&&ce.inArray("json",v.dataTypes)<0&&(v.converters["text script"]=function(){}),s=function(e,t,n,r){var i,o,a,s,u,l={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)l[a.toLowerCase()]=e.converters[a];o=c.shift();while(o)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!u&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u=o,o=c.shift())if("*"===o)o=u;else if("*"!==u&&u!==o){if(!(a=l[u+" "+o]||l["* "+o]))for(i in l)if((s=i.split(" "))[1]===o&&(a=l[u+" "+s[0]]||l["* "+s[0]])){!0===a?a=l[i]:!0!==l[i]&&(o=s[0],c.unshift(s[1]));break}if(!0!==a)if(a&&e["throws"])t=a(t);else try{t=a(t)}catch(e){return{state:"parsererror",error:a?e:"No conversion from "+u+" to "+o}}}return{state:"success",data:t}}(v,s,T,i),i?(v.ifModified&&((u=T.getResponseHeader("Last-Modified"))&&(ce.lastModified[f]=u),(u=T.getResponseHeader("etag"))&&(ce.etag[f]=u)),204===e||"HEAD"===v.type?l="nocontent":304===e?l="notmodified":(l=s.state,o=s.data,i=!(a=s.error))):(a=l,!e&&l||(l="error",e<0&&(e=0))),T.status=e,T.statusText=(t||l)+"",i?x.resolveWith(y,[o,l,T]):x.rejectWith(y,[T,l,a]),T.statusCode(w),w=void 0,g&&m.trigger(i?"ajaxSuccess":"ajaxError",[T,v,i?o:a]),b.fireWith(y,[T,l]),g&&(m.trigger("ajaxComplete",[T,v]),--ce.active||ce.event.trigger("ajaxStop")))}return T},getJSON:function(e,t,n){return ce.get(e,t,n,"json")},getScript:function(e,t){return ce.get(e,void 0,t,"script")}}),ce.each(["get","post"],function(e,i){ce[i]=function(e,t,n,r){return v(t)&&(r=r||n,n=t,t=void 0),ce.ajax(ce.extend({url:e,type:i,dataType:r,data:t,success:n},ce.isPlainObject(e)&&e))}}),ce.ajaxPrefilter(function(e){var t;for(t in e.headers)"content-type"===t.toLowerCase()&&(e.contentType=e.headers[t]||"")}),ce._evalUrl=function(e,t,n){return ce.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(e){ce.globalEval(e,t,n)}})},ce.fn.extend({wrapAll:function(e){var t;return this[0]&&(v(e)&&(e=e.call(this[0])),t=ce(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstElementChild)e=e.firstElementChild;return e}).append(this)),this},wrapInner:function(n){return v(n)?this.each(function(e){ce(this).wrapInner(n.call(this,e))}):this.each(function(){var e=ce(this),t=e.contents();t.length?t.wrapAll(n):e.append(n)})},wrap:function(t){var n=v(t);return this.each(function(e){ce(this).wrapAll(n?t.call(this,e):t)})},unwrap:function(e){return this.parent(e).not("body").each(function(){ce(this).replaceWith(this.childNodes)}),this}}),ce.expr.pseudos.hidden=function(e){return!ce.expr.pseudos.visible(e)},ce.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},ce.ajaxSettings.xhr=function(){try{return new ie.XMLHttpRequest}catch(e){}};var Yt={0:200,1223:204},Qt=ce.ajaxSettings.xhr();le.cors=!!Qt&&"withCredentials"in Qt,le.ajax=Qt=!!Qt,ce.ajaxTransport(function(i){var o,a;if(le.cors||Qt&&!i.crossDomain)return{send:function(e,t){var n,r=i.xhr();if(r.open(i.type,i.url,i.async,i.username,i.password),i.xhrFields)for(n in i.xhrFields)r[n]=i.xhrFields[n];for(n in i.mimeType&&r.overrideMimeType&&r.overrideMimeType(i.mimeType),i.crossDomain||e["X-Requested-With"]||(e["X-Requested-With"]="XMLHttpRequest"),e)r.setRequestHeader(n,e[n]);o=function(e){return function(){o&&(o=a=r.onload=r.onerror=r.onabort=r.ontimeout=r.onreadystatechange=null,"abort"===e?r.abort():"error"===e?"number"!=typeof r.status?t(0,"error"):t(r.status,r.statusText):t(Yt[r.status]||r.status,r.statusText,"text"!==(r.responseType||"text")||"string"!=typeof r.responseText?{binary:r.response}:{text:r.responseText},r.getAllResponseHeaders()))}},r.onload=o(),a=r.onerror=r.ontimeout=o("error"),void 0!==r.onabort?r.onabort=a:r.onreadystatechange=function(){4===r.readyState&&ie.setTimeout(function(){o&&a()})},o=o("abort");try{r.send(i.hasContent&&i.data||null)}catch(e){if(o)throw e}},abort:function(){o&&o()}}}),ce.ajaxPrefilter(function(e){e.crossDomain&&(e.contents.script=!1)}),ce.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return ce.globalEval(e),e}}}),ce.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),ce.ajaxTransport("script",function(n){var r,i;if(n.crossDomain||n.scriptAttrs)return{send:function(e,t){r=ce("<script>").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),C.head.appendChild(r[0])},abort:function(){i&&i()}}});var Jt,Kt=[],Zt=/(=)\?(?=&|$)|\?\?/;ce.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Kt.pop()||ce.expando+"_"+jt.guid++;return this[e]=!0,e}}),ce.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Zt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Zt.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=v(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Zt,"$1"+r):!1!==e.jsonp&&(e.url+=(At.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||ce.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=ie[r],ie[r]=function(){o=arguments},n.always(function(){void 0===i?ce(ie).removeProp(r):ie[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,Kt.push(r)),o&&v(i)&&i(o[0]),o=i=void 0}),"script"}),le.createHTMLDocument=((Jt=C.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===Jt.childNodes.length),ce.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(le.createHTMLDocument?((r=(t=C.implementation.createHTMLDocument("")).createElement("base")).href=C.location.href,t.head.appendChild(r)):t=C),o=!n&&[],(i=w.exec(e))?[t.createElement(i[1])]:(i=Ae([e],t,o),o&&o.length&&ce(o).remove(),ce.merge([],i.childNodes)));var r,i,o},ce.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1<s&&(r=Tt(e.slice(s)),e=e.slice(0,s)),v(t)?(n=t,t=void 0):t&&"object"==typeof t&&(i="POST"),0<a.length&&ce.ajax({url:e,type:i||"GET",dataType:"html",data:t}).done(function(e){o=arguments,a.html(r?ce("<div>").append(ce.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},ce.expr.pseudos.animated=function(t){return ce.grep(ce.timers,function(e){return t===e.elem}).length},ce.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=ce.css(e,"position"),c=ce(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=ce.css(e,"top"),u=ce.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),v(t)&&(t=t.call(e,n,ce.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},ce.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){ce.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===ce.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===ce.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=ce(e).offset()).top+=ce.css(e,"borderTopWidth",!0),i.left+=ce.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-ce.css(r,"marginTop",!0),left:t.left-i.left-ce.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===ce.css(e,"position"))e=e.offsetParent;return e||J})}}),ce.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;ce.fn[t]=function(e){return M(this,function(e,t,n){var r;if(y(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),ce.each(["top","left"],function(e,n){ce.cssHooks[n]=Ye(le.pixelPosition,function(e,t){if(t)return t=Ge(e,n),_e.test(t)?ce(e).position()[n]+"px":t})}),ce.each({Height:"height",Width:"width"},function(a,s){ce.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){ce.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return M(this,function(e,t,n){var r;return y(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?ce.css(e,t,i):ce.style(e,t,n,i)},s,n?e:void 0,n)}})}),ce.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){ce.fn[t]=function(e){return this.on(t,e)}}),ce.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.on("mouseenter",e).on("mouseleave",t||e)}}),ce.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){ce.fn[n]=function(e,t){return 0<arguments.length?this.on(n,null,e,t):this.trigger(n)}});var en=/^[\s\uFEFF\xA0]+|([^\s\uFEFF\xA0])[\s\uFEFF\xA0]+$/g;ce.proxy=function(e,t){var n,r,i;if("string"==typeof t&&(n=e[t],t=e,e=n),v(e))return r=ae.call(arguments,2),(i=function(){return e.apply(t||this,r.concat(ae.call(arguments)))}).guid=e.guid=e.guid||ce.guid++,i},ce.holdReady=function(e){e?ce.readyWait++:ce.ready(!0)},ce.isArray=Array.isArray,ce.parseJSON=JSON.parse,ce.nodeName=fe,ce.isFunction=v,ce.isWindow=y,ce.camelCase=F,ce.type=x,ce.now=Date.now,ce.isNumeric=function(e){var t=ce.type(e);return("number"===t||"string"===t)&&!isNaN(e-parseFloat(e))},ce.trim=function(e){return null==e?"":(e+"").replace(en,"$1")},"function"==typeof define&&define.amd&&define("jquery",[],function(){return ce});var tn=ie.jQuery,nn=ie.$;return ce.noConflict=function(e){return ie.$===ce&&(ie.$=nn),e&&ie.jQuery===ce&&(ie.jQuery=tn),ce},"undefined"==typeof e&&(ie.jQuery=ie.$=ce),ce});
3616
3617/* ========================================
3618 FILE: /includes/js/jquery/core/jquery-migrate-3.5.2.min.js
3619 ==================== */
3620
3621/*! jQuery Migrate v3.5.2 | (c) OpenJS Foundation and other contributors | jquery.com/license */
3622"undefined"==typeof jQuery.migrateMute&&(jQuery.migrateMute=!0),function(t){"use strict";"function"==typeof define&&define.amd?define(["jquery"],function(e){return t(e,window)}):"object"==typeof module&&module.exports?module.exports=t(require("jquery"),window):t(jQuery,window)}(function(s,n){"use strict";function e(e){return 0<=function(e,t){for(var r=/^(\d+)\.(\d+)\.(\d+)/,n=r.exec(e)||[],o=r.exec(t)||[],a=1;a<=3;a++){if(+o[a]<+n[a])return 1;if(+n[a]<+o[a])return-1}return 0}(s.fn.jquery,e)}s.migrateVersion="3.5.2";var t=Object.create(null);s.migrateDisablePatches=function(){for(var e=0;e<arguments.length;e++)t[arguments[e]]=!0},s.migrateEnablePatches=function(){for(var e=0;e<arguments.length;e++)delete t[arguments[e]]},s.migrateIsPatchEnabled=function(e){return!t[e]},n.console&&n.console.log&&(s&&e("3.0.0")&&!e("5.0.0")||n.console.log("JQMIGRATE: jQuery 3.x-4.x REQUIRED"),s.migrateWarnings&&n.console.log("JQMIGRATE: Migrate plugin loaded multiple times"),n.console.log("JQMIGRATE: Migrate is installed"+(s.migrateMute?"":" with logging active")+", version "+s.migrateVersion));var o={};function u(e,t){var r=n.console;!s.migrateIsPatchEnabled(e)||s.migrateDeduplicateWarnings&&o[t]||(o[t]=!0,s.migrateWarnings.push(t+" ["+e+"]"),r&&r.warn&&!s.migrateMute&&(r.warn("JQMIGRATE: "+t),s.migrateTrace&&r.trace&&r.trace()))}function r(e,t,r,n,o){Object.defineProperty(e,t,{configurable:!0,enumerable:!0,get:function(){return u(n,o),r},set:function(e){u(n,o),r=e}})}function a(e,t,r,n,o){var a=e[t];e[t]=function(){return o&&u(n,o),(s.migrateIsPatchEnabled(n)?r:a||s.noop).apply(this,arguments)}}function c(e,t,r,n,o){if(!o)throw new Error("No warning message provided");return a(e,t,r,n,o),0}function i(e,t,r,n){return a(e,t,r,n),0}s.migrateDeduplicateWarnings=!0,s.migrateWarnings=[],void 0===s.migrateTrace&&(s.migrateTrace=!0),s.migrateReset=function(){o={},s.migrateWarnings.length=0},"BackCompat"===n.document.compatMode&&u("quirks","jQuery is not compatible with Quirks Mode");var d,l,p,f={},m=s.fn.init,y=s.find,g=/\[(\s*[-\w]+\s*)([~|^$*]?=)\s*([-\w#]*?#[-\w#]*)\s*\]/,h=/\[(\s*[-\w]+\s*)([~|^$*]?=)\s*([-\w#]*?#[-\w#]*)\s*\]/g,v=/^[\s\uFEFF\xA0]+|([^\s\uFEFF\xA0])[\s\uFEFF\xA0]+$/g;for(d in i(s.fn,"init",function(e){var t=Array.prototype.slice.call(arguments);return s.migrateIsPatchEnabled("selector-empty-id")&&"string"==typeof e&&"#"===e&&(u("selector-empty-id","jQuery( '#' ) is not a valid selector"),t[0]=[]),m.apply(this,t)},"selector-empty-id"),s.fn.init.prototype=s.fn,i(s,"find",function(t){var r=Array.prototype.slice.call(arguments);if("string"==typeof t&&g.test(t))try{n.document.querySelector(t)}catch(e){t=t.replace(h,function(e,t,r,n){return"["+t+r+'"'+n+'"]'});try{n.document.querySelector(t),u("selector-hash","Attribute selector with '#' must be quoted: "+r[0]),r[0]=t}catch(e){u("selector-hash","Attribute selector with '#' was not fixed: "+r[0])}}return y.apply(this,r)},"selector-hash"),y)Object.prototype.hasOwnProperty.call(y,d)&&(s.find[d]=y[d]);c(s.fn,"size",function(){return this.length},"size","jQuery.fn.size() is deprecated and removed; use the .length property"),c(s,"parseJSON",function(){return JSON.parse.apply(null,arguments)},"parseJSON","jQuery.parseJSON is deprecated; use JSON.parse"),c(s,"holdReady",s.holdReady,"holdReady","jQuery.holdReady is deprecated"),c(s,"unique",s.uniqueSort,"unique","jQuery.unique is deprecated; use jQuery.uniqueSort"),r(s.expr,"filters",s.expr.pseudos,"expr-pre-pseudos","jQuery.expr.filters is deprecated; use jQuery.expr.pseudos"),r(s.expr,":",s.expr.pseudos,"expr-pre-pseudos","jQuery.expr[':'] is deprecated; use jQuery.expr.pseudos"),e("3.1.1")&&c(s,"trim",function(e){return null==e?"":(e+"").replace(v,"$1")},"trim","jQuery.trim is deprecated; use String.prototype.trim"),e("3.2.0")&&(c(s,"nodeName",function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},"nodeName","jQuery.nodeName is deprecated"),c(s,"isArray",Array.isArray,"isArray","jQuery.isArray is deprecated; use Array.isArray")),e("3.3.0")&&(c(s,"isNumeric",function(e){var t=typeof e;return("number"==t||"string"==t)&&!isNaN(e-parseFloat(e))},"isNumeric","jQuery.isNumeric() is deprecated"),s.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){f["[object "+t+"]"]=t.toLowerCase()}),c(s,"type",function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?f[Object.prototype.toString.call(e)]||"object":typeof e},"type","jQuery.type is deprecated"),c(s,"isFunction",function(e){return"function"==typeof e},"isFunction","jQuery.isFunction() is deprecated"),c(s,"isWindow",function(e){return null!=e&&e===e.window}
3622,"isWindow","jQuery.isWindow() is deprecated")),s.ajax&&(l=s.ajax,p=/(=)\?(?=&|$)|\?\?/,i(s,"ajax",function(){var e=l.apply(this,arguments);return e.promise&&(c(e,"success",e.done,"jqXHR-methods","jQXHR.success is deprecated and removed"),c(e,"error",e.fail,"jqXHR-methods","jQXHR.error is deprecated and removed"),c(e,"complete",e.always,"jqXHR-methods","jQXHR.complete is deprecated and removed")),e},"jqXHR-methods"),e("4.0.0")||s.ajaxPrefilter("+json",function(e){!1!==e.jsonp&&(p.test(e.url)||"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&p.test(e.data))&&u("jsonp-promotion","JSON-to-JSONP auto-promotion is deprecated")}));var j=s.fn.removeAttr,b=s.fn.toggleClass,Q=/^(?:checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped)$/i,w=/\S+/g;function x(e){return e.replace(/-([a-z])/g,function(e,t){return t.toUpperCase()})}i(s.fn,"removeAttr",function(e){var r=this,n=!1;return s.each(e.match(w),function(e,t){Q.test(t)&&r.each(function(){if(!1!==s(this).prop(t))return!(n=!0)}),n&&(u("removeAttr-bool","jQuery.fn.removeAttr no longer sets boolean properties: "+t),r.prop(t,!1))}),j.apply(this,arguments)},"removeAttr-bool"),i(s.fn,"toggleClass",function(t){return void 0!==t&&"boolean"!=typeof t?b.apply(this,arguments):(u("toggleClass-bool","jQuery.fn.toggleClass( boolean ) is deprecated"),this.each(function(){var e=this.getAttribute&&this.getAttribute("class")||"";e&&s.data(this,"__className__",e),this.setAttribute&&this.setAttribute("class",!e&&!1!==t&&s.data(this,"__className__")||"")}))},"toggleClass-bool");var A,R,S=!1,k=/^[a-z]/,N=/^(?:Border(?:Top|Right|Bottom|Left)?(?:Width|)|(?:Margin|Padding)?(?:Top|Right|Bottom|Left)?|(?:Min|Max)?(?:Width|Height))$/;s.swap&&s.each(["height","width","reliableMarginRight"],function(e,t){var r=s.cssHooks[t]&&s.cssHooks[t].get;r&&(s.cssHooks[t].get=function(){var e;return S=!0,e=r.apply(this,arguments),S=!1,e})}),i(s,"swap",function(e,t,r,n){var o,a,i={};for(a in S||u("swap","jQuery.swap() is undocumented and deprecated"),t)i[a]=e.style[a],e.style[a]=t[a];for(a in o=r.apply(e,n||[]),t)e.style[a]=i[a];return o},"swap"),e("3.4.0")&&"undefined"!=typeof Proxy&&(s.cssProps=new Proxy(s.cssProps||{},{set:function(){return u("cssProps","jQuery.cssProps is deprecated"),Reflect.set.apply(this,arguments)}})),e("4.0.0")?(R={animationIterationCount:!0,aspectRatio:!0,borderImageSlice:!0,columnCount:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,scale:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeMiterlimit:!0,strokeOpacity:!0},"undefined"!=typeof Proxy?s.cssNumber=new Proxy(R,{get:function(){return u("css-number","jQuery.cssNumber is deprecated"),Reflect.get.apply(this,arguments)},set:function(){return u("css-number","jQuery.cssNumber is deprecated"),Reflect.set.apply(this,arguments)}}):s.cssNumber=R):R=s.cssNumber,A=s.fn.css,i(s.fn,"css",function(e,t){var r,n,o=this;return e&&"object"==typeof e&&!Array.isArray(e)?(s.each(e,function(e,t){s.fn.css.call(o,e,t)}),this):("number"==typeof t&&(r=x(e),n=r,k.test(n)&&N.test(n[0].toUpperCase()+n.slice(1))||R[r]||u("css-number",'Number-typed values are deprecated for jQuery.fn.css( "'+e+'", value )')),A.apply(this,arguments))},"css-number");var P,C,H,E,M=s.data;i(s,"data",function(e,t,r){var n,o,a;if(t&&"object"==typeof t&&2===arguments.length){for(a in n=s.hasData(e)&&M.call(this,e),o={},t)a!==x(a)?(u("data-camelCase","jQuery.data() always sets/gets camelCased names: "+a),n[a]=t[a]):o[a]=t[a];return M.call(this,e,o),t}return t&&"string"==typeof t&&t!==x(t)&&(n=s.hasData(e)&&M.call(this,e))&&t in n?(u("data-camelCase","jQuery.data() always sets/gets camelCased names: "+t),2<arguments.length&&(n[t]=r),n[t]):M.apply(this,arguments)},"data-camelCase"),s.fx&&(H=s.Tween.prototype.run,E=function(e){return e},i(s.Tween.prototype,"run",function(){1<s.easing[this.easing].length&&(u("easing-one-arg","'jQuery.easing."+this.easing.toString()+"' should use only one argument"),s.easing[this.easing]=E),H.apply(this,arguments)},"easing-one-arg"),P=s.fx.interval,C="jQuery.fx.interval is deprecated",n.requestAnimationFrame&&Object.defineProperty(s.fx,"interval",{configurable:!0,enumerable:!0,get:function(){return n.document.hidden||u("fx-interval",C),s.migrateIsPatchEnabled("fx-interval")&&void 0===P?13:P},set:function(e){u("fx-interval",C),P=e}}));var q=s.fn.load,O=s.event.add,F=s.event.fix;s.event.props=[],s.event.fixHooks={}
3622,r(s.event.props,"concat",s.event.props.concat,"event-old-patch","jQuery.event.props.concat() is deprecated and removed"),i(s.event,"fix",function(e){var t,r=e.type,n=this.fixHooks[r],o=s.event.props;if(o.length){u("event-old-patch","jQuery.event.props are deprecated and removed: "+o.join());while(o.length)s.event.addProp(o.pop())}if(n&&!n._migrated_&&(n._migrated_=!0,u("event-old-patch","jQuery.event.fixHooks are deprecated and removed: "+r),(o=n.props)&&o.length))while(o.length)s.event.addProp(o.pop());return t=F.call(this,e),n&&n.filter?n.filter(t,e):t},"event-old-patch"),i(s.event,"add",function(e,t){return e===n&&"load"===t&&"complete"===n.document.readyState&&u("load-after-event","jQuery(window).on('load'...) called after load event occurred"),O.apply(this,arguments)},"load-after-event"),s.each(["load","unload","error"],function(e,t){i(s.fn,t,function(){var e=Array.prototype.slice.call(arguments,0);return"load"===t&&"string"==typeof e[0]?q.apply(this,e):(u("shorthand-removed-v3","jQuery.fn."+t+"() is deprecated"),e.splice(0,0,t),arguments.length?this.on.apply(this,e):(this.triggerHandler.apply(this,e),this))},"shorthand-removed-v3")}),s.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,r){c(s.fn,r,function(e,t){return 0<arguments.length?this.on(r,null,e,t):this.trigger(r)},"shorthand-deprecated-v3","jQuery.fn."+r+"() event shorthand is deprecated")}),s(function(){s(n.document).triggerHandler("ready")}),s.event.special.ready={setup:function(){this===n.document&&u("ready-event","'ready' event is deprecated")}},c(s.fn,"bind",function(e,t,r){return this.on(e,null,t,r)},"pre-on-methods","jQuery.fn.bind() is deprecated"),c(s.fn,"unbind",function(e,t){return this.off(e,null,t)},"pre-on-methods","jQuery.fn.unbind() is deprecated"),c(s.fn,"delegate",function(e,t,r,n){return this.on(t,e,r,n)},"pre-on-methods","jQuery.fn.delegate() is deprecated"),c(s.fn,"undelegate",function(e,t,r){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",r)},"pre-on-methods","jQuery.fn.undelegate() is deprecated"),c(s.fn,"hover",function(e,t){return this.on("mouseenter",e).on("mouseleave",t||e)},"pre-on-methods","jQuery.fn.hover() is deprecated");function T(e){var t=n.document.implementation.createHTMLDocument("");return t.body.innerHTML=e,t.body&&t.body.innerHTML}var D=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi;c(s,"UNSAFE_restoreLegacyHtmlPrefilter",function(){s.migrateEnablePatches("self-closed-tags")},"legacy-self-closed-tags",'jQuery.UNSAFE_restoreLegacyHtmlPrefilter deprecated; use `jQuery.migrateEnablePatches( "self-closed-tags" )`'),i(s,"htmlPrefilter",function(e){var t,r;return(r=(t=e).replace(D,"<$1></$2>"))!==t&&T(t)!==T(r)&&u("self-closed-tags","HTML tags must be properly nested and closed: "+t),e.replace(D,"<$1></$2>")},"self-closed-tags"),s.migrateDisablePatches("self-closed-tags");var _,I,W,J=s.fn.offset;return i(s.fn,"offset",function(){var e=this[0];return!e||e.nodeType&&e.getBoundingClientRect?J.apply(this,arguments):(u("offset-valid-elem","jQuery.fn.offset() requires a valid DOM element"),arguments.length?this:void 0)},"offset-valid-elem"),s.ajax&&(_=s.param,i(s,"param",function(e,t){var r=s.ajaxSettings&&s.ajaxSettings.traditional;return void 0===t&&r&&(u("param-ajax-traditional","jQuery.param() no longer uses jQuery.ajaxSettings.traditional"),t=r),_.call(this,e,t)},"param-ajax-traditional")),c(s.fn,"andSelf",s.fn.addBack,"andSelf","jQuery.fn.andSelf() is deprecated and removed, use jQuery.fn.addBack()"),s.Deferred&&(I=s.Deferred,W=[["resolve","done",s.Callbacks("once memory"),s.Callbacks("once memory"),"resolved"],["reject","fail",s.Callbacks("once memory"),s.Callbacks("once memory"),"rejected"],["notify","progress",s.Callbacks("memory"),s.Callbacks("memory")]],i(s,"Deferred",function(e){var a=I(),i=a.promise();function t(){var o=arguments;return s.Deferred(function(n){s.each(W,function(e,t){var r="function"==typeof o[e]&&o[e];a[t[1]](function(){var e=r&&r.apply(this,arguments);e&&"function"==typeof e.promise?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[t[0]+"With"](this===i?n.promise():this,r?[e]:arguments)})}),o=null}).promise()}return c(a,"pipe",t,"deferred-pipe","deferred.pipe() is deprecated"),c(i,"pipe",t,"deferred-pipe","deferred.pipe() is deprecated"),e&&e.call(a,a),a},"deferred-pipe"),s.Deferred.exceptionHook=I.exceptionHook),s});
3623
3624/* ========================================
3625 FILE: /includes/js/jquery/cs_custom_jquery_functions.js
3626 ==================== */
3627
3628/*
3629 * Creativesites s.r.o.
3630 * Custom Jquery Functions
3631 *
3632 * Vsetky custom funkcie, ktore rozsiruju jQuery objekt, pridavajte sem
3633 */
3634
3635if ( typeof js_CS_Config_log_xhr_payload !== 'undefined' && js_CS_Config_log_xhr_payload ) {
3636	(function() {
3637		window.csSavedErrorJsonResponse = '';
3638
3639		var origOpen = XMLHttpRequest.prototype.open;
3640		XMLHttpRequest.prototype.open = function() {
3641			this.addEventListener('loadstart', function() {
3642				csSavedErrorJsonResponse = '';
3643			});
3644			this.addEventListener('progress', function() {
3645				if ( this.responseType === '' || this.responseType === 'text' ) {
3646					csSavedErrorJsonResponse = this.responseText;
3647				}
3648			});
3649			origOpen.apply(this, arguments);
3650		};
3651	})();
3652} else {
3653	window.csSavedErrorJsonResponse = '';
3654}
3655
3656document.addEventListener('lazybeforeunveil', function(event) {
3657	if (event.target.tagName == 'svg') {
3658		var elem = event.target;
3659		var url = elem.getAttribute('data-src');
3660		elem.removeAttribute('data-src');
3661
3662		jQuery.get(url, function(res) {
3663			if (typeof res === 'undefined' || typeof res.getElementsByTagName !== 'function') {
3664				return;
3665			}
3666
3667			var svg = res.getElementsByTagName('svg');
3668			if (svg.length) {
3669				// But we only want the first.
3670				svg = svg[0];
3671
3672				// Copy over the attributes first.
3673				var attr = svg.attributes;
3674				var attrLen = attr.length;
3675				for (var i = 0; i < attrLen; ++i) {
3676					if (attr[i].specified) {
3677						// Merge classes.
3678						if ('class' === attr[i].name) {
3679							//var classes = attr[i].value.replace(/\s+/g, ' ').trim().split(' ');
3680							//var classesLen = classes.length;
3681							//for (var j = 0; j < classesLen; ++j) {
3682							//	elem.classList.add(classes[j]);
3683							//}
3684						}
3685						// Add/replace anything else.
3686						else {
3687							elem.setAttribute(attr[i].name, attr[i].value);
3688						}
3689					}
3690				}
3691
3692				// Now transfer over the children. Note: IE does not
3693				// assign an innerHTML property to SVGs, so we need to
3694				// go node by node.
3695				while (svg.childNodes.length) {
3696					elem.appendChild(svg.childNodes[0]);
3697				}
3698			}
3699		});
3700	}
3701});
3702
3703(function() {
3704	var matched, browser;
3705
3706	// Use of jQuery.browser is frowned upon.
3707	// More details: http://api.jquery.com/jQuery.browser
3708	// jQuery.uaMatch maintained for back-compat
3709	jQuery.uaMatch = function( ua ) {
3710		ua = ua.toLowerCase();
3711
3712		var match = /(chrome)[ \/]([\w.]+)/.exec( ua ) ||
3713			/(webkit)[ \/]([\w.]+)/.exec( ua ) ||
3714			/(opera)(?:.*version|)[ \/]([\w.]+)/.exec( ua ) ||
3715			/(msie) ([\w.]+)/.exec( ua ) ||
3716			ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec( ua ) ||
3717			[];
3718
3719		return {
3720			browser: match[ 1 ] || "",
3721			version: match[ 2 ] || "0"
3722		};
3723	};
3724
3725	matched = jQuery.uaMatch( navigator.userAgent );
3726	browser = {};
3727
3728	if ( matched.browser ) {
3729		browser[ matched.browser ] = true;
3730		browser.version = matched.version;
3731	}
3732
3733	// Chrome is Webkit, but Webkit is also Safari.
3734	if ( browser.chrome ) {
3735		browser.webkit = true;
3736	} else if ( browser.webkit ) {
3737		browser.safari = true;
3738	}
3739
3740	jQuery.browser = browser;
3741})();
3742
3743window.addEventListener('DOMContentLoaded', function() {
3744
3745	// ak uiautocomplete nie je definovany on ready, tak ho definujeme
3746	if ( typeof jQuery.fn.uiautocomplete === 'undefined' && jQuery.fn.autocomplete !== 'undefined' ) {
3747		jQuery.fn.uiautocomplete = jQuery.fn.autocomplete;
3748	}
3749});
3750
3751
3752/* ========================================
3753 FILE: /includes/js/jquery.cookie.js
3754 ==================== */
3755
3756/**
3757 * Cookie plugin
3758 *
3759 * Copyright (c) 2006 Klaus Hartl (stilbuero.de)
3760 * Dual licensed under the MIT and GPL licenses:
3761 * http://www.opensource.org/licenses/mit-license.php
3762 * http://www.gnu.org/licenses/gpl.html
3763 *
3764 */
3765
3766/**
3767 * Create a cookie with the given name and value and other optional parameters.
3768 *
3769 * @example $jQ.cookie('the_cookie', 'the_value');
3770 * @desc Set the value of a cookie.
3771 * @example $jQ.cookie('the_cookie', 'the_value', { expires: 7, path: '/', domain: 'jquery.com', secure: true });
3772 * @desc Create a cookie with all available options.
3773 * @example $jQ.cookie('the_cookie', 'the_value');
3774 * @desc Create a session cookie.
3775 * @example $jQ.cookie('the_cookie', null);
3776 * @desc Delete a cookie by passing null as value. Keep in mind that you have to use the same path and domain
3777 *       used when the cookie was set.
3778 *
3779 * @param String name The name of the cookie.
3780 * @param String value The value of the cookie.
3781 * @param Object options An object literal containing key/value pairs to provide optional cookie attributes.
3782 * @option Number|Date expires Either an integer specifying the expiration date from now on in days or a Date object.
3783 *                             If a negative value is specified (e.g. a date in the past), the cookie will be deleted.
3784 *                             If set to null or omitted, the cookie will be a session cookie and will not be retained
3785 *                             when the the browser exits.
3786 * @option String path The value of the path atribute of the cookie (default: path of page that created the cookie).
3787 * @option String domain The value of the domain attribute of the cookie (default: domain of page that created the cookie).
3788 * @option Boolean secure If true, the secure attribute of the cookie will be set and the cookie transmission will
3789 *                        require a secure protocol (like HTTPS).
3790 * @type undefined
3791 *
3792 * @name $jQ.cookie
3793 * @cat Plugins/Cookie
3794 * @author Klaus Hartl/[email protected]
3795 */
3796
3797/**
3798 * Get the value of a cookie with the given name.
3799 *
3800 * @example $jQ.cookie('the_cookie');
3801 * @desc Get the value of a cookie.
3802 *
3803 * @param String name The name of the cookie.
3804 * @return The value of the cookie.
3805 * @type String
3806 *
3807 * @name $jQ.cookie
3808 * @cat Plugins/Cookie
3809 * @author Klaus Hartl/[email protected]
3810 */
3811
3812/**
3813 * Get the values of all cookies.
3814 *
3815 * @example $jQ.cookie('*');
3816 * @desc Get the values of all cookie in array.
3817 *
3818 * @example $jQ.cookie('my_items_*');
3819 * @desc Get the values of all cookie with name begins 'my_items_' in array.
3820 *
3821 * @name $jQ.cookie
3822 * @cat Plugins/Cookie
3823 * @author Calim
3824 */
3825
3826jQuery.cookie = function(name, value, options) {
3827    if (typeof value != 'undefined') { // name and value given, set cookie
3828        options = options || {};
3829        if (value === null) {
3830            value = '';
3831            options.expires = -1;
3832        }
3833        var expires = '';
3834        if (options.expires && (typeof options.expires == 'number' || options.expires.toUTCString)) {
3835            var date;
3836            if (typeof options.expires == 'number') {
3837                date = new Date();
3838                date.setTime(date.getTime() + (options.expires * 24 * 60 * 60 * 1000));
3839            } else {
3840                date = options.expires;
3841            }
3842            expires = '; expires=' + date.toUTCString(); // use expires attribute, max-age is not supported by IE
3843        }
3844        // CAUTION: Needed to parenthesize options.path and options.domain
3845        // in the following expressions, otherwise they evaluate to undefined
3846        // in the packed version for some reason...
3847        var path = options.path ? '; path=' + (options.path) : '';
3848        var domain = options.domain ? '; domain=' + (options.domain) : '';
3849        var secure = options.secure ? '; secure' : '';
3850        document.cookie = [name, '=', encodeURIComponent(value), expires, path, domain, secure].join('');
3851    } else { // only name given, get cookie
3852        var cookieValue = null;
3853        if (document.cookie && document.cookie != '') {
3854            var cookies = document.cookie.split(';');
3855            if (name.substr(-1, 1)=='*') {
3856            		//cookieValue = cookies;
3857            		cookieValue = new Array();
3858				for (var i = 0; i < cookies.length; i++) {
3859					var cookie = jQuery.trim(cookies[i]);
3860					var cp = cookie.indexOf('=');
3861					if (cp > -1) {
3862						cn = cookie.substr(0, cp);
3863						if (name=='*' || cn.substr(0, name.length-1)+'*' == name) cookieValue[cookieValue.length] = [cn, decodeURIComponent(cookie.substr(cp+1))];
3864					}
3865				}
3866            } else {
3867				for (var i = 0; i < cookies.length; i++) {
3868					var cookie = jQuery.trim(cookies[i]);
3869					// Does this cookie string begin with the name we want?
3870					if (cookie.substring(0, name.length + 1) == (name + '=')) {
3871						cookieValue = decodeURIComponent(cookie.substring(name.length + 1));
3872						break;
3873					}
3874				}
3875            }
3876        }
3877        return cookieValue;
3878    }
3879};
3880
3881/* ========================================
3882 FILE: /includes/js/js-cookie/js.cookie.js
3883 ==================== */
3884
3885/*!
3886 * JavaScript Cookie v2.2.1
3887 * https://github.com/js-cookie/js-cookie
3888 *
3889 * Copyright 2006, 2015 Klaus Hartl & Fagner Brack
3890 * Released under the MIT license
3891 */
3892;(function (factory) {
3893	var registeredInModuleLoader;
3894	if (typeof define === 'function' && define.amd) {
3895		define(factory);
3896		registeredInModuleLoader = true;
3897	}
3898	if (typeof exports === 'object') {
3899		module.exports = factory();
3900		registeredInModuleLoader = true;
3901	}
3902	if (!registeredInModuleLoader) {
3903		var OldCookies = window.Cookies;
3904		var api = window.Cookies = factory();
3905		api.noConflict = function () {
3906			window.Cookies = OldCookies;
3907			return api;
3908		};
3909	}
3910}(function () {
3911	function extend () {
3912		var i = 0;
3913		var result = {};
3914		for (; i < arguments.length; i++) {
3915			var attributes = arguments[ i ];
3916			for (var key in attributes) {
3917				result[key] = attributes[key];
3918			}
3919		}
3920		return result;
3921	}
3922
3923	function decode (s) {
3924		return s.replace(/(%[0-9A-Z]{2})+/g, decodeURIComponent);
3925	}
3926
3927	function init (converter) {
3928		function api() {}
3929
3930		function set (key, value, attributes) {
3931			if (typeof document === 'undefined') {
3932				return;
3933			}
3934
3935			attributes = extend({
3936				path: '/'
3937			}, api.defaults, attributes);
3938
3939			if (typeof attributes.expires === 'number') {
3940				attributes.expires = new Date(new Date() * 1 + attributes.expires * 864e+5);
3941			}
3942
3943			// We're using "expires" because "max-age" is not supported by IE
3944			attributes.expires = attributes.expires ? attributes.expires.toUTCString() : '';
3945
3946			try {
3947				var result = JSON.stringify(value);
3948				if (/^[\{\[]/.test(result)) {
3949					value = result;
3950				}
3951			} catch (e) {}
3952
3953			value = converter.write ?
3954				converter.write(value, key) :
3955				encodeURIComponent(String(value))
3956					.replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g, decodeURIComponent);
3957
3958			key = encodeURIComponent(String(key))
3959				.replace(/%(23|24|26|2B|5E|60|7C)/g, decodeURIComponent)
3960				.replace(/[\(\)]/g, escape);
3961
3962			var stringifiedAttributes = '';
3963			for (var attributeName in attributes) {
3964				if (!attributes[attributeName]) {
3965					continue;
3966				}
3967				stringifiedAttributes += '; ' + attributeName;
3968				if (attributes[attributeName] === true) {
3969					continue;
3970				}
3971
3972				// Considers RFC 6265 section 5.2:
3973				// ...
3974				// 3.  If the remaining unparsed-attributes contains a %x3B (";")
3975				//     character:
3976				// Consume the characters of the unparsed-attributes up to,
3977				// not including, the first %x3B (";") character.
3978				// ...
vendor: 3,476 bytes, lines 3979-4070
3979				stringifiedAttributes += '=' + attributes[attributeName].split(';')[0];
3980			}
3981
3982			return (document.cookie = key + '=' + value + stringifiedAttributes);
3983		}
3984
3985		function get (key, json) {
3986			if (typeof document === 'undefined') {
3987				return;
3988			}
3989
3990			var jar = {};
3991			// To prevent the for loop in the first place assign an empty array
3992			// in case there are no cookies at all.
3993			var cookies = document.cookie ? document.cookie.split('; ') : [];
3994			var i = 0;
3995
3996			for (; i < cookies.length; i++) {
3997				var parts = cookies[i].split('=');
3998				var cookie = parts.slice(1).join('=');
3999
4000				if (!json && cookie.charAt(0) === '"') {
4001					cookie = cookie.slice(1, -1);
4002				}
4003
4004				try {
4005					var name = decode(parts[0]);
4006					cookie = (converter.read || converter)(cookie, name) ||
4007						decode(cookie);
4008
4009					if (json) {
4010						try {
4011							cookie = JSON.parse(cookie);
4012						} catch (e) {}
4013					}
4014
4015					jar[name] = cookie;
4016
4017					if (key === name) {
4018						break;
4019					}
4020				} catch (e) {}
4021			}
4022
4023			return key ? jar[key] : jar;
4024		}
4025
4026		api.set = set;
4027		api.get = function (key) {
4028			return get(key, false /* read as raw */);
4029		};
4030		api.getJSON = function (key) {
4031			return get(key, true /* read as json */);
4032		};
4033		api.remove = function (key, attributes) {
4034			set(key, '', extend(attributes, {
4035				expires: -1
4036			}));
4037		};
4038
4039		api.defaults = {};
4040
4041		api.withConverter = init;
4042
4043		return api;
4044	}
4045
4046	return init(function () {});
4047}));
4048
4049
4050/* ========================================
4051 FILE: /includes/js/core.js
4052 ==================== */
4053
4054var script_manage_params = typeof script_manage_params === 'object' ? script_manage_params : {};
4055var script_manage_params_jcsl_jq = typeof script_manage_params.jcsl_jq !== 'undefined' ? script_manage_params.jcsl_jq : '';
4056var script_manage_params_jcsl_g = typeof script_manage_params.jcsl_g !== 'undefined' ? script_manage_params.jcsl_g : '';
4057var script_manage_params_ls = typeof script_manage_params.ls !== 'undefined' ? script_manage_params.ls : '';
4058var script_manage_params_sws = typeof script_manage_params.sws !== 'undefined' ? script_manage_params.sws : '';
4059var script_manage_params_lss = typeof script_manage_params.lss !== 'undefined' ? script_manage_params.lss : '';
4060var script_manage_params_cs = typeof script_manage_params.cs !== 'undefined' ? script_manage_params.cs : '';
4061var script_manage_params_csu = typeof script_manage_params.csu !== 'undefined' ? script_manage_params.csu : '';
4062var script_manage_params_is_admin = typeof script_manage_params.is_admin !== 'undefined' ? script_manage_params.is_admin : '';
4063var script_manage_params_csu_ip = typeof script_manage_params.csu_ip !== 'undefined' ? script_manage_params.csu_ip : '';
4064var script_manage_params_jsc = typeof script_manage_params.jsc !== 'undefined' ? script_manage_params.jsc : '';
4065var script_manage_params_sra = typeof script_manage_params.sra !== 'undefined' ? script_manage_params.sra : '';
4066var script_manage_params_du = typeof script_manage_params.devu !== 'undefined' ? script_manage_params.devu : false;
4067var script_manage_params_svp = typeof script_manage_params.svp !== 'undefined' ? script_manage_params.svp : '';
4068var script_manage_params_pame = typeof script_manage_params.pame !== 'undefined' ? script_manage_params.pame : false;
4069var script_manage_params_pamsf = typeof script_manage_params.pamsf !== 'undefined' ? script_manage_params.pamsf : false;
4070var script_manage_params_npfsv = typeof script_manage_params.npfsv !== 'undefined' ? script_manage_params.npfsv : false;
4071var script_manage_params_madom = typeof script_manage_params.madom !== 'undefined' && script_manage_params.madom !== null ? script_manage_params.madom : '';
4072var script_manage_params_ismyid = typeof script_manage_params.ismyid !== 'undefined' ? script_manage_params.ismyid : '';
4073var script_manage_params_mynm = typeof script_manage_params.mynm !== 'undefined' ? script_manage_params.mynm : '';
4074var script_manage_params_myem = typeof script_manage_params.myem !== 'undefined' ? script_manage_params.myem : '';
4075var script_manage_params_mygid = typeof script_manage_params.mygid !== 'undefined' ? script_manage_params.mygid : '';
4076var script_manage_params_myshgid = typeof script_manage_params.myshgid !== 'undefined' ? script_manage_params.myshgid : '';
4077var script_manage_params_ucri = typeof script_manage_params.ucri !== 'undefined' ? script_manage_params.ucri : '';
4078var script_manage_params_sspuefri = typeof script_manage_params.sspuefri !== 'undefined' ? script_manage_params.sspuefri : '';
4079var script_manage_params_sspuefrit = typeof script_manage_params.sspuefrit !== 'undefined' ? script_manage_params.sspuefrit : '';
4080var script_manage_params_gl = typeof script_manage_params.gl !== 'undefined' ? script_manage_params.gl : '';
4081var script_manage_params_cl = typeof script_manage_params.cl !== 'undefined' ? script_manage_params.cl : '';
4082var script_manage_params_jfe = typeof script_manage_params.jfe !== 'undefined' ? script_manage_params.jfe : '';
4083var script_manage_params_jfl = typeof script_manage_params.jfl !== 'undefined' ? script_manage_params.jfl : '';
4084var script_manage_params_jflid = typeof script_manage_params.jflid !== 'undefined' ? script_manage_params.jflid : '';
4085var script_manage_params_c_f = typeof script_manage_params.c_f !== 'undefined' ? script_manage_params.c_f : '';
4086var script_manage_params_j_f = typeof script_manage_params.j_f !== 'undefined' ? script_manage_params.j_f : '';
4087var script_manage_params_rqcid = typeof script_manage_params.rqcid !== 'undefined' ? script_manage_params.rqcid : '';
4088var script_manage_params_ptab = typeof script_manage_params.ptab !== 'undefined' ? script_manage_params.ptab : '';
4089var script_manage_params_paimg = typeof script_manage_params.paimg !== 'undefined' ? script_manage_params.paimg == 'true' : '';
4090var script_manage_params_paaimg = typeof script_manage_params.paaimg !== 'undefined' ? script_manage_params.paaimg == 'true' : '';
4091var script_manage_params_paean = typeof script_manage_params.paean !== 'undefined' ? script_manage_params.paean == 'true' : '';
4092var script_manage_params_pavdom = typeof script_manage_params.pavdom !== 'undefined' ? script_manage_params.pavdom == 'true' : '';
4093var script_manage_params_paw = typeof script_manage_params.paw !== 'undefined' ? script_manage_params.paw == 'true' : '';
4094var script_manage_params_pasid = typeof script_manage_params.pasid !== 'undefined' ? script_manage_params.pasid == 'true' : '';
4095var script_manage_params_pasidftr = typeof script_manage_params.pasidftr !== 'undefined' ? script_manage_params.pasidftr == 'true' : '';
4096var script_manage_params_pamq = typeof script_manage_params.pamq !== 'undefined' ? script_manage_params.pamq == 'true' : '';
4097var script_manage_params_vdate = typeof script_manage_params.vdate !== 'undefined' ? script_manage_params.vdate : '';
4098var script_manage_params_attcfill = typeof script_manage_params.attcfill !== 'undefined' ? script_manage_params.attcfill : '';
4099var script_manage_params_pst = typeof script_manage_params.pst !== 'undefined' ? script_manage_params.pst : '';
4100var script_manage_params_pact = typeof script_manage_params.pact !== 'undefined' ? script_manage_params.pact : '';
4101var script_manage_params_product_attribute_custom_text_title = typeof script_manage_params.product_attribute_custom_text_title !== 'undefined' ? script_manage_params.product_attribute_custom_text_title : '';
4102var script_manage_params_pca = typeof script_manage_params.pca !== 'undefined' ? script_manage_params.pca : '';
4103var script_manage_params_mca = typeof script_manage_params.mca !== 'undefined' ? script_manage_params.mca : '';
4104var script_manage_params_pp = typeof script_manage_params.pp !== 'undefined' ? script_manage_params.pp : '';
4105var script_manage_params_paop = typeof script_manage_params.paop !== 'undefined' ? script_manage_params.paop == 'true' : '';
4106var script_manage_params_pprice = typeof script_manage_params.pprice !== 'undefined' ? script_manage_params.pprice == 'true' : '';
4107var script_manage_params_pasgp = typeof script_manage_params.pasgp !== 'undefined' ? script_manage_params.pasgp == 'true' : '';
4108var script_manage_params_pass = typeof script_manage_params.pass !== 'undefined' ? script_manage_params.pass == 'true' : '';
4109var script_manage_params_aslt = typeof script_manage_params.aslt !== 'undefined' ? script_manage_params.aslt : '';
4110var script_manage_params_cla = typeof script_manage_params.cla !== 'undefined' ? script_manage_params.cla : '';
4111var script_manage_params_sfpfel = typeof script_manage_params.sfpfel !== 'undefined' ? script_manage_params.sfpfel : '';
4112var script_manage_params_pl = typeof script_manage_params.pl !== 'undefined' ? script_manage_params.pl : '';
4113var script_manage_params_jcsl_fb = typeof script_manage_params.jcsl_fb !== 'undefined' ? script_manage_params.jcsl_fb : '';
4114var script_manage_params_jcsl_jqac = typeof script_manage_params.jcsl_jqac !== 'undefined' ? script_manage_params.jcsl_jqac : '';
4115var script_manage_params_pc = typeof script_manage_params.pc !== 'undefined' ? script_manage_params.pc : '';
4116var script_manage_params_r05 = typeof script_manage_params.r05 !== 'undefined' ? script_manage_params.r05 : '';
4117var script_manage_params_r1 = typeof script_manage_params.r1 !== 'undefined' ? script_manage_params.r1 : '';
4118var script_manage_params_r24 = typeof script_manage_params.r24 !== 'undefined' ? script_manage_params.r24 : '';
4119var script_manage_params_sspascshop_b = typeof script_manage_params.sspascshop_b !== 'undefined' ? script_manage_params.sspascshop_b : '';
4120var script_manage_params_sspascsites_b = typeof script_manage_params.sspascsites_b !== 'undefined' ? script_manage_params.sspascsites_b : '';
4121var script_manage_params_sspascsites = typeof script_manage_params.sspascsites !== 'undefined' ? script_manage_params.sspascsites : '';
4122var script_manage_params_aws_security_level = typeof script_manage_params.aws_security_level !== 'undefined' ? script_manage_params.aws_security_level : 'x';
4123var script_manage_params_js_server_ip = typeof script_manage_params.js_server_ip !== 'undefined' ? script_manage_params.js_server_ip : '';
4124var script_manage_params_paaf = typeof script_manage_params.paaf !== 'undefined' ? script_manage_params.paaf : ''; //product atribute available from
4125var script_manage_params_gdir = typeof script_manage_params.gdir !== 'undefined' ? script_manage_params.gdir : [];
4126
4127if (script_manage_params_jcsl_jq) {
4128	$jQ = jQuery.noConflict();
4129}
4130
4131if (js_aws_security_level == null || typeof(js_aws_security_level) === 'undefined') var js_aws_security_level = script_manage_params.aws_security_level;
4132if (js_server_ip == null || typeof(js_server_ip) != 'string' || js_server_ip.trim() == '') var js_server_ip = script_manage_params.js_server_ip;
4133
4134if (script_manage_params_jcsl_g) {
4135	if (typeof(js_global_live_site) === 'undefined') var js_global_live_site = script_manage_params_ls;
4136	if (typeof(js_global_skvelyweb_site) === 'undefined') var js_global_skvelyweb_site = script_manage_params_sws;
4137	if (typeof(js_global_live_site_sef) === 'undefined') js_global_live_site_sef = script_manage_params_lss;
4138	if (typeof(js_global_cache_site) === 'undefined') js_global_cache_site = script_manage_params_cs;
4139	if (typeof(js_global_is_csu) === 'undefined') var js_global_is_csu = script_manage_params_csu;
4140	if (typeof(js_global_is_admin) === 'undefined') var js_global_is_admin = script_manage_params_is_admin;
4141	if (typeof(js_global_js_categories) === 'undefined') var js_global_js_categories = script_manage_params_jsc;
4142	if (typeof(js_global_is_csip) === 'undefined') js_global_is_csip = script_manage_params_csu_ip;
4143	if (typeof(js_global_is_devu) === 'undefined') js_global_is_devu = script_manage_params_du;
4144	if (typeof(js_global_user_shgid) === 'undefined') js_global_user_shgid = script_manage_params_myshgid;
4145	if (typeof(js_global_is_store_vat_payer) === 'undefined') js_global_is_store_vat_payer = script_manage_params_svp;
4146
4147	if (typeof(js_global_product_attribute_matrix_enabled) === 'undefined') js_global_product_attribute_matrix_enabled = script_manage_params_pame;
4148	if (typeof(js_global_product_attribute_matrix_in_stock_forced) === 'undefined') js_global_product_attribute_matrix_in_stock_forced = script_manage_params_pamsf;
4149	if (typeof(js_global_new_product_forced_stock_value) === 'undefined') js_global_new_product_forced_stock_value = script_manage_params_npfsv;
4150	if (typeof(js_global_main_domain) === 'undefined') js_global_main_domain = ( script_manage_params_madom !== '' ? script_manage_params_madom : '' );
4151
4152	if ( script_manage_params_ismyid ) {
4153
4154		if (typeof(js_global_user_info) === 'undefined') js_global_user_info = {};
4155
4156		if ( script_manage_params_mynm != '' ) {
4157			if (typeof(js_global_user_info.name) === 'undefined') js_global_user_info.name = script_manage_params_mynm;
4158		}
4159
4160		if ( script_manage_params_myem != '' ) {
4161			if (typeof(js_global_user_info.email) === 'undefined') js_global_user_info.email = script_manage_params_myem;
4162		}
4163
4164		if ( script_manage_params_mygid != '' ) {
4165			if (typeof(js_global_user_info.gid) === 'undefined') js_global_user_info.gid = script_manage_params_mygid;
4166		}
4167
4168		// JAN user credit info
4169		if ( script_manage_params_ucri != '' ) {
4170			if (typeof(js_global_user_info.ucri) === 'undefined') js_global_user_info.ucri = script_manage_params_ucri;
4171		}
4172	}
4173
4174	if ( script_manage_params_sspuefri ) {
4175
4176		if (typeof(js_global_ssp_user_info) === 'undefined') js_global_ssp_user_info = {};
4177
4178		if ( script_manage_params_sspuefrit != '' ) {
4179			if (typeof(js_global_ssp_user_info.package_type) === 'undefined') js_global_ssp_user_info.package_type = script_manage_params_sspuefrit;
4180		}
4181	}
4182	if (script_manage_params_gl != '')	if (typeof(js_get_lang) === 'undefined') js_get_lang = script_manage_params_gl;
4183	if (typeof(js_curr_lang) === 'undefined') js_curr_lang  = script_manage_params_cl;
4184	if (typeof(jf_enabled) === 'undefined') jf_enabled  = script_manage_params_jfe;
4185
4186	if (typeof(jf_langs) === 'undefined') jf_langs  = typeof script_manage_params_jfl === 'string' ? JSON.parse(script_manage_params_jfl) : script_manage_params_jfl;
4187	if (jf_langs === null) jf_langs = [];
4188
4189	if (typeof(jf_langs_id) === 'undefined') jf_langs_id  = typeof script_manage_params_jflid === 'string' ? JSON.parse(script_manage_params_jflid) : script_manage_params_jflid;
4190	if (typeof(jf_curr_flag) === 'undefined') jf_curr_flag  = script_manage_params_c_f;
4191
4192	if (typeof(jf_flags) === 'undefined') jf_flags  = typeof script_manage_params_j_f === 'string' ? JSON.parse(script_manage_params_j_f) : script_manage_params_j_f;
4193	if (jf_flags === null) jf_flags = [];
4194
4195	if (typeof(js_category_id) === 'undefined') js_category_id = script_manage_params_rqcid;
4196	if (typeof(js_prod_tabs) === 'undefined') js_prod_tabs = script_manage_params_ptab;
4197	if (typeof(js_prod_attr_img) === 'undefined') js_prod_attr_img = script_manage_params_paimg;
4198	if (typeof(js_prod_attr_active_img) === 'undefined') js_prod_attr_active_img = script_manage_params_paaimg;
4199	//if (typeof(js_prod_attr_ean) === 'undefined') js_prod_attr_ean = true;
4200	if (typeof(js_prod_attr_ean) === 'undefined') js_prod_attr_ean = script_manage_params_paean;
4201	if (typeof(js_prod_attr_vdom) === 'undefined') js_prod_attr_vdom = script_manage_params_pavdom;
4202	if (typeof(js_prod_attr_weight) === 'undefined') js_prod_attr_weight = script_manage_params_paw;
4203	if (typeof(js_prod_attr_sid) === 'undefined') js_prod_attr_sid = script_manage_params_pasid;
4204	if (typeof(js_prod_attr_sid_filter) === 'undefined') js_prod_attr_sid_filter = script_manage_params_pasidftr;
4205	if (typeof(js_prod_attr_vdate) === 'undefined') js_prod_attr_vdate = script_manage_params_vdate;
4206	if (typeof(js_prod_attr_check_fill) === 'undefined') js_prod_attr_check_fill = script_manage_params_attcfill;
4207	if (typeof(js_prod_size_table_dir) === 'undefined') js_prod_size_table_dir = script_manage_params_pst;
4208	if (typeof(js_prod_attr_available_from) === 'undefined') js_prod_attr_available_from = script_manage_params_paaf;
4209	if (typeof(js_gdir_list) === 'undefined') js_gdir_list = script_manage_params_gdir;
4210
4211	if (typeof(js_prod_attr_mq) === 'undefined') {
4212		js_prod_attr_mq = script_manage_params_pamq;
4213	}
4214
4215	var js_product_attribute_custom_text_tmp = 0;
4216
4217	if ( typeof script_manage_params_pact === 'number' && script_manage_params_pact > 0 ) {
4218		js_product_attribute_custom_text_tmp = script_manage_params_pact;
4219	}
4220
4221	if (typeof(js_product_attribute_custom_text) === 'undefined') {
4222		js_product_attribute_custom_text = js_product_attribute_custom_text_tmp;
4223	}
4224	delete js_product_attribute_custom_text_tmp;
4225
4226
4227	var js_product_attribute_custom_text_title_tmp = 0;
4228
4229	if ( script_manage_params_product_attribute_custom_text_title.length > 1) {
4230		js_product_attribute_custom_text_title_tmp = script_manage_params_product_attribute_custom_text_title;
4231	}
4232
4233	if (typeof(js_product_attribute_custom_text_title) == 'undefined') {
4234		js_product_attribute_custom_text_title = js_product_attribute_custom_text_title_tmp;
4235	}
4236	delete js_product_attribute_custom_text_title_tmp;
4237
4238	if (typeof (js_product_categ_list_parent_categ_autoselect) === 'undefined') {
4239		js_product_categ_list_parent_categ_autoselect = script_manage_params_pca;
4240	}
4241	if (typeof (js_product_manu_to_categ_list_autoselect_id) === 'undefined') {
4242		js_product_manu_to_categ_list_autoselect_id = script_manage_params_mca;
4243	}
4244	if (typeof (js_product_params_enabled) === 'undefined') {
4245		js_product_params_enabled = script_manage_params_pp;
4246	}
4247	if (typeof (js_header_edit_img_forced) === 'undefined') {
4248		js_header_edit_img_forced = '0';
4249	}
4250	if (typeof (js_prod_attr_old_price) === 'undefined') {
4251		js_prod_attr_old_price = script_manage_params_paop;
4252	}
4253	if (typeof (js_prod_attr_purchase_price) === 'undefined') {
4254		js_prod_attr_purchase_price = script_manage_params_pprice;
4255	}
4256	if (typeof (js_prod_attr_sgp) === 'undefined') {
4257		js_prod_attr_sgp = script_manage_params_pasgp;
4258	}
4259	if (typeof (js_prod_attr_ss) === 'undefined') {
4260		js_prod_attr_ss = script_manage_params_pass;
4261	}
4262	if (typeof script_manage_params_aslt !== 'undefined') { /* admin session life time */
4263		if (typeof (js_admin_sess_lt) === 'undefined') js_admin_sess_lt = 43200;
4264	}
4265
4266	/* pexf + param filter */
4267	if (typeof script_manage_params_cla !== 'undefined') {
4268		if (typeof (js_custom_page_limit) === 'undefined') js_custom_page_limit = script_manage_params_cla;
4269	}
4270	if (typeof script_manage_params_sfpfel !== 'undefined') {
4271		if (typeof (js_filter_param_from_url) === 'undefined') js_filter_param_from_url = script_manage_params_sfpfel;
4272	}
4273	if (typeof script_manage_params_pl !== 'undefined') {
4274		if (typeof (js_filter_pagination_enabled) === 'undefined') js_filter_pagination_enabled = script_manage_params_pl;
4275	}
4276	/* \\ pexf + param filter */
4277}
4278
4279if ( typeof script_manage_params_jcsl_fb !== 'undefined' && script_manage_params_jcsl_fb ) {
4280	_JS_LNG_PROMPT_CLOSE = script_manage_params_pc;
4281}
4282
4283if ( typeof script_manage_params_jcsl_jqac !== 'undefined' && script_manage_params_jcsl_jqac ) {
4284	js_global_adminlang_results_0_5 = script_manage_params_r05;
4285	js_global_adminlang_results_1 = script_manage_params_r1;
4286	js_global_adminlang_results_2_4 = script_manage_params_r24;
4287}
4288
4289var countryISOMapping = {
4290	AFG: "AF",
4291	ALA: "AX",
4292	ALB: "AL",
4293	DZA: "DZ",
4294	ASM: "AS",
4295	AND: "AD",
4296	AGO: "AO",
4297	AIA: "AI",
4298	ATA: "AQ",
4299	ATG: "AG",
4300	ARG: "AR",
4301	ARM: "AM",
4302	ABW: "AW",
4303	AUS: "AU",
4304	AUT: "AT",
4305	AZE: "AZ",
4306	BHS: "BS",
4307	BHR: "BH",
4308	BGD: "BD",
4309	BRB: "BB",
4310	BLR: "BY",
4311	BEL: "BE",
4312	BLZ: "BZ",
4313	BEN: "BJ",
4314	BMU: "BM",
4315	BTN: "BT",
4316	BOL: "BO",
4317	BIH: "BA",
4318	BWA: "BW",
4319	BVT: "BV",
4320	BRA: "BR",
4321	VGB: "VG",
4322	IOT: "IO",
4323	BRN: "BN",
4324	BGR: "BG",
4325	BFA: "BF",
4326	BDI: "BI",
4327	KHM: "KH",
4328	CMR: "CM",
4329	CAN: "CA",
4330	CPV: "CV",
4331	CYM: "KY",
4332	CAF: "CF",
4333	TCD: "TD",
4334	CHL: "CL",
4335	CHN: "CN",
4336	HKG: "HK",
4337	MAC: "MO",
4338	CXR: "CX",
4339	CCK: "CC",
4340	COL: "CO",
4341	COM: "KM",
4342	COG: "CG",
4343	COD: "CD",
4344	COK: "CK",
4345	CRI: "CR",
4346	CIV: "CI",
4347	HRV: "HR",
4348	CUB: "CU",
4349	CYP: "CY",
4350	CZE: "CZ",
4351	DNK: "DK",
4352	DJI: "DJ",
4353	DMA: "DM",
4354	DOM: "DO",
4355	ECU: "EC",
4356	EGY: "EG",
4357	SLV: "SV",
4358	GNQ: "GQ",
4359	ERI: "ER",
4360	EST: "EE",
4361	ETH: "ET",
4362	FLK: "FK",
4363	FRO: "FO",
4364	FJI: "FJ",
4365	FIN: "FI",
4366	FRA: "FR",
4367	GUF: "GF",
4368	PYF: "PF",
4369	ATF: "TF",
4370	GAB: "GA",
4371	GMB: "GM",
4372	GEO: "GE",
4373	DEU: "DE",
4374	GHA: "GH",
4375	GIB: "GI",
4376	GRC: "GR",
4377	GRL: "GL",
4378	GRD: "GD",
4379	GLP: "GP",
4380	GUM: "GU",
4381	GTM: "GT",
4382	GGY: "GG",
4383	GIN: "GN",
4384	GNB: "GW",
4385	GUY: "GY",
4386	HTI: "HT",
4387	HMD: "HM",
4388	VAT: "VA",
4389	HND: "HN",
4390	HUN: "HU",
4391	ISL: "IS",
4392	IND: "IN",
4393	IDN: "ID",
4394	IRN: "IR",
4395	IRQ: "IQ",
4396	IRL: "IE",
4397	IMN: "IM",
4398	ISR: "IL",
4399	ITA: "IT",
4400	JAM: "JM",
4401	JPN: "JP",
4402	JEY: "JE",
4403	JOR: "JO",
4404	KAZ: "KZ",
4405	KEN: "KE",
4406	KIR: "KI",
4407	PRK: "KP",
4408	KOR: "KR",
4409	KWT: "KW",
4410	KGZ: "KG",
4411	LAO: "LA",
4412	LVA: "LV",
4413	LBN: "LB",
4414	LSO: "LS",
4415	LBR: "LR",
4416	LBY: "LY",
4417	LIE: "LI",
4418	LTU: "LT",
4419	LUX: "LU",
4420	MKD: "MK",
4421	MDG: "MG",
4422	MWI: "MW",
4423	MYS: "MY",
4424	MDV: "MV",
4425	MLI: "ML",
4426	MLT: "MT",
4427	MHL: "MH",
4428	MTQ: "MQ",
4429	MRT: "MR",
4430	MUS: "MU",
4431	MYT: "YT",
4432	MEX: "MX",
4433	FSM: "FM",
4434	MDA: "MD",
4435	MCO: "MC",
4436	MNG: "MN",
4437	MNE: "ME",
4438	MSR: "MS",
4439	MAR: "MA",
4440	MOZ: "MZ",
4441	MMR: "MM",
4442	NAM: "NA",
4443	NRU: "NR",
4444	NPL: "NP",
4445	NLD: "NL",
4446	ANT: "AN",
4447	NCL: "NC",
4448	NZL: "NZ",
4449	NIC: "NI",
4450	NER: "NE",
4451	NGA: "NG",
4452	NIU: "NU",
4453	NFK: "NF",
4454	MNP: "MP",
4455	NOR: "NO",
4456	OMN: "OM",
4457	PAK: "PK",
4458	PLW: "PW",
4459	PSE: "PS",
4460	PAN: "PA",
4461	PNG: "PG",
4462	PRY: "PY",
4463	PER: "PE",
4464	PHL: "PH",
4465	PCN: "PN",
4466	POL: "PL",
4467	PRT: "PT",
4468	PRI: "PR",
4469	QAT: "QA",
4470	REU: "RE",
4471	ROU: "RO",
4472	ROM: "RO",
4473	RUS: "RU",
4474	RWA: "RW",
4475	BLM: "BL",
4476	SHN: "SH",
4477	KNA: "KN",
4478	LCA: "LC",
4479	MAF: "MF",
4480	SPM: "PM",
4481	VCT: "VC",
4482	WSM: "WS",
4483	SMR: "SM",
4484	STP: "ST",
4485	SAU: "SA",
4486	SEN: "SN",
4487	SRB: "RS",
4488	SYC: "SC",
4489	SLE: "SL",
4490	SGP: "SG",
4491	SVK: "SK",
4492	SVN: "SI",
4493	SLB: "SB",
4494	SOM: "SO",
4495	ZAF: "ZA",
4496	SGS: "GS",
4497	SSD: "SS",
4498	ESP: "ES",
4499	LKA: "LK",
4500	SDN: "SD",
4501	SUR: "SR",
4502	SJM: "SJ",
4503	SWZ: "SZ",
4504	SWE: "SE",
4505	CHE: "CH",
4506	SYR: "SY",
4507	TWN: "TW",
4508	TJK: "TJ",
4509	TZA: "TZ",
4510	THA: "TH",
4511	TLS: "TL",
4512	TGO: "TG",
4513	TKL: "TK",
4514	TON: "TO",
4515	TTO: "TT",
4516	TUN: "TN",
4517	TUR: "TR",
4518	TKM: "TM",
4519	TCA: "TC",
4520	TUV: "TV",
4521	UGA: "UG",
4522	UKR: "UA",
4523	ARE: "AE",
4524	GBR: "GB",
4525	USA: "US",
4526	UMI: "UM",
4527	URY: "UY",
4528	UZB: "UZ",
4529	VUT: "VU",
4530	VEN: "VE",
4531	VNM: "VN",
4532	VIR: "VI",
4533	WLF: "WF",
4534	ESH: "EH",
4535	YEM: "YE",
4536	ZMB: "ZM",
4537	ZWE: "ZW",
4538	OTH: "OT",
4539	HOL: "HO",
4540	IRS: "IR",
4541	LIT: "LI",
4542	POR: "PO",
4543	PLN: "PL"
4544};
4545
4546
4547/* ========================================
4548 FILE: /includes/js/system/FormValidator.js
4549 ==================== */
4550
4551/**
4552 * Validator na formy pisane cez divField v material designe
4553 * - required inputy su validovane automaticky
4554 * - pre custom validaciu a pridanie pravidiel je potrebne pouzit addRule
4555 *
4556 * @param formContainer jQuery element, v ktorom sa nachadza cely form
4557 * @returns {FormValidator}
4558 * @constructor
4559 *
4560 * @author Jakub Sakac <[email protected]>
4561 */
4562var FormValidator = function (formContainer) {
4563	this.form = jQuery(formContainer);
4564	this.inputs = this.form.find('input, select, textarea');
4565	this.rules = [];
4566
4567	return this;
4568};
4569
4570/**
4571 * Ziskanie hodnot vsetkych inputov, okrem tych disabled
4572 *
4573 * @param sanitizeInputs {boolean} ak je true, tak vrati osetrene hodnoty
4574 */
4575FormValidator.prototype.getFormValues = function(sanitizeInputs) {
4576	var formValues = {};
4577
4578	if ( sanitizeInputs ) {
4579		this.sanitize();
4580	}
4581
4582	this.inputs.not(':disabled').each(function(key, elm) {
4583		elm = jQuery(elm);
4584
4585		// ak je input radio button alebo checkbox a nie je zaskrtnuty, tak ho nepridavajme
4586		if ( (elm.is(':radio') || elm.is(':checkbox')) && !elm.prop('checked') ) {
4587			return;
4588		}
4589
4590		var elmVal = elm.val();
4591		var elmName = elm.attr('name');
4592
4593		formValues[elmName] = elmVal;
4594	});
4595
4596	return formValues;
4597};
4598
4599/**
4600 * Nabindovanie validacie na vsetky inputy po definovani vsetkych nastaveni a pridani pravidiel
4601 */
4602FormValidator.prototype.bindValidation = function() {
4603	this.inputs.not(':checkbox').on('blur change', jQuery.proxy(function(e) {
4604		this.validateInput(jQuery(e.target));
4605	}, this));
4606};
4607
4608/**
4609 * Manualna validacia formulara
4610 * je potrebne volat pri submite
4611 *
4612 * Prechadza vsetky inputy najdene v poli inputov (vytvori sa v constructe)
4613 *
4614 * @returns {boolean} vrati ci je formular validny podla definovanych pravidiel
4615 */
4616FormValidator.prototype.validate = function() {
4617	var valid = true;
4618
4619	this.inputs.not(':disabled').each(jQuery.proxy(function(key, elm) {
4620		if (!this.validateInput(elm)) valid = false;
4621	}, this));
4622
4623	return valid;
4624};
4625
4626/**
4627 * Funkcia na zvalidovanie konkretneho inputu/selectu
4628 * Interna funkcia, nie je potrebne volat vonku
4629 *
4630 * V pripade, ze pravidlo nie je pre input definovane, vrati true a 
4630input je validny
4631 *
4632 * @param elm konkretny input element
4633 * @returns {boolean} vrati ci je input validny
4634 */
4635FormValidator.prototype.validateInput = function(elm) {
4636	elm = jQuery(elm);
4637	var elmVal = elm.val();
4638	var elmName = elm.attr('name');
4639	var elmRules = this.rules[elmName];
4640	var elmIsRequired = elm.hasClass('required');
4641
4642	elm.toggleClass('filled', this.isDefined(elmVal) && elmVal != '');
4643
4644	this.removeError(elm);
4645
4646	// required field
4647	if (elmIsRequired && ( !this.isDefined(elmVal) || elmVal == '' || (config('js_Config_custom_contact_form_selects') && elm.is('select') && elm.val() === '0')) ) {
4648		if ( typeof js_Config_forgotten_password_new !== 'undefined' && js_Config_forgotten_password_new ) {
4649
4650			var labelText = elm.closest('.field').find('label').text();
4651			labelText = labelText.trim().replace(':', '');
4652
4653			if (labelText !== '') {
4654				this.addError(elm, js_lang_new_form_item + ' "' +labelText+ '" ' + js_lang_new_form_nesessery);
4655			} else {
4656				this.addError(elm, js_lang_registration_reset_password_field_required );
4657			}
4658		} else {
4659			this.addError(elm, 'Položka je povinná');
4660		}
4661
4662
4663		return false;
4664	}
4665
4666	// rules nastavene cez addRule
4667	if (this.isDefined(elmRules)) {
4668		for (var ruleName in elmRules) {
4669			if (!elmRules.hasOwnProperty(ruleName)) {
4670				continue;
4671			}
4672
4673			var rule = elmRules[ruleName];
4674
4675			if (this.isSanitizationRule(rule)) {
4676				continue;
4677			}
4678
4679			if (this.isDefined(rule.conditions) && !this.checkConditions(rule.conditions)) {
4680				elm.addClass('valid');
4681				return true;
4682			}
4683
4684			if (typeof this[ruleName] === 'function') {
4685				// zavolanie custom funkcie na overenie
4686				if ( !this[ruleName](elm, rule) ) {
4687					return false;
4688				}
4689			}
4690		}
4691	}
4692
4693	if (elmIsRequired || this.isDefined(elmRules)) {
4694		elm.addClass('valid');
4695	}
4696
4697	return true;
4698};
4699
4700/**
4701 * Satinizacia/osetrenie hodnot formulara
4702 * bud sa musi zavolat manualne alebo pri ziskani vsektych hodnot v getFormValues
4703 *
4704 * Prechadza vsetky inputy najdene v poli inputov (vytvori sa v constructe)
4705 */
4706FormValidator.prototype.sanitize = function() {
4707	this.inputs.not(':disabled').each(jQuery.proxy(function(key, elm) {
4708		this.sanitizeInput(elm);
4709	}, this));
4710};
4711
4712/**
4713 * Funkcia na sanitizaciu/osetrenie konkretneho inputu
4714 *
4715 * V pripade, ze custom pravidlo nie je pre input definovane, vrati trimnutu hodnotu
4716 *
4717 * @param elm
4718 * @returns {string}
4719 */
4720FormValidator.prototype.sanitizeInput = function(elm) {
4721	elm = jQuery(elm);
4722	var elmVal = elm.val();
4723	var elmName = elm.attr('name');
4724	var elmRules = this.rules[elmName];
4725
4726	var trimmedVal = elmVal.trim();
4727
4728	// rules nastavene cez addRule
4729	if (this.isDefined(elmRules)) {
4730		trimmedVal = Object.keys(elmRules).reduce(jQuery.proxy(function(inputVal, ruleName) {
4731			var rule = elmRules[ruleName];
4732
4733			if (!this.isSanitizationRule(rule)) {
4734				return inputVal;
4735			}
4736
4737			return this[ruleName](elm, rule, inputVal);
4738		}, this), trimmedVal);
4739	}
4740
4741	elm.val(trimmedVal);
4742	return trimmedVal;
4743};
4744
4745/**
4746 * Sluzi na overenie podmienok, ktore urcuju, ci sa ma validacia inputu vykonat - vo validateInput
4747 *
4748 * V pripade, ak niektory z inputov nema platnu value (podla pola),
4749 * podmienka nepresla a pravidlo na ktore je naviazana sa nebude overovat (input bude validny)
4750 *
4751 * @param {Object.<string, Array>} conditions objekt, v ktorom su ako kluce nazvy inputov (atribut name) a ako value pole hodnot moznych pre tento input
4752 * @returns {boolean}
4753 */
4754FormValidator.prototype.checkConditions = function(conditions) {
4755	var valid = true;
4756
4757	for (var elmName in conditions) {
4758		if (!conditions.hasOwnProperty(elmName)) {
4759			continue;
4760		}
4761
4762		var elm = this.inputs.filter('[name="' + elmName + '"]');
4763
4764		if (elm.length) {
4765			var elmVal = elm.val();
4766
4767			if (typeof conditions[elmName] == 'object' && conditions[elmName].indexOf(elmVal) == -1) {
4768				valid = false;
4769			}
4770		}
4771	}
4772
4773	return valid;
4774};
4775
4776/**
4777 * Pridanie pravidla validacie do zoznamu pravidiel
4778 *
4779 *
4780 * @param inputName nazov inputu vo forme
4781 * @param rule custom metoda overovania - metody su definovane dole v classe
4782 * @param value kontrolovana hodnota
4783 * @param message chybova hlaska v pripade, ze input neprejde validaciou
4784 * @param conditions podmienka, ak jej vysledok je true, input sa zvaliduje, inac nie
4785 * @param sanitizationRule {boolean} kontrola, ci sa jedna o validacne alebo sanitizacne pravidlo
4786 * @returns {FormValidator}
4787 */
4788FormValidator.prototype.addRule = function(inputName, rule, value, message, conditions, sanitizationRule) {
4789	if (!this.isDefined(this.rules[inputName])) {
4790		this.rules[inputName] = [];
4791	}
4792
4793	this.rules[inputName][rule] = [];
4794	this.rules[inputName][rule].value = value;
4795
4796	if (this.isDefined(sanitizationRule)) {
4797		this.rules[inputName][rule].sanitizationRule = sanitizationRule;
4798	}
4799
4800	if (this.isDefined(message)) {
4801		this.rules[inputName][rule].message = message;
4802	}
4803
4804	if (this.isDefined(conditions)) {
4805		this.rules[inputName][rule].conditions = conditions;
4806	}
4807
4808	return this;
4809};
4810
4811/**
4812 * Vykreslenie chyby v pripade nevalidneho inputu
4813 *
4814 * @param elm
4815 * @param message
4816 */
4817FormValidator.prototype.addError = function(elm, message) {
4818	var $wrapper = elm.closest('.field');
4819
4820	this.removeError(elm);
4821
4822	$wrapper.append('<div class="error_box">' + message + "</div>");
4823	elm.addClass('error');
4824	elm.removeClass('valid');
4825};
4826
4827/**
4828 * Odstranenie chyby v pripade, ze input je validny
4829 *
4830 * @param elm
4831 */
4832FormValidator.prototype.removeError = function(elm) {
4833	var $wrapper = elm.closest('.field');
4834
4835	$wrapper.find('.error_box').remove();
4836	elm.removeClass('error');
4837};
4838
4839/**
4840 * @param variable kontrolovana premenna
4841 * @returns {boolean} premenna existuje
4842 */
4843FormValidator.prototype.isDefined = function(variable) {
4844	return typeof variable !== 'undefined';
4845};
4846
4847/**
4848 *
4849 * @param rule kontrolovane pravidlo
4850 * @returns {boolean} nie je validacne pravidlo, ale sanitizacne
4851 */
4852FormValidator.prototype.isSanitizationRule = function(rule) {
4853	return typeof rule.sanitizationRule !== 'undefined' && rule.sanitizationRule ;
4854};
4855
4856/*********************************
4857 ** CUSTOM VALIDACNE PRAVIDLA PRE addRule **
4858 ********************************/
4859
4860/**
4861 * Regex validacia
4862 *
4863 * @param elm
4864 * @param rule
4865 * @returns {boolean}
4866 */
4867FormValidator.prototype.regexMatch = function(elm, rule) {
4868	if (!this.isDefined(rule.value)) {
4869		return false;
4870	}
4871
4872	var valid = elm.val().match(rule.value) != null;
4873	var message = this.isDefined(rule.message) ? rule.message : 'Hodnota nie je v správnom formáte';
4874
4875	if (!valid) {
4876		this.addError(elm, message);
4877		return false;
4878	}
4879
4880	return true;
4881};
4882
4883FormValidator.prototype.allowedChars = function(elm, rule) {
4884	if (!this.isDefined(rule.value)) {
4885		return false;
4886	}
4887
4888	var valid = elm.val().match(rule.value) != null;
4889	var message = this.isDefined(rule.message) ? rule.message : 'Obsahuje nepovolené znaky';
4890
4891	if (!valid) {
4892		this.addError(elm, message);
4893		return false;
4894	}
4895
4896	return true;
4897};
4898
4899FormValidator.prototype.minLength = function(elm, rule) {
4900	if (!this.isDefined(rule.value)) {
4901		return false;
4902	}
4903
4904	var valid = elm.val().length >= rule.value;
4905	var message = this.isDefined(rule.message) ? rule.message : 'Min. počet znakov: ' + rule.value;
4906
4907	if (!valid) {
4908		this.addError(elm, message);
4909		return false;
4910	}
4911
4912	return true;
4913};
4914
4915FormValidator.prototype.maxLength = function(elm, rule) {
4916	if (!this.isDefined(rule.value)) {
4917		return false;
4918	}
4919
4920	var valid = elm.val().length <= rule.value;
4921	var message = this.isDefined(rule.message) ? rule.message : 'Max. počet znakov: ' + rule.value;
4922
4923	if (!valid) {
4924		this.addError(elm, message);
4925		return false;
4926	}
4927
4928	return true;
4929};
4930
4931FormValidator.prototype.min = function(elm, rule) {
4932	if (!this.isDefined(rule.value)) {
4933		return false;
4934	}
4935
4936	if (isNaN(elm.val()) || isNaN(rule.value)) {
4937		this.addError(elm, 'Hodnota musí byť číslo');
4938		return false;
4939	}
4940
4941	var valid = elm.val() >= rule.value;
4942	var message = this.isDefined(rule.message) ? rule.message : 'Min. hodnota: ' + rule.value;
4943
4944	if (!valid) {
4945		this.addError(elm, message);
4946		return false;
4947	}
4948
4949	return true;
4950};
4951
4952FormValidator.prototype.max = function(elm, rule) {
4953	if (!this.isDefined(rule.value)) {
4954		return false;
4955	}
4956
4957	if (isNaN(elm.val()) || isNaN(rule.value)) {
4958		this.addError(elm, 'Hodnota musí byť číslo');
4959		return false;
4960	}
4961
4962	var valid = elm.val() <= rule.value;
4963	var message = this.isDefined(rule.message) ? rule.message : 'Max. hodnota: ' + rule.value;
4964
4965	if (!valid) {
4966		this.addError(elm, message);
4967		return false;
4968	}
4969
4970	return true;
4971};
4972
4973FormValidator.prototype.enum = function(elm, rule) {
4974	if (!this.isDefined(rule.value) || !(rule.value instanceof Array)) {
4975		return false;
4976	}
4977
4978	var valid = rule.value.indexOf(elm.val()) !== -1;
4979	var message = this.isDefined(rule.message) ? rule.message : 'Hodnota nie je v správnom formáte';
4980
4981	if (!valid) {
4982		this.addError(elm, message);
4983		return false;
4984	}
4985
4986	return true;
4987};
4988
4989FormValidator.prototype.isEmail = function(elm, rule) {
4990	if (!this.isDefined(rule.value)) {
4991		return false;
4992	}
4993
4994	var emailAddress = elm.val();
4995
4996	var valid = emailAddress.match(/[\w.\-]+@\w+[\w.\-]*?\.\w{1,4}/) != null;
4997	var message = this.isDefined(rule.message) ? rule.message : 'Nesprávny tvar e-mailovej adresy: "' + emailAddress + '"';
4998
4999	if (!valid) {
5000		this.addError(elm, message);
5001		return false;
5002	}
5003
5004	return true;
5005};
5006
5007FormValidator.prototype.isNumber = function(elm, rule) {
5008	if (!this.isDefined(rule.value)) {
5009		return false;
5010	}
5011
5012	var valid = !isNaN(elm.val());
5013	var message = this.isDefined(rule.message) ? rule.message : 'Hodnota musí byť číslo';
5014
5015	if (!valid) {
5016		this.addError(elm, message);
5017		return false;
5018	}
5019
5020	return true;
5021};
5022
5023FormValidator.prototype.isEqualTo = function(elm, rule) {
5024	if (!this.isDefined(rule.value)) {
5025		return false;
5026	}
5027
5028	var checkAgainstInput = this.form.find('[name="' + rule.value + '"]');
5029
5030	var valid = elm.val() === checkAgainstInput.val();
5031	var message = this.isDefined(rule.message) ? rule.message : 'Hodnoty sa nezhodujú';
5032
5033	if (!valid) {
5034		this.addError(elm, message);
5035		return false;
5036	}
5037
5038	return true;
5039};
5040
5041FormValidator.prototype.isChecked = function(elm, rule) {
5042	if (!elm.prop('checked')) {
5043		var message = this.isDefined(rule.message) ? rule.message : 'Položka je povinná';
5044		this.addError(elm, message);
5045		return false;
5046	}
5047
5048	return true;
5049};
5050
5051FormValidator.prototype.isBarcode = function(elm, rule) {
5052	var barcode = elm.val();
5053	var message = this.isDefined(rule.message) ? rule.message : 'Kód klubovej karty nie je platný';
5054
5055	// check length
5056	if (barcode.length < 8 || barcode.length > 18 ||
5057		(barcode.length != 8 && barcode.length != 12 &&
5058			barcode.length != 13 && barcode.length != 14 &&
5059			barcode.length != 18)) {
5060		this.addError(elm, message);
5061		return false;
5062	}
5063
5064	var lastDigit = Number(barcode.substring(barcode.length - 1));
5065	var checkSum = 0;
5066	if (isNaN(lastDigit)) {
5067		this.addError(elm, message);
5068		return false;
5069	} // not a valid upc/ean
5070
5071	var arr = barcode.substring(0,barcode.length - 1).split("").reverse();
5072	var oddTotal = 0, evenTotal = 0;
5073
5074	for (var i=0; i<arr.length; i++) {
5075		if (isNaN(arr[i])) {
5076			this.addError(elm, message);
5077			return false;
5078		} // can't be a valid upc/ean we're checking for
5079
5080		if (i % 2 == 0) { oddTotal += Number(arr[i]) * 3; }
5081		else { evenTotal += Number(arr[i]); }
5082	}
5083	checkSum = (10 - ((evenTotal + oddTotal) % 10)) % 10;
5084
5085	// true if they are equal
5086	if (checkSum != lastDigit) {
5087		this.addError(elm, message);
5088		return false;
5089	}
5090
5091	return true;
5092};
5093
5094FormValidator.prototype.isZipCode = function(elm, rule) {
5095	// TODO
5096};
5097
5098/**
5099 *  DEPRECATED ↓
5100 */
5101
5102/**
5103 * Validacia checkboxu
5104 *
5105 * @param elm
5106 * @param rule
5107 * @returns {boolean}
5108 */
5109FormValidator.prototype.validateCheckbox = function(elm, rule) {
5110	if (!elm.prop('checked')) {
5111		var message = this.isDefined(rule.message) ? rule.message : 'Položka je povinná';
5112		this.addError(elm, message);
5113		return false;
5114	}
5115
5116	return true;
5117};
5118
5119/**
5120 * Validacia dlzky hodnoty
5121 *
5122 * @param elm
5123 * @param rule
5124 * @returns {boolean}
5125 */
5126FormValidator.prototype.validateLength = function(elm, rule) {
5127	if (!this.isDefined(rule.value)) {
5128		return false;
5129	}
5130
5131	var requiredLength = rule.value;
5132
5133	if ( elm.val().trim().length < requiredLength ) {
5134		var message = this.isDefined(rule.message) ? rule.message : 'Minimálne ' + requiredLength + ' znakov';
5135		this.addError(elm, message);
5136		return false;
5137	}
5138
5139	return true;
5140};
5141
5142/**
5143 * Porovnanie hodnot dvoch inputov
5144 *
5145 * rule.value musi byt jQuery Object
5146 *
5147 * @param elm
5148 * @param rule
5149 * @returns {boolean}
5150 */
5151FormValidator.prototype.compareInputValues = function(elm, rule) {
5152	if (!this.isDefined(rule.value) || !rule.value.length) {
5153		return false;
5154	}
5155
5156	var firstValue = elm.val().trim();
5157	var secondValue = rule.value.val().trim();
5158
5159	if ( firstValue !== secondValue ) {
5160		var message = this.isDefined(rule.message) ? rule.message : 'Hodnoty sa nezhodujú';
5161		this.addError(elm, message);
5162		return false;
5163	}
5164
5165	return true;
5166};
5167
5168/**
5169 * @param elm
5170 * @param {string} value
5171 * @param {object} rule
5172 * @returns {boolean}
5173 */
5174FormValidator.prototype.validateDate = function(elm, rule) {
5175	if (!this.isDefined(rule) || Object.keys(rule).length === 0) {
5176		return false;
5177	}
5178
5179	let message = this.isDefined(rule.message) ? rule.message : 'Neplatný formát dátumu';
5180	let date;
5181
5182	try {
5183		 date = jQuery.datepicker.parseDate(rule.format, elm.val().trim());
5184	} catch (e) {
5185		return false;
5186	}
5187
5188	if (!date) {
5189		return false;
5190	}
5191
5192	if (!rule.days?.includes(date.getDay())) {
5193		this.addError(elm, message);
5194		return false;
5195	}
5196
5197	if (rule.minDate && typeof rule.minDate === 'number') {
5198		const today = new Date();
5199		today.setHours(0, 0, 0, 0);
5200		today.setDate(today.getDate() + rule.minDate);
5201
5202		if (date < today) {
5203			this.addError(elm, message);
5204			return false;
5205		}
5206	}
5207
5208	return true;
5209};
5210
5211/**
5212 * Validacia klubovej karty
5213 *
5214 * @param elm
5215 * @param rule
5216 * @returns {boolean}
5217 */
5218FormValidator.prototype.validateBarcode = function(elm, rule) {
5219	var barcode = elm.val();
5220	var message = this.isDefined(rule.message) ? rule.message : 'Kód klubovej karty nie je platný';
5221
5222	// check length
5223	if (barcode.length < 8 || barcode.length > 18 ||
5224		(barcode.length != 8 && barcode.length != 12 &&
5225			barcode.length != 13 && barcode.length != 14 &&
5226			barcode.length != 18)) {
5227		this.addError(elm, message);
5228		return false;
5229	}
5230
5231	var lastDigit = Number(barcode.substring(barcode.length - 1));
5232	var checkSum = 0;
5233	if (isNaN(lastDigit)) {
5234		this.addError(elm, message);
5235		return false;
5236	} // not a valid upc/ean
5237
5238	var arr = barcode.substring(0,barcode.length - 1).split("").reverse();
5239	var oddTotal = 0, evenTotal = 0;
5240
5241	for (var i=0; i<arr.length; i++) {
5242		if (isNaN(arr[i])) {
5243			this.addError(elm, message);
5244			return false;
5245		} // can't be a valid upc/ean we're checking for
5246
5247		if (i % 2 == 0) { oddTotal += Number(arr[i]) * 3; }
5248		else { evenTotal += Number(arr[i]); }
5249	}
5250	checkSum = (10 - ((evenTotal + oddTotal) % 10)) % 10;
5251
5252	// true if they are equal
5253	if (checkSum != lastDigit) {
5254		this.addError(elm, message);
5255		return false;
5256	}
5257
5258	return true;
5259};
5260
5261/*********************************
5262 ** CUSTOM SANITIZACNE PRAVIDLA PRE addRule **
5263 ********************************/
5264
5265/**
5266 * Regex sanitizacia
5267 * rule.value musi byt object vo formate { regex: Regex, replacement: String }
5268 *
5269 * @param elm
5270 * @param rule
5271 * @param elemVal {string}
5272 * @returns {string}
5273 */
5274FormValidator.prototype.regexReplace = function(elm, rule, elemVal) {
5275	if (!this.isSanitizationRule(rule)) {
5276		return elemVal;
5277	}
5278
5279	if (
5280		!this.isDefined(rule.value)
5281		|| !this.isDefined(rule.value.pattern)
5282		|| !this.isDefined(rule.value.replacement)
5283		) {
5284		return elemVal;
5285	}
5286
5287	var pattern = new RegExp(rule.value.pattern, 'gi');
5288	var replacement = rule.value.replacement;
5289
5290	return elemVal.replace(pattern, replacement);
5291};
5292
5293
5294/* ========================================
5295 FILE: /includes/js/jquery/jquery.viewport.mini.js
5296 ==================== */
5297
5298(function($){$.belowthefold=function(element,settings){var fold=$(window).height()+$(window).scrollTop();return fold<=$(element).offset().top-settings.threshold;};$.abovethetop=function(element,settings){var top=$(window).scrollTop();return top>=$(element).offset().top+$(element).height()-settings.threshold;};$.rightofscreen=function(element,settings){var fold=$(window).width()+$(window).scrollLeft();
5298return fold<=$(element).offset().left-settings.threshold;};$.leftofscreen=function(element,settings){var left=$(window).scrollLeft();return left>=$(element).offset().left+$(element).width()-settings.threshold;};$.inviewport=function(element,settings){return!$.rightofscreen(element,settings)&&!$.leftofscreen(element,settings)&&!$.belowthefold(element,settings)&&!$.abovethetop(element,settings);};$.extend($.expr[':'],{"below-the-fold":function(a,i,m){return $.belowthefold(a,{threshold:0});},"above-the-top":function(a,i,m){return $.abovethetop(a,{threshold:0});},"left-of-screen":function(a,i,m){return $.leftofscreen(a,{threshold:0});},"right-of-screen":function(a,i,m){return $.rightofscreen(a,{threshold:0});},"in-viewport":function(a,i,m){return $.inviewport(a,{threshold:0});}});})(jQuery);
5299
5300/* ========================================
5301 FILE: /includes/js/jquery/poshytip/jquery.poshytip.js
5302 ==================== */
5303
5304/*
5305 * Poshy Tip jQuery plugin v1.2
5306 * http://vadikom.com/tools/poshy-tip-jquery-plugin-for-stylish-tooltips/
5307 * Copyright 2010-2013, Vasil Dinkov, http://vadikom.com/
5308 */
5309
5310(function($) {
5311
5312	var tips = [],
5313	    reBgImage = /^url\(["']?([^"'\)]*)["']?\);?$/i,
5314	    rePNG = /\.png$/i,
5315	    ie6 = !!window.createPopup && ( typeof(document.documentElement.currentStyle) == 'undefined' || typeof(document.documentElement.currentStyle.minWidth) == 'undefined' );
5316
5317	// make sure the tips' position is updated on resize
5318	function handleWindowResize() {
5319		$.each(tips, function() {
5320			this.refresh(true);
5321		});
5322	}
5323	$(window).resize(handleWindowResize);
5324
5325	$.Poshytip = function(elm, options) {
5326		this.$elm = $(elm);
5327		this.opts = $.extend({}, $.fn.poshytip.defaults, options);
5328		this.$tip = $(['<div class="',this.opts.className,'">',
5329			'<div class="tip-inner tip-bg-image"></div>',
5330			'<div class="tip-arrow tip-arrow-top tip-arrow-right tip-arrow-bottom tip-arrow-left"></div>',
5331			'</div>'].join('')).appendTo(document.body);
5332		this.$arrow = this.$tip.find('div.tip-arrow');
5333		this.$inner = this.$tip.find('div.tip-inner');
5334		this.disabled = false;
5335		this.content = null;
5336		this.init();
5337	};
5338
5339	$.Poshytip.prototype = {
5340		init: function() {
5341			tips.push(this);
5342
5343			// save the original title and a reference to the Poshytip object
5344			var title = this.$elm.attr('title');
5345			this.$elm.data('title.poshytip', title !== undefined ? title : null)
5346				.data('poshytip', this);
5347
5348			// hook element events
5349			if (this.opts.showOn != 'none') {
5350				this.$elm.bind({
5351					'mouseenter.poshytip': $.proxy(this.mouseenter, this),
5352					'mouseleave.poshytip': $.proxy(this.mouseleave, this)
5353				});
5354				switch (this.opts.showOn) {
5355					case 'hover':
5356						if (this.opts.alignTo == 'cursor')
5357							this.$elm.bind('mousemove.poshytip', $.proxy(this.mousemove, this));
5358						if (this.opts.allowTipHover)
5359							this.$tip.hover($.proxy(this.clearTimeouts, this), $.proxy(this.mouseleave, this));
5360						break;
5361					case 'focus':
5362						this.$elm.bind({
5363							'focus.poshytip': $.proxy(this.showDelayed, this),
5364							'blur.poshytip': $.proxy(this.hideDelayed, this)
5365						});
5366						break;
5367				}
5368			}
5369		},
5370		mouseenter: function(e) {
5371			if (this.disabled)
5372				return true;
5373
5374			this.$elm.attr('title', '');
5375			if (this.opts.showOn == 'focus')
5376				return true;
5377
5378			this.showDelayed();
5379		},
5380		mouseleave: function(e) {
5381			if (this.disabled || this.asyncAnimating && (this.$tip[0] === e.relatedTarget || jQuery.contains(this.$tip[0], e.relatedTarget)))
5382				return true;
5383
5384			if (!this.$tip.data('active')) {
5385				var title = this.$elm.data('title.poshytip');
5386				if (title !== null)
5387					this.$elm.attr('title', title);
5388			}
5389			if (this.opts.showOn == 'focus')
5390				return true;
5391
5392			this.hideDelayed();
5393		},
5394		mousemove: function(e) {
5395			if (this.disabled)
5396				return true;
5397
5398			this.eventX = e.pageX;
5399			this.eventY = e.pageY;
5400			if (this.opts.followCursor && this.$tip.data('active')) {
5401				this.calcPos();
5402				this.$tip.css({left: this.pos.l, top: this.pos.t});
5403				if (this.pos.arrow)
5404					this.$arrow[0].className = 'tip-arrow tip-arrow-' + this.pos.arrow;
5405			}
5406		},
5407		show: function() {
5408			if (this.disabled || typeof this.$tip === 'undefined' || this.$tip.data('active'))
5409				return;
5410
5411			this.reset();
5412			this.update();
5413
5414			// don't proceed if we didn't get any content in update() (e.g. the element has an empty title attribute)
5415			if (!this.content)
5416				return;
5417
5418			this.display();
5419			if (this.opts.timeOnScreen)
5420				this.hideDelayed(this.opts.timeOnScreen);
5421		},
5422		showDelayed: function(timeout) {
5423			this.clearTimeouts();
5424			this.showTimeout = setTimeout($.proxy(this.show, this), typeof timeout == 'number' ? timeout : this.opts.showTimeout);
5425		},
5426		hide: function() {
5427			if (this.disabled || typeof this.$tip === 'undefined' || !this.$tip.data('active'))
5428				return;
5429
5430			this.display(true);
5431		},
5432		hideDelayed: function(timeout) {
5433			this.clearTimeouts();
5434			this.hideTimeout = setTimeout($.proxy(this.hide, this), typeof timeout == 'number' ? timeout : this.opts.hideTimeout);
5435		},
5436		reset: function() {
5437			this.$tip.queue([]).detach().css('visibility', 'hidden').data('active', false);
5438			this.$inner.find('*').poshytip('hide');
5439			if (this.opts.fade)
5440				this.$tip.css('opacity', this.opacity);
5441			this.$arrow[0].className = 'tip-arrow tip-arrow-top tip-arrow-right tip-arrow-bottom tip-arrow-left';
5442			this.asyncAnimating = false;
5443		},
5444		update: function(content, dontOverwriteOption) {
5445			if (this.disabled)
5446				return;
5447
5448			var async = content !== undefined;
5449			if (async) {
5450				if (!dontOverwriteOption)
5451					this.opts.content = content;
5452				if (!this.$tip.data('active'))
5453					return;
5454			} else {
5455				content = this.opts.content;
5456			}
5457
5458			// update content only if it has been changed since last time
5459			var self = this,
5460			    newContent = typeof content == 'function' ?
5461				    content.call(this.$elm[0], function(newContent) {
5462					    self.update(newContent);
5463				    }) :
5464				    content == '[title]' ? this.$elm.data('title.poshytip') : content;
5465			if (this.content !== newContent) {
5466				this.$inner.empty().append(newContent);
5467				this.content = newContent;
5468			}
5469
5470			this.$tip.appendTo(document.body);
5471
5472			this.refresh(async);
5473		},
5474		refresh: function(async) {
5475			if (this.disabled)
5476				return;
5477
5478			if (async) {
5479				if (!this.$tip.data('active'))
5480					return;
5481				// save current position as we will need to animate
5482				var currPos = {left: this.$tip.css('left'), top: this.$tip.css('top')};
5483			}
5484
5485			// reset position to avoid text wrapping, etc.
5486			this.$tip.css({left: 0, top: 0});
5487
5488			// save default opacity
5489			if (this.opacity === undefined)
5490				this.opacity = this.$tip.css('opacity');
5491
5492			// check for images - this code is here (i.e. executed each time we show the tip and not on init) due to some browser inconsistencies
5493			var bgImage = this.$tip.css('background-image').match(reBgImage),
5494			    arrow = this.$arrow.css('background-image').match(reBgImage);
5495
5496			if (bgImage) {
5497				var bgImagePNG = rePNG.test(bgImage[1]);
5498				// fallback to background-color/padding/border in IE6 if a PNG is used
5499				if (ie6 && bgImagePNG) {
5500					this.$tip.css('background-image', 'none');
5501					this.$inner.css({margin: 0, border: 0, padding: 0});
5502					bgImage = bgImagePNG = false;
5503				} else {
5504					this.$tip.prepend('<table class="tip-table" border="0" cellpadding="0" cellspacing="0"><tr><td class="tip-top tip-bg-image" colspan="2"><span></span></td><td class="tip-right tip-bg-image" rowspan="2"><span></span></td></tr><tr><td class="tip-left tip-bg-image" rowspan="2"><span></span></td><td></td></tr><tr><td class="tip-bottom tip-bg-image" colspan="2"><span></span></td></tr></table>')
5505						.css({border: 0, padding: 0, 'background-image': 'none', 'background-color': 'transparent'})
5506						.find('.tip-bg-image').css('background-image', 'url("' + bgImage[1] +'")').end()
5507						.find('td').eq(3).append(this.$inner);
5508				}
5509				// disable fade effect in IE due to Alpha filter + translucent PNG issue
5510				if (bgImagePNG && !$.support.opacity)
5511					this.opts.fade = false;
5512			}
5513			// IE arrow fixes
5514			if (arrow && !$.support.opacity) {
5515				// disable arrow in IE6 if using a PNG
5516				if (ie6 && rePNG.test(arrow[1])) {
5517					arrow = false;
5518					this.$arrow.css('background-image', 'none');
5519				}
5520				// disable fade effect in IE due to Alpha filter + translucent PNG issue
5521				this.opts.fade = false;
5522			}
5523
5524			var $table = this.$tip.find('> table.tip-table');
5525			if (ie6) {
5526				// fix min/max-width in IE6
5527				this.$tip[0].style.width = '';
5528				$table.width('auto').find('td').eq(3).width('auto');
5529				var tipW = this.$tip.width(),
5530				    minW = parseInt(this.$tip.css('min-width')),
5531				    maxW = parseInt(this.$tip.css('max-width'));
5532				if (!isNaN(minW) && tipW < minW)
5533					tipW = minW;
5534				else if (!isNaN(maxW) && tipW > maxW)
5535					tipW = maxW;
5536				this.$tip.add($table).width(tipW).eq(0).find('td').eq(3).width('100%');
5537			} else if ($table[0]) {
5538				// fix the table width if we are using a background image
5539				// IE9, FF4 use float numbers for width/height so use getComputedStyle for them to avoid text wrapping
5540				// for details look at: http://vadikom.com/dailies/offsetwidth-offsetheight-useless-in-ie9-firefox4/
5541				$table.width('auto').find('td').eq(3).width('auto').end().end().width(document.defaultView && document.defaultView.getComputedStyle && parseFloat(document.defaultView.getComputedStyle(this.$tip[0], null).width) || this.$tip.width()).find('td').eq(3).width('100%');
5542			}
5543			this.tipOuterW = this.$tip.outerWidth();
5544			this.tipOuterH = this.$tip.outerHeight();
5545
5546			this.calcPos();
5547
5548			// position and show the arrow image
5549			if (arrow && this.pos.arrow) {
5550				this.$arrow[0].className = 'tip-arrow tip-arrow-' + this.pos.arrow;
5551				this.$arrow.css('visibility', 'inherit');
5552			}
5553
5554			if (async && this.opts.refreshAniDuration) {
5555				this.asyncAnimating = true;
5556				var self = this;
5557				this.$tip.css(currPos).animate({left: this.pos.l, top: this.pos.t}, this.opts.refreshAniDuration, function() { self.asyncAnimating = false; });
5558			} else {
5559				this.$tip.css({left: this.pos.l, top: this.pos.t});
5560			}
5561			if (typeof this.opts.onRefresh === 'function') this.opts.onRefresh();
5562		},
5563		display: function(hide) {
5564			var active = this.$tip.data('active');
5565			if (active && !hide || !active && hide)
5566				return;
5567
5568			this.$tip.stop();
5569			if ((this.opts.slide && this.pos.arrow || this.opts.fade) && (hide && this.opts.hideAniDuration || !hide && this.opts.showAniDuration)) {
5570				var from = {}, to = {};
5571				// this.pos.arrow is only undefined when alignX == alignY == 'center' and we don't need to slide in that rare case
5572				if (this.opts.slide && this.pos.arrow) {
5573					var prop, arr;
5574					if (this.pos.arrow == 'bottom' || this.pos.arrow == 'top') {
5575						prop = 'top';
5576						arr = 'bottom';
5577					} else {
5578						prop = 'left';
5579						arr = 'right';
5580					}
5581					var val = parseInt(this.$tip.css(prop));
5582					from[prop] = val + (hide ? 0 : (this.pos.arrow == arr ? -this.opts.slideOffset : this.opts.slideOffset));
5583					to[prop] = val + (hide ? (this.pos.arrow == arr ? this.opts.slideOffset : -this.opts.slideOffset) : 0) + 'px';
5584				}
5585				if (this.opts.fade) {
5586					from.opacity = hide ? this.$tip.css('opacity') : 0;
5587					to.opacity = hide ? 0 : this.opacity;
5588				}
5589				this.$tip.css(from).animate(to, this.opts[hide ? 'hideAniDuration' : 'showAniDuration']);
5590			}
5591			hide ? this.$tip.queue($.proxy(this.reset, this)) : this.$tip.css('visibility', 'inherit');
5592			if (active) {
5593				var title = this.$elm.data('title.poshytip');
5594				if (title !== null)
5595					this.$elm.attr('title', title);
5596			}
5597			this.$tip.data('active', !active);
5598		},
5599		disable: function() {
5600			this.reset();
5601			this.disabled = true;
5602		},
5603		enable: function() {
5604			this.disabled = false;
5605		},
5606		destroy: function() {
5607			this.reset();
5608			this.$tip.remove();
5609			delete this.$tip;
5610			this.content = null;
5611			this.$elm.unbind('.poshytip').removeData('title.poshytip').removeData('poshytip');
5612			tips.splice($.inArray(this, tips), 1);
5613		},
5614		clearTimeouts: function() {
5615			if (this.showTimeout) {
5616				clearTimeout(this.showTimeout);
5617				this.showTimeout = 0;
5618			}
5619			if (this.hideTimeout) {
5620				clearTimeout(this.hideTimeout);
5621				this.hideTimeout = 0;
5622			}
5623		},
5624		calcPos: function() {
5625			var pos = {l: 0, t: 0, arrow: ''},
5626			    $win = $(window),
5627			    win = {
5628				    l: $win.scrollLeft(),
5629				    t: $win.scrollTop(),
5630				    w: $win.width(),
5631				    h: $win.height()
5632			    }, xL, xC, xR, yT, yC, yB;
5633			if (this.opts.alignTo == 'cursor') {
5634				xL = xC = xR = this.eventX;
5635				yT = yC = yB = this.eventY;
5636			} else { // this.opts.alignTo == 'target'
5637				var elmOffset = this.$elm.offset(),
5638				    elm = {
5639					    l: elmOffset.left,
5640					    t: elmOffset.top,
5641					    w: this.$elm.outerWidth(),
5642					    h: this.$elm.outerHeight()
5643				    };
5644				xL = elm.l + (this.opts.alignX != 'inner-right' ? 0 : elm.w);	// left edge
5645				xC = xL + Math.floor(elm.w / 2);				// h center
5646				xR = xL + (this.opts.alignX != 'inner-left' ? elm.w : 0);	// right edge
5647				yT = elm.t + (this.opts.alignY != 'inner-bottom' ? 0 : elm.h);	// top edge
5648				yC = yT + Math.floor(elm.h / 2);				// v center
5649				yB = yT + (this.opts.alignY != 'inner-top' ? elm.h : 0);	// bottom edge
5650			}
5651
5652			if (typeof this.opts.alignXOrig !== 'undefined') this.opts.alignX = this.opts.alignXOrig;
5653			if (typeof this.opts.alignYOrig !== 'undefined') this.opts.alignY = this.opts.alignYOrig;
5654
5655			// keep in viewport and calc arrow position
5656			switch (this.opts.alignX) {
5657				case 'right':
5658				case 'inner-left':
5659					pos.l = xR + this.opts.offsetX;
5660					if (this.opts.keepInViewport && pos.l + this.tipOuterW > win.l + win.w)
5661						pos.l = win.l + win.w - this.tipOuterW;
5662					if (this.opts.alignX == 'right' || this.opts.alignY == 'center')
5663						pos.arrow = 'left';
5664					break;
5665				case 'center':
5666					pos.l = xC - Math.floor(this.tipOuterW / 2);
5667					if (this.opts.keepInViewport) {
5668						if (pos.l + this.tipOuterW > win.l + win.w)
5669							pos.l = win.l + win.w - this.tipOuterW;
5670						else if (pos.l < win.l)
5671							pos.l = win.l;
5672					}
5673					break;
5674				default: // 'left' || 'inner-right'
5675					pos.l = xL - this.tipOuterW - this.opts.offsetX;
5676					if (this.opts.keepInViewport && pos.l < win.l)
5677						pos.l = win.l;
5678					if (this.opts.alignX == 'left' || this.opts.alignY == 'center')
5679						pos.arrow = 'right';
5680			}
5681			switch (this.opts.alignY) {
5682				case 'bottom':
5683				case 'inner-top':
5684					pos.t = yB + this.opts.offsetY;
5685					// 'left' and 'right' need priority for 'target'
5686					if (!pos.arrow || this.opts.alignTo == 'cursor')
5687						pos.arrow = 'top';
5688					if (this.opts.keepInViewport && pos.t + this.tipOuterH > win.t + win.h) {
5689						pos.t = yT - this.tipOuterH - this.opts.offsetY;
5690						if (pos.arrow == 'top')
5691							pos.arrow = 'bottom';
5692					}
5693					break;
5694				case 'center':
5695					pos.t = yC - Math.floor(this.tipOuterH / 2);
5696					if (this.opts.keepInViewport) {
5697						if (pos.t + this.tipOuterH > win.t + win.h)
5698							pos.t = win.t + win.h - this.tipOuterH;
5699						else if (pos.t < win.t)
5700							pos.t = win.t;
5701					}
5702					break;
5703				default: // 'top' || 'inner-bottom'
5704					pos.t = yT - this.tipOuterH - this.opts.offsetY;
5705					// 'left' and 'right' need priority for 'target'
5706					if (!pos.arrow || this.opts.alignTo == 'cursor')
5707						pos.arrow = 'bottom';
5708					if (this.opts.keepInViewport && pos.t < win.t) {
5709						pos.t = yB + this.opts.offsetY;
5710						if (pos.arrow == 'bottom')
5711							pos.arrow = 'top';
5712					}
5713			}
5714
5715			if (pos.t < 0) pos.t = 0;
5716
5717			this.pos = pos;
5718		}
5719	};
5720
5721	$.fn.poshytip = function(options) {
5722		if (typeof options == 'string') {
5723			var args = arguments,
5724			    method = options;
5725			Array.prototype.shift.call(args);
5726			// unhook live events if 'destroy' is called
5727			if (method == 'destroy') {
5728				this.off ?
5729					this.off('mouseenter.poshytip').off('focus.poshytip') :
5730					$(document).undelegate(this.selector, 'mouseenter.poshytip').undelegate(this.selector, 'focus.poshytip');
5731			}
5732			return this.each(function() {
5733				var poshytip = $(this).data('poshytip');
5734				if (poshytip && poshytip[method])
5735					poshytip[method].apply(poshytip, args);
5736			});
5737		}
5738
5739		var opts = $.extend({}, $.fn.poshytip.defaults, options);
5740
5741		// generate CSS for this tip class if not already generated
5742		if (!$('#poshytip-css-' + opts.className)[0])
5743			$(['<style id="poshytip-css-',opts.className,'" type="text/css">',
5744				'div.',opts.className,'{visibility:hidden;position:absolute;top:0;left:0;}',
5745				'div.',opts.className,' table.tip-table, div.',opts.className,' table.tip-table td{margin:0;font-family:inherit;font-size:inherit;font-weight:inherit;font-style:inherit;font-variant:inherit;vertical-align:middle;}',
5746				'div.',opts.className,' td.tip-bg-image span{display:block;font:1px/1px sans-serif;height:',opts.bgImageFrameSize,'px;width:',opts.bgImageFrameSize,'px;overflow:hidden;}',
5747				'div.',opts.className,' td.tip-right{background-position:100% 0;}',
5748				'div.',opts.className,' td.tip-bottom{background-position:100% 100%;}',
5749				'div.',opts.className,' td.tip-left{background-position:0 100%;}',
5750				'div.',opts.className,' div.tip-inner{background-position:-',opts.bgImageFrameSize,'px -',opts.bgImageFrameSize,'px;}',
5751				'div.',opts.className,' div.tip-arrow{visibility:hidden;position:absolute;overflow:hidden;font:1px/1px sans-serif;}',
5752				'</style>'].join('')).appendTo('head');
5753
5754		// check if we need to hook live events
5755		if (opts.liveEvents && opts.showOn != 'none') {
5756			var handler,
5757			    deadOpts = $.extend({}, opts, { liveEvents: false });
5758			switch (opts.showOn) {
5759				case 'hover':
5760					handler = function() {
5761						var $this = $(this);
5762						if (!$this.data('poshytip'))
5763							$this.poshytip(deadOpts).poshytip('mouseenter');
5764					};
5765					// support 1.4.2+ & 1.9+
5766					this.on ?
5767						this.on('mouseenter.poshytip', handler) :
5768						$(document).delegate(this.selector, 'mouseenter.poshytip', handler);
5769					break;
5770				case 'focus':
5771					handler = function() {
5772						var $this = $(this);
5773						if (!$this.data('poshytip'))
5774							$this.poshytip(deadOpts).poshytip('showDelayed');
5775					};
5776					this.on ?
5777						this.on('focus.poshytip', handler) :
5778						$(document).delegate(this.selector, 'focus.poshytip', handler);
5779					break;
5780			}
5781			return this;
5782		}
5783
5784		return this.each(function() {
5785			new $.Poshytip(this, opts);
5786		});
5787	};
5788
5789	// default settings
5790	$.fn.poshytip.defaults = {
5791		content: 		'[title]',	// content to display ('[title]', 'string', element, function(updateCallback){...}, jQuery)
5792		className:		'tip-yellow',	// class for the tips
5793		bgImageFrameSize:	10,		// size in pixels for the background-image (if set in CSS) frame around the inner content of the tip
5794		showTimeout:		500,		// timeout before showing the tip (in milliseconds 1000 == 1 second)
5795		hideTimeout:		100,		// timeout before hiding the tip
5796		timeOnScreen:		0,		// timeout before automatically hiding the tip after showing it (set to > 0 in order to activate)
5797		showOn:			'hover',	// handler for showing the tip ('hover', 'focus', 'none') - use 'none' to trigger it manually
5798		liveEvents:		false,		// use live events
5799		alignTo:		'cursor',	// align/position the tip relative to ('cursor', 'target')
5800		alignX:			'right',	// horizontal alignment for the tip relative to the mouse cursor or the target element
5801		// ('right', 'center', 'left', 'inner-left', 'inner-right') - 'inner-*' matter if alignTo:'target'
5802		alignY:			'top',		// vertical alignment for the tip relative to the mouse cursor or the target element
5803		// ('bottom', 'center', 'top', 'inner-bottom', 'inner-top') - 'inner-*' matter if alignTo:'target'
5804		offsetX:		-22,		// offset X pixels from the default position - doesn't matter if alignX:'center'
5805		offsetY:		18,		// offset Y pixels from the default position - doesn't matter if alignY:'center'
5806		keepInViewport:		true,		// reposition the tooltip if needed to make sure it always appears inside the viewport
5807		allowTipHover:		true,		// allow hovering the tip without hiding it onmouseout of the target - matters only if showOn:'hover'
5808		followCursor:		false,		// if the tip should follow the cursor - matters only if showOn:'hover' and alignTo:'cursor'
5809		fade: 			true,		// use fade animation
5810		slide: 			true,		// use slide animation
5811		slideOffset: 		8,		// slide animation offset
5812		showAniDuration: 	300,		// show animation duration - set to 0 if you don't want show animation
5813		hideAniDuration: 	300,		// hide animation duration - set to 0 if you don't want hide animation
5814		refreshAniDuration:	200		// refresh animation duration - set to 0 if you don't want animation when updating the tooltip asynchronously
5815	};
5816
5817})(jQuery);
5818
5819/* ========================================
5820 FILE: /includes/js/system/frontend.js
5821 ==================== */
5822
5823var sudoMoveHrefPosX,
5824    sudoMoveHrefPosY;
5825
5826//načítanie všetkých tooltipsterov pre frontend
5827window.addEventListener('DOMContentLoaded', function() {
5828	//len je potrebné si vybrať classu a podľa nej nahodiť tooltipster
5829	jQuery('.quantity_modifications_tooltip').each(function() {
5830		//element má v sebe data-attributes
5831
5832
5833
5834		var $this = jQuery(this);
5835		var content = (($this.data('minimum_quantity') + '<br>') || ' ') + (($this.data('forced_quantity') + '<br>') || ' ') + ($this.data('maximum_quantity') || ' ');
5836
5837		$this.tooltipster({
5838			animation     : 'fade',
5839			delay         : 200,
5840			trigger       : 'hover',
5841			content       : content,
5842			theme         : 'cs_tooltipster_grey_theme',
5843			contentAsHTML : true,
5844		});
5845
5846		//extra pridanie aj na pridaŤ do košíka button
5847
5848		if ($this.closest('div.shop-category-product').length) {
5849			$this.closest('div.shop-category-product').find('input.categ_add_to_cart').tooltipster({
5850				animation     : 'fade',
5851				delay         : 200,
5852				trigger       : 'hover',
5853				content       : content,
5854				theme         : 'cs_tooltipster_grey_theme',
5855				contentAsHTML : true,
5856			});
5857		}
5858	});
5859});
5860
5861// sudo slider iOS fix
5862function js_sudo_slider_ios_fix() {
5863	jQuery('.sudo_href').on('touchmove', function(e) {
5864        sudoMoveHrefPosX = e.originalEvent.touches[0].pageX;
5865        sudoMoveHrefPosY = e.originalEvent.touches[0].pageY;
5866    }).on('touchend', function(e) {
5867        var ths = jQuery(this),
5868            thsHref = ths.attr('href'),
5869            thsTarget = ths.attr('target');
5870
5871        if ( sudoMoveHrefPosX == undefined && sudoMoveHrefPosY == undefined) {
5872            if ( thsTarget == '_blank' ) {
5873                window.open(thsHref, '_blank');
5874            } else {
5875                window.location.assign(thsHref);
5876            }
5877            return false;
5878        }
5879        sudoMoveHrefPosX = undefined;
5880        sudoMoveHrefPosY = undefined;
5881    });
5882}
5883
5884function js_sudo_slider_sudo_href_fix() {
5885    var $sudoHrefElem,
5886        sudoHrefCursoruPosX,
5887        sudoHrefCursoruPosY;
5888
5889	$sudoHrefElem = jQuery('.sudo_href');
5890
5891	$sudoHrefElem.on('click', function(e) {
5892    	return false;
5893    });
5894	$sudoHrefElem.on('mousedown', function(e) {
5895        sudoHrefCursoruPosX = e.pageX;
5896        sudoHrefCursoruPosY = e.pageY;
5897    });
5898
5899	$sudoHrefElem.on('mouseup', function(e) {
5900    	var target = jQuery(this).attr('href');
5901    	if ( sudoHrefCursoruPosX === e.pageX && sudoHrefCursoruPosY === e.pageY && target !== '#' ) {
5902            if ( jQuery(this).attr('target') == '_blank' ) {
5903                window.open(target, '_blank');
5904            } else {
5905                window.location.assign(target);
5906            }
5907        }
5908    });
5909}
5910
5911jQuery.fn.startAjaxLoader = function ( loader_image_filename ) {
5912	if (this.data('ajax-loader-pre-html-content') == null) {
5913		this.data('ajax-loader-pre-html-content', this.html()).html('<span class="small_graph_ajax_loader"><img src="'+js_global_live_site+'/images/'+(loader_image_filename != null ? loader_image_filename : 'ajax-loader-05.gif')+'" alt="..." /></span>');
5914	}
5915	return this;
5916};
5917
5918jQuery.fn.stopAjaxLoader = function () {
5919	if (this.data('ajax-loader-pre-html-content') != null) {
5920		this.html(this.data('ajax-loader-pre-html-content')).removeData('ajax-loader-pre-html-content');
5921	}
5922	return this;
5923};
5924
5925function js_add_class_to_last_module( block_element ) {
5926	if (typeof js_Config_parser_enabled !== 'undefined' && js_Config_parser_enabled) {
5927		return false;
5928	}
5929
5930  block_element = jQuery(block_element);
5931
5932  if ( block_element.find('.mp:first').length == 0 ) {
5933    return;
5934  }
5935
5936  block_element = block_element.find('.mp:first').parent();
5937  block_element.children('.mp,.mp_placeholder,.mp_placeholder_1x').removeClass('mp_side_last');
5938
5939  // aktualna sirka bloku v x
5940  var block_width_x = 5;
5941
5942  if ( block_element.parents('#middle:first').length != 0 )
5943    block_width_x = parseInt( /middle_([0-9]+)x/.exec( jQuery('#middle').attr('class') )[1] );
5944
5945  var placeholder_element = block_element.children('.mp_placeholder,.mp_placeholder_1x');
5946  var mp_last_element = block_element.children('.mp:last');
5947
5948  if ( mp_last_element.hasClass('ui-sortable-helper') )
5949    mp_last_element = mp_last_element.prev('.mp');
5950
5951  var last_found = false;
5952
5953  if ( placeholder_element.length != 0 && (placeholder_element.index() > mp_last_element.index() || mp_last_element.length == 0) ) {
5954
5955    placeholder_element.addClass('mp_side_last');
5956    last_found = true;
5957  }
5958
5959  if ( !last_found && mp_last_element.length != 0 )
5960    mp_last_element.addClass('mp_side_last');
5961
5962  //var module_count = block_element.children('.mp').length;
5963
5964  // pridaj class aj pre kazdy posledny modul v riadku (ak je zobrazenych viac riadkov)
5965
5966  var modules_width = 0;
5967
5968  // sirku modulov v bloku si musime vypocitat
5969  block_element.children('.mp').each( function() {
5970	  var parsedWidth =  /mp_w([1-9]+)(\s|$)/.exec( jQuery(this).attr('class') );
5971
5972	  if (parsedWidth !== null) {
5973		  modules_width += parseInt(parsedWidth[1]);
5974	  }
5975  });
5976
5977  // moduly su na viac riadkov
5978  if ( modules_width > block_width_x ) {
5979
5980    var module_last_class_set = false;
5981    var prev_module_element = null;
5982    var modules_row_width = 0;  // sucet sirky modulov (v x) pre kazdy riadok bloku
5983    var module_width = 0;  // v x
5984
5985    block_element.children('.mp').each( function() {
5986    	if ( !jQuery(this).hasClass('mp') && !jQuery(this).hasClass('mp_placeholder') && !jQuery(this).hasClass('mp_placeholder_1x') )
5987    		return;
5988    	if ( jQuery(this).hasClass('ui-sortable-helper') )
5989    		return;
5990
5991//     	module_width = Math.floor( (jQuery(this).width()+30)/180 );
5992		module_width = parseInt(/mp_w([0-9]+)/.exec( jQuery(this).attr('class') )[1] || 0);
5993    	modules_row_width += module_width;
5994
5995		// sirky modulov v riadku nevychadzaju presne na jeho sirku
5996		if ( modules_row_width > block_width_x && prev_module_element != null ) {
5997			prev_module_element.addClass('mp_side_last');
5998			modules_row_width = module_width;
5999		}
6000
6001		// posledny modul v bloku uz ma nastavenu class
6002		if ( jQuery(this).hasClass('mp_side_last') )
6003			return;
6004
6005		// sirky modulov v riadku vychadzaju presne na jeho sirku
6006		if ( modules_row_width == block_width_x ) {
6007			jQuery(this).addClass('mp_side_last');
6008			modules_row_width = 0;
6009		}
6010
6011		prev_module_element = jQuery(this);
6012    });
6013  }
6014}
6015
6016// pre moduly v bloku left a right
6017function js_add_class_to_left_right_modules( block_element, class_prefix ) {
6018  block_element = jQuery(block_element);
6019
6020  block_element.children('.mp').each( function(index) {
6021
6022    jQuery(this).removeClass('mp_l0').removeClass('mp_l1');
6023    jQuery(this).removeClass('mp_r0').removeClass('mp_r1');
6024
6025    if ( (index % 2) == 0 )
6026      jQuery(this).addClass(class_prefix+'0');
6027    else
6028      jQuery(this).addClass(class_prefix+'1');
6029  });
6030}
6031
6032if ( typeof(js_reload_current_page) != 'function' ) {
6033	function js_reload_current_page() {
6034		document.location.href = (document.location.href).replace(/#[^#]*$/i,'');
6035	}
6036}
6037
6038function js_prettyphoto_close() {
6039  jQuery.prettyPhoto.close();
6040  jQuery(document).off('keyup');
6041  return false;
6042}
6043
6044function js_print_page(elem) {
6045	window.print();
6046	return false;
6047}
6048//------------------------------------
6049function js_prettyPhoto_tos_init() {
6050	jQuery('body').on('click', 'a.prettyPhoto_tos, a.prettyPhoto_tos_custom', function(event) {
6051		event.preventDefault();
6052
6053		if (typeof js_custom_func_tos_nonsef_url !== 'function') {
6054			tos_nonsef_url = js_global_live_site +'/index2.php?option=com_content&task=blogcategory&id=98&Itemid=1419&no_html=1';
6055		} else {
6056			tos_nonsef_url = js_custom_func_tos_nonsef_url();
6057		}
6058
6059		if (typeof js_CS_Config_gdpr_agree_info_custom_part_lang !== 'undefined' && typeof js_CS_Config_gdpr_agree_info_custom_part_lang.url !== 'undefined') {
6060			if (jQuery(event.target).hasClass('prettyPhoto_tos_custom')) {
6061				tos_nonsef_url = js_global_live_site + js_CS_Config_gdpr_agree_info_custom_part_lang.url;
6062			}
6063		}
6064
6065		jQuery.get(tos_nonsef_url, function (res) {
6066			jQuery(event.target).parent().stopAjaxLoader();
6067
6068			var resElem = jQuery('<div />').html(res);
6069			var titleElem = resElem.find('.contentheading :header:first');
6070			var vexData = {
6071				afterOpen: function(vexContent) {
6072					vexContent
6073						.find('.vex-close').css('right', '20px')
6074						.end()
6075						.closest('.vex').addClass('vex-tos');
6076				}
6077			};
6078			if(typeof js_Config_blog !== 'undefined' && js_Config_blog) {
6079				var titleHeading = resElem.find('.title').text();
6080				var inputHtml = jQuery(resElem);
6081				inputHtml.find('.article_preview').removeClass('article_preview_default_blog_system');
6082				inputHtml.find('.text_wrap .title').remove();
6083				inputHtml.find('.img_wrap').remove();
6084				vexData.title = titleHeading;
6085				vexData.input = inputHtml.html();
6086			} else if (titleElem.length) {
6087				vexData.title = titleElem.text();
6088				vexData.input = jQuery('<div />').append(jQuery('.contentheading', res).remove().end()).html();
6089
6090			} else {
6091				vexData.input = resElem.html();
6092			}
6093
6094			js_function_vex_open(vexData);
6095		});
6096	});
6097
6098	return false;
6099}
6100
6101function js_prettyphoto_newsletter() {
6102	// prettyPhoto_newsletter
6103	if(typeof js_Config_checkout_newsletter_inverse_checkbox !== 'undefined' && js_Config_checkout_newsletter_inverse_checkbox) {
6104		var newsletter_tooltip = js_newsletter_tooltip_inverse;
6105	} else {
6106		var newsletter_tooltip = js_newsletter_tooltip;
6107	}
6108	jQuery('body').on("mouseenter", ".prettyPhoto_newsletter", function () {
6109		if (!jQuery(this).hasClass("tooltipstered")) {
6110			jQuery(this).tooltipster({
6111				theme: "tooltipster-gdpr prettypPhoto_newsletter",
6112				contentAsHTML: true,
6113				trackTooltip: true,
6114				trackOrigin: true,
6115				content: newsletter_tooltip,
6116				trigger: "hover",
6117				selfDestruction: true
6118			}).tooltipster('open');
6119		}
6120	}).on("mouseenter", "#club_card_val_div #club_card_field", function () {
6121		if (!jQuery(this).hasClass("tooltipstered")) {
6122			jQuery(this).tooltipster({
6123				theme: "tooltipster-gdpr",
6124				contentAsHTML: true,
6125				trackTooltip: true,
6126				trackOrigin: true,
6127				content: js_lang_shuch_club_card_text,
6128				trigger: "hover",
6129				selfDestruction: true
6130			}).tooltipster('open');
6131		}
6132	});
6133
6134}
6135
6136function js_prettyphoto_gdpr_init() {
6137
6138	jQuery('body').on("mouseenter", "a.prettyPhoto_gdpr", function () {
6139		if (!jQuery(this).hasClass("tooltipstered")) {
6140			var text = js_gdpr_tooltip;
6141			if( jQuery(this).hasClass("custom_text_reg") ) {
6142				text = js_gdpr_tooltip_reg;
6143			}
6144			if( !jQuery(this).hasClass("no_hover") ) {
6145				jQuery(this).tooltipster({
6146					theme: "tooltipster-gdpr",
6147					contentAsHTML: true,
6148					trackTooltip: true,
6149					trackOrigin: true,
6150					content: text,
6151					trigger: "hover",
6152					selfDestruction: true
6153				}).tooltipster('open');
6154			}
6155
6156		}
6157	}).off("click", "a.prettyPhoto_gdpr").on('click', 'a.prettyPhoto_gdpr', function(event) {
6158		event.preventDefault();
6159
6160		tos_nonsef_url = js_global_live_site +'/index2.php?option=com_content&task=blogcategory&id=4&Itemid=4&no_html=1';
6161		if( jQuery(this).hasClass("custom_text_reg") ) {
6162			tos_nonsef_url = js_global_live_site +'/index2.php?option=com_content&task=blogcategory&id=214&Itemid=1684&no_html=1';
6163		}
6164		if( jQuery(this).hasClass("custom_text_notify") ) {
6165			tos_nonsef_url += js_global_live_site +'/index2.php?option=com_content&task=blogcategory&id=215&Itemid=1685&no_html=1';
6166		}
6167
6168		jQuery.get(tos_nonsef_url, function (res) {
6169			jQuery(event.target).parent().stopAjaxLoader();
6170
6171			var resElem = jQuery('<div />').html(res);
6172			var titleElem = resElem.find('.contentheading :header:first');
6173			var vexData = {
6174				afterOpen: function(vexContent) {
6175					vexContent
6176						.find('.vex-close').css('right', '20px')
6177						.end()
6178						.closest('.vex').addClass('vex-tos');
6179				}
6180			};
6181
6182			if(typeof js_Config_blog !== 'undefined' && js_Config_blog) {
6183				var titleHeading = resElem.find('.title').text();
6184				var inputHtml = jQuery(resElem);
6185				inputHtml.find('.article_preview').removeClass('article_preview_default_blog_system');
6186				inputHtml.find('.text_wrap .title').remove();
6187				inputHtml.find('.img_wrap').remove();
6188				vexData.title = titleHeading;
6189				vexData.input = inputHtml.html();
6190			} else if (titleElem.length) {
6191				vexData.title = titleElem.text();
6192				vexData.input = jQuery('<div />').append(jQuery('.contentheading', res).remove().end()).html();
6193			} else {
6194				vexData.input = resElem.html();
6195			}
6196
6197			js_function_vex_open(vexData);
6198		});
6199	});
6200
6201	return false;
6202}
6203
6204function js_login_register_module_set(mod_class) {
6205
6206	if (typeof(js_global_user_info) == "undefined" || js_global_user_info.name == "" || jQuery('body.admin_content').length)
6207		return;
6208
6209	var module_class = typeof(mod_class) != 'undefined' ? mod_class : '.mp_id10714';
6210
6211	// JAN user credit info
6212	var user_credits = (typeof js_global_user_info.ucri !== "undefined") ? '<span class="user_credits_info">&nbsp;('+js_global_user_info.ucri+' kreditov)</span>' : '';
6213
6214	var href_lang = {
6215		'sk': '/sprava-uctu/',
6216		's2': '/sprava-uctu/',
6217		's3': '/sprava-uctu/',
6218		'cz': '/udrzba-uctu/',
6219		'c2': '/udrzba-uctu/',
6220		'en': '/account-details/',
6221		'de': '/account-details/',
6222		'at': '/account-details/',
6223		'pl': '/zarzadzanie-kontem/',
6224		'hu': '/szamlazas-reszletek/',
6225		'si': '/nastavitve-racuna/',
6226		'ro': '/drept-de-sine/',
6227		'ru': '/upravlenyie-utsheta/',
6228		'hr': '/uredivanje-racuna/'
6229	};
6230
6231	var final_lang_manage_account = (typeof js_lang_manage_account !== "undefined") ? js_lang_manage_account : 'Správa Účtu';
6232    var final_href = (typeof href_lang[js_get_lang] !== "undefined") ? href_lang[js_get_lang] : '/sprava-uctu/';
6233    var final_lang_logout = (typeof js_lang_account_logout !== "undefined") ? js_lang_account_logout : 'Odhlásiť';
6234
6235	jQuery(module_class+' .registration').attr('href', final_href).html('<span>' + final_lang_manage_account + '</span>' + user_credits);
6236	jQuery(module_class+' .login').addClass('no_content_design_link').attr('href', '/index.php?option=logout').html('<span>' + final_lang_logout + '</span>');
6237}
6238
6239// type: 0 = native, 1 = shop.browse, 2 = product_snapshot
6240function showFullPriceInfo(myself, sku) {
6241	var type = 0;
6242	var target = null;
6243	if (jQuery(myself).parent().parent().hasClass('shop-category-product')) {
6244		target = jQuery(myself).parent().siblings(".full_price_info");
6245		type = 1;
6246	}
6247	else {
6248		target = jQuery(myself).siblings(".full_price_info");
6249		type = 2;
6250	}
6251
6252	var check = (target.length == 0);
6253
6254	if(check) {
6255		switch (type) {
6256			case 1:
6257				jQuery(myself).parent().parent().append('<div class="full_price_info"></div>');
6258				break;
6259			case 2:
6260				jQuery(myself).parent().append('<div class="full_price_info"></div>');
6261				break;
6262		}
6263		jQuery.post('/includes/system.cs_lib.ajax.php?ajax_call=1&use_sef=1&option=com_shop&ajax_func=get_full_price_info', {productSku: sku}, function (res) {
6264			var data = JSON.parse(res);
6265
6266			var stringData = '';
6267			jQuery.each(data, function(key, value) {
6268				stringData += '<div class="full_price_info_price">' + key + ':<span class="full_price_info_value">' + value + '</span></div>';
6269			});
6270			jQuery(myself).parent().parent().find('.full_price_info').html(stringData);
6271		});
6272	}
6273}
6274
6275
6276
6277// on ready
6278jQuery(function() {
6279	js_sudo_slider_ios_fix();
6280    js_sudo_slider_sudo_href_fix();
6281
6282	var $nivoSlider = jQuery('.nivoSlider');
6283
6284	jQuery(window).on("blur", function() {
6285		if($nivoSlider.length > 0) {
6286			$nivoSlider.each(function() {
6287				if(typeof(jQuery(this).data('nivoslider')) !== 'undefined' && document.hidden) {
6288					jQuery(this).data('nivoslider').stop();
6289				}
6290			});
6291		}
6292	}).on("focus", function() {
6293		if($nivoSlider.length > 0) {
6294			$nivoSlider.each(function() {
6295				if(typeof(jQuery(this).data('nivoslider')) !== 'undefined') {
6296					if ( typeof js_Config_in_viewport_optimalization !== 'undefined' && js_Config_in_viewport_optimalization && typeof isElementInView === 'function' ) {
6297						if ( isElementInView(jQuery(this)) ) {
6298							jQuery(this).data('nivoslider').start();
6299						}
6300					} else if ( jQuery(this).is(':in-viewport') ) {
6301						jQuery(this).data('nivoslider').start();
6302					}
6303				}
6304			});
6305		}
6306	}).on("scroll", function() {
6307		if($nivoSlider.length > 0) {
6308			$nivoSlider.each(function() {
6309				if(typeof(jQuery(this).data('nivoslider')) !== 'undefined') {
6310					if ( typeof js_Config_in_viewport_optimalization !== 'undefined' && js_Config_in_viewport_optimalization && typeof isElementInView === 'function' ) {
6311						if ( isElementInView(jQuery(this)) ) {
6312							jQuery(this).data('nivoslider').start();
6313						} else {
6314							jQuery(this).data('nivoslider').stop();
6315						}
6316					} else {
6317						if(jQuery(this).is(':in-viewport')) {
6318							jQuery(this).data('nivoslider').start();
6319						} else {
6320							jQuery(this).data('nivoslider').stop();
6321						}
6322					}
6323				}
6324			});
6325		}
6326	});
6327
6328	jQuery('td.shop_addtocart_advanced_attribute_availability').on('click', function() {
6329		var newClass = jQuery(this).attr('class').split(' ')[1];
6330		jQuery('.shop_product_availability_value').attr('class', 'shop_product_availability_value ' + newClass);
6331	});
6332
6333  js_login_register_module_set(); // nastavenie linkov pre modul prihlasenie
6334
6335  // make active menu
6336  jQuery('.mainlevel-nav li a, .mainlevel-nav li ul li a, .mainlevel-nav li ul li ul li a').removeClass('cms_active_menu');
6337
6338	jQuery('.mainlevel-nav li a, .mainlevel-nav li ul li a, .mainlevel-nav li ul li ul li a, .module_cont_custmenu li a').each(function () {
6339		if (typeof (js_global_live_site_sef) !== 'undefined' && js_global_live_site_sef === jQuery(this).attr('href')) {
6340				jQuery(this).addClass('cms_active_menu');
6341				if (jQuery(this).hasClass('mi_u')) {
6342					jQuery(this).addClass('active');
6343					jQuery(this).parent().addClass('active');
6344				}
6345		}
6346	});
6347
6348	if (!(typeof (categ_add_to_cart_unsaleable_poshy_disabled) !== 'undefined' && categ_add_to_cart_unsaleable_poshy_disabled == '1') && typeof (cms_js_lang_cart_product_is_unsaleable_msg) !== 'undefined') {
6349		jQuery(document).on('mouseenter click', '.categ_add_to_cart_unsaleable', function (event) {
6350//          if (!jQuery(this).hasClass("tooltipstered")) {
6351			var $currentTarget = jQuery(event.currentTarget);
6352			var $elemWrap = $currentTarget.closest('tr');
6353			if ($elemWrap.find('input.product_quantity').val() > 0 || $currentTarget.hasClass('categ_add_to_cart_unsaleable')) {
6354				jQuery(this).tooltipster({
6355					theme          : "tooltipster-gdpr",
6356					contentAsHTML  : true,
6357					trackTooltip   : true,
6358					trackOrigin    : true,
6359					content        : cms_js_lang_cart_product_is_unsaleable_msg,
6360					selfDestruction: true
6361				}).tooltipster('open');
6362			}
6363//          }
6364		});
6365		jQuery(document).on('mouseout', '.categ_add_to_cart_unsaleable', function (event) {
6366			var $this = jQuery(this);
6367			if ($this.hasClass('tooltipstered')) {
6368				$this.tooltipster('hide');
6369			}
6370			jQuery(".tooltipstered").tooltipster('destroy');
6371		});
6372	}
6373	// product size table preview init
6374	if (typeof js_prod_size_table_dir !== 'undefined' && js_prod_size_table_dir != '' && jQuery('.shop_page_class_shop_product_details').length > 0) {
6375		jQuery('.size-table-img').click(function (event) {
6376			event.preventDefault();
6377			var img = new Image();
6378			img.src = this.href;
6379			js_function_vex_open({
6380				input: img.outerHTML,
6381				className: 'vex-cs vex-size-table-img',
6382			});
6383		});
6384	}
6385
6386	/**
6387	 * Scroll to size table || open size table in vex
6388	 */
6389	if (typeof js_Config_product_size_table !== 'undefined' && js_Config_product_size_table && jQuery('.size-table-link-button').length > 0) {
6390		jQuery('#mainmiddle_container').on('click', '.size-table-link-button', function () {
6391			if (typeof js_Config_product_size_table_in_vex !== 'undefined' && js_Config_product_size_table_in_vex) {
6392
6393				var requestData = {
6394					productId: jQuery('.flypage-cart input[name="product_id"]').val()
6395				};
6396
6397				if (typeof requestData.productId === 'undefined') {
6398					return;
6399				}
6400
6401				new AjaxRequest(requestData)
6402					.setController('Product')
6403					.setAction('getProductSizeTableHtml')
6404					.onSuccess(function (response) {
6405						vex.open({
6406							content: response.data.html,
6407							className: 'vex-cs html_size_table'
6408						});
6409					})
6410					.onError(function (response) {
6411						//console.log(response);
6412					})
6413					.send();
6414			} else {
6415
6416				let sizeTable = jQuery('.size_chart_html_table');
6417
6418				if (config('js_Config_product_tabs_configuration')) {
6419					Object.entries(js_Config_product_tabs_configuration).forEach(function (val) {
6420						if (val[1].elements.includes('Size_Table')) {
6421							let tabId = val[0];
6422							let tabHeader = jQuery('.tabHeaders label[for="tab' + tabId + '"]');
6423							let tabInput = jQuery('#tabsContainer input#tab' + tabId);
6424
6425							if (tabHeader.length > 0 && tabInput.length > 0 && tabInput.prop('checked') !== true) {
6426								tabHeader.trigger('click');
6427								sizeTable = tabHeader;
6428							}
6429						}
6430					})
6431				}
6432
6433				var sizeTableTopOffset = sizeTable.offset().top;
6434
6435				if (jQuery('body').hasClass('fixed_header') || jQuery('body').hasClass('g_fixed_header') || is_responsive()) {
6436					sizeTableTopOffset -= parseFloat(jQuery('#header_container').css('height'));
6437				}
6438
6439				jQuery('html,body').animate({
6440					scrollTop: sizeTableTopOffset
6441				}, 300);
6442			}
6443		});
6444	}
6445
6446	// hover nad pexf name filter
6447  jQuery('.pexf_container')
6448	.on("mouseenter", function () {
6449		jQuery(this).find('.pexf_name:first').addClass('hover');
6450	})
6451	.on("mouseleave", function () {
6452		jQuery(this).find('.pexf_name:first').removeClass('hover');
6453	});
6454
6455	// compare page - compare table multivalue height init
6456	jQuery('.product-compare-table .sub_group-params .param-line').each(function () {
6457		jQuery(this).find('.param-value').height(jQuery(this).outerHeight());
6458	});
6459
6460	js_prettyphoto_gdpr_init();
6461	js_prettyphoto_newsletter();
6462});
6463
6464if (typeof js_Config_parser_enabled !== 'undefined' && js_Config_parser_enabled) {
6465	window.addEventListener("load", function () {
6466		var unavailText;//
6467		if (jQuery('.flypage-image').length && jQuery('.unavailable_product .shop_page_class_shop_product_details').length) {
6468			if (jQuery('.oos2pu_product .shop_page_class_shop_product_details').length) {
6469				unavailText = jQuery('<span class="prod_unavailable_title">' + js_lang_phpshop_product_oos2pu + '</span>');
6470			} else {
6471				unavailText = jQuery('<span class="prod_unavailable_title">' + js_lang_phpshop_product_unavailable + '</span>');
6472			}
6473			jQuery('.flypage-image').append(unavailText);
6474		}
6475	});
6476} else {
6477	jQuery(function () {
6478		// produkt trvalo nedostupny
6479		var unavailText;
6480		if (jQuery('.unavailable_product .shop_page_class_shop_product_details').length) {
6481			if (jQuery('.oos2pu_product .shop_page_class_shop_product_details').length) {
6482				unavailText = jQuery('<span class="prod_unavailable_title">' + js_lang_phpshop_product_oos2pu + '</span>');
6483			} else {
6484				unavailText = jQuery('<span class="prod_unavailable_title">' + js_lang_phpshop_product_unavailable + '</span>');
6485			}
6486			jQuery('.flypage-image').append(unavailText);
6487		}
6488	});
6489}
6490
6491// overovanie tel čísla vo formulari
6492function formTelVerify() {
6493	var phone = jQuery('#phone_1_field');
6494	var phonelabel = jQuery('#phone_1_div');
6495
6496	if ( phone.closest('#materialDesignRegistration').length ) {
6497		return;
6498	}
6499
6500	if(phone.length > 0 ){
6501// 		formTelVerifyColorSetter(phone, phonelabel);
6502
6503		if( typeof js_CS_Config_change_input_to_button !== 'undefined' && js_CS_Config_change_input_to_button ) {
6504			phone.on('keyup', function() {
6505				formTelVerifyColorSetter(phone, phonelabel);
6506			})
6507			.on('blur', function() {
6508				formTelVerifyColorSetter(phone, phonelabel);
6509			})
6510			.parents('form:first').find('button.button').on('click', function() {
6511				formTelVerifyMessageSetter(phone, formTelVerifyColorSetter(phone, phonelabel), true);
6512			});
6513		} else {
6514			phone.on('keyup', function() {
6515				formTelVerifyColorSetter(phone, phonelabel);
6516			})
6517			.on('blur', function() {
6518				formTelVerifyColorSetter(phone, phonelabel);
6519			})
6520			.parents('form:first').find('input.button').on('click', function() {
6521				formTelVerifyMessageSetter(phone, formTelVerifyColorSetter(phone, phonelabel), true);
6522			});
6523		}
6524
6525	}
6526}
6527
6528function formTelVerifyMessageSetter (phone, errorCode, showAlert) {
6529	if (typeof showAlert === 'undefined') {
6530		showAlert = false;
6531	}
6532
6533	if (typeof js_get_lang === 'undefined') {
6534		js_get_lang = 'sk';
6535	}
6536
6537	if ( is_cs_user('new_phone_validation') && typeof js_CS_Config_new_phone_validation !== 'undefined' && js_CS_Config_new_phone_validation ) {
6538		var js_phone_max_length = {
6539			'sk': 'Minimálne 6 číslic.',
6540			's2': 'Minimálne 6 číslic.',
6541			's3': 'Minimálne 6 číslic.',
6542			'cz': 'Minimálně 6 číslic.',
6543			'en': 'min 6 digits.',
6544			'de': 'mindestens 6 Stellen.',
6545			'hu': 'minimum 6 számjegy.',
6546			'pl': 'minimum 6 cyfr.',
6547			'ro': 'minimă de 6 cifre.',
6548			'ru': 'минимум 6 цифр.'
6549		};
6550	} else {
6551		var js_phone_max_length = {
6552			'sk': 'Minimálne 9 znakov.',
6553			's2': 'Minimálne 9 znakov.',
6554			's3': 'Minimálne 9 znakov.',
6555			'cz': 'minimálně 9 znaků.',
6556			'en': 'min 9 characters.',
6557			'de': 'mindestens 9 Zeichen.',
6558			'hu': 'minimum 9 karakter.',
6559			'pl': 'minimum 9 znaków.',
6560			'ro': 'minimă de 9 caractere.',
6561			'ru': 'минимум 9 символов.'
6562		};
6563	}
6564
6565	var js_phone_correct = {
6566		'sk': 'Prosím vylpňte správne tel. kontakt.',
6567		's2': 'Prosím vylpňte správne tel. kontakt.',
6568		's3': 'Prosím vylpňte správne tel. kontakt.',
6569		'cz': 'Prosím vylpňte správne tel. kontakt.',
6570		'en': 'Please insert a phone number in correct form.',
6571		'de': 'Bitte füllen Sie das richtige Telefon. Kontakt.',
6572		'pl': 'Proszę wypełnić w odpowiedniej telefonu kontakt.',
6573		'hu': 'Kérjük, töltse ki a megfelelő telefont érintkezés.',
6574		'ru': 'Пожалуйста, заполните корректно телефону контакт.',
6575		'ro': 'Vă rugăm să completați în telefon corect contact.'
6576	};
6577
6578	var msg = (typeof js_lang_phone_correct_msg !== 'undefined' ? js_lang_phone_correct_msg : (typeof js_phone_correct[js_get_lang] !== 'undefined' ? js_phone_correct[js_get_lang] : 'Please insert a phone number in correct form.'));
6579
6580	var errorMessage = '';
6581	var errspan = jQuery('<span class="tel_error" style="color:#FF0000;font-size:11px;"></span>');
6582
6583	switch (errorCode) {
6584		case 1:
6585			errorMessage = (typeof js_phone_max_length[js_get_lang] !== 'undefined' ? js_phone_max_length[js_get_lang] : js_phone_max_length.en);
6586			break;
6587		case 2:
6588			errorMessage = msg;
6589			break;
6590		case 3:
6591			errorMessage = (typeof js_phone_max_length[js_get_lang] !== 'undefined' ? js_phone_max_length[js_get_lang] : js_phone_max_length.en) + "\n" + msg;
6592			break;
6593		default:
6594			errorMessage = '';
6595			break;
6596	}
6597
6598	if (showAlert && errorMessage.length) {
6599		//alert(errorMessage);
6600	} else {
6601		errspan.text(errorMessage).insertAfter(phone);
6602	}
6603}
6604
6605function formTelVerifyColorSetter (phone, phonelabel) {
6606	var phoneval = jQuery.trim(phone.val());
6607	// phone_validation
6608	if ( is_cs_user('new_phone_validation') && typeof js_CS_Config_new_phone_validation !== 'undefined' && js_CS_Config_new_phone_validation ) {
6609		var errorCode = 0;
6610
6611		if (!is_correct_length_phone_number(phoneval)) {
6612			errorCode += 1;
6613		}
6614
6615		if (!is_valid_phone_number(phoneval)) {
6616			errorCode += 2;
6617		}
6618	} else {
6619		var badChar  = phoneval.match(/[^0-9+\-–\/ ]/) != null;
6620		var errorCode = 0;
6621		errorCode += (phoneval.length < 9) ? 1 : 0;
6622		errorCode += (badChar) ? 2 : 0;
6623	}
6624
6625	jQuery('span.tel_error').remove();
6626	if (!errorCode)
6627		phonelabel.css('color', '#000');
6628	else {
6629		phonelabel.css('color', '#f00');
6630		formTelVerifyMessageSetter (phone, errorCode);
6631	}
6632	return errorCode;
6633}
6634
6635function formTinVerify() {
6636	var tinField = jQuery('#company_tin_id_field');
6637	var tinLabel = jQuery('#company_tin_id_div');
6638
6639	var tinLength = {
6640		'sk': 12,
6641		'cz': 12,
6642		'hu': 10
6643	};
6644
6645	if ( js_get_lang === 'undefined' ) {
6646		js_get_lang = 'sk';
6647	}
6648
6649	if ( tinField.length > 0 ) {
6650
6651		if ( tinLength[js_get_lang] !== 'undefined' ) {
6652			tinField.prop('maxlength', tinLength[js_get_lang]);
6653		}
6654
6655		tinField.on('keyup', function() {
6656			formTinVerifyColorSetter(tinField, tinLabel);
6657		});
6658
6659		tinField.on('blur', function() {
6660			formTinVerifyColorSetter(tinField, tinLabel);
6661		})
6662			.parents('form:first').find('input.button').on('click', function() {
6663			formTelVerifyMessageSetter(tinField, formTinVerifyColorSetter(tinField, tinLabel), true);
6664		});
6665	}
6666}
6667
6668function formVatVerify( vatField ) {
6669	if ( !is_cs_user('rxi215') ) {
6670		return false;
6671	}
6672
6673	if ( typeof js_get_lang === 'undefined' ) {
6674		js_get_lang = 'sk';
6675	}
6676
6677	var vatRegex = {
6678		'SVK': '^[0-9]{9,10}$',
6679		'CZE': '^[0-9]{9}$|^CZ[0-9]{8}$',
6680		'HUN': '^[0-9]{10,11}$',
6681		'BEL': '^[0-9]{11}$|^0[0-9]{9}$',
6682		'BGR': '^[0-9]{10}$|^[0-9]{9}$|^307[0-9]{7}$|^[0-9]{13}$',
6683		'CY': '^[09]{1}[0-9]{7}[A-Z]{1}$|^[13459]{1}[0-9]{7}[A-Z]{1}$',
6684		'HRV': '^[0-9]{11}$|^[0-9]{11}$',
6685		'DNK': '^[0-9]{10}$|^DK[0-9]{8}$',
6686		'EST': '^[0-9]{11}$|^[0-9]{8}$',
6687		'FRA': '^[0123]{1}[0-9]{12}$|^[0-9]{9}$',
6688		'FIN': '^[0-9]{6}[A+-]{1}[0-9]{3}[A-Z0-9]{1}$|^[0-9]{7}-[0-9]{1}$',
6689		'HOL': '^[0-9]{9}$',
6690		'LIT': '^[0-9]{11}$|^[0-9]{9}$',
6691		'LVA': '^[0-9]{11}$|^[0-9]{11}$',
6692		'LUX': '^[0-9]{13}$|^[0-9]{11}$',
6693		'DEU': '^[0-9]{11}$',
6694		'POR': '^[0-9]{9}$',
6695		'PLN': '^[0-9]{10,11}$',
6696		'AUT': '^[0-9]{9}$',
6697		'ROM': '^[0-9]{13}$|^[0-9]{2,10}$',
6698		'SVN': '^[0-9]{8}$',
6699		'ITA': '^[A-Z]{6}[0-9]{2}[A-Z]{1}[0-9]{2}[A-Z]{1}[0-9]{3}[A-Z]{1}$|^[0-9]{11}$',
6700		'ESP': '^[LKMXYZ0-9]{1}[0-9]{7}[A-Z]{1}$|^[ABCDEFGHJNPQRSUVW]{1}[0-9]{7}[A-Z0-9]{1}$',
6701		'SWE': '^[0-9]{10}$',
6702		'MT': '^[0-9]{7}[MGAPLHBZ]{1}$|^[0-9]{9}$|^[0-9]{9}$',
6703		'EL': '^[0-9]{9}$',
6704		'IE': '^[0-9]{7}[A-z]{1,2}$|^[0-9]{7}[A-Z]{1,2}$',
6705	};
6706
6707	var vatCountryCode = '';
6708	if ( jQuery('#country').length > 0 ) {
6709		vatCountryCode = jQuery('#country').val();
6710	} else {
6711		vatCountryCode = jQuery('#country_field').val();
6712	}
6713
6714	var vatCheck = false;
6715	if ( vatCountryCode != '' ) {
6716		vatCheck = RegExp(vatRegex[vatCountryCode]).test(jQuery.trim(vatField.val()));
6717	} else {
6718		vatCheck = RegExp(vatRegex.SVK).test(jQuery.trim(vatField.val()));
6719	}
6720	return vatCheck;
6721}
6722
6723function formTinVerifyColorSetter (tinField, tinLabel) {
6724	// tin_validation
6725	if ( typeof js_get_lang === 'undefined' ) {
6726		js_get_lang = 'sk';
6727	}
6728
6729	// TODO: use getTinCountryCode() instead of countryCodes
6730	var countryCodes = {
6731		'SVK': 'SK',
6732		'CZE': 'CZ',
6733		'HUN': 'HU',
6734		'BEL': 'BE',
6735		'BGR': 'BG',
6736		'CY': 'CY',
6737		'HRV': 'HR',
6738		'DNK': 'DK',
6739		'EST': 'EE',
6740		'FRA': 'FR',
6741		'FIN': 'FI',
6742		'HOL': 'NL',
6743		'LIT': 'LT',
6744		'LVA': 'LV',
6745		'LUX': 'LU',
6746		'DEU': 'DE',
6747		'POR': 'PT',
6748		'PLN': 'PL',
6749		'AUT': 'AT',
6750		'ROM': 'RO',
6751		'SVN': 'SI',
6752		'ITA': 'IT',
6753		'ESP': 'ES',
6754		'SWE': 'SE',
6755		'MT': 'MT',
6756		'EL': 'EL',
6757		'IE': 'IE',
6758	};
6759
6760	var tinLength = {
6761		'SK': 12,
6762		'CZ': 12,
6763		'HU': 10,
6764		'BE': 12,
6765		'BG': 12,
6766		'CY': 11,
6767		'HR': 13,
6768		'DK': 13,
6769		'EE': 11,
6770		'FR': 14,
6771		'FI': 10,
6772		'NL': 14,
6773		'LT': 14,
6774		'LV': 13,
6775		'LU': 10,
6776		'DE': 11,
6777		'PT': 11,
6778		'PL': 12,
6779		'AT': 11,
6780		'RO': 12,
6781		'SI': 10,
6782		'IT': 13,
6783		'ES': 11,
6784		'SE': 14,
6785		'MT': 10,
6786		'EL': 11,
6787		'IE': 11,
6788	};
6789
6790	var tinCountryCode = '';
6791	var selectedCountryCode = '';
6792	if ( tinField.val().length >= 2 ) {
6793		selectedCountryCode = tinField.val().substring(0,2);
6794		if ( Object.values(countryCodes).indexOf(selectedCountryCode) > -1 ) {
6795			tinCountryCode = selectedCountryCode;
6796		} else {
6797			if ( jQuery('#country').length > 0 ) {
6798				tinCountryCode = countryCodes[jQuery('#country').val()];
6799			} else {
6800				tinCountryCode = countryCodes[jQuery('#country_field').val()];
6801			}
6802		}
6803	} else {
6804		if ( jQuery('#country').length > 0 ) {
6805			tinCountryCode = countryCodes[jQuery('#country').val()];
6806		} else {
6807			tinCountryCode = countryCodes[jQuery('#country_field').val()];
6808		}
6809	}
6810
6811	if ( tinLength[tinCountryCode] !== 'undefined' && tinField.prop('maxlength') != tinLength[tinCountryCode] ) {
6812		tinField.prop('maxlength', tinLength[tinCountryCode]);
6813	}
6814
6815	if (tinField.val().length > tinField.prop('maxlength')) {
6816		tinField.val(tinField.val().substring(0, tinField.prop('maxlength')));
6817	}
6818
6819	var badChar = true;
6820	if (tinCountryCode != '' ) {
6821		badChar = !validTin(tinField.val(), tinCountryCode);
6822	}
6823
6824	jQuery('span.tin_error').remove();
6825	if (!badChar) {
6826		if ( !tinField.parent().hasClass('field') ) {
6827			tinLabel.css('color', '#545454');
6828		}
6829	} else {
6830		if ( !tinField.parent().hasClass('field') ) {
6831			tinLabel.css('color', '#f60');
6832		}
6833		formTinVerifyMessageSetter (tinField, badChar, tinCountryCode);
6834	}
6835	return badChar;
6836}
6837
6838function validTin(tinValue, country) {
6839	country = typeof country === 'undefined' ? 'SK' : getTinCountryCode(country);
6840
6841	var tinRegex = {
6842		'SK': '^SK[0-9]{10}$',
6843		'CZ': '^CZ[0-9]{8,10}$',
6844		'HU': '^HU[0-9]{8}$',
6845		'BE': '^BE[01]{1}[0-9]{9}$',
6846		'BG': '^BG[0-9]{9,10}$',
6847		'CY': '^CY[0-9]{8}[A-Z]{1}$',
6848		'HR': '^HR[0-9]{11}$',
6849		'DK': '^DK\\d{2} \\d{2} \\d{2} \\d{2}$',
6850		'EE': '^EE[0-9]{9}$',
6851		'FR': '^FR[A-Z0-9]{2} [0-9]{9}$',
6852		'FI': '^FI[0-9]{8}$',
6853		'NL': '^NL[A-Z0-9+*]{12}$',
6854		'LT': '^LT[0-9]{9}$|^LT[0-9]{12}$',
6855		'LV': '^LV[0-9]{11}$',
6856		'LU': '^LU[0-9]{8}$',
6857		'DE': '^DE[0-9]{9}$',
6858		'PT': '^PT[0-9]{9}$',
6859		'PL': '^PL[0-9]{10}$',
6860		'AT': '^ATU[0-9]{8}$',
6861		'RO': '^RO[0-9]{2,10}$',
6862		'SI': '^SI[0-9]{8}$',
6863		'IT': '^IT[0-9]{11}$',
6864		'ES': '^ES[A-Z]{1}\\d{7}[A-Z]{1}$|^ES[A-Z0-9]{1}\\d{7}[A-Z]{1}$|^ES[A-Z]{1}\\d{7}[A-Z0-9]{1}$',
6865		'SE': '^SE[0-9]{12}$',
6866		'MT': '^MT[0-9]{8}$',
6867		'EL': '^EL[0-9]{9}$',
6868		'IE': '^IE[0-9]{1}[A-Z0-9+*]{1}[0-9]{5}[A-Z]{1}$|^IE[0-9]{7}WI$',
6869		'UA': '^[0-9]{10}$',
6870	};
6871
6872	return RegExp(tinRegex[country]).test(jQuery.trim(tinValue));
6873}
6874
6875function getTinCountryCode(country) {
6876	if (country.length == 2) {
6877		return country;
6878	}
6879
6880	var countryCodes = {
6881		'SVK': 'SK',
6882		'CZE': 'CZ',
6883		'HUN': 'HU',
6884		'BEL': 'BE',
6885		'BGR': 'BG',
6886		'CY': 'CY',
6887		'HRV': 'HR',
6888		'DNK': 'DK',
6889		'EST': 'EE',
6890		'FRA': 'FR',
6891		'FIN': 'FI',
6892		'HOL': 'NL',
6893		'LIT': 'LT',
6894		'LVA': 'LV',
6895		'LUX': 'LU',
6896		'DEU': 'DE',
6897		'POR': 'PT',
6898		'PLN': 'PL',
6899		'AUT': 'AT',
6900		'ROM': 'RO',
6901		'SVN': 'SI',
6902		'ITA': 'IT',
6903		'ESP': 'ES',
6904		'SWE': 'SE',
6905		'MLT': 'MT',
6906		'GRC': 'EL',
6907		'IRL': 'IE',
6908		'UKR': 'UA',
6909	};
6910
6911	return countryCodes[country];
6912}
6913
6914function formTinVerifyMessageGetHint ( countryCode ) {
6915	// TODO: use getTinCountryCode() instead of countryCodes
6916	var countryCodes = {
6917		'SVK': 'SK',
6918		'CZE': 'CZ',
6919		'HUN': 'HU',
6920		'BEL': 'BE',
6921		'BGR': 'BG',
6922		'CY': 'CY',
6923		'HRV': 'HR',
6924		'DNK': 'DK',
6925		'EST': 'EE',
6926		'FRA': 'FR',
6927		'FIN': 'FI',
6928		'HOL': 'NL',
6929		'LIT': 'LT',
6930		'LVA': 'LV',
6931		'LUX': 'LU',
6932		'DEU': 'DE',
6933		'POR': 'PT',
6934		'PLN': 'PL',
6935		'AUT': 'AT',
6936		'ROM': 'RO',
6937		'SVN': 'SI',
6938		'ITA': 'IT',
6939		'ESP': 'ES',
6940		'SWE': 'SE',
6941		'MT': 'MT',
6942		'EL': 'EL',
6943		'IE': 'IE',
6944	};
6945
6946	var tinAllowedFormat = {
6947		'SK': 'SK1234567890',
6948		'CZ': 'CZ1234567890',
6949		'HU': 'HU12345678',
6950		'BE': 'BE0999999999, BE1999999999',
6951		'BG': 'BG999999999, BG9999999999',
6952		'CY': 'CY99999999X',
6953		'HR': 'HR99999999999',
6954		'DK': 'DK99 99 99 99',
6955		'EE': 'EE999999999',
6956		'FR': 'FRXX 999999999',
6957		'FI': 'FI99999999',
6958		'NL': 'NLXXXXXXXXXXXX',
6959		'LT': 'LT999999999, LT999999999999',
6960		'LV': 'LV99999999999',
6961		'LU': 'LU99999999',
6962		'DE': 'DE999999999',
6963		'PT': 'PT999999999',
6964		'PL': 'PL9999999999',
6965		'AT': 'ATU99999999',
6966		'RO': 'RO999999999',
6967		'SI': 'SI99999999',
6968		'IT': 'IT99999999999',
6969		'ES': 'ESX9999999X',
6970		'SE': 'SE999999999999',
6971		'MT': 'MT99999999',
6972		'EL': 'EL999999999',
6973		'IE': 'IE9S99999L, IE9999999WI'
6974	};
6975
6976	if ( countryCode in tinAllowedFormat ) {
6977		return tinAllowedFormat[countryCode];
6978	} else {
6979		if ( jQuery('#country').length > 0 ) {
6980			var selectedState = jQuery('#country').val();
6981		} else {
6982			var selectedState = jQuery('#country_field').val();
6983		}
6984
6985		if ( selectedState !== 'undefined' && selectedState in countryCodes ) {
6986			return tinAllowedFormat[countryCodes[selectedState]];
6987		} else {
6988			return tinAllowedFormat.SK;
6989		}
6990	}
6991}
6992
6993function formTinVerifyMessageSetter (tinField, errorCode, countryCode) {
6994	if ( typeof errorCode === 'undefined' ) {
6995		errorCode = false;
6996	}
6997
6998	if ( countryCode === '' ) {
6999		countryCode = 'SK';
7000	}
7001
7002	var errorMessage = '';
7003	var errorSpan = jQuery('<span class="tin_error" style="color:#f60;font-size:11px;"></span>');
7004	if ( errorCode && !tinField.parent().hasClass('field') ) {
7005		errorMessage = js_lang_one_step_checkout_company_tin_expected_format + ': ' + formTinVerifyMessageGetHint(countryCode);
7006		errorSpan.text(errorMessage).insertAfter(tinField);
7007	}
7008}
7009
7010function icoValidation() {
7011	const form = jQuery('form[name="adminForm"]');
7012
7013	if (!form.length) {
7014		return;
7015	}
7016
7017	const icoInput = form.find('input[name="extra_field_1"]');
7018	const icoDiv = form.find('div[id="extra_field_1_div"]');
7019
7020	const icoValidate = function() {
7021		const validatedICO = validateICO(icoInput.val());
7022
7023		icoInput.val(validatedICO.value);
7024		jQuery('span.ico_error').remove();
7025		icoDiv.css('color', '#000');
7026
7027		if (!validatedICO.valid) {
7028			icoDiv.css('color', '#f00');
7029			jQuery('<span class="ico_error" style="color:#FF0000;font-size:11px;">' + (config('js_Config_company_id_format.error') || js_lang_ico_error_validation) + '</span>').insertAfter(icoInput);
7030		}
7031	};
7032
7033	icoInput
7034		.on('blur', icoValidate)
7035		.parents('form:first')
7036		.find('button.button')
7037		.on('click', icoValidate);
7038}
7039
7040// jQuery(function() {
7041jQuery(function () {
7042	formTelVerify();
7043	js_modify_cart_item();
7044	icoValidation();
7045
7046	if ( typeof js_Config_reqistration_company_tin_required !== 'undefined' && js_Config_reqistration_company_tin_required ) {
7047		formTinVerify();
7048	}
7049
7050	// setnutioe do cookie ak som sa do flypage dostal cez shop_browse
7051    jQuery('#product_list').on('click', '.shop-category-product a', function(){
7052        Cookies.set('uWd1XhE4VhMPeRAa', 1, { path: '/', expires: 0.000057 } );
7053    });
7054});
7055
7056function js_modify_cart_item(){
7057
7058	if (typeof modify_cart_item == 'undefined' || jQuery.isEmptyObject(modify_cart_item)) return;
7059
7060	jQuery('input[name="dim_a"]').val(modify_cart_item.dim_a);
7061	jQuery('input[name="dim_b"]').val(modify_cart_item.dim_b);
7062	jQuery('input[name="quantity"]').val(modify_cart_item.dim_qty);
7063	jQuery('input[name="modify_cart_item"]').val(modify_cart_item.cart_item);
7064	jQuery('.prod_dim_box').prepend('<div class="modify_cart">'+js_lang_dynamic_attributes_modify_item+'</div>');
7065}
7066
7067
7068function js_ajax_cart_open_disabled() {
7069	return (jQuery('#m1').hasClass('shop_page_class_shop_cart')
7070			|| jQuery('#checkout_one_step').length);
7071}
7072
7073function switch_browse(elm, toggle) {
7074	var categoryId = jQuery(elm).data('category_id');
7075	if (categoryId === null || typeof categoryId === 'undefined' || categoryId === 'undefined') {
7076		categoryId = typeof js_category_id !== 'undefined' ? js_category_id : 0;
7077	}
7078	var getUrl = "/administrator/components/com_shop/html/shop.browse.ajax.php?ajax_call=1&ajax_func=set_shop_browse_as_listing_toggle&category_id=" + categoryId;
7079
7080	if (typeof toggle !== 'undefined') {
7081		getUrl += "&toggle=" + toggle;
7082	}
7083
7084	jQuery.get(getUrl, function(res) {
7085		if(jQuery.trim(res) == '1') {
7086			location.reload();
7087		}
7088	});
7089}
7090
7091function js_browse_count_control_btn_click (elem, action) {
7092	var input = jQuery(elem).parents('.quantity_wrapper:first').find('.shop-addtocart-quantity-inputbox');
7093	var value = parseInt(input.val());
7094	if (action == 'down' && value > 1) {
7095		input.val(value - 1);
7096	} else if (action == 'up') {
7097		input.val(value + 1);
7098	}
7099}
7100
7101function flypage_img_click(mainImage){
7102	// ak ma shop easyzoom a novy fancybox
7103	if (typeof mainImage !== 'undefined' && mainImage) {
7104		var href = jQuery('.flypage-lightbox-image-a').attr('href');
7105		jQuery('[href="' + href + '"]:not(.flypage-lightbox-image-a)').trigger('click');
7106		return false;
7107	}
7108
7109	var img_count = jQuery('.flypage-image a');
7110	if( img_count.length == 1 ){ // vacsinou TATO(situacia) v template je v .flypage-image jeden obrazok ( hlavny )
7111		jQuery('.flypage-image a').trigger('click');
7112		return false;
7113	}
7114	if( img_count.length > 1 ){ // niekedy v template .flypage-image je viacero obrazkov pri hlavnok a pri lightboxe potom pri kliku na obrazkok nenajde hlavy *alltoys.sk*
7115		jQuery('a.flypage-lightbox-image-a').trigger('click');
7116		return false;
7117	}
7118}
7119
7120function product_3d_image_preview_init(url) {
7121	vex.open({
7122		content: '<iframe src="'+ url +'" id="product_3d_image_preview_iframe" width="800" height="800" allowfullscreen="true" webkitallowfullscreen="true" mozallowfullscreen="true" frameborder="0"></iframe>',
7123		//showCloseButton: true,
7124		//overlayClosesOnClick: true,
7125		className: 'vex vex-cs app_vex_wrap vex_3d_preview_image',
7126	});
7127}
7128
7129function dynamic_shipping_change_country(elem) {
7130	var jElem = jQuery(elem);
7131
7132	if (jElem.hasClass('active')) return;
7133
7134
7135	var dataElem = jElem.closest('.choose_country_btn_wrap').find('.choose_country_btn');
7136	var selectedCountry = jElem.data('active_country');
7137	var countryDiv = jQuery('.flypage_dynamic_shipping_inner.' + selectedCountry);
7138
7139	if (countryDiv.hasClass('selected')) return;
7140
7141	if (!countryDiv.children().length > 0) {
7142		//jQuery(countrySelect).startAjaxLoader();
7143
7144		var requestData = {
7145			productId: dataElem.data('id'),
7146			country: selectedCountry,
7147			price: dataElem.data('price'),
7148			weight: dataElem.data('weight')
7149		};
7150
7151		if (typeof requestData.productId === 'undefined') {
7152			return;
7153		}
7154
7155		new AjaxRequest(requestData)
7156			.setController('Product')
7157			.setAction('getProductDynamicShippingForCountry')
7158			.onSuccess(function (result) {
7159				//jQuery(countrySelect).stopAjaxLoader()
7160				jQuery('.choose_country_item').removeClass('active');
7161				jElem.addClass('active');
7162				jQuery('.choose_country_btn').html(jElem.html());
7163
7164
7165				jQuery('.flypage_dynamic_shipping_inner').removeClass('selected').hide();
7166				countryDiv.html(result.data);
7167				countryDiv.show().addClass('selected');
7168			})
7169			.onError(function (result) {
7170				//jQuery(countrySelect).stopAjaxLoader();
7171			})
7172			.send();
7173	} else {
7174		jQuery('.choose_country_item').removeClass('active');
7175		jElem.addClass('active');
7176		jQuery('.choose_country_btn').html(jElem.html());
7177
7178		jQuery('.flypage_dynamic_shipping_inner').removeClass('selected').hide();
7179		countryDiv.show().addClass('selected');
7180	}
7181}
7182
7183function dynamic_shipping_toggle_class(elem) {
7184	var jElem = jQuery(elem);
7185	jElem.closest('.flypage_dynamic_shipping').addClass('show_more_shippings');
7186}
7187
7188function filterShippingChange(elem) {
7189	var $elem = jQuery(elem);
7190	var name = $elem.attr('name');
7191	var value = $elem.val();
7192
7193	var parent = $elem.closest('.setting');
7194
7195	//dotatocne odstranenie error classy
7196	jQuery('body').removeClass('voucher_delivery_error');
7197
7198	parent.find('.setting_option').removeClass('option_active');
7199	$elem.closest('.setting_option').addClass('option_active');
7200
7201	var params = {};
7202	params[name] = value;
7203
7204	new AjaxRequest({params: params})
7205			.setController('Shipping')
7206			.setAction('setModuleFilterShipping')
7207			.onSuccess(function (result) {
7208				if( typeof result.data.refresh !== 'undefined' && result.data.refresh ) {
7209					// vycisti historiu (inak by duplikovalo requesty z kosika cartAdd, cartUpdate, cartDelete)
7210					if ( window.history.replaceState ) {
7211						window.history.replaceState( null, '', window.location.href );
7212					}
7213
7214					window.location.reload();
7215				}
7216			})
7217			.onError(function (result) {
7218			})
7219			.send();
7220}
7221
7222function changeGiftWrapShippingOption(product_id) {
7223
7224	new AjaxRequest({product_id: product_id})
7225		.setController('Shipping')
7226		.setAction('changeGiftWrapShippingOption')
7227		.onSuccess(function (result) {
7228			if (result.success && result.data.changed) {
7229				jQuery('#bt_diff:first').trigger('change');
7230				changeCheckoutTitleLangForShippingOption(product_id);
7231			}
7232		})
7233		.onError(function () {
7234		})
7235		.send();
7236}
7237
7238function changeCheckoutTitleLangForShippingOption(product_id) {
7239	const checkoutTitleLang = config(`js_Config_module_filter_shipping.internetOrPersonal.giftWrap.${js_get_lang}.${product_id}.checkoutTitleLang`);
7240
7241	if (!checkoutTitleLang) {
7242		return;
7243	}
7244
7245	jQuery('#checkout_one_step_heading').text(checkoutTitleLang);
7246}
7247
7248function showAvailabilityDescription(elem) {
7249	var elem = jQuery(elem);
7250	var productAvailability = elem.data('availability');
7251
7252	elem.tooltipster({
7253		content: productAvailability,
7254	});
7255}
7256
7257function initRotateActiveImages() {
7258	if (typeof js_rotate_active_images === 'object' && typeof js_rotate_active_images_data === 'object') {
7259		js_rotate_active_images.init(js_rotate_active_images_data);
7260
7261		if (typeof sphf !== 'undefined') {
7262			var timeStarted = jQuery.now();
7263			var sphfWait = function() {
7264				var sphfOnBrowseRequestFn = sphf.options.onBrowseRequest;
7265
7266				if (sphf.initialized) {
7267					sphf.options.onBrowseRequest = function() {
7268						if (typeof sphfOnBrowseRequestFn === 'function') {
7269							sphfOnBrowseRequestFn();
7270						}
7271
7272						if (typeof js_rotate_active_images_data === 'object') {
7273							js_rotate_active_images.init(js_rotate_active_images_data);
7274						}
7275					};
7276
7277				} else if (timeStarted + 30000 >= jQuery.now()) {
7278					setTimeout(function() {
7279						sphfWait();
7280
7281					}, 100);
7282				}
7283			};
7284
7285			sphfWait();
7286		}
7287	}
7288}
7289
7290//
7291jQuery(function() {
7292	initRotateActiveImages();
7293
7294	if (typeof js_rotate_active_images_detail_data === 'object') {
7295		js_rotate_active_images_detail.init(js_rotate_active_images_detail_data);
7296	}
7297
7298	var $sideContactForm = jQuery('#sideContactForm');
7299	if ($sideContactForm.length > 0) {
7300		var contactForm = $sideContactForm;
7301
7302		contactForm.find('.sideButton').on({
7303			'click': function() {
7304				contactForm.toggleClass('open');
7305			},
7306			'mouseover': function() {
7307				contactForm.addClass('open');
7308			}
7309		});
7310
7311		contactForm.on('mouseleave', function() {
7312			if(jQuery(this).find('input:focus, textarea:focus').length == 0) {
7313				contactForm.removeClass('open');
7314			}
7315		});
7316
7317		jQuery(document).on('click', function (e) {
7318			var closeWindow = true;
7319
7320			contactForm.find("input[type=text], textarea").each(function() {
7321				if(jQuery(this).val() != '') {
7322					closeWindow = false;
7323				}
7324			});
7325
7326			if (!jQuery(e.target).closest(contactForm).length && closeWindow) {
7327				contactForm.removeClass('open');
7328			}
7329		});
7330	}
7331
7332	var showAvailabilityDescription = typeof js_Config_product_availability_description !== 'undefined' && js_Config_product_availability_description;
7333
7334	if (showAvailabilityDescription) {
7335		var availabilityElements = jQuery('span[class*="shop_product_availability_value"]');
7336
7337		availabilityElements.each(function () {
7338			var $this = jQuery(this);
7339			var availabilityDescription = $this.data('description');
7340
7341			if (availabilityDescription) {
7342				var isProductDetail = $this.closest('.flypage-top').length;
7343				var inModule = $this.closest('.module-navst').length;
7344				var isBrowse = $this.closest('.shop-category-product').length || inModule;
7345				var isBasket = $this.closest('.shop_page_class_shop_cart').length;
7346				var isNsuOrderDetail = $this.closest('.shop_page_class_account_index').length;
7347				var isHomePage = $this.closest('.is_frontpage').length;
7348				var canShowInProductDetail = typeof js_Config_product_availability_description !== 'undefined' ? js_Config_product_availability_description.productDetails : false;
7349				var canShowInBrowse = typeof js_Config_product_availability_description !== 'undefined' ? js_Config_product_availability_description.browse : false;
7350				var canShowInBasket = false;
7351				var canShowInNsuOrderDetail = typeof js_Config_show_product_future_availability !== 'undefined' ? js_Config_show_product_future_availability.nsuOrderDetail : false;
7352
7353				var tooltipsterSettings = typeof availabilityDescriptionSettings !== 'undefined' && availabilityDescriptionSettings ? availabilityDescriptionSettings : null;
7354
7355				if (isProductDetail && canShowInProductDetail) {
7356					var tooltipsterCustomSettings = tooltipsterSettings && availabilityDescriptionSettings.productDetail ? availabilityDescriptionSettings.productDetail : null;
7357					var tooltipsterSide = tooltipsterCustomSettings && tooltipsterCustomSettings.side ? tooltipsterCustomSettings.side : 'right';
7358					var tooltipsterMaxWidth = tooltipsterCustomSettings && tooltipsterCustomSettings.maxWidth ? tooltipsterCustomSettings.maxWidth : 250;
7359
7360					$this.tooltipster({
7361						content: availabilityDescription,
7362						side: tooltipsterSide,
7363						maxWidth: tooltipsterMaxWidth,
7364					});
7365				}
7366
7367				if (isBrowse && canShowInBrowse) {
7368					var tooltipsterCustomSettings = tooltipsterSettings && availabilityDescriptionSettings.browse ? availabilityDescriptionSettings.browse : null;
7369					var tooltipsterSide = tooltipsterCustomSettings && tooltipsterCustomSettings.side ? tooltipsterCustomSettings.side : 'top';
7370					var tooltipsterMaxWidth = tooltipsterCustomSettings && tooltipsterCustomSettings.maxWidth ? tooltipsterCustomSettings.maxWidth : 250;
7371
7372					$this.tooltipster({
7373						content: availabilityDescription,
7374						side: tooltipsterSide,
7375						maxWidth: tooltipsterMaxWidth,
7376					});
7377				}
7378
7379				if ( canShowInBasket && isBasket ) {
7380					var tooltipsterCustomSettings = tooltipsterSettings && availabilityDescriptionSettings.browse ? availabilityDescriptionSettings.browse : null;
7381					var tooltipsterSide = tooltipsterCustomSettings && tooltipsterCustomSettings.side ? tooltipsterCustomSettings.side : 'top';
7382					var tooltipsterMaxWidth = tooltipsterCustomSettings && tooltipsterCustomSettings.maxWidth ? tooltipsterCustomSettings.maxWidth : 250;
7383
7384					$this.tooltipster({
7385						content: availabilityDescription,
7386						side: tooltipsterSide,
7387						maxWidth: tooltipsterMaxWidth,
7388					});
7389				}
7390
7391				if ( canShowInNsuOrderDetail && isNsuOrderDetail ) {
7392					var tooltipsterCustomSettings = tooltipsterSettings && availabilityDescriptionSettings.browse ? availabilityDescriptionSettings.browse : null;
7393					var tooltipsterSide = tooltipsterCustomSettings && tooltipsterCustomSettings.side ? tooltipsterCustomSettings.side : 'top';
7394					var tooltipsterMaxWidth = tooltipsterCustomSettings && tooltipsterCustomSettings.maxWidth ? tooltipsterCustomSettings.maxWidth : 250;
7395
7396					$this.tooltipster({
7397						content: availabilityDescription,
7398						side: tooltipsterSide,
7399						maxWidth: tooltipsterMaxWidth,
7400					});
7401				}
7402			}
7403		});
7404	}
7405
7406	if (typeof phpdebugbar !== 'undefined') {
7407		jQuery(document).ajaxComplete(function(event, jqXHR) {
7408			phpdebugbar.ajaxHandler.handle(jqXHR);
7409		});
7410	}
7411});
7412
7413
7414/* ========================================
7415 FILE: /includes/js/jquery/prettyphoto/js/jquery.prettyPhoto.js
7416 ==================== */
7417
7418/* ------------------------------------------------------------------------
7419 * Class: prettyPhoto
7420 * Use: Lightbox clone for jQuery
7421 * Author: Stephane Caron (http://www.no-margin-for-errors.com)
7422 * Version: 3.0.1
7423 * ------------------------------------------------------------------------- */
7424
7425(function($){$.prettyPhoto={version:'3.0'};$.fn.prettyPhoto=function(pp_settings){pp_settings=jQuery.extend({animation_speed:'fast',pp_full_res_custom_class:'',slideshow:false,autoplay_slideshow:false,opacity:0.80,show_title:true,allow_resize:true,default_width:500,default_height:344,counter_separator_label:'/',theme:'facebook',hideflash:false,wmode:'opaque',autoplay:true,modal:false,overlay_gallery:true,keyboard_shortcuts:false,changepicturecallback:function(){},callback:function(){},markup:'<div class="pp_pic_holder"> \
7426      <div class="ppt">&nbsp;</div> \
7427      <div class="pp_top"> \
7428       <div class="pp_left"></div> \
7429       <div class="pp_middle"></div> \
7430       <div class="pp_right"></div> \
7431      </div> \
7432      <div class="pp_content_container"> \
7433       <div class="pp_left"> \
7434       <div class="pp_right"> \
7435        <div class="pp_content"> \
7436         <div class="pp_loaderIcon"></div> \
7437         <div class="pp_fade"> \
7438          <a href="#" class="pp_expand" title="Expand the image">Expand</a> \
7439          <div class="pp_hoverContainer"> \
7440           <a class="pp_next" href="#">next</a> \
7441           <a class="pp_previous" href="#">previous</a> \
7442          </div> \
7443          <div id="pp_full_res"></div> \
7444          <div class="pp_details clearfix"> \
7445           <p class="pp_description"></p> \
7446           <a class="pp_close" href="#">Close</a> \
7447           <div class="pp_nav"> \
7448            <a href="#" class="pp_arrow_previous">Previous</a> \
7449            <p class="currentTextHolder">0/0</p> \
7450            <a href="#" class="pp_arrow_next">Next</a> \
7451           </div> \
7452          </div> \
7453         </div> \
7454        </div> \
7455       </div> \
7456       </div> \
7457      </div> \
7458      <div class="pp_bottom"> \
7459       <div class="pp_left"></div> \
7460       <div class="pp_middle"></div> \
7461       <div class="pp_right"></div> \
7462      </div> \
7463     </div> \
7464     <div class="pp_overlay"></div>',gallery_markup:'<div class="pp_gallery"> \
7465        <a href="#" class="pp_arrow_previous">Previous</a> \
7466        <ul> \
7467         {gallery} \
7468        </ul> \
7469        <a href="#" class="pp_arrow_next">Next</a> \
7470       </div>',image_markup:'<img id="fullResImage" src="" />',flash_markup:'<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="{width}" height="{height}"><param name="wmode" value="{wmode}" /><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="{path}" /><embed src="{path}" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="{width}" height="{height}" wmode="{wmode}"></embed></object>',quicktime_markup:'<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="http://www.apple.com/qtactivex/qtplugin.cab" height="{height}" width="{width}"><param name="src" value="{path}"><param name="autoplay" value="{autoplay}"><param name="type" value="video/quicktime"><embed src="{path}" height="{height}" width="{width}" autoplay="{autoplay}" type="video/quicktime" pluginspage="http://www.apple.com/quicktime/download/"></embed></object>',iframe_markup:'<iframe src ="{path}" width="{width}" height="{height}" frameborder="no"></iframe>',youtube_markup: '<iframe type="text/html" width="{width}" height="{height}" src ="{path}" frameborder="0" allowfullscreen="allowfullscreen" allowscriptaccess="allowscriptaccess" wmode="opaque"></iframe>',inline_markup:'<div class="pp_inline clearfix">{content}</div>',custom_markup:''},pp_settings);var matchedObjects=this,percentBased=false,correctSizes,pp_open,pp_contentHeight,pp_contentWidth,pp_containerHeight,pp_containerWidth,windowHeight=$(window).height(),windowWidth=$(window).width(),pp_slideshow;doresize=true,scroll_pos=_get_scroll();$(window).unbind('resize').resize(function(){_center_overlay();_resize_overlay();});if(pp_settings.keyboard_shortcuts){$(document).unbind('keydown').keydown(function(e){if(typeof $pp_pic_holder!='undefined'){if($pp_pic_holder.is(':visible')){switch(e.keyCode){case 37:$.prettyPhoto.changePage('previous');break;case 39:$.prettyPhoto.changePage('next');break;case 27:if(!settings.modal)
7471$.prettyPhoto.close();break;};return false;};};});}
7472$.prettyPhoto.initialize=function(){settings=pp_settings;
7473  if ( typeof(settings.pp_full_res_custom_class) != 'undefined' && settings.pp_full_res_custom_class != '' )
7474    settings.markup = settings.markup.replace('<div id="pp_full_res"></div>', '<div id="pp_full_res" class="' + settings.pp_full_res_custom_class + '"></div>'); 
7475  if($.browser.msie&&parseInt($.browser.version)==6)settings.theme="light_square";_buildOverlay(this);if(settings.allow_resize)
7476$(window).scroll(function(){_center_overlay();});_center_overlay();set_position=jQuery.inArray($(this).attr('href'),pp_images);$.prettyPhoto.open();return false;};
7477$.prettyPhoto.open=function(event){if(typeof settings=="undefined"){settings=pp_settings;if($.browser.msie&&$.browser.version==6)settings.theme="light_square";_buildOverlay(event.target);pp_images=$.makeArray(arguments[0]);pp_titles=(arguments[1])?$.makeArray(arguments[1]):$.makeArray("");pp_descriptions=(arguments[2])?$.makeArray(arguments[2]):$.makeArray("");isSet=(pp_images.length>1)?true:false;set_position=0;}
7478if($.browser.msie&&$.browser.version==6)$('select').css('visibility','hidden');if(settings.hideflash)$('object,embed').css('visibility','hidden');_checkPosition($(pp_images).length);$('.pp_loaderIcon').show();if($ppt.is(':hidden'))$ppt.css('opacity',0).show();$pp_overlay.show().fadeTo(settings.animation_speed,settings.opacity);$pp_pic_holder.find('.currentTextHolder').text((set_position+1)+settings.counter_separator_label+$(pp_images).length);$pp_pic_holder.find('.pp_description').show().html(unescape(pp_descriptions[set_position]));(settings.show_title&&pp_titles[set_position]!=""&&typeof pp_titles[set_position]!="undefined")?$ppt.html(unescape(pp_titles[set_position])):$ppt.html('&nbsp;');
7479
7480movie_width=(parseFloat(grab_param('width',pp_images[set_position])))?grab_param('width',pp_images[set_position]):settings.default_width.toString();
7481movie_height=(parseFloat(grab_param('height',pp_images[set_position])))?grab_param('height',pp_images[set_position]):settings.default_height.toString();
7482// movie_width = movie_height = '100%'; 
7483if(movie_width.indexOf('%')!=-1||movie_height.indexOf('%')!=-1){movie_height=parseFloat(($(window).height()*parseFloat(movie_height)/100)-150);movie_width=parseFloat(($(window).width()*parseFloat(movie_width)/100)-150);percentBased=true;}else{percentBased=false;}
7484$pp_pic_holder.fadeIn(function(){imgPreloader="";switch(_getFileType(pp_images[set_position])){case'image':imgPreloader=new Image();nextImage=new Image();if(isSet&&set_position>$(pp_images).length)nextImage.src=pp_images[set_position+1];prevImage=new Image();if(isSet&&pp_images[set_position-1])prevImage.src=pp_images[set_position-1];$pp_pic_holder.find('#pp_full_res')[0].innerHTML=settings.image_markup;$pp_pic_holder.find('#fullResImage').attr('src',pp_images[set_position]);imgPreloader.onload=function(){correctSizes=_fitToViewport(imgPreloader.width,imgPreloader.height);_showContent();};imgPreloader.onerror=function(){alert('Image cannot be loaded. Make sure the path is correct and image exist.');$.prettyPhoto.close();};imgPreloader.src=pp_images[set_position];break;case'youtube':if (grab_param('resize_to',pp_images[set_position])=='height')movie_width=Math.floor(movie_height*1.77)-38;correctSizes=_fitToViewport(movie_width,movie_height);movie='//www.youtube.com/embed/'+grab_param('v',pp_images[set_position])+'?';if(settings.autoplay)movie+="?autoplay=1";
7485			
7486// if(grab_param('hd',pp_images[set_position])) movie+="&hd="+grab_param('hd',pp_images[set_position]);
7487if(grab_param('hd',pp_images[set_position])) movie+="&vq=hd720";
7488if(grab_param('fs',pp_images[set_position])) movie+="&fs="+grab_param('fs',pp_images[set_position]);
7489if(grab_param('showinfo',pp_images[set_position])) movie+="&showinfo="+grab_param('showinfo',pp_images[set_position]);
7490if (typeof(console) != 'undefined') console.log('YT-movie', movie);
7491
7492if(grab_param('t',pp_images[set_position])) movie+="&start="+grab_param('t',pp_images[set_position]);movie+="&showsearch=0&rel=0";toInject=settings.youtube_markup.replace(/{width}/g,correctSizes.width).replace(/{height}/g,correctSizes.height).replace(/{path}/g,movie);break;case'vimeo':correctSizes=_fitToViewport(movie_width,movie_height);movie_id=pp_images[set_position];var regExp=/http:\/\/(www\.)?vimeo.com\/(\d+)/;var match=movie_id.match(regExp);movie='http://player.vimeo.com/video/'+match[2]+'?title=0&amp;byline=0&amp;portrait=0';if(settings.autoplay)movie+="&autoplay=1;";vimeo_width=correctSizes.width+'/embed/?moog_width='+correctSizes.width;toInject=settings.iframe_markup.replace(/{width}/g,vimeo_width).replace(/{height}/g,correctSizes.height).replace(/{path}/g,movie);break;case'quicktime':correctSizes=_fitToViewport(movie_width,movie_height);correctSizes.height+=15;correctSizes.contentHeight+=15;correctSizes.containerHeight+=15;toInject=settings.quicktime_markup.replace(/{width}/g,correctSizes.width).replace(/{height}/g,correctSizes.height).replace(/{wmode}/g,settings.wmode).replace(/{path}/g,pp_images[set_position]).replace(/{autoplay}/g,settings.autoplay);break;case'flash':correctSizes=_fitToViewport(movie_width,movie_height);flash_vars=pp_images[set_position];flash_vars=flash_vars.substring(pp_images[set_position].indexOf('flashvars')+10,pp_images[set_position].length);filename=pp_images[set_position];filename=filename.substring(0,filename.indexOf('?'));toInject=settings.flash_markup.replace(/{width}/g,correctSizes.width).replace(/{height}/g,correctSizes.height).replace(/{wmode}/g,settings.wmode).replace(/{path}/g,filename+'?'+flash_vars);break;case'iframe':correctSizes=_fitToViewport(movie_width,movie_height);frame_url=pp_images[set_position];frame_url=frame_url.substr(0,frame_url.indexOf('iframe')-1);toInject=settings.iframe_markup.replace(/{width}/g,correctSizes.width).replace(/{height}/g,correctSizes.height).replace(/{path}/g,frame_url);break;case'custom':correctSizes=_fitToViewport(movie_width,movie_height);toInject=settings.custom_markup;break;case'inline':myClone=$(pp_images[set_position]).clone().css({'width':settings.default_width}).wrapInner('<div id="pp_full_res"><div class="pp_inline clearfix"></div></div>').appendTo($('body'));correctSizes=_fitToViewport($(myClone).width(),$(myClone).height());$(myClone).remove();toInject=settings.inline_markup.replace(/{content}/g,$(pp_images[set_position]).html());break;};if(!imgPreloader){$pp_pic_holder.find('#pp_full_res')[0].innerHTML=toInject;_showContent();};});return false;};$.prettyPhoto.changePage=function(direction){currentGalleryPage=0;if(direction=='previous'){set_position--;if(set_position<0){set_position=0;return;};}else if(direction=='next'){set_position++;if(set_position>$(pp_images).length-1){set_position=0;}}else{set_position=direction;};
7492if(!doresize)doresize=true;$('.pp_contract').removeClass('pp_contract').addClass('pp_expand');_hideContent(function(){$.prettyPhoto.open();});};$.prettyPhoto.changeGalleryPage=function(direction){if(direction=='next'){currentGalleryPage++;if(currentGalleryPage>totalPage){currentGalleryPage=0;};}else if(direction=='previous'){currentGalleryPage--;if(currentGalleryPage<0){currentGalleryPage=totalPage;};}else{currentGalleryPage=direction;};itemsToSlide=(currentGalleryPage==totalPage)?pp_images.length-((totalPage)*itemsPerPage):itemsPerPage;$pp_pic_holder.find('.pp_gallery li').each(function(i){$(this).animate({'left':(i*itemWidth)-((itemsToSlide*itemWidth)*currentGalleryPage)});});};$.prettyPhoto.startSlideshow=function(){if(typeof pp_slideshow=='undefined'){$pp_pic_holder.find('.pp_play').unbind('click').removeClass('pp_play').addClass('pp_pause').click(function(){$.prettyPhoto.stopSlideshow();return false;});pp_slideshow=setInterval($.prettyPhoto.startSlideshow,settings.slideshow);}else{$.prettyPhoto.changePage('next');};};
7493$.prettyPhoto.stopSlideshow=function(){$pp_pic_holder.find('.pp_pause').unbind('click').removeClass('pp_pause').addClass('pp_play').click(function(){$.prettyPhoto.startSlideshow();return false;});clearInterval(pp_slideshow);pp_slideshow=undefined;};
7494$.prettyPhoto.close=function(){clearInterval(pp_slideshow);$pp_pic_holder.stop().find('object,embed').css('visibility','hidden');$('div.pp_pic_holder,div.ppt,.pp_fade').fadeOut(settings.animation_speed,function(){$(this).remove();});$pp_overlay.fadeOut(settings.animation_speed,function(){if($.browser.msie&&$.browser.version==6)$('select').css('visibility','visible');if(settings.hideflash)$('object,embed').css('visibility','visible');$(this).remove();settings.callback();doresize=true;pp_open=false;delete settings;});};_showContent=function(){$('.pp_loaderIcon').hide();$ppt.fadeTo(settings.animation_speed,1);if ( isNaN(correctSizes.contentHeight) )correctSizes.contentHeight = 1;projectedTop=scroll_pos.scrollTop+((windowHeight/2)-(correctSizes.containerHeight/2));if(projectedTop<0)projectedTop=0;if ( isNaN(projectedTop) )projectedTop = 1;$pp_pic_holder.find('.pp_content').animate({'height':correctSizes.contentHeight},settings.animation_speed);$pp_pic_holder.animate({'top':projectedTop,'left':(windowWidth/2)-(correctSizes.containerWidth/2),'width':correctSizes.containerWidth},settings.animation_speed,function(){$pp_pic_holder.find('.pp_hoverContainer,#fullResImage').height(correctSizes.height).width(correctSizes.width);$pp_pic_holder.find('.pp_fade').fadeIn(settings.animation_speed);if(isSet&&_getFileType(pp_images[set_position])=="image"){$pp_pic_holder.find('.pp_hoverContainer').show();}else{$pp_pic_holder.find('.pp_hoverContainer').hide();}
7495if(correctSizes.resized)$('a.pp_expand,a.pp_contract').fadeIn(settings.animation_speed);if(settings.autoplay_slideshow&&!pp_slideshow&&!pp_open)$.prettyPhoto.startSlideshow();settings.changepicturecallback();pp_open=true;});_insert_gallery();};function _hideContent(callback){$pp_pic_holder.find('#pp_full_res object,#pp_full_res embed').css('visibility','hidden');$pp_pic_holder.find('.pp_fade').fadeOut(settings.animation_speed,function(){$('.pp_loaderIcon').show();callback();});};function _checkPosition(setCount){if(set_position==setCount-1){$pp_pic_holder.find('a.pp_next').css('visibility','hidden');$pp_pic_holder.find('a.pp_next').addClass('disabled').unbind('click');}else{$pp_pic_holder.find('a.pp_next').css('visibility','visible');$pp_pic_holder.find('a.pp_next.disabled').removeClass('disabled').bind('click',function(){$.prettyPhoto.changePage('next');return false;});};if(set_position==0){$pp_pic_holder.find('a.pp_previous').css('visibility','hidden').addClass('disabled').unbind('click');}else{$pp_pic_holder.find('a.pp_previous.disabled').css('visibility','visible').removeClass('disabled').bind('click',function(){$.prettyPhoto.changePage('previous');return false;});};(setCount>1)?$('.pp_nav').show():$('.pp_nav').hide();};function _fitToViewport(width,height){resized=false;_getDimensions(width,height);imageWidth=width,imageHeight=height;if(((pp_containerWidth>windowWidth)||(pp_containerHeight>windowHeight))&&doresize&&settings.allow_resize&&!percentBased){resized=true,fitting=false;while(!fitting){if((pp_containerWidth>windowWidth)){imageWidth=(windowWidth-200);imageHeight=(height/width)*imageWidth;}else if((pp_containerHeight>windowHeight)){imageHeight=(windowHeight-200);imageWidth=(width/height)*imageHeight;}else{fitting=true;};pp_containerHeight=imageHeight,pp_containerWidth=imageWidth;};_getDimensions(imageWidth,imageHeight);};return{width:Math.floor(imageWidth),height:Math.floor(imageHeight),containerHeight:Math.floor(pp_containerHeight),containerWidth:Math.floor(pp_containerWidth)+40,contentHeight:Math.floor(pp_contentHeight),contentWidth:Math.floor(pp_contentWidth),resized:resized};};function _getDimensions(width,height){width=parseFloat(width);height=parseFloat(height);$pp_details=$pp_pic_holder.find('.pp_details');$pp_details.width(width);detailsHeight=parseFloat($pp_details.css('marginTop'))+parseFloat($pp_details.css('marginBottom'));$pp_details=$pp_details.clone().appendTo($('body')).css({'position':'absolute','top':-10000});detailsHeight+=$pp_details.height();
7495detailsHeight=(detailsHeight<=34)?36:detailsHeight;if($.browser.msie&&$.browser.version==7)detailsHeight+=8;$pp_details.remove();pp_contentHeight=height+detailsHeight;pp_contentWidth=width;pp_containerHeight=pp_contentHeight+$ppt.height()+$pp_pic_holder.find('.pp_top').height()+$pp_pic_holder.find('.pp_bottom').height();pp_containerWidth=width;}
7496function _getFileType(itemSrc){if(itemSrc.match(/youtube\.com/i)){return'youtube';}else if(itemSrc.match(/vimeo\.com/i)){return'vimeo';}else if(itemSrc.indexOf('.mov')!=-1){return'quicktime';}else if(itemSrc.indexOf('.swf')!=-1){return'flash';}else if(itemSrc.indexOf('iframe')!=-1){return'iframe';}else if(itemSrc.indexOf('custom')!=-1){return'custom';}else if(itemSrc.substr(0,1)=='#'){return'inline';}else{return'image';};};function _center_overlay(){if(doresize&&typeof $pp_pic_holder!='undefined'){scroll_pos=_get_scroll();titleHeight=$ppt.height(),contentHeight=$pp_pic_holder.height(),contentwidth=$pp_pic_holder.width();projectedTop=(windowHeight/2)+scroll_pos.scrollTop-(contentHeight/2);$pp_pic_holder.css({'top':projectedTop,'left':(windowWidth/2)+scroll_pos.scrollLeft-(contentwidth/2)});};};function _get_scroll(){if(self.pageYOffset){return{scrollTop:self.pageYOffset,scrollLeft:self.pageXOffset};}else if(document.documentElement&&document.documentElement.scrollTop){return{scrollTop:document.documentElement.scrollTop,scrollLeft:document.documentElement.scrollLeft};}else if(document.body){return{scrollTop:document.body.scrollTop,scrollLeft:document.body.scrollLeft};};};function _resize_overlay(){windowHeight=$(window).height(),windowWidth=$(window).width();if(typeof $pp_overlay!="undefined")$pp_overlay.height($(document).height());};function _insert_gallery(){if(isSet&&settings.overlay_gallery&&_getFileType(pp_images[set_position])=="image"){itemWidth=52+5;navWidth=(settings.theme=="facebook")?58:38;itemsPerPage=Math.floor((correctSizes.containerWidth-100-navWidth)/itemWidth);itemsPerPage=(itemsPerPage<pp_images.length)?itemsPerPage:pp_images.length;totalPage=Math.ceil(pp_images.length/itemsPerPage)-1;if(totalPage==0){navWidth=0;$pp_pic_holder.find('.pp_gallery .pp_arrow_next,.pp_gallery .pp_arrow_previous').hide();}else{$pp_pic_holder.find('.pp_gallery .pp_arrow_next,.pp_gallery .pp_arrow_previous').show();};galleryWidth=itemsPerPage*itemWidth+navWidth;$pp_pic_holder.find('.pp_gallery').width(galleryWidth).css('margin-left',-(galleryWidth/2));$pp_pic_holder.find('.pp_gallery ul').width(itemsPerPage*itemWidth).find('li.selected').removeClass('selected');goToPage=(Math.floor(set_position/itemsPerPage)<=totalPage)?Math.floor(set_position/itemsPerPage):totalPage;if(itemsPerPage){$pp_pic_holder.find('.pp_gallery').hide().show().removeClass('disabled');}else{$pp_pic_holder.find('.pp_gallery').hide().addClass('disabled');}
7497$.prettyPhoto.changeGalleryPage(goToPage);$pp_pic_holder.find('.pp_gallery ul li:eq('+set_position+')').addClass('selected');}else{$pp_pic_holder.find('.pp_content').unbind('mouseenter mouseleave');$pp_pic_holder.find('.pp_gallery').hide();}}
7498function _buildOverlay(caller){theRel=$(caller).attr('rel');galleryRegExp=/\[(?:.*)\]/;isSet=(galleryRegExp.exec(theRel))?true:false;pp_images=(isSet)?jQuery.map(matchedObjects,function(n,i){if($(n).attr('rel').indexOf(theRel)!=-1)return $(n).attr('href');}):$.makeArray($(caller).attr('href'));pp_titles=(isSet)?jQuery.map(matchedObjects,function(n,i){if($(n).attr('rel').indexOf(theRel)!=-1)return($(n).find('img').attr('alt'))?$(n).find('img').attr('alt'):"";}):$.makeArray($(caller).find('img').attr('alt'));pp_descriptions=(isSet)?jQuery.map(matchedObjects,function(n,i){if($(n).attr('rel').indexOf(theRel)!=-1)return($(n).attr('title'))?$(n).attr('title'):"";}):$.makeArray($(caller).attr('title'));$('body').append(settings.markup);$pp_pic_holder=$('.pp_pic_holder'),$ppt=$('.ppt'),$pp_overlay=$('div.pp_overlay');if(isSet&&settings.overlay_gallery){currentGalleryPage=0;toInject="";for(var i=0;i<pp_images.length;i++){var regex=new RegExp("(.*?)\.(jpg|jpeg|png|gif)$");var results=regex.exec(pp_images[i]);if(!results){classname='default';}else{classname='';}
7499toInject+="<li class='"+classname+"'><a href='#'><img src='"+pp_images[i]+"' width='50' alt='' /></a></li>";};toInject=settings.gallery_markup.replace(/{gallery}/g,toInject);$pp_pic_holder.find('#pp_full_res').after(toInject);$pp_pic_holder.find('.pp_gallery .pp_arrow_next').click(function(){$.prettyPhoto.changeGalleryPage('next');$.prettyPhoto.stopSlideshow();return false;});$pp_pic_holder.find('.pp_gallery .pp_arrow_previous').click(function(){$.prettyPhoto.changeGalleryPage('previous');$.prettyPhoto.stopSlideshow();return false;});$pp_pic_holder.find('.pp_content').hover(function(){$pp_pic_holder.find('.pp_gallery:not(.disabled)').fadeIn();},function(){$pp_pic_holder.find('.pp_gallery:not(.disabled)').fadeOut();});itemWidth=52+5;$pp_pic_holder.find('.pp_gallery ul li').each(function(i){$(this).css({'position':'absolute','left':i*itemWidth});$(this).find('a').unbind('click').click(function(){$.prettyPhoto.changePage(i);$.prettyPhoto.stopSlideshow();return false;});});};if(settings.slideshow){$pp_pic_holder.find('.pp_nav').prepend('<a href="#" class="pp_play">Play</a>');
7500$pp_pic_holder.find('.pp_nav .pp_play').click(function(){$.prettyPhoto.startSlideshow();return false;});}
7501$pp_pic_holder.attr('class','pp_pic_holder '+settings.theme);$pp_overlay.css({'opacity':0/*,'height':'100%'*/,'height':$(document).height()/*,'width':$(document).width()*/}).bind('click',function(){if(!settings.modal)js_prettyphoto_close();});$('a.pp_close').bind('click',function(){$.prettyPhoto.close();return false;});$('a.pp_expand').bind('click',function(e){if($(this).hasClass('pp_expand')){$(this).removeClass('pp_expand').addClass('pp_contract');doresize=false;}else{$(this).removeClass('pp_contract').addClass('pp_expand');doresize=true;};_hideContent(function(){$.prettyPhoto.open();});return false;});$pp_pic_holder.find('.pp_previous, .pp_nav .pp_arrow_previous').bind('click',function(){$.prettyPhoto.changePage('previous');$.prettyPhoto.stopSlideshow();return false;});$pp_pic_holder.find('.pp_next, .pp_nav .pp_arrow_next').bind('click',function(){$.prettyPhoto.changePage('next');$.prettyPhoto.stopSlideshow();return false;});_center_overlay();};return this.unbind('click').click($.prettyPhoto.initialize);};function grab_param(name,url){name=name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");var regexS="[\\?&]"+name+"=([^&#]*)";var regex=new RegExp(regexS);var results=regex.exec(url);return(results==null)?"":results[1];}})(jQuery);
7502
7503
7504/* ========================================
7505 FILE: /includes/js/jquery/jquery-ui-1.14.0/jquery-ui.js
7506 ==================== */
7507
7508/*! jQuery UI - v1.14.0 - 2024-08-05
7509* https://jqueryui.com
7510* Includes: widget.js, position.js, data.js, disable-selection.js, effect.js, effects/effect-blind.js, effects/effect-bounce.js, effects/effect-clip.js, effects/effect-drop.js, effects/effect-explode.js, effects/effect-fade.js, effects/effect-fold.js, effects/effect-highlight.js, effects/effect-puff.js, effects/effect-pulsate.js, effects/effect-scale.js, effects/effect-shake.js, effects/effect-size.js, effects/effect-slide.js, effects/effect-transfer.js, focusable.js, form-reset-mixin.js, jquery-patch.js, keycode.js, labels.js, scroll-parent.js, tabbable.js, unique-id.js, widgets/accordion.js, widgets/autocomplete.js, widgets/button.js, widgets/checkboxradio.js, widgets/controlgroup.js, widgets/datepicker.js, widgets/dialog.js, widgets/draggable.js, widgets/droppable.js, widgets/menu.js, widgets/mouse.js, widgets/progressbar.js, widgets/resizable.js, widgets/selectable.js, widgets/selectmenu.js, widgets/slider.js, widgets/sortable.js, widgets/spinner.js, widgets/tabs.js, widgets/tooltip.js
7511* Copyright OpenJS Foundation and other contributors; Licensed MIT */
7512
7513( function( factory ) {
7514	"use strict";
7515
7516	if ( typeof define === "function" && define.amd ) {
7517
7518		// AMD. Register as an anonymous module.
7519		define( [ "jquery" ], factory );
7520	} else {
7521
7522		// Browser globals
7523		factory( jQuery );
7524	}
7525} )( function( $ ) {
7526"use strict";
7527
7528$.ui = $.ui || {};
7529
7530var version = $.ui.version = "1.14.0";
7531
7532
7533/*!
7534 * jQuery UI Widget 1.14.0
vendor: 8,451 bytes, lines 7534-7837
7534
7535 * https://jqueryui.com
7536 *
7537 * Copyright OpenJS Foundation and other contributors
7538 * Released under the MIT license.
7539 * https://jquery.org/license
7540 */
7541
7542//>>label: Widget
7543//>>group: Core
7544//>>description: Provides a factory for creating stateful widgets with a common API.
7545//>>docs: https://api.jqueryui.com/jQuery.widget/
7546//>>demos: https://jqueryui.com/widget/
7547
7548
7549var widgetUuid = 0;
7550var widgetHasOwnProperty = Array.prototype.hasOwnProperty;
7551var widgetSlice = Array.prototype.slice;
7552
7553$.cleanData = ( function( orig ) {
7554	return function( elems ) {
7555		var events, elem, i;
7556		for ( i = 0; ( elem = elems[ i ] ) != null; i++ ) {
7557
7558			// Only trigger remove when necessary to save time
7559			events = $._data( elem, "events" );
7560			if ( events && events.remove ) {
7561				$( elem ).triggerHandler( "remove" );
7562			}
7563		}
7564		orig( elems );
7565	};
7566} )( $.cleanData );
7567
7568$.widget = function( name, base, prototype ) {
7569	var existingConstructor, constructor, basePrototype;
7570
7571	// ProxiedPrototype allows the provided prototype to remain unmodified
7572	// so that it can be used as a mixin for multiple widgets (#8876)
7573	var proxiedPrototype = {};
7574
7575	var namespace = name.split( "." )[ 0 ];
7576	name = name.split( "." )[ 1 ];
7577	var fullName = namespace + "-" + name;
7578
7579	if ( !prototype ) {
7580		prototype = base;
7581		base = $.Widget;
7582	}
7583
7584	if ( Array.isArray( prototype ) ) {
7585		prototype = $.extend.apply( null, [ {} ].concat( prototype ) );
7586	}
7587
7588	// Create selector for plugin
7589	$.expr.pseudos[ fullName.toLowerCase() ] = function( elem ) {
7590		return !!$.data( elem, fullName );
7591	};
7592
7593	$[ namespace ] = $[ namespace ] || {};
7594	existingConstructor = $[ namespace ][ name ];
7595	constructor = $[ namespace ][ name ] = function( options, element ) {
7596
7597		// Allow instantiation without "new" keyword
7598		if ( !this || !this._createWidget ) {
7599			return new constructor( options, element );
7600		}
7601
7602		// Allow instantiation without initializing for simple inheritance
7603		// must use "new" keyword (the code above always passes args)
7604		if ( arguments.length ) {
7605			this._createWidget( options, element );
7606		}
7607	};
7608
7609	// Extend with the existing constructor to carry over any static properties
7610	$.extend( constructor, existingConstructor, {
7611		version: prototype.version,
7612
7613		// Copy the object used to create the prototype in case we need to
7614		// redefine the widget later
7615		_proto: $.extend( {}, prototype ),
7616
7617		// Track widgets that inherit from this widget in case this widget is
7618		// redefined after a widget inherits from it
7619		_childConstructors: []
7620	} );
7621
7622	basePrototype = new base();
7623
7624	// We need to make the options hash a property directly on the new instance
7625	// otherwise we'll modify the options hash on the prototype that we're
7626	// inheriting from
7627	basePrototype.options = $.widget.extend( {}, basePrototype.options );
7628	$.each( prototype, function( prop, value ) {
7629		if ( typeof value !== "function" ) {
7630			proxiedPrototype[ prop ] = value;
7631			return;
7632		}
7633		proxiedPrototype[ prop ] = ( function() {
7634			function _super() {
7635				return base.prototype[ prop ].apply( this, arguments );
7636			}
7637
7638			function _superApply( args ) {
7639				return base.prototype[ prop ].apply( this, args );
7640			}
7641
7642			return function() {
7643				var __super = this._super;
7644				var __superApply = this._superApply;
7645				var returnValue;
7646
7647				this._super = _super;
7648				this._superApply = _superApply;
7649
7650				returnValue = value.apply( this, arguments );
7651
7652				this._super = __super;
7653				this._superApply = __superApply;
7654
7655				return returnValue;
7656			};
7657		} )();
7658	} );
7659	constructor.prototype = $.widget.extend( basePrototype, {
7660
7661		// TODO: remove support for widgetEventPrefix
7662		// always use the name + a colon as the prefix, e.g., draggable:start
7663		// don't prefix for widgets that aren't DOM-based
7664		widgetEventPrefix: existingConstructor ? ( basePrototype.widgetEventPrefix || name ) : name
7665	}, proxiedPrototype, {
7666		constructor: constructor,
7667		namespace: namespace,
7668		widgetName: name,
7669		widgetFullName: fullName
7670	} );
7671
7672	// If this widget is being redefined then we need to find all widgets that
7673	// are inheriting from it and redefine all of them so that they inherit from
7674	// the new version of this widget. We're essentially trying to replace one
7675	// level in the prototype chain.
7676	if ( existingConstructor ) {
7677		$.each( existingConstructor._childConstructors, function( i, child ) {
7678			var childPrototype = child.prototype;
7679
7680			// Redefine the child widget using the same prototype that was
7681			// originally used, but inherit from the new version of the base
7682			$.widget( childPrototype.namespace + "." + childPrototype.widgetName, constructor,
7683				child._proto );
7684		} );
7685
7686		// Remove the list of existing child constructors from the old constructor
7687		// so the old child constructors can be garbage collected
7688		delete existingConstructor._childConstructors;
7689	} else {
7690		base._childConstructors.push( constructor );
7691	}
7692
7693	$.widget.bridge( name, constructor );
7694
7695	return constructor;
7696};
7697
7698$.widget.extend = function( target ) {
7699	var input = widgetSlice.call( arguments, 1 );
7700	var inputIndex = 0;
7701	var inputLength = input.length;
7702	var key;
7703	var value;
7704
7705	for ( ; inputIndex < inputLength; inputIndex++ ) {
7706		for ( key in input[ inputIndex ] ) {
7707			value = input[ inputIndex ][ key ];
7708			if ( widgetHasOwnProperty.call( input[ inputIndex ], key ) && value !== undefined ) {
7709
7710				// Clone objects
7711				if ( $.isPlainObject( value ) ) {
7712					target[ key ] = $.isPlainObject( target[ key ] ) ?
7713						$.widget.extend( {}, target[ key ], value ) :
7714
7715						// Don't extend strings, arrays, etc. with objects
7716						$.widget.extend( {}, value );
7717
7718				// Copy everything else by reference
7719				} else {
7720					target[ key ] = value;
7721				}
7722			}
7723		}
7724	}
7725	return target;
7726};
7727
7728$.widget.bridge = function( name, object ) {
7729	var fullName = object.prototype.widgetFullName || name;
7730	$.fn[ name ] = function( options ) {
7731		var isMethodCall = typeof options === "string";
7732		var args = widgetSlice.call( arguments, 1 );
7733		var returnValue = this;
7734
7735		if ( isMethodCall ) {
7736
7737			// If this is an empty collection, we need to have the instance method
7738			// return undefined instead of the jQuery instance
7739			if ( !this.length && options === "instance" ) {
7740				returnValue = undefined;
7741			} else {
7742				this.each( function() {
7743					var methodValue;
7744					var instance = $.data( this, fullName );
7745
7746					if ( options === "instance" ) {
7747						returnValue = instance;
7748						return false;
7749					}
7750
7751					if ( !instance ) {
7752						return $.error( "cannot call methods on " + name +
7753							" prior to initialization; " +
7754							"attempted to call method '" + options + "'" );
7755					}
7756
7757					if ( typeof instance[ options ] !== "function" ||
7758						options.charAt( 0 ) === "_" ) {
7759						return $.error( "no such method '" + options + "' for " + name +
7760							" widget instance" );
7761					}
7762
7763					methodValue = instance[ options ].apply( instance, args );
7764
7765					if ( methodValue !== instance && methodValue !== undefined ) {
7766						returnValue = methodValue && methodValue.jquery ?
7767							returnValue.pushStack( methodValue.get() ) :
7768							methodValue;
7769						return false;
7770					}
7771				} );
7772			}
7773		} else {
7774
7775			// Allow multiple hashes to be passed on init
7776			if ( args.length ) {
7777				options = $.widget.extend.apply( null, [ options ].concat( args ) );
7778			}
7779
7780			this.each( function() {
7781				var instance = $.data( this, fullName );
7782				if ( instance ) {
7783					instance.option( options || {} );
7784					if ( instance._init ) {
7785						instance._init();
7786					}
7787				} else {
7788					$.data( this, fullName, new object( options, this ) );
7789				}
7790			} );
7791		}
7792
7793		return returnValue;
7794	};
7795};
7796
7797$.Widget = function( /* options, element */ ) {};
7798$.Widget._childConstructors = [];
7799
7800$.Widget.prototype = {
7801	widgetName: "widget",
7802	widgetEventPrefix: "",
7803	defaultElement: "<div>",
7804
7805	options: {
7806		classes: {},
7807		disabled: false,
7808
7809		// Callbacks
7810		create: null
7811	},
7812
7813	_createWidget: function( options, element ) {
7814		element = $( element || this.defaultElement || this )[ 0 ];
7815		this.element = $( element );
7816		this.uuid = widgetUuid++;
7817		this.eventNamespace = "." + this.widgetName + this.uuid;
7818
7819		this.bindings = $();
7820		this.hoverable = $();
7821		this.focusable = $();
7822		this.classesElementLookup = {};
7823
7824		if ( element !== this ) {
7825			$.data( element, this.widgetFullName, this );
7826			this._on( true, this.element, {
7827				remove: function( event ) {
7828					if ( event.target === element ) {
7829						this.destroy();
7830					}
7831				}
7832			} );
7833			this.document = $( element.style ?
7834
7835				// Element within the document
7836				element.ownerDocument :
7837
vendor: 11,563 bytes, lines 7838-8276
7838				// Element is window or document
7839				element.document || element );
7840			this.window = $( this.document[ 0 ].defaultView || this.document[ 0 ].parentWindow );
7841		}
7842
7843		this.options = $.widget.extend( {},
7844			this.options,
7845			this._getCreateOptions(),
7846			options );
7847
7848		this._create();
7849
7850		if ( this.options.disabled ) {
7851			this._setOptionDisabled( this.options.disabled );
7852		}
7853
7854		this._trigger( "create", null, this._getCreateEventData() );
7855		this._init();
7856	},
7857
7858	_getCreateOptions: function() {
7859		return {};
7860	},
7861
7862	_getCreateEventData: $.noop,
7863
7864	_create: $.noop,
7865
7866	_init: $.noop,
7867
7868	destroy: function() {
7869		var that = this;
7870
7871		this._destroy();
7872		$.each( this.classesElementLookup, function( key, value ) {
7873			that._removeClass( value, key );
7874		} );
7875
7876		// We can probably remove the unbind calls in 2.0
7877		// all event bindings should go through this._on()
7878		this.element
7879			.off( this.eventNamespace )
7880			.removeData( this.widgetFullName );
7881		this.widget()
7882			.off( this.eventNamespace )
7883			.removeAttr( "aria-disabled" );
7884
7885		// Clean up events and states
7886		this.bindings.off( this.eventNamespace );
7887	},
7888
7889	_destroy: $.noop,
7890
7891	widget: function() {
7892		return this.element;
7893	},
7894
7895	option: function( key, value ) {
7896		var options = key;
7897		var parts;
7898		var curOption;
7899		var i;
7900
7901		if ( arguments.length === 0 ) {
7902
7903			// Don't return a reference to the internal hash
7904			return $.widget.extend( {}, this.options );
7905		}
7906
7907		if ( typeof key === "string" ) {
7908
7909			// Handle nested keys, e.g., "foo.bar" => { foo: { bar: ___ } }
7910			options = {};
7911			parts = key.split( "." );
7912			key = parts.shift();
7913			if ( parts.length ) {
7914				curOption = options[ key ] = $.widget.extend( {}, this.options[ key ] );
7915				for ( i = 0; i < parts.length - 1; i++ ) {
7916					curOption[ parts[ i ] ] = curOption[ parts[ i ] ] || {};
7917					curOption = curOption[ parts[ i ] ];
7918				}
7919				key = parts.pop();
7920				if ( arguments.length === 1 ) {
7921					return curOption[ key ] === undefined ? null : curOption[ key ];
7922				}
7923				curOption[ key ] = value;
7924			} else {
7925				if ( arguments.length === 1 ) {
7926					return this.options[ key ] === undefined ? null : this.options[ key ];
7927				}
7928				options[ key ] = value;
7929			}
7930		}
7931
7932		this._setOptions( options );
7933
7934		return this;
7935	},
7936
7937	_setOptions: function( options ) {
7938		var key;
7939
7940		for ( key in options ) {
7941			this._setOption( key, options[ key ] );
7942		}
7943
7944		return this;
7945	},
7946
7947	_setOption: function( key, value ) {
7948		if ( key === "classes" ) {
7949			this._setOptionClasses( value );
7950		}
7951
7952		this.options[ key ] = value;
7953
7954		if ( key === "disabled" ) {
7955			this._setOptionDisabled( value );
7956		}
7957
7958		return this;
7959	},
7960
7961	_setOptionClasses: function( value ) {
7962		var classKey, elements, currentElements;
7963
7964		for ( classKey in value ) {
7965			currentElements = this.classesElementLookup[ classKey ];
7966			if ( value[ classKey ] === this.options.classes[ classKey ] ||
7967					!currentElements ||
7968					!currentElements.length ) {
7969				continue;
7970			}
7971
7972			// We are doing this to create a new jQuery object because the _removeClass() call
7973			// on the next line is going to destroy the reference to the current elements being
7974			// tracked. We need to save a copy of this collection so that we can add the new classes
7975			// below.
7976			elements = $( currentElements.get() );
7977			this._removeClass( currentElements, classKey );
7978
7979			// We don't use _addClass() here, because that uses this.options.classes
7980			// for generating the string of classes. We want to use the value passed in from
7981			// _setOption(), this is the new value of the classes option which was passed to
7982			// _setOption(). We pass this value directly to _classes().
7983			elements.addClass( this._classes( {
7984				element: elements,
7985				keys: classKey,
7986				classes: value,
7987				add: true
7988			} ) );
7989		}
7990	},
7991
7992	_setOptionDisabled: function( value ) {
7993		this._toggleClass( this.widget(), this.widgetFullName + "-disabled", null, !!value );
7994
7995		// If the widget is becoming disabled, then nothing is interactive
7996		if ( value ) {
7997			this._removeClass( this.hoverable, null, "ui-state-hover" );
7998			this._removeClass( this.focusable, null, "ui-state-focus" );
7999		}
8000	},
8001
8002	enable: function() {
8003		return this._setOptions( { disabled: false } );
8004	},
8005
8006	disable: function() {
8007		return this._setOptions( { disabled: true } );
8008	},
8009
8010	_classes: function( options ) {
8011		var full = [];
8012		var that = this;
8013
8014		options = $.extend( {
8015			element: this.element,
8016			classes: this.options.classes || {}
8017		}, options );
8018
8019		function bindRemoveEvent() {
8020			var nodesToBind = [];
8021
8022			options.element.each( function( _, element ) {
8023				var isTracked = $.map( that.classesElementLookup, function( elements ) {
8024					return elements;
8025				} )
8026					.some( function( elements ) {
8027						return elements.is( element );
8028					} );
8029
8030				if ( !isTracked ) {
8031					nodesToBind.push( element );
8032				}
8033			} );
8034
8035			that._on( $( nodesToBind ), {
8036				remove: "_untrackClassesElement"
8037			} );
8038		}
8039
8040		function processClassString( classes, checkOption ) {
8041			var current, i;
8042			for ( i = 0; i < classes.length; i++ ) {
8043				current = that.classesElementLookup[ classes[ i ] ] || $();
8044				if ( options.add ) {
8045					bindRemoveEvent();
8046					current = $( $.uniqueSort( current.get().concat( options.element.get() ) ) );
8047				} else {
8048					current = $( current.not( options.element ).get() );
8049				}
8050				that.classesElementLookup[ classes[ i ] ] = current;
8051				full.push( classes[ i ] );
8052				if ( checkOption && options.classes[ classes[ i ] ] ) {
8053					full.push( options.classes[ classes[ i ] ] );
8054				}
8055			}
8056		}
8057
8058		if ( options.keys ) {
8059			processClassString( options.keys.match( /\S+/g ) || [], true );
8060		}
8061		if ( options.extra ) {
8062			processClassString( options.extra.match( /\S+/g ) || [] );
8063		}
8064
8065		return full.join( " " );
8066	},
8067
8068	_untrackClassesElement: function( event ) {
8069		var that = this;
8070		$.each( that.classesElementLookup, function( key, value ) {
8071			if ( $.inArray( event.target, value ) !== -1 ) {
8072				that.classesElementLookup[ key ] = $( value.not( event.target ).get() );
8073			}
8074		} );
8075
8076		this._off( $( event.target ) );
8077	},
8078
8079	_removeClass: function( element, keys, extra ) {
8080		return this._toggleClass( element, keys, extra, false );
8081	},
8082
8083	_addClass: function( element, keys, extra ) {
8084		return this._toggleClass( element, keys, extra, true );
8085	},
8086
8087	_toggleClass: function( element, keys, extra, add ) {
8088		add = ( typeof add === "boolean" ) ? add : extra;
8089		var shift = ( typeof element === "string" || element === null ),
8090			options = {
8091				extra: shift ? keys : extra,
8092				keys: shift ? element : keys,
8093				element: shift ? this.element : element,
8094				add: add
8095			};
8096		options.element.toggleClass( this._classes( options ), add );
8097		return this;
8098	},
8099
8100	_on: function( suppressDisabledCheck, element, handlers ) {
8101		var delegateElement;
8102		var instance = this;
8103
8104		// No suppressDisabledCheck flag, shuffle arguments
8105		if ( typeof suppressDisabledCheck !== "boolean" ) {
8106			handlers = element;
8107			element = suppressDisabledCheck;
8108			suppressDisabledCheck = false;
8109		}
8110
8111		// No element argument, shuffle and use this.element
8112		if ( !handlers ) {
8113			handlers = element;
8114			element = this.element;
8115			delegateElement = this.widget();
8116		} else {
8117			element = delegateElement = $( element );
8118			this.bindings = this.bindings.add( element );
8119		}
8120
8121		$.each( handlers, function( event, handler ) {
8122			function handlerProxy() {
8123
8124				// Allow widgets to customize the disabled handling
8125				// - disabled as an array instead of boolean
8126				// - disabled class as method for disabling individual parts
8127				if ( !suppressDisabledCheck &&
8128						( instance.options.disabled === true ||
8129						$( this ).hasClass( "ui-state-disabled" ) ) ) {
8130					return;
8131				}
8132				return ( typeof handler === "string" ? instance[ handler ] : handler )
8133					.apply( instance, arguments );
8134			}
8135
8136			// Copy the guid so direct unbinding works
8137			if ( typeof handler !== "string" ) {
8138				handlerProxy.guid = handler.guid =
8139					handler.guid || handlerProxy.guid || $.guid++;
8140			}
8141
8142			var match = event.match( /^([\w:-]*)\s*(.*)$/ );
8143			var eventName = match[ 1 ] + instance.eventNamespace;
8144			var selector = match[ 2 ];
8145
8146			if ( selector ) {
8147				delegateElement.on( eventName, selector, handlerProxy );
8148			} else {
8149				element.on( eventName, handlerProxy );
8150			}
8151		} );
8152	},
8153
8154	_off: function( element, eventName ) {
8155		eventName = ( eventName || "" ).split( " " ).join( this.eventNamespace + " " ) +
8156			this.eventNamespace;
8157		element.off( eventName );
8158
8159		// Clear the stack to avoid memory leaks (#10056)
8160		this.bindings = $( this.bindings.not( element ).get() );
8161		this.focusable = $( this.focusable.not( element ).get() );
8162		this.hoverable = $( this.hoverable.not( element ).get() );
8163	},
8164
8165	_delay: function( handler, delay ) {
8166		function handlerProxy() {
8167			return ( typeof handler === "string" ? instance[ handler ] : handler )
8168				.apply( instance, arguments );
8169		}
8170		var instance = this;
8171		return setTimeout( handlerProxy, delay || 0 );
8172	},
8173
8174	_hoverable: function( element ) {
8175		this.hoverable = this.hoverable.add( element );
8176		this._on( element, {
8177			mouseenter: function( event ) {
8178				this._addClass( $( event.currentTarget ), null, "ui-state-hover" );
8179			},
8180			mouseleave: function( event ) {
8181				this._removeClass( $( event.currentTarget ), null, "ui-state-hover" );
8182			}
8183		} );
8184	},
8185
8186	_focusable: function( element ) {
8187		this.focusable = this.focusable.add( element );
8188		this._on( element, {
8189			focusin: function( event ) {
8190				this._addClass( $( event.currentTarget ), null, "ui-state-focus" );
8191			},
8192			focusout: function( event ) {
8193				this._removeClass( $( event.currentTarget ), null, "ui-state-focus" );
8194			}
8195		} );
8196	},
8197
8198	_trigger: function( type, event, data ) {
8199		var prop, orig;
8200		var callback = this.options[ type ];
8201
8202		data = data || {};
8203		event = $.Event( event );
8204		event.type = ( type === this.widgetEventPrefix ?
8205			type :
8206			this.widgetEventPrefix + type ).toLowerCase();
8207
8208		// The original event may come from any element
8209		// so we need to reset the target on the new event
8210		event.target = this.element[ 0 ];
8211
8212		// Copy original event properties over to the new event
8213		orig = event.originalEvent;
8214		if ( orig ) {
8215			for ( prop in orig ) {
8216				if ( !( prop in event ) ) {
8217					event[ prop ] = orig[ prop ];
8218				}
8219			}
8220		}
8221
8222		this.element.trigger( event, data );
8223		return !( typeof callback === "function" &&
8224			callback.apply( this.element[ 0 ], [ event ].concat( data ) ) === false ||
8225			event.isDefaultPrevented() );
8226	}
8227};
8228
8229$.each( { show: "fadeIn", hide: "fadeOut" }, function( method, defaultEffect ) {
8230	$.Widget.prototype[ "_" + method ] = function( element, options, callback ) {
8231		if ( typeof options === "string" ) {
8232			options = { effect: options };
8233		}
8234
8235		var hasOptions;
8236		var effectName = !options ?
8237			method :
8238			options === true || typeof options === "number" ?
8239				defaultEffect :
8240				options.effect || defaultEffect;
8241
8242		options = options || {};
8243		if ( typeof options === "number" ) {
8244			options = { duration: options };
8245		} else if ( options === true ) {
8246			options = {};
8247		}
8248
8249		hasOptions = !$.isEmptyObject( options );
8250		options.complete = callback;
8251
8252		if ( options.delay ) {
8253			element.delay( options.delay );
8254		}
8255
8256		if ( hasOptions && $.effects && $.effects.effect[ effectName ] ) {
8257			element[ method ]( options );
8258		} else if ( effectName !== method && element[ effectName ] ) {
8259			element[ effectName ]( options.duration, options.easing, callback );
8260		} else {
8261			element.queue( function( next ) {
8262				$( this )[ method ]();
8263				if ( callback ) {
8264					callback.call( element[ 0 ] );
8265				}
8266				next();
8267			} );
8268		}
8269	};
8270} );
8271
8272var widget = $.widget;
8273
8274
8275/*!
8276 * jQuery UI Position 1.14.
vendor: 3,861 bytes, lines 8276-8419
82760
8277 * https://jqueryui.com
8278 *
8279 * Copyright OpenJS Foundation and other contributors
8280 * Released under the MIT license.
8281 * https://jquery.org/license
8282 *
8283 * https://api.jqueryui.com/position/
8284 */
8285
8286//>>label: Position
8287//>>group: Core
8288//>>description: Positions elements relative to other elements.
8289//>>docs: https://api.jqueryui.com/position/
8290//>>demos: https://jqueryui.com/position/
8291
8292
8293( function() {
8294var cachedScrollbarWidth,
8295	max = Math.max,
8296	abs = Math.abs,
8297	rhorizontal = /left|center|right/,
8298	rvertical = /top|center|bottom/,
8299	roffset = /[\+\-]\d+(\.[\d]+)?%?/,
8300	rposition = /^\w+/,
8301	rpercent = /%$/,
8302	_position = $.fn.position;
8303
8304function getOffsets( offsets, width, height ) {
8305	return [
8306		parseFloat( offsets[ 0 ] ) * ( rpercent.test( offsets[ 0 ] ) ? width / 100 : 1 ),
8307		parseFloat( offsets[ 1 ] ) * ( rpercent.test( offsets[ 1 ] ) ? height / 100 : 1 )
8308	];
8309}
8310
8311function parseCss( element, property ) {
8312	return parseInt( $.css( element, property ), 10 ) || 0;
8313}
8314
8315function isWindow( obj ) {
8316	return obj != null && obj === obj.window;
8317}
8318
8319function getDimensions( elem ) {
8320	var raw = elem[ 0 ];
8321	if ( raw.nodeType === 9 ) {
8322		return {
8323			width: elem.width(),
8324			height: elem.height(),
8325			offset: { top: 0, left: 0 }
8326		};
8327	}
8328	if ( isWindow( raw ) ) {
8329		return {
8330			width: elem.width(),
8331			height: elem.height(),
8332			offset: { top: elem.scrollTop(), left: elem.scrollLeft() }
8333		};
8334	}
8335	if ( raw.preventDefault ) {
8336		return {
8337			width: 0,
8338			height: 0,
8339			offset: { top: raw.pageY, left: raw.pageX }
8340		};
8341	}
8342	return {
8343		width: elem.outerWidth(),
8344		height: elem.outerHeight(),
8345		offset: elem.offset()
8346	};
8347}
8348
8349$.position = {
8350	scrollbarWidth: function() {
8351		if ( cachedScrollbarWidth !== undefined ) {
8352			return cachedScrollbarWidth;
8353		}
8354		var w1, w2,
8355			div = $( "<div style=" +
8356				"'display:block;position:absolute;width:200px;height:200px;overflow:hidden;'>" +
8357				"<div style='height:300px;width:auto;'></div></div>" ),
8358			innerDiv = div.children()[ 0 ];
8359
8360		$( "body" ).append( div );
8361		w1 = innerDiv.offsetWidth;
8362		div.css( "overflow", "scroll" );
8363
8364		w2 = innerDiv.offsetWidth;
8365
8366		if ( w1 === w2 ) {
8367			w2 = div[ 0 ].clientWidth;
8368		}
8369
8370		div.remove();
8371
8372		return ( cachedScrollbarWidth = w1 - w2 );
8373	},
8374	getScrollInfo: function( within ) {
8375		var overflowX = within.isWindow || within.isDocument ? "" :
8376				within.element.css( "overflow-x" ),
8377			overflowY = within.isWindow || within.isDocument ? "" :
8378				within.element.css( "overflow-y" ),
8379			hasOverflowX = overflowX === "scroll" ||
8380				( overflowX === "auto" && within.width < within.element[ 0 ].scrollWidth ),
8381			hasOverflowY = overflowY === "scroll" ||
8382				( overflowY === "auto" && within.height < within.element[ 0 ].scrollHeight );
8383		return {
8384			width: hasOverflowY ? $.position.scrollbarWidth() : 0,
8385			height: hasOverflowX ? $.position.scrollbarWidth() : 0
8386		};
8387	},
8388	getWithinInfo: function( element ) {
8389		var withinElement = $( element || window ),
8390			isElemWindow = isWindow( withinElement[ 0 ] ),
8391			isDocument = !!withinElement[ 0 ] && withinElement[ 0 ].nodeType === 9,
8392			hasOffset = !isElemWindow && !isDocument;
8393		return {
8394			element: withinElement,
8395			isWindow: isElemWindow,
8396			isDocument: isDocument,
8397			offset: hasOffset ? $( element ).offset() : { left: 0, top: 0 },
8398			scrollLeft: withinElement.scrollLeft(),
8399			scrollTop: withinElement.scrollTop(),
8400			width: withinElement.outerWidth(),
8401			height: withinElement.outerHeight()
8402		};
8403	}
8404};
8405
8406$.fn.position = function( options ) {
8407	if ( !options || !options.of ) {
8408		return _position.apply( this, arguments );
8409	}
8410
8411	// Make a copy, we don't want to modify arguments
8412	options = $.extend( {}, options );
8413
8414	var atOffset, targetWidth, targetHeight, targetOffset, basePosition, dimensions,
8415
8416		// Make sure string options are treated as CSS selectors
8417		target = typeof options.of === "string" ?
8418			$( document ).find( options.of ) :
8419			$( options.of ),
vendor: 10,992 bytes, lines 8420-8773
8420
8421		within = $.position.getWithinInfo( options.within ),
8422		scrollInfo = $.position.getScrollInfo( within ),
8423		collision = ( options.collision || "flip" ).split( " " ),
8424		offsets = {};
8425
8426	dimensions = getDimensions( target );
8427	if ( target[ 0 ].preventDefault ) {
8428
8429		// Force left top to allow flipping
8430		options.at = "left top";
8431	}
8432	targetWidth = dimensions.width;
8433	targetHeight = dimensions.height;
8434	targetOffset = dimensions.offset;
8435
8436	// Clone to reuse original targetOffset later
8437	basePosition = $.extend( {}, targetOffset );
8438
8439	// Force my and at to have valid horizontal and vertical positions
8440	// if a value is missing or invalid, it will be converted to center
8441	$.each( [ "my", "at" ], function() {
8442		var pos = ( options[ this ] || "" ).split( " " ),
8443			horizontalOffset,
8444			verticalOffset;
8445
8446		if ( pos.length === 1 ) {
8447			pos = rhorizontal.test( pos[ 0 ] ) ?
8448				pos.concat( [ "center" ] ) :
8449				rvertical.test( pos[ 0 ] ) ?
8450					[ "center" ].concat( pos ) :
8451					[ "center", "center" ];
8452		}
8453		pos[ 0 ] = rhorizontal.test( pos[ 0 ] ) ? pos[ 0 ] : "center";
8454		pos[ 1 ] = rvertical.test( pos[ 1 ] ) ? pos[ 1 ] : "center";
8455
8456		// Calculate offsets
8457		horizontalOffset = roffset.exec( pos[ 0 ] );
8458		verticalOffset = roffset.exec( pos[ 1 ] );
8459		offsets[ this ] = [
8460			horizontalOffset ? horizontalOffset[ 0 ] : 0,
8461			verticalOffset ? verticalOffset[ 0 ] : 0
8462		];
8463
8464		// Reduce to just the positions without the offsets
8465		options[ this ] = [
8466			rposition.exec( pos[ 0 ] )[ 0 ],
8467			rposition.exec( pos[ 1 ] )[ 0 ]
8468		];
8469	} );
8470
8471	// Normalize collision option
8472	if ( collision.length === 1 ) {
8473		collision[ 1 ] = collision[ 0 ];
8474	}
8475
8476	if ( options.at[ 0 ] === "right" ) {
8477		basePosition.left += targetWidth;
8478	} else if ( options.at[ 0 ] === "center" ) {
8479		basePosition.left += targetWidth / 2;
8480	}
8481
8482	if ( options.at[ 1 ] === "bottom" ) {
8483		basePosition.top += targetHeight;
8484	} else if ( options.at[ 1 ] === "center" ) {
8485		basePosition.top += targetHeight / 2;
8486	}
8487
8488	atOffset = getOffsets( offsets.at, targetWidth, targetHeight );
8489	basePosition.left += atOffset[ 0 ];
8490	basePosition.top += atOffset[ 1 ];
8491
8492	return this.each( function() {
8493		var collisionPosition, using,
8494			elem = $( this ),
8495			elemWidth = elem.outerWidth(),
8496			elemHeight = elem.outerHeight(),
8497			marginLeft = parseCss( this, "marginLeft" ),
8498			marginTop = parseCss( this, "marginTop" ),
8499			collisionWidth = elemWidth + marginLeft + parseCss( this, "marginRight" ) +
8500				scrollInfo.width,
8501			collisionHeight = elemHeight + marginTop + parseCss( this, "marginBottom" ) +
8502				scrollInfo.height,
8503			position = $.extend( {}, basePosition ),
8504			myOffset = getOffsets( offsets.my, elem.outerWidth(), elem.outerHeight() );
8505
8506		if ( options.my[ 0 ] === "right" ) {
8507			position.left -= elemWidth;
8508		} else if ( options.my[ 0 ] === "center" ) {
8509			position.left -= elemWidth / 2;
8510		}
8511
8512		if ( options.my[ 1 ] === "bottom" ) {
8513			position.top -= elemHeight;
8514		} else if ( options.my[ 1 ] === "center" ) {
8515			position.top -= elemHeight / 2;
8516		}
8517
8518		position.left += myOffset[ 0 ];
8519		position.top += myOffset[ 1 ];
8520
8521		collisionPosition = {
8522			marginLeft: marginLeft,
8523			marginTop: marginTop
8524		};
8525
8526		$.each( [ "left", "top" ], function( i, dir ) {
8527			if ( $.ui.position[ collision[ i ] ] ) {
8528				$.ui.position[ collision[ i ] ][ dir ]( position, {
8529					targetWidth: targetWidth,
8530					targetHeight: targetHeight,
8531					elemWidth: elemWidth,
8532					elemHeight: elemHeight,
8533					collisionPosition: collisionPosition,
8534					collisionWidth: collisionWidth,
8535					collisionHeight: collisionHeight,
8536					offset: [ atOffset[ 0 ] + myOffset[ 0 ], atOffset [ 1 ] + myOffset[ 1 ] ],
8537					my: options.my,
8538					at: options.at,
8539					within: within,
8540					elem: elem
8541				} );
8542			}
8543		} );
8544
8545		if ( options.using ) {
8546
8547			// Adds feedback as second argument to using callback, if present
8548			using = function( props ) {
8549				var left = targetOffset.left - position.left,
8550					right = left + targetWidth - elemWidth,
8551					top = targetOffset.top - position.top,
8552					bottom = top + targetHeight - elemHeight,
8553					feedback = {
8554						target: {
8555							element: target,
8556							left: targetOffset.left,
8557							top: targetOffset.top,
8558							width: targetWidth,
8559							height: targetHeight
8560						},
8561						element: {
8562							element: elem,
8563							left: position.left,
8564							top: position.top,
8565							width: elemWidth,
8566							height: elemHeight
8567						},
8568						horizontal: right < 0 ? "left" : left > 0 ? "right" : "center",
8569						vertical: bottom < 0 ? "top" : top > 0 ? "bottom" : "middle"
8570					};
8571				if ( targetWidth < elemWidth && abs( left + right ) < targetWidth ) {
8572					feedback.horizontal = "center";
8573				}
8574				if ( targetHeight < elemHeight && abs( top + bottom ) < targetHeight ) {
8575					feedback.vertical = "middle";
8576				}
8577				if ( max( abs( left ), abs( right ) ) > max( abs( top ), abs( bottom ) ) ) {
8578					feedback.important = "horizontal";
8579				} else {
8580					feedback.important = "vertical";
8581				}
8582				options.using.call( this, props, feedback );
8583			};
8584		}
8585
8586		elem.offset( $.extend( position, { using: using } ) );
8587	} );
8588};
8589
8590$.ui.position = {
8591	fit: {
8592		left: function( position, data ) {
8593			var within = data.within,
8594				withinOffset = within.isWindow ? within.scrollLeft : within.offset.left,
8595				outerWidth = within.width,
8596				collisionPosLeft = position.left - data.collisionPosition.marginLeft,
8597				overLeft = withinOffset - collisionPosLeft,
8598				overRight = collisionPosLeft + data.collisionWidth - outerWidth - withinOffset,
8599				newOverRight;
8600
8601			// Element is wider than within
8602			if ( data.collisionWidth > outerWidth ) {
8603
8604				// Element is initially over the left side of within
8605				if ( overLeft > 0 && overRight <= 0 ) {
8606					newOverRight = position.left + overLeft + data.collisionWidth - outerWidth -
8607						withinOffset;
8608					position.left += overLeft - newOverRight;
8609
8610				// Element is initially over right side of within
8611				} else if ( overRight > 0 && overLeft <= 0 ) {
8612					position.left = withinOffset;
8613
8614				// Element is initially over both left and right sides of within
8615				} else {
8616					if ( overLeft > overRight ) {
8617						position.left = withinOffset + outerWidth - data.collisionWidth;
8618					} else {
8619						position.left = withinOffset;
8620					}
8621				}
8622
8623			// Too far left -> align with left edge
8624			} else if ( overLeft > 0 ) {
8625				position.left += overLeft;
8626
8627			// Too far right -> align with right edge
8628			} else if ( overRight > 0 ) {
8629				position.left -= overRight;
8630
8631			// Adjust based on position and margin
8632			} else {
8633				position.left = max( position.left - collisionPosLeft, position.left );
8634			}
8635		},
8636		top: function( position, data ) {
8637			var within = data.within,
8638				withinOffset = within.isWindow ? within.scrollTop : within.offset.top,
8639				outerHeight = data.within.height,
8640				collisionPosTop = position.top - data.collisionPosition.marginTop,
8641				overTop = withinOffset - collisionPosTop,
8642				overBottom = collisionPosTop + data.collisionHeight - outerHeight - withinOffset,
8643				newOverBottom;
8644
8645			// Element is taller than within
8646			if ( data.collisionHeight > outerHeight ) {
8647
8648				// Element is initially over the top of within
8649				if ( overTop > 0 && overBottom <= 0 ) {
8650					newOverBottom = position.top + overTop + data.collisionHeight - outerHeight -
8651						withinOffset;
8652					position.top += overTop - newOverBottom;
8653
8654				// Element is initially over bottom of within
8655				} else if ( overBottom > 0 && overTop <= 0 ) {
8656					position.top = withinOffset;
8657
8658				// Element is initially over both top and bottom of within
8659				} else {
8660					if ( overTop > overBottom ) {
8661						position.top = withinOffset + outerHeight - data.collisionHeight;
8662					} else {
8663						position.top = withinOffset;
8664					}
8665				}
8666
8667			// Too far up -> align with top
8668			} else if ( overTop > 0 ) {
8669				position.top += overTop;
8670
8671			// Too far down -> align with bottom edge
8672			} else if ( overBottom > 0 ) {
8673				position.top -= overBottom;
8674
8675			// Adjust based on position and margin
8676			} else {
8677				position.top = max( position.top - collisionPosTop, position.top );
8678			}
8679		}
8680	},
8681	flip: {
8682		left: function( position, data ) {
8683			var within = data.within,
8684				withinOffset = within.offset.left + within.scrollLeft,
8685				outerWidth = within.width,
8686				offsetLeft = within.isWindow ? within.scrollLeft : within.offset.left,
8687				collisionPosLeft = position.left - data.collisionPosition.marginLeft,
8688				overLeft = collisionPosLeft - offsetLeft,
8689				overRight = collisionPosLeft + data.collisionWidth - outerWidth - offsetLeft,
8690				myOffset = data.my[ 0 ] === "left" ?
8691					-data.elemWidth :
8692					data.my[ 0 ] === "right" ?
8693						data.elemWidth :
8694						0,
8695				atOffset = data.at[ 0 ] === "left" ?
8696					data.targetWidth :
8697					data.at[ 0 ] === "right" ?
8698						-data.targetWidth :
8699						0,
8700				offset = -2 * data.offset[ 0 ],
8701				newOverRight,
8702				newOverLeft;
8703
8704			if ( overLeft < 0 ) {
8705				newOverRight = position.left + myOffset + atOffset + offset + data.collisionWidth -
8706					outerWidth - withinOffset;
8707				if ( newOverRight < 0 || newOverRight < abs( overLeft ) ) {
8708					position.left += myOffset + atOffset + offset;
8709				}
8710			} else if ( overRight > 0 ) {
8711				newOverLeft = position.left - data.collisionPosition.marginLeft + myOffset +
8712					atOffset + offset - offsetLeft;
8713				if ( newOverLeft > 0 || abs( newOverLeft ) < overRight ) {
8714					position.left += myOffset + atOffset + offset;
8715				}
8716			}
8717		},
8718		top: function( position, data ) {
8719			var within = data.within,
8720				withinOffset = within.offset.top + within.scrollTop,
8721				outerHeight = within.height,
8722				offsetTop = within.isWindow ? within.scrollTop : within.offset.top,
8723				collisionPosTop = position.top - data.collisionPosition.marginTop,
8724				overTop = collisionPosTop - offsetTop,
8725				overBottom = collisionPosTop + data.collisionHeight - outerHeight - offsetTop,
8726				top = data.my[ 1 ] === "top",
8727				myOffset = top ?
8728					-data.elemHeight :
8729					data.my[ 1 ] === "bottom" ?
8730						data.elemHeight :
8731						0,
8732				atOffset = data.at[ 1 ] === "top" ?
8733					data.targetHeight :
8734					data.at[ 1 ] === "bottom" ?
8735						-data.targetHeight :
8736						0,
8737				offset = -2 * data.offset[ 1 ],
8738				newOverTop,
8739				newOverBottom;
8740			if ( overTop < 0 ) {
8741				newOverBottom = position.top + myOffset + atOffset + offset + data.collisionHeight -
8742					outerHeight - withinOffset;
8743				if ( newOverBottom < 0 || newOverBottom < abs( overTop ) ) {
8744					position.top += myOffset + atOffset + offset;
8745				}
8746			} else if ( overBottom > 0 ) {
8747				newOverTop = position.top - data.collisionPosition.marginTop + myOffset + atOffset +
8748					offset - offsetTop;
8749				if ( newOverTop > 0 || abs( newOverTop ) < overBottom ) {
8750					position.top += myOffset + atOffset + offset;
8751				}
8752			}
8753		}
8754	},
8755	flipfit: {
8756		left: function() {
8757			$.ui.position.flip.left.apply( this, arguments );
8758			$.ui.position.fit.left.apply( this, arguments );
8759		},
8760		top: function() {
8761			$.ui.position.flip.top.apply( this, arguments );
8762			$.ui.position.fit.top.apply( this, arguments );
8763		}
8764	}
8765};
8766
8767} )();
8768
8769var position = $.ui.position;
8770
8771
8772/*!
8773 * jQuery UI :data 1.1
87734.0
8774 * https://jqueryui.com
8775 *
8776 * Copyright OpenJS Foundation and other contributors
8777 * Released under the MIT license.
8778 * https://jquery.org/license
8779 */
8780
8781//>>label: :data Selector
8782//>>group: Core
8783//>>description: Selects elements which have data stored under the specified key.
8784//>>docs: https://api.jqueryui.com/data-selector/
8785
8786
8787var data = $.extend( $.expr.pseudos, {
8788	data: $.expr.createPseudo( function( dataName ) {
8789		return function( elem ) {
8790			return !!$.data( elem, dataName );
8791		};
8792	} )
8793} );
8794
8795/*!
8796 * jQuery UI Disable Selection 1.14.0
vendor: 16,993 bytes, lines 8796-9516
8796
8797 * https://jqueryui.com
8798 *
8799 * Copyright OpenJS Foundation and other contributors
8800 * Released under the MIT license.
8801 * https://jquery.org/license
8802 */
8803
8804//>>label: disableSelection
8805//>>group: Core
8806//>>description: Disable selection of text content within the set of matched elements.
8807//>>docs: https://api.jqueryui.com/disableSelection/
8808
8809// This file is deprecated
8810
8811var disableSelection = $.fn.extend( {
8812	disableSelection: ( function() {
8813		var eventType = "onselectstart" in document.createElement( "div" ) ?
8814			"selectstart" :
8815			"mousedown";
8816
8817		return function() {
8818			return this.on( eventType + ".ui-disableSelection", function( event ) {
8819				event.preventDefault();
8820			} );
8821		};
8822	} )(),
8823
8824	enableSelection: function() {
8825		return this.off( ".ui-disableSelection" );
8826	}
8827} );
8828
8829
8830
8831// Create a local jQuery because jQuery Color relies on it and the
8832// global may not exist with AMD and a custom build (#10199).
8833// This module is a noop if used as a regular AMD module.
8834// eslint-disable-next-line no-unused-vars
8835var jQuery = $;
8836
8837
8838/*!
8839 * jQuery Color Animations v3.0.0
8840 * https://github.com/jquery/jquery-color
8841 *
8842 * Copyright OpenJS Foundation and other contributors
8843 * Released under the MIT license.
8844 * https://jquery.org/license
8845 *
8846 * Date: Wed May 15 16:49:44 2024 +0200
8847 */
8848
8849
8850	var stepHooks = "backgroundColor borderBottomColor borderLeftColor borderRightColor " +
8851		"borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor",
8852
8853	class2type = {},
8854	toString = class2type.toString,
8855
8856	// plusequals test for += 100 -= 100
8857	rplusequals = /^([\-+])=\s*(\d+\.?\d*)/,
8858
8859	// a set of RE's that can match strings and generate color tuples.
8860	stringParsers = [ {
8861			re: /rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,
8862			parse: function( execResult ) {
8863				return [
8864					execResult[ 1 ],
8865					execResult[ 2 ],
8866					execResult[ 3 ],
8867					execResult[ 4 ]
8868				];
8869			}
8870		}, {
8871			re: /rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,
8872			parse: function( execResult ) {
8873				return [
8874					execResult[ 1 ] * 2.55,
8875					execResult[ 2 ] * 2.55,
8876					execResult[ 3 ] * 2.55,
8877					execResult[ 4 ]
8878				];
8879			}
8880		}, {
8881
8882			// this regex ignores A-F because it's compared against an already lowercased string
8883			re: /#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})?/,
8884			parse: function( execResult ) {
8885				return [
8886					parseInt( execResult[ 1 ], 16 ),
8887					parseInt( execResult[ 2 ], 16 ),
8888					parseInt( execResult[ 3 ], 16 ),
8889					execResult[ 4 ] ?
8890						( parseInt( execResult[ 4 ], 16 ) / 255 ).toFixed( 2 ) :
8891						1
8892				];
8893			}
8894		}, {
8895
8896			// this regex ignores A-F because it's compared against an already lowercased string
8897			re: /#([a-f0-9])([a-f0-9])([a-f0-9])([a-f0-9])?/,
8898			parse: function( execResult ) {
8899				return [
8900					parseInt( execResult[ 1 ] + execResult[ 1 ], 16 ),
8901					parseInt( execResult[ 2 ] + execResult[ 2 ], 16 ),
8902					parseInt( execResult[ 3 ] + execResult[ 3 ], 16 ),
8903					execResult[ 4 ] ?
8904						( parseInt( execResult[ 4 ] + execResult[ 4 ], 16 ) / 255 )
8905							.toFixed( 2 ) :
8906						1
8907				];
8908			}
8909		}, {
8910			re: /hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,
8911			space: "hsla",
8912			parse: function( execResult ) {
8913				return [
8914					execResult[ 1 ],
8915					execResult[ 2 ] / 100,
8916					execResult[ 3 ] / 100,
8917					execResult[ 4 ]
8918				];
8919			}
8920		} ],
8921
8922	// jQuery.Color( )
8923	color = jQuery.Color = function( color, green, blue, alpha ) {
8924		return new jQuery.Color.fn.parse( color, green, blue, alpha );
8925	},
8926	spaces = {
8927		rgba: {
8928			props: {
8929				red: {
8930					idx: 0,
8931					type: "byte"
8932				},
8933				green: {
8934					idx: 1,
8935					type: "byte"
8936				},
8937				blue: {
8938					idx: 2,
8939					type: "byte"
8940				}
8941			}
8942		},
8943
8944		hsla: {
8945			props: {
8946				hue: {
8947					idx: 0,
8948					type: "degrees"
8949				},
8950				saturation: {
8951					idx: 1,
8952					type: "percent"
8953				},
8954				lightness: {
8955					idx: 2,
8956					type: "percent"
8957				}
8958			}
8959		}
8960	},
8961	propTypes = {
8962		"byte": {
8963			floor: true,
8964			max: 255
8965		},
8966		"percent": {
8967			max: 1
8968		},
8969		"degrees": {
8970			mod: 360,
8971			floor: true
8972		}
8973	},
8974
8975	// colors = jQuery.Color.names
8976	colors,
8977
8978	// local aliases of functions called often
8979	each = jQuery.each;
8980
8981// define cache name and alpha properties
8982// for rgba and hsla spaces
8983each( spaces, function( spaceName, space ) {
8984	space.cache = "_" + spaceName;
8985	space.props.alpha = {
8986		idx: 3,
8987		type: "percent",
8988		def: 1
8989	};
8990} );
8991
8992// Populate the class2type map
8993jQuery.each( "Boolean Number String Function Array Date RegExp Object Error Symbol".split( " " ),
8994	function( _i, name ) {
8995		class2type[ "[object " + name + "]" ] = name.toLowerCase();
8996	} );
8997
8998function getType( obj ) {
8999	if ( obj == null ) {
9000		return obj + "";
9001	}
9002
9003	return typeof obj === "object" ?
9004		class2type[ toString.call( obj ) ] || "object" :
9005		typeof obj;
9006}
9007
9008function clamp( value, prop, allowEmpty ) {
9009	var type = propTypes[ prop.type ] || {};
9010
9011	if ( value == null ) {
9012		return ( allowEmpty || !prop.def ) ? null : prop.def;
9013	}
9014
9015	// ~~ is an short way of doing floor for positive numbers
9016	value = type.floor ? ~~value : parseFloat( value );
9017
9018	if ( type.mod ) {
9019
9020		// we add mod before modding to make sure that negatives values
9021		// get converted properly: -10 -> 350
9022		return ( value + type.mod ) % type.mod;
9023	}
9024
9025	// for now all property types without mod have min and max
9026	return Math.min( type.max, Math.max( 0, value ) );
9027}
9028
9029function stringParse( string ) {
9030	var inst = color(),
9031		rgba = inst._rgba = [];
9032
9033	string = string.toLowerCase();
9034
9035	each( stringParsers, function( _i, parser ) {
9036		var parsed,
9037			match = parser.re.exec( string ),
9038			values = match && parser.parse( match ),
9039			spaceName = parser.space || "rgba";
9040
9041		if ( values ) {
9042			parsed = inst[ spaceName ]( values );
9043
9044			// if this was an rgba parse the assignment might happen twice
9045			// oh well....
9046			inst[ spaces[ spaceName ].cache ] = parsed[ spaces[ spaceName ].cache ];
9047			rgba = inst._rgba = parsed._rgba;
9048
9049			// exit each( stringParsers ) here because we matched
9050			return false;
9051		}
9052	} );
9053
9054	// Found a stringParser that handled it
9055	if ( rgba.length ) {
9056
9057		// if this came from a parsed string, force "transparent" when alpha is 0
9058		// chrome, (and maybe others) return "transparent" as rgba(0,0,0,0)
9059		if ( rgba.join() === "0,0,0,0" ) {
9060			jQuery.extend( rgba, colors.transparent );
9061		}
9062		return inst;
9063	}
9064
9065	// named colors
9066	return colors[ string ];
9067}
9068
9069color.fn = jQuery.extend( color.prototype, {
9070	parse: function( red, green, blue, alpha ) {
9071		if ( red === undefined ) {
9072			this._rgba = [ null, null, null, null ];
9073			return this;
9074		}
9075		if ( red.jquery || red.nodeType ) {
9076			red = jQuery( red ).css( green );
9077			green = undefined;
9078		}
9079
9080		var inst = this,
9081			type = getType( red ),
9082			rgba = this._rgba = [];
9083
9084		// more than 1 argument specified - assume ( red, green, blue, alpha )
9085		if ( green !== undefined ) {
9086			red = [ red, green, blue, alpha ];
9087			type = "array";
9088		}
9089
9090		if ( type === "string" ) {
9091			return this.parse( stringParse( red ) || colors._default );
9092		}
9093
9094		if ( type === "array" ) {
9095			each( spaces.rgba.props, function( _key, prop ) {
9096				rgba[ prop.idx ] = clamp( red[ prop.idx ], prop );
9097			} );
9098			return this;
9099		}
9100
9101		if ( type === "object" ) {
9102			if ( red instanceof color ) {
9103				each( spaces, function( _spaceName, space ) {
9104					if ( red[ space.cache ] ) {
9105						inst[ space.cache ] = red[ space.cache ].slice();
9106					}
9107				} );
9108			} else {
9109				each( spaces, function( _spaceName, space ) {
9110					var cache = space.cache;
9111					each( space.props, function( key, prop ) {
9112
9113						// if the cache doesn't exist, and we know how to convert
9114						if ( !inst[ cache ] && space.to ) {
9115
9116							// if the value was null, we don't need to copy it
9117							// if the key was alpha, we don't need to copy it either
9118							if ( key === "alpha" || red[ key ] == null ) {
9119								return;
9120							}
9121							inst[ cache ] = space.to( inst._rgba );
9122						}
9123
9124						// this is the only case where we allow nulls for ALL properties.
9125						// call clamp with alwaysAllowEmpty
9126						inst[ cache ][ prop.idx ] = clamp( red[ key ], prop, true );
9127					} );
9128
9129					// everything defined but alpha?
9130					if ( inst[ cache ] && jQuery.inArray(
9131						null,
9132						inst[ cache ].slice( 0, 3 )
9133					) < 0 ) {
9134
9135						// use the default of 1
9136						if ( inst[ cache ][ 3 ] == null ) {
9137							inst[ cache ][ 3 ] = 1;
9138						}
9139
9140						if ( space.from ) {
9141							inst._rgba = space.from( inst[ cache ] );
9142						}
9143					}
9144				} );
9145			}
9146			return this;
9147		}
9148	},
9149	is: function( compare ) {
9150		var is = color( compare ),
9151			same = true,
9152			inst = this;
9153
9154		each( spaces, function( _, space ) {
9155			var localCache,
9156				isCache = is[ space.cache ];
9157			if ( isCache ) {
9158				localCache = inst[ space.cache ] || space.to && space.to( inst._rgba ) || [];
9159				each( space.props, function( _, prop ) {
9160					if ( isCache[ prop.idx ] != null ) {
9161						same = ( isCache[ prop.idx ] === localCache[ prop.idx ] );
9162						return same;
9163					}
9164				} );
9165			}
9166			return same;
9167		} );
9168		return same;
9169	},
9170	_space: function() {
9171		var used = [],
9172			inst = this;
9173		each( spaces, function( spaceName, space ) {
9174			if ( inst[ space.cache ] ) {
9175				used.push( spaceName );
9176			}
9177		} );
9178		return used.pop();
9179	},
9180	transition: function( other, distance ) {
9181		var end = color( other ),
9182			spaceName = end._space(),
9183			space = spaces[ spaceName ],
9184			startColor = this.alpha() === 0 ? color( "transparent" ) : this,
9185			start = startColor[ space.cache ] || space.to( startColor._rgba ),
9186			result = start.slice();
9187
9188		end = end[ space.cache ];
9189		each( space.props, function( _key, prop ) {
9190			var index = prop.idx,
9191				startValue = start[ index ],
9192				endValue = end[ index ],
9193				type = propTypes[ prop.type ] || {};
9194
9195			// if null, don't override start value
9196			if ( endValue === null ) {
9197				return;
9198			}
9199
9200			// if null - use end
9201			if ( startValue === null ) {
9202				result[ index ] = endValue;
9203			} else {
9204				if ( type.mod ) {
9205					if ( endValue - startValue > type.mod / 2 ) {
9206						startValue += type.mod;
9207					} else if ( startValue - endValue > type.mod / 2 ) {
9208						startValue -= type.mod;
9209					}
9210				}
9211				result[ index ] = clamp( ( endValue - startValue ) * distance + startValue, prop );
9212			}
9213		} );
9214		return this[ spaceName ]( result );
9215	},
9216	blend: function( opaque ) {
9217
9218		// if we are already opaque - return ourself
9219		if ( this._rgba[ 3 ] === 1 ) {
9220			return this;
9221		}
9222
9223		var rgb = this._rgba.slice(),
9224			a = rgb.pop(),
9225			blend = color( opaque )._rgba;
9226
9227		return color( jQuery.map( rgb, function( v, i ) {
9228			return ( 1 - a ) * blend[ i ] + a * v;
9229		} ) );
9230	},
9231	toRgbaString: function() {
9232		var prefix = "rgba(",
9233			rgba = jQuery.map( this._rgba, function( v, i ) {
9234				if ( v != null ) {
9235					return v;
9236				}
9237				return i > 2 ? 1 : 0;
9238			} );
9239
9240		if ( rgba[ 3 ] === 1 ) {
9241			rgba.pop();
9242			prefix = "rgb(";
9243		}
9244
9245		return prefix + rgba.join( ", " ) + ")";
9246	},
9247	toHslaString: function() {
9248		var prefix = "hsla(",
9249			hsla = jQuery.map( this.hsla(), function( v, i ) {
9250				if ( v == null ) {
9251					v = i > 2 ? 1 : 0;
9252				}
9253
9254				// catch 1 and 2
9255				if ( i && i < 3 ) {
9256					v = Math.round( v * 100 ) + "%";
9257				}
9258				return v;
9259			} );
9260
9261		if ( hsla[ 3 ] === 1 ) {
9262			hsla.pop();
9263			prefix = "hsl(";
9264		}
9265		return prefix + hsla.join( ", " ) + ")";
9266	},
9267	toHexString: function( includeAlpha ) {
9268		var rgba = this._rgba.slice(),
9269			alpha = rgba.pop();
9270
9271		if ( includeAlpha ) {
9272			rgba.push( ~~( alpha * 255 ) );
9273		}
9274
9275		return "#" + jQuery.map( rgba, function( v ) {
9276
9277			// default to 0 when nulls exist
9278			return ( "0" + ( v || 0 ).toString( 16 ) ).substr( -2 );
9279		} ).join( "" );
9280	},
9281	toString: function() {
9282		return this.toRgbaString();
9283	}
9284} );
9285color.fn.parse.prototype = color.fn;
9286
9287// hsla conversions adapted from:
9288// https://code.google.com/p/maashaack/source/browse/packages/graphics/trunk/src/graphics/colors/HUE2RGB.as?r=5021
9289
9290function hue2rgb( p, q, h ) {
9291	h = ( h + 1 ) % 1;
9292	if ( h * 6 < 1 ) {
9293		return p + ( q - p ) * h * 6;
9294	}
9295	if ( h * 2 < 1 ) {
9296		return q;
9297	}
9298	if ( h * 3 < 2 ) {
9299		return p + ( q - p ) * ( ( 2 / 3 ) - h ) * 6;
9300	}
9301	return p;
9302}
9303
9304spaces.hsla.to = function( rgba ) {
9305	if ( rgba[ 0 ] == null || rgba[ 1 ] == null || rgba[ 2 ] == null ) {
9306		return [ null, null, null, rgba[ 3 ] ];
9307	}
9308	var r = rgba[ 0 ] / 255,
9309		g = rgba[ 1 ] / 255,
9310		b = rgba[ 2 ] / 255,
9311		a = rgba[ 3 ],
9312		max = Math.max( r, g, b ),
9313		min = Math.min( r, g, b ),
9314		diff = max - min,
9315		add = max + min,
9316		l = add * 0.5,
9317		h, s;
9318
9319	if ( min === max ) {
9320		h = 0;
9321	} else if ( r === max ) {
9322		h = ( 60 * ( g - b ) / diff ) + 360;
9323	} else if ( g === max ) {
9324		h = ( 60 * ( b - r ) / diff ) + 120;
9325	} else {
9326		h = ( 60 * ( r - g ) / diff ) + 240;
9327	}
9328
9329	// chroma (diff) == 0 means greyscale which, by definition, saturation = 0%
9330	// otherwise, saturation is based on the ratio of chroma (diff) to lightness (add)
9331	if ( diff === 0 ) {
9332		s = 0;
9333	} else if ( l <= 0.5 ) {
9334		s = diff / add;
9335	} else {
9336		s = diff / ( 2 - add );
9337	}
9338	return [ Math.round( h ) % 360, s, l, a == null ? 1 : a ];
9339};
9340
9341spaces.hsla.from = function( hsla ) {
9342	if ( hsla[ 0 ] == null || hsla[ 1 ] == null || hsla[ 2 ] == null ) {
9343		return [ null, null, null, hsla[ 3 ] ];
9344	}
9345	var h = hsla[ 0 ] / 360,
9346		s = hsla[ 1 ],
9347		l = hsla[ 2 ],
9348		a = hsla[ 3 ],
9349		q = l <= 0.5 ? l * ( 1 + s ) : l + s - l * s,
9350		p = 2 * l - q;
9351
9352	return [
9353		Math.round( hue2rgb( p, q, h + ( 1 / 3 ) ) * 255 ),
9354		Math.round( hue2rgb( p, q, h ) * 255 ),
9355		Math.round( hue2rgb( p, q, h - ( 1 / 3 ) ) * 255 ),
9356		a
9357	];
9358};
9359
9360
9361each( spaces, function( spaceName, space ) {
9362	var props = space.props,
9363		cache = space.cache,
9364		to = space.to,
9365		from = space.from;
9366
9367	// makes rgba() and hsla()
9368	color.fn[ spaceName ] = function( value ) {
9369
9370		// generate a cache for this space if it doesn't exist
9371		if ( to && !this[ cache ] ) {
9372			this[ cache ] = to( this._rgba );
9373		}
9374		if ( value === undefined ) {
9375			return this[ cache ].slice();
9376		}
9377
9378		var ret,
9379			type = getType( value ),
9380			arr = ( type === "array" || type === "object" ) ? value : arguments,
9381			local = this[ cache ].slice();
9382
9383		each( props, function( key, prop ) {
9384			var val = arr[ type === "object" ? key : prop.idx ];
9385			if ( val == null ) {
9386				val = local[ prop.idx ];
9387			}
9388			local[ prop.idx ] = clamp( val, prop );
9389		} );
9390
9391		if ( from ) {
9392			ret = color( from( local ) );
9393			ret[ cache ] = local;
9394			return ret;
9395		} else {
9396			return color( local );
9397		}
9398	};
9399
9400	// makes red() green() blue() alpha() hue() saturation() lightness()
9401	each( props, function( key, prop ) {
9402
9403		// alpha is included in more than one space
9404		if ( color.fn[ key ] ) {
9405			return;
9406		}
9407		color.fn[ key ] = function( value ) {
9408			var local, cur, match, fn,
9409				vtype = getType( value );
9410
9411			if ( key === "alpha" ) {
9412				fn = this._hsla ? "hsla" : "rgba";
9413			} else {
9414				fn = spaceName;
9415			}
9416			local = this[ fn ]();
9417			cur = local[ prop.idx ];
9418
9419			if ( vtype === "undefined" ) {
9420				return cur;
9421			}
9422
9423			if ( vtype === "function" ) {
9424				value = value.call( this, cur );
9425				vtype = getType( value );
9426			}
9427			if ( value == null && prop.empty ) {
9428				return this;
9429			}
9430			if ( vtype === "string" ) {
9431				match = rplusequals.exec( value );
9432				if ( match ) {
9433					value = cur + parseFloat( match[ 2 ] ) * ( match[ 1 ] === "+" ? 1 : -1 );
9434				}
9435			}
9436			local[ prop.idx ] = value;
9437			return this[ fn ]( local );
9438		};
9439	} );
9440} );
9441
9442// add cssHook and .fx.step function for each named hook.
9443// accept a space separated string of properties
9444color.hook = function( hook ) {
9445	var hooks = hook.split( " " );
9446	each( hooks, function( _i, hook ) {
9447		jQuery.cssHooks[ hook ] = {
9448			set: function( elem, value ) {
9449				var parsed;
9450
9451				if ( value !== "transparent" &&
9452					( getType( value ) !== "string" ||
9453						( parsed = stringParse( value ) ) ) ) {
9454					value = color( parsed || value );
9455					value = value.toRgbaString();
9456				}
9457				elem.style[ hook ] = value;
9458			}
9459		};
9460		jQuery.fx.step[ hook ] = function( fx ) {
9461			if ( !fx.colorInit ) {
9462				fx.start = color( fx.elem, hook );
9463				fx.end = color( fx.end );
9464				fx.colorInit = true;
9465			}
9466			jQuery.cssHooks[ hook ].set( fx.elem, fx.start.transition( fx.end, fx.pos ) );
9467		};
9468	} );
9469
9470};
9471
9472color.hook( stepHooks );
9473
9474jQuery.cssHooks.borderColor = {
9475	expand: function( value ) {
9476		var expanded = {};
9477
9478		each( [ "Top", "Right", "Bottom", "Left" ], function( _i, part ) {
9479			expanded[ "border" + part + "Color" ] = value;
9480		} );
9481		return expanded;
9482	}
9483};
9484
9485// Basic color names only.
9486// Usage of any of the other color names requires adding yourself or including
9487// jquery.color.svg-names.js.
9488colors = jQuery.Color.names = {
9489
9490	// 4.1. Basic color keywords
9491	aqua: "#00ffff",
9492	black: "#000000",
9493	blue: "#0000ff",
9494	fuchsia: "#ff00ff",
9495	gray: "#808080",
9496	green: "#008000",
9497	lime: "#00ff00",
9498	maroon: "#800000",
9499	navy: "#000080",
9500	olive: "#808000",
9501	purple: "#800080",
9502	red: "#ff0000",
9503	silver: "#c0c0c0",
9504	teal: "#008080",
9505	white: "#ffffff",
9506	yellow: "#ffff00",
9507
9508	// 4.2.3. "transparent" color keyword
9509	transparent: [ null, null, null, 0 ],
9510
9511	_default: "#ffffff"
9512};
9513
9514
9515/*!
9516 * jQuery UI Effects 1.14.
95160
9517 * https://jqueryui.com
9518 *
9519 * Copyright OpenJS Foundation and other contributors
9520 * Released under the MIT license.
9521 * https://jquery.org/license
9522 */
9523
9524//>>label: Effects Core
9525//>>group: Effects
9526/* eslint-disable max-len */
9527//>>description: Extends the internal jQuery effects. Includes morphing and easing. Required by all other effects.
9528/* eslint-enable max-len */
vendor: 7,523 bytes, lines 9528-9818
9528
9529//>>docs: https://api.jqueryui.com/category/effects-core/
9530//>>demos: https://jqueryui.com/effect/
9531
9532
9533var dataSpace = "ui-effects-",
9534	dataSpaceStyle = "ui-effects-style",
9535	dataSpaceAnimated = "ui-effects-animated";
9536
9537$.effects = {
9538	effect: {}
9539};
9540
9541/******************************************************************************/
9542/****************************** CLASS ANIMATIONS ******************************/
9543/******************************************************************************/
9544( function() {
9545
9546var classAnimationActions = [ "add", "remove", "toggle" ],
9547	shorthandStyles = {
9548		border: 1,
9549		borderBottom: 1,
9550		borderColor: 1,
9551		borderLeft: 1,
9552		borderRight: 1,
9553		borderTop: 1,
9554		borderWidth: 1,
9555		margin: 1,
9556		padding: 1
9557	};
9558
9559$.each(
9560	[ "borderLeftStyle", "borderRightStyle", "borderBottomStyle", "borderTopStyle" ],
9561	function( _, prop ) {
9562		$.fx.step[ prop ] = function( fx ) {
9563			if ( fx.end !== "none" && !fx.setAttr || fx.pos === 1 && !fx.setAttr ) {
9564				jQuery.style( fx.elem, prop, fx.end );
9565				fx.setAttr = true;
9566			}
9567		};
9568	}
9569);
9570
9571function camelCase( string ) {
9572	return string.replace( /-([\da-z])/gi, function( all, letter ) {
9573		return letter.toUpperCase();
9574	} );
9575}
9576
9577function getElementStyles( elem ) {
9578	var key, len,
9579		style = elem.ownerDocument.defaultView.getComputedStyle( elem ),
9580		styles = {};
9581
9582	len = style.length;
9583	while ( len-- ) {
9584		key = style[ len ];
9585		if ( typeof style[ key ] === "string" ) {
9586			styles[ camelCase( key ) ] = style[ key ];
9587		}
9588	}
9589
9590	return styles;
9591}
9592
9593function styleDifference( oldStyle, newStyle ) {
9594	var diff = {},
9595		name, value;
9596
9597	for ( name in newStyle ) {
9598		value = newStyle[ name ];
9599		if ( oldStyle[ name ] !== value ) {
9600			if ( !shorthandStyles[ name ] ) {
9601				if ( $.fx.step[ name ] || !isNaN( parseFloat( value ) ) ) {
9602					diff[ name ] = value;
9603				}
9604			}
9605		}
9606	}
9607
9608	return diff;
9609}
9610
9611$.effects.animateClass = function( value, duration, easing, callback ) {
9612	var o = $.speed( duration, easing, callback );
9613
9614	return this.queue( function() {
9615		var animated = $( this ),
9616			baseClass = animated.attr( "class" ) || "",
9617			applyClassChange,
9618			allAnimations = o.children ? animated.find( "*" ).addBack() : animated;
9619
9620		// Map the animated objects to store the original styles.
9621		allAnimations = allAnimations.map( function() {
9622			var el = $( this );
9623			return {
9624				el: el,
9625				start: getElementStyles( this )
9626			};
9627		} );
9628
9629		// Apply class change
9630		applyClassChange = function() {
9631			$.each( classAnimationActions, function( i, action ) {
9632				if ( value[ action ] ) {
9633					animated[ action + "Class" ]( value[ action ] );
9634				}
9635			} );
9636		};
9637		applyClassChange();
9638
9639		// Map all animated objects again - calculate new styles and diff
9640		allAnimations = allAnimations.map( function() {
9641			this.end = getElementStyles( this.el[ 0 ] );
9642			this.diff = styleDifference( this.start, this.end );
9643			return this;
9644		} );
9645
9646		// Apply original class
9647		animated.attr( "class", baseClass );
9648
9649		// Map all animated objects again - this time collecting a promise
9650		allAnimations = allAnimations.map( function() {
9651			var styleInfo = this,
9652				dfd = $.Deferred(),
9653				opts = $.extend( {}, o, {
9654					queue: false,
9655					complete: function() {
9656						dfd.resolve( styleInfo );
9657					}
9658				} );
9659
9660			this.el.animate( this.diff, opts );
9661			return dfd.promise();
9662		} );
9663
9664		// Once all animations have completed:
9665		$.when.apply( $, allAnimations.get() ).done( function() {
9666
9667			// Set the final class
9668			applyClassChange();
9669
9670			// For each animated element,
9671			// clear all css properties that were animated
9672			$.each( arguments, function() {
9673				var el = this.el;
9674				$.each( this.diff, function( key ) {
9675					el.css( key, "" );
9676				} );
9677			} );
9678
9679			// This is guarnteed to be there if you use jQuery.speed()
9680			// it also handles dequeuing the next anim...
9681			o.complete.call( animated[ 0 ] );
9682		} );
9683	} );
9684};
9685
9686$.fn.extend( {
9687	addClass: ( function( orig ) {
9688		return function( classNames, speed, easing, callback ) {
9689			return speed ?
9690				$.effects.animateClass.call( this,
9691					{ add: classNames }, speed, easing, callback ) :
9692				orig.apply( this, arguments );
9693		};
9694	} )( $.fn.addClass ),
9695
9696	removeClass: ( function( orig ) {
9697		return function( classNames, speed, easing, callback ) {
9698			return arguments.length > 1 ?
9699				$.effects.animateClass.call( this,
9700					{ remove: classNames }, speed, easing, callback ) :
9701				orig.apply( this, arguments );
9702		};
9703	} )( $.fn.removeClass ),
9704
9705	toggleClass: ( function( orig ) {
9706		return function( classNames, force, speed, easing, callback ) {
9707			if ( typeof force === "boolean" || force === undefined ) {
9708				if ( !speed ) {
9709
9710					// Without speed parameter
9711					return orig.apply( this, arguments );
9712				} else {
9713					return $.effects.animateClass.call( this,
9714						( force ? { add: classNames } : { remove: classNames } ),
9715						speed, easing, callback );
9716				}
9717			} else {
9718
9719				// Without force parameter
9720				return $.effects.animateClass.call( this,
9721					{ toggle: classNames }, force, speed, easing );
9722			}
9723		};
9724	} )( $.fn.toggleClass ),
9725
9726	switchClass: function( remove, add, speed, easing, callback ) {
9727		return $.effects.animateClass.call( this, {
9728			add: add,
9729			remove: remove
9730		}, speed, easing, callback );
9731	}
9732} );
9733
9734} )();
9735
9736/******************************************************************************/
9737/*********************************** EFFECTS **********************************/
9738/******************************************************************************/
9739
9740( function() {
9741
9742if ( $.expr && $.expr.pseudos && $.expr.pseudos.animated ) {
9743	$.expr.pseudos.animated = ( function( orig ) {
9744		return function( elem ) {
9745			return !!$( elem ).data( dataSpaceAnimated ) || orig( elem );
9746		};
9747	} )( $.expr.pseudos.animated );
9748}
9749
9750if ( $.uiBackCompat === true ) {
9751	$.extend( $.effects, {
9752
9753		// Saves a set of properties in a data storage
9754		save: function( element, set ) {
9755			var i = 0, length = set.length;
9756			for ( ; i < length; i++ ) {
9757				if ( set[ i ] !== null ) {
9758					element.data( dataSpace + set[ i ], element[ 0 ].style[ set[ i ] ] );
9759				}
9760			}
9761		},
9762
9763		// Restores a set of previously saved properties from a data storage
9764		restore: function( element, set ) {
9765			var val, i = 0, length = set.length;
9766			for ( ; i < length; i++ ) {
9767				if ( set[ i ] !== null ) {
9768					val = element.data( dataSpace + set[ i ] );
9769					element.css( set[ i ], val );
9770				}
9771			}
9772		},
9773
9774		setMode: function( el, mode ) {
9775			if ( mode === "toggle" ) {
9776				mode = el.is( ":hidden" ) ? "show" : "hide";
9777			}
9778			return mode;
9779		},
9780
9781		// Wraps the element around a wrapper that copies position properties
9782		createWrapper: function( element ) {
9783
9784			// If the element is already wrapped, return it
9785			if ( element.parent().is( ".ui-effects-wrapper" ) ) {
9786				return element.parent();
9787			}
9788
9789			// Wrap the element
9790			var props = {
9791					width: element.outerWidth( true ),
9792					height: element.outerHeight( true ),
9793					"float": element.css( "float" )
9794				},
9795				wrapper = $( "<div></div>" )
9796					.addClass( "ui-effects-wrapper" )
9797					.css( {
9798						fontSize: "100%",
9799						background: "transparent",
9800						border: "none",
9801						margin: 0,
9802						padding: 0
9803					} ),
9804
9805				// Store the size in case width/height are defined in % - Fixes #5245
9806				size = {
9807					width: element.width(),
9808					height: element.height()
9809				},
9810				active = document.activeElement;
9811
9812			// Support: Firefox
9813			// Firefox incorrectly exposes anonymous content
9814			// https://bugzilla.mozilla.org/show_bug.cgi?id=561664
9815			try {
9816				// eslint-disable-next-line no-unused-expressions
9817				active.id;
9818			} catch ( 
vendor: 1,550 bytes, lines 9818-9879
9818e ) {
9819				active = document.body;
9820			}
9821
9822			element.wrap( wrapper );
9823
9824			// Fixes #7595 - Elements lose focus when wrapped.
9825			if ( element[ 0 ] === active || $.contains( element[ 0 ], active ) ) {
9826				$( active ).trigger( "focus" );
9827			}
9828
9829			// Hotfix for jQuery 1.4 since some change in wrap() seems to actually
9830			// lose the reference to the wrapped element
9831			wrapper = element.parent();
9832
9833			// Transfer positioning properties to the wrapper
9834			if ( element.css( "position" ) === "static" ) {
9835				wrapper.css( { position: "relative" } );
9836				element.css( { position: "relative" } );
9837			} else {
9838				$.extend( props, {
9839					position: element.css( "position" ),
9840					zIndex: element.css( "z-index" )
9841				} );
9842				$.each( [ "top", "left", "bottom", "right" ], function( i, pos ) {
9843					props[ pos ] = element.css( pos );
9844					if ( isNaN( parseInt( props[ pos ], 10 ) ) ) {
9845						props[ pos ] = "auto";
9846					}
9847				} );
9848				element.css( {
9849					position: "relative",
9850					top: 0,
9851					left: 0,
9852					right: "auto",
9853					bottom: "auto"
9854				} );
9855			}
9856			element.css( size );
9857
9858			return wrapper.css( props ).show();
9859		},
9860
9861		removeWrapper: function( element ) {
9862			var active = document.activeElement;
9863
9864			if ( element.parent().is( ".ui-effects-wrapper" ) ) {
9865				element.parent().replaceWith( element );
9866
9867				// Fixes #7595 - Elements lose focus when wrapped.
9868				if ( element[ 0 ] === active || $.contains( element[ 0 ], active ) ) {
9869					$( active ).trigger( "focus" );
9870				}
9871			}
9872
9873			return element;
9874		}
9875	} );
9876}
9877
9878$.extend( $.effects, {
9879	version: "1.14.0
vendor: 6,301 bytes, lines 9879-10147
9879",
9880
9881	define: function( name, mode, effect ) {
9882		if ( !effect ) {
9883			effect = mode;
9884			mode = "effect";
9885		}
9886
9887		$.effects.effect[ name ] = effect;
9888		$.effects.effect[ name ].mode = mode;
9889
9890		return effect;
9891	},
9892
9893	scaledDimensions: function( element, percent, direction ) {
9894		if ( percent === 0 ) {
9895			return {
9896				height: 0,
9897				width: 0,
9898				outerHeight: 0,
9899				outerWidth: 0
9900			};
9901		}
9902
9903		var x = direction !== "horizontal" ? ( ( percent || 100 ) / 100 ) : 1,
9904			y = direction !== "vertical" ? ( ( percent || 100 ) / 100 ) : 1;
9905
9906		return {
9907			height: element.height() * y,
9908			width: element.width() * x,
9909			outerHeight: element.outerHeight() * y,
9910			outerWidth: element.outerWidth() * x
9911		};
9912
9913	},
9914
9915	clipToBox: function( animation ) {
9916		return {
9917			width: animation.clip.right - animation.clip.left,
9918			height: animation.clip.bottom - animation.clip.top,
9919			left: animation.clip.left,
9920			top: animation.clip.top
9921		};
9922	},
9923
9924	// Injects recently queued functions to be first in line (after "inprogress")
9925	unshift: function( element, queueLength, count ) {
9926		var queue = element.queue();
9927
9928		if ( queueLength > 1 ) {
9929			queue.splice.apply( queue,
9930				[ 1, 0 ].concat( queue.splice( queueLength, count ) ) );
9931		}
9932		element.dequeue();
9933	},
9934
9935	saveStyle: function( element ) {
9936		element.data( dataSpaceStyle, element[ 0 ].style.cssText );
9937	},
9938
9939	restoreStyle: function( element ) {
9940		element[ 0 ].style.cssText = element.data( dataSpaceStyle ) || "";
9941		element.removeData( dataSpaceStyle );
9942	},
9943
9944	mode: function( element, mode ) {
9945		var hidden = element.is( ":hidden" );
9946
9947		if ( mode === "toggle" ) {
9948			mode = hidden ? "show" : "hide";
9949		}
9950		if ( hidden ? mode === "hide" : mode === "show" ) {
9951			mode = "none";
9952		}
9953		return mode;
9954	},
9955
9956	// Translates a [top,left] array into a baseline value
9957	getBaseline: function( origin, original ) {
9958		var y, x;
9959
9960		switch ( origin[ 0 ] ) {
9961		case "top":
9962			y = 0;
9963			break;
9964		case "middle":
9965			y = 0.5;
9966			break;
9967		case "bottom":
9968			y = 1;
9969			break;
9970		default:
9971			y = origin[ 0 ] / original.height;
9972		}
9973
9974		switch ( origin[ 1 ] ) {
9975		case "left":
9976			x = 0;
9977			break;
9978		case "center":
9979			x = 0.5;
9980			break;
9981		case "right":
9982			x = 1;
9983			break;
9984		default:
9985			x = origin[ 1 ] / original.width;
9986		}
9987
9988		return {
9989			x: x,
9990			y: y
9991		};
9992	},
9993
9994	// Creates a placeholder element so that the original element can be made absolute
9995	createPlaceholder: function( element ) {
9996		var placeholder,
9997			cssPosition = element.css( "position" ),
9998			position = element.position();
9999
10000		// Lock in margins first to account for form elements, which
10001		// will change margin if you explicitly set height
10002		// see: https://jsfiddle.net/JZSMt/3/ https://bugs.webkit.org/show_bug.cgi?id=107380
10003		// Support: Safari
10004		element.css( {
10005			marginTop: element.css( "marginTop" ),
10006			marginBottom: element.css( "marginBottom" ),
10007			marginLeft: element.css( "marginLeft" ),
10008			marginRight: element.css( "marginRight" )
10009		} )
10010		.outerWidth( element.outerWidth() )
10011		.outerHeight( element.outerHeight() );
10012
10013		if ( /^(static|relative)/.test( cssPosition ) ) {
10014			cssPosition = "absolute";
10015
10016			placeholder = $( "<" + element[ 0 ].nodeName + ">" ).insertAfter( element ).css( {
10017
10018				// Convert inline to inline block to account for inline elements
10019				// that turn to inline block based on content (like img)
10020				display: /^(inline|ruby)/.test( element.css( "display" ) ) ?
10021					"inline-block" :
10022					"block",
10023				visibility: "hidden",
10024
10025				// Margins need to be set to account for margin collapse
10026				marginTop: element.css( "marginTop" ),
10027				marginBottom: element.css( "marginBottom" ),
10028				marginLeft: element.css( "marginLeft" ),
10029				marginRight: element.css( "marginRight" ),
10030				"float": element.css( "float" )
10031			} )
10032			.outerWidth( element.outerWidth() )
10033			.outerHeight( element.outerHeight() )
10034			.addClass( "ui-effects-placeholder" );
10035
10036			element.data( dataSpace + "placeholder", placeholder );
10037		}
10038
10039		element.css( {
10040			position: cssPosition,
10041			left: position.left,
10042			top: position.top
10043		} );
10044
10045		return placeholder;
10046	},
10047
10048	removePlaceholder: function( element ) {
10049		var dataKey = dataSpace + "placeholder",
10050				placeholder = element.data( dataKey );
10051
10052		if ( placeholder ) {
10053			placeholder.remove();
10054			element.removeData( dataKey );
10055		}
10056	},
10057
10058	// Removes a placeholder if it exists and restores
10059	// properties that were modified during placeholder creation
10060	cleanUp: function( element ) {
10061		$.effects.restoreStyle( element );
10062		$.effects.removePlaceholder( element );
10063	},
10064
10065	setTransition: function( element, list, factor, value ) {
10066		value = value || {};
10067		$.each( list, function( i, x ) {
10068			var unit = element.cssUnit( x );
10069			if ( unit[ 0 ] > 0 ) {
10070				value[ x ] = unit[ 0 ] * factor + unit[ 1 ];
10071			}
10072		} );
10073		return value;
10074	}
10075} );
10076
10077// Return an effect options object for the given parameters:
10078function _normalizeArguments( effect, options, speed, callback ) {
10079
10080	// Allow passing all options as the first parameter
10081	if ( $.isPlainObject( effect ) ) {
10082		options = effect;
10083		effect = effect.effect;
10084	}
10085
10086	// Convert to an object
10087	effect = { effect: effect };
10088
10089	// Catch (effect, null, ...)
10090	if ( options == null ) {
10091		options = {};
10092	}
10093
10094	// Catch (effect, callback)
10095	if ( typeof options === "function" ) {
10096		callback = options;
10097		speed = null;
10098		options = {};
10099	}
10100
10101	// Catch (effect, speed, ?)
10102	if ( typeof options === "number" || $.fx.speeds[ options ] ) {
10103		callback = speed;
10104		speed = options;
10105		options = {};
10106	}
10107
10108	// Catch (effect, options, callback)
10109	if ( typeof speed === "function" ) {
10110		callback = speed;
10111		speed = null;
10112	}
10113
10114	// Add options to effect
10115	if ( options ) {
10116		$.extend( effect, options );
10117	}
10118
10119	speed = speed || options.duration;
10120	effect.duration = $.fx.off ? 0 :
10121		typeof speed === "number" ? speed :
10122		speed in $.fx.speeds ? $.fx.speeds[ speed ] :
10123		$.fx.speeds._default;
10124
10125	effect.complete = callback || options.complete;
10126
10127	return effect;
10128}
10129
10130function standardAnimationOption( option ) {
10131
10132	// Valid standard speeds (nothing, number, named speed)
10133	if ( !option || typeof option === "number" || $.fx.speeds[ option ] ) {
10134		return true;
10135	}
10136
10137	// Invalid strings - treat as "normal" speed
10138	if ( typeof option === "string" && !$.effects.effect[ option ] ) {
10139		return true;
10140	}
10141
10142	// Complete callback
10143	if ( typeof option === "function" ) {
10144		return true;
10145	}
10146
10147	// Options hash (but not naming an effect)
vendor: 8,038 bytes, lines 10148-10447
10148	if ( typeof option === "object" && !option.effect ) {
10149		return true;
10150	}
10151
10152	// Didn't match any standard API
10153	return false;
10154}
10155
10156$.fn.extend( {
10157	effect: function( /* effect, options, speed, callback */ ) {
10158		var args = _normalizeArguments.apply( this, arguments ),
10159			effectMethod = $.effects.effect[ args.effect ],
10160			defaultMode = effectMethod.mode,
10161			queue = args.queue,
10162			queueName = queue || "fx",
10163			complete = args.complete,
10164			mode = args.mode,
10165			modes = [],
10166			prefilter = function( next ) {
10167				var el = $( this ),
10168					normalizedMode = $.effects.mode( el, mode ) || defaultMode;
10169
10170				// Sentinel for duck-punching the :animated pseudo-selector
10171				el.data( dataSpaceAnimated, true );
10172
10173				// Save effect mode for later use,
10174				// we can't just call $.effects.mode again later,
10175				// as the .show() below destroys the initial state
10176				modes.push( normalizedMode );
10177
10178				// See $.uiBackCompat inside of run() for removal of defaultMode in 1.14
10179				if ( defaultMode && ( normalizedMode === "show" ||
10180						( normalizedMode === defaultMode && normalizedMode === "hide" ) ) ) {
10181					el.show();
10182				}
10183
10184				if ( !defaultMode || normalizedMode !== "none" ) {
10185					$.effects.saveStyle( el );
10186				}
10187
10188				if ( typeof next === "function" ) {
10189					next();
10190				}
10191			};
10192
10193		if ( $.fx.off || !effectMethod ) {
10194
10195			// Delegate to the original method (e.g., .show()) if possible
10196			if ( mode ) {
10197				return this[ mode ]( args.duration, complete );
10198			} else {
10199				return this.each( function() {
10200					if ( complete ) {
10201						complete.call( this );
10202					}
10203				} );
10204			}
10205		}
10206
10207		function run( next ) {
10208			var elem = $( this );
10209
10210			function cleanup() {
10211				elem.removeData( dataSpaceAnimated );
10212
10213				$.effects.cleanUp( elem );
10214
10215				if ( args.mode === "hide" ) {
10216					elem.hide();
10217				}
10218
10219				done();
10220			}
10221
10222			function done() {
10223				if ( typeof complete === "function" ) {
10224					complete.call( elem[ 0 ] );
10225				}
10226
10227				if ( typeof next === "function" ) {
10228					next();
10229				}
10230			}
10231
10232			// Override mode option on a per element basis,
10233			// as toggle can be either show or hide depending on element state
10234			args.mode = modes.shift();
10235
10236			if ( $.uiBackCompat === true && !defaultMode ) {
10237				if ( elem.is( ":hidden" ) ? mode === "hide" : mode === "show" ) {
10238
10239					// Call the core method to track "olddisplay" properly
10240					elem[ mode ]();
10241					done();
10242				} else {
10243					effectMethod.call( elem[ 0 ], args, done );
10244				}
10245			} else {
10246				if ( args.mode === "none" ) {
10247
10248					// Call the core method to track "olddisplay" properly
10249					elem[ mode ]();
10250					done();
10251				} else {
10252					effectMethod.call( elem[ 0 ], args, cleanup );
10253				}
10254			}
10255		}
10256
10257		// Run prefilter on all elements first to ensure that
10258		// any showing or hiding happens before placeholder creation,
10259		// which ensures that any layout changes are correctly captured.
10260		return queue === false ?
10261			this.each( prefilter ).each( run ) :
10262			this.queue( queueName, prefilter ).queue( queueName, run );
10263	},
10264
10265	show: ( function( orig ) {
10266		return function( option ) {
10267			if ( standardAnimationOption( option ) ) {
10268				return orig.apply( this, arguments );
10269			} else {
10270				var args = _normalizeArguments.apply( this, arguments );
10271				args.mode = "show";
10272				return this.effect.call( this, args );
10273			}
10274		};
10275	} )( $.fn.show ),
10276
10277	hide: ( function( orig ) {
10278		return function( option ) {
10279			if ( standardAnimationOption( option ) ) {
10280				return orig.apply( this, arguments );
10281			} else {
10282				var args = _normalizeArguments.apply( this, arguments );
10283				args.mode = "hide";
10284				return this.effect.call( this, args );
10285			}
10286		};
10287	} )( $.fn.hide ),
10288
10289	toggle: ( function( orig ) {
10290		return function( option ) {
10291			if ( standardAnimationOption( option ) || typeof option === "boolean" ) {
10292				return orig.apply( this, arguments );
10293			} else {
10294				var args = _normalizeArguments.apply( this, arguments );
10295				args.mode = "toggle";
10296				return this.effect.call( this, args );
10297			}
10298		};
10299	} )( $.fn.toggle ),
10300
10301	cssUnit: function( key ) {
10302		var style = this.css( key ),
10303			val = [];
10304
10305		$.each( [ "em", "px", "%", "pt" ], function( i, unit ) {
10306			if ( style.indexOf( unit ) > 0 ) {
10307				val = [ parseFloat( style ), unit ];
10308			}
10309		} );
10310		return val;
10311	},
10312
10313	cssClip: function( clipObj ) {
10314		if ( clipObj ) {
10315			return this.css( "clip", "rect(" + clipObj.top + "px " + clipObj.right + "px " +
10316				clipObj.bottom + "px " + clipObj.left + "px)" );
10317		}
10318		return parseClip( this.css( "clip" ), this );
10319	},
10320
10321	transfer: function( options, done ) {
10322		var element = $( this ),
10323			target = $( options.to ),
10324			targetFixed = target.css( "position" ) === "fixed",
10325			body = $( "body" ),
10326			fixTop = targetFixed ? body.scrollTop() : 0,
10327			fixLeft = targetFixed ? body.scrollLeft() : 0,
10328			endPosition = target.offset(),
10329			animation = {
10330				top: endPosition.top - fixTop,
10331				left: endPosition.left - fixLeft,
10332				height: target.innerHeight(),
10333				width: target.innerWidth()
10334			},
10335			startPosition = element.offset(),
10336			transfer = $( "<div class='ui-effects-transfer'></div>" );
10337
10338		transfer
10339			.appendTo( "body" )
10340			.addClass( options.className )
10341			.css( {
10342				top: startPosition.top - fixTop,
10343				left: startPosition.left - fixLeft,
10344				height: element.innerHeight(),
10345				width: element.innerWidth(),
10346				position: targetFixed ? "fixed" : "absolute"
10347			} )
10348			.animate( animation, options.duration, options.easing, function() {
10349				transfer.remove();
10350				if ( typeof done === "function" ) {
10351					done();
10352				}
10353			} );
10354	}
10355} );
10356
10357function parseClip( str, element ) {
10358		var outerWidth = element.outerWidth(),
10359			outerHeight = element.outerHeight(),
10360			clipRegex = /^rect\((-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto)\)$/,
10361			values = clipRegex.exec( str ) || [ "", 0, outerWidth, outerHeight, 0 ];
10362
10363		return {
10364			top: parseFloat( values[ 1 ] ) || 0,
10365			right: values[ 2 ] === "auto" ? outerWidth : parseFloat( values[ 2 ] ),
10366			bottom: values[ 3 ] === "auto" ? outerHeight : parseFloat( values[ 3 ] ),
10367			left: parseFloat( values[ 4 ] ) || 0
10368		};
10369}
10370
10371$.fx.step.clip = function( fx ) {
10372	if ( !fx.clipInit ) {
10373		fx.start = $( fx.elem ).cssClip();
10374		if ( typeof fx.end === "string" ) {
10375			fx.end = parseClip( fx.end, fx.elem );
10376		}
10377		fx.clipInit = true;
10378	}
10379
10380	$( fx.elem ).cssClip( {
10381		top: fx.pos * ( fx.end.top - fx.start.top ) + fx.start.top,
10382		right: fx.pos * ( fx.end.right - fx.start.right ) + fx.start.right,
10383		bottom: fx.pos * ( fx.end.bottom - fx.start.bottom ) + fx.start.bottom,
10384		left: fx.pos * ( fx.end.left - fx.start.left ) + fx.start.left
10385	} );
10386};
10387
10388} )();
10389
10390/******************************************************************************/
10391/*********************************** EASING ***********************************/
10392/******************************************************************************/
10393
10394( function() {
10395
10396// Based on easing equations from Robert Penner (http://robertpenner.com/easing)
10397
10398var baseEasings = {};
10399
10400$.each( [ "Quad", "Cubic", "Quart", "Quint", "Expo" ], function( i, name ) {
10401	baseEasings[ name ] = function( p ) {
10402		return Math.pow( p, i + 2 );
10403	};
10404} );
10405
10406$.extend( baseEasings, {
10407	Sine: function( p ) {
10408		return 1 - Math.cos( p * Math.PI / 2 );
10409	},
10410	Circ: function( p ) {
10411		return 1 - Math.sqrt( 1 - p * p );
10412	},
10413	Elastic: function( p ) {
10414		return p === 0 || p === 1 ? p :
10415			-Math.pow( 2, 8 * ( p - 1 ) ) * Math.sin( ( ( p - 1 ) * 80 - 7.5 ) * Math.PI / 15 );
10416	},
10417	Back: function( p ) {
10418		return p * p * ( 3 * p - 2 );
10419	},
10420	Bounce: function( p ) {
10421		var pow2,
10422			bounce = 4;
10423
10424		while ( p < ( ( pow2 = Math.pow( 2, --bounce ) ) - 1 ) / 11 ) {}
10425		return 1 / Math.pow( 4, 3 - bounce ) - 7.5625 * Math.pow( ( pow2 * 3 - 2 ) / 22 - p, 2 );
10426	}
10427} );
10428
10429$.each( baseEasings, function( name, easeIn ) {
10430	$.easing[ "easeIn" + name ] = easeIn;
10431	$.easing[ "easeOut" + name ] = function( p ) {
10432		return 1 - easeIn( 1 - p );
10433	};
10434	$.easing[ "easeInOut" + name ] = function( p ) {
10435		return p < 0.5 ?
10436			easeIn( p * 2 ) / 2 :
10437			1 - easeIn( p * -2 + 2 ) / 2;
10438	};
10439} );
10440
10441} )();
10442
10443var effect = $.effects;
10444
10445
10446/*!
10447 * jQuery UI Effects Blind 1.14.
vendor: 33,753 bytes, lines 10447-11756
104470
10448 * https://jqueryui.com
10449 *
10450 * Copyright OpenJS Foundation and other contributors
10451 * Released under the MIT license.
10452 * https://jquery.org/license
10453 */
10454
10455//>>label: Blind Effect
10456//>>group: Effects
10457//>>description: Blinds the element.
10458//>>docs: https://api.jqueryui.com/blind-effect/
10459//>>demos: https://jqueryui.com/effect/
10460
10461
10462var effectsEffectBlind = $.effects.define( "blind", "hide", function( options, done ) {
10463	var map = {
10464			up: [ "bottom", "top" ],
10465			vertical: [ "bottom", "top" ],
10466			down: [ "top", "bottom" ],
10467			left: [ "right", "left" ],
10468			horizontal: [ "right", "left" ],
10469			right: [ "left", "right" ]
10470		},
10471		element = $( this ),
10472		direction = options.direction || "up",
10473		start = element.cssClip(),
10474		animate = { clip: $.extend( {}, start ) },
10475		placeholder = $.effects.createPlaceholder( element );
10476
10477	animate.clip[ map[ direction ][ 0 ] ] = animate.clip[ map[ direction ][ 1 ] ];
10478
10479	if ( options.mode === "show" ) {
10480		element.cssClip( animate.clip );
10481		if ( placeholder ) {
10482			placeholder.css( $.effects.clipToBox( animate ) );
10483		}
10484
10485		animate.clip = start;
10486	}
10487
10488	if ( placeholder ) {
10489		placeholder.animate( $.effects.clipToBox( animate ), options.duration, options.easing );
10490	}
10491
10492	element.animate( animate, {
10493		queue: false,
10494		duration: options.duration,
10495		easing: options.easing,
10496		complete: done
10497	} );
10498} );
10499
10500
10501/*!
10502 * jQuery UI Effects Bounce 1.14.0
10503 * https://jqueryui.com
10504 *
10505 * Copyright OpenJS Foundation and other contributors
10506 * Released under the MIT license.
10507 * https://jquery.org/license
10508 */
10509
10510//>>label: Bounce Effect
10511//>>group: Effects
10512//>>description: Bounces an element horizontally or vertically n times.
10513//>>docs: https://api.jqueryui.com/bounce-effect/
10514//>>demos: https://jqueryui.com/effect/
10515
10516
10517var effectsEffectBounce = $.effects.define( "bounce", function( options, done ) {
10518	var upAnim, downAnim, refValue,
10519		element = $( this ),
10520
10521		// Defaults:
10522		mode = options.mode,
10523		hide = mode === "hide",
10524		show = mode === "show",
10525		direction = options.direction || "up",
10526		distance = options.distance,
10527		times = options.times || 5,
10528
10529		// Number of internal animations
10530		anims = times * 2 + ( show || hide ? 1 : 0 ),
10531		speed = options.duration / anims,
10532		easing = options.easing,
10533
10534		// Utility:
10535		ref = ( direction === "up" || direction === "down" ) ? "top" : "left",
10536		motion = ( direction === "up" || direction === "left" ),
10537		i = 0,
10538
10539		queuelen = element.queue().length;
10540
10541	$.effects.createPlaceholder( element );
10542
10543	refValue = element.css( ref );
10544
10545	// Default distance for the BIGGEST bounce is the outer Distance / 3
10546	if ( !distance ) {
10547		distance = element[ ref === "top" ? "outerHeight" : "outerWidth" ]() / 3;
10548	}
10549
10550	if ( show ) {
10551		downAnim = { opacity: 1 };
10552		downAnim[ ref ] = refValue;
10553
10554		// If we are showing, force opacity 0 and set the initial position
10555		// then do the "first" animation
10556		element
10557			.css( "opacity", 0 )
10558			.css( ref, motion ? -distance * 2 : distance * 2 )
10559			.animate( downAnim, speed, easing );
10560	}
10561
10562	// Start at the smallest distance if we are hiding
10563	if ( hide ) {
10564		distance = distance / Math.pow( 2, times - 1 );
10565	}
10566
10567	downAnim = {};
10568	downAnim[ ref ] = refValue;
10569
10570	// Bounces up/down/left/right then back to 0 -- times * 2 animations happen here
10571	for ( ; i < times; i++ ) {
10572		upAnim = {};
10573		upAnim[ ref ] = ( motion ? "-=" : "+=" ) + distance;
10574
10575		element
10576			.animate( upAnim, speed, easing )
10577			.animate( downAnim, speed, easing );
10578
10579		distance = hide ? distance * 2 : distance / 2;
10580	}
10581
10582	// Last Bounce when Hiding
10583	if ( hide ) {
10584		upAnim = { opacity: 0 };
10585		upAnim[ ref ] = ( motion ? "-=" : "+=" ) + distance;
10586
10587		element.animate( upAnim, speed, easing );
10588	}
10589
10590	element.queue( done );
10591
10592	$.effects.unshift( element, queuelen, anims + 1 );
10593} );
10594
10595
10596/*!
10597 * jQuery UI Effects Clip 1.14.0
10598 * https://jqueryui.com
10599 *
10600 * Copyright OpenJS Foundation and other contributors
10601 * Released under the MIT license.
10602 * https://jquery.org/license
10603 */
10604
10605//>>label: Clip Effect
10606//>>group: Effects
10607//>>description: Clips the element on and off like an old TV.
10608//>>docs: https://api.jqueryui.com/clip-effect/
10609//>>demos: https://jqueryui.com/effect/
10610
10611
10612var effectsEffectClip = $.effects.define( "clip", "hide", function( options, done ) {
10613	var start,
10614		animate = {},
10615		element = $( this ),
10616		direction = options.direction || "vertical",
10617		both = direction === "both",
10618		horizontal = both || direction === "horizontal",
10619		vertical = both || direction === "vertical";
10620
10621	start = element.cssClip();
10622	animate.clip = {
10623		top: vertical ? ( start.bottom - start.top ) / 2 : start.top,
10624		right: horizontal ? ( start.right - start.left ) / 2 : start.right,
10625		bottom: vertical ? ( start.bottom - start.top ) / 2 : start.bottom,
10626		left: horizontal ? ( start.right - start.left ) / 2 : start.left
10627	};
10628
10629	$.effects.createPlaceholder( element );
10630
10631	if ( options.mode === "show" ) {
10632		element.cssClip( animate.clip );
10633		animate.clip = start;
10634	}
10635
10636	element.animate( animate, {
10637		queue: false,
10638		duration: options.duration,
10639		easing: options.easing,
10640		complete: done
10641	} );
10642
10643} );
10644
10645
10646/*!
10647 * jQuery UI Effects Drop 1.14.0
10648 * https://jqueryui.com
10649 *
10650 * Copyright OpenJS Foundation and other contributors
10651 * Released under the MIT license.
10652 * https://jquery.org/license
10653 */
10654
10655//>>label: Drop Effect
10656//>>group: Effects
10657//>>description: Moves an element in one direction and hides it at the same time.
10658//>>docs: https://api.jqueryui.com/drop-effect/
10659//>>demos: https://jqueryui.com/effect/
10660
10661
10662var effectsEffectDrop = $.effects.define( "drop", "hide", function( options, done ) {
10663
10664	var distance,
10665		element = $( this ),
10666		mode = options.mode,
10667		show = mode === "show",
10668		direction = options.direction || "left",
10669		ref = ( direction === "up" || direction === "down" ) ? "top" : "left",
10670		motion = ( direction === "up" || direction === "left" ) ? "-=" : "+=",
10671		oppositeMotion = ( motion === "+=" ) ? "-=" : "+=",
10672		animation = {
10673			opacity: 0
10674		};
10675
10676	$.effects.createPlaceholder( element );
10677
10678	distance = options.distance ||
10679		element[ ref === "top" ? "outerHeight" : "outerWidth" ]( true ) / 2;
10680
10681	animation[ ref ] = motion + distance;
10682
10683	if ( show ) {
10684		element.css( animation );
10685
10686		animation[ ref ] = oppositeMotion + distance;
10687		animation.opacity = 1;
10688	}
10689
10690	// Animate
10691	element.animate( animation, {
10692		queue: false,
10693		duration: options.duration,
10694		easing: options.easing,
10695		complete: done
10696	} );
10697} );
10698
10699
10700/*!
10701 * jQuery UI Effects Explode 1.14.0
10702 * https://jqueryui.com
10703 *
10704 * Copyright OpenJS Foundation and other contributors
10705 * Released under the MIT license.
10706 * https://jquery.org/license
10707 */
10708
10709//>>label: Explode Effect
10710//>>group: Effects
10711/* eslint-disable max-len */
10712//>>description: Explodes an element in all directions into n pieces. Implodes an element to its original wholeness.
10713/* eslint-enable max-len */
10714//>>docs: https://api.jqueryui.com/explode-effect/
10715//>>demos: https://jqueryui.com/effect/
10716
10717
10718var effectsEffectExplode = $.effects.define( "explode", "hide", function( options, done ) {
10719
10720	var i, j, left, top, mx, my,
10721		rows = options.pieces ? Math.round( Math.sqrt( options.pieces ) ) : 3,
10722		cells = rows,
10723		element = $( this ),
10724		mode = options.mode,
10725		show = mode === "show",
10726
10727		// Show and then visibility:hidden the element before calculating offset
10728		offset = element.show().css( "visibility", "hidden" ).offset(),
10729
10730		// Width and height of a piece
10731		width = Math.ceil( element.outerWidth() / cells ),
10732		height = Math.ceil( element.outerHeight() / rows ),
10733		pieces = [];
10734
10735	// Children animate complete:
10736	function childComplete() {
10737		pieces.push( this );
10738		if ( pieces.length === rows * cells ) {
10739			animComplete();
10740		}
10741	}
10742
10743	// Clone the element for each row and cell.
10744	for ( i = 0; i < rows; i++ ) { // ===>
10745		top = offset.top + i * height;
10746		my = i - ( rows - 1 ) / 2;
10747
10748		for ( j = 0; j < cells; j++ ) { // |||
10749			left = offset.left + j * width;
10750			mx = j - ( cells - 1 ) / 2;
10751
10752			// Create a clone of the now hidden main element that will be absolute positioned
10753			// within a wrapper div off the -left and -top equal to size of our pieces
10754			element
10755				.clone()
10756				.appendTo( "body" )
10757				.wrap( "<div></div>" )
10758				.css( {
10759					position: "absolute",
10760					visibility: "visible",
10761					left: -j * width,
10762					top: -i * height
10763				} )
10764
10765				// Select the wrapper - make it overflow: hidden and absolute positioned based on
10766				// where the original was located +left and +top equal to the size of pieces
10767				.parent()
10768					.addClass( "ui-effects-explode" )
10769					.css( {
10770						position: "absolute",
10771						overflow: "hidden",
10772						width: width,
10773						height: height,
10774						left: left + ( show ? mx * width : 0 ),
10775						top: top + ( show ? my * height : 0 ),
10776						opacity: show ? 0 : 1
10777					} )
10778					.animate( {
10779						left: left + ( show ? 0 : mx * width ),
10780						top: top + ( show ? 0 : my * height ),
10781						opacity: show ? 1 : 0
10782					}, options.duration || 500, options.easing, childComplete );
10783		}
10784	}
10785
10786	function animComplete() {
10787		element.css( {
10788			visibility: "visible"
10789		} );
10790		$( pieces ).remove();
10791		done();
10792	}
10793} );
10794
10795
10796/*!
10797 * jQuery UI Effects Fade 1.14.0
10798 * https://jqueryui.com
10799 *
10800 * Copyright OpenJS Foundation and other contributors
10801 * Released under the MIT license.
10802 * https://jquery.org/license
10803 */
10804
10805//>>label: Fade Effect
10806//>>group: Effects
10807//>>description: Fades the element.
10808//>>docs: https://api.jqueryui.com/fade-effect/
10809//>>demos: https://jqueryui.com/effect/
10810
10811
10812var effectsEffectFade = $.effects.define( "fade", "toggle", function( options, done ) {
10813	var show = options.mode === "show";
10814
10815	$( this )
10816		.css( "opacity", show ? 0 : 1 )
10817		.animate( {
10818			opacity: show ? 1 : 0
10819		}, {
10820			queue: false,
10821			duration: options.duration,
10822			easing: options.easing,
10823			complete: done
10824		} );
10825} );
10826
10827
10828/*!
10829 * jQuery UI Effects Fold 1.14.0
10830 * https://jqueryui.com
10831 *
10832 * Copyright OpenJS Foundation and other contributors
10833 * Released under the MIT license.
10834 * https://jquery.org/license
10835 */
10836
10837//>>label: Fold Effect
10838//>>group: Effects
10839//>>description: Folds an element first horizontally and then vertically.
10840//>>docs: https://api.jqueryui.com/fold-effect/
10841//>>demos: https://jqueryui.com/effect/
10842
10843
10844var effectsEffectFold = $.effects.define( "fold", "hide", function( options, done ) {
10845
10846	// Create element
10847	var element = $( this ),
10848		mode = options.mode,
10849		show = mode === "show",
10850		hide = mode === "hide",
10851		size = options.size || 15,
10852		percent = /([0-9]+)%/.exec( size ),
10853		horizFirst = !!options.horizFirst,
10854		ref = horizFirst ? [ "right", "bottom" ] : [ "bottom", "right" ],
10855		duration = options.duration / 2,
10856
10857		placeholder = $.effects.createPlaceholder( element ),
10858
10859		start = element.cssClip(),
10860		animation1 = { clip: $.extend( {}, start ) },
10861		animation2 = { clip: $.extend( {}, start ) },
10862
10863		distance = [ start[ ref[ 0 ] ], start[ ref[ 1 ] ] ],
10864
10865		queuelen = element.queue().length;
10866
10867	if ( percent ) {
10868		size = parseInt( percent[ 1 ], 10 ) / 100 * distance[ hide ? 0 : 1 ];
10869	}
10870	animation1.clip[ ref[ 0 ] ] = size;
10871	animation2.clip[ ref[ 0 ] ] = size;
10872	animation2.clip[ ref[ 1 ] ] = 0;
10873
10874	if ( show ) {
10875		element.cssClip( animation2.clip );
10876		if ( placeholder ) {
10877			placeholder.css( $.effects.clipToBox( animation2 ) );
10878		}
10879
10880		animation2.clip = start;
10881	}
10882
10883	// Animate
10884	element
10885		.queue( function( next ) {
10886			if ( placeholder ) {
10887				placeholder
10888					.animate( $.effects.clipToBox( animation1 ), duration, options.easing )
10889					.animate( $.effects.clipToBox( animation2 ), duration, options.easing );
10890			}
10891
10892			next();
10893		} )
10894		.animate( animation1, duration, options.easing )
10895		.animate( animation2, duration, options.easing )
10896		.queue( done );
10897
10898	$.effects.unshift( element, queuelen, 4 );
10899} );
10900
10901
10902/*!
10903 * jQuery UI Effects Highlight 1.14.0
10904 * https://jqueryui.com
10905 *
10906 * Copyright OpenJS Foundation and other contributors
10907 * Released under the MIT license.
10908 * https://jquery.org/license
10909 */
10910
10911//>>label: Highlight Effect
10912//>>group: Effects
10913//>>description: Highlights the background of an element in a defined color for a custom duration.
10914//>>docs: https://api.jqueryui.com/highlight-effect/
10915//>>demos: https://jqueryui.com/effect/
10916
10917
10918var effectsEffectHighlight = $.effects.define( "highlight", "show", function( options, done ) {
10919	var element = $( this ),
10920		animation = {
10921			backgroundColor: element.css( "backgroundColor" )
10922		};
10923
10924	if ( options.mode === "hide" ) {
10925		animation.opacity = 0;
10926	}
10927
10928	$.effects.saveStyle( element );
10929
10930	element
10931		.css( {
10932			backgroundImage: "none",
10933			backgroundColor: options.color || "#ffff99"
10934		} )
10935		.animate( animation, {
10936			queue: false,
10937			duration: options.duration,
10938			easing: options.easing,
10939			complete: done
10940		} );
10941} );
10942
10943
10944/*!
10945 * jQuery UI Effects Size 1.14.0
10946 * https://jqueryui.com
10947 *
10948 * Copyright OpenJS Foundation and other contributors
10949 * Released under the MIT license.
10950 * https://jquery.org/license
10951 */
10952
10953//>>label: Size Effect
10954//>>group: Effects
10955//>>description: Resize an element to a specified width and height.
10956//>>docs: https://api.jqueryui.com/size-effect/
10957//>>demos: https://jqueryui.com/effect/
10958
10959
10960var effectsEffectSize = $.effects.define( "size", function( options, done ) {
10961
10962	// Create element
10963	var baseline, factor, temp,
10964		element = $( this ),
10965
10966		// Copy for children
10967		cProps = [ "fontSize" ],
10968		vProps = [ "borderTopWidth", "borderBottomWidth", "paddingTop", "paddingBottom" ],
10969		hProps = [ "borderLeftWidth", "borderRightWidth", "paddingLeft", "paddingRight" ],
10970
10971		// Set options
10972		mode = options.mode,
10973		restore = mode !== "effect",
10974		scale = options.scale || "both",
10975		origin = options.origin || [ "middle", "center" ],
10976		position = element.css( "position" ),
10977		pos = element.position(),
10978		original = $.effects.scaledDimensions( element ),
10979		from = options.from || original,
10980		to = options.to || $.effects.scaledDimensions( element, 0 );
10981
10982	$.effects.createPlaceholder( element );
10983
10984	if ( mode === "show" ) {
10985		temp = from;
10986		from = to;
10987		to = temp;
10988	}
10989
10990	// Set scaling factor
10991	factor = {
10992		from: {
10993			y: from.height / original.height,
10994			x: from.width / original.width
10995		},
10996		to: {
10997			y: to.height / original.height,
10998			x: to.width / original.width
10999		}
11000	};
11001
11002	// Scale the css box
11003	if ( scale === "box" || scale === "both" ) {
11004
11005		// Vertical props scaling
11006		if ( factor.from.y !== factor.to.y ) {
11007			from = $.effects.setTransition( element, vProps, factor.from.y, from );
11008			to = $.effects.setTransition( element, vProps, factor.to.y, to );
11009		}
11010
11011		// Horizontal props scaling
11012		if ( factor.from.x !== factor.to.x ) {
11013			from = $.effects.setTransition( element, hProps, factor.from.x, from );
11014			to = $.effects.setTransition( element, hProps, factor.to.x, to );
11015		}
11016	}
11017
11018	// Scale the content
11019	if ( scale === "content" || scale === "both" ) {
11020
11021		// Vertical props scaling
11022		if ( factor.from.y !== factor.to.y ) {
11023			from = $.effects.setTransition( element, cProps, factor.from.y, from );
11024			to = $.effects.setTransition( element, cProps, factor.to.y, to );
11025		}
11026	}
11027
11028	// Adjust the position properties based on the provided origin points
11029	if ( origin ) {
11030		baseline = $.effects.getBaseline( origin, original );
11031		from.top = ( original.outerHeight - from.outerHeight ) * baseline.y + pos.top;
11032		from.left = ( original.outerWidth - from.outerWidth ) * baseline.x + pos.left;
11033		to.top = ( original.outerHeight - to.outerHeight ) * baseline.y + pos.top;
11034		to.left = ( original.outerWidth - to.outerWidth ) * baseline.x + pos.left;
11035	}
11036	delete from.outerHeight;
11037	delete from.outerWidth;
11038	element.css( from );
11039
11040	// Animate the children if desired
11041	if ( scale === "content" || scale === "both" ) {
11042
11043		vProps = vProps.concat( [ "marginTop", "marginBottom" ] ).concat( cProps );
11044		hProps = hProps.concat( [ "marginLeft", "marginRight" ] );
11045
11046		// Only animate children with width attributes specified
11047		// TODO: is this right? should we include anything with css width specified as well
11048		element.find( "*[width]" ).each( function() {
11049			var child = $( this ),
11050				childOriginal = $.effects.scaledDimensions( child ),
11051				childFrom = {
11052					height: childOriginal.height * factor.from.y,
11053					width: childOriginal.width * factor.from.x,
11054					outerHeight: childOriginal.outerHeight * factor.from.y,
11055					outerWidth: childOriginal.outerWidth * factor.from.x
11056				},
11057				childTo = {
11058					height: childOriginal.height * factor.to.y,
11059					width: childOriginal.width * factor.to.x,
11060					outerHeight: childOriginal.height * factor.to.y,
11061					outerWidth: childOriginal.width * factor.to.x
11062				};
11063
11064			// Vertical props scaling
11065			if ( factor.from.y !== factor.to.y ) {
11066				childFrom = $.effects.setTransition( child, vProps, factor.from.y, childFrom );
11067				childTo = $.effects.setTransition( child, vProps, factor.to.y, childTo );
11068			}
11069
11070			// Horizontal props scaling
11071			if ( factor.from.x !== factor.to.x ) {
11072				childFrom = $.effects.setTransition( child, hProps, factor.from.x, childFrom );
11073				childTo = $.effects.setTransition( child, hProps, factor.to.x, childTo );
11074			}
11075
11076			if ( restore ) {
11077				$.effects.saveStyle( child );
11078			}
11079
11080			// Animate children
11081			child.css( childFrom );
11082			child.animate( childTo, options.duration, options.easing, function() {
11083
11084				// Restore children
11085				if ( restore ) {
11086					$.effects.restoreStyle( child );
11087				}
11088			} );
11089		} );
11090	}
11091
11092	// Animate
11093	element.animate( to, {
11094		queue: false,
11095		duration: options.duration,
11096		easing: options.easing,
11097		complete: function() {
11098
11099			var offset = element.offset();
11100
11101			if ( to.opacity === 0 ) {
11102				element.css( "opacity", from.opacity );
11103			}
11104
11105			if ( !restore ) {
11106				element
11107					.css( "position", position === "static" ? "relative" : position )
11108					.offset( offset );
11109
11110				// Need to save style here so that automatic style restoration
11111				// doesn't restore to the original styles from before the animation.
11112				$.effects.saveStyle( element );
11113			}
11114
11115			done();
11116		}
11117	} );
11118
11119} );
11120
11121
11122/*!
11123 * jQuery UI Effects Scale 1.14.0
11124 * https://jqueryui.com
11125 *
11126 * Copyright OpenJS Foundation and other contributors
11127 * Released under the MIT license.
11128 * https://jquery.org/license
11129 */
11130
11131//>>label: Scale Effect
11132//>>group: Effects
11133//>>description: Grows or shrinks an element and its content.
11134//>>docs: https://api.jqueryui.com/scale-effect/
11135//>>demos: https://jqueryui.com/effect/
11136
11137
11138var effectsEffectScale = $.effects.define( "scale", function( options, done ) {
11139
11140	// Create element
11141	var el = $( this ),
11142		mode = options.mode,
11143		percent = parseInt( options.percent, 10 ) ||
11144			( parseInt( options.percent, 10 ) === 0 ? 0 : ( mode !== "effect" ? 0 : 100 ) ),
11145
11146		newOptions = $.extend( true, {
11147			from: $.effects.scaledDimensions( el ),
11148			to: $.effects.scaledDimensions( el, percent, options.direction || "both" ),
11149			origin: options.origin || [ "middle", "center" ]
11150		}, options );
11151
11152	// Fade option to support puff
11153	if ( options.fade ) {
11154		newOptions.from.opacity = 1;
11155		newOptions.to.opacity = 0;
11156	}
11157
11158	$.effects.effect.size.call( this, newOptions, done );
11159} );
11160
11161
11162/*!
11163 * jQuery UI Effects Puff 1.14.0
11164 * https://jqueryui.com
11165 *
11166 * Copyright OpenJS Foundation and other contributors
11167 * Released under the MIT license.
11168 * https://jquery.org/license
11169 */
11170
11171//>>label: Puff Effect
11172//>>group: Effects
11173//>>description: Creates a puff effect by scaling the element up and hiding it at the same time.
11174//>>docs: https://api.jqueryui.com/puff-effect/
11175//>>demos: https://jqueryui.com/effect/
11176
11177
11178var effectsEffectPuff = $.effects.define( "puff", "hide", function( options, done ) {
11179	var newOptions = $.extend( true, {}, options, {
11180		fade: true,
11181		percent: parseInt( options.percent, 10 ) || 150
11182	} );
11183
11184	$.effects.effect.scale.call( this, newOptions, done );
11185} );
11186
11187
11188/*!
11189 * jQuery UI Effects Pulsate 1.14.0
11190 * https://jqueryui.com
11191 *
11192 * Copyright OpenJS Foundation and other contributors
11193 * Released under the MIT license.
11194 * https://jquery.org/license
11195 */
11196
11197//>>label: Pulsate Effect
11198//>>group: Effects
11199//>>description: Pulsates an element n times by changing the opacity to zero and back.
11200//>>docs: https://api.jqueryui.com/pulsate-effect/
11201//>>demos: https://jqueryui.com/effect/
11202
11203
11204var effectsEffectPulsate = $.effects.define( "pulsate", "show", function( options, done ) {
11205	var element = $( this ),
11206		mode = options.mode,
11207		show = mode === "show",
11208		hide = mode === "hide",
11209		showhide = show || hide,
11210
11211		// Showing or hiding leaves off the "last" animation
11212		anims = ( ( options.times || 5 ) * 2 ) + ( showhide ? 1 : 0 ),
11213		duration = options.duration / anims,
11214		animateTo = 0,
11215		i = 1,
11216		queuelen = element.queue().length;
11217
11218	if ( show || !element.is( ":visible" ) ) {
11219		element.css( "opacity", 0 ).show();
11220		animateTo = 1;
11221	}
11222
11223	// Anims - 1 opacity "toggles"
11224	for ( ; i < anims; i++ ) {
11225		element.animate( { opacity: animateTo }, duration, options.easing );
11226		animateTo = 1 - animateTo;
11227	}
11228
11229	element.animate( { opacity: animateTo }, duration, options.easing );
11230
11231	element.queue( done );
11232
11233	$.effects.unshift( element, queuelen, anims + 1 );
11234} );
11235
11236
11237/*!
11238 * jQuery UI Effects Shake 1.14.0
11239 * https://jqueryui.com
11240 *
11241 * Copyright OpenJS Foundation and other contributors
11242 * Released under the MIT license.
11243 * https://jquery.org/license
11244 */
11245
11246//>>label: Shake Effect
11247//>>group: Effects
11248//>>description: Shakes an element horizontally or vertically n times.
11249//>>docs: https://api.jqueryui.com/shake-effect/
11250//>>demos: https://jqueryui.com/effect/
11251
11252
11253var effectsEffectShake = $.effects.define( "shake", function( options, done ) {
11254
11255	var i = 1,
11256		element = $( this ),
11257		direction = options.direction || "left",
11258		distance = options.distance || 20,
11259		times = options.times || 3,
11260		anims = times * 2 + 1,
11261		speed = Math.round( options.duration / anims ),
11262		ref = ( direction === "up" || direction === "down" ) ? "top" : "left",
11263		positiveMotion = ( direction === "up" || direction === "left" ),
11264		animation = {},
11265		animation1 = {},
11266		animation2 = {},
11267
11268		queuelen = element.queue().length;
11269
11270	$.effects.createPlaceholder( element );
11271
11272	// Animation
11273	animation[ ref ] = ( positiveMotion ? "-=" : "+=" ) + distance;
11274	animation1[ ref ] = ( positiveMotion ? "+=" : "-=" ) + distance * 2;
11275	animation2[ ref ] = ( positiveMotion ? "-=" : "+=" ) + distance * 2;
11276
11277	// Animate
11278	element.animate( animation, speed, options.easing );
11279
11280	// Shakes
11281	for ( ; i < times; i++ ) {
11282		element
11283			.animate( animation1, speed, options.easing )
11284			.animate( animation2, speed, options.easing );
11285	}
11286
11287	element
11288		.animate( animation1, speed, options.easing )
11289		.animate( animation, speed / 2, options.easing )
11290		.queue( done );
11291
11292	$.effects.unshift( element, queuelen, anims + 1 );
11293} );
11294
11295
11296/*!
11297 * jQuery UI Effects Slide 1.14.0
11298 * https://jqueryui.com
11299 *
11300 * Copyright OpenJS Foundation and other contributors
11301 * Released under the MIT license.
11302 * https://jquery.org/license
11303 */
11304
11305//>>label: Slide Effect
11306//>>group: Effects
11307//>>description: Slides an element in and out of the viewport.
11308//>>docs: https://api.jqueryui.com/slide-effect/
11309//>>demos: https://jqueryui.com/effect/
11310
11311
11312var effectsEffectSlide = $.effects.define( "slide", "show", function( options, done ) {
11313	var startClip, startRef,
11314		element = $( this ),
11315		map = {
11316			up: [ "bottom", "top" ],
11317			down: [ "top", "bottom" ],
11318			left: [ "right", "left" ],
11319			right: [ "left", "right" ]
11320		},
11321		mode = options.mode,
11322		direction = options.direction || "left",
11323		ref = ( direction === "up" || direction === "down" ) ? "top" : "left",
11324		positiveMotion = ( direction === "up" || direction === "left" ),
11325		distance = options.distance ||
11326			element[ ref === "top" ? "outerHeight" : "outerWidth" ]( true ),
11327		animation = {};
11328
11329	$.effects.createPlaceholder( element );
11330
11331	startClip = element.cssClip();
11332	startRef = element.position()[ ref ];
11333
11334	// Define hide animation
11335	animation[ ref ] = ( positiveMotion ? -1 : 1 ) * distance + startRef;
11336	animation.clip = element.cssClip();
11337	animation.clip[ map[ direction ][ 1 ] ] = animation.clip[ map[ direction ][ 0 ] ];
11338
11339	// Reverse the animation if we're showing
11340	if ( mode === "show" ) {
11341		element.cssClip( animation.clip );
11342		element.css( ref, animation[ ref ] );
11343		animation.clip = startClip;
11344		animation[ ref ] = startRef;
11345	}
11346
11347	// Actually animate
11348	element.animate( animation, {
11349		queue: false,
11350		duration: options.duration,
11351		easing: options.easing,
11352		complete: done
11353	} );
11354} );
11355
11356
11357/*!
11358 * jQuery UI Effects Transfer 1.14.0
11359 * https://jqueryui.com
11360 *
11361 * Copyright OpenJS Foundation and other contributors
11362 * Released under the MIT license.
11363 * https://jquery.org/license
11364 */
11365
11366//>>label: Transfer Effect
11367//>>group: Effects
11368//>>description: Displays a transfer effect from one element to another.
11369//>>docs: https://api.jqueryui.com/transfer-effect/
11370//>>demos: https://jqueryui.com/effect/
11371
11372
11373var effect;
11374if ( $.uiBackCompat === true ) {
11375	effect = $.effects.define( "transfer", function( options, done ) {
11376		$( this ).transfer( options, done );
11377	} );
11378}
11379var effectsEffectTransfer = effect;
11380
11381
11382/*!
11383 * jQuery UI Focusable 1.14.0
11384 * https://jqueryui.com
11385 *
11386 * Copyright OpenJS Foundation and other contributors
11387 * Released under the MIT license.
11388 * https://jquery.org/license
11389 */
11390
11391//>>label: :focusable Selector
11392//>>group: Core
11393//>>description: Selects elements which can be focused.
11394//>>docs: https://api.jqueryui.com/focusable-selector/
11395
11396
11397// Selectors
11398$.ui.focusable = function( element, hasTabindex ) {
11399	var map, mapName, img, focusableIfVisible, fieldset,
11400		nodeName = element.nodeName.toLowerCase();
11401
11402	if ( "area" === nodeName ) {
11403		map = element.parentNode;
11404		mapName = map.name;
11405		if ( !element.href || !mapName || map.nodeName.toLowerCase() !== "map" ) {
11406			return false;
11407		}
11408		img = $( "img[usemap='#" + mapName + "']" );
11409		return img.length > 0 && img.is( ":visible" );
11410	}
11411
11412	if ( /^(input|select|textarea|button|object)$/.test( nodeName ) ) {
11413		focusableIfVisible = !element.disabled;
11414
11415		if ( focusableIfVisible ) {
11416
11417			// Form controls within a disabled fieldset are disabled.
11418			// However, controls within the fieldset's legend do not get disabled.
11419			// Since controls generally aren't placed inside legends, we skip
11420			// this portion of the check.
11421			fieldset = $( element ).closest( "fieldset" )[ 0 ];
11422			if ( fieldset ) {
11423				focusableIfVisible = !fieldset.disabled;
11424			}
11425		}
11426	} else if ( "a" === nodeName ) {
11427		focusableIfVisible = element.href || hasTabindex;
11428	} else {
11429		focusableIfVisible = hasTabindex;
11430	}
11431
11432	return focusableIfVisible && $( element ).is( ":visible" ) &&
11433		$( element ).css( "visibility" ) === "visible";
11434};
11435
11436$.extend( $.expr.pseudos, {
11437	focusable: function( element ) {
11438		return $.ui.focusable( element, $.attr( element, "tabindex" ) != null );
11439	}
11440} );
11441
11442var focusable = $.ui.focusable;
11443
11444
11445/*!
11446 * jQuery UI Form Reset Mixin 1.14.0
11447 * https://jqueryui.com
11448 *
11449 * Copyright OpenJS Foundation and other contributors
11450 * Released under the MIT license.
11451 * https://jquery.org/license
11452 */
11453
11454//>>label: Form Reset Mixin
11455//>>group: Core
11456//>>description: Refresh input widgets when their form is reset
11457//>>docs: https://api.jqueryui.com/form-reset-mixin/
11458
11459
11460var formResetMixin = $.ui.formResetMixin = {
11461	_formResetHandler: function() {
11462		var form = $( this );
11463
11464		// Wait for the form reset to actually happen before refreshing
11465		setTimeout( function() {
11466			var instances = form.data( "ui-form-reset-instances" );
11467			$.each( instances, function() {
11468				this.refresh();
11469			} );
11470		} );
11471	},
11472
11473	_bindFormResetHandler: function() {
11474		this.form = $( this.element.prop( "form" ) );
11475		if ( !this.form.length ) {
11476			return;
11477		}
11478
11479		var instances = this.form.data( "ui-form-reset-instances" ) || [];
11480		if ( !instances.length ) {
11481
11482			// We don't use _on() here because we use a single event handler per form
11483			this.form.on( "reset.ui-form-reset", this._formResetHandler );
11484		}
11485		instances.push( this );
11486		this.form.data( "ui-form-reset-instances", instances );
11487	},
11488
11489	_unbindFormResetHandler: function() {
11490		if ( !this.form.length ) {
11491			return;
11492		}
11493
11494		var instances = this.form.data( "ui-form-reset-instances" );
11495		instances.splice( $.inArray( this, instances ), 1 );
11496		if ( instances.length ) {
11497			this.form.data( "ui-form-reset-instances", instances );
11498		} else {
11499			this.form
11500				.removeData( "ui-form-reset-instances" )
11501				.off( "reset.ui-form-reset" );
11502		}
11503	}
11504};
11505
11506
11507/*!
11508 * jQuery UI Legacy jQuery Core patches 1.14.0
11509 * https://jqueryui.com
11510 *
11511 * Copyright OpenJS Foundation and other contributors
11512 * Released under the MIT license.
11513 * https://jquery.org/license
11514 *
11515 */
11516
11517//>>label: Legacy jQuery Core patches
11518//>>group: Core
11519//>>description: Backport `.even()`, `.odd()` and `$.escapeSelector` to older jQuery Core versions (deprecated)
11520
11521
11522// Support: jQuery 2.2.x or older.
11523// This method has been defined in jQuery 3.0.0.
11524// Code from https://github.com/jquery/jquery/blob/e539bac79e666bba95bba86d690b4e609dca2286/src/selector/escapeSelector.js
11525if ( !$.escapeSelector ) {
11526	$.escapeSelector = function( id ) {
11527		return CSS.escape( id + "" );
11528	};
11529}
11530
11531// Support: jQuery 3.4.x or older
11532// These methods have been defined in jQuery 3.5.0.
11533if ( !$.fn.even || !$.fn.odd ) {
11534	$.fn.extend( {
11535		even: function() {
11536			return this.filter( function( i ) {
11537				return i % 2 === 0;
11538			} );
11539		},
11540		odd: function() {
11541			return this.filter( function( i ) {
11542				return i % 2 === 1;
11543			} );
11544		}
11545	} );
11546}
11547
11548;
11549/*!
11550 * jQuery UI Keycode 1.14.0
11551 * https://jqueryui.com
11552 *
11553 * Copyright OpenJS Foundation and other contributors
11554 * Released under the MIT license.
11555 * https://jquery.org/license
11556 */
11557
11558//>>label: Keycode
11559//>>group: Core
11560//>>description: Provide keycodes as keynames
11561//>>docs: https://api.jqueryui.com/jQuery.ui.keyCode/
11562
11563
11564var keycode = $.ui.keyCode = {
11565	BACKSPACE: 8,
11566	COMMA: 188,
11567	DELETE: 46,
11568	DOWN: 40,
11569	END: 35,
11570	ENTER: 13,
11571	ESCAPE: 27,
11572	HOME: 36,
11573	LEFT: 37,
11574	PAGE_DOWN: 34,
11575	PAGE_UP: 33,
11576	PERIOD: 190,
11577	RIGHT: 39,
11578	SPACE: 32,
11579	TAB: 9,
11580	UP: 38
11581};
11582
11583
11584/*!
11585 * jQuery UI Labels 1.14.0
11586 * https://jqueryui.com
11587 *
11588 * Copyright OpenJS Foundation and other contributors
11589 * Released under the MIT license.
11590 * https://jquery.org/license
11591 */
11592
11593//>>label: labels
11594//>>group: Core
11595//>>description: Find all the labels associated with a given input
11596//>>docs: https://api.jqueryui.com/labels/
11597
11598
11599var labels = $.fn.labels = function() {
11600	var ancestor, selector, id, labels, ancestors;
11601
11602	if ( !this.length ) {
11603		return this.pushStack( [] );
11604	}
11605
11606	// Check control.labels first
11607	if ( this[ 0 ].labels && this[ 0 ].labels.length ) {
11608		return this.pushStack( this[ 0 ].labels );
11609	}
11610
11611	// If `control.labels` is empty - e.g. inside of document fragments - find
11612	// the labels manually
11613	labels = this.eq( 0 ).parents( "label" );
11614
11615	// Look for the label based on the id
11616	id = this.attr( "id" );
11617	if ( id ) {
11618
11619		// We don't search against the document in case the element
11620		// is disconnected from the DOM
11621		ancestor = this.eq( 0 ).parents().last();
11622
11623		// Get a full set of top level ancestors
11624		ancestors = ancestor.add( ancestor.length ? ancestor.siblings() : this.siblings() );
11625
11626		// Create a selector for the label based on the id
11627		selector = "label[for='" + CSS.escape( id ) + "']";
11628
11629		labels = labels.add( ancestors.find( selector ).addBack( selector ) );
11630
11631	}
11632
11633	// Return whatever we have found for labels
11634	return this.pushStack( labels );
11635};
11636
11637
11638/*!
11639 * jQuery UI Scroll Parent 1.14.0
11640 * https://jqueryui.com
11641 *
11642 * Copyright OpenJS Foundation and other contributors
11643 * Released under the MIT license.
11644 * https://jquery.org/license
11645 */
11646
11647//>>label: scrollParent
11648//>>group: Core
11649//>>description: Get the closest ancestor element that is scrollable.
11650//>>docs: https://api.jqueryui.com/scrollParent/
11651
11652
11653var scrollParent = $.fn.scrollParent = function( includeHidden ) {
11654	var position = this.css( "position" ),
11655		excludeStaticParent = position === "absolute",
11656		overflowRegex = includeHidden ? /(auto|scroll|hidden)/ : /(auto|scroll)/,
11657		scrollParent = this.parents().filter( function() {
11658			var parent = $( this );
11659			if ( excludeStaticParent && parent.css( "position" ) === "static" ) {
11660				return false;
11661			}
11662			return overflowRegex.test( parent.css( "overflow" ) + parent.css( "overflow-y" ) +
11663				parent.css( "overflow-x" ) );
11664		} ).eq( 0 );
11665
11666	return position === "fixed" || !scrollParent.length ?
11667		$( this[ 0 ].ownerDocument || document ) :
11668		scrollParent;
11669};
11670
11671
11672/*!
11673 * jQuery UI Tabbable 1.14.0
11674 * https://jqueryui.com
11675 *
11676 * Copyright OpenJS Foundation and other contributors
11677 * Released under the MIT license.
11678 * https://jquery.org/license
11679 */
11680
11681//>>label: :tabbable Selector
11682//>>group: Core
11683//>>description: Selects elements which can be tabbed to.
11684//>>docs: https://api.jqueryui.com/tabbable-selector/
11685
11686
11687var tabbable = $.extend( $.expr.pseudos, {
11688	tabbable: function( element ) {
11689		var tabIndex = $.attr( element, "tabindex" ),
11690			hasTabindex = tabIndex != null;
11691		return ( !hasTabindex || tabIndex >= 0 ) && $.ui.focusable( element, hasTabindex );
11692	}
11693} );
11694
11695
11696/*!
11697 * jQuery UI Unique ID 1.14.0
11698 * https://jqueryui.com
11699 *
11700 * Copyright OpenJS Foundation and other contributors
11701 * Released under the MIT license.
11702 * https://jquery.org/license
11703 */
11704
11705//>>label: uniqueId
11706//>>group: Core
11707//>>description: Functions to generate and remove uniqueId's
11708//>>docs: https://api.jqueryui.com/uniqueId/
11709
11710
11711var uniqueId = $.fn.extend( {
11712	uniqueId: ( function() {
11713		var uuid = 0;
11714
11715		return function() {
11716			return this.each( function() {
11717				if ( !this.id ) {
11718					this.id = "ui-id-" + ( ++uuid );
11719				}
11720			} );
11721		};
11722	} )(),
11723
11724	removeUniqueId: function() {
11725		return this.each( function() {
11726			if ( /^ui-id-\d+$/.test( this.id ) ) {
11727				$( this ).removeAttr( "id" );
11728			}
11729		} );
11730	}
11731} );
11732
11733
11734/*!
11735 * jQuery UI Accordion 1.14.0
11736 * https://jqueryui.com
11737 *
11738 * Copyright OpenJS Foundation and other contributors
11739 * Released under the MIT license.
11740 * https://jquery.org/license
11741 */
11742
11743//>>label: Accordion
11744//>>group: Widgets
11745/* eslint-disable max-len */
11746//>>description: Displays collapsible content panels for presenting information in a limited amount of space.
11747/* eslint-enable max-len */
11748//>>docs: https://api.jqueryui.com/accordion/
11749//>>demos: https://jqueryui.com/accordion/
11750//>>css.structure: ../../themes/base/core.css
11751//>>css.structure: ../../themes/base/accordion.css
11752//>>css.theme: ../../themes/base/theme.css
11753
11754
11755var widgetsAccordion = $.widget( "ui.accordion", {
11756	version: "1.14.0
vendor: 14,922 bytes, lines 11756-12337
11756",
11757	options: {
11758		active: 0,
11759		animate: {},
11760		classes: {
11761			"ui-accordion-header": "ui-corner-top",
11762			"ui-accordion-header-collapsed": "ui-corner-all",
11763			"ui-accordion-content": "ui-corner-bottom"
11764		},
11765		collapsible: false,
11766		event: "click",
11767		header: function( elem ) {
11768			return elem
11769				.find( "> li > :first-child" )
11770				.add(
11771					elem.find( "> :not(li)" )
11772
11773						// Support: jQuery <3.5 only
11774						// We could use `.even()` but that's unavailable in older jQuery.
11775						.filter( function( i ) {
11776							return i % 2 === 0;
11777						} )
11778				);
11779		},
11780		heightStyle: "auto",
11781		icons: {
11782			activeHeader: "ui-icon-triangle-1-s",
11783			header: "ui-icon-triangle-1-e"
11784		},
11785
11786		// Callbacks
11787		activate: null,
11788		beforeActivate: null
11789	},
11790
11791	hideProps: {
11792		borderTopWidth: "hide",
11793		borderBottomWidth: "hide",
11794		paddingTop: "hide",
11795		paddingBottom: "hide",
11796		height: "hide"
11797	},
11798
11799	showProps: {
11800		borderTopWidth: "show",
11801		borderBottomWidth: "show",
11802		paddingTop: "show",
11803		paddingBottom: "show",
11804		height: "show"
11805	},
11806
11807	_create: function() {
11808		var options = this.options;
11809
11810		this.prevShow = this.prevHide = $();
11811		this._addClass( "ui-accordion", "ui-widget ui-helper-reset" );
11812		this.element.attr( "role", "tablist" );
11813
11814		// Don't allow collapsible: false and active: false / null
11815		if ( !options.collapsible && ( options.active === false || options.active == null ) ) {
11816			options.active = 0;
11817		}
11818
11819		this._processPanels();
11820
11821		// handle negative values
11822		if ( options.active < 0 ) {
11823			options.active += this.headers.length;
11824		}
11825		this._refresh();
11826	},
11827
11828	_getCreateEventData: function() {
11829		return {
11830			header: this.active,
11831			panel: !this.active.length ? $() : this.active.next()
11832		};
11833	},
11834
11835	_createIcons: function() {
11836		var icon, children,
11837			icons = this.options.icons;
11838
11839		if ( icons ) {
11840			icon = $( "<span>" );
11841			this._addClass( icon, "ui-accordion-header-icon", "ui-icon " + icons.header );
11842			icon.prependTo( this.headers );
11843			children = this.active.children( ".ui-accordion-header-icon" );
11844			this._removeClass( children, icons.header )
11845				._addClass( children, null, icons.activeHeader )
11846				._addClass( this.headers, "ui-accordion-icons" );
11847		}
11848	},
11849
11850	_destroyIcons: function() {
11851		this._removeClass( this.headers, "ui-accordion-icons" );
11852		this.headers.children( ".ui-accordion-header-icon" ).remove();
11853	},
11854
11855	_destroy: function() {
11856		var contents;
11857
11858		// Clean up main element
11859		this.element.removeAttr( "role" );
11860
11861		// Clean up headers
11862		this.headers
11863			.removeAttr( "role aria-expanded aria-selected aria-controls tabIndex" )
11864			.removeUniqueId();
11865
11866		this._destroyIcons();
11867
11868		// Clean up content panels
11869		contents = this.headers.next()
11870			.css( "display", "" )
11871			.removeAttr( "role aria-hidden aria-labelledby" )
11872			.removeUniqueId();
11873
11874		if ( this.options.heightStyle !== "content" ) {
11875			contents.css( "height", "" );
11876		}
11877	},
11878
11879	_setOption: function( key, value ) {
11880		if ( key === "active" ) {
11881
11882			// _activate() will handle invalid values and update this.options
11883			this._activate( value );
11884			return;
11885		}
11886
11887		if ( key === "event" ) {
11888			if ( this.options.event ) {
11889				this._off( this.headers, this.options.event );
11890			}
11891			this._setupEvents( value );
11892		}
11893
11894		this._super( key, value );
11895
11896		// Setting collapsible: false while collapsed; open first panel
11897		if ( key === "collapsible" && !value && this.options.active === false ) {
11898			this._activate( 0 );
11899		}
11900
11901		if ( key === "icons" ) {
11902			this._destroyIcons();
11903			if ( value ) {
11904				this._createIcons();
11905			}
11906		}
11907	},
11908
11909	_setOptionDisabled: function( value ) {
11910		this._super( value );
11911
11912		this.element.attr( "aria-disabled", value );
11913		this._toggleClass( null, "ui-state-disabled", !!value );
11914	},
11915
11916	_keydown: function( event ) {
11917		if ( event.altKey || event.ctrlKey ) {
11918			return;
11919		}
11920
11921		var keyCode = $.ui.keyCode,
11922			length = this.headers.length,
11923			currentIndex = this.headers.index( event.target ),
11924			toFocus = false;
11925
11926		switch ( event.keyCode ) {
11927		case keyCode.RIGHT:
11928		case keyCode.DOWN:
11929			toFocus = this.headers[ ( currentIndex + 1 ) % length ];
11930			break;
11931		case keyCode.LEFT:
11932		case keyCode.UP:
11933			toFocus = this.headers[ ( currentIndex - 1 + length ) % length ];
11934			break;
11935		case keyCode.SPACE:
11936		case keyCode.ENTER:
11937			this._eventHandler( event );
11938			break;
11939		case keyCode.HOME:
11940			toFocus = this.headers[ 0 ];
11941			break;
11942		case keyCode.END:
11943			toFocus = this.headers[ length - 1 ];
11944			break;
11945		}
11946
11947		if ( toFocus ) {
11948			$( event.target ).attr( "tabIndex", -1 );
11949			$( toFocus ).attr( "tabIndex", 0 );
11950			$( toFocus ).trigger( "focus" );
11951			event.preventDefault();
11952		}
11953	},
11954
11955	_panelKeyDown: function( event ) {
11956		if ( event.keyCode === $.ui.keyCode.UP && event.ctrlKey ) {
11957			$( event.currentTarget ).prev().trigger( "focus" );
11958		}
11959	},
11960
11961	refresh: function() {
11962		var options = this.options;
11963		this._processPanels();
11964
11965		// Was collapsed or no panel
11966		if ( ( options.active === false && options.collapsible === true ) ||
11967				!this.headers.length ) {
11968			options.active = false;
11969			this.active = $();
11970
11971		// active false only when collapsible is true
11972		} else if ( options.active === false ) {
11973			this._activate( 0 );
11974
11975		// was active, but active panel is gone
11976		} else if ( this.active.length && !$.contains( this.element[ 0 ], this.active[ 0 ] ) ) {
11977
11978			// all remaining panel are disabled
11979			if ( this.headers.length === this.headers.find( ".ui-state-disabled" ).length ) {
11980				options.active = false;
11981				this.active = $();
11982
11983			// activate previous panel
11984			} else {
11985				this._activate( Math.max( 0, options.active - 1 ) );
11986			}
11987
11988		// was active, active panel still exists
11989		} else {
11990
11991			// make sure active index is correct
11992			options.active = this.headers.index( this.active );
11993		}
11994
11995		this._destroyIcons();
11996
11997		this._refresh();
11998	},
11999
12000	_processPanels: function() {
12001		var prevHeaders = this.headers,
12002			prevPanels = this.panels;
12003
12004		if ( typeof this.options.header === "function" ) {
12005			this.headers = this.options.header( this.element );
12006		} else {
12007			this.headers = this.element.find( this.options.header );
12008		}
12009		this._addClass( this.headers, "ui-accordion-header ui-accordion-header-collapsed",
12010			"ui-state-default" );
12011
12012		this.panels = this.headers.next().filter( ":not(.ui-accordion-content-active)" ).hide();
12013		this._addClass( this.panels, "ui-accordion-content", "ui-helper-reset ui-widget-content" );
12014
12015		// Avoid memory leaks (#10056)
12016		if ( prevPanels ) {
12017			this._off( prevHeaders.not( this.headers ) );
12018			this._off( prevPanels.not( this.panels ) );
12019		}
12020	},
12021
12022	_refresh: function() {
12023		var maxHeight,
12024			options = this.options,
12025			heightStyle = options.heightStyle,
12026			parent = this.element.parent();
12027
12028		this.active = this._findActive( options.active );
12029		this._addClass( this.active, "ui-accordion-header-active", "ui-state-active" )
12030			._removeClass( this.active, "ui-accordion-header-collapsed" );
12031		this._addClass( this.active.next(), "ui-accordion-content-active" );
12032		this.active.next().show();
12033
12034		this.headers
12035			.attr( "role", "tab" )
12036			.each( function() {
12037				var header = $( this ),
12038					headerId = header.uniqueId().attr( "id" ),
12039					panel = header.next(),
12040					panelId = panel.uniqueId().attr( "id" );
12041				header.attr( "aria-controls", panelId );
12042				panel.attr( "aria-labelledby", headerId );
12043			} )
12044			.next()
12045				.attr( "role", "tabpanel" );
12046
12047		this.headers
12048			.not( this.active )
12049				.attr( {
12050					"aria-selected": "false",
12051					"aria-expanded": "false",
12052					tabIndex: -1
12053				} )
12054				.next()
12055					.attr( {
12056						"aria-hidden": "true"
12057					} )
12058					.hide();
12059
12060		// Make sure at least one header is in the tab order
12061		if ( !this.active.length ) {
12062			this.headers.eq( 0 ).attr( "tabIndex", 0 );
12063		} else {
12064			this.active.attr( {
12065				"aria-selected": "true",
12066				"aria-expanded": "true",
12067				tabIndex: 0
12068			} )
12069				.next()
12070					.attr( {
12071						"aria-hidden": "false"
12072					} );
12073		}
12074
12075		this._createIcons();
12076
12077		this._setupEvents( options.event );
12078
12079		if ( heightStyle === "fill" ) {
12080			maxHeight = parent.height();
12081			this.element.siblings( ":visible" ).each( function() {
12082				var elem = $( this ),
12083					position = elem.css( "position" );
12084
12085				if ( position === "absolute" || position === "fixed" ) {
12086					return;
12087				}
12088				maxHeight -= elem.outerHeight( true );
12089			} );
12090
12091			this.headers.each( function() {
12092				maxHeight -= $( this ).outerHeight( true );
12093			} );
12094
12095			this.headers.next()
12096				.each( function() {
12097					$( this ).height( Math.max( 0, maxHeight -
12098						$( this ).innerHeight() + $( this ).height() ) );
12099				} )
12100				.css( "overflow", "auto" );
12101		} else if ( heightStyle === "auto" ) {
12102			maxHeight = 0;
12103			this.headers.next()
12104				.each( function() {
12105					var isVisible = $( this ).is( ":visible" );
12106					if ( !isVisible ) {
12107						$( this ).show();
12108					}
12109					maxHeight = Math.max( maxHeight, $( this ).css( "height", "" ).height() );
12110					if ( !isVisible ) {
12111						$( this ).hide();
12112					}
12113				} )
12114				.height( maxHeight );
12115		}
12116	},
12117
12118	_activate: function( index ) {
12119		var active = this._findActive( index )[ 0 ];
12120
12121		// Trying to activate the already active panel
12122		if ( active === this.active[ 0 ] ) {
12123			return;
12124		}
12125
12126		// Trying to collapse, simulate a click on the currently active header
12127		active = active || this.active[ 0 ];
12128
12129		this._eventHandler( {
12130			target: active,
12131			currentTarget: active,
12132			preventDefault: $.noop
12133		} );
12134	},
12135
12136	_findActive: function( selector ) {
12137		return typeof selector === "number" ? this.headers.eq( selector ) : $();
12138	},
12139
12140	_setupEvents: function( event ) {
12141		var events = {
12142			keydown: "_keydown"
12143		};
12144		if ( event ) {
12145			$.each( event.split( " " ), function( index, eventName ) {
12146				events[ eventName ] = "_eventHandler";
12147			} );
12148		}
12149
12150		this._off( this.headers.add( this.headers.next() ) );
12151		this._on( this.headers, events );
12152		this._on( this.headers.next(), { keydown: "_panelKeyDown" } );
12153		this._hoverable( this.headers );
12154		this._focusable( this.headers );
12155	},
12156
12157	_eventHandler: function( event ) {
12158		var activeChildren, clickedChildren,
12159			options = this.options,
12160			active = this.active,
12161			clicked = $( event.currentTarget ),
12162			clickedIsActive = clicked[ 0 ] === active[ 0 ],
12163			collapsing = clickedIsActive && options.collapsible,
12164			toShow = collapsing ? $() : clicked.next(),
12165			toHide = active.next(),
12166			eventData = {
12167				oldHeader: active,
12168				oldPanel: toHide,
12169				newHeader: collapsing ? $() : clicked,
12170				newPanel: toShow
12171			};
12172
12173		event.preventDefault();
12174
12175		if (
12176
12177				// click on active header, but not collapsible
12178				( clickedIsActive && !options.collapsible ) ||
12179
12180				// allow canceling activation
12181				( this._trigger( "beforeActivate", event, eventData ) === false ) ) {
12182			return;
12183		}
12184
12185		options.active = collapsing ? false : this.headers.index( clicked );
12186
12187		// When the call to ._toggle() comes after the class changes
12188		// it causes a very odd bug in IE 8 (see #6720)
12189		this.active = clickedIsActive ? $() : clicked;
12190		this._toggle( eventData );
12191
12192		// Switch classes
12193		// corner classes on the previously active header stay after the animation
12194		this._removeClass( active, "ui-accordion-header-active", "ui-state-active" );
12195		if ( options.icons ) {
12196			activeChildren = active.children( ".ui-accordion-header-icon" );
12197			this._removeClass( activeChildren, null, options.icons.activeHeader )
12198				._addClass( activeChildren, null, options.icons.header );
12199		}
12200
12201		if ( !clickedIsActive ) {
12202			this._removeClass( clicked, "ui-accordion-header-collapsed" )
12203				._addClass( clicked, "ui-accordion-header-active", "ui-state-active" );
12204			if ( options.icons ) {
12205				clickedChildren = clicked.children( ".ui-accordion-header-icon" );
12206				this._removeClass( clickedChildren, null, options.icons.header )
12207					._addClass( clickedChildren, null, options.icons.activeHeader );
12208			}
12209
12210			this._addClass( clicked.next(), "ui-accordion-content-active" );
12211		}
12212	},
12213
12214	_toggle: function( data ) {
12215		var toShow = data.newPanel,
12216			toHide = this.prevShow.length ? this.prevShow : data.oldPanel;
12217
12218		// Handle activating a panel during the animation for another activation
12219		this.prevShow.add( this.prevHide ).stop( true, true );
12220		this.prevShow = toShow;
12221		this.prevHide = toHide;
12222
12223		if ( this.options.animate ) {
12224			this._animate( toShow, toHide, data );
12225		} else {
12226			toHide.hide();
12227			toShow.show();
12228			this._toggleComplete( data );
12229		}
12230
12231		toHide.attr( {
12232			"aria-hidden": "true"
12233		} );
12234		toHide.prev().attr( {
12235			"aria-selected": "false",
12236			"aria-expanded": "false"
12237		} );
12238
12239		// if we're switching panels, remove the old header from the tab order
12240		// if we're opening from collapsed state, remove the previous header from the tab order
12241		// if we're collapsing, then keep the collapsing header in the tab order
12242		if ( toShow.length && toHide.length ) {
12243			toHide.prev().attr( {
12244				"tabIndex": -1,
12245				"aria-expanded": "false"
12246			} );
12247		} else if ( toShow.length ) {
12248			this.headers.filter( function() {
12249				return parseInt( $( this ).attr( "tabIndex" ), 10 ) === 0;
12250			} )
12251				.attr( "tabIndex", -1 );
12252		}
12253
12254		toShow
12255			.attr( "aria-hidden", "false" )
12256			.prev()
12257				.attr( {
12258					"aria-selected": "true",
12259					"aria-expanded": "true",
12260					tabIndex: 0
12261				} );
12262	},
12263
12264	_animate: function( toShow, toHide, data ) {
12265		var total, easing, duration,
12266			that = this,
12267			adjust = 0,
12268			boxSizing = toShow.css( "box-sizing" ),
12269			down = toShow.length &&
12270				( !toHide.length || ( toShow.index() < toHide.index() ) ),
12271			animate = this.options.animate || {},
12272			options = down && animate.down || animate,
12273			complete = function() {
12274				that._toggleComplete( data );
12275			};
12276
12277		if ( typeof options === "number" ) {
12278			duration = options;
12279		}
12280		if ( typeof options === "string" ) {
12281			easing = options;
12282		}
12283
12284		// fall back from options to animation in case of partial down settings
12285		easing = easing || options.easing || animate.easing;
12286		duration = duration || options.duration || animate.duration;
12287
12288		if ( !toHide.length ) {
12289			return toShow.animate( this.showProps, duration, easing, complete );
12290		}
12291		if ( !toShow.length ) {
12292			return toHide.animate( this.hideProps, duration, easing, complete );
12293		}
12294
12295		total = toShow.show().outerHeight();
12296		toHide.animate( this.hideProps, {
12297			duration: duration,
12298			easing: easing,
12299			step: function( now, fx ) {
12300				fx.now = Math.round( now );
12301			}
12302		} );
12303		toShow
12304			.hide()
12305			.animate( this.showProps, {
12306				duration: duration,
12307				easing: easing,
12308				complete: complete,
12309				step: function( now, fx ) {
12310					fx.now = Math.round( now );
12311					if ( fx.prop !== "height" ) {
12312						if ( boxSizing === "content-box" ) {
12313							adjust += fx.now;
12314						}
12315					} else if ( that.options.heightStyle !== "content" ) {
12316						fx.now = Math.round( total - toHide.outerHeight() - adjust );
12317						adjust = 0;
12318					}
12319				}
12320			} );
12321	},
12322
12323	_toggleComplete: function( data ) {
12324		var toHide = data.oldPanel,
12325			prev = toHide.prev();
12326
12327		this._removeClass( toHide, "ui-accordion-content-active" );
12328		this._removeClass( prev, "ui-accordion-header-active" )
12329			._addClass( prev, "ui-accordion-header-collapsed" );
12330
12331		this._trigger( "activate", null, data );
12332	}
12333} );
12334
12335
12336/*!
12337 * jQuery UI Menu 1.14.
123370
12338 * https://jqueryui.com
12339 *
12340 * Copyright OpenJS Foundation and other contributors
12341 * Released under the MIT license.
12342 * https://jquery.org/license
12343 */
12344
12345//>>label: Menu
12346//>>group: Widgets
12347//>>description: Creates nestable menus.
12348//>>docs: https://api.jqueryui.com/menu/
12349//>>demos: https://jqueryui.com/menu/
12350//>>css.structure: ../../themes/base/core.css
12351//>>css.structure: ../../themes/base/menu.css
12352//>>css.theme: ../../themes/base/theme.css
12353
12354
12355var widgetsMenu = $.widget( "ui.menu", {
12356	version: "1.14.0
vendor: 2,644 bytes, lines 12356-12458
12356",
12357	defaultElement: "<ul>",
12358	delay: 300,
12359	options: {
12360		icons: {
12361			submenu: "ui-icon-caret-1-e"
12362		},
12363		items: "> *",
12364		menus: "ul",
12365		position: {
12366			my: "left top",
12367			at: "right top"
12368		},
12369		role: "menu",
12370
12371		// Callbacks
12372		blur: null,
12373		focus: null,
12374		select: null
12375	},
12376
12377	_create: function() {
12378		this.activeMenu = this.element;
12379
12380		// Flag used to prevent firing of the click handler
12381		// as the event bubbles up through nested menus
12382		this.mouseHandled = false;
12383		this.lastMousePosition = { x: null, y: null };
12384		this.element
12385			.uniqueId()
12386			.attr( {
12387				role: this.options.role,
12388				tabIndex: 0
12389			} );
12390
12391		this._addClass( "ui-menu", "ui-widget ui-widget-content" );
12392		this._on( {
12393
12394			// Prevent focus from sticking to links inside menu after clicking
12395			// them (focus should always stay on UL during navigation).
12396			"mousedown .ui-menu-item": function( event ) {
12397				event.preventDefault();
12398
12399				this._activateItem( event );
12400			},
12401			"click .ui-menu-item": function( event ) {
12402				var target = $( event.target );
12403				var active = $( this.document[ 0 ].activeElement );
12404				if ( !this.mouseHandled && target.not( ".ui-state-disabled" ).length ) {
12405					this.select( event );
12406
12407					// Only set the mouseHandled flag if the event will bubble, see #9469.
12408					if ( !event.isPropagationStopped() ) {
12409						this.mouseHandled = true;
12410					}
12411
12412					// Open submenu on click
12413					if ( target.has( ".ui-menu" ).length ) {
12414						this.expand( event );
12415					} else if ( !this.element.is( ":focus" ) &&
12416							active.closest( ".ui-menu" ).length ) {
12417
12418						// Redirect focus to the menu
12419						this.element.trigger( "focus", [ true ] );
12420
12421						// If the active item is on the top level, let it stay active.
12422						// Otherwise, blur the active item since it is no longer visible.
12423						if ( this.active && this.active.parents( ".ui-menu" ).length === 1 ) {
12424							clearTimeout( this.timer );
12425						}
12426					}
12427				}
12428			},
12429			"mouseenter .ui-menu-item": "_activateItem",
12430			"mousemove .ui-menu-item": "_activateItem",
12431			mouseleave: "collapseAll",
12432			"mouseleave .ui-menu": "collapseAll",
12433			focus: function( event, keepActiveItem ) {
12434
12435				// If there's already an active item, keep it active
12436				// If not, activate the first item
12437				var item = this.active || this._menuItems().first();
12438
12439				if ( !keepActiveItem ) {
12440					this.focus( event, item );
12441				}
12442			},
12443			blur: function( event ) {
12444				this._delay( function() {
12445					var notContained = !$.contains(
12446						this.element[ 0 ],
12447						this.document[ 0 ].activeElement
12448					);
12449					if ( notContained ) {
12450						this.collapseAll( event );
12451					}
12452				} );
12453			},
12454			keydown: "_keydown"
12455		} );
12456
12457		this.refresh();
12458
vendor: 3,056 bytes, lines 12459-12575
12459		// Clicks outside of a menu collapse any open menus
12460		this._on( this.document, {
12461			click: function( event ) {
12462				if ( this._closeOnDocumentClick( event ) ) {
12463					this.collapseAll( event, true );
12464				}
12465
12466				// Reset the mouseHandled flag
12467				this.mouseHandled = false;
12468			}
12469		} );
12470	},
12471
12472	_activateItem: function( event ) {
12473
12474		// Ignore mouse events while typeahead is active, see #10458.
12475		// Prevents focusing the wrong item when typeahead causes a scroll while the mouse
12476		// is over an item in the menu
12477		if ( this.previousFilter ) {
12478			return;
12479		}
12480
12481		// If the mouse didn't actually move, but the page was scrolled, ignore the event (#9356)
12482		if ( event.clientX === this.lastMousePosition.x &&
12483				event.clientY === this.lastMousePosition.y ) {
12484			return;
12485		}
12486
12487		this.lastMousePosition = {
12488			x: event.clientX,
12489			y: event.clientY
12490		};
12491
12492		var actualTarget = $( event.target ).closest( ".ui-menu-item" ),
12493			target = $( event.currentTarget );
12494
12495		// Ignore bubbled events on parent items, see #11641
12496		if ( actualTarget[ 0 ] !== target[ 0 ] ) {
12497			return;
12498		}
12499
12500		// If the item is already active, there's nothing to do
12501		if ( target.is( ".ui-state-active" ) ) {
12502			return;
12503		}
12504
12505		// Remove ui-state-active class from siblings of the newly focused menu item
12506		// to avoid a jump caused by adjacent elements both having a class with a border
12507		this._removeClass( target.siblings().children( ".ui-state-active" ),
12508			null, "ui-state-active" );
12509		this.focus( event, target );
12510	},
12511
12512	_destroy: function() {
12513		var items = this.element.find( ".ui-menu-item" )
12514				.removeAttr( "role aria-disabled" ),
12515			submenus = items.children( ".ui-menu-item-wrapper" )
12516				.removeUniqueId()
12517				.removeAttr( "tabIndex role aria-haspopup" );
12518
12519		// Destroy (sub)menus
12520		this.element
12521			.removeAttr( "aria-activedescendant" )
12522			.find( ".ui-menu" ).addBack()
12523				.removeAttr( "role aria-labelledby aria-expanded aria-hidden aria-disabled " +
12524					"tabIndex" )
12525				.removeUniqueId()
12526				.show();
12527
12528		submenus.children().each( function() {
12529			var elem = $( this );
12530			if ( elem.data( "ui-menu-submenu-caret" ) ) {
12531				elem.remove();
12532			}
12533		} );
12534	},
12535
12536	_keydown: function( event ) {
12537		var match, prev, character, skip,
12538			preventDefault = true;
12539
12540		switch ( event.keyCode ) {
12541		case $.ui.keyCode.PAGE_UP:
12542			this.previousPage( event );
12543			break;
12544		case $.ui.keyCode.PAGE_DOWN:
12545			this.nextPage( event );
12546			break;
12547		case $.ui.keyCode.HOME:
12548			this._move( "first", "first", event );
12549			break;
12550		case $.ui.keyCode.END:
12551			this._move( "last", "last", event );
12552			break;
12553		case $.ui.keyCode.UP:
12554			this.previous( event );
12555			break;
12556		case $.ui.keyCode.DOWN:
12557			this.next( event );
12558			break;
12559		case $.ui.keyCode.LEFT:
12560			this.collapse( event );
12561			break;
12562		case $.ui.keyCode.RIGHT:
12563			if ( this.active && !this.active.is( ".ui-state-disabled" ) ) {
12564				this.expand( event );
12565			}
12566			break;
12567		case $.ui.keyCode.ENTER:
12568		case $.ui.keyCode.SPACE:
12569			this._activate( event );
12570			break;
12571		case $.ui.keyCode.ESCAPE:
12572			this.collapse( event );
12573			break;
12574		default:
12575			preventDefault = false;
vendor: 6,930 bytes, lines 12576-12824
12576			prev = this.previousFilter || "";
12577			skip = false;
12578
12579			// Support number pad values
12580			character = event.keyCode >= 96 && event.keyCode <= 105 ?
12581				( event.keyCode - 96 ).toString() : String.fromCharCode( event.keyCode );
12582
12583			clearTimeout( this.filterTimer );
12584
12585			if ( character === prev ) {
12586				skip = true;
12587			} else {
12588				character = prev + character;
12589			}
12590
12591			match = this._filterMenuItems( character );
12592			match = skip && match.index( this.active.next() ) !== -1 ?
12593				this.active.nextAll( ".ui-menu-item" ) :
12594				match;
12595
12596			// If no matches on the current filter, reset to the last character pressed
12597			// to move down the menu to the first item that starts with that character
12598			if ( !match.length ) {
12599				character = String.fromCharCode( event.keyCode );
12600				match = this._filterMenuItems( character );
12601			}
12602
12603			if ( match.length ) {
12604				this.focus( event, match );
12605				this.previousFilter = character;
12606				this.filterTimer = this._delay( function() {
12607					delete this.previousFilter;
12608				}, 1000 );
12609			} else {
12610				delete this.previousFilter;
12611			}
12612		}
12613
12614		if ( preventDefault ) {
12615			event.preventDefault();
12616		}
12617	},
12618
12619	_activate: function( event ) {
12620		if ( this.active && !this.active.is( ".ui-state-disabled" ) ) {
12621			if ( this.active.children( "[aria-haspopup='true']" ).length ) {
12622				this.expand( event );
12623			} else {
12624				this.select( event );
12625			}
12626		}
12627	},
12628
12629	refresh: function() {
12630		var menus, items, newSubmenus, newItems, newWrappers,
12631			that = this,
12632			icon = this.options.icons.submenu,
12633			submenus = this.element.find( this.options.menus );
12634
12635		this._toggleClass( "ui-menu-icons", null, !!this.element.find( ".ui-icon" ).length );
12636
12637		// Initialize nested menus
12638		newSubmenus = submenus.filter( ":not(.ui-menu)" )
12639			.hide()
12640			.attr( {
12641				role: this.options.role,
12642				"aria-hidden": "true",
12643				"aria-expanded": "false"
12644			} )
12645			.each( function() {
12646				var menu = $( this ),
12647					item = menu.prev(),
12648					submenuCaret = $( "<span>" ).data( "ui-menu-submenu-caret", true );
12649
12650				that._addClass( submenuCaret, "ui-menu-icon", "ui-icon " + icon );
12651				item
12652					.attr( "aria-haspopup", "true" )
12653					.prepend( submenuCaret );
12654				menu.attr( "aria-labelledby", item.attr( "id" ) );
12655			} );
12656
12657		this._addClass( newSubmenus, "ui-menu", "ui-widget ui-widget-content ui-front" );
12658
12659		menus = submenus.add( this.element );
12660		items = menus.find( this.options.items );
12661
12662		// Initialize menu-items containing spaces and/or dashes only as dividers
12663		items.not( ".ui-menu-item" ).each( function() {
12664			var item = $( this );
12665			if ( that._isDivider( item ) ) {
12666				that._addClass( item, "ui-menu-divider", "ui-widget-content" );
12667			}
12668		} );
12669
12670		// Don't refresh list items that are already adapted
12671		newItems = items.not( ".ui-menu-item, .ui-menu-divider" );
12672		newWrappers = newItems.children()
12673			.not( ".ui-menu" )
12674				.uniqueId()
12675				.attr( {
12676					tabIndex: -1,
12677					role: this._itemRole()
12678				} );
12679		this._addClass( newItems, "ui-menu-item" )
12680			._addClass( newWrappers, "ui-menu-item-wrapper" );
12681
12682		// Add aria-disabled attribute to any disabled menu item
12683		items.filter( ".ui-state-disabled" ).attr( "aria-disabled", "true" );
12684
12685		// If the active item has been removed, blur the menu
12686		if ( this.active && !$.contains( this.element[ 0 ], this.active[ 0 ] ) ) {
12687			this.blur();
12688		}
12689	},
12690
12691	_itemRole: function() {
12692		return {
12693			menu: "menuitem",
12694			listbox: "option"
12695		}[ this.options.role ];
12696	},
12697
12698	_setOption: function( key, value ) {
12699		if ( key === "icons" ) {
12700			var icons = this.element.find( ".ui-menu-icon" );
12701			this._removeClass( icons, null, this.options.icons.submenu )
12702				._addClass( icons, null, value.submenu );
12703		}
12704		this._super( key, value );
12705	},
12706
12707	_setOptionDisabled: function( value ) {
12708		this._super( value );
12709
12710		this.element.attr( "aria-disabled", String( value ) );
12711		this._toggleClass( null, "ui-state-disabled", !!value );
12712	},
12713
12714	focus: function( event, item ) {
12715		var nested, focused, activeParent;
12716		this.blur( event, event && event.type === "focus" );
12717
12718		this._scrollIntoView( item );
12719
12720		this.active = item.first();
12721
12722		focused = this.active.children( ".ui-menu-item-wrapper" );
12723		this._addClass( focused, null, "ui-state-active" );
12724
12725		// Only update aria-activedescendant if there's a role
12726		// otherwise we assume focus is managed elsewhere
12727		if ( this.options.role ) {
12728			this.element.attr( "aria-activedescendant", focused.attr( "id" ) );
12729		}
12730
12731		// Highlight active parent menu item, if any
12732		activeParent = this.active
12733			.parent()
12734				.closest( ".ui-menu-item" )
12735					.children( ".ui-menu-item-wrapper" );
12736		this._addClass( activeParent, null, "ui-state-active" );
12737
12738		if ( event && event.type === "keydown" ) {
12739			this._close();
12740		} else {
12741			this.timer = this._delay( function() {
12742				this._close();
12743			}, this.delay );
12744		}
12745
12746		nested = item.children( ".ui-menu" );
12747		if ( nested.length && event && ( /^mouse/.test( event.type ) ) ) {
12748			this._startOpening( nested );
12749		}
12750		this.activeMenu = item.parent();
12751
12752		this._trigger( "focus", event, { item: item } );
12753	},
12754
12755	_scrollIntoView: function( item ) {
12756		var borderTop, paddingTop, offset, scroll, elementHeight, itemHeight;
12757		if ( this._hasScroll() ) {
12758			borderTop = parseFloat( $.css( this.activeMenu[ 0 ], "borderTopWidth" ) ) || 0;
12759			paddingTop = parseFloat( $.css( this.activeMenu[ 0 ], "paddingTop" ) ) || 0;
12760			offset = item.offset().top - this.activeMenu.offset().top - borderTop - paddingTop;
12761			scroll = this.activeMenu.scrollTop();
12762			elementHeight = this.activeMenu.height();
12763			itemHeight = item.outerHeight();
12764
12765			if ( offset < 0 ) {
12766				this.activeMenu.scrollTop( scroll + offset );
12767			} else if ( offset + itemHeight > elementHeight ) {
12768				this.activeMenu.scrollTop( scroll + offset - elementHeight + itemHeight );
12769			}
12770		}
12771	},
12772
12773	blur: function( event, fromFocus ) {
12774		if ( !fromFocus ) {
12775			clearTimeout( this.timer );
12776		}
12777
12778		if ( !this.active ) {
12779			return;
12780		}
12781
12782		this._removeClass( this.active.children( ".ui-menu-item-wrapper" ),
12783			null, "ui-state-active" );
12784
12785		this._trigger( "blur", event, { item: this.active } );
12786		this.active = null;
12787	},
12788
12789	_startOpening: function( submenu ) {
12790		clearTimeout( this.timer );
12791
12792		// Don't open if already open fixes a Firefox bug that caused a .5 pixel
12793		// shift in the submenu position when mousing over the caret icon
12794		if ( submenu.attr( "aria-hidden" ) !== "true" ) {
12795			return;
12796		}
12797
12798		this.timer = this._delay( function() {
12799			this._close();
12800			this._open( submenu );
12801		}, this.delay );
12802	},
12803
12804	_open: function( submenu ) {
12805		var position = $.extend( {
12806			of: this.active
12807		}, this.options.position );
12808
12809		clearTimeout( this.timer );
12810		this.element.find( ".ui-menu" ).not( submenu.parents( ".ui-menu" ) )
12811			.hide()
12812			.attr( "aria-hidden", "true" );
12813
12814		submenu
12815			.show()
12816			.removeAttr( "aria-hidden" )
12817			.attr( "aria-expanded", "true" )
12818			.position( position );
12819	},
12820
12821	collapseAll: function( event, all ) {
12822		clearTimeout( this.timer );
12823		this.timer = this._delay( function() {
12824
vendor: 5,432 bytes, lines 12825-13028
12825			// If we were passed an event, look for the submenu that contains the event
12826			var currentMenu = all ? this.element :
12827				$( event && event.target ).closest( this.element.find( ".ui-menu" ) );
12828
12829			// If we found no valid submenu ancestor, use the main menu to close all
12830			// sub menus anyway
12831			if ( !currentMenu.length ) {
12832				currentMenu = this.element;
12833			}
12834
12835			this._close( currentMenu );
12836
12837			this.blur( event );
12838
12839			// Work around active item staying active after menu is blurred
12840			this._removeClass( currentMenu.find( ".ui-state-active" ), null, "ui-state-active" );
12841
12842			this.activeMenu = currentMenu;
12843		}, all ? 0 : this.delay );
12844	},
12845
12846	// With no arguments, closes the currently active menu - if nothing is active
12847	// it closes all menus.  If passed an argument, it will search for menus BELOW
12848	_close: function( startMenu ) {
12849		if ( !startMenu ) {
12850			startMenu = this.active ? this.active.parent() : this.element;
12851		}
12852
12853		startMenu.find( ".ui-menu" )
12854			.hide()
12855			.attr( "aria-hidden", "true" )
12856			.attr( "aria-expanded", "false" );
12857	},
12858
12859	_closeOnDocumentClick: function( event ) {
12860		return !$( event.target ).closest( ".ui-menu" ).length;
12861	},
12862
12863	_isDivider: function( item ) {
12864
12865		// Match hyphen, em dash, en dash
12866		return !/[^\-\u2014\u2013\s]/.test( item.text() );
12867	},
12868
12869	collapse: function( event ) {
12870		var newItem = this.active &&
12871			this.active.parent().closest( ".ui-menu-item", this.element );
12872		if ( newItem && newItem.length ) {
12873			this._close();
12874			this.focus( event, newItem );
12875		}
12876	},
12877
12878	expand: function( event ) {
12879		var newItem = this.active && this._menuItems( this.active.children( ".ui-menu" ) ).first();
12880
12881		if ( newItem && newItem.length ) {
12882			this._open( newItem.parent() );
12883
12884			// Delay so Firefox will not hide activedescendant change in expanding submenu from AT
12885			this._delay( function() {
12886				this.focus( event, newItem );
12887			} );
12888		}
12889	},
12890
12891	next: function( event ) {
12892		this._move( "next", "first", event );
12893	},
12894
12895	previous: function( event ) {
12896		this._move( "prev", "last", event );
12897	},
12898
12899	isFirstItem: function() {
12900		return this.active && !this.active.prevAll( ".ui-menu-item" ).length;
12901	},
12902
12903	isLastItem: function() {
12904		return this.active && !this.active.nextAll( ".ui-menu-item" ).length;
12905	},
12906
12907	_menuItems: function( menu ) {
12908		return ( menu || this.element )
12909			.find( this.options.items )
12910			.filter( ".ui-menu-item" );
12911	},
12912
12913	_move: function( direction, filter, event ) {
12914		var next;
12915		if ( this.active ) {
12916			if ( direction === "first" || direction === "last" ) {
12917				next = this.active
12918					[ direction === "first" ? "prevAll" : "nextAll" ]( ".ui-menu-item" )
12919					.last();
12920			} else {
12921				next = this.active
12922					[ direction + "All" ]( ".ui-menu-item" )
12923					.first();
12924			}
12925		}
12926		if ( !next || !next.length || !this.active ) {
12927			next = this._menuItems( this.activeMenu )[ filter ]();
12928		}
12929
12930		this.focus( event, next );
12931	},
12932
12933	nextPage: function( event ) {
12934		var item, base, height;
12935
12936		if ( !this.active ) {
12937			this.next( event );
12938			return;
12939		}
12940		if ( this.isLastItem() ) {
12941			return;
12942		}
12943		if ( this._hasScroll() ) {
12944			base = this.active.offset().top;
12945			height = this.element.innerHeight();
12946
12947			// jQuery 3.2 doesn't include scrollbars in innerHeight, add it back.
12948			if ( $.fn.jquery.indexOf( "3.2." ) === 0 ) {
12949				height += this.element[ 0 ].offsetHeight - this.element.outerHeight();
12950			}
12951
12952			this.active.nextAll( ".ui-menu-item" ).each( function() {
12953				item = $( this );
12954				return item.offset().top - base - height < 0;
12955			} );
12956
12957			this.focus( event, item );
12958		} else {
12959			this.focus( event, this._menuItems( this.activeMenu )
12960				[ !this.active ? "first" : "last" ]() );
12961		}
12962	},
12963
12964	previousPage: function( event ) {
12965		var item, base, height;
12966		if ( !this.active ) {
12967			this.next( event );
12968			return;
12969		}
12970		if ( this.isFirstItem() ) {
12971			return;
12972		}
12973		if ( this._hasScroll() ) {
12974			base = this.active.offset().top;
12975			height = this.element.innerHeight();
12976
12977			// jQuery 3.2 doesn't include scrollbars in innerHeight, add it back.
12978			if ( $.fn.jquery.indexOf( "3.2." ) === 0 ) {
12979				height += this.element[ 0 ].offsetHeight - this.element.outerHeight();
12980			}
12981
12982			this.active.prevAll( ".ui-menu-item" ).each( function() {
12983				item = $( this );
12984				return item.offset().top - base + height > 0;
12985			} );
12986
12987			this.focus( event, item );
12988		} else {
12989			this.focus( event, this._menuItems( this.activeMenu ).first() );
12990		}
12991	},
12992
12993	_hasScroll: function() {
12994		return this.element.outerHeight() < this.element.prop( "scrollHeight" );
12995	},
12996
12997	select: function( event ) {
12998
12999		// TODO: It should never be possible to not have an active item at this
13000		// point, but the tests don't trigger mouseenter before click.
13001		this.active = this.active || $( event.target ).closest( ".ui-menu-item" );
13002		var ui = { item: this.active };
13003		if ( !this.active.has( ".ui-menu" ).length ) {
13004			this.collapseAll( event, true );
13005		}
13006		this._trigger( "select", event, ui );
13007	},
13008
13009	_filterMenuItems: function( character ) {
13010		var escapedCharacter = character.replace( /[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&" ),
13011			regex = new RegExp( "^" + escapedCharacter, "i" );
13012
13013		return this.activeMenu
13014			.find( this.options.items )
13015
13016				// Only match on items, not dividers or other content (#10571)
13017				.filter( ".ui-menu-item" )
13018					.filter( function() {
13019						return regex.test(
13020							String.prototype.trim.call(
13021								$( this ).children( ".ui-menu-item-wrapper" ).text() ) );
13022					} );
13023	}
13024} );
13025
13026
13027/*!
13028 * jQuery UI Autocomplete 1.1
130284.0
13029 * https://jqueryui.com
13030 *
13031 * Copyright OpenJS Foundation and other contributors
13032 * Released under the MIT license.
13033 * https://jquery.org/license
13034 */
13035
13036//>>label: Autocomplete
13037//>>group: Widgets
13038//>>description: Lists suggested words as the user is typing.
13039//>>docs: https://api.jqueryui.com/autocomplete/
13040//>>demos: https://jqueryui.com/autocomplete/
13041//>>css.structure: ../../themes/base/core.css
13042//>>css.structure: ../../themes/base/autocomplete.css
13043//>>css.theme: ../../themes/base/theme.css
13044
13045
13046$.widget( "ui.autocomplete", {
13047	version: "1.14.0
vendor: 15,301 bytes, lines 13047-13647
13047",
13048	defaultElement: "<input>",
13049	options: {
13050		appendTo: null,
13051		autoFocus: false,
13052		delay: 300,
13053		minLength: 1,
13054		position: {
13055			my: "left top",
13056			at: "left bottom",
13057			collision: "none"
13058		},
13059		source: null,
13060
13061		// Callbacks
13062		change: null,
13063		close: null,
13064		focus: null,
13065		open: null,
13066		response: null,
13067		search: null,
13068		select: null
13069	},
13070
13071	requestIndex: 0,
13072	pending: 0,
13073	liveRegionTimer: null,
13074
13075	_create: function() {
13076
13077		// Some browsers only repeat keydown events, not keypress events,
13078		// so we use the suppressKeyPress flag to determine if we've already
13079		// handled the keydown event. #7269
13080		// Unfortunately the code for & in keypress is the same as the up arrow,
13081		// so we use the suppressKeyPressRepeat flag to avoid handling keypress
13082		// events when we know the keydown event was used to modify the
13083		// search term. #7799
13084		var suppressKeyPress, suppressKeyPressRepeat, suppressInput,
13085			nodeName = this.element[ 0 ].nodeName.toLowerCase(),
13086			isTextarea = nodeName === "textarea",
13087			isInput = nodeName === "input";
13088
13089		// Textareas are always multi-line
13090		// Inputs are always single-line, even if inside a contentEditable element
13091		// All other element types are determined by whether they're contentEditable
13092		this.isMultiLine = isTextarea ||
13093			!isInput && this.element.prop( "contentEditable" ) === "true";
13094
13095		this.valueMethod = this.element[ isTextarea || isInput ? "val" : "text" ];
13096		this.isNewMenu = true;
13097
13098		this._addClass( "ui-autocomplete-input" );
13099		this.element.attr( "autocomplete", "off" );
13100
13101		this._on( this.element, {
13102			keydown: function( event ) {
13103				if ( this.element.prop( "readOnly" ) ) {
13104					suppressKeyPress = true;
13105					suppressInput = true;
13106					suppressKeyPressRepeat = true;
13107					return;
13108				}
13109
13110				suppressKeyPress = false;
13111				suppressInput = false;
13112				suppressKeyPressRepeat = false;
13113				var keyCode = $.ui.keyCode;
13114				switch ( event.keyCode ) {
13115				case keyCode.PAGE_UP:
13116					suppressKeyPress = true;
13117					this._move( "previousPage", event );
13118					break;
13119				case keyCode.PAGE_DOWN:
13120					suppressKeyPress = true;
13121					this._move( "nextPage", event );
13122					break;
13123				case keyCode.UP:
13124					suppressKeyPress = true;
13125					this._keyEvent( "previous", event );
13126					break;
13127				case keyCode.DOWN:
13128					suppressKeyPress = true;
13129					this._keyEvent( "next", event );
13130					break;
13131				case keyCode.ENTER:
13132
13133					// when menu is open and has focus
13134					if ( this.menu.active ) {
13135
13136						// #6055 - Opera still allows the keypress to occur
13137						// which causes forms to submit
13138						suppressKeyPress = true;
13139						event.preventDefault();
13140						this.menu.select( event );
13141					}
13142					break;
13143				case keyCode.TAB:
13144					if ( this.menu.active ) {
13145						this.menu.select( event );
13146					}
13147					break;
13148				case keyCode.ESCAPE:
13149					if ( this.menu.element.is( ":visible" ) ) {
13150						if ( !this.isMultiLine ) {
13151							this._value( this.term );
13152						}
13153						this.close( event );
13154
13155						// Different browsers have different default behavior for escape
13156						// Single press can mean undo or clear
13157						event.preventDefault();
13158					}
13159					break;
13160				default:
13161					suppressKeyPressRepeat = true;
13162
13163					// search timeout should be triggered before the input value is changed
13164					this._searchTimeout( event );
13165					break;
13166				}
13167			},
13168			keypress: function( event ) {
13169				if ( suppressKeyPress ) {
13170					suppressKeyPress = false;
13171					if ( !this.isMultiLine || this.menu.element.is( ":visible" ) ) {
13172						event.preventDefault();
13173					}
13174					return;
13175				}
13176				if ( suppressKeyPressRepeat ) {
13177					return;
13178				}
13179
13180				// Replicate some key handlers to allow them to repeat in Firefox and Opera
13181				var keyCode = $.ui.keyCode;
13182				switch ( event.keyCode ) {
13183				case keyCode.PAGE_UP:
13184					this._move( "previousPage", event );
13185					break;
13186				case keyCode.PAGE_DOWN:
13187					this._move( "nextPage", event );
13188					break;
13189				case keyCode.UP:
13190					this._keyEvent( "previous", event );
13191					break;
13192				case keyCode.DOWN:
13193					this._keyEvent( "next", event );
13194					break;
13195				}
13196			},
13197			input: function( event ) {
13198				if ( suppressInput ) {
13199					suppressInput = false;
13200					event.preventDefault();
13201					return;
13202				}
13203				this._searchTimeout( event );
13204			},
13205			focus: function() {
13206				this.selectedItem = null;
13207				this.previous = this._value();
13208			},
13209			blur: function( event ) {
13210				clearTimeout( this.searching );
13211				this.close( event );
13212				this._change( event );
13213			}
13214		} );
13215
13216		this._initSource();
13217		this.menu = $( "<ul>" )
13218			.appendTo( this._appendTo() )
13219			.menu( {
13220
13221				// disable ARIA support, the live region takes care of that
13222				role: null
13223			} )
13224			.hide()
13225			.menu( "instance" );
13226
13227		this._addClass( this.menu.element, "ui-autocomplete", "ui-front" );
13228		this._on( this.menu.element, {
13229			mousedown: function( event ) {
13230
13231				// Prevent moving focus out of the text field
13232				event.preventDefault();
13233			},
13234			menufocus: function( event, ui ) {
13235				var label, item;
13236
13237				// Support: Firefox
13238				// Prevent accidental activation of menu items in Firefox (#7024 #9118)
13239				if ( this.isNewMenu ) {
13240					this.isNewMenu = false;
13241					if ( event.originalEvent && /^mouse/.test( event.originalEvent.type ) ) {
13242						this.menu.blur();
13243
13244						this.document.one( "mousemove", function() {
13245							$( event.target ).trigger( event.originalEvent );
13246						} );
13247
13248						return;
13249					}
13250				}
13251
13252				item = ui.item.data( "ui-autocomplete-item" );
13253				if ( false !== this._trigger( "focus", event, { item: item } ) ) {
13254
13255					// use value to match what will end up in the input, if it was a key event
13256					if ( event.originalEvent && /^key/.test( event.originalEvent.type ) ) {
13257						this._value( item.value );
13258					}
13259				}
13260
13261				// Announce the value in the liveRegion
13262				label = ui.item.attr( "aria-label" ) || item.value;
13263				if ( label && String.prototype.trim.call( label ).length ) {
13264					clearTimeout( this.liveRegionTimer );
13265					this.liveRegionTimer = this._delay( function() {
13266						this.liveRegion.html( $( "<div>" ).text( label ) );
13267					}, 100 );
13268				}
13269			},
13270			menuselect: function( event, ui ) {
13271				var item = ui.item.data( "ui-autocomplete-item" ),
13272					previous = this.previous;
13273
13274				// Only trigger when focus was lost (click on menu)
13275				if ( this.element[ 0 ] !== this.document[ 0 ].activeElement ) {
13276					this.element.trigger( "focus" );
13277					this.previous = previous;
13278				}
13279
13280				if ( false !== this._trigger( "select", event, { item: item } ) ) {
13281					this._value( item.value );
13282				}
13283
13284				// reset the term after the select event
13285				// this allows custom select handling to work properly
13286				this.term = this._value();
13287
13288				this.close( event );
13289				this.selectedItem = item;
13290			}
13291		} );
13292
13293		this.liveRegion = $( "<div>", {
13294			role: "status",
13295			"aria-live": "assertive",
13296			"aria-relevant": "additions"
13297		} )
13298			.appendTo( this.document[ 0 ].body );
13299
13300		this._addClass( this.liveRegion, null, "ui-helper-hidden-accessible" );
13301
13302		// Turning off autocomplete prevents the browser from remembering the
13303		// value when navigating through history, so we re-enable autocomplete
13304		// if the page is unloaded before the widget is destroyed. #7790
13305		this._on( this.window, {
13306			beforeunload: function() {
13307				this.element.removeAttr( "autocomplete" );
13308			}
13309		} );
13310	},
13311
13312	_destroy: function() {
13313		clearTimeout( this.searching );
13314		this.element.removeAttr( "autocomplete" );
13315		this.menu.element.remove();
13316		this.liveRegion.remove();
13317	},
13318
13319	_setOption: function( key, value ) {
13320		this._super( key, value );
13321		if ( key === "source" ) {
13322			this._initSource();
13323		}
13324		if ( key === "appendTo" ) {
13325			this.menu.element.appendTo( this._appendTo() );
13326		}
13327		if ( key === "disabled" && value && this.xhr ) {
13328			this.xhr.abort();
13329		}
13330	},
13331
13332	_isEventTargetInWidget: function( event ) {
13333		var menuElement = this.menu.element[ 0 ];
13334
13335		return event.target === this.element[ 0 ] ||
13336			event.target === menuElement ||
13337			$.contains( menuElement, event.target );
13338	},
13339
13340	_closeOnClickOutside: function( event ) {
13341		if ( !this._isEventTargetInWidget( event ) ) {
13342			this.close();
13343		}
13344	},
13345
13346	_appendTo: function() {
13347		var element = this.options.appendTo;
13348
13349		if ( element ) {
13350			element = element.jquery || element.nodeType ?
13351				$( element ) :
13352				this.document.find( element ).eq( 0 );
13353		}
13354
13355		if ( !element || !element[ 0 ] ) {
13356			element = this.element.closest( ".ui-front, dialog" );
13357		}
13358
13359		if ( !element.length ) {
13360			element = this.document[ 0 ].body;
13361		}
13362
13363		return element;
13364	},
13365
13366	_initSource: function() {
13367		var array, url,
13368			that = this;
13369		if ( Array.isArray( this.options.source ) ) {
13370			array = this.options.source;
13371			this.source = function( request, response ) {
13372				response( $.ui.autocomplete.filter( array, request.term ) );
13373			};
13374		} else if ( typeof this.options.source === "string" ) {
13375			url = this.options.source;
13376			this.source = function( request, response ) {
13377				if ( that.xhr ) {
13378					that.xhr.abort();
13379				}
13380				that.xhr = $.ajax( {
13381					url: url,
13382					data: request,
13383					dataType: "json",
13384					success: function( data ) {
13385						response( data );
13386					},
13387					error: function() {
13388						response( [] );
13389					}
13390				} );
13391			};
13392		} else {
13393			this.source = this.options.source;
13394		}
13395	},
13396
13397	_searchTimeout: function( event ) {
13398		clearTimeout( this.searching );
13399		this.searching = this._delay( function() {
13400
13401			// Search if the value has changed, or if the user retypes the same value (see #7434)
13402			var equalValues = this.term === this._value(),
13403				menuVisible = this.menu.element.is( ":visible" ),
13404				modifierKey = event.altKey || event.ctrlKey || event.metaKey || event.shiftKey;
13405
13406			if ( !equalValues || ( equalValues && !menuVisible && !modifierKey ) ) {
13407				this.selectedItem = null;
13408				this.search( null, event );
13409			}
13410		}, this.options.delay );
13411	},
13412
13413	search: function( value, event ) {
13414		value = value != null ? value : this._value();
13415
13416		// Always save the actual value, not the one passed as an argument
13417		this.term = this._value();
13418
13419		if ( value.length < this.options.minLength ) {
13420			return this.close( event );
13421		}
13422
13423		if ( this._trigger( "search", event ) === false ) {
13424			return;
13425		}
13426
13427		return this._search( value );
13428	},
13429
13430	_search: function( value ) {
13431		this.pending++;
13432		this._addClass( "ui-autocomplete-loading" );
13433		this.cancelSearch = false;
13434
13435		this.source( { term: value }, this._response() );
13436	},
13437
13438	_response: function() {
13439		var index = ++this.requestIndex;
13440
13441		return function( content ) {
13442			if ( index === this.requestIndex ) {
13443				this.__response( content );
13444			}
13445
13446			this.pending--;
13447			if ( !this.pending ) {
13448				this._removeClass( "ui-autocomplete-loading" );
13449			}
13450		}.bind( this );
13451	},
13452
13453	__response: function( content ) {
13454		if ( content ) {
13455			content = this._normalize( content );
13456		}
13457		this._trigger( "response", null, { content: content } );
13458		if ( !this.options.disabled && content && content.length && !this.cancelSearch ) {
13459			this._suggest( content );
13460			this._trigger( "open" );
13461		} else {
13462
13463			// use ._close() instead of .close() so we don't cancel future searches
13464			this._close();
13465		}
13466	},
13467
13468	close: function( event ) {
13469		this.cancelSearch = true;
13470		this._close( event );
13471	},
13472
13473	_close: function( event ) {
13474
13475		// Remove the handler that closes the menu on outside clicks
13476		this._off( this.document, "mousedown" );
13477
13478		if ( this.menu.element.is( ":visible" ) ) {
13479			this.menu.element.hide();
13480			this.menu.blur();
13481			this.isNewMenu = true;
13482			this._trigger( "close", event );
13483		}
13484	},
13485
13486	_change: function( event ) {
13487		if ( this.previous !== this._value() ) {
13488			this._trigger( "change", event, { item: this.selectedItem } );
13489		}
13490	},
13491
13492	_normalize: function( items ) {
13493
13494		// assume all items have the right format when the first item is complete
13495		if ( items.length && items[ 0 ].label && items[ 0 ].value ) {
13496			return items;
13497		}
13498		return $.map( items, function( item ) {
13499			if ( typeof item === "string" ) {
13500				return {
13501					label: item,
13502					value: item
13503				};
13504			}
13505			return $.extend( {}, item, {
13506				label: item.label || item.value,
13507				value: item.value || item.label
13508			} );
13509		} );
13510	},
13511
13512	_suggest: function( items ) {
13513		var ul = this.menu.element.empty();
13514		this._renderMenu( ul, items );
13515		this.isNewMenu = true;
13516		this.menu.refresh();
13517
13518		// Size and position menu
13519		ul.show();
13520		this._resizeMenu();
13521		ul.position( $.extend( {
13522			of: this.element
13523		}, this.options.position ) );
13524
13525		if ( this.options.autoFocus ) {
13526			this.menu.next();
13527		}
13528
13529		// Listen for interactions outside of the widget (#6642)
13530		this._on( this.document, {
13531			mousedown: "_closeOnClickOutside"
13532		} );
13533	},
13534
13535	_resizeMenu: function() {
13536		var ul = this.menu.element;
13537		ul.outerWidth( Math.max(
13538
13539			// Firefox wraps long text (possibly a rounding bug)
13540			// so we add 1px to avoid the wrapping (#7513)
13541			ul.width( "" ).outerWidth() + 1,
13542			this.element.outerWidth()
13543		) );
13544	},
13545
13546	_renderMenu: function( ul, items ) {
13547		var that = this;
13548		$.each( items, function( index, item ) {
13549			that._renderItemData( ul, item );
13550		} );
13551	},
13552
13553	_renderItemData: function( ul, item ) {
13554		return this._renderItem( ul, item ).data( "ui-autocomplete-item", item );
13555	},
13556
13557	_renderItem: function( ul, item ) {
13558		return $( "<li>" )
13559			.append( $( "<div>" ).text( item.label ) )
13560			.appendTo( ul );
13561	},
13562
13563	_move: function( direction, event ) {
13564		if ( !this.menu.element.is( ":visible" ) ) {
13565			this.search( null, event );
13566			return;
13567		}
13568		if ( this.menu.isFirstItem() && /^previous/.test( direction ) ||
13569				this.menu.isLastItem() && /^next/.test( direction ) ) {
13570
13571			if ( !this.isMultiLine ) {
13572				this._value( this.term );
13573			}
13574
13575			this.menu.blur();
13576			return;
13577		}
13578		this.menu[ direction ]( event );
13579	},
13580
13581	widget: function() {
13582		return this.menu.element;
13583	},
13584
13585	_value: function() {
13586		return this.valueMethod.apply( this.element, arguments );
13587	},
13588
13589	_keyEvent: function( keyEvent, event ) {
13590		if ( !this.isMultiLine || this.menu.element.is( ":visible" ) ) {
13591			this._move( keyEvent, event );
13592
13593			// Prevents moving cursor to beginning/end of the text field in some browsers
13594			event.preventDefault();
13595		}
13596	}
13597} );
13598
13599$.extend( $.ui.autocomplete, {
13600	escapeRegex: function( value ) {
13601		return value.replace( /[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&" );
13602	},
13603	filter: function( array, term ) {
13604		var matcher = new RegExp( $.ui.autocomplete.escapeRegex( term ), "i" );
13605		return $.grep( array, function( value ) {
13606			return matcher.test( value.label || value.value || value );
13607		} );
13608	}
13609} );
13610
13611// Live region extension, adding a `messages` option
13612// NOTE: This is an experimental API. We are still investigating
13613// a full solution for string manipulation and internationalization.
13614$.widget( "ui.autocomplete", $.ui.autocomplete, {
13615	options: {
13616		messages: {
13617			noResults: "No search results.",
13618			results: function( amount ) {
13619				return amount + ( amount > 1 ? " results are" : " result is" ) +
13620					" available, use up and down arrow keys to navigate.";
13621			}
13622		}
13623	},
13624
13625	__response: function( content ) {
13626		var message;
13627		this._superApply( arguments );
13628		if ( this.options.disabled || this.cancelSearch ) {
13629			return;
13630		}
13631		if ( content && content.length ) {
13632			message = this.options.messages.results( content.length );
13633		} else {
13634			message = this.options.messages.noResults;
13635		}
13636		clearTimeout( this.liveRegionTimer );
13637		this.liveRegionTimer = this._delay( function() {
13638			this.liveRegion.html( $( "<div>" ).text( message ) );
13639		}, 100 );
13640	}
13641} );
13642
13643var widgetsAutocomplete = $.ui.autocomplete;
13644
13645
13646/*!
13647 * jQuery UI Controlgroup 1.14.
136470
13648 * https://jqueryui.com
13649 *
13650 * Copyright OpenJS Foundation and other contributors
13651 * Released under the MIT license.
13652 * https://jquery.org/license
13653 */
13654
13655//>>label: Controlgroup
13656//>>group: Widgets
13657//>>description: Visually groups form control widgets
13658//>>docs: https://api.jqueryui.com/controlgroup/
13659//>>demos: https://jqueryui.com/controlgroup/
13660//>>css.structure: ../../themes/base/core.css
13661//>>css.structure: ../../themes/base/controlgroup.css
13662//>>css.theme: ../../themes/base/theme.css
13663
13664
13665var controlgroupCornerRegex = /ui-corner-([a-z]){2,6}/g;
13666
13667var widgetsControlgroup = $.widget( "ui.controlgroup", {
13668	version: "1.14.0
vendor: 7,734 bytes, lines 13668-13932
13668",
13669	defaultElement: "<div>",
13670	options: {
13671		direction: "horizontal",
13672		disabled: null,
13673		onlyVisible: true,
13674		items: {
13675			"button": "input[type=button], input[type=submit], input[type=reset], button, a",
13676			"controlgroupLabel": ".ui-controlgroup-label",
13677			"checkboxradio": "input[type='checkbox'], input[type='radio']",
13678			"selectmenu": "select",
13679			"spinner": ".ui-spinner-input"
13680		}
13681	},
13682
13683	_create: function() {
13684		this._enhance();
13685	},
13686
13687	// To support the enhanced option in jQuery Mobile, we isolate DOM manipulation
13688	_enhance: function() {
13689		this.element.attr( "role", "toolbar" );
13690		this.refresh();
13691	},
13692
13693	_destroy: function() {
13694		this._callChildMethod( "destroy" );
13695		this.childWidgets.removeData( "ui-controlgroup-data" );
13696		this.element.removeAttr( "role" );
13697		if ( this.options.items.controlgroupLabel ) {
13698			this.element
13699				.find( this.options.items.controlgroupLabel )
13700				.find( ".ui-controlgroup-label-contents" )
13701				.contents().unwrap();
13702		}
13703	},
13704
13705	_initWidgets: function() {
13706		var that = this,
13707			childWidgets = [];
13708
13709		// First we iterate over each of the items options
13710		$.each( this.options.items, function( widget, selector ) {
13711			var labels;
13712			var options = {};
13713
13714			// Make sure the widget has a selector set
13715			if ( !selector ) {
13716				return;
13717			}
13718
13719			if ( widget === "controlgroupLabel" ) {
13720				labels = that.element.find( selector );
13721				labels.each( function() {
13722					var element = $( this );
13723
13724					if ( element.children( ".ui-controlgroup-label-contents" ).length ) {
13725						return;
13726					}
13727					element.contents()
13728						.wrapAll( "<span class='ui-controlgroup-label-contents'></span>" );
13729				} );
13730				that._addClass( labels, null, "ui-widget ui-widget-content ui-state-default" );
13731				childWidgets = childWidgets.concat( labels.get() );
13732				return;
13733			}
13734
13735			// Make sure the widget actually exists
13736			if ( !$.fn[ widget ] ) {
13737				return;
13738			}
13739
13740			// We assume everything is in the middle to start because we can't determine
13741			// first / last elements until all enhancments are done.
13742			if ( that[ "_" + widget + "Options" ] ) {
13743				options = that[ "_" + widget + "Options" ]( "middle" );
13744			} else {
13745				options = { classes: {} };
13746			}
13747
13748			// Find instances of this widget inside controlgroup and init them
13749			that.element
13750				.find( selector )
13751				.each( function() {
13752					var element = $( this );
13753					var instance = element[ widget ]( "instance" );
13754
13755					// We need to clone the default options for this type of widget to avoid
13756					// polluting the variable options which has a wider scope than a single widget.
13757					var instanceOptions = $.widget.extend( {}, options );
13758
13759					// If the button is the child of a spinner ignore it
13760					// TODO: Find a more generic solution
13761					if ( widget === "button" && element.parent( ".ui-spinner" ).length ) {
13762						return;
13763					}
13764
13765					// Create the widget if it doesn't exist
13766					if ( !instance ) {
13767						instance = element[ widget ]()[ widget ]( "instance" );
13768					}
13769					if ( instance ) {
13770						instanceOptions.classes =
13771							that._resolveClassesValues( instanceOptions.classes, instance );
13772					}
13773					element[ widget ]( instanceOptions );
13774
13775					// Store an instance of the controlgroup to be able to reference
13776					// from the outermost element for changing options and refresh
13777					var widgetElement = element[ widget ]( "widget" );
13778					$.data( widgetElement[ 0 ], "ui-controlgroup-data",
13779						instance ? instance : element[ widget ]( "instance" ) );
13780
13781					childWidgets.push( widgetElement[ 0 ] );
13782				} );
13783		} );
13784
13785		this.childWidgets = $( $.uniqueSort( childWidgets ) );
13786		this._addClass( this.childWidgets, "ui-controlgroup-item" );
13787	},
13788
13789	_callChildMethod: function( method ) {
13790		this.childWidgets.each( function() {
13791			var element = $( this ),
13792				data = element.data( "ui-controlgroup-data" );
13793			if ( data && data[ method ] ) {
13794				data[ method ]();
13795			}
13796		} );
13797	},
13798
13799	_updateCornerClass: function( element, position ) {
13800		var remove = "ui-corner-top ui-corner-bottom ui-corner-left ui-corner-right ui-corner-all";
13801		var add = this._buildSimpleOptions( position, "label" ).classes.label;
13802
13803		this._removeClass( element, null, remove );
13804		this._addClass( element, null, add );
13805	},
13806
13807	_buildSimpleOptions: function( position, key ) {
13808		var direction = this.options.direction === "vertical";
13809		var result = {
13810			classes: {}
13811		};
13812		result.classes[ key ] = {
13813			"middle": "",
13814			"first": "ui-corner-" + ( direction ? "top" : "left" ),
13815			"last": "ui-corner-" + ( direction ? "bottom" : "right" ),
13816			"only": "ui-corner-all"
13817		}[ position ];
13818
13819		return result;
13820	},
13821
13822	_spinnerOptions: function( position ) {
13823		var options = this._buildSimpleOptions( position, "ui-spinner" );
13824
13825		options.classes[ "ui-spinner-up" ] = "";
13826		options.classes[ "ui-spinner-down" ] = "";
13827
13828		return options;
13829	},
13830
13831	_buttonOptions: function( position ) {
13832		return this._buildSimpleOptions( position, "ui-button" );
13833	},
13834
13835	_checkboxradioOptions: function( position ) {
13836		return this._buildSimpleOptions( position, "ui-checkboxradio-label" );
13837	},
13838
13839	_selectmenuOptions: function( position ) {
13840		var direction = this.options.direction === "vertical";
13841		return {
13842			width: direction ? "auto" : false,
13843			classes: {
13844				middle: {
13845					"ui-selectmenu-button-open": "",
13846					"ui-selectmenu-button-closed": ""
13847				},
13848				first: {
13849					"ui-selectmenu-button-open": "ui-corner-" + ( direction ? "top" : "tl" ),
13850					"ui-selectmenu-button-closed": "ui-corner-" + ( direction ? "top" : "left" )
13851				},
13852				last: {
13853					"ui-selectmenu-button-open": direction ? "" : "ui-corner-tr",
13854					"ui-selectmenu-button-closed": "ui-corner-" + ( direction ? "bottom" : "right" )
13855				},
13856				only: {
13857					"ui-selectmenu-button-open": "ui-corner-top",
13858					"ui-selectmenu-button-closed": "ui-corner-all"
13859				}
13860
13861			}[ position ]
13862		};
13863	},
13864
13865	_resolveClassesValues: function( classes, instance ) {
13866		var result = {};
13867		$.each( classes, function( key ) {
13868			var current = instance.options.classes[ key ] || "";
13869			current = String.prototype.trim.call( current.replace( controlgroupCornerRegex, "" ) );
13870			result[ key ] = ( current + " " + classes[ key ] ).replace( /\s+/g, " " );
13871		} );
13872		return result;
13873	},
13874
13875	_setOption: function( key, value ) {
13876		if ( key === "direction" ) {
13877			this._removeClass( "ui-controlgroup-" + this.options.direction );
13878		}
13879
13880		this._super( key, value );
13881		if ( key === "disabled" ) {
13882			this._callChildMethod( value ? "disable" : "enable" );
13883			return;
13884		}
13885
13886		this.refresh();
13887	},
13888
13889	refresh: function() {
13890		var children,
13891			that = this;
13892
13893		this._addClass( "ui-controlgroup ui-controlgroup-" + this.options.direction );
13894
13895		if ( this.options.direction === "horizontal" ) {
13896			this._addClass( null, "ui-helper-clearfix" );
13897		}
13898		this._initWidgets();
13899
13900		children = this.childWidgets;
13901
13902		// We filter here because we need to track all childWidgets not just the visible ones
13903		if ( this.options.onlyVisible ) {
13904			children = children.filter( ":visible" );
13905		}
13906
13907		if ( children.length ) {
13908
13909			// We do this last because we need to make sure all enhancment is done
13910			// before determining first and last
13911			$.each( [ "first", "last" ], function( index, value ) {
13912				var instance = children[ value ]().data( "ui-controlgroup-data" );
13913
13914				if ( instance && that[ "_" + instance.widgetName + "Options" ] ) {
13915					var options = that[ "_" + instance.widgetName + "Options" ](
13916						children.length === 1 ? "only" : value
13917					);
13918					options.classes = that._resolveClassesValues( options.classes, instance );
13919					instance.element[ instance.widgetName ]( options );
13920				} else {
13921					that._updateCornerClass( children[ value ](), value );
13922				}
13923			} );
13924
13925			// Finally call the refresh method on each of the child widgets.
13926			this._callChildMethod( "refresh" );
13927		}
13928	}
13929} );
13930
13931/*!
13932 * jQuery UI Checkboxradio 1.1
vendor: 7,791 bytes, lines 13932-14222
139324.0
13933 * https://jqueryui.com
13934 *
13935 * Copyright OpenJS Foundation and other contributors
13936 * Released under the MIT license.
13937 * https://jquery.org/license
13938 */
13939
13940//>>label: Checkboxradio
13941//>>group: Widgets
13942//>>description: Enhances a form with multiple themeable checkboxes or radio buttons.
13943//>>docs: https://api.jqueryui.com/checkboxradio/
13944//>>demos: https://jqueryui.com/checkboxradio/
13945//>>css.structure: ../../themes/base/core.css
13946//>>css.structure: ../../themes/base/button.css
13947//>>css.structure: ../../themes/base/checkboxradio.css
13948//>>css.theme: ../../themes/base/theme.css
13949
13950
13951$.widget( "ui.checkboxradio", [ $.ui.formResetMixin, {
13952	version: "1.14.0",
13953	options: {
13954		disabled: null,
13955		label: null,
13956		icon: true,
13957		classes: {
13958			"ui-checkboxradio-label": "ui-corner-all",
13959			"ui-checkboxradio-icon": "ui-corner-all"
13960		}
13961	},
13962
13963	_getCreateOptions: function() {
13964		var disabled, labels, labelContents;
13965		var options = this._super() || {};
13966
13967		// We read the type here, because it makes more sense to throw a element type error first,
13968		// rather then the error for lack of a label. Often if its the wrong type, it
13969		// won't have a label (e.g. calling on a div, btn, etc)
13970		this._readType();
13971
13972		labels = this.element.labels();
13973
13974		// If there are multiple labels, use the last one
13975		this.label = $( labels[ labels.length - 1 ] );
13976		if ( !this.label.length ) {
13977			$.error( "No label found for checkboxradio widget" );
13978		}
13979
13980		this.originalLabel = "";
13981
13982		// We need to get the label text but this may also need to make sure it does not contain the
13983		// input itself.
13984		// The label contents could be text, html, or a mix. We wrap all elements
13985		// and read the wrapper's `innerHTML` to get a string representation of
13986		// the label, without the input as part of it.
13987		labelContents = this.label.contents().not( this.element[ 0 ] );
13988
13989		if ( labelContents.length ) {
13990			this.originalLabel += labelContents
13991				.clone()
13992				.wrapAll( "<div></div>" )
13993				.parent()
13994				.html();
13995		}
13996
13997		// Set the label option if we found label text
13998		if ( this.originalLabel ) {
13999			options.label = this.originalLabel;
14000		}
14001
14002		disabled = this.element[ 0 ].disabled;
14003		if ( disabled != null ) {
14004			options.disabled = disabled;
14005		}
14006		return options;
14007	},
14008
14009	_create: function() {
14010		var checked = this.element[ 0 ].checked;
14011
14012		this._bindFormResetHandler();
14013
14014		if ( this.options.disabled == null ) {
14015			this.options.disabled = this.element[ 0 ].disabled;
14016		}
14017
14018		this._setOption( "disabled", this.options.disabled );
14019		this._addClass( "ui-checkboxradio", "ui-helper-hidden-accessible" );
14020		this._addClass( this.label, "ui-checkboxradio-label", "ui-button ui-widget" );
14021
14022		if ( this.type === "radio" ) {
14023			this._addClass( this.label, "ui-checkboxradio-radio-label" );
14024		}
14025
14026		if ( this.options.label && this.options.label !== this.originalLabel ) {
14027			this._updateLabel();
14028		} else if ( this.originalLabel ) {
14029			this.options.label = this.originalLabel;
14030		}
14031
14032		this._enhance();
14033
14034		if ( checked ) {
14035			this._addClass( this.label, "ui-checkboxradio-checked", "ui-state-active" );
14036		}
14037
14038		this._on( {
14039			change: "_toggleClasses",
14040			focus: function() {
14041				this._addClass( this.label, null, "ui-state-focus ui-visual-focus" );
14042			},
14043			blur: function() {
14044				this._removeClass( this.label, null, "ui-state-focus ui-visual-focus" );
14045			}
14046		} );
14047	},
14048
14049	_readType: function() {
14050		var nodeName = this.element[ 0 ].nodeName.toLowerCase();
14051		this.type = this.element[ 0 ].type;
14052		if ( nodeName !== "input" || !/radio|checkbox/.test( this.type ) ) {
14053			$.error( "Can't create checkboxradio on element.nodeName=" + nodeName +
14054				" and element.type=" + this.type );
14055		}
14056	},
14057
14058	// Support jQuery Mobile enhanced option
14059	_enhance: function() {
14060		this._updateIcon( this.element[ 0 ].checked );
14061	},
14062
14063	widget: function() {
14064		return this.label;
14065	},
14066
14067	_getRadioGroup: function() {
14068		var group;
14069		var name = this.element[ 0 ].name;
14070		var nameSelector = "input[name='" + CSS.escape( name ) + "']";
14071
14072		if ( !name ) {
14073			return $( [] );
14074		}
14075
14076		if ( this.form.length ) {
14077			group = $( this.form[ 0 ].elements ).filter( nameSelector );
14078		} else {
14079
14080			// Not inside a form, check all inputs that also are not inside a form
14081			group = $( nameSelector ).filter( function() {
14082				return $( $( this ).prop( "form" ) ).length === 0;
14083			} );
14084		}
14085
14086		return group.not( this.element );
14087	},
14088
14089	_toggleClasses: function() {
14090		var checked = this.element[ 0 ].checked;
14091		this._toggleClass( this.label, "ui-checkboxradio-checked", "ui-state-active", checked );
14092
14093		if ( this.options.icon && this.type === "checkbox" ) {
14094			this._toggleClass( this.icon, null, "ui-icon-check ui-state-checked", checked )
14095				._toggleClass( this.icon, null, "ui-icon-blank", !checked );
14096		}
14097
14098		if ( this.type === "radio" ) {
14099			this._getRadioGroup()
14100				.each( function() {
14101					var instance = $( this ).checkboxradio( "instance" );
14102
14103					if ( instance ) {
14104						instance._removeClass( instance.label,
14105							"ui-checkboxradio-checked", "ui-state-active" );
14106					}
14107				} );
14108		}
14109	},
14110
14111	_destroy: function() {
14112		this._unbindFormResetHandler();
14113
14114		if ( this.icon ) {
14115			this.icon.remove();
14116			this.iconSpace.remove();
14117		}
14118	},
14119
14120	_setOption: function( key, value ) {
14121
14122		// We don't allow the value to be set to nothing
14123		if ( key === "label" && !value ) {
14124			return;
14125		}
14126
14127		this._super( key, value );
14128
14129		if ( key === "disabled" ) {
14130			this._toggleClass( this.label, null, "ui-state-disabled", value );
14131			this.element[ 0 ].disabled = value;
14132
14133			// Don't refresh when setting disabled
14134			return;
14135		}
14136		this.refresh();
14137	},
14138
14139	_updateIcon: function( checked ) {
14140		var toAdd = "ui-icon ui-icon-background ";
14141
14142		if ( this.options.icon ) {
14143			if ( !this.icon ) {
14144				this.icon = $( "<span>" );
14145				this.iconSpace = $( "<span> </span>" );
14146				this._addClass( this.iconSpace, "ui-checkboxradio-icon-space" );
14147			}
14148
14149			if ( this.type === "checkbox" ) {
14150				toAdd += checked ? "ui-icon-check ui-state-checked" : "ui-icon-blank";
14151				this._removeClass( this.icon, null, checked ? "ui-icon-blank" : "ui-icon-check" );
14152			} else {
14153				toAdd += "ui-icon-blank";
14154			}
14155			this._addClass( this.icon, "ui-checkboxradio-icon", toAdd );
14156			if ( !checked ) {
14157				this._removeClass( this.icon, null, "ui-icon-check ui-state-checked" );
14158			}
14159			this.icon.prependTo( this.label ).after( this.iconSpace );
14160		} else if ( this.icon !== undefined ) {
14161			this.icon.remove();
14162			this.iconSpace.remove();
14163			delete this.icon;
14164		}
14165	},
14166
14167	_updateLabel: function() {
14168
14169		// Remove the contents of the label ( minus the icon, icon space, and input )
14170		var contents = this.label.contents().not( this.element[ 0 ] );
14171		if ( this.icon ) {
14172			contents = contents.not( this.icon[ 0 ] );
14173		}
14174		if ( this.iconSpace ) {
14175			contents = contents.not( this.iconSpace[ 0 ] );
14176		}
14177		contents.remove();
14178
14179		this.label.append( this.options.label );
14180	},
14181
14182	refresh: function() {
14183		var checked = this.element[ 0 ].checked,
14184			isDisabled = this.element[ 0 ].disabled;
14185
14186		this._updateIcon( checked );
14187		this._toggleClass( this.label, "ui-checkboxradio-checked", "ui-state-active", checked );
14188		if ( this.options.label !== null ) {
14189			this._updateLabel();
14190		}
14191
14192		if ( isDisabled !== this.options.disabled ) {
14193			this._setOptions( { "disabled": isDisabled } );
14194		}
14195	}
14196
14197} ] );
14198
14199var widgetsCheckboxradio = $.ui.checkboxradio;
14200
14201
14202/*!
14203 * jQuery UI Button 1.14.0
14204 * https://jqueryui.com
14205 *
14206 * Copyright OpenJS Foundation and other contributors
14207 * Released under the MIT license.
14208 * https://jquery.org/license
14209 */
14210
14211//>>label: Button
14212//>>group: Widgets
14213//>>description: Enhances a form with themeable buttons.
14214//>>docs: https://api.jqueryui.com/button/
14215//>>demos: https://jqueryui.com/button/
14216//>>css.structure: ../../themes/base/core.css
14217//>>css.structure: ../../themes/base/button.css
14218//>>css.theme: ../../themes/base/theme.css
14219
14220
14221$.widget( "ui.button", {
14222	version: "1.14.0
vendor: 10,754 bytes, lines 14222-14627
14222",
14223	defaultElement: "<button>",
14224	options: {
14225		classes: {
14226			"ui-button": "ui-corner-all"
14227		},
14228		disabled: null,
14229		icon: null,
14230		iconPosition: "beginning",
14231		label: null,
14232		showLabel: true
14233	},
14234
14235	_getCreateOptions: function() {
14236		var disabled,
14237
14238			// This is to support cases like in jQuery Mobile where the base widget does have
14239			// an implementation of _getCreateOptions
14240			options = this._super() || {};
14241
14242		this.isInput = this.element.is( "input" );
14243
14244		disabled = this.element[ 0 ].disabled;
14245		if ( disabled != null ) {
14246			options.disabled = disabled;
14247		}
14248
14249		this.originalLabel = this.isInput ? this.element.val() : this.element.html();
14250		if ( this.originalLabel ) {
14251			options.label = this.originalLabel;
14252		}
14253
14254		return options;
14255	},
14256
14257	_create: function() {
14258		if ( !this.option.showLabel & !this.options.icon ) {
14259			this.options.showLabel = true;
14260		}
14261
14262		// We have to check the option again here even though we did in _getCreateOptions,
14263		// because null may have been passed on init which would override what was set in
14264		// _getCreateOptions
14265		if ( this.options.disabled == null ) {
14266			this.options.disabled = this.element[ 0 ].disabled || false;
14267		}
14268
14269		this.hasTitle = !!this.element.attr( "title" );
14270
14271		// Check to see if the label needs to be set or if its already correct
14272		if ( this.options.label && this.options.label !== this.originalLabel ) {
14273			if ( this.isInput ) {
14274				this.element.val( this.options.label );
14275			} else {
14276				this.element.html( this.options.label );
14277			}
14278		}
14279		this._addClass( "ui-button", "ui-widget" );
14280		this._setOption( "disabled", this.options.disabled );
14281		this._enhance();
14282
14283		if ( this.element.is( "a" ) ) {
14284			this._on( {
14285				"keyup": function( event ) {
14286					if ( event.keyCode === $.ui.keyCode.SPACE ) {
14287						event.preventDefault();
14288
14289						// If a native click is available use it, so we
14290						// actually cause navigation. Otherwise, just trigger
14291						// a click event.
14292						if ( this.element[ 0 ].click ) {
14293							this.element[ 0 ].click();
14294						} else {
14295							this.element.trigger( "click" );
14296						}
14297					}
14298				}
14299			} );
14300		}
14301	},
14302
14303	_enhance: function() {
14304		if ( !this.element.is( "button" ) ) {
14305			this.element.attr( "role", "button" );
14306		}
14307
14308		if ( this.options.icon ) {
14309			this._updateIcon( "icon", this.options.icon );
14310			this._updateTooltip();
14311		}
14312	},
14313
14314	_updateTooltip: function() {
14315		this.title = this.element.attr( "title" );
14316
14317		if ( !this.options.showLabel && !this.title ) {
14318			this.element.attr( "title", this.options.label );
14319		}
14320	},
14321
14322	_updateIcon: function( option, value ) {
14323		var icon = option !== "iconPosition",
14324			position = icon ? this.options.iconPosition : value,
14325			displayBlock = position === "top" || position === "bottom";
14326
14327		// Create icon
14328		if ( !this.icon ) {
14329			this.icon = $( "<span>" );
14330
14331			this._addClass( this.icon, "ui-button-icon", "ui-icon" );
14332
14333			if ( !this.options.showLabel ) {
14334				this._addClass( "ui-button-icon-only" );
14335			}
14336		} else if ( icon ) {
14337
14338			// If we are updating the icon remove the old icon class
14339			this._removeClass( this.icon, null, this.options.icon );
14340		}
14341
14342		// If we are updating the icon add the new icon class
14343		if ( icon ) {
14344			this._addClass( this.icon, null, value );
14345		}
14346
14347		this._attachIcon( position );
14348
14349		// If the icon is on top or bottom we need to add the ui-widget-icon-block class and remove
14350		// the iconSpace if there is one.
14351		if ( displayBlock ) {
14352			this._addClass( this.icon, null, "ui-widget-icon-block" );
14353			if ( this.iconSpace ) {
14354				this.iconSpace.remove();
14355			}
14356		} else {
14357
14358			// Position is beginning or end so remove the ui-widget-icon-block class and add the
14359			// space if it does not exist
14360			if ( !this.iconSpace ) {
14361				this.iconSpace = $( "<span> </span>" );
14362				this._addClass( this.iconSpace, "ui-button-icon-space" );
14363			}
14364			this._removeClass( this.icon, null, "ui-wiget-icon-block" );
14365			this._attachIconSpace( position );
14366		}
14367	},
14368
14369	_destroy: function() {
14370		this.element.removeAttr( "role" );
14371
14372		if ( this.icon ) {
14373			this.icon.remove();
14374		}
14375		if ( this.iconSpace ) {
14376			this.iconSpace.remove();
14377		}
14378		if ( !this.hasTitle ) {
14379			this.element.removeAttr( "title" );
14380		}
14381	},
14382
14383	_attachIconSpace: function( iconPosition ) {
14384		this.icon[ /^(?:end|bottom)/.test( iconPosition ) ? "before" : "after" ]( this.iconSpace );
14385	},
14386
14387	_attachIcon: function( iconPosition ) {
14388		this.element[ /^(?:end|bottom)/.test( iconPosition ) ? "append" : "prepend" ]( this.icon );
14389	},
14390
14391	_setOptions: function( options ) {
14392		var newShowLabel = options.showLabel === undefined ?
14393				this.options.showLabel :
14394				options.showLabel,
14395			newIcon = options.icon === undefined ? this.options.icon : options.icon;
14396
14397		if ( !newShowLabel && !newIcon ) {
14398			options.showLabel = true;
14399		}
14400		this._super( options );
14401	},
14402
14403	_setOption: function( key, value ) {
14404		if ( key === "icon" ) {
14405			if ( value ) {
14406				this._updateIcon( key, value );
14407			} else if ( this.icon ) {
14408				this.icon.remove();
14409				if ( this.iconSpace ) {
14410					this.iconSpace.remove();
14411				}
14412			}
14413		}
14414
14415		if ( key === "iconPosition" ) {
14416			this._updateIcon( key, value );
14417		}
14418
14419		// Make sure we can't end up with a button that has neither text nor icon
14420		if ( key === "showLabel" ) {
14421				this._toggleClass( "ui-button-icon-only", null, !value );
14422				this._updateTooltip();
14423		}
14424
14425		if ( key === "label" ) {
14426			if ( this.isInput ) {
14427				this.element.val( value );
14428			} else {
14429
14430				// If there is an icon, append it, else nothing then append the value
14431				// this avoids removal of the icon when setting label text
14432				this.element.html( value );
14433				if ( this.icon ) {
14434					this._attachIcon( this.options.iconPosition );
14435					this._attachIconSpace( this.options.iconPosition );
14436				}
14437			}
14438		}
14439
14440		this._super( key, value );
14441
14442		if ( key === "disabled" ) {
14443			this._toggleClass( null, "ui-state-disabled", value );
14444			this.element[ 0 ].disabled = value;
14445			if ( value ) {
14446				this.element.trigger( "blur" );
14447			}
14448		}
14449	},
14450
14451	refresh: function() {
14452
14453		// Make sure to only check disabled if its an element that supports this otherwise
14454		// check for the disabled class to determine state
14455		var isDisabled = this.element.is( "input, button" ) ?
14456			this.element[ 0 ].disabled : this.element.hasClass( "ui-button-disabled" );
14457
14458		if ( isDisabled !== this.options.disabled ) {
14459			this._setOptions( { disabled: isDisabled } );
14460		}
14461
14462		this._updateTooltip();
14463	}
14464} );
14465
14466// DEPRECATED
14467if ( $.uiBackCompat === true ) {
14468
14469	// Text and Icons options
14470	$.widget( "ui.button", $.ui.button, {
14471		options: {
14472			text: true,
14473			icons: {
14474				primary: null,
14475				secondary: null
14476			}
14477		},
14478
14479		_create: function() {
14480			if ( this.options.showLabel && !this.options.text ) {
14481				this.options.showLabel = this.options.text;
14482			}
14483			if ( !this.options.showLabel && this.options.text ) {
14484				this.options.text = this.options.showLabel;
14485			}
14486			if ( !this.options.icon && ( this.options.icons.primary ||
14487					this.options.icons.secondary ) ) {
14488				if ( this.options.icons.primary ) {
14489					this.options.icon = this.options.icons.primary;
14490				} else {
14491					this.options.icon = this.options.icons.secondary;
14492					this.options.iconPosition = "end";
14493				}
14494			} else if ( this.options.icon ) {
14495				this.options.icons.primary = this.options.icon;
14496			}
14497			this._super();
14498		},
14499
14500		_setOption: function( key, value ) {
14501			if ( key === "text" ) {
14502				this._super( "showLabel", value );
14503				return;
14504			}
14505			if ( key === "showLabel" ) {
14506				this.options.text = value;
14507			}
14508			if ( key === "icon" ) {
14509				this.options.icons.primary = value;
14510			}
14511			if ( key === "icons" ) {
14512				if ( value.primary ) {
14513					this._super( "icon", value.primary );
14514					this._super( "iconPosition", "beginning" );
14515				} else if ( value.secondary ) {
14516					this._super( "icon", value.secondary );
14517					this._super( "iconPosition", "end" );
14518				}
14519			}
14520			this._superApply( arguments );
14521		}
14522	} );
14523
14524	$.fn.button = ( function( orig ) {
14525		return function( options ) {
14526			var isMethodCall = typeof options === "string";
14527			var args = Array.prototype.slice.call( arguments, 1 );
14528			var returnValue = this;
14529
14530			if ( isMethodCall ) {
14531
14532				// If this is an empty collection, we need to have the instance method
14533				// return undefined instead of the jQuery instance
14534				if ( !this.length && options === "instance" ) {
14535					returnValue = undefined;
14536				} else {
14537					this.each( function() {
14538						var methodValue;
14539						var type = $( this ).attr( "type" );
14540						var name = type !== "checkbox" && type !== "radio" ?
14541							"button" :
14542							"checkboxradio";
14543						var instance = $.data( this, "ui-" + name );
14544
14545						if ( options === "instance" ) {
14546							returnValue = instance;
14547							return false;
14548						}
14549
14550						if ( !instance ) {
14551							return $.error( "cannot call methods on button" +
14552								" prior to initialization; " +
14553								"attempted to call method '" + options + "'" );
14554						}
14555
14556						if ( typeof instance[ options ] !== "function" ||
14557							options.charAt( 0 ) === "_" ) {
14558							return $.error( "no such method '" + options + "' for button" +
14559								" widget instance" );
14560						}
14561
14562						methodValue = instance[ options ].apply( instance, args );
14563
14564						if ( methodValue !== instance && methodValue !== undefined ) {
14565							returnValue = methodValue && methodValue.jquery ?
14566								returnValue.pushStack( methodValue.get() ) :
14567								methodValue;
14568							return false;
14569						}
14570					} );
14571				}
14572			} else {
14573
14574				// Allow multiple hashes to be passed on init
14575				if ( args.length ) {
14576					options = $.widget.extend.apply( null, [ options ].concat( args ) );
14577				}
14578
14579				this.each( function() {
14580					var type = $( this ).attr( "type" );
14581					var name = type !== "checkbox" && type !== "radio" ? "button" : "checkboxradio";
14582					var instance = $.data( this, "ui-" + name );
14583
14584					if ( instance ) {
14585						instance.option( options || {} );
14586						if ( instance._init ) {
14587							instance._init();
14588						}
14589					} else {
14590						if ( name === "button" ) {
14591							orig.call( $( this ), options );
14592							return;
14593						}
14594
14595						$( this ).checkboxradio( $.extend( { icon: false }, options ) );
14596					}
14597				} );
14598			}
14599
14600			return returnValue;
14601		};
14602	} )( $.fn.button );
14603
14604	$.fn.buttonset = function() {
14605		if ( !$.ui.controlgroup ) {
14606			$.error( "Controlgroup widget missing" );
14607		}
14608		if ( arguments[ 0 ] === "option" && arguments[ 1 ] === "items" && arguments[ 2 ] ) {
14609			return this.controlgroup.apply( this,
14610				[ arguments[ 0 ], "items.button", arguments[ 2 ] ] );
14611		}
14612		if ( arguments[ 0 ] === "option" && arguments[ 1 ] === "items" ) {
14613			return this.controlgroup.apply( this, [ arguments[ 0 ], "items.button" ] );
14614		}
14615		if ( typeof arguments[ 0 ] === "object" && arguments[ 0 ].items ) {
14616			arguments[ 0 ].items = {
14617				button: arguments[ 0 ].items
14618			};
14619		}
14620		return this.controlgroup.apply( this, arguments );
14621	};
14622}
14623
14624var widgetsButton = $.ui.button;
14625
14626
14627/* eslint-disable max-len
14627, camelcase */
14628/*!
14629 * jQuery UI Datepicker 1.14.0
14630 * https://jqueryui.com
14631 *
14632 * Copyright OpenJS Foundation and other contributors
14633 * Released under the MIT license.
14634 * https://jquery.org/license
14635 */
14636
14637//>>label: Datepicker
14638//>>group: Widgets
14639//>>description: Displays a calendar from an input or inline for selecting dates.
14640//>>docs: https://api.jqueryui.com/datepicker/
14641//>>demos: https://jqueryui.com/datepicker/
14642//>>css.structure: ../../themes/base/core.css
14643//>>css.structure: ../../themes/base/datepicker.css
14644//>>css.theme: ../../themes/base/theme.css
14645
14646
14647$.extend( $.ui, { datepicker: { version: "1.14.0
vendor: 17,405 bytes, lines 14647-15046
14647" } } );
14648
14649var datepicker_instActive;
14650
14651function datepicker_getZindex( elem ) {
14652	var position, value;
14653	while ( elem.length && elem[ 0 ] !== document ) {
14654
14655		// Ignore z-index if position is set to a value where z-index is ignored by the browser
14656		// This makes behavior of this function consistent across browsers
14657		// WebKit always returns auto if the element is positioned
14658		position = elem.css( "position" );
14659		if ( position === "absolute" || position === "relative" || position === "fixed" ) {
14660
14661			// IE returns 0 when zIndex is not specified
14662			// other browsers return a string
14663			// we ignore the case of nested elements with an explicit value of 0
14664			// <div style="z-index: -10;"><div style="z-index: 0;"></div></div>
14665			value = parseInt( elem.css( "zIndex" ), 10 );
14666			if ( !isNaN( value ) && value !== 0 ) {
14667				return value;
14668			}
14669		}
14670		elem = elem.parent();
14671	}
14672
14673	return 0;
14674}
14675
14676/* Date picker manager.
14677   Use the singleton instance of this class, $.datepicker, to interact with the date picker.
14678   Settings for (groups of) date pickers are maintained in an instance object,
14679   allowing multiple different settings on the same page. */
14680
14681function Datepicker() {
14682	this._curInst = null; // The current instance in use
14683	this._keyEvent = false; // If the last event was a key event
14684	this._disabledInputs = []; // List of date picker inputs that have been disabled
14685	this._datepickerShowing = false; // True if the popup picker is showing , false if not
14686	this._inDialog = false; // True if showing within a "dialog", false if not
14687	this._mainDivId = "ui-datepicker-div"; // The ID of the main datepicker division
14688	this._inlineClass = "ui-datepicker-inline"; // The name of the inline marker class
14689	this._appendClass = "ui-datepicker-append"; // The name of the append marker class
14690	this._triggerClass = "ui-datepicker-trigger"; // The name of the trigger marker class
14691	this._dialogClass = "ui-datepicker-dialog"; // The name of the dialog marker class
14692	this._disableClass = "ui-datepicker-disabled"; // The name of the disabled covering marker class
14693	this._unselectableClass = "ui-datepicker-unselectable"; // The name of the unselectable cell marker class
14694	this._currentClass = "ui-datepicker-current-day"; // The name of the current day marker class
14695	this._dayOverClass = "ui-datepicker-days-cell-over"; // The name of the day hover marker class
14696	this.regional = []; // Available regional settings, indexed by language code
14697	this.regional[ "" ] = { // Default regional settings
14698		closeText: "Done", // Display text for close link
14699		prevText: "Prev", // Display text for previous month link
14700		nextText: "Next", // Display text for next month link
14701		currentText: "Today", // Display text for current month link
14702		monthNames: [ "January", "February", "March", "April", "May", "June",
14703			"July", "August", "September", "October", "November", "December" ], // Names of months for drop-down and formatting
14704		monthNamesShort: [ "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" ], // For formatting
14705		dayNames: [ "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday" ], // For formatting
14706		dayNamesShort: [ "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" ], // For formatting
14707		dayNamesMin: [ "Su", "Mo", "Tu", "We", "Th", "Fr", "Sa" ], // Column headings for days starting at Sunday
14708		weekHeader: "Wk", // Column header for week of the year
14709		dateFormat: "mm/dd/yy", // See format options on parseDate
14710		firstDay: 0, // The first day of the week, Sun = 0, Mon = 1, ...
14711		isRTL: false, // True if right-to-left language, false if left-to-right
14712		showMonthAfterYear: false, // True if the year select precedes month, false for month then year
14713		yearSuffix: "", // Additional text to append to the year in the month headers,
14714		selectMonthLabel: "Select month", // Invisible label for month selector
14715		selectYearLabel: "Select year" // Invisible label for year selector
14716	};
14717	this._defaults = { // Global defaults for all the date picker instances
14718		showOn: "focus", // "focus" for popup on focus,
14719			// "button" for trigger button, or "both" for either
14720		showAnim: "fadeIn", // Name of jQuery animation for popup
14721		showOptions: {}, // Options for enhanced animations
14722		defaultDate: null, // Used when field is blank: actual date,
14723			// +/-number for offset from today, null for today
14724		appendText: "", // Display text following the input box, e.g. showing the format
14725		buttonText: "...", // Text for trigger button
14726		buttonImage: "", // URL for trigger button image
14727		buttonImageOnly: false, // True if the image appears alone, false if it appears on a button
14728		hideIfNoPrevNext: false, // True to hide next/previous month links
14729			// if not applicable, false to just disable them
14730		navigationAsDateFormat: false, // True if date formatting applied to prev/today/next links
14731		gotoCurrent: false, // True if today link goes back to current selection instead
14732		changeMonth: false, // True if month can be selected directly, false if only prev/next
14733		changeYear: false, // True if year can be selected directly, false if only prev/next
14734		yearRange: "c-10:c+10", // Range of years to display in drop-down,
14735			// either relative to today's year (-nn:+nn), relative to currently displayed year
14736			// (c-nn:c+nn), absolute (nnnn:nnnn), or a combination of the above (nnnn:-n)
14737		showOtherMonths: false, // True to show dates in other months, false to leave blank
14738		selectOtherMonths: false, // True to allow selection of dates in other months, false for unselectable
14739		showWeek: false, // True to show week of the year, false to not show it
14740		calculateWeek: this.iso8601Week, // How to calculate the week of the year,
14741			// takes a Date and returns the number of the week for it
14742		shortYearCutoff: "+10", // Short year values < this are in the current century,
14743			// > this are in the previous century,
14744			// string value starting with "+" for current year + value
14745		minDate: null, // The earliest selectable date, or null for no limit
14746		maxDate: null, // The latest selectable date, or null for no limit
14747		duration: "fast", // Duration of display/closure
14748		beforeShowDay: null, // Function that takes a date and returns an array with
14749			// [0] = true if selectable, false if not, [1] = custom CSS class name(s) or "",
14750			// [2] = cell title (optional), e.g. $.datepicker.noWeekends
14751		beforeShow: null, // Function that takes an input field and
14752			// returns a set of custom settings for the date picker
14753		onSelect: null, // Define a callback function when a date is selected
14754		onChangeMonthYear: null, // Define a callback function when the month or year is changed
14755		onClose: null, // Define a callback function when the datepicker is closed
14756		onUpdateDatepicker: null, // Define a callback function when the datepicker is updated
14757		numberOfMonths: 1, // Number of months to show at a time
14758		showCurrentAtPos: 0, // The position in multipe months at which to show the current month (starting at 0)
14759		stepMonths: 1, // Number of months to step back/forward
14760		stepBigMonths: 12, // Number of months to step back/forward for the big links
14761		altField: "", // Selector for an alternate field to store selected dates into
14762		altFormat: "", // The date format to use for the alternate field
14763		constrainInput: true, // The input is constrained by the current date format
14764		showButtonPanel: false, // True to show button panel, false to not show it
14765		autoSize: false, // True to size the input for the date format, false to leave as is
14766		disabled: false // The initial disabled state
14767	};
14768	$.extend( this._defaults, this.regional[ "" ] );
14769	this.regional.en = $.extend( true, {}, this.regional[ "" ] );
14770	this.regional[ "en-US" ] = $.extend( true, {}, this.regional.en );
14771	this.dpDiv = datepicker_bindHover( $( "<div id='" + this._mainDivId + "' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>" ) );
14772}
14773
14774$.extend( Datepicker.prototype, {
14775
14776	/* Class name added to elements to indicate already configured with a date picker. */
14777	markerClassName: "hasDatepicker",
14778
14779	//Keep track of the maximum number of rows displayed (see #7043)
14780	maxRows: 4,
14781
14782	// TODO rename to "widget" when switching to widget factory
14783	_widgetDatepicker: function() {
14784		return this.dpDiv;
14785	},
14786
14787	/* Override the default settings for all instances of the date picker.
14788	 * @param  settings  object - the new settings to use as defaults (anonymous object)
14789	 * @return the manager object
14790	 */
14791	setDefaults: function( settings ) {
14792		datepicker_extendRemove( this._defaults, settings || {} );
14793		return this;
14794	},
14795
14796	/* Attach the date picker to a jQuery selection.
14797	 * @param  target	element - the target input field or division or span
14798	 * @param  settings  object - the new settings to use for this date picker instance (anonymous)
14799	 */
14800	_attachDatepicker: function( target, settings ) {
14801		var nodeName, inline, inst;
14802		nodeName = target.nodeName.toLowerCase();
14803		inline = ( nodeName === "div" || nodeName === "span" );
14804		if ( !target.id ) {
14805			this.uuid += 1;
14806			target.id = "dp" + this.uuid;
14807		}
14808		inst = this._newInst( $( target ), inline );
14809		inst.settings = $.extend( {}, settings || {} );
14810		if ( nodeName === "input" ) {
14811			this._connectDatepicker( target, inst );
14812		} else if ( inline ) {
14813			this._inlineDatepicker( target, inst );
14814		}
14815	},
14816
14817	/* Create a new instance object. */
14818	_newInst: function( target, inline ) {
14819		var id = target[ 0 ].id.replace( /([^A-Za-z0-9_\-])/g, "\\\\$1" ); // escape jQuery meta chars
14820		return { id: id, input: target, // associated target
14821			selectedDay: 0, selectedMonth: 0, selectedYear: 0, // current selection
14822			drawMonth: 0, drawYear: 0, // month being drawn
14823			inline: inline, // is datepicker inline or not
14824			dpDiv: ( !inline ? this.dpDiv : // presentation div
14825			datepicker_bindHover( $( "<div class='" + this._inlineClass + " ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>" ) ) ) };
14826	},
14827
14828	/* Attach the date picker to an input field. */
14829	_connectDatepicker: function( target, inst ) {
14830		var input = $( target );
14831		inst.append = $( [] );
14832		inst.trigger = $( [] );
14833		if ( input.hasClass( this.markerClassName ) ) {
14834			return;
14835		}
14836		this._attachments( input, inst );
14837		input.addClass( this.markerClassName ).on( "keydown", this._doKeyDown ).
14838			on( "keypress", this._doKeyPress ).on( "keyup", this._doKeyUp );
14839		this._autoSize( inst );
14840		$.data( target, "datepicker", inst );
14841
14842		//If disabled option is true, disable the datepicker once it has been attached to the input (see ticket #5665)
14843		if ( inst.settings.disabled ) {
14844			this._disableDatepicker( target );
14845		}
14846	},
14847
14848	/* Make attachments based on settings. */
14849	_attachments: function( input, inst ) {
14850		var showOn, buttonText, buttonImage,
14851			appendText = this._get( inst, "appendText" ),
14852			isRTL = this._get( inst, "isRTL" );
14853
14854		if ( inst.append ) {
14855			inst.append.remove();
14856		}
14857		if ( appendText ) {
14858			inst.append = $( "<span>" )
14859				.addClass( this._appendClass )
14860				.text( appendText );
14861			input[ isRTL ? "before" : "after" ]( inst.append );
14862		}
14863
14864		input.off( "focus", this._showDatepicker );
14865
14866		if ( inst.trigger ) {
14867			inst.trigger.remove();
14868		}
14869
14870		showOn = this._get( inst, "showOn" );
14871		if ( showOn === "focus" || showOn === "both" ) { // pop-up date picker when in the marked field
14872			input.on( "focus", this._showDatepicker );
14873		}
14874		if ( showOn === "button" || showOn === "both" ) { // pop-up date picker when button clicked
14875			buttonText = this._get( inst, "buttonText" );
14876			buttonImage = this._get( inst, "buttonImage" );
14877
14878			if ( this._get( inst, "buttonImageOnly" ) ) {
14879				inst.trigger = $( "<img>" )
14880					.addClass( this._triggerClass )
14881					.attr( {
14882						src: buttonImage,
14883						alt: buttonText,
14884						title: buttonText
14885					} );
14886			} else {
14887				inst.trigger = $( "<button type='button'>" )
14888					.addClass( this._triggerClass );
14889				if ( buttonImage ) {
14890					inst.trigger.html(
14891						$( "<img>" )
14892							.attr( {
14893								src: buttonImage,
14894								alt: buttonText,
14895								title: buttonText
14896							} )
14897					);
14898				} else {
14899					inst.trigger.text( buttonText );
14900				}
14901			}
14902
14903			input[ isRTL ? "before" : "after" ]( inst.trigger );
14904			inst.trigger.on( "click", function() {
14905				if ( $.datepicker._datepickerShowing && $.datepicker._lastInput === input[ 0 ] ) {
14906					$.datepicker._hideDatepicker();
14907				} else if ( $.datepicker._datepickerShowing && $.datepicker._lastInput !== input[ 0 ] ) {
14908					$.datepicker._hideDatepicker();
14909					$.datepicker._showDatepicker( input[ 0 ] );
14910				} else {
14911					$.datepicker._showDatepicker( input[ 0 ] );
14912				}
14913				return false;
14914			} );
14915		}
14916	},
14917
14918	/* Apply the maximum length for the date format. */
14919	_autoSize: function( inst ) {
14920		if ( this._get( inst, "autoSize" ) && !inst.inline ) {
14921			var findMax, max, maxI, i,
14922				date = new Date( 2009, 12 - 1, 20 ), // Ensure double digits
14923				dateFormat = this._get( inst, "dateFormat" );
14924
14925			if ( dateFormat.match( /[DM]/ ) ) {
14926				findMax = function( names ) {
14927					max = 0;
14928					maxI = 0;
14929					for ( i = 0; i < names.length; i++ ) {
14930						if ( names[ i ].length > max ) {
14931							max = names[ i ].length;
14932							maxI = i;
14933						}
14934					}
14935					return maxI;
14936				};
14937				date.setMonth( findMax( this._get( inst, ( dateFormat.match( /MM/ ) ?
14938					"monthNames" : "monthNamesShort" ) ) ) );
14939				date.setDate( findMax( this._get( inst, ( dateFormat.match( /DD/ ) ?
14940					"dayNames" : "dayNamesShort" ) ) ) + 20 - date.getDay() );
14941			}
14942			inst.input.attr( "size", this._formatDate( inst, date ).length );
14943		}
14944	},
14945
14946	/* Attach an inline date picker to a div. */
14947	_inlineDatepicker: function( target, inst ) {
14948		var divSpan = $( target );
14949		if ( divSpan.hasClass( this.markerClassName ) ) {
14950			return;
14951		}
14952		divSpan.addClass( this.markerClassName ).append( inst.dpDiv );
14953		$.data( target, "datepicker", inst );
14954		this._setDate( inst, this._getDefaultDate( inst ), true );
14955		this._updateDatepicker( inst );
14956		this._updateAlternate( inst );
14957
14958		//If disabled option is true, disable the datepicker before showing it (see ticket #5665)
14959		if ( inst.settings.disabled ) {
14960			this._disableDatepicker( target );
14961		}
14962
14963		// Set display:block in place of inst.dpDiv.show() which won't work on disconnected elements
14964		// https://bugs.jqueryui.com/ticket/7552 - A Datepicker created on a detached div has zero height
14965		inst.dpDiv.css( "display", "block" );
14966	},
14967
14968	/* Pop-up the date picker in a "dialog" box.
14969	 * @param  input element - ignored
14970	 * @param  date	string or Date - the initial date to display
14971	 * @param  onSelect  function - the function to call when a date is selected
14972	 * @param  settings  object - update the dialog date picker instance's settings (anonymous object)
14973	 * @param  pos int[2] - coordinates for the dialog's position within the screen or
14974	 *					event - with x/y coordinates or
14975	 *					leave empty for default (screen centre)
14976	 * @return the manager object
14977	 */
14978	_dialogDatepicker: function( input, date, onSelect, settings, pos ) {
14979		var id, browserWidth, browserHeight, scrollX, scrollY,
14980			inst = this._dialogInst; // internal instance
14981
14982		if ( !inst ) {
14983			this.uuid += 1;
14984			id = "dp" + this.uuid;
14985			this._dialogInput = $( "<input type='text' id='" + id +
14986				"' style='position: absolute; top: -100px; width: 0px;'/>" );
14987			this._dialogInput.on( "keydown", this._doKeyDown );
14988			$( "body" ).append( this._dialogInput );
14989			inst = this._dialogInst = this._newInst( this._dialogInput, false );
14990			inst.settings = {};
14991			$.data( this._dialogInput[ 0 ], "datepicker", inst );
14992		}
14993		datepicker_extendRemove( inst.settings, settings || {} );
14994		date = ( date && date.constructor === Date ? this._formatDate( inst, date ) : date );
14995		this._dialogInput.val( date );
14996
14997		this._pos = ( pos ? ( pos.length ? pos : [ pos.pageX, pos.pageY ] ) : null );
14998		if ( !this._pos ) {
14999			browserWidth = document.documentElement.clientWidth;
15000			browserHeight = document.documentElement.clientHeight;
15001			scrollX = document.documentElement.scrollLeft || document.body.scrollLeft;
15002			scrollY = document.documentElement.scrollTop || document.body.scrollTop;
15003			this._pos = // should use actual width/height below
15004				[ ( browserWidth / 2 ) - 100 + scrollX, ( browserHeight / 2 ) - 150 + scrollY ];
15005		}
15006
15007		// Move input on screen for focus, but hidden behind dialog
15008		this._dialogInput.css( "left", ( this._pos[ 0 ] + 20 ) + "px" ).css( "top", this._pos[ 1 ] + "px" );
15009		inst.settings.onSelect = onSelect;
15010		this._inDialog = true;
15011		this.dpDiv.addClass( this._dialogClass );
15012		this._showDatepicker( this._dialogInput[ 0 ] );
15013		if ( $.blockUI ) {
15014			$.blockUI( this.dpDiv );
15015		}
15016		$.data( this._dialogInput[ 0 ], "datepicker", inst );
15017		return this;
15018	},
15019
15020	/* Detach a datepicker from its control.
15021	 * @param  target	element - the target input field or division or span
15022	 */
15023	_destroyDatepicker: function( target ) {
15024		var nodeName,
15025			$target = $( target ),
15026			inst = $.data( target, "datepicker" );
15027
15028		if ( !$target.hasClass( this.markerClassName ) ) {
15029			return;
15030		}
15031
15032		nodeName = target.nodeName.toLowerCase();
15033		$.removeData( target, "datepicker" );
15034		if ( nodeName === "input" ) {
15035			inst.append.remove();
15036			inst.trigger.remove();
15037			$target.removeClass( this.markerClassName ).
15038				off( "focus", this._showDatepicker ).
15039				off( "keydown", this._doKeyDown ).
15040				off( "keypress", this._doKeyPress ).
15041				off( "keyup", this._doKeyUp );
15042		} else if ( nodeName === "div" || nodeName === "span" ) {
15043			$target.removeClass( this.markerClassName ).empty();
15044		}
15045
15046		
15046$.datepicker._hideDatepicker();
vendor: 15,786 bytes, lines 15046-15510
15046
15047		if ( datepicker_instActive === inst ) {
15048			datepicker_instActive = null;
15049			this._curInst = null;
15050		}
15051	},
15052
15053	/* Enable the date picker to a jQuery selection.
15054	 * @param  target	element - the target input field or division or span
15055	 */
15056	_enableDatepicker: function( target ) {
15057		var nodeName, inline,
15058			$target = $( target ),
15059			inst = $.data( target, "datepicker" );
15060
15061		if ( !$target.hasClass( this.markerClassName ) ) {
15062			return;
15063		}
15064
15065		nodeName = target.nodeName.toLowerCase();
15066		if ( nodeName === "input" ) {
15067			target.disabled = false;
15068			inst.trigger.filter( "button" ).
15069				each( function() {
15070					this.disabled = false;
15071				} ).end().
15072				filter( "img" ).css( { opacity: "1.0", cursor: "" } );
15073		} else if ( nodeName === "div" || nodeName === "span" ) {
15074			inline = $target.children( "." + this._inlineClass );
15075			inline.children().removeClass( "ui-state-disabled" );
15076			inline.find( "select.ui-datepicker-month, select.ui-datepicker-year" ).
15077				prop( "disabled", false );
15078		}
15079		this._disabledInputs = $.map( this._disabledInputs,
15080
15081			// Delete entry
15082			function( value ) {
15083				return ( value === target ? null : value );
15084			} );
15085	},
15086
15087	/* Disable the date picker to a jQuery selection.
15088	 * @param  target	element - the target input field or division or span
15089	 */
15090	_disableDatepicker: function( target ) {
15091		var nodeName, inline,
15092			$target = $( target ),
15093			inst = $.data( target, "datepicker" );
15094
15095		if ( !$target.hasClass( this.markerClassName ) ) {
15096			return;
15097		}
15098
15099		nodeName = target.nodeName.toLowerCase();
15100		if ( nodeName === "input" ) {
15101			target.disabled = true;
15102			inst.trigger.filter( "button" ).
15103				each( function() {
15104					this.disabled = true;
15105				} ).end().
15106				filter( "img" ).css( { opacity: "0.5", cursor: "default" } );
15107		} else if ( nodeName === "div" || nodeName === "span" ) {
15108			inline = $target.children( "." + this._inlineClass );
15109			inline.children().addClass( "ui-state-disabled" );
15110			inline.find( "select.ui-datepicker-month, select.ui-datepicker-year" ).
15111				prop( "disabled", true );
15112		}
15113		this._disabledInputs = $.map( this._disabledInputs,
15114
15115			// Delete entry
15116			function( value ) {
15117				return ( value === target ? null : value );
15118			} );
15119		this._disabledInputs[ this._disabledInputs.length ] = target;
15120	},
15121
15122	/* Is the first field in a jQuery collection disabled as a datepicker?
15123	 * @param  target	element - the target input field or division or span
15124	 * @return boolean - true if disabled, false if enabled
15125	 */
15126	_isDisabledDatepicker: function( target ) {
15127		if ( !target ) {
15128			return false;
15129		}
15130		for ( var i = 0; i < this._disabledInputs.length; i++ ) {
15131			if ( this._disabledInputs[ i ] === target ) {
15132				return true;
15133			}
15134		}
15135		return false;
15136	},
15137
15138	/* Retrieve the instance data for the target control.
15139	 * @param  target  element - the target input field or division or span
15140	 * @return  object - the associated instance data
15141	 * @throws  error if a jQuery problem getting data
15142	 */
15143	_getInst: function( target ) {
15144		try {
15145			return $.data( target, "datepicker" );
15146		} catch ( err ) {
15147			throw "Missing instance data for this datepicker";
15148		}
15149	},
15150
15151	/* Update or retrieve the settings for a date picker attached to an input field or division.
15152	 * @param  target  element - the target input field or division or span
15153	 * @param  name	object - the new settings to update or
15154	 *				string - the name of the setting to change or retrieve,
15155	 *				when retrieving also "all" for all instance settings or
15156	 *				"defaults" for all global defaults
15157	 * @param  value   any - the new value for the setting
15158	 *				(omit if above is an object or to retrieve a value)
15159	 */
15160	_optionDatepicker: function( target, name, value ) {
15161		var settings, date, minDate, maxDate,
15162			inst = this._getInst( target );
15163
15164		if ( arguments.length === 2 && typeof name === "string" ) {
15165			return ( name === "defaults" ? $.extend( {}, $.datepicker._defaults ) :
15166				( inst ? ( name === "all" ? $.extend( {}, inst.settings ) :
15167				this._get( inst, name ) ) : null ) );
15168		}
15169
15170		settings = name || {};
15171		if ( typeof name === "string" ) {
15172			settings = {};
15173			settings[ name ] = value;
15174		}
15175
15176		if ( inst ) {
15177			if ( this._curInst === inst ) {
15178				this._hideDatepicker();
15179			}
15180
15181			date = this._getDateDatepicker( target, true );
15182			minDate = this._getMinMaxDate( inst, "min" );
15183			maxDate = this._getMinMaxDate( inst, "max" );
15184			datepicker_extendRemove( inst.settings, settings );
15185
15186			// reformat the old minDate/maxDate values if dateFormat changes and a new minDate/maxDate isn't provided
15187			if ( minDate !== null && settings.dateFormat !== undefined && settings.minDate === undefined ) {
15188				inst.settings.minDate = this._formatDate( inst, minDate );
15189			}
15190			if ( maxDate !== null && settings.dateFormat !== undefined && settings.maxDate === undefined ) {
15191				inst.settings.maxDate = this._formatDate( inst, maxDate );
15192			}
15193			if ( "disabled" in settings ) {
15194				if ( settings.disabled ) {
15195					this._disableDatepicker( target );
15196				} else {
15197					this._enableDatepicker( target );
15198				}
15199			}
15200			this._attachments( $( target ), inst );
15201			this._autoSize( inst );
15202			this._setDate( inst, date );
15203			this._updateAlternate( inst );
15204			this._updateDatepicker( inst );
15205		}
15206	},
15207
15208	// Change method deprecated
15209	_changeDatepicker: function( target, name, value ) {
15210		this._optionDatepicker( target, name, value );
15211	},
15212
15213	/* Redraw the date picker attached to an input field or division.
15214	 * @param  target  element - the target input field or division or span
15215	 */
15216	_refreshDatepicker: function( target ) {
15217		var inst = this._getInst( target );
15218		if ( inst ) {
15219			this._updateDatepicker( inst );
15220		}
15221	},
15222
15223	/* Set the dates for a jQuery selection.
15224	 * @param  target element - the target input field or division or span
15225	 * @param  date	Date - the new date
15226	 */
15227	_setDateDatepicker: function( target, date ) {
15228		var inst = this._getInst( target );
15229		if ( inst ) {
15230			this._setDate( inst, date );
15231			this._updateDatepicker( inst );
15232			this._updateAlternate( inst );
15233		}
15234	},
15235
15236	/* Get the date(s) for the first entry in a jQuery selection.
15237	 * @param  target element - the target input field or division or span
15238	 * @param  noDefault boolean - true if no default date is to be used
15239	 * @return Date - the current date
15240	 */
15241	_getDateDatepicker: function( target, noDefault ) {
15242		var inst = this._getInst( target );
15243		if ( inst && !inst.inline ) {
15244			this._setDateFromField( inst, noDefault );
15245		}
15246		return ( inst ? this._getDate( inst ) : null );
15247	},
15248
15249	/* Handle keystrokes. */
15250	_doKeyDown: function( event ) {
15251		var onSelect, dateStr, sel,
15252			inst = $.datepicker._getInst( event.target ),
15253			handled = true,
15254			isRTL = inst.dpDiv.is( ".ui-datepicker-rtl" );
15255
15256		inst._keyEvent = true;
15257		if ( $.datepicker._datepickerShowing ) {
15258			switch ( event.keyCode ) {
15259				case 9: $.datepicker._hideDatepicker();
15260						handled = false;
15261						break; // hide on tab out
15262				case 13: sel = $( "td." + $.datepicker._dayOverClass + ":not(." +
15263									$.datepicker._currentClass + ")", inst.dpDiv );
15264						if ( sel[ 0 ] ) {
15265							$.datepicker._selectDay( event.target, inst.selectedMonth, inst.selectedYear, sel[ 0 ] );
15266						}
15267
15268						onSelect = $.datepicker._get( inst, "onSelect" );
15269						if ( onSelect ) {
15270							dateStr = $.datepicker._formatDate( inst );
15271
15272							// Trigger custom callback
15273							onSelect.apply( ( inst.input ? inst.input[ 0 ] : null ), [ dateStr, inst ] );
15274						} else {
15275							$.datepicker._hideDatepicker();
15276						}
15277
15278						return false; // don't submit the form
15279				case 27: $.datepicker._hideDatepicker();
15280						break; // hide on escape
15281				case 33: $.datepicker._adjustDate( event.target, ( event.ctrlKey ?
15282							-$.datepicker._get( inst, "stepBigMonths" ) :
15283							-$.datepicker._get( inst, "stepMonths" ) ), "M" );
15284						break; // previous month/year on page up/+ ctrl
15285				case 34: $.datepicker._adjustDate( event.target, ( event.ctrlKey ?
15286							+$.datepicker._get( inst, "stepBigMonths" ) :
15287							+$.datepicker._get( inst, "stepMonths" ) ), "M" );
15288						break; // next month/year on page down/+ ctrl
15289				case 35: if ( event.ctrlKey || event.metaKey ) {
15290							$.datepicker._clearDate( event.target );
15291						}
15292						handled = event.ctrlKey || event.metaKey;
15293						break; // clear on ctrl or command +end
15294				case 36: if ( event.ctrlKey || event.metaKey ) {
15295							$.datepicker._gotoToday( event.target );
15296						}
15297						handled = event.ctrlKey || event.metaKey;
15298						break; // current on ctrl or command +home
15299				case 37: if ( event.ctrlKey || event.metaKey ) {
15300							$.datepicker._adjustDate( event.target, ( isRTL ? +1 : -1 ), "D" );
15301						}
15302						handled = event.ctrlKey || event.metaKey;
15303
15304						// -1 day on ctrl or command +left
15305						if ( event.originalEvent.altKey ) {
15306							$.datepicker._adjustDate( event.target, ( event.ctrlKey ?
15307								-$.datepicker._get( inst, "stepBigMonths" ) :
15308								-$.datepicker._get( inst, "stepMonths" ) ), "M" );
15309						}
15310
15311						// next month/year on alt +left on Mac
15312						break;
15313				case 38: if ( event.ctrlKey || event.metaKey ) {
15314							$.datepicker._adjustDate( event.target, -7, "D" );
15315						}
15316						handled = event.ctrlKey || event.metaKey;
15317						break; // -1 week on ctrl or command +up
15318				case 39: if ( event.ctrlKey || event.metaKey ) {
15319							$.datepicker._adjustDate( event.target, ( isRTL ? -1 : +1 ), "D" );
15320						}
15321						handled = event.ctrlKey || event.metaKey;
15322
15323						// +1 day on ctrl or command +right
15324						if ( event.originalEvent.altKey ) {
15325							$.datepicker._adjustDate( event.target, ( event.ctrlKey ?
15326								+$.datepicker._get( inst, "stepBigMonths" ) :
15327								+$.datepicker._get( inst, "stepMonths" ) ), "M" );
15328						}
15329
15330						// next month/year on alt +right
15331						break;
15332				case 40: if ( event.ctrlKey || event.metaKey ) {
15333							$.datepicker._adjustDate( event.target, +7, "D" );
15334						}
15335						handled = event.ctrlKey || event.metaKey;
15336						break; // +1 week on ctrl or command +down
15337				default: handled = false;
15338			}
15339		} else if ( event.keyCode === 36 && event.ctrlKey ) { // display the date picker on ctrl+home
15340			$.datepicker._showDatepicker( this );
15341		} else {
15342			handled = false;
15343		}
15344
15345		if ( handled ) {
15346			event.preventDefault();
15347			event.stopPropagation();
15348		}
15349	},
15350
15351	/* Filter entered characters - based on date format. */
15352	_doKeyPress: function( event ) {
15353		var chars, chr,
15354			inst = $.datepicker._getInst( event.target );
15355
15356		if ( $.datepicker._get( inst, "constrainInput" ) ) {
15357			chars = $.datepicker._possibleChars( $.datepicker._get( inst, "dateFormat" ) );
15358			chr = String.fromCharCode( event.charCode == null ? event.keyCode : event.charCode );
15359			return event.ctrlKey || event.metaKey || ( chr < " " || !chars || chars.indexOf( chr ) > -1 );
15360		}
15361	},
15362
15363	/* Synchronise manual entry and field/alternate field. */
15364	_doKeyUp: function( event ) {
15365		var date,
15366			inst = $.datepicker._getInst( event.target );
15367
15368		if ( inst.input.val() !== inst.lastVal ) {
15369			try {
15370				date = $.datepicker.parseDate( $.datepicker._get( inst, "dateFormat" ),
15371					( inst.input ? inst.input.val() : null ),
15372					$.datepicker._getFormatConfig( inst ) );
15373
15374				if ( date ) { // only if valid
15375					$.datepicker._setDateFromField( inst );
15376					$.datepicker._updateAlternate( inst );
15377					$.datepicker._updateDatepicker( inst );
15378				}
15379			} catch ( err ) {
15380			}
15381		}
15382		return true;
15383	},
15384
15385	/* Pop-up the date picker for a given input field.
15386	 * If false returned from beforeShow event handler do not show.
15387	 * @param  input  element - the input field attached to the date picker or
15388	 *					event - if triggered by focus
15389	 */
15390	_showDatepicker: function( input ) {
15391		input = input.target || input;
15392		if ( input.nodeName.toLowerCase() !== "input" ) { // find from button/image trigger
15393			input = $( "input", input.parentNode )[ 0 ];
15394		}
15395
15396		if ( $.datepicker._isDisabledDatepicker( input ) || $.datepicker._lastInput === input ) { // already here
15397			return;
15398		}
15399
15400		var inst, beforeShow, beforeShowSettings, isFixed,
15401			offset, showAnim, duration;
15402
15403		inst = $.datepicker._getInst( input );
15404		if ( $.datepicker._curInst && $.datepicker._curInst !== inst ) {
15405			$.datepicker._curInst.dpDiv.stop( true, true );
15406			if ( inst && $.datepicker._datepickerShowing ) {
15407				$.datepicker._hideDatepicker( $.datepicker._curInst.input[ 0 ] );
15408			}
15409		}
15410
15411		beforeShow = $.datepicker._get( inst, "beforeShow" );
15412		beforeShowSettings = beforeShow ? beforeShow.apply( input, [ input, inst ] ) : {};
15413		if ( beforeShowSettings === false ) {
15414			return;
15415		}
15416		datepicker_extendRemove( inst.settings, beforeShowSettings );
15417
15418		inst.lastVal = null;
15419		$.datepicker._lastInput = input;
15420		$.datepicker._setDateFromField( inst );
15421
15422		if ( $.datepicker._inDialog ) { // hide cursor
15423			input.value = "";
15424		}
15425		if ( !$.datepicker._pos ) { // position below input
15426			$.datepicker._pos = $.datepicker._findPos( input );
15427			$.datepicker._pos[ 1 ] += input.offsetHeight; // add the height
15428		}
15429
15430		isFixed = false;
15431		$( input ).parents().each( function() {
15432			isFixed |= $( this ).css( "position" ) === "fixed";
15433			return !isFixed;
15434		} );
15435
15436		offset = { left: $.datepicker._pos[ 0 ], top: $.datepicker._pos[ 1 ] };
15437		$.datepicker._pos = null;
15438
15439		//to avoid flashes on Firefox
15440		inst.dpDiv.empty();
15441
15442		// determine sizing offscreen
15443		inst.dpDiv.css( { position: "absolute", display: "block", top: "-1000px" } );
15444		$.datepicker._updateDatepicker( inst );
15445
15446		// fix width for dynamic number of date pickers
15447		// and adjust position before showing
15448		offset = $.datepicker._checkOffset( inst, offset, isFixed );
15449		inst.dpDiv.css( { position: ( $.datepicker._inDialog && $.blockUI ?
15450			"static" : ( isFixed ? "fixed" : "absolute" ) ), display: "none",
15451			left: offset.left + "px", top: offset.top + "px" } );
15452
15453		if ( !inst.inline ) {
15454			showAnim = $.datepicker._get( inst, "showAnim" );
15455			duration = $.datepicker._get( inst, "duration" );
15456			inst.dpDiv.css( "z-index", datepicker_getZindex( $( input ) ) + 1 );
15457			$.datepicker._datepickerShowing = true;
15458
15459			if ( $.effects && $.effects.effect[ showAnim ] ) {
15460				inst.dpDiv.show( showAnim, $.datepicker._get( inst, "showOptions" ), duration );
15461			} else {
15462				inst.dpDiv[ showAnim || "show" ]( showAnim ? duration : null );
15463			}
15464
15465			if ( $.datepicker._shouldFocusInput( inst ) ) {
15466				inst.input.trigger( "focus" );
15467			}
15468
15469			$.datepicker._curInst = inst;
15470		}
15471	},
15472
15473	/* Generate the date picker content. */
15474	_updateDatepicker: function( inst ) {
15475		this.maxRows = 4; //Reset the max number of rows being displayed (see #7043)
15476		datepicker_instActive = inst; // for delegate hover events
15477		inst.dpDiv.empty().append( this._generateHTML( inst ) );
15478		this._attachHandlers( inst );
15479
15480		var origyearshtml,
15481			numMonths = this._getNumberOfMonths( inst ),
15482			cols = numMonths[ 1 ],
15483			width = 17,
15484			activeCell = inst.dpDiv.find( "." + this._dayOverClass + " a" ),
15485			onUpdateDatepicker = $.datepicker._get( inst, "onUpdateDatepicker" );
15486
15487		if ( activeCell.length > 0 ) {
15488			datepicker_handleMouseover.apply( activeCell.get( 0 ) );
15489		}
15490
15491		inst.dpDiv.removeClass( "ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4" ).width( "" );
15492		if ( cols > 1 ) {
15493			inst.dpDiv.addClass( "ui-datepicker-multi-" + cols ).css( "width", ( width * cols ) + "em" );
15494		}
15495		inst.dpDiv[ ( numMonths[ 0 ] !== 1 || numMonths[ 1 ] !== 1 ? "add" : "remove" ) +
15496			"Class" ]( "ui-datepicker-multi" );
15497		inst.dpDiv[ ( this._get( inst, "isRTL" ) ? "add" : "remove" ) +
15498			"Class" ]( "ui-datepicker-rtl" );
15499
15500		if ( inst === $.datepicker._curInst && $.datepicker._datepickerShowing && $.datepicker._shouldFocusInput( inst ) ) {
15501			inst.input.trigger( "focus" );
15502		}
15503
15504		// Deffered render of the years select (to avoid flashes on Firefox)
15505		if ( inst.yearshtml ) {
15506			origyearshtml = inst.yearshtml;
15507			setTimeout( function() {
15508
15509				//assure that inst.yearshtml didn't change.
15510				if ( origyearshtml === inst.yearshtml && inst.yearshtml ) {
vendor: 5,251 bytes, lines 15511-15665
15511					inst.dpDiv.find( "select.ui-datepicker-year" ).first().replaceWith( inst.yearshtml );
15512				}
15513				origyearshtml = inst.yearshtml = null;
15514			}, 0 );
15515		}
15516
15517		if ( onUpdateDatepicker ) {
15518			onUpdateDatepicker.apply( ( inst.input ? inst.input[ 0 ] : null ), [ inst ] );
15519		}
15520	},
15521
15522	_shouldFocusInput: function( inst ) {
15523		return inst.input && inst.input.is( ":visible" ) && !inst.input.is( ":disabled" );
15524	},
15525
15526	/* Check positioning to remain on screen. */
15527	_checkOffset: function( inst, offset, isFixed ) {
15528		var dpWidth = inst.dpDiv.outerWidth(),
15529			dpHeight = inst.dpDiv.outerHeight(),
15530			inputWidth = inst.input ? inst.input.outerWidth() : 0,
15531			inputHeight = inst.input ? inst.input.outerHeight() : 0,
15532			viewWidth = document.documentElement.clientWidth + ( isFixed ? 0 : $( document ).scrollLeft() ),
15533			viewHeight = document.documentElement.clientHeight + ( isFixed ? 0 : $( document ).scrollTop() );
15534
15535		offset.left -= ( this._get( inst, "isRTL" ) ? ( dpWidth - inputWidth ) : 0 );
15536		offset.left -= ( isFixed && offset.left === inst.input.offset().left ) ? $( document ).scrollLeft() : 0;
15537		offset.top -= ( isFixed && offset.top === ( inst.input.offset().top + inputHeight ) ) ? $( document ).scrollTop() : 0;
15538
15539		// Now check if datepicker is showing outside window viewport - move to a better place if so.
15540		offset.left -= Math.min( offset.left, ( offset.left + dpWidth > viewWidth && viewWidth > dpWidth ) ?
15541			Math.abs( offset.left + dpWidth - viewWidth ) : 0 );
15542		offset.top -= Math.min( offset.top, ( offset.top + dpHeight > viewHeight && viewHeight > dpHeight ) ?
15543			Math.abs( dpHeight + inputHeight ) : 0 );
15544
15545		return offset;
15546	},
15547
15548	/* Find an object's position on the screen. */
15549	_findPos: function( obj ) {
15550		var position,
15551			inst = this._getInst( obj ),
15552			isRTL = this._get( inst, "isRTL" );
15553
15554		while ( obj && ( obj.type === "hidden" || obj.nodeType !== 1 || $.expr.pseudos.hidden( obj ) ) ) {
15555			obj = obj[ isRTL ? "previousSibling" : "nextSibling" ];
15556		}
15557
15558		position = $( obj ).offset();
15559		return [ position.left, position.top ];
15560	},
15561
15562	/* Hide the date picker from view.
15563	 * @param  input  element - the input field attached to the date picker
15564	 */
15565	_hideDatepicker: function( input ) {
15566		var showAnim, duration, postProcess, onClose,
15567			inst = this._curInst;
15568
15569		if ( !inst || ( input && inst !== $.data( input, "datepicker" ) ) ) {
15570			return;
15571		}
15572
15573		if ( this._datepickerShowing ) {
15574			showAnim = this._get( inst, "showAnim" );
15575			duration = this._get( inst, "duration" );
15576			postProcess = function() {
15577				$.datepicker._tidyDialog( inst );
15578			};
15579
15580			if ( $.effects && ( $.effects.effect[ showAnim ] ) ) {
15581				inst.dpDiv.hide( showAnim, $.datepicker._get( inst, "showOptions" ), duration, postProcess );
15582			} else {
15583				inst.dpDiv[ ( showAnim === "slideDown" ? "slideUp" :
15584					( showAnim === "fadeIn" ? "fadeOut" : "hide" ) ) ]( ( showAnim ? duration : null ), postProcess );
15585			}
15586
15587			if ( !showAnim ) {
15588				postProcess();
15589			}
15590			this._datepickerShowing = false;
15591
15592			onClose = this._get( inst, "onClose" );
15593			if ( onClose ) {
15594				onClose.apply( ( inst.input ? inst.input[ 0 ] : null ), [ ( inst.input ? inst.input.val() : "" ), inst ] );
15595			}
15596
15597			this._lastInput = null;
15598			if ( this._inDialog ) {
15599				this._dialogInput.css( { position: "absolute", left: "0", top: "-100px" } );
15600				if ( $.blockUI ) {
15601					$.unblockUI();
15602					$( "body" ).append( this.dpDiv );
15603				}
15604			}
15605			this._inDialog = false;
15606		}
15607	},
15608
15609	/* Tidy up after a dialog display. */
15610	_tidyDialog: function( inst ) {
15611		inst.dpDiv.removeClass( this._dialogClass ).off( ".ui-datepicker-calendar" );
15612	},
15613
15614	/* Close date picker if clicked elsewhere. */
15615	_checkExternalClick: function( event ) {
15616		if ( !$.datepicker._curInst ) {
15617			return;
15618		}
15619
15620		var $target = $( event.target ),
15621			inst = $.datepicker._getInst( $target[ 0 ] );
15622
15623		if ( ( ( $target[ 0 ].id !== $.datepicker._mainDivId &&
15624				$target.parents( "#" + $.datepicker._mainDivId ).length === 0 &&
15625				!$target.hasClass( $.datepicker.markerClassName ) &&
15626				!$target.closest( "." + $.datepicker._triggerClass ).length &&
15627				$.datepicker._datepickerShowing && !( $.datepicker._inDialog && $.blockUI ) ) ) ||
15628			( $target.hasClass( $.datepicker.markerClassName ) && $.datepicker._curInst !== inst ) ) {
15629				$.datepicker._hideDatepicker();
15630		}
15631	},
15632
15633	/* Adjust one of the date sub-fields. */
15634	_adjustDate: function( id, offset, period ) {
15635		var target = $( id ),
15636			inst = this._getInst( target[ 0 ] );
15637
15638		if ( this._isDisabledDatepicker( target[ 0 ] ) ) {
15639			return;
15640		}
15641		this._adjustInstDate( inst, offset, period );
15642		this._updateDatepicker( inst );
15643	},
15644
15645	/* Action for current link. */
15646	_gotoToday: function( id ) {
15647		var date,
15648			target = $( id ),
15649			inst = this._getInst( target[ 0 ] );
15650
15651		if ( this._get( inst, "gotoCurrent" ) && inst.currentDay ) {
15652			inst.selectedDay = inst.currentDay;
15653			inst.drawMonth = inst.selectedMonth = inst.currentMonth;
15654			inst.drawYear = inst.selectedYear = inst.currentYear;
15655		} else {
15656			date = new Date();
15657			inst.selectedDay = date.getDate();
15658			inst.drawMonth = inst.selectedMonth = date.getMonth();
15659			inst.drawYear = inst.selectedYear = date.getFullYear();
15660		}
15661		this._notifyChange( inst );
15662		this._adjustDate( target );
15663	},
15664
15665	/* Action for selecting a new month/year. */
vendor: 4,615 bytes, lines 15666-15797
15666	_selectMonthYear: function( id, select, period ) {
15667		var target = $( id ),
15668			inst = this._getInst( target[ 0 ] );
15669
15670		inst[ "selected" + ( period === "M" ? "Month" : "Year" ) ] =
15671		inst[ "draw" + ( period === "M" ? "Month" : "Year" ) ] =
15672			parseInt( select.options[ select.selectedIndex ].value, 10 );
15673
15674		this._notifyChange( inst );
15675		this._adjustDate( target );
15676	},
15677
15678	/* Action for selecting a day. */
15679	_selectDay: function( id, month, year, td ) {
15680		var inst,
15681			target = $( id );
15682
15683		if ( $( td ).hasClass( this._unselectableClass ) || this._isDisabledDatepicker( target[ 0 ] ) ) {
15684			return;
15685		}
15686
15687		inst = this._getInst( target[ 0 ] );
15688		inst.selectedDay = inst.currentDay = parseInt( $( "a", td ).attr( "data-date" ) );
15689		inst.selectedMonth = inst.currentMonth = month;
15690		inst.selectedYear = inst.currentYear = year;
15691		this._selectDate( id, this._formatDate( inst,
15692			inst.currentDay, inst.currentMonth, inst.currentYear ) );
15693	},
15694
15695	/* Erase the input field and hide the date picker. */
15696	_clearDate: function( id ) {
15697		var target = $( id );
15698		this._selectDate( target, "" );
15699	},
15700
15701	/* Update the input field with the selected date. */
15702	_selectDate: function( id, dateStr ) {
15703		var onSelect,
15704			target = $( id ),
15705			inst = this._getInst( target[ 0 ] );
15706
15707		dateStr = ( dateStr != null ? dateStr : this._formatDate( inst ) );
15708		if ( inst.input ) {
15709			inst.input.val( dateStr );
15710		}
15711		this._updateAlternate( inst );
15712
15713		onSelect = this._get( inst, "onSelect" );
15714		if ( onSelect ) {
15715			onSelect.apply( ( inst.input ? inst.input[ 0 ] : null ), [ dateStr, inst ] );  // trigger custom callback
15716		} else if ( inst.input ) {
15717			inst.input.trigger( "change" ); // fire the change event
15718		}
15719
15720		if ( inst.inline ) {
15721			this._updateDatepicker( inst );
15722		} else {
15723			this._hideDatepicker();
15724			this._lastInput = inst.input[ 0 ];
15725			if ( typeof( inst.input[ 0 ] ) !== "object" ) {
15726				inst.input.trigger( "focus" ); // restore focus
15727			}
15728			this._lastInput = null;
15729		}
15730	},
15731
15732	/* Update any alternate field to synchronise with the main field. */
15733	_updateAlternate: function( inst ) {
15734		var altFormat, date, dateStr,
15735			altField = this._get( inst, "altField" );
15736
15737		if ( altField ) { // update alternate field too
15738			altFormat = this._get( inst, "altFormat" ) || this._get( inst, "dateFormat" );
15739			date = this._getDate( inst );
15740			dateStr = this.formatDate( altFormat, date, this._getFormatConfig( inst ) );
15741			$( document ).find( altField ).val( dateStr );
15742		}
15743	},
15744
15745	/* Set as beforeShowDay function to prevent selection of weekends.
15746	 * @param  date  Date - the date to customise
15747	 * @return [boolean, string] - is this date selectable?, what is its CSS class?
15748	 */
15749	noWeekends: function( date ) {
15750		var day = date.getDay();
15751		return [ ( day > 0 && day < 6 ), "" ];
15752	},
15753
15754	/* Set as calculateWeek to determine the week of the year based on the ISO 8601 definition.
15755	 * @param  date  Date - the date to get the week for
15756	 * @return  number - the number of the week within the year that contains this date
15757	 */
15758	iso8601Week: function( date ) {
15759		var time,
15760			checkDate = new Date( date.getTime() );
15761
15762		// Find Thursday of this week starting on Monday
15763		checkDate.setDate( checkDate.getDate() + 4 - ( checkDate.getDay() || 7 ) );
15764
15765		time = checkDate.getTime();
15766		checkDate.setMonth( 0 ); // Compare with Jan 1
15767		checkDate.setDate( 1 );
15768		return Math.floor( Math.round( ( time - checkDate ) / 86400000 ) / 7 ) + 1;
15769	},
15770
15771	/* Parse a string value into a date object.
15772	 * See formatDate below for the possible formats.
15773	 *
15774	 * @param  format string - the expected format of the date
15775	 * @param  value string - the date in the above format
15776	 * @param  settings Object - attributes include:
15777	 *					shortYearCutoff  number - the cutoff year for determining the century (optional)
15778	 *					dayNamesShort	string[7] - abbreviated names of the days from Sunday (optional)
15779	 *					dayNames		string[7] - names of the days from Sunday (optional)
15780	 *					monthNamesShort string[12] - abbreviated names of the months (optional)
15781	 *					monthNames		string[12] - names of the months (optional)
15782	 * @return  Date - the extracted date value or null if value is blank
15783	 */
15784	parseDate: function( format, value, settings ) {
15785		if ( format == null || value == null ) {
15786			throw "Invalid arguments";
15787		}
15788
15789		value = ( typeof value === "object" ? value.toString() : value + "" );
15790		if ( value === "" ) {
15791			return null;
15792		}
15793
15794		var iFormat, dim, extra,
15795			iValue = 0,
15796			shortYearCutoffTemp = ( settings ? settings.shortYearCutoff : null ) || this._defaults.shortYearCutoff,
15797			shortYearCutoff = ( typeof shortYearCutoffTemp !== "string" ? shortYearCutoffTemp 
vendor: 5,431 bytes, lines 15797-15987
15797:
15798				new Date().getFullYear() % 100 + parseInt( shortYearCutoffTemp, 10 ) ),
15799			dayNamesShort = ( settings ? settings.dayNamesShort : null ) || this._defaults.dayNamesShort,
15800			dayNames = ( settings ? settings.dayNames : null ) || this._defaults.dayNames,
15801			monthNamesShort = ( settings ? settings.monthNamesShort : null ) || this._defaults.monthNamesShort,
15802			monthNames = ( settings ? settings.monthNames : null ) || this._defaults.monthNames,
15803			year = -1,
15804			month = -1,
15805			day = -1,
15806			doy = -1,
15807			literal = false,
15808			date,
15809
15810			// Check whether a format character is doubled
15811			lookAhead = function( match ) {
15812				var matches = ( iFormat + 1 < format.length && format.charAt( iFormat + 1 ) === match );
15813				if ( matches ) {
15814					iFormat++;
15815				}
15816				return matches;
15817			},
15818
15819			// Extract a number from the string value
15820			getNumber = function( match ) {
15821				var isDoubled = lookAhead( match ),
15822					size = ( match === "@" ? 14 : ( match === "!" ? 20 :
15823					( match === "y" && isDoubled ? 4 : ( match === "o" ? 3 : 2 ) ) ) ),
15824					minSize = ( match === "y" ? size : 1 ),
15825					digits = new RegExp( "^\\d{" + minSize + "," + size + "}" ),
15826					num = value.substring( iValue ).match( digits );
15827				if ( !num ) {
15828					throw "Missing number at position " + iValue;
15829				}
15830				iValue += num[ 0 ].length;
15831				return parseInt( num[ 0 ], 10 );
15832			},
15833
15834			// Extract a name from the string value and convert to an index
15835			getName = function( match, shortNames, longNames ) {
15836				var index = -1,
15837					names = $.map( lookAhead( match ) ? longNames : shortNames, function( v, k ) {
15838						return [ [ k, v ] ];
15839					} ).sort( function( a, b ) {
15840						return -( a[ 1 ].length - b[ 1 ].length );
15841					} );
15842
15843				$.each( names, function( i, pair ) {
15844					var name = pair[ 1 ];
15845					if ( value.substr( iValue, name.length ).toLowerCase() === name.toLowerCase() ) {
15846						index = pair[ 0 ];
15847						iValue += name.length;
15848						return false;
15849					}
15850				} );
15851				if ( index !== -1 ) {
15852					return index + 1;
15853				} else {
15854					throw "Unknown name at position " + iValue;
15855				}
15856			},
15857
15858			// Confirm that a literal character matches the string value
15859			checkLiteral = function() {
15860				if ( value.charAt( iValue ) !== format.charAt( iFormat ) ) {
15861					throw "Unexpected literal at position " + iValue;
15862				}
15863				iValue++;
15864			};
15865
15866		for ( iFormat = 0; iFormat < format.length; iFormat++ ) {
15867			if ( literal ) {
15868				if ( format.charAt( iFormat ) === "'" && !lookAhead( "'" ) ) {
15869					literal = false;
15870				} else {
15871					checkLiteral();
15872				}
15873			} else {
15874				switch ( format.charAt( iFormat ) ) {
15875					case "d":
15876						day = getNumber( "d" );
15877						break;
15878					case "D":
15879						getName( "D", dayNamesShort, dayNames );
15880						break;
15881					case "o":
15882						doy = getNumber( "o" );
15883						break;
15884					case "m":
15885						month = getNumber( "m" );
15886						break;
15887					case "M":
15888						month = getName( "M", monthNamesShort, monthNames );
15889						break;
15890					case "y":
15891						year = getNumber( "y" );
15892						break;
15893					case "@":
15894						date = new Date( getNumber( "@" ) );
15895						year = date.getFullYear();
15896						month = date.getMonth() + 1;
15897						day = date.getDate();
15898						break;
15899					case "!":
15900						date = new Date( ( getNumber( "!" ) - this._ticksTo1970 ) / 10000 );
15901						year = date.getFullYear();
15902						month = date.getMonth() + 1;
15903						day = date.getDate();
15904						break;
15905					case "'":
15906						if ( lookAhead( "'" ) ) {
15907							checkLiteral();
15908						} else {
15909							literal = true;
15910						}
15911						break;
15912					default:
15913						checkLiteral();
15914				}
15915			}
15916		}
15917
15918		if ( iValue < value.length ) {
15919			extra = value.substr( iValue );
15920			if ( !/^\s+/.test( extra ) ) {
15921				throw "Extra/unparsed characters found in date: " + extra;
15922			}
15923		}
15924
15925		if ( year === -1 ) {
15926			year = new Date().getFullYear();
15927		} else if ( year < 100 ) {
15928			year += new Date().getFullYear() - new Date().getFullYear() % 100 +
15929				( year <= shortYearCutoff ? 0 : -100 );
15930		}
15931
15932		if ( doy > -1 ) {
15933			month = 1;
15934			day = doy;
15935			do {
15936				dim = this._getDaysInMonth( year, month - 1 );
15937				if ( day <= dim ) {
15938					break;
15939				}
15940				month++;
15941				day -= dim;
15942			} while ( true );
15943		}
15944
15945		date = this._daylightSavingAdjust( new Date( year, month - 1, day ) );
15946		if ( date.getFullYear() !== year || date.getMonth() + 1 !== month || date.getDate() !== day ) {
15947			throw "Invalid date"; // E.g. 31/02/00
15948		}
15949		return date;
15950	},
15951
15952	/* Standard date formats. */
15953	ATOM: "yy-mm-dd", // RFC 3339 (ISO 8601)
15954	COOKIE: "D, dd M yy",
15955	ISO_8601: "yy-mm-dd",
15956	RFC_822: "D, d M y",
15957	RFC_850: "DD, dd-M-y",
15958	RFC_1036: "D, d M y",
15959	RFC_1123: "D, d M yy",
15960	RFC_2822: "D, d M yy",
15961	RSS: "D, d M y", // RFC 822
15962	TICKS: "!",
15963	TIMESTAMP: "@",
15964	W3C: "yy-mm-dd", // ISO 8601
15965
15966	_ticksTo1970: ( ( ( 1970 - 1 ) * 365 + Math.floor( 1970 / 4 ) - Math.floor( 1970 / 100 ) +
15967		Math.floor( 1970 / 400 ) ) * 24 * 60 * 60 * 10000000 ),
15968
15969	/* Format a date object into a string value.
15970	 * The format can be combinations of the following:
15971	 * d  - day of month (no leading zero)
15972	 * dd - day of month (two digit)
15973	 * o  - day of year (no leading zeros)
15974	 * oo - day of year (three digit)
15975	 * D  - day name short
15976	 * DD - day name long
15977	 * m  - month of year (no leading zero)
15978	 * mm - month of year (two digit)
15979	 * M  - month name short
15980	 * MM - month name long
15981	 * y  - year (two digit)
15982	 * yy - year (four digit)
15983	 * @ - Unix timestamp (ms since 01/01/1970)
15984	 * ! - Windows ticks (100ns since 01/01/0001)
15985	 * "..." - literal text
15986	 * '' - single quote
15987	 *
vendor: 6,198 bytes, lines 15988-16187
15988	 * @param  format string - the desired format of the date
15989	 * @param  date Date - the date value to format
15990	 * @param  settings Object - attributes include:
15991	 *					dayNamesShort	string[7] - abbreviated names of the days from Sunday (optional)
15992	 *					dayNames		string[7] - names of the days from Sunday (optional)
15993	 *					monthNamesShort string[12] - abbreviated names of the months (optional)
15994	 *					monthNames		string[12] - names of the months (optional)
15995	 * @return  string - the date in the above format
15996	 */
15997	formatDate: function( format, date, settings ) {
15998		if ( !date ) {
15999			return "";
16000		}
16001
16002		var iFormat,
16003			dayNamesShort = ( settings ? settings.dayNamesShort : null ) || this._defaults.dayNamesShort,
16004			dayNames = ( settings ? settings.dayNames : null ) || this._defaults.dayNames,
16005			monthNamesShort = ( settings ? settings.monthNamesShort : null ) || this._defaults.monthNamesShort,
16006			monthNames = ( settings ? settings.monthNames : null ) || this._defaults.monthNames,
16007
16008			// Check whether a format character is doubled
16009			lookAhead = function( match ) {
16010				var matches = ( iFormat + 1 < format.length && format.charAt( iFormat + 1 ) === match );
16011				if ( matches ) {
16012					iFormat++;
16013				}
16014				return matches;
16015			},
16016
16017			// Format a number, with leading zero if necessary
16018			formatNumber = function( match, value, len ) {
16019				var num = "" + value;
16020				if ( lookAhead( match ) ) {
16021					while ( num.length < len ) {
16022						num = "0" + num;
16023					}
16024				}
16025				return num;
16026			},
16027
16028			// Format a name, short or long as requested
16029			formatName = function( match, value, shortNames, longNames ) {
16030				return ( lookAhead( match ) ? longNames[ value ] : shortNames[ value ] );
16031			},
16032			output = "",
16033			literal = false;
16034
16035		if ( date ) {
16036			for ( iFormat = 0; iFormat < format.length; iFormat++ ) {
16037				if ( literal ) {
16038					if ( format.charAt( iFormat ) === "'" && !lookAhead( "'" ) ) {
16039						literal = false;
16040					} else {
16041						output += format.charAt( iFormat );
16042					}
16043				} else {
16044					switch ( format.charAt( iFormat ) ) {
16045						case "d":
16046							output += formatNumber( "d", date.getDate(), 2 );
16047							break;
16048						case "D":
16049							output += formatName( "D", date.getDay(), dayNamesShort, dayNames );
16050							break;
16051						case "o":
16052							output += formatNumber( "o",
16053								Math.round( ( new Date( date.getFullYear(), date.getMonth(), date.getDate() ).getTime() - new Date( date.getFullYear(), 0, 0 ).getTime() ) / 86400000 ), 3 );
16054							break;
16055						case "m":
16056							output += formatNumber( "m", date.getMonth() + 1, 2 );
16057							break;
16058						case "M":
16059							output += formatName( "M", date.getMonth(), monthNamesShort, monthNames );
16060							break;
16061						case "y":
16062							output += ( lookAhead( "y" ) ? date.getFullYear() :
16063								( date.getFullYear() % 100 < 10 ? "0" : "" ) + date.getFullYear() % 100 );
16064							break;
16065						case "@":
16066							output += date.getTime();
16067							break;
16068						case "!":
16069							output += date.getTime() * 10000 + this._ticksTo1970;
16070							break;
16071						case "'":
16072							if ( lookAhead( "'" ) ) {
16073								output += "'";
16074							} else {
16075								literal = true;
16076							}
16077							break;
16078						default:
16079							output += format.charAt( iFormat );
16080					}
16081				}
16082			}
16083		}
16084		return output;
16085	},
16086
16087	/* Extract all possible characters from the date format. */
16088	_possibleChars: function( format ) {
16089		var iFormat,
16090			chars = "",
16091			literal = false,
16092
16093			// Check whether a format character is doubled
16094			lookAhead = function( match ) {
16095				var matches = ( iFormat + 1 < format.length && format.charAt( iFormat + 1 ) === match );
16096				if ( matches ) {
16097					iFormat++;
16098				}
16099				return matches;
16100			};
16101
16102		for ( iFormat = 0; iFormat < format.length; iFormat++ ) {
16103			if ( literal ) {
16104				if ( format.charAt( iFormat ) === "'" && !lookAhead( "'" ) ) {
16105					literal = false;
16106				} else {
16107					chars += format.charAt( iFormat );
16108				}
16109			} else {
16110				switch ( format.charAt( iFormat ) ) {
16111					case "d": case "m": case "y": case "@":
16112						chars += "0123456789";
16113						break;
16114					case "D": case "M":
16115						return null; // Accept anything
16116					case "'":
16117						if ( lookAhead( "'" ) ) {
16118							chars += "'";
16119						} else {
16120							literal = true;
16121						}
16122						break;
16123					default:
16124						chars += format.charAt( iFormat );
16125				}
16126			}
16127		}
16128		return chars;
16129	},
16130
16131	/* Get a setting value, defaulting if necessary. */
16132	_get: function( inst, name ) {
16133		return inst.settings[ name ] !== undefined ?
16134			inst.settings[ name ] : this._defaults[ name ];
16135	},
16136
16137	/* Parse existing date and initialise date picker. */
16138	_setDateFromField: function( inst, noDefault ) {
16139		if ( inst.input.val() === inst.lastVal ) {
16140			return;
16141		}
16142
16143		var dateFormat = this._get( inst, "dateFormat" ),
16144			dates = inst.lastVal = inst.input ? inst.input.val() : null,
16145			defaultDate = this._getDefaultDate( inst ),
16146			date = defaultDate,
16147			settings = this._getFormatConfig( inst );
16148
16149		try {
16150			date = this.parseDate( dateFormat, dates, settings ) || defaultDate;
16151		} catch ( event ) {
16152			dates = ( noDefault ? "" : dates );
16153		}
16154		inst.selectedDay = date.getDate();
16155		inst.drawMonth = inst.selectedMonth = date.getMonth();
16156		inst.drawYear = inst.selectedYear = date.getFullYear();
16157		inst.currentDay = ( dates ? date.getDate() : 0 );
16158		inst.currentMonth = ( dates ? date.getMonth() : 0 );
16159		inst.currentYear = ( dates ? date.getFullYear() : 0 );
16160		this._adjustInstDate( inst );
16161	},
16162
16163	/* Retrieve the default date shown on opening. */
16164	_getDefaultDate: function( inst ) {
16165		return this._restrictMinMax( inst,
16166			this._determineDate( inst, this._get( inst, "defaultDate" ), new Date() ) );
16167	},
16168
16169	/* A date may be specified as an exact value or a relative one. */
16170	_determineDate: function( inst, date, defaultDate ) {
16171		var offsetNumeric = function( offset ) {
16172				var date = new Date();
16173				date.setDate( date.getDate() + offset );
16174				return date;
16175			},
16176			offsetString = function( offset ) {
16177				try {
16178					return $.datepicker.parseDate( $.datepicker._get( inst, "dateFormat" ),
16179						offset, $.datepicker._getFormatConfig( inst ) );
16180				} catch ( e ) {
16181
16182					// Ignore
16183				}
16184
16185				var date = ( offset.toLowerCase().match( /^c/ ) ?
16186					$.datepicker._getDate( inst ) : null ) || new Date(),
16187					year = date.getFullYear(),
vendor: 5,359 bytes, lines 16188-16326
16188					month = date.getMonth(),
16189					day = date.getDate(),
16190					pattern = /([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,
16191					matches = pattern.exec( offset );
16192
16193				while ( matches ) {
16194					switch ( matches[ 2 ] || "d" ) {
16195						case "d" : case "D" :
16196							day += parseInt( matches[ 1 ], 10 ); break;
16197						case "w" : case "W" :
16198							day += parseInt( matches[ 1 ], 10 ) * 7; break;
16199						case "m" : case "M" :
16200							month += parseInt( matches[ 1 ], 10 );
16201							day = Math.min( day, $.datepicker._getDaysInMonth( year, month ) );
16202							break;
16203						case "y": case "Y" :
16204							year += parseInt( matches[ 1 ], 10 );
16205							day = Math.min( day, $.datepicker._getDaysInMonth( year, month ) );
16206							break;
16207					}
16208					matches = pattern.exec( offset );
16209				}
16210				return new Date( year, month, day );
16211			},
16212			newDate = ( date == null || date === "" ? defaultDate : ( typeof date === "string" ? offsetString( date ) :
16213				( typeof date === "number" ? ( isNaN( date ) ? defaultDate : offsetNumeric( date ) ) : new Date( date.getTime() ) ) ) );
16214
16215		newDate = ( newDate && newDate.toString() === "Invalid Date" ? defaultDate : newDate );
16216		if ( newDate ) {
16217			newDate.setHours( 0 );
16218			newDate.setMinutes( 0 );
16219			newDate.setSeconds( 0 );
16220			newDate.setMilliseconds( 0 );
16221		}
16222		return this._daylightSavingAdjust( newDate );
16223	},
16224
16225	/* Handle switch to/from daylight saving.
16226	 * Hours may be non-zero on daylight saving cut-over:
16227	 * > 12 when midnight changeover, but then cannot generate
16228	 * midnight datetime, so jump to 1AM, otherwise reset.
16229	 * @param  date  (Date) the date to check
16230	 * @return  (Date) the corrected date
16231	 */
16232	_daylightSavingAdjust: function( date ) {
16233		if ( !date ) {
16234			return null;
16235		}
16236		date.setHours( date.getHours() > 12 ? date.getHours() + 2 : 0 );
16237		return date;
16238	},
16239
16240	/* Set the date(s) directly. */
16241	_setDate: function( inst, date, noChange ) {
16242		var clear = !date,
16243			origMonth = inst.selectedMonth,
16244			origYear = inst.selectedYear,
16245			newDate = this._restrictMinMax( inst, this._determineDate( inst, date, new Date() ) );
16246
16247		inst.selectedDay = inst.currentDay = newDate.getDate();
16248		inst.drawMonth = inst.selectedMonth = inst.currentMonth = newDate.getMonth();
16249		inst.drawYear = inst.selectedYear = inst.currentYear = newDate.getFullYear();
16250		if ( ( origMonth !== inst.selectedMonth || origYear !== inst.selectedYear ) && !noChange ) {
16251			this._notifyChange( inst );
16252		}
16253		this._adjustInstDate( inst );
16254		if ( inst.input ) {
16255			inst.input.val( clear ? "" : this._formatDate( inst ) );
16256		}
16257	},
16258
16259	/* Retrieve the date(s) directly. */
16260	_getDate: function( inst ) {
16261		var startDate = ( !inst.currentYear || ( inst.input && inst.input.val() === "" ) ? null :
16262			this._daylightSavingAdjust( new Date(
16263			inst.currentYear, inst.currentMonth, inst.currentDay ) ) );
16264			return startDate;
16265	},
16266
16267	/* Attach the onxxx handlers.  These are declared statically so
16268	 * they work with static code transformers like Caja.
16269	 */
16270	_attachHandlers: function( inst ) {
16271		var stepMonths = this._get( inst, "stepMonths" ),
16272			id = "#" + inst.id.replace( /\\\\/g, "\\" );
16273		inst.dpDiv.find( "[data-handler]" ).map( function() {
16274			var handler = {
16275				prev: function() {
16276					$.datepicker._adjustDate( id, -stepMonths, "M" );
16277				},
16278				next: function() {
16279					$.datepicker._adjustDate( id, +stepMonths, "M" );
16280				},
16281				hide: function() {
16282					$.datepicker._hideDatepicker();
16283				},
16284				today: function() {
16285					$.datepicker._gotoToday( id );
16286				},
16287				selectDay: function() {
16288					$.datepicker._selectDay( id, +this.getAttribute( "data-month" ), +this.getAttribute( "data-year" ), this );
16289					return false;
16290				},
16291				selectMonth: function() {
16292					$.datepicker._selectMonthYear( id, this, "M" );
16293					return false;
16294				},
16295				selectYear: function() {
16296					$.datepicker._selectMonthYear( id, this, "Y" );
16297					return false;
16298				}
16299			};
16300			$( this ).on( this.getAttribute( "data-event" ), handler[ this.getAttribute( "data-handler" ) ] );
16301		} );
16302	},
16303
16304	/* Generate the HTML for the current state of the date picker. */
16305	_generateHTML: function( inst ) {
16306		var maxDraw, prevText, prev, nextText, next, currentText, gotoDate,
16307			controls, buttonPanel, firstDay, showWeek, dayNames, dayNamesMin,
16308			monthNames, monthNamesShort, beforeShowDay, showOtherMonths,
16309			selectOtherMonths, defaultDate, html, dow, row, group, col, selectedDate,
16310			cornerClass, calender, thead, day, daysInMonth, leadDays, curRows, numRows,
16311			printDate, dRow, tbody, daySettings, otherMonth, unselectable,
16312			tempDate = new Date(),
16313			today = this._daylightSavingAdjust(
16314				new Date( tempDate.getFullYear(), tempDate.getMonth(), tempDate.getDate() ) ), // clear time
16315			isRTL = this._get( inst, "isRTL" ),
16316			showButtonPanel = this._get( inst, "showButtonPanel" ),
16317			hideIfNoPrevNext = this._get( inst, "hideIfNoPrevNext" ),
16318			navigationAsDateFormat = this._get( inst, "navigationAsDateFormat" ),
16319			numMonths = this._getNumberOfMonths( inst ),
16320			showCurrentAtPos = this._get( inst, "showCurrentAtPos" ),
16321			stepMonths = this._get( inst, "stepMonths" ),
16322			isMultiMonth = ( numMonths[ 0 ] !== 1 || numMonths[ 1 ] !== 1 ),
16323			currentDate = this._daylightSavingAdjust( ( !inst.currentDay ? new Date( 9999, 9, 9 ) :
16324				new Date( inst.currentYear, inst.currentMonth, inst.currentDay ) ) ),
16325			minDate = this._getMinMaxDate( inst, "min" ),
16326			maxDate = this._getMinMaxDate( inst, "max" ),
vendor: 21,257 bytes, lines 16327-16841
16327			drawMonth = inst.drawMonth - showCurrentAtPos,
16328			drawYear = inst.drawYear;
16329
16330		if ( drawMonth < 0 ) {
16331			drawMonth += 12;
16332			drawYear--;
16333		}
16334		if ( maxDate ) {
16335			maxDraw = this._daylightSavingAdjust( new Date( maxDate.getFullYear(),
16336				maxDate.getMonth() - ( numMonths[ 0 ] * numMonths[ 1 ] ) + 1, maxDate.getDate() ) );
16337			maxDraw = ( minDate && maxDraw < minDate ? minDate : maxDraw );
16338			while ( this._daylightSavingAdjust( new Date( drawYear, drawMonth, 1 ) ) > maxDraw ) {
16339				drawMonth--;
16340				if ( drawMonth < 0 ) {
16341					drawMonth = 11;
16342					drawYear--;
16343				}
16344			}
16345		}
16346		inst.drawMonth = drawMonth;
16347		inst.drawYear = drawYear;
16348
16349		prevText = this._get( inst, "prevText" );
16350		prevText = ( !navigationAsDateFormat ? prevText : this.formatDate( prevText,
16351			this._daylightSavingAdjust( new Date( drawYear, drawMonth - stepMonths, 1 ) ),
16352			this._getFormatConfig( inst ) ) );
16353
16354		if ( this._canAdjustMonth( inst, -1, drawYear, drawMonth ) ) {
16355			prev = $( "<a>" )
16356				.attr( {
16357					"class": "ui-datepicker-prev ui-corner-all",
16358					"data-handler": "prev",
16359					"data-event": "click",
16360					title: prevText
16361				} )
16362				.append(
16363					$( "<span>" )
16364						.addClass( "ui-icon ui-icon-circle-triangle-" +
16365							( isRTL ? "e" : "w" ) )
16366						.text( prevText )
16367				)[ 0 ].outerHTML;
16368		} else if ( hideIfNoPrevNext ) {
16369			prev = "";
16370		} else {
16371			prev = $( "<a>" )
16372				.attr( {
16373					"class": "ui-datepicker-prev ui-corner-all ui-state-disabled",
16374					title: prevText
16375				} )
16376				.append(
16377					$( "<span>" )
16378						.addClass( "ui-icon ui-icon-circle-triangle-" +
16379							( isRTL ? "e" : "w" ) )
16380						.text( prevText )
16381				)[ 0 ].outerHTML;
16382		}
16383
16384		nextText = this._get( inst, "nextText" );
16385		nextText = ( !navigationAsDateFormat ? nextText : this.formatDate( nextText,
16386			this._daylightSavingAdjust( new Date( drawYear, drawMonth + stepMonths, 1 ) ),
16387			this._getFormatConfig( inst ) ) );
16388
16389		if ( this._canAdjustMonth( inst, +1, drawYear, drawMonth ) ) {
16390			next = $( "<a>" )
16391				.attr( {
16392					"class": "ui-datepicker-next ui-corner-all",
16393					"data-handler": "next",
16394					"data-event": "click",
16395					title: nextText
16396				} )
16397				.append(
16398					$( "<span>" )
16399						.addClass( "ui-icon ui-icon-circle-triangle-" +
16400							( isRTL ? "w" : "e" ) )
16401						.text( nextText )
16402				)[ 0 ].outerHTML;
16403		} else if ( hideIfNoPrevNext ) {
16404			next = "";
16405		} else {
16406			next = $( "<a>" )
16407				.attr( {
16408					"class": "ui-datepicker-next ui-corner-all ui-state-disabled",
16409					title: nextText
16410				} )
16411				.append(
16412					$( "<span>" )
16413						.attr( "class", "ui-icon ui-icon-circle-triangle-" +
16414							( isRTL ? "w" : "e" ) )
16415						.text( nextText )
16416				)[ 0 ].outerHTML;
16417		}
16418
16419		currentText = this._get( inst, "currentText" );
16420		gotoDate = ( this._get( inst, "gotoCurrent" ) && inst.currentDay ? currentDate : today );
16421		currentText = ( !navigationAsDateFormat ? currentText :
16422			this.formatDate( currentText, gotoDate, this._getFormatConfig( inst ) ) );
16423
16424		controls = "";
16425		if ( !inst.inline ) {
16426			controls = $( "<button>" )
16427				.attr( {
16428					type: "button",
16429					"class": "ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all",
16430					"data-handler": "hide",
16431					"data-event": "click"
16432				} )
16433				.text( this._get( inst, "closeText" ) )[ 0 ].outerHTML;
16434		}
16435
16436		buttonPanel = "";
16437		if ( showButtonPanel ) {
16438			buttonPanel = $( "<div class='ui-datepicker-buttonpane ui-widget-content'>" )
16439				.append( isRTL ? controls : "" )
16440				.append( this._isInRange( inst, gotoDate ) ?
16441					$( "<button>" )
16442						.attr( {
16443							type: "button",
16444							"class": "ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all",
16445							"data-handler": "today",
16446							"data-event": "click"
16447						} )
16448						.text( currentText ) :
16449					"" )
16450				.append( isRTL ? "" : controls )[ 0 ].outerHTML;
16451		}
16452
16453		firstDay = parseInt( this._get( inst, "firstDay" ), 10 );
16454		firstDay = ( isNaN( firstDay ) ? 0 : firstDay );
16455
16456		showWeek = this._get( inst, "showWeek" );
16457		dayNames = this._get( inst, "dayNames" );
16458		dayNamesMin = this._get( inst, "dayNamesMin" );
16459		monthNames = this._get( inst, "monthNames" );
16460		monthNamesShort = this._get( inst, "monthNamesShort" );
16461		beforeShowDay = this._get( inst, "beforeShowDay" );
16462		showOtherMonths = this._get( inst, "showOtherMonths" );
16463		selectOtherMonths = this._get( inst, "selectOtherMonths" );
16464		defaultDate = this._getDefaultDate( inst );
16465		html = "";
16466
16467		for ( row = 0; row < numMonths[ 0 ]; row++ ) {
16468			group = "";
16469			this.maxRows = 4;
16470			for ( col = 0; col < numMonths[ 1 ]; col++ ) {
16471				selectedDate = this._daylightSavingAdjust( new Date( drawYear, drawMonth, inst.selectedDay ) );
16472				cornerClass = " ui-corner-all";
16473				calender = "";
16474				if ( isMultiMonth ) {
16475					calender += "<div class='ui-datepicker-group";
16476					if ( numMonths[ 1 ] > 1 ) {
16477						switch ( col ) {
16478							case 0: calender += " ui-datepicker-group-first";
16479								cornerClass = " ui-corner-" + ( isRTL ? "right" : "left" ); break;
16480							case numMonths[ 1 ] - 1: calender += " ui-datepicker-group-last";
16481								cornerClass = " ui-corner-" + ( isRTL ? "left" : "right" ); break;
16482							default: calender += " ui-datepicker-group-middle"; cornerClass = ""; break;
16483						}
16484					}
16485					calender += "'>";
16486				}
16487				calender += "<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix" + cornerClass + "'>" +
16488					( /all|left/.test( cornerClass ) && row === 0 ? ( isRTL ? next : prev ) : "" ) +
16489					( /all|right/.test( cornerClass ) && row === 0 ? ( isRTL ? prev : next ) : "" ) +
16490					this._generateMonthYearHeader( inst, drawMonth, drawYear, minDate, maxDate,
16491					row > 0 || col > 0, monthNames, monthNamesShort ) + // draw month headers
16492					"</div><table class='ui-datepicker-calendar'><thead>" +
16493					"<tr>";
16494				thead = ( showWeek ? "<th class='ui-datepicker-week-col'>" + this._get( inst, "weekHeader" ) + "</th>" : "" );
16495				for ( dow = 0; dow < 7; dow++ ) { // days of the week
16496					day = ( dow + firstDay ) % 7;
16497					thead += "<th scope='col'" + ( ( dow + firstDay + 6 ) % 7 >= 5 ? " class='ui-datepicker-week-end'" : "" ) + ">" +
16498						"<span title='" + dayNames[ day ] + "'>" + dayNamesMin[ day ] + "</span></th>";
16499				}
16500				calender += thead + "</tr></thead><tbody>";
16501				daysInMonth = this._getDaysInMonth( drawYear, drawMonth );
16502				if ( drawYear === inst.selectedYear && drawMonth === inst.selectedMonth ) {
16503					inst.selectedDay = Math.min( inst.selectedDay, daysInMonth );
16504				}
16505				leadDays = ( this._getFirstDayOfMonth( drawYear, drawMonth ) - firstDay + 7 ) % 7;
16506				curRows = Math.ceil( ( leadDays + daysInMonth ) / 7 ); // calculate the number of rows to generate
16507				numRows = ( isMultiMonth ? this.maxRows > curRows ? this.maxRows : curRows : curRows ); //If multiple months, use the higher number of rows (see #7043)
16508				this.maxRows = numRows;
16509				printDate = this._daylightSavingAdjust( new Date( drawYear, drawMonth, 1 - leadDays ) );
16510				for ( dRow = 0; dRow < numRows; dRow++ ) { // create date picker rows
16511					calender += "<tr>";
16512					tbody = ( !showWeek ? "" : "<td class='ui-datepicker-week-col'>" +
16513						this._get( inst, "calculateWeek" )( printDate ) + "</td>" );
16514					for ( dow = 0; dow < 7; dow++ ) { // create date picker days
16515						daySettings = ( beforeShowDay ?
16516							beforeShowDay.apply( ( inst.input ? inst.input[ 0 ] : null ), [ printDate ] ) : [ true, "" ] );
16517						otherMonth = ( printDate.getMonth() !== drawMonth );
16518						unselectable = ( otherMonth && !selectOtherMonths ) || !daySettings[ 0 ] ||
16519							( minDate && printDate < minDate ) || ( maxDate && printDate > maxDate );
16520						tbody += "<td class='" +
16521							( ( dow + firstDay + 6 ) % 7 >= 5 ? " ui-datepicker-week-end" : "" ) + // highlight weekends
16522							( otherMonth ? " ui-datepicker-other-month" : "" ) + // highlight days from other months
16523							( ( printDate.getTime() === selectedDate.getTime() && drawMonth === inst.selectedMonth && inst._keyEvent ) || // user pressed key
16524							( defaultDate.getTime() === printDate.getTime() && defaultDate.getTime() === selectedDate.getTime() ) ?
16525
16526							// or defaultDate is current printedDate and defaultDate is selectedDate
16527							" " + this._dayOverClass : "" ) + // highlight selected day
16528							( unselectable ? " " + this._unselectableClass + " ui-state-disabled" : "" ) +  // highlight unselectable days
16529							( otherMonth && !showOtherMonths ? "" : " " + daySettings[ 1 ] + // highlight custom dates
16530							( printDate.getTime() === currentDate.getTime() ? " " + this._currentClass : "" ) + // highlight selected day
16531							( printDate.getTime() === today.getTime() ? " ui-datepicker-today" : "" ) ) + "'" + // highlight today (if different)
16532							( ( !otherMonth || showOtherMonths ) && daySettings[ 2 ] ? " title='" + daySettings[ 2 ].replace( /'/g, "&#39;" ) + "'" : "" ) + // cell title
16533							( unselectable ? "" : " data-handler='selectDay' data-event='click' data-month='" + printDate.getMonth() + "' data-year='" + printDate.getFullYear() + "'" ) + ">" + // actions
16534							( otherMonth && !showOtherMonths ? "&#xa0;" : // display for other months
16535							( unselectable ? "<span class='ui-state-default'>" + printDate.getDate() + "</span>" : "<a class='ui-state-default" +
16536							( printDate.getTime() === today.getTime() ? " ui-state-highlight" : "" ) +
16537							( printDate.getTime() === currentDate.getTime() ? " ui-state-active" : "" ) + // highlight selected day
16538							( otherMonth ? " ui-priority-secondary" : "" ) + // distinguish dates from other months
16539							"' href='#' aria-current='" + ( printDate.getTime() === currentDate.getTime() ? "true" : "false" ) + // mark date as selected for screen reader
16540							"' data-date='" + printDate.getDate() + // store date as data
16541							"'>" + printDate.getDate() + "</a>" ) ) + "</td>"; // display selectable date
16542						printDate.setDate( printDate.getDate() + 1 );
16543						printDate = this._daylightSavingAdjust( printDate );
16544					}
16545					calender += tbody + "</tr>";
16546				}
16547				drawMonth++;
16548				if ( drawMonth > 11 ) {
16549					drawMonth = 0;
16550					drawYear++;
16551				}
16552				calender += "</tbody></table>" + ( isMultiMonth ? "</div>" +
16553							( ( numMonths[ 0 ] > 0 && col === numMonths[ 1 ] - 1 ) ? "<div class='ui-datepicker-row-break'></div>" : "" ) : "" );
16554				group += calender;
16555			}
16556			html += group;
16557		}
16558		html += buttonPanel;
16559		inst._keyEvent = false;
16560		return html;
16561	},
16562
16563	/* Generate the month and year header. */
16564	_generateMonthYearHeader: function( inst, drawMonth, drawYear, minDate, maxDate,
16565			secondary, monthNames, monthNamesShort ) {
16566
16567		var inMinYear, inMaxYear, month, years, thisYear, determineYear, year, endYear,
16568			changeMonth = this._get( inst, "changeMonth" ),
16569			changeYear = this._get( inst, "changeYear" ),
16570			showMonthAfterYear = this._get( inst, "showMonthAfterYear" ),
16571			selectMonthLabel = this._get( inst, "selectMonthLabel" ),
16572			selectYearLabel = this._get( inst, "selectYearLabel" ),
16573			html = "<div class='ui-datepicker-title'>",
16574			monthHtml = "";
16575
16576		// Month selection
16577		if ( secondary || !changeMonth ) {
16578			monthHtml += "<span class='ui-datepicker-month'>" + monthNames[ drawMonth ] + "</span>";
16579		} else {
16580			inMinYear = ( minDate && minDate.getFullYear() === drawYear );
16581			inMaxYear = ( maxDate && maxDate.getFullYear() === drawYear );
16582			monthHtml += "<select class='ui-datepicker-month' aria-label='" + selectMonthLabel + "' data-handler='selectMonth' data-event='change'>";
16583			for ( month = 0; month < 12; month++ ) {
16584				if ( ( !inMinYear || month >= minDate.getMonth() ) && ( !inMaxYear || month <= maxDate.getMonth() ) ) {
16585					monthHtml += "<option value='" + month + "'" +
16586						( month === drawMonth ? " selected='selected'" : "" ) +
16587						">" + monthNamesShort[ month ] + "</option>";
16588				}
16589			}
16590			monthHtml += "</select>";
16591		}
16592
16593		if ( !showMonthAfterYear ) {
16594			html += monthHtml + ( secondary || !( changeMonth && changeYear ) ? "&#xa0;" : "" );
16595		}
16596
16597		// Year selection
16598		if ( !inst.yearshtml ) {
16599			inst.yearshtml = "";
16600			if ( secondary || !changeYear ) {
16601				html += "<span class='ui-datepicker-year'>" + drawYear + "</span>";
16602			} else {
16603
16604				// determine range of years to display
16605				years = this._get( inst, "yearRange" ).split( ":" );
16606				thisYear = new Date().getFullYear();
16607				determineYear = function( value ) {
16608					var year = ( value.match( /c[+\-].*/ ) ? drawYear + parseInt( value.substring( 1 ), 10 ) :
16609						( value.match( /[+\-].*/ ) ? thisYear + parseInt( value, 10 ) :
16610						parseInt( value, 10 ) ) );
16611					return ( isNaN( year ) ? thisYear : year );
16612				};
16613				year = determineYear( years[ 0 ] );
16614				endYear = Math.max( year, determineYear( years[ 1 ] || "" ) );
16615				year = ( minDate ? Math.max( year, minDate.getFullYear() ) : year );
16616				endYear = ( maxDate ? Math.min( endYear, maxDate.getFullYear() ) : endYear );
16617				inst.yearshtml += "<select class='ui-datepicker-year' aria-label='" + selectYearLabel + "' data-handler='selectYear' data-event='change'>";
16618				for ( ; year <= endYear; year++ ) {
16619					inst.yearshtml += "<option value='" + year + "'" +
16620						( year === drawYear ? " selected='selected'" : "" ) +
16621						">" + year + "</option>";
16622				}
16623				inst.yearshtml += "</select>";
16624
16625				html += inst.yearshtml;
16626				inst.yearshtml = null;
16627			}
16628		}
16629
16630		html += this._get( inst, "yearSuffix" );
16631		if ( showMonthAfterYear ) {
16632			html += ( secondary || !( changeMonth && changeYear ) ? "&#xa0;" : "" ) + monthHtml;
16633		}
16634		html += "</div>"; // Close datepicker_header
16635		return html;
16636	},
16637
16638	/* Adjust one of the date sub-fields. */
16639	_adjustInstDate: function( inst, offset, period ) {
16640		var year = inst.selectedYear + ( period === "Y" ? offset : 0 ),
16641			month = inst.selectedMonth + ( period === "M" ? offset : 0 ),
16642			day = Math.min( inst.selectedDay, this._getDaysInMonth( year, month ) ) + ( period === "D" ? offset : 0 ),
16643			date = this._restrictMinMax( inst, this._daylightSavingAdjust( new Date( year, month, day ) ) );
16644
16645		inst.selectedDay = date.getDate();
16646		inst.drawMonth = inst.selectedMonth = date.getMonth();
16647		inst.drawYear = inst.selectedYear = date.getFullYear();
16648		if ( period === "M" || period === "Y" ) {
16649			this._notifyChange( inst );
16650		}
16651	},
16652
16653	/* Ensure a date is within any min/max bounds. */
16654	_restrictMinMax: function( inst, date ) {
16655		var minDate = this._getMinMaxDate( inst, "min" ),
16656			maxDate = this._getMinMaxDate( inst, "max" ),
16657			newDate = ( minDate && date < minDate ? minDate : date );
16658		return ( maxDate && newDate > maxDate ? maxDate : newDate );
16659	},
16660
16661	/* Notify change of month/year. */
16662	_notifyChange: function( inst ) {
16663		var onChange = this._get( inst, "onChangeMonthYear" );
16664		if ( onChange ) {
16665			onChange.apply( ( inst.input ? inst.input[ 0 ] : null ),
16666				[ inst.selectedYear, inst.selectedMonth + 1, inst ] );
16667		}
16668	},
16669
16670	/* Determine the number of months to show. */
16671	_getNumberOfMonths: function( inst ) {
16672		var numMonths = this._get( inst, "numberOfMonths" );
16673		return ( numMonths == null ? [ 1, 1 ] : ( typeof numMonths === "number" ? [ 1, numMonths ] : numMonths ) );
16674	},
16675
16676	/* Determine the current maximum date - ensure no time components are set. */
16677	_getMinMaxDate: function( inst, minMax ) {
16678		return this._determineDate( inst, this._get( inst, minMax + "Date" ), null );
16679	},
16680
16681	/* Find the number of days in a given month. */
16682	_getDaysInMonth: function( year, month ) {
16683		return 32 - this._daylightSavingAdjust( new Date( year, month, 32 ) ).getDate();
16684	},
16685
16686	/* Find the day of the week of the first of a month. */
16687	_getFirstDayOfMonth: function( year, month ) {
16688		return new Date( year, month, 1 ).getDay();
16689	},
16690
16691	/* Determines if we should allow a "next/prev" month display change. */
16692	_canAdjustMonth: function( inst, offset, curYear, curMonth ) {
16693		var numMonths = this._getNumberOfMonths( inst ),
16694			date = this._daylightSavingAdjust( new Date( curYear,
16695			curMonth + ( offset < 0 ? offset : numMonths[ 0 ] * numMonths[ 1 ] ), 1 ) );
16696
16697		if ( offset < 0 ) {
16698			date.setDate( this._getDaysInMonth( date.getFullYear(), date.getMonth() ) );
16699		}
16700		return this._isInRange( inst, date );
16701	},
16702
16703	/* Is the given date in the accepted range? */
16704	_isInRange: function( inst, date ) {
16705		var yearSplit, currentYear,
16706			minDate = this._getMinMaxDate( inst, "min" ),
16707			maxDate = this._getMinMaxDate( inst, "max" ),
16708			minYear = null,
16709			maxYear = null,
16710			years = this._get( inst, "yearRange" );
16711			if ( years ) {
16712				yearSplit = years.split( ":" );
16713				currentYear = new Date().getFullYear();
16714				minYear = parseInt( yearSplit[ 0 ], 10 );
16715				maxYear = parseInt( yearSplit[ 1 ], 10 );
16716				if ( yearSplit[ 0 ].match( /[+\-].*/ ) ) {
16717					minYear += currentYear;
16718				}
16719				if ( yearSplit[ 1 ].match( /[+\-].*/ ) ) {
16720					maxYear += currentYear;
16721				}
16722			}
16723
16724		return ( ( !minDate || date.getTime() >= minDate.getTime() ) &&
16725			( !maxDate || date.getTime() <= maxDate.getTime() ) &&
16726			( !minYear || date.getFullYear() >= minYear ) &&
16727			( !maxYear || date.getFullYear() <= maxYear ) );
16728	},
16729
16730	/* Provide the configuration settings for formatting/parsing. */
16731	_getFormatConfig: function( inst ) {
16732		var shortYearCutoff = this._get( inst, "shortYearCutoff" );
16733		shortYearCutoff = ( typeof shortYearCutoff !== "string" ? shortYearCutoff :
16734			new Date().getFullYear() % 100 + parseInt( shortYearCutoff, 10 ) );
16735		return { shortYearCutoff: shortYearCutoff,
16736			dayNamesShort: this._get( inst, "dayNamesShort" ), dayNames: this._get( inst, "dayNames" ),
16737			monthNamesShort: this._get( inst, "monthNamesShort" ), monthNames: this._get( inst, "monthNames" ) };
16738	},
16739
16740	/* Format the given date for display. */
16741	_formatDate: function( inst, day, month, year ) {
16742		if ( !day ) {
16743			inst.currentDay = inst.selectedDay;
16744			inst.currentMonth = inst.selectedMonth;
16745			inst.currentYear = inst.selectedYear;
16746		}
16747		var date = ( day ? ( typeof day === "object" ? day :
16748			this._daylightSavingAdjust( new Date( year, month, day ) ) ) :
16749			this._daylightSavingAdjust( new Date( inst.currentYear, inst.currentMonth, inst.currentDay ) ) );
16750		return this.formatDate( this._get( inst, "dateFormat" ), date, this._getFormatConfig( inst ) );
16751	}
16752} );
16753
16754/*
16755 * Bind hover events for datepicker elements.
16756 * Done via delegate so the binding only occurs once in the lifetime of the parent div.
16757 * Global datepicker_instActive, set by _updateDatepicker allows the handlers to find their way back to the active picker.
16758 */
16759function datepicker_bindHover( dpDiv ) {
16760	var selector = "button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";
16761	return dpDiv.on( "mouseout", selector, function() {
16762			$( this ).removeClass( "ui-state-hover" );
16763			if ( this.className.indexOf( "ui-datepicker-prev" ) !== -1 ) {
16764				$( this ).removeClass( "ui-datepicker-prev-hover" );
16765			}
16766			if ( this.className.indexOf( "ui-datepicker-next" ) !== -1 ) {
16767				$( this ).removeClass( "ui-datepicker-next-hover" );
16768			}
16769		} )
16770		.on( "mouseover", selector, datepicker_handleMouseover );
16771}
16772
16773function datepicker_handleMouseover() {
16774	if ( !$.datepicker._isDisabledDatepicker( datepicker_instActive.inline ? datepicker_instActive.dpDiv.parent()[ 0 ] : datepicker_instActive.input[ 0 ] ) ) {
16775		$( this ).parents( ".ui-datepicker-calendar" ).find( "a" ).removeClass( "ui-state-hover" );
16776		$( this ).addClass( "ui-state-hover" );
16777		if ( this.className.indexOf( "ui-datepicker-prev" ) !== -1 ) {
16778			$( this ).addClass( "ui-datepicker-prev-hover" );
16779		}
16780		if ( this.className.indexOf( "ui-datepicker-next" ) !== -1 ) {
16781			$( this ).addClass( "ui-datepicker-next-hover" );
16782		}
16783	}
16784}
16785
16786/* jQuery extend now ignores nulls! */
16787function datepicker_extendRemove( target, props ) {
16788	$.extend( target, props );
16789	for ( var name in props ) {
16790		if ( props[ name ] == null ) {
16791			target[ name ] = props[ name ];
16792		}
16793	}
16794	return target;
16795}
16796
16797/* Invoke the datepicker functionality.
16798   @param  options  string - a command, optionally followed by additional parameters or
16799					Object - settings for attaching new datepicker functionality
16800   @return  jQuery object */
16801$.fn.datepicker = function( options ) {
16802
16803	/* Verify an empty collection wasn't passed - Fixes #6976 */
16804	if ( !this.length ) {
16805		return this;
16806	}
16807
16808	/* Initialise the date picker. */
16809	if ( !$.datepicker.initialized ) {
16810		$( document ).on( "mousedown", $.datepicker._checkExternalClick );
16811		$.datepicker.initialized = true;
16812	}
16813
16814	/* Append datepicker main container to body if not exist. */
16815	if ( $( "#" + $.datepicker._mainDivId ).length === 0 ) {
16816		$( "body" ).append( $.datepicker.dpDiv );
16817	}
16818
16819	var otherArgs = Array.prototype.slice.call( arguments, 1 );
16820	if ( typeof options === "string" && ( options === "isDisabled" || options === "getDate" || options === "widget" ) ) {
16821		return $.datepicker[ "_" + options + "Datepicker" ].
16822			apply( $.datepicker, [ this[ 0 ] ].concat( otherArgs ) );
16823	}
16824	if ( options === "option" && arguments.length === 2 && typeof arguments[ 1 ] === "string" ) {
16825		return $.datepicker[ "_" + options + "Datepicker" ].
16826			apply( $.datepicker, [ this[ 0 ] ].concat( otherArgs ) );
16827	}
16828	return this.each( function() {
16829		if ( typeof options === "string" ) {
16830			$.datepicker[ "_" + options + "Datepicker" ]
16831				.apply( $.datepicker, [ this ].concat( otherArgs ) );
16832		} else {
16833			$.datepicker._attachDatepicker( this, options );
16834		}
16835	} );
16836};
16837
16838$.datepicker = new Datepicker(); // singleton instance
16839$.datepicker.initialized = false;
16840$.datepicker.uuid = new Date().getTime();
16841$.datepicker.version = "1.1
vendor: 6,619 bytes, lines 16841-17102
168414.0";
16842
16843var widgetsDatepicker = $.datepicker;
16844
16845
16846/*!
16847 * jQuery UI Mouse 1.14.0
16848 * https://jqueryui.com
16849 *
16850 * Copyright OpenJS Foundation and other contributors
16851 * Released under the MIT license.
16852 * https://jquery.org/license
16853 */
16854
16855//>>label: Mouse
16856//>>group: Widgets
16857//>>description: Abstracts mouse-based interactions to assist in creating certain widgets.
16858//>>docs: https://api.jqueryui.com/mouse/
16859
16860
16861var mouseHandled = false;
16862$( document ).on( "mouseup", function() {
16863	mouseHandled = false;
16864} );
16865
16866var widgetsMouse = $.widget( "ui.mouse", {
16867	version: "1.14.0",
16868	options: {
16869		cancel: "input, textarea, button, select, option",
16870		distance: 1,
16871		delay: 0
16872	},
16873	_mouseInit: function() {
16874		var that = this;
16875
16876		this.element
16877			.on( "mousedown." + this.widgetName, function( event ) {
16878				return that._mouseDown( event );
16879			} )
16880			.on( "click." + this.widgetName, function( event ) {
16881				if ( true === $.data( event.target, that.widgetName + ".preventClickEvent" ) ) {
16882					$.removeData( event.target, that.widgetName + ".preventClickEvent" );
16883					event.stopImmediatePropagation();
16884					return false;
16885				}
16886			} );
16887
16888		this.started = false;
16889	},
16890
16891	// TODO: make sure destroying one instance of mouse doesn't mess with
16892	// other instances of mouse
16893	_mouseDestroy: function() {
16894		this.element.off( "." + this.widgetName );
16895		if ( this._mouseMoveDelegate ) {
16896			this.document
16897				.off( "mousemove." + this.widgetName, this._mouseMoveDelegate )
16898				.off( "mouseup." + this.widgetName, this._mouseUpDelegate );
16899		}
16900	},
16901
16902	_mouseDown: function( event ) {
16903
16904		// don't let more than one widget handle mouseStart
16905		if ( mouseHandled ) {
16906			return;
16907		}
16908
16909		this._mouseMoved = false;
16910
16911		// We may have missed mouseup (out of window)
16912		if ( this._mouseStarted ) {
16913			this._mouseUp( event );
16914		}
16915
16916		this._mouseDownEvent = event;
16917
16918		var that = this,
16919			btnIsLeft = event.which === 1,
16920			elIsCancel = typeof this.options.cancel === "string" ?
16921				$( event.target ).closest( this.options.cancel ).length :
16922				false;
16923		if ( !btnIsLeft || elIsCancel || !this._mouseCapture( event ) ) {
16924			return true;
16925		}
16926
16927		this.mouseDelayMet = !this.options.delay;
16928		if ( !this.mouseDelayMet ) {
16929			this._mouseDelayTimer = setTimeout( function() {
16930				that.mouseDelayMet = true;
16931			}, this.options.delay );
16932		}
16933
16934		if ( this._mouseDistanceMet( event ) && this._mouseDelayMet( event ) ) {
16935			this._mouseStarted = ( this._mouseStart( event ) !== false );
16936			if ( !this._mouseStarted ) {
16937				event.preventDefault();
16938				return true;
16939			}
16940		}
16941
16942		// Click event may never have fired (Gecko & Opera)
16943		if ( true === $.data( event.target, this.widgetName + ".preventClickEvent" ) ) {
16944			$.removeData( event.target, this.widgetName + ".preventClickEvent" );
16945		}
16946
16947		// These delegates are required to keep context
16948		this._mouseMoveDelegate = function( event ) {
16949			return that._mouseMove( event );
16950		};
16951		this._mouseUpDelegate = function( event ) {
16952			return that._mouseUp( event );
16953		};
16954
16955		this.document
16956			.on( "mousemove." + this.widgetName, this._mouseMoveDelegate )
16957			.on( "mouseup." + this.widgetName, this._mouseUpDelegate );
16958
16959		event.preventDefault();
16960
16961		mouseHandled = true;
16962		return true;
16963	},
16964
16965	_mouseMove: function( event ) {
16966
16967		// Only check for mouseups outside the document if you've moved inside the document
16968		// at least once.
16969		if ( this._mouseMoved && !event.which ) {
16970
16971			// Support: Safari <=8 - 9
16972			// Safari sets which to 0 if you press any of the following keys
16973			// during a drag (#14461)
16974			if ( event.originalEvent.altKey || event.originalEvent.ctrlKey ||
16975					event.originalEvent.metaKey || event.originalEvent.shiftKey ) {
16976				this.ignoreMissingWhich = true;
16977			} else if ( !this.ignoreMissingWhich ) {
16978				return this._mouseUp( event );
16979			}
16980		}
16981
16982		if ( event.which || event.button ) {
16983			this._mouseMoved = true;
16984		}
16985
16986		if ( this._mouseStarted ) {
16987			this._mouseDrag( event );
16988			return event.preventDefault();
16989		}
16990
16991		if ( this._mouseDistanceMet( event ) && this._mouseDelayMet( event ) ) {
16992			this._mouseStarted =
16993				( this._mouseStart( this._mouseDownEvent, event ) !== false );
16994			if ( this._mouseStarted ) {
16995				this._mouseDrag( event );
16996			} else {
16997				this._mouseUp( event );
16998			}
16999		}
17000
17001		return !this._mouseStarted;
17002	},
17003
17004	_mouseUp: function( event ) {
17005		this.document
17006			.off( "mousemove." + this.widgetName, this._mouseMoveDelegate )
17007			.off( "mouseup." + this.widgetName, this._mouseUpDelegate );
17008
17009		if ( this._mouseStarted ) {
17010			this._mouseStarted = false;
17011
17012			if ( event.target === this._mouseDownEvent.target ) {
17013				$.data( event.target, this.widgetName + ".preventClickEvent", true );
17014			}
17015
17016			this._mouseStop( event );
17017		}
17018
17019		if ( this._mouseDelayTimer ) {
17020			clearTimeout( this._mouseDelayTimer );
17021			delete this._mouseDelayTimer;
17022		}
17023
17024		this.ignoreMissingWhich = false;
17025		mouseHandled = false;
17026		event.preventDefault();
17027	},
17028
17029	_mouseDistanceMet: function( event ) {
17030		return ( Math.max(
17031				Math.abs( this._mouseDownEvent.pageX - event.pageX ),
17032				Math.abs( this._mouseDownEvent.pageY - event.pageY )
17033			) >= this.options.distance
17034		);
17035	},
17036
17037	_mouseDelayMet: function( /* event */ ) {
17038		return this.mouseDelayMet;
17039	},
17040
17041	// These are placeholder methods, to be overriden by extending plugin
17042	_mouseStart: function( /* event */ ) {},
17043	_mouseDrag: function( /* event */ ) {},
17044	_mouseStop: function( /* event */ ) {},
17045	_mouseCapture: function( /* event */ ) {
17046		return true;
17047	}
17048} );
17049
17050
17051
17052// $.ui.plugin is deprecated. Use $.widget() extensions instead.
17053var plugin = $.ui.plugin = {
17054	add: function( module, option, set ) {
17055		var i,
17056			proto = $.ui[ module ].prototype;
17057		for ( i in set ) {
17058			proto.plugins[ i ] = proto.plugins[ i ] || [];
17059			proto.plugins[ i ].push( [ option, set[ i ] ] );
17060		}
17061	},
17062	call: function( instance, name, args, allowDisconnected ) {
17063		var i,
17064			set = instance.plugins[ name ];
17065
17066		if ( !set ) {
17067			return;
17068		}
17069
17070		if ( !allowDisconnected && ( !instance.element[ 0 ].parentNode ||
17071				instance.element[ 0 ].parentNode.nodeType === 11 ) ) {
17072			return;
17073		}
17074
17075		for ( i = 0; i < set.length; i++ ) {
17076			if ( instance.options[ set[ i ][ 0 ] ] ) {
17077				set[ i ][ 1 ].apply( instance.element, args );
17078			}
17079		}
17080	}
17081};
17082
17083
17084/*!
17085 * jQuery UI Draggable 1.14.0
17086 * https://jqueryui.com
17087 *
17088 * Copyright OpenJS Foundation and other contributors
17089 * Released under the MIT license.
17090 * https://jquery.org/license
17091 */
17092
17093//>>label: Draggable
17094//>>group: Interactions
17095//>>description: Enables dragging functionality for any element.
17096//>>docs: https://api.jqueryui.com/draggable/
17097//>>demos: https://jqueryui.com/draggable/
17098//>>css.structure: ../../themes/base/draggable.css
17099
17100
17101$.widget( "ui.draggable", $.ui.mouse, {
17102	version: "1.14.0
vendor: 13,254 bytes, lines 17102-17595
17102",
17103	widgetEventPrefix: "drag",
17104	options: {
17105		addClasses: true,
17106		appendTo: "parent",
17107		axis: false,
17108		connectToSortable: false,
17109		containment: false,
17110		cursor: "auto",
17111		cursorAt: false,
17112		grid: false,
17113		handle: false,
17114		helper: "original",
17115		iframeFix: false,
17116		opacity: false,
17117		refreshPositions: false,
17118		revert: false,
17119		revertDuration: 500,
17120		scope: "default",
17121		scroll: true,
17122		scrollSensitivity: 20,
17123		scrollSpeed: 20,
17124		snap: false,
17125		snapMode: "both",
17126		snapTolerance: 20,
17127		stack: false,
17128		zIndex: false,
17129
17130		// Callbacks
17131		drag: null,
17132		start: null,
17133		stop: null
17134	},
17135	_create: function() {
17136
17137		if ( this.options.helper === "original" ) {
17138			this._setPositionRelative();
17139		}
17140		if ( this.options.addClasses ) {
17141			this._addClass( "ui-draggable" );
17142		}
17143		this._setHandleClassName();
17144
17145		this._mouseInit();
17146	},
17147
17148	_setOption: function( key, value ) {
17149		this._super( key, value );
17150		if ( key === "handle" ) {
17151			this._removeHandleClassName();
17152			this._setHandleClassName();
17153		}
17154	},
17155
17156	_destroy: function() {
17157		if ( ( this.helper || this.element ).is( ".ui-draggable-dragging" ) ) {
17158			this.destroyOnClear = true;
17159			return;
17160		}
17161		this._removeHandleClassName();
17162		this._mouseDestroy();
17163	},
17164
17165	_mouseCapture: function( event ) {
17166		var o = this.options;
17167
17168		// Among others, prevent a drag on a resizable-handle
17169		if ( this.helper || o.disabled ||
17170				$( event.target ).closest( ".ui-resizable-handle" ).length > 0 ) {
17171			return false;
17172		}
17173
17174		//Quit if we're not on a valid handle
17175		this.handle = this._getHandle( event );
17176		if ( !this.handle ) {
17177			return false;
17178		}
17179
17180		this._blurActiveElement( event );
17181
17182		this._blockFrames( o.iframeFix === true ? "iframe" : o.iframeFix );
17183
17184		return true;
17185
17186	},
17187
17188	_blockFrames: function( selector ) {
17189		this.iframeBlocks = this.document.find( selector ).map( function() {
17190			var iframe = $( this );
17191
17192			return $( "<div>" )
17193				.css( "position", "absolute" )
17194				.appendTo( iframe.parent() )
17195				.outerWidth( iframe.outerWidth() )
17196				.outerHeight( iframe.outerHeight() )
17197				.offset( iframe.offset() )[ 0 ];
17198		} );
17199	},
17200
17201	_unblockFrames: function() {
17202		if ( this.iframeBlocks ) {
17203			this.iframeBlocks.remove();
17204			delete this.iframeBlocks;
17205		}
17206	},
17207
17208	_blurActiveElement: function( event ) {
17209		var activeElement = this.document[ 0 ].activeElement,
17210			target = $( event.target );
17211
17212		// Don't blur if the event occurred on an element that is within
17213		// the currently focused element
17214		// See #10527, #12472
17215		if ( target.closest( activeElement ).length ) {
17216			return;
17217		}
17218
17219		// Blur any element that currently has focus, see #4261
17220		$( activeElement ).trigger( "blur" );
17221	},
17222
17223	_mouseStart: function( event ) {
17224
17225		var o = this.options;
17226
17227		//Create and append the visible helper
17228		this.helper = this._createHelper( event );
17229
17230		this._addClass( this.helper, "ui-draggable-dragging" );
17231
17232		//Cache the helper size
17233		this._cacheHelperProportions();
17234
17235		//If ddmanager is used for droppables, set the global draggable
17236		if ( $.ui.ddmanager ) {
17237			$.ui.ddmanager.current = this;
17238		}
17239
17240		/*
17241		 * - Position generation -
17242		 * This block generates everything position related - it's the core of draggables.
17243		 */
17244
17245		//Cache the margins of the original element
17246		this._cacheMargins();
17247
17248		//Store the helper's css position
17249		this.cssPosition = this.helper.css( "position" );
17250		this.scrollParent = this.helper.scrollParent( true );
17251		this.offsetParent = this.helper.offsetParent();
17252		this.hasFixedAncestor = this.helper.parents().filter( function() {
17253				return $( this ).css( "position" ) === "fixed";
17254			} ).length > 0;
17255
17256		//The element's absolute position on the page minus margins
17257		this.positionAbs = this.element.offset();
17258		this._refreshOffsets( event );
17259
17260		//Generate the original position
17261		this.originalPosition = this.position = this._generatePosition( event, false );
17262		this.originalPageX = event.pageX;
17263		this.originalPageY = event.pageY;
17264
17265		//Adjust the mouse offset relative to the helper if "cursorAt" is supplied
17266		if ( o.cursorAt ) {
17267			this._adjustOffsetFromHelper( o.cursorAt );
17268		}
17269
17270		//Set a containment if given in the options
17271		this._setContainment();
17272
17273		//Trigger event + callbacks
17274		if ( this._trigger( "start", event ) === false ) {
17275			this._clear();
17276			return false;
17277		}
17278
17279		//Recache the helper size
17280		this._cacheHelperProportions();
17281
17282		//Prepare the droppable offsets
17283		if ( $.ui.ddmanager && !o.dropBehaviour ) {
17284			$.ui.ddmanager.prepareOffsets( this, event );
17285		}
17286
17287		// Execute the drag once - this causes the helper not to be visible before getting its
17288		// correct position
17289		this._mouseDrag( event, true );
17290
17291		// If the ddmanager is used for droppables, inform the manager that dragging has started
17292		// (see #5003)
17293		if ( $.ui.ddmanager ) {
17294			$.ui.ddmanager.dragStart( this, event );
17295		}
17296
17297		return true;
17298	},
17299
17300	_refreshOffsets: function( event ) {
17301		this.offset = {
17302			top: this.positionAbs.top - this.margins.top,
17303			left: this.positionAbs.left - this.margins.left,
17304			scroll: false,
17305			parent: this._getParentOffset(),
17306			relative: this._getRelativeOffset()
17307		};
17308
17309		this.offset.click = {
17310			left: event.pageX - this.offset.left,
17311			top: event.pageY - this.offset.top
17312		};
17313	},
17314
17315	_mouseDrag: function( event, noPropagation ) {
17316
17317		// reset any necessary cached properties (see #5009)
17318		if ( this.hasFixedAncestor ) {
17319			this.offset.parent = this._getParentOffset();
17320		}
17321
17322		//Compute the helpers position
17323		this.position = this._generatePosition( event, true );
17324		this.positionAbs = this._convertPositionTo( "absolute" );
17325
17326		//Call plugins and callbacks and use the resulting position if something is returned
17327		if ( !noPropagation ) {
17328			var ui = this._uiHash();
17329			if ( this._trigger( "drag", event, ui ) === false ) {
17330				this._mouseUp( new $.Event( "mouseup", event ) );
17331				return false;
17332			}
17333			this.position = ui.position;
17334		}
17335
17336		this.helper[ 0 ].style.left = this.position.left + "px";
17337		this.helper[ 0 ].style.top = this.position.top + "px";
17338
17339		if ( $.ui.ddmanager ) {
17340			$.ui.ddmanager.drag( this, event );
17341		}
17342
17343		return false;
17344	},
17345
17346	_mouseStop: function( event ) {
17347
17348		//If we are using droppables, inform the manager about the drop
17349		var that = this,
17350			dropped = false;
17351		if ( $.ui.ddmanager && !this.options.dropBehaviour ) {
17352			dropped = $.ui.ddmanager.drop( this, event );
17353		}
17354
17355		//if a drop comes from outside (a sortable)
17356		if ( this.dropped ) {
17357			dropped = this.dropped;
17358			this.dropped = false;
17359		}
17360
17361		if ( ( this.options.revert === "invalid" && !dropped ) ||
17362				( this.options.revert === "valid" && dropped ) ||
17363				this.options.revert === true || ( typeof this.options.revert === "function" &&
17364				this.options.revert.call( this.element, dropped ) )
17365		) {
17366			$( this.helper ).animate(
17367				this.originalPosition,
17368				parseInt( this.options.revertDuration, 10 ),
17369				function() {
17370					if ( that._trigger( "stop", event ) !== false ) {
17371						that._clear();
17372					}
17373				}
17374			);
17375		} else {
17376			if ( this._trigger( "stop", event ) !== false ) {
17377				this._clear();
17378			}
17379		}
17380
17381		return false;
17382	},
17383
17384	_mouseUp: function( event ) {
17385		this._unblockFrames();
17386
17387		// If the ddmanager is used for droppables, inform the manager that dragging has stopped
17388		// (see #5003)
17389		if ( $.ui.ddmanager ) {
17390			$.ui.ddmanager.dragStop( this, event );
17391		}
17392
17393		// Only need to focus if the event occurred on the draggable itself, see #10527
17394		if ( this.handleElement.is( event.target ) ) {
17395
17396			// The interaction is over; whether or not the click resulted in a drag,
17397			// focus the element
17398			this.element.trigger( "focus" );
17399		}
17400
17401		return $.ui.mouse.prototype._mouseUp.call( this, event );
17402	},
17403
17404	cancel: function() {
17405
17406		if ( this.helper.is( ".ui-draggable-dragging" ) ) {
17407			this._mouseUp( new $.Event( "mouseup", { target: this.element[ 0 ] } ) );
17408		} else {
17409			this._clear();
17410		}
17411
17412		return this;
17413
17414	},
17415
17416	_getHandle: function( event ) {
17417		return this.options.handle ?
17418			!!$( event.target ).closest( this.element.find( this.options.handle ) ).length :
17419			true;
17420	},
17421
17422	_setHandleClassName: function() {
17423		this.handleElement = this.options.handle ?
17424			this.element.find( this.options.handle ) : this.element;
17425		this._addClass( this.handleElement, "ui-draggable-handle" );
17426	},
17427
17428	_removeHandleClassName: function() {
17429		this._removeClass( this.handleElement, "ui-draggable-handle" );
17430	},
17431
17432	_createHelper: function( event ) {
17433
17434		var o = this.options,
17435			helperIsFunction = typeof o.helper === "function",
17436			helper = helperIsFunction ?
17437				$( o.helper.apply( this.element[ 0 ], [ event ] ) ) :
17438				( o.helper === "clone" ?
17439					this.element.clone().removeAttr( "id" ) :
17440					this.element );
17441
17442		if ( !helper.parents( "body" ).length ) {
17443			helper.appendTo( ( o.appendTo === "parent" ?
17444				this.element[ 0 ].parentNode :
17445				o.appendTo ) );
17446		}
17447
17448		// https://bugs.jqueryui.com/ticket/9446
17449		// a helper function can return the original element
17450		// which wouldn't have been set to relative in _create
17451		if ( helperIsFunction && helper[ 0 ] === this.element[ 0 ] ) {
17452			this._setPositionRelative();
17453		}
17454
17455		if ( helper[ 0 ] !== this.element[ 0 ] &&
17456				!( /(fixed|absolute)/ ).test( helper.css( "position" ) ) ) {
17457			helper.css( "position", "absolute" );
17458		}
17459
17460		return helper;
17461
17462	},
17463
17464	_setPositionRelative: function() {
17465		if ( !( /^(?:r|a|f)/ ).test( this.element.css( "position" ) ) ) {
17466			this.element[ 0 ].style.position = "relative";
17467		}
17468	},
17469
17470	_adjustOffsetFromHelper: function( obj ) {
17471		if ( typeof obj === "string" ) {
17472			obj = obj.split( " " );
17473		}
17474		if ( Array.isArray( obj ) ) {
17475			obj = { left: +obj[ 0 ], top: +obj[ 1 ] || 0 };
17476		}
17477		if ( "left" in obj ) {
17478			this.offset.click.left = obj.left + this.margins.left;
17479		}
17480		if ( "right" in obj ) {
17481			this.offset.click.left = this.helperProportions.width - obj.right + this.margins.left;
17482		}
17483		if ( "top" in obj ) {
17484			this.offset.click.top = obj.top + this.margins.top;
17485		}
17486		if ( "bottom" in obj ) {
17487			this.offset.click.top = this.helperProportions.height - obj.bottom + this.margins.top;
17488		}
17489	},
17490
17491	_isRootNode: function( element ) {
17492		return ( /(html|body)/i ).test( element.tagName ) || element === this.document[ 0 ];
17493	},
17494
17495	_getParentOffset: function() {
17496
17497		//Get the offsetParent and cache its position
17498		var po = this.offsetParent.offset(),
17499			document = this.document[ 0 ];
17500
17501		// This is a special case where we need to modify a offset calculated on start, since the
17502		// following happened:
17503		// 1. The position of the helper is absolute, so it's position is calculated based on the
17504		// next positioned parent
17505		// 2. The actual offset parent is a child of the scroll parent, and the scroll parent isn't
17506		// the document, which means that the scroll is included in the initial calculation of the
17507		// offset of the parent, and never recalculated upon drag
17508		if ( this.cssPosition === "absolute" && this.scrollParent[ 0 ] !== document &&
17509				$.contains( this.scrollParent[ 0 ], this.offsetParent[ 0 ] ) ) {
17510			po.left += this.scrollParent.scrollLeft();
17511			po.top += this.scrollParent.scrollTop();
17512		}
17513
17514		if ( this._isRootNode( this.offsetParent[ 0 ] ) ) {
17515			po = { top: 0, left: 0 };
17516		}
17517
17518		return {
17519			top: po.top + ( parseInt( this.offsetParent.css( "borderTopWidth" ), 10 ) || 0 ),
17520			left: po.left + ( parseInt( this.offsetParent.css( "borderLeftWidth" ), 10 ) || 0 )
17521		};
17522
17523	},
17524
17525	_getRelativeOffset: function() {
17526		if ( this.cssPosition !== "relative" ) {
17527			return { top: 0, left: 0 };
17528		}
17529
17530		var p = this.element.position(),
17531			scrollIsRootNode = this._isRootNode( this.scrollParent[ 0 ] );
17532
17533		return {
17534			top: p.top - ( parseInt( this.helper.css( "top" ), 10 ) || 0 ) +
17535				( !scrollIsRootNode ? this.scrollParent.scrollTop() : 0 ),
17536			left: p.left - ( parseInt( this.helper.css( "left" ), 10 ) || 0 ) +
17537				( !scrollIsRootNode ? this.scrollParent.scrollLeft() : 0 )
17538		};
17539
17540	},
17541
17542	_cacheMargins: function() {
17543		this.margins = {
17544			left: ( parseInt( this.element.css( "marginLeft" ), 10 ) || 0 ),
17545			top: ( parseInt( this.element.css( "marginTop" ), 10 ) || 0 ),
17546			right: ( parseInt( this.element.css( "marginRight" ), 10 ) || 0 ),
17547			bottom: ( parseInt( this.element.css( "marginBottom" ), 10 ) || 0 )
17548		};
17549	},
17550
17551	_cacheHelperProportions: function() {
17552		this.helperProportions = {
17553			width: this.helper.outerWidth(),
17554			height: this.helper.outerHeight()
17555		};
17556	},
17557
17558	_setContainment: function() {
17559
17560		var isUserScrollable, c, ce,
17561			o = this.options,
17562			document = this.document[ 0 ];
17563
17564		this.relativeContainer = null;
17565
17566		if ( !o.containment ) {
17567			this.containment = null;
17568			return;
17569		}
17570
17571		if ( o.containment === "window" ) {
17572			this.containment = [
17573				$( window ).scrollLeft() - this.offset.relative.left - this.offset.parent.left,
17574				$( window ).scrollTop() - this.offset.relative.top - this.offset.parent.top,
17575				$( window ).scrollLeft() + $( window ).width() -
17576					this.helperProportions.width - this.margins.left,
17577				$( window ).scrollTop() +
17578					( $( window ).height() || document.body.parentNode.scrollHeight ) -
17579					this.helperProportions.height - this.margins.top
17580			];
17581			return;
17582		}
17583
17584		if ( o.containment === "document" ) {
17585			this.containment = [
17586				0,
17587				0,
17588				$( document ).width() - this.helperProportions.width - this.margins.left,
17589				( $( document ).height() || document.body.parentNode.scrollHeight ) -
17590					this.helperProportions.height - this.margins.top
17591			];
17592			return;
17593		}
17594
17595		if ( o.containment.constructor === Array ) {
vendor: 10,369 bytes, lines 17596-17942
17596			this.containment = o.containment;
17597			return;
17598		}
17599
17600		if ( o.containment === "parent" ) {
17601			o.containment = this.helper[ 0 ].parentNode;
17602		}
17603
17604		c = $( o.containment );
17605		ce = c[ 0 ];
17606
17607		if ( !ce ) {
17608			return;
17609		}
17610
17611		isUserScrollable = /(scroll|auto)/.test( c.css( "overflow" ) );
17612
17613		this.containment = [
17614			( parseInt( c.css( "borderLeftWidth" ), 10 ) || 0 ) +
17615				( parseInt( c.css( "paddingLeft" ), 10 ) || 0 ),
17616			( parseInt( c.css( "borderTopWidth" ), 10 ) || 0 ) +
17617				( parseInt( c.css( "paddingTop" ), 10 ) || 0 ),
17618			( isUserScrollable ? Math.max( ce.scrollWidth, ce.offsetWidth ) : ce.offsetWidth ) -
17619				( parseInt( c.css( "borderRightWidth" ), 10 ) || 0 ) -
17620				( parseInt( c.css( "paddingRight" ), 10 ) || 0 ) -
17621				this.helperProportions.width -
17622				this.margins.left -
17623				this.margins.right,
17624			( isUserScrollable ? Math.max( ce.scrollHeight, ce.offsetHeight ) : ce.offsetHeight ) -
17625				( parseInt( c.css( "borderBottomWidth" ), 10 ) || 0 ) -
17626				( parseInt( c.css( "paddingBottom" ), 10 ) || 0 ) -
17627				this.helperProportions.height -
17628				this.margins.top -
17629				this.margins.bottom
17630		];
17631		this.relativeContainer = c;
17632	},
17633
17634	_convertPositionTo: function( d, pos ) {
17635
17636		if ( !pos ) {
17637			pos = this.position;
17638		}
17639
17640		var mod = d === "absolute" ? 1 : -1,
17641			scrollIsRootNode = this._isRootNode( this.scrollParent[ 0 ] );
17642
17643		return {
17644			top: (
17645
17646				// The absolute mouse position
17647				pos.top	+
17648
17649				// Only for relative positioned nodes: Relative offset from element to offset parent
17650				this.offset.relative.top * mod +
17651
17652				// The offsetParent's offset without borders (offset + border)
17653				this.offset.parent.top * mod -
17654				( ( this.cssPosition === "fixed" ?
17655					-this.offset.scroll.top :
17656					( scrollIsRootNode ? 0 : this.offset.scroll.top ) ) * mod )
17657			),
17658			left: (
17659
17660				// The absolute mouse position
17661				pos.left +
17662
17663				// Only for relative positioned nodes: Relative offset from element to offset parent
17664				this.offset.relative.left * mod +
17665
17666				// The offsetParent's offset without borders (offset + border)
17667				this.offset.parent.left * mod	-
17668				( ( this.cssPosition === "fixed" ?
17669					-this.offset.scroll.left :
17670					( scrollIsRootNode ? 0 : this.offset.scroll.left ) ) * mod )
17671			)
17672		};
17673
17674	},
17675
17676	_generatePosition: function( event, constrainPosition ) {
17677
17678		var containment, co, top, left,
17679			o = this.options,
17680			scrollIsRootNode = this._isRootNode( this.scrollParent[ 0 ] ),
17681			pageX = event.pageX,
17682			pageY = event.pageY;
17683
17684		// Cache the scroll
17685		if ( !scrollIsRootNode || !this.offset.scroll ) {
17686			this.offset.scroll = {
17687				top: this.scrollParent.scrollTop(),
17688				left: this.scrollParent.scrollLeft()
17689			};
17690		}
17691
17692		/*
17693		 * - Position constraining -
17694		 * Constrain the position to a mix of grid, containment.
17695		 */
17696
17697		// If we are not dragging yet, we won't check for options
17698		if ( constrainPosition ) {
17699			if ( this.containment ) {
17700				if ( this.relativeContainer ) {
17701					co = this.relativeContainer.offset();
17702					containment = [
17703						this.containment[ 0 ] + co.left,
17704						this.containment[ 1 ] + co.top,
17705						this.containment[ 2 ] + co.left,
17706						this.containment[ 3 ] + co.top
17707					];
17708				} else {
17709					containment = this.containment;
17710				}
17711
17712				if ( event.pageX - this.offset.click.left < containment[ 0 ] ) {
17713					pageX = containment[ 0 ] + this.offset.click.left;
17714				}
17715				if ( event.pageY - this.offset.click.top < containment[ 1 ] ) {
17716					pageY = containment[ 1 ] + this.offset.click.top;
17717				}
17718				if ( event.pageX - this.offset.click.left > containment[ 2 ] ) {
17719					pageX = containment[ 2 ] + this.offset.click.left;
17720				}
17721				if ( event.pageY - this.offset.click.top > containment[ 3 ] ) {
17722					pageY = containment[ 3 ] + this.offset.click.top;
17723				}
17724			}
17725
17726			if ( o.grid ) {
17727
17728				//Check for grid elements set to 0 to prevent divide by 0 error causing invalid
17729				// argument errors in IE (see ticket #6950)
17730				top = o.grid[ 1 ] ? this.originalPageY + Math.round( ( pageY -
17731					this.originalPageY ) / o.grid[ 1 ] ) * o.grid[ 1 ] : this.originalPageY;
17732				pageY = containment ? ( ( top - this.offset.click.top >= containment[ 1 ] ||
17733					top - this.offset.click.top > containment[ 3 ] ) ?
17734						top :
17735						( ( top - this.offset.click.top >= containment[ 1 ] ) ?
17736							top - o.grid[ 1 ] : top + o.grid[ 1 ] ) ) : top;
17737
17738				left = o.grid[ 0 ] ? this.originalPageX +
17739					Math.round( ( pageX - this.originalPageX ) / o.grid[ 0 ] ) * o.grid[ 0 ] :
17740					this.originalPageX;
17741				pageX = containment ? ( ( left - this.offset.click.left >= containment[ 0 ] ||
17742					left - this.offset.click.left > containment[ 2 ] ) ?
17743						left :
17744						( ( left - this.offset.click.left >= containment[ 0 ] ) ?
17745							left - o.grid[ 0 ] : left + o.grid[ 0 ] ) ) : left;
17746			}
17747
17748			if ( o.axis === "y" ) {
17749				pageX = this.originalPageX;
17750			}
17751
17752			if ( o.axis === "x" ) {
17753				pageY = this.originalPageY;
17754			}
17755		}
17756
17757		return {
17758			top: (
17759
17760				// The absolute mouse position
17761				pageY -
17762
17763				// Click offset (relative to the element)
17764				this.offset.click.top -
17765
17766				// Only for relative positioned nodes: Relative offset from element to offset parent
17767				this.offset.relative.top -
17768
17769				// The offsetParent's offset without borders (offset + border)
17770				this.offset.parent.top +
17771				( this.cssPosition === "fixed" ?
17772					-this.offset.scroll.top :
17773					( scrollIsRootNode ? 0 : this.offset.scroll.top ) )
17774			),
17775			left: (
17776
17777				// The absolute mouse position
17778				pageX -
17779
17780				// Click offset (relative to the element)
17781				this.offset.click.left -
17782
17783				// Only for relative positioned nodes: Relative offset from element to offset parent
17784				this.offset.relative.left -
17785
17786				// The offsetParent's offset without borders (offset + border)
17787				this.offset.parent.left +
17788				( this.cssPosition === "fixed" ?
17789					-this.offset.scroll.left :
17790					( scrollIsRootNode ? 0 : this.offset.scroll.left ) )
17791			)
17792		};
17793
17794	},
17795
17796	_clear: function() {
17797		this._removeClass( this.helper, "ui-draggable-dragging" );
17798		if ( this.helper[ 0 ] !== this.element[ 0 ] && !this.cancelHelperRemoval ) {
17799			this.helper.remove();
17800		}
17801		this.helper = null;
17802		this.cancelHelperRemoval = false;
17803		if ( this.destroyOnClear ) {
17804			this.destroy();
17805		}
17806	},
17807
17808	// From now on bulk stuff - mainly helpers
17809
17810	_trigger: function( type, event, ui ) {
17811		ui = ui || this._uiHash();
17812		$.ui.plugin.call( this, type, [ event, ui, this ], true );
17813
17814		// Absolute position and offset (see #6884 ) have to be recalculated after plugins
17815		if ( /^(drag|start|stop)/.test( type ) ) {
17816			this.positionAbs = this._convertPositionTo( "absolute" );
17817			ui.offset = this.positionAbs;
17818		}
17819		return $.Widget.prototype._trigger.call( this, type, event, ui );
17820	},
17821
17822	plugins: {},
17823
17824	_uiHash: function() {
17825		return {
17826			helper: this.helper,
17827			position: this.position,
17828			originalPosition: this.originalPosition,
17829			offset: this.positionAbs
17830		};
17831	}
17832
17833} );
17834
17835$.ui.plugin.add( "draggable", "connectToSortable", {
17836	start: function( event, ui, draggable ) {
17837		var uiSortable = $.extend( {}, ui, {
17838			item: draggable.element
17839		} );
17840
17841		draggable.sortables = [];
17842		$( draggable.options.connectToSortable ).each( function() {
17843			var sortable = $( this ).sortable( "instance" );
17844
17845			if ( sortable && !sortable.options.disabled ) {
17846				draggable.sortables.push( sortable );
17847
17848				// RefreshPositions is called at drag start to refresh the containerCache
17849				// which is used in drag. This ensures it's initialized and synchronized
17850				// with any changes that might have happened on the page since initialization.
17851				sortable.refreshPositions();
17852				sortable._trigger( "activate", event, uiSortable );
17853			}
17854		} );
17855	},
17856	stop: function( event, ui, draggable ) {
17857		var uiSortable = $.extend( {}, ui, {
17858			item: draggable.element
17859		} );
17860
17861		draggable.cancelHelperRemoval = false;
17862
17863		$.each( draggable.sortables, function() {
17864			var sortable = this;
17865
17866			if ( sortable.isOver ) {
17867				sortable.isOver = 0;
17868
17869				// Allow this sortable to handle removing the helper
17870				draggable.cancelHelperRemoval = true;
17871				sortable.cancelHelperRemoval = false;
17872
17873				// Use _storedCSS To restore properties in the sortable,
17874				// as this also handles revert (#9675) since the draggable
17875				// may have modified them in unexpected ways (#8809)
17876				sortable._storedCSS = {
17877					position: sortable.placeholder.css( "position" ),
17878					top: sortable.placeholder.css( "top" ),
17879					left: sortable.placeholder.css( "left" )
17880				};
17881
17882				sortable._mouseStop( event );
17883
17884				// Once drag has ended, the sortable should return to using
17885				// its original helper, not the shared helper from draggable
17886				sortable.options.helper = sortable.options._helper;
17887			} else {
17888
17889				// Prevent this Sortable from removing the helper.
17890				// However, don't set the draggable to remove the helper
17891				// either as another connected Sortable may yet handle the removal.
17892				sortable.cancelHelperRemoval = true;
17893
17894				sortable._trigger( "deactivate", event, uiSortable );
17895			}
17896		} );
17897	},
17898	drag: function( event, ui, draggable ) {
17899		$.each( draggable.sortables, function() {
17900			var innermostIntersecting = false,
17901				sortable = this;
17902
17903			// Copy over variables that sortable's _intersectsWith uses
17904			sortable.positionAbs = draggable.positionAbs;
17905			sortable.helperProportions = draggable.helperProportions;
17906			sortable.offset.click = draggable.offset.click;
17907
17908			if ( sortable._intersectsWith( sortable.containerCache ) ) {
17909				innermostIntersecting = true;
17910
17911				$.each( draggable.sortables, function() {
17912
17913					// Copy over variables that sortable's _intersectsWith uses
17914					this.positionAbs = draggable.positionAbs;
17915					this.helperProportions = draggable.helperProportions;
17916					this.offset.click = draggable.offset.click;
17917
17918					if ( this !== sortable &&
17919							this._intersectsWith( this.containerCache ) &&
17920							$.contains( sortable.element[ 0 ], this.element[ 0 ] ) ) {
17921						innermostIntersecting = false;
17922					}
17923
17924					return innermostIntersecting;
17925				} );
17926			}
17927
17928			if ( innermostIntersecting ) {
17929
17930				// If it intersects, we use a little isOver variable and set it once,
17931				// so that the move-in stuff gets fired only once.
17932				if ( !sortable.isOver ) {
17933					sortable.isOver = 1;
17934
17935					// Store draggable's parent in case we need to reappend to it later.
17936					draggable._parent = ui.helper.parent();
17937
17938					sortable.currentItem = ui.helper
17939						.appendTo( sortable.element )
17940						.data( "ui-sortable-item", true );
17941
17942					// Store helper option to later restore it
vendor: 11,051 bytes, lines 17943-18320
17943					sortable.options._helper = sortable.options.helper;
17944
17945					sortable.options.helper = function() {
17946						return ui.helper[ 0 ];
17947					};
17948
17949					// Fire the start events of the sortable with our passed browser event,
17950					// and our own helper (so it doesn't create a new one)
17951					event.target = sortable.currentItem[ 0 ];
17952					sortable._mouseCapture( event, true );
17953					sortable._mouseStart( event, true, true );
17954
17955					// Because the browser event is way off the new appended portlet,
17956					// modify necessary variables to reflect the changes
17957					sortable.offset.click.top = draggable.offset.click.top;
17958					sortable.offset.click.left = draggable.offset.click.left;
17959					sortable.offset.parent.left -= draggable.offset.parent.left -
17960						sortable.offset.parent.left;
17961					sortable.offset.parent.top -= draggable.offset.parent.top -
17962						sortable.offset.parent.top;
17963
17964					draggable._trigger( "toSortable", event );
17965
17966					// Inform draggable that the helper is in a valid drop zone,
17967					// used solely in the revert option to handle "valid/invalid".
17968					draggable.dropped = sortable.element;
17969
17970					// Need to refreshPositions of all sortables in the case that
17971					// adding to one sortable changes the location of the other sortables (#9675)
17972					$.each( draggable.sortables, function() {
17973						this.refreshPositions();
17974					} );
17975
17976					// Hack so receive/update callbacks work (mostly)
17977					draggable.currentItem = draggable.element;
17978					sortable.fromOutside = draggable;
17979				}
17980
17981				if ( sortable.currentItem ) {
17982					sortable._mouseDrag( event );
17983
17984					// Copy the sortable's position because the draggable's can potentially reflect
17985					// a relative position, while sortable is always absolute, which the dragged
17986					// element has now become. (#8809)
17987					ui.position = sortable.position;
17988				}
17989			} else {
17990
17991				// If it doesn't intersect with the sortable, and it intersected before,
17992				// we fake the drag stop of the sortable, but make sure it doesn't remove
17993				// the helper by using cancelHelperRemoval.
17994				if ( sortable.isOver ) {
17995
17996					sortable.isOver = 0;
17997					sortable.cancelHelperRemoval = true;
17998
17999					// Calling sortable's mouseStop would trigger a revert,
18000					// so revert must be temporarily false until after mouseStop is called.
18001					sortable.options._revert = sortable.options.revert;
18002					sortable.options.revert = false;
18003
18004					sortable._trigger( "out", event, sortable._uiHash( sortable ) );
18005					sortable._mouseStop( event, true );
18006
18007					// Restore sortable behaviors that were modfied
18008					// when the draggable entered the sortable area (#9481)
18009					sortable.options.revert = sortable.options._revert;
18010					sortable.options.helper = sortable.options._helper;
18011
18012					if ( sortable.placeholder ) {
18013						sortable.placeholder.remove();
18014					}
18015
18016					// Restore and recalculate the draggable's offset considering the sortable
18017					// may have modified them in unexpected ways. (#8809, #10669)
18018					ui.helper.appendTo( draggable._parent );
18019					draggable._refreshOffsets( event );
18020					ui.position = draggable._generatePosition( event, true );
18021
18022					draggable._trigger( "fromSortable", event );
18023
18024					// Inform draggable that the helper is no longer in a valid drop zone
18025					draggable.dropped = false;
18026
18027					// Need to refreshPositions of all sortables just in case removing
18028					// from one sortable changes the location of other sortables (#9675)
18029					$.each( draggable.sortables, function() {
18030						this.refreshPositions();
18031					} );
18032				}
18033			}
18034		} );
18035	}
18036} );
18037
18038$.ui.plugin.add( "draggable", "cursor", {
18039	start: function( event, ui, instance ) {
18040		var t = $( "body" ),
18041			o = instance.options;
18042
18043		if ( t.css( "cursor" ) ) {
18044			o._cursor = t.css( "cursor" );
18045		}
18046		t.css( "cursor", o.cursor );
18047	},
18048	stop: function( event, ui, instance ) {
18049		var o = instance.options;
18050		if ( o._cursor ) {
18051			$( "body" ).css( "cursor", o._cursor );
18052		}
18053	}
18054} );
18055
18056$.ui.plugin.add( "draggable", "opacity", {
18057	start: function( event, ui, instance ) {
18058		var t = $( ui.helper ),
18059			o = instance.options;
18060		if ( t.css( "opacity" ) ) {
18061			o._opacity = t.css( "opacity" );
18062		}
18063		t.css( "opacity", o.opacity );
18064	},
18065	stop: function( event, ui, instance ) {
18066		var o = instance.options;
18067		if ( o._opacity ) {
18068			$( ui.helper ).css( "opacity", o._opacity );
18069		}
18070	}
18071} );
18072
18073$.ui.plugin.add( "draggable", "scroll", {
18074	start: function( event, ui, i ) {
18075		if ( !i.scrollParentNotHidden ) {
18076			i.scrollParentNotHidden = i.helper.scrollParent( false );
18077		}
18078
18079		if ( i.scrollParentNotHidden[ 0 ] !== i.document[ 0 ] &&
18080				i.scrollParentNotHidden[ 0 ].tagName !== "HTML" ) {
18081			i.overflowOffset = i.scrollParentNotHidden.offset();
18082		}
18083	},
18084	drag: function( event, ui, i  ) {
18085
18086		var o = i.options,
18087			scrolled = false,
18088			scrollParent = i.scrollParentNotHidden[ 0 ],
18089			document = i.document[ 0 ];
18090
18091		if ( scrollParent !== document && scrollParent.tagName !== "HTML" ) {
18092			if ( !o.axis || o.axis !== "x" ) {
18093				if ( ( i.overflowOffset.top + scrollParent.offsetHeight ) - event.pageY <
18094						o.scrollSensitivity ) {
18095					scrollParent.scrollTop = scrolled = scrollParent.scrollTop + o.scrollSpeed;
18096				} else if ( event.pageY - i.overflowOffset.top < o.scrollSensitivity ) {
18097					scrollParent.scrollTop = scrolled = scrollParent.scrollTop - o.scrollSpeed;
18098				}
18099			}
18100
18101			if ( !o.axis || o.axis !== "y" ) {
18102				if ( ( i.overflowOffset.left + scrollParent.offsetWidth ) - event.pageX <
18103						o.scrollSensitivity ) {
18104					scrollParent.scrollLeft = scrolled = scrollParent.scrollLeft + o.scrollSpeed;
18105				} else if ( event.pageX - i.overflowOffset.left < o.scrollSensitivity ) {
18106					scrollParent.scrollLeft = scrolled = scrollParent.scrollLeft - o.scrollSpeed;
18107				}
18108			}
18109
18110		} else {
18111
18112			if ( !o.axis || o.axis !== "x" ) {
18113				if ( event.pageY - $( document ).scrollTop() < o.scrollSensitivity ) {
18114					scrolled = $( document ).scrollTop( $( document ).scrollTop() - o.scrollSpeed );
18115				} else if ( $( window ).height() - ( event.pageY - $( document ).scrollTop() ) <
18116						o.scrollSensitivity ) {
18117					scrolled = $( document ).scrollTop( $( document ).scrollTop() + o.scrollSpeed );
18118				}
18119			}
18120
18121			if ( !o.axis || o.axis !== "y" ) {
18122				if ( event.pageX - $( document ).scrollLeft() < o.scrollSensitivity ) {
18123					scrolled = $( document ).scrollLeft(
18124						$( document ).scrollLeft() - o.scrollSpeed
18125					);
18126				} else if ( $( window ).width() - ( event.pageX - $( document ).scrollLeft() ) <
18127						o.scrollSensitivity ) {
18128					scrolled = $( document ).scrollLeft(
18129						$( document ).scrollLeft() + o.scrollSpeed
18130					);
18131				}
18132			}
18133
18134		}
18135
18136		if ( scrolled !== false && $.ui.ddmanager && !o.dropBehaviour ) {
18137			$.ui.ddmanager.prepareOffsets( i, event );
18138		}
18139
18140	}
18141} );
18142
18143$.ui.plugin.add( "draggable", "snap", {
18144	start: function( event, ui, i ) {
18145
18146		var o = i.options;
18147
18148		i.snapElements = [];
18149
18150		$( o.snap.constructor !== String ? ( o.snap.items || ":data(ui-draggable)" ) : o.snap )
18151			.each( function() {
18152				var $t = $( this ),
18153					$o = $t.offset();
18154				if ( this !== i.element[ 0 ] ) {
18155					i.snapElements.push( {
18156						item: this,
18157						width: $t.outerWidth(), height: $t.outerHeight(),
18158						top: $o.top, left: $o.left
18159					} );
18160				}
18161			} );
18162
18163	},
18164	drag: function( event, ui, inst ) {
18165
18166		var ts, bs, ls, rs, l, r, t, b, i, first,
18167			o = inst.options,
18168			d = o.snapTolerance,
18169			x1 = ui.offset.left, x2 = x1 + inst.helperProportions.width,
18170			y1 = ui.offset.top, y2 = y1 + inst.helperProportions.height;
18171
18172		for ( i = inst.snapElements.length - 1; i >= 0; i-- ) {
18173
18174			l = inst.snapElements[ i ].left - inst.margins.left;
18175			r = l + inst.snapElements[ i ].width;
18176			t = inst.snapElements[ i ].top - inst.margins.top;
18177			b = t + inst.snapElements[ i ].height;
18178
18179			if ( x2 < l - d || x1 > r + d || y2 < t - d || y1 > b + d ||
18180					!$.contains( inst.snapElements[ i ].item.ownerDocument,
18181					inst.snapElements[ i ].item ) ) {
18182				if ( inst.snapElements[ i ].snapping ) {
18183					if ( inst.options.snap.release ) {
18184						inst.options.snap.release.call(
18185							inst.element,
18186							event,
18187							$.extend( inst._uiHash(), { snapItem: inst.snapElements[ i ].item } )
18188						);
18189					}
18190				}
18191				inst.snapElements[ i ].snapping = false;
18192				continue;
18193			}
18194
18195			if ( o.snapMode !== "inner" ) {
18196				ts = Math.abs( t - y2 ) <= d;
18197				bs = Math.abs( b - y1 ) <= d;
18198				ls = Math.abs( l - x2 ) <= d;
18199				rs = Math.abs( r - x1 ) <= d;
18200				if ( ts ) {
18201					ui.position.top = inst._convertPositionTo( "relative", {
18202						top: t - inst.helperProportions.height,
18203						left: 0
18204					} ).top;
18205				}
18206				if ( bs ) {
18207					ui.position.top = inst._convertPositionTo( "relative", {
18208						top: b,
18209						left: 0
18210					} ).top;
18211				}
18212				if ( ls ) {
18213					ui.position.left = inst._convertPositionTo( "relative", {
18214						top: 0,
18215						left: l - inst.helperProportions.width
18216					} ).left;
18217				}
18218				if ( rs ) {
18219					ui.position.left = inst._convertPositionTo( "relative", {
18220						top: 0,
18221						left: r
18222					} ).left;
18223				}
18224			}
18225
18226			first = ( ts || bs || ls || rs );
18227
18228			if ( o.snapMode !== "outer" ) {
18229				ts = Math.abs( t - y1 ) <= d;
18230				bs = Math.abs( b - y2 ) <= d;
18231				ls = Math.abs( l - x1 ) <= d;
18232				rs = Math.abs( r - x2 ) <= d;
18233				if ( ts ) {
18234					ui.position.top = inst._convertPositionTo( "relative", {
18235						top: t,
18236						left: 0
18237					} ).top;
18238				}
18239				if ( bs ) {
18240					ui.position.top = inst._convertPositionTo( "relative", {
18241						top: b - inst.helperProportions.height,
18242						left: 0
18243					} ).top;
18244				}
18245				if ( ls ) {
18246					ui.position.left = inst._convertPositionTo( "relative", {
18247						top: 0,
18248						left: l
18249					} ).left;
18250				}
18251				if ( rs ) {
18252					ui.position.left = inst._convertPositionTo( "relative", {
18253						top: 0,
18254						left: r - inst.helperProportions.width
18255					} ).left;
18256				}
18257			}
18258
18259			if ( !inst.snapElements[ i ].snapping && ( ts || bs || ls || rs || first ) ) {
18260				if ( inst.options.snap.snap ) {
18261					inst.options.snap.snap.call(
18262						inst.element,
18263						event,
18264						$.extend( inst._uiHash(), {
18265							snapItem: inst.snapElements[ i ].item
18266						} ) );
18267				}
18268			}
18269			inst.snapElements[ i ].snapping = ( ts || bs || ls || rs || first );
18270
18271		}
18272
18273	}
18274} );
18275
18276$.ui.plugin.add( "draggable", "stack", {
18277	start: function( event, ui, instance ) {
18278		var min,
18279			o = instance.options,
18280			group = $.makeArray( $( o.stack ) ).sort( function( a, b ) {
18281				return ( parseInt( $( a ).css( "zIndex" ), 10 ) || 0 ) -
18282					( parseInt( $( b ).css( "zIndex" ), 10 ) || 0 );
18283			} );
18284
18285		if ( !group.length ) {
18286			return;
18287		}
18288
18289		min = parseInt( $( group[ 0 ] ).css( "zIndex" ), 10 ) || 0;
18290		$( group ).each( function( i ) {
18291			$( this ).css( "zIndex", min + i );
18292		} );
18293		this.css( "zIndex", ( min + group.length ) );
18294	}
18295} );
18296
18297$.ui.plugin.add( "draggable", "zIndex", {
18298	start: function( event, ui, instance ) {
18299		var t = $( ui.helper ),
18300			o = instance.options;
18301
18302		if ( t.css( "zIndex" ) ) {
18303			o._zIndex = t.css( "zIndex" );
18304		}
18305		t.css( "zIndex", o.zIndex );
18306	},
18307	stop: function( event, ui, instance ) {
18308		var o = instance.options;
18309
18310		if ( o._zIndex ) {
18311			$( ui.helper ).css( "zIndex", o._zIndex );
18312		}
18313	}
18314} );
18315
18316var widgetsDraggable = $.ui.draggable;
18317
18318
18319/*!
18320 * jQuery UI Resizable 1.14.
183200
18321 * https://jqueryui.com
18322 *
18323 * Copyright OpenJS Foundation and other contributors
18324 * Released under the MIT license.
18325 * https://jquery.org/license
18326 */
18327
18328//>>label: Resizable
18329//>>group: Interactions
18330//>>description: Enables resize functionality for any element.
18331//>>docs: https://api.jqueryui.com/resizable/
18332//>>demos: https://jqueryui.com/resizable/
18333//>>css.structure: ../../themes/base/core.css
18334//>>css.structure: ../../themes/base/resizable.css
18335//>>css.theme: ../../themes/base/theme.css
18336
18337
18338$.widget( "ui.resizable", $.ui.mouse, {
18339	version: "1.14.0",
18340	widgetEventPrefix: "resize",
18341	options: {
18342		alsoResize: false,
18343		animate: false,
18344		animateDuration: "slow",
18345		animateEasing: "swing",
18346		aspectRatio: false,
18347		autoHide: false,
18348		classes: {
18349			"ui-resizable-se": "ui-icon ui-icon-gripsmall-diagonal-se"
18350		},
18351		containment: false,
18352		ghost: false,
18353		grid: false,
18354		handles: "e,s,se",
18355		helper: false,
18356		maxHeight: null,
18357		maxWidth: null,
18358		minHeight: 10,
18359		minWidth: 10,
18360
18361		// See #7960
18362		zIndex: 90,
18363
18364		// Callbacks
18365		resize: null,
18366		start: null,
18367		stop: null
18368	},
18369
18370	_num: function( value ) {
18371		return parseFloat( value ) || 0;
18372	},
18373
18374	_isNumber: function( value ) {
18375		return !isNaN( parseFloat( value ) );
18376	},
18377
18378	_hasScroll: function( el, a ) {
18379
18380		if ( $( el ).css( "overflow" ) === "hidden" ) {
18381			return false;
vendor: 2,099 bytes, lines 18382-18459
18382		}
18383
18384		var scroll = ( a && a === "left" ) ? "scrollLeft" : "scrollTop",
18385			has = false;
18386
18387		if ( el[ scroll ] > 0 ) {
18388			return true;
18389		}
18390
18391		// TODO: determine which cases actually cause this to happen
18392		// if the element doesn't have the scroll set, see if it's possible to
18393		// set the scroll
18394		try {
18395			el[ scroll ] = 1;
18396			has = ( el[ scroll ] > 0 );
18397			el[ scroll ] = 0;
18398		} catch ( e ) {
18399
18400			// `el` might be a string, then setting `scroll` will throw
18401			// an error in strict mode; ignore it.
18402		}
18403		return has;
18404	},
18405
18406	_create: function() {
18407
18408		var margins,
18409			o = this.options,
18410			that = this;
18411		this._addClass( "ui-resizable" );
18412
18413		$.extend( this, {
18414			_aspectRatio: !!( o.aspectRatio ),
18415			aspectRatio: o.aspectRatio,
18416			originalElement: this.element,
18417			_proportionallyResizeElements: [],
18418			_helper: o.helper || o.ghost || o.animate ? o.helper || "ui-resizable-helper" : null
18419		} );
18420
18421		// Wrap the element if it cannot hold child nodes
18422		if ( this.element[ 0 ].nodeName.match( /^(canvas|textarea|input|select|button|img)$/i ) ) {
18423
18424			this.element.wrap(
18425				$( "<div class='ui-wrapper'></div>" ).css( {
18426					overflow: "hidden",
18427					position: this.element.css( "position" ),
18428					width: this.element.outerWidth(),
18429					height: this.element.outerHeight(),
18430					top: this.element.css( "top" ),
18431					left: this.element.css( "left" )
18432				} )
18433			);
18434
18435			this.element = this.element.parent().data(
18436				"ui-resizable", this.element.resizable( "instance" )
18437			);
18438
18439			this.elementIsWrapper = true;
18440
18441			margins = {
18442				marginTop: this.originalElement.css( "marginTop" ),
18443				marginRight: this.originalElement.css( "marginRight" ),
18444				marginBottom: this.originalElement.css( "marginBottom" ),
18445				marginLeft: this.originalElement.css( "marginLeft" )
18446			};
18447
18448			this.element.css( margins );
18449
18450			// Support: Safari
18451			// Prevent Safari textarea resize
18452			this.originalResizeStyle = this.originalElement.css( "resize" );
18453			this.originalElement.css( "resize", "none" );
18454
18455			this._proportionallyResizeElements.push( this.originalElement.css( {
18456				position: "static",
18457				zoom: 1,
18458				display: "block"
18459			} )
vendor: 23,890 bytes, lines 18459-19408
18459 );
18460
18461			this._proportionallyResize();
18462		}
18463
18464		this._setupHandles();
18465
18466		if ( o.autoHide ) {
18467			$( this.element )
18468				.on( "mouseenter", function() {
18469					if ( o.disabled ) {
18470						return;
18471					}
18472					that._removeClass( "ui-resizable-autohide" );
18473					that._handles.show();
18474				} )
18475				.on( "mouseleave", function() {
18476					if ( o.disabled ) {
18477						return;
18478					}
18479					if ( !that.resizing ) {
18480						that._addClass( "ui-resizable-autohide" );
18481						that._handles.hide();
18482					}
18483				} );
18484		}
18485
18486		this._mouseInit();
18487	},
18488
18489	_destroy: function() {
18490
18491		this._mouseDestroy();
18492		this._addedHandles.remove();
18493
18494		var wrapper,
18495			_destroy = function( exp ) {
18496				$( exp )
18497					.removeData( "resizable" )
18498					.removeData( "ui-resizable" )
18499					.off( ".resizable" );
18500			};
18501
18502		// TODO: Unwrap at same DOM position
18503		if ( this.elementIsWrapper ) {
18504			_destroy( this.element );
18505			wrapper = this.element;
18506			this.originalElement.css( {
18507				position: wrapper.css( "position" ),
18508				width: wrapper.outerWidth(),
18509				height: wrapper.outerHeight(),
18510				top: wrapper.css( "top" ),
18511				left: wrapper.css( "left" )
18512			} ).insertAfter( wrapper );
18513			wrapper.remove();
18514		}
18515
18516		this.originalElement.css( "resize", this.originalResizeStyle );
18517		_destroy( this.originalElement );
18518
18519		return this;
18520	},
18521
18522	_setOption: function( key, value ) {
18523		this._super( key, value );
18524
18525		switch ( key ) {
18526		case "handles":
18527			this._removeHandles();
18528			this._setupHandles();
18529			break;
18530		case "aspectRatio":
18531			this._aspectRatio = !!value;
18532			break;
18533		default:
18534			break;
18535		}
18536	},
18537
18538	_setupHandles: function() {
18539		var o = this.options, handle, i, n, hname, axis, that = this;
18540		this.handles = o.handles ||
18541			( !$( ".ui-resizable-handle", this.element ).length ?
18542				"e,s,se" : {
18543					n: ".ui-resizable-n",
18544					e: ".ui-resizable-e",
18545					s: ".ui-resizable-s",
18546					w: ".ui-resizable-w",
18547					se: ".ui-resizable-se",
18548					sw: ".ui-resizable-sw",
18549					ne: ".ui-resizable-ne",
18550					nw: ".ui-resizable-nw"
18551				} );
18552
18553		this._handles = $();
18554		this._addedHandles = $();
18555		if ( this.handles.constructor === String ) {
18556
18557			if ( this.handles === "all" ) {
18558				this.handles = "n,e,s,w,se,sw,ne,nw";
18559			}
18560
18561			n = this.handles.split( "," );
18562			this.handles = {};
18563
18564			for ( i = 0; i < n.length; i++ ) {
18565
18566				handle = String.prototype.trim.call( n[ i ] );
18567				hname = "ui-resizable-" + handle;
18568				axis = $( "<div>" );
18569				this._addClass( axis, "ui-resizable-handle " + hname );
18570
18571				axis.css( { zIndex: o.zIndex } );
18572
18573				this.handles[ handle ] = ".ui-resizable-" + handle;
18574				if ( !this.element.children( this.handles[ handle ] ).length ) {
18575					this.element.append( axis );
18576					this._addedHandles = this._addedHandles.add( axis );
18577				}
18578			}
18579
18580		}
18581
18582		this._renderAxis = function( target ) {
18583
18584			var i, axis, padPos, padWrapper;
18585
18586			target = target || this.element;
18587
18588			for ( i in this.handles ) {
18589
18590				if ( this.handles[ i ].constructor === String ) {
18591					this.handles[ i ] = this.element.children( this.handles[ i ] ).first().show();
18592				} else if ( this.handles[ i ].jquery || this.handles[ i ].nodeType ) {
18593					this.handles[ i ] = $( this.handles[ i ] );
18594					this._on( this.handles[ i ], { "mousedown": that._mouseDown } );
18595				}
18596
18597				if ( this.elementIsWrapper &&
18598						this.originalElement[ 0 ]
18599							.nodeName
18600							.match( /^(textarea|input|select|button)$/i ) ) {
18601					axis = $( this.handles[ i ], this.element );
18602
18603					padWrapper = /sw|ne|nw|se|n|s/.test( i ) ?
18604						axis.outerHeight() :
18605						axis.outerWidth();
18606
18607					padPos = [ "padding",
18608						/ne|nw|n/.test( i ) ? "Top" :
18609						/se|sw|s/.test( i ) ? "Bottom" :
18610						/^e$/.test( i ) ? "Right" : "Left" ].join( "" );
18611
18612					target.css( padPos, padWrapper );
18613
18614					this._proportionallyResize();
18615				}
18616
18617				this._handles = this._handles.add( this.handles[ i ] );
18618			}
18619		};
18620
18621		// TODO: make renderAxis a prototype function
18622		this._renderAxis( this.element );
18623
18624		this._handles = this._handles.add( this.element.find( ".ui-resizable-handle" ) );
18625		this._handles.disableSelection();
18626
18627		this._handles.on( "mouseover", function() {
18628			if ( !that.resizing ) {
18629				if ( this.className ) {
18630					axis = this.className.match( /ui-resizable-(se|sw|ne|nw|n|e|s|w)/i );
18631				}
18632				that.axis = axis && axis[ 1 ] ? axis[ 1 ] : "se";
18633			}
18634		} );
18635
18636		if ( o.autoHide ) {
18637			this._handles.hide();
18638			this._addClass( "ui-resizable-autohide" );
18639		}
18640	},
18641
18642	_removeHandles: function() {
18643		this._addedHandles.remove();
18644	},
18645
18646	_mouseCapture: function( event ) {
18647		var i, handle,
18648			capture = false;
18649
18650		for ( i in this.handles ) {
18651			handle = $( this.handles[ i ] )[ 0 ];
18652			if ( handle === event.target || $.contains( handle, event.target ) ) {
18653				capture = true;
18654			}
18655		}
18656
18657		return !this.options.disabled && capture;
18658	},
18659
18660	_mouseStart: function( event ) {
18661
18662		var curleft, curtop, cursor,
18663			o = this.options,
18664			el = this.element;
18665
18666		this.resizing = true;
18667
18668		this._renderProxy();
18669
18670		curleft = this._num( this.helper.css( "left" ) );
18671		curtop = this._num( this.helper.css( "top" ) );
18672
18673		if ( o.containment ) {
18674			curleft += $( o.containment ).scrollLeft() || 0;
18675			curtop += $( o.containment ).scrollTop() || 0;
18676		}
18677
18678		this.offset = this.helper.offset();
18679		this.position = { left: curleft, top: curtop };
18680
18681		this.size = this._helper ? {
18682				width: this.helper.width(),
18683				height: this.helper.height()
18684			} : {
18685				width: el.width(),
18686				height: el.height()
18687			};
18688
18689		this.originalSize = this._helper ? {
18690				width: el.outerWidth(),
18691				height: el.outerHeight()
18692			} : {
18693				width: el.width(),
18694				height: el.height()
18695			};
18696
18697		this.sizeDiff = {
18698			width: el.outerWidth() - el.width(),
18699			height: el.outerHeight() - el.height()
18700		};
18701
18702		this.originalPosition = { left: curleft, top: curtop };
18703		this.originalMousePosition = { left: event.pageX, top: event.pageY };
18704
18705		this.aspectRatio = ( typeof o.aspectRatio === "number" ) ?
18706			o.aspectRatio :
18707			( ( this.originalSize.width / this.originalSize.height ) || 1 );
18708
18709		cursor = $( ".ui-resizable-" + this.axis ).css( "cursor" );
18710		$( "body" ).css( "cursor", cursor === "auto" ? this.axis + "-resize" : cursor );
18711
18712		this._addClass( "ui-resizable-resizing" );
18713		this._propagate( "start", event );
18714		return true;
18715	},
18716
18717	_mouseDrag: function( event ) {
18718
18719		var data, props,
18720			smp = this.originalMousePosition,
18721			a = this.axis,
18722			dx = ( event.pageX - smp.left ) || 0,
18723			dy = ( event.pageY - smp.top ) || 0,
18724			trigger = this._change[ a ];
18725
18726		this._updatePrevProperties();
18727
18728		if ( !trigger ) {
18729			return false;
18730		}
18731
18732		data = trigger.apply( this, [ event, dx, dy ] );
18733
18734		this._updateVirtualBoundaries( event.shiftKey );
18735		if ( this._aspectRatio || event.shiftKey ) {
18736			data = this._updateRatio( data, event );
18737		}
18738
18739		data = this._respectSize( data, event );
18740
18741		this._updateCache( data );
18742
18743		this._propagate( "resize", event );
18744
18745		props = this._applyChanges();
18746
18747		if ( !this._helper && this._proportionallyResizeElements.length ) {
18748			this._proportionallyResize();
18749		}
18750
18751		if ( !$.isEmptyObject( props ) ) {
18752			this._updatePrevProperties();
18753			this._trigger( "resize", event, this.ui() );
18754			this._applyChanges();
18755		}
18756
18757		return false;
18758	},
18759
18760	_mouseStop: function( event ) {
18761
18762		this.resizing = false;
18763		var pr, ista, soffseth, soffsetw, s, left, top,
18764			o = this.options, that = this;
18765
18766		if ( this._helper ) {
18767
18768			pr = this._proportionallyResizeElements;
18769			ista = pr.length && ( /textarea/i ).test( pr[ 0 ].nodeName );
18770			soffseth = ista && this._hasScroll( pr[ 0 ], "left" ) ? 0 : that.sizeDiff.height;
18771			soffsetw = ista ? 0 : that.sizeDiff.width;
18772
18773			s = {
18774				width: ( that.helper.width()  - soffsetw ),
18775				height: ( that.helper.height() - soffseth )
18776			};
18777			left = ( parseFloat( that.element.css( "left" ) ) +
18778				( that.position.left - that.originalPosition.left ) ) || null;
18779			top = ( parseFloat( that.element.css( "top" ) ) +
18780				( that.position.top - that.originalPosition.top ) ) || null;
18781
18782			if ( !o.animate ) {
18783				this.element.css( $.extend( s, { top: top, left: left } ) );
18784			}
18785
18786			that.helper.height( that.size.height );
18787			that.helper.width( that.size.width );
18788
18789			if ( this._helper && !o.animate ) {
18790				this._proportionallyResize();
18791			}
18792		}
18793
18794		$( "body" ).css( "cursor", "auto" );
18795
18796		this._removeClass( "ui-resizable-resizing" );
18797
18798		this._propagate( "stop", event );
18799
18800		if ( this._helper ) {
18801			this.helper.remove();
18802		}
18803
18804		return false;
18805
18806	},
18807
18808	_updatePrevProperties: function() {
18809		this.prevPosition = {
18810			top: this.position.top,
18811			left: this.position.left
18812		};
18813		this.prevSize = {
18814			width: this.size.width,
18815			height: this.size.height
18816		};
18817	},
18818
18819	_applyChanges: function() {
18820		var props = {};
18821
18822		if ( this.position.top !== this.prevPosition.top ) {
18823			props.top = this.position.top + "px";
18824		}
18825		if ( this.position.left !== this.prevPosition.left ) {
18826			props.left = this.position.left + "px";
18827		}
18828
18829		this.helper.css( props );
18830
18831		if ( this.size.width !== this.prevSize.width ) {
18832			props.width = this.size.width + "px";
18833			this.helper.width( props.width );
18834		}
18835		if ( this.size.height !== this.prevSize.height ) {
18836			props.height = this.size.height + "px";
18837			this.helper.height( props.height );
18838		}
18839
18840		return props;
18841	},
18842
18843	_updateVirtualBoundaries: function( forceAspectRatio ) {
18844		var pMinWidth, pMaxWidth, pMinHeight, pMaxHeight, b,
18845			o = this.options;
18846
18847		b = {
18848			minWidth: this._isNumber( o.minWidth ) ? o.minWidth : 0,
18849			maxWidth: this._isNumber( o.maxWidth ) ? o.maxWidth : Infinity,
18850			minHeight: this._isNumber( o.minHeight ) ? o.minHeight : 0,
18851			maxHeight: this._isNumber( o.maxHeight ) ? o.maxHeight : Infinity
18852		};
18853
18854		if ( this._aspectRatio || forceAspectRatio ) {
18855			pMinWidth = b.minHeight * this.aspectRatio;
18856			pMinHeight = b.minWidth / this.aspectRatio;
18857			pMaxWidth = b.maxHeight * this.aspectRatio;
18858			pMaxHeight = b.maxWidth / this.aspectRatio;
18859
18860			if ( pMinWidth > b.minWidth ) {
18861				b.minWidth = pMinWidth;
18862			}
18863			if ( pMinHeight > b.minHeight ) {
18864				b.minHeight = pMinHeight;
18865			}
18866			if ( pMaxWidth < b.maxWidth ) {
18867				b.maxWidth = pMaxWidth;
18868			}
18869			if ( pMaxHeight < b.maxHeight ) {
18870				b.maxHeight = pMaxHeight;
18871			}
18872		}
18873		this._vBoundaries = b;
18874	},
18875
18876	_updateCache: function( data ) {
18877		this.offset = this.helper.offset();
18878		if ( this._isNumber( data.left ) ) {
18879			this.position.left = data.left;
18880		}
18881		if ( this._isNumber( data.top ) ) {
18882			this.position.top = data.top;
18883		}
18884		if ( this._isNumber( data.height ) ) {
18885			this.size.height = data.height;
18886		}
18887		if ( this._isNumber( data.width ) ) {
18888			this.size.width = data.width;
18889		}
18890	},
18891
18892	_updateRatio: function( data ) {
18893
18894		var cpos = this.position,
18895			csize = this.size,
18896			a = this.axis;
18897
18898		if ( this._isNumber( data.height ) ) {
18899			data.width = ( data.height * this.aspectRatio );
18900		} else if ( this._isNumber( data.width ) ) {
18901			data.height = ( data.width / this.aspectRatio );
18902		}
18903
18904		if ( a === "sw" ) {
18905			data.left = cpos.left + ( csize.width - data.width );
18906			data.top = null;
18907		}
18908		if ( a === "nw" ) {
18909			data.top = cpos.top + ( csize.height - data.height );
18910			data.left = cpos.left + ( csize.width - data.width );
18911		}
18912
18913		return data;
18914	},
18915
18916	_respectSize: function( data ) {
18917
18918		var o = this._vBoundaries,
18919			a = this.axis,
18920			ismaxw = this._isNumber( data.width ) && o.maxWidth && ( o.maxWidth < data.width ),
18921			ismaxh = this._isNumber( data.height ) && o.maxHeight && ( o.maxHeight < data.height ),
18922			isminw = this._isNumber( data.width ) && o.minWidth && ( o.minWidth > data.width ),
18923			isminh = this._isNumber( data.height ) && o.minHeight && ( o.minHeight > data.height ),
18924			dw = this.originalPosition.left + this.originalSize.width,
18925			dh = this.originalPosition.top + this.originalSize.height,
18926			cw = /sw|nw|w/.test( a ), ch = /nw|ne|n/.test( a );
18927		if ( isminw ) {
18928			data.width = o.minWidth;
18929		}
18930		if ( isminh ) {
18931			data.height = o.minHeight;
18932		}
18933		if ( ismaxw ) {
18934			data.width = o.maxWidth;
18935		}
18936		if ( ismaxh ) {
18937			data.height = o.maxHeight;
18938		}
18939
18940		if ( isminw && cw ) {
18941			data.left = dw - o.minWidth;
18942		}
18943		if ( ismaxw && cw ) {
18944			data.left = dw - o.maxWidth;
18945		}
18946		if ( isminh && ch ) {
18947			data.top = dh - o.minHeight;
18948		}
18949		if ( ismaxh && ch ) {
18950			data.top = dh - o.maxHeight;
18951		}
18952
18953		// Fixing jump error on top/left - bug #2330
18954		if ( !data.width && !data.height && !data.left && data.top ) {
18955			data.top = null;
18956		} else if ( !data.width && !data.height && !data.top && data.left ) {
18957			data.left = null;
18958		}
18959
18960		return data;
18961	},
18962
18963	_getPaddingPlusBorderDimensions: function( element ) {
18964		var i = 0,
18965			widths = [],
18966			borders = [
18967				element.css( "borderTopWidth" ),
18968				element.css( "borderRightWidth" ),
18969				element.css( "borderBottomWidth" ),
18970				element.css( "borderLeftWidth" )
18971			],
18972			paddings = [
18973				element.css( "paddingTop" ),
18974				element.css( "paddingRight" ),
18975				element.css( "paddingBottom" ),
18976				element.css( "paddingLeft" )
18977			];
18978
18979		for ( ; i < 4; i++ ) {
18980			widths[ i ] = ( parseFloat( borders[ i ] ) || 0 );
18981			widths[ i ] += ( parseFloat( paddings[ i ] ) || 0 );
18982		}
18983
18984		return {
18985			height: widths[ 0 ] + widths[ 2 ],
18986			width: widths[ 1 ] + widths[ 3 ]
18987		};
18988	},
18989
18990	_proportionallyResize: function() {
18991
18992		if ( !this._proportionallyResizeElements.length ) {
18993			return;
18994		}
18995
18996		var prel,
18997			i = 0,
18998			element = this.helper || this.element;
18999
19000		for ( ; i < this._proportionallyResizeElements.length; i++ ) {
19001
19002			prel = this._proportionallyResizeElements[ i ];
19003
19004			// TODO: Seems like a bug to cache this.outerDimensions
19005			// considering that we are in a loop.
19006			if ( !this.outerDimensions ) {
19007				this.outerDimensions = this._getPaddingPlusBorderDimensions( prel );
19008			}
19009
19010			prel.css( {
19011				height: ( element.height() - this.outerDimensions.height ) || 0,
19012				width: ( element.width() - this.outerDimensions.width ) || 0
19013			} );
19014
19015		}
19016
19017	},
19018
19019	_renderProxy: function() {
19020
19021		var el = this.element, o = this.options;
19022		this.elementOffset = el.offset();
19023
19024		if ( this._helper ) {
19025
19026			this.helper = this.helper || $( "<div></div>" ).css( { overflow: "hidden" } );
19027
19028			this._addClass( this.helper, this._helper );
19029			this.helper.css( {
19030				width: this.element.outerWidth(),
19031				height: this.element.outerHeight(),
19032				position: "absolute",
19033				left: this.elementOffset.left + "px",
19034				top: this.elementOffset.top + "px",
19035				zIndex: ++o.zIndex //TODO: Don't modify option
19036			} );
19037
19038			this.helper
19039				.appendTo( "body" )
19040				.disableSelection();
19041
19042		} else {
19043			this.helper = this.element;
19044		}
19045
19046	},
19047
19048	_change: {
19049		e: function( event, dx ) {
19050			return { width: this.originalSize.width + dx };
19051		},
19052		w: function( event, dx ) {
19053			var cs = this.originalSize, sp = this.originalPosition;
19054			return { left: sp.left + dx, width: cs.width - dx };
19055		},
19056		n: function( event, dx, dy ) {
19057			var cs = this.originalSize, sp = this.originalPosition;
19058			return { top: sp.top + dy, height: cs.height - dy };
19059		},
19060		s: function( event, dx, dy ) {
19061			return { height: this.originalSize.height + dy };
19062		},
19063		se: function( event, dx, dy ) {
19064			return $.extend( this._change.s.apply( this, arguments ),
19065				this._change.e.apply( this, [ event, dx, dy ] ) );
19066		},
19067		sw: function( event, dx, dy ) {
19068			return $.extend( this._change.s.apply( this, arguments ),
19069				this._change.w.apply( this, [ event, dx, dy ] ) );
19070		},
19071		ne: function( event, dx, dy ) {
19072			return $.extend( this._change.n.apply( this, arguments ),
19073				this._change.e.apply( this, [ event, dx, dy ] ) );
19074		},
19075		nw: function( event, dx, dy ) {
19076			return $.extend( this._change.n.apply( this, arguments ),
19077				this._change.w.apply( this, [ event, dx, dy ] ) );
19078		}
19079	},
19080
19081	_propagate: function( n, event ) {
19082		$.ui.plugin.call( this, n, [ event, this.ui() ] );
19083		if ( n !== "resize" ) {
19084			this._trigger( n, event, this.ui() );
19085		}
19086	},
19087
19088	plugins: {},
19089
19090	ui: function() {
19091		return {
19092			originalElement: this.originalElement,
19093			element: this.element,
19094			helper: this.helper,
19095			position: this.position,
19096			size: this.size,
19097			originalSize: this.originalSize,
19098			originalPosition: this.originalPosition
19099		};
19100	}
19101
19102} );
19103
19104/*
19105 * Resizable Extensions
19106 */
19107
19108$.ui.plugin.add( "resizable", "animate", {
19109
19110	stop: function( event ) {
19111		var that = $( this ).resizable( "instance" ),
19112			o = that.options,
19113			pr = that._proportionallyResizeElements,
19114			ista = pr.length && ( /textarea/i ).test( pr[ 0 ].nodeName ),
19115			soffseth = ista && that._hasScroll( pr[ 0 ], "left" ) ? 0 : that.sizeDiff.height,
19116			soffsetw = ista ? 0 : that.sizeDiff.width,
19117			style = {
19118				width: ( that.size.width - soffsetw ),
19119				height: ( that.size.height - soffseth )
19120			},
19121			left = ( parseFloat( that.element.css( "left" ) ) +
19122				( that.position.left - that.originalPosition.left ) ) || null,
19123			top = ( parseFloat( that.element.css( "top" ) ) +
19124				( that.position.top - that.originalPosition.top ) ) || null;
19125
19126		that.element.animate(
19127			$.extend( style, top && left ? { top: top, left: left } : {} ), {
19128				duration: o.animateDuration,
19129				easing: o.animateEasing,
19130				step: function() {
19131
19132					var data = {
19133						width: parseFloat( that.element.css( "width" ) ),
19134						height: parseFloat( that.element.css( "height" ) ),
19135						top: parseFloat( that.element.css( "top" ) ),
19136						left: parseFloat( that.element.css( "left" ) )
19137					};
19138
19139					if ( pr && pr.length ) {
19140						$( pr[ 0 ] ).css( { width: data.width, height: data.height } );
19141					}
19142
19143					// Propagating resize, and updating values for each animation step
19144					that._updateCache( data );
19145					that._propagate( "resize", event );
19146
19147				}
19148			}
19149		);
19150	}
19151
19152} );
19153
19154$.ui.plugin.add( "resizable", "containment", {
19155
19156	start: function() {
19157		var element, p, co, ch, cw, width, height,
19158			that = $( this ).resizable( "instance" ),
19159			o = that.options,
19160			el = that.element,
19161			oc = o.containment,
19162			ce = ( oc instanceof $ ) ?
19163				oc.get( 0 ) :
19164				( /parent/.test( oc ) ) ? el.parent().get( 0 ) : oc;
19165
19166		if ( !ce ) {
19167			return;
19168		}
19169
19170		that.containerElement = $( ce );
19171
19172		if ( /document/.test( oc ) || oc === document ) {
19173			that.containerOffset = {
19174				left: 0,
19175				top: 0
19176			};
19177			that.containerPosition = {
19178				left: 0,
19179				top: 0
19180			};
19181
19182			that.parentData = {
19183				element: $( document ),
19184				left: 0,
19185				top: 0,
19186				width: $( document ).width(),
19187				height: $( document ).height() || document.body.parentNode.scrollHeight
19188			};
19189		} else {
19190			element = $( ce );
19191			p = [];
19192			$( [ "Top", "Right", "Left", "Bottom" ] ).each( function( i, name ) {
19193				p[ i ] = that._num( element.css( "padding" + name ) );
19194			} );
19195
19196			that.containerOffset = element.offset();
19197			that.containerPosition = element.position();
19198			that.containerSize = {
19199				height: ( element.innerHeight() - p[ 3 ] ),
19200				width: ( element.innerWidth() - p[ 1 ] )
19201			};
19202
19203			co = that.containerOffset;
19204			ch = that.containerSize.height;
19205			cw = that.containerSize.width;
19206			width = ( that._hasScroll( ce, "left" ) ? ce.scrollWidth : cw );
19207			height = ( that._hasScroll( ce ) ? ce.scrollHeight : ch );
19208
19209			that.parentData = {
19210				element: ce,
19211				left: co.left,
19212				top: co.top,
19213				width: width,
19214				height: height
19215			};
19216		}
19217	},
19218
19219	resize: function( event ) {
19220		var woset, hoset, isParent, isOffsetRelative,
19221			that = $( this ).resizable( "instance" ),
19222			o = that.options,
19223			co = that.containerOffset,
19224			cp = that.position,
19225			pRatio = that._aspectRatio || event.shiftKey,
19226			cop = {
19227				top: 0,
19228				left: 0
19229			},
19230			ce = that.containerElement,
19231			continueResize = true;
19232
19233		if ( ce[ 0 ] !== document && ( /static/ ).test( ce.css( "position" ) ) ) {
19234			cop = co;
19235		}
19236
19237		if ( cp.left < ( that._helper ? co.left : 0 ) ) {
19238			that.size.width = that.size.width +
19239				( that._helper ?
19240					( that.position.left - co.left ) :
19241					( that.position.left - cop.left ) );
19242
19243			if ( pRatio ) {
19244				that.size.height = that.size.width / that.aspectRatio;
19245				continueResize = false;
19246			}
19247			that.position.left = o.helper ? co.left : 0;
19248		}
19249
19250		if ( cp.top < ( that._helper ? co.top : 0 ) ) {
19251			that.size.height = that.size.height +
19252				( that._helper ?
19253					( that.position.top - co.top ) :
19254					that.position.top );
19255
19256			if ( pRatio ) {
19257				that.size.width = that.size.height * that.aspectRatio;
19258				continueResize = false;
19259			}
19260			that.position.top = that._helper ? co.top : 0;
19261		}
19262
19263		isParent = that.containerElement.get( 0 ) === that.element.parent().get( 0 );
19264		isOffsetRelative = /relative|absolute/.test( that.containerElement.css( "position" ) );
19265
19266		if ( isParent && isOffsetRelative ) {
19267			that.offset.left = that.parentData.left + that.position.left;
19268			that.offset.top = that.parentData.top + that.position.top;
19269		} else {
19270			that.offset.left = that.element.offset().left;
19271			that.offset.top = that.element.offset().top;
19272		}
19273
19274		woset = Math.abs( that.sizeDiff.width +
19275			( that._helper ?
19276				that.offset.left - cop.left :
19277				( that.offset.left - co.left ) ) );
19278
19279		hoset = Math.abs( that.sizeDiff.height +
19280			( that._helper ?
19281				that.offset.top - cop.top :
19282				( that.offset.top - co.top ) ) );
19283
19284		if ( woset + that.size.width >= that.parentData.width ) {
19285			that.size.width = that.parentData.width - woset;
19286			if ( pRatio ) {
19287				that.size.height = that.size.width / that.aspectRatio;
19288				continueResize = false;
19289			}
19290		}
19291
19292		if ( hoset + that.size.height >= that.parentData.height ) {
19293			that.size.height = that.parentData.height - hoset;
19294			if ( pRatio ) {
19295				that.size.width = that.size.height * that.aspectRatio;
19296				continueResize = false;
19297			}
19298		}
19299
19300		if ( !continueResize ) {
19301			that.position.left = that.prevPosition.left;
19302			that.position.top = that.prevPosition.top;
19303			that.size.width = that.prevSize.width;
19304			that.size.height = that.prevSize.height;
19305		}
19306	},
19307
19308	stop: function() {
19309		var that = $( this ).resizable( "instance" ),
19310			o = that.options,
19311			co = that.containerOffset,
19312			cop = that.containerPosition,
19313			ce = that.containerElement,
19314			helper = $( that.helper ),
19315			ho = helper.offset(),
19316			w = helper.outerWidth() - that.sizeDiff.width,
19317			h = helper.outerHeight() - that.sizeDiff.height;
19318
19319		if ( that._helper && !o.animate && ( /relative/ ).test( ce.css( "position" ) ) ) {
19320			$( this ).css( {
19321				left: ho.left - cop.left - co.left,
19322				width: w,
19323				height: h
19324			} );
19325		}
19326
19327		if ( that._helper && !o.animate && ( /static/ ).test( ce.css( "position" ) ) ) {
19328			$( this ).css( {
19329				left: ho.left - cop.left - co.left,
19330				width: w,
19331				height: h
19332			} );
19333		}
19334	}
19335} );
19336
19337$.ui.plugin.add( "resizable", "alsoResize", {
19338
19339	start: function() {
19340		var that = $( this ).resizable( "instance" ),
19341			o = that.options;
19342
19343		$( o.alsoResize ).each( function() {
19344			var el = $( this );
19345			el.data( "ui-resizable-alsoresize", {
19346				width: parseFloat( el.css( "width" ) ), height: parseFloat( el.css( "height" ) ),
19347				left: parseFloat( el.css( "left" ) ), top: parseFloat( el.css( "top" ) )
19348			} );
19349		} );
19350	},
19351
19352	resize: function( event, ui ) {
19353		var that = $( this ).resizable( "instance" ),
19354			o = that.options,
19355			os = that.originalSize,
19356			op = that.originalPosition,
19357			delta = {
19358				height: ( that.size.height - os.height ) || 0,
19359				width: ( that.size.width - os.width ) || 0,
19360				top: ( that.position.top - op.top ) || 0,
19361				left: ( that.position.left - op.left ) || 0
19362			};
19363
19364			$( o.alsoResize ).each( function() {
19365				var el = $( this ), start = $( this ).data( "ui-resizable-alsoresize" ), style = {},
19366					css = el.parents( ui.originalElement[ 0 ] ).length ?
19367							[ "width", "height" ] :
19368							[ "width", "height", "top", "left" ];
19369
19370				$.each( css, function( i, prop ) {
19371					var sum = ( start[ prop ] || 0 ) + ( delta[ prop ] || 0 );
19372					if ( sum && sum >= 0 ) {
19373						style[ prop ] = sum || null;
19374					}
19375				} );
19376
19377				el.css( style );
19378			} );
19379	},
19380
19381	stop: function() {
19382		$( this ).removeData( "ui-resizable-alsoresize" );
19383	}
19384} );
19385
19386$.ui.plugin.add( "resizable", "ghost", {
19387
19388	start: function() {
19389
19390		var that = $( this ).resizable( "instance" ), cs = that.size;
19391
19392		that.ghost = that.originalElement.clone();
19393		that.ghost.css( {
19394			opacity: 0.25,
19395			display: "block",
19396			position: "relative",
19397			height: cs.height,
19398			width: cs.width,
19399			margin: 0,
19400			left: 0,
19401			top: 0
19402		} );
19403
19404		that._addClass( that.ghost, "ui-resizable-ghost" );
19405
19406		// DEPRECATED
19407		// TODO: remove after 1.12
19408		if ( $.uiBackCompat 
19408=== true && typeof that.options.ghost === "string" ) {
19409
19410			// Ghost option
19411			that.ghost.addClass( this.options.ghost );
19412		}
19413
19414		that.ghost.appendTo( that.helper );
19415
19416	},
19417
19418	resize: function() {
19419		var that = $( this ).resizable( "instance" );
19420		if ( that.ghost ) {
19421			that.ghost.css( {
19422				position: "relative",
19423				height: that.size.height,
vendor: 3,562 bytes, lines 19424-19570
19424				width: that.size.width
19425			} );
19426		}
19427	},
19428
19429	stop: function() {
19430		var that = $( this ).resizable( "instance" );
19431		if ( that.ghost && that.helper ) {
19432			that.helper.get( 0 ).removeChild( that.ghost.get( 0 ) );
19433		}
19434	}
19435
19436} );
19437
19438$.ui.plugin.add( "resizable", "grid", {
19439
19440	resize: function() {
19441		var outerDimensions,
19442			that = $( this ).resizable( "instance" ),
19443			o = that.options,
19444			cs = that.size,
19445			os = that.originalSize,
19446			op = that.originalPosition,
19447			a = that.axis,
19448			grid = typeof o.grid === "number" ? [ o.grid, o.grid ] : o.grid,
19449			gridX = ( grid[ 0 ] || 1 ),
19450			gridY = ( grid[ 1 ] || 1 ),
19451			ox = Math.round( ( cs.width - os.width ) / gridX ) * gridX,
19452			oy = Math.round( ( cs.height - os.height ) / gridY ) * gridY,
19453			newWidth = os.width + ox,
19454			newHeight = os.height + oy,
19455			isMaxWidth = o.maxWidth && ( o.maxWidth < newWidth ),
19456			isMaxHeight = o.maxHeight && ( o.maxHeight < newHeight ),
19457			isMinWidth = o.minWidth && ( o.minWidth > newWidth ),
19458			isMinHeight = o.minHeight && ( o.minHeight > newHeight );
19459
19460		o.grid = grid;
19461
19462		if ( isMinWidth ) {
19463			newWidth += gridX;
19464		}
19465		if ( isMinHeight ) {
19466			newHeight += gridY;
19467		}
19468		if ( isMaxWidth ) {
19469			newWidth -= gridX;
19470		}
19471		if ( isMaxHeight ) {
19472			newHeight -= gridY;
19473		}
19474
19475		if ( /^(se|s|e)$/.test( a ) ) {
19476			that.size.width = newWidth;
19477			that.size.height = newHeight;
19478		} else if ( /^(ne)$/.test( a ) ) {
19479			that.size.width = newWidth;
19480			that.size.height = newHeight;
19481			that.position.top = op.top - oy;
19482		} else if ( /^(sw)$/.test( a ) ) {
19483			that.size.width = newWidth;
19484			that.size.height = newHeight;
19485			that.position.left = op.left - ox;
19486		} else {
19487			if ( newHeight - gridY <= 0 || newWidth - gridX <= 0 ) {
19488				outerDimensions = that._getPaddingPlusBorderDimensions( this );
19489			}
19490
19491			if ( newHeight - gridY > 0 ) {
19492				that.size.height = newHeight;
19493				that.position.top = op.top - oy;
19494			} else {
19495				newHeight = gridY - outerDimensions.height;
19496				that.size.height = newHeight;
19497				that.position.top = op.top + os.height - newHeight;
19498			}
19499			if ( newWidth - gridX > 0 ) {
19500				that.size.width = newWidth;
19501				that.position.left = op.left - ox;
19502			} else {
19503				newWidth = gridX - outerDimensions.width;
19504				that.size.width = newWidth;
19505				that.position.left = op.left + os.width - newWidth;
19506			}
19507		}
19508	}
19509
19510} );
19511
19512var widgetsResizable = $.ui.resizable;
19513
19514
19515/*!
19516 * jQuery UI Dialog 1.14.0
19517 * https://jqueryui.com
19518 *
19519 * Copyright OpenJS Foundation and other contributors
19520 * Released under the MIT license.
19521 * https://jquery.org/license
19522 */
19523
19524//>>label: Dialog
19525//>>group: Widgets
19526//>>description: Displays customizable dialog windows.
19527//>>docs: https://api.jqueryui.com/dialog/
19528//>>demos: https://jqueryui.com/dialog/
19529//>>css.structure: ../../themes/base/core.css
19530//>>css.structure: ../../themes/base/dialog.css
19531//>>css.theme: ../../themes/base/theme.css
19532
19533
19534$.widget( "ui.dialog", {
19535	version: "1.14.0",
19536	options: {
19537		appendTo: "body",
19538		autoOpen: true,
19539		buttons: [],
19540		classes: {
19541			"ui-dialog": "ui-corner-all",
19542			"ui-dialog-titlebar": "ui-corner-all"
19543		},
19544		closeOnEscape: true,
19545		closeText: "Close",
19546		draggable: true,
19547		hide: null,
19548		height: "auto",
19549		maxHeight: null,
19550		maxWidth: null,
19551		minHeight: 150,
19552		minWidth: 150,
19553		modal: false,
19554		position: {
19555			my: "center",
19556			at: "center",
19557			of: window,
19558			collision: "fit",
19559
19560			// Ensure the titlebar is always visible
19561			using: function( pos ) {
19562				var topOffset = $( this ).css( pos ).offset().top;
19563				if ( topOffset < 0 ) {
19564					$( this ).css( "top", pos.top - topOffset );
19565				}
19566			}
19567		},
19568		resizable: true,
19569		show: null,
19570		title: null
vendor: 8,955 bytes, lines 19570-19927
19570,
19571		width: 300,
19572
19573		// Callbacks
19574		beforeClose: null,
19575		close: null,
19576		drag: null,
19577		dragStart: null,
19578		dragStop: null,
19579		focus: null,
19580		open: null,
19581		resize: null,
19582		resizeStart: null,
19583		resizeStop: null
19584	},
19585
19586	sizeRelatedOptions: {
19587		buttons: true,
19588		height: true,
19589		maxHeight: true,
19590		maxWidth: true,
19591		minHeight: true,
19592		minWidth: true,
19593		width: true
19594	},
19595
19596	resizableRelatedOptions: {
19597		maxHeight: true,
19598		maxWidth: true,
19599		minHeight: true,
19600		minWidth: true
19601	},
19602
19603	_create: function() {
19604		this.originalCss = {
19605			display: this.element[ 0 ].style.display,
19606			width: this.element[ 0 ].style.width,
19607			minHeight: this.element[ 0 ].style.minHeight,
19608			maxHeight: this.element[ 0 ].style.maxHeight,
19609			height: this.element[ 0 ].style.height
19610		};
19611		this.originalPosition = {
19612			parent: this.element.parent(),
19613			index: this.element.parent().children().index( this.element )
19614		};
19615		this.originalTitle = this.element.attr( "title" );
19616		if ( this.options.title == null && this.originalTitle != null ) {
19617			this.options.title = this.originalTitle;
19618		}
19619
19620		// Dialogs can't be disabled
19621		if ( this.options.disabled ) {
19622			this.options.disabled = false;
19623		}
19624
19625		this._createWrapper();
19626
19627		this.element
19628			.show()
19629			.removeAttr( "title" )
19630			.appendTo( this.uiDialog );
19631
19632		this._addClass( "ui-dialog-content", "ui-widget-content" );
19633
19634		this._createTitlebar();
19635		this._createButtonPane();
19636
19637		if ( this.options.draggable && $.fn.draggable ) {
19638			this._makeDraggable();
19639		}
19640		if ( this.options.resizable && $.fn.resizable ) {
19641			this._makeResizable();
19642		}
19643
19644		this._isOpen = false;
19645
19646		this._trackFocus();
19647	},
19648
19649	_init: function() {
19650		if ( this.options.autoOpen ) {
19651			this.open();
19652		}
19653	},
19654
19655	_appendTo: function() {
19656		var element = this.options.appendTo;
19657		if ( element && ( element.jquery || element.nodeType ) ) {
19658			return $( element );
19659		}
19660		return this.document.find( element || "body" ).eq( 0 );
19661	},
19662
19663	_destroy: function() {
19664		var next,
19665			originalPosition = this.originalPosition;
19666
19667		this._untrackInstance();
19668		this._destroyOverlay();
19669
19670		this.element
19671			.removeUniqueId()
19672			.css( this.originalCss )
19673
19674			// Without detaching first, the following becomes really slow
19675			.detach();
19676
19677		this.uiDialog.remove();
19678
19679		if ( this.originalTitle ) {
19680			this.element.attr( "title", this.originalTitle );
19681		}
19682
19683		next = originalPosition.parent.children().eq( originalPosition.index );
19684
19685		// Don't try to place the dialog next to itself (#8613)
19686		if ( next.length && next[ 0 ] !== this.element[ 0 ] ) {
19687			next.before( this.element );
19688		} else {
19689			originalPosition.parent.append( this.element );
19690		}
19691	},
19692
19693	widget: function() {
19694		return this.uiDialog;
19695	},
19696
19697	disable: $.noop,
19698	enable: $.noop,
19699
19700	close: function( event ) {
19701		var that = this;
19702
19703		if ( !this._isOpen || this._trigger( "beforeClose", event ) === false ) {
19704			return;
19705		}
19706
19707		this._isOpen = false;
19708		this._focusedElement = null;
19709		this._destroyOverlay();
19710		this._untrackInstance();
19711
19712		if ( !this.opener.filter( ":focusable" ).trigger( "focus" ).length ) {
19713
19714			// Hiding a focused element doesn't trigger blur in WebKit
19715			// so in case we have nothing to focus on, explicitly blur the active element
19716			// https://bugs.webkit.org/show_bug.cgi?id=47182
19717			$( this.document[ 0 ].activeElement ).trigger( "blur" );
19718		}
19719
19720		this._hide( this.uiDialog, this.options.hide, function() {
19721			that._trigger( "close", event );
19722		} );
19723	},
19724
19725	isOpen: function() {
19726		return this._isOpen;
19727	},
19728
19729	moveToTop: function() {
19730		this._moveToTop();
19731	},
19732
19733	_moveToTop: function( event, silent ) {
19734		var moved = false,
19735			zIndices = this.uiDialog.siblings( ".ui-front:visible" ).map( function() {
19736				return +$( this ).css( "z-index" );
19737			} ).get(),
19738			zIndexMax = Math.max.apply( null, zIndices );
19739
19740		if ( zIndexMax >= +this.uiDialog.css( "z-index" ) ) {
19741			this.uiDialog.css( "z-index", zIndexMax + 1 );
19742			moved = true;
19743		}
19744
19745		if ( moved && !silent ) {
19746			this._trigger( "focus", event );
19747		}
19748		return moved;
19749	},
19750
19751	open: function() {
19752		var that = this;
19753		if ( this._isOpen ) {
19754			if ( this._moveToTop() ) {
19755				this._focusTabbable();
19756			}
19757			return;
19758		}
19759
19760		this._isOpen = true;
19761		this.opener = $( this.document[ 0 ].activeElement );
19762
19763		this._size();
19764		this._position();
19765		this._createOverlay();
19766		this._moveToTop( null, true );
19767
19768		// Ensure the overlay is moved to the top with the dialog, but only when
19769		// opening. The overlay shouldn't move after the dialog is open so that
19770		// modeless dialogs opened after the modal dialog stack properly.
19771		if ( this.overlay ) {
19772			this.overlay.css( "z-index", this.uiDialog.css( "z-index" ) - 1 );
19773		}
19774
19775		this._show( this.uiDialog, this.options.show, function() {
19776			that._focusTabbable();
19777			that._trigger( "focus" );
19778		} );
19779
19780		// Track the dialog immediately upon opening in case a focus event
19781		// somehow occurs outside of the dialog before an element inside the
19782		// dialog is focused (#10152)
19783		this._makeFocusTarget();
19784
19785		this._trigger( "open" );
19786	},
19787
19788	_focusTabbable: function() {
19789
19790		// Set focus to the first match:
19791		// 1. An element that was focused previously
19792		// 2. First element inside the dialog matching [autofocus]
19793		// 3. Tabbable element inside the content element
19794		// 4. Tabbable element inside the buttonpane
19795		// 5. The close button
19796		// 6. The dialog itself
19797		var hasFocus = this._focusedElement;
19798		if ( !hasFocus ) {
19799			hasFocus = this.element.find( "[autofocus]" );
19800		}
19801		if ( !hasFocus.length ) {
19802			hasFocus = this.element.find( ":tabbable" );
19803		}
19804		if ( !hasFocus.length ) {
19805			hasFocus = this.uiDialogButtonPane.find( ":tabbable" );
19806		}
19807		if ( !hasFocus.length ) {
19808			hasFocus = this.uiDialogTitlebarClose.filter( ":tabbable" );
19809		}
19810		if ( !hasFocus.length ) {
19811			hasFocus = this.uiDialog;
19812		}
19813		hasFocus.eq( 0 ).trigger( "focus" );
19814	},
19815
19816	_restoreTabbableFocus: function() {
19817		var activeElement = this.document[ 0 ].activeElement,
19818			isActive = this.uiDialog[ 0 ] === activeElement ||
19819				$.contains( this.uiDialog[ 0 ], activeElement );
19820		if ( !isActive ) {
19821			this._focusTabbable();
19822		}
19823	},
19824
19825	_keepFocus: function( event ) {
19826		event.preventDefault();
19827		this._restoreTabbableFocus();
19828	},
19829
19830	_createWrapper: function() {
19831		this.uiDialog = $( "<div>" )
19832			.hide()
19833			.attr( {
19834
19835				// Setting tabIndex makes the div focusable
19836				tabIndex: -1,
19837				role: "dialog",
19838				"aria-modal": this.options.modal ? "true" : null
19839			} )
19840			.appendTo( this._appendTo() );
19841
19842		this._addClass( this.uiDialog, "ui-dialog", "ui-widget ui-widget-content ui-front" );
19843		this._on( this.uiDialog, {
19844			keydown: function( event ) {
19845				if ( this.options.closeOnEscape && !event.isDefaultPrevented() && event.keyCode &&
19846						event.keyCode === $.ui.keyCode.ESCAPE ) {
19847					event.preventDefault();
19848					this.close( event );
19849					return;
19850				}
19851
19852				// Prevent tabbing out of dialogs
19853				if ( event.keyCode !== $.ui.keyCode.TAB || event.isDefaultPrevented() ) {
19854					return;
19855				}
19856				var tabbables = this.uiDialog.find( ":tabbable" ),
19857					first = tabbables.first(),
19858					last = tabbables.last();
19859
19860				if ( ( event.target === last[ 0 ] || event.target === this.uiDialog[ 0 ] ) &&
19861						!event.shiftKey ) {
19862					this._delay( function() {
19863						first.trigger( "focus" );
19864					} );
19865					event.preventDefault();
19866				} else if ( ( event.target === first[ 0 ] ||
19867						event.target === this.uiDialog[ 0 ] ) && event.shiftKey ) {
19868					this._delay( function() {
19869						last.trigger( "focus" );
19870					} );
19871					event.preventDefault();
19872				}
19873			},
19874			mousedown: function( event ) {
19875				if ( this._moveToTop( event ) ) {
19876					this._focusTabbable();
19877				}
19878			}
19879		} );
19880
19881		// We assume that any existing aria-describedby attribute means
19882		// that the dialog content is marked up properly
19883		// otherwise we brute force the content as the description
19884		if ( !this.element.find( "[aria-describedby]" ).length ) {
19885			this.uiDialog.attr( {
19886				"aria-describedby": this.element.uniqueId().attr( "id" )
19887			} );
19888		}
19889	},
19890
19891	_createTitlebar: function() {
19892		var uiDialogTitle;
19893
19894		this.uiDialogTitlebar = $( "<div>" );
19895		this._addClass( this.uiDialogTitlebar,
19896			"ui-dialog-titlebar", "ui-widget-header ui-helper-clearfix" );
19897		this._on( this.uiDialogTitlebar, {
19898			mousedown: function( event ) {
19899
19900				// Don't prevent click on close button (#8838)
19901				// Focusing a dialog that is partially scrolled out of view
19902				// causes the browser to scroll it into view, preventing the click event
19903				if ( !$( event.target ).closest( ".ui-dialog-titlebar-close" ) ) {
19904
19905					// Dialog isn't getting focus when dragging (#8063)
19906					this.uiDialog.trigger( "focus" );
19907				}
19908			}
19909		} );
19910
19911		this.uiDialogTitlebarClose = $( "<button type='button'></button>" )
19912			.button( {
19913				label: $( "<a>" ).text( this.options.closeText ).html(),
19914				icon: "ui-icon-closethick",
19915				showLabel: false
19916			} )
19917			.appendTo( this.uiDialogTitlebar );
19918
19919		this._addClass( this.uiDialogTitlebarClose, "ui-dialog-titlebar-close" );
19920		this._on( this.uiDialogTitlebarClose, {
19921			click: function( event ) {
19922				event.preventDefault();
19923				this.close( event );
19924			}
19925		} );
19926
19927		
vendor: 12,822 bytes, lines 19927-20443
19927uiDialogTitle = $( "<span>" ).uniqueId().prependTo( this.uiDialogTitlebar );
19928		this._addClass( uiDialogTitle, "ui-dialog-title" );
19929		this._title( uiDialogTitle );
19930
19931		this.uiDialogTitlebar.prependTo( this.uiDialog );
19932
19933		this.uiDialog.attr( {
19934			"aria-labelledby": uiDialogTitle.attr( "id" )
19935		} );
19936	},
19937
19938	_title: function( title ) {
19939		if ( this.options.title ) {
19940			title.text( this.options.title );
19941		} else {
19942			title.html( "&#160;" );
19943		}
19944	},
19945
19946	_createButtonPane: function() {
19947		this.uiDialogButtonPane = $( "<div>" );
19948		this._addClass( this.uiDialogButtonPane, "ui-dialog-buttonpane",
19949			"ui-widget-content ui-helper-clearfix" );
19950
19951		this.uiButtonSet = $( "<div>" )
19952			.appendTo( this.uiDialogButtonPane );
19953		this._addClass( this.uiButtonSet, "ui-dialog-buttonset" );
19954
19955		this._createButtons();
19956	},
19957
19958	_createButtons: function() {
19959		var that = this,
19960			buttons = this.options.buttons;
19961
19962		// If we already have a button pane, remove it
19963		this.uiDialogButtonPane.remove();
19964		this.uiButtonSet.empty();
19965
19966		if ( $.isEmptyObject( buttons ) || ( Array.isArray( buttons ) && !buttons.length ) ) {
19967			this._removeClass( this.uiDialog, "ui-dialog-buttons" );
19968			return;
19969		}
19970
19971		$.each( buttons, function( name, props ) {
19972			var click, buttonOptions;
19973			props = typeof props === "function" ?
19974				{ click: props, text: name } :
19975				props;
19976
19977			// Default to a non-submitting button
19978			props = $.extend( { type: "button" }, props );
19979
19980			// Change the context for the click callback to be the main element
19981			click = props.click;
19982			buttonOptions = {
19983				icon: props.icon,
19984				iconPosition: props.iconPosition,
19985				showLabel: props.showLabel,
19986
19987				// Deprecated options
19988				icons: props.icons,
19989				text: props.text
19990			};
19991
19992			delete props.click;
19993			delete props.icon;
19994			delete props.iconPosition;
19995			delete props.showLabel;
19996
19997			// Deprecated options
19998			delete props.icons;
19999			if ( typeof props.text === "boolean" ) {
20000				delete props.text;
20001			}
20002
20003			$( "<button></button>", props )
20004				.button( buttonOptions )
20005				.appendTo( that.uiButtonSet )
20006				.on( "click", function() {
20007					click.apply( that.element[ 0 ], arguments );
20008				} );
20009		} );
20010		this._addClass( this.uiDialog, "ui-dialog-buttons" );
20011		this.uiDialogButtonPane.appendTo( this.uiDialog );
20012	},
20013
20014	_makeDraggable: function() {
20015		var that = this,
20016			options = this.options;
20017
20018		function filteredUi( ui ) {
20019			return {
20020				position: ui.position,
20021				offset: ui.offset
20022			};
20023		}
20024
20025		this.uiDialog.draggable( {
20026			cancel: ".ui-dialog-content, .ui-dialog-titlebar-close",
20027			handle: ".ui-dialog-titlebar",
20028			containment: "document",
20029			start: function( event, ui ) {
20030				that._addClass( $( this ), "ui-dialog-dragging" );
20031				that._blockFrames();
20032				that._trigger( "dragStart", event, filteredUi( ui ) );
20033			},
20034			drag: function( event, ui ) {
20035				that._trigger( "drag", event, filteredUi( ui ) );
20036			},
20037			stop: function( event, ui ) {
20038				var left = ui.offset.left - that.document.scrollLeft(),
20039					top = ui.offset.top - that.document.scrollTop();
20040
20041				options.position = {
20042					my: "left top",
20043					at: "left" + ( left >= 0 ? "+" : "" ) + left + " " +
20044						"top" + ( top >= 0 ? "+" : "" ) + top,
20045					of: that.window
20046				};
20047				that._removeClass( $( this ), "ui-dialog-dragging" );
20048				that._unblockFrames();
20049				that._trigger( "dragStop", event, filteredUi( ui ) );
20050			}
20051		} );
20052	},
20053
20054	_makeResizable: function() {
20055		var that = this,
20056			options = this.options,
20057			handles = options.resizable,
20058
20059			// .ui-resizable has position: relative defined in the stylesheet
20060			// but dialogs have to use absolute or fixed positioning
20061			position = this.uiDialog.css( "position" ),
20062			resizeHandles = typeof handles === "string" ?
20063				handles :
20064				"n,e,s,w,se,sw,ne,nw";
20065
20066		function filteredUi( ui ) {
20067			return {
20068				originalPosition: ui.originalPosition,
20069				originalSize: ui.originalSize,
20070				position: ui.position,
20071				size: ui.size
20072			};
20073		}
20074
20075		this.uiDialog.resizable( {
20076			cancel: ".ui-dialog-content",
20077			containment: "document",
20078			alsoResize: this.element,
20079			maxWidth: options.maxWidth,
20080			maxHeight: options.maxHeight,
20081			minWidth: options.minWidth,
20082			minHeight: this._minHeight(),
20083			handles: resizeHandles,
20084			start: function( event, ui ) {
20085				that._addClass( $( this ), "ui-dialog-resizing" );
20086				that._blockFrames();
20087				that._trigger( "resizeStart", event, filteredUi( ui ) );
20088			},
20089			resize: function( event, ui ) {
20090				that._trigger( "resize", event, filteredUi( ui ) );
20091			},
20092			stop: function( event, ui ) {
20093				var offset = that.uiDialog.offset(),
20094					left = offset.left - that.document.scrollLeft(),
20095					top = offset.top - that.document.scrollTop();
20096
20097				options.height = that.uiDialog.height();
20098				options.width = that.uiDialog.width();
20099				options.position = {
20100					my: "left top",
20101					at: "left" + ( left >= 0 ? "+" : "" ) + left + " " +
20102						"top" + ( top >= 0 ? "+" : "" ) + top,
20103					of: that.window
20104				};
20105				that._removeClass( $( this ), "ui-dialog-resizing" );
20106				that._unblockFrames();
20107				that._trigger( "resizeStop", event, filteredUi( ui ) );
20108			}
20109		} )
20110			.css( "position", position );
20111	},
20112
20113	_trackFocus: function() {
20114		this._on( this.widget(), {
20115			focusin: function( event ) {
20116				this._makeFocusTarget();
20117				this._focusedElement = $( event.target );
20118			}
20119		} );
20120	},
20121
20122	_makeFocusTarget: function() {
20123		this._untrackInstance();
20124		this._trackingInstances().unshift( this );
20125	},
20126
20127	_untrackInstance: function() {
20128		var instances = this._trackingInstances(),
20129			exists = $.inArray( this, instances );
20130		if ( exists !== -1 ) {
20131			instances.splice( exists, 1 );
20132		}
20133	},
20134
20135	_trackingInstances: function() {
20136		var instances = this.document.data( "ui-dialog-instances" );
20137		if ( !instances ) {
20138			instances = [];
20139			this.document.data( "ui-dialog-instances", instances );
20140		}
20141		return instances;
20142	},
20143
20144	_minHeight: function() {
20145		var options = this.options;
20146
20147		return options.height === "auto" ?
20148			options.minHeight :
20149			Math.min( options.minHeight, options.height );
20150	},
20151
20152	_position: function() {
20153
20154		// Need to show the dialog to get the actual offset in the position plugin
20155		var isVisible = this.uiDialog.is( ":visible" );
20156		if ( !isVisible ) {
20157			this.uiDialog.show();
20158		}
20159		this.uiDialog.position( this.options.position );
20160		if ( !isVisible ) {
20161			this.uiDialog.hide();
20162		}
20163	},
20164
20165	_setOptions: function( options ) {
20166		var that = this,
20167			resize = false,
20168			resizableOptions = {};
20169
20170		$.each( options, function( key, value ) {
20171			that._setOption( key, value );
20172
20173			if ( key in that.sizeRelatedOptions ) {
20174				resize = true;
20175			}
20176			if ( key in that.resizableRelatedOptions ) {
20177				resizableOptions[ key ] = value;
20178			}
20179		} );
20180
20181		if ( resize ) {
20182			this._size();
20183			this._position();
20184		}
20185		if ( this.uiDialog.is( ":data(ui-resizable)" ) ) {
20186			this.uiDialog.resizable( "option", resizableOptions );
20187		}
20188	},
20189
20190	_setOption: function( key, value ) {
20191		var isDraggable, isResizable,
20192			uiDialog = this.uiDialog;
20193
20194		if ( key === "disabled" ) {
20195			return;
20196		}
20197
20198		this._super( key, value );
20199
20200		if ( key === "appendTo" ) {
20201			this.uiDialog.appendTo( this._appendTo() );
20202		}
20203
20204		if ( key === "buttons" ) {
20205			this._createButtons();
20206		}
20207
20208		if ( key === "closeText" ) {
20209			this.uiDialogTitlebarClose.button( {
20210
20211				// Ensure that we always pass a string
20212				label: $( "<a>" ).text( "" + this.options.closeText ).html()
20213			} );
20214		}
20215
20216		if ( key === "draggable" ) {
20217			isDraggable = uiDialog.is( ":data(ui-draggable)" );
20218			if ( isDraggable && !value ) {
20219				uiDialog.draggable( "destroy" );
20220			}
20221
20222			if ( !isDraggable && value ) {
20223				this._makeDraggable();
20224			}
20225		}
20226
20227		if ( key === "position" ) {
20228			this._position();
20229		}
20230
20231		if ( key === "resizable" ) {
20232
20233			// currently resizable, becoming non-resizable
20234			isResizable = uiDialog.is( ":data(ui-resizable)" );
20235			if ( isResizable && !value ) {
20236				uiDialog.resizable( "destroy" );
20237			}
20238
20239			// Currently resizable, changing handles
20240			if ( isResizable && typeof value === "string" ) {
20241				uiDialog.resizable( "option", "handles", value );
20242			}
20243
20244			// Currently non-resizable, becoming resizable
20245			if ( !isResizable && value !== false ) {
20246				this._makeResizable();
20247			}
20248		}
20249
20250		if ( key === "title" ) {
20251			this._title( this.uiDialogTitlebar.find( ".ui-dialog-title" ) );
20252		}
20253
20254		if ( key === "modal" ) {
20255			uiDialog.attr( "aria-modal", value ? "true" : null );
20256		}
20257	},
20258
20259	_size: function() {
20260
20261		// If the user has resized the dialog, the .ui-dialog and .ui-dialog-content
20262		// divs will both have width and height set, so we need to reset them
20263		var nonContentHeight, minContentHeight, maxContentHeight,
20264			options = this.options;
20265
20266		// Reset content sizing
20267		this.element.show().css( {
20268			width: "auto",
20269			minHeight: 0,
20270			maxHeight: "none",
20271			height: 0
20272		} );
20273
20274		if ( options.minWidth > options.width ) {
20275			options.width = options.minWidth;
20276		}
20277
20278		// Reset wrapper sizing
20279		// determine the height of all the non-content elements
20280		nonContentHeight = this.uiDialog.css( {
20281			height: "auto",
20282			width: options.width
20283		} )
20284			.outerHeight();
20285		minContentHeight = Math.max( 0, options.minHeight - nonContentHeight );
20286		maxContentHeight = typeof options.maxHeight === "number" ?
20287			Math.max( 0, options.maxHeight - nonContentHeight ) :
20288			"none";
20289
20290		if ( options.height === "auto" ) {
20291			this.element.css( {
20292				minHeight: minContentHeight,
20293				maxHeight: maxContentHeight,
20294				height: "auto"
20295			} );
20296		} else {
20297			this.element.height( Math.max( 0, options.height - nonContentHeight ) );
20298		}
20299
20300		if ( this.uiDialog.is( ":data(ui-resizable)" ) ) {
20301			this.uiDialog.resizable( "option", "minHeight", this._minHeight() );
20302		}
20303	},
20304
20305	_blockFrames: function() {
20306		this.iframeBlocks = this.document.find( "iframe" ).map( function() {
20307			var iframe = $( this );
20308
20309			return $( "<div>" )
20310				.css( {
20311					position: "absolute",
20312					width: iframe.outerWidth(),
20313					height: iframe.outerHeight()
20314				} )
20315				.appendTo( iframe.parent() )
20316				.offset( iframe.offset() )[ 0 ];
20317		} );
20318	},
20319
20320	_unblockFrames: function() {
20321		if ( this.iframeBlocks ) {
20322			this.iframeBlocks.remove();
20323			delete this.iframeBlocks;
20324		}
20325	},
20326
20327	_allowInteraction: function( event ) {
20328		if ( $( event.target ).closest( ".ui-dialog" ).length ) {
20329			return true;
20330		}
20331
20332		// TODO: Remove hack when datepicker implements
20333		// the .ui-front logic (#8989)
20334		return !!$( event.target ).closest( ".ui-datepicker" ).length;
20335	},
20336
20337	_createOverlay: function() {
20338		if ( !this.options.modal ) {
20339			return;
20340		}
20341
20342		// We use a delay in case the overlay is created from an
20343		// event that we're going to be cancelling (#2804)
20344		var isOpening = true;
20345		this._delay( function() {
20346			isOpening = false;
20347		} );
20348
20349		if ( !this.document.data( "ui-dialog-overlays" ) ) {
20350
20351			// Prevent use of anchors and inputs
20352			// This doesn't use `_on()` because it is a shared event handler
20353			// across all open modal dialogs.
20354			this.document.on( "focusin.ui-dialog", function( event ) {
20355				if ( isOpening ) {
20356					return;
20357				}
20358
20359				var instance = this._trackingInstances()[ 0 ];
20360				if ( !instance._allowInteraction( event ) ) {
20361					event.preventDefault();
20362					instance._focusTabbable();
20363				}
20364			}.bind( this ) );
20365		}
20366
20367		this.overlay = $( "<div>" )
20368			.appendTo( this._appendTo() );
20369
20370		this._addClass( this.overlay, null, "ui-widget-overlay ui-front" );
20371		this._on( this.overlay, {
20372			mousedown: "_keepFocus"
20373		} );
20374		this.document.data( "ui-dialog-overlays",
20375			( this.document.data( "ui-dialog-overlays" ) || 0 ) + 1 );
20376	},
20377
20378	_destroyOverlay: function() {
20379		if ( !this.options.modal ) {
20380			return;
20381		}
20382
20383		if ( this.overlay ) {
20384			var overlays = this.document.data( "ui-dialog-overlays" ) - 1;
20385
20386			if ( !overlays ) {
20387				this.document.off( "focusin.ui-dialog" );
20388				this.document.removeData( "ui-dialog-overlays" );
20389			} else {
20390				this.document.data( "ui-dialog-overlays", overlays );
20391			}
20392
20393			this.overlay.remove();
20394			this.overlay = null;
20395		}
20396	}
20397} );
20398
20399// DEPRECATED
20400// TODO: switch return back to widget declaration at top of file when this is removed
20401if ( $.uiBackCompat === true ) {
20402
20403	// Backcompat for dialogClass option
20404	$.widget( "ui.dialog", $.ui.dialog, {
20405		options: {
20406			dialogClass: ""
20407		},
20408		_createWrapper: function() {
20409			this._super();
20410			this.uiDialog.addClass( this.options.dialogClass );
20411		},
20412		_setOption: function( key, value ) {
20413			if ( key === "dialogClass" ) {
20414				this.uiDialog
20415					.removeClass( this.options.dialogClass )
20416					.addClass( value );
20417			}
20418			this._superApply( arguments );
20419		}
20420	} );
20421}
20422
20423var widgetsDialog = $.ui.dialog;
20424
20425
20426/*!
20427 * jQuery UI Droppable 1.14.0
20428 * https://jqueryui.com
20429 *
20430 * Copyright OpenJS Foundation and other contributors
20431 * Released under the MIT license.
20432 * https://jquery.org/license
20433 */
20434
20435//>>label: Droppable
20436//>>group: Interactions
20437//>>description: Enables drop targets for draggable elements.
20438//>>docs: https://api.jqueryui.com/droppable/
20439//>>demos: https://jqueryui.com/droppable/
20440
20441
20442$.widget( "ui.droppable", {
20443	version: "1.14.0
vendor: 11,311 bytes, lines 20443-20871
20443",
20444	widgetEventPrefix: "drop",
20445	options: {
20446		accept: "*",
20447		addClasses: true,
20448		greedy: false,
20449		scope: "default",
20450		tolerance: "intersect",
20451
20452		// Callbacks
20453		activate: null,
20454		deactivate: null,
20455		drop: null,
20456		out: null,
20457		over: null
20458	},
20459	_create: function() {
20460
20461		var proportions,
20462			o = this.options,
20463			accept = o.accept;
20464
20465		this.isover = false;
20466		this.isout = true;
20467
20468		this.accept = typeof accept === "function" ? accept : function( d ) {
20469			return d.is( accept );
20470		};
20471
20472		this.proportions = function( /* valueToWrite */ ) {
20473			if ( arguments.length ) {
20474
20475				// Store the droppable's proportions
20476				proportions = arguments[ 0 ];
20477			} else {
20478
20479				// Retrieve or derive the droppable's proportions
20480				return proportions ?
20481					proportions :
20482					proportions = {
20483						width: this.element[ 0 ].offsetWidth,
20484						height: this.element[ 0 ].offsetHeight
20485					};
20486			}
20487		};
20488
20489		this._addToManager( o.scope );
20490
20491		if ( o.addClasses ) {
20492			this._addClass( "ui-droppable" );
20493		}
20494
20495	},
20496
20497	_addToManager: function( scope ) {
20498
20499		// Add the reference and positions to the manager
20500		$.ui.ddmanager.droppables[ scope ] = $.ui.ddmanager.droppables[ scope ] || [];
20501		$.ui.ddmanager.droppables[ scope ].push( this );
20502	},
20503
20504	_splice: function( drop ) {
20505		var i = 0;
20506		for ( ; i < drop.length; i++ ) {
20507			if ( drop[ i ] === this ) {
20508				drop.splice( i, 1 );
20509			}
20510		}
20511	},
20512
20513	_destroy: function() {
20514		var drop = $.ui.ddmanager.droppables[ this.options.scope ];
20515
20516		this._splice( drop );
20517	},
20518
20519	_setOption: function( key, value ) {
20520
20521		if ( key === "accept" ) {
20522			this.accept = typeof value === "function" ? value : function( d ) {
20523				return d.is( value );
20524			};
20525		} else if ( key === "scope" ) {
20526			var drop = $.ui.ddmanager.droppables[ this.options.scope ];
20527
20528			this._splice( drop );
20529			this._addToManager( value );
20530		}
20531
20532		this._super( key, value );
20533	},
20534
20535	_activate: function( event ) {
20536		var draggable = $.ui.ddmanager.current;
20537
20538		this._addActiveClass();
20539		if ( draggable ) {
20540			this._trigger( "activate", event, this.ui( draggable ) );
20541		}
20542	},
20543
20544	_deactivate: function( event ) {
20545		var draggable = $.ui.ddmanager.current;
20546
20547		this._removeActiveClass();
20548		if ( draggable ) {
20549			this._trigger( "deactivate", event, this.ui( draggable ) );
20550		}
20551	},
20552
20553	_over: function( event ) {
20554
20555		var draggable = $.ui.ddmanager.current;
20556
20557		// Bail if draggable and droppable are same element
20558		if ( !draggable || ( draggable.currentItem ||
20559				draggable.element )[ 0 ] === this.element[ 0 ] ) {
20560			return;
20561		}
20562
20563		if ( this.accept.call( this.element[ 0 ], ( draggable.currentItem ||
20564				draggable.element ) ) ) {
20565			this._addHoverClass();
20566			this._trigger( "over", event, this.ui( draggable ) );
20567		}
20568
20569	},
20570
20571	_out: function( event ) {
20572
20573		var draggable = $.ui.ddmanager.current;
20574
20575		// Bail if draggable and droppable are same element
20576		if ( !draggable || ( draggable.currentItem ||
20577				draggable.element )[ 0 ] === this.element[ 0 ] ) {
20578			return;
20579		}
20580
20581		if ( this.accept.call( this.element[ 0 ], ( draggable.currentItem ||
20582				draggable.element ) ) ) {
20583			this._removeHoverClass();
20584			this._trigger( "out", event, this.ui( draggable ) );
20585		}
20586
20587	},
20588
20589	_drop: function( event, custom ) {
20590
20591		var draggable = custom || $.ui.ddmanager.current,
20592			childrenIntersection = false;
20593
20594		// Bail if draggable and droppable are same element
20595		if ( !draggable || ( draggable.currentItem ||
20596				draggable.element )[ 0 ] === this.element[ 0 ] ) {
20597			return false;
20598		}
20599
20600		this.element
20601			.find( ":data(ui-droppable)" )
20602			.not( ".ui-draggable-dragging" )
20603			.each( function() {
20604				var inst = $( this ).droppable( "instance" );
20605				if (
20606					inst.options.greedy &&
20607					!inst.options.disabled &&
20608					inst.options.scope === draggable.options.scope &&
20609					inst.accept.call(
20610						inst.element[ 0 ], ( draggable.currentItem || draggable.element )
20611					) &&
20612					$.ui.intersect(
20613						draggable,
20614						$.extend( inst, { offset: inst.element.offset() } ),
20615						inst.options.tolerance, event
20616					)
20617				) {
20618					childrenIntersection = true;
20619					return false;
20620				}
20621			} );
20622		if ( childrenIntersection ) {
20623			return false;
20624		}
20625
20626		if ( this.accept.call( this.element[ 0 ],
20627				( draggable.currentItem || draggable.element ) ) ) {
20628			this._removeActiveClass();
20629			this._removeHoverClass();
20630
20631			this._trigger( "drop", event, this.ui( draggable ) );
20632			return this.element;
20633		}
20634
20635		return false;
20636
20637	},
20638
20639	ui: function( c ) {
20640		return {
20641			draggable: ( c.currentItem || c.element ),
20642			helper: c.helper,
20643			position: c.position,
20644			offset: c.positionAbs
20645		};
20646	},
20647
20648	// Extension points just to make backcompat sane and avoid duplicating logic
20649	// TODO: Remove in 1.14 along with call to it below
20650	_addHoverClass: function() {
20651		this._addClass( "ui-droppable-hover" );
20652	},
20653
20654	_removeHoverClass: function() {
20655		this._removeClass( "ui-droppable-hover" );
20656	},
20657
20658	_addActiveClass: function() {
20659		this._addClass( "ui-droppable-active" );
20660	},
20661
20662	_removeActiveClass: function() {
20663		this._removeClass( "ui-droppable-active" );
20664	}
20665} );
20666
20667$.ui.intersect = ( function() {
20668	function isOverAxis( x, reference, size ) {
20669		return ( x >= reference ) && ( x < ( reference + size ) );
20670	}
20671
20672	return function( draggable, droppable, toleranceMode, event ) {
20673
20674		if ( !droppable.offset ) {
20675			return false;
20676		}
20677
20678		var x1 = ( draggable.positionAbs ||
20679				draggable.position.absolute ).left + draggable.margins.left,
20680			y1 = ( draggable.positionAbs ||
20681				draggable.position.absolute ).top + draggable.margins.top,
20682			x2 = x1 + draggable.helperProportions.width,
20683			y2 = y1 + draggable.helperProportions.height,
20684			l = droppable.offset.left,
20685			t = droppable.offset.top,
20686			r = l + droppable.proportions().width,
20687			b = t + droppable.proportions().height;
20688
20689		switch ( toleranceMode ) {
20690		case "fit":
20691			return ( l <= x1 && x2 <= r && t <= y1 && y2 <= b );
20692		case "intersect":
20693			return ( l < x1 + ( draggable.helperProportions.width / 2 ) && // Right Half
20694				x2 - ( draggable.helperProportions.width / 2 ) < r && // Left Half
20695				t < y1 + ( draggable.helperProportions.height / 2 ) && // Bottom Half
20696				y2 - ( draggable.helperProportions.height / 2 ) < b ); // Top Half
20697		case "pointer":
20698			return isOverAxis( event.pageY, t, droppable.proportions().height ) &&
20699				isOverAxis( event.pageX, l, droppable.proportions().width );
20700		case "touch":
20701			return (
20702				( y1 >= t && y1 <= b ) || // Top edge touching
20703				( y2 >= t && y2 <= b ) || // Bottom edge touching
20704				( y1 < t && y2 > b ) // Surrounded vertically
20705			) && (
20706				( x1 >= l && x1 <= r ) || // Left edge touching
20707				( x2 >= l && x2 <= r ) || // Right edge touching
20708				( x1 < l && x2 > r ) // Surrounded horizontally
20709			);
20710		default:
20711			return false;
20712		}
20713	};
20714} )();
20715
20716/*
20717	This manager tracks offsets of draggables and droppables
20718*/
20719$.ui.ddmanager = {
20720	current: null,
20721	droppables: { "default": [] },
20722	prepareOffsets: function( t, event ) {
20723
20724		var i, j,
20725			m = $.ui.ddmanager.droppables[ t.options.scope ] || [],
20726			type = event ? event.type : null, // workaround for #2317
20727			list = ( t.currentItem || t.element ).find( ":data(ui-droppable)" ).addBack();
20728
20729		droppablesLoop: for ( i = 0; i < m.length; i++ ) {
20730
20731			// No disabled and non-accepted
20732			if ( m[ i ].options.disabled || ( t && !m[ i ].accept.call( m[ i ].element[ 0 ],
20733					( t.currentItem || t.element ) ) ) ) {
20734				continue;
20735			}
20736
20737			// Filter out elements in the current dragged item
20738			for ( j = 0; j < list.length; j++ ) {
20739				if ( list[ j ] === m[ i ].element[ 0 ] ) {
20740					m[ i ].proportions().height = 0;
20741					continue droppablesLoop;
20742				}
20743			}
20744
20745			m[ i ].visible = m[ i ].element.css( "display" ) !== "none";
20746			if ( !m[ i ].visible ) {
20747				continue;
20748			}
20749
20750			// Activate the droppable if used directly from draggables
20751			if ( type === "mousedown" ) {
20752				m[ i ]._activate.call( m[ i ], event );
20753			}
20754
20755			m[ i ].offset = m[ i ].element.offset();
20756			m[ i ].proportions( {
20757				width: m[ i ].element[ 0 ].offsetWidth,
20758				height: m[ i ].element[ 0 ].offsetHeight
20759			} );
20760
20761		}
20762
20763	},
20764	drop: function( draggable, event ) {
20765
20766		var dropped = false;
20767
20768		// Create a copy of the droppables in case the list changes during the drop (#9116)
20769		$.each( ( $.ui.ddmanager.droppables[ draggable.options.scope ] || [] ).slice(), function() {
20770
20771			if ( !this.options ) {
20772				return;
20773			}
20774			if ( !this.options.disabled && this.visible &&
20775					$.ui.intersect( draggable, this, this.options.tolerance, event ) ) {
20776				dropped = this._drop.call( this, event ) || dropped;
20777			}
20778
20779			if ( !this.options.disabled && this.visible && this.accept.call( this.element[ 0 ],
20780					( draggable.currentItem || draggable.element ) ) ) {
20781				this.isout = true;
20782				this.isover = false;
20783				this._deactivate.call( this, event );
20784			}
20785
20786		} );
20787		return dropped;
20788
20789	},
20790	dragStart: function( draggable, event ) {
20791
20792		// Listen for scrolling so that if the dragging causes scrolling the position of the
20793		// droppables can be recalculated (see #5003)
20794		draggable.element.parentsUntil( "body" ).on( "scroll.droppable", function() {
20795			if ( !draggable.options.refreshPositions ) {
20796				$.ui.ddmanager.prepareOffsets( draggable, event );
20797			}
20798		} );
20799	},
20800	drag: function( draggable, event ) {
20801
20802		// If you have a highly dynamic page, you might try this option. It renders positions
20803		// every time you move the mouse.
20804		if ( draggable.options.refreshPositions ) {
20805			$.ui.ddmanager.prepareOffsets( draggable, event );
20806		}
20807
20808		// Run through all droppables and check their positions based on specific tolerance options
20809		$.each( $.ui.ddmanager.droppables[ draggable.options.scope ] || [], function() {
20810
20811			if ( this.options.disabled || this.greedyChild || !this.visible ) {
20812				return;
20813			}
20814
20815			var parentInstance, scope, parent,
20816				intersects = $.ui.intersect( draggable, this, this.options.tolerance, event ),
20817				c = !intersects && this.isover ?
20818					"isout" :
20819					( intersects && !this.isover ? "isover" : null );
20820			if ( !c ) {
20821				return;
20822			}
20823
20824			if ( this.options.greedy ) {
20825
20826				// find droppable parents with same scope
20827				scope = this.options.scope;
20828				parent = this.element.parents( ":data(ui-droppable)" ).filter( function() {
20829					return $( this ).droppable( "instance" ).options.scope === scope;
20830				} );
20831
20832				if ( parent.length ) {
20833					parentInstance = $( parent[ 0 ] ).droppable( "instance" );
20834					parentInstance.greedyChild = ( c === "isover" );
20835				}
20836			}
20837
20838			// We just moved into a greedy child
20839			if ( parentInstance && c === "isover" ) {
20840				parentInstance.isover = false;
20841				parentInstance.isout = true;
20842				parentInstance._out.call( parentInstance, event );
20843			}
20844
20845			this[ c ] = true;
20846			this[ c === "isout" ? "isover" : "isout" ] = false;
20847			this[ c === "isover" ? "_over" : "_out" ].call( this, event );
20848
20849			// We just moved out of a greedy child
20850			if ( parentInstance && c === "isout" ) {
20851				parentInstance.isout = false;
20852				parentInstance.isover = true;
20853				parentInstance._over.call( parentInstance, event );
20854			}
20855		} );
20856
20857	},
20858	dragStop: function( draggable, event ) {
20859		draggable.element.parentsUntil( "body" ).off( "scroll.droppable" );
20860
20861		// Call prepareOffsets one final time since IE does not fire return scroll events when
20862		// overflow was caused by drag (see #5003)
20863		if ( !draggable.options.refreshPositions ) {
20864			$.ui.ddmanager.prepareOffsets( draggable, event );
20865		}
20866	}
20867};
20868
20869// DEPRECATED
20870// TODO: switch return back to widget declaration at top of file when this is removed
20871if ( $.uiBackCompat 
20871=== true ) {
20872
20873	// Backcompat for activeClass and hoverClass options
20874	$.widget( "ui.droppable", $.ui.droppable, {
20875		options: {
20876			hoverClass: false,
20877			activeClass: false
20878		},
20879		_addActiveClass: function() {
20880			this._super();
20881			if ( this.options.activeClass ) {
20882				this.element.addClass( this.options.activeClass );
20883			}
20884		},
20885		_removeActiveClass: function() {
20886			this._super();
20887			if ( this.options.activeClass ) {
20888				this.element.removeClass( this.options.activeClass );
20889			}
20890		},
20891		_addHoverClass: function() {
20892			this._super();
20893			if ( this.options.hoverClass ) {
20894				this.element.addClass( this.options.hoverClass );
20895			}
20896		},
20897		_removeHoverClass: function() {
20898			this._super();
20899			if ( this.options.hoverClass ) {
20900				this.element.removeClass( this.options.hoverClass );
20901			}
20902		}
20903	} );
20904}
20905
20906var widgetsDroppable = $.ui.droppable;
20907
20908
20909/*!
20910 * jQuery UI Progressbar 1.14.0
20911 * https://jqueryui.com
20912 *
20913 * Copyright OpenJS Foundation and other contributors
20914 * Released under the MIT license.
20915 * https://jquery.org/license
20916 */
20917
20918//>>label: Progressbar
20919//>>group: Widgets
20920/* eslint-disable max-len */
20921//>>
vendor: 4,223 bytes, lines 20921-21090
20921description: Displays a status indicator for loading state, standard percentage, and other progress indicators.
20922/* eslint-enable max-len */
20923//>>docs: https://api.jqueryui.com/progressbar/
20924//>>demos: https://jqueryui.com/progressbar/
20925//>>css.structure: ../../themes/base/core.css
20926//>>css.structure: ../../themes/base/progressbar.css
20927//>>css.theme: ../../themes/base/theme.css
20928
20929
20930var widgetsProgressbar = $.widget( "ui.progressbar", {
20931	version: "1.14.0",
20932	options: {
20933		classes: {
20934			"ui-progressbar": "ui-corner-all",
20935			"ui-progressbar-value": "ui-corner-left",
20936			"ui-progressbar-complete": "ui-corner-right"
20937		},
20938		max: 100,
20939		value: 0,
20940
20941		change: null,
20942		complete: null
20943	},
20944
20945	min: 0,
20946
20947	_create: function() {
20948
20949		// Constrain initial value
20950		this.oldValue = this.options.value = this._constrainedValue();
20951
20952		this.element.attr( {
20953
20954			// Only set static values; aria-valuenow and aria-valuemax are
20955			// set inside _refreshValue()
20956			role: "progressbar",
20957			"aria-valuemin": this.min
20958		} );
20959		this._addClass( "ui-progressbar", "ui-widget ui-widget-content" );
20960
20961		this.valueDiv = $( "<div>" ).appendTo( this.element );
20962		this._addClass( this.valueDiv, "ui-progressbar-value", "ui-widget-header" );
20963		this._refreshValue();
20964	},
20965
20966	_destroy: function() {
20967		this.element.removeAttr( "role aria-valuemin aria-valuemax aria-valuenow" );
20968
20969		this.valueDiv.remove();
20970	},
20971
20972	value: function( newValue ) {
20973		if ( newValue === undefined ) {
20974			return this.options.value;
20975		}
20976
20977		this.options.value = this._constrainedValue( newValue );
20978		this._refreshValue();
20979	},
20980
20981	_constrainedValue: function( newValue ) {
20982		if ( newValue === undefined ) {
20983			newValue = this.options.value;
20984		}
20985
20986		this.indeterminate = newValue === false;
20987
20988		// Sanitize value
20989		if ( typeof newValue !== "number" ) {
20990			newValue = 0;
20991		}
20992
20993		return this.indeterminate ? false :
20994			Math.min( this.options.max, Math.max( this.min, newValue ) );
20995	},
20996
20997	_setOptions: function( options ) {
20998
20999		// Ensure "value" option is set after other values (like max)
21000		var value = options.value;
21001		delete options.value;
21002
21003		this._super( options );
21004
21005		this.options.value = this._constrainedValue( value );
21006		this._refreshValue();
21007	},
21008
21009	_setOption: function( key, value ) {
21010		if ( key === "max" ) {
21011
21012			// Don't allow a max less than min
21013			value = Math.max( this.min, value );
21014		}
21015		this._super( key, value );
21016	},
21017
21018	_setOptionDisabled: function( value ) {
21019		this._super( value );
21020
21021		this.element.attr( "aria-disabled", value );
21022		this._toggleClass( null, "ui-state-disabled", !!value );
21023	},
21024
21025	_percentage: function() {
21026		return this.indeterminate ?
21027			100 :
21028			100 * ( this.options.value - this.min ) / ( this.options.max - this.min );
21029	},
21030
21031	_refreshValue: function() {
21032		var value = this.options.value,
21033			percentage = this._percentage();
21034
21035		this.valueDiv
21036			.toggle( this.indeterminate || value > this.min )
21037			.width( percentage.toFixed( 0 ) + "%" );
21038
21039		this
21040			._toggleClass( this.valueDiv, "ui-progressbar-complete", null,
21041				value === this.options.max )
21042			._toggleClass( "ui-progressbar-indeterminate", null, this.indeterminate );
21043
21044		if ( this.indeterminate ) {
21045			this.element.removeAttr( "aria-valuenow" );
21046			if ( !this.overlayDiv ) {
21047				this.overlayDiv = $( "<div>" ).appendTo( this.valueDiv );
21048				this._addClass( this.overlayDiv, "ui-progressbar-overlay" );
21049			}
21050		} else {
21051			this.element.attr( {
21052				"aria-valuemax": this.options.max,
21053				"aria-valuenow": value
21054			} );
21055			if ( this.overlayDiv ) {
21056				this.overlayDiv.remove();
21057				this.overlayDiv = null;
21058			}
21059		}
21060
21061		if ( this.oldValue !== value ) {
21062			this.oldValue = value;
21063			this._trigger( "change" );
21064		}
21065		if ( value === this.options.max ) {
21066			this._trigger( "complete" );
21067		}
21068	}
21069} );
21070
21071
21072/*!
21073 * jQuery UI Selectable 1.14.0
21074 * https://jqueryui.com
21075 *
21076 * Copyright OpenJS Foundation and other contributors
21077 * Released under the MIT license.
21078 * https://jquery.org/license
21079 */
21080
21081//>>label: Selectable
21082//>>group: Interactions
21083//>>description: Allows groups of elements to be selected with the mouse.
21084//>>docs: https://api.jqueryui.com/selectable/
21085//>>demos: https://jqueryui.com/selectable/
21086//>>css.structure: ../../themes/base/selectable.css
21087
21088
21089var widgetsSelectable = $.widget( "ui.selectable", $.ui.mouse, {
21090	version: "1.14.0
vendor: 7,325 bytes, lines 21090-21371
21090",
21091	options: {
21092		appendTo: "body",
21093		autoRefresh: true,
21094		distance: 0,
21095		filter: "*",
21096		tolerance: "touch",
21097
21098		// Callbacks
21099		selected: null,
21100		selecting: null,
21101		start: null,
21102		stop: null,
21103		unselected: null,
21104		unselecting: null
21105	},
21106	_create: function() {
21107		var that = this;
21108
21109		this._addClass( "ui-selectable" );
21110
21111		this.dragged = false;
21112
21113		// Cache selectee children based on filter
21114		this.refresh = function() {
21115			that.elementPos = $( that.element[ 0 ] ).offset();
21116			that.selectees = $( that.options.filter, that.element[ 0 ] );
21117			that._addClass( that.selectees, "ui-selectee" );
21118			that.selectees.each( function() {
21119				var $this = $( this ),
21120					selecteeOffset = $this.offset(),
21121					pos = {
21122						left: selecteeOffset.left - that.elementPos.left,
21123						top: selecteeOffset.top - that.elementPos.top
21124					};
21125				$.data( this, "selectable-item", {
21126					element: this,
21127					$element: $this,
21128					left: pos.left,
21129					top: pos.top,
21130					right: pos.left + $this.outerWidth(),
21131					bottom: pos.top + $this.outerHeight(),
21132					startselected: false,
21133					selected: $this.hasClass( "ui-selected" ),
21134					selecting: $this.hasClass( "ui-selecting" ),
21135					unselecting: $this.hasClass( "ui-unselecting" )
21136				} );
21137			} );
21138		};
21139		this.refresh();
21140
21141		this._mouseInit();
21142
21143		this.helper = $( "<div>" );
21144		this._addClass( this.helper, "ui-selectable-helper" );
21145	},
21146
21147	_destroy: function() {
21148		this.selectees.removeData( "selectable-item" );
21149		this._mouseDestroy();
21150	},
21151
21152	_mouseStart: function( event ) {
21153		var that = this,
21154			options = this.options;
21155
21156		this.opos = [ event.pageX, event.pageY ];
21157		this.elementPos = $( this.element[ 0 ] ).offset();
21158
21159		if ( this.options.disabled ) {
21160			return;
21161		}
21162
21163		this.selectees = $( options.filter, this.element[ 0 ] );
21164
21165		this._trigger( "start", event );
21166
21167		$( options.appendTo ).append( this.helper );
21168
21169		// position helper (lasso)
21170		this.helper.css( {
21171			"left": event.pageX,
21172			"top": event.pageY,
21173			"width": 0,
21174			"height": 0
21175		} );
21176
21177		if ( options.autoRefresh ) {
21178			this.refresh();
21179		}
21180
21181		this.selectees.filter( ".ui-selected" ).each( function() {
21182			var selectee = $.data( this, "selectable-item" );
21183			selectee.startselected = true;
21184			if ( !event.metaKey && !event.ctrlKey ) {
21185				that._removeClass( selectee.$element, "ui-selected" );
21186				selectee.selected = false;
21187				that._addClass( selectee.$element, "ui-unselecting" );
21188				selectee.unselecting = true;
21189
21190				// selectable UNSELECTING callback
21191				that._trigger( "unselecting", event, {
21192					unselecting: selectee.element
21193				} );
21194			}
21195		} );
21196
21197		$( event.target ).parents().addBack().each( function() {
21198			var doSelect,
21199				selectee = $.data( this, "selectable-item" );
21200			if ( selectee ) {
21201				doSelect = ( !event.metaKey && !event.ctrlKey ) ||
21202					!selectee.$element.hasClass( "ui-selected" );
21203				that._removeClass( selectee.$element, doSelect ? "ui-unselecting" : "ui-selected" )
21204					._addClass( selectee.$element, doSelect ? "ui-selecting" : "ui-unselecting" );
21205				selectee.unselecting = !doSelect;
21206				selectee.selecting = doSelect;
21207				selectee.selected = doSelect;
21208
21209				// selectable (UN)SELECTING callback
21210				if ( doSelect ) {
21211					that._trigger( "selecting", event, {
21212						selecting: selectee.element
21213					} );
21214				} else {
21215					that._trigger( "unselecting", event, {
21216						unselecting: selectee.element
21217					} );
21218				}
21219				return false;
21220			}
21221		} );
21222
21223	},
21224
21225	_mouseDrag: function( event ) {
21226
21227		this.dragged = true;
21228
21229		if ( this.options.disabled ) {
21230			return;
21231		}
21232
21233		var tmp,
21234			that = this,
21235			options = this.options,
21236			x1 = this.opos[ 0 ],
21237			y1 = this.opos[ 1 ],
21238			x2 = event.pageX,
21239			y2 = event.pageY;
21240
21241		if ( x1 > x2 ) {
21242			tmp = x2; x2 = x1; x1 = tmp;
21243		}
21244		if ( y1 > y2 ) {
21245			tmp = y2; y2 = y1; y1 = tmp;
21246		}
21247		this.helper.css( { left: x1, top: y1, width: x2 - x1, height: y2 - y1 } );
21248
21249		this.selectees.each( function() {
21250			var selectee = $.data( this, "selectable-item" ),
21251				hit = false,
21252				offset = {};
21253
21254			//prevent helper from being selected if appendTo: selectable
21255			if ( !selectee || selectee.element === that.element[ 0 ] ) {
21256				return;
21257			}
21258
21259			offset.left   = selectee.left   + that.elementPos.left;
21260			offset.right  = selectee.right  + that.elementPos.left;
21261			offset.top    = selectee.top    + that.elementPos.top;
21262			offset.bottom = selectee.bottom + that.elementPos.top;
21263
21264			if ( options.tolerance === "touch" ) {
21265				hit = ( !( offset.left > x2 || offset.right < x1 || offset.top > y2 ||
21266                    offset.bottom < y1 ) );
21267			} else if ( options.tolerance === "fit" ) {
21268				hit = ( offset.left > x1 && offset.right < x2 && offset.top > y1 &&
21269                    offset.bottom < y2 );
21270			}
21271
21272			if ( hit ) {
21273
21274				// SELECT
21275				if ( selectee.selected ) {
21276					that._removeClass( selectee.$element, "ui-selected" );
21277					selectee.selected = false;
21278				}
21279				if ( selectee.unselecting ) {
21280					that._removeClass( selectee.$element, "ui-unselecting" );
21281					selectee.unselecting = false;
21282				}
21283				if ( !selectee.selecting ) {
21284					that._addClass( selectee.$element, "ui-selecting" );
21285					selectee.selecting = true;
21286
21287					// selectable SELECTING callback
21288					that._trigger( "selecting", event, {
21289						selecting: selectee.element
21290					} );
21291				}
21292			} else {
21293
21294				// UNSELECT
21295				if ( selectee.selecting ) {
21296					if ( ( event.metaKey || event.ctrlKey ) && selectee.startselected ) {
21297						that._removeClass( selectee.$element, "ui-selecting" );
21298						selectee.selecting = false;
21299						that._addClass( selectee.$element, "ui-selected" );
21300						selectee.selected = true;
21301					} else {
21302						that._removeClass( selectee.$element, "ui-selecting" );
21303						selectee.selecting = false;
21304						if ( selectee.startselected ) {
21305							that._addClass( selectee.$element, "ui-unselecting" );
21306							selectee.unselecting = true;
21307						}
21308
21309						// selectable UNSELECTING callback
21310						that._trigger( "unselecting", event, {
21311							unselecting: selectee.element
21312						} );
21313					}
21314				}
21315				if ( selectee.selected ) {
21316					if ( !event.metaKey && !event.ctrlKey && !selectee.startselected ) {
21317						that._removeClass( selectee.$element, "ui-selected" );
21318						selectee.selected = false;
21319
21320						that._addClass( selectee.$element, "ui-unselecting" );
21321						selectee.unselecting = true;
21322
21323						// selectable UNSELECTING callback
21324						that._trigger( "unselecting", event, {
21325							unselecting: selectee.element
21326						} );
21327					}
21328				}
21329			}
21330		} );
21331
21332		return false;
21333	},
21334
21335	_mouseStop: function( event ) {
21336		var that = this;
21337
21338		this.dragged = false;
21339
21340		$( ".ui-unselecting", this.element[ 0 ] ).each( function() {
21341			var selectee = $.data( this, "selectable-item" );
21342			that._removeClass( selectee.$element, "ui-unselecting" );
21343			selectee.unselecting = false;
21344			selectee.startselected = false;
21345			that._trigger( "unselected", event, {
21346				unselected: selectee.element
21347			} );
21348		} );
21349		$( ".ui-selecting", this.element[ 0 ] ).each( function() {
21350			var selectee = $.data( this, "selectable-item" );
21351			that._removeClass( selectee.$element, "ui-selecting" )
21352				._addClass( selectee.$element, "ui-selected" );
21353			selectee.selecting = false;
21354			selectee.selected = true;
21355			selectee.startselected = true;
21356			that._trigger( "selected", event, {
21357				selected: selectee.element
21358			} );
21359		} );
21360		this._trigger( "stop", event );
21361
21362		this.helper.remove();
21363
21364		return false;
21365	}
21366
21367} );
21368
21369
21370/*!
21371 * jQuery UI Selectmenu 1.1
213714.0
21372 * https://jqueryui.com
21373 *
21374 * Copyright OpenJS Foundation and other contributors
21375 * Released under the MIT license.
21376 * https://jquery.org/license
21377 */
21378
21379//>>label: Selectmenu
21380//>>group: Widgets
21381/* eslint-disable max-len */
21382//>>description: Duplicates and extends the functionality of a native HTML select element, allowing it to be customizable in behavior and appearance far beyond the limitations of a native select.
21383/* eslint-enable max-len */
21384//>>docs: https://api.jqueryui.com/selectmenu/
21385//>>demos: https://jqueryui.com/selectmenu/
21386//>>css.structure: ../../themes/base/core.css
21387//>>css.structure: ../../themes/base/selectmenu.css, ../../themes/base/button.css
21388//>>css.theme: ../../themes/base/theme.css
21389
21390
21391var widgetsSelectmenu = $.widget( "ui.selectmenu", [ $.ui.formResetMixin, {
21392	version: "1.14.0
vendor: 14,466 bytes, lines 21392-22013
21392",
21393	defaultElement: "<select>",
21394	options: {
21395		appendTo: null,
21396		classes: {
21397			"ui-selectmenu-button-open": "ui-corner-top",
21398			"ui-selectmenu-button-closed": "ui-corner-all"
21399		},
21400		disabled: null,
21401		icons: {
21402			button: "ui-icon-triangle-1-s"
21403		},
21404		position: {
21405			my: "left top",
21406			at: "left bottom",
21407			collision: "none"
21408		},
21409		width: false,
21410
21411		// Callbacks
21412		change: null,
21413		close: null,
21414		focus: null,
21415		open: null,
21416		select: null
21417	},
21418
21419	_create: function() {
21420		var selectmenuId = this.element.uniqueId().attr( "id" );
21421		this.ids = {
21422			element: selectmenuId,
21423			button: selectmenuId + "-button",
21424			menu: selectmenuId + "-menu"
21425		};
21426
21427		this._drawButton();
21428		this._drawMenu();
21429		this._bindFormResetHandler();
21430
21431		this._rendered = false;
21432		this.menuItems = $();
21433	},
21434
21435	_drawButton: function() {
21436		var icon,
21437			that = this,
21438			item = this._parseOption(
21439				this.element.find( "option:selected" ),
21440				this.element[ 0 ].selectedIndex
21441			);
21442
21443		// Associate existing label with the new button
21444		this.labels = this.element.labels().attr( "for", this.ids.button );
21445		this._on( this.labels, {
21446			click: function( event ) {
21447				this.button.trigger( "focus" );
21448				event.preventDefault();
21449			}
21450		} );
21451
21452		// Hide original select element
21453		this.element.hide();
21454
21455		// Create button
21456		this.button = $( "<span>", {
21457			tabindex: this.options.disabled ? -1 : 0,
21458			id: this.ids.button,
21459			role: "combobox",
21460			"aria-expanded": "false",
21461			"aria-autocomplete": "list",
21462			"aria-owns": this.ids.menu,
21463			"aria-haspopup": "true",
21464			title: this.element.attr( "title" )
21465		} )
21466			.insertAfter( this.element );
21467
21468		this._addClass( this.button, "ui-selectmenu-button ui-selectmenu-button-closed",
21469			"ui-button ui-widget" );
21470
21471		icon = $( "<span>" ).appendTo( this.button );
21472		this._addClass( icon, "ui-selectmenu-icon", "ui-icon " + this.options.icons.button );
21473		this.buttonItem = this._renderButtonItem( item )
21474			.appendTo( this.button );
21475
21476		if ( this.options.width !== false ) {
21477			this._resizeButton();
21478		}
21479
21480		this._on( this.button, this._buttonEvents );
21481		this.button.one( "focusin", function() {
21482
21483			// Delay rendering the menu items until the button receives focus.
21484			// The menu may have already been rendered via a programmatic open.
21485			if ( !that._rendered ) {
21486				that._refreshMenu();
21487			}
21488		} );
21489	},
21490
21491	_drawMenu: function() {
21492		var that = this;
21493
21494		// Create menu
21495		this.menu = $( "<ul>", {
21496			"aria-hidden": "true",
21497			"aria-labelledby": this.ids.button,
21498			id: this.ids.menu
21499		} );
21500
21501		// Wrap menu
21502		this.menuWrap = $( "<div>" ).append( this.menu );
21503		this._addClass( this.menuWrap, "ui-selectmenu-menu", "ui-front" );
21504		this.menuWrap.appendTo( this._appendTo() );
21505
21506		// Initialize menu widget
21507		this.menuInstance = this.menu
21508			.menu( {
21509				classes: {
21510					"ui-menu": "ui-corner-bottom"
21511				},
21512				role: "listbox",
21513				select: function( event, ui ) {
21514					event.preventDefault();
21515					that._select( ui.item.data( "ui-selectmenu-item" ), event );
21516				},
21517				focus: function( event, ui ) {
21518					var item = ui.item.data( "ui-selectmenu-item" );
21519
21520					// Prevent inital focus from firing and check if its a newly focused item
21521					if ( that.focusIndex != null && item.index !== that.focusIndex ) {
21522						that._trigger( "focus", event, { item: item } );
21523						if ( !that.isOpen ) {
21524							that._select( item, event );
21525						}
21526					}
21527					that.focusIndex = item.index;
21528
21529					that.button.attr( "aria-activedescendant",
21530						that.menuItems.eq( item.index ).attr( "id" ) );
21531				}
21532			} )
21533			.menu( "instance" );
21534
21535		// Don't close the menu on mouseleave
21536		this.menuInstance._off( this.menu, "mouseleave" );
21537
21538		// Cancel the menu's collapseAll on document click
21539		this.menuInstance._closeOnDocumentClick = function() {
21540			return false;
21541		};
21542
21543		// Selects often contain empty items, but never contain dividers
21544		this.menuInstance._isDivider = function() {
21545			return false;
21546		};
21547	},
21548
21549	refresh: function() {
21550		this._refreshMenu();
21551		this.buttonItem.replaceWith(
21552			this.buttonItem = this._renderButtonItem(
21553
21554				// Fall back to an empty object in case there are no options
21555				this._getSelectedItem().data( "ui-selectmenu-item" ) || {}
21556			)
21557		);
21558		if ( this.options.width === null ) {
21559			this._resizeButton();
21560		}
21561	},
21562
21563	_refreshMenu: function() {
21564		var item,
21565			options = this.element.find( "option" );
21566
21567		this.menu.empty();
21568
21569		this._parseOptions( options );
21570		this._renderMenu( this.menu, this.items );
21571
21572		this.menuInstance.refresh();
21573		this.menuItems = this.menu.find( "li" )
21574			.not( ".ui-selectmenu-optgroup" )
21575				.find( ".ui-menu-item-wrapper" );
21576
21577		this._rendered = true;
21578
21579		if ( !options.length ) {
21580			return;
21581		}
21582
21583		item = this._getSelectedItem();
21584
21585		// Update the menu to have the correct item focused
21586		this.menuInstance.focus( null, item );
21587		this._setAria( item.data( "ui-selectmenu-item" ) );
21588
21589		// Set disabled state
21590		this._setOption( "disabled", this.element.prop( "disabled" ) );
21591	},
21592
21593	open: function( event ) {
21594		if ( this.options.disabled ) {
21595			return;
21596		}
21597
21598		// If this is the first time the menu is being opened, render the items
21599		if ( !this._rendered ) {
21600			this._refreshMenu();
21601		} else {
21602
21603			// Menu clears focus on close, reset focus to selected item
21604			this._removeClass( this.menu.find( ".ui-state-active" ), null, "ui-state-active" );
21605			this.menuInstance.focus( null, this._getSelectedItem() );
21606		}
21607
21608		// If there are no options, don't open the menu
21609		if ( !this.menuItems.length ) {
21610			return;
21611		}
21612
21613		this.isOpen = true;
21614		this._toggleAttr();
21615		this._resizeMenu();
21616		this._position();
21617
21618		this._on( this.document, this._documentClick );
21619
21620		this._trigger( "open", event );
21621	},
21622
21623	_position: function() {
21624		this.menuWrap.position( $.extend( { of: this.button }, this.options.position ) );
21625	},
21626
21627	close: function( event ) {
21628		if ( !this.isOpen ) {
21629			return;
21630		}
21631
21632		this.isOpen = false;
21633		this._toggleAttr();
21634
21635		this.range = null;
21636		this._off( this.document );
21637
21638		this._trigger( "close", event );
21639	},
21640
21641	widget: function() {
21642		return this.button;
21643	},
21644
21645	menuWidget: function() {
21646		return this.menu;
21647	},
21648
21649	_renderButtonItem: function( item ) {
21650		var buttonItem = $( "<span>" );
21651
21652		this._setText( buttonItem, item.label );
21653		this._addClass( buttonItem, "ui-selectmenu-text" );
21654
21655		return buttonItem;
21656	},
21657
21658	_renderMenu: function( ul, items ) {
21659		var that = this,
21660			currentOptgroup = "";
21661
21662		$.each( items, function( index, item ) {
21663			var li;
21664
21665			if ( item.optgroup !== currentOptgroup ) {
21666				li = $( "<li>", {
21667					text: item.optgroup
21668				} );
21669				that._addClass( li, "ui-selectmenu-optgroup", "ui-menu-divider" +
21670					( item.element.parent( "optgroup" ).prop( "disabled" ) ?
21671						" ui-state-disabled" :
21672						"" ) );
21673
21674				li.appendTo( ul );
21675
21676				currentOptgroup = item.optgroup;
21677			}
21678
21679			that._renderItemData( ul, item );
21680		} );
21681	},
21682
21683	_renderItemData: function( ul, item ) {
21684		return this._renderItem( ul, item ).data( "ui-selectmenu-item", item );
21685	},
21686
21687	_renderItem: function( ul, item ) {
21688		var li = $( "<li>" ),
21689			wrapper = $( "<div>", {
21690				title: item.element.attr( "title" )
21691			} );
21692
21693		if ( item.disabled ) {
21694			this._addClass( li, null, "ui-state-disabled" );
21695		}
21696
21697		if ( item.hidden ) {
21698			li.prop( "hidden", true );
21699		} else {
21700			this._setText( wrapper, item.label );
21701		}
21702
21703		return li.append( wrapper ).appendTo( ul );
21704	},
21705
21706	_setText: function( element, value ) {
21707		if ( value ) {
21708			element.text( value );
21709		} else {
21710			element.html( "&#160;" );
21711		}
21712	},
21713
21714	_move: function( direction, event ) {
21715		var item, next,
21716			filter = ".ui-menu-item";
21717
21718		if ( this.isOpen ) {
21719			item = this.menuItems.eq( this.focusIndex ).parent( "li" );
21720		} else {
21721			item = this.menuItems.eq( this.element[ 0 ].selectedIndex ).parent( "li" );
21722			filter += ":not(.ui-state-disabled)";
21723		}
21724
21725		if ( direction === "first" || direction === "last" ) {
21726			next = item[ direction === "first" ? "prevAll" : "nextAll" ]( filter ).eq( -1 );
21727		} else {
21728			next = item[ direction + "All" ]( filter ).eq( 0 );
21729		}
21730
21731		if ( next.length ) {
21732			this.menuInstance.focus( event, next );
21733		}
21734	},
21735
21736	_getSelectedItem: function() {
21737		return this.menuItems.eq( this.element[ 0 ].selectedIndex ).parent( "li" );
21738	},
21739
21740	_toggle: function( event ) {
21741		this[ this.isOpen ? "close" : "open" ]( event );
21742	},
21743
21744	_setSelection: function() {
21745		var selection;
21746
21747		if ( !this.range ) {
21748			return;
21749		}
21750
21751		selection = window.getSelection();
21752		selection.removeAllRanges();
21753		selection.addRange( this.range );
21754	},
21755
21756	_documentClick: {
21757		mousedown: function( event ) {
21758			if ( !this.isOpen ) {
21759				return;
21760			}
21761
21762			if ( !$( event.target ).closest( ".ui-selectmenu-menu, #" +
21763				CSS.escape( this.ids.button ) ).length ) {
21764				this.close( event );
21765			}
21766		}
21767	},
21768
21769	_buttonEvents: {
21770
21771		// Prevent text selection from being reset when interacting with the selectmenu (#10144)
21772		mousedown: function() {
21773			var selection = window.getSelection();
21774			if ( selection.rangeCount ) {
21775				this.range = selection.getRangeAt( 0 );
21776			}
21777		},
21778
21779		click: function( event ) {
21780			this._setSelection();
21781			this._toggle( event );
21782		},
21783
21784		keydown: function( event ) {
21785			var preventDefault = true;
21786			switch ( event.keyCode ) {
21787			case $.ui.keyCode.TAB:
21788			case $.ui.keyCode.ESCAPE:
21789				this.close( event );
21790				preventDefault = false;
21791				break;
21792			case $.ui.keyCode.ENTER:
21793				if ( this.isOpen ) {
21794					this._selectFocusedItem( event );
21795				}
21796				break;
21797			case $.ui.keyCode.UP:
21798				if ( event.altKey ) {
21799					this._toggle( event );
21800				} else {
21801					this._move( "prev", event );
21802				}
21803				break;
21804			case $.ui.keyCode.DOWN:
21805				if ( event.altKey ) {
21806					this._toggle( event );
21807				} else {
21808					this._move( "next", event );
21809				}
21810				break;
21811			case $.ui.keyCode.SPACE:
21812				if ( this.isOpen ) {
21813					this._selectFocusedItem( event );
21814				} else {
21815					this._toggle( event );
21816				}
21817				break;
21818			case $.ui.keyCode.LEFT:
21819				this._move( "prev", event );
21820				break;
21821			case $.ui.keyCode.RIGHT:
21822				this._move( "next", event );
21823				break;
21824			case $.ui.keyCode.HOME:
21825			case $.ui.keyCode.PAGE_UP:
21826				this._move( "first", event );
21827				break;
21828			case $.ui.keyCode.END:
21829			case $.ui.keyCode.PAGE_DOWN:
21830				this._move( "last", event );
21831				break;
21832			default:
21833				this.menu.trigger( event );
21834				preventDefault = false;
21835			}
21836
21837			if ( preventDefault ) {
21838				event.preventDefault();
21839			}
21840		}
21841	},
21842
21843	_selectFocusedItem: function( event ) {
21844		var item = this.menuItems.eq( this.focusIndex ).parent( "li" );
21845		if ( !item.hasClass( "ui-state-disabled" ) ) {
21846			this._select( item.data( "ui-selectmenu-item" ), event );
21847		}
21848	},
21849
21850	_select: function( item, event ) {
21851		var oldIndex = this.element[ 0 ].selectedIndex;
21852
21853		// Change native select element
21854		this.element[ 0 ].selectedIndex = item.index;
21855		this.buttonItem.replaceWith( this.buttonItem = this._renderButtonItem( item ) );
21856		this._setAria( item );
21857		this._trigger( "select", event, { item: item } );
21858
21859		if ( item.index !== oldIndex ) {
21860			this._trigger( "change", event, { item: item } );
21861		}
21862
21863		this.close( event );
21864	},
21865
21866	_setAria: function( item ) {
21867		var id = this.menuItems.eq( item.index ).attr( "id" );
21868
21869		this.button.attr( {
21870			"aria-labelledby": id,
21871			"aria-activedescendant": id
21872		} );
21873		this.menu.attr( "aria-activedescendant", id );
21874	},
21875
21876	_setOption: function( key, value ) {
21877		if ( key === "icons" ) {
21878			var icon = this.button.find( "span.ui-icon" );
21879			this._removeClass( icon, null, this.options.icons.button )
21880				._addClass( icon, null, value.button );
21881		}
21882
21883		this._super( key, value );
21884
21885		if ( key === "appendTo" ) {
21886			this.menuWrap.appendTo( this._appendTo() );
21887		}
21888
21889		if ( key === "width" ) {
21890			this._resizeButton();
21891		}
21892	},
21893
21894	_setOptionDisabled: function( value ) {
21895		this._super( value );
21896
21897		this.menuInstance.option( "disabled", value );
21898		this.button.attr( "aria-disabled", value );
21899		this._toggleClass( this.button, null, "ui-state-disabled", value );
21900
21901		this.element.prop( "disabled", value );
21902		if ( value ) {
21903			this.button.attr( "tabindex", -1 );
21904			this.close();
21905		} else {
21906			this.button.attr( "tabindex", 0 );
21907		}
21908	},
21909
21910	_appendTo: function() {
21911		var element = this.options.appendTo;
21912
21913		if ( element ) {
21914			element = element.jquery || element.nodeType ?
21915				$( element ) :
21916				this.document.find( element ).eq( 0 );
21917		}
21918
21919		if ( !element || !element[ 0 ] ) {
21920			element = this.element.closest( ".ui-front, dialog" );
21921		}
21922
21923		if ( !element.length ) {
21924			element = this.document[ 0 ].body;
21925		}
21926
21927		return element;
21928	},
21929
21930	_toggleAttr: function() {
21931		this.button.attr( "aria-expanded", this.isOpen );
21932
21933		// We can't use two _toggleClass() calls here, because we need to make sure
21934		// we always remove classes first and add them second, otherwise if both classes have the
21935		// same theme class, it will be removed after we add it.
21936		this._removeClass( this.button, "ui-selectmenu-button-" +
21937			( this.isOpen ? "closed" : "open" ) )
21938			._addClass( this.button, "ui-selectmenu-button-" +
21939				( this.isOpen ? "open" : "closed" ) )
21940			._toggleClass( this.menuWrap, "ui-selectmenu-open", null, this.isOpen );
21941
21942		this.menu.attr( "aria-hidden", !this.isOpen );
21943	},
21944
21945	_resizeButton: function() {
21946		var width = this.options.width;
21947
21948		// For `width: false`, just remove inline style and stop
21949		if ( width === false ) {
21950			this.button.css( "width", "" );
21951			return;
21952		}
21953
21954		// For `width: null`, match the width of the original element
21955		if ( width === null ) {
21956			width = this.element.show().outerWidth();
21957			this.element.hide();
21958		}
21959
21960		this.button.outerWidth( width );
21961	},
21962
21963	_resizeMenu: function() {
21964		this.menu.outerWidth( Math.max(
21965			this.button.outerWidth(),
21966			this.menu.width( "" ).outerWidth()
21967		) );
21968	},
21969
21970	_getCreateOptions: function() {
21971		var options = this._super();
21972
21973		options.disabled = this.element.prop( "disabled" );
21974
21975		return options;
21976	},
21977
21978	_parseOptions: function( options ) {
21979		var that = this,
21980			data = [];
21981		options.each( function( index, item ) {
21982			data.push( that._parseOption( $( item ), index ) );
21983		} );
21984		this.items = data;
21985	},
21986
21987	_parseOption: function( option, index ) {
21988		var optgroup = option.parent( "optgroup" );
21989
21990		return {
21991			element: option,
21992			index: index,
21993			value: option.val(),
21994			label: option.text(),
21995			hidden: optgroup.prop( "hidden" ) || option.prop( "hidden" ),
21996			optgroup: optgroup.attr( "label" ) || "",
21997			disabled: optgroup.prop( "disabled" ) || option.prop( "disabled" )
21998		};
21999	},
22000
22001	_destroy: function() {
22002		this._unbindFormResetHandler();
22003		this.menuWrap.remove();
22004		this.button.remove();
22005		this.element.show();
22006		this.element.removeUniqueId();
22007		this.labels.attr( "for", this.ids.element );
22008	}
22009} ] );
22010
22011
22012/*!
22013 * jQuery UI Slider 1.14.
vendor: 2,981 bytes, lines 22013-22129
220130
22014 * https://jqueryui.com
22015 *
22016 * Copyright OpenJS Foundation and other contributors
22017 * Released under the MIT license.
22018 * https://jquery.org/license
22019 */
22020
22021//>>label: Slider
22022//>>group: Widgets
22023//>>description: Displays a flexible slider with ranges and accessibility via keyboard.
22024//>>docs: https://api.jqueryui.com/slider/
22025//>>demos: https://jqueryui.com/slider/
22026//>>css.structure: ../../themes/base/core.css
22027//>>css.structure: ../../themes/base/slider.css
22028//>>css.theme: ../../themes/base/theme.css
22029
22030
22031var widgetsSlider = $.widget( "ui.slider", $.ui.mouse, {
22032	version: "1.14.0",
22033	widgetEventPrefix: "slide",
22034
22035	options: {
22036		animate: false,
22037		classes: {
22038			"ui-slider": "ui-corner-all",
22039			"ui-slider-handle": "ui-corner-all",
22040
22041			// Note: ui-widget-header isn't the most fittingly semantic framework class for this
22042			// element, but worked best visually with a variety of themes
22043			"ui-slider-range": "ui-corner-all ui-widget-header"
22044		},
22045		distance: 0,
22046		max: 100,
22047		min: 0,
22048		orientation: "horizontal",
22049		range: false,
22050		step: 1,
22051		value: 0,
22052		values: null,
22053
22054		// Callbacks
22055		change: null,
22056		slide: null,
22057		start: null,
22058		stop: null
22059	},
22060
22061	// Number of pages in a slider
22062	// (how many times can you page up/down to go through the whole range)
22063	numPages: 5,
22064
22065	_create: function() {
22066		this._keySliding = false;
22067		this._mouseSliding = false;
22068		this._animateOff = true;
22069		this._handleIndex = null;
22070		this._detectOrientation();
22071		this._mouseInit();
22072		this._calculateNewMax();
22073
22074		this._addClass( "ui-slider ui-slider-" + this.orientation,
22075			"ui-widget ui-widget-content" );
22076
22077		this._refresh();
22078
22079		this._animateOff = false;
22080	},
22081
22082	_refresh: function() {
22083		this._createRange();
22084		this._createHandles();
22085		this._setupEvents();
22086		this._refreshValue();
22087	},
22088
22089	_createHandles: function() {
22090		var i, handleCount,
22091			options = this.options,
22092			existingHandles = this.element.find( ".ui-slider-handle" ),
22093			handle = "<span tabindex='0'></span>",
22094			handles = [];
22095
22096		handleCount = ( options.values && options.values.length ) || 1;
22097
22098		if ( existingHandles.length > handleCount ) {
22099			existingHandles.slice( handleCount ).remove();
22100			existingHandles = existingHandles.slice( 0, handleCount );
22101		}
22102
22103		for ( i = existingHandles.length; i < handleCount; i++ ) {
22104			handles.push( handle );
22105		}
22106
22107		this.handles = existingHandles.add( $( handles.join( "" ) ).appendTo( this.element ) );
22108
22109		this._addClass( this.handles, "ui-slider-handle", "ui-state-default" );
22110
22111		this.handle = this.handles.eq( 0 );
22112
22113		this.handles.each( function( i ) {
22114			$( this )
22115				.data( "ui-slider-handle-index", i )
22116				.attr( "tabIndex", 0 );
22117		} );
22118	},
22119
22120	_createRange: function() {
22121		var options = this.options;
22122
22123		if ( options.range ) {
22124			if ( options.range === true ) {
22125				if ( !options.values ) {
22126					options.values = [ this._valueMin(), this._valueMin() ];
22127				} else if ( options.values.length && options.values.length !== 2 ) {
22128					options.values = [ options.values[ 0 ], options.values[ 0 ] ];
22129				} else if ( Array
vendor: 6,343 bytes, lines 22129-22375
22129.isArray( options.values ) ) {
22130					options.values = options.values.slice( 0 );
22131				}
22132			}
22133
22134			if ( !this.range || !this.range.length ) {
22135				this.range = $( "<div>" )
22136					.appendTo( this.element );
22137
22138				this._addClass( this.range, "ui-slider-range" );
22139			} else {
22140				this._removeClass( this.range, "ui-slider-range-min ui-slider-range-max" );
22141
22142				// Handle range switching from true to min/max
22143				this.range.css( {
22144					"left": "",
22145					"bottom": ""
22146				} );
22147			}
22148			if ( options.range === "min" || options.range === "max" ) {
22149				this._addClass( this.range, "ui-slider-range-" + options.range );
22150			}
22151		} else {
22152			if ( this.range ) {
22153				this.range.remove();
22154			}
22155			this.range = null;
22156		}
22157	},
22158
22159	_setupEvents: function() {
22160		this._off( this.handles );
22161		this._on( this.handles, this._handleEvents );
22162		this._hoverable( this.handles );
22163		this._focusable( this.handles );
22164	},
22165
22166	_destroy: function() {
22167		this.handles.remove();
22168		if ( this.range ) {
22169			this.range.remove();
22170		}
22171
22172		this._mouseDestroy();
22173	},
22174
22175	_mouseCapture: function( event ) {
22176		var position, normValue, distance, closestHandle, index, allowed, offset, mouseOverHandle,
22177			that = this,
22178			o = this.options;
22179
22180		if ( o.disabled ) {
22181			return false;
22182		}
22183
22184		this.elementSize = {
22185			width: this.element.outerWidth(),
22186			height: this.element.outerHeight()
22187		};
22188		this.elementOffset = this.element.offset();
22189
22190		position = { x: event.pageX, y: event.pageY };
22191		normValue = this._normValueFromMouse( position );
22192		distance = this._valueMax() - this._valueMin() + 1;
22193		this.handles.each( function( i ) {
22194			var thisDistance = Math.abs( normValue - that.values( i ) );
22195			if ( ( distance > thisDistance ) ||
22196				( distance === thisDistance &&
22197					( i === that._lastChangedValue || that.values( i ) === o.min ) ) ) {
22198				distance = thisDistance;
22199				closestHandle = $( this );
22200				index = i;
22201			}
22202		} );
22203
22204		allowed = this._start( event, index );
22205		if ( allowed === false ) {
22206			return false;
22207		}
22208		this._mouseSliding = true;
22209
22210		this._handleIndex = index;
22211
22212		this._addClass( closestHandle, null, "ui-state-active" );
22213		closestHandle.trigger( "focus" );
22214
22215		offset = closestHandle.offset();
22216		mouseOverHandle = !$( event.target ).parents().addBack().is( ".ui-slider-handle" );
22217		this._clickOffset = mouseOverHandle ? { left: 0, top: 0 } : {
22218			left: event.pageX - offset.left - ( closestHandle.width() / 2 ),
22219			top: event.pageY - offset.top -
22220				( closestHandle.height() / 2 ) -
22221				( parseInt( closestHandle.css( "borderTopWidth" ), 10 ) || 0 ) -
22222				( parseInt( closestHandle.css( "borderBottomWidth" ), 10 ) || 0 ) +
22223				( parseInt( closestHandle.css( "marginTop" ), 10 ) || 0 )
22224		};
22225
22226		if ( !this.handles.hasClass( "ui-state-hover" ) ) {
22227			this._slide( event, index, normValue );
22228		}
22229		this._animateOff = true;
22230		return true;
22231	},
22232
22233	_mouseStart: function() {
22234		return true;
22235	},
22236
22237	_mouseDrag: function( event ) {
22238		var position = { x: event.pageX, y: event.pageY },
22239			normValue = this._normValueFromMouse( position );
22240
22241		this._slide( event, this._handleIndex, normValue );
22242
22243		return false;
22244	},
22245
22246	_mouseStop: function( event ) {
22247		this._removeClass( this.handles, null, "ui-state-active" );
22248		this._mouseSliding = false;
22249
22250		this._stop( event, this._handleIndex );
22251		this._change( event, this._handleIndex );
22252
22253		this._handleIndex = null;
22254		this._clickOffset = null;
22255		this._animateOff = false;
22256
22257		return false;
22258	},
22259
22260	_detectOrientation: function() {
22261		this.orientation = ( this.options.orientation === "vertical" ) ? "vertical" : "horizontal";
22262	},
22263
22264	_normValueFromMouse: function( position ) {
22265		var pixelTotal,
22266			pixelMouse,
22267			percentMouse,
22268			valueTotal,
22269			valueMouse;
22270
22271		if ( this.orientation === "horizontal" ) {
22272			pixelTotal = this.elementSize.width;
22273			pixelMouse = position.x - this.elementOffset.left -
22274				( this._clickOffset ? this._clickOffset.left : 0 );
22275		} else {
22276			pixelTotal = this.elementSize.height;
22277			pixelMouse = position.y - this.elementOffset.top -
22278				( this._clickOffset ? this._clickOffset.top : 0 );
22279		}
22280
22281		percentMouse = ( pixelMouse / pixelTotal );
22282		if ( percentMouse > 1 ) {
22283			percentMouse = 1;
22284		}
22285		if ( percentMouse < 0 ) {
22286			percentMouse = 0;
22287		}
22288		if ( this.orientation === "vertical" ) {
22289			percentMouse = 1 - percentMouse;
22290		}
22291
22292		valueTotal = this._valueMax() - this._valueMin();
22293		valueMouse = this._valueMin() + percentMouse * valueTotal;
22294
22295		return this._trimAlignValue( valueMouse );
22296	},
22297
22298	_uiHash: function( index, value, values ) {
22299		var uiHash = {
22300			handle: this.handles[ index ],
22301			handleIndex: index,
22302			value: value !== undefined ? value : this.value()
22303		};
22304
22305		if ( this._hasMultipleValues() ) {
22306			uiHash.value = value !== undefined ? value : this.values( index );
22307			uiHash.values = values || this.values();
22308		}
22309
22310		return uiHash;
22311	},
22312
22313	_hasMultipleValues: function() {
22314		return this.options.values && this.options.values.length;
22315	},
22316
22317	_start: function( event, index ) {
22318		return this._trigger( "start", event, this._uiHash( index ) );
22319	},
22320
22321	_slide: function( event, index, newVal ) {
22322		var allowed, otherVal,
22323			currentValue = this.value(),
22324			newValues = this.values();
22325
22326		if ( this._hasMultipleValues() ) {
22327			otherVal = this.values( index ? 0 : 1 );
22328			currentValue = this.values( index );
22329
22330			if ( this.options.values.length === 2 && this.options.range === true ) {
22331				newVal =  index === 0 ? Math.min( otherVal, newVal ) : Math.max( otherVal, newVal );
22332			}
22333
22334			newValues[ index ] = newVal;
22335		}
22336
22337		if ( newVal === currentValue ) {
22338			return;
22339		}
22340
22341		allowed = this._trigger( "slide", event, this._uiHash( index, newVal, newValues ) );
22342
22343		// A slide can be canceled by returning false from the slide callback
22344		if ( allowed === false ) {
22345			return;
22346		}
22347
22348		if ( this._hasMultipleValues() ) {
22349			this.values( index, newVal );
22350		} else {
22351			this.value( newVal );
22352		}
22353	},
22354
22355	_stop: function( event, index ) {
22356		this._trigger( "stop", event, this._uiHash( index ) );
22357	},
22358
22359	_change: function( event, index ) {
22360		if ( !this._keySliding && !this._mouseSliding ) {
22361
22362			//store the last changed value index for reference when handles overlap
22363			this._lastChangedValue = index;
22364			this._trigger( "change", event, this._uiHash( index ) );
22365		}
22366	},
22367
22368	value: function( newValue ) {
22369		if ( arguments.length ) {
22370			this.options.value = this._trimAlignValue( newValue );
22371			this._refreshValue();
22372			this._change( null, 0 );
22373			return;
22374		}
22375
vendor: 4,358 bytes, lines 22376-22548
22376		return this._value();
22377	},
22378
22379	values: function( index, newValue ) {
22380		var vals,
22381			newValues,
22382			i;
22383
22384		if ( arguments.length > 1 ) {
22385			this.options.values[ index ] = this._trimAlignValue( newValue );
22386			this._refreshValue();
22387			this._change( null, index );
22388			return;
22389		}
22390
22391		if ( arguments.length ) {
22392			if ( Array.isArray( arguments[ 0 ] ) ) {
22393				vals = this.options.values;
22394				newValues = arguments[ 0 ];
22395				for ( i = 0; i < vals.length; i += 1 ) {
22396					vals[ i ] = this._trimAlignValue( newValues[ i ] );
22397					this._change( null, i );
22398				}
22399				this._refreshValue();
22400			} else {
22401				if ( this._hasMultipleValues() ) {
22402					return this._values( index );
22403				} else {
22404					return this.value();
22405				}
22406			}
22407		} else {
22408			return this._values();
22409		}
22410	},
22411
22412	_setOption: function( key, value ) {
22413		var i,
22414			valsLength = 0;
22415
22416		if ( key === "range" && this.options.range === true ) {
22417			if ( value === "min" ) {
22418				this.options.value = this._values( 0 );
22419				this.options.values = null;
22420			} else if ( value === "max" ) {
22421				this.options.value = this._values( this.options.values.length - 1 );
22422				this.options.values = null;
22423			}
22424		}
22425
22426		if ( Array.isArray( this.options.values ) ) {
22427			valsLength = this.options.values.length;
22428		}
22429
22430		this._super( key, value );
22431
22432		switch ( key ) {
22433			case "orientation":
22434				this._detectOrientation();
22435				this._removeClass( "ui-slider-horizontal ui-slider-vertical" )
22436					._addClass( "ui-slider-" + this.orientation );
22437				this._refreshValue();
22438				if ( this.options.range ) {
22439					this._refreshRange( value );
22440				}
22441
22442				// Reset positioning from previous orientation
22443				this.handles.css( value === "horizontal" ? "bottom" : "left", "" );
22444				break;
22445			case "value":
22446				this._animateOff = true;
22447				this._refreshValue();
22448				this._change( null, 0 );
22449				this._animateOff = false;
22450				break;
22451			case "values":
22452				this._animateOff = true;
22453				this._refreshValue();
22454
22455				// Start from the last handle to prevent unreachable handles (#9046)
22456				for ( i = valsLength - 1; i >= 0; i-- ) {
22457					this._change( null, i );
22458				}
22459				this._animateOff = false;
22460				break;
22461			case "step":
22462			case "min":
22463			case "max":
22464				this._animateOff = true;
22465				this._calculateNewMax();
22466				this._refreshValue();
22467				this._animateOff = false;
22468				break;
22469			case "range":
22470				this._animateOff = true;
22471				this._refresh();
22472				this._animateOff = false;
22473				break;
22474		}
22475	},
22476
22477	_setOptionDisabled: function( value ) {
22478		this._super( value );
22479
22480		this._toggleClass( null, "ui-state-disabled", !!value );
22481	},
22482
22483	//internal value getter
22484	// _value() returns value trimmed by min and max, aligned by step
22485	_value: function() {
22486		var val = this.options.value;
22487		val = this._trimAlignValue( val );
22488
22489		return val;
22490	},
22491
22492	//internal values getter
22493	// _values() returns array of values trimmed by min and max, aligned by step
22494	// _values( index ) returns single value trimmed by min and max, aligned by step
22495	_values: function( index ) {
22496		var val,
22497			vals,
22498			i;
22499
22500		if ( arguments.length ) {
22501			val = this.options.values[ index ];
22502			val = this._trimAlignValue( val );
22503
22504			return val;
22505		} else if ( this._hasMultipleValues() ) {
22506
22507			// .slice() creates a copy of the array
22508			// this copy gets trimmed by min and max and then returned
22509			vals = this.options.values.slice();
22510			for ( i = 0; i < vals.length; i += 1 ) {
22511				vals[ i ] = this._trimAlignValue( vals[ i ] );
22512			}
22513
22514			return vals;
22515		} else {
22516			return [];
22517		}
22518	},
22519
22520	// Returns the step-aligned value that val is closest to, between (inclusive) min and max
22521	_trimAlignValue: function( val ) {
22522		if ( val <= this._valueMin() ) {
22523			return this._valueMin();
22524		}
22525		if ( val >= this._valueMax() ) {
22526			return this._valueMax();
22527		}
22528		var step = ( this.options.step > 0 ) ? this.options.step : 1,
22529			valModStep = ( val - this._valueMin() ) % step,
22530			alignValue = val - valModStep;
22531
22532		if ( Math.abs( valModStep ) * 2 >= step ) {
22533			alignValue += ( valModStep > 0 ) ? step : ( -step );
22534		}
22535
22536		// Since JavaScript has problems with large floats, round
22537		// the final value to 5 digits after the decimal point (see #4124)
22538		return parseFloat( alignValue.toFixed( 5 ) );
22539	},
22540
22541	_calculateNewMax: function() {
22542		var max = this.options.max,
22543			min = this._valueMin(),
22544			step = this.options.step,
22545			aboveMin = Math.round( ( max - min ) / step ) * step;
22546		max = aboveMin + min;
22547		if ( max > this.options.max ) {
22548
vendor: 5,594 bytes, lines 22549-22748
22549			//If max is not divisible by step, rounding off may increase its value
22550			max -= step;
22551		}
22552		this.max = parseFloat( max.toFixed( this._precision() ) );
22553	},
22554
22555	_precision: function() {
22556		var precision = this._precisionOf( this.options.step );
22557		if ( this.options.min !== null ) {
22558			precision = Math.max( precision, this._precisionOf( this.options.min ) );
22559		}
22560		return precision;
22561	},
22562
22563	_precisionOf: function( num ) {
22564		var str = num.toString(),
22565			decimal = str.indexOf( "." );
22566		return decimal === -1 ? 0 : str.length - decimal - 1;
22567	},
22568
22569	_valueMin: function() {
22570		return this.options.min;
22571	},
22572
22573	_valueMax: function() {
22574		return this.max;
22575	},
22576
22577	_refreshRange: function( orientation ) {
22578		if ( orientation === "vertical" ) {
22579			this.range.css( { "width": "", "left": "" } );
22580		}
22581		if ( orientation === "horizontal" ) {
22582			this.range.css( { "height": "", "bottom": "" } );
22583		}
22584	},
22585
22586	_refreshValue: function() {
22587		var lastValPercent, valPercent, value, valueMin, valueMax,
22588			oRange = this.options.range,
22589			o = this.options,
22590			that = this,
22591			animate = ( !this._animateOff ) ? o.animate : false,
22592			_set = {};
22593
22594		if ( this._hasMultipleValues() ) {
22595			this.handles.each( function( i ) {
22596				valPercent = ( that.values( i ) - that._valueMin() ) / ( that._valueMax() -
22597					that._valueMin() ) * 100;
22598				_set[ that.orientation === "horizontal" ? "left" : "bottom" ] = valPercent + "%";
22599				$( this ).stop( 1, 1 )[ animate ? "animate" : "css" ]( _set, o.animate );
22600				if ( that.options.range === true ) {
22601					if ( that.orientation === "horizontal" ) {
22602						if ( i === 0 ) {
22603							that.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( {
22604								left: valPercent + "%"
22605							}, o.animate );
22606						}
22607						if ( i === 1 ) {
22608							that.range[ animate ? "animate" : "css" ]( {
22609								width: ( valPercent - lastValPercent ) + "%"
22610							}, {
22611								queue: false,
22612								duration: o.animate
22613							} );
22614						}
22615					} else {
22616						if ( i === 0 ) {
22617							that.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( {
22618								bottom: ( valPercent ) + "%"
22619							}, o.animate );
22620						}
22621						if ( i === 1 ) {
22622							that.range[ animate ? "animate" : "css" ]( {
22623								height: ( valPercent - lastValPercent ) + "%"
22624							}, {
22625								queue: false,
22626								duration: o.animate
22627							} );
22628						}
22629					}
22630				}
22631				lastValPercent = valPercent;
22632			} );
22633		} else {
22634			value = this.value();
22635			valueMin = this._valueMin();
22636			valueMax = this._valueMax();
22637			valPercent = ( valueMax !== valueMin ) ?
22638					( value - valueMin ) / ( valueMax - valueMin ) * 100 :
22639					0;
22640			_set[ this.orientation === "horizontal" ? "left" : "bottom" ] = valPercent + "%";
22641			this.handle.stop( 1, 1 )[ animate ? "animate" : "css" ]( _set, o.animate );
22642
22643			if ( oRange === "min" && this.orientation === "horizontal" ) {
22644				this.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( {
22645					width: valPercent + "%"
22646				}, o.animate );
22647			}
22648			if ( oRange === "max" && this.orientation === "horizontal" ) {
22649				this.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( {
22650					width: ( 100 - valPercent ) + "%"
22651				}, o.animate );
22652			}
22653			if ( oRange === "min" && this.orientation === "vertical" ) {
22654				this.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( {
22655					height: valPercent + "%"
22656				}, o.animate );
22657			}
22658			if ( oRange === "max" && this.orientation === "vertical" ) {
22659				this.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( {
22660					height: ( 100 - valPercent ) + "%"
22661				}, o.animate );
22662			}
22663		}
22664	},
22665
22666	_handleEvents: {
22667		keydown: function( event ) {
22668			var allowed, curVal, newVal, step,
22669				index = $( event.target ).data( "ui-slider-handle-index" );
22670
22671			switch ( event.keyCode ) {
22672				case $.ui.keyCode.HOME:
22673				case $.ui.keyCode.END:
22674				case $.ui.keyCode.PAGE_UP:
22675				case $.ui.keyCode.PAGE_DOWN:
22676				case $.ui.keyCode.UP:
22677				case $.ui.keyCode.RIGHT:
22678				case $.ui.keyCode.DOWN:
22679				case $.ui.keyCode.LEFT:
22680					event.preventDefault();
22681					if ( !this._keySliding ) {
22682						this._keySliding = true;
22683						this._addClass( $( event.target ), null, "ui-state-active" );
22684						allowed = this._start( event, index );
22685						if ( allowed === false ) {
22686							return;
22687						}
22688					}
22689					break;
22690			}
22691
22692			step = this.options.step;
22693			if ( this._hasMultipleValues() ) {
22694				curVal = newVal = this.values( index );
22695			} else {
22696				curVal = newVal = this.value();
22697			}
22698
22699			switch ( event.keyCode ) {
22700				case $.ui.keyCode.HOME:
22701					newVal = this._valueMin();
22702					break;
22703				case $.ui.keyCode.END:
22704					newVal = this._valueMax();
22705					break;
22706				case $.ui.keyCode.PAGE_UP:
22707					newVal = this._trimAlignValue(
22708						curVal + ( ( this._valueMax() - this._valueMin() ) / this.numPages )
22709					);
22710					break;
22711				case $.ui.keyCode.PAGE_DOWN:
22712					newVal = this._trimAlignValue(
22713						curVal - ( ( this._valueMax() - this._valueMin() ) / this.numPages ) );
22714					break;
22715				case $.ui.keyCode.UP:
22716				case $.ui.keyCode.RIGHT:
22717					if ( curVal === this._valueMax() ) {
22718						return;
22719					}
22720					newVal = this._trimAlignValue( curVal + step );
22721					break;
22722				case $.ui.keyCode.DOWN:
22723				case $.ui.keyCode.LEFT:
22724					if ( curVal === this._valueMin() ) {
22725						return;
22726					}
22727					newVal = this._trimAlignValue( curVal - step );
22728					break;
22729			}
22730
22731			this._slide( event, index, newVal );
22732		},
22733		keyup: function( event ) {
22734			var index = $( event.target ).data( "ui-slider-handle-index" );
22735
22736			if ( this._keySliding ) {
22737				this._keySliding = false;
22738				this._stop( event, index );
22739				this._change( event, index );
22740				this._removeClass( $( event.target ), null, "ui-state-active" );
22741			}
22742		}
22743	}
22744} );
22745
22746
22747/*!
22748 * jQuery UI Sortable 1.1
227484.0
22749 * https://jqueryui.com
22750 *
22751 * Copyright OpenJS Foundation and other contributors
22752 * Released under the MIT license.
22753 * https://jquery.org/license
22754 */
22755
22756//>>label: Sortable
22757//>>group: Interactions
22758//>>description: Enables items in a list to be sorted using the mouse.
22759//>>docs: https://api.jqueryui.com/sortable/
22760//>>demos: https://jqueryui.com/sortable/
22761//>>css.structure: ../../themes/base/sortable.css
22762
22763
22764var widgetsSortable = $.widget( "ui.sortable", $.ui.mouse, {
22765	version: "1.14.0
vendor: 7,827 bytes, lines 22765-23080
22765",
22766	widgetEventPrefix: "sort",
22767	ready: false,
22768	options: {
22769		appendTo: "parent",
22770		axis: false,
22771		connectWith: false,
22772		containment: false,
22773		cursor: "auto",
22774		cursorAt: false,
22775		dropOnEmpty: true,
22776		forcePlaceholderSize: false,
22777		forceHelperSize: false,
22778		grid: false,
22779		handle: false,
22780		helper: "original",
22781		items: "> *",
22782		opacity: false,
22783		placeholder: false,
22784		revert: false,
22785		scroll: true,
22786		scrollSensitivity: 20,
22787		scrollSpeed: 20,
22788		scope: "default",
22789		tolerance: "intersect",
22790		zIndex: 1000,
22791
22792		// Callbacks
22793		activate: null,
22794		beforeStop: null,
22795		change: null,
22796		deactivate: null,
22797		out: null,
22798		over: null,
22799		receive: null,
22800		remove: null,
22801		sort: null,
22802		start: null,
22803		stop: null,
22804		update: null
22805	},
22806
22807	_isOverAxis: function( x, reference, size ) {
22808		return ( x >= reference ) && ( x < ( reference + size ) );
22809	},
22810
22811	_isFloating: function( item ) {
22812		return ( /left|right/ ).test( item.css( "float" ) ) ||
22813			( /inline|table-cell/ ).test( item.css( "display" ) );
22814	},
22815
22816	_create: function() {
22817		this.containerCache = {};
22818		this._addClass( "ui-sortable" );
22819
22820		//Get the items
22821		this.refresh();
22822
22823		//Let's determine the parent's offset
22824		this.offset = this.element.offset();
22825
22826		//Initialize mouse events for interaction
22827		this._mouseInit();
22828
22829		this._setHandleClassName();
22830
22831		//We're ready to go
22832		this.ready = true;
22833
22834	},
22835
22836	_setOption: function( key, value ) {
22837		this._super( key, value );
22838
22839		if ( key === "handle" ) {
22840			this._setHandleClassName();
22841		}
22842	},
22843
22844	_setHandleClassName: function() {
22845		var that = this;
22846		this._removeClass( this.element.find( ".ui-sortable-handle" ), "ui-sortable-handle" );
22847		$.each( this.items, function() {
22848			that._addClass(
22849				this.instance.options.handle ?
22850					this.item.find( this.instance.options.handle ) :
22851					this.item,
22852				"ui-sortable-handle"
22853			);
22854		} );
22855	},
22856
22857	_destroy: function() {
22858		this._mouseDestroy();
22859
22860		for ( var i = this.items.length - 1; i >= 0; i-- ) {
22861			this.items[ i ].item.removeData( this.widgetName + "-item" );
22862		}
22863
22864		return this;
22865	},
22866
22867	_mouseCapture: function( event, overrideHandle ) {
22868		var currentItem = null,
22869			validHandle = false,
22870			that = this;
22871
22872		if ( this.reverting ) {
22873			return false;
22874		}
22875
22876		if ( this.options.disabled || this.options.type === "static" ) {
22877			return false;
22878		}
22879
22880		//We have to refresh the items data once first
22881		this._refreshItems( event );
22882
22883		//Find out if the clicked node (or one of its parents) is a actual item in this.items
22884		$( event.target ).parents().each( function() {
22885			if ( $.data( this, that.widgetName + "-item" ) === that ) {
22886				currentItem = $( this );
22887				return false;
22888			}
22889		} );
22890		if ( $.data( event.target, that.widgetName + "-item" ) === that ) {
22891			currentItem = $( event.target );
22892		}
22893
22894		if ( !currentItem ) {
22895			return false;
22896		}
22897		if ( this.options.handle && !overrideHandle ) {
22898			$( this.options.handle, currentItem ).find( "*" ).addBack().each( function() {
22899				if ( this === event.target ) {
22900					validHandle = true;
22901				}
22902			} );
22903			if ( !validHandle ) {
22904				return false;
22905			}
22906		}
22907
22908		this.currentItem = currentItem;
22909		this._removeCurrentsFromItems();
22910		return true;
22911
22912	},
22913
22914	_mouseStart: function( event, overrideHandle, noActivation ) {
22915
22916		var i, body,
22917			o = this.options;
22918
22919		this.currentContainer = this;
22920
22921		//We only need to call refreshPositions, because the refreshItems call has been moved to
22922		// mouseCapture
22923		this.refreshPositions();
22924
22925		//Prepare the dragged items parent
22926		this.appendTo = $( o.appendTo !== "parent" ?
22927				o.appendTo :
22928				this.currentItem.parent() );
22929
22930		//Create and append the visible helper
22931		this.helper = this._createHelper( event );
22932
22933		//Cache the helper size
22934		this._cacheHelperProportions();
22935
22936		/*
22937		 * - Position generation -
22938		 * This block generates everything position related - it's the core of draggables.
22939		 */
22940
22941		//Cache the margins of the original element
22942		this._cacheMargins();
22943
22944		//The element's absolute position on the page minus margins
22945		this.offset = this.currentItem.offset();
22946		this.offset = {
22947			top: this.offset.top - this.margins.top,
22948			left: this.offset.left - this.margins.left
22949		};
22950
22951		$.extend( this.offset, {
22952			click: { //Where the click happened, relative to the element
22953				left: event.pageX - this.offset.left,
22954				top: event.pageY - this.offset.top
22955			},
22956
22957			// This is a relative to absolute position minus the actual position calculation -
22958			// only used for relative positioned helper
22959			relative: this._getRelativeOffset()
22960		} );
22961
22962		// After we get the helper offset, but before we get the parent offset we can
22963		// change the helper's position to absolute
22964		// TODO: Still need to figure out a way to make relative sorting possible
22965		this.helper.css( "position", "absolute" );
22966		this.cssPosition = this.helper.css( "position" );
22967
22968		//Adjust the mouse offset relative to the helper if "cursorAt" is supplied
22969		if ( o.cursorAt ) {
22970			this._adjustOffsetFromHelper( o.cursorAt );
22971		}
22972
22973		//Cache the former DOM position
22974		this.domPosition = {
22975			prev: this.currentItem.prev()[ 0 ],
22976			parent: this.currentItem.parent()[ 0 ]
22977		};
22978
22979		// If the helper is not the original, hide the original so it's not playing any role during
22980		// the drag, won't cause anything bad this way
22981		if ( this.helper[ 0 ] !== this.currentItem[ 0 ] ) {
22982			this.currentItem.hide();
22983		}
22984
22985		//Create the placeholder
22986		this._createPlaceholder();
22987
22988		//Get the next scrolling parent
22989		this.scrollParent = this.placeholder.scrollParent();
22990
22991		$.extend( this.offset, {
22992			parent: this._getParentOffset()
22993		} );
22994
22995		//Set a containment if given in the options
22996		if ( o.containment ) {
22997			this._setContainment();
22998		}
22999
23000		if ( o.cursor && o.cursor !== "auto" ) { // cursor option
23001			body = this.document.find( "body" );
23002
23003			this._storedStylesheet =
23004				$( "<style>*{ cursor: " + o.cursor + " !important; }</style>" ).appendTo( body );
23005		}
23006
23007		// We need to make sure to grab the zIndex before setting the
23008		// opacity, because setting the opacity to anything lower than 1
23009		// causes the zIndex to change from "auto" to 0.
23010		if ( o.zIndex ) { // zIndex option
23011			if ( this.helper.css( "zIndex" ) ) {
23012				this._storedZIndex = this.helper.css( "zIndex" );
23013			}
23014			this.helper.css( "zIndex", o.zIndex );
23015		}
23016
23017		if ( o.opacity ) { // opacity option
23018			if ( this.helper.css( "opacity" ) ) {
23019				this._storedOpacity = this.helper.css( "opacity" );
23020			}
23021			this.helper.css( "opacity", o.opacity );
23022		}
23023
23024		//Prepare scrolling
23025		if ( this.scrollParent[ 0 ] !== this.document[ 0 ] &&
23026				this.scrollParent[ 0 ].tagName !== "HTML" ) {
23027			this.overflowOffset = this.scrollParent.offset();
23028		}
23029
23030		//Call callbacks
23031		this._trigger( "start", event, this._uiHash() );
23032
23033		//Recache the helper size
23034		if ( !this._preserveHelperProportions ) {
23035			this._cacheHelperProportions();
23036		}
23037
23038		//Post "activate" events to possible containers
23039		if ( !noActivation ) {
23040			for ( i = this.containers.length - 1; i >= 0; i-- ) {
23041				this.containers[ i ]._trigger( "activate", event, this._uiHash( this ) );
23042			}
23043		}
23044
23045		//Prepare possible droppables
23046		if ( $.ui.ddmanager ) {
23047			$.ui.ddmanager.current = this;
23048		}
23049
23050		if ( $.ui.ddmanager && !o.dropBehaviour ) {
23051			$.ui.ddmanager.prepareOffsets( this, event );
23052		}
23053
23054		this.dragging = true;
23055
23056		this._addClass( this.helper, "ui-sortable-helper" );
23057
23058		//Move the helper, if needed
23059		if ( !this.helper.parent().is( this.appendTo ) ) {
23060			this.helper.detach().appendTo( this.appendTo );
23061
23062			//Update position
23063			this.offset.parent = this._getParentOffset();
23064		}
23065
23066		//Generate the original position
23067		this.position = this.originalPosition = this._generatePosition( event );
23068		this.originalPageX = event.pageX;
23069		this.originalPageY = event.pageY;
23070		this.lastPositionAbs = this.positionAbs = this._convertPositionTo( "absolute" );
23071
23072		this._mouseDrag( event );
23073
23074		return true;
23075
23076	},
23077
23078	_scroll: function( event ) {
23079		var o = this.options,
23080			scrolled = false;
vendor: 4,489 bytes, lines 23081-23223
23081
23082		if ( this.scrollParent[ 0 ] !== this.document[ 0 ] &&
23083				this.scrollParent[ 0 ].tagName !== "HTML" ) {
23084
23085			if ( ( this.overflowOffset.top + this.scrollParent[ 0 ].offsetHeight ) -
23086					event.pageY < o.scrollSensitivity ) {
23087				this.scrollParent[ 0 ].scrollTop =
23088					scrolled = this.scrollParent[ 0 ].scrollTop + o.scrollSpeed;
23089			} else if ( event.pageY - this.overflowOffset.top < o.scrollSensitivity ) {
23090				this.scrollParent[ 0 ].scrollTop =
23091					scrolled = this.scrollParent[ 0 ].scrollTop - o.scrollSpeed;
23092			}
23093
23094			if ( ( this.overflowOffset.left + this.scrollParent[ 0 ].offsetWidth ) -
23095					event.pageX < o.scrollSensitivity ) {
23096				this.scrollParent[ 0 ].scrollLeft = scrolled =
23097					this.scrollParent[ 0 ].scrollLeft + o.scrollSpeed;
23098			} else if ( event.pageX - this.overflowOffset.left < o.scrollSensitivity ) {
23099				this.scrollParent[ 0 ].scrollLeft = scrolled =
23100					this.scrollParent[ 0 ].scrollLeft - o.scrollSpeed;
23101			}
23102
23103		} else {
23104
23105			if ( event.pageY - this.document.scrollTop() < o.scrollSensitivity ) {
23106				scrolled = this.document.scrollTop( this.document.scrollTop() - o.scrollSpeed );
23107			} else if ( this.window.height() - ( event.pageY - this.document.scrollTop() ) <
23108					o.scrollSensitivity ) {
23109				scrolled = this.document.scrollTop( this.document.scrollTop() + o.scrollSpeed );
23110			}
23111
23112			if ( event.pageX - this.document.scrollLeft() < o.scrollSensitivity ) {
23113				scrolled = this.document.scrollLeft(
23114					this.document.scrollLeft() - o.scrollSpeed
23115				);
23116			} else if ( this.window.width() - ( event.pageX - this.document.scrollLeft() ) <
23117					o.scrollSensitivity ) {
23118				scrolled = this.document.scrollLeft(
23119					this.document.scrollLeft() + o.scrollSpeed
23120				);
23121			}
23122
23123		}
23124
23125		return scrolled;
23126	},
23127
23128	_mouseDrag: function( event ) {
23129		var i, item, itemElement, intersection,
23130			o = this.options;
23131
23132		//Compute the helpers position
23133		this.position = this._generatePosition( event );
23134		this.positionAbs = this._convertPositionTo( "absolute" );
23135
23136		//Set the helper position
23137		if ( !this.options.axis || this.options.axis !== "y" ) {
23138			this.helper[ 0 ].style.left = this.position.left + "px";
23139		}
23140		if ( !this.options.axis || this.options.axis !== "x" ) {
23141			this.helper[ 0 ].style.top = this.position.top + "px";
23142		}
23143
23144		//Do scrolling
23145		if ( o.scroll ) {
23146			if ( this._scroll( event ) !== false ) {
23147
23148				//Update item positions used in position checks
23149				this._refreshItemPositions( true );
23150
23151				if ( $.ui.ddmanager && !o.dropBehaviour ) {
23152					$.ui.ddmanager.prepareOffsets( this, event );
23153				}
23154			}
23155		}
23156
23157		this.dragDirection = {
23158			vertical: this._getDragVerticalDirection(),
23159			horizontal: this._getDragHorizontalDirection()
23160		};
23161
23162		//Rearrange
23163		for ( i = this.items.length - 1; i >= 0; i-- ) {
23164
23165			//Cache variables and intersection, continue if no intersection
23166			item = this.items[ i ];
23167			itemElement = item.item[ 0 ];
23168			intersection = this._intersectsWithPointer( item );
23169			if ( !intersection ) {
23170				continue;
23171			}
23172
23173			// Only put the placeholder inside the current Container, skip all
23174			// items from other containers. This works because when moving
23175			// an item from one container to another the
23176			// currentContainer is switched before the placeholder is moved.
23177			//
23178			// Without this, moving items in "sub-sortables" can cause
23179			// the placeholder to jitter between the outer and inner container.
23180			if ( item.instance !== this.currentContainer ) {
23181				continue;
23182			}
23183
23184			// Cannot intersect with itself
23185			// no useless actions that have been done before
23186			// no action if the item moved is the parent of the item checked
23187			if ( itemElement !== this.currentItem[ 0 ] &&
23188				this.placeholder[ intersection === 1 ?
23189				"next" : "prev" ]()[ 0 ] !== itemElement &&
23190				!$.contains( this.placeholder[ 0 ], itemElement ) &&
23191				( this.options.type === "semi-dynamic" ?
23192					!$.contains( this.element[ 0 ], itemElement ) :
23193					true
23194				)
23195			) {
23196
23197				this.direction = intersection === 1 ? "down" : "up";
23198
23199				if ( this.options.tolerance === "pointer" ||
23200						this._intersectsWithSides( item ) ) {
23201					this._rearrange( event, item );
23202				} else {
23203					break;
23204				}
23205
23206				this._trigger( "change", event, this._uiHash() );
23207				break;
23208			}
23209		}
23210
23211		//Post events to containers
23212		this._contactContainers( event );
23213
23214		//Interconnect with droppables
23215		if ( $.ui.ddmanager ) {
23216			$.ui.ddmanager.drag( this, event );
23217		}
23218
23219		//Call callbacks
23220		this._trigger( "sort", event, this._uiHash() );
23221
23222		this.lastPositionAbs = this.positionAbs;
23223		return false;
vendor: 5,063 bytes, lines 23224-23413
23224
23225	},
23226
23227	_mouseStop: function( event, noPropagation ) {
23228
23229		if ( !event ) {
23230			return;
23231		}
23232
23233		//If we are using droppables, inform the manager about the drop
23234		if ( $.ui.ddmanager && !this.options.dropBehaviour ) {
23235			$.ui.ddmanager.drop( this, event );
23236		}
23237
23238		if ( this.options.revert ) {
23239			var that = this,
23240				cur = this.placeholder.offset(),
23241				axis = this.options.axis,
23242				animation = {};
23243
23244			if ( !axis || axis === "x" ) {
23245				animation.left = cur.left - this.offset.parent.left - this.margins.left +
23246					( this.offsetParent[ 0 ] === this.document[ 0 ].body ?
23247						0 :
23248						this.offsetParent[ 0 ].scrollLeft
23249					);
23250			}
23251			if ( !axis || axis === "y" ) {
23252				animation.top = cur.top - this.offset.parent.top - this.margins.top +
23253					( this.offsetParent[ 0 ] === this.document[ 0 ].body ?
23254						0 :
23255						this.offsetParent[ 0 ].scrollTop
23256					);
23257			}
23258			this.reverting = true;
23259			$( this.helper ).animate(
23260				animation,
23261				parseInt( this.options.revert, 10 ) || 500,
23262				function() {
23263					that._clear( event );
23264				}
23265			);
23266		} else {
23267			this._clear( event, noPropagation );
23268		}
23269
23270		return false;
23271
23272	},
23273
23274	cancel: function() {
23275
23276		if ( this.dragging ) {
23277
23278			this._mouseUp( new $.Event( "mouseup", { target: null } ) );
23279
23280			if ( this.options.helper === "original" ) {
23281				this.currentItem.css( this._storedCSS );
23282				this._removeClass( this.currentItem, "ui-sortable-helper" );
23283			} else {
23284				this.currentItem.show();
23285			}
23286
23287			//Post deactivating events to containers
23288			for ( var i = this.containers.length - 1; i >= 0; i-- ) {
23289				this.containers[ i ]._trigger( "deactivate", null, this._uiHash( this ) );
23290				if ( this.containers[ i ].containerCache.over ) {
23291					this.containers[ i ]._trigger( "out", null, this._uiHash( this ) );
23292					this.containers[ i ].containerCache.over = 0;
23293				}
23294			}
23295
23296		}
23297
23298		if ( this.placeholder ) {
23299
23300			//$(this.placeholder[0]).remove(); would have been the jQuery way - unfortunately,
23301			// it unbinds ALL events from the original node!
23302			if ( this.placeholder[ 0 ].parentNode ) {
23303				this.placeholder[ 0 ].parentNode.removeChild( this.placeholder[ 0 ] );
23304			}
23305			if ( this.options.helper !== "original" && this.helper &&
23306					this.helper[ 0 ].parentNode ) {
23307				this.helper.remove();
23308			}
23309
23310			$.extend( this, {
23311				helper: null,
23312				dragging: false,
23313				reverting: false,
23314				_noFinalSort: null
23315			} );
23316
23317			if ( this.domPosition.prev ) {
23318				$( this.domPosition.prev ).after( this.currentItem );
23319			} else {
23320				$( this.domPosition.parent ).prepend( this.currentItem );
23321			}
23322		}
23323
23324		return this;
23325
23326	},
23327
23328	serialize: function( o ) {
23329
23330		var items = this._getItemsAsjQuery( o && o.connected ),
23331			str = [];
23332		o = o || {};
23333
23334		$( items ).each( function() {
23335			var res = ( $( o.item || this ).attr( o.attribute || "id" ) || "" )
23336				.match( o.expression || ( /(.+)[\-=_](.+)/ ) );
23337			if ( res ) {
23338				str.push(
23339					( o.key || res[ 1 ] + "[]" ) +
23340					"=" + ( o.key && o.expression ? res[ 1 ] : res[ 2 ] ) );
23341			}
23342		} );
23343
23344		if ( !str.length && o.key ) {
23345			str.push( o.key + "=" );
23346		}
23347
23348		return str.join( "&" );
23349
23350	},
23351
23352	toArray: function( o ) {
23353
23354		var items = this._getItemsAsjQuery( o && o.connected ),
23355			ret = [];
23356
23357		o = o || {};
23358
23359		items.each( function() {
23360			ret.push( $( o.item || this ).attr( o.attribute || "id" ) || "" );
23361		} );
23362		return ret;
23363
23364	},
23365
23366	/* Be careful with the following core functions */
23367	_intersectsWith: function( item ) {
23368
23369		var x1 = this.positionAbs.left,
23370			x2 = x1 + this.helperProportions.width,
23371			y1 = this.positionAbs.top,
23372			y2 = y1 + this.helperProportions.height,
23373			l = item.left,
23374			r = l + item.width,
23375			t = item.top,
23376			b = t + item.height,
23377			dyClick = this.offset.click.top,
23378			dxClick = this.offset.click.left,
23379			isOverElementHeight = ( this.options.axis === "x" ) || ( ( y1 + dyClick ) > t &&
23380				( y1 + dyClick ) < b ),
23381			isOverElementWidth = ( this.options.axis === "y" ) || ( ( x1 + dxClick ) > l &&
23382				( x1 + dxClick ) < r ),
23383			isOverElement = isOverElementHeight && isOverElementWidth;
23384
23385		if ( this.options.tolerance === "pointer" ||
23386			this.options.forcePointerForContainers ||
23387			( this.options.tolerance !== "pointer" &&
23388				this.helperProportions[ this.floating ? "width" : "height" ] >
23389				item[ this.floating ? "width" : "height" ] )
23390		) {
23391			return isOverElement;
23392		} else {
23393
23394			return ( l < x1 + ( this.helperProportions.width / 2 ) && // Right Half
23395				x2 - ( this.helperProportions.width / 2 ) < r && // Left Half
23396				t < y1 + ( this.helperProportions.height / 2 ) && // Bottom Half
23397				y2 - ( this.helperProportions.height / 2 ) < b ); // Top Half
23398
23399		}
23400	},
23401
23402	_intersectsWithPointer: function( item ) {
23403		var verticalDirection, horizontalDirection,
23404			isOverElementHeight = ( this.options.axis === "x" ) ||
23405				this._isOverAxis(
23406					this.positionAbs.top + this.offset.click.top, item.top, item.height ),
23407			isOverElementWidth = ( this.options.axis === "y" ) ||
23408				this._isOverAxis(
23409					this.positionAbs.left + this.offset.click.left, item.left, item.width ),
23410			isOverElement = isOverElementHeight && isOverElementWidth;
23411
23412		if ( !isOverElement ) {
23413			return false;
vendor: 8,518 bytes, lines 23414-23688
23414		}
23415
23416		verticalDirection = this.dragDirection.vertical;
23417		horizontalDirection = this.dragDirection.horizontal;
23418
23419		return this.floating ?
23420			( ( horizontalDirection === "right" || verticalDirection === "down" ) ? 2 : 1 ) :
23421			( verticalDirection && ( verticalDirection === "down" ? 2 : 1 ) );
23422
23423	},
23424
23425	_intersectsWithSides: function( item ) {
23426
23427		var isOverBottomHalf = this._isOverAxis( this.positionAbs.top +
23428				this.offset.click.top, item.top + ( item.height / 2 ), item.height ),
23429			isOverRightHalf = this._isOverAxis( this.positionAbs.left +
23430				this.offset.click.left, item.left + ( item.width / 2 ), item.width ),
23431			verticalDirection = this.dragDirection.vertical,
23432			horizontalDirection = this.dragDirection.horizontal;
23433
23434		if ( this.floating && horizontalDirection ) {
23435			return ( ( horizontalDirection === "right" && isOverRightHalf ) ||
23436				( horizontalDirection === "left" && !isOverRightHalf ) );
23437		} else {
23438			return verticalDirection && ( ( verticalDirection === "down" && isOverBottomHalf ) ||
23439				( verticalDirection === "up" && !isOverBottomHalf ) );
23440		}
23441
23442	},
23443
23444	_getDragVerticalDirection: function() {
23445		var delta = this.positionAbs.top - this.lastPositionAbs.top;
23446		return delta !== 0 && ( delta > 0 ? "down" : "up" );
23447	},
23448
23449	_getDragHorizontalDirection: function() {
23450		var delta = this.positionAbs.left - this.lastPositionAbs.left;
23451		return delta !== 0 && ( delta > 0 ? "right" : "left" );
23452	},
23453
23454	refresh: function( event ) {
23455		this._refreshItems( event );
23456		this._setHandleClassName();
23457		this.refreshPositions();
23458		return this;
23459	},
23460
23461	_connectWith: function() {
23462		var options = this.options;
23463		return options.connectWith.constructor === String ?
23464			[ options.connectWith ] :
23465			options.connectWith;
23466	},
23467
23468	_getItemsAsjQuery: function( connected ) {
23469
23470		var i, j, cur, inst,
23471			items = [],
23472			queries = [],
23473			connectWith = this._connectWith();
23474
23475		if ( connectWith && connected ) {
23476			for ( i = connectWith.length - 1; i >= 0; i-- ) {
23477				cur = $( connectWith[ i ], this.document[ 0 ] );
23478				for ( j = cur.length - 1; j >= 0; j-- ) {
23479					inst = $.data( cur[ j ], this.widgetFullName );
23480					if ( inst && inst !== this && !inst.options.disabled ) {
23481						queries.push( [ typeof inst.options.items === "function" ?
23482							inst.options.items.call( inst.element ) :
23483							$( inst.options.items, inst.element )
23484								.not( ".ui-sortable-helper" )
23485								.not( ".ui-sortable-placeholder" ), inst ] );
23486					}
23487				}
23488			}
23489		}
23490
23491		queries.push( [ typeof this.options.items === "function" ?
23492			this.options.items
23493				.call( this.element, null, { options: this.options, item: this.currentItem } ) :
23494			$( this.options.items, this.element )
23495				.not( ".ui-sortable-helper" )
23496				.not( ".ui-sortable-placeholder" ), this ] );
23497
23498		function addItems() {
23499			items.push( this );
23500		}
23501		for ( i = queries.length - 1; i >= 0; i-- ) {
23502			queries[ i ][ 0 ].each( addItems );
23503		}
23504
23505		return $( items );
23506
23507	},
23508
23509	_removeCurrentsFromItems: function() {
23510
23511		var list = this.currentItem.find( ":data(" + this.widgetName + "-item)" );
23512
23513		this.items = $.grep( this.items, function( item ) {
23514			for ( var j = 0; j < list.length; j++ ) {
23515				if ( list[ j ] === item.item[ 0 ] ) {
23516					return false;
23517				}
23518			}
23519			return true;
23520		} );
23521
23522	},
23523
23524	_refreshItems: function( event ) {
23525
23526		this.items = [];
23527		this.containers = [ this ];
23528
23529		var i, j, cur, inst, targetData, _queries, item, queriesLength,
23530			items = this.items,
23531			queries = [ [ typeof this.options.items === "function" ?
23532				this.options.items.call( this.element[ 0 ], event, { item: this.currentItem } ) :
23533				$( this.options.items, this.element ), this ] ],
23534			connectWith = this._connectWith();
23535
23536		//Shouldn't be run the first time through due to massive slow-down
23537		if ( connectWith && this.ready ) {
23538			for ( i = connectWith.length - 1; i >= 0; i-- ) {
23539				cur = $( connectWith[ i ], this.document[ 0 ] );
23540				for ( j = cur.length - 1; j >= 0; j-- ) {
23541					inst = $.data( cur[ j ], this.widgetFullName );
23542					if ( inst && inst !== this && !inst.options.disabled ) {
23543						queries.push( [ typeof inst.options.items === "function" ?
23544							inst.options.items
23545								.call( inst.element[ 0 ], event, { item: this.currentItem } ) :
23546							$( inst.options.items, inst.element ), inst ] );
23547						this.containers.push( inst );
23548					}
23549				}
23550			}
23551		}
23552
23553		for ( i = queries.length - 1; i >= 0; i-- ) {
23554			targetData = queries[ i ][ 1 ];
23555			_queries = queries[ i ][ 0 ];
23556
23557			for ( j = 0, queriesLength = _queries.length; j < queriesLength; j++ ) {
23558				item = $( _queries[ j ] );
23559
23560				// Data for target checking (mouse manager)
23561				item.data( this.widgetName + "-item", targetData );
23562
23563				items.push( {
23564					item: item,
23565					instance: targetData,
23566					width: 0, height: 0,
23567					left: 0, top: 0
23568				} );
23569			}
23570		}
23571
23572	},
23573
23574	_refreshItemPositions: function( fast ) {
23575		var i, item, t, p;
23576
23577		for ( i = this.items.length - 1; i >= 0; i-- ) {
23578			item = this.items[ i ];
23579
23580			//We ignore calculating positions of all connected containers when we're not over them
23581			if ( this.currentContainer && item.instance !== this.currentContainer &&
23582					item.item[ 0 ] !== this.currentItem[ 0 ] ) {
23583				continue;
23584			}
23585
23586			t = this.options.toleranceElement ?
23587				$( this.options.toleranceElement, item.item ) :
23588				item.item;
23589
23590			if ( !fast ) {
23591				item.width = t.outerWidth();
23592				item.height = t.outerHeight();
23593			}
23594
23595			p = t.offset();
23596			item.left = p.left;
23597			item.top = p.top;
23598		}
23599	},
23600
23601	refreshPositions: function( fast ) {
23602
23603		// Determine whether items are being displayed horizontally
23604		this.floating = this.items.length ?
23605			this.options.axis === "x" || this._isFloating( this.items[ 0 ].item ) :
23606			false;
23607
23608		// This has to be redone because due to the item being moved out/into the offsetParent,
23609		// the offsetParent's position will change
23610		if ( this.offsetParent && this.helper ) {
23611			this.offset.parent = this._getParentOffset();
23612		}
23613
23614		this._refreshItemPositions( fast );
23615
23616		var i, p;
23617
23618		if ( this.options.custom && this.options.custom.refreshContainers ) {
23619			this.options.custom.refreshContainers.call( this );
23620		} else {
23621			for ( i = this.containers.length - 1; i >= 0; i-- ) {
23622				p = this.containers[ i ].element.offset();
23623				this.containers[ i ].containerCache.left = p.left;
23624				this.containers[ i ].containerCache.top = p.top;
23625				this.containers[ i ].containerCache.width =
23626					this.containers[ i ].element.outerWidth();
23627				this.containers[ i ].containerCache.height =
23628					this.containers[ i ].element.outerHeight();
23629			}
23630		}
23631
23632		return this;
23633	},
23634
23635	_createPlaceholder: function( that ) {
23636		that = that || this;
23637		var className, nodeName,
23638			o = that.options;
23639
23640		if ( !o.placeholder || o.placeholder.constructor === String ) {
23641			className = o.placeholder;
23642			nodeName = that.currentItem[ 0 ].nodeName.toLowerCase();
23643			o.placeholder = {
23644				element: function() {
23645
23646					var element = $( "<" + nodeName + ">", that.document[ 0 ] );
23647
23648					that._addClass( element, "ui-sortable-placeholder",
23649							className || that.currentItem[ 0 ].className )
23650						._removeClass( element, "ui-sortable-helper" );
23651
23652					if ( nodeName === "tbody" ) {
23653						that._createTrPlaceholder(
23654							that.currentItem.find( "tr" ).eq( 0 ),
23655							$( "<tr>", that.document[ 0 ] ).appendTo( element )
23656						);
23657					} else if ( nodeName === "tr" ) {
23658						that._createTrPlaceholder( that.currentItem, element );
23659					} else if ( nodeName === "img" ) {
23660						element.attr( "src", that.currentItem.attr( "src" ) );
23661					}
23662
23663					if ( !className ) {
23664						element.css( "visibility", "hidden" );
23665					}
23666
23667					return element;
23668				},
23669				update: function( container, p ) {
23670
23671					// 1. If a className is set as 'placeholder option, we don't force sizes -
23672					// the class is responsible for that
23673					// 2. The option 'forcePlaceholderSize can be enabled to force it even if a
23674					// class name is specified
23675					if ( className && !o.forcePlaceholderSize ) {
23676						return;
23677					}
23678
23679					// If the element doesn't have a actual height or width by itself (without
23680					// styles coming from a stylesheet), it receives the inline height and width
23681					// from the dragged item. Or, if it's a tbody or tr, it's going to have a height
23682					// anyway since we're populating them with <td>s above, but they're unlikely to
23683					// be the correct height on their own if the row heights are dynamic, so we'll
23684					// always assign the height of the dragged item given forcePlaceholderSize
23685					// is true.
23686					if ( !p.height() || ( o.forcePlaceholderSize &&
23687							( nodeName === "tbody" || nodeName === "tr" ) ) ) {
23688						p.height(
vendor: 10,010 bytes, lines 23689-23994
23689							that.currentItem.innerHeight() -
23690							parseInt( that.currentItem.css( "paddingTop" ) || 0, 10 ) -
23691							parseInt( that.currentItem.css( "paddingBottom" ) || 0, 10 ) );
23692					}
23693					if ( !p.width() ) {
23694						p.width(
23695							that.currentItem.innerWidth() -
23696							parseInt( that.currentItem.css( "paddingLeft" ) || 0, 10 ) -
23697							parseInt( that.currentItem.css( "paddingRight" ) || 0, 10 ) );
23698					}
23699				}
23700			};
23701		}
23702
23703		//Create the placeholder
23704		that.placeholder = $( o.placeholder.element.call( that.element, that.currentItem ) );
23705
23706		//Append it after the actual current item
23707		that.currentItem.after( that.placeholder );
23708
23709		//Update the size of the placeholder (TODO: Logic to fuzzy, see line 316/317)
23710		o.placeholder.update( that, that.placeholder );
23711
23712	},
23713
23714	_createTrPlaceholder: function( sourceTr, targetTr ) {
23715		var that = this;
23716
23717		sourceTr.children().each( function() {
23718			$( "<td>&#160;</td>", that.document[ 0 ] )
23719				.attr( "colspan", $( this ).attr( "colspan" ) || 1 )
23720				.appendTo( targetTr );
23721		} );
23722	},
23723
23724	_contactContainers: function( event ) {
23725		var i, j, dist, itemWithLeastDistance, posProperty, sizeProperty, cur, nearBottom,
23726			floating, axis,
23727			innermostContainer = null,
23728			innermostIndex = null;
23729
23730		// Get innermost container that intersects with item
23731		for ( i = this.containers.length - 1; i >= 0; i-- ) {
23732
23733			// Never consider a container that's located within the item itself
23734			if ( $.contains( this.currentItem[ 0 ], this.containers[ i ].element[ 0 ] ) ) {
23735				continue;
23736			}
23737
23738			if ( this._intersectsWith( this.containers[ i ].containerCache ) ) {
23739
23740				// If we've already found a container and it's more "inner" than this, then continue
23741				if ( innermostContainer &&
23742						$.contains(
23743							this.containers[ i ].element[ 0 ],
23744							innermostContainer.element[ 0 ] ) ) {
23745					continue;
23746				}
23747
23748				innermostContainer = this.containers[ i ];
23749				innermostIndex = i;
23750
23751			} else {
23752
23753				// container doesn't intersect. trigger "out" event if necessary
23754				if ( this.containers[ i ].containerCache.over ) {
23755					this.containers[ i ]._trigger( "out", event, this._uiHash( this ) );
23756					this.containers[ i ].containerCache.over = 0;
23757				}
23758			}
23759
23760		}
23761
23762		// If no intersecting containers found, return
23763		if ( !innermostContainer ) {
23764			return;
23765		}
23766
23767		// Move the item into the container if it's not there already
23768		if ( this.containers.length === 1 ) {
23769			if ( !this.containers[ innermostIndex ].containerCache.over ) {
23770				this.containers[ innermostIndex ]._trigger( "over", event, this._uiHash( this ) );
23771				this.containers[ innermostIndex ].containerCache.over = 1;
23772			}
23773		} else {
23774
23775			// When entering a new container, we will find the item with the least distance and
23776			// append our item near it
23777			dist = 10000;
23778			itemWithLeastDistance = null;
23779			floating = innermostContainer.floating || this._isFloating( this.currentItem );
23780			posProperty = floating ? "left" : "top";
23781			sizeProperty = floating ? "width" : "height";
23782			axis = floating ? "pageX" : "pageY";
23783
23784			for ( j = this.items.length - 1; j >= 0; j-- ) {
23785				if ( !$.contains(
23786						this.containers[ innermostIndex ].element[ 0 ], this.items[ j ].item[ 0 ] )
23787				) {
23788					continue;
23789				}
23790				if ( this.items[ j ].item[ 0 ] === this.currentItem[ 0 ] ) {
23791					continue;
23792				}
23793
23794				cur = this.items[ j ].item.offset()[ posProperty ];
23795				nearBottom = false;
23796				if ( event[ axis ] - cur > this.items[ j ][ sizeProperty ] / 2 ) {
23797					nearBottom = true;
23798				}
23799
23800				if ( Math.abs( event[ axis ] - cur ) < dist ) {
23801					dist = Math.abs( event[ axis ] - cur );
23802					itemWithLeastDistance = this.items[ j ];
23803					this.direction = nearBottom ? "up" : "down";
23804				}
23805			}
23806
23807			//Check if dropOnEmpty is enabled
23808			if ( !itemWithLeastDistance && !this.options.dropOnEmpty ) {
23809				return;
23810			}
23811
23812			if ( this.currentContainer === this.containers[ innermostIndex ] ) {
23813				if ( !this.currentContainer.containerCache.over ) {
23814					this.containers[ innermostIndex ]._trigger( "over", event, this._uiHash() );
23815					this.currentContainer.containerCache.over = 1;
23816				}
23817				return;
23818			}
23819
23820			if ( itemWithLeastDistance ) {
23821				this._rearrange( event, itemWithLeastDistance, null, true );
23822			} else {
23823				this._rearrange( event, null, this.containers[ innermostIndex ].element, true );
23824			}
23825			this._trigger( "change", event, this._uiHash() );
23826			this.containers[ innermostIndex ]._trigger( "change", event, this._uiHash( this ) );
23827			this.currentContainer = this.containers[ innermostIndex ];
23828
23829			//Update the placeholder
23830			this.options.placeholder.update( this.currentContainer, this.placeholder );
23831
23832			//Update scrollParent
23833			this.scrollParent = this.placeholder.scrollParent();
23834
23835			//Update overflowOffset
23836			if ( this.scrollParent[ 0 ] !== this.document[ 0 ] &&
23837					this.scrollParent[ 0 ].tagName !== "HTML" ) {
23838				this.overflowOffset = this.scrollParent.offset();
23839			}
23840
23841			this.containers[ innermostIndex ]._trigger( "over", event, this._uiHash( this ) );
23842			this.containers[ innermostIndex ].containerCache.over = 1;
23843		}
23844
23845	},
23846
23847	_createHelper: function( event ) {
23848
23849		var o = this.options,
23850			helper = typeof o.helper === "function" ?
23851				$( o.helper.apply( this.element[ 0 ], [ event, this.currentItem ] ) ) :
23852				( o.helper === "clone" ? this.currentItem.clone() : this.currentItem );
23853
23854		//Add the helper to the DOM if that didn't happen already
23855		if ( !helper.parents( "body" ).length ) {
23856			this.appendTo[ 0 ].appendChild( helper[ 0 ] );
23857		}
23858
23859		if ( helper[ 0 ] === this.currentItem[ 0 ] ) {
23860			this._storedCSS = {
23861				width: this.currentItem[ 0 ].style.width,
23862				height: this.currentItem[ 0 ].style.height,
23863				position: this.currentItem.css( "position" ),
23864				top: this.currentItem.css( "top" ),
23865				left: this.currentItem.css( "left" )
23866			};
23867		}
23868
23869		if ( !helper[ 0 ].style.width || o.forceHelperSize ) {
23870			helper.width( this.currentItem.width() );
23871		}
23872		if ( !helper[ 0 ].style.height || o.forceHelperSize ) {
23873			helper.height( this.currentItem.height() );
23874		}
23875
23876		return helper;
23877
23878	},
23879
23880	_adjustOffsetFromHelper: function( obj ) {
23881		if ( typeof obj === "string" ) {
23882			obj = obj.split( " " );
23883		}
23884		if ( Array.isArray( obj ) ) {
23885			obj = { left: +obj[ 0 ], top: +obj[ 1 ] || 0 };
23886		}
23887		if ( "left" in obj ) {
23888			this.offset.click.left = obj.left + this.margins.left;
23889		}
23890		if ( "right" in obj ) {
23891			this.offset.click.left = this.helperProportions.width - obj.right + this.margins.left;
23892		}
23893		if ( "top" in obj ) {
23894			this.offset.click.top = obj.top + this.margins.top;
23895		}
23896		if ( "bottom" in obj ) {
23897			this.offset.click.top = this.helperProportions.height - obj.bottom + this.margins.top;
23898		}
23899	},
23900
23901	_getParentOffset: function() {
23902
23903		//Get the offsetParent and cache its position
23904		this.offsetParent = this.helper.offsetParent();
23905		var po = this.offsetParent.offset();
23906
23907		// This is a special case where we need to modify a offset calculated on start, since the
23908		// following happened:
23909		// 1. The position of the helper is absolute, so it's position is calculated based on the
23910		// next positioned parent
23911		// 2. The actual offset parent is a child of the scroll parent, and the scroll parent isn't
23912		// the document, which means that the scroll is included in the initial calculation of the
23913		// offset of the parent, and never recalculated upon drag
23914		if ( this.cssPosition === "absolute" && this.scrollParent[ 0 ] !== this.document[ 0 ] &&
23915				$.contains( this.scrollParent[ 0 ], this.offsetParent[ 0 ] ) ) {
23916			po.left += this.scrollParent.scrollLeft();
23917			po.top += this.scrollParent.scrollTop();
23918		}
23919
23920		// This needs to be actually done for all browsers, since pageX/pageY includes
23921		// this information.
23922		if ( this.offsetParent[ 0 ] === this.document[ 0 ].body ) {
23923			po = { top: 0, left: 0 };
23924		}
23925
23926		return {
23927			top: po.top + ( parseInt( this.offsetParent.css( "borderTopWidth" ), 10 ) || 0 ),
23928			left: po.left + ( parseInt( this.offsetParent.css( "borderLeftWidth" ), 10 ) || 0 )
23929		};
23930
23931	},
23932
23933	_getRelativeOffset: function() {
23934
23935		if ( this.cssPosition === "relative" ) {
23936			var p = this.currentItem.position();
23937			return {
23938				top: p.top - ( parseInt( this.helper.css( "top" ), 10 ) || 0 ) +
23939					this.scrollParent.scrollTop(),
23940				left: p.left - ( parseInt( this.helper.css( "left" ), 10 ) || 0 ) +
23941					this.scrollParent.scrollLeft()
23942			};
23943		} else {
23944			return { top: 0, left: 0 };
23945		}
23946
23947	},
23948
23949	_cacheMargins: function() {
23950		this.margins = {
23951			left: ( parseInt( this.currentItem.css( "marginLeft" ), 10 ) || 0 ),
23952			top: ( parseInt( this.currentItem.css( "marginTop" ), 10 ) || 0 )
23953		};
23954	},
23955
23956	_cacheHelperProportions: function() {
23957		this.helperProportions = {
23958			width: this.helper.outerWidth(),
23959			height: this.helper.outerHeight()
23960		};
23961	},
23962
23963	_setContainment: function() {
23964
23965		var ce, co, over,
23966			o = this.options;
23967		if ( o.containment === "parent" ) {
23968			o.containment = this.helper[ 0 ].parentNode;
23969		}
23970		if ( o.containment === "document" || o.containment === "window" ) {
23971			this.containment = [
23972				0 - this.offset.relative.left - this.offset.parent.left,
23973				0 - this.offset.relative.top - this.offset.parent.top,
23974				o.containment === "document" ?
23975					this.document.width() :
23976					this.window.width() - this.helperProportions.width - this.margins.left,
23977				( o.containment === "document" ?
23978					( this.document.height() || document.body.parentNode.scrollHeight ) :
23979					this.window.height() || this.document[ 0 ].body.parentNode.scrollHeight
23980				) - this.helperProportions.height - this.margins.top
23981			];
23982		}
23983
23984		if ( !( /^(document|window|parent)$/ ).test( o.containment ) ) {
23985			ce = $( o.containment )[ 0 ];
23986			co = $( o.containment ).offset();
23987			over = ( $( ce ).css( "overflow" ) !== "hidden" );
23988
23989			this.containment = [
23990				co.left + ( parseInt( $( ce ).css( "borderLeftWidth" ), 10 ) || 0 ) +
23991					( parseInt( $( ce ).css( "paddingLeft" ), 10 ) || 0 ) - this.margins.left,
23992				co.top + ( parseInt( $( ce ).css( "borderTopWidth" ), 10 ) || 0 ) +
23993					( parseInt( $( ce ).css( "paddingTop" ), 10 ) || 0 ) - this.margins.top,
23994				co.left + ( over ? Math.max( ce.scrollWidth, ce.offsetWidth ) 
vendor: 1,747 bytes, lines 23994-24046
23994: ce.offsetWidth ) -
23995					( parseInt( $( ce ).css( "borderLeftWidth" ), 10 ) || 0 ) -
23996					( parseInt( $( ce ).css( "paddingRight" ), 10 ) || 0 ) -
23997					this.helperProportions.width - this.margins.left,
23998				co.top + ( over ? Math.max( ce.scrollHeight, ce.offsetHeight ) : ce.offsetHeight ) -
23999					( parseInt( $( ce ).css( "borderTopWidth" ), 10 ) || 0 ) -
24000					( parseInt( $( ce ).css( "paddingBottom" ), 10 ) || 0 ) -
24001					this.helperProportions.height - this.margins.top
24002			];
24003		}
24004
24005	},
24006
24007	_convertPositionTo: function( d, pos ) {
24008
24009		if ( !pos ) {
24010			pos = this.position;
24011		}
24012		var mod = d === "absolute" ? 1 : -1,
24013			scroll = this.cssPosition === "absolute" &&
24014				!( this.scrollParent[ 0 ] !== this.document[ 0 ] &&
24015				$.contains( this.scrollParent[ 0 ], this.offsetParent[ 0 ] ) ) ?
24016					this.offsetParent :
24017					this.scrollParent,
24018			scrollIsRootNode = ( /(html|body)/i ).test( scroll[ 0 ].tagName );
24019
24020		return {
24021			top: (
24022
24023				// The absolute mouse position
24024				pos.top	+
24025
24026				// Only for relative positioned nodes: Relative offset from element to offset parent
24027				this.offset.relative.top * mod +
24028
24029				// The offsetParent's offset without borders (offset + border)
24030				this.offset.parent.top * mod -
24031				( ( this.cssPosition === "fixed" ?
24032					-this.scrollParent.scrollTop() :
24033					( scrollIsRootNode ? 0 : scroll.scrollTop() ) ) * mod )
24034			),
24035			left: (
24036
24037				// The absolute mouse position
24038				pos.left +
24039
24040				// Only for relative positioned nodes: Relative offset from element to offset parent
24041				this.offset.relative.left * mod +
24042
24043				// The offsetParent's offset without borders (offset + border)
24044				this.offset.parent.left * mod	-
24045				( ( this.cssPosition === "fixed" ?
24046					-this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 :
vendor: 4,632 bytes, lines 24047-24190
24047					scroll.scrollLeft() ) * mod )
24048			)
24049		};
24050
24051	},
24052
24053	_generatePosition: function( event ) {
24054
24055		var top, left,
24056			o = this.options,
24057			pageX = event.pageX,
24058			pageY = event.pageY,
24059			scroll = this.cssPosition === "absolute" &&
24060				!( this.scrollParent[ 0 ] !== this.document[ 0 ] &&
24061				$.contains( this.scrollParent[ 0 ], this.offsetParent[ 0 ] ) ) ?
24062					this.offsetParent :
24063					this.scrollParent,
24064				scrollIsRootNode = ( /(html|body)/i ).test( scroll[ 0 ].tagName );
24065
24066		// This is another very weird special case that only happens for relative elements:
24067		// 1. If the css position is relative
24068		// 2. and the scroll parent is the document or similar to the offset parent
24069		// we have to refresh the relative offset during the scroll so there are no jumps
24070		if ( this.cssPosition === "relative" && !( this.scrollParent[ 0 ] !== this.document[ 0 ] &&
24071				this.scrollParent[ 0 ] !== this.offsetParent[ 0 ] ) ) {
24072			this.offset.relative = this._getRelativeOffset();
24073		}
24074
24075		/*
24076		 * - Position constraining -
24077		 * Constrain the position to a mix of grid, containment.
24078		 */
24079
24080		if ( this.originalPosition ) { //If we are not dragging yet, we won't check for options
24081
24082			if ( this.containment ) {
24083				if ( event.pageX - this.offset.click.left < this.containment[ 0 ] ) {
24084					pageX = this.containment[ 0 ] + this.offset.click.left;
24085				}
24086				if ( event.pageY - this.offset.click.top < this.containment[ 1 ] ) {
24087					pageY = this.containment[ 1 ] + this.offset.click.top;
24088				}
24089				if ( event.pageX - this.offset.click.left > this.containment[ 2 ] ) {
24090					pageX = this.containment[ 2 ] + this.offset.click.left;
24091				}
24092				if ( event.pageY - this.offset.click.top > this.containment[ 3 ] ) {
24093					pageY = this.containment[ 3 ] + this.offset.click.top;
24094				}
24095			}
24096
24097			if ( o.grid ) {
24098				top = this.originalPageY + Math.round( ( pageY - this.originalPageY ) /
24099					o.grid[ 1 ] ) * o.grid[ 1 ];
24100				pageY = this.containment ?
24101					( ( top - this.offset.click.top >= this.containment[ 1 ] &&
24102						top - this.offset.click.top <= this.containment[ 3 ] ) ?
24103							top :
24104							( ( top - this.offset.click.top >= this.containment[ 1 ] ) ?
24105								top - o.grid[ 1 ] : top + o.grid[ 1 ] ) ) :
24106								top;
24107
24108				left = this.originalPageX + Math.round( ( pageX - this.originalPageX ) /
24109					o.grid[ 0 ] ) * o.grid[ 0 ];
24110				pageX = this.containment ?
24111					( ( left - this.offset.click.left >= this.containment[ 0 ] &&
24112						left - this.offset.click.left <= this.containment[ 2 ] ) ?
24113							left :
24114							( ( left - this.offset.click.left >= this.containment[ 0 ] ) ?
24115								left - o.grid[ 0 ] : left + o.grid[ 0 ] ) ) :
24116								left;
24117			}
24118
24119		}
24120
24121		return {
24122			top: (
24123
24124				// The absolute mouse position
24125				pageY -
24126
24127				// Click offset (relative to the element)
24128				this.offset.click.top -
24129
24130				// Only for relative positioned nodes: Relative offset from element to offset parent
24131				this.offset.relative.top -
24132
24133				// The offsetParent's offset without borders (offset + border)
24134				this.offset.parent.top +
24135				( ( this.cssPosition === "fixed" ?
24136					-this.scrollParent.scrollTop() :
24137					( scrollIsRootNode ? 0 : scroll.scrollTop() ) ) )
24138			),
24139			left: (
24140
24141				// The absolute mouse position
24142				pageX -
24143
24144				// Click offset (relative to the element)
24145				this.offset.click.left -
24146
24147				// Only for relative positioned nodes: Relative offset from element to offset parent
24148				this.offset.relative.left -
24149
24150				// The offsetParent's offset without borders (offset + border)
24151				this.offset.parent.left +
24152				( ( this.cssPosition === "fixed" ?
24153					-this.scrollParent.scrollLeft() :
24154					scrollIsRootNode ? 0 : scroll.scrollLeft() ) )
24155			)
24156		};
24157
24158	},
24159
24160	_rearrange: function( event, i, a, hardRefresh ) {
24161
24162		if ( a ) {
24163			a[ 0 ].appendChild( this.placeholder[ 0 ] );
24164		} else {
24165			i.item[ 0 ].parentNode.insertBefore( this.placeholder[ 0 ],
24166				( this.direction === "down" ? i.item[ 0 ] : i.item[ 0 ].nextSibling ) );
24167		}
24168
24169		//Various things done here to improve the performance:
24170		// 1. we create a setTimeout, that calls refreshPositions
24171		// 2. on the instance, we have a counter variable, that get's higher after every append
24172		// 3. on the local scope, we copy the counter variable, and check in the timeout,
24173		// if it's still the same
24174		// 4. this lets only the last addition to the timeout stack through
24175		this.counter = this.counter ? ++this.counter : 1;
24176		var counter = this.counter;
24177
24178		this._delay( function() {
24179			if ( counter === this.counter ) {
24180
24181				//Precompute after each DOM insertion, NOT on mousemove
24182				this.refreshPositions( !hardRefresh );
24183			}
24184		} );
24185
24186	},
24187
24188	_clear: function( event, noPropagation ) {
24189
24190		this.reverting = false;
vendor: 4,255 bytes, lines 24191-24335
24191
24192		// We delay all events that have to be triggered to after the point where the placeholder
24193		// has been removed and everything else normalized again
24194		var i,
24195			delayedTriggers = [];
24196
24197		// We first have to update the dom position of the actual currentItem
24198		// Note: don't do it if the current item is already removed (by a user), or it gets
24199		// reappended (see #4088)
24200		if ( !this._noFinalSort && this.currentItem.parent().length ) {
24201			this.placeholder.before( this.currentItem );
24202		}
24203		this._noFinalSort = null;
24204
24205		if ( this.helper[ 0 ] === this.currentItem[ 0 ] ) {
24206			for ( i in this._storedCSS ) {
24207				if ( this._storedCSS[ i ] === "auto" || this._storedCSS[ i ] === "static" ) {
24208					this._storedCSS[ i ] = "";
24209				}
24210			}
24211			this.currentItem.css( this._storedCSS );
24212			this._removeClass( this.currentItem, "ui-sortable-helper" );
24213		} else {
24214			this.currentItem.show();
24215		}
24216
24217		if ( this.fromOutside && !noPropagation ) {
24218			delayedTriggers.push( function( event ) {
24219				this._trigger( "receive", event, this._uiHash( this.fromOutside ) );
24220			} );
24221		}
24222		if ( ( this.fromOutside ||
24223				this.domPosition.prev !==
24224				this.currentItem.prev().not( ".ui-sortable-helper" )[ 0 ] ||
24225				this.domPosition.parent !== this.currentItem.parent()[ 0 ] ) && !noPropagation ) {
24226
24227			// Trigger update callback if the DOM position has changed
24228			delayedTriggers.push( function( event ) {
24229				this._trigger( "update", event, this._uiHash() );
24230			} );
24231		}
24232
24233		// Check if the items Container has Changed and trigger appropriate
24234		// events.
24235		if ( this !== this.currentContainer ) {
24236			if ( !noPropagation ) {
24237				delayedTriggers.push( function( event ) {
24238					this._trigger( "remove", event, this._uiHash() );
24239				} );
24240				delayedTriggers.push( ( function( c ) {
24241					return function( event ) {
24242						c._trigger( "receive", event, this._uiHash( this ) );
24243					};
24244				} ).call( this, this.currentContainer ) );
24245				delayedTriggers.push( ( function( c ) {
24246					return function( event ) {
24247						c._trigger( "update", event, this._uiHash( this ) );
24248					};
24249				} ).call( this, this.currentContainer ) );
24250			}
24251		}
24252
24253		//Post events to containers
24254		function delayEvent( type, instance, container ) {
24255			return function( event ) {
24256				container._trigger( type, event, instance._uiHash( instance ) );
24257			};
24258		}
24259		for ( i = this.containers.length - 1; i >= 0; i-- ) {
24260			if ( !noPropagation ) {
24261				delayedTriggers.push( delayEvent( "deactivate", this, this.containers[ i ] ) );
24262			}
24263			if ( this.containers[ i ].containerCache.over ) {
24264				delayedTriggers.push( delayEvent( "out", this, this.containers[ i ] ) );
24265				this.containers[ i ].containerCache.over = 0;
24266			}
24267		}
24268
24269		//Do what was originally in plugins
24270		if ( this._storedStylesheet ) {
24271			this._storedStylesheet.remove();
24272			this._storedStylesheet = null;
24273		}
24274		if ( this._storedOpacity ) {
24275			this.helper.css( "opacity", this._storedOpacity );
24276		}
24277		if ( this._storedZIndex ) {
24278			this.helper.css( "zIndex", this._storedZIndex === "auto" ? "" : this._storedZIndex );
24279		}
24280
24281		this.dragging = false;
24282
24283		if ( !noPropagation ) {
24284			this._trigger( "beforeStop", event, this._uiHash() );
24285		}
24286
24287		//$(this.placeholder[0]).remove(); would have been the jQuery way - unfortunately,
24288		// it unbinds ALL events from the original node!
24289		this.placeholder[ 0 ].parentNode.removeChild( this.placeholder[ 0 ] );
24290
24291		if ( !this.cancelHelperRemoval ) {
24292			if ( this.helper[ 0 ] !== this.currentItem[ 0 ] ) {
24293				this.helper.remove();
24294			}
24295			this.helper = null;
24296		}
24297
24298		if ( !noPropagation ) {
24299			for ( i = 0; i < delayedTriggers.length; i++ ) {
24300
24301				// Trigger all delayed events
24302				delayedTriggers[ i ].call( this, event );
24303			}
24304			this._trigger( "stop", event, this._uiHash() );
24305		}
24306
24307		this.fromOutside = false;
24308		return !this.cancelHelperRemoval;
24309
24310	},
24311
24312	_trigger: function() {
24313		if ( $.Widget.prototype._trigger.apply( this, arguments ) === false ) {
24314			this.cancel();
24315		}
24316	},
24317
24318	_uiHash: function( _inst ) {
24319		var inst = _inst || this;
24320		return {
24321			helper: inst.helper,
24322			placeholder: inst.placeholder || $( [] ),
24323			position: inst.position,
24324			originalPosition: inst.originalPosition,
24325			offset: inst.positionAbs,
24326			item: inst.currentItem,
24327			sender: _inst ? _inst.element : null
24328		};
24329	}
24330
24331} );
24332
24333
24334/*!
24335 * jQuery UI Spinner 1.14.
vendor: 3,301 bytes, lines 24335-24472
243350
24336 * https://jqueryui.com
24337 *
24338 * Copyright OpenJS Foundation and other contributors
24339 * Released under the MIT license.
24340 * https://jquery.org/license
24341 */
24342
24343//>>label: Spinner
24344//>>group: Widgets
24345//>>description: Displays buttons to easily input numbers via the keyboard or mouse.
24346//>>docs: https://api.jqueryui.com/spinner/
24347//>>demos: https://jqueryui.com/spinner/
24348//>>css.structure: ../../themes/base/core.css
24349//>>css.structure: ../../themes/base/spinner.css
24350//>>css.theme: ../../themes/base/theme.css
24351
24352
24353function spinnerModifier( fn ) {
24354	return function() {
24355		var previous = this.element.val();
24356		fn.apply( this, arguments );
24357		this._refresh();
24358		if ( previous !== this.element.val() ) {
24359			this._trigger( "change" );
24360		}
24361	};
24362}
24363
24364$.widget( "ui.spinner", {
24365	version: "1.14.0",
24366	defaultElement: "<input>",
24367	widgetEventPrefix: "spin",
24368	options: {
24369		classes: {
24370			"ui-spinner": "ui-corner-all",
24371			"ui-spinner-down": "ui-corner-br",
24372			"ui-spinner-up": "ui-corner-tr"
24373		},
24374		culture: null,
24375		icons: {
24376			down: "ui-icon-triangle-1-s",
24377			up: "ui-icon-triangle-1-n"
24378		},
24379		incremental: true,
24380		max: null,
24381		min: null,
24382		numberFormat: null,
24383		page: 10,
24384		step: 1,
24385
24386		change: null,
24387		spin: null,
24388		start: null,
24389		stop: null
24390	},
24391
24392	_create: function() {
24393
24394		// handle string values that need to be parsed
24395		this._setOption( "max", this.options.max );
24396		this._setOption( "min", this.options.min );
24397		this._setOption( "step", this.options.step );
24398
24399		// Only format if there is a value, prevents the field from being marked
24400		// as invalid in Firefox, see #9573.
24401		if ( this.value() !== "" ) {
24402
24403			// Format the value, but don't constrain.
24404			this._value( this.element.val(), true );
24405		}
24406
24407		this._draw();
24408		this._on( this._events );
24409		this._refresh();
24410
24411		// Turning off autocomplete prevents the browser from remembering the
24412		// value when navigating through history, so we re-enable autocomplete
24413		// if the page is unloaded before the widget is destroyed. #7790
24414		this._on( this.window, {
24415			beforeunload: function() {
24416				this.element.removeAttr( "autocomplete" );
24417			}
24418		} );
24419	},
24420
24421	_getCreateOptions: function() {
24422		var options = this._super();
24423		var element = this.element;
24424
24425		$.each( [ "min", "max", "step" ], function( i, option ) {
24426			var value = element.attr( option );
24427			if ( value != null && value.length ) {
24428				options[ option ] = value;
24429			}
24430		} );
24431
24432		return options;
24433	},
24434
24435	_events: {
24436		keydown: function( event ) {
24437			if ( this._start( event ) && this._keydown( event ) ) {
24438				event.preventDefault();
24439			}
24440		},
24441		keyup: "_stop",
24442		focus: function() {
24443			this.previous = this.element.val();
24444		},
24445		blur: function( event ) {
24446			this._stop();
24447			this._refresh();
24448			if ( this.previous !== this.element.val() ) {
24449				this._trigger( "change", event );
24450			}
24451		},
24452		mousewheel: function( event, delta ) {
24453			var activeElement = this.document[ 0 ].activeElement;
24454			var isActive = this.element[ 0 ] === activeElement;
24455
24456			if ( !isActive || !delta ) {
24457				return;
24458			}
24459
24460			if ( !this.spinning && !this._start( event ) ) {
24461				return false;
24462			}
24463
24464			this._spin( ( delta > 0 ? 1 : -1 ) * this.options.step, event );
24465			clearTimeout( this.mousewheelTimer );
24466			this.mousewheelTimer = this._delay( function() {
24467				if ( this.spinning ) {
24468					this._stop( event );
24469				}
24470			}, 100 );
24471			event.preventDefault();
24472		},
vendor: 10,099 bytes, lines 24472-24874
24472
24473		"mousedown .ui-spinner-button": function( event ) {
24474			var previous;
24475
24476			// We never want the buttons to have focus; whenever the user is
24477			// interacting with the spinner, the focus should be on the input.
24478			// If the input is focused then this.previous is properly set from
24479			// when the input first received focus. If the input is not focused
24480			// then we need to set this.previous based on the value before spinning.
24481			previous = this.element[ 0 ] === this.document[ 0 ].activeElement ?
24482				this.previous : this.element.val();
24483			function checkFocus() {
24484				var isActive = this.element[ 0 ] === this.document[ 0 ].activeElement;
24485				if ( !isActive ) {
24486					this.element.trigger( "focus" );
24487					this.previous = previous;
24488				}
24489			}
24490
24491			// Ensure focus is on (or stays on) the text field
24492			event.preventDefault();
24493			checkFocus.call( this );
24494
24495			if ( this._start( event ) === false ) {
24496				return;
24497			}
24498
24499			this._repeat( null, $( event.currentTarget )
24500				.hasClass( "ui-spinner-up" ) ? 1 : -1, event );
24501		},
24502		"mouseup .ui-spinner-button": "_stop",
24503		"mouseenter .ui-spinner-button": function( event ) {
24504
24505			// button will add ui-state-active if mouse was down while mouseleave and kept down
24506			if ( !$( event.currentTarget ).hasClass( "ui-state-active" ) ) {
24507				return;
24508			}
24509
24510			if ( this._start( event ) === false ) {
24511				return false;
24512			}
24513			this._repeat( null, $( event.currentTarget )
24514				.hasClass( "ui-spinner-up" ) ? 1 : -1, event );
24515		},
24516
24517		// TODO: do we really want to consider this a stop?
24518		// shouldn't we just stop the repeater and wait until mouseup before
24519		// we trigger the stop event?
24520		"mouseleave .ui-spinner-button": "_stop"
24521	},
24522
24523	// Support mobile enhanced option and make backcompat more sane
24524	_enhance: function() {
24525		this.uiSpinner = this.element
24526			.attr( "autocomplete", "off" )
24527			.wrap( "<span>" )
24528			.parent()
24529
24530				// Add buttons
24531				.append(
24532					"<a></a><a></a>"
24533				);
24534	},
24535
24536	_draw: function() {
24537		this._enhance();
24538
24539		this._addClass( this.uiSpinner, "ui-spinner", "ui-widget ui-widget-content" );
24540		this._addClass( "ui-spinner-input" );
24541
24542		this.element.attr( "role", "spinbutton" );
24543
24544		// Button bindings
24545		this.buttons = this.uiSpinner.children( "a" )
24546			.attr( "tabIndex", -1 )
24547			.attr( "aria-hidden", true )
24548			.button( {
24549				classes: {
24550					"ui-button": ""
24551				}
24552			} );
24553
24554		// TODO: Right now button does not support classes this is already updated in button PR
24555		this._removeClass( this.buttons, "ui-corner-all" );
24556
24557		this._addClass( this.buttons.first(), "ui-spinner-button ui-spinner-up" );
24558		this._addClass( this.buttons.last(), "ui-spinner-button ui-spinner-down" );
24559		this.buttons.first().button( {
24560			"icon": this.options.icons.up,
24561			"showLabel": false
24562		} );
24563		this.buttons.last().button( {
24564			"icon": this.options.icons.down,
24565			"showLabel": false
24566		} );
24567
24568		// IE 6 doesn't understand height: 50% for the buttons
24569		// unless the wrapper has an explicit height
24570		if ( this.buttons.height() > Math.ceil( this.uiSpinner.height() * 0.5 ) &&
24571				this.uiSpinner.height() > 0 ) {
24572			this.uiSpinner.height( this.uiSpinner.height() );
24573		}
24574	},
24575
24576	_keydown: function( event ) {
24577		var options = this.options,
24578			keyCode = $.ui.keyCode;
24579
24580		switch ( event.keyCode ) {
24581		case keyCode.UP:
24582			this._repeat( null, 1, event );
24583			return true;
24584		case keyCode.DOWN:
24585			this._repeat( null, -1, event );
24586			return true;
24587		case keyCode.PAGE_UP:
24588			this._repeat( null, options.page, event );
24589			return true;
24590		case keyCode.PAGE_DOWN:
24591			this._repeat( null, -options.page, event );
24592			return true;
24593		}
24594
24595		return false;
24596	},
24597
24598	_start: function( event ) {
24599		if ( !this.spinning && this._trigger( "start", event ) === false ) {
24600			return false;
24601		}
24602
24603		if ( !this.counter ) {
24604			this.counter = 1;
24605		}
24606		this.spinning = true;
24607		return true;
24608	},
24609
24610	_repeat: function( i, steps, event ) {
24611		i = i || 500;
24612
24613		clearTimeout( this.timer );
24614		this.timer = this._delay( function() {
24615			this._repeat( 40, steps, event );
24616		}, i );
24617
24618		this._spin( steps * this.options.step, event );
24619	},
24620
24621	_spin: function( step, event ) {
24622		var value = this.value() || 0;
24623
24624		if ( !this.counter ) {
24625			this.counter = 1;
24626		}
24627
24628		value = this._adjustValue( value + step * this._increment( this.counter ) );
24629
24630		if ( !this.spinning || this._trigger( "spin", event, { value: value } ) !== false ) {
24631			this._value( value );
24632			this.counter++;
24633		}
24634	},
24635
24636	_increment: function( i ) {
24637		var incremental = this.options.incremental;
24638
24639		if ( incremental ) {
24640			return typeof incremental === "function" ?
24641				incremental( i ) :
24642				Math.floor( i * i * i / 50000 - i * i / 500 + 17 * i / 200 + 1 );
24643		}
24644
24645		return 1;
24646	},
24647
24648	_precision: function() {
24649		var precision = this._precisionOf( this.options.step );
24650		if ( this.options.min !== null ) {
24651			precision = Math.max( precision, this._precisionOf( this.options.min ) );
24652		}
24653		return precision;
24654	},
24655
24656	_precisionOf: function( num ) {
24657		var str = num.toString(),
24658			decimal = str.indexOf( "." );
24659		return decimal === -1 ? 0 : str.length - decimal - 1;
24660	},
24661
24662	_adjustValue: function( value ) {
24663		var base, aboveMin,
24664			options = this.options;
24665
24666		// Make sure we're at a valid step
24667		// - find out where we are relative to the base (min or 0)
24668		base = options.min !== null ? options.min : 0;
24669		aboveMin = value - base;
24670
24671		// - round to the nearest step
24672		aboveMin = Math.round( aboveMin / options.step ) * options.step;
24673
24674		// - rounding is based on 0, so adjust back to our base
24675		value = base + aboveMin;
24676
24677		// Fix precision from bad JS floating point math
24678		value = parseFloat( value.toFixed( this._precision() ) );
24679
24680		// Clamp the value
24681		if ( options.max !== null && value > options.max ) {
24682			return options.max;
24683		}
24684		if ( options.min !== null && value < options.min ) {
24685			return options.min;
24686		}
24687
24688		return value;
24689	},
24690
24691	_stop: function( event ) {
24692		if ( !this.spinning ) {
24693			return;
24694		}
24695
24696		clearTimeout( this.timer );
24697		clearTimeout( this.mousewheelTimer );
24698		this.counter = 0;
24699		this.spinning = false;
24700		this._trigger( "stop", event );
24701	},
24702
24703	_setOption: function( key, value ) {
24704		var prevValue, first, last;
24705
24706		if ( key === "culture" || key === "numberFormat" ) {
24707			prevValue = this._parse( this.element.val() );
24708			this.options[ key ] = value;
24709			this.element.val( this._format( prevValue ) );
24710			return;
24711		}
24712
24713		if ( key === "max" || key === "min" || key === "step" ) {
24714			if ( typeof value === "string" ) {
24715				value = this._parse( value );
24716			}
24717		}
24718		if ( key === "icons" ) {
24719			first = this.buttons.first().find( ".ui-icon" );
24720			this._removeClass( first, null, this.options.icons.up );
24721			this._addClass( first, null, value.up );
24722			last = this.buttons.last().find( ".ui-icon" );
24723			this._removeClass( last, null, this.options.icons.down );
24724			this._addClass( last, null, value.down );
24725		}
24726
24727		this._super( key, value );
24728	},
24729
24730	_setOptionDisabled: function( value ) {
24731		this._super( value );
24732
24733		this._toggleClass( this.uiSpinner, null, "ui-state-disabled", !!value );
24734		this.element.prop( "disabled", !!value );
24735		this.buttons.button( value ? "disable" : "enable" );
24736	},
24737
24738	_setOptions: spinnerModifier( function( options ) {
24739		this._super( options );
24740	} ),
24741
24742	_parse: function( val ) {
24743		if ( typeof val === "string" && val !== "" ) {
24744			val = window.Globalize && this.options.numberFormat ?
24745				Globalize.parseFloat( val, 10, this.options.culture ) : +val;
24746		}
24747		return val === "" || isNaN( val ) ? null : val;
24748	},
24749
24750	_format: function( value ) {
24751		if ( value === "" ) {
24752			return "";
24753		}
24754		return window.Globalize && this.options.numberFormat ?
24755			Globalize.format( value, this.options.numberFormat, this.options.culture ) :
24756			value;
24757	},
24758
24759	_refresh: function() {
24760		this.element.attr( {
24761			"aria-valuemin": this.options.min,
24762			"aria-valuemax": this.options.max,
24763
24764			// TODO: what should we do with values that can't be parsed?
24765			"aria-valuenow": this._parse( this.element.val() )
24766		} );
24767	},
24768
24769	isValid: function() {
24770		var value = this.value();
24771
24772		// Null is invalid
24773		if ( value === null ) {
24774			return false;
24775		}
24776
24777		// If value gets adjusted, it's invalid
24778		return value === this._adjustValue( value );
24779	},
24780
24781	// Update the value without triggering change
24782	_value: function( value, allowAny ) {
24783		var parsed;
24784		if ( value !== "" ) {
24785			parsed = this._parse( value );
24786			if ( parsed !== null ) {
24787				if ( !allowAny ) {
24788					parsed = this._adjustValue( parsed );
24789				}
24790				value = this._format( parsed );
24791			}
24792		}
24793		this.element.val( value );
24794		this._refresh();
24795	},
24796
24797	_destroy: function() {
24798		this.element
24799			.prop( "disabled", false )
24800			.removeAttr( "autocomplete role aria-valuemin aria-valuemax aria-valuenow" );
24801
24802		this.uiSpinner.replaceWith( this.element );
24803	},
24804
24805	stepUp: spinnerModifier( function( steps ) {
24806		this._stepUp( steps );
24807	} ),
24808	_stepUp: function( steps ) {
24809		if ( this._start() ) {
24810			this._spin( ( steps || 1 ) * this.options.step );
24811			this._stop();
24812		}
24813	},
24814
24815	stepDown: spinnerModifier( function( steps ) {
24816		this._stepDown( steps );
24817	} ),
24818	_stepDown: function( steps ) {
24819		if ( this._start() ) {
24820			this._spin( ( steps || 1 ) * -this.options.step );
24821			this._stop();
24822		}
24823	},
24824
24825	pageUp: spinnerModifier( function( pages ) {
24826		this._stepUp( ( pages || 1 ) * this.options.page );
24827	} ),
24828
24829	pageDown: spinnerModifier( function( pages ) {
24830		this._stepDown( ( pages || 1 ) * this.options.page );
24831	} ),
24832
24833	value: function( newVal ) {
24834		if ( !arguments.length ) {
24835			return this._parse( this.element.val() );
24836		}
24837		spinnerModifier( this._value ).call( this, newVal );
24838	},
24839
24840	widget: function() {
24841		return this.uiSpinner;
24842	}
24843} );
24844
24845// DEPRECATED
24846// TODO: switch return back to widget declaration at top of file when this is removed
24847if ( $.uiBackCompat === true ) {
24848
24849	// Backcompat for spinner html extension points
24850	$.widget( "ui.spinner", $.ui.spinner, {
24851		_enhance: function() {
24852			this.uiSpinner = this.element
24853				.attr( "autocomplete", "off" )
24854				.wrap( this._uiSpinnerHtml() )
24855				.parent()
24856
24857					// Add buttons
24858					.append( this._buttonHtml() );
24859		},
24860		_uiSpinnerHtml: function() {
24861			return "<span>";
24862		},
24863
24864		_buttonHtml: function() {
24865			return "<a></a><a></a>";
24866		}
24867	} );
24868}
24869
24870var widgetsSpinner = $.ui.spinner;
24871
24872
24873/*!
24874 * jQuery UI Tabs 1.14.
vendor: 12,208 bytes, lines 24874-25346
248740
24875 * https://jqueryui.com
24876 *
24877 * Copyright OpenJS Foundation and other contributors
24878 * Released under the MIT license.
24879 * https://jquery.org/license
24880 */
24881
24882//>>label: Tabs
24883//>>group: Widgets
24884//>>description: Transforms a set of container elements into a tab structure.
24885//>>docs: https://api.jqueryui.com/tabs/
24886//>>demos: https://jqueryui.com/tabs/
24887//>>css.structure: ../../themes/base/core.css
24888//>>css.structure: ../../themes/base/tabs.css
24889//>>css.theme: ../../themes/base/theme.css
24890
24891
24892$.widget( "ui.tabs", {
24893	version: "1.14.0",
24894	delay: 300,
24895	options: {
24896		active: null,
24897		classes: {
24898			"ui-tabs": "ui-corner-all",
24899			"ui-tabs-nav": "ui-corner-all",
24900			"ui-tabs-panel": "ui-corner-bottom",
24901			"ui-tabs-tab": "ui-corner-top"
24902		},
24903		collapsible: false,
24904		event: "click",
24905		heightStyle: "content",
24906		hide: null,
24907		show: null,
24908
24909		// Callbacks
24910		activate: null,
24911		beforeActivate: null,
24912		beforeLoad: null,
24913		load: null
24914	},
24915
24916	_isLocal: ( function() {
24917		var rhash = /#.*$/;
24918
24919		return function( anchor ) {
24920			var anchorUrl, locationUrl;
24921
24922			anchorUrl = anchor.href.replace( rhash, "" );
24923			locationUrl = location.href.replace( rhash, "" );
24924
24925			// Decoding may throw an error if the URL isn't UTF-8 (#9518)
24926			try {
24927				anchorUrl = decodeURIComponent( anchorUrl );
24928			} catch ( error ) {}
24929			try {
24930				locationUrl = decodeURIComponent( locationUrl );
24931			} catch ( error ) {}
24932
24933			return anchor.hash.length > 1 && anchorUrl === locationUrl;
24934		};
24935	} )(),
24936
24937	_create: function() {
24938		var that = this,
24939			options = this.options;
24940
24941		this.running = false;
24942
24943		this._addClass( "ui-tabs", "ui-widget ui-widget-content" );
24944		this._toggleClass( "ui-tabs-collapsible", null, options.collapsible );
24945
24946		this._processTabs();
24947		options.active = this._initialActive();
24948
24949		// Take disabling tabs via class attribute from HTML
24950		// into account and update option properly.
24951		if ( Array.isArray( options.disabled ) ) {
24952			options.disabled = $.uniqueSort( options.disabled.concat(
24953				$.map( this.tabs.filter( ".ui-state-disabled" ), function( li ) {
24954					return that.tabs.index( li );
24955				} )
24956			) ).sort();
24957		}
24958
24959		// Check for length avoids error when initializing empty list
24960		if ( this.options.active !== false && this.anchors.length ) {
24961			this.active = this._findActive( options.active );
24962		} else {
24963			this.active = $();
24964		}
24965
24966		this._refresh();
24967
24968		if ( this.active.length ) {
24969			this.load( options.active );
24970		}
24971	},
24972
24973	_initialActive: function() {
24974		var active = this.options.active,
24975			collapsible = this.options.collapsible,
24976			locationHash = location.hash.substring( 1 );
24977
24978		if ( active === null ) {
24979
24980			// check the fragment identifier in the URL
24981			if ( locationHash ) {
24982				this.tabs.each( function( i, tab ) {
24983					if ( $( tab ).attr( "aria-controls" ) === locationHash ) {
24984						active = i;
24985						return false;
24986					}
24987				} );
24988			}
24989
24990			// Check for a tab marked active via a class
24991			if ( active === null ) {
24992				active = this.tabs.index( this.tabs.filter( ".ui-tabs-active" ) );
24993			}
24994
24995			// No active tab, set to false
24996			if ( active === null || active === -1 ) {
24997				active = this.tabs.length ? 0 : false;
24998			}
24999		}
25000
25001		// Handle numbers: negative, out of range
25002		if ( active !== false ) {
25003			active = this.tabs.index( this.tabs.eq( active ) );
25004			if ( active === -1 ) {
25005				active = collapsible ? false : 0;
25006			}
25007		}
25008
25009		// Don't allow collapsible: false and active: false
25010		if ( !collapsible && active === false && this.anchors.length ) {
25011			active = 0;
25012		}
25013
25014		return active;
25015	},
25016
25017	_getCreateEventData: function() {
25018		return {
25019			tab: this.active,
25020			panel: !this.active.length ? $() : this._getPanelForTab( this.active )
25021		};
25022	},
25023
25024	_tabKeydown: function( event ) {
25025		var focusedTab = $( this.document[ 0 ].activeElement ).closest( "li" ),
25026			selectedIndex = this.tabs.index( focusedTab ),
25027			goingForward = true;
25028
25029		if ( this._handlePageNav( event ) ) {
25030			return;
25031		}
25032
25033		switch ( event.keyCode ) {
25034		case $.ui.keyCode.RIGHT:
25035		case $.ui.keyCode.DOWN:
25036			selectedIndex++;
25037			break;
25038		case $.ui.keyCode.UP:
25039		case $.ui.keyCode.LEFT:
25040			goingForward = false;
25041			selectedIndex--;
25042			break;
25043		case $.ui.keyCode.END:
25044			selectedIndex = this.anchors.length - 1;
25045			break;
25046		case $.ui.keyCode.HOME:
25047			selectedIndex = 0;
25048			break;
25049		case $.ui.keyCode.SPACE:
25050
25051			// Activate only, no collapsing
25052			event.preventDefault();
25053			clearTimeout( this.activating );
25054			this._activate( selectedIndex );
25055			return;
25056		case $.ui.keyCode.ENTER:
25057
25058			// Toggle (cancel delayed activation, allow collapsing)
25059			event.preventDefault();
25060			clearTimeout( this.activating );
25061
25062			// Determine if we should collapse or activate
25063			this._activate( selectedIndex === this.options.active ? false : selectedIndex );
25064			return;
25065		default:
25066			return;
25067		}
25068
25069		// Focus the appropriate tab, based on which key was pressed
25070		event.preventDefault();
25071		clearTimeout( this.activating );
25072		selectedIndex = this._focusNextTab( selectedIndex, goingForward );
25073
25074		// Navigating with control/command key will prevent automatic activation
25075		if ( !event.ctrlKey && !event.metaKey ) {
25076
25077			// Update aria-selected immediately so that AT think the tab is already selected.
25078			// Otherwise AT may confuse the user by stating that they need to activate the tab,
25079			// but the tab will already be activated by the time the announcement finishes.
25080			focusedTab.attr( "aria-selected", "false" );
25081			this.tabs.eq( selectedIndex ).attr( "aria-selected", "true" );
25082
25083			this.activating = this._delay( function() {
25084				this.option( "active", selectedIndex );
25085			}, this.delay );
25086		}
25087	},
25088
25089	_panelKeydown: function( event ) {
25090		if ( this._handlePageNav( event ) ) {
25091			return;
25092		}
25093
25094		// Ctrl+up moves focus to the current tab
25095		if ( event.ctrlKey && event.keyCode === $.ui.keyCode.UP ) {
25096			event.preventDefault();
25097			this.active.trigger( "focus" );
25098		}
25099	},
25100
25101	// Alt+page up/down moves focus to the previous/next tab (and activates)
25102	_handlePageNav: function( event ) {
25103		if ( event.altKey && event.keyCode === $.ui.keyCode.PAGE_UP ) {
25104			this._activate( this._focusNextTab( this.options.active - 1, false ) );
25105			return true;
25106		}
25107		if ( event.altKey && event.keyCode === $.ui.keyCode.PAGE_DOWN ) {
25108			this._activate( this._focusNextTab( this.options.active + 1, true ) );
25109			return true;
25110		}
25111	},
25112
25113	_findNextTab: function( index, goingForward ) {
25114		var lastTabIndex = this.tabs.length - 1;
25115
25116		function constrain() {
25117			if ( index > lastTabIndex ) {
25118				index = 0;
25119			}
25120			if ( index < 0 ) {
25121				index = lastTabIndex;
25122			}
25123			return index;
25124		}
25125
25126		while ( $.inArray( constrain(), this.options.disabled ) !== -1 ) {
25127			index = goingForward ? index + 1 : index - 1;
25128		}
25129
25130		return index;
25131	},
25132
25133	_focusNextTab: function( index, goingForward ) {
25134		index = this._findNextTab( index, goingForward );
25135		this.tabs.eq( index ).trigger( "focus" );
25136		return index;
25137	},
25138
25139	_setOption: function( key, value ) {
25140		if ( key === "active" ) {
25141
25142			// _activate() will handle invalid values and update this.options
25143			this._activate( value );
25144			return;
25145		}
25146
25147		this._super( key, value );
25148
25149		if ( key === "collapsible" ) {
25150			this._toggleClass( "ui-tabs-collapsible", null, value );
25151
25152			// Setting collapsible: false while collapsed; open first panel
25153			if ( !value && this.options.active === false ) {
25154				this._activate( 0 );
25155			}
25156		}
25157
25158		if ( key === "event" ) {
25159			this._setupEvents( value );
25160		}
25161
25162		if ( key === "heightStyle" ) {
25163			this._setupHeightStyle( value );
25164		}
25165	},
25166
25167	_sanitizeSelector: function( hash ) {
25168		return hash ? hash.replace( /[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g, "\\$&" ) : "";
25169	},
25170
25171	refresh: function() {
25172		var options = this.options,
25173			lis = this.tablist.children( ":has(a[href])" );
25174
25175		// Get disabled tabs from class attribute from HTML
25176		// this will get converted to a boolean if needed in _refresh()
25177		options.disabled = $.map( lis.filter( ".ui-state-disabled" ), function( tab ) {
25178			return lis.index( tab );
25179		} );
25180
25181		this._processTabs();
25182
25183		// Was collapsed or no tabs
25184		if ( options.active === false || !this.anchors.length ) {
25185			options.active = false;
25186			this.active = $();
25187
25188		// was active, but active tab is gone
25189		} else if ( this.active.length && !$.contains( this.tablist[ 0 ], this.active[ 0 ] ) ) {
25190
25191			// all remaining tabs are disabled
25192			if ( this.tabs.length === options.disabled.length ) {
25193				options.active = false;
25194				this.active = $();
25195
25196			// activate previous tab
25197			} else {
25198				this._activate( this._findNextTab( Math.max( 0, options.active - 1 ), false ) );
25199			}
25200
25201		// was active, active tab still exists
25202		} else {
25203
25204			// make sure active index is correct
25205			options.active = this.tabs.index( this.active );
25206		}
25207
25208		this._refresh();
25209	},
25210
25211	_refresh: function() {
25212		this._setOptionDisabled( this.options.disabled );
25213		this._setupEvents( this.options.event );
25214		this._setupHeightStyle( this.options.heightStyle );
25215
25216		this.tabs.not( this.active ).attr( {
25217			"aria-selected": "false",
25218			"aria-expanded": "false",
25219			tabIndex: -1
25220		} );
25221		this.panels.not( this._getPanelForTab( this.active ) )
25222			.hide()
25223			.attr( {
25224				"aria-hidden": "true"
25225			} );
25226
25227		// Make sure one tab is in the tab order
25228		if ( !this.active.length ) {
25229			this.tabs.eq( 0 ).attr( "tabIndex", 0 );
25230		} else {
25231			this.active
25232				.attr( {
25233					"aria-selected": "true",
25234					"aria-expanded": "true",
25235					tabIndex: 0
25236				} );
25237			this._addClass( this.active, "ui-tabs-active", "ui-state-active" );
25238			this._getPanelForTab( this.active )
25239				.show()
25240				.attr( {
25241					"aria-hidden": "false"
25242				} );
25243		}
25244	},
25245
25246	_processTabs: function() {
25247		var that = this,
25248			prevTabs = this.tabs,
25249			prevAnchors = this.anchors,
25250			prevPanels = this.panels;
25251
25252		this.tablist = this._getList().attr( "role", "tablist" );
25253		this._addClass( this.tablist, "ui-tabs-nav",
25254			"ui-helper-reset ui-helper-clearfix ui-widget-header" );
25255
25256		// Prevent users from focusing disabled tabs via click
25257		this.tablist
25258			.on( "mousedown" + this.eventNamespace, "> li", function( event ) {
25259				if ( $( this ).is( ".ui-state-disabled" ) ) {
25260					event.preventDefault();
25261				}
25262			} );
25263
25264		this.tabs = this.tablist.find( "> li:has(a[href])" )
25265			.attr( {
25266				role: "tab",
25267				tabIndex: -1
25268			} );
25269		this._addClass( this.tabs, "ui-tabs-tab", "ui-state-default" );
25270
25271		this.anchors = this.tabs.map( function() {
25272			return $( "a", this )[ 0 ];
25273		} )
25274			.attr( {
25275				tabIndex: -1
25276			} );
25277		this._addClass( this.anchors, "ui-tabs-anchor" );
25278
25279		this.panels = $();
25280
25281		this.anchors.each( function( i, anchor ) {
25282			var selector, panel, panelId,
25283				anchorId = $( anchor ).uniqueId().attr( "id" ),
25284				tab = $( anchor ).closest( "li" ),
25285				originalAriaControls = tab.attr( "aria-controls" );
25286
25287			// Inline tab
25288			if ( that._isLocal( anchor ) ) {
25289				selector = anchor.hash;
25290				panelId = selector.substring( 1 );
25291				panel = that.element.find( that._sanitizeSelector( selector ) );
25292
25293			// remote tab
25294			} else {
25295
25296				// If the tab doesn't already have aria-controls,
25297				// generate an id by using a throw-away element
25298				panelId = tab.attr( "aria-controls" ) || $( {} ).uniqueId()[ 0 ].id;
25299				selector = "#" + panelId;
25300				panel = that.element.find( selector );
25301				if ( !panel.length ) {
25302					panel = that._createPanel( panelId );
25303					panel.insertAfter( that.panels[ i - 1 ] || that.tablist );
25304				}
25305				panel.attr( "aria-live", "polite" );
25306			}
25307
25308			if ( panel.length ) {
25309				that.panels = that.panels.add( panel );
25310			}
25311			if ( originalAriaControls ) {
25312				tab.data( "ui-tabs-aria-controls", originalAriaControls );
25313			}
25314			tab.attr( {
25315				"aria-controls": panelId,
25316				"aria-labelledby": anchorId
25317			} );
25318			panel.attr( "aria-labelledby", anchorId );
25319		} );
25320
25321		this.panels.attr( "role", "tabpanel" );
25322		this._addClass( this.panels, "ui-tabs-panel", "ui-widget-content" );
25323
25324		// Avoid memory leaks (#10056)
25325		if ( prevTabs ) {
25326			this._off( prevTabs.not( this.tabs ) );
25327			this._off( prevAnchors.not( this.anchors ) );
25328			this._off( prevPanels.not( this.panels ) );
25329		}
25330	},
25331
25332	// Allow overriding how to find the list for rare usage scenarios (#7715)
25333	_getList: function() {
25334		return this.tablist || this.element.find( "ol, ul" ).eq( 0 );
25335	},
25336
25337	_createPanel: function( id ) {
25338		return $( "<div>" )
25339			.attr( "id", id )
25340			.data( "ui-tabs-destroy", true );
25341	},
25342
25343	_setOptionDisabled: function( disabled ) {
25344		var currentItem, li, i;
25345
25346		if ( Array
vendor: 6,222 bytes, lines 25346-25577
25346.isArray( disabled ) ) {
25347			if ( !disabled.length ) {
25348				disabled = false;
25349			} else if ( disabled.length === this.anchors.length ) {
25350				disabled = true;
25351			}
25352		}
25353
25354		// Disable tabs
25355		for ( i = 0; ( li = this.tabs[ i ] ); i++ ) {
25356			currentItem = $( li );
25357			if ( disabled === true || $.inArray( i, disabled ) !== -1 ) {
25358				currentItem.attr( "aria-disabled", "true" );
25359				this._addClass( currentItem, null, "ui-state-disabled" );
25360			} else {
25361				currentItem.removeAttr( "aria-disabled" );
25362				this._removeClass( currentItem, null, "ui-state-disabled" );
25363			}
25364		}
25365
25366		this.options.disabled = disabled;
25367
25368		this._toggleClass( this.widget(), this.widgetFullName + "-disabled", null,
25369			disabled === true );
25370	},
25371
25372	_setupEvents: function( event ) {
25373		var events = {};
25374		if ( event ) {
25375			$.each( event.split( " " ), function( index, eventName ) {
25376				events[ eventName ] = "_eventHandler";
25377			} );
25378		}
25379
25380		this._off( this.anchors.add( this.tabs ).add( this.panels ) );
25381
25382		// Always prevent the default action, even when disabled
25383		this._on( true, this.anchors, {
25384			click: function( event ) {
25385				event.preventDefault();
25386			}
25387		} );
25388		this._on( this.anchors, events );
25389		this._on( this.tabs, { keydown: "_tabKeydown" } );
25390		this._on( this.panels, { keydown: "_panelKeydown" } );
25391
25392		this._focusable( this.tabs );
25393		this._hoverable( this.tabs );
25394	},
25395
25396	_setupHeightStyle: function( heightStyle ) {
25397		var maxHeight,
25398			parent = this.element.parent();
25399
25400		if ( heightStyle === "fill" ) {
25401			maxHeight = parent.height();
25402			maxHeight -= this.element.outerHeight() - this.element.height();
25403
25404			this.element.siblings( ":visible" ).each( function() {
25405				var elem = $( this ),
25406					position = elem.css( "position" );
25407
25408				if ( position === "absolute" || position === "fixed" ) {
25409					return;
25410				}
25411				maxHeight -= elem.outerHeight( true );
25412			} );
25413
25414			this.element.children().not( this.panels ).each( function() {
25415				maxHeight -= $( this ).outerHeight( true );
25416			} );
25417
25418			this.panels.each( function() {
25419				$( this ).height( Math.max( 0, maxHeight -
25420					$( this ).innerHeight() + $( this ).height() ) );
25421			} )
25422				.css( "overflow", "auto" );
25423		} else if ( heightStyle === "auto" ) {
25424			maxHeight = 0;
25425			this.panels.each( function() {
25426				maxHeight = Math.max( maxHeight, $( this ).height( "" ).height() );
25427			} ).height( maxHeight );
25428		}
25429	},
25430
25431	_eventHandler: function( event ) {
25432		var options = this.options,
25433			active = this.active,
25434			anchor = $( event.currentTarget ),
25435			tab = anchor.closest( "li" ),
25436			clickedIsActive = tab[ 0 ] === active[ 0 ],
25437			collapsing = clickedIsActive && options.collapsible,
25438			toShow = collapsing ? $() : this._getPanelForTab( tab ),
25439			toHide = !active.length ? $() : this._getPanelForTab( active ),
25440			eventData = {
25441				oldTab: active,
25442				oldPanel: toHide,
25443				newTab: collapsing ? $() : tab,
25444				newPanel: toShow
25445			};
25446
25447		event.preventDefault();
25448
25449		if ( tab.hasClass( "ui-state-disabled" ) ||
25450
25451				// tab is already loading
25452				tab.hasClass( "ui-tabs-loading" ) ||
25453
25454				// can't switch durning an animation
25455				this.running ||
25456
25457				// click on active header, but not collapsible
25458				( clickedIsActive && !options.collapsible ) ||
25459
25460				// allow canceling activation
25461				( this._trigger( "beforeActivate", event, eventData ) === false ) ) {
25462			return;
25463		}
25464
25465		options.active = collapsing ? false : this.tabs.index( tab );
25466
25467		this.active = clickedIsActive ? $() : tab;
25468		if ( this.xhr ) {
25469			this.xhr.abort();
25470		}
25471
25472		if ( !toHide.length && !toShow.length ) {
25473			$.error( "jQuery UI Tabs: Mismatching fragment identifier." );
25474		}
25475
25476		if ( toShow.length ) {
25477			this.load( this.tabs.index( tab ), event );
25478		}
25479		this._toggle( event, eventData );
25480	},
25481
25482	// Handles show/hide for selecting tabs
25483	_toggle: function( event, eventData ) {
25484		var that = this,
25485			toShow = eventData.newPanel,
25486			toHide = eventData.oldPanel;
25487
25488		this.running = true;
25489
25490		function complete() {
25491			that.running = false;
25492			that._trigger( "activate", event, eventData );
25493		}
25494
25495		function show() {
25496			that._addClass( eventData.newTab.closest( "li" ), "ui-tabs-active", "ui-state-active" );
25497
25498			if ( toShow.length && that.options.show ) {
25499				that._show( toShow, that.options.show, complete );
25500			} else {
25501				toShow.show();
25502				complete();
25503			}
25504		}
25505
25506		// Start out by hiding, then showing, then completing
25507		if ( toHide.length && this.options.hide ) {
25508			this._hide( toHide, this.options.hide, function() {
25509				that._removeClass( eventData.oldTab.closest( "li" ),
25510					"ui-tabs-active", "ui-state-active" );
25511				show();
25512			} );
25513		} else {
25514			this._removeClass( eventData.oldTab.closest( "li" ),
25515				"ui-tabs-active", "ui-state-active" );
25516			toHide.hide();
25517			show();
25518		}
25519
25520		toHide.attr( "aria-hidden", "true" );
25521		eventData.oldTab.attr( {
25522			"aria-selected": "false",
25523			"aria-expanded": "false"
25524		} );
25525
25526		// If we're switching tabs, remove the old tab from the tab order.
25527		// If we're opening from collapsed state, remove the previous tab from the tab order.
25528		// If we're collapsing, then keep the collapsing tab in the tab order.
25529		if ( toShow.length && toHide.length ) {
25530			eventData.oldTab.attr( "tabIndex", -1 );
25531		} else if ( toShow.length ) {
25532			this.tabs.filter( function() {
25533				return $( this ).attr( "tabIndex" ) === 0;
25534			} )
25535				.attr( "tabIndex", -1 );
25536		}
25537
25538		toShow.attr( "aria-hidden", "false" );
25539		eventData.newTab.attr( {
25540			"aria-selected": "true",
25541			"aria-expanded": "true",
25542			tabIndex: 0
25543		} );
25544	},
25545
25546	_activate: function( index ) {
25547		var anchor,
25548			active = this._findActive( index );
25549
25550		// Trying to activate the already active panel
25551		if ( active[ 0 ] === this.active[ 0 ] ) {
25552			return;
25553		}
25554
25555		// Trying to collapse, simulate a click on the current active header
25556		if ( !active.length ) {
25557			active = this.active;
25558		}
25559
25560		anchor = active.find( ".ui-tabs-anchor" )[ 0 ];
25561		this._eventHandler( {
25562			target: anchor,
25563			currentTarget: anchor,
25564			preventDefault: $.noop
25565		} );
25566	},
25567
25568	_findActive: function( index ) {
25569		return index === false ? $() : this.tabs.eq( index );
25570	},
25571
25572	_getIndex: function( index ) {
25573
25574		// meta-function to give users option to provide a href string instead of a numerical index.
25575		if ( typeof index === "string" ) {
25576			index = this.anchors.index( this.anchors.filter( "[href$='" +
25577				
vendor: 23,849 bytes, lines 25577-26344
25577CSS.escape( index ) + "']" ) );
25578		}
25579
25580		return index;
25581	},
25582
25583	_destroy: function() {
25584		if ( this.xhr ) {
25585			this.xhr.abort();
25586		}
25587
25588		this.tablist
25589			.removeAttr( "role" )
25590			.off( this.eventNamespace );
25591
25592		this.anchors
25593			.removeAttr( "role tabIndex" )
25594			.removeUniqueId();
25595
25596		this.tabs.add( this.panels ).each( function() {
25597			if ( $.data( this, "ui-tabs-destroy" ) ) {
25598				$( this ).remove();
25599			} else {
25600				$( this ).removeAttr( "role tabIndex " +
25601					"aria-live aria-busy aria-selected aria-labelledby aria-hidden aria-expanded" );
25602			}
25603		} );
25604
25605		this.tabs.each( function() {
25606			var li = $( this ),
25607				prev = li.data( "ui-tabs-aria-controls" );
25608			if ( prev ) {
25609				li
25610					.attr( "aria-controls", prev )
25611					.removeData( "ui-tabs-aria-controls" );
25612			} else {
25613				li.removeAttr( "aria-controls" );
25614			}
25615		} );
25616
25617		this.panels.show();
25618
25619		if ( this.options.heightStyle !== "content" ) {
25620			this.panels.css( "height", "" );
25621		}
25622	},
25623
25624	enable: function( index ) {
25625		var disabled = this.options.disabled;
25626		if ( disabled === false ) {
25627			return;
25628		}
25629
25630		if ( index === undefined ) {
25631			disabled = false;
25632		} else {
25633			index = this._getIndex( index );
25634			if ( Array.isArray( disabled ) ) {
25635				disabled = $.map( disabled, function( num ) {
25636					return num !== index ? num : null;
25637				} );
25638			} else {
25639				disabled = $.map( this.tabs, function( li, num ) {
25640					return num !== index ? num : null;
25641				} );
25642			}
25643		}
25644		this._setOptionDisabled( disabled );
25645	},
25646
25647	disable: function( index ) {
25648		var disabled = this.options.disabled;
25649		if ( disabled === true ) {
25650			return;
25651		}
25652
25653		if ( index === undefined ) {
25654			disabled = true;
25655		} else {
25656			index = this._getIndex( index );
25657			if ( $.inArray( index, disabled ) !== -1 ) {
25658				return;
25659			}
25660			if ( Array.isArray( disabled ) ) {
25661				disabled = $.merge( [ index ], disabled ).sort();
25662			} else {
25663				disabled = [ index ];
25664			}
25665		}
25666		this._setOptionDisabled( disabled );
25667	},
25668
25669	load: function( index, event ) {
25670		index = this._getIndex( index );
25671		var that = this,
25672			tab = this.tabs.eq( index ),
25673			anchor = tab.find( ".ui-tabs-anchor" ),
25674			panel = this._getPanelForTab( tab ),
25675			eventData = {
25676				tab: tab,
25677				panel: panel
25678			},
25679			complete = function( jqXHR, status ) {
25680				if ( status === "abort" ) {
25681					that.panels.stop( false, true );
25682				}
25683
25684				that._removeClass( tab, "ui-tabs-loading" );
25685				panel.removeAttr( "aria-busy" );
25686
25687				if ( jqXHR === that.xhr ) {
25688					delete that.xhr;
25689				}
25690			};
25691
25692		// Not remote
25693		if ( this._isLocal( anchor[ 0 ] ) ) {
25694			return;
25695		}
25696
25697		this.xhr = $.ajax( this._ajaxSettings( anchor, event, eventData ) );
25698
25699		if ( this.xhr.statusText !== "canceled" ) {
25700			this._addClass( tab, "ui-tabs-loading" );
25701			panel.attr( "aria-busy", "true" );
25702
25703			this.xhr
25704				.done( function( response, status, jqXHR ) {
25705					panel.html( response );
25706					that._trigger( "load", event, eventData );
25707
25708					complete( jqXHR, status );
25709				} )
25710				.fail( function( jqXHR, status ) {
25711					complete( jqXHR, status );
25712				} );
25713		}
25714	},
25715
25716	_ajaxSettings: function( anchor, event, eventData ) {
25717		var that = this;
25718		return {
25719			url: anchor.attr( "href" ),
25720			beforeSend: function( jqXHR, settings ) {
25721				return that._trigger( "beforeLoad", event,
25722					$.extend( { jqXHR: jqXHR, ajaxSettings: settings }, eventData ) );
25723			}
25724		};
25725	},
25726
25727	_getPanelForTab: function( tab ) {
25728		var id = $( tab ).attr( "aria-controls" );
25729		return this.element.find( this._sanitizeSelector( "#" + id ) );
25730	}
25731} );
25732
25733// DEPRECATED
25734// TODO: Switch return back to widget declaration at top of file when this is removed
25735if ( $.uiBackCompat === true ) {
25736
25737	// Backcompat for ui-tab class (now ui-tabs-tab)
25738	$.widget( "ui.tabs", $.ui.tabs, {
25739		_processTabs: function() {
25740			this._superApply( arguments );
25741			this._addClass( this.tabs, "ui-tab" );
25742		}
25743	} );
25744}
25745
25746var widgetsTabs = $.ui.tabs;
25747
25748
25749/*!
25750 * jQuery UI Tooltip 1.14.0
25751 * https://jqueryui.com
25752 *
25753 * Copyright OpenJS Foundation and other contributors
25754 * Released under the MIT license.
25755 * https://jquery.org/license
25756 */
25757
25758//>>label: Tooltip
25759//>>group: Widgets
25760//>>description: Shows additional information for any element on hover or focus.
25761//>>docs: https://api.jqueryui.com/tooltip/
25762//>>demos: https://jqueryui.com/tooltip/
25763//>>css.structure: ../../themes/base/core.css
25764//>>css.structure: ../../themes/base/tooltip.css
25765//>>css.theme: ../../themes/base/theme.css
25766
25767
25768$.widget( "ui.tooltip", {
25769	version: "1.14.0",
25770	options: {
25771		classes: {
25772			"ui-tooltip": "ui-corner-all ui-widget-shadow"
25773		},
25774		content: function() {
25775			var title = $( this ).attr( "title" );
25776
25777			// Escape title, since we're going from an attribute to raw HTML
25778			return $( "<a>" ).text( title ).html();
25779		},
25780		hide: true,
25781
25782		// Disabled elements have inconsistent behavior across browsers (#8661)
25783		items: "[title]:not([disabled])",
25784		position: {
25785			my: "left top+15",
25786			at: "left bottom",
25787			collision: "flipfit flip"
25788		},
25789		show: true,
25790		track: false,
25791
25792		// Callbacks
25793		close: null,
25794		open: null
25795	},
25796
25797	_addDescribedBy: function( elem, id ) {
25798		var describedby = ( elem.attr( "aria-describedby" ) || "" ).split( /\s+/ );
25799		describedby.push( id );
25800		elem
25801			.data( "ui-tooltip-id", id )
25802			.attr( "aria-describedby", String.prototype.trim.call( describedby.join( " " ) ) );
25803	},
25804
25805	_removeDescribedBy: function( elem ) {
25806		var id = elem.data( "ui-tooltip-id" ),
25807			describedby = ( elem.attr( "aria-describedby" ) || "" ).split( /\s+/ ),
25808			index = $.inArray( id, describedby );
25809
25810		if ( index !== -1 ) {
25811			describedby.splice( index, 1 );
25812		}
25813
25814		elem.removeData( "ui-tooltip-id" );
25815		describedby = String.prototype.trim.call( describedby.join( " " ) );
25816		if ( describedby ) {
25817			elem.attr( "aria-describedby", describedby );
25818		} else {
25819			elem.removeAttr( "aria-describedby" );
25820		}
25821	},
25822
25823	_create: function() {
25824		this._on( {
25825			mouseover: "open",
25826			focusin: "open"
25827		} );
25828
25829		// IDs of generated tooltips, needed for destroy
25830		this.tooltips = {};
25831
25832		// IDs of parent tooltips where we removed the title attribute
25833		this.parents = {};
25834
25835		// Append the aria-live region so tooltips announce correctly
25836		this.liveRegion = $( "<div>" )
25837			.attr( {
25838				role: "log",
25839				"aria-live": "assertive",
25840				"aria-relevant": "additions"
25841			} )
25842			.appendTo( this.document[ 0 ].body );
25843		this._addClass( this.liveRegion, null, "ui-helper-hidden-accessible" );
25844
25845		this.disabledTitles = $( [] );
25846	},
25847
25848	_setOption: function( key, value ) {
25849		var that = this;
25850
25851		this._super( key, value );
25852
25853		if ( key === "content" ) {
25854			$.each( this.tooltips, function( id, tooltipData ) {
25855				that._updateContent( tooltipData.element );
25856			} );
25857		}
25858	},
25859
25860	_setOptionDisabled: function( value ) {
25861		this[ value ? "_disable" : "_enable" ]();
25862	},
25863
25864	_disable: function() {
25865		var that = this;
25866
25867		// Close open tooltips
25868		$.each( this.tooltips, function( id, tooltipData ) {
25869			var event = $.Event( "blur" );
25870			event.target = event.currentTarget = tooltipData.element[ 0 ];
25871			that.close( event, true );
25872		} );
25873
25874		// Remove title attributes to prevent native tooltips
25875		this.disabledTitles = this.disabledTitles.add(
25876			this.element.find( this.options.items ).addBack()
25877				.filter( function() {
25878					var element = $( this );
25879					if ( element.is( "[title]" ) ) {
25880						return element
25881							.data( "ui-tooltip-title", element.attr( "title" ) )
25882							.removeAttr( "title" );
25883					}
25884				} )
25885		);
25886	},
25887
25888	_enable: function() {
25889
25890		// restore title attributes
25891		this.disabledTitles.each( function() {
25892			var element = $( this );
25893			if ( element.data( "ui-tooltip-title" ) ) {
25894				element.attr( "title", element.data( "ui-tooltip-title" ) );
25895			}
25896		} );
25897		this.disabledTitles = $( [] );
25898	},
25899
25900	open: function( event ) {
25901		var that = this,
25902			target = $( event ? event.target : this.element )
25903
25904				// we need closest here due to mouseover bubbling,
25905				// but always pointing at the same event target
25906				.closest( this.options.items );
25907
25908		// No element to show a tooltip for or the tooltip is already open
25909		if ( !target.length || target.data( "ui-tooltip-id" ) ) {
25910			return;
25911		}
25912
25913		if ( target.attr( "title" ) ) {
25914			target.data( "ui-tooltip-title", target.attr( "title" ) );
25915		}
25916
25917		target.data( "ui-tooltip-open", true );
25918
25919		// Kill parent tooltips, custom or native, for hover
25920		if ( event && event.type === "mouseover" ) {
25921			target.parents().each( function() {
25922				var parent = $( this ),
25923					blurEvent;
25924				if ( parent.data( "ui-tooltip-open" ) ) {
25925					blurEvent = $.Event( "blur" );
25926					blurEvent.target = blurEvent.currentTarget = this;
25927					that.close( blurEvent, true );
25928				}
25929				if ( parent.attr( "title" ) ) {
25930					parent.uniqueId();
25931					that.parents[ this.id ] = {
25932						element: this,
25933						title: parent.attr( "title" )
25934					};
25935					parent.attr( "title", "" );
25936				}
25937			} );
25938		}
25939
25940		this._registerCloseHandlers( event, target );
25941		this._updateContent( target, event );
25942	},
25943
25944	_updateContent: function( target, event ) {
25945		var content,
25946			contentOption = this.options.content,
25947			that = this,
25948			eventType = event ? event.type : null;
25949
25950		if ( typeof contentOption === "string" || contentOption.nodeType ||
25951				contentOption.jquery ) {
25952			return this._open( event, target, contentOption );
25953		}
25954
25955		content = contentOption.call( target[ 0 ], function( response ) {
25956
25957			// Ignore async response if tooltip was closed already
25958			if ( !target.data( "ui-tooltip-open" ) ) {
25959				return;
25960			}
25961
25962			// JQuery creates a special event for focusin when it doesn't
25963			// exist natively. To improve performance, the native event
25964			// object is reused and the type is changed. Therefore, we can't
25965			// rely on the type being correct after the event finished
25966			// bubbling, so we set it back to the previous value. (#8740)
25967			if ( event ) {
25968				event.type = eventType;
25969			}
25970			that._open( event, target, response );
25971		} );
25972		if ( content ) {
25973			this._open( event, target, content );
25974		}
25975	},
25976
25977	_open: function( event, target, content ) {
25978		var tooltipData, tooltip, delayedShow, a11yContent,
25979			positionOption = $.extend( {}, this.options.position );
25980
25981		if ( !content ) {
25982			return;
25983		}
25984
25985		// Content can be updated multiple times. If the tooltip already
25986		// exists, then just update the content and bail.
25987		tooltipData = this._find( target );
25988		if ( tooltipData ) {
25989			tooltipData.tooltip.find( ".ui-tooltip-content" ).html( content );
25990			return;
25991		}
25992
25993		// If we have a title, clear it to prevent the native tooltip
25994		// we have to check first to avoid defining a title if none exists
25995		// (we don't want to cause an element to start matching [title])
25996		//
25997		// We use removeAttr only for key events, to allow IE to export the correct
25998		// accessible attributes. For mouse events, set to empty string to avoid
25999		// native tooltip showing up (happens only when removing inside mouseover).
26000		if ( target.is( "[title]" ) ) {
26001			if ( event && event.type === "mouseover" ) {
26002				target.attr( "title", "" );
26003			} else {
26004				target.removeAttr( "title" );
26005			}
26006		}
26007
26008		tooltipData = this._tooltip( target );
26009		tooltip = tooltipData.tooltip;
26010		this._addDescribedBy( target, tooltip.attr( "id" ) );
26011		tooltip.find( ".ui-tooltip-content" ).html( content );
26012
26013		// Support: Voiceover on OS X, JAWS on IE <= 9
26014		// JAWS announces deletions even when aria-relevant="additions"
26015		// Voiceover will sometimes re-read the entire log region's contents from the beginning
26016		this.liveRegion.children().hide();
26017		a11yContent = $( "<div>" ).html( tooltip.find( ".ui-tooltip-content" ).html() );
26018		a11yContent.removeAttr( "name" ).find( "[name]" ).removeAttr( "name" );
26019		a11yContent.removeAttr( "id" ).find( "[id]" ).removeAttr( "id" );
26020		a11yContent.appendTo( this.liveRegion );
26021
26022		function position( event ) {
26023			positionOption.of = event;
26024			if ( tooltip.is( ":hidden" ) ) {
26025				return;
26026			}
26027			tooltip.position( positionOption );
26028		}
26029		if ( this.options.track && event && /^mouse/.test( event.type ) ) {
26030			this._on( this.document, {
26031				mousemove: position
26032			} );
26033
26034			// trigger once to override element-relative positioning
26035			position( event );
26036		} else {
26037			tooltip.position( $.extend( {
26038				of: target
26039			}, this.options.position ) );
26040		}
26041
26042		tooltip.hide();
26043
26044		this._show( tooltip, this.options.show );
26045
26046		// Handle tracking tooltips that are shown with a delay (#8644). As soon
26047		// as the tooltip is visible, position the tooltip using the most recent
26048		// event.
26049		// Adds the check to add the timers only when both delay and track options are set (#14682)
26050		if ( this.options.track && this.options.show && this.options.show.delay ) {
26051			delayedShow = this.delayedShow = setInterval( function() {
26052				if ( tooltip.is( ":visible" ) ) {
26053					position( positionOption.of );
26054					clearInterval( delayedShow );
26055				}
26056			}, 13 );
26057		}
26058
26059		this._trigger( "open", event, { tooltip: tooltip } );
26060	},
26061
26062	_registerCloseHandlers: function( event, target ) {
26063		var events = {
26064			keyup: function( event ) {
26065				if ( event.keyCode === $.ui.keyCode.ESCAPE ) {
26066					var fakeEvent = $.Event( event );
26067					fakeEvent.currentTarget = target[ 0 ];
26068					this.close( fakeEvent, true );
26069				}
26070			}
26071		};
26072
26073		// Only bind remove handler for delegated targets. Non-delegated
26074		// tooltips will handle this in destroy.
26075		if ( target[ 0 ] !== this.element[ 0 ] ) {
26076			events.remove = function() {
26077				var targetElement = this._find( target );
26078				if ( targetElement ) {
26079					this._removeTooltip( targetElement.tooltip );
26080				}
26081			};
26082		}
26083
26084		if ( !event || event.type === "mouseover" ) {
26085			events.mouseleave = "close";
26086		}
26087		if ( !event || event.type === "focusin" ) {
26088			events.focusout = "close";
26089		}
26090		this._on( true, target, events );
26091	},
26092
26093	close: function( event ) {
26094		var tooltip,
26095			that = this,
26096			target = $( event ? event.currentTarget : this.element ),
26097			tooltipData = this._find( target );
26098
26099		// The tooltip may already be closed
26100		if ( !tooltipData ) {
26101
26102			// We set ui-tooltip-open immediately upon open (in open()), but only set the
26103			// additional data once there's actually content to show (in _open()). So even if the
26104			// tooltip doesn't have full data, we always remove ui-tooltip-open in case we're in
26105			// the period between open() and _open().
26106			target.removeData( "ui-tooltip-open" );
26107			return;
26108		}
26109
26110		tooltip = tooltipData.tooltip;
26111
26112		// Disabling closes the tooltip, so we need to track when we're closing
26113		// to avoid an infinite loop in case the tooltip becomes disabled on close
26114		if ( tooltipData.closing ) {
26115			return;
26116		}
26117
26118		// Clear the interval for delayed tracking tooltips
26119		clearInterval( this.delayedShow );
26120
26121		// Only set title if we had one before (see comment in _open())
26122		// If the title attribute has changed since open(), don't restore
26123		if ( target.data( "ui-tooltip-title" ) && !target.attr( "title" ) ) {
26124			target.attr( "title", target.data( "ui-tooltip-title" ) );
26125		}
26126
26127		this._removeDescribedBy( target );
26128
26129		tooltipData.hiding = true;
26130		tooltip.stop( true );
26131		this._hide( tooltip, this.options.hide, function() {
26132			that._removeTooltip( $( this ) );
26133		} );
26134
26135		target.removeData( "ui-tooltip-open" );
26136		this._off( target, "mouseleave focusout keyup" );
26137
26138		// Remove 'remove' binding only on delegated targets
26139		if ( target[ 0 ] !== this.element[ 0 ] ) {
26140			this._off( target, "remove" );
26141		}
26142		this._off( this.document, "mousemove" );
26143
26144		if ( event && event.type === "mouseleave" ) {
26145			$.each( this.parents, function( id, parent ) {
26146				$( parent.element ).attr( "title", parent.title );
26147				delete that.parents[ id ];
26148			} );
26149		}
26150
26151		tooltipData.closing = true;
26152		this._trigger( "close", event, { tooltip: tooltip } );
26153		if ( !tooltipData.hiding ) {
26154			tooltipData.closing = false;
26155		}
26156	},
26157
26158	_tooltip: function( element ) {
26159		var tooltip = $( "<div>" ).attr( "role", "tooltip" ),
26160			content = $( "<div>" ).appendTo( tooltip ),
26161			id = tooltip.uniqueId().attr( "id" );
26162
26163		this._addClass( content, "ui-tooltip-content" );
26164		this._addClass( tooltip, "ui-tooltip", "ui-widget ui-widget-content" );
26165
26166		tooltip.appendTo( this._appendTo( element ) );
26167
26168		return this.tooltips[ id ] = {
26169			element: element,
26170			tooltip: tooltip
26171		};
26172	},
26173
26174	_find: function( target ) {
26175		var id = target.data( "ui-tooltip-id" );
26176		return id ? this.tooltips[ id ] : null;
26177	},
26178
26179	_removeTooltip: function( tooltip ) {
26180
26181		// Clear the interval for delayed tracking tooltips
26182		clearInterval( this.delayedShow );
26183
26184		tooltip.remove();
26185		delete this.tooltips[ tooltip.attr( "id" ) ];
26186	},
26187
26188	_appendTo: function( target ) {
26189		var element = target.closest( ".ui-front, dialog" );
26190
26191		if ( !element.length ) {
26192			element = this.document[ 0 ].body;
26193		}
26194
26195		return element;
26196	},
26197
26198	_destroy: function() {
26199		var that = this;
26200
26201		// Close open tooltips
26202		$.each( this.tooltips, function( id, tooltipData ) {
26203
26204			// Delegate to close method to handle common cleanup
26205			var event = $.Event( "blur" ),
26206				element = tooltipData.element;
26207			event.target = event.currentTarget = element[ 0 ];
26208			that.close( event, true );
26209
26210			// Remove immediately; destroying an open tooltip doesn't use the
26211			// hide animation
26212			$( "#" + id ).remove();
26213
26214			// Restore the title
26215			if ( element.data( "ui-tooltip-title" ) ) {
26216
26217				// If the title attribute has changed since open(), don't restore
26218				if ( !element.attr( "title" ) ) {
26219					element.attr( "title", element.data( "ui-tooltip-title" ) );
26220				}
26221				element.removeData( "ui-tooltip-title" );
26222			}
26223		} );
26224		this.liveRegion.remove();
26225	}
26226} );
26227
26228// DEPRECATED
26229// TODO: Switch return back to widget declaration at top of file when this is removed
26230if ( $.uiBackCompat === true ) {
26231
26232	// Backcompat for tooltipClass option
26233	$.widget( "ui.tooltip", $.ui.tooltip, {
26234		options: {
26235			tooltipClass: null
26236		},
26237		_tooltip: function() {
26238			var tooltipData = this._superApply( arguments );
26239			if ( this.options.tooltipClass ) {
26240				tooltipData.tooltip.addClass( this.options.tooltipClass );
26241			}
26242			return tooltipData;
26243		}
26244	} );
26245}
26246
26247var widgetsTooltip = $.ui.tooltip;
26248
26249
26250
26251
26252} );
26253
26254/* ========================================
26255 FILE: /includes/js/jquery/jquery-ui-1.14.0/jquery-ui-i18n.js
26256 ==================== */
26257
26258/*! jQuery UI - v1.8.24 - 2012-09-28
26259* https://github.com/jquery/jquery-ui
26260* Includes: jquery.ui.datepicker-af.js, jquery.ui.datepicker-ar-DZ.js, jquery.ui.datepicker-ar.js, jquery.ui.datepicker-az.js, jquery.ui.datepicker-bg.js, jquery.ui.datepicker-bs.js, jquery.ui.datepicker-ca.js, jquery.ui.datepicker-cs.js, jquery.ui.datepicker-cy-GB.js, jquery.ui.datepicker-da.js, jquery.ui.datepicker-de.js, jquery.ui.datepicker-el.js, jquery.ui.datepicker-en-AU.js, jquery.ui.datepicker-en-GB.js, jquery.ui.datepicker-en-NZ.js, jquery.ui.datepicker-eo.js, jquery.ui.datepicker-es.js, jquery.ui.datepicker-et.js, jquery.ui.datepicker-eu.js, jquery.ui.datepicker-fa.js, jquery.ui.datepicker-fi.js, jquery.ui.datepicker-fo.js, jquery.ui.datepicker-fr-CH.js, jquery.ui.datepicker-fr.js, jquery.ui.datepicker-gl.js, jquery.ui.datepicker-he.js, jquery.ui.datepicker-hi.js, jquery.ui.datepicker-hr.js, jquery.ui.datepicker-hu.js, jquery.ui.datepicker-hy.js, jquery.ui.datepicker-id.js, jquery.ui.datepicker-is.js, jquery.ui.datepicker-it.js, jquery.ui.datepicker-ja.js, jquery.ui.datepicker-ka.js, jquery.ui.datepicker-kk.js, jquery.ui.datepicker-km.js, jquery.ui.datepicker-ko.js, jquery.ui.datepicker-lb.js, jquery.ui.datepicker-lt.js, jquery.ui.datepicker-lv.js, jquery.ui.datepicker-mk.js, jquery.ui.datepicker-ml.js, jquery.ui.datepicker-ms.js, jquery.ui.datepicker-nl-BE.js, jquery.ui.datepicker-nl.js, jquery.ui.datepicker-no.js, jquery.ui.datepicker-pl.js, jquery.ui.datepicker-pt-BR.js, jquery.ui.datepicker-pt.js, jquery.ui.datepicker-rm.js, jquery.ui.datepicker-ro.js, jquery.ui.datepicker-ru.js, jquery.ui.datepicker-sk.js, jquery.ui.datepicker-sl.js, jquery.ui.datepicker-sq.js, jquery.ui.datepicker-sr-SR.js, jquery.ui.datepicker-sr.js, jquery.ui.datepicker-sv.js, jquery.ui.datepicker-ta.js, jquery.ui.datepicker-th.js, jquery.ui.datepicker-tj.js, jquery.ui.datepicker-tr.js, jquery.ui.datepicker-uk.js, jquery.ui.datepicker-vi.js, jquery.ui.datepicker-zh-CN.js, jquery.ui.datepicker-zh-HK.js, jquery.ui.datepicker-zh-TW.js
26261* Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */
26262
26263/* Afrikaans initialisation for the jQuery UI date picker plugin. */
26264/* Written by Renier Pretorius. */
26265jQuery(function($){
26266	$.datepicker.regional['af'] = {
26267		closeText: 'Selekteer',
26268		prevText: 'Vorige',
26269		nextText: 'Volgende',
26270		currentText: 'Vandag',
26271		monthNames: ['Januarie','Februarie','Maart','April','Mei','Junie',
26272		'Julie','Augustus','September','Oktober','November','Desember'],
26273		monthNamesShort: ['Jan', 'Feb', 'Mrt', 'Apr', 'Mei', 'Jun',
26274		'Jul', 'Aug', 'Sep', 'Okt', 'Nov', 'Des'],
26275		dayNames: ['Sondag', 'Maandag', 'Dinsdag', 'Woensdag', 'Donderdag', 'Vrydag', 'Saterdag'],
26276		dayNamesShort: ['Son', 'Maa', 'Din', 'Woe', 'Don', 'Vry', 'Sat'],
26277		dayNamesMin: ['So','Ma','Di','Wo','Do','Vr','Sa'],
26278		weekHeader: 'Wk',
26279		dateFormat: 'dd/mm/yy',
26280		firstDay: 1,
26281		isRTL: false,
26282		showMonthAfterYear: false,
26283		yearSuffix: ''};
26284	$.datepicker.setDefaults($.datepicker.regional['af']);
26285});
26286
26287/* Algerian Arabic Translation for jQuery UI date picker plugin. (can be used for Tunisia)*/
26288/* Mohamed Cherif BOUCHELAGHEM -- [email protected] */
26289
26290jQuery(function($){
26291	$.datepicker.regional['ar-DZ'] = {
26292		closeText: 'إغلاق',
26293		prevText: '&#x3c;السابق',
26294		nextText: 'التالي&#x3e;',
26295		currentText: 'اليوم',
26296		monthNames: ['جانفي', 'فيفري', 'مارس', 'أفريل', 'ماي', 'جوان',
26297		'جويلية', 'أوت', 'سبتمبر','أكتوبر', 'نوفمبر', 'ديسمبر'],
26298		monthNamesShort: ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12'],
26299		dayNames: ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'],
26300		dayNamesShort: ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'],
26301		dayNamesMin: ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'],
26302		weekHeader: 'أسبوع',
26303		dateFormat: 'dd/mm/yy',
26304		firstDay: 6,
26305  		isRTL: true,
26306		showMonthAfterYear: false,
26307		yearSuffix: ''};
26308	$.datepicker.setDefaults($.datepicker.regional['ar-DZ']);
26309});
26310
26311/* Arabic Translation for jQuery UI date picker plugin. */
26312/* Khaled Alhourani -- [email protected] */
26313/* NOTE: monthNames are the original months names and they are the Arabic names, not the new months name فبراير - يناير and there isn't any Arabic roots for these months */
26314jQuery(function($){
26315	$.datepicker.regional['ar'] = {
26316		closeText: 'إغلاق',
26317		prevText: '&#x3c;السابق',
26318		nextText: 'التالي&#x3e;',
26319		currentText: 'اليوم',
26320		monthNames: ['كانون الثاني', 'شباط', 'آذار', 'نيسان', 'مايو', 'حزيران',
26321		'تموز', 'آب', 'أيلول',	'تشرين الأول', 'تشرين الثاني', 'كانون الأول'],
26322		monthNamesShort: ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12'],
26323		dayNames: ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'],
26324		dayNamesShort: ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'],
26325		dayNamesMin: ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'],
26326		weekHeader: 'أسبوع',
26327		dateFormat: 'dd/mm/yy',
26328		firstDay: 6,
26329  		isRTL: true,
26330		showMonthAfterYear: false,
26331		yearSuffix: ''};
26332	$.datepicker.setDefaults($.datepicker.regional['ar']);
26333});
26334/* Azerbaijani (UTF-8) initialisation for the jQuery UI date picker plugin. */
26335/* Written by Jamil Najafov ([email protected]). */
26336jQuery(function($) {
26337	$.datepicker.regional['az'] = {
26338		closeText: 'Bağla',
26339		prevText: '&#x3c;Geri',
26340		nextText: 'İrəli&#x3e;',
26341		currentText: 'Bugün',
26342		monthNames: ['Yanvar','Fevral','Mart','Aprel','May','İyun',
26343		'İyul','Avqust','Sentyabr','Oktyabr','Noyabr','Dekabr'],
26344		monthNamesShort: ['Yan','Fev','Mar','Apr','May','İyun',
26345		'İyul','Avq','Sen','Okt','Noy','Dek'],
26346		dayNames: ['Bazar','Bazar ertəsi','Çərşənbə axşamı','Çərşənbə','Cümə axşamı','Cümə','Şənbə'],
26347		dayNamesShort: ['B','Be','Ça','Ç','Ca','C','Ş'],
26348		dayNamesMin: ['B','B','Ç','С','Ç','C','Ş'],
26349		weekHeader: 'Hf',
26350		dateFormat: 'dd.mm.yy',
26351		firstDay: 1,
26352		isRTL: false,
26353		showMonthAfterYear: false,
26354		yearSuffix: ''};
26355	$.datepicker.setDefaults($.datepicker.regional['az']);
26356});
26357/* Bulgarian initialisation for the jQuery UI date picker plugin. */
26358/* Written by Stoyan Kyosev (http://svest.org). */
26359jQuery(function($){
26360    $.datepicker.regional['bg'] = {
26361        closeText: 'затвори',
26362        prevText: '&#x3c;назад',
26363        nextText: 'напред&#x3e;',
26364		nextBigText: '&#x3e;&#x3e;',
26365        currentText: 'днес',
26366        monthNames: ['Януари','Февруари','Март','Април','Май','Юни',
26367        'Юли','Август','Септември','Октомври','Ноември','Декември'],
26368        monthNamesShort: ['Яну','Фев','Мар','Апр','Май','Юни',
26369        'Юли','Авг','Сеп','Окт','Нов','Дек'],
26370        dayNames: ['Неделя','Понеделник','Вторник','Сряда','Четвъртък','Петък','Събота'],
26371        dayNamesShort: ['Нед','Пон','Вто','Сря','Чет','Пет','Съб'],
26372        dayNamesMin: ['Не','По','Вт','Ср','Че','Пе','Съ'],
26373		weekHeader: 'Wk',
26374        dateFormat: 'dd.mm.yy',
26375		firstDay: 1,
26376        isRTL: false,
26377		showMonthAfterYear: false,
26378		yearSuffix: ''};
26379    $.datepicker.setDefaults($.datepicker.regional['bg']);
26380});
26381
26382/* Bosnian i18n for the jQuery UI date picker plugin. */
26383/* Written by Kenan Konjo. */
26384jQuery(function($){
26385	$.datepicker.regional['bs'] = {
26386		closeText: 'Zatvori', 
26387		prevText: '&#x3c;', 
26388		nextText: '&#x3e;', 
26389		currentText: 'Danas', 
26390		monthNames: ['Januar','Februar','Mart','April','Maj','Juni',
26391		'Juli','August','Septembar','Oktobar','Novembar','Decembar'],
26392		monthNamesShort: ['Jan','Feb','Mar','Apr','Maj','Jun',
26393		'Jul','Aug','Sep','Okt','Nov','Dec'],
26394		dayNames: ['Nedelja','Ponedeljak','Utorak','Srijeda','Četvrtak','Petak','Subota'],
26395		dayNamesShort: ['Ned','Pon','Uto','Sri','Čet','Pet','Sub'],
26396		dayNamesMin: ['Ne','Po','Ut','Sr','Če','Pe','Su'],
26397		weekHeader: 'Wk',
26398		dateFormat: 'dd.mm.yy',
26399		firstDay: 1,
26400		isRTL: false,
26401		showMonthAfterYear: false,
26402		yearSuffix: ''};
26403	$.datepicker.setDefaults($.datepicker.regional['bs']);
26404});
26405/* Inicialització en català per a l'extenció 'calendar' per jQuery. */
26406/* Writers: ([email protected]). */
26407jQuery(function($){
26408	$.datepicker.regional['ca'] = {
26409		closeText: 'Tancar',
26410		prevText: '&#x3c;Ant',
26411		nextText: 'Seg&#x3e;',
26412		currentText: 'Avui',
26413		monthNames: ['Gener','Febrer','Mar&ccedil;','Abril','Maig','Juny',
26414		'Juliol','Agost','Setembre','Octubre','Novembre','Desembre'],
26415		monthNamesShort: ['Gen','Feb','Mar','Abr','Mai','Jun',
26416		'Jul','Ago','Set','Oct','Nov','Des'],
26417		dayNames: ['Diumenge','Dilluns','Dimarts','Dimecres','Dijous','Divendres','Dissabte'],
26418		dayNamesShort: ['Dug','Dln','Dmt','Dmc','Djs','Dvn','Dsb'],
26419		dayNamesMin: ['Dg','Dl','Dt','Dc','Dj','Dv','Ds'],
26420		weekHeader: 'Sm',
26421		dateFormat: 'dd/mm/yy',
26422		firstDay: 1,
26423		isRTL: false,
26424		showMonthAfterYear: false,
26425		yearSuffix: ''};
26426	$.datepicker.setDefaults($.datepicker.regional['ca']);
26427});
26428/* Czech initialisation for the jQuery UI date picker plugin. */
26429/* Written by Tomas Muller ([email protected]). */
26430jQuery(function($){
26431	$.datepicker.regional['cs'] = {
26432		closeText: 'Zavřít',
26433		prevText: '&#x3c;Dříve',
26434		nextText: 'Později&#x3e;',
26435		currentText: 'Nyní',
26436		monthNames: ['leden','únor','březen','duben','květen','červen',
26437        'červenec','srpen','září','říjen','listopad','prosinec'],
26438		monthNamesShort: ['led','úno','bře','dub','kvě','čer',
26439		'čvc','srp','zář','říj','lis','pro'],
26440		dayNames: ['neděle', 'pondělí', 'úterý', 'středa', 'čtvrtek', 'pátek', 'sobota'],
26441		dayNamesShort: ['ne', 'po', 'út', 'st', 'čt', 'pá', 'so'],
26442		dayNamesMin: ['ne','po','út','st','čt','pá','so'],
26443		weekHeader: 'Týd',
26444		dateFormat: 'dd.mm.yy',
26445		firstDay: 1,
26446		isRTL: false,
26447		showMonthAfterYear: false,
26448		yearSuffix: ''};
26449	$.datepicker.setDefaults($.datepicker.regional['cs']);
26450});
26451
26452/* Welsh/UK initialisation for the jQuery UI date picker plugin. */
26453/* Written by William Griffiths. */
26454jQuery(function($){
26455	$.datepicker.regional['cy-GB'] = {
26456		closeText: 'Done',
26457		prevText: 'Prev',
26458		nextText: 'Next',
26459		currentText: 'Today',
26460		monthNames: ['Ionawr','Chwefror','Mawrth','Ebrill','Mai','Mehefin',
26461		'Gorffennaf','Awst','Medi','Hydref','Tachwedd','Rhagfyr'],
26462		monthNamesShort: ['Ion', 'Chw', 'Maw', 'Ebr', 'Mai', 'Meh',
26463		'Gor', 'Aws', 'Med', 'Hyd', 'Tac', 'Rha'],
26464		dayNames: ['Dydd Sul', 'Dydd Llun', 'Dydd Mawrth', 'Dydd Mercher', 'Dydd Iau', 'Dydd Gwener', 'Dydd Sadwrn'],
26465		dayNamesShort: ['Sul', 'Llu', 'Maw', 'Mer', 'Iau', 'Gwe', 'Sad'],
26466		dayNamesMin: ['Su','Ll','Ma','Me','Ia','Gw','Sa'],
26467		weekHeader: 'Wy',
26468		dateFormat: 'dd/mm/yy',
26469		firstDay: 1,
26470		isRTL: false,
26471		showMonthAfterYear: false,
26472		yearSuffix: ''};
26473	$.datepicker.setDefaults($.datepicker.regional['cy-GB']);
26474});
26475/* Danish initialisation for the jQuery UI date picker plugin. */
26476/* Written by Jan Christensen ( [email protected]). */
26477jQuery(function($){
26478    $.datepicker.regional['da'] = {
26479		closeText: 'Luk',
26480        prevText: '&#x3c;Forrige',
26481		nextText: 'Næste&#x3e;',
26482		currentText: 'Idag',
26483        monthNames: ['Januar','Februar','Marts','April','Maj','Juni',
26484        'Juli','August','September','Oktober','November','December'],
26485        monthNamesShort: ['Jan','Feb','Mar','Apr','Maj','Jun',
26486        'Jul','Aug','Sep','Okt','Nov','Dec'],
26487		dayNames: ['Søndag','Mandag','Tirsdag','Onsdag','Torsdag','Fredag','Lørdag'],
26488		dayNamesShort: ['Søn','Man','Tir','Ons','Tor','Fre','Lør'],
26489		dayNamesMin: ['Sø','Ma','Ti','On','To','Fr','Lø'],
26490		weekHeader: 'Uge',
26491        dateFormat: 'dd-mm-yy',
26492		firstDay: 1,
26493		isRTL: false,
26494		showMonthAfterYear: false,
26495		yearSuffix: ''};
26496    $.datepicker.setDefaults($.datepicker.regional['da']);
26497});
26498
26499/* German initialisation for the jQuery UI date picker plugin. */
26500/* Written by Milian Wolff ([email protected]). */
26501jQuery(function($){
26502	$.datepicker.regional['de'] = {
26503		closeText: 'schließen',
26504		prevText: '&#x3c;zurück',
26505		nextText: 'Vor&#x3e;',
26506		currentText: 'heute',
26507		monthNames: ['Januar','Februar','März','April','Mai','Juni',
26508		'Juli','August','September','Oktober','November','Dezember'],
26509		monthNamesShort: ['Jan','Feb','Mär','Apr','Mai','Jun',
26510		'Jul','Aug','Sep','Okt','Nov','Dez'],
26511		dayNames: ['Sonntag','Montag','Dienstag','Mittwoch','Donnerstag','Freitag','Samstag'],
26512		dayNamesShort: ['So','Mo','Di','Mi','Do','Fr','Sa'],
26513		dayNamesMin: ['So','Mo','Di','Mi','Do','Fr','Sa'],
26514		weekHeader: 'KW',
26515		dateFormat: 'dd.mm.yy',
26516		firstDay: 1,
26517		isRTL: false,
26518		showMonthAfterYear: false,
26519		yearSuffix: ''};
26520	$.datepicker.setDefaults($.datepicker.regional['de']);
26521});
26522
26523/* Greek (el) initialisation for the jQuery UI date picker plugin. */
26524/* Written by Alex Cicovic (http://www.alexcicovic.com) */
26525jQuery(function($){
26526	$.datepicker.regional['el'] = {
26527		closeText: 'Κλείσιμο',
26528		prevText: 'Προηγούμενος',
26529		nextText: 'Επόμενος',
26530		currentText: 'Τρέχων Μήνας',
26531		monthNames: ['Ιανουάριος','Φεβρουάριος','Μάρτιος','Απρίλιος','Μάιος','Ιούνιος',
26532		'Ιούλιος','Αύγουστος','Σεπτέμβριος','Οκτώβριος','Νοέμβριος','Δεκέμβριος'],
26533		monthNamesShort: ['Ιαν','Φεβ','Μαρ','Απρ','Μαι','Ιουν',
26534		'Ιουλ','Αυγ','Σεπ','Οκτ','Νοε','Δεκ'],
26535		dayNames: ['Κυριακή','Δευτέρα','Τρίτη','Τετάρτη','Πέμπτη','Παρασκευή','Σάββατο'],
26536		dayNamesShort: ['Κυρ','Δευ','Τρι','Τετ','Πεμ','Παρ','Σαβ'],
26537		dayNamesMin: ['Κυ','Δε','Τρ','Τε','Πε','Πα','Σα'],
26538		weekHeader: 'Εβδ',
26539		dateFormat: 'dd/mm/yy',
26540		firstDay: 1,
26541		isRTL: false,
26542		showMonthAfterYear: false,
26543		yearSuffix: ''};
26544	$.datepicker.setDefaults($.datepicker.regional['el']);
26545});
26546/* English/Australia initialisation for the jQuery UI date picker plugin. */
26547/* Based on the en-GB initialisation. */
26548jQuery(function($){
26549	$.datepicker.regional['en-AU'] = {
26550		closeText: 'Done',
26551		prevText: 'Prev',
26552		nextText: 'Next',
26553		currentText: 'Today',
26554		monthNames: ['January','February','March','April','May','June',
26555		'July','August','September','October','November','December'],
26556		monthNamesShort: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',
26557		'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
26558		dayNames: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],
26559		dayNamesShort: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],
26560		dayNamesMin: ['Su','Mo','Tu','We','Th','Fr','Sa'],
26561		weekHeader: 'Wk',
26562		dateFormat: 'dd/mm/yy',
26563		firstDay: 1,
26564		isRTL: false,
26565		showMonthAfterYear: false,
26566		yearSuffix: ''};
26567	$.datepicker.setDefaults($.datepicker.regional['en-AU']);
26568});
26569
26570/* English/UK initialisation for the jQuery UI date picker plugin. */
26571/* Written by Stuart. */
26572jQuery(function($){
26573	$.datepicker.regional['en-GB'] = {
26574		closeText: 'Done',
26575		prevText: 'Prev',
26576		nextText: 'Next',
26577		currentText: 'Today',
26578		monthNames: ['January','February','March','April','May','June',
26579		'July','August','September','October','November','December'],
26580		monthNamesShort: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',
26581		'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
26582		dayNames: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],
26583		dayNamesShort: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],
26584		dayNamesMin: ['Su','Mo','Tu','We','Th','Fr','Sa'],
26585		weekHeader: 'Wk',
26586		dateFormat: 'dd/mm/yy',
26587		firstDay: 1,
26588		isRTL: false,
26589		showMonthAfterYear: false,
26590		yearSuffix: ''};
26591	$.datepicker.setDefaults($.datepicker.regional['en-GB']);
26592});
26593
26594/* English/New Zealand initialisation for the jQuery UI date picker plugin. */
26595/* Based on the en-GB initialisation. */
26596jQuery(function($){
26597	$.datepicker.regional['en-NZ'] = {
26598		closeText: 'Done',
26599		prevText: 'Prev',
26600		nextText: 'Next',
26601		currentText: 'Today',
26602		monthNames: ['January','February','March','April','May','June',
26603		'July','August','September','October','November','December'],
26604		monthNamesShort: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',
26605		'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
26606		dayNames: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],
26607		dayNamesShort: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],
26608		dayNamesMin: ['Su','Mo','Tu','We','Th','Fr','Sa'],
26609		weekHeader: 'Wk',
26610		dateFormat: 'dd/mm/yy',
26611		firstDay: 1,
26612		isRTL: false,
26613		showMonthAfterYear: false,
26614		yearSuffix: ''};
26615	$.datepicker.setDefaults($.datepicker.regional['en-NZ']);
26616});
26617
26618/* Esperanto initialisation for the jQuery UI date picker plugin. */
26619/* Written by Olivier M. ([email protected]). */
26620jQuery(function($){
26621	$.datepicker.regional['eo'] = {
26622		closeText: 'Fermi',
26623		prevText: '&lt;Anta',
26624		nextText: 'Sekv&gt;',
26625		currentText: 'Nuna',
26626		monthNames: ['Januaro','Februaro','Marto','Aprilo','Majo','Junio',
26627		'Julio','AÅ­gusto','Septembro','Oktobro','Novembro','Decembro'],
26628		monthNamesShort: ['Jan','Feb','Mar','Apr','Maj','Jun',
26629		'Jul','AÅ­g','Sep','Okt','Nov','Dec'],
26630		dayNames: ['Dimanĉo','Lundo','Mardo','Merkredo','Ĵaŭdo','Vendredo','Sabato'],
26631		dayNamesShort: ['Dim','Lun','Mar','Mer','Ä´aÅ­','Ven','Sab'],
26632		dayNamesMin: ['Di','Lu','Ma','Me','Ä´a','Ve','Sa'],
26633		weekHeader: 'Sb',
26634		dateFormat: 'dd/mm/yy',
26635		firstDay: 0,
26636		isRTL: false,
26637		showMonthAfterYear: false,
26638		yearSuffix: ''};
26639	$.datepicker.setDefaults($.datepicker.regional['eo']);
26640});
26641
26642/* Inicialización en español para la extensión 'UI date picker' para jQuery. */
26643/* Traducido por Vester ([email protected]). */
26644jQuery(function($){
26645	$.datepicker.regional['es'] = {
26646		closeText: 'Cerrar',
26647		prevText: '&#x3c;Ant',
26648		nextText: 'Sig&#x3e;',
26649		currentText: 'Hoy',
26650		monthNames: ['Enero','Febrero','Marzo','Abril','Mayo','Junio',
26651		'Julio','Agosto','Septiembre','Octubre','Noviembre','Diciembre'],
26652		monthNamesShort: ['Ene','Feb','Mar','Abr','May','Jun',
26653		'Jul','Ago','Sep','Oct','Nov','Dic'],
26654		dayNames: ['Domingo','Lunes','Martes','Mi&eacute;rcoles','Jueves','Viernes','S&aacute;bado'],
26655		dayNamesShort: ['Dom','Lun','Mar','Mi&eacute;','Juv','Vie','S&aacute;b'],
26656		dayNamesMin: ['Do','Lu','Ma','Mi','Ju','Vi','S&aacute;'],
26657		weekHeader: 'Sm',
26658		dateFormat: 'dd/mm/yy',
26659		firstDay: 1,
26660		isRTL: false,
26661		showMonthAfterYear: false,
26662		yearSuffix: ''};
26663	$.datepicker.setDefaults($.datepicker.regional['es']);
26664});
26665/* Estonian initialisation for the jQuery UI date picker plugin. */
26666/* Written by Mart Sõmermaa (mrts.pydev at gmail com). */
26667jQuery(function($){
26668	$.datepicker.regional['et'] = {
26669		closeText: 'Sulge',
26670		prevText: 'Eelnev',
26671		nextText: 'Järgnev',
26672		currentText: 'Täna',
26673		monthNames: ['Jaanuar','Veebruar','Märts','Aprill','Mai','Juuni',
26674		'Juuli','August','September','Oktoober','November','Detsember'],
26675		monthNamesShort: ['Jaan', 'Veebr', 'Märts', 'Apr', 'Mai', 'Juuni',
26676		'Juuli', 'Aug', 'Sept', 'Okt', 'Nov', 'Dets'],
26677		dayNames: ['Pühapäev', 'Esmaspäev', 'Teisipäev', 'Kolmapäev', 'Neljapäev', 'Reede', 'Laupäev'],
26678		dayNamesShort: ['Pühap', 'Esmasp', 'Teisip', 'Kolmap', 'Neljap', 'Reede', 'Laup'],
26679		dayNamesMin: ['P','E','T','K','N','R','L'],
26680		weekHeader: 'näd',
26681		dateFormat: 'dd.mm.yy',
26682		firstDay: 1,
26683		isRTL: false,
26684		showMonthAfterYear: false,
26685		yearSuffix: ''};
26686	$.datepicker.setDefaults($.datepicker.regional['et']);
26687}); 
26688/* Euskarako oinarria 'UI date picker' jquery-ko extentsioarentzat */
26689/* Karrikas-ek itzulia ([email protected]) */
26690jQuery(function($){
26691	$.datepicker.regional['eu'] = {
26692		closeText: 'Egina',
26693		prevText: '&#x3c;Aur',
26694		nextText: 'Hur&#x3e;',
26695		currentText: 'Gaur',
26696		monthNames: ['urtarrila','otsaila','martxoa','apirila','maiatza','ekaina',
26697			'uztaila','abuztua','iraila','urria','azaroa','abendua'],
26698		monthNamesShort: ['urt.','ots.','mar.','api.','mai.','eka.',
26699			'uzt.','abu.','ira.','urr.','aza.','abe.'],
26700		dayNames: ['igandea','astelehena','asteartea','asteazkena','osteguna','ostirala','larunbata'],
26701		dayNamesShort: ['ig.','al.','ar.','az.','og.','ol.','lr.'],
26702		dayNamesMin: ['ig','al','ar','az','og','ol','lr'],
26703		weekHeader: 'As',
26704		dateFormat: 'yy-mm-dd',
26705		firstDay: 1,
26706		isRTL: false,
26707		showMonthAfterYear: false,
26708		yearSuffix: ''};
26709	$.datepicker.setDefaults($.datepicker.regional['eu']);
26710});
26711/* Persian (Farsi) Translation for the jQuery UI date picker plugin. */
26712/* Javad Mowlanezhad -- [email protected] */
26713/* Jalali calendar should supported soon! (Its implemented but I have to test it) */
26714jQuery(function($) {
26715	$.datepicker.regional['fa'] = {
26716		closeText: 'بستن',
26717		prevText: '&#x3C;قبلی',
26718		nextText: 'بعدی&#x3E;',
26719		currentText: 'امروز',
26720		monthNames: [
26721			'فروردين',
26722			'ارديبهشت',
26723			'خرداد',
26724			'تير',
26725			'مرداد',
26726			'شهريور',
26727			'مهر',
26728			'آبان',
26729			'آذر',
26730			'دی',
26731			'بهمن',
26732			'اسفند'
26733		],
26734		monthNamesShort: ['1','2','3','4','5','6','7','8','9','10','11','12'],
26735		dayNames: [
26736			'يکشنبه',
26737			'دوشنبه',
26738			'سه‌شنبه',
26739			'چهارشنبه',
26740			'پنجشنبه',
26741			'جمعه',
26742			'شنبه'
26743		],
26744		dayNamesShort: [
26745			'ی',
26746			'د',
26747			'س',
26748			'چ',
26749			'Ù¾',
26750			'ج', 
26751			'Ø´'
26752		],
26753		dayNamesMin: [
26754			'ی',
26755			'د',
26756			'س',
26757			'چ',
26758			'Ù¾',
26759			'ج', 
26760			'Ø´'
26761		],
26762		weekHeader: 'هف',
26763		dateFormat: 'yy/mm/dd',
26764		firstDay: 6,
26765		isRTL: true,
26766		showMonthAfterYear: false,
26767		yearSuffix: ''};
26768	$.datepicker.setDefaults($.datepicker.regional['fa']);
26769});
26770/* Finnish initialisation for the jQuery UI date picker plugin. */
26771/* Written by Harri Kilpiö ([email protected]). */
26772jQuery(function($){
26773	$.datepicker.regional['fi'] = {
26774		closeText: 'Sulje',
26775		prevText: '&#xAB;Edellinen',
26776		nextText: 'Seuraava&#xBB;',
26777		currentText: 'T&#xE4;n&#xE4;&#xE4;n',
26778		monthNames: ['Tammikuu','Helmikuu','Maaliskuu','Huhtikuu','Toukokuu','Kes&#xE4;kuu',
26779		'Hein&#xE4;kuu','Elokuu','Syyskuu','Lokakuu','Marraskuu','Joulukuu'],
26780		monthNamesShort: ['Tammi','Helmi','Maalis','Huhti','Touko','Kes&#xE4;',
26781		'Hein&#xE4;','Elo','Syys','Loka','Marras','Joulu'],
26782		dayNamesShort: ['Su','Ma','Ti','Ke','To','Pe','La'],
26783		dayNames: ['Sunnuntai','Maanantai','Tiistai','Keskiviikko','Torstai','Perjantai','Lauantai'],
26784		dayNamesMin: ['Su','Ma','Ti','Ke','To','Pe','La'],
26785		weekHeader: 'Vk',
26786		dateFormat: 'dd.mm.yy',
26787		firstDay: 1,
26788		isRTL: false,
26789		showMonthAfterYear: false,
26790		yearSuffix: ''};
26791	$.datepicker.setDefaults($.datepicker.regional['fi']);
26792});
26793
26794/* Faroese initialisation for the jQuery UI date picker plugin */
26795/* Written by Sverri Mohr Olsen, [email protected] */
26796jQuery(function($){
26797	$.datepicker.regional['fo'] = {
26798		closeText: 'Lat aftur',
26799		prevText: '&#x3c;Fyrra',
26800		nextText: 'Næsta&#x3e;',
26801		currentText: 'Í dag',
26802		monthNames: ['Januar','Februar','Mars','Apríl','Mei','Juni',
26803		'Juli','August','September','Oktober','November','Desember'],
26804		monthNamesShort: ['Jan','Feb','Mar','Apr','Mei','Jun',
26805		'Jul','Aug','Sep','Okt','Nov','Des'],
26806		dayNames: ['Sunnudagur','Mánadagur','Týsdagur','Mikudagur','Hósdagur','Fríggjadagur','Leyardagur'],
26807		dayNamesShort: ['Sun','Mán','Týs','Mik','Hós','Frí','Ley'],
26808		dayNamesMin: ['Su','Má','Tý','Mi','Hó','Fr','Le'],
26809		weekHeader: 'Vk',
26810		dateFormat: 'dd-mm-yy',
26811		firstDay: 0,
26812		isRTL: false,
26813		showMonthAfterYear: false,
26814		yearSuffix: ''};
26815	$.datepicker.setDefaults($.datepicker.regional['fo']);
26816});
26817
26818/* Swiss-French initialisation for the jQuery UI date picker plugin. */
26819/* Written Martin Voelkle ([email protected]). */
26820jQuery(function($){
26821	$.datepicker.regional['fr-CH'] = {
26822		closeText: 'Fermer',
26823		prevText: '&#x3c;Préc',
26824		nextText: 'Suiv&#x3e;',
26825		currentText: 'Courant',
26826		monthNames: ['Janvier','Février','Mars','Avril','Mai','Juin',
26827		'Juillet','Août','Septembre','Octobre','Novembre','Décembre'],
26828		monthNamesShort: ['Jan','Fév','Mar','Avr','Mai','Jun',
26829		'Jul','Aoû','Sep','Oct','Nov','Déc'],
26830		dayNames: ['Dimanche','Lundi','Mardi','Mercredi','Jeudi','Vendredi','Samedi'],
26831		dayNamesShort: ['Dim','Lun','Mar','Mer','Jeu','Ven','Sam'],
26832		dayNamesMin: ['Di','Lu','Ma','Me','Je','Ve','Sa'],
26833		weekHeader: 'Sm',
26834		dateFormat: 'dd.mm.yy',
26835		firstDay: 1,
26836		isRTL: false,
26837		showMonthAfterYear: false,
26838		yearSuffix: ''};
26839	$.datepicker.setDefaults($.datepicker.regional['fr-CH']);
26840});
26841/* French initialisation for the jQuery UI date picker plugin. */
26842/* Written by Keith Wood (kbwood{at}iinet.com.au),
26843              Stéphane Nahmani ([email protected]),
26844              Stéphane Raimbault <[email protected]> */
26845jQuery(function($){
26846	$.datepicker.regional['fr'] = {
26847		closeText: 'Fermer',
26848		prevText: 'Précédent',
26849		nextText: 'Suivant',
26850		currentText: 'Aujourd\'hui',
26851		monthNames: ['Janvier','Février','Mars','Avril','Mai','Juin',
26852		'Juillet','Août','Septembre','Octobre','Novembre','Décembre'],
26853		monthNamesShort: ['Janv.','Févr.','Mars','Avril','Mai','Juin',
26854		'Juil.','Août','Sept.','Oct.','Nov.','Déc.'],
26855		dayNames: ['Dimanche','Lundi','Mardi','Mercredi','Jeudi','Vendredi','Samedi'],
26856		dayNamesShort: ['Dim.','Lun.','Mar.','Mer.','Jeu.','Ven.','Sam.'],
26857		dayNamesMin: ['D','L','M','M','J','V','S'],
26858		weekHeader: 'Sem.',
26859		dateFormat: 'dd/mm/yy',
26860		firstDay: 1,
26861		isRTL: false,
26862		showMonthAfterYear: false,
26863		yearSuffix: ''};
26864	$.datepicker.setDefaults($.datepicker.regional['fr']);
26865});
26866
26867/* Galician localization for 'UI date picker' jQuery extension. */
26868/* Translated by Jorge Barreiro <[email protected]>. */
26869jQuery(function($){
26870	$.datepicker.regional['gl'] = {
26871		closeText: 'Pechar',
26872		prevText: '&#x3c;Ant',
26873		nextText: 'Seg&#x3e;',
26874		currentText: 'Hoxe',
26875		monthNames: ['Xaneiro','Febreiro','Marzo','Abril','Maio','Xuño',
26876		'Xullo','Agosto','Setembro','Outubro','Novembro','Decembro'],
26877		monthNamesShort: ['Xan','Feb','Mar','Abr','Mai','Xuñ',
26878		'Xul','Ago','Set','Out','Nov','Dec'],
26879		dayNames: ['Domingo','Luns','Martes','M&eacute;rcores','Xoves','Venres','S&aacute;bado'],
26880		dayNamesShort: ['Dom','Lun','Mar','M&eacute;r','Xov','Ven','S&aacute;b'],
26881		dayNamesMin: ['Do','Lu','Ma','M&eacute;','Xo','Ve','S&aacute;'],
26882		weekHeader: 'Sm',
26883		dateFormat: 'dd/mm/yy',
26884		firstDay: 1,
26885		isRTL: false,
26886		showMonthAfterYear: false,
26887		yearSuffix: ''};
26888	$.datepicker.setDefaults($.datepicker.regional['gl']);
26889});
26890/* Hebrew initialisation for the UI Datepicker extension. */
26891/* Written by Amir Hardon (ahardon at gmail dot com). */
26892jQuery(function($){
26893	$.datepicker.regional['he'] = {
26894		closeText: 'סגור',
26895		prevText: '&#x3c;הקודם',
26896		nextText: 'הבא&#x3e;',
26897		currentText: 'היום',
26898		monthNames: ['ינואר','פברואר','מרץ','אפריל','מאי','יוני',
26899		'יולי','אוגוסט','ספטמבר','אוקטובר','נובמבר','דצמבר'],
26900		monthNamesShort: ['ינו','פבר','מרץ','אפר','מאי','יוני',
26901		'יולי','אוג','ספט','אוק','נוב','דצמ'],
26902		dayNames: ['ראשון','שני','שלישי','רביעי','חמישי','שישי','שבת'],
26903		dayNamesShort: ['א\'','ב\'','ג\'','ד\'','ה\'','ו\'','שבת'],
26904		dayNamesMin: ['א\'','ב\'','ג\'','ד\'','ה\'','ו\'','שבת'],
26905		weekHeader: 'Wk',
26906		dateFormat: 'dd/mm/yy',
26907		firstDay: 0,
26908		isRTL: true,
26909		showMonthAfterYear: false,
26910		yearSuffix: ''};
26911	$.datepicker.setDefaults($.datepicker.regional['he']);
26912});
26913
26914/* Hindi initialisation for the jQuery UI date picker plugin. */
26915/* Written by Michael Dawart. */
26916jQuery(function($){
26917	$.datepicker.regional['hi'] = {
26918		closeText: 'बंद',
26919		prevText: 'पिछला',
26920		nextText: 'अगला',
26921		currentText: 'आज',
26922		monthNames: ['जनवरी ','फरवरी','मार्च','अप्रेल','मई','जून',
26923		'जूलाई','अगस्त ','सितम्बर','अक्टूबर','नवम्बर','दिसम्बर'],
26924		monthNamesShort: ['जन', 'फर', 'मार्च', 'अप्रेल', 'मई', 'जून',
26925		'जूलाई', 'अग', 'सित', 'अक्ट', 'नव', 'दि'],
26926		dayNames: ['रविवार', 'सोमवार', 'मंगलवार', 'बुधवार', 'गुरुवार', 'शुक्रवार', 'शनिवार'],
26927		dayNamesShort: ['रवि', 'सोम', 'मंगल', 'बुध', 'गुरु', 'शुक्र', 'शनि'],
26928		dayNamesMin: ['रवि', 'सोम', 'मंगल', 'बुध', 'गुरु', 'शुक्र', 'शनि'],
26929		weekHeader: 'हफ्ता',
26930		dateFormat: 'dd/mm/yy',
26931		firstDay: 1,
26932		isRTL: false,
26933		showMonthAfterYear: false,
26934		yearSuffix: ''};
26935	$.datepicker.setDefaults($.datepicker.regional['hi']);
26936});
26937
26938/* Croatian i18n for the jQuery UI date picker plugin. */
26939/* Written by Vjekoslav Nesek. */
26940jQuery(function($){
26941	$.datepicker.regional['hr'] = {
26942		closeText: 'Zatvori',
26943		prevText: '&#x3c;',
26944		nextText: '&#x3e;',
26945		currentText: 'Danas',
26946		monthNames: ['Siječanj','Veljača','Ožujak','Travanj','Svibanj','Lipanj',
26947		'Srpanj','Kolovoz','Rujan','Listopad','Studeni','Prosinac'],
26948		monthNamesShort: ['Sij','Velj','Ožu','Tra','Svi','Lip',
26949		'Srp','Kol','Ruj','Lis','Stu','Pro'],
26950		dayNames: ['Nedjelja','Ponedjeljak','Utorak','Srijeda','Četvrtak','Petak','Subota'],
26951		dayNamesShort: ['Ned','Pon','Uto','Sri','Čet','Pet','Sub'],
26952		dayNamesMin: ['Ne','Po','Ut','Sr','Če','Pe','Su'],
26953		weekHeader: 'Tje',
26954		dateFormat: 'dd.mm.yy.',
26955		firstDay: 1,
26956		isRTL: false,
26957		showMonthAfterYear: false,
26958		yearSuffix: ''};
26959	$.datepicker.setDefaults($.datepicker.regional['hr']);
26960});
26961/* Hungarian initialisation for the jQuery UI date picker plugin. */
26962/* Written by Istvan Karaszi ([email protected]). */
26963jQuery(function($){
26964	$.datepicker.regional['hu'] = {
26965		closeText: 'bezár',
26966		prevText: 'vissza',
26967		nextText: 'előre',
26968		currentText: 'ma',
26969		monthNames: ['Január', 'Február', 'Március', 'Április', 'Május', 'Június',
26970		'Július', 'Augusztus', 'Szeptember', 'Október', 'November', 'December'],
26971		monthNamesShort: ['Jan', 'Feb', 'Már', 'Ápr', 'Máj', 'Jún',
26972		'Júl', 'Aug', 'Szep', 'Okt', 'Nov', 'Dec'],
26973		dayNames: ['Vasárnap', 'Hétfő', 'Kedd', 'Szerda', 'Csütörtök', 'Péntek', 'Szombat'],
26974		dayNamesShort: ['Vas', 'Hét', 'Ked', 'Sze', 'Csü', 'Pén', 'Szo'],
26975		dayNamesMin: ['V', 'H', 'K', 'Sze', 'Cs', 'P', 'Szo'],
26976		weekHeader: 'Hét',
26977		dateFormat: 'yy.mm.dd.',
26978		firstDay: 1,
26979		isRTL: false,
26980		showMonthAfterYear: true,
26981		yearSuffix: ''};
26982	$.datepicker.setDefaults($.datepicker.regional['hu']);
26983});
26984
26985/* Armenian(UTF-8) initialisation for the jQuery UI date picker plugin. */
26986/* Written by Levon Zakaryan ([email protected])*/
26987jQuery(function($){
26988	$.datepicker.regional['hy'] = {
26989		closeText: 'Փակել',
26990		prevText: '&#x3c;Նախ.',
26991		nextText: 'Հաջ.&#x3e;',
26992		currentText: 'Այսօր',
26993		monthNames: ['Հունվար','Փետրվար','Մարտ','Ապրիլ','Մայիս','Հունիս',
26994		'Հուլիս','Օգոստոս','Սեպտեմբեր','Հոկտեմբեր','Նոյեմբեր','Դեկտեմբեր'],
26995		monthNamesShort: ['Հունվ','Փետր','Մարտ','Ապր','Մայիս','Հունիս',
26996		'Հուլ','Օգս','Սեպ','Հոկ','Նոյ','Դեկ'],
26997		dayNames: ['կիրակի','եկուշաբթի','երեքշաբթի','չորեքշաբթի','հինգշաբթի','ուրբաթ','շաբաթ'],
26998		dayNamesShort: ['կիր','երկ','երք','չրք','հնգ','ուրբ','շբթ'],
26999		dayNamesMin: ['կիր','երկ','երք','չրք','հնգ','ուրբ','շբթ'],
27000		weekHeader: 'ՇԲՏ',
27001		dateFormat: 'dd.mm.yy',
27002		firstDay: 1,
27003		isRTL: false,
27004		showMonthAfterYear: false,
27005		yearSuffix: ''};
27006	$.datepicker.setDefaults($.datepicker.regional['hy']);
27007});
27008/* Indonesian initialisation for the jQuery UI date picker plugin. */
27009/* Written by Deden Fathurahman ([email protected]). */
27010jQuery(function($){
27011	$.datepicker.regional['id'] = {
27012		closeText: 'Tutup',
27013		prevText: '&#x3c;mundur',
27014		nextText: 'maju&#x3e;',
27015		currentText: 'hari ini',
27016		monthNames: ['Januari','Februari','Maret','April','Mei','Juni',
27017		'Juli','Agustus','September','Oktober','Nopember','Desember'],
27018		monthNamesShort: ['Jan','Feb','Mar','Apr','Mei','Jun',
27019		'Jul','Agus','Sep','Okt','Nop','Des'],
27020		dayNames: ['Minggu','Senin','Selasa','Rabu','Kamis','Jumat','Sabtu'],
27021		dayNamesShort: ['Min','Sen','Sel','Rab','kam','Jum','Sab'],
27022		dayNamesMin: ['Mg','Sn','Sl','Rb','Km','jm','Sb'],
27023		weekHeader: 'Mg',
27024		dateFormat: 'dd/mm/yy',
27025		firstDay: 0,
27026		isRTL: false,
27027		showMonthAfterYear: false,
27028		yearSuffix: ''};
27029	$.datepicker.setDefaults($.datepicker.regional['id']);
27030});
27031/* Icelandic initialisation for the jQuery UI date picker plugin. */
27032/* Written by Haukur H. Thorsson ([email protected]). */
27033jQuery(function($){
27034	$.datepicker.regional['is'] = {
27035		closeText: 'Loka',
27036		prevText: '&#x3c; Fyrri',
27037		nextText: 'N&aelig;sti &#x3e;',
27038		currentText: '&Iacute; dag',
27039		monthNames: ['Jan&uacute;ar','Febr&uacute;ar','Mars','Apr&iacute;l','Ma&iacute','J&uacute;n&iacute;',
27040		'J&uacute;l&iacute;','&Aacute;g&uacute;st','September','Okt&oacute;ber','N&oacute;vember','Desember'],
27041		monthNamesShort: ['Jan','Feb','Mar','Apr','Ma&iacute;','J&uacute;n',
27042		'J&uacute;l','&Aacute;g&uacute;','Sep','Okt','N&oacute;v','Des'],
27043		dayNames: ['Sunnudagur','M&aacute;nudagur','&THORN;ri&eth;judagur','Mi&eth;vikudagur','Fimmtudagur','F&ouml;studagur','Laugardagur'],
27044		dayNamesShort: ['Sun','M&aacute;n','&THORN;ri','Mi&eth;','Fim','F&ouml;s','Lau'],
27045		dayNamesMin: ['Su','M&aacute;','&THORN;r','Mi','Fi','F&ouml;','La'],
27046		weekHeader: 'Vika',
27047		dateFormat: 'dd/mm/yy',
27048		firstDay: 0,
27049		isRTL: false,
27050		showMonthAfterYear: false,
27051		yearSuffix: ''};
27052	$.datepicker.setDefaults($.datepicker.regional['is']);
27053});
27054/* Italian initialisation for the jQuery UI date picker plugin. */
27055/* Written by Antonello Pasella ([email protected]). */
27056jQuery(function($){
27057	$.datepicker.regional['it'] = {
27058		closeText: 'Chiudi',
27059		prevText: '&#x3c;Prec',
27060		nextText: 'Succ&#x3e;',
27061		currentText: 'Oggi',
27062		monthNames: ['Gennaio','Febbraio','Marzo','Aprile','Maggio','Giugno',
27063			'Luglio','Agosto','Settembre','Ottobre','Novembre','Dicembre'],
27064		monthNamesShort: ['Gen','Feb','Mar','Apr','Mag','Giu',
27065			'Lug','Ago','Set','Ott','Nov','Dic'],
27066		dayNames: ['Domenica','Luned&#236','Marted&#236','Mercoled&#236','Gioved&#236','Venerd&#236','Sabato'],
27067		dayNamesShort: ['Dom','Lun','Mar','Mer','Gio','Ven','Sab'],
27068		dayNamesMin: ['Do','Lu','Ma','Me','Gi','Ve','Sa'],
27069		weekHeader: 'Sm',
27070		dateFormat: 'dd/mm/yy',
27071		firstDay: 1,
27072		isRTL: false,
27073		showMonthAfterYear: false,
27074		yearSuffix: ''};
27075	$.datepicker.setDefaults($.datepicker.regional['it']);
27076});
27077
27078/* Japanese initialisation for the jQuery UI date picker plugin. */
27079/* Written by Kentaro SATO ([email protected]). */
27080jQuery(function($){
27081	$.datepicker.regional['ja'] = {
27082		closeText: '閉じる',
27083		prevText: '&#x3c;前',
27084		nextText: '次&#x3e;',
27085		currentText: '今日',
27086		monthNames: ['1月','2月','3月','4月','5月','6月',
27087		'7月','8月','9月','10月','11月','12月'],
27088		monthNamesShort: ['1月','2月','3月','4月','5月','6月',
27089		'7月','8月','9月','10月','11月','12月'],
27090		dayNames: ['日曜日','月曜日','火曜日','水曜日','木曜日','金曜日','土曜日'],
27091		dayNamesShort: ['日','月','火','水','木','金','土'],
27092		dayNamesMin: ['日','月','火','水','木','金','土'],
27093		weekHeader: '週',
27094		dateFormat: 'yy/mm/dd',
27095		firstDay: 0,
27096		isRTL: false,
27097		showMonthAfterYear: true,
27098		yearSuffix: 'å¹´'};
27099	$.datepicker.setDefaults($.datepicker.regional['ja']);
27100});
27101/* Georgian (UTF-8) initialisation for the jQuery UI date picker plugin. */
27102/* Written by Lado Lomidze ([email protected]). */
27103jQuery(function($){
27104	$.datepicker.regional['ka'] = {
27105		closeText: 'დახურვა',
27106		prevText: '&#x3c; წინა',
27107		nextText: 'შემდეგი &#x3e;',
27108		currentText: 'დღეს',
27109		monthNames: ['იანვარი','თებერვალი','მარტი','აპრილი','მაისი','ივნისი', 'ივლისი','აგვისტო','სექტემბერი','ოქტომბერი','ნოემბერი','დეკემბერი'],
27110		monthNamesShort: ['იან','თებ','მარ','აპრ','მაი','ივნ', 'ივლ','აგვ','სექ','ოქტ','ნოე','დეკ'],
27111		dayNames: ['კვირა','ორშაბათი','სამშაბათი','ოთხშაბათი','ხუთშაბათი','პარასკევი','შაბათი'],
27112		dayNamesShort: ['კვ','ორშ','სამ','ოთხ','ხუთ','პარ','შაბ'],
27113		dayNamesMin: ['კვ','ორშ','სამ','ოთხ','ხუთ','პარ','შაბ'],
27114		weekHeader: 'კვირა',
27115		dateFormat: 'dd-mm-yy',
27116		firstDay: 1,
27117		isRTL: false,
27118		showMonthAfterYear: false,
27119		yearSuffix: ''};
27120	$.datepicker.setDefaults($.datepicker.regional['ka']);
27121});
27122
27123/* Kazakh (UTF-8) initialisation for the jQuery UI date picker plugin. */
27124/* Written by Dmitriy Karasyov ([email protected]). */
27125jQuery(function($){
27126	$.datepicker.regional['kk'] = {
27127		closeText: 'Жабу',
27128		prevText: '&#x3c;Алдыңғы',
27129		nextText: 'Келесі&#x3e;',
27130		currentText: 'Бүгін',
27131		monthNames: ['Қаңтар','Ақпан','Наурыз','Сәуір','Мамыр','Маусым',
27132		'Шілде','Тамыз','Қыркүйек','Қазан','Қараша','Желтоқсан'],
27133		monthNamesShort: ['Қаң','Ақп','Нау','Сәу','Мам','Мау',
27134		'Шіл','Там','Қыр','Қаз','Қар','Жел'],
27135		dayNames: ['Жексенбі','Дүйсенбі','Сейсенбі','Сәрсенбі','Бейсенбі','Жұма','Сенбі'],
27136		dayNamesShort: ['жкс','дсн','ссн','срс','бсн','жма','снб'],
27137		dayNamesMin: ['Жк','Дс','Сс','Ср','Бс','Жм','Сн'],
27138		weekHeader: 'Не',
27139		dateFormat: 'dd.mm.yy',
27140		firstDay: 1,
27141		isRTL: false,
27142		showMonthAfterYear: false,
27143		yearSuffix: ''};
27144	$.datepicker.setDefaults($.datepicker.regional['kk']);
27145});
27146
27147/* Khmer initialisation for the jQuery calendar extension. */
27148/* Written by Chandara Om ([email protected]). */
27149jQuery(function($){
27150	$.datepicker.regional['km'] = {
27151		closeText: 'ធ្វើ​រួច',
27152		prevText: 'មុន',
27153		nextText: 'បន្ទាប់',
27154		currentText: 'ថ្ងៃ​នេះ',
27155		monthNames: ['មករា','កុម្ភៈ','មីនា','មេសា','ឧសភា','មិថុនា',
27156		'កក្កដា','សីហា','កញ្ញា','តុលា','វិច្ឆិកា','ធ្នូ'],
27157		monthNamesShort: ['មករា','កុម្ភៈ','មីនា','មេសា','ឧសភា','មិថុនា',
27158		'កក្កដា','សីហា','កញ្ញា','តុលា','វិច្ឆិកា','ធ្នូ'],
27159		dayNames: ['អាទិត្យ', 'ចន្ទ', 'អង្គារ', 'ពុធ', 'ព្រហស្បតិ៍', 'សុក្រ', 'សៅរ៍'],
27160		dayNamesShort: ['អា', 'ច', 'អ', 'ពុ', 'ព្រហ', 'សុ', 'សៅ'],
27161		dayNamesMin: ['អា', 'ច', 'អ', 'ពុ', 'ព្រហ', 'សុ', 'សៅ'],
27162		weekHeader: 'សប្ដាហ៍',
27163		dateFormat: 'dd-mm-yy',
27164		firstDay: 1,
27165		isRTL: false,
27166		showMonthAfterYear: false,
27167		yearSuffix: ''};
27168	$.datepicker.setDefaults($.datepicker.regional['km']);
27169});
27170
27171/* Korean initialisation for the jQuery calendar extension. */
27172/* Written by DaeKwon Kang ([email protected]), Edited by Genie. */
27173jQuery(function($){
27174	$.datepicker.regional['ko'] = {
27175		closeText: '닫기',
27176		prevText: '이전달',
27177		nextText: '다음달',
27178		currentText: '오늘',
27179		monthNames: ['1월','2월','3월','4월','5월','6월',
27180		'7월','8월','9월','10월','11월','12월'],
27181		monthNamesShort: ['1월','2월','3월','4월','5월','6월',
27182		'7월','8월','9월','10월','11월','12월'],
27183		dayNames: ['일요일','월요일','화요일','수요일','목요일','금요일','토요일'],
27184		dayNamesShort: ['일','월','화','수','목','금','토'],
27185		dayNamesMin: ['일','월','화','수','목','금','토'],
27186		weekHeader: 'Wk',
27187		dateFormat: 'yy-mm-dd',
27188		firstDay: 0,
27189		isRTL: false,
27190		showMonthAfterYear: true,
27191		yearSuffix: '년'};
27192	$.datepicker.setDefaults($.datepicker.regional['ko']);
27193});
27194/* Luxembourgish initialisation for the jQuery UI date picker plugin. */
27195/* Written by Michel Weimerskirch <[email protected]> */
27196jQuery(function($){
27197	$.datepicker.regional['lb'] = {
27198		closeText: 'Fäerdeg',
27199		prevText: 'Zréck',
27200		nextText: 'Weider',
27201		currentText: 'Haut',
27202		monthNames: ['Januar','Februar','Mäerz','Abrëll','Mee','Juni',
27203		'Juli','August','September','Oktober','November','Dezember'],
27204		monthNamesShort: ['Jan', 'Feb', 'Mäe', 'Abr', 'Mee', 'Jun',
27205		'Jul', 'Aug', 'Sep', 'Okt', 'Nov', 'Dez'],
27206		dayNames: ['Sonndeg', 'Méindeg', 'Dënschdeg', 'Mëttwoch', 'Donneschdeg', 'Freideg', 'Samschdeg'],
27207		dayNamesShort: ['Son', 'Méi', 'Dën', 'Mët', 'Don', 'Fre', 'Sam'],
27208		dayNamesMin: ['So','Mé','Dë','Më','Do','Fr','Sa'],
27209		weekHeader: 'W',
27210		dateFormat: 'dd.mm.yy',
27211		firstDay: 1,
27212		isRTL: false,
27213		showMonthAfterYear: false,
27214		yearSuffix: ''};
27215	$.datepicker.setDefaults($.datepicker.regional['lb']);
27216});
27217
27218/* Lithuanian (UTF-8) initialisation for the jQuery UI date picker plugin. */
27219/* @author Arturas Paleicikas <[email protected]> */
27220jQuery(function($){
27221	$.datepicker.regional['lt'] = {
27222		closeText: 'Uždaryti',
27223		prevText: '&#x3c;Atgal',
27224		nextText: 'Pirmyn&#x3e;',
27225		currentText: 'Å iandien',
27226		monthNames: ['Sausis','Vasaris','Kovas','Balandis','Gegužė','Birželis',
27227		'Liepa','Rugpjūtis','Rugsėjis','Spalis','Lapkritis','Gruodis'],
27228		monthNamesShort: ['Sau','Vas','Kov','Bal','Geg','Bir',
27229		'Lie','Rugp','Rugs','Spa','Lap','Gru'],
27230		dayNames: ['sekmadienis','pirmadienis','antradienis','trečiadienis','ketvirtadienis','penktadienis','šeštadienis'],
27231		dayNamesShort: ['sek','pir','ant','tre','ket','pen','šeš'],
27232		dayNamesMin: ['Se','Pr','An','Tr','Ke','Pe','Å e'],
27233		weekHeader: 'Wk',
27234		dateFormat: 'yy-mm-dd',
27235		firstDay: 1,
27236		isRTL: false,
27237		showMonthAfterYear: false,
27238		yearSuffix: ''};
27239	$.datepicker.setDefaults($.datepicker.regional['lt']);
27240});
27241/* Latvian (UTF-8) initialisation for the jQuery UI date picker plugin. */
27242/* @author Arturas Paleicikas <[email protected]> */
27243jQuery(function($){
27244	$.datepicker.regional['lv'] = {
27245		closeText: 'Aizvērt',
27246		prevText: 'Iepr',
27247		nextText: 'Nāka',
27248		currentText: 'Å odien',
27249		monthNames: ['Janvāris','Februāris','Marts','Aprīlis','Maijs','Jūnijs',
27250		'Jūlijs','Augusts','Septembris','Oktobris','Novembris','Decembris'],
27251		monthNamesShort: ['Jan','Feb','Mar','Apr','Mai','Jūn',
27252		'Jūl','Aug','Sep','Okt','Nov','Dec'],
27253		dayNames: ['svētdiena','pirmdiena','otrdiena','trešdiena','ceturtdiena','piektdiena','sestdiena'],
27254		dayNamesShort: ['svt','prm','otr','tre','ctr','pkt','sst'],
27255		dayNamesMin: ['Sv','Pr','Ot','Tr','Ct','Pk','Ss'],
27256		weekHeader: 'Nav',
27257		dateFormat: 'dd-mm-yy',
27258		firstDay: 1,
27259		isRTL: false,
27260		showMonthAfterYear: false,
27261		yearSuffix: ''};
27262	$.datepicker.setDefaults($.datepicker.regional['lv']);
27263});
27264/* Macedonian i18n for the jQuery UI date picker plugin. */
27265/* Written by Stojce Slavkovski. */
27266jQuery(function($){
27267	$.datepicker.regional['mk'] = {
27268		closeText: 'Затвори',
27269		prevText: '&#x3C;',
27270		nextText: '&#x3E;',
27271		currentText: 'Денес',
27272		monthNames: ['Јануари','Февруари','Март','Април','Мај','Јуни',
27273		'Јули','Август','Септември','Октомври','Ноември','Декември'],
27274		monthNamesShort: ['Јан','Фев','Мар','Апр','Мај','Јун',
27275		'Јул','Авг','Сеп','Окт','Ное','Дек'],
27276		dayNames: ['Недела','Понеделник','Вторник','Среда','Четврток','Петок','Сабота'],
27277		dayNamesShort: ['Нед','Пон','Вто','Сре','Чет','Пет','Саб'],
27278		dayNamesMin: ['Не','По','Вт','Ср','Че','Пе','Са'],
27279		weekHeader: 'Сед',
27280		dateFormat: 'dd.mm.yy',
27281		firstDay: 1,
27282		isRTL: false,
27283		showMonthAfterYear: false,
27284		yearSuffix: ''};
27285	$.datepicker.setDefaults($.datepicker.regional['mk']);
27286});
27287
27288/* Malayalam (UTF-8) initialisation for the jQuery UI date picker plugin. */
27289/* Written by Saji Nediyanchath ([email protected]). */
27290jQuery(function($){
27291	$.datepicker.regional['ml'] = {
27292		closeText: 'à´¶à´°à´¿',
27293		prevText: 'മുന്നത്തെ',  
27294		nextText: 'അടുത്തത് ',
27295		currentText: 'ഇന്ന്',
27296		monthNames: ['ജനുവരി','ഫെബ്രുവരി','മാര്‍ച്ച്','ഏപ്രില്‍','മേയ്','ജൂണ്‍',
27297		'ജൂലൈ','ആഗസ്റ്റ്','സെപ്റ്റംബര്‍','ഒക്ടോബര്‍','നവംബര്‍','ഡിസംബര്‍'],
27298		monthNamesShort: ['ജനു', 'ഫെബ്', 'മാര്‍', 'ഏപ്രി', 'മേയ്', 'ജൂണ്‍',
27299		'ജൂലാ', 'ആഗ', 'സെപ്', 'ഒക്ടോ', 'നവം', 'ഡിസ'],
27300		dayNames: ['ഞായര്‍', 'തിങ്കള്‍', 'ചൊവ്വ', 'ബുധന്‍', 'വ്യാഴം', 'വെള്ളി', 'ശനി'],
27301		dayNamesShort: ['ഞായ', 'തിങ്ക', 'ചൊവ്വ', 'ബുധ', 'വ്യാഴം', 'വെള്ളി', 'ശനി'],
27302		dayNamesMin: ['ഞാ','തി','ചൊ','ബു','വ്യാ','വെ','ശ'],
27303		weekHeader: 'ആ',
27304		dateFormat: 'dd/mm/yy',
27305		firstDay: 1,
27306		isRTL: false,
27307		showMonthAfterYear: false,
27308		yearSuffix: ''};
27309	$.datepicker.setDefaults($.datepicker.regional['ml']);
27310});
27311
27312/* Malaysian initialisation for the jQuery UI date picker plugin. */
27313/* Written by Mohd Nawawi Mohamad Jamili ([email protected]). */
27314jQuery(function($){
27315	$.datepicker.regional['ms'] = {
27316		closeText: 'Tutup',
27317		prevText: '&#x3c;Sebelum',
27318		nextText: 'Selepas&#x3e;',
27319		currentText: 'hari ini',
27320		monthNames: ['Januari','Februari','Mac','April','Mei','Jun',
27321		'Julai','Ogos','September','Oktober','November','Disember'],
27322		monthNamesShort: ['Jan','Feb','Mac','Apr','Mei','Jun',
27323		'Jul','Ogo','Sep','Okt','Nov','Dis'],
27324		dayNames: ['Ahad','Isnin','Selasa','Rabu','Khamis','Jumaat','Sabtu'],
27325		dayNamesShort: ['Aha','Isn','Sel','Rab','kha','Jum','Sab'],
27326		dayNamesMin: ['Ah','Is','Se','Ra','Kh','Ju','Sa'],
27327		weekHeader: 'Mg',
27328		dateFormat: 'dd/mm/yy',
27329		firstDay: 0,
27330		isRTL: false,
27331		showMonthAfterYear: false,
27332		yearSuffix: ''};
27333	$.datepicker.setDefaults($.datepicker.regional['ms']);
27334});
27335/* Dutch (Belgium) initialisation for the jQuery UI date picker plugin. */
27336/* David De Sloovere @DavidDeSloovere */
27337jQuery(function($){
27338	$.datepicker.regional['nl-BE'] = {
27339		closeText: 'Sluiten',
27340		prevText: '←',
27341		nextText: '→',
27342		currentText: 'Vandaag',
27343		monthNames: ['januari', 'februari', 'maart', 'april', 'mei', 'juni',
27344		'juli', 'augustus', 'september', 'oktober', 'november', 'december'],
27345		monthNamesShort: ['jan', 'feb', 'mrt', 'apr', 'mei', 'jun',
27346		'jul', 'aug', 'sep', 'okt', 'nov', 'dec'],
27347		dayNames: ['zondag', 'maandag', 'dinsdag', 'woensdag', 'donderdag', 'vrijdag', 'zaterdag'],
27348		dayNamesShort: ['zon', 'maa', 'din', 'woe', 'don', 'vri', 'zat'],
27349		dayNamesMin: ['zo', 'ma', 'di', 'wo', 'do', 'vr', 'za'],
27350		weekHeader: 'Wk',
27351		dateFormat: 'dd/mm/yy',
27352		firstDay: 1,
27353		isRTL: false,
27354		showMonthAfterYear: false,
27355		yearSuffix: ''};
27356	$.datepicker.setDefaults($.datepicker.regional['nl-BE']);
27357});
27358
27359/* Dutch (UTF-8) initialisation for the jQuery UI date picker plugin. */
27360/* Written by Mathias Bynens <http://mathiasbynens.be/> */
27361jQuery(function($){
27362	$.datepicker.regional.nl = {
27363		closeText: 'Sluiten',
27364		prevText: '←',
27365		nextText: '→',
27366		currentText: 'Vandaag',
27367		monthNames: ['januari', 'februari', 'maart', 'april', 'mei', 'juni',
27368		'juli', 'augustus', 'september', 'oktober', 'november', 'december'],
27369		monthNamesShort: ['jan', 'feb', 'mrt', 'apr', 'mei', 'jun',
27370		'jul', 'aug', 'sep', 'okt', 'nov', 'dec'],
27371		dayNames: ['zondag', 'maandag', 'dinsdag', 'woensdag', 'donderdag', 'vrijdag', 'zaterdag'],
27372		dayNamesShort: ['zon', 'maa', 'din', 'woe', 'don', 'vri', 'zat'],
27373		dayNamesMin: ['zo', 'ma', 'di', 'wo', 'do', 'vr', 'za'],
27374		weekHeader: 'Wk',
27375		dateFormat: 'dd-mm-yy',
27376		firstDay: 1,
27377		isRTL: false,
27378		showMonthAfterYear: false,
27379		yearSuffix: ''};
27380	$.datepicker.setDefaults($.datepicker.regional.nl);
27381});
27382/* Norwegian initialisation for the jQuery UI date picker plugin. */
27383/* Written by Naimdjon Takhirov ([email protected]). */
27384
27385jQuery(function($){
27386  $.datepicker.regional['no'] = {
27387    closeText: 'Lukk',
27388    prevText: '&laquo;Forrige',
27389    nextText: 'Neste&raquo;',
27390    currentText: 'I dag',
27391    monthNames: ['januar','februar','mars','april','mai','juni','juli','august','september','oktober','november','desember'],
27392    monthNamesShort: ['jan','feb','mar','apr','mai','jun','jul','aug','sep','okt','nov','des'],
27393    dayNamesShort: ['søn','man','tir','ons','tor','fre','lør'],
27394    dayNames: ['søndag','mandag','tirsdag','onsdag','torsdag','fredag','lørdag'],
27395    dayNamesMin: ['sø','ma','ti','on','to','fr','lø'],
27396    weekHeader: 'Uke',
27397    dateFormat: 'dd.mm.yy',
27398    firstDay: 1,
27399    isRTL: false,
27400    showMonthAfterYear: false,
27401    yearSuffix: ''
27402  };
27403  $.datepicker.setDefaults($.datepicker.regional['no']);
27404});
27405
27406/* Polish initialisation for the jQuery UI date picker plugin. */
27407/* Written by Jacek Wysocki ([email protected]). */
27408jQuery(function($){
27409	$.datepicker.regional['pl'] = {
27410		closeText: 'Zamknij',
27411		prevText: '&#x3c;Poprzedni',
27412		nextText: 'Następny&#x3e;',
27413		currentText: 'Dziś',
27414		monthNames: ['Styczeń','Luty','Marzec','Kwiecień','Maj','Czerwiec',
27415		'Lipiec','Sierpień','Wrzesień','Październik','Listopad','Grudzień'],
27416		monthNamesShort: ['Sty','Lu','Mar','Kw','Maj','Cze',
27417		'Lip','Sie','Wrz','Pa','Lis','Gru'],
27418		dayNames: ['Niedziela','Poniedziałek','Wtorek','Środa','Czwartek','Piątek','Sobota'],
27419		dayNamesShort: ['Nie','Pn','Wt','Śr','Czw','Pt','So'],
27420		dayNamesMin: ['N','Pn','Wt','Śr','Cz','Pt','So'],
27421		weekHeader: 'Tydz',
27422		dateFormat: 'dd.mm.yy',
27423		firstDay: 1,
27424		isRTL: false,
27425		showMonthAfterYear: false,
27426		yearSuffix: ''};
27427	$.datepicker.setDefaults($.datepicker.regional['pl']);
27428});
27429
27430/* Brazilian initialisation for the jQuery UI date picker plugin. */
27431/* Written by Leonildo Costa Silva ([email protected]). */
27432jQuery(function($){
27433	$.datepicker.regional['pt-BR'] = {
27434		closeText: 'Fechar',
27435		prevText: '&#x3c;Anterior',
27436		nextText: 'Pr&oacute;ximo&#x3e;',
27437		currentText: 'Hoje',
27438		monthNames: ['Janeiro','Fevereiro','Mar&ccedil;o','Abril','Maio','Junho',
27439		'Julho','Agosto','Setembro','Outubro','Novembro','Dezembro'],
27440		monthNamesShort: ['Jan','Fev','Mar','Abr','Mai','Jun',
27441		'Jul','Ago','Set','Out','Nov','Dez'],
27442		dayNames: ['Domingo','Segunda-feira','Ter&ccedil;a-feira','Quarta-feira','Quinta-feira','Sexta-feira','S&aacute;bado'],
27443		dayNamesShort: ['Dom','Seg','Ter','Qua','Qui','Sex','S&aacute;b'],
27444		dayNamesMin: ['Dom','Seg','Ter','Qua','Qui','Sex','S&aacute;b'],
27445		weekHeader: 'Sm',
27446		dateFormat: 'dd/mm/yy',
27447		firstDay: 0,
27448		isRTL: false,
27449		showMonthAfterYear: false,
27450		yearSuffix: ''};
27451	$.datepicker.setDefaults($.datepicker.regional['pt-BR']);
27452});
27453/* Portuguese initialisation for the jQuery UI date picker plugin. */
27454jQuery(function($){
27455	$.datepicker.regional['pt'] = {
27456		closeText: 'Fechar',
27457		prevText: '&#x3c;Anterior',
27458		nextText: 'Seguinte',
27459		currentText: 'Hoje',
27460		monthNames: ['Janeiro','Fevereiro','Mar&ccedil;o','Abril','Maio','Junho',
27461		'Julho','Agosto','Setembro','Outubro','Novembro','Dezembro'],
27462		monthNamesShort: ['Jan','Fev','Mar','Abr','Mai','Jun',
27463		'Jul','Ago','Set','Out','Nov','Dez'],
27464		dayNames: ['Domingo','Segunda-feira','Ter&ccedil;a-feira','Quarta-feira','Quinta-feira','Sexta-feira','S&aacute;bado'],
27465		dayNamesShort: ['Dom','Seg','Ter','Qua','Qui','Sex','S&aacute;b'],
27466		dayNamesMin: ['Dom','Seg','Ter','Qua','Qui','Sex','S&aacute;b'],
27467		weekHeader: 'Sem',
27468		dateFormat: 'dd/mm/yy',
27469		firstDay: 0,
27470		isRTL: false,
27471		showMonthAfterYear: false,
27472		yearSuffix: ''};
27473	$.datepicker.setDefaults($.datepicker.regional['pt']);
27474});
27475/* Romansh initialisation for the jQuery UI date picker plugin. */
27476/* Written by Yvonne Gienal ([email protected]). */
27477jQuery(function($){
27478	$.datepicker.regional['rm'] = {
27479		closeText: 'Serrar',
27480		prevText: '&#x3c;Suandant',
27481		nextText: 'Precedent&#x3e;',
27482		currentText: 'Actual',
27483		monthNames: ['Schaner','Favrer','Mars','Avrigl','Matg','Zercladur', 'Fanadur','Avust','Settember','October','November','December'],
27484		monthNamesShort: ['Scha','Fev','Mar','Avr','Matg','Zer', 'Fan','Avu','Sett','Oct','Nov','Dec'],
27485		dayNames: ['Dumengia','Glindesdi','Mardi','Mesemna','Gievgia','Venderdi','Sonda'],
27486		dayNamesShort: ['Dum','Gli','Mar','Mes','Gie','Ven','Som'],
27487		dayNamesMin: ['Du','Gl','Ma','Me','Gi','Ve','So'],
27488		weekHeader: 'emna',
27489		dateFormat: 'dd/mm/yy',
27490		firstDay: 1,
27491		isRTL: false,
27492		showMonthAfterYear: false,
27493		yearSuffix: ''};
27494	$.datepicker.setDefaults($.datepicker.regional['rm']);
27495});
27496
27497/* Romanian initialisation for the jQuery UI date picker plugin.
27498 *
27499 * Written by Edmond L. ([email protected])
27500 * and Ionut G. Stan ([email protected])
27501 */
27502jQuery(function($){
27503	$.datepicker.regional['ro'] = {
27504		closeText: 'Închide',
27505		prevText: '&laquo; Luna precedentă',
27506		nextText: 'Luna următoare &raquo;',
27507		currentText: 'Azi',
27508		monthNames: ['Ianuarie','Februarie','Martie','Aprilie','Mai','Iunie',
27509		'Iulie','August','Septembrie','Octombrie','Noiembrie','Decembrie'],
27510		monthNamesShort: ['Ian', 'Feb', 'Mar', 'Apr', 'Mai', 'Iun',
27511		'Iul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
27512		dayNames: ['Duminică', 'Luni', 'Marţi', 'Miercuri', 'Joi', 'Vineri', 'Sâmbătă'],
27513		dayNamesShort: ['Dum', 'Lun', 'Mar', 'Mie', 'Joi', 'Vin', 'Sâm'],
27514		dayNamesMin: ['Du','Lu','Ma','Mi','Jo','Vi','Sâ'],
27515		weekHeader: 'Săpt',
27516		dateFormat: 'dd.mm.yy',
27517		firstDay: 1,
27518		isRTL: false,
27519		showMonthAfterYear: false,
27520		yearSuffix: ''};
27521	$.datepicker.setDefaults($.datepicker.regional['ro']);
27522});
27523
27524/* Russian (UTF-8) initialisation for the jQuery UI date picker plugin. */
27525/* Written by Andrew Stromnov ([email protected]). */
27526jQuery(function($){
27527	$.datepicker.regional['ru'] = {
27528		closeText: 'Закрыть',
27529		prevText: '&#x3c;Пред',
27530		nextText: 'След&#x3e;',
27531		currentText: 'Сегодня',
27532		monthNames: ['Январь','Февраль','Март','Апрель','Май','Июнь',
27533		'Июль','Август','Сентябрь','Октябрь','Ноябрь','Декабрь'],
27534		monthNamesShort: ['Янв','Фев','Мар','Апр','Май','Июн',
27535		'Июл','Авг','Сен','Окт','Ноя','Дек'],
27536		dayNames: ['воскресенье','понедельник','вторник','среда','четверг','пятница','суббота'],
27537		dayNamesShort: ['вск','пнд','втр','срд','чтв','птн','сбт'],
27538		dayNamesMin: ['Вс','Пн','Вт','Ср','Чт','Пт','Сб'],
27539		weekHeader: 'Нед',
27540		dateFormat: 'dd.mm.yy',
27541		firstDay: 1,
27542		isRTL: false,
27543		showMonthAfterYear: false,
27544		yearSuffix: ''};
27545	$.datepicker.setDefaults($.datepicker.regional['ru']);
27546});
27547/* Slovak initialisation for the jQuery UI date picker plugin. */
27548/* Written by Vojtech Rinik ([email protected]). */
27549jQuery(function($){
27550	$.datepicker.regional['sk'] = {
27551		closeText: 'Zavrieť',
27552		prevText: '&#x3c;Predchádzajúci',
27553		nextText: 'Nasledujúci&#x3e;',
27554		currentText: 'Dnes',
27555		monthNames: ['Január','Február','Marec','Apríl','Máj','Jún',
27556		'Júl','August','September','Október','November','December'],
27557		monthNamesShort: ['Jan','Feb','Mar','Apr','Máj','Jún',
27558		'Júl','Aug','Sep','Okt','Nov','Dec'],
27559		dayNames: ['Nedeľa','Pondelok','Utorok','Streda','Štvrtok','Piatok','Sobota'],
27560		dayNamesShort: ['Ned','Pon','Uto','Str','Å tv','Pia','Sob'],
27561		dayNamesMin: ['Ne','Po','Ut','St','Å t','Pia','So'],
27562		weekHeader: 'Ty',
27563		dateFormat: 'dd.mm.yy',
27564		firstDay: 1,
27565		isRTL: false,
27566		showMonthAfterYear: false,
27567		yearSuffix: ''};
27568	$.datepicker.setDefaults($.datepicker.regional['sk']);
27569});
27570
27571/* Slovenian initialisation for the jQuery UI date picker plugin. */
27572/* Written by Jaka Jancar ([email protected]). */
27573/* c = &#x10D;, s = &#x161; z = &#x17E; C = &#x10C; S = &#x160; Z = &#x17D; */
27574jQuery(function($){
27575	$.datepicker.regional['sl'] = {
27576		closeText: 'Zapri',
27577		prevText: '&lt;Prej&#x161;nji',
27578		nextText: 'Naslednji&gt;',
27579		currentText: 'Trenutni',
27580		monthNames: ['Januar','Februar','Marec','April','Maj','Junij',
27581		'Julij','Avgust','September','Oktober','November','December'],
27582		monthNamesShort: ['Jan','Feb','Mar','Apr','Maj','Jun',
27583		'Jul','Avg','Sep','Okt','Nov','Dec'],
27584		dayNames: ['Nedelja','Ponedeljek','Torek','Sreda','&#x10C;etrtek','Petek','Sobota'],
27585		dayNamesShort: ['Ned','Pon','Tor','Sre','&#x10C;et','Pet','Sob'],
27586		dayNamesMin: ['Ne','Po','To','Sr','&#x10C;e','Pe','So'],
27587		weekHeader: 'Teden',
27588		dateFormat: 'dd.mm.yy',
27589		firstDay: 1,
27590		isRTL: false,
27591		showMonthAfterYear: false,
27592		yearSuffix: ''};
27593	$.datepicker.setDefaults($.datepicker.regional['sl']);
27594});
27595
27596/* Albanian initialisation for the jQuery UI date picker plugin. */
27597/* Written by Flakron Bytyqi ([email protected]). */
27598jQuery(function($){
27599	$.datepicker.regional['sq'] = {
27600		closeText: 'mbylle',
27601		prevText: '&#x3c;mbrapa',
27602		nextText: 'Përpara&#x3e;',
27603		currentText: 'sot',
27604		monthNames: ['Janar','Shkurt','Mars','Prill','Maj','Qershor',
27605		'Korrik','Gusht','Shtator','Tetor','Nëntor','Dhjetor'],
27606		monthNamesShort: ['Jan','Shk','Mar','Pri','Maj','Qer',
27607		'Kor','Gus','Sht','Tet','Nën','Dhj'],
27608		dayNames: ['E Diel','E Hënë','E Martë','E Mërkurë','E Enjte','E Premte','E Shtune'],
27609		dayNamesShort: ['Di','Hë','Ma','Më','En','Pr','Sh'],
27610		dayNamesMin: ['Di','Hë','Ma','Më','En','Pr','Sh'],
27611		weekHeader: 'Ja',
27612		dateFormat: 'dd.mm.yy',
27613		firstDay: 1,
27614		isRTL: false,
27615		showMonthAfterYear: false,
27616		yearSuffix: ''};
27617	$.datepicker.setDefaults($.datepicker.regional['sq']);
27618});
27619
27620/* Serbian i18n for the jQuery UI date picker plugin. */
27621/* Written by Dejan Dimić. */
27622jQuery(function($){
27623	$.datepicker.regional['sr-SR'] = {
27624		closeText: 'Zatvori',
27625		prevText: '&#x3c;',
27626		nextText: '&#x3e;',
27627		currentText: 'Danas',
27628		monthNames: ['Januar','Februar','Mart','April','Maj','Jun',
27629		'Jul','Avgust','Septembar','Oktobar','Novembar','Decembar'],
27630		monthNamesShort: ['Jan','Feb','Mar','Apr','Maj','Jun',
27631		'Jul','Avg','Sep','Okt','Nov','Dec'],
27632		dayNames: ['Nedelja','Ponedeljak','Utorak','Sreda','Četvrtak','Petak','Subota'],
27633		dayNamesShort: ['Ned','Pon','Uto','Sre','Čet','Pet','Sub'],
27634		dayNamesMin: ['Ne','Po','Ut','Sr','Če','Pe','Su'],
27635		weekHeader: 'Sed',
27636		dateFormat: 'dd/mm/yy',
27637		firstDay: 1,
27638		isRTL: false,
27639		showMonthAfterYear: false,
27640		yearSuffix: ''};
27641	$.datepicker.setDefaults($.datepicker.regional['sr-SR']);
27642});
27643
27644/* Serbian i18n for the jQuery UI date picker plugin. */
27645/* Written by Dejan Dimić. */
27646jQuery(function($){
27647	$.datepicker.regional['sr'] = {
27648		closeText: 'Затвори',
27649		prevText: '&#x3c;',
27650		nextText: '&#x3e;',
27651		currentText: 'Данас',
27652		monthNames: ['Јануар','Фебруар','Март','Април','Мај','Јун',
27653		'Јул','Август','Септембар','Октобар','Новембар','Децембар'],
27654		monthNamesShort: ['Јан','Феб','Мар','Апр','Мај','Јун',
27655		'Јул','Авг','Сеп','Окт','Нов','Дец'],
27656		dayNames: ['Недеља','Понедељак','Уторак','Среда','Четвртак','Петак','Субота'],
27657		dayNamesShort: ['Нед','Пон','Уто','Сре','Чет','Пет','Суб'],
27658		dayNamesMin: ['Не','По','Ут','Ср','Че','Пе','Су'],
27659		weekHeader: 'Сед',
27660		dateFormat: 'dd/mm/yy',
27661		firstDay: 1,
27662		isRTL: false,
27663		showMonthAfterYear: false,
27664		yearSuffix: ''};
27665	$.datepicker.setDefaults($.datepicker.regional['sr']);
27666});
27667
27668/* Swedish initialisation for the jQuery UI date picker plugin. */
27669/* Written by Anders Ekdahl ( [email protected]). */
27670jQuery(function($){
27671    $.datepicker.regional['sv'] = {
27672		closeText: 'Stäng',
27673        prevText: '&laquo;Förra',
27674		nextText: 'Nästa&raquo;',
27675		currentText: 'Idag',
27676        monthNames: ['Januari','Februari','Mars','April','Maj','Juni',
27677        'Juli','Augusti','September','Oktober','November','December'],
27678        monthNamesShort: ['Jan','Feb','Mar','Apr','Maj','Jun',
27679        'Jul','Aug','Sep','Okt','Nov','Dec'],
27680		dayNamesShort: ['Sön','Mån','Tis','Ons','Tor','Fre','Lör'],
27681		dayNames: ['Söndag','Måndag','Tisdag','Onsdag','Torsdag','Fredag','Lördag'],
27682		dayNamesMin: ['Sö','Må','Ti','On','To','Fr','Lö'],
27683		weekHeader: 'Ve',
27684        dateFormat: 'yy-mm-dd',
27685		firstDay: 1,
27686		isRTL: false,
27687		showMonthAfterYear: false,
27688		yearSuffix: ''};
27689    $.datepicker.setDefaults($.datepicker.regional['sv']);
27690});
27691
27692/* Tamil (UTF-8) initialisation for the jQuery UI date picker plugin. */
27693/* Written by S A Sureshkumar ([email protected]). */
27694jQuery(function($){
27695	$.datepicker.regional['ta'] = {
27696		closeText: 'மூடு',
27697		prevText: 'முன்னையது',
27698		nextText: 'அடுத்தது',
27699		currentText: 'இன்று',
27700		monthNames: ['தை','மாசி','பங்குனி','சித்திரை','வைகாசி','ஆனி',
27701		'ஆடி','ஆவணி','புரட்டாசி','ஐப்ப
27701சி','கார்த்திகை','மார்கழி'],
27702		monthNamesShort: ['தை','மாசி','பங்','சித்','வைகா','ஆனி',
27703		'ஆடி','ஆவ','புர','ஐப்','கார்','மார்'],
27704		dayNames: ['ஞாயிற்றுக்கிழமை','திங்கட்கிழமை','செவ்வாய்க்கிழமை','புதன்கிழமை','வியாழக்கிழமை','வெள்ளிக்கிழமை','சனிக்கிழமை'],
27705		dayNamesShort: ['ஞாயிறு','திங்கள்','செவ்வாய்','புதன்','வியாழன்','வெள்ளி','சனி'],
27706		dayNamesMin: ['ஞா','தி','செ','பு','வி','வெ','ச'],
27707		weekHeader: 'Не',
27708		dateFormat: 'dd/mm/yy',
27709		firstDay: 1,
27710		isRTL: false,
27711		showMonthAfterYear: false,
27712		yearSuffix: ''};
27713	$.datepicker.setDefaults($.datepicker.regional['ta']);
27714});
27715
27716/* Thai initialisation for the jQuery UI date picker plugin. */
27717/* Written by pipo ([email protected]). */
27718jQuery(function($){
27719	$.datepicker.regional['th'] = {
27720		closeText: 'ปิด',
27721		prevText: '&laquo;&nbsp;ย้อน',
27722		nextText: 'ถัดไป&nbsp;&raquo;',
27723		currentText: 'วันนี้',
27724		monthNames: ['มกราคม','กุมภาพันธ์','มีนาคม','เมษายน','พฤษภาคม','มิถุนายน',
27725		'กรกฎาคม','สิงหาคม','กันยายน','ตุลาคม','พฤศจิกายน','ธันวาคม'],
27726		monthNamesShort: ['ม.ค.','ก.พ.','มี.ค.','เม.ย.','พ.ค.','มิ.ย.',
27727		'ก.ค.','ส.ค.','ก.ย.','ต.ค.','พ.ย.','ธ.ค.'],
27728		dayNames: ['อาทิตย์','จันทร์','อังคาร','พุธ','พฤหัสบดี','ศุกร์','เสาร์'],
27729		dayNamesShort: ['อา.','จ.','อ.','พ.','พฤ.','ศ.','ส.'],
27730		dayNamesMin: ['อา.','จ.','อ.','พ.','พฤ.','ศ.','ส.'],
27731		weekHeader: 'Wk',
27732		dateFormat: 'dd/mm/yy',
27733		firstDay: 0,
27734		isRTL: false,
27735		showMonthAfterYear: false,
27736		yearSuffix: ''};
27737	$.datepicker.setDefaults($.datepicker.regional['th']);
27738});
27739/* Tajiki (UTF-8) initialisation for the jQuery UI date picker plugin. */
27740/* Written by Abdurahmon Saidov ([email protected]). */
27741jQuery(function($){
27742	$.datepicker.regional['tj'] = {
27743		closeText: 'Идома',
27744		prevText: '&#x3c;Қафо',
27745		nextText: 'Пеш&#x3e;',
27746		currentText: 'Имрӯз',
27747		monthNames: ['Январ','Феврал','Март','Апрел','Май','Июн',
27748		'Июл','Август','Сентябр','Октябр','Ноябр','Декабр'],
27749		monthNamesShort: ['Янв','Фев','Мар','Апр','Май','Июн',
27750		'Июл','Авг','Сен','Окт','Ноя','Дек'],
27751		dayNames: ['якшанбе','душанбе','сешанбе','чоршанбе','панҷшанбе','ҷумъа','шанбе'],
27752		dayNamesShort: ['якш','душ','сеш','чор','пан','ҷум','шан'],
27753		dayNamesMin: ['Як','Дш','Сш','Чш','Пш','Ҷм','Шн'],
27754		weekHeader: 'Хф',
27755		dateFormat: 'dd.mm.yy',
27756		firstDay: 1,
27757		isRTL: false,
27758		showMonthAfterYear: false,
27759		yearSuffix: ''};
27760	$.datepicker.setDefaults($.datepicker.regional['tj']);
27761});
27762/* Turkish initialisation for the jQuery UI date picker plugin. */
27763/* Written by Izzet Emre Erkan ([email protected]). */
27764jQuery(function($){
27765	$.datepicker.regional['tr'] = {
27766		closeText: 'kapat',
27767		prevText: '&#x3c;geri',
27768		nextText: 'ileri&#x3e',
27769		currentText: 'bugün',
27770		monthNames: ['Ocak','Şubat','Mart','Nisan','Mayıs','Haziran',
27771		'Temmuz','Ağustos','Eylül','Ekim','Kasım','Aralık'],
27772		monthNamesShort: ['Oca','Şub','Mar','Nis','May','Haz',
27773		'Tem','Ağu','Eyl','Eki','Kas','Ara'],
27774		dayNames: ['Pazar','Pazartesi','Salı','Çarşamba','Perşembe','Cuma','Cumartesi'],
27775		dayNamesShort: ['Pz','Pt','Sa','Ça','Pe','Cu','Ct'],
27776		dayNamesMin: ['Pz','Pt','Sa','Ça','Pe','Cu','Ct'],
27777		weekHeader: 'Hf',
27778		dateFormat: 'dd.mm.yy',
27779		firstDay: 1,
27780		isRTL: false,
27781		showMonthAfterYear: false,
27782		yearSuffix: ''};
27783	$.datepicker.setDefaults($.datepicker.regional['tr']);
27784});
27785/* Ukrainian (UTF-8) initialisation for the jQuery UI date picker plugin. */
27786/* Written by Maxim Drogobitskiy ([email protected]). */
27787/* Corrected by Igor Milla ([email protected]). */
27788jQuery(function($){
27789	$.datepicker.regional['uk'] = {
27790		closeText: 'Закрити',
27791		prevText: '&#x3c;',
27792		nextText: '&#x3e;',
27793		currentText: 'Сьогодні',
27794		monthNames: ['Січень','Лютий','Березень','Квітень','Травень','Червень',
27795		'Липень','Серпень','Вересень','Жовтень','Листопад','Грудень'],
27796		monthNamesShort: ['Січ','Лют','Бер','Кві','Тра','Чер',
27797		'Лип','Сер','Вер','Жов','Лис','Гру'],
27798		dayNames: ['неділя','понеділок','вівторок','середа','четвер','п’ятниця','субота'],
27799		dayNamesShort: ['нед','пнд','вів','срд','чтв','птн','сбт'],
27800		dayNamesMin: ['Нд','Пн','Вт','Ср','Чт','Пт','Сб'],
27801		weekHeader: 'Тиж',
27802		dateFormat: 'dd/mm/yy',
27803		firstDay: 1,
27804		isRTL: false,
27805		showMonthAfterYear: false,
27806		yearSuffix: ''};
27807	$.datepicker.setDefaults($.datepicker.regional['uk']);
27808});
27809/* Vietnamese initialisation for the jQuery UI date picker plugin. */
27810/* Translated by Le Thanh Huy ([email protected]). */
27811jQuery(function($){
27812	$.datepicker.regional['vi'] = {
27813		closeText: 'Đóng',
27814		prevText: '&#x3c;Trước',
27815		nextText: 'Tiếp&#x3e;',
27816		currentText: 'Hôm nay',
27817		monthNames: ['Tháng Một', 'Tháng Hai', 'Tháng Ba', 'Tháng Tư', 'Tháng Năm', 'Tháng Sáu',
27818		'Tháng Bảy', 'Tháng Tám', 'Tháng Chín', 'Tháng Mười', 'Tháng Mười Một', 'Tháng Mười Hai'],
27819		monthNamesShort: ['Tháng 1', 'Tháng 2', 'Tháng 3', 'Tháng 4', 'Tháng 5', 'Tháng 6',
27820		'Tháng 7', 'Tháng 8', 'Tháng 9', 'Tháng 10', 'Tháng 11', 'Tháng 12'],
27821		dayNames: ['Chủ Nhật', 'Thứ Hai', 'Thứ Ba', 'Thứ Tư', 'Thứ Năm', 'Thứ Sáu', 'Thứ Bảy'],
27822		dayNamesShort: ['CN', 'T2', 'T3', 'T4', 'T5', 'T6', 'T7'],
27823		dayNamesMin: ['CN', 'T2', 'T3', 'T4', 'T5', 'T6', 'T7'],
27824		weekHeader: 'Tu',
27825		dateFormat: 'dd/mm/yy',
27826		firstDay: 0,
27827		isRTL: false,
27828		showMonthAfterYear: false,
27829		yearSuffix: ''};
27830	$.datepicker.setDefaults($.datepicker.regional['vi']);
27831});
27832
27833/* Chinese initialisation for the jQuery UI date picker plugin. */
27834/* Written by Cloudream ([email protected]). */
27835jQuery(function($){
27836	$.datepicker.regional['zh-CN'] = {
27837		closeText: '关闭',
27838		prevText: '&#x3c;上月',
27839		nextText: '下月&#x3e;',
27840		currentText: '今天',
27841		monthNames: ['一月','二月','三月','四月','五月','六月',
27842		'七月','八月','九月','十月','十一月','十二月'],
27843		monthNamesShort: ['一月','二月','三月','四月','五月','六月',
27844		'七月','八月','九月','十月','十一月','十二月'],
27845		dayNames: ['星期日','星期一','星期二','星期三','星期四','星期五','星期六'],
27846		dayNamesShort: ['周日','周一','周二','周三','周四','周五','周六'],
27847		dayNamesMin: ['日','一','二','三','四','五','六'],
27848		weekHeader: '周',
27849		dateFormat: 'yy-mm-dd',
27850		firstDay: 1,
27851		isRTL: false,
27852		showMonthAfterYear: true,
27853		yearSuffix: 'å¹´'};
27854	$.datepicker.setDefaults($.datepicker.regional['zh-CN']);
27855});
27856
27857/* Chinese initialisation for the jQuery UI date picker plugin. */
27858/* Written by SCCY ([email protected]). */
27859jQuery(function($){
27860	$.datepicker.regional['zh-HK'] = {
27861		closeText: '關閉',
27862		prevText: '&#x3c;上月',
27863		nextText: '下月&#x3e;',
27864		currentText: '今天',
27865		monthNames: ['一月','二月','三月','四月','五月','六月',
27866		'七月','八月','九月','十月','十一月','十二月'],
27867		monthNamesShort: ['一月','二月','三月','四月','五月','六月',
27868		'七月','八月','九月','十月','十一月','十二月'],
27869		dayNames: ['星期日','星期一','星期二','星期三','星期四','星期五','星期六'],
27870		dayNamesShort: ['周日','周一','周二','周三','周四','周五','周六'],
27871		dayNamesMin: ['日','一','二','三','四','五','六'],
27872		weekHeader: '周',
27873		dateFormat: 'dd-mm-yy',
27874		firstDay: 0,
27875		isRTL: false,
27876		showMonthAfterYear: true,
27877		yearSuffix: 'å¹´'};
27878	$.datepicker.setDefaults($.datepicker.regional['zh-HK']);
27879});
27880
27881/* Chinese initialisation for the jQuery UI date picker plugin. */
27882/* Written by Ressol ([email protected]). */
27883jQuery(function($){
27884	$.datepicker.regional['zh-TW'] = {
27885		closeText: '關閉',
27886		prevText: '&#x3c;上月',
27887		nextText: '下月&#x3e;',
27888		currentText: '今天',
27889		monthNames: ['一月','二月','三月','四月','五月','六月',
27890		'七月','八月','九月','十月','十一月','十二月'],
27891		monthNamesShort: ['一月','二月','三月','四月','五月','六月',
27892		'七月','八月','九月','十月','十一月','十二月'],
27893		dayNames: ['星期日','星期一','星期二','星期三','星期四','星期五','星期六'],
27894		dayNamesShort: ['周日','周一','周二','周三','周四','周五','周六'],
27895		dayNamesMin: ['日','一','二','三','四','五','六'],
27896		weekHeader: '周',
27897		dateFormat: 'yy/mm/dd',
27898		firstDay: 1,
27899		isRTL: false,
27900		showMonthAfterYear: true,
27901		yearSuffix: 'å¹´'};
27902	$.datepicker.setDefaults($.datepicker.regional['zh-TW']);
27903});
27904
27905
27906/* ========================================
27907 FILE: /includes/js/jquery/cs-autocomplete.js
27908 ==================== */
27909
27910/**
27911 * Upraveny uiautocomplete pre shopy s JS optimalizaciami (pouzity napr. v mod_shop_search, checkoute. atd.
27912 */
27913
27914jQuery.widget('custom.csautocomplete', jQuery.ui.autocomplete, {
27915	_create    : function () {
27916		this._super();
27917		this.widget().menu("option", "items", "> :not(.ac_results_counter)");
27918		//if ( is_cs_user('separate_js') ) {
27919			var classes = this.options && this.options.classes && this.options.classes["ui-autocomplete"];
27920			if (typeof classes === 'string') {
27921				this.menu.element.wrap('<div class="ac_results ui-autocomplete ' + classes + '"></div>');
27922			} else {
27923				this.menu.element.wrap('<div class="ac_results ui-autocomplete"></div>');
27924			}
27925		//} else {
27926		//	this.menu.element.wrap('<div class="ac_results ui-autocomplete"></div>' );
27927		//}
27928	},
27929	_renderMenu: function (ul, items) {
27930		var self = this;
27931		var resultCounter;
27932		if (items.length === script_manage_params_aacwpi.uacl) {
27933			resultCounter = '&ge; ' + items.length + ' ' + js_lang_sphf_result_3;
27934		} else if (items.length >= 5) {
27935			resultCounter = items.length + ' ' + js_lang_sphf_result_3;
27936		} else if (items.length > 1 && items.length < 5) {
27937			resultCounter = items.length + ' ' + js_lang_sphf_result_2;
27938		} else if (items.length === 1) {
27939			resultCounter = items.length + ' ' + js_lang_sphf_result_1;
27940		}
27941
27942		if (items[0].value !== cms_js_iterate_notfound) {
27943			ul.before('<div class="ac_results_counter">' + resultCounter + '</div>');
27944		}
27945
27946		ul.parent().show();
27947
27948		jQuery.each(items, function (index, item) {
27949			if (item !== null && item !== []) {
27950				self._renderItemData(ul, item);
27951			}
27952		});
27953	},
27954	_renderItem: function( ul, item ) {
27955		if (item.value === cms_js_iterate_notfound) {
27956			return jQuery('<li>').text(item.value).appendTo( ul );
27957		}
27958		var linkElement = jQuery('<a>').attr('href', item.value).append(item.label);
27959		return jQuery('<li>').append(linkElement).appendTo(ul);
27960	},
27961	_suggest   : function (items) {
27962		var $menu = this.menu.element;
27963		$menu.prev( '.ac_results_counter' ).remove();
27964		this._super( items );
27965		var inputBottom = this.element.offset().top + this.element.height();
27966		var inputLeft = this.element.offset().left;
vendor: 5,743 bytes, lines 27967-28201
27967		//var inputWidth = $menu.css('width');
27968		var inputWidth = this.element.css('width');
27969		$menu.closest('.ac_results').css('top', inputBottom).css('left', inputLeft).css('width', inputWidth).css('position', 'absolute');
27970		$menu.css('top', '').css('left', '');
27971		$menu.removeClass('ui-autocomplete');
27972	},
27973	_close: function( e ) {
27974		this._super( e );
27975
27976		this.menu.element
27977			.parent()
27978			.hide();
27979
27980		this.menu.element
27981			.prev( '.ac_results_counter' )
27982			.remove();
27983	}
27984});
27985
27986
27987
27988/* ========================================
27989 FILE: /includes/js/jquery/cs-jquery-ui-custom-settings.js
27990 ==================== */
27991
27992jQuery(function() {
27993	if (typeof js_get_lang !== 'undefined') {
27994		var lang = js_get_lang === 'cz' ? 'cs' : js_get_lang;
27995		jQuery.datepicker.setDefaults(jQuery.datepicker.regional[lang]);
27996	} else {
27997		jQuery.datepicker.setDefaults(jQuery.datepicker.regional['']);
27998	}
27999});
28000
28001
28002
28003/* ========================================
28004 FILE: /includes/js/jquery.lazy.js
28005 ==================== */
28006
28007/*! lazysizes - v5.1.0 - pozor zmenene CS srcAttr hodnota bola nahradene, NUTNE loadHidden nastavit na FALSE !  */
28008(function(window, factory) {
28009	var lazySizes = factory(window, window.document);
28010	window.lazySizes = lazySizes;
28011	if(typeof module == 'object' && module.exports){
28012		module.exports = lazySizes;
28013	}
28014}(typeof window != 'undefined' ?
28015	window : {}, function l(window, document) {
28016		'use strict';
28017		/*jshint eqnull:true */
28018
28019		var lazysizes, lazySizesCfg;
28020
28021		(function(){
28022			var prop;
28023
28024			var lazySizesDefaults = {
28025				lazyClass: 'lazyload',
28026				loadedClass: 'lazyloaded',
28027				loadingClass: 'lazyloading',
28028				preloadClass: 'lazypreload',
28029				errorClass: 'lazyerror',
28030				//strictClass: 'lazystrict',
28031				autosizesClass: 'lazyautosizes',
28032				srcAttr: 'longdesc',
28033				srcsetAttr: 'data-srcset',
28034				sizesAttr: 'data-sizes',
28035				//preloadAfterLoad: false,
28036				minSize: 40,
28037				customMedia: {},
28038				init: true,
28039				expFactor: 1.5,
28040				hFac: 0.8,
28041				loadMode: 2,
28042				loadHidden: false,
28043				ricTimeout: 0,
28044				throttleDelay: 125,
28045			};
28046
28047			lazySizesCfg = window.lazySizesConfig || window.lazysizesConfig || {};
28048
28049			for(prop in lazySizesDefaults){
28050				if(!(prop in lazySizesCfg)){
28051					lazySizesCfg[prop] = lazySizesDefaults[prop];
28052				}
28053			}
28054		})();
28055
28056		if (!document || !document.getElementsByClassName) {
28057			return {
28058				init: function () {},
28059				cfg: lazySizesCfg,
28060				noSupport: true,
28061			};
28062		}
28063
28064		var docElem = document.documentElement;
28065
28066		var Date = window.Date;
28067
28068		var supportPicture = window.HTMLPictureElement;
28069
28070		var _addEventListener = 'addEventListener';
28071
28072		var _getAttribute = 'getAttribute';
28073
28074		var addEventListener = window[_addEventListener];
28075
28076		var setTimeout = window.setTimeout;
28077
28078		var requestAnimationFrame = window.requestAnimationFrame || setTimeout;
28079
28080		var requestIdleCallback = window.requestIdleCallback;
28081
28082		var regPicture = /^picture$/i;
28083
28084		var loadEvents = ['load', 'error', 'lazyincluded', '_lazyloaded'];
28085
28086		var regClassCache = {};
28087
28088		var forEach = Array.prototype.forEach;
28089
28090		var hasClass = function(ele, cls) {
28091			if(!regClassCache[cls]){
28092				regClassCache[cls] = new RegExp('(\\s|^)'+cls+'(\\s|$)');
28093			}
28094			return regClassCache[cls].test(ele[_getAttribute]('class') || '') && regClassCache[cls];
28095		};
28096
28097		var addClass = function(ele, cls) {
28098			if (!hasClass(ele, cls)){
28099				ele.setAttribute('class', (ele[_getAttribute]('class') || '').trim() + ' ' + cls);
28100			}
28101		};
28102
28103		var removeClass = function(ele, cls) {
28104			var reg;
28105			if ((reg = hasClass(ele,cls))) {
28106				ele.setAttribute('class', (ele[_getAttribute]('class') || '').replace(reg, ' '));
28107			}
28108		};
28109
28110		var addRemoveLoadEvents = function(dom, fn, add){
28111			var action = add ? _addEventListener : 'removeEventListener';
28112			if(add){
28113				addRemoveLoadEvents(dom, fn);
28114			}
28115			loadEvents.forEach(function(evt){
28116				dom[action](evt, fn);
28117			});
28118		};
28119
28120		var triggerEvent = function(elem, name, detail, noBubbles, noCancelable){
28121			var event = document.createEvent('Event');
28122
28123			if(!detail){
28124				detail = {};
28125			}
28126
28127			detail.instance = lazysizes;
28128
28129			event.initEvent(name, !noBubbles, !noCancelable);
28130
28131			event.detail = detail;
28132
28133			elem.dispatchEvent(event);
28134			return event;
28135		};
28136
28137		var updatePolyfill = function (el, full){
28138			var polyfill;
28139			if( !supportPicture && ( polyfill = (window.picturefill || lazySizesCfg.pf) ) ){
28140				if(full && full.src && !el[_getAttribute]('srcset')){
28141					el.setAttribute('srcset', full.src);
28142				}
28143				polyfill({reevaluate: true, elements: [el]});
28144			} else if(full && full.src){
28145				el.src = full.src;
28146			}
28147		};
28148
28149		var getCSS = function (elem, style){
28150			return (getComputedStyle(elem, null) || {})[style];
28151		};
28152
28153		var getWidth = function(elem, parent, width){
28154			width = width || elem.offsetWidth;
28155
28156			while(width < lazySizesCfg.minSize && parent && !elem._lazysizesWidth){
28157				width =  parent.offsetWidth;
28158				parent = parent.parentNode;
28159			}
28160
28161			return width;
28162		};
28163
28164		var rAF = (function(){
28165			var running, waiting;
28166			var firstFns = [];
28167			var secondFns = [];
28168			var fns = firstFns;
28169
28170			var run = function(){
28171				var runFns = fns;
28172
28173				fns = firstFns.length ? secondFns : firstFns;
28174
28175				running = true;
28176				waiting = false;
28177
28178				while(runFns.length){
28179					runFns.shift()();
28180				}
28181
28182				running = false;
28183			};
28184
28185			var rafBatch = function(fn, queue){
28186				if(running && !queue){
28187					fn.apply(this, arguments);
28188				} else {
28189					fns.push(fn);
28190
28191					if(!waiting){
28192						waiting = true;
28193						(document.hidden ? setTimeout : requestAnimationFrame)(run);
28194					}
28195				}
28196			};
28197
28198			rafBatch._lsFlush = run;
28199
28200			return rafBatch;
28201		})();
vendor: 15,006 bytes, lines 28202-28748
28202
28203		var rAFIt = function(fn, simple){
28204			return simple ?
28205				function() {
28206					rAF(fn);
28207				} :
28208				function(){
28209					var that = this;
28210					var args = arguments;
28211					rAF(function(){
28212						fn.apply(that, args);
28213					});
28214				}
28215				;
28216		};
28217
28218		var throttle = function(fn){
28219			var running;
28220			var lastTime = 0;
28221			var gDelay = lazySizesCfg.throttleDelay;
28222			var rICTimeout = lazySizesCfg.ricTimeout;
28223			var run = function(){
28224				running = false;
28225				lastTime = Date.now();
28226				fn();
28227			};
28228			var idleCallback = requestIdleCallback && rICTimeout > 49 ?
28229				function(){
28230					requestIdleCallback(run, {timeout: rICTimeout});
28231
28232					if(rICTimeout !== lazySizesCfg.ricTimeout){
28233						rICTimeout = lazySizesCfg.ricTimeout;
28234					}
28235				} :
28236				rAFIt(function(){
28237					setTimeout(run);
28238				}, true)
28239			;
28240
28241			return function(isPriority){
28242				var delay;
28243
28244				if((isPriority = isPriority === true)){
28245					rICTimeout = 33;
28246				}
28247
28248				if(running){
28249					return;
28250				}
28251
28252				running =  true;
28253
28254				delay = gDelay - (Date.now() - lastTime);
28255
28256				if(delay < 0){
28257					delay = 0;
28258				}
28259
28260				if(isPriority || delay < 9){
28261					idleCallback();
28262				} else {
28263					setTimeout(idleCallback, delay);
28264				}
28265			};
28266		};
28267
28268		//based on http://modernjavascript.blogspot.de/2013/08/building-better-debounce.html
28269		var debounce = function(func) {
28270			var timeout, timestamp;
28271			var wait = 99;
28272			var run = function(){
28273				timeout = null;
28274				func();
28275			};
28276			var later = function() {
28277				var last = Date.now() - timestamp;
28278
28279				if (last < wait) {
28280					setTimeout(later, wait - last);
28281				} else {
28282					(requestIdleCallback || run)(run);
28283				}
28284			};
28285
28286			return function() {
28287				timestamp = Date.now();
28288
28289				if (!timeout) {
28290					timeout = setTimeout(later, wait);
28291				}
28292			};
28293		};
28294
28295		var loader = (function(){
28296			var preloadElems, isCompleted, resetPreloadingTimer, loadMode, started;
28297
28298			var eLvW, elvH, eLtop, eLleft, eLright, eLbottom, isBodyHidden;
28299
28300			var regImg = /^img$/i;
28301			var regIframe = /^iframe$/i;
28302
28303			var supportScroll = ('onscroll' in window) && !(/(gle|ing)bot/.test(navigator.userAgent));
28304
28305			var shrinkExpand = 0;
28306			var currentExpand = 0;
28307
28308			var isLoading = 0;
28309			var lowRuns = -1;
28310
28311			var resetPreloading = function(e){
28312				isLoading--;
28313				if(!e || isLoading < 0 || !e.target){
28314					isLoading = 0;
28315				}
28316			};
28317
28318			var isVisible = function (elem) {
28319				if (isBodyHidden == null) {
28320					isBodyHidden = getCSS(document.body, 'visibility') == 'hidden';
28321				}
28322
28323				return isBodyHidden || (getCSS(elem.parentNode, 'visibility') != 'hidden' && getCSS(elem, 'visibility') != 'hidden');
28324			};
28325
28326			var isNestedVisible = function(elem, elemExpand){
28327				var outerRect;
28328				var parent = elem;
28329				var visible = isVisible(elem);
28330
28331				eLtop -= elemExpand;
28332				eLbottom += elemExpand;
28333				eLleft -= elemExpand;
28334				eLright += elemExpand;
28335
28336				while(visible && (parent = parent.offsetParent) && parent != document.body && parent != docElem){
28337					visible = ((getCSS(parent, 'opacity') || 1) > 0);
28338
28339					if(visible && getCSS(parent, 'overflow') != 'visible'){
28340						outerRect = parent.getBoundingClientRect();
28341						visible = eLright > outerRect.left &&
28342							eLleft < outerRect.right &&
28343							eLbottom > outerRect.top - 1 &&
28344							eLtop < outerRect.bottom + 1
28345						;
28346					}
28347				}
28348
28349				return visible;
28350			};
28351
28352			var checkElements = function() {
28353				var eLlen, i, rect, autoLoadElem, loadedSomething, elemExpand, elemNegativeExpand, elemExpandVal,
28354				    beforeExpandVal, defaultExpand, preloadExpand, hFac;
28355				var lazyloadElems = lazysizes.elements;
28356
28357				if((loadMode = lazySizesCfg.loadMode) && isLoading < 8 && (eLlen = lazyloadElems.length)){
28358
28359					i = 0;
28360
28361					lowRuns++;
28362
28363					for(; i < eLlen; i++){
28364
28365						if(!lazyloadElems[i] || lazyloadElems[i]._lazyRace){continue;}
28366
28367						if(!supportScroll || (lazysizes.prematureUnveil && lazysizes.prematureUnveil(lazyloadElems[i]))){unveilElement(lazyloadElems[i]);continue;}
28368
28369						if(!(elemExpandVal = lazyloadElems[i][_getAttribute]('data-expand')) || !(elemExpand = elemExpandVal * 1)){
28370							elemExpand = currentExpand;
28371						}
28372
28373						if (!defaultExpand) {
28374							defaultExpand = (!lazySizesCfg.expand || lazySizesCfg.expand < 1) ?
28375								docElem.clientHeight > 500 && docElem.clientWidth > 500 ? 500 : 370 :
28376								lazySizesCfg.expand;
28377
28378							lazysizes._defEx = defaultExpand;
28379
28380							preloadExpand = defaultExpand * lazySizesCfg.expFactor;
28381							hFac = lazySizesCfg.hFac;
28382							isBodyHidden = null;
28383
28384							if(currentExpand < preloadExpand && isLoading < 1 && lowRuns > 2 && loadMode > 2 && !document.hidden){
28385								currentExpand = preloadExpand;
28386								lowRuns = 0;
28387							} else if(loadMode > 1 && lowRuns > 1 && isLoading < 6){
28388								currentExpand = defaultExpand;
28389							} else {
28390								currentExpand = shrinkExpand;
28391							}
28392						}
28393
28394						if(beforeExpandVal !== elemExpand){
28395							eLvW = innerWidth + (elemExpand * hFac);
28396							elvH = innerHeight + elemExpand;
28397							elemNegativeExpand = elemExpand * -1;
28398							beforeExpandVal = elemExpand;
28399						}
28400
28401						rect = lazyloadElems[i].getBoundingClientRect();
28402
28403						if ((eLbottom = rect.bottom) >= elemNegativeExpand &&
28404							(eLtop = rect.top) <= elvH &&
28405							(eLright = rect.right) >= elemNegativeExpand * hFac &&
28406							(eLleft = rect.left) <= eLvW &&
28407							(eLbottom || eLright || eLleft || eLtop) &&
28408							(lazySizesCfg.loadHidden || isVisible(lazyloadElems[i])) &&
28409							((isCompleted && isLoading < 3 && !elemExpandVal && (loadMode < 3 || lowRuns < 4)) || isNestedVisible(lazyloadElems[i], elemExpand))){
28410							unveilElement(lazyloadElems[i]);
28411							loadedSomething = true;
28412							if(isLoading > 9){break;}
28413						} else if(!loadedSomething && isCompleted && !autoLoadElem &&
28414							isLoading < 4 && lowRuns < 4 && loadMode > 2 &&
28415							(preloadElems[0] || lazySizesCfg.preloadAfterLoad) &&
28416							(preloadElems[0] || (!elemExpandVal && ((eLbottom || eLright || eLleft || eLtop) || lazyloadElems[i][_getAttribute](lazySizesCfg.sizesAttr) != 'auto')))){
28417							autoLoadElem = preloadElems[0] || lazyloadElems[i];
28418						}
28419					}
28420
28421					if(autoLoadElem && !loadedSomething){
28422						unveilElement(autoLoadElem);
28423					}
28424				}
28425			};
28426
28427			var throttledCheckElements = throttle(checkElements);
28428
28429			var switchLoadingClass = function(e){
28430				var elem = e.target;
28431
28432				if (elem._lazyCache) {
28433					delete elem._lazyCache;
28434					return;
28435				}
28436
28437				resetPreloading(e);
28438				addClass(elem, lazySizesCfg.loadedClass);
28439				removeClass(elem, lazySizesCfg.loadingClass);
28440				addRemoveLoadEvents(elem, rafSwitchLoadingClass);
28441				triggerEvent(elem, 'lazyloaded');
28442			};
28443			var rafedSwitchLoadingClass = rAFIt(switchLoadingClass);
28444			var rafSwitchLoadingClass = function(e){
28445				rafedSwitchLoadingClass({target: e.target});
28446			};
28447
28448			var changeIframeSrc = function(elem, src){
28449				try {
28450					elem.contentWindow.location.replace(src);
28451				} catch(e){
28452					elem.src = src;
28453				}
28454			};
28455
28456			var handleSources = function(source){
28457				var customMedia;
28458
28459				var sourceSrcset = source[_getAttribute](lazySizesCfg.srcsetAttr);
28460
28461				if( (customMedia = lazySizesCfg.customMedia[source[_getAttribute]('data-media') || source[_getAttribute]('media')]) ){
28462					source.setAttribute('media', customMedia);
28463				}
28464
28465				if(sourceSrcset){
28466					source.setAttribute('srcset', sourceSrcset);
28467				}
28468			};
28469
28470			var lazyUnveil = rAFIt(function (elem, detail, isAuto, sizes, isImg){
28471				var src, srcset, parent, isPicture, event, firesLoad;
28472
28473				if(!(event = triggerEvent(elem, 'lazybeforeunveil', detail)).defaultPrevented){
28474
28475					if(sizes){
28476						if(isAuto){
28477							addClass(elem, lazySizesCfg.autosizesClass);
28478						} else {
28479							elem.setAttribute('sizes', sizes);
28480						}
28481					}
28482
28483					srcset = elem[_getAttribute](lazySizesCfg.srcsetAttr);
28484					src = elem[_getAttribute](lazySizesCfg.srcAttr);
28485
28486					if(isImg) {
28487						parent = elem.parentNode;
28488						isPicture = parent && regPicture.test(parent.nodeName || '');
28489					}
28490
28491					firesLoad = detail.firesLoad || (('src' in elem) && (srcset || src || isPicture));
28492
28493					event = {target: elem};
28494
28495					addClass(elem, lazySizesCfg.loadingClass);
28496
28497					if(firesLoad){
28498						clearTimeout(resetPreloadingTimer);
28499						resetPreloadingTimer = setTimeout(resetPreloading, 2500);
28500						addRemoveLoadEvents(elem, rafSwitchLoadingClass, true);
28501					}
28502
28503					if(isPicture){
28504						forEach.call(parent.getElementsByTagName('source'), handleSources);
28505					}
28506
28507					if(srcset){
28508						elem.setAttribute('srcset', srcset);
28509					} else if(src && !isPicture){
28510						if(regIframe.test(elem.nodeName)){
28511							changeIframeSrc(elem, src);
28512						} else {
28513							elem.src = src;
28514						}
28515					}
28516
28517					if(isImg && (srcset || isPicture)){
28518						updatePolyfill(elem, {src: src});
28519					}
28520				}
28521
28522				if(elem._lazyRace){
28523					delete elem._lazyRace;
28524				}
28525				removeClass(elem, lazySizesCfg.lazyClass);
28526
28527				rAF(function(){
28528					// Part of this can be removed as soon as this fix is older: https://bugs.chromium.org/p/chromium/issues/detail?id=7731 (2015)
28529					var isLoaded = elem.complete && elem.naturalWidth > 1;
28530
28531					if( !firesLoad || isLoaded){
28532						if (isLoaded) {
28533							addClass(elem, 'ls-is-cached');
28534						}
28535						switchLoadingClass(event);
28536						elem._lazyCache = true;
28537						setTimeout(function(){
28538							if ('_lazyCache' in elem) {
28539								delete elem._lazyCache;
28540							}
28541						}, 9);
28542					}
28543					if (elem.loading == 'lazy') {
28544						isLoading--;
28545					}
28546				}, true);
28547			});
28548
28549			var unveilElement = function (elem){
28550				if (elem._lazyRace) {return;}
28551				var detail;
28552
28553				var isImg = regImg.test(elem.nodeName);
28554
28555				//allow using sizes="auto", but don't use. it's invalid. Use data-sizes="auto" or a valid value for sizes instead (i.e.: sizes="80vw")
28556				var sizes = isImg && (elem[_getAttribute](lazySizesCfg.sizesAttr) || elem[_getAttribute]('sizes'));
28557				var isAuto = sizes == 'auto';
28558
28559				if( (isAuto || !isCompleted) && isImg && (elem[_getAttribute]('src') || elem.srcset) && !elem.complete && !hasClass(elem, lazySizesCfg.errorClass) && hasClass(elem, lazySizesCfg.lazyClass)){return;}
28560
28561				detail = triggerEvent(elem, 'lazyunveilread').detail;
28562
28563				if(isAuto){
28564					autoSizer.updateElem(elem, true, elem.offsetWidth);
28565				}
28566
28567				elem._lazyRace = true;
28568				isLoading++;
28569
28570				lazyUnveil(elem, detail, isAuto, sizes, isImg);
28571			};
28572
28573			var afterScroll = debounce(function(){
28574				lazySizesCfg.loadMode = 3;
28575				throttledCheckElements();
28576			});
28577
28578			var altLoadmodeScrollListner = function(){
28579				if(lazySizesCfg.loadMode == 3){
28580					lazySizesCfg.loadMode = 2;
28581				}
28582				afterScroll();
28583			};
28584
28585			var onload = function(){
28586				if(isCompleted){return;}
28587				if(Date.now() - started < 999){
28588					setTimeout(onload, 999);
28589					return;
28590				}
28591
28592
28593				isCompleted = true;
28594
28595				lazySizesCfg.loadMode = 3;
28596
28597				throttledCheckElements();
28598
28599				addEventListener('scroll', altLoadmodeScrollListner, true);
28600			};
28601
28602			return {
28603				_: function(){
28604					started = Date.now();
28605
28606					lazysizes.elements = document.getElementsByClassName(lazySizesCfg.lazyClass);
28607					preloadElems = document.getElementsByClassName(lazySizesCfg.lazyClass + ' ' + lazySizesCfg.preloadClass);
28608
28609					addEventListener('scroll', throttledCheckElements, true);
28610
28611					addEventListener('resize', throttledCheckElements, true);
28612
28613					if(window.MutationObserver){
28614						new MutationObserver( throttledCheckElements ).observe( docElem, {childList: true, subtree: true, attributes: true} );
28615					} else {
28616						docElem[_addEventListener]('DOMNodeInserted', throttledCheckElements, true);
28617						docElem[_addEventListener]('DOMAttrModified', throttledCheckElements, true);
28618						setInterval(throttledCheckElements, 999);
28619					}
28620
28621					addEventListener('hashchange', throttledCheckElements, true);
28622
28623					//, 'fullscreenchange'
28624					['focus', 'mouseover', 'click', 'load', 'transitionend', 'animationend'].forEach(function(name){
28625						document[_addEventListener](name, throttledCheckElements, true);
28626					});
28627
28628					if((/d$|^c/.test(document.readyState))){
28629						onload();
28630					} else {
28631						addEventListener('load', onload);
28632						document[_addEventListener]('DOMContentLoaded', throttledCheckElements);
28633						setTimeout(onload, 20000);
28634					}
28635
28636					if(lazysizes.elements.length){
28637						checkElements();
28638						rAF._lsFlush();
28639					} else {
28640						throttledCheckElements();
28641					}
28642				},
28643				checkElems: throttledCheckElements,
28644				unveil: unveilElement,
28645				_aLSL: altLoadmodeScrollListner,
28646			};
28647		})();
28648
28649
28650		var autoSizer = (function(){
28651			var autosizesElems;
28652
28653			var sizeElement = rAFIt(function(elem, parent, event, width){
28654				var sources, i, len;
28655				elem._lazysizesWidth = width;
28656				width += 'px';
28657
28658				elem.setAttribute('sizes', width);
28659
28660				if(regPicture.test(parent.nodeName || '')){
28661					sources = parent.getElementsByTagName('source');
28662					for(i = 0, len = sources.length; i < len; i++){
28663						sources[i].setAttribute('sizes', width);
28664					}
28665				}
28666
28667				if(!event.detail.dataAttr){
28668					updatePolyfill(elem, event.detail);
28669				}
28670			});
28671			var getSizeElement = function (elem, dataAttr, width){
28672				var event;
28673				var parent = elem.parentNode;
28674
28675				if(parent){
28676					width = getWidth(elem, parent, width);
28677					event = triggerEvent(elem, 'lazybeforesizes', {width: width, dataAttr: !!dataAttr});
28678
28679					if(!event.defaultPrevented){
28680						width = event.detail.width;
28681
28682						if(width && width !== elem._lazysizesWidth){
28683							sizeElement(elem, parent, event, width);
28684						}
28685					}
28686				}
28687			};
28688
28689			var updateElementsSizes = function(){
28690				var i;
28691				var len = autosizesElems.length;
28692				if(len){
28693					i = 0;
28694
28695					for(; i < len; i++){
28696						getSizeElement(autosizesElems[i]);
28697					}
28698				}
28699			};
28700
28701			var debouncedUpdateElementsSizes = debounce(updateElementsSizes);
28702
28703			return {
28704				_: function(){
28705					autosizesElems = document.getElementsByClassName(lazySizesCfg.autosizesClass);
28706					addEventListener('resize', debouncedUpdateElementsSizes);
28707				},
28708				checkElems: debouncedUpdateElementsSizes,
28709				updateElem: getSizeElement
28710			};
28711		})();
28712
28713		var init = function(){
28714			if(!init.i && document.getElementsByClassName){
28715				init.i = true;
28716				autoSizer._();
28717				loader._();
28718			}
28719		};
28720
28721		setTimeout(function(){
28722			if(lazySizesCfg.init){
28723				init();
28724			}
28725		});
28726
28727		lazysizes = {
28728			cfg: lazySizesCfg,
28729			autoSizer: autoSizer,
28730			loader: loader,
28731			init: init,
28732			uP: updatePolyfill,
28733			aC: addClass,
28734			rC: removeClass,
28735			hC: hasClass,
28736			fire: triggerEvent,
28737			gW: getWidth,
28738			rAF: rAF,
28739		};
28740
28741		return lazysizes;
28742	}
28743));
28744
28745/* ========================================
28746 FILE: /includes/js/tooltipster/tooltipster.min.js
28747 ==================== */
28748
vendor: 1,666 bytes, line 28749
28749/*! tooltipster v4.2.6 */!function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof exports?module.exports=b(require("jquery")):b(jQuery)}(this,function(a){function b(a){this.$container,this.constraints=null,this.__$tooltip,this.__init(a)}function c(b,c){var d=!0;return a.each(b,function(a,e){return void 0===c[a]||b[a]!==c[a]?(d=!1,!1):void 0}),d}function d(b){var c=b.attr("id"),d=c?h.window.document.getElementById(c):null;return d?d===b[0]:a.contains(h.window.document.body,b[0])}function e(){if(!g)return!1;var a=g.document.body||g.document.documentElement,b=a.style,c="transition",d=["Moz","Webkit","Khtml","O","ms"];if("string"==typeof b[c])return!0;c=c.charAt(0).toUpperCase()+c.substr(1);for(var e=0;e<d.length;e++)if("string"==typeof b[d[e]+c])return!0;return!1}var f={animation:"fade",animationDuration:350,content:null,contentAsHTML:!1,contentCloning:!1,debug:!0,delay:300,delayTouch:[300,500],functionInit:null,functionBefore:null,functionReady:null,functionAfter:null,functionFormat:null,IEmin:6,interactive:!1,multiple:!1,parent:null,plugins:["sideTip"],repositionOnScroll:!1,restoration:"none",selfDestruction:!0,theme:[],timer:0,trackerInterval:500,trackOrigin:!1,trackTooltip:!1,trigger:"hover",triggerClose:{click:!1,mouseleave:!1,originClick:!1,scroll:!1,tap:!1,touchleave:!1},triggerOpen:{click:!1,mouseenter:!1,tap:!1,touchstart:!1},updateAnimation:"rotate",zIndex:9999999},g="undefined"!=typeof window?window:null,h={hasTouchCapability:!(!g||!("ontouchstart"in g||g.DocumentTouch&&g.document instanceof g.DocumentTouch||g.navigator.maxTouchPoints)),hasTransitions:e(),IE:!1,semVer:"4.2.6
vendor: 28,893 bytes, line 28749
28749",window:g},i=function(){this.__$emitterPrivate=a({}),this.__$emitterPublic=a({}),this.__instancesLatestArr=[],this.__plugins={},this._env=h};i.prototype={__bridge:function(b,c,d){if(!c[d]){var e=function(){};e.prototype=b;var g=new e;g.__init&&g.__init(c),a.each(b,function(a,b){0!=a.indexOf("__")&&(c[a]?f.debug&&console.log("The "+a+" method of the "+d+" plugin conflicts with another plugin or native methods"):(c[a]=function(){return g[a].apply(g,Array.prototype.slice.apply(arguments))},c[a].bridged=g))}),c[d]=g}return this},__setWindow:function(a){return h.window=a,this},_getRuler:function(a){return new b(a)},_off:function(){return this.__$emitterPrivate.off.apply(this.__$emitterPrivate,Array.prototype.slice.apply(arguments)),this},_on:function(){return this.__$emitterPrivate.on.apply(this.__$emitterPrivate,Array.prototype.slice.apply(arguments)),this},_one:function(){return this.__$emitterPrivate.one.apply(this.__$emitterPrivate,Array.prototype.slice.apply(arguments)),this},_plugin:function(b){var c=this;if("string"==typeof b){var d=b,e=null;return d.indexOf(".")>0?e=c.__plugins[d]:a.each(c.__plugins,function(a,b){return b.name.substring(b.name.length-d.length-1)=="."+d?(e=b,!1):void 0}),e}if(b.name.indexOf(".")<0)throw new Error("Plugins must be namespaced");return c.__plugins[b.name]=b,b.core&&c.__bridge(b.core,c,b.name),this},_trigger:function(){var a=Array.prototype.slice.apply(arguments);return"string"==typeof a[0]&&(a[0]={type:a[0]}),this.__$emitterPrivate.trigger.apply(this.__$emitterPrivate,a),this.__$emitterPublic.trigger.apply(this.__$emitterPublic,a),this},instances:function(b){var c=[],d=b||".tooltipstered";return a(d).each(function(){var b=a(this),d=b.data("tooltipster-ns");d&&a.each(d,function(a,d){c.push(b.data(d))})}),c},instancesLatest:function(){return this.__instancesLatestArr},off:function(){return this.__$emitterPublic.off.apply(this.__$emitterPublic,Array.prototype.slice.apply(arguments)),this},on:function(){return this.__$emitterPublic.on.apply(this.__$emitterPublic,Array.prototype.slice.apply(arguments)),this},one:function(){return this.__$emitterPublic.one.apply(this.__$emitterPublic,Array.prototype.slice.apply(arguments)),this},origins:function(b){var c=b?b+" ":"";return a(c+".tooltipstered").toArray()},setDefaults:function(b){return a.extend(f,b),this},triggerHandler:function(){return this.__$emitterPublic.triggerHandler.apply(this.__$emitterPublic,Array.prototype.slice.apply(arguments)),this}},a.tooltipster=new i,a.Tooltipster=function(b,c){this.__callbacks={close:[],open:[]},this.__closingTime,this.__Content,this.__contentBcr,this.__destroyed=!1,this.__$emitterPrivate=a({}),this.__$emitterPublic=a({}),this.__enabled=!0,this.__garbageCollector,this.__Geometry,this.__lastPosition,this.__namespace="tooltipster-"+Math.round(1e6*Math.random()),this.__options,this.__$originParents,this.__pointerIsOverOrigin=!1,this.__previousThemes=[],this.__state="closed",this.__timeouts={close:[],open:null},this.__touchEvents=[],this.__tracker=null,this._$origin,this._$tooltip,this.__init(b,c)},a.Tooltipster.prototype={__init:function(b,c){var d=this;if(d._$origin=a(b),d.__options=a.extend(!0,{},f,c),d.__optionsFormat(),!h.IE||h.IE>=d.__options.IEmin){var e=null;if(void 0===d._$origin.data("tooltipster-initialTitle")&&(e=d._$origin.attr("title"),void 0===e&&(e=null),d._$origin.data("tooltipster-initialTitle",e)),null!==d.__options.content)d.__contentSet(d.__options.content);else{var g,i=d._$origin.attr("data-tooltip-content");i&&(g=a(i)),g&&g[0]?d.__contentSet(g.first()):d.__contentSet(e)}d._$origin.removeAttr("title").addClass("tooltipstered"),d.__prepareOrigin(),d.__prepareGC(),a.each(d.__options.plugins,function(a,b){d._plug(b)}),h.hasTouchCapability&&a(h.window.document.body).on("touchmove."+d.__namespace+"-triggerOpen",function(a){d._touchRecordEvent(a)}),d._on("created",function(){d.__prepareTooltip()})._on("repositioned",function(a){d.__lastPosition=a.position})}else d.__options.disabled=!0},__contentInsert:function(){var a=this,b=a._$tooltip.find(".tooltipster-content"),c=a.__Content,d=function(a){c=a};return a._trigger({type:"format",content:a.__Content,format:d}),a.__options.functionFormat&&(c=a.__options.functionFormat.call(a,a,{origin:a._$origin[0]},a.__Content)),"string"!=typeof c||a.__options.contentAsHTML?b.empty().append(c):b.text(c),a},__contentSet:function(b){return b instanceof a&&this.__options.contentCloning&&(b=b.clone(!0)),this.__Content=b,this._trigger({type:"updated",content:b}),this},__destroyError:function(){throw new Error("This tooltip has been destroyed and cannot execute your method call.")},__geometry:function(){var b=this,c=b._$origin,d=b._$origin.is("area");if(d){var e=b._$origin.parent().attr("name");c=a('img[usemap="#'+e+'"]')}var f=c[0].getBoundingClientRect(),g=a(h.window.document),i=a(h.window),j=c,k={available:{document:null,window:null},document:{size:{height:g.height(),width:g.width()}},window:{scroll:{left:h.window.scrollX||h.window.document.documentElement.scrollLeft,top:h.window.scrollY||h.window.document.documentElement.scrollTop},size:{height:i.height(),width:i.width()}},origin:{fixedLineage:!1,offset:{},size:{height:f.bottom-f.top,width:f.right-f.left},usemapImage:d?c[0]:null,windowOffset:{bottom:f.bottom,left:f.left,right:f.right,top:f.top}}};if(d){var l=b._$origin.attr("shape"),m=b._$origin.attr("coords");if(m&&(m=m.split(","),a.map(m,function(a,b){m[b]=parseInt(a)})),"default"!=l)switch(l){case"circle":var n=m[0],o=m[1],p=m[2],q=o-p,r=n-p;k.origin.size.height=2*p,k.origin.size.width=k.origin.size.height,k.origin.windowOffset.left+=r,k.origin.windowOffset.top+=q;break;case"rect":var s=m[0],t=m[1],u=m[2],v=m[3];k.origin.size.height=v-t,k.origin.size.width=u-s,k.origin.windowOffset.left+=s,k.origin.windowOffset.top+=t;break;case"poly":for(var w=0,x=0,y=0,z=0,A="even",B=0;B<m.length;B++){var C=m[B];"even"==A?(C>y&&(y=C,0===B&&(w=y)),w>C&&(w=C),A="odd"):(C>z&&(z=C,1==B&&(x=z)),x>C&&(x=C),A="even")}k.origin.size.height=z-x,k.origin.size.width=y-w,k.origin.windowOffset.left+=w,k.origin.windowOffset.top+=x}}var D=function(a){k.origin.size.height=a.height,k.origin.windowOffset.left=a.left,k.origin.windowOffset.top=a.top,k.origin.size.width=a.width};for(b._trigger({type:"geometry",edit:D,geometry:{height:k.origin.size.height,left:k.origin.windowOffset.left,top:k.origin.windowOffset.top,width:k.origin.size.width}}),k.origin.windowOffset.right=k.origin.windowOffset.left+k.origin.size.width,k.origin.windowOffset.bottom=k.origin.windowOffset.top+k.origin.size.height,k.origin.offset.left=k.origin.windowOffset.left+k.window.scroll.left,k.origin.offset.top=k.origin.windowOffset.top+k.window.scroll.top,k.origin.offset.bottom=k.origin.offset.top+k.origin.size.height,k.origin.offset.right=k.origin.offset.left+k.origin.size.width,k.available.document={bottom:{height:k.document.size.height-k.origin.offset.bottom,width:k.document.size.width},left:{height:k.document.size.height,width:k.origin.offset.left},right:{height:k.document.size.height,width:k.document.size.width-k.origin.offset.right},top:{height:k.origin.offset.top,width:k.document.size.width}},k.available.window={bottom:{height:Math.max(k.window.size.height-Math.max(k.origin.windowOffset.bottom,0),0),width:k.window.size.width},left:{height:k.window.size.height,width:Math.max(k.origin.windowOffset.left,0)},right:{height:k.window.size.height,width:Math.max(k.window.size.width-Math.max(k.origin.windowOffset.right,0),0)},top:{height:Math.max(k.origin.windowOffset.top,0),width:k.window.size.width}};"html"!=j[0].tagName.toLowerCase();){if("fixed"==j.css("position")){k.origin.fixedLineage=!0;break}j=j.parent()}return k},__optionsFormat:function(){return"number"==typeof this.__options.animationDuration&&(this.__options.animationDuration=[this.__options.animationDuration,this.__options.animationDuration]),"number"==typeof this.__options.delay&&(this.__options.delay=[this.__options.delay,this.__options.delay]),"number"==typeof this.__options.delayTouch&&(this.__options.delayTouch=[this.__options.delayTouch,this.__options.delayTouch]),"string"==typeof this.__options.theme&&(this.__options.theme=[this.__options.theme]),null===this.__options.parent?this.__options.parent=a(h.window.document.body):"string"==typeof this.__options.parent&&(this.__options.parent=a(this.__options.parent)),"hover"==this.__options.trigger?(this.__options.triggerOpen={mouseenter:!0,touchstart:!0},this.__options.triggerClose={mouseleave:!0,originClick:!0,touchleave:!0}):"click"==this.__options.trigger&&(this.__options.triggerOpen={click:!0,tap:!0},this.__options.triggerClose={click:!0,tap:!0}),this._trigger("options"),this},__prepareGC:function(){var b=this;return b.__options.selfDestruction?b.__garbageCollector=setInterval(function(){var c=(new Date).getTime();b.__touchEvents=a.grep(b.__touchEvents,function(a,b){return c-a.time>6e4}),d(b._$origin)||b.close(function(){b.destroy()})},2e4):clearInterval(b.__garbageCollector),b},__prepareOrigin:function(){var a=this;if(a._$origin.off("."+a.__namespace+"-triggerOpen"),h.hasTouchCapability&&a._$origin.on("touchstart."+a.__namespace+"-triggerOpen touchend."+a.__namespace+"-triggerOpen touchcancel."+a.__namespace+"-triggerOpen",function(b){a._touchRecordEvent(b)}),a.__options.triggerOpen.click||a.__options.triggerOpen.tap&&h.hasTouchCapability){var b="";a.__options.triggerOpen.click&&(b+="click."+a.__namespace+"-triggerOpen "),a.__options.triggerOpen.tap&&h.hasTouchCapability&&(b+="touchend."+a.__namespace+"-triggerOpen"),a._$origin.on(b,function(b){a._touchIsMeaningfulEvent(b)&&a._open(b)})}if(a.__options.triggerOpen.mouseenter||a.__options.triggerOpen.touchstart&&h.hasTouchCapability){var b="";a.__options.triggerOpen.mouseenter&&(b+="mouseenter."+a.__namespace+"-triggerOpen "),a.__options.triggerOpen.touchstart&&h.hasTouchCapability&&(b+="touchstart."+a.__namespace+"-triggerOpen"),a._$origin.on(b,function(b){!a._touchIsTouchEvent(b)&&a._touchIsEmulatedEvent(b)||(a.__pointerIsOverOrigin=!0,a._openShortly(b))})}if(a.__options.triggerClose.mouseleave||a.__options.triggerClose.touchleave&&h.hasTouchCapability){var b="";a.__options.triggerClose.mouseleave&&(b+="mouseleave."+a.__namespace+"-triggerOpen "),a.__options.triggerClose.touchleave&&h.hasTouchCapability&&(b+="touchend."+a.__namespace+"-triggerOpen touchcancel."+a.__namespace+"-triggerOpen"),a._$origin.on(b,function(b){a._touchIsMeaningfulEvent(b)&&(a.__pointerIsOverOrigin=!1)})}return a},__prepareTooltip:function(){var b=this,c=b.__options.interactive?"auto":"";return b._$tooltip.attr("id",b.__namespace).css({"pointer-events":c,zIndex:b.__options.zIndex}),a.each(b.__previousThemes,function(a,c){b._$tooltip.removeClass(c)}),a.each(b.__options.theme,function(a,c){b._$tooltip.addClass(c)}),b.__previousThemes=a.merge([],b.__options.theme),b},__scrollHandler:function(b){var c=this;if(c.__options.triggerClose.scroll)c._close(b);else if(d(c._$origin)&&d(c._$tooltip)){var e=null;if(b.target===h.window.document)c.__Geometry.origin.fixedLineage||c.__options.repositionOnScroll&&c.reposition(b);else{e=c.__geometry();var f=!1;if("fixed"!=c._$origin.css("position")&&c.__$originParents.each(function(b,c){var d=a(c),g=d.css("overflow-x"),h=d.css("overflow-y");if("visible"!=g||"visible"!=h){var i=c.getBoundingClientRect();if("visible"!=g&&(e.origin.windowOffset.left<i.left||e.origin.windowOffset.right>i.right))return f=!0,!1;if("visible"!=h&&(e.origin.windowOffset.top<i.top||e.origin.windowOffset.bottom>i.bottom))return f=!0,!1}return"fixed"==d.css("position")?!1:void 0}),f)c._$tooltip.css("visibility","hidden");else if(c._$tooltip.css("visibility","visible"),c.__options.repositionOnScroll)c.reposition(b);else{var g=e.origin.offset.left-c.__Geometry.origin.offset.left,i=e.origin.offset.top-c.__Geometry.origin.offset.top;c._$tooltip.css({left:c.__lastPosition.coord.left+g,top:c.__lastPosition.coord.top+i})}}c._trigger({type:"scroll",event:b,geo:e})}return c},__stateSet:function(a){return this.__state=a,this._trigger({type:"state",state:a}),this},__timeoutsClear:function(){return clearTimeout(this.__timeouts.open),this.__timeouts.open=null,a.each(this.__timeouts.close,function(a,b){clearTimeout(b)}),this.__timeouts.close=[],this},__trackerStart:function(){var a=this,b=a._$tooltip.find(".tooltipster-content");return a.__options.trackTooltip&&(a.__contentBcr=b[0].getBoundingClientRect()),a.__tracker=setInterval(function(){if(d(a._$origin)&&d(a._$tooltip)){if(a.__options.trackOrigin){var e=a.__geometry(),f=!1;c(e.origin.size,a.__Geometry.origin.size)&&(a.__Geometry.origin.fixedLineage?c(e.origin.windowOffset,a.__Geometry.origin.windowOffset)&&(f=!0):c(e.origin.offset,a.__Geometry.origin.offset)&&(f=!0)),f||(a.__options.triggerClose.mouseleave?a._close():a.reposition())}if(a.__options.trackTooltip){var g=b[0].getBoundingClientRect();g.height===a.__contentBcr.height&&g.width===a.__contentBcr.width||(a.reposition(),a.__contentBcr=g)}}else a._close()},a.__options.trackerInterval),a},_close:function(b,c,d){var e=this,f=!0;if(e._trigger({type:"close",event:b,stop:function(){f=!1}}),f||d){c&&e.__callbacks.close.push(c),e.__callbacks.open=[],e.__timeoutsClear();var g=function(){a.each(e.__callbacks.close,function(a,c){c.call(e,e,{event:b,origin:e._$origin[0]})}),e.__callbacks.close=[]};if("closed"!=e.__state){var i=!0,j=new Date,k=j.getTime(),l=k+e.__options.animationDuration[1];if("disappearing"==e.__state&&l>e.__closingTime&&e.__options.animationDuration[1]>0&&(i=!1),i){e.__closingTime=l,"disappearing"!=e.__state&&e.__stateSet("disappearing");var m=function(){clearInterval(e.__tracker),e._trigger({type:"closing",event:b}),e._$tooltip.off("."+e.__namespace+"-triggerClose").removeClass("tooltipster-dying"),a(h.window).off("."+e.__namespace+"-triggerClose"),e.__$originParents.each(function(b,c){a(c).off("scroll."+e.__namespace+"-triggerClose")}),e.__$originParents=null,a(h.window.document.body).off("."+e.__namespace+"-triggerClose"),e._$origin.off("."+e.__namespace+"-triggerClose"),e._off("dismissable"),e.__stateSet("closed"),e._trigger({type:"after",event:b}),e.__options.functionAfter&&e.__options.functionAfter.call(e,e,{event:b,origin:e._$origin[0]}),g()};h.hasTransitions?(e._$tooltip.css({"-moz-animation-duration":e.__options.animationDuration[1]+"ms","-ms-animation-duration":e.__options.animationDuration[1]+"ms","-o-animation-duration":e.__options.animationDuration[1]+"ms","-webkit-animation-duration":e.__options.animationDuration[1]+"ms","animation-duration":e.__options.animationDuration[1]+"ms","transition-duration":e.__options.animationDuration[1]+"ms"}),e._$tooltip.clearQueue().removeClass("tooltipster-show").addClass("tooltipster-dying"),e.__options.animationDuration[1]>0&&e._$tooltip.delay(e.__options.animationDuration[1]),e._$tooltip.queue(m)):e._$tooltip.stop().fadeOut(e.__options.animationDuration[1],m)}}else g()}return e},_off:function(){return this.__$emitterPrivate.off.apply(this.__$emitterPrivate,Array.prototype.slice.apply(arguments)),this},_on:function(){return this.__$emitterPrivate.on.apply(this.__$emitterPrivate,Array.prototype.slice.apply(arguments)),this},_one:function(){return this.__$emitterPrivate.one.apply(this.__$emitterPrivate,Array.prototype.slice.apply(arguments)),this},_open:function(b,c){var e=this;if(!e.__destroying&&d(e._$origin)&&e.__enabled){var f=!0;if("closed"==e.__state&&(e._trigger({type:"before",event:b,stop:function(){f=!1}}),f&&e.__options.functionBefore&&(f=e.__options.functionBefore.call(e,e,{event:b,origin:e._$origin[0]}))),f!==!1&&null!==e.__Content){c&&e.__callbacks.open.push(c),e.__callbacks.close=[],e.__timeoutsClear();var g,i=function(){"stable"!=e.__state&&e.__stateSet("stable"),a.each(e.__callbacks.open,function(a,b){b.call(e,e,{origin:e._$origin[0],tooltip:e._$tooltip[0]})}),e.__callbacks.open=[]};if("closed"!==e.__state)g=0,"disappearing"===e.__state?(e.__stateSet("appearing"),h.hasTransitions?(e._$tooltip.clearQueue().removeClass("tooltipster-dying").addClass("tooltipster-show"),e.__options.animationDuration[0]>0&&e._$tooltip.delay(e.__options.animationDuration[0]),e._$tooltip.queue(i)):e._$tooltip.stop().fadeIn(i)):"stable"==e.__state&&i();else{if(e.__stateSet("appearing"),g=e.__options.animationDuration[0],e.__contentInsert(),e.reposition(b,!0),h.hasTransitions?(e._$tooltip.addClass("tooltipster-"+e.__options.animation).addClass("tooltipster-initial").css({"-moz-animation-duration":e.__options.animationDuration[0]+"ms","-ms-animation-duration":e.__options.animationDuration[0]+"ms","-o-animation-duration":e.__options.animationDuration[0]+"ms","-webkit-animation-duration":e.__options.animationDuration[0]+"ms","animation-duration":e.__options.animationDuration[0]+"ms","transition-duration":e.__options.animationDuration[0]+"ms"}),setTimeout(function(){"closed"!=e.__state&&(e._$tooltip.addClass("tooltipster-show").removeClass("tooltipster-initial"),e.__options.animationDuration[0]>0&&e._$tooltip.delay(e.__options.animationDuration[0]),e._$tooltip.queue(i))},0)):e._$tooltip.css("display","none").fadeIn(e.__options.animationDuration[0],i),e.__trackerStart(),a(h.window).on("resize."+e.__namespace+"-triggerClose",function(b){var c=a(document.activeElement);(c.is("input")||c.is("textarea"))&&a.contains(e._$tooltip[0],c[0])||e.reposition(b)}).on("scroll."+e.__namespace+"-triggerClose",function(a){e.__scrollHandler(a)}),e.__$originParents=e._$origin.parents(),e.__$originParents.each(function(b,c){a(c).on("scroll."+e.__namespace+"-triggerClose",function(a){e.__scrollHandler(a)})}),e.__options.triggerClose.mouseleave||e.__options.triggerClose.touchleave&&h.hasTouchCapability){e._on("dismissable",function(a){a.dismissable?a.delay?(m=setTimeout(function(){e._close(a.event)},a.delay),e.__timeouts.close.push(m)):e._close(a):clearTimeout(m)});var j=e._$origin,k="",l="",m=null;e.__options.interactive&&(j=j.add(e._$tooltip)),e.__options.triggerClose.mouseleave&&(k+="mouseenter."+e.__namespace+"-triggerClose ",l+="mouseleave."+e.__namespace+"-triggerClose "),e.__options.triggerClose.touchleave&&h.hasTouchCapability&&(k+="touchstart."+e.__namespace+"-triggerClose",l+="touchend."+e.__namespace+"-triggerClose touchcancel."+e.__namespace+"-triggerClose"),j.on(l,function(a){if(e._touchIsTouchEvent(a)||!e._touchIsEmulatedEvent(a)){var b="mouseleave"==a.type?e.__options.delay:e.__options.delayTouch;e._trigger({delay:b[1],dismissable:!0,event:a,type:"dismissable"})}}).on(k,function(a){!e._touchIsTouchEvent(a)&&e._touchIsEmulatedEvent(a)||e._trigger({dismissable:!1,event:a,type:"dismissable"})})}e.__options.triggerClose.originClick&&e._$origin.on("click."+e.__namespace+"-triggerClose",function(a){e._touchIsTouchEvent(a)||e._touchIsEmulatedEvent(a)||e._close(a)}),(e.__options.triggerClose.click||e.__options.triggerClose.tap&&h.hasTouchCapability)&&setTimeout(function(){if("closed"!=e.__state){var b="",c=a(h.window.document.body);e.__options.triggerClose.click&&(b+="click."+e.__namespace+"-triggerClose "),e.__options.triggerClose.tap&&h.hasTouchCapability&&(b+="touchend."+e.__namespace+"-triggerClose"),c.on(b,function(b){e._touchIsMeaningfulEvent(b)&&(e._touchRecordEvent(b),e.__options.interactive&&a.contains(e._$tooltip[0],b.target)||e._close(b))}),e.__options.triggerClose.tap&&h.hasTouchCapability&&c.on("touchstart."+e.__namespace+"-triggerClose",function(a){e._touchRecordEvent(a)})}},0),e._trigger("ready"),e.__options.functionReady&&e.__options.functionReady.call(e,e,{origin:e._$origin[0],tooltip:e._$tooltip[0]})}if(e.__options.timer>0){var m=setTimeout(function(){e._close()},e.__options.timer+g);e.__timeouts.close.push(m)}}}return e},_openShortly:function(a){var b=this,c=!0;if("stable"!=b.__state&&"appearing"!=b.__state&&!b.__timeouts.open&&(b._trigger({type:"start",event:a,stop:function(){c=!1}}),c)){var d=0==a.type.indexOf("touch")?b.__options.delayTouch:b.__options.delay;d[0]?b.__timeouts.open=setTimeout(function(){b.__timeouts.open=null,b.__pointerIsOverOrigin&&b._touchIsMeaningfulEvent(a)?(b._trigger("startend"),b._open(a)):b._trigger("startcancel")},d[0]):(b._trigger("startend"),b._open(a))}return b},_optionsExtract:function(b,c){var d=this,e=a.extend(!0,{},c),f=d.__options[b];return f||(f={},a.each(c,function(a,b){var c=d.__options[a];void 0!==c&&(f[a]=c)})),a.each(e,function(b,c){void 0!==f[b]&&("object"!=typeof c||c instanceof Array||null==c||"object"!=typeof f[b]||f[b]instanceof Array||null==f[b]?e[b]=f[b]:a.extend(e[b],f[b]))}),e},_plug:function(b){var c=a.tooltipster._plugin(b);if(!c)throw new Error('The "'+b+'" plugin is not defined');return c.instance&&a.tooltipster.__bridge(c.instance,this,c.name),this},_touchIsEmulatedEvent:function(a){for(var b=!1,c=(new Date).getTime(),d=this.__touchEvents.length-1;d>=0;d--){var e=this.__touchEvents[d];if(!(c-e.time<500))break;e.target===a.target&&(b=!0)}return b},_touchIsMeaningfulEvent:function(a){return this._touchIsTouchEvent(a)&&!this._touchSwiped(a.target)||!this._touchIsTouchEvent(a)&&!this._touchIsEmulatedEvent(a)},_touchIsTouchEvent:function(a){return 0==a.type.indexOf("touch")},_touchRecordEvent:function(a){return this._touchIsTouchEvent(a)&&(a.time=(new Date).getTime(),this.__touchEvents.push(a)),this},_touchSwiped:function(a){for(var b=!1,c=this.__touchEvents.length-1;c>=0;c--){var d=this.__touchEvents[c];if("touchmove"==d.type){b=!0;break}if("touchstart"==d.type&&a===d.target)break}return b},_trigger:function(){var b=Array.prototype.slice.apply(arguments);return"string"==typeof b[0]&&(b[0]={type:b[0]}),b[0].instance=this,b[0].origin=this._$origin?this._$origin[0]:null,b[0].tooltip=this._$tooltip?this._$tooltip[0]:null,this.__$emitterPrivate.trigger.apply(this.__$emitterPrivate,b),a.tooltipster._trigger.apply(a.tooltipster,b),this.__$emitterPublic.trigger.apply(this.__$emitterPublic,b),this},_unplug:function(b){var c=this;if(c[b]){var d=a.tooltipster._plugin(b);d.instance&&a.each(d.instance,function(a,d){c[a]&&c[a].bridged===c[b]&&delete c[a]}),c[b].__destroy&&c[b].__destroy(),delete c[b]}return c},close:function(a){return this.__destroyed?this.__destroyError():this._close(null,a),this},content:function(a){var b=this;if(void 0===a)return b.__Content;if(b.__destroyed)b.__destroyError();else if(b.__contentSet(a),null!==b.__Content){if("closed"!==b.__state&&(b.__contentInsert(),b.reposition(),b.__options.updateAnimation))if(h.hasTransitions){var c=b.__options.updateAnimation;b._$tooltip.addClass("tooltipster-update-"+c),setTimeout(function(){"closed"!=b.__state&&b._$tooltip.removeClass("tooltipster-update-"+c)},1e3)}else b._$tooltip.fadeTo(200,.5,function(){"closed"!=b.__state&&b._$tooltip.fadeTo(200,1)})}else b._close();return b},destroy:function(){var b=this;if(b.__destroyed)b.__destroyError();else{"closed"!=b.__state?b.option("animationDuration",0)._close(null,null,!0):b.__timeoutsClear(),b._trigger("destroy"),b.__destroyed=!0,b._$origin.removeData(b.__namespace).off("."+b.__namespace+"-triggerOpen"),a(h.window.document.body).off("."+b.__namespace+"-triggerOpen");var c=b._$origin.data("tooltipster-ns");if(c)if(1===c.length){var d=null;"previous"==b.__options.restoration?d=b._$origin.data("tooltipster-initialTitle"):"current"==b.__options.restoration&&(d="string"==typeof b.__Content?b.__Content:a("<div></div>").append(b.__Content).html()),d&&b._$origin.attr("title",d),b._$origin.removeClass("tooltipstered"),b._$origin.removeData("tooltipster-ns").removeData("tooltipster-initialTitle")}else c=a.grep(c,function(a,c){return a!==b.__namespace}),b._$origin.data("tooltipster-ns",c);b._trigger("destroyed"),b._off(),b.off(),b.__Content=null,b.__$emitterPrivate=null,b.__$emitterPublic=null,b.__options.parent=null,b._$origin=null,b._$tooltip=null,a.tooltipster.__instancesLatestArr=a.grep(a.tooltipster.__instancesLatestArr,function(a,c){return b!==a}),clearInterval(b.__garbageCollector)}return b},disable:function(){return this.__destroyed?(this.__destroyError(),this):(this._close(),this.__enabled=!1,this)},elementOrigin:function(){return this.__destroyed?void this.__destroyError():this._$origin[0]},elementTooltip:function(){return this._$tooltip?this._$tooltip[0]:null},enable:function(){return this.__enabled=!0,this},hide:function(a){return this.close(a)},instance:function(){return this},off:function(){return this.__destroyed||this.__$emitterPublic.off.apply(this.__$emitterPublic,Array.prototype.slice.apply(arguments)),this},on:function(){return this.__destroyed?this.__destroyError():this.__$emitterPublic.on.apply(this.__$emitterPublic,Array.prototype.slice.apply(arguments)),this},one:function(){return this.__destroyed?this.__destroyError():this.__$emitterPublic.one.apply(this.__$emitterPublic,Array.prototype.slice.apply(arguments)),this},open:function(a){return this.__destroyed?this.__destroyError():this._open(null,a),this},option:function(b,c){return void 0===c?this.__options[b]:(this.__destroyed?this.__destroyError():(this.__options[b]=c,this.__optionsFormat(),a.inArray(b,["trigger","triggerClose","triggerOpen"])>=0&&this.__prepareOrigin(),"selfDestruction"===b&&this.__prepareGC()),this)},reposition:function(a,b){var c=this;return c.__destroyed?c.__destroyError():"closed"!=c.__state&&d(c._$origin)&&(b||d(c._$tooltip))&&(b||c._$tooltip.detach(),c.__Geometry=c.__geometry(),c._trigger({type:"reposition",event:a,helper:{geo:c.__Geometry}})),c},show:function(a){return this.open(a)},status:function(){return{destroyed:this.__destroyed,enabled:this.__enabled,open:"closed"!==this.__state,state:this.__state}},triggerHandler:function(){return this.__destroyed?this.__destroyError():this.__$emitterPublic.triggerHandler.apply(this.__$emitterPublic,Array.prototype.slice.apply(arguments)),this}},a.fn.tooltipster=function(){var b=Array.prototype.slice.apply(arguments),c="You are using a single HTML element as content for several tooltips. You probably want to set the contentCloning option to TRUE.";if(0===this.length)return this;if("string"==typeof b[0]){var d="#*$~&";return this.each(function(){var e=a(this).data("tooltipster-ns"),f=e?a(this).data(e[0]):null;if(!f)throw new Error("You called Tooltipster's \""+b[0]+'" method on an uninitialized element');if("function"!=typeof f[b[0]])throw new Error('Unknown method "'+b[0]+'"');this.length>1&&"content"==b[0]&&(b[1]instanceof a||"object"==typeof b[1]&&null!=b[1]&&b[1].tagName)&&!f.__options.contentCloning&&f.__options.debug&&console.log(c);var g=f[b[0]](b[1],b[2]);return g!==f||"instance"===b[0]?(d=g,!1):void 0}),"#*$~&"!==d?d:this}a.tooltipster.__instancesLatestArr=[];var e=b[0]&&void 0!==b[0].multiple,g=e&&b[0].multiple||!e&&f.multiple,h=b[0]&&void 0!==b[0].content,i=h&&b[0].content||!h&&f.content,j=b[0]&&void 0!==b[0].contentCloning,k=j&&b[0].contentCloning||!j&&f.contentCloning,l=b[0]&&void 0!==b[0].debug,m=l&&b[0].debug||!l&&f.debug;return this.length>1&&(i instanceof a||"object"==typeof i&&null!=i&&i.tagName)&&!k&&m&&console.log(c),this.each(function(){var c=!1,d=a(this),e=d.data("tooltipster-ns"),f=null;e?g?c=!0:m&&(console.log("Tooltipster: one or more tooltips are already attached to the element below. Ignoring."),console.log(this)):c=!0,c&&(f=new a.Tooltipster(this,b[0]),e||(e=[]),e.push(f.__namespace),d.data("tooltipster-ns",e),d.data(f.__namespace,f),f.__options.functionInit&&f.__options.functionInit.call(f,f,{origin:this}),f._trigger("init")),a.tooltipster.__instancesLatestArr.push(f)}),this},b.prototype={__init:function(b){this.__$tooltip=b,this.__$tooltip.css({left:0,overflow:"hidden",position:"absolute",top:0}).find(".tooltipster-content").css("overflow","auto"),this.$container=a('<div class="tooltipster-ruler"></div>').append(this.__$tooltip).appendTo(h.window.document.body)},__forceRedraw:function(){var a=this.__$tooltip.parent();this.__$tooltip.detach(),this.__$tooltip.appendTo(a)},constrain:function(a,b){return this.constraints={width:a,height:b},this.__$tooltip.css({display:"block",height:"",overflow:"auto",width:a}),this},destroy:function(){this.__$tooltip.detach().find(".tooltipster-content").css({display:"",overflow:""}),this.$container.remove()},free:function(){return this.constraints=null,this.__$tooltip.css({display:"",height:"",overflow:"visible",width:""}),this},measure:function(){this.__forceRedraw();var a=this.__$tooltip[0].getBoundingClientRect(),b={size:{height:a.height||a.bottom-a.top,width:a.width||a.right-a.left}};if(this.constraints){var c=this.__$tooltip.find(".tooltipster-content"),d=this.__$tooltip.outerHeight(),e=c[0].getBoundingClientRect(),f={height:d<=this.constraints.height,width:a.width<=this.constraints.width&&e.width>=c[0].scrollWidth-1};b.fits=f.height&&f.width}return h.IE&&h.IE<=11&&b.size.width!==h.window.document.documentElement.clientWidth&&(b.size.width=Math.ceil(b.size.width)+1),b}};var j=navigator.userAgent.toLowerCase();-1!=j.indexOf("msie")?h.IE=parseInt(j.split("msie")[1]):-1!==j.toLowerCase().indexOf("trident")&&-1!==j.indexOf(" rv:11")?h.IE=11:-1!=j.toLowerCase().indexOf("edge/")&&(h.IE=parseInt(j.toLowerCase().split("edge/")[1]))
vendor: 3,979 bytes, lines 28749-28750
28749;var k="tooltipster.sideTip";return a.tooltipster._plugin({name:k,instance:{__defaults:function(){return{arrow:!0,distance:6,functionPosition:null,maxWidth:null,minIntersection:16,minWidth:0,position:null,side:"top",viewportAware:!0}},__init:function(a){var b=this;b.__instance=a,b.__namespace="tooltipster-sideTip-"+Math.round(1e6*Math.random()),b.__previousState="closed",b.__options,b.__optionsFormat(),b.__instance._on("state."+b.__namespace,function(a){"closed"==a.state?b.__close():"appearing"==a.state&&"closed"==b.__previousState&&b.__create(),b.__previousState=a.state}),b.__instance._on("options."+b.__namespace,function(){b.__optionsFormat()}),b.__instance._on("reposition."+b.__namespace,function(a){b.__reposition(a.event,a.helper)})},__close:function(){this.__instance.content()instanceof a&&this.__instance.content().detach(),this.__instance._$tooltip.remove(),this.__instance._$tooltip=null},__create:function(){var b=a('<div class="tooltipster-base tooltipster-sidetip"><div class="tooltipster-box"><div class="tooltipster-content"></div></div><div class="tooltipster-arrow"><div class="tooltipster-arrow-uncropped"><div class="tooltipster-arrow-border"></div><div class="tooltipster-arrow-background"></div></div></div></div>');this.__options.arrow||b.find(".tooltipster-box").css("margin",0).end().find(".tooltipster-arrow").hide(),this.__options.minWidth&&b.css("min-width",this.__options.minWidth+"px"),this.__options.maxWidth&&b.css("max-width",this.__options.maxWidth+"px"),
28750this.__instance._$tooltip=b,this.__instance._trigger("created")},__destroy:function(){this.__instance._off("."+self.__namespace)},__optionsFormat:function(){var b=this;if(b.__options=b.__instance._optionsExtract(k,b.__defaults()),b.__options.position&&(b.__options.side=b.__options.position),"object"!=typeof b.__options.distance&&(b.__options.distance=[b.__options.distance]),b.__options.distance.length<4&&(void 0===b.__options.distance[1]&&(b.__options.distance[1]=b.__options.distance[0]),void 0===b.__options.distance[2]&&(b.__options.distance[2]=b.__options.distance[0]),void 0===b.__options.distance[3]&&(b.__options.distance[3]=b.__options.distance[1]),b.__options.distance={top:b.__options.distance[0],right:b.__options.distance[1],bottom:b.__options.distance[2],left:b.__options.distance[3]}),"string"==typeof b.__options.side){var c={top:"bottom",right:"left",bottom:"top",left:"right"};b.__options.side=[b.__options.side,c[b.__options.side]],"left"==b.__options.side[0]||"right"==b.__options.side[0]?b.__options.side.push("top","bottom"):b.__options.side.push("right","left")}6===a.tooltipster._env.IE&&b.__options.arrow!==!0&&(b.__options.arrow=!1)},__reposition:function(b,c){var d,e=this,f=e.__targetFind(c),g=[];e.__instance._$tooltip.detach();var h=e.__instance._$tooltip.clone(),i=a.tooltipster._getRuler(h),j=!1,k=e.__instance.option("animation");switch(k&&h.removeClass("tooltipster-"+k),a.each(["window","document"],function(d,k){var l=null;if(e.__instance._trigger({container:k,helper:c,satisfied:j,takeTest:function(a){l=a},results:g,type:"positionTest"}),1==l||0!=l&&0==j&&("window"!=k||e.__options.viewportAware))for(var d=0;d<e.__options.side.length;d++){var m={horizontal:0,vertical:0},n=e.__options.side[d];"top"==n||"bottom"==n?m.vertical=e.__options.distance[n]:m.horizontal=e.__options.distance[n],e.__sideChange(h,n),a.each(["natural","constrained"],function(a,d){if(l=null,e.__instance._trigger({container:k,event:b,helper:c,mode:d,results:g,satisfied:j,side:n,takeTest:function(a){l=a},type:"positionTest"}),1==l||0!=l&&0==j){var h={container:k,distance:m,fits:null,mode:d,outerSize:null,side:n,size:null,target:f[n],whole:null},o="natural"==d?i.free():i.constrain(c.geo.available[k][n].width-m.horizontal,c.geo.available[k][n].height-m.vertical),p=o.measure();if(h.size=p.size,h.outerSize={height:p.size.height+m.vertical,width:p.size.width+m.horizontal},"natural"==d?c.geo.available[k][n].width>=h.outerSize.width&&c.geo.available[k][n].height>
28750=h.outerSize.height?h.fits=!0:h.fits=!1:h.fits=p.fits,"window"==k&&(h.fits?"top"==n||"bottom"==n?h.whole=c.geo.origin.windowOffset.right>=e.__options.minIntersection&&c.geo.window.size.width-c.geo.origin.windowOffset.left>=e.__options.minIntersection:h.whole=c.geo.origin.windowOffset.bottom>=e.__options.minIntersection&&c.geo.window.size.height-c.geo.origin.windowOffset.top>=e.__options.minIntersection:h.whole=!1),g.push(h),h.whole)j=!0;else if("natural"==h.mode&&(h.fits||h.size.width<=c.geo.available[k][n].width))return!1}})}}),e.__instance._trigger({edit:function(a){g=a},event:b,helper:c,results:g,type:"positionTested"}),g.sort(function(a,b){if(a.whole&&!b.whole)return-1;if(!a.whole&&b.whole)return 1;if(a.whole&&b.whole){var c=e.__options.side.indexOf(a.side),d=e.__options.side.indexOf(b.side);return d>c?-1:c>d?1:"natural"==a.mode?-1:1}if(a.fits&&!b.fits)return-1;if(!a.fits&&b.fits)return 1;if(a.fits&&b.fits){var c=e.__options.side.indexOf(a.side),d=e.__options.side.indexOf(b.side);return d>c?-1:c>d?1:"natural"==a.mode?-1:1}return"document"==a.container&&"bottom"==a.side&&"natural"==a.mode?-1:1}),d=g[0],d.coord={},d.side){case"left":case"right":d.coord.top=Math.floor(d.target-d.size.height/2);break;case"bottom":case"top":d.coord.left=Math.floor(d.target-d.size.width/2)}switch(d.side){case"left":d.coord.left=c.geo.origin.windowOffset.left-d.outerSize.width;break;case"right":d.coord.left=c.geo.origin.windowOffset.right+d.distance.horizontal;break;case"top":d.coord.top=c.geo.origin.windowOffset.top-d.outerSize.height;break;case"bottom":d.coord.top=c.geo.origin.windowOffset.bottom+d.distance.vertical}"window"==d.container?"top"==d.side||"bottom"==d.side?d.coord.left<0?c.geo.origin.windowOffset.right-this.__options.minIntersection>=0?d.coord.left=0:d.coord.left=c.geo.origin.windowOffset.right-this.__options.minIntersection-1:d.coord.left>c.geo.window.size.width-d.size.width&&(c.geo.origin.windowOffset.left+this.__options.minIntersection<=c.geo.window.size.width?d.coord.left=c.geo.window.size.width-d.size.width:d.coord.left=c.geo.origin.windowOffset.left+this.__options.minIntersection+1-d.size.width):d.coord.top<0?c.geo.origin.windowOffset.bottom-this.__options.minIntersection>=0?d.coord.top=0:d.coord.top=c.geo.origin.windowOffset.bottom-this.__options.minIntersection-1:d.coord.top>c.geo.window.size.height-d.size.height&&(c.geo.origin.windowOffset.top+this.__options.minIntersection<=c.geo.window.size.height?d.coord.top=c.geo.window.size.height-d.size.height:d.coord.top=c.geo.origin.windowOffset.top+this.__options.minIntersection+1-d.size.height):(d.coord.left>c.geo.window.size.width-d.size.width&&(d.coord.left=c.geo.window.size.width-d.size.width),d.coord.left<0&&(d.coord.left=0)),e.__sideChange(h,d.side),c.tooltipClone=h[0],c.tooltipParent=e.__instance.option("parent").parent[0],c.mode=d.mode,c.whole=d.whole,c.origin=e.__instance._$origin[0],c.tooltip=e.__instance._$tooltip[0],delete d.container,delete d.fits,delete d.mode,delete d.outerSize,delete d.whole,d.distance=d.distance.horizontal||d.distance.vertical;var l=a.extend(!0,{},d);if(e.__instance._trigger({edit:function(a){d=a},event:b,helper:c,position:l,type:"position"}),e.__options.functionPosition){var m=e.__options.functionPosition.call(e,e.__instance,c,l);m&&(d=m)}i.destroy();var n,o;"top"==d.side||"bottom"==d.side?(n={prop:"left",val:d.target-d.coord.left},o=d.size.width-this.__options.minIntersection):(n={prop:"top",val:d.target-d.coord.top},o=d.size.height-this.__options.minIntersection),n.val<this.__options.minIntersection?n.val=this.__options.minIntersection:n.val>o&&(n.val=o);var p;p=c.geo.origin.fixedLineage?c.geo.origin.windowOffset:{left:c.geo.origin.windowOffset.left+c.geo.window.scroll.left,top:c.geo.origin.windowOffset.top+c.geo.window.scroll.top},d.coord={left:p.left+(d.coord.left-c.geo.origin.windowOffset.left),top:p.top+(d.coord.top-c.geo.origin.windowOffset.top)},e.__sideChange(e.__instance._$tooltip,d.side),c.geo.origin.fixedLineage?e.__instance._$tooltip.css("position","fixed"):e.__instance._$tooltip.css("position",""),e.__instance._$tooltip.css({left:d.coord.left,top:d.coord.top,height:d.size.height,width:d.size.width}).find(".tooltipster-arrow").css({left:"",top:""}).css(n.prop,n.val),e.__instance._$tooltip.appendTo(e.__instance.option("parent")),e.__instance._trigger({type:"repositioned",event:b,position:d})},__sideChange:function(a,b){a.removeClass("tooltipster-bottom").removeClass("tooltipster-left").removeClass("tooltipster-right").removeClass("tooltipster-top").addClass("tooltipster-"+b)},__targetFind:function(a){var b={},c=this.__instance._$origin[0].getClientRects();if(c.length>1){var d=this.__instance._$origin.css("opacity");1==d&&(this.__instance._$origin.css("opacity",.99),c=this.__instance._$origin[0].getClientRects(),this.__instance._$origin.css("opacity",1))}if(c.length<2)b.top=Math.floor(a.geo.origin.windowOffset.left+a.geo.origin.size.width/2),b.bottom=b.top,b.left=Math.floor(a.geo.origin.windowOffset.top+a.geo.origin.size.height/2),b.right=b.left;else{var e=c[0];b.top=Math.floor(e.left+(e.right-e.left)/2),e=c.length>2?c[Math.ceil(c.length/2)-1]:c[0],b.right=Math.floor(e.top+(e.bottom-e.top)/2),e=c[c.length-1],b.bottom=Math.floor(e.left+(e.right-e.left)/2),e=c.length>2?c[Math.ceil((c.length+1)/2)-1]:c[c.length-1],b.left=Math.floor(e.top+(e.bottom-e.top)/2)}return b}}}),a});
28751/* tooltipster-follower v0.1.5 */
28752!function(a,b){"function"==typeof define&&define.amd?define(["tooltipster"],function(a){return b(a)}):"object"==typeof exports?module.exports=b(require("tooltipster")):b(jQuery)}(this,function(a){var b="laa.follower";return a.tooltipster._plugin({name:b,instance:{__defaults:function(){return{anchor:"top-left",maxWidth:null,minWidth:0,offset:[15,-15]}},__init:function(a){var b=this;return b.__displayed,b.__helper,b.__initialROS=a.option("repositionOnScroll"),b.__instance=a,b.__latestMouseEvent,b.__namespace="tooltipster-follower-"+Math.round(1e6*Math.random()),b.__openingTouchEnded,b.__pointerPosition,b.__previousState="closed",b.__size,b.__options,b.__initialROS||b.__instance.option("repositionOnScroll",!0),b.__optionsFormat(),b.__instance._on("destroy."+b.__namespace,function(){b.__destroy()}),b.__instance._on("options."+b.__namespace,function(){b.__optionsFormat()}),b.__instance._on("reposition."+b.__namespace,function(a){b.__reposition(a.event,a.helper)}),b.__instance._on("start."+b.__namespace,function(a){b.__instance._$origin.on("mousemove."+b.__namespace,function(a){b.__latestMouseEvent=a})}),b.__instance._one("startend."+b.__namespace+" startcancel."+b.__namespace,function(a){b.__instance._$origin.off("mousemove."+b.__namespace),"startcancel"==a.type&&(b.__latestMouseEvent=null)}),b.__instance._on("state."+b.__namespace,function(a){"closed"==a.state?b.__close():"appearing"==a.state&&"closed"==b.__previousState&&b.__create(),b.__previousState=a.state}),b},__close:function(){return"object"==typeof this.__instance.content()&&null!==this.__instance.content()&&this.__instance.content().detach(),this.__instance._$tooltip.remove(),this.__instance._$tooltip=null,a(a.tooltipster._env.window.document).off("."+this.__namespace),this.__latestMouseEvent=null,this},__create:function(){var b=this,c=a('<div class="tooltipster-base tooltipster-follower"><div class="tooltipster-box"><div class="tooltipster-content"></div></div></div>'),d=a(a.tooltipster._env.window.document);b.__options.minWidth&&c.css("min-width",b.__options.minWidth+"px"),b.__options.maxWidth&&c.css("max-width",b.__options.maxWidth+"px"),b.__instance._$tooltip=c,b.__displayed=!1,b.__openingTouchEnded=!1,d.on("mousemove."+b.__namespace,function(a){b.__openingTouchEnded&&b.__displayed||b.__follow(a)});var e=b.__instance.option("triggerClose");return e.tap&&d.on("touchend."+b.__namespace+" touchcancel."+b.__namespace,function(a){b.__openingTouchEnded=!0}),b.__instance._trigger("created"),b},__destroy:function(){return this.__instance._off("."+this.__namespace),this.__initialROS||this.__instance.option("repositionOnScroll",!1),this},__follow:function(b){if(b?this.__latestMouseEvent=b:this.__latestMouseEvent&&(b=this.__latestMouseEvent),b){this.__displayed=!0;var c={},d=this.__options.anchor,e=a.merge([],this.__options.offset);switch(this.__helper.geo.window.scroll={left:a.tooltipster._env.window.scrollX||a.tooltipster._env.window.document.documentElement.scrollLeft,top:a.tooltipster._env.window.scrollY||a.tooltipster._env.window.document.documentElement.scrollTop},d){case"top-left":case"left-center":case"bottom-left":c.left=b.pageX+e[0];break;case"top-center":case"bottom-center":c.left=b.pageX+e[0]-this.__size.width/2;break;case"top-right":case"right-center":case"bottom-right":c.left=b.pageX+e[0]-this.__size.width;break;default:console.log("Wrong anchor value")}switch(d){case"top-left":case"top-center":case"top-right":c.top=b.pageY-e[1];break;case"left-center":case"right-center":c.top=b.pageY-e[1]-this.__size.height/2;break;case"bottom-left":case"bottom-center":case"bottom-right":c.top=b.pageY-e[1]-this.__size.height}if("left-center"==d||"right-center"==d){if("right-center"==d)c.left<this.__helper.geo.window.scroll.left&&(b.pageX-e[0]+this.__size.width<=this.__helper.geo.window.scroll.left+this.__helper.geo.window.size.width?(d="left-center",e[0]=-e[0],c.left=b.pageX+e[0]):(d="top-right",e[1]=e[0],c={left:0,top:b.pageY-e[1]}));else if(c.left+this.__size.width>this.__helper.geo.window.scroll.left+this.__helper.geo.window.size.width){var f=b.pageX-e[0]-this.__size.width;f>=0?(d="right-center",e[0]=-e[0],c.left=f):(d="top-left",e[1]=-e[0],c={left:b.pageX+e[0],top:b.pageY-e[1]})}c.top+this.__size.height>this.__helper.geo.window.scroll.top+this.__helper.geo.window.size.height&&(c.top=this.__helper.geo.window.scroll.top+this.__helper.geo.window.size.height-this.__size.height),c.top<this.__helper.geo.window.scroll.top&&(c.top=this.__helper.geo.window.scroll.top),c.top+this.__size.height>this.__helper.geo.document.size.height&&(c.top=this.__helper.geo.document.size.height-this.__size.height),c.top<0&&(c.top=0)}if("left-center"!=d&&"right-center"!=d){c.left+this.__size.width>this.__helper.geo.window.scroll.left+this.__helper.geo.window.size.width&&(c.left=this.__helper.geo.window.scroll.left+this.__helper.geo.window.size.width-this.__size.width),c.left<0&&(c.left=0);var g=b.pageY-this.__helper.geo.window.scroll.top;if(0==d.indexOf("bottom"))c.top<this.__helper.geo.window.scroll.top&&(c.top<0||g<this.__helper.geo.window.size.height-g&&b.pageY+e[1]+this.__size.height<=this.__helper.geo.document.size.height)&&(c.top=b.pageY+e[1]);else{var h=c.top+this.__size.height;if(h>this.__helper.geo.window.scroll.top+this.__helper.geo.window.size.height&&(g>this.__helper.geo.window.size.height-g||g-e[1]+this.__size.height<=this.__helper.geo.document.size.height)){var i=b.pageY+e[1]-this.__size.height;i>=0&&(c.top=i)}}}this.__helper.geo.origin.fixedLineage&&(c.left-=this.__helper.geo.window.scroll.left,c.top-=this.__helper.geo.window.scroll.top);
28752var j={coord:c};this.__instance._trigger({edit:function(a){j=a},event:b,helper:this.__helper,position:a.extend(!0,{},j),type:"follow"}),this.__instance._$tooltip.css({left:j.coord.left,top:j.coord.top}).show()}else this.__instance._$tooltip.hide();return this},__optionsFormat:function(){return this.__options=this.__instance._optionsExtract(b,this.__defaults()),this},__reposition:function(b,c){var d=this,e=d.__instance._$tooltip.clone(),f=a.tooltipster._getRuler(e),g=d.__instance.option("animation");g&&e.removeClass("tooltipster-"+g);var h=f.free().measure(),i={size:h.size};c.geo.origin.fixedLineage?d.__instance._$tooltip.css("position","fixed"):d.__instance._$tooltip.css("position",""),d.__instance._trigger({edit:function(a){i=a},event:b,helper:c,position:a.extend(!0,{},i),tooltipClone:e[0],type:"position"}),f.destroy(),d.__helper=c,d.__size=i.size,d.__instance._$tooltip.css({height:i.size.height,width:i.size.width});var j=a.tooltipster._env.IE&&"click"===b.type?b:null;return d.__follow(j),d.__instance._$tooltip.appendTo(d.__instance.option("parent")),d.__instance._trigger({type:"repositioned",event:b,position:{coord:{left:0,top:0},size:i.size}}),this}}}),a}); 
28753
28754/* ========================================
28755 FILE: /modules/mod_wishlist_new/mod_wishlist_new.js
28756 ==================== */
28757
28758// global vars
28759var wishlist_new_count = 0;
28760
28761(function () {
28762	script_manage_params = typeof script_manage_params === 'object' ? script_manage_params : {};
28763
28764	var params = {
28765		'wishlist': typeof script_manage_params.wishlist !== 'undefined' && script_manage_params.wishlist != 0 ? JSON.parse(script_manage_params.wishlist) : {},
28766		'ph_id':    typeof script_manage_params.ph_id !== 'undefined' ? script_manage_params.ph_id : ''
28767	};
28768
28769	window.onload = function () {
28770		js_wishlist_new_check_after_page_load();
28771
28772		jQuery(document).on('addToWishlist removeFromWishlist', function(event, data) {
28773			if (typeof data !== 'undefined' && data.after_js) {
28774				eval(data.after_js);
28775			}
28776		});
28777	};
28778
28779	window.js_wishlist_new_check_after_page_load = function() {
28780		var my_id        = params.ph_id;
28781		var wishlist_new = params.wishlist;
28782
28783		if (my_id == 0) {
28784			wishlist_new = '';
28785			if ( Cookies.get('wishlist') !== undefined ) { wishlist_new = Cookies.get('wishlist'); }
28786			wishlist_new = wishlist_new.split(",");
28787			if (wishlist_new.length == 1 && wishlist_new[0] == '') wishlist_new = [];
28788		}
28789
28790		wishlist_new_count = wishlist_new.length;
28791
28792		for (i in wishlist_new) {
28793			if (wishlist_new.hasOwnProperty(i)) {
28794				var el = jQuery('.flypage_wishlist_'+wishlist_new[i]);
28795				el.find('.flypage_wishlist_add').hide();
28796				el.find('.flypage_wishlist_delete').show();
28797				el.find('.flypage_wishlist_in_wishlist').show();
28798
28799				if (el.length > 0) {
28800					jQuery('body').addClass('in_wishlist');
28801				}
28802
28803				el.parents('.slick-slide').addClass('product_in_wishlist');
28804
28805				var product_list_elem = jQuery('#product_list').find('.product_id_'+wishlist_new[i]);
28806				product_list_elem.addClass('product_in_wishlist');
28807
28808				const pw_el = jQuery('.product_wishlist_' + wishlist_new[i]);
28809				const slickSlide = pw_el.parents('.slick-slide');
28810				const articleProduct = pw_el.parents('.article_product_listing:first');
28811				const csProductItem = pw_el.parents('.cs_product_item:first');
28812
28813				if (slickSlide.length > 0) {
28814					slickSlide.addClass('product_in_wishlist');
28815				} else if (articleProduct.length > 0) {
28816					articleProduct.addClass('product_in_wishlist');
28817					if (csProductItem.length > 0) {
28818						csProductItem.addClass('product_in_wishlist');
28819					}
28820				} else if (csProductItem.length > 0) {
28821					csProductItem.addClass('product_in_wishlist');
28822				}
28823
28824				const wishlistButton = pw_el.find('a');
28825				const productName = wishlistButton.data('product_name');
28826				let ariaLabel = '';
28827				if (productName != null  && productName !== '') {
28828					let labelLang = js_lang_product_add_to_wishlist_aria_label.replace(':product_name', productName);
28829					ariaLabel = ` aria-label="${labelLang.replace(/&/g, '&amp;').replace(/"/g, '&quot;').replace(/</g, '&lt;').replace(/>/g, '&gt;')}"`;
28830				}
28831
28832				wishlistButton.remove();
28833				pw_el.prepend(`<a class="wishlist_btn_remove"${ariaLabel} href="javascript:void(0)" onclick="return js_wishlist_b_delete_click(this, ` + my_id + ', ' + wishlist_new[i] + ')" title="' + js_lang_wishlist_item_delete + '">' + js_lang_wishlist_item_delete + '</a>');
28834				//jednotlive moduly
28835				var modul_elems = jQuery(' .featured-prod.product_id_' + wishlist_new[i] + ', .module-latest-viewed-item.product_id_' + wishlist_new[i] + ', .related_product1.product_id_' + wishlist_new[i] + ', .related_product2.product_id_' + wishlist_new[i] + ', .related_product3.product_id_' + wishlist_new[i] + '');
28836				modul_elems.addClass('product_in_wishlist');
28837			}
28838		}
28839
28840		if (typeof(js_wishlist_change_count) != 'undefined') { js_wishlist_change_count(); }
28841	};
28842
28843	window.js_wishlist_change = function(typ) {
28844		if (typ == 'add') wishlist_new_count++;
28845		if (typ == 'remove' && wishlist_new_count > 0) wishlist_new_count--;
28846		if (typeof(js_wishlist_change_count) != 'undefined') { js_wishlist_change_count(typ); }
28847	};
28848
28849// ---------- FUNKCIE VOLANE Z MODULU --------------
28850
28851	window.js_wishlist_item_to_cart_click = function(elem, product_id, category_id) {
28852		document.wlnf_addtocart.quantity.value = "1";
28853		document.wlnf_addtocart.category_id.value = category_id;
28854		document.wlnf_addtocart.product_id.value = product_id;
28855		document.wlnf_addtocart.func.value = "cartadd";
28856		document.wlnf_addtocart.submit();
28857	};
28858
28859
28860	window.js_wishlist_item_delete_click = function(elem, user_id, product_id) {
28861		elem = jQuery(elem);
28862
28863		var cookie_wl = '';
28864		if (user_id == 0) {
28865			cookie_wl = Cookies.get('wishlist') || '';
28866			cookie_wl = cookie_wl.split(",");
28867			for (i=cookie_wl.length-1; i>=0; i--) {
28868				if (cookie_wl[i] == product_id) cookie_wl.splice(i, 1);
28869			}
28870			cookie_wl = cookie_wl.toString();
28871			Cookies.set('wishlist', cookie_wl, { expires: 365, path: '/' });
28872		}
28873		var options = {ajax_func: 'item_delete', user_id: user_id, product_id: product_id};
28874
28875		jQuery.post(js_global_live_site+'/modules/mod_wishlist_new/mod_wishlist_new_ajax.php', options, function(r) {
28876			var rdata = JSON.parse(r);
28877			var wlitems = elem.closest('.wishlist_items').get(0);
28878
28879			if ( typeof wlitems !== 'undefined' ) {
28880				wlitems.innerHTML = rdata.wlhtml;
28881			}
28882
28883			var wlpdclass = '.flypage_wishlist_'+rdata.product_id;
28884			var wlbclass = '.product_wishlist_'+rdata.product_id;
28885			if (jQuery(wlpdclass)[0]) {
28886				jQuery('body').removeClass('in_wishlist');
28887				jQuery(wlpdclass).html(rdata.wl_pd_html);
28888			}
28889			jQuery(wlbclass).html(rdata.wl_b_html);
28890			jQuery('.product_id_'+rdata.product_id).removeClass('product_in_wishlist');
28891			jQuery('.product_wishlist_'+rdata.product_id).parents('.slick-slide').removeClass('product_in_wishlist');
28892
28893			//dynamicke ceny pre tripsy
28894			if (typeof _aws != 'undefined' && jQuery('.user_logged_in').length) {
28895				_aws.init('.module-wishlist');
28896			}
28897
28898			js_add_to_cart_form_ajax_cart_bind();
28899
28900			jQuery(document).trigger('removeFromWishlist', [rdata]);
28901		});
28902		js_wishlist_change('remove');
28903	};
28904
28905// ---------- FUNKCIE VOLANE Z DETAILU PRODUKTU --------------
28906
28907	window.js_wishlist_pd_add_click = function(elem, user_id, product_id) {
28908		var $elem = jQuery(elem);
28909
28910		$elem.css('pointer-events', 'none');
28911
28912		var cookie_wl = '';
28913		if (user_id == 0) {
28914			cookie_wl = Cookies.get('wishlist') || '';
28915			if (cookie_wl == null || cookie_wl == '') {
28916				Cookies.set('wishlist', product_id, { expires: 365, path: '/' });
28917			} else {
28918				Cookies.set('wishlist', cookie_wl + ',' + product_id, { expires: 365, path: '/' });
28919			}
28920			cookie_wl = Cookies.get('wishlist') || '';
28921		}
28922
28923		var options = {ajax_func: 'pd_add', user_id: user_id, product_id: product_id, cookie_wl: cookie_wl};
28924
28925		jQuery.post(js_global_live_site+'/modules/mod_wishlist_new/mod_wishlist_new_ajax.php', options, function(r) {
28926			$elem.css('pointer-events', 'auto');
28927
28928			var rdata = JSON.parse(r);
28929			var wl_pd = $elem.closest('.flypage_wishlist').get(0);
28930
28931			if ( typeof wl_pd !== 'undefined' ) {
28932				wl_pd.innerHTML = rdata.wl_pd_html;
28933			}
28934
28935			jQuery('.wishlist_items').html(rdata.wl_mod_html);
28936			jQuery('body').addClass('in_wishlist');
28937
28938			jQuery(document).trigger('addToWishlist', [rdata]);
28939		});
28940
28941		js_wishlist_change('add');
28942
28943		setTimeout(function(){
28944			jQuery('.flypage_wishlist').find('.flypage_wishlist_added').hide();
28945		}, 4000);
28946	};
28947
28948	window.js_wishlist_pd_delete_click = function(elem, user_id, product_id) {
28949		elem = jQuery(elem);
28950
28951		var cookie_wl = '';
28952		if (user_id == '0') {
28953			cookie_wl = Cookies.get('wishlist') || '';
28954			cookie_wl = cookie_wl.split(",");
28955			for (i=cookie_wl.length-1; i>=0; i--) {
28956				if (cookie_wl[i] == product_id) cookie_wl.splice(i, 1);
28957			}
28958			cookie_wl = cookie_wl.toString();
28959			Cookies.set('wishlist', cookie_wl, { expires: 365, path: '/' });
28960		}
28961		var options = {ajax_func: 'pd_delete', user_id: user_id, product_id: product_id, cookie_wl: cookie_wl};
28962		jQuery.post(js_global_live_site+'/modules/mod_wishlist_new/mod_wishlist_new_ajax.php', options, function(r) {
28963			var rdata = JSON.parse(r);
28964			var wl_pd = elem.closest('.flypage_wishlist').get(0);
28965
28966			if ( typeof wl_pd !== 'undefined' ) {
28967				wl_pd.innerHTML = rdata.wl_pd_html;
28968			}
28969
28970			jQuery('.wishlist_items').html(rdata.wl_mod_html);
28971			jQuery('body').removeClass('in_wishlist');
28972
28973			jQuery(document).trigger('removeFromWishlist', [rdata]);
28974		});
28975
28976		js_wishlist_change('remove');
28977
28978		setTimeout(function(){
28979			jQuery('.flypage_wishlist').find('.flypage_wishlist_added').hide();
28980		}, 4000);
28981	};
28982
28983// ---------- FUNKCIE VOLANE Z BROWSU --------------
28984
28985	window.js_wishlist_b_add_click = function(elem, user_id, product_id) {
28986		var $elem = jQuery(elem);
28987
28988		$elem.css('pointer-events', 'none');
28989
28990		var cookie_wl = '';
28991		if (user_id == 0) {
28992			cookie_wl = Cookies.get('wishlist') || '';
28993			if (cookie_wl == null || cookie_wl == '') {
28994				Cookies.set('wishlist', product_id, { expires: 365, path: '/' });
28995			} else {
28996				Cookies.set('wishlist', cookie_wl + ',' + product_id, { expires: 365, path: '/' });
28997			}
28998			cookie_wl = Cookies.get('wishlist') || '';
28999		}
29000		var options = {ajax_func: 'b_add', user_id: user_id, product_id: product_id, cookie_wl: cookie_wl};
29001		jQuery.post(js_global_live_site+'/modules/mod_wishlist_new/mod_wishlist_new_ajax.php', options, function(r) {
29002			$elem.css('pointer-events', 'auto');
29003
29004			var rdata = JSON.parse(r);
29005			var wl_p = $elem.closest('.product_wishlist_'+product_id).get(0);
29006			$elem.closest('div.browse_listing').addClass('product_in_wishlist');
29007
29008			if ( typeof wl_p !== 'undefined' ) {
29009				wl_p.innerHTML = rdata.wl_b_html;
29010			}
29011
29012			if ( user_id > 0 ) {
29013				params && params.wishlist && params.wishlist.push(product_id.toString());
29014			}
29015
29016			jQuery('.wishlist_items').html(rdata.wl_mod_html);
29017			jQuery('.product_id_'+product_id).addClass('product_in_wishlist');
29018			const pw_el = jQuery('.product_wishlist_' + product_id);
29019			const slickSlide = pw_el.parents('.slick-slide');
29020			const articleProduct = pw_el.parents('.article_product_listing:first');
29021			const csProductItem = pw_el.parents('.cs_product_item:first');
29022
29023			if (slickSlide.length > 0) {
29024				slickSlide.addClass('product_in_wishlist');
29025			} else if (articleProduct.length > 0) {
29026				articleProduct.addClass('product_in_wishlist');
29027				if (csProductItem.length > 0) {
29028					csProductItem.addClass('product_in_wishlist');
29029				}
29030			} else if (csProductItem.length > 0) {
29031				csProductItem.addClass('product_in_wishlist');
29032			}
29033
29034			jQuery(document).trigger('addToWishlist', [rdata]);
29035		});
29036
29037		js_wishlist_change('add');
29038	};
29039
29040	window.js_wishlist_b_delete_click = function(elem, user_id, product_id) {
29041		elem = jQuery(elem);
29042
29043		var cookie_wl = '';
29044		if (user_id == '0') {
29045			cookie_wl = Cookies.get('wishlist') || '';
29046			cookie_wl = cookie_wl.split(",");
29047			for (i=cookie_wl.length-1; i>=0; i--) {
29048				if (cookie_wl[i] == product_id) cookie_wl.splice(i, 1);
29049			}
29050			cookie_wl = cookie_wl.toString();
29051			Cookies.set('wishlist', cookie_wl, { expires: 365, path: '/' });
29052		}
29053		var options = {ajax_func: 'b_delete', user_id: user_id, product_id: product_id, cookie_wl: cookie_wl};
29054		jQuery.post(js_global_live_site+'/modules/mod_wishlist_new/mod_wishlist_new_ajax.php', options, function(r) {
29055			var rdata = JSON.parse(r);
29056			var wl_p = elem.closest('.product_wishlist_'+product_id).get(0);
29057			elem.closest('div.browse_listing').removeClass('product_in_wishlist');
29058
29059			if ( typeof wl_p !== 'undefined' ) {
29060				wl_p.innerHTML = rdata.wl_b_html;
29061			}
29062
29063			if(user_id > 0){
29064				params.wishlist = params.wishlist && jQuery.grep(params.wishlist, function(value) {
29065					return value != product_id.toString();
29066				});
29067			}
29068
29069			jQuery('.wishlist_items').html(rdata.wl_mod_html);
29070			jQuery('.product_id_'+product_id).removeClass('product_in_wishlist');
29071			const pw_el = jQuery('.product_wishlist_' + product_id);
29072			const slickSlide = pw_el.parents('.slick-slide');
29073			const articleProduct = pw_el.parents('.article_product_listing:first');
29074			const csProductItem = pw_el.parents('.cs_product_item:first');
29075
29076			if (slickSlide.length > 0) {
29077				slickSlide.removeClass('product_in_wishlist');
29078			} else if (articleProduct.length > 0) {
29079				articleProduct.removeClass('product_in_wishlist');
29080				if (csProductItem.length > 0) {
29081					csProductItem.removeClass('product_in_wishlist');
29082				}
29083			} else if (csProductItem.length > 0) {
29084				csProductItem.removeClass('product_in_wishlist');
29085			}
29086
29087			jQuery(document).trigger('removeFromWishlist', [rdata]);
29088		});
29089
29090		js_wishlist_change('remove');
29091	};
29092})();
29093
29094
29095/* ========================================
29096 FILE: /modules/mod_heureka_shop_review.js
29097 ==================== */
29098
29099var mod_heureka_shop_rview_container = jQuery('.mod_heureka_shop_review');
29100mod_heureka_shop_rview_container.on('click', '.more_reviews a', function () {
29101	js_heureka_shop_review_add_reviews();
29102});
29103
29104if( typeof js_CS_Config_heureka_shop_rating_in_detail !== 'undefined' && js_CS_Config_heureka_shop_rating_in_detail && typeof js_CS_Config_cs_rating !== 'undefined' && js_CS_Config_cs_rating ) {
29105	var avgRating = mod_heureka_shop_rview_container.attr('data-avg');
29106	var reviews_total = mod_heureka_shop_rview_container.attr('data-reviews_total');
29107	var ratingLang = mod_heureka_shop_rview_container.attr('data-rating_lang');
29108
29109	if( typeof avgRating !== 'undefined' && avgRating > 0 ) {
29110		var rating = jQuery('.flypage-rating .cs_rating_wrapper');
29111
29112		updateRatingElement(rating, avgRating, reviews_total, ratingLang);
29113	}
29114}
29115
29116if (typeof js_Config_parser_enabled !== 'undefined' && js_Config_parser_enabled) {
29117	window.addEventListener('DOMContentLoaded', function() {
29118		updateRating();
29119	});
29120} else {
29121	updateRating();
29122}
29123
29124function js_heureka_shop_review_add_reviews() {
29125	var reviews_actual = mod_heureka_shop_rview_container.find('.comment').length;
29126	var reviews_total = mod_heureka_shop_rview_container.data('reviews_total');
29127	var language = mod_heureka_shop_rview_container.data('lang');
29128	var reviews_show = reviews_total - reviews_actual;
29129	if (reviews_show > 10)
29130		reviews_show = 10;
29131
29132	var options = {
29133		ajax_call: 1,
29134		ajax_func:'show_more_reviews',
29135		start: reviews_actual + 1,
29136		count: reviews_show,
29137		lang: language
29138	};
29139	jQuery.post(js_global_live_site+'/modules/mod_heureka_shop_review.php', options, function(response) {
29140		response = JSON.parse(response);
29141		if (!response.error) {
29142			mod_heureka_shop_rview_container.find('.comment:last').after(response.html);
29143			mod_heureka_shop_rview_container.data('reviews_total', response.reviews_total)
29144			if (mod_heureka_shop_rview_container.find('.comment').length == response.reviews_total) {
29145				mod_heureka_shop_rview_container.find('.more_reviews').remove();
29146			}
29147			updateRating();
29148		}
29149	});
29150}
29151
29152function updateRating()
29153{
29154	let module = jQuery('.mod_heureka_shop_review');
29155	let comments = module.find('.comment');
29156	console.log(comments);
29157
29158	comments.each(function() {
29159		let comment = jQuery(this);
29160		let rating = comment.find('.cs_rating_wrapper');
29161		let ratingValue = rating.attr('data-rating');
29162		let reviewsTotal = rating.attr('data-total');
29163		let ratingLang = rating.attr('data-lang');
29164
29165		updateRatingElement(rating, ratingValue, reviewsTotal, ratingLang);
29166	});
29167}
29168
29169
29170/* ========================================
29171 FILE: /includes/js/system/cs_lib.js
29172 ==================== */
29173
29174String.prototype.toJSON = function() {
29175	var text = this;
29176// 	if (typeof(text) != 'string')
29177// 		text = encodeURIComponent(text);
29178	return JSON.parse(decodeURIComponent(text));
29179};
29180
29181//function importJs(name,url) {
29182//	if(jQuery('[data-id="'+name+'"]').length > 0){
29183//		return;
29184//	}
29185//	var scriptTag = document.createElement('script');
29186//
29187//			scriptTag.setAttribute('data-id', name);
29188//			scriptTag.onload = _success;
29189//			scriptTag.onreadystatechange = _success;
29190//			scriptTag.src = url;
29191//			document.head.appendChild(scriptTag);
29192//}
29193
29194function csJsonParse( strJson, errFunc ) {
29195	var jsonRes = null;
29196	if (strJson != null && (typeof(strJson) == 'string' || strJson instanceof String) && strJson.trim() != '') {
29197		try {
29198			jsonRes = JSON.parse(strJson);
29199		} catch( jso_err ) {
29200			jsonRes = null;
29201			if (typeof(errFunc) == 'function') {
29202				//errFunc.call(null, jso_err);
29203				errFunc(jso_err, strJson);
29204			}
29205		}
29206	} else {
29207		jsonRes = null;
29208	}
29209	return jsonRes;
29210};
29211
29212/**
29213 *
29214 * @example csClean(['1', 'lorem', true, 55698], '1', true);
29215 * @example csClean(['1', 'lorem', true, 55698], [true, 'lorem']);
29216 *
29217 * @param {Array} - Array
29218 * @param {String|Array} deleteValue - Value to be deleted from array
29219 * @param {Boolean} strict - Compare data types - Default: false
29220 * @return {Array}
29221 */
29222function csClean(arr, deleteValue, strict)
29223{
29224	strict = typeof strict === 'boolean' ? strict : false;
29225
29226	if (!(deleteValue instanceof Array)) {
29227		deleteValue = [deleteValue];
29228	}
29229
29230	if (deleteValue instanceof Array) {
29231		for (var i = 0; i < arr.length; i++) {
29232			deleteValue.forEach(function(value) {
29233				if (strict) {
29234					if (arr[i] === value) {
29235						arr.splice(i, 1);
29236						i--;
29237					}
29238
29239				} else {
29240					if (arr[i] == value) {
29241						arr.splice(i, 1);
29242						i--;
29243					}
29244				}
29245			});
29246		}
29247	}
29248
29249	return arr;
29250};
29251
29252/**
29253 * Compare 2 or more objects
29254 * @author Hucci
29255 * @example csCompareObjects({a: 1, b: 2}, {b: 2, a: 1}) > true
29256 * @return {Boolean}
29257 */
29258function csCompareObjects()
29259{
29260	var i, l, leftChain, rightChain;
29261
29262	function compare2Objects(x, y)
29263	{
29264		var p;
29265
29266		if ((isNaN(x) && isNaN(y) && typeof x === 'number' && typeof y === 'number') || x === y) {
29267			return true;
29268		}
29269
29270		if ((typeof x === 'function' && typeof y === 'function') ||
29271			(x instanceof Date && y instanceof Date) ||
29272			(x instanceof RegExp && y instanceof RegExp) ||
29273			(x instanceof String && y instanceof String) ||
29274			(x instanceof Number && y instanceof Number)
29275		) {
29276			return x.toString() === y.toString();
29277		}
29278
29279		if (!(x instanceof Object && y instanceof Object) ||
29280			x.isPrototypeOf(y) || y.isPrototypeOf(x) ||
29281			x.constructor !== y.constructor ||
29282			x.prototype !== y.prototype ||
29283			leftChain.indexOf(x) > -1 || rightChain.indexOf(y) > -1
29284		) {
29285			return false;
29286		}
29287
29288		for (p in y) {
29289			if (y.hasOwnProperty(p) !== x.hasOwnProperty(p) || typeof y[p] !== typeof x[p]) {
29290				return false;
29291			}
29292		}
29293
29294		for (p in x) {
29295			if (y.hasOwnProperty(p) !== x.hasOwnProperty(p) || typeof y[p] !== typeof x[p]) {
29296				return false;
29297			}
29298
29299			switch (typeof (x[p])) {
29300				case 'object':
29301				case 'function':
29302					leftChain.push(x);
29303					rightChain.push(y);
29304
29305					if (!compare2Objects (x[p], y[p])) {
29306						return false;
29307					}
29308
29309					leftChain.pop();
29310					rightChain.pop();
29311
29312					break;
29313
29314				default:
29315					if (x[p] !== y[p]) {
29316						return false;
29317					}
29318
29319					break;
29320			}
29321		}
29322
29323		return true;
29324	}
29325
29326	if (arguments.length < 1) {
29327		return true;
29328	}
29329
29330	for (i = 1, l = arguments.length; i < l; i++) {
29331		leftChain = [];
29332		rightChain = [];
29333
29334		if (!compare2Objects(arguments[0], arguments[i])) {
29335			return false;
29336		}
29337	}
29338
29339	return true;
29340}
29341
29342/**
29343 * @author Hucci
29344 * @param {Number} price
29345 * @param {Object} currencySettings
29346 * @return {String}
29347 */
29348function csFormatPrice(price, currencySettings, only_number)
29349{
29350	var price = typeof price === 'number' ? price : (typeof js_parse_float === 'function') ? js_parse_float(price) : 0;
29351	var currencySettings = typeof currencySettings === 'object'
29352		? currencySettings
29353		: ((typeof shop_currency_info === 'object' && typeof shop_vendor_currency_code === 'string' && shop_vendor_currency_code in shop_currency_info)
29354			? shop_currency_info[shop_vendor_currency_code]
29355			: {
29356				'DECIMALS': 2,
29357				'1000_SYMBOL': ' ',
29358				'DEC_SYMBOL': ',',
29359				'POSIT': 1,
29360				'NEGAT': 8,
29361				'SYMBOL': '€'
29362			});
29363	var negative = price < 0 ? '-' : '';
29364	var full = String(parseInt(price = Math.abs(Number(price) || 0).toFixed(currencySettings.DECIMALS)));
29365	var thousands = (thousands = full.length) > 3 ? thousands % 3 : 0;
29366	var formattedPrice = negative + (thousands ? full.substr(0, thousands) + currencySettings['1000_SYMBOL'] : '') + full.substr(thousands).replace(/(\d{3})(?=\d)/g, "$1" + currencySettings['1000_SYMBOL']) + (price && currencySettings.DECIMALS ? currencySettings.DEC_SYMBOL + Math.abs(price - full).toFixed(currencySettings.DECIMALS).slice(2) : '');
29367
29368	if ( only_number === true ) return formattedPrice;
29369
29370	var symbol = currencySettings.SYMBOL;
29371
29372	var elem = document.createElement('textarea');
29373	elem.innerHTML = symbol;
29374	symbol = elem.value;
29375
29376	if (price >= 0) {
29377		switch (currencySettings.POSIT) {
29378			case 0:	formattedPrice = formattedPrice + symbol; break;
29379			case 1:	formattedPrice = formattedPrice +' '+ symbol; break;
29380			case 2:	formattedPrice = symbol + formattedPrice; break;
29381			case 3:	formattedPrice = symbol +' '+ formattedPrice; break;
29382
29383			default: formattedPrice = formattedPrice +' '+ symbol; break;
29384		}
29385
29386	} else {
29387		formattedPrice = (formattedPrice[0] === '-') ? formattedPrice.substr(1) : formattedPrice;
29388
29389		switch (currencySettings.NEGAT) {
29390			case 0: formattedPrice = '('+ symbol + formattedPrice +')'; break;
29391			case 1: formattedPrice = '-'+ symbol + formattedPrice; break;
29392			case 2: formattedPrice = symbol +'-'+ formattedPrice; break;
29393			case 3: formattedPrice = symbol + formattedPrice +'-'; break;
29394			case 4:	formattedPrice = '('+ formattedPrice + symbol +')'; break;
29395			case 5:	formattedPrice = '-'+ formattedPrice + symbol; break;
29396			case 6:	formattedPrice = formattedPrice +'-'+ symbol; break;
29397			case 7:	formattedPrice = formattedPrice + symbol +'-'; break;
29398			case 8:	formattedPrice = '-'+ formattedPrice +' '+ symbol; break;
29399			case 9:	formattedPrice = '-'+ symbol +' '+ formattedPrice; break;
29400			case 10: formattedPrice = formattedPrice +' '+ symbol +'-'; break;
29401			case 11: formattedPrice = symbol +' '+ formattedPrice +'-'; break;
29402			case 12: formattedPrice = symbol +' -'+ formattedPrice; break;
29403			case 13: formattedPrice = formattedPrice +'- '+ symbol; break;
29404			case 14: formattedPrice = '('+ symbol +' '+ formattedPrice +')'; break;
29405			case 15: formattedPrice = '('+ formattedPrice +' '+ symbol +')'; break;
29406
29407			default: formattedPrice = '-'+ formattedPrice +' '+ symbol; break;
29408		}
29409	}
29410
29411	return formattedPrice;
29412}
29413
29414/**
29415 * Create breakpoint when object property has changed
29416 *
29417 * @example csConsoleWatch(jQuery('#cbi_5').get(0), 'checked');
29418 * @example csConsoleWatch(document.getElementById('cbi_5'), 'checked');
29419 *
29420 * @param {Object} obj - Javascript Object
29421 * @param {String}
29421 prop - Object property to watch
29422 */
29423function csConsoleWatch(obj, prop)
29424{
29425	privateProp = "$_"+ prop +"_$";		// to minimize the name clash risk
29426	obj[privateProp] = obj[prop];
29427
29428	// overwrite with accestor
29429	Object.defineProperty(obj, prop, {
29430		get:	function() {
29431			return obj[privateProp];
29432		},
29433		set:	function(value) {
29434			console.log(' # # # csConsoleWatch: # # # ');
29435			console.log('Setting \''+ prop +'\' to \''+ value +'\' on ', obj);
29436			console.trace();
29437			console.log(' # # # # # # # # # # # # # # ');
29438			debugger;					// sets breakpoint
29439			obj[privateProp] = value;
29440		}
29441	});
29442}
29443
29444/**
29445 *
29446 * @param {Object} element - jQuery element
29447 * @param {Boolean} getChilds - If true - get also events of element childs - Default: true
29448 * @return {Array} - Array of Objects - {object: {Object} - jQuery element, events: {Object}}
29449 */
29450function csGetBindedEvents(element, getChilds)
29451{
29452	getChilds = typeof getChilds === 'boolean' ? getChilds : true;
29453	var selection = getChilds ? element.add(element.find('*')) : element;
29454	var retArr = [];
29455
29456	selection.each(function() {
29457		if (typeof (events = jQuery._data(jQuery(this).get(0), 'events')) === 'object') {
29458			retArr.push({
29459				object:	jQuery(this),
29460				events:	events
29461			});
29462		}
29463	});
29464
29465	return retArr;
29466}
29467
29468
29469/**
29470 *
29471 * @example csGetUrlParamByName('order_id', '...?page=order.invoice_printdetails&order_id=425000087') -> '425000087'
29472 * @example csGetUrlParamByName('type', '...?page=order.invoice_printdetails&order_id=425000087') -> undefined
29473 *
29474 * @param {String} name - Parameter name to get
29475 * @param {String} url
29476 * @return {String|Undefined}
29477 */
29478function csGetUrlParamByName(name, url) {
29479	url = (!url || url === '') ? window.location.href : url;
29480	name = name.replace(/[\[\]]/g, "\\$&");
29481
29482	var regex = new RegExp('[?&]'+ name +'(=([^&#]*)|&|#|$)'),
29483
29484	results = regex.exec(url);
29485
29486	if (!results) {
29487		return;
29488
29489	} else if (!results[2]) {
29490		return '';
29491
29492	} else {
29493		return decodeURIComponent(results[2].replace(/\+/g, ' '));
29494	}
29495}
29496
29497
29498jQuery.fn.justtext = function() {
29499	// fn vrati text len aktalneho elementu bez jeho childrens
29500    return jQuery(this).clone()
29501            .children()
29502            .remove()
29503            .end()
29504            .text();
29505};
29506
29507var emailProtection = '';
29508
29509var urlParams = {};
29510(function () {
29511    var e,
29512        a = /\+/g,  // Regex for replacing addition symbol with a space
29513        r = /([^&=]+)=?([^&]*)/g,
29514        d = function (s) { return decodeURIComponent(s.replace(a, " ")); },
29515        q = window.location.search.substring(1);
29516
29517    while (e = r.exec(q))
29518       urlParams[d(e[1])] = d(e[2]);
29519})();
29520
29521function str_repeat(patern, n) {
29522    var s = '';
29523    for (;;) {
29524        if (n & 1) s += patern;
29525        n >>= 1;
29526        if (n) patern += patern;
29527        else break;
29528    }
29529    return s;
29530}
29531
29532function js_prettyphoto_close() {
29533  if (jQuery('.pp_pic_holder').length == 0)
29534  	  return false;
29535
29536  jQuery.prettyPhoto.close();
29537  jQuery(document).off('keyup');
29538  return false;
29539}
29540
29541function js_toggle_input_fields(elem){
29542	var checkbox = jQuery(elem);
29543	var box = checkbox.closest('div');
29544	if (checkbox.is(':checked')){
29545
29546		box.find('.inputbox').show();
29547	} else {
29548
29549		box.find('.inputbox').hide();
29550	}
29551}
29552
29553function js_toggle_ckmsyts_fields(elem){
29554	var checkbox = jQuery(elem);
29555	var box = checkbox.closest('div');
29556	var coupon = jQuery('[name="coupon_code"]');
29557	var placeholder = '';
29558	if (checkbox.is(':checked')){
29559		placeholder = coupon.data('ckmpsytslaceholder');
29560		box.find('.inputbox').show();
29561	} else {
29562		placeholder = coupon.data('couponplaceholder');
29563		box.find('.inputbox').hide();
29564	}
29565	coupon.attr('placeholder', placeholder);
29566}
29567
29568function js_setLimitedInterval( func, msec, repeat_limit ) {
29569	//	variacia funkcie setInterval( function () {...} ) s limitom poctu opakovania
29570	//	opakuje volanie funkcie func pokial tato nevrati == true, alebo pokial neuplynie limit poctu opakovani
29571	//	prve volanie funkcie func je po uplynuti msec (rovnako ako v setInterval)
29572	//	//	pouzitie 1.: js_setLimitedInterval( function () { return my_func(); }, 1000, 3 );
29573	//	//	vykonava v sekundovych intervaloch, pokial my_func() nevrati true, ale max. 3x
29574	//	//	pouzitie 2.: js_setLimitedInterval( function () { return if ( ... ) { ...; return true; } else { ...; return false; } ; }, 1000, 3 )
29575	//	//	vykonava v sekundovych intervaloch, pokial function nevrati true, ale max. 3x
29576	if (typeof(func) == 'function' && typeof(msec) == 'number' && msec > 0 && typeof(repeat_limit) == 'number' && repeat_limit > 0) {
29577		if (func.hasOwnProperty('own_func_prop__repeat_count')) {
29578			var func_ret = func.call();
29579			func.own_func_prop__repeat_count ++;
29580		} else {
29581			var func_ret = null;
29582			func.own_func_prop__repeat_count = 0;
29583		}
29584		if (typeof(func_ret) != 'boolean' || func_ret != true) {
29585			if (func.own_func_prop__repeat_count < repeat_limit) {
29586				setTimeout(function () { js_setLimitedInterval(func, msec, repeat_limit); }, msec);
29587			}
29588		}
29589	}
29590	return null;
29591}
29592
29593function js_load_external(url) {
29594	var script = document.createElement("script");
29595	script.type = "text/javascript";
29596	script.src = url;
29597	document.getElementsByTagName("head")[0].appendChild(script);
29598}
29599
29600function js_load_external_css(url) {
29601	var style = document.createElement("link");
29602	style.rel = "stylesheet";
29603	style.type = 'text/css';
29604	style.href = url;
29605	document.getElementsByTagName("head")[0].appendChild(style);
29606}
29607
29608function pathinfo(path, options) {
29609  //  discuss at: http://phpjs.org/functions/pathinfo/
29610  // original by: Nate
29611  //  revised by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
29612  // improved by: Brett Zamir (http://brett-zamir.me)
29613  //    input by: Timo
29614  //        note: Inspired by actual PHP source: php5-5.2.6/ext/standard/string.c line #1559
29615  //        note: The way the bitwise arguments are handled allows for greater flexibility
29616  //        note: & compatability. We might even standardize this code and use a similar approach for
29617  //        note: other bitwise PHP functions
29618  //        note: php.js tries very hard to stay away from a core.js file with global dependencies, because we like
29619  //        note: that you can just take a couple of functions and be on your way.
29620  //        note: But by way we implemented this function, if you want you can still declare the PATHINFO_*
29621  //        note: yourself, and then you can use: pathinfo('/www/index.html', PATHINFO_BASENAME | PATHINFO_EXTENSION);
29622  //        note: which makes it fully compliant with PHP syntax.
29623  //  depends on: basename
29624  //   example 1: pathinfo('/www/htdocs/index.html', 1);
29625  //   returns 1: '/www/htdocs'
29626  //   example 2: pathinfo('/www/htdocs/index.html', 'PATHINFO_BASENAME');
29627  //   returns 2: 'index.html'
29628  //   example 3: pathinfo('/www/htdocs/index.html', 'PATHINFO_EXTENSION');
29629  //   returns 3: 'html'
29630  //   example 4: pathinfo('/www/htdocs/index.html', 'PATHINFO_FILENAME');
29631  //   returns 4: 'index'
29632  //   example 5: pathinfo('/www/htdocs/index.html', 2 | 4);
29633  //   returns 5: {basename: 'index.html', extension: 'html'}
29634  //   example 6: pathinfo('/www/htdocs/index.html', 'PATHINFO_ALL');
29635  //   returns 6: {dirname: '/www/htdocs', basename: 'index.html', extension: 'html', filename: 'index'}
29636  //   example 7: pathinfo('/www/htdocs/index.html');
29637  //   returns 7: {dirname: '/www/htdocs', basename: 'index.html', extension: 'html', filename: 'index'}
29638
29639  var opt = '',
29640    optName = '',
29641    optTemp = 0,
29642    tmp_arr = {},
29643    cnt = 0,
29644    i = 0;
29645  var have_basename = false,
29646    have_extension = false,
29647    have_filename = false;
29648
29649  // Input defaulting & sanitation
29650  if (!path) {
29651    return false;
29652  }
29653  if (!options) {
29654    options = 'PATHINFO_ALL';
29655  }
29656
29657  // Initialize binary arguments. Both the string & integer (constant) input is
29658  // allowed
29659  var OPTS = {
29660    'PATHINFO_DIRNAME': 1,
29661    'PATHINFO_BASENAME': 2,
29662    'PATHINFO_EXTENSION': 4,
29663    'PATHINFO_FILENAME': 8,
29664    'PATHINFO_ALL': 0
29665  };
29666  // PATHINFO_ALL sums up all previously defined PATHINFOs (could just pre-calculate)
29667  for (optName in OPTS) {
29668    OPTS.PATHINFO_ALL = OPTS.PATHINFO_ALL | OPTS[optName];
29669  }
29670  if (typeof options !== 'number') {
29671    // Allow for a single string or an array of string flags
29672    options = [].concat(options);
29673    for (i = 0; i < options.length; i++) {
29674      // Resolve string input to bitwise e.g. 'PATHINFO_EXTENSION' becomes 4
29675      if (OPTS[options[i]]) {
29676        optTemp = optTemp | OPTS[options[i]];
29677      }
29678    }
29679    options = optTemp;
29680  }
29681
29682  // Internal Functions
29683  var __getExt = function (path) {
29684    var str = path + '';
29685    var dotP = str.lastIndexOf('.') + 1;
29686    return !dotP ? false : dotP !== str.length ? str.substr(dotP) : '';
29687  };
29688
29689  // Gather path infos
29690  if (options & OPTS.PATHINFO_DIRNAME) {
29691    var dirName = path.replace(/\\/g, '/')
29692      .replace(/\/[^\/]*\/?$/, ''); // dirname
29693    tmp_arr.dirname = dirName === path ? '.' : dirName;
29694  }
29695
29696  if (options & OPTS.PATHINFO_BASENAME) {
29697    if (false === have_basename) {
29698      have_basename = this.basename(path);
29699    }
29700    tmp_arr.basename = have_basename;
29701  }
29702
29703  if (options & OPTS.PATHINFO_EXTENSION) {
29704    if (false === have_basename) {
29705      have_basename = this.basename(path);
29706    }
29707    if (false === have_extension) {
29708      have_extension = __getExt(have_basename);
29709    }
29710    if (false !== have_extension) {
29711      tmp_arr.extension = have_extension;
29712    }
29713  }
29714
29715  if (options & OPTS.PATHINFO_FILENAME) {
29716    if (false === have_basename) {
29717      have_basename = this.basename(path);
29718    }
29719    if (false === have_extension) {
29720      have_extension = __getExt(have_basename);
29721    }
29722    if (false === have_filename) {
29723      have_filename = have_basename.slice(0, have_basename.length - (have_extension ? have_extension.length + 1 :
29724        have_extension === false ? 0 : 1));
29725    }
29726
29727    tmp_arr.filename = have_filename;
29728  }
29729
29730  // If array contains only 1 element: return string
29731  cnt = 0;
29732  for (opt in tmp_arr) {
29733    cnt++;
29734  }
29735  if (cnt == 1) {
29736    return tmp_arr[opt];
29737  }
29738
29739  // Return full-blown array
29740  return tmp_arr;
29741}
29742
29743function basename(path, suffix) {
29744  //  discuss at: http://phpjs.org/functions/basename/
29745  // original by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
29746  // improved by: Ash Searle (http://hexmen.com/blog/)
29747  // improved by: Lincoln Ramsay
29748  // improved by: djmix
29749  // improved by: Dmitry Gorelenkov
29750  //   example 1: basename('/www/site/home.htm', '.htm');
29751  //   returns 1: 'home'
29752  //   example 2: basename('ecra.php?p=1');
29753  //   returns 2: 'ecra.php?p=1'
29754  //   example 3: basename('/some/path/');
29755  //   returns 3: 'path'
29756  //   example 4: basename('/some/path_ext.ext/','.ext');
29757  //   returns 4: 'path_ext'
29758
29759  var b = path;
29760  var lastChar = b.charAt(b.length - 1);
29761
29762  if (lastChar === '/' || lastChar === '\\') {
29763    b = b.slice(0, -1);
29764  }
29765
29766  b = b.replace(/^.*[\/\\]/g, '');
29767
29768  if (typeof suffix === 'string' && b.substr(b.length - suffix.length) == suffix) {
29769    b = b.substr(0, b.length - suffix.length);
29770  }
29771
29772  return b;
29773}
29774
29775// JAN mnozstevna automaticka zlava na produkt: povolenie zlavy
29776function js_product_automatic_discount_click( link_element ) {
29777	link_element = jQuery(link_element);
29778	var container_element = jQuery('.product_automatic_discount_add_new');
29779
29780	if ( link_element.prop('checked') ) {
29781		container_element.css('display', 'block');
29782	}
29783	else {
29784		container_element.css('display', 'none');
29785	}
29786}
29787
29788// kusy navyse za 0.01 EUR (buy X get Y): zobrazenie/skrytie nastaveni pri prepnuti checkboxu
29789// scopovane na vlastnu kartu (.extra-quantity-box), aby to fungovalo aj pri viacerych otvorenych edit formularoch
29790function js_product_extra_quantity_click( checkbox_element ) {
29791	const cbox = jQuery(checkbox_element);
29792	cbox.closest('.extra-quantity-box').find('.product_extra_quantity_settings')
29793		.css('display', cbox.prop('checked') ? 'block' : 'none');
29794	return true;
29795}
29796
29797// kusy navyse za 0.01 EUR: pole "pocet opakovani" sa zobrazi len pri mode "limited"
29798function js_product_extra_quantity_mode_change( select_element ) {
29799	const sel = jQuery(select_element);
29800	sel.closest('.extra-quantity-box').find('.peq_repetitions')
29801		.css('display', sel.val() === 'limited' ? 'block' : 'none');
29802	return true;
29803}
29804
29805// kusy navyse za 0.01 EUR: povol iba cele cisla v inputoch
29806function js_product_extra_quantity_check_numeric( input_element ) {
29807	const el = jQuery(input_element);
29808	el.val(el.val().replace(/[^0-9]/g, ''));
29809}
29810
29811// kusy navyse za 0.01 EUR: cena - povol cislice a jednu desatinnu bodku (ciarka -> bodka)
29812function js_product_extra_quantity_check_price( input_element ) {
29813	const el = jQuery(input_element);
29814	let v = el.val().replace(',', '.').replace(/[^0-9.]/g, '');
29815	const firstDot = v.indexOf('.');
29816	if ( firstDot !== -1 ) {
29817		v = v.slice(0, firstDot + 1) + v.slice(firstDot + 1).replace(/\./g, '');
29818	}
29819	el.val(v);
29820}
29821
29822// kusy navyse za 0.01 EUR: cena - pri opusteni polia vynut minimum 0.01 a format na 2 desatinne miesta
29823function js_product_extra_quantity_price_blur( input_element ) {
29824	const el = jQuery(input_element);
29825	let v = parseFloat(String(el.val()).replace(',', '.'));
29826	if ( isNaN(v) || v < 0.01 ) {
29827		v = 0.01;
29828	}
29829	el.val(v.toFixed(2));
29830}
29831
29832
29833const ProductBulkDiscount = {
29834	getBulkDiscountWrapper: (elemInsideBulkDiscount) => elemInsideBulkDiscount ? jQuery(elemInsideBulkDiscount).closest('.product_automatic_discount_add_new') : jQuery('.product_automatic_discount_add_new'),
29835	js_product_automatic_discount_handler: (action) => {
29836		// JAN mnozstevna automaticka zlava na produkt: pridanie variantu
29837		if (config('js_Config_shop_product_bulk_discounts_shopper_group') && typeof action !== 'undefined' && action == 1) {
29838			ProductBulkDiscount.js_product_automatic_discount_handler_shopper_groups(action);
29839			return false;
29840		}
29841
29842		let variant_box = ProductBulkDiscount.getBulkDiscountWrapper();
29843		let last_element = variant_box.children('.product_auto_discount_variant:last');
29844		let variant_count = variant_box.children('.product_auto_discount_variant').length;
29845		let variant_start = parseInt(jQuery('input[name=auto_discount_to_' + variant_count + ']').val()) + 1;
29846		let variant_r_count = variant_count + action;
29847		let unit = variant_box.closest('tr.adminlist_data_row').find('.product_in_stock_ks:first').text().trim() || 'ks';
29848
29849		if (typeof (action) !== 'undefined' && action == 1 && js_product_automatic_discount_check_field(false, true)) {
29850			let extraHtml = '';
29851			if (config('js_Config_shop_product_bulk_discounts_favorite_option')) {
29852				extraHtml += '<div class="pad_favorite_option"><input type="checkbox" id="auto_discount_favorite_option_' + variant_r_count + '" name="auto_discount_favorite_option_' + variant_r_count + '" /><label for="auto_discount_favorite_option_' + variant_r_count + '">Obľúbená možnosť</label></div>';
29853			}
29854
29855			let variant_div = '<div class="product_auto_discount_variant" id="auto_discount_variant_' + variant_r_count + '"><div class="br-setting"><!-- --></div><div class="pad_v_count_from"><label><span class="pad_vc_nr">' + variant_r_count + '.</span>od:</label><input onkeyup="ProductBulkDiscount.js_product_automatic_discount_check_numeric_decimal(this);
29855" onblur="return js_product_automatic_discount_check_field(this);" type="text" name="auto_discount_from_' + variant_r_count + '" maxlength="15" value="' + variant_start + '" /></div><div class="pad_v_count_to"><label>' + unit + '&nbsp;&nbsp;-&nbsp;&nbsp;do:</label><input onkeyup="js_product_automatic_discount_check_numeric_decimal(this);" onblur="return js_product_automatic_discount_check_field(this);" type="text" name="auto_discount_to_' + variant_r_count + '" maxlength="15" value="" /></div><div class="pad_variants_value"><label>' + unit + '&nbsp;&nbsp;-&nbsp;&nbsp;aplikovať zľavu</label><input onkeyup="js_product_automatic_discount_check_numeric_decimal(this);" onblur="return js_product_automatic_discount_check_field(this);" type="text" name="auto_discount_value_' + variant_r_count + '" maxlength="15" value="" /><span class="auto_discount_symbol_percentage">&#37;</span></div>' + extraHtml + '<div class="auto_discount_remove"><a style="display:block;" class="pad_v_remove_btton product_auto_discount_remove cs_icon csi-times" onclick="return ProductBulkDiscount.js_product_automatic_discount_handler(-1);" title="Zmazať posledný variant"></a></div></div>';
29856			last_element.after(variant_div);
29857			last_element.find('a.product_auto_discount_remove').css('display', 'none');
29858		} else if (typeof (action) !== 'undefined' && action == -1 && variant_count > 1) {
29859			last_element.remove();
29860			last_element = variant_box.children('.product_auto_discount_variant:last');
29861			last_element.find('a.product_auto_discount_remove').css('display', 'block');
29862		}
29863
29864		return false;
29865	},
29866	js_product_automatic_discount_handler_shopper_groups: (action) => {
29867		let variantBox = ProductBulkDiscount.getBulkDiscountWrapper();
29868		let variantCount = variantBox.children('.product_auto_discount_variant').length;
29869		let options = {
29870			function: 'getBulkDiscountSgHtml',
29871			variantIndex: variantCount + action,
29872		};
29873		jQuery.post('/includes/frontend_ajax.php', options, function (res) {
29874			let shopperGroupInputs = '';
29875			if (res != '') {
29876				var content = JSON.parse(res);
29877				if (typeof content.sgInputs != 'undefined' && content.sgInputs != '') {
29878					shopperGroupInputs = content.sgInputs;
29879				}
29880			}
29881
29882			let variant_box = ProductBulkDiscount.getBulkDiscountWrapper();
29883			let last_element = variant_box.children('.product_auto_discount_variant:last');
29884			let variant_count = variant_box.children('.product_auto_discount_variant').length;
29885			let variant_start = parseInt(jQuery('input[name=auto_discount_to_' + variant_count + ']').val()) + 1;
29886			let variant_r_count = variant_count + action;
29887			let unit = variant_box.closest('tr.adminlist_data_row').find('.product_in_stock_ks:first').text().trim() || 'ks';
29888
29889			let variant_div = '<div class="product_auto_discount_variant" id="auto_discount_variant_' + variant_r_count + '">';
29890			variant_div += '<div class="br-setting"><!-- --></div><div class="pad_v_count_from"><label><span class="pad_vc_nr">' + variant_r_count + '.</span>od:</label>';
29891			variant_div += '<input onkeyup="ProductBulkDiscount.js_product_automatic_discount_check_numeric_decimal(this);
29891" onblur="return js_product_automatic_discount_check_field(this);" type="text" name="auto_discount_from_' + variant_r_count + '" maxlength="15" value="' + variant_start + '" /></div>';
29892			variant_div += '<div class="pad_v_count_to"><label>' + unit + '&nbsp;&nbsp;-&nbsp;&nbsp;do:</label>';
29893			variant_div += '<input onkeyup="js_product_automatic_discount_check_numeric_decimal(this);" onblur="return js_product_automatic_discount_check_field(this);" type="text" name="auto_discount_to_' + variant_r_count + '" maxlength="15" value="" />';
29894			variant_div += '</div>';
29895			variant_div += '<div class="pad_variants_value">';
29896			variant_div += '<label>' + unit + '&nbsp;&nbsp;</label>' + shopperGroupInputs;
29897			variant_div += '</div>';
29898			variant_div += '<div class="auto_discount_remove">';
29899			variant_div += '<a style="display:block;" class="pad_v_remove_btton product_auto_discount_remove cs_icon csi-times" onclick="return ProductBulkDiscount.js_product_automatic_discount_handler(-1);" title="Zmazať posledný variant">';
29900			variant_div += '</div>';
29901			variant_div += '</a>';
29902			variant_div += '</div>';
29903
29904			if (typeof (action) !== 'undefined' && action == 1 && js_product_automatic_discount_check_field(false, true)) {
29905				last_element.after(variant_div);
29906				last_element.find('a.product_auto_discount_remove').css('display', 'none');
29907			}
29908		});
29909		return false;
29910	},
29911	js_product_automatic_discount_check_numeric_decimal: (field) => {
29912		let new_val;
29913		// Riso mnozstevna automaticka zlava : ciselna kontrola tak aby sa dali zadavat nie len cele cisla
29914		const field_box = jQuery(field);
29915		if ( (event.keyCode > 105 || event.keyCode < 96) && ( event.keyCode !== 190 || field_box.val().includes('.') || field_box.val().includes(',') ) ) { // key is not number
29916			if ( field_box.val().includes('.') && field_box.val().includes(',') ) {
29917				if ( field_box.val().slice(-1) == '.' ) {
29918					new_val = field_box.val().match(/\d+\,?\d*/g);
29919					field_box.val( new_val != null ? new_val.join('') : '');
29920				} else {
29921					new_val = field_box.val().match(/\d+\.?\d*/g);
29922					field_box.val(new_val != null ? new_val.join('') : '');
29923				}
29924			} else if ( field_box.val().includes('.') ) {
29925				new_val = field_box.val().match(/\d+\.?\d*/g);
29926				field_box.val( new_val != null ? new_val.join('') : '');
29927			} else if ( field_box.val().includes(',') ) {
29928				new_val = field_box.val().match(/\d+\,?\d*/g);
29929				field_box.val( new_val != null ? new_val.join('').replace(',','.') : '');
29930			}
29931		}
29932	},
29933	getAdditionalDiscountWrapper: (elem) => ProductBulkDiscount.getBulkDiscountWrapper(elem).find('.pad_vc_additional_discount_wrap'),
29934	getAdditionalDiscountRemoveButtonHtml: (index) => {
29935		let html = '';
29936		html += '<div class="pad_additional_discount_remove">';
29937		html += '<a href="javascript:void(0)" onclick="ProductBulkDiscount.removeAdditionalDiscount(this)" class="cs_icon csi-times"></a>';
29938		html += '</div>';
29939		return html;
29940	},
29941	addAdditionalDiscount: (elem) => {
29942		let additionalDiscountWrapper = ProductBulkDiscount.getAdditionalDiscountWrapper(elem);
29943		let additionalDiscountWrapperValues = additionalDiscountWrapper.find('.pad_vc_additional_discount_values');
29944		let unit = additionalDiscountWrapperValues.closest('tr.adminlist_data_row').find('.product_in_stock_ks').text();
29945		let allAdditionalDiscountValueList = additionalDiscountWrapperValues.find('.pad_vc_additional_discount_value');
29946
29947		/* zmazeme tlacitko odobrat z predchadzajucich hodnot */
29948		allAdditionalDiscountValueList.find('.pad_additional_discount_remove').remove();
29949
29950		let currentIndex = allAdditionalDiscountValueList.length + 1;
29951		let html = '';
29952
29953		html += '<div class="pad_vc_additional_discount_value">';
29954		html += `<div class="pad_additional_discount_index">${currentIndex}.</div>`;
29955
29956		/* pocet ks */
29957		html += '<div class="pad_additional_discount_count">';
29958		html += `<span>${js_langs.admin.products.bulkDiscount.every}</span>`;
29959		html += `<input onkeyup="ProductBulkDiscount.js_product_automatic_discount_check_numeric_decimal(this);" type="text" name="auto_discount_additional_discount_count_${currentIndex}" maxlength="15">`;
29960		html += `<span>${unit}</span>`;
29961		html += '</div>';
29962
29963		/* zlava */
29964		html += '<div class="pad_additional_discount_value">';
29965		html += `<span>${js_langs.admin.products.bulkDiscount.applyAdditionalDiscount}</span>`;
29966		html += `<input onkeyup="ProductBulkDiscount.js_product_automatic_discount_check_numeric_decimal(this);" type="text" name="auto_discount_additional_discount_value_${currentIndex}" maxlength="15">`;
29967		html += '<span class="auto_discount_symbol_percentage">%</span>';
29968		html += '</div>';
29969
29970		/* odobrat */
29971		html += ProductBulkDiscount.getAdditionalDiscountRemoveButtonHtml(currentIndex);
29972
29973		html += '</div>';
29974		additionalDiscountWrapperValues.append(html)
29975
29976		/* odstranenie tlacidla na pridanie dalsej delitelnej zlavy */
29977		additionalDiscountWrapper.find('.plus_button').remove();
29978	},
29979	removeAdditionalDiscount: (elem) => {
29980		let additionalDiscountWrapper = ProductBulkDiscount.getAdditionalDiscountWrapper(elem);
29981		let allAdditionalDiscountValueList = additionalDiscountWrapper.find('.pad_vc_additional_discount_value');
29982
29983		/* pridanie tlacidla na pridanie dalsej delitelnej zlavy (ak uz nieje) */
29984		if (!additionalDiscountWrapper.find('.plus_button').length) {
29985			additionalDiscountWrapper.append(`<a href="javascript:void(0)" onclick="ProductBulkDiscount.addAdditionalDiscount(this)" class="plus_button"></a>`);
29986		}
29987
29988		for (let i = 0; i < allAdditionalDiscountValueList.length; i++) {
29989			let isLast = i === allAdditionalDiscountValueList.length - 1;
29990			if (isLast) {
29991				allAdditionalDiscountValueList.eq(i).remove();
29992				let beforeLastIndex = i - 1;
29993				allAdditionalDiscountValueList.eq(beforeLastIndex).find('.pad_additional_discount_value').after(ProductBulkDiscount.getAdditionalDiscountRemoveButtonHtml(beforeLastIndex));
29994			}
29995		}
29996	}
29997};
29998
29999// JAN mnozstevna atomaticka zlava : ciselna kontrola pola
30000function js_product_automatic_discount_check_numeric( field ){ /* TODO presunut do ProductBulkDiscount */
30001	var field_box = jQuery(field);
30002	if (event.keyCode > 105 || event.keyCode < 96 ) { // key is not number
30003		var new_val = field_box.val().match(/\d+/g);
30004		console.log(new_val);
30005		field_box.val( new_val != null ? new_val.join('') : '');
30006	}
30007}
30008
30009// JAN mnozstevna automaticka zlava na produkt: kontrola variantov
30010function js_product_automatic_discount_check_field( focused, add ){ /* TODO presunut do ProductBulkDiscount */
30011	var add = typeof add !== 'undefined' ? add : false;
30012	if( typeof( focused ) == 'undefined' || focused == false ) var focused = jQuery('.product_auto_discount_variant').last().find('input').last().attr('name');
30013	else var focused = jQuery(focused).attr('name');
30014	var variant_count = jQuery('.product_automatic_discount_add_new').children('.product_auto_discount_variant').length;
30015	if( typeof( variant_count ) !== 'undefined' ){
30016		var last_to_value = 0;
30017		var last_discount_value = 0;
30018		for (var i = 1; i <= variant_count; i++) {
30019
30020
30021			if (typeof js_Config_vm_use_decimal_product_quantity != 'undefined') {
30022				var from = parseFloat(jQuery('input[name=auto_discount_from_'+i+']').val());
30023				var to = parseFloat(jQuery('input[name=auto_discount_to_'+i+']').val());
30024				var val = parseFloat(jQuery('input[name=auto_discount_value_'+i+']').val());
30025			} else {
30026				var from = parseInt(jQuery('input[name=auto_discount_from_'+i+']').val());
30027				var to = parseInt(jQuery('input[name=auto_discount_to_'+i+']').val());
30028				var val = parseInt(jQuery('input[name=auto_discount_value_'+i+']').val());
30029			}
30030
30031
30032
30033			// kontrola prazdnych alebo neciselnych poli
30034			if( add && ( typeof(from) == 'undefined' || isNaN( from ) ) ) { js_product_automatic_discount_warning( 'from', i, 1 ); return false; }
30035			if( add && ( typeof(to) == 'undefined' || isNaN( to ) ) ) { js_product_automatic_discount_warning( 'to', i, 1 ); return false; }
30036			if ( !( typeof js_Config_shop_product_bulk_discounts_shopper_group !== 'undefined' && js_Config_shop_product_bulk_discounts_shopper_group ) ) {
30037				if( add && ( typeof(val) == 'undefined' || isNaN( val ) ) ) { js_product_automatic_discount_warning( 'value', i, 1 ); return false; }
30038
30039				// Kontrola zlavy nad 100 percent
30040				if( val > 100 ) { js_product_automatic_discount_warning( 'value', i, 4 ); return false; }
30041			}
30042
30043			// Hodnota from nemoze byt nula
30044			if( from == 0 ) { js_product_automatic_discount_warning( 'from', i, 5 ); return false; }
30045			// kontrola prekrivania od - do
30046			if ( from > to  ) { js_product_automatic_discount_warning('to', i, 2); return false; }
30047
30048			//janB úprava -> aby kusy mohli byť od 2 do 2
30049			if (from > to && to != 99999 && add) {
30050				js_product_automatic_discount_warning('to', i, 2);
30051				return false;
30052			}
30053			// kontrola poslednej navecsej hodnoty "do" a noveho variantu "from"
30054			if (typeof (last_to_value) !== 'undefined' && last_to_value > 0 && last_to_value >= from ){ js_product_automatic_discount_warning( 'from', i, 3 ); return false; }
30055
30056			// kontrola poslednej nekonecnej hodnoty, nemozeme pridavat dalsie varianty
30057			if (add && i == variant_count && (to.length == 0 || to == '99999')) {
30058				js_product_automatic_discount_warning('to', i, 6);
30059				return false;
30060			}
30061			if (!(typeof js_Config_shop_product_bulk_discounts_shopper_group !== 'undefined' && js_Config_shop_product_bulk_discounts_shopper_group)) {
30062				// kontrola nizsej percentualnej zlavy ako predosly variant
30063				if( val != '' && i != 1 && val <= last_discount_value ) {js_product_automatic_discount_warning( 'value', i, 7 ); return false; }
30064			}
30065
30066			// zapis posledne najvacsie hodnoty pre nasledujucu kontrolu
30067			last_to_value = to;
30068
30069			if ( !( typeof js_Config_shop_product_bulk_discounts_shopper_group !== 'undefined' && js_Config_shop_product_bulk_discounts_shopper_group ) ) {
30070				last_discount_value = val;
30071			}
30072		}
30073		return true;
30074	}
30075	return false;
30076}
30077
30078// JAN mnozstevna automaticka zlava na produkt: upozornenie
30079function js_product_automatic_discount_warning( field, variant, message ){ /* TODO presunut do ProductBulkDiscount */
30080	var messages = [
30081		cms_js_admin_product_bulk_discount_message_1,
30082		cms_js_admin_product_bulk_discount_message_2,
30083		cms_js_admin_product_bulk_discount_message_3,
30084		cms_js_admin_product_bulk_discount_message_4,
30085		cms_js_admin_product_bulk_discount_message_5,
30086		cms_js_admin_product_bulk_discount_message_6,
30087		cms_js_admin_product_bulk_discount_message_7,
30088		cms_js_admin_product_bulk_discount_message_8
30089	];
30090	var target = jQuery( 'input[name=auto_discount_'+field+'_'+variant+']' );
30091	var message_box = jQuery( '.product_automatic_discount_message_box' ).text('');
30092	target.effect("highlight", {}, 3000);
30093	message_box.effect("highlight", {}, 3000);
30094	message_box.append( messages[message] ).delay(500).fadeOut();
30095}
30096
30097// JAN member zone zrusenie clenstva
30098function js_member_zone_cancel_subsc( user, type ){
30099	if( confirm( cms_js_lang_member_zone_cancel_subsc_dialog ) ){
30100		jQuery.post( js_global_live_site+'/public_scripts_M4r7ft/member_zone_ajax.php', {'ajax_func': type, 'user': user}, function(res) {
30101			// Skontroluj spravy a aktivuj messengera
30102			if (typeof messenger != 'undefined') messenger.check(res);
30103			return;
30104		});
30105	}
30106    return false;
30107}
30108
30109// JAN member zone poziadavka na zmenu balika
30110function js_member_zone_change_subsc( user, type ){
30111	if( confirm( cms_js_lang_member_zone_change_subsc_dialog ) ){
30112		jQuery.post( js_global_live_site+'/public_scripts_M4r7ft/member_zone_ajax.php', {'ajax_func': type, 'user': user}, function(res) {
30113			// Skontroluj spravy a aktivuj messengera
30114			if (typeof messenger != 'undefined') messenger.check(res);
30115			return;
30116		});
30117	}
30118    return false;
30119}
30120
30121// JAN nastavenie wishlist filtra
30122function js_set_wishlist_filter(bit){
30123	var wsh_filter = Cookies.get( 'wishlistFilter' );
30124	if( js_wishlist_filter_type == 'checkbox') wsh_filter = wsh_filter ^ bit;
30125	else if( wsh_filter == bit ) wsh_filter = 0;
30126	else wsh_filter = bit;
30127	Cookies.set( 'wishlistFilter', wsh_filter, {expires: 365, path: '/'});
30128	document.location.reload();
30129}
30130
30131// JAN wishlist manual product add (used in wishlist and product accessories)
30132function js_wishlist_product_search( self ) {
30133	jQuery(self).trigger('click');
30134	if( !(jQuery(self).hasClass('wsh_initialized')) ){
30135		var pr_search = jQuery(self);
30136		pr_search.addClass('wsh_initialized');
30137		pr_search.autocomplete(js_global_live_site+"/administrator/index3.php?option=com_shop&page=product.product_list&no_html=1&no_vm_html=1&no_menu=1&no_css=1&ajax_call=2&ajax_func=get-product-list-for-autocompleter", {
30138		width: 180,
30139		parentClass: "wishlist_manual_add_content"
30140		});
30141
30142		pr_search.result(function(event, data, formatted) {
30143			var hidden_id = jQuery(this).parent('.wishlist_manual_add_content').find('.wsh_add_product_id');
30144			hidden_id.val( data['2'] );
30145			var full_product_name = '';
30146			var formatted_jqo = jQuery('<div>'+formatted+'</div>');
30147			jQuery(formatted_jqo).find('span').each( function(index) {
30148				if ( index == 0 ) full_product_name += jQuery(this).text();
30149				else full_product_name += ' (' + jQuery(this).text() + ')';
30150			});
30151			formatted = full_product_name;
30152			if (data && data[1] != '' && data[2] > 0) jQuery(this).val( data['1'] );
30153			else jQuery(this).val(formatted);
30154			return;
30155		});
30156		pr_search.removeClass('wsh_initialized');
30157	}
30158	return;
30159}
30160
30161// JAN wishlist add product
30162function js_add_product_to_wishlist( button, user_id ){
30163	var elem = jQuery(button);
30164	var product = elem.parent('.wishlist_manual_add_content').find('.wsh_add_product_id').val();
30165	var tab = elem.parent('.wishlist_manual_add_content').find(':selected').val();
30166	if ( typeof(product) == 'undefined' || product == '') return false;
30167	if ( typeof(tab) == 'undefined' || tab == '') return false;
30168
30169	var options = {'ajax_func': 'forced', 'product_id': product, 'user_id': user_id, 'tab_id': tab};
30170
30171	jQuery.post('/modules/mod_wishlist_ajax.php', options, function (ajax_res) {
30172		var result = JSON.parse(decodeURIComponent(ajax_res));
30173		// Zla poziadavka
30174		if( typeof(result.result) != 'undefined' && result.result == '0' ){
30175			alert('Chýbajú údaje pre spracovanie');
30176			return false;
30177		}
30178		// Produkt existuje
30179		if( typeof(result.result) != 'undefined' && result.result == '1' ){
30180			alert('Produkt neexistuje');
30181			return false;
30182		}
30183		// Produkt bol pridany
30184		if( typeof(result.result) != 'undefined' && result.result == '2' ){
30185			elem.parents('fieldset:first').find('table tr:last').after(result.content);
30186			return false;
30187		}
30188		// Produkt uz existuje
30189		if( typeof(result.result) != 'undefined' && result.result == '4' ){
30190			alert('Produkt sa už nachádza v tejto záložke');
30191			return false;
30192		}
30193	});
30194}
30195
30196/**
30197 * Vytvori duplicitnu instanciu DOM elementu, ktory je surodencom interagovaneho, volajuceho elementu.
30198 *
30199 * @author Marek J. Kolcun
30200 *
30201 * @param me string           - interagovany, volajuci element
30202 * @param target string       - DOM nazov elementu, ktory chceme skopirovat
30203 * @param insertAfter boolean - rozhodne, ci sa novy element ma vlozit pred alebo za interagovany element. True = after, false = before
30204 *
30205 * @return mixed - JS objekt daneho elementu, ak element bol uspesne vytvoreny, inac null
30206 */
30207function copySiblingDomElement(data) {
30208	if (typeof data.me === 'undefined' || typeof data.target === 'undefined') {
30209		return false;
30210	}
30211
30212	insertAfter = (typeof data.insertAfter === 'boolean') ? data.insertAfter : false;
30213	var $me = jQuery(data.me);
30214	var $target = jQuery(data.target);
30215
30216	if (!$target.length) {
30217		if (typeof console !== 'undefined') console.log('copySiblingDomElement(): Element "' + data.target + '" neexistuje.');
30218		return null;
30219	}
30220	var time = new Date().getTime();
30221	var $clone = jQuery(data.target + ':first').clone().data('_id', time).hide();
30222
30223	$clone.find('input, select, textarea').val('').prop('checked', false);
30224
30225	if (!insertAfter)
30226		$me.before($clone);
30227	else
30228		$me.after($clone);
30229
30230	var siblings = $me.siblings();
30231	jQuery(siblings).each(function(i) {
30232		if (jQuery(siblings[i]).data('_id') == time)
30233			jQuery(siblings[i]).show(250, function(){ jQuery(this).css({'overflow':'visible'}); }).removeData('_id');
30234	});
30235
30236	if (typeof data.callback === 'function')
30237		data.callback();
30238	return $clone;
30239}
30240
30241/**
30242 * Odstrani cielovy element
30243 *
30244 * @author Marek J. Kolcun
30245 *
30246 * @param target string     - DOM nazov cieloveho elementu, ktory bude odstraneny
30247 * @param callback function - Callback funkcia, ktora sa vykona bezprostredne po odstraneni cieloveho elementu.
30248 *
30249 * @return boolean - True, ak bol element odstraneny, inac false
30250 */
30251function removeDomElement(target, callback) {
30252	jQuery(target).hide(500, function() {
30253		jQuery(this).remove();
30254	});
30255	if (typeof callback === 'function') {
30256		setTimeout(function() {
30257			callback();
30258		}, 510);
30259	}
30260}
30261
30262/**
30263 * Vsetkym suvisiacim selectom aktualizuje mozne option hodnoty tak, ze vybrana hodnota v jednom selecte sa nezobrazi v inom/zobrazi sa ako disabled.
30264 *
30265 * @author Marek J. Kolcun
30266 *
30267 * @param me string            - DOM nazov cieloveho elementu, ktory bude odstraneny
30268 * @param makeDisabled boolean - Ak je "true", hodnoty sa nezmazu, ale dostanu parameter disabled="disabled"
30269 *
30270 * @return void
30271 */
30272function refreshExclusiveSelect(me, makeDisabled) {
30273	makeDisabled = (typeof makeDisabled === 'boolean') ? makeDisabled : false;
30274	let list = jQuery(me);
30275
30276	if (list.length < 2) {
30277		return;
30278	}
30279
30280	let optionList = jQuery(list[0]).children('option');
30281	let selectedOptions = [];
30282
30283	jQuery(list).each(function(i) {
30284		if (typeof jQuery(list[i]).val() !== 'undefined' && jQuery(list[i]).val() != null) {
30285			selectedOptions.push(jQuery(list[i]).val());
30286		}
30287	});
30288
30289	jQuery(list).children().each(function(i) {
30290		jQuery(this).prop('disabled', false).show();
30291
30292		for (let j in selectedOptions) {
30293			if (jQuery(this).val() == selectedOptions[j]) {
30294				if (makeDisabled) {
30295					jQuery(this).prop('disabled', true);
30296				} else {
30297					jQuery(this).hide();
30298				}
30299			}
30300		}
30301	});
30302}
30303
30304
30305/**
30306 * Otestuje hodnotu atributu (val()) cieloveho elementu, porovna ju so zelanou hodnotou a pripadne vykona odpovedajucu callback funkciu.
30307 * Ak je porovnavana hodnota typu "string", v pripade nerovnosti s compareTo premennou sa porovnaju dlzky tychto retazcov. Nasledne sa
30308 * zavola callback funkcia callbackLess alebo callbackMore. V pripade, ze su retazce rov
30308nake, zavola sa funkcia callbackEqual.
30309 *
30310 * @author Marek J. Kolcun
30311 *
30312 * @param target string          - identifikator cieloveho DOM elementu (trieda, ID).
30313 * @param compareTo mixed        - hodnota, s ktorou sa ma porovnavat hodnota zadaneho DOM elementu.
30314 * @param callbackLess function  - funkcia, ktora sa ma vykonat, ak je hodnota v elemente mensia nez porovnavana hodnota.
30315 * @param callbackEqual function - funkcia, ktora sa ma vykonat, ak je hodnota v elemente rovnaka ako porovnavana hodnota.
30316 * @param callbackMore function  - funkcia, ktora sa ma vykonat, ak je hodnota v elemente vacsia nez porovnavana hodnota.
30317 *
30318 */
30319function testValueAndCallback(target, compareTo, callbackLess, callbackEqual, callbackMore) {
30320	callbackLess = (typeof callbackLess === 'function') ? callbackLess : function() {};
30321	callbackEqual = (typeof callbackEqual === 'function') ? callbackEqual : function() {};
30322	callbackMore = (typeof callbackMore === 'function') ? callbackMore : function() {};
30323
30324	jQuery(target).animate({'outline': '3px solid #a55'}, 500, 'linear', function() {jQuery(this).css('outline', 'none');});
30325	var value = jQuery(target).val();
30326
30327	if (typeof value === 'string' && value != compareTo) {
30328		value     = value.length;
30329		compareTo = compareTo.length;
30330	}
30331
30332	if (value < compareTo)
30333		return callbackLess();
30334	if (value == compareTo)
30335		return callbackEqual();
30336	if (value > compareTo)
30337		return callbackMore();
30338}
30339
30340//	funkcia pre Cetelem. Baf.
30341function js_toggle_cetelem_web_calculator( jso_this ) {
30342	console.log('klik');
30343	var jqo = jQuery('div.cetelem_web_calculator_main');
30344	if (jqo.length > 0) {
30345		if (jqo.html() == '') {
30346			jqo.startAjaxLoader();
30347			jQuery(jso_this).parents('div:first').find('[name="payment_method_id"]:first').prop('checked', true);
30348			jQuery.post('/administrator/components/com_shop/html/checkout.one_step.index.php?option=com_shop&ajax_call=1&ajax_func=get_cetelem_web_calculator', function ( ret ) {
30349				jqo.replaceWith(ret.cetelem_web_calculator);
30350			});
30351		} else {
30352			jqo.slideToggle(250);
30353		}
30354	} else {
30355		console.log('nefungujeme');
30356	}
30357	return false;
30358}
30359
30360var defaultDiacriticsRemovalMap = [
30361		{'base':'A', 'letters':/[\u0041\u24B6\uFF21\u00C0\u00C1\u00C2\u1EA6\u1EA4\u1EAA\u1EA8\u00C3\u0100\u0102\u1EB0\u1EAE\u1EB4\u1EB2\u0226\u01E0\u00C4\u01DE\u1EA2\u00C5\u01FA\u01CD\u0200\u0202\u1EA0\u1EAC\u1EB6\u1E00\u0104\u023A\u2C6F]/g},
30362		{'base':'AA','letters':/[\uA732]/g},
30363		{'base':'AE','letters':/[\u00C6\u01FC\u01E2]/g},
30364		{'base':'AO','letters':/[\uA734]/g},
30365		{'base':'AU','letters':/[\uA736]/g},
30366		{'base':'AV','letters':/[\uA738\uA73A]/g},
30367		{'base':'AY','letters':/[\uA73C]/g},
30368		{'base':'B', 'letters':/[\u0042\u24B7\uFF22\u1E02\u1E04\u1E06\u0243\u0182\u0181]/g},
30369		{'base':'C', 'letters':/[\u0043\u24B8\uFF23\u0106\u0108\u010A\u010C\u00C7\u1E08\u0187\u023B\uA73E]/g},
30370		{'base':'D', 'letters':/[\u0044\u24B9\uFF24\u1E0A\u010E\u1E0C\u1E10\u1E12\u1E0E\u0110\u018B\u018A\u0189\uA779]/g},
30371		{'base':'DZ','letters':/[\u01F1\u01C4]/g},
30372		{'base':'Dz','letters':/[\u01F2\u01C5]/g},
30373		{'base':'E', 'letters':/[\u0045\u24BA\uFF25\u00C8\u00C9\u00CA\u1EC0\u1EBE\u1EC4\u1EC2\u1EBC\u0112\u1E14\u1E16\u0114\u0116\u00CB\u1EBA\u011A\u0204\u0206\u1EB8\u1EC6\u0228\u1E1C\u0118\u1E18\u1E1A\u0190\u018E]/g},
30374		{'base':'F', 'letters':/[\u0046\u24BB\uFF26\u1E1E\u0191\uA77B]/g},
30375		{'base':'G', 'letters':/[\u0047\u24BC\uFF27\u01F4\u011C\u1E20\u011E\u0120\u01E6\u0122\u01E4\u0193\uA7A0\uA77D\uA77E]/g},
30376		{'base':'H', 'letters':/[\u0048\u24BD\uFF28\u0124\u1E22\u1E26\u021E\u1E24\u1E28\u1E2A\u0126\u2C67\u2C75\uA78D]/g},
30377		{'base':'I', 'letters':/[\u0049\u24BE\uFF29\u00CC\u00CD\u00CE\u0128\u012A\u012C\u0130\u00CF\u1E2E\u1EC8\u01CF\u0208\u020A\u1ECA\u012E\u1E2C\u0197]/g},
30378		{'base':'J', 'letters':/[\u004A\u24BF\uFF2A\u0134\u0248]/g},
30379		{'base':'K', 'letters':/[\u004B\u24C0\uFF2B\u1E30\u01E8\u1E32\u0136\u1E34\u0198\u2C69\uA740\uA742\uA744\uA7A2]/g},
30380		{'base':'L', 'letters':/[\u004C\u24C1\uFF2C\u013F\u0139\u013D\u1E36\u1E38\u013B\u1E3C\u1E3A\u0141\u023D\u2C62\u2C60\uA748\uA746\uA780]/g},
30381		{'base':'LJ','letters':/[\u01C7]/g},
30382		{'base':'Lj','letters':/[\u01C8]/g},
30383		{'base':'M', 'letters':/[\u004D\u24C2\uFF2D\u1E3E\u1E40\u1E42\u2C6E\u019C]/g},
30384		{'base':'N', 'letters':/[\u004E\u24C3\uFF2E\u01F8\u0143\u00D1\u1E44\u0147\u1E46\u0145\u1E4A\u1E48\u0220\u019D\uA790\uA7A4]/g},
30385		{'base':'NJ','letters':/[\u01CA]/g},
30386		{'base':'Nj','letters':/[\u01CB]/g},
30387		{'base':'O', 'letters':/[\u004F\u24C4\uFF2F\u00D2\u00D3\u00D4\u1ED2\u1ED0\u1ED6\u1ED4\u00D5\u1E4C\u022C\u1E4E\u014C\u1E50\u1E52\u014E\u022E\u0230\u00D6\u022A\u1ECE\u0150\u01D1\u020C\u020E\u01A0\u1EDC\u1EDA\u1EE0\u1EDE\u1EE2\u1ECC\u1ED8\u01EA\u01EC\u00D8\u01FE\u0186\u019F\uA74A\uA74C]/g},
30388		{'base':'OI','letters':/[\u01A2]/g},
30389		{'base':'OO','letters':/[\uA74E]/g},
30390		{'base':'OU','letters':/[\u0222]/g},
30391		{'base':'P', 'letters':/[\u0050\u24C5\uFF30\u1E54\u1E56\u01A4\u2C63\uA750\uA752\uA754]/g},
30392		{'base':'Q', 'letters':/[\u0051\u24C6\uFF31\uA756\uA758\u024A]/g},
30393		{'base':'R', 'letters':/[\u0052\u24C7\uFF32\u0154\u1E58\u0158\u0210\u0212\u1E5A\u1E5C\u0156\u1E5E\u024C\u2C64\uA75A\uA7A6\uA782]/g},
30394		{'base':'S', 'letters':/[\u0053\u24C8\uFF33\u1E9E\u015A\u1E64\u
30394015C\u1E60\u0160\u1E66\u1E62\u1E68\u0218\u015E\u2C7E\uA7A8\uA784]/g},
30395		{'base':'T', 'letters':/[\u0054\u24C9\uFF34\u1E6A\u0164\u1E6C\u021A\u0162\u1E70\u1E6E\u0166\u01AC\u01AE\u023E\uA786]/g},
30396		{'base':'TZ','letters':/[\uA728]/g},
30397		{'base':'U', 'letters':/[\u0055\u24CA\uFF35\u00D9\u00DA\u00DB\u0168\u1E78\u016A\u1E7A\u016C\u00DC\u01DB\u01D7\u01D5\u01D9\u1EE6\u016E\u0170\u01D3\u0214\u0216\u01AF\u1EEA\u1EE8\u1EEE\u1EEC\u1EF0\u1EE4\u1E72\u0172\u1E76\u1E74\u0244]/g},
30398		{'base':'V', 'letters':/[\u0056\u24CB\uFF36\u1E7C\u1E7E\u01B2\uA75E\u0245]/g},
30399		{'base':'VY','letters':/[\uA760]/g},
30400		{'base':'W', 'letters':/[\u0057\u24CC\uFF37\u1E80\u1E82\u0174\u1E86\u1E84\u1E88\u2C72]/g},
30401		{'base':'X', 'letters':/[\u0058\u24CD\uFF38\u1E8A\u1E8C]/g},
30402		{'base':'Y', 'letters':/[\u0059\u24CE\uFF39\u1EF2\u00DD\u0176\u1EF8\u0232\u1E8E\u0178\u1EF6\u1EF4\u01B3\u024E\u1EFE]/g},
30403		{'base':'Z', 'letters':/[\u005A\u24CF\uFF3A\u0179\u1E90\u017B\u017D\u1E92\u1E94\u01B5\u0224\u2C7F\u2C6B\uA762]/g},
30404		{'base':'a', 'letters':/[\u0061\u24D0\uFF41\u1E9A\u00E0\u00E1\u00E2\u1EA7\u1EA5\u1EAB\u1EA9\u00E3\u0101\u0103\u1EB1\u1EAF\u1EB5\u1EB3\u0227\u01E1\u00E4\u01DF\u1EA3\u00E5\u01FB\u01CE\u0201\u0203\u1EA1\u1EAD\u1EB7\u1E01\u0105\u2C65\u0250]/g},
30405		{'base':'aa','letters':/[\uA733]/g},
30406		{'base':'ae','letters':/[\u00E6\u01FD\u01E3]/g},
30407		{'base':'ao','letters':/[\uA735]/g},
30408		{'base':'au','letters':/[\uA737]/g},
30409		{'base':'av','letters':/[\uA739\uA73B]/g},
30410		{'base':'ay','letters':/[\uA73D]/g},
30411		{'base':'b', 'letters':/[\u0062\u24D1\uFF42\u1E03\u1E05\u1E07\u0180\u0183\u0253]/g},
30412		{'base':'c', 'letters':/[\u0063\u24D2\uFF43\u0107\u0109\u010B\u010D\u00E7\u1E09\u0188\u023C\uA73F\u2184]/g},
30413		{'base':'d', 'letters':/[\u0064\u24D3\uFF44\u1E0B\u010F\u1E0D\u1E11\u1E13\u1E0F\u0111\u018C\u0256\u0257\uA77A]/g},
30414		{'base':'dz','letters':/[\u01F3\u01C6]/g},
30415		{'base':'e', 'letters':/[\u0065\u24D4\uFF45\u00E8\u00E9\u00EA\u1EC1\u1EBF\u1EC5\u1EC3\u1EBD\u0113\u1E15\u1E17\u0115\u0117\u00EB\u1EBB\u011B\u0205\u0207\u1EB9\u1EC7\u0229\u1E1D\u0119\u1E19\u1E1B\u0247\u025B\u01DD]/g},
30416		{'base':'f', 'letters':/[\u0066\u24D5\uFF46\u1E1F\u0192\uA77C]/g},
30417		{'base':'g', 'letters':/[\u0067\u24D6\uFF47\u01F5\u011D\u1E21\u011F\u0121\u01E7\u0123\u01E5\u0260\uA7A1\u1D79\uA77F]/g},
30418		{'base':'h', 'letters':/[\u0068\u24D7\uFF48\u0125\u1E23\u1E27\u021F\u1E25\u1E29\u1E2B\u1E96\u0127\u2C68\u2C76\u0265]/g},
30419		{'base':'hv','letters':/[\u0195]/g},
30420		{'base':'i', 'letters':/[\u0069\u24D8\uFF49\u00EC\u00ED\u00EE\u0129\u012B\u012D\u00EF\u1E2F\u1EC9\u01D0\u0209\u020B\u1ECB\u012F\u1E2D\u0268\u0131]/g},
30421		{'base':'j', 'letters':/[\u006A\u24D9\uFF4A\u0135\u01F0\u0249]/g},
30422		{'base':'k', 'letters':/[\u006B\u24DA\uFF4B\u1E31\u01E9\u1E33\u0137\u1E35\u0199\u2C6A\uA741\uA743\uA745\uA7A3]/g},
30423		{'base':'l', 'letters':/[\u006C\u24DB\uFF4C\u0140\u013A\u013E\u1E37\u1E39\u013C\u1E3D\u1E3B\u017F\u0142\u019A\u026B\u2C61\uA749\uA781\uA747]/g},
30424		{'base':'lj','letters':/[\u01C9]/g},
30425		{'base':'m', 'letters':/[\u006D\u24DC\uFF4D\u1E3F\u1E41\u1E43\u0271\u026F]/g},
30426		{'base':'n', 'letters':/[\u006E\u24DD\uFF4E\u01F9\u0144\u00F1\u1E45\u0148\u1E47\u0146\u1E4B\u1E49\u019E\u0272\u0149\uA791\uA7A5]/g},
30427		{'base':'nj','letters':/[\u01CC]/g},
30428		{'base':'o', 'letters':/[\u006F\u24DE\uFF4F\u00F2\u00F3\u00F4\u1ED3\u1ED1\u1ED7\u1ED5\u00F5\u1E4D\u022D\u1E4F\u014D\u1E51\u1E53\u014F\u022F\u0231\u00F6\u022B\u1ECF\u0151\u01D2\u020D\u020F\u01A1\u1EDD\u1EDB\u1EE1\u1EDF\u1EE3\u1ECD\u1ED9\u01EB\u01ED\u00F8\u01FF\u0254\uA74B\uA74D\u0275]/g},
30429		{'base':'oi','letters':/[\u01A3]/g},
30430		{'base':'ou','letters':/[\u0223]/g},
30431		{'base':'oo','letters':/[\uA74F]/g},
30432		{'base':'p','letters':/[\u0070\u24DF\uFF50\u1E55\u1E57\u01A5\u1D7D\uA751\uA753\uA755]/g},
30433		{'base':'q','letters':/[\u0071\u24E0\uFF51\u024B\uA757\uA759]/g},
30434		{'base':'r','letters':/[\u0072\u24E1\uFF52\u0155\u1E59\u0159\u0211\u0213\u1E5B\u1E5D\u0157\u1E5F\u024D\u027D\uA75B\uA7A7\uA783]/g},
30435		{'base':'s','letters':/[\u0073\u24E2\uFF53\u00DF\u015B\u1E65\u015D\u1E61\u0161\u1E67\u1E63\u1E69\u0219\u015F\u023F\uA7A9\uA785\u1E9B]/g},
30436		{'base':'t','letters':/[\u0074\u24E3\uFF54\u1E6B\u1E97\u0165\u1E6D\u02
304361B\u0163\u1E71\u1E6F\u0167\u01AD\u0288\u2C66\uA787]/g},
30437		{'base':'tz','letters':/[\uA729]/g},
30438		{'base':'u','letters':/[\u0075\u24E4\uFF55\u00F9\u00FA\u00FB\u0169\u1E79\u016B\u1E7B\u016D\u00FC\u01DC\u01D8\u01D6\u01DA\u1EE7\u016F\u0171\u01D4\u0215\u0217\u01B0\u1EEB\u1EE9\u1EEF\u1EED\u1EF1\u1EE5\u1E73\u0173\u1E77\u1E75\u0289]/g},
30439		{'base':'v','letters':/[\u0076\u24E5\uFF56\u1E7D\u1E7F\u028B\uA75F\u028C]/g},
30440		{'base':'vy','letters':/[\uA761]/g},
30441		{'base':'w','letters':/[\u0077\u24E6\uFF57\u1E81\u1E83\u0175\u1E87\u1E85\u1E98\u1E89\u2C73]/g},
30442		{'base':'x','letters':/[\u0078\u24E7\uFF58\u1E8B\u1E8D]/g},
30443		{'base':'y','letters':/[\u0079\u24E8\uFF59\u1EF3\u00FD\u0177\u1EF9\u0233\u1E8F\u00FF\u1EF7\u1E99\u1EF5\u01B4\u024F\u1EFF]/g},
30444		{'base':'z','letters':/[\u007A\u24E9\uFF5A\u017A\u1E91\u017C\u017E\u1E93\u1E95\u01B6\u0225\u0240\u2C6C\uA763]/g}
30445	];
30446
30447function js_remove_accents( str ) {
30448
30449    changes = defaultDiacriticsRemovalMap;
30450
30451    for(var i=0; i<changes.length; i++) {
30452        str = str.replace(changes[i].letters, changes[i].base);
30453    }
30454    return str;
30455}
30456
30457function js_format_Money( number, places, symbol, thousand, decimal) {
30458
30459	number = number || 0;
30460	places = !isNaN(places = Math.abs(places)) ? places : 2;
30461	symbol = symbol !== undefined ? symbol : " $";
30462	thousand = thousand || ".";
30463	decimal = decimal || ",";
30464	var negative = number < 0 ? "-" : "",
30465	    i = parseInt(number = Math.abs(+number || 0).toFixed(places), 10) + "",
30466	    j = (j = i.length) > 3 ? j % 3 : 0;
30467	return negative + (j ? i.substr(0, j) + thousand : "") + i.substr(j).replace(/(\d{3})(?=\d)/g, "$1" + thousand) + (places ? decimal + Math.abs(number - i).toFixed(places).slice(2) : "") + ' ' + symbol;
30468}
30469
30470function js_format_bytes(bytes, decimals){
30471   if(bytes == 0) return '0 Bytes';
30472   var k = 1024,
30473       dm = decimals || 2,
30474       sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'],
30475       i = Math.floor(Math.log(bytes) / Math.log(k));
30476   return parseFloat((bytes / Math.pow(k, i)).toFixed(dm)) + ' ' + sizes[i];
30477}
30478
30479/**
30480 * Vrati microtime pre debug
30481 * @param {boolean} getAsFloat - Ak true bude hodnota vratena ako desatinne cislo
30482 */
30483function microtime(getAsFloat){
30484	var s;
30485	var now;
30486	if (typeof performance !== 'undefined' && performance.now) {
30487
30488		now = (performance.now() + performance.timing.navigationStart) / 1e3;
30489
30490		if (getAsFloat) { return now; }
30491
30492		s = now | 0;
30493
30494		return (Math.round((now - s) * 1e6) / 1e6) + ' ' + s;
30495	} else {
30496
30497		now = (Date.now ? Date.now() : new Date().getTime()) / 1e3;
30498		if (getAsFloat) { return now; }
30499
30500		s = now | 0;
30501
30502		return (Math.round((now - s) * 1e3) / 1e3) + ' ' + s;
30503	}
30504}
30505
30506var js_image_import_interval = 0;
30507var js_image_import_loading = 0;
30508function js_image_import_info(){
30509
30510	if (js_image_import_loading == 1) return;
30511
30512	var wrap = jQuery('.import_data_upload_container_wrapper');
30513	var box = wrap.find('.img_import_prog');
30514
30515	if (box.length == 0){
30516
30517		wrap.append('<div class="img_import_prog"></div>');
30518		box = jQuery('.img_import_prog');
30519	}
30520
30521	js_image_import_loading = 1;
30522	var html = '';
30523	var options = {};
30524	options.function = 'check_image_import';
30525	jQuery.post('/includes/frontend_ajax.php', options, function(res){
30526
30527		var result = JSON.parse(res);
30528		if (result.success == 1 && result.content != ''){
30529
30530			box.html(result.content);
30531
30532			// Maly pocet obrazkov dame po 1 sekunde
30533			var interval = 5000;
30534			if (result.total > 0 && result.total < 100){ interval = 1000; }
30535			else if (result.total < 500){ interval = 2000; }
30536			else if (result.total < 1000){ interval = 3000; }
30537			else if (result.total < 3000){ interval = 4000; }
30538			else if (result.total < 5000){ interval = 5000; }
30539
30540			// Import pripraveny
30541			if (result.status == 1){
30542
30543				var now = new Date();
30544				var eta_ms = new Date(now.getFullYear(), now.getMonth(), now.getDate(), result.sheduled[0], result.sheduled[1]).getTime() - Date.now();
30545
30546				var timeout = setTimeout(function(){
30547
30548					if (js_image_import_interval == 0){
30549
30550						js_image_import_interval = setInterval(function(){
30551
30552							js_image_import_info();
30553						}, interval);
30554					}
30555				}, eta_ms);
30556			}
30557			// Import bezi
30558			else if(result.status == 2){
30559
30560				if (js_image_import_interval == 0){
30561
30562					js_image_import_interval = setInterval(function(){
30563
30564						js_image_import_info();
30565					}, interval);
30566				}
30567			}
30568			// Import zbehol
30569			else if (result.status == 3){
30570
30571				if (js_image_import_interval > 0) clearInterval(js_image_import_interval);
30572			}
30573			else {
30574
30575				box.remove();
30576				if (js_image_import_interval > 0) clearInterval(js_image_import_interval);
30577			}
30578		} else {
30579
30580			box.remove();
30581			clearInterval(js_image_import_interval);
30582		}
30583		js_image_import_loading = 0;
30584	});
30585}
30586
30587function js_image_import_cancel(){
30588
30589	if ( confirm('Zruší sa import všetkých nespracovaných obrázkov. Pokračovať?') ){
30590
30591		var options = {};
30592		options.function = 'cancel_image_import';
30593		jQuery.post('/includes/frontend_ajax.php', options, function(res){
30594
30595			var result = JSON.parse(res);
30596			if (result.success == 1){
30597
30598				js_image_import_info_close();
30599			}
30600		});
30601	}
30602}
30603
30604function js_image_import_info_close(){
30605
30606	var box = jQuery('.img_import_prog');
30607	box.remove();
30608	var options = {};
30609	if (js_image_import_interval > 0) clearInterval(js_image_import_interval);
30610	js_image_import_loading = 0;
30611	options.function = 'close_image_import';
30612	jQuery.post('/includes/frontend_ajax.php', options, function(res){});
30613}
30614
30615function validateEmail(email){
30616	var re = new RegExp('^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,63}$');
30617	//var re = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
30618
30619    return re.test(email);
30620}
30621
30622function htmlEntities(str) {
30623    return String(str).replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;');
30624}
30625
30626/**
30627 * Nahrada zastaralej/pomalej kiniznice overlib_mini lepsim systemom
30628 * @param {object} elem Html element
30629 * @param {object} data Vysvetlenie v komentoch nizsie
30630 */
30631function cs_overlib(elem, data){
30632
30633	var el = jQuery(elem);
30634	var pos = 'top';
30635	var plugs = [];
30636	var disableTooltipster = data.disableTooltipster || false;
30637
30638	if (el.hasClass('tooltipstered')) return;
30639
30640	if (typeof data.content === 'undefined') return;
30641
30642	if (typeof data.position !== 'undefined'){
30643
30644		if (data.position == 0) pos = 'top';
30645		if (data.position == 1) pos = 'right';
30646		if (data.position == 2) pos = 'bottom';
30647		if (data.position == 3) pos = 'left';
30648	}
30649
30650	if (typeof data.follow !== 'undefined' && data.follow == 1){
30651
30652		//plugs.push('follower');
30653	}
30654
30655	var html = decodeURIComponent(atob(data.content));
30656
30657	var instances = jQuery.tooltipster.instances();
30658	jQuery.each(instances, function(i, instance){
30659	    instance.close();
30660	});
30661
30662	var _show = function(html){
30663		if ( disableTooltipster ) {
30664			el.removeAttr('onmouseover');
30665			el.find('.preview_product_image').html(html);
30666		} else {
30667			el.tooltipster({
30668				plugins: plugs,
30669				theme: ['tooltipster-base', 'tooltipster-overlib'],
30670				content: html+'<div class="cs_overlib_cleaner"></div>',
30671				contentAsHTML: true,
30672				trigger: 'custom',
30673				triggerOpen: {
30674					click: true,  // For mouse
30675					tap: true    // For touch device
30676				},
30677				triggerClose: {
30678					click: true,  // For mouse
30679					tap: true    // For touch device
30680				},
30681				delay: (typeof data.delay !== 'undefined' ? data.delay : 0),
30682				animationDuration: (typeof data.animationDuration !== 'undefined' ? data.animationDuration : 0),
30683				interactive: (typeof data.interactive !== 'undefined'),
30684				side: pos,
30685				functionInit: function(){
30686
30687				}
30688			});
30689
30690			el.tooltipster({
30691				plugins: plugs,
30692				theme: ['tooltipster-base', 'tooltipster-overlib'],
30693				content: html+'<div class="cs_overlib_cleaner"></div>',
30694				contentAsHTML: true,
30695				trigger: (typeof data.trigger !== 'undefined' ? data.trigger : 'hover'),
30696				delay: (typeof data.delay !== 'undefined' ? data.delay : 0),
30697				animationDuration: (typeof data.animationDuration !== 'undefined' ? data.animationDuration : 0),
30698				interactive: (typeof data.interactive !== 'undefined'),
30699				side: pos,
30700				functionInit: function(){
30701
30702				}
30703			});
30704
30705			el.tooltipster('open');
30706		}
30707	};
30708
30709	// Preload obrazkov kvoli dynamickemu setnutiu rozmerov
30710	var _html = jQuery(html);
30711	var imgs = (_html.is('img') ? [_html] : _html.find('img'));
30712	if (imgs.length){
30713
30714		var sources = [];
30715		for(var i=0; i<imgs.length; i++){
30716			sources[i] = imgs[0].attr('src');
30717		}
30718		cs_preload_images(sources, function(images){
30719
30720			for(var i=0; i<imgs.length; i++){
30721
30722				var ratio = 1;
30723				var rx = 0;
30724				var ry = 0;
30725				var width = images[i].width;
30726				var height = images[i].height;
30727				var percentage = 0;
30728
30729				// Aplikujeme maxDim ak je nastavene
30730				if (typeof data.maxDim !== 'undefined' && data.maxDim > 0 && (data.maxDim < width || data.maxDim < height)){
30731
30732					if (width > height) {
30733				        ratio = height/width;
30734				        rx = (width-data.maxDim) * (percentage/100);
30735				        ry = (height-data.maxDim * ratio) * (percentage/100);
30736				        width = rx+data.maxDim;
30737				        height = ry+data.maxDim * ratio;
30738				    } else {
30739				        ratio = width/height;
30740				        rx = (width-data.maxDim * ratio) * (percentage/100);
30741				        ry = (height-data.maxDim) * (percentage/100);
30742				        width = rx+data.maxDim * ratio;
30743				        height = ry+data.maxDim;
30744				    }
30745				}
30746
30747				imgs[0].attr('width', width).attr('height', height);
30748			}
30749			html = _html[0].outerHTML;
30750			_show(html);
30751		});
30752	} else {
30753
30754		_show(html);
30755	}
30756}
30757
30758function getInputSelection(el) {
30759    var start = 0, end = 0, normalizedValue, range, textInputRange, len, endRange;
30760
30761    if (typeof el.selectionStart == "number" && typeof el.selectionEnd == "number") {
30762        start = el.selectionStart;
30763        end = el.selectionEnd;
30764    } else {
30765        range = document.selection.createRange();
30766
30767        if (range && range.parentElement() == el) {
30768            len = el.value.length;
30769            normalizedValue = el.value.replace(/\r\n/g, "\n");
30770
30771            // Create a working TextRange that lives only in the input
30772            textInputRange = el.createTextRange();
30773            textInputRange.moveToBookmark(range.getBookmark());
30774
30775            // Check if the start and end of the selection are at the very end
30776            // of the input, since moveStart/moveEnd doesn't return what we want
30777            // in those cases
30778            endRange = el.createTextRange();
30779            endRange.collapse(false);
30780
30781            if (textInputRange.compareEndPoints("StartToEnd", endRange) > -1) {
30782                start = end = len;
30783            } else {
30784                start = -textInputRange.moveStart("character", -len);
30785                start += normalizedValue.slice(0, start).split("\n").length - 1;
30786
30787                if (textInputRange.compareEndPoints("EndToEnd", endRange) > -1) {
30788                    end = len;
30789                } else {
30790                    end = -textInputRange.moveEnd("character", -len);
30791                    end += normalizedValue.slice(0, end).split("\n").length - 1;
30792                }
30793            }
30794        }
30795    }
30796
30797    return {
30798        start: start,
30799        end: end
30800    };
30801}
30802
30803function js_related_products_show_button(elem){
30804	jQuery(elem).closest('.set_cont').toggleClass('open');
30805}
30806function js_related_products_change_tab(elem){
30807	jQuery(elem).closest('.related_products_set').find('.set_cont.open').removeClass('open');
30808}
30809
30810function cs_preload_images(sources, callback){
30811
30812	if (jQuery.isEmptyObject(sources)){ callback([]); return; }
30813
30814	var completed = 0;
30815	var errors = 0;
30816	var imgs = [];
30817
30818	var complete = function(){
30819		if ((completed + errors) == sources.length) callback(imgs);
30820	};
30821
30822	if (sources.length){
30823
30824		// Load obrazkov
30825		jQuery.each(sources, function(c,s){
30826
30827			imgs[c] = new Image();
30828
30829			imgs[c].onerror = imgs[c].onabort = function(){
30830
30831				errors++;
30832				complete();
30833			};
30834
30835			imgs[c].onload = function(){
30836
30837				completed++;
30838				complete();
30839			};
30840
30841			imgs[c].src = s;
30842		});
30843	} else {
30844
30845		complete();
30846	}
30847}
30848
30849function CsScrollToAnchor(id) {
30850	var e = window.event;
30851
30852    // zabráni default reloadu
30853    if (e.preventDefault) {
30854        e.preventDefault();
30855    } else {
30856        e.returnValue = false; // IE
30857    }
30858
30859    var el = document.getElementById(id);
30860    if (!el) {
30861		return;
30862    }
30863
30864	var headerOffset = 0;
30865
30866	if (document.body.classList.contains('custom_fixed_header')) {
30867		var hdr = document.getElementById('header-inner');
30868		if (hdr) {
30869		    headerOffset = hdr.offsetHeight;
30870			// Definovat v local.js jemne doladenie
30871			if (typeof window.js_anchor_offset_adjust !== 'undefined' && window.js_anchor_offset_adjust < headerOffset) {
30872				headerOffset = headerOffset - window.js_anchor_offset_adjust;
30873			}
30874		}
30875	}
30876
30877    var elementPosition = el.getBoundingClientRect().top;
30878    var offsetPosition = elementPosition + window.pageYOffset - headerOffset;
30879
30880    window.scrollTo({
30881         top: offsetPosition,
30882         behavior: "smooth"
30883    });
30884}
30885
30886/**
30887 * Zasle error na server a vypise ho do konzoli
30888 * @param message
30889 * @param {boolean} [local] Echovat message iba do konzoli
30890 */
30891function cserror(message,local){
30892
30893	try {
30894		throw new Error(message);
30895	} catch (e){
30896		console.error(e.message);
30897		if (typeof local === 'undefined' || !local){
30898			var _e = new ErrorEvent('error', {message:e.message,error:e});
30899            window.dispatchEvent(_e);
30900		}
30901	}
30902}
30903
30904// Pomocna funkcia pre debug kodu, iba pre csuserov!!! NEDAVAT ONLINE !!!
30905function csstack(func, params){
30906
30907	var _params = '';
30908	if (typeof params === 'undefined') _params = '';
30909	else if (typeof params === 'object'){
30910		try{
30911			_params = JSON.stringify(params);
30912		} catch (err){
30913			_params = 'ERROR: '+err;
30914		}
30915		_params = _params.substring(1, _params.length-1);
30916	}
30917
30918	var callstack = '';
30919	var s = new Error().stack;
30920
30921	// Pre browsre nepodporujuce Error constructor
30922	if (s == null || typeof s == 'undefined') {
30923		console.log(func+'( '+_params+' )');
30924		return;
30925	}
30926	var lines = s.split('\n');
30927	lines.shift();
30928	lines.shift();
30929	var rows = (lines.length > 2 ? 2 : 1);
30930	for (var i=0; i < rows; i++){
30931
30932		func = lines[i].match(/^\s*?at\s(.+)\s+?\(.*[?|/](.*)\)/);
30933
30934		if (func !== null){
30935			if (i == 0){
30936				if (typeof func[1] != 'undefined') {
30937					var f = func[1].replace('Object.', '') + '('+_params+')';
30938					if (f.length < 80){
30939						for(var k=f.length; k<80; k++){
30940							f += ' ';
30941						}
30942					}
30943					callstack += f;
30944				}
30945			}
30946		}
30947	}
30948
30949	console.log('%s Stacktrace: %O', callstack, lines);
30950}
30951
30952const messenger = {
30953	body: {},
30954	options: {
30955		delay: 8000
30956	},
30957	init: function(){
30958		messenger.body = jQuery('body');
30959		messenger.activate();
30960	},
30961	check: function(m){
30962
30963		if (typeof m != 'string') return false;
30964		var res = m.indexOf('<div class="msg_wrap">');
30965		if(res != -1) messenger.activate(m);
30966	},
30967	activate: function(m){
30968
30969		if (typeof m === 'string') messenger.body.append(m);
30970		var msg_wrap = messenger.body.find('.msg_wrap');
30971
30972		if (msg_wrap.length){
30973
30974			var time = 8000;
30975			var autohide = true;
30976			msg_wrap.find('.msg_box').each(function(){
30977
30978				var msg = jQuery('<div>').addClass('msg_wrap');
30979				var box = jQuery(this);
30980				time = (box.data('time') ? parseInt(box.data('time')) : messenger.options.delay);
30981				autohide = box.data('autohide') != 0;
30982				msg.html(box[0].outerHTML);
30983				messenger.body.append(msg);
30984
30985				messenger.center(msg);
30986				messenger.body.addClass('messenger_opened');
30987
30988				if (autohide){
30989
30990					window.setTimeout(function(){
30991
30992						msg.fadeOut(300, function(){ jQuery(this).remove(); messenger.body.removeClass('messenger_opened'); });
30993					}, time);
30994				}
30995
30996				msg.on('click', function(){ jQuery(this).remove(); messenger.body.removeClass('messenger_opened'); });
30997			});
30998
30999			msg_wrap.remove();
31000		}
31001	},
31002	center: function(e){
31003
31004		if (e.length > 0){
31005
31006			var ml = (window.screen.width - e.width()) / 2;
31007			var mt = (window.screen.availHeight / 2) - (e.height() / 2);
31008			e.css({'left':ml+'px', 'top':mt+'px'});
31009		}
31010	}
31011};
31012
31013window.addEventListener('DOMContentLoaded', function() {
31014	messenger.init();
31015
31016	// ak uiautocomplete nie je definovany on ready, tak ho definujeme
31017	if ( typeof jQuery.fn.uiautocomplete === 'undefined' && jQuery.fn.autocomplete !== 'undefined' ) {
31018		jQuery.fn.uiautocomplete = jQuery.fn.autocomplete;
31019	}
31020});
31021
31022
31023/* ========================================
31024 FILE: /includes/js/system/system_functions.js
31025 ==================== */
31026
31027//JB pre budúcu funckionalitu sa pridáva keylistener aby sme mali nahodené aký key sa stlačil
31028//pridaná nová funkcionalita
31029window.addEventListener('DOMContentLoaded', function () {
31030
31031	jQuery(document).keydown(function(event) {
31032		pressedKeyValue = event.which;
31033	}).keyup(function(event) {
31034
31035		//keypress nezachytí ESCAPE takže aj tu riešime stlačenie ESC
31036		processKeyUp(event);
31037		delete pressedKeyValue;}
31038	);
31039
31040	if(typeof js_CS_Config_display_comment_ajax_slick !== 'undefined' && js_CS_Config_display_comment_ajax_slick) {
31041		js_comment_slide();
31042	}
31043
31044	if(typeof js_CS_Config_shop_coupon_auto_use_tooltip !== 'undefined' && js_CS_Config_shop_coupon_auto_use_tooltip) {
31045		bindAutoCouponTooltip();
31046	}
31047
31048	if(typeof js_CS_Config_product_active_image_slick !== 'undefined' && js_CS_Config_product_active_image_slick.active) {
31049		bindProductActiveImageSlick();
31050	}
31051
31052	if (typeof js_Config_product_store_reservation !== 'undefined' && js_Config_product_store_reservation) {
31053		toggleProductReservationButton();
31054		if (jQuery("body").hasClass("shop_page_class_shop_browse")) {
31055			myStoreDisableStoreFilter();
31056		}
31057	}
31058
31059	if (history.state && history.state.modalOpen) {
31060		history.back();
31061	}
31062
31063	window.addEventListener('popstate', function() {
31064		if (typeof window['activeVexId'] !== "undefined" && window['activeVexId'] !== null) {
31065			vex.close(window['activeVexId']);
31066		}
31067	});
31068});
31069
31070function processKeyUp(event) {
31071	if (typeof jsOpenedOrderList !== 'undefined' && jsOpenedOrderList.length && event.key === 'Escape') {
31072		var lastOrderId = jsOpenedOrderList.pop();
31073		var orderCloseButtonElement = jQuery('tr.row_order_id_' + lastOrderId).find('a.icon_orders_detail_close:first');
31074		_order.detail.cancel(orderCloseButtonElement, lastOrderId);
31075	} else if (typeof window.jsOpenedCartList !== 'undefined' && window.jsOpenedCartList.length && event.key === 'Escape') {
31076		const lastCartId = window.jsOpenedCartList.pop();
31077		const cartCloseButtonElement = jQuery('tr.cart-list-row[data-id="' + lastCartId + '"] .adminlist-order-bottom-icons .icon_orders_detail_close');
31078		if (cartCloseButtonElement.length) {
31079			cartCloseButtonElement.trigger("click");
31080		}
31081	}
31082}
31083
31084function escapeHtml(text) {
31085	if ( typeof( text ) == 'string' )
31086		return text
31087		.replace(/&/g, "&amp;")
31088		.replace(/</g, "&lt;")
31089		.replace(/>/g, "&gt;")
31090		.replace(/"/g, "&quot;")
31091		.replace(/'/g, "&#039;");
31092}
31093
31094//JB pridaná možnosť pri zmene variantu meniť aj ďalšie dáta (tie čo by mali byť vrámci variantu vykreslené na frontende)
31095function jsChangeVariantAddon(elem) {
31096
31097	var $elem = jQuery(elem);
31098
31099	var $productWrapper = null;
31100
31101	if ($elem.closest('.cs_product_item').length != 0) {
31102		$productWrapper = $elem.closest('.cs_product_item');
31103	} else if ($elem.closest('.flypage1').length != 0) {
31104		$productWrapper = $elem.closest('.flypage1');
31105	} else {
31106		//nemáme wrap -> return
31107		return;
31108	}
31109
31110	productChangeQuantity: if (typeof js_Config_vm_forced_quantity_multiplier != 'undefined' && typeof js_Config_vm_forced_quantity_multiplier.allowVariantQuantityMultiplier != 'undefined') {
31111
31112		//TODO ak má jeden variant nastavené tieto hodnoty -> musia to mať nastavené všetky varianty
31113		// -> riešenie vytvoriť nejakú js premennú v ktorej sa bude uskladňovať pôvodná hodnota
31114		// -> druhé, lepšie riešenie, variantu dať hodnoty hlavného produktu -> tak sa nič nepokazía a vždy bude situácia fungovať
31115
31116
31117		//je potrebné si rozparsovať vybratý variant a len na základe toho zistiť, či vôbec budeme riešiť či sa niečo bude upravovať
31118		var variantData = jsParseVariant($elem.val());
31119
31120		var mQ = variantData.mQ;
31121		var fQ = variantData.fQ;
31122		var MQ = variantData.MQ;
31123//ak nie je nastavené ani fQ ani mQ ani MQ .. nemáme čo riešiť
31124		if ((typeof mQ == 'undefined' || mQ.length == 0) && (typeof fQ == 'undefined' || fQ.length == 0) && (typeof MQ == 'undefined' || MQ.length == 0)) {
31125			//break productChangeQuantity;
31126		}
31127
31128		if ((typeof mQ == 'undefined') && (typeof fQ == 'undefined') && (typeof MQ == 'undefined')) {
31129			//break productChangeQuantity;
31130		}
31131
31132		//v tomto prípade riešime input a tlačidlá +/-ps
31133
31134		var $quantityField = $productWrapper.find('input[name="quantity"]');
31135
31136		var $addButton = $productWrapper.find('a.count_up');
31137		var $subButton = $productWrapper.find('a.count_down');
31138
31139		//v tomto pripade meníme pre input výberu množstva nejakého produktu
31140		if (typeof js_Config_vm_forced_quantity_multiplier.minimumQuantity != 'undefined') {
31141			console.log('realMinimumQuantity');
31142			var realMinimumQuantity = (mQ > 0 ? mQ : 1 );
31143			//$quantityField.data('quantity', realMinimumQuantity);
31144		}
31145
31146		if (typeof js_Config_vm_forced_quantity_multiplier.forcedQuantity != 'undefined') {
31147			var realForcedQuantity = (fQ > 0 ? fQ : 1 );
31148			console.log('realForcedQuantity');
31149			$addButton.data('quantity', parseFloat(realForcedQuantity));
31150			$subButton.data('quantity', parseFloat(realForcedQuantity));
31151			$quantityField.data('forced_quantity', parseFloat(realForcedQuantity));
31152		}
31153
31154		if (typeof js_Config_vm_forced_quantity_multiplier.maximumQuantity != 'undefined') {
31155			var realMaximumQuantity = (MQ > 0 ? MQ : 1 );
31156			console.log('realMaximumQuantity');
31157			$quantityField.data('maximum_quantity', parseFloat(realMaximumQuantity));
31158		}
31159
31160		$quantityField.trigger('blur');
31161	}
31162
31163	if ( typeof js_Config_custom_variant_fields_display !== 'undefined' && typeof js_Config_custom_variant_fields !== 'undefined' ) {
31164		var attributeData = jsParseVariant($elem.val());
31165		js_Config_custom_variant_fields.forEach( function(entry) {
31166			if ( js_Config_custom_variant_fields_display.includes(entry.name) ) {
31167				var elementDiv = jQuery('.flypage_variant_' + entry.name); //Tu sa vypisuje custom field variantu
31168				var mainCustomAttr = jQuery('.flypage_' + entry.name); //Tu sa vypisuje custom field hlavneho produktu
31169				if ( typeof attributeData[entry.name] !== 'undefined' ) {
31170					if ( mainCustomAttr.length > 0 ) {
31171						mainCustomAttr.hide();
31172					}
31173					elementDiv.html('<span class="custom_variant_' + entry.name + '_label">' + entry.title + ':</span><span class="custom_variant_' + entry.name + '_value">' + attributeData[entry.name] + '</span>');
31174				} else {
31175					if ( mainCustomAttr.length > 0 ) {
31176						mainCustomAttr.show();
31177					}
31178					elementDiv.html('');
31179				}
31180			}
31181		});
31182	}
31183
31184	const dayOfDeliveryMultistockWarehouses = config('js_Config_day_of_delivery_multistock_warehouses');
31185	if ( typeof js_Config_shipping_day_of_delivery_show_in_product_details !== 'undefined' && js_Config_shipping_day_of_delivery_show_in_product_details ) {
31186		var elementValue = $elem.val();
31187		var tooltip = jQuery('.delivery-day-tooltip');
31188		if ( typeof tooltip !== 'undefined' && tooltip.find('[data-variant="' + elementValue + '"]').length > 0 ) {
31189			//These shippings already have been loaded so we just need to hide the current one and diplay the selected one
31190			tooltip.hide();
31191			const tooltipContent = tooltip.find('[data-variant="' + elementValue + '"]');
31192			const deliveryDayTooltip = tooltipContent.parent('.delivery-day-tooltip');
31193			deliveryDayTooltip.show();
31194
31195			const earliestDeliveryDate = tooltipContent.data('earliest-delivery-date');
31196			if (earliestDeliveryDate) {
31197				jQuery('.day_of_delivery_availability_container .courier_shipping_text').html(earliestDeliveryDate);
31198			}
31199		} else {
31200			//Load variant deliveries with ajax
31201			var options = {
31202				function: 'getProductVariantShippings',
31203				product_id: js_product_id,
31204				variant: elementValue,
31205			};
31206
31207			if (dayOfDeliveryMultistockWarehouses) {
31208				options.earliestDeliveryDate = true;
31209			}
31210
31211			jQuery.post('/includes/frontend_ajax.php', options, function (res) {
31212				if ( res != '' ) {
31213					//insert after content
31214					var content = JSON.parse(res);
31215					if ( typeof content.tooltip != 'undefined' && content.tooltip != '' ) {
31216						var variantCode = jQuery(content.tooltip).find('.tooltip-content').data().variant;
31217						var pageTooltip = jQuery('.delivery-day-tooltip');
31218						if ( pageTooltip.length > 0 && pageTooltip.find('[data-variant="' + variantCode + '"]').length == 0 ) {
31219							pageTooltip.hide();
31220							jQuery(content.tooltip).insertAfter('.delivery-day-tooltip:last');
31221						} else if ( pageTooltip.length == 0 ) {
31222							jQuery(content.tooltip).appendTo('.flypage-shipping');
31223						}
31224
31225						if (content.earliestDeliveryDate) {
31226							jQuery('.day_of_delivery_availability_container .courier_shipping_text').html(content.earliestDeliveryDate);
31227							jQuery('.delivery-day-tooltip').find('[data-variant="' + variantCode + '"]').data('earliest-delivery-date', content.earliestDeliveryDate);
31228						}
31229					}
31230				}
31231			});
31232		}
31233	}
31234
31235	if (dayOfDeliveryMultistockWarehouses && typeof MultistockWarehousesDayOfDelivery !== 'undefined') {
31236		MultistockWarehousesDayOfDelivery.toggleDeliveryTexts($elem);
31237	}
31238}
31239
31240//táto funckia zabezpečuje po kliknutí na span, aby sa vedľa neho otvoril input, ktorý následne
31241function jsOpenInputFieldForEditing(elem) {
31242	if (typeof pressedKeyValue !== 'undefined' && pressedKeyValue == 17 ) {
31243		elem = jQuery(elem);
31244		var wrapper = elem.closest('div.cs_field_editor');
31245
31246		if (wrapper.find('input').length < 1) {
31247			elem.hide();
31248
31249			var value       = ((elem.data('value') == '- - -' ) ? '' : elem.data('value'));
31250			var placeHolder = ((elem.data('value') == '- - -' ) ? '- - -' : '');
31251			var inputToAppend = jQuery('<input type="text" class="fieldname" placeholder="' + placeHolder + '" onfocus="jsCreateEventlistenerOnFocus(this)"  value="' + value + '"data-default="' + value + '" maxlength="32"/>');
31252			wrapper.append(inputToAppend).find('input').focus();
31253		}
31254
31255	}
31256}
31257
31258function jsCreateEventlistenerOnFocus(elem) {
31259	elem = jQuery(elem);
31260	var wrapper = elem.closest('div.cs_field_editor');
31261	//bindujeme event on change a potom následne event keypress, oba navzájom
31262	elem.unbind('keyup').bind('keyup', function(e) {
31263		jsCheckIfInputChanged(elem);
31264		if (e.key === "Escape"){
31265			wrapper.find('div.cs_field_editor_value').show();
31266			elem.remove();
31267		}
31268
31269	}).unbind('keypress').bind('keypress', function (e) {
31270		elem.removeClass('error');
31271		if (e.which == 13) {
31272			jsEditProductParameter(elem);
31273		}
31274	});
31275}
31276
31277function jsOpenTrustPayPopup(elem) {
31278	elem = jQuery(elem);
31279	var TrustPayFrames = jQuery('[id^=TrustPayFrame]');
31280	if ( TrustPayFrames.length > 1 ) {
31281		TrustPayFrames.attr('id', 'TrustPayFrameInactive');
31282		var activeTrustPayFrame = elem.siblings('[id^=TrustPayFrame]');
31283		activeTrustPayFrame.attr('id', 'TrustPayFrame');
31284		activeTrustPayFrame.css('position', 'fixed');
31285		activeTrustPayFrame.css('left', 0);
31286		activeTrustPayFrame.css('right', 0);
31287		activeTrustPayFrame.css('top', 0);
31288		activeTrustPayFrame.css('bottom', 0);
31289		activeTrustPayFrame.css('width', 0);
31290		activeTrustPayFrame.css('height', 0);
31291		activeTrustPayFrame.css('border', 'none');
31292		activeTrustPayFrame.css('opacity', 0);
31293		activeTrustPayFrame.css('transition', 'opacity .5s ease-in-out');
31294		activeTrustPayFrame.css('zIndex', '99999');
31295		if ( activeTrustPayFrame.css('display') == 'none' ) {
31296			activeTrustPayFrame.show();
31297		}
31298
31299		if (typeof openPopup == 'function' ) {
31300			openPopup();
31301		}
31302	} else {
31303		if ( typeof openPopup == 'function' ) {
31304			openPopup();
31305		}
31306	}
31307}
31308
31309function jsCheckIfInputChanged(elem) {
31310	elem = jQuery(elem);
31311	if (elem.data('default') != elem.val()) {
31312		elem.addClass('changed');
31313	} else {
31314		elem.removeClass('changed');
31315	}
31316}
31317
31318function jsEditProductParameter(elem) {
31319	//pozrieť sa ktoré dáta máme nastaviť, potom ich nastaviť pre daný produkt
31320	elem = jQuery(elem);
31321	var wrapper = elem.closest('div.cs_field_editor');
31322
31323	wrapper.addClass('ajaxLoader');
31324	valueElement = wrapper.find('div.cs_field_editor_value');
31325
31326	var jsonData = {
31327		'productId' : valueElement.data('id'),
31328		'value' : elem.val(),
31329	};
31330
31331	//momentálne len pre produkty.. neriešime zvyšné úpravy
31332
31333	new AjaxRequest(jsonData)
31334		.setMethod('POST')
31335		.setController(valueElement.data('controller'))
31336		.setAction(valueElement.data('action'))
31337		.setAsync(false) //asi nerobi nic
31338		.onSuccess(function (response) {
31339			wrapper.removeClass('ajaxLoader');
31340
31341			valueElement.data('value',elem.val()).html(elem.val()).show();
31342			elem.remove();
31343		})
31344		.onError(function (response) {
31345			wrapper.removeClass('ajaxLoader');
31346			elem.addClass('error');
31347		})
31348		.send();
31349}
31350
31351
31352
31353jQuery.fn.changeElementType = function(newType) {
31354    var attrs = {};
31355    var newelements = [];
31356    jQuery.each(this, function () {
31357    	var elem = this;
31358    	jQuery.each(elem.attributes, function(idx, attr) {
31359			attrs[attr.nodeName] = attr.nodeValue;
31360		});
31361		var newelement = jQuery("<" + newType + "/>", attrs).append(jQuery(elem).contents());
31362		jQuery(elem).replaceWith(newelement);
31363		newelements.push(newelement.get(0));
31364    });
31365    return newelements;
31366};
31367
31368jQuery.fn.getCursorPosition = function() {
31369    var pos = 0;
31370    var el = jQuery(this).get(0);
31371    // IE Support
31372    if (document.selection) {
31373        el.trigger('focus');
31374        var Sel = document.selection.createRange();
31375        var SelLength = document.selection.createRange().text.length;
31376        Sel.moveStart('character', -el.value.length);
31377        pos = Sel.text.length - SelLength;
31378    }
31379    // Firefox support
31380    else if (el.selectionStart || el.selectionStart == '0') {
31381	    pos = el.selectionStart;
31382    }
31383
31384    return pos;
31385};
31386
31387jQuery.fn.startAjaxLoader = function ( loader_image_filename, svg, destination, options = {}) {
31388	svg = typeof svg !== 'undefined';
31389	destination = typeof destination !== 'undefined' ? destination : false;
31390
31391	var addToCartButton = this.find('input[type="submit"].prod_add_to_cart');
31392	var autoloaderHtml;
31393
31394	if (svg) {
31395		autoloaderHtml = '<span class="small_graph_ajax_loader full-page-loader"></span>';
31396	} else {
31397		autoloaderHtml = '<span class="small_graph_ajax_loader"><img src="' + js_global_live_site + '/images/' + (loader_image_filename != null ? loader_image_filename : 'ajax-loader-05.gif') + '" alt="..." /></span>';
31398	}
31399
31400	if ( addToCartButton.length ) {
31401		addToCartButton.prop('disabled', true).after(autoloaderHtml);
31402		//console.log(this, autoloaderHtml);
31403	} else if (this.data('ajax-loader-pre-html-content') == null) {
31404		if (svg && destination) {
31405			jQuery(destination).append(autoloaderHtml);
31406		} else {
31407			if (options.appendHtml) {
31408				this.data('ajax-loader-pre-html-content', this.html()).append(autoloaderHtml);
31409			} else {
31410				this.data('ajax-loader-pre-html-content', this.html()).html(autoloaderHtml);
31411			}
31412		}
31413	}
31414	return this;
31415};
31416
31417jQuery.fn.stopAjaxLoader = function () {
31418	var addToCartButton = this.find('input[type="submit"].prod_add_to_cart');
31419
31420	if ( addToCartButton.length ) {
31421		addToCartButton.prop('disabled', false);
31422	} else if (this.data('ajax-loader-pre-html-content') != null) {
31423		this.html(this.data('ajax-loader-pre-html-content')).removeData('ajax-loader-pre-html-content');
31424	}
31425
31426	this.find('.small_graph_ajax_loader').remove();
31427	return this;
31428};
31429
31430jQuery.fn.inputAllowNumericOnly = function () {
31431	return this.each(function () {
31432		const element = jQuery(this);
31433
31434		element.on("input", () => {
31435			const value = element.val();
31436			const cleaned = value.replace(/\D+/g, "");
31437
31438			if (value !== cleaned) {
31439				element.val(cleaned);
31440
31441				element.tooltipster({
31442					theme: 'tooltipster-noir',
31443					animation: 'fade',
31444					side: 'left',
31445					delay: 10,
31446					timer: 1600
31447				})
31448					.tooltipster('content', js_lang_must_be_number)
31449					.tooltipster('open');
31450			}
31451		});
31452	});
31453};
31454
31455jQuery.fn.ForceNumericOnly = function () {
31456	return this.each(function () {
31457			jQuery(this).on('keydown', function (e) {
31458				var key = e.charCode || e.keyCode || 0;
31459				return (
31460					key == 8 ||
31461					key == 9 ||
31462					key == 13 ||
31463					key == 46 ||
31464					key == 110 ||
31465					key == 190 ||
31466					(key >= 35 && key <= 40) ||
31467					(key >= 48 && key <= 57) ||
31468					(key >= 96 && key <= 105));
31469			});
31470	});
31471};
31472
31473/**
31474 * @desc Replace all occurrences of match except first
31475 * @author Martin Hucko (Hucci)
31476 *
31477 * @param {RegExp|String} searchVal
31478 * @param {String|Function} newVal
31479 * @return {String}
31480 */
31481String.prototype.cs_replaceNotFirst = function(searchVal, newVal) {
31482    return this.replace(searchVal, function(match, offset, all) {
31483        return (all.indexOf(match) === offset) ? match
31484        	: (typeof newVal === 'function') ? newVal(match, offset, all) : newVal;
31485    });
31486};
31487
31488/**
31489 * @desc create slug from string
31490 * @author Martin Hucko (Hucci)
31491 *
31492 * @return {String}
31493 */
31494String.prototype.cs_slugify = function() {
31495	return this.toLowerCase()
31496		.latinize()						// Replace latin characters
31497		.replace(/\s+/g, '-')           // Replace spaces with -
31498		.replace(/[^\w\-]+/g, '')       // Remove all non-word chars
31499		.replace(/\-\-+/g, '-')         // Replace multiple - with single -
31500		.replace(/^-+/, '')             // Trim - from start of text
31501		.replace(/-+$/, '');            // Trim - from end of text
31502};
31503
31504Date.prototype.getWeek = function() {
31505    var determinedate = new Date();
31506    determinedate.setFullYear(this.getFullYear(), this.getMonth(), this.getDate());
31507    var D = determinedate.getDay();
31508    if(D == 0) D = 7;
31509    determinedate.setDate(determinedate.getDate() + (4 - D));
31510    var YN = determinedate.getFullYear();
31511    var ZBDoCY = Math.floor((determinedate.getTime() - new Date(YN, 0, 1, -6)) / 86400000);
31512    var WN = 1 + Math.floor(ZBDoCY / 7);
31513    return WN;
31514};
31515
31516var Latinise={};Latinise.latin_map={"Á":"A","Ă":"A","Ắ":"A","Ặ":"A","Ằ":"A","Ẳ":"A","Ẵ":"A","Ǎ":"A","Â":"A","Ấ":"A","Ậ":"A","Ầ":"A","Ẩ":"A","Ẫ":"A","Ä":"A","Ǟ":"A","Ȧ":"A","Ǡ":"A","Ạ":"A","Ȁ":"A","À":"A","Ả":"A","Ȃ":"A","Ā":"A","Ą":"A","Å":"A","Ǻ":"A","Ḁ":"A","Ⱥ":"A","Ã":"A","Ꜳ":"AA","Æ":"AE","Ǽ":"AE","Ǣ":"AE","Ꜵ":"AO","Ꜷ":"AU","Ꜹ":"AV","Ꜻ":"AV","Ꜽ":"AY","Ḃ":"B","Ḅ":"B","Ɓ":"B","Ḇ":"B","Ƀ":"B","Ƃ":"B","Ć":"C","Č":"C","Ç":"C","Ḉ":"C","Ĉ":"C","Ċ":"C","Ƈ":"C","Ȼ":"C","Ď":"D","Ḑ":"D","Ḓ":"D","Ḋ":"D","Ḍ":"D","Ɗ":"D","Ḏ":"D","Dz":"D","Dž":"D","Đ":"D","Ƌ":"D","DZ":"DZ","DŽ":"DZ","É":"E","Ĕ":"E","Ě":"E","Ȩ":"E","Ḝ":"E","Ê":"E","Ế":"E","Ệ":"E","Ề":"E","Ể":"E","Ễ":"E","Ḙ":"E","Ë":"E","Ė":"E","Ẹ":"E","Ȅ":"E","È":"E","Ẻ":"E","Ȇ":"E","Ē":"E","Ḗ":"E","Ḕ":"E","Ę":"E","Ɇ":"E","Ẽ":"E","Ḛ":"E","Ꝫ":"ET","Ḟ":"F","Ƒ":"F","Ǵ":"G","Ğ":"G","Ǧ":"G","Ģ":"G","Ĝ":"G","Ġ":"G","Ɠ":"G","Ḡ":"G","Ǥ":"G","Ḫ":"H","Ȟ":"H","Ḩ":"H","Ĥ":"H","Ⱨ":"H","Ḧ":"H","Ḣ":"H","Ḥ":"H","Ħ":"H","Í":"I","Ĭ":"I","Ǐ":"I","Î":"I","Ï":"I","Ḯ":"I","İ":"I","Ị":"I","Ȉ":"I","Ì":"I","Ỉ":"I","Ȋ":"I","Ī":"I","Į":"I","Ɨ":"I","Ĩ":"I","Ḭ":"I","Ꝺ":"D","Ꝼ":"F","Ᵹ":"G","Ꞃ":"R","Ꞅ":"S","Ꞇ":"T","Ꝭ":"IS","Ĵ":"J","Ɉ":"J","Ḱ":"K","Ǩ":"K","Ķ":"K","Ⱪ":"K","Ꝃ":"K","Ḳ":"K","Ƙ":"K","Ḵ":"K","Ꝁ":"K","Ꝅ":"K","Ĺ":"L","Ƚ":"L","Ľ":"L","Ļ":"L","Ḽ":"L","Ḷ":"L","Ḹ":"L","Ⱡ":"L","Ꝉ":"L","Ḻ":"L","Ŀ":"L","Ɫ":"L","Lj":"L","Ł":"L","LJ":"LJ","Ḿ":"M","Ṁ":"M","Ṃ":"M","Ɱ":"M","Ń":"N","Ň":"N","Ņ":"N","Ṋ":"N","Ṅ":"N","Ṇ":"N","Ǹ":"N","Ɲ":"N","Ṉ":"N","Ƞ":"N","Nj":"N","Ñ":"N","NJ":"NJ","Ó":"O","Ŏ":"O","Ǒ":"O","Ô":"O","Ố":"O","Ộ":"O","Ồ":"O","Ổ":"O","Ỗ":"O","Ö":"O","Ȫ":"O","Ȯ":"O","Ȱ":"O","Ọ":"O","Ő":"O","Ȍ":"O","Ò":"O","Ỏ":"O","Ơ":"O","Ớ":"O","Ợ":"O","Ờ":"O","Ở":"O","Ỡ":"O","Ȏ":"O","Ꝋ":"O","Ꝍ":"O","Ō":"O","Ṓ":"O","Ṑ":"O","Ɵ":"O","Ǫ":"O","Ǭ":"O","Ø":"O","Ǿ":"O","Õ":"O","Ṍ":"O","Ṏ":"O","Ȭ":"O","Ƣ":"OI","Ꝏ":"OO","Ɛ":"E","Ɔ":"O","Ȣ":"OU","Ṕ":"P","Ṗ":"P","Ꝓ":"P","Ƥ":"P","Ꝕ":"P","Ᵽ":"P","Ꝑ":"P","Ꝙ":"Q","Ꝗ":"Q","Ŕ":"R","Ř":"R","Ŗ":"R","Ṙ":"R","Ṛ":"R","Ṝ":"R","Ȑ":"R","Ȓ":"R","Ṟ":"R","Ɍ":"R","Ɽ":"R","Ꜿ":"C","Ǝ":"E","Ś":"S","Ṥ":"S","Š":"S","Ṧ":"S","Ş":"S","Ŝ":"S","Ș":"S","Ṡ":"S","Ṣ":"S","Ṩ":"S","Ť":"T","Ţ":"T","Ṱ":"T","Ț":"T","Ⱦ":"T","Ṫ":"T","Ṭ":"T","Ƭ":"T","Ṯ":"T","Ʈ":"T","Ŧ":"T","Ɐ":"A","Ꞁ":"L","Ɯ":"M","Ʌ":"V","Ꜩ":"TZ","Ú":"U","Ŭ":"U","Ǔ":"U","Û":"U","Ṷ":"U","Ü":"U","Ǘ":"U","Ǚ":"U","Ǜ":"U","Ǖ":"U","Ṳ":"U","Ụ":"U","Ű":"U","Ȕ":"U","Ù":"U","Ủ":"U","Ư":"U","Ứ":"U","Ự":"U","Ừ":"U","Ử":"U","Ữ":"U","Ȗ":"U","Ū":"U","Ṻ":"U","Ų":"U","Ů":"U","Ũ":"U","Ṹ":"U","Ṵ":"U","Ꝟ":"V","Ṿ":"V","Ʋ":"
31516V","á¹¼":"V","Ꝡ":"VY","Ẃ":"W","Å´":"W","Ẅ":"W","Ẇ":"W","Ẉ":"W","Ẁ":"W","â±²":"W","Ẍ":"X","Ẋ":"X","Ý":"Y","Ŷ":"Y","Ÿ":"Y","Ẏ":"Y","á»´":"Y","Ỳ":"Y","Ƴ":"Y","á»¶":"Y","Ỿ":"Y","Ȳ":"Y","Ɏ":"Y","Ỹ":"Y","Ź":"Z","Ž":"Z","Ẑ":"Z","Ⱬ":"Z","Å»":"Z","Ẓ":"Z","Ȥ":"Z","Ẕ":"Z","Ƶ":"Z","IJ":"IJ","Œ":"OE","ᴀ":"A","ᴁ":"AE","ʙ":"B","ᴃ":"B","ᴄ":"C","ᴅ":"D","ᴇ":"E","ꜰ":"F","É¢":"G","ʛ":"G","ʜ":"H","ɪ":"I","ʁ":"R","ᴊ":"J","ᴋ":"K","ʟ":"L","ᴌ":"L","ᴍ":"M","É´":"N","ᴏ":"O","ɶ":"OE","ᴐ":"O","ᴕ":"OU","ᴘ":"P","ʀ":"R","ᴎ":"N","ᴙ":"R","ꜱ":"S","ᴛ":"T","â±»":"E","ᴚ":"R","ᴜ":"U","á´ ":"V","á´¡":"W","ʏ":"Y","á´¢":"Z","á":"a","ă":"a","ắ":"a","ặ":"a","ằ":"a","ẳ":"a","ẵ":"a","ǎ":"a","â":"a","ấ":"a","ậ":"a","ầ":"a","ẩ":"a","ẫ":"a","ä":"a","ǟ":"a","ȧ":"a","Ç¡":"a","ạ":"a","ȁ":"a","à":"a","ả":"a","ȃ":"a","ā":"a","ą":"a","ᶏ":"a","ẚ":"a","Ã¥":"a","Ç»":"a","ḁ":"a","â±¥":"a","ã":"a","ꜳ":"aa","æ":"ae","ǽ":"ae","Ç£":"ae","ꜵ":"ao","ꜷ":"au","ꜹ":"av","ꜻ":"av","ꜽ":"ay","ḃ":"b","ḅ":"b","ɓ":"b","ḇ":"b","ᵬ":"b","ᶀ":"b","ƀ":"b","ƃ":"b","ɵ":"o","ć":"c","č":"c","ç":"c","ḉ":"c","ĉ":"c","ɕ":"c","ċ":"c","ƈ":"c","ȼ":"c","ď":"d","ḑ":"d","ḓ":"d","È¡":"d","ḋ":"d","ḍ":"d","ɗ":"d","ᶑ":"d","ḏ":"d","áµ­":"d","ᶁ":"d","đ":"d","ɖ":"d","ƌ":"d","ı":"i","È·":"j","ɟ":"j","ʄ":"j","dz":"dz","dž":"dz","é":"e","ĕ":"e","ě":"e","È©":"e","ḝ":"e","ê":"e","ế":"e","ệ":"e","ề":"e","ể":"e","ễ":"e","ḙ":"e","ë":"e","ė":"e","ẹ":"e","ȅ":"e","è":"e","ẻ":"e","ȇ":"e","ē":"e","ḗ":"e","ḕ":"e","ⱸ":"e","ę":"e","ᶒ":"e","ɇ":"e","ẽ":"e","ḛ":"e","ꝫ":"et","ḟ":"f","ƒ":"f","áµ®":"f","ᶂ":"f","ǵ":"g","ğ":"g","ǧ":"g","Ä£":"g","ĝ":"g","Ä¡":"g","É ":"g","ḡ":"g","ᶃ":"g","Ç¥":"g","ḫ":"h","ȟ":"h","ḩ":"h","Ä¥":"h","ⱨ":"h","ḧ":"h","ḣ":"h","ḥ":"h","ɦ":"h","ẖ":"h","ħ":"h","ƕ":"hv","í":"i","Ä­":"i","ǐ":"i","î":"i","ï":"i","ḯ":"i","ị":"i","ȉ":"i","ì":"i","ỉ":"i","ȋ":"i","Ä«":"i","į":"i","ᶖ":"i","ɨ":"i","Ä©":"i","ḭ":"i","ꝺ":"d","ꝼ":"f","áµ¹":"g","ꞃ":"r","ꞅ":"s","ꞇ":"t","ꝭ":"is","ǰ":"j","ĵ":"j","ʝ":"j","ɉ":"j","ḱ":"k","Ç©":"k","Ä·":"k","ⱪ":"k","ꝃ":"k","ḳ":"k","ƙ":"k","ḵ":"k","ᶄ":"k","ꝁ":"k","ꝅ":"k","ĺ":"l","ƚ":"l","ɬ":"l","ľ":"l","ļ":"l","ḽ":"l","È´":"l","ḷ":"l","ḹ":"l","ⱡ":"l","ꝉ":"l","ḻ":"l","ŀ":"l","É«":"l","ᶅ":"l","É­":"l","ł":"l","lj":"lj","Å¿":"s","ẜ":"s","ẛ":"s","ẝ":"s","ḿ":"m","ṁ":"m","ṃ":"m","ɱ":"m","ᵯ":"m","ᶆ":"m","ń":"n","ň":"n","ņ":"n","ṋ":"n","ȵ":"n","ṅ":"n","ṇ":"n","ǹ":"n","ɲ":"n","ṉ":"n","ƞ":"n","áµ°":"n","ᶇ":"n","ɳ":"n","ñ":"n","nj":"nj","ó":"o","ŏ":"o","ǒ":"o","ô":"o","ố":"o","ộ":"o","ồ":"o","ổ":"o","ỗ":"o","ö":"o","È«":"o","ȯ":"o","ȱ":"o","ọ":"o","ő":"o","ȍ":"o","ò":"o","ỏ":"o","Æ¡":"o","ớ":"o","ợ":"o","ờ":"o","ở":"o","ỡ":"o","ȏ":"o","ꝋ":"o","ꝍ":"o","ⱺ":"o","ō":"o","ṓ":"o","ṑ":"o","Ç«":"o","Ç­":"o","ø":"o","Ç¿":"o","õ":"o","ṍ":"o","ṏ":"o","È­":"o","Æ£":"oi","ꝏ":"oo","ɛ":"e","ᶓ":"e","ɔ":"o","ᶗ":"o","È£":"ou","ṕ":"p","ṗ":"p","ꝓ":"p","Æ¥":"p","áµ±":"p","ᶈ":"p","ꝕ":"p","áµ½":"p","ꝑ":"p","ꝙ":"q","Ê ":"q","ɋ":"q","ꝗ":"q","ŕ":"r","ř":"r","ŗ":"r","ṙ":"r","ṛ":"r","ṝ":"r","ȑ":"r","ɾ":"r","áµ³":"r","ȓ":"r","ṟ":"r","ɼ":"r","áµ²":"r","ᶉ":"r","ɍ":"r","ɽ":"r","ↄ":"c","ꜿ":"c","ɘ":"e","É¿":"r","ś":"s","á¹¥":"s","Å¡":"s","á¹§":"s","ş":"s","ŝ":"s","ș":"s","ṡ":"s","á¹£":"s","ṩ":"s","ʂ":"s","áµ´":"s","ᶊ":"s","È¿":"s","É¡":"g","ᴑ":"o","ᴓ":"o","ᴝ":"u","Å¥":"t","Å£":"t","á¹±":"t","ț":"t","ȶ":"t","ẗ":"t","ⱦ":"t","ṫ":"t","á¹­":"t","Æ­":"t","ṯ":"t","áµµ":"t","Æ«":"t","ʈ":"t","ŧ":"t","ᵺ":"th","ɐ":"a","ᴂ":"ae","ǝ":"e","áµ·":"g","É¥":"h","Ê®":"h","ʯ":"h","ᴉ":"i","ʞ":"k","ꞁ":"l","ɯ":"m","ɰ":"m","ᴔ":"oe","ɹ":"r","É»":"r","ɺ":"r","â±¹":"r","ʇ":"t","ʌ":"v","ʍ":"w","ʎ":"y","ꜩ":"tz","ú":"u","Å­":"u","ǔ":"u","û":"u","á¹·":"u","ü":"u","ǘ":"u","ǚ":"u","ǜ":"u","ǖ":"u","á¹³":"u","ụ":"u","ű":"u","ȕ":"u","ù":"u","á»§":"u","ư":"u","ứ":"u","á»±":"u","ừ":"u","á»­":"u","ữ":"u","ȗ":"u","Å«":"u","á¹»":"u","ų":"u","ᶙ":"u","ů":"u","Å©":"u","á¹¹":"u","á¹µ":"u","ᵫ":"ue","ꝸ":"um","â±´":"v","ꝟ":"v","ṿ":"v","ʋ":"v","ᶌ":"v","â±±":"v","á¹½":"v","ꝡ":"vy","ẃ":"w","ŵ":"w","ẅ":"w","ẇ":"w","ẉ":"w","ẁ":"w","â±³":"w","ẘ":"w","ẍ":"x","ẋ":"x","ᶍ":"x","ý":"y","Å·":"y","ÿ":"y","ẏ":"y","ỵ":"y","ỳ":"y","Æ´":"y","á»·":"y","ỿ":"y","ȳ":"y","ẙ":"y","ɏ":"y","ỹ":"y","ź":"z","ž":"z","ẑ":"z","ʑ":"z","ⱬ":"z","ż":"z","ẓ":"z","È¥":"z","ẕ":"z","áµ¶":"z","ᶎ":"z","ʐ":"z","ƶ":"z","ɀ":"z","ff":"ff","ffi":"ffi","ffl":"ffl","fi":"fi","fl":"fl","ij":"ij","œ":"oe","st":"st","ₐ":"a","â
31516‚‘":"e","áµ¢":"i","â±¼":"j","ₒ":"o","áµ£":"r","ᵤ":"u","áµ¥":"v","ₓ":"x"};
31517String.prototype.latinise=function(){return this.replace(/[^A-Za-z0-9\[\] ]/g,function(a){return Latinise.latin_map[a]||a;});};
31518String.prototype.latinize=String.prototype.latinise;
31519String.prototype.isLatin=function(){return this==this.latinise();};
31520var emailProtection = '';
31521
31522// Tu sa inicializuje SimpleModal. Ten sa nachadza v /includes/simple_modal/simple_modal.min.js
31523if (typeof SimpleModal !== 'undefined') {
31524	var simpleModal = new SimpleModal({autoShow: false});
31525}
31526
31527// - - - - - - - - - - - - - - - - - -
31528
31529function protectEmailAddressAsEncodedString(email) {
31530	return  "'"+encodeURI(email)+"'";
31531}
31532
31533function escapeSingleQuote( argList ) {
31534	if (typeof(console) != 'undefined') console.log('argList', argList);
31535	return encodeURI(argList);
31536}
31537
31538function js_html_special_chars( text ) {
31539  return (text.replace(/\</g, '&lt;').replace(/\>/g, '&gt;').replace(/"/g, '&quot;'));
31540}
31541
31542// bez anchor
31543function js_get_current_page_url() {
31544	return (document.location.href).replace(/#[^#]*$/i,'');
31545}
31546
31547// bez parametrov a anchor
31548function js_get_current_page_clean_url() {
31549	return js_get_current_page_url().replace(/\?[^\/\?]*$/,'');
31550}
31551
31552function js_reload_current_page() {
31553  document.location.href = js_get_current_page_url();
31554}
31555
31556function js_reload_page_with_added_params( params ) {
31557
31558  if ( typeof(params) != 'object' || params == null ) {
31559    js_reload_current_page();
31560  }
31561
31562  var orig_location = js_get_current_page_url();
31563  var new_location = orig_location.match(/^[^\?]*/);  // cesta bez parametrov
31564
31565  var location_parameters = '';
31566
31567  if ( new_location == '' ) {
31568    new_location = '/';
31569    location_parameters = orig_location;
31570  }
31571  else {
31572    location_parameters = orig_location.replace( new_location, '' );
31573  }
31574
31575  if ( location_parameters.charAt(0) == '?' ) {
31576    location_parameters = location_parameters.substr(1);
31577  }
31578  location_parameters = location_parameters.split('&');
31579
31580  var has_params = false;
31581  var param_replaced = false;
31582  var name = '';
31583  var encoded_name = '';
31584
31585  // prejdi vsetky parametre, ktore treba pridat
31586  for( name in params ) {
31587
31588    if ( name == '' )
31589      continue;
31590
31591	// fix ktory upravy limitStart na zaklade limitu (mohlo nastat ze sme boli na 1. strane a zacinali od 21 obj/ zak/ prod, a nevedeli sa dostat spat)
31592	if (name == 'limit') {
31593	  var newLimit = parseInt(params[name]);
31594    }
31595
31596	  encoded_name = encodeURIchars( name );
31597
31598    if ( params[name] != null ) {
31599      params[name] = encodeURIchars( params[name] );
31600    }
31601
31602    param_replaced = false;
31603
31604    for ( var i = 0; i < location_parameters.length; i++ ) {
31605
31606      if ( location_parameters[i] == '' ) {
31607        continue;
31608      }
31609
31610	  if ( typeof newLimit !== 'undefined' ) {
31611	  	if( location_parameters[i].indexOf('limitstart') == 0) {
31612		  var limitStart =  parseInt(location_parameters[i].replace('limitstart=', ''));
31613		  if (limitStart > 0) {
31614			  if(newLimit%limitStart != 0 || (limitStart < newLimit)){
31615				  limitStart = Math.floor(limitStart/newLimit)*newLimit;
31616				  location_parameters[i] = ('limitstart='+limitStart.toString());
31617			  }
31618		  }
31619	    }
31620	  }
31621
31622      // nahrad hodnotu existujuceho parametra
31623      if ( location_parameters[i].indexOf( name + '=' ) == 0 || location_parameters[i].indexOf( encoded_name + '=' ) == 0 ) {
31624
31625      	// odstranujeme parameter
31626        if ( params[name] == null ) {
31627          location_parameters[i] = '';
31628        }
31629        else {
31630          location_parameters[i] = ( encoded_name + '=' + params[name] );
31631        }
31632        param_replaced = true;
31633        break;
31634      }
31635    }
31636
31637    if ( param_replaced ) {
31638      continue;
31639    }
31640    // pridanie noveho parametra
31641
31642    if ( params[name] == null ) {
31643      continue;
31644    }
31645
31646    //if ( has_params && new_location.indexOf('?') == 0 ) {
31647    if ( has_params ) {
31648      new_location += '&';
31649    }
31650    else {
31651      new_location += '?';
31652    }
31653
31654    new_location += ( encoded_name + '=' + params[name] );
31655    has_params = true;
31656  }
31657
31658  // pridaj povodne parametre
31659  for ( var i = 0; i < location_parameters.length; i++ ) {
31660
31661    if ( location_parameters[i] == '' ) {
31662      continue;
31663    }
31664
31665    new_location += ((has_params ? '&' : '?') + location_parameters[i]);
31666    has_params = true;
31667  }
31668
31669  document.location.href = new_location;
31670}
31671
31672var urlParams = {};
31673(function () {
31674    var e,
31675        a = /\+/g,  // Regex for replacing addition symbol with a space
31676        r = /([^&=]+)=?([^&]*)/g,
31677        d = function (s) { return decodeURIComponent(s.replace(a, " ")); },
31678        q = window.location.search.substring(1);
31679
31680    while (e = r.exec(q))
31681        urlParams[d(e[1])] = d(e[2]);
31682})();
31683
31684function js_round(x, places, fix) {
31685	var rounded_ret = Math.round(x * Math.pow(10, places)) / Math.pow(10, places);
31686	if (fix && rounded_ret!=parseInt(rounded_ret)) rounded_ret = rounded_ret.toFixed(places);
31687	return rounded_ret;
31688}
31689
31690function doRound(x, places, fix) {
31691	return js_round(x, places, fix);
31692}
31693
31694function js_get_page_scroll() {
31695  var xScroll, yScroll;
31696  if (self.pageYOffset) {
31697    yScroll = self.pageYOffset;
31698    xScroll = self.pageXOffset;
31699  } else if (document.documentElement && document.documentElement.scrollTop) {
31700    yScroll = document.documentElement.scrollTop;
31701    xScroll = document.documentElement.scrollLeft;
31702  } else if (document.body) {// all other Explorers
31703    yScroll = document.body.scrollTop;
31704    xScroll = document.body.scrollLeft;
31705  }
31706  return new Array(xScroll,yScroll);
31707}
31708
31709function js_array_index_of( items, searched_item ) {
31710
31711	if ( typeof(items) != 'object' ) {
31712		return -1;
31713	}
31714
31715  for( var item_id in items ) {
31716    if ( items[item_id] == searched_item )
31717      return item_id;
31718  }
31719  return -1;  // nenasli sme
31720}
31721
31722function js_prettyphoto_close() {
31723  if (jQuery('.pp_pic_holder').length == 0)
31724  	  return false;
31725
31726  jQuery.prettyPhoto.close();
31727  jQuery('body').removeClass('fancybox-lock');
31728  jQuery(document).off('keyup');
31729  return false;
31730}
31731
31732function js_prettyphoto_center() {
31733	var prettyphoto_element = jQuery('.pp_pic_holder:first');
31734	if ( prettyphoto_element.length == 0 )
31735		return;
31736	var page_scroll = js_get_page_scroll();
31737	prettyphoto_element.animate({'left': (page_scroll[0] + Math.round( parseInt(jQuery(window).width()) / 2 ) - Math.round( parseInt(prettyphoto_element.width()) / 2 )).toString() + 'px', 'top': (page_scroll[1] + Math.round( parseInt(jQuery(window).height()) / 2 ) - Math.round( parseInt(prettyphoto_element.height()) / 2 )).toString() + 'px'}, 100);
31738	return;
31739}
31740
31741
31742function js_trim_input_value( input_elements ) {
31743	input_elements = jQuery(input_elements);
31744
31745	if ( input_elements.length == 0 ) {
31746	  return;
31747	}
31748
31749	input_elements.each( function() {
31750		jQuery(this).attr('value', jQuery.trim( jQuery(this).val() ));
31751	});
31752}
31753
31754function js_default_text_input_focus( input_element ) {
31755	input_element = jQuery(input_element);
31756
31757	if ( input_element.hasClass('tooltip_input_def_text') ) {
31758		input_element.attr('value', '').removeClass('tooltip_input_def_text');
31759	}
31760}
31761
31762function js_default_text_input_blur( input_element, default_text, trim ) {
31763	input_element = jQuery(input_element);
31764
31765	if (trim !== false) js_trim_input_value( input_element );
31766
31767	if ( input_element.val() == '' ) {
31768		input_element.attr('value', default_text).addClass('tooltip_input_def_text');
31769	}
31770}
31771
31772function js_select_option_value( select_element, selected_value ) {
31773	select_element = jQuery(select_element);
31774	var selected_option_element = select_element.children('option[value="'+selected_value+'"]:first');
31775
31776	if ( selected_option_element.length == 0 ) {
31777		return;
31778	}
31779
31780	select_element.children('option').removeAttr('selected');
31781	selected_option_element.attr('selected', 'selected');
31782}
31783
31784function js_get_object_length( obj ) {
31785	var size = 0, key = null;
31786	if (obj == null) {
31787		return size;
31788	}
31789
31790	for (key in obj) {
31791		if (obj.hasOwnProperty(key)) size++;
31792	}
31793	return size;
31794};
31795
31796function js_are_objects_identical( obj1, obj2, is_type_strict ) {
31797	if ( typeof(obj1) == 'undefined' || typeof(obj2) == 'undefined' ) {
31798		return false;
31799	}
31800	if ( typeof(obj1) != 'object' || typeof(obj2) != 'object' ) {
31801		return false;
31802	}
31803
31804	if ( js_get_object_length(obj1) != js_get_object_length(obj2) ) {
31805		return false;
31806	}
31807
31808	for (key in obj1) {
31809
31810		if ( !obj1.hasOwnProperty(key) ) {
31811			continue;
31812		}
31813
31814		if ( typeof(obj2[key]) == 'undefined' ) {
31815			return false;
31816		}
31817
31818		if ( obj1[key] != obj2[key] ) {
31819			return false;
31820		}
31821		if ( is_type_strict && typeof(obj1[key]) != typeof(obj2[key]) ) {
31822			return false;
31823		}
31824	}
31825
31826	return true;
31827}
31828
31829function js_clear_css_attribute( element, css_name ) {
31830
31831  if ( css_name != '' ) {
31832    jQuery(element).css(css_name, '');
31833  }
31834}
31835
31836function js_set_css_attribute( element, css_name, css_value ) {
31837
31838  if ( css_name != '' && css_value != '' ) {
31839    jQuery(element).css(css_name, css_value);
31840  }
31841}
31842
31843function js_is_empty( variable ) {
31844
31845  return ( typeof(variable) == 'undefined' || variable == null || (typeof(variable) == 'string' && variable == '') || (typeof(variable.length) != 'undefined' && variable.length == 0) || (typeof(variable) == 'object' && jQuery.isEmptyObject( variable )) );
31846}
31847
31848function js_is_valid_json( obj, params ) {
31849  if ( typeof(obj) != 'object' ) {
31850    return false;
31851  }
31852
31853  if ( typeof(params) != 'object' || params == null ) {
31854  	return true;
31855  }
31856
31857  for( var param in params ) {
31858
31859    if ( typeof(obj[param]) == 'undefined' ) {
31860    	return false;
31861    }
31862
31863    if ( params[param] == null ) {
31864      continue;
31865    }
31866
31867    if ( obj[param] != params[param] ) {
31868    	return false;
31869    }
31870  }
31871  return true;
31872}
31873
31874function js_merge_objects( obj_1, obj_2 ) {
31875  return jQuery.extend(true, {}, obj_1, obj_2);
31876}
31877
31878function js_is_email_banned( email ) {
31879	return ( email.substr(-10) == '@jnxjn.com' || email.substr(-23) == '@guerrillamailblock.com' || email.substr(-16) == '@spamgourmet.com' || email.substr(-10) == 'e4ward.com' || email.substr(-11) == '@spambox.us' || email.substr(-13) == '@pookmail.com' || email.substr(-16) == '@mailmetrash.com' || email.substr(-12) == '@jetable.org' || email.substr(-14) == '@tempemail.net' || /spamfree[24]{0,2}\.[^\.]+$/.exec(email) != null || email.substr(-12) == 'spamspot.com' || email.substr(-7) == 'spam.la' );
31880}
31881
31882function js_check_sef_input_caret( input_element, special_sef ) {
31883	input_element = jQuery(input_element);
31884
31885	if (input_element.length == 0)
31886		return false;
31887
31888	var cur_caret_pos          = input_element.caret().start;
31889	var cur_caret_end_pos      = input_element.caret().end;
31890	var text_from_user         = input_element.val();
31891	var new_text               = '';
31892	var change_position_cursor = false;
31893
31894	if ((text_from_user.search('http') != -1) || (text_from_user.search('https') != -1)) {
31895		// nasiel som "http", alebo "https"
31896		if (text_from_user.search('/') == 0) { // ak na 0.mieste v stringu je "/"
31897			text_from_user = text_from_user.substr(1); // odstrani prvy znak v stringu, cize '/'
31898			//text_from_user = text_from_user.slice(1); // odstrani prvy znak v stringu, cize '/'
31899			change_position_cursor = true;
31900			--cur_caret_pos;
31901			--cur_caret_end_pos;
31902		}
31903
31904		var stringLength = text_from_user.length;
31905		if ((text_from_user.charAt(stringLength - 1) === '/') && (text_from_user.charAt(stringLength - 2) === '/')) {
31906			// ak predposledny a sucasne posledny znak je "/", tak jedno lomitko zmaz
31907			text_from_user = text_from_user.slice(0, -1);
31908		}
31909
31910		new_text = text_from_user;
31911		input_element.val(new_text);
31912		if (change_position_cursor) {
31913			input_element.caret(cur_caret_pos, cur_caret_end_pos);
31914			change_position_cursor = false;
31915		}
31916
31917		return;
31918	} else {
31919		// nenasiel som "http", ani "https"
31920		new_text = '/' + input_element.val().replace(/\s*\//g, '') + '/';
31921		if (typeof(special_sef) != "undefined" && special_sef == 2) {	// povoluje SEF s "/" vo vnutri
31922			//new_text = input_element.val().replace(/^\s*\//, '').replace(/\/\s*$/, '').replace(/\/{2,}/, '/').replace(/ +/, '-').replace(/\-{2,}/, '-') + '/';
31923			new_text = '/' + input_element.val().replace(/^\s*\//, '').replace(/\/\s*$/, '').replace(/\/{2,}/, '/').replace(/ +/, '-').replace(/\-{2,}/, '-') + '/';
31924			//var slash_count = new_text.length - new_text.replace(/\//gi,'').length);
31925		}
31926		if ((typeof(special_sef) != "undefined" && special_sef == 3) || (input_element.val().indexOf('http://') != -1 || input_element.val().indexOf('https://') != -1 || input_element.val().indexOf('www.') != -1)) {
31927			new_text = input_element.val();
31928		} else {
31929			if (input_element.val() != new_text) {
31930				input_element.val(new_text);
31931			}
31932
31933			if (input_element.data('no_caret_change') == '1')
31934				return;
31935
31936			if (!input_element.is(':visible')) {
31937				return;
31938			}
31939
31940			cur_caret_pos     = input_element.caret().start;
31941			cur_caret_end_pos = input_element.caret().end;
31942			//var cur_caret_pos     = input_element.caret().start;
31943			//var cur_caret_end_pos = input_element.caret().end;
31944
31945			if (cur_caret_pos == 0)
31946				cur_caret_pos = 1;
31947
31948			if (cur_caret_pos == input_element.val().length)
31949				cur_caret_pos = input_element.val().length - 1;
31950
31951			if (cur_caret_end_pos == 0)
31952				cur_caret_end_pos = 1;
31953
31954			if (cur_caret_end_pos == input_element.val().length)
31955				cur_caret_end_pos = input_element.val().length - 1;
31956
31957			if (cur_caret_pos == input_element.caret().start && cur_caret_end_pos == input_element.caret().end)
31958				return;
31959
31960			input_element.caret(cur_caret_pos, cur_caret_end_pos);
31961		}
31962
31963	}
31964
31965
31966}
31967
31968
31969
31970function js_bind_sef_input_events( input_element, special_sef ) {
31971
31972  if (typeof js_sef_control_disabled != 'undefined' && js_sef_control_disabled == 1) {
31973	  if(is_cs_user()) {
31974		  console.log('test inside binding -> unreachable');
31975	  }
31976	  return;
31977  }
31978	jQuery(input_element).on('focus keyup click', function () {
31979		js_check_sef_input_caret(jQuery(this), special_sef);
31980	});
31981}
31982function js_multiple_select_option_click(option_element) {
31983	option_element = jQuery(option_element);
31984	if (option_element.val() != '') {
31985		option_element.parents('select:first').find('option[value=""]').prop('selected', false);
31986	}
31987}
31988function js_jq_clearCalendarField(input_jq_selector, container_jq_selector, clear_val, jso ) {
31989	if (typeof(jso) != 'undefined' && jso) {
31990		var jqo = jQuery(jso);
31991		var jqo_container = jqo.parents(container_jq_selector);	//	'.adminlist-edit-main-div.product:first'
31992		if (jqo_container.length > 0) {
31993			var jqo_input = jqo_container.find(input_jq_selector);	//	'[name="'+input_name+'"]:first'
31994			if (jqo_input.length > 0) {
31995				jqo_input.val(clear_val);
31996			}
31997		}
31998	}
31999}
32000
32001function js_jq_showCalendar( id, date_format, jq_jso ) {
32002	if (typeof(jq_jso) != 'undefined' && jq_jso) {
32003		var jqo = jQuery(jq_jso);
32004		var jqo_container = jqo.parents('.adminlist-edit-main-div.product:first');
32005		if (jqo_container.length > 0) {
32006			var el = jqo_container.find('[name="'+id+'"]:first').get(0);
32007		}
32008	} else {
32009		var el = document.getElementById(id);
32010	}
32011	if (calendar != null) {
32012		// we already have one created, so just update it.
32013		calendar.hide();		// hide the existing calendar
32014		calendar.parseDate(el.value); // set it to a new date
32015	} else {
32016		// first-time call, create the calendar
32017		var cal = new Calendar(true, null, selected, closeHandler);
32018		calendar = cal;		// remember the calendar in the global
32019		cal.setRange(1900, 2070);	// min/max year allowed
32020		if (date_format && date_format.indexOf('%') > -1) cal.setDateFormat(date_format);
32021		calendar.create();		// create a popup calendar
32022		calendar.parseDate(el.value); // set it to a new date
32023	}
32024	calendar.sel = el;		// inform it about the input field in use
32025	calendar.showAtElement(el);	// show the calendar next to the input field
32026
32027	// catch mousedown on the document
32028	Calendar.addEvent(document, "mousedown", checkCalendar);
32029	return false;
32030}
32031
32032// general utility for browsing a named array or object
32033function xshow(o) {
32034	s = '';
32035	for(e in o) {s += e+'='+o[e]+'\n';}
32036	alert( s );
32037}
32038
32039/**
32040* Writes a dynamically generated list
32041* @param selectParams string The parameters to insert into the <select> tag
32042* @param source array A javascript array of list options in the form [key,value,text]
32043* @param key string The key to display for the initial state of the list
32044* @param orig_key string The original key that was selected
32045* @param orig_val string The original item value that was selected
32046*/
32047function writeDynaList( selectParams, source, key, orig_key, orig_val ) {
32048	console.log('WRITE DL');
32049	var html = '\n	<select ' + selectParams + '>';
32050	var i = 0;
32051	for (x in source) {
32052		if (source[x][0] == key) {
32053			var selected = '';
32054			if ((orig_key == key && orig_val == source[x][1]) || (i == 0 && orig_key != key)) {
32055				selected = 'selected="selected"';
32056			}
32057			html += '\n		<option value="'+source[x][1]+'" '+selected+'>'+source[x][2]+'</option>';
32058		}
32059		i++;
32060	}
32061	html += '\n	</select>';
32062
32063	document.writeln( html );
32064}
32065
32066/**
32067* Changes a dynamically generated list
32068* @param listname string The name of the list to change
32069* @param source array A javascript array of list options in the form [key,value,text]
32070* @param key string The key to display
32071* @param orig_key string The original key that was selected
32072* @param orig_val string The original item value that was selected
32073*/
32074function changeDynaList( listname, source, key, orig_key, orig_val ) {
32075	var list = eval( 'jQuery(\'[name="' + listname + '"]:first\').get(0)' );
32076
32077	// empty the list
32078	for (i in list.options.length) {
32079		list.options[i] = null;
32080	}
32081	i = 0;
32082	for (x in source) {
32083		if (source[x][0] == key) {
32084			opt = new Option();
32085			opt.value = source[x][1];
32086			opt.text = source[x][2];
32087
32088			if ((orig_key == key && orig_val == opt.value) || i == 0) {
32089				opt.selected = true;
32090			}
32091			list.options[i++] = opt;
32092		}
32093	}
32094	list.length = i;
32095}
32096
32097/**
32098* Adds a select item(s) from one list to another
32099*/
32100function addSelectedToList( frmName, srcListName, tgtListName, jQ, ex_params ) {
32101
32102	var srcList;
32103	var tgtList;
32104
32105	if (typeof(ex_params.imagefiles_jq_selector) != 'undefined' && typeof(ex_params.imagelist_jq_selector) != 'undefined' && typeof(jQuery) != 'undefined') {
32106		srcList = jQuery(ex_params.imagefiles_jq_selector).get(0);
32107		tgtList = jQuery(ex_params.imagelist_jq_selector).get(0);
32108	} else {
32109		var form = eval( 'document.' + frmName );
32110		if (jQ) {
32111			srcList = jQuery("form[name='"+frmName+"'] select[name='"+srcListName+"']").get(0);
32112			tgtList = jQuery("form[name='"+frmName+"'] select[name='"+tgtListName+"']").get(0);
32113		} else {
32114			srcList = eval( 'form.' + srcListName );
32115			tgtList = eval( 'form.' + tgtListName );
32116		}
32117	}
32118
32119	if ( typeof srcList === 'undefined' || typeof tgtList === 'undefined' ) {
32120		return;
32121	}
32122
32123	var srcLen = srcList.length;
32124	var tgtLen = tgtList.length;
32125	var tgt = "x";
32126
32127	//build array of target items
32128	for (var i=tgtLen-1; i > -1; i--) {
32129		tgt += "," + tgtList.options[i].value + ",";
32130	}
32131
32132	//Pull selected resources and add them to list
32133	//for (var i=srcLen-1; i > -1; i--) {
32134	for (var i=0; i < srcLen; i++) {
32135		if (srcList.options[i].selected && tgt.indexOf( "," + srcList.options[i].value + "," ) == -1) {
32136
32137				var subFolderPath = jQuery(srcList).closest('.admin-product-edit-active-images').find('select[name="folders"] option:selected').val();
32138				//Zbavenie sa Lomitka pri tahani subFoldru
32139				subFolderPath = (subFolderPath[0] == '/') ? subFolderPath.substr(1) : subFolderPath;
32140				opt = new Option(srcList.options[i].text, subFolderPath + srcList.options[i].text);
32141				tgtList.options[tgtList.length] = opt;
32142
32143				//opt = new Option(srcList.options[i].text, srcList.options[i].value );
32144				//tgtList.options[tgtList.length] = opt;
32145		}
32146	}
32147}
32148
32149function delSelectedFromList( frmName, srcListName, ex_params ) {
32150	if (typeof(ex_params.imagelist_jq_selector) != 'undefined' && typeof(jQuery) != 'undefined') {
32151		var srcList = jQuery(ex_params.imagelist_jq_selector).get(0);
32152	} else {
32153		var form = eval( 'document.' + frmName );
32154		var srcList = eval( 'form.' + srcListName );
32155	}
32156
32157	var srcLen = srcList.length;
32158
32159	for (var i=srcLen-1; i > -1; i--) {
32160		if (srcList.options[i].selected) {
32161			srcList.options[i] = null;
32162		}
32163	}
32164}
32165
32166function moveInList( frmName, srcListName, index, to, jQ, ex_params ) {
32167	if (ex_params != null && typeof(ex_params.imagelist_jq_selector) != 'undefined' && typeof(jQuery) != 'undefined') {
32168		var srcList = jQuery(ex_params.imagelist_jq_selector).get(0);
32169		index = jQuery(ex_params.imagelist_jq_selector).find('option:selected').index();
32170	} else {
32171		if (jQ) {
32172			var srcList = jQuery("form[name='"+frmName+"'] select[name='"+srcListName+"']").get(0);
32173		} else {
32174			var form = eval( 'document.' + frmName );
32175			var srcList = eval( 'form.' + srcListName );
32176		}
32177	}
32178	var total = srcList.options.length-1;
32179
32180	if (index == -1) {
32181		return false;
32182	}
32183	if (to == +1 && index == total) {
32184		return false;
32185	}
32186	if (to == -1 && index == 0) {
32187		return false;
32188	}
32189
32190	var items = new Array;
32191	var values = new Array;
32192
32193	var classes = new Array;
32194
32195	for (i=total; i >= 0; i--) {
32196		items[i] = srcList.options[i].text;
32197		values[i] = srcList.options[i].value;
32198			classes[i] = jQuery(srcList.options[i]).attr('class');
32199	}
32200	for (i = total; i >= 0; i--) {
32201		if (index == i) {
32202			srcList.options[i + to] = new Option(items[i],values[i], 0, 1);
32203			srcList.options[i] = new Option(items[i+to], values[i+to]);
32204				jQuery(srcList.options[i + to]).addClass(classes[i]);
32205				jQuery(srcList.options[i]).addClass(classes[i + to]);
32206			i--;
32207		} else {
32208			srcList.options[i] = new Option(items[i], values[i]);
32209				jQuery(srcList.options[i]).addClass(classe
32209s[i]);
32210		}
32211	}
32212
32213	if (typeof srcList === 'object' && srcList.length) jQuery(srcList).trigger('focus');
32214}
32215
32216function getSelectedOption( frmName, srcListName ) {
32217	var form = eval( 'document.' + frmName );
32218	var srcList = eval( 'form.' + srcListName );
32219
32220	i = srcList.selectedIndex;
32221	if (i != null && i > -1) {
32222		return srcList.options[i];
32223	} else {
32224		return null;
32225	}
32226}
32227
32228function setSelectedValue( frmName, srcListName, value ) {
32229	var form = eval( 'document.' + frmName );
32230	var srcList = eval( 'form.' + srcListName );
32231
32232	var srcLen = srcList.length;
32233
32234	for (var i=0; i < srcLen; i++) {
32235		srcList.options[i].selected = false;
32236		if (srcList.options[i].value == value) {
32237			srcList.options[i].selected = true;
32238		}
32239	}
32240}
32241
32242function getSelectedRadio( frmName, srcGroupName ) {
32243	var form = eval( 'document.' + frmName );
32244	var srcGroup = eval( 'form.' + srcGroupName );
32245
32246	if (srcGroup[0]) {
32247		for (var i=0, n=srcGroup.length; i < n; i++) {
32248			if (srcGroup[i].checked) {
32249				return srcGroup[i].value;
32250			}
32251		}
32252	} else {
32253		if (srcGroup.checked) {
32254			return srcGroup.value;
32255		} // if the one button is checked, return zero
32256	}
32257   // if we get to this point, no radio button is selected
32258   return null;
32259}
32260
32261function getSelectedValue( frmName, srcListName ) {
32262	var form = eval( 'document.' + frmName );
32263	var srcList = eval( 'form.' + srcListName );
32264
32265	i = srcList.selectedIndex;
32266	if (i != null && i > -1) {
32267		return srcList.options[i].value;
32268	} else {
32269		return null;
32270	}
32271}
32272
32273function getSelectedText( frmName, srcListName ) {
32274	var form = eval( 'document.' + frmName );
32275	var srcList = eval( 'form.' + srcListName );
32276
32277	i = srcList.selectedIndex;
32278	if (i != null && i > -1) {
32279		return srcList.options[i].text;
32280	} else {
32281		return null;
32282	}
32283}
32284
32285function chgSelectedValue( frmName, srcListName, value ) {
32286	var form = eval( 'document.' + frmName );
32287	var srcList = eval( 'form.' + srcListName );
32288
32289	i = srcList.selectedIndex;
32290	if (i != null && i > -1) {
32291		srcList.options[i].value = value;
32292		return true;
32293	} else {
32294		return false;
32295	}
32296}
32297
32298function jq_showImageProps( base_path, ex_params) {
32299//id="images-page461"
32300//if (typeof(console) != 'undefined') console.log(ex_params);
32301	if (typeof(ex_params.imagelist_jq_selector) != 'undefined' && typeof(ex_params.view_imagelist_jq_selector) != 'undefined') {
32302		value = jQuery(ex_params.imagelist_jq_selector+' option:selected').val();
32303		if (typeof value !== 'undefined' && value != '') {
32304			parts = value.split( '|' );
32305			var view_imagelist = jQuery(ex_params.view_imagelist_jq_selector).get(0);
32306				var imagelist_jq_selector = jQuery(ex_params.view_imagelist_jq_selector);
32307				if(jQuery(ex_params.imagelist_jq_selector+' option:selected').hasClass('removed')){
32308					if(!jQuery('img[name="view_imagelist"]').parent().find('span.error').length){
32309						imagelist_jq_selector.after('<span class="error">'+ cms_js_lang_product_img_path_change + ' ('+parts[0]+')</span>');
32310
32311					} else {
32312						jQuery('img[name="view_imagelist"]').parent().find('span.error').text( cms_js_lang_product_img_path_change+ ' ('+parts[0]+')');
32313
32314					}
32315					console.log(imagelist_jq_selector.closest('span .error').length);
32316					imagelist_jq_selector.hide();
32317				} else {
32318					imagelist_jq_selector.show();
32319					jQuery('img[name="view_imagelist"]').parent().find('span.error').remove();
32320					view_imagelist.src = base_path + parts[0];
32321				}
32322		}
32323	}
32324}
32325
32326function applyImageProps() {
32327	form = document.adminForm;
32328	if (!getSelectedValue( 'adminForm', 'imagelist' )) {
32329		alert( "Select and image from the list" );
32330		return;
32331	}
32332	value = form._source.value + '|'
32333	+ getSelectedValue( 'adminForm', '_align' ) + '|'
32334	+ form._alt.value + '|'
32335	+ parseInt( form._border.value ) + '|'
32336	+ form._caption.value + '|'
32337	+ getSelectedValue( 'adminForm', '_caption_position' ) + '|'
32338	+ getSelectedValue( 'adminForm', '_caption_align' ) + '|'
32339	+ form._width.value;
32340	chgSelectedValue( 'adminForm', 'imagelist', value );
32341}
32342
32343function previewImage( list, image, base_path, ex_params ) {
32344	//	calim
32345	var srcList;
32346	var srcImage;
32347
32348	if (typeof(ex_params.imagefiles_jq_selector) != 'undefined' && typeof(ex_params.view_imagefiles_jq_selector) != 'undefined' && typeof(jQuery) != 'undefined') {
32349
32350		srcList = jQuery(ex_params.imagefiles_jq_selector).get(0);
32351		srcImage = jQuery(ex_params.view_imagefiles_jq_selector).get(0);
32352
32353	} else {
32354
32355		var form = document.adminForm;
32356		srcList = eval( "form." + list );
32357		srcImage = eval( "document." + image );
32358	}
32359
32360	if (srcList.selectedIndex >= 0) {
32361
32362		var fileName = srcList.options[srcList.selectedIndex].text;
32363		var fileName2 = srcList.options[srcList.selectedIndex].value;
32364		if (fileName.length == 0 || fileName2.length == 0) {
32365			srcImage.src = 'images/blank.gif';
32366		} else {
32367			srcImage.src = base_path + fileName2;
32368		}
32369	}
32370}
32371
32372// Form specific functions for editting content images
32373
32374function showImageProps( base_path, ex_params ) {
32375	if (typeof(ex_params.func) != "undefined" && ex_params.func == "jq_showImageProps" && typeof(jQuery) != 'undefined') {
32376		return jq_showImageProps(base_path, ex_params);
32377	}
32378	form = document.adminForm;
32379	value = getSelectedValue( 'adminForm', 'imagelist' );
32380	parts = value.split( '|' );
32381	form._source.value = parts[0];
32382	setSelectedValue( 'adminForm', '_align', parts[1] || '' );
32383	form._alt.value = parts[2] || '';
32384	form._border.value = parts[3] || '0';
32385	form._caption.value = parts[4] || '';
32386	setSelectedValue( 'adminForm', '_caption_position', parts[5] || '' );
32387	setSelectedValue( 'adminForm', '_caption_align', parts[6] || '' );
32388	form._width.value = parts[7] || '';
32389
32390	//previewImage( 'imagelist', 'view_imagelist', base_path );
32391	var srcImage = eval( "document." + 'view_imagelist' );
32392	srcImage.src = base_path + parts[0];
32393}
32394
32395/**
32396 * Toggles the check state of a group of boxes
32397 *
32398 * Checkboxes must have an id attribute in the form cb0, cb1...
32399 * @param The number of box to 'check'
32400 * @param An alternative field name
32401*/
32402function checkAll( n, fldName ) {
32403  if (!fldName) {
32404     fldName = 'cb';
32405  }
32406	var f = document.adminForm;
32407	var c = f.toggle.checked;
32408	var n2 = 0;
32409	for (i=0; i < n; i++) {
32410		cb = eval( 'f.' + fldName + '' + i );
32411		if (cb) {
32412			cb.checked = c;
32413			n2++;
32414		}
32415	}
32416	if (c) {
32417		document.adminForm.boxchecked.value = n2;
32418	} else {
32419		document.adminForm.boxchecked.value = 0;
32420	}
32421}
32422
32423function listItemTask( id, task ) {
32424    var f = document.adminForm;
32425    cb = eval( 'f.' + id );
32426    if (cb) {
32427        for (i = 0; true; i++) {
32428            cbx = eval('f.cb'+i);
32429            if (!cbx) break;
32430            cbx.checked = false;
32431        } // for
32432        cb.checked = true;
32433        f.boxchecked.value = 1;
32434        submitbutton(task);
32435    }
32436    return false;
32437}
32438
32439function hideMainMenu()
32440{
32441	document.adminForm.hidemainmenu.value=1;
32442}
32443
32444function isChecked(isitchecked){
32445
32446	if ( typeof document.adminForm.boxchecked !== 'undefined' ) {
32447		if (isitchecked == true) {
32448			document.adminForm.boxchecked.value++;
32449		}
32450		else {
32451			document.adminForm.boxchecked.value--;
32452		}
32453	}
32454}
32455
32456/**
32457* Default function.  Usually would be overriden by the component
32458*/
32459function submitbutton(pressbutton) {
32460	submitform(pressbutton);
32461}
32462
32463/**
32464* Submit the admin form
32465*/
32466function submitform(pressbutton){
32467	document.adminForm.task.value=pressbutton;
32468	try {
32469		document.adminForm.onsubmit();
32470		}
32471	catch(e){}
32472	document.adminForm.submit();
32473}
32474
32475/**
32476* Submit the control panel admin form
32477*/
32478function submitcpform(sectionid, id){
32479	document.adminForm.sectionid.value=sectionid;
32480	document.adminForm.id.value=id;
32481	submitbutton("edit");
32482}
32483
32484/**
32485* Getting radio button that is selected.
32486*/
32487function getSelected(allbuttons){
32488	for (i=0;i<allbuttons.length;i++) {
32489		if (allbuttons[i].checked) {
32490			return allbuttons[i].value;
32491		}
32492	}
32493}
32494
32495// JS Calendar
32496var calendar = null; // remember the calendar object so that we reuse
32497// it and avoid creating another
32498
32499// This function gets called when an end-user clicks on some date
32500function selected(cal, date) {
32501	cal.sel.value = date; // just update the value of the input field
32502	if ( is_cs_user('separate_js') ) {
32503		console.log(date);
32504	}
32505	jQuery(cal.sel).trigger('change'); // trigger event after input value replace
32506}
32507// And this gets called when the end-user clicks on the _selected_ date,
32508// or clicks the "Close" (X) button.  It just hides the calendar without
32509// destroying it.
32510function closeHandler(cal) {
32511	cal.hide();			// hide the calendar
32512
32513	// don't check mousedown on document anymore (used to be able to hide the
32514	// calendar when someone clicks outside it, see the showCalendar function).
32515	Calendar.removeEvent(document, "mousedown", checkCalendar);
32516}
32517
32518// This gets called when the user presses a mouse button anywhere in the
32519// document, if the calendar is shown.  If the click was outside the open
32520// calendar this function closes it.
32521function checkCalendar(ev) {
32522	var el = Calendar.is_ie ? Calendar.getElement(ev) : Calendar.getTargetElement(ev);
32523	for (; el != null; el = el.parentNode)
32524	// FIXME: allow end-user to click some link without closing the
32525	// calendar.  Good to see real-time stylesheet change :)
32526	if (el == calendar.element || el.tagName == "A") break;
32527	if (el == null) {
32528		// calls closeHandler which should hide the calendar.
32529		calendar.callCloseHandler(); Calendar.stopEvent(ev);
32530	}
32531}
32532
32533// This function shows the calendar under the element having the given id.
32534// It takes care of catching "mousedown" signals on document and hiding the
32535// calendar if the click was outside.
32536function showCalendar( id, date_format, jq_jso ) {
32537	if (typeof(jq_jso) != 'undefined' && jq_jso) {
32538		var jqo = jQuery(jq_jso);
32539		var jqo_container = jqo.parents('.adminlist-edit-main-div.product:first');
32540		if (jqo_container.length > 0) {
32541			var el = jqo_container.find('[name="'+id+'"]:first').get(0);
32542		}
32543	} else {
32544		var el = document.getElementById(id);
32545	}
32546	if (calendar != null) {
32547		// we already have one created, so just update it.
32548		calendar.hide();		// hide the existing calendar
32549		calendar.parseDate(el.value); // set it to a new date
32550	} else {
32551		// first-time call, create the calendar
32552		var cal = new Calendar(true, null, selected, closeHandler);
32553		calendar = cal;		// remember the calendar in the global
32554		cal.setRange(1900, 2070);	// min/max year allowed
32555		if (date_format && date_format.indexOf('%') > -1) cal.setDateFormat(date_format);
32556		calendar.create();		// create a popup calendar
32557		calendar.parseDate(el.value); // set it to a new date
32558	}
32559	calendar.sel = el;		// inform it about the input field in use
32560	calendar.showAtElement(el);	// show the calendar next to the input field
32561
32562	// catch mousedown on the document
32563	Calendar.addEvent(document, "mousedown", checkCalendar);
32564	return false;
32565}
32566
32567/**
32568* Pops up a new window in the middle of the screen
32569*/
32570function popupWindow(mypage, myname, w, h, scroll) {
32571	var winl = (screen.width - w) / 2;
32572	var wint = (screen.height - h) / 2;
32573	winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable';
32574	win = window.open(mypage, myname, winprops);
32575	if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
32576}
32577
32578// LTrim(string) : Returns a copy of a string without leading spaces.
32579function ltrim(str)
32580{
32581   var whitespace = new String(" \t\n\r");
32582   var s = new String(str);
32583   if (whitespace.indexOf(s.charAt(0)) != -1) {
32584      var j=0, i = s.length;
32585      while (j < i && whitespace.indexOf(s.charAt(j)) != -1)
32586         j++;
32587      s = s.substring(j, i);
32588   }
32589   return s;
32590}
32591
32592//RTrim(string) : Returns a copy of a string without trailing spaces.
32593function rtrim(str)
32594{
32595   var whitespace = new String(" \t\n\r");
32596   var s = new String(str);
32597   if (whitespace.indexOf(s.charAt(s.length-1)) != -1) {
32598      var i = s.length - 1;       // Get length of string
32599      while (i >= 0 && whitespace.indexOf(s.charAt(i)) != -1)
32600         i--;
32601      s = s.substring(0, i+1);
32602   }
32603   return s;
32604}
32605
32606// Trim(string) : Returns a copy of a string without leading or trailing spaces
32607function trim(str) {
32608   return rtrim(ltrim(str));
32609}
32610
32611function mosDHTML(){
32612	this.ver=navigator.appVersion;
32613	this.agent=navigator.userAgent;
32614	this.dom=document.getElementById?1:0;
32615	this.opera5=this.agent.indexOf("Opera 5")<-1;
32616	this.ie5=(this.ver.indexOf("MSIE 5")<-1 && this.dom && !this.opera5)?1:0;
32617	this.ie6=(this.ver.indexOf("MSIE 6")<-1 && this.dom && !this.opera5)?1:0;
32618	this.ie4=(document.all && !this.dom && !this.opera5)?1:0;
32619	this.ie=this.ie4||this.ie5||this.ie6;
32620	this.mac=this.agent.indexOf("Mac")<-1;
32621	this.ns6=(this.dom && parseInt(this.ver) <= 5) ?1:0;
32622	this.ns4=(document.layers && !this.dom)?1:0;
32623	this.bw=(this.ie6||this.ie5||this.ie4||this.ns4||this.ns6||this.opera5);
32624
32625	this.activeTab = '';
32626	this.onTabStyle = 'ontab';
32627	this.offTabStyle = 'offtab';
32628
32629	this.setElemStyle = function(elem,style) {
32630		document.getElementById(elem).className = style;
32631	};
32632	this.showElem = function(id) {
32633		if (elem = document.getElementById(id)) {
32634			elem.style.visibility = 'visible';
32635			elem.style.display = 'block';
32636		}
32637	};
32638	this.hideElem = function(id) {
32639		if (elem = document.getElementById(id)) {
32640			elem.style.visibility = 'hidden';
32641			elem.style.display = 'none';
32642		}
32643	};
32644	this.cycleTab = function(name) {
32645		if (this.activeTab) {
32646			this.setElemStyle( this.activeTab, this.offTabStyle );
32647			page = this.activeTab.replace( 'tab', 'page' );
32648			this.hideElem(page);
32649		}
32650		this.setElemStyle( name, this.onTabStyle );
32651		this.activeTab = name;
32652		page = this.activeTab.replace( 'tab', 'page' );
32653		this.showElem(page);
32654	};
32655	return this;
32656}
32657var dhtml = new mosDHTML();
32658
32659function MM_findObj(n, d) { //v4.01
32660	var p,i,x;
32661	if(!d) d=document;
32662	if((p=n.indexOf("?"))>0&&parent.frames.length) {
32663		d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);
32664	}
32665	if(!(x=d[n])&&d.all) x=d.all[n];
32666	for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
32667	for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
32668	if(!x && d.getElementById) x=d.getElementById(n);
32669	return x;
32670}
32671function MM_swapImage() { //v3.0
32672	var i,j=0,x,a=MM_swapImage.arguments;
32673	document.MM_sr=new Array;
32674	for(i=0;i<(a.length-2);i+=3)
32675	if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x;
32676	if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
32677}
32678function MM_swapImgRestore() { //v3.0
32679	var i,x,a=document.MM_sr;
32680	for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
32681}
32682
32683function MM_preloadImages() { //v3.0
32684	var d=document;
32685	if(d.images){
32686	if(!d.MM_p) d.MM_p=new Array();
32687	var i,j=d.MM_p.length,a=MM_preloadImages.arguments;
32688	for(i=0; i<a.length; i++)
32689	if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
32690}
32691
32692
32693function saveorder( n, ls, lm, save_order_func ) {
32694	if (!isNaN(ls) && !isNaN(lm)) {
32695		if (!(ls==0 && lm >= (n+1))) {
32696			alert('Pre uloženie zmien poradia je potrebné zvoliť zobrazenie všetkých (resp. aspoň '+(n+1)+') položiek.');
32697			return;
32698		}
32699	}
32700	checkAll_button( n, save_order_func );
32701}
32702
32703//needed by saveorder function
32704function checkAll_button( n, save_order_func ) {
32705	for ( var j = 0; j <= n; j++ ) {
32706		box = eval( "document.adminForm.cb" + j );
32707		if ( box ) {
32708			if ( box.checked == false ) {
32709				box.checked = true;
32710			}
32711		} else {
32712			alert("You cannot change the order of items, as an item in the list is `Checked Out`");
32713			return;
32714		}
32715	}
32716	if (!isNaN(save_order_func)) submitform(save_order_func);
32717	//if (save_order_func!='') submitform(save_order_func);
32718	else submitform('saveorder');
32719}
32720/**
32721* @param object A form element
32722* @param string The name of the element to find
32723*/
32724function getElementByName( f, name ) {
32725	if (f.elements) {
32726		for (i=0, n=f.elements.length; i < n; i++) {
32727			if (f.elements[i].name == name) {
32728				return f.elements[i];
32729			}
32730		}
32731	}
32732	return null;
32733}
32734
32735function cs_set_cookie ( name, value, expires, path, domain, secure ) {
32736	var today = new Date(); // set time, it's in milliseconds
32737	today.setTime( today.getTime() );
32738
32739	if ( expires ) { // if the expires variable is set, make the correct expires time, the current script below will set it for x number of days, to make it for hours, delete * 24, for minutes, delete * 60 * 24
32740	expires = expires * 1000 * 60 * 60 * 24;
32741	}
32742	var expires_date = new Date( today.getTime() + (expires) );
32743
32744	document.cookie = name + "=" +escape( value ) + ( ( expires ) ? ";expires=" + expires_date.toGMTString() : "" ) + ( ( path ) ? ";path=" + path : "" ) + ( ( domain ) ? ";domain=" + domain : "" ) + ( ( secure ) ? ";secure" : "" );
32745}
32746
32747function cs_get_cookie( name ) {
32748	var start = document.cookie.indexOf( name + "=" );
32749	var len = start + name.length + 1;
32750	if ( ( !start ) && ( name != document.cookie.substring( 0, name.length ) ) ) {
32751		return null;
32752	}
32753	if ( start == -1 ) return null;
32754	var end = document.cookie.indexOf( ";", len );
32755	if ( end == -1 ) end = document.cookie.length;
32756	return unescape( document.cookie.substring( len, end ) );
32757}
32758
32759function encodeURIchars ( text ) {
32760	//	funkcia zakoduje text, ktory sa ma pouzit ako parameter v URL
32761	return encodeURIComponent(text).replace('~','%7E').replace('!','%21').replace('*','%2A').replace('(','%28').replace(')','%29').replace('\'','%27');
32762}
32763
32764// Create XML request variable
32765var ajaxGlobalRequest = false;
32766
32767// function ajaxAsyncContainer() {
32768// 	if (!ajaxGlobalRequestObjectList) ajaxGlobalRequestObjectList = new Array();
32769// 	ajaxGlobalRequestObjectList[ajaxGlobalRequestObjectList.length] = '1';
32770// 	alert(ajaxGlobalRequestObjectList.length);
32771// }
32772
32773function ajaxSyncProcess ( myURL, requestPostParams, requestHeaderContentType, requestMimeType ) {
32774     // Clear ajaxGlobalRequest
32775     ajaxGlobalRequest = false;
32776     // For browsers: Safari, Firefox, etc. use one XML model
32777     if (window.XMLHttpRequest) {
32778          ajaxGlobalRequest = new XMLHttpRequest();
32779          if (requestMimeType==null) ajaxGlobalRequest.overrideMimeType('text/html');	//	text/html, text/xml
32780//           if (ajaxGlobalRequest.overrideMimeType && requestHeaderContentType==null && requestPostParams==null) {
32781//                ajaxGlobalRequest.overrideMimeType('text/xml');
32782//           }
32783     } else if (window.ActiveXObject) {
32784          // For browsers: IE, version 6 and before, use another model
32785          try {
32786               ajaxGlobalRequest = new
32787                    ActiveXObject("Msxml2.XMLHTTP");
32788          } catch (e) {
32789               try {
32790                    ajaxGlobalRequest = new
32791                         ActiveXObject("Microsoft.XMLHTTP");
32792               } catch (e) {}
32793          }
32794     }
32795     // Make sure the request object is valid
32796     if (!ajaxGlobalRequest) {
32797          alert('AJAX ERROR: Cannot create XMLHTTP object');
32798          return false;
32799     }
32800     // Open the URL request
32801     if (requestPostParams==null) {
32802	     ajaxGlobalRequest.open('get', myURL, false);		//	SYNC (waiting mode)
32803     } else {
32804	     ajaxGlobalRequest.open('post', myURL, false);		//	SYNC (waiting mode)
32805     }
32806     // Send request
32807     //	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
32808     //	"Content-Type","application/x-www-form-urlencoded"
32809     if (requestPostParams==null) {
32810	     if (requestHeaderContentType==null) ajaxGlobalRequest.setRequestHeader("Content-Type","text/html; charset=utf-8");
32811	     ajaxGlobalRequest.send(null);
32812     } else {
32813	     ajaxGlobalRequest.setRequestHeader("Content-Type", "application/x-www-form-urlencoded; charset=utf-8");
32814	     ajaxGlobalRequest.setRequestHeader("Content-Length", requestPostParams.length);
32815	     ajaxGlobalRequest.setRequestHeader("Connection", "close");
32816	     ajaxGlobalRequest.send(requestPostParams);
32817     }
32818     return ajaxGlobalRequest.responseText;
32819}
32820
32821function ajaxAsyncProcess ( myURL, myAjaxCallbackFuncName, requestPostParams, requestHeaderContentType, requestMimeType ) {
32822     // Clear ajaxGlobalRequest
32823     ajaxGlobalRequest = false;
32824     // For browsers: Safari, Firefox, etc. use one XML model
32825     if (window.XMLHttpRequest) {
32826          ajaxGlobalRequest = new XMLHttpRequest();
32827          if (requestMimeType==null) ajaxGlobalRequest.overrideMimeType('text/html');	//	text/html, text/xml
32828//           if (ajaxGlobalRequest.overrideMimeType) {
32829//                ajaxGlobalRequest.overrideMimeType('text/xml');
32830//           }
32831     } else if (window.ActiveXObject) {
32832          // For browsers: IE, version 6 and before, use another model
32833          try {
32834               ajaxGlobalRequest = new
32835                    ActiveXObject("Msxml2.XMLHTTP");
32836          } catch (e) {
32837               try {
32838                    ajaxGlobalRequest = new
32839                         ActiveXObject("Microsoft.XMLHTTP");
32840               } catch (e) {}
32841          }
32842     }
32843     // Make sure the request object is valid
32844     if (!ajaxGlobalRequest) {
32845          alert('AJAX ERROR: Cannot create XMLHTTP object');
32846          return false;
32847     }
32848     // Link to display function activated when result returned
32849     if (myAjaxCallbackFuncName=='') myAjaxCallbackFuncName = 'ajaxAsyncDisplayReturn';
32850     eval('ajaxGlobalRequest.onreadystatechange = '+myAjaxCallbackFuncName+';');
32851     // Open the URL request
32852     if (requestPostParams==null) {
32853	     ajaxGlobalRequest.open('get', myURL, true);	//	ASYNC (no waiting mode)
32854     } else {
32855	     ajaxGlobalRequest.open('post', myURL, true);	//	ASYNC (no waiting mode)
32856     }
32857     // Send request
32858     if (requestPostParams==null) {
32859	     if (requestHeaderContentType==null) ajaxGlobalRequest.setRequestHeader("Content-Type","text/html; charset=utf-8");
32860	     ajaxGlobalRequest.send(null);
32861     } else {
32862	     ajaxGlobalRequest.setRequestHeader("Content-Type", "application/x-www-form-urlencoded; charset=utf-8");
32863	     ajaxGlobalRequest.setRequestHeader("Content-Length", requestPostParams.length);
32864	     ajaxGlobalRequest.setRequestHeader("Connection", "close");
32865	     ajaxGlobalRequest.send(requestPostParams);
32866     }
32867     return true;	//	ajaxGlobalRequest.responseText
32868}
32869
32870function ajaxAsyncDisplayReturn () {
32871	// Check to make sure result came through, 4=complete
32872	if (ajaxGlobalRequest.readyState == 4) {
32873		// Check HTTP status code
32874		if (ajaxGlobalRequest.status == 200) {
32875			// Display the responseText
32876			alert(ajaxGlobalRequest.responseText);
32877		} else {
32878			alert('AJAX ERROR: There was a problem with the request.');
32879		}
32880	}
32881}
32882
32883function RGBtoHex(R,G,B) {return toHex(R)+toHex(G)+toHex(B);}
32884function toHex(N) {
32885 if (N==null) return "00";
32886 N=parseInt(N); if (N==0 || isNaN(N)) return "00";
32887 N=Math.max(0,N); N=Math.min(N,255); N=Math.round(N);
32888 return "0123456789ABCDEF".charAt((N-N%16)/16)
32889      + "0123456789ABCDEF".charAt(N%16);
32890}
32891
32892
32893function js_comma_to_dot( text ) {
32894    text = text.toString();
32895    var pattern = new RegExp("\,");
32896	return no_comma = text.replace( pattern, "." );
32897}
32898
32899function jf_translate(text, from, to, format) {
32900	return new Promise((resolve, reject) => {
32901		new AjaxRequest({ text, from, to, format })
32902			.setMethod('POST')
32903			.setController('Admin')
32904			.setAction('getTranslation')
32905			.onSuccess(function (response) {
32906				resolve(response);
32907			})
32908			.onError(function (error) {
32909				reject(error);
32910			})
32911			.send();
32912	});
32913}
32914
32915// preklad pomocou TRANSLATE kniznice  MODE >> input/textarea/sef
32916// podporovane langy https://docs.microsoft.com/en-us/azure/cognitive-services/translator/languages
32917function jf_translate_field( elem, container, lang, margin_left, mode, prevAll ) {
32918
32919	// kod na ziskanie langov z microsoft webu ...
32920	/*jQuery("#main > div:nth-child(6) > table > tbody").find("code").each(function() {
32921		a.push(jQuery(this).html());
32922	});*/
32923	if (typeof(mode) == "undefined")
32924		mode = '';
32925
32926	prevAll = prevAll || false;
32927
32928	var tmp_at = false;
32929
32930	// redefine language iso podla podporovanych jazykov jquery.translate
32931	if ( lang == 'cz') {
32932		lang = 'cs';
32933	} else if ( lang == 'at' ) {
32934		lang = 'de';
32935		tmp_at = true;
32936	} else if ( lang == 'si') {
32937		lang = 'sl';
32938	} else if (lang == 's2' || lang == 's3') {
32939		tmp_sk = lang;
32940		lang = 'sk';
32941	} else if (lang == 'c2') {
32942		tmp_cz = lang;
32943		lang = 'cs';
32944	}
32945
32946	var alloved_lang_codes = [
32947		"af", "ar", "apc", "bn", "bs", "bg", "yue", "ca", "zh-Hans", "zh-Hant", "hr", "cs",
32948		"da", "nl", "en", "et", "fj", "fil", "fi", "fr", "de", "el", "ht", "he", "hi", "mww",
32949		"hu", "is", "id", "it", "ja", "sw", "tlh", "tlh-Qaak", "ko", "lv", "lt", "mg", "ms",
32950		"mt", "nb", "fa", "pl", "pt", "otq", "ro", "ru", "sm", "sr-Cyrl", "sr-Latn", "sk",
32951		"sl", "es", "sv", "ty", "ta", "te", "th", "to", "tr", "uk", "ur", "vi", "cy", "yua"
32952	];
32953
32954	if (alloved_lang_codes.indexOf(lang) == -1) {
32955		lang = "en";
32956	}
32957
32958
32959	if (typeof(console) != 'undefined') console.log('typeof(mode)',typeof(mode));
32960
32961	var elem_type = 'input';
32962	if ( mode == 'textarea' )
32963		elem_type = 'textarea';
32964
32965	elem = jQuery(elem);
32966
32967	var container = elem.parents(container+':first');
32968	var dest_elem = elem.prev(elem_type);
32969
32970	if (prevAll) {
32971		dest_elem = elem.prevAll(elem_type);
32972	}
32973
32974	var dest_parent = dest_elem.parents();
32975	var dest_name = dest_elem.attr('name');
32976	var translated;
32977
32978	var nameAttr = dest_elem.attr('name') || '';
32979	var source_elem = nameAttr.substr(0, (nameAttr.length - 3));
32980
32981	if ( typeof js_Config_menu_type_blog_separated !== 'undefined' && js_Config_menu_type_blog_separated ) {
32982		translated = container.find('[name='+source_elem+']:visible').val();
32983	} else {
32984		translated = container.find('[name='+source_elem+']').val();
32985	}
32986
32987	if ( typeof js_Config_product_special_category_translate_field_fix !== 'undefined' && js_Config_product_special_category_translate_field_fix && typeof translated == 'undefined') {
32988		if ( source_elem.indexOf('new') == 0 ) {
32989			source_elem = source_elem.substr(4, source_elem.length);
32990		}
32991		translated = container.find('[name='+source_elem+']').val();
32992	}
32993
32994
32995	if ( mode == 'sef' ) {
32996		translated = translated.replace('/', ' ');
32997		var dest_sef_val = dest_elem.val();
32998		if ( dest_sef_val == '//' || dest_sef_val == '' ) {}
32999		else {
33000			if (typeof(console) != 'undefined') console.log('return jf_translate_field()',dest_sef_val);
33001			return;
33002		}
33003	}
33004
33005	if (typeof(console) != 'undefined') console.log('container:', container);
33006
33007	if (translated != '') 	{
33008		elem.before('<img class="ajax-loader" src="'+js_global_live_site+'/images/ajax-loader-05-14x14.gif" style="position:absolute; margin-left: '+margin_left+'px; margin-top: 3px;"/>');
33009		dest_elem.val('');
33010
33011		var local_js_curr_lang = js_curr_lang;
33012		if (local_js_curr_lang == 'cz') {
33013			local_js_curr_lang = 'cs';
33014		} else if (local_js_curr_lang == 'at') {
33015			local_js_curr_lang = 'de';
33016		} else if (local_js_curr_lang == 's2' || local_js_curr_lang == 's3') {
33017			local_js_curr_lang = 'sk';
33018		} else if (local_js_curr_lang == 'c2') {
33019			local_js_curr_lang = 'cs';
33020		}
33021
33022		if (lang == local_js_curr_lang) {
33023			//stopneme loader
33024			dest_parent.children('.ajax-loader').remove();
33025
33026			if (container.children().find('[name='+dest_name+']').length != 0) {
33027				container.children().find('[name='+dest_name+']').val(translated).addClass('changed').trigger('keyup').trigger('blur').trigger('focus');
33028			} else {
33029				container.children('[name='+dest_name+']').val(translated).trigger('focus');
33030			}
33031
33032			// re-make sef
33033			if (lang == 'sk' && typeof tmp_sk !== 'undefined') {
33034				lang = tmp_sk;
33035			} else if (lang == 'cs') {
33036				if (typeof tmp_cz !== 'undefined') {
33037					lang = tmp_cz;
33038				} else {
33039					lang = 'cz';
33040				}
33041			} else if (lang == 'de' && tmp_at) {
33042				lang = 'at';
33043			}
33044
33045			if (mode != 'no_sef') {
33046				try {
33047					js_update_categ_sef_name_input(container.attr('id'), lang );
33048				} catch (e) {
33049					if (typeof(console) != 'undefined' && is_cs_user() ) console.log('catchERR:',e);
33050				}
33051			}
33052		} else if (typeof translated !== 'undefined') {
33053
33054			const handleResponse = (response) => {
33055				//stopneme loader
33056				dest_parent.children('.ajax-loader').remove();
33057				//prelozeny text umiestnime do textarea / inputu
33058				if (typeof response.data.translation !== 'undefined') {
33059					if (container.children().find('[name=' + dest_name + ']').length != 0) {
33060						container.children().find('[name=' + dest_name + ']').val(response.data.translation).addClass('changed').trigger('keyup').trigger('blur').trigger('focus');
33061					} else {
33062						container.children('[name=' + dest_name + ']').val(response.data.translation).trigger('focus');
33063					}
33064					// re-make sef
33065					if (lang == 'sk' && typeof tmp_sk !== 'undefined') {
33066						lang = tmp_sk;
33067					} else if (lang == 'cs') {
33068						if (typeof tmp_cz !== 'undefined') {
33069							lang = tmp_cz;
33070						} else {
33071							lang = 'cz';
33072						}
33073					} else if (lang == 'de' && tmp_at) {
33074						lang = 'at';
33075					}
33076					if (mode != 'no_sef') {
33077						try {
33078							js_update_categ_sef_name_input(container.attr('id'), lang);
33079						} catch (e) {
33080							if (typeof (console) != 'undefined' && is_cs_user()) console.log('catchERR:', e);
33081						}
33082					}
33083				}
33084			}
33085
33086			if(config('js_Config_google_cloud_translation_in_administration')) {
33087				//google cloud translation
33088				new AjaxRequest({"text": translated, "from": local_js_curr_lang, "to": lang})
33089					.setMethod('POST')
33090					.setController('Admin')
33091					.setAction('getGoogleTranslation')
33092					.onSuccess(function (response) {
33093						handleResponse(response);
33094					})
33095					.onError(function (jsonData) {
33096						dest_parent.children('.ajax-loader').remove();
33097						if (jsonData && jsonData.errors) {
33098							showNotification(jsonData.errors.join(' '), 'Google Cloud Translation API', 'error');
33099						}
33100					})
33101					.send();
33102			} else {
33103				jf_translate(translated, local_js_curr_lang, lang, 'text').then(function (response) {
33104					handleResponse(response);
33105				}).catch(function (error) {
33106					dest_parent.children('.ajax-loader').remove();
33107				})
33108			}
33109		}
33110	}
33111
33112  return false;
33113}
33114
33115function jf_translate_all_fields(elem, container, elem_name) {
33116	elem = jQuery(elem);
33117	container_obj = jQuery(container);
33118	container_obj.children().find('input').each(function(){
33119			var input_elem = jQuery(this);
33120			input_elem.next('img').trigger('click');
33121	});
33122
33123	// reload menu poloziek pri uprave
33124	if (container == '#categ_edit_panel_content') {
33125		//js_update_menu_sef_name_input(container.replace('#','') );
33126		jQuery(jf_langs).each(function(i,val){
33127				var sef_value = container_obj.children().find('[name=menu_item_sef_'+val+']').val();
33128				if (typeof(elem_name)!="undefined") {
33129					sef_value = container_obj.children().find('[name=category_sef_name_'+val+']').val();
33130				}
33131
33132				if (typeof(console) != 'undefined') console.log('sef_value',sef_value);
33133
33134				if (sef_value == '' || sef_value == '//') {
33135					js_update_menu_sef_name_input(container.replace('#',''), val );
33136					//container_obj.children().find('input')
33137					setTimeout("js_check_input_sef_name( '"+container+"', 'menu_item_sef_"+val+"')", 1000);
33138				}
33139		});
33140	}
33141
33142	js_update_categ_sef_name_input(container_obj.attr('id'));
33143	return false;
33144}
33145
33146
33147
33148function js_function_vex_open(data) {
33149	var options = jQuery.extend({}, {
33150		title: '',
33151		input: '',
33152		buttons: '',
33153		afterOpen: function(vexContent) { }
33154	}, data);
33155
33156	vex.open({
33157		className: options.className,
33158		content  : [
33159			'<form class="vex-dialog-form">',
33160			(options.title == '') ? '' : [
33161				'<div class="vex-dialog-message">',
33162				'<span class="login-title">',
33163				options.title,
33164				'</span>',
33165				'</div>'
33166			].join(''),
33167			(options.input == '') ? '' : [
33168				'<div class="vex-dialog-input" style="padding-top: 1.5em;">',
33169				options.input,
33170				'</div>'
33171			].join(''),
33172			(options.buttons == '') ? '' : [
33173				'<div class="vex-dialog-buttons">',
33174				options.buttons,
33175				'</div>'
33176			].join(''),
33177			'</form>'
33178		].join(''),
33179		afterOpen: function (vexContent) {
33180			if (typeof options.afterOpen === 'function') {
33181				options.afterOpen(vexContent);
33182			}
33183		}
33184	});
33185}
33186function hexc(colorval) {
33187	var parts = colorval.match(/^rgb\((\d+),\s*(\d+),\s*(\d+)\)$/);
33188	if (typeof parts === 'undefined' || parts === null) {
33189		return;
33190	}
33191	delete (parts[0]);
33192	for (var i = 1; i <= 3; ++i) {
33193		parts[i] = parseInt(parts[i]).toString(16);
33194		if (parts[i].length === 1) {
33195			parts[i] = '0' + parts[i];
33196		}
33197	}
33198	return '#' + parts.join('');
33199}
33200// Scroll to top button content new
33201function js_scroll_top_content_new() {
33202	var enableScrollToTopButton = true;  // pripadne dodefinovanie
33203	if (!enableScrollToTopButton === true) {
33204		return false;
33205	}
33206	var scroll_top_el = jQuery('.scroll_to_top_content_new');
33207
33208	if ( !scroll_top_el.length ) { return; }
33209
33210	scroll_top_el.on('click', function () {
33211		jQuery('html,body').animate({scrollTop: 0}, 300);
33212	});
33213	jQuery(window).on('scroll.to_top',function(){
33214		if (jQuery(window).scrollTop() > 300){
33215			scroll_top_el.fadeIn(200);
33216		}
33217		else {
33218			scroll_top_el.fadeOut(200);
33219		}
33220	}).trigger('scroll.to_top');
33221}
33222
33223jQuery(function() {
33224	js_scroll_top_content_new();
33225
33226	var $themeColorDiv = jQuery("meta[name='theme-color']");
33227	if ( $themeColorDiv.length > 0 && Cookies.get('themeColor') === undefined ) {
33228		var colorDivs = jQuery('#menu_div, #header, .button:first');
33229		colorDivs.each(function (key, item) {
33230			item = jQuery(item);
33231
33232			if (typeof item !== 'undefined') {
33233				var themeColorRgb = item.css('background-color');
33234
33235				if (typeof themeColorRgb !== 'undefined' && themeColorRgb !== '') {
33236					var themeColorHex = hexc(themeColorRgb);
33237
33238					if ( typeof themeColorHex !== 'undefined' ) {
33239						Cookies.set('themeColor', themeColorHex, { path: '/' });
33240
33241						$themeColorDiv.attr('content', themeColorHex);
33242						jQuery("meta[name='msapplication-navbutton-color']").attr('content', themeColorHex);
33243
33244						return false;
33245					}
33246				}
33247			}
33248		});
33249	}
33250
33251	if (typeof js_config_enable_article_modal === 'boolean' && js_config_enable_article_modal){
33252		jQuery(document).on('click', 'a[rel="vex"]', function(event) {
33253			event.preventDefault();
33254
33255			var $me = jQuery(this);
33256
33257			jQuery.ajax({
33258				url: $me.attr('href'),
33259				method: 'GET',
33260				success: function(data) {
33261					var content = jQuery(data).find('#middle_content_inner');
33262
33263					if (content.length > 0 && content.text().trim() !== '') {
33264
33265						js_function_vex_open({
33266							input: content.html(),
33267							afterOpen: function(vexContent) {
33268								vexContent.css({
33269									width: '95%',
33270									maxWidth: '1200px'
33271
33272								}).closest('.vex').addClass('flypage_vex');
33273							}
33274						});
33275
33276					} else {
33277						window.location.href = $me.attr('href');
33278					}
33279				}
33280			});
33281
33282			return false;
33283		});
33284	}
33285});
33286
33287function jf_translate_textarea(elem, lang, source_elem, dest_elem) {
33288
33289	//google cloud translation
33290	if(typeof js_Config_google_cloud_translation_in_administration !== 'undefined' && js_Config_google_cloud_translation_in_administration) {
33291		var elemContainer       = jQuery(elem).parent();
33292		var translateContainer  = elemContainer.parents('fieldset:first');
33293		//ziskame statistiku
33294		new AjaxRequest()
33295			.setMethod('POST')
33296			.setController('Admin')
33297			.setAction('getGoogleTranslationStats')
33298			.onSuccess(function (response) {
33299				if ( typeof js_Config_blog_textarea_translate_button_fix !== 'undefined' && js_Config_blog_textarea_translate_button_fix) {
33300					if (translateContainer.length < 1) {
33301						translateContainer = jQuery(source_elem).parents('.admin_add_content_form');
33302					}
33303				} else {
33304					if (translateContainer.length < 1) {
33305						translateContainer = elemContainer.parent().parent();
33306					}
33307				}
33308
33309				source_elem = translateContainer.find(source_elem);
33310				dest_elem   = translateContainer.find(dest_elem);
33311
33312				//pripravime text pre vex
33313				var vexContent = '<br>'+
33314					'<span style="display:block;width: 360px" >'+
33315					'    <span class="cs_icon csi-bar-chart csi_c_black" style="font-size: 19px"></span>'+
33316					'    <span style="font-weight: bold; font-size:19px; text-transform: uppercase;">'+cms_js_lang_admin_google_cloud_label_1+'</span>'+
33317					'</span>'+
33318					'<br>'+
33319					'<br>'+
33320					'<table style="text-align: center;border-collapse: collapse;">'+
33321					'    <tr style="border-bottom: 1px solid #8e8e8e">'+
33322					'        <th style="padding: 5px 30px">'+cms_js_lang_admin_google_cloud_label_2+'</th>'+
33323					'        <th style="padding: 5px 30px;">'+cms_js_lang_admin_google_cloud_label_3+'</th>'+
33324					'        <th style="padding: 5px 30px;">'+cms_js_lang_admin_google_cloud_label_4+'*</th>'+
33325					'    </tr>';
33326
33327				//statistiky za posledne 3 mesiace
33328				if (typeof response.data.statistic !== 'undefined' && Object.keys(response.data.statistic).length) {
33329					jQuery.each(response.data.statistic, function(i,v){
33330						vexContent += '<tr style="border-top: 1px solid #8e8e8e">'+
33331							'    <td style="padding: 5px 30px">
33331'+v.year+'</td>'+
33332							'    <td style="padding: 5px 30px;">'+v.month+'</td>'+
33333							'    <td style="padding: 5px 30px;text-align: right;">'+parseFloat(v.count).toLocaleString()+'</td>'+
33334							'</tr>';
33335					});
33336				} else {
33337					var currentDate = new Date();
33338					vexContent += '<tr style="border-top: 1px solid #8e8e8e">'+
33339						'    <td style="padding: 5px 30px">'+currentDate.getFullYear()+'</td>'+
33340						'    <td style="padding: 5px 30px;">'+(currentDate.getMonth() + 1)+'</td>'+
33341						'    <td style="padding: 5px 30px;text-align: right;">0</td>'+
33342						'</tr>';
33343				}
33344
33345				//vyzva na preklad
33346				vexContent += '</table>'+
33347					'<br>'+
33348					'<span style="width: 350px;display:block;">'+
33349					'    <i>* '+cms_js_lang_admin_google_cloud_label_5+'</i>'+
33350					'</span>'+
33351					'<br>'+
33352					'<br>'+
33353					'<span style="font-size: 19px;width: 360px;display:block;">'+
33354						cms_js_lang_admin_google_cloud_label_6+' <span style="font-weight: bold">'+parseFloat(source_elem.val().length).toLocaleString()+'</span> '+cms_js_lang_admin_google_cloud_label_7+
33355					'</span>'+
33356					'<img style="padding:10px 0px;" src="/components/com_joomfish/images/translated-by-google.svg">';
33357
33358
33359				//otvorime vex
33360				vex.dialog.confirm({
33361					className: 'vex-cs',
33362					message: '<span style="font-weight: bold">'+cms_js_lang_admin_google_cloud_label_8+'</span> (Cloud Translation API)',
33363					input: vexContent,
33364					buttons: [
33365						jQuery.extend({}, vex.dialog.buttons.NO, {text: cms_js_lang_products_group_3}),
33366						jQuery.extend({}, vex.dialog.buttons.YES, {
33367							text: cms_js_lang_admin_google_cloud_label_9,
33368							click: function() {
33369
33370								if (typeof source_elem.val() !== 'undefined') {
33371									//zavolame preklad
33372									new AjaxRequest({"text": source_elem.val(), "from": js_curr_lang, "to": lang})
33373										.setMethod('POST')
33374										.setController('Admin')
33375										.setAction('getGoogleTranslation')
33376										.onSuccess(function (response) {
33377											//prelozeny text umiestnime do textarea / inputu
33378											if (typeof response.data.translation !== 'undefined') {
33379												dest_elem.val(response.data.translation);
33380											}
33381										})
33382										.send();
33383								}
33384							}
33385						})
33386					]
33387				});
33388
33389			})
33390			.send();
33391
33392		return false;
33393	}
33394
33395
33396	vex.dialog.alert({
33397		className: 'vex-cs',
33398		message: '',
33399		input: 'Externá bezplatná služba na prekladanie textov je aktuálne nedostupná.<br>Použite manuálny a bezplatný režim pomocou: <a href="https://translate.google.com/">translate.google.com</a><br><br>V prípade záujmu existuje alternatívna možnosť implementácie spoplatnenej Google Translate API.',
33400		buttons: [
33401			jQuery.extend({}, vex.dialog.buttons.NO, {text: cms_js_lang_products_group_3}),
33402			jQuery.extend({}, vex.dialog.buttons.YES, {
33403				text: 'Mám záujem o alternatívu',
33404				click: function(elm) {
33405					window.open('mailto:[email protected]?subject=' + encodeURI('Máme záujem o preklady cez Google Translate API') + '&body=' + encodeURI('Dobrý deň,\n\nmáme záujem o preklady cez Google Translate API pre https://' + js_global_main_domain + '\n\nĎakujeme :-)'));
33406				}
33407			})
33408		]
33409	});
33410
33411	return false;
33412}
33413
33414function js_admin_translate_content_save(elem) {
33415	elem = jQuery(elem);
33416
33417	var translate_html = js_make_clean_translated_value( elem.parents('.vex-content:first').find('.translate_html').html() );
33418	var dest_elem = jQuery('.t-data').data('dest_elem');
33419
33420	dest_elem.val(translate_html);
33421	vex.close();
33422
33423	return false;
33424}
33425
33426
33427
33428function js_make_clean_translated_value(ret) {
33429	if (typeof(ret) != 'undefined' && ret != null && ret.length > 0)
33430		return ret.replace(/\<\/?font\s*[^\>]*\>/gi, '');
33431// 		return ret.replace(/<font>/gi, '').replace(/<\/font>/gi, '').replace(/<font class="">/gi, '');
33432
33433	return '';
33434}
33435
33436function js_check_input_sef_name(container, input_name) {
33437	//if (typeof(console) != 'undefined') console.log('input_name',input_name);
33438	container = jQuery(container);
33439	input_elem = container.children().find('input[name='+input_name+']');
33440	var sef_value = input_elem.val().replace(/\/{2,}/g, '/').split('/');
33441
33442	//if (typeof(console) != 'undefined') console.log('sef_value', sef_value);
33443
33444	var options = { 'sef_name': sef_value };
33445
33446	jQuery.post(js_global_live_site+'/administrator/components/com_shop/html/frontend.edit_category.php?option=com_shop&ajax_call=1&ajax_func=make_sef_name&no_html=1&no_vm_html=1&no_menu=1&no_css=1', options, function (res) {
33447		//if (typeof(console) != 'undefined') console.log('make_sef_name', input_elem, res);
33448
33449		if (res == '0') {
33450			//alert('ERR: system_functions.js > fcia js_check_input_sef_name()');
33451			return;
33452		}
33453
33454		input_elem.val( res );
33455	});
33456}
33457
33458function js_bindQQFileUploader( json_params, json_ret_info ) {
33459	//	'element_id': file_upload_selector_container-mosCreateGUID()
33460	//	'action': '/administrator/components/com_shop/html/frontend.edit_category.php'
33461	//	'params': { 'option': 'com_shop', 'ajax_call': '1', 'ajax_func': 'upload_category_full_image', 'no_html': '1', 'no_vm_html': '1', 'no_menu': '1', 'no_css': '1', 'category_id': < ? php echo $req_category_id; ? > }
33462	//	'allowedExtensions': ['jpg', 'jpeg', 'png', 'gif'],
33463	//	'onComplete': function( id, fileName, json_res )
33464	ret = false;
33465	if (js_is_valid_json(json_params, {'element_id': null, 'action': null, 'params': null, 'onComplete': null})) {
33466		var element_id = json_params.element_id;
33467		var jqo_element = jQuery('#'+element_id);
33468		if (jqo_element.length == 1) {
33469			var jso_element = jqo_element.get(0);
33470			if (jso_element) {
33471				var uploader = new qq.FileUploader({
33472					element: jso_element,
33473					action: json_params.action,
33474					allowedExtensions: (typeof(json_params.allowedExtensions) != 'undefined' && json_params.allowedExtensions ? json_params.allowedExtensions : ['jpg', 'jpeg', 'png', 'gif']),
33475					params: json_params.params,
33476					onSubmit: function( id, fileName ) {
33477						jqo_element.find('.qq-upload-list li').remove();
33478					},
33479					onComplete: json_params.onComplete,
33480					debug: 0 && js_global_is_csu,
33481					multiple: (typeof(json_params.multiple) != 'undefined' && json_params.multiple ? json_params.multiple : false)
33482				});
33483
33484				if (1 || js_global_is_csu) {
33485					if (typeof(console) != 'undefined') console.log('GREDXuploader:',uploader);
33486				}
33487
33488				setTimeout("jQuery('.full_img_container #"+element_id+"').find('.qq-upload-button').css('left','0px');", 500);
33489				if (json_ret_info != null && typeof(json_ret_info) == 'object') {
33490					json_ret_info.result = ret;
33491				}
33492				ret = true;
33493			} else {
33494				if (json_ret_info != null && typeof(json_ret_info) == 'object') {
33495					json_ret_info.result = ret;
33496					json_ret_info.msg = 'jso_element is: null';
33497				}
33498			}
33499		} else {
33500			if (json_ret_info != null && typeof(json_ret_info) == 'object') {
33501				json_ret_info.result = ret;
33502				json_ret_info.msg = 'jqo_element.length is: '+jqo_element.length;
33503			}
33504		}
33505	} else {
33506		if (json_ret_info != null && typeof(json_ret_info) == 'object') {
33507			json_ret_info.result = ret;
33508			json_ret_info.msg = 'js_is_valid_json(json_params) is: false';
33509		}
33510	}
33511	return ret;
33512}
33513
33514function js_get_editor_templates() {
33515	var result = [];
33516
33517	if (typeof ckeditor_custom_tmp == 'undefined' || ckeditor_custom_tmp == 0) return result;
33518
33519	jQuery.ajax({
33520		url: js_global_live_site + '/public_scripts_M4r7ft/global_scripts/product_actions.php?',
33521		method: 'POST',
33522		data: {
33523			option: 'com_shop',
33524			ajax_call: 1,
33525			ajax_func: 'get_editor_templates',
33526			no_html: 1,
33527			no_vm_html: 1,
33528			no_menu: 1,
33529			no_css: 1
33530		},
33531		async: false,
33532		success: function (res) {
33533			result = JSON.parse(res);
33534		}
33535	});
33536	return result;
33537}
33538
33539function admin_panel_cke_post_init( textarea_name ) {
33540    //	spolocne volana funkcia, po zobrazeni ckeditora
33541    if (typeof js_dont_use_ckeditor_4_5_0 === 'undefined') {
33542    	js_bind_jwmmxtd_on_cke_containers2(textarea_name);
33543    } else {
33544	    js_bind_jwmmxtd_on_cke_containers(textarea_name);
33545    }
33546}
33547
33548function js_bind_jwmmxtd_on_cke_containers( textarea_name ) {
33549	//	pri zadanom textarea_name prida prislusnej arei tlacitko na start jwmmxtd
33550	//	inak existujucim aream s ck-editorom prida tlacitko na start jwmmxtd
33551
33552	// JAN, 3.10.2016 toto nie je dobre Quickfix, treba to poriesit inak
33553	return false;
33554
33555	if (typeof(js_internal_counter_f0b7de8b3a88b0788aa6b348ac4ebbeb) === 'undefined') js_internal_counter_f0b7de8b3a88b0788aa6b348ac4ebbeb = 0;
33556	var container_selector = (textarea_name != null) ? ('span#cke_'+textarea_name+'.cke_editor_'+textarea_name) : ('span[id^="cke_"][class^="cke_"]');
33557
33558	if (jQuery(container_selector+':first').length == 0) {
33559		js_internal_counter_f0b7de8b3a88b0788aa6b348ac4ebbeb = js_internal_counter_f0b7de8b3a88b0788aa6b348ac4ebbeb + 1;
33560		if (js_internal_counter_f0b7de8b3a88b0788aa6b348ac4ebbeb < 21) setTimeout('js_bind_jwmmxtd_on_cke_containers('+((textarea_name != null) ? ('"'+textarea_name+'"') : '')+');', 250);	//	timeout 5 sec.
33561		return false;
33562	}
33563
33564	jQuery(container_selector).each(function (idx, jso) {
33565		var jqo = jQuery(jso);
33566		if (jQuery('textarea#'+jqo.attr('id').substr(4)+', textarea[name="'+jqo.attr('id').substr(4)+'"]').length > 0 && jqo.find('a.'+jqo.attr('id')+'_jwmmxtd').length == 0) {
33567			var jqo_cke_toolgroup = jQuery('span#'+jqo.attr('id')+' span.cke_toolbar span.cke_toolgroup span.cke_button a.cke_button_image:first').parents('span.cke_toolgroup:first');
33568			jqo_cke_toolgroup.append('<span class="cke_button"><a href="/administrator/index2.php?option=com_media&jwmmxtd_template_refresh=1&iframe=true&width=1040&height=700" class="cke_off cke_button_jwmmxtd '+jqo.attr('id')+'_jwmmxtd" title="'+cms_adminlang_mod_fullmenu_swe_mediamanag+'"><span class="cke_icon">&nbsp;</span><span class="cke_label">'+cms_adminlang_mod_fullmenu_swe_mediamanag+'</span></a></span>');
33569			jqo_cke_toolgroup.find('span.cke_button a.cke_button_jwmmxtd:first').prettyPhoto({
33570				'show_title':false,
33571				'allow_resize':false,
33572				'modal':true,
33573				'theme':'facebook',
33574				changepicturecallback: function() {
33575				jQuery('body > .pp_pic_holder:last').css('z-index', '10002');	//	kvoli poshytipu.. bleee
33576				var jqo_pp_full_res = jQuery('body > .pp_pic_holder:last #pp_full_res:first');
33577				if (jqo_pp_full_res && jqo_pp_full_res.length > 0) {
33578					jqo_pp_full_res.find('iframe').attr('width', parseInt(jqo_pp_full_res.find('iframe').attr('width')) - 10);
33579					jqo_pp_full_res.append('<div class="cs_prettyphoto_close"><a href="#" onclick="return js_prettyphoto_close();" title="'+cms_js_lang_close+'"><img src="/includes/js/jquery/prettyphoto/images/closelabel.png" alt="X"/></a></div>');
33580				}
33581				  jQuery(document).on('keyup', function(event) {
33582					if ( event.keyCode == 27 ) {
33583
33584					  if ( in_tooltip == 1 ) {
33585						js_product_special_groups_closed( in_tooltip );
33586					  }
33587					  else {
33588						js_prettyphoto_close();
33589					  }
33590					}
33591				  });
33592				}
33593			  });
33594		}
33595	});
33596	js_internal_counter_f0b7de8b3a88b0788aa6b348ac4ebbeb = 0;
33597	return true;
33598}
33599
33600function js_bind_jwmmxtd_on_cke_containers2( textarea_name ) {
33601	if (typeof(js_internal_counter_f0b7de8b3a88b0788aa6b348ac4ebbeb) === 'undefined')
33602		js_internal_counter_f0b7de8b3a88b0788aa6b348ac4ebbeb = 0;
33603
33604	var container_selector = (textarea_name != null) ? ('div#cke_'+textarea_name+'.cke_editor_'+textarea_name) : ('div[id^="cke_"][class^="cke_"]');
33605
33606// 	console.log(container_selector);
33607
33608	if (jQuery(container_selector+':first').length == 0) {
33609		js_internal_counter_f0b7de8b3a88b0788aa6b348ac4ebbeb = js_internal_counter_f0b7de8b3a88b0788aa6b348ac4ebbeb + 1;
33610		if (js_internal_counter_f0b7de8b3a88b0788aa6b348ac4ebbeb < 21) setTimeout('js_bind_jwmmxtd_on_cke_containers('+((textarea_name != null) ? ('"'+textarea_name+'"') : '')+');', 250);	//	timeout 5 sec.
33611		return false;
33612	}
33613
33614	jQuery(container_selector).each(function (idx, jso) {
33615		var jqo = jQuery(jso);
33616		if (jQuery('textarea#'+jqo.attr('id').substr(4)+', textarea[name="'+jqo.attr('id').substr(4)+'"]').length > 0 && jqo.find('a.'+jqo.attr('id')+'_jwmmxtd').length == 0) {
33617			var jqo_cke_toolgroup = jQuery('div#'+jqo.attr('id')+' span.cke_toolbar span.cke_toolgroup a.cke_button__image:first').parents('span.cke_toolgroup:first');
33618
33619			if ( typeof js_Config_ckeditor_v4_19 != 'undefined' && js_Config_ckeditor_v4_19 ) {
33620				jqo_cke_toolgroup.append('<a href="/administrator/index2.php?option=com_media&jwmmxtd_template_refresh=0" target="_blank" class="cke_button cke_button_off cke_button_jwmmxtd '+jqo.attr('id')+'_jwmmxtd" title="'+cms_adminlang_mod_fullmenu_swe_mediamanag+'"><span class="cke_button_icon cke_button__button_icon">&nbsp;</span><span class="cke_button_label">'+cms_adminlang_mod_fullmenu_swe_mediamanag+'</span></a>');
33621			} else {
33622				jqo_cke_toolgroup.append('<a href="/administrator/index2.php?option=com_media&jwmmxtd_template_refresh=0" target="_blank" class="cke_button cke_button_off cke_button_jwmmxtd '+jqo.attr('id')+'_jwmmxtd" title="'+cms_adminlang_mod_fullmenu_swe_mediamanag+'"><span class="cke_button_icon">&nbsp;</span><span class="cke_button_label">'+cms_adminlang_mod_fullmenu_swe_mediamanag+'</span></a>');
33623
33624			}
33625
33626		}
33627	});
33628	js_internal_counter_f0b7de8b3a88b0788aa6b348ac4ebbeb = 0;
33629	return true;
33630}
33631
33632function js_strip_alowed_tags(input, allowed) {
33633    allowed = (((allowed || "") + "").toLowerCase().match(/<[a-z][a-z0-9]*>/g) || []).join(''); // making sure the allowed arg is a string containing only tags in lowercase (<a><b><c>)
33634    var tags = /<\/?([a-z][a-z0-9]*)\b[^>]*>/gi,
33635        commentsAndPhpTags = /<!--[\s\S]*?-->|<\?(?:php)?[\s\S]*?\?>/gi;
33636    return input.replace(commentsAndPhpTags, '').replace(tags, function ($0, $1) {
33637        return allowed.indexOf('<' + $1.toLowerCase() + '>') > -1 ? $0 : '';
33638    });
33639}
33640
33641function js_strip_tags(input) {
33642    var tags = /<\/?([a-z][a-z0-9]*)\b[^>]*>/gi,
33643        commentsAndPhpTags = /<!--[\s\S]*?-->|<\?(?:php)?[\s\S]*?\?>/gi;
33644    return input.replace(commentsAndPhpTags, '').replace(tags, '');
33645}
33646
33647function jsGetJSON( json_text, required_vars ) {
33648	//	funkcia vrati JSON object zo stringovej formy (json_encode)
33649	//	v pripade ze required_vars je pole (nazvov premennych), musi objekt obsahovat tieto premenne
33650	//	chyby su osetrene, v pripade chyby vracia null
33651	var ret = null;
33652	if (json_text > '') {
33653		try {
33654			eval('ret = ' + json_text + ';');
33655			if (ret != null && required_vars != null) {
33656				jQuery.each(required_vars, function (i, u) {
33657					if (typeof(ret[u]) == 'undefined') {
33658						ret = null;
33659						return false;
33660					}
33661					return true;
33662				});
33663			}
33664		} catch( jso_err ) {
33665			ret = null;
33666		}
33667	}
33668	return ret;
33669}
33670
33671function js_module_edit_categ_list_click(elem) {
33672	elem = jQuery(elem);
33673
33674	if (elem.find('option:selected').length)
33675		elem.parents('.module_display_list_categories:first').find('.module_prod_show_container input, .module_prod_show_container label').fadeIn(300);
33676	else
33677		elem.parents('.module_display_list_categories:first').find('.module_prod_show_container input, .module_prod_show_container label').fadeOut(300);
33678}
33679
33680function is_valid_email(email) {
33681	//return !(email == '' || /^[\w\.\-]+@\w+[\w\.\-]*?\.\w{1,}$/i.exec(email) == null );
33682	var re = new RegExp('^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,63}$');
33683	return re.test(email);
33684}
33685
33686/**
33687 * Validates whether phoneNumber contains only allowed characters
33688 * @param phoneNumber {String}
33689 * @returns {boolean}
33690 */
33691function is_valid_phone_number(phoneNumber) {
33692	if ( is_cs_user('new_phone_validation') && typeof js_CS_Config_new_phone_validation !== 'undefined' && js_CS_Config_new_phone_validation ) {
33693		if ( typeof phoneNumber === 'undefined' || phoneNumber == '' ) return false;
33694
33695		return RegExp('^[+]*[-0-9\s–\/]+$').test(phoneNumber); // 15 povolenych znakov: 0-9, +, [space], /, -, –
33696
33697	} else {
33698		if ( typeof phoneNumber === 'undefined' || phoneNumber == '' ) return false;
33699
33700		return !RegExp(/[^-–\/+\s0-9]/g).test(phoneNumber); // 15 povolenych znakov: 0-9, +, [space], /, -, –
33701	}
33702}
33703
33704/**
33705 * Validates whether phoneNumber is of correct length (at least 6 digits)
33706 * @param phoneNumber {String}
33707 * @param length {Number}
33708 * @returns {boolean}
33709 */
33710function is_correct_length_phone_number(phoneNumber, length) {
33711	if ( typeof phoneNumber === 'undefined' || phoneNumber == '' ) { return false; }
33712
33713	var matches = phoneNumber.match(/[0-9]/g);
33714
33715	if (matches === null) { return false; }
33716
33717	return matches.length >= (length || 6);
33718}
33719
33720// CENY
33721function js_remove_right_zeros( price ) {
33722	price = price.toString();
33723
33724	if ( price.indexOf('.') == -1 ) {
33725		return price;
33726	}
33727
33728	var zero_index = -1;
33729
33730	for ( var i = price.length - 1; i >= 0; i-- ) {
33731
33732		if ( price[i] != '0' ) {
33733			break;
33734		}
33735
33736		zero_index = i;
33737	}
33738
33739	if ( zero_index == -1 ) {
33740		return price;
33741	}
33742
33743	price = price.substr(0, zero_index);
33744
33745	if ( price.substr(-1) == '.' ) {
33746		price = price.substr(0, price.length - 1);
33747	}
33748
33749	return price;
33750}
33751
33752function js_jq_remove_right_zeros_from_input( input_element ) {
33753	input_element = jQuery(input_element);
33754
33755	input_element.attr('value', js_remove_right_zeros(input_element.val()));
33756}
33757
33758function js_remove_not_numeric(elem) {
33759	var e = jQuery(elem);
33760	var r = /\.[0-9]{0,}[.,]/;
33761	while (r.test(e.val())) e.val(e.val().substr(0, e.val().length - 1));
33762
33763	r = /\,/;
33764	e.val(e.val().replace(r, '.'));
33765	e.val(e.val().replace(/(?!^)[\+\-]/g, ''));
33766
33767	r = /[^0-9\.\+\-]/g;
33768	e.val(e.val().replace(r, ''));
33769
33770	r = /[0-9]/;
33771	if (!r.test(e.val())) e.val('');
33772}
33773
33774function js_set_element_changed(elem) {
33775	jQuery(elem).addClass('elem_changed');
33776}
33777
33778
33779function js_jq_update_price_gross( jqo_price_net, jqo_tax_rate, jqo_price_gross, decimals, remove ) {
33780	remove = typeof remove !== 'undefined' ? remove : true;
33781	decimals = typeof decimals !== 'undefined' ? parseInt(decimals) : 2;
33782
33783	var rates = (typeof _product !== 'undefined' ? _product.options.tax_rates : 0);
33784
33785	if( jqo_price_net.val() != '' ) {
33786
33787		js_remove_not_numeric(jqo_price_net);
33788
33789		var grossValue = jqo_price_net.val();
33790
33791		var taxRate;
33792		if (typeof(jqo_tax_rate) != 'object')
33793			taxRate = parseFloat(jqo_tax_rate);
33794		else
33795			taxRate = rates[jqo_tax_rate.val()];
33796
33797		if ( typeof js_Config_VM_direct_prices_editing_for_shopper_group !== "undefined" ) {
33798			$tmp_sgp = jqo_price_net.parents('.pp_other_price_content').find('select.pp_op_shopper_group_select option:selected').val();
33799
33800			if (typeof js_Config_VM_direct_prices_editing_for_shopper_group !== "undefined" && typeof js_Config_VM_direct_prices_editing_for_shopper_group[$tmp_sgp] !== "undefined" && js_Config_VM_direct_prices_editing_for_shopper_group[$tmp_sgp].dph !== '') {
33801				taxRate = parseFloat(js_Config_VM_direct_prices_editing_for_shopper_group[$tmp_sgp].dph);
33802			}
33803		}
33804
33805		if (taxRate > 0) grossValue = grossValue * (taxRate + 1);
33806
33807		var price = doRound(grossValue, decimals);
33808
33809		price = remove ? js_remove_right_zeros(price) : parseFloat(price).toFixed(decimals);
33810
33811		if (grossValue == '') {
33812			jqo_price_gross.val('');
33813		} else {
33814			jqo_price_gross.val(price);
33815		}
33816
33817		var cn = jqo_price_net['0'].className;
33818		var ppsgid = jqo_price_net.parents('.pp_other_price_content').find('.pp_op_shopper_group_select').val();
33819		var sgdis = 1 - ((typeof(phsg) != 'undefined' && ppsgid != 0 ? phsg[ppsgid] : 0) / 100);
33820		//JANB fixnutie 07-04-2020 zlý prepočet sumy .. bude to treba skontrolovať !!!
33821		var phcena = jqo_price_net.val() * sgdis * (1 + taxRate);
33822
33823		if (phcena % 1 == 0) phcena = phcena;
33824		else phcena = phcena.toFixed(2);
33825
33826		if (cn.indexOf('product_price_input') > -1) {
33827
33828			if ( grossValue == '' ) {
33829				jqo_price_net.parents('.pp_other_price_content').find('.product_price_incl_tax_dis').val('');
33830			} else {
33831				jqo_price_net.parents('.pp_other_price_content').find('.product_price_incl_tax_dis').val(phcena);
33832			}
33833		}
33834	}
33835}
33836
33837function js_jq_updateOldPriceGross(product_id, event, price_net_jq_selector, price_gross_jq_selector) {
33838	if (event && (event.keyCode == 9 || event.keyCode == 13 || (event.keyCode > 34 && event.keyCode < 41))) {
33839		return;
33840	}
33841
33842	let jqo_price_net = jQuery(price_net_jq_selector != null && price_net_jq_selector != '' ? price_net_jq_selector : `.product_old_price_input_${product_id}`);
33843	let jqo_tax_rate = jQuery(`.product_tax_select_${product_id}`);
33844	let jqo_price_gross = jQuery(price_gross_jq_selector != null && price_gross_jq_selector != '' ? price_gross_jq_selector : `.product_old_price_incl_vat_input_${product_id}`);
33845
33846	if (jqo_price_net.length == 0 || jqo_tax_rate.length == 0 || jqo_price_gross == 0) {
33847		return;
33848	}
33849
33850	js_jq_update_price_gross(jqo_price_net, jqo_tax_rate, jqo_price_gross);
33851}
33852
33853function js_jq_updateGross( product_id, event, price_net_jq_selector, price_gross_jq_selector ) {
33854	if (event && (event.keyCode==9 || event.keyCode==13 || (event.keyCode>34 && event.keyCode<41))) return;
33855	jqo_price_net = jQuery((price_net_jq_selector != null && price_net_jq_selector != '') ? price_net_jq_selector : ('.product_price_input_'+product_id));
33856	jqo_tax_rate = jQuery('.product_tax_select_'+product_id);
33857	jqo_price_gross = jQuery((price_gross_jq_selector != null && price_gross_jq_selector != '') ? price_gross_jq_selector : ('.product_price_incl_tax_input_'+product_id));
33858	if (typeof event != 'undefined' && typeof event.keyCode != 'undefined') js_set_element_changed(jqo_price_net);
33859
33860	js_jq_update_price_gross( jqo_price_net, jqo_tax_rate, jqo_price_gross );
33861}
33862
33863function js_jq_updateOtherPricesGross( product_id ) {
33864	var jq_list = jQuery('.pp_info_container [name="pp_value_wo_tax\[\]"]');
33865	if (jq_list && jq_list.length > 0) {
33866		var jqo_tax_rate = jQuery('.product_tax_select_'+product_id);
33867		jq_list.each(function () {
33868			var jqo_price_net = jQuery(this);
33869			var jqo_price_gross = jqo_price_net.parents('.pp_info_container:first').find('input[name="pp_value_w_tax\[\]"]:first');
33870			js_jq_update_price_gross(jqo_price_net, jqo_tax_rate, jqo_price_gross);
33871		});
33872	}
33873}
33874
33875function js_jq_updatePurchasePriceGross( product_id, event ) {
33876	if (event && (event.keyCode==9 || event.keyCode==13 || (event.keyCode>34 && event.keyCode<41))) return;
33877
33878	jqo_price_net = jQuery('.product_purchase_price_input_'+product_id);
33879	jqo_tax_rate = jQuery('.product_tax_select_'+product_id);
33880	jqo_price_gross = jQuery('.product_purchase_price_incl_vat_input_'+product_id);
33881
33882	if ( jqo_price_net.length == 0 || jqo_tax_rate.length == 0 || jqo_price_gross == 0 ) {
33883		return;
33884	}
33885
33886	js_jq_update_price_gross( jqo_price_net, jqo_tax_rate, jqo_price_gross );
33887}
33888
33889function js_jq_update_price_net( jqo_price_net, jqo_tax_rate, jqo_price_gross, decimals, remove ) {
33890	remove = typeof remove !== 'undefined' ? remove : true;
33891	decimals = typeof decimals !== 'undefined' ? parseInt(decimals) : 5;
33892
33893	var rates = (typeof _product !== 'undefined' ? _product.options.tax_rates : (typeof _order !== 'undefined' ? _order.options.tax_rates : tax_rates));
33894
33895	js_remove_not_numeric(jqo_price_gross);
33896	js_set_element_changed(jqo_price_gross);
33897
33898	var netValue = jqo_price_gross.val();
33899	if (typeof (jqo_tax_rate) != 'object') {
33900		var taxRate = parseFloat(jqo_tax_rate);
33901	} else
33902		var taxRate = rates[jqo_tax_rate.val()];
33903
33904	if ( typeof js_Config_VM_direct_prices_editing_for_shopper_group !== "undefined" ) {
33905		$tmp_sgp = jqo_price_net.parents('.pp_other_price_content').find('select.pp_op_shopper_group_select option:selected').val();
33906
33907		if (typeof js_Config_VM_direct_prices_editing_for_shopper_group !== "undefined" && typeof js_Config_VM_direct_prices_editing_for_shopper_group[$tmp_sgp] !== "undefined" && js_Config_VM_direct_prices_editing_for_shopper_group[$tmp_sgp].dph !== '') {
33908			taxRate = parseFloat(js_Config_VM_direct_prices_editing_for_shopper_group[$tmp_sgp].dph);
33909		}
33910	}
33911	if (taxRate > 0) {
33912		netValue = netValue / (taxRate + 1);
33913	}
33914	var price = doRound(netValue, decimals);
33915	price     = remove ? js_remove_right_zeros(price) : parseFloat(price).toFixed(decimals);
33916
33917	if ( netValue == '' ) {
33918		jqo_price_net.val('');
33919	} else {
33920		jqo_price_net.val(price);
33921	}
33922
33923	var cn = jqo_price_net['0'].className;
33924	var ppsgid = jqo_price_net.parents('.pp_other_price_content').find('.pp_op_shopper_group_select').val();
33925	var sgdis = 1 - ((typeof(phsg) != 'undefined' && ppsgid != 0 ? phsg[ppsgid] : 0) / 100);
33926	//JANB fix 07-02-2020 zlý prepočet potrebné poriadne skontrolovať !!!
33927	var phcena = jqo_price_net.val() * sgdis * (taxRate + 1);
33928
33929	if (phcena % 1 == 0) {
33930		phcena = phcena;
33931	} else phcena = phcena.toFixed(2);
33932
33933	if (cn.indexOf('product_price_input') > -1) {
33934
33935		if ( netValue == '' ) {
33936			jqo_price_net.parents('.pp_other_price_content').find('.product_price_incl_tax_dis').val('');
33937		} else {
33938			jqo_price_net.parents('.pp_other_price_content').find('.product_price_incl_tax_dis').val(phcena);
33939		}
33940	}
33941}
33942
33943function js_jq_updateOldPriceNet( product_id, event ) {
33944	if (event && (event.keyCode==9 || event.keyCode==13 || (event.keyCode>34 && event.keyCode<41))) return;
33945	jqo_price_net = jQuery('.product_old_price_input_'+product_id);
33946	jqo_tax_rate = jQuery('.product_tax_select_'+product_id);
33947	jqo_price_gross = jQuery('.product_old_price_incl_vat_input_'+product_id);
33948
33949	if ( jqo_price_net.length == 0 || jqo_tax_rate.length == 0 || jqo_price_gross == 0 ) {
33950		return;
33951	}
33952
33953	js_jq_update_price_net( jqo_price_net, jqo_tax_rate, jqo_price_gross );
33954}
33955
33956function js_jq_updateNet( product_id, event, price_net_jq_selector, price_gross_jq_selector ) {
33957	if (event && (event.keyCode==9 || event.keyCode==13 || (event.keyCode>34 && event.keyCode<41))) return;
33958	jqo_price_net = jQuery((price_net_jq_selector != null && price_net_jq_selector != '') ? price_net_jq_selector : ('.product_price_input_'+product_id));
33959	jqo_tax_rate = jQuery('.product_tax_select_'+product_id);
33960	jqo_price_gross = jQuery((price_gross_jq_selector != null && price_gross_jq_selector != '') ? price_gross_jq_selector : ('.product_price_incl_tax_input_'+product_id));
33961
33962	js_jq_update_price_net( jqo_price_net, jqo_tax_rate, jqo_price_gross );
33963}
33964
33965function js_jq_updatePurchasePriceNet( product_id, event ) {
33966	if (event && (event.keyCode==9 || event.keyCode==13 || (event.keyCode>34 && event.keyCode<41))) return;
33967	jqo_price_net = jQuery('.product_purchase_price_input_'+product_id);
33968	jqo_tax_rate = jQuery('.product_tax_select_'+product_id);
33969	jqo_price_gross = jQuery('.product_purchase_price_incl_vat_input_'+product_id);
33970
33971	if ( jqo_price_net.length == 0 || jqo_tax_rate.length == 0 || jqo_price_gross == 0 ) {
33972		return;
33973	}
33974
33975	js_jq_update_price_net( jqo_price_net, jqo_tax_rate, jqo_price_gross );
33976}
33977
33978function js_parse_float( num ) {
33979	var ret = ''+num;
33980	if (ret.indexOf(',') > -1) {
33981		ret = ret.replace(/\./g, '').replace(/,/g, '.');
33982	}
33983	ret = parseFloat(ret.replace(/ /g, ''));
33984	if (isNaN(ret)) {
33985		ret = 0;
33986	}
33987	return ret;
33988}
33989
33990function apiRequest(trigger, params, callback, onetime) {
33991	if ( typeof isApiActive === 'undefined' || !isApiActive || typeof activeApiTriggers === 'undefined' || activeApiTriggers.indexOf(trigger) == -1 ) {
33992		return false;
33993	}
33994
33995	if (typeof onetime !== 'undefined' && onetime && typeof sessionStorage !== 'undefined') {
33996		var apiKey = 'apiRequest_' + trigger;
33997		var apiStorage = sessionStorage.getItem(apiKey);
33998
33999		apiStorage = apiStorage ? JSON.parse(apiStorage) : [];
34000
34001		// pri novom nacitani local storage zmaz
34002		if (typeof window[apiKey] === 'undefined') {
34003			sessionStorage.removeItem(apiKey);
34004			window[apiKey] = true;
34005			apiStorage = [];
34006		}
34007
34008		for (var x in apiStorage) {
34009			if ( typeof apiStorage[x].params !== 'undefined' && apiStorage[x].params === JSON.stringify(params) ) {
34010				/*if (typeof apiStorage[x].result !== 'undefined') {
34011					eval(apiStorage[x].result);
34012				}
34013
34014				if (typeof callback === 'function') {
34015					callback();
34016				}*/
34017
34018				return;
34019			}
34020		}
34021	}
34022
34023	if (typeof params === 'undefined') {
34024		params = {};
34025	}
34026
34027	// nieco musi byt v params, inac to neposle v requeste
34028	params.isAjax = true;
34029
34030	new AjaxRequest({'trigger': trigger, 'params': params})
34031		.setController('Api')
34032		.setAction('get')
34033		.onSuccess(function (jsonData) {
34034			if( typeof jsonData != 'undefined' && typeof jsonData.data != 'undefined' ){
34035				var res = jsonData.data;
34036
34037				if ( typeof res.jsCode !== 'undefined' ) {
34038					//pokial dostaneme kod wrapnuty v tagoch <script></script> je potrebne ich odstranit kvoli eval()
34039					var cleanJsCode = res.jsCode;
34040					cleanJsCode = cleanJsCode.replace(/<(|\/)script.*?>/gm, ''); //tagy script
34041					cleanJsCode = cleanJsCode.replace(/<!--(.*?)-->/gm, '/*$1*/'); //html koment
34042
34043					if (typeof onetime !== 'undefined' && onetime && typeof sessionStorage !== 'undefined') {
34044						apiStorage.push({
34045							'params': JSON.stringify(params),
34046							//'result': cleanJsCode
34047						});
34048
34049						sessionStorage.setItem(apiKey, JSON.stringify(apiStorage));
34050					}
34051
34052					//eval is evil
34053					eval(cleanJsCode);
34054				}
34055
34056				if (typeof callback === 'function') {
34057					callback();
34058				}
34059			}
34060		})
34061		.send();
34062}
34063
34064/**
34065 *
34066 * @param elem HTMLElement Kliknuty element
34067 * @param productId int
34068 * @param attribute string
34069 * @param action string "+" | "-"
34070 * @param quantity nmber
34071 * @param inputRef HTMLElement<input> input ktoremu sa zmeni mnozstvo podla action
34072 * @oaram cartItemId int ak je definovane odstrani sa variant podla "description" a prida sa "cart_item_id" nutne hlavne pre akciu "-" tam sa to sprava dost zvlastne
34073 * @oaram disableAnimation vypne animaciu
34074 */
34075function simpleAddToCart(elem, productId, attribute, action, quantity, inputRef, cartItemId, disableAnimation, wishlist) {
34076	var jQueryBody = jQuery('body');
34077
34078	if (['+', '-'].indexOf(action) === -1) {
34079		//jQueryBody.trigger('addToCartErrorWrongAction');
34080		console.warn('simpleAddToCart called with wrong action, action should be "+" / "-"');
34081		return false;
34082	}
34083	if (quantity < 1 || typeof quantity !== 'number') {
34084		//jQueryBody.trigger('addToCartErrorWrongQuantity');
34085		console.warn('simpleAddToCart called with wrong quantity, quantity should be more or equal to 1 and valid number');
34086		return false;
34087	}
34088	if (productId < 0 || typeof productId !== 'number') {
34089		//jQueryBody.trigger('addToCartErrorWrongProductId');
34090		console.warn('simpleAddToCart called with wrong productId, productId should be more then 0 and valid number');
34091		return false;
34092	}
34093	if (typeof inputRef !== 'undefined') {
34094		if (action == '-' && inputRef.val() - quantity == 0) {
34095			return false;
34096		}
34097	}
34098
34099	// osetrenie modal pre attiibut
34100	if (typeof tmpAttributeModalInstance !== 'undefined') {
34101		tmpAttributeModalInstance.close();
34102		tmpAttributeModalInstance = undefined;
34103	}
34104
34105	var ajaxUrl     = '/modules/mod_shop_cart_ajax.php';
34106	var ajaxOptions = {
34107		ajax_func           : 'get_ajax_cart',
34108		ajax_cart_product_id: productId,
34109		ajax_cart_action    : action, // +, -
34110		ajax_cart_quantity  : quantity,
34111		is_gift             : false,
34112		is_special_offer    : false,
34113		category_id         : 0
34114	};
34115
34116	if (typeof attribute !== 'undefined' && attribute !== '') {
34117		ajaxOptions.select_name  = 'faadd750a6fbb9ea11a94c6074db79144';
34118		ajaxOptions.select_value = attribute;
34119	}
34120
34121	if (typeof cartItemId !== 'undefined') {
34122		ajaxOptions.cart_item_id = cartItemId;
34123	}
34124
34125	if (config('js_Config_epredplatne_wishlist_compatibility') && typeof wishlist !== 'undefined') {
34126		if (wishlist === 1) {
34127			ajaxOptions.fromWishlist = true;
34128		} else if (wishlist === 2) {
34129			if (typeof attribute !== 'undefined' && attribute !== '') {
34130				ajaxOptions.select_name  = 'f9f243829b48214b20c0a53f6dfe35002';
34131				ajaxOptions.category_id = 3; //Toto este asi upravit nejak dynamicky a pozriet ci je to vobec potrebne
34132			} else {
34133				ajaxOptions.fromWishlist = true;
34134			}
34135		}
34136	}
34137
34138	jQuery.post(ajaxUrl, ajaxOptions, function (res) {
34139		if (res.indexOf('{') === -1) {
34140			jQueryBody.trigger('addToCartErrorNoAttribute');
34141			// nemame attribut ...
34142			console.error('simpleAddToCart called with wrong attribute, attribute should not be empty for produt with attributes');
34143
34144			var tmpButtons = '';
34145			var decodedRes = JSON.parse(decodeURIComponent(res));
34146
34147			tmpButtons = '<div class="vex_cart_quantity">';
34148			// mnozstvo
34149			// tmpButtons += '<input class="inputbox shop-addtocart-quantity-inputbox" type="text" size="3" name="quantity" value="1" onkeyup="(parseInt(this.value)>0)?this.style.borderColor=\'\' : this.style.borderColor=\'red\';">';
34150
34151			tmpButtons += `<div class="quantity_wrapper">
34152				<div class="count_control">
34153					<a class="count_up" onclick="jsChangeProductQuantity(this)" data-parent_selector=".quantity_wrapper" data-input_selector=".inputbox" data-action="add" data-quantity="1"></a>
34154					<a class="count_down" onclick="jsChangeProductQuantity(this)" data-parent_selector=".quantity_wrapper" data-input_selector=".inputbox" data-action="sub" data-quantity="1"></a>
34155				</div>
34156				<input onblur="jsChangeProductQuantity(this)" data-allow_zero_quantity="0" data-parent_selector=".quantity_wrapper" data-input_selector=".inputbox" data-action="set" data-quantity="1" class="inputbox shop-addtocart-quantity-inputbox" type="text" size="5" maxlength="10" value="1" name="quantity" id="quantity">
34157			</div>`;
34158
34159			let attribSelector = '[name=faadd750a6fbb9ea11a94c6074db79144] option:selected';
34160			if (config('js_Config_epredplatne_wishlist_compatibility') && decodedRes.html_variants.includes('f9f243829b48214b20c0a53f6dfe35002')) {
34161				attribSelector = '[name=f9f243829b48214b20c0a53f6dfe35002] option:selected';
34162				var is_epredplatne = true;
34163			}
34164
34165			var quantity = 'parseFloat(jQuery(this).closest(\'.cs_modal_actions\').find(\'input[name=quantity]\').val())';
34166			// pridat do kosika btn
34167			var tmpAttributeSelectedValue = 'jQuery(this).closest(\'.vex-content\').find(\'' + attribSelector + '\').val()'; // toto je podla man zle "vex-content" neexistuje v niektorych pripadoch
34168			// nove rarianty
34169			if ( typeof js_Config_product_variant !== 'undefined' && js_Config_product_variant ) {
34170				tmpAttributeSelectedValue = 'ProductVariantInstance_' + productId + '.getSelectedAttribute().source';
34171			}
34172
34173			if (typeof is_epredplatne !== 'undefined' && is_epredplatne === true) {
34174				tmpButtons += '<input onclick="simpleAddToCart(this, ' + productId + ', ' + tmpAttributeSelectedValue +', \'+\', ' + quantity + ', undefined, undefined, undefined, 2)" type="button" class="button" name="submit" title="" value="' + js_lang_luigibox_addtocart + '">';
34175			} else {
34176				tmpButtons += '<input onclick="simpleAddToCart(this, ' + productId + ', ' + tmpAttributeSelectedValue +', \'+\', ' + quantity + ')" type="button" class="button" name="submit" title="" value="' + js_lang_luigibox_addtocart + '">';
34177			}
34178			tmpButtons += '</div>';
34179
34180			// detail produktu btn
34181			tmpButtons += '<input onclick="window.location=\'' + (decodedRes.product_url || jQuery('.cs_product_item[data-product-id="' + productId + '"] a:first').attr('href') || '') + '\';" type="button" class="vex-dialog-button-secondary vex-dialog-button vex-last button" value="' + (typeof js_shop_flypage_lbl !== 'undefined' ? js_shop_flypage_lbl : '') + '">';
34182
34183			window['tmpAttributeModalInstance'] = new CsModal()
34184				.setType('info')
34185				.setTitle(decodedRes.product_name)
34186				.setContent(decodedRes.html_variants)
34187				.setButtons(tmpButtons)
34188				.setActionsClassName('vex-dialog-buttons')
34189				.afterOpen(function () {
34190					jQueryBody.trigger('addToCartAttributeModalShown', [{
34191						productId: productId
34192					}]);
34193
34194					jQuery('.cs_modal_content_inner .attr_sel_a:first').click();
34195				})
34196				.open();
34197
34198			return false;
34199		}
34200
34201		res = JSON.parse(res);
34202		if (typeof res['update_res']['success'] === 'undefined') {
34203			var ajaxRes     = res['update_res'],
34204			    stripedText = jQuery(ajaxRes).text().replace('\n', '<br>');
34205			if (stripedText) {
34206				jQuery(elem).tooltipster({
34207					theme        : "tooltipster-gdpr",
34208					contentAsHTML: true,
34209					trackTooltip : true,
34210					trackOrigin  : true,
34211					multiple     : false,
34212					timer        : 5000,
34213					trigger      : 'custom',
34214					onlyOne      : false,
34215					content      : stripedText
34216				}).tooltipster('open');
34217			}
34218			return false;
34219		}
34220
34221		if (typeof quantity === 'undefined') {
34222			quantity = 1;
34223		}
34224
34225		if (typeof inputRef !== 'undefined') {
34226			if (action === '+') {
34227				inputRef.val(parseFloat(inputRef.val()) + quantity);
34228			} else {
34229				inputRef.val(parseFloat(inputRef.val()) - quantity);
34230			}
34231		}
34232
34233		jQuery('.moduleCartInfo').html(res['html_cart_values']);
34234		jQuery('.cart_ajax_container').replaceWith(res['html_products']);
34235		//ajax cart fix
34236		jQuery('div.module-cart').removeClass('empty');
34237		jQuery('a.cartLink').removeAttr('onclick');
34238		if (typeof disableAnimation === 'undefined') {
34239			js_cart_image_animate(elem);
34240		}
34241
34242		if (typeof js_product_as_gift_init === 'function') {
34243			js_product_as_gift_init();
34244		}
34245
34246		var cartItemId = null;
34247
34248		if (typeof res.update_res.itemId !== 'undefined') {
34249			cartItemId = res.update_res.itemId;
34250		}
34251
34252		jQueryBody.trigger('addToCartFinished', [{
34253			productId: productId,
34254			attribute: typeof attribute !== 'undefined' ? attribute : '',
34255			action: action,
34256			quantity: quantity,
34257			itemId: cartItemId,
34258		}]);
34259
34260		jQueryBody.trigger('cartUpdated');
34261
34262		if (typeof isApiActive !== 'undefined' && isApiActive) {
34263			var apiAction = action === '+' ? 'addToCart' : 'removeFromCart';
34264			var pageMatch = typeof js_server_request_uri !== 'undefined' ? js_server_request_uri.match(/(&|;|\?)page\=([^&]+)/) : undefined;
34265			var manMatch  = typeof js_server_request_uri !== 'undefined' ? js_server_request_uri.match(/(&|;|\?)pc_manufacturer_id\=([^&]+)/) : undefined;
34266			var page      = '';
34267			if (typeof manMatch === 'object' && manMatch !== null) {
34268				page = 'manufacturer';
34269			} else if (typeof pageMatch === 'object' && pageMatch !== null && typeof pageMatch[2] !== 'undefined') {
34270				page = pageMatch[2];
34271			}
34272			apiRequest(apiAction, {
34273				'products': [{
34274					'product_id' : productId,
34275					'quantity'   : quantity,
34276					'description': typeof attribute !== 'undefined' ? attribute : '',
34277					'idx'        : ''
34278				}],
34279				'page'    : page,
34280				'isAjax'  : true
34281			});
34282		}
34283
34284		return false;
34285	});
34286
34287	return false;
34288}
34289
34290function js_shopcart_submit(elem) {
34291	if (typeof js_shopcart_submit_custom != 'undefined') {
34292		return js_shopcart_submit_custom(elem);
34293	}
34294
34295	var $elem = jQuery(elem);
34296	var $form = $elem.is('form') ? $elem : $elem.parents('form:first');
34297	var $quantity = $form.find('[name="quantity"]');
34298	let productId = $form.find('input[name=product_id]').val();
34299
34300	if (($quantity.val().indexOf(',')) != -1) {  // nebralo ciarku pri 'Nákup produktov v desatinných množstvách'
34301		$quantity.val($quantity.val().replace(/\,/g, '.'));
34302	}
34303
34304	if ($quantity.length && parseFloat($quantity.val()) == 0) {
34305		$quantity.trigger('focus');
34306		return false;
34307	}
34308
34309	//RB vex pre custom field
34310	if ( $elem.hasClass('is_restricted_product') ) {
34311		vex.dialog.alert( $elem.data('vex_url') );
34312	}
34313
34314	if ( $elem.hasClass('vex_product_is_in_spg') && typeof js_Config_show_vex_after_add_to_cart !== 'undefined' && js_Config_show_vex_after_add_to_cart && typeof CsModal !== "undefined" ) {
34315		//#15177
34316		showMessageAfterAddToCart(elem);
34317		return false;
34318	}
34319
34320	if (typeof js_Config_product_variant !== 'undefined' && js_Config_product_variant) {
34321		// neskor presunut do vnutra `checkIfVariantIsSelected`
34322		if (typeof window[`ProductVariantInstance_${productId}`] !== 'undefined' && (window[`ProductVariantInstance_${productId}`].attributeList.length > 0 || Object.keys(window[`ProductVariantInstance_${productId}`].attributeList).length > 0)) {
34323			return window[`ProductVariantInstance_${productId}`].checkIfVariantIsSelected();
34324		}
34325
34326		return true;
34327	}
34328
34329	// dusan pridani ehlasky pri nevybere variantu
34330	if (js_global_VM_PRODUCT_ATTRIB_FIRST_OPTION_REQUIRED != '2') {
34331		var is_checked = false;
34332		var variant_element = '';
34333		if(jQuery('.attr_group_sel_div').length != '0'){
34334			// pri vybere variantu z attr_group_sel_div a
34335			jQuery('.attr_group_sel_div a').each( function () {
34336				if (jQuery(this).hasClass('selected_attr')){
34337					is_checked = true;
34338				}
34339			});
34340			variant_element = '.attr_group_sel_div a';
34341
34342		} else if(jQuery('.prod_adv_attrib_select select').length != '0'){
34343			//zo selectu
34344			if( jQuery('.prod_adv_attrib_select select').val() != ''){
34345				is_checked = true;
34346			}
34347
34348			variant_element = '.prod_adv_attrib_select select';
34349
34350		} else {
34351
34352			if ( is_cs_user('separate_js') && ( typeof js_CS_Config_empy_radio_select_variant !== 'undefined' && js_CS_Config_empy_radio_select_variant == '1' ) ) {
34353				var form_varaints = jQuery('.prod_adv_attribs_div').find('.shop_addtocart_advanced_attribute_radio');
34354				if( ( typeof js_global_VM_PRODUCT_ATTRIB_FIRST_OPTION_REQUIRED !== 'undefined' && js_global_VM_PRODUCT_ATTRIB_FIRST_OPTION_REQUIRED == '1') && ( form_varaints.length > 0 ) && (form_varaints.is(':checked') == false ) ){
34355					is_checked = false;
34356					variant_element = '.prod_adv_attribs_div';
34357				} else {
34358					// nieje vyber variantu
34359					return true;
34360				}
34361
34362			}else {
34363				// nieje vyber variantu
34364				return true;
34365			}
34366		}
34367		if (is_checked == true){
34368			return true;
34369		} else {
34370            var attribsWrapperTop = jQuery('.prod_adv_attribs_div').offset().top - 70;
34371
34372            jQuery(variant_element).each( function () {
34373				jQuery(this).addClass('please_choose_variant');
34374			});
34375			if ( attribsWrapperTop < jQuery(window).scrollTop() ) {
34376                jQuery('html, body').animate({
34377                    scrollTop: attribsWrapperTop
34378                }, 600);
34379			}
34380			jQuery(variant_element + ':first').tooltipster({
34381				theme        : "tooltipster-gdpr tooltipster-choose-attr",
34382				contentAsHTML: true,
34383				trackTooltip : true,
34384				trackOrigin  : true,
34385				multiple     : true,
34386				timer        : 5000,
34387				content      : (typeof js_cart_select_item !== 'undefined' ? js_cart_select_item : '')
34388			}).tooltipster('open');
34389			return false;
34390		}
34391	}
34392
34393	return true;
34394}
34395function js_add_bind_data(jso, name, value) {
34396	var jqo  = jQuery(jso);
34397	var bind = jqo.data('bind');
34398	jqo.data('bind', jQuery.extend(bind, {name: value}));
34399}
34400/////-------------- PEXF LOAD PRE PARAMETRE - FINALNY
34401var js_external_url_link = '';
34402function js_pexf_load( page_count, asc_desc, mode ) {
34403	if (js_global_is_csu) {
34404		console.log('FN: js_pexf_load', {page_count: page_count, asc_desc: asc_desc, mode: mode});
34405	}
34406
34407	if ( typeof js_category_id === 'undefined' ) return;
34408
34409	// Neloaduj ak je poziadavka z nekonecneho scrolovania
34410	if( typeof inf_clear_pexf !== 'undefined' && inf_clear_pexf == true ) return;
34411
34412	js_global_c_pp_filter_processing = null;
34413	js_global_pexf_processing = null;
34414	var options = {'option': 'com_shop', 'page': 'shop.browse', 'Itemid': '1040', 'category_id': js_category_id, 'no_html': '1', 'no_css': '1', 'no_menu': '1', 'no_vm_html': '1', 'sef_rewrite_index2_index': '1'};
34415
34416	if (jQuery('.pexf_reset_container .pexf_cancel_values').hasClass('active') && mode != 'reset_product_filter') {
34417		jQuery('.pexf_reset_container .pexf_cancel_values').fadeIn(300);
34418	} else
34419		jQuery('.pexf_reset_container .pexf_cancel_values').fadeOut(300);
34420
34421
34422	jQuery('body').find('.pexf_selected_values').html('');	// zmazanie zoznamu vsetkych selectnutych attribute filtrov
34423
34424	// filter cenove hladiny
34425	jQuery('.pexf_value input[type="checkbox"][name="ch_pexf_price_level"]:checked').each(function ( idx_v, jso_v ) {
34426		options[jQuery(jso_v).attr('name')+'['+idx_v+']'] = jQuery(jso_v).val();
34427		var pexf_selected_values_container = jQuery(this).parents('.pexf_container').find('.pexf_selected_values:first');
34428// 		if (typeof(console) != 'undefined') console.log('pexf_selected_values_container', pexf_selected_values_container, jQuery(jso_v), jQuery(jso_v).siblings('label'));
34429		var this_attr_value = jQuery(jso_v).siblings('label').html();
34430		if (typeof(console) != 'undefined') console.log('this_attr_value', pexf_selected_values_container,  this_attr_value);
34431		pexf_selected_values_container.html(pexf_selected_values_container.html() + this_attr_value + '<br/>');
34432	});
34433
34434	// filtry podla atributov
34435	if (jQuery('body').find('input.attr_value_filter:checked').length) {
34436
34437		options.attr_filter_values_enabled = 1;
34438		options.attr_filter_values = {};
34439
34440		jQuery('body').find('input.attr_value_filter:checked').each(function(i){
34441			// naplnenie do zoznamu vybratych filtrov
34442			var pexf_selected_values_container = jQuery(this).parents('.pexf_container').find('.pexf_selected_values:first');
34443			var this_attr_value = jQuery(this).val().split(':');
34444			pexf_selected_values_container.html(pexf_selected_values_container.html() + this_attr_value[1] + '<br/>');
34445			//var input_class = jQuery(this).attr
34446			var attr_val_index_arr = jQuery(this).attr('class').match(/(^| )pexf_by_attr_value_([0-9]+)/);
34447
34448			if (attr_val_index_arr != null && attr_val_index_arr.length > 2 )
34449				var attr_val_index = attr_val_index_arr[attr_val_index_arr.length - 1];
34450
34451			if (typeof(options.attr_filter_values[attr_val_index]) != "object")
34452				options.attr_filter_values[attr_val_index] = [];
34453
34454			options.attr_filter_values[attr_val_index][ options.attr_filter_values[attr_val_index].length ] = jQuery(this).val();
34455		});
34456	}
34457
34458	// filtry podla atributov - type image
34459	if (jQuery('body').find('input.attr_image_value_filter_selected').length) {
34460
34461		options.attr_filter_values_enabled = 1;
34462		if (typeof(options.attr_filter_values) == "undefined" )
34463			options.attr_filter_values = {};
34464
34465
34466		jQuery('body').find('input.attr_image_value_filter_selected').each(function(i) {
34467			var pexf_selected_values_container = jQuery(this).parents('.pexf_container').find('.pexf_selected_values:first');
34468			var this_attr_image_value = jQuery(this).css('background-image').replace(/"/gi, '').replace(/'/gi,'');
34469			pexf_selected_values_container.html(pexf_selected_values_container.html() + '<input type="button" class="attr_image_value_filter attr_image_value_filter_active" style="background:' + this_attr_image_value + ' repeat center 50%" value=""/> ');
34470
34471			var attr_val_index_arr = jQuery(this).attr('class').match(/(^| )pexf_by_attr_value_([0-9]+)/);
34472
34473			if (attr_val_index_arr != null && attr_val_index_arr.length > 2 )
34474				var attr_val_index = attr_val_index_arr[attr_val_index_arr.length - 1];
34475
34476			if (typeof(options.attr_filter_values[attr_val_index]) != "object")
34477				options.attr_filter_values[attr_val_index] = [];
34478
34479			options.attr_filter_values[attr_val_index][ options.attr_filter_values[attr_val_index].length ] = jQuery(this).val();
34480
34481		});
34482	}
34483
34484	// filter vyrobcu
34485	var manufacturer_select = jQuery('select[name=product_manufacturer_shop_browse_filter]');
34486	if ( manufacturer_select.length > 0 ) {
34487		if(is_cs_user()) console.log(manufacturer_select.val());
34488		if (manufacturer_select.val() != '') {
34489			options.pc_manufacturer_id = manufacturer_select.val();
34490			if (typeof(options.pc_manufacturer_id) == 'string' && isNaN(options.pc_manufacturer_id)) {// palo
34491				options.pc_manufacturer_id = options.pc_manufacturer_id.substring(0, options.pc_manufacturer_id.length - 1);
34492				var start_id = options.pc_manufacturer_id.lastIndexOf('-') + 1;
34493				options.pc_manufacturer_id = options.pc_manufacturer_id.substring(start_id);
34494			}
34495
34496
34497			if (Array.isArray(options.pc_manufacturer_id)) {	// multiple
34498				jQuery('.pexf_manu_container').find('.pexf_selected_values').html('');
34499				var selected_values = [];
34500				jQuery.each(options.pc_manufacturer_id, function (i, val) {
34501					if (val > 0)
34502						selected_values.push( manufacturer_select.find('option[value="' + val + '"]').html() );
34503				});
34504				jQuery('.pexf_manu_container').find('.pexf_selected_values').html( selected_values.join(', ') );
34505
34506			} else 												// standard
34507				jQuery('.pexf_manu_container').find('.pexf_selected_values').html(manufacturer_select.find('option[value="' + options.pc_manufacturer_id + '"]').html());
34508		}
34509	}
34510
34511	// limit produktov na stranku
34512	options.limit = jQuery('#middle').find('select[name=limit]:first').val();
34513	if (typeof(options.limit)=='undefined') {
34514		if ( typeof js_custom_page_limit != 'undefined')
34515			options.limit = js_custom_page_limit;
34516		else
34517			options.limit = 20;	// lebo
34518	}
34519
34520	// limit - strankovanie
34521	options.limitstart = 0;
34522	if ( typeof(page_count) != "undefined" && page_count > 0 ) 	// Zobraziť na stránku
34523		options.limitstart = page_count;
34524
34525	// zoradit produkty podla ...
34526	options.orderby = jQuery('#middle').find('select[name=orderby]:first').val();
34527	if (typeof(options.orderby) == 'undefined' || options.orderby == 'undefined')
34528		options.orderby = 'vm_product.product_name';
34529	if (jQuery('#middle').find('select[name=orderby]:first option:selected').index() != 0 ) {
34530		jQuery('.pexf_order_by_container .pexf_selected_values').html( jQuery('#middle').find('select[name=orderby]:first option:selected').html() );
34531	} else
34532		jQuery('.pexf_order_by_container .pexf_selected_values').html('');
34533
34534	// zoradit produkty ASC/DESC
34535	if (typeof(mode) != "undefined" && mode == 'select_order') {
34536		asc_desc_ico = 'sort_desc.png';
34537		asc_desc = '1';
34538	}
34539	if (typeof(asc_desc_ico) != "undefined" && asc_desc_ico == '' && jQuery('.orderby_img').length) {
34540		asc_desc_ico = jQuery('.orderby_img:first').attr('src').indexOf('sort_asc') > -1 ? 'sort_asc.png' : 'sort_desc.png';
34541	}
34542	if ( typeof(asc_desc) != "undefined" && asc_desc != '' ) {
34543		if (typeof(asc_desc_ico) != "undefined" &&  asc_desc_ico == 'sort_asc.png') {
34544			options.DescOrderBy = 'DESC';
34545			asc_desc_ico = 'sort_desc.png';
34546		} else {
34547			options.DescOrderBy = 'ASC';
34548			asc_desc_ico = 'sort_asc.png';
34549		}
34550
34551		Cookies.set('shop_browse_orderby_price_asc_desc', options.DescOrderBy, { path: '/' });
34552		jQuery('.pexf_order_by_value_container').find('.asc_desc_img').attr('src', js_global_live_site + '/images/M_images/' + asc_desc_ico);
34553		jQuery('.pexf_order_by_container .pexf_selected_values').append('<img class="pexf_asc_desc_img_set" src="/images/M_images/' + asc_desc_ico + '" />');
34554	}
34555	if (typeof asc_desc == 'undefined' && jQuery('.orderby_img').length) {
34556		asc_desc_ico = jQuery('.orderby_img:first').attr('src').indexOf('sort_asc') > -1 ? 'sort_asc.png' : 'sort_desc.png';
34557		if (typeof(asc_desc_ico) != "undefined" && asc_desc_ico == 'sort_asc.png') {
34558			options.DescOrderBy = 'ASC';
34559		} else {
34560			options.DescOrderBy = 'DESC';
34561		}
34562	}
34563	// END: ordering
34564
34565	// adaptivny filter podla ceny
34566	if (jQuery('#pexf_range').length && mode != 'reset_product_filter') {
34567		var $pexf_range = jQuery('#pexf_range');
34568		var slider_params = $pexf_range.data('params') || {};
34569		options.pexf_price_from = $pexf_range.slider('values')[0];
34570		options.pexf_price_to = $pexf_range.slider('values')[1];
34571		options.pexf_price_tax = slider_params.max_tax;
34572		jQuery('#pexf_range').parents('.pexf_price_lvl:first').find('.pexf_selected_values').html('');
34573
34574		// cudzojazycny filter, hodnoty treba prepocitat na default currency
34575		if (!js_is_empty(slider_params.orig) && !js_is_empty(slider_params.orig.currency_rate) && slider_params.orig.currency_rate != 1) {
34576			options.pexf_price_from = options.pexf_price_from / slider_params.orig.currency_rate;
34577			options.pexf_price_to = options.pexf_price_to / slider_params.orig.currency_rate;
34578		}
34579
34580	}
34581
34582	// skupina produktov
34583	if (jQuery('select#product_special_group').length)
34584		options.product_special_group = jQuery('select#product_special_group').val();
34585
34586	options.is_pexf = 1;
34587	options.shop_browse_ajax_mode = 1;	// shop ajax mode enabled
34588
34589	jQuery('#middle').css('height', 'auto');
34590
34591	// filter dostupnostosti
34592	if (jQuery('#product_availability_shop_browse_filter').length) {
34593		options.pc_avail_id = jQuery('#product_availability_shop_browse_filter').val();
34594		var avails = jQuery('#product_availability_shop_browse_filter').val();
34595		if (jQuery('#product_availability_shop_browse_filter').attr('multiple') == 'multiple' && avails != null && avails.length > 0){
34596			var avail_opt = avails.join(',');
34597		} else {
34598			var avail_opt = avails;
34599		}
34600		Cookies.set('pc_avail_id_' + js_category_id, avail_opt, { path: '/' });
34601
34602		var selected_values = [];
34603		if (jQuery('#product_availability_shop_browse_filter').val() != '' ) {
34604			jQuery('#product_availability_shop_browse_filter :selected').each(function () {
34605				selected_values.push(jQuery(this).text());
34606			});
34607		}
34608		jQuery('.pexf_avail_container .pexf_selected_values').html(selected_values.join(', '));
34609	}
34610
34611	// JAN external link filter parameter, zostavenie linku
34612	if (typeof js_filter_param_from_url != 'undefined' && js_filter_param_from_url == 1){
34613
34614		var opt = {};
34615		var fu_params = Cookies.get('c_pp_filter_' + js_category_id);
34616		var fu_avails = Cookies.get('pc_avail_id_' + js_category_id);
34617
34618		if (typeof fu_params !== 'undefined' && fu_params !== null && fu_params !== '') opt.x = 'c_pp_filter_'+js_category_id+'='+fu_params;
34619		if (typeof fu_avails !== 'undefined' && fu_avails !== null && fu_avails !== '') opt.y = 'pc_avail_id_'+js_category_id+'='+fu_avails;
34620
34621		var optKey = {'limit':'a','limitstart':'b','orderby':'c','pexf_price_from':'d','pexf_price_tax':'e','pexf_price_to':'f'};
34622		for(var keyIndex in options) {
34623		   if (options.hasOwnProperty(keyIndex)) {
34624			   if(typeof(optKey[keyIndex]) != 'undefined'){
34625				   opt[optKey[keyIndex]] = options[keyIndex];
34626			   }
34627		   }
34628		}
34629		var encoded_url = btoa(JSON.stringify(opt));
34630		js_external_url_link = js_global_live_site+js_url.replace(/&amp;/g, '&')+'?fp='+encoded_url;
34631		cs_set_cookie('filter_param_from_url', js_external_url_link);
34632	}
34633
34634// 	if (typeof(console) != 'undefined') console.log(options);
34635	if (typeof(js_pexf_load_before_ajax_init) == 'function')
34636			js_pexf_load_before_ajax_init();
34637
34638	if (typeof(js_pexf_load_change_options_init) == 'function')
34639		options = js_pexf_load_change_options_init(options);
34640
34641	// scroll to top of produtct list after pexf_load
34642	if (typeof js_pexf_load_autoscroll != 'undefined' && js_pexf_load_autoscroll == 1 && jQuery('.shop_browse_category_h2').length) {
34643		var top_pos = jQuery('.shop_browse_category_h2').offset().top || -1;
34644		setTimeout(function () {
34645			if (top_pos > 0)
34646				jQuery.scrollTo(top_pos, 800);
34647		}, 250);
34648	}
34649
34650	// set category last page
34651	Cookies.set('shop_browse_pexf_limitstart_' + js_category_id, options.limitstart, { path: '/' });
34652
34653	// JAN dynamic category product counter
34654	js_pexf_product_counter();
34655	jQuery('#middle_content_inner').html('<div class="middle_progress" style="text-align:center"><img src="/images/ajax-loader-01.gif" alt="..." /></div>').load('/index2.php', options, function () {
34656
34657		jQuery('.shop_category_limit').show();
34658
34659		// presunutie pagination limitboxu do tela modulu
34660		if (typeof js_move_pagination_to_filter_module != 'undefined' && typeof js_filter_pagination_enabled != 'undefined' && js_filter_pagination_enabled == 1){
34661			js_move_pagination_to_filter_module();
34662		}
34663
34664		// vymazanie selected values elementov
34665		if (typeof(mode) != "undefined" && mode == 'reset_product_filter')
34666			jQuery('.pexf_selected_values').html('');
34667
34668		if (typeof js_get_selectboxes_height != 'undefined')
34669			js_get_selectboxes_height();
34670
34671		// na konci vzdy
34672		if (typeof(js_pexf_load_after_ajax_init) == 'function')
34673			js_pexf_load_after_ajax_init();
34674
34675
34676	});
34677	return false;
34678}
34679
34680// JAN filter dynamic category product counter
34681function js_pexf_product_counter(){
34682
34683	var filter_box = jQuery('body').find('.c_pp_filter_container');
34684
34685	if( filter_box.length > 0 && filter_box.hasClass('c_pp_counter') ){
34686
34687		var options = {};
34688
34689		jQuery.post('/public_scripts_M4r7ft/ajax/pexf_count_product.php', options, function (res) {
34690
34691			var result = JSON.parse(res);
34692
34693			if( typeof result === 'object' ){
34694
34695				jQuery.each(result.counter, function(c, v){
34696
34697					var elem = jQuery('.module_cont-kateg .category_id_'+c);
34698
34699					if (elem.find('span.pexf_counter').length > 0){
34700						elem.find('span.pexf_counter').html(v).attr('class', result.filter);
34701					} else {
34702						elem.append('<span class="'+result.filter+'">'+v+'</span>');
34703					}
34704				});
34705			}
34706		});
34707	}
34708}
34709
34710function js_update_text_counter(elem, max_count, counterElement) {
34711	if (typeof max_count == 'undefined')
34712		return;
34713
34714	counterElement = counterElement || false;
34715
34716	var $elem = jQuery(elem);
34717	var $counter = $elem.parent().find('.txt_count');
34718
34719	if (counterElement) {
34720		$counter = jQuery(counterElement);
34721	}
34722
34723	$counter.text(parseInt(max_count) - $elem.val().length);
34724}
34725
34726function is_admin() {
34727	return ((typeof js_global_is_admin !== 'undefined' ? js_global_is_admin : false) || jQuery('body').hasClass('admin_design'));
34728}
34729
34730function is_cs_user(cookieValue) {
34731	if (typeof js_global_is_csu !== 'undefined') {
34732		if (typeof cookieValue !== 'undefined') {
34733			if (Cookies.get('cs_whois') !== undefined && Cookies.get('cs_whois') !== '') {
34734				return Cookies.get('cs_whois').split('|').includes(cookieValue);
34735			}
34736
34737			return false;
34738		}
34739
34740		return js_global_is_csu;
34741	}
34742
34743	return false;
34744}
34745
34746function isDesignTools(param) {
34747	if( typeof design_tools !== 'undefined' ) {
34748		if( typeof param !== 'undefined' && typeof design_tools[param] !== 'undefined' ) {
34749			return design_tools[param];
34750		}
34751
34752		if( typeof param !== 'undefined' && typeof design_tools[param] === 'undefined' ) {
34753			return false;
34754		}
34755
34756		return design_tools;
34757	}
34758
34759	return false;
34760}
34761
34762/**
34763 * Vrati ID modulu
34764 * @param elem - jQuery element modulu, ktoreho ID chceme ziskat
34765 * @return int - ID modulu. Ak element neobsahuje triedu s definiciou modulu, vrati 0.
34766 */
34767function getModuleId(elem) {
34768	if (typeof elem === 'undefined')
34769		return 0;
34770
34771	var classes = jQuery(elem).attr('class');
34772
34773	console.log(classes);
34774
34775	if (typeof classes === 'undefined')
34776		return 0;
34777
34778	var mpid = classes.match(/mp_id(\d+)/);
34779	if (mpid != null && mpid instanceof Array)
34780		return parseInt(mpid[1]);
34781	return 0;
34782}
34783
34784function vmExplodeProductVariant(attributes = '', ex_params = null) {
34785	let ret = {};
34786	if (typeof attributes === 'string' && attributes !== '') {
34787		attributes = attributes.replace('$@#@$:', '');
34788		let l = attributes.split(';');
34789		if (l !== null) {
34790			l.forEach((v) => {
34791				v = v.trim();
34792				if (v !== '') {
34793					let ret1 = {};
34794					let matches;
34795
34796					// SPECIAL CHARS $@#@$:
34797					if (!(ex_params && ex_params['no_strip_special_replacement'])) {
34798						v = v.replace(/^\$\@\#\@\$\[\:\,]/, '');
34799					}
34800
34801					if ((matches = v.match(/(.+?)(\[|\{|$)/)) && matches[1].trim() !== '') {
34802						// ATTR DATA
34803						let a = matches[1].replace(/[ ]{0,}\:[ ]{0,}/g, ':').trim();
34804						let l2 = a.split('-');
34805						l2.forEach((v2) => {
34806							let l3 = v2.split(':');
34807
34808							if (typeof ret1['attr'] === 'undefined') {
34809								ret1['attr'] = {};
34810							}
34811
34812							ret1['attr'][l3[0].trim()] = l3[1] ? l3[1].trim() : '';
34813						});
34814
34815						// GROUPS
34816						v.match(/\{([\w]+)=(.+?)\}/g).forEach((match) => {
34817							let props = match.slice(1, -1).split('=');
34818							let propName = props[0];
34819							let propValue = props[1];
34820
34821							if (typeof ret1['prop'] === 'undefined') {
34822								ret1['prop'] = {};
34823							}
34824
34825							if (['CDATA', 'IMG', 'AID'].includes(propName)) {
34826								ret1['prop'][propName] = decodeURIComponent(propValue);
34827							} else {
34828								ret1['prop'][propName] = propValue;
34829							}
34830						});
34831
34832						// PRICE
34833						if ((matches = v.match(/\[(.+?)\]/)) && matches[1].trim() !== '') {
34834							ret1['prop']['price'] = matches[1];
34835
34836							let matches2;
34837							if ((matches2 = matches[1].match(/^(\+|\-|\=?)(.+)/))) {
34838								if (matches2[1]) {
34839									ret1['prop']['price_sign'] = matches2[1];
34840								}
34841								if (matches2[2]) {
34842									ret1['prop']['price_num'] = matches2[2];
34843								}
34844							}
34845						}
34846
34847						// CUSTOM - SGP PAIR
34848						if (ret1['prop']['SGP']) {
34849							let prices = ret1['prop']['SGP'].split('|');
34850							ret1['prop']['SGP'] = {};
34851							prices.forEach((price) => {
34852								let sgp = price.split(':');
34853								ret1['prop']['SGP'][sgp[0]] = sgp[1];
34854							});
34855						}
34856
34857						if (ret1['prop'] && ret1['prop']['VDOM']) {
34858							ret1['prop']['VDOM'] = ret1['prop']['VDOM'].split(',').filter((v) => v !== '');
34859						}
34860
34861						ret1['source'] = v;
34862
34863						if (ex_params && ex_params['assoc_by_code'] && ret1['prop']['CODE'] !== '') {
34864							a = ret1['prop']['CODE'];
34865						}
34866
34867						ret[a] = ret1;
34868					}
34869				}
34870			});
34871		}
34872	}
34873	return ret;
34874}
34875
34876
34877function jsParseVariant(variant){
34878	var split = variant.split('{');
34879	var variants = {};
34880	jQuery(split).each(function (k,v){
34881		if (v.substr(-1) === "}") {
34882			v = v.slice(0, -1);
34883		}
34884		var v_split = [];
34885		if (v.indexOf(":")>0){
34886			v_split = v.split(':');
34887		} else if(v.indexOf("=")>0){
34888			v_split = v.split('=');
34889		}
34890		variants[v_split[0]] = v_split[1];
34891	});
34892	return variants;
34893
34894}
34895
34896function js_show_delivery_date_by_max_stock(element) {
34897	/*if( !jQuery('body').hasClass('shop_page_class_shop_product_details') ) return;
34898	if ( jQuery('.shop_product_availability_value').length > 0 && typeof product_stock !== 'undefined' && typeof productInCart !== 'undefined' ) {
34899		if( parseInt(product_stock) < parseInt(productInCart) ) {
34900			jQuery('.shop_product_availability_value:last').text('Nedostupne');
34901		}
34902	}*/
34903	var jqo = jQuery(element);
34904	var avail_jqo = jqo.parents('.variant-info-group').siblings('.vig-availability');
34905	var product_stock = avail_jqo.find('.product_in_stock').text();
34906	var jqo_value = parseInt(jqo.val());
34907	if ( jqo_value < 0 ) {
34908		jqo_value = 0;
34909	}
34910	if ( jqo_value > parseInt(product_stock) ) {
34911		avail_jqo.find('.variant-info-value').text('doba dodania sa môže líšiť');
34912		avail_jqo.removeClass('vig-avail-3');
34913		avail_jqo.addClass('vig-avail-4');
34914	} else {
34915		avail_jqo.find('.variant-info-value').text('skladom');
34916		avail_jqo.removeClass('vig-avail-4');
34917		avail_jqo.addClass('vig-avail-3');
34918
34919	}
34920}
34921
34922// dusko product delivery max stock
34923function js_show_delivery_max_stock(product_stock){
34924	// ak niesme v product_details
34925	var max_stock = false;
34926	if( !jQuery('body').hasClass('shop_page_class_shop_product_details') ) return;
34927
34928	if( jQuery('.variant_btns_custom').length > 0 ) {
34929		if( jQuery('.variant_btn_custom_selected').length > 0 ){
34930			// armymarket ma zapnute custom varianty
34931			var variant_index = jQuery('.variant_btn_custom_selected').data('index');
34932			var variant_attrib = jQuery('.prod_adv_attribs_div select .attrib_comb_' + variant_index).val();
34933			var variant = jsParseVariant(variant_attrib);
34934			var stock = typeof variant.SS !== 'undefined' && typeof variant.S !== 'undefined' && variant.S == 0 ? variant.SS : variant.S;
34935			jQuery('.dodanie .date-container .text').remove();
34936			if ( parseInt(stock) > 0 ){
34937				var text = js_lang_max_product_stock_per_order.replace('{stock}', stock);
34938				jQuery('.dodanie .date-container').append('<span class="text">' + text  +'</span>');
34939				max_stock = true;
34940			}
34941
34942		} else if( product_stock > 0){
34943			// toto je volane z product details vzdy tak to nechajte ako poslednu podmienku
34944			var text = js_lang_max_product_stock_per_order.replace('{stock}', product_stock);
34945			jQuery('.dodanie .date-container').append('<span class="text">' + text  +'</span>');
34946			max_stock = true;
34947		}
34948
34949		if( jQuery('.dodanie .dodanie_inner.max_stock').length > 0 && !max_stock){
34950			jQuery('.dodanie .dodanie_inner').removeClass('max_stock');
34951		}
34952		if( jQuery('.dodanie .dodanie_inner.max_stock').length == 0 && max_stock){
34953			jQuery('.dodanie .dodanie_inner').addClass('max_stock');
34954		}
34955
34956		return;
34957	}
34958	if ( is_cs_user() ) {
34959		console.log('treba este dorobit ine druhy variantov');
34960		return;
34961	}
34962}
34963
34964// JAN product last pieces box
34965function js_last_pieces_html_box(elem){
34966
34967	if( !jQuery('body').hasClass('shop_page_class_shop_product_details') ) return;
34968
34969	var container = jQuery('.product_last_piece_box');
34970
34971	if( container.length == 0 || typeof(last_pieces_info_enabled) == 'undefined' || last_pieces_info_enabled == 0 ) return;
34972
34973	// Ak ma produkt atributy musi sa to spustit z local.js cez change (co sa deje vo vecsine pripadov)
34974	var hasattribs = config('js_Config_product_variant') ? (jQuery('.prod_adv_attribs_div').length > 0) : (jQuery('#addtocart .prod_adv_attribs_div').length > 0);
34975
34976	if (elem === 0 && hasattribs) return;
34977
34978	// O Aky typ zobrazenia ide?
34979	var box_val = '';
34980	var anchork = jQuery(elem);
34981	var classes = anchork.attr('class');
34982	if (typeof classes !== 'undefined'){
34983		var classList = classes.split(/\s+/);
34984
34985		for (var i = 0; i < classList.length; i++) {
34986			switch(classList[i]){
34987				// Radio inputs
34988				case 'shop_addtocart_advanced_attribute_tbl' : {
34989					box_val = anchork.attr('data-value');
34990					break;
34991				}
34992				// Href / image inputs
34993				case 'shop_addtocart_advanced_attribute_block' : {
34994					box_val = anchork.val();
34995					break;
34996				}
34997				// Select box
34998				case 'main_attr_select' : {
34999					box_val = anchork.val();
35000					break;
35001				}
35002			}
35003		}
35004
35005		if (box_val === '' && anchork.is('input')) box_val = anchork.val();
35006	}
35007
35008	var _render_last_pieces = function(result) {
35009		if (typeof result !== 'object' || result == null || typeof result.content == 'undefined') {
35010			container.html('');
35011			return;
35012		}
35013		var inner_html = '<div class="last_pieces_detail_tag ' + result.class + '"><span>' + result.content + '</span></div>';
35014		container.html(inner_html);
35015		var filter_object = jQuery('.last_pieces_detail_tag span');
35016		var orig_color = filter_object.css('color');
35017			  filter_object
35018			  .css('color','#FFF')
35019			  .css('transition', 'all 0.3s ease-out')
35020			  .css('-webkit-transition', 'all 0.3s ease-out')
35021			  .css('-moz-transition', 'all 0.3s ease-out')
35022			  .css('-o-transition', 'all 0.3s ease-out');
35023				setTimeout( function(){
35024					filter_object
35025					.css('color',orig_color);
35026			},200);
35027	};
35028
35029	if (typeof window.last_pieces_cache === 'undefined') window.last_pieces_cache = {};
35030
35031	var box_val_key = btoa(encodeURIComponent(box_val));
35032
35033	if (typeof window.last_pieces_cache[box_val_key] !== 'undefined'){
35034
35035		_render_last_pieces(window.last_pieces_cache[box_val_key]);
35036	} else {
35037
35038		// Setneme to uz teraz aby sa to nevolalo dookola
35039		window.last_pieces_cache[box_val_key] = {};
35040
35041		var options = {};
35042		var prodIdClass = jQuery('body').attr('class').match(/product_id_(\d+)/gm);
35043
35044		options.function = 'get_last_pieces';
35045		options.product_id = prodIdClass.length > 0 ? prodIdClass[0].replace('product_id_', '') : jQuery('input[name="product_id"]').val();
35046		options.variant = box_val;
35047
35048		jQuery.post('/includes/frontend_ajax.php', options, function(res){
35049
35050			// If json response is null, then set result to an empty object
35051			result = csJsonParse(res) || {};
35052			if (result.status == '1'){
35053
35054				window.last_pieces_cache[box_val_key] = result;
35055				_render_last_pieces(window.last_pieces_cache[box_val_key]);
35056			} else {
35057				if (result.status == '0') {
35058					container.html('');
35059				}
35060			}
35061		});
35062	}
35063}
35064function printStackTrace() {
35065	var callstack = [];
35066  var isCallstackPopulated = false;
35067  try {
35068	i.dont.exist+=0; //doesn't exist- that's the point
35069  } catch(e) {
35070  	console.log(e.stack);
35071	if (e.stack) { //Firefox
35072	  var lines = e.stack.split("\n");
35073	  for (var i=0, len=lines.length; i<len; i++) {
35074		if (lines[i].match(/^\s*[A-Za-z0-9\-_\$]+\(/)) {
35075		  callstack.push(lines[i]);
35076		}
35077	  }
35078	  //Remove call to printStackTrace()
35079	  callstack.shift();
35080	  isCallstackPopulated = true;
35081	}
35082	else if (window.opera && e.message) { //Opera
35083	  var lines = e.message.split("\n");
35084	  for (var i=0, len=lines.length; i<len; i++) {
35085		if (lines[i].match(/^\s*[A-Za-z0-9\-_\$]+\(/)) {
35086		  var entry = lines[i];
35087		  //Append next line also since it has the file info
35088		  if (lines[i+1]) {
35089			entry += " at " + lines[i+1];
35090			i++;
35091		  }
35092		  callstack.push(entry);
35093		}
35094	  }
35095	  //Remove call to printStackTrace()
35096	  callstack.shift();
35097	  isCallstackPopulated = true;
35098	}
35099  }
35100  if (!isCallstackPopulated) { //IE and Safari
35101	var currentFunction = arguments.callee.caller;
35102	while (currentFunction) {
35103	  var fn = currentFunction.toString();
35104	  var fname = fn.substring(fn.indexOf("function") + 8, fn.indexOf("(")) || "anonymous";
35105	  callstack.push(fname);
35106	  currentFunction = currentFunction.caller;
35107	}
35108  }
35109
35110  output(callstack);
35111}
35112
35113function output(arr) {
35114  //Output whatever you want
35115  console.info('stack trace', arr.join("nn"));
35116}
35117
35118//peter
35119
35120	//vytvorenie odkazu na editaciu po mouse over na produkt
35121	if (typeof js_global_user_info !='undefined' && js_global_user_info.gid >= 24) {
35122		jQuery(function() {
35123
35124			var _body = jQuery('body');
35125
35126			_body.on('mouseenter', '#product_list .shop-category-product', function(){
35127
35128				var productId = jQuery(this).find('.product-cart input[name="product_id"]').val();
35129
35130				if (typeof productId === 'undefined') {
35131					productId = jQuery(this).find('input[name="product_id"]').val();
35132				}
35133
35134				if (typeof productId === 'undefined') {
35135					productId = jQuery(this).find('input[name="shop_no_price_product"]').val();
35136				}
35137
35138				if (typeof productId === 'undefined') {
35139					var classNames = jQuery(this).attr('class').split(/\s+/)
35140						.filter(function(className) { return className.substr(0, 11) === 'product_id_'; })
35141						.map(function(className) { return className.substr(11); });
35142
35143					if (classNames.length) {
35144						productId = parseInt(classNames.pop());
35145					}
35146				}
35147
35148				if (typeof productId !== 'undefined') {
35149					jQuery(this).append([
35150						'<div class="edit-me" style="z-index:999; position:absolute; top:20px; right:20px;">',
35151							'<a href="/administrator/index2.php?option=com_shop&page=product.product_list&show_id='
35151+ productId +'" target="_blank">',
35152								'<img src="/administrator/components/com_shop/css/edit.svg" alt="" title="' + js_lang_edit_label + '">',
35153							'</a>',
35154						'</div>'
35155					].join(''));
35156				}
35157			});
35158
35159			_body.on('mouseleave', '#product_list .shop-category-product', function(){
35160
35161				jQuery(this).find('.edit-me').remove();
35162			});
35163		});
35164
35165	}
35166
35167	//vytvorenie odkazu na editaciu po mouse over na detail produktu
35168	if (typeof js_global_user_info !== 'undefined' && js_global_user_info.gid >= 24) {
35169		jQuery(function() {
35170			var product = jQuery(jQuery('.flypage1 .flypage-top').find('h1, h2, h3')[0]);
35171			var flypageTitle = jQuery('.flypage1 .flypage-h1');
35172
35173			if (flypageTitle.length) {
35174				product = flypageTitle;
35175			}
35176
35177			if (typeof product === 'undefined') {
35178				return;
35179			}
35180
35181			product.on('mouseenter',function() {
35182				jQuery(this).append('<span class="edit-me"><a href="/administrator/index2.php?option=com_shop&page=product.product_list&show_id=' + js_product_id + '" target="_blank" ><img src="/administrator/components/com_shop/css/edit.svg" alt="" title="' + js_lang_edit_label + '" ></a></span>');
35183			});
35184			product.on('mouseleave', function () {
35185				jQuery(this).find('.edit-me').remove();
35186			});
35187		});
35188	}
35189//END
35190//peter
35191if (typeof Config_accept_cookies_bar !== 'undefined' && Config_accept_cookies_bar == 1) {
35192	jQuery(function () {
35193		jQuery.acceptCookies({
35194			fixed: true
35195		});
35196	});
35197}
35198//END peter
35199/**
35200 * Najde a vrati zoznam hladanych javascriptovych premennych.
35201 * Funkcia preleti polom vsetkych globalnych (resp. definovanych vo window scope) JS premennych a funkcii a vrati
35202 * indexovane pole tych, v ktorych nazve sa nachadza hladany vyraz.
35203 * Hladany vyraz musi mat aspon tri znaky, inac sa hladanie vykonavat nebude.
35204 *
35205 * @author Marek J. Kolcun
35206 * @param string searchFor - retazec, ktory chceme najst v nazvoch JS premennych/funkciach
35207 * @param boolean onlyVariables - ak je zadana boolean hodnota, vyhladaju sa: iba premenne (TRUE), iba funkcie (FALSE), inac vrati vsetky vysledky
35208 * @return array - indexovane pole so zoznamom najdenych vysledkov
35209 */
35210function searchForVar(searchFor, onlyVariables) {
35211	if (typeof searchFor === 'undefined' || searchFor.length < 3) {
35212		console.warn('Zadaj aspon 3 znaky.');
35213		return [];
35214	}
35215
35216	var reg = new RegExp(searchFor, 'i');
35217	var results = Object.keys(window).reduce(function(res, val, key) {
35218		if (val.match(reg)) {
35219			if (typeof window[val] === 'function')
35220				res.functions.push(val);
35221			else
35222				res.variables.push(val);
35223		}
35224		return res;
35225	}, {variables: [], functions: []});
35226
35227	if (typeof onlyVariables === 'boolean') {
35228		return (onlyVariables) ? results.variables : results.functions;
35229	}
35230	return results;
35231}
35232
35233var newsletter_setting = {
35234	confirm : {},
35235	data : {},
35236	original_data : {},
35237	box : {},
35238	rbox : {},
35239	init : function(){
35240
35241		newsletter_setting.box = jQuery('.ans_wrap');
35242		newsletter_setting.rbox = jQuery('.ans_res_box');
35243		newsletter_setting.confirm = jQuery('.ans_confirm');
35244		newsletter_setting.loader = jQuery('.ans_loader');
35245
35246		newsletter_setting.confirm.on('click', function(){
35247			var btn = jQuery(this);
35248			newsletter_setting.saveData();
35249		});
35250
35251		jQuery('.ans_input').on('click', function(){
35252			var input = jQuery(this);
35253			if (!newsletter_setting.check()){
35254				newsletter_setting.confirm.show();
35255			} else {
35256				newsletter_setting.confirm.hide();
35257			}
35258		});
35259
35260		newsletter_setting.getData();
35261		newsletter_setting.original_data = JSON.stringify(newsletter_setting.data);
35262	},
35263	check : function(){
35264
35265		newsletter_setting.getData();
35266		return (typeof newsletter_setting.original_data !== 'undefined' && newsletter_setting.original_data === JSON.stringify(newsletter_setting.data));
35267	},
35268	saveData : function(){
35269
35270		newsletter_setting.getData();
35271		var options = {};
35272		options.function = 'save_newsletter_setting';
35273		options.data = JSON.stringify(newsletter_setting.data);
35274		newsletter_setting.confirm.hide();
35275		newsletter_setting.loader.show();
35276		jQuery.post('/includes/frontend_ajax.php', options, function(res){
35277
35278			var result = JSON.parse(res);
35279			newsletter_setting.loader.hide();
35280			if (result.status == '1'){
35281
35282				newsletter_setting.original_data = options.data;
35283
35284				newsletter_setting.rbox.append(result.content);
35285				setTimeout(function (){newsletter_setting.rbox.find('.ans_msg').remove();}, 5000);
35286			}
35287		});
35288	},
35289	getData : function(){
35290
35291		newsletter_setting.data = {};
35292		newsletter_setting.box.find('.ans_box').each(function(){
35293
35294			var name = jQuery(this).find('input').attr('name');
35295			var value = parseInt(jQuery(this).find('input:checked').val());
35296			newsletter_setting.data[name] = value;
35297		});
35298	}
35299};
35300
35301function disableOrderGroup(comp, disable) {
35302		jQuery(comp).find('input[type=checkbox]').each(function(){
35303			if(jQuery(this).hasClass('disabled')){
35304				jQuery(this).prop('disabled', true);
35305			} else {
35306				jQuery(this).prop('disabled', disable);
35307			}
35308		});
35309		comp.find('label').css({'color': (disable ? '#868686' : 'black')});
35310	//	comp.find('input[type=checkbox]').prop('disabled', disable);
35311	//	comp.find('label').css({'color': (disable ? '#868686' : 'black')});
35312
35313}
35314
35315function clickOrderGroup(bool) {
35316	disableOrderGroup(jQuery('#simpleStepOrder'), !bool);
35317	disableOrderGroup(jQuery('#twoStepOrder'), bool);
35318
35319	var comp = bool ?  jQuery('#simpleStepOrder') : jQuery('#twoStepOrder');
35320	var def = jQuery('select[name=conf_VM_BROWSE_ORDERBY_FIELD]');
35321	var selected = def.find('option:selected').val();
35322	var html = '';
35323
35324	def.html('');
35325	comp.find('input').each(function() {
35326		var newVal = jQuery(this).val().replace(/_2$/g, '');
35327
35328		html += "<option value=\"" + newVal + "\"";
35329
35330		if(selected == newVal)
35331			html += " selected=\"selected\" ";
35332
35333		html += ">" + jQuery(this).next('label').html() + "</option>\n";
35334	});
35335
35336	def.html(html);
35337}
35338
35339function setCookieOrder() {
35340	Cookies.set('stepOrder', '');
35341
35342	jQuery('#simpleStepOrder input').each(function() {
35343		var cookie = Cookies.get('stepOrder');
35344
35345		if(jQuery(this).is(':checked'))
35346			Cookies.set('stepOrder', cookie + ((cookie != '') ? ',' : '') + jQuery(this).val());
35347	});
35348
35349	jQuery('#twoStepOrder input').each(function() {
35350		var cookie = Cookies.get('stepOrder');
35351
35352		if(jQuery(this).is(':checked'))
35353			Cookies.set('stepOrder', cookie + ((cookie != '') ? ',' : '') + jQuery(this).val());
35354	});
35355}
35356
35357jQuery(function() {
35358	if(jQuery('#simpleStepOrder').length > 0 && jQuery('#twoStepOrder').length > 0) {
35359		clickOrderGroup(jQuery('#order_type1').is(':checked'));
35360		setCookieOrder();
35361
35362		jQuery('#simpleStepOrder input, #twoStepOrder input').on('change', function() {
35363			setCookieOrder();
35364		});
35365	}
35366
35367});
35368
35369function showConfirmUrl(comp) {
35370	jQuery("#url_confirm").toggle(jQuery(comp).is(':checked'));
35371}
35372
35373function js_verify_coupon_code(elem){
35374
35375	var btn = jQuery(elem);
35376	var options = {};
35377	options.function = 'verify_coupon_code';
35378	options.coupon_code = jQuery('input[name="coupon_code"]').val();
35379	btn.startAjaxLoader();
35380	jQuery.post(js_global_live_site+'/includes/frontend_ajax.php', options, function (res) {
35381		btn.stopAjaxLoader();
35382		var result = JSON.parse(res);
35383		jQuery('.coupon_verify_result').html(result.content);
35384	});
35385}
35386
35387function js_convertToDate(timestamp, format){
35388
35389if (typeof format == "undefined" ) var format = "date.month.year hour:min:sec";
35390  var a = new Date(timestamp * 1000);
35391  var year = a.getFullYear();
35392  var month = parseInt(a.getMonth()) + 1;
35393  var date = a.getDate();
35394  var hour = a.getHours();
35395  var min = a.getMinutes();
35396  var sec = a.getSeconds();
35397  if(sec < 10) var bsec = '0';
35398  else var bsec = '';
35399  if(min < 10) var bmin = '0';
35400  else var bmin = '';
35401  if(hour < 10) var bhour = '0';
35402  else var bhour = '';
35403  hour = bhour + hour;
35404  min = bmin + min;
35405  sec = bsec + sec;
35406  var r = "";
35407  r = format.replace("date",date);
35408  r = r.replace("month",month);
35409  r = r.replace("year",year);
35410  r = r.replace("hour",hour);
35411  r = r.replace("min",min);
35412  r = r.replace("sec",sec);
35413  return r;
35414}
35415
35416/***********/
35417
35418function js_pp_confirm(main_text, button1_text, button2_text, options, after_close_callback_fn, before_close_callback_fn) {
35419    //if (is_cs_user() && typeof options === 'object' && 'useVex' in options && options.useVex)
35420	return js_vex_confirm(main_text, button1_text, button2_text, options, after_close_callback_fn, before_close_callback_fn);
35421}
35422
35423
35424
35425function itemsAreIdentical(array) {
35426    for(var i = 0; i < array.length - 1; i++) {
35427        if(array[i] !== array[i+1]) {
35428            return false;
35429        }
35430    }
35431    return true;
35432}
35433
35434
35435
35436function js_vex_confirm(main_text, button1_text, button2_text, options, after_close_callback_fn, before_close_callback_fn){
35437
35438	if (typeof(js_global_is_csu) != 'undefined' && js_global_is_csu && typeof(console) != 'undefined') {
35439        console.log('js_vex_confirm');
35440    }
35441
35442	var main_text_html = main_text;
35443
35444	if (typeof(closing_allowed) != 'undefined' ) {
35445		if (button1_text != '' || button2_text != '') {
35446			main_text_html += '<div class="vex-dialog-form">';
35447
35448			if (button1_text != '') {
35449				main_text_html += '<div class="save-icon-container "><a class="pp_confirm_button1 vex-dialog-button-primary vex-dialog-button vex-last" href="#">
35449' + button1_text + '</a></div>';
35450			}
35451
35452			if (button2_text != '') {
35453				main_text_html += '<div class="cancel-icon-container"><a href="#" class="pp_confirm_button2 vex-dialog-button-secondary vex-dialog-button vex-last">' + button2_text + '</a></div>';
35454			}
35455
35456			main_text_html += '</div>';
35457		}
35458    }
35459
35460	var vexOptions = {
35461		content: main_text_html,
35462		afterOpen: function () {
35463			jQuery('input[type="button"].button.two')
35464				.off()
35465				.on('click', function () {
35466					vex.close();
35467				});
35468		},
35469		beforeClose: function () {
35470			if (typeof(before_close_callback_fn) == 'function') {
35471				before_close_callback_fn(false, options);
35472			}
35473		},
35474		afterClose: function() {
35475			if (typeof(after_close_callback_fn) == 'function') {
35476				after_close_callback_fn(false, options);
35477			}
35478		}
35479	};
35480
35481	if (typeof options !== 'undefined' && options.extra_class) {
35482		vexOptions.className = options.extra_class;
35483	}
35484
35485	vex.open(vexOptions);
35486
35487   return false;
35488}
35489
35490/**
35491 * Skonvertuje timestamp na datum
35492 */
35493function convertDate(timestamp, format){
35494
35495	var c = '';
35496
35497	if (typeof format == 'undefined') format = 'Y-m-d';
35498
35499	try{
35500
35501		format = format.split('');
35502
35503		var date = new Date(parseInt(timestamp) * 1000);
35504
35505		if (!format.length || timestamp.split('').length !== 10) throw 'Invalid format';
35506
35507		for(var i=0; i<format.length; i++){
35508
35509			var h = '';
35510			switch(format[i]){
35511
35512				case 'Y' : { c += date.getFullYear(); break; }
35513				case 'm' : {
35514					h = date.getMonth() + 1;
35515					c += (h < 10 ? '0'+h : h);
35516					break;
35517				}
35518				case 'd' : {
35519					h = date.getDate();
35520					c += (h < 10 ? '0'+h : h);
35521					break;
35522				}
35523				default : c+= format[i];
35524			}
35525		}
35526
35527		return c;
35528
35529	} catch (e){
35530
35531		return timestamp;
35532	}
35533}
35534
35535function js_product_special_group_change(elem, group_id) {
35536    elem = jQuery(elem);
35537
35538    if (typeof(group_id) == 'undefined')
35539        group_id = elem.val();
35540
35541    elem.siblings('.order_by_option').removeClass('active');
35542    elem.addClass('active');
35543
35544    var path_name = window.location.pathname + '/';
35545    window.location.href = 'http://' + window.location.host + path_name.match(/^\/[^\/]+\//)[0] + ((parseInt(group_id) > 0) ? 'g' + group_id + ',a' + (jQuery('select#limit').length ? ',' + jQuery('select#limit').val() : '') + '/' : '');
35546}
35547
35548function saveAdminLanguages(){
35549	alert("save admin langs");
35550}
35551
35552/**
35553 * @function initAutoTooltip
35554 */
35555var initAutoTooltip = function () {
35556
35557	/**
35558	 * JAN, tento observer je brutal overkill, ktory sa pouziva iba na autodetekciu inicializacie poshytipu pri dynamickom vlozeni elementov
35559	 * Nemoze sa to robit takto? jQuery('body').on('mouseenter', '[data-tooltip]',  function(){ initTooltip(this); });
35560	 */
35561	if (jQuery('body.optimized_list').length) return;
35562
35563	var addedTypes = [
35564		'childList',
35565		'subtree',
35566		'characterData'
35567	];
35568	var attrTypes = ['attributes'];
35569	var attrNames = [
35570		'data-tooltip',
35571		'tooltip'
35572	];
35573
35574	if ( typeof MutationObserver === 'undefined' ) {
35575		return;
35576	}
35577
35578	var observer = new MutationObserver(function (mutations) {
35579		var init = false;
35580		var mutation, index;
35581
35582		for (index in mutations) {
35583			if (!mutations.hasOwnProperty(index)) {
35584				continue;
35585			}
35586
35587			mutation = mutations[index];
35588
35589			if ((!!~addedTypes.indexOf(mutation.type) && mutation.addedNodes.length) || (!!~attrTypes.indexOf(mutation.type) && !!~attrNames.indexOf(mutation.attributeName))) {
35590				init = true;
35591				break;
35592			}
35593		}
35594
35595		if (init) {
35596			initTooltip();
35597		}
35598	});
35599
35600	var observe = function () {
35601		var target = document.getElementById('m1');
35602
35603		if (target instanceof Node) {
35604			observer.observe(target, {
35605				attributes: true,
35606				childList: true,
35607				subtree: true,
35608				characterData: true
35609			});
35610		} else {
35611			console.log(target);
35612		}
35613	};
35614
35615	var disconnect = function () {
35616		if ( observer !== null ) {
35617			observer.disconnect();
35618		}
35619	};
35620
35621	var initTooltip = function () {
35622		jQuery('[data-tooltip]').each(function () {
35623			var $elem = jQuery(this);
35624			var alignX = $elem.data('tip-x') || 'right';
35625			var alignY = $elem.data('tip-y') || 'center';
35626			var showOn = $elem.data('tip-show') || 'hover';
35627			var showTimeout = parseInt($elem.data('tip-timeout')) || 0;
35628			var offsetX = parseInt($elem.data('tip-offset-x')) || 0;
35629			var offsetY = parseInt($elem.data('tip-offset-y')) || 0;
35630			var $elemClone;
35631
35632			var tipInit = $elem.attr('tip-init');
35633
35634			if ( typeof tipInit !== 'undefined' ) {
35635				disconnect();
35636
35637				$elemClone = $elem.clone();
35638				$elem.after($elemClone);
35639				$elem.remove();
35640				$elem = $elemClone;
35641
35642				observe();
35643			}
35644
35645			//if ( typeof console !== 'undefined' ) {
35646			//	console.group('Debug');
35647			//	console.log($elem);
35648			//	console.log($elem.data('tip-init'));
35649			//	console.log($elem.attr('tip-init'));
35650			//	console.groupEnd();
35651			//}
35652
35653			//if ( typeof tipInit === 'undefined' ) {
35654				$elem.attr('tip-init', true);
35655				$elem.poshytip({
35656						alignX: alignX,
35657						alignY: alignY,
35658						offsetX: offsetX,
35659						offsetY: offsetY,
35660						showOn: showOn,
35661						showTimeout: showTimeout,
35662						alignTo: 'target',
35663						className: 'global_tooltip',
35664						content: '<span class="tooltip poshy-tooltip ' + ($elem.attr('class') || '') + '">' + $elem.data('tooltip') + '</span>'
35665					});
35666			//}
35667		});
35668	};
35669
35670	initTooltip();
35671	observe();
35672};
35673
35674/**
35675 * @author Martin Hucko <[email protected]>
35676 * @function initLogMessages
35677 * @returns {Boolean}
35678 */
35679var initLogMessages = function () {
35680	var messages = window.logMessages;
35681	var priorities = [
35682		'debug',
35683		'tip',
35684		'info',
35685		'notice',
35686		'alert',
35687		'warning',
35688		'error',
35689		'critical',
35690		'emergency'
35691	];
35692
35693	/**
35694	 * @function getHighestPriorityMessage
35695	 * @inner
35696	 * @returns {Object}
35697	 */
35698	var getHighestPriorityMessage = function () {
35699		var highestIndex = 0;
35700		var critMessage = messages[0];
35701
35702		messages.forEach(function (message) {
35703			var index = priorities.indexOf(message.className);
35704
35705			if (index > highestIndex) {
35706				highestIndex = index;
35707				critMessage = message;
35708			}
35709		});
35710
35711		return critMessage;
35712	};
35713
35714	/**
35715	 * @function showVex
35716	 * @inner
35717	 * @param {String} title
35718	 * @param {String} body
35719	 * @param {String} className
35720	 */
35721	var showVex = function (title, body, className) {
35722		vex.dialog.alert({
35723			message: '<span class="login-title">' + title + '</span>',
35724			input: body,
35725			className: 'vex-cs vex-log ' + className
35726		});
35727	};
35728
35729	/**
35730	 * @function getUniqueMessages
35731	 * @returns {Object[]}
35732	 */
35733	var getUniqueMessages = function () {
35734		var newArray = [];
35735		var lookupObject = {};
35736		var i;
35737
35738		for (i in messages) {
35739			if (messages.hasOwnProperty(i)) {
35740				lookupObject[messages[i].message] = messages[i];
35741			}
35742		}
35743
35744		for (i in lookupObject) {
35745			if (lookupObject.hasOwnProperty(i)) {
35746				newArray.push(lookupObject[i]);
35747			}
35748		}
35749
35750		return newArray;
35751	};
35752	var topMessage;
35753
35754	if (!(messages instanceof Array) || js_is_empty(messages)) {
35755		return false;
35756	}
35757
35758	messages = getUniqueMessages();
35759	messages.sort(function (a, b) {
35760		var aPriority = priorities.indexOf(a.className);
35761		var bPriority = priorities.indexOf(b.className);
35762
35763		if (aPriority === bPriority) {
35764			return 0;
35765		}
35766
35767		return aPriority > bPriority ? -1 : 1;
35768	});
35769
35770	if (messages.length === 1) {
35771		topMessage = messages[0];
35772
35773		showVex(topMessage.title, topMessage.message, topMessage.className);
35774
35775		return true;
35776	}
35777
35778
35779	topMessage = getHighestPriorityMessage();
35780
35781	showVex(topMessage.title, '<ul>' + messages.map(function (message) {
35782		return '<li class="' + message.className + '">' + message.message + '</li>';
35783	}).join('') + '</ul>', topMessage.className);
35784
35785	return true;
35786};
35787
35788/**********/
35789jQuery(function () {
35790	if (is_cs_user()) {
35791		console.log('%cJS INIT LOAD', 'color: #2196F3');
35792	} else if (typeof js_lang_we_are_hiring !== 'undefined') {
35793		console.log(js_lang_we_are_hiring);
35794	}
35795
35796	//if(is_cs_user()) {
35797	var module_cont_nivo_slider = jQuery('.module_cont_nivo_slider');
35798		if(module_cont_nivo_slider.length > 0) module_cont_nivo_slider.addClass('theme-default');
35799	//}
35800
35801	if ( typeof js_CS_Config_cs_infobar !== 'undefined' && js_CS_Config_cs_infobar == '1' ){
35802		js_infobar_cs('.cs_infobar');// app 946, CS_Config_cs_infobar
35803
35804		if ( typeof js_Config_infowidget_countdown_timer !== 'undefined' && js_Config_infowidget_countdown_timer ) {
35805			var infobarElem = jQuery('.cs_infobar');
35806			if ( infobarElem.length > 0 && js_Config_infowidget_countdown_timer.end != '' && js_Config_infowidget_countdown_timer.start != '' ) {
35807				var currentTime = new Date().getTime();
35808
35809				if ( js_Config_infowidget_countdown_timer.startTimestamp != '' ) {
35810					var startDate = js_Config_infowidget_countdown_timer.startTimestamp;
35811				} else {
35812					var startDate = Date.parse(js_Config_infowidget_countdown_timer.start.split(' ')[0].split('.').reverse().join('-') + ' ' + js_Config_infowidget_countdown_timer.start.split(' ')[1]);
35813				}
35814
35815				//var startDate = new Date(js_Config_infowidget_countdown_timer.start.split(' ')[0].split('.').reverse().join('-') + ' ' + js_Config_infowidget_countdown_timer.start.split(' ')[1]).getTime();
35816				if (currentTime > startDate) {
35817
35818					//infobarElem.find('.inner').append('<div class="timer"></div>');
35819					infobarElem.find('.text p:last-child').append('<span class="timer"></span>');
35820					var elem = infobarElem.find('.inner').find('.timer');
35821					if ( js_Config_infowidget_countdown_timer.endTimestamp != '' ) {
35822						var endDate = js_Config_infowidget_countdown_timer.endTimestamp;
35823					} else {
35824						var endDate = Date.parse(js_Config_infowidget_countdown_timer.end.split(' ')[0].split('.').reverse().join('-') + ' ' + js_Config_infowidget_countdown_timer.end.split(' ')[1]);
35825					}
35826					//var endDate = new Date(js_Config_infowidget_countdown_timer.end.split(' ')[0].split('.').reverse().join('-') + ' ' + js_Config_infowidget_countdown_timer.end.split(' ')[1]).getTime();
35827					initInfowidgetCountdownTimer(endDate, elem);
35828				}
35829			}
35830		}
35831	}
35832
35833	/**
35834	 * Log/info/warn/error to console for cs users only
35835	 */
35836	if ( console && ( !jQuery('body').hasClass('cs_user_ip') && ( typeof js_global_is_csip === 'undefined' || !js_global_is_csip ) ) ) {
35837		console.log = function() {};
35838		console.info = function() {};
35839		console.warn = function() {};
35840		console.error = function() {};
35841	}
35842
35843	initAutoTooltip();
35844	initLogMessages();
35845
35846	setTimeout(function() {
35847		showNotificationsAfterReload()
35848	}, 500);
35849});
35850// example: array("1=aaa") to array(1:'aaa');
35851function splitArrayToKeyValue(x, splitter) {
35852
35853	var obj = {};
35854	for (var i = 0; i < x.length; i++) {
35855		var split = x[i].split(splitter);
35856		obj[jQuery.trim(split[0])] = jQuery.trim(split[1]);
35857	}
35858	return obj;
35859}
35860
35861function getLang(lang, def) {
35862	var langText = '';
35863
35864	if( lang.indexOf('js_lang') === -1 ) {
35865		langText = window['js_lang_' + lang];
35866	} else {
35867		langText = window[lang];
35868	}
35869
35870	if ( typeof langText !== 'undefined' ) {
35871		return langText;
35872	}
35873
35874	if ( typeof def !== 'undefined' ) {
35875		return def;
35876	}
35877
35878	return '';
35879}
35880
35881function closeOutdatedBrowserAlert() {
35882	Cookies.set('outdatedBrowserAlertCookie', 1, { expires: 1 });
35883	jQuery('#outdatedBrowser').remove();
35884}
35885
35886/*
35887	type - success, info, error, notice
35888 */
35889function showNotification(text, title, type, delay, autohide, options, custom_class) {
35890
35891	var opts = {};
35892	opts.target = document.body;
35893	opts.title = (typeof title !== 'undefined') ?  title : false;
35894	opts.text = (typeof text !== 'undefined') ?  text : false;
35895	opts.type = (typeof type !== 'undefined') ?  type : "success";
35896	opts.delay = (typeof delay !== 'undefined') ?  delay : 10000;
35897	opts.hide = (typeof autohide !== 'undefined') ?  autohide : true;
35898	add_custom_class = (typeof custom_class !== 'undefined') ?  custom_class : '';
35899	opts.addclass = "stack-custom "+add_custom_class;
35900
35901	if (typeof options === 'object') opts = jQuery.extend(true, {}, opts, options);
35902
35903	// PNotify
35904	if (typeof PNotify !== 'undefined') {
35905		return new PNotify(opts);
35906	}
35907
35908	// docasne riesenie pokym nebude nieco univerzalnejsie
35909	if (false && typeof CsModal !== 'undefined') {
35910		let csModalType = 'info';
35911		if (type === 'error' || type === 'warning') {
35912			csModalType = type;
35913		}
35914
35915		return new CsModal()
35916			.setClassName('notification notification_alert')
35917			.setType(csModalType)
35918			.setTitle(opts.title)
35919			.setContent(opts.text)
35920			.hideCloseButton(false)
35921			.open();
35922	}
35923}
35924
35925function showNotificationsAfterReload() {
35926	/* zobrazovanie notifikacii z localstorage */
35927	var notifications = sessionStorage.getItem('NotificationsAfterReload');
35928	if (notifications) {
35929		notifications = JSON.parse(notifications);
35930		if (typeof notifications === 'object') {
35931			showNotificationsFromList(notifications);
35932			sessionStorage.removeItem('NotificationsAfterReload');
35933		}
35934	}
35935}
35936
35937/**
35938 *
35939 * @param notificationList {type: string, title: string, body: string}[]
35940 */
35941function showNotificationsFromList(notificationList) {
35942
35943	if (typeof notificationList !== 'object' || !notificationList.length) {
35944		return;
35945	}
35946
35947	notificationList.map(function(notificationData) {
35948		showNotification(notificationData.body, notificationData.title, notificationData.type);
35949	});
35950}
35951
35952/**
35953 * Validates ICO value
35954 * - normalizes input (removes special chars)
35955 * - checks rules
35956 *
35957 * @param {string} ICO
35958 * @returns {{ valid: boolean, value: string }}
35959 */
35960function validateICO(ICO) {
35961	if (typeof ICO !== 'string') {
35962		return { valid: false, value: '' };
35963	}
35964
35965	// nastaveny format ICO (napr. HU 12345678-1-23) – pomlcky ponechame, odstranime len medzery
35966	const companyIdFormat = config('js_Config_company_id_format');
35967
35968	if (companyIdFormat && companyIdFormat.pattern) {
35969		const value = ICO.replace(/\s/g, '');
35970		const patternParts = companyIdFormat.pattern.match(/^\/(.*)\/([a-z]*)$/);
35971
35972		return {
35973			valid: patternParts !== null && new RegExp(patternParts[1], patternParts[2]).test(value),
35974			value: value
35975		};
35976	}
35977
35978	// normalizácia – ponecháme len písmená a čísla
35979	const normalized = ICO
35980		.normalize('NFD') 				// kvôli diakritike
35981		.replace(/[\u0300-\u036f]/g, '')
35982		.replace(/[^a-zA-Z0-9]/g, '');
35983
35984	const hasNumber = /\d/.test(normalized);
35985	const minLength = normalized.length >= 4;
35986
35987	return {
35988		valid: hasNumber && minLength,
35989		value: normalized
35990	};
35991}
35992
35993function config(_config) {
35994	if (typeof _config !== 'string') {
35995		return undefined;
35996	}
35997
35998	if (_config.includes('.')) {
35999		let keys = _config.split('.');
36000		let obj = window;
36001		for (let i = 0; i < keys.length; i++) {
36002			obj = obj[keys[i]];
36003			if (typeof obj === 'undefined') {
36004				return undefined;
36005			}
36006		}
36007
36008		return obj;
36009	}
36010
36011	if (typeof window[_config] !== 'undefined') {
36012		return window[_config];
36013	}
36014
36015	return undefined;
36016}
36017
36018jQuery( document ).ajaxError(function(event, jqxhr, settings, thrownError) {
36019
36020	if (typeof jqxhr.status !== 'undefined' && jqxhr.status == 408){
36021
36022		jQuery(document).trigger('onAjaxError');
36023		var title = (typeof cms_js_lang_request_timeout_error_title !== 'undefined' ? cms_js_lang_request_timeout_error_title : '');
36024		var text = (typeof cms_js_lang_request_timeout_error !== 'undefined' ? cms_js_lang_request_timeout_error : '');
36025		vex.dialog.open({
36026			className: "vex-cs newsletter_vex",
36027			showCloseButton: true,
36028			escapeButtonCloses: true,
36029			message: '<span class="login-title">' + title + '</span>',
36030			input: text,
36031			buttons: [jQuery.extend({}, vex.dialog.buttons.YES, {text: "OK"})]
36032		});
36033	}
36034});
36035
36036function js_get_gdpr_form_name(form_id) {
36037	switch (form_id) {
36038		case "1":
36039			return js_gdpr_watch_dog;
36040		case "2":
36041			return js_gdpr_send_to_friend;
36042		case "3":
36043			return js_gdpr_product_question;
36044		case "4":
36045			return js_gdpr_contact_form;
36046		case "5":
36047			return js_gdpr_register_form;
36048		case "6":
36049			return js_gdpr_module_newsleatter;
36050		case "7":
36051			return js_gdpr_comment;
36052		case "8":
36053			return js_gdpr_product_best_price;
36054		case "9":
36055			return js_gdpr_representative_contact;
36056		case "100":
36057			return js_gdpr_checkout;
36058		case "400":
36059			return 'product reservation';
36060		case "499":
36061			return js_gdpr_dt_form;
36062		case "500":
36063			return js_gdpr_module_short_contact_form;
36064		case "501":
36065			return js_gdpr_module_contest_form;
36066		case "505":
36067			return js_gdpr_contact_form + " - universal";
36068		case "999":
36069			return js_gdpr_first_login;
36070		default:
36071			return js_gdpr_unknown;
36072	}
36073}
36074
36075function js_admin_user_list_gdpr_info(user_id, elem) {
36076
36077	new AjaxRequest({user_id: user_id})
36078		.setMethod('POST')
36079		.setController('Customer')
36080		.setAction('getGdprUserData')
36081		.onSuccess(function (response) {
36082			var data = response.data['gdpr'];
36083			if (data === null) {
36084				jQuery(elem).tooltipster({
36085					theme        : "tooltipster-gdpr",
36086					trigger      : 'click',
36087					contentAsHTML: true,
36088					trackTooltip : true,
36089					trackOrigin  : true,
36090					multiple     : false,
36091					timer        : 3000,
36092					content      : js_gdpr_empty_data
36093				}).tooltipster('open');
36094				return true;
36095			}
36096			var gdpr_table_html = '<table class="adminlist gdpr_approval_table">';
36097			gdpr_table_html += '<thead>';
36098			gdpr_table_html += '<th class="title"></th>';
36099			gdpr_table_html += '<th class="title" title="' + js_gdpr_version_title_head + '">' + js_gdpr_version + '</th>';
36100			gdpr_table_html += '<th class="title" title="' + js_gdpr_cdate_title_head + '">' + js_gdpr_cdate + '</th>';
36101			gdpr_table_html += '<th class="title" title="' + js_gdpr_form_id_title_head + '">' + js_gdpr_form_id + '</th>';
36102			gdpr_table_html += '</thead>';
36103			gdpr_table_html += '<tbody>';
36104			jQuery.each(data, function(i,v){
36105				if (v === null) {
36106					jQuery(elem).tooltipster({
36107						theme        : "tooltipster-gdpr",
36108						trigger      : 'click',
36109						contentAsHTML: true,
36110						trackTooltip : true,
36111						trackOrigin  : true,
36112						multiple     : false,
36113						timer        : 3000,
36114						content      : js_gdpr_empty_data
36115					}).tooltipster('open');
36116					return true;
36117				}
36118				gdpr_table_html += '<tr>';
36119				gdpr_table_html += '<td class="data">' + '<span class="cs_icon csi-file-text-o" onclick="js_admin_user_list_get_gdpr_verion(' + v.version_id + ', this)" title="' + js_gdpr_copy + '"></span>' + '</td>';
36120				gdpr_table_html += '<td class="data" title="' + js_gdpr_version_title + '">' + v.version_id + '</td>';
36121				gdpr_table_html += '<td class="data">' + v.cdate + '</td>';
36122				gdpr_table_html += '<td class="data">' + js_get_gdpr_form_name(v.form_id) + '</td>';
36123				gdpr_table_html += '</tr>';
36124			});
36125			if (typeof response.data['additional_approves'] !== 'undefined') {
36126				jQuery.each(response.data['additional_approves'], function(i,v) {
36127
36128					jQuery.each(v.tableData, function (ii, vv) {
36129						gdpr_table_html += '<tr>';
36130						gdpr_table_html += '<td class="data"> </td>';
36131						gdpr_table_html += '<td class="data">' + v.title + '</td>';
36132						jQuery.each(vv, function (iii, vvv) {
36133							gdpr_table_html += '<td class="data">' + vvv + '</td>';
36134						});
36135						gdpr_table_html += '</tr>';
36136					});
36137
36138				});
36139			}
36140			gdpr_table_html += '</tbody></table>';
36141
36142			vex.dialog.open({
36143				message: '<span class="login-title">' + js_gdpr_personal_gdpr_approval_title + '</span>',
36144				input: gdpr_table_html,
36145				buttons: [
36146					jQuery.extend({}, vex.dialog.buttons.NO, {
36147						text: 'OK'
36148					})
36149				],
36150				callback: function(data) {
36151				}
36152			});
36153		})
36154		.send();
36155}
36156
36157function js_admin_user_lisg_gdpr_personal_info(user_id) {
36158
36159	if (typeof user_id === 'undefined') {
36160		user_id = 0;
36161	}
36162
36163	new AjaxRequest({user_id: user_id})
36164		.setMethod('POST')
36165		.setController('Customer')
36166		.setAction('getGdprUserPersonalInfo')
36167		.onSuccess(function (response) {
36168			var data = response.data[0];
36169			var gdpr_table_html = '';
36170
36171			for (var index in data) {
36172				gdpr_table_html += '<fieldset class="gdpr_fieldset">';
36173				gdpr_table_html += '<legend>' + (data[index].address_type == "BT" ? js_lang_address_type_bt : js_lang_address_type_st) + '</legend>';
36174				gdpr_table_html += '<div class="fieldset_content">';
36175					gdpr_table_html += '<div class="name_cell">';
36176						gdpr_table_html += '<span class="title">';
36177							gdpr_table_html += js_lang_gdpr_name;
36178						gdpr_table_html += '</span>';
36179						gdpr_table_html += '<span class="order_address_name">';
36180				gdpr_table_html += (data[index].first_name != null && data[index].first_name != "" ? data[index].first_name : '') + ' ' + (data[index].middle_name != null && data[index].middle_name != "" ? data[index].middle_name : '') + ' ' + (data[index].last_name != null && data[index].last_name != "" ? data[index].last_name : '');
36181				gdpr_table_html += '</span>';
36182				gdpr_table_html += '</div>';
36183				gdpr_table_html += '<div class="address_cell">';
36184				gdpr_table_html += '<span class="title">' + js_lang_address + '</span>';
36185				gdpr_table_html += '<span>' + data[index].address_1 + '</span>';
36186				gdpr_table_html += '<div class="country_name">' + data[index].zip + ' ' + data[index].city + '</div>';
36187				gdpr_table_html += '<div class="country_name">' + data[index].state + '</div>';
36188					gdpr_table_html += '</div>';
36189					if (data[index].phone_1 != null && data[index].phone_1 != "") {
36190						gdpr_table_html += '<div class="phone_cell">';
36191							gdpr_table_html += '<span class="order_detail_phone">';
36192								gdpr_table_html += '<span class="title">' + js_lang_phone + '</span>';
36193								gdpr_table_html += '<span class="phone_number">' + data[index].phone_1 + '</span>';
36194							gdpr_table_html += '</span>';
36195						gdpr_table_html += '</div>';
36196					}
36197					if (data[index].user_email != null && data[index].user_email != "") {
36198						gdpr_table_html += '<div class="email_cell">';
36199							gdpr_table_html += '<span class="order_detail_email">';
36200							gdpr_table_html += '<span class="title">E-mail:</span>';
36201							gdpr_table_html += '<span class="email_address">' + data[index].user_email + '</span>';
36202							gdpr_table_html += '</span>';
36203						gdpr_table_html += '</div>';
36204					}
36205				gdpr_table_html += '</div>';
36206			}
36207
36208			gdpr_table_html += '</tbody></table>';
36209			vex.dialog.open({
36210				message: '<span class="login-title">' + js_gdpr_personal_data_title + '</span>',
36211				input: gdpr_table_html,
36212				buttons: [
36213					jQuery.extend({}, vex.dialog.buttons.NO, {
36214						text: 'OK'
36215					})
36216				],
36217				callback: function(data) {
36218				}
36219			});
36220		})
36221		.send();
36222}
36223
36224function js_admin_user_list_get_gdpr_verion(version_id, elem) {
36225
36226	var tmpData = '';
36227	new AjaxRequest({version_id: version_id})
36228		.setMethod('POST')
36229		.setController('Customer')
36230		.setAction('getGdprVersion')
36231		.setAsync(false) //asi nerobi nic
36232		.onSuccess(function (response) {
36233			tmpData = response.data[0];
36234		})
36235		.send();
36236
36237	setTimeout( function () {copyTextToClipboard(tmpData, elem);}, 500);
36238
36239}
36240
36241/**
36242 * Dynamicky loadne js a css zdroje na stranku, callback vrati true alebo false oznacujuci uspesnu akciu pre vsetky url
36243 * @param {object} scripts Zoznam url pre loading
36244 * @param {function} callback Zavola po loadnuti vsetkych scriptov
36245 */
36246function csLoadScripts(scripts, callback){
36247
36248	if ( typeof window.loadedScripts === 'undefined' ) window.loadedScripts = {};
36249	if ( typeof scripts !== 'object' ){
36250
36251		if ( typeof callback === 'function' ) callback(false);
36252		return;
36253	}
36254
36255	var tag;
36256	var _check = function(){
36257		var done = true;
36258		var ok = true;
36259		jQuery.each(scripts, function(c,v){
36260			var hash = jQuery.md5(v);
36261			if ( typeof window.loadedScripts[hash] === 'undefined' ){
36262				done = false;
36263				return false;
36264			}
36265			if ( !window.loadedScripts[hash] ) ok = false;
36266		});
36267		if ( done && typeof callback === 'function' ) callback(ok);
36268	};
36269
36270	var _success = function(hash){
36271		window.loadedScripts[hash] = 1;
36272		_check();
36273	};
36274
36275	var _error = function(hash){
36276		window.loadedScripts[hash] = 0;
36277		_check();
36278	};
36279
36280	jQuery.each(scripts, function(c,url){
36281
36282		var hash = jQuery.md5(url);
36283		var type = ( url.search('\\.js$') > -1 ? 'js' : (url.search('\\.css$') > -1 ? 'css' : 0) );
36284
36285		if ( !type ) _error(hash);
36286		else if ( typeof window.loadedScripts[hash] !== 'undefined' ) _success(hash);
36287		else {
36288
36289			if ( type == 'js' ){
36290				tag = document.createElement('script');
36291				tag.type = 'text/javascript';
36292				tag.src = url;
36293				tag.onload = function(){ _success(hash); };
36294				tag.onreadystatechange = function(){ _success(hash); };
36295			} else {
36296				tag = document.createElement('link');
36297				tag.type = 'text/css';
36298				tag.rel = 'stylesheet';
36299				tag.href = url;
36300				tag.onload = function(){ _success(hash); };
36301				tag.onreadystatechange = function(){ _success(hash); };
36302			}
36303
36304			document.head.appendChild(tag);
36305		}
36306	});
36307}
36308
36309function copyTextToClipboard(text, elem, customTooltip){
36310
36311	showLoader();
36312	function selectElementText(element) {
36313		if (document.selection) {
36314			var range = document.body.createTextRange();
36315			range.moveToElementText(element);
36316			range.select();
36317		} else if (window.getSelection) {
36318			var range = document.createRange();
36319			range.selectNode(element);
36320			window.getSelection().removeAllRanges();
36321			window.getSelection().addRange(range);
36322		}
36323	}
36324
36325	var element = document.createElement('DIV');
36326	element.innerHTML = text;
36327	document.body.appendChild(element);
36328	selectElementText(element);
36329	document.execCommand('copy');
36330	element.remove();
36331
36332	hideLoader();
36333	jQuery(elem).tooltipster({
36334		theme        : "tooltipster-gdpr",
36335		trigger      : 'click',
36336		contentAsHTML: true,
36337		trackTooltip : true,
36338		trackOrigin  : true,
36339		multiple     : false,
36340		timer        : 3000,
36341		content      : typeof customTooltip !== 'undefined' ? customTooltip : js_gdpr_article_c
36341opy
36342	}).tooltipster('open');
36343	jQuery(elem).attr("title", js_gdpr_copy);
36344}
36345
36346function changePositionModuleSwitch (type, name) {
36347	var cookie_name = 'PositionModuleSwitcher';
36348	var property_name = type + '_' + name;
36349	var class_name = 'active_switch_' + type + '_' + name;
36350
36351	var cookie_value = Cookies.get(cookie_name);
36352	if (cookie_value == null || cookie_value == '')
36353		cookie_value = {};
36354	else
36355		cookie_value = JSON.parse(cookie_value);
36356
36357	if (typeof cookie_value[property_name] != 'undefined') {
36358		delete cookie_value[property_name];
36359		jQuery('body').removeClass(class_name);
36360	} else {
36361		cookie_value[property_name] = 1;
36362		jQuery('body').addClass(class_name);
36363	}
36364
36365	cookie_value = JSON.stringify(cookie_value);
36366	Cookies.set(cookie_name, cookie_value, { expires : 365, path : '/' });
36367}
36368
36369function js_download_base64_file (name, content, type, id) {
36370	id = typeof(id) != 'undefined' ? '_'+id : '';
36371	var byteCharacters = window.atob(content);
36372	var byteArrays = [];
36373	var sliceSize = 512;
36374	var slice;
36375	var byteNumbers;
36376
36377	for (var offset = 0; offset < byteCharacters.length; offset += sliceSize) {
36378		slice = byteCharacters.slice(offset, offset + sliceSize);
36379		byteNumbers = new Array(slice.length);
36380
36381		for (var i = 0; i < slice.length; i++) {
36382			byteNumbers[i] = slice.charCodeAt(i);
36383		}
36384
36385		byteArray = new Uint8Array(byteNumbers);
36386		byteArrays.push(byteArray);
36387	}
36388
36389	blob = new Blob(byteArrays, {type: type});
36390	var link = document.createElement('a');
36391	link.href = window.URL.createObjectURL(blob);
36392	if (type == 'application/pdf') {
36393		link.target = '_blank';
36394	} else {
36395		link.download = name;
36396	}
36397	link.id = 'download_base_64_file_temp_elem_id' + id;
36398	jQuery('body').append(link);
36399	link.click();
36400	jQuery(link).remove();
36401}
36402
36403function js_copy_to_clipboard (text) {
36404	var input = jQuery('<input>').val(text).appendTo('body').trigger('select');
36405	document.execCommand('copy');
36406	input.remove();
36407}
36408
36409if ( typeof lazySizesConfig !== "undefined" ) {
36410	// lazysizes CONFIGURACIA - nadstavba na lazyLoad
36411	window.lazySizesConfig.loadHidden = false;
36412}
36413if ( is_cs_user('lazyload_preload') && typeof lazySizesConfig !== "undefined" ) {
36414	window.lazySizesConfig.preloadAfterLoad = true;
36415}
36416
36417$jQ = jQuery.noConflict();
36418
36419/*
36420 * Checks whether the value passed to the function is numeric
36421 * Therefore both 0 and '0' will return true, but 'zero' will return false
36422 * Replacement for jQuery.isNumeric fn, which was deprecated
36423 *
36424 * @return bool
36425 */
36426function isNumeric (num) {
36427	return !isNaN(parseFloat(num)) && isFinite(num);
36428}
36429
36430/*
36431 * Append loader/spinner on element
36432 * Replacement for jQuery.fancybox.showLoading();
36433 * @auth TL
36434 *
36435 * @param element [string] (valid jQuery selector) - element to which loader will be appended
36436 * @return void
36437 */
36438function showLoader (element) {
36439	if (typeof element === 'undefined') {
36440		element = 'body';
36441	}
36442
36443	let $elem = jQuery(element).first();
36444	let html  = '<span class="css_graph_ajax_loader"></span>';
36445
36446	if ($elem.length && !$elem.children('.css_graph_ajax_loader').length) {
36447		$elem.append(html);
36448	}
36449}
36450/*
36451 * Hide loader/spinner
36452 * Replacement for jQuery.fancybox.hideLoading();
36453 * @auth TL
36454 *
36455 * @param element {string} (valid jQuery selector) - element from which the loader will be removed
36456 * @param hideAll {bool} - if set to true, all loaders inside the element, no matter on which level, will be removed
36457 * @return void
36458 */
36459function hideLoader (element, hideAll) {
36460	if (typeof element == 'undefined') {
36461		element = 'body';
36462	}
36463
36464	if (typeof hideAll == 'undefined') {
36465		hideAll = false;
36466	}
36467
36468	let $elem = jQuery(element).first();
36469
36470	if (hideAll) {
36471		$elem.find('.css_graph_ajax_loader').remove();
36472	} else {
36473		$elem.children('.css_graph_ajax_loader').remove();
36474	}
36475}
36476
36477function toggleMiddleSubCategories(elem, module) {
36478	switch (module) {
36479		case 'middle_subcategories':
36480			jQuery(elem).closest('.module_middle_subcategories').toggleClass('show_all');
36481			break;
36482		case 'kateg':
36483			jQuery(elem)
36484				.toggleClass('open')
36485				.closest('ul')
36486				.toggleClass('open');
36487			break;
36488		case 'topten':
36489			jQuery(elem)
36490				.toggleClass('open')
36491				.closest('.module-topten')
36492				.toggleClass('open');
36493			break;
36494		case 'modTopCategorySales':
36495			jQuery(elem)
36496				.toggleClass('open')
36497				.closest('.module-topten-cat')
36498				.toggleClass('open');
36499			break;
36500		default:
36501			return;
36502	}
36503}
36504
36505
36506function js_flypage_product_as_sqm_init() {
36507	if ( typeof js_Config_show_package_sqm_in_product_detail !== 'undefined' && js_Config_show_package_sqm_in_product_detail ) {
36508		//if(is_cs_user()) {
36509		var currency   = shop_currency_info[shop_vendor_currency_code],
36510		    focusInput = false;
36511		if (!jQuery('.flypage-kosik[data-packagesqm]').length) {
36512			return false;
36513		}
36514
36515		let bodyElem = jQuery('body');
36516		let quantitySqmElem = jQuery('#quantity_sqm');
36517
36518		quantitySqmElem.keypress(function (e) {
36519			if (e.which == 46) {
36520				if (jQuery(this).val().indexOf('.') != -1 || jQuery(this).val().indexOf(',') != -1) {
36521					return false;
36522				}
36523			}
36524			if (e.which == 44) {
36525				if (jQuery(this).val().indexOf('.') != -1 || jQuery(this).val().indexOf(',') != -1) {
36526					return false;
36527				}
36528			}
36529
36530			if (e.which != 8 && e.which != 0 && e.which != 46 && e.which != 44 && (e.which < 48 || e.which > 57)) {
36531				return false;
36532			}
36533		});
36534
36535		bodyElem.on('keyup mouseup', '#quantity_sqm', function () {
36536			//úprava JB 02-04-2020 po DR, nesprávne zaokrúhľovanie
36537			//nakoniec premiestniť z LOCAL.JS
36538			//nefunkčné zaokrúhľvoanie a podobne.. na eshope majú nastavneé 3 desatinné miesta..
36539			var new_value     = quantitySqmElem.val().replace(',', '.');
36540			var one_package_text = jQuery('.total_unit_price .price_unit').text().replace(',', '.');
36541			var one_package   = parseFloat(one_package_text);
36542			var price_per_sqm = parseFloat(jQuery('#product-detail-price-value').text().replace(',', '.'));
36543			var package_decimal_places = (one_package_text.match(/\.(\d+)/) || ['', ''])[1].length;
36544			var quantity_decimal_places = Math.max(2, package_decimal_places);
36545			var new_package   = Math.ceil((parseFloat(new_value) / one_package) - 0.000000001);
36546			//var quantity_sqm = (Math.round(parseFloat(new_package * one_package) * 100) / 100);
36547			//var new_price = (Math.round(parseFloat(quantity_sqm * price_per_sqm) * 100) / 100);
36548			var quantity_sqm = parseFloat(new_package * one_package).toFixed(quantity_decimal_places);
36549			var new_price    = parseFloat(quantity_sqm * price_per_sqm);
36550			if (new_package == 1) {
36551				package_text = ' balenie';
36552			} else if (new_package > 1 && new_package < 5) {
36553				package_text = ' balenia';
36554			} else {
36555				package_text = ' balení';
36556			}
36557			jQuery('#quantity').val(quantity_sqm);
36558			jQuery('.form_info .bal').text(new_package);
36559			jQuery('.form_info .bal_text').text(package_text + ' (' + String(parseFloat(quantity_sqm).toFixed(2)).replace('.', ',') + jQuery('.quantity_per_sqm').html() + ')');
36560			jQuery('.form_info .price').html(js_format_Money(new_price, currency.DECIMALS, currency.SYMBOL, currency['1000_SYMBOL'], currency.DEC_SYMBOL));
36561		});
36562
36563		quantitySqmElem.on('focus', function () {
36564			jQuery(this).get(0).setSelectionRange(0, 9999);
36565		});
36566
36567		bodyElem.on('cartUpdated', () => quantitySqmElem.trigger('keyup'));
36568
36569		quantitySqmElem.trigger('keyup');
36570	}
36571}
36572
36573/*
36574	Custom confirmation vex
36575    PJ
36576    Based on js_delete_confirm_vex(), more customizable
36577    options {
36578        getSelectedSplit
36579        getSelected
36580        actionLang
36581        itemLangOne, itemLangTwo, itemLangMore,
36582        errorTooltip,
36583        mainText,
36584        inputText1,
36585        inputAdditionalText1,
36586        inputText2,
36587        inputAdditionalText2,
36588        customInfo,
36589        yesButtonText
36590    }
36591 */
36592
36593function vexCustomConfirm(options, callback) {
36594	var selected = options.getSelectedSplit;
36595	var total = selected.curPage + selected.otherPages;
36596	var title = '';
36597
36598	if (total == 1) {
36599		// napr. produkt
36600		title = options.actionLang + ' ' + total + options.itemLangOne.replace('.', '');
36601	} else if (total < 5) {
36602		// napr. produkty
36603		title = options.actionLang + ' ' + total + options.itemLangTwo.replace('.', '');
36604	} else {
36605		// napr. produktov
36606		title = options.actionLang + ' ' + total + options.itemLangMore.replace('.', '');
36607	}
36608
36609	var customOptions = jQuery.extend({
36610		total: selected,
36611		vexTitle: title
36612	}, options);
36613
36614	js_confirm_vex(customOptions, callback);
36615}
36616
36617
36618/*
36619 * Confirmation Vex
36620 * @auth TL
36621 *
36622 * @param customOptions {object}
36623 * @param callback {function} - callback function to be executed upon successful confirmation
36624 * @return void
36625 */
36626function js_delete_confirm_vex(customOptions, callback) {
36627
36628	// OPTIONS:
36629	var options = jQuery.extend({
36630		total: {
36631			count: 1
36632		},
36633		vexTitle: '',
36634		mainText: '',
36635		inputText1: '',
36636		inputAdditionalText1: '',
36637		errorTooltip: ''
36638	}, customOptions);
36639
36640	if (typeof options.total === 'string' || typeof options.total === 'number') {
36641		var itemsTotal     = parseInt(options.total);
36642		var numberOfInputs = [1];
36643	} else {
36644		var itemsTotal     = 0;
36645		var numberOfInputs = Object.keys(options.total);
36646		for (var i = 0; i < numberOfInputs.length; i++) {
36647			itemsTotal += parseInt(options.total[numberOfInputs[i]]);
36648		}
36649	}
36650
36651	var vexTitle = '<span class="login-title">' + options.vexTitle + '</span>';
36652	var vexYesButtonText = cms_js_lang_delete;
36653	if (typeof customOptions.yesButtonText !== 'undefined' && customOptions.yesButtonText.length > 0) {
36654		vexYesButtonText = customOptions.yesButtonText;
36655	}
36656
36657	var vexContent = options.mainText;
36658
36659	if (typeof customOptions.dontAddItemsTotal === 'undefined' || (typeof customOptions.dontAddItemsTotal !== 'undefined' && !customOptions.dontAddItemsTotal)) {
36660		vexContent += ' <strong>' + itemsTotal + '</strong>';
36661	}
36662
36663	jQuery.each(numberOfInputs, function (index, value) {
36664		// if inputText is undefined, continue into another loop iteration
36665		if ( typeof options['inputText' + (index + 1)] === 'undefined' ) return;
36666
36667		if ((typeof options.total === 'string' || typeof options.total === 'number') ? (index === 0 || options.total > 0) : (index === 0 || options.total[value] > 0)) {
36668			vexContent += '<br><br><span class="vex-dialog-span">' + options['inputText' + (index + 1)] + ' <strong>' + ((typeof options.total === 'string' || typeof options.total === 'number') ? options.total : options.total[value]) + '</strong> ';
36669			vexContent += options['inputAdditionalText' + (index + 1)] + '</span><br><br>';
36670			vexContent += '<input type="number" name="' + value + '" class="inputbox vex-dialog-confirm-input" placeholder="0" min="0">';
36671		} else {
36672			vexContent += '<input type="hidden" name="confirmedOtherPages" value="
366720">';
36673		}
36674	});
36675
36676	if (typeof customOptions.customDeleteInfo !== 'undefined' && customOptions.customDeleteInfo.length > 0) {
36677		vexContent += customOptions.customDeleteInfo;
36678	}
36679
36680	stop_submit_vex_enter();
36681	vex.dialog.confirm({
36682		title: vexTitle,
36683		vexCount: 1,
36684		className: 'vex-cs vex-text delete_items_vex delete_items_vex_new',
36685		message: vexTitle,
36686		input : vexContent,
36687		afterOpen: function(){
36688			stop_submit_vex_enter(this);
36689		},
36690		buttons: {
36691			YES: {
36692				text     : vexYesButtonText,
36693				className: "vex-dialog-button-primary",
36694				type     : "button",
36695				click    : function () {
36696
36697					var $inputs = jQuery('.vex-dialog-confirm-input');
36698					var wrongInputs = [];
36699					var valuesAreEqual = true;
36700
36701					$inputs.each(function (index, input) {
36702						input = jQuery(input);
36703						var nameAttr = input.prop('name');
36704
36705						if (input.hasClass('error')) {
36706							input.removeClass('error').tooltipster('destroy');
36707						}
36708
36709						if ( $inputs.length === 1 ) {
36710							if ( itemsTotal !== parseInt(input.val()) ) {
36711								wrongInputs.push(input);
36712							}
36713						} else {
36714							if ( options.total[nameAttr] !== parseInt(input.val()) ) {
36715								wrongInputs.push(input);
36716							}
36717						}
36718					});
36719
36720					if ( wrongInputs.length ) {
36721
36722						jQuery.each(wrongInputs, function(index, input) {
36723							jQuery(input).tooltipster({
36724								theme        : "tooltipster-gdpr",
36725								contentAsHTML: true,
36726								trackTooltip : true,
36727								trackOrigin  : true,
36728								multiple     : true,
36729								timer        : 5000,
36730								content      : options.errorTooltip
36731							}).tooltipster('open');
36732
36733							jQuery(input).addClass('error');
36734						});
36735
36736						return;
36737					}
36738
36739					callback();
36740					vex.close();
36741				}
36742			},
36743			NO : {
36744				text     : cms_js_lang_module_copy_btn_cancel,
36745				className: "vex-dialog-button-secondary",
36746				type     : "button",
36747				click    : function () {
36748					return vex.close();
36749				}
36750			}
36751		}
36752	});
36753}
36754
36755function js_confirm_vex(customOptions, callback) {
36756	// OPTIONS:
36757	var options = jQuery.extend({
36758		total: {
36759			count: 1
36760		},
36761		vexTitle: '',
36762		mainText: '',
36763		className: '',
36764		inputText1: '',
36765		inputAdditionalText1: '',
36766		errorTooltip: ''
36767	}, customOptions);
36768
36769	var itemsTotal = 0;
36770	var numberOfInputs = Object.keys(options.total);
36771	for (var i = 0; i < numberOfInputs.length; i++) {
36772		itemsTotal += parseInt( options.total[numberOfInputs[i]] );
36773	}
36774
36775	var vexTitle = '<span class="login-title">' + options.vexTitle + '</span>';
36776
36777	var vexContent;
36778	vexContent = options.mainText + ' <strong>' + itemsTotal + '</strong>';
36779
36780	jQuery.each(numberOfInputs, function (index, value) {
36781		// if inputText is undefined, continue into another loop iteration
36782		if ( typeof options['inputText' + (index + 1)] === 'undefined' ) return;
36783
36784		if (index === 0 || options.total[value] > 0) {
36785			vexContent += '<br><br><span class="vex-dialog-span">' + options['inputText' + (index + 1)] + ' <strong>' + options.total[value] + '</strong> ';
36786			vexContent += options['inputAdditionalText' + (index + 1)] + '</span><br><br>';
36787			vexContent += '<input type="number" name="' + value + '" class="inputbox vex-dialog-confirm-input" placeholder="0" min="0">';
36788		} else {
36789			vexContent += '<input type="hidden" name="confirmedOtherPages" value="0">';
36790		}
36791	});
36792
36793	if (typeof customOptions.customInfo !== 'undefined' && customOptions.customInfo.length > 0) {
36794		vexContent += customOptions.customInfo;
36795	}
36796
36797	stop_submit_vex_enter();
36798	var confirmVex = vex.dialog.confirm({
36799		title: vexTitle,
36800		vexCount: 1,
36801		className: 'vex-cs vex-text ' + options.className,
36802		message: vexTitle,
36803		input : vexContent,
36804		afterOpen: function(){
36805			stop_submit_vex_enter(this);
36806		},
36807		buttons: {
36808			YES: {
36809				text     : options.yesButtonText,
36810				className: "vex-dialog-button-primary",
36811				type     : "button",
36812				click    : function () {
36813
36814					var $inputs        = confirmVex.find('.vex-dialog-confirm-input');
36815					var wrongInputs    = [];
36816
36817					$inputs.each(function (index, input) {
36818						input        = jQuery(input);
36819						var nameAttr = input.prop('name');
36820
36821						if (input.hasClass('error')) {
36822							input.removeClass('error').tooltipster('destroy');
36823						}
36824
36825						if ($inputs.length === 1) {
36826							if (itemsTotal !== parseInt(input.val())) {
36827								wrongInputs.push(input);
36828							}
36829						} else {
36830							if (options.total[nameAttr] !== parseInt(input.val())) {
36831								wrongInputs.push(input);
36832							}
36833						}
36834					});
36835
36836					if (wrongInputs.length) {
36837
36838						jQuery.each(wrongInputs, function (index, input) {
36839							jQuery(input).tooltipster({
36840								theme        : "tooltipster-gdpr",
36841								contentAsHTML: true,
36842								trackTooltip : true,
36843								trackOrigin  : true,
36844								multiple     : true,
36845								timer        : 5000,
36846								content      : options.errorTooltip
36847							}).tooltipster('open');
36848
36849							jQuery(input).addClass('error');
36850						});
36851
36852						return;
36853					}
36854
36855					callback();
36856					vex.close();
36857				}
36858			},
36859			NO : {
36860				text     : cms_js_lang_module_copy_btn_cancel,
36861				className: "vex-dialog-button-secondary",
36862				type     : "button",
36863				click    : function () {
36864					return vex.close();
36865				}
36866			}
36867		}
36868	});
36869}
36870
36871function google_recaptcha_add_wrap_class() {
36872	if ( typeof MutationObserver != 'undefined' ) {
36873		var observer = new MutationObserver(function(mutations) {
36874			mutations.forEach(function(mut) {
36875				if ( jQuery(mut.target).find('div.g-recaptcha-bubble-arrow').length > 0 ) {
36876					jQuery(mut.target).find('div.g-recaptcha-bubble-arrow').parent().addClass('g-recaptcha-wrap');
36877				}
36878			});
36879		});
36880		observer.observe(document, {attributes: false, childList: true, characterData: false, subtree:true});
36881	}
36882}
36883
36884/**
36885 * presunute z comments.js lebo sa ta funkcia pouziva aj v registracii [2020-03-02] - tomasL
36886 * Validate google recaptcha
36887 * @function validation_by_google_recaptcha
36888 *
36889 * @author Miro
36890 *
36891 * @return {Boolean}
36892 */
36893function validation_by_google_recaptcha()
36894{
36895	return jQuery('#g-recaptcha-response').val();
36896}
36897
36898function js_infobar_cs(module) {
36899	var mod = jQuery(module);
36900	if ( !mod.length || ( typeof admin_view_design !== 'undefined' && typeof admin_view_design == 0 ) ) { return false; }
36901	var body = jQuery('body');
36902	var scrollTop_old = null;
36903	var scrollTop = null;
36904	body.addClass('show_banner_infobar');
36905	mod.find('.close').on('click',function () { //.text
36906		body.removeClass('show_banner_infobar');
36907		mod.addClass('hide');
36908		var time = new Date();
36909		Cookies.set('banner_infobar_hidden', Math.floor(time.getTime() / 1000));
36910		if (typeof js_infobar_content_md5 !== 'undefined') {
36911			Cookies.set('banner_infobar_msg', js_infobar_content_md5);
36912		}
36913		body.addClass('banner_infobar_hidden');
36914	});
36915}
36916
36917function js_vex_show_after_registration_user_activation_2() {
36918
36919	vex.dialog.open({
36920		message: '<h6>' + js_lang_phpshop_registration_thank_you_vex_title + '</h6>',
36921		input: js_lang_phpshop_registration_thank_you_vex,
36922		buttons: [
36923			jQuery.extend({}, vex.dialog.buttons.YES, { text: 'Ok'})
36924		],
36925		callback: function (data) {
36926			window.location = window.location.protocol + '//' + window.location.host;
36927		}
36928	});
36929}
36930
36931function js_product_mass_bonus_assign() {
36932	var checkedProducts = jQuery('input:checked[name="product_id[]"][type="checkbox"]').length;
36933	if (checkedProducts == 0) {
36934		vex.dialog.alert({message: '<?php echo $VM_LANG->_PHPSHOP_MAKE_SEL_FROM_LIST_FOR_ACTION . " " . $VM_LANG->_PHPSHOP_PRODUCT_SPECIAL_GROUP_MASS_SPECIAL_ASSIGN_LBL; ?>'});
36935		return;	//	bez parametra !!!
36936	}
36937
36938	jQuery.get(js_global_live_site + '/administrator/index3.php?pshop_mode=admin&page=product.product_list&option=com_shop&ajax_call=1&ajax_func=product_bonus_assign_get_groups&no_html=1&no_menu=1', {'product_count': checkedProducts}, function (res) {
36939		var bonusSelectHtml = JSON.parse(res);
36940		vex.open({
36941			content  : bonusSelectHtml.bonusSelectHtml,
36942			afterOpen: function () {
36943			console.log(JSON.parse(res));
36944			/*	start_improve_multiselect();
36945				var group_select_element = jQuery('.vex-content select[name="product_special_group_id[]"]:first');
36946				group_select_element.find('option').on('click', function () {
36947					js_multiple_select_option_click(jQuery(this));
36948				});
36949
36950				jQuery('#mass_special_group_moving_container select[name="product_special_group_id[]"]')
36951					.prop('size', '10')
36952					.css('width', '100%')
36953					.css('height', 'auto');*/
36954			}
36955		});
36956	});
36957
36958	return;
36959}
36960
36961function js_product_mass_bonus_assign_save() {
36962	var selectedBonus        = jQuery('select[name="product_bonus_id[]"] option:selected');
36963	var bonusSelectedMethod = jQuery('#mass_product_bonus_select_method option:selected');
36964	var selectedProducts = js_getSelectedProducts();
36965
36966	if ( selectedProducts.length > 0 && selectedBonus.length == 1 && bonusSelectedMethod.length == 1 ) {
36967		var options = {
36968			'productSpecialId': selectedBonus.val(),
36969			'selectedMethod'  : bonusSelectedMethod.val(),
36970			'selectedProducts': selectedProducts,
36971		};
36972
36973		jQuery.post(js_global_live_site + '/administrator/index3.php?pshop_mode=admin&page=product.product_list&option=com_shop&ajax_call=2&ajax_func=save_mass_product_bonus&no_html=1&no_menu=1', options, function (res) {
36974			if (res == '0') {
36975				alert(cms_js_lang_products_shipping_message_error_2);
36976			}
36977
36978			window.location.reload();
36979		});
36980	}
36981}
36982
36983function js_set_partial_shipping(elem) {
36984	showLoader();
36985	var element = jQuery(elem);
36986	new AjaxRequest({ hasPartialShipping: element.is(":checked") })
36987		.setController("Basket")
36988		.setAction("setPartialShipping")
36989		.onSuccess(function (result) {
36990			hideLoader();
36991			window.location.reload();
36992		})
36993		.send();
36994}
36995
36996function moduleCreativeShopSwitch(elem) {
36997	var $elem = jQuery(elem);
36998
36999	$elem.prop('disabled',true);
37000
37001	var $newContentWrapper = $elem.closest('div.video-news-page').find('div.more');
37002
37003	if ($newContentWrapper.html() == '') {
37004		$elem.startAjaxLoader();
37005		new AjaxRequest()
37006			.setMethod('POST')
37007			.setController('Module')
37008			.setAction('moduleCreativeshopNewsAsyncLoad')
37009			.onSuccess(function (response) {
37010				$elem.prop('disabled',false);
37011				$newContentWrapper.html(response['data'][0]);
37012				$newContentWrapper.removeClass('hide');
37013				$newContentWrapper.removeClass('hidden');
37014				$elem.stopAjaxLoader();
37015				$elem.html($elem.data('hide'));
37016			})
37017			.onError(function (response) {
37018				$elem.prop('disabled',false);
37019				$elem.stopAjaxLoader();
37020				$elem.html($elem.data('show'));
37021			})
37022			.send();
37023	} else {
37024
37025		if ($newContentWrapper.is(':visible')) {
37026			$newContentWrapper.hide();
37027			$elem.html($elem.data('show'));
37028		} else {
37029			$newContentWrapper.show();
37030			$elem.html($elem.data('hide'));
37031		}
37032	}
37033}
37034
37035/**
37036 * Univerzalny wrapper na rendering/manipulaciu stromu z json dat
37037 * Pouziva ztree plugin http://www.treejs.cn/v3/api.php
37038 * @author IAN
37039 * TODO: kedze to bolo narychlo robene, treba dotiahnut niektore ficurky ako iteraciu nodov,hlasky,eventy,callbacks atd...
37040 */
37041var CsTree = function(id, options){
37042	var obj = this;
37043	obj.box = {};
37044	obj.tree = {};
37045	obj.ztree = {};
37046	obj.search = {};
37047	obj.keyword = '';
37048	obj.timer = 0;
37049	obj.index = 0;
37050	obj.options = {
37051		data: {},
37052		selected: [],
37053		setting: {
37054			data: {
37055				key: {
37056					name: "title",
37057					children: "branch",
37058					idKey: "id"
37059				}
37060			},
37061			check: {
37062				enable: true,
37063				chkboxType: {"Y": "", "N": ""}
37064			},
37065			view: {
37066				showTitle: false,
37067				expandSpeed: ''
37068			},
37069			callback: {
37070				onClick: function (event, treeId, treeNode) {}
37071			}
37072		}
37073	};
37074	obj.init = function (id, options) {
37075
37076		obj.options = jQuery.extend(true, obj.options, options);
37077		obj.tree = jQuery('#'+id);
37078
37079		if ( !obj.tree.length ) return;
37080
37081		obj.box = obj.tree.closest('.nc_nav_master');
37082
37083		if ( obj.box.length ){
37084
37085			obj.search = obj.box.find('.nc_search_input');
37086
37087			if ( obj.search.length ){
37088
37089				obj.search.on('keyup', function (e) {
37090					var input = jQuery(this);
37091					var value = jQuery.trim(input.val());
37092
37093					if (value == '' || value.length < 2) {
37094						obj.resetSearch();
37095						return;
37096					}
37097
37098					if (obj.keyword == value) {
37099						return;
37100					}
37101
37102					obj.keyword = value;
37103
37104					if (obj.timer > 0) {
37105						return;
37106					}
37107
37108					obj.timer = setTimeout(function () {
37109
37110						clearTimeout(obj.timer);
37111						obj.timer = 0;
37112						obj.find();
37113					}, 300);
37114				});
37115			}
37116		}
37117
37118		obj.ztree = jQuery.fn.zTree.init(obj.tree, obj.options.setting, obj.options.data);
37119
37120		if ( obj.options.selected.length ) obj.select(obj.options.selected);
37121	}
37122	obj.select = function (selected){
37123
37124		jQuery.each(selected, function (i, u) {
37125
37126			var node = obj.ztree.getNodeByParam("id", u, null);
37127			if (node !== null) obj.ztree.checkNode(node, true, false);
37128		});
37129	}
37130	obj.getChecked = function(){
37131
37132		var ret = [];
37133		var nodes = obj.ztree.getCheckedNodes(true);
37134
37135		for (var i = 0; i < nodes.length; i++) {
37136
37137			ret.push(nodes[i].id);
37138		}
37139
37140		return ret;
37141	}
37142	obj.find = function(){
37143
37144		if (obj.keyword == '') {
37145
37146			obj.resetSearch();
37147			return;
37148		}
37149
37150		obj.ztree.cancelSelectedNode();
37151
37152		var keyword = obj.keyword.latinise();
37153
37154		var nodes = obj.ztree.getNodesByFilter(obj.filter, false, null, keyword);
37155
37156		obj.index = 0;
37157
37158		if (nodes.length > 0) {
37159
37160			for (var i = 0; i < nodes.length; i++) {
37161
37162				if (i == 0) obj.scroll(nodes[i]);
37163
37164				obj.ztree.selectNode(nodes[i], true, true);
37165			}
37166			//cscat.iterator[id].addClass('found').removeClass('notfound').text(' ' + nodes.length).attr('title', cms_js_iterate_found);
37167		} else {
37168			//cscat.iterator[id].removeClass('found').addClass('notfound').text(' ' + 0).attr('title', cms_js_iterate_notfound);
37169		}
37170	}
37171	obj.resetSearch = function(clearinput){
37172
37173		if (clearinput) obj.search.val('');
37174		obj.ztree.cancelSelectedNode();
37175		obj.keyword = '';
37176		obj.index = -1;
37177	}
37178	obj.scroll = function(node){
37179
37180		if (typeof node === 'undefined' || node === null) return;
37181
37182		var row = obj.tree.find('#' + node.tId);
37183
37184		// Node nebol otvoreny a zatial neexistuje
37185		if (!row.length){
37186
37187			var nodes = node.getPath();
37188			if (nodes.length){
37189
37190				for(var i=0; i<nodes.length; i++){
37191
37192					obj.ztree.expandNode(nodes[i], true, true, true);
37193				}
37194
37195				row = obj.tree.find('#' + node.tId);
37196			}
37197		} else {
37198
37199			obj.ztree.expandNode(node, true, true, true);
37200		}
37201
37202		// V strome uz nemame tento node
37203		if (!row.length) return;
37204
37205		obj.timer = setTimeout(function () {
37206
37207			clearTimeout(obj.timer);
37208			obj.timer = 0;
37209			obj.tree.stop().animate({scrollTop: row[0].offsetTop}, 300);
37210		}, 150);
37211	}
37212	obj.filter = function(node, keyword){
37213
37214		if ( typeof node[obj.options.setting.data.key.name] === 'undefined' ) return false;
37215		var regex = new RegExp(keyword.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'), "i");
37216		var label = node[obj.options.setting.data.key.name].latinise();
37217		return regex.test(String(label));
37218	}
37219	obj.init(id, options);
37220	return obj;
37221}
37222
37223//JB globálna zmena množstva produtku.. nie je potrebné aby sme mali v systéme 4 funckie
37224/*
37225*  element, má v sebe cez data-attributes všetky hodnoty potrebné na vyhodnotenie
37226* */
37227function jsChangeProductQuantity(elem) {
37228	if (typeof elem !== 'undefined') {
37229		var jQueryBody = jQuery('body');
37230		var elem = jQuery(elem);
37231		var finalQuantity = 0;
37232
37233		var params = {
37234			'inputSelector'     : elem.data('input_selector'),
37235			'parentSelector'    : elem.data('parent_selector'),
37236			'action'            : elem.data('action'),
37237			'quantity'          : elem.data('quantity'),
37238			'decimals'          : 0,
37239			'defaultValue'      : elem.data('default_value'),
37240		};
37241
37242
37243
37244		//pridanie zaokrúhľovania množstva podľa potreby -> počet desatinných miest samotného quantity / forcedQuantity
37245		//blobo by fajn nahodiť tam : js_Config_vm_use_decimal_product_quantity, lenže to má mmoentálne zlé hodnoty, prípadne produkt môže mať menší počet desatinných miest
37246		if (Math.floor(params.quantity) != params.quantity) {
37247			params.decimals = params.quantity.toString().split(".")[1].length || 0;
37248		}
37249
37250		var quantityInput = elem.closest(params.parentSelector).find(params.inputSelector);
37251
37252		if (typeof quantityInput.data('allow_zero_quantity') !== 'undefined') {
37253			params.allowZeroQuantity = quantityInput.data('allow_zero_quantity');
37254		} else {
37255			params.allowZeroQuantity = 0;
37256		}
37257
37258		//množstevné nákupy
37259		if ( typeof quantityInput.data('maximum_quantity') !== 'undefined') {
37260			params.maximumQuantity = quantityInput.data('maximum_quantity');
37261		} else {
37262			params.maximumQuantity = 0;
37263		}
37264
37265		if ( typeof quantityInput.data('forced_quantity') !== 'undefined') {
37266			params.forcedQuantity = quantityInput.data('forced_quantity');
37267
37268			if (Math.floor(params.forcedQuantity) !== params.forcedQuantity) {
37269				params.decimals = params.forcedQuantity.toString().split(".")[1].length || 0;
37270			}
37271
37272		} else {
37273			params.forcedQuantity = 0;
37274		}
37275
37276		if ( typeof quantityInput.data('minimum_quantity') !== 'undefined') {
37277			params.minimumQuantity = quantityInput.data('minimum_quantity');
37278		} else {
37279			params.minimumQuantity = 0;
37280		}
37281
37282		params.floatFix = Math.pow(10, params.decimals);
37283
37284		var startingQuantity = parseFloat(quantityInput.val().replace(',','.'));
37285
37286		switch (params.action) {
37287			case 'add' :
37288
37289				if (params.forcedQuantity) {
37290					finalQuantity = (startingQuantity + parseFloat(params.forcedQuantity) ).toFixed(params.decimals);
37291
37292					if (params.minimumQuantity && (parseFloat(finalQuantity) < parseFloat(params.minimumQuantity)) && !params.allowZeroQuantity) {
37293						finalQuantity = params.minimumQuantity;
37294					} else if (params.maximumQuantity && (parseFloat(finalQuantity) > parseFloat(params.maximumQuantity))) {
37295						finalQuantity = params.maximumQuantity;
37296					}
37297				} else {
37298					finalQuantity = (startingQuantity + parseFloat(params.quantity) ).toFixed(params.decimals);
37299				}
37300
37301				finalQuantity = parseFloat(finalQuantity).toFixed(params.decimals);
37302
37303				quantityInput.val( finalQuantity ).attr('value', finalQuantity).trigger('change');
37304
37305				if (quantityInput.data('refresh')) {
37306					quantityInput.closest('tr').find('input[name="update"]').click();
37307				}
37308				jQueryBody.trigger('jsChangeProductQuantity', [quantityInput, finalQuantity]);
37309				return 1;
37310			case 'sub' :
37311
37312				if (params.forcedQuantity) {
37313					finalQuantity = (startingQuantity - parseFloat(params.forcedQuantity)).toFixed(params.decimals);
37314					if (params.minimumQuantity && (finalQuantity < params.minimumQuantity)) {
37315
37316						//ak je sa nažíme pridať menšie množstvo ako je minimum a je povolené zero Quantity, setneme na 0, inak vrátime na minimum
37317						if (params.allowZeroQuantity) {
37318							finalQuantity = 0;
37319						} else {
37320							finalQuantity = params.minimumQuantity;
37321						}
37322					} else if (params.maximumQuantity && (finalQuantity > params.maximumQuantity)) {
37323						finalQuantity = params.maximumQuantity;
37324					}
37325
37326					if ( !(finalQuantity > 0) ) {
37327						if (params.allowZeroQuantity) {
37328							finalQuantity = 0;
37329						} else {
37330							finalQuantity = params.forcedQuantity;
37331						}
37332					}
37333
37334				} else {
37335					//potrebujeme si uložiť minimálne množstvo čo je buď 1 ks alebo min. množstvo
37336					finalQuantity = Math.ceil( (startingQuantity - parseFloat(params.quantity)).toFixed(params.decimals));
37337
37338					if ( !(finalQuantity > 0) ) {
37339						if (params.allowZeroQuantity) {
37340							finalQuantity = 0;
37341						} else {
37342							finalQuantity = 1;
37343						}
37344					}
37345				}
37346
37347				// JB 05-06-2020 maťova žiadosť -> množstvo sa nemá dostať na nulu cez buttony
37348				//finalQuantity = parseFloat(quantityInput.val()) - params.quantity;
37349				//finalQuantity = parseFloat(finalQuantity).toFixed(params.decimals);
37350				//TODO : defaultValue by mal byť len bool ktorý určuje či s
37350a dostane produkt na nulu alebo nie -> takže to bude 1 / minimálne / krokové množstvo
37351
37352				if ( finalQuantity === 0 ) {
37353					//  FIX: v riadkovom výpise sa vzdy opyta, ci user chce odstranit product z kosika
37354					if( !params.allowZeroQuantity || params.parentSelector === '.basket_quantity_wrapper' ) {
37355						vex.dialog.confirm({
37356							message : js_lang_shopping_cart_delete_item_confirm,
37357							callback: function (confirmed) {
37358								if ( confirmed ) {
37359									refreshQuantity(quantityInput, finalQuantity, true);
37360								} else {
37361									return false;
37362								}
37363							}
37364						});
37365						return false;
37366					}
37367
37368					refreshQuantity(quantityInput, finalQuantity);
37369					return false;
37370				}
37371
37372				refreshQuantity(quantityInput, finalQuantity);
37373
37374				jQueryBody.trigger('jsChangeProductQuantity', [quantityInput, finalQuantity]);
37375				return 1;
37376			case 'set' :
37377				//úprava on blur funkciou, po každom vyplnení inputu sa spraví validácia na dané množstvo aby sedelo zadanému množstvu, ktoré používateľ zadal
37378				finalQuantity = parseFloat(elem.val().replace(',','.'));
37379
37380				if (params.minimumQuantity && ( finalQuantity < params.minimumQuantity ) && !params.allowZeroQuantity  ) {
37381					finalQuantity = params.minimumQuantity;
37382				}
37383				if (params.maximumQuantity && finalQuantity > params.maximumQuantity) {
37384					finalQuantity = params.maximumQuantity;
37385				}
37386
37387				if (params.forcedQuantity) {
37388
37389					//je možno potrebné upraviť na cfg
37390
37391					if (1 || is_cs_user()) {
37392						//zaokrúhli vždy k väčšiemu
37393						finalQuantity = (parseFloat(params.forcedQuantity) * Math.ceil( finalQuantity / parseFloat(params.forcedQuantity) )).toFixed(params.decimals);
37394					} else {
37395						//zaokrúhli dole / nahor -> podľa toho čo je bližšie
37396						finalQuantity = (parseFloat(params.forcedQuantity) * Math.ceil( (  finalQuantity / parseFloat(params.forcedQuantity) ).toFixed(params.decimals))).toFixed(params.decimals);
37397					}
37398				}
37399
37400				if ( !(finalQuantity > 0) ) {
37401					if (params.allowZeroQuantity) {
37402						finalQuantity = 0;
37403					} else {
37404						if (params.forcedQuantity) {
37405							finalQuantity = params.forcedQuantity;
37406						} else {
37407							finalQuantity = 1;
37408						}
37409					}
37410				}
37411
37412				//posledná úprava aby sa do inputu nedostala záporná hodnota, prípadne nula
37413
37414				//quantityInput.val( ( finalQuantity > 0 ) ? (finalQuantity.toFixed(params.decimals).toString()) : 0).trigger('change');
37415				quantityInput.val( finalQuantity ).attr('value', finalQuantity).trigger('change');
37416
37417				if (finalQuantity != startingQuantity) {
37418					quantityInput.addClass('error_inputbox_animation');
37419					setTimeout(function() {
37420						quantityInput.removeClass('error_inputbox_animation');
37421					}, 1000);
37422
37423					var lang = js_lang_insufficient_quantity_inform;
37424					lang     = lang.replace('{from}', startingQuantity);
37425					lang     = lang.replace('{to}', finalQuantity);
37426
37427					quantityInput.closest('.quantity_wrapper').tooltipster({
37428						theme    : 'cs_tooltipster_grey_theme tooltipster_minquantity',
37429						animation: 'fade',
37430						side     : 'top',
37431						delay    : 10,
37432						timer    : 5000
37433					})
37434						.tooltipster('content', lang)
37435						.tooltipster('open');
37436				}
37437				if (quantityInput.data('refresh')) {
37438					quantityInput.closest('tr').find('input[name="update"]').click();
37439				}
37440
37441				jQueryBody.trigger('jsChangeProductQuantity', [quantityInput, finalQuantity]);
37442				return 1;
37443			default :
37444				jQueryBody.trigger('jsChangeProductQuantity', [quantityInput, finalQuantity]);
37445				return 1;
37446		}
37447	}
37448	return 0;
37449}
37450
37451function refreshQuantity(quantityInput, quantity, forceRefresh = false) {
37452	quantityInput.val( quantity ).attr('value', quantity).trigger('change');
37453
37454	if (quantityInput.data('refresh') || forceRefresh) {
37455		quantityInput.closest('tr').find('input[name="update"]').click();
37456	}
37457}
37458
37459function js_checkout_thankyou_message_to_unregistered_customer (data) {
37460	if ( typeof data !== 'undefined' && typeof data.data !== 'undefined' && data.data != '' ) {
37461		vex.dialog.open({
37462			message  : '<h4>' + data.title + '</h4>',
37463			className: 'vex-cs vex-dialog-checkout-thankyou-unregistered-message',
37464			input    : data.data,
37465			buttons: [
37466				jQuery.extend({}, vex.dialog.buttons.YES, { text: js_lang_checkout_thankyou_unregistered_vex_confirm }),
37467			],
37468		});
37469	}
37470}
37471
37472// loyalty scheme
37473function js_add_to_loyalty_scheme_checkbox_handler (elem) {
37474	elem = jQuery(elem);
37475	var isChecked = elem.is(':checked');
37476	if (isChecked) {
37477		jQuery.cookie('add_to_loyalty_scheme_checked', '1', {path:'/'});
37478	} else if (jQuery.cookie('add_to_loyalty_scheme_checked')) {
37479		jQuery.cookie('add_to_loyalty_scheme_checked', null, {path:'/'});
37480	}
37481}
37482
37483/**
37484 * Toggles cstools on/off
37485 *
37486 * @return void
37487 */
37488function toggleCsTools() {
37489	jQuery('.pres_btn.nobg').trigger('click');
37490}
37491
37492function initInfowidgetCountdownTimer (duration, display) {
37493	infowidgetInterval = setInterval(function () {
37494		if ( typeof js_Config_infowidget_countdown_timer.current !== 'undefined' ) {
37495			now = js_Config_infowidget_countdown_timer.current * 1000;
37496			if ( typeof infowidgetCountDownHelper == 'undefined' ) {
37497				infowidgetCountDownHelper = 0;
37498			} else {
37499				infowidgetCountDownHelper += 1;
37500				now += infowidgetCountDownHelper * 1000;
37501			}
37502		} else {
37503			var now = new Date().getTime();
37504		}
37505
37506		var timeleft = duration - now;
37507
37508		var days = Math.floor(timeleft / (1000 * 60 * 60 * 24));
37509		var hours = Math.floor((timeleft % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
37510		var minutes = Math.floor((timeleft % (1000 * 60 * 60)) / (1000 * 60));
37511		var seconds = Math.floor((timeleft % (1000 * 60)) / 1000);
37512
37513		if ( seconds < 0 || minutes < 0 || hours < 0 || days < 0 ) {
37514			clearInterval(infowidgetInterval);
37515			display.hide();
37516		}
37517
37518		var daysText = '';
37519		var hoursText = '';
37520		var minutesText = '';
37521		var secondsText = '';
37522
37523		if ( days == 1 ) {
37524			daysText = days + ' ' + (typeof js_lang_time_day_1 !== 'undefined' ? js_lang_time_day_1 : 'day') ;
37525		} else if ( days > 1 && days < 5 ) {
37526			daysText = days + ' ' + (typeof js_lang_time_day_more !== 'undefined' ? js_lang_time_day_more : 'days') ;
37527		} else if ( days >= 5 ) {
37528			daysText = days + ' ' + (typeof js_lang_time_day_more_2 !== 'undefined' ? js_lang_time_day_more_2 : 'days' );
37529		}
37530
37531		if ( hours == 1 ) {
37532			hoursText = hours + ' ' + (typeof js_lang_time_hours_1 !== 'undefined' ? js_lang_time_hours_1 : 'hours') ;
37533		} else if ( hours > 1 && hours < 5 ) {
37534			hoursText = hours + ' ' + (typeof js_lang_time_hours_2_4 !== 'undefined' ? js_lang_time_hours_2_4 : 'hours') ;
37535		} else if ( hours >= 5 || ( hours == 0 && days != 0 ) ) {
37536			hoursText = hours + ' ' + (typeof js_lang_time_hours_more !== 'undefined' ? js_lang_time_hours_more : 'hours') ;
37537		}
37538
37539		if ( minutes == 1 ) {
37540			minutesText = minutes + ' ' + (typeof js_lang_time_minutes_1 !== 'undefined' ? js_lang_time_minutes_1 : 'minute') ;
37541		} else if ( minutes > 1 && minutes < 5 ) {
37542			minutesText = minutes + ' ' + (typeof js_lang_time_minutes_2_4 !== 'undefined' ? js_lang_time_minutes_2_4 : 'minutes') ;
37543		} else if ( minutes >= 5 || ( minutes == 0 && ( days != 0 || hours != 0 ) ) ) {
37544			minutesText = minutes + ' ' + (typeof js_lang_time_minutes_more !== 'undefined' ? js_lang_time_minutes_more : 'minutes') ;
37545		}
37546
37547		if ( seconds == 1 ) {
37548			secondsText = seconds + ' ' + (typeof js_lang_time_seconds_1 !== 'undefined' ? js_lang_time_seconds_1 : 'second') ;
37549		} else if ( seconds > 1 && seconds < 5 ) {
37550			secondsText = seconds + ' ' + (typeof js_lang_time_seconds_2_4 !== 'undefined' ? js_lang_time_seconds_2_4 : 'seconds') ;
37551		} else if ( seconds >= 5 || ( seconds == 0 && ( days != 0 || hours != 0 || minutes != 0 ) ) ) {
37552			secondsText = seconds + ' ' + (typeof js_lang_time_seconds_more !== 'undefined' ? js_lang_time_seconds_more : 'seconds') ;
37553		}
37554
37555		display.text(daysText + ' ' + hoursText + ' ' + minutesText + ' ' + secondsText);
37556	}, 1000);
37557}
37558
37559function tempNewLoader (toggle, reload, fade) {
37560	var $body = jQuery('body');
37561	var fadeDuration = 300;
37562
37563	if ( typeof loaderTimeouts === 'undefined' ) {
37564		loaderTimeouts = [];
37565	}
37566
37567	var changeText = function changeText(text) { jQuery('.css_graph_ajax_loader_text').text(text); };
37568
37569	if ( !toggle ) {
37570		if ( fade ) {
37571			$body.find('.css_graph_ajax_loader_wrapper').fadeOut(fadeDuration, function() {
37572				jQuery(this).remove();
37573			});
37574		} else {
37575			$body.find('.css_graph_ajax_loader_wrapper').remove();
37576		}
37577
37578		loaderTimeouts.map(function (timeoutId) {
37579			clearTimeout(timeoutId);
37580		});
37581		delete loaderTimeouts;
37582		return;
37583	}
37584
37585	if ($body.children('.css_graph_ajax_loader_wrapper').length) {
37586		return;
37587	}
37588
37589	var loaderTexts = {
37590		initial: typeof js_lang_checkout_loader_initial !== 'undefined' ? js_lang_checkout_loader_initial : '',
37591		intermediate: typeof js_lang_checkout_loader_intermediate !== 'undefined' ? js_lang_checkout_loader_intermediate : '',
37592		final: typeof js_lang_checkout_loader_final !== 'undefined' ? js_lang_checkout_loader_final : ''
37593	};
37594
37595	var html = [
37596		'<span class="css_graph_ajax_loader_wrapper">',
37597		'<span class="css_graph_ajax_loader_inner">',
37598		'<span class="css_graph_ajax_loader"></span>',
37599		'<span class="css_graph_ajax_loader_text"></span>',
37600		'</span>',
37601		'</span>'
37602	].join('');
37603
37604	loaderTimeouts.push(setTimeout(function () {
37605		changeText(loaderTexts.initial);
37606		}, 3000));
37607
37608	loaderTimeouts.push(setTimeout(function () {
37609		changeText(loaderTexts.intermediate);
37610		}, 5000));
37611
37612	loaderTimeouts.push(setTimeout(function () {
37613		changeText(loaderTexts.final);
37614		}, 15000));
37615
37616	if ( reload ) {
37617		loaderTimeouts.push(setTimeout(function() {
37618			window.location.reload();
37619		}, 30000));
37620	}
37621
37622	if ( fade ) {
37623		$body.append(jQuery(html).hide().fadeIn(fadeDuration));
37624	} else {
37625		$body.append(jQuery(html));
37626	}
37627}
37628
37629var CsLoader = {
37630	fade: false,
37631	fadeDuration: 300,
37632	reload: false,
37633	loaderLangs: {
37634		initial: typeof js_lang_checkout_loader_initial !== 'undefined' ? js_lang_checkout_loader_initial : 'Spracováva sa...',
37635		intermediate: typeof js_lang_checkout_loader_intermediate !== 'undefined' ? js_lang_checkout_loader_intermediate : 'Chvíľku strpenia...',
37636		final: typeof js_lang_checkout_loader_final !== 'undefined' ? js_lang_checkout_loader_final : 'Ešte chvíľu počkajte...',
37637	},
37638	loaderTimeoutDurations: {
37639		initial: 3000,
37640		intermediate: 5000,
37641		final: 15000,
37642		reload: 30000,
37643	},
37644	loaderTimeouts: {},
37645	transparentBackground: false,
37646	blurBackground: true,
37647	loaderTextSelector: '.css_graph_ajax_loader_text',
37648	loaderWrapperSelector: '.css_graph_ajax_loader_wrapper',
37649	html: [
37650		'<span class="css_graph_ajax_loader_wrapper">',
37651		'<span class="css_graph_ajax_loader_inner">',
37652		'<span class="css_graph_ajax_loader"></span>',
37653		'<span class="css_graph_ajax_loader_text"></span>',
37654		'</span>',
37655		'</span>'
37656	].join(''),
37657	htmlTransparent: [
37658		'<span class="css_graph_ajax_loader_wrapper" style="background:transparent;">',
37659		'<span class="css_graph_ajax_loader_inner">',
37660		'<span class="css_graph_ajax_loader"></span>',
37661		'<span class="css_graph_ajax_loader_text"></span>',
37662		'</span>',
37663		'</span>'
37664	].join(''),
37665	startLoader: function ( selector ) {
37666
37667		if ( typeof selector !== 'string' || selector === '' ) {
37668			selector = 'body';
37669		}
37670
37671		var $body = jQuery(selector);
37672
37673		if ( this.isLoaderActive(selector) ) {
37674			return;
37675		}
37676
37677		if ( selector === 'body' && this.blurBackground === true ) {
37678			$body.addClass('csloader-active');
37679		}
37680
37681		this.loaderTimeouts[selector] = [];
37682		this.loaderTimeouts[selector].push(setTimeout(function () {
37683			CsLoader.changeText(CsLoader.loaderLangs.initial, selector);
37684		}, this.loaderTimeoutDurations.initial));
37685
37686		this.loaderTimeouts[selector].push(setTimeout(function () {
37687			CsLoader.changeText(CsLoader.loaderLangs.intermediate, selector);
37688		}, this.loaderTimeoutDurations.intermediate));
37689
37690		this.loaderTimeouts[selector].push(setTimeout(function () {
37691			CsLoader.changeText(CsLoader.loaderLangs.final, selector);
37692		}, this.loaderTimeoutDurations.final));
37693
37694		if ( this.reload ) {
37695			this.loaderTimeouts[selector].push(setTimeout(function() {
37696				window.location.reload();
37697			}, this.loaderTimeoutDurations.reload));
37698		}
37699
37700		if ( this.fade ) {
37701			if ( this.transparentBackground ) {
37702				$body.append(jQuery(this.htmlTransparent).hide().fadeIn(this.fadeDuration));
37703			} else {
37704				$body.append(jQuery(this.html).hide().fadeIn(this.fadeDuration));
37705			}
37706		} else {
37707			if ( this.transparentBackground ) {
37708				$body.append(jQuery(this.htmlTransparent));
37709			} else {
37710				$body.append(jQuery(this.html));
37711			}
37712		}
37713	},
37714
37715	stopLoader: function ( selector ) {
37716
37717		if ( typeof selector !== 'string' || selector === '' ) {
37718			selector = 'body';
37719		}
37720
37721		if ( !this.isLoaderActive(selector) ) {
37722			return;
37723		}
37724
37725		if ( this.fade ) {
37726			jQuery(selector).children(this.loaderWrapperSelector).fadeOut(this.fadeDuration, function() {
37727				jQuery(this).remove();
37728			});
37729		} else {
37730			jQuery(selector).children(this.loaderWrapperSelector).remove();
37731		}
37732
37733		if ( selector === 'body' ) {
37734			jQuery(selector).removeClass('csloader-active');
37735		}
37736
37737		this.clearTimeouts(selector);
37738	},
37739
37740	clearTimeouts: function (selector) {
37741		CsLoader.loaderTimeouts[selector].map(function (timeoutId) {
37742			clearTimeout(timeoutId);
37743		});
37744		delete CsLoader.loaderTimeouts[selector];
37745	},
37746
37747	changeText: function(text, selector) {
37748		jQuery(selector).children(this.loaderWrapperSelector).find(this.loaderTextSelector).html(text);
37749	},
37750
37751	isLoaderActive: function ( selector ) {
37752		if ( jQuery(selector).children(this.loaderWrapperSelector).length ) {
37753			return true;
37754		}
37755		return false;
37756	},
37757
37758	setLoaderText: {
37759		initial: function (text) {
37760			if ( typeof text === 'string' ) {
37761				CsLoader.loaderLangs.initial = text;
37762			}
37763		},
37764		intermediate: function (text) {
37765			if ( typeof text === 'string' ) {
37766				CsLoader.loaderLangs.intermediate = text;
37767			}
37768		},
37769		final: function (text) {
37770			if ( typeof text === 'string' ) {
37771				CsLoader.loaderLangs.final = text;
37772			}
37773		},
37774	},
37775
37776	setLoaderTimeout: {
37777		initial: function (duration) {
37778			if ( typeof duration === 'number' ) {
37779				CsLoader.loaderTimeoutDurations.initial = duration;
37780			}
37781		},
37782		intermediate: function (duration) {
37783			if ( typeof duration === 'number' ) {
37784				CsLoader.loaderTimeoutDurations.intermediate = duration;
37785			}
37786		},
37787		final: function (duration) {
37788			if ( typeof duration === 'number' ) {
37789				CsLoader.loaderTimeoutDurations.final = duration;
37790			}
37791		},
37792		reload: function (duration) {
37793			if ( typeof duration === 'number' ) {
37794				CsLoader.loaderTimeoutDurations.reload = duration;
37795			}
37796		}
37797	},
37798
37799	toggleFade: function (fade) {
37800		if ( typeof fade === 'boolean' ) {
37801			CsLoader.fade = fade;
37802		}
37803	},
37804
37805	setFadeDuration: function (duration) {
37806		if ( typeof duration === 'number' ) {
37807			CsLoader.fadeDuration = duration;
37808		}
37809	},
37810
37811	toggleReload: function (reload) {
37812		if ( typeof reload === 'boolean' ) {
37813			CsLoader.reload = reload;
37814		}
37815	},
37816
37817	stopAll: function () {
37818		if ( this.fade ) {
37819			jQuery(this.loaderWrapperSelector).fadeOut(this.fadeDuration, function() {
37820				jQuery(this).remove();
37821			});
37822		} else {
37823			jQuery(this.loaderWrapperSelector).remove();
37824		}
37825
37826		Object.keys(this.loaderTimeouts).map(function (selector) {
37827			CsLoader.clearTimeouts(selector);
37828		});
37829	},
37830
37831};
37832
37833function faqTableStructuredData(tableSelector) {
37834	if (!jQuery('.banner_faq_init').length) {
37835		return;
37836	}
37837
37838	// Použi selector ak je zadaný, inak default
37839	const selector = tableSelector || '.banner_faq_content .module_cont';
37840	const faqArray = [];
37841	const tableElem = jQuery(selector).find('tbody');
37842
37843	if (tableElem.length > 0) {
37844		tableElem.each(function (key, table) {
37845			const currentTable = jQuery(table);
37846			currentTable.find('tr').each(function (key, questionElem) {
37847				let question = jQuery(questionElem).find('td:first span').text().trim();
37848				if (question === '') {
37849					question = jQuery(questionElem).find('td:first').text().trim();
37850				}
37851
37852				const prohibited = {
37853					'sk': 'NOŽE',
37854					'cz': 'NOŽE',
37855					'de': 'MESSER',
37856					'at': 'MESSER',
37857					'ro': 'CUȚITE',
37858					'pl': 'NOŻE',
37859					'si': 'NOŽI',
37860					'hu': 'KÉSEK',
37861				};
37862
37863				const prohibitedWord = prohibited[js_get_lang] || prohibited['sk'];
37864				if (question.includes(prohibitedWord)) {
37865					return;
37866				}
37867
37868				let answer = jQuery(questionElem).find('td').last().text().trim();
37869				if (answer === '') {
37870					answer = jQuery(questionElem).find('td').last().find('span').text().trim();
37871				}
37872
37873				if (question !== '' && answer !== '') {
37874					faqArray.push({
37875						'@type': 'Question',
37876						'name': question,
37877						'acceptedAnswer': {
37878							'@type': 'Answer',
37879							'text': answer
37880						}
37881					});
37882				}
37883			});
37884		});
37885
37886		if (faqArray.length > 0) {
37887			const jsonLd = {
37888				"@context": "https://schema.org",
37889				"@type": "FAQPage",
37890				"mainEntity": faqArray
37891			};
37892
37893			const script = document.createElement('script');
37894			script.setAttribute('type', 'application/ld+json');
37895			script.textContent = JSON.stringify(jsonLd);
37896			document.head.appendChild(script);
37897		}
37898	}
37899}
37900
37901function isElementInView(elem) {
37902	var $elem = jQuery(elem);
37903
37904	if ($elem.length > 0) {
37905		var rect = $elem[0].getBoundingClientRect();
37906		return rect.bottom >= 0 && rect.right >= 0 && rect.top <= (window.innerHeight || document.documentElement.clientHeight) && rect.left <= (window.innerWidth || document.documentElement.clientWidth);
37907	}
37908
37909	return false;
37910}
37911
37912function lazyLoadFunction(selector, callback, callbackObject, ...params) {
37913	// Guard
37914	if (typeof callback !== 'function' && (typeof callbackObject === 'undefined' || typeof callbackObject[callback] !== 'function')) {
37915		if (is_cs_user()) {
37916			console.log('Nefunkcne spustenie optimalizovaneho lazyloadu - callback nie je funkcia');
37917		}
37918
37919		return;
37920	}
37921
37922	// Cant watch this element, run callback
37923	if (jQuery(selector).length === 0) {
37924		if (typeof callbackObject !== 'undefined') {
37925			callbackObject[callback](...params);
37926		} else {
37927			callback(...params);
37928		}
37929
37930		if (is_cs_user()) {
37931			console.log('Nefunkčné spustenie optimalizovaného lazyloadu - nepodarilo sa nájsť element');
37932		}
37933
37934		return;
37935	}
37936
37937	// Element is in view, run callback instatly
37938	if (isElementInView(selector)) {
37939		if (typeof callbackObject !== 'undefined') {
37940			callbackObject[callback](...params);
37941		} else {
37942			callback(...params);
37943		}
37944
37945		return;
37946	}
37947
37948	// Element is not in view, run callback after 5 seconds or when user scrolls element into view
37949	if (typeof window.lazyLoadElements === 'undefined') {
37950		window.lazyLoadElements = [];
37951	}
37952
37953	let uniqueId = window.lazyLoadElements.length;
37954	let eventNamespace = 'scroll.lle_' + uniqueId;
37955	let timeout = config('js_CS_Config_lazyLoadFunctions_pagespeed') ? 20000 : 5000;
37956
37957	window.lazyLoadElements.push(selector);
37958	// Load after time spent
37959	setTimeout(function () {
37960		if (typeof window.lazyLoadElements[uniqueId] === 'undefined') {
37961			return;
37962		}
37963
37964		window.lazyLoadElements[uniqueId] = undefined;
37965
37966		if (typeof callbackObject !== 'undefined') {
37967			callbackObject[callback](...params);
37968		} else {
37969			callback(...params);
37970		}
37971
37972		jQuery(window).off('.lle_' + uniqueId);
37973	}, timeout, uniqueId, params, callback, callbackObject);
37974
37975	// Load when user scrolls element into view
37976	jQuery(window).on(eventNamespace, {
37977		uniqueId: uniqueId,
37978		selector: selector,
37979		params: params,
37980		callback: callback,
37981		callbackObject: callbackObject
37982	}, function (ev) {
37983		if (typeof window.lazyLoadElements[ev.data.uniqueId] !== 'string') {
37984			jQuery(window).off('.lle_' + ev.data.uniqueId);
37985			return;
37986		}
37987
37988		if (!isElementInView(ev.data.selector)) {
37989			return;
37990		}
37991
37992		window.lazyLoadElements[ev.data.uniqueId] = null;
37993
37994		if (typeof callbackObject !== 'undefined') {
37995			callbackObject[callback](...params);
37996		} else {
37997			callback(...params);
37998		}
37999
38000		jQuery(window).off('.lle_' + ev.data.uniqueId);
38001	});
38002}
38003
38004function showMessageAfterAddToCart (elem) {
38005	var $elem = jQuery(elem);
38006	if ( $elem.hasClass('vex_product_is_in_spg') && typeof js_Config_show_vex_after_add_to_cart !== 'undefined' && js_Config_show_vex_after_add_to_cart && typeof CsModal !== "undefined" ) {
38007		var modalSettings = JSON.parse(js_Config_show_vex_after_add_to_cart);
38008		var buttons = "<input type=\"button\" class=\"button cs_modal_sec_button\" name=\"submit\" title=\"\" onclick=\"messageModal.close();\" value=" + js_lang_admin_media_cancel + "><input type=\"button\" name=\"login-button\" onclick=\"window.location.href='" + modalSettings.loginLink + "'\" class=\"button\" title=\"\" value=\"" + (typeof js_lang_vex_after_add_to_cart_login !== 'undefined' ? js_lang_vex_after_add_to_cart_login : 'Login') + "\">";
38009		var modalTitle = getLang(modalSettings.title);
38010		var modalContent = getLang(modalSettings.content);
38011
38012		if ( modalTitle == '' ) {
38013			modalTitle = modalSettings.title;
38014		}
38015
38016		if ( modalContent == '' ) {
38017			modalContent = modalSettings.content;
38018		}
38019
38020		messageModal = new CsModal()
38021			.setClassName('type_login_required')
38022			.setType('info')
38023			.setTitle(modalTitle)
38024			.setContent(modalContent)
38025			.setButtons(buttons)
38026			.open();
38027		return false;
38028	}
38029}
38030
38031function bindAutoCouponTooltip() {
38032	var autoAddButton = jQuery('.shop_cart_coupon_form form .tooltip-code-add');
38033	if (typeof js_Config_parser_enabled !== 'undefined' && js_Config_parser_enabled) {
38034		window.addEventListener('DOMContentLoaded', function() {
38035			autoAddButton.on('click', setAutoCoupon);
38036		});
38037	} else {
38038		jQuery(function(){
38039			autoAddButton.on('click', setAutoCoupon);
38040		});
38041	}
38042}
38043
38044function setAutoCoupon(event) {
38045	var autoButton = jQuery(event.target);
38046	var couponForm = autoButton.closest('form');
38047	var couponAutoCode = autoButton.parent().find('.tooltip-code').attr('data-code');
38048
38049	if(typeof couponAutoCode !== 'undefined' && couponAutoCode !== '') {
38050		couponForm.find('input[name=do_coupon]').val('yes');
38051		couponForm.find('input[name=delete_coupon]').val('no');
38052		couponForm.find('input[name=coupon_code]').val(couponAutoCode);
38053		couponForm.find('input[name=unset_autoskip]').val('yes');
38054	}
38055
38056	couponForm.find('input[type=submit]').trigger('click');
38057}
38058
38059/**
38060 * @elem : .cs_rating_wrapper element
38061 * @rating : (Optional) to change rating value
38062 * @rCount : (Optional) to change count number and toggle .is_empty
38063 * @ratingLang : (Optional) to change rating lang value
38064 */
38065function updateRatingElement(elem, rating, rCount, ratingLang) {
38066	let ratingElem = jQuery(elem);
38067
38068	if (typeof ratingElem === 'undefined' || !ratingElem.hasClass('cs_rating_wrapper')) {
38069		return;
38070	}
38071
38072	if (typeof rating !== 'undefined' && !isNaN(rating)) {
38073		let ratingPercentage = Math.floor(rating * 20);
38074		let spaceKoef = 0;
38075
38076		if (ratingPercentage > 80) {
38077			spaceKoef = 4;
38078		} else if (ratingPercentage > 60) {
38079			spaceKoef = 3;
38080		} else if (ratingPercentage > 40) {
38081			spaceKoef = 2;
38082		} else if (ratingPercentage > 10) {
38083			spaceKoef = -4;
38084		}
38085
38086		ratingElem.find('.count .val').text(rating);
38087		ratingElem.find('.rating').attr('style', '--rating:' + ratingPercentage + '%; --space-koef:' + spaceKoef + ';')
38088	}
38089
38090	if (typeof rCount !== 'undefined' && !isNaN(rCount)) {
38091		ratingElem.find('.count .total').text(rCount);
38092
38093		if (rCount > 0) {
38094			ratingElem.removeClass('is_empty');
38095		} else {
38096			ratingElem.addClass('is_empty');
38097		}
38098	}
38099
38100	if (typeof ratingLang !== 'undefined') {
38101		ratingElem.find('.count .count_total').text(ratingLang);
38102	}
38103}
38104
38105function openModalVideo(e, url, title, admin) {
38106	var videoElem = '';
38107	var yUrl = '';
38108	var yTitle = '';
38109
38110	if(typeof admin !== 'undefined' && admin) {
38111		yUrl = "https://www.youtube.com/embed/" +  url;
38112		yTitle = title;
38113	} else {
38114		e.preventDefault();
38115		e.stopPropagation();
38116
38117		videoElem = jQuery(e.target).closest('.product_video').find('a');
38118		yUrl = "https://www.youtube.com/embed/" + videoElem.attr('data-url');
38119		yTitle = videoElem.attr('data-title');
38120	}
38121
38122	var iFrame = '<iframe width="1280" height="720" src="';
38123	iFrame += yUrl;
38124	iFrame += '" title="';
38125	iFrame += '" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>';
38126
38127	new CsModal()
38128		.setClassName('product_video')
38129		.setType('info')
38130		.setTitle(yTitle)
38131		.setContent(iFrame)
38132		.hideCloseButton(true)
38133		.setActionsClassName('vex-dialog-buttons')
38134		.open();
38135}
38136
38137function activeImageFancyHover() {
38138	var $flypageImage = jQuery('.flypage-image a:first');
38139		$flypageImage.data('href', $flypageImage.attr('href'));
38140		$flypageImage.data('src', $flypageImage.children('img:first').attr('src'));
38141		$flypageImage.data('srcset', $flypageImage.children('img:first').attr('srcset'));
38142
38143	jQuery('.product_activeimages_image_div a').on('mouseenter', function () {
38144		var activeImage = jQuery(this);
38145		var dataOptions = $flypageImage.data('options');
38146
38147		if ( activeImage.data('fancybox') ) {
38148
38149			$flypageImage
38150				.attr('href', activeImage.attr('href'))
38151				.data('src', activeImage.attr('href'))
38152				.children('img')
38153				.attr('src', activeImage.attr('href'));
38154
38155			$flypageImage
38156				.data('options')
38157
38158			if ($flypageImage.children('img').attr('srcset') !== 'undefined' && $flypageImage.children('img').attr('srcset') !== false) {
38159				$flypageImage
38160					.attr('href', activeImage.attr('href'))
38161					.children('img')
38162					.attr('srcset', activeImage.attr('href'));
38163			}
38164		}
38165	});
38166
38167	jQuery('.product_activeimages_image_div a').on('mouseleave', function () {
38168		if (jQuery(this).data('fancybox')) {
38169			if ($flypageImage.data('href') && $flypageImage.data('src')) {
38170				$flypageImage
38171					.attr('href', $flypageImage.data('href'))
38172					.children('img')
38173					.attr('src', $flypageImage.data('src'));
38174			}
38175			if ($flypageImage.children('img').attr('srcset') !== 'undefined' && $flypageImage.children('img').attr('srcset') !== false && $flypageImage.data('srcset')) {
38176				$flypageImage
38177					.attr('href', $flypageImage.data('href'))
38178					.children('img')
38179					.attr('srcset', $flypageImage.data('srcset'));
38180			}
38181		}
38182	});
38183}
38184
38185function initSlickSlider(wrap, slide) {
38186	wrap = jQuery(wrap);
38187
38188	if (!wrap.length || wrap.hasClass('slick-initialized') || wrap.find(slide).length < 5) {
38189		return;
38190	}
38191
38192	wrap.slick({
38193		slide: slide,
38194		centerMode: true,
38195		centerPadding: '64px',
38196		slidesToShow: 1,
38197		slidesToScroll: 1,
38198		infinite: true,
38199		dots: true,
38200		variableWidth: false,
38201		draggable: false,
38202		swipeToSlide: false,
38203	});
38204}
38205
38206function bindProductActiveImageSlick() {
38207    jQuery('.cs_product_item .browse_active_images:not(.loaded)').closest('.cs_product_item').on('mouseenter', function () {
38208        var imageWrap = jQuery(this);
38209
38210        if (!imageWrap.hasClass('loaded')) {
38211            imageWrap.find('.browse_active_images').slick({
38212                slide: '.active_image',
38213                centerMode: true,
38214                centerPadding: '64px',
38215                slidesToShow: 1,
38216                slidesToScroll: 1,
38217                infinite: true,
38218                dots: true,
38219                variableWidth: false,
38220                draggable: false,
38221                swipeToSlide: false,
38222            });
38223        }
38224
38225		imageWrap.addClass('loaded');
38226    });
38227}
38228
38229function loadProductTabPage(elem, tabId) {
38230
38231	var element = jQuery(elem);
38232
38233	if ( element.hasClass('tab-loaded') ) {
38234		return;
38235	} else {
38236		// Prevencia duplicitnemu nacitanie pre zmenu sirky (napr. pri otoceni zariadenia)
38237		element
38238			.closest('#tabsContainer')
38239			.find('label[for="' + element.attr('for') + '"]')
38240			.addClass('tab-loaded')
38241			.removeClass('is_empty');
38242	}
38243
38244	var productId = js_product_id;
38245
38246	var params = {
38247		productId 	: productId,
38248		tabId		: tabId,
38249	};
38250
38251	jQuery('label[for="tab' + tabId + '"]').startAjaxLoader(undefined, undefined, undefined, {appendHtml: true});
38252
38253	new AjaxRequest(params)
38254		.setMethod('POST')
38255		.setController('ProductTab')
38256		.setAction('loadProductTab')
38257		.onSuccess(function (res) {
38258			console.log(res);
38259			if ( res.data.tabId !== '' ) {
38260				jQuery('label[for="tab' + tabId + '"]').stopAjaxLoader();
38261			}
38262
38263			if ( res.data.tabId !== '' && res.data.result !== '' ) {
38264				var tabPageId = res.data.tabId;
38265				var tabPageResult = res.data.result;
38266				var insertMode = res.data.insertMode;
38267				var tabPage = jQuery('.tabPages .tabContent#page' + tabPageId);
38268				if ( tabPage.length > 0 && tabPageResult != '' ) {
38269					if ( insertMode === 'append' ) {
38270						tabPage.append(tabPageResult);
38271					} else if ( insertMode === 'prepend' ) {
38272						tabPage.prepend(tabPageResult);
38273					}
38274
38275					if ( typeof afterProductTabLoad === 'function' ) {
38276						afterProductTabLoad(tabPageId);
38277					}
38278
38279				}
38280			}
38281		})
38282		.send();
38283}
38284
38285function afterProductTabLoad ( tabId ) {
38286	if ( typeof tabId === 'undefined' || tabId == '' || typeof js_Config_product_tabs_configuration === 'undefined' ) {
38287		return;
38288	}
38289
38290	var tabSettings = js_Config_product_tabs_configuration;
38291
38292	if ( typeof tabSettings[tabId] !== 'undefined' ) {
38293		var currentTab = tabSettings[tabId];
38294		//CODE TO EXECUTE AFTER PRODUCT TAB LOAD GOES HERE
38295		//currentTab.elements -> elementy v aktualne nacitanom tabe
38296
38297		if (currentTab.elements.includes('Product_Comments')) {
38298			if (typeof CsRating !== 'undefined') {
38299				let setRatings = jQuery('.cs_rating_wrapper.set_rating .rating');
38300				setRatings.each(function(index, elem ) {
38301					new CsRating(elem);
38302				});
38303			}
38304
38305			if (typeof js_Config_comments_use_google_recaptcha !== 'undefined' && js_Config_comments_use_google_recaptcha && typeof js_comments_render_recaptcha === 'function') {
38306				js_comments_render_recaptcha(jQuery('.tabPages .tabContent#page' + tabId));
38307			}
38308		}
38309
38310		if ( typeof after_init_tab === 'function' ) {
38311			//Toto je funkcia ktora sa bude definovat v local.js, nie kazdy shop ju musi mat
38312			after_init_tab(tabId);
38313		}
38314	}
38315}
38316
38317function js_multiselect_click_handle(element) {
38318	$element = jQuery(element);
38319	if ($element.val() == '') {
38320		// nemozeme manualne odselectnut "vsetky"
38321		if (!$element.is(':selected')) {
38322			$element.prop('selected', true);
38323		}
38324		$element.siblings('[selected]').prop('selected', false);
38325	} else {
38326		$element.siblings('[value=""]').prop('selected', false);
38327	}
38328}
38329
38330function quantityUpdate(elem, up) {
38331	var quantityWrap = jQuery(elem).closest('.quantity_wrapper');
38332	var quantityInput = quantityWrap.find('input');
38333	var qVal = quantityInput.val();
38334	var minStep = typeof quantityInput.attr('step') !== 'undefined' ? quantityInput.attr('step') * 1 : 1;
38335
38336	if (up === 1) {
38337		quantityInput.val(parseFloat(qVal) + parseFloat(minStep));
38338	} else if( qVal >= minStep) {
38339		quantityInput.val(parseFloat(qVal) - parseFloat(minStep));
38340	}
38341
38342	quantityInput.trigger('change');
38343}
38344
38345function checkQuantity(elem) {
38346	var quantityInput = jQuery(elem);
38347	var minVal = typeof quantityInput.attr('min') !== 'undefined' ? Number(quantityInput.attr('min')) : undefined;
38348	var maxVal = typeof quantityInput.attr('max') !== 'undefined' ? Number(quantityInput.attr('max')) : undefined;
38349	var val = Number(quantityInput.val());
38350
38351	if(typeof minVal !== 'undefined' && minVal > val) {
38352		quantityInput.val(minVal);
38353	}
38354
38355	if(typeof maxVal !== 'undefined' && maxVal < val) {
38356		quantityInput.val(maxVal);
38357	}
38358}
38359
38360function openReservationModal(elem) {
38361	let element = jQuery(elem);
38362	let productId = element.data('product_id');
38363	let selectedAttribute = '';
38364	if ( typeof element.data('is_attribute') !== 'undefined' && element.data('is_attribute') == 1 ) {
38365		let productAttribute = window[`ProductVariantInstance_${js_product_id}`].selectedAttribute;
38366		if ( typeof productAttribute.prop.CODE !== 'undefined' && productAttribute.prop.CODE !== '' ) {
38367			selectedAttribute = productAttribute.prop.CODE;
38368		}
38369	}
38370
38371	let menuOpen = false;
38372	if ( element.data('menu_open') !== 'undefined' && element.data('menu_open') === 1 ) {
38373		menuOpen = true;
38374	}
38375
38376	let action = typeof js_Config_product_store_reservation !== 'undefined' && typeof js_Config_product_store_reservation.extended !== 'undefined' && js_Config_product_store_reservation.extended ? 'getModalContentExtended' : 'getModalContent';
38377	element.prop('disabled', true);
38378
38379	new AjaxRequest({productId: productId, attribute: selectedAttribute, menuOpen: menuOpen})
38380	.setMethod('POST')
38381	.setController('ProductStoreReservation')
38382	.setAction(action)
38383	.onSuccess(function (response) {
38384		if ( response.data.success === false && response.data.addFailed === true ) {
38385			new CsModal()
38386			.setClassName('product_reservation_error')
38387			.setType('info')
38388			.setTitle('')
38389			.setContent(response.data.info_message)
38390			.open();
38391
38392			let reservationButton = jQuery('.button.prod_reservation');
38393			if ( reservationButton.length > 0 ) {
38394				reservationButton.hide();
38395			}
38396
38397			if ( typeof response.data.attribute !== 'undefined' && response.data.attribute != '' && typeof reservationAttributes !== 'undefined' && Object.keys(reservationAttributes).includes(response.data.attribute) ) {
38398				reservationAttributes[response.data.attribute] = false;
38399			}
38400		} else if (response.data.success === true) {
38401			var title = response.data.modalTitle;
38402			var content = response.data.modalContent;
38403
38404			if ( typeof response.data.reservationAttributes != 'undefined' && response.data.reservationAttributes != '' ) {
38405				reservationAttributes = response.data.reservationAttributes;
38406			}
38407
38408			let reservationCookie = jQuery.cookie('product_reservation_filled');
38409			if (reservationCookie == null) {
38410				jQuery.cookie('product_reservation_filled', '1', {path: '/'});
38411				toggleProductReservationButton();
38412			} else {
38413				updateReservationCount();
38414			}
38415
38416			reservationModal = new CsModal()
38417			.setClassName('product_reservation')
38418			.setType('info')
38419			.setTitle((typeof title != 'undefined' && title != '') ? title : '')
38420			.setContent(content)
38421			.hideCloseButton(false)
38422			.setButtons("<input type=\"button\" name=\"reservation-confirm\" class=\"button\" title=\"\" value=\"" + response.data.modalButtonConfirm + "\"><input type=\"button change_my_store\" name=\"change_my_store\" class=\"button\" title=\"\" value=\"" + response.data.modalButtonContinue + "\"><div class=\"reservation_with_payment_obligation\">" + response.data.paymentObligationText + "</div>")
38423			.afterClose(function() {
38424				let reservationButton = jQuery('.button.prod_reservation');
38425				if ( reservationButton.length > 0 ) {
38426					reservationButton.prop('disabled', false);
38427				}
38428			})
38429			.afterOpen(function() {
38430				var quantityWrapper = jQuery('.reservation_quantity_wrapper .quantity_wrapper');
38431				var storeSelect = jQuery('.product_reservation_modal .store_select_wrap select');
38432
38433				let fakeStoreSelect = jQuery('.attr_group_custom_select_div_wrap.attr_group');
38434				if (fakeStoreSelect.length > 0) {
38435					let fakeStoreSelect = jQuery('.attr_group_custom_select_div_wrap.attr_group');
38436					let fakeInputBox = fakeStoreSelect.find('.inputbox.store_custom_select');
38437					let fakeOptions = fakeStoreSelect.find('.stores .custom_select_item');
38438
38439					fakeInputBox.on('click', function() {
38440						let elem = jQuery(this);
38441						elem.toggleClass('open');
38442						let options = elem.parent().find('.stores');
38443						if (options.length > 0) {
38444							//"Rozbalime" fake select
38445							options.toggle();
38446						}
38447					});
38448
38449					fakeOptions.on('click', function() {
38450						let elem = jQuery(this);
38451						let fakeSelectedStoreId = elem.data('value');
38452
38453						//Prepiseme zvolenu hodnotu selectu
38454						let inputBox = elem.parents('.attr_group').find('.inputbox.store_custom_select');
38455						if (inputBox.length > 0) {
38456							let inputBoxName = inputBox.find('.product_reservation_store_name');
38457							let inputBoxAvail = inputBox.find('.product_reservation_store_availability');
38458							if (inputBoxName.length > 0) {
38459								inputBoxName.text(elem.data('name'));
38460							}
38461							if (inputBoxAvail.length > 0) {
38462								if (fakeSelectedStoreId == '') {
38463									inputBoxAvail.text('');
38464								} else if (fakeSelectedStoreId != '') {
38465									inputBoxAvail.text('V predajni');
38466								}
38467							}
38468							inputBox.toggleClass('open');
38469						}
38470
38471						//Skryjeme rozbaleny fakeSelect
38472						let optionsWrap = elem.parent();
38473						if (optionsWrap.length > 0) {
38474							optionsWrap.toggle();
38475						}
38476
38477						//Odstranime aktualne active
38478						let options = elem.siblings();
38479						if (options.length > 0) {
38480							options.removeClass('active');
38481						}
38482
38483						//Nastavime nove active
38484						elem.addClass('active');
38485
38486						//Zmenime pôvodný select
38487						if (fakeSelectedStoreId != '') {
38488							storeSelect.val(fakeSelectedStoreId);
38489						} else {
38490							storeSelect.val('0');
38491						}
38492
38493						//Triggerneme change na select a tým sa vykonajú aj nabidnované funkcionality
38494						storeSelect.trigger('change');
38495					});
38496				}
38497
38498				jQuery('.product_reservation .reservation_customer_info input[name="name"]').on('blur', function() {
38499					var $this = jQuery(this);
38500					var inputValue = $this.val();
38501
38502					if ( typeof inputValue == 'undefined' || inputValue == '' || inputValue.replace(/\s/g, "").length <= 2 || /^[a-žA-Ž ]+$/.test(inputValue) === false ) {
38503						$this.addClass('error');
38504						$this.removeClass('valid');
38505					} else {
38506						$this.addClass('valid');
38507						$this.removeClass('error');
38508					}
38509				});
38510
38511				jQuery('.product_reservation .reservation_customer_info input[name="name"],[name="surname"]').on('blur', function() {
38512					var $this = jQuery(this);
38513					var inputValue = $this.val();
38514
38515					if ( typeof inputValue == 'undefined' || inputValue == '' || inputValue.replace(/\s/g, "").length <= 2 || /^[a-žA-Ž ]+$/.test(inputValue) === false ) {
38516						$this.addClass('error');
38517						$this.removeClass('valid');
38518					} else {
38519						$this.addClass('valid');
38520						$this.removeClass('error');
38521					}
38522				});
38523
38524				jQuery('.product_reservation .reservation_customer_info input[name="email"]').on('blur', function() {
38525					var $this = jQuery(this);
38526					var inputValue = $this.val();
38527
38528					if ( typeof inputValue == 'undefined' || inputValue == '' || /\S+@\S+\.\S+/.test(inputValue) === false ) {
38529						$this.addClass('error');
38530						$this.removeClass('valid');
38531					} else {
38532						$this.addClass('valid');
38533						$this.removeClass('error');
38534					}
38535				});
38536
38537				jQuery('.product_reservation .reservation_customer_info input[name="phone"]').on('blur', function() {
38538					var $this = jQuery(this);
38539					var inputValue = $this.val();
38540
38541					if ( typeof inputValue == 'undefined' || inputValue == '' || inputValue.replace(/\s/g, "").length < 9 || inputValue.replace(/\s/g, "").length > 13 || /\d/g.test(inputValue.replace(/\s/g, "")) === false ) {
38542						$this.addClass('error');
38543						$this.removeClass('valid');
38544					} else {
38545						$this.addClass('valid');
38546						$this.removeClass('error');
38547					}
38548				});
38549
38550				var submitButton = jQuery('.product_reservation input[name="reservation-confirm"]');
38551				submitButton.on('click', function () {
38552					var $this = jQuery(this);
38553					$this.prop('disabled', true);
38554					showLoader();
38555					var result = true;
38556					var parentElement 	= $this.parents('.product_reservation');
38557					var customerInfo 	= parentElement.find('.reservation_customer_info');
38558					var selectedStore 	= parentElement.find('.store_select').val();
38559					var quantity 		= parentElement.find('.quantity_wrapper input').val();
38560					var name 			= customerInfo.find('input[name="name"]').val();
38561					var surname 		= customerInfo.find('input[name="surname"]').val();
38562					var email 			= customerInfo.find('input[name="email"]').val();
38563					var phone 			= customerInfo.find('input[name="phone"]').val();
38564					var comment 		= customerInfo.find('textarea[name="comment"]').val();
38565					var productId 		= parentElement.find('.reservation_product_id').val();
38566					var attribute 		= parentElement.find('.reservation_attribute').val();
38567
38568					var errors = {
38569						'name': false,
38570						'surname': false,
38571						'email': false,
38572						'phone': false,
38573						'store': false,
38574						'quantity': false,
38575						'product' : false,
38576					};
38577
38578					if ( (typeof productId == 'undefined' || productId == '' || productId == '0') && (typeof js_Config_product_store_reservation.extended === 'undefined' || js_Config_product_store_reservation.extended !== true) ) {
38579						errors.product = true;
38580					}
38581
38582					if ( typeof selectedStore == 'undefined' || selectedStore == '' || selectedStore == '0' ) {
38583						errors.store = true;
38584						parentElement.find('.store_select').addClass('error');
38585						parentElement.find('.inputbox.store_custom_select').addClass('error');
38586					}
38587
38588					if ( typeof quantity == 'undefined' || quantity == '' || quantity == 0 ) {
38589						errors.quantity = true;
38590					}
38591
38592					if ( (typeof name == 'undefined' || name == '' || name.replace(/\s/g, "").length <= 2 || /^[a-žA-Ž ]+$/.test(name) === false) && (typeof js_Config_product_store_reservation.extended === 'undefined' || js_Config_product_store_reservation.extended !== true) ) {
38593						errors.name = true;
38594						customerInfo.find('input[name="name"]').addClass('error');
38595					}
38596
38597					if ( (typeof surname == 'undefined' || surname == '' || surname.replace(/\s/g, "").length <= 2 || /^[a-žA-Ž ]+$/.test(surname) === false) && (typeof js_Config_product_store_reservation.extended === 'undefined' || js_Config_product_store_reservation.extended !== true) ) {
38598						errors.surname = true;
38599						customerInfo.find('input[name="surname"]').addClass('error');
38600					}
38601
38602					if ( (typeof email == 'undefined' || email == '' || /\S+@\S+\.\S+/.test(email) === false) && (typeof js_Config_product_store_reservation.extended === 'undefined' || js_Config_product_store_reservation.extended !== true) ) {
38603						errors.email = true;
38604						customerInfo.find('input[name="email"]').addClass('error');
38605					}
38606
38607					if ( (typeof phone == 'undefined' || phone == '' || phone.replace(/\s/g, "").length < 9 || phone.replace(/\s/g, "").length > 13 || /\d/g.test(phone.replace(/\s/g, "")) === false) && (typeof js_Config_product_store_reservation.extended === 'undefined' || js_Config_product_store_reservation.extended !== true) ) {
38608						errors.phone = true;
38609						customerInfo.find('input[name="phone"]').addClass('error');
38610					}
38611
38612
38613					Object.values(errors).forEach(function (error) {
38614						if ( error === true) {
38615							result = false;
38616						}
38617					});
38618
38619					if ( result === true && typeof js_Config_product_store_reservation.extended !== 'undefined' && js_Config_product_store_reservation.extended === true ) {
38620
38621						//Kontaktne udaje zakaznika vypnute, kedze su tu zbytocne
38622						/* var controllerData = {
38623							'first_name'	: name,
38624							'last_name'		: surname,
38625							'email'			: email,
38626							'phone_1'		: phone,
38627						}; */
38628
38629						let setDefaultStoreCbx = jQuery('.product_reservation_modal #set_as_my_store_cbx');
38630						let setDefaultStore = false;
38631						if ( setDefaultStoreCbx.length > 0 ) {
38632							setDefaultStore = setDefaultStoreCbx.is(':checked');
38633						}
38634
38635						new AjaxRequest()
38636						.setMethod('POST')
38637						.setController('ProductStoreReservation')
38638						.setAction('checkCartItems')
38639						.onSuccess(function (response) {
38640							if (response.data.success === true && response.data.cartEmpty == true) {
38641								new AjaxRequest({data: {'selectedStore': selectedStore, 'setDefaultStore': setDefaultStore}})
38642								.setMethod('POST')
38643								.setController('ProductStoreReservation')
38644								.setAction('fillCartReservation')
38645								.onSuccess(function (response) {
38646									if (response.data.success === true && response.data.checkout_redirect_url != '' ) {
38647
38648										if ( typeof response.data.checkout_form_data !== 'undefined' && response.data.checkout_form_data != '' ) {
38649											let checkoutFormData = response.data.checkout_form_data;
38650											let currentFormData = jQuery.cookie('checkout_form_data');
38651
38652											if ( currentFormData !== null ) {
38653												currentFormData = JSON.parse(currentFormData);
38654												checkoutFormData = Object.assign(currentFormData, checkoutFormData);
38655											}
38656
38657											jQuery.cookie('checkout_form_data', JSON.stringify(checkoutFormData), {path: '/'});
38658											jQuery.cookie('product_reservation_active', 1, {path: '/'});
38659										}
38660
38661										window.location.replace(response.data.checkout_redirect_url);
38662									}
38663								})
38664								.send();
38665							} else {
38666								cartReservationModalConfirm = new CsModal()
38667								.setClassName('cart_reservation_fill_confirm')
38668								.setType('info')
38669								.setTitle('')
38670								.setContent(js_lang_checkout_product_reservation.fillModalMessage)
38671								.hideCloseButton(true)
38672								.setButtons("<input type=\"button\" name=\"reservation-fill-confirm\" class=\"button\" title=\"\" value=\"" + js_lang_checkout_product_reservation.confirm + "\"><input type=\"button\" name=\"reservatil-fill-cancel\" onclick=\"cartReservationModalConfirm.close();\" class=\"button\" title=\"\" value=\"" + js_lang_checkout_product_reservation.cancel + "\">")
38673								.afterOpen(function() {
38674									let reservationFillModal = jQuery('.cart_reservation_fill_confirm');
38675									if (reservationFillModal.length > 0) {
38676										let fillConfirmButton = reservationFillModal.find('input[name="reservation-fill-confirm"]');
38677										if (fillConfirmButton.length > 0) {
38678											fillConfirmButton.on('click', function() {
38679												if (typeof selectedStore !== 'undefined' && typeof setDefaultStore !== 'undefined') {
38680													new AjaxRequest({data: {'selectedStore': selectedStore, 'setDefaultStore': setDefaultStore}})
38681													.setMethod('POST')
38682													.setController('ProductStoreReservation')
38683													.setAction('fillCartReservation')
38684													.onSuccess(function (response) {
38685														if (response.data.success === true && response.data.checkout_redirect_url != '' ) {
38686
38687															if ( typeof response.data.checkout_form_data !== 'undefined' && response.data.checkout_form_data != '' ) {
38688																let checkoutFormData = response.data.checkout_form_data;
38689																let currentFormData = jQuery.cookie('checkout_form_data');
38690
38691																if ( currentFormData !== null ) {
38692																	currentFormData = JSON.parse(currentFormData);
38693																	checkoutFormData = Object.assign(currentFormData, checkoutFormData);
38694																}
38695
38696																jQuery.cookie('checkout_form_data', JSON.stringify(checkoutFormData), {path: '/'});
38697																jQuery.cookie('product_reservation_active', 1, {path: '/'});
38698															}
38699
38700															window.location.replace(response.data.checkout_redirect_url);
38701														}
38702													})
38703													.send();
38704												} else {
38705													console.log('Variables are not defined');
38706												}
38707											});
38708										}
38709									}
38710								})
38711								.open();
38712							}
38713						})
38714						.send();
38715					}
38716
38717					if ( result === true && (typeof js_Config_product_store_reservation.extended === 'undefined' || js_Config_product_store_reservation.extended !== true ) ) {
38718
38719						var controllerData = {
38720							'store'		: selectedStore,
38721							'quantity'	: quantity,
38722							'name'		: name,
38723							'surname'	: surname,
38724							'email'		: email,
38725							'phone'		: phone,
38726							'comment'	: comment,
38727							'product'	: productId,
38728						};
38729
38730						if ( typeof attribute !== 'undefined' && attribute != '' ) {
38731							controllerData.attribute = attribute;
38732						}
38733
38734						new AjaxRequest({data: controllerData,})
38735						.setMethod('POST')
38736						.setController('ProductStoreReservation')
38737						.setAction('processReservation')
38738						.onSuccess(function (response) {
38739							if (response.data.success === true) {
38740								if ( typeof reservationModal === 'undefined' ) {
38741									hideLoader();
38742									return;
38743								}
38744
38745								var newContent = response.data.modalUpdate.content;
38746								var newButton  =  response.data.modalUpdate.button;
38747
38748								//var reservationNumber = response.data.reservationNumber;
38749								reservationModal.setContent(newContent);
38750								var button = jQuery('.product_reservation .vex-dialog-buttons input');
38751								if ( button.length > 0 ) {
38752									button.replaceWith(newButton);
38753								}
38754								hideLoader();
38755							} else {
38756								jQuery('.product_reservation input[name="reservation-confirm"]').prop('disabled', false);
38757								hideLoader();
38758							}
38759						}).send();
38760					} else {
38761						$this.prop('disabled', false);
38762						hideLoader();
38763					}
38764				});
38765
38766				let changeStoreButton = jQuery('.product_reservation input[name="change_my_store"]');
38767				if ( changeStoreButton.length > 0 ) {
38768					changeStoreButton.on('click', function () {
38769						let button = jQuery(this);
38770						button.prop('disabled', true);
38771						let storeSelect = jQuery('.product_reservation_modal .store_select_wrap select');
38772						if ( storeSelect.length > 0 ) {
38773							var selectedStore = storeSelect.val();
38774						}
38775
38776						if ( typeof selectedStore === 'undefined' || selectedStore == '' || selectedStore == '0' ) {
38777							reservationModal.close();
38778							return;
38779						}
38780
38781						let preventStoreUpdate = jQuery('.product_reservation_modal #my_store_active');
38782						preventStoreUpdate = preventStoreUpdate.length > 0 && preventStoreUpdate.val() == 1;
38783
38784						let setDefaultStoreCbx = jQuery('.product_reservation_modal #set_as_my_store_cbx');
38785						var setDefaultStore = false;
38786						if ( setDefaultStoreCbx.length > 0 ) {
38787							setDefaultStore = setDefaultStoreCbx.is(':checked');
38788							let storeTooltip = jQuery('.store_reservation span.my_store.tooltipstered');
38789							if ( setDefaultStore === true && storeTooltip.length > 0 ) {
38790								storeTooltip.tooltipster('destroy');
38791							}
38792						}
38793
38794						if ( preventStoreUpdate === false || setDefaultStore === true ) {
38795							new AjaxRequest({'storeId': selectedStore, 'myStore': setDefaultStore})
38796							.setMethod('POST')
38797							.setController('ProductStoreReservation')
38798							.setAction('updateStore')
38799							.onSuccess(function (response) {
38800								if ( response.data.success === true ) {
38801									reservationModal.close();
38802									if (typeof setDefaultStore !== 'undefined' && setDefaultStore === true && jQuery('body').hasClass('shop_page_class_shop_browse')) {
38803										js_reload_current_page();
38804									} else if (typeof setDefaultStore !== 'undefined' && setDefaultStore === true && jQuery('body').hasClass('shop_page_class_shop_product_details')) {
38805										let availabilityWrapper = jQuery('.product_store_availability_wrapper');
38806										if (availabilityWrapper.length > 0) {
38807											detailActiveStoreIcon = availabilityWrapper.find('.active_store_icon');
38808											if (detailActiveStoreIcon.length > 0) {
38809												detailActiveStoreIcon.remove();
38810											}
38811											newDetailActive = availabilityWrapper.find('div[data-store-id="' + selectedStore + '"]');
38812											if (newDetailActive.length > 0) {
38813												newDetailActive.find('.store_title').find('span').after('<span class="active_store_icon"></span>');
38814											}
38815										}
38816									}
38817								} else {
38818									let changeStoreButton = jQuery('.product_reservation input[name="change_my_store"]');
38819									if ( changeStoreButton.length > 0 ) {
38820										changeStoreButton.prop('disabled', false);
38821									}
38822								}
38823							}).send();
38824						} else {
38825							reservationModal.close();
38826						}
38827					});
38828				}
38829
38830				var totalMaximumQuantity = 0;
38831				storeSelect.find('option').each(function () {
38832					var storeMaximum = jQuery(this).data('quantity');
38833					if ( typeof storeMaximum === 'object' ) {
38834						Object.values(storeMaximum).forEach( function (quantity) {
38835							if ( quantity > totalMaximumQuantity ) {
38836								totalMaximumQuantity = quantity;
38837							}
38838						});
38839					} else if ( typeof storeMaximum !== 'undefined' && storeMaximum > totalMaximumQuantity ) {
38840						totalMaximumQuantity = storeMaximum;
38841					}
38842				});
38843
38844				var quantityInput = quantityWrapper.find('input');
38845				if ( typeof quantityInput.data('forced_quantity') === 'undefined' ) {
38846					quantityInput.data('forced_quantity', 1);
38847				}
38848
38849				if ( typeof totalMaximumQuantity !== 'undefined' ) {
38850					quantityInput.data('maximum_quantity', totalMaximumQuantity);
38851					storeSelect.find('option[value="0"]').data('quantity', totalMaximumQuantity);
38852				}
38853
38854				quantityInput.on('change', function (evt) {
38855					let element = jQuery(this);
38856
38857					if ( typeof evt.isTrigger === 'undefined' || element.prop('disabled') == true ) {
38858						return;
38859					}
38860
38861					/* let priceWrapper =  element.parents('.reservation_snapshot').find('.price_wrapper');
38862					let unitPrice = priceWrapper.find('.price_per_unit').data('unit_price').replace(',', '.');
38863					if ( typeof unitPrice !== 'undefined' ) {
38864						let newPrice = element.val() * unitPrice;
38865						priceWrapper.find('.total_price').html('<b>' + csFormatPrice(newPrice) + '</b>');
38866					} */
38867
38868					let totalPrice = element.parents('.product_reservation_modal').find('.reservation_total .total_price');
38869					if ( totalPrice.length > 0 ) {
38870						let reservationTotal = 0;
38871						jQuery('.reservation_snapshot').each(function(){
38872							let elem = jQuery(this);
38873							let unit_price = elem.find('.price_per_unit').data('unit_price');
38874							let quantity = elem.find('.quantity_wrapper').find('input').val();
38875							reservationTotal += parseFloat(unit_price.replace(',','.')) * quantity;
38876						});
38877						totalPrice.html('<b>' + reservationTotal.toFixed(shop_currency_info[shop_vendor_currency_code].DECIMALS).replace('.',',') + ' ' + shop_currency_info[shop_vendor_currency_code].SYMBOL + ' ' + cms_js_lang_product_form_price_gross_label + '</b>');
38878					}
38879
38880					let productId = element.parents('.reservation_quantity_wrapper').data('prod_id');
38881					let productAttribute = element.parents('.reservation_quantity_wrapper').data('prod_attr_code');
38882
38883					if ( typeof productId !== 'undefined' && productId != '' ) {
38884						let quantityData = {
38885							productId: productId,
38886							attribute: (typeof productAttribute !== 'undefined' && productAttribute != '' ? productAttribute : ''),
38887							quantity: element.val(),
38888						};
38889
38890						element.prop('disabled', true);
38891
38892						new AjaxRequest(quantityData)
38893							.setMethod('POST')
38894							.setController('ProductStoreReservation')
38895							.setAction('updateQuantity')
38896							.onSuccess(function (response) {
38897								element.prop('disabled', false);
38898								updateReservationCount();
38899							}).send();
38900					}
38901				});
38902
38903				//Bindovanie odstranenia produktu z rezervacie
38904				let removeButtons = jQuery('.product_reservation .remove_product span[name="delete"]');
38905				removeButtons.on('click', function () {
38906					let element = jQuery(this);
38907					let productId = element.parent().siblings('.reservation_quantity_wrapper').data('prod_id');
38908
38909					if ( typeof productId !== 'undefined' && productId != '' ) {
38910						let removeProductOptions = {
38911							productId: productId,
38912						};
38913
38914						let attrCode = element.parent().siblings('.reservation_quantity_wrapper').data('prod_attr_code');
38915						if ( typeof attrCode !== 'undefined' && attrCode != '' ) {
38916							removeProductOptions.attribute = attrCode;
38917						}
38918
38919						new AjaxRequest(removeProductOptions)
38920							.setMethod('POST')
38921							.setController('ProductStoreReservation')
38922							.setAction('removeProduct')
38923							.onSuccess(function (response) {
38924								if ( response.data.success === true && response.data.product_id != '' ) {
38925
38926									if ( response.data.reservation_empty === true ) {
38927										let reservationCookie = jQuery.cookie('product_reservation_filled');
38928										if (reservationCookie != null) {
38929											Cookies.remove('product_reservation_filled');
38930											toggleProductReservationButton();
38931										} else {
38932											updateReservationCount();
38933										}
38934										reservationModal.close();
38935										return;
38936									} else {
38937										updateReservationCount();
38938									}
38939
38940									if ( typeof response.data.reservationAttributes != 'undefined' && response.data.reservationAttributes != '' && typeof js_product_id != 'undefined' && js_product_id == response.data.product_id ) {
38941										reservationAttributes = response.data.reservationAttributes;
38942									}
38943
38944									if ( typeof response.data.updated_stores === 'object' && Object.keys(response.data.updated_stores).length > 0 ) {
38945										let storeSelect = jQuery('.product_reservation_modal .store_select_wrap select');
38946										let storeOptions = storeSelect.find('option:not(:first)');
38947										storeOptions.remove();
38948										let newOptions = '';
38949										Object.entries(response.data.updated_stores).forEach( entry => {
38950											let newStore = entry[1];
38951											newOptions += '<option value="' + newStore.store_id + '" data-quantity="' + newStore.quantity + '"' + (typeof newStore.selected !== 'undefined' && newStore.selected === true ? ' selected' : '') + '>' + newStore.store + '</option>';
38952										});
38953
38954										storeSelect.append(newOptions);
38955										storeSelect.trigger('change');
38956									}
38957
38958									if ( typeof response.data.store_json !== 'undefined' && response.data.store_json != '' ) {
38959										storeReservationJson = JSON.parse(response.data.store_json);
38960									}
38961
38962									let isAttribute = typeof response.data.attribute !== 'undefined' && response.data.attribute != '' ? true : false;
38963									let productElement = jQuery('.product_reservation_modal .reservation_quantity_wrapper.prod_id_' + response.data.product_id + ( isAttribute === true ? '[data-prod_attr_code="' + response.data.attribute + '"]' : ''));
38964									if ( productElement.length > 0 ) {
38965										productElement = productElement.parents('.reservation_snapshot');
38966										if ( productElement.length > 0 ) {
38967											productElement.slideUp(150, function () {
38968												this.remove();
38969
38970												let totalPrice = jQuery('.product_reservation_modal .reservation_total .total_price');
38971												if ( totalPrice.length > 0 ) {
38972													let reservationTotal = 0;
38973													jQuery('.reservation_snapshot').each(function(){
38974														let elem = jQuery(this);
38975														let unit_price = elem.find('.price_per_unit').data('unit_price');
38976														let quantity = elem.find('.quantity_wrapper').find('input').val();
38977														reservationTotal += parseFloat(unit_price.replace(',','.')) * quantity;
38978													});
38979													totalPrice.html('<b>' + reservationTotal.toFixed(shop_currency_info[shop_vendor_currency_code].DECIMALS).replace('.',',') + ' ' + shop_currency_info[shop_vendor_currency_code].SYMBOL + '</b>');
38980												}
38981
38982												let reservationPrices = jQuery('.product_reservation_modal .reservation_snapshot .price_per_unit');
38983												if (reservationPrices.length > 0) {
38984													let hidePriceInfo = true;
38985
38986													reservationPrices.each(function() {
38987														if (jQuery(this).css('display') != 'none') {
38988															hidePriceInfo = false;
38989															return false;
38990														}
38991													});
38992
38993													if (hidePriceInfo === true) {
38994														let priceInfo = jQuery('.product_reservation_modal .reservation_discounted_price_info');
38995														if (priceInfo.length > 0) {
38996															priceInfo.hide();
38997														}
38998													}
38999												}
39000											});
39001										}
39002									}
39003								}
39004							}).send();
39005					}
39006				});
39007
39008				if ( storeSelect.length > 0 ) {
39009					storeSelect.on('change', function(){
39010						var element = jQuery(this);
39011						var selected = element.find('option:selected');
39012
39013						if ( selected.length == 0 ) {
39014							return;
39015						}
39016						var maximumQuantity = selected.data('quantity');
39017
39018						if ( typeof maximumQuantity === 'object' ) {
39019							Object.entries(maximumQuantity).forEach( entry => {
39020								let productId = entry[0];
39021								let quantity = entry[1];
39022								let quantityInput = element.parents('.product_reservation_modal').find('.reservation_quantity_wrapper[data-prod_attr_code="' + productId + '"] input'); //Najskor hladaj variant
39023
39024								if ( quantityInput.length == 0 ) {
39025									quantityInput = element.parents('.product_reservation_modal').find('.reservation_quantity_wrapper.prod_id_' + productId + ' input');//Ak sa nenajde variant tak podla prod_id
39026								}
39027
39028								if ( quantityInput.length > 0 ) {
39029									quantityInput.data('maximum_quantity', quantity);
39030									if ( parseInt(quantityInput.val()) > parseInt(quantity) ) {
39031										quantityInput.trigger('blur');
39032									}
39033								}
39034							});
39035						} else {
39036							let quantityInput = element.parents('.product_reservation_modal').find('.quantity_wrapper input');
39037
39038							if ( quantityInput.length == 0 ) {
39039								return;
39040							}
39041
39042							quantityInput.data('maximum_quantity', maximumQuantity);
39043							quantityInput.trigger('blur');
39044						}
39045
39046						//Tu konci zmena quantity a zacina info o predajni
39047						var storeId = selected.val();
39048						if ( typeof storeReservationJson !== 'undefined' && typeof storeReservationJson[storeId] !== 'undefined' ) {
39049							element.removeClass('error');
39050							let temFakeSelect = element.siblings('.attr_group_custom_select_div_wrap.attr_group');
39051							if (temFakeSelect.length > 0) {
39052								temFakeSelect.find('.inputbox.store_custom_select').removeClass('error');
39053							}
39054							var storeInfo = element.parents('.store_select_wrap').find('.selected_store_info');
39055							storeInfo.find('.address').html(storeReservationJson[storeId].street + ', ' + storeReservationJson[storeId].city);
39056							let hoursHtml = '';
39057							if ( typeof storeReservationJson[storeId].hours !== 'undefined' && storeReservationJson[storeId].hours != '' ) {
39058								let openingHours = storeReservationJson[storeId].hours;
39059								Object.entries(openingHours).forEach( entry => {
39060									hoursHtml += '<div class="hours_row">' + entry[0] + ': ' + entry[1] + '</div>';
39061								});
39062							}
39063
39064							storeInfo.find('.phone_contact').html(storeReservationJson[storeId].phone);
39065							storeInfo.find('.email_contact').html(storeReservationJson[storeId].mail);
39066							storeInfo.find('.opening_hours').html(hoursHtml);
39067							storeInfo.show();
39068
39069							let preventStoreUpdate = jQuery('.product_reservation_modal #my_store_active');
39070							if ( typeof preventStoreUpdate == 'undefined' || preventStoreUpdate.length == 0 || preventStoreUpdate.val() != 1 ) {
39071								new AjaxRequest({'storeId': storeId})
39072								.setMethod('POST')
39073								.setController('ProductStoreReservation')
39074								.setAction('updateStore')
39075								.send();
39076							}
39077						} else {
39078							element.parents('.store_select_wrap').find('.selected_store_info').hide();
39079						}
39080					});
39081				}
39082				storeSelect.trigger('change');
39083			})
39084			.setActionsClassName('vex-dialog-buttons')
39085			.open();
39086		}
39087	}).send();
39088}
39089
39090function updateReservationCount() {
39091	let reservationCookie = jQuery.cookie('product_reservation_filled');
39092	if (reservationCookie == null) {
39093		return;
39094	}
39095
39096	new AjaxRequest()
39097	.setMethod('POST')
39098	.setController('ProductStoreReservation')
39099	.setAction('getProductCount')
39100	.onSuccess(function (response) {
39101		let reservationcountElem = jQuery(".store_reservation span.prod_reservation .count");
39102		if (response.data.success === true && typeof response.data.count !== 'undefined' && reservationcountElem.length > 0) {
39103			reservationcountElem.text(response.data.count > 0 ? response.data.count : '');
39104		} else if (reservationcountElem.length > 0) {
39105			reservationcountElem.text('');
39106		}
39107	}).send();
39108}
39109
39110function resetReservationFilter() {
39111	let sphfResetButton = jQuery('.fp_active_reset');
39112	if (sphfResetButton.length > 0) {
39113		sphfResetButton.trigger('click');
39114	}
39115}
39116
39117function toggleProductReservationButton() {
39118	let reservationButton = jQuery(".store_reservation span.prod_reservation");
39119	if (reservationButton.length == 0) {
39120		return;
39121	}
39122
39123	let reservationCookie = jQuery.cookie('product_reservation_filled');
39124	if (reservationCookie == null || reservationCookie != 1) {
39125		reservationButton.hide();
39126		return;
39127	}
39128
39129	updateReservationCount();
39130
39131	reservationButton.show();
39132	return;
39133}
39134
39135function openMyStoreTooltip(element){
39136	let elem = jQuery(element);
39137
39138	if ( elem.hasClass('tooltipstered') ) {
39139		return false;
39140	}
39141
39142	elem.prop('disabled', true);
39143
39144	new AjaxRequest()
39145		.setMethod('POST')
39146		.setController('ProductStoreReservation')
39147		.setAction('getTooltipContent')
39148		.onSuccess(function (response) {
39149			if ( response.data.success === true ) {
39150				elem.tooltipster({
39151					theme        	: "cs_tooltipster_grey_theme store-tooltip",
39152					contentAsHTML	: true,
39153					position	 	: 'bottom',
39154					content      	: response.data.tooltipContent,
39155					interactive		: true,
39156				}).tooltipster('open');
39157				elem.prop('disabled', false);
39158			}
39159		}).send();
39160}
39161
39162function resetMyStore(){
39163	let button = jQuery(this);
39164	if ( button.length > 0 ) {
39165		button.prop('disabed', true);
39166	}
39167
39168	new AjaxRequest()
39169	.setMethod('POST')
39170	.setController('ProductStoreReservation')
39171	.setAction('cancelSelectedStore')
39172	.onSuccess(function (response) {
39173		if ( response.data.success === true ) {
39174			if (jQuery('body').hasClass('shop_page_class_shop_browse')) {
39175				//Ak sme v kategorii tak klikneme na reset filtra
39176				if (typeof js_Config_product_store_reservation.my_store !== 'undefined' && js_Config_product_store_reservation.my_store === true) {
39177					js_Config_product_store_reservation.my_store = false;
39178				}
39179				resetReservationFilter();
39180			} else if (jQuery('body').hasClass('shop_page_class_shop_product_details')) {
39181				//Ak sme v detaile tak odstranime ikonku domceku
39182				let availabilityWrapper = jQuery('.product_store_availability_wrapper');
39183				if (availabilityWrapper.length > 0) {
39184					detailActiveStoreIcon = availabilityWrapper.find('.active_store_icon');
39185					if (detailActiveStoreIcon.length > 0) {
39186						detailActiveStoreIcon.remove();
39187					}
39188				}
39189			}
39190
39191			jQuery('.store_reservation span.my_store.tooltipstered').tooltipster('destroy');
39192		}
39193	}).send();
39194}
39195
39196function myStoreDisableStoreFilter() {
39197	if (typeof sphf !== 'undefined') {
39198		sphf.options.onActiveRender = function(activ) {
39199			let elem = activ.find('.param_6 .activ_item');
39200			if (elem.length > 0) {
39201				elem.addClass('no_removable');
39202
39203				let filtersCount = elem.parents('.fp_active').find('.activ_item');
39204
39205				let eventSelector = '';
39206				if (filtersCount.length > 1) {
39207					eventSelector = '.param_6 .activ_item';
39208				} else if (filtersCount.length === 1) {
39209					eventSelector = '.param_6 .activ_item, .fp_active_reset';
39210				}
39211
39212				jQuery(eventSelector).on('click', function(e) {
39213					if (typeof js_Config_product_store_reservation.my_store == 'undefined' || js_Config_product_store_reservation.my_store !== true) {
39214						return;
39215					}
39216
39217					e.stopPropagation();
39218					let $this = jQuery(this);
39219					let myStoreTooltip = jQuery('.store_reservation .my_store').not('button');
39220
39221					if ($this.hasClass('tooltipstered')) {
39222						$this.tooltipster('open');
39223					} else {
39224						$this.tooltipster({
39225							theme        : "tooltipster-gdpr",
39226							contentAsHTML: true,
39227							trackTooltip : true,
39228							trackOrigin  : true,
39229							multiple     : false,
39230							timer        : 5000,
39231							content      : js_lang_checkout_product_reservation.filterDisable,
39232						}).tooltipster('open');
39233					}
39234
39235					if (myStoreTooltip.length > 0) {
39236						let tooltipOpened = false;
39237						myStoreTooltip.each(function(key, elm) {
39238							elm = jQuery(elm);
39239
39240							if (elm.hasClass('tooltipstered')) {
39241								elm.tooltipster('close');
39242							}
39243
39244							if (elm.is(':hidden') || tooltipOpened === true) {
39245								return;
39246							}
39247
39248							if (elm.hasClass('tooltipstered')) {
39249								elm.tooltipster('open');
39250							} else {
39251								elm.trigger('mouseover');
39252							}
39253							tooltipOpened = true;
39254						});
39255					}
39256				});
39257			}
39258		}
39259	}
39260}
39261
39262function openMyStore(element){
39263	var element = jQuery(element);
39264	element.prop('disabled', true);
39265
39266	new AjaxRequest()
39267		.setMethod('POST')
39268		.setController('ProductStoreReservation')
39269		.setAction('getStoreModal')
39270		.onSuccess(function (response) {
39271			if ( response.data.success === true ) {
39272				let storeTooltip = jQuery('.store_reservation span.my_store.tooltipstered');
39273				if ( storeTooltip.length > 0 && storeTooltip.hasClass('tooltipstered') ) {
39274					storeTooltip.tooltipster('hide');
39275				}
39276
39277				let content = response.data.modalContent;
39278				let title = response.data.modalTitle;
39279
39280				myStoreModal = new CsModal()
39281				.setClassName('my_store')
39282				.setType('info')
39283				.setTitle(title)
39284				.setContent(content)
39285				.setButtons("<input type=\"button\" name=\"my_store_confirm\" class=\"button\" title=\"\" value=\"" + response.data.modalButton + "\">")
39286				.afterClose(function() {
39287					let myStoreButton = jQuery('.button.my_store');
39288					if ( myStoreButton.length > 0 ) {
39289						myStoreButton.prop('disabled', false);
39290					}
39291				})
39292				.afterOpen(function() {
39293
39294					let storeConfirmButton = jQuery('.cs_modal.my_store input[name="my_store_confirm"]');
39295					if ( storeConfirmButton.length > 0) {
39296						storeConfirmButton.on('click', function() {
39297							let confirmButton = jQuery(this);
39298							confirmButton.prop('disabled', true);
39299							let selectedStoreId = confirmButton.parents('.my_store').find('input[name="store_select_radio"]:checked').val();
39300							if (typeof selectedStoreId !== 'undefined' && selectedStoreId !== '') {
39301								new AjaxRequest({'storeId': selectedStoreId, 'myStore': true})
39302								.setMethod('POST')
39303								.setController('ProductStoreReservation')
39304								.setAction('updateStore')
39305								.onSuccess(function (response) {
39306									if ( response.data.success === true ) {
39307										jQuery('.store_reservation span.my_store.tooltipstered').tooltipster('destroy');
39308										if (jQuery('body').hasClass('shop_page_class_shop_browse')) {
39309											js_reload_current_page();
39310										} else if (jQuery('body').hasClass('shop_page_class_shop_product_details')) {
39311											let availabilityWrapper = jQuery('.product_store_availability_wrapper');
39312											if (availabilityWrapper.length > 0) {
39313												detailActiveStoreIcon = availabilityWrapper.find('.active_store_icon');
39314												if (detailActiveStoreIcon.length > 0) {
39315													detailActiveStoreIcon.remove();
39316												}
39317												newDetailActive = availabilityWrapper.find('div[data-store-id="' + selectedStoreId + '"]');
39318												if (newDetailActive.length > 0) {
39319													newDetailActive.find('.store_title').find('span').after('<span class="active_store_icon"></span>');
39320												}
39321											}
39322										}
39323
39324										myStoreModal.close();
39325									} else {
39326										let storeConfirmButton = jQuery('.cs_modal.my_store input[name="my_store_confirm"]');
39327										if ( storeConfirmButton.length > 0 ) {
39328											storeConfirmButton.prop('disabled', false);
39329										}
39330									}
39331								}).send();
39332							} else {
39333								if (confirmButton.hasClass('tooltipstered')) {
39334									confirmButton.tooltipster('open');
39335								} else {
39336									confirmButton.tooltipster({
39337										theme        : "tooltipster-gdpr",
39338										contentAsHTML: true,
39339										trackTooltip : true,
39340										trackOrigin  : true,
39341										multiple     : false,
39342										timer        : 5000,
39343										content      : js_lang_checkout_product_reservation.selectStore,
39344									}).tooltipster('open');
39345								}
39346
39347
39348								//Zatvorenie tooltipsteru nech mame aj animaciu a nasledne destroy
39349								window.setTimeout( function() {
39350									if ( confirmButton.hasClass('tooltipstered') ) {
39351										confirmButton.tooltipster('hide', function(){
39352											jQuery('.cs_modal.my_store input[name="my_store_confirm"]').tooltipster('destroy');
39353											confirmButton.prop('disabled', false);
39354										});
39355									}
39356								}, 1500);
39357
39358							}
39359						});
39360					}
39361
39362					let storeCitySelect = jQuery('.cs_modal.my_store select.city_select');
39363					if ( storeCitySelect.length > 0 ) {
39364						storeCitySelect.on('change', function () {
39365							let citySelect = jQuery(this);
39366							let selected = citySelect.find('option:selected');
39367							let stores = selected.data('stores');
39368
39369							if ( typeof stores !== 'undefined' && stores.length > 0 ) {
39370								let allStores = citySelect.parents('.my_store_modal').find('input[name="store_select_radio"]');
39371								if ( allStores.length > 0 ) {
39372									allStores.each(function() {
39373										let store = jQuery(this);
39374										if ( stores.includes(store.val()) ) {
39375											store.parents('.other_store_row').show();
39376										} else {
39377											store.parents('.other_store_row').hide();
39378										}
39379									});
39380								}
39381							} else {
39382								citySelect.parents('.my_store_modal').find('.other_store_row').show();
39383							}
39384						});
39385					}
39386
39387					let storesRadio = jQuery('.cs_modal.my_store input[name="store_select_radio"]');
39388					if ( storesRadio.length > 0 ) {
39389						storesRadio.on('change', function() {
39390							let storeRow = jQuery(this).parents('.other_store_row');
39391							storeRow.siblings('.active').removeClass('active');
39392							storeRow.addClass('active');
39393						});
39394					}
39395				})
39396				.open();
39397			}
39398		}).send();
39399}
39400
39401function js_shopcart_reserve_product_submit(elem) {
39402	let element = jQuery(elem);
39403	let productId = element.data('product_id');
39404	let productName = element.data('product_name');
39405	let reservationModal = '';
39406
39407	new AjaxRequest({productId: productId, productName: productName})
39408		.setMethod('POST')
39409		.setController('ProductRental')
39410		.setAction('getModalContent')
39411		.onSuccess(function (response) {
39412
39413			reservationModal = new CsModal()
39414				.setClassName('product_mode_reservation')
39415				.setType('info')
39416				.setTitle(productName)
39417				.setContent(response.data.content)
39418				.setButtons("<button type='button' class='close_button close_reservation_mode_modal'>"+ cms_js_lang_close +"</button><button type='button' class='button submit_product_mode_reservation'>"+ js_lang_dynamic_attributes_lm_btn +"</button>")
39419				.afterOpen(function () {
39420					let sendEmailButton = jQuery('.submit_product_mode_reservation');
39421					let reservationInfo = sendEmailButton.parents().find('.reservation_mode_customer_info');
39422
39423					sendEmailButton.on('click', function () {
39424						sendEmailButton.prop('disabled', true);
39425						let result = true;
39426
39427						let nameElem = reservationInfo.find('input[name="name"]');
39428						let surnameElem = reservationInfo.find('input[name="surname"]');
39429						let emailElem = reservationInfo.find('input[name="email"]');
39430						let phoneElem = reservationInfo.find('input[name="phone"]');
39431						let commentElem = reservationInfo.find('textarea[name="comment"]');
39432						let dateFromElem = reservationInfo.find('input[name="dateFrom"]');
39433						let dateToElem = reservationInfo.find('input[name="dateTo"]');
39434
39435						let name = nameElem.val();
39436						let surname = surnameElem.val();
39437						let email = emailElem.val();
39438						let phone = phoneElem.val();
39439						let comment = commentElem.val();
39440						let dateFrom = dateFromElem.val();
39441						let dateTo = dateToElem.val();
39442
39443						let errors = {
39444							'name': false,
39445							'surname': false,
39446							'email': false,
39447							'phone': false,
39448							'product': false,
39449							'dateFrom': false,
39450							'dateTo': false,
39451						};
39452
39453						if (typeof productId == 'undefined' || productId === '' || productId === '0') {
39454							errors.product = true;
39455						}
39456
39457						if (typeof name == 'undefined' || name === '' || name.replace(/\s/g, "").length <= 2 || /^[a-žA-Ž ]+$/.test(name) === false) {
39458							errors.name = true;
39459							nameElem.addClass('error');
39460							nameElem.after('<div class="cleaner"></div><div class="error_box">' + js_lang_new_form_item + ' ' + nameElem.parent().find("label").html() + ' ' + js_lang_new_form_nesessery + '</div>');
39461						}
39462
39463						if (typeof surname == 'undefined' || surname === '' || surname.replace(/\s/g, "").length <= 2 || /^[a-žA-Ž ]+$/.test(surname) === false) {
39464							errors.surname = true;
39465							surnameElem.addClass('error');
39466							surnameElem.after('<div class="cleaner"></div><div class="error_box">' + js_lang_new_form_item + ' ' + surnameElem.parent().find("label").html() + ' ' + js_lang_new_form_nesessery + '</div>');
39467						}
39468
39469						if (typeof email == 'undefined' || email === '' || /\S+@\S+\.\S+/.test(email) === false) {
39470							errors.email = true;
39471							if (emailElem.siblings('.error_box').length === 0) {
39472								emailElem.after('<div class="cleaner"></div><div class="error_box">' + js_lang_new_form_item + ' ' + emailElem.parent().find("label").html() + ' ' + js_lang_new_form_nesessery + '</div>');
39473								emailElem.addClass('error');
39474							}
39475						}
39476
39477						if (typeof phone == 'undefined' || phone === '' || phone.replace(/\s/g, "").length < 9 || (phone.replace(/\s/g, "").length > 13 || /\d/g.test(phone.replace(/\s/g, "")) === false)) {
39478							errors.phone = true;
39479							if (phoneElem.siblings('.error_box').length === 0) {
39480								phoneElem.after('<div class="cleaner"></div><div class="error_box">' + js_lang_new_form_item + ' ' + phoneElem.parent().find("label").html() + ' ' + js_lang_new_form_nesessery + '</div>');
39481								phoneElem.addClass('error');
39482							}
39483						}
39484
39485						if (typeof dateFrom == 'undefined' || dateFrom === '' || /(0[1-9]|[12][0-9]|3[01])[- /.](0[1-9]|1[012])[- /.](20|21)\d\d/.test(dateFrom) === false) {
39486							errors.dateFrom = true;
39487							errors.phone = true;
39488							if (dateFromElem.siblings('.error_box').length === 0) {
39489								dateFromElem.after('<div class="cleaner"></div><div class="error_box">' + js_lang_new_form_item + ' ' + dateFromElem.parent().find("label").html() + ' ' + js_lang_new_form_nesessery + '</div>');
39490								dateFromElem.addClass('error');
39491							}
39492						}
39493
39494						if (typeof dateTo == 'undefined' || dateTo === '' || /(0[1-9]|[12][0-9]|3[01])[- /.](0[1-9]|1[012])[- /.](20|21)\d\d/.test(dateTo) === false) {
39495							errors.dateTo = true;
39496							if (dateToElem.siblings('.error_box').length === 0) {
39497								dateToElem.after('<div class="cleaner"></div><div class="error_box">' + js_lang_new_form_item + ' ' + dateToElem.parent().find("label").html() + ' ' + js_lang_new_form_nesessery + '</div>');
39498								dateToElem.addClass('error');
39499							}
39500						}
39501
39502						if (dateFrom !== '' && dateTo !== '') {
39503							let dateFrom2 = dateFrom.split(".");
39504							let dateTo2 = dateTo.split(".");
39505							let now = new Date();
39506							now.setHours(0, 0, 0, 0);
39507
39508							dateFrom2 = new Date(parseInt(dateFrom2[2], 10),
39509								parseInt(dateFrom2[1], 10) - 1,
39510								parseInt(dateFrom2[0], 10));
39511
39512							dateTo2 = new Date(parseInt(dateTo2[2], 10),
39513								parseInt(dateTo2[1], 10) - 1,
39514								parseInt(dateTo2[0], 10));
39515
39516							if (isNaN(dateFrom2.getDate())) {
39517								errors.dateFrom = true;
39518								dateFromElem.removeClass('valid');
39519								dateFromElem.after('<div class="cleaner"></div><div class="error_box">' + cms_js_lang_reservation_mode_incorrect_format_date_error + '</div>');
39520							}
39521
39522							if (isNaN(dateTo2.getDate())) {
39523								errors.dateTo = true;
39524								dateToElem.removeClass('valid');
39525								dateToElem.after('<div class="cleaner"></div><div class="error_box">' + cms_js_lang_reservation_mode_incorrect_format_date_error + '</div>');
39526							}
39527
39528							if (dateFrom2 > dateTo2) {
39529								errors.dateFrom = true;
39530								dateFromElem.removeClass('valid');
39531								dateToElem.removeClass('valid');
39532								dateToElem.removeClass('error_box');
39533								dateFromElem.addClass('error');
39534								dateToElem.addClass('error');
39535								dateToElem.after('<div class="cleaner"></div><div class="error_box">' + cms_js_lang_reservation_mode_predate_error + '</div>');
39536								dateFromElem.after('<div class="cleaner"></div><div class="error_box">' + cms_js_lang_reservation_mode_predate_error + '</div>');
39537							}
39538
39539							if (dateFrom2 < now) {
39540								errors.dateFrom = true;
39541								dateFromElem.removeClass('valid');
39542								dateFromElem.addClass('error');
39543								dateFromElem.after('<div class="cleaner"></div><div class="error_box">' + cms_js_lang_reservation_mode_current_date_error + '</div>');
39544							}
39545
39546							if (dateTo2 < now) {
39547								errors.dateTo = true;
39548								dateToElem.removeClass('valid');
39549								dateToElem.addClass('error');
39550								dateToElem.after('<div class="cleaner"></div><div class="error_box">' + cms_js_lang_reservation_mode_current_date_error + '</div>');
39551							}
39552						}
39553
39554
39555						Object.values(errors).forEach(function (error) {
39556							if (error === true) {
39557								result = false;
39558							}
39559						});
39560
39561						if (result === true) {
39562							let emailData = {
39563								name: name,
39564								surname: surname,
39565								email: email,
39566								phone: phone,
39567								comment: comment,
39568								productId: productId,
39569								productName: productName,
39570								dateFrom: dateFrom,
39571								dateTo: dateTo,
39572							};
39573
39574							new AjaxRequest({data: emailData})
39575								.setMethod('POST')
39576								.setController('ProductRental')
39577								.setAction('sendEmail')
39578								.onSuccess(function (response) {
39579									if (response.data.message === 'success') {
39580										reservationModal.close();
39581										vex.dialog.alert(cms_js_lang_reservation_mode_email_sent + '. ' + cms_js_lang_reservation_mode_email_sent_contact);
39582									} else {
39583										reservationModal.close();
39584										vex.dialog.alert(cms_js_lang_reservation_mode_email_not_sent);
39585									}
39586								}).send();
39587
39588						} else {
39589							sendEmailButton.prop('disabled', false);
39590						}
39591					})
39592
39593					reservationInfo.on("focusout", "input, textarea", function () {
39594						var $this = jQuery(this);
39595						let elemValue = $this.val();
39596						var valid = typeof elemValue !== 'undefined' && elemValue !== '';
39597						let elemName = $this.attr('name');
39598						let message = '<div class="cleaner"></div><div class="error_box">' + js_lang_new_form_item + ' ' + $this.parent().find("label").html() + ' ' + js_lang_new_form_nesessery + '</div>';
39599
39600						if (elemName === 'dateTo' || elemName === 'dateFrom') {
39601							return;
39602						}
39603
39604						if (elemName === 'email' && elemValue.length > 0 && /\S+@\S+\.\S+/.test(elemValue) === false) {
39605							valid = false;
39606							message = '<div class="cleaner"></div><div class="error_box">' + js_lang_nsu_lm_wrong_email + '</div>';
39607						}
39608
39609						if (elemName === 'phone' && elemValue.length > 0 && (elemValue === '' || elemValue.replace(/\s/g, "").length < 9 || elemValue.replace(/\s/g, "").length > 13 || /\d/g.test(elemValue.replace(/\s/g, "")) === false)) {
39610							valid = false;
39611							message = '<div class="cleaner"></div><div class="error_box">' + cms_js_lang_is_not_numeric + '</div>';
39612						}
39613
39614						if (valid) {
39615							if ($this.hasClass('required')) {
39616								$this.addClass('valid');
39617								$this.removeClass('error');
39618								$this.siblings('.error_box').remove();
39619								$this.siblings('.cleaner').remove();
39620							}
39621							$this.addClass('filled');
39622
39623						} else {
39624							$this.siblings('.error_box').remove();
39625							$this.siblings('.cleaner').remove();
39626							if ($this.hasClass('required')) {
39627								$this.removeClass('valid');
39628								$this.addClass('error');
39629								$this.after(message);
39630							}
39631							if (elemValue.length > 0) {
39632								$this.addClass('filled');
39633							} else {
39634								$this.removeClass('filled');
39635							}
39636						}
39637					});
39638
39639					reservationInfo.on("change", ".date", function () {
39640						var $this = jQuery(this);
39641						let elemValue = $this.val();
39642						var valid = typeof elemValue !== 'undefined' && elemValue !== '';
39643						let elemName = $this.attr('name');
39644						let currentDateInput = elemValue.split(".");
39645						currentDateInput = new Date(parseInt(currentDateInput[2], 10),
39646							parseInt(currentDateInput[1], 10) - 1,
39647							parseInt(currentDateInput[0], 10));
39648						let now = new Date();
39649						now.setHours(0, 0, 0, 0);
39650
39651						if (elemName === 'dateTo' || elemName === 'dateFrom') {
39652							let message = '<div class="cleaner"></div><div class="error_box">' + js_lang_new_form_item + ' ' + $this.parent().find("label").html() + ' ' + js_lang_new_form_nesessery + '</div>';
39653
39654							if (isNaN(currentDateInput.getDate()) || elemValue !== '' && /(0[1-9]|[12][0-9]|3[01])[- /.](0[1-9]|1[012])[- /.](20|21)\d\d/.test(elemValue) === false) {
39655								valid = false;
39656								message = '<div class="cleaner"></div><div class="error_box">' + cms_js_lang_reservation_mode_incorrect_format_date_error + '</div>';
39657							}
39658
39659							if (elemValue !== '' && currentDateInput < now) {
39660								valid = false;
39661								message = '<div class="cleaner"></div><div class="error_box">' + cms_js_lang_reservation_mode_current_date_error + '</div>';
39662							}
39663
39664							if (valid) {
39665								if ($this.hasClass('required')) {
39666									$this.addClass('valid');
39667									$this.removeClass('error');
39668									$this.siblings('.error_box').remove();
39669									$this.siblings('.cleaner').remove();
39670								}
39671								$this.addClass('filled');
39672
39673							} else {
39674								$this.siblings('.error_box').remove();
39675								$this.siblings('.cleaner').remove();
39676
39677								$this.removeClass('valid');
39678								$this.addClass('error');
39679								$this.after(message);
39680								if (elemValue !== '') {
39681									$this.addClass('filled');
39682								} else {
39683									$this.removeClass('filled');
39684								}
39685							}
39686						}
39687
39688						if (elemName === 'dateFrom') {
39689							let reservationInfo = jQuery('.submit_product_mode_reservation').parents().find('.reservation_mode_customer_info');
39690							let dateTo2 = reservationInfo.find('input[name="dateTo"]');
39691
39692							dateTo2.datepicker('option', 'minDate', new Date(currentDateInput));
39693						}
39694					});
39695
39696					let options = {minDate: new Date()};
39697					reservationInfo = jQuery('.submit_product_mode_reservation').parents().find('.reservation_mode_customer_info');
39698					reservationInfo.find('input[name="dateFrom"]').datepicker(options);
39699					reservationInfo.find('input[name="dateTo"]').datepicker(options);
39700					jQuery('#ui-datepicker-div').addClass('material_design');
39701				})
39702				.open();
39703		}).send();
39704}
39705
39706function triggerClickOn(selector)
39707{
39708	jQuery(selector).trigger('click');
39709	return false;
39710}
39711
39712/**
39713 * Funkcia vymeni svoj obsah s cielovym elementom
39714 * @param {object} elem DocumentElement
39715 * @param {string} target Cielovy element
39716 * @param {string} func Spusti funkciu na konci ak je to vyzadovane
39717 */
39718function ghostContent(elem, target,  func){
39719	let src = jQuery(elem);
39720	let trg = jQuery(target).not('.ghost_content');
39721
39722	if (trg.length) {
39723		let from = src.closest('.ghost_content');
39724		let class_to = jQuery(trg).removeClass('ghost_content').attr('class');
39725		let ghost_to = jQuery(trg).clone();
39726
39727		from.attr('class', class_to + ' ghost_content');
39728        let ghost_from = from.clone();
39729        jQuery(trg).replaceWith(ghost_from);
39730        from.replaceWith(ghost_to);
39731
39732		// Doplnkove inicializacie
39733		if (typeof func !== 'undefined' && typeof window[func] === 'function') {
39734			window[func](src);
39735		}
39736	}
39737}
39738
39739function ghostSearchContent(src){
39740	js_mod_vm_search_ajax_search_ini();
39741	let selector = jQuery('#shop_search_field');
39742	if (selector.length) {
39743		let caret = selector.val().length;
39744		selector.focus();
39745		selector[0].setSelectionRange(caret,caret);
39746	}
39747}
39748
39749function getProductDetailSelectedVariant(selector = 'body')
39750{
39751	const mainSelector = jQuery(selector);
39752	let selectedVariantElem = undefined;
39753
39754	// stare varianty - select
39755	selectedVariantElem = mainSelector.find('.prod_adv_attrib_select select.main_attr_select');
39756
39757	if (!selectedVariantElem.length) {
39758		// stare varianty - radio
39759		selectedVariantElem = mainSelector.find('.prod_adv_attrib_radio input[type="radio"]:checked');
39760	}
39761	if (!selectedVariantElem.length) {
39762		// stare varianty - adv. select
39763		selectedVariantElem = mainSelector.find('.prod_adv_attrib_select');
39764	}
39765	if (typeof window.js_product_id !== 'undefined' && Number(window.js_product_id) && typeof window['ProductVariantInstance_' + window.js_product_id] !== 'undefined') {
39766		// nove varianty
39767		let selectedAttr = window['ProductVariantInstance_' + window.js_product_id].getSelectedAttribute();
39768		return {
39769			select: undefined,
39770			value: selectedAttr?.source,
39771			parsedValue: vmExplodeProductVariant(selectedAttr?.source),
39772			variantInstance: selectedAttr
39773		}
39774	}
39775
39776	if (selectedVariantElem.length) {
39777		return {
39778			select: selectedVariantElem.attr('name'),
39779			value: selectedVariantElem.val(),
39780			parsedValue: vmExplodeProductVariant(selectedVariantElem.val()),
39781		};
39782	}
39783
39784	return undefined;
39785}
39786
39787function switchLangWyisiwyg(element) {
39788	var elm = jQuery(element);
39789
39790	if (elm.hasClass('cs_flag_active')) {
39791		return;
39792	}
39793
39794	var parentElm = elm.closest('.wysiwyg_editor');
39795	var lang = elm.attr('data-lang');
39796
39797	parentElm.find('.cs_flag_active').removeClass('cs_flag_active');
39798	parentElm.find('.active').removeClass('active').hide();
39799
39800	elm.addClass('cs_flag_active');
39801	parentElm.find('.wysiwyg_container[data-lang="'+lang+'"]').addClass('active').show();
39802}
39803
39804function initWysiwygEditor(element) {
39805	element = jQuery(element);
39806	let textArea = element.is('textarea') ? element : element.find('textarea');
39807
39808	textArea
39809		.ckeditor( function() {
39810			element
39811				.find('.wysiwyg_container:not(.active)')
39812				.hide();
39813		}, cs_ckeditor_default_cfg);
39814}
39815
39816function getAjaxCartItems()
39817{
39818	let cart = jQuery('div.cart_ajax_container div.products_wrap');
39819	let products = cart.children();
39820
39821	let cartItems = {};
39822
39823	products.each(function (index, item) {
39824		let product = jQuery(item);
39825		cartItems[product.attr('data-id')] = product.attr('data-quantity');
39826	});
39827
39828	return cartItems;
39829}
39830
39831function togglePasswordVisibility(element, inputNameOrId) {
39832	element = jQuery(element);
39833
39834	const container = element.closest('div, fieldset, form');
39835	let input = container.find('#' + inputNameOrId);
39836
39837	if (!input.length) {
39838		input = container.find('input[name="' + inputNameOrId + '"]');
39839	}
39840
39841	if (!input.length) {
39842		return;
39843	}
39844
39845	if (input.attr('type') === 'text') {
39846		input.prop('type', 'password');
39847		element.removeClass('csi-eye').addClass('csi-eye-slash');
39848	} else {
39849		input.prop('type', 'text');
39850		element.removeClass('csi-eye-slash').addClass('csi-eye');
39851	}
39852}
39853
39854function changeProductPricePerUnit(newVal) {
39855	let pricePerUnitTitle = jQuery(".flypage-cena .title");
39856	if (pricePerUnitTitle.length > 0) {
39857		let pricePerUnitValue = pricePerUnitTitle.siblings(".price");
39858		if (pricePerUnitValue.length > 0) {
39859			setTimeout(function() {
39860				newVal = `<span class="value">${newVal}</span>/kg`;
39861				pricePerUnitValue.html(newVal);
39862			}, 100);
39863		}
39864	}
39865}
39866
39867function emitEvent(event, data = {}) {
39868	if (!event || typeof event !== 'string') {
39869		return;
39870	}
39871
39872	fetch('/includes/ajax_handle.php', {
39873		method: 'POST',
39874		headers: {[js_CS_Config_csrf_header]: jQuery('meta[name="csrf-token"]').attr('content')},
39875		body: new URLSearchParams({
39876			no_css: 1,
39877			no_html: 1,
39878			no_vm_html: 1,
39879			no_menu: 1,
39880			ajax_call: 2,
39881			controller: 'Event',
39882			action: 'dispatchEvent',
39883			event: event,
39884			data: JSON.stringify(data)
39885		}),
39886		keepalive: true
39887	});
39888}
39889
39890/**
39891 * Unfinished purchase modal - exit intent detection
39892 * Shows modal when user moves cursor toward browser URL bar on cart/checkout pages
39893 */
39894if (config('js_Config_unfinished_purchase_modal')) {
39895	(function () {
39896		let config = js_Config_unfinished_purchase_modal;
39897		let storageKey = 'unfinished_purchase_modal_shown';
39898		let clientYThreshold = typeof config.clientY !== 'undefined' ? config.clientY : 0;
39899
39900		function isRelevantPage() {
39901			const body = document.body;
39902			const isCartPage = body.classList.contains('shop_page_cart');
39903			const isCheckoutPage = document.getElementById('checkout_one_step') !== null;
39904
39905			if (isCartPage && !config.enabledOnCartPage) {
39906				return false;
39907			}
39908
39909			if (isCheckoutPage && !config.enabledOnCheckoutPage) {
39910				return false;
39911			}
39912
39913			if (!isCartPage && !isCheckoutPage) {
39914				return false;
39915			}
39916
39917			return true;
39918		}
39919
39920		function showModal(onCancel) {
39921			sessionStorage.setItem(storageKey, '1');
39922			let submitted = false;
39923
39924			new CsModal()
39925				.setType('confirm')
39926				.setClassName('unfinished-purchase-modal')
39927				.setTitle(js_lang_unfinished_purchase_modal_title)
39928				.setContent('<p>' + js_lang_unfinished_purchase_modal_text + '</p>')
39929				.setButtonTexts([js_lang_unfinished_purchase_modal_btn_continue_shopping, js_lang_unfinished_purchase_modal_btn_continue_order])
39930				.onSubmit(function () {
39931					submitted = true;
39932					this.close();
39933				})
39934				.afterClose(function () {
39935					if (!submitted && typeof onCancel === 'function') {
39936						onCancel();
39937					}
39938				})
39939				.open();
39940		}
39941
39942		// Desktop: mouseleave detection
39943		document.addEventListener('mouseleave', function (e) {
39944			if (sessionStorage.getItem(storageKey)) {
39945				return;
39946			}
39947
39948			if (e.clientY > clientYThreshold) {
39949				return;
39950			}
39951
39952			if (document.querySelector('.module-cart .cart-count-amount') === null) {
39953				return;
39954			}
39955
39956			if (!isRelevantPage()) {
39957				return;
39958			}
39959
39960			showModal();
39961		});
39962
39963		// Mobile: back button interception
39964		if (/Mobi|Android|iPhone|iPad|iPod/i.test(navigator.userAgent)) {
39965			if (!isRelevantPage()) {
39966				return;
39967			}
39968
39969			if (document.querySelector('.module-cart .cart-count-amount') === null) {
39970				return;
39971			}
39972
39973			let backAllowed = false;
39974
39975			history.pushState({unfinishedPurchaseGuard: true}, '');
39976
39977			window.addEventListener('popstate', function (e) {
39978				if (backAllowed) {
39979					return;
39980				}
39981
39982				if (sessionStorage.getItem(storageKey)) {
39983					return;
39984				}
39985
39986				history.pushState({unfinishedPurchaseGuard: true}, '');
39987
39988				showModal(function () {
39989					backAllowed = true;
39990					history.back();
39991				});
39992			});
39993		}
39994	})();
39995}
39996
39997/**
39998 * If someone or something (third-party script, etc.) tries to overwrite jQuery, it won't let it
39999 */
40000if ( typeof js_Config_stop_jquery_overwrites !== 'undefined' && js_Config_stop_jquery_overwrites ) {
40001	(function() {
40002		var jQueryClone = window.jQuery;
40003
40004		Object.defineProperty(window, 'jQuery', {
40005			configurable: true,
40006			set: function(value) {},
40007			get: function() {
40008				return jQueryClone;
40009			}
40010		});
40011	})();
40012}
40013
40014
40015/* ========================================
40016 FILE: /includes/js/vex/vex.2.2.1.min.js
40017 ==================== */
40018
40019/*! vex.js, vex.dialog.js 2.3.3 */
40020(function(){var a;a=function(a){var b,c;return b=!1,a(function(){var d;return d=(document.body||document.documentElement).style,b=void 0!==d.animation||void 0!==d.WebkitAnimation||void 0!==d.MozAnimation||void 0!==d.MsAnimation||void 0!==d.OAnimation,a(window).bind("keyup.vex",function(a){return 27===a.keyCode?c.closeByEscape():void 0})}),c={globalID:1,animationEndEvent:"animationend webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend",baseClassNames:{vex:"vex",content:"vex-content",overlay:"vex-overlay",close:"vex-close",closing:"vex-closing",open:"vex-open"},defaultOptions:{content:"",showCloseButton:!0,escapeButtonCloses:!0,overlayClosesOnClick:!0,appendLocation:"body",className:"vex-cs",css:{},overlayClassName:"",overlayCSS:{},contentClassName:"",contentCSS:{},closeClassName:"",closeCSS:{}},open:function(b){return b=a.extend({},c.defaultOptions,b),b.id=c.globalID,c.globalID+=1,b.$vex=a("<div>").addClass(c.baseClassNames.vex).addClass(b.className).css(b.css).data({vex:b}),b.$vexOverlay=a("<div>").addClass(c.baseClassNames.overlay).addClass(b.overlayClassName).css(b.overlayCSS).data({vex:b}),b.overlayClosesOnClick&&b.$vexOverlay.bind("click.vex",function(b){return b.target===this?c.close(a(this).data().vex.id):void 0}),b.$vex.append(b.$vexOverlay),b.$vexContent=a("<div>").addClass(c.baseClassNames.content).addClass(b.contentClassName).css(b.contentCSS).append(b.content).data({vex:b}),b.$vex.append(b.$vexContent),b.showCloseButton&&(b.$closeButton=a("<div>").addClass(c.baseClassNames.close).addClass(b.closeClassName).css(b.closeCSS).data({vex:b}).bind("click.vex",function(){return c.close(a(this).data().vex.id)}),b.$vexContent.append(b.$closeButton)),a(b.appendLocation).append(b.$vex),c.setupBodyClassName(b.$vex),b.afterOpen&&b.afterOpen(b.$vexContent,b),setTimeout(function(){return b.$vexContent.trigger("vexOpen",b)},0),b.$vexContent},getSelectorFromBaseClass:function(a){return"."+a.split(" ").join(".")},getAllVexes:function(){return a("."+c.baseClassNames.vex+':not(".'+c.baseClassNames.closing+'") '+c.getSelectorFromBaseClass(c.baseClassNames.c
40020ontent))},getVexByID:function(b){return c.getAllVexes().filter(function(){return a(this).data().vex.id===b})},close:function(a){var b;if(!a){if(b=c.getAllVexes().last(),!b.length)return!1;a=b.data().vex.id}return c.closeByID(a)},closeAll:function(){var b;return b=c.getAllVexes().map(function(){return a(this).data().vex.id}).toArray(),(null!=b?b.length:void 0)?(a.each(b.reverse(),function(a,b){return c.closeByID(b)}),!0):!1},closeByID:function(d){var e,f,g,h,i,j;return f=c.getVexByID(d),f.length?(e=f.data().vex.$vex,j=a.extend({},f.data().vex),g=function(){return j.beforeClose?j.beforeClose(f,j):void 0},h=function(){return f.trigger("vexClose",j),e.remove(),a("body").trigger("vexAfterClose",j),j.afterClose?j.afterClose(f,j):void 0},i="none"!==f.css("animationName")&&"0s"!==f.css("animationDuration"),b&&i?g()!==!1&&e.unbind(c.animationEndEvent).bind(c.animationEndEvent,function(){return h()}).addClass(c.baseClassNames.closing):g()!==!1&&h(),!0):void 0},closeByEscape:function(){var b,d,e;return e=c.getAllVexes().map(function(){return a(this).data().vex.id}).toArray(),(null!=e?e.length:void 0)?(d=Math.max.apply(Math,e),b=c.getVexByID(d),b.data().vex.escapeButtonCloses!==!0?!1:c.closeByID(d)):!1},setupBodyClassName:function(b){return a("body").bind("vexOpen.vex",function(){return a("body").addClass(c.baseClassNames.open)}).bind("vexAfterClose.vex",function(){return c.getAllVexes().length?void 0:a("body").removeClass(c.baseClassNames.open)})},hideLoading:function(){return a(".vex-loading-spinner").remove()},showLoading:function(){return c.hideLoading(),a("body").append('<div class="vex-loading-spinner '+c.defaultOptions.className+'"></div>')}}},"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof exports?module.exports=a(require("jquery")):window.vex=a(jQuery)}).call(this),function(){var a;a=function(a,b){var c,d;return null==b?a.error("Vex is required to use vex.dialog"):(c=function(b){var c;return c={},a.each(b.serializeArray(),function(){return c[this.name]?(c[this.name].push||(c[this.name]=[c[this.name]]),c[this.name].push(this.value||"")):c[this.name]=this.value||""}),c},d={},d.buttons={YES:{text:"OK",type:"submit",className:"vex-dialog-button-primary"},NO:{text:"Cancel",type:"button",className:"vex-dialog-button-secondary",click:function(a,c){return a.data().vex.value=!1,b.close(a.data().vex.id)}}},d.defaultOptions={callback:function(a){},afterOpen:function(){},message:"Message",input:'<input name="vex" type="hidden" value="_vex-empty-value" />',value:!1,buttons:[d.buttons.YES,d.buttons.NO],showCloseButton:!1,onSubmit:function(e){var f,g;return f=a(this),g=f.parent(),e.preventDefault(),e.stopPropagation(),g.data().vex.value=d.getFormValueOnSubmit(c(f)),b.close(g.data().vex.id)},focusFirstInput:!0},d.defaultAlertOptions={message:"Alert",buttons:[d.buttons.YES]},d.defaultConfirmOptions={message:"Confirm"},d.open=function(c){var e,f;return c=a.extend({},b.defaultOptions,d.defaultOptions,c),c.content=d.buildDialogForm(c),f=c.beforeClose,c.beforeClose=function(a,b){return c.callback(b.value),"function"==typeof f?f(a,b):void 0},e=b.open(c),c.focusFirstInput&&e.find('button[type="submit"], button[type="button"], input[type="submit"], input[type="button"], textarea, input[type="date"], input[type="datetime"], input[type="datetime-local"], input[type="email"], input[type="month"], input[type="number"], input[type="password"], input[type="search"], input[type="tel"], input[type="text"], input[type="time"], input[type="url"], input[type="week"]').first().focus(),e},d.alert=function(b){return"string"==typeof b&&(b={message:b}),b=a.extend({},d.defaultAlertOptions,b),d.open(b)},d.confirm=function(b){return"string"==typeof b?a.error("dialog.confirm(options) requires options.callback."):(b=a.extend({},d.defaultConfirmOptions,b),d.open(b))},d.prompt=function(b){var c;return"string"==typeof b?a.error("dialog.prompt(options) requires options.callback."):(c={message:'<label for="vex">'+(b.label||"Prompt:")+"</label>",input:'<input name="vex" type="text" class="vex-dialog-prompt-input" placeholder="'+(b.placeholder||"")+'"  value="'+(b.value||"")+'" />'},b=a.extend({},c,b),d.open(b))},d.buildDialogForm=function(b){var c,e,f;return c=a('<form class="vex-dialog-form" />'),f=a('<div class="vex-dialog-message" />'),e=a('<div class="vex-dialog-input" />'),c.append(f.append(b.message)).append(e.append(b.input)).append(d.buttonsToDOM(b.buttons)).bind("submit.vex",b.onSubmit),c},d.getFormValueOnSubmit=function(a){return a.vex||""===a.vex?"_vex-empty-value"===a.vex?!0:a.vex:a},d.buttonsToDOM=function(c){var d;return d=a('<div class="vex-dialog-buttons" />'),a.each(c,function(e,f){var g;return g=a('<button type="'+f.type+'"></button>').text(f.text).addClass(f.className+" vex-dialog-button "+(0===e?"vex-first ":"")+(e===c.length-1?"vex-last ":"")).bind("click.vex",function(c){return f.click?f.click(a(this).parents(b.getSelectorFromBaseClass(b.baseClassNames.c
40020ontent)),c):void 0}),g.appendTo(d)}),d},d)},"function"==typeof define&&define.amd?define(["jquery","vex"],a):"object"==typeof exports?module.exports=a(require("jquery"),require("./vex.js")):window.vex.dialog=a(window.jQuery,window.vex)}.call(this);
40021
40022//Funkcia capitalize
40023String.prototype.capitalize = function() {
40024	return this.charAt(0).toUpperCase() + this.slice(1);
40025}
40026
40027jQuery(function() {
40028	var body = jQuery('body');
40029		
40030	vex.defaultOptions.beforeClose = function() {
40031		body.addClass('vex_closing');
40032	};
40033	
40034	vex.defaultOptions.afterClose = function() {
40035		body.removeClass('vex_closing');
40036	};
40037
40038
40039	/** GLOBALNE NASTAVENIA **/
40040	
40041	//Nastavenie confirm dialogov 
40042	vex.dialog.defaultConfirmOptions = {
40043		className: 'vex-cs confirm',
40044		overlayClosesOnClick: false,
40045		showCloseButton: true,
40046		buttons:{
40047			NO:{
40048				text:cms_js_lang_no.capitalize(),  //Cancel -> Nie
40049				className:"vex-dialog-button-secondary",
40050				type:"button",
40051				click: function() {
40052						return vex.close();
40053				}
40054			},
40055			YES:{
40056				text:cms_js_lang_yes.capitalize(), //OK -> Ano
40057				className:"vex-dialog-button-primary",
40058				type:"submit"
40059			}
40060		}
40061	};
40062		
40063	//Nastavenie alert dialogov 
40064	vex.dialog.defaultAlertOptions = {
40065		className: 'vex-cs confirm alert',
40066		overlayClosesOnClick: false,
40067		showCloseButton: true,
40068		buttons:{
40069			YES:{
40070				text:'OK',
40071				className:"vex-dialog-button-primary",
40072				type:"submit"
40073			}
40074		}
40075	};
40076//if ( is_cs_user() ) {
40077//	// Dusan kontrola vexu a jeho elementov, ak sa tam nenachadza input, checkbox, select, link a button iny ako primary a secondary
40078//	// v pripade chyb povedzte
40079//	jQuery(window).keypress(function (e) {
40080//		if (e.key === ' ' || e.key === 'Spacebar') {
40081//			var inputs     = '';
40082//			var links      = '';
40083//			var checkboxes = '';
40084//			jQuery('.vex-content').each(function () {
40085//				inputs     = jQuery(this).find(':input').not('.vex-dialog-button-primary').not('.vex-dialog-button-secondary');
40086//				checkboxes = jQuery(this).find('[type=checkbox]');
40087//				links      = jQuery(this).find('a');
40088//				//console.log(inputs);
40089//				//console.log(links);
40090//				//console.log(checkboxes);
40091//				//<-- Should return all input elements in that specific form.
40092//				if (inputs.length || checkboxes.length || links.length > 0) {
40093//					console.log('Stlacil si space, ale nakolko sa nachadza vo vexe input, select, checkbox, link tak sa to nepotvrdilo');
40094//				}
40095//				else {
40096//					// ak sa nenachadza vo vexe ziadny input, checkbox, select, link a button iny ako primary, secondary
40097//					// bude spacebar funkcny na odkliknutie
40098//					// ' ' is standard, 'Spacebar' was used by IE9 and Firefox < 37
40099//					jQuery( ".vex-dialog-button-primary" ).click();
40100//					console.log('Stlacil si space, potvrdili sme vex');
40101//				}
40102//			});
40103//		}
40104//	});
40105//}
40106	// po stlaceni space sa potvrdi vex okno
40107	//jQuery(window).keypress(function (e) {
40108	//	if (e.key === ' ' || e.key === 'Spacebar') {
40109	//		// ' ' is standard, 'Spacebar' was used by IE9 and Firefox < 37
40110	//		jQuery( ".vex-dialog-button-primary" ).click();
40111	//
40112	//	}
40113	//});
40114});
40115
40116/** Vlastne funkcie **/
40117
40118function close_vex_spacebar() {
40119	//funkcia pre vypnutie vexu pomocou medzernika
40120	jQuery(window).on('keypress', function (e) {
40121			if (e.key === ' ' || e.key === 'Spacebar') {
40122				// ' ' is standard, 'Spacebar' was used by IE9 and Firefox < 37
40123				jQuery( ".vex-dialog-button-primary" ).click();
40124
40125			}
40126		});
40127}
40128function submit_vex_enter() {
40129	//funkcia pre potvrdenie vexu s enterom
40130	jQuery(window).on('keypress', function (e) {
40131		if (e.which == 13) {
40132			jQuery( ".vex-dialog-button-primary" ).click();
40133		}
40134	});
40135}
40136function stop_submit_vex_enter(jqo) {
40137	//funkcia pre nepotvrdenie vexu s enterom
40138	jQuery(window).on('keypress', function (e) {
40139		if (e.which == 13) {
40140			e.preventDefault();
40141			//jQuery( ".vex-dialog-button-primary" ).click();
40142		}
40143	});
40144}
40145function js_confirm(elem, message){
40146	close_vex_spacebar();
40147	var url = jQuery(elem).prop('href');
40148	vex.dialog.confirm({
40149		message:message,
40150		callback: function(value){
40151			if (value) {
40152				window.location = url;
40153			};
40154		}
40155	});
40156	return false;
40157	
40158}
40159
40160
40161 /**********************
40162 * PRIKLADY POUZITIA:  *
40163 ***********************
40164
40165//Alert:
40166vex.dialog.alert({ 
40167	message:'Are you absolutely sure you want to destroy the alien planet?'
40168});
40169
40170//Confirm:
40171vex.dialog.confirm({ 
40172	message:'Are you absolutely sure you want to destroy the alien planet?',
40173	callback: function(value){
40174		return (value ? true : false);
40175	}
40176});
40177
40178//Confirm na onclick:
40179<a href="/index.php?option=logout" title="Kliknutím sa odhlásite z administrácie" onclick="javascript:return js_confirm(this,'Prajete si odhlásiť sa z administrácie?');">Odhlásiť</a>
40180	
40181
40182//Vseobecne:
40183vex.open({ content: 'Hello World!!!' });
40184
40185vex.open({
40186	showCloseButton: true, 
40187	className: 'vex-cs vex-cs-login', 
40188	content: '<form class="vex-dialog-form vex-login-form" onsubmit="event.preventDefault()">' + 
40189				'<div class="vex-dialog-message">' + 
40190					'<b><?php echo _CMS_ADMINLANG_LOGIN_DIALOG_MESSAGE_ADMINISTRATOR ?></b>' +
40191				'</div>' +
40192				
40193				'<div class="vex-dialog-input" style="padding: 21px;">' +
40194					'<div class="vex-login-username-group">' +
40195						'<label><?php echo _CMS_ADMINLANG_LOGIN_DIALOG_USERNAME_LABEL ?></label>' + 
40196						'<input type="text" class="vex-login-username" placeholder="<?php echo _CMS_ADMINLANG_LOGIN_DIALOG_USERNAME_PLACEHOLDER ?>" name="username">' + 
40197					'</div>' +
40198					'<div class="vex-login-password-group">' +
40199						'<label><?php echo _CMS_ADMINLANG_LOGIN_DIALOG_PASSWORD_LABEL ?></label>' + 
40200						'<input type="password" class="vex-login-password" placeholder="<?php echo _CMS_ADMINLANG_LOGIN_DIALOG_PASSWORD_PLACEHOLDER ?>" name="password">' +
40201					'</div>' +	
40202				'</div>' +
40203				
40204				'<div class="vex-dialog-buttons">' + 
40205					'<div class="vex-dialog-err"></div>' + 
40206					'<button class="vex-login-submit vex-dialog-button-primary vex-dialog-button vex-first vex-last" type="submit"><?php echo _CMS_ADMINLANG_LOGIN_DIALOG_SUBMITBTN_TEXT ?></button>' +
40207				'</div>' +
40208			 '</form>'
40209});
40210
40211***********************************************************************/
40212
40213/* ========================================
40214 FILE: /includes/product_offer/product_offer.js
40215 ==================== */
40216
40217/**
40218 * Creativesites s.r.o
40219 * Produkt offers
40220 * http://wiki.creativesites.sk/doku.php?id=product_offer
40221 * v.2.4
40222 *
40223 *
40224 *  -------------------------------------------------------------------------------------------------
40225 * |                                                                                                 |
40226 * |                                  !!!! POZOR !!!!                                                |
40227 * | Upravuje sa stale subor product_offer_dev.js a obsah sa skopiruje nasledne do product_offer.js  |
40228 * |                                                     											 |
40229 * |							  nasledne sync frontend.js											 |
40230 *  -------------------------------------------------------------------------------------------------
40231 *
40232 */
40233var prof={version:"2.4",debug:!1,set_plugin:0,box:{},wrap:{},body:{},currency:{},browse:0,detail:0,offers:{},verified:[],prepared:0,uninterested:0,variantpicked:1,forcedcount:0,selection:{},availability:{},product_id:0,nocheck:0,product_variant:"",options:{detailopen:"hover",categoryopen:"hover",morebutton:1,buyontop:0,checknoclose:0,mandatoryoffer:0,fadespeed:250,availability:0,scrollToElem:"",scrollToOffset:15},init:function(o){if(prof.debug=is_cs_user("profdev"),prof.debug&&(console.log("Product offers [v."+prof.version+"]"),csstack("init")),prof.body=jQuery("body"),prof.browse=prof.body.hasClass("shop_page_class_shop_browse")?1:0,prof.detail=prof.body.hasClass("shop_page_class_shop_product_details")?1:0,prof.set_plugin=prof.body.find(".prod_add_to_cart.set_add").length>0,void 0!==o&&(prof.options=jQuery.extend(prof.options,o)),prof.detail&&(prof.box=jQuery(".pof_dt_box"),prof.wrap=jQuery(".pof_dt_overbox"),prof.morebtn=jQuery(".show_more_btn"),prof.product_id=parseInt(jQuery('input[name="product_id"]').val()),prof.set_plugin&&prof.box.addClass("pof_set"),prof.body.on("change",".main_attr_select",function(){var o=jQuery(this);prof.product_variant=o.val(),o.removeClass("pof_var_warn")}),void 0!==prof.box&&prof.box.length>0)){var e=prof.box.find(".pof_dt_offer_wrap").length;prof.wrap.addClass("has_offers"),prof.options.morebutton&&e-prof.options.morebutton>0&&(prof.morebtn.show(),prof.morebtn.on("click",function(){prof.box.hasClass("open")?prof.box.removeClass("open"):prof.box.addClass("open")})),prof.options.buyontop&&prof.box.find(".pof_dt_form").insertAfter(".pof_dt_offer_title"),prof.body.on("change",'select[name="pof_variant"]',function(){prof.refreshPrices(this),0==prof.noCheck&&prof.autoCheck(this),1==prof.options.availability&&prof.setAvailability(this),jQuery(this).trigger("blur")}),prof.body.on("focus",'select[name="pof_variant"]',function(){prof.box.addClass("select-opened")}),prof.body.on("blur",'select[name="pof_variant"]',function(){prof.box.removeClass("select-opened")}),prof.body.on("mouseleave",'select[name="pof_variant"]',function(){}),prof.body.on("click",'.select-opened select[name="pof_variant"] option',function(){jQuery(this).trigger("blur")}),prof.body.on("change",'input[name="pof_buy_this"]',function(){var o=jQuery(this),e=o.closest("li");"radio"==o.attr("type")&&o.closest("ul").find("li").removeClass("pof_picked"),o.is(":checked")?e.addClass("pof_picked"):e.removeClass("pof_picked").find(".main_attr_select").val(e.find(".main_attr_select option:first").val()),"click"!=prof.options.detailopen||prof.box.hasClass("open")||prof.morebtn.trigger("click")}),"hover"==prof.options.detailopen?(prof.body.on("mouseenter",".pof_dt_box",function(){prof.box.addClass("open").addClass("mouse-in")}),prof.body.on("mouseleave",".pof_dt_box",function(){prof.box.removeClass("mouse-in"),jQuery(".vex").length>0&&prof.box.hasClass("forcedopen")||prof.options.checknoclose&&prof.box.find('input[name="pof_buy_this"]:checked').length||prof.box.hasClass("select-opened")||prof.box.removeClass("open").removeClass("forcedopen")})):prof.options.detailopen,prof.body.on("click",'.pof_dt_box a[rel="vex"]',function(){prof.box.addClass("forcedopen")}),prof.box.find('[name="pof_variant"]').each(function(){prof.refreshPrices(this)}),prof.wrap.fadeIn(prof.options.fadespeed).addClass("initialized"),"function"==typeof prof.options.onDetailInit&&prof.options.onDetailInit()}if(prof.browse){prof.getOffers();var r="click"===prof.options.categoryopen?"click":"mouseover";prof.body.on(r,".product_offer_fly",function(){prof.show(this)}),"click"===prof.options.categoryopen&&prof.body.on("click",function(o){void 0!==o.target&&jQuery(o.target).closest("div").hasClass("product_offer_fly")||jQuery(".poshy-up").poshytip("hide").removeClass("poshy-up")})}},autoCheck:function(o){prof.debug&&csstack("autoCheck");var e=jQuery(o),r=e.closest("li");""!==e.val()?r.find('input[name="pof_buy_this"]').attr("checked","checked").prop("checked",!0).trigger("change"):r.find('input[name="pof_buy_this"]').removeAttr("checked").prop("checked",!1).trigger("change")}
40233,setAvailability:function(o){if(prof.debug&&csstack("setAvailability"),"function"==typeof setProductAvailabilityTime){var e=prof.getHighestAvail();"undefined"==typeof need_days_variable&&(window.need_days_variable=0),need_days_variable=e,setProductAvailabilityTime();var r=0,t="",a=jQuery(o).closest(".pof_dt_offer_wrap"),i=parseInt(a.find('input[name="pof_buy_this"]').val()),p=a.find('[name="pof_variant"]');if(p.length){var f=p.val();void 0!==prof.availability[i].variant[f]&&(r=parseInt(prof.availability[i].variant[f].id),t=prof.availability[i].variant[f].name)}0==r&&void 0!==prof.availability[i].product&&(r=parseInt(prof.availability[i].product.id),t=prof.availability[i].product.name),""!==t&&void 0!==t&&(prof.debug&&console.log("    Seting availability text: ",t),a.find(".shop_product_availability_value").attr("class","").addClass("shop_product_availability_value").addClass("attr_avail_"+r).html(t))}},getHighestAvail:function(){prof.debug&&csstack("getHighestAvail");var o=0;return prof.box.find("li").each(function(){var e=jQuery(this),r=parseInt(e.find('input[name="pof_buy_this"]').val()),t=e.find('[name="pof_variant"]');if(void 0===prof.availability[r])return!1;var a=0;if(t.length){var i=t.val();void 0!==prof.availability[r].variant[i]&&(a=parseInt(prof.availability[r].variant[i].day))}0==a&&(a=parseInt(prof.availability[r].product.day)),o<a&&(prof.debug&&console.log("    Setting availability day: ",a),o=a)}),o},resetVariantSelect:function(){prof.debug&&csstack("resetVariantSelect"),prof.nocheck=1,prof.box.find('select[name="pof_variant"]').each(function(){var o=jQuery(this);o.val(o.find("option:first").val()).trigger("change")}),prof.nocheck=0},show:function(o){prof.debug&&csstack("show");var e=jQuery(o),r=parseInt(e.find("input").val()),t="",a="",i="",p=e.hasClass("poshy-up");if("click"===prof.options.categoryopen&&(jQuery(".poshy-up").each(function(){jQuery(this).poshytip("hide").removeClass("poshy-up")}),p))return!1;if(void 0!==prof.offers[r]){var f='<div class="pof_pt_box">',s=[];jQuery.each(prof.offers[r],function(o,e){s.push(e)});for(var n=s.sort(function(o,e){return void 0===o.offer_ordering||void 0===e.offer_ordering?0:parseInt(o.offer_ordering)-parseInt(e.offer_ordering)}),c=0;c<n.length;c++)a=n[c].product_credit,i=n[c].product_name,t+='<div class="pof_pt_offer_wrap">',t+='<a class="pof_pt_offer_thumb" href="'+n[c].offer_url+'"><img src="'+n[c].offer_thumb+'" alt="'+n[c].offer_name+'" /></a>',t+='<div class="pof_pt_offer_name"><a href="'+n[c].offer_url+'">'+n[c].offer_name+"</a></div>",t+='<div class="pof_pt_offer_save">'+n[c].offer_discount_text+"</div>",t+='<div class="pof_pt_offer_old">'+n[c].offer_standard_price_text+" "+n[c].offer_save_price_text+"</div>",t+='<div class="pof_pt_offer_pay">'+n[c].offer_new_price_text+"</div>",t+="</div>";f+=i,f+=t,f+=a,f+="</div>",null==e.data("poshytip")?(e.poshytip({className:"tip-yellow",content:f,alignTo:"target",alignX:"center",showOn:"click"===prof.options.categoryopen?"none":"hover",offsetX:0,offsetY:-1,fade:!0,slide:!0,showTimeout:100,hideTimeout:is_cs_user("offer_block")?400000009:100}),e.poshytip("show").addClass("poshy-up")):"click"===prof.options.categoryopen?p?e.poshytip("hide").removeClass("poshy-up"):e.poshytip("show").addClass("poshy-up"):e.poshytip("show")}},getOffers:function(){prof.debug&&csstack("getOffers");var o={action:"getOffers"};o.selection=prof.getProducts(),0!=o.selection.length&&jQuery.post(js_global_live_site+"/includes/product_offer/product_offer_ajax.php",o,function(e){e=csJsonParse(e)||{},prof.debug&&console.log(e),void 0!==e.offers&&(prof.offers=jQuery.extend(!0,prof.offers,e.offers),jQuery.each(o.selection,function(o,r){void 0===e.offers[r]?jQuery(".product_id_"+r).find(".product_offer_fly").remove():jQuery(".product_id_"+r).find(".product_offer_fly").show()}))})},getProducts:function(){prof.debug&&csstack("getProducts");var o=[];return prof.body.find(".product_offer_fly").each(function(){var e=jQuery(this),r=parseInt(e.find('input[name="product_offer_id"]').val());void 0===prof.offers[r]&&prof.verified.indexOf(r)<0&&(e.hide(),o.push(r),prof.verified.push(r))}),o},highlight:function(){var o;prof.debug&&csstack("highlight"),o=""!==prof.options.scrollToElem?jQuery(""+prof.options.scrollToElem):prof.box;var e=parseInt(o.offset().top,10)-prof.options.scrollToOffset;e<0&&(e=0),jQuery("body,html").animate({scrollTop:e},1e3),prof.box.addClass("open"),prof.box.effect("highlight",{},800)},refreshPrices:function(o){prof.debug&&csstack("refreshPrices");var e=parseInt(prof.currency.currency_display.nbDecimal),r=jQuery(o),t=r.closest(".pof_dt_offer_wrap"),a=parseFloat(t.find('input[name="raw_discount"]').val()),i=parseInt(t.find('input[name="raw_discount_type"]').val());"-0-"!=r.val()&&r.removeClass("error"),r.trigger("blur");var p=r.find("option:selected");""==p.val()&&(p=r.find("option[data-price]:first"));var f,s=parseFloat(p.attr("data-price"));f=0==i?prof._round(parseFloat(a/100*s),e):1==i?s-a:a;var n,c=t.find(".pof_dt_offer_save_perc");if(n=0==i?a+"%":js_format_Money(1==i?f:a,e,prof.currency.currency_display.symbol,prof.currency.currency_display.decimal).replace(/\s(.)$/,"$1"),c.html((js_lang_prof_discount||"zľava")+" "+n),t.find(".akcia-cena").html(js_format_Money(s,e,prof.currency.currency_display.symbol,prof.currency.currency_display.decimal)),t.find(".pof_dt_offer_save .pof_sv span").html(js_format_Money(f,e,prof.currency.currency_display.symbol,prof.currency.currency_display.decimal)),s-f>0)var d=js_format_Money(s-f,e,prof.currency.currency_display.symbol,prof.currency.currency_display.decimal);else d="undefined"!=typeof js_lang_prof_free?js_lang_prof_free:"Free";t.find(".pof_dt_offer_pay").html(d)},showWarning:function(o){prof.debug&&csstack("showWarning");var e="",r=o.closest(".products_wrap"),t="",a=new RegExp("pof_par_"),i=o.closest(".product_cont").attr("class").split(" ");if(jQuery.each(i,function(o,e){-1!=e.search(a)&&(t=parseInt(e.replace("pof_par_","")))}),r.find(".pof_ref_"+t).each(function(){var o=jQuery(this);e+='<div class="pof_to_del">',e+='<div class="pof_del_img">'+o.find(".cajx_image").html()+"</div>",e+='<div class="pof_del_name">'+o.find(".cajx_name").html()+"</div>",e+='<div class="pof_del_attr">'+o.find(".cajx_attr").html()+"</div>",e+='<div class="pof_del_price">'+o.find(".cajx_price").html()+"</div>",e+="</div>"}),""!=e){var p="";return p+='<div class="pof_del_wrap">',p+='<div class="pof_del_q">'+("undefined"!=typeof js_lang_prof_del_warn?js_lang_prof_del_warn:"Along with this product, the following special offers will removed.")+"</div>",p+='<div class="pof_to_del_prods">'+e+"</div>",p+='<div class="pof_del_c">'+("undefined"!=typeof js_lang_prof_del_conf?js_lang_prof_del_conf:"Do you want to continue?")+"</div>",vex.dialog.confirm({message:p,callback:function(e){e&&o.addClass("pof_del_confirmed").trigger("click")}}),!1}return!0},prepare:function(){if(prof.debug&&csstack("prepare"),prof.getChecked(),!prof.uninterested&&jQuery.isEmptyObject(prof.selection))return vex.dialog.alert({message:js_lang_prof_select_offer}),prof.prepared=0,!1;if("undefined"!=typeof js_global_VM_PRODUCT_ATTRIB_FIRST_OPTION_REQUIRED&&1==js_global_VM_PRODUCT_ATTRIB_FIRST_OPTION_REQUIRED&&!prof.uninterested&&!prof.variantpicked)return vex.dialog.alert({message:js_lang_prof_select_variant}),!1;if(prof.uninterested){prof.prepared=1;var o=prof.body.find(".prod_add_to_cart");return o.hasClass("set_add")||o.trigger("click"),!0}if(prof.set_plugin)return prof.prepared=1,!0;var e=prof.getParentVariant(),r={action:"pof_check_cart"};r.selection=JSON.stringify(prof.selection),r.product_id=prof.product_id,r.product_variant=0==e||e<-1?"":e,jQuery.post(js_global_live_site+"/includes/product_offer/product_offer_ajax.php",r,function(o){if
40233(1==(o=csJsonParse(o)||{}).status){prof.debug&&console.log("    Parent is in cart, can add offers..."),prof.prepared=1;var e={update_res:{},log_params:[]};e.update_res.success=1,e.log_params.push(o.product_id),e.log_params.push("+"),e.log_params.push(o.product_qty),e.log_params.push({select_value:o.product_variant}),prof.add(e)}else if(2==o.status){if(prof.debug&&console.log("    Parent is in cart, quantity missing, adding another parent to cart..."),0===prof.getParentVariant(!0))return!1;prof.prepared=1;var r=prof.body.find(".prod_add_to_cart");if(prof.set_plugin)return!0;r.trigger("click")}else{if(prof.debug&&console.log("    Parent not in cart, adding parent to cart..."),0===prof.getParentVariant(!0))return!1;if(prof.prepared=1,r=prof.body.find(".prod_add_to_cart"),prof.set_plugin)return!0;r.trigger("click")}})},getParentVariant:function(o){var e=-1;if("undefined"!=typeof js_global_VM_PRODUCT_ATTRIB_FIRST_OPTION_REQUIRED&&1==js_global_VM_PRODUCT_ATTRIB_FIRST_OPTION_REQUIRED){var r=jQuery("select.main_attr_select");r.length>0&&(""==r.val()?(o&&(r.addClass("pof_var_warn"),vex.dialog.alert({message:js_lang_prof_select_main_variant})),e=0):e=r.val())}return e},add:function(o){if(prof.debug&&csstack("add"),void 0===o.update_res||void 0===o.update_res.success||1!=o.update_res.success)return prof.prepared=0,prof.uninterested=0,!1;if(!prof.prepared)return!1;if(prof.uninterested)return prof.prepared=0,prof.uninterested=0,!1;var e={action:"pof_cart_add"};e.selection=JSON.stringify(prof.selection),e.product_id=o.log_params[0],e.product_qty=o.log_params[2],void 0!==o.log_params[3]&&"string"==typeof o.log_params[3].select_value&&(e.product_variant=o.log_params[3].select_value),jQuery.post(js_global_live_site+"/includes/product_offer/product_offer_ajax.php",e,function(e){e=csJsonParse(e)||{},prof.set_plugin||(prof.uncheckAll(),prof.resetVariantSelect()),1==e.status?(prof.debug&&console.log("    Success..."),o.html_products=e.html_products,o.html_cart_values=e.html_cart_values,js_ajax_cart_container_init(o),js_add_to_cart_form_ajax_cart_bind(),"function"==typeof js_ajax_cart_update_after_init&&js_ajax_cart_update_after_init()):(prof.debug&&console.log("    Error..."),void 0!==e.html_products&&(o.html_products=e.html_products,o.html_cart_values=e.html_cart_values,js_ajax_cart_container_init(o),js_add_to_cart_form_ajax_cart_bind(),"function"==typeof js_ajax_cart_update_after_init&&js_ajax_cart_update_after_init()),void 0!==e.not_added&&jQuery.each(e.not_added,function(o,e){jQuery(".pof_pid_"+e).addClass("pof_highlight")}),prof.box.append(e.status),setTimeout(function(){jQuery(".shop_tip, .shop_warning").remove()},6e3)),prof.prepared=0,prof.uninterested=0})},uncheckAll:function(){prof.debug&&csstack("uncheckAll"),jQuery('input[name="pof_buy_this"]').prop("checked",!1)},getChecked:function(){prof.debug&&csstack("getChecked"),prof.selection={},prof.variantpicked=1,prof.box.find('input[name="pof_buy_this"]:checked').each(function(){var o=jQuery(this),e=parseInt(o.val(),10),r=0;if(0==e)return prof.uninterested=1,{};if(o.hasClass("pof_variants")){var t=void 0!==(r=o.closest(".pof_dt_offer_wrap").find('select[name="pof_variant"] option:selected').val())&&"-0-"!=r&&""!=r;prof.variantpicked=prof.variantpicked&&t,t?o.closest(".pof_dt_offer_wrap").find('select[name="pof_variant"]').removeClass("error"):o.closest(".pof_dt_offer_wrap").find('select[name="pof_variant"]').addClass("error")}prof.selection[e]=r}),prof.box.find('input[name="pof_buy_forced"]').each(function(){var o=jQuery(this),e=parseInt(o.val(),10);prof.selection[e]=0,prof.forcedcount++}),jQuery.isEmptyObject(prof.selection)&&prof.box.hasClass("pof_type_1")&&(prof.uninterested=1)},sortCart:function(o){prof.debug&&csstack("sortCart"),void 0===o&&(o=jQuery(".cart_ajax_container"));var e={};o.find(".pof_child").each(function(){var r=jQuery(this),t=new RegExp("pof_ref_(\\d+)","g").exec(r.attr("class"));null!==t&&void 0!==t[1]&&(void 0===e[t[1]]?e[t[1]]=1:e[t[1]]++,r.addClass("pof_sort_"+e[t[1]]),o.find(".pof_par_"+t[1]).after(r))}),jQuery.each(e,function(e,r){o.find(".pof_ref_"+e+".pof_sort_1").addClass("pof_child_last")})},_round:function(o,e){void 0===e&&(e=0);var r=Math.pow(10,e),t=o*r;return Math.round(t)/r}};
40234
40235
40236/* ========================================
40237 FILE: /includes/infinite_scroll/iscroll.min.js
40238 ==================== */
40239
40240var iscroll={version:"1.1",debug:is_cs_user("scrolldev")||is_cs_user("separate_js"),window:{},body:{},box:{},button:{},curr_url:"",next_url:"",prev_url:"",cache:{},loading:0,bottom:0,rowheight:100,page:1,first_page:1,last_page:1,ispexf:0,_page:1,_scroll:0,options:{ajax_call:1,no_vm_html:1,no_menu:1,no_html:1,no_css:1,filler:!0,echo_buffer_and_exit:1,is_inf_scroll_call:1,time:Math.round((new Date).getTime()/1e3)},setting:{realtime:1,constant:2,btnTarget:"",afterShow:null},init:function(l){var o,i;iscroll.debug&&(console.log("Infinite scrolling [v."+iscroll.version+"]"),csstack("init")),iscroll.window=jQuery(window),iscroll.body=jQuery("body"),iscroll.box=jQuery("#product_list"),iscroll.ispexf=iscroll.box.hasClass("pexf_is_on")||jQuery(".mp_fs").length,void 0!==l&&(iscroll.setting=jQuery.extend(iscroll.setting,l)),iscroll.box.length&&(iscroll.initCache(),(i=iscroll.canLoad(iscroll.next_url))&&iscroll.load(iscroll.next_url),jQuery(document).ajaxComplete(function(){window.setTimeout(function(){iscroll.ispexf;iscroll.box=jQuery("#product_list"),iscroll.ispexf=iscroll.box.hasClass("pexf_is_on")||jQuery(".mp_fs").length},500)}),o=jQuery("#middle_content"),iscroll.setting.filler&&iscroll.window.height()>o.height()&&((l=document.createElement("div")).id="filler",l.style.height=iscroll.window.height()-o.height()+"px",o.after(l)),iscroll.window.scroll(iscroll.scroll),!iscroll.setting.realtime&&i&&(i="undefined"!=typeof js_
40240inf_scroll_button_more?js_inf_scroll_button_more:"Show more",iscroll.button=jQuery("<div>").addClass("button inf_button").html(i),iscroll.button.on("click",function(){iscroll.loadFollowing()}),(""!==iscroll.setting.btnTarget?jQuery(iscroll.setting.btnTarget):iscroll.box).after(iscroll.button)),jQuery("#footer").on("mouseover",function(l){l.target==this&&jQuery("#footer_top_wrapper").show()}),iscroll.body.on("mouseleave","#footer_top_wrapper",function(){jQuery(this).hide("slide",{direction:"down"},400)}))},initCache:function(l){var o;iscroll.debug&&csstack("initCache"),void 0!==iscroll.cache[iscroll.page]||(o=jQuery(".inf_page.page_"+iscroll.page)).length&&(iscroll.bottom=parseInt(o.position().top)+o.height(),iscroll.rowheight=jQuery(".shop-category-product").height(),iscroll.first_page=iscroll.page,iscroll.last_page=iscroll.page,o.data("infpage",iscroll.page),iscroll.cache[iscroll.page]={},iscroll.cache[iscroll.page].page=iscroll.page,iscroll.cache[iscroll.page].next_url=jQuery(".pn_next_has_link").attr("href"),iscroll.cache[iscroll.page].curr_url=js_global_live_site_sef,iscroll.cache[iscroll.page].prev_url=jQuery(".pn_prev_has_link").attr("href"),iscroll.cache[iscroll.page].response='<div class="inf_page page_'+iscroll.page+'">'+o.html()+"</div>",iscroll.cache[iscroll.page].pagination=jQuery(".page-navigation-bottom").html())},scroll:function(){var l;iscroll.ispexf||(l=iscroll.window.scrollTop(),iscroll.setting.realtime&&iscroll._scroll<l&&iscroll.bottom-iscroll.rowheight*iscroll.setting.constant<l&&0===iscroll.loading&&iscroll.loadFollowing(),Math.abs(l-iscroll._scroll)>parseFloat(.2*iscroll.window.height())&&(iscroll._scroll=l,jQuery(".inf_page").each(function(){var l=jQuery(this),o=parseInt(l.data("infpage"),10);return"undefined"!=o&&!isNaN(o)&&(o==iscroll.page||(iscroll.mostlyVisible(l,o)?(iscroll.updateTo(o),!1):void 0))})))},updateTo:function(l){iscroll.debug&&csstack("updateTo",[l]),iscroll.page=l,iscroll._page=l;var o,i=jQuery(".inf_page.page_"+l);i.length&&(iscroll.bottom=parseInt(i.position().top)+i.height()),void 0!==iscroll.cache[l]&&(o=iscroll.cache[l].curr_url,iscroll.last_page>iscroll.first_page&&(i=new RegExp(/(.*),\d+\/$/),o=iscroll.cache[l].curr_url.replace(i,"$1,"+iscroll.first_page+"-"+iscroll.last_page+"/")),console.log(o),history.replaceState(null,null,o),jQuery(".page-navigation-bottom").html(iscroll.cache[l].pagination),jQuery(".page-navigation-top").html(iscroll.cache[l].pagination))},load:function(l,o){void 0!==window.luigy_search_init&&window.luigy_search_init&&(l=l.replace(",,",",")),iscroll.debug&&csstack("load",[l]),iscroll.loading=1,jQuery.getJSON(l,iscroll.options,function(l){iscroll.cache[l.page]=l,iscroll.loading=0,"function"==typeof o&&o(l)}).fail(function(l){iscroll.debug&&console.log("    Error: Failed loading JSON",l),iscroll.loading=0,"function"==typeof o&&o(!1)})},loadFollowing:function(){iscroll.debug&&csstack("loadFollowing"),void 0!==iscroll.cache[iscroll.page+1]?(iscroll.debug&&console.log("    Page cached! | "+iscroll.next_url),iscroll.showFollowing(iscroll.cache[iscroll.page+1])):iscroll.canLoad(iscroll.next_url)&&iscroll.load(iscroll.next_url,function(l){!1!==l&&iscroll.showFollowing(l)})},showFollowing:function(l){iscroll.debug&&csstack("showFollowing");var o,i,e=jQuery("#product_list .inf_page.page_"+l.page);if(e.length)return iscroll.debug&&console.log("    Page already displayed..."),!1;jQuery("#product_list .inf_page.page_"+iscroll.page).after(l.response),"function"==typeof iscroll.setting.afterShow&&iscroll.setting.afterShow(l,"next"),void 0!==l.breadcrumblist&&(o=jQuery("#luigibox_structure_shop_browse_container").find("script"),i=JSON.parse(o.html()),jQuery(l.breadcrumblist.result.itemListElement).each(function(l,o){i.result.itemListElement.push(o)}),o.html(JSON.stringify(i))),iscroll.next_url=l.next_url,iscroll.last_page<l.page&&(iscroll.last_page=l.page),e.data("infpage",l.page),iscroll.canLoad(iscroll.next_url)||0!==iscroll.setting.realtime||iscroll.button.hide(),iscroll.canLoad(iscroll.next_url)&&void 0===iscroll.cache[l.page+1]&&iscroll.load(iscroll.next_url)},loadPrevious:function(){iscroll.debug&&csstack("loadPrevious"),iscroll.cache[iscroll.page-1]?(iscroll.debug&&console.log("    show previous"),iscroll.showPrevious(iscroll.cache[iscroll.page-1]),iscroll.loading=0):iscroll.canLoad(iscroll.prev_url)&&iscroll.load(iscroll.prev_url,function(l){!1!==l&&iscroll.showPrevious(l)})},showPrevious:function(l){if(iscroll.debug&&csstack("showPrevious"),0<jQuery("#product_list .inf_page.page_"+l.page).length)return!1;var o=jQuery("#product_list .inf_page.page_"+iscroll.page);o.before(l.response),"function"==typeof iscroll.setting.afterShow&&iscroll.setting.afterShow(l,"prev"),window.scrollTo(0,iscroll.window.scrollTop()+o.height()),iscroll.prev_url=l.prev_url,
vendor: 17,036 bytes, lines 40240-40249
40240iscroll.first_page>l.page&&(iscroll.first_page=l.page),iscroll.canLoad(iscroll.prev_url)&&void 0===iscroll.cache[l.page-1]&&iscroll.load(iscroll.prev_url)},canLoad:function(l){l=""!==l&&"#"!==l&&null!==l&&"null"!==l;return iscroll.debug&&csstack("canLoad","'"+(l?"true":"false")+"'"),l},mostlyVisible:function(l,o){var i=iscroll.window.scrollTop(),e=iscroll.window.height(),r=l.offset().top,l=l.height(),e=i<r+l-.25*l&&r<i+.5*e;return iscroll.debug&&csstack("mostlyVisible","'Page "+o+": "+(e?"true":"false")+"'"),e}};
40241
40242/* ========================================
40243 FILE: /includes/js/jquery/mCustomScrollbar-3.1.7/jquery.mCustomScrollbar.concat.min.js
40244 ==================== */
40245
40246/* == jquery mousewheel plugin == Version: 3.1.13, License: MIT License (MIT) */
40247!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof exports?module.exports=a:a(jQuery)}(function(a){function b(b){var g=b||window.event,h=i.call(arguments,1),j=0,l=0,m=0,n=0,o=0,p=0;if(b=a.event.fix(g),b.type="mousewheel","detail"in g&&(m=-1*g.detail),"wheelDelta"in g&&(m=g.wheelDelta),"wheelDeltaY"in g&&(m=g.wheelDeltaY),"wheelDeltaX"in g&&(l=-1*g.wheelDeltaX),"axis"in g&&g.axis===g.HORIZONTAL_AXIS&&(l=-1*m,m=0),j=0===m?l:m,"deltaY"in g&&(m=-1*g.deltaY,j=m),"deltaX"in g&&(l=g.deltaX,0===m&&(j=-1*l)),0!==m||0!==l){if(1===g.deltaMode){var q=a.data(this,"mousewheel-line-height");j*=q,m*=q,l*=q}else if(2===g.deltaMode){var r=a.data(this,"mousewheel-page-height");j*=r,m*=r,l*=r}if(n=Math.max(Math.abs(m),Math.abs(l)),(!f||f>n)&&(f=n,d(g,n)&&(f/=40)),d(g,n)&&(j/=40,l/=40,m/=40),j=Math[j>=1?"floor":"ceil"](j/f),l=Math[l>=1?"floor":"ceil"](l/f),m=Math[m>=1?"floor":"ceil"](m/f),k.settings.normalizeOffset&&this.getBoundingClientRect){var s=this.getBoundingClientRect();o=b.clientX-s.left,p=b.clientY-s.top}return b.deltaX=l,b.deltaY=m,b.deltaFactor=f,b.offsetX=o,b.offsetY=p,b.deltaMode=0,h.unshift(b,j,l,m),e&&clearTimeout(e),e=setTimeout(c,200),(a.event.dispatch||a.event.handle).apply(this,h)}}function c(){f=null}function d(a,b){return k.settings.adjustOldDeltas&&"mousewheel"===a.type&&b%120===0}var e,f,g=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],h="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],i=Array.prototype.slice;if(a.event.fixHooks)for(var j=g.length;j;)a.event.fixHooks[g[--j]]=a.event.mouseHooks;var k=a.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var c=h.length;c;)this.addEventListener(h[--c],b,!1);else this.onmousewheel=b;a.data(this,"mousewheel-line-height",k.getLineHeight(this)),a.data(this,"mousewheel-page-height",k.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var c=h.length;c;)this.removeEventListener(h[--c],b,!1);else this.onmousewheel=null;a.removeData(this,"mousewheel-line-height"),a.removeData(this,"mousewheel-page-height")},getLineHeight:function(b){var c=a(b),d=c["offsetParent"in a.fn?"offsetParent":"parent"]();return d.length||(d=a("body")),parseInt(d.css("fontSize"),10)||parseInt(c.css("fontSize"),10)||16},getPageHeight:function(b){return a(b).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};a.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})});!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof exports?module.exports=a:a(jQuery)}(function(a){function b(b){var g=b||window.event,h=i.call(arguments,1),j=0,l=0,m=0,n=0,o=0,p=0;if(b=a.event.fix(g),b.type="mousewheel","detail"in g&&(m=-1*g.detail),"wheelDelta"in g&&(m=g.wheelDelta),"wheelDeltaY"in g&&(m=g.wheelDeltaY),"wheelDeltaX"in g&&(l=-1*g.wheelDeltaX),"axis"in g&&g.axis===g.HORIZONTAL_AXIS&&(l=-1*m,m=0),j=0===m?l:m,"deltaY"in g&&(m=-1*g.deltaY,j=m),"deltaX"in g&&(l=g.deltaX,0===m&&(j=-1*l)),0!==m||0!==l){if(1===g.deltaMode){var q=a.data(this,"mousewheel-line-height");j*=q,m*=q,l*=q}else if(2===g.deltaMode){var r=a.data(this,"mousewheel-page-height");j*=r,m*=r,l*=r}if(n=Math.max(Math.abs(m),Math.abs(l)),(!f||f>n)&&(f=n,d(g,n)&&(f/=40)),d(g,n)&&(j/=40,l/=40,m/=40),j=Math[j>=1?"floor":"ceil"](j/f),l=Math[l>=1?"floor":"ceil"](l/f),m=Math[m>=1?"floor":"ceil"](m/f),k.settings.normalizeOffset&&this.getBoundingClientRect){var s=this.getBoundingClientRect();o=b.clientX-s.left,p=b.clientY-s.top}return b.deltaX=l,b.deltaY=m,b.deltaFactor=f,b.offsetX=o,b.offsetY=p,b.deltaMode=0,h.unshift(b,j,l,m),e&&clearTimeout(e),e=setTimeout(c,200),(a.event.dispatch||a.event.handle).apply(this,h)}}function c(){f=null}function d(a,b){return k.settings.adjustOldDeltas&&"mousewheel"===a.type&&b%120===0}var e,f,g=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],h="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],i=Array.prototype.slice;if(a.event.fixHooks)for(var j=g.length;j;)a.event.fixHooks[g[--j]]=a.event.mouseHooks;var k=a.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var c=h.length;c;)this.addEventListener(h[--c],b,!1);else this.onmousewheel=b;a.data(this,"mousewheel-line-height",k.getLineHeight(this)),a.data(this,"mousewheel-page-height",k.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var c=h.length;c;)this.removeEventListener(h[--c],b,!1);else this.onmousewheel=null;a.removeData(this,"mousewheel-line-height"),a.removeData(this,"mousewheel-page-height")},getLineHeight:function(b){var c=a(b),d=c["offsetParent"in a.fn?"offsetParent":"parent"]();return d.length||(d=a("body")),parseInt(d.css("fontSize"),10)||parseInt(c.css("fontSize"),10)||16},getPageHeight:function(b){return a(b).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};a.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})});
40248/* == malihu jquery custom scrollbar plugin == Version: 3.1.7, License: MIT License (MIT) */
40249!function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"undefined"!=typeof module&&module.exports?module.exports=e:e(jQuery,window,document)}(function(e){var t,o,a,n,i,r,l,s,c,d,u,f,m,h,p,g,v,x,S,_,w,C,b,y,B,T,k,M,O,I,D,E,W,R,A,L,z,P,H,U,F,q,j,Y,X,N,V,Q,G,J,K,Z,$,ee,te,oe,ae,ne;oe="function"==typeof define&&define.amd,ae="undefined"!=typeof module&&module.exports,ne="https:"==document.location.protocol?"https:":"http:",oe||(ae?require("jquery-mousewheel")(e):e.event.special.mousewheel||e("head").append(decodeURI("%3Cscript src="+ne+"//cdnjs.cloudflare.com/ajax/libs/jquery-mousewheel/3.1.13/jquery.mousewheel.min.js%3E%3C/script%3E"))),o="mCustomScrollbar",a={setTop:0,setLeft:0,axis:"y",scrollbarPosition:"inside",scrollInertia:950,autoDraggerLength:!0,alwaysShowScrollbar:0,snapOffset:0,mouseWheel:{enable:!0,scrollAmount:"auto",axis:"y",deltaFactor:"auto",disableOver:["select","option","keygen","datalist","textarea"]},scrollButtons:{scrollType:"stepless",scrollAmount:"auto"},keyboard:{enable:!0,scrollType:"stepless",scrollAmount:"auto"},contentTouchScroll:25,documentTouchScroll:!0,advanced:{autoScrollOnFocus:"input,textarea,select,button,datalist,keygen,a[tabindex],area,object,[contenteditable='true']",updateOnContentResize:!0,updateOnImageLoad:"auto",autoUpdateTimeout:60},theme:"light",callbacks:{onTotalScrollOffset:0,onTotalScrollBackOffset:0,alwaysTriggerOffsets:!0}},n=0,i={},r=window.attachEvent&&!window.addEventListener?1:0,l=!1,s=["mCSB_dragger_onDrag","mCSB_scrollTools_onDrag","mCS_img_loaded","mCS_disabled","mCS_destroyed","mCS_no_scrollbar","mCS-autoHide","mCS-dir-rtl","mCS_no_scrollbar_y","mCS_no_scrollbar_x","mCS_y_hidden","mCS_x_hidden","mCSB_draggerContainer","mCSB_buttonUp","mCSB_buttonDown","mCSB_buttonLeft","mCSB_buttonRight"],c={init:function(t){var t=e.extend(!0,{},a,t),o=d.call(this);if(t.live){var r=t.liveSelector||this.selector||".mCustomScrollbar",l=e(r);if("off"===t.live)return void f(r);i[r]=setTimeout(function(){l.mCustomScrollbar(t),"once"===t.live&&l.length&&f(r)},500)}else f(r);return t.setWidth=t.set_width?t.set_width:t.setWidth,t.setHeight=t.set_height?t.set_height:t.setHeight,t.axis=t.horizontalScroll?"x":m(t.axis),t.scrollInertia=t.scrollInertia>0&&t.scrollInertia<17?17:t.scrollInertia,"object"!=typeof t.mouseWheel&&1==t.mouseWheel&&(t.mouseWheel={enable:!0,scrollAmount:"auto",axis:"y",preventDefault:!1,deltaFactor:"auto",normalizeDelta:!1,invert:!1}),t.mouseWheel.scrollAmount=t.mouseWheelPixels?t.mouseWheelPixels:t.mouseWheel.scrollAmount,t.mouseWheel.normalizeDelta=t.advanced.normalizeMouseWheelDelta?t.advanced.normalizeMouseWheelDelta:t.mouseWheel.normalizeDelta,t.scrollButtons.scrollType=h(t.scrollButtons.scrollType),u(t),e(o).each(function(){var o=e(this);if(!o.data("mCS")){o.data("mCS",{idx:++n,opt:t,scrollRatio:{y:null,x:null},overflowed:null,contentReset:{y:null,x:null},bindEvents:!1,tweenRunning:!1,sequential:{},langDir:o.css("direction"),cbOffsets:null,trigger:null,poll:{size:{o:0,n:0},img:{o:0,n:0},change:{o:0,n:0}}});var a=o.data("mCS"),i=a.opt,r=o.data("mcs-axis"),l=o.data("mcs-scrollbar-position"),d=o.data("mcs-theme");r&&(i.axis=r),l&&(i.scrollbarPosition=l),d&&(i.theme=d,u(i)),p.call(this),a&&i.callbacks.onCreate&&"function"==typeof i.callbacks.onCreate&&i.callbacks.onCreate.call(this),e("#mCSB_"+a.idx+"_container img:not(."+s[2]+")").addClass(s[2]),c.update.call(null,o)}})},update:function(t,o){var a=t||d.call(this);return e(a).each(function(){var t=e(this);if(t.data("mCS")){var a=t.data("mCS"),n=a.opt,i=e("#mCSB_"+a.idx+"_container"),r=e("#mCSB_"+a.idx),l=[e("#mCSB_"+a.idx+"_dragger_vertical"),e("#mCSB_"+a.idx+"_dragger_horizontal")];if(!i.length)return;a.tweenRunning&&X(t),o&&a&&n.callbacks.onBeforeUpdate&&"function"==typeof n.callbacks.onBeforeUpdate&&n.callbacks.onBeforeUpdate.call(this),t.hasClass(s[3])&&t.removeClass(s[3]),t.hasClass(s[4])&&t.removeClass(s[4]),r.css("max-height","none"),r.height()!==t.height()&&r.css("max-height",t.height()),v.call(this),"y"===n.axis||n.advanced.autoExpandHorizontalScroll||i.css("width",g(i)),a.overflowed=C.call(this),T.call(this),n.autoDraggerLength&&S.call(this),_.call(this),y.call(this);var c=[Math.abs(i[0].offsetTop),Math.abs(i[0].offsetLeft)];"x"!==n.axis&&(a.overflowed[0]?l[0].height()>l[0].parent().height()?b.call(this):(N(t,c[0].toString(),{dir:"y",dur:0,overwrite:"none"}),a.contentReset.y=null):(b.call(this),"y"===n.axis?B.call(this):"yx"===n.axis&&a.overflowed[1]&&N(t,c[1].toString(),{dir:"x",dur:0,overwrite:"none"}))),"y"!==n.axis&&(a.overflowed[1]?l[1].width()>l[1].parent().width()?b.call(this):(N(t,c[1].toString(),{dir:"x",dur:0,overwrite:"none"}),a.contentReset.x=null):(b.call(this),"x"===n.axis?B.call(this):"yx"===n.axis&&a.overflowed[0]&&N(t,c[0].toString(),{dir:"y",dur:0,overwrite:"none"}))),o&&a&&(2===o&&n.callbacks.onImageLoad&&"function"==typeof n.callbacks.onImageLoad?n.callbacks.onImageLoad.call(this):3===o&&n.callbacks.onSelectorChange&&"function"==typeof n.callbacks.onSelectorChange?n.callbacks.onSelectorChange.call(this):n.callbacks.onUpdate&&"function"==typeof n.callbacks.onUpdate&&n.callbacks.onUpdate.call(this)),Y.call(this)}})},scrollTo:function(t,o){if(void 0!==t&&null!=t){var a=d.call(this);return e(a).each(function(){var a=e(this);if(a.data("mCS")){var n=a.data("mCS"),i=n.opt,r={trigger:"external",scrollInertia:i.scrollInertia,scrollEasing:"mcsEaseInOut",moveDragger:!1,timeout:60,callbacks:!0,onStart:!0,onUpdate:!0,onComplete:!0},l=e.extend(!0,{},r,o),s=q.call(this,t),c=l.scrollInertia>0&&l.scrollInertia<17?17:l.scrollInertia;s[0]=j.call(this,s[0],"y"),s[1]=j.call(this,s[1],"x"),l.moveDragger&&(s[0]*=n.scrollRatio.y,s[1]*=n.scrollRatio.x),l.dur=te()?0:c,setTimeout(function(){null!==s[0]&&void 0!==s[0]&&"x"!==i.axis&&n.overflowed[0]&&(l.dir="y",l.overwrite="all",N(a,s[0].toString(),l)),null!==s[1]&&void 0!==s[1]&&"y"!==i.axis&&n.overflowed[1]&&(l.dir="x",l.overwrite="none",N(a,s[1].toString(),l))},l.timeout)}})}},stop:function(){var t=d.call(this);return e(t).each(function(){var t=e(this);t.data("mCS")&&X(t)})},disable:function(t){var o=d.call(this);return e(o).each(function(){var o=e(this);o.data("mCS")&&(o.data("mCS"),Y.call(this,"remove"),B.call(this),t&&b.call(this),T.call(this,!0),o.addClass(s[3]))})},destroy:function(){var t=d.call(this);return e(t).each(function(){var a=e(this);if(a.data("mCS")){var n=a.data("mCS"),i=n.opt,r=e("#mCSB_"+n.idx),l=e("#mCSB_"+n.idx+"_container"),c=e(".mCSB_"+n.idx+"_scrollbar");i.live&&f(i.liveSelector||e(t).selector),Y.call(this,"remove"),B.call(this),b.call(this),a.removeData("mCS"),J(this,"mcs"),c.remove(),l.find("img."+s[2]).removeClass(s[2]),r.replaceWith(l.contents()),a.removeClass(o+" _mCS_"+n.idx+" "+s[6]+" "+s[7]+" "+s[5]+" "+s[3]).addClass(s[4])}})}},d=function(){return"object"!=typeof e(this)||e(this).length<1?".mCustomScrollbar":this},u=function(t){t.autoDraggerLength=!(e.inArray(t.theme,["rounded","rounded-dark","rounded-dots","rounded-dots-dark"])>-1)&&t.autoDraggerLength,t.autoExpandScrollbar=!(e.inArray(t.theme,["rounded-dots","rounded-dots-dark","3d","3d-dark","3d-thick","3d-thick-dark","inset","inset-dark","inset-2","inset-2-dark","inset-3","inset-3-dark"])>-1)&&t.autoExpandScrollbar,t.scrollButtons.enable=!(e.inArray(t.theme,["minimal","minimal-dark"])>-1)&&t.scrollButtons.enable,t.autoHideScrollbar=e.inArray(t.theme,["minimal","minimal-dark"])>-1||t.autoHideScrollbar,t.scrollbarPosition=e.inArray(t.theme,["minimal","minimal-dark"])>-1?"outside":t.scrollbarPosition},f=function(e){i[e]&&(clearTimeout(i[e]),J(i,e))},m=function(e){return"yx"===e||"xy"===e||"auto"===e?"yx":"x"===e||"horizontal"===e?"x":"y"},h=function(e){return"stepped"===e||"pixels"===e||"step"===e||"click"===e?"stepped":"stepless"},p=function(){var t=e(this),a=t.data("mCS"),n=a.opt,i=n.autoExpandScrollbar?" "+s[1]+"_expand":"",r=["<div id='mCSB_"+a.idx+"_scrollbar_vertical' class='mCSB_scrollTools mCSB_"+a.idx+"_scrollbar mCS-"+n.theme+" mCSB_scrollTools_vertical"+i+"'><div class='"+s[12]+"'><div id='mCSB_"+a.idx+"_dragger_vertical' class='mCSB_dragger' style='position:absolute;'><div class='mCSB_dragger_bar' /></div></div><div class='mCSB_draggerRail' /></div>","<div id='mCSB_"+a.idx+"_scrollbar_horizontal' class='mCSB_scrollTools mCSB_"+a.idx+"_scrollbar mCS-"+n.theme+" mCSB_scrollTools_horizontal"+i+"'><div class='"+s[12]+"'><div id='mCSB_"+a.idx+"_dragger_horizontal' class='mCSB_dragger' style='position:absolute;'><div class='mCSB_dragger_bar' /></div></div><div class='mCSB_draggerRail' /></div>"],l="yx"===n.axis?"mCSB_vertical_horizontal":"x"===n.axis?"mCSB_horizontal":"mCSB_vertical",c="yx"===n.axis?r[0]+r[1]:"x"===n.axis?r[1]:r[0],d="yx"===n.axis?"<div id='mCSB_"+a.idx+"_container_wrapper' class='mCSB_container_wrapper' />":"",u=n.autoHideScrollbar?" "+s[6]:"",f="x"!==n.axis&&"rtl"===a.langDir?" "+s[7]:"";n.setWidth&&t.css("width",n.setWidth),n.setHeight&&t.css("height",n.setHeight),n.setLeft="y"!==n.axis&&"rtl"===a.langDir?"989999px":n.setLeft,t.addClass(o+" _mCS_"+a.idx+u+f).wrapInner("<div id='mCSB_"+a.idx+"' class='mCustomScrollBox mCS-"+n.theme+" "+l+"'><div id='mCSB_"+a.idx+"_container' class='mCSB_container' style='position:relative; top:"+n.setTop+"; left:"+n.setLeft+";' dir='"+a.langDir+"' /></div>");var m=e("#mCSB_"+a.idx),h=e("#mCSB_"+a.idx+"_container");"y"===n.axis||n.advanced.autoExpandHorizontalScroll||h.css("width",g(h)),"outside"===n.scrollbarPosition?("static"===t.css("position")&&t.css("position","relative"),t.css("overflow","visible"),m.addClass("mCSB_outside").after(c)):(m.addClass("mCSB_inside").append(c),h.wrap(d)),x.call(this);var p=[e("#mCSB_"+a.idx+"_dragger_vertical"),e("#mCSB_"+a.idx+"_dragger_horizontal")];p[0].css("min-height",p[0].height()),p[1].css("min-width",p[1].width())},g=function(t){var o=[t[0].scrollWidth,Math.max.apply(Math,t.children().map(function(){return e(this).outerWidth(!0)}).get())],a=t.parent().width();return o[0]>a?o[0]:o[1]>a?o[1]:"100%"},v=function(){var t=e(this),o=t.data("mCS"),a=o.opt,n=e("#mCSB_"+o.idx+"_container");if(a.advanced.autoExpandHorizontalScroll&&"y"!==a.axis){n.css({width:"auto","min-width":0,"overflow-x":"scroll"});var i=Math.ceil(n[0].scrollWidth);3===a.advanced.autoExpandHorizontalScroll||2!==a.advanced.autoExpandHorizontalScroll&&i>n.parent().width()?n.css({width:i,"min-width":"100%","overflow-x":"inherit"}):n.css({"overflow-x":"inherit",position:"absolute"}).wrap("<div class='mCSB_h_wrapper' style='position:relative; left:0; width:999999px;' />").css({width:Math.ceil(n[0].getBoundingClientRect().right+.4)-Math.floor(n[0].getBoundingClientRect().left),"min-width":"100%",position:"relative"}).unwrap()}},x=function(){var t=e(this),o=t.data("mCS"),a=o.opt,n=e(".mCSB_"+o.idx+"_scrollbar:first"),i=$(a.scrollButtons.tabindex)?"tabindex='"+a.scrollButtons.tabindex+"'":"",r=["<a href='#' class='"+s[13]+"' "+i+" />","<a href='#' class='"+s[14]+"' "+i+" />","<a href='#' class='"+s[15]+"' "+i+" />","<a href='#' class='"+s[16]+"' "+i+" />
40249"],l=["x"===a.axis?r[2]:r[0],"x"===a.axis?r[3]:r[1],r[2],r[3]];a.scrollButtons.enable&&n.prepend(l[0]).append(l[1]).next(".mCSB_scrollTools").prepend(l[2]).append(l[3])},S=function(){var t=e(this),o=t.data("mCS"),a=e("#mCSB_"+o.idx),n=e("#mCSB_"+o.idx+"_container"),i=[e("#mCSB_"+o.idx+"_dragger_vertical"),e("#mCSB_"+o.idx+"_dragger_horizontal")],l=[a.height()/n.outerHeight(!1),a.width()/n.outerWidth(!1)],s=[parseInt(i[0].css("min-height")),Math.round(l[0]*i[0].parent().height()),parseInt(i[1].css("min-width")),Math.round(l[1]*i[1].parent().width())],c=r&&s[1]<s[0]?s[0]:s[1],d=r&&s[3]<s[2]?s[2]:s[3];i[0].css({height:c,"max-height":i[0].parent().height()-10}).find(".mCSB_dragger_bar").css({"line-height":s[0]+"px"}),i[1].css({width:d,"max-width":i[1].parent().width()-10})},_=function(){var t=e(this),o=t.data("mCS"),a=e("#mCSB_"+o.idx),n=e("#mCSB_"+o.idx+"_container"),i=[e("#mCSB_"+o.idx+"_dragger_vertical"),e("#mCSB_"+o.idx+"_dragger_horizontal")],r=[n.outerHeight(!1)-a.height(),n.outerWidth(!1)-a.width()],l=[r[0]/(i[0].parent().height()-i[0].height()),r[1]/(i[1].parent().width()-i[1].width())];o.scrollRatio={y:l[0],x:l[1]}},w=function(e,t,o){var a=o?s[0]+"_expanded":"",n=e.closest(".mCSB_scrollTools");"active"===t?(e.toggleClass(s[0]+" "+a),n.toggleClass(s[1]),e[0]._draggable=e[0]._draggable?0:1):e[0]._draggable||("hide"===t?(e.removeClass(s[0]),n.removeClass(s[1])):(e.addClass(s[0]),n.addClass(s[1])))},C=function(){var t=e(this),o=t.data("mCS"),a=e("#mCSB_"+o.idx),n=e("#mCSB_"+o.idx+"_container"),i=null==o.overflowed?n.height():n.outerHeight(!1),r=null==o.overflowed?n.width():n.outerWidth(!1),l=n[0].scrollHeight,s=n[0].scrollWidth;return l>i&&(i=l),s>r&&(r=s),[i>a.height(),r>a.width()]},b=function(){var t,o,a=e(this),n=a.data("mCS"),i=n.opt,r=e("#mCSB_"+n.idx),l=e("#mCSB_"+n.idx+"_container"),s=[e("#mCSB_"+n.idx+"_dragger_vertical"),e("#mCSB_"+n.idx+"_dragger_horizontal")];X(a),("x"!==i.axis&&!n.overflowed[0]||"y"===i.axis&&n.overflowed[0])&&(s[0].add(l).css("top",0),N(a,"_resetY")),("y"!==i.axis&&!n.overflowed[1]||"x"===i.axis&&n.overflowed[1])&&(t=o=0,"rtl"===n.langDir&&(t=r.width()-l.outerWidth(!1),o=Math.abs(t/n.scrollRatio.x)),l.css("left",t),s[1].css("left",o),N(a,"_resetX"))},y=function(){var t=e(this),o=t.data("mCS"),a=o.opt;if(!o.bindEvents){var n;if(M.call(this),a.contentTouchScroll&&O.call(this),I.call(this),a.mouseWheel.enable)!function o(){n=setTimeout(function(){e.event.special.mousewheel?(clearTimeout(n),D.call(t[0])):o()},100)}();L.call(this),P.call(this),a.advanced.autoScrollOnFocus&&z.call(this),a.scrollButtons.enable&&H.call(this),a.keyboard.enable&&U.call(this),o.bindEvents=!0}},B=function(){var t=e(this),o=t.data("mCS"),a=o.opt,n="mCS_"+o.idx,i=".mCSB_"+o.idx+"_scrollbar",r=e("#mCSB_"+o.idx+",#mCSB_"+o.idx+"_container,#mCSB_"+o.idx+"_container_wrapper,"+i+" ."+s[12]+",#mCSB_"+o.idx+"_dragger_vertical,#mCSB_"+o.idx+"_dragger_horizontal,"+i+">a"),l=e("#mCSB_"+o.idx+"_container");if(a.advanced.releaseDraggableSelectors&&r.add(e(a.advanced.releaseDraggableSelectors)),a.advanced.extraDraggableSelectors&&r.add(e(a.advanced.extraDraggableSelectors)),o.bindEvents){var c=W()?top.document:document;e(document).add(e(c)).unbind("."+n),r.each(function(){e(this).unbind("."+n)}),clearTimeout(t[0]._focusTimeout),J(t[0],"_focusTimeout"),clearTimeout(o.sequential.step),J(o.sequential,"step"),clearTimeout(l[0].onCompleteTimeout),J(l[0],"onCompleteTimeout"),o.bindEvents=!1}},T=function(t){var o=e(this),a=o.data("mCS"),n=a.opt,i=e("#mCSB_"+a.idx+"_container_wrapper"),r=i.length?i:e("#mCSB_"+a.idx+"_container"),l=[e("#mCSB_"+a.idx+"_scrollbar_vertical"),e("#mCSB_"+a.idx+"_scrollbar_horizontal")],c=[l[0].find(".mCSB_dragger"),l[1].find(".mCSB_dragger")];"x"!==n.axis&&(a.overflowed[0]&&!t?(l[0].add(c[0]).add(l[0].children("a")).css("display","block"),r.removeClass(s[8]+" "+s[10])):(n.alwaysShowScrollbar?(2!==n.alwaysShowScrollbar&&c[0].css("display","none"),r.removeClass(s[10])):(l[0].css("display","none"),r.addClass(s[10])),r.addClass(s[8]))),"y"!==n.axis&&(a.overflowed[1]&&!t?(l[1].add(c[1]).add(l[1].children("a")).css("display","block"),r.removeClass(s[9]+" "+s[11])):(n.alwaysShowScrollbar?(2!==n.alwaysShowScrollbar&&c[1].css("display","none"),r.removeClass(s[11])):(l[1].css("display","none"),r.addClass(s[11])),r.addClass(s[9]))),a.overflowed[0]||a.overflowed[1]?o.removeClass(s[5]):o.addClass(s[5])},k=function(t){var o=t.type,a=t.target.ownerDocument!==document&&null!==frameElement?[e(frameElement).offset().top,e(frameElement).offset().left]:null,n=W()&&t.target.ownerDocument!==top.document&&null!==frameElement?[e(t.view.frameElement).offset().top,e(t.view.frameElement).offset().left]:[0,0];switch(o){case"pointerdown":case"MSPointerDown":case"pointermove":case"MSPointerMove":case"pointerup":case"MSPointerUp":return a?[t.originalEvent.pageY-a[0]+n[0],t.originalEvent.pageX-a[1]+n[1],!1]:[t.originalEvent.pageY,t.originalEvent.pageX,!1];case"touchstart":case"touchmove":case"touchend":var i=t.originalEvent.touches[0]||t.originalEvent.changedTouches[0],r=t.originalEvent.touches.length||t.originalEvent.changedTouches.length;return t.target.ownerDocument!==document?[i.screenY,i.screenX,r>
402491]:[i.pageY,i.pageX,r>1];default:return a?[t.pageY-a[0]+n[0],t.pageX-a[1]+n[1],!1]:[t.pageY,t.pageX,!1]}},M=function(){var t,o,a,n=e(this),i=n.data("mCS"),s=i.opt,c="mCS_"+i.idx,d=["mCSB_"+i.idx+"_dragger_vertical","mCSB_"+i.idx+"_dragger_horizontal"],u=e("#mCSB_"+i.idx+"_container"),f=e("#"+d[0]+",#"+d[1]),m=s.advanced.releaseDraggableSelectors?f.add(e(s.advanced.releaseDraggableSelectors)):f,h=W()?top.document:document,p=s.advanced.extraDraggableSelectors?e(h).add(e(s.advanced.extraDraggableSelectors)):e(h);function g(e,o,a,r){if(u[0].idleTimer=s.scrollInertia<233?250:0,t.attr("id")===d[1])var l="x",c=(t[0].offsetLeft-o+r)*i.scrollRatio.x;else var l="y",c=(t[0].offsetTop-e+a)*i.scrollRatio.y;N(n,c.toString(),{dir:l,drag:!0})}f.bind("contextmenu."+c,function(e){e.preventDefault()}).bind("mousedown."+c+" touchstart."+c+" pointerdown."+c+" MSPointerDown."+c,function(i){if(i.stopImmediatePropagation(),i.preventDefault(),K(i)){l=!0,r&&(document.onselectstart=function(){return!1}),R.call(u,!1),X(n);var c=(t=e(this)).offset(),d=k(i)[0]-c.top,f=k(i)[1]-c.left,m=t.height()+c.top,h=t.width()+c.left;d<m&&d>0&&f<h&&f>0&&(o=d,a=f),w(t,"active",s.autoExpandScrollbar)}}).bind("touchmove."+c,function(e){e.stopImmediatePropagation(),e.preventDefault();var n=t.offset(),i=k(e)[0]-n.top,r=k(e)[1]-n.left;g(o,a,i,r)}),e(document).add(p).bind("mousemove."+c+" pointermove."+c+" MSPointerMove."+c,function(e){if(t){var n=t.offset(),i=k(e)[0]-n.top,r=k(e)[1]-n.left;if(o===i&&a===r)return;g(o,a,i,r)}}).add(m).bind("mouseup."+c+" touchend."+c+" pointerup."+c+" MSPointerUp."+c,function(e){t&&(w(t,"active",s.autoExpandScrollbar),t=null),l=!1,r&&(document.onselectstart=null),R.call(u,!0)})},O=function(){var o,a,n,i,r,s,c,d,u,f,m,h,p,g,v=e(this),x=v.data("mCS"),S=x.opt,_="mCS_"+x.idx,w=e("#mCSB_"+x.idx),C=e("#mCSB_"+x.idx+"_container"),b=[e("#mCSB_"+x.idx+"_dragger_vertical"),e("#mCSB_"+x.idx+"_dragger_horizontal")],y=[],B=[],T=0,M="yx"===S.axis?"none":"all",O=[],I=C.find("iframe"),D=["touchstart."+_+" pointerdown."+_+" MSPointerDown."+_,"touchmove."+_+" pointermove."+_+" MSPointerMove."+_,"touchend."+_+" pointerup."+_+" MSPointerUp."+_],E=void 0!==document.body.style.touchAction&&""!==document.body.style.touchAction;function R(e){if(!Z(e)||l||k(e)[2])t=0;else{t=1,p=0,g=0,o=1,v.removeClass("mCS_touch_action");var i=C.offset();a=k(e)[0]-i.top,n=k(e)[1]-i.left,O=[k(e)[0],k(e)[1]]}}function A(e){if(Z(e)&&!l&&!k(e)[2]&&(S.documentTouchScroll||e.preventDefault(),e.stopImmediatePropagation(),(!g||p)&&o)){c=Q();var t=w.offset(),i=k(e)[0]-t.top,r=k(e)[1]-t.left;if(y.push(i),B.push(r),O[2]=Math.abs(k(e)[0]-O[0]),O[3]=Math.abs(k(e)[1]-O[1]),x.overflowed[0])var s=b[0].parent().height()-b[0].height(),d=a-i>0&&i-a>-s*x.scrollRatio.y&&(2*O[3]<O[2]||"yx"===S.axis);if(x.overflowed[1])var u=b[1].parent().width()-b[1].width(),f=n-r>0&&r-n>-u*x.scrollRatio.x&&(2*O[2]<O[3]||"yx"===S.axis);d||f?(E||e.preventDefault(),p=1):(g=1,v.addClass("mCS_touch_action")),E&&e.preventDefault(),m="yx"===S.axis?[a-i,n-r]:"x"===S.axis?[null,n-r]:[a-i,null],C[0].idleTimer=250,x.overflowed[0]&&H(m[0],T,"mcsLinearOut","y","all",!0),x.overflowed[1]&&H(m[1],T,"mcsLinearOut","x",M,!0)}}function L(e){if(!Z(e)||l||k(e)[2])t=0;else{t=1,e.stopImmediatePropagation(),X(v),s=Q();var o=w.offset();i=k(e)[0]-o.top,r=k(e)[1]-o.left,y=[],B=[]}}function z(e){if(Z(e)&&!l&&!k(e)[2]){o=0,e.stopImmediatePropagation(),p=0,g=0,d=Q();var t=w.offset(),a=k(e)[0]-t.top,n=k(e)[1]-t.left;if(!(d-c>30)){var v=(f=1e3/(d-s))<2.5,_=v?[y[y.length-2],B[B.length-2]]:[0,0];u=v?[a-_[0],n-_[1]]:[a-i,n-r];var b=[Math.abs(u[0]),Math.abs(u[1])];f=v?[Math.abs(u[0]/4),Math.abs(u[1]/4)]:[f,f];var T=[Math.abs(C[0].offsetTop)-u[0]*P(b[0]/f[0],f[0]),Math.abs(C[0].offsetLeft)-u[1]*P(b[1]/f[1],f[1])];m="yx"===S.axis?[T[0],T[1]]:"x"===S.axis?[null,T[1]]:[T[0],null],h=[4*b[0]+S.scrollInertia,4*b[1]+S.scrollInertia];var O=parseInt(S.contentTouchScroll)||0;m[0]=b[0]>O?m[0]:0,m[1]=b[1]>O?m[1]:0,x.overflowed[0]&&H(m[0],h[0],"mcsEaseOut","y",M,!1),x.overflowed[1]&&H(m[1],h[1],"mcsEaseOut","x",M,!1)}}}function P(e,t){var o=[1.5*t,2*t,t/1.5,t/2];return e>90?t>4?o[0]:o[3]:e>60?t>3?o[3]:o[2]:e>30?t>8?o[1]:t>6?o[0]:t>4?t:o[2]:t>8?t:o[3]}function H(e,t,o,a,n,i){e&&N(v,e.toString(),{dur:t,scrollEasing:o,dir:a,over
vendor: 13,158 bytes, line 40249
40249write:n,drag:i})}C.bind(D[0],function(e){R(e)}).bind(D[1],function(e){A(e)}),w.bind(D[0],function(e){L(e)}).bind(D[2],function(e){z(e)}),I.length&&I.each(function(){e(this).bind("load",function(){W(this)&&e(this.contentDocument||this.contentWindow.document).bind(D[0],function(e){R(e),L(e)}).bind(D[1],function(e){A(e)}).bind(D[2],function(e){z(e)})})})},I=function(){var o,a=e(this),n=a.data("mCS"),i=n.opt,r=n.sequential,s="mCS_"+n.idx,c=e("#mCSB_"+n.idx+"_container"),d=c.parent();function u(e,t,n){r.type=n&&o?"stepped":"stepless",r.scrollAmount=10,F(a,e,t,"mcsLinearOut",n?60:null)}c.bind("mousedown."+s,function(e){t||o||(o=1,l=!0)}).add(document).bind("mousemove."+s,function(e){if(!t&&o&&(window.getSelection?window.getSelection().toString():document.selection&&"Control"!=document.selection.type&&document.selection.createRange().text)){var a=c.offset(),l=k(e)[0]-a.top+c[0].offsetTop,s=k(e)[1]-a.left+c[0].offsetLeft;l>0&&l<d.height()&&s>0&&s<d.width()?r.step&&u("off",null,"stepped"):("x"!==i.axis&&n.overflowed[0]&&(l<0?u("on",38):l>d.height()&&u("on",40)),"y"!==i.axis&&n.overflowed[1]&&(s<0?u("on",37):s>d.width()&&u("on",39)))}}).bind("mouseup."+s+" dragend."+s,function(e){t||(o&&(o=0,u("off",null)),l=!1)})},D=function(){if(e(this).data("mCS")){var t=e(this),o=t.data("mCS"),a=o.opt,n="mCS_"+o.idx,i=e("#mCSB_"+o.idx),l=[e("#mCSB_"+o.idx+"_dragger_vertical"),e("#mCSB_"+o.idx+"_dragger_horizontal")],s=e("#mCSB_"+o.idx+"_container").find("iframe");s.length&&s.each(function(){e(this).bind("load",function(){W(this)&&e(this.contentDocument||this.contentWindow.document).bind("mousewheel."+n,function(e,t){c(e,t)})})}),i.bind("mousewheel."+n,function(e,t){c(e,t)})}function c(n,s){if(X(t),!A(t,n.target)){var c="auto"!==a.mouseWheel.deltaFactor?parseInt(a.mouseWheel.deltaFactor):r&&n.deltaFactor<100?100:n.deltaFactor||100,d=a.scrollInertia;if("x"===a.axis||"x"===a.mouseWheel.axis)var u="x",f=[Math.round(c*o.scrollRatio.x),parseInt(a.mouseWheel.scrollAmount)],m="auto"!==a.mouseWheel.scrollAmount?f[1]:f[0]>=i.width()?.9*i.width():f[0],h=Math.abs(e("#mCSB_"+o.idx+"_container")[0].offsetLeft),p=l[1][0].offsetLeft,g=l[1].parent().width()-l[1].width(),v="y"===a.mouseWheel.axis?n.deltaY||s:n.deltaX;else var u="y",f=[Math.round(c*o.scrollRatio.y),parseInt(a.mouseWheel.scrollAmount)],m="auto"!==a.mouseWheel.scrollAmount?f[1]:f[0]>=i.height()?.9*i.height():f[0],h=Math.abs(e("#mCSB_"+o.idx+"_container")[0].offsetTop),p=l[0][0].offsetTop,g=l[0].parent().height()-l[0].height(),v=n.deltaY||s;"y"===u&&!o.overflowed[0]||"x"===u&&!o.overflowed[1]||((a.mouseWheel.invert||n.webkitDirectionInvertedFromDevice)&&(v=-v),a.mouseWheel.normalizeDelta&&(v=v<0?-1:1),(v>0&&0!==p||v<0&&p!==g||a.mouseWheel.preventDefault)&&(n.stopImmediatePropagation(),n.preventDefault()),n.deltaFactor<5&&!a.mouseWheel.normalizeDelta&&(m=n.deltaFactor,d=17),N(t,(h-v*m).toString(),{dir:u,dur:d}))}}},E=new Object,W=function(t){var o=!1,a=!1,n=null;if(void 0===t?a="#empty":void 0!==e(t).attr("id")&&(a=e(t).attr("id")),!1!==a&&void 0!==E[a])return E[a];if(t){try{var i=t.contentDocument||t.contentWindow.document;n=i.body.innerHTML}catch(e){}o=null!==n}else{try{var i=top.document;n=i.body.innerHTML}catch(e){}o=null!==n}return!1!==a&&(E[a]=o),o},R=function(e){var t=this.find("iframe");if(t.length){var o=e?"auto":"none";t.css("pointer-events",o)}},A=function(t,o){var a=o.nodeName.toLowerCase(),n=t.data("mCS").opt.mouseWheel.disableOver;return e.inArray(a,n)>-1&&!(e.inArray(a,["select","textarea"])>-1&&!e(o).is(":focus"))},L=function(){var t,o=e(this),a=o.data("mCS"),n="mCS_"+a.idx,i=e("#mCSB_"+a.idx+"_container"),r=i.parent(),c=e(".mCSB_"+a.idx+"_scrollbar ."+s[12]);c.bind("mousedown."+n+" touchstart."+n+" pointerdown."+n+" MSPointerDown."+n,function(o){l=!0,e(o.target).hasClass("mCSB_dragger")||(t=1)}).bind("touchend."+n+" pointerup."+n+" MSPointerUp."+n,function(e){l=!1}).bind("click."+n,function(n){if(t&&(t=0,e(n.target).hasClass(s[12])||e(n.target).hasClass("mCSB_draggerRail"))){X(o);var l=e(this),c=l.find(".mCSB_dragger");if(l.parent(".mCSB_scrollTools_horizontal").length>0){if(!a.overflowed[1])return;var d="x",u=n.pageX>c.offset().left?-1:1,f=Math.abs(i[0].offsetLeft)-u*(.9*r.width())}else{if(!a.overflowed[0])return;var d="y",u=n.pageY>c.offset().top?-1:1,f=Math.abs(i[0].offsetTop)-u*(.9*r.height())}N(o,f.toString(),{dir:d,scrollEasing:"mcsEaseInOut"})}})},z=function(){var t=e(this),o=t.data("mCS"),a=o.opt,n="mCS_"+o.idx,i=e("#mCSB_"+o.idx+"_container"),r=i.parent();i.bind("focusin."+n,function(o){var n=e(document.activeElement),l=i.find(".mCustomScrollBox").length;n.is(a.advanced.autoScrollOnFocus)&&(X(t),clearTimeout(t[0]._focusTimeout),t[0]._focusTimer=l?17*l:0,t[0]._focusTimeout=setTimeout(function(){var e=[ee(n)[0],ee(n)[1]],o=[i[0].offsetTop,i[0].offsetLeft],l=[o[0]+e[0]>=0&&o[0]+e[0]<r.height()-n.outerHeight(!1),o[1]+e[1]>=0&&o[0]+e[1]<r.width()-n.outerWidth(!1)],s="yx"!==a.axis||l[0]||l[1]?"all":"none";"x"===a.axis||l[0]||N(t,e[0].toString(),{dir:"y",scrollEasing:"mcsEaseInOut",overwrite:s,dur:0}),"y"===a.axis||l[1]||N(t,e[1].toString(),{dir:"x",scrollEasing:"mcsEaseInOut",overwrite:s,dur:0})},t[0]._focusTimer))})},P=function(){var t=e(this),o=t.data("mCS"),a="mCS_"+o.idx,n=e("#mCSB_"+o.idx+"_container").parent();n.bind("scroll."+a,function(t){0===n.scrollTop()&&0===n.scrollLeft()||e(".mCSB_"+o.idx+"_scrollbar").css("visibility","hidden")})},H=function(){var t=e(this),o=t.data("mCS"),a=o.opt,n=o.sequential,i="mCS_"+o.idx,r=".mCSB_"+o.idx+"_scrollbar",s=e(r+">a");s.bind("contextmenu."+i,function(e){e.preventDefault()}).bind("mousedown."+i+" touchstart."+i+" pointerdown."+i+" MSPointerDown."+i+" mouseup."+i+" touchend."+i+" pointerup."+i+" MSPointerUp."+i+" mouseout."+i+" pointerout."+i+" MSPointerOut."+i+" click."+i,function(i){if(i.preventDefault(),K(i)){var r=e(this).attr("class");switch(n.type=a.scrollButtons.scrollType,i.type){case"mousedown":case"touchstart":case"pointerdown":case"MSPointerDown":if("stepped"===n.type)return;l=!0,o.tweenRunning=!1,s("on",r);break;case"mouseup":case"touchend":case"pointerup":case"MSPointerUp":case"mouseout":case"pointerout":case"MSPointerOut":if("stepped"===n.type)return;l=!1,n.dir&&s("off",r);break;case"click":if("stepped"!==n.type||o.tweenRunning)return;s("on",r)}}function s(e,o){n.scrollAmount=a.scrollButtons.scrollAmount,F(t,e,o)}})},U=function(){var t=e(this),o=t.data("mCS"),a=o.opt,n=o.sequential,i="mCS_"+o.idx,r=e("#mCSB_"+o.idx),l=e("#mCSB_"+o.idx+"_container"),s=l.parent(),c="input,textarea,select,datalist,keygen,[contenteditable='true']",d=l.find("iframe"),u=["blur."+i+" keydown."+i+" keyup."+i];function f(i){switch(i.type){case"blur":o.tweenRunning&&n.dir&&h("off",null);break;case"keydown":case"keyup":var r=i.keyCode?i.keyCode:i.which,d="on";if("x"!==a.axis&&(38===r||40===r)||"y"!==a.axis&&(37===r||39===r)){if((38===r||40===r)&&!o.overflowed[0]||(37===r||39===r)&&!o.overflowed[1])return;"keyup"===i.type&&(d="off"),e(document.activeElement).is(c)||(i.preventDefault(),i.stopImmediatePropagation(),h(d,r))}else if(33===r||34===r){if((o.overflowed[0]||o.overflowed[1])&&(i.preventDefault(),i.stopImmediatePropagation()),"keyup"===i.type){X(t);var u=34===r?-1:1;if("x"===a.axis||"yx"===a.axis&&o.overflowed[1]&&!o.overflowed[0])var f="x",m=Math.abs(l[0].offsetLeft)-u*(.9*s.width());else var f="y",m=Math.abs(l[0].offsetTop)-u*(.9*s.height());N(t,m.toString(),{dir:f,scrollEasing:"mcsEaseInOut"})}}else if((35===r||36===r)&&!e(document.activeElement).is(c)&&((o.overflowed[0]||o.overflowed[1])&&(i.preventDefault(),i.stopImmediatePropagation()),"keyup"===i.type)){if("x"===a.axis||"yx"===a.axis&&o.overflowed[1]&&!o.overflowed[0])var f="x",m=35===r?Math.abs(s.width()-l.outerWidth(!1)):0;else var f="y",m=35===r?Math.abs(s.height()-l.outerHeight(!1)):0;N(t,m.toString(),{dir:f,scrollEasing:"mcsEaseInOut"})}}function h(e,i){n.type=a.keyboard.scrollType,n.scrollAmount=a.keyboard.scrollAmount,"stepped"===n.type&&o.tweenRunning||F(t,e,i)}}d.length&&d.each(function(){e(this).bind("load",function(){W(this)&&e(this.contentDocument||this.contentWindow.document).bind(u[0],function(e){f(e)})})}),r.attr("tabindex","0").bind(u[0],function(e){f(e)})},F=function(t,o,a,n,i){var r=t.data("mCS"),l=r.opt,c=r.sequential,d=e("#mCSB_"+r.idx+"_container"),u="stepped"===c.type,f=l.scrollInertia<26?26:l.scrollInertia,m=l.scrollInertia<1?17:l.scrollInertia;switch(o){case"on":if(c.dir=[a===s[16]||a===s[15]||39===a||37===a?"x":"y",a===s[13]||a===s[15]||38===a||37===a?-1:1],X(t),$(a)&&"stepped"===c.type)return;h(u);break;case"off":clearTimeout(c.step),J(c,"step"),X(t),(u||r.tweenRunning&&c.dir)&&h(!0)}function h(e){l.snapAmount&&(c.scrollAmount=l.snapAmount instanceof Array?"x"===c.dir[0]?l.snapAmount[1]:l.snapAmount[0]:l.snapAmount);var o="stepped"!==c.type,a=i||(e?o?f/1.5:m:1e3/60),s=e?o?7.5:40:2.5,u=[Math.abs(d[0].offsetTop),Math.abs(d[0].offsetLeft)],p=[r.scrollRatio.y>10?10:r.scrollRatio.y,r.scrollRatio.x>10?10:r.scrollRatio.x],g="x"===c.dir[0]?u[1]+c.dir[1]*(p[1]*s):u[0]+c.dir[1]*(p[0]*s),v="x"===c.dir[0]?u[1]+c.dir[1]*parseInt(c.scrollAmount):u[0]+c.dir[1]*parseInt(c.scrollAmount),x="auto"!==c.scrollAmount?v:g,S=n||(e?o?"mcsLinearOut":"mcsEaseInOut":"mcsLinear"),_=!!e;e&&a<17&&(x="x"===c.dir[0]?u[1]:u[0]),N(t,x.toString(),{dir:c.dir[0],scrollEasing:S,dur:a,onComplete:_}),e?c.dir=!1:(clearTimeout(c.step),c.step=setTimeout(function(){h()},a))}},q=function(t){var o=e(this).data("mCS").opt,a=[];return"function"==typeof t&&(t=t()),t instanceof Array?a=t.length>1?[t[0],t[1]]:"x"===o.axis?[null,t[0]]:[t[0],null]:(a[0]=t.y?t.y:t.x||"x"===o.axis?null:t,a[1]=t.x?t.x:t.y||"y"===o.axis?null:t),"function"==typeof a[0]&&(a[0]=a[0]()),"function"==typeof a[1]&&(a[1]=a[1]()),a},j=function(t,o){if(null!=t&&void 0!==t){var a=e(this),n=a.data("mCS"),i=n.opt,r=e("#mCSB_"+n.idx+"_container"),l=r.parent(),s=typeof t;o||(o="x"===i.axis?"x":"y");var d="x"===o?r.outerWidth(!1)-l.width():r.outerHeight(!1)-l.height(),u="x"===o?r[0].offsetLeft:r[0].offsetTop,f="x"===o?"left":"top";switch(s){case"function":return t();case"object":var m=t.jquery?t:e(t);if(!m.length)return;return"x"===o?ee(m)[1]:ee(m)[0];case"string":case"number":if($(t))return Math.abs(t);if(-1!==t.indexOf("%"))return Math.abs(d*parseInt(t)/100);if(-1!==t.indexOf("-="))return Math.abs(u-parseInt(t.split("-=")[1]));if(-1!==t.indexOf("+=")){var h=u+parseInt(t.split("+=")[1]);return h>=0?0:Math.abs(h)}if(-1!==t.indexOf("px")&&$(t.split("px")[0]))return Math.abs(t.split("px")[0]);if("top"===t||"left"===t)return 0;if("bottom"===t)return Math.abs(l.height()-r.outerHeight(!1));if("right"===t)return Math.abs(l.width()-r.outerWidth(!1));if("first"===t||"last"===t){var m=r.find(":"+t);return"x"===o?ee(m)[1]:ee(m)[0]}return e(t).length?"x"===o?ee(e(t))[1]:ee(e(t))[0]:(r.css(f,t),void c.update.call(null,a[0]))}}},Y=function(t){var o=e(this),a=o.data("mCS"),n=a.opt,i=e("#mCSB_"+a.idx+"_container");if(t)return clearTimeout(i[0].autoUpdate),void J(i[0],"autoUpdate");function r(e){clearTimeout(i[0].autoUpdate),c.update.call(null,o[0],e)}!function t(){clearTimeout(i[0].autoUpdate),0!==o.parents("html").length?i[0].autoUpdate=setTimeout(function(){return n.advanced.updateOnSelectorChange&&(a.poll.change.n=function(){!0===n.advanced.updateOnSelectorChange&&(n.advanced.updateOnSelectorChange="*");var e=0,t=i.find(n.advanced.updateOnSelectorChange);return n.advanced.updateOnSelectorChange&&t.length>0&&t.each(function(){e+=this.offsetHeight+this.offsetWidth}),e}(),a.poll.change.n!==a.poll.change.o)?(a.poll.change.o=a.poll.change.n,void r(3)):n.advanced.updateOnContentResize&&(a.poll.size.n=o[0].scrollHeight+o[0].scrollWidth+i[0].offsetHeight+o[0].offsetHeight+o[0].offsetWidth,a.poll.size.n!==a.poll.size.o)?(a.poll.size.o=a.poll.size.n,void r(1)):!n.advanced.updateOnImageLoad||"auto"===n.advanced.updateOnImageLoad&&"y"===n.axis||(a.poll.img.n=i.find("img").length,a.poll.img.n===a.poll.img.o)?void((n.advanced.updateOnSelectorChange||n.advanced.updateOnContentResize||n.advanced.updateOnImageLoad)&&t()):(a.poll.img.o=a.poll.img.n,void i.find("img").each(function(){!function(t){if(e(t).hasClass(s[2]))r();else{var o,a,n=new Image;n.onload=(o=n,a=function(){this.onload=null,e(t).addClass(s[2]),r(2)},function(){return a.apply(o,arguments)}),n.src=t.src}}(this)}))},n.advanced.autoUpdateTimeout):o=null}()},X=function(t){var o=t.data("mCS"),a=e("#mCSB_"+o.idx+"_container,#mCSB_"+o.idx+"_container_wrapper,#mCSB_"+o.idx+"_dragger_vertical,#mCSB_"+o.idx+"_dragger_horizontal");a.each(function(){G.call(this)})},N=function(t,o,a){var n=t.data("mCS"),i=n.opt,r={trigger:"internal",dir:"y",scrollEasing:"mcsEaseOut",drag:!1,dur:i.scrollInertia,overwrite:"all",callbacks:!0,onStart:!0,onUpdate:!0,onComplete:!0},a=e.extend(r,a),l=[a.dur,a.drag?0:a.dur],s=e("#mCSB_"+n.idx),c=e("#mCSB_"+n.idx+"_container"),d=c.parent(),u=i.callbacks.onTotalScrollOffset?q.call(t,i.callbacks.onTotalScrollOffset):[0,0],f=i.callbacks.onTotalScrollBackOffset?q.call(t,i.callbacks.onTotalScrollBackOffset):[0,0];if(n.trigger=a.trigger,0===d.scrollTop()&&0===d.scrollLeft()||(e(".mCSB_"+n.idx+"_scrollbar").css("visibility","visible"),d.scrollTop(0).scrollLeft(0)),"_resetY"!==o||n.contentReset.
40249y||(y("onOverflowYNone")&&i.callbacks.onOverflowYNone.call(t[0]),n.contentReset.y=1),"_resetX"!==o||n.contentReset.x||(y("onOverflowXNone")&&i.callbacks.onOverflowXNone.call(t[0]),n.contentReset.x=1),"_resetY"!==o&&"_resetX"!==o){if(!n.contentReset.y&&t[0].mcs||!n.overflowed[0]||(y("onOverflowY")&&i.callbacks.onOverflowY.call(t[0]),n.contentReset.x=null),!n.contentReset.x&&t[0].mcs||!n.overflowed[1]||(y("onOverflowX")&&i.callbacks.onOverflowX.call(t[0]),n.contentReset.x=null),i.snapAmount){var m=i.snapAmount instanceof Array?"x"===a.dir?i.snapAmount[1]:i.snapAmount[0]:i.snapAmount;o=function(e,t,o){return Math.round(e/t)*t-o}(o,m,i.snapOffset)}switch(a.dir){case"x":var h=e("#mCSB_"+n.idx+"_dragger_horizontal"),p="left",g=c[0].offsetLeft,v=[s.width()-c.outerWidth(!1),h.parent().width()-h.width()],x=[o,0===o?0:o/n.scrollRatio.x],S=u[1],_=f[1],C=S>0?S/n.scrollRatio.x:0,b=_>0?_/n.scrollRatio.x:0;break;case"y":var h=e("#mCSB_"+n.idx+"_dragger_vertical"),p="top",g=c[0].offsetTop,v=[s.height()-c.outerHeight(!1),h.parent().height()-h.height()],x=[o,0===o?0:o/n.scrollRatio.y],S=u[0],_=f[0],C=S>0?S/n.scrollRatio.y:0,b=_>0?_/n.scrollRatio.y:0}x[1]<0||0===x[0]&&0===x[1]?x=[0,0]:x[1]>=v[1]?x=[v[0],v[1]]:x[0]=-x[0],t[0].mcs||(B(),y("onInit")&&i.callbacks.onInit.call(t[0])),clearTimeout(c[0].onCompleteTimeout),V(h[0],p,Math.round(x[1]),l[1],a.scrollEasing),!n.tweenRunning&&(0===g&&x[0]>=0||g===v[0]&&x[0]<=v[0])||V(c[0],p,Math.round(x[0]),l[0],a.scrollEasing,a.overwrite,{onStart:function(){a.callbacks&&a.onStart&&!n.tweenRunning&&(y("onScrollStart")&&(B(),i.callbacks.onScrollStart.call(t[0])),n.tweenRunning=!0,w(h),n.cbOffsets=[i.callbacks.alwaysTriggerOffsets||g>=v[0]+S,i.callbacks.alwaysTriggerOffsets||g<=-_])},onUpdate:function(){a.callbacks&&a.onUpdate&&y("whileScrolling")&&(B(),i.callbacks.whileScrolling.call(t[0]))},onComplete:function(){if(a.callbacks&&a.onComplete){"yx"===i.axis&&clearTimeout(c[0].onCompleteTimeout);var e=c[0].idleTimer||0;c[0].onCompleteTimeout=setTimeout(function(){y("onScroll")&&(B(),i.callbacks.onScroll.call(t[0])),y("onTotalScroll")&&x[1]>=v[1]-C&&n.cbOffsets[0]&&(B(),i.callbacks.onTotalScroll.call(t[0])),y("onTotalScrollBack")&&x[1]<=b&&n.cbOffsets[1]&&(B(),i.callbacks.onTotalScrollBack.call(t[0])),n.tweenRunning=!1,c[0].idleTimer=0,w(h,"hide")},e)}}})}function y(e){return n&&i.callbacks[e]&&"function"==typeof i.callbacks[e]}function B(){var e=[c[0].offsetTop,c[0].offsetLeft],o=[h[0].offsetTop,h[0].offsetLeft],n=[c.outerHeight(!1),c.outerWidth(!1)],i=[s.height(),s.width()];t[0].mcs={content:c,top:e[0],left:e[1],draggerTop:o[0],draggerLeft:o[1],topPct:Math.round(100*Math.abs(e[0])/(Math.abs(n[0])-i[0])),leftPct:Math.round(100*Math.abs(e[1])/(Math.abs(n[1])-i[1])),direction:a.dir}}},V=function(e,t,o,a,n,i,r){e._mTween||(e._mTween={top:{},left:{}});var l,s,r=r||{},c=r.onStart||function(){},d=r.onUpdate||function(){},u=r.onComplete||function(){},f=Q(),m=0,h=e.offsetTop,p=e.style,g=e._mTween[t];"left"===t&&(h=e.offsetLeft);var v=o-h;function x(){g.stop||(m||c.call(),m=Q()-f,S(),m>=g.time&&(g.time=m>g.time?m+l-(m-g.time):m+l-1,g.time<m+1&&(g.time=m+1)),g.time<a?g.id=s(x):u.call())}function S(){a>0?(g.currVal=function(e,t,o,a,n){switch(n){case"linear":case"mcsLinear":return o*e/a+t;case"mcsLinearOut":return e/=a,e--,o*Math.sqrt(1-e*e)+t;case"easeInOutSmooth":return(e/=a/2)<1?o/2*e*e+t:-o/2*(--e*(e-2)-1)+t;case"easeInOutStrong":return(e/=a/2)<1?o/2*Math.pow(2,10*(e-1))+t:(e--,o/2*(2-Math.pow(2,-10*e))+t);case"easeInOut":case"mcsEaseInOut":return(e/=a/2)<1?o/2*e*e*e+t:o/2*((e-=2)*e*e+2)+t;case"easeOutSmooth":return e/=a,-o*(--e*e*e*e-1)+t;case"easeOutStrong":return o*(1-Math.pow(2,-10*e/a))+t;case"easeOut":case"mcsEaseOut":default:var i=(e/=a)*e,r=i*e;return t+o*(.499999999999997*r*i+-2.5*i*i+5.5*r+-6.5*i+4*e)}}(g.time,h,v,a,n),p[t]=Math.round(g.currVal)+"px"):p[t]=o+"px",d.call()}g.stop=0,"none"!==i&&null!=g.id&&(window.requestAnimationFrame?window.cancelAnimationFrame(g.id):clearTimeout(g.id),g.id=null),l=1e3/60,g.time=m+l,s=window.requestAnimationFrame?window.requestAnimationFrame:function(e){return S(),setTimeout(e,.01)},g.id=s(x)},Q=function(){return window.performance&&window.performance.now?window.performance.now():window.performance&&window.performance.webkitNow?window.performance.webkitNow():Date.now?Date.now():(new Date).getTime()},G=function(){var e=this;e._mTween||(e._mTween={top:{},left:{}});for(var t=["top","left"],o=0;o<t.length;o++){var a=t[o];e._mTween[a].id&&(window.requestAnimationFrame?window.cancelAnimationFrame(e._mTween[a].id):clearTimeout(e._mTween[a].id),e._mTween[a].id=null,e._mTween[a].stop=1)}},J=function(e,t){try{delete e[t]}catch(o){e[t]=null}},K=function(e){return!(e.which&&1!==e.which)},Z=function(e){var t=e.originalEvent.pointerType;return!(t&&"touch"!==t&&2!==t)},$=function(e){return!isNaN(parseFloat(e))&&isFinite(e)},ee=function(e){var t=e.parents(".mCSB_container");return[e.offset().top-t.offset().top,e.offset().left-t.offset().left]},te=function(){var e=function(){var e=["webkit","moz","ms","o"];if("hidden"in document)return"hidden";for(var t=0;t<e.length;t++)if(e[t]+"Hidden"in document)return e[t]+"Hidden";return null}();return!!e&&document[e]},e.fn[o]=function(t){return c[t]?c[t].apply(this,Array.prototype.slice.call(arguments,1
40249)):"object"!=typeof t&&t?void e.error("Method "+t+" does not exist"):c.init.apply(this,arguments)},e[o]=function(t){return c[t]?c[t].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof t&&t?void e.error("Method "+t+" does not exist"):c.init.apply(this,arguments)},e[o].defaults=a,window[o]=!0,e(window).bind("load",function(){e(".mCustomScrollbar")[o](),e.extend(e.expr[":"],{mcsInView:e.expr[":"].mcsInView||function(t){var o,a,n=e(t),i=n.parents(".mCSB_container");if(i.length)return o=i.parent(),(a=[i[0].offsetTop,i[0].offsetLeft])[0]+ee(n)[0]>=0&&a[0]+ee(n)[0]<o.height()-n.outerHeight(!1)&&a[1]+ee(n)[1]>=0&&a[1]+ee(n)[1]<o.width()-n.outerWidth(!1)},mcsInSight:e.expr[":"].mcsInSight||function(t,o,a){var n,i,r,l,s=e(t),c=s.parents(".mCSB_container"),d="exact"===a[3]?[[1,0],[1,0]]:[[.9,.1],[.6,.4]];if(c.length)return n=[s.outerHeight(!1),s.outerWidth(!1)],r=[c[0].offsetTop+ee(s)[0],c[0].offsetLeft+ee(s)[1]],i=[c.parent()[0].offsetHeight,c.parent()[0].offsetWidth],r[0]-i[0]*(l=[n[0]<i[0]?d[0]:d[1],n[1]<i[1]?d[0]:d[1]])[0][0]<0&&r[0]+n[0]-i[0]*l[0][1]>=0&&r[1]-i[1]*l[1][0]<0&&r[1]+n[1]-i[1]*l[1][1]>=0},mcsOverflow:e.expr[":"].mcsOverflow||function(t){var o=e(t).data("mCS");if(o)return o.overflowed[0]||o.overflowed[1]}})})});
40250
40251/* ========================================
40252 FILE: /includes/js/jquery.touchpunch.min.js
40253 ==================== */
40254
40255//jQuery UI Touch Punch 0.2.3
40256/*
40257!function(a){function f(a,b){if(!(a.originalEvent.touches.length>1)){a.preventDefault();var c=a.originalEvent.changedTouches[0],d=document.createEvent("MouseEvents");d.initMouseEvent(b,!0,!0,window,1,c.screenX,c.screenY,c.clientX,c.clientY,!1,!1,!1,!1,0,null),a.target.dispatchEvent(d);}}if(a.support.touch="ontouchend"in document,a.support.touch){var e,b=a.ui.mouse.prototype,c=b._mouseInit,d=b._mouseDestroy;b._touchStart=function(a){var b=this;!e&&b._mouseCapture(a.originalEvent.changedTouches[0])&&(e=!0,b._touchMoved=!1,f(a,"mouseover"),f(a,"mousemove"),f(a,"mousedown"));},b._touchMove=function(a){e&&(this._touchMoved=!0,f(a,"mousemove"));},b._touchEnd=function(a){e&&(f(a,"mouseup"),f(a,"mouseout"),this._touchMoved||f(a,"click"),e=!1);},b._mouseInit=function(){var b=this;b.element.bind({touchstart:a.proxy(b,"_touchStart"),touchmove:a.proxy(b,"_touchMove"),touchend:a.proxy(b,"_touchEnd")}),c.call(b);},b._mouseDestroy=function(){var b=this;b.element.unbind({touchstart:a.proxy(b,"_touchStart"),touchmove:a.proxy(b,"_touchMove"),touchend:a.proxy(b,"_touchEnd")}),d.call(b);};}}(jQuery);
40258*/
40259/*!
40260 * jQuery UI Touch Punch 1.0.8 as modified by RWAP Software
40261 * based on original touchpunch v0.2.3 which has not been updated since 2014
40262 *
40263 * Updates by RWAP Software to take account of various suggested changes on the original code issues
40264 *
40265 * Original: https://github.com/furf/jquery-ui-touch-punch
40266 * Copyright 2011–2014, Dave Furfero
40267 * Dual licensed under the MIT or GPL Version 2 licenses.
40268 *
40269 * Fork: https://github.com/RWAP/jquery-ui-touch-punch
40270 *
40271 * Depends:
40272 * jquery.ui.widget.js
40273 * jquery.ui.mouse.js
40274 */
40275!function(t){"function"==typeof define&&define.amd?define(["jquery","jquery.ui"],t):t(jQuery)}(function(t){function o(t){return{x:t.originalEvent.changedTouches[0].pageX,y:t.originalEvent.changedTouches[0].pageY}}function e(t,o){if(!(t.originalEvent.touches.length>1)){t.cancelable&&t.preventDefault();var e=t.originalEvent.changedTouches[0],n=document.createEvent("MouseEvents");n.initMouseEvent(o,!0,!0,window,1,e.screenX,e.screenY,e.clientX,e.clientY,!1,!1,!1,!1,0,null),t.target.dispatchEvent(n)}}if(t.support.mspointer=window.navigator.msPointerEnabled,t.support.touch="ontouchstart"in document||"ontouchstart"in window||window.TouchEvent||window.DocumentTouch&&document instanceof DocumentTouch||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0,(t.support.touch||t.support.mspointer)&&t.ui.mouse){var n,u=t.ui.mouse.prototype,c=u._mouseInit,i=u._mouseDestroy;u._touchStart=function(t){var u=this;this._startedMove=t.timeStamp,u._startPos=o(t),!n&&u._mouseCapture(t.originalEvent.changedTouches[0])&&(n=!0,u._touchMoved=!1,e(t,"mouseover"),e(t,"mousemove"),e(t,"mousedown"))},u._touchMove=function(t){n&&(this._touchMoved=!0,e(t,"mousemove"))},u._touchEnd=function(t){if(n){e(t,"mouseup"),e(t,"mouseout");var u=t.timeStamp-this._startedMove;if(!this._touchMoved||500>u)e(t,"click");else{var c=o(t);Math.abs(c.x-this._startPos.x)<10&&Math.abs(c.y-this._startPos.y)<10&&(this._touchMoved&&"stylus"!==t.originalEvent.changedTouches[0].touchType||e(t,"click"))}this._touchMoved=!1,n=!1}},u._mouseInit=function(){var o=this;t.support.mspointer&&(o.element[0].style.msTouchAction="none"),o.element.on({touchstart:t.proxy(o,"_touchStart"),touchmove:t.proxy(o,"_touchMove"),touchend:t.proxy(o,"_touchEnd")}),c.call(o)},u._mouseDestroy=function(){var o=this;o.element.off({touchstart:t.proxy(o,"_touchStart"),touchmove:t.proxy(o,"_touchMove"),touchend:t.proxy(o,"_touchEnd")}),i.call(o)}}});
40276
40277/* ========================================
40278 FILE: /templates/js/template.js
40279 ==================== */
40280
40281var script_manage_params = typeof script_manage_params === 'object' ? script_manage_params : {};
40282
40283//	contact.html.php
40284if( typeof script_manage_params.contact_chkas !== 'undefined' && script_manage_params.contact_chkas == '1' ){
40285	function checkAntispam() {
40286		if (document.emailForm.cs_as_v.value!='' && !isNaN(document.emailForm.cs_as_v.value)) {
40287			return validate();
40288		} else {
40289			if ( typeof script_manage_params.as_nan !== 'undefined' ) {
40290				alert(script_manage_params.as_nan);
40291			}
40292
40293			document.emailForm.cs_as_v.trigger('focus');
40294			return false;
40295		}
40296	}
40297}
40298
40299//	shop.cart.php
40300if( typeof script_manage_params['shop.cart_h2'] !== 'undefined' && script_manage_params['shop.cart_h2'] == '1' ) {
40301	function shop_cart_quantity_input_onkeydown( event, form_obj ) {
40302		var ret_val = false;
40303		if ( event.keyCode == 13 ) {
40304			if (form_obj.getAttribute('onsubmit')!='') ret_val = form_obj.onsubmit();
40305
40306			//bonus system (nedovol pridat polozku ktora by prekrocila vysku nazbieraneho bonusu)
40307			// string 'Ym9udXM=' znamena 'bonus' len je zakodovany v base64
40308			if (Cookies.get('bonusShoppingMode') == 'Ym9udXM=' && jQuery('.bonus-system-cart-wrapper').length > 0) {
40309
40310				var cart_id             = jQuery(form_obj).find('input[name=idx]').val();
40311				var actualBonusAmount   = jQuery('.bonus-system-cart-wrapper .bonus-amount-lbl strong').html().split(' ')[0];
40312				var originalQty         = js_cart_items[cart_id].quantity;
40313				var actualQty           = jQuery(form_obj).find('input[name=quantity]').val();
40314
40315				if (actualBonusAmount < (actualQty - originalQty) * js_cart_items[cart_id].product_price) {
40316					vex.dialog.alert(js_lang_bonus_system_not_enough_credit);
40317					event.preventDefault();
40318					ret_val = false;
40319				}
40320			}
40321
40322			if (ret_val) form_obj.submit();
40323		}
40324		return ret_val;
40325	}
40326}
40327
40328//	shop.product_details, ps_product_attribute.php
40329if( typeof script_manage_params['shop.product_details_ps_pa'] !== 'undefined' && script_manage_params['shop.product_details_ps_pa'] == '1' ){
40330	function js_custom_attribute_submit_addtocart() {
40331		var isvalid = true;
40332		if (typeof script_manage_params.rr == 'object') {
40333			for (var i in script_manage_params.rr) {
40334				var ref_required1 = script_manage_params.rr[i];
40335					if ( (typeof document.getElementById('addtocart')[ref_required1] === 'undefined' || document.getElementById('addtocart')[ref_required1].value == "") && (document.getElementById(ref_required1 +'_field').value == "") ) {
40336						if ( isDesignTools()){
40337							jQuery('#'+ ref_required1 + '_field').parents('.product-custom-attribute:first').addClass('error');
40338						}else{
40339							document.getElementById(ref_required1 + '_label_div').style.color   = "red";
40340							document.getElementById(ref_required1 + '_field').style.borderColor = "red";
40341						}
40342						isvalid                                                             = false;
40343					} else {
40344						if ( isDesignTools()){
40345							jQuery('#'+ ref_required1 + '_field').parents('.product-custom-attribute:first').removeClass('error');
40346						} else {
40347							document.getElementById(ref_required1 + '_label_div').style.color   = "";
40348							document.getElementById(ref_required1 + '_field').style.borderColor = "";
40349						}
40350					}
40351			}
40352		}
40353		if (!isvalid && typeof script_manage_params.vml_wchffv !== 'undefined') {
40354			jQuery('#addtocart').addClass('custom_attribute_submit_error');
40355			if (isDesignTools()) {
40356				vex.dialog.alert({message: '', input: script_manage_params.vml_wchffv});
40357			} else {
40358				alert(script_manage_params.vml_wchffv);
40359			}
40360		}
40361		return isvalid;
40362	}
40363}
40364if (typeof script_manage_params.dcid !== 'undefined' && script_manage_params.dcid) {
40365	var displayed_category_id = script_manage_params.dcid;
40366}
40367//	shop.browse
40368if (typeof script_manage_params['shop.browse_desc_ord_by'] !== 'undefined' && script_manage_params['shop.browse_desc_ord_by'] == '1') {
40369	function js_DescOrderBy_click( DescOrderBy_value, elem ) {
40370		elem = jQuery(elem);
40371		if (elem.hasClass('orderby_price')) {
40372			Cookies.set('shop_browse_orderby_price_asc_desc', DescOrderBy_value, {path: '/'});
40373		} else {
40374			Cookies.remove('shop_browse_orderby_price_asc_desc', {path: '/'});
40375		}
40376
40377		document.order.DescOrderBy.value = DescOrderBy_value;
40378		document.order.submit();
40379	}
40380}
40381
40382if ( typeof script_manage_params['shop.browse_mf_filt_ch'] !== 'undefined' && script_manage_params['shop.browse_mf_filt_ch'] == '1' ) {
40383	function js_product_manufacturer_shop_browse_filter_changed( o ) {
40384		$o = jQuery(o);
40385		if ($o.parents('.module-param-filter:first').length) {
40386			js_pexf_load();
40387			return;
40388		}
40389		document.location.href = o.value;
40390
40391	}
40392}
40393
40394if ( typeof script_manage_params['shop.browse_globals'] !== 'undefined' && script_manage_params['shop.browse_globals'] == '1') {
40395
40396	var script_manage_params_vml = typeof script_manage_params.vml !== 'undefined' ? script_manage_params.vml : '';
40397	//var Fscript_manage_params_vml = typeof script_manage_params.vml !== 'undefined' ? script_manage_params.vml : '';
40398	js_global_live_site = typeof script_manage_params.ls !== 'undefined' ? script_manage_params.ls : '';
40399	js_global_VM_LANG_PEAR_LOG_INFO     = typeof script_manage_params_vml.pli !== 'undefined' ? script_manage_params_vml.pli : '';
40400	js_global_VM_LANG_PEAR_LOG_ERR      = typeof script_manage_params_vml.ple !== 'undefined' ? script_manage_params_vml.ple : '';
40401	js_global_VM_LANG_PEAR_LOG_WARNING  = typeof script_manage_params_vml.plw !== 'undefined' ? script_manage_params_vml.plw : '';
40402	js_global_VM_LANG_PHPSHOP_VALUES_UPDATED_SUCCESSFULLY = typeof script_manage_params_vml.pvus !== 'undefined' ? script_manage_params_vml.pvus : '';
40403	var tax_rates = [];
40404
40405	if ( typeof script_manage_params.tr === 'object' ){
40406		for(var i in script_manage_params.tr) {
40407			var tax_rate = script_manage_params.tr[i];
40408			tax_rates[tax_rate.tax_rate_id] = tax_rate.tax_rate;
40409		}
40410	}
40411}
40412
40413//	template.php, #418
40414if (typeof script_manage_params.lt !== 'undefined' && script_manage_params.lt != null) {
40415	var js_itemid               = typeof script_manage_params.lt.iid !== 'undefined' ? script_manage_params.lt.iid : '';
40416	var js_url                  = typeof script_manage_params.lt.u !== 'undefined' ? script_manage_params.lt.u : '';
40417	var js_server_request_uri   = typeof script_manage_params.lt.sru !== 'undefined' ? script_manage_params.lt.sru : '';
40418	if( typeof script_manage_params.lt.pid !== 'undefined' && script_manage_params.lt.pid > 0 ) var js_product_id = script_manage_params.lt.pid;
40419}
40420
40421//	template.php, #538
40422if ( typeof script_manage_params.gac !== 'undefined' && script_manage_params.gac != '') {
40423	var _gaq = _gaq || [];
40424	_gaq.push(['_setAccount', script_manage_params.gac]);
40425	_gaq.push(['_trackPageview']);
40426	(function() {
40427		var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
40428		ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
40429		var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
40430	})();
40431}
40432
40433//	template.php, #974
40434if ( typeof script_manage_params.onr !== 'undefined' && script_manage_params.onr ) {
40435	// on ready
40436	if ( typeof js_Config_parser_enabled !== 'undefined' && js_Config_parser_enabled ) {
40437		jQuery(window).on('load', function () {
40438			js_add_class_to_last_module( jQuery('#subheader') );
40439			js_add_class_to_last_module( jQuery('#middle_top') );
40440			js_add_class_to_last_module( jQuery('#middle_bot') );
40441			js_add_class_to_last_module( jQuery('#footer_top') );
40442			js_add_class_to_last_module( jQuery('#pre_footer') );
40443		});
40444	} else {
40445		jQuery(function() {
40446			js_add_class_to_last_module( jQuery('#subheader') );
40447			js_add_class_to_last_module( jQuery('#middle_top') );
40448			js_add_class_to_last_module( jQuery('#middle_bot') );
40449			js_add_class_to_last_module( jQuery('#footer_top') );
40450			js_add_class_to_last_module( jQuery('#pre_footer') );
40451		});
40452	}
40453
40454	if( typeof script_manage_params.msl !== 'undefined' && script_manage_params.msl != '' ) {
40455		var sublvl_t = 0;
40456
40457		function sort_submenu(menu_rows, cell_width) {
40458			if(!(jQuery("#tab-menu-tools").length && Cookies.get('admin_view_design') == '0')) {
40459				jQuery(".mainlevel-nav>li>ul").each(function(){
40460					var new_menu_html="";
40461					var total_cells=jQuery(this).find("li").length;
40462					var menu_cols=Math.ceil(total_cells/menu_rows);
40463					var curr_cell=1;
40464
40465					//insert invisible li's to achieve vertical ordering
40466					for(curr_cell; curr_cell<=menu_rows; curr_cell++)
40467					{
40468						for(var i=0;
40468 i<menu_cols; i++)
40469						{
40470							var tmp_val=i*menu_rows+curr_cell;
40471							if(i==0 && tmp_val>total_cells)break;
40472							if(jQuery(this).find("li:nth-child("+tmp_val+")").length)
40473							{
40474								new_menu_html= new_menu_html+"<li>"+jQuery(this).find("li:nth-child("+tmp_val+")").html()+"</li>";
40475							}
40476							else new_menu_html= new_menu_html+"<li class=\"empty_li\"></li>";
40477						}
40478					}
40479					jQuery(this).html(new_menu_html).wrap('<span class="sublevel-span">');
40480
40481					//width for the whole ul
40482					jQuery(this).css({
40483							'overflow':'hidden',
40484							'width': (total_cells<=menu_rows) ? (cell_width+1)+'px' : Math.ceil(total_cells/menu_rows)*cell_width+'px'
40485					});
40486				});
40487			}
40488		}
40489	}
40490}
40491
40492jQuery(function() {
40493	if ( typeof js_Config_registration_company_skip_email_show_thank_you_vex !== 'undefined' && js_Config_registration_company_skip_email_show_thank_you_vex && typeof URLSearchParams !== 'undefined' ) {
40494		var urlParams = new URLSearchParams(window.location.search);
40495		if (urlParams.get('execFunction')) {
40496			var executeFunction = urlParams.get('execFunction');
40497			if (typeof window[executeFunction] === 'function') {
40498				window[executeFunction]();
40499			}
40500		}
40501	}
40502});
40503if (is_cs_user()) {
40504	function js_product_detail_quick_view(productSku) {
40505		if (typeof productSku !== 'undefined') {
40506			new AjaxRequest({'productSku' : productSku})
40507				.setController('Product')
40508				.setAction('quickViewProduct')
40509				.onSuccess(function(res){
40510					console.log(res.data.script);
40511					console.log(jQuery(res.data.script).html());
40512					if (typeof jQuery(res.data.script).html() != 'undefined') {
40513						eval(jQuery(res.data.script).html());
40514						console.log('eval');
40515					}
40516					vex.dialog.open({
40517						message: 'RÝCHLY NÁHĽAD PRODUKTU',
40518						input: res.data.html,
40519						className: 'vex-cs vex-product-quick-view',
40520						showCloseButton: false
40521					});
40522				})
40523				.send();
40524		}
40525	}
40526}
40527
40528/* ========================================
40529 FILE: /includes/js/shop/ps_product_attribute_prod_detail_avail_and_custom.js
40530 ==================== */
40531
40532if (typeof originalProductSkuValue === 'undefined') {
40533	var originalProductSkuValue = [];
40534}
40535
40536script_manage_params = typeof script_manage_params === 'object' ? script_manage_params : {};
40537var attributeChangeCustomParams = {
40538	'sil'                 : typeof script_manage_params.sil !== 'undefined' && (script_manage_params.sil == 'true' || script_manage_params.sil == true),
40539	'VM_PRODUCT_OLD_PRICE': typeof script_manage_params.VM_PRODUCT_OLD_PRICE !== 'undefined' ? script_manage_params.VM_PRODUCT_OLD_PRICE : ''
40540};
40541
40542window.addEventListener('DOMContentLoaded', function () {
40543	attribute_change_custom();
40544});
40545
40546function attribute_change_custom() {
40547	var price_by_product_attribute = typeof js_CS_Config_set_price_by_product_attribute !== 'undefined' && js_CS_Config_set_price_by_product_attribute;
40548
40549	if (!price_by_product_attribute || ( typeof js_global_VM_PRODUCT_ATTRIB_FIRST_OPTION_REQUIRED !== 'undefined' && js_global_VM_PRODUCT_ATTRIB_FIRST_OPTION_REQUIRED === 0 ) ) {
40550
40551		if (typeof js_custom_variant_init_script === 'undefined') {
40552			if (typeof js_Config_do_not_encode_attribute !== 'undefined' && js_Config_do_not_encode_attribute) {
40553				var hash = decodeURIComponent(window.location.hash.replace('#', ''));
40554			} else {
40555				var hash = encodeURIComponent(window.location.hash.replace('#', ''));
40556			}
40557
40558			if (hash === '') {
40559				let searchUrlParams = new URLSearchParams(window.location.search);
40560
40561				hash = searchUrlParams.get('var');
40562			}
40563
40564			if (hash !== null && hash != '') {
40565				var select  = jQuery('.prod_adv_attrib_select:first select:first');
40566				var options = select.find('option');
40567				var radio = false;
40568
40569				if (options.length == 0) {
40570					options = jQuery('.prod_adv_attrib_radio .shop_addtocart_advanced_attribute_buy input');
40571					radio   = true;
40572				}
40573				if (options.length > 0) {
40574					jQuery.each(options, function (index, option) {
40575						let $option = jQuery(option);
40576						var attributes = $option.val();
40577						if (attributes.includes('[')) {
40578							attributes = attributes.split('[')[0];
40579						}
40580						if (attributes.includes('{')) {
40581							attributes = attributes.split('{')[0];
40582						}
40583						attributes = attributes.split('-');
40584						if (attributes != '') {
40585							var key = '';
40586							jQuery.each(attributes, function (v_index, attribute) {
40587								if (attribute != '') {
40588									var attr;
40589									if (attribute.includes('[')) {
40590										attr = attribute.split(':')[1].split('[')[0];
40591									} else if (attribute.includes('{')) {
40592										attr = attribute.split(':')[1].split('{')[0];
40593									} else {
40594										attr = attribute.split(':')[1];
40595									}
40596									key += (key != '' ? '-' : '') + attr;
40597								}
40598							});
40599
40600							//key = key.toLowerCase();
40601
40602							key = key.normalize('NFD').replace(/[\u0300-\u036f]/g, "");
40603
40604							if (typeof js_Config_do_not_encode_attribute === 'undefined' || !js_Config_do_not_encode_attribute) {
40605								key = encodeURIComponent(key);
40606							}
40607
40608							if (key == hash || (hash.replace(/\+/g, '_').toLowerCase() === key.toLowerCase())) {
40609
40610								if ( typeof js_Config_product_attribute_settings !== 'undefined' ) {
40611									var template = js_Config_product_attribute_settings.template || '';
40612									var selector = js_Config_product_attribute_settings.selector || '';
40613									var activeAttrClass = js_Config_product_attribute_settings.activeAttrClass || '';
40614
40615									var $attributeBtn;
40616									var variants;
40617
40618									if (template === 'table') {
40619										$option.prop('selected', true);
40620										$option.parent().trigger('change');
40621
40622										if ( $option.val().indexOf('{D=3}') >= 0 ) {
40623											jQuery('body').addClass('flypage_variant_is_out_of_stock');
40624										} else {
40625											jQuery('body').removeClass('flypage_variant_is_out_of_stock');
40626										}
40627
40628										$attributeBtn = jQuery('.' + selector + '[value^="' + $option.val() + '"]');
40629
40630										if (!$attributeBtn.length) {
40631											let optionClasses = $option.attr('class').split(' ');
40632
40633											if (optionClasses.length) {
40634												optionClasses.forEach(function (optionClass) {
40635													$attributeBtn = jQuery('.' + selector + '.' + optionClass);
40636													if ($attributeBtn.length) {
40637														return false;
40638													}
40639												});
40640											}
40641										}
40642
40643										if ($attributeBtn.length) {
40644											$attributeBtn.trigger('click');
40645											$attributeBtn.closest('[class*="shop_addtocart_advanced_attribute_row_"]').addClass(activeAttrClass);
40646										}
40647
40648										js_set_shop_product_detail_avail_value_from_attrib_comb(select);
40649										customVariantSelectChange(select);
40650									} else if (template === 'links') {
40651										if ( selector !== '' && jQuery('.' + selector).length ) {
40652											var varId = encodeURIComponent($option.html().replace(': ', '__')).replace(/%/g, '--');
40653											$attributeBtn = jQuery('[id="' + varId + '"]');
40654
40655											if ($attributeBtn.length > 0) {
40656												$attributeBtn.trigger('click');
40657												// TODO - pridat aktivnu classu pre links template
40658												//$attributeBtn.closest('[class*="shop_addtocart_advanced_attribute_row_"]').addClass('active custom_active');
40659											}
40660										}
40661									} else if (template === 'radio') {
40662										if (radio) {
40663											$option.prop('checked', true);
40664											$option.trigger('click');
40665										} else {
40666											$option.prop('selected', true);
40667										}
40668									}
40669								} else if (jQuery('.attr_group_sel_div').length > 0) {
40670									var var_id = encodeURIComponent($option.html().replace(': ', '__')).replace(/%/g, '--');
40671									var $varId = jQuery('[id="' + var_id + '"]');
40672
40673									if ($varId.length > 0) {
40674										$varId.trigger('click');
40675									} else {
40676										if (radio) {
40677											$option.prop('checked', true);
40678											$option.trigger('click');
40679										} else {
40680											$option.prop('selected', true);
40681										}
40682									}
40683								} else {
40684									if (radio) {
40685										$option.prop('checked', true);
40686										$option.trigger('click');
40687									} else {
40688										$option.prop('selected', true);
40689
40690										$option.closest('select').trigger('change');
40691									}
40692								}
40693							} else {
40694								if (radio) {
40695									$option.prop('checked', false);
40696								} else {
40697									$option.prop('selected', false);
40698								}
40699							}
40700						}
40701					});
40702
40703				}
40704			} else {
40705				if ( typeof js_CS_Config_disable_defer_select_attribute === 'undefined' ) {
40706					if ( typeof js_CS_Config_lighthouse6_opt === 'undefined' ) {
40707						var refreshIntervalId = setInterval(function () {
40708							var select = jQuery('.prod_adv_attrib_select:first select:first');
40709							var radio  = jQuery('.prod_adv_attrib_radio .shop_addtocart_advanced_attribute_buy input:checked');
40710							//if ( is_cs_user() ) {
40711							if (typeof js_CS_Config_display_min_max_variant_price === 'undefined') {
40712								if (select.length > 0) {
40713									select.trigger('click').trigger('change');
40714									clearInterval(refreshIntervalId);
40715								}
40716								if (radio.length > 0) {
40717									radio.trigger('click').trigger('change');
40718									clearInterval(refreshIntervalId);
40719								}
40720							}
40721						}, 100);
40722					}
40723				}
40724			}
40725		}
40726	}
40727	// JAN Product last pieces : count quantity on page load
40728	if (typeof js_last_pieces_html_box == 'function') {
40729		js_last_pieces_html_box(0);
40730	}
40731	// !!! this function is defined for non_cs_user
40732	if (typeof js_template_flypage == 'function') {
40733		js_template_flypage();
40734	}
40735	// hook for cs_user and non_cs_user
40736	if (typeof js_template_flypage2 == 'function') {
40737		js_template_flypage2();
40738	}
40739}
40740
40741function js_set_shop_product_detail_avail_value_from_attrib_comb(select_element) {
40742	var doNotRunInBrowse = typeof js_CS_Config_run_script_only_in_product_detail !== 'undefined' && js_CS_Config_run_script_only_in_product_detail && jQuery('.flypage-top').length === 0;
40743
40744	if ((typeof js_config_set_shop_product_detail_avail_value_from_attrib_comb_disable != 'undefined' && js_config_set_shop_product_detail_avail_value_from_attrib_comb_disable > 0) || doNotRunInBrowse) {
40745		return false;
40746	}
40747
40748	select_element       = jQuery(select_element);
40749	var attrib_comb_name = '';
40750	var attrib_position  = '';
40751	var attrib_comb_id;
40752
40753	if (select_element.children('option').length != 0 || select_element.attr('type') == 'radio') {
40754		if (select_element.attr('type') == 'radio') {
40755			attrib_comb_id   = /attrib_comb_([0-9]+)(\s|$)/.exec(select_element.attr('class'));
40756			attrib_comb_name = select_element.val().match(/^(.+?)(\{|\[|$)/)[1];
40757		} else {
40758			attrib_comb_id   = /attrib_comb_([0-9]+)(\s|$)/.exec(select_element.children('option:selected').attr('class'));
40759			attrib_comb_name = select_element.children('option:selected').html();
40760
40761			var $showAttrButtons = jQuery('.show_attr_buttons');
40762			if ($showAttrButtons.find('span.flypage_attr_button').length > 0) {
40763				$showAttrButtons.find('span.flypage_attr_button').each(function (k, v) {
40764					if (jQuery(this).hasClass('active')) {
40765						attrib_position = k;
40766					}
40767				});
40768			}
40769			if (attrib_comb_id == null) {
40770				attrib_comb_id = /attr_id_([0-9]+)(\s|$)/.exec(select_element.children('option:selected').attr('id'));
40771			}
40772		}
40773	} else {
40774		attrib_comb_id   = /attrib_comb_([0-9]+)(\s|$)/.exec(select_element.attr('class'));
40775		attrib_comb_name = '';
40776		select_element.parents('tr:first').find('.shop_addtocart_advanced_attribute_name:first').children('span:first').each(function () {
40777			jQuery(this).children(':visible').each(function () {
40778				attrib_comb_name += jQuery(this).text();
40779			});
40780		});
40781	}
40782
40783	if ( typeof attrib_comb_name === 'undefined' ) {
40784		attrib_comb_name = '';
40785	}
40786
40787	// HOTFIX var product_avail_value_element = jQuery('.flypage1 .flypage-avail .shop_product_availability_value:first');
40788	var product_avail_value_element, product_in_stock_not_available_element, product_in_stock_available_from_element, product_in_stock_value_element, product_custom_text_element;
40789	if ( is_cs_user('kc-7949') && jQuery('.vex-product-quick-view .flypage1 .flypage-avail').length > 0 ) {
40790		var quickViewFlypage = jQuery('.vex-product-quick-view .flypage1');
40791
40792		product_avail_value_element             = quickViewFlypage.find('.flypage-avail:first .shop_product_availability_value');
40793		attrib_comb_name                        = attrib_comb_name.replace(/\([^\(*]*$/, '').replace(/\&nbsp;/g, ' ').replace(/_/g, ' ');
40794		product_in_stock_not_available_element  = quickViewFlypage.find('.flypage-avail:first .prod_in_stock_not_available');
40795		product_in_stock_available_from_element = quickViewFlypage.find('.flypage-avail:first .prod_in_stock_available_from');
40796		product_in_stock_value_element          = quickViewFlypage.find('.flypage-avail:first .prod_in_stock_info');
40797		product_custom_text_element             = quickViewFlypage.find('.flypage-avail:first .flypage-custom-text');
40798	} else if (jQuery('.flypage1 .flypage-avail').length > 0) {
40799		product_avail_value_element             = jQuery('.flypage1 .flypage-avail .shop_product_availability_value:first');
40800		attrib_comb_name                        = attrib_comb_name.replace(/\([^\(*]*$/, '').replace(/\&nbsp;/g, ' ').replace(/_/g, ' ');
40801		product_in_stock_not_available_element  = jQuery('#middle_content_inner .flypage-avail .prod_in_stock_not_available:first');
40802		product_in_stock_available_from_element = jQuery('#middle_content_inner .flypage-avail .prod_in_stock_available_from:first');
40803		product_in_stock_value_element          = jQuery('#middle_content_inner .flypage-avail .prod_in_stock_info:first');
40804		product_custom_text_element             = jQuery('#middle_content_inner .flypage-avail .flypage-custom-text:first');
40805	} else {
40806		product_avail_value_element             = jQuery('.flypage1 .shop_product_availability_value:first');
40807		attrib_comb_name                        = attrib_comb_name.replace(/\([^\(*]*$/, '').replace(/\&nbsp;/g, ' ').replace(/_/g, ' ');
40808		product_in_stock_not_available_element  = jQuery('#middle_content_inner .prod_in_stock_not_available:first');
40809		product_in_stock_available_from_element = jQuery('#middle_content_inner .prod_in_stock_available_from:first');
40810		product_in_stock_value_element          = jQuery('#middle_content_inner .prod_in_stock_info:first');
40811		product_custom_text_element             = jQuery('#middle_content_inner .flypage-custom-text:first');
40812	}
40813
40814	product_avail_value_element.show();
40815	product_avail_value_element.prev().show();
40816	product_in_stock_not_available_element.hide();
40817	product_in_stock_value_element.hide();
40818
40819	if (typeof js_CS_Config_vm_product_attributes_use_available_from === 'undefined') {
40820		product_in_stock_available_from_element.hide();
40821	}
40822
40823	if (product_custom_text_element.length != 0) {
40824		product_custom_text_element.hide();
40825	}
40826
40827	if (typeof (attrib_comb_id) !== 'undefined' && attrib_comb_id != null) {
40828		attrib_comb_id = parseInt(attrib_comb_id[1]);
40829		// gangstagroup fix pri vybere variantu to davalo hodnotu dostupnosti o jednu vyssiu
40830		// fix prebehol v ps_product_attribute.php:2810
40831		// ak by sa zle zobrazovali dostupnosti treba pozriet ci nieje toto navine
40832		// zmena classy attr_avail_xx
40833		if (typeof attrib_position !== 'undefined' && attrib_position !== '') {
40834			attrib_comb_id = parseInt(attrib_position);
40835		}
40836
40837		if ( typeof shop_product_details_avail_list !== 'undefined' ) {
40838			var newAvailId = shop_product_details_avail_list[attrib_comb_id];
40839		}
40840
40841		var availClass = product_avail_value_element.attr('class');
40842		if (typeof availClass !== 'undefined' && typeof newAvailId !== 'undefined' && newAvailId != '') {
40843			if (availClass.match(/attr_avail_[0-9]+/) == null) {
40844				newAvailClass = availClass + ' attr_avail_' + newAvailId;
40845			} else {
40846				newAvailClass = availClass.replace(/attr_avail_[0-9]+/, 'attr_avail_' + newAvailId);
40847			}
40848			product_avail_value_element.attr('class', newAvailClass).show();
40849		}
40850
40851		if (typeof (shop_product_details_avail_names_list) != 'undefined' && typeof (shop_product_details_avail_names_list[attrib_comb_id]) != 'undefined' && shop_product_details_avail_names_list[attrib_comb_id] != '') {
40852			var avail_name = shop_product_details_avail_names_list[attrib_comb_id];
40853
40854			if ( (typeof(js_CS_Config_prod_details_variant_change_avail_count_fix) !== 'undefined' && js_CS_Config_prod_details_variant_change_avail_count_fix == '1') ) { //variant_change_fix , pozriet related product moze robit problem
40855				if (jQuery('.flypage1 .flypage-avail').length > 0) {
40856					jQuery('.flypage1 .flypage-avail .shop_product_availability_value').attr('title',avail_name).html(avail_name);
40857				} else {
40858					jQuery('.flypage1 .shop_product_availability_value').not(jQuery('.flypage1').find('div.flypage-related').find('.shop_product_availability_value'));
40859				}
40860			} else {
40861				product_avail_value_element.attr('title', avail_name).html(avail_name);
40862			}
40863			jQuery('span.sw_shop_product_availability_value').remove();
40864			jQuery('span.sw_prod_availability_heading2').remove();
40865			if (typeof (sw_shop_product_details_avail_names_list) != 'undefined' && typeof (sw_shop_product_details_avail_names_list[attrib_comb_id]) != 'undefined' && sw_shop_product_details_avail_names_list[attrib_comb_id] != '') {
40866				if (typeof sw_shop_product_details_avail_id_list[attrib_comb_id] !== 'undefined') {
40867					sw_availClass = 'attr_avail_' + sw_shop_product_details_avail_id_list[attrib_comb_id];
40868				} else {
40869					sw_availClass = '';
40870				}
40871
40872				console.log(sw_availClass);
40873				product_avail_value_element.after('<span class="shop_product_availability_value sw_shop_product_availability_value ' + sw_availClass + '">' + sw_shop_product_details_avail_names_list[attrib_comb_id] + '</span>');
40874				product_avail_value_element.after('<span class="sw_prod_availability_heading2">' + js_lang_availability + ' ' + CS_Config_prod_info_from_switched_db_label + ': </sp
40874an>');
40875			}
40876			if (typeof setProductAvailabilityTime === 'function' && typeof shop_product_details_avail_names_list[attrib_comb_id] !== 'undefined') {
40877				need_days_variable = parseInt(shop_product_details_avail_days_list[attrib_comb_id]);
40878				setProductAvailabilityTime();
40879			}
40880		} else {  // default
40881
40882			// JAN poziadavka od TK ak mamedostupnost u variantoch a nic nie je zvolene nema sa zobrazovat dostupnost zakladna nastavena u produktu
40883			var variant_avails = (typeof shop_product_details_avail_names_list === 'object' && shop_product_details_avail_names_list.length);
40884
40885			if (!variant_avails && typeof (shop_product_details_avail) != 'undefined' && shop_product_details_avail != '') {
40886				product_avail_value_element.html(shop_product_details_avail);
40887			} else {
40888				product_avail_value_element.hide();
40889				product_avail_value_element.prev().hide();
40890			}
40891		}
40892
40893		var $prodInStockValue = jQuery('.flypage-avail .prod-in-stock .prod_in_stock_value');
40894		var prod_in_stock_value_selector;
40895		if (typeof js_product_in_stock_show_amount !== 'undefined' && js_product_in_stock_show_amount && $prodInStockValue.length > 0) {
40896			prod_in_stock_value_selector = $prodInStockValue;
40897		} else {
40898			$prodInStockValue = jQuery('.flypage1 .prod_in_stock_value');
40899			if ($prodInStockValue.length > 0 && product_in_stock_value_element.length == 0) {
40900				prod_in_stock_value_selector = $prodInStockValue;
40901			} else {
40902				prod_in_stock_value_selector = product_in_stock_value_element.children('.prod_in_stock_value');
40903			}
40904		}
40905
40906		if (typeof (shop_product_details_in_stock_list) != 'undefined' && typeof (shop_product_details_in_stock_list[attrib_comb_id]) != 'undefined') {
40907			var in_stock = parseInt(shop_product_details_in_stock_list[attrib_comb_id]);
40908			var text;
40909			if (in_stock > 0) {
40910				text = (typeof (js_prod_detail_stock_text_mode) != 'undefined' && js_prod_detail_stock_text_mode == '1') ? cms_js_lang_yes : in_stock;
40911				text = typeof (js_lang_prod_detail_in_stock_text_value) != 'undefined' && js_lang_prod_detail_in_stock_text_value != '' ? js_lang_prod_detail_in_stock_text_value : text;
40912				// palo
40913				if (isDesignTools()) {
40914					var ph_product_in_stock             = '';
40915					var ph_product_in_stock_lang_define = '0';
40916					if (in_stock == 1) {
40917						if (typeof (js_lang_product_in_stock_1) != 'undefined') {
40918							ph_product_in_stock = js_lang_product_in_stock_1;
40919						} else {
40920							ph_product_in_stock_lang_define = '1';
40921						}
40922					} else if (in_stock < 5) {
40923						if (typeof (js_lang_product_in_stock_2) != 'undefined') {
40924							ph_product_in_stock = js_lang_product_in_stock_2;
40925						} else {
40926							ph_product_in_stock_lang_define = '1';
40927						}
40928					} else {
40929						if (typeof (js_lang_product_in_stock_5) != 'undefined') {
40930							ph_product_in_stock = js_lang_product_in_stock_5;
40931						} else {
40932							ph_product_in_stock_lang_define = '1';
40933						}
40934					}
40935					if (ph_product_in_stock_lang_define == '0') {
40936						var phtext;
40937						if (typeof js_is_color_stock_pieces !== 'undefined' && js_is_color_stock_pieces) {
40938							phtext = '<span class="amount_val" style="color:red;">
40938' + text + ' </span><span class="amount_text"> ' + ph_product_in_stock + '</span>';
40939						} else {
40940							phtext = '<span class="amount_val">' + text + ' </span><span class="amount_text"> ' + ph_product_in_stock + '</span>';
40941						}
40942						prod_in_stock_value_selector.html(phtext);
40943					} else {
40944						prod_in_stock_value_selector.text(text);
40945					}
40946				} else {
40947					prod_in_stock_value_selector.text(text);
40948				}
40949
40950				// pridanie poctu kusov k dostupnosti
40951				if (typeof js_product_avail_with_stock !== 'undefined' && typeof newAvailId !== 'undefined' && jQuery.inArray(newAvailId, js_product_avail_with_stock) != -1) {
40952					jQuery('.flypage-avail span.shop_product_availability_value:first').append(' ' + in_stock + ' ' + ph_product_in_stock);
40953				}
40954
40955				product_in_stock_value_element.show();
40956			} else if (typeof js_Config_show_main_stock_instead_of_empty_variant_stock !== 'undefined' && js_Config_show_main_stock_instead_of_empty_variant_stock && isNaN(in_stock) && typeof product_main_stock !== 'undefined') {
40957				text = product_main_stock;
40958				prod_in_stock_value_selector.text(text);
40959			} else {
40960				text = (typeof (js_prod_detail_stock_text_mode) != 'undefined' && js_prod_detail_stock_text_mode == '1') ? cms_js_lang_no : '0';
40961				prod_in_stock_value_selector.text(text);
40962			}
40963
40964			var $swProdInStockInfo = jQuery('.sw_prod_in_stock_info');
40965
40966			if ($swProdInStockInfo.length) {
40967				$swProdInStockInfo.remove();
40968			}
40969
40970			if (typeof sw_product_in_stock != 'undefined' && sw_product_in_stock.length && typeof sw_product_in_stock[attrib_comb_id] != 'undefined') {
40971				if (sw_product_in_stock[attrib_comb_id] < 2) {
40972					amountText = js_lang_product_in_stock_1;
40973				} else if (sw_product_in_stock[attrib_comb_id] < 5) {
40974					amountText = js_lang_product_in_stock_2;
40975				} else {
40976					amountText = js_lang_product_in_stock_5;
40977				}
40978
40979				jQuery('.flypage-avail .prod_in_stock_info').after('<div class="sw_prod_in_stock_info"></div>');
40980				$swProdInStockInfo.html('<span class="prod_in_stock_info_lbl" style="font-weight:bold;">' + cms_js_lang_product_detail_in_stock_label + ' ' + CS_Config_prod_info_from_switched_db_label + ': </sp
40980an><span class="prod_in_stock_value"><span class="amount_val">' + sw_product_in_stock[attrib_comb_id] + ' </span><span class="amount_text"> ' + amountText + '</span><span class="attrib_name"> </span></span>');
40981			}
40982
40983			if (attributeChangeCustomParams.sil) {
40984				var $browseAvail = jQuery('.browse-avail');
40985				var jqo_stock_info_label = $browseAvail.find('.stock_info_label');
40986				if (jqo_stock_info_label.length < 1) {
40987					$browseAvail.append('<div class="stock_info_label"/>');
40988					jqo_stock_info_label = $browseAvail.find('.stock_info_label');
40989				}
40990
40991				if (in_stock > 0) {
40992					jqo_stock_info_label.text(js_global_PHPSHOP_PRODUCT_FORM_IN_STOCK).addClass('in_stock').removeClass('not_in_stock');
40993				} else {
40994					jqo_stock_info_label.text(js_global_PHPSHOP_PRODUCT_FORM_NOT_IN_STOCK).addClass('not_in_stock').removeClass('in_stock');
40995				}
40996			}
40997
40998			var js_cs_config_product_details_do_not_set_first_attrib_to_stock_label = typeof js_cs_config_product_details_do_not_set_first_attrib_to_stock_label !== 'undefined' ? js_cs_config_product_details_do_not_set_first_attrib_to_stock_label : false;
40999			var product_in_stock_value_text = cms_js_lang_product_detail_in_stock_label;
41000
41001			if (typeof CS_Config_prod_info_from_switched_db_curShopStockPostLabel !== 'undefined') {
41002				product_in_stock_value_text += ' ' + CS_Config_prod_info_from_switched_db_curShopStockPostLabel;
41003			}
41004
41005			product_in_stock_value_element.children('span:first').text(product_in_stock_value_text + ': ');
41006			if (attrib_comb_name != '' && !js_cs_config_product_details_do_not_set_first_attrib_to_stock_label) {
41007				if (typeof js_show_attrib_in_stock_info !== 'undefined' && js_show_attrib_in_stock_info) {
41008					var append = jQuery('.flypage-avail .prod_in_stock_info_lbl').text().replace(':', ' <span class="attrib_name"> (' + attrib_comb_name + ')</span>:');
41009					jQuery('.flypage-avail. prod_in_stock_info_lbl').html(append);
41010				} else {
41011					product_in_stock_value_element.children('.prod_in_stock_value').append('<span class="attrib_name"> (' + attrib_comb_name + ')</span>');
41012				}
41013			}
41014		}
41015
41016		if (product_custom_text_element.length != 0 && typeof (shop_product_details_custom_text) != 'undefined' && typeof (shop_product_details_custom_text[attrib_comb_id]) != 'undefined') {
41017			product_custom_text_element.html(shop_product_details_custom_text[attrib_comb_id]);
41018			product_custom_text_element.show();
41019		}
41020	} else {
41021		product_avail_value_element.hide();
41022		product_avail_value_element.prev().hide();
41023	}
41024
41025	// custom after load
41026	if (typeof js_set_shop_product_detail_avail_value_from_attrib_comb_after_init == 'function') {
41027		js_set_shop_product_detail_avail_value_from_attrib_comb_after_init(select_element);
41028	}
41029
41030	if (typeof js_custom_delivery_date == 'function') {
41031		js_custom_delivery_date(newAvailId);
41032	}
41033
41034	if (typeof js_CS_Config_product_lowest_price !== 'undefined') {
41035		let selected_elm = select_element.is('select') ? select_element.children('option:selected') : select_element;
41036		let lowest_price = selected_elm.data('lowest-price');
41037		let lowest_price_elm = jQuery('.lowest_price');
41038
41039		if (lowest_price && lowest_price_elm.length) {
41040			lowest_price_elm.find('.lp_val').html(lowest_price.val);
41041
41042			let lpDiscountPercent = ( lowest_price.perc > 0 ? '+' : '' ) + lowest_price.perc;
41043			lowest_price_elm.find('.lp_perc').html('(' + lpDiscountPercent + ' %)');
41044
41045			lowest_price_elm.show();
41046		} else if (selected_elm.val() !== '') {
41047			lowest_price_elm.hide();
41048		}
41049	}
41050
41051	var $productAvailability = jQuery('[name="product_availability"]');
41052	if ($productAvailability.length > 0) {
41053		var avail_text = jQuery('.flypage-avail .shop_product_availability_value').html();
41054		if (avail_text != '' && avail_text != null) {
41055			$productAvailability.val(avail_text);
41056		}
41057	}
41058}
41059
41060function customVariantSelectChange(select) {
41061	select = jQuery(select);
41062	var variantName = select.find(":selected").val().split('[')[0];
41063	var variantName = variantName.replace(/_/g, ' ');
41064
41065	if (typeof variantsCustomStocks !== 'undefined') {
41066		for (var key in variantsCustomStocks[variantName]) {
41067			customStockNumber = key.replace('S','stock');
41068
41069			var customStockValue = jQuery('.availability_custom_stocks .'+customStockNumber+' .custom_stock_value');
41070
41071			customStockValue.text(variantsCustomStocks[variantName][key]['text']);
41072			customStockValue.removeClass('available_in_custom_stock');
41073			customStockValue.removeClass('unavailable_in_custom_stock');
41074
41075
41076			if(variantsCustomStocks[variantName][key]['count'] > 0) {
41077				jQuery('.availability_custom_stocks .'+customStockNumber+' .custom_stock_value').addClass('available_in_custom_stock');
41078			} else {
41079				jQuery('.availability_custom_stocks .'+customStockNumber+' .custom_stock_value').addClass('unavailable_in_custom_stock');
41080			}
41081		}
41082	}
41083}
41084
41085function js_set_others_params(selectbox) {
41086	var $selectbox = jQuery(selectbox);
41087
41088	if ($selectbox.val() == null) {
41089		return false;
41090	}
41091
41092	if (typeof (set_actual_variant_main_image) != 'undefined' && set_actual_variant_main_image == '1') {
41093		js_set_actual_variant_main_image($selectbox);
41094	} // zobrazenie aktuia
41095
41096	// definovane v local.js
41097	if (typeof (js_custom_variant_change_function) == 'function') {
41098		js_custom_variant_change_function($selectbox);
41099	}
41100
41101	js_custom_credit_change_function($selectbox);	// zmena kreditu
41102	js_handle_variant_code_changed($selectbox);	//	zmena CODE
41103	js_handle_variant_old_price_changed($selectbox);	//	zmena beznej ceny
41104	js_save_price_changed($selectbox);// zmena usetrite v detaile produktu
41105	js_set_product_weight($selectbox);	// zmena vahy
41106	js_set_attribute_info_price_with_coupon_sale($selectbox);
41107	js_set_variant_ean_code($selectbox);
41108	updateAhojCalculatorPrice($selectbox.is('select') ? $selectbox.find('option:selected').val() : ''); //Update ceny ahoj kalkulacky
41109}
41110
41111function js_set_product_weight(selectbox) {
41112	const val = selectbox.val();
41113	const match = val.match(/\{W=([^\}]+)\}/);
41114	const $el = jQuery('.flypage1 .product_weight_value');
41115
41116	// ak regex nič nenašiel variant_weight bude prázdny string
41117	const variant_weight = match ? match[1] || '' : '';
41118	const value = !js_is_empty(variant_weight)
41119		? variant_weight
41120		: $el.data('weight-default');
41121
41122	$el.attr('data-weight-current', value).text(value);
41123}
41124
41125function js_set_attribute_info_price_with_coupon_sale(selectbox) {
41126	let attr = selectbox.val().replace(/_/gi, ' ').match(/^[^\[\{]+/);
41127
41128	if (!attr) {
41129		return;
41130	}
41131
41132	attr = attr[0];
41133
41134	if (!config('js_attribute_info_price_with_coupon_sale.'+attr+'.product_coupon_discount_price')) {
41135		return;
41136	}
41137
41138	jQuery('.coupon-notlogged-price-value').text(js_attribute_info_price_with_coupon_sale[attr]['product_coupon_discount_price']);
41139	jQuery('#coupon-notlogged-coupon-code').text(js_attribute_info_price_with_coupon_sale[attr]['coupon_code']);
41140}
41141
41142function js_set_variant_ean_code(selectbox) {
41143	const val = selectbox.val();
41144	const match = val.match(/EAN=(\d+)/);
41145	const $el = jQuery('.flypage1 .ean_value');
41146
41147	// ak regex nič nenašiel variant_ean bude prázdny string
41148	const variant_ean = match ? match[1] || '' : '';
41149	const value = !js_is_empty(variant_ean)
41150		? variant_ean
41151		: $el.data('ean-default');
41152
41153	$el.attr('data-ean-current', value).text(value);
41154}
41155
41156function js_save_price_changed(selectbox) {
41157	if (jQuery('body').hasClass('is_tmr_product')) {
41158		return;
41159	}
41160
41161	var $savePrice = jQuery('.flypage-cena .save_val');
41162	var savevalboth = $savePrice.hasClass('type_both');
41163	var save_val_element = '';
41164	var old_price_bdph = '';
41165	var old_price_sdph = '';
41166	var old_price = '';
41167	var $oldPrice = jQuery('.flypage-old-price .old-price');
41168	let isVariantPriceWithoutTax = typeof js_global_VM_PRODUCT_ATTRIB_PRICE_VALUES_WITH_TAX != 'undefined' && js_global_VM_PRODUCT_ATTRIB_PRICE_VALUES_WITH_TAX === '';
41169
41170	var $oldPriceWithoutTax = jQuery('.flypage-old-price .old-price-bdph');
41171	if ($oldPriceWithoutTax.length > 0) {
41172		old_price_bdph = $oldPriceWithoutTax.text();
41173	}
41174
41175	var $oldPriceWithTax = jQuery('.flypage-old-price .old-price-sdph');
41176	if ($oldPriceWithTax.length > 0) {
41177		old_price_sdph = $oldPriceWithTax.text();
41178	}
41179
41180	if ($oldPrice.length) {
41181		old_price = $oldPrice.text();
41182	} else {
41183		$oldPrice = jQuery('.flypage-prices .old-price');
41184		if ($oldPrice.length) {
41185			old_price = $oldPrice.text();
41186		}
41187	}
41188
41189	if ($savePrice.length) {
41190		save_val_element = '.flypage-cena .save_val';
41191	} else if (jQuery('.image_container .save_val').length) {
41192		save_val_element = '.image_container .save_val';
41193	} else if (jQuery('.flypage-image .flypage-saving-price').length) {
41194		save_val_element = '.flypage-image .flypage-saving-price';
41195	} else if ( jQuery('.flypage-right .flypage-saving-price .save_val').length ) {
41196		save_val_element = '.flypage-right .flypage-saving-price .save_val';
41197	} else if ( jQuery('.flypage-right .flypage-saving-price').length ) {
41198		save_val_element = '.flypage-right .flypage-saving-price';
41199	}
41200
41201	$savePrice = jQuery(save_val_element);
41202
41203	if (typeof (a) == 'undefined' || typeof js_old_price_values === 'undefined') {
41204		js_old_price_values = {
41205			save_val      : $savePrice.html(),
41206			old_price     : old_price,
41207			old_price_sdph: old_price_sdph,
41208			old_price_bdph: old_price_bdph
41209		};
41210	}
41211
41212	var $actionPriceWithoutTax = jQuery('.akcia-cena-bdph').first();
41213
41214	if (js_old_price_values.old_price_bdph != '' && $actionPriceWithoutTax.is(':visible') && $oldPriceWithTax.length > 0) {
41215		js_old_price_values.old_price = js_old_price_values.old_price_bdph;
41216		$oldPriceWithTax.show();
41217		$oldPriceWithoutTax.show();
41218	} else if (js_old_price_values.old_price_bdph != '' && $actionPriceWithoutTax.not(':visible') && $oldPriceWithTax.length > 0) {
41219		js_old_price_values.old_price = js_old_price_values.old_price_sdph;
41220		$oldPriceWithTax.show();
41221		$oldPriceWithoutTax.hide();
41222	}
41223
41224	// Variant ma beznu cenu
41225	var has_old_price   = selectbox.val().indexOf('{OP=') > -1;
41226
41227	// Niekedy toto nie je definovane (cookiebot?) a pouziva sa to vsade
41228	if ( typeof shop_currency_info === 'undefined' || typeof shop_currency_info[shop_vendor_currency_code] === 'undefined' ) return;
41229
41230	var current_curency = shop_currency_info[shop_vendor_currency_code];
41231
41232	// Aktualna cena
41233	variant_price = '';
41234	if (jQuery('.prod_adv_attrib_radio tr').hasClass('active')) {
41235		var variant_price_text = jQuery('.prod_adv_attrib_radio tr.active .shop_addtocart_advanced_attribute_price').clone().find('.attr_old_price').remove().end().text();
41236		variant_price = parseFloat(variant_price_text.replace(current_curency['1000_SYMBOL'], '').replace(current_curency.DEC_SYMBOL, '.').replace(/[^\d\.\,]+/g, ''));
41237	} else {
41238		if (js_old_price_values.old_price_bdph != '' && $actionPriceWithoutTax.is(':visible') && isVariantPriceWithoutTax) {
41239			variant_price = parseFloat($actionPriceWithoutTax.text().replace(current_curency['1000_SYMBOL'], '').replace(current_curency.DEC_SYMBOL, '.').replace(/[^\d\.\,]+/g, ''));
41240		} else {
41241			if (jQuery('.prod_adv_attribs_div .attr_group_sel_div').length > 0) {
41242				var s       = jQuery(selectbox).val();
41243				var regExp  = /\[=([^)]+)\]/;
41244				var matches = regExp.exec(s);
41245				if (matches != null && typeof matches[1] !== 'undefined' && matches[1] != '') {
41246					variant_price = matches[1];
41247
41248					if (isVariantPriceWithoutTax) {
41249						// ak ma shop nastavene ceny variantov bez dph
41250
41251						if ( typeof js_Config_fix_prices_for_variants != 'undefined' && js_Config_fix_prices_for_variants) {
41252							//cena získaná zo selectu nie je správna -> v prípade, že mena nesedí , preto cenu vždy predelíme currency
41253							//shop_vendor_currency_code -> to by mal byť kurz ktorý má zśakazník
41254
41255							var vendor_currency = 1;
41256
41257							if (typeof shop_currency_info[shop_vendor_currency_code] != 'undefined') {
41258								vendor_currency = shop_currency_info[shop_vendor_currency_code]['RATE'];
41259							}
41260
41261							variant_price = variant_price * js_product_tax_rate * (current_curency.RATE / vendor_currency);
41262						} else {
41263							variant_price = variant_price * js_product_tax_rate * current_curency.RATE;
41264						}
41265					}
41266
41267					//janB fix pre eshopist nenaťahovalo sa správne nastavenie cien pre iné
41268					if (typeof js_Config_fix_variant_price_not_default_currency != 'undefined' && js_Config_fix_variant_price_not_default_currency) {
41269						variant_price *= current_curency.RATE;
41270					}
41271
41272					variant_price_text = js_format_Money(variant_price, current_curency.DECIMALS, current_curency.SYMBOL, current_curency['1000_SYMBOL'], current_curency.DEC_SYMBOL);
41273				} else {
41274					variant_price = parseFloat(jQuery('#product-detail-price-value').text().replace(current_curency['1000_SYMBOL'], '').replace(current_curency.DEC_SYMBOL, '.').replace(/[^\d\.\,]+/g, ''));
41275				}
41276			} else {
41277				variant_price = parseFloat(jQuery('#product-detail-price-value').text().replace(current_curency['1000_SYMBOL'], '').replace(current_curency.DEC_SYMBOL, '.').replace(/[^\d\.\,]+/g, ''));
41278			}
41279		}
41280	}
41281
41282	if (!isNaN(variant_price) && config('js_dual_price_config')) {
41283		let dualPriceVal = Math.round(variant_price * js_dual_price_config.rate * 100) / 100;
41284		jQuery(selectbox).closest('div.vex').find('.dual-price-value').html(dualPriceVal + ' ' + js_dual_price_config.symbol);
41285	}
41286
41287	// Bezna cena
41288	var variant_old_price = selectbox.val() != '' && has_old_price ? parseFloat(selectbox.val().match(/\{OP\=([-+]?[0-9]*\.?[0-9]*)\}/)[1]) : (!js_is_empty(js_old_price_values.old_price) ? parseFloat(js_old_price_values.old_price.replace(current_curency['1000_SYMBOL'], '').replace(current_curency.DEC_SYMBOL, '.')) : '');	//	/\{OP\=([-+]?[0-9]*\.?[0-9]*)\}(\s|$)/
41289	// vyzera to tak, ze v OP su data tahane z db a tak nemaju . a , zamenenu
41290
41291	var variant_old_price_wo_vat = variant_old_price;
41292
41293	if (isVariantPriceWithoutTax && typeof js_product_tax_rate !== 'undefined' && has_old_price) {
41294		variant_old_price = variant_old_price * js_product_tax_rate * parseFloat(current_curency.RATE);
41295	}
41296
41297	if (isNaN(variant_old_price) && js_old_price_values.old_price != '' ){
41298		// pridane kvoli thestreets.sk lebo nemaju nastavenu old price na variantoch ale na produktoch
41299		variant_old_price = parseFloat(js_old_price_values.old_price.replace(current_curency['1000_SYMBOL'], '').replace(current_curency.DEC_SYMBOL, '.').replace(/[^\d\.\,]+/g, ''));
41300	}
41301
41302	if (isNaN(variant_old_price) && !jQuery('.prod_adv_attribs_div .attr_group_sel_div').length) {
41303		if ( jQuery('.flypage-old-price').length ) {
41304			var oldPriceWTaxEl  = jQuery('.flypage-old-price').find('.old-price-sdph');
41305			var oldPriceWoTaxEl = jQuery('.flypage-old-price').find('.old-price-bdph');
41306
41307			if (oldPriceWoTaxEl.length || oldPriceWTaxEl.length) {
41308				if (!isVariantPriceWithoutTax) {
41309					variant_old_price = parseFloat(oldPriceWTaxEl.text().replace(current_curency['1000_SYMBOL'], '').replace(current_curency.DEC_SYMBOL, '.'));
41310				} else {
41311					variant_old_price = parseFloat(oldPriceWoTaxEl.text().replace(current_curency['1000_SYMBOL'], '').replace(current_curency.DEC_SYMBOL, '.'));
41312				}
41313			} else {
41314				variant_old_price = parseFloat(jQuery('.flypage-old-price').text().replace(current_curency['1000_SYMBOL'], '').replace(current_curency.DEC_SYMBOL, '.').replace(/[^\d\.\,]+/g, ''));
41315			}
41316		}
41317	}
41318
41319	// zaokruhlenie na desatine miesta podla meny, kedze vznikaju ceny ako 11.750000000000039 co nieje 11.75
41320	// taktiez ak sme mali beznu cenu na viac desatinnych miest, porovnavalo sa to so zaokruhlenou cenou
41321	if (variant_old_price !== '') {
41322		variant_old_price = +(Math.round(variant_old_price + "e+" + current_curency.DECIMALS)  + "e-" + current_curency.DECIMALS);
41323	}
41324
41325	var showSavingPriceBothSeparately = typeof js_Config_show_saving_price_both_values_separately !== 'undefined';
41326
41327	var savePriceSumValue = jQuery('.saving_price_value');
41328	var savePricePercentValue = jQuery('.saving_price_percent');
41329
41330	var savingPriceValue = 0;
41331	var savingPricePercent = 0;
41332
41333	if (variant_old_price > variant_price) {
41334		savingPriceValue = variant_old_price - variant_price;
41335		savingPricePercent = savingPriceValue / variant_old_price * 100;
41336	}
41337
41338	if (savingPriceValue > 0) {
41339		if (has_old_price && variant_old_price > variant_price) {
41340			// variant ma vlastnu beznu cenu
41341			$oldPrice.html(js_format_Money(variant_old_price, current_curency.DECIMALS, current_curency.SYMBOL, current_curency['1000_SYMBOL'], current_curency.DEC_SYMBOL)
41341);
41342			if (!isVariantPriceWithoutTax) {
41343				$oldPriceWithTax.html(js_format_Money(variant_old_price, current_curency.DECIMALS, current_curency.SYMBOL, current_curency['1000_SYMBOL'], current_curency.DEC_SYMBOL));
41344			} else {
41345				$oldPriceWithoutTax.html(js_format_Money(variant_old_price_wo_vat, current_curency.DECIMALS, current_curency.SYMBOL, current_curency['1000_SYMBOL'], current_curency.DEC_SYMBOL));
41346			}
41347		}
41348
41349		$savePrice.show();
41350		jQuery('.flypage-old-price').show();
41351
41352		var mena, save_value, percentage;
41353
41354		if (savevalboth || showSavingPriceBothSeparately) {
41355			var save_html  = '';
41356
41357			mena = js_old_price_values.old_price.split(' ')[1];
41358
41359			if(!mena) {
41360				mena = current_curency.SYMBOL;
41361			}
41362
41363			save_value = savingPriceValue.toFixed(2).replace('.', ',');
41364			percentage = savingPricePercent.toFixed(0).replace('.', ',');
41365
41366			if (showSavingPriceBothSeparately && savePriceSumValue.length && savePricePercentValue.length) {
41367				savePriceSumValue.text(save_value + ' ' + mena).show();
41368				savePricePercentValue.text(percentage + ' %').show();
41369			} else {
41370				save_html += '<span class="save_val_sum">' + save_value + ' ' + mena + '</span>';
41371				save_html += '<span class="save_val_perc">' + percentage + ' %</span>';
41372				$savePrice.html(save_html);
41373			}
41374		} else {
41375			if (attributeChangeCustomParams.VM_PRODUCT_OLD_PRICE == '3') {
41376				save_value = js_format_Money(savingPriceValue, current_curency.DECIMALS, current_curency.SYMBOL, current_curency['1000_SYMBOL'], current_curency.DEC_SYMBOL);
41377				$savePrice.html('<span class="save_lbl">' + js_lang_saving_price_label + ':</span> <span class="save_val">' + save_value + '</span>');
41378			} else {
41379				// Usetrite percenta
41380				percentage = savingPricePercent.toFixed(0).replace('.', ',');
41381
41382				if (typeof (js_CS_Config_prod_detail_save_price_disp_old_variant) != 'undefined' && js_CS_Config_prod_detail_save_price_disp_old_variant) {
41383					var save_html_perc = '<span class="save_val">' + percentage + ' %</span>';
41384					$savePrice.html(save_html_perc);
41385				}else {
41386					if ($savePrice.hasClass('save_val')) {
41387						$savePrice.text(percentage + ' %');
41388					} else {
41389						var additionalContent = '';
41390						var contentElement = $savePrice.find('.save_cstm_string');
41391
41392						if (contentElement.length) {
41393							additionalContent = contentElement.prop('outerHTML');
41394						}
41395
41396						var save_html_perc = '<span class="save_val">' + percentage + ' %' + additionalContent + '</span>';
41397
41398						$savePrice.html(save_html_perc);
41399					}
41400				}
41401			}
41402		}
41403	} else {
41404		$savePrice.hide();
41405		jQuery('.flypage-old-price').hide();
41406
41407		if (showSavingPriceBothSeparately && savePriceSumValue.length && savePricePercentValue.length) {
41408			savePriceSumValue.hide();
41409			savePricePercentValue.hide();
41410		}
41411	}
41412
41413	if (variant_price_text != '') {
41414		jQuery('#product-detail-price-value').html(variant_price_text);
41415
41416		if (typeof TbNasplatkyButton !== 'undefined' && typeof variant_price !== 'undefined') {
41417			TbNasplatkyButton.update(parseFloat(variant_price));
41418		}
41419
41420		if (typeof variant_old_price != 'undefined' && variant_old_price) {
41421			var variant_old_price_text = js_format_Money(variant_old_price, current_curency.DECIMALS, current_curency.SYMBOL, current_curency['1000_SYMBOL'], current_curency.DEC_SYMBOL);
41422
41423			jQuery('.flypage-cena span.old-price-sdph').html(variant_old_price_text);
41424		}
41425	} else {
41426		jQuery('.flypage-saving-price, .flypage-old-price').html(jQuery('.prod_adv_attrib_radio tr.active .shop_addtocart_advanced_attribute_price').text().split(' ')[0].replace('.', '').replace(',', '.'));
41427	}
41428}
41429
41430function js_handle_variant_code_changed(jso) {
41431	if ((typeof js_attr_table_mod !== 'undefined' && js_attr_table_mod) || config('js_Config_hide_product_code_for_customers')) {
41432		return;
41433	}
41434
41435	if (typeof (js_handle_variant_code_changed_disabled) != 'undefined' && js_handle_variant_code_changed_disabled) {
41436		return false;
41437	}
41438
41439	// ak ma viariant nastavene zobrazovanie kodu produktu a aj kodu variantu
41440	if (jQuery('.flypage_variant_sku').length != 0) {
41441		return;
41442	}
41443	if (jQuery('.flypage_sku .product_sku_value_old').length == 0) {
41444		jQuery('.flypage_sku').append('<span class="product_sku_value_old hide">' + jQuery('.product_sku_value').text() + '</span>');
41445	}
41446	var jqo                   = jQuery(jso);
41447	var jqo_product_sku_value = jQuery('#middle .flypage1 .product_sku_value');
41448	originalProductSkuValue.push(jqo_product_sku_value);
41449	if (jqo_product_sku_value.length > 0) {
41450		if (jqo.data('orig_product_sku_value') == null) {
41451			jqo.data('orig_product_sku_value', jqo_product_sku_value.html());
41452		}
41453		var curr_val  = jqo.val();
41454		var curr_code = '';
41455		if (curr_val != '' && curr_val !== null) {
41456			var curr_code_matches = curr_val.match(/\{CODE\=([^\}]+)\}/);
41457			if (curr_code_matches != null) {
41458				curr_code = curr_code_matches[1];
41459			}
41460		}
41461		if (curr_code == '') {
41462			curr_code = jqo.data('orig_product_sku_value');
41463		}
41464		curr_code = curr_code.replace('_', ' ');
41465		jqo_product_sku_value.html(curr_code);
41466	}
41467}
41468
41469function js_handle_variant_old_price_changed(jso) {
41470	if (typeof (js_prod_attr_old_price) === 'undefined' || !js_prod_attr_old_price) {
41471		return;
41472	}
41473	var jqo                         = jQuery(jso);
41474	var jqo_product_old_price_value = jQuery('#middle .flypage1 .flypage-cena .old-price');
41475	if (jqo_product_old_price_value.length < 1) {
41476		jqo_product_old_price_value = jQuery('#middle .flypage1 .flypage-prices').find('.old-price');
41477	}
41478
41479	if (jqo_product_old_price_value.length > 0) {
41480		if (jqo.data('orig_product_old_price_value') == null) {
41481			jqo.data('orig_product_old_price_value', jqo_product_old_price_value.html());
41482		}
41483
41484		curr_code = jqo.data('orig_product_old_price_value');
41485
41486		if (typeof (js_op_list) != 'undefined' && js_op_list != null && typeof (js_list) != 'undefined' && js_list != null) {
41487			//	ak je to select ktory ma 1. polozku len vyberovu (prazdnu) a zaroven je vybrana ina ako tato vyberova (prazdna)
41488			//	vtedy musime odpocitavat poziciu
41489			var sel_opt_offset = jqo.children('option:first').val() == '' && jqo.get(0).selectedIndex > 0 ? 1 : 0;
41490			var current_curency = shop_currency_info[shop_vendor_currency_code];
41491
41492			var price1;
41493			if (typeof js_op_list[jqo.get(0).selectedIndex - sel_opt_offset] !== 'undefined') {
41494				price1 = parseFloat(js_op_list[jqo.get(0).selectedIndex - sel_opt_offset].replace(current_curency['1000_SYMBOL'], '').replace(current_curency.DEC_SYMBOL, '.'));
41495			} else {
41496				price1 = '';
41497			}
41498
41499			var price2;
41500			if (typeof js_list[jqo.get(0).selectedIndex - sel_opt_offset] !== 'undefined') {
41501				price2 = parseFloat(js_list[jqo.get(0).selectedIndex - sel_opt_offset].replace(current_curency['1000_SYMBOL'], '').replace(current_curency.DEC_SYMBOL, '.'));
41502			} else {
41503				price2 = '';
41504			}
41505
41506			if (jqo.get(0).selectedIndex <= js_op_list.length && js_op_list[jqo.get(0).selectedIndex - sel_opt_offset] != '' && jqo.get(0).selectedIndex <= js_list.length && js_list[jqo.get(0).selectedIndex - sel_opt_offset] != '' && price1 > price2) {
41507				//curr_code = jqo.get(0).selectedIndex-sel_opt_offset;
41508				curr_code = js_op_list[jqo.get(0).selectedIndex - sel_opt_offset];
41509				//curr_code = js_op_list[jqo.get(0).selectedIndex-sel_opt_offset].replace(current_curency['1000_SYMBOL'],'').replace(current_curency['DEC_SYMBOL'],'.');
41510			}
41511		}
41512
41513		if (curr_code == '') {
41514			curr_code = jqo.data('orig_product_old_price_value');
41515		}
41516
41517		jqo_product_old_price_value.html(curr_code);
41518	}
41519}
41520
41521function js_custom_credit_change_function(selectbox) {
41522	var $selectbox = jQuery(selectbox);
41523	if (typeof (js_global_product_credit_value) == 'undefined' || typeof (js_global_product_variants_credit_json) == 'undefined' || jQuery('.credit_val').length == 0) {
41524		return false;
41525	}
41526	var credit_value = js_global_product_credit_value;
41527	var credit_index = $selectbox.val().replace(/_/gi, ' ').match(/^[^\[\{]+/) || '';
41528// 	if (typeof(console) != 'undefined') console.log('credit_index', credit_index);
41529	if (credit_index != '' && typeof credit_index !== 'object' && typeof (js_global_product_variants_credit_json[credit_index]) && typeof (js_global_product_variants_credit_json[credit_index].credit_value) != 'undefined') {
41530		credit_value = js_global_product_variants_credit_json[credit_index].credit_value;
41531	}
41532	var credit_text = '';
41533	if (credit_value < 1 || credit_value > 4) {
41534		credit_text = js_global_PHPSHOP_PRODUCT_INCR_CREDIT_BY_PURCHASE_TEXT;
41535	}
41536	if (credit_value > 1 && credit_value < 5) {
41537		credit_text = js_global_PHPSHOP_PRODUCT_INCR_CREDIT_BY_PURCHASE_TEXT_5;
41538	}
41539	if (credit_value == '1') {
41540		credit_text = js_global_PHPSHOP_PRODUCT_INCR_CREDIT_BY_PURCHASE_TEXT_1;
41541	}
41542	if (credit_text == '') {
41543		if (typeof (console) != 'undefined') {
41544			console.log('ERR: credit_text');
41545		}
41546		return false;
41547	}
41548	jQuery('.product_credit_amount').html(credit_text.replace('%s', credit_value));
41549}
41550
41551function js_set_actual_variant_main_image(selectbox) {
41552	selectbox     = jQuery(selectbox);
41553	var img_index     = selectbox.find('option:selected').attr('id');
41554	var flypage_img_a = jQuery('.flypage-image a');
41555	var flypage_img   = jQuery('.flypage-image a img');
41556	if (selectbox.data('main_flypage_image_src') == null) {
41557		selectbox.data('main_flypage_image_src', flypage_img.attr('src'));
41558	}
41559	if (selectbox.data('main_flypage_a_href') == null) {
41560		selectbox.data('main_flypage_a_href', flypage_img.parents('a:first').attr('href'));
41561	}
41562	if (typeof (img_index) != 'undefined' && typeof (ref_array_imgs) != 'undefined' && typeof (ref_array_imgs[img_index]) != 'undefined' && ref_array_imgs[img_index] != '') {
41563		// isset variant image
41564		flypage_img_a.attr('href', js_global_skvelyweb_site + '/images/shop-active-images/' + ref_array_imgs[img_index]);
41565		if ( typeof js_Config_parser_enabled !== 'undefined' && js_Config_parser_enabled ) {
41566			flypage_img.attr('src', js_global_skvelyweb_site + '/images/shop-active-images/' + ref_array_imgs[img_index].replace('(', '%28').replace(')', '%29'));
41567		} else {
41568			flypage_img.attr('src', js_global_skvelyweb_site + '/images/shop-active-images/' + ref_array_imgs[img_index]);
41569		}
41570		main_image_href = main_image_thumb_href = js_global_skvelyweb_site + '/images/shop-active-images/' + ref_array_imgs[img_index];
41571		flypage_img_a.data({href: main_image_href, src: main_image_href});
41572		// fancybox option je potrebne zmenit, lebo je tam nastaveny povodny img produktu
41573		if (typeof flypage_img_a.attr('data-fancybox') !== 'undefined') {
41574			var data_options = {
41575				'thumb': main_image_href,
41576				'src'  : main_image_href,
41577				'type' : 'image'
41578			};
41579			flypage_img_a.attr('data-options', JSON.stringify(data_options));
41580			flypage_img_a.data().options = JSON.stringify(data_options);
41581		}
41582		if (typeof js_Config_parser_enabled !== 'undefined' && js_Config_parser_enabled) {
41583			if ( typeof flypage_img[0] !== 'undefined' && flypage_img[0].hasAttribute('data-srcset') ) {
41584				flypage_img.attr('data-srcset', js_global_skvelyweb_site + '/images/shop-active-images/' + ref_array_imgs[img_index].replace('%', '%25'));
41585				flypage_img.attr('srcset', js_global_skvelyweb_site + '/images/shop-active-images/' + ref_array_imgs[img_index].replace('%', '%25'));
41586				if ( (is_cs_user('js_opts') || is_cs_user('csu-parser')) ) {
41587					if ( jQuery('.product_activeimages_attr.' + img_index).length ) {
41588						var attrId = Number(img_index.match(/attr_id_([0-9])/)[1]) + 1;
41589						flypage_img.parent('a[data-fancybox^="gallery"]').attr('data-fancybox', 'gallery' + attrId);
41590					} else {
41591						flypage_img.parent('a[data-fancybox^="gallery"]').attr('data-fancybox', 'gallery');
41592					}
41593				}
41594			} else if ( typeof flypage_img[0] !== 'undefined' && flypage_img[0].hasAttribute('longdesc') ) {
41595
41596				flypage_img.attr('longdesc', js_global_skvelyweb_site + '/images/shop-active-images/' + ref_array_imgs[img_index]);
41597			}
41598		} else {
41599			if ( typeof flypage_img[0] !== 'undefined' && flypage_img[0].hasAttribute('data-srcset') ) {
41600				flypage_img.attr('data-srcset', js_global_skvelyweb_site + '/images/shop-active-images/' + ref_array_imgs[img_index]);
41601				flypage_img.attr('srcset', js_global_skvelyweb_site + '/images/shop-active-images/' + ref_array_imgs[img_index]);
41602			}
41603		}
41604	} else {
41605		// set the default product thumb image
41606		flypage_img_a.attr('href', selectbox.data('main_flypage_a_href'));
41607		flypage_img.attr('src', selectbox.data('main_flypage_image_src'));
41608
41609		// reset srcset and data-srcset if present
41610		if (flypage_img[0] && flypage_img[0].hasAttribute('data-srcset')) {
41611			flypage_img.attr('data-srcset', selectbox.data('main_flypage_image_src'));
41612			flypage_img.attr('srcset', selectbox.data('main_flypage_image_src'));
41613		}
41614
41615		// reset longdesc if present
41616		if (flypage_img[0] && flypage_img[0].hasAttribute('longdesc')) {
41617			flypage_img.attr('longdesc', selectbox.data('main_flypage_image_src'));
41618		}
41619
41620		// reset Fancybox data-options if present
41621		if (typeof flypage_img_a.attr('data-fancybox') !== 'undefined') {
41622			var data_options = {
41623				'thumb': selectbox.data('main_flypage_image_src'),
41624				'src'  : selectbox.data('main_flypage_image_src'),
41625				'type' : 'image'
41626			};
41627			flypage_img_a.attr('data-options', JSON.stringify(data_options));
41628			flypage_img_a.data().options = JSON.stringify(data_options);
41629		}
41630	}
41631}
41632
41633function js_set_variant_into_url(selectbox) {
41634	let $selectbox = jQuery(selectbox);
41635	let variant = decodeURIComponent($selectbox.val()).split('{')[0].split(':');
41636	let url = window.location.href;
41637
41638	if (typeof variant === 'undefined' || typeof variant[1] === 'undefined') {
41639		return false;
vendor: 13,934 bytes, lines 41640-41723
41640	}
41641
41642	// fix ak ma variant cenu
41643	if (variant[1]) {
41644		variant[1] = variant[1].split('[')[0];
41645	}
41646
41647	//hash predstavoval lovercase a ten nechceme
41648	if (url.indexOf('#') == -1) {
41649		history.replaceState({}, '', url + '#' + variant[1]);
41650	} else {
41651		history.replaceState({}, '', url.substring(0, url.indexOf('#')) + '#' + variant[1]);
41652	}
41653}
41654
41655function setVariantUrlParam(selectbox) {
41656	let $selectbox = jQuery(selectbox);
41657	let variant = decodeURIComponent($selectbox.val()).split('{')[0].split(':');
41658	let href = window.location.origin + window.location.pathname;
41659	let urlSearchParams = new URLSearchParams(window.location.search);
41660
41661	if (typeof variant === 'undefined' || typeof variant[1] === 'undefined') {
41662		return false;
41663	}
41664
41665	if (variant[1]) {
41666		variant[1] = variant[1].split('[')[0];
41667	}
41668
41669	urlSearchParams.set('var', variant[1]);
41670	history.replaceState({}, '', href + '?' + urlSearchParams.toString() + window.location.hash);
41671}
41672
41673function updateAhojCalculatorPrice(selectedValue) {
41674	if (!config('js_Config_ahoj_kalkulacka')) {
41675		return;
41676	}
41677
41678	const priceMatch = selectedValue.match(/\[=([^\]]+)]/);
41679	let variantPrice = priceMatch?.[1] ? parseFloat(priceMatch[1]) : 0;
41680
41681	const currency = shop_currency_info[shop_vendor_currency_code];
41682	const isPriceWithoutTax = typeof js_global_VM_PRODUCT_ATTRIB_PRICE_VALUES_WITH_TAX !== 'undefined'
41683		&& js_global_VM_PRODUCT_ATTRIB_PRICE_VALUES_WITH_TAX === '';
41684
41685	if (isPriceWithoutTax) {
41686		const vendorRate = shop_currency_info[shop_vendor_currency_code]?.RATE ?? 1;
41687		const rateMultiplier = config('js_Config_fix_prices_for_variants')
41688			? currency.RATE / vendorRate
41689			: currency.RATE;
41690
41691		variantPrice *= js_product_tax_rate * rateMultiplier;
41692	}
41693
41694	const calculateElem = jQuery('.ahojCalculateLink');
41695	const price = variantPrice.toFixed(currency.DECIMALS);
41696
41697	if (!calculateElem.length || !price) return;
41698
41699	calculateElem.attr('data-ahojparams', `suma=${price}`);
41700}
41701
41702
41703/* ========================================
41704 FILE: /includes/js/jquery/slick/slick.min.js
41705 ==================== */
41706
41707/*
41708     _ _      _       _
41709 ___| (_) ___| | __  (_)___
41710/ __| | |/ __| |/ /  | / __|
41711\__ \ | | (__|   < _ | \__ \
41712|___/_|_|\___|_|\_(_)/ |___/
41713                   |__/
41714
41715 Version: 1.6.0
41716  Author: Ken Wheeler
41717 Website: http://kenwheeler.github.io
41718    Docs: http://kenwheeler.github.io/slick
41719    Repo: http://github.com/kenwheeler/slick
41720  Issues: http://github.com/kenwheeler/slick/issues
41721
41722 */
41723!function(i){"use strict";"function"==typeof define&&define.amd?define(["jquery"],i):"undefined"!=typeof exports?module.exports=i(require("jquery")):i(jQuery)}(function(i){"use strict";var e=window.Slick||{};e=function(){function e(e,o){var s,n=this;n.defaults={accessibility:!0,adaptiveHeight:!1,appendArrows:i(e),appendDots:i(e),arrows:!0,asNavFor:null,prevArrow:'<button type="button" data-role="none" class="slick-prev" aria-label="Previous" tabindex="0" role="button">Previous</button>',nextArrow:'<button type="button" data-role="none" class="slick-next" aria-label="Next" tabindex="0" role="button">Next</button>',autoplay:!1,autoplaySpeed:3e3,centerMode:!1,centerPadding:"50px",cssEase:"ease",customPaging:function(e,t){return i('<button type="button" data-role="none" role="button" tabindex="0" />').text(t+1)},dots:!1,dotsClass:"slick-dots",draggable:!0,easing:"linear",edgeFriction:.35,fade:!1,focusOnSelect:!1,infinite:!0,initialSlide:0,lazyLoad:"ondemand",mobileFirst:!1,pauseOnHover:!0,pauseOnFocus:!0,pauseOnDotsHover:!1,respondTo:"window",responsive:null,rows:1,rtl:!1,slide:"",slidesPerRow:1,slidesToShow:1,slidesToScroll:1,speed:500,swipe:!0,swipeToSlide:!1,touchMove:!0,touchThreshold:5,useCSS:!0,useTransform:!0,variableWidth:!1,vertical:!1,verticalSwiping:!1,waitForAnimate:!0,zIndex:1e3},n.initials={animating:!1,dragging:!1,autoPlayTimer:null,currentDirection:0,currentLeft:null,currentSlide:0,direction:1,$dots:null,listWidth:null,listHeight:null,loadIndex:0,$nextArrow:null,$prevArrow:null,slideCount:null,slideWidth:null,$slideTrack:null,$slides:null,sliding:!1,slideOffset:0,swipeLeft:null,$list:null,touchObject:{},transformsEnabled:!1,unslicked:!1},i.extend(n,n.initials),n.activeBreakpoint=null,n.animType=null,n.animProp=null,n.breakpoints=[],n.breakpointSettings=[],n.cssTransitions=!1,n.focussed=!1,n.interrupted=!1,n.hidden="hidden",n.paused=!0,n.positionProp=null,n.respondTo=null,n.rowCount=1,n.shouldClick=!0,n.$slider=i(e),n.$slidesCache=null,n.transformType=null,n.transitionType=null,n.visibilityChange="visibilitychange",n.windowWidth=0,n.windowTimer=null,s=i(e).data("slick")||{},n.options=i.extend({},n.defaults,o,s),n.currentSlide=n.options.initialSlide,n.originalSettings=n.options,"undefined"!=typeof document.mozHidden?(n.hidden="mozHidden",n.visibilityChange="mozvisibilitychange"):"undefined"!=typeof document.webkitHidden&&(n.hidden="webkitHidden",n.visibilityChange="webkitvisibilitychange"),n.autoPlay=i.proxy(n.autoPlay,n),n.autoPlayClear=i.proxy(n.autoPlayClear,n),n.autoPlayIterator=i.proxy(n.autoPlayIterator,n),n.changeSlide=i.proxy(n.changeSlide,n),n.clickHandler=i.proxy(n.clickHandler,n),n.selectHandler=i.proxy(n.selectHandler,n),n.setPosition=i.proxy(n.setPosition,n),n.swipeHandler=i.proxy(n.swipeHandler,n),n.dragHandler=i.proxy(n.dragHandler,n),n.keyHandler=i.proxy(n.keyHandler,n),n.instanceUid=t++,n.htmlExpr=/^(?:\s*(<[\w\W]+>)[^>]*)$/,n.registerBreakpoints(),n.init(!0)}var t=0;return e}(),e.prototype.activateADA=function(){var i=this;null!==i.$slideTrack&&i.$slideTrack.find(".slick-active").attr({"aria-hidden":"false"}).find("a, input, button, select").attr({tabindex:"0"})},e.prototype.addSlide=e.prototype.slickAdd=function(e,t,o){var s=this;if("boolean"==typeof t)o=t,t=null;else if(0>t||t>=s.slideCount)return!1;s.unload(),"number"==typeof t?0===t&&0===s.$slides.length?i(e).appendTo(s.$slideTrack):o?i(e).insertBefore(s.$slides.eq(t)):i(e).insertAfter(s.$slides.eq(t)):o===!0?i(e).prependTo(s.$slideTrack):i(e).appendTo(s.$slideTrack),s.$slides=s.$slideTrack.children(this.options.slide),s.$slideTrack.children(this.options.slide).detach(),s.$slideTrack.append(s.$slides),s.$slides.each(function(e,t){i(t).attr("data-slick-index",e)}),s.$slidesCache=s.$slides,s.reinit()},e.prototype.animateHeight=function(){var i=this;if(1===i.options.slidesToShow&&i.options.adaptiveHeight===!0&&i.options.vertical===!1){var e=i.$slides.eq(i.currentSlide).outerHeight(!0);i.$list.animate({height:e},i.options.speed)}},e.prototype.animateSlide=function(e,t){var o={},s=this;s.animateHeight(),s.options.rtl===!0&&s.options.vertical===!1&&(e=-e),s.transformsEnabled===!1?s.options.vertical===!1?s.$slideTrack.animate({left:e},s.options.speed,s.options.easing,t):s.$slideTrack.animate({top:e},s.options.speed,s.options.easing,t):s.cssTransitions===!1?(s.options.rtl===!0&&(s.currentLeft=-s.currentLeft),i({animStart:s.currentLeft}).animate({animStart:e},{duration:s.options.speed,easing:s.options.easing,step:function(i){i=Math.ceil(i),s.options.vertical===!1?(o[s.animType]="translate("+i+"px, 0px)",s.$slideTrack.css(o)):(o[s.animType]="translate(0px,"+i+"px)",s.$slideTrack.css(o))},complete:function(){t&&t.call()}})):(s.applyTransition(),e=Math.ceil(e),s.options.vertical===!1?o[s.animType]="translate3d("+e+"px, 0px, 0px)":o[s.animType]="translate3d(0px,"+e+"px, 0px)",s.$slideTrack.css(o),t&&setTimeout(function(){s.disableTransition(),t.call()},s.options.speed))},e.prototype.getNavTarget=function(){var e=this,t=e.options.asNavFor;return t&&null!==t&&(t=i(t).not(e.$slider)),t},e.prototype.asNavFor=function(e){var t=this,o=t.getNavTarget();null!==o&&"object"==typeof o&&o.each(function(){var t=i(this).slick("getSlick");t.unslicked||t.slideHandler(e,!0)})},e.prototype.applyTransition=function(i){var e=this,t={};e.options.fade===!1?t[e.transitionType]=e.transformType+" "+e.options.speed+"ms "+e.options.cssEase:t[e.transitionType]="opacity "+e.options.speed+"ms "+e.options.cssEase,e.options.fade===!1?e.$slideTrack.css(t):e.$slides.eq(i).css(t)},e.prototype.autoPlay=function(){var i=this;i.autoPlayClear(),i.slideCount>i.options.slidesToShow&&(i.autoPlayTimer=setInterval(i.autoPlayIterator,i.options.autoplaySpeed))},e.prototype.autoPlayClear=function(){var i=this;i.autoPlayTimer&&clearInterval(i.autoPlayTimer)},e.prototype.autoPlayIterator=function(){var i=this,e=i.currentSlide+i.options.slidesToScroll;i.paused||i.interrupted||i.focussed||(i.options.infinite===!1&&(1===i.direction&&i.currentSlide+1===i.slideCount-1?i.direction=0:0===i.direction&&(e=i.currentSlide-i.options.slidesToScroll,i.currentSlide-1===0&&(i.direction=1))),i.slideHandler(e))},e.prototype.buildArrows=function(){var e=this;e.options.arrows===!0&&(e.$prevArrow=i(e.options.prevArrow).addClass("slick-arrow"),e.$nextArrow=i(e.options.nextArrow).addClass("slick-arrow"),e.slideCount>e.options.slidesToShow?(e.$prevArrow.removeClass("slick-hidden").removeAttr("aria-hidden tabindex"),e.$nextArrow.removeClass("slick-hidden").removeAttr("aria-hidden tabindex"),e.htmlExpr.test(e.options.prevArrow)&&e.$prevArrow.prependTo(e.options.appendArrows),e.htmlExpr.test(e.options.nextArrow)&&e.$nextArrow.appendTo(e.options.appendArrows),e.options.infinite!==!0&&e.$prevArrow.addClass("slick-disabled").attr("aria-disabled","true")):e.$prevArrow.add(e.$nextArrow).addClass("slick-hidden").attr({"aria-disabled":"true",tabindex:"-1"}))},e.prototype.buildDots=function(){var e,t,o=this;if(o.options.dots===!0&&o.slideCount>o.options.slidesToShow){for(o.$slider.addClass("slick-dotted"),t=i("<ul />").addClass(o.options.dotsClass),e=0;e<=o.getDotCount();e+=1)t.append(i("<li />").append(o.options.customPaging.call(this,o,e)));o.$dots=t.appendTo(o.options.appendDots),o.$dots.find("li").first().addClass("slick-active").attr("aria-hidden","false")}},e.prototype.buildOut=function(){var e=this;e.$slides=e.$slider.children(e.options.slide+":not(.slick-cloned)").addClass("slick-slide"),e.slideCount=e.$slides.length,e.$slides.each(function(e,t){i(t).attr("data-slick-index",e).data("originalStyling",i(t).attr("style")||"")}),e.$slider.addClass("slick-slider"),e.$slideTrack=0===e.slideCount?i('<div class="slick-track"/>').appendTo(e.$slider):e.$slides.wrapAll('<div class="slick-track"/>').parent(),e.$list=e.$slideTrack.wrap('<div aria-live="polite" class="slick-list"/>').parent(),e.$slideTrack.css("opacity",0),(e.options.centerMode===!0||e.options.swipeToSlide===!0)&&(e.options.slidesToScroll=1),i("img[data-lazy]",e.$slider).not("[src]").addClass("slick-loading"),e.setupInfinite(),e.buildArrows(),e.buildDots(),e.updateDots(),e.setSlideClasses("number"==typeof e.currentSlide?e.currentSlide:0),e.options.draggable===!0&&e.$list.addClass("draggable")},e.prototype.buildRows=function(){var i,e,t,o,s,n,r,l=this;if(o=document.createDocumentFragment(),n=l.$slider.children(),l.options.rows>1){for(r=l.options.slidesPerRow*l.options.rows,s=Math.ceil(n.length/r),i=0;s>i;i++){var a=document.createElement("div");for(e=0;e<l.options.rows;e++){var d=document.createElement("div");for(t=0;t<l.options.slidesPerRow;t++){var c=i*r+(e*l.options.slidesPerRow+t);n.get(c)&&d.appendChild(n.get(c))}a.appendChild(d)}o.appendChild(a)}l.$slider.empty().append(o),l.$slider.children().children().children().css({width:100/l.options.slidesPerRow+"%",display:"inline-block"})}},e.prototype.checkResponsive=function(e,t){var o,s,n,r=this,l=!1,a=r.$slider.width(),d=window.innerWidth||i(window).width();if("window"===r.respondTo?n=d:"slider"===r.respondTo?n=a:"min"===r.respondTo&&(n=Math.min(d,a)),r.options.responsive&&r.options.responsive.length&&null!==r.options.responsive){s=null;for(o in r.breakpoints)r.breakpoints.hasOwnProperty(o)&&(r.originalSettings.mobileFirst===!1?n<r.breakpoints[o]&&(s=r.breakpoints[o]):n>r.breakpoints[o]&&(s=r.breakpoints[o]));null!==s?null!==r.activeBreakpoint?(s!==r.activeBreakpoint||t)&&(r.activeBreakpoint=s,"unslick"===r.breakpointSettings[s]?r.unslick(s):(r.options=i.extend({},r.originalSettings,r.breakpointSettings[s]),e===!0&&(r.currentSlide=r.options.initialSlide),r.refresh(e)),l=s):(r.activeBreakpoint=s,"unslick"===r.breakpointSettings[s]?r.unslick(s):(r.options=i.extend({},r.originalSettings,r.breakpointSettings[s]),e===!0&&(r.currentSlide=r.options.initialSlide),r.refresh(e)),l=s):null!==r.activeBreakpoint&&(r.activeBreakpoint=null,r.options=r.originalSettings,e===!0&&(r.currentSlide=r.options.initialSlide),r.refresh(e),l=s),e||l===!1||r.$slider.trigger("breakpoint",[r,l])}},e.prototype.changeSlide=function(e,t){var o,s,n,r=this,l=i(e.currentTarget);switch(l.is("a")&&e.preventDefault(),l.is("li")||(l=l.closest("li")),n=r.slideCount%r.options.slidesToScroll!==0,o=n?0:(r.slideCount-r.currentSlide)%r.options.slidesToScroll,e.data.message){case"previous":s=0===o?r.options.slidesToScroll:r.options.slidesToShow-o,r.slideCount>r.options.slidesToShow&&r.slideHandler(r.currentSlide-s,!1,t);break;case"next":s=0===o?r.options.slidesToScroll:o,r.slideCount>r.options.slidesToShow&&r.slideHandler(r.currentSlide+s,!1,t);break;case"index":var a=0===e.data.index?0:e.data.index||l.index()*r.options.slidesToScroll;r.slideHandler(r.checkNavigable(a),!1,t),l.children().trigger("focus");break;default:return}},e.prototype.checkNavigable=function(i){var e,t,o=this;if(e=o.getNavigableIndexes(),t=0,i>e[e.length-1])i=e[e.length-1];else for(var s in e){if(i<e[s]){i=t;break}t=e[s]}return i},e.prototype.cleanUpEvents=function(){var e=this;e.options.dots&&null!==e.$dots&&i("li",e.$dots).off("click.slick",e.changeSlide).off("mouseenter.slick",i.proxy(e.interrupt,e,!0)).off("mouseleave.slick",i.proxy(e.interrupt,e,!1)),e.$slider.off("focus.slick blur.slick"),e.options.arrows===!0&&e.slideCount>e.options.slidesToShow&&(e.$prevArrow&&e.$prevArrow.off("click.slick",e.changeSlide),e.$nextArrow&&e.$nextArrow.off("click.slick",e.changeSlide)),e.$list.off("touchstart.slick mousedown.slick",e.swipeHandler),e.$list.off("touchmove.slick mousemove.slick",e.swipeHandler),e.$list.off("touchend.slick mouseup.slick",e.swipeHandler),e.$list.off("touchcancel.slick mouseleave.
41723slick",e.swipeHandler),e.$list.off("click.slick",e.clickHandler),i(document).off(e.visibilityChange,e.visibility),e.cleanUpSlideEvents(),e.options.accessibility===!0&&e.$list.off("keydown.slick",e.keyHandler),e.options.focusOnSelect===!0&&i(e.$slideTrack).children().off("click.slick",e.selectHandler),i(window).off("orientationchange.slick.slick-"+e.instanceUid,e.orientationChange),i(window).off("resize.slick.slick-"+e.instanceUid,e.resize),i("[draggable!=true]",e.$slideTrack).off("dragstart",e.preventDefault),i(window).off("load.slick.slick-"+e.instanceUid,e.setPosition),i(document).off("ready.slick.slick-"+e.instanceUid,e.setPosition)},e.prototype.cleanUpSlideEvents=function(){var e=this;e.$list.off("mouseenter.slick",i.proxy(e.interrupt,e,!0)),e.$list.off("mouseleave.slick",i.proxy(e.interrupt,e,!1))},e.prototype.cleanUpRows=function(){var i,e=this;e.options.rows>1&&(i=e.$slides.children().children(),i.removeAttr("style"),e.$slider.empty().append(i))},e.prototype.clickHandler=function(i){var e=this;e.shouldClick===!1&&(i.stopImmediatePropagation(),i.stopPropagation(),i.preventDefault())},e.prototype.destroy=function(e){var t=this;t.autoPlayClear(),t.touchObject={},t.cleanUpEvents(),i(".slick-cloned",t.$slider).detach(),t.$dots&&t.$dots.remove(),t.$prevArrow&&t.$prevArrow.length&&(t.$prevArrow.removeClass("slick-disabled slick-arrow slick-hidden").removeAttr("aria-hidden aria-disabled tabindex").css("display",""),t.htmlExpr.test(t.options.prevArrow)&&t.$prevArrow.remove()),t.$nextArrow&&t.$nextArrow.length&&(t.$nextArrow.removeClass("slick-disabled slick-arrow slick-hidden").removeAttr("aria-hidden aria-disabled tabindex").css("display",""),t.htmlExpr.test(t.options.nextArrow)&&t.$nextArrow.remove()),t.$slides&&(t.$slides.removeClass("slick-slide slick-active slick-center slick-visible slick-current").removeAttr("aria-hidden").removeAttr("data-slick-index").each(function(){i(this).attr("style",i(this).data("originalStyling"))}),t.$slideTrack.children(this.options.slide).detach(),t.$slideTrack.detach(),t.$list.detach(),t.$slider.append(t.$slides)),t.cleanUpRows(),t.$slider.removeClass("slick-slider"),t.$slider.removeClass("slick-initialized"),t.$slider.removeClass("slick-dotted"),t.unslicked=!0,e||t.$slider.trigger("destroy",[t])},e.prototype.disableTransition=function(i){var e=this,t={};t[e.transitionType]="",e.options.fade===!1?e.$slideTrack.css(t):e.$slides.eq(i).css(t)},e.prototype.fadeSlide=function(i,e){var t=this;t.cssTransitions===!1?(t.$slides.eq(i).css({zIndex:t.options.zIndex}),t.$slides.eq(i).animate({opacity:1},t.options.speed,t.options.easing,e)):(t.applyTransition(i),t.$slides.eq(i).css({opacity:1,zIndex:t.options.zIndex}),e&&setTimeout(function(){t.disableTransition(i),e.call()},t.options.speed))},e.prototype.fadeSlideOut=function(i){var e=this;e.cssTransitions===!1?e.$slides.eq(i).animate({opacity:0,zIndex:e.options.zIndex-2},e.options.speed,e.options.easing):(e.applyTransition(i),e.$slides.eq(i).css({opacity:0,zIndex:e.options.zIndex-2}))},e.prototype.filterSlides=e.prototype.slickFilter=function(i){var e=this;null!==i&&(e.$slidesCache=e.$slides,e.unload(),e.$slideTrack.children(this.options.slide).detach(),e.$slidesCache.filter(i).appendTo(e.$slideTrack),e.reinit())},e.prototype.focusHandler=function(){var e=this;e.$slider.off("focus.slick blur.slick").on("focus.slick blur.slick","*:not(.slick-arrow)",function(t){t.stopImmediatePropagation();var o=i(this);setTimeout(function(){e.options.pauseOnFocus&&(e.focussed=o.is(":focus"),e.autoPlay())},0)})},e.prototype.getCurrent=e.prototype.slickCurrentSlide=function(){var i=this;return i.currentSlide},e.prototype.getDotCount=function(){var i=this,e=0,t=0,o=0;if(i.options.infinite===!0)for(;e<i.slideCount;)++o,e=t+i.options.slidesToScroll,t+=i.options.slidesToScroll<=i.options.slidesToShow?i.options.slidesToScroll:i.options.slidesToShow;else if(i.options.centerMode===!0)o=i.slideCount;else if(i.options.asNavFor)for(;e<i.slideCount;)++o,e=t+i.options.slidesToScroll,t+=i.options.slidesToScroll<=i.options.slidesToShow?i.options.slidesToScroll:i.options.slidesToShow;else o=1+Math.ceil((i.slideCount-i.options.slidesToShow)/i.options.slidesToScroll);return o-1},e.prototype.getLeft=function(i){var e,t,o,s=this,n=0;return s.slideOffset=0,t=s.$slides.first().outerHeight(!0),s.options.infinite===!0?(s.slideCount>s.options.slidesToShow&&(s.slideOffset=s.slideWidth*s.options.slidesToShow*-1,n=t*s.options.slidesToShow*-1),s.slideCount%s.options.slidesToScroll!==0&&i+s.options.slidesToScroll>s.slideCount&&s.slideCount>s.options.slidesToShow&&(i>s.slideCount?(s.slideOffset=(s.options.slidesToShow-(i-s.slideCount))*s.slideWidth*-1,n=(s.options.slidesToShow-(i-s.slideCount))*t*-1):(s.slideOffset=s.slideCount%s.options.slidesToScroll*s.slideWidth*-1,n=s.slideCount%s.options.slidesToScroll*t*-1))):i+s.options.slidesToShow>s.slideCount&&(s.slideOffset=(i+s.options.slidesToShow-s.slideCount)*s.slideWidth,n=(i+s.options.slidesToShow-s.slideCount)*t),s.slideCount<=s.options.slidesToShow&&(s.slideOffset=0,n=0),s.options.centerMode===!0&&s.options.infinite===!0?s.slideOffset+=s.slideWidth*Math.floor(s.options.slidesToShow/2)-s.slideWidth:s.options.centerMode===!0&&(s.slideOffset=0,s.slideOffset+=s.slideWidth*Math.floor(s.options.slidesToShow/2)),e=s.options.vertical===!1?i*s.slideWidth*-1+s.slideOffset:i*t*-1+n,s.options.variableWidth===!0&&(o=s.slideCount<=s.options.slidesToShow||s.options.infinite===!1?s.$slideTrack.children(".slick-slide").eq(i):s.$slideTrack.children(".slick-slide").eq(i+s.options.slidesToShow),e=s.options.rtl===!0?o[0]?-1*(s.$slideTrack.width()-o[0].offsetLeft-o.width()):0:o[0]?-1*o[0].offsetLeft:0,s.options.centerMode===!0&&(o=s.slideCount<=s.options.slidesToShow||s.options.infinite===!1?s.$slideTrack.children(".slick-slide").eq(i):s.$slideTrack.children(".slick-slide").eq(i+s.options.slidesToShow+1),e=s.options.rtl===!0?o[0]?-1*(s.$slideTrack.width()-o[0].offsetLeft-o.width()):0:o[0]?-1*o[0].offsetLeft:0,e+=(s.$list.width()-o.outerWidth())/2)),e},e.prototype.getOption=e.prototype.slickGetOption=function(i){var e=this;return e.options[i]},e.prototype.getNavigableIndexes=function(){var i,e=this,t=0,o=0,s=[];for(e.options.infinite===!1?i=e.slideCount:(t=-1*e.options.slidesToScroll,o=-1*e.options.slidesToScroll,i=2*e.slideCount);i>t;)s.push(t),t=o+e.options.slidesToScroll,o+=e.options.slidesToScroll<=e.options.slidesToShow?e.options.slidesToScroll:e.options.slidesToShow;return s},e.prototype.getSlick=function(){return this},e.prototype.getSlideCount=function(){var e,t,o,s=this;return o=s.options.centerMode===!0?s.slideWidth*Math.floor(s.options.slidesToShow/2):0,s.options.swipeToSlide===!0?(s.$slideTrack.find(".slick-slide").each(function(e,n){return n.offsetLeft-o+i(n).outerWidth()/2>-1*s.swipeLeft?(t=n,!1):void 0}),e=Math.abs(i(t).attr("data-slick-index")-s.currentSlide)||1):s.options.slidesToScroll},e.prototype.goTo=e.prototype.slickGoTo=function(i,e){var t=this;
41723t.changeSlide({data:{message:"index",index:parseInt(i)}},e)},e.prototype.init=function(e){var t=this;i(t.$slider).hasClass("slick-initialized")||(i(t.$slider).addClass("slick-initialized"),t.buildRows(),t.buildOut(),t.setProps(),t.startLoad(),t.loadSlider(),t.initializeEvents(),t.updateArrows(),t.updateDots(),t.checkResponsive(!0),t.focusHandler()),e&&t.$slider.trigger("init",[t]),t.options.accessibility===!0&&t.initADA(),t.options.autoplay&&(t.paused=!1,t.autoPlay())},e.prototype.initADA=function(){var e=this;null!==e.$slides&&e.$slides.add(e.$slideTrack.find(".slick-cloned")).attr({"aria-hidden":"true",tabindex:"-1"}).find("a, input, button, select").attr({tabindex:"-1"}),null!==e.$slideTrack&&e.$slideTrack.attr("role","listbox"),null!==e.$slides&&e.$slides.not(e.$slideTrack.find(".slick-cloned")).each(function(t){i(this).attr({role:"option","aria-describedby":"slick-slide"+e.instanceUid+t})}),null!==e.$dots&&e.$dots.attr("role","tablist").find("li").each(function(t){i(this).attr({role:"presentation","aria-selected":"false","aria-controls":"navigation"+e.instanceUid+t,id:"slick-slide"+e.instanceUid+t})}).first().attr("aria-selected","true").end().find("button").attr("role","button").end().closest("div").attr("role","toolbar"),e.activateADA()},e.prototype.initArrowEvents=function(){var i=this;i.options.arrows===!0&&i.slideCount>i.options.slidesToShow&&(i.$prevArrow.off("click.slick").on("click.slick",{message:"previous"},i.changeSlide),i.$nextArrow.off("click.slick").on("click.slick",{message:"next"},i.changeSlide))},e.prototype.initDotEvents=function(){var e=this;e.options.dots===!0&&e.slideCount>e.options.slidesToShow&&i("li",e.$dots).on("click.slick",{message:"index"},e.changeSlide),e.options.dots===!0&&e.options.pauseOnDotsHover===!0&&i("li",e.$dots).on("mouseenter.slick",i.proxy(e.interrupt,e,!0)).on("mouseleave.slick",i.proxy(e.interrupt,e,!1))},e.prototype.initSlideEvents=function(){var e=this;e.options.pauseOnHover&&(e.$list.on("mouseenter.slick",i.proxy(e.interrupt,e,!0)),e.$list.on("mouseleave.slick",i.proxy(e.interrupt,e,!1)))},e.prototype.initializeEvents=function(){var e=this;e.initArrowEvents(),e.initDotEvents(),e.initSlideEvents(),e.$list.on("touchstart.slick mousedown.slick",{action:"start"},e.swipeHandler),e.$list.on("touchmove.slick mousemove.slick",{action:"move"},e.swipeHandler),e.$list.on("touchend.slick mouseup.slick",{action:"end"}
vendor: 19,100 bytes, lines 41723-41724
41723,e.swipeHandler),e.$list.on("touchcancel.slick mouseleave.slick",{action:"end"},e.swipeHandler),e.$list.on("click.slick",e.clickHandler),i(document).on(e.visibilityChange,i.proxy(e.visibility,e)),e.options.accessibility===!0&&e.$list.on("keydown.slick",e.keyHandler),e.options.focusOnSelect===!0&&i(e.$slideTrack).children().on("click.slick",e.selectHandler),i(window).on("orientationchange.slick.slick-"+e.instanceUid,i.proxy(e.orientationChange,e)),i(window).on("resize.slick.slick-"+e.instanceUid,i.proxy(e.resize,e)),i("[draggable!=true]",e.$slideTrack).on("dragstart",e.preventDefault),i(window).on("load.slick.slick-"+e.instanceUid,e.setPosition),i(document).on("ready.slick.slick-"+e.instanceUid,e.setPosition)},e.prototype.initUI=function(){var i=this;i.options.arrows===!0&&i.slideCount>i.options.slidesToShow&&(i.$prevArrow.show(),i.$nextArrow.show()),i.options.dots===!0&&i.slideCount>i.options.slidesToShow&&i.$dots.show()},e.prototype.keyHandler=function(i){var e=this;i.target.tagName.match("TEXTAREA|INPUT|SELECT")||(37===i.keyCode&&e.options.accessibility===!0?e.changeSlide({data:{message:e.options.rtl===!0?"next":"previous"}}):39===i.keyCode&&e.options.accessibility===!0&&e.changeSlide({data:{message:e.options.rtl===!0?"previous":"next"}}))},e.prototype.lazyLoad=function(){function e(e){i("img[data-lazy]",e).each(function(){var e=i(this),t=i(this).attr("data-lazy"),o=document.createElement("img");o.onload=function(){e.animate({opacity:0},100,function(){e.attr("src",t).animate({opacity:1},200,function(){e.removeAttr("data-lazy").removeClass("slick-loading")}),r.$slider.trigger("lazyLoaded",[r,e,t])})},o.onerror=function(){e.removeAttr("data-lazy").removeClass("slick-loading").addClass("slick-lazyload-error"),r.$slider.trigger("lazyLoadError",[r,e,t])},o.src=t})}var t,o,s,n,r=this;r.options.centerMode===!0?r.options.infinite===!0?(s=r.currentSlide+(r.options.slidesToShow/2+1),n=s+r.options.slidesToShow+2):(s=Math.max(0,r.currentSlide-(r.options.slidesToShow/2+1)),n=2+(r.options.slidesToShow/2+1)+r.currentSlide):(s=r.options.infinite?r.options.slidesToShow+r.currentSlide:r.currentSlide,n=Math.ceil(s+r.options.slidesToShow),r.options.fade===!0&&(s>0&&s--,n<=r.slideCount&&n++)),t=r.$slider.find(".slick-slide").slice(s,n),e(t),r.slideCount<=r.options.slidesToShow?(o=r.$slider.find(".slick-slide"),e(o)):r.currentSlide>=r.slideCount-r.options.slidesToShow?(o=r.$slider.find(".slick-cloned").slice(0,r.options.slidesToShow),e(o)):0===r.currentSlide&&(o=r.$slider.find(".slick-cloned").slice(-1*r.options.slidesToShow),e(o))},e.prototype.loadSlider=function(){var i=this;i.setPosition(),i.$slideTrack.css({opacity:1}),i.$slider.removeClass("slick-loading"),i.initUI(),"progressive"===i.options.lazyLoad&&i.progressiveLazyLoad()},e.prototype.next=e.prototype.slickNext=function(){var i=this;i.changeSlide({data:{message:"next"}})},e.prototype.orientationChange=function(){var i=this;i.checkResponsive(),i.setPosition()},e.prototype.pause=e.prototype.slickPause=function(){var i=this;i.autoPlayClear(),i.paused=!0},e.prototype.play=e.prototype.slickPlay=function(){var i=this;i.autoPlay(),i.options.autoplay=!0,i.paused=!1,i.focussed=!1,i.interrupted=!1},e.prototype.postSlide=function(i){var e=this;e.unslicked||(e.$slider.trigger("afterChange",[e,i]),e.animating=!1,e.setPosition(),e.swipeLeft=null,e.options.autoplay&&e.autoPlay(),e.options.accessibility===!0&&e.initADA())},e.prototype.prev=e.prototype.slickPrev=function(){var i=this;i.changeSlide({data:{message:"previous"}})},e.prototype.preventDefault=function(i){i.preventDefault()},e.prototype.progressiveLazyLoad=function(e){e=e||1;var t,o,s,n=this,r=i("img[data-lazy]",n.$slider);r.length?(t=r.first(),o=t.attr("data-lazy"),s=document.createElement("img"),s.onload=function(){t.attr("src",o).removeAttr("data-lazy").removeClass("slick-loading"),n.options.adaptiveHeight===!0&&n.setPosition(),n.$slider.trigger("lazyLoaded",[n,t,o]),n.progressiveLazyLoad()},s.onerror=function(){3>e?setTimeout(function(){n.progressiveLazyLoad(e+1)},500):(t.removeAttr("data-lazy").removeClass("slick-loading").addClass("slick-lazyload-error"),n.$slider.trigger("lazyLoadError",[n,t,o]),n.progressiveLazyLoad())},s.src=o):n.$slider.trigger("allImagesLoaded",[n])},e.prototype.refresh=function(e){var t,o,s=this;o=s.slideCount-s.options.slidesToShow,!s.options.infinite&&s.currentSlide>o&&(s.currentSlide=o),s.slideCount<=s.options.slidesToShow&&(s.currentSlide=0),t=s.currentSlide,s.destroy(!0),i.extend(s,s.initials,{currentSlide:t}),s.init(),e||s.changeSlide({data:{message:"index",index:t}},!1)},e.prototype.registerBreakpoints=function(){var e,t,o,s=this,n=s.options.responsive||null;if("array"===i.type(n)&&n.length){s.respondTo=s.options.respondTo||"window";for(e in n)if(o=s.breakpoints.length-1,t=n[e].breakpoint,n.hasOwnProperty(e)){for(;o>=0;)s.breakpoints[o]&&s.breakpoints[o]===t&&s.breakpoints.splice(o,1),o--;s.breakpoints.push(t),s.breakpointSettings[t]=n[e].settings}s.breakpoints.sort(function(i,e){return s.options.mobileFirst?i-e:e-i})}},e.prototype.reinit=function(){var e=this;e.$slides=e.$slideTrack.children(e.options.slide).addClass("slick-slide"),e.slideCount=e.$slides.length,e.currentSlide>=e.slideCount&&0!==e.currentSlide&&(e.currentSlide=e.currentSlide-e.options.slidesToScroll),e.slideCount<=e.options.slidesToShow&&(e.currentSlide=0),e.registerBreakpoints(),e.setProps(),e.setupInfinite(),e.buildArrows(),e.updateArrows(),e.initArrowEvents(),e.buildDots(),e.updateDots(),e.initDotEvents(),e.cleanUpSlideEvents(),e.initSlideEvents(),e.checkResponsive(!1,!0),e.options.focusOnSelect===!0&&i(e.$slideTrack).children().on("click.slick",e.selectHandler),e.setSlideClasses("number"==typeof e.currentSlide?e.currentSlide:0),e.setPosition(),e.focusHandler(),e.paused=!e.options.autoplay,e.autoPlay(),e.$slider.trigger("reInit",[e])},e.prototype.resize=function(){var e=this;i(window).width()!==e.windowWidth&&(clearTimeout(e.windowDelay),e.windowDelay=window.setTimeout(function(){e.windowWidth=i(window).width(),e.checkResponsive(),e.unslicked||e.setPosition()},50))},e.prototype.removeSlide=e.prototype.slickRemove=function(i,e,t){var o=this;return"boolean"==typeof i?(e=i,i=e===!0?0:o.slideCount-1):i=e===!0?--i:i,o.slideCount<1||0>i||i>o.slideCount-1?!1:(o.unload(),t===!0?o.$slideTrack.children().remove():o.$slideTrack.children(this.options.slide).eq(i).remove(),o.$slides=o.$slideTrack.children(this.options.slide),o.$slideTrack.children(this.options.slide).detach(),o.$slideTrack.append(o.$slides),o.$slidesCache=o.$slides,void o.reinit())},e.prototype.setCSS=function(i){var e,t,o=this,s={};o.options.rtl===!0&&(i=-i),e="left"==o.positionProp?Math.ceil(i)+"px":"0px",t="top"==o.positionProp?Math.ceil(i)+"px":"0px",s[o.positionProp]=i,o.transformsEnabled===!1?o.$slideTrack.css(s):(s={},o.cssTransitions===!1?(s[o.animType]="translate("+e+", "+t+")",o.$slideTrack.css(s)):(s[o.animType]="translate3d("+e+", "+t+", 0px)",o.$slideTrack.css(s)))},e.prototype.setDimensions=function(){var i=this;i.options.vertical===!1?i.options.centerMode===!0&&i.$list.css({padding:"0px "+i.options.centerPadding}):(i.$list.height(i.$slides.first().outerHeight(!0)*i.options.slidesToShow),i.options.centerMode===!0&&i.$list.css({padding:i.options.centerPadding+" 0px"})),i.listWidth=i.$list.width(),i.listHeight=i.$list.height(),i.options.vertical===!1&&i.options.variableWidth===!1?(i.slideWidth=Math.ceil(i.listWidth/i.options.slidesToShow),i.$slideTrack.width(Math.ceil(i.slideWidth*i.$slideTrack.children(".slick-slide").length))):i.options.variableWidth===!0?i.$slideTrack.width(5e3*i.slideCount):(i.slideWidth=Math.ceil(i.listWidth),i.$slideTrack.height(Math.ceil(i.$slides.first().outerHeight(!0)*i.$slideTrack.children(".slick-slide").length)));var e=i.$slides.first().outerWidth(!0)-i.$slides.first().width();i.options.variableWidth===!1&&i.$slideTrack.children(".slick-slide").width(i.slideWidth-e)},e.prototype.setFade=function(){var e,t=this;t.$slides.each(function(o,s){e=t.slideWidth*o*-1,t.options.rtl===!0?i(s).css({position:"relative",right:e,top:0,zIndex:t.options.zIndex-2,opacity:0}):i(s).css({position:"relative",left:e,top:0,zIndex:t.options.zIndex-2,opacity:0})}),t.$slides.eq(t.currentSlide).css({zIndex:t.options.zIndex-1,opacity:1})},e.prototype.setHeight=function(){var i=this;if(1===i.options.slidesToShow&&i.options.adaptiveHeight===!0&&i.options.vertical===!1){var e=i.$slides.eq(i.currentSlide).outerHeight(!0);i.$list.css("height",e)}},e.prototype.setOption=e.prototype.slickSetOption=function(){var e,t,o,s,n,r=this,l=!1;if("object"===i.type(arguments[0])?(o=arguments[0],l=arguments[1],n="multiple"):"string"===i.type(arguments[0])&&(o=arguments[0],s=arguments[1],l=arguments[2],"responsive"===arguments[0]&&"array"===i.type(arguments[1])?n="responsive":"undefined"!=typeof arguments[1]&&(n="single")),"single"===n)r.options[o]=s;else if("multiple"===n)i.each(o,function(i,e){r.options[i]=e});else if("responsive"===n)for(t in s)if("array"!==i.type(r.options.responsive))r.options.responsive=[s[t]];else{for(e=r.options.responsive.length-1;e>=0;)r.options.responsive[e].breakpoint===s[t].breakpoint&&r.options.responsive.splice(e,1),e--;r.options.responsive.push(s[t])}l&&(r.unload(),r.reinit())},e.prototype.setPosition=function(){var i=this;i.setDimensions(),i.setHeight(),i.options.fade===!1?i.setCSS(i.getLeft(i.currentSlide)):i.setFade(),i.$slider.trigger("setPosition",[i])},e.prototype.setProps=function(){var i=this,e=document.body.style;i.positionProp=i.options.vertical===!0?"top":"left","top"===i.positionProp?i.$slider.addClass("slick-vertical"):i.$slider.removeClass("slick-vertical"),(void 0!==e.WebkitTransition||void 0!==e.MozTransition||void 0!==e.msTransition)&&i.options.useCSS===!0&&(i.cssTransitions=!0),i.options.fade&&("number"==typeof i.options.zIndex?i.options.zIndex<3&&(i.options.zIndex=3):i.options.zIndex=i.defaults.zIndex),void 0!==e.OTransform&&(i.animType="OTransform",i.transformType="-o-transform",i.transitionType="OTransition",void 0===e.perspectiveProperty&&void 0===e.webkitPerspective&&(i.animType=!1)),void 0!==e.MozTransform&&(i.animType="MozTransform",i.transformType="-moz-transform",i.transitionType="MozTransition",void 0===e.perspectiveProperty&&void 0===e.MozPerspective&&(i.animType=!1)),void 0!==e.webkitTransform&&(i.animType="webkitTransform",i.transformType="-webkit-transform",i.transitionType="webkitTransition",void 0===e.perspectiveProperty&&void 0===e.webkitPerspective&&(i.animType=!1)),void 0!==e.msTransform&&(i.animType="msTransform",i.transformType="-ms-transform",i.transitionType="msTransition",void 0===e.msTransform&&(i.animType=!1)),void 0!==e.transform&&i.animType!==!1&&(i.animType="transform",i.transformType="transform",i.transitionType="transition"),i.transformsEnabled=i.options.useTransform&&null!==i.animType&&i.animType!==!1},e.prototype.setSlideClasses=function(i){var e,t,o,s,n=this;t=n.$slider.find(".slick-slide").removeClass("slick-active slick-center slick-current").attr("aria-hidden","true"),n.$slides.eq(i).addClass("slick-current"),n.options.centerMode===!0?(e=Math.floor(n.options.slidesToShow/2),n.options.infinite===!0&&(i>=e&&i<=n.slideCount-1-e?n.$slides.slice(i-e,i+e+1).addClass("slick-active").attr("aria-hidden","false"):(o=n.options.slidesToShow+i,
41724t.slice(o-e+1,o+e+2).addClass("slick-active").attr("aria-hidden","false")),0===i?t.eq(t.length-1-n.options.slidesToShow).addClass("slick-center"):i===n.slideCount-1&&t.eq(n.options.slidesToShow).addClass("slick-center")),n.$slides.eq(i).addClass("slick-center")):i>=0&&i<=n.slideCount-n.options.slidesToShow?n.$slides.slice(i,i+n.options.slidesToShow).addClass("slick-active").attr("aria-hidden","false"):t.length<=n.options.slidesToShow?t.addClass("slick-active").attr("aria-hidden","false"):(s=n.slideCount%n.options.slidesToShow,o=n.options.infinite===!0?n.options.slidesToShow+i:i,n.options.slidesToShow==n.options.slidesToScroll&&n.slideCount-i<n.options.slidesToShow?t.slice(o-(n.options.slidesToShow-s),o+s).addClass("slick-active").attr("aria-hidden","false"):t.slice(o,o+n.options.slidesToShow).addClass("slick-active").attr("aria-hidden","false")),"ondemand"===n.options.lazyLoad&&n.lazyLoad()},e.prototype.setupInfinite=function(){var e,t,o,s=this;if(s.options.fade===!0&&(s.options.centerMode=!1),s.options.infinite===!0&&s.options.fade===!1&&(t=null,s.slideCount>s.options.slidesToShow)){for(o=s.options.centerMode===!0?s.options.slidesToShow+1:s.options.slidesToShow,e=s.slideCount;e>s.slideCount-o;e-=1)t=e-1,i(s.$slides[t]).clone(!0).attr("id","").attr("data-slick-index",t-s.slideCount).prependTo(s.$slideTrack).addClass("slick-cloned");for(e=0;o>e;e+=1)t=e,i(s.$slides[t]).clone(!0).attr("id","").attr("data-slick-index",t+s.slideCount).appendTo(s.$slideTrack).addClass("slick-cloned");s.$slideTrack.find(".slick-cloned").find("[id]").each(function(){i(this).attr("id","")})}},e.prototype.interrupt=function(i){var e=this;i||e.autoPlay(),e.interrupted=i},e.prototype.selectHandler=function(e){var t=this,o=i(e.target).is(".slick-slide")?i(e.target):i(e.target).parents(".slick-slide"),s=parseInt(o.attr("data-slick-index"));return s||(s=0),t.slideCount<=t.options.slidesToShow?(t.setSlideClasses(s),void t.asNavFor(s)):void t.slideHandler(s)},e.prototype.slideHandler=function(i,e,t){var o,s,n,r,l,a=null,d=this;return e=e||!1,d.animating===!0&&d.options.waitForAnimate===!0||d.options.fade===!0&&d.currentSlide===i||d.slideCount<=d.options.slidesToShow?void 0:(e===!1&&d.asNavFor(i),o=i,a=d.getLeft(o),r=d.getLeft(d.currentSlide),d.currentLeft=null===d.swipeLeft?r:d.swipeLeft,d.options.infinite===!1&&d.options.centerMode===!1&&(0>i||i>d.getDotCount()*d.options.slidesToScroll)?void(d.options.fade===!1&&(o=d.currentSlide,t!==!0?d.animateSlide(r,function(){d.postSlide(o)}):d.postSlide(o))):d.options.infinite===!1&&d.options.centerMode===!0&&(0>i||i>d.slideCount-d.options.slidesToScroll)?void(d.options.fade===!1&&(o=d.currentSlide,t!==!0?d.animateSlide(r,function(){d.postSlide(o)}):d.postSlide(o))):(d.options.autoplay&&clearInterval(d.autoPlayTimer),s=0>o?d.slideCount%d.options.slidesToScroll!==0?d.slideCount-d.slideCount%d.options.slidesToScroll:d.slideCount+o:o>=d.slideCount?d.slideCount%d.options.slidesToScroll!==0?0:o-d.slideCount:o,d.animating=!0,d.$slider.trigger("beforeChange",[d,d.currentSlide,s]),n=d.currentSlide,d.currentSlide=s,d.setSlideClasses(d.currentSlide),d.options.asNavFor&&(l=d.getNavTarget(),l=l.slick("getSlick"),l.slideCount<=l.options.slidesToShow&&l.setSlideClasses(d.currentSlide)),d.updateDots(),d.updateArrows(),d.options.fade===!0?(t!==!0?(d.fadeSlideOut(n),d.fadeSlide(s,function(){d.postSlide(s)})):d.postSlide(s),void d.animateHeight()):void(t!==!0?d.animateSlide(a,function(){d.postSlide(s)}):d.postSlide(s))))},e.prototype.startLoad=function(){var i=this;i.options.arrows===!0&&i.slideCount>i.options.slidesToShow&&(i.$prevArrow.hide(),i.$nextArrow.hide()),i.options.dots===!0&&i.slideCount>i.options.slidesToShow&&i.$dots.hide(),i.$slider.addClass("slick-loading")},e.prototype.swipeDirection=function(){var i,e,t,o,s=this;return i=s.touchObject.startX-s.touchObject.curX,e=s.touchObject.startY-s.touchObject.curY,t=Math.atan2(e,i),o=Math.round(180*t/Math.PI),0>o&&(o=360-Math.abs(o)),45>=o&&o>=0?s.options.rtl===!1?"left":"right":360>=o&&o>=315?s.options.rtl===!1?"left":"right":o>=135&&225>=o?s.options.rtl===!1?"right":"left":s.options.verticalSwiping===!0?o>=35&&135>=o?"down":"up":"vertical"},e.prototype.swipeEnd=function(i){var e,t,o=this;if(o.dragging=!1,o.interrupted=!1,o.shouldClick=o.touchObject.swipeLength>10?!1:!0,void 0===o.touchObject.curX)return!1;if(o.touchObject.edgeHit===!0&&o.$slider.trigger("edge",[o,o.swipeDirection()]),o.touchObject.swipeLength>=o.touchObject.minSwipe){switch(t=o.swipeDirection()){case"left":case"down":e=o.options.swipeToSlide?o.checkNavigable(o.currentSlide+o.getSlideCount()):o.currentSlide+o.getSlideCount(),o.currentDirection=0;break;case"right":case"up":e=o.options.swipeToSlide?o.checkNavigable(o.currentSlide-o.getSlideCount()):o.currentSlide-o.getSlideCount(),o.currentDirection=1}"vertical"!=t&&(o.slideHandler(e),o.touchObject={},o.$slider.trigger("swipe",[o,t]))}else o.touchObject.startX!==o.touchObject.curX&&(o.slideHandler(o.currentSlide),o.touchObject={})},e.prototype.swipeHandler=function(i){var e=this;if(!(e.options.swipe===!1||"ontouchend"in document&&e.options.swipe===!1||e.options.draggable===!1&&-1!==i.type.indexOf("mouse")))switch(e.touchObject.fingerCount=i.originalEvent&&void 0!==i.originalEvent.touches?i.originalEvent.touches.length:1,e.touchObject.minSwipe=e.listWidth/e.options.touchThreshold,e.options.verticalSwiping===!0&&(e.touchObject.minSwipe=e.listHeight/e.options.touchThreshold),i.data.action){case"start":e.swipeStart(i);break;case"move":e.swipeMove(i);break;case"end":e.swipeEnd(i)}},e.prototype.swipeMove=function(i){var e,t,o,s,n,r=this;return n=void 0!==i.originalEvent?i.originalEvent.touches:null,!r.dragging||n&&1!==n.length?!1:(e=r.getLeft(r.currentSlide),r.touchObject.curX=void 0!==n?n[0].pageX:i.clientX,r.touchObject.curY=void 0!==n?n[0].pageY:i.clientY,r.touchObject.swipeLength=Math.round(Math.sqrt(Math.pow(r.touchObject.curX-r.touchObject.startX,2))),r.options.verticalSwiping===!0&&(r.touchObject.swipeLength=Math.round(Math.sqrt(Math.pow(r.touchObject.curY-r.touchObject.startY,2)))),t=r.swipeDirection(),"vertical"!==t?(void 0!==i.originalEvent&&r.touchObject.swipeLength>4&&i.preventDefault(),s=(r.options.rtl===!1?1:-1)*(r.touchObject.curX>r.touchObject.startX?1:-1),r.options.verticalSwiping===!0&&(s=r.touchObject.curY>r.touchObject.startY?1:-1),o=r.touchObject.swipeLength,r.touchObject.edgeHit=!1,r.options.infinite===!1&&(0===r.currentSlide&&"right"===t||r.currentSlide>=r.getDotCount()&&"left"===t)&&(o=r.touchObject.swipeLength*r.options.edgeFriction,r.touchObject.edgeHit=!0),r.options.vertical===!1?r.swipeLeft=e+o*s:r.swipeLeft=e+o*(r.$list.height()/r.listWidth)*s,r.options.verticalSwiping===!0&&(r.swipeLeft=e+o*s),r.options.fade===!0||r.options.touchMove===!1?!1:r.animating===!0?(r.swipeLeft=null,!1):void r.setCSS(r.swipeLeft)):void 0)},e.prototype.swipeStart=function(i){var e,t=this;return t.interrupted=!0,1!==t.touchObject.fingerCount||t.slideCount<=t.options.slidesToShow?(t.touchObject={},!1):(void 0!==i.originalEvent&&void 0!==i.originalEvent.touches&&(e=i.originalEvent.touches[0]),t.touchObject.startX=t.touchObject.curX=void 0!==e?e.pageX:i.clientX,t.touchObject.startY=t.touchObject.curY=void 0!==e?e.pageY:i.clientY,void(t.dragging=!0))},e.prototype.unfilterSlides=e.prototype.slickUnfilter=function(){var i=this;null!==i.$slidesCache&&(i.unload(),i.$slideTrack.children(this.options.slide).detach(),i.$slidesCache.appendTo(i.$slideTrack),i.reinit())},e.prototype.unload=function(){var e=this;i(".slick-cloned",e.$slider).remove(),e.$dots&&e.$dots.remove(),e.$prevArrow&&e.htmlExpr.test(e.options.prevArrow)&&e.$prevArrow.remove(),e.$nextArrow&&e.htmlExpr.test(e.options.nextArrow)&&e.$nextArrow.remove(),e.$slides.removeClass("slick-slide slick-active slick-visible slick-current").attr("aria-hidden","true").css("width","")}
41724,e.prototype.unslick=function(i){var e=this;e.$slider.trigger("unslick",[e,i]),e.destroy()},e.prototype.updateArrows=function(){var i,e=this;i=Math.floor(e.options.slidesToShow/2),e.options.arrows===!0&&e.slideCount>e.options.slidesToShow&&!e.options.infinite&&(e.$prevArrow.removeClass("slick-disabled").attr("aria-disabled","false"),e.$nextArrow.removeClass("slick-disabled").attr("aria-disabled","false"),0===e.currentSlide?(e.$prevArrow.addClass("slick-disabled").attr("aria-disabled","true"),e.$nextArrow.removeClass("slick-disabled").attr("aria-disabled","false")):e.currentSlide>=e.slideCount-e.options.slidesToShow&&e.options.centerMode===!1?(e.$nextArrow.addClass("slick-disabled").attr("aria-disabled","true"),e.$prevArrow.removeClass("slick-disabled").attr("aria-disabled","false")):e.currentSlide>=e.slideCount-1&&e.options.centerMode===!0&&(e.$nextArrow.addClass("slick-disabled").attr("aria-disabled","true"),e.$prevArrow.removeClass("slick-disabled").attr("aria-disabled","false")))},e.prototype.updateDots=function(){var i=this;null!==i.$dots&&(i.$dots.find("li").removeClass("slick-active").attr("aria-hidden","true"),i.$dots.find("li").eq(Math.floor(i.currentSlide/i.options.slidesToScroll)).addClass("slick-active").attr("aria-hidden","false"))},e.prototype.visibility=function(){var i=this;i.options.autoplay&&(document[i.hidden]?i.interrupted=!0:i.interrupted=!1)},i.fn.slick=function(){var i,t,o=this,s=arguments[0],n=Array.prototype.slice.call(arguments,1),r=o.length;for(i=0;r>i;i++)if("object"==typeof s||"undefined"==typeof s?o[i].slick=new e(o[i],s):t=o[i].slick[s].apply(o[i].slick,n),"undefined"!=typeof t)return t;return o}});
41725
41726/* ========================================
41727 FILE: /includes/js/jquery/slick/cs-slick.js
41728 ==================== */
41729
41730if ( typeof js_Config_reenable_plugins_for_pagespeed === 'undefined' && typeof js_CS_Config_lighthouse6_opt !== 'undefined' && js_CS_Config_lighthouse6_opt ) {
41731	jQuery.fn.slick = function() {};
41732}
41733
41734/* ========================================
41735 FILE: /modules/js/mod_shop_search.js
41736 ==================== */
41737
41738var script_manage_params = typeof script_manage_params === 'object' ? script_manage_params : {};
41739var script_manage_params_ssfv = typeof script_manage_params.ssfv !== 'undefined' ? script_manage_params.ssfv : '';
41740var script_manage_params_dst = typeof script_manage_params.dst !== 'undefined' ? script_manage_params.dst : '';
41741var script_manage_params_vlpim3 = typeof script_manage_params.vlpim3 !== 'undefined' ? script_manage_params.vlpim3 : '';
41742var script_manage_params_vlpim3cr = typeof script_manage_params.vlpim3cr !== 'undefined' ? script_manage_params.vlpim3cr : '';
41743var script_manage_params_sm = typeof script_manage_params.sm !== 'undefined' ? script_manage_params.sm : '';
41744var script_manage_params_fau = typeof script_manage_params.fau !== 'undefined' ? script_manage_params.fau : '';
41745var script_manage_params_aacwpi = typeof script_manage_params.aacwpi !== 'undefined' ? script_manage_params.aacwpi : '';
41746var script_manage_params_ls = typeof script_manage_params.ls !== 'undefined' ? script_manage_params.ls : '';
41747var script_manage_params_csq = typeof script_manage_params.csq !== 'undefined' ? script_manage_params.csq : '';
41748
41749window.currentRequest = null;
41750if ( !is_cs_user('separate_js') ) {
41751	jQuery('#shop_search_field').on('focusout', function(event) {
41752
41753		if(event.relatedTarget == null || (event.relatedTarget.id != 'show_more_found_cats' && event.relatedTarget.id != 'show_more_found_comps')) {
41754			setTimeout(function() {
41755				jQuery('.autocompleter_with_cats_and_companies_div').hide();
41756			},250);
41757		}
41758	});
41759}
41760
41761function js_default_search_title(js_action) {
41762	var shop_search_field = document.getElementById('shop_search_field');
41763	var shop_search_field_prop = document.getElementById('keyword_props') || null;
41764	var sendAlsoShopSearchFieldProp = (shop_search_field_prop && shop_search_field_prop.value != '') ? shop_search_field_prop.value + '/' : '';
41765
41766	switch ( js_action ) {
41767		case 'blur':
41768			if ( shop_search_field.value == '' && !isDesignTools() ) {
41769// 				shop_search_field.style.color = script_manage_params_cd;
41770				shop_search_field.value=script_manage_params_ssfv;
41771			}
41772			break;
41773
41774		case 'focus':
41775			if ( shop_search_field.value == script_manage_params_ssfv ) {
41776// 				shop_search_field.style.color = script_manage_params_ct;
41777				if (shop_search_field.value == script_manage_params_dst)
41778					shop_search_field.value = '';
41779			}
41780			break;
41781
41782		case 'submit':
41783
41784			var $searchField = jQuery('#shop_search_field');
41785			ssf_val = $searchField.val();
41786			$searchField.val(ssf_val);
41787			ssf_val = encodeURIComponent(ssf_val);
41788			var default_val = encodeURIComponent($searchField[0].defaultValue);
41789
41790			if ( shop_search_field.value == script_manage_params_dst ) {
41791// 				shop_search_field.style.color = script_manage_params_ct;
41792				jQuery(shop_search_field).trigger('focus');
41793				//shop_search_field.trigger('focus');
41794				return false;
41795			}
41796			if ( isDesignTools() && shop_search_field.value.length == 0 ) {
41797				jQuery(shop_search_field).trigger('focus');
41798				//shop_search_field.trigger('focus');
41799				return false;
41800			}
41801			if (shop_search_field.value.length < (typeof script_manage_params_vlpim3 !== 'undefined' ? script_manage_params_vlpim3 : 3 ) ) {
41802				alert(script_manage_params_vlpim3cr);
41803				return false;
41804			}
41805			if ( (script_manage_params_sm == '1' ? '1' : '0') && shop_search_field.value!='') {
41806				var jqo_form = jQuery(shop_search_field).parents('form:first');
41807				if (jqo_form.find('input[type="hidden"][name="search_tree_category_id"]').length > 0) {
41808					Cookies.set('search_tree_category_id', jqo_form.find('input[type="hidden"][name="search_tree_category_id"]').val(), { path: '/' });
41809				}
41810				// Dušan bol ostraneny replace(/\//g, ' ') na ziadost sakyho
41811				var search = js_vm_search_encodeURIchars(shop_search_field.value.replace(/ {2}/g, ' '));
41812
41813				if (typeof script_manage_params_csq !== 'undefined' && script_manage_params_csq != '') {
41814					document.location.href = script_manage_params_fau + '?' + script_manage_params_csq + '=' + js_vm_search_encodeURIchars(search);
41815				} else {
41816					document.location.href = script_manage_params_fau + js_vm_search_encodeURIchars(search) + '/' + sendAlsoShopSearchFieldProp;
41817				}
41818
41819				return false;
41820			}
41821			return true;
41822	}
41823}
41824
41825if ( typeof script_manage_params_aacwpi !== 'undefined' && script_manage_params_aacwpi != '') {
41826
41827	function js_mod_vm_search_ajax_search_ini() {
41828		let options = {};
41829		if (typeof modularSystem !== 'undefined') {
41830			options = modularSystem.getSetting('modules.search', null, {});
41831		}
41832
41833		if ( typeof script_manage_params_aacwpi.ow !== 'undefined' ) {
41834			options.width = script_manage_params_aacwpi.ow;
41835		}
41836		if ( typeof script_manage_params_aacwpi.om !== 'undefined' ) {
41837			options.max = script_manage_params_aacwpi.om;
41838		}
41839		if ( typeof script_manage_params_aacwpi.olipcc !== 'undefined' ) {
41840			options.listItemPostCreateCallback = script_manage_params_aacwpi.olipcc;
41841		}
41842		if ( typeof script_manage_params_aacwpi.os !== 'undefined' ) {
41843			options.scroll = script_manage_params_aacwpi.os.toLowerCase() === 'true';
41844		}
41845		if ( typeof script_manage_params_aacwpi.ahtrd !== 'undefined' ) {
41846			options.appendHtmlToResultsDiv = script_manage_params_aacwpi.ahtrd;
41847		}
41848		if ( typeof script_manage_params_aacwpi.loff !== 'undefined' ) {
41849			options.leftOffset = script_manage_params_aacwpi.loff;
41850		}
41851		if ( typeof script_manage_params_aacwpi.toff !== 'undefined' ) {
41852			options.topOffset = script_manage_params_aacwpi.toff;
41853		}
41854		if ( typeof script_manage_params_aacwpi.minChars !== 'undefined' ) {
41855			options.minChars = script_manage_params_aacwpi.minChars;
41856		}
41857		if ( typeof script_manage_params_aacwpi.uacl !== 'undefined' ) {
41858			options.acLimit = script_manage_params_aacwpi.uacl;
41859		}
41860		if ( typeof script_manage_params_aacwpi.ofwrd !== 'undefined' ) {
41861			options.onlyFirstWord = script_manage_params_aacwpi.ofwrd;
41862		}
41863
41864		// skripty extrahuj: ld+json vloz do DOM, ostatne vykonaj
41865		options.formatItem = function(row, i, n) {
41866			var value = row[0];
41867
41868			value = value.replace(/<script([^>]*)>([\s\S]*?)<\/script>/gi, function(match, attrs, scriptContent) {
41869				if (attrs.indexOf('application/ld+json') > -1) {
41870					var resultBox = jQuery('.ac_results');
41871					resultBox.find('script[type="application/ld+json"]').remove();
41872					resultBox.append(match);
41873				} else {
41874					try { new Function(scriptContent)(); } catch(e) {}
41875				}
41876				return '';
41877			});
41878
41879			return value.trim() !== '' ? value : false;
41880		};
41881
41882		options.resultsClass = "ac_main ac_results";
41883
41884		var $searchField = jQuery('input#shop_search_field[name="keyword"]');
41885		if ( typeof js_Config_parser_enabled === 'undefined' ) {
41886			$searchField.autocomplete();
41887			if ( is_cs_user('separate_js') ) {
41888				jQuery(document).on('click', function(event) {
41889					jQuery('.ac_results').hide();
41890					jQuery('.autocompleter_with_cats_and_companies_div').hide();
41891				}).on('click', '.ac_results, .moduletable-search, .autocompleter_with_cats_and_companies_div', function(event) {
41892					event.stopPropagation();
41893				});
41894			}
41895		}
41896
41897		if (typeof script_manage_params_aacwpi.cats_and_companies !== 'undefined' ) {
41898			jQuery('input#shop_search_field').on('keyup', function(event) {
41899
41900				if(window.currentRequest !== null &&  window.currentRequest.readyState != 4) {
41901					window.currentRequest.abort();
41902					window.currentRequest = null;
41903				}
41904
41905				if ( !(typeof js_Config_ajax_search_allow_moving_with_arrows !== 'undefined' && js_Config_ajax_search_allow_moving_with_arrows) ) {
41906					var keyCode = event.keyCode;
41907					if (keyCode == '37' || keyCode == '38' || keyCode == '39' || keyCode == '40') { //sipky
41908						return;
41909					}
41910				}
41911
41912				event.preventDefault();
41913
41914				if ( typeof js_Config_ajax_search_allow_moving_with_arrows !== 'undefined' && js_Config_ajax_search_allow_moving_with_arrows ) {
41915					var isArrow = event.keyCode;
41916					if (isArrow == '37' || isArrow == '38' || isArrow == '39' || isArrow == '40') { //sipky
41917						return;
41918					}
41919				}
41920
41921
41922				var elem = jQuery(this);
41923				var acq = jQuery(this).val();
41924
41925
41926				if(acq.length > 2) {
41927					window.currentRequest = jQuery.ajax({
41928						type: 'POST',
41929						data: 'acq=' + acq,
41930						url: '/modules/ajax/mod_shop_search_ajax.php?ajax_call=1&ajax_func=get_autocompleter_with_cats_and_companies',
41931						beforeSend : function(request) {
41932							if(window.currentRequest != null &&  window.currentRequest.readyState != 4) {
41933								window.currentRequest.abort();
41934							} else {
41935								var resdiv = jQuery('div.autocompleter_with_cats_and_companies_div');
41936								if (resdiv.length){
41937									resdiv.html('<div class="ac_loader"><span class="featureprod_ajax_loader"></span></div>').show();
41938								} else {
41939									elem.after('<div class="autocompleter_with_cats_and_companies_div"><div class="ac_loader"><span class="featureprod_ajax_loader"></span></div></div>');
41940									jQuery('div.autocompleter_with_cats_and_companies_div').show();
41941								}
41942							}
41943						}
41944					}).done(function(result) {
41945						var resdiv = jQuery('div.autocompleter_with_cats_and_companies_div');
41946
41947						resdiv.remove();
41948						elem.after(result);
41949						resdiv.hide();
41950						resdiv.show();
41951
41952						jQuery('div.autocompleter_with_cats_and_companies_div').on('click', '.ajaxFinder_products_li a', function() {
41953							var li = jQuery(this).closest('li');
41954							var itemId = li.data('item-id');
41955							var itemName = li.data('item-name');
41956							if (itemId) {
41957								window.dispatchEvent(new CustomEvent('cs:autocomplete:select_item', {detail: {items: [{item_id: itemId, item_name: itemName}]}}));
41958							}
41959						});
41960
41961						if ( typeof(js_after_init_search_autocompleter) !== 'undefined'){ js_after_init_search_autocompleter(); }
41962						if (typeof(js_mod_vm_search_ajax_search_after_ini) !== 'undefined') {
41963							js_mod_vm_search_ajax_search_after_ini();
41964						}
41965					});
41966
41967				} else {
41968					jQuery('div.autocompleter_with_cats_and_companies_div').remove();
41969				}
41970			});
41971		} else {
41972			if ( typeof js_Config_parser_enabled !== 'undefined' && js_Config_parser_enabled ) {
41973				var minLength;
41974
41975				if ( typeof script_manage_params_aacwpi.minChars !== 'undefined' ) {
41976					minLength = script_manage_params_aacwpi.minChars; // TODO: premenovat parametre
41977				}
41978
41979				if ( typeof jQuery.ui === 'undefined' ) { return; }
41980
41981				var auto_class = {};
41982				if ($searchField.is('#shop_search_field')) {
41983					if ( is_cs_user('separate_js') ) {
41984						auto_class = {'ui-autocomplete': 'ac_main'};
41985					} else {
41986						auto_class = {'ui-autocomplete': 'ac_header'};
41987					}
41988				}
41989
41990				let modularOptions = {};
41991				if (typeof modularSystem !== 'undefined') {
41992					modularOptions = modularSystem.getSetting('modules.search', null, {});
41993				}
41994				
41995				var csoptions = jQuery.extend(true, {}, modularOptions);
41996
41997				if (typeof csoptions.minLength === 'undefined') {
41998					csoptions.minLength = typeof options.minChars !== 'undefined' ? options.minChars : 1;
41999				}
42000				if (typeof csoptions.html === 'undefined') {
42001					csoptions.html = true;
42002				}
42003				if (typeof csoptions.classes === 'undefined') {
42004					csoptions.classes = auto_class;
42005				}
42006				csoptions.source = function (request, response) {
42007					var searchTerm = '&acq=' + encodeURIComponent(request.term);
42008					var searchLimit = typeof script_manage_params_aacwpi.uacl !== 'undefined' && script_manage_params_aacwpi != '' ? '&aclimit=' + script_manage_params_aacwpi.uacl : '';
42009					var getParams   = window.location.search.replace('?', '&');
42010					var url         = script_manage_params_ls + '/modules/ajax/mod_shop_search_ajax.php?ajax_call=1&ajax_func=get_autocompleter_with_img_list' + searchTerm + searchLimit + getParams;
42011					jQuery.get(url, function (res) {
42012						var parsedJson = csJsonParse(res);
42013						if (parsedJson === null) {
42014							response([cms_js_iterate_notfound]);
42015							return;
42016						}
42017						if (parsedJson.length > 0 && parsedJson[0]._ac_analytics !== undefined) {
42018							var analyticsHtml = parsedJson[0]._ac_analytics;
42019							parsedJson = parsedJson.slice(1);
42020							if (analyticsHtml) {
42021								var acAnalyticsDiv = document.createElement('div');
42022								acAnalyticsDiv.innerHTML = analyticsHtml;
42023								acAnalyticsDiv.querySelectorAll('script').forEach(function(s) {
42024									var script = document.createElement('script');
42025									script.text = s.textContent || s.innerText || '';
42026									document.head.appendChild(script);
42027									document.head.removeChild(script);
42028								});
42029							}
42030						}
42031						response(parsedJson);
42032						jQuery('.ui-menu-item:odd').addClass('ac_odd');
42033						jQuery('.ui-menu-item:even').addClass('ac_even');
42034						jQuery('.ui-menu-item')
42035							.on('mouseover', function () {
42036								jQuery(this).addClass('ac_over');
42037								jQuery(this).find('.ui-menu-item-wrapper');
42038							})
42039							.on('mouseleave', function () {
42040								jQuery(this).removeClass('ac_over');
42041							});
42042					});
42043				};
42044				csoptions.select = function (event, ui) {
42045					event.preventDefault();
42046					if (ui.item._ac_item_id) {
42047						window.dispatchEvent(new CustomEvent('cs:autocomplete:select_item', {detail: {items: [{item_id: ui.item._ac_item_id, item_name: ui.item._ac_item_name}]}}));
42048					}
42049					if (typeof ui.item.value !== 'undefined' && ui.item.value.indexOf('http') > -1) {
42050						location.href = ui.item.value;
42051					}
42052				};
42053				csoptions.focus = function(event, ui) {
42054					event.preventDefault();
42055
42056					var $focusedElem = jQuery('.ui-state-active').parent();
42057					if ( $focusedElem.length ) {
42058						jQuery('.ui-menu-item').removeClass('ac_over');
42059						$focusedElem.addClass('ac_over');
42060					}
42061				};
42062
42063				$searchField.csautocomplete(csoptions).off('blur');
42064			} else {
42065				$searchField.autocomplete(script_manage_params_ls + '/modules/ajax/mod_shop_search_ajax.php?ajax_call=1&ajax_func=get_autocompleter_with_img_list' + (typeof script_manage_params_aacwpi.uacl !== 'undefined' && script_manage_params_aacwpi != '' ? '&aclimit=' + script_manage_params_aacwpi.uacl : ''), options);
42066			}
42067		}
42068		if (typeof $searchField.result === 'function') {
42069			$searchField.result(function (event, data, formatted) {
42070				if (data && data[1] && data[2]) {
42071					$searchField.val(data[1]);
42072					jQuery('#ac_res_product_name').val(data[1]);
42073					jQuery('#ac_res_product_id').val(data[2]);
42074					// click on product -> go to product detail page
42075					if (formatted.indexOf('acwil_url') > -1) {
42076						var url = jQuery('<div/>').html(formatted).find('.acwil_url').text();
42077						if (!js_is_empty(url)) {
42078							window.location.href = url;
42079							return false;
42080						}
42081					}
42082					$searchField.parents('form:first').trigger('submit');
42083				}
42084			});
42085		}
42086	}
42087	function js_mod_vm_search_ajax_search_ok() {
42088		return jQuery('#ac_res_product_id').val() > '0' && jQuery('#ac_res_product_name').val() == jQuery('input#shop_search_field[name="keyword"]').val();
42089	}
42090	if (typeof js_Config_parser_enabled !== 'undefined' && js_Config_parser_enabled) {
42091		jQuery(window).on('load', function () {
42092			jQuery('input#shop_search_field[name="keyword"]').after('<input name="ac_res_product_id" id="ac_res_product_id" type="hidden" value="" /><input name="ac_res_product_name" id="ac_res_product_name" type="hidden" value="" />');
42093			js_mod_vm_search_ajax_search_ini();
42094		});
42095	} else {
42096		jQuery(function () {
42097			jQuery('input#shop_search_field[name="keyword"]').after('<input name="ac_res_product_id" id="ac_res_product_id" type="hidden" value="" /><input name="ac_res_product_name" id="ac_res_product_name" type="hidden" value="" />');
42098			js_mod_vm_search_ajax_search_ini();
42099		});
42100	}
42101}
42102function js_vm_search_encodeURIchars(text) {
42103	//	funkcia zakoduje text, ktory sa ma pouzit ako parameter v URL
42104	return encodeURIComponent(text).replace('~', '%7E').replace('!', '%21').replace('*', '%2A').replace('(', '%28').replace(')', '%29').replace('\'', '%27');
42105}
42106
42107jQuery(document).on('click','#show_more_found_cats',function() {
42108	var categories = jQuery('div.autocompleter_categories ul');
42109	var manus = jQuery('div.autocompleter_manufacturers');
42110	var categH;
42111
42112	if ( manus.find('li').length ) {
42113		categH = categories.outerHeight() + jQuery(this).outerHeight();
42114	} else {
42115		categH = jQuery('.autocompleter_products').outerHeight() - jQuery('.autocompleter_categories_title').outerHeight(true) - manus.outerHeight(true);
42116	}
42117
42118	categories.find('li.hidden_cats').removeClass('hidden_cats');
42119	categories.removeClass('categories_show_default');
42120	categories.addClass('categories_show_all');
42121
42122	// categories.height( categH );
42123
42124	jQuery('#show_more_found_cats').remove();
42125	jQuery('#shop_search_field').focus();
42126});
42127
42128jQuery(document).on('click','#show_more_found_comps',function() {
42129	var manufacturers = jQuery('div.autocompleter_manufacturers ul');
42130	var categories = jQuery('div.autocompleter_categories');
42131	var manuH;
42132
42133	if ( categories.find('li').length ) {
42134		manuH = manufacturers.outerHeight() + jQuery(this).outerHeight();
42135	} else {
42136		manuH = jQuery('.autocompleter_products').outerHeight() - jQuery('.autocompleter_manufacturers_title').outerHeight(true) - categories.outerHeight(true);
42137	}
42138
42139	manufacturers.find('li.hidden_comps').removeClass('hidden_comps');
42140	manufacturers.removeClass('manufacturers_show_default');
42141	manufacturers.addClass('manufacturers_show_all');
42142
42143	// manufacturers.height( manuH );
42144
42145	jQuery('#show_more_found_comps').remove();
42146	jQuery('#shop_search_field').focus();
42147});
42148
42149
42150/* ========================================
42151 FILE: /modules/js/mod_shop_login.js
42152 ==================== */
42153
42154(function(){
42155	script_manage_params = typeof script_manage_params === 'object' ? script_manage_params : {};
42156	script_manage_params.sh_lg = typeof script_manage_params.sh_lg !== 'undefined' ? script_manage_params.sh_lg : {};
42157
42158	const params = {
42159		'ijs': typeof script_manage_params.sh_lg.ijs !== 'undefined' ? script_manage_params.sh_lg.ijs : '',
42160		'li': typeof script_manage_params.sh_lg.li !== 'undefined' ? script_manage_params.sh_lg.li : '',
42161		'im3chrq': typeof script_manage_params.sh_lg.im3chrq !== 'undefined' ? script_manage_params.sh_lg.im3chrq : '',
42162		'_un': typeof script_manage_params.sh_lg._un !== 'undefined' ? script_manage_params.sh_lg._un : ''
42163	};
42164
42165	if ( params.ijs ) {
42166		var $passwordField = jQuery('form[name="login"] #login_password_field');
42167		var $passwordFieldVirtual = jQuery('form[name="login"] #password_field_virtual');
42168
42169		var pos = $passwordField.position();
42170
42171		if (typeof pos !== 'undefined') {
42172			$passwordFieldVirtual.css({'left': (pos.left) + 'px', 'top': (pos.top) + 'px', 'position': 'absolute' });
42173		}
42174
42175		$passwordField.hide().attr('tabindex', -1);
42176
42177		$passwordFieldVirtual.on('focus', function () {
42178			js_show_password_field();
42179		});
42180
42181		$passwordField.on('change blur', function () {
42182			hidePasswordFieldIfEmpty();
42183		});
42184
42185		window.js_show_password_field = function js_show_password_field() {
42186			$passwordField.show().removeAttr('tabindex').trigger('focus');
42187			$passwordFieldVirtual.hide();
42188		};
42189
42190		window.hidePasswordFieldIfEmpty = function hidePasswordFieldIfEmpty() {
42191			if ($passwordField.val() === '') {
42192				$passwordField.hide().attr('tabindex', -1);
42193				$passwordFieldVirtual.show();
42194			}
42195		}
42196
42197		window.js_default_login = function js_default_login(e, js_action) {
42198			var elem = document.getElementById(e);
42199			// alert(elem.value);
42200
42201			switch ( js_action ) {
42202				case 'blur':
42203					if ( elem.value == '' ) {
42204						elem.style.color = '#777';
42205						elem.value=params._un;
42206					}
42207				break;
42208
42209				case 'focus':
42210					if ( elem.value == params._un ) {
42211						elem.style.color = '#333';
42212						elem.value = '';
42213					}
42214				break;
42215
42216				case 'submit':
42217					if ( elem.value == params._un) {
42218						elem.style.color = '#333';
42219						elem.focus();
42220						return false;
42221					}
42222					if (elem.value.length < 3) {
42223						alert(params.im3chrq);
42224						return false;
42225					}
42226					return true;
42227			}
42228		};
42229	}
42230
42231	window.js_login_form_valid_submit = function js_login_form_valid_submit(form) {
42232		if (typeof window['mod_login_submitting'] !== 'undefined' && window['mod_login_submitting']) {
42233			return false;
42234		}
42235
42236		if (form.username.value == '' || form.passwd.value == '') {
42237			alert(params.li);
42238			return false;
42239		}
42240
42241		window['mod_login_submitting'] = true;
42242		jQuery(form).find('input[type="submit"]').attr('disabled', true);
42243		return true;
42244	};
42245
42246})();
42247
42248
42249/* ========================================
42250 FILE: /modules/js/mod_shop_cart_ajax.js
42251 ==================== */
42252
42253// museli sme takto, aby fungovali shopy, kde nemaju ajax kosik aktivny
42254if ( typeof js_global_ajax_cart_active !== 'undefined' && js_global_ajax_cart_active ) {
42255
42256	if ( typeof js_Config_parser_enabled !== 'undefined' && js_Config_parser_enabled ) {
42257		jQuery(window).on('load', function () {
42258			js_first_init_ajax_cart();
42259		});
42260	} else {
42261		jQuery(function () {
42262			js_first_init_ajax_cart();
42263		});
42264	}
42265
42266	var modalAfterAddToCartSlickSettings = 	{
42267		slide: '.cs_product_item',
42268		autoplay: false,
42269		autoplaySpeed: 4000,
42270		slidesToShow: 3,
42271		slidesToScroll: 3,
42272		infinite: true,
42273		variableWidth: false,
42274		swipeToSlide: true,
42275        responsive: [
42276            {
42277                breakpoint: 800,
42278                settings: { slidesToShow: 2,slidesToScroll: 2, autoplay: false, }
42279            },
42280            {
42281                breakpoint: 400,
42282                settings: { slidesToShow: 1,slidesToScroll: 1, autoplay: false, }
42283            }
42284        ]
42285	};
42286
42287	function js_first_init_ajax_cart(){
42288		js_ajax_cart_init(); // init scroll
42289		js_ajax_cart_container_events_init();
42290		js_cart_link_update(); // cart link
42291		js_add_to_cart_form_ajax_cart_bind(); // bind add to cart buttons
42292		window.cs_ajax_cart_forms_ready = true;
42293		if (window.cs_pending_ajax_cart_form) {
42294			var pendingAjaxCartForm = window.cs_pending_ajax_cart_form;
42295			window.cs_pending_ajax_cart_form = null;
42296			jQuery(pendingAjaxCartForm).trigger('submit');
42297		}
42298		js_refresh_extended_waranty();
42299		// js_refresh_surcharge_products();
42300		js_remove_gift_free_msg(); // zmaze message o darceku z kosika v pripade, ze nie je skladom (ta appka co ho pridava sa instaluje do local.js-iek)
42301	}
42302
42303	function js_ajax_cart_init() {
42304		var box = jQuery('.cart_ajax_container_inner');
42305		// ajax container doesn't exists
42306		if (box.length < 1) {
42307			jQuery('.cart_ajax_container').remove();
42308			jQuery('.module-cart table:first, .module-cart .moduleCartInfo').after('<div class="cart_ajax_container"><div class="cart_ajax_container_inner"></div></div>');
42309			js_ajax_cart_container_events_init({'no_products':1});
42310			js_cart_link_update(); // cart link
42311		}
42312
42313	}
42314
42315	function js_ajax_cart_container_events_init(params) {
42316		if (is_cs_user('profdev')) csstack('js_ajax_cart_container_events_init',[params]);
42317		jQuery('.module-cart:first')
42318			.off('mouseenter mouseleave')
42319			.on('mouseenter', function () {
42320				if (typeof jQuery !== 'function') { return false; }
42321
42322				if (js_ajax_cart_open_disabled()) // frontend.js
42323					return false;
42324
42325				var cart_ajax_container = jQuery(this).find('.cart_ajax_container');
42326				if (cart_ajax_container.find('.product_cont').length > 0 || (typeof(params) != 'undefined' && typeof(params.no_products) != 'undefined'))
42327					cart_ajax_container.stop().slideDown(50, 'easeInExpo', function () {
42328						cart_ajax_container.addClass('is_open');
42329						cart_ajax_container.removeAttr('style').css('display','block'); //fix miznutia kosika
42330					});
42331			})
42332			.on('mouseleave', function () {
42333				if (typeof jQuery !== 'function') { return false; }
42334
42335				var cart_ajax_container = jQuery(this).find('.cart_ajax_container');
42336				cart_ajax_container.stop().slideUp(50, 'easeOutExpo', function () {
42337					cart_ajax_container.removeClass('is_open');
42338					cart_ajax_container.removeAttr('style').hide(); //fix miznutia kosika
42339				});
42340			});
42341	}
42342
42343	function js_remove_gift_free_msg(){
42344		if( typeof js_CS_Config_product_as_gift_empty_stock !== 'undefined' && js_CS_Config_product_as_gift_empty_stock){
42345			jQuery('.cart_ajax_container .gift_free').remove();
42346		}
42347	}
42348
42349	function js_ajax_cart_update(elem, product_id, quantity, params) {
42350		elem = jQuery(elem);
42351		if (js_is_empty(params)) params = {};
42352
42353		if (typeof js_Config_product_store_reservation !== 'undefined' && typeof js_Config_product_store_reservation.extended !== 'undefined' && typeof js_Config_product_store_reservation.active !== 'undefined' && js_Config_product_store_reservation.active === true && params.reservationCanceled !== true) {
42354			let reservationCookie = jQuery.cookie('product_reservation_active');
42355			if (typeof reservationCookie !== 'undefined' && reservationCookie !== null && reservationCookie === '1') {
42356				reservationCancelModal = new CsModal()
42357				.setClassName('product_reservation_disable_modal')
42358				.setType('info')
42359				.setTitle(js_lang_checkout_product_reservation.modalTitle)
42360				.setContent(js_lang_checkout_product_reservation.leavingReservation)
42361				.hideCloseButton(false)
42362				.setButtons("<input type=\"button\" name=\"reservation-disable-confirm\" class=\"button\" title=\"\" value=\"" + js_lang_checkout_product_reservation.confirm + "\"><input type=\"button\" name=\"reservation-disable-cancel\" class=\"button\" title=\"\" onclick=\"reservationCancelModal.close();\" value=\"" + js_lang_checkout_product_reservation.cancel + "\">")
42363				.afterOpen(()=>{
42364					let confirmButton = jQuery('input[name="reservation-disable-confirm"]');
42365					if (confirmButton.length > 0) {
42366						confirmButton.on('click', ()=>{
42367							Cookies.remove('product_reservation_active');
42368							params.reservationCanceled = true;
42369							if (typeof reservationCancelModal !== 'undefined' ) {
42370								reservationCancelModal.close();
42371							}
42372							js_ajax_cart_update(elem, product_id, quantity, params);
42373						});
42374					}
42375				})
42376				.open();
42377				return;
42378			}
42379		}
42380
42381		elem.addClass('js_img_animate_' + product_id);
42382
42383		var action = (elem.hasClass('minus') || elem.hasClass('remove')) ? '-' : '+';
42384		var cart_update = function () {
42385			var ajax_container = elem.parent();
42386
42387			var options = {
42388				'ajax_func'           : 'get_ajax_cart',
42389				'ajax_cart_product_id': product_id,
42390				'ajax_cart_action'    : action,
42391				'ajax_cart_quantity'  : quantity
42392			};
42393
42394			if (typeof params.cart_item_id !== 'undefined') {
42395				options.is_ajax = true;
42396			}
42397
42398			if (typeof(js_cart_form_ajax_selector) != 'undefined' && !js_is_empty(js_cart_form_ajax_selector) && elem.find(js_cart_form_ajax_selector).length) {
42399				ajax_container = elem.find(js_cart_form_ajax_selector);
42400			}
42401
42402			if (!options.is_ajax && typeof ProductPackDetail !== 'undefined') {
42403				var productPackParams = ProductPackDetail.getCartParams();
42404				if (Object.keys(productPackParams).length > 0) {
42405					params.productPackData = JSON.stringify(productPackParams);
42406				}
42407			}
42408
42409			// JAN Product offer: vex s upozornenim o zmazani ponuk
42410			if (action === '-' && typeof params.cart_qty !== 'undefined' && params.cart_qty === 1 && typeof prof === 'object' && elem.hasClass('pof_cart_parent') && !elem.hasClass('pof_del_confirmed')) {
42411				if (!prof.showWarning(elem)) {
42412					if (config('js_Config_product_offer_settings.hide_confirm_modal')) {
42413						window.hideConfirmModal = true;
42414					}
42415
42416					return false;
42417				}
42418			}
42419
42420			// JAN Produkt offer: povinne vybratie ponuk iba pre hlavny button pridat do kosika
42421			if (typeof prof === 'object' && prof.options.mandatoryoffer && !jQuery.isEmptyObject(prof.box) && prof.box.length > 0 && !prof.prepared && elem.attr('name') == 'addtocart' && !prof.set_plugin) {
42422				prof.highlight();
42423				return false;
42424			}
42425
42426			jQuery.each(params, function (i, val) {
42427				options[i] = val;
42428			});
42429
42430			// ulozime si info o tom, ci bolo vybrane aj predlzenie zaruky , po pridani do kosiku uz tuto mzonost odstranime(nemoze si vybrat 2 predlzenai zaruky na jeden produkt)
42431			var extendedWarranty              = jQuery('input[name="extended_warranty_product"]');
42432			extended_warranty_product_checked = extendedWarranty.length && extendedWarranty.is(':checked');
42433
42434			// Sety
42435			var isAjaxCart = elem.hasClass('minus') || elem.hasClass('plus');
42436
42437			// if is ajax cart and not set
42438			if (typeof prof === 'object' && prof.set_plugin && !isAjaxCart) {
42439				options.is_set    = true;
42440				options.selection = JSON.stringify(prof.selection);
42441			}
42442
42443			if (typeof params.set !== 'undefined') {
42444				options.is_set = true;
42445				options.set    = params.set;
42446			}
42447
42448			var parentElem = elem.parents('.shop-category-product, .featured-prod');
42449
42450			if (typeof options.select_value !== 'undefined' && options.select_value == null) {
42451				delete options.select_value;
42452			}
42453
42454			if (typeof options.select_value === 'undefined' && typeof js_global_VM_PRODUCT_ATTRIB_FIRST_OPTION_REQUIRED !== 'undefined' && js_global_VM_PRODUCT_ATTRIB_FIRST_OPTION_REQUIRED == 2 ){
42455				options.is_ajax_cart = true;
42456			}
42457
42458			var ajaxOptions = {async: true};
42459			if (typeof options.dynamic_attribute === 'undefined') {
42460				ajaxOptions = {async: false};
42461			}
42462
42463			options.fromDetail = jQuery('.shop_page_class_shop_product_details').length > 0;
42464
42465			ajax_container.startAjaxLoader();
42466			parentElem.addClass('ajaxProcess');
42467			jQuery.ajaxSetup(ajaxOptions); // adding to card have to be sync ! to avoid problems with fast purchase
42468
42469			jQuery.post('/modules/mod_shop_cart_ajax.php', options, function (ajax_res) {
42470				var cartError = false;
42471				var result;
42472
42473				try {
42474					result = JSON.parse(decodeURIComponent(ajax_res));
42475				} catch (err) {
42476					result = JSON.parse(ajax_res);
42477				}
42478
42479				if ('image_source' in result) {
42480					localStorage.setItem('ajaxCartUpdateVariants', JSON.stringify(result));
42481				} else if ('log_params' in result) {
42482					for (var i = 0; i < result.log_params.length; i++) {
42483						if (typeof result.log_params[i] === 'object' && result.log_params[i].hasOwnProperty('select_value')) {
42484							localStorage.setItem('selectedItemValue', JSON.stringify(result.log_params[i].select_value));
42485						}
42486					}
42487				}
42488
42489				if (typeof result.messages !== 'undefined') {
42490					for (let message of result.messages) {
42491						new CsModal().setTitle(message.title).setContent(message.text).open();
42492					}
42493
42494					skipAnimate = true;
42495				}
42496
42497				if (typeof js_Config_product_details_vex_product_restricted !== 'undefined' && js_Config_product_details_vex_product_restricted ) {
42498					if ( typeof result.restricted_product !== 'undefined' && result.restricted_product.is_product_restricted == '1' && result.restricted_product.contains_restricted == '0' && typeof result.restricted_product.message !== 'undefined' ) {
42499						vex.dialog.alert(result.restricted_product.message);
42500					}
42501				}
42502
42503				if (typeof result.productModifiedQuantities !== 'undefined' && result.productModifiedQuantities !== null && result.productModifiedQuantities.length) {
42504					var before = result.productModifiedQuantities.before;
42505					var after  = (typeof result.productModifiedQuantities.after != 'undefined') ? result.productModifiedQuantities.after : 0;
42506					var unit = result.productModifiedQuantities.unit;
42507
42508					if (parseFloat(before) !== parseFloat(after)) {
42509						var opts  = {};
42510
42511						opts.text = '';
42512
42513						if (typeof js_lang_insufficient_quantity_inform != 'undefined') {
42514							opts.text = js_lang_insufficient_quantity_inform;
42515						}
42516
42517						if (typeof js_lang_insufficient_quantity_inform_max != 'undefined' && after < before) {
42518							opts.text = js_lang_insufficient_quantity_inform_max;
42519						}
42520
42521						if (typeof js_lang_insufficient_quantity_inform_min != 'undefined' && after > before) {
42522							opts.text = js_lang_insufficient_quantity_inform_min;
42523						}
42524
42525						opts.text = opts.text.replace('{from}',before);
42526						opts.text = opts.text.replace('{to}',after);
42527						//2 krát unit v langu.. najrýchlejšie riešenie (aj keď hlúpe)
42528						opts.text = opts.text.replace('{unit}',unit);
42529						opts.text = opts.text.replace('{unit}',unit);
42530
42531						//opts.text = 'Kvôli úprave množstva produktu bolo množstvo zmenené z ' + before + ' na ' + after;
42532						opts.type = 'warning';
42533
42534						if (typeof options === 'object') {
42535							opts = jQuery.extend(true, {}, opts, options);
42536						}
42537
42538						//TODO znazať ostatné (staré Notifikácie)
42539
42540						//jQuery('.ui-pnotify-container').remove();
42541
42542						if ( typeof CsModal !== "undefined" && after < before ) {
42543
42544							if ( typeof skipAnimate === 'undefined' ) {
42545								var skipAnimate = true;
42546							} else {
42547								skipAnimate = true;
42548							}
42549
42550							if ( typeof quantityMessageModal !== 'undefined' ) {
42551								quantityMessageModal.open();
42552							} else {
42553								quantityMessageModal = new CsModal()
42554								.setClassName("modify-quantity")
42555								.setType('info')
42556								.setTitle(js_lang_mess_coupon_import_start_title)
42557								.setContent(js_lang_insufficient_quantity_inform_max_2)
42558								.hideEmptySpace(true)
42559								.setButtons("<input type=\"button\" class=\"button cs_modal_sec_button\" name=\"submit\" title=\"\" onclick=\"quantityMessageModal.close();\" value=\"Ok\">")
42560								.hideCloseButton(true)
42561								.open();
42562							}
42563
42564							if ( typeof ajax_container !== 'undefined' ) {
42565								var productQuantityInput = ajax_container.find('input[name="quantity"]');
42566								if ( productQuantityInput.length === 1 ) {
42567									var productQuantityInputMin = typeof productQuantityInput.data('minimum_quantity') !== 'undefined' ? productQuantityInput.data('minimum_quantity') : 1;
42568									productQuantityInput.val(productQuantityInputMin);
42569								}
42570							}
42571
42572						} else {
42573							PNotify.removeAll();
42574							showNotification(opts.text, '', opts.type,'8000',opts.hide,'','pnotify_modify_quantiity');
42575						}
42576					}
42577				}
42578
42579				js_cart_total = result.cart_order_total; //config_cart_total_js
42580
42581				//mesacny limit na nakup pre vybranych pouzivatelov
42582				if (typeof result.monthlyOrderLimitExceeded !== 'undefined') {
42583					vex.dialog.alert({message: result.monthlyOrderLimitExceeded.message, input: result.monthlyOrderLimitExceeded.input});
42584				}
42585
42586				if (typeof(result) !== 'undefined' && typeof(result.update_res) !== 'undefined') {
42587					if (typeof(result.update_res.error) !== 'undefined') {
42588						cartError = true;
42589
42590						vex.dialog.alert({
42591							message: result.update_res.error,
42592							callback: function() {
42593								var $productPackSection = jQuery('#product_pack_section');
42594
42595								if (typeof result.update_res.highlight_product_pack !== 'undefined' && result.update_res.highlight_product_pack && $productPackSection.length) {
42596									$productPackSection.addClass('choose_variant');
42597
42598									setTimeout(function() {
42599										$productPackSection.removeClass('choose_variant');
42600									}, 3000);
42601								}
42602							}
42603						});
42604					}
42605
42606					if ( jQuery('.shop_page_class_shop_cart').length ) {
42607						if( jQuery(result.update_res).filter('.shop_tip').length > 0 ){
42608							jQuery(result.update_res).insertBefore('#middle_content_inner .shop_cart_ac_add_to_cart_div');
42609
42610							setTimeout(function () {
42611								jQuery('#middle_content_inner .shop_tip').remove();
42612							}, 9000);
42613
42614							return false;
42615						}
42616					}
42617				}
42618
42619				var matrix = (typeof(params.matrix) != 'undefined');
42620
42621				if ( params.attr_selectbox == null && result.method == 'get_variants' && result.html_variants != '' && !matrix ) {
42622					// nove vex okno na vyber variantu produktu
42623
42624					let tmpProductVariantHtml = [];
42625					if (config('js_Config_product_variant') && ['multiSelect', 'select'].includes(config('js_Config_product_variant.mode'))) {
42626						tmpProductVariantHtml = [
42627							'<div class="modal-variant-info">',
42628							`<div class="info_line avail_line"><span class="label">${js_lang_availability}</span><span class="vex_product_availability_value shop_product_availability_value" title=""></span></div>`,
42629							`<div class="info_line price_line"><span class="label">${cms_js_sort_tabs.price}</span><span class="vex_variant_price"></span></div>`,
42630							'</div>'
42631						];
42632					}
42633
42634					vex.open({
42635						content         : [
42636							'<form class="vex-dialog-form">',
42637							'<div class="vex-dialog-message">',
42638							'<span class="login-title">',
42639							result.product_name,
42640							'</span>',
42641							'</div>',
42642							'<div class="vex-dialog-input" style="padding-top: 1.5em;">',
42643							...tmpProductVariantHtml,
42644							'</div>',
42645							'<div class="vex-dialog-buttons">',
42646							'</div>',
42647							'</form>'
42648						].join(''),
42649						contentClassName: 'vex-content pretty_cart',
42650						afterOpen       : function (vexContent) {
42651							jQuery(vexContent).on('click', 'div.vex-close', function () {
42652								vex.close(vexContent.data().vex.id);
42653							});
42654							ajax_container.stopAjaxLoader();
42655							parentElem.removeClass('ajaxProcess');
42656							var vexForm  = vexContent.find('form.vex-dialog-form');
42657							var vexInput = vexForm.find('.vex-dialog-input');
42658							var vexButtons = vexForm.find('.vex-dialog-buttons');
42659
42660							var form_elem = ajax_container.clone();
42661							var parent    = ajax_container.parent();
42662							var product_link;
42663
42664							if (typeof result.surchargeProductsHtml !== 'undefined' && result.surchargeProductsHtml) {
42665								vexInput.prepend(result.surchargeProductsHtml);
42666							}
42667
42668							if ( typeof js_CS_Config_change_input_to_button !== 'undefined' && js_CS_Config_change_input_to_button ) {
42669								jQuery(vexContent).on('click', '.vex_cart_quantity [type="submit"]', function (event) {
42670
42671									if (jQuery('.prod_adv_attrib_select select').val() == '' && typeof js_global_VM_PRODUCT_ATTRIB_FIRST_OPTION_REQUIRED !== 'undefined' && js_global_VM_PRODUCT_ATTRIB_FIRST_OPTION_REQUIRED != '2') {
42672										var newFind = jQuery('.prod_adv_attrib_select select').find("option:selected");
42673										if (typeof newFind[1] === 'undefined' || (typeof newFind[1] !== 'undefined' && newFind[1].value == '')) {
42674											var elem              = jQuery(event.target);
42675											var variant_container = jQuery(elem).parents('.vex-dialog-form:first').find('.prod_adv_attrib_select');
42676											var msg               = '<span class="select_variant_error">' + js_lang_prof_select_main_variant + '</span>';
42677											variant_container.prepend(msg);
42678											return false;
42679										} else {
42680											vex.close(vexContent.data().vex.id);
42681										}
42682									} else {
42683										if ( is_cs_user('separate_js') && ( typeof js_CS_Config_empy_radio_select_variant !== 'undefined' && js_CS_Config_empy_radio_select_variant == '1' ) ) { // jaro
42684											var form_varaints = vexForm.find('.prod_adv_attribs_div').find('.shop_addtocart_advanced_attribute_radio');
42685											if( ( typeof js_global_VM_PRODUCT_ATTRIB_FIRST_OPTION_REQUIRED !== 'undefined' && js_global_VM_PRODUCT_ATTRIB_FIRST_OPTION_REQUIRED == '1') && ( form_varaints.length > 0 ) && (form_varaints.is(':checked') == false ) ){
42686												//console.log(vexForm.find('.prod_adv_attribs_div').find('.shop_addtocart_advanced_attribute_radio'));
42687												var elem              = jQuery(event.target);
42688												var variant_container = jQuery(elem).parents('.vex-dialog-form:first').find('.prod_adv_attribs_div:first');
42689												var msg               = '<span class="radio_variant_error">' + js_lang_prof_select_main_variant + '</span>';
42690												if(vexForm.find('.radio_variant_error').length == 0 ){
42691													jQuery(msg).insertAfter(variant_container).delay(2500).fadeOut('slow', function(){ //insertBefore
42692														jQuery(this).remove();
42693													});
42694													//variant_container.prepend(msg);
42695												}
42696												return false;
42697											} else {
42698												vex.close(vexContent.data().vex.id);
42699											}
42700										} else {
42701											if (typeof product_id !== 'undefined' && typeof js_Config_product_variant !== 'undefined' && js_Config_product_variant && typeof window['ProductVariantInstance_' + product_id] !== 'undefined' && typeof window['ProductVariantInstance_' + product_id].getSelectedAttribute() == 'undefined') {
42702												var msg = '<span class="select_variant_error">' + js_lang_prof_select_main_variant + '</span>';
42703												if (vexForm.find('.select_variant_error').length == 0) {
42704													jQuery(msg).insertAfter(vexForm.find('.vex-dialog-input')).delay(2500).fadeOut('slow', function () { //insertBefore
42705														jQuery(this).remove();
42706													});
42707												}
42708												return false;
42709											}
42710											vex.close(vexContent.data().vex.id);
42711										}
42712									}
42713								});
42714							} else {
42715								jQuery(vexContent).on('click', '.vex_cart_quantity input[name="submit"]', function (event) {
42716
42717									if (jQuery('.prod_adv_attrib_select select').val() == '' && typeof js_global_VM_PRODUCT_ATTRIB_FIRST_OPTION_REQUIRED !== 'undefined' && js_global_VM_PRODUCT_ATTRIB_FIRST_OPTION_REQUIRED != '2') {
42718										var newFind = jQuery('.prod_adv_attrib_select select').find("option:selected");
42719										if (typeof newFind[1] === 'undefined' || (typeof newFind[1] !== 'undefined' && newFind[1].value == '')) {
42720											var elem              = jQuery(event.target);
42721											var variant_container = jQuery(elem).parents('.vex-dialog-form:first').find('.prod_adv_attrib_select');
42722											var msg               = '<span class="select_variant_error">' + js_lang_prof_select_main_variant + '</span>';
42723											variant_container.prepend(msg);
42724											return false;
42725										} else {
42726											vex.close(vexContent.data().vex.id);
42727										}
42728									} else {
42729										if ( is_cs_user('separate_js') && ( typeof js_CS_Config_empy_radio_select_variant !== 'undefined' && js_CS_Config_empy_radio_select_variant == '1' ) ) { // jaro
42730											var form_varaints = vexForm.find('.prod_adv_attribs_div').find('.shop_addtocart_advanced_attribute_radio');
42731											if( ( typeof js_global_VM_PRODUCT_ATTRIB_FIRST_OPTION_REQUIRED !== 'undefined' && js_global_VM_PRODUCT_ATTRIB_FIRST_OPTION_REQUIRED == '1') && ( form_varaints.length > 0 ) && (form_varaints.is(':checked') == false ) ){
42732												//console.log(vexForm.find('.prod_adv_attribs_div').find('.shop_addtocart_advanced_attribute_radio'));
42733												var elem              = jQuery(event.target);
42734												var variant_container = jQuery(elem).parents('.vex-dialog-form:first').find('.prod_adv_attribs_div:first');
42735												var msg               = '<span class="radio_variant_error">' + js_lang_prof_select_main_variant + '</span>';
42736												if(vexForm.find('.radio_variant_error').length == 0 ){
42737													jQuery(msg).insertAfter(variant_container).delay(2500).fadeOut('slow', function(){ //insertBefore
42738														jQuery(this).remove();
42739													});
42740													//variant_container.prepend(msg);
42741												}
42742												return false;
42743											} else {
42744												vex.close(vexContent.data().vex.id);
42745											}
42746										} else {
42747											if (typeof product_id !== 'undefined' && typeof js_Config_product_variant !== 'undefined' && js_Config_product_variant && typeof window['ProductVariantInstance_' + product_id] !== 'undefined' && typeof window['ProductVariantInstance_' + product_id].getSelectedAttribute() == 'undefined') {
42748												var msg = '<span class="select_variant_error">' + js_lang_prof_select_main_variant + '</span>';
42749												if (vexForm.find('.select_variant_error').length == 0) {
42750													jQuery(msg).insertAfter(vexForm.find('.vex-dialog-input')).delay(2500).fadeOut('slow', function () { //insertBefore
42751														jQuery(this).remove();
42752													});
42753												}
42754												return false;
42755											}
42756											vex.close(vexContent.data().vex.id);
42757										}
42758									}
42759								});
42760							}
42761
42762							jQuery(document).on('change', '.prod_adv_attrib_div .prod_adv_attrib_select select', function (event) {
42763								var elem = jQuery(event.target);
42764								if (elem.val() !== '') {
42765									jQuery(elem).parents('.prod_adv_attrib_select').find('.select_variant_error').remove();
42766								}
42767							});
42768
42769							if (!form_elem.is('form')) {
42770								form_elem = form_elem.parents('form:first').length ? form_elem.parents('form:first').clone() : form_elem.find('form:first').clone();
42771							}
42772
42773							jQuery(form_elem).find('.shop_browse_addtocart_quantity_label').remove();
42774							jQuery(form_elem).find('[name="quantity"]').removeAttr('id');
42775							jQuery(form_elem).find('[name="quantity"]').removeAttr('onkeyup');
42776							jQuery(form_elem).find('[name="prod_url"]').remove();
42777							if ( typeof js_CS_Config_change_input_to_button !== 'undefined' && js_CS_Config_change_input_to_button ) {
42778								jQuery(form_elem).find('[type="submit"]').attr('class', 'button');
42779								jQuery(form_elem).find('[type="submit"]').removeAttr('onclick');
42780							} else {
42781								jQuery(form_elem).find('[name="submit"]').attr('class', 'button');
42782								jQuery(form_elem).find('[name="submit"]').removeAttr('onclick');
42783							}
42784
42785							vexForm
42786								.attr('action', form_elem.attr('action'))
42787								.attr('method', form_elem.attr('method'))
42788								.attr('name', form_elem.attr('name'))
42789								.attr('id', form_elem.attr('id'));
42790
42791
42792							let fullLinkSelector = parent.parents('.product_id_'+product_id).find('.full_link').length > 0 ? '.full_link' : '.product_full_link';
42793							if (parent.parents('.product_id_'+product_id).find(fullLinkSelector).length > 0) {
42794								product_link = parent.parents('.product_id_'+product_id).find(fullLinkSelector).prop('href');
42795							}
42796
42797							while (typeof product_link === 'undefined') {
42798								if (parent.find('a'+fullLinkSelector).length > 0) {
42799									product_link = parent.find('a'+fullLinkSelector).prop('href');
42800								} else {
42801									product_link = parent.find('a').prop('href');
42802								}
42803								parent = parent.parent();
42804							}
42805
42806							if (form_elem.find('.prod_adv_attribs_div').length == 0) {
42807								vexInput.prepend(result.html_variants);
42808							}
42809
42810							form_elem.find('input[name="quantity"]').attr('id', 'quantity');
42811							form_elem.find('label[for^="quantity"]').attr('for', 'quantity');
42812							if (!jQuery.inArray(js_global_VM_PRODUCT_ATTRIB_STYLE, ['1', '2'])) {
42813								form_elem.append('<input type="hidden" name="attribute_select_mode" value="1"/>');
42814								if (js_global_VM_PRODUCT_ATTRIB_STYLE == '1') {
42815									jQuery('.pretty_avil').hide();
42816								}
42817							}
42818
42819							if (typeof js_Config_change_product_quantity != 'undefined') {
42820								form_elem.find('input[name="quantity"]').show();
42821							} else {
42822								if (form_elem.find('input[name="quantity"]:visible').length == 0) {
42823									if ( typeof params.vex_quantity !== 'undefined' ) {
42824										vex_quantity = params.vex_quantity;
42825									} else {
42826										if(elem.find('input[name="quantity"]').length > 0 ){
42827											vex_quantity = elem.find('input[name="quantity"]').val();
42828										} else {
42829											vex_quantity = 1;
42830										}
42831									}
42832
42833									form_elem.find('input[name="quantity"]:hidden, label[for="quantitFsubmity"]').remove();
42834									if ( typeof js_CS_Config_change_input_to_button !== 'undefined' && js_CS_Config_change_input_to_button ) {
42835										jQuery([
42836											'<label for="quantity" class="shop_browse_addtocart_quantity_label">',
42837											(typeof js_shop_cart_quantity !== 'undefined' ? js_shop_cart_quantity + ':' : ''),
42838											'</label>',
42839											'<input id="quantity" class="inputbox shop-addtocart-quantity-inputbox" type="text" size="3" name="quantity" value="' + vex_quantity + '" onkeyup="(parseInt(this.value)>0)?this.style.borderColor=\'\' : this.style.borderColor=\'red\';">'
42840										].join('')).insertBefore(jQuery(form_elem.find('[type="submit"]')));
42841									} else {
42842										jQuery([
42843											'<label for="quantity" class="shop_browse_addtocart_quantity_label">',
42844											(typeof js_shop_cart_quantity !== 'undefined' ? js_shop_cart_quantity + ':' : ''),
42845											'</label>',
42846											'<input id="quantity" class="inputbox shop-addtocart-quantity-inputbox" type="text" size="3" name="quantity" value="' + vex_quantity + '" onkeyup="(parseInt(this.value)>0)?this.style.borderColor=\'\' : this.style.borderColor=\'red\';">'
42847										].join('')).insertBefore(jQuery(form_elem.find('input[name="submit"]')));
42848									}
42849
42850								}
42851							}
42852							if ( typeof js_CS_Config_change_input_to_button !== 'undefined' && js_CS_Config_change_input_to_button ) {
42853								var submitBtn = form_elem.find('[type="submit"].categ_add_to_cart');
42854							} else {
42855								var submitBtn = form_elem.find('input[type="submit"].categ_add_to_cart');
42856							}
42857
42858							if (submitBtn.length) {
42859								submitBtn.removeAttr('onclick');
42860								vexButtons.append(submitBtn.clone().addClass('vex-dialog-button-primary vex-dialog-button vex-first'));
42861								submitBtn.remove();
42862							}
42863
42864							if (typeof product_link === 'undefined' || product_link == 0 || product_link == 'javascript:void(0)') {
42865								if (elem.data('product-link')) {
42866									product_link = elem.data('product-link');
42867								}
42868							}
42869
42870							// link na produkt z virtualnych variantov
42871							if (typeof product_link === 'undefined' || product_link == 0 || product_link == 'javascript:void(0)') {
42872								var productLinkHref = elem.closest('tr.vv_tr').find('a.vv_box_image').attr('href');
42873								if (typeof productLinkHref !== 'undefined' && productLinkHref !== '') {
42874									product_link = productLinkHref;
42875								}
42876							}
42877
42878							// fallback na url zo servera (napr. ak produkt nie je v DOM - quick view, autocomplete)
42879							if (!product_link && result.product_url) {
42880								product_link = result.product_url;
42881							}
42882
42883							if (typeof js_CS_Config_change_input_to_button !== 'undefined' && js_CS_Config_change_input_to_button ) {
42884								vexButtons.append('<button onclick="window.location=\'' + product_link + '\';" type="button" class="vex-dialog-button-secondary vex-dialog-button vex-last button">' + (typeof js_shop_flypage_lbl !== 'undefined' ? js_shop_flypage_lbl : '') + '</button>');
42885							} else {
42886								vexButtons.append('<input onclick="window.location=\'' + product_link + '\';" type="button" class="vex-dialog-button-secondary vex-dialog-button vex-last button" value="' + (typeof js_shop_flypage_lbl !== 'undefined' ? js_shop_flypage_lbl : '') + '">');
42887							}
42888
42889
42890							//vexInput.append(form_elem.html());
42891							vexButtons.prepend('<div class="vex_cart_quantity"></div>');
42892							vexButtons.find('.vex_cart_quantity').prepend(form_elem.html());
42893
42894
42895							// init availability text
42896							var availText = jQuery('.vex-content select');
42897							if (availText.length) {
42898								form_elem.prepend('<div class="pretty_avil">' + result.html_avail + '</div>');
42899								availText.trigger('change');
42900							}
42901
42902							js_add_to_cart_form_ajax_cart_bind();
42903
42904							vexForm.find('.shop_addtocart_advanced_attribute_radio:checked').addClass('active');
42905							vexForm.on('click', '[class^="shop_addtocart_advanced_attribute_row_"]', function (event) {
42906								jQuery(this).siblings().removeClass('active').find('.shop_addtocart_advanced_attribute_radio').prop('checked', false);
42907								jQuery(this).addClass('active').find('.shop_addtocart_advanced_attribute_radio').prop('checked', true);
42908							});
42909
42910							vexContent.on('click', '.categ_add_to_cart', function (event) {
42911								var selectElem = vexContent.find('select.main_attr_select');
42912								var firstVal   = selectElem.find('option').filter(function () {
42913									return jQuery(this).val() !== '';
42914								}).first().val();
42915
42916								if (selectElem.val() === '') {
42917									if (typeof firstVal !== 'undefined') {
42918										selectElem.css('border', 'red solid 1px');
42919										return false;
42920										//selectElem.val(firstVal);
42921										//vex.close(vexContent.data().vex.id);
42922									} else {
42923										event.preventDefault();
42924									}
42925								} else {
42926									vex.close(vexContent.data().vex.id); // TODO: px zmazat ak zistim co skutocne zatvara
42927								}
42928							});
42929
42930							if (typeof js_variants_browse_table_js_init == 'function') {
42931								js_variants_browse_table_js_init();
42932							}
42933
42934						},
42935						afterClose      : function () {
42936							if (typeof window['ProductVariantInstance_' + product_id] !== 'undefined') {
42937								//delete window['ProductVariantInstance_' + product_id];
42938
42939								if( !(delete window['ProductVariantInstance_' + product_id]) ){// nebolo mozne zmazat premennu s pomocou 'delete'
42940									window['ProductVariantInstance_' + product_id] = undefined;
42941								}
42942							}
42943
42944							js_add_to_cart_form_ajax_cart_bind();
42945						}
42946					});
42947
42948					return false;
42949				}
42950
42951				// Skontroluj spravy a aktivuj messengera
42952				if (typeof messenger !== 'undefined') {
42953					messenger.check(result.update_res);
42954				}
42955
42956				if ( jQuery('.shop_cart_ac_add_to_cart_div').length ){
42957					js_reload_current_page();
42958					return false;
42959				}
42960
42961				let is_dynamic_attribute = false;
42962				let reloadCurrentPageAfterTimeout = (jQuery('.shop_page_class_shop_cart').length || (typeof(reloadAfterAddToCart) !== 'undefined' && reloadAfterAddToCart == 1));
42963				if (reloadCurrentPageAfterTimeout) {	// ak som v nakupnom kosiku, vykonam reload
42964					setTimeout(function () {
42965						js_reload_current_page();
42966						return false;
42967					}, 900);
42968				}
42969
42970				if ( !( (typeof(options.is_gift) != 'undefined' && options.is_gift === true) || (typeof(options.is_special_offer) != 'undefined' && options.is_special_offer === true) ) && !( typeof cart_animate_false !== 'undefined' && cart_animate_false ) ) {
42971					js_ajax_cart_container_init(result);
42972				}
42973
42974				js_refresh_extended_waranty();
42975				js_refresh_surcharge_products();
42976
42977				if(typeof js_Config_product_detail_free_shipping_info !== 'undefined' && js_Config_product_detail_free_shipping_info && jQuery('body').hasClass('shop_page_class_shop_product_details') && typeof js_flypage_free_shipping_update_info == 'function'){
42978					js_flypage_free_shipping_update_info();
42979				}
42980
42981				// zmena dostupnosti na buducu dostupnost
42982				if (typeof result === 'object' && typeof result.futureAvailability === 'object') {
42983					js_refresh_product_availability_by_future_availability(result.futureAvailability);
42984				}
42985
42986				parentElem.removeClass('ajaxProcess');
42987				ajax_container.stopAjaxLoader();
42988
42989				if (config('js_Config_reset_quantity_after_add_to_cart')) {
42990					ajax_container.find('.quantity_wrapper input[name="quantity"]').val('1').trigger('change');
42991				}
42992
42993				// JAN dynamicke atributy
42994				if (elem.find('.daf_wrap').length && typeof dattr == 'object' && typeof dattr.afterCart == 'function') {
42995					is_dynamic_attribute = true;
42996					dattr.afterCart();
42997				}
42998
42999				// JAN Produkt offer: Pridanie ponuk do kosika po ajax requeste!!!
43000				// sety maju defaultne vypnute pridavanie cez offer ajax
43001				if (typeof prof == 'object' && !jQuery.isEmptyObject(prof.box) && prof.box.length > 0 && prof.prepared && !prof.set_plugin) {
43002					prof.add(result);
43003				}
43004
43005				// JAN dary pre detsky domov
43006				var custom_gifts = elem.hasClass('customGiftInput');
43007
43008				js_add_to_cart_form_ajax_cart_bind();	// bind add to cart buttons
43009
43010				var success_added = jQuery('<div>' + result.update_res + '</div>').find('.shop_tip').length == 0;
43011
43012				//ecomail trackovanie obsahu kosika (len pre non cs)
43013				if (!is_cs_user() && typeof js_Config_ecomail_track_cart_content !== 'undefined') {
43014					//ziskame naformatovany obsah kosika
43015					new AjaxRequest()
43016						.setController('Cart')
43017						.setAction('getCartContentForEcomail')
43018						.onSuccess(function (result) {
43019							//odosleme obsah kosika
43020							if (typeof window.ecotrack !== 'undefined') {
43021								window.ecotrack('trackUnstructEvent', {
43022									schema: '',
43023									data  : {
43024										action  : 'Basket',
43025										products: result.data
43026									}
43027								});
43028							}
43029							//console.log(result.data);
43030						})
43031						.send();
43032				}
43033
43034				if (typeof freeShippingInfoData !== 'undefined' && typeof result.totalCartWeight !== 'undefined') {
43035					var totalCartWeight = result.totalCartWeight;
43036					var selectedVariant = jQuery('.prod_adv_attrib_div .selected_attr');
43037
43038					freeShippingInfoData.totalWeight = totalCartWeight;
43039					freeShippingInfoData.canShowInfo = freeShippingInfoData.maxFreeShippingWeight > (totalCartWeight + freeShippingInfoData.currentProductWeight);
43040
43041					if (selectedVariant.length) {
43042						selectedVariant.trigger('click');
43043					}
43044				}
43045
43046				if (typeof (js_ajax_cart_update_after_init) != 'undefined') {
43047					js_ajax_cart_update_after_init({
43048						'product_id': product_id,
43049						'quantity'  : quantity,
43050						'attribute' : params.select_value
43051					});
43052				}
43053
43054				var redirectFunc = function() {
43055					if (typeof(result.redirect) != 'undefined' && result.redirect !== '') {
43056						location.href = js_global_live_site + result.redirect;
43057					}
43058				};
43059
43060
43061				var apiRequestRun = false;
43062
43063				if (success_added && !cartError) {
43064					if (result.method !== 'remove' && !(custom_gifts
43065						|| (
43066							(typeof (options.is_gift) != 'undefined' && options.is_gift === true)
43067							||
43068							(typeof (options.is_special_offer) != 'undefined' && options.is_special_offer === true)
43069						))
43070					) {
43071						if (elem.attr('data-skip-animate')) {
43072							skipAnimate = true;
43073						}
43074
43075						if ( typeof skipAnimate === 'undefined' || ( typeof skipAnimate !== 'undefined' && skipAnimate == false ) ) {
43076							if (typeof js_cart_image_animate_custom == 'function') {
43077								js_cart_image_animate_custom(ajax_container);
43078							} else {
43079								if (ajax_container.hasClass('vex-content')) {
43080									js_cart_image_animate(jQuery('.js_img_animate_' + product_id).not('.vex-dialog-form'));
43081								} else {
43082									js_cart_image_animate(ajax_container);
43083								}
43084
43085								jQuery('.js_img_animate_' + product_id).removeClass('js_img_animate_' + product_id);
43086							}
43087						}
43088					}
43089
43090					if (typeof isApiActive !== 'undefined' && isApiActive) {
43091						var apiAction = action === '+' ? 'addToCart' : 'removeFromCart';
43092						var pageMatch = js_server_request_uri.match(/(&|;|\?)page\=([^&]+)/);
43093						var manMatch  = js_server_request_uri.match(/(&|;|\?)pc_manufacturer_id\=([^&]+)/);
43094						var page      = '';
43095
43096						if (typeof manMatch === 'object' && manMatch !== null) {
43097							page = 'manufacturer';
43098						} else if (typeof pageMatch === 'object' && pageMatch !== null && typeof pageMatch[2] !== 'undefined') {
43099							page = pageMatch[2];
43100						}
43101
43102						apiRequest(apiAction, {
43103							'products': [{
43104								'product_id' : product_id,
43105								'quantity'   : quantity,
43106								'description': params.select_value,
43107								'idx'        : params.cart_item_id
43108							}],
43109							'page'    : page,
43110							'isAjax'  : true
43111						}, redirectFunc);
43112
43113						apiRequestRun = true;
43114					}
43115				}
43116
43117				// close prettyphoto with variants
43118				js_prettyphoto_close();
43119
43120				if (!reloadCurrentPageAfterTimeout && !is_dynamic_attribute && typeof params !== 'undefined' && typeof params.cart_item_id === 'undefined' && typeof js_Config_modal_after_add_to_cart !== 'undefined' && js_Config_modal_after_add_to_cart && typeof result.update_res !== 'undefined' && typeof result.update_res.success !== 'undefined' && result.update_res.success == 1 && typeof result.update_res.method !== 'undefined' && ['add', 'update'].indexOf(result.update_res.method) >= 0) {
43121
43122					if (typeof result.update_res.itemId !== 'undefined') {
43123						params.itemId = result.update_res.itemId;
43124					}
43125
43126					showLoader();
43127					new AjaxRequest({productId: product_id, params: params})
43128						.setController('Cart')
43129						.setAction('getModalAfterAddToCart')
43130						.onSuccess(function (result) {
43131							hideLoader();
43132							if (typeof result !== 'undefined' && typeof result.data !== 'undefined' && typeof result.data.html !== 'undefined') {
43133								if (typeof window.ModalAfterAddToCart === 'undefined') {
43134									window.ModalAfterAddToCart = new CsModal()
43135										.setClassName('modal_after_add_to_cart_vex fresh')
43136										.setType('info')
43137										.setTitle(typeof js_lang_modal_after_add_to_cart_vex_title !== 'undefined' ? js_lang_modal_after_add_to_cart_vex_title : 'And it\'s in the basket!')
43138										.setContent(result.data.html)
43139										.setButtons('')
43140										.afterOpen(function(vexContent) {
43141											jQuery('body').addClass('modal_after_add_to_cart_open');
43142											vexContent.find('.related_products_div').slick(modalAfterAddToCartSlickSettings);
43143										})
43144										.afterSetContent(function (vexContent) {
43145											vexContent.find('.related_products_div').slick(modalAfterAddToCartSlickSettings);
43146										})
43147										.afterClose(function() { // nastavi callback, ktory sa vykona po uzavreti modalu
43148											window.ModalAfterAddToCart = undefined;
43149											jQuery('body').removeClass('modal_after_add_to_cart_open');
43150										})
43151										.open();
43152								}
43153
43154								// bind eventu na reload // TODO neako refactorovat ?
43155								jQuery('body').on('addToCartFinished', function(event, triggeredData) {
43156									window.ModalAfterAddToCart.setClassName('loading');
43157									window.ModalAfterAddToCart.removeClass('fresh');
43158									new AjaxRequest({productId: triggeredData.productId, params: {select_value: triggeredData.attribute, itemId: triggeredData.itemId}})
43159										.setController('Cart')
43160										.setAction('getModalAfterAddToCart')
43161										.onSuccess(function (result) {
43162											window.ModalAfterAddToCart.removeClass('loading');
43163											if (typeof result !== 'undefined' && typeof result.data !== 'undefined' && typeof result.data.html !== 'undefined') {
43164												window.ModalAfterAddToCart.setContent(result.data.html);
43165											}
43166										})
43167										.send();
43168								});
43169							}
43170						})
43171						.onError(function () {
43172							hideLoader();
43173						})
43174						.send();
43175				}
43176
43177				jQuery('body').trigger('cartUpdated');
43178
43179				// Redirect
43180				if (!apiRequestRun) {
43181					redirectFunc();
43182				}
43183			});
43184
43185			jQuery.ajaxSetup({async: true});
43186		};
43187
43188		if (typeof window.hideConfirmModal !== 'undefined' && window.hideConfirmModal) {
43189			cart_update(elem, product_id, quantity, params, action);
43190			
43191			delete window.hideConfirmModal;
43192
43193			return false;
43194		}
43195
43196		// do anonymnej funkcie dat potom v if sa spytat na vex confirm a potom zavolat anonymnu funkciu, dodefinovat este potom elem ako parameter anonymnej funkcie
43197		if ((elem.hasClass('minus') && params.cart_qty == quantity) || elem.hasClass('remove')) {
43198			vex.dialog.confirm({
43199				message  : js_lang_shopping_cart_delete_item_confirm,
43200				focusFirstInput: !config('js_Config_disable_focus_on_dialog'),
43201				callback : function (value) {
43202					if (value) {
43203						cart_update(elem, product_id, quantity, params, action);
43204					} else {
43205						var cart_ajax_container = jQuery(document).find('.cart_ajax_container');
43206						if (cart_ajax_container.find('.product_cont').length > 0 || (typeof (params) != 'undefined' && typeof (params.no_products) != 'undefined')) {
43207							cart_ajax_container.stop().slideDown(50, 'easeInExpo', function () {
43208								cart_ajax_container.addClass('is_open');
43209								cart_ajax_container.removeAttr('style').css('display', 'block'); //fix miznutia kosika
43210							});
43211						}
43212					}
43213				},
43214				afterOpen: function () {
43215					if (!config('js_Config_disable_focus_on_dialog')) {
43216						setTimeout(function(){
43217							jQuery(document).find('.vex-dialog-buttons .vex-dialog-button-primary').trigger('focus');
43218						}, 100);
43219					}
43220				}
43221			});
43222		} else {
43223			if (typeof js_CS_Config_check_if_product_in_cart !== 'undefined' && js_CS_Config_check_if_product_in_cart && elem.hasClass('has_variant') == false && elem.hasClass('minus') == false) {
43224				js_check_if_product_in_cart(product_id, params).then((response) => {
43225					if (response.data.message.isInCart) {
43226						let cofirmModal = new CsModal()
43227								.setClassName('product_in_cart_already')
43228								.setType('info')
43229								.setContent(response.data.message.confirm)
43230								.setButtons("<button type='button' class='confirm_button_is_in_cart'>"+ cms_js_lang_yes.toUpperCase() +"</button><button type='button' class='close_button'>"+ cms_js_lang_no.toUpperCase() +"</button>")
43231								.afterOpen(function () {
43232									jQuery('.confirm_button_is_in_cart').on('click', function () {
43233										cofirmModal.close();
43234										cart_update();
43235									});
43236								})
43237								.open();
43238					} else {
43239						cart_update();
43240					}
43241				});
43242			} else if (config('js_Config_exchange_product_in_cart') && elem.hasClass('minus') == false) {
43243				getProductToChange(product_id, params).then((response) => {
43244					let productForExchange = response.data.productForExchange;
43245					if (productForExchange && productForExchange.product_snapshot) {
43246						let productForExchangeModal = new CsModal()
43247							.setClassName('product_exchange_modal')
43248							.setType('info')
43249							.setTitle(productForExchange.title)
43250							.setContent(productForExchange.product_snapshot)
43251							.setButtons(productForExchange.buttons)
43252							.afterOpen(function () {
43253								jQuery('.product_exchange_modal button').on('click', function () {
43254									productForExchangeModal.close();
43255									if (jQuery(this).hasClass('close_button_product_exchange')) {
43256										cart_update();
43257									}
43258								});
43259							})
43260							.open();
43261					} else {
43262						cart_update();
43263					}
43264				});
43265			} else {
43266				cart_update();
43267			}
43268		}
43269
43270		return false;
43271	}
43272
43273	function js_init_fixed_ajax_cart() {
43274		var window_scroll_top = 0;
43275		if (navigator.userAgent.indexOf('MSIE') > -1) {
43276			window_scroll_top = parseInt(document.documentElement.scrollTop);
43277		} else {
43278			window_scroll_top = parseInt(window.pageYOffset);
43279		}
43280		if (typeof js_cart_css_obj === 'undefined') {
43281			return;
43282		}
43283		var js_cart_css_obj_top = js_cart_css_obj.top == 'auto' ? 0 : js_cart_css_obj.top;
43284		if (window_scroll_top > 0 && window_scroll_top > (js_cart_css_obj_top + 40)) {
43285			if (js_cart_css_scroll_obj.left == 'auto') {
43286				js_cart_css_scroll_obj.left = jQuery('.module-cart:first').offset().left; // fix palo 16.9. - v responzivite vyhadzovalo js chybu
43287				// js_cart_css_scroll_obj.left = jQuery('#topmenu .module-cart').offset().left;
43288			}
43289			jQuery('#topmenu .module-cart').addClass('scroll').css(js_cart_css_scroll_obj);
43290			jQuery(window)
43291				.on("scroll", function () {
43292					//#5795
43293					if (!jQuery('#topmenu .module-cart').hasClass('scroll')) {
43294						return;
43295					}
43296					jQuery('#topmenu .cart_ajax_container').slideUp(200, function () {
43297						jQuery('#topmenu .module-cart').removeClass('scroll').css(js_cart_css_obj);
43298					});
43299				});
43300		} else {
43301			jQuery('#topmenu .module-cart').removeClass('scroll').css(js_cart_css_obj);
43302		}
43303	}
43304	function js_add_to_cart_form_ajax_cart_bind() {
43305		jQuery('div.mp_discount_product_vals form, .wishlist_item_btns form, .product-cart form, .flypage-kosik form, .akcia-buttons form, .acc_item form, .compare_c
43305art form, .pretty_cart form, .custom_gifts form, .vig-addtocart form, .related_product_item_cart form').each(function (e) {
43306			var $form = jQuery(this);
43307			// SAKY MATRIX
43308			if (jQuery('.matrixQuantity').length > 0) {
43309				jQuery('.matrixControlQ .but')
43310					.off('click')
43311					.on('click', function () {
43312						var input             = jQuery(this).parents('td').find('.matrixQuantity');
43313						var matrixMaxQuantity = jQuery(this).closest('td').find('.matrixMaxQuantity').text();
43314						var inputVal          = input.val();
43315						if (jQuery(this).hasClass('plus')) {
43316							//ak je zapnuta kontrola skladu tak nedovol dat do kosika viac variantov ako je skladom
43317							if (parseInt(matrixMaxQuantity) > 0 && parseInt(matrixMaxQuantity) - 1 == parseInt(inputVal)) {
43318								//zmen farbu pluska (indikator, ze uz nie je mozne kupit viac kusov)
43319								input.val(parseInt(inputVal) + 1);
43320								jQuery(this).addClass('disabled-plus');
43321							} else if (parseInt(matrixMaxQuantity) > 0 && parseInt(matrixMaxQuantity) == parseInt(inputVal)) {
43322								//nepridavaj uz dalsie varianty
43323							} else {
43324								input.val(parseInt(inputVal) + 1);
43325							}
43326						} else {
43327							jQuery(this).closest('.matrixControlQ').find('.plus').removeClass('disabled-plus');
43328							if(inputVal > 0) input.val(inputVal - 1);
43329						}
43330					});
43331			}
43332
43333			if (is_cs_user()){
43334				$form.find('.categ_add_to_cart_not_on_stock')
43335					.off('click.ajaxcart')
43336					.on('click.ajaxcart', function (e) {
43337						if( e.preventDefault )
43338							e.preventDefault();
43339						jQuery(this).parents('form').trigger('submit');
43340					});
43341			} else {
43342				$form.find('.categ_add_to_cart_not_on_stock')
43343					.off('click')
43344					.on('click', function (e) {
43345						if( e.preventDefault )
43346							e.preventDefault();
43347						jQuery(this).parents('form').trigger('submit');
43348					});
43349			}
43350
43351			if (jQuery('.pp_pic_holder').length) {
43352				return;
43353			}
43354
43355			$form.off('submit').on('submit', function (e) {
43356
43357				// v detaile produktu ak nie je zvoleny variant, vykona sa klasicky submit, aby sa predislo vyskakovaniu modalneho okna
43358				// vynimka: ak je vyber variantu nepovinny (== 2), pokracuje AJAX flow
43359				if ( (typeof js_global_VM_PRODUCT_ATTRIB_FIRST_OPTION_REQUIRED === 'undefined' || js_global_VM_PRODUCT_ATTRIB_FIRST_OPTION_REQUIRED != 2) &&
43360					jQuery('.shop_page_class_shop_product_details').length && jQuery('.flypage1 .flypage-top select.main_attr_select').length &&
43361					jQuery('.flypage1 select.main_attr_select').filter(function() { return jQuery(this).val() == ''; }).length ) {
43362					return true;
43363				}
43364
43365				if(e.preventDefault) {
43366					e.preventDefault();
43367				}
43368
43369				var elem = this;
43370				var $elem = jQuery(this);
43371				var params = {};
43372
43373				// form submit disabled
43374				if ($elem.hasClass('disabled')) {
43375					return false;
43376				}
43377
43378				if ($elem.hasClass('custom_attribute_submit_error')) {
43379					$elem.removeClass('custom_attribute_submit_error');
43380					return false;
43381				}
43382
43383				var product_id = $elem.find('[name=product_id]').val();
43384				var quantity            = $elem.find('[name=quantity]').val();
43385				var $elemFlypage1Parents = $elem.parents('.flypage1');
43386				params.is_gift          = $elem.find('[name=is_gift]').val() == 1;
43387				params.is_special_offer = $elem.find('[name=is_special_offer]').val() == 1;
43388
43389				if ($elem.find('[name=product_availability]').length > 0) {
43390					params.product_availability = $elem.find('[name=product_availability]').val();
43391				}
43392
43393				if(!product_id) {
43394					product_id = $elemFlypage1Parents.find('[name=product_id]').val();
43395				}
43396
43397				if (!quantity) {
43398					quantity = $elemFlypage1Parents.find('[name=quantity]').val();
43399				}
43400
43401				// priplatkove produkty - add to cart
43402				var surchargeProducts = $elem.closest('.flypage-cart').find('div[data-surcharge-product-id]');
43403				if (surchargeProducts.length === 0) {
43404					surchargeProducts = $elem.closest('.flypage1').find('div[data-surcharge-product-id]');
43405				}
43406				params.hasSurchargeProducts = surchargeProducts.length > 0; // ak je false a v Backende mame priplatkove produkty tak sa zobrazi modalne okno s vyberom priplatkovych produktov
43407
43408				if (!params.hasSurchargeProducts || e.currentTarget.id.indexOf('_') !== -1) { // vex okno pre varianty
43409					surchargeProducts = $elem.closest('.vex').find('div[data-surcharge-product-id]');
43410					params.hasSurchargeProducts = surchargeProducts.length > 0;
43411				}
43412				if (surchargeProducts.length) {
43413					params.surchargeProducts = [];
43414					surchargeProducts.each(function () {
43415						var $this = jQuery(this);
43416						if ($this.find('div.surcharge_product_main_content input[type="checkbox"]:checked').length === 1) {
43417							params.surchargeProducts.push( parseInt($this.attr('data-surcharge-product-id')) );
43418						}
43419					});
43420					// surchargeProducts.parent().html('');
43421				}
43422
43423				// na server pojde aj udaj o predlzenej zaruke, pokial je zaskrtnuta
43424				if ($elem.find('[name=extended_warranty_product]:checked').length > 0) {
43425					params.extended_warranty_product = $elem.find('[name=extended_warranty_product]:checked').val();
43426				}
43427
43428				if (jQuery('input[name="special_product"]').length) {
43429					special_products_imploded = [];
43430					jQuery('input[name="special_product"]:checked').each(function (index, value) {
43431						special_products_imploded[index] = jQuery(this).val();
43432					});
43433					params.special_products = special_products_imploded.join(',');
43434				}
43435
43436				$select = $elem.find('.prod_adv_attrib_select select.main_attr_select');
43437				$advAttrRadio = $elem.find('.prod_adv_attrib_radio');
43438				$advAttrSelect = $elem.find('.prod_adv_attrib_select');
43439
43440				// 27.12.2018 - pato $elem.parents('.flypage-related') je zle lebo to neberie sibling ... ako asi niekto chcel  ($elem.parents('.flypage1').find('.flypage-related').length == 0)
43441				if ($elem.closest('.shop_addtocart_with_advanced_attributes').length && $elem.parents('.flypage-related').length == 0) {
43442					var $flypageElem = $elem.parents('.flypage1');
43443
43444					if ($advAttrSelect.length == 0) {
43445						tmp = $flypageElem.find('.prod_adv_attrib_select');
43446
43447						if (tmp.parents('.flypage-related').length == 0) {
43448							$advAttrSelect = tmp;
43449						}
43450					}
43451
43452					if ($advAttrSelect.length == 0 && $advAttrRadio.length == 0) {
43453						tmp = $flypageElem.find('.prod_adv_attrib_radio');
43454
43455						if (tmp.parents('.flypage-related').length == 0) {
43456							$advAttrRadio = tmp;
43457						}
43458					}
43459
43460					if ($advAttrSelect.length == 0 && $advAttrRadio.length == 0 && $select.length == 0) {
43461						tmp = $flypageElem.find('.prod_adv_attrib_select select.main_attr_select');
43462
43463						if (tmp.parents('.flypage-related').length == 0) {
43464							$select = tmp;
43465						}
43466					}
43467				}
43468
43469				if ($select.length > 0) {
43470					if ($select.hasClass('no_submit')) {
43471						return false;
43472					}
43473					if ($select.length > 1) {
43474						// old mode, more selectboxes
43475						params.select_name      = [];
43476						params.select_value     = [];
43477						params.more_select_mode = 1;
43478						$select.each(function () {
43479							params.select_name.push(jQuery(this).attr('name'));
43480							params.select_value.push(jQuery(this).val());
43481						});
43482					} else {
43483						// new mode, only 1 selectbox
43484						params.select_name  = $select.attr('name');
43485						params.select_value = $select.val();
43486					}
43487				} else if ($advAttrRadio.length > 0) {
43488					params.select_name = $advAttrRadio.find('input[type="radio"]:first').attr('name');
43489					params.select_value = $advAttrRadio.find('input[type="radio"]:checked').val();
43490				} else if ($advAttrSelect.find('select.main_attr_select:first').length > 0 || $advAttrSelect.find('input[name="attribute_select_mode"]').length) {
43491
43492					if ($advAttrSelect.length > 1) {
43493						// old mode, more selectboxes
43494						params.select_name      = [];
43495						params.select_value     = [];
43496						params.more_select_mode = 1;
43497						$advAttrSelect.each(function () {
43498							params.select_name.push(jQuery(this).find('select.main_attr_select:first').attr('name'));
43499							params.select_value.push(jQuery(this).find('select.main_attr_select:first').val());
43500						});
43501					} else {
43502						params.select_name = $advAttrSelect.find('select.main_attr_select:first').attr('name');
43503						params.select_value = $advAttrSelect.find('select.main_attr_select:first').val();
43504					}
43505				}
43506
43507				if (typeof product_id !== 'undefined' && typeof js_Config_product_variant !== 'undefined' && js_Config_product_variant && typeof window['ProductVariantInstance_' + product_id] !== 'undefined' && typeof window['ProductVariantInstance_' + product_id].getSelectedAttribute() !== 'undefined') {
43508
43509					params.select_name = 'faadd750a6fbb9ea11a94c6074db79144';
43510					params.select_value = window['ProductVariantInstance_' + product_id].getSelectedAttribute().source;
43511				}
43512
43513				if ( typeof js_Config_product_attachment !== 'undefined' && js_Config_product_attachment && typeof productAttachment !== 'undefined' && productAttachment != '' ) {
43514					params.product_attachment = productAttachment;
43515				}
43516
43517				if ( $elem.parents('.flypage1').find('.product-custom-attributes').length && typeof js_Config_vex_after_add_to_cart_skip_custom_attributes === 'undefined' ) {
43518
43519					if (typeof params.select_name == 'undefined') {
43520						params.select_name = [];
43521					} else if (typeof params.select_name == 'string') {
43522						params.select_name = [ params.select_name ];
43523					}
43524
43525					if (typeof params.select_value == 'undefined') {
43526						params.select_value = [];
43527					} else if (typeof params.select_value == 'string') {
43528						params.select_value = [ params.select_value ];
43529					}
43530
43531					$elem.parents('.flypage1').find('.product-custom-attribute .inputbox').each(function () {
43532						params.select_name.push(jQuery(this).attr('name'));
43533						params.select_value.push(jQuery(this).val());
43534					});
43535				}
43536
43537				if(params.select_value == "") delete params.select_value;
43538
43539				if ($elem.find('[name=gift_text]').length && jQuery.trim($elem.find('[name=gift_text]').val()) != '') {
43540					params.select_name      = 'faadd750a6fbb9ea11a94c6074db79144';
43541					params.select_value     = $elem.find('[name=gift_text]').val();
43542					params.forced_add       = 1;
43543					params.is_gift          = 1;
43544				}
43545
43546				// JAN nakupovanie v rozmeroch : pridanie parametrov do postu
43547				if ( $elem.find('[name=dim_a]').length > 0 && $elem.find('[name=dim_b]').length > 0) {
43548					params.dim_a = $elem.find('[name=dim_a]').val();
43549					params.dim_b = $elem.find('[name=dim_b]').val();
43550				}
43551				if ( $elem.find('[name=modify_cart_item]').length > 0 && $elem.find('[name=modify_cart_item]').val() != '') {
43552					params.modify_cart_item = $elem.find('[name=modify_cart_item]').val();
43553				}
43554				if ( $elem.find('[name=category_id]').length > 0 && $elem.find('[name=category_id]').val() != '' ) {
43555					params.category_id = $elem.find('[name=category_id]').val();
43556				}
43557
43558				// JAN doplnky produktu : pridanie parametrov do postu
43559				if ( $elem.find('.product_accessory_options').length > 0 ) {
43560					var accessories = [];
43561
43562					$elem.find('.product_accessory_options').find('.product_accessory_group_box:visible select').each(function(){
43563						var sel_box = jQuery(this);
43564						var box = sel_box.parents('.product_accessory_group_box');
43565						var sel_box_id = box.data('box');
43566
43567						sel_box.find('option:selected').each(function(){
43568							var acc_id = jQuery(this).val();
43569							var acc_field = jQuery('.custom_accessory_field_box.cafb_'+sel_box_id);
43570							if( acc_field.length > 0 && acc_field.is(':visible') ){
43571								var acc_pap_item = acc_field.find('.pap_item_'+acc_id);
43572								if( acc_pap_item.length > 0 && acc_pap_item.is(':visible') ){
43573									var acc_label_f = acc_pap_item.find('label').html();
43574									var acc_field_f = acc_pap_item.find('.product_accessory_param_'+acc_id).val();
43575									var acc_txt = acc_label_f + ': ' + acc_field_f;
43576									var acc_qty = (box.hasClass('quantity_add_check') ? quantity : '1');
43577									accessories.push( JSON.stringify({"id": acc_id,"qty": acc_qty,"custom"
43577: acc_txt}) );
43578								} else accessories.push( JSON.stringify({"id": acc_id}) );
43579							} else accessories.push( JSON.stringify({"id": acc_id}) );
43580						});
43581					});
43582					params.product_accessories = accessories.join(';');
43583				}
43584
43585				if (config('js_Config_product_group_package')) {
43586					let productGroupPackageRadio = jQuery('input[name="package"]:checked');
43587					if (productGroupPackageRadio.length > 0 && productGroupPackageRadio.val() === 'package') {
43588						params.is_group_package = true;
43589					}
43590				}
43591
43592
43593				if (quantity > 0) {
43594					// SAKY MATRIX
43595					if(jQuery('input.matrixQuantity').length > 0) {
43596						var mq = [];
43597						var mv = [];
43598
43599						jQuery('input.matrixQuantity').each(function() {
43600							var q = parseInt(jQuery(this).val());
43601
43602							if(q > 0) {
43603								mq.push(q);
43604								mv.push(jQuery(this).closest('td').find('input.matrixQuantityVal').val());
43605							}
43606						});
43607
43608						var i;
43609						params.matrix = true;
43610						for(i = 0; i < mq.length; i++) {
43611							params.select_value = mv[i];
43612							js_ajax_cart_update(elem, product_id, mq[i], params);
43613						}
43614
43615						return false;
43616					}
43617
43618					if(jQuery('#product_custom_shipping_district2').length && jQuery('#shipping_date').length){
43619
43620						if (jQuery.trim(jQuery('#product_custom_shipping_district2').val()) == '') {
43621							vex.dialog.alert({message:'Prosím vyberte miesto doručenia.'});
43622							return false;
43623						}
43624						params.delivery_district_and_date = jQuery('#product_custom_shipping_district2').val()+' - '+ jQuery('#shipping_date').val();
43625					}
43626
43627					// JAN dynamicke atributy
43628					if ($elem.find('.daf_wrap').length && typeof dattr === 'object' && typeof dattr.parseCart === 'function') {
43629						params.quantity = quantity;
43630						dattr.parseCart(params, function(result) {
43631
43632							if ( !result || jQuery.isEmptyObject(result) ) return false;
43633
43634							params = result;
43635							js_ajax_cart_update(elem, product_id, quantity, params);
43636						});
43637					} else {
43638
43639						js_ajax_cart_update(elem, product_id, quantity, params);
43640					}
43641				}
43642				return false;
43643			});
43644		});
43645	}
43646
43647	function js_cart_image_animate(elem) {
43648
43649		// disable animation for specific funcion
43650		if (typeof js_Config_modal_after_add_to_cart !== 'undefined') {
43651			return;
43652		}
43653
43654		elem = jQuery(elem);
43655
43656		if (elem.find('#addtocart').hasClass('custom_attribute_submit_error')) {
43657			elem.find('#addtocart').removeClass('custom_attribute_submit_error');
43658			return false;
43659		}
43660
43661		var product_img = null;
43662		var ajaxCartUpdate = localStorage.getItem('ajaxCartUpdateVariants');
43663		var variantImgSrc = null;
43664		var selectValue   = null;
43665		if (localStorage.getItem('selectedItemValue') != null) {
43666			selectValue = localStorage.getItem('selectedItemValue');
43667		}
43668		localStorage.removeItem('ajaxCartUpdateVariants');
43669		localStorage.removeItem('selectedItemValue');
43670		if (selectValue != null) {
43671			var attributes = selectValue.split('{');
43672			for (var i = 0; i < attributes.length; i++) {
43673				if (attributes[i].indexOf('IMG=') > -1) {
43674					variantImgSrc = attributes[i].substring(4, attributes[i].indexOf('}')); // attributes[i] = 'IMG=cesta/obrazka.jpg}'
43675					break;
43676				}
43677			}
43678		}
43679		if (variantImgSrc != null) {
43680			product_img = jQuery('<img src="' + window.js_global_skvelyweb_site + '/images/shop-active-images/' + variantImgSrc + '" alt="' + variantImgSrc + '">');
43681		} else {
43682			if (ajaxCartUpdate != null) {
43683				ajaxCartUpdate  = JSON.parse(ajaxCartUpdate);
43684				var imageSource = ajaxCartUpdate.image_source;
43685				product_img     = jQuery('<img src="' + imageSource + '" alt="' + imageSource + '">');
43686			}
43687		}
43688
43689		if (elem.parents('.related_product1:first, .related_product2:first, .related_product3:first').length > 0) {
43690			if (elem.parents('.related_product1:first, .related_product2:first, .related_product3:first').find('.featured-image-span:first img:first').length > 0) {
43691				product_img = elem.parents('.related_product1:first, .related_product2:first, .related_product3:first').find('.featured-image-span:first img:first');
43692			} else {
43693				product_img = elem.closest('.related_product1, .related_product2, .related_product3').find('.shop-cat-img a img');
43694			}
43695		} else if (elem.parents('.featured-prod:first').length > 0) {
43696			product_img = elem.parents('.featured-prod:first').find('.featured-image-span:first img:first, .shop-cat-img img.thumb:first');
43697		} else if (elem.parents('.shop-category-product:first').length > 0) {
43698			product_img = elem.parents('.shop-category-product:first').find('img.thumb:first');
43699		} else if (elem.parents('.acc_item:first').length > 0) {
43700			product_img = elem.parents('.acc_item:first').find('img:first');
43701		} else if (elem.parents('.article_product:first').length > 0) {
43702			product_img = elem.parents('.article_product:first').find('img:first');
43703		} else if (elem.parents('.article_product_listing:first').length > 0) {
43704			product_img = elem.parents('.article_product_listing:first').find('img:first');
43705		} else if (elem.parents('.flypage1:first').length > 0) {
43706			product_img = elem.parents('.flypage1:first').find('.flypage-image img.default_flypage_img');
43707
43708			if ((typeof js_Config_product_variant !== 'undefined') && (typeof js_Config_product_variant.options !== 'undefined') && (typeof js_Config_product_variant.options.table_data !== 'undefined') &&
43709				(jQuery.inArray('_IMAGE_', js_Config_product_variant.options.table_data) > -1)) {
43710				if (elem.parents('.flypage1:first').find('.prod_adv_attribs_div').find('tr.active').find('img').length > 0) {
43711					product_img = elem.parents('.flypage1:first').find('.prod_adv_attribs_div').find('tr.active').find('img');
43712				}
43713			}
43714			if ((typeof js_rotate_active_images_detail_data !== 'undefined') && (typeof js_rotate_active_images_detail_data._hideActiveImages !== 'undefined') && (js_rotate_active_images_detail_data._hideActiveImages == false)) {
43715				if (elem.parents('.flypage1:first').find('.flypage-slick-images').find('.slick-active img').length > 0) {
43716					product_img = elem.parents('.flypage1:first').find('.flypage-slick-images').find('.slick-active img');
43717				}
43718			}
43719
43720			if (!product_img.length) {
43721				const slickActiveImg = elem.parents('.flypage1:first').find('.flypage-slick-images .slick-active img');
43722				product_img = slickActiveImg.length ? slickActiveImg : product_img;
43723			}
43724
43725		} else if (elem.parents('.prod:first').length > 0) {	// comparing table
43726			product_img = elem.parents('.prod:first').find('.prod-img img');
43727		} else if (elem.closest('tr.product_item').length) {
43728			product_img = elem.closest('tr.product_item').find('img:first');
43729		}
43729 else if (elem.parents('.product_exchange_modal').find('img').length) {
43730			product_img = elem.parents('.product_exchange_modal').find('img');
43731		} else if (elem.parents('.module-latest-viewed-item').length) {
43732			product_img = elem.parents('.module-latest-viewed-item').find('.shop-cat-img').find('img');
43733		} else if (jQuery('.flypage-image img').length) {
43734			product_img = jQuery('.flypage-image img');
43735		} else if (elem.closest('.wishlist_item').length) {
43736			product_img = elem.closest('.wishlist_item').find('.wishlist_item_img img');
43737		} else if (elem.parents('.bl_product_cart_wrap:first').siblings('.bl_product_image_wrap').length) {
43738			product_img = elem.parents('.bl_product_cart_wrap:first').siblings('.bl_product_image_wrap').find('img');
43739		}
43740
43741		if (product_img != null && product_img.length) {
43742			// set fixed position for cart
43743			if (typeof ('js_cart_css_obj') != 'undefined' && jQuery('#topmenu .module-cart').length > 0) {
43744				js_init_fixed_ajax_cart();
43745			}
43746			var product_ajax_img = product_img.clone();
43747			var offset           = product_img.offset();
43748			if (elem.hasClass('vex-content')) {
43749				offset = elem.offset();
43750			}
43751			var $html = jQuery('html');
43752			product_ajax_img.addClass('ajax_image_animate');
43753			var cart_obj    = jQuery('.module_cont-cart .mainlevel, .module_cont-cart .moduleCartTop a, .module_cont-cart a.cartLink');
43754			var cart_offset = cart_obj.offset();
43755			var posX = offset.left;
43756			if ( elem.hasClass('vex-content') || !(typeof is_responsive !== 'undefined' && is_responsive()) ) {
43757				posX = offset.left + (elem.width() / 2);
43758			}
43759			var posY            = offset.top;
43760			var inHalfViewport = $html.scrollTop() > offset.top + product_img.height() / 2;
43761			var productImgWidth = product_img.width();
43762			var width           = $html.width() * 0.6;
43763			if (elem.hasClass('vex-content')) {
43764				if (productImgWidth == 0) {
43765					productImgWidth = 100;
43766				}
43767			}
43768			if (inHalfViewport) {
43769				product_ajax_img.css({width: (productImgWidth > width ? width : productImgWidth)});
43770				// zakomentovane na ziadost LM a MM
43771				// if (typeof is_responsive !== 'undefined' && is_responsive()) {
43772				// 	posX = 10;
43773				// }
43774				posY = $html.scrollTop() + 70;
43775			} else {
43776				product_ajax_img.css({width: productImgWidth});
43777			}
43778
43779			product_ajax_img.css({position: 'absolute', top: posY, left: posX});
43780			product_ajax_img
43781				.appendTo('body')
43782				.show()
43783				.css({'z-index' : 100002,
43784					'box-shadow':'0 0 3px 3px #e5e5e5', '-moz-box-shadow' : '0 0 3px 3px #e5e5e5', '-webkit-boxshadow' : '0 0 3px 3px #e5e5e5', 'width:': product_img.width(), height: product_img.height()})
43785				.animate({left:cart_offset.left + cart_obj.width() / 2, top: cart_offset.top + cart_obj.height() / 2, width:40, height:30}, 1000, 'easeInCirc', function () {
43786					product_ajax_img.remove();
43787				});
43788
43789		}
43790	}
43791
43792	function js_ajax_cart_flush(elem, extraSettings) {
43793		vex.dialog.confirm({
43794			message : js_lang_shopping_cart_empty_confirm,
43795			focusFirstInput: !config('js_Config_disable_focus_on_dialog'),
43796			callback: function (value) {
43797				if (value) {
43798					elem               = jQuery(elem);
43799					var ajax_container = elem.parent();
43800
43801					var ajax_items = jQuery(ajax_container).parents('.cart_ajax_container').find('.product_cont');
43802					if (ajax_items.length && typeof isApiActive !== 'undefined' && isApiActive) {
43803						var pageMatch = js_server_request_uri.match(/(&|;|\?)page\=([^&]+)/);
43804						var manMatch = js_server_request_uri.match(/(&|;|\?)pc_manufacturer_id\=([^&]+)/);
43805						var page = '';
43806
43807						if (typeof manMatch === 'object' && manMatch !== null) {
43808							page = 'manufacturer';
43809						} else if (typeof pageMatch === 'object' && pageMatch !== null && typeof pageMatch[2] !== 'undefined') {
43810							page = pageMatch[2];
43811						}
43812
43813						apiRequest('flushCart', {
43814							'page': page,
43815							'isAjax': true
43816						});
43817					}
43818
43819					var options = {'ajax_func': 'flush_ajax_cart'};
43820					ajax_container.startAjaxLoader();
43821
43822					jQuery.post('/modules/mod_shop_cart_ajax.php', options, function (ajax_res) {
43823						var result = JSON.parse(decodeURIComponent(ajax_res));
43824						js_cart_total = 0; //config_cart_total_js
43825						js_ajax_cart_container_init(result, 'flush');
43826
43827						if (typeof (js_ajax_cart_update_after_init) != 'undefined') {
43828							js_ajax_cart_update_after_init();
43829						}
43830						ajax_container.stopAjaxLoader();
43831
43832						if (typeof extraSettings !== 'undefined' && extraSettings.refreshAfterComplete !== 'undefined' && extraSettings.refreshAfterComplete) {
43833							window.location.reload();
43834						}
43835					});
43836
43837					// odstranenie ikoniek kosika s pridanym quantity (abenys)
43838					var amountDiv = jQuery('div.product_amount_in_cart_div');
43839					var amountSpan = amountDiv.find('span');
43840					if (amountSpan.length > 0) {
43841						amountSpan.text('');
43842						amountDiv.find('img').prop('src', '');
43843					}
43844
43845					if (typeof (js_ajax_cart_update_after_init) != 'undefined') {
43846						js_ajax_cart_update_after_init();
43847					}
43848
43849					// ecomail trackovanie obsahu kosika (len pre non cs)
43850					if(!is_cs_user() && typeof js_Config_ecomail_track_cart_content !== 'undefined') {
43851						//ziskame naformatovany obsah kosika
43852						new AjaxRequest()
43853							.setController('Cart')
43854							.setAction('getCartContentForEcomail')
43855							.onSuccess(function (result) {
43856
43857								//odosleme obsah kosika
43858								if (typeof window.ecotrack !== 'undefined' ) {
43859									window.ecotrack('trackUnstructEvent', {
43860										schema: '',
43861										data: {
43862											action: 'Basket',
43863											products: result.data
43864										}
43865									});
43866								}
43867								//console.log(result.data);
43868							})
43869							.send();
43870					}
43871				}
43872			},
43873			afterOpen: function () {
43874				if (!config('js_Config_disable_focus_on_dialog')) {
43875					setTimeout(function () {
43876						jQuery(document).find('.vex-dialog-buttons .vex-dialog-button-primary').trigger('focus');
43877					}, 100);
43878				}
43879			}
43880		});
43881		return false;
43882	}
43883
43884	function js_ajax_cart_container_init(result, action) {
43885		// Ak je sprava urcena pre messenger
43886		var res = typeof result.update_res === 'string' ? result.update_res.search('<div class="msg_wrap">') : '-1';
43887
43888		if (typeof(result.update_res) == 'string' && result.update_res.substr(1,3) == 'div' && res == '-1' ) {	// error message
43889			var jqo_message = jQuery('<div>'+result.update_res+'</div>');
43890			jqo_message.find('br:last').remove();
43891			jqo_message = jqo_message.children();
43892			jqo_message
43893				.css({width:500, position:'fixed', top:(jQuery(window).height() / 2 - 70), left:(jQuery(window).width() / 2 - 280), 'z-index':10001 })
43894				.hide();
43895			jQuery('body').append(jqo_message.fadeIn(1000));
43896			setTimeout(function () { jqo_message.fadeOut(1000, function () { jqo_message.remove(); }); }, 8000);
43897
43898		} else if (action == 'flush' || typeof(result.update_res) != 'undefined' && typeof(result.update_res.success) != 'undefined' && result.update_res.success == '1') {	// flush || update cart
43899			jQuery('.module-cart .module-cart-products, .module-cart .moduleCartInfo').html(result.html_cart_values);
43900
43901			if ( Cookies.get('gifts-h46L32i6u') !== undefined && Cookies.get('gifts-h46L32i6u') !== '' ) {
43902				if (typeof(js_gift_init) == 'function')
43903					js_gift_init();
43904			}
43905
43906			var new_ajax_content = jQuery('<div>'+result.html_products+'</div>').html();
43907			if (new_ajax_content != null && new_ajax_content != 'null') {
43908				if (jQuery('.module-cart .cart_ajax_container').length < 1)
43909					jQuery('.module-cart .module_cont-cart table').after(result.html_products);
43910				else {
43911					jQuery('.module-cart .cart_ajax_container').replaceWith(result.html_products);
43912
43913					if (typeof(result.method) != 'undefined') {
43914						jQuery('.module-cart .cart_ajax_container').stop().show();
43915						js_cart_link_update(); // cart link
43916						js_ajax_cart_container_events_init();
43917						// doprava zdarma
43918						if (typeof(js_freeshipping_init) == 'function')
43919							js_freeshipping_init();
43920
43921						if (typeof(js_gift_init) == 'function')
43922							js_gift_init();
43923
43924						if (typeof(js_product_as_gift_init) == 'function') {
43925							if (typeof js_CS_Config_product_as_gift_empty_stock !== 'undefined') {
43926								if (!(typeof js_Config_product_as_gift_disable != 'undefined' && js_Config_product_as_gift_disable) && !js_CS_Config_product_as_gift_empty_stock) {
43927									js_product_as_gift_init();
43928								}
43929							} else if (!(typeof js_Config_product_as_gift_disable != 'undefined' && js_Config_product_as_gift_disable)) {
43930								js_product_as_gift_init();
43931							}
43932						}
43933						if (typeof (js_ajax_cart_after_init) == 'function') {
43934							js_ajax_cart_after_init();
43935						}
43936						if (typeof (product_accessory_bind) == 'function') {
43937							product_accessory_bind();
43938						}
43939						return false;
43940					} else {
43941						setTimeout(function () {
43942							jQuery('.module-cart .cart_ajax_container').stop().slideDown(700);
43943						}, 500);
43944					}
43945				}
43946			} else
43947				jQuery('.module-cart .cart_ajax_container_inner').html('');
43948			jQuery('.module-cart .cart_ajax_container').stop().slideUp(50, 'easeOutExpo', function () { jQuery(this).removeClass('is_open'); });
43949		} else if(res == '-1'){
43950			if (typeof(console) != 'undefined') console.log('CART UPDATE ERROR2:', result);
43951		}
43952
43953		js_cart_link_update(); // cart link
43954		js_ajax_cart_container_events_init();
43955		js_refresh_extended_waranty();
43956		js_refresh_surcharge_products();
43957
43958		// doprava zdarma
43959		if (typeof(js_freeshipping_init) == 'function')
43960			js_freeshipping_init();
43961		if (typeof(js_gift_init) == 'function')
43962			js_gift_init();
43963
43964		if (typeof(js_ajax_cart_after_init) == 'function')
43965			js_ajax_cart_after_init();
43966
43967		if( typeof(product_accessory_bind) == 'function' ){
43968			product_accessory_bind();
43969		}
43970	}
43971
43972	/**
43973	 * @var futureAvailability {id: number, value: string}
43974	 * @param futureAvailability
43975	 */
43976	function js_refresh_product_availability_by_future_availability(futureAvailability) {
43977
43978		if (typeof futureAvailability == 'undefined' || futureAvailability == null || typeof futureAvailability.id == 'undefined' || futureAvailability.id == null) {
43979			return;
43980		}
43981
43982		let availElement = jQuery('.flypage1 .shop_product_availability_value:first');
43983		let newAvailClass = `attr_avail_${futureAvailability.id}`;
43984
43985		if ( availElement.length ) {
43986			if (!availElement.hasClass(newAvailClass) || availElement.text() !== futureAvailability.value) {
43987				// odoberieme povodne classy pre dostupnost
43988				jQuery(availElement).attr('class',
43989					jQuery(availElement).attr('class').split(" ").filter(c => !c.startsWith('attr_avail_')).join(" ").trim()
43990				);
43991				// priradime novu classu s novimy hodnotami
43992				availElement
43993					.addClass(newAvailClass)
43994					.attr('title', futureAvailability.value)
43995					.text(futureAvailability.value);
43996
43997				if ( typeof futureAvailability.description !== 'undefined' ) {
43998
43999					var availDescElement = availElement.parent().siblings('.flypage-avail-info').find('.shop_product_availability_value');
44000
44001					if ( availDescElement.length > 0 ) {
44002						if ( futureAvailability.description != '' ) {
44003							availDescElement.attr('data-description', futureAvailability.description).text(futureAvailability.description);
44004						} else {
44005							availDescElement.attr('data-description', '').text('');
44006						}
44007
44008					}
44009				}
44010			}
44011		}
44012
44013		jQuery('input[name="quantity"]').trigger('blur');
44014	}
44015
44016	function js_refresh_surcharge_products() {
44017		// overime ci sme na detaile produktu
44018		if (jQuery('.shop_page_class_shop_product_details').length) {
44019
44020			// console.log('CALLLED X')
44021
44022			var cart = jQuery('.flypage-kosik');
44023			var box = cart.find('div.surcharge_products_wrap');
44024			var productId = cart.find('input[name="product_id"]').val();
44025
44026			if (box.length && productId){
44027
44028				/*new AjaxRequest({
44029					productId: productId
44030				})
44031					.setController('Product')
44032					.setAction('getSurchargeProductsHtml')
44033					.onSuccess(function (jsonData) {
44034						if (jsonData && jsonData.data && jsonData.data.html) {
44035							box.replaceWith(jsonData.data.html);
44036						}
44037					})
44038					.send();*/
44039
44040			}
44041
44042		}
44043	}
44044
44045	function js_refresh_extended_waranty(){
44046
44047		if (jQuery('.shop_page_class_shop_product_details').length){
44048
44049			var cart = jQuery('.flypage-kosik');
44050			var box = cart.find('.extended_warranty_products');
44051
44052			if (box.length){
44053
44054				var options = { function: 'extended_waranty_products', product_id: cart.find('input[name="product_id"]').val() };
44055
44056				jQuery.post('/includes/frontend_ajax.php', options, function (res) {
44057
44058					var result = csJsonParse(res) || {};
44059
44060					if (typeof result.content !== 'undefined'){
44061						box.html(result.content);
44062						jQuery('input[name="extended_warranty_product"]:checked').data("chk", true);
44063						jQuery('input[name="extended_warranty_product"]').click(function () {
44064							jQuery('input[name="' + jQuery(this).attr('name') + '"]:radio').not(this).removeData("chk");
44065							jQuery(this).data("chk", !jQuery(this).data("chk"));
44066							jQuery(this).prop("checked", jQuery(this).data("chk"));
44067						});
44068					}
44069				});
44070			}
44071		}
44072	}
44073	function js_cart_link_update(){
44074		var moduleCartCount = jQuery('.module-cart-products .module-cart-count, .moduleCartInfo .module-cart-count');
44075
44076		if(jQuery('.moduleCartInfo').length > 0) {
44077			var link = jQuery('.module_cont-cart a.cartLink');
44078		} else {
44079			var link = jQuery('.module_cont-cart a:first');
44080		}
44081
44082		link.attr('onclick', typeof(js_cart_link_click) != 'undefined' && js_cart_link_click || moduleCartCount.length || (typeof(js_Config_show_empty_cart) != 'undefined' && js_Config_show_empty_cart == 1) ? 'return true' : 'return false');
44083		moduleCartCount.length ? jQuery('.cart_ajax_container, .module-cart').removeClass('empty') : jQuery('.cart_ajax_container, .module-cart').addClass('empty');
44084		if (typeof(js_Config_show_empty_cart) != 'undefined' && js_Config_show_empty_cart == 1) {
44085			if (moduleCartCount.length) {
44086				link.removeClass('show_empty');
44087			} else {
44088				link.addClass('show_empty');
44089			}
44090		}
44091
44092		if (typeof prof == 'object') prof.sortCart();
44093	}
44094
44095	//JB modifikácia pre varianty v riadkovom výpise
44096	//odstráni option zo selectu
44097	function refreshVariantSelect(elem, attr) {
44098		//zistíme všetky riadky ktoré sú vypísané a podľa nich upravíme options v selecte
44099		var wrapper = elem.closest('.product-variant-wrap');
44100		var newFinalAmount = 0;
44101
44102		if (typeof attr == 'string') {
44103			if (attr.includes(':')) {
44104				var option = elem.find('option[data-index="' + attr + '"]');
44105			} else {
44106				var option = elem.find('option[data-index=""]');
44107			}
44108			option.prop('disabled', !option.prop('disabled'));
44109			option.prop('selected', !option.prop('selected'));
44110
44111			//nakoľko nefunguje jquery toggle je prepínať viditeľnosť takto
44112			if (option.get(0).style.display === "none" || option.get(0).style.display === "" && jQuery.css( option.get(0), "display" ) === "none") {
44113				option.show();
44114			} else {
44115				option.hide();
44116			}
44117			if (elem.find('option:selected').length) {
44118				elem.closest('.product-chooser-wrap').show();
44119			} else {
44120				elem.closest('.product-chooser-wrap').hide();
44121			}
44122		}
44123		//zapísanie reálneho množstva do inputu
44124
44125		//---------------------------
44126
44127		//časť kódu upraví
44128		wrapper.find('input.variant-amount').each(function(){
44129			newFinalAmount += parseInt(jQuery(this).val());
44130		});
44131
44132		//newFinal value môže presahovať povolený limit
44133		var finalAmountInput = wrapper.closest('tr[class*=product_]').find('input.product_quantity');
44134
44135		finalAmountInput.attr('value',newFinalAmount);
44136
44137		//refreshneme input, aby nám vrátil reálnu hodnotu ->ako sa zachovať pri načítaní údajov
44138		js_change_quantity(finalAmountInput.get(0));
44139
44140	}
44141
44142	//vytvorí nám nový riadok vybraného variantu
44143	function lineAddVariant(elem) {
44144		elem = jQuery(elem);
44145		var select = elem.closest('.product-variant-wrap').find('select:first');
44146		var variant = select.find('option:selected');
44147
44148		if (variant.data('index') == '') {
44149			if (typeof js_browse_listing_choose_variant != 'undefined') {
44150				var tmpContent = js_browse_listing_choose_variant;
44151			}
44152
44153			variant.closest('select').tooltipster({
44154				theme        : 'tooltipster-noir',
44155				animation    : 'fade',
44156				delay        : 10,
44157				timer        : 1500,
44158				content      : tmpContent,
44159				functionAfter: function (instance) {
44160					instance.destroy();
44161				}
44162			}).tooltipster('open');
44163			return false;
44164
44165		}
44166
44167		var input = elem.closest('.product-variant-wrap').find('input[name=productVariantAmountTemplate]');
44168		var amount = input.val();
44169		input.val('');
44170
44171		// ak má variant vlastný Stock, ak nie tak v selecte bude údaj o množstve, musí sa sčítať všetko a zároveň amount, a povoliť maximálne
44172
44173		if (typeof variant.data('qty') != 'undefined' && variant.data('qty') > 0) {
44174			amount = (amount > variant.data('qty') ? variant.data('qty') : amount);
44175		} else {
44176			var finalAmount = elem.closest('.product-variant-wrap').data('qty');
44177			elem.closest('.product-variant-wrap').find('input[name="productVariantAmount"]').each(function(){
44178				finalAmount -= jQuery(this).val();
44179			});
44180			amount = (amount > finalAmount ? finalAmount : amount);
44181		}
44182
44183		if (!(amount > 0)) {
44184			input.addClass('error');
44185			if (input.parent().find('.stock_amount_error').length < 1) {
44186				input.after('<span class="stock_amount_error" style="color:red;">iba ' + ((typeof variant.data('qty') != 'undefined' && variant.data('qty')) ? variant.data('qty') : elem.closest('.product-variant-wrap').data('qty') ) + ' ks </span>');
44187			}
44188			return;
44189		} else {
44190			input.removeClass('error');
44191			input.parent().find('span.stock_amount_error').remove();
44192		}
44193
44194		var html = '<span class="selected-variant"><span class="variant-index" data-index="' + variant.data('index') + '" data-qty="' + variant.data('qty') + '">' + variant.html() + '</span><input style="width:20px;" class="variant-amount" type="text" name="productVariantAmount" value="' + amount + '"><span class="csi-check" onclick="lineChangeVariant(this)"></span><span class="csi-times" onclick="lineRemoveVariant(this)"></span></span>';
44195
44196		//todo: overovanie podľa {S} ?? ->ak nie je setnuté, čo robiť ?
44197
44198		select.closest('.product-variant-wrap').prepend(html);
44199		refreshVariantSelect(select, variant.data('index'));
44200	}
44201
44202	//zmení množstvo variantu
44203	function lineChangeVariant(elem) {
44204		//len zmenime hodnotu na danom riadku, po overení množstva
44205		elem = jQuery(elem);
44206
44207		var amount = elem.closest('span.selected-variant').find('input.variant-amount').val();
44208		var variant = elem.closest('span.selected-variant').find('span.variant-index');
44209		if (typeof variant.data('qty') != 'undefined' && variant.data('qty') > 0) {
44210			console.log('variant qty');
44211			amount = (amount > variant.data('qty') ? variant.data('qty') : amount);
44212		} else {
44213			var finalAmount = elem.closest('.product-variant-wrap').data('qty');
44214			elem.closest('.product-variant-wrap').find('input[name="productVariantAmount"]').each(function(){
44215
44216				//vo final amount je aj hodnota prave upraveného inputu, potrebujeme ju odčítať od final Amount a s tým pracovať ďalej
44217				finalAmount -= jQuery(this).val();
44218			});
44219			console.log('finalAmount',finalAmount);
44220			console.log('actualAmount',amount);
44221			console.log('shouldBeAmount',parseInt(amount) + parseInt(finalAmount));
44222			amount = (finalAmount < 0 ? parseInt(amount) + parseInt(finalAmount) : amount);
44223			console.log('realAmount',amount);
44224		}
44225		elem.closest('span.selected-variant').find('input.variant-amount').val(amount);
44226		refreshVariantSelect(elem);
44227	}
44228
44229	//odstáni riadok variantu
44230	function lineRemoveVariant(elem) {
44231		elem = jQuery(elem);
44232		var select = elem.closest('.product-variant-wrap').find('select:first');
44233
44234		var variant = elem.closest('span.selected-variant');
44235		var variantIndex = variant.find('span.variant-index').html();
44236		variant.remove();
44237
44238		refreshVariantSelect(select, variantIndex);
44239	}
44240
44241	function lineSubmit(elem) {
44242
44243		elem = jQuery(elem);
44244		elem.addClass('ajax-loader');
44245		var product = elem.closest('tr[class*=product_]');
44246		var addToCartList = {};
44247		if (product.find('input.product_quantity').val() < 1) {
44248			elem.removeClass('ajax-loader');
44249			return false;
44250		}
44251
44252		var productId = product.find('input[name="product_id"]').val();
44253		addToCartList[productId] = [];
44254
44255		if (product.find('span.selected-variant').length) {
44256			product.find('span.selected-variant').each(function() {
44257				var variantIndex = jQuery(this).find('span.variant-index');
44258				var variantAmount = jQuery(this).find('input.variant-amount');
44259				var tmpRow = {
44260					'variantIndex' : variantIndex.data('index'),
44261					'variantAmount' : variantAmount.val()
44262				};
44263
44264				addToCartList[productId].push(tmpRow);
44265			});
44266		} else {
44267			var tmpRow = {
44268				'variantAmount' : product.closest('tr[class*=product_]').find('input.product_quantity').val()
44269			};
44270
44271			addToCartList[productId].push(tmpRow);
44272		}
44273
44274		new AjaxRequest({'data': JSON.stringify(addToCartList)})
44275			.setMethod('POST')
44276			.setController('Product')
44277			.setAction('lineSubmitAll')
44278			.onSuccess(function(response){
44279				var html = response.data.html;
44280				elem.removeClass('ajax-loader');
44281				jQuery('.moduleCartInfo').html(html.html_cart_values);
44282				jQuery('.cart_ajax_container').replaceWith(html.html_products);
44283				jQuery('div.module-cart').removeClass('empty');
44284
44285				//custom uprava pre wiky, hromadná skladová zásoba pre varianty, preto upravujeme js hodnoty
44286
44287				lineReset(product);
44288			})
44289			.send();
44290		//toto tu je len kvoli hlúpej predošlej forme
44291		return false;
44292	}
44293
44294	function lineSubmitAll(elem) {
44295
44296		elem = jQuery(elem);
44297		elem.addClass('ajax-loader');
44298		var productWrap = elem.closest('#product_list');
44299
44300		var addToCartList = {};
44301
44302		//new product list code
44303		productWrap.find('tr[class*=product_]').each(function(){
44304
44305			if (jQuery(this).find('input.product_quantity').val() < 1) {
44306				return;
44307			}
44308
44309			var productId = jQuery(this).find('input[name="product_id"]').val();
44310			addToCartList[productId] = [];
44311
44312			if (jQuery(this).find('span.selected-variant').length) {
44313				jQuery(this).find('span.selected-variant').each(function() {
44314					var variantIndex = jQuery(this).find('span.variant-index');
44315					var variantAmount = jQuery(this).find('input.variant-amount');
44316					var tmpRow = {
44317						'variantIndex' : variantIndex.data('index'),
44318						'variantAmount' : variantAmount.val()
44319					};
44320
44321					addToCartList[productId].push(tmpRow);
44322				});
44323			} else {
44324				var tmpRow = {
44325					'variantAmount' : jQuery(this).closest('tr[class*=product_]').find('input.product_quantity').val()
44326				};
44327
44328				addToCartList[productId].push(tmpRow);
44329			}
44330			//resetovanie
44331		});
44332		if (JSON.stringify(addToCartList) == '{}') {
44333			elem.removeClass('ajax-loader');
44334			return false;
44335		}
44336
44337		new AjaxRequest({'data': JSON.stringify(addToCartList)})
44338			.setMethod('POST')
44339			.setController('Product')
44340			.setAction('lineSubmitAll')
44341			.onSuccess(function(response){
44342				var html = response.data.html;
44343				elem.removeClass('ajax-loader');
44344				jQuery('.moduleCartInfo').html(html.html_cart_values);
44345				jQuery('.cart_ajax_container').replaceWith(html.html_products);
44346				jQuery('div.module-cart').removeClass('empty');
44347
44348				var reset = jQuery('div.reset_all').find('.reset_all');
44349				lineResetAll(reset);
44350			})
44351			.send();
44352
44353
44354		//nájsť všetky inputy a vytiahnuť celkový objekt v ktorom budú IDčka -> attribúty
44355	}
44356
44357	function lineReset(elem) {
44358		//vstupom je tr ELEMENT
44359		elem = jQuery(elem);
44360
44361		if (elem.hasClass('product-has-attributes')) {
44362				//zmažeme všetky varianty a resetujeme select
44363
44364			elem.find('.stock_amount_error').remove();
44365			elem.find('.variant-amount-template').val('').removeClass('error');
44366
44367			elem.find('span.selected-variant').each(function(){
44368				jQuery(this).remove();
44369			});
44370
44371			elem.find('.product-chooser-wrap').show();
44372
44373			elem.find('option').each(function(){
44374				jQuery(this).show().prop('disabled',false);
44375			});
44376		}
44377
44378		//wiky custom úprava
44379		var value = elem.find('input.product_quantity').val();
44380		var oldValue = 0;
44381		if (elem.hasClass('product-has-attributes')) {
44382			oldValue = elem.find('.product-variant-wrap').data('qty');
44383			elem.find('.product-variant-wrap').data('qty', oldValue - value);
44384		} else {
44385			//možno prekomplikované, ale custom a rýchle
44386			oldValue = jQuery('div.productArrayAsInputHiddenBlock div#product_' + elem.find('input[name=product_id]').val()).find('input[name=product_in_stock]').val();
44387			jQuery('div.productArrayAsInputHiddenBlock div#product_' + elem.find('input[name=product_id]').val()).find('input[name=product_in_stock]').val(oldValue-value);
44388		}
44389
44390		elem.find('span.info-value').html(oldValue-value);
44391		//koniec custom úpravy
44392		elem.find('input.product_quantity').val(0);
44393	}
44394
44395	function lineResetAll(elem) {
44396		if (!is_cs_user('separate_js')) {
44397			jQuery('.product_quantity').val('0').change();
44398		}
44399		//najideálnejšie by bolo spraviť refresh stránky
44400		jQuery('div#product_list').find('tr[class*=product_]').each(function() {
44401			lineReset(this);
44402		});
44403		jQuery('#price_all').html(0);
44404		//len kvoli forme
44405		return false;
44406	}
44407
44408	function getProductToChange(productId, params) {
44409
44410		return	new AjaxRequest({productId: productId, params: params})
44411					.setMethod('POST')
44412					.setController('Product')
44413					.setAction('getProductToChange')
44414					.onSuccess(function (response) {
44415						return response;
44416					}).send();
44417	}
44418
44419	function js_check_if_product_in_cart(productId, params) {
44420
44421		return	new AjaxRequest({productId: productId, params: params})
44422					.setMethod('POST')
44423					.setController('ProductInCart')
44424					.setAction('productInCartCheck')
44425					.onSuccess(function (response) {
44426						return response;
44427					}).send();
44428	}
44429}
44430
44431
44432/* ========================================
44433 FILE: /includes/js/system/AjaxRequest.js
44434 ==================== */
44435
44436/**
44437 * @fileOverview AjaxRequest class
44438 * @name AjaxRequest (/includes/js/system/AjaxRequest.js)
44439 * @author Martin Hucko <[email protected]>
44440 * @version 1.0.0
44441 * @requires jQuery
44442 */
44443
44444/**
44445 * @class AjaxRequest
44446 * @classdesc Basic AJAX request class
44447 * @constructor
44448 *
44449 * @param {Object} [data = {}]
44450 *
44451 * @returns {AjaxRequest}
44452 */
44453var AjaxRequest = function (data) {
44454
44455	/**
44456	 * @member {String} [AjaxRequest#url = '/includes/ajax_handle.php'] - Request URL
44457	 */
44458	this.url = '/includes/ajax_handle.php';
44459
44460	/**
44461	 * @member {Object} [AjaxRequest#data = {}] - Ajax data
44462	 */
44463	this.data = data || {};
44464
44465	/**
44466	 * @member {String} [AjaxRequest#method = 'GET'] - Ajax method (POST | GET | PUT | ...)
44467	 */
44468	this.method = 'GET';
44469
44470	/**
44471	 * @member {Number} [AjaxRequest#timeout = 0] - Ajax timeout in [ms]
44472	 */
44473	this.timeout = 0;
44474
44475	/**
44476	 * @member {Object.<String, String>} [AjaxRequest#headers = {}] - Ajax headers
44477	 */
44478	this.headers = {};
44479
44480	/**
44481	 * @member {Boolean} [AjaxRequest#cache = true]
44482	 */
44483	this.cache = true;
44484
44485	/**
44486	 * @member {String} [AjaxRequest#dataType = 'json']
44487	 */
44488	this.dataType = 'json';
44489
44490	/**
44491	 * @member {Boolean} [AjaxRequest#ignore = false]
44492	 */
44493	this.ignore = false;
44494
44495	/**
44496	 * @member {Function} AjaxRequest#successCallback
44497	 * @see AjaxRequest.prototype.send
44498	 */
44499	this.successCallback = null;
44500
44501	/**
44502	 * @member {Function} AjaxRequest#errorCallback
44503	 * @see AjaxRequest.prototype.send
44504	 */
44505	this.errorCallback = null;
44506
44507	/**
44508	 * @member {Function} AjaxRequest#ajaxFailCallback
44509	 * @see AjaxRequest.prototype.send
44510	 */
44511	this.ajaxFailCallback = null;
44512
44513	/**
44514	 * @member {Function} AjaxRequest#completeCallback
44515	 * @see AjaxRequest.prototype.send
44516	 */
44517	this.completeCallback = null;
44518
44519	/**
44520	 * @member {Boolean} [AjaxRequest#isExternal = false] - Provided url is external
44521	 */
44522	this.isExternal = false;
44523
44524	/**
44525	 * @member {Boolean} [AjaxRequest#async = true]
44526	 */
44527	this.async = true;
44528
44529	/**
44530	 * @member {Object} [AjaxRequest#localData = {}]
44531	 * @property {String} [AjaxRequest#localData.controller = 'Front']
44532	 * @property {String} [AjaxRequest#localData.action = 'order.index']
44533	 */
44534	this.localData = {};
44535
44536	this.setLocalData(this.data);
44537
44538	if (typeof js_CS_Config_csrf !== 'undefined' && js_CS_Config_csrf && typeof js_CS_Config_csrf_header !== 'undefined' && js_CS_Config_csrf_header) {
44539		this.addHeader(js_CS_Config_csrf_header, jQuery('meta[name="csrf-token"]').attr('content'));
44540	}
44541
44542	this.nonCF = false;
44543
44544	this.autoRedirectOn403 = true;
44545
44546
44547	return this;
44548};
44549
44550/**
44551 * jQuery.ajax()
44552 *   - success
44553 *     - response is JSON
44554 *       - jsonData.success -> successCallback(jsonData, textStatus, jqXHR);
44555 *       - !jsonData.success
44556 *         - errorCallback provided -> errorCallback(jsonData, textStatus, jqXHR);
44557 *         - errorCallback not provided
44558 *           - jsonData.error provided -> vex.dialog.alert(jsonData.error);
44559 *           - jsonData.error not provided -> vex.dialog.alert(cms_js_lang_content_alert_1); // Unknown error.
44560 *     - response is something else -> errorCallback(data, textStatus, jqXHR);
44561 *   - error
44562 *     - ajaxFailCallback provided -> ajaxFailCallback(jqXHR, textStatus, errorThrown);
44563 *     - ajaxFailCallback not provided -> vex.dialog.alert(cms_js_lang_content_alert_1); // Unknown error.
44564 *   - complete -> completeCallback(jqXHR, textStatus);
44565 *
44566 * @method AjaxRequest.prototype.send
44567 * @return {jqXHR}
44568 */
44569AjaxRequest.prototype.send = function () {
44570	return jQuery.ajax({
44571		url: this.getParsedUrl(),
44572		data: this.getParsedData(),
44573		type: this.method,
44574
44575		cache: this.cache,
44576		async: this.isAsync(),
44577		dataType: this.dataType,
44578		timeout: this.timeout,
44579		headers: this.headers,
44580		success: jQuery.proxy(this.handleResponse, this),
44581		error: jQuery.proxy(this.handleError, this),
44582		complete: jQuery.proxy(this.handleComplete, this)
44583	});
44584};
44585
44586/**
44587 * @method AjaxRequest.prototype.handleResponse
44588 * @param {Object} data
44589 * @param {String} textStatus
44590 * @param {Object} jqXHR
44591 */
44592AjaxRequest.prototype.handleResponse = function (data, textStatus, jqXHR) {
44593	if (this.ignore) {
44594		if (typeof this.successCallback === 'function') {
44595			this.successCallback(data, textStatus, jqXHR);
44596		}
44597
44598		return;
44599	}
44600
44601	if (this.dataType === 'json') {
44602		this.handleJsonResponse(data, textStatus, jqXHR);
44603	} else if (typeof this.successCallback === 'function') {
44604		this.successCallback(data, textStatus, jqXHR);
44605	}
44606};
44607
44608/**
44609 * @method AjaxRequest.prototype.handleJsonResponse
44610 * @param {Object} data
44611 * @param {String} textStatus
44612 * @param {Object} jqXHR
44613 */
44614AjaxRequest.prototype.handleJsonResponse = function (data, textStatus, jqXHR) {
44615	var errorString;
44616
44617	try {
44618		jsonData = data;
44619
44620		this.handleModal(jsonData);
44621
44622		if (jsonData.success) {
44623			if (typeof this.successCallback === 'function') {
44624				this.successCallback(jsonData, textStatus, jqXHR);
44625			}
44626
44627			return;
44628		}
44629
44630		if (typeof this.errorCallback === 'function') {
44631			this.errorCallback(jsonData, textStatus, jqXHR);
44632
44633			return;
44634		}
44635
44636		errorString = this.getResponseErrors(jsonData).map(function (error) {
44637			return '<li>' + error + '</li>';
44638		}).join('');
44639
44640		vex.dialog.alert('<ul style="list-style: none; padding: 0; margin: 0;">' + errorString + '</ul>');
44641	} catch (exception) {
44642		if (typeof this.errorCallback === 'function') {
44643			this.errorCallback(data, textStatus, jqXHR);
44644		}
44645
44646		if (is_cs_user()) {
44647			console.log(exception);
44648		}
44649	}
44650};
44651
44652/**
44653 * @method AjaxRequest.prototype.handleError
44654 * @param {Object} jqXHR
44655 * @param {String} textStatus
44656 * @param {Object} errorThrown
44657 */
44658AjaxRequest.prototype.handleError = function (jqXHR, textStatus, errorThrown) {
44659
44660	if (jqXHR.status === 403 && this.autoRedirectOn403) {
44661		window.location.href = typeof js_global_live_site !== 'undefined' ? js_global_live_site : '/';
44662		return;
44663	}
44664
44665	// Firefox nastavuje status na 0 a statusText na `error` ked ideme inam
44666	// chrome nezavola error teda handleError
44667	if (jqXHR.status === 0 && (!errorThrown || errorThrown === '')) {
44668		return;
44669	}
44670
44671	if (typeof this.ajaxFailCallback === 'function') {
44672		this.ajaxFailCallback(jqXHR, textStatus, errorThrown);
44673
44674		return;
44675	}
44676
44677	if (!this.ignore) {
44678		vex.dialog.alert(cms_js_lang_content_alert_1);
44679	}
44680};
44681
44682/**
44683 * @method AjaxRequest.prototype.handleComplete
44684 * @param {Object} jqXHR
44685 * @param {String} textStatus
44686 */
44687AjaxRequest.prototype.handleComplete = function (jqXHR, textStatus) {
44688	if (typeof this.completeCallback === 'function') {
44689		this.completeCallback(jqXHR, textStatus);
44690	}
44691
44692	this.showNotifications(jqXHR);
44693};
44694
44695/**
44696 *
44697 * @param {Object} data
44698 * @returns {jQuery|null}
44699 */
44700AjaxRequest.prototype.handleModal = function (data) {
44701	if (data.modal && data.body) {
44702		return vex.dialog.alert(data.body);
44703	}
44704
44705	return null;
44706};
44707
44708/**
44709 * @method AjaxRequest.prototype.getResponseErrors
44710 * @param {Object} data
44711 * @return {String[]}
44712 */
44713AjaxRequest.prototype.getResponseErrors = function (data) {
44714	if (data.errors && data.errors.length) {
44715		return data.errors;
44716	}
44717
44718	return [cms_js_lang_content_alert_1];
44719};
44720
44721/**
44722 * @method AjaxRequest.prototype.getParsedUrl
44723 * @return {String}
44724 */
44725AjaxRequest.prototype.getParsedUrl = function () {
44726	var url = this.url;
44727
44728	if (this.isExternal) {
44729		return url;
44730	}
44731
44732	if (typeof url === 'undefined' || url === null) {
44733		return js_global_live_site + '/index3.php?' + this.serialize(this.localData);
44734	}
44735
44736	return url;
44737};
44738
44739/**
44740 * @method AjaxRequest.prototype.getParsedData
44741 * @return {Object}
44742 */
44743AjaxRequest.prototype.getParsedData = function () {
44744	return jQuery.extend(true, {}, {
44745		no_css: 1,
44746		no_html: 1,
44747		no_vm_html: 1,
44748		no_menu: 1,
44749		ajax_call: 2
44750	}, this.localData, this.data);
44751};
44752
44753/**
44754 * @method AjaxRequest.prototype.serialize
44755 * @param {Object} data
44756 * @param {String} [prefix = '']
44757 * @return {String}
44758 */
44759AjaxRequest.prototype.serialize = function (data, prefix) {
44760	var parts = [];
44761	var property, key, value, part;
44762
44763	for (property in data) {
44764		if (data.hasOwnProperty(property)) {
44765			key = prefix ? prefix + '[' + property + ']' : property;
44766			value = data[property];
44767			part = (value !== null && typeof value === 'object') ?
44768				this.serialize(value, property) :
44769				encodeURIComponent(key) + '=' + encodeURIComponent(value);
44770
44771			parts.push(part);
44772		}
44773	}
44774
44775	return parts.join('&');
44776};
44777
44778/**
44779 * @method AjaxRequest.prototype.isUrlExternal
44780 * @param {String} [url = this.url]
44781 * @return {Boolean}
44782 */
44783AjaxRequest.prototype.isUrlExternal = function (url) {
44784	var domainRe = /https?:\/\/((?:[\w\d-]+\.)+[\w\d]{2,})/i;
44785	var domain = function (urlInner) {
44786		return domainRe.exec(urlInner)[1];
44787	};
44788
44789	return domain(location.href) !== domain(url || this.url);
44790};
44791
44792/**
44793 * @method AjaxRequest.prototype.setUrl
44794 * @param {String} url
44795 * @return {AjaxRequest}
44796 */
44797AjaxRequest.prototype.setUrl = function (url) {
44798	this.url = url;
44799	this.isExternal = this.isUrlExternal();
44800
44801	return this;
44802};
44803
44804/**
44805 * @method AjaxRequest.prototype.setData
44806 * @param {Object} data
44807 * @return {AjaxRequest}
44808 */
44809AjaxRequest.prototype.setData = function (data) {
44810	this.data = data;
44811
44812	return this;
44813};
44814
44815/**
44816 * @method AjaxRequest.prototype.setMethod
44817 * @param {String} method
44818 * @return {AjaxRequest}
44819 */
44820AjaxRequest.prototype.setMethod = function (method) {
44821	this.method = method;
44822
44823	return this;
44824};
44825
44826/**
44827 * @method AjaxRequest.prototype.setTimeout
44828 * @param {Number} timeout
44829 * @return {AjaxRequest}
44830 */
44831AjaxRequest.prototype.setTimeout = function (timeout) {
44832	this.timeout = parseInt(timeout);
44833
44834	return this;
44835};
44836
44837/**
44838 * @method AjaxRequest.prototype.setHeaders
44839 * @param {Object} headers
44840 * @return {AjaxRequest}
44841 */
44842AjaxRequest.prototype.setHeaders = function (headers) {
44843	this.headers = headers;
44844
44845	return this;
44846};
44847
44848/**
44849 * @method AjaxRequest.prototype.addHeader
44850 * @param {String} name
44851 * @param {String} header
44852 * @return {AjaxRequest}
44853 */
44854AjaxRequest.prototype.addHeader = function (name, header) {
44855	this.headers[name] = header;
44856
44857	return this;
44858};
44859
44860/**
44861 * @method AjaxRequest.prototype.setCache
44862 * @param {Boolean} cache
44863 * @return {AjaxRequest}
44864 */
44865AjaxRequest.prototype.setCache = function (cache) {
44866	this.cache = cache;
44867
44868	return this;
44869};
44870
44871/**
44872 * @method AjaxRequest.prototype.setDataType
44873 * @param {String} dataType
44874 * @return {AjaxRequest}
44875 */
44876AjaxRequest.prototype.setDataType = function (dataType) {
44877	this.dataType = dataType;
44878
44879	return this;
44880};
44881
44882/**
44883 * @method AjaxRequest.prototype.addCallback
44884 * @param {String} type
44885 * @param {Function} callback
44886 * @return {AjaxRequest}
44887 */
44888AjaxRequest.prototype.after = function (type, callback) {
44889	switch (type) {
44890		case 'success':
44891			return this.onSuccess(callback);
44892
44893		case 'error':
44894			return this.onError(callback);
44895
44896		case 'ajaxFail':
44897			return this.onAjaxFail(callback);
44898
44899		case 'complete':
44900			return this.onComplete(callback);
44901
44902		default:
44903			return this;
44904	}
44905};
44906
44907/**
44908 * @method AjaxRequest.prototype.onSuccess
44909 * @param {Function} callback
44910 * @return {AjaxRequest}
44911 */
44912AjaxRequest.prototype.onSuccess = function (callback) {
44913	this.successCallback = callback;
44914
44915	return this;
44916};
44917
44918/**
44919 * @method AjaxRequest.prototype.onError
44920 * @param {Function} callback
44921 * @return {AjaxRequest}
44922 */
44923AjaxRequest.prototype.onError = function (callback) {
44924	this.errorCallback = callback;
44925
44926	return this;
44927};
44928
44929/**
44930 * @method AjaxRequest.prototype.onAjaxFail
44931 * @param {Function} callback
44932 * @return {AjaxRequest}
44933 */
44934AjaxRequest.prototype.onAjaxFail = function (callback) {
44935	this.ajaxFailCallback = callback;
44936
44937	return this;
44938};
44939
44940/**
44941 * @method AjaxRequest.prototype.onComplete
44942 * @param {Function} callback
44943 * @return {AjaxRequest}
44944 */
44945AjaxRequest.prototype.onComplete = function (callback) {
44946	this.completeCallback = callback;
44947
44948	return this;
44949};
44950
44951/**
44952 * @method AjaxRequest.prototype.isExternal
44953 * @returns {Boolean|AjaxRequest}
44954 */
44955
44956/**
44957 * @method AjaxRequest.prototype.isExternal
44958 * @param {Boolean} isExternal
44959 * @return {AjaxRequest}
44960 */
44961AjaxRequest.prototype.isExternal = function (isExternal) {
44962	if (typeof isExternal === 'undefined' || isExternal === null) {
44963		return this.isExternal;
44964	}
44965
44966	this.isExternal = isExternal;
44967
44968	return this;
44969};
44970
44971/**
44972 * @method AjaxRequest.prototype.isAsync
44973 * @param {Boolean} [isAsync]
44974 * @returns {Boolean|AjaxRequest}
44975 */
44976AjaxRequest.prototype.isAsync = function (isAsync) {
44977	if (typeof isAsync === 'undefined' || isAsync === null) {
44978		return this.async;
44979	}
44980
44981	this.async = isAsync;
44982
44983	return this;
44984};
44985
44986/**
44987 *
44988 * @param {Boolean} async
44989 * @return {AjaxRequest}
44990 */
44991AjaxRequest.prototype.setAsync = function (async) {
44992	this.async = async;
44993
44994	return this;
44995};
44996
44997/**
44998 * @method AjaxRequest.prototype.setLocalData
44999 * @param {Object} data
45000 * @param {String} data.controller
45001 * @param {String} data.action
45002 * @returns {AjaxRequest}
45003 */
45004AjaxRequest.prototype.setLocalData = function (data) {
45005	if (typeof data !== 'object') {
45006		return this;
45007	}
45008
45009	if (data.hasOwnProperty('_type')) {
45010		this.setType(data._type);
45011	}
45012
45013	if (data.hasOwnProperty('controller')) {
45014		this.setController(data.controller);
45015	}
45016
45017	if (data.hasOwnProperty('action')) {
45018		this.setAction(data.action);
45019	}
45020
45021	return this;
45022};
45023
45024/**
45025 * @param {'admin'|'frontend'} [type='frontend'] type
45026 * @returns {AjaxRequest}
45027 */
45028AjaxRequest.prototype.setType = function (type = 'frontend') {
45029	this.localData._type = type;
45030
45031	return this;
45032}
45033
45034/**
45035 * @method AjaxRequest.prototype.setAutoRedirectOn403
45036 * @param {Boolean} autoRedirect
45037 * @return {AjaxRequest}
45038 */
45039AjaxRequest.prototype.setAutoRedirectOn403 = function (autoRedirect) {
45040	this.autoRedirectOn403 = autoRedirect;
45041
45042	return this;
45043};
45044
45045/**
45046 * @method AjaxRequest.prototype.setController
45047 * @param {String} controller
45048 * @return {AjaxRequest}
45049 */
45050AjaxRequest.prototype.setController = function (controller) {
45051	this.localData.controller = controller;
45052
45053	return this;
45054};
45055
45056/**
45057 * @method AjaxRequest.prototype.setAction
45058 * @param {String} action
45059 * @return {AjaxRequest}
45060 */
45061AjaxRequest.prototype.setAction = function (action) {
45062	this.localData.action = action;
45063
45064	return this;
45065};
45066
45067AjaxRequest.prototype.setNonCF = function () {
45068	this.nonCF = true;
45069
45070	return this;
45071};
45072
45073/**
45074 * @method AjaxRequest.prototype.ignoreDefault
45075 * @param {Boolean} [ignore = true]
45076 * @return {AjaxRequest}
45077 */
45078AjaxRequest.prototype.ignoreDefault = function (ignore) {
45079	this.ignore = typeof ignore === 'undefined' ? true : ignore;
45080
45081	return this;
45082};
45083
45084AjaxRequest.prototype.showNotifications = function (jqXHR) {
45085	try {
45086		if (typeof jqXHR !== 'object' || typeof jqXHR.responseText !== 'string') {
45087			return this;
45088		}
45089
45090		var response = JSON.parse(jqXHR.responseText);
45091
45092		if (
45093			typeof response === 'object' &&
45094			typeof response.notifications === 'object' &&
45095			typeof showNotificationsFromList === 'function' &&
45096			typeof localStorage === 'object' &&
45097			localStorage.getItem('NotificationsAfterReload') === null
45098		) {
45099			showNotificationsFromList(response.notifications);
45100		}
45101	} catch (e) {
45102		console.warn('Problem while showing notifications', e);
45103	}
45104
45105	return this;
45106};
45107
45108AjaxRequest.prototype.scheduleNotifications = function (notifications) {
45109	try {
45110		if (typeof notifications === 'object' && typeof localStorage === 'object') {
45111			localStorage.setItem('NotificationsAfterReload', JSON.stringify(notifications));
45112		}
45113	} catch (e) {
45114		console.warn('Problem while scheduling notifications', e);
45115	}
45116
45117	return this;
45118};
45119
45120
45121/* ========================================
45122 FILE: /includes/js/advanced_banner_functions.js
45123 ==================== */
45124
45125function getAdvancedBannerData(module_id) {
45126	result = {};
45127	if (typeof jQuery('.mp_id' + module_id).data('advancedBannerData') !== 'undefined') {
45128		result = jQuery('.mp_id' + module_id).data('advancedBannerData');
45129	}
45130	return result;
45131}
45132
45133function isOneTimeUseAdvancedBanner(bannerId) {
45134	var moduleData = getAdvancedBannerData(bannerId);
45135	var params = moduleData.params;
45136	var match = params.match(/one_time_use=(\d)/);
45137	return ( match !== null && match[1] != null && parseInt(match[1]) === 1 );
45138}
45139
45140function isMouseLeave(bannerId) {
45141	var moduleData = getAdvancedBannerData(bannerId);
45142	var params = moduleData.params;
45143	var match = params.match(/mouseleave=(\d)/);
45144	return ( match !== null && match[1] != null && parseInt(match[1]) === 1 );
45145}
45146
45147function isLeaveFromSite(bannerId) {
45148	var moduleData = getAdvancedBannerData(bannerId);
45149	var params = moduleData.params;
45150	var match = params.match(/siteleave=(\d)/);
45151	return ( match !== null && match[1] != null && parseInt(match[1]) === 1 );
45152}
45153
45154function getAdvancedBannerHash(bannerId) {
45155	var moduleData = getAdvancedBannerData(bannerId);
45156
45157	if (typeof moduleData.content !== 'undefined') {
45158		return bannerId + moduleData.content.length;
45159	} else {
45160		return bannerId;
45161	}
45162}
45163
45164function iAmInBackend() {
45165	return ( jQuery('body').hasClass('admin_content') || location.pathname.match(/^\/administrator/) !== null );
45166}
45167
45168function getAdvancedBannerList() {
45169	var bannerList = JSON.parse(Cookies.get('advanced_banner_closed'));
45170	return (bannerList !== null && bannerList.length) ? bannerList : [];
45171}
45172
45173function advancedBannerAlreadySeen(bannerId) {
45174	var moduleData = getAdvancedBannerData(bannerId);
45175	var myCookie = 'advanced_banner_closed_' + bannerId;
45176	if (typeof (moduleData.geoip_request) != 'undefined' && moduleData.geoip_request != '') {
45177		myCookie += '_' + moduleData.page;
45178	}
45179	myCookie = Cookies.get(myCookie);
45180	var result = ( typeof myCookie !== 'undefined' && myCookie !== null && myCookie == getAdvancedBannerHash(bannerId) );
45181	return result;
45182}
45183
45184function advancedBannerOutOfTimeRange(bannerId) {
45185	var result = true;
45186	var moduleData = getAdvancedBannerData(bannerId);
45187	if (typeof moduleData.params !== 'undefined') {
45188		var matches = moduleData.params.match(/\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}/g);
45189		if (matches.length == 2) {
45190			var dateFrom = new Date(matches[0].replace(' ', 'T')) /1000;
45191			var dateTo = new Date(matches[1].replace(' ', 'T')) /1000;
45192			//dateFrom.setHours(dateFrom.getUTCHours());
45193			//dateTo.setHours(dateTo.getUTCHours());
45194			var now = new Date()/1000;
45195		}
45196		result = ( now < dateFrom || now > dateTo );
45197	}
45198	return result;
45199}
45200
45201function initAdvancedBanner(module_id, show) {
45202	//RB -> 5.10.2020 Zakomentoval som pretoze modul nikdy nenainicialozoval a tym padom sa nedal upravovat.
45203	/*if (iAmInBackend()) {
45204		return false;
45205	}*/
45206
45207	var module_class = '.mp_id' + module_id;
45208	var moduleData = getAdvancedBannerData(module_id);
45209	var module = jQuery(module_class);
45210	var respo_limit = (typeof(advanced_banner_respo) !== 'undefined' && advanced_banner_respo);
45211
45212	if ( ( respo_limit || jQuery(window).width() > 1023 ) && !jQuery(module_class + " .advanced_module_cont").length) {
45213		jQuery(module_class + " div[class*=module_cont_]" ).append('<div class="advanced_module_cont" />');
45214		var advancedBannerContent = jQuery(module_class + " .advanced_module_cont");
45215		advancedBannerContent.html(moduleData.content);
45216
45217		if (module.length < 1 || advancedBannerAlreadySeen(module_id) || !advancedBannerContent.html().length || advancedBannerOutOfTimeRange(module_id))
45218			return false;
45219		if(!isMouseLeave(module_id)) {
45220			setTimeout(function () {
45221				if (show) showAdvancedBanner(module_id);
45222			}, 300);
45223		} else {
45224			var counter = 0;
45225			jQuery(window).on('mouseleave',function() {
45226				if(counter == 0 ) {
45227					if (show) showAdvancedBanner(module_id);
45228				}
45229				 counter++;
45230			});
45231		}
45232	}
45233}
45234
45235function isConfirmEnabled(bannerId) {
45236	var moduleData = getAdvancedBannerData(bannerId);
45237	var params = moduleData.params;
45238	var match = params.match(/confirm=(\d)/);
45239
45240	return ( match !== null && match[1] != null && parseInt(match[1]) === 1 );
45241}
45242
45243function redirectOnNo(bannerId) {
45244	var moduleData = getAdvancedBannerData(bannerId);
45245	var params = moduleData.params;
45246	var match = params.match(/^url=(.*)/gm);
45247	window.location.assign(match[0].split('=')[1]);
45248}
45249
45250function showAdvancedBanner(module_id) {
45251	module_class = '.mp_id' + module_id;
45252	var moduleData = getAdvancedBannerData(module_id);
45253	var module = jQuery(module_class);
45254
45255	var vexInput = moduleData.content;
45256	vexInput += '<div class="cleaner"><!-- &nbsp; --></div>';
45257
45258	let bannerConfirmButtonStyles = ' style="color: #fff; background-color: #44c767; border: 1px solid #18ab29; float:none; margin-left: 0;"';
45259	let bannerCancelButtonStyles = ' style="color: #fff; background-color: #d0451b; border: 1px solid #942911; float: none; margin-left: .5em;"';
45260	if (typeof js_CS_Config_reklamneOkno_disable_default_styles !== 'undefined' && js_CS_Config_reklamneOkno_disable_default_styles) {
45261		bannerConfirmButtonStyles = '';
45262		bannerCancelButtonStyles = '';
45263	}
45264	let bannerConfirmButton = '<input' + bannerConfirmButtonStyles + ' class="bannerConfirmButton vex-dialog-button-primary vex-dialog-button vex-first" type="submit" onclick="advancedBannerClose(' + module_id + ')" value="' + cms_js_lang_yes_C + '"/>';
45265	let bannerCancelButton = '<input' + bannerCancelButtonStyles + ' class="bannerCancelButton vex-dialog-button-secondary vex-dialog-button vex-last" type="button" onclick="redirectOnNo(' + module_id + ')" value="' + cms_js_lang_no_C + '"/>';
45266	if (typeof js_CS_Config_change_input_to_button !== 'undefined' && js_CS_Config_change_input_to_button) {
45267		bannerConfirmButton = '<button' + bannerConfirmButtonStyles + ' class="bannerConfirmButton vex-dialog-button-primary vex-dialog-button vex-first" type="submit" onclick="advancedBannerClose(' + module_id + ')">' + cms_js_lang_yes_C + '</button>';
45268		bannerCancelButton = '<button' + bannerCancelButtonStyles + ' class="bannerCancelButton vex-dialog-button-secondary vex-dialog-button vex-last" type="button" onclick="redirectOnNo(' + module_id + ')">' + cms_js_lang_no_C + '</button>';
45269	}
45270
45271	let bannerButtonsDivStyles = ' style="text-align: center;"';
45272	if (typeof js_CS_Config_reklamneOkno_disable_default_styles !== 'undefined' && js_CS_Config_reklamneOkno_disable_default_styles) {
45273		bannerButtonsDivStyles = '';
45274	}
45275	var vexButtons = (isConfirmEnabled(module_id)) ? [
45276			'<div class="vex-dialog-buttons"' + bannerButtonsDivStyles + '>',
45277			bannerConfirmButton,
45278			bannerCancelButton,
45279			'</div>'
45280		].join('') : '';
45281
45282	if (typeof (moduleData.geoip_request) != 'undefined' && moduleData.geoip_request != '') {
45283		vexButtons = [
45284			'<div class="vex-dialog-buttons">',
45285			'<a class="vex-dialog-button-primary vex-dialog-button vex-first" onclick="advancedBannerClose(' + module_id + ');" href="' + moduleData.geoip_request+'">' + cms_js_lang_content_modules_redirect + '</a>',
45286			'<a class="bannerCancelButton vex-dialog-button-secondary vex-dialog-button vex-last" href="javascript:void(0)" onclick="advancedBannerClose(' + module_id + ')">'+cms_js_lang_content_modules_cancel + '</a>',
45287			'</div>'
45288		].join('');
45289
45290		if (vexInput.indexOf('geoip_redirect') >= 0) {
45291			vexInput = vexInput.replace('geoip_redirect', moduleData.geoip_request);
45292			vexButtons = [
45293				'<div class="vex-dialog-buttons">',
45294				'<a class="bannerCancelButton vex-dialog-button-secondary vex-dialog-button vex-last" href="javascript:void(0)" onclick="advancedBannerClose(' + module_id + ')">'+cms_js_lang_content_modules_cancel+'</a>',
45295				'</div>'
45296			].join('');
45297		}
45298	}
45299
45300	if ( typeof (moduleData.disable_buttons) != 'undefined' && moduleData.disable_buttons == true ) {
45301		vexButtons = '';
45302	}
45303
45304	var contentClasses = ['vex-content', 'vex-adv-banner', 'vex-module-' + module_id];
45305	var containsText = false;
45306
45307	jQuery(moduleData.content).add(jQuery(moduleData.content).find('*')).each(function () {
45308		if (jQuery(this).text().trim() != '') {
45309			containsText = true;
45310			return false;
45311		}
45312	});
45313
45314	if (!containsText) {
45315		contentClasses.push('vex-no-border');
45316	}
45317
45318	moduleDataParams = moduleData.params.split(/\r|\n/);
45319	moduleDataParams = splitArrayToKeyValue(moduleDataParams, '=');
45320	if (moduleDataParams.delay == null) {
45321		moduleDataParams.delay = 10;
45322	}
45323		setTimeout(function () {
45324			vex.open({
45325				showCloseButton: !isConfirmEnabled(module_id),
45326				overlayClosesOnClick: !isConfirmEnabled(module_id),
45327				contentClassName: contentClasses.join(' '),
45328				content: [
45329					'<form class="vex-dialog-form">',
45330					'<div class="vex-dialog-input">',
45331					vexInput,
45332					'</div>',
45333					vexButtons,
45334					'</form>'
45335				].join(''),
45336				afterOpen: function () {
45337					if ( typeof (moduleData.custom_href) != 'undefined' && moduleData.custom_href == true ) {
45338						var vexLinks = jQuery('.vex-content li');
45339						vexLinks.on('click', 'a', function (e){
45340							e.preventDefault();
45341						});
45342					}
45343				},
45344				beforeClose: function () {
45345					if ( typeof (moduleData.disable_close) != 'undefined' && moduleData.disable_close == true ) {
45346						return false;
45347					}
45348				},
45349				afterClose: function () {
45350					if ( typeof (moduleData.custom_href) != 'undefined' && moduleData.custom_href == true ) {
45351						advancedBannerCloseCustom(module_id);
45352					} else {
45353						advancedBannerClose(module_id);
45354					}
45355				}
45356			});
45357
45358		}, moduleDataParams.delay);
45359}
45360
45361function advancedBannerClose(bannerId) {
45362	var moduleData = getAdvancedBannerData(bannerId);
45363	var params = (isOneTimeUseAdvancedBanner(bannerId)) ? {expires: 31, path: '/'} : {path: '/'};
45364	var vexContent = jQuery('.vex-content.vex-module-'+ bannerId);
45365	var myCookie = 'advanced_banner_closed_' + bannerId;
45366	if (typeof (moduleData.geoip_request) != 'undefined' && moduleData.geoip_request != '') {
45367		myCookie += '_' + moduleData.page;
45368		params = {expires: moduleData.geoip_days, path: '/'};
45369		if ( typeof (moduleData.geoip_minutes) != 'undefined' ) {
45370			params.expires = 1 / (1440 / moduleData.geoip_minutes);
45371			console.log(params);
45372		}
45373	}
45374
45375	if ( typeof(js_Config_advanced_banner_show_always) == 'undefined' ||
45376		 js_Config_advanced_banner_show_always != 1 ||
45377		 (typeof (moduleData.geoip_request) != 'undefined' && moduleData.geoip_request != '')
45378	) {
45379		Cookies.set(myCookie, getAdvancedBannerHash(bannerId), params);
45380	}
45381
45382	if (vexContent.length > 0) {
45383		vex.close(vexContent.data().vex.id);
45384	}
45385
45386	return false;
45387}
45388
45389function advancedBannerCloseCustom(bannerId, bannerLink) {
45390	var moduleData = getAdvancedBannerData(bannerId);
45391	var params = (isOneTimeUseAdvancedBanner(bannerId)) ? {expires: 31, path: '/'} : {path: '/'};
45392	var vexContent = jQuery('.vex-content.vex-module-'+ bannerId);
45393	var myCookie = 'advanced_banner_closed_' + bannerId;
45394	if (typeof (moduleData.geoip_request) != 'undefined' && moduleData.geoip_request != '') {
45395		myCookie += '_' + moduleData.page;
45396		params = {expires: moduleData.geoip_days, path: '/'};
45397		if ( typeof (moduleData.geoip_minutes) != 'undefined' ) {
45398			params.expires = 1 / (1440 / moduleData.geoip_minutes);
45399			console.log(params);
45400		}
45401	}
45402	if ( typeof(js_Config_advanced_banner_show_always) == 'undefined' ||
45403		js_Config_advanced_banner_show_always != 1 ||
45404		(typeof (moduleData.geoip_request) != 'undefined' && moduleData.geoip_request != '')
45405	) {
45406		Cookies.set(myCookie, getAdvancedBannerHash(bannerId), params);
45407	}
45408
45409	if (vexContent.length > 0) {
45410		vex.close(vexContent.data().vex.id);
45411		if (bannerLink) {
45412			window.location.href = bannerLink;
45413		}
45414	}
45415	return false;
45416}
45417
45418
45419/* ========================================
45420 FILE: /modules/js/mod_discount_product.js
45421 ==================== */
45422
45423/**
45424 * Tento subor sa includuje zatial len pre JS optimalizacie,
45425 * normalne sa nacita inlinovy javascript v mod_discount_product.php
45426 */
45427
45428if ( typeof admin_view_design === 'undefined' ) {
45429	var admin_view_design;
45430}
45431(function (jQuery, adminViewDesign) {
45432	var $elem;
45433	var selector;
45434	var modDiscount;
45435	var weAreInSectionDesign;
45436	if (typeof adminViewDesign === 'undefined') {
45437		weAreInSectionDesign = true;
45438	} else {
45439		weAreInSectionDesign = adminViewDesign;
45440	}
45441	/**
45442	 * Mod Discount Function Constructor
45443	 * @param moduleId {Number}
45444	 * @param options {object}
45445	 * @constructor
45446	 */
45447	function ModDiscount(moduleId, options) {
45448		this.id               = moduleId;
45449		this.options          = options;
45450		this.time_day_enabled = false;
45451		this.timer_countdown  = null;
45452		this.initialized      = false;
45453	}
45454	ModDiscount.prototype.how_many_sec = function () {
45455		if (this.options.productType) {
45456			this.time_day_enabled = true;
45457		}
45458		if (!$elem.find('.date').text().match(/\d{1,2}\.\d{1,2}\.\d{4}/g)) {
45459			return;
45460		}
45461		this.timer_countdown = setInterval(this.countdown.bind(this), 1000);
45462	};
45463	ModDiscount.prototype.countdown    = function () {
45464		var cfgOptimized = this.options.opt;
45465		var module       = this.options.selector;
45466		var $elem        = jQuery(this.options.selector);
45467		var lessThanDay  = false;
45468
45469		if ( typeof js_Config_mod_discount_product_optimalization !== 'undefined' && js_Config_mod_discount_product_optimalization && typeof isElementInView === 'function' ) {
45470			var isInView = isElementInView(module);
45471		}
45472
45473		if ((typeof isInView !== 'undefined' && isInView === true) || (typeof isInView === 'undefined' && jQuery(module + '.mp:in-viewport').length)) {
45474			var time_now = new Date().getTime();
45475			var time_end = new Date(this.options.endTime).getTime();
45476			if (cfgOptimized) {
45477				var time_start = new Date(this.options.startTime).getTime();
45478			}
45479
45480			if (time_end - time_now > 0) {
45481				jQuery('body').addClass('show_discount_banner');
45482			} else {
45483				clearInterval(this.timer_countdown);
45484				jQuery('body').removeClass('show_discount_banner');
45485				if (cfgOptimized) {
45486					jQuery(module).animate({
45487						opacity: 0
45488					}, 500, function () {
45489						jQuery(module).animate({
45490							height: 0,
45491							width : 0
45492						}, 500, function () {
45493							jQuery(module).remove();
45494						});
45495					});
45496				} else {
45497					jQuery(module).remove();
45498					return;
45499				}
45500			}
45501
45502			var time_sec  = Math.floor((time_end - time_now) / 1000);
45503			var time_min  = Math.floor(time_sec / 60);
45504			var time_hour = Math.floor(time_min / 60);
45505			var time_day  = Math.floor(time_hour / 24);
45506
45507			time_sec      = time_sec % 60;
45508			time_min      = time_min % 60;
45509
45510			if ( cfgOptimized ) {
45511				time_hour = time_hour % 24;
45512			} else if (typeof this.time_day_enabled !== 'undefined' && this.time_day_enabled) {
45513				time_hour = time_hour % 24;
45514			}
45515
45516			if (cfgOptimized) {
45517				if (time_hour == 23 && time_min == 59 && time_sec > 57) {
45518					if (time_day < 1) {
45519						jQuery(module + ' .module_content_discount_product').addClass('countdown_less_than_day');
45520					}
45521				}
45522				if(time_day < 1) {
45523					lessThanDay = true;
45524				}
45525			}
45526
45527			var string_sec;
45528			if (time_sec == 1) {
45529				string_sec = js_lang_time_seconds_1;
45530			} else if (2 <= time_sec && time_sec <= 4) {
45531				string_sec = js_lang_time_seconds_2_4;
45532			} else {
45533				string_sec = js_lang_time_seconds_more;
45534			}
45535
45536			var string_min;
45537			if (time_min == 1) {
45538				string_min = js_lang_time_minutes_1;
45539			} else if (2 <= time_min && time_min <= 4) {
45540				string_min = js_lang_time_minutes_2_4;
45541			} else {
45542				string_min = js_lang_time_minutes_more;
45543			}
45544
45545			var string_hod;
45546			if (time_hour == 1) {
45547				string_hod = js_lang_time_hours_1;
45548			} else if (2 <= time_hour && time_hour <= 4) {
45549				string_hod = js_lang_time_hours_2_4;
45550			} else {
45551				string_hod = js_lang_time_hours_more;
45552			}
45553			var string_day;
45554			if (time_day == 1) {
45555				string_day = js_lang_time_day_1;
45556			} else if (2 <= time_day && time_day <= 4) {
45557				string_day = js_lang_time_day_more;
45558			} else {
45559				string_day = js_lang_time_day_more;
45560			}
45561
45562			if (!cfgOptimized) {
45563				if (time_sec < 10) {
45564					time_sec = "0" + time_sec;
45565				}
45566				if (time_min < 10) {
45567					time_min = "0" + time_min;
45568				}
45569				if (time_hour < 10) {
45570					time_hour = "0" + time_hour;
45571				}
45572				if (time_day < 10) {
45573					time_day = "0" + time_day;
45574				}
45575			}
45576			if ( is_cs_user() && cfgOptimized) {
45577				var times = {
45578					's' : time_sec,
45579					'm' : time_min,
45580					'h' : time_hour,
45581					'd' : time_day,
45582					'st' : string_sec,
45583					'mt' : string_min,
45584					'ht' : string_hod,
45585					'dt' : string_day,
45586					'ctm' : (((time_end - time_now) / (time_end - time_start)) * 100).toFixed(2), // % celkoveho priebehu trhaku od zaciatko (pre day stroke)
45587					'mod_baner' : $elem
45588				}
45589
45590				this.changeDomTime(times);
45591			} else {
45592				var stroke_hod = time_hour * 4.1667;
45593				var stroke_min = time_min * 1.6667;
45594				var stroke_sec = time_sec * 1.6667;
45595
45596				// CAS
45597				var time_left = $elem.find('.time_left');
45598				if (typeof time_day_enabled !== 'undefined') {
45599					if (cfgOptimized) {
45600						var completed_time = (((time_end - time_now) / (time_end - time_start)) * 100).toFixed(2);
45601						this.change_time_value(time_left.find('.time_h'), time_day);
45602						this.change_time_value(time_left.find('.tip_h'), string_day);
45603						time_left.find('.day_wrapper circle').css('stroke-dasharray', +completed_time + ' 100');
45604					} else {
45605						stroke_hod     = time_hour * 4.16;
45606						var stroke_day = time_day * 4.16;
45607						this.change_time_value(time_left.find('.time_h'), time_day);
45608						this.change_time_value(time_left.find('.tip_h'), stroke_day);
45609						time_left.find('.day_wrapper circle').css('stroke-dasharray', +stroke_day + ' 100');
45610					}
45611				}
45612				this.change_time_value(time_left.find('.time_h'), time_hour);
45613				this.change_time_value(time_left.find('.tip_h'), string_hod);
45614				time_left.find('.hour_wrapper circle').css('stroke-dasharray', +stroke_hod + ' 100');
45615				this.change_time_value(time_left.find('.time_m'), time_min);
45616				this.change_time_value(time_left.find('.tip_m'), string_min);
45617				time_left.find('.min_wrapper circle').css('stroke-dasharray', +stroke_min + ' 100');
45618				if(cfgOptimized) {
45619					if(lessThanDay){
45620						this.change_time_value(time_left.find('.time_s'), time_sec);
45621						this.change_time_value(time_left.find('.tip_s'), string_sec);
45622						time_left.find('.sec_wrapper circle').css('stroke-dasharray', +stroke_sec + ' 100');
45623					}
45624				} else {
45625					this.change_time_value(time_left.find('.time_s'), time_sec);
45626					this.change_time_value(time_left.find('.tip_s'), string_sec);
45627					time_left.find('.sec_wrapper circle').css('stroke-dasharray', +stroke_sec + ' 100');
45628				}
45629			}
45630		}
45631	};
45632	/**
45633	 *
45634	 * @param times {Object}
45635	 */
45636	ModDiscount.prototype.changeDomTime = function (times) {
45637		var time_left = times.mod_baner.find('.time_left');
45638
45639		if (times.s == 59) {
45640			if (times.m == 59) {
45641				if(times.h == 23) {
45642					this.change_time_value(time_left.find('.time_d'), times.d);
45643					this.change_time_value(time_left.find('.tip_d'), times.dt);
45644					time_left.find('.day_wrapper circle').css('stroke-dasharray', + times.ctm + ' 100');
45645				}
45646				this.change_time_value(time_left.find('.time_h'), times.h);
45647				this.change_time_value(time_left.find('.tip_h'), times.ht);
45648				time_left.find('.hour_wrapper circle').css('stroke-dasharray', + (times.h * 4.1667) + ' 100');
45649			}
45650			this.change_time_value(time_left.find('.time_m'), times.m);
45651			this.change_time_value(time_left.find('.tip_m'), times.mt);
45652			time_left.find('.min_wrapper circle').css('stroke-dasharray',+ (times.m * 1.6667) +' 100');
45653		}
45654
45655		if (times.d < 1) {
45656			this.change_time_value(time_left.find('.time_s'), times.s);
45657			this.change_time_value(time_left.find('.tip_s'), times.st);
45658			time_left.find('.sec_wrapper circle').css('stroke-dasharray', + (times.s * 1.6667) + ' 100');
45659		}
45660	};
45661	/**
45662	 *
45663	 * @param elem {jQuery}
45664	 * @param value {Number}
45665	 * @returns {boolean}
45666	 */
45667	ModDiscount.prototype.change_time_value = function (elem, value) {
45668		if (elem.html() == value) {
45669			return false;
45670		}
45671		elem.html(value);
45672	};
45673	/**
45674	 * Binduje datepicker eventy v sekcii Obsah
45675	 */
45676	ModDiscount.prototype.bindEvents = function () {
45677		var $body = jQuery("body");
45678		$body.on("mousedown", ".tip-yellow input[name=start_date], .tip-yellow input[name=end_date]", function () {
45679			jQuery(this).datepicker(
45680				{
45681					dateFormat : 'yy-mm-dd',
45682					changeMonth: true,
45683					changeYear : true,
45684					onSelect   : function () {
45685						jQuery(this).trigger("focusout");
45686					},
45687					beforeShow : function (input, inst) {
45688						jQuery(inst.dpDiv).addClass("material_design");
45689					}
45690				});
45691		});
45692		$body.on("mousedown", ".tip-yellow input[name=start_date_d], .tip-yellow input[name=end_date_d]", function () {
45693			jQuery(this).timepicker(
45694				{
45695					showLeadingZero : false,
45696					showPeriodLabels: false, // AM / PM label
45697					hourText        : js_lang_time_hours_1,
45698					minuteText      : js_lang_time_minutes_1,
45699					showNowButton   : true,
45700					nowButtonText   : "Teraz"
45701				});
45702		});
45703	};
45704	/**
45705	 *
45706	 * @param id {Number} - ID modulu
45707	 * @param options {Object} - objekt moznych nastaveni
45708	 * @returns {jQuery}
45709	 */
45710	jQuery.fn.initModuleDiscount = function (id, options) {
45711		if (!id) {
45712			throw new Error('ID modulu nebolo setnuté!');
45713		}
45714		$elem       = this;
45715		selector    = options.selector;
45716		modDiscount = new ModDiscount(id, options);
45717		if (1) {
45718			// ak admin_view_design === 1, tak sme v designe
45719			if (weAreInSectionDesign) {
45720				// ak nie je nastaveny datum a cas alebo akcia uz prebehla,
45721				// tak nezavolame funkciu how_many_sec, kedze zbytocne blokuje hlavne vlakno v browseri
45722				if (!$elem.find('.module_content_discount_product').length) {
45723					return this;
45724				}
45725				var $discountSwitch = $elem.find('.discount_switch');
45726				// ak discount_switch element existuje a je viditelny, tak funkciu how_many_sec zavolame az na hover
45727				if ($discountSwitch.length && $discountSwitch.is(':visible')) {
45728					$discountSwitch
45729						.on('mouseenter', function () {
45730							modDiscount.how_many_sec();
45731						})
45732						.on('mouseleave', function () {
45733							$discountSwitch.off();
45734						});
45735				} else {
45736					modDiscount.how_many_sec();
45737				}
45738				// ak admin_view_design === 0, tak sme v obsahu
45739			} else {
45740				modDiscount.bindEvents();
45741			}
45742		} else {
45743			// ak admin_view_design === 1, tak sme v designe
45744			if (weAreInSectionDesign) {
45745				modDiscount.how_many_sec();
45746				// ak admin_view_design === 0, tak sme v obsahu
45747			} else {
45748				modDiscount.bindEvents();
45749			}
45750		}
45751		return this;
45752	};
45753})(jQuery, admin_view_design);
45754
45755window.addEventListener('DOMContentLoaded', function () {
45756	if (typeof script_manage_params !== 'undefined' && script_manage_params) {
45757		for (var prop in script_manage_params) {
45758			if (script_manage_params.hasOwnProperty(prop) && prop.indexOf('mod_disc') !== -1) {
45759				var moduleId       = script_manage_params[prop].id;
45760				var moduleSelector = '.discount_module.mp_id' + moduleId;
45761				// tu sa inicializuju discount moduly
45762				jQuery(moduleSelector).initModuleDiscount(moduleId, {
45763					selector   : moduleSelector,
45764					productType: script_manage_params[prop].prod_type,
45765					endTime    : script_manage_params[prop].end_time,
45766					startTime  : script_manage_params[prop].start_time,
45767					opt        : script_manage_params[prop].optimalization
45768				});
45769			}
45770		}
45771	}
45772});
45773
45774/* ========================================
45775 FILE: /modules/js/mod_vm_product_watch.js
45776 ==================== */
45777
45778jQuery(function () {
45779	var product_watch_unfollow_key = location.search.split('unfollow_watched_product=')[1];
45780	if (typeof product_watch_unfollow_key != 'undefined') {
45781		showLoader();
45782		new AjaxRequest({'unfollow_key': product_watch_unfollow_key})
45783			.setController("User")
45784			.setAction('unfollowWatchedProduct')
45785			.onSuccess(function (jsonData) {
45786				hideLoader();
45787				if (jsonData.data.success === 1) {
45788					var vexText = js_lang_product_watch_unfollow_confirm_msg || 'Boli ste úspešne odhlásený zo sledovania produktu';
45789
45790					vex.dialog.open({
45791						className: 'vex-cs watchdog-vex',
45792						message: '',
45793						input: vexText,
45794						buttons: [jQuery.extend({}, vex.dialog.buttons.YES)],
45795						afterClose: function () {
45796							if ( typeof script_manage_params_ismyid !== 'undefined' && script_manage_params_ismyid) {
45797								window.location = js_global_live_site + '/sprava-uctu/';
45798							} else {
45799								window.location = js_global_live_site;
45800							}
45801						}
45802					});
45803				} else {
45804					alert(js_lang_product_watch_unfollow_error_msg);
45805				}
45806			})
45807			.send();
45808	}
45809});
45810
45811/* ========================================
45812 FILE: /includes/js/system/Modal.js
45813 ==================== */
45814
45815/**
45816 * Modal Class
45817 *
45818 * @author TL
45819 * @type {CsModal}
45820 */
45821var CsModal = (
45822	/**
45823	 *
45824	 * @param modalPlugin {object}
45825	 * @returns {Modal}
45826	 */
45827	function(modalPlugin) {
45828		'use strict';
45829
45830		/**
45831		 * Plugin
45832		 * @type {vex}
45833		 */
45834		var PLUGIN = modalPlugin;
45835
45836		/**
45837		 * Default class for all modal windows
45838		 * @type {string}
45839		 */
45840		var MODAL_DEFAULT_CLASSNAME = 'cs_modal';
45841
45842		/**
45843		 * Default class for overlay element
45844		 * @type {string}
45845		 */
45846		var MODAL_OVERLAY_CLASSNAME = 'cs_modal_overlay';
45847
45848		/**
45849		 * Default class for heading element
45850		 * @type {string}
45851		 */
45852		var MODAL_HEADING_CLASSNAME = 'cs_modal_heading';
45853
45854		/**
45855		 * Default class for content element
45856		 * @type {string}
45857		 */
45858		var MODAL_CONTENT_CLASSNAME = 'cs_modal_content';
45859
45860		/**
45861		 * Default class for content inner element
45862		 * @type {string}
45863		 */
45864		var MODAL_CONTENT_INNER_CLASSNAME = 'cs_modal_content_inner';
45865
45866		/**
45867		 * Default class for actions container element
45868		 * @type {string}
45869		 */
45870		var MODAL_ACTIONS_CLASSNAME = 'cs_modal_actions';
45871
45872		/**
45873		 * Default class for close button
45874		 * @type {string}
45875		 */
45876		var MODAL_CLOSE_CLASSNAME = 'cs_modal_close';
45877
45878		/**
45879		 * Default class for cancel button
45880		 * @type {string}
45881		 */
45882		var MODAL_CANCEL_CLASSNAME = 'close_button';
45883
45884		/**
45885		 * Default class for cancel button
45886		 * @type {string}
45887		 */
45888		var MODAL_SUBMIT_CLASSNAME = 'submit_button';
45889
45890		/**
45891		 * Allowed types [info, warning, error, confirm, prompt]
45892		 * @type {object}
45893		 */
45894		var ALLOWED_TYPES = {
45895			info: 'info',
45896			warning: 'warning',
45897			error: 'error',
45898			confirm: 'confirm',
45899			prompt: 'prompt'
45900		};
45901
45902		var listOfCsModals = new WeakMap();
45903
45904		/**
45905		 *
45906		 * @constructor
45907		 */
45908		function Modal() {
45909			this.plugin = PLUGIN;
45910			this.id = 0;
45911			this.modal = null;
45912			this.hideEmptyContent = false;
45913			this.options = {
45914				type: 'alert',
45915				className: MODAL_DEFAULT_CLASSNAME,
45916				overlayClassName: MODAL_OVERLAY_CLASSNAME,
45917				contentClassName: MODAL_CONTENT_CLASSNAME,
45918				actionsClassName: MODAL_ACTIONS_CLASSNAME,
45919				closeClassName: MODAL_CLOSE_CLASSNAME,
45920				message: ''
45921			};
45922			this.passDataToOnSubmit = false; /* TODO neskor dat na true */
45923
45924			return this;
45925		}
45926
45927		/**
45928		 * Sets type of modal window (info, warning, error, confirm, prompt)
45929		 *
45930		 * @param type {string}
45931		 * @returns {Modal}
45932		 */
45933		Modal.prototype.setType = function(type) {
45934			if ( !_isString(type) ) {
45935				throw new TypeError('Argument must be a String');
45936			}
45937
45938			if ( !_isAllowedType(type) ) {
45939				throw new Error('This type is not allowed');
45940			}
45941
45942			switch (type) {
45943				case 'info':
45944				case 'warning':
45945				case 'error':
45946					this.options.type = 'alert';
45947					break;
45948				default:
45949					this.options.type = type;
45950					break;
45951			}
45952
45953			this.setClassName('type_' + type);
45954
45955			return this;
45956		};
45957
45958		Modal.prototype.removeClass = function(className) {
45959			if ( !_isString(className) ) {
45960				throw new TypeError('Argument must be a String');
45961			}
45962
45963			if ( _isModalInitialized(this.id) ) {
45964				this.modal.removeClass(className);
45965			} else {
45966				throw new TypeError('removeClass should not be called on init');
45967			}
45968
45969			return this;
45970		};
45971
45972		/**
45973		 * Sets classes for modal window
45974		 *
45975		 * @param className {string}
45976		 * @returns {Modal}
45977		 */
45978		Modal.prototype.setClassName = function(className) {
45979			if ( !_isString(className) ) {
45980				throw new TypeError('Argument must be a String');
45981			}
45982
45983			if ( _isModalInitialized(this.id) ) {
45984				this.modal.addClass(className);
45985			} else {
45986				this.options.className = this.options.className + ' ' + className;
45987			}
45988
45989			return this;
45990		};
45991
45992		/**
45993		 * Sets classes for modal content element
45994		 *
45995		 * @param className {string}
45996		 * @returns {Modal}
45997		 */
45998		Modal.prototype.setContentClassName = function(className) {
45999			if ( !_isString(className) ) {
46000				throw new TypeError('Argument must be a String');
46001			}
46002
46003			if ( _isModalInitialized(this.id) ) {
46004				this.modal.find('.' + MODAL_CONTENT_CLASSNAME).addClass(className);
46005			} else {
46006				this.options.contentClassName = this.options.contentClassName + ' ' + className;
46007			}
46008
46009			return this;
46010		};
46011
46012		/**
46013		 * Sets classes for modal actions container element
46014		 *
46015		 * @param className
46016		 * @returns {Modal}
46017		 */
46018		Modal.prototype.setActionsClassName = function (className) {
46019			if ( !_isString(className) ) {
46020				throw new TypeError('Argument must be a String');
46021			}
46022
46023			if ( _isModalInitialized(this.id) ) {
46024				this.modal.find('.' + MODAL_ACTIONS_CLASSNAME).addClass(className);
46025			} else {
46026				this.options.actionsClassName = this.options.actionsClassName + ' ' + className;
46027			}
46028
46029			return this;
46030		};
46031
46032		/**
46033		 * Sets icon of modal window
46034		 *
46035		 * @param icon {string}
46036		 * @returns {Modal}
46037		 */
46038		Modal.prototype.setIcon = function(icon) {
46039			if ( !_isString(icon) ) {
46040				throw new TypeError('Argument must be a String');
46041			}
46042
46043			if ( _isModalInitialized(this.id) ) {
46044				// TODO
46045				//this.modal.find('.' + MODAL_CONTENT_CLASSNAME).addClass(className);
46046			} else {
46047				this.options.icon = icon;
46048			}
46049
46050			return this;
46051		};
46052		/**
46053		 * Sets title of modal window
46054		 *
46055		 * @param title {string}
46056		 * @returns {Modal}
46057		 */
46058		Modal.prototype.setTitle = function(title) {
46059			if ( !_isString(title) ) {
46060				throw new TypeError('Argument must be a String');
46061			}
46062
46063			if ( _isModalInitialized(this.id) ) {
46064				this.modal.find('.' + MODAL_HEADING_CLASSNAME + ' .title').addClass(title);
46065			} else {
46066				this.options.message = title;
46067			}
46068
46069			return this;
46070		};
46071
46072		/**
46073		 * Sets subtitle of modal window
46074		 *
46075		 * @param subtitle {string}
46076		 * @returns {Modal}
46077		 */
46078		Modal.prototype.setSubtitle = function(subtitle) {
46079			if ( !_isString(subtitle) ) {
46080				throw new TypeError('Argument must be a String');
46081			}
46082
46083			if ( _isModalInitialized(this.id) ) {
46084				this.modal.find('.' + MODAL_HEADING_CLASSNAME + ' .subtitle').addClass(subtitle);
46085			} else {
46086				this.options.subtitle = subtitle;
46087			}
46088
46089			return this;
46090		};
46091
46092		/**
46093		 * Sets content of modal window
46094		 *
46095		 * @param content {string}
46096		 * @returns {Modal}
46097		 */
46098		Modal.prototype.setContent = function(content) {
46099			if ( !_isString(content) ) {
46100				throw new TypeError('Argument must be a String');
46101			}
46102
46103			if ( _isModalInitialized(this.id) ) {
46104				this.modal.find('.' + MODAL_CONTENT_INNER_CLASSNAME).html(content);
46105
46106				if (typeof this.options.afterSetContentFn === 'function' ) { // nahradit za _isFunction(this.options.afterSetContentFn) ?
46107					this.options.afterSetContentFn(this.modal);
46108				}
46109
46110			} else {
46111				this.options.input = content;
46112			}
46113
46114			return this;
46115		};
46116
46117		Modal.prototype.afterSetContent = function (fn) {
46118			if ( !_isFunction(fn) ) {
46119				throw new TypeError('Argument must be a Function');
46120			}
46121
46122			this.options.afterSetContentFn = fn;
46123
46124			return this;
46125		};
46126
46127		/**
46128		 * Sets langs/texts for modal buttons
46129		 *
46130		 * @param buttons {string[]}
46131		 * @returns {Modal}
46132		 */
46133		Modal.prototype.setButtonTexts = function(buttons) {
46134			if ( !_isArray(buttons) ) {
46135				throw new TypeError('Argument must be an Array');
46136			}
46137
46138			this.options.buttons = buttons;
46139
46140			return this;
46141		};
46142
46143		/**
46144		 * Sets custom buttons for modal window as a html string
46145		 *
46146		 * @param buttons {string}
46147		 * @returns {Modal}
46148		 */
46149		Modal.prototype.setButtons = function(buttons) {
46150			if ( !_isString(buttons) ) {
46151				throw new TypeError('Argument must be a HTML string');
46152			}
46153
46154			this.options.buttons = buttons;
46155
46156			return this;
46157		};
46158
46159		/**
46160		 * Sets initial value for prompt modal
46161		 *
46162		 * @param value {string}
46163		 * @returns {Modal}
46164		 */
46165		Modal.prototype.setPromptValue = function(value) {
46166			if ( !_isString(value) ) {
46167				throw new TypeError('Argument must be a String');
46168			}
46169
46170			this.options.value = value;
46171
46172			return this;
46173		};
46174
46175		/**
46176		 * Sets placeholder value for prompt modal
46177		 *
46178		 * @param placeholder {string}
46179		 * @returns {Modal}
46180		 */
46181		Modal.prototype.setPromptPlaceholder = function(placeholder) {
46182			if ( !_isString(placeholder) ) {
46183				throw new TypeError('Argument must be a String');
46184			}
46185
46186			this.options.placeholder = placeholder;
46187
46188			return this;
46189		};
46190
46191		/**
46192		 * Shows close button
46193		 *
46194		 * @param bool {boolean}
46195		 * @returns {Modal}
46196		 */
46197		Modal.prototype.hideCloseButton = function(bool) {
46198			var hideBtn = bool;
46199
46200			if ( typeof hideBtn === 'undefined' ) {
46201				hideBtn = true;
46202			}
46203
46204			if ( !_isBool(hideBtn) ) {
46205				throw new TypeError('Argument must be a Boolean');
46206			}
46207
46208			this.options.showCloseButton = !hideBtn;
46209
46210			return this;
46211		};
46212
46213		/**
46214		 * Hides empty content or title
46215		 *
46216		 * @param bool {boolean}
46217		 * @returns {Modal}
46218		 */
46219		Modal.prototype.hideEmptySpace = function(bool) {
46220			var hideEmptySpace = bool;
46221
46222			if ( typeof hideEmptySpace === 'undefined' ) {
46223				hideEmptySpace = true;
46224			}
46225
46226			if ( !_isBool(hideEmptySpace) ) {
46227				throw new TypeError('Argument must be a Boolean');
46228			}
46229
46230			this.hideEmptyContent = hideEmptySpace;
46231
46232			return this;
46233		};
46234
46235		/**
46236		 * Disables pressing escape key to close modal
46237		 *
46238		 * @param bool {boolean}
46239		 * @returns {Modal}
46240		 */
46241		Modal.prototype.disableEscapeKey = function(bool) {
46242			var disableEscape = bool;
46243
46244			if ( typeof disableEscape === 'undefined' ) {
46245				disableEscape = true;
46246			}
46247
46248			if ( !_isBool(disableEscape) ) {
46249				throw new TypeError('Argument must be a Boolean');
46250			}
46251
46252			this.options.escapeButtonCloses = !disableEscape;
46253
46254			return this;
46255		};
46256
46257		/**
46258		 * Disables clicking on overlay/backdrop to close modal
46259		 *
46260		 * @param bool {boolean}
46261		 * @returns {Modal}
46262		 */
46263		Modal.prototype.disableClickOnOverlay = function(bool) {
46264			var disableClickOnOverlay = bool;
46265
46266			if ( typeof disableClickOnOverlay === 'undefined' ) {
46267				disableClickOnOverlay = true;
46268			}
46269
46270			if ( !_isBool(disableClickOnOverlay) ) {
46271				throw new TypeError('Argument must be a Boolean');
46272			}
46273
46274			this.options.overlayClosesOnClick = !disableClickOnOverlay;
46275
46276			return this;
46277		};
46278
46279		/**
46280		 * @callback callbackFunction
46281		 */
46282
46283		/**
46284		 * Sets callback function that is called after opening the modal
46285		 *
46286		 * @param fn {callbackFunction}
46287		 * @returns {Modal}
46288		 */
46289		Modal.prototype.afterOpen = function(fn) {
46290			if ( !_isFunction(fn) ) {
46291				throw new TypeError('Argument must be a Function');
46292			}
46293
46294			this.options.afterOpen = fn;
46295
46296			return this;
46297		};
46298
46299		/**
46300		 * Sets callback function that is called before closing the modal, but after callback function is called
46301		 *
46302		 * @param fn {callbackFunction}
46303		 * @returns {Modal}
46304		 */
46305		Modal.prototype.beforeClose = function(fn) {
46306			if ( !_isFunction(fn) ) {
46307				throw new TypeError('Argument must be a Function');
46308			}
46309
46310			this.options.beforeClose = fn;
46311
46312			return this;
46313		};
46314
46315		/**
46316		 * Sets callback function that is called after closing the modal
46317		 *
46318		 * @param fn {callbackFunction}
46319		 * @returns {Modal}
46320		 */
46321		Modal.prototype.afterClose = function(fn) {
46322			if ( !_isFunction(fn) ) {
46323				throw new TypeError('Argument must be a Function');
46324			}
46325
46326			this.options.afterClose = fn;
46327
46328			return this;
46329		};
46330
46331		/**
46332		 * Sets callback function that is called on submitting the modal
46333		 *
46334		 * @param fn {callbackFunction}
46335		 * @returns {Modal}
46336		 */
46337		Modal.prototype.onSubmit = function(fn) {
46338			if ( !_isFunction(fn) ) {
46339				throw new TypeError('Argument must be a Function');
46340			}
46341
46342			this.options.onSubmit = fn;
46343
46344			return this;
46345		};
46346
46347		Modal.prototype.setPassDataToOnSubmit = function (value) {
46348			if ( !_isBool(value) ) {
46349				throw new TypeError('Argument must be a Boolean');
46350			}
46351
46352			this.options.passDataToOnSubmit = value;
46353
46354			return this;
46355		}
46356
46357		/**
46358		 * Opens modal window
46359		 *
46360		 * @returns {Modal}
46361		 */
46362		Modal.prototype.open = function() {
46363			var $this = this;
46363 // nemozeme pouzit () => {} takze preto a krajsie ako jQuery.proxy
46364			//this.id = this.plugin.dialog[this.options.type](this.options).data('vex').id;
46365			if (this.hideEmptyContent) {
46366				if (typeof this.options.input === 'undefined' || this.options.input === '') {
46367					this.options.className += ' empty_body';
46368				} else if (typeof this.options.message === 'undefined' || this.options.message === '') {
46369					this.options.className += ' empty_header';
46370				}
46371			}
46372			this.options = _setHtml(this.options);
46373			var modalContentElem = this.plugin.open(this.options);
46374			this.id = modalContentElem.data('vex').id;
46375			this.modal = modalContentElem.closest('.' + MODAL_DEFAULT_CLASSNAME);
46376
46377
46378			this.options.node = this.modal;
46379			this.options.close = function () {
46380				$this.plugin.close($this.id);
46381			};
46382
46383			_bindEvents(this);
46384
46385			listOfCsModals.set(this.modal[0], this);
46386			return this;
46387		};
46388
46389		/**
46390		 * Closes modal window
46391		 *
46392		 * @returns {Modal}
46393		 */
46394		Modal.prototype.close = function() {
46395			if (this.id === 0) {
46396				return this;
46397			}
46398
46399			this.plugin.close(this.id);
46400			if (listOfCsModals.has(this.modal[0])) {
46401				listOfCsModals.delete(this.modal[0]);
46402			}
46403
46404			return this;
46405		};
46406
46407		Modal.prototype.getInstance = function(elem) {
46408			return listOfCsModals.get(jQuery(elem)[0]);
46409		};
46410
46411		/*****************************
46412		 * Private functions
46413		 *****************************/
46414
46415		/**
46416		 * Sets modal's html content
46417		 *
46418		 * @param options
46419		 * @returns {*}
46420		 * @private
46421		 */
46422		function _setHtml(options) {
46423
46424			var modalHeading = _getModalHeading(options);
46425
46426			var modalContent = _getModalContent(options);
46427
46428			var buttons = _getModalButtons(options);
46429
46430			var html = [
46431				modalHeading,
46432				modalContent,
46433				buttons
46434			].join('');
46435
46436			return Object.assign({}, options, {
46437				content: html
46438			});
46439		}
46440
46441		/**
46442		 * Gets modal's heading
46443		 *
46444		 * @param options
46445		 * @returns {string}
46446		 * @private
46447		 */
46448		function _getModalHeading(options) {
46449			return [
46450				'<div class="' + MODAL_HEADING_CLASSNAME + ( options.icon ? ' has_icon' : '' ) +'">',
46451				options.icon ? '<div class="icon cs_icon ' + options.icon + '"></div>' : '',
46452				'<div class="title"><span>' + (options.message ? options.message : '') + '</span></div>',
46453				'<div class="subtitle"><span>' + (options.subtitle ? options.subtitle : '') + '</span></div>',
46454				'</div>'
46455			].join('');
46456		}
46457
46458		/**
46459		 * Gets modal's content
46460		 *
46461		 * @param options
46462		 * @returns {string}
46463		 * @private
46464		 */
46465		function _getModalContent(options) {
46466			var promptInput = '<input class="inputbox" type="text"' + (options.placeholder ? ' placeholder="' + options.placeholder + '"' : '') + (options.value ? ' value="' + options.value + '"' : '') + '>';
46467
46468			return [
46469				'<div class="' + MODAL_CONTENT_INNER_CLASSNAME + '">',
46470				options.input ? options.input : '',
46471				(options.type === 'prompt' ? promptInput : ''),
46472				'</div>'
46473			].join('');
46474		}
46475
46476		/**
46477		 * Gets modal's buttons
46478		 *
46479		 * @param options
46480		 * @returns {string}
46481		 * @private
46482		 */
46483		function _getModalButtons(options) {
46484			var buttons;
46485
46486			if ( _isString(options.buttons) ) {
46487				return '<div class="' + (_isString(options.actionsClassName) ? options.actionsClassName : MODAL_ACTIONS_CLASSNAME) + '">' + options.buttons + '</div>'; //
46488			}
46489
46490			if ( options.type === 'alert' ) {
46491				var closeBtn = _isArray(options.buttons) && _isString(options.buttons[0]) ? options.buttons[0] : cms_js_lang_close;
46492
46493				buttons = '<div class="' + (_isString(options.actionsClassName) ? options.actionsClassName : MODAL_ACTIONS_CLASSNAME) + '"><button class="' + MODAL_CANCEL_CLASSNAME + '">' + closeBtn + '</button></div>';
46494			} else {
46495				var cancelBtn = _isArray(options.buttons) && _isString(options.buttons[0]) ? options.buttons[0] : 'Cancel';
46496				var confirmBtn = _isArray(options.buttons) && _isString(options.buttons[1]) ? options.buttons[1] : 'OK';
46497
46498				buttons = [
46499					'<div class="' + (_isString(options.actionsClassName) ? options.actionsClassName : MODAL_ACTIONS_CLASSNAME) + '">',
46500					'<button class="' + MODAL_CANCEL_CLASSNAME + '">' + cancelBtn + '</button>',
46501					'<button class="button ' + MODAL_SUBMIT_CLASSNAME + '">' + confirmBtn + '</button>',
46502					'</div>'
46503
46504				].join('');
46505			}
46506
46507			return buttons;
46508		}
46509
46510		/**
46511		 * Binds events
46512		 *
46513		 * @param instance
46514		 * @private
46515		 */
46516		function _bindEvents(instance) {
46517			instance.modal.find('.' + MODAL_CANCEL_CLASSNAME).on('click', instance.plugin.close.bind(null, instance.id));
46518			instance.modal.find('.' + MODAL_SUBMIT_CLASSNAME).on('click', function() {
46519				if ( _isFunction(instance.options.onSubmit) ) {
46520					if (instance.options.passDataToOnSubmit) {
46521						instance.options.onSubmit(_getModalContentInputs(instance));
46522					} else {
46523						instance.options.onSubmit();
46524					}
46525				}
46526			});
46527		}
46528
46529		function _getModalContentInputs(instance) {
46530			// Collect all inputs/selects/textarea/... values
46531			let data = {};
46532			let jQueryContent = instance.modal.find('.' + MODAL_CONTENT_CLASSNAME);
46533
46534			// Find all relevant form controls inside the content
46535			const $fields = jQueryContent.find(':input').filter(function () {
46536				const type = this.type;
46537				// Skip disabled or unnamed controls and non-data buttons
46538				if (this.disabled || !this.name) return false;
46539				if (type === 'button' || type === 'submit' || type === 'reset') return false;
46540				// For radios/checkboxes only capture checked values
46541				if ((type === 'radio' || type === 'checkbox') && !this.checked) return false;
46542				return true;
46543			});
46544
46545			const parseName = (name) => {
46546				// "orderUserData[2025023][address_1]" -> ["orderUserData","2025023","address_1"]
46547				// "tags[]" -> ["tags", ""]
46548				return name.replace(/\]/g, '').split('[');
46549			};
46550
46551			// Only use arrays for explicit [] in the name. Numeric keys should be object keys.
46552			const ensureContainer = (parent, key, nextKey) => {
46553				const needsArray = nextKey === ''; // only when explicit "[]" is present
46554				if (!(key in parent)) {
46555					parent[key] = needsArray ? [] : {};
46556				} else {
46557					// Coerce to the expected container type if mismatched
46558					if (needsArray && !Array.isArray(parent[key])) parent[key] = [];
46559					if (!needsArray && Array.isArray(parent[key])) parent[key] = {};
46560				}
46561				return parent[key];
46562			};
46563
46564			const assignDeep = (target, path, value) => {
46565				let ctx = target;
46566
46567				for (let i = 0; i < path.length; i++) {
46568					const key = path[i];
46569					const isLast = i === path.length - 1;
46570
46571					// Handle push for explicit "[]" segments
46572					if (key === '') {
46573						if (!Array.isArray(ctx)) {
46574							// If current is not an array (malformed), convert to array as best effort
46575							const newArr = [];
46576							ctx = newArr;
46577						}
46578						if (isLast) {
46579							ctx.push(value);
46580							return;
46581						} else {
46582							const nextKey = path[i + 1];
46583							const container = (nextKey === '') ? [] : {};
46584							ctx.push(container);
46585							ctx = container;
46586							continue;
46587						}
46588					}
46589
46590					if (isLast) {
46591						// Final assignment
46592						if (key in ctx) {
46593							const existing = ctx[key];
46594							if (Array.isArray(existing)) {
46595								if (Array.isArray(value)) {
46596									ctx[key] = existing.concat(value);
46597								} else {
46598									existing.push(value);
46599								}
46600							} else {
46601								ctx[key] = Array.isArray(value) ? [existing].concat(value) : [existing, value];
46602							}
46603						} else {
46604							ctx[key] = value;
46605						}
46606					} else {
46607						// Traverse / create container based on the next segment
46608						const nextKey = path[i + 1];
46609						ctx = ensureContainer(ctx, key, nextKey);
46610					}
46611				}
46612			};
46613
46614			$fields.each(function () {
46615				const $el = jQuery(this);
46616				const name = this.name;
46617
46618				let value;
46619				// Handle multi-select as an array of values
46620				if (this.tagName.toLowerCase() === 'select' && this.multiple) {
46621					value = $el.val() || [];
46622				} else {
46623					value = $el.val();
46624				}
46625
46626				const path = parseName(name);
46627				assignDeep(data, path, value);
46628			});
46629
46630			return data;
46631		}
46632
46633
46634		/**
46635		 * Checks whether modal is already intialiazed or is being initialized
46636		 *
46637		 * @param id {number}
46638		 * @returns {boolean}
46639		 * @private
46640		 */
46641		function _isModalInitialized(id) {
46642			return id !== 0;
46643		}
46644
46645		/**
46646		 * Checks if param is boolean
46647		 *
46648		 * @param param
46649		 * @returns {boolean}
46650		 * @private
46651		 */
46652		function _isBool(param) {
46653			return typeof param === 'boolean';
46654		}
46655
46656		/**
46657		 * Checks if param is string
46658		 *
46659		 * @param param
46660		 * @returns {boolean}
46661		 * @private
46662		 */
46663		function _isString(param) {
46664			return typeof param === 'string';
46665		}
46666
46667		/**
46668		 * Checks if param is object
46669		 *
46670		 * @param param
46671		 * @returns {boolean}
46672		 * @private
46673		 */
46674		function _isObject(param) {
46675			return typeof param === 'object' && !Array.isArray(param);
46676		}
46677
46678		/**
46679		 * Checks if param is function
46680		 *
46681		 * @param param
46682		 * @returns {boolean}
46683		 * @private
46684		 */
46685		function _isFunction(param) {
46686			return typeof param === 'function';
46687		}
46688
46689		/**
46690		 * Checks if param is array
46691		 *
46692		 * @param param
46693		 * @returns {boolean}
46694		 * @private
46695		 */
46696		function _isArray(param) {
46697			return typeof param !== 'undefined' && Array.isArray(param);
46698		}
46699
46700		/**
46701		 * Checks if type is allowed
46702		 *
46703		 * @param type {string}
46704		 * @returns {boolean}
46705		 * @private
46706		 */
46707		function _isAllowedType(type) {
46708			return Object.values(ALLOWED_TYPES).indexOf(type) > -1;
46709		}
46710
46711		return Modal;
46712	}
46713)(vex);
46714
46715
46716/* ========================================
46717 FILE: /includes/js/imagePin.js
46718 ==================== */
46719
46720var ImagePin = function () {
46721	var $this = this;
46722	// Classes on which pins/edit are not going to be initialized. Can be applied on parent or img classes
46723	this.blacklist = [
46724		'.disable_pins',
46725		'.benefits',
46726		'.cart_ajax_container',
46727		'.comments_container',
46728		'.product_activeimages_image_div',
46729		'.wishlist_item_img',
46730		'.cs_product_item',
46731	];
46732
46733	// Override blacklist excluded classes through this list. This deletes classes from blacklist so be aware of parent classes.
46734	if(typeof js_CS_Config_image_pin_whitelist !== 'undefined') {
46735		this.whitelist = js_CS_Config_image_pin_whitelist;
46736	} else {
46737		this.whitelist = [];
46738	}
46739
46740	// Serves as template for saving
46741	// pinId -> refers to pin inside the admin vex
46742	// id -> refers to product id
46743	// x/y -> position on image
46744	// action -> 0: delete / 1: insert / 2: update
46745	this.templatePin = {
46746		'pinId' : '',
46747		'id' : '',
46748		'x': '',
46749		'y': '',
46750		'action': ''
46751	};
46752
46753	// Variabiles for edit vex.
46754	this.confirmedClose = false;
46755	this.deselectCounter = 1;
46756	this.editingMode = false;
46757	this.icon = '';
46758	this.langs = [];
46759	this.vexImg = '';
46760	this.title = '';
46761	this.loadedTitle = '';
46762	this.uniqueTitle = true;
46763	this.newImg = false;
46764	this.loadedPins = '';
46765	this.currentPins = [];
46766	this.newPin = JSON.parse(JSON.stringify(this.templatePin));
46767	this.pinsWrap = '<div class="pins_wrap"></div>';
46768	this.appendButton = '<div class="image_pin open_edit"></div>';
46769	this.deleteButton = '<span class="pin_delete"></span>';
46770	this.productInput = '';
46771	this.newPinHtml = '';
46772	this.loadPagePinsAjax = null;
46773
46774	jQuery(window).on('load', function () {
46775		$this.loadDefaultSettings();
46776	});
46777};
46778
46779ImagePin.prototype.loadFunctions = function () {
46780	var $this = this;
46781	if ( !is_admin() || (typeof admin_view_design !== 'undefined' && admin_view_design === 1) ) {
46782		jQuery('body').addClass('function_pin_enabled');
46783		$this.initPinitialization();
46784	} else if (typeof js_we_are_in_admin !== 'undefined') {
46785		$this.initAdminTable();
46786		$this.initCustomSelect();
46787	}
46788};
46789
46790ImagePin.prototype.loadDefaultSettings = function() {
46791	var $this = this;
46792	new AjaxRequest()
46793		.setController('ImagePin')
46794		.setAction('loadDefaultSettings')
46795		.onSuccess(function (res) {
46796			if(!res.data.success){
46797				console.log('check config syntax for icon');
46798			}
46799			$this.icon = res.data.icon;
46800			$this.langs = res.data.langs;
46801			$this.productInput = '<div class="new_info"><input name="product_auto" id="product_auto" type="text" placeholder="'+$this.langs.product_sku+'"><span class="cs_icon csi-search"></span></div>';
46802			$this.newPinHtml = '<div class="pin_wrap new_wrap"><div class="new_pin image_pin '+$this.icon+'"><span class="pin_delete" onclick="ImagePin.deletePin(\'.new_pin\')" title="'+ $this.langs.help_title_rpin +'"></span></div></div>';
46803			$this.loadFunctions();
46804		})
46805		.onError(function (res) {
46806			console.log(res);
46807		})
46808		.send();
46809};
46810
46811// Pun intended
46812ImagePin.prototype.initPinitialization = function () {
46813	var $this = this;
46814
46815	// accept only whitelist classes as pinnable content
46816	if ( typeof js_CS_Config_image_pin_only_whitelist !== 'undefined') {
46817		// prevents join() from not inserting delimiter on last class in list OR single item list
46818		if($this.whitelist.length){
46819			$this.whitelist.push('');
46820			var selector = ('('+$this.whitelist.join(' img,') + $this.whitelist.join(',')+')').replace(',)', ')');
46821			selector = selector.replace('(', '').replace(')', '');
46822			$this.activeImages = jQuery(selector);
46823		} else {
46824			$this.activeImages = [];
46825		}
46826	} else if ( $this.blacklist.length ) {
46827		if ( $this.whitelist.length ) {
46828
46829			// exclude whitelist classes
46830			this.blacklist.forEach(function(w) {
46831				if($this.whitelist.indexOf(w) != -1) {
46832					$this.blacklist.splice(w, 1);
46833				}
46834			});
46835		} else {
46836			$this.activeImages = [];
46837		}
46838
46839		// prevents join() from not inserting delimiter on last class in list OR single item list
46840		$this.blacklist.push('');
46841
46842		var selector = ('img:not(' + $this.blacklist.join(' img,') + $this.blacklist.join(',') +')').replace(',)', ')');
46843		$this.activeImages = jQuery(selector);
46844	} else {
46845		$this.activeImages = jQuery('img');
46846	}
46847
46848	// start Pinitialization
46849	if($this.activeImages.length) {
46850		$this.appendWrapper('');
46851		if (typeof js_CS_Config_pins_extras !== 'undefined') {
46852			$this.triggerOnDomChange();
46853		}
46854	}
46855};
46856ImagePin.prototype.loadPagePins = function (selectedImage){
46857	var $this = this;
46858
46859	var imgs = [];
46860
46861	// Zruší predchádzajúci request
46862	if (this.loadPagePinsAjax) {
46863		this.loadPagePinsAjax.abort();
46864	}
46865
46866	if(!selectedImage.length){
46867		$this.activeImages.each(function (index, item) {
46868			var element = jQuery(item);
46869
46870			if(element.is('img')){
46871				var img = element.attr('data-srcset');
46872
46873				if (typeof img === 'undefined') {
46874					img = element.attr('src');
46875				}
46876
46877				img = $this.cleanImageUrl(img);
46878
46879				if (typeof img !== 'undefined') {
46880					imgs.push(img);
46881				}
46882			}
46883		});
46884	} else {
46885		if (typeof selectedImage === 'object') { // uz je pole
46886			imgs = selectedImage;
46887		} else {
46888			imgs.push(selectedImage);
46889		}
46890	}
46891
46892	if (imgs.length) {
46893		this.loadPagePinsAjax = new AjaxRequest({imgs: imgs})
46894			.setController('ImagePin')
46895			.setAction('loadPagePins')
46896			.setMethod('POST')
46897			.ignoreDefault(true) // pri aborte ajaxov nutnost
46898			.onSuccess(function (res) {
46899				if(res.data.success){
46900					var pins = res.data.pins;
46901					var k;
46902					for( k in pins ) {
46903						if (pins[k].length) {
46904							var pinsWrap = jQuery('.pins_wrap[data-img="' + k + '"]');
46905							pins[k].forEach(function (value) {
46906								pinsWrap.append('<div class="visible_pin_wrap" style="top:' + value.y_axis + '%;left:' + value.x_axis + '%"><div class="visible_pin image_pin ' + $this.icon + '" data-id="' + value.product_id + '" data-top="' + value.y_axis + '" data-left="' + value.x_axis + '"></div></div>');
46907								var moduleParent = pinsWrap.closest('.module, .mp');
46908								if (moduleParent.length) {
46909									moduleParent.addClass('module_pin_enabled');
46910								}
46911							});
46912						}
46913					}
46914					if (typeof jQuery('.pins_info_body')[0] === 'undefined') {
46915						jQuery('body')
46916							.append('<div class="pins_info_body"></div>');
46917					}
46918					$this.bindHoverEffect();
46919				} else {
46920					if (res.data.message.length) {
46921						var message = res.data.message;
46922						if (message === 'error') {
46923							if (is_cs_user()) {
46924								console.log(res.data.error);
46925							}
46926						} else {
46927							if (is_cs_user()) {
46928								console.log(res.data.message);
46929							}
46930						}
46931					}
46932				}
46933			})
46934			.onError(function (res) {
46935				console.log(res);
46936			})
46937			.send();
46938	}
46939};
46940//Helper
46941ImagePin.prototype.getImgUrls = function (selectedImgs) {
46942	var imgs = [];
46943	var $this = this;
46944
46945	jQuery(selectedImgs).each(function (index,item){
46946		var element = jQuery(item);
46947
46948		if(element.is('img')){
46949			var img = element.attr('data-srcset');
46950
46951			if (typeof img === 'undefined') {
46952				img = element.attr('src');
46953			}
46954
46955			img = $this.cleanImageUrl(img);
46956
46957			if (typeof img !== 'undefined') {
46958				imgs.push(img);
46959			}
46960		}
46961	});
46962
46963	return imgs;
46964};
46965//Helper
46966ImagePin.prototype.cleanImageUrl = function (ImgUrl){
46967	var tmpUrl = ImgUrl;
46968
46969	tmpUrl = tmpUrl.replace(js_global_live_site, '');
46970	tmpUrl = tmpUrl.replace('https://'+js_global_main_domain, '');
46971	tmpUrl = tmpUrl.replace(/\.webp(.)*/, '');
46972	tmpUrl = tmpUrl.replace(/\?.*/, '');
46973
46974	return tmpUrl;
46975};
46976
46977ImagePin.prototype.appendWrapper = function (imgs) {
46978	var $this           = this;
46979	var admin           = is_admin();
46980	var foundNivoSlider = false;
46981	var appendToImgs    = null;
46982	var somethingAppended = false;
46983
46984	if (imgs.length) {
46985		appendToImgs = imgs;
46986	} else {
46987		appendToImgs = $this.activeImages;
46988	}
46989
46990	// get image cleared paths and append wrapper and edit button if admin
46991	jQuery(appendToImgs).each(function (index, item) {
46992		var element = jQuery(item);
46993		// skip already appended
46994		if (element.next().hasClass('pins_wrap')) {
46995			return true;
46996		}
46997		somethingAppended = true;
46998		if (element.is('img')) {
46999			var oldBlog        = element.closest('.blog_default, article').length;
47000			var newBlog        = element.closest('.contentpaneopen').length;
47001			var parents        = element.parents();
47002			var parentAssigned = false;
47003			var parentNeeded   = true;
47004			if ( is_cs_user('kc-14829') ) {
47005				var parent = element.parent();
47006				if(parent.is('a') && parent.css('position') !== 'relative' && !oldBlog && !newBlog){
47007					parent.css('position', 'relative');
47008				}
47009			} else {
47010				if (!oldBlog) {
47011					parents.each(function (index, item) {
47012						var parent = jQuery(item);
47013						if (parent.css('position') === 'relative') {
47014							if (parent.innerWidth() !== element.innerWidth() || parent.innerHeight() !== element.innerHeight()) {
47015								var parentClasses = 'imagepin_parent';
47016
47017								if (element.css('float') === 'left') {
47018									parentClasses += ' float_left';
47019								} else if (element.css('float') === 'right') {
47020									parentClasses += ' float_right';
47021								}
47022
47023								element.wrap('<span class="'+parentClasses+'"></span>');
47024								parentAssigned = true;
47025							} else {
47026								parentNeeded = false;
47027							}
47028							return false;
47029						} else {
47030							return true;
47031						}
47032					});
47033					if (parentNeeded && !parentAssigned) {
47034						element.wrap('<span class="imagepin_parent"></span>');
47035					}
47036				}
47037			}
47038			element.after($this.pinsWrap);
47039			var pinsWrap = element.next();
47040			var offPar;
47041			if (oldBlog) {
47042				offPar = element.position();
47043				pinsWrap.css({
47044					'top'   : offPar.top,
47045					'left'  : offPar.left,
47046					'width' : element.width(),
47047					'height': element.height()
47048				});
47049				if (element.css('margin').length) {
47050					pinsWrap.css({'margin': element.css('margin')});
47051				}
47052				if (element.css('float').length) {
47053					pinsWrap.css({'float': element.css('float')});
47054				}
47055				pinsWrap.addClass('absolute_position');
47056			} else if (newBlog) {
47057				pinsWrap.css({
47058					'width' : '100%',
47059					'height': '100%',
47060					'top'   : 0,
47061					'left'  : 0,
47062					'position': 'absolute'
47063				});
47064			}
47065
47066			var contentInfo = $this.getContentInfo(element);
47067			var imgUrl      = element.attr('data-srcset');
47068			var imgSrc      = element.attr('src');
47069			if (typeof imgUrl === 'undefined') {
47070				imgUrl = imgSrc;
47071			}
47072			if (typeof imgUrl !== 'undefined') {
47073				imgUrl = $this.cleanImageUrl(imgUrl);
47074			}
47075			pinsWrap.attr('data-img', imgUrl);
47076			if (contentInfo.type === 'nivo_slider') {
47077				foundNivoSlider = true;
47078			}
47079			if (admin) {
47080				var editButton = jQuery($this.appendButton);
47081				editButton
47082					.attr('data-img', imgUrl)
47083					.attr('data-content-type', contentInfo.type)
47084					.attr('data-content-id', contentInfo.id);
47085				element.next('.pins_wrap').append(editButton);
47086			}
47087		}
47088	});
47089
47090	if (!somethingAppended) {
47091		return;
47092	}
47093
47094	jQuery('.open_edit').off('click');
47095	// TODO presunut inam
47096	if (foundNivoSlider) {
47097		$this.NivoSliderChangeLayers();
47098	}
47099
47100	// bind listener to open edit vex
47101	jQuery('.open_edit').on('click', function (e) {
47102		e.preventDefault();
47103		$this.openEditVex(jQuery(this));
47104	});
47105
47106	imgs.length ? $this.loadPagePins($this.getImgUrls(appendToImgs)) : $this.loadPagePins('');
47107};
47108ImagePin.prototype.NivoSliderChangeLayers = function () {
47109	var $this    = this;
47110	var elements = document.querySelectorAll(".module_nivo_slider .nivo-main-image");
47111	var observer = new MutationObserver(function (mutations) {
47112		mutations.forEach(function (mutation) {
47113			if (mutation.type === "attributes") {
47114				if (mutation.attributeName === 'src') {
47115					var targetedElement = jQuery(mutation.target);
47116					var targetImg = $this.cleanImageUrl(targetedElement.attr('src'));
47117					var parentWrap = targetedElement.parent();
47118					parentWrap.find('.pins_wrap .open_edit:not(.open_edit[data-img="' + targetImg+'"])').parent().addClass('hidden_pins_wrap');
47119					parentWrap.find('.pins_wrap .open_edit[data-img="'+targetImg+'"]').parent().removeClass('hidden_pins_wrap');
47120				}
47121			}
47122		});
47123	});
47124
47125	elements.forEach(function (item){
47126		var jItem = jQuery(item);
47127		var img = $this.cleanImageUrl(jItem.attr('src'));
47128		if (jItem.next().hasClass('pins_wrap')) {
47129			jItem.next().remove();
47130		}
47131		jQuery('.module_nivo_slider .pins_wrap .open_edit:not(.open_edit[data-img="'+img+'"])').parent().addClass('hidden_pins_wrap');
47132
47133		observer.observe(item, {
47134			attributes: true
47135		});
47136	});
47137};
47138
47139ImagePin.prototype.triggerOnDomChange = function () {
47140	// Custom funkcie doplnat do ifov pre observer
47141	var $this    = this;
47142	var observer = new MutationObserver(function (mutations) {
47143		mutations.forEach(function (mutation) {
47144			if (mutation.type === "childList") {
47145				let nodes = jQuery(mutation.addedNodes);
47146
47147				if (nodes.hasClass('fancybox-container')) {
47148					let imageNodes = nodes.find('.fancybox-slide--current img');
47149
47150					if (imageNodes.length) {
47151						$this.appendWrapper(imageNodes);
47152						observer.observe(document.querySelector('.fancybox-stage'), {
47153							childList: true,
47154							subtree: true,
47155							attributes: false,
47156							characterData: false
47157						});
47158					}
47159				}
47160
47161				let targetNodes = jQuery(mutation.target).find('.fancybox-slide--current img');
47162				if (targetNodes.length) {
47163					$this.appendWrapper(targetNodes);
47164				}
47165			}
47166		});
47167	});
47168
47169	// do extras pridat pod cfg na spustenie observera
47170	if (typeof js_CS_Config_pins_extras.openedFancybox !== 'undefined') {
47171
47172		observer.observe(document.body, {
47173			childList: true,
47174			subtree: false,
47175			attributes: false,
47176			characterData: false
47177		});
47178	}
47179};
47180
47181ImagePin.prototype.getContentInfo = function (elem) {
47182	var id = '';
47183
47184	// clanky
47185	var tmpEl = elem.closest('.article_container, .blog_default');
47186	if(tmpEl.length){
47187		id = elem.closest('.blog_default').parent().find('input[name=article_id]').val();
47188		if(typeof id === 'undefined'){
47189			id = elem.closest('.article_container').attr('data-article_id');
47190		}
47191
47192		if(typeof id === 'undefined' || !id.length){
47193			id = '-1';
47194		}
47195		return {
47196			'type' : 'article',
47197			'id' : id
47198		};
47199	}
47200	// sudo-slider
47201	if(elem.hasClass('sudo_image')){
47202		// id -1 znamena ze sa nepodarilo najst id
47203
47204		if(typeof elem.closest('.sudo_slide').attr('data-slide') !== 'undefined'){
47205
47206			if(typeof id === 'undefined' || !id.length){
47207				id = '-1';
47208			}
47209			return {
47210				'type' : 'sudo_slider',
47211				'id' : elem.closest('.sudo_slide').attr('data-slide')
47212			};
47213		} else {
47214			var classList = jQuery(elem).closest('.sudo_slide').attr('class').split(/\s+/);
47215			var idClass;
47216
47217			classList.forEach(function(itemClass){
47218				if(itemClass.indexOf('slide_id_') === 0){
47219					idClass = itemClass;
47220				}
47221			});
47222
47223			if(typeof id === 'undefined' || !id.length){
47224				id = '-1';
47225			}
47226			return {
47227				'type' : 'sudo_slider',
47228				'id' : idClass
47229			};
47230		}
47231	}
47232	// nivo-slider
47233	tmpEl = elem.closest('.module_nivo_slider ');
47234	if(tmpEl.length){
47235		var classes = tmpEl.attr("class").split(/\s+/);
47236
47237		classes.forEach(function(itemClass){
47238			if(itemClass.indexOf('mp_id') === 0){
47239				id = itemClass.replace('mp_id', '');
47240			}
47241		});
47242
47243		if(typeof id === 'undefined' || !id.length){
47244			id = '-1';
47245		}
47246		return {
47247			'type' : 'nivo_slider',
47248			'id' : id
47249		};
47250	}
47251	// produkt
47252	tmpEl = elem.closest('.flypage1');
47253	if (tmpEl.length) {
47254		id = jQuery('.flypage1').find('input[name=product_id]').val();
47255		if (typeof id === 'undefined' || !id.length) {
47256			id = '-1';
47257		}
47258		return {
47259			'type': 'product',
47260			'id'  : id
47261		};
47262	}
47263	var tmpFancy = elem.closest('.fancybox-container');
47264	if (tmpFancy.length) {
47265		id = jQuery('.flypage1').find('input[name=product_id]').val();
47266		if (typeof id === 'undefined' || !id.length) {
47267			id = '-1';
47268		}
47269		return {
47270			'type': 'fancybox',
47271			'id'  : id
47272		};
47273	}
47274	// module
47275	tmpEl = elem.closest('.mp');
47276	if (tmpEl.length) {
47277		var classes = tmpEl.attr("class").split(/\s+/);
47278		classes.forEach(function (itemClass) {
47279			if (itemClass.indexOf('mp_id') === 0) {
47280				id = itemClass.replace('mp_id', '');
47281			}
47282		});
47283		if (typeof id === 'undefined' || !id.length) {
47284			id = '-1';
47285		}
47286		return {
47287			'type': 'module',
47288			'id'  : id
47289		};
47290	}
47291	// vsetko ostatne
47292	var wrap = elem.parent();
47293
47294	if (wrap.hasClass('imagepin_parent')) {
47295		wrap = wrap.parent();
47296	}
47297
47298	if (typeof wrap.attr('id') !== 'undefined'){
47299		id = wrap.attr('id');
47300	} else {
47301		id = wrap.attr('class');
47302	}
47303	if(typeof id === 'undefined' || !id.length){
47304		id = '-1';
47305	}
47306	return {
47307		'type' : 'content',
47308		'id' : id
47309	};
47310};
47311
47312ImagePin.prototype.openEditVex = function (elem, fs) {
47313	var $this = this;
47314	var img = elem.attr('data-img');
47315	var vexClasses = 'vex-cs vex_pin_edit';
47316	if(typeof fs === 'undefined' || !fs.length){
47317		fs = '';
47318	}
47319
47320	if(elem.hasClass('row_action_edit') && elem.closest('fieldset').hasClass('pin_product_settings')) {
47321		elem
47322			.attr('data-content-type', 'table')
47323			.attr('data-content-id', elem.closest('.adminlist_data_row').find('.row-number-container').text());
47324	}
47325
47326	$this.activeElement = elem;
47327	if ($this.activeElement.attr('data-content-type') === 'fancybox') {
47328		vexClasses += ' show_above';
47329	}
47330	new AjaxRequest({
47331		img    : img,
47332		cType  : $this.activeElement.attr('data-content-type'),
47333		cId    : $this.activeElement.attr('data-content-id')
47334	})
47335		.setController('ImagePin')
47336		.setAction('loadImageData')
47337		.onSuccess(function (res) {
47338			if (res.data.success) {
47339				var mainVexId;
47340				vex.dialog.confirm({
47341					input          : res.data.html,
47342					message        : res.data.titleHtml,
47343					className      : vexClasses,
47344					escapeButtonCloses : false,
47345					showCloseButton: true,
47346					buttons        : [
47347						{
47348							type     : 'submit',
47349							text     : $this.langs.save_btn,
47350							className: 'pin_edit_save vex-dialog-button-primary'
47351						},
47352						{
47353							type     : 'submit',
47354							text     : $this.langs.cancel_btn,
47355							className: 'pin_edit_cancel vex-dialog-button-secondary'
47356						}
47357					],
47358					beforeClose : function () {
47359						if ($this.confirmedClose) {
47360							jQuery(window).off('keydown');
47361							return true;
47362						} else {
47363							if (($this.loadedPins != JSON.stringify($this.currentPins)) || ($this.loadedTitle !== $this.title) || $this.editingMode) {
47364								vex.dialog.confirm({
47365									message           : $this.langs.warning,
47366									input             : $this.langs.abort_changes,
47367									escapeButtonCloses: true,
47368									showCloseButton   : true,
47369									buttons: [
47370										{
47371											type     : 'submit',
47372											text     : $this.langs.save_changes,
47373											className: 'pin_warning_save vex-dialog-button-primary'
47374										},
47375										{
47376											type     : 'submit',
47377											text     : $this.langs.delete_changes,
47378											className: 'pin_warning_cancel vex-dialog-button-secondary'
47379										}
47380									],
47381									className         : 'vex-cs alert vex_pin_warning',
47382									afterOpen       : function (){
47383										jQuery('.pin_warning_save').click(function (e){
47384											e.preventDefault();
47385											$this.saveNewLayout(fs, mainVexId);
47386											vex.close();
47387										});
47388										jQuery('.pin_warning_cancel').click(function (e){
47389											e.preventDefault();
47390											$this.confirmedClose = true;
47391											$this.loadedPins     = '';
47392											$this.currentPins    = [];
47393											$this.newPin         = JSON.parse(JSON.stringify($this.templatePin));
47394											vex.closeAll();
47395										});
47396									}
47397								});
47398							} else {
47399								jQuery(window).off('keydown');
47400								return true;
47401							}
47402						}
47403						return false;
47404					},
47405					afterOpen      : function () {
47406						mainVexId = this.id;
47407						$this.bindDraggable();
47408						$this.confirmedClose = false;
47409						$this.editingMode = false;
47410						jQuery('.pin_edit_save').prop('disabled', true);
47411						jQuery('#active_image').click({param1: $this}, $this.addPin);
47412						jQuery('#edit_image_pin_times').hide();
47413						jQuery('#editing_pin_title').hide();
47414
47415						if((res.data.warning).length > 1) {
47416							$this.openErrorVex({
47417								'error'     : 'Ajax failed to return data.',
47418								'ajax_res'  : res.data,
47419								'custom'    : res.data.warning
47420							});
47421						}
47422
47423						jQuery('.pin_edit_save').on('mousedown click' , function (e) {
47424							e.preventDefault();
47425							if(e.type !== 'click') {
47426								$this.saveNewLayout(fs, mainVexId);
47427							}
47428						});
47429
47430						jQuery(window).on('keydown',function(e){
47431							if(e.keyCode == 116){
47432								if(($this.loadedPins != JSON.stringify($this.currentPins)) || ($this.loadedTitle !== $this.title) || $this.editingMode){
47433									e.preventDefault();
47434									e.stopImmediatePropagation();
47435									vex.close(mainVexId);
47436								}
47437							} else if ($this.editingMode) {
47438								if(e.keyCode == 13) {
47439									e.preventDefault();
47440									e.stopImmediatePropagation();
47441									$this.saveSetName(true);
47442								} else if (e.keyCode == 27) {
47443									e.preventDefault();
47444									e.stopImmediatePropagation();
47445									$this.saveSetName(false);
47446								}
47447							}
47448						});
47449
47450						jQuery('.vex_pin_edit').on('click' ,function (e) {
47451							if($this.editingMode) {
47452								if (e.target.id !== 'edit_image_pin_pen' && e.target.id !== 'editing_pin_title' && e.target.id !== 'image_pin_title') {
47453									if (e.target.id === 'edit_image_pin_times') {
47454										$this.saveSetName(false);
47455									} else {
47456										if (jQuery('#editing_pin_title').val() !== $this.loadedTitle) {
47457											$this.saveSetName(true);
47458										} else {
47459											$this.saveSetName(false);
47460										}
47461									}
47462								} else if (e.target.id === 'editing_pin_title') {
47463									var text = jQuery('#editing_pin_title').val();
47464									if( text === window.getSelection().toString()){
47465										$this.deselectCounter += 1;
47466										if($this.deselectCounter === 2) {
47467											window.getSelection().removeAllRanges();
47468											$this.deselectCounter = 0;
47469										}
47470									}
47471								}
47472							}
47473						});
47474
47475						jQuery('#edit_image_pin_pen, .image_pin_title_wrap span').click(function (){
47476							var title = jQuery('#image_pin_title');
47477							var pen = jQuery('#edit_image_pin_pen');
47478							var times = jQuery('#edit_image_pin_times');
47479							var editInput = jQuery('#editing_pin_title');
47480
47481							// editing Mode urcuje ci mame otvoreny input na nazov. Potrebne pre stopnutie niektorych listenerov.
47482							$this.editingMode = true;
47483
47484							// switching magic
47485							title.hide();
47486							editInput.show().select();
47487							pen.hide();
47488							times.show();
47489						});
47490					}
47491				});
47492
47493				$this.vexImg = res.data.img;
47494				$this.loadedTitle = res.data.title;
47495				$this.title = res.data.title;
47496				$this.newImg = res.data.new_img;
47497
47498				if(res.data.pins.length){
47499					var loadedPins = JSON.parse(res.data.pins);
47500					loadedPins.forEach(function (item, index) {
47501						$this.newPin.pinId  = 'pin_' + item.id;
47502						$this.newPin.id     = item.product_id;
47503						$this.newPin.x      = item.x_axis;
47504						$this.newPin.y      = item.y_axis;
47505						$this.newPin.action = '-1';
47506						$this.currentPins.push($this.newPin);
47507						$this.newPin = JSON.parse(JSON.stringify($this.templatePin));
47508					});
47509					$this.loadedPins = JSON.stringify($this.currentPins);
47510				}
47511			} else {
47512				$this.openErrorVex({
47513					'error'     : 'Ajax returned false data.',
47514					'ajax_res'  : res.data
47515				});
47516			}
47517		})
47518		.onError(function (res) {
47519			$this.openErrorVex({
47520				'error'     : 'Ajax failed to return data.',
47521				'ajax_res'  : res
47522			});
47523		})
47524		.send();
47525};
47526
47527ImagePin.prototype.saveNewLayout = function (fs, mainVexId){
47528	var $this = this;
47529
47530	if (!($this.title).length) {
47531		$this.openErrorVex({
47532			'custom': $this.langs.empty_title,
47533			'error' : 'ImagePin Error: Set name is undefined!'
47534		});
47535	}
47536
47537	if ($this.loadedPins != JSON.stringify($this.currentPins) || ($this.loadedTitle !== $this.title)) {
47538		new AjaxRequest({
47539			title   : $this.title,
47540			pins    : JSON.stringify($this.currentPins),
47541			img     : $this.vexImg,
47542			newImg  : $this.newImg,
47543			url     : js_global_live_site_sef,
47544			cType  : $this.activeElement.attr('data-content-type'),
47545			cId    : $this.activeElement.attr('data-content-id')
47546		})
47547			.setController('ImagePin')
47548			.setAction('saveImagePins')
47549			.onSuccess(function (res) {
47550				if (res.data.success) {
47551					$this.confirmedClose = true;
47552					$this.loadedPins  = '';
47553					$this.currentPins = [];
47554					$this.newPin      = JSON.parse(JSON.stringify($this.templatePin));
47555
47556					if(fs.length) {
47557						jQuery('#app_id_1132_dataTable').DataTable().ajax.reload();
47558						vex.close(mainVexId);
47559					} else {
47560						var visiblePins = $this.activeElement.parent().find('.visible_pin_wrap');
47561						var pinInfos = jQuery('pins_info_body');
47562						visiblePins.each(function (index, item){
47563							var current = jQuery(item);
47564							if(current.children().hasClass('loaded_info')){
47565								var classes = current.children().attr("class").split(/\s+/);
47566
47567								classes.forEach(function(itemClass){
47568									if(itemClass.indexOf('loaded_') === 0){
47569										pinInfos.find('.'+itemClass).remove();
47570									}
47571								});
47572							}
47573							current.remove();
47574						});
47575						$this.loadPagePins($this.vexImg);
47576						vex.close(mainVexId);
47577					}
47578				} else {
47579					$this.openErrorVex({
47580						'error'     : 'Function returned false success, internal error.',
47581						'ajax_res'  : res
47582					});
47583				}
47584			})
47585			.onError(function (res) {
47586				$this.openErrorVex({
47587					'error'     : 'Ajax failed to return data.',
47588					'ajax_res'  : res
47589				});
47590			})
47591			.send();
47592	}
47593};
47594
47595ImagePin.prototype.saveSetName = function(save) {
47596	var $this = this;
47597	var title = jQuery('#image_pin_title');
47598	var pen = jQuery('#edit_image_pin_pen');
47599	var times = jQuery('#edit_image_pin_times');
47600	var editInput = jQuery('#editing_pin_title');
47601
47602	if(save && ($this.title !== editInput.val()) && editInput.val() !== '') {
47603		$this.title = editInput.val();
47604		if($this.title.length) {
47605			new AjaxRequest({
47606				title : $this.title
47607			})
47608				.setController('ImagePin')
47609				.setAction('checkSetTitle')
47610				.onSuccess(function (res) {
47611					if (res.data.success) {
47612						if(res.data.duplicity) {
47613							$this.title = $this.title + '(' + res.data.count + ')';
47614							title.parent().append('<div class="pin_error_msg">'+$this.langs.duplicate_title+'</div>');
47615
47616							setTimeout(function (){
47617								jQuery('.pin_error_msg').fadeOut(150);
47618								setTimeout(function (){
47619									jQuery('.pin_error_msg').remove();
47620								}, 150);
47621							}, 3000);
47622						}
47623						title.text($this.title);
47624
47625						jQuery('.pin_edit_save').prop('disabled', false);
47626
47627						editInput.hide();
47628
47629						title.show();
47630
47631						times.hide();
47632						pen.show();
47633						$this.editingMode = false;
47634					} else {
47635						$this.openErrorVex({
47636							'error'     : 'Ajax failed to return data.',
47637							'ajax_res'  : res,
47638							'custom'    : $this.langs.check_title
47639						});
47640						$this.editingMode = false;
47641					}
47642				})
47643				.onError(function (res) {
47644					$this.openErrorVex({
47645						'error'     : 'Ajax failed to return data.',
47646						'ajax_res'  : res,
47647						'custom'    : $this.langs.check_title
47648					});
47649					$this.editingMode = false;
47650				})
47651				.send();
47652		} else {
47653			$this.openErrorVex({
47654				'error'     : 'Ajax failed to return data.',
47655				'ajax_res'  : res,
47656				'custom'    : $this.langs.check_title
47657			});
47658			editInput.hide();
47659			title.show();
47660
47661			times.hide();
47662			pen.show();
47663			$this.editingMode = false;
47664		}
47665	} else {
47666		editInput.hide();
47667		editInput.val($this.title);
47668		title.show();
47669
47670		times.hide();
47671		pen.show();
47672		$this.editingMode = false;
47673	}
47674};
47675
47676ImagePin.prototype.addPin = function (e) {
47677	var oldPin = jQuery('.new_pin');
47678	if (oldPin.length) {
47679		oldPin.parent().remove();
47680	}
47681
47682	var $this = e.data.param1;
47683	var elem = jQuery(this);
47684
47685	var rect = e.target.getBoundingClientRect();
47686	var x = e.clientX - rect.left;
47687	var y = e.clientY - rect.top;
47688
47689	var x_axis = ((x / elem.innerWidth()) * 100).toFixed(2);
47690	var y_axis = ((y / elem.innerHeight()) * 100).toFixed(2);
47691
47692	$this.newPin.pinId = 'pin_n_' + jQuery('.finished_pin').length;
47693	$this.newPin.x = x_axis;
47694	$this.newPin.y = y_axis;
47695	$this.newPin.action = 1;
47696
47697	jQuery('.image_edit_pane .pins_wrap').append($this.newPinHtml);
47698	jQuery('.new_pin').after($this.productInput);
47699	jQuery('.new_pin').attr('id', $this.newPin.pinId);
47700	jQuery('.new_wrap').css({top: y_axis + '%', left: x_axis + '%'});
47701
47702	$this.bindDraggable();
47703
47704	jQuery('#product_auto')
47705		.on('input', {param1: $this}, $this.initAutocomplete)
47706		.focus()
47707		.trigger('input');
47708};
47709
47710ImagePin.prototype.initAutocomplete = function (e) {
47711	$this = e.data.param1;
47712	var acInstance;
47713	acInstance = jQuery('#product_auto').uiautocomplete({
47714		source: function(request, response){
47715			if (request.term.length > 2) {
47716				new AjaxRequest({inputValue: request.term})
47717					.setController('ImagePin')
47718					.setAction('getProductsAutoComplete')
47719					.onSuccess(function (res) {
47720						if(res.data.success && res.data.products.length) {
47721							var data         = JSON.parse(res.data.products);
47722
47723							var responseData = [];
47724							data.forEach(function (item, index) {
47725								responseData.push({
47726									'value': item.product_id,
47727									'label': item.html
47728								});
47729							});
47730							response(responseData);
47731						} else {
47732							// pri autocomplete nechcem vyhadzovat vex na chybu kedze moze nastat pri kazdom inpute
47733							if( is_cs_user() ) {
47734								console.log(res.data.error);
47735							}
47736						}
47737					})
47738					.onError(function (res) {
47739						// pri autocomplete nechcem vyhadzovat vex na chybu kedze moze nastat pri kazdom inpute
47740						if( is_cs_user() ) {
47741							console.log(res.data.error);
47742						}
47743					})
47744					.send();
47745			}
47746		},
47747		focus: function (event, ui) {
47748			//console.log('focus');
47749		},
47750		autoFocus: false,
47751		select: function (event, ui) {
47752			jQuery('#product_auto').remove();
47753			jQuery('.new_pin').addClass('finished_pin').removeClass('new_pin');
47754			$this.newPin.id = ui.item.value;
47755			$this.currentPins.push($this.newPin);
47756			$this.saveNewPin($this.newPin.pinId);
47757			jQuery('.pin_edit_save').prop('disabled', false);
47758			$this.newPin = JSON.parse(JSON.stringify($this.templatePin));
47759			toggleScroll(true);
47760		},
47761		open: function () {
47762			jQuery('.ui-autocomplete').addClass('product_pin_autocomplete');
47763			toggleScroll(false);
47764		},
47765		close: function() {
47766			toggleScroll(true);
47767		},
47768		minLength: 3
47769	});
47770	acInstance.data("uiAutocomplete")._renderItem = function (ul, item) {
47771		return jQuery("<li></li>")
47772			.data("item.autocomplete", item)
47773			.append(item.label)
47774			.appendTo(ul);
47775	};
47776};
47777ImagePin.prototype.deletePin = function (pinId) {
47778	toggleScroll(true);
47779	if (pinId == '.new_pin') {
47780		jQuery('.new_wrap').remove();
47781	} else {
47782		jQuery('#'+pinId).parent().remove();
47783
47784		if( pinId.indexOf('pin_n_') !== -1 ) {
47785			ImagePin.currentPins.forEach(function (item , index){
47786				if(item.pinId == pinId) {
47787					ImagePin.currentPins.splice(index, 1);
47788				}
47789			});
47790		} else {
47791			ImagePin.currentPins.forEach(function (item , index){
47792				if(item.pinId == pinId) {
47793					item.action = 0;
47794				}
47795			});
47796		}
47797
47798		jQuery('.pin_edit_save').prop('disabled', false);
47799	}
47800};
47801
47802ImagePin.prototype.bindHoverEffect = function() {
47803	// remove previous binds
47804	var $this = this;
47805	var elements = jQuery('.visible_pin:not(.loaded_info)');
47806	elements.off( "mouseenter" );
47807
47808	elements.mouseenter(function() {
47809		var pin = jQuery(this);
47810
47811		if(!pin.hasClass('loaded_info')) {
47812			pin.addClass('loaded_info');
47813			new AjaxRequest({id: pin.attr('data-id'), x_axis: pin.attr("data-left"), y_axis: pin.attr("data-top"), vexPin: 0})
47814				.setController('ImagePin')
47815				.setAction('loadNewPinInfo')
47816				.onSuccess(function (res) {
47817					if(res.data.success) {
47818						var pinClass = 'loaded_' + pin.attr('data-id') + '_' + Date.now();
47819						var offset = pin.offset();
47820						var foundInfo = jQuery('.pin_info[class*="' + 'loaded_' + pin.attr('data-id') + '"]');
47821						if (typeof foundInfo[0] !== 'undefined' && ((foundInfo.css('top') === (offset.top + 'px')) && (foundInfo.css('left') === (offset.left + 'px')))) {
47822							pinClass = getClassLike(foundInfo.attr('class'), 'loaded_' + pin.attr('data-id'));
47823						} else {
47824							var info = jQuery(res.data.html).addClass(pinClass);
47825							if (pin.closest('.pins_wrap').find('.open_edit').attr('data-content-type') === 'fancybox') {
47826								info.addClass('show_above');
47827							}
47828							jQuery('.pins_info_body').append(info);
47829						}
47830						pin.addClass(pinClass);
47831						var newPinTab = jQuery('.pin_info.' + pinClass);
47832						newPinTab.hide();
47833
47834						var pinHeight = newPinTab.height();
47835						var windowHeight = jQuery(document).height();
47836
47837						if((pinHeight + offset.top) > windowHeight) {
47838							newPinTab.css({top: Math.floor(windowHeight - pinHeight)});
47839						}
47840
47841						jQuery('.' + pinClass).hover(function () {
47842							jQuery('.pin_info.' + pinClass).show();
47843						}, function () {
47844							jQuery('.pin_info.' + pinClass).hide();
47845						});
47846						if (jQuery('.' + pinClass + ':hover').length) {
47847							jQuery('.' + pinClass).trigger('mouseenter');
47848						}
47849					} else {
47850						$this.openErrorVex({
47851							'error'     : 'Function failed to return correct data.',
47852							'ajax_res'  : res
47853						});
47854					}
47855				})
47856				.onError(function (res) {
47857					$this.openErrorVex({
47858						'error'     : 'Ajax failed to return data.',
47859						'ajax_res'  : res
47860					});
47861				})
47862				.send();
47863		} else {
47864			// update position (for window resizing)
47865			var offset  = pin.offset();
47866			var classes = pin.attr("class").split(/\s+/);
47867
47868			var minLeftOffset = 86;
47869			var maxRightOffset = Math.floor(jQuery(window).width() - (108));
47870
47871			var offsetLeft = offset.left;
47872			if(offsetLeft >= minLeftOffset) {
47873				if(offsetLeft > maxRightOffset) {
47874					offsetLeft = maxRightOffset;
47875				}
47876			} else {
47877				offsetLeft = minLeftOffset;
47878			}
47879
47880			classes.forEach(function (itemClass) {
47881				if (itemClass.indexOf('loaded_') === 0) {
47882					var newPinTab = jQuery('.pin_info.' + itemClass);
47883					var windowHeight = jQuery(window).height();
47884					var pinOffTop = pin[0].getBoundingClientRect().top;
47885
47886					if((windowHeight - pinOffTop - 36) < 365 && pinOffTop > 365) {
47887						newPinTab.css({top: offset.top - 36, left: offsetLeft, transform: 'translate(-50%,-100%)'});
47888					} else if(pinOffTop > 365) {
47889						newPinTab.css({top: offset.top, left: offsetLeft, transform: 'translateX(-50%)'});
47890					} else {
47891						newPinTab.css({top: offset.top, left: offsetLeft, transform: 'translateX(-50%)'});
47892					}
47893				}
47894			});
47895		}
47896	});
47897};
47898ImagePin.prototype.bindDraggable = function () {
47899	var $this = this;
47900	var elements = jQuery('.pin_wrap');
47901
47902	elements.draggable({
47903		containment: '#active_image',
47904		iFrameFix  : true,
47905		stop       : function (e, ui) {
47906			var elem = jQuery('#active_image');
47907			var x_axis = ((ui.position.left / elem.innerWidth()) * 100).toFixed(2);
47908			var y_axis = ((ui.position.top / elem.innerHeight()) * 100).toFixed(2);
47909			jQuery(this).css({top: y_axis + '%', left: x_axis + '%'});
47910			var movedPin = jQuery(this).children();
47911			var id       = movedPin.attr('id');
47912			if (movedPin.hasClass('new_pin')) {
47913				$this.newPin.x = x_axis;
47914				$this.newPin.y = y_axis;
47915				jQuery('#product_auto')
47916					.trigger('input')
47917					.focus();
47918			} else {
47919				$this.currentPins.forEach(function (item) {
47920					if (item.pinId == id) {
47921						item.x = x_axis;
47922						item.y = y_axis;
47923						if (item.action != 1) {
47924							item.action = 2;
47925						}
47926					}
47927				});
47928			}
47929			jQuery('.pin_edit_save').prop('disabled', false);
47930		},
47931		start      : function (e, ui) {
47932			jQuery('.product_pin_autocomplete').hide();
47933		}
47934	});
47935};
47936ImagePin.prototype.saveNewPin = function (pinId) {
47937	var $this = this;
47938	new AjaxRequest({id: $this.newPin.id, x_axis: $this.newPin.x, y_axis: $this.newPin.y})
47939		.setController('ImagePin')
47940		.setAction('loadNewPinInfo')
47941		.onSuccess(function (res) {
47942			if (res.data.success) {
47943				var result = jQuery(res.data.html);
47944				result.find('.finished_pin')
47945					.attr('id', pinId)
47946					.append(jQuery($this.deleteButton));
47947				result.find('.pin_delete')
47948					.attr('onclick', 'ImagePin.deletePin("' + pinId + '")')
47949					.attr('title', $this.langs.help_title_rpin);
47950				jQuery('.new_wrap').replaceWith(result);
47951				$this.bindDraggable();
47952			} else {
47953				$this.openErrorVex({
47954					'error'   : 'Function failed to return correct data.',
47955					'ajax_res': res
47956				});
47957			}
47958		})
47959		.onError(function (res) {
47960			$this.openErrorVex({
47961				'error'   : 'Ajax failed to return data.',
47962				'ajax_res': res
47963			});
47964		})
47965		.send();
47966};
47967
47968ImagePin.prototype.initCustomSelect = function(){
47969	var $this = this;
47970	var selectBox = jQuery('.custom_select');
47971	var placeholderBox = jQuery('.custom_select_placeholder');
47972	var iconInput = jQuery('input[name=app1132_imagepin_icon_select]');
47973	var saveBox = '';
47974
47975	$this.originalValue = iconInput.val();
47976	placeholderBox.click(function (){
47977		if(selectBox.hasClass('closed')){
47978			selectBox.removeClass('closed').addClass('opened');
47979		} else {
47980			selectBox.removeClass('opened').addClass('closed');
47981		}
47982	});
47983
47984	selectBox.find('.custom_select_box_option').click(function (){
47985		var currentEl = jQuery(this);
47986		if(selectBox.hasClass('opened')){
47987			if(!currentEl.hasClass('selected')){
47988				selectBox.find('.custom_select_box .selected').removeClass('selected');
47989
47990				currentEl.addClass('selected');
47991				placeholderBox.find('.csi-icon').removeClass(iconInput.val()).addClass(currentEl.attr('data-value'));
47992				placeholderBox.find('.custom_select_box_placeholder_text').text(currentEl.attr('data-title'));
47993				iconInput.val(currentEl.attr('data-value'));
47994				selectBox.removeClass('opened').addClass('closed');
47995
47996
47997				if(iconInput.val() === $this.originalValue && saveBox.length) {
47998					saveBox.slideUp('slow');
47999				} else if (typeof js_fs_changes_monitor_notif !== 'undefined' && !saveBox.length){
48000					var fs_table = jQuery('.pin_product_settings');
48001					js_fs_changes_monitor_notif(fs_table.attr('id'));
48002					saveBox = fs_table.find('.save_cancel_container');
48003				} else {
48004					saveBox.slideDown('slow');
48005				}
48006			}
48007		}
48008	});
48009
48010	jQuery(window).click(function (e) {
48011		if(selectBox.hasClass('opened')){
48012			if(!jQuery('.custom_select').find(jQuery(e.target)).length){
48013				selectBox.removeClass('opened').addClass('closed');
48014			}
48015		}
48016	});
48017};
48018
48019ImagePin.prototype.initAdminTable = function (){
48020	var $this = this;
48021	var table = jQuery('#app_id_1132_dataTable');
48022	var checkedIds = [];
48023
48024	// nastavi custom callback na akcie v tabulke (search, order...)
48025	table.on('draw.dt' , function (){
48026		tableCallback();
48027	});
48028
48029	// definovanie stlpcov v tabulke
48030	var $columns =  [
48031		{
48032			"data": "id",
48033			"searchable" : false,
48034			"orderable" : false,
48035			"className" : 'number_container_cell'
48036		},
48037		{
48038			"data": "checkbox",
48039			"searchable" : false,
48040			"orderable" : false,
48041			"className" : 'checkbox_cell'
48042		},
48043		{
48044			"data": "set_name",
48045			"className" : 'pin_set_name'
48046		},
48047		{
48048			"data": "img_preview",
48049			"searchable" : false,
48050			"orderable" : false,
48051			"className" : 'pin_img_preview'
48052		},
48053		{
48054			"data": "url",
48055			"searchable" : false,
48056			"orderable" : false,
48057			"className" : 'pin_url'
48058		},
48059		{
48060			"data": "placement",
48061			"searchable" : true,
48062			"orderable" : true,
48063			"className" : 'pin_placement'
48064		},
48065		{
48066			"data": "pins",
48067			"orderable" : false,
48068			"className" : 'pin_pins'
48069		},
48070		{
48071			"data": "pincount",
48072			"searchable" : false,
48073			"className" : 'pin_pincount'
48074		},
48075		{
48076			"data": "cdate",
48077			"className" : 'pin_cdate'
48078		}
48079	];
48080
48081	// definovanie datatable
48082	table.DataTable({
48083		"dom"           : 'frtlip',
48084		"language"      : dataTablesLangs[cms_js_lang_2code],
48085		"columns"       : $columns,
48086		"order"         : [2, 'desc'],
48087		"processing"    : true,
48088		"paging"        : true,
48089		"pageLength"    : 10, // defaultne nacinane
48090		"lengthMenu"    : [[10, 25, 50, 100, 150], [10, 25, 50, 100, 150]],
48091		"serverSide"    : true,
48092		"ajax"          : {
48093			"url": js_global_live_site + '/includes/ajax_handle.php?controller=ImagePin&action=loadTablePage',
48094			"type": "POST",
48095			"beforeSend": function (request) {
48096				if (typeof js_CS_Config_csrf !== 'undefined' && js_CS_Config_csrf && typeof js_CS_Config_csrf_header !== 'undefined' && js_CS_Config_csrf_header) {
48097					request.setRequestHeader(js_CS_Config_csrf_header, jQuery('meta[name="csrf-token"]').attr('content'));
48098				}
48099			}
48100		},
48101		"initComplete" : function(){
48102			tableCallback();
48103		}
48104	});
48105
48106	var tableCallback = function () {
48107		var checkboxes = jQuery('input[name="pin_check"]');
48108
48109		// listenery musia sa vypnut lebo sa nahodia nove kazdou akciou v tabulke
48110		jQuery('.pin_product_settings input[name="pin_check"], .pin_product_settings #check_all_pins, .pin_product_settings .image-pin-delete, .pin_product_settings .row_action_edit').off();
48111
48112		// doladovacie styly
48113		table.parent().addClass('adminlist-container');
48114		table.find('.odd').addClass('row0 adminlist_data_row');
48115		table.find('.even').addClass('row1 adminlist_data_row');
48116		table.css('width', '100%');
48117
48118		// zozbieranie oznacenych riadkov
48119		checkboxes.each(function(index,item){
48120			var el = jQuery(item);
48121			if(checkedIds.indexOf(el.attr('data-id')) != -1){
48122				el.closest('tr').addClass('adminlist-tr-checked');
48123				el.prop('checked', true);
48124			}
48125		});
48126
48127		// pri oznaceni pridat do pola oznacenych
48128		checkboxes.click(function (){
48129			var check = jQuery(this);
48130
48131			if(check.is(':checked')) {
48132				checkedIds.push(check.attr('data-id'));
48133			} else {
48134				var index = checkedIds.indexOf(check.attr('data-id'));
48135				if (index > -1) {
48136					checkedIds.splice(index, 1);
48137				}
48138			}
48139
48140			if(checkedIds.length) {
48141				jQuery('.image-pin-delete').show();
48142			} else {
48143				jQuery('.image-pin-delete').hide();
48144			}
48145		});
48146
48147		// oznac vsetky
48148		jQuery('#check_all_pins').click(function (){
48149			if(jQuery(this).is(':checked')){
48150				checkboxes.each(function(index,item){
48151					var id = jQuery(item).attr('data-id');
48152					if(checkedIds.indexOf(id) == -1){
48153						checkedIds.push(id);
48154					}
48155				});
48156				if(checkedIds.length) {
48157					jQuery('.image-pin-delete').show();
48158				}
48159			} else {
48160				checkboxes.each(function(index,item){
48161					var id = jQuery(item).attr('data-id');
48162					if(checkedIds.indexOf(id) != -1){
48163						checkedIds.splice(checkedIds.indexOf(id), 1);
48164					}
48165				});
48166				if(!checkedIds.length) {
48167					jQuery('.image-pin-delete').hide();
48168				}
48169			}
48170		});
48171
48172		// delete selected rows
48173		jQuery('.image-pin-delete').click(function(e){
48174			e.preventDefault();
48175			vex.dialog.confirm({
48176				message : $this.langs.warning,
48177				input : $this.langs.delete_pins,
48178				escapeButtonCloses : false,
48179				showCloseButton: false,
48180				className : 'vex-cs alert vex_pin_warning',
48181				callback: function (confirmed) {
48182					if (confirmed) {
48183						checkedIds.forEach(function (value) {
48184							$this.deleteAllPins(value);
48185						});
48186
48187						jQuery('#app_id_1132_dataTable').DataTable().ajax.reload();
48188					} else {
48189						return false;
48190					}
48191				}
48192			});
48193		});
48194
48195		// open edit vex
48196		jQuery('.pin_product_settings .row_action_edit').click(function(e) {
48197			e.preventDefault();
48198			var elem = jQuery(this);
48199			$this.openEditVex(elem, 'table');
48200		});
48201	};
48202};
48203
48204ImagePin.prototype.openErrorVex = function (data) {
48205	var $this = this;
48206
48207	if ( is_cs_user() ) {
48208		console.log(data.error);
48209		if((data.ajax_res).length) {
48210			console.log(data.ajax_res);
48211		}
48212	}
48213
48214	if (typeof data.custom !== 'undefined'){
48215		vex.dialog.alert({
48216			className : 'vex-cs alert vex_pin_warning',
48217			message : $this.langs.warning,
48218			input : data.custom
48219		});
48220	} else {
48221		vex.dialog.alert({
48222			className : 'vex-cs alert vex_pin_warning',
48223			message : $this.langs.warning,
48224			input : $this.langs.error_occured
48225		});
48226	}
48227};
48228// zmaz obrazok a jeho piny. ID z db.
48229ImagePin.prototype.deleteAllPins = function (id) {
48230	new AjaxRequest({id: id})
48231		.setController('ImagePin')
48232		.setAction('deleteAllPins')
48233		.send();
48234};
48235
48236ImagePin = new ImagePin();
48237
48238// Helpers
48239
48240function getClassLike (classString, classNeedle) {
48241	var $this = this;
48242	var foundClass = '';
48243	var classArr = classString.split(/\s+/);
48244
48245	classArr.forEach(function (itemClass){
48246		if(itemClass.indexOf(classNeedle) === 0){
48247			foundClass = itemClass;
48248		}
48249	});
48250
48251	return foundClass;
48252}
48253
48254// true = enable | false = disable
48255function toggleScroll(mode) {
48256	if(mode) {
48257		window.onscroll = function() {};
48258	} else {
48259		var top = window.pageYOffset || document.documentElement.scrollTop;
48260		var left = window.pageXOffset || document.documentElement.scrollLeft;
48261
48262		window.onscroll = function() {
48263			window.scrollTo(left, top);
48264		};
48265	}
48266}
48267
48268

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